diff --git a/.github/workflows/pro-integration-tests.yml b/.github/workflows/pro-integration-tests.yml index a12ece5d7b..7da5303e9a 100644 --- a/.github/workflows/pro-integration-tests.yml +++ b/.github/workflows/pro-integration-tests.yml @@ -95,7 +95,9 @@ jobs: - name: Setup Node uses: ./.github/actions/setup-node-with-retry with: - node-version: 22 + # Pin to 22.12.x (LTS) - V8 bug from issue #56010 was fixed in 22.12.0 + # https://github.com/nodejs/node/issues/56010 + node-version: '22.12.x' cache: yarn cache-dependency-path: 'react_on_rails_pro/**/yarn.lock' @@ -191,7 +193,9 @@ jobs: - name: Setup Node uses: ./.github/actions/setup-node-with-retry with: - node-version: 22 + # Pin to 22.12.x (LTS) - V8 bug from issue #56010 was fixed in 22.12.0 + # https://github.com/nodejs/node/issues/56010 + node-version: '22.12.x' cache: yarn cache-dependency-path: 'react_on_rails_pro/**/yarn.lock' @@ -388,7 +392,9 @@ jobs: - name: Setup Node uses: ./.github/actions/setup-node-with-retry with: - node-version: 22 + # Pin to 22.12.x (LTS) - V8 bug from issue #56010 was fixed in 22.12.0 + # https://github.com/nodejs/node/issues/56010 + node-version: '22.12.x' cache: yarn cache-dependency-path: 'react_on_rails_pro/**/yarn.lock' diff --git a/.github/workflows/pro-lint.yml b/.github/workflows/pro-lint.yml index 524f21ca78..8f2aa328d5 100644 --- a/.github/workflows/pro-lint.yml +++ b/.github/workflows/pro-lint.yml @@ -93,7 +93,9 @@ jobs: - name: Setup Node uses: ./.github/actions/setup-node-with-retry with: - node-version: 22 + # Pin to 22.11.0 (LTS) to avoid V8 bug in 22.21.0 + # https://github.com/nodejs/node/issues/56010 + node-version: '22.11.0' cache: yarn cache-dependency-path: 'react_on_rails_pro/**/yarn.lock' @@ -159,6 +161,10 @@ jobs: - name: Generate file-system based entrypoints run: cd spec/dummy && bundle exec rake react_on_rails:generate_packs + - name: Build react-on-rails package (required for Pro eslint import resolution) + working-directory: . + run: yarn workspace react-on-rails-pro build + - name: Lint Ruby run: bundle exec rubocop --ignore-parent-exclusion diff --git a/.github/workflows/pro-test-package-and-gem.yml b/.github/workflows/pro-test-package-and-gem.yml index d09a132101..38d7f32b6f 100644 --- a/.github/workflows/pro-test-package-and-gem.yml +++ b/.github/workflows/pro-test-package-and-gem.yml @@ -95,9 +95,11 @@ jobs: - name: Setup Node uses: ./.github/actions/setup-node-with-retry with: - node-version: 22 + # Pin to 22.11.0 (LTS) to avoid V8 bug in 22.21.0 + # https://github.com/nodejs/node/issues/56010 + node-version: '22.11.0' cache: yarn - cache-dependency-path: 'react_on_rails_pro/**/yarn.lock' + cache-dependency-path: '**/yarn.lock' - name: Print system information run: | @@ -196,9 +198,11 @@ jobs: - name: Setup Node uses: ./.github/actions/setup-node-with-retry with: - node-version: 22 + # Pin to 22.11.0 (LTS) to avoid V8 bug in 22.21.0 + # https://github.com/nodejs/node/issues/56010 + node-version: '22.11.0' cache: yarn - cache-dependency-path: 'react_on_rails_pro/**/yarn.lock' + cache-dependency-path: '**/yarn.lock' - name: Print system information run: | @@ -214,29 +218,14 @@ jobs: path: react_on_rails_pro/node_modules key: v4-pro-package-node-modules-cache-${{ hashFiles('react_on_rails_pro/yarn.lock') }} - - name: Remove old webpack bundles - run: | - rm -rf spec/dummy/public/webpack - rm -rf spec/dummy/ssr-generated - - - id: get-sha - run: echo "sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT" - - - name: Restore test webpack bundles from cache - uses: actions/cache@v4 - with: - path: | - react_on_rails_pro/spec/dummy/public/webpack/test - react_on_rails_pro/spec/dummy/ssr-generated - key: v4-pro-dummy-app-webpack-bundle-${{ steps.get-sha.outputs.sha }} - - name: Install Node modules with Yarn for Pro package + working-directory: . run: | sudo yarn global add yalc yarn install --frozen-lockfile --no-progress --no-emoji - name: Run JS unit tests for Pro package - run: yarn run nps test.ci + run: yarn workspace react-on-rails-pro-node-renderer run ci env: JEST_JUNIT_OUTPUT_DIR: ./jest JEST_JUNIT_ADD_FILE_ATTRIBUTE: "true" @@ -246,10 +235,10 @@ jobs: if: always() with: name: pro-jest-results - path: react_on_rails_pro/jest + path: packages/react-on-rails-pro-node-renderer/jest # RSpec tests for Pro package - rspec-package-specs: + rspec-gem-specs: needs: detect-changes if: | !( diff --git a/.gitignore b/.gitignore index b151e0db66..3fa105d8dc 100644 --- a/.gitignore +++ b/.gitignore @@ -66,4 +66,10 @@ ssr-generated # Claude Code local settings .claude/settings.local.json -packages/ + +# Workspace package build outputs (but track source code) +packages/*/lib/ +packages/**/node_modules/ + +# Jest test reports +junit.xml diff --git a/.prettierignore b/.prettierignore index d236d6b53c..3eaf38a92a 100644 --- a/.prettierignore +++ b/.prettierignore @@ -2,6 +2,7 @@ node_modules/ package.json # Exclude pro package (has its own formatting) react_on_rails_pro/ +packages/react-on-rails-pro-node-renderer/tests/fixtures/projects tmp/ coverage/ **/app/assets/webpack/ diff --git a/LICENSE.md b/LICENSE.md index a6ba12b5c4..dab832efd2 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -20,6 +20,7 @@ The following directories and all their contents are licensed under the **MIT Li The following directories and all their contents are licensed under the **React on Rails Pro License**: - `packages/react-on-rails-pro/` (entire package) +- `packages/react-on-rails-pro-node-renderer/` (entire package) - `react_on_rails_pro/` (entire directory) See [REACT-ON-RAILS-PRO-LICENSE.md](./REACT-ON-RAILS-PRO-LICENSE.md) for complete Pro license terms. diff --git a/eslint.config.ts b/eslint.config.ts index 550f4ccf84..6d03569f0c 100644 --- a/eslint.config.ts +++ b/eslint.config.ts @@ -51,6 +51,11 @@ const config = tsEslint.config([ // generator templates - exclude TypeScript templates that need tsconfig.json '**/templates/**/*.tsx', '**/templates/**/*.ts', + // test config files in packages - Jest/Babel configs cause ESM/CJS conflicts with ESLint + 'packages/*/tests/**', + 'packages/*/*.test.{js,jsx,ts,tsx}', + 'packages/*/babel.config.js', + 'packages/*/jest.config.js', ]), { files: ['**/*.[jt]s', '**/*.[jt]sx', '**/*.[cm][jt]s'], @@ -227,6 +232,15 @@ const config = tsEslint.config([ // TypeScript compiler validates these imports 'import/named': 'off', 'import/no-unresolved': 'off', + 'import/no-cycle': 'off', + 'import/no-relative-packages': 'off', + 'import/no-duplicates': 'off', + 'import/extensions': 'off', + 'import/order': 'off', + 'import/no-self-import': 'off', + 'import/no-named-as-default': 'off', + 'import/no-named-as-default-member': 'off', + 'import/export': 'off', // Disable unsafe type rules - Pro package uses internal APIs with complex types '@typescript-eslint/no-unsafe-assignment': 'off', '@typescript-eslint/no-unsafe-call': 'off', @@ -240,6 +254,24 @@ const config = tsEslint.config([ '@typescript-eslint/unbound-method': 'off', }, }, + { + files: ['packages/react-on-rails-pro-node-renderer/**/*'], + rules: { + // Disable import rules for node-renderer - ESM requires .js extensions but ESLint + // can't resolve them for .ts files. TypeScript compiler validates these imports + 'import/named': 'off', + 'import/no-unresolved': 'off', + 'import/prefer-default-export': 'off', + // Disable unsafe type rules - node-renderer uses external libs with complex types + '@typescript-eslint/no-unsafe-assignment': 'off', + '@typescript-eslint/no-unsafe-call': 'off', + '@typescript-eslint/no-unsafe-member-access': 'off', + '@typescript-eslint/no-unsafe-return': 'off', + '@typescript-eslint/no-unsafe-argument': 'off', + // Allow missing extensions in require() calls - dynamic imports + 'import/extensions': 'off', + }, + }, { files: ['**/app-react16/**/*'], rules: { @@ -262,6 +294,15 @@ const config = tsEslint.config([ 'testing-library/no-node-access': 'off', }, }, + { + files: ['packages/react-on-rails-pro-node-renderer/tests/**/*'], + rules: { + // Allow non-null assertions in tests - they're acceptable for test data + '@typescript-eslint/no-non-null-assertion': 'off', + // Some tests validate error conditions without explicit assertions + 'jest/expect-expect': 'off', + }, + }, // must be the last config in the array // https://github.com/prettier/eslint-plugin-prettier?tab=readme-ov-file#configuration-new-eslintconfigjs prettierRecommended, diff --git a/package.json b/package.json index b7b9dfcd33..cbc1fe570d 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,8 @@ "type": "module", "workspaces": [ "packages/react-on-rails", - "packages/react-on-rails-pro" + "packages/react-on-rails-pro", + "packages/react-on-rails-pro-node-renderer" ], "directories": { "doc": "docs" @@ -19,6 +20,7 @@ "@babel/preset-react": "^7.26.3", "@babel/preset-typescript": "^7.27.1", "@eslint/compat": "^1.2.7", + "@jest/globals": "^29.7.0", "@swc/core": "^1.15.0", "@testing-library/dom": "^10.4.0", "@testing-library/jest-dom": "^6.6.3", @@ -45,6 +47,7 @@ "jest": "^29.7.0", "jest-environment-jsdom": "^29.7.0", "jest-fetch-mock": "^3.0.3", + "jest-junit": "^16.0.0", "jsdom": "^22.1.0", "knip": "^5.46.0", "nps": "^5.9.3", @@ -65,10 +68,10 @@ "scripts": { "test": "yarn workspaces run test", "clean": "yarn workspaces run clean", - "start": "nps", - "build": "yarn workspace react-on-rails run build && yarn workspace react-on-rails-pro run build", + "start": "yarn run nps", + "build": "yarn workspace react-on-rails run build && yarn workspace react-on-rails-pro run build && yarn workspace react-on-rails-pro-node-renderer run build", "build-watch": "yarn workspaces run build-watch", - "lint": "nps eslint", + "lint": "yarn run nps eslint", "lint:scss": "stylelint \"spec/dummy/app/assets/stylesheets/**/*.scss\" \"spec/dummy/client/**/*.scss\"", "check": "yarn run lint && yarn workspaces run check", "type-check": "yarn workspaces run type-check", diff --git a/packages/react-on-rails-pro-node-renderer/babel.config.js b/packages/react-on-rails-pro-node-renderer/babel.config.js new file mode 100644 index 0000000000..19646cbe9e --- /dev/null +++ b/packages/react-on-rails-pro-node-renderer/babel.config.js @@ -0,0 +1,7 @@ +module.exports = { + presets: [ + ['@babel/preset-env', { targets: { node: 'current' } }], + '@babel/preset-typescript', + '@babel/preset-react', + ], +}; diff --git a/packages/react-on-rails-pro-node-renderer/package.json b/packages/react-on-rails-pro-node-renderer/package.json new file mode 100644 index 0000000000..716a3f5b41 --- /dev/null +++ b/packages/react-on-rails-pro-node-renderer/package.json @@ -0,0 +1,131 @@ +{ + "name": "react-on-rails-pro-node-renderer", + "version": "16.2.0-beta.12", + "protocolVersion": "2.0.0", + "description": "React on Rails Pro Node Renderer for server-side rendering", + "directories": { + "doc": "docs" + }, + "exports": { + ".": { + "types": "./lib/ReactOnRailsProNodeRenderer.d.ts", + "default": "./lib/ReactOnRailsProNodeRenderer.js" + }, + "./integrations/*": { + "types": "./lib/integrations/*.d.ts", + "default": "./lib/integrations/*.js" + }, + "./package.json": "./package.json" + }, + "resolutions": { + "sentry-testkit/body-parser": "npm:empty-npm-package@1.0.0", + "sentry-testkit/express": "npm:empty-npm-package@1.0.0" + }, + "dependencies": { + "@fastify/formbody": "^7.4.0 || ^8.0.2", + "@fastify/multipart": "^8.3.1 || ^9.0.3", + "fastify": "^4.29.0 || ^5.2.1", + "fs-extra": "^11.2.0", + "jsonwebtoken": "^9.0.2", + "lockfile": "^1.0.4", + "pino": "^9.0.0" + }, + "devDependencies": { + "@babel/core": "^7.26.10", + "@babel/eslint-parser": "^7.27.0", + "@babel/preset-env": "^7.20.2", + "@babel/preset-react": "^7.26.3", + "@babel/preset-typescript": "^7.27.1", + "@honeybadger-io/js": "^6.10.1", + "@sentry/node": "^7.120.0", + "@types/fs-extra": "^11.0.4", + "@types/jest": "^29.5.12", + "@types/jsonwebtoken": "^9.0.10", + "@types/lockfile": "^1.0.4", + "@types/touch": "^3.1.5", + "babel-jest": "^29.7.0", + "form-auto-content": "^3.2.1", + "form-data": "^4.0.1", + "jest-junit": "^16.0.0", + "jsdom": "^16.5.0", + "node-html-parser": "^7.0.1", + "nps": "^5.9.12", + "pino-pretty": "^13.0.0", + "react-on-rails": "*", + "redis": "^5.0.1", + "sentry-testkit": "^5.0.6", + "touch": "^3.1.0", + "typescript": "^5.4.3" + }, + "peerDependencies": { + "@honeybadger-io/js": ">=4.0.0", + "@sentry/node": ">=5.0.0 <9.0.0", + "@sentry/tracing": ">=5.0.0" + }, + "peerDependenciesMeta": { + "@honeybadger-io/js": { + "optional": true + }, + "@sentry/node": { + "optional": true + }, + "@sentry/tracing": { + "optional": true + } + }, + "scripts": { + "build": "yarn run clean && yarn run tsc --project src/tsconfig.json", + "build-watch": "yarn run clean && yarn run tsc --watch --project src/tsconfig.json", + "clean": "rm -rf ./lib", + "ci": "jest --ci --runInBand --reporters=default --reporters=jest-junit", + "developing": "nps node-renderer.debug", + "test": "jest tests", + "type-check": "yarn run tsc --noEmit --noErrorTruncation --project src/tsconfig.json", + "prepare": "[ -f lib/ReactOnRailsProNodeRenderer.js ] || yarn run build", + "prepublishOnly": "yarn run build", + "yalc:publish": "yalc publish", + "yalc": "yalc" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/shakacode/react_on_rails.git" + }, + "keywords": [ + "react", + "webpack", + "JavaScript", + "Ruby", + "on", + "Rails" + ], + "author": "justin@shakacode.com", + "license": "UNLICENSED", + "bugs": { + "url": "https://github.com/shakacode/react_on_rails/issues" + }, + "homepage": "https://github.com/shakacode/react_on_rails/tree/master/packages/react-on-rails-pro-node-renderer#readme", + "jest": { + "clearMocks": true, + "moduleNameMapper": { + "^(\\.{1,2}/.*)\\.js$": "$1" + }, + "resetModules": true, + "resetMocks": true, + "roots": [ + "." + ], + "setupFiles": [ + "./tests/helper.ts" + ], + "testEnvironment": "node", + "transform": { + "^.+\\.[jt]sx?$": "babel-jest" + } + }, + "husky": { + "hooks": { + "pre-commit": "yalc check" + } + }, + "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e" +} diff --git a/packages/react-on-rails-pro-node-renderer/script/preinstall.js b/packages/react-on-rails-pro-node-renderer/script/preinstall.js new file mode 100644 index 0000000000..f5b47cff29 --- /dev/null +++ b/packages/react-on-rails-pro-node-renderer/script/preinstall.js @@ -0,0 +1,31 @@ +#!/usr/bin/env node + +const path = require('path'); +const cp = require('child_process'); + +const inNodeModules = __dirname.split(path.sep).includes('node_modules'); + +if (inNodeModules) { + console.log('preinstall: running inside node_modules — skipping link steps.'); + process.exit(0); +} + +function runCommand(cmd, args) { + const res = cp.spawnSync(cmd, args, { stdio: 'inherit' }); + if (res.error) throw res.error; + if (res.status !== 0) throw new Error(`${cmd} ${args.join(' ')} exited with status ${res.status}`); +} + +try { + // Run the original optional link steps sequentially in a cross-platform way. + // First run the package script `link-source` via yarn, which will run any shell ops inside the script + // (yarn itself will handle invoking a shell for the script body), then call yalc. + runCommand('yarn', ['run', 'link-source']); + runCommand('yalc', ['add', '--link', 'react-on-rails']); +} catch (err) { + // Don't fail the overall install if these optional commands aren't available or fail, + // just log the error. + console.error('preinstall: optional link steps failed or are unavailable — continuing.', err); + // Keep the exit code 0 so the install doesn't fail. + process.exit(0); +} diff --git a/packages/react-on-rails-pro-node-renderer/src/ReactOnRailsProNodeRenderer.ts b/packages/react-on-rails-pro-node-renderer/src/ReactOnRailsProNodeRenderer.ts new file mode 100644 index 0000000000..d942cec17d --- /dev/null +++ b/packages/react-on-rails-pro-node-renderer/src/ReactOnRailsProNodeRenderer.ts @@ -0,0 +1,48 @@ +import cluster from 'cluster'; +import fastifyPackageJson from 'fastify/package.json'; +import { Config, buildConfig } from './shared/configBuilder.js'; + +const { version: fastifyVersion } = fastifyPackageJson; +import log from './shared/log.js'; +import { majorVersion } from './shared/utils.js'; + +export async function reactOnRailsProNodeRenderer(config: Partial = {}) { + const fastify5Supported = majorVersion(process.versions.node) >= 20; + const fastify5OrNewer = majorVersion(fastifyVersion) >= 5; + if (fastify5OrNewer && !fastify5Supported) { + log.error( + `Node.js version ${process.versions.node} is not supported by Fastify ${fastifyVersion}. +Please either use Node.js v20 or higher or downgrade Fastify by setting the following resolutions in your package.json: +{ + "@fastify/formbody": "^7.4.0", + "@fastify/multipart": "^8.3.1", + "fastify": "^4.29.0", +}`, + ); + process.exit(1); + } else if (!fastify5OrNewer && fastify5Supported) { + log.warn( + `Fastify 5+ supports Node.js ${process.versions.node}, but the current version of Fastify is ${fastifyVersion}. +You have probably forced an older version of Fastify by adding resolutions for it +and for "@fastify/..." dependencies in your package.json. Consider removing them.`, + ); + } + + const { workersCount } = buildConfig(config); + /* eslint-disable global-require,@typescript-eslint/no-require-imports -- + * Using normal `import` fails before the check above. + */ + const isSingleProcessMode = workersCount === 0; + if (isSingleProcessMode || cluster.isWorker) { + if (isSingleProcessMode) { + log.info('Running renderer in single process mode (workersCount: 0)'); + } + + const worker = require('./worker.js') as typeof import('./worker.js'); + await worker.default(config).ready(); + } else { + const master = require('./master.js') as typeof import('./master.js'); + master.default(config); + } + /* eslint-enable global-require,@typescript-eslint/no-require-imports */ +} diff --git a/packages/react-on-rails-pro-node-renderer/src/default-node-renderer.ts b/packages/react-on-rails-pro-node-renderer/src/default-node-renderer.ts new file mode 100755 index 0000000000..59e892acd4 --- /dev/null +++ b/packages/react-on-rails-pro-node-renderer/src/default-node-renderer.ts @@ -0,0 +1,8 @@ +// This is the default node-renderer from running `yarn start` +import { reactOnRailsProNodeRenderer } from './ReactOnRailsProNodeRenderer.js'; + +console.log('React on Rails Pro Node Renderer with ENV config'); + +reactOnRailsProNodeRenderer().catch((e: unknown) => { + throw e; +}); diff --git a/packages/react-on-rails-pro-node-renderer/src/integrations/api.ts b/packages/react-on-rails-pro-node-renderer/src/integrations/api.ts new file mode 100644 index 0000000000..8bb6954542 --- /dev/null +++ b/packages/react-on-rails-pro-node-renderer/src/integrations/api.ts @@ -0,0 +1,43 @@ +/** + * Public API for integrations with error reporting and tracing services. + * + * @example + * ```ts + * import Bugsnag from '@bugsnag/js'; + * import { addNotifier, setupTracing } from 'react-on-rails-pro-node-renderer/integrations/api'; + * Bugsnag.start({ ... }); + * + * addNotifier((msg) => { Bugsnag.notify(msg); }); + * setupTracing({ + * executor: async (fn) => { + * Bugsnag.startSession(); + * try { + * return await fn(); + * } finally { + * Bugsnag.pauseSession(); + * } + * }, + * }); + * ``` + * + * @module + */ + +export { default as log } from '../shared/log.js'; +export { + addErrorNotifier, + addMessageNotifier, + addNotifier, + error, + message, + Notifier, + ErrorNotifier, + MessageNotifier, +} from '../shared/errorReporter.js'; +export { + setupTracing, + TracingContext, + TracingIntegrationOptions, + UnitOfWorkOptions, +} from '../shared/tracing.js'; +export { configureFastify, FastifyConfigFunction } from '../worker.js'; diff --git a/packages/react-on-rails-pro-node-renderer/src/integrations/honeybadger.ts b/packages/react-on-rails-pro-node-renderer/src/integrations/honeybadger.ts new file mode 100644 index 0000000000..e8c7536311 --- /dev/null +++ b/packages/react-on-rails-pro-node-renderer/src/integrations/honeybadger.ts @@ -0,0 +1,28 @@ +import Honeybadger from '@honeybadger-io/js'; +import { addNotifier, configureFastify, message } from './api.js'; + +export function init({ fastify = false } = {}) { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + addNotifier((msg: any) => Honeybadger.notify(msg)); + + if (fastify) { + if ('requestHandler' in Honeybadger && 'withRequest' in Honeybadger) { + // https://docs.honeybadger.io/lib/javascript/integration/node/#fastify + // eslint-disable-next-line @typescript-eslint/no-explicit-any + configureFastify((app: any) => { + app.addHook('preHandler', Honeybadger.requestHandler); + + // Better than setErrorHandler in the above documentation + // eslint-disable-next-line @typescript-eslint/no-explicit-any + app.addHook('onError', (request: any, _reply: any, error: any, done: () => void) => { + Honeybadger.withRequest(request, () => { + Honeybadger.notify(error); + }); + done(); + }); + }); + } else { + message("Your Honeybadger version doesn't support Fastify integration, please upgrade it"); + } + } +} diff --git a/packages/react-on-rails-pro-node-renderer/src/integrations/sentry.ts b/packages/react-on-rails-pro-node-renderer/src/integrations/sentry.ts new file mode 100644 index 0000000000..51822689fe --- /dev/null +++ b/packages/react-on-rails-pro-node-renderer/src/integrations/sentry.ts @@ -0,0 +1,49 @@ +import * as Sentry from '@sentry/node'; +import { StartSpanOptions } from '@sentry/types'; +import { + addErrorNotifier, + addMessageNotifier, + message, + setupTracing, + configureFastify, + FastifyConfigFunction, +} from './api.js'; + +declare module '../shared/tracing.js' { + interface UnitOfWorkOptions { + sentry?: StartSpanOptions; + } +} + +export function init({ fastify = false, tracing = false } = {}) { + addMessageNotifier((msg) => { + Sentry.captureMessage(msg); + }); + + addErrorNotifier((msg) => { + Sentry.captureException(msg); + }); + + if (tracing) { + setupTracing({ + startSsrRequestOptions: () => ({ + sentry: { + op: 'handleRenderRequest', + name: 'SSR Request', + }, + }), + executor: (fn, unitOfWorkOptions) => + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + Sentry.startSpan(unitOfWorkOptions.sentry!, () => fn()), + }); + } + + if (fastify) { + // The check and the cast can be removed if/when we require Sentry SDK v8 + if ('setupFastifyErrorHandler' in Sentry) { + configureFastify(Sentry.setupFastifyErrorHandler as FastifyConfigFunction); + } else { + message('Please upgrade to Sentry SDK v8 to use Fastify integration'); + } + } +} diff --git a/packages/react-on-rails-pro-node-renderer/src/integrations/sentry6.ts b/packages/react-on-rails-pro-node-renderer/src/integrations/sentry6.ts new file mode 100644 index 0000000000..5e6459825d --- /dev/null +++ b/packages/react-on-rails-pro-node-renderer/src/integrations/sentry6.ts @@ -0,0 +1,52 @@ +/* eslint-disable @typescript-eslint/no-deprecated */ +import { captureException, captureMessage, startTransaction } from '@sentry/node'; +import { CaptureContext, TransactionContext } from '@sentry/types'; +import { addErrorNotifier, addMessageNotifier, message, setupTracing } from './api.js'; + +declare module '../shared/tracing.js' { + interface TracingContext { + sentry6?: CaptureContext; + } + + interface UnitOfWorkOptions { + sentry6?: TransactionContext; + } +} + +export function init({ tracing = false } = {}) { + addMessageNotifier((msg, tracingContext) => { + captureMessage(msg, tracingContext?.sentry6); + }); + + addErrorNotifier((msg, tracingContext) => { + captureException(msg, tracingContext?.sentry6); + }); + + if (tracing) { + try { + // eslint-disable-next-line global-require,@typescript-eslint/no-require-imports -- Intentionally absent in our devDependencies + require('@sentry/tracing'); + } catch (_e) { + message("Failed to load '@sentry/tracing'. Tracing is disabled."); + return; + } + + setupTracing({ + startSsrRequestOptions: () => ({ + sentry6: { + op: 'handleRenderRequest', + name: 'SSR Request', + }, + }), + executor: async (fn, unitOfWorkOptions) => { + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + const transaction = startTransaction(unitOfWorkOptions.sentry6!); + try { + return await fn({ sentry6: (scope) => scope.setSpan(transaction) }); + } finally { + transaction.finish(); + } + }, + }); + } +} diff --git a/packages/react-on-rails-pro-node-renderer/src/master.ts b/packages/react-on-rails-pro-node-renderer/src/master.ts new file mode 100644 index 0000000000..6c14aa0056 --- /dev/null +++ b/packages/react-on-rails-pro-node-renderer/src/master.ts @@ -0,0 +1,74 @@ +/** + * Entry point for master process that forks workers. + * @module master + */ +import cluster from 'cluster'; +import log from './shared/log.js'; +import { buildConfig, Config, logSanitizedConfig } from './shared/configBuilder.js'; +import restartWorkers from './master/restartWorkers.js'; +import * as errorReporter from './shared/errorReporter.js'; +import { getValidatedLicenseData } from './shared/licenseValidator.js'; + +const MILLISECONDS_IN_MINUTE = 60000; + +export default function masterRun(runningConfig?: Partial) { + // Validate license before starting - required in all environments + log.info('[React on Rails Pro] Validating license...'); + getValidatedLicenseData(); + log.info('[React on Rails Pro] License validation successful'); + + // Store config in app state. From now it can be loaded by any module using getConfig(): + const config = buildConfig(runningConfig); + const { + workersCount, + allWorkersRestartInterval, + delayBetweenIndividualWorkerRestarts, + gracefulWorkerRestartTimeout, + } = config; + + logSanitizedConfig(); + + for (let i = 0; i < workersCount; i += 1) { + cluster.fork(); + } + + // Listen for dying workers: + cluster.on('exit', (worker) => { + if (worker.isScheduledRestart) { + log.info('Restarting worker #%d on schedule', worker.id); + } else { + // TODO: Track last rendering request per worker.id + // TODO: Consider blocking a given rendering request if it kills a worker more than X times + const msg = `Worker ${worker.id} died UNEXPECTEDLY :(, restarting`; + errorReporter.message(msg); + } + // Replace the dead worker: + cluster.fork(); + }); + + // Schedule regular restarts of workers + if (allWorkersRestartInterval && delayBetweenIndividualWorkerRestarts) { + log.info( + 'Scheduled workers restarts every %d minutes (%d minutes btw each)', + allWorkersRestartInterval, + delayBetweenIndividualWorkerRestarts, + ); + + const allWorkersRestartIntervalMS = allWorkersRestartInterval * MILLISECONDS_IN_MINUTE; + const scheduleWorkersRestart = () => { + void restartWorkers(delayBetweenIndividualWorkerRestarts, gracefulWorkerRestartTimeout).finally(() => { + setTimeout(scheduleWorkersRestart, allWorkersRestartIntervalMS); + }); + }; + + setTimeout(scheduleWorkersRestart, allWorkersRestartIntervalMS); + } else if (allWorkersRestartInterval || delayBetweenIndividualWorkerRestarts) { + log.error( + "Misconfiguration, please provide both 'allWorkersRestartInterval' and " + + "'delayBetweenIndividualWorkerRestarts' to enable scheduled worker restarts", + ); + process.exit(1); + } else { + log.info('No schedule for workers restarts'); + } +} diff --git a/packages/react-on-rails-pro-node-renderer/src/master/restartWorkers.ts b/packages/react-on-rails-pro-node-renderer/src/master/restartWorkers.ts new file mode 100644 index 0000000000..8dd3acccdb --- /dev/null +++ b/packages/react-on-rails-pro-node-renderer/src/master/restartWorkers.ts @@ -0,0 +1,61 @@ +/** + * Perform all workers restart with provided delay + * @module master/restartWorkers + */ + +import cluster from 'cluster'; +import log from '../shared/log.js'; +import { SHUTDOWN_WORKER_MESSAGE } from '../shared/utils.js'; + +const MILLISECONDS_IN_MINUTE = 60000; + +declare module 'cluster' { + interface Worker { + isScheduledRestart?: boolean; + } +} + +export default async function restartWorkers( + delayBetweenIndividualWorkerRestarts: number, + gracefulWorkerRestartTimeout: number | undefined, +) { + log.info('Started scheduled restart of workers'); + + if (!cluster.workers) { + throw new Error('No workers to restart'); + } + for (const worker of Object.values(cluster.workers).filter((w) => !!w)) { + log.debug('Kill worker #%d', worker.id); + worker.isScheduledRestart = true; + + worker.send(SHUTDOWN_WORKER_MESSAGE); + + // It's inteded to restart worker in sequence, it shouldn't happens in parallel + // eslint-disable-next-line no-await-in-loop + await new Promise((resolve) => { + let timeout: NodeJS.Timeout; + + const onExit = () => { + clearTimeout(timeout); + resolve(); + }; + worker.on('exit', onExit); + + // Zero means no timeout + if (gracefulWorkerRestartTimeout) { + timeout = setTimeout(() => { + log.debug('Worker #%d timed out, forcing kill it', worker.id); + worker.destroy(); + worker.off('exit', onExit); + resolve(); + }, gracefulWorkerRestartTimeout); + } + }); + // eslint-disable-next-line no-await-in-loop + await new Promise((resolve) => { + setTimeout(resolve, delayBetweenIndividualWorkerRestarts * MILLISECONDS_IN_MINUTE); + }); + } + + log.info('Finished scheduled restart of workers'); +} diff --git a/packages/react-on-rails-pro-node-renderer/src/shared/configBuilder.ts b/packages/react-on-rails-pro-node-renderer/src/shared/configBuilder.ts new file mode 100644 index 0000000000..d22bd908a6 --- /dev/null +++ b/packages/react-on-rails-pro-node-renderer/src/shared/configBuilder.ts @@ -0,0 +1,317 @@ +/** + * Reads CLI arguments and build the config. + * + * @module worker/configBuilder + */ +import os from 'os'; +import path from 'path'; +import fs from 'fs'; +import * as http2 from 'node:http2'; +import { FastifyServerOptions } from 'fastify'; +import { LevelWithSilent } from 'pino'; +import log from './log.js'; +import packageJson from './packageJson.js'; +import truthy from './truthy.js'; + +// usually remote renderers are on staging or production, so, use production folder always +const DEFAULT_PORT = 3800; +const DEFAULT_LOG_LEVEL = 'info'; +const { env } = process; +const MAX_DEBUG_SNIPPET_LENGTH = 1000; +const NODE_ENV = env.NODE_ENV || 'production'; + +/* Update ./docs/node-renderer/js-configuration.md when something here changes */ +// Node renderer configuration +export interface Config { + // The port the renderer should listen to. On Heroku you may want to use `process.env.PORT`: + // https://devcenter.heroku.com/articles/dyno-startup-behavior#port-binding-of-web-dynos + // Similarly on ControlPlane: https://docs.controlplane.com/reference/workload/containers#port-variable + port: number; + // The renderer log level + logLevel: LevelWithSilent; + // The HTTP server log level + logHttpLevel: LevelWithSilent; + // Additional options to pass to the Fastify server factory. + // See https://fastify.dev/docs/latest/Reference/Server/#factory. + fastifyServerOptions: FastifyServerOptions; + // Path to a cache directory where uploaded server bundle files will be stored. + // This is distinct from Shakapacker's public asset directory. + serverBundleCachePath: string; + // @deprecated Use serverBundleCachePath instead. This will be removed in a future version. + bundlePath?: string; + // If set to true, `supportModules` enables the server-bundle code to call a default set of NodeJS + // global objects and functions that get added to the VM context: + // `{ Buffer, TextDecoder, TextEncoder, URLSearchParams, ReadableStream, process, setTimeout, setInterval, setImmediate, clearTimeout, clearInterval, clearImmediate, queueMicrotask }`. + // This option is required to equal `true` if you want to use loadable components. + // Setting this value to false causes the NodeRenderer to behave like ExecJS. + supportModules: boolean; + // additionalContext enables you to specify additional NodeJS objects (usually from + // https://nodejs.org/api/globals.html) to add to the VM context in addition to our supportModules defaults. + // Object shorthand notation may be used, but is not required. + // Example: { URL, URLSearchParams, Crypto } + additionalContext: Record | null; + // Number of workers that will be forked to serve rendering requests. + workersCount: number; + // The password expected to receive from the **Rails client** to authenticate rendering requests. + // If no password is set, no authentication will be required. + password: string | undefined; + // Next 2 params, allWorkersRestartInterval and delayBetweenIndividualWorkerRestarts must both + // be set if you wish to have automatic worker restarting, say to clear memory leaks. + // Time in minutes between restarting all workers + allWorkersRestartInterval: number | undefined; + // Time in minutes between each worker restarting when restarting all workers + delayBetweenIndividualWorkerRestarts: number | undefined; + // Time in seconds to wait for worker to restart before killing it + // Set it to 0 or undefined to never kill the worker + gracefulWorkerRestartTimeout: number | undefined; + // If the rendering request is longer than this, it will be truncated in exception and logging messages + maxDebugSnippetLength: number; + // @deprecated See https://www.shakacode.com/react-on-rails-pro/docs/node-renderer/error-reporting-and-tracing. + honeybadgerApiKey?: string | null; + // @deprecated See https://www.shakacode.com/react-on-rails-pro/docs/node-renderer/error-reporting-and-tracing. + sentryDsn?: string | null; + // @deprecated See https://www.shakacode.com/react-on-rails-pro/docs/node-renderer/error-reporting-and-tracing. + sentryTracing?: boolean; + // @deprecated See https://www.shakacode.com/react-on-rails-pro/docs/node-renderer/error-reporting-and-tracing. + sentryTracesSampleRate?: string | number; + // If true, `{set/clear}{Timeout/Interval/Immediate}` and `queueMicrotask` are stubbed out to do nothing. + stubTimers: boolean; + // @deprecated Use stubTimers instead. + includeTimerPolyfills?: boolean; + // If set to true, this option enables the replay of console logs from asynchronous server operations. + // If set to false, only logs that occur on the server prior to any awaited asynchronous operations will be replayed. + // The default value is true in development, otherwise it is set to false. + replayServerAsyncOperationLogs: boolean; + // Maximum number of VM contexts to keep in memory. Defaults to 2 since typically only two contexts + // are needed - one for the server bundle and one for React Server Components (RSC) if enabled. + // Older contexts are removed when this limit is reached. + maxVMPoolSize: number; +} + +let config: Config | undefined; +let userConfig: Partial = {}; + +export function getConfig() { + if (!config) { + throw Error('Call buildConfig before calling getConfig'); + } + + return config; +} + +function defaultWorkersCount() { + // Create a worker for each CPU except one that is used for master process + return os.cpus().length - 1 || 1; +} + +// Find the .node-renderer-bundles folder if it exists, otherwise use /tmp +function defaultServerBundleCachePath() { + let currentDir = process.cwd(); + const maxDepth = 10; + for (let i = 0; i < maxDepth; i += 1) { + const nodeRendererBundlesPath = path.resolve(currentDir, '.node-renderer-bundles'); + if (fs.existsSync(nodeRendererBundlesPath)) { + return nodeRendererBundlesPath; + } + const parentDir = path.dirname(currentDir); + if (parentDir === currentDir) { + // We're at the root and didn't find the folder + break; + } + currentDir = parentDir; + } + return '/tmp/react-on-rails-pro-node-renderer-bundles'; +} + +function logLevel(level: string): LevelWithSilent { + switch (level) { + case 'fatal': + case 'error': + case 'warn': + case 'info': + case 'debug': + case 'trace': + case 'silent': + return level; + default: + log.error(`Unexpected log level: ${level}`); + return DEFAULT_LOG_LEVEL; + } +} + +const defaultConfig: Config = { + // Use env port if we run on Heroku + port: Number(env.RENDERER_PORT) || DEFAULT_PORT, + + // Show only important messages by default + logLevel: logLevel(env.RENDERER_LOG_LEVEL || DEFAULT_LOG_LEVEL), + + // Log only errors from Fastify by default + logHttpLevel: logLevel(env.RENDERER_LOG_HTTP_LEVEL || 'error'), + + fastifyServerOptions: {}, + + serverBundleCachePath: + env.RENDERER_SERVER_BUNDLE_CACHE_PATH || env.RENDERER_BUNDLE_PATH || defaultServerBundleCachePath(), + + supportModules: truthy(env.RENDERER_SUPPORT_MODULES), + + additionalContext: null, + + // Workers count defaults to number of CPUs minus 1 + workersCount: env.RENDERER_WORKERS_COUNT ? parseInt(env.RENDERER_WORKERS_COUNT, 10) : defaultWorkersCount(), + + // No default for password, means no auth + password: env.RENDERER_PASSWORD, + + allWorkersRestartInterval: env.RENDERER_ALL_WORKERS_RESTART_INTERVAL + ? parseInt(env.RENDERER_ALL_WORKERS_RESTART_INTERVAL, 10) + : undefined, + + delayBetweenIndividualWorkerRestarts: env.RENDERER_DELAY_BETWEEN_INDIVIDUAL_WORKER_RESTARTS + ? parseInt(env.RENDERER_DELAY_BETWEEN_INDIVIDUAL_WORKER_RESTARTS, 10) + : undefined, + + gracefulWorkerRestartTimeout: env.GRACEFUL_WORKER_RESTART_TIMEOUT + ? parseInt(env.GRACEFUL_WORKER_RESTART_TIMEOUT, 10) + : undefined, + + maxDebugSnippetLength: MAX_DEBUG_SNIPPET_LENGTH, + + // default to true if empty, otherwise it is set to false + stubTimers: env.RENDERER_STUB_TIMERS === 'true' || !env.RENDERER_STUB_TIMERS, + + // default to true in development, otherwise it is set to false + replayServerAsyncOperationLogs: truthy( + env.REPLAY_SERVER_ASYNC_OPERATION_LOGS ?? NODE_ENV === 'development', + ), + + // Maximum number of VM contexts to keep in memory. Defaults to 2 since typically only two contexts + // are needed - one for the server bundle and one for React Server Components (RSC) if enabled. + maxVMPoolSize: (env.MAX_VM_POOL_SIZE && parseInt(env.MAX_VM_POOL_SIZE, 10)) || 2, +}; + +function envValuesUsed() { + return { + RENDERER_PORT: !userConfig.port && env.RENDERER_PORT, + RENDERER_LOG_LEVEL: !userConfig.logLevel && env.RENDERER_LOG_LEVEL, + RENDERER_LOG_HTTP_LEVEL: !userConfig.logHttpLevel && env.RENDERER_LOG_HTTP_LEVEL, + RENDERER_SERVER_BUNDLE_CACHE_PATH: + !userConfig.serverBundleCachePath && env.RENDERER_SERVER_BUNDLE_CACHE_PATH, + RENDERER_BUNDLE_PATH: + !userConfig.serverBundleCachePath && !userConfig.bundlePath && env.RENDERER_BUNDLE_PATH, + RENDERER_WORKERS_COUNT: !userConfig.workersCount && env.RENDERER_WORKERS_COUNT, + RENDERER_PASSWORD: !userConfig.password && env.RENDERER_PASSWORD && '', + RENDERER_SUPPORT_MODULES: !('supportModules' in userConfig) && env.RENDERER_SUPPORT_MODULES, + RENDERER_STUB_TIMERS: !('stubTimers' in userConfig) && env.RENDERER_STUB_TIMERS, + RENDERER_ALL_WORKERS_RESTART_INTERVAL: + !userConfig.allWorkersRestartInterval && env.RENDERER_ALL_WORKERS_RESTART_INTERVAL, + RENDERER_DELAY_BETWEEN_INDIVIDUAL_WORKER_RESTARTS: + !userConfig.delayBetweenIndividualWorkerRestarts && + env.RENDERER_DELAY_BETWEEN_INDIVIDUAL_WORKER_RESTARTS, + GRACEFUL_WORKER_RESTART_TIMEOUT: + !userConfig.gracefulWorkerRestartTimeout && env.GRACEFUL_WORKER_RESTART_TIMEOUT, + INCLUDE_TIMER_POLYFILLS: !('includeTimerPolyfills' in userConfig) && env.INCLUDE_TIMER_POLYFILLS, + REPLAY_SERVER_ASYNC_OPERATION_LOGS: + !userConfig.replayServerAsyncOperationLogs && env.REPLAY_SERVER_ASYNC_OPERATION_LOGS, + MAX_VM_POOL_SIZE: !userConfig.maxVMPoolSize && env.MAX_VM_POOL_SIZE, + }; +} + +function sanitizedSettings(aConfig: Partial | undefined, defaultValue?: string) { + return aConfig && Object.keys(aConfig).length > 0 + ? { + ...aConfig, + password: aConfig.password != null ? '' : defaultValue, + allWorkersRestartInterval: aConfig.allWorkersRestartInterval || defaultValue, + delayBetweenIndividualWorkerRestarts: aConfig.delayBetweenIndividualWorkerRestarts || defaultValue, + gracefulWorkerRestartTimeout: aConfig.gracefulWorkerRestartTimeout || defaultValue, + } + : {}; +} + +export function logSanitizedConfig() { + log.info({ + 'Node Renderer version': packageJson.version, + 'Protocol version': packageJson.protocolVersion, + 'Default settings': defaultConfig, + 'ENV values used for settings (use "RENDERER_" prefix)': envValuesUsed(), + 'Customized values for settings from config object (overrides ENV)': sanitizedSettings(userConfig), + 'Final renderer settings': sanitizedSettings(config, ''), + }); +} + +/** + * Lazily create the config + */ +export function buildConfig(providedUserConfig?: Partial): Config { + userConfig = providedUserConfig || {}; + config = { ...defaultConfig, ...userConfig }; + + // Handle bundlePath deprecation + if ('bundlePath' in userConfig) { + log.warn( + 'bundlePath is deprecated and will be removed in a future version. ' + + 'Use serverBundleCachePath instead. This path stores uploaded server bundles for the node renderer, ' + + 'not client-side webpack assets from Shakapacker.', + ); + // If serverBundleCachePath is not set, use bundlePath as fallback + if ( + userConfig.bundlePath && + (!config.serverBundleCachePath || config.serverBundleCachePath === defaultConfig.serverBundleCachePath) + ) { + config.serverBundleCachePath = userConfig.bundlePath; + } + } + if (env.RENDERER_BUNDLE_PATH && !env.RENDERER_SERVER_BUNDLE_CACHE_PATH) { + log.warn( + 'RENDERER_BUNDLE_PATH environment variable is deprecated and will be removed in a future version. ' + + 'Use RENDERER_SERVER_BUNDLE_CACHE_PATH instead.', + ); + } + + config.supportModules = truthy(config.supportModules); + + if (config.maxVMPoolSize <= 0 || !Number.isInteger(config.maxVMPoolSize)) { + throw new Error('maxVMPoolSize must be a positive integer'); + } + + let currentArg: string | undefined; + + process.argv.forEach((val) => { + if (val[0] === '-') { + currentArg = val.slice(1); + return; + } + + if (currentArg === 'p') { + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- config is still guaranteed to be defined here + config!.port = parseInt(val, 10); + } + }); + + if ( + 'honeybadgerApiKey' in config || + 'sentryDsn' in config || + 'sentryTracing' in config || + 'sentryTracesSampleRate' in config + ) { + log.error( + 'honeybadgerApiKey, sentryDsn, sentryTracing, and sentryTracesSampleRate are not used since RoRP 4.0. ' + + 'See https://www.shakacode.com/react-on-rails-pro/docs/node-renderer/error-reporting-and-tracing.', + ); + process.exit(1); + } + + if (env.INCLUDE_TIMER_POLYFILLS) { + log.error('INCLUDE_TIMER_POLYFILLS environment variable is renamed to RENDERER_STUB_TIMERS in RoRP 4.0'); + process.exit(1); + } + if ('includeTimerPolyfills' in config) { + log.error('includeTimerPolyfills is renamed to stubTimers in RoRP 4.0'); + process.exit(1); + } + + log.level = config.logLevel; + return config; +} diff --git a/packages/react-on-rails-pro-node-renderer/src/shared/debug.ts b/packages/react-on-rails-pro-node-renderer/src/shared/debug.ts new file mode 100644 index 0000000000..0a8e17a2f5 --- /dev/null +++ b/packages/react-on-rails-pro-node-renderer/src/shared/debug.ts @@ -0,0 +1,3 @@ +import { debuglog } from 'util'; + +export default debuglog('ROR'); diff --git a/packages/react-on-rails-pro-node-renderer/src/shared/errorReporter.ts b/packages/react-on-rails-pro-node-renderer/src/shared/errorReporter.ts new file mode 100644 index 0000000000..80176f1108 --- /dev/null +++ b/packages/react-on-rails-pro-node-renderer/src/shared/errorReporter.ts @@ -0,0 +1,57 @@ +import log from './log.js'; +import type { TracingContext } from './tracing.js'; + +export type Notifier = (msg: T, tracingContext?: TracingContext) => void; +export type MessageNotifier = Notifier; +export type ErrorNotifier = Notifier; + +const messageNotifiers: MessageNotifier[] = []; +const errorNotifiers: ErrorNotifier[] = []; + +/** + * Adds a callback to notify a service on string error messages. + */ +export function addMessageNotifier(notifier: MessageNotifier) { + messageNotifiers.push(notifier); +} + +/** + * Adds a callback to notify an error tracking service on JavaScript {@link Error}s. + */ +export function addErrorNotifier(notifier: ErrorNotifier) { + errorNotifiers.push(notifier); +} + +/** + * Adds a callback to notify an error tracking service on both string error messages and JavaScript {@link Error}s. + */ +export function addNotifier(notifier: Notifier) { + messageNotifiers.push(notifier); + errorNotifiers.push(notifier); +} + +function notify(msg: T, tracingContext: TracingContext | undefined, notifiers: Notifier[]) { + notifiers.forEach((notifier) => { + try { + notifier(msg, tracingContext); + } catch (e) { + log.error(e, 'An error tracking notifier failed'); + } + }); +} + +/** + * Reports an error message. + */ +export function message(msg: string, tracingContext?: TracingContext) { + log.error({ msg, label: 'ErrorReporter notification' }); + notify(msg, tracingContext, messageNotifiers); +} + +/** + * Reports an error. + */ +export function error(err: Error, tracingContext?: TracingContext) { + log.error({ err, label: 'ErrorReporter notification' }); + notify(err, tracingContext, errorNotifiers); +} diff --git a/packages/react-on-rails-pro-node-renderer/src/shared/fileExistsAsync.ts b/packages/react-on-rails-pro-node-renderer/src/shared/fileExistsAsync.ts new file mode 100644 index 0000000000..600416f736 --- /dev/null +++ b/packages/react-on-rails-pro-node-renderer/src/shared/fileExistsAsync.ts @@ -0,0 +1,18 @@ +import fs from 'fs'; +import { promisify } from 'util'; + +const fsAccessAsync = promisify(fs.access); + +const fileExistsAsync = async (assetPath: string) => { + try { + await fsAccessAsync(assetPath, fs.constants.R_OK); + return true; + } catch (error) { + if ((error as { code?: string }).code === 'ENOENT') { + return false; + } + throw error; + } +}; + +export default fileExistsAsync; diff --git a/packages/react-on-rails-pro-node-renderer/src/shared/licensePublicKey.ts b/packages/react-on-rails-pro-node-renderer/src/shared/licensePublicKey.ts new file mode 100644 index 0000000000..bca624a330 --- /dev/null +++ b/packages/react-on-rails-pro-node-renderer/src/shared/licensePublicKey.ts @@ -0,0 +1,19 @@ +// ShakaCode's public key for React on Rails Pro license verification +// The private key corresponding to this public key is held by ShakaCode +// and is never committed to the repository +// Last updated: 2025-10-09 15:57:09 UTC +// Source: http://shakacode.com/api/public-key +// +// You can update this public key by running the rake task: +// react_on_rails_pro:update_public_key +// This task fetches the latest key from the API endpoint: +// http://shakacode.com/api/public-key +export const PUBLIC_KEY = `-----BEGIN PUBLIC KEY----- +MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzcS/fpHz5CbnTQxb4Zot +khjzXu7xNS+Y9VKfapMaHOMzNoCMfy1++hxHJatRedr+YQfZRCjfiN168Cpe+dhe +yfNtOoLU9/+/5jTsxH+WQJWNRswyKms5HNajlIMN1GEYdZmZbvOPaZvh6ENsT+EV +HnhjJtsHl7qltBoL0ul7rONxaNHCzJcKk4lf3B2/1j1wpA91MKz4bbQVh4/6Th0E +/39f0PWvvBXzQS+yt1qaa1DIX5YL6Aug5uEpb1+6QWcN3hCzqSPBv1HahrG50rsD +gf8KORV3X2N9t6j6iqPmRqfRcTBKtmPhM9bORtKiSwBK8LsIUzp2/UUmkdHnkyzu +NQIDAQAB +-----END PUBLIC KEY-----`; diff --git a/packages/react-on-rails-pro-node-renderer/src/shared/licenseValidator.ts b/packages/react-on-rails-pro-node-renderer/src/shared/licenseValidator.ts new file mode 100644 index 0000000000..54e6e2098f --- /dev/null +++ b/packages/react-on-rails-pro-node-renderer/src/shared/licenseValidator.ts @@ -0,0 +1,262 @@ +import * as jwt from 'jsonwebtoken'; +import * as fs from 'fs'; +import * as path from 'path'; +import { PUBLIC_KEY } from './licensePublicKey.js'; + +interface LicenseData { + // Subject (email for whom the license is issued) + sub?: string; + // Issued at timestamp + iat?: number; + // Required: expiration timestamp + exp: number; + // Optional: license plan (e.g., "free", "paid") + plan?: string; + // Issuer (who issued the license) + iss?: string; + // Allow additional fields + [key: string]: unknown; +} + +// Grace period: 1 month (in seconds) +const GRACE_PERIOD_SECONDS = 30 * 24 * 60 * 60; + +// Module-level state for caching +let cachedLicenseData: LicenseData | undefined; +let cachedGraceDaysRemaining: number | undefined; + +/** + * Handles invalid license by logging error and exiting. + * @private + */ +function handleInvalidLicense(message: string): never { + const fullMessage = `[React on Rails Pro] ${message}`; + console.error(fullMessage); + // Validation errors should prevent the application from starting + process.exit(1); +} + +/** + * Checks if running in production environment. + * @private + */ +function isProduction(): boolean { + return process.env.NODE_ENV === 'production'; +} + +/** + * Checks if current time is within grace period after expiration. + * @private + */ +function isWithinGracePeriod(expTime: number): boolean { + return Math.floor(Date.now() / 1000) <= expTime + GRACE_PERIOD_SECONDS; +} + +/** + * Calculates remaining grace period days. + * @private + */ +function calculateGraceDaysRemaining(expTime: number): number { + const graceEnd = expTime + GRACE_PERIOD_SECONDS; + const secondsRemaining = graceEnd - Math.floor(Date.now() / 1000); + return secondsRemaining <= 0 ? 0 : Math.floor(secondsRemaining / (24 * 60 * 60)); +} + +/** + * Logs license information for analytics. + * @private + */ +function logLicenseInfo(license: LicenseData): void { + const { plan, iss } = license; + + if (plan) { + console.log(`[React on Rails Pro] License plan: ${plan}`); + } + if (iss) { + console.log(`[React on Rails Pro] Issued by: ${iss}`); + } +} + +/** + * Loads the license string from environment variable or config file. + * @private + */ +// eslint-disable-next-line consistent-return +function loadLicenseString(): string { + // First try environment variable + const envLicense = process.env.REACT_ON_RAILS_PRO_LICENSE; + if (envLicense) { + return envLicense; + } + + // Then try config file (relative to project root) + try { + const configPath = path.join(process.cwd(), 'config', 'react_on_rails_pro_license.key'); + if (fs.existsSync(configPath)) { + return fs.readFileSync(configPath, 'utf8').trim(); + } + } catch (error) { + console.error(`[React on Rails Pro] Error reading license file: ${(error as Error).message}`); + } + + const errorMsg = + 'No license found. Please set REACT_ON_RAILS_PRO_LICENSE environment variable ' + + 'or create config/react_on_rails_pro_license.key file. ' + + 'Get a FREE evaluation license at https://shakacode.com/react-on-rails-pro'; + + handleInvalidLicense(errorMsg); +} + +/** + * Loads and decodes the license from environment or file. + * @private + */ +function loadAndDecodeLicense(): LicenseData { + const licenseString = loadLicenseString(); + + const decoded = jwt.verify(licenseString, PUBLIC_KEY, { + // Enforce RS256 algorithm only to prevent "alg=none" and downgrade attacks. + // Adding other algorithms to the whitelist (e.g., ['RS256', 'HS256']) can introduce vulnerabilities: + // If the public key is mistakenly used as a secret for HMAC algorithms (like HS256), attackers could forge tokens. + // Always carefully review algorithm changes to avoid signature bypass risks. + algorithms: ['RS256'], + // Disable automatic expiration verification so we can handle it manually with custom logic + ignoreExpiration: true, + }) as LicenseData; + + return decoded; +} + +/** + * Validates the license data and throws if invalid. + * Logs info/errors and handles grace period logic. + * + * @param license - The decoded license data + * @returns Grace days remaining if in grace period, undefined otherwise + * @throws Never returns - exits process if license is invalid + * @private + */ +function validateLicenseData(license: LicenseData): number | undefined { + // Check that exp field exists + if (!license.exp) { + const error = + 'License is missing required expiration field. ' + + 'Your license may be from an older version. ' + + 'Get a FREE evaluation license at https://shakacode.com/react-on-rails-pro'; + handleInvalidLicense(error); + } + + // Check expiry with grace period for production + const currentTime = Math.floor(Date.now() / 1000); + const expTime = license.exp; + let graceDays: number | undefined; + + if (currentTime > expTime) { + const daysExpired = Math.floor((currentTime - expTime) / (24 * 60 * 60)); + + const error = + `License has expired ${daysExpired} day(s) ago. ` + + 'Get a FREE evaluation license (3 months) at https://shakacode.com/react-on-rails-pro ' + + 'or upgrade to a paid license for production use.'; + + // In production, allow a grace period of 1 month with error logging + if (isProduction() && isWithinGracePeriod(expTime)) { + // Calculate grace days once here + graceDays = calculateGraceDaysRemaining(expTime); + console.error( + `[React on Rails Pro] WARNING: ${error} ` + + `Grace period: ${graceDays} day(s) remaining. ` + + 'Application will fail to start after grace period expires.', + ); + } else { + handleInvalidLicense(error); + } + } + + // Log license type if present (for analytics) + logLicenseInfo(license); + + // Return grace days (undefined if not in grace period) + return graceDays; +} + +/** + * Validates the license and returns the license data. + * Caches the result after first validation. + * + * @returns The validated license data + * @throws Exits process if license is invalid + */ +// eslint-disable-next-line consistent-return +export function getValidatedLicenseData(): LicenseData { + if (cachedLicenseData !== undefined) { + return cachedLicenseData; + } + + try { + // Load and decode license (but don't cache yet) + const licenseData = loadAndDecodeLicense(); + + // Validate the license (raises if invalid, returns grace_days) + const graceDays = validateLicenseData(licenseData); + + // Validation passed - now cache both data and grace days + cachedLicenseData = licenseData; + cachedGraceDaysRemaining = graceDays; + + return cachedLicenseData; + } catch (error: unknown) { + if (error instanceof Error && error.name === 'JsonWebTokenError') { + const errorMsg = + `Invalid license signature: ${error.message}. ` + + 'Your license file may be corrupted. ' + + 'Get a FREE evaluation license at https://shakacode.com/react-on-rails-pro'; + handleInvalidLicense(errorMsg); + } else if (error instanceof Error) { + const errorMsg = + `License validation error: ${error.message}. ` + + 'Get a FREE evaluation license at https://shakacode.com/react-on-rails-pro'; + handleInvalidLicense(errorMsg); + } else { + const errorMsg = + 'License validation error: Unknown error. ' + + 'Get a FREE evaluation license at https://shakacode.com/react-on-rails-pro'; + handleInvalidLicense(errorMsg); + } + } +} + +/** + * Checks if the current license is an evaluation/free license. + * + * @returns true if plan is not "paid" + * @public TODO: Remove this line when this function is actually used + */ +export function isEvaluation(): boolean { + const data = getValidatedLicenseData(); + const plan = String(data.plan || ''); + return plan !== 'paid' && !plan.startsWith('paid_'); +} + +/** + * Returns remaining grace period days if license is expired but in grace period. + * + * @returns Number of days remaining, or undefined if not in grace period + * @public TODO: Remove this line when this function is actually used + */ +export function getGraceDaysRemaining(): number | undefined { + // Ensure license is validated and cached + getValidatedLicenseData(); + + // Return cached grace days (undefined if not in grace period) + return cachedGraceDaysRemaining; +} + +/** + * Resets all cached validation state (primarily for testing). + * @public TODO: Remove this line when this function is actually used + */ +export function reset(): void { + cachedLicenseData = undefined; + cachedGraceDaysRemaining = undefined; +} diff --git a/packages/react-on-rails-pro-node-renderer/src/shared/locks.ts b/packages/react-on-rails-pro-node-renderer/src/shared/locks.ts new file mode 100644 index 0000000000..934c5b1626 --- /dev/null +++ b/packages/react-on-rails-pro-node-renderer/src/shared/locks.ts @@ -0,0 +1,90 @@ +import lockfile, { Options } from 'lockfile'; +import { promisify } from 'util'; + +import debug from './debug.js'; +import log from './log.js'; +import { delay, workerIdLabel } from './utils.js'; + +const lockfileLockAsync = promisify(lockfile.lock); +const lockfileUnlockAsync = promisify(lockfile.unlock); + +const TEST_LOCKFILE_THREADING = false; + +// See definitions here: https://github.com/npm/lockfile/blob/master/README.md#options +/* + * A number of milliseconds to wait for locks to expire before giving up. Only used by + * lockFile.lock. Poll for opts.wait ms. If the lock is not cleared by the time the wait expires, + * then it returns with the original error. + */ +const LOCKFILE_WAIT = 3000; + +/* + * When using opts.wait, this is the period in ms in which it polls to check if the lock has + * expired. Defaults to 100. + */ +const LOCKFILE_POLL_PERIOD = 300; // defaults to 100 + +/* + * A number of milliseconds before locks are considered to have expired. + */ +const LOCKFILE_STALE = 20000; + +/* + * Used by lock and lockSync. Retry n number of times before giving up. + */ +const LOCKFILE_RETRIES = 45; + +/* + * Used by lock. Wait n milliseconds before retrying. + */ +const LOCKFILE_RETRY_WAIT = 300; + +const lockfileOptions = { + wait: LOCKFILE_WAIT, + retryWait: LOCKFILE_RETRY_WAIT, + retries: LOCKFILE_RETRIES, + stale: LOCKFILE_STALE, + pollPeriod: LOCKFILE_POLL_PERIOD, +}; + +export async function unlock(lockfileName: string) { + debug('Worker %s: About to unlock %s', workerIdLabel(), lockfileName); + log.info('Worker %s: About to unlock %s', workerIdLabel(), lockfileName); + + await lockfileUnlockAsync(lockfileName); +} + +type LockResult = { + lockfileName: string; +} & ( + | { + wasLockAcquired: true; + errorMessage: null; + } + | { + wasLockAcquired: false; + errorMessage: Error; + } +); + +export async function lock(filename: string): Promise { + const lockfileName = `${filename}.lock`; + const workerId = workerIdLabel(); + + try { + debug('Worker %s: About to request lock %s', workerId, lockfileName); + log.info('Worker %s: About to request lock %s', workerId, lockfileName); + await lockfileLockAsync(lockfileName, lockfileOptions); + + if (TEST_LOCKFILE_THREADING) { + debug('Worker %i: handleNewBundleProvided sleeping 5s', workerId); + await delay(5000); + debug('Worker %i: handleNewBundleProvided done sleeping 5s', workerId); + } + debug('After acquired lock in pid', lockfileName); + } catch (error) { + log.info('Worker %s: Failed to acquire lock %s, error %s', workerId, lockfileName, error); + return { lockfileName, wasLockAcquired: false, errorMessage: error as Error }; + } + return { lockfileName, wasLockAcquired: true, errorMessage: null }; +} diff --git a/packages/react-on-rails-pro-node-renderer/src/shared/log.ts b/packages/react-on-rails-pro-node-renderer/src/shared/log.ts new file mode 100644 index 0000000000..cc1a6b1f55 --- /dev/null +++ b/packages/react-on-rails-pro-node-renderer/src/shared/log.ts @@ -0,0 +1,59 @@ +import pino from 'pino'; +import type { PrettyOptions } from 'pino-pretty'; + +let pretty = false; + +if (process.env.NODE_ENV === 'development' || process.env.NODE_ENV === 'test') { + try { + // eslint-disable-next-line global-require,@typescript-eslint/no-require-imports + require('pino-pretty'); + pretty = true; + } catch (_e) { + console.log('pino-pretty not found in development, using the default pino log settings'); + } +} + +export const sharedLoggerOptions: pino.LoggerOptions = { + // Omit pid and hostname + base: undefined, + formatters: { + level: (label) => ({ level: label }), + }, + transport: pretty + ? { + target: 'pino-pretty', + options: { + colorize: true, + // [2024-12-01 12:18:53.092 +0300] INFO (RORP): + // or + // INFO [2024-12-01 12:18:53.092 +0300] (RORP): + levelFirst: false, + // Show UTC time in CI and local time on developers' machines + translateTime: process.env.CI ? true : 'SYS:standard', + // See https://github.com/pinojs/pino-pretty?tab=readme-ov-file#usage-with-jest + sync: process.env.NODE_ENV === 'test', + } satisfies PrettyOptions, + } + : undefined, +}; + +// TODO: ideally we want a way to pass arbitrary logger options or even a logger object from config like Fastify, +// but the current design doesn't allow this. +const log = pino( + { + name: 'RORP', + ...sharedLoggerOptions, + }, + // https://getpino.io/#/docs/help?id=best-performance-for-logging-to-stdout doesn't recommend + // enabling async logging https://getpino.io/#/docs/asynchronous for stdout +); + +export default log; + +process.on('uncaughtExceptionMonitor', (err, origin) => { + // fatal ensures the logging is flushed before exit. + log.fatal({ + msg: origin === 'uncaughtException' ? 'Uncaught exception' : 'Unhandled promise rejection', + err, + }); +}); diff --git a/packages/react-on-rails-pro-node-renderer/src/shared/packageJson.ts b/packages/react-on-rails-pro-node-renderer/src/shared/packageJson.ts new file mode 100644 index 0000000000..89c559afa6 --- /dev/null +++ b/packages/react-on-rails-pro-node-renderer/src/shared/packageJson.ts @@ -0,0 +1,3 @@ +import packageJson from '../../package.json'; + +export default packageJson; diff --git a/packages/react-on-rails-pro-node-renderer/src/shared/sharedConsoleHistory.ts b/packages/react-on-rails-pro-node-renderer/src/shared/sharedConsoleHistory.ts new file mode 100644 index 0000000000..312a151087 --- /dev/null +++ b/packages/react-on-rails-pro-node-renderer/src/shared/sharedConsoleHistory.ts @@ -0,0 +1,104 @@ +import { AsyncLocalStorage } from 'async_hooks'; +import { getConfig } from './configBuilder.js'; +import log from './log.js'; +import { isPromise, isReadableStream } from './utils.js'; +import type { RenderCodeResult } from '../worker/vm.js'; + +type ConsoleMessage = { level: 'error' | 'log' | 'info' | 'warn'; arguments: unknown[] }; + +function replayConsoleOnRenderer(consoleHistory: ConsoleMessage[]) { + if (log.level !== 'debug') return; + + consoleHistory.forEach((msg) => { + const stringifiedList = msg.arguments.map((arg) => { + let val; + try { + val = typeof arg === 'string' || arg instanceof String ? arg : JSON.stringify(arg); + } catch (e) { + val = `${(e as Error).message}: ${arg}`; + } + + return val; + }); + + log.debug(stringifiedList.join(' ')); + }); +} + +// AsyncLocalStorage is available in Node.js 12.17.0 and later versions +const canUseAsyncLocalStorage = (): boolean => + typeof AsyncLocalStorage !== 'undefined' && getConfig().replayServerAsyncOperationLogs; + +class SharedConsoleHistory { + private asyncLocalStorageIfEnabled: AsyncLocalStorage<{ consoleHistory: ConsoleMessage[] }> | undefined; + + private isRunningSyncOperation: boolean; + + private syncHistory: ConsoleMessage[]; + + constructor() { + if (canUseAsyncLocalStorage()) { + this.asyncLocalStorageIfEnabled = new AsyncLocalStorage(); + } + this.isRunningSyncOperation = false; + this.syncHistory = []; + } + + getConsoleHistory(): ConsoleMessage[] { + if (this.asyncLocalStorageIfEnabled) { + return this.asyncLocalStorageIfEnabled.getStore()?.consoleHistory ?? []; + } + // If console history is not safely stored in AsyncLocalStorage, + // then return it only in sync operations (to avoid data leakage) + return this.isRunningSyncOperation ? this.syncHistory : []; + } + + addToConsoleHistory(message: ConsoleMessage): void { + if (this.asyncLocalStorageIfEnabled) { + this.asyncLocalStorageIfEnabled.getStore()?.consoleHistory.push(message); + } else { + this.syncHistory.push(message); + } + } + + replayConsoleLogsAfterRender( + result: RenderCodeResult, + customConsoleHistory?: ConsoleMessage[], + ): RenderCodeResult { + const replayLogs = (value: string) => { + const consoleHistory = customConsoleHistory ?? this.syncHistory; + replayConsoleOnRenderer(consoleHistory); + return value; + }; + + // TODO: replay console logs for readable streams + if (isReadableStream(result)) { + return result; + } + if (isPromise(result)) { + return result.then(replayLogs); + } + return replayLogs(result); + } + + trackConsoleHistoryInRenderRequest(renderRequestFunction: () => RenderCodeResult): RenderCodeResult { + this.isRunningSyncOperation = true; + let result: RenderCodeResult; + + try { + if (this.asyncLocalStorageIfEnabled) { + const storage = { consoleHistory: [] }; + result = this.asyncLocalStorageIfEnabled.run(storage, renderRequestFunction); + return this.replayConsoleLogsAfterRender(result, storage.consoleHistory); + } + this.syncHistory = []; + result = renderRequestFunction(); + return this.replayConsoleLogsAfterRender(result); + } finally { + this.isRunningSyncOperation = false; + this.syncHistory = []; + } + } +} + +export default SharedConsoleHistory; diff --git a/packages/react-on-rails-pro-node-renderer/src/shared/tracing.ts b/packages/react-on-rails-pro-node-renderer/src/shared/tracing.ts new file mode 100644 index 0000000000..8d9e7cb0da --- /dev/null +++ b/packages/react-on-rails-pro-node-renderer/src/shared/tracing.ts @@ -0,0 +1,89 @@ +import { message } from './errorReporter.js'; + +/* eslint-disable @typescript-eslint/no-empty-object-type -- empty interfaces are used as targets for augmentation */ +/** + * This contains the options necessary to start a unit of work (transaction/span/etc.). + * Integrations should augment it using their name as the property. + * + * For example, in Sentry SDK v7+ the unit of work is a `Span`, and `Sentry.startSpan` takes `StartSpanOptions`, + * so that integration adds `{ sentry?: StartSpanOptions }`. + * In v6, the unit of work is a `Transaction`, and `Sentry.startTransaction` takes `TransactionContext`, + * so that integration adds `{ sentry6?: TransactionContext }`. + */ +export interface UnitOfWorkOptions {} + +/** + * Passed to the callback function executed by {@link trace}. + * This is only used (and augmented) by integrations that need to associate error reports with units of work manually. + * + * For example, Sentry SDK v7+ stores the active span in an {@link AsyncLocalStorage} and + * it's automatically provided to `Sentry.capture...` methods, so it doesn't use this. + * But v6 needs to include the active transaction in those methods' + * {@link import('@sentry/types').CaptureContext} parameter, and so it adds `{ sentry6: CaptureContext }`. + */ +export interface TracingContext {} +/* eslint-enable @typescript-eslint/no-empty-object-type */ + +let setupRun = false; + +type UnitOfWork = (tracingContext?: TracingContext) => Promise; + +type Executor = (fn: UnitOfWork, unitOfWorkOptions: UnitOfWorkOptions) => Promise; + +let executor: Executor = (fn) => fn(); + +// TODO: determine what else to pass here. Maybe Ruby could send the component name. +// It will also be augmentable by integrations, to support distributed tracing +// https://github.com/shakacode/react_on_rails_pro/issues/473 +/** + * Data describing an SSR request. + */ +interface SsrRequestData { + renderingRequest: string; +} + +type StartSsrRequestOptions = (request: SsrRequestData) => UnitOfWorkOptions; + +let mutableStartSsrRequestOptions: StartSsrRequestOptions = () => ({}); + +export const startSsrRequestOptions: StartSsrRequestOptions = (request) => + mutableStartSsrRequestOptions(request); + +// TODO: maybe make UnitOfWorkOptions a generic parameter for this and for setupTracing +// instead of sharing between all integrations. +/** + * Options for {@link trace}. + */ +export interface TracingIntegrationOptions { + executor: Executor; + startSsrRequestOptions?: StartSsrRequestOptions; +} + +// TODO: this supports only one tracing plugin. +// Replace by a function which extends the executor and transaction context instead of replacing them. +/** + * Sets up tracing for the given integration. + * @param options.executor - A function that wraps an async callback in the tracing service's unit of work. + * @param options.startSsrRequestOptions - Options used to start a new unit of work for an SSR request. + * Should be an object with your integration name as the only property. + * It will be passed to the executor. + */ +export function setupTracing(options: TracingIntegrationOptions) { + if (setupRun) { + message('setupTracing called more than once. Currently only one tracing integration can be enabled.'); + return; + } + + executor = options.executor; + if (options.startSsrRequestOptions) { + mutableStartSsrRequestOptions = options.startSsrRequestOptions; + } + setupRun = true; +} + +/** + * Reports a unit of work to the tracing service, if any. + */ +export function trace(fn: UnitOfWork, unitOfWorkOptions: UnitOfWorkOptions): Promise { + return executor(fn, unitOfWorkOptions); +} diff --git a/packages/react-on-rails-pro-node-renderer/src/shared/truthy.ts b/packages/react-on-rails-pro-node-renderer/src/shared/truthy.ts new file mode 100644 index 0000000000..1ff76da845 --- /dev/null +++ b/packages/react-on-rails-pro-node-renderer/src/shared/truthy.ts @@ -0,0 +1,3 @@ +export default function truthy(value: unknown) { + return value === true || value === 'YES' || value === 'TRUE' || value === 'yes' || value === 'true'; +} diff --git a/packages/react-on-rails-pro-node-renderer/src/shared/utils.ts b/packages/react-on-rails-pro-node-renderer/src/shared/utils.ts new file mode 100644 index 0000000000..a95525a2af --- /dev/null +++ b/packages/react-on-rails-pro-node-renderer/src/shared/utils.ts @@ -0,0 +1,171 @@ +import cluster from 'cluster'; +import path from 'path'; +import { MultipartFile } from '@fastify/multipart'; +import { createWriteStream, ensureDir, move, MoveOptions, copy, CopyOptions, unlink } from 'fs-extra'; +import { Readable, pipeline, PassThrough } from 'stream'; +import { promisify } from 'util'; +import * as errorReporter from './errorReporter.js'; +import { getConfig } from './configBuilder.js'; +import log from './log.js'; +import type { RenderResult } from '../worker/vm.js'; + +export const TRUNCATION_FILLER = '\n... TRUNCATED ...\n'; + +export const SHUTDOWN_WORKER_MESSAGE = 'NODE_RENDERER_SHUTDOWN_WORKER'; + +export function workerIdLabel() { + return cluster?.worker?.id || 'NO WORKER ID'; +} + +// From https://stackoverflow.com/a/831583/1009332 +export function smartTrim(value: unknown, maxLength = getConfig().maxDebugSnippetLength) { + let string; + if (value == null) return null; + + if (typeof value === 'string') { + string = value; + } else if (value instanceof String) { + string = value.toString(); + } else { + string = JSON.stringify(value); + } + + if (maxLength < 1) return string; + if (string.length <= maxLength) return string; + if (maxLength === 1) return string.substring(0, 1) + TRUNCATION_FILLER; + + const midpoint = Math.ceil(string.length / 2); + const toRemove = string.length - maxLength; + const lstrip = Math.ceil(toRemove / 2); + const rstrip = toRemove - lstrip; + return string.substring(0, midpoint - lstrip) + TRUNCATION_FILLER + string.substring(midpoint + rstrip); +} + +export interface ResponseResult { + headers: { 'Cache-Control'?: string }; + status: number; + data?: unknown; + stream?: Readable; +} + +export function errorResponseResult(msg: string): ResponseResult { + errorReporter.message(msg); + return { + headers: { 'Cache-Control': 'no-cache, no-store, max-age=0, must-revalidate' }, + status: 400, + data: msg, + }; +} + +/** + * @param renderingRequest The JavaScript code which threw an error + * @param error The error that was thrown (typed as `unknown` to minimize casts in `catch`) + * @param context Optional context to include in the error message + */ +export function formatExceptionMessage(renderingRequest: string, error: unknown, context?: string) { + return `${context ? `\nContext:\n${context}\n` : ''} +JS code for rendering request was: +${smartTrim(renderingRequest)} + +EXCEPTION MESSAGE: +${(error as Error).message || error} + +STACK: +${(error as Error).stack}`; +} + +// https://github.com/fastify/fastify-multipart?tab=readme-ov-file#usage +const pump = promisify(pipeline); + +export async function saveMultipartFile( + multipartFile: MultipartFile, + destinationPath: string, +): Promise { + await ensureDir(path.dirname(destinationPath)); + return pump(multipartFile.file, createWriteStream(destinationPath)); +} + +export interface Asset { + type: 'asset'; + savedFilePath: string; + filename: string; +} + +export function moveUploadedAsset( + asset: Asset, + destinationPath: string, + options: MoveOptions = {}, +): Promise { + return move(asset.savedFilePath, destinationPath, options); +} + +export function copyUploadedAsset( + asset: Asset, + destinationPath: string, + options: CopyOptions = {}, +): Promise { + return copy(asset.savedFilePath, destinationPath, options); +} + +export async function copyUploadedAssets(uploadedAssets: Asset[], targetDirectory: string): Promise { + const copyMultipleAssets = uploadedAssets.map((asset) => { + const destinationAssetFilePath = path.join(targetDirectory, asset.filename); + return copyUploadedAsset(asset, destinationAssetFilePath, { overwrite: true }); + }); + await Promise.all(copyMultipleAssets); + log.info( + `Copied assets ${JSON.stringify(uploadedAssets.map((fileDescriptor) => fileDescriptor.filename))}`, + ); +} + +export async function deleteUploadedAssets(uploadedAssets: Asset[]): Promise { + const deleteMultipleAssets = uploadedAssets.map((asset) => unlink(asset.savedFilePath)); + await Promise.all(deleteMultipleAssets); + log.info( + `Deleted assets ${JSON.stringify(uploadedAssets.map((fileDescriptor) => fileDescriptor.filename))}`, + ); +} + +export function isPromise(value: T | Promise): value is Promise { + return value && typeof (value as Promise).then === 'function'; +} + +export const isReadableStream = (stream: unknown): stream is Readable => + typeof stream === 'object' && + stream !== null && + typeof (stream as Readable).pipe === 'function' && + typeof (stream as Readable).read === 'function'; + +export const handleStreamError = (stream: Readable, onError: (error: Error) => void) => { + stream.on('error', onError); + const newStreamAfterHandlingError = new PassThrough(); + stream.pipe(newStreamAfterHandlingError); + return newStreamAfterHandlingError; +}; + +export const isErrorRenderResult = (result: RenderResult): result is { exceptionMessage: string } => + typeof result === 'object' && !isReadableStream(result) && 'exceptionMessage' in result; + +// eslint-disable-next-line @typescript-eslint/no-non-null-assertion +export const majorVersion = (version: string) => Number.parseInt(version.split('.', 2)[0]!, 10); + +// Can be replaced by `import { setTimeout } from 'timers/promises'` when Node 16 is the minimum supported version +export const delay = (milliseconds: number) => + new Promise((resolve) => { + setTimeout(resolve, milliseconds); + }); + +export function getBundleDirectory(bundleTimestamp: string | number) { + const { serverBundleCachePath } = getConfig(); + return path.join(serverBundleCachePath, `${bundleTimestamp}`); +} + +export function getRequestBundleFilePath(bundleTimestamp: string | number) { + const bundleDirectory = getBundleDirectory(bundleTimestamp); + return path.join(bundleDirectory, `${bundleTimestamp}.js`); +} + +export function getAssetPath(bundleTimestamp: string | number, filename: string) { + const bundleDirectory = getBundleDirectory(bundleTimestamp); + return path.join(bundleDirectory, filename); +} diff --git a/packages/react-on-rails-pro-node-renderer/src/tsconfig.json b/packages/react-on-rails-pro-node-renderer/src/tsconfig.json new file mode 100644 index 0000000000..7dde15bea0 --- /dev/null +++ b/packages/react-on-rails-pro-node-renderer/src/tsconfig.json @@ -0,0 +1,17 @@ +{ + "extends": "@tsconfig/node14/tsconfig.json", + "compilerOptions": { + // This copies JS files to the output directory. Make false once all code is converted. + "allowJs": true, + "declaration": true, + "declarationMap": true, + "incremental": true, + "module": "nodenext", + "noUncheckedIndexedAccess": true, + "outDir": "../lib", + "resolveJsonModule": true, + "rootDir": ".", + "sourceMap": true + }, + "include": ["**/*.ts", "**/*.js"] +} diff --git a/packages/react-on-rails-pro-node-renderer/src/worker.ts b/packages/react-on-rails-pro-node-renderer/src/worker.ts new file mode 100644 index 0000000000..ab87d57c4c --- /dev/null +++ b/packages/react-on-rails-pro-node-renderer/src/worker.ts @@ -0,0 +1,446 @@ +/** + * Entry point for worker process that handles requests. + * @module worker + */ + +import path from 'path'; +import cluster from 'cluster'; +import { mkdir } from 'fs/promises'; +import fastify from 'fastify'; +import fastifyFormbody from '@fastify/formbody'; +import fastifyMultipart from '@fastify/multipart'; +import log, { sharedLoggerOptions } from './shared/log.js'; +import packageJson from './shared/packageJson.js'; +import { buildConfig, Config, getConfig } from './shared/configBuilder.js'; +import fileExistsAsync from './shared/fileExistsAsync.js'; +import type { FastifyInstance, FastifyReply, FastifyRequest } from './worker/types.js'; +import checkProtocolVersion from './worker/checkProtocolVersionHandler.js'; +import authenticate from './worker/authHandler.js'; +import { handleRenderRequest, type ProvidedNewBundle } from './worker/handleRenderRequest.js'; +import handleGracefulShutdown from './worker/handleGracefulShutdown.js'; +import { + errorResponseResult, + formatExceptionMessage, + copyUploadedAssets, + ResponseResult, + workerIdLabel, + saveMultipartFile, + Asset, + getAssetPath, + getBundleDirectory, + deleteUploadedAssets, +} from './shared/utils.js'; +import * as errorReporter from './shared/errorReporter.js'; +import { lock, unlock } from './shared/locks.js'; +import { startSsrRequestOptions, trace } from './shared/tracing.js'; + +// Uncomment the below for testing timeouts: +// import { delay } from './shared/utils.js'; +// +// function getRandomInt(max) { +// return Math.floor(Math.random() * Math.floor(max)); +// } + +declare module '@fastify/multipart' { + interface MultipartFile { + // We save all uploaded files and store this value + value: Asset; + } +} + +export type FastifyConfigFunction = (app: FastifyInstance) => void; + +const fastifyConfigFunctions: FastifyConfigFunction[] = []; + +/** + * Configures Fastify instance before starting the server. + * @param configFunction The configuring function. Normally it will be something like `(app) => { app.register(...); }` + * or `(app) => { app.addHook(...); }` to report data from Fastify to an external service. + * Note that we call `await app.ready()` in our code, so you don't need to `await` the results. + */ +export function configureFastify(configFunction: FastifyConfigFunction) { + fastifyConfigFunctions.push(configFunction); +} + +function setHeaders(headers: ResponseResult['headers'], res: FastifyReply) { + // eslint-disable-next-line @typescript-eslint/no-misused-promises -- fixing it with `void` just violates no-void + Object.entries(headers).forEach(([key, header]) => res.header(key, header)); +} + +const setResponse = async (result: ResponseResult, res: FastifyReply) => { + const { status, data, headers, stream } = result; + if (status !== 200 && status !== 410) { + log.info({ msg: 'Sending non-200, non-410 data back', data }); + } + setHeaders(headers, res); + res.status(status); + if (stream) { + await res.send(stream); + } else { + res.send(data); + } +}; + +const isAsset = (value: unknown): value is Asset => (value as { type?: string }).type === 'asset'; + +function assertAsset(value: unknown, key: string): asserts value is Asset { + if (!isAsset(value)) { + throw new Error(`React On Rails Error: Expected an asset for key: ${key}`); + } +} + +// Remove after this issue is resolved: https://github.com/fastify/light-my-request/issues/315 +let useHttp2 = true; + +// Call before any test using `app.inject()` +export const disableHttp2 = () => { + useHttp2 = false; +}; + +type WithBodyArrayField = T & { [P in K | `${K}[]`]?: string | string[] }; + +const extractBodyArrayField = ( + body: WithBodyArrayField, Key>, + key: Key, +): string[] | undefined => { + const value = body[key] ?? body[`${key}[]`]; + if (Array.isArray(value)) { + return value; + } + if (typeof value === 'string' && value.length > 0) { + return [value]; + } + return undefined; +}; + +export default function run(config: Partial) { + // Store config in app state. From now it can be loaded by any module using + // getConfig(): + buildConfig(config); + + const { serverBundleCachePath, logHttpLevel, port, fastifyServerOptions, workersCount } = getConfig(); + + const app = fastify({ + http2: useHttp2 as true, + bodyLimit: 104857600, // 100 MB + logger: + logHttpLevel !== 'silent' ? { name: 'RORP HTTP', level: logHttpLevel, ...sharedLoggerOptions } : false, + ...fastifyServerOptions, + }); + + handleGracefulShutdown(app); + + // We shouldn't have unhandled errors here, but just in case + app.addHook('onError', (req, res, err, done) => { + // Not errorReporter.error so that integrations can decide how to log the errors. + app.log.error({ msg: 'Unhandled Fastify error', err, req, res }); + done(); + }); + + // 10 MB limit for code including props + const fieldSizeLimit = 1024 * 1024 * 10; + + // Supports application/x-www-form-urlencoded + void app.register(fastifyFormbody); + // Supports multipart/form-data + void app.register(fastifyMultipart, { + attachFieldsToBody: 'keyValues', + limits: { + fieldSize: fieldSizeLimit, + // For bundles and assets + fileSize: Infinity, + }, + onFile: async (part) => { + const destinationPath = path.join(serverBundleCachePath, 'uploads', part.filename); + // TODO: inline here + await saveMultipartFile(part, destinationPath); + // eslint-disable-next-line no-param-reassign + part.value = { + filename: part.filename, + savedFilePath: destinationPath, + type: 'asset', + }; + }, + }); + + const isProtocolVersionMatch = async (req: FastifyRequest, res: FastifyReply) => { + // Check protocol version + const protocolVersionCheckingResult = checkProtocolVersion(req); + + if (typeof protocolVersionCheckingResult === 'object') { + await setResponse(protocolVersionCheckingResult, res); + return false; + } + + return true; + }; + + const isAuthenticated = async (req: FastifyRequest, res: FastifyReply) => { + // Authenticate Ruby client + const authResult = authenticate(req); + + if (typeof authResult === 'object') { + await setResponse(authResult, res); + return false; + } + + return true; + }; + + const requestPrechecks = async (req: FastifyRequest, res: FastifyReply) => { + if (!(await isProtocolVersionMatch(req, res))) { + return false; + } + + if (!(await isAuthenticated(req, res))) { + return false; + } + + return true; + }; + + // See https://github.com/shakacode/react_on_rails_pro/issues/119 for why + // the digest is part of the request URL. Yes, it's not used here, but the + // server logs might show it to distinguish different requests. + app.post<{ + Body: WithBodyArrayField< + { + renderingRequest: string; + }, + 'dependencyBundleTimestamps' + >; + // Can't infer from the route like Express can + Params: { bundleTimestamp: string; renderRequestDigest: string }; + }>('/bundles/:bundleTimestamp/render/:renderRequestDigest', async (req, res) => { + if (!(await requestPrechecks(req, res))) { + return; + } + + // DO NOT REMOVE (REQUIRED FOR TIMEOUT TESTING) + // if(TESTING_TIMEOUTS && getRandomInt(2) === 1) { + // console.log( + // 'ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ'); + // console.log(`Sleeping, to test timeouts`); + // console.log( + // 'ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ'); + // + // await delay(100000); + // } + + const { renderingRequest } = req.body; + const { bundleTimestamp } = req.params; + const providedNewBundles: ProvidedNewBundle[] = []; + const assetsToCopy: Asset[] = []; + Object.entries(req.body).forEach(([key, value]) => { + if (key === 'bundle') { + assertAsset(value, key); + providedNewBundles.push({ timestamp: bundleTimestamp, bundle: value }); + } else if (key.startsWith('bundle_')) { + assertAsset(value, key); + providedNewBundles.push({ timestamp: key.replace('bundle_', ''), bundle: value }); + } else if (isAsset(value)) { + assetsToCopy.push(value); + } + }); + + try { + const dependencyBundleTimestamps = extractBodyArrayField(req.body, 'dependencyBundleTimestamps'); + await trace(async (context) => { + try { + const result = await handleRenderRequest({ + renderingRequest, + bundleTimestamp, + dependencyBundleTimestamps, + providedNewBundles, + assetsToCopy, + }); + await setResponse(result, res); + } catch (err) { + const exceptionMessage = formatExceptionMessage( + renderingRequest, + err, + 'UNHANDLED error in handleRenderRequest', + ); + errorReporter.message(exceptionMessage, context); + await setResponse(errorResponseResult(exceptionMessage), res); + } + }, startSsrRequestOptions({ renderingRequest })); + } catch (theErr) { + const exceptionMessage = formatExceptionMessage(renderingRequest, theErr); + errorReporter.message(`Unhandled top level error: ${exceptionMessage}`); + await setResponse(errorResponseResult(exceptionMessage), res); + } + }); + + // There can be additional files that might be required at the runtime. + // Since the remote renderer doesn't contain any assets, they must be uploaded manually. + app.post<{ + Body: WithBodyArrayField, 'targetBundles'>; + }>('/upload-assets', async (req, res) => { + if (!(await requestPrechecks(req, res))) { + return; + } + let lockAcquired = false; + let lockfileName: string | undefined; + const assets: Asset[] = Object.values(req.body).filter(isAsset); + + // Handle targetBundles as either a string or an array + const targetBundles = extractBodyArrayField(req.body, 'targetBundles'); + if (!targetBundles || targetBundles.length === 0) { + const errorMsg = 'No targetBundles provided. As of protocol version 2.0.0, targetBundles is required.'; + log.error(errorMsg); + await setResponse(errorResponseResult(errorMsg), res); + return; + } + + const assetsDescription = JSON.stringify(assets.map((asset) => asset.filename)); + const taskDescription = `Uploading files ${assetsDescription} to bundle directories: ${targetBundles.join(', ')}`; + + try { + const { lockfileName: name, wasLockAcquired, errorMessage } = await lock('transferring-assets'); + lockfileName = name; + lockAcquired = wasLockAcquired; + + if (!wasLockAcquired) { + const msg = formatExceptionMessage( + taskDescription, + errorMessage, + `Failed to acquire lock ${lockfileName}. Worker: ${workerIdLabel()}.`, + ); + await setResponse(errorResponseResult(msg), res); + } else { + log.info(taskDescription); + try { + // Prepare all directories first + const directoryPromises = targetBundles.map(async (bundleTimestamp) => { + const bundleDirectory = getBundleDirectory(bundleTimestamp); + + // Check if bundle directory exists, create if not + if (!(await fileExistsAsync(bundleDirectory))) { + log.info(`Creating bundle directory: ${bundleDirectory}`); + await mkdir(bundleDirectory, { recursive: true }); + } + return bundleDirectory; + }); + + const bundleDirectories = await Promise.all(directoryPromises); + + // Copy assets to each bundle directory + const assetCopyPromises = bundleDirectories.map(async (bundleDirectory) => { + await copyUploadedAssets(assets, bundleDirectory); + log.info(`Copied assets to bundle directory: ${bundleDirectory}`); + }); + + await Promise.all(assetCopyPromises); + + // Delete assets from uploads directory + await deleteUploadedAssets(assets); + + await setResponse( + { + status: 200, + headers: {}, + }, + res, + ); + } catch (err) { + const msg = 'ERROR when trying to copy assets'; + const message = `${msg}. ${err}. Task: ${taskDescription}`; + log.error({ + msg, + err, + task: taskDescription, + }); + await setResponse(errorResponseResult(message), res); + } + } + } finally { + if (lockAcquired) { + try { + if (lockfileName) { + await unlock(lockfileName); + } + } catch (error) { + log.warn({ + msg: `Error unlocking ${lockfileName} from worker ${workerIdLabel()}`, + err: error, + task: taskDescription, + }); + } + } + } + }); + + // Checks if file exist + app.post<{ + Querystring: { filename: string }; + Body: WithBodyArrayField, 'targetBundles'>; + }>('/asset-exists', async (req, res) => { + if (!(await isAuthenticated(req, res))) { + return; + } + + const { filename } = req.query; + + if (!filename) { + const message = `ERROR: filename param not provided to GET /asset-exists`; + log.info(message); + await setResponse(errorResponseResult(message), res); + return; + } + + // Handle targetBundles as either a string or an array + const targetBundles = extractBodyArrayField(req.body, 'targetBundles'); + if (!targetBundles || targetBundles.length === 0) { + const errorMsg = 'No targetBundles provided. As of protocol version 2.0.0, targetBundles is required.'; + log.error(errorMsg); + await setResponse(errorResponseResult(errorMsg), res); + return; + } + + // Check if the asset exists in each of the target bundles + const results = await Promise.all( + targetBundles.map(async (bundleHash) => { + const assetPath = getAssetPath(bundleHash, filename); + const exists = await fileExistsAsync(assetPath); + + if (exists) { + log.info(`/asset-exists Uploaded asset DOES exist in bundle ${bundleHash}: ${assetPath}`); + } else { + log.info(`/asset-exists Uploaded asset DOES NOT exist in bundle ${bundleHash}: ${assetPath}`); + } + + return { bundleHash, exists }; + }), + ); + + // Asset exists if it exists in all target bundles + const allExist = results.every((result) => result.exists); + + await setResponse({ status: 200, data: { exists: allExist, results }, headers: {} }, res); + }); + + app.get('/info', (_req, res) => { + res.send({ + node_version: process.version, + renderer_version: packageJson.version, + }); + }); + + // In tests we will run worker in master thread, so we need to ensure server + // will not listen: + // we are extracting worker from cluster to avoid false TS error + const { worker } = cluster; + if (workersCount === 0 || cluster.isWorker) { + app.listen({ port }, () => { + const workerName = worker ? `worker #${worker.id}` : 'master (single-process)'; + log.info(`Node renderer ${workerName} listening on port ${port}!`); + }); + } + + fastifyConfigFunctions.forEach((configFunction) => { + configFunction(app); + }); + + return app; +} diff --git a/packages/react-on-rails-pro-node-renderer/src/worker/authHandler.ts b/packages/react-on-rails-pro-node-renderer/src/worker/authHandler.ts new file mode 100644 index 0000000000..6358dcb000 --- /dev/null +++ b/packages/react-on-rails-pro-node-renderer/src/worker/authHandler.ts @@ -0,0 +1,53 @@ +/** + * Isolates logic for request authentication. We don't want this module to know about + * Fastify server and its Request and Reply objects. This allows to test module in isolation + * and without async calls. + * @module worker/authHandler + */ +// TODO: Replace with fastify-basic-auth per https://github.com/shakacode/react_on_rails_pro/issues/110 + +import { timingSafeEqual } from 'crypto'; +import type { FastifyRequest } from './types.js'; +import { getConfig } from '../shared/configBuilder.js'; + +export default function authenticate(req: FastifyRequest) { + const { password } = getConfig(); + + if (password) { + const reqPassword = (req.body as { password?: string }).password || ''; + + // Use timing-safe comparison to prevent timing attacks + // Both strings must be converted to buffers of the same length + try { + const passwordBuffer = Buffer.from(password); + const reqPasswordBuffer = Buffer.from(reqPassword); + + // If lengths differ, create a dummy buffer of the same length to compare against + // This ensures constant-time comparison even when lengths don't match + if (passwordBuffer.length !== reqPasswordBuffer.length) { + return { + headers: { 'Cache-Control': 'no-cache, no-store, max-age=0, must-revalidate' }, + status: 401, + data: 'Wrong password', + }; + } + + if (!timingSafeEqual(passwordBuffer, reqPasswordBuffer)) { + return { + headers: { 'Cache-Control': 'no-cache, no-store, max-age=0, must-revalidate' }, + status: 401, + data: 'Wrong password', + }; + } + } catch { + // If there's any error in comparison, deny access + return { + headers: { 'Cache-Control': 'no-cache, no-store, max-age=0, must-revalidate' }, + status: 401, + data: 'Wrong password', + }; + } + } + + return undefined; +} diff --git a/packages/react-on-rails-pro-node-renderer/src/worker/checkProtocolVersionHandler.ts b/packages/react-on-rails-pro-node-renderer/src/worker/checkProtocolVersionHandler.ts new file mode 100644 index 0000000000..1a0e6972e8 --- /dev/null +++ b/packages/react-on-rails-pro-node-renderer/src/worker/checkProtocolVersionHandler.ts @@ -0,0 +1,111 @@ +/** + * Logic for checking protocol version. + * @module worker/checkProtocVersionHandler + */ +import type { FastifyRequest } from './types.js'; +import packageJson from '../shared/packageJson.js'; +import log from '../shared/log.js'; + +const NODE_ENV = process.env.NODE_ENV || 'production'; + +// Cache to store version comparison results to avoid repeated normalization and logging +// Key: gemVersion string, Value: boolean (true if matches, false if mismatch) +// If key exists, it means we've already processed and logged this version (if needed) +// Cache is cleared when it exceeds 10 entries to prevent unbounded growth +const VERSION_CACHE_MAX_SIZE = 10; +const versionCache = new Map(); + +/** + * Normalizes a version string to handle differences between Ruby gem and NPM version formats. + * Converts prerelease versions like "4.0.0.rc.1" to "4.0.0-rc.1" for consistent comparison. + * Also handles case normalization and whitespace trimming. + * + * @param version - The version string to normalize + * @returns Normalized version string + */ +function normalizeVersion(version: string): string { + if (!version) return ''; + + let normalized = version.trim().toLowerCase(); + + // Replace the first dot after major.minor.patch with a hyphen to handle Ruby gem format + // Examples: "4.0.0.rc.1" -> "4.0.0-rc.1", "4.0.0.alpha.1" -> "4.0.0-alpha.1" + normalized = normalized.replace(/^(\d+\.\d+\.\d+)\.([a-z]+)/, '$1-$2'); + + return normalized; +} + +interface RequestBody { + protocolVersion?: string; + gemVersion?: string; + railsEnv?: string; +} + +export default function checkProtocolVersion(req: FastifyRequest) { + const { protocolVersion: reqProtocolVersion, gemVersion, railsEnv } = req.body as RequestBody; + + // Check protocol version + if (reqProtocolVersion !== packageJson.protocolVersion) { + return { + headers: { 'Cache-Control': 'no-cache, no-store, max-age=0, must-revalidate' }, + status: 412, + data: `Unsupported renderer protocol version ${ + reqProtocolVersion + ? `request protocol ${reqProtocolVersion}` + : `MISSING with body ${JSON.stringify(req.body)}` + } does not match installed renderer protocol ${packageJson.protocolVersion} for version ${packageJson.version}. +Update either the renderer or the Rails server`, + }; + } + + // Check gem version + if (gemVersion) { + // Check cache first + let versionsMatch = versionCache.get(gemVersion); + let justCached = false; + + // If not in cache, perform comparison and cache the result + if (versionsMatch === undefined) { + const normalizedGemVersion = normalizeVersion(gemVersion); + const normalizedPackageVersion = normalizeVersion(packageJson.version); + versionsMatch = normalizedGemVersion === normalizedPackageVersion; + + // Clear cache if it exceeds max size to prevent unbounded growth + if (versionCache.size >= VERSION_CACHE_MAX_SIZE) { + versionCache.clear(); + } + + versionCache.set(gemVersion, versionsMatch); + justCached = true; + } + + // Handle version mismatch + if (!versionsMatch) { + const isProduction = railsEnv === 'production' || NODE_ENV === 'production'; + + const mismatchMessage = `React on Rails Pro gem version (${gemVersion}) does not match node renderer version (${packageJson.version}). Using exact matching versions is recommended for best compatibility.`; + + if (isProduction) { + // In production, log a warning but allow the request to proceed + // Only log once per unique gemVersion (when it was first cached) + if (justCached) { + log.warn(mismatchMessage); + } + } else { + // In development, throw an error to prevent potential issues + return { + headers: { 'Cache-Control': 'no-cache, no-store, max-age=0, must-revalidate' }, + status: 412, + data: `Version mismatch error: ${mismatchMessage} + +Gem version: ${gemVersion} +Node renderer version: ${packageJson.version} + +Update either the gem or the node renderer package to match versions.`, + }; + } + } + } + + return undefined; +} diff --git a/packages/react-on-rails-pro-node-renderer/src/worker/handleGracefulShutdown.ts b/packages/react-on-rails-pro-node-renderer/src/worker/handleGracefulShutdown.ts new file mode 100644 index 0000000000..e10b263882 --- /dev/null +++ b/packages/react-on-rails-pro-node-renderer/src/worker/handleGracefulShutdown.ts @@ -0,0 +1,49 @@ +import cluster from 'cluster'; +import { FastifyInstance } from './types.js'; +import { SHUTDOWN_WORKER_MESSAGE } from '../shared/utils.js'; +import log from '../shared/log.js'; + +const handleGracefulShutdown = (app: FastifyInstance) => { + const { worker } = cluster; + if (!worker) { + log.error('handleGracefulShutdown is called on master, expected to call it on worker only'); + return; + } + + let activeRequestsCount = 0; + let isShuttingDown = false; + + process.on('message', (msg) => { + if (msg === SHUTDOWN_WORKER_MESSAGE) { + log.debug('Worker #%d received graceful shutdown message', worker.id); + isShuttingDown = true; + if (activeRequestsCount === 0) { + log.debug('Worker #%d has no active requests, killing the worker', worker.id); + worker.destroy(); + } else { + log.debug( + 'Worker #%d has "%d" active requests, disconnecting the worker', + worker.id, + activeRequestsCount, + ); + worker.disconnect(); + } + } + }); + + app.addHook('onRequest', (_req, _reply, done) => { + activeRequestsCount += 1; + done(); + }); + + app.addHook('onResponse', (_req, _reply, done) => { + activeRequestsCount -= 1; + if (isShuttingDown && activeRequestsCount === 0) { + log.debug('Worker #%d served all active requests and going to be killed', worker.id); + worker.destroy(); + } + done(); + }); +}; + +export default handleGracefulShutdown; diff --git a/packages/react-on-rails-pro-node-renderer/src/worker/handleRenderRequest.ts b/packages/react-on-rails-pro-node-renderer/src/worker/handleRenderRequest.ts new file mode 100644 index 0000000000..d4fc3fa36b --- /dev/null +++ b/packages/react-on-rails-pro-node-renderer/src/worker/handleRenderRequest.ts @@ -0,0 +1,258 @@ +/** + * Isolates logic for handling render request. We don't want this module to + * Fastify server and its Request and Reply objects. This allows to test + * module in isolation and without async calls. + * @module worker/handleRenderRequest + */ + +import cluster from 'cluster'; +import path from 'path'; +import { mkdir } from 'fs/promises'; +import { lock, unlock } from '../shared/locks.js'; +import fileExistsAsync from '../shared/fileExistsAsync.js'; +import log from '../shared/log.js'; +import { + Asset, + formatExceptionMessage, + errorResponseResult, + workerIdLabel, + copyUploadedAssets, + ResponseResult, + moveUploadedAsset, + isReadableStream, + isErrorRenderResult, + getRequestBundleFilePath, + deleteUploadedAssets, +} from '../shared/utils.js'; +import { getConfig } from '../shared/configBuilder.js'; +import * as errorReporter from '../shared/errorReporter.js'; +import { buildVM, hasVMContextForBundle, runInVM } from './vm.js'; + +export type ProvidedNewBundle = { + timestamp: string | number; + bundle: Asset; +}; + +async function prepareResult( + renderingRequest: string, + bundleFilePathPerTimestamp: string, +): Promise { + try { + const result = await runInVM(renderingRequest, bundleFilePathPerTimestamp, cluster); + + let exceptionMessage = null; + if (!result) { + const error = new Error('INVALID NIL or NULL result for rendering'); + exceptionMessage = formatExceptionMessage(renderingRequest, error, 'INVALID result for prepareResult'); + } else if (isErrorRenderResult(result)) { + ({ exceptionMessage } = result); + } + + if (exceptionMessage) { + return errorResponseResult(exceptionMessage); + } + + if (isReadableStream(result)) { + return { + headers: { 'Cache-Control': 'public, max-age=31536000' }, + status: 200, + stream: result, + }; + } + + return { + headers: { 'Cache-Control': 'public, max-age=31536000' }, + status: 200, + data: result, + }; + } catch (err) { + const exceptionMessage = formatExceptionMessage(renderingRequest, err, 'Unknown error calling runInVM'); + return errorResponseResult(exceptionMessage); + } +} + +/** + * @param bundleFilePathPerTimestamp + * @param providedNewBundle + * @param renderingRequest + * @param assetsToCopy might be null + */ +async function handleNewBundleProvided( + renderingRequest: string, + providedNewBundle: ProvidedNewBundle, + assetsToCopy: Asset[] | null | undefined, +): Promise { + const bundleFilePathPerTimestamp = getRequestBundleFilePath(providedNewBundle.timestamp); + const bundleDirectory = path.dirname(bundleFilePathPerTimestamp); + await mkdir(bundleDirectory, { recursive: true }); + log.info('Worker received new bundle: %s', bundleFilePathPerTimestamp); + + let lockAcquired = false; + let lockfileName: string | undefined; + try { + const { lockfileName: name, wasLockAcquired, errorMessage } = await lock(bundleFilePathPerTimestamp); + lockfileName = name; + lockAcquired = wasLockAcquired; + + if (!wasLockAcquired) { + const msg = formatExceptionMessage( + renderingRequest, + errorMessage, + `Failed to acquire lock ${lockfileName}. Worker: ${workerIdLabel()}.`, + ); + return errorResponseResult(msg); + } + + try { + log.info( + `Moving uploaded file ${providedNewBundle.bundle.savedFilePath} to ${bundleFilePathPerTimestamp}`, + ); + await moveUploadedAsset(providedNewBundle.bundle, bundleFilePathPerTimestamp); + if (assetsToCopy) { + await copyUploadedAssets(assetsToCopy, bundleDirectory); + } + + log.info( + `Completed moving uploaded file ${providedNewBundle.bundle.savedFilePath} to ${bundleFilePathPerTimestamp}`, + ); + } catch (error) { + const fileExists = await fileExistsAsync(bundleFilePathPerTimestamp); + if (!fileExists) { + const msg = formatExceptionMessage( + renderingRequest, + error, + `Unexpected error when moving the bundle from ${providedNewBundle.bundle.savedFilePath} \ +to ${bundleFilePathPerTimestamp})`, + ); + log.error(msg); + return errorResponseResult(msg); + } + log.info( + 'File exists when trying to overwrite bundle %s. Assuming bundle written by other thread', + bundleFilePathPerTimestamp, + ); + } + + return undefined; + } finally { + if (lockAcquired && lockfileName) { + log.info('About to unlock %s from worker %s', lockfileName, workerIdLabel()); + try { + await unlock(lockfileName); + } catch (error) { + const msg = formatExceptionMessage( + renderingRequest, + error, + `Error unlocking ${lockfileName} from worker ${workerIdLabel()}.`, + ); + log.warn(msg); + } + } + } +} + +async function handleNewBundlesProvided( + renderingRequest: string, + providedNewBundles: ProvidedNewBundle[], + assetsToCopy: Asset[] | null | undefined, +): Promise { + log.info('Worker received new bundles: %s', providedNewBundles); + + const handlingPromises = providedNewBundles.map((providedNewBundle) => + handleNewBundleProvided(renderingRequest, providedNewBundle, assetsToCopy), + ); + const results = await Promise.all(handlingPromises); + + if (assetsToCopy) { + await deleteUploadedAssets(assetsToCopy); + } + + const errorResult = results.find((result) => result !== undefined); + return errorResult; +} + +/** + * Creates the result for the Fastify server to use. + * @returns Promise where the result contains { status, data, headers } to + * send back to the browser. + */ +export async function handleRenderRequest({ + renderingRequest, + bundleTimestamp, + dependencyBundleTimestamps, + providedNewBundles, + assetsToCopy, +}: { + renderingRequest: string; + bundleTimestamp: string | number; + dependencyBundleTimestamps?: string[] | number[]; + providedNewBundles?: ProvidedNewBundle[] | null; + assetsToCopy?: Asset[] | null; +}): Promise { + try { + // const bundleFilePathPerTimestamp = getRequestBundleFilePath(bundleTimestamp); + const allBundleFilePaths = Array.from( + new Set([...(dependencyBundleTimestamps ?? []), bundleTimestamp].map(getRequestBundleFilePath)), + ); + const entryBundleFilePath = getRequestBundleFilePath(bundleTimestamp); + + const { maxVMPoolSize } = getConfig(); + + if (allBundleFilePaths.length > maxVMPoolSize) { + return { + headers: { 'Cache-Control': 'no-cache, no-store, max-age=0, must-revalidate' }, + status: 410, + data: `Too many bundles uploaded. The maximum allowed is ${maxVMPoolSize}. Please reduce the number of bundles or increase maxVMPoolSize in your configuration.`, + }; + } + + // If the current VM has the correct bundle and is ready + if (allBundleFilePaths.every((bundleFilePath) => hasVMContextForBundle(bundleFilePath))) { + return await prepareResult(renderingRequest, entryBundleFilePath); + } + + // If gem has posted updated bundle: + if (providedNewBundles && providedNewBundles.length > 0) { + const result = await handleNewBundlesProvided(renderingRequest, providedNewBundles, assetsToCopy); + if (result) { + return result; + } + } + + // Check if the bundle exists: + const missingBundles = ( + await Promise.all( + [...(dependencyBundleTimestamps ?? []), bundleTimestamp].map(async (timestamp) => { + const bundleFilePath = getRequestBundleFilePath(timestamp); + const fileExists = await fileExistsAsync(bundleFilePath); + return fileExists ? null : timestamp; + }), + ) + ).filter((timestamp) => timestamp !== null); + + if (missingBundles.length > 0) { + const missingBundlesText = missingBundles.length > 1 ? 'bundles' : 'bundle'; + log.info(`No saved ${missingBundlesText}: ${missingBundles.join(', ')}`); + return { + headers: { 'Cache-Control': 'no-cache, no-store, max-age=0, must-revalidate' }, + status: 410, + data: 'No bundle uploaded', + }; + } + + // The bundle exists, but the VM has not yet been created. + // Another worker must have written it or it was saved during deployment. + log.info('Bundle %s exists. Building VM for worker %s.', entryBundleFilePath, workerIdLabel()); + await Promise.all(allBundleFilePaths.map((bundleFilePath) => buildVM(bundleFilePath))); + + return await prepareResult(renderingRequest, entryBundleFilePath); + } catch (error) { + const msg = formatExceptionMessage( + renderingRequest, + error, + 'Caught top level error in handleRenderRequest', + ); + errorReporter.message(msg); + return Promise.reject(error as Error); + } +} diff --git a/packages/react-on-rails-pro-node-renderer/src/worker/types.ts b/packages/react-on-rails-pro-node-renderer/src/worker/types.ts new file mode 100644 index 0000000000..411bb645c2 --- /dev/null +++ b/packages/react-on-rails-pro-node-renderer/src/worker/types.ts @@ -0,0 +1,13 @@ +import { + FastifyInstance as LibFastifyInstance, + FastifyRequest as LibFastifyRequest, + FastifyReply as LibFastifyReply, + RouteGenericInterface, +} from 'fastify'; +import { Http2Server } from 'http2'; + +export type FastifyInstance = LibFastifyInstance; + +export type FastifyRequest = LibFastifyRequest; + +export type FastifyReply = LibFastifyReply; diff --git a/packages/react-on-rails-pro-node-renderer/src/worker/vm.ts b/packages/react-on-rails-pro-node-renderer/src/worker/vm.ts new file mode 100644 index 0000000000..b8834e97a7 --- /dev/null +++ b/packages/react-on-rails-pro-node-renderer/src/worker/vm.ts @@ -0,0 +1,362 @@ +/** + * Manages the virtual machine for rendering code in isolated context. + * @module worker/vm + */ + +import fs from 'fs'; +import path from 'path'; +import vm from 'vm'; +import m from 'module'; +import cluster from 'cluster'; +import type { Readable } from 'stream'; +import { ReadableStream } from 'stream/web'; +import { promisify, TextEncoder } from 'util'; +import type { ReactOnRails as ROR } from 'react-on-rails' with { 'resolution-mode': 'import' }; +import type { Context } from 'vm'; + +import SharedConsoleHistory from '../shared/sharedConsoleHistory.js'; +import log from '../shared/log.js'; +import { getConfig } from '../shared/configBuilder.js'; +import { + formatExceptionMessage, + smartTrim, + isReadableStream, + getRequestBundleFilePath, + handleStreamError, +} from '../shared/utils.js'; +import * as errorReporter from '../shared/errorReporter.js'; + +const readFileAsync = promisify(fs.readFile); +const writeFileAsync = promisify(fs.writeFile); + +interface VMContext { + context: Context; + sharedConsoleHistory: SharedConsoleHistory; + lastUsed: number; // Track when this VM was last used +} + +// Store contexts by their bundle file paths +const vmContexts = new Map(); + +// Track VM creation promises to handle concurrent buildVM requests +const vmCreationPromises = new Map>(); + +/** + * Returns all bundle paths that have a VM context + */ +export function hasVMContextForBundle(bundlePath: string) { + return vmContexts.has(bundlePath); +} + +/** + * Get a specific VM context by bundle path + */ +export function getVMContext(bundlePath: string): VMContext | undefined { + return vmContexts.get(bundlePath); +} + +/** + * The type of the result returned by executing the code payload sent in the rendering request. + */ +export type RenderCodeResult = string | Promise | Readable; + +/** + * The type of the result returned by the `runInVM` function. + * + * Similar to {@link RenderCodeResult} returned by executing the code payload sent in the rendering request, + * but after awaiting the promise if present and handling exceptions if any. + */ +export type RenderResult = string | Readable | { exceptionMessage: string }; + +declare global { + // This works on node 16+ + // https://stackoverflow.com/questions/35074713/extending-typescript-global-object-in-node-js/68328575#68328575 + // eslint-disable-next-line vars-on-top, no-var + var ReactOnRails: ROR | undefined; +} + +const extendContext = (contextObject: vm.Context, additionalContext: Record) => { + if (log.level === 'debug') { + log.debug(`Adding ${Object.keys(additionalContext).join(', ')} to context object.`); + } + Object.assign(contextObject, additionalContext); +}; + +// Helper function to manage VM pool size +function manageVMPoolSize() { + const { maxVMPoolSize } = getConfig(); + + if (vmContexts.size <= maxVMPoolSize) { + return; + } + + const sortedEntries = Array.from(vmContexts.entries()).sort(([, a], [, b]) => a.lastUsed - b.lastUsed); + + while (sortedEntries.length > maxVMPoolSize) { + const oldestPath = sortedEntries.shift()?.[0]; + if (oldestPath) { + vmContexts.delete(oldestPath); + log.debug(`Removed VM for bundle ${oldestPath} due to pool size limit (max: ${maxVMPoolSize})`); + } + } +} + +/** + * + * @param renderingRequest JS Code to execute for SSR + * @param filePath + * @param vmCluster + */ +export async function runInVM( + renderingRequest: string, + filePath: string, + vmCluster?: typeof cluster, +): Promise { + const { serverBundleCachePath } = getConfig(); + + try { + // Wait for VM creation if it's in progress + if (vmCreationPromises.has(filePath)) { + await vmCreationPromises.get(filePath); + } + + // Get the correct VM context based on the provided bundle path + const vmContext = getVMContext(filePath); + + if (!vmContext) { + throw new Error(`No VM context found for bundle ${filePath}`); + } + + // Update last used timestamp + vmContext.lastUsed = Date.now(); + + const { context, sharedConsoleHistory } = vmContext; + + if (log.level === 'debug') { + // worker is nullable in the primary process + const workerId = vmCluster?.worker?.id; + log.debug(`worker ${workerId ? `${workerId} ` : ''}received render request for bundle ${filePath} with code +${smartTrim(renderingRequest)}`); + const debugOutputPathCode = path.join(serverBundleCachePath, 'code.js'); + log.debug(`Full code executed written to: ${debugOutputPathCode}`); + await writeFileAsync(debugOutputPathCode, renderingRequest); + } + + let result = sharedConsoleHistory.trackConsoleHistoryInRenderRequest(() => { + context.renderingRequest = renderingRequest; + try { + return vm.runInContext(renderingRequest, context) as RenderCodeResult; + } finally { + context.renderingRequest = undefined; + } + }); + + if (isReadableStream(result)) { + const newStreamAfterHandlingError = handleStreamError(result, (error) => { + const msg = formatExceptionMessage(renderingRequest, error, 'Error in a rendering stream'); + errorReporter.message(msg); + }); + return newStreamAfterHandlingError; + } + if (typeof result !== 'string') { + const objectResult = await result; + result = JSON.stringify(objectResult); + } + if (log.level === 'debug') { + log.debug(`result from JS: +${smartTrim(result)}`); + const debugOutputPathResult = path.join(serverBundleCachePath, 'result.json'); + log.debug(`Wrote result to file: ${debugOutputPathResult}`); + await writeFileAsync(debugOutputPathResult, result); + } + + return result; + } catch (exception) { + const exceptionMessage = formatExceptionMessage(renderingRequest, exception); + log.debug('Caught exception in rendering request: %s', exceptionMessage); + return Promise.resolve({ exceptionMessage }); + } +} + +export async function buildVM(filePath: string) { + // Return existing promise if VM is already being created + if (vmCreationPromises.has(filePath)) { + return vmCreationPromises.get(filePath); + } + + // Check if VM for this bundle already exists + const vmContext = vmContexts.get(filePath); + if (vmContext) { + // Update last used time when accessing existing VM + vmContext.lastUsed = Date.now(); + return Promise.resolve(true); + } + + // Create a new promise for this VM creation + const vmCreationPromise = (async () => { + try { + const { supportModules, stubTimers, additionalContext } = getConfig(); + const additionalContextIsObject = + additionalContext !== null && additionalContext.constructor === Object; + const sharedConsoleHistory = new SharedConsoleHistory(); + + const runOnOtherBundle = async (bundleTimestamp: string | number, renderingRequest: string) => { + const bundlePath = getRequestBundleFilePath(bundleTimestamp); + return runInVM(renderingRequest, bundlePath, cluster); + }; + + const contextObject = { sharedConsoleHistory, runOnOtherBundle }; + + if (supportModules) { + // IMPORTANT: When adding anything to this object, update: + // 1. docs/node-renderer/js-configuration.md + // 2. packages/node-renderer/src/shared/configBuilder.ts + extendContext(contextObject, { + Buffer, + TextDecoder, + TextEncoder, + URLSearchParams, + ReadableStream, + process, + setTimeout, + setInterval, + setImmediate, + clearTimeout, + clearInterval, + clearImmediate, + queueMicrotask, + }); + } + + if (additionalContextIsObject) { + extendContext(contextObject, additionalContext); + } + const context = vm.createContext(contextObject); + + // Create explicit reference to global context, just in case (some libs can use it): + vm.runInContext('global = this', context); + + // Reimplement console methods for replaying on the client: + vm.runInContext( + ` + console = { + get history() { + return sharedConsoleHistory.getConsoleHistory(); + }, + set history(value) { + // Do nothing. It's just for the backward compatibility. + }, + }; + ['error', 'log', 'info', 'warn'].forEach(function (level) { + console[level] = function () { + var argArray = Array.prototype.slice.call(arguments); + if (argArray.length > 0) { + argArray[0] = '[SERVER] ' + argArray[0]; + } + sharedConsoleHistory.addToConsoleHistory({level: level, arguments: argArray}); + }; + });`, + context, + ); + + // Define global getStackTrace() function: + vm.runInContext( + ` + function getStackTrace() { + var stack; + try { + throw new Error(''); + } + catch (error) { + stack = error.stack || ''; + } + stack = stack.split('\\n').map(function (line) { return line.trim(); }); + return stack.splice(stack[0] == 'Error' ? 2 : 1); + }`, + context, + ); + + if (stubTimers) { + // Define timer polyfills: + vm.runInContext(`function setInterval() {}`, context); + vm.runInContext(`function setTimeout() {}`, context); + vm.runInContext(`function setImmediate() {}`, context); + vm.runInContext(`function clearTimeout() {}`, context); + vm.runInContext(`function clearInterval() {}`, context); + vm.runInContext(`function clearImmediate() {}`, context); + vm.runInContext(`function queueMicrotask() {}`, context); + } + + // Run bundle code in created context: + const bundleContents = await readFileAsync(filePath, 'utf8'); + + // If node-specific code is provided then it must be wrapped into a module wrapper. The bundle + // may need the `require` function, which is not available when running in vm unless passed in. + if (additionalContextIsObject || supportModules) { + vm.runInContext(m.wrap(bundleContents), context)( + exports, + require, + module, + filePath, + path.dirname(filePath), + ); + } else { + vm.runInContext(bundleContents, context); + } + + // Only now, after VM is fully initialized, store the context + vmContexts.set(filePath, { + context, + sharedConsoleHistory, + lastUsed: Date.now(), + }); + + // Manage pool size after adding new VM + manageVMPoolSize(); + + // isWorker check is required for JS unit testing: + if (cluster.isWorker && cluster.worker !== undefined) { + log.debug(`Built VM for worker #${cluster.worker.id} with bundle ${filePath}`); + } + + if (log.level === 'debug') { + log.debug( + 'Required objects now in VM sandbox context: %s', + vm.runInContext('global.ReactOnRails', context) !== undefined, + ); + log.debug( + 'Required objects should not leak to the global context (true means OK): %s', + !!global.ReactOnRails, + ); + } + + return true; + } catch (error) { + log.error({ error }, 'Caught Error when creating context in buildVM'); + errorReporter.error(error as Error); + throw error; + } finally { + // Always remove the promise from the map when done + vmCreationPromises.delete(filePath); + } + })(); + + // Store the promise + vmCreationPromises.set(filePath, vmCreationPromise); + + return vmCreationPromise; +} + +/** @internal Used in tests */ +export function resetVM() { + // Clear all VM contexts + vmContexts.clear(); +} + +// Optional: Add a method to remove a specific VM if needed +/** + * @public TODO: Remove the line below when this function is actually used + */ +export function removeVM(bundlePath: string) { + vmContexts.delete(bundlePath); +} diff --git a/packages/react-on-rails-pro-node-renderer/tests/concurrentHtmlStreaming.test.ts b/packages/react-on-rails-pro-node-renderer/tests/concurrentHtmlStreaming.test.ts new file mode 100644 index 0000000000..17abd00884 --- /dev/null +++ b/packages/react-on-rails-pro-node-renderer/tests/concurrentHtmlStreaming.test.ts @@ -0,0 +1,146 @@ +import { randomUUID } from 'crypto'; +import { createClient } from 'redis'; +import parser from 'node-html-parser'; + +// eslint-disable-next-line import/no-relative-packages +import { RSCPayloadChunk } from '../../react-on-rails/lib/types'; +import buildApp from '../src/worker'; +import config from './testingNodeRendererConfigs'; +import { makeRequest } from './httpRequestUtils'; +import { Config } from '../src/shared/configBuilder'; + +const app = buildApp(config as Partial); +const redisUrl = process.env.REDIS_URL || 'redis://localhost:6379'; +const redisClient = createClient({ url: redisUrl }); + +beforeAll(async () => { + await redisClient.connect(); + await app.ready(); + await app.listen({ port: 0 }); +}); + +afterAll(async () => { + await app.close(); + await redisClient.close(); +}); + +const sendRedisValue = async (redisRequestId: string, key: string, value: string) => { + await redisClient.xAdd(`stream:${redisRequestId}`, '*', { [`:${key}`]: JSON.stringify(value) }); +}; + +const sendRedisItemValue = async (redisRequestId: string, itemIndex: number, value: string) => { + await sendRedisValue(redisRequestId, `Item${itemIndex}`, value); +}; + +const extractHtmlFromChunks = (chunks: string) => { + const html = chunks + .split('\n') + .map((chunk) => (chunk.trim().length > 0 ? (JSON.parse(chunk) as RSCPayloadChunk).html : chunk)) + .join(''); + const parsedHtml = parser.parse(html); + // TODO: investigate why ReactOnRails produces different RSC payload on each request + parsedHtml.querySelectorAll('script').forEach((x) => x.remove()); + const sanitizedHtml = parsedHtml.toString(); + return sanitizedHtml; +}; + +const createParallelRenders = (size: number) => { + const redisRequestIds = Array(size) + .fill(null) + .map(() => randomUUID()); + const renderRequests = redisRequestIds.map((redisRequestId) => { + return makeRequest(app, { + componentName: 'RedisReceiver', + props: { requestId: redisRequestId }, + }); + }); + + const expectNextChunk = async (expectedNextChunk: string) => { + const nextChunks = await Promise.all( + renderRequests.map((renderRequest) => renderRequest.waitForNextChunk()), + ); + nextChunks.forEach((chunk, index) => { + const redisRequestId = redisRequestIds[index]!; + const chunksAfterRemovingRequestId = chunk.replace(new RegExp(redisRequestId, 'g'), ''); + expect(extractHtmlFromChunks(chunksAfterRemovingRequestId)).toEqual( + extractHtmlFromChunks(expectedNextChunk), + ); + }); + }; + + const sendRedisItemValues = async (itemIndex: number, itemValue: string) => { + await Promise.all( + redisRequestIds.map((redisRequestId) => sendRedisItemValue(redisRequestId, itemIndex, itemValue)), + ); + }; + + const waitUntilFinished = async () => { + await Promise.all(renderRequests.map((renderRequest) => renderRequest.finishedPromise)); + renderRequests.forEach((renderRequest) => { + expect(renderRequest.getBuffer()).toHaveLength(0); + }); + }; + + return { + expectNextChunk, + sendRedisItemValues, + waitUntilFinished, + }; +}; + +test('Happy Path', async () => { + const parallelInstances = 50; + expect.assertions(parallelInstances * 7 + 7); + const redisRequestId = randomUUID(); + const { waitForNextChunk, finishedPromise, getBuffer } = makeRequest(app, { + componentName: 'RedisReceiver', + props: { requestId: redisRequestId }, + }); + const chunks: string[] = []; + let chunk = await waitForNextChunk(); + expect(chunk).not.toContain('Unique Value'); + chunks.push(chunk.replace(new RegExp(redisRequestId, 'g'), '')); + + await sendRedisItemValue(redisRequestId, 0, 'First Unique Value'); + chunk = await waitForNextChunk(); + expect(chunk).toContain('First Unique Value'); + chunks.push(chunk.replace(new RegExp(redisRequestId, 'g'), '')); + + await sendRedisItemValue(redisRequestId, 4, 'Fifth Unique Value'); + chunk = await waitForNextChunk(); + expect(chunk).toContain('Fifth Unique Value'); + chunks.push(chunk.replace(new RegExp(redisRequestId, 'g'), '')); + + await sendRedisItemValue(redisRequestId, 2, 'Third Unique Value'); + chunk = await waitForNextChunk(); + expect(chunk).toContain('Third Unique Value'); + chunks.push(chunk.replace(new RegExp(redisRequestId, 'g'), '')); + + await sendRedisItemValue(redisRequestId, 1, 'Second Unique Value'); + chunk = await waitForNextChunk(); + expect(chunk).toContain('Second Unique Value'); + chunks.push(chunk.replace(new RegExp(redisRequestId, 'g'), '')); + + await sendRedisItemValue(redisRequestId, 3, 'Forth Unique Value'); + chunk = await waitForNextChunk(); + expect(chunk).toContain('Forth Unique Value'); + chunks.push(chunk.replace(new RegExp(redisRequestId, 'g'), '')); + + await finishedPromise; + expect(getBuffer).toHaveLength(0); + + const { expectNextChunk, sendRedisItemValues, waitUntilFinished } = + createParallelRenders(parallelInstances); + await expectNextChunk(chunks[0]!); + await sendRedisItemValues(0, 'First Unique Value'); + await expectNextChunk(chunks[1]!); + await sendRedisItemValues(4, 'Fifth Unique Value'); + await expectNextChunk(chunks[2]!); + await sendRedisItemValues(2, 'Third Unique Value'); + await expectNextChunk(chunks[3]!); + await sendRedisItemValues(1, 'Second Unique Value'); + await expectNextChunk(chunks[4]!); + await sendRedisItemValues(3, 'Forth Unique Value'); + await expectNextChunk(chunks[5]!); + await waitUntilFinished(); +}, 50000); diff --git a/packages/react-on-rails-pro-node-renderer/tests/fixtures/bundle.js b/packages/react-on-rails-pro-node-renderer/tests/fixtures/bundle.js new file mode 100644 index 0000000000..4ed2eac53f --- /dev/null +++ b/packages/react-on-rails-pro-node-renderer/tests/fixtures/bundle.js @@ -0,0 +1,3 @@ +global.ReactOnRails = { + dummy: { html: 'Dummy Object' }, +}; diff --git a/packages/react-on-rails-pro-node-renderer/tests/fixtures/loadable-stats-other.json b/packages/react-on-rails-pro-node-renderer/tests/fixtures/loadable-stats-other.json new file mode 100644 index 0000000000..c8c4105eb5 --- /dev/null +++ b/packages/react-on-rails-pro-node-renderer/tests/fixtures/loadable-stats-other.json @@ -0,0 +1,3 @@ +{ + "foo": "bar" +} diff --git a/packages/react-on-rails-pro-node-renderer/tests/fixtures/loadable-stats.json b/packages/react-on-rails-pro-node-renderer/tests/fixtures/loadable-stats.json new file mode 100644 index 0000000000..c8c4105eb5 --- /dev/null +++ b/packages/react-on-rails-pro-node-renderer/tests/fixtures/loadable-stats.json @@ -0,0 +1,3 @@ +{ + "foo": "bar" +} diff --git a/packages/react-on-rails-pro-node-renderer/tests/fixtures/projects/bionicworkshop/fa6ccf6b/authorsPageRenderingRequest.js b/packages/react-on-rails-pro-node-renderer/tests/fixtures/projects/bionicworkshop/fa6ccf6b/authorsPageRenderingRequest.js new file mode 100644 index 0000000000..b25063d7af --- /dev/null +++ b/packages/react-on-rails-pro-node-renderer/tests/fixtures/projects/bionicworkshop/fa6ccf6b/authorsPageRenderingRequest.js @@ -0,0 +1,18 @@ +(function() { + var railsContext = {"inMailer":false,"i18nLocale":"ru","i18nDefaultLocale":"ru","href":"http://0.0.0.0:3000/authors","location":"/authors","scheme":"http","host":"0.0.0.0","port":3000,"pathname":"/authors","search":null,"httpAcceptLanguage":"ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4","appVersion":"v1.5.4-1-g6d0afe8\n","authenticityToken":"vVqS4gfg4uVzU8o2mxyXNHZSb7eo8cXo8LHSHOKFr70/z/dwqcbb3kvq3U219YU5iuWYTx9WGcCTCDadT6kG8A==","serverSide":true}; + ReactOnRails.clearHydratedStores(); +var reduxProps, store, storeGenerator; +reduxProps = {"authors_init_data":{"authors":{"list":[{"id":"1-denis-udovenko","name":"Денис Удовенко","description":"Автор этого сайта. Большинство публикаций направлено на компенсацию недостатка информации о современном протезировании и изложение личного опыта.","accepts_feedbacks":true,"posts_count":4,"avatar_thumb_url":"/uploads/avatar/image/471/thumb_8db4d733-b57d-4278-b600-fd9f68843e22.jpg","avatar_preview_url":"/uploads/avatar/image/471/preview_8db4d733-b57d-4278-b600-fd9f68843e22.jpg"}],"page":1,"per_page":10,"total":1}}}; +storeGenerator = ReactOnRails.getStoreGenerator('Store'); +store = storeGenerator(reduxProps, railsContext); +ReactOnRails.setStore('Store', store); + + var props = {}; + return ReactOnRails.serverRenderReactComponent({ + name: 'App', + domNodeId: 'react-root', + props: props, + trace: true, + railsContext: railsContext + }); +})() diff --git a/packages/react-on-rails-pro-node-renderer/tests/fixtures/projects/bionicworkshop/fa6ccf6b/landingPageRenderingRequest.js b/packages/react-on-rails-pro-node-renderer/tests/fixtures/projects/bionicworkshop/fa6ccf6b/landingPageRenderingRequest.js new file mode 100644 index 0000000000..21a82ffc19 --- /dev/null +++ b/packages/react-on-rails-pro-node-renderer/tests/fixtures/projects/bionicworkshop/fa6ccf6b/landingPageRenderingRequest.js @@ -0,0 +1,18 @@ +(function() { + var railsContext = {"inMailer":false,"i18nLocale":"ru","i18nDefaultLocale":"ru","href":"http://0.0.0.0:3000/","location":"/","scheme":"http","host":"0.0.0.0","port":3000,"pathname":"/","search":null,"httpAcceptLanguage":"ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4","appVersion":"v1.5.4-1-g6d0afe8\n","authenticityToken":"aNhS0Ruo+1YLg6nJD+Orv5IzvT1xuMt7p7yr0GtCz6PqTTdDtY7CbTM6vrIhCrmyboRKxcYfF1PEBU9Rxm5m7g==","serverSide":true}; + ReactOnRails.clearHydratedStores(); +var reduxProps, store, storeGenerator; +reduxProps = {"posts_init_data":{"posts":{"list":[{"id":"9-esche","title":"Еще","description":"Еще статья блеать","published_at_utc":"2016-12-29 04:11","author_id":"1-denis-udovenko","tags_ids":["2-ottobock","3-gilzy","5-dlinnyi-tag"],"images_sizes":{"6":{"width":640,"height":493,"src":"/uploads/rich/rich_file/rich_file_file_name/6/bebionic.jpg"},"7":{"width":796,"height":448,"src":"/uploads/rich/rich_file/rich_file_file_name/7/axon_16_9_video_preview.jpg"},"14":{"width":590,"height":300,"src":"/uploads/rich/rich_file/rich_file_file_name/14/soap.jpg"},"23":{"width":1920,"height":1200,"src":"/uploads/rich/rich_file/rich_file_file_name/23/images.jpg"}},"videos_count":1,"comments_count":18},{"id":"8-esche-statya","title":"Еще статья","description":"Еще одна статья","published_at_utc":"2016-12-24 07:42","author_id":"1-denis-udovenko","tags_ids":["1-bebionic","2-ottobock","5-dlinnyi-tag"],"images_sizes":{"8":{"width":485,"height":600,"src":"/uploads/rich/rich_file/rich_file_file_name/8/11.jpg"},"17":{"width":264,"height":232,"src":"/uploads/rich/rich_file/rich_file_file_name/17/5.jpg"}},"videos_count":0,"comments_count":0},{"id":"7-agrarnye-problemy-antarktiki","title":"Аграрные проблемы Антарктики","description":"Разбираемся с аграрными проблемами Антарктики","published_at_utc":"2016-12-21 21:49","author_id":"1-denis-udovenko","tags_ids":["1-bebionic","2-ottobock","3-gilzy","5-dlinnyi-tag"],"images_sizes":{"21":{"width":796,"height":448,"src":"/uploads/rich/rich_file/rich_file_file_name/21/axon_16_9_video_preview.jpg"}},"videos_count":0,"comments_count":0},{"id":"6-megastatya-pro-kiborgov","title":"Мегастатья про киборгов","description":"Короче опять про киборгов","published_at_utc":"2016-12-17 21:49","author_id":"1-denis-udovenko","tags_ids":["2-ottobock","3-gilzy","5-dlinnyi-tag"],"images_sizes":{},"videos_count":0,"comments_count":0}],"page":1,"per_page":10,"total":4},"authors":{"list":[{"id":"1-denis-udovenko","name":"Денис Удовенко","description":"Автор этого сайта. Большинство публикаций направлено на компенсацию недостатка информации о современном протезировании и изложение личного опыта.","accepts_feedbacks":true,"posts_count":4,"avatar_thumb_url":"/uploads/avatar/image/471/thumb_8db4d733-b57d-4278-b600-fd9f68843e22.jpg","avatar_preview_url":"/uploads/avatar/image/471/preview_8db4d733-b57d-4278-b600-fd9f68843e22.jpg"}]},"tags":{"list":[{"id":"1-bebionic","posts_count":2,"name":"BeBionic"},{"id":"2-ottobock","posts_count":4,"name":"OttoBock"},{"id":"3-gilzy","posts_count":3,"name":"Гильзы"},{"id":"5-dlinnyi-tag","posts_count":4,"name":"Длинный таг"}],"page":1,"per_page":0,"total":4}}}; +storeGenerator = ReactOnRails.getStoreGenerator('Store'); +store = storeGenerator(reduxProps, railsContext); +ReactOnRails.setStore('Store', store); + + var props = {}; + return ReactOnRails.serverRenderReactComponent({ + name: 'App', + domNodeId: 'react-root', + props: props, + trace: true, + railsContext: railsContext + }); +})() diff --git a/packages/react-on-rails-pro-node-renderer/tests/fixtures/projects/bionicworkshop/fa6ccf6b/postPageRenderingRequest.js b/packages/react-on-rails-pro-node-renderer/tests/fixtures/projects/bionicworkshop/fa6ccf6b/postPageRenderingRequest.js new file mode 100644 index 0000000000..b967fc02b0 --- /dev/null +++ b/packages/react-on-rails-pro-node-renderer/tests/fixtures/projects/bionicworkshop/fa6ccf6b/postPageRenderingRequest.js @@ -0,0 +1,18 @@ +(function() { + var railsContext = {"inMailer":false,"i18nLocale":"ru","i18nDefaultLocale":"ru","href":"http://0.0.0.0:3000/posts/8-esche-statya","location":"/posts/8-esche-statya","scheme":"http","host":"0.0.0.0","port":3000,"pathname":"/posts/8-esche-statya","search":null,"httpAcceptLanguage":"ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4","appVersion":"v1.5.4-1-g6d0afe8\n","authenticityToken":"+iSmQdkP8aXFL99dJOeVTh8G6RvofTZD7Y6QpJ0NSlp4scPTdynInv2WyCYKDodD47Ee41/a6muON3QlMCHjFw==","serverSide":true}; + ReactOnRails.clearHydratedStores(); +var reduxProps, store, storeGenerator; +reduxProps = {"post_init_data":{"post":{"id":"8-esche-statya","title":"Еще статья","description":"Еще одна статья","content":"\u003cp\u003e\u003cimg alt=\"\" data-rich-file-id=\"17\" src=\"/uploads/rich/rich_file/rich_file_file_name/17/landscape_5.jpg\" /\u003eБла\u003cimg alt=\"\" class=\"default\" data-rich-file-id=\"8\" src=\"/uploads/rich/rich_file/rich_file_file_name/8/portrait_11.jpg\" /\u003e\u003c/p\u003e\r\n","published_at_utc":"2016-12-24 07:42","author_id":"1-denis-udovenko","tags_ids":["1-bebionic","2-ottobock","5-dlinnyi-tag"],"images_sizes":{"8":{"width":485,"height":600,"src":"/uploads/rich/rich_file/rich_file_file_name/8/11.jpg"},"17":{"width":264,"height":232,"src":"/uploads/rich/rich_file/rich_file_file_name/17/5.jpg"}},"videos_count":0,"comments_count":0},"authors":{"list":[{"id":"1-denis-udovenko","name":"Денис Удовенко","description":"Автор этого сайта. Большинство публикаций направлено на компенсацию недостатка информации о современном протезировании и изложение личного опыта.","accepts_feedbacks":true,"posts_count":4,"avatar_thumb_url":"/uploads/avatar/image/471/thumb_8db4d733-b57d-4278-b600-fd9f68843e22.jpg","avatar_preview_url":"/uploads/avatar/image/471/preview_8db4d733-b57d-4278-b600-fd9f68843e22.jpg"}],"page":1,"per_page":0,"total":1},"tags":{"list":[{"id":"1-bebionic","posts_count":2,"name":"BeBionic"},{"id":"2-ottobock","posts_count":4,"name":"OttoBock"},{"id":"5-dlinnyi-tag","posts_count":4,"name":"Длинный таг"}]},"comments":{"list":[],"page":1,"per_page":0,"total":0}}}; +storeGenerator = ReactOnRails.getStoreGenerator('Store'); +store = storeGenerator(reduxProps, railsContext); +ReactOnRails.setStore('Store', store); + + var props = {}; + return ReactOnRails.serverRenderReactComponent({ + name: 'App', + domNodeId: 'react-root', + props: props, + trace: true, + railsContext: railsContext + }); +})() diff --git a/packages/react-on-rails-pro-node-renderer/tests/fixtures/projects/bionicworkshop/fa6ccf6b/server-bundle.js b/packages/react-on-rails-pro-node-renderer/tests/fixtures/projects/bionicworkshop/fa6ccf6b/server-bundle.js new file mode 100644 index 0000000000..4a0bcc030a --- /dev/null +++ b/packages/react-on-rails-pro-node-renderer/tests/fixtures/projects/bionicworkshop/fa6ccf6b/server-bundle.js @@ -0,0 +1,97350 @@ +/******/ (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; + /******/ + /******/ // identity function for calling harmony imports with the correct context + /******/ __webpack_require__.i = function (value) { + return value; + }; + /******/ + /******/ // define getter function for harmony exports + /******/ __webpack_require__.d = function (exports, name, getter) { + /******/ if (!__webpack_require__.o(exports, name)) { + /******/ Object.defineProperty(exports, name, { + /******/ configurable: false, + /******/ enumerable: true, + /******/ get: getter, + /******/ + }); + /******/ + } + /******/ + }; + /******/ + /******/ // 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 = 892)); + /******/ +})( + /************************************************************************/ + /******/ [ + /* 0 */ + /***/ function (module, exports, __webpack_require__) { + var global = __webpack_require__(8), + core = __webpack_require__(55), + hide = __webpack_require__(29), + redefine = __webpack_require__(30), + ctx = __webpack_require__(56), + PROTOTYPE = 'prototype'; + + var $export = function (type, name, source) { + var IS_FORCED = type & $export.F, + IS_GLOBAL = type & $export.G, + IS_STATIC = type & $export.S, + IS_PROTO = type & $export.P, + IS_BIND = type & $export.B, + target = IS_GLOBAL + ? global + : IS_STATIC + ? global[name] || (global[name] = {}) + : (global[name] || {})[PROTOTYPE], + exports = IS_GLOBAL ? core : core[name] || (core[name] = {}), + expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {}), + key, + own, + out, + exp; + if (IS_GLOBAL) source = name; + for (key in source) { + // contains in native + own = !IS_FORCED && target && target[key] !== undefined; + // export native or passed + out = (own ? target : source)[key]; + // bind timers to global for call from export context + exp = + IS_BIND && own + ? ctx(out, global) + : IS_PROTO && typeof out == 'function' + ? ctx(Function.call, out) + : out; + // extend global + if (target) redefine(target, key, out, type & $export.U); + // export + if (exports[key] != out) hide(exports, key, exp); + if (IS_PROTO && expProto[key] != out) expProto[key] = out; + } + }; + global.core = core; + // type bitmap + $export.F = 1; // forced + $export.G = 2; // global + $export.S = 4; // static + $export.P = 8; // proto + $export.B = 16; // bind + $export.W = 32; // wrap + $export.U = 64; // safe + $export.R = 128; // real proto method for `library` + module.exports = $export; + + /***/ + }, + /* 1 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + module.exports = __webpack_require__(38); + + /***/ + }, + /* 2 */ + /***/ function (module, exports, __webpack_require__) { + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + + var factory = __webpack_require__(101); + + var REACT_ELEMENT_TYPE = + (typeof Symbol === 'function' && Symbol.for && Symbol.for('react.element')) || 0xeac7; + + function isValidElement(object) { + return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; + } + + module.exports = factory(isValidElement); + + /***/ + }, + /* 3 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + /** + * Use invariant() to assert state which your program assumes to be true. + * + * Provide sprintf-style format (only %s is supported) and arguments + * to provide information about what broke and what you were + * expecting. + * + * The invariant message will be stripped in production, but the invariant + * will remain to ensure logic does not differ in production. + */ + + var validateFormat = function validateFormat(format) {}; + + if (true) { + validateFormat = function validateFormat(format) { + if (format === undefined) { + throw new Error('invariant requires an error message argument'); + } + }; + } + + function invariant(condition, format, a, b, c, d, e, f) { + validateFormat(format); + + if (!condition) { + var error; + if (format === undefined) { + error = new Error( + 'Minified exception occurred; use the non-minified dev environment ' + + 'for the full error message and additional helpful warnings.', + ); + } else { + var args = [a, b, c, d, e, f]; + var argIndex = 0; + error = new Error( + format.replace(/%s/g, function () { + return args[argIndex++]; + }), + ); + error.name = 'Invariant Violation'; + } + + error.framesToPop = 1; // we don't care about invariant's own frame + throw error; + } + } + + module.exports = invariant; + + /***/ + }, + /* 4 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2014-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var emptyFunction = __webpack_require__(22); + + /** + * Similar to invariant but only logs a warning if the condition is not met. + * This can be used to log issues in development environments in critical + * paths. Removing the logging code for production environments will keep the + * same logic and follow the same code paths. + */ + + var warning = emptyFunction; + + if (true) { + (function () { + var printWarning = function printWarning(format) { + for ( + var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; + _key < _len; + _key++ + ) { + args[_key - 1] = arguments[_key]; + } + + var argIndex = 0; + var message = + 'Warning: ' + + format.replace(/%s/g, function () { + return args[argIndex++]; + }); + if (typeof console !== 'undefined') { + console.error(message); + } + try { + // --- Welcome to debugging React --- + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + throw new Error(message); + } catch (x) {} + }; + + warning = function warning(condition, format) { + if (format === undefined) { + throw new Error( + '`warning(condition, format, ...args)` requires a warning ' + 'message argument', + ); + } + + if (format.indexOf('Failed Composite propType: ') === 0) { + return; // Ignore CompositeComponent proptype check. + } + + if (!condition) { + for ( + var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; + _key2 < _len2; + _key2++ + ) { + args[_key2 - 2] = arguments[_key2]; + } + + printWarning.apply(undefined, [format].concat(args)); + } + }; + })(); + } + + module.exports = warning; + + /***/ + }, + /* 5 */ + /***/ function (module, exports, __webpack_require__) { + var isObject = __webpack_require__(11); + module.exports = function (it) { + if (!isObject(it)) throw TypeError(it + ' is not an object!'); + return it; + }; + + /***/ + }, + /* 6 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__components_Provider__ = __webpack_require__(824); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__components_connectAdvanced__ = + __webpack_require__(348); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__connect_connect__ = __webpack_require__(825); + /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, 'a', function () { + return __WEBPACK_IMPORTED_MODULE_0__components_Provider__['a']; + }); + /* unused harmony reexport connectAdvanced */ + /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, 'b', function () { + return __WEBPACK_IMPORTED_MODULE_2__connect_connect__['a']; + }); + + /***/ + }, + /* 7 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + /** + * WARNING: DO NOT manually require this module. + * This is a replacement for `invariant(...)` used by the error code system + * and will _only_ be required by the corresponding babel pass. + * It always throws. + */ + + function reactProdInvariant(code) { + var argCount = arguments.length - 1; + + var message = + 'Minified React error #' + + code + + '; visit ' + + 'http://facebook.github.io/react/docs/error-decoder.html?invariant=' + + code; + + for (var argIdx = 0; argIdx < argCount; argIdx++) { + message += '&args[]=' + encodeURIComponent(arguments[argIdx + 1]); + } + + message += + ' for the full message or use the non-minified dev environment' + + ' for full errors and additional helpful warnings.'; + + var error = new Error(message); + error.name = 'Invariant Violation'; + error.framesToPop = 1; // we don't care about reactProdInvariant's own frame + + throw error; + } + + module.exports = reactProdInvariant; + + /***/ + }, + /* 8 */ + /***/ function (module, exports) { + // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 + var global = (module.exports = + typeof window != 'undefined' && window.Math == Math + ? window + : typeof self != 'undefined' && self.Math == Math + ? self + : Function('return this')()); + if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef + + /***/ + }, + /* 9 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /* +object-assign +(c) Sindre Sorhus +@license MIT +*/ + + /* eslint-disable no-unused-vars */ + var getOwnPropertySymbols = Object.getOwnPropertySymbols; + var hasOwnProperty = Object.prototype.hasOwnProperty; + var propIsEnumerable = Object.prototype.propertyIsEnumerable; + + function toObject(val) { + if (val === null || val === undefined) { + throw new TypeError('Object.assign cannot be called with null or undefined'); + } + + return Object(val); + } + + function shouldUseNative() { + try { + if (!Object.assign) { + return false; + } + + // Detect buggy property enumeration order in older V8 versions. + + // https://bugs.chromium.org/p/v8/issues/detail?id=4118 + var test1 = new String('abc'); // eslint-disable-line no-new-wrappers + test1[5] = 'de'; + if (Object.getOwnPropertyNames(test1)[0] === '5') { + return false; + } + + // https://bugs.chromium.org/p/v8/issues/detail?id=3056 + var test2 = {}; + for (var i = 0; i < 10; i++) { + test2['_' + String.fromCharCode(i)] = i; + } + var order2 = Object.getOwnPropertyNames(test2).map(function (n) { + return test2[n]; + }); + if (order2.join('') !== '0123456789') { + return false; + } + + // https://bugs.chromium.org/p/v8/issues/detail?id=3056 + var test3 = {}; + 'abcdefghijklmnopqrst'.split('').forEach(function (letter) { + test3[letter] = letter; + }); + if (Object.keys(Object.assign({}, test3)).join('') !== 'abcdefghijklmnopqrst') { + return false; + } + + return true; + } catch (err) { + // We don't expect any of the above to throw, but better to be safe. + return false; + } + } + + module.exports = shouldUseNative() + ? Object.assign + : function (target, source) { + var from; + var to = toObject(target); + var symbols; + + for (var s = 1; s < arguments.length; s++) { + from = Object(arguments[s]); + + for (var key in from) { + if (hasOwnProperty.call(from, key)) { + to[key] = from[key]; + } + } + + if (getOwnPropertySymbols) { + symbols = getOwnPropertySymbols(from); + for (var i = 0; i < symbols.length; i++) { + if (propIsEnumerable.call(from, symbols[i])) { + to[symbols[i]] = from[symbols[i]]; + } + } + } + } + + return to; + }; + + /***/ + }, + /* 10 */ + /***/ function (module, exports) { + module.exports = function (exec) { + try { + return !!exec(); + } catch (e) { + return true; + } + }; + + /***/ + }, + /* 11 */ + /***/ function (module, exports) { + module.exports = function (it) { + return typeof it === 'object' ? it !== null : typeof it === 'function'; + }; + + /***/ + }, + /* 12 */ + /***/ function (module, exports, __webpack_require__) { + var store = __webpack_require__(144)('wks'), + uid = __webpack_require__(84), + Symbol = __webpack_require__(8).Symbol, + USE_SYMBOL = typeof Symbol == 'function'; + + var $exports = (module.exports = function (name) { + return ( + store[name] || + (store[name] = (USE_SYMBOL && Symbol[name]) || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)) + ); + }); + + $exports.store = store; + + /***/ + }, + /* 13 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Router__ = __webpack_require__(842); + /* unused harmony reexport Router */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Link__ = __webpack_require__(356); + /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, 'f', function () { + return __WEBPACK_IMPORTED_MODULE_1__Link__['a']; + }); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__IndexLink__ = __webpack_require__(838); + /* unused harmony reexport IndexLink */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__withRouter__ = __webpack_require__(853); + /* unused harmony reexport withRouter */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__IndexRedirect__ = __webpack_require__(839); + /* unused harmony reexport IndexRedirect */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__IndexRoute__ = __webpack_require__(840); + /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, 'e', function () { + return __WEBPACK_IMPORTED_MODULE_5__IndexRoute__['a']; + }); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__Redirect__ = __webpack_require__(358); + /* unused harmony reexport Redirect */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__Route__ = __webpack_require__(841); + /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, 'd', function () { + return __WEBPACK_IMPORTED_MODULE_7__Route__['a']; + }); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__RouteUtils__ = __webpack_require__(70); + /* unused harmony reexport createRoutes */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__RouterContext__ = __webpack_require__(224); + /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, 'c', function () { + return __WEBPACK_IMPORTED_MODULE_9__RouterContext__['a']; + }); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__PropTypes__ = __webpack_require__(223); + /* unused harmony reexport locationShape */ + /* unused harmony reexport routerShape */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__match__ = __webpack_require__(851); + /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, 'b', function () { + return __WEBPACK_IMPORTED_MODULE_11__match__['a']; + }); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__useRouterHistory__ = __webpack_require__(363); + /* unused harmony reexport useRouterHistory */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__PatternUtils__ = __webpack_require__(106); + /* unused harmony reexport formatPattern */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__applyRouterMiddleware__ = + __webpack_require__(844); + /* unused harmony reexport applyRouterMiddleware */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__browserHistory__ = __webpack_require__(845); + /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, 'a', function () { + return __WEBPACK_IMPORTED_MODULE_15__browserHistory__['a']; + }); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__hashHistory__ = __webpack_require__(849); + /* unused harmony reexport hashHistory */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__createMemoryHistory__ = __webpack_require__(360); + /* unused harmony reexport createMemoryHistory */ + /* components */ + + /* components (configuration) */ + + /* utils */ + + /* histories */ + + /***/ + }, + /* 14 */ + /***/ function (module, exports, __webpack_require__) { + // Thank's IE8 for his funny defineProperty + module.exports = !__webpack_require__(10)(function () { + return ( + Object.defineProperty({}, 'a', { + get: function () { + return 7; + }, + }).a != 7 + ); + }); + + /***/ + }, + /* 15 */ + /***/ function (module, exports, __webpack_require__) { + var anObject = __webpack_require__(5), + IE8_DOM_DEFINE = __webpack_require__(280), + toPrimitive = __webpack_require__(50), + dP = Object.defineProperty; + + exports.f = __webpack_require__(14) + ? Object.defineProperty + : function defineProperty(O, P, Attributes) { + anObject(O); + P = toPrimitive(P, true); + anObject(Attributes); + if (IE8_DOM_DEFINE) + try { + return dP(O, P, Attributes); + } catch (e) { + /* empty */ + } + if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!'); + if ('value' in Attributes) O[P] = Attributes.value; + return O; + }; + + /***/ + }, + /* 16 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var _prodInvariant = __webpack_require__(7); + + var DOMProperty = __webpack_require__(68); + var ReactDOMComponentFlags = __webpack_require__(317); + + var invariant = __webpack_require__(3); + + var ATTR_NAME = DOMProperty.ID_ATTRIBUTE_NAME; + var Flags = ReactDOMComponentFlags; + + var internalInstanceKey = '__reactInternalInstance$' + Math.random().toString(36).slice(2); + + /** + * Check if a given node should be cached. + */ + function shouldPrecacheNode(node, nodeID) { + return ( + (node.nodeType === 1 && node.getAttribute(ATTR_NAME) === String(nodeID)) || + (node.nodeType === 8 && node.nodeValue === ' react-text: ' + nodeID + ' ') || + (node.nodeType === 8 && node.nodeValue === ' react-empty: ' + nodeID + ' ') + ); + } + + /** + * Drill down (through composites and empty components) until we get a host or + * host text component. + * + * This is pretty polymorphic but unavoidable with the current structure we have + * for `_renderedChildren`. + */ + function getRenderedHostOrTextFromComponent(component) { + var rendered; + while ((rendered = component._renderedComponent)) { + component = rendered; + } + return component; + } + + /** + * Populate `_hostNode` on the rendered host/text component with the given + * DOM node. The passed `inst` can be a composite. + */ + function precacheNode(inst, node) { + var hostInst = getRenderedHostOrTextFromComponent(inst); + hostInst._hostNode = node; + node[internalInstanceKey] = hostInst; + } + + function uncacheNode(inst) { + var node = inst._hostNode; + if (node) { + delete node[internalInstanceKey]; + inst._hostNode = null; + } + } + + /** + * Populate `_hostNode` on each child of `inst`, assuming that the children + * match up with the DOM (element) children of `node`. + * + * We cache entire levels at once to avoid an n^2 problem where we access the + * children of a node sequentially and have to walk from the start to our target + * node every time. + * + * Since we update `_renderedChildren` and the actual DOM at (slightly) + * different times, we could race here and see a newer `_renderedChildren` than + * the DOM nodes we see. To avoid this, ReactMultiChild calls + * `prepareToManageChildren` before we change `_renderedChildren`, at which + * time the container's child nodes are always cached (until it unmounts). + */ + function precacheChildNodes(inst, node) { + if (inst._flags & Flags.hasCachedChildNodes) { + return; + } + var children = inst._renderedChildren; + var childNode = node.firstChild; + outer: for (var name in children) { + if (!children.hasOwnProperty(name)) { + continue; + } + var childInst = children[name]; + var childID = getRenderedHostOrTextFromComponent(childInst)._domID; + if (childID === 0) { + // We're currently unmounting this child in ReactMultiChild; skip it. + continue; + } + // We assume the child nodes are in the same order as the child instances. + for (; childNode !== null; childNode = childNode.nextSibling) { + if (shouldPrecacheNode(childNode, childID)) { + precacheNode(childInst, childNode); + continue outer; + } + } + // We reached the end of the DOM children without finding an ID match. + true + ? true + ? invariant(false, 'Unable to find element with ID %s.', childID) + : _prodInvariant('32', childID) + : void 0; + } + inst._flags |= Flags.hasCachedChildNodes; + } + + /** + * Given a DOM node, return the closest ReactDOMComponent or + * ReactDOMTextComponent instance ancestor. + */ + function getClosestInstanceFromNode(node) { + if (node[internalInstanceKey]) { + return node[internalInstanceKey]; + } + + // Walk up the tree until we find an ancestor whose instance we have cached. + var parents = []; + while (!node[internalInstanceKey]) { + parents.push(node); + if (node.parentNode) { + node = node.parentNode; + } else { + // Top of the tree. This node must not be part of a React tree (or is + // unmounted, potentially). + return null; + } + } + + var closest; + var inst; + for (; node && (inst = node[internalInstanceKey]); node = parents.pop()) { + closest = inst; + if (parents.length) { + precacheChildNodes(inst, node); + } + } + + return closest; + } + + /** + * Given a DOM node, return the ReactDOMComponent or ReactDOMTextComponent + * instance, or null if the node was not rendered by this React. + */ + function getInstanceFromNode(node) { + var inst = getClosestInstanceFromNode(node); + if (inst != null && inst._hostNode === node) { + return inst; + } else { + return null; + } + } + + /** + * Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding + * DOM node. + */ + function getNodeFromInstance(inst) { + // Without this first invariant, passing a non-DOM-component triggers the next + // invariant for a missing parent, which is super confusing. + !(inst._hostNode !== undefined) + ? true + ? invariant(false, 'getNodeFromInstance: Invalid argument.') + : _prodInvariant('33') + : void 0; + + if (inst._hostNode) { + return inst._hostNode; + } + + // Walk up the tree until we find an ancestor whose DOM node we have cached. + var parents = []; + while (!inst._hostNode) { + parents.push(inst); + !inst._hostParent + ? true + ? invariant(false, 'React DOM tree root should always have a node reference.') + : _prodInvariant('34') + : void 0; + inst = inst._hostParent; + } + + // Now parents contains each ancestor that does *not* have a cached native + // node, and `inst` is the deepest ancestor that does. + for (; parents.length; inst = parents.pop()) { + precacheChildNodes(inst, inst._hostNode); + } + + return inst._hostNode; + } + + var ReactDOMComponentTree = { + getClosestInstanceFromNode: getClosestInstanceFromNode, + getInstanceFromNode: getInstanceFromNode, + getNodeFromInstance: getNodeFromInstance, + precacheChildNodes: precacheChildNodes, + precacheNode: precacheNode, + uncacheNode: uncacheNode, + }; + + module.exports = ReactDOMComponentTree; + + /***/ + }, + /* 17 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement); + + /** + * Simple, lightweight module assisting with the detection and context of + * Worker. Helps avoid circular dependencies and allows code to reason about + * whether or not they are in a Worker, even if they never include the main + * `ReactWorker` dependency. + */ + var ExecutionEnvironment = { + canUseDOM: canUseDOM, + + canUseWorkers: typeof Worker !== 'undefined', + + canUseEventListeners: canUseDOM && !!(window.addEventListener || window.attachEvent), + + canUseViewport: canUseDOM && !!window.screen, + + isInWorker: !canUseDOM, // For now, this is true - might change in the future. + }; + + module.exports = ExecutionEnvironment; + + /***/ + }, + /* 18 */ + /***/ function (module, exports, __webpack_require__) { + /** + * Copyright (c) 2014-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + + (function (global, factory) { + true + ? (module.exports = factory()) + : typeof define === 'function' && define.amd + ? define(factory) + : (global.Immutable = factory()); + })(this, function () { + 'use strict'; + var SLICE$0 = Array.prototype.slice; + + function createClass(ctor, superClass) { + if (superClass) { + ctor.prototype = Object.create(superClass.prototype); + } + ctor.prototype.constructor = ctor; + } + + function Iterable(value) { + return isIterable(value) ? value : Seq(value); + } + + createClass(KeyedIterable, Iterable); + function KeyedIterable(value) { + return isKeyed(value) ? value : KeyedSeq(value); + } + + createClass(IndexedIterable, Iterable); + function IndexedIterable(value) { + return isIndexed(value) ? value : IndexedSeq(value); + } + + createClass(SetIterable, Iterable); + function SetIterable(value) { + return isIterable(value) && !isAssociative(value) ? value : SetSeq(value); + } + + function isIterable(maybeIterable) { + return !!(maybeIterable && maybeIterable[IS_ITERABLE_SENTINEL]); + } + + function isKeyed(maybeKeyed) { + return !!(maybeKeyed && maybeKeyed[IS_KEYED_SENTINEL]); + } + + function isIndexed(maybeIndexed) { + return !!(maybeIndexed && maybeIndexed[IS_INDEXED_SENTINEL]); + } + + function isAssociative(maybeAssociative) { + return isKeyed(maybeAssociative) || isIndexed(maybeAssociative); + } + + function isOrdered(maybeOrdered) { + return !!(maybeOrdered && maybeOrdered[IS_ORDERED_SENTINEL]); + } + + Iterable.isIterable = isIterable; + Iterable.isKeyed = isKeyed; + Iterable.isIndexed = isIndexed; + Iterable.isAssociative = isAssociative; + Iterable.isOrdered = isOrdered; + + Iterable.Keyed = KeyedIterable; + Iterable.Indexed = IndexedIterable; + Iterable.Set = SetIterable; + + var IS_ITERABLE_SENTINEL = '@@__IMMUTABLE_ITERABLE__@@'; + var IS_KEYED_SENTINEL = '@@__IMMUTABLE_KEYED__@@'; + var IS_INDEXED_SENTINEL = '@@__IMMUTABLE_INDEXED__@@'; + var IS_ORDERED_SENTINEL = '@@__IMMUTABLE_ORDERED__@@'; + + // Used for setting prototype methods that IE8 chokes on. + var DELETE = 'delete'; + + // Constants describing the size of trie nodes. + var SHIFT = 5; // Resulted in best performance after ______? + var SIZE = 1 << SHIFT; + var MASK = SIZE - 1; + + // A consistent shared value representing "not set" which equals nothing other + // than itself, and nothing that could be provided externally. + var NOT_SET = {}; + + // Boolean references, Rough equivalent of `bool &`. + var CHANGE_LENGTH = { value: false }; + var DID_ALTER = { value: false }; + + function MakeRef(ref) { + ref.value = false; + return ref; + } + + function SetRef(ref) { + ref && (ref.value = true); + } + + // A function which returns a value representing an "owner" for transient writes + // to tries. The return value will only ever equal itself, and will not equal + // the return of any subsequent call of this function. + function OwnerID() {} + + // http://jsperf.com/copy-array-inline + function arrCopy(arr, offset) { + offset = offset || 0; + var len = Math.max(0, arr.length - offset); + var newArr = new Array(len); + for (var ii = 0; ii < len; ii++) { + newArr[ii] = arr[ii + offset]; + } + return newArr; + } + + function ensureSize(iter) { + if (iter.size === undefined) { + iter.size = iter.__iterate(returnTrue); + } + return iter.size; + } + + function wrapIndex(iter, index) { + // This implements "is array index" which the ECMAString spec defines as: + // + // A String property name P is an array index if and only if + // ToString(ToUint32(P)) is equal to P and ToUint32(P) is not equal + // to 2^32−1. + // + // http://www.ecma-international.org/ecma-262/6.0/#sec-array-exotic-objects + if (typeof index !== 'number') { + var uint32Index = index >>> 0; // N >>> 0 is shorthand for ToUint32 + if ('' + uint32Index !== index || uint32Index === 4294967295) { + return NaN; + } + index = uint32Index; + } + return index < 0 ? ensureSize(iter) + index : index; + } + + function returnTrue() { + return true; + } + + function wholeSlice(begin, end, size) { + return ( + (begin === 0 || (size !== undefined && begin <= -size)) && + (end === undefined || (size !== undefined && end >= size)) + ); + } + + function resolveBegin(begin, size) { + return resolveIndex(begin, size, 0); + } + + function resolveEnd(end, size) { + return resolveIndex(end, size, size); + } + + function resolveIndex(index, size, defaultIndex) { + return index === undefined + ? defaultIndex + : index < 0 + ? Math.max(0, size + index) + : size === undefined + ? index + : Math.min(size, index); + } + + /* global Symbol */ + + var ITERATE_KEYS = 0; + var ITERATE_VALUES = 1; + var ITERATE_ENTRIES = 2; + + var REAL_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; + var FAUX_ITERATOR_SYMBOL = '@@iterator'; + + var ITERATOR_SYMBOL = REAL_ITERATOR_SYMBOL || FAUX_ITERATOR_SYMBOL; + + function Iterator(next) { + this.next = next; + } + + Iterator.prototype.toString = function () { + return '[Iterator]'; + }; + + Iterator.KEYS = ITERATE_KEYS; + Iterator.VALUES = ITERATE_VALUES; + Iterator.ENTRIES = ITERATE_ENTRIES; + + Iterator.prototype.inspect = Iterator.prototype.toSource = function () { + return this.toString(); + }; + Iterator.prototype[ITERATOR_SYMBOL] = function () { + return this; + }; + + function iteratorValue(type, k, v, iteratorResult) { + var value = type === 0 ? k : type === 1 ? v : [k, v]; + iteratorResult + ? (iteratorResult.value = value) + : (iteratorResult = { + value: value, + done: false, + }); + return iteratorResult; + } + + function iteratorDone() { + return { value: undefined, done: true }; + } + + function hasIterator(maybeIterable) { + return !!getIteratorFn(maybeIterable); + } + + function isIterator(maybeIterator) { + return maybeIterator && typeof maybeIterator.next === 'function'; + } + + function getIterator(iterable) { + var iteratorFn = getIteratorFn(iterable); + return iteratorFn && iteratorFn.call(iterable); + } + + function getIteratorFn(iterable) { + var iteratorFn = + iterable && + ((REAL_ITERATOR_SYMBOL && iterable[REAL_ITERATOR_SYMBOL]) || iterable[FAUX_ITERATOR_SYMBOL]); + if (typeof iteratorFn === 'function') { + return iteratorFn; + } + } + + function isArrayLike(value) { + return value && typeof value.length === 'number'; + } + + createClass(Seq, Iterable); + function Seq(value) { + return value === null || value === undefined + ? emptySequence() + : isIterable(value) + ? value.toSeq() + : seqFromValue(value); + } + + Seq.of = function (/*...values*/) { + return Seq(arguments); + }; + + Seq.prototype.toSeq = function () { + return this; + }; + + Seq.prototype.toString = function () { + return this.__toString('Seq {', '}'); + }; + + Seq.prototype.cacheResult = function () { + if (!this._cache && this.__iterateUncached) { + this._cache = this.entrySeq().toArray(); + this.size = this._cache.length; + } + return this; + }; + + // abstract __iterateUncached(fn, reverse) + + Seq.prototype.__iterate = function (fn, reverse) { + return seqIterate(this, fn, reverse, true); + }; + + // abstract __iteratorUncached(type, reverse) + + Seq.prototype.__iterator = function (type, reverse) { + return seqIterator(this, type, reverse, true); + }; + + createClass(KeyedSeq, Seq); + function KeyedSeq(value) { + return value === null || value === undefined + ? emptySequence().toKeyedSeq() + : isIterable(value) + ? isKeyed(value) + ? value.toSeq() + : value.fromEntrySeq() + : keyedSeqFromValue(value); + } + + KeyedSeq.prototype.toKeyedSeq = function () { + return this; + }; + + createClass(IndexedSeq, Seq); + function IndexedSeq(value) { + return value === null || value === undefined + ? emptySequence() + : !isIterable(value) + ? indexedSeqFromValue(value) + : isKeyed(value) + ? value.entrySeq() + : value.toIndexedSeq(); + } + + IndexedSeq.of = function (/*...values*/) { + return IndexedSeq(arguments); + }; + + IndexedSeq.prototype.toIndexedSeq = function () { + return this; + }; + + IndexedSeq.prototype.toString = function () { + return this.__toString('Seq [', ']'); + }; + + IndexedSeq.prototype.__iterate = function (fn, reverse) { + return seqIterate(this, fn, reverse, false); + }; + + IndexedSeq.prototype.__iterator = function (type, reverse) { + return seqIterator(this, type, reverse, false); + }; + + createClass(SetSeq, Seq); + function SetSeq(value) { + return ( + value === null || value === undefined + ? emptySequence() + : !isIterable(value) + ? indexedSeqFromValue(value) + : isKeyed(value) + ? value.entrySeq() + : value + ).toSetSeq(); + } + + SetSeq.of = function (/*...values*/) { + return SetSeq(arguments); + }; + + SetSeq.prototype.toSetSeq = function () { + return this; + }; + + Seq.isSeq = isSeq; + Seq.Keyed = KeyedSeq; + Seq.Set = SetSeq; + Seq.Indexed = IndexedSeq; + + var IS_SEQ_SENTINEL = '@@__IMMUTABLE_SEQ__@@'; + + Seq.prototype[IS_SEQ_SENTINEL] = true; + + createClass(ArraySeq, IndexedSeq); + function ArraySeq(array) { + this._array = array; + this.size = array.length; + } + + ArraySeq.prototype.get = function (index, notSetValue) { + return this.has(index) ? this._array[wrapIndex(this, index)] : notSetValue; + }; + + ArraySeq.prototype.__iterate = function (fn, reverse) { + var array = this._array; + var maxIndex = array.length - 1; + for (var ii = 0; ii <= maxIndex; ii++) { + if (fn(array[reverse ? maxIndex - ii : ii], ii, this) === false) { + return ii + 1; + } + } + return ii; + }; + + ArraySeq.prototype.__iterator = function (type, reverse) { + var array = this._array; + var maxIndex = array.length - 1; + var ii = 0; + return new Iterator(function () { + return ii > maxIndex + ? iteratorDone() + : iteratorValue(type, ii, array[reverse ? maxIndex - ii++ : ii++]); + }); + }; + + createClass(ObjectSeq, KeyedSeq); + function ObjectSeq(object) { + var keys = Object.keys(object); + this._object = object; + this._keys = keys; + this.size = keys.length; + } + + ObjectSeq.prototype.get = function (key, notSetValue) { + if (notSetValue !== undefined && !this.has(key)) { + return notSetValue; + } + return this._object[key]; + }; + + ObjectSeq.prototype.has = function (key) { + return this._object.hasOwnProperty(key); + }; + + ObjectSeq.prototype.__iterate = function (fn, reverse) { + var object = this._object; + var keys = this._keys; + var maxIndex = keys.length - 1; + for (var ii = 0; ii <= maxIndex; ii++) { + var key = keys[reverse ? maxIndex - ii : ii]; + if (fn(object[key], key, this) === false) { + return ii + 1; + } + } + return ii; + }; + + ObjectSeq.prototype.__iterator = function (type, reverse) { + var object = this._object; + var keys = this._keys; + var maxIndex = keys.length - 1; + var ii = 0; + return new Iterator(function () { + var key = keys[reverse ? maxIndex - ii : ii]; + return ii++ > maxIndex ? iteratorDone() : iteratorValue(type, key, object[key]); + }); + }; + + ObjectSeq.prototype[IS_ORDERED_SENTINEL] = true; + + createClass(IterableSeq, IndexedSeq); + function IterableSeq(iterable) { + this._iterable = iterable; + this.size = iterable.length || iterable.size; + } + + IterableSeq.prototype.__iterateUncached = function (fn, reverse) { + if (reverse) { + return this.cacheResult().__iterate(fn, reverse); + } + var iterable = this._iterable; + var iterator = getIterator(iterable); + var iterations = 0; + if (isIterator(iterator)) { + var step; + while (!(step = iterator.next()).done) { + if (fn(step.value, iterations++, this) === false) { + break; + } + } + } + return iterations; + }; + + IterableSeq.prototype.__iteratorUncached = function (type, reverse) { + if (reverse) { + return this.cacheResult().__iterator(type, reverse); + } + var iterable = this._iterable; + var iterator = getIterator(iterable); + if (!isIterator(iterator)) { + return new Iterator(iteratorDone); + } + var iterations = 0; + return new Iterator(function () { + var step = iterator.next(); + return step.done ? step : iteratorValue(type, iterations++, step.value); + }); + }; + + createClass(IteratorSeq, IndexedSeq); + function IteratorSeq(iterator) { + this._iterator = iterator; + this._iteratorCache = []; + } + + IteratorSeq.prototype.__iterateUncached = function (fn, reverse) { + if (reverse) { + return this.cacheResult().__iterate(fn, reverse); + } + var iterator = this._iterator; + var cache = this._iteratorCache; + var iterations = 0; + while (iterations < cache.length) { + if (fn(cache[iterations], iterations++, this) === false) { + return iterations; + } + } + var step; + while (!(step = iterator.next()).done) { + var val = step.value; + cache[iterations] = val; + if (fn(val, iterations++, this) === false) { + break; + } + } + return iterations; + }; + + IteratorSeq.prototype.__iteratorUncached = function (type, reverse) { + if (reverse) { + return this.cacheResult().__iterator(type, reverse); + } + var iterator = this._iterator; + var cache = this._iteratorCache; + var iterations = 0; + return new Iterator(function () { + if (iterations >= cache.length) { + var step = iterator.next(); + if (step.done) { + return step; + } + cache[iterations] = step.value; + } + return iteratorValue(type, iterations, cache[iterations++]); + }); + }; + + // # pragma Helper functions + + function isSeq(maybeSeq) { + return !!(maybeSeq && maybeSeq[IS_SEQ_SENTINEL]); + } + + var EMPTY_SEQ; + + function emptySequence() { + return EMPTY_SEQ || (EMPTY_SEQ = new ArraySeq([])); + } + + function keyedSeqFromValue(value) { + var seq = Array.isArray(value) + ? new ArraySeq(value).fromEntrySeq() + : isIterator(value) + ? new IteratorSeq(value).fromEntrySeq() + : hasIterator(value) + ? new IterableSeq(value).fromEntrySeq() + : typeof value === 'object' + ? new ObjectSeq(value) + : undefined; + if (!seq) { + throw new TypeError( + 'Expected Array or iterable object of [k, v] entries, ' + 'or keyed object: ' + value, + ); + } + return seq; + } + + function indexedSeqFromValue(value) { + var seq = maybeIndexedSeqFromValue(value); + if (!seq) { + throw new TypeError('Expected Array or iterable object of values: ' + value); + } + return seq; + } + + function seqFromValue(value) { + var seq = maybeIndexedSeqFromValue(value) || (typeof value === 'object' && new ObjectSeq(value)); + if (!seq) { + throw new TypeError('Expected Array or iterable object of values, or keyed object: ' + value); + } + return seq; + } + + function maybeIndexedSeqFromValue(value) { + return isArrayLike(value) + ? new ArraySeq(value) + : isIterator(value) + ? new IteratorSeq(value) + : hasIterator(value) + ? new IterableSeq(value) + : undefined; + } + + function seqIterate(seq, fn, reverse, useKeys) { + var cache = seq._cache; + if (cache) { + var maxIndex = cache.length - 1; + for (var ii = 0; ii <= maxIndex; ii++) { + var entry = cache[reverse ? maxIndex - ii : ii]; + if (fn(entry[1], useKeys ? entry[0] : ii, seq) === false) { + return ii + 1; + } + } + return ii; + } + return seq.__iterateUncached(fn, reverse); + } + + function seqIterator(seq, type, reverse, useKeys) { + var cache = seq._cache; + if (cache) { + var maxIndex = cache.length - 1; + var ii = 0; + return new Iterator(function () { + var entry = cache[reverse ? maxIndex - ii : ii]; + return ii++ > maxIndex + ? iteratorDone() + : iteratorValue(type, useKeys ? entry[0] : ii - 1, entry[1]); + }); + } + return seq.__iteratorUncached(type, reverse); + } + + function fromJS(json, converter) { + return converter ? fromJSWith(converter, json, '', { '': json }) : fromJSDefault(json); + } + + function fromJSWith(converter, json, key, parentJSON) { + if (Array.isArray(json)) { + return converter.call( + parentJSON, + key, + IndexedSeq(json).map(function (v, k) { + return fromJSWith(converter, v, k, json); + }), + ); + } + if (isPlainObj(json)) { + return converter.call( + parentJSON, + key, + KeyedSeq(json).map(function (v, k) { + return fromJSWith(converter, v, k, json); + }), + ); + } + return json; + } + + function fromJSDefault(json) { + if (Array.isArray(json)) { + return IndexedSeq(json).map(fromJSDefault).toList(); + } + if (isPlainObj(json)) { + return KeyedSeq(json).map(fromJSDefault).toMap(); + } + return json; + } + + function isPlainObj(value) { + return value && (value.constructor === Object || value.constructor === undefined); + } + + /** + * An extension of the "same-value" algorithm as [described for use by ES6 Map + * and Set](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map#Key_equality) + * + * NaN is considered the same as NaN, however -0 and 0 are considered the same + * value, which is different from the algorithm described by + * [`Object.is`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is). + * + * This is extended further to allow Objects to describe the values they + * represent, by way of `valueOf` or `equals` (and `hashCode`). + * + * Note: because of this extension, the key equality of Immutable.Map and the + * value equality of Immutable.Set will differ from ES6 Map and Set. + * + * ### Defining custom values + * + * The easiest way to describe the value an object represents is by implementing + * `valueOf`. For example, `Date` represents a value by returning a unix + * timestamp for `valueOf`: + * + * var date1 = new Date(1234567890000); // Fri Feb 13 2009 ... + * var date2 = new Date(1234567890000); + * date1.valueOf(); // 1234567890000 + * assert( date1 !== date2 ); + * assert( Immutable.is( date1, date2 ) ); + * + * Note: overriding `valueOf` may have other implications if you use this object + * where JavaScript expects a primitive, such as implicit string coercion. + * + * For more complex types, especially collections, implementing `valueOf` may + * not be performant. An alternative is to implement `equals` and `hashCode`. + * + * `equals` takes another object, presumably of similar type, and returns true + * if the it is equal. Equality is symmetrical, so the same result should be + * returned if this and the argument are flipped. + * + * assert( a.equals(b) === b.equals(a) ); + * + * `hashCode` returns a 32bit integer number representing the object which will + * be used to determine how to store the value object in a Map or Set. You must + * provide both or neither methods, one must not exist without the other. + * + * Also, an important relationship between these methods must be upheld: if two + * values are equal, they *must* return the same hashCode. If the values are not + * equal, they might have the same hashCode; this is called a hash collision, + * and while undesirable for performance reasons, it is acceptable. + * + * if (a.equals(b)) { + * assert( a.hashCode() === b.hashCode() ); + * } + * + * All Immutable collections implement `equals` and `hashCode`. + * + */ + function is(valueA, valueB) { + if (valueA === valueB || (valueA !== valueA && valueB !== valueB)) { + return true; + } + if (!valueA || !valueB) { + return false; + } + if (typeof valueA.valueOf === 'function' && typeof valueB.valueOf === 'function') { + valueA = valueA.valueOf(); + valueB = valueB.valueOf(); + if (valueA === valueB || (valueA !== valueA && valueB !== valueB)) { + return true; + } + if (!valueA || !valueB) { + return false; + } + } + if ( + typeof valueA.equals === 'function' && + typeof valueB.equals === 'function' && + valueA.equals(valueB) + ) { + return true; + } + return false; + } + + function deepEqual(a, b) { + if (a === b) { + return true; + } + + if ( + !isIterable(b) || + (a.size !== undefined && b.size !== undefined && a.size !== b.size) || + (a.__hash !== undefined && b.__hash !== undefined && a.__hash !== b.__hash) || + isKeyed(a) !== isKeyed(b) || + isIndexed(a) !== isIndexed(b) || + isOrdered(a) !== isOrdered(b) + ) { + return false; + } + + if (a.size === 0 && b.size === 0) { + return true; + } + + var notAssociative = !isAssociative(a); + + if (isOrdered(a)) { + var entries = a.entries(); + return ( + b.every(function (v, k) { + var entry = entries.next().value; + return entry && is(entry[1], v) && (notAssociative || is(entry[0], k)); + }) && entries.next().done + ); + } + + var flipped = false; + + if (a.size === undefined) { + if (b.size === undefined) { + if (typeof a.cacheResult === 'function') { + a.cacheResult(); + } + } else { + flipped = true; + var _ = a; + a = b; + b = _; + } + } + + var allEqual = true; + var bSize = b.__iterate(function (v, k) { + if ( + notAssociative ? !a.has(v) : flipped ? !is(v, a.get(k, NOT_SET)) : !is(a.get(k, NOT_SET), v) + ) { + allEqual = false; + return false; + } + }); + + return allEqual && a.size === bSize; + } + + createClass(Repeat, IndexedSeq); + + function Repeat(value, times) { + if (!(this instanceof Repeat)) { + return new Repeat(value, times); + } + this._value = value; + this.size = times === undefined ? Infinity : Math.max(0, times); + if (this.size === 0) { + if (EMPTY_REPEAT) { + return EMPTY_REPEAT; + } + EMPTY_REPEAT = this; + } + } + + Repeat.prototype.toString = function () { + if (this.size === 0) { + return 'Repeat []'; + } + return 'Repeat [ ' + this._value + ' ' + this.size + ' times ]'; + }; + + Repeat.prototype.get = function (index, notSetValue) { + return this.has(index) ? this._value : notSetValue; + }; + + Repeat.prototype.includes = function (searchValue) { + return is(this._value, searchValue); + }; + + Repeat.prototype.slice = function (begin, end) { + var size = this.size; + return wholeSlice(begin, end, size) + ? this + : new Repeat(this._value, resolveEnd(end, size) - resolveBegin(begin, size)); + }; + + Repeat.prototype.reverse = function () { + return this; + }; + + Repeat.prototype.indexOf = function (searchValue) { + if (is(this._value, searchValue)) { + return 0; + } + return -1; + }; + + Repeat.prototype.lastIndexOf = function (searchValue) { + if (is(this._value, searchValue)) { + return this.size; + } + return -1; + }; + + Repeat.prototype.__iterate = function (fn, reverse) { + for (var ii = 0; ii < this.size; ii++) { + if (fn(this._value, ii, this) === false) { + return ii + 1; + } + } + return ii; + }; + + Repeat.prototype.__iterator = function (type, reverse) { + var this$0 = this; + var ii = 0; + return new Iterator(function () { + return ii < this$0.size ? iteratorValue(type, ii++, this$0._value) : iteratorDone(); + }); + }; + + Repeat.prototype.equals = function (other) { + return other instanceof Repeat ? is(this._value, other._value) : deepEqual(other); + }; + + var EMPTY_REPEAT; + + function invariant(condition, error) { + if (!condition) throw new Error(error); + } + + createClass(Range, IndexedSeq); + + function Range(start, end, step) { + if (!(this instanceof Range)) { + return new Range(start, end, step); + } + invariant(step !== 0, 'Cannot step a Range by 0'); + start = start || 0; + if (end === undefined) { + end = Infinity; + } + step = step === undefined ? 1 : Math.abs(step); + if (end < start) { + step = -step; + } + this._start = start; + this._end = end; + this._step = step; + this.size = Math.max(0, Math.ceil((end - start) / step - 1) + 1); + if (this.size === 0) { + if (EMPTY_RANGE) { + return EMPTY_RANGE; + } + EMPTY_RANGE = this; + } + } + + Range.prototype.toString = function () { + if (this.size === 0) { + return 'Range []'; + } + return ( + 'Range [ ' + + this._start + + '...' + + this._end + + (this._step !== 1 ? ' by ' + this._step : '') + + ' ]' + ); + }; + + Range.prototype.get = function (index, notSetValue) { + return this.has(index) ? this._start + wrapIndex(this, index) * this._step : notSetValue; + }; + + Range.prototype.includes = function (searchValue) { + var possibleIndex = (searchValue - this._start) / this._step; + return ( + possibleIndex >= 0 && possibleIndex < this.size && possibleIndex === Math.floor(possibleIndex) + ); + }; + + Range.prototype.slice = function (begin, end) { + if (wholeSlice(begin, end, this.size)) { + return this; + } + begin = resolveBegin(begin, this.size); + end = resolveEnd(end, this.size); + if (end <= begin) { + return new Range(0, 0); + } + return new Range(this.get(begin, this._end), this.get(end, this._end), this._step); + }; + + Range.prototype.indexOf = function (searchValue) { + var offsetValue = searchValue - this._start; + if (offsetValue % this._step === 0) { + var index = offsetValue / this._step; + if (index >= 0 && index < this.size) { + return index; + } + } + return -1; + }; + + Range.prototype.lastIndexOf = function (searchValue) { + return this.indexOf(searchValue); + }; + + Range.prototype.__iterate = function (fn, reverse) { + var maxIndex = this.size - 1; + var step = this._step; + var value = reverse ? this._start + maxIndex * step : this._start; + for (var ii = 0; ii <= maxIndex; ii++) { + if (fn(value, ii, this) === false) { + return ii + 1; + } + value += reverse ? -step : step; + } + return ii; + }; + + Range.prototype.__iterator = function (type, reverse) { + var maxIndex = this.size - 1; + var step = this._step; + var value = reverse ? this._start + maxIndex * step : this._start; + var ii = 0; + return new Iterator(function () { + var v = value; + value += reverse ? -step : step; + return ii > maxIndex ? iteratorDone() : iteratorValue(type, ii++, v); + }); + }; + + Range.prototype.equals = function (other) { + return other instanceof Range + ? this._start === other._start && this._end === other._end && this._step === other._step + : deepEqual(this, other); + }; + + var EMPTY_RANGE; + + createClass(Collection, Iterable); + function Collection() { + throw TypeError('Abstract'); + } + + createClass(KeyedCollection, Collection); + function KeyedCollection() {} + + createClass(IndexedCollection, Collection); + function IndexedCollection() {} + + createClass(SetCollection, Collection); + function SetCollection() {} + + Collection.Keyed = KeyedCollection; + Collection.Indexed = IndexedCollection; + Collection.Set = SetCollection; + + var imul = + typeof Math.imul === 'function' && Math.imul(0xffffffff, 2) === -2 + ? Math.imul + : function imul(a, b) { + a = a | 0; // int + b = b | 0; // int + var c = a & 0xffff; + var d = b & 0xffff; + // Shift by 0 fixes the sign on the high part. + return (c * d + ((((a >>> 16) * d + c * (b >>> 16)) << 16) >>> 0)) | 0; // int + }; + + // v8 has an optimization for storing 31-bit signed numbers. + // Values which have either 00 or 11 as the high order bits qualify. + // This function drops the highest order bit in a signed number, maintaining + // the sign bit. + function smi(i32) { + return ((i32 >>> 1) & 0x40000000) | (i32 & 0xbfffffff); + } + + function hash(o) { + if (o === false || o === null || o === undefined) { + return 0; + } + if (typeof o.valueOf === 'function') { + o = o.valueOf(); + if (o === false || o === null || o === undefined) { + return 0; + } + } + if (o === true) { + return 1; + } + var type = typeof o; + if (type === 'number') { + if (o !== o || o === Infinity) { + return 0; + } + var h = o | 0; + if (h !== o) { + h ^= o * 0xffffffff; + } + while (o > 0xffffffff) { + o /= 0xffffffff; + h ^= o; + } + return smi(h); + } + if (type === 'string') { + return o.length > STRING_HASH_CACHE_MIN_STRLEN ? cachedHashString(o) : hashString(o); + } + if (typeof o.hashCode === 'function') { + return o.hashCode(); + } + if (type === 'object') { + return hashJSObj(o); + } + if (typeof o.toString === 'function') { + return hashString(o.toString()); + } + throw new Error('Value type ' + type + ' cannot be hashed.'); + } + + function cachedHashString(string) { + var hash = stringHashCache[string]; + if (hash === undefined) { + hash = hashString(string); + if (STRING_HASH_CACHE_SIZE === STRING_HASH_CACHE_MAX_SIZE) { + STRING_HASH_CACHE_SIZE = 0; + stringHashCache = {}; + } + STRING_HASH_CACHE_SIZE++; + stringHashCache[string] = hash; + } + return hash; + } + + // http://jsperf.com/hashing-strings + function hashString(string) { + // This is the hash from JVM + // The hash code for a string is computed as + // s[0] * 31 ^ (n - 1) + s[1] * 31 ^ (n - 2) + ... + s[n - 1], + // where s[i] is the ith character of the string and n is the length of + // the string. We "mod" the result to make it between 0 (inclusive) and 2^31 + // (exclusive) by dropping high bits. + var hash = 0; + for (var ii = 0; ii < string.length; ii++) { + hash = (31 * hash + string.charCodeAt(ii)) | 0; + } + return smi(hash); + } + + function hashJSObj(obj) { + var hash; + if (usingWeakMap) { + hash = weakMap.get(obj); + if (hash !== undefined) { + return hash; + } + } + + hash = obj[UID_HASH_KEY]; + if (hash !== undefined) { + return hash; + } + + if (!canDefineProperty) { + hash = obj.propertyIsEnumerable && obj.propertyIsEnumerable[UID_HASH_KEY]; + if (hash !== undefined) { + return hash; + } + + hash = getIENodeHash(obj); + if (hash !== undefined) { + return hash; + } + } + + hash = ++objHashUID; + if (objHashUID & 0x40000000) { + objHashUID = 0; + } + + if (usingWeakMap) { + weakMap.set(obj, hash); + } else if (isExtensible !== undefined && isExtensible(obj) === false) { + throw new Error('Non-extensible objects are not allowed as keys.'); + } else if (canDefineProperty) { + Object.defineProperty(obj, UID_HASH_KEY, { + enumerable: false, + configurable: false, + writable: false, + value: hash, + }); + } else if ( + obj.propertyIsEnumerable !== undefined && + obj.propertyIsEnumerable === obj.constructor.prototype.propertyIsEnumerable + ) { + // Since we can't define a non-enumerable property on the object + // we'll hijack one of the less-used non-enumerable properties to + // save our hash on it. Since this is a function it will not show up in + // `JSON.stringify` which is what we want. + obj.propertyIsEnumerable = function () { + return this.constructor.prototype.propertyIsEnumerable.apply(this, arguments); + }; + obj.propertyIsEnumerable[UID_HASH_KEY] = hash; + } else if (obj.nodeType !== undefined) { + // At this point we couldn't get the IE `uniqueID` to use as a hash + // and we couldn't use a non-enumerable property to exploit the + // dontEnum bug so we simply add the `UID_HASH_KEY` on the node + // itself. + obj[UID_HASH_KEY] = hash; + } else { + throw new Error('Unable to set a non-enumerable property on object.'); + } + + return hash; + } + + // Get references to ES5 object methods. + var isExtensible = Object.isExtensible; + + // True if Object.defineProperty works as expected. IE8 fails this test. + var canDefineProperty = (function () { + try { + Object.defineProperty({}, '@', {}); + return true; + } catch (e) { + return false; + } + })(); + + // IE has a `uniqueID` property on DOM nodes. We can construct the hash from it + // and avoid memory leaks from the IE cloneNode bug. + function getIENodeHash(node) { + if (node && node.nodeType > 0) { + switch (node.nodeType) { + case 1: // Element + return node.uniqueID; + case 9: // Document + return node.documentElement && node.documentElement.uniqueID; + } + } + } + + // If possible, use a WeakMap. + var usingWeakMap = typeof WeakMap === 'function'; + var weakMap; + if (usingWeakMap) { + weakMap = new WeakMap(); + } + + var objHashUID = 0; + + var UID_HASH_KEY = '__immutablehash__'; + if (typeof Symbol === 'function') { + UID_HASH_KEY = Symbol(UID_HASH_KEY); + } + + var STRING_HASH_CACHE_MIN_STRLEN = 16; + var STRING_HASH_CACHE_MAX_SIZE = 255; + var STRING_HASH_CACHE_SIZE = 0; + var stringHashCache = {}; + + function assertNotInfinite(size) { + invariant(size !== Infinity, 'Cannot perform this action with an infinite size.'); + } + + createClass(Map, KeyedCollection); + + // @pragma Construction + + function Map(value) { + return value === null || value === undefined + ? emptyMap() + : isMap(value) && !isOrdered(value) + ? value + : emptyMap().withMutations(function (map) { + var iter = KeyedIterable(value); + assertNotInfinite(iter.size); + iter.forEach(function (v, k) { + return map.set(k, v); + }); + }); + } + + Map.of = function () { + var keyValues = SLICE$0.call(arguments, 0); + return emptyMap().withMutations(function (map) { + for (var i = 0; i < keyValues.length; i += 2) { + if (i + 1 >= keyValues.length) { + throw new Error('Missing value for key: ' + keyValues[i]); + } + map.set(keyValues[i], keyValues[i + 1]); + } + }); + }; + + Map.prototype.toString = function () { + return this.__toString('Map {', '}'); + }; + + // @pragma Access + + Map.prototype.get = function (k, notSetValue) { + return this._root ? this._root.get(0, undefined, k, notSetValue) : notSetValue; + }; + + // @pragma Modification + + Map.prototype.set = function (k, v) { + return updateMap(this, k, v); + }; + + Map.prototype.setIn = function (keyPath, v) { + return this.updateIn(keyPath, NOT_SET, function () { + return v; + }); + }; + + Map.prototype.remove = function (k) { + return updateMap(this, k, NOT_SET); + }; + + Map.prototype.deleteIn = function (keyPath) { + return this.updateIn(keyPath, function () { + return NOT_SET; + }); + }; + + Map.prototype.update = function (k, notSetValue, updater) { + return arguments.length === 1 ? k(this) : this.updateIn([k], notSetValue, updater); + }; + + Map.prototype.updateIn = function (keyPath, notSetValue, updater) { + if (!updater) { + updater = notSetValue; + notSetValue = undefined; + } + var updatedValue = updateInDeepMap(this, forceIterator(keyPath), notSetValue, updater); + return updatedValue === NOT_SET ? undefined : updatedValue; + }; + + Map.prototype.clear = function () { + if (this.size === 0) { + return this; + } + if (this.__ownerID) { + this.size = 0; + this._root = null; + this.__hash = undefined; + this.__altered = true; + return this; + } + return emptyMap(); + }; + + // @pragma Composition + + Map.prototype.merge = function (/*...iters*/) { + return mergeIntoMapWith(this, undefined, arguments); + }; + + Map.prototype.mergeWith = function (merger) { + var iters = SLICE$0.call(arguments, 1); + return mergeIntoMapWith(this, merger, iters); + }; + + Map.prototype.mergeIn = function (keyPath) { + var iters = SLICE$0.call(arguments, 1); + return this.updateIn(keyPath, emptyMap(), function (m) { + return typeof m.merge === 'function' ? m.merge.apply(m, iters) : iters[iters.length - 1]; + }); + }; + + Map.prototype.mergeDeep = function (/*...iters*/) { + return mergeIntoMapWith(this, deepMerger, arguments); + }; + + Map.prototype.mergeDeepWith = function (merger) { + var iters = SLICE$0.call(arguments, 1); + return mergeIntoMapWith(this, deepMergerWith(merger), iters); + }; + + Map.prototype.mergeDeepIn = function (keyPath) { + var iters = SLICE$0.call(arguments, 1); + return this.updateIn(keyPath, emptyMap(), function (m) { + return typeof m.mergeDeep === 'function' ? m.mergeDeep.apply(m, iters) : iters[iters.length - 1]; + }); + }; + + Map.prototype.sort = function (comparator) { + // Late binding + return OrderedMap(sortFactory(this, comparator)); + }; + + Map.prototype.sortBy = function (mapper, comparator) { + // Late binding + return OrderedMap(sortFactory(this, comparator, mapper)); + }; + + // @pragma Mutability + + Map.prototype.withMutations = function (fn) { + var mutable = this.asMutable(); + fn(mutable); + return mutable.wasAltered() ? mutable.__ensureOwner(this.__ownerID) : this; + }; + + Map.prototype.asMutable = function () { + return this.__ownerID ? this : this.__ensureOwner(new OwnerID()); + }; + + Map.prototype.asImmutable = function () { + return this.__ensureOwner(); + }; + + Map.prototype.wasAltered = function () { + return this.__altered; + }; + + Map.prototype.__iterator = function (type, reverse) { + return new MapIterator(this, type, reverse); + }; + + Map.prototype.__iterate = function (fn, reverse) { + var this$0 = this; + var iterations = 0; + this._root && + this._root.iterate(function (entry) { + iterations++; + return fn(entry[1], entry[0], this$0); + }, reverse); + return iterations; + }; + + Map.prototype.__ensureOwner = function (ownerID) { + if (ownerID === this.__ownerID) { + return this; + } + if (!ownerID) { + this.__ownerID = ownerID; + this.__altered = false; + return this; + } + return makeMap(this.size, this._root, ownerID, this.__hash); + }; + + function isMap(maybeMap) { + return !!(maybeMap && maybeMap[IS_MAP_SENTINEL]); + } + + Map.isMap = isMap; + + var IS_MAP_SENTINEL = '@@__IMMUTABLE_MAP__@@'; + + var MapPrototype = Map.prototype; + MapPrototype[IS_MAP_SENTINEL] = true; + MapPrototype[DELETE] = MapPrototype.remove; + MapPrototype.removeIn = MapPrototype.deleteIn; + + // #pragma Trie Nodes + + function ArrayMapNode(ownerID, entries) { + this.ownerID = ownerID; + this.entries = entries; + } + + ArrayMapNode.prototype.get = function (shift, keyHash, key, notSetValue) { + var entries = this.entries; + for (var ii = 0, len = entries.length; ii < len; ii++) { + if (is(key, entries[ii][0])) { + return entries[ii][1]; + } + } + return notSetValue; + }; + + ArrayMapNode.prototype.update = function ( + ownerID, + shift, + keyHash, + key, + value, + didChangeSize, + didAlter, + ) { + var removed = value === NOT_SET; + + var entries = this.entries; + var idx = 0; + for (var len = entries.length; idx < len; idx++) { + if (is(key, entries[idx][0])) { + break; + } + } + var exists = idx < len; + + if (exists ? entries[idx][1] === value : removed) { + return this; + } + + SetRef(didAlter); + (removed || !exists) && SetRef(didChangeSize); + + if (removed && entries.length === 1) { + return; // undefined + } + + if (!exists && !removed && entries.length >= MAX_ARRAY_MAP_SIZE) { + return createNodes(ownerID, entries, key, value); + } + + var isEditable = ownerID && ownerID === this.ownerID; + var newEntries = isEditable ? entries : arrCopy(entries); + + if (exists) { + if (removed) { + idx === len - 1 ? newEntries.pop() : (newEntries[idx] = newEntries.pop()); + } else { + newEntries[idx] = [key, value]; + } + } else { + newEntries.push([key, value]); + } + + if (isEditable) { + this.entries = newEntries; + return this; + } + + return new ArrayMapNode(ownerID, newEntries); + }; + + function BitmapIndexedNode(ownerID, bitmap, nodes) { + this.ownerID = ownerID; + this.bitmap = bitmap; + this.nodes = nodes; + } + + BitmapIndexedNode.prototype.get = function (shift, keyHash, key, notSetValue) { + if (keyHash === undefined) { + keyHash = hash(key); + } + var bit = 1 << ((shift === 0 ? keyHash : keyHash >>> shift) & MASK); + var bitmap = this.bitmap; + return (bitmap & bit) === 0 + ? notSetValue + : this.nodes[popCount(bitmap & (bit - 1))].get(shift + SHIFT, keyHash, key, notSetValue); + }; + + BitmapIndexedNode.prototype.update = function ( + ownerID, + shift, + keyHash, + key, + value, + didChangeSize, + didAlter, + ) { + if (keyHash === undefined) { + keyHash = hash(key); + } + var keyHashFrag = (shift === 0 ? keyHash : keyHash >>> shift) & MASK; + var bit = 1 << keyHashFrag; + var bitmap = this.bitmap; + var exists = (bitmap & bit) !== 0; + + if (!exists && value === NOT_SET) { + return this; + } + + var idx = popCount(bitmap & (bit - 1)); + var nodes = this.nodes; + var node = exists ? nodes[idx] : undefined; + var newNode = updateNode( + node, + ownerID, + shift + SHIFT, + keyHash, + key, + value, + didChangeSize, + didAlter, + ); + + if (newNode === node) { + return this; + } + + if (!exists && newNode && nodes.length >= MAX_BITMAP_INDEXED_SIZE) { + return expandNodes(ownerID, nodes, bitmap, keyHashFrag, newNode); + } + + if (exists && !newNode && nodes.length === 2 && isLeafNode(nodes[idx ^ 1])) { + return nodes[idx ^ 1]; + } + + if (exists && newNode && nodes.length === 1 && isLeafNode(newNode)) { + return newNode; + } + + var isEditable = ownerID && ownerID === this.ownerID; + var newBitmap = exists ? (newNode ? bitmap : bitmap ^ bit) : bitmap | bit; + var newNodes = exists + ? newNode + ? setIn(nodes, idx, newNode, isEditable) + : spliceOut(nodes, idx, isEditable) + : spliceIn(nodes, idx, newNode, isEditable); + + if (isEditable) { + this.bitmap = newBitmap; + this.nodes = newNodes; + return this; + } + + return new BitmapIndexedNode(ownerID, newBitmap, newNodes); + }; + + function HashArrayMapNode(ownerID, count, nodes) { + this.ownerID = ownerID; + this.count = count; + this.nodes = nodes; + } + + HashArrayMapNode.prototype.get = function (shift, keyHash, key, notSetValue) { + if (keyHash === undefined) { + keyHash = hash(key); + } + var idx = (shift === 0 ? keyHash : keyHash >>> shift) & MASK; + var node = this.nodes[idx]; + return node ? node.get(shift + SHIFT, keyHash, key, notSetValue) : notSetValue; + }; + + HashArrayMapNode.prototype.update = function ( + ownerID, + shift, + keyHash, + key, + value, + didChangeSize, + didAlter, + ) { + if (keyHash === undefined) { + keyHash = hash(key); + } + var idx = (shift === 0 ? keyHash : keyHash >>> shift) & MASK; + var removed = value === NOT_SET; + var nodes = this.nodes; + var node = nodes[idx]; + + if (removed && !node) { + return this; + } + + var newNode = updateNode( + node, + ownerID, + shift + SHIFT, + keyHash, + key, + value, + didChangeSize, + didAlter, + ); + if (newNode === node) { + return this; + } + + var newCount = this.count; + if (!node) { + newCount++; + } else if (!newNode) { + newCount--; + if (newCount < MIN_HASH_ARRAY_MAP_SIZE) { + return packNodes(ownerID, nodes, newCount, idx); + } + } + + var isEditable = ownerID && ownerID === this.ownerID; + var newNodes = setIn(nodes, idx, newNode, isEditable); + + if (isEditable) { + this.count = newCount; + this.nodes = newNodes; + return this; + } + + return new HashArrayMapNode(ownerID, newCount, newNodes); + }; + + function HashCollisionNode(ownerID, keyHash, entries) { + this.ownerID = ownerID; + this.keyHash = keyHash; + this.entries = entries; + } + + HashCollisionNode.prototype.get = function (shift, keyHash, key, notSetValue) { + var entries = this.entries; + for (var ii = 0, len = entries.length; ii < len; ii++) { + if (is(key, entries[ii][0])) { + return entries[ii][1]; + } + } + return notSetValue; + }; + + HashCollisionNode.prototype.update = function ( + ownerID, + shift, + keyHash, + key, + value, + didChangeSize, + didAlter, + ) { + if (keyHash === undefined) { + keyHash = hash(key); + } + + var removed = value === NOT_SET; + + if (keyHash !== this.keyHash) { + if (removed) { + return this; + } + SetRef(didAlter); + SetRef(didChangeSize); + return mergeIntoNode(this, ownerID, shift, keyHash, [key, value]); + } + + var entries = this.entries; + var idx = 0; + for (var len = entries.length; idx < len; idx++) { + if (is(key, entries[idx][0])) { + break; + } + } + var exists = idx < len; + + if (exists ? entries[idx][1] === value : removed) { + return this; + } + + SetRef(didAlter); + (removed || !exists) && SetRef(didChangeSize); + + if (removed && len === 2) { + return new ValueNode(ownerID, this.keyHash, entries[idx ^ 1]); + } + + var isEditable = ownerID && ownerID === this.ownerID; + var newEntries = isEditable ? entries : arrCopy(entries); + + if (exists) { + if (removed) { + idx === len - 1 ? newEntries.pop() : (newEntries[idx] = newEntries.pop()); + } else { + newEntries[idx] = [key, value]; + } + } else { + newEntries.push([key, value]); + } + + if (isEditable) { + this.entries = newEntries; + return this; + } + + return new HashCollisionNode(ownerID, this.keyHash, newEntries); + }; + + function ValueNode(ownerID, keyHash, entry) { + this.ownerID = ownerID; + this.keyHash = keyHash; + this.entry = entry; + } + + ValueNode.prototype.get = function (shift, keyHash, key, notSetValue) { + return is(key, this.entry[0]) ? this.entry[1] : notSetValue; + }; + + ValueNode.prototype.update = function (ownerID, shift, keyHash, key, value, didChangeSize, didAlter) { + var removed = value === NOT_SET; + var keyMatch = is(key, this.entry[0]); + if (keyMatch ? value === this.entry[1] : removed) { + return this; + } + + SetRef(didAlter); + + if (removed) { + SetRef(didChangeSize); + return; // undefined + } + + if (keyMatch) { + if (ownerID && ownerID === this.ownerID) { + this.entry[1] = value; + return this; + } + return new ValueNode(ownerID, this.keyHash, [key, value]); + } + + SetRef(didChangeSize); + return mergeIntoNode(this, ownerID, shift, hash(key), [key, value]); + }; + + // #pragma Iterators + + ArrayMapNode.prototype.iterate = HashCollisionNode.prototype.iterate = function (fn, reverse) { + var entries = this.entries; + for (var ii = 0, maxIndex = entries.length - 1; ii <= maxIndex; ii++) { + if (fn(entries[reverse ? maxIndex - ii : ii]) === false) { + return false; + } + } + }; + + BitmapIndexedNode.prototype.iterate = HashArrayMapNode.prototype.iterate = function (fn, reverse) { + var nodes = this.nodes; + for (var ii = 0, maxIndex = nodes.length - 1; ii <= maxIndex; ii++) { + var node = nodes[reverse ? maxIndex - ii : ii]; + if (node && node.iterate(fn, reverse) === false) { + return false; + } + } + }; + + ValueNode.prototype.iterate = function (fn, reverse) { + return fn(this.entry); + }; + + createClass(MapIterator, Iterator); + + function MapIterator(map, type, reverse) { + this._type = type; + this._reverse = reverse; + this._stack = map._root && mapIteratorFrame(map._root); + } + + MapIterator.prototype.next = function () { + var type = this._type; + var stack = this._stack; + while (stack) { + var node = stack.node; + var index = stack.index++; + var maxIndex; + if (node.entry) { + if (index === 0) { + return mapIteratorValue(type, node.entry); + } + } else if (node.entries) { + maxIndex = node.entries.length - 1; + if (index <= maxIndex) { + return mapIteratorValue(type, node.entries[this._reverse ? maxIndex - index : index]); + } + } else { + maxIndex = node.nodes.length - 1; + if (index <= maxIndex) { + var subNode = node.nodes[this._reverse ? maxIndex - index : index]; + if (subNode) { + if (subNode.entry) { + return mapIteratorValue(type, subNode.entry); + } + stack = this._stack = mapIteratorFrame(subNode, stack); + } + continue; + } + } + stack = this._stack = this._stack.__prev; + } + return iteratorDone(); + }; + + function mapIteratorValue(type, entry) { + return iteratorValue(type, entry[0], entry[1]); + } + + function mapIteratorFrame(node, prev) { + return { + node: node, + index: 0, + __prev: prev, + }; + } + + function makeMap(size, root, ownerID, hash) { + var map = Object.create(MapPrototype); + map.size = size; + map._root = root; + map.__ownerID = ownerID; + map.__hash = hash; + map.__altered = false; + return map; + } + + var EMPTY_MAP; + function emptyMap() { + return EMPTY_MAP || (EMPTY_MAP = makeMap(0)); + } + + function updateMap(map, k, v) { + var newRoot; + var newSize; + if (!map._root) { + if (v === NOT_SET) { + return map; + } + newSize = 1; + newRoot = new ArrayMapNode(map.__ownerID, [[k, v]]); + } else { + var didChangeSize = MakeRef(CHANGE_LENGTH); + var didAlter = MakeRef(DID_ALTER); + newRoot = updateNode(map._root, map.__ownerID, 0, undefined, k, v, didChangeSize, didAlter); + if (!didAlter.value) { + return map; + } + newSize = map.size + (didChangeSize.value ? (v === NOT_SET ? -1 : 1) : 0); + } + if (map.__ownerID) { + map.size = newSize; + map._root = newRoot; + map.__hash = undefined; + map.__altered = true; + return map; + } + return newRoot ? makeMap(newSize, newRoot) : emptyMap(); + } + + function updateNode(node, ownerID, shift, keyHash, key, value, didChangeSize, didAlter) { + if (!node) { + if (value === NOT_SET) { + return node; + } + SetRef(didAlter); + SetRef(didChangeSize); + return new ValueNode(ownerID, keyHash, [key, value]); + } + return node.update(ownerID, shift, keyHash, key, value, didChangeSize, didAlter); + } + + function isLeafNode(node) { + return node.constructor === ValueNode || node.constructor === HashCollisionNode; + } + + function mergeIntoNode(node, ownerID, shift, keyHash, entry) { + if (node.keyHash === keyHash) { + return new HashCollisionNode(ownerID, keyHash, [node.entry, entry]); + } + + var idx1 = (shift === 0 ? node.keyHash : node.keyHash >>> shift) & MASK; + var idx2 = (shift === 0 ? keyHash : keyHash >>> shift) & MASK; + + var newNode; + var nodes = + idx1 === idx2 + ? [mergeIntoNode(node, ownerID, shift + SHIFT, keyHash, entry)] + : ((newNode = new ValueNode(ownerID, keyHash, entry)), + idx1 < idx2 ? [node, newNode] : [newNode, node]); + + return new BitmapIndexedNode(ownerID, (1 << idx1) | (1 << idx2), nodes); + } + + function createNodes(ownerID, entries, key, value) { + if (!ownerID) { + ownerID = new OwnerID(); + } + var node = new ValueNode(ownerID, hash(key), [key, value]); + for (var ii = 0; ii < entries.length; ii++) { + var entry = entries[ii]; + node = node.update(ownerID, 0, undefined, entry[0], entry[1]); + } + return node; + } + + function packNodes(ownerID, nodes, count, excluding) { + var bitmap = 0; + var packedII = 0; + var packedNodes = new Array(count); + for (var ii = 0, bit = 1, len = nodes.length; ii < len; ii++, bit <<= 1) { + var node = nodes[ii]; + if (node !== undefined && ii !== excluding) { + bitmap |= bit; + packedNodes[packedII++] = node; + } + } + return new BitmapIndexedNode(ownerID, bitmap, packedNodes); + } + + function expandNodes(ownerID, nodes, bitmap, including, node) { + var count = 0; + var expandedNodes = new Array(SIZE); + for (var ii = 0; bitmap !== 0; ii++, bitmap >>>= 1) { + expandedNodes[ii] = bitmap & 1 ? nodes[count++] : undefined; + } + expandedNodes[including] = node; + return new HashArrayMapNode(ownerID, count + 1, expandedNodes); + } + + function mergeIntoMapWith(map, merger, iterables) { + var iters = []; + for (var ii = 0; ii < iterables.length; ii++) { + var value = iterables[ii]; + var iter = KeyedIterable(value); + if (!isIterable(value)) { + iter = iter.map(function (v) { + return fromJS(v); + }); + } + iters.push(iter); + } + return mergeIntoCollectionWith(map, merger, iters); + } + + function deepMerger(existing, value, key) { + return existing && existing.mergeDeep && isIterable(value) + ? existing.mergeDeep(value) + : is(existing, value) + ? existing + : value; + } + + function deepMergerWith(merger) { + return function (existing, value, key) { + if (existing && existing.mergeDeepWith && isIterable(value)) { + return existing.mergeDeepWith(merger, value); + } + var nextValue = merger(existing, value, key); + return is(existing, nextValue) ? existing : nextValue; + }; + } + + function mergeIntoCollectionWith(collection, merger, iters) { + iters = iters.filter(function (x) { + return x.size !== 0; + }); + if (iters.length === 0) { + return collection; + } + if (collection.size === 0 && !collection.__ownerID && iters.length === 1) { + return collection.constructor(iters[0]); + } + return collection.withMutations(function (collection) { + var mergeIntoMap = merger + ? function (value, key) { + collection.update(key, NOT_SET, function (existing) { + return existing === NOT_SET ? value : merger(existing, value, key); + }); + } + : function (value, key) { + collection.set(key, value); + }; + for (var ii = 0; ii < iters.length; ii++) { + iters[ii].forEach(mergeIntoMap); + } + }); + } + + function updateInDeepMap(existing, keyPathIter, notSetValue, updater) { + var isNotSet = existing === NOT_SET; + var step = keyPathIter.next(); + if (step.done) { + var existingValue = isNotSet ? notSetValue : existing; + var newValue = updater(existingValue); + return newValue === existingValue ? existing : newValue; + } + invariant(isNotSet || (existing && existing.set), 'invalid keyPath'); + var key = step.value; + var nextExisting = isNotSet ? NOT_SET : existing.get(key, NOT_SET); + var nextUpdated = updateInDeepMap(nextExisting, keyPathIter, notSetValue, updater); + return nextUpdated === nextExisting + ? existing + : nextUpdated === NOT_SET + ? existing.remove(key) + : (isNotSet ? emptyMap() : existing).set(key, nextUpdated); + } + + function popCount(x) { + x = x - ((x >> 1) & 0x55555555); + x = (x & 0x33333333) + ((x >> 2) & 0x33333333); + x = (x + (x >> 4)) & 0x0f0f0f0f; + x = x + (x >> 8); + x = x + (x >> 16); + return x & 0x7f; + } + + function setIn(array, idx, val, canEdit) { + var newArray = canEdit ? array : arrCopy(array); + newArray[idx] = val; + return newArray; + } + + function spliceIn(array, idx, val, canEdit) { + var newLen = array.length + 1; + if (canEdit && idx + 1 === newLen) { + array[idx] = val; + return array; + } + var newArray = new Array(newLen); + var after = 0; + for (var ii = 0; ii < newLen; ii++) { + if (ii === idx) { + newArray[ii] = val; + after = -1; + } else { + newArray[ii] = array[ii + after]; + } + } + return newArray; + } + + function spliceOut(array, idx, canEdit) { + var newLen = array.length - 1; + if (canEdit && idx === newLen) { + array.pop(); + return array; + } + var newArray = new Array(newLen); + var after = 0; + for (var ii = 0; ii < newLen; ii++) { + if (ii === idx) { + after = 1; + } + newArray[ii] = array[ii + after]; + } + return newArray; + } + + var MAX_ARRAY_MAP_SIZE = SIZE / 4; + var MAX_BITMAP_INDEXED_SIZE = SIZE / 2; + var MIN_HASH_ARRAY_MAP_SIZE = SIZE / 4; + + createClass(List, IndexedCollection); + + // @pragma Construction + + function List(value) { + var empty = emptyList(); + if (value === null || value === undefined) { + return empty; + } + if (isList(value)) { + return value; + } + var iter = IndexedIterable(value); + var size = iter.size; + if (size === 0) { + return empty; + } + assertNotInfinite(size); + if (size > 0 && size < SIZE) { + return makeList(0, size, SHIFT, null, new VNode(iter.toArray())); + } + return empty.withMutations(function (list) { + list.setSize(size); + iter.forEach(function (v, i) { + return list.set(i, v); + }); + }); + } + + List.of = function (/*...values*/) { + return this(arguments); + }; + + List.prototype.toString = function () { + return this.__toString('List [', ']'); + }; + + // @pragma Access + + List.prototype.get = function (index, notSetValue) { + index = wrapIndex(this, index); + if (index >= 0 && index < this.size) { + index += this._origin; + var node = listNodeFor(this, index); + return node && node.array[index & MASK]; + } + return notSetValue; + }; + + // @pragma Modification + + List.prototype.set = function (index, value) { + return updateList(this, index, value); + }; + + List.prototype.remove = function (index) { + return !this.has(index) + ? this + : index === 0 + ? this.shift() + : index === this.size - 1 + ? this.pop() + : this.splice(index, 1); + }; + + List.prototype.insert = function (index, value) { + return this.splice(index, 0, value); + }; + + List.prototype.clear = function () { + if (this.size === 0) { + return this; + } + if (this.__ownerID) { + this.size = this._origin = this._capacity = 0; + this._level = SHIFT; + this._root = this._tail = null; + this.__hash = undefined; + this.__altered = true; + return this; + } + return emptyList(); + }; + + List.prototype.push = function (/*...values*/) { + var values = arguments; + var oldSize = this.size; + return this.withMutations(function (list) { + setListBounds(list, 0, oldSize + values.length); + for (var ii = 0; ii < values.length; ii++) { + list.set(oldSize + ii, values[ii]); + } + }); + }; + + List.prototype.pop = function () { + return setListBounds(this, 0, -1); + }; + + List.prototype.unshift = function (/*...values*/) { + var values = arguments; + return this.withMutations(function (list) { + setListBounds(list, -values.length); + for (var ii = 0; ii < values.length; ii++) { + list.set(ii, values[ii]); + } + }); + }; + + List.prototype.shift = function () { + return setListBounds(this, 1); + }; + + // @pragma Composition + + List.prototype.merge = function (/*...iters*/) { + return mergeIntoListWith(this, undefined, arguments); + }; + + List.prototype.mergeWith = function (merger) { + var iters = SLICE$0.call(arguments, 1); + return mergeIntoListWith(this, merger, iters); + }; + + List.prototype.mergeDeep = function (/*...iters*/) { + return mergeIntoListWith(this, deepMerger, arguments); + }; + + List.prototype.mergeDeepWith = function (merger) { + var iters = SLICE$0.call(arguments, 1); + return mergeIntoListWith(this, deepMergerWith(merger), iters); + }; + + List.prototype.setSize = function (size) { + return setListBounds(this, 0, size); + }; + + // @pragma Iteration + + List.prototype.slice = function (begin, end) { + var size = this.size; + if (wholeSlice(begin, end, size)) { + return this; + } + return setListBounds(this, resolveBegin(begin, size), resolveEnd(end, size)); + }; + + List.prototype.__iterator = function (type, reverse) { + var index = 0; + var values = iterateList(this, reverse); + return new Iterator(function () { + var value = values(); + return value === DONE ? iteratorDone() : iteratorValue(type, index++, value); + }); + }; + + List.prototype.__iterate = function (fn, reverse) { + var index = 0; + var values = iterateList(this, reverse); + var value; + while ((value = values()) !== DONE) { + if (fn(value, index++, this) === false) { + break; + } + } + return index; + }; + + List.prototype.__ensureOwner = function (ownerID) { + if (ownerID === this.__ownerID) { + return this; + } + if (!ownerID) { + this.__ownerID = ownerID; + return this; + } + return makeList( + this._origin, + this._capacity, + this._level, + this._root, + this._tail, + ownerID, + this.__hash, + ); + }; + + function isList(maybeList) { + return !!(maybeList && maybeList[IS_LIST_SENTINEL]); + } + + List.isList = isList; + + var IS_LIST_SENTINEL = '@@__IMMUTABLE_LIST__@@'; + + var ListPrototype = List.prototype; + ListPrototype[IS_LIST_SENTINEL] = true; + ListPrototype[DELETE] = ListPrototype.remove; + ListPrototype.setIn = MapPrototype.setIn; + ListPrototype.deleteIn = ListPrototype.removeIn = MapPrototype.removeIn; + ListPrototype.update = MapPrototype.update; + ListPrototype.updateIn = MapPrototype.updateIn; + ListPrototype.mergeIn = MapPrototype.mergeIn; + ListPrototype.mergeDeepIn = MapPrototype.mergeDeepIn; + ListPrototype.withMutations = MapPrototype.withMutations; + ListPrototype.asMutable = MapPrototype.asMutable; + ListPrototype.asImmutable = MapPrototype.asImmutable; + ListPrototype.wasAltered = MapPrototype.wasAltered; + + function VNode(array, ownerID) { + this.array = array; + this.ownerID = ownerID; + } + + // TODO: seems like these methods are very similar + + VNode.prototype.removeBefore = function (ownerID, level, index) { + if (index === level ? 1 << level : 0 || this.array.length === 0) { + return this; + } + var originIndex = (index >>> level) & MASK; + if (originIndex >= this.array.length) { + return new VNode([], ownerID); + } + var removingFirst = originIndex === 0; + var newChild; + if (level > 0) { + var oldChild = this.array[originIndex]; + newChild = oldChild && oldChild.removeBefore(ownerID, level - SHIFT, index); + if (newChild === oldChild && removingFirst) { + return this; + } + } + if (removingFirst && !newChild) { + return this; + } + var editable = editableVNode(this, ownerID); + if (!removingFirst) { + for (var ii = 0; ii < originIndex; ii++) { + editable.array[ii] = undefined; + } + } + if (newChild) { + editable.array[originIndex] = newChild; + } + return editable; + }; + + VNode.prototype.removeAfter = function (ownerID, level, index) { + if (index === (level ? 1 << level : 0) || this.array.length === 0) { + return this; + } + var sizeIndex = ((index - 1) >>> level) & MASK; + if (sizeIndex >= this.array.length) { + return this; + } + + var newChild; + if (level > 0) { + var oldChild = this.array[sizeIndex]; + newChild = oldChild && oldChild.removeAfter(ownerID, level - SHIFT, index); + if (newChild === oldChild && sizeIndex === this.array.length - 1) { + return this; + } + } + + var editable = editableVNode(this, ownerID); + editable.array.splice(sizeIndex + 1); + if (newChild) { + editable.array[sizeIndex] = newChild; + } + return editable; + }; + + var DONE = {}; + + function iterateList(list, reverse) { + var left = list._origin; + var right = list._capacity; + var tailPos = getTailOffset(right); + var tail = list._tail; + + return iterateNodeOrLeaf(list._root, list._level, 0); + + function iterateNodeOrLeaf(node, level, offset) { + return level === 0 ? iterateLeaf(node, offset) : iterateNode(node, level, offset); + } + + function iterateLeaf(node, offset) { + var array = offset === tailPos ? tail && tail.array : node && node.array; + var from = offset > left ? 0 : left - offset; + var to = right - offset; + if (to > SIZE) { + to = SIZE; + } + return function () { + if (from === to) { + return DONE; + } + var idx = reverse ? --to : from++; + return array && array[idx]; + }; + } + + function iterateNode(node, level, offset) { + var values; + var array = node && node.array; + var from = offset > left ? 0 : (left - offset) >> level; + var to = ((right - offset) >> level) + 1; + if (to > SIZE) { + to = SIZE; + } + return function () { + do { + if (values) { + var value = values(); + if (value !== DONE) { + return value; + } + values = null; + } + if (from === to) { + return DONE; + } + var idx = reverse ? --to : from++; + values = iterateNodeOrLeaf(array && array[idx], level - SHIFT, offset + (idx << level)); + } while (true); + }; + } + } + + function makeList(origin, capacity, level, root, tail, ownerID, hash) { + var list = Object.create(ListPrototype); + list.size = capacity - origin; + list._origin = origin; + list._capacity = capacity; + list._level = level; + list._root = root; + list._tail = tail; + list.__ownerID = ownerID; + list.__hash = hash; + list.__altered = false; + return list; + } + + var EMPTY_LIST; + function emptyList() { + return EMPTY_LIST || (EMPTY_LIST = makeList(0, 0, SHIFT)); + } + + function updateList(list, index, value) { + index = wrapIndex(list, index); + + if (index !== index) { + return list; + } + + if (index >= list.size || index < 0) { + return list.withMutations(function (list) { + index < 0 + ? setListBounds(list, index).set(0, value) + : setListBounds(list, 0, index + 1).set(index, value); + }); + } + + index += list._origin; + + var newTail = list._tail; + var newRoot = list._root; + var didAlter = MakeRef(DID_ALTER); + if (index >= getTailOffset(list._capacity)) { + newTail = updateVNode(newTail, list.__ownerID, 0, index, value, didAlter); + } else { + newRoot = updateVNode(newRoot, list.__ownerID, list._level, index, value, didAlter); + } + + if (!didAlter.value) { + return list; + } + + if (list.__ownerID) { + list._root = newRoot; + list._tail = newTail; + list.__hash = undefined; + list.__altered = true; + return list; + } + return makeList(list._origin, list._capacity, list._level, newRoot, newTail); + } + + function updateVNode(node, ownerID, level, index, value, didAlter) { + var idx = (index >>> level) & MASK; + var nodeHas = node && idx < node.array.length; + if (!nodeHas && value === undefined) { + return node; + } + + var newNode; + + if (level > 0) { + var lowerNode = node && node.array[idx]; + var newLowerNode = updateVNode(lowerNode, ownerID, level - SHIFT, index, value, didAlter); + if (newLowerNode === lowerNode) { + return node; + } + newNode = editableVNode(node, ownerID); + newNode.array[idx] = newLowerNode; + return newNode; + } + + if (nodeHas && node.array[idx] === value) { + return node; + } + + SetRef(didAlter); + + newNode = editableVNode(node, ownerID); + if (value === undefined && idx === newNode.array.length - 1) { + newNode.array.pop(); + } else { + newNode.array[idx] = value; + } + return newNode; + } + + function editableVNode(node, ownerID) { + if (ownerID && node && ownerID === node.ownerID) { + return node; + } + return new VNode(node ? node.array.slice() : [], ownerID); + } + + function listNodeFor(list, rawIndex) { + if (rawIndex >= getTailOffset(list._capacity)) { + return list._tail; + } + if (rawIndex < 1 << (list._level + SHIFT)) { + var node = list._root; + var level = list._level; + while (node && level > 0) { + node = node.array[(rawIndex >>> level) & MASK]; + level -= SHIFT; + } + return node; + } + } + + function setListBounds(list, begin, end) { + // Sanitize begin & end using this shorthand for ToInt32(argument) + // http://www.ecma-international.org/ecma-262/6.0/#sec-toint32 + if (begin !== undefined) { + begin = begin | 0; + } + if (end !== undefined) { + end = end | 0; + } + var owner = list.__ownerID || new OwnerID(); + var oldOrigin = list._origin; + var oldCapacity = list._capacity; + var newOrigin = oldOrigin + begin; + var newCapacity = end === undefined ? oldCapacity : end < 0 ? oldCapacity + end : oldOrigin + end; + if (newOrigin === oldOrigin && newCapacity === oldCapacity) { + return list; + } + + // If it's going to end after it starts, it's empty. + if (newOrigin >= newCapacity) { + return list.clear(); + } + + var newLevel = list._level; + var newRoot = list._root; + + // New origin might need creating a higher root. + var offsetShift = 0; + while (newOrigin + offsetShift < 0) { + newRoot = new VNode(newRoot && newRoot.array.length ? [undefined, newRoot] : [], owner); + newLevel += SHIFT; + offsetShift += 1 << newLevel; + } + if (offsetShift) { + newOrigin += offsetShift; + oldOrigin += offsetShift; + newCapacity += offsetShift; + oldCapacity += offsetShift; + } + + var oldTailOffset = getTailOffset(oldCapacity); + var newTailOffset = getTailOffset(newCapacity); + + // New size might need creating a higher root. + while (newTailOffset >= 1 << (newLevel + SHIFT)) { + newRoot = new VNode(newRoot && newRoot.array.length ? [newRoot] : [], owner); + newLevel += SHIFT; + } + + // Locate or create the new tail. + var oldTail = list._tail; + var newTail = + newTailOffset < oldTailOffset + ? listNodeFor(list, newCapacity - 1) + : newTailOffset > oldTailOffset + ? new VNode([], owner) + : oldTail; + + // Merge Tail into tree. + if (oldTail && newTailOffset > oldTailOffset && newOrigin < oldCapacity && oldTail.array.length) { + newRoot = editableVNode(newRoot, owner); + var node = newRoot; + for (var level = newLevel; level > SHIFT; level -= SHIFT) { + var idx = (oldTailOffset >>> level) & MASK; + node = node.array[idx] = editableVNode(node.array[idx], owner); + } + node.array[(oldTailOffset >>> SHIFT) & MASK] = oldTail; + } + + // If the size has been reduced, there's a chance the tail needs to be trimmed. + if (newCapacity < oldCapacity) { + newTail = newTail && newTail.removeAfter(owner, 0, newCapacity); + } + + // If the new origin is within the tail, then we do not need a root. + if (newOrigin >= newTailOffset) { + newOrigin -= newTailOffset; + newCapacity -= newTailOffset; + newLevel = SHIFT; + newRoot = null; + newTail = newTail && newTail.removeBefore(owner, 0, newOrigin); + + // Otherwise, if the root has been trimmed, garbage collect. + } else if (newOrigin > oldOrigin || newTailOffset < oldTailOffset) { + offsetShift = 0; + + // Identify the new top root node of the subtree of the old root. + while (newRoot) { + var beginIndex = (newOrigin >>> newLevel) & MASK; + if ((beginIndex !== newTailOffset >>> newLevel) & MASK) { + break; + } + if (beginIndex) { + offsetShift += (1 << newLevel) * beginIndex; + } + newLevel -= SHIFT; + newRoot = newRoot.array[beginIndex]; + } + + // Trim the new sides of the new root. + if (newRoot && newOrigin > oldOrigin) { + newRoot = newRoot.removeBefore(owner, newLevel, newOrigin - offsetShift); + } + if (newRoot && newTailOffset < oldTailOffset) { + newRoot = newRoot.removeAfter(owner, newLevel, newTailOffset - offsetShift); + } + if (offsetShift) { + newOrigin -= offsetShift; + newCapacity -= offsetShift; + } + } + + if (list.__ownerID) { + list.size = newCapacity - newOrigin; + list._origin = newOrigin; + list._capacity = newCapacity; + list._level = newLevel; + list._root = newRoot; + list._tail = newTail; + list.__hash = undefined; + list.__altered = true; + return list; + } + return makeList(newOrigin, newCapacity, newLevel, newRoot, newTail); + } + + function mergeIntoListWith(list, merger, iterables) { + var iters = []; + var maxSize = 0; + for (var ii = 0; ii < iterables.length; ii++) { + var value = iterables[ii]; + var iter = IndexedIterable(value); + if (iter.size > maxSize) { + maxSize = iter.size; + } + if (!isIterable(value)) { + iter = iter.map(function (v) { + return fromJS(v); + }); + } + iters.push(iter); + } + if (maxSize > list.size) { + list = list.setSize(maxSize); + } + return mergeIntoCollectionWith(list, merger, iters); + } + + function getTailOffset(size) { + return size < SIZE ? 0 : ((size - 1) >>> SHIFT) << SHIFT; + } + + createClass(OrderedMap, Map); + + // @pragma Construction + + function OrderedMap(value) { + return value === null || value === undefined + ? emptyOrderedMap() + : isOrderedMap(value) + ? value + : emptyOrderedMap().withMutations(function (map) { + var iter = KeyedIterable(value); + assertNotInfinite(iter.size); + iter.forEach(function (v, k) { + return map.set(k, v); + }); + }); + } + + OrderedMap.of = function (/*...values*/) { + return this(arguments); + }; + + OrderedMap.prototype.toString = function () { + return this.__toString('OrderedMap {', '}'); + }; + + // @pragma Access + + OrderedMap.prototype.get = function (k, notSetValue) { + var index = this._map.get(k); + return index !== undefined ? this._list.get(index)[1] : notSetValue; + }; + + // @pragma Modification + + OrderedMap.prototype.clear = function () { + if (this.size === 0) { + return this; + } + if (this.__ownerID) { + this.size = 0; + this._map.clear(); + this._list.clear(); + return this; + } + return emptyOrderedMap(); + }; + + OrderedMap.prototype.set = function (k, v) { + return updateOrderedMap(this, k, v); + }; + + OrderedMap.prototype.remove = function (k) { + return updateOrderedMap(this, k, NOT_SET); + }; + + OrderedMap.prototype.wasAltered = function () { + return this._map.wasAltered() || this._list.wasAltered(); + }; + + OrderedMap.prototype.__iterate = function (fn, reverse) { + var this$0 = this; + return this._list.__iterate(function (entry) { + return entry && fn(entry[1], entry[0], this$0); + }, reverse); + }; + + OrderedMap.prototype.__iterator = function (type, reverse) { + return this._list.fromEntrySeq().__iterator(type, reverse); + }; + + OrderedMap.prototype.__ensureOwner = function (ownerID) { + if (ownerID === this.__ownerID) { + return this; + } + var newMap = this._map.__ensureOwner(ownerID); + var newList = this._list.__ensureOwner(ownerID); + if (!ownerID) { + this.__ownerID = ownerID; + this._map = newMap; + this._list = newList; + return this; + } + return makeOrderedMap(newMap, newList, ownerID, this.__hash); + }; + + function isOrderedMap(maybeOrderedMap) { + return isMap(maybeOrderedMap) && isOrdered(maybeOrderedMap); + } + + OrderedMap.isOrderedMap = isOrderedMap; + + OrderedMap.prototype[IS_ORDERED_SENTINEL] = true; + OrderedMap.prototype[DELETE] = OrderedMap.prototype.remove; + + function makeOrderedMap(map, list, ownerID, hash) { + var omap = Object.create(OrderedMap.prototype); + omap.size = map ? map.size : 0; + omap._map = map; + omap._list = list; + omap.__ownerID = ownerID; + omap.__hash = hash; + return omap; + } + + var EMPTY_ORDERED_MAP; + function emptyOrderedMap() { + return EMPTY_ORDERED_MAP || (EMPTY_ORDERED_MAP = makeOrderedMap(emptyMap(), emptyList())); + } + + function updateOrderedMap(omap, k, v) { + var map = omap._map; + var list = omap._list; + var i = map.get(k); + var has = i !== undefined; + var newMap; + var newList; + if (v === NOT_SET) { + // removed + if (!has) { + return omap; + } + if (list.size >= SIZE && list.size >= map.size * 2) { + newList = list.filter(function (entry, idx) { + return entry !== undefined && i !== idx; + }); + newMap = newList + .toKeyedSeq() + .map(function (entry) { + return entry[0]; + }) + .flip() + .toMap(); + if (omap.__ownerID) { + newMap.__ownerID = newList.__ownerID = omap.__ownerID; + } + } else { + newMap = map.remove(k); + newList = i === list.size - 1 ? list.pop() : list.set(i, undefined); + } + } else { + if (has) { + if (v === list.get(i)[1]) { + return omap; + } + newMap = map; + newList = list.set(i, [k, v]); + } else { + newMap = map.set(k, list.size); + newList = list.set(list.size, [k, v]); + } + } + if (omap.__ownerID) { + omap.size = newMap.size; + omap._map = newMap; + omap._list = newList; + omap.__hash = undefined; + return omap; + } + return makeOrderedMap(newMap, newList); + } + + createClass(ToKeyedSequence, KeyedSeq); + function ToKeyedSequence(indexed, useKeys) { + this._iter = indexed; + this._useKeys = useKeys; + this.size = indexed.size; + } + + ToKeyedSequence.prototype.get = function (key, notSetValue) { + return this._iter.get(key, notSetValue); + }; + + ToKeyedSequence.prototype.has = function (key) { + return this._iter.has(key); + }; + + ToKeyedSequence.prototype.valueSeq = function () { + return this._iter.valueSeq(); + }; + + ToKeyedSequence.prototype.reverse = function () { + var this$0 = this; + var reversedSequence = reverseFactory(this, true); + if (!this._useKeys) { + reversedSequence.valueSeq = function () { + return this$0._iter.toSeq().reverse(); + }; + } + return reversedSequence; + }; + + ToKeyedSequence.prototype.map = function (mapper, context) { + var this$0 = this; + var mappedSequence = mapFactory(this, mapper, context); + if (!this._useKeys) { + mappedSequence.valueSeq = function () { + return this$0._iter.toSeq().map(mapper, context); + }; + } + return mappedSequence; + }; + + ToKeyedSequence.prototype.__iterate = function (fn, reverse) { + var this$0 = this; + var ii; + return this._iter.__iterate( + this._useKeys + ? function (v, k) { + return fn(v, k, this$0); + } + : ((ii = reverse ? resolveSize(this) : 0), + function (v) { + return fn(v, reverse ? --ii : ii++, this$0); + }), + reverse, + ); + }; + + ToKeyedSequence.prototype.__iterator = function (type, reverse) { + if (this._useKeys) { + return this._iter.__iterator(type, reverse); + } + var iterator = this._iter.__iterator(ITERATE_VALUES, reverse); + var ii = reverse ? resolveSize(this) : 0; + return new Iterator(function () { + var step = iterator.next(); + return step.done ? step : iteratorValue(type, reverse ? --ii : ii++, step.value, step); + }); + }; + + ToKeyedSequence.prototype[IS_ORDERED_SENTINEL] = true; + + createClass(ToIndexedSequence, IndexedSeq); + function ToIndexedSequence(iter) { + this._iter = iter; + this.size = iter.size; + } + + ToIndexedSequence.prototype.includes = function (value) { + return this._iter.includes(value); + }; + + ToIndexedSequence.prototype.__iterate = function (fn, reverse) { + var this$0 = this; + var iterations = 0; + return this._iter.__iterate(function (v) { + return fn(v, iterations++, this$0); + }, reverse); + }; + + ToIndexedSequence.prototype.__iterator = function (type, reverse) { + var iterator = this._iter.__iterator(ITERATE_VALUES, reverse); + var iterations = 0; + return new Iterator(function () { + var step = iterator.next(); + return step.done ? step : iteratorValue(type, iterations++, step.value, step); + }); + }; + + createClass(ToSetSequence, SetSeq); + function ToSetSequence(iter) { + this._iter = iter; + this.size = iter.size; + } + + ToSetSequence.prototype.has = function (key) { + return this._iter.includes(key); + }; + + ToSetSequence.prototype.__iterate = function (fn, reverse) { + var this$0 = this; + return this._iter.__iterate(function (v) { + return fn(v, v, this$0); + }, reverse); + }; + + ToSetSequence.prototype.__iterator = function (type, reverse) { + var iterator = this._iter.__iterator(ITERATE_VALUES, reverse); + return new Iterator(function () { + var step = iterator.next(); + return step.done ? step : iteratorValue(type, step.value, step.value, step); + }); + }; + + createClass(FromEntriesSequence, KeyedSeq); + function FromEntriesSequence(entries) { + this._iter = entries; + this.size = entries.size; + } + + FromEntriesSequence.prototype.entrySeq = function () { + return this._iter.toSeq(); + }; + + FromEntriesSequence.prototype.__iterate = function (fn, reverse) { + var this$0 = this; + return this._iter.__iterate(function (entry) { + // Check if entry exists first so array access doesn't throw for holes + // in the parent iteration. + if (entry) { + validateEntry(entry); + var indexedIterable = isIterable(entry); + return fn( + indexedIterable ? entry.get(1) : entry[1], + indexedIterable ? entry.get(0) : entry[0], + this$0, + ); + } + }, reverse); + }; + + FromEntriesSequence.prototype.__iterator = function (type, reverse) { + var iterator = this._iter.__iterator(ITERATE_VALUES, reverse); + return new Iterator(function () { + while (true) { + var step = iterator.next(); + if (step.done) { + return step; + } + var entry = step.value; + // Check if entry exists first so array access doesn't throw for holes + // in the parent iteration. + if (entry) { + validateEntry(entry); + var indexedIterable = isIterable(entry); + return iteratorValue( + type, + indexedIterable ? entry.get(0) : entry[0], + indexedIterable ? entry.get(1) : entry[1], + step, + ); + } + } + }); + }; + + ToIndexedSequence.prototype.cacheResult = + ToKeyedSequence.prototype.cacheResult = + ToSetSequence.prototype.cacheResult = + FromEntriesSequence.prototype.cacheResult = + cacheResultThrough; + + function flipFactory(iterable) { + var flipSequence = makeSequence(iterable); + flipSequence._iter = iterable; + flipSequence.size = iterable.size; + flipSequence.flip = function () { + return iterable; + }; + flipSequence.reverse = function () { + var reversedSequence = iterable.reverse.apply(this); // super.reverse() + reversedSequence.flip = function () { + return iterable.reverse(); + }; + return reversedSequence; + }; + flipSequence.has = function (key) { + return iterable.includes(key); + }; + flipSequence.includes = function (key) { + return iterable.has(key); + }; + flipSequence.cacheResult = cacheResultThrough; + flipSequence.__iterateUncached = function (fn, reverse) { + var this$0 = this; + return iterable.__iterate(function (v, k) { + return fn(k, v, this$0) !== false; + }, reverse); + }; + flipSequence.__iteratorUncached = function (type, reverse) { + if (type === ITERATE_ENTRIES) { + var iterator = iterable.__iterator(type, reverse); + return new Iterator(function () { + var step = iterator.next(); + if (!step.done) { + var k = step.value[0]; + step.value[0] = step.value[1]; + step.value[1] = k; + } + return step; + }); + } + return iterable.__iterator(type === ITERATE_VALUES ? ITERATE_KEYS : ITERATE_VALUES, reverse); + }; + return flipSequence; + } + + function mapFactory(iterable, mapper, context) { + var mappedSequence = makeSequence(iterable); + mappedSequence.size = iterable.size; + mappedSequence.has = function (key) { + return iterable.has(key); + }; + mappedSequence.get = function (key, notSetValue) { + var v = iterable.get(key, NOT_SET); + return v === NOT_SET ? notSetValue : mapper.call(context, v, key, iterable); + }; + mappedSequence.__iterateUncached = function (fn, reverse) { + var this$0 = this; + return iterable.__iterate(function (v, k, c) { + return fn(mapper.call(context, v, k, c), k, this$0) !== false; + }, reverse); + }; + mappedSequence.__iteratorUncached = function (type, reverse) { + var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse); + return new Iterator(function () { + var step = iterator.next(); + if (step.done) { + return step; + } + var entry = step.value; + var key = entry[0]; + return iteratorValue(type, key, mapper.call(context, entry[1], key, iterable), step); + }); + }; + return mappedSequence; + } + + function reverseFactory(iterable, useKeys) { + var reversedSequence = makeSequence(iterable); + reversedSequence._iter = iterable; + reversedSequence.size = iterable.size; + reversedSequence.reverse = function () { + return iterable; + }; + if (iterable.flip) { + reversedSequence.flip = function () { + var flipSequence = flipFactory(iterable); + flipSequence.reverse = function () { + return iterable.flip(); + }; + return flipSequence; + }; + } + reversedSequence.get = function (key, notSetValue) { + return iterable.get(useKeys ? key : -1 - key, notSetValue); + }; + reversedSequence.has = function (key) { + return iterable.has(useKeys ? key : -1 - key); + }; + reversedSequence.includes = function (value) { + return iterable.includes(value); + }; + reversedSequence.cacheResult = cacheResultThrough; + reversedSequence.__iterate = function (fn, reverse) { + var this$0 = this; + return iterable.__iterate(function (v, k) { + return fn(v, k, this$0); + }, !reverse); + }; + reversedSequence.__iterator = function (type, reverse) { + return iterable.__iterator(type, !reverse); + }; + return reversedSequence; + } + + function filterFactory(iterable, predicate, context, useKeys) { + var filterSequence = makeSequence(iterable); + if (useKeys) { + filterSequence.has = function (key) { + var v = iterable.get(key, NOT_SET); + return v !== NOT_SET && !!predicate.call(context, v, key, iterable); + }; + filterSequence.get = function (key, notSetValue) { + var v = iterable.get(key, NOT_SET); + return v !== NOT_SET && predicate.call(context, v, key, iterable) ? v : notSetValue; + }; + } + filterSequence.__iterateUncached = function (fn, reverse) { + var this$0 = this; + var iterations = 0; + iterable.__iterate(function (v, k, c) { + if (predicate.call(context, v, k, c)) { + iterations++; + return fn(v, useKeys ? k : iterations - 1, this$0); + } + }, reverse); + return iterations; + }; + filterSequence.__iteratorUncached = function (type, reverse) { + var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse); + var iterations = 0; + return new Iterator(function () { + while (true) { + var step = iterator.next(); + if (step.done) { + return step; + } + var entry = step.value; + var key = entry[0]; + var value = entry[1]; + if (predicate.call(context, value, key, iterable)) { + return iteratorValue(type, useKeys ? key : iterations++, value, step); + } + } + }); + }; + return filterSequence; + } + + function countByFactory(iterable, grouper, context) { + var groups = Map().asMutable(); + iterable.__iterate(function (v, k) { + groups.update(grouper.call(context, v, k, iterable), 0, function (a) { + return a + 1; + }); + }); + return groups.asImmutable(); + } + + function groupByFactory(iterable, grouper, context) { + var isKeyedIter = isKeyed(iterable); + var groups = (isOrdered(iterable) ? OrderedMap() : Map()).asMutable(); + iterable.__iterate(function (v, k) { + groups.update(grouper.call(context, v, k, iterable), function (a) { + return (a = a || []), a.push(isKeyedIter ? [k, v] : v), a; + }); + }); + var coerce = iterableClass(iterable); + return groups.map(function (arr) { + return reify(iterable, coerce(arr)); + }); + } + + function sliceFactory(iterable, begin, end, useKeys) { + var originalSize = iterable.size; + + // Sanitize begin & end using this shorthand for ToInt32(argument) + // http://www.ecma-international.org/ecma-262/6.0/#sec-toint32 + if (begin !== undefined) { + begin = begin | 0; + } + if (end !== undefined) { + if (end === Infinity) { + end = originalSize; + } else { + end = end | 0; + } + } + + if (wholeSlice(begin, end, originalSize)) { + return iterable; + } + + var resolvedBegin = resolveBegin(begin, originalSize); + var resolvedEnd = resolveEnd(end, originalSize); + + // begin or end will be NaN if they were provided as negative numbers and + // this iterable's size is unknown. In that case, cache first so there is + // a known size and these do not resolve to NaN. + if (resolvedBegin !== resolvedBegin || resolvedEnd !== resolvedEnd) { + return sliceFactory(iterable.toSeq().cacheResult(), begin, end, useKeys); + } + + // Note: resolvedEnd is undefined when the original sequence's length is + // unknown and this slice did not supply an end and should contain all + // elements after resolvedBegin. + // In that case, resolvedSize will be NaN and sliceSize will remain undefined. + var resolvedSize = resolvedEnd - resolvedBegin; + var sliceSize; + if (resolvedSize === resolvedSize) { + sliceSize = resolvedSize < 0 ? 0 : resolvedSize; + } + + var sliceSeq = makeSequence(iterable); + + // If iterable.size is undefined, the size of the realized sliceSeq is + // unknown at this point unless the number of items to slice is 0 + sliceSeq.size = sliceSize === 0 ? sliceSize : (iterable.size && sliceSize) || undefined; + + if (!useKeys && isSeq(iterable) && sliceSize >= 0) { + sliceSeq.get = function (index, notSetValue) { + index = wrapIndex(this, index); + return index >= 0 && index < sliceSize + ? iterable.get(index + resolvedBegin, notSetValue) + : notSetValue; + }; + } + + sliceSeq.__iterateUncached = function (fn, reverse) { + var this$0 = this; + if (sliceSize === 0) { + return 0; + } + if (reverse) { + return this.cacheResult().__iterate(fn, reverse); + } + var skipped = 0; + var isSkipping = true; + var iterations = 0; + iterable.__iterate(function (v, k) { + if (!(isSkipping && (isSkipping = skipped++ < resolvedBegin))) { + iterations++; + return fn(v, useKeys ? k : iterations - 1, this$0) !== false && iterations !== sliceSize; + } + }); + return iterations; + }; + + sliceSeq.__iteratorUncached = function (type, reverse) { + if (sliceSize !== 0 && reverse) { + return this.cacheResult().__iterator(type, reverse); + } + // Don't bother instantiating parent iterator if taking 0. + var iterator = sliceSize !== 0 && iterable.__iterator(type, reverse); + var skipped = 0; + var iterations = 0; + return new Iterator(function () { + while (skipped++ < resolvedBegin) { + iterator.next(); + } + if (++iterations > sliceSize) { + return iteratorDone(); + } + var step = iterator.next(); + if (useKeys || type === ITERATE_VALUES) { + return step; + } else if (type === ITERATE_KEYS) { + return iteratorValue(type, iterations - 1, undefined, step); + } else { + return iteratorValue(type, iterations - 1, step.value[1], step); + } + }); + }; + + return sliceSeq; + } + + function takeWhileFactory(iterable, predicate, context) { + var takeSequence = makeSequence(iterable); + takeSequence.__iterateUncached = function (fn, reverse) { + var this$0 = this; + if (reverse) { + return this.cacheResult().__iterate(fn, reverse); + } + var iterations = 0; + iterable.__iterate(function (v, k, c) { + return predicate.call(context, v, k, c) && ++iterations && fn(v, k, this$0); + }); + return iterations; + }; + takeSequence.__iteratorUncached = function (type, reverse) { + var this$0 = this; + if (reverse) { + return this.cacheResult().__iterator(type, reverse); + } + var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse); + var iterating = true; + return new Iterator(function () { + if (!iterating) { + return iteratorDone(); + } + var step = iterator.next(); + if (step.done) { + return step; + } + var entry = step.value; + var k = entry[0]; + var v = entry[1]; + if (!predicate.call(context, v, k, this$0)) { + iterating = false; + return iteratorDone(); + } + return type === ITERATE_ENTRIES ? step : iteratorValue(type, k, v, step); + }); + }; + return takeSequence; + } + + function skipWhileFactory(iterable, predicate, context, useKeys) { + var skipSequence = makeSequence(iterable); + skipSequence.__iterateUncached = function (fn, reverse) { + var this$0 = this; + if (reverse) { + return this.cacheResult().__iterate(fn, reverse); + } + var isSkipping = true; + var iterations = 0; + iterable.__iterate(function (v, k, c) { + if (!(isSkipping && (isSkipping = predicate.call(context, v, k, c)))) { + iterations++; + return fn(v, useKeys ? k : iterations - 1, this$0); + } + }); + return iterations; + }; + skipSequence.__iteratorUncached = function (type, reverse) { + var this$0 = this; + if (reverse) { + return this.cacheResult().__iterator(type, reverse); + } + var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse); + var skipping = true; + var iterations = 0; + return new Iterator(function () { + var step, k, v; + do { + step = iterator.next(); + if (step.done) { + if (useKeys || type === ITERATE_VALUES) { + return step; + } else if (type === ITERATE_KEYS) { + return iteratorValue(type, iterations++, undefined, step); + } else { + return iteratorValue(type, iterations++, step.value[1], step); + } + } + var entry = step.value; + k = entry[0]; + v = entry[1]; + skipping && (skipping = predicate.call(context, v, k, this$0)); + } while (skipping); + return type === ITERATE_ENTRIES ? step : iteratorValue(type, k, v, step); + }); + }; + return skipSequence; + } + + function concatFactory(iterable, values) { + var isKeyedIterable = isKeyed(iterable); + var iters = [iterable] + .concat(values) + .map(function (v) { + if (!isIterable(v)) { + v = isKeyedIterable ? keyedSeqFromValue(v) : indexedSeqFromValue(Array.isArray(v) ? v : [v]); + } else if (isKeyedIterable) { + v = KeyedIterable(v); + } + return v; + }) + .filter(function (v) { + return v.size !== 0; + }); + + if (iters.length === 0) { + return iterable; + } + + if (iters.length === 1) { + var singleton = iters[0]; + if ( + singleton === iterable || + (isKeyedIterable && isKeyed(singleton)) || + (isIndexed(iterable) && isIndexed(singleton)) + ) { + return singleton; + } + } + + var concatSeq = new ArraySeq(iters); + if (isKeyedIterable) { + concatSeq = concatSeq.toKeyedSeq(); + } else if (!isIndexed(iterable)) { + concatSeq = concatSeq.toSetSeq(); + } + concatSeq = concatSeq.flatten(true); + concatSeq.size = iters.reduce(function (sum, seq) { + if (sum !== undefined) { + var size = seq.size; + if (size !== undefined) { + return sum + size; + } + } + }, 0); + return concatSeq; + } + + function flattenFactory(iterable, depth, useKeys) { + var flatSequence = makeSequence(iterable); + flatSequence.__iterateUncached = function (fn, reverse) { + var iterations = 0; + var stopped = false; + function flatDeep(iter, currentDepth) { + var this$0 = this; + iter.__iterate(function (v, k) { + if ((!depth || currentDepth < depth) && isIterable(v)) { + flatDeep(v, currentDepth + 1); + } else if (fn(v, useKeys ? k : iterations++, this$0) === false) { + stopped = true; + } + return !stopped; + }, reverse); + } + flatDeep(iterable, 0); + return iterations; + }; + flatSequence.__iteratorUncached = function (type, reverse) { + var iterator = iterable.__iterator(type, reverse); + var stack = []; + var iterations = 0; + return new Iterator(function () { + while (iterator) { + var step = iterator.next(); + if (step.done !== false) { + iterator = stack.pop(); + continue; + } + var v = step.value; + if (type === ITERATE_ENTRIES) { + v = v[1]; + } + if ((!depth || stack.length < depth) && isIterable(v)) { + stack.push(iterator); + iterator = v.__iterator(type, reverse); + } else { + return useKeys ? step : iteratorValue(type, iterations++, v, step); + } + } + return iteratorDone(); + }); + }; + return flatSequence; + } + + function flatMapFactory(iterable, mapper, context) { + var coerce = iterableClass(iterable); + return iterable + .toSeq() + .map(function (v, k) { + return coerce(mapper.call(context, v, k, iterable)); + }) + .flatten(true); + } + + function interposeFactory(iterable, separator) { + var interposedSequence = makeSequence(iterable); + interposedSequence.size = iterable.size && iterable.size * 2 - 1; + interposedSequence.__iterateUncached = function (fn, reverse) { + var this$0 = this; + var iterations = 0; + iterable.__iterate(function (v, k) { + return ( + (!iterations || fn(separator, iterations++, this$0) !== false) && + fn(v, iterations++, this$0) !== false + ); + }, reverse); + return iterations; + }; + interposedSequence.__iteratorUncached = function (type, reverse) { + var iterator = iterable.__iterator(ITERATE_VALUES, reverse); + var iterations = 0; + var step; + return new Iterator(function () { + if (!step || iterations % 2) { + step = iterator.next(); + if (step.done) { + return step; + } + } + return iterations % 2 + ? iteratorValue(type, iterations++, separator) + : iteratorValue(type, iterations++, step.value, step); + }); + }; + return interposedSequence; + } + + function sortFactory(iterable, comparator, mapper) { + if (!comparator) { + comparator = defaultComparator; + } + var isKeyedIterable = isKeyed(iterable); + var index = 0; + var entries = iterable + .toSeq() + .map(function (v, k) { + return [k, v, index++, mapper ? mapper(v, k, iterable) : v]; + }) + .toArray(); + entries + .sort(function (a, b) { + return comparator(a[3], b[3]) || a[2] - b[2]; + }) + .forEach( + isKeyedIterable + ? function (v, i) { + entries[i].length = 2; + } + : function (v, i) { + entries[i] = v[1]; + }, + ); + return isKeyedIterable + ? KeyedSeq(entries) + : isIndexed(iterable) + ? IndexedSeq(entries) + : SetSeq(entries); + } + + function maxFactory(iterable, comparator, mapper) { + if (!comparator) { + comparator = defaultComparator; + } + if (mapper) { + var entry = iterable + .toSeq() + .map(function (v, k) { + return [v, mapper(v, k, iterable)]; + }) + .reduce(function (a, b) { + return maxCompare(comparator, a[1], b[1]) ? b : a; + }); + return entry && entry[0]; + } else { + return iterable.reduce(function (a, b) { + return maxCompare(comparator, a, b) ? b : a; + }); + } + } + + function maxCompare(comparator, a, b) { + var comp = comparator(b, a); + // b is considered the new max if the comparator declares them equal, but + // they are not equal and b is in fact a nullish value. + return (comp === 0 && b !== a && (b === undefined || b === null || b !== b)) || comp > 0; + } + + function zipWithFactory(keyIter, zipper, iters) { + var zipSequence = makeSequence(keyIter); + zipSequence.size = new ArraySeq(iters) + .map(function (i) { + return i.size; + }) + .min(); + // Note: this a generic base implementation of __iterate in terms of + // __iterator which may be more generically useful in the future. + zipSequence.__iterate = function (fn, reverse) { + /* generic: + var iterator = this.__iterator(ITERATE_ENTRIES, reverse); + var step; + var iterations = 0; + while (!(step = iterator.next()).done) { + iterations++; + if (fn(step.value[1], step.value[0], this) === false) { + break; + } + } + return iterations; + */ + // indexed: + var iterator = this.__iterator(ITERATE_VALUES, reverse); + var step; + var iterations = 0; + while (!(step = iterator.next()).done) { + if (fn(step.value, iterations++, this) === false) { + break; + } + } + return iterations; + }; + zipSequence.__iteratorUncached = function (type, reverse) { + var iterators = iters.map(function (i) { + return (i = Iterable(i)), getIterator(reverse ? i.reverse() : i); + }); + var iterations = 0; + var isDone = false; + return new Iterator(function () { + var steps; + if (!isDone) { + steps = iterators.map(function (i) { + return i.next(); + }); + isDone = steps.some(function (s) { + return s.done; + }); + } + if (isDone) { + return iteratorDone(); + } + return iteratorValue( + type, + iterations++, + zipper.apply( + null, + steps.map(function (s) { + return s.value; + }), + ), + ); + }); + }; + return zipSequence; + } + + // #pragma Helper Functions + + function reify(iter, seq) { + return isSeq(iter) ? seq : iter.constructor(seq); + } + + function validateEntry(entry) { + if (entry !== Object(entry)) { + throw new TypeError('Expected [K, V] tuple: ' + entry); + } + } + + function resolveSize(iter) { + assertNotInfinite(iter.size); + return ensureSize(iter); + } + + function iterableClass(iterable) { + return isKeyed(iterable) ? KeyedIterable : isIndexed(iterable) ? IndexedIterable : SetIterable; + } + + function makeSequence(iterable) { + return Object.create( + (isKeyed(iterable) ? KeyedSeq : isIndexed(iterable) ? IndexedSeq : SetSeq).prototype, + ); + } + + function cacheResultThrough() { + if (this._iter.cacheResult) { + this._iter.cacheResult(); + this.size = this._iter.size; + return this; + } else { + return Seq.prototype.cacheResult.call(this); + } + } + + function defaultComparator(a, b) { + return a > b ? 1 : a < b ? -1 : 0; + } + + function forceIterator(keyPath) { + var iter = getIterator(keyPath); + if (!iter) { + // Array might not be iterable in this environment, so we need a fallback + // to our wrapped type. + if (!isArrayLike(keyPath)) { + throw new TypeError('Expected iterable or array-like: ' + keyPath); + } + iter = getIterator(Iterable(keyPath)); + } + return iter; + } + + createClass(Record, KeyedCollection); + + function Record(defaultValues, name) { + var hasInitialized; + + var RecordType = function Record(values) { + if (values instanceof RecordType) { + return values; + } + if (!(this instanceof RecordType)) { + return new RecordType(values); + } + if (!hasInitialized) { + hasInitialized = true; + var keys = Object.keys(defaultValues); + setProps(RecordTypePrototype, keys); + RecordTypePrototype.size = keys.length; + RecordTypePrototype._name = name; + RecordTypePrototype._keys = keys; + RecordTypePrototype._defaultValues = defaultValues; + } + this._map = Map(values); + }; + + var RecordTypePrototype = (RecordType.prototype = Object.create(RecordPrototype)); + RecordTypePrototype.constructor = RecordType; + + return RecordType; + } + + Record.prototype.toString = function () { + return this.__toString(recordName(this) + ' {', '}'); + }; + + // @pragma Access + + Record.prototype.has = function (k) { + return this._defaultValues.hasOwnProperty(k); + }; + + Record.prototype.get = function (k, notSetValue) { + if (!this.has(k)) { + return notSetValue; + } + var defaultVal = this._defaultValues[k]; + return this._map ? this._map.get(k, defaultVal) : defaultVal; + }; + + // @pragma Modification + + Record.prototype.clear = function () { + if (this.__ownerID) { + this._map && this._map.clear(); + return this; + } + var RecordType = this.constructor; + return RecordType._empty || (RecordType._empty = makeRecord(this, emptyMap())); + }; + + Record.prototype.set = function (k, v) { + if (!this.has(k)) { + throw new Error('Cannot set unknown key "' + k + '" on ' + recordName(this)); + } + if (this._map && !this._map.has(k)) { + var defaultVal = this._defaultValues[k]; + if (v === defaultVal) { + return this; + } + } + var newMap = this._map && this._map.set(k, v); + if (this.__ownerID || newMap === this._map) { + return this; + } + return makeRecord(this, newMap); + }; + + Record.prototype.remove = function (k) { + if (!this.has(k)) { + return this; + } + var newMap = this._map && this._map.remove(k); + if (this.__ownerID || newMap === this._map) { + return this; + } + return makeRecord(this, newMap); + }; + + Record.prototype.wasAltered = function () { + return this._map.wasAltered(); + }; + + Record.prototype.__iterator = function (type, reverse) { + var this$0 = this; + return KeyedIterable(this._defaultValues) + .map(function (_, k) { + return this$0.get(k); + }) + .__iterator(type, reverse); + }; + + Record.prototype.__iterate = function (fn, reverse) { + var this$0 = this; + return KeyedIterable(this._defaultValues) + .map(function (_, k) { + return this$0.get(k); + }) + .__iterate(fn, reverse); + }; + + Record.prototype.__ensureOwner = function (ownerID) { + if (ownerID === this.__ownerID) { + return this; + } + var newMap = this._map && this._map.__ensureOwner(ownerID); + if (!ownerID) { + this.__ownerID = ownerID; + this._map = newMap; + return this; + } + return makeRecord(this, newMap, ownerID); + }; + + var RecordPrototype = Record.prototype; + RecordPrototype[DELETE] = RecordPrototype.remove; + RecordPrototype.deleteIn = RecordPrototype.removeIn = MapPrototype.removeIn; + RecordPrototype.merge = MapPrototype.merge; + RecordPrototype.mergeWith = MapPrototype.mergeWith; + RecordPrototype.mergeIn = MapPrototype.mergeIn; + RecordPrototype.mergeDeep = MapPrototype.mergeDeep; + RecordPrototype.mergeDeepWith = MapPrototype.mergeDeepWith; + RecordPrototype.mergeDeepIn = MapPrototype.mergeDeepIn; + RecordPrototype.setIn = MapPrototype.setIn; + RecordPrototype.update = MapPrototype.update; + RecordPrototype.updateIn = MapPrototype.updateIn; + RecordPrototype.withMutations = MapPrototype.withMutations; + RecordPrototype.asMutable = MapPrototype.asMutable; + RecordPrototype.asImmutable = MapPrototype.asImmutable; + + function makeRecord(likeRecord, map, ownerID) { + var record = Object.create(Object.getPrototypeOf(likeRecord)); + record._map = map; + record.__ownerID = ownerID; + return record; + } + + function recordName(record) { + return record._name || record.constructor.name || 'Record'; + } + + function setProps(prototype, names) { + try { + names.forEach(setProp.bind(undefined, prototype)); + } catch (error) { + // Object.defineProperty failed. Probably IE8. + } + } + + function setProp(prototype, name) { + Object.defineProperty(prototype, name, { + get: function () { + return this.get(name); + }, + set: function (value) { + invariant(this.__ownerID, 'Cannot set on an immutable record.'); + this.set(name, value); + }, + }); + } + + createClass(Set, SetCollection); + + // @pragma Construction + + function Set(value) { + return value === null || value === undefined + ? emptySet() + : isSet(value) && !isOrdered(value) + ? value + : emptySet().withMutations(function (set) { + var iter = SetIterable(value); + assertNotInfinite(iter.size); + iter.forEach(function (v) { + return set.add(v); + }); + }); + } + + Set.of = function (/*...values*/) { + return this(arguments); + }; + + Set.fromKeys = function (value) { + return this(KeyedIterable(value).keySeq()); + }; + + Set.prototype.toString = function () { + return this.__toString('Set {', '}'); + }; + + // @pragma Access + + Set.prototype.has = function (value) { + return this._map.has(value); + }; + + // @pragma Modification + + Set.prototype.add = function (value) { + return updateSet(this, this._map.set(value, true)); + }; + + Set.prototype.remove = function (value) { + return updateSet(this, this._map.remove(value)); + }; + + Set.prototype.clear = function () { + return updateSet(this, this._map.clear()); + }; + + // @pragma Composition + + Set.prototype.union = function () { + var iters = SLICE$0.call(arguments, 0); + iters = iters.filter(function (x) { + return x.size !== 0; + }); + if (iters.length === 0) { + return this; + } + if (this.size === 0 && !this.__ownerID && iters.length === 1) { + return this.constructor(iters[0]); + } + return this.withMutations(function (set) { + for (var ii = 0; ii < iters.length; ii++) { + SetIterable(iters[ii]).forEach(function (value) { + return set.add(value); + }); + } + }); + }; + + Set.prototype.intersect = function () { + var iters = SLICE$0.call(arguments, 0); + if (iters.length === 0) { + return this; + } + iters = iters.map(function (iter) { + return SetIterable(iter); + }); + var originalSet = this; + return this.withMutations(function (set) { + originalSet.forEach(function (value) { + if ( + !iters.every(function (iter) { + return iter.includes(value); + }) + ) { + set.remove(value); + } + }); + }); + }; + + Set.prototype.subtract = function () { + var iters = SLICE$0.call(arguments, 0); + if (iters.length === 0) { + return this; + } + iters = iters.map(function (iter) { + return SetIterable(iter); + }); + var originalSet = this; + return this.withMutations(function (set) { + originalSet.forEach(function (value) { + if ( + iters.some(function (iter) { + return iter.includes(value); + }) + ) { + set.remove(value); + } + }); + }); + }; + + Set.prototype.merge = function () { + return this.union.apply(this, arguments); + }; + + Set.prototype.mergeWith = function (merger) { + var iters = SLICE$0.call(arguments, 1); + return this.union.apply(this, iters); + }; + + Set.prototype.sort = function (comparator) { + // Late binding + return OrderedSet(sortFactory(this, comparator)); + }; + + Set.prototype.sortBy = function (mapper, comparator) { + // Late binding + return OrderedSet(sortFactory(this, comparator, mapper)); + }; + + Set.prototype.wasAltered = function () { + return this._map.wasAltered(); + }; + + Set.prototype.__iterate = function (fn, reverse) { + var this$0 = this; + return this._map.__iterate(function (_, k) { + return fn(k, k, this$0); + }, reverse); + }; + + Set.prototype.__iterator = function (type, reverse) { + return this._map + .map(function (_, k) { + return k; + }) + .__iterator(type, reverse); + }; + + Set.prototype.__ensureOwner = function (ownerID) { + if (ownerID === this.__ownerID) { + return this; + } + var newMap = this._map.__ensureOwner(ownerID); + if (!ownerID) { + this.__ownerID = ownerID; + this._map = newMap; + return this; + } + return this.__make(newMap, ownerID); + }; + + function isSet(maybeSet) { + return !!(maybeSet && maybeSet[IS_SET_SENTINEL]); + } + + Set.isSet = isSet; + + var IS_SET_SENTINEL = '@@__IMMUTABLE_SET__@@'; + + var SetPrototype = Set.prototype; + SetPrototype[IS_SET_SENTINEL] = true; + SetPrototype[DELETE] = SetPrototype.remove; + SetPrototype.mergeDeep = SetPrototype.merge; + SetPrototype.mergeDeepWith = SetPrototype.mergeWith; + SetPrototype.withMutations = MapPrototype.withMutations; + SetPrototype.asMutable = MapPrototype.asMutable; + SetPrototype.asImmutable = MapPrototype.asImmutable; + + SetPrototype.__empty = emptySet; + SetPrototype.__make = makeSet; + + function updateSet(set, newMap) { + if (set.__ownerID) { + set.size = newMap.size; + set._map = newMap; + return set; + } + return newMap === set._map ? set : newMap.size === 0 ? set.__empty() : set.__make(newMap); + } + + function makeSet(map, ownerID) { + var set = Object.create(SetPrototype); + set.size = map ? map.size : 0; + set._map = map; + set.__ownerID = ownerID; + return set; + } + + var EMPTY_SET; + function emptySet() { + return EMPTY_SET || (EMPTY_SET = makeSet(emptyMap())); + } + + createClass(OrderedSet, Set); + + // @pragma Construction + + function OrderedSet(value) { + return value === null || value === undefined + ? emptyOrderedSet() + : isOrderedSet(value) + ? value + : emptyOrderedSet().withMutations(function (set) { + var iter = SetIterable(value); + assertNotInfinite(iter.size); + iter.forEach(function (v) { + return set.add(v); + }); + }); + } + + OrderedSet.of = function (/*...values*/) { + return this(arguments); + }; + + OrderedSet.fromKeys = function (value) { + return this(KeyedIterable(value).keySeq()); + }; + + OrderedSet.prototype.toString = function () { + return this.__toString('OrderedSet {', '}'); + }; + + function isOrderedSet(maybeOrderedSet) { + return isSet(maybeOrderedSet) && isOrdered(maybeOrderedSet); + } + + OrderedSet.isOrderedSet = isOrderedSet; + + var OrderedSetPrototype = OrderedSet.prototype; + OrderedSetPrototype[IS_ORDERED_SENTINEL] = true; + + OrderedSetPrototype.__empty = emptyOrderedSet; + OrderedSetPrototype.__make = makeOrderedSet; + + function makeOrderedSet(map, ownerID) { + var set = Object.create(OrderedSetPrototype); + set.size = map ? map.size : 0; + set._map = map; + set.__ownerID = ownerID; + return set; + } + + var EMPTY_ORDERED_SET; + function emptyOrderedSet() { + return EMPTY_ORDERED_SET || (EMPTY_ORDERED_SET = makeOrderedSet(emptyOrderedMap())); + } + + createClass(Stack, IndexedCollection); + + // @pragma Construction + + function Stack(value) { + return value === null || value === undefined + ? emptyStack() + : isStack(value) + ? value + : emptyStack().unshiftAll(value); + } + + Stack.of = function (/*...values*/) { + return this(arguments); + }; + + Stack.prototype.toString = function () { + return this.__toString('Stack [', ']'); + }; + + // @pragma Access + + Stack.prototype.get = function (index, notSetValue) { + var head = this._head; + index = wrapIndex(this, index); + while (head && index--) { + head = head.next; + } + return head ? head.value : notSetValue; + }; + + Stack.prototype.peek = function () { + return this._head && this._head.value; + }; + + // @pragma Modification + + Stack.prototype.push = function (/*...values*/) { + if (arguments.length === 0) { + return this; + } + var newSize = this.size + arguments.length; + var head = this._head; + for (var ii = arguments.length - 1; ii >= 0; ii--) { + head = { + value: arguments[ii], + next: head, + }; + } + if (this.__ownerID) { + this.size = newSize; + this._head = head; + this.__hash = undefined; + this.__altered = true; + return this; + } + return makeStack(newSize, head); + }; + + Stack.prototype.pushAll = function (iter) { + iter = IndexedIterable(iter); + if (iter.size === 0) { + return this; + } + assertNotInfinite(iter.size); + var newSize = this.size; + var head = this._head; + iter.reverse().forEach(function (value) { + newSize++; + head = { + value: value, + next: head, + }; + }); + if (this.__ownerID) { + this.size = newSize; + this._head = head; + this.__hash = undefined; + this.__altered = true; + return this; + } + return makeStack(newSize, head); + }; + + Stack.prototype.pop = function () { + return this.slice(1); + }; + + Stack.prototype.unshift = function (/*...values*/) { + return this.push.apply(this, arguments); + }; + + Stack.prototype.unshiftAll = function (iter) { + return this.pushAll(iter); + }; + + Stack.prototype.shift = function () { + return this.pop.apply(this, arguments); + }; + + Stack.prototype.clear = function () { + if (this.size === 0) { + return this; + } + if (this.__ownerID) { + this.size = 0; + this._head = undefined; + this.__hash = undefined; + this.__altered = true; + return this; + } + return emptyStack(); + }; + + Stack.prototype.slice = function (begin, end) { + if (wholeSlice(begin, end, this.size)) { + return this; + } + var resolvedBegin = resolveBegin(begin, this.size); + var resolvedEnd = resolveEnd(end, this.size); + if (resolvedEnd !== this.size) { + // super.slice(begin, end); + return IndexedCollection.prototype.slice.call(this, begin, end); + } + var newSize = this.size - resolvedBegin; + var head = this._head; + while (resolvedBegin--) { + head = head.next; + } + if (this.__ownerID) { + this.size = newSize; + this._head = head; + this.__hash = undefined; + this.__altered = true; + return this; + } + return makeStack(newSize, head); + }; + + // @pragma Mutability + + Stack.prototype.__ensureOwner = function (ownerID) { + if (ownerID === this.__ownerID) { + return this; + } + if (!ownerID) { + this.__ownerID = ownerID; + this.__altered = false; + return this; + } + return makeStack(this.size, this._head, ownerID, this.__hash); + }; + + // @pragma Iteration + + Stack.prototype.__iterate = function (fn, reverse) { + if (reverse) { + return this.reverse().__iterate(fn); + } + var iterations = 0; + var node = this._head; + while (node) { + if (fn(node.value, iterations++, this) === false) { + break; + } + node = node.next; + } + return iterations; + }; + + Stack.prototype.__iterator = function (type, reverse) { + if (reverse) { + return this.reverse().__iterator(type); + } + var iterations = 0; + var node = this._head; + return new Iterator(function () { + if (node) { + var value = node.value; + node = node.next; + return iteratorValue(type, iterations++, value); + } + return iteratorDone(); + }); + }; + + function isStack(maybeStack) { + return !!(maybeStack && maybeStack[IS_STACK_SENTINEL]); + } + + Stack.isStack = isStack; + + var IS_STACK_SENTINEL = '@@__IMMUTABLE_STACK__@@'; + + var StackPrototype = Stack.prototype; + StackPrototype[IS_STACK_SENTINEL] = true; + StackPrototype.withMutations = MapPrototype.withMutations; + StackPrototype.asMutable = MapPrototype.asMutable; + StackPrototype.asImmutable = MapPrototype.asImmutable; + StackPrototype.wasAltered = MapPrototype.wasAltered; + + function makeStack(size, head, ownerID, hash) { + var map = Object.create(StackPrototype); + map.size = size; + map._head = head; + map.__ownerID = ownerID; + map.__hash = hash; + map.__altered = false; + return map; + } + + var EMPTY_STACK; + function emptyStack() { + return EMPTY_STACK || (EMPTY_STACK = makeStack(0)); + } + + /** + * Contributes additional methods to a constructor + */ + function mixin(ctor, methods) { + var keyCopier = function (key) { + ctor.prototype[key] = methods[key]; + }; + Object.keys(methods).forEach(keyCopier); + Object.getOwnPropertySymbols && Object.getOwnPropertySymbols(methods).forEach(keyCopier); + return ctor; + } + + Iterable.Iterator = Iterator; + + mixin(Iterable, { + // ### Conversion to other types + + toArray: function () { + assertNotInfinite(this.size); + var array = new Array(this.size || 0); + this.valueSeq().__iterate(function (v, i) { + array[i] = v; + }); + return array; + }, + + toIndexedSeq: function () { + return new ToIndexedSequence(this); + }, + + toJS: function () { + return this.toSeq() + .map(function (value) { + return value && typeof value.toJS === 'function' ? value.toJS() : value; + }) + .__toJS(); + }, + + toJSON: function () { + return this.toSeq() + .map(function (value) { + return value && typeof value.toJSON === 'function' ? value.toJSON() : value; + }) + .__toJS(); + }, + + toKeyedSeq: function () { + return new ToKeyedSequence(this, true); + }, + + toMap: function () { + // Use Late Binding here to solve the circular dependency. + return Map(this.toKeyedSeq()); + }, + + toObject: function () { + assertNotInfinite(this.size); + var object = {}; + this.__iterate(function (v, k) { + object[k] = v; + }); + return object; + }, + + toOrderedMap: function () { + // Use Late Binding here to solve the circular dependency. + return OrderedMap(this.toKeyedSeq()); + }, + + toOrderedSet: function () { + // Use Late Binding here to solve the circular dependency. + return OrderedSet(isKeyed(this) ? this.valueSeq() : this); + }, + + toSet: function () { + // Use Late Binding here to solve the circular dependency. + return Set(isKeyed(this) ? this.valueSeq() : this); + }, + + toSetSeq: function () { + return new ToSetSequence(this); + }, + + toSeq: function () { + return isIndexed(this) + ? this.toIndexedSeq() + : isKeyed(this) + ? this.toKeyedSeq() + : this.toSetSeq(); + }, + + toStack: function () { + // Use Late Binding here to solve the circular dependency. + return Stack(isKeyed(this) ? this.valueSeq() : this); + }, + + toList: function () { + // Use Late Binding here to solve the circular dependency. + return List(isKeyed(this) ? this.valueSeq() : this); + }, + + // ### Common JavaScript methods and properties + + toString: function () { + return '[Iterable]'; + }, + + __toString: function (head, tail) { + if (this.size === 0) { + return head + tail; + } + return head + ' ' + this.toSeq().map(this.__toStringMapper).join(', ') + ' ' + tail; + }, + + // ### ES6 Collection methods (ES6 Array and Map) + + concat: function () { + var values = SLICE$0.call(arguments, 0); + return reify(this, concatFactory(this, values)); + }, + + includes: function (searchValue) { + return this.some(function (value) { + return is(value, searchValue); + }); + }, + + entries: function () { + return this.__iterator(ITERATE_ENTRIES); + }, + + every: function (predicate, context) { + assertNotInfinite(this.size); + var returnValue = true; + this.__iterate(function (v, k, c) { + if (!predicate.call(context, v, k, c)) { + returnValue = false; + return false; + } + }); + return returnValue; + }, + + filter: function (predicate, context) { + return reify(this, filterFactory(this, predicate, context, true)); + }, + + find: function (predicate, context, notSetValue) { + var entry = this.findEntry(predicate, context); + return entry ? entry[1] : notSetValue; + }, + + forEach: function (sideEffect, context) { + assertNotInfinite(this.size); + return this.__iterate(context ? sideEffect.bind(context) : sideEffect); + }, + + join: function (separator) { + assertNotInfinite(this.size); + separator = separator !== undefined ? '' + separator : ','; + var joined = ''; + var isFirst = true; + this.__iterate(function (v) { + isFirst ? (isFirst = false) : (joined += separator); + joined += v !== null && v !== undefined ? v.toString() : ''; + }); + return joined; + }, + + keys: function () { + return this.__iterator(ITERATE_KEYS); + }, + + map: function (mapper, context) { + return reify(this, mapFactory(this, mapper, context)); + }, + + reduce: function (reducer, initialReduction, context) { + assertNotInfinite(this.size); + var reduction; + var useFirst; + if (arguments.length < 2) { + useFirst = true; + } else { + reduction = initialReduction; + } + this.__iterate(function (v, k, c) { + if (useFirst) { + useFirst = false; + reduction = v; + } else { + reduction = reducer.call(context, reduction, v, k, c); + } + }); + return reduction; + }, + + reduceRight: function (reducer, initialReduction, context) { + var reversed = this.toKeyedSeq().reverse(); + return reversed.reduce.apply(reversed, arguments); + }, + + reverse: function () { + return reify(this, reverseFactory(this, true)); + }, + + slice: function (begin, end) { + return reify(this, sliceFactory(this, begin, end, true)); + }, + + some: function (predicate, context) { + return !this.every(not(predicate), context); + }, + + sort: function (comparator) { + return reify(this, sortFactory(this, comparator)); + }, + + values: function () { + return this.__iterator(ITERATE_VALUES); + }, + + // ### More sequential methods + + butLast: function () { + return this.slice(0, -1); + }, + + isEmpty: function () { + return this.size !== undefined + ? this.size === 0 + : !this.some(function () { + return true; + }); + }, + + count: function (predicate, context) { + return ensureSize(predicate ? this.toSeq().filter(predicate, context) : this); + }, + + countBy: function (grouper, context) { + return countByFactory(this, grouper, context); + }, + + equals: function (other) { + return deepEqual(this, other); + }, + + entrySeq: function () { + var iterable = this; + if (iterable._cache) { + // We cache as an entries array, so we can just return the cache! + return new ArraySeq(iterable._cache); + } + var entriesSequence = iterable.toSeq().map(entryMapper).toIndexedSeq(); + entriesSequence.fromEntrySeq = function () { + return iterable.toSeq(); + }; + return entriesSequence; + }, + + filterNot: function (predicate, context) { + return this.filter(not(predicate), context); + }, + + findEntry: function (predicate, context, notSetValue) { + var found = notSetValue; + this.__iterate(function (v, k, c) { + if (predicate.call(context, v, k, c)) { + found = [k, v]; + return false; + } + }); + return found; + }, + + findKey: function (predicate, context) { + var entry = this.findEntry(predicate, context); + return entry && entry[0]; + }, + + findLast: function (predicate, context, notSetValue) { + return this.toKeyedSeq().reverse().find(predicate, context, notSetValue); + }, + + findLastEntry: function (predicate, context, notSetValue) { + return this.toKeyedSeq().reverse().findEntry(predicate, context, notSetValue); + }, + + findLastKey: function (predicate, context) { + return this.toKeyedSeq().reverse().findKey(predicate, context); + }, + + first: function () { + return this.find(returnTrue); + }, + + flatMap: function (mapper, context) { + return reify(this, flatMapFactory(this, mapper, context)); + }, + + flatten: function (depth) { + return reify(this, flattenFactory(this, depth, true)); + }, + + fromEntrySeq: function () { + return new FromEntriesSequence(this); + }, + + get: function (searchKey, notSetValue) { + return this.find( + function (_, key) { + return is(key, searchKey); + }, + undefined, + notSetValue, + ); + }, + + getIn: function (searchKeyPath, notSetValue) { + var nested = this; + // Note: in an ES6 environment, we would prefer: + // for (var key of searchKeyPath) { + var iter = forceIterator(searchKeyPath); + var step; + while (!(step = iter.next()).done) { + var key = step.value; + nested = nested && nested.get ? nested.get(key, NOT_SET) : NOT_SET; + if (nested === NOT_SET) { + return notSetValue; + } + } + return nested; + }, + + groupBy: function (grouper, context) { + return groupByFactory(this, grouper, context); + }, + + has: function (searchKey) { + return this.get(searchKey, NOT_SET) !== NOT_SET; + }, + + hasIn: function (searchKeyPath) { + return this.getIn(searchKeyPath, NOT_SET) !== NOT_SET; + }, + + isSubset: function (iter) { + iter = typeof iter.includes === 'function' ? iter : Iterable(iter); + return this.every(function (value) { + return iter.includes(value); + }); + }, + + isSuperset: function (iter) { + iter = typeof iter.isSubset === 'function' ? iter : Iterable(iter); + return iter.isSubset(this); + }, + + keyOf: function (searchValue) { + return this.findKey(function (value) { + return is(value, searchValue); + }); + }, + + keySeq: function () { + return this.toSeq().map(keyMapper).toIndexedSeq(); + }, + + last: function () { + return this.toSeq().reverse().first(); + }, + + lastKeyOf: function (searchValue) { + return this.toKeyedSeq().reverse().keyOf(searchValue); + }, + + max: function (comparator) { + return maxFactory(this, comparator); + }, + + maxBy: function (mapper, comparator) { + return maxFactory(this, comparator, mapper); + }, + + min: function (comparator) { + return maxFactory(this, comparator ? neg(comparator) : defaultNegComparator); + }, + + minBy: function (mapper, comparator) { + return maxFactory(this, comparator ? neg(comparator) : defaultNegComparator, mapper); + }, + + rest: function () { + return this.slice(1); + }, + + skip: function (amount) { + return this.slice(Math.max(0, amount)); + }, + + skipLast: function (amount) { + return reify(this, this.toSeq().reverse().skip(amount).reverse()); + }, + + skipWhile: function (predicate, context) { + return reify(this, skipWhileFactory(this, predicate, context, true)); + }, + + skipUntil: function (predicate, context) { + return this.skipWhile(not(predicate), context); + }, + + sortBy: function (mapper, comparator) { + return reify(this, sortFactory(this, comparator, mapper)); + }, + + take: function (amount) { + return this.slice(0, Math.max(0, amount)); + }, + + takeLast: function (amount) { + return reify(this, this.toSeq().reverse().take(amount).reverse()); + }, + + takeWhile: function (predicate, context) { + return reify(this, takeWhileFactory(this, predicate, context)); + }, + + takeUntil: function (predicate, context) { + return this.takeWhile(not(predicate), context); + }, + + valueSeq: function () { + return this.toIndexedSeq(); + }, + + // ### Hashable Object + + hashCode: function () { + return this.__hash || (this.__hash = hashIterable(this)); + }, + + // ### Internal + + // abstract __iterate(fn, reverse) + + // abstract __iterator(type, reverse) + }); + + // var IS_ITERABLE_SENTINEL = '@@__IMMUTABLE_ITERABLE__@@'; + // var IS_KEYED_SENTINEL = '@@__IMMUTABLE_KEYED__@@'; + // var IS_INDEXED_SENTINEL = '@@__IMMUTABLE_INDEXED__@@'; + // var IS_ORDERED_SENTINEL = '@@__IMMUTABLE_ORDERED__@@'; + + var IterablePrototype = Iterable.prototype; + IterablePrototype[IS_ITERABLE_SENTINEL] = true; + IterablePrototype[ITERATOR_SYMBOL] = IterablePrototype.values; + IterablePrototype.__toJS = IterablePrototype.toArray; + IterablePrototype.__toStringMapper = quoteString; + IterablePrototype.inspect = IterablePrototype.toSource = function () { + return this.toString(); + }; + IterablePrototype.chain = IterablePrototype.flatMap; + IterablePrototype.contains = IterablePrototype.includes; + + mixin(KeyedIterable, { + // ### More sequential methods + + flip: function () { + return reify(this, flipFactory(this)); + }, + + mapEntries: function (mapper, context) { + var this$0 = this; + var iterations = 0; + return reify( + this, + this.toSeq() + .map(function (v, k) { + return mapper.call(context, [k, v], iterations++, this$0); + }) + .fromEntrySeq(), + ); + }, + + mapKeys: function (mapper, context) { + var this$0 = this; + return reify( + this, + this.toSeq() + .flip() + .map(function (k, v) { + return mapper.call(context, k, v, this$0); + }) + .flip(), + ); + }, + }); + + var KeyedIterablePrototype = KeyedIterable.prototype; + KeyedIterablePrototype[IS_KEYED_SENTINEL] = true; + KeyedIterablePrototype[ITERATOR_SYMBOL] = IterablePrototype.entries; + KeyedIterablePrototype.__toJS = IterablePrototype.toObject; + KeyedIterablePrototype.__toStringMapper = function (v, k) { + return JSON.stringify(k) + ': ' + quoteString(v); + }; + + mixin(IndexedIterable, { + // ### Conversion to other types + + toKeyedSeq: function () { + return new ToKeyedSequence(this, false); + }, + + // ### ES6 Collection methods (ES6 Array and Map) + + filter: function (predicate, context) { + return reify(this, filterFactory(this, predicate, context, false)); + }, + + findIndex: function (predicate, context) { + var entry = this.findEntry(predicate, context); + return entry ? entry[0] : -1; + }, + + indexOf: function (searchValue) { + var key = this.keyOf(searchValue); + return key === undefined ? -1 : key; + }, + + lastIndexOf: function (searchValue) { + var key = this.lastKeyOf(searchValue); + return key === undefined ? -1 : key; + }, + + reverse: function () { + return reify(this, reverseFactory(this, false)); + }, + + slice: function (begin, end) { + return reify(this, sliceFactory(this, begin, end, false)); + }, + + splice: function (index, removeNum /*, ...values*/) { + var numArgs = arguments.length; + removeNum = Math.max(removeNum | 0, 0); + if (numArgs === 0 || (numArgs === 2 && !removeNum)) { + return this; + } + // If index is negative, it should resolve relative to the size of the + // collection. However size may be expensive to compute if not cached, so + // only call count() if the number is in fact negative. + index = resolveBegin(index, index < 0 ? this.count() : this.size); + var spliced = this.slice(0, index); + return reify( + this, + numArgs === 1 ? spliced : spliced.concat(arrCopy(arguments, 2), this.slice(index + removeNum)), + ); + }, + + // ### More collection methods + + findLastIndex: function (predicate, context) { + var entry = this.findLastEntry(predicate, context); + return entry ? entry[0] : -1; + }, + + first: function () { + return this.get(0); + }, + + flatten: function (depth) { + return reify(this, flattenFactory(this, depth, false)); + }, + + get: function (index, notSetValue) { + index = wrapIndex(this, index); + return index < 0 || this.size === Infinity || (this.size !== undefined && index > this.size) + ? notSetValue + : this.find( + function (_, key) { + return key === index; + }, + undefined, + notSetValue, + ); + }, + + has: function (index) { + index = wrapIndex(this, index); + return ( + index >= 0 && + (this.size !== undefined + ? this.size === Infinity || index < this.size + : this.indexOf(index) !== -1) + ); + }, + + interpose: function (separator) { + return reify(this, interposeFactory(this, separator)); + }, + + interleave: function (/*...iterables*/) { + var iterables = [this].concat(arrCopy(arguments)); + var zipped = zipWithFactory(this.toSeq(), IndexedSeq.of, iterables); + var interleaved = zipped.flatten(true); + if (zipped.size) { + interleaved.size = zipped.size * iterables.length; + } + return reify(this, interleaved); + }, + + keySeq: function () { + return Range(0, this.size); + }, + + last: function () { + return this.get(-1); + }, + + skipWhile: function (predicate, context) { + return reify(this, skipWhileFactory(this, predicate, context, false)); + }, + + zip: function (/*, ...iterables */) { + var iterables = [this].concat(arrCopy(arguments)); + return reify(this, zipWithFactory(this, defaultZipper, iterables)); + }, + + zipWith: function (zipper /*, ...iterables */) { + var iterables = arrCopy(arguments); + iterables[0] = this; + return reify(this, zipWithFactory(this, zipper, iterables)); + }, + }); + + IndexedIterable.prototype[IS_INDEXED_SENTINEL] = true; + IndexedIterable.prototype[IS_ORDERED_SENTINEL] = true; + + mixin(SetIterable, { + // ### ES6 Collection methods (ES6 Array and Map) + + get: function (value, notSetValue) { + return this.has(value) ? value : notSetValue; + }, + + includes: function (value) { + return this.has(value); + }, + + // ### More sequential methods + + keySeq: function () { + return this.valueSeq(); + }, + }); + + SetIterable.prototype.has = IterablePrototype.includes; + SetIterable.prototype.contains = SetIterable.prototype.includes; + + // Mixin subclasses + + mixin(KeyedSeq, KeyedIterable.prototype); + mixin(IndexedSeq, IndexedIterable.prototype); + mixin(SetSeq, SetIterable.prototype); + + mixin(KeyedCollection, KeyedIterable.prototype); + mixin(IndexedCollection, IndexedIterable.prototype); + mixin(SetCollection, SetIterable.prototype); + + // #pragma Helper functions + + function keyMapper(v, k) { + return k; + } + + function entryMapper(v, k) { + return [k, v]; + } + + function not(predicate) { + return function () { + return !predicate.apply(this, arguments); + }; + } + + function neg(predicate) { + return function () { + return -predicate.apply(this, arguments); + }; + } + + function quoteString(value) { + return typeof value === 'string' ? JSON.stringify(value) : String(value); + } + + function defaultZipper() { + return arrCopy(arguments); + } + + function defaultNegComparator(a, b) { + return a < b ? 1 : a > b ? -1 : 0; + } + + function hashIterable(iterable) { + if (iterable.size === Infinity) { + return 0; + } + var ordered = isOrdered(iterable); + var keyed = isKeyed(iterable); + var h = ordered ? 1 : 0; + var size = iterable.__iterate( + keyed + ? ordered + ? function (v, k) { + h = (31 * h + hashMerge(hash(v), hash(k))) | 0; + } + : function (v, k) { + h = (h + hashMerge(hash(v), hash(k))) | 0; + } + : ordered + ? function (v) { + h = (31 * h + hash(v)) | 0; + } + : function (v) { + h = (h + hash(v)) | 0; + }, + ); + return murmurHashOfSize(size, h); + } + + function murmurHashOfSize(size, h) { + h = imul(h, 0xcc9e2d51); + h = imul((h << 15) | (h >>> -15), 0x1b873593); + h = imul((h << 13) | (h >>> -13), 5); + h = ((h + 0xe6546b64) | 0) ^ size; + h = imul(h ^ (h >>> 16), 0x85ebca6b); + h = imul(h ^ (h >>> 13), 0xc2b2ae35); + h = smi(h ^ (h >>> 16)); + return h; + } + + function hashMerge(a, b) { + return (a ^ (b + 0x9e3779b9 + (a << 6) + (a >> 2))) | 0; // int + } + + var Immutable = { + Iterable: Iterable, + + Seq: Seq, + Collection: Collection, + Map: Map, + OrderedMap: OrderedMap, + List: List, + Stack: Stack, + Set: Set, + OrderedSet: OrderedSet, + + Record: Record, + Range: Range, + Repeat: Repeat, + + is: is, + fromJS: fromJS, + }; + + return Immutable; + }); + + /***/ + }, + /* 19 */ + /***/ function (module, exports, __webpack_require__) { + // 7.1.15 ToLength + var toInteger = __webpack_require__(65), + min = Math.min; + module.exports = function (it) { + return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 + }; + + /***/ + }, + /* 20 */ + /***/ function (module, exports, __webpack_require__) { + // 7.1.13 ToObject(argument) + var defined = __webpack_require__(41); + module.exports = function (it) { + return Object(defined(it)); + }; + + /***/ + }, + /* 21 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (_) { + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_router__ = __webpack_require__(13); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__constants_CurrentUserConstants__ = + __webpack_require__(109); + /* harmony export (immutable) */ __webpack_exports__['b'] = bootstrapCurrentUser; + /* harmony export (immutable) */ __webpack_exports__['g'] = buildCurrentUser; + /* harmony export (immutable) */ __webpack_exports__['h'] = clearCurrentUser; + /* harmony export (immutable) */ __webpack_exports__['c'] = rollbackCurrentUserToPersistentVersion; + /* harmony export (immutable) */ __webpack_exports__['e'] = assignCurrentUserAttributes; + /* unused harmony export enterPendingCurrentUserState */ + /* unused harmony export signInCurrentUserSucceed */ + /* harmony export (immutable) */ __webpack_exports__['a'] = signInCurrentUserFailed; + /* harmony export (immutable) */ __webpack_exports__['m'] = fetchCurrentUser; + /* harmony export (immutable) */ __webpack_exports__['n'] = clearCurrentUserLoadError; + /* unused harmony export signOutCurrentUserSucceed */ + /* unused harmony export signOutCurrentUserFailed */ + /* harmony export (immutable) */ __webpack_exports__['d'] = deleteCurrentUser; + /* unused harmony export createUserSucceed */ + /* unused harmony export createUserInvalidated */ + /* unused harmony export createUserFailed */ + /* harmony export (immutable) */ __webpack_exports__['l'] = createCurrentUser; + /* unused harmony export updateUserSucceed */ + /* unused harmony export updateUserInvalidated */ + /* unused harmony export updateUserFailed */ + /* harmony export (immutable) */ __webpack_exports__['f'] = updateCurrentUser; + /* unused harmony export resetUserPasswordRequestSucceed */ + /* unused harmony export resetUserPasswordRequestInvalidated */ + /* unused harmony export resetUserPasswordRequestFailed */ + /* harmony export (immutable) */ __webpack_exports__['k'] = sendUserPasswordRequest; + /* unused harmony export resetUserPasswordSucceed */ + /* unused harmony export resetUserPasswordInvalidated */ + /* unused harmony export resetUserPasswordFailed */ + /* harmony export (immutable) */ __webpack_exports__['j'] = resetUserPassword; + /* unused harmony export resendConfirmationSucceed */ + /* unused harmony export resendConfirmationInvalidated */ + /* unused harmony export resendConfirmationFailed */ + /* harmony export (immutable) */ __webpack_exports__['i'] = resendConfirmation; + + /** + * + */ + function bootstrapCurrentUser(currentUser) { + return { + type: __WEBPACK_IMPORTED_MODULE_1__constants_CurrentUserConstants__[ + 'a' /* BOOTSTRAP_CURRENT_USER */ + ], + currentUser: currentUser, + }; + } + + /** + * + */ + function buildCurrentUser(attributes) { + return { + type: __WEBPACK_IMPORTED_MODULE_1__constants_CurrentUserConstants__['b' /* BUILD_CURRENT_USER */], + attributes: attributes, + }; + } + + /** + * + */ + function clearCurrentUser() { + return { + type: __WEBPACK_IMPORTED_MODULE_1__constants_CurrentUserConstants__['c' /* CLEAR_CURRENT_USER */], + }; + } + + /** + * + */ + function rollbackCurrentUserToPersistentVersion() { + return { + type: __WEBPACK_IMPORTED_MODULE_1__constants_CurrentUserConstants__[ + 'd' /* ROLLBACK_CURRENT_USER_TO_PERSISTENT_VERSION */ + ], + }; + } + + /** + * + */ + function assignCurrentUserAttributes(attributes, validateAssigned) { + return { + type: __WEBPACK_IMPORTED_MODULE_1__constants_CurrentUserConstants__[ + 'e' /* ASSIGN_CURRENT_USER_ATTRIBUTES */ + ], + attributes: attributes, + validateAssigned: validateAssigned, + }; + } + + /** + * + */ + function enterPendingCurrentUserState() { + return { + type: __WEBPACK_IMPORTED_MODULE_1__constants_CurrentUserConstants__[ + 'f' /* ENTER_PENDING_CURRENT_USER_STATE */ + ], + }; + } + + /** + * + */ + function signInCurrentUserSucceed(currentUser, authenticityToken) { + return { + type: __WEBPACK_IMPORTED_MODULE_1__constants_CurrentUserConstants__[ + 'g' /* SIGN_IN_CURRENT_USER_SUCCEED */ + ], + currentUser: currentUser, + authenticityToken: authenticityToken, + }; + } + + /** + * + */ + function signInCurrentUserFailed(loadError) { + return { + type: __WEBPACK_IMPORTED_MODULE_1__constants_CurrentUserConstants__[ + 'h' /* SIGN_IN_CURRENT_USER_FAILED */ + ], + loadError: loadError, + }; + } + + /** + * + */ + function fetchCurrentUser(email, password, rememberMe) { + return function (dispatch) { + // Dispacth ENTER_PENDING_CURRENT_USER_STATE to move current user conteiner to pending state: + dispatch(enterPendingCurrentUserState()); + + jQuery.ajax({ + url: '/users/sign-in.json', + method: 'POST', + dataType: 'json', + data: { + user: { + email: email, + password: password, + remember_me: rememberMe, + }, + }, + cache: false, + success: function success(responseData) { + // Update CSRF token for all further requests: + // See http://blog.plataformatec.com.br/2013/08/csrf-token-fixation-attacks-in-devise/ for details: + jQuery.ajaxSetup({ + headers: { 'X-CSRF-Token': responseData.csrf_token }, + }); + + __WEBPACK_IMPORTED_MODULE_0_react_router__['a' /* browserHistory */].push('/'); + dispatch(signInCurrentUserSucceed(responseData.current_user, responseData.csrf_token)); + }, + error: function error(jqXHR) { + dispatch(signInCurrentUserFailed(jqXHR.responseJSON.current_user_init_error)); + }, + }); + }; + } + + /** + * + */ + function clearCurrentUserLoadError() { + return { + type: __WEBPACK_IMPORTED_MODULE_1__constants_CurrentUserConstants__[ + 'i' /* CLEAR_CURRENT_USER_LOAD_ERROR */ + ], + }; + } + + /** + * + */ + function signOutCurrentUserSucceed(authenticityToken) { + return { + type: __WEBPACK_IMPORTED_MODULE_1__constants_CurrentUserConstants__[ + 'j' /* SIGN_OUT_CURRENT_USER_SUCCEED */ + ], + authenticityToken: authenticityToken, + }; + } + + /** + * + */ + function signOutCurrentUserFailed(loadError) { + return { + type: __WEBPACK_IMPORTED_MODULE_1__constants_CurrentUserConstants__[ + 'k' /* SIGN_OUT_CURRENT_USER_FAILED */ + ], + loadError: loadError, + }; + } + + /** + * + */ + function deleteCurrentUser() { + return function (dispatch) { + // Dispacth ENTER_PENDING_CURRENT_USER_STATE to move current user conteiner to pending state: + dispatch(enterPendingCurrentUserState()); + + jQuery.ajax({ + url: '/users/sign-out.json', + method: 'DELETE', + dataType: 'json', + cache: false, + success: function success(responseData) { + // Update CSRF token for all further requests: + // See http://blog.plataformatec.com.br/2013/08/csrf-token-fixation-attacks-in-devise/ for details: + jQuery.ajaxSetup({ + headers: { 'X-CSRF-Token': responseData.csrf_token }, + }); + + __WEBPACK_IMPORTED_MODULE_0_react_router__['a' /* browserHistory */].push('/'); + dispatch(signOutCurrentUserSucceed(responseData.csrf_token)); + }, + error: function error(jqXHR) { + dispatch(signOutCurrentUserFailed(jqXHR.error)); + }, + }); + }; + } + + /** + * + */ + function createUserSucceed(responseData) { + return { + type: __WEBPACK_IMPORTED_MODULE_1__constants_CurrentUserConstants__[ + 'l' /* CREATE_USER_SUCCEED */ + ], + responseData: responseData, + }; + } + + /** + * + */ + function createUserInvalidated(responseData) { + return { + type: __WEBPACK_IMPORTED_MODULE_1__constants_CurrentUserConstants__[ + 'm' /* CREATE_USER_INVALIDATED */ + ], + responseData: responseData, + }; + } + + /** + * + */ + function createUserFailed() { + return { + type: __WEBPACK_IMPORTED_MODULE_1__constants_CurrentUserConstants__['n' /* CREATE_USER_FAILED */], + }; + } + + /** + * + */ + function createCurrentUser(attributes) { + return function (dispatch) { + // Dispacth ENTER_PENDING_CURRENT_USER_STATE to move current user conteiner to pending state: + dispatch(enterPendingCurrentUserState()); + + jQuery.ajax({ + url: '/users/sign-up.json', + method: 'POST', + dataType: 'json', + data: attributes, + cache: false, + success: function success(responseData) { + if (!_.isEmpty(responseData.current_user.errors)) { + dispatch(createUserInvalidated(responseData)); + return; + } + + dispatch(createUserSucceed(responseData)); + __WEBPACK_IMPORTED_MODULE_0_react_router__['a' /* browserHistory */].push('/'); + }, + error: function error(jqXHR) { + dispatch(createUserFailed(jqXHR.error)); + }, + }); + }; + } + + /** + * + */ + function updateUserSucceed(responseData) { + return { + type: __WEBPACK_IMPORTED_MODULE_1__constants_CurrentUserConstants__[ + 'o' /* UPDATE_USER_SUCCEED */ + ], + responseData: responseData, + }; + } + + /** + * + */ + function updateUserInvalidated(responseData) { + return { + type: __WEBPACK_IMPORTED_MODULE_1__constants_CurrentUserConstants__[ + 'p' /* UPDATE_USER_INVALIDATED */ + ], + responseData: responseData, + }; + } + + /** + * + */ + function updateUserFailed() { + return { + type: __WEBPACK_IMPORTED_MODULE_1__constants_CurrentUserConstants__['q' /* UPDATE_USER_FAILED */], + }; + } + + /** + * + */ + function updateCurrentUser(attributes) { + return function (dispatch) { + // Dispacth ENTER_PENDING_CURRENT_USER_STATE to move current user conteiner to pending state: + dispatch(enterPendingCurrentUserState()); + + jQuery.ajax({ + url: '/users/current.json', + method: 'PUT', + dataType: 'json', + data: attributes, + cache: false, + success: function success(responseData) { + if (!_.isEmpty(responseData.current_user.errors)) { + dispatch(updateUserInvalidated(responseData)); + return; + } + + dispatch(updateUserSucceed(responseData)); + }, + error: function error(jqXHR) { + dispatch(updateUserFailed(jqXHR.error)); + }, + }); + }; + } + + /** + * + */ + function resetUserPasswordRequestSucceed(responseData) { + return { + type: __WEBPACK_IMPORTED_MODULE_1__constants_CurrentUserConstants__[ + 'r' /* RESET_USER_PASSWORD_REQUEST_SUCCEED */ + ], + responseData: responseData, + }; + } + + /** + * + */ + function resetUserPasswordRequestInvalidated(responseData) { + return { + type: __WEBPACK_IMPORTED_MODULE_1__constants_CurrentUserConstants__[ + 's' /* RESET_USER_PASSWORD_REQUEST_INVALIDATED */ + ], + responseData: responseData, + }; + } + + /** + * + */ + function resetUserPasswordRequestFailed() { + return { + type: __WEBPACK_IMPORTED_MODULE_1__constants_CurrentUserConstants__[ + 't' /* RESET_USER_PASSWORD_REQUEST_FAILED */ + ], + }; + } + + /** + * + */ + function sendUserPasswordRequest(attributes) { + return function (dispatch) { + // Dispacth ENTER_PENDING_CURRENT_USER_STATE to move current user conteiner to pending state: + dispatch(enterPendingCurrentUserState()); + + jQuery.ajax({ + url: '/users/reset-password-request.json', + method: 'POST', + dataType: 'json', + data: attributes, + cache: false, + success: function success(responseData) { + if (!_.isEmpty(responseData.current_user.errors)) { + dispatch(resetUserPasswordRequestInvalidated(responseData)); + return; + } + + __WEBPACK_IMPORTED_MODULE_0_react_router__['a' /* browserHistory */].push('/'); + dispatch(resetUserPasswordRequestSucceed(responseData)); + }, + error: function error(jqXHR) { + dispatch(resetUserPasswordRequestFailed(jqXHR.error)); + }, + }); + }; + } + + /** + * + */ + function resetUserPasswordSucceed(responseData) { + return { + type: __WEBPACK_IMPORTED_MODULE_1__constants_CurrentUserConstants__[ + 'u' /* RESET_USER_PASSWORD_SUCCEED */ + ], + responseData: responseData, + }; + } + + /** + * + */ + function resetUserPasswordInvalidated(responseData) { + return { + type: __WEBPACK_IMPORTED_MODULE_1__constants_CurrentUserConstants__[ + 'v' /* RESET_USER_PASSWORD_INVALIDATED */ + ], + responseData: responseData, + }; + } + + /** + * + */ + function resetUserPasswordFailed() { + return { + type: __WEBPACK_IMPORTED_MODULE_1__constants_CurrentUserConstants__[ + 'w' /* RESET_USER_PASSWORD_FAILED */ + ], + }; + } + + /** + * + */ + function resetUserPassword(attributes) { + return function (dispatch) { + // Dispacth ENTER_PENDING_CURRENT_USER_STATE to move current user conteiner to pending state: + dispatch(enterPendingCurrentUserState()); + + jQuery.ajax({ + url: '/users/reset-password.json', + method: 'PATCH', + dataType: 'json', + data: attributes, + cache: false, + success: function success(responseData) { + if (!_.isEmpty(responseData.current_user.errors)) { + dispatch(resetUserPasswordInvalidated(responseData)); + return; + } + + __WEBPACK_IMPORTED_MODULE_0_react_router__['a' /* browserHistory */].push('/'); + dispatch(resetUserPasswordSucceed(responseData)); + }, + error: function error(jqXHR) { + dispatch(resetUserPasswordFailed(jqXHR.error)); + }, + }); + }; + } + + /** + * + */ + function resendConfirmationSucceed(responseData) { + return { + type: __WEBPACK_IMPORTED_MODULE_1__constants_CurrentUserConstants__[ + 'x' /* RESEND_CONFIRMATION_SUCCEED */ + ], + responseData: responseData, + }; + } + + /** + * + */ + function resendConfirmationInvalidated(responseData) { + return { + type: __WEBPACK_IMPORTED_MODULE_1__constants_CurrentUserConstants__[ + 'y' /* RESEND_CONFIRMATION_INVALIDATED */ + ], + responseData: responseData, + }; + } + + /** + * + */ + function resendConfirmationFailed() { + return { + type: __WEBPACK_IMPORTED_MODULE_1__constants_CurrentUserConstants__[ + 'z' /* RESEND_CONFIRMATION_FAILED */ + ], + }; + } + + /** + * + */ + function resendConfirmation(attributes) { + return function (dispatch) { + // Dispacth ENTER_PENDING_CURRENT_USER_STATE to move current user conteiner to pending state: + dispatch(enterPendingCurrentUserState()); + + jQuery.ajax({ + url: '/users/resend-confirmation.json', + method: 'POST', + dataType: 'json', + data: attributes, + cache: false, + success: function success(responseData) { + if (!_.isEmpty(responseData.current_user.errors)) { + dispatch(resendConfirmationInvalidated(responseData)); + return; + } + + __WEBPACK_IMPORTED_MODULE_0_react_router__['a' /* browserHistory */].push('/'); + dispatch(resendConfirmationSucceed(responseData)); + }, + error: function error(jqXHR) { + dispatch(resendConfirmationFailed(jqXHR.error)); + }, + }); + }; + } + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(60)); + + /***/ + }, + /* 22 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + /** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + function makeEmptyFunction(arg) { + return function () { + return arg; + }; + } + + /** + * This function accepts and discards inputs; it has no side effects. This is + * primarily useful idiomatically for overridable function endpoints which + * always need to be callable, since JS lacks a null-call idiom ala Cocoa. + */ + var emptyFunction = function emptyFunction() {}; + + emptyFunction.thatReturns = makeEmptyFunction; + emptyFunction.thatReturnsFalse = makeEmptyFunction(false); + emptyFunction.thatReturnsTrue = makeEmptyFunction(true); + emptyFunction.thatReturnsNull = makeEmptyFunction(null); + emptyFunction.thatReturnsThis = function () { + return this; + }; + emptyFunction.thatReturnsArgument = function (arg) { + return arg; + }; + + module.exports = emptyFunction; + + /***/ + }, + /* 23 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + + /** + * Use invariant() to assert state which your program assumes to be true. + * + * Provide sprintf-style format (only %s is supported) and arguments + * to provide information about what broke and what you were + * expecting. + * + * The invariant message will be stripped in production, but the invariant + * will remain to ensure logic does not differ in production. + */ + + var invariant = function (condition, format, a, b, c, d, e, f) { + if (true) { + if (format === undefined) { + throw new Error('invariant requires an error message argument'); + } + } + + if (!condition) { + var error; + if (format === undefined) { + error = new Error( + 'Minified exception occurred; use the non-minified dev environment ' + + 'for the full error message and additional helpful warnings.', + ); + } else { + var args = [a, b, c, d, e, f]; + var argIndex = 0; + error = new Error( + format.replace(/%s/g, function () { + return args[argIndex++]; + }), + ); + error.name = 'Invariant Violation'; + } + + error.framesToPop = 1; // we don't care about invariant's own frame + throw error; + } + }; + + module.exports = invariant; + + /***/ + }, + /* 24 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2016-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + var _prodInvariant = __webpack_require__(87); + + var ReactCurrentOwner = __webpack_require__(53); + + var invariant = __webpack_require__(3); + var warning = __webpack_require__(4); + + function isNative(fn) { + // Based on isNative() from Lodash + var funcToString = Function.prototype.toString; + var hasOwnProperty = Object.prototype.hasOwnProperty; + var reIsNative = RegExp( + '^' + + funcToString + // Take an example native function source for comparison + .call(hasOwnProperty) + // Strip regex characters so we can use it for regex + .replace(/[\\^$.*+?()[\]{}|]/g, '\\$&') + // Remove hasOwnProperty from the template to make it generic + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + + '$', + ); + try { + var source = funcToString.call(fn); + return reIsNative.test(source); + } catch (err) { + return false; + } + } + + var canUseCollections = + // Array.from + typeof Array.from === 'function' && + // Map + typeof Map === 'function' && + isNative(Map) && + // Map.prototype.keys + Map.prototype != null && + typeof Map.prototype.keys === 'function' && + isNative(Map.prototype.keys) && + // Set + typeof Set === 'function' && + isNative(Set) && + // Set.prototype.keys + Set.prototype != null && + typeof Set.prototype.keys === 'function' && + isNative(Set.prototype.keys); + + var setItem; + var getItem; + var removeItem; + var getItemIDs; + var addRoot; + var removeRoot; + var getRootIDs; + + if (canUseCollections) { + var itemMap = new Map(); + var rootIDSet = new Set(); + + setItem = function (id, item) { + itemMap.set(id, item); + }; + getItem = function (id) { + return itemMap.get(id); + }; + removeItem = function (id) { + itemMap['delete'](id); + }; + getItemIDs = function () { + return Array.from(itemMap.keys()); + }; + + addRoot = function (id) { + rootIDSet.add(id); + }; + removeRoot = function (id) { + rootIDSet['delete'](id); + }; + getRootIDs = function () { + return Array.from(rootIDSet.keys()); + }; + } else { + var itemByKey = {}; + var rootByKey = {}; + + // Use non-numeric keys to prevent V8 performance issues: + // https://github.com/facebook/react/pull/7232 + var getKeyFromID = function (id) { + return '.' + id; + }; + var getIDFromKey = function (key) { + return parseInt(key.substr(1), 10); + }; + + setItem = function (id, item) { + var key = getKeyFromID(id); + itemByKey[key] = item; + }; + getItem = function (id) { + var key = getKeyFromID(id); + return itemByKey[key]; + }; + removeItem = function (id) { + var key = getKeyFromID(id); + delete itemByKey[key]; + }; + getItemIDs = function () { + return Object.keys(itemByKey).map(getIDFromKey); + }; + + addRoot = function (id) { + var key = getKeyFromID(id); + rootByKey[key] = true; + }; + removeRoot = function (id) { + var key = getKeyFromID(id); + delete rootByKey[key]; + }; + getRootIDs = function () { + return Object.keys(rootByKey).map(getIDFromKey); + }; + } + + var unmountedIDs = []; + + function purgeDeep(id) { + var item = getItem(id); + if (item) { + var childIDs = item.childIDs; + + removeItem(id); + childIDs.forEach(purgeDeep); + } + } + + function describeComponentFrame(name, source, ownerName) { + return ( + '\n in ' + + (name || 'Unknown') + + (source + ? ' (at ' + source.fileName.replace(/^.*[\\\/]/, '') + ':' + source.lineNumber + ')' + : ownerName + ? ' (created by ' + ownerName + ')' + : '') + ); + } + + function getDisplayName(element) { + if (element == null) { + return '#empty'; + } else if (typeof element === 'string' || typeof element === 'number') { + return '#text'; + } else if (typeof element.type === 'string') { + return element.type; + } else { + return element.type.displayName || element.type.name || 'Unknown'; + } + } + + function describeID(id) { + var name = ReactComponentTreeHook.getDisplayName(id); + var element = ReactComponentTreeHook.getElement(id); + var ownerID = ReactComponentTreeHook.getOwnerID(id); + var ownerName; + if (ownerID) { + ownerName = ReactComponentTreeHook.getDisplayName(ownerID); + } + true + ? warning( + element, + 'ReactComponentTreeHook: Missing React element for debugID %s when ' + 'building stack', + id, + ) + : void 0; + return describeComponentFrame(name, element && element._source, ownerName); + } + + var ReactComponentTreeHook = { + onSetChildren: function (id, nextChildIDs) { + var item = getItem(id); + !item ? (true ? invariant(false, 'Item must have been set') : _prodInvariant('144')) : void 0; + item.childIDs = nextChildIDs; + + for (var i = 0; i < nextChildIDs.length; i++) { + var nextChildID = nextChildIDs[i]; + var nextChild = getItem(nextChildID); + !nextChild + ? true + ? invariant( + false, + 'Expected hook events to fire for the child before its parent includes it in onSetChildren().', + ) + : _prodInvariant('140') + : void 0; + !( + nextChild.childIDs != null || + typeof nextChild.element !== 'object' || + nextChild.element == null + ) + ? true + ? invariant( + false, + 'Expected onSetChildren() to fire for a container child before its parent includes it in onSetChildren().', + ) + : _prodInvariant('141') + : void 0; + !nextChild.isMounted + ? true + ? invariant( + false, + 'Expected onMountComponent() to fire for the child before its parent includes it in onSetChildren().', + ) + : _prodInvariant('71') + : void 0; + if (nextChild.parentID == null) { + nextChild.parentID = id; + // TODO: This shouldn't be necessary but mounting a new root during in + // componentWillMount currently causes not-yet-mounted components to + // be purged from our tree data so their parent id is missing. + } + !(nextChild.parentID === id) + ? true + ? invariant( + false, + 'Expected onBeforeMountComponent() parent and onSetChildren() to be consistent (%s has parents %s and %s).', + nextChildID, + nextChild.parentID, + id, + ) + : _prodInvariant('142', nextChildID, nextChild.parentID, id) + : void 0; + } + }, + onBeforeMountComponent: function (id, element, parentID) { + var item = { + element: element, + parentID: parentID, + text: null, + childIDs: [], + isMounted: false, + updateCount: 0, + }; + setItem(id, item); + }, + onBeforeUpdateComponent: function (id, element) { + var item = getItem(id); + if (!item || !item.isMounted) { + // We may end up here as a result of setState() in componentWillUnmount(). + // In this case, ignore the element. + return; + } + item.element = element; + }, + onMountComponent: function (id) { + var item = getItem(id); + !item ? (true ? invariant(false, 'Item must have been set') : _prodInvariant('144')) : void 0; + item.isMounted = true; + var isRoot = item.parentID === 0; + if (isRoot) { + addRoot(id); + } + }, + onUpdateComponent: function (id) { + var item = getItem(id); + if (!item || !item.isMounted) { + // We may end up here as a result of setState() in componentWillUnmount(). + // In this case, ignore the element. + return; + } + item.updateCount++; + }, + onUnmountComponent: function (id) { + var item = getItem(id); + if (item) { + // We need to check if it exists. + // `item` might not exist if it is inside an error boundary, and a sibling + // error boundary child threw while mounting. Then this instance never + // got a chance to mount, but it still gets an unmounting event during + // the error boundary cleanup. + item.isMounted = false; + var isRoot = item.parentID === 0; + if (isRoot) { + removeRoot(id); + } + } + unmountedIDs.push(id); + }, + purgeUnmountedComponents: function () { + if (ReactComponentTreeHook._preventPurging) { + // Should only be used for testing. + return; + } + + for (var i = 0; i < unmountedIDs.length; i++) { + var id = unmountedIDs[i]; + purgeDeep(id); + } + unmountedIDs.length = 0; + }, + isMounted: function (id) { + var item = getItem(id); + return item ? item.isMounted : false; + }, + getCurrentStackAddendum: function (topElement) { + var info = ''; + if (topElement) { + var name = getDisplayName(topElement); + var owner = topElement._owner; + info += describeComponentFrame(name, topElement._source, owner && owner.getName()); + } + + var currentOwner = ReactCurrentOwner.current; + var id = currentOwner && currentOwner._debugID; + + info += ReactComponentTreeHook.getStackAddendumByID(id); + return info; + }, + getStackAddendumByID: function (id) { + var info = ''; + while (id) { + info += describeID(id); + id = ReactComponentTreeHook.getParentID(id); + } + return info; + }, + getChildIDs: function (id) { + var item = getItem(id); + return item ? item.childIDs : []; + }, + getDisplayName: function (id) { + var element = ReactComponentTreeHook.getElement(id); + if (!element) { + return null; + } + return getDisplayName(element); + }, + getElement: function (id) { + var item = getItem(id); + return item ? item.element : null; + }, + getOwnerID: function (id) { + var element = ReactComponentTreeHook.getElement(id); + if (!element || !element._owner) { + return null; + } + return element._owner._debugID; + }, + getParentID: function (id) { + var item = getItem(id); + return item ? item.parentID : null; + }, + getSource: function (id) { + var item = getItem(id); + var element = item ? item.element : null; + var source = element != null ? element._source : null; + return source; + }, + getText: function (id) { + var element = ReactComponentTreeHook.getElement(id); + if (typeof element === 'string') { + return element; + } else if (typeof element === 'number') { + return '' + element; + } else { + return null; + } + }, + getUpdateCount: function (id) { + var item = getItem(id); + return item ? item.updateCount : 0; + }, + + getRootIDs: getRootIDs, + getRegisteredIDs: getItemIDs, + }; + + module.exports = ReactComponentTreeHook; + + /***/ + }, + /* 25 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (React) { + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(2); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames__ = __webpack_require__(35); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_classnames__, + ); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var ProgressBar = (function (_React$Component) { + _inherits(ProgressBar, _React$Component); + + /** + * + */ + function ProgressBar(props) { + _classCallCheck(this, ProgressBar); + + var _this = _possibleConstructorReturn( + this, + (ProgressBar.__proto__ || Object.getPrototypeOf(ProgressBar)).call(this, props), + ); + + _this.state = { percentage: 0 }; + return _this; + } + + /** + * + */ + + /** + * + */ + + _createClass(ProgressBar, [ + { + key: 'componentDidMount', + value: function componentDidMount() { + var _this2 = this; + + this.animationIntervalId = setInterval(function () { + var newPercentage = _this2.state.percentage >= 100 ? 0 : _this2.state.percentage + 10; + _this2.setState({ percentage: newPercentage }); + }, 100); + }, + + /** + * + */ + }, + { + key: 'componentWillUnmount', + value: function componentWillUnmount() { + clearInterval(this.animationIntervalId); + }, + + /** + * + */ + }, + { + key: 'render', + value: function render() { + var barStyle = { width: this.state.percentage + '%' }; + var barClass = __WEBPACK_IMPORTED_MODULE_1_classnames___default()('bar', { + animated: this.state.percentage !== 0, + }); + + return React.createElement( + 'div', + { id: 'progress-bar' }, + this.props.label, + React.createElement( + 'div', + { className: 'box' }, + React.createElement('div', { className: barClass, style: barStyle }), + ), + ); + }, + }, + ]); + + return ProgressBar; + })(React.Component); + + ProgressBar.propTypes = { + label: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.node.isRequired, + }; + + /* harmony default export */ __webpack_exports__['a'] = ProgressBar; + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(1)); + + /***/ + }, + /* 26 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (_) { + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_query_string__ = __webpack_require__(312); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_query_string___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_query_string__, + ); + /* harmony export (immutable) */ __webpack_exports__['a'] = calculatePaginationKey; + + /** + * + */ + function calculatePaginationKey(pathname, queryStr) { + var parsedQuery = __WEBPACK_IMPORTED_MODULE_0_query_string___default.a.parse(queryStr); + + // Leave only params that affect pagination layout, except page: + var filteredQueryParams = _.pick(parsedQuery, 'page', 'tag'); + return ( + pathname + __WEBPACK_IMPORTED_MODULE_0_query_string___default.a.stringify(filteredQueryParams) + ); + } + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(60)); + + /***/ + }, + /* 27 */ + /***/ function (module, exports) { + var hasOwnProperty = {}.hasOwnProperty; + module.exports = function (it, key) { + return hasOwnProperty.call(it, key); + }; + + /***/ + }, + /* 28 */ + /***/ function (module, exports) { + module.exports = function (it) { + if (typeof it != 'function') throw TypeError(it + ' is not a function!'); + return it; + }; + + /***/ + }, + /* 29 */ + /***/ function (module, exports, __webpack_require__) { + var dP = __webpack_require__(15), + createDesc = __webpack_require__(64); + module.exports = __webpack_require__(14) + ? function (object, key, value) { + return dP.f(object, key, createDesc(1, value)); + } + : function (object, key, value) { + object[key] = value; + return object; + }; + + /***/ + }, + /* 30 */ + /***/ function (module, exports, __webpack_require__) { + var global = __webpack_require__(8), + hide = __webpack_require__(29), + has = __webpack_require__(27), + SRC = __webpack_require__(84)('src'), + TO_STRING = 'toString', + $toString = Function[TO_STRING], + TPL = ('' + $toString).split(TO_STRING); + + __webpack_require__(55).inspectSource = function (it) { + return $toString.call(it); + }; + + (module.exports = function (O, key, val, safe) { + var isFunction = typeof val == 'function'; + if (isFunction) has(val, 'name') || hide(val, 'name', key); + if (O[key] === val) return; + if (isFunction) has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key))); + if (O === global) { + O[key] = val; + } else { + if (!safe) { + delete O[key]; + hide(O, key, val); + } else { + if (O[key]) O[key] = val; + else hide(O, key, val); + } + } + // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative + })(Function.prototype, TO_STRING, function toString() { + return (typeof this == 'function' && this[SRC]) || $toString.call(this); + }); + + /***/ + }, + /* 31 */ + /***/ function (module, exports, __webpack_require__) { + var $export = __webpack_require__(0), + fails = __webpack_require__(10), + defined = __webpack_require__(41), + quot = /"/g; + // B.2.3.2.1 CreateHTML(string, tag, attribute, value) + var createHTML = function (string, tag, attribute, value) { + var S = String(defined(string)), + p1 = '<' + tag; + if (attribute !== '') p1 += ' ' + attribute + '="' + String(value).replace(quot, '"') + '"'; + return p1 + '>' + S + ''; + }; + module.exports = function (NAME, exec) { + var O = {}; + O[NAME] = exec(createHTML); + $export( + $export.P + + $export.F * + fails(function () { + var test = ''[NAME]('"'); + return test !== test.toLowerCase() || test.split('"').length > 3; + }), + 'String', + O, + ); + }; + + /***/ + }, + /* 32 */ + /***/ function (module, exports, __webpack_require__) { + // to indexed object, toObject with fallback for non-array-like ES3 strings + var IObject = __webpack_require__(120), + defined = __webpack_require__(41); + module.exports = function (it) { + return IObject(defined(it)); + }; + + /***/ + }, + /* 33 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2016-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + // Trust the developer to only use ReactInstrumentation with a __DEV__ check + + var debugTool = null; + + if (true) { + var ReactDebugTool = __webpack_require__(320); + debugTool = ReactDebugTool; + } + + module.exports = { debugTool: debugTool }; + + /***/ + }, + /* 34 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var _prodInvariant = __webpack_require__(7), + _assign = __webpack_require__(9); + + var CallbackQueue = __webpack_require__(314); + var PooledClass = __webpack_require__(85); + var ReactFeatureFlags = __webpack_require__(323); + var ReactReconciler = __webpack_require__(69); + var Transaction = __webpack_require__(149); + + var invariant = __webpack_require__(3); + + var dirtyComponents = []; + var updateBatchNumber = 0; + var asapCallbackQueue = CallbackQueue.getPooled(); + var asapEnqueued = false; + + var batchingStrategy = null; + + function ensureInjected() { + !(ReactUpdates.ReactReconcileTransaction && batchingStrategy) + ? true + ? invariant( + false, + 'ReactUpdates: must inject a reconcile transaction class and batching strategy', + ) + : _prodInvariant('123') + : void 0; + } + + var NESTED_UPDATES = { + initialize: function () { + this.dirtyComponentsLength = dirtyComponents.length; + }, + close: function () { + if (this.dirtyComponentsLength !== dirtyComponents.length) { + // Additional updates were enqueued by componentDidUpdate handlers or + // similar; before our own UPDATE_QUEUEING wrapper closes, we want to run + // these new updates so that if A's componentDidUpdate calls setState on + // B, B will update before the callback A's updater provided when calling + // setState. + dirtyComponents.splice(0, this.dirtyComponentsLength); + flushBatchedUpdates(); + } else { + dirtyComponents.length = 0; + } + }, + }; + + var UPDATE_QUEUEING = { + initialize: function () { + this.callbackQueue.reset(); + }, + close: function () { + this.callbackQueue.notifyAll(); + }, + }; + + var TRANSACTION_WRAPPERS = [NESTED_UPDATES, UPDATE_QUEUEING]; + + function ReactUpdatesFlushTransaction() { + this.reinitializeTransaction(); + this.dirtyComponentsLength = null; + this.callbackQueue = CallbackQueue.getPooled(); + this.reconcileTransaction = ReactUpdates.ReactReconcileTransaction.getPooled( + /* useCreateElement */ true, + ); + } + + _assign(ReactUpdatesFlushTransaction.prototype, Transaction, { + getTransactionWrappers: function () { + return TRANSACTION_WRAPPERS; + }, + + destructor: function () { + this.dirtyComponentsLength = null; + CallbackQueue.release(this.callbackQueue); + this.callbackQueue = null; + ReactUpdates.ReactReconcileTransaction.release(this.reconcileTransaction); + this.reconcileTransaction = null; + }, + + perform: function (method, scope, a) { + // Essentially calls `this.reconcileTransaction.perform(method, scope, a)` + // with this transaction's wrappers around it. + return Transaction.perform.call( + this, + this.reconcileTransaction.perform, + this.reconcileTransaction, + method, + scope, + a, + ); + }, + }); + + PooledClass.addPoolingTo(ReactUpdatesFlushTransaction); + + function batchedUpdates(callback, a, b, c, d, e) { + ensureInjected(); + return batchingStrategy.batchedUpdates(callback, a, b, c, d, e); + } + + /** + * Array comparator for ReactComponents by mount ordering. + * + * @param {ReactComponent} c1 first component you're comparing + * @param {ReactComponent} c2 second component you're comparing + * @return {number} Return value usable by Array.prototype.sort(). + */ + function mountOrderComparator(c1, c2) { + return c1._mountOrder - c2._mountOrder; + } + + function runBatchedUpdates(transaction) { + var len = transaction.dirtyComponentsLength; + !(len === dirtyComponents.length) + ? true + ? invariant( + false, + "Expected flush transaction's stored dirty-components length (%s) to match dirty-components array length (%s).", + len, + dirtyComponents.length, + ) + : _prodInvariant('124', len, dirtyComponents.length) + : void 0; + + // Since reconciling a component higher in the owner hierarchy usually (not + // always -- see shouldComponentUpdate()) will reconcile children, reconcile + // them before their children by sorting the array. + dirtyComponents.sort(mountOrderComparator); + + // Any updates enqueued while reconciling must be performed after this entire + // batch. Otherwise, if dirtyComponents is [A, B] where A has children B and + // C, B could update twice in a single batch if C's render enqueues an update + // to B (since B would have already updated, we should skip it, and the only + // way we can know to do so is by checking the batch counter). + updateBatchNumber++; + + for (var i = 0; i < len; i++) { + // If a component is unmounted before pending changes apply, it will still + // be here, but we assume that it has cleared its _pendingCallbacks and + // that performUpdateIfNecessary is a noop. + var component = dirtyComponents[i]; + + // If performUpdateIfNecessary happens to enqueue any new updates, we + // shouldn't execute the callbacks until the next render happens, so + // stash the callbacks first + var callbacks = component._pendingCallbacks; + component._pendingCallbacks = null; + + var markerName; + if (ReactFeatureFlags.logTopLevelRenders) { + var namedComponent = component; + // Duck type TopLevelWrapper. This is probably always true. + if (component._currentElement.type.isReactTopLevelWrapper) { + namedComponent = component._renderedComponent; + } + markerName = 'React update: ' + namedComponent.getName(); + console.time(markerName); + } + + ReactReconciler.performUpdateIfNecessary( + component, + transaction.reconcileTransaction, + updateBatchNumber, + ); + + if (markerName) { + console.timeEnd(markerName); + } + + if (callbacks) { + for (var j = 0; j < callbacks.length; j++) { + transaction.callbackQueue.enqueue(callbacks[j], component.getPublicInstance()); + } + } + } + } + + var flushBatchedUpdates = function () { + // ReactUpdatesFlushTransaction's wrappers will clear the dirtyComponents + // array and perform any updates enqueued by mount-ready handlers (i.e., + // componentDidUpdate) but we need to check here too in order to catch + // updates enqueued by setState callbacks and asap calls. + while (dirtyComponents.length || asapEnqueued) { + if (dirtyComponents.length) { + var transaction = ReactUpdatesFlushTransaction.getPooled(); + transaction.perform(runBatchedUpdates, null, transaction); + ReactUpdatesFlushTransaction.release(transaction); + } + + if (asapEnqueued) { + asapEnqueued = false; + var queue = asapCallbackQueue; + asapCallbackQueue = CallbackQueue.getPooled(); + queue.notifyAll(); + CallbackQueue.release(queue); + } + } + }; + + /** + * Mark a component as needing a rerender, adding an optional callback to a + * list of functions which will be executed once the rerender occurs. + */ + function enqueueUpdate(component) { + ensureInjected(); + + // Various parts of our code (such as ReactCompositeComponent's + // _renderValidatedComponent) assume that calls to render aren't nested; + // verify that that's the case. (This is called by each top-level update + // function, like setState, forceUpdate, etc.; creation and + // destruction of top-level components is guarded in ReactMount.) + + if (!batchingStrategy.isBatchingUpdates) { + batchingStrategy.batchedUpdates(enqueueUpdate, component); + return; + } + + dirtyComponents.push(component); + if (component._updateBatchNumber == null) { + component._updateBatchNumber = updateBatchNumber + 1; + } + } + + /** + * Enqueue a callback to be run at the end of the current batching cycle. Throws + * if no updates are currently being performed. + */ + function asap(callback, context) { + !batchingStrategy.isBatchingUpdates + ? true + ? invariant( + false, + "ReactUpdates.asap: Can't enqueue an asap callback in a context whereupdates are not being batched.", + ) + : _prodInvariant('125') + : void 0; + asapCallbackQueue.enqueue(callback, context); + asapEnqueued = true; + } + + var ReactUpdatesInjection = { + injectReconcileTransaction: function (ReconcileTransaction) { + !ReconcileTransaction + ? true + ? invariant(false, 'ReactUpdates: must provide a reconcile transaction class') + : _prodInvariant('126') + : void 0; + ReactUpdates.ReactReconcileTransaction = ReconcileTransaction; + }, + + injectBatchingStrategy: function (_batchingStrategy) { + !_batchingStrategy + ? true + ? invariant(false, 'ReactUpdates: must provide a batching strategy') + : _prodInvariant('127') + : void 0; + !(typeof _batchingStrategy.batchedUpdates === 'function') + ? true + ? invariant(false, 'ReactUpdates: must provide a batchedUpdates() function') + : _prodInvariant('128') + : void 0; + !(typeof _batchingStrategy.isBatchingUpdates === 'boolean') + ? true + ? invariant(false, 'ReactUpdates: must provide an isBatchingUpdates boolean attribute') + : _prodInvariant('129') + : void 0; + batchingStrategy = _batchingStrategy; + }, + }; + + var ReactUpdates = { + /** + * React references `ReactReconcileTransaction` using this property in order + * to allow dependency injection. + * + * @internal + */ + ReactReconcileTransaction: null, + + batchedUpdates: batchedUpdates, + enqueueUpdate: enqueueUpdate, + flushBatchedUpdates: flushBatchedUpdates, + injection: ReactUpdatesInjection, + asap: asap, + }; + + module.exports = ReactUpdates; + + /***/ + }, + /* 35 */ + /***/ function (module, exports, __webpack_require__) { + var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; /*! + Copyright (c) 2016 Jed Watson. + Licensed under the MIT License (MIT), see + http://jedwatson.github.io/classnames +*/ + /* global define */ + + (function () { + 'use strict'; + + var hasOwn = {}.hasOwnProperty; + + function classNames() { + var classes = []; + + for (var i = 0; i < arguments.length; i++) { + var arg = arguments[i]; + if (!arg) continue; + + var argType = typeof arg; + + if (argType === 'string' || argType === 'number') { + classes.push(arg); + } else if (Array.isArray(arg)) { + classes.push(classNames.apply(null, arg)); + } else if (argType === 'object') { + for (var key in arg) { + if (hasOwn.call(arg, key) && arg[key]) { + classes.push(key); + } + } + } + } + + return classes.join(' '); + } + + if (typeof module !== 'undefined' && module.exports) { + module.exports = classNames; + } else if (true) { + // register as 'classnames', consistent with npm package name + !((__WEBPACK_AMD_DEFINE_ARRAY__ = []), + (__WEBPACK_AMD_DEFINE_RESULT__ = function () { + return classNames; + }.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else { + window.classNames = classNames; + } + })(); + + /***/ + }, + /* 36 */ + /***/ function (module, exports, __webpack_require__) { + var pIE = __webpack_require__(121), + createDesc = __webpack_require__(64), + toIObject = __webpack_require__(32), + toPrimitive = __webpack_require__(50), + has = __webpack_require__(27), + IE8_DOM_DEFINE = __webpack_require__(280), + gOPD = Object.getOwnPropertyDescriptor; + + exports.f = __webpack_require__(14) + ? gOPD + : function getOwnPropertyDescriptor(O, P) { + O = toIObject(O); + P = toPrimitive(P, true); + if (IE8_DOM_DEFINE) + try { + return gOPD(O, P); + } catch (e) { + /* empty */ + } + if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]); + }; + + /***/ + }, + /* 37 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) + var has = __webpack_require__(27), + toObject = __webpack_require__(20), + IE_PROTO = __webpack_require__(182)('IE_PROTO'), + ObjectProto = Object.prototype; + + module.exports = + Object.getPrototypeOf || + function (O) { + O = toObject(O); + if (has(O, IE_PROTO)) return O[IE_PROTO]; + if (typeof O.constructor == 'function' && O instanceof O.constructor) { + return O.constructor.prototype; + } + return O instanceof Object ? ObjectProto : null; + }; + + /***/ + }, + /* 38 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var _assign = __webpack_require__(9); + + var ReactChildren = __webpack_require__(869); + var ReactComponent = __webpack_require__(225); + var ReactPureComponent = __webpack_require__(874); + var ReactClass = __webpack_require__(870); + var ReactDOMFactories = __webpack_require__(871); + var ReactElement = __webpack_require__(86); + var ReactPropTypes = __webpack_require__(872); + var ReactVersion = __webpack_require__(878); + + var onlyChild = __webpack_require__(372); + var warning = __webpack_require__(4); + + var createElement = ReactElement.createElement; + var createFactory = ReactElement.createFactory; + var cloneElement = ReactElement.cloneElement; + + if (true) { + var canDefineProperty = __webpack_require__(152); + var ReactElementValidator = __webpack_require__(368); + var didWarnPropTypesDeprecated = false; + createElement = ReactElementValidator.createElement; + createFactory = ReactElementValidator.createFactory; + cloneElement = ReactElementValidator.cloneElement; + } + + var __spread = _assign; + + if (true) { + var warned = false; + __spread = function () { + true + ? warning( + warned, + 'React.__spread is deprecated and should not be used. Use ' + + 'Object.assign directly or another helper function with similar ' + + 'semantics. You may be seeing this warning due to your compiler. ' + + 'See https://fb.me/react-spread-deprecation for more details.', + ) + : void 0; + warned = true; + return _assign.apply(null, arguments); + }; + } + + var React = { + // Modern + + Children: { + map: ReactChildren.map, + forEach: ReactChildren.forEach, + count: ReactChildren.count, + toArray: ReactChildren.toArray, + only: onlyChild, + }, + + Component: ReactComponent, + PureComponent: ReactPureComponent, + + createElement: createElement, + cloneElement: cloneElement, + isValidElement: ReactElement.isValidElement, + + // Classic + + PropTypes: ReactPropTypes, + createClass: ReactClass.createClass, + createFactory: createFactory, + createMixin: function (mixin) { + // Currently a noop. Will be used to validate and trace mixins. + return mixin; + }, + + // This looks DOM specific but these are actually isomorphic helpers + // since they are just generating DOM strings. + DOM: ReactDOMFactories, + + version: ReactVersion, + + // Deprecated hook for JSX spread, don't use this for anything. + __spread: __spread, + }; + + // TODO: Fix tests so that this deprecation warning doesn't cause failures. + if (true) { + if (canDefineProperty) { + Object.defineProperty(React, 'PropTypes', { + get: function () { + true + ? warning( + didWarnPropTypesDeprecated, + 'Accessing PropTypes via the main React package is deprecated. Use ' + + 'the prop-types package from npm instead.', + ) + : void 0; + didWarnPropTypesDeprecated = true; + return ReactPropTypes; + }, + }); + } + } + + module.exports = React; + + /***/ + }, + /* 39 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__SingleItemContainerRecord__ = + __webpack_require__(255); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_app_records_entities_CurrentUserRecord__ = + __webpack_require__(252); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var CurrentUserContainerRecord = (function (_SingleItemContainerR) { + _inherits(CurrentUserContainerRecord, _SingleItemContainerR); + + function CurrentUserContainerRecord() { + _classCallCheck(this, CurrentUserContainerRecord); + + return _possibleConstructorReturn( + this, + (CurrentUserContainerRecord.__proto__ || Object.getPrototypeOf(CurrentUserContainerRecord)).apply( + this, + arguments, + ), + ); + } + + _createClass(CurrentUserContainerRecord, [ + { + key: 'getCurrentUser', + + /** + * + */ + value: function getCurrentUser() { + return this.getItem(); + }, + + /** + * + */ + }, + { + key: 'putCurrentUser', + value: function putCurrentUser(currentUser) { + return this.putItem( + currentUser, + __WEBPACK_IMPORTED_MODULE_1_app_records_entities_CurrentUserRecord__['a' /* default */], + ); + }, + + /** + * + */ + }, + { + key: 'buildCurrentUser', + value: function buildCurrentUser(attributes) { + return this.buildItem( + attributes, + __WEBPACK_IMPORTED_MODULE_1_app_records_entities_CurrentUserRecord__['a' /* default */], + ); + }, + + /** + * + */ + }, + { + key: 'assignCurrentUserAttributes', + value: function assignCurrentUserAttributes(attributes, validateAssigned) { + return this.assignItemAttributes(attributes, validateAssigned); + }, + + /** + * + */ + }, + { + key: 'deleteCurrentUser', + value: function deleteCurrentUser() { + return this.clearItem(); + }, + + /** + * + */ + }, + { + key: 'containsPersistentCurrentUser', + value: function containsPersistentCurrentUser() { + return this.getCurrentUser() && this.getCurrentUser().get('id'); + }, + + /** + * + */ + }, + { + key: 'rollbackCurrentUserToPersistentVersion', + value: function rollbackCurrentUserToPersistentVersion() { + return this.rollbackItemToPersistentVersion(); + }, + + /** + * + */ + }, + { + key: 'cleanUpCurrentUserPasswords', + value: function cleanUpCurrentUserPasswords() { + return this.set('item', this.get('item').cleanUpPasswords()); + }, + }, + ]); + + return CurrentUserContainerRecord; + })(__WEBPACK_IMPORTED_MODULE_0__SingleItemContainerRecord__['a' /* default */]); + + /* harmony default export */ __webpack_exports__['a'] = CurrentUserContainerRecord; + + /***/ + }, + /* 40 */ + /***/ function (module, exports) { + var toString = {}.toString; + + module.exports = function (it) { + return toString.call(it).slice(8, -1); + }; + + /***/ + }, + /* 41 */ + /***/ function (module, exports) { + // 7.2.1 RequireObjectCoercible(argument) + module.exports = function (it) { + if (it == undefined) throw TypeError("Can't call method on " + it); + return it; + }; + + /***/ + }, + /* 42 */ + /***/ function (module, exports, __webpack_require__) { + var fails = __webpack_require__(10); + + module.exports = function (method, arg) { + return ( + !!method && + fails(function () { + arg ? method.call(null, function () {}, 1) : method.call(null); + }) + ); + }; + + /***/ + }, + /* 43 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + module.exports = __webpack_require__(206); + + /***/ + }, + /* 44 */ + /***/ function (module, exports, __webpack_require__) { + exports.__esModule = true; + exports.Helmet = undefined; + + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + var _react = __webpack_require__(1); + + var _react2 = _interopRequireDefault(_react); + + var _propTypes = __webpack_require__(2); + + var _propTypes2 = _interopRequireDefault(_propTypes); + + var _reactSideEffect = __webpack_require__(856); + + var _reactSideEffect2 = _interopRequireDefault(_reactSideEffect); + + var _deepEqual = __webpack_require__(705); + + var _deepEqual2 = _interopRequireDefault(_deepEqual); + + var _HelmetUtils = __webpack_require__(813); + + var _HelmetConstants = __webpack_require__(343); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + function _objectWithoutProperties(obj, keys) { + var target = {}; + for (var i in obj) { + if (keys.indexOf(i) >= 0) continue; + if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; + target[i] = obj[i]; + } + return target; + } + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + var Helmet = function Helmet(Component) { + var _class, _temp; + + return ( + (_temp = _class = + (function (_React$Component) { + _inherits(HelmetWrapper, _React$Component); + + function HelmetWrapper() { + _classCallCheck(this, HelmetWrapper); + + return _possibleConstructorReturn(this, _React$Component.apply(this, arguments)); + } + + HelmetWrapper.prototype.shouldComponentUpdate = function shouldComponentUpdate(nextProps) { + return !(0, _deepEqual2.default)(this.props, nextProps); + }; + + HelmetWrapper.prototype.mapNestedChildrenToProps = function mapNestedChildrenToProps( + child, + nestedChildren, + ) { + if (!nestedChildren) { + return null; + } + + switch (child.type) { + case _HelmetConstants.TAG_NAMES.SCRIPT: + case _HelmetConstants.TAG_NAMES.NOSCRIPT: + return { + innerHTML: nestedChildren, + }; + + case _HelmetConstants.TAG_NAMES.STYLE: + return { + cssText: nestedChildren, + }; + } + + throw new Error( + '<' + + child.type + + ' /> elements are self-closing and can not contain children. Refer to our API for more information.', + ); + }; + + HelmetWrapper.prototype.flattenArrayTypeChildren = function flattenArrayTypeChildren(_ref) { + var _extends2; + + var child = _ref.child, + arrayTypeChildren = _ref.arrayTypeChildren, + newChildProps = _ref.newChildProps, + nestedChildren = _ref.nestedChildren; + + return _extends( + {}, + arrayTypeChildren, + ((_extends2 = {}), + (_extends2[child.type] = [].concat(arrayTypeChildren[child.type] || [], [ + _extends({}, newChildProps, this.mapNestedChildrenToProps(child, nestedChildren)), + ])), + _extends2), + ); + }; + + HelmetWrapper.prototype.mapObjectTypeChildren = function mapObjectTypeChildren(_ref2) { + var _extends3, _extends4; + + var child = _ref2.child, + newProps = _ref2.newProps, + newChildProps = _ref2.newChildProps, + nestedChildren = _ref2.nestedChildren; + + switch (child.type) { + case _HelmetConstants.TAG_NAMES.TITLE: + return _extends( + {}, + newProps, + ((_extends3 = {}), + (_extends3[child.type] = nestedChildren), + (_extends3.titleAttributes = _extends({}, newChildProps)), + _extends3), + ); + + case _HelmetConstants.TAG_NAMES.BODY: + return _extends({}, newProps, { + bodyAttributes: _extends({}, newChildProps), + }); + + case _HelmetConstants.TAG_NAMES.HTML: + return _extends({}, newProps, { + htmlAttributes: _extends({}, newChildProps), + }); + } + + return _extends( + {}, + newProps, + ((_extends4 = {}), (_extends4[child.type] = _extends({}, newChildProps)), _extends4), + ); + }; + + HelmetWrapper.prototype.mapArrayTypeChildrenToProps = function mapArrayTypeChildrenToProps( + arrayTypeChildren, + newProps, + ) { + var newFlattenedProps = _extends({}, newProps); + + Object.keys(arrayTypeChildren).forEach(function (arrayChildName) { + var _extends5; + + newFlattenedProps = _extends( + {}, + newFlattenedProps, + ((_extends5 = {}), + (_extends5[arrayChildName] = arrayTypeChildren[arrayChildName]), + _extends5), + ); + }); + + return newFlattenedProps; + }; + + HelmetWrapper.prototype.warnOnInvalidChildren = function warnOnInvalidChildren( + child, + nestedChildren, + ) { + if (true) { + if ( + !_HelmetConstants.VALID_TAG_NAMES.some(function (name) { + return child.type === name; + }) + ) { + if (typeof child.type === 'function') { + return (0, _HelmetUtils.warn)( + 'You may be attempting to nest components within each other, which is not allowed. Refer to our API for more information.', + ); + } + + return (0, _HelmetUtils.warn)( + 'Only elements types ' + + _HelmetConstants.VALID_TAG_NAMES.join(', ') + + ' are allowed. Helmet does not support rendering <' + + child.type + + '> elements. Refer to our API for more information.', + ); + } + + if (nestedChildren && typeof nestedChildren !== 'string') { + throw new Error( + 'Helmet expects a string as a child of <' + + child.type + + '>. Did you forget to wrap your children in braces? ( <' + + child.type + + '>{``} ) Refer to our API for more information.', + ); + } + } + + return true; + }; + + HelmetWrapper.prototype.mapChildrenToProps = function mapChildrenToProps(children, newProps) { + var _this2 = this; + + var arrayTypeChildren = {}; + + _react2.default.Children.forEach(children, function (child) { + if (!child || !child.props) { + return; + } + + var _child$props = child.props, + nestedChildren = _child$props.children, + childProps = _objectWithoutProperties(_child$props, ['children']); + + var newChildProps = (0, _HelmetUtils.convertReactPropstoHtmlAttributes)(childProps); + + _this2.warnOnInvalidChildren(child, nestedChildren); + + switch (child.type) { + case _HelmetConstants.TAG_NAMES.LINK: + case _HelmetConstants.TAG_NAMES.META: + case _HelmetConstants.TAG_NAMES.NOSCRIPT: + case _HelmetConstants.TAG_NAMES.SCRIPT: + case _HelmetConstants.TAG_NAMES.STYLE: + arrayTypeChildren = _this2.flattenArrayTypeChildren({ + child: child, + arrayTypeChildren: arrayTypeChildren, + newChildProps: newChildProps, + nestedChildren: nestedChildren, + }); + break; + + default: + newProps = _this2.mapObjectTypeChildren({ + child: child, + newProps: newProps, + newChildProps: newChildProps, + nestedChildren: nestedChildren, + }); + break; + } + }); + + newProps = this.mapArrayTypeChildrenToProps(arrayTypeChildren, newProps); + return newProps; + }; + + HelmetWrapper.prototype.render = function render() { + var _props = this.props, + children = _props.children, + props = _objectWithoutProperties(_props, ['children']); + + var newProps = _extends({}, props); + + if (children) { + newProps = this.mapChildrenToProps(children, newProps); + } + + return _react2.default.createElement(Component, newProps); + }; + + _createClass(HelmetWrapper, null, [ + { + key: 'canUseDOM', + + // Component.peek comes from react-side-effect: + // For testing, you may use a static peek() method available on the returned component. + // It lets you get the current state without resetting the mounted instance stack. + // Don’t use it for anything other than testing. + + /** + * @param {Object} base: {"target": "_blank", "href": "http://mysite.com/"} + * @param {Object} bodyAttributes: {"className": "root"} + * @param {String} defaultTitle: "Default Title" + * @param {Boolean} encodeSpecialCharacters: true + * @param {Object} htmlAttributes: {"lang": "en", "amp": undefined} + * @param {Array} link: [{"rel": "canonical", "href": "http://mysite.com/example"}] + * @param {Array} meta: [{"name": "description", "content": "Test description"}] + * @param {Array} noscript: [{"innerHTML": " console.log(newState)" + * @param {Array} script: [{"type": "text/javascript", "src": "http://mysite.com/js/test.js"}] + * @param {Array} style: [{"type": "text/css", "cssText": "div { display: block; color: blue; }"}] + * @param {String} title: "Title" + * @param {Object} titleAttributes: {"itemprop": "name"} + * @param {String} titleTemplate: "MySite.com - %s" + */ + set: function set(canUseDOM) { + Component.canUseDOM = canUseDOM; + }, + }, + ]); + + return HelmetWrapper; + })(_react2.default.Component)), + (_class.propTypes = { + base: _propTypes2.default.object, + bodyAttributes: _propTypes2.default.object, + children: _propTypes2.default.oneOfType([ + _propTypes2.default.arrayOf(_propTypes2.default.node), + _propTypes2.default.node, + ]), + defaultTitle: _propTypes2.default.string, + encodeSpecialCharacters: _propTypes2.default.bool, + htmlAttributes: _propTypes2.default.object, + link: _propTypes2.default.arrayOf(_propTypes2.default.object), + meta: _propTypes2.default.arrayOf(_propTypes2.default.object), + noscript: _propTypes2.default.arrayOf(_propTypes2.default.object), + onChangeClientState: _propTypes2.default.func, + script: _propTypes2.default.arrayOf(_propTypes2.default.object), + style: _propTypes2.default.arrayOf(_propTypes2.default.object), + title: _propTypes2.default.string, + titleAttributes: _propTypes2.default.object, + titleTemplate: _propTypes2.default.string, + }), + (_class.defaultProps = { + encodeSpecialCharacters: true, + }), + (_class.peek = Component.peek), + (_class.rewind = function () { + var mappedState = Component.rewind(); + if (!mappedState) { + // provide fallback if mappedState is undefined + mappedState = (0, _HelmetUtils.mapStateOnServer)({ + baseTag: [], + bodyAttributes: {}, + encodeSpecialCharacters: true, + htmlAttributes: {}, + linkTags: [], + metaTags: [], + noscriptTags: [], + scriptTags: [], + styleTags: [], + title: '', + titleAttributes: {}, + }); + } + + return mappedState; + }), + _temp + ); + }; + + var NullComponent = function NullComponent() { + return null; + }; + + var HelmetSideEffects = (0, _reactSideEffect2.default)( + _HelmetUtils.reducePropsToState, + _HelmetUtils.handleClientStateChange, + _HelmetUtils.mapStateOnServer, + )(NullComponent); + + var HelmetExport = Helmet(HelmetSideEffects); + HelmetExport.renderStatic = HelmetExport.rewind; + + exports.Helmet = HelmetExport; + exports.default = HelmetExport; + + /***/ + }, + /* 45 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (React) { + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(2); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_router__ = __webpack_require__(13); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var Breadcrumbs = (function (_React$Component) { + _inherits(Breadcrumbs, _React$Component); + + function Breadcrumbs() { + _classCallCheck(this, Breadcrumbs); + + return _possibleConstructorReturn( + this, + (Breadcrumbs.__proto__ || Object.getPrototypeOf(Breadcrumbs)).apply(this, arguments), + ); + } + + _createClass(Breadcrumbs, [ + { + key: 'renderLinkItems', + + /** + * + */ + value: function renderLinkItems() { + if (!this.props.linkItems) return null; + + return this.props.linkItems.map(function (linkItem) { + var location = linkItem.location; + return React.createElement( + 'li', + { key: location }, + React.createElement( + __WEBPACK_IMPORTED_MODULE_1_react_router__['f' /* Link */], + { href: location, to: location }, + linkItem.name, + ), + ); + }); + }, + + /** + * + */ + + /** + * + */ + }, + { + key: 'render', + value: function render() { + return React.createElement( + 'div', + { className: 'breadcrumbs-wrapper' }, + React.createElement( + 'div', + { className: 'container' }, + React.createElement( + 'span', + { className: 'caption' }, + '\u0412\u044B \u043D\u0430\u0445\u043E\u0434\u0438\u0442\u0435\u0441\u044C \u0437\u0434\u0435\u0441\u044C:', + ), + React.createElement( + 'ol', + { className: 'breadcrumb' }, + this.renderLinkItems(), + React.createElement('li', { className: 'active' }, this.props.activeItemName), + ), + ), + ); + }, + }, + ]); + + return Breadcrumbs; + })(React.Component); + + Breadcrumbs.propTypes = { + linkItems: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.arrayOf( + __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.shape({ + location: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string.isRequired, + name: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string.isRequired, + }), + ), + activeItemName: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string.isRequired, + }; + + /* harmony default export */ __webpack_exports__['a'] = Breadcrumbs; + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(1)); + + /***/ + }, + /* 46 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_immutable__ = __webpack_require__(18); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_immutable___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_immutable__, + ); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var AuthorRecord = (function (_Immutable$Record) { + _inherits(AuthorRecord, _Immutable$Record); + + function AuthorRecord() { + _classCallCheck(this, AuthorRecord); + + return _possibleConstructorReturn( + this, + (AuthorRecord.__proto__ || Object.getPrototypeOf(AuthorRecord)).apply(this, arguments), + ); + } + + _createClass(AuthorRecord, [ + { + key: 'assignAttributes', + + /** + * + */ + value: function assignAttributes(attributes, validateAssigned) { + var _this2 = this; + + return this.withMutations(function (self) { + /* eslint-disable no-param-reassign */ + if (!self.get('persistentVersion') && self.get('id')) self.set('persistentVersion', _this2); + /* eslint-enable no-param-reassign */ + + self.merge(attributes); + + // Skip assigned atributes validation unless it is required: + if (!validateAssigned) return; + + // Validate each assigned attribute and update its errors: + for (var attribute in attributes) { + if (attributes.hasOwnProperty(attribute)) { + var validatorMethodName = toCamelCase('validate_' + attribute); + if (validatorMethodName in self) self[validatorMethodName](); + } + } + }); + }, + }, + ]); + + return AuthorRecord; + })( + __WEBPACK_IMPORTED_MODULE_0_immutable___default.a.Record({ + id: undefined, + name: undefined, + description: undefined, + accepts_feedbacks: undefined, + posts_count: undefined, + avatar_thumb_url: undefined, + avatar_preview_url: undefined, + persistentVersion: undefined, + }), + ); + + /* harmony default export */ __webpack_exports__['a'] = AuthorRecord; + + /***/ + }, + /* 47 */ + /***/ function (module, exports, __webpack_require__) { + var store = __webpack_require__(269)('wks'), + uid = __webpack_require__(166), + Symbol = __webpack_require__(61).Symbol, + USE_SYMBOL = typeof Symbol == 'function'; + + var $exports = (module.exports = function (name) { + return ( + store[name] || + (store[name] = (USE_SYMBOL && Symbol[name]) || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)) + ); + }); + + $exports.store = store; + + /***/ + }, + /* 48 */ + /***/ function (module, exports, __webpack_require__) { + // 0 -> Array#forEach + // 1 -> Array#map + // 2 -> Array#filter + // 3 -> Array#some + // 4 -> Array#every + // 5 -> Array#find + // 6 -> Array#findIndex + var ctx = __webpack_require__(56), + IObject = __webpack_require__(120), + toObject = __webpack_require__(20), + toLength = __webpack_require__(19), + asc = __webpack_require__(524); + module.exports = function (TYPE, $create) { + var IS_MAP = TYPE == 1, + IS_FILTER = TYPE == 2, + IS_SOME = TYPE == 3, + IS_EVERY = TYPE == 4, + IS_FIND_INDEX = TYPE == 6, + NO_HOLES = TYPE == 5 || IS_FIND_INDEX, + create = $create || asc; + return function ($this, callbackfn, that) { + var O = toObject($this), + self = IObject(O), + f = ctx(callbackfn, that, 3), + length = toLength(self.length), + index = 0, + result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined, + val, + res; + for (; length > index; index++) + if (NO_HOLES || index in self) { + val = self[index]; + res = f(val, index, O); + if (TYPE) { + if (IS_MAP) + result[index] = res; // map + else if (res) + switch (TYPE) { + case 3: + return true; // some + case 5: + return val; // find + case 6: + return index; // findIndex + case 2: + result.push(val); // filter + } + else if (IS_EVERY) return false; // every + } + } + return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result; + }; + }; + + /***/ + }, + /* 49 */ + /***/ function (module, exports, __webpack_require__) { + // most Object methods by ES6 should accept primitives + var $export = __webpack_require__(0), + core = __webpack_require__(55), + fails = __webpack_require__(10); + module.exports = function (KEY, exec) { + var fn = (core.Object || {})[KEY] || Object[KEY], + exp = {}; + exp[KEY] = exec(fn); + $export( + $export.S + + $export.F * + fails(function () { + fn(1); + }), + 'Object', + exp, + ); + }; + + /***/ + }, + /* 50 */ + /***/ function (module, exports, __webpack_require__) { + // 7.1.1 ToPrimitive(input [, PreferredType]) + var isObject = __webpack_require__(11); + // instead of the ES6 spec version, we didn't implement @@toPrimitive case + // and the second argument - flag - preferred type is a string + module.exports = function (it, S) { + if (!isObject(it)) return it; + var fn, val; + if (S && typeof (fn = it.toString) == 'function' && !isObject((val = fn.call(it)))) return val; + if (typeof (fn = it.valueOf) == 'function' && !isObject((val = fn.call(it)))) return val; + if (!S && typeof (fn = it.toString) == 'function' && !isObject((val = fn.call(it)))) return val; + throw TypeError("Can't convert object to primitive value"); + }; + + /***/ + }, + /* 51 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var _assign = __webpack_require__(9); + + var PooledClass = __webpack_require__(85); + + var emptyFunction = __webpack_require__(22); + var warning = __webpack_require__(4); + + var didWarnForAddedNewProperty = false; + var isProxySupported = typeof Proxy === 'function'; + + var shouldBeReleasedProperties = [ + 'dispatchConfig', + '_targetInst', + 'nativeEvent', + 'isDefaultPrevented', + 'isPropagationStopped', + '_dispatchListeners', + '_dispatchInstances', + ]; + + /** + * @interface Event + * @see http://www.w3.org/TR/DOM-Level-3-Events/ + */ + var EventInterface = { + type: null, + target: null, + // currentTarget is set when dispatching; no use in copying it here + currentTarget: emptyFunction.thatReturnsNull, + eventPhase: null, + bubbles: null, + cancelable: null, + timeStamp: function (event) { + return event.timeStamp || Date.now(); + }, + defaultPrevented: null, + isTrusted: null, + }; + + /** + * Synthetic events are dispatched by event plugins, typically in response to a + * top-level event delegation handler. + * + * These systems should generally use pooling to reduce the frequency of garbage + * collection. The system should check `isPersistent` to determine whether the + * event should be released into the pool after being dispatched. Users that + * need a persisted event should invoke `persist`. + * + * Synthetic events (and subclasses) implement the DOM Level 3 Events API by + * normalizing browser quirks. Subclasses do not necessarily have to implement a + * DOM interface; custom application-specific events can also subclass this. + * + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {*} targetInst Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @param {DOMEventTarget} nativeEventTarget Target node. + */ + function SyntheticEvent(dispatchConfig, targetInst, nativeEvent, nativeEventTarget) { + if (true) { + // these have a getter/setter for warnings + delete this.nativeEvent; + delete this.preventDefault; + delete this.stopPropagation; + } + + this.dispatchConfig = dispatchConfig; + this._targetInst = targetInst; + this.nativeEvent = nativeEvent; + + var Interface = this.constructor.Interface; + for (var propName in Interface) { + if (!Interface.hasOwnProperty(propName)) { + continue; + } + if (true) { + delete this[propName]; // this has a getter/setter for warnings + } + var normalize = Interface[propName]; + if (normalize) { + this[propName] = normalize(nativeEvent); + } else { + if (propName === 'target') { + this.target = nativeEventTarget; + } else { + this[propName] = nativeEvent[propName]; + } + } + } + + var defaultPrevented = + nativeEvent.defaultPrevented != null + ? nativeEvent.defaultPrevented + : nativeEvent.returnValue === false; + if (defaultPrevented) { + this.isDefaultPrevented = emptyFunction.thatReturnsTrue; + } else { + this.isDefaultPrevented = emptyFunction.thatReturnsFalse; + } + this.isPropagationStopped = emptyFunction.thatReturnsFalse; + return this; + } + + _assign(SyntheticEvent.prototype, { + preventDefault: function () { + this.defaultPrevented = true; + var event = this.nativeEvent; + if (!event) { + return; + } + + if (event.preventDefault) { + event.preventDefault(); + } else if (typeof event.returnValue !== 'unknown') { + // eslint-disable-line valid-typeof + event.returnValue = false; + } + this.isDefaultPrevented = emptyFunction.thatReturnsTrue; + }, + + stopPropagation: function () { + var event = this.nativeEvent; + if (!event) { + return; + } + + if (event.stopPropagation) { + event.stopPropagation(); + } else if (typeof event.cancelBubble !== 'unknown') { + // eslint-disable-line valid-typeof + // The ChangeEventPlugin registers a "propertychange" event for + // IE. This event does not support bubbling or cancelling, and + // any references to cancelBubble throw "Member not found". A + // typeof check of "unknown" circumvents this issue (and is also + // IE specific). + event.cancelBubble = true; + } + + this.isPropagationStopped = emptyFunction.thatReturnsTrue; + }, + + /** + * We release all dispatched `SyntheticEvent`s after each event loop, adding + * them back into the pool. This allows a way to hold onto a reference that + * won't be added back into the pool. + */ + persist: function () { + this.isPersistent = emptyFunction.thatReturnsTrue; + }, + + /** + * Checks if this event should be released back into the pool. + * + * @return {boolean} True if this should not be released, false otherwise. + */ + isPersistent: emptyFunction.thatReturnsFalse, + + /** + * `PooledClass` looks for `destructor` on each instance it releases. + */ + destructor: function () { + var Interface = this.constructor.Interface; + for (var propName in Interface) { + if (true) { + Object.defineProperty( + this, + propName, + getPooledWarningPropertyDefinition(propName, Interface[propName]), + ); + } else { + this[propName] = null; + } + } + for (var i = 0; i < shouldBeReleasedProperties.length; i++) { + this[shouldBeReleasedProperties[i]] = null; + } + if (true) { + Object.defineProperty( + this, + 'nativeEvent', + getPooledWarningPropertyDefinition('nativeEvent', null), + ); + Object.defineProperty( + this, + 'preventDefault', + getPooledWarningPropertyDefinition('preventDefault', emptyFunction), + ); + Object.defineProperty( + this, + 'stopPropagation', + getPooledWarningPropertyDefinition('stopPropagation', emptyFunction), + ); + } + }, + }); + + SyntheticEvent.Interface = EventInterface; + + if (true) { + if (isProxySupported) { + /*eslint-disable no-func-assign */ + SyntheticEvent = new Proxy(SyntheticEvent, { + construct: function (target, args) { + return this.apply(target, Object.create(target.prototype), args); + }, + apply: function (constructor, that, args) { + return new Proxy(constructor.apply(that, args), { + set: function (target, prop, value) { + if ( + prop !== 'isPersistent' && + !target.constructor.Interface.hasOwnProperty(prop) && + shouldBeReleasedProperties.indexOf(prop) === -1 + ) { + true + ? warning( + didWarnForAddedNewProperty || target.isPersistent(), + "This synthetic event is reused for performance reasons. If you're " + + "seeing this, you're adding a new property in the synthetic event object. " + + 'The property is never released. See ' + + 'https://fb.me/react-event-pooling for more information.', + ) + : void 0; + didWarnForAddedNewProperty = true; + } + target[prop] = value; + return true; + }, + }); + }, + }); + /*eslint-enable no-func-assign */ + } + } + /** + * Helper to reduce boilerplate when creating subclasses. + * + * @param {function} Class + * @param {?object} Interface + */ + SyntheticEvent.augmentClass = function (Class, Interface) { + var Super = this; + + var E = function () {}; + E.prototype = Super.prototype; + var prototype = new E(); + + _assign(prototype, Class.prototype); + Class.prototype = prototype; + Class.prototype.constructor = Class; + + Class.Interface = _assign({}, Super.Interface, Interface); + Class.augmentClass = Super.augmentClass; + + PooledClass.addPoolingTo(Class, PooledClass.fourArgumentPooler); + }; + + PooledClass.addPoolingTo(SyntheticEvent, PooledClass.fourArgumentPooler); + + module.exports = SyntheticEvent; + + /** + * Helper to nullify syntheticEvent instance properties when destructing + * + * @param {object} SyntheticEvent + * @param {String} propName + * @return {object} defineProperty object + */ + function getPooledWarningPropertyDefinition(propName, getVal) { + var isFunction = typeof getVal === 'function'; + return { + configurable: true, + set: set, + get: get, + }; + + function set(val) { + var action = isFunction ? 'setting the method' : 'setting the property'; + warn(action, 'This is effectively a no-op'); + return val; + } + + function get() { + var action = isFunction ? 'accessing the method' : 'accessing the property'; + var result = isFunction ? 'This is a no-op function' : 'This is set to null'; + warn(action, result); + return getVal; + } + + function warn(action, result) { + var warningCondition = false; + true + ? warning( + warningCondition, + "This synthetic event is reused for performance reasons. If you're seeing this, " + + "you're %s `%s` on a released/nullified synthetic event. %s. " + + 'If you must keep the original synthetic event around, use event.persist(). ' + + 'See https://fb.me/react-event-pooling for more information.', + action, + propName, + result, + ) + : void 0; + } + } + + /***/ + }, + /* 52 */ + /***/ function (module, exports, __webpack_require__) { + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + + if (true) { + var REACT_ELEMENT_TYPE = + (typeof Symbol === 'function' && Symbol.for && Symbol.for('react.element')) || 0xeac7; + + var isValidElement = function (object) { + return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; + }; + + // By explicitly using `prop-types` you are opting into new development behavior. + // http://fb.me/prop-types-in-prod + var throwOnDirectAccess = true; + module.exports = __webpack_require__(855)(isValidElement, throwOnDirectAccess); + } else { + // By explicitly using `prop-types` you are opting into new production behavior. + // http://fb.me/prop-types-in-prod + module.exports = require('./factoryWithThrowingShims')(); + } + + /***/ + }, + /* 53 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + /** + * Keeps track of the current owner. + * + * The current owner is the component who should own any components that are + * currently being constructed. + */ + var ReactCurrentOwner = { + /** + * @internal + * @type {ReactComponent} + */ + current: null, + }; + + module.exports = ReactCurrentOwner; + + /***/ + }, + /* 54 */ + /***/ function (module, exports) { + var core = (module.exports = { version: '2.4.0' }); + if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef + + /***/ + }, + /* 55 */ + /***/ function (module, exports) { + var core = (module.exports = { version: '2.4.0' }); + if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef + + /***/ + }, + /* 56 */ + /***/ function (module, exports, __webpack_require__) { + // optional / simple context binding + var aFunction = __webpack_require__(28); + module.exports = function (fn, that, length) { + aFunction(fn); + if (that === undefined) return fn; + switch (length) { + case 1: + return function (a) { + return fn.call(that, a); + }; + case 2: + return function (a, b) { + return fn.call(that, a, b); + }; + case 3: + return function (a, b, c) { + return fn.call(that, a, b, c); + }; + } + return function (/* ...args */) { + return fn.apply(that, arguments); + }; + }; + + /***/ + }, + /* 57 */ + /***/ function (module, exports, __webpack_require__) { + var Map = __webpack_require__(296), + $export = __webpack_require__(0), + shared = __webpack_require__(144)('metadata'), + store = shared.store || (shared.store = new (__webpack_require__(299))()); + + var getOrCreateMetadataMap = function (target, targetKey, create) { + var targetMetadata = store.get(target); + if (!targetMetadata) { + if (!create) return undefined; + store.set(target, (targetMetadata = new Map())); + } + var keyMetadata = targetMetadata.get(targetKey); + if (!keyMetadata) { + if (!create) return undefined; + targetMetadata.set(targetKey, (keyMetadata = new Map())); + } + return keyMetadata; + }; + var ordinaryHasOwnMetadata = function (MetadataKey, O, P) { + var metadataMap = getOrCreateMetadataMap(O, P, false); + return metadataMap === undefined ? false : metadataMap.has(MetadataKey); + }; + var ordinaryGetOwnMetadata = function (MetadataKey, O, P) { + var metadataMap = getOrCreateMetadataMap(O, P, false); + return metadataMap === undefined ? undefined : metadataMap.get(MetadataKey); + }; + var ordinaryDefineOwnMetadata = function (MetadataKey, MetadataValue, O, P) { + getOrCreateMetadataMap(O, P, true).set(MetadataKey, MetadataValue); + }; + var ordinaryOwnMetadataKeys = function (target, targetKey) { + var metadataMap = getOrCreateMetadataMap(target, targetKey, false), + keys = []; + if (metadataMap) + metadataMap.forEach(function (_, key) { + keys.push(key); + }); + return keys; + }; + var toMetaKey = function (it) { + return it === undefined || typeof it == 'symbol' ? it : String(it); + }; + var exp = function (O) { + $export($export.S, 'Reflect', O); + }; + + module.exports = { + store: store, + map: getOrCreateMetadataMap, + has: ordinaryHasOwnMetadata, + get: ordinaryGetOwnMetadata, + set: ordinaryDefineOwnMetadata, + keys: ordinaryOwnMetadataKeys, + key: toMetaKey, + exp: exp, + }; + + /***/ + }, + /* 58 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + if (__webpack_require__(14)) { + var LIBRARY = __webpack_require__(77), + global = __webpack_require__(8), + fails = __webpack_require__(10), + $export = __webpack_require__(0), + $typed = __webpack_require__(145), + $buffer = __webpack_require__(189), + ctx = __webpack_require__(56), + anInstance = __webpack_require__(76), + propertyDesc = __webpack_require__(64), + hide = __webpack_require__(29), + redefineAll = __webpack_require__(81), + toInteger = __webpack_require__(65), + toLength = __webpack_require__(19), + toIndex = __webpack_require__(83), + toPrimitive = __webpack_require__(50), + has = __webpack_require__(27), + same = __webpack_require__(293), + classof = __webpack_require__(119), + isObject = __webpack_require__(11), + toObject = __webpack_require__(20), + isArrayIter = __webpack_require__(174), + create = __webpack_require__(78), + getPrototypeOf = __webpack_require__(37), + gOPN = __webpack_require__(79).f, + getIterFn = __webpack_require__(191), + uid = __webpack_require__(84), + wks = __webpack_require__(12), + createArrayMethod = __webpack_require__(48), + createArrayIncludes = __webpack_require__(135), + speciesConstructor = __webpack_require__(183), + ArrayIterators = __webpack_require__(192), + Iterators = __webpack_require__(96), + $iterDetect = __webpack_require__(141), + setSpecies = __webpack_require__(82), + arrayFill = __webpack_require__(167), + arrayCopyWithin = __webpack_require__(273), + $DP = __webpack_require__(15), + $GOPD = __webpack_require__(36), + dP = $DP.f, + gOPD = $GOPD.f, + RangeError = global.RangeError, + TypeError = global.TypeError, + Uint8Array = global.Uint8Array, + ARRAY_BUFFER = 'ArrayBuffer', + SHARED_BUFFER = 'Shared' + ARRAY_BUFFER, + BYTES_PER_ELEMENT = 'BYTES_PER_ELEMENT', + PROTOTYPE = 'prototype', + ArrayProto = Array[PROTOTYPE], + $ArrayBuffer = $buffer.ArrayBuffer, + $DataView = $buffer.DataView, + arrayForEach = createArrayMethod(0), + arrayFilter = createArrayMethod(2), + arraySome = createArrayMethod(3), + arrayEvery = createArrayMethod(4), + arrayFind = createArrayMethod(5), + arrayFindIndex = createArrayMethod(6), + arrayIncludes = createArrayIncludes(true), + arrayIndexOf = createArrayIncludes(false), + arrayValues = ArrayIterators.values, + arrayKeys = ArrayIterators.keys, + arrayEntries = ArrayIterators.entries, + arrayLastIndexOf = ArrayProto.lastIndexOf, + arrayReduce = ArrayProto.reduce, + arrayReduceRight = ArrayProto.reduceRight, + arrayJoin = ArrayProto.join, + arraySort = ArrayProto.sort, + arraySlice = ArrayProto.slice, + arrayToString = ArrayProto.toString, + arrayToLocaleString = ArrayProto.toLocaleString, + ITERATOR = wks('iterator'), + TAG = wks('toStringTag'), + TYPED_CONSTRUCTOR = uid('typed_constructor'), + DEF_CONSTRUCTOR = uid('def_constructor'), + ALL_CONSTRUCTORS = $typed.CONSTR, + TYPED_ARRAY = $typed.TYPED, + VIEW = $typed.VIEW, + WRONG_LENGTH = 'Wrong length!'; + + var $map = createArrayMethod(1, function (O, length) { + return allocate(speciesConstructor(O, O[DEF_CONSTRUCTOR]), length); + }); + + var LITTLE_ENDIAN = fails(function () { + return new Uint8Array(new Uint16Array([1]).buffer)[0] === 1; + }); + + var FORCED_SET = + !!Uint8Array && + !!Uint8Array[PROTOTYPE].set && + fails(function () { + new Uint8Array(1).set({}); + }); + + var strictToLength = function (it, SAME) { + if (it === undefined) throw TypeError(WRONG_LENGTH); + var number = +it, + length = toLength(it); + if (SAME && !same(number, length)) throw RangeError(WRONG_LENGTH); + return length; + }; + + var toOffset = function (it, BYTES) { + var offset = toInteger(it); + if (offset < 0 || offset % BYTES) throw RangeError('Wrong offset!'); + return offset; + }; + + var validate = function (it) { + if (isObject(it) && TYPED_ARRAY in it) return it; + throw TypeError(it + ' is not a typed array!'); + }; + + var allocate = function (C, length) { + if (!(isObject(C) && TYPED_CONSTRUCTOR in C)) { + throw TypeError('It is not a typed array constructor!'); + } + return new C(length); + }; + + var speciesFromList = function (O, list) { + return fromList(speciesConstructor(O, O[DEF_CONSTRUCTOR]), list); + }; + + var fromList = function (C, list) { + var index = 0, + length = list.length, + result = allocate(C, length); + while (length > index) result[index] = list[index++]; + return result; + }; + + var addGetter = function (it, key, internal) { + dP(it, key, { + get: function () { + return this._d[internal]; + }, + }); + }; + + var $from = function from(source /*, mapfn, thisArg */) { + var O = toObject(source), + aLen = arguments.length, + mapfn = aLen > 1 ? arguments[1] : undefined, + mapping = mapfn !== undefined, + iterFn = getIterFn(O), + i, + length, + values, + result, + step, + iterator; + if (iterFn != undefined && !isArrayIter(iterFn)) { + for (iterator = iterFn.call(O), values = [], i = 0; !(step = iterator.next()).done; i++) { + values.push(step.value); + } + O = values; + } + if (mapping && aLen > 2) mapfn = ctx(mapfn, arguments[2], 2); + for (i = 0, length = toLength(O.length), result = allocate(this, length); length > i; i++) { + result[i] = mapping ? mapfn(O[i], i) : O[i]; + } + return result; + }; + + var $of = function of(/*...items*/) { + var index = 0, + length = arguments.length, + result = allocate(this, length); + while (length > index) result[index] = arguments[index++]; + return result; + }; + + // iOS Safari 6.x fails here + var TO_LOCALE_BUG = + !!Uint8Array && + fails(function () { + arrayToLocaleString.call(new Uint8Array(1)); + }); + + var $toLocaleString = function toLocaleString() { + return arrayToLocaleString.apply( + TO_LOCALE_BUG ? arraySlice.call(validate(this)) : validate(this), + arguments, + ); + }; + + var proto = { + copyWithin: function copyWithin(target, start /*, end */) { + return arrayCopyWithin.call( + validate(this), + target, + start, + arguments.length > 2 ? arguments[2] : undefined, + ); + }, + every: function every(callbackfn /*, thisArg */) { + return arrayEvery(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); + }, + fill: function fill(value /*, start, end */) { + // eslint-disable-line no-unused-vars + return arrayFill.apply(validate(this), arguments); + }, + filter: function filter(callbackfn /*, thisArg */) { + return speciesFromList( + this, + arrayFilter(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined), + ); + }, + find: function find(predicate /*, thisArg */) { + return arrayFind(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined); + }, + findIndex: function findIndex(predicate /*, thisArg */) { + return arrayFindIndex(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined); + }, + forEach: function forEach(callbackfn /*, thisArg */) { + arrayForEach(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); + }, + indexOf: function indexOf(searchElement /*, fromIndex */) { + return arrayIndexOf( + validate(this), + searchElement, + arguments.length > 1 ? arguments[1] : undefined, + ); + }, + includes: function includes(searchElement /*, fromIndex */) { + return arrayIncludes( + validate(this), + searchElement, + arguments.length > 1 ? arguments[1] : undefined, + ); + }, + join: function join(separator) { + // eslint-disable-line no-unused-vars + return arrayJoin.apply(validate(this), arguments); + }, + lastIndexOf: function lastIndexOf(searchElement /*, fromIndex */) { + // eslint-disable-line no-unused-vars + return arrayLastIndexOf.apply(validate(this), arguments); + }, + map: function map(mapfn /*, thisArg */) { + return $map(validate(this), mapfn, arguments.length > 1 ? arguments[1] : undefined); + }, + reduce: function reduce(callbackfn /*, initialValue */) { + // eslint-disable-line no-unused-vars + return arrayReduce.apply(validate(this), arguments); + }, + reduceRight: function reduceRight(callbackfn /*, initialValue */) { + // eslint-disable-line no-unused-vars + return arrayReduceRight.apply(validate(this), arguments); + }, + reverse: function reverse() { + var that = this, + length = validate(that).length, + middle = Math.floor(length / 2), + index = 0, + value; + while (index < middle) { + value = that[index]; + that[index++] = that[--length]; + that[length] = value; + } + return that; + }, + some: function some(callbackfn /*, thisArg */) { + return arraySome(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); + }, + sort: function sort(comparefn) { + return arraySort.call(validate(this), comparefn); + }, + subarray: function subarray(begin, end) { + var O = validate(this), + length = O.length, + $begin = toIndex(begin, length); + return new (speciesConstructor(O, O[DEF_CONSTRUCTOR]))( + O.buffer, + O.byteOffset + $begin * O.BYTES_PER_ELEMENT, + toLength((end === undefined ? length : toIndex(end, length)) - $begin), + ); + }, + }; + + var $slice = function slice(start, end) { + return speciesFromList(this, arraySlice.call(validate(this), start, end)); + }; + + var $set = function set(arrayLike /*, offset */) { + validate(this); + var offset = toOffset(arguments[1], 1), + length = this.length, + src = toObject(arrayLike), + len = toLength(src.length), + index = 0; + if (len + offset > length) throw RangeError(WRONG_LENGTH); + while (index < len) this[offset + index] = src[index++]; + }; + + var $iterators = { + entries: function entries() { + return arrayEntries.call(validate(this)); + }, + keys: function keys() { + return arrayKeys.call(validate(this)); + }, + values: function values() { + return arrayValues.call(validate(this)); + }, + }; + + var isTAIndex = function (target, key) { + return ( + isObject(target) && + target[TYPED_ARRAY] && + typeof key != 'symbol' && + key in target && + String(+key) == String(key) + ); + }; + var $getDesc = function getOwnPropertyDescriptor(target, key) { + return isTAIndex(target, (key = toPrimitive(key, true))) + ? propertyDesc(2, target[key]) + : gOPD(target, key); + }; + var $setDesc = function defineProperty(target, key, desc) { + if ( + isTAIndex(target, (key = toPrimitive(key, true))) && + isObject(desc) && + has(desc, 'value') && + !has(desc, 'get') && + !has(desc, 'set') && + // TODO: add validation descriptor w/o calling accessors + !desc.configurable && + (!has(desc, 'writable') || desc.writable) && + (!has(desc, 'enumerable') || desc.enumerable) + ) { + target[key] = desc.value; + return target; + } else return dP(target, key, desc); + }; + + if (!ALL_CONSTRUCTORS) { + $GOPD.f = $getDesc; + $DP.f = $setDesc; + } + + $export($export.S + $export.F * !ALL_CONSTRUCTORS, 'Object', { + getOwnPropertyDescriptor: $getDesc, + defineProperty: $setDesc, + }); + + if ( + fails(function () { + arrayToString.call({}); + }) + ) { + arrayToString = arrayToLocaleString = function toString() { + return arrayJoin.call(this); + }; + } + + var $TypedArrayPrototype$ = redefineAll({}, proto); + redefineAll($TypedArrayPrototype$, $iterators); + hide($TypedArrayPrototype$, ITERATOR, $iterators.values); + redefineAll($TypedArrayPrototype$, { + slice: $slice, + set: $set, + constructor: function () { + /* noop */ + }, + toString: arrayToString, + toLocaleString: $toLocaleString, + }); + addGetter($TypedArrayPrototype$, 'buffer', 'b'); + addGetter($TypedArrayPrototype$, 'byteOffset', 'o'); + addGetter($TypedArrayPrototype$, 'byteLength', 'l'); + addGetter($TypedArrayPrototype$, 'length', 'e'); + dP($TypedArrayPrototype$, TAG, { + get: function () { + return this[TYPED_ARRAY]; + }, + }); + + module.exports = function (KEY, BYTES, wrapper, CLAMPED) { + CLAMPED = !!CLAMPED; + var NAME = KEY + (CLAMPED ? 'Clamped' : '') + 'Array', + ISNT_UINT8 = NAME != 'Uint8Array', + GETTER = 'get' + KEY, + SETTER = 'set' + KEY, + TypedArray = global[NAME], + Base = TypedArray || {}, + TAC = TypedArray && getPrototypeOf(TypedArray), + FORCED = !TypedArray || !$typed.ABV, + O = {}, + TypedArrayPrototype = TypedArray && TypedArray[PROTOTYPE]; + var getter = function (that, index) { + var data = that._d; + return data.v[GETTER](index * BYTES + data.o, LITTLE_ENDIAN); + }; + var setter = function (that, index, value) { + var data = that._d; + if (CLAMPED) value = (value = Math.round(value)) < 0 ? 0 : value > 0xff ? 0xff : value & 0xff; + data.v[SETTER](index * BYTES + data.o, value, LITTLE_ENDIAN); + }; + var addElement = function (that, index) { + dP(that, index, { + get: function () { + return getter(this, index); + }, + set: function (value) { + return setter(this, index, value); + }, + enumerable: true, + }); + }; + if (FORCED) { + TypedArray = wrapper(function (that, data, $offset, $length) { + anInstance(that, TypedArray, NAME, '_d'); + var index = 0, + offset = 0, + buffer, + byteLength, + length, + klass; + if (!isObject(data)) { + length = strictToLength(data, true); + byteLength = length * BYTES; + buffer = new $ArrayBuffer(byteLength); + } else if ( + data instanceof $ArrayBuffer || + (klass = classof(data)) == ARRAY_BUFFER || + klass == SHARED_BUFFER + ) { + buffer = data; + offset = toOffset($offset, BYTES); + var $len = data.byteLength; + if ($length === undefined) { + if ($len % BYTES) throw RangeError(WRONG_LENGTH); + byteLength = $len - offset; + if (byteLength < 0) throw RangeError(WRONG_LENGTH); + } else { + byteLength = toLength($length) * BYTES; + if (byteLength + offset > $len) throw RangeError(WRONG_LENGTH); + } + length = byteLength / BYTES; + } else if (TYPED_ARRAY in data) { + return fromList(TypedArray, data); + } else { + return $from.call(TypedArray, data); + } + hide(that, '_d', { + b: buffer, + o: offset, + l: byteLength, + e: length, + v: new $DataView(buffer), + }); + while (index < length) addElement(that, index++); + }); + TypedArrayPrototype = TypedArray[PROTOTYPE] = create($TypedArrayPrototype$); + hide(TypedArrayPrototype, 'constructor', TypedArray); + } else if ( + !$iterDetect(function (iter) { + // V8 works with iterators, but fails in many other cases + // https://code.google.com/p/v8/issues/detail?id=4552 + new TypedArray(null); // eslint-disable-line no-new + new TypedArray(iter); // eslint-disable-line no-new + }, true) + ) { + TypedArray = wrapper(function (that, data, $offset, $length) { + anInstance(that, TypedArray, NAME); + var klass; + // `ws` module bug, temporarily remove validation length for Uint8Array + // https://github.com/websockets/ws/pull/645 + if (!isObject(data)) return new Base(strictToLength(data, ISNT_UINT8)); + if ( + data instanceof $ArrayBuffer || + (klass = classof(data)) == ARRAY_BUFFER || + klass == SHARED_BUFFER + ) { + return $length !== undefined + ? new Base(data, toOffset($offset, BYTES), $length) + : $offset !== undefined + ? new Base(data, toOffset($offset, BYTES)) + : new Base(data); + } + if (TYPED_ARRAY in data) return fromList(TypedArray, data); + return $from.call(TypedArray, data); + }); + arrayForEach( + TAC !== Function.prototype ? gOPN(Base).concat(gOPN(TAC)) : gOPN(Base), + function (key) { + if (!(key in TypedArray)) hide(TypedArray, key, Base[key]); + }, + ); + TypedArray[PROTOTYPE] = TypedArrayPrototype; + if (!LIBRARY) TypedArrayPrototype.constructor = TypedArray; + } + var $nativeIterator = TypedArrayPrototype[ITERATOR], + CORRECT_ITER_NAME = + !!$nativeIterator && ($nativeIterator.name == 'values' || $nativeIterator.name == undefined), + $iterator = $iterators.values; + hide(TypedArray, TYPED_CONSTRUCTOR, true); + hide(TypedArrayPrototype, TYPED_ARRAY, NAME); + hide(TypedArrayPrototype, VIEW, true); + hide(TypedArrayPrototype, DEF_CONSTRUCTOR, TypedArray); + + if (CLAMPED ? new TypedArray(1)[TAG] != NAME : !(TAG in TypedArrayPrototype)) { + dP(TypedArrayPrototype, TAG, { + get: function () { + return NAME; + }, + }); + } + + O[NAME] = TypedArray; + + $export($export.G + $export.W + $export.F * (TypedArray != Base), O); + + $export($export.S, NAME, { + BYTES_PER_ELEMENT: BYTES, + from: $from, + of: $of, + }); + + if (!(BYTES_PER_ELEMENT in TypedArrayPrototype)) + hide(TypedArrayPrototype, BYTES_PER_ELEMENT, BYTES); + + $export($export.P, NAME, proto); + + setSpecies(NAME); + + $export($export.P + $export.F * FORCED_SET, NAME, { set: $set }); + + $export($export.P + $export.F * !CORRECT_ITER_NAME, NAME, $iterators); + + $export($export.P + $export.F * (TypedArrayPrototype.toString != arrayToString), NAME, { + toString: arrayToString, + }); + + $export( + $export.P + + $export.F * + fails(function () { + new TypedArray(1).slice(); + }), + NAME, + { slice: $slice }, + ); + + $export( + $export.P + + $export.F * + (fails(function () { + return [1, 2].toLocaleString() != new TypedArray([1, 2]).toLocaleString(); + }) || + !fails(function () { + TypedArrayPrototype.toLocaleString.call([1, 2]); + })), + NAME, + { toLocaleString: $toLocaleString }, + ); + + Iterators[NAME] = CORRECT_ITER_NAME ? $nativeIterator : $iterator; + if (!LIBRARY && !CORRECT_ITER_NAME) hide(TypedArrayPrototype, ITERATOR, $iterator); + }; + } else + module.exports = function () { + /* empty */ + }; + + /***/ + }, + /* 59 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var React = __webpack_require__(1); + var factory = __webpack_require__(703); + + // Hack to grab NoopUpdateQueue from isomorphic React + var ReactNoopUpdateQueue = new React.Component().updater; + + module.exports = factory(React.Component, React.isValidElement, ReactNoopUpdateQueue); + + /***/ + }, + /* 60 */ + /***/ function (module, exports, __webpack_require__) { + var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; // Underscore.js 1.6.0 + // http://underscorejs.org + // (c) 2009-2014 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + // Underscore may be freely distributed under the MIT license. + + (function () { + // Baseline setup + // -------------- + + // Establish the root object, `window` in the browser, or `exports` on the server. + var root = this; + + // Save the previous value of the `_` variable. + var previousUnderscore = root._; + + // Establish the object that gets returned to break out of a loop iteration. + var breaker = {}; + + // Save bytes in the minified (but not gzipped) version: + var ArrayProto = Array.prototype, + ObjProto = Object.prototype, + FuncProto = Function.prototype; + + // Create quick reference variables for speed access to core prototypes. + var push = ArrayProto.push, + slice = ArrayProto.slice, + concat = ArrayProto.concat, + toString = ObjProto.toString, + hasOwnProperty = ObjProto.hasOwnProperty; + + // All **ECMAScript 5** native function implementations that we hope to use + // are declared here. + var nativeForEach = ArrayProto.forEach, + nativeMap = ArrayProto.map, + nativeReduce = ArrayProto.reduce, + nativeReduceRight = ArrayProto.reduceRight, + nativeFilter = ArrayProto.filter, + nativeEvery = ArrayProto.every, + nativeSome = ArrayProto.some, + nativeIndexOf = ArrayProto.indexOf, + nativeLastIndexOf = ArrayProto.lastIndexOf, + nativeIsArray = Array.isArray, + nativeKeys = Object.keys, + nativeBind = FuncProto.bind; + + // Create a safe reference to the Underscore object for use below. + var _ = function (obj) { + if (obj instanceof _) return obj; + if (!(this instanceof _)) return new _(obj); + this._wrapped = obj; + }; + + // Export the Underscore object for **Node.js**, with + // backwards-compatibility for the old `require()` API. If we're in + // the browser, add `_` as a global object via a string identifier, + // for Closure Compiler "advanced" mode. + if (true) { + if (typeof module !== 'undefined' && module.exports) { + exports = module.exports = _; + } + exports._ = _; + } else { + root._ = _; + } + + // Current version. + _.VERSION = '1.6.0'; + + // Collection Functions + // -------------------- + + // The cornerstone, an `each` implementation, aka `forEach`. + // Handles objects with the built-in `forEach`, arrays, and raw objects. + // Delegates to **ECMAScript 5**'s native `forEach` if available. + var each = + (_.each = + _.forEach = + function (obj, iterator, context) { + if (obj == null) return obj; + if (nativeForEach && obj.forEach === nativeForEach) { + obj.forEach(iterator, context); + } else if (obj.length === +obj.length) { + for (var i = 0, length = obj.length; i < length; i++) { + if (iterator.call(context, obj[i], i, obj) === breaker) return; + } + } else { + var keys = _.keys(obj); + for (var i = 0, length = keys.length; i < length; i++) { + if (iterator.call(context, obj[keys[i]], keys[i], obj) === breaker) return; + } + } + return obj; + }); + + // Return the results of applying the iterator to each element. + // Delegates to **ECMAScript 5**'s native `map` if available. + _.map = _.collect = function (obj, iterator, context) { + var results = []; + if (obj == null) return results; + if (nativeMap && obj.map === nativeMap) return obj.map(iterator, context); + each(obj, function (value, index, list) { + results.push(iterator.call(context, value, index, list)); + }); + return results; + }; + + var reduceError = 'Reduce of empty array with no initial value'; + + // **Reduce** builds up a single result from a list of values, aka `inject`, + // or `foldl`. Delegates to **ECMAScript 5**'s native `reduce` if available. + _.reduce = + _.foldl = + _.inject = + function (obj, iterator, memo, context) { + var initial = arguments.length > 2; + if (obj == null) obj = []; + if (nativeReduce && obj.reduce === nativeReduce) { + if (context) iterator = _.bind(iterator, context); + return initial ? obj.reduce(iterator, memo) : obj.reduce(iterator); + } + each(obj, function (value, index, list) { + if (!initial) { + memo = value; + initial = true; + } else { + memo = iterator.call(context, memo, value, index, list); + } + }); + if (!initial) throw new TypeError(reduceError); + return memo; + }; + + // The right-associative version of reduce, also known as `foldr`. + // Delegates to **ECMAScript 5**'s native `reduceRight` if available. + _.reduceRight = _.foldr = function (obj, iterator, memo, context) { + var initial = arguments.length > 2; + if (obj == null) obj = []; + if (nativeReduceRight && obj.reduceRight === nativeReduceRight) { + if (context) iterator = _.bind(iterator, context); + return initial ? obj.reduceRight(iterator, memo) : obj.reduceRight(iterator); + } + var length = obj.length; + if (length !== +length) { + var keys = _.keys(obj); + length = keys.length; + } + each(obj, function (value, index, list) { + index = keys ? keys[--length] : --length; + if (!initial) { + memo = obj[index]; + initial = true; + } else { + memo = iterator.call(context, memo, obj[index], index, list); + } + }); + if (!initial) throw new TypeError(reduceError); + return memo; + }; + + // Return the first value which passes a truth test. Aliased as `detect`. + _.find = _.detect = function (obj, predicate, context) { + var result; + any(obj, function (value, index, list) { + if (predicate.call(context, value, index, list)) { + result = value; + return true; + } + }); + return result; + }; + + // Return all the elements that pass a truth test. + // Delegates to **ECMAScript 5**'s native `filter` if available. + // Aliased as `select`. + _.filter = _.select = function (obj, predicate, context) { + var results = []; + if (obj == null) return results; + if (nativeFilter && obj.filter === nativeFilter) return obj.filter(predicate, context); + each(obj, function (value, index, list) { + if (predicate.call(context, value, index, list)) results.push(value); + }); + return results; + }; + + // Return all the elements for which a truth test fails. + _.reject = function (obj, predicate, context) { + return _.filter( + obj, + function (value, index, list) { + return !predicate.call(context, value, index, list); + }, + context, + ); + }; + + // Determine whether all of the elements match a truth test. + // Delegates to **ECMAScript 5**'s native `every` if available. + // Aliased as `all`. + _.every = _.all = function (obj, predicate, context) { + predicate || (predicate = _.identity); + var result = true; + if (obj == null) return result; + if (nativeEvery && obj.every === nativeEvery) return obj.every(predicate, context); + each(obj, function (value, index, list) { + if (!(result = result && predicate.call(context, value, index, list))) return breaker; + }); + return !!result; + }; + + // Determine if at least one element in the object matches a truth test. + // Delegates to **ECMAScript 5**'s native `some` if available. + // Aliased as `any`. + var any = + (_.some = + _.any = + function (obj, predicate, context) { + predicate || (predicate = _.identity); + var result = false; + if (obj == null) return result; + if (nativeSome && obj.some === nativeSome) return obj.some(predicate, context); + each(obj, function (value, index, list) { + if (result || (result = predicate.call(context, value, index, list))) return breaker; + }); + return !!result; + }); + + // Determine if the array or object contains a given value (using `===`). + // Aliased as `include`. + _.contains = _.include = function (obj, target) { + if (obj == null) return false; + if (nativeIndexOf && obj.indexOf === nativeIndexOf) return obj.indexOf(target) != -1; + return any(obj, function (value) { + return value === target; + }); + }; + + // Invoke a method (with arguments) on every item in a collection. + _.invoke = function (obj, method) { + var args = slice.call(arguments, 2); + var isFunc = _.isFunction(method); + return _.map(obj, function (value) { + return (isFunc ? method : value[method]).apply(value, args); + }); + }; + + // Convenience version of a common use case of `map`: fetching a property. + _.pluck = function (obj, key) { + return _.map(obj, _.property(key)); + }; + + // Convenience version of a common use case of `filter`: selecting only objects + // containing specific `key:value` pairs. + _.where = function (obj, attrs) { + return _.filter(obj, _.matches(attrs)); + }; + + // Convenience version of a common use case of `find`: getting the first object + // containing specific `key:value` pairs. + _.findWhere = function (obj, attrs) { + return _.find(obj, _.matches(attrs)); + }; + + // Return the maximum element or (element-based computation). + // Can't optimize arrays of integers longer than 65,535 elements. + // See [WebKit Bug 80797](https://bugs.webkit.org/show_bug.cgi?id=80797) + _.max = function (obj, iterator, context) { + if (!iterator && _.isArray(obj) && obj[0] === +obj[0] && obj.length < 65535) { + return Math.max.apply(Math, obj); + } + var result = -Infinity, + lastComputed = -Infinity; + each(obj, function (value, index, list) { + var computed = iterator ? iterator.call(context, value, index, list) : value; + if (computed > lastComputed) { + result = value; + lastComputed = computed; + } + }); + return result; + }; + + // Return the minimum element (or element-based computation). + _.min = function (obj, iterator, context) { + if (!iterator && _.isArray(obj) && obj[0] === +obj[0] && obj.length < 65535) { + return Math.min.apply(Math, obj); + } + var result = Infinity, + lastComputed = Infinity; + each(obj, function (value, index, list) { + var computed = iterator ? iterator.call(context, value, index, list) : value; + if (computed < lastComputed) { + result = value; + lastComputed = computed; + } + }); + return result; + }; + + // Shuffle an array, using the modern version of the + // [Fisher-Yates shuffle](http://en.wikipedia.org/wiki/Fisher–Yates_shuffle). + _.shuffle = function (obj) { + var rand; + var index = 0; + var shuffled = []; + each(obj, function (value) { + rand = _.random(index++); + shuffled[index - 1] = shuffled[rand]; + shuffled[rand] = value; + }); + return shuffled; + }; + + // Sample **n** random values from a collection. + // If **n** is not specified, returns a single random element. + // The internal `guard` argument allows it to work with `map`. + _.sample = function (obj, n, guard) { + if (n == null || guard) { + if (obj.length !== +obj.length) obj = _.values(obj); + return obj[_.random(obj.length - 1)]; + } + return _.shuffle(obj).slice(0, Math.max(0, n)); + }; + + // An internal function to generate lookup iterators. + var lookupIterator = function (value) { + if (value == null) return _.identity; + if (_.isFunction(value)) return value; + return _.property(value); + }; + + // Sort the object's values by a criterion produced by an iterator. + _.sortBy = function (obj, iterator, context) { + iterator = lookupIterator(iterator); + return _.pluck( + _.map(obj, function (value, index, list) { + return { + value: value, + index: index, + criteria: iterator.call(context, value, index, list), + }; + }).sort(function (left, right) { + var a = left.criteria; + var b = right.criteria; + if (a !== b) { + if (a > b || a === void 0) return 1; + if (a < b || b === void 0) return -1; + } + return left.index - right.index; + }), + 'value', + ); + }; + + // An internal function used for aggregate "group by" operations. + var group = function (behavior) { + return function (obj, iterator, context) { + var result = {}; + iterator = lookupIterator(iterator); + each(obj, function (value, index) { + var key = iterator.call(context, value, index, obj); + behavior(result, key, value); + }); + return result; + }; + }; + + // Groups the object's values by a criterion. Pass either a string attribute + // to group by, or a function that returns the criterion. + _.groupBy = group(function (result, key, value) { + _.has(result, key) ? result[key].push(value) : (result[key] = [value]); + }); + + // Indexes the object's values by a criterion, similar to `groupBy`, but for + // when you know that your index values will be unique. + _.indexBy = group(function (result, key, value) { + result[key] = value; + }); + + // Counts instances of an object that group by a certain criterion. Pass + // either a string attribute to count by, or a function that returns the + // criterion. + _.countBy = group(function (result, key) { + _.has(result, key) ? result[key]++ : (result[key] = 1); + }); + + // Use a comparator function to figure out the smallest index at which + // an object should be inserted so as to maintain order. Uses binary search. + _.sortedIndex = function (array, obj, iterator, context) { + iterator = lookupIterator(iterator); + var value = iterator.call(context, obj); + var low = 0, + high = array.length; + while (low < high) { + var mid = (low + high) >>> 1; + iterator.call(context, array[mid]) < value ? (low = mid + 1) : (high = mid); + } + return low; + }; + + // Safely create a real, live array from anything iterable. + _.toArray = function (obj) { + if (!obj) return []; + if (_.isArray(obj)) return slice.call(obj); + if (obj.length === +obj.length) return _.map(obj, _.identity); + return _.values(obj); + }; + + // Return the number of elements in an object. + _.size = function (obj) { + if (obj == null) return 0; + return obj.length === +obj.length ? obj.length : _.keys(obj).length; + }; + + // Array Functions + // --------------- + + // Get the first element of an array. Passing **n** will return the first N + // values in the array. Aliased as `head` and `take`. The **guard** check + // allows it to work with `_.map`. + _.first = + _.head = + _.take = + function (array, n, guard) { + if (array == null) return void 0; + if (n == null || guard) return array[0]; + if (n < 0) return []; + return slice.call(array, 0, n); + }; + + // Returns everything but the last entry of the array. Especially useful on + // the arguments object. Passing **n** will return all the values in + // the array, excluding the last N. The **guard** check allows it to work with + // `_.map`. + _.initial = function (array, n, guard) { + return slice.call(array, 0, array.length - (n == null || guard ? 1 : n)); + }; + + // Get the last element of an array. Passing **n** will return the last N + // values in the array. The **guard** check allows it to work with `_.map`. + _.last = function (array, n, guard) { + if (array == null) return void 0; + if (n == null || guard) return array[array.length - 1]; + return slice.call(array, Math.max(array.length - n, 0)); + }; + + // Returns everything but the first entry of the array. Aliased as `tail` and `drop`. + // Especially useful on the arguments object. Passing an **n** will return + // the rest N values in the array. The **guard** + // check allows it to work with `_.map`. + _.rest = + _.tail = + _.drop = + function (array, n, guard) { + return slice.call(array, n == null || guard ? 1 : n); + }; + + // Trim out all falsy values from an array. + _.compact = function (array) { + return _.filter(array, _.identity); + }; + + // Internal implementation of a recursive `flatten` function. + var flatten = function (input, shallow, output) { + if (shallow && _.every(input, _.isArray)) { + return concat.apply(output, input); + } + each(input, function (value) { + if (_.isArray(value) || _.isArguments(value)) { + shallow ? push.apply(output, value) : flatten(value, shallow, output); + } else { + output.push(value); + } + }); + return output; + }; + + // Flatten out an array, either recursively (by default), or just one level. + _.flatten = function (array, shallow) { + return flatten(array, shallow, []); + }; + + // Return a version of the array that does not contain the specified value(s). + _.without = function (array) { + return _.difference(array, slice.call(arguments, 1)); + }; + + // Split an array into two arrays: one whose elements all satisfy the given + // predicate, and one whose elements all do not satisfy the predicate. + _.partition = function (array, predicate) { + var pass = [], + fail = []; + each(array, function (elem) { + (predicate(elem) ? pass : fail).push(elem); + }); + return [pass, fail]; + }; + + // Produce a duplicate-free version of the array. If the array has already + // been sorted, you have the option of using a faster algorithm. + // Aliased as `unique`. + _.uniq = _.unique = function (array, isSorted, iterator, context) { + if (_.isFunction(isSorted)) { + context = iterator; + iterator = isSorted; + isSorted = false; + } + var initial = iterator ? _.map(array, iterator, context) : array; + var results = []; + var seen = []; + each(initial, function (value, index) { + if (isSorted ? !index || seen[seen.length - 1] !== value : !_.contains(seen, value)) { + seen.push(value); + results.push(array[index]); + } + }); + return results; + }; + + // Produce an array that contains the union: each distinct element from all of + // the passed-in arrays. + _.union = function () { + return _.uniq(_.flatten(arguments, true)); + }; + + // Produce an array that contains every item shared between all the + // passed-in arrays. + _.intersection = function (array) { + var rest = slice.call(arguments, 1); + return _.filter(_.uniq(array), function (item) { + return _.every(rest, function (other) { + return _.contains(other, item); + }); + }); + }; + + // Take the difference between one array and a number of other arrays. + // Only the elements present in just the first array will remain. + _.difference = function (array) { + var rest = concat.apply(ArrayProto, slice.call(arguments, 1)); + return _.filter(array, function (value) { + return !_.contains(rest, value); + }); + }; + + // Zip together multiple lists into a single array -- elements that share + // an index go together. + _.zip = function () { + var length = _.max(_.pluck(arguments, 'length').concat(0)); + var results = new Array(length); + for (var i = 0; i < length; i++) { + results[i] = _.pluck(arguments, '' + i); + } + return results; + }; + + // Converts lists into objects. Pass either a single array of `[key, value]` + // pairs, or two parallel arrays of the same length -- one of keys, and one of + // the corresponding values. + _.object = function (list, values) { + if (list == null) return {}; + var result = {}; + for (var i = 0, length = list.length; i < length; i++) { + if (values) { + result[list[i]] = values[i]; + } else { + result[list[i][0]] = list[i][1]; + } + } + return result; + }; + + // If the browser doesn't supply us with indexOf (I'm looking at you, **MSIE**), + // we need this function. Return the position of the first occurrence of an + // item in an array, or -1 if the item is not included in the array. + // Delegates to **ECMAScript 5**'s native `indexOf` if available. + // If the array is large and already in sort order, pass `true` + // for **isSorted** to use binary search. + _.indexOf = function (array, item, isSorted) { + if (array == null) return -1; + var i = 0, + length = array.length; + if (isSorted) { + if (typeof isSorted == 'number') { + i = isSorted < 0 ? Math.max(0, length + isSorted) : isSorted; + } else { + i = _.sortedIndex(array, item); + return array[i] === item ? i : -1; + } + } + if (nativeIndexOf && array.indexOf === nativeIndexOf) return array.indexOf(item, isSorted); + for (; i < length; i++) if (array[i] === item) return i; + return -1; + }; + + // Delegates to **ECMAScript 5**'s native `lastIndexOf` if available. + _.lastIndexOf = function (array, item, from) { + if (array == null) return -1; + var hasIndex = from != null; + if (nativeLastIndexOf && array.lastIndexOf === nativeLastIndexOf) { + return hasIndex ? array.lastIndexOf(item, from) : array.lastIndexOf(item); + } + var i = hasIndex ? from : array.length; + while (i--) if (array[i] === item) return i; + return -1; + }; + + // Generate an integer Array containing an arithmetic progression. A port of + // the native Python `range()` function. See + // [the Python documentation](http://docs.python.org/library/functions.html#range). + _.range = function (start, stop, step) { + if (arguments.length <= 1) { + stop = start || 0; + start = 0; + } + step = arguments[2] || 1; + + var length = Math.max(Math.ceil((stop - start) / step), 0); + var idx = 0; + var range = new Array(length); + + while (idx < length) { + range[idx++] = start; + start += step; + } + + return range; + }; + + // Function (ahem) Functions + // ------------------ + + // Reusable constructor function for prototype setting. + var ctor = function () {}; + + // Create a function bound to a given object (assigning `this`, and arguments, + // optionally). Delegates to **ECMAScript 5**'s native `Function.bind` if + // available. + _.bind = function (func, context) { + var args, bound; + if (nativeBind && func.bind === nativeBind) return nativeBind.apply(func, slice.call(arguments, 1)); + if (!_.isFunction(func)) throw new TypeError(); + args = slice.call(arguments, 2); + return (bound = function () { + if (!(this instanceof bound)) return func.apply(context, args.concat(slice.call(arguments))); + ctor.prototype = func.prototype; + var self = new ctor(); + ctor.prototype = null; + var result = func.apply(self, args.concat(slice.call(arguments))); + if (Object(result) === result) return result; + return self; + }); + }; + + // Partially apply a function by creating a version that has had some of its + // arguments pre-filled, without changing its dynamic `this` context. _ acts + // as a placeholder, allowing any combination of arguments to be pre-filled. + _.partial = function (func) { + var boundArgs = slice.call(arguments, 1); + return function () { + var position = 0; + var args = boundArgs.slice(); + for (var i = 0, length = args.length; i < length; i++) { + if (args[i] === _) args[i] = arguments[position++]; + } + while (position < arguments.length) args.push(arguments[position++]); + return func.apply(this, args); + }; + }; + + // Bind a number of an object's methods to that object. Remaining arguments + // are the method names to be bound. Useful for ensuring that all callbacks + // defined on an object belong to it. + _.bindAll = function (obj) { + var funcs = slice.call(arguments, 1); + if (funcs.length === 0) throw new Error('bindAll must be passed function names'); + each(funcs, function (f) { + obj[f] = _.bind(obj[f], obj); + }); + return obj; + }; + + // Memoize an expensive function by storing its results. + _.memoize = function (func, hasher) { + var memo = {}; + hasher || (hasher = _.identity); + return function () { + var key = hasher.apply(this, arguments); + return _.has(memo, key) ? memo[key] : (memo[key] = func.apply(this, arguments)); + }; + }; + + // Delays a function for the given number of milliseconds, and then calls + // it with the arguments supplied. + _.delay = function (func, wait) { + var args = slice.call(arguments, 2); + return setTimeout(function () { + return func.apply(null, args); + }, wait); + }; + + // Defers a function, scheduling it to run after the current call stack has + // cleared. + _.defer = function (func) { + return _.delay.apply(_, [func, 1].concat(slice.call(arguments, 1))); + }; + + // Returns a function, that, when invoked, will only be triggered at most once + // during a given window of time. Normally, the throttled function will run + // as much as it can, without ever going more than once per `wait` duration; + // but if you'd like to disable the execution on the leading edge, pass + // `{leading: false}`. To disable execution on the trailing edge, ditto. + _.throttle = function (func, wait, options) { + var context, args, result; + var timeout = null; + var previous = 0; + options || (options = {}); + var later = function () { + previous = options.leading === false ? 0 : _.now(); + timeout = null; + result = func.apply(context, args); + context = args = null; + }; + return function () { + var now = _.now(); + if (!previous && options.leading === false) previous = now; + var remaining = wait - (now - previous); + context = this; + args = arguments; + if (remaining <= 0) { + clearTimeout(timeout); + timeout = null; + previous = now; + result = func.apply(context, args); + context = args = null; + } else if (!timeout && options.trailing !== false) { + timeout = setTimeout(later, remaining); + } + return result; + }; + }; + + // Returns a function, that, as long as it continues to be invoked, will not + // be triggered. The function will be called after it stops being called for + // N milliseconds. If `immediate` is passed, trigger the function on the + // leading edge, instead of the trailing. + _.debounce = function (func, wait, immediate) { + var timeout, args, context, timestamp, result; + + var later = function () { + var last = _.now() - timestamp; + if (last < wait) { + timeout = setTimeout(later, wait - last); + } else { + timeout = null; + if (!immediate) { + result = func.apply(context, args); + context = args = null; + } + } + }; + + return function () { + context = this; + args = arguments; + timestamp = _.now(); + var callNow = immediate && !timeout; + if (!timeout) { + timeout = setTimeout(later, wait); + } + if (callNow) { + result = func.apply(context, args); + context = args = null; + } + + return result; + }; + }; + + // Returns a function that will be executed at most one time, no matter how + // often you call it. Useful for lazy initialization. + _.once = function (func) { + var ran = false, + memo; + return function () { + if (ran) return memo; + ran = true; + memo = func.apply(this, arguments); + func = null; + return memo; + }; + }; + + // Returns the first function passed as an argument to the second, + // allowing you to adjust arguments, run code before and after, and + // conditionally execute the original function. + _.wrap = function (func, wrapper) { + return _.partial(wrapper, func); + }; + + // Returns a function that is the composition of a list of functions, each + // consuming the return value of the function that follows. + _.compose = function () { + var funcs = arguments; + return function () { + var args = arguments; + for (var i = funcs.length - 1; i >= 0; i--) { + args = [funcs[i].apply(this, args)]; + } + return args[0]; + }; + }; + + // Returns a function that will only be executed after being called N times. + _.after = function (times, func) { + return function () { + if (--times < 1) { + return func.apply(this, arguments); + } + }; + }; + + // Object Functions + // ---------------- + + // Retrieve the names of an object's properties. + // Delegates to **ECMAScript 5**'s native `Object.keys` + _.keys = function (obj) { + if (!_.isObject(obj)) return []; + if (nativeKeys) return nativeKeys(obj); + var keys = []; + for (var key in obj) if (_.has(obj, key)) keys.push(key); + return keys; + }; + + // Retrieve the values of an object's properties. + _.values = function (obj) { + var keys = _.keys(obj); + var length = keys.length; + var values = new Array(length); + for (var i = 0; i < length; i++) { + values[i] = obj[keys[i]]; + } + return values; + }; + + // Convert an object into a list of `[key, value]` pairs. + _.pairs = function (obj) { + var keys = _.keys(obj); + var length = keys.length; + var pairs = new Array(length); + for (var i = 0; i < length; i++) { + pairs[i] = [keys[i], obj[keys[i]]]; + } + return pairs; + }; + + // Invert the keys and values of an object. The values must be serializable. + _.invert = function (obj) { + var result = {}; + var keys = _.keys(obj); + for (var i = 0, length = keys.length; i < length; i++) { + result[obj[keys[i]]] = keys[i]; + } + return result; + }; + + // Return a sorted list of the function names available on the object. + // Aliased as `methods` + _.functions = _.methods = function (obj) { + var names = []; + for (var key in obj) { + if (_.isFunction(obj[key])) names.push(key); + } + return names.sort(); + }; + + // Extend a given object with all the properties in passed-in object(s). + _.extend = function (obj) { + each(slice.call(arguments, 1), function (source) { + if (source) { + for (var prop in source) { + obj[prop] = source[prop]; + } + } + }); + return obj; + }; + + // Return a copy of the object only containing the whitelisted properties. + _.pick = function (obj) { + var copy = {}; + var keys = concat.apply(ArrayProto, slice.call(arguments, 1)); + each(keys, function (key) { + if (key in obj) copy[key] = obj[key]; + }); + return copy; + }; + + // Return a copy of the object without the blacklisted properties. + _.omit = function (obj) { + var copy = {}; + var keys = concat.apply(ArrayProto, slice.call(arguments, 1)); + for (var key in obj) { + if (!_.contains(keys, key)) copy[key] = obj[key]; + } + return copy; + }; + + // Fill in a given object with default properties. + _.defaults = function (obj) { + each(slice.call(arguments, 1), function (source) { + if (source) { + for (var prop in source) { + if (obj[prop] === void 0) obj[prop] = source[prop]; + } + } + }); + return obj; + }; + + // Create a (shallow-cloned) duplicate of an object. + _.clone = function (obj) { + if (!_.isObject(obj)) return obj; + return _.isArray(obj) ? obj.slice() : _.extend({}, obj); + }; + + // Invokes interceptor with the obj, and then returns obj. + // The primary purpose of this method is to "tap into" a method chain, in + // order to perform operations on intermediate results within the chain. + _.tap = function (obj, interceptor) { + interceptor(obj); + return obj; + }; + + // Internal recursive comparison function for `isEqual`. + var eq = function (a, b, aStack, bStack) { + // Identical objects are equal. `0 === -0`, but they aren't identical. + // See the [Harmony `egal` proposal](http://wiki.ecmascript.org/doku.php?id=harmony:egal). + if (a === b) return a !== 0 || 1 / a == 1 / b; + // A strict comparison is necessary because `null == undefined`. + if (a == null || b == null) return a === b; + // Unwrap any wrapped objects. + if (a instanceof _) a = a._wrapped; + if (b instanceof _) b = b._wrapped; + // Compare `[[Class]]` names. + var className = toString.call(a); + if (className != toString.call(b)) return false; + switch (className) { + // Strings, numbers, dates, and booleans are compared by value. + case '[object String]': + // Primitives and their corresponding object wrappers are equivalent; thus, `"5"` is + // equivalent to `new String("5")`. + return a == String(b); + case '[object Number]': + // `NaN`s are equivalent, but non-reflexive. An `egal` comparison is performed for + // other numeric values. + return a != +a ? b != +b : a == 0 ? 1 / a == 1 / b : a == +b; + case '[object Date]': + case '[object Boolean]': + // Coerce dates and booleans to numeric primitive values. Dates are compared by their + // millisecond representations. Note that invalid dates with millisecond representations + // of `NaN` are not equivalent. + return +a == +b; + // RegExps are compared by their source patterns and flags. + case '[object RegExp]': + return ( + a.source == b.source && + a.global == b.global && + a.multiline == b.multiline && + a.ignoreCase == b.ignoreCase + ); + } + if (typeof a != 'object' || typeof b != 'object') return false; + // Assume equality for cyclic structures. The algorithm for detecting cyclic + // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`. + var length = aStack.length; + while (length--) { + // Linear search. Performance is inversely proportional to the number of + // unique nested structures. + if (aStack[length] == a) return bStack[length] == b; + } + // Objects with different constructors are not equivalent, but `Object`s + // from different frames are. + var aCtor = a.constructor, + bCtor = b.constructor; + if ( + aCtor !== bCtor && + !( + _.isFunction(aCtor) && + aCtor instanceof aCtor && + _.isFunction(bCtor) && + bCtor instanceof bCtor + ) && + 'constructor' in a && + 'constructor' in b + ) { + return false; + } + // Add the first object to the stack of traversed objects. + aStack.push(a); + bStack.push(b); + var size = 0, + result = true; + // Recursively compare objects and arrays. + if (className == '[object Array]') { + // Compare array lengths to determine if a deep comparison is necessary. + size = a.length; + result = size == b.length; + if (result) { + // Deep compare the contents, ignoring non-numeric properties. + while (size--) { + if (!(result = eq(a[size], b[size], aStack, bStack))) break; + } + } + } else { + // Deep compare objects. + for (var key in a) { + if (_.has(a, key)) { + // Count the expected number of properties. + size++; + // Deep compare each member. + if (!(result = _.has(b, key) && eq(a[key], b[key], aStack, bStack))) break; + } + } + // Ensure that both objects contain the same number of properties. + if (result) { + for (key in b) { + if (_.has(b, key) && !size--) break; + } + result = !size; + } + } + // Remove the first object from the stack of traversed objects. + aStack.pop(); + bStack.pop(); + return result; + }; + + // Perform a deep comparison to check if two objects are equal. + _.isEqual = function (a, b) { + return eq(a, b, [], []); + }; + + // Is a given array, string, or object empty? + // An "empty" object has no enumerable own-properties. + _.isEmpty = function (obj) { + if (obj == null) return true; + if (_.isArray(obj) || _.isString(obj)) return obj.length === 0; + for (var key in obj) if (_.has(obj, key)) return false; + return true; + }; + + // Is a given value a DOM element? + _.isElement = function (obj) { + return !!(obj && obj.nodeType === 1); + }; + + // Is a given value an array? + // Delegates to ECMA5's native Array.isArray + _.isArray = + nativeIsArray || + function (obj) { + return toString.call(obj) == '[object Array]'; + }; + + // Is a given variable an object? + _.isObject = function (obj) { + return obj === Object(obj); + }; + + // Add some isType methods: isArguments, isFunction, isString, isNumber, isDate, isRegExp. + each(['Arguments', 'Function', 'String', 'Number', 'Date', 'RegExp'], function (name) { + _['is' + name] = function (obj) { + return toString.call(obj) == '[object ' + name + ']'; + }; + }); + + // Define a fallback version of the method in browsers (ahem, IE), where + // there isn't any inspectable "Arguments" type. + if (!_.isArguments(arguments)) { + _.isArguments = function (obj) { + return !!(obj && _.has(obj, 'callee')); + }; + } + + // Optimize `isFunction` if appropriate. + if (true) { + _.isFunction = function (obj) { + return typeof obj === 'function'; + }; + } + + // Is a given object a finite number? + _.isFinite = function (obj) { + return isFinite(obj) && !isNaN(parseFloat(obj)); + }; + + // Is the given value `NaN`? (NaN is the only number which does not equal itself). + _.isNaN = function (obj) { + return _.isNumber(obj) && obj != +obj; + }; + + // Is a given value a boolean? + _.isBoolean = function (obj) { + return obj === true || obj === false || toString.call(obj) == '[object Boolean]'; + }; + + // Is a given value equal to null? + _.isNull = function (obj) { + return obj === null; + }; + + // Is a given variable undefined? + _.isUndefined = function (obj) { + return obj === void 0; + }; + + // Shortcut function for checking if an object has a given property directly + // on itself (in other words, not on a prototype). + _.has = function (obj, key) { + return hasOwnProperty.call(obj, key); + }; + + // Utility Functions + // ----------------- + + // Run Underscore.js in *noConflict* mode, returning the `_` variable to its + // previous owner. Returns a reference to the Underscore object. + _.noConflict = function () { + root._ = previousUnderscore; + return this; + }; + + // Keep the identity function around for default iterators. + _.identity = function (value) { + return value; + }; + + _.constant = function (value) { + return function () { + return value; + }; + }; + + _.property = function (key) { + return function (obj) { + return obj[key]; + }; + }; + + // Returns a predicate for checking whether an object has a given set of `key:value` pairs. + _.matches = function (attrs) { + return function (obj) { + if (obj === attrs) return true; //avoid comparing an object to itself. + for (var key in attrs) { + if (attrs[key] !== obj[key]) return false; + } + return true; + }; + }; + + // Run a function **n** times. + _.times = function (n, iterator, context) { + var accum = Array(Math.max(0, n)); + for (var i = 0; i < n; i++) accum[i] = iterator.call(context, i); + return accum; + }; + + // Return a random integer between min and max (inclusive). + _.random = function (min, max) { + if (max == null) { + max = min; + min = 0; + } + return min + Math.floor(Math.random() * (max - min + 1)); + }; + + // A (possibly faster) way to get the current timestamp as an integer. + _.now = + Date.now || + function () { + return new Date().getTime(); + }; + + // List of HTML entities for escaping. + var entityMap = { + escape: { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''', + }, + }; + entityMap.unescape = _.invert(entityMap.escape); + + // Regexes containing the keys and values listed immediately above. + var entityRegexes = { + escape: new RegExp('[' + _.keys(entityMap.escape).join('') + ']', 'g'), + unescape: new RegExp('(' + _.keys(entityMap.unescape).join('|') + ')', 'g'), + }; + + // Functions for escaping and unescaping strings to/from HTML interpolation. + _.each(['escape', 'unescape'], function (method) { + _[method] = function (string) { + if (string == null) return ''; + return ('' + string).replace(entityRegexes[method], function (match) { + return entityMap[method][match]; + }); + }; + }); + + // If the value of the named `property` is a function then invoke it with the + // `object` as context; otherwise, return it. + _.result = function (object, property) { + if (object == null) return void 0; + var value = object[property]; + return _.isFunction(value) ? value.call(object) : value; + }; + + // Add your own custom functions to the Underscore object. + _.mixin = function (obj) { + each(_.functions(obj), function (name) { + var func = (_[name] = obj[name]); + _.prototype[name] = function () { + var args = [this._wrapped]; + push.apply(args, arguments); + return result.call(this, func.apply(_, args)); + }; + }); + }; + + // Generate a unique integer id (unique within the entire client session). + // Useful for temporary DOM ids. + var idCounter = 0; + _.uniqueId = function (prefix) { + var id = ++idCounter + ''; + return prefix ? prefix + id : id; + }; + + // By default, Underscore uses ERB-style template delimiters, change the + // following template settings to use alternative delimiters. + _.templateSettings = { + evaluate: /<%([\s\S]+?)%>/g, + interpolate: /<%=([\s\S]+?)%>/g, + escape: /<%-([\s\S]+?)%>/g, + }; + + // When customizing `templateSettings`, if you don't want to define an + // interpolation, evaluation or escaping regex, we need one that is + // guaranteed not to match. + var noMatch = /(.)^/; + + // Certain characters need to be escaped so that they can be put into a + // string literal. + var escapes = { + "'": "'", + '\\': '\\', + '\r': 'r', + '\n': 'n', + '\t': 't', + '\u2028': 'u2028', + '\u2029': 'u2029', + }; + + var escaper = /\\|'|\r|\n|\t|\u2028|\u2029/g; + + // JavaScript micro-templating, similar to John Resig's implementation. + // Underscore templating handles arbitrary delimiters, preserves whitespace, + // and correctly escapes quotes within interpolated code. + _.template = function (text, data, settings) { + var render; + settings = _.defaults({}, settings, _.templateSettings); + + // Combine delimiters into one regular expression via alternation. + var matcher = new RegExp( + [ + (settings.escape || noMatch).source, + (settings.interpolate || noMatch).source, + (settings.evaluate || noMatch).source, + ].join('|') + '|$', + 'g', + ); + + // Compile the template source, escaping string literals appropriately. + var index = 0; + var source = "__p+='"; + text.replace(matcher, function (match, escape, interpolate, evaluate, offset) { + source += text.slice(index, offset).replace(escaper, function (match) { + return '\\' + escapes[match]; + }); + + if (escape) { + source += "'+\n((__t=(" + escape + "))==null?'':_.escape(__t))+\n'"; + } + if (interpolate) { + source += "'+\n((__t=(" + interpolate + "))==null?'':__t)+\n'"; + } + if (evaluate) { + source += "';\n" + evaluate + "\n__p+='"; + } + index = offset + match.length; + return match; + }); + source += "';\n"; + + // If a variable is not specified, place data values in local scope. + if (!settings.variable) source = 'with(obj||{}){\n' + source + '}\n'; + + source = + "var __t,__p='',__j=Array.prototype.join," + + "print=function(){__p+=__j.call(arguments,'');};\n" + + source + + 'return __p;\n'; + + try { + render = new Function(settings.variable || 'obj', '_', source); + } catch (e) { + e.source = source; + throw e; + } + + if (data) return render(data, _); + var template = function (data) { + return render.call(this, data, _); + }; + + // Provide the compiled function source as a convenience for precompilation. + template.source = 'function(' + (settings.variable || 'obj') + '){\n' + source + '}'; + + return template; + }; + + // Add a "chain" function, which will delegate to the wrapper. + _.chain = function (obj) { + return _(obj).chain(); + }; + + // OOP + // --------------- + // If Underscore is called as a function, it returns a wrapped object that + // can be used OO-style. This wrapper holds altered versions of all the + // underscore functions. Wrapped objects may be chained. + + // Helper function to continue chaining intermediate results. + var result = function (obj) { + return this._chain ? _(obj).chain() : obj; + }; + + // Add all of the Underscore functions to the wrapper object. + _.mixin(_); + + // Add all mutator Array functions to the wrapper. + each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function (name) { + var method = ArrayProto[name]; + _.prototype[name] = function () { + var obj = this._wrapped; + method.apply(obj, arguments); + if ((name == 'shift' || name == 'splice') && obj.length === 0) delete obj[0]; + return result.call(this, obj); + }; + }); + + // Add all accessor Array functions to the wrapper. + each(['concat', 'join', 'slice'], function (name) { + var method = ArrayProto[name]; + _.prototype[name] = function () { + return result.call(this, method.apply(this._wrapped, arguments)); + }; + }); + + _.extend(_.prototype, { + // Start chaining a wrapped Underscore object. + chain: function () { + this._chain = true; + return this; + }, + + // Extracts the result from a wrapped and chained object. + value: function () { + return this._wrapped; + }, + }); + + // AMD registration happens at the end for compatibility with AMD loaders + // that may not enforce next-turn semantics on modules. Even though general + // practice for AMD registration is to be anonymous, underscore registers + // as a named module because, like jQuery, it is a base library that is + // popular enough to be bundled in a third party lib, but not be part of + // an AMD load request. Those cases could generate an error when an + // anonymous define() is called outside of a loader request. + if (true) { + !((__WEBPACK_AMD_DEFINE_ARRAY__ = []), + (__WEBPACK_AMD_DEFINE_RESULT__ = function () { + return _; + }.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } + }).call(this); + + /***/ + }, + /* 61 */ + /***/ function (module, exports) { + // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 + var global = (module.exports = + typeof window != 'undefined' && window.Math == Math + ? window + : typeof self != 'undefined' && self.Math == Math + ? self + : Function('return this')()); + if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef + + /***/ + }, + /* 62 */ + /***/ function (module, exports, __webpack_require__) { + var anObject = __webpack_require__(114), + IE8_DOM_DEFINE = __webpack_require__(498), + toPrimitive = __webpack_require__(514), + dP = Object.defineProperty; + + exports.f = __webpack_require__(74) + ? Object.defineProperty + : function defineProperty(O, P, Attributes) { + anObject(O); + P = toPrimitive(P, true); + anObject(Attributes); + if (IE8_DOM_DEFINE) + try { + return dP(O, P, Attributes); + } catch (e) { + /* empty */ + } + if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!'); + if ('value' in Attributes) O[P] = Attributes.value; + return O; + }; + + /***/ + }, + /* 63 */ + /***/ function (module, exports, __webpack_require__) { + var META = __webpack_require__(84)('meta'), + isObject = __webpack_require__(11), + has = __webpack_require__(27), + setDesc = __webpack_require__(15).f, + id = 0; + var isExtensible = + Object.isExtensible || + function () { + return true; + }; + var FREEZE = !__webpack_require__(10)(function () { + return isExtensible(Object.preventExtensions({})); + }); + var setMeta = function (it) { + setDesc(it, META, { + value: { + i: 'O' + ++id, // object ID + w: {}, // weak collections IDs + }, + }); + }; + var fastKey = function (it, create) { + // return primitive with prefix + if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; + if (!has(it, META)) { + // can't set metadata to uncaught frozen object + if (!isExtensible(it)) return 'F'; + // not necessary to add metadata + if (!create) return 'E'; + // add missing metadata + setMeta(it); + // return object ID + } + return it[META].i; + }; + var getWeak = function (it, create) { + if (!has(it, META)) { + // can't set metadata to uncaught frozen object + if (!isExtensible(it)) return true; + // not necessary to add metadata + if (!create) return false; + // add missing metadata + setMeta(it); + // return hash weak collections IDs + } + return it[META].w; + }; + // add metadata on freeze-family methods calling + var onFreeze = function (it) { + if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it); + return it; + }; + var meta = (module.exports = { + KEY: META, + NEED: false, + fastKey: fastKey, + getWeak: getWeak, + onFreeze: onFreeze, + }); + + /***/ + }, + /* 64 */ + /***/ function (module, exports) { + module.exports = function (bitmap, value) { + return { + enumerable: !(bitmap & 1), + configurable: !(bitmap & 2), + writable: !(bitmap & 4), + value: value, + }; + }; + + /***/ + }, + /* 65 */ + /***/ function (module, exports) { + // 7.1.4 ToInteger + var ceil = Math.ceil, + floor = Math.floor; + module.exports = function (it) { + return isNaN((it = +it)) ? 0 : (it > 0 ? floor : ceil)(it); + }; + + /***/ + }, + /* 66 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var emptyObject = {}; + + if (true) { + Object.freeze(emptyObject); + } + + module.exports = emptyObject; + + /***/ + }, + /* 67 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + exports.createPath = + exports.parsePath = + exports.getQueryStringValueFromPath = + exports.stripQueryStringValueFromPath = + exports.addQueryStringValueToPath = + undefined; + + var _warning = __webpack_require__(71); + + var _warning2 = _interopRequireDefault(_warning); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + var addQueryStringValueToPath = (exports.addQueryStringValueToPath = function addQueryStringValueToPath( + path, + key, + value, + ) { + var _parsePath = parsePath(path), + pathname = _parsePath.pathname, + search = _parsePath.search, + hash = _parsePath.hash; + + return createPath({ + pathname: pathname, + search: search + (search.indexOf('?') === -1 ? '?' : '&') + key + '=' + value, + hash: hash, + }); + }); + + var stripQueryStringValueFromPath = (exports.stripQueryStringValueFromPath = + function stripQueryStringValueFromPath(path, key) { + var _parsePath2 = parsePath(path), + pathname = _parsePath2.pathname, + search = _parsePath2.search, + hash = _parsePath2.hash; + + return createPath({ + pathname: pathname, + search: search.replace( + new RegExp('([?&])' + key + '=[a-zA-Z0-9]+(&?)'), + function (match, prefix, suffix) { + return prefix === '?' ? prefix : suffix; + }, + ), + hash: hash, + }); + }); + + var getQueryStringValueFromPath = (exports.getQueryStringValueFromPath = + function getQueryStringValueFromPath(path, key) { + var _parsePath3 = parsePath(path), + search = _parsePath3.search; + + var match = search.match(new RegExp('[?&]' + key + '=([a-zA-Z0-9]+)')); + return match && match[1]; + }); + + var extractPath = function extractPath(string) { + var match = string.match(/^(https?:)?\/\/[^\/]*/); + return match == null ? string : string.substring(match[0].length); + }; + + var parsePath = (exports.parsePath = function parsePath(path) { + var pathname = extractPath(path); + var search = ''; + var hash = ''; + + true + ? (0, _warning2.default)( + path === pathname, + 'A path must be pathname + search + hash only, not a full URL like "%s"', + path, + ) + : void 0; + + var hashIndex = pathname.indexOf('#'); + if (hashIndex !== -1) { + hash = pathname.substring(hashIndex); + pathname = pathname.substring(0, hashIndex); + } + + var searchIndex = pathname.indexOf('?'); + if (searchIndex !== -1) { + search = pathname.substring(searchIndex); + pathname = pathname.substring(0, searchIndex); + } + + if (pathname === '') pathname = '/'; + + return { + pathname: pathname, + search: search, + hash: hash, + }; + }); + + var createPath = (exports.createPath = function createPath(location) { + if (location == null || typeof location === 'string') return location; + + var basename = location.basename, + pathname = location.pathname, + search = location.search, + hash = location.hash; + + var path = (basename || '') + pathname; + + if (search && search !== '?') path += search; + + if (hash) path += hash; + + return path; + }); + + /***/ + }, + /* 68 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var _prodInvariant = __webpack_require__(7); + + var invariant = __webpack_require__(3); + + function checkMask(value, bitmask) { + return (value & bitmask) === bitmask; + } + + var DOMPropertyInjection = { + /** + * Mapping from normalized, camelcased property names to a configuration that + * specifies how the associated DOM property should be accessed or rendered. + */ + MUST_USE_PROPERTY: 0x1, + HAS_BOOLEAN_VALUE: 0x4, + HAS_NUMERIC_VALUE: 0x8, + HAS_POSITIVE_NUMERIC_VALUE: 0x10 | 0x8, + HAS_OVERLOADED_BOOLEAN_VALUE: 0x20, + + /** + * Inject some specialized knowledge about the DOM. This takes a config object + * with the following properties: + * + * isCustomAttribute: function that given an attribute name will return true + * if it can be inserted into the DOM verbatim. Useful for data-* or aria-* + * attributes where it's impossible to enumerate all of the possible + * attribute names, + * + * Properties: object mapping DOM property name to one of the + * DOMPropertyInjection constants or null. If your attribute isn't in here, + * it won't get written to the DOM. + * + * DOMAttributeNames: object mapping React attribute name to the DOM + * attribute name. Attribute names not specified use the **lowercase** + * normalized name. + * + * DOMAttributeNamespaces: object mapping React attribute name to the DOM + * attribute namespace URL. (Attribute names not specified use no namespace.) + * + * DOMPropertyNames: similar to DOMAttributeNames but for DOM properties. + * Property names not specified use the normalized name. + * + * DOMMutationMethods: Properties that require special mutation methods. If + * `value` is undefined, the mutation method should unset the property. + * + * @param {object} domPropertyConfig the config as described above. + */ + injectDOMPropertyConfig: function (domPropertyConfig) { + var Injection = DOMPropertyInjection; + var Properties = domPropertyConfig.Properties || {}; + var DOMAttributeNamespaces = domPropertyConfig.DOMAttributeNamespaces || {}; + var DOMAttributeNames = domPropertyConfig.DOMAttributeNames || {}; + var DOMPropertyNames = domPropertyConfig.DOMPropertyNames || {}; + var DOMMutationMethods = domPropertyConfig.DOMMutationMethods || {}; + + if (domPropertyConfig.isCustomAttribute) { + DOMProperty._isCustomAttributeFunctions.push(domPropertyConfig.isCustomAttribute); + } + + for (var propName in Properties) { + !!DOMProperty.properties.hasOwnProperty(propName) + ? true + ? invariant( + false, + "injectDOMPropertyConfig(...): You're trying to inject DOM property '%s' which has already been injected. You may be accidentally injecting the same DOM property config twice, or you may be injecting two configs that have conflicting property names.", + propName, + ) + : _prodInvariant('48', propName) + : void 0; + + var lowerCased = propName.toLowerCase(); + var propConfig = Properties[propName]; + + var propertyInfo = { + attributeName: lowerCased, + attributeNamespace: null, + propertyName: propName, + mutationMethod: null, + + mustUseProperty: checkMask(propConfig, Injection.MUST_USE_PROPERTY), + hasBooleanValue: checkMask(propConfig, Injection.HAS_BOOLEAN_VALUE), + hasNumericValue: checkMask(propConfig, Injection.HAS_NUMERIC_VALUE), + hasPositiveNumericValue: checkMask(propConfig, Injection.HAS_POSITIVE_NUMERIC_VALUE), + hasOverloadedBooleanValue: checkMask(propConfig, Injection.HAS_OVERLOADED_BOOLEAN_VALUE), + }; + !( + propertyInfo.hasBooleanValue + + propertyInfo.hasNumericValue + + propertyInfo.hasOverloadedBooleanValue <= + 1 + ) + ? true + ? invariant( + false, + 'DOMProperty: Value can be one of boolean, overloaded boolean, or numeric value, but not a combination: %s', + propName, + ) + : _prodInvariant('50', propName) + : void 0; + + if (true) { + DOMProperty.getPossibleStandardName[lowerCased] = propName; + } + + if (DOMAttributeNames.hasOwnProperty(propName)) { + var attributeName = DOMAttributeNames[propName]; + propertyInfo.attributeName = attributeName; + if (true) { + DOMProperty.getPossibleStandardName[attributeName] = propName; + } + } + + if (DOMAttributeNamespaces.hasOwnProperty(propName)) { + propertyInfo.attributeNamespace = DOMAttributeNamespaces[propName]; + } + + if (DOMPropertyNames.hasOwnProperty(propName)) { + propertyInfo.propertyName = DOMPropertyNames[propName]; + } + + if (DOMMutationMethods.hasOwnProperty(propName)) { + propertyInfo.mutationMethod = DOMMutationMethods[propName]; + } + + DOMProperty.properties[propName] = propertyInfo; + } + }, + }; + + /* eslint-disable max-len */ + var ATTRIBUTE_NAME_START_CHAR = + ':A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD'; + /* eslint-enable max-len */ + + /** + * DOMProperty exports lookup objects that can be used like functions: + * + * > DOMProperty.isValid['id'] + * true + * > DOMProperty.isValid['foobar'] + * undefined + * + * Although this may be confusing, it performs better in general. + * + * @see http://jsperf.com/key-exists + * @see http://jsperf.com/key-missing + */ + var DOMProperty = { + ID_ATTRIBUTE_NAME: 'data-reactid', + ROOT_ATTRIBUTE_NAME: 'data-reactroot', + + ATTRIBUTE_NAME_START_CHAR: ATTRIBUTE_NAME_START_CHAR, + ATTRIBUTE_NAME_CHAR: ATTRIBUTE_NAME_START_CHAR + '\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040', + + /** + * Map from property "standard name" to an object with info about how to set + * the property in the DOM. Each object contains: + * + * attributeName: + * Used when rendering markup or with `*Attribute()`. + * attributeNamespace + * propertyName: + * Used on DOM node instances. (This includes properties that mutate due to + * external factors.) + * mutationMethod: + * If non-null, used instead of the property or `setAttribute()` after + * initial render. + * mustUseProperty: + * Whether the property must be accessed and mutated as an object property. + * hasBooleanValue: + * Whether the property should be removed when set to a falsey value. + * hasNumericValue: + * Whether the property must be numeric or parse as a numeric and should be + * removed when set to a falsey value. + * hasPositiveNumericValue: + * Whether the property must be positive numeric or parse as a positive + * numeric and should be removed when set to a falsey value. + * hasOverloadedBooleanValue: + * Whether the property can be used as a flag as well as with a value. + * Removed when strictly equal to false; present without a value when + * strictly equal to true; present with a value otherwise. + */ + properties: {}, + + /** + * Mapping from lowercase property names to the properly cased version, used + * to warn in the case of missing properties. Available only in __DEV__. + * + * autofocus is predefined, because adding it to the property whitelist + * causes unintended side effects. + * + * @type {Object} + */ + getPossibleStandardName: true ? { autofocus: 'autoFocus' } : null, + + /** + * All of the isCustomAttribute() functions that have been injected. + */ + _isCustomAttributeFunctions: [], + + /** + * Checks whether a property name is a custom attribute. + * @method + */ + isCustomAttribute: function (attributeName) { + for (var i = 0; i < DOMProperty._isCustomAttributeFunctions.length; i++) { + var isCustomAttributeFn = DOMProperty._isCustomAttributeFunctions[i]; + if (isCustomAttributeFn(attributeName)) { + return true; + } + } + return false; + }, + + injection: DOMPropertyInjection, + }; + + module.exports = DOMProperty; + + /***/ + }, + /* 69 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var ReactRef = __webpack_require__(785); + var ReactInstrumentation = __webpack_require__(33); + + var warning = __webpack_require__(4); + + /** + * Helper to call ReactRef.attachRefs with this composite component, split out + * to avoid allocations in the transaction mount-ready queue. + */ + function attachRefs() { + ReactRef.attachRefs(this, this._currentElement); + } + + var ReactReconciler = { + /** + * Initializes the component, renders markup, and registers event listeners. + * + * @param {ReactComponent} internalInstance + * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction + * @param {?object} the containing host component instance + * @param {?object} info about the host container + * @return {?string} Rendered markup to be inserted into the DOM. + * @final + * @internal + */ + mountComponent: function ( + internalInstance, + transaction, + hostParent, + hostContainerInfo, + context, + parentDebugID, // 0 in production and for roots + ) { + if (true) { + if (internalInstance._debugID !== 0) { + ReactInstrumentation.debugTool.onBeforeMountComponent( + internalInstance._debugID, + internalInstance._currentElement, + parentDebugID, + ); + } + } + var markup = internalInstance.mountComponent( + transaction, + hostParent, + hostContainerInfo, + context, + parentDebugID, + ); + if (internalInstance._currentElement && internalInstance._currentElement.ref != null) { + transaction.getReactMountReady().enqueue(attachRefs, internalInstance); + } + if (true) { + if (internalInstance._debugID !== 0) { + ReactInstrumentation.debugTool.onMountComponent(internalInstance._debugID); + } + } + return markup; + }, + + /** + * Returns a value that can be passed to + * ReactComponentEnvironment.replaceNodeWithMarkup. + */ + getHostNode: function (internalInstance) { + return internalInstance.getHostNode(); + }, + + /** + * Releases any resources allocated by `mountComponent`. + * + * @final + * @internal + */ + unmountComponent: function (internalInstance, safely) { + if (true) { + if (internalInstance._debugID !== 0) { + ReactInstrumentation.debugTool.onBeforeUnmountComponent(internalInstance._debugID); + } + } + ReactRef.detachRefs(internalInstance, internalInstance._currentElement); + internalInstance.unmountComponent(safely); + if (true) { + if (internalInstance._debugID !== 0) { + ReactInstrumentation.debugTool.onUnmountComponent(internalInstance._debugID); + } + } + }, + + /** + * Update a component using a new element. + * + * @param {ReactComponent} internalInstance + * @param {ReactElement} nextElement + * @param {ReactReconcileTransaction} transaction + * @param {object} context + * @internal + */ + receiveComponent: function (internalInstance, nextElement, transaction, context) { + var prevElement = internalInstance._currentElement; + + if (nextElement === prevElement && context === internalInstance._context) { + // Since elements are immutable after the owner is rendered, + // we can do a cheap identity compare here to determine if this is a + // superfluous reconcile. It's possible for state to be mutable but such + // change should trigger an update of the owner which would recreate + // the element. We explicitly check for the existence of an owner since + // it's possible for an element created outside a composite to be + // deeply mutated and reused. + + // TODO: Bailing out early is just a perf optimization right? + // TODO: Removing the return statement should affect correctness? + return; + } + + if (true) { + if (internalInstance._debugID !== 0) { + ReactInstrumentation.debugTool.onBeforeUpdateComponent(internalInstance._debugID, nextElement); + } + } + + var refsChanged = ReactRef.shouldUpdateRefs(prevElement, nextElement); + + if (refsChanged) { + ReactRef.detachRefs(internalInstance, prevElement); + } + + internalInstance.receiveComponent(nextElement, transaction, context); + + if ( + refsChanged && + internalInstance._currentElement && + internalInstance._currentElement.ref != null + ) { + transaction.getReactMountReady().enqueue(attachRefs, internalInstance); + } + + if (true) { + if (internalInstance._debugID !== 0) { + ReactInstrumentation.debugTool.onUpdateComponent(internalInstance._debugID); + } + } + }, + + /** + * Flush any dirty changes in a component. + * + * @param {ReactComponent} internalInstance + * @param {ReactReconcileTransaction} transaction + * @internal + */ + performUpdateIfNecessary: function (internalInstance, transaction, updateBatchNumber) { + if (internalInstance._updateBatchNumber !== updateBatchNumber) { + // The component's enqueued batch number should always be the current + // batch or the following one. + true + ? warning( + internalInstance._updateBatchNumber == null || + internalInstance._updateBatchNumber === updateBatchNumber + 1, + 'performUpdateIfNecessary: Unexpected batch number (current %s, ' + 'pending %s)', + updateBatchNumber, + internalInstance._updateBatchNumber, + ) + : void 0; + return; + } + if (true) { + if (internalInstance._debugID !== 0) { + ReactInstrumentation.debugTool.onBeforeUpdateComponent( + internalInstance._debugID, + internalInstance._currentElement, + ); + } + } + internalInstance.performUpdateIfNecessary(transaction); + if (true) { + if (internalInstance._debugID !== 0) { + ReactInstrumentation.debugTool.onUpdateComponent(internalInstance._debugID); + } + } + }, + }; + + module.exports = ReactReconciler; + + /***/ + }, + /* 70 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + /* harmony export (immutable) */ __webpack_exports__['a'] = isReactChildren; + /* harmony export (immutable) */ __webpack_exports__['c'] = createRouteFromReactElement; + /* unused harmony export createRoutesFromReactChildren */ + /* harmony export (immutable) */ __webpack_exports__['b'] = createRoutes; + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + function isValidChild(object) { + return object == null || __WEBPACK_IMPORTED_MODULE_0_react___default.a.isValidElement(object); + } + + function isReactChildren(object) { + return isValidChild(object) || (Array.isArray(object) && object.every(isValidChild)); + } + + function createRoute(defaultProps, props) { + return _extends({}, defaultProps, props); + } + + function createRouteFromReactElement(element) { + var type = element.type; + var route = createRoute(type.defaultProps, element.props); + + if (route.children) { + var childRoutes = createRoutesFromReactChildren(route.children, route); + + if (childRoutes.length) route.childRoutes = childRoutes; + + delete route.children; + } + + return route; + } + + /** + * Creates and returns a routes object from the given ReactChildren. JSX + * provides a convenient way to visualize how routes in the hierarchy are + * nested. + * + * import { Route, createRoutesFromReactChildren } from 'react-router' + * + * const routes = createRoutesFromReactChildren( + * + * + * + * + * ) + * + * Note: This method is automatically used when you provide children + * to a component. + */ + function createRoutesFromReactChildren(children, parentRoute) { + var routes = []; + + __WEBPACK_IMPORTED_MODULE_0_react___default.a.Children.forEach(children, function (element) { + if (__WEBPACK_IMPORTED_MODULE_0_react___default.a.isValidElement(element)) { + // Component classes may have a static create* method. + if (element.type.createRouteFromReactElement) { + var route = element.type.createRouteFromReactElement(element, parentRoute); + + if (route) routes.push(route); + } else { + routes.push(createRouteFromReactElement(element)); + } + } + }); + + return routes; + } + + /** + * Creates and returns an array of routes from the given object which + * may be a JSX route, a plain object route, or an array of either. + */ + function createRoutes(routes) { + if (isReactChildren(routes)) { + routes = createRoutesFromReactChildren(routes); + } else if (routes && !Array.isArray(routes)) { + routes = [routes]; + } + + return routes; + } + + /***/ + }, + /* 71 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2014-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + + /** + * Similar to invariant but only logs a warning if the condition is not met. + * This can be used to log issues in development environments in critical + * paths. Removing the logging code for production environments will keep the + * same logic and follow the same code paths. + */ + + var warning = function () {}; + + if (true) { + warning = function (condition, format, args) { + var len = arguments.length; + args = new Array(len > 2 ? len - 2 : 0); + for (var key = 2; key < len; key++) { + args[key - 2] = arguments[key]; + } + if (format === undefined) { + throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument'); + } + + if (format.length < 10 || /^[s\W]*$/.test(format)) { + throw new Error( + 'The warning format should be able to uniquely identify this ' + + 'warning. Please, use a more descriptive format than: ' + + format, + ); + } + + if (!condition) { + var argIndex = 0; + var message = + 'Warning: ' + + format.replace(/%s/g, function () { + return args[argIndex++]; + }); + if (typeof console !== 'undefined') { + console.error(message); + } + try { + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + throw new Error(message); + } catch (x) {} + } + }; + } + + module.exports = warning; + + /***/ + }, + /* 72 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (React) { + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(2); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var SubmitButton = (function (_React$Component) { + _inherits(SubmitButton, _React$Component); + + /** + * + */ + function SubmitButton(props, context) { + _classCallCheck(this, SubmitButton); + + var _this = _possibleConstructorReturn( + this, + (SubmitButton.__proto__ || Object.getPrototypeOf(SubmitButton)).call(this, props, context), + ); + + _this.onSubmitButtonClick = _this.onSubmitButtonClick.bind(_this); + return _this; + } + + /** + * + */ + + /** + * + */ + + _createClass(SubmitButton, [ + { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + if (!nextProps.isDisabled) this.wasClicked = false; + }, + + /** + * + */ + }, + { + key: 'onSubmitButtonClick', + value: function onSubmitButtonClick() { + this.wasClicked = true; + }, + + /** + * + */ + }, + { + key: 'render', + value: function render() { + var buttonClassName = this.props.className ? this.props.className : 'button'; + var disabled = this.props.isDisabled; + var text = disabled & this.wasClicked ? this.props.pendingText : this.props.readyText; + + return React.createElement( + 'button', + { + onClick: this.onSubmitButtonClick, + type: 'submit', + className: buttonClassName, + disabled: disabled, + }, + this.props.children, + ' ', + text, + ); + }, + }, + ]); + + return SubmitButton; + })(React.Component); + + SubmitButton.propTypes = { + className: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string, + children: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.element, + isDisabled: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.bool.isRequired, + pendingText: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string.isRequired, + readyText: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string.isRequired, + }; + + /* harmony default export */ __webpack_exports__['a'] = SubmitButton; + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(1)); + + /***/ + }, + /* 73 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_immutable__ = __webpack_require__(18); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_immutable___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_immutable__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_app_records_entities_AuthorRecord__ = + __webpack_require__(46); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__CollectionRecord__ = __webpack_require__(111); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + var _get = function get(object, property, receiver) { + if (object === null) object = Function.prototype; + var desc = Object.getOwnPropertyDescriptor(object, property); + if (desc === undefined) { + var parent = Object.getPrototypeOf(object); + if (parent === null) { + return undefined; + } else { + return get(parent, property, receiver); + } + } else if ('value' in desc) { + return desc.value; + } else { + var getter = desc.get; + if (getter === undefined) { + return undefined; + } + return getter.call(receiver); + } + }; + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var AuthorsCollectionRecord = (function (_CollectionRecord) { + _inherits(AuthorsCollectionRecord, _CollectionRecord); + + function AuthorsCollectionRecord() { + _classCallCheck(this, AuthorsCollectionRecord); + + return _possibleConstructorReturn( + this, + (AuthorsCollectionRecord.__proto__ || Object.getPrototypeOf(AuthorsCollectionRecord)).apply( + this, + arguments, + ), + ); + } + + _createClass(AuthorsCollectionRecord, [ + { + key: 'putAuthor', + + /** + * + */ + value: function putAuthor(author) { + return this.putItem( + author, + __WEBPACK_IMPORTED_MODULE_1_app_records_entities_AuthorRecord__['a' /* default */], + ); + }, + + /** + * Puts authors list to collection items without creating pagination data. + * + * @param {Object} authorsData - Data object with authors list + * @param {Object[]} authorsData.list - Users on current page + */ + }, + { + key: 'putAuthors', + value: function putAuthors(authorsData) { + return this.putItems( + authorsData, + __WEBPACK_IMPORTED_MODULE_1_app_records_entities_AuthorRecord__['a' /* default */], + ); + }, + + /** + * @param {Object} pageData - Data object with items on current page + * @param {Object[]} pageData.list - Authors on current page + * @param {string} pageData.total - Total number of authors found for current request without pagination + * @param {string} pageData.per_page - Maximum number of authors per page + * @param {string|number} pageData.page - Current page of authors pagination + * @param {string} paginationKey - Unique key for current pagination cache + */ + }, + { + key: 'putPage', + value: function putPage(pageData, paginationKey) { + return _get( + AuthorsCollectionRecord.prototype.__proto__ || + Object.getPrototypeOf(AuthorsCollectionRecord.prototype), + 'putPage', + this, + ).call( + this, + pageData, + paginationKey, + __WEBPACK_IMPORTED_MODULE_1_app_records_entities_AuthorRecord__['a' /* default */], + ); + }, + + /** + * + */ + }, + { + key: 'getAuthor', + value: function getAuthor(authorId) { + return this.getItem(authorId); + }, + + /** + * + */ + }, + { + key: 'getAuthorsForPosts', + value: function getAuthorsForPosts(posts) { + var _this2 = this; + + if (!posts) return false; + + var authorsIds = posts + .map(function (post) { + return post.get('author_id'); + }) + .toSet() + .toList(); + + var foundAuthors = __WEBPACK_IMPORTED_MODULE_0_immutable___default.a.fromJS([]); + + authorsIds.forEach(function (authorId) { + var foundAuthor = _this2.getAuthor(authorId); + if (!foundAuthor) return; + + foundAuthors = foundAuthors.push(foundAuthor); + }); + + if (authorsIds.size !== foundAuthors.size) return false; + return foundAuthors; + }, + + /** + * + */ + }, + { + key: 'assignAuthorAttributes', + value: function assignAuthorAttributes(id, attributes, validateAssigned) { + return this.assignItemAttributes(id, attributes, validateAssigned); + }, + }, + ]); + + return AuthorsCollectionRecord; + })(__WEBPACK_IMPORTED_MODULE_2__CollectionRecord__['a' /* default */]); + + /* harmony default export */ __webpack_exports__['a'] = AuthorsCollectionRecord; + + /***/ + }, + /* 74 */ + /***/ function (module, exports, __webpack_require__) { + // Thank's IE8 for his funny defineProperty + module.exports = !__webpack_require__(92)(function () { + return ( + Object.defineProperty({}, 'a', { + get: function () { + return 7; + }, + }).a != 7 + ); + }); + + /***/ + }, + /* 75 */ + /***/ function (module, exports, __webpack_require__) { + var dP = __webpack_require__(62), + createDesc = __webpack_require__(161); + module.exports = __webpack_require__(74) + ? function (object, key, value) { + return dP.f(object, key, createDesc(1, value)); + } + : function (object, key, value) { + object[key] = value; + return object; + }; + + /***/ + }, + /* 76 */ + /***/ function (module, exports) { + module.exports = function (it, Constructor, name, forbiddenField) { + if (!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)) { + throw TypeError(name + ': incorrect invocation!'); + } + return it; + }; + + /***/ + }, + /* 77 */ + /***/ function (module, exports) { + module.exports = false; + + /***/ + }, + /* 78 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) + var anObject = __webpack_require__(5), + dPs = __webpack_require__(286), + enumBugKeys = __webpack_require__(170), + IE_PROTO = __webpack_require__(182)('IE_PROTO'), + Empty = function () { + /* empty */ + }, + PROTOTYPE = 'prototype'; + + // Create object with fake `null` prototype: use iframe Object with cleared prototype + var createDict = function () { + // Thrash, waste and sodomy: IE GC bug + var iframe = __webpack_require__(169)('iframe'), + i = enumBugKeys.length, + lt = '<', + gt = '>', + iframeDocument; + iframe.style.display = 'none'; + __webpack_require__(172).appendChild(iframe); + iframe.src = 'javascript:'; // eslint-disable-line no-script-url + // createDict = iframe.contentWindow.Object; + // html.removeChild(iframe); + iframeDocument = iframe.contentWindow.document; + iframeDocument.open(); + iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); + iframeDocument.close(); + createDict = iframeDocument.F; + while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]]; + return createDict(); + }; + + module.exports = + Object.create || + function create(O, Properties) { + var result; + if (O !== null) { + Empty[PROTOTYPE] = anObject(O); + result = new Empty(); + Empty[PROTOTYPE] = null; + // add "__proto__" for Object.getPrototypeOf polyfill + result[IE_PROTO] = O; + } else result = createDict(); + return Properties === undefined ? result : dPs(result, Properties); + }; + + /***/ + }, + /* 79 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) + var $keys = __webpack_require__(288), + hiddenKeys = __webpack_require__(170).concat('length', 'prototype'); + + exports.f = + Object.getOwnPropertyNames || + function getOwnPropertyNames(O) { + return $keys(O, hiddenKeys); + }; + + /***/ + }, + /* 80 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.14 / 15.2.3.14 Object.keys(O) + var $keys = __webpack_require__(288), + enumBugKeys = __webpack_require__(170); + + module.exports = + Object.keys || + function keys(O) { + return $keys(O, enumBugKeys); + }; + + /***/ + }, + /* 81 */ + /***/ function (module, exports, __webpack_require__) { + var redefine = __webpack_require__(30); + module.exports = function (target, src, safe) { + for (var key in src) redefine(target, key, src[key], safe); + return target; + }; + + /***/ + }, + /* 82 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var global = __webpack_require__(8), + dP = __webpack_require__(15), + DESCRIPTORS = __webpack_require__(14), + SPECIES = __webpack_require__(12)('species'); + + module.exports = function (KEY) { + var C = global[KEY]; + if (DESCRIPTORS && C && !C[SPECIES]) + dP.f(C, SPECIES, { + configurable: true, + get: function () { + return this; + }, + }); + }; + + /***/ + }, + /* 83 */ + /***/ function (module, exports, __webpack_require__) { + var toInteger = __webpack_require__(65), + max = Math.max, + min = Math.min; + module.exports = function (index, length) { + index = toInteger(index); + return index < 0 ? max(index + length, 0) : min(index, length); + }; + + /***/ + }, + /* 84 */ + /***/ function (module, exports) { + var id = 0, + px = Math.random(); + module.exports = function (key) { + return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); + }; + + /***/ + }, + /* 85 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + var _prodInvariant = __webpack_require__(7); + + var invariant = __webpack_require__(3); + + /** + * Static poolers. Several custom versions for each potential number of + * arguments. A completely generic pooler is easy to implement, but would + * require accessing the `arguments` object. In each of these, `this` refers to + * the Class itself, not an instance. If any others are needed, simply add them + * here, or in their own files. + */ + var oneArgumentPooler = function (copyFieldsFrom) { + var Klass = this; + if (Klass.instancePool.length) { + var instance = Klass.instancePool.pop(); + Klass.call(instance, copyFieldsFrom); + return instance; + } else { + return new Klass(copyFieldsFrom); + } + }; + + var twoArgumentPooler = function (a1, a2) { + var Klass = this; + if (Klass.instancePool.length) { + var instance = Klass.instancePool.pop(); + Klass.call(instance, a1, a2); + return instance; + } else { + return new Klass(a1, a2); + } + }; + + var threeArgumentPooler = function (a1, a2, a3) { + var Klass = this; + if (Klass.instancePool.length) { + var instance = Klass.instancePool.pop(); + Klass.call(instance, a1, a2, a3); + return instance; + } else { + return new Klass(a1, a2, a3); + } + }; + + var fourArgumentPooler = function (a1, a2, a3, a4) { + var Klass = this; + if (Klass.instancePool.length) { + var instance = Klass.instancePool.pop(); + Klass.call(instance, a1, a2, a3, a4); + return instance; + } else { + return new Klass(a1, a2, a3, a4); + } + }; + + var standardReleaser = function (instance) { + var Klass = this; + !(instance instanceof Klass) + ? true + ? invariant(false, 'Trying to release an instance into a pool of a different type.') + : _prodInvariant('25') + : void 0; + instance.destructor(); + if (Klass.instancePool.length < Klass.poolSize) { + Klass.instancePool.push(instance); + } + }; + + var DEFAULT_POOL_SIZE = 10; + var DEFAULT_POOLER = oneArgumentPooler; + + /** + * Augments `CopyConstructor` to be a poolable class, augmenting only the class + * itself (statically) not adding any prototypical fields. Any CopyConstructor + * you give this may have a `poolSize` property, and will look for a + * prototypical `destructor` on instances. + * + * @param {Function} CopyConstructor Constructor that can be used to reset. + * @param {Function} pooler Customizable pooler. + */ + var addPoolingTo = function (CopyConstructor, pooler) { + // Casting as any so that flow ignores the actual implementation and trusts + // it to match the type we declared + var NewKlass = CopyConstructor; + NewKlass.instancePool = []; + NewKlass.getPooled = pooler || DEFAULT_POOLER; + if (!NewKlass.poolSize) { + NewKlass.poolSize = DEFAULT_POOL_SIZE; + } + NewKlass.release = standardReleaser; + return NewKlass; + }; + + var PooledClass = { + addPoolingTo: addPoolingTo, + oneArgumentPooler: oneArgumentPooler, + twoArgumentPooler: twoArgumentPooler, + threeArgumentPooler: threeArgumentPooler, + fourArgumentPooler: fourArgumentPooler, + }; + + module.exports = PooledClass; + + /***/ + }, + /* 86 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2014-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var _assign = __webpack_require__(9); + + var ReactCurrentOwner = __webpack_require__(53); + + var warning = __webpack_require__(4); + var canDefineProperty = __webpack_require__(152); + var hasOwnProperty = Object.prototype.hasOwnProperty; + + var REACT_ELEMENT_TYPE = __webpack_require__(367); + + var RESERVED_PROPS = { + key: true, + ref: true, + __self: true, + __source: true, + }; + + var specialPropKeyWarningShown, specialPropRefWarningShown; + + function hasValidRef(config) { + if (true) { + if (hasOwnProperty.call(config, 'ref')) { + var getter = Object.getOwnPropertyDescriptor(config, 'ref').get; + if (getter && getter.isReactWarning) { + return false; + } + } + } + return config.ref !== undefined; + } + + function hasValidKey(config) { + if (true) { + if (hasOwnProperty.call(config, 'key')) { + var getter = Object.getOwnPropertyDescriptor(config, 'key').get; + if (getter && getter.isReactWarning) { + return false; + } + } + } + return config.key !== undefined; + } + + function defineKeyPropWarningGetter(props, displayName) { + var warnAboutAccessingKey = function () { + if (!specialPropKeyWarningShown) { + specialPropKeyWarningShown = true; + true + ? warning( + false, + '%s: `key` is not a prop. Trying to access it will result ' + + 'in `undefined` being returned. If you need to access the same ' + + 'value within the child component, you should pass it as a different ' + + 'prop. (https://fb.me/react-special-props)', + displayName, + ) + : void 0; + } + }; + warnAboutAccessingKey.isReactWarning = true; + Object.defineProperty(props, 'key', { + get: warnAboutAccessingKey, + configurable: true, + }); + } + + function defineRefPropWarningGetter(props, displayName) { + var warnAboutAccessingRef = function () { + if (!specialPropRefWarningShown) { + specialPropRefWarningShown = true; + true + ? warning( + false, + '%s: `ref` is not a prop. Trying to access it will result ' + + 'in `undefined` being returned. If you need to access the same ' + + 'value within the child component, you should pass it as a different ' + + 'prop. (https://fb.me/react-special-props)', + displayName, + ) + : void 0; + } + }; + warnAboutAccessingRef.isReactWarning = true; + Object.defineProperty(props, 'ref', { + get: warnAboutAccessingRef, + configurable: true, + }); + } + + /** + * Factory method to create a new React element. This no longer adheres to + * the class pattern, so do not use new to call it. Also, no instanceof check + * will work. Instead test $$typeof field against Symbol.for('react.element') to check + * if something is a React Element. + * + * @param {*} type + * @param {*} key + * @param {string|object} ref + * @param {*} self A *temporary* helper to detect places where `this` is + * different from the `owner` when React.createElement is called, so that we + * can warn. We want to get rid of owner and replace string `ref`s with arrow + * functions, and as long as `this` and owner are the same, there will be no + * change in behavior. + * @param {*} source An annotation object (added by a transpiler or otherwise) + * indicating filename, line number, and/or other information. + * @param {*} owner + * @param {*} props + * @internal + */ + var ReactElement = function (type, key, ref, self, source, owner, props) { + var element = { + // This tag allow us to uniquely identify this as a React Element + $$typeof: REACT_ELEMENT_TYPE, + + // Built-in properties that belong on the element + type: type, + key: key, + ref: ref, + props: props, + + // Record the component responsible for creating this element. + _owner: owner, + }; + + if (true) { + // The validation flag is currently mutative. We put it on + // an external backing store so that we can freeze the whole object. + // This can be replaced with a WeakMap once they are implemented in + // commonly used development environments. + element._store = {}; + + // To make comparing ReactElements easier for testing purposes, we make + // the validation flag non-enumerable (where possible, which should + // include every environment we run tests in), so the test framework + // ignores it. + if (canDefineProperty) { + Object.defineProperty(element._store, 'validated', { + configurable: false, + enumerable: false, + writable: true, + value: false, + }); + // self and source are DEV only properties. + Object.defineProperty(element, '_self', { + configurable: false, + enumerable: false, + writable: false, + value: self, + }); + // Two elements created in two different places should be considered + // equal for testing purposes and therefore we hide it from enumeration. + Object.defineProperty(element, '_source', { + configurable: false, + enumerable: false, + writable: false, + value: source, + }); + } else { + element._store.validated = false; + element._self = self; + element._source = source; + } + if (Object.freeze) { + Object.freeze(element.props); + Object.freeze(element); + } + } + + return element; + }; + + /** + * Create and return a new ReactElement of the given type. + * See https://facebook.github.io/react/docs/top-level-api.html#react.createelement + */ + ReactElement.createElement = function (type, config, children) { + var propName; + + // Reserved names are extracted + var props = {}; + + var key = null; + var ref = null; + var self = null; + var source = null; + + if (config != null) { + if (hasValidRef(config)) { + ref = config.ref; + } + if (hasValidKey(config)) { + key = '' + config.key; + } + + self = config.__self === undefined ? null : config.__self; + source = config.__source === undefined ? null : config.__source; + // Remaining properties are added to a new props object + for (propName in config) { + if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { + props[propName] = config[propName]; + } + } + } + + // Children can be more than one argument, and those are transferred onto + // the newly allocated props object. + var childrenLength = arguments.length - 2; + if (childrenLength === 1) { + props.children = children; + } else if (childrenLength > 1) { + var childArray = Array(childrenLength); + for (var i = 0; i < childrenLength; i++) { + childArray[i] = arguments[i + 2]; + } + if (true) { + if (Object.freeze) { + Object.freeze(childArray); + } + } + props.children = childArray; + } + + // Resolve default props + if (type && type.defaultProps) { + var defaultProps = type.defaultProps; + for (propName in defaultProps) { + if (props[propName] === undefined) { + props[propName] = defaultProps[propName]; + } + } + } + if (true) { + if (key || ref) { + if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) { + var displayName = + typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type; + if (key) { + defineKeyPropWarningGetter(props, displayName); + } + if (ref) { + defineRefPropWarningGetter(props, displayName); + } + } + } + } + return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props); + }; + + /** + * Return a function that produces ReactElements of a given type. + * See https://facebook.github.io/react/docs/top-level-api.html#react.createfactory + */ + ReactElement.createFactory = function (type) { + var factory = ReactElement.createElement.bind(null, type); + // Expose the type on the factory and the prototype so that it can be + // easily accessed on elements. E.g. `.type === Foo`. + // This should not be named `constructor` since this may not be the function + // that created the element, and it may not even be a constructor. + // Legacy hook TODO: Warn if this is accessed + factory.type = type; + return factory; + }; + + ReactElement.cloneAndReplaceKey = function (oldElement, newKey) { + var newElement = ReactElement( + oldElement.type, + newKey, + oldElement.ref, + oldElement._self, + oldElement._source, + oldElement._owner, + oldElement.props, + ); + + return newElement; + }; + + /** + * Clone and return a new ReactElement using element as the starting point. + * See https://facebook.github.io/react/docs/top-level-api.html#react.cloneelement + */ + ReactElement.cloneElement = function (element, config, children) { + var propName; + + // Original props are copied + var props = _assign({}, element.props); + + // Reserved names are extracted + var key = element.key; + var ref = element.ref; + // Self is preserved since the owner is preserved. + var self = element._self; + // Source is preserved since cloneElement is unlikely to be targeted by a + // transpiler, and the original source is probably a better indicator of the + // true owner. + var source = element._source; + + // Owner will be preserved, unless ref is overridden + var owner = element._owner; + + if (config != null) { + if (hasValidRef(config)) { + // Silently steal the ref from the parent. + ref = config.ref; + owner = ReactCurrentOwner.current; + } + if (hasValidKey(config)) { + key = '' + config.key; + } + + // Remaining properties override existing props + var defaultProps; + if (element.type && element.type.defaultProps) { + defaultProps = element.type.defaultProps; + } + for (propName in config) { + if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { + if (config[propName] === undefined && defaultProps !== undefined) { + // Resolve default props + props[propName] = defaultProps[propName]; + } else { + props[propName] = config[propName]; + } + } + } + } + + // Children can be more than one argument, and those are transferred onto + // the newly allocated props object. + var childrenLength = arguments.length - 2; + if (childrenLength === 1) { + props.children = children; + } else if (childrenLength > 1) { + var childArray = Array(childrenLength); + for (var i = 0; i < childrenLength; i++) { + childArray[i] = arguments[i + 2]; + } + props.children = childArray; + } + + return ReactElement(element.type, key, ref, self, source, owner, props); + }; + + /** + * Verifies the object is a ReactElement. + * See https://facebook.github.io/react/docs/top-level-api.html#react.isvalidelement + * @param {?object} object + * @return {boolean} True if `object` is a valid component. + * @final + */ + ReactElement.isValidElement = function (object) { + return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; + }; + + module.exports = ReactElement; + + /***/ + }, + /* 87 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + /** + * WARNING: DO NOT manually require this module. + * This is a replacement for `invariant(...)` used by the error code system + * and will _only_ be required by the corresponding babel pass. + * It always throws. + */ + + function reactProdInvariant(code) { + var argCount = arguments.length - 1; + + var message = + 'Minified React error #' + + code + + '; visit ' + + 'http://facebook.github.io/react/docs/error-decoder.html?invariant=' + + code; + + for (var argIdx = 0; argIdx < argCount; argIdx++) { + message += '&args[]=' + encodeURIComponent(arguments[argIdx + 1]); + } + + message += + ' for the full message or use the non-minified dev environment' + + ' for full errors and additional helpful warnings.'; + + var error = new Error(message); + error.name = 'Invariant Violation'; + error.framesToPop = 1; // we don't care about reactProdInvariant's own frame + + throw error; + } + + module.exports = reactProdInvariant; + + /***/ + }, + /* 88 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_app_records_entities_PostRecord__ = + __webpack_require__(90); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__CollectionRecord__ = __webpack_require__(111); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + var _get = function get(object, property, receiver) { + if (object === null) object = Function.prototype; + var desc = Object.getOwnPropertyDescriptor(object, property); + if (desc === undefined) { + var parent = Object.getPrototypeOf(object); + if (parent === null) { + return undefined; + } else { + return get(parent, property, receiver); + } + } else if ('value' in desc) { + return desc.value; + } else { + var getter = desc.get; + if (getter === undefined) { + return undefined; + } + return getter.call(receiver); + } + }; + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var PostsCollectionRecord = (function (_CollectionRecord) { + _inherits(PostsCollectionRecord, _CollectionRecord); + + function PostsCollectionRecord() { + _classCallCheck(this, PostsCollectionRecord); + + return _possibleConstructorReturn( + this, + (PostsCollectionRecord.__proto__ || Object.getPrototypeOf(PostsCollectionRecord)).apply( + this, + arguments, + ), + ); + } + + _createClass(PostsCollectionRecord, [ + { + key: 'buildPost', + + /** + * + */ + value: function buildPost(attributes) { + return _get( + PostsCollectionRecord.prototype.__proto__ || + Object.getPrototypeOf(PostsCollectionRecord.prototype), + 'buildItem', + this, + ).call( + this, + attributes, + __WEBPACK_IMPORTED_MODULE_0_app_records_entities_PostRecord__['a' /* default */], + ); + }, + + /** + * + */ + }, + { + key: 'putNewPost', + value: function putNewPost(newTransactionObject) { + return _get( + PostsCollectionRecord.prototype.__proto__ || + Object.getPrototypeOf(PostsCollectionRecord.prototype), + 'putNewItem', + this, + ).call( + this, + newTransactionObject, + __WEBPACK_IMPORTED_MODULE_0_app_records_entities_PostRecord__['a' /* default */], + ); + }, + + /** + * + */ + }, + { + key: 'putPost', + value: function putPost(post) { + return this.putItem( + post, + __WEBPACK_IMPORTED_MODULE_0_app_records_entities_PostRecord__['a' /* default */], + ); + }, + + /** + * @param {Object} pageData - Data object with items on current page + * @param {Object[]} pageData.list - Users on current page + * @param {string} pageData.total - Total number of users found for current request without pagination + * @param {string} pageData.per_page - Maximum number of users per page + * @param {string|number} pageData.page - Current page of users pagination + * @param {string} paginationKey - Unique key for current pagination cache + */ + }, + { + key: 'putPage', + value: function putPage(pageData, paginationKey) { + return _get( + PostsCollectionRecord.prototype.__proto__ || + Object.getPrototypeOf(PostsCollectionRecord.prototype), + 'putPage', + this, + ).call( + this, + pageData, + paginationKey, + __WEBPACK_IMPORTED_MODULE_0_app_records_entities_PostRecord__['a' /* default */], + ); + }, + + /** + * + */ + }, + { + key: 'getPost', + value: function getPost(id) { + return this.getItem(id); + }, + + /** + * + */ + }, + { + key: 'getNewPost', + value: function getNewPost(newTransactionTmpId) { + return this.get('newItems').get(String(newTransactionTmpId)); + }, + + /** + * + */ + }, + { + key: 'rollbackPostToPersistentVersion', + value: function rollbackPostToPersistentVersion(postId) { + var post = this.getPost(postId); + if (!post) + throw new Error('Cannot rollback transaction persistent state. Transaction is not set.'); + return this.putPost(post.rollbackToPersistentVersion()); + }, + }, + ]); + + return PostsCollectionRecord; + })(__WEBPACK_IMPORTED_MODULE_1__CollectionRecord__['a' /* default */]); + + /* harmony default export */ __webpack_exports__['a'] = PostsCollectionRecord; + + /***/ + }, + /* 89 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_app_records_entities_TagRecord__ = + __webpack_require__(464); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__CollectionRecord__ = __webpack_require__(111); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + var _get = function get(object, property, receiver) { + if (object === null) object = Function.prototype; + var desc = Object.getOwnPropertyDescriptor(object, property); + if (desc === undefined) { + var parent = Object.getPrototypeOf(object); + if (parent === null) { + return undefined; + } else { + return get(parent, property, receiver); + } + } else if ('value' in desc) { + return desc.value; + } else { + var getter = desc.get; + if (getter === undefined) { + return undefined; + } + return getter.call(receiver); + } + }; + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var TagsCollectionRecord = (function (_CollectionRecord) { + _inherits(TagsCollectionRecord, _CollectionRecord); + + function TagsCollectionRecord() { + _classCallCheck(this, TagsCollectionRecord); + + return _possibleConstructorReturn( + this, + (TagsCollectionRecord.__proto__ || Object.getPrototypeOf(TagsCollectionRecord)).apply( + this, + arguments, + ), + ); + } + + _createClass(TagsCollectionRecord, [ + { + key: 'putPage', + + /** + * @param {Object} pageData - Data object with items on current page + * @param {Object[]} pageData.list - Users on current page + * @param {string} pageData.total - Total number of users found for current request without pagination + * @param {string} pageData.per_page - Maximum number of users per page + * @param {string|number} pageData.page - Current page of users pagination + * @param {string} paginationKey - Unique key for current pagination cache + */ + value: function putPage(pageData, paginationKey) { + return _get( + TagsCollectionRecord.prototype.__proto__ || + Object.getPrototypeOf(TagsCollectionRecord.prototype), + 'putPage', + this, + ).call( + this, + pageData, + paginationKey, + __WEBPACK_IMPORTED_MODULE_0_app_records_entities_TagRecord__['a' /* default */], + ); + }, + + /** + * + */ + }, + { + key: 'putTags', + value: function putTags(tagsData) { + return this.putItems( + tagsData, + __WEBPACK_IMPORTED_MODULE_0_app_records_entities_TagRecord__['a' /* default */], + ); + }, + + /** + * + */ + }, + { + key: 'getTag', + value: function getTag(tagId) { + return this.getItem(tagId); + }, + + /** + * + */ + }, + { + key: 'getTagsOnPage', + value: function getTagsOnPage(paginationKey, page) { + return this.getItemsOnPage(paginationKey, page); + }, + + /** + * + */ + }, + { + key: 'getTagsForPost', + value: function getTagsForPost(post) { + var tagsList = this.get('items'); + + var tagsForPost = tagsList + .filter(function (tag) { + return post.get('tags_ids').keyOf(tag.get('id')) !== undefined; + }) + .toList(); + + if (post.get('tags_ids').size !== tagsForPost.size) return false; + + return tagsForPost; + }, + + /** + * + */ + }, + { + key: 'getTagsListForPostOnPage', + value: function getTagsListForPostOnPage(post, paginationKey, page) { + var tagsList = this.getTagsOnPage(paginationKey, page); + if (!tagsList) return false; + + var tagsForPost = tagsList.filter(function (tag) { + return post.get('tags_ids').keyOf(tag.get('id')) !== undefined; + }); + + if (post.get('tags_ids').size !== tagsForPost.size) return false; + + return tagsForPost; + }, + }, + ]); + + return TagsCollectionRecord; + })(__WEBPACK_IMPORTED_MODULE_1__CollectionRecord__['a' /* default */]); + + /* harmony default export */ __webpack_exports__['a'] = TagsCollectionRecord; + + /***/ + }, + /* 90 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_immutable__ = __webpack_require__(18); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_immutable___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_immutable__, + ); + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var PostRecord = (function (_Immutable$Record) { + _inherits(PostRecord, _Immutable$Record); + + function PostRecord() { + _classCallCheck(this, PostRecord); + + return _possibleConstructorReturn( + this, + (PostRecord.__proto__ || Object.getPrototypeOf(PostRecord)).apply(this, arguments), + ); + } + + return PostRecord; + })( + __WEBPACK_IMPORTED_MODULE_0_immutable___default.a.Record({ + id: undefined, + title: undefined, + description: undefined, + content: undefined, + published_at_utc: undefined, + author_id: undefined, + tags_ids: __WEBPACK_IMPORTED_MODULE_0_immutable___default.a.List, + images_sizes: __WEBPACK_IMPORTED_MODULE_0_immutable___default.a.Map, + videos_count: undefined, + comments_count: undefined, + }), + ); + + /* harmony default export */ __webpack_exports__['a'] = PostRecord; + + /***/ + }, + /* 91 */ + /***/ function (module, exports, __webpack_require__) { + var global = __webpack_require__(61), + core = __webpack_require__(54), + ctx = __webpack_require__(115), + hide = __webpack_require__(75), + PROTOTYPE = 'prototype'; + + var $export = function (type, name, source) { + var IS_FORCED = type & $export.F, + IS_GLOBAL = type & $export.G, + IS_STATIC = type & $export.S, + IS_PROTO = type & $export.P, + IS_BIND = type & $export.B, + IS_WRAP = type & $export.W, + exports = IS_GLOBAL ? core : core[name] || (core[name] = {}), + expProto = exports[PROTOTYPE], + target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE], + key, + own, + out; + if (IS_GLOBAL) source = name; + for (key in source) { + // contains in native + own = !IS_FORCED && target && target[key] !== undefined; + if (own && key in exports) continue; + // export native or passed + out = own ? target[key] : source[key]; + // prevent global pollution for namespaces + exports[key] = + IS_GLOBAL && typeof target[key] != 'function' + ? source[key] + : // bind timers to global for call from export context + IS_BIND && own + ? ctx(out, global) + : // wrap global constructors for prevent change them in library + IS_WRAP && target[key] == out + ? (function (C) { + var F = function (a, b, c) { + if (this instanceof C) { + switch (arguments.length) { + case 0: + return new C(); + case 1: + return new C(a); + case 2: + return new C(a, b); + } + return new C(a, b, c); + } + return C.apply(this, arguments); + }; + F[PROTOTYPE] = C[PROTOTYPE]; + return F; + // make static versions for prototype methods + })(out) + : IS_PROTO && typeof out == 'function' + ? ctx(Function.call, out) + : out; + // export proto methods to core.%CONSTRUCTOR%.methods.%NAME% + if (IS_PROTO) { + (exports.virtual || (exports.virtual = {}))[key] = out; + // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME% + if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out); + } + } + }; + // type bitmap + $export.F = 1; // forced + $export.G = 2; // global + $export.S = 4; // static + $export.P = 8; // proto + $export.B = 16; // bind + $export.W = 32; // wrap + $export.U = 64; // safe + $export.R = 128; // real proto method for `library` + module.exports = $export; + + /***/ + }, + /* 92 */ + /***/ function (module, exports) { + module.exports = function (exec) { + try { + return !!exec(); + } catch (e) { + return true; + } + }; + + /***/ + }, + /* 93 */ + /***/ function (module, exports) { + module.exports = function (it) { + return typeof it === 'object' ? it !== null : typeof it === 'function'; + }; + + /***/ + }, + /* 94 */ + /***/ function (module, exports, __webpack_require__) { + // 22.1.3.31 Array.prototype[@@unscopables] + var UNSCOPABLES = __webpack_require__(12)('unscopables'), + ArrayProto = Array.prototype; + if (ArrayProto[UNSCOPABLES] == undefined) __webpack_require__(29)(ArrayProto, UNSCOPABLES, {}); + module.exports = function (key) { + ArrayProto[UNSCOPABLES][key] = true; + }; + + /***/ + }, + /* 95 */ + /***/ function (module, exports, __webpack_require__) { + var ctx = __webpack_require__(56), + call = __webpack_require__(282), + isArrayIter = __webpack_require__(174), + anObject = __webpack_require__(5), + toLength = __webpack_require__(19), + getIterFn = __webpack_require__(191), + BREAK = {}, + RETURN = {}; + var exports = (module.exports = function (iterable, entries, fn, that, ITERATOR) { + var iterFn = ITERATOR + ? function () { + return iterable; + } + : getIterFn(iterable), + f = ctx(fn, that, entries ? 2 : 1), + index = 0, + length, + step, + iterator, + result; + if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!'); + // fast case for arrays with default iterator + if (isArrayIter(iterFn)) + for (length = toLength(iterable.length); length > index; index++) { + result = entries ? f(anObject((step = iterable[index]))[0], step[1]) : f(iterable[index]); + if (result === BREAK || result === RETURN) return result; + } + else + for (iterator = iterFn.call(iterable); !(step = iterator.next()).done; ) { + result = call(iterator, f, step.value, entries); + if (result === BREAK || result === RETURN) return result; + } + }); + exports.BREAK = BREAK; + exports.RETURN = RETURN; + + /***/ + }, + /* 96 */ + /***/ function (module, exports) { + module.exports = {}; + + /***/ + }, + /* 97 */ + /***/ function (module, exports, __webpack_require__) { + var def = __webpack_require__(15).f, + has = __webpack_require__(27), + TAG = __webpack_require__(12)('toStringTag'); + + module.exports = function (it, tag, stat) { + if (it && !has((it = stat ? it : it.prototype), TAG)) + def(it, TAG, { configurable: true, value: tag }); + }; + + /***/ + }, + /* 98 */ + /***/ function (module, exports, __webpack_require__) { + var $export = __webpack_require__(0), + defined = __webpack_require__(41), + fails = __webpack_require__(10), + spaces = __webpack_require__(187), + space = '[' + spaces + ']', + non = '\u200b\u0085', + ltrim = RegExp('^' + space + space + '*'), + rtrim = RegExp(space + space + '*$'); + + var exporter = function (KEY, exec, ALIAS) { + var exp = {}; + var FORCE = fails(function () { + return !!spaces[KEY]() || non[KEY]() != non; + }); + var fn = (exp[KEY] = FORCE ? exec(trim) : spaces[KEY]); + if (ALIAS) exp[ALIAS] = fn; + $export($export.P + $export.F * FORCE, 'String', exp); + }; + + // 1 -> String#trimLeft + // 2 -> String#trimRight + // 3 -> String#trim + var trim = (exporter.trim = function (string, TYPE) { + string = String(defined(string)); + if (TYPE & 1) string = string.replace(ltrim, ''); + if (TYPE & 2) string = string.replace(rtrim, ''); + return string; + }); + + module.exports = exporter; + + /***/ + }, + /* 99 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + exports.locationsAreEqual = + exports.statesAreEqual = + exports.createLocation = + exports.createQuery = + undefined; + + var _typeof = + typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' + ? function (obj) { + return typeof obj; + } + : function (obj) { + return obj && + typeof Symbol === 'function' && + obj.constructor === Symbol && + obj !== Symbol.prototype + ? 'symbol' + : typeof obj; + }; + + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + var _invariant = __webpack_require__(23); + + var _invariant2 = _interopRequireDefault(_invariant); + + var _warning = __webpack_require__(71); + + var _warning2 = _interopRequireDefault(_warning); + + var _PathUtils = __webpack_require__(67); + + var _Actions = __webpack_require__(146); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + var createQuery = (exports.createQuery = function createQuery(props) { + return _extends(Object.create(null), props); + }); + + var createLocation = (exports.createLocation = function createLocation() { + var input = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '/'; + var action = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _Actions.POP; + var key = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null; + + var object = typeof input === 'string' ? (0, _PathUtils.parsePath)(input) : input; + + true + ? (0, _warning2.default)( + !object.path, + 'Location descriptor objects should have a `pathname`, not a `path`.', + ) + : void 0; + + var pathname = object.pathname || '/'; + var search = object.search || ''; + var hash = object.hash || ''; + var state = object.state; + + return { + pathname: pathname, + search: search, + hash: hash, + state: state, + action: action, + key: key, + }; + }); + + var isDate = function isDate(object) { + return Object.prototype.toString.call(object) === '[object Date]'; + }; + + var statesAreEqual = (exports.statesAreEqual = function statesAreEqual(a, b) { + if (a === b) return true; + + var typeofA = typeof a === 'undefined' ? 'undefined' : _typeof(a); + var typeofB = typeof b === 'undefined' ? 'undefined' : _typeof(b); + + if (typeofA !== typeofB) return false; + + !(typeofA !== 'function') + ? true + ? (0, _invariant2.default)(false, 'You must not store functions in location state') + : (0, _invariant2.default)(false) + : void 0; + + // Not the same object, but same type. + if (typeofA === 'object') { + !!(isDate(a) && isDate(b)) + ? true + ? (0, _invariant2.default)(false, 'You must not store Date objects in location state') + : (0, _invariant2.default)(false) + : void 0; + + if (!Array.isArray(a)) { + var keysofA = Object.keys(a); + var keysofB = Object.keys(b); + return ( + keysofA.length === keysofB.length && + keysofA.every(function (key) { + return statesAreEqual(a[key], b[key]); + }) + ); + } + + return ( + Array.isArray(b) && + a.length === b.length && + a.every(function (item, index) { + return statesAreEqual(item, b[index]); + }) + ); + } + + // All other serializable types (string, number, boolean) + // should be strict equal. + return false; + }); + + var locationsAreEqual = (exports.locationsAreEqual = function locationsAreEqual(a, b) { + return ( + a.key === b.key && + // a.action === b.action && // Different action !== location change. + a.pathname === b.pathname && + a.search === b.search && + a.hash === b.hash && + statesAreEqual(a.state, b.state) + ); + }); + + /***/ + }, + /* 100 */ + /***/ function (module, exports) { + // shim for using process in browser + var process = (module.exports = {}); + + // cached from whatever global is present so that test runners that stub it + // don't break things. But we need to wrap it in a try catch in case it is + // wrapped in strict mode code which doesn't define any globals. It's inside a + // function because try/catches deoptimize in certain engines. + + var cachedSetTimeout; + var cachedClearTimeout; + + function defaultSetTimout() { + throw new Error('setTimeout has not been defined'); + } + function defaultClearTimeout() { + throw new Error('clearTimeout has not been defined'); + } + (function () { + try { + if (typeof setTimeout === 'function') { + cachedSetTimeout = setTimeout; + } else { + cachedSetTimeout = defaultSetTimout; + } + } catch (e) { + cachedSetTimeout = defaultSetTimout; + } + try { + if (typeof clearTimeout === 'function') { + cachedClearTimeout = clearTimeout; + } else { + cachedClearTimeout = defaultClearTimeout; + } + } catch (e) { + cachedClearTimeout = defaultClearTimeout; + } + })(); + function runTimeout(fun) { + if (cachedSetTimeout === setTimeout) { + //normal enviroments in sane situations + return setTimeout(fun, 0); + } + // if setTimeout wasn't available but was latter defined + if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { + cachedSetTimeout = setTimeout; + return setTimeout(fun, 0); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedSetTimeout(fun, 0); + } catch (e) { + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedSetTimeout.call(null, fun, 0); + } catch (e) { + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error + return cachedSetTimeout.call(this, fun, 0); + } + } + } + function runClearTimeout(marker) { + if (cachedClearTimeout === clearTimeout) { + //normal enviroments in sane situations + return clearTimeout(marker); + } + // if clearTimeout wasn't available but was latter defined + if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { + cachedClearTimeout = clearTimeout; + return clearTimeout(marker); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedClearTimeout(marker); + } catch (e) { + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedClearTimeout.call(null, marker); + } catch (e) { + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. + // Some versions of I.E. have different rules for clearTimeout vs setTimeout + return cachedClearTimeout.call(this, marker); + } + } + } + var queue = []; + var draining = false; + var currentQueue; + var queueIndex = -1; + + function cleanUpNextTick() { + if (!draining || !currentQueue) { + return; + } + draining = false; + if (currentQueue.length) { + queue = currentQueue.concat(queue); + } else { + queueIndex = -1; + } + if (queue.length) { + drainQueue(); + } + } + + function drainQueue() { + if (draining) { + return; + } + var timeout = runTimeout(cleanUpNextTick); + draining = true; + + var len = queue.length; + while (len) { + currentQueue = queue; + queue = []; + while (++queueIndex < len) { + if (currentQueue) { + currentQueue[queueIndex].run(); + } + } + queueIndex = -1; + len = queue.length; + } + currentQueue = null; + draining = false; + runClearTimeout(timeout); + } + + process.nextTick = function (fun) { + var args = new Array(arguments.length - 1); + if (arguments.length > 1) { + for (var i = 1; i < arguments.length; i++) { + args[i - 1] = arguments[i]; + } + } + queue.push(new Item(fun, args)); + if (queue.length === 1 && !draining) { + runTimeout(drainQueue); + } + }; + + // v8 likes predictible objects + function Item(fun, array) { + this.fun = fun; + this.array = array; + } + Item.prototype.run = function () { + this.fun.apply(null, this.array); + }; + process.title = 'browser'; + process.browser = true; + process.env = {}; + process.argv = []; + process.version = ''; // empty string to avoid regexp issues + process.versions = {}; + + function noop() {} + + process.on = noop; + process.addListener = noop; + process.once = noop; + process.off = noop; + process.removeListener = noop; + process.removeAllListeners = noop; + process.emit = noop; + + process.binding = function (name) { + throw new Error('process.binding is not supported'); + }; + + process.cwd = function () { + return '/'; + }; + process.chdir = function (dir) { + throw new Error('process.chdir is not supported'); + }; + process.umask = function () { + return 0; + }; + + /***/ + }, + /* 101 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + + var emptyFunction = __webpack_require__(22); + var invariant = __webpack_require__(3); + var warning = __webpack_require__(4); + + var ReactPropTypesSecret = __webpack_require__(311); + var checkPropTypes = __webpack_require__(745); + + module.exports = function (isValidElement) { + /* global Symbol */ + var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; + var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec. + + /** + * Returns the iterator method function contained on the iterable object. + * + * Be sure to invoke the function with the iterable as context: + * + * var iteratorFn = getIteratorFn(myIterable); + * if (iteratorFn) { + * var iterator = iteratorFn.call(myIterable); + * ... + * } + * + * @param {?object} maybeIterable + * @return {?function} + */ + function getIteratorFn(maybeIterable) { + var iteratorFn = + maybeIterable && + ((ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL]) || maybeIterable[FAUX_ITERATOR_SYMBOL]); + if (typeof iteratorFn === 'function') { + return iteratorFn; + } + } + + /** + * Collection of methods that allow declaration and validation of props that are + * supplied to React components. Example usage: + * + * var Props = require('ReactPropTypes'); + * var MyArticle = React.createClass({ + * propTypes: { + * // An optional string prop named "description". + * description: Props.string, + * + * // A required enum prop named "category". + * category: Props.oneOf(['News','Photos']).isRequired, + * + * // A prop named "dialog" that requires an instance of Dialog. + * dialog: Props.instanceOf(Dialog).isRequired + * }, + * render: function() { ... } + * }); + * + * A more formal specification of how these methods are used: + * + * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...) + * decl := ReactPropTypes.{type}(.isRequired)? + * + * Each and every declaration produces a function with the same signature. This + * allows the creation of custom validation functions. For example: + * + * var MyLink = React.createClass({ + * propTypes: { + * // An optional string or URI prop named "href". + * href: function(props, propName, componentName) { + * var propValue = props[propName]; + * if (propValue != null && typeof propValue !== 'string' && + * !(propValue instanceof URI)) { + * return new Error( + * 'Expected a string or an URI for ' + propName + ' in ' + + * componentName + * ); + * } + * } + * }, + * render: function() {...} + * }); + * + * @internal + */ + + var ANONYMOUS = '<>'; + + var ReactPropTypes; + + if (true) { + // Keep in sync with production version below + ReactPropTypes = { + array: createPrimitiveTypeChecker('array'), + bool: createPrimitiveTypeChecker('boolean'), + func: createPrimitiveTypeChecker('function'), + number: createPrimitiveTypeChecker('number'), + object: createPrimitiveTypeChecker('object'), + string: createPrimitiveTypeChecker('string'), + symbol: createPrimitiveTypeChecker('symbol'), + + any: createAnyTypeChecker(), + arrayOf: createArrayOfTypeChecker, + element: createElementTypeChecker(), + instanceOf: createInstanceTypeChecker, + node: createNodeChecker(), + objectOf: createObjectOfTypeChecker, + oneOf: createEnumTypeChecker, + oneOfType: createUnionTypeChecker, + shape: createShapeTypeChecker, + }; + } else { + var productionTypeChecker = function () { + invariant(false, 'React.PropTypes type checking code is stripped in production.'); + }; + productionTypeChecker.isRequired = productionTypeChecker; + var getProductionTypeChecker = function () { + return productionTypeChecker; + }; + // Keep in sync with development version above + ReactPropTypes = { + array: productionTypeChecker, + bool: productionTypeChecker, + func: productionTypeChecker, + number: productionTypeChecker, + object: productionTypeChecker, + string: productionTypeChecker, + symbol: productionTypeChecker, + + any: productionTypeChecker, + arrayOf: getProductionTypeChecker, + element: productionTypeChecker, + instanceOf: getProductionTypeChecker, + node: productionTypeChecker, + objectOf: getProductionTypeChecker, + oneOf: getProductionTypeChecker, + oneOfType: getProductionTypeChecker, + shape: getProductionTypeChecker, + }; + } + + /** + * inlined Object.is polyfill to avoid requiring consumers ship their own + * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is + */ + /*eslint-disable no-self-compare*/ + function is(x, y) { + // SameValue algorithm + if (x === y) { + // Steps 1-5, 7-10 + // Steps 6.b-6.e: +0 != -0 + return x !== 0 || 1 / x === 1 / y; + } else { + // Step 6.a: NaN == NaN + return x !== x && y !== y; + } + } + /*eslint-enable no-self-compare*/ + + /** + * We use an Error-like object for backward compatibility as people may call + * PropTypes directly and inspect their output. However, we don't use real + * Errors anymore. We don't inspect their stack anyway, and creating them + * is prohibitively expensive if they are created too often, such as what + * happens in oneOfType() for any type before the one that matched. + */ + function PropTypeError(message) { + this.message = message; + this.stack = ''; + } + // Make `instanceof Error` still work for returned errors. + PropTypeError.prototype = Error.prototype; + + function createChainableTypeChecker(validate) { + if (true) { + var manualPropTypeCallCache = {}; + } + function checkType(isRequired, props, propName, componentName, location, propFullName, secret) { + componentName = componentName || ANONYMOUS; + propFullName = propFullName || propName; + if (true) { + if (secret !== ReactPropTypesSecret && typeof console !== 'undefined') { + var cacheKey = componentName + ':' + propName; + if (!manualPropTypeCallCache[cacheKey]) { + true + ? warning( + false, + 'You are manually calling a React.PropTypes validation ' + + 'function for the `%s` prop on `%s`. This is deprecated ' + + 'and will not work in production with the next major version. ' + + 'You may be seeing this warning due to a third-party PropTypes ' + + 'library. See https://fb.me/react-warning-dont-call-proptypes ' + + 'for details.', + propFullName, + componentName, + ) + : void 0; + manualPropTypeCallCache[cacheKey] = true; + } + } + } + if (props[propName] == null) { + if (isRequired) { + if (props[propName] === null) { + return new PropTypeError( + 'The ' + + location + + ' `' + + propFullName + + '` is marked as required ' + + ('in `' + componentName + '`, but its value is `null`.'), + ); + } + return new PropTypeError( + 'The ' + + location + + ' `' + + propFullName + + '` is marked as required in ' + + ('`' + componentName + '`, but its value is `undefined`.'), + ); + } + return null; + } else { + return validate(props, propName, componentName, location, propFullName); + } + } + + var chainedCheckType = checkType.bind(null, false); + chainedCheckType.isRequired = checkType.bind(null, true); + + return chainedCheckType; + } + + function createPrimitiveTypeChecker(expectedType) { + function validate(props, propName, componentName, location, propFullName, secret) { + var propValue = props[propName]; + var propType = getPropType(propValue); + if (propType !== expectedType) { + // `propValue` being instance of, say, date/regexp, pass the 'object' + // check, but we can offer a more precise error message here rather than + // 'of type `object`'. + var preciseType = getPreciseType(propValue); + + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` of type ' + + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + + ('`' + expectedType + '`.'), + ); + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createAnyTypeChecker() { + return createChainableTypeChecker(emptyFunction.thatReturnsNull); + } + + function createArrayOfTypeChecker(typeChecker) { + function validate(props, propName, componentName, location, propFullName) { + if (typeof typeChecker !== 'function') { + return new PropTypeError( + 'Property `' + + propFullName + + '` of component `' + + componentName + + '` has invalid PropType notation inside arrayOf.', + ); + } + var propValue = props[propName]; + if (!Array.isArray(propValue)) { + var propType = getPropType(propValue); + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` of type ' + + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'), + ); + } + for (var i = 0; i < propValue.length; i++) { + var error = typeChecker( + propValue, + i, + componentName, + location, + propFullName + '[' + i + ']', + ReactPropTypesSecret, + ); + if (error instanceof Error) { + return error; + } + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createElementTypeChecker() { + function validate(props, propName, componentName, location, propFullName) { + var propValue = props[propName]; + if (!isValidElement(propValue)) { + var propType = getPropType(propValue); + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` of type ' + + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'), + ); + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createInstanceTypeChecker(expectedClass) { + function validate(props, propName, componentName, location, propFullName) { + if (!(props[propName] instanceof expectedClass)) { + var expectedClassName = expectedClass.name || ANONYMOUS; + var actualClassName = getClassName(props[propName]); + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` of type ' + + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + + ('instance of `' + expectedClassName + '`.'), + ); + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createEnumTypeChecker(expectedValues) { + if (!Array.isArray(expectedValues)) { + true + ? warning(false, 'Invalid argument supplied to oneOf, expected an instance of array.') + : void 0; + return emptyFunction.thatReturnsNull; + } + + function validate(props, propName, componentName, location, propFullName) { + var propValue = props[propName]; + for (var i = 0; i < expectedValues.length; i++) { + if (is(propValue, expectedValues[i])) { + return null; + } + } + + var valuesString = JSON.stringify(expectedValues); + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` of value `' + + propValue + + '` ' + + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'), + ); + } + return createChainableTypeChecker(validate); + } + + function createObjectOfTypeChecker(typeChecker) { + function validate(props, propName, componentName, location, propFullName) { + if (typeof typeChecker !== 'function') { + return new PropTypeError( + 'Property `' + + propFullName + + '` of component `' + + componentName + + '` has invalid PropType notation inside objectOf.', + ); + } + var propValue = props[propName]; + var propType = getPropType(propValue); + if (propType !== 'object') { + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` of type ' + + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'), + ); + } + for (var key in propValue) { + if (propValue.hasOwnProperty(key)) { + var error = typeChecker( + propValue, + key, + componentName, + location, + propFullName + '.' + key, + ReactPropTypesSecret, + ); + if (error instanceof Error) { + return error; + } + } + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createUnionTypeChecker(arrayOfTypeCheckers) { + if (!Array.isArray(arrayOfTypeCheckers)) { + true + ? warning(false, 'Invalid argument supplied to oneOfType, expected an instance of array.') + : void 0; + return emptyFunction.thatReturnsNull; + } + + function validate(props, propName, componentName, location, propFullName) { + for (var i = 0; i < arrayOfTypeCheckers.length; i++) { + var checker = arrayOfTypeCheckers[i]; + if ( + checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null + ) { + return null; + } + } + + return new PropTypeError( + 'Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'), + ); + } + return createChainableTypeChecker(validate); + } + + function createNodeChecker() { + function validate(props, propName, componentName, location, propFullName) { + if (!isNode(props[propName])) { + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` supplied to ' + + ('`' + componentName + '`, expected a ReactNode.'), + ); + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createShapeTypeChecker(shapeTypes) { + function validate(props, propName, componentName, location, propFullName) { + var propValue = props[propName]; + var propType = getPropType(propValue); + if (propType !== 'object') { + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` of type `' + + propType + + '` ' + + ('supplied to `' + componentName + '`, expected `object`.'), + ); + } + for (var key in shapeTypes) { + var checker = shapeTypes[key]; + if (!checker) { + continue; + } + var error = checker( + propValue, + key, + componentName, + location, + propFullName + '.' + key, + ReactPropTypesSecret, + ); + if (error) { + return error; + } + } + return null; + } + return createChainableTypeChecker(validate); + } + + function isNode(propValue) { + switch (typeof propValue) { + case 'number': + case 'string': + case 'undefined': + return true; + case 'boolean': + return !propValue; + case 'object': + if (Array.isArray(propValue)) { + return propValue.every(isNode); + } + if (propValue === null || isValidElement(propValue)) { + return true; + } + + var iteratorFn = getIteratorFn(propValue); + if (iteratorFn) { + var iterator = iteratorFn.call(propValue); + var step; + if (iteratorFn !== propValue.entries) { + while (!(step = iterator.next()).done) { + if (!isNode(step.value)) { + return false; + } + } + } else { + // Iterator will provide entry [k,v] tuples rather than values. + while (!(step = iterator.next()).done) { + var entry = step.value; + if (entry) { + if (!isNode(entry[1])) { + return false; + } + } + } + } + } else { + return false; + } + + return true; + default: + return false; + } + } + + function isSymbol(propType, propValue) { + // Native Symbol. + if (propType === 'symbol') { + return true; + } + + // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol' + if (propValue['@@toStringTag'] === 'Symbol') { + return true; + } + + // Fallback for non-spec compliant Symbols which are polyfilled. + if (typeof Symbol === 'function' && propValue instanceof Symbol) { + return true; + } + + return false; + } + + // Equivalent of `typeof` but with special handling for array and regexp. + function getPropType(propValue) { + var propType = typeof propValue; + if (Array.isArray(propValue)) { + return 'array'; + } + if (propValue instanceof RegExp) { + // Old webkits (at least until Android 4.0) return 'function' rather than + // 'object' for typeof a RegExp. We'll normalize this here so that /bla/ + // passes PropTypes.object. + return 'object'; + } + if (isSymbol(propType, propValue)) { + return 'symbol'; + } + return propType; + } + + // This handles more types than `getPropType`. Only used for error messages. + // See `createPrimitiveTypeChecker`. + function getPreciseType(propValue) { + var propType = getPropType(propValue); + if (propType === 'object') { + if (propValue instanceof Date) { + return 'date'; + } else if (propValue instanceof RegExp) { + return 'regexp'; + } + } + return propType; + } + + // Returns class name of the object, if any. + function getClassName(propValue) { + if (!propValue.constructor || !propValue.constructor.name) { + return ANONYMOUS; + } + return propValue.constructor.name; + } + + ReactPropTypes.checkPropTypes = checkPropTypes; + ReactPropTypes.PropTypes = ReactPropTypes; + + return ReactPropTypes; + }; + + /***/ + }, + /* 102 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var DOMNamespaces = __webpack_require__(201); + var setInnerHTML = __webpack_require__(151); + + var createMicrosoftUnsafeLocalFunction = __webpack_require__(210); + var setTextContent = __webpack_require__(341); + + var ELEMENT_NODE_TYPE = 1; + var DOCUMENT_FRAGMENT_NODE_TYPE = 11; + + /** + * In IE (8-11) and Edge, appending nodes with no children is dramatically + * faster than appending a full subtree, so we essentially queue up the + * .appendChild calls here and apply them so each node is added to its parent + * before any children are added. + * + * In other browsers, doing so is slower or neutral compared to the other order + * (in Firefox, twice as slow) so we only do this inversion in IE. + * + * See https://github.com/spicyj/innerhtml-vs-createelement-vs-clonenode. + */ + var enableLazy = + (typeof document !== 'undefined' && typeof document.documentMode === 'number') || + (typeof navigator !== 'undefined' && + typeof navigator.userAgent === 'string' && + /\bEdge\/\d/.test(navigator.userAgent)); + + function insertTreeChildren(tree) { + if (!enableLazy) { + return; + } + var node = tree.node; + var children = tree.children; + if (children.length) { + for (var i = 0; i < children.length; i++) { + insertTreeBefore(node, children[i], null); + } + } else if (tree.html != null) { + setInnerHTML(node, tree.html); + } else if (tree.text != null) { + setTextContent(node, tree.text); + } + } + + var insertTreeBefore = createMicrosoftUnsafeLocalFunction(function (parentNode, tree, referenceNode) { + // DocumentFragments aren't actually part of the DOM after insertion so + // appending children won't update the DOM. We need to ensure the fragment + // is properly populated first, breaking out of our lazy approach for just + // this level. Also, some plugins (like Flash Player) will read + // nodes immediately upon insertion into the DOM, so + // must also be populated prior to insertion into the DOM. + if ( + tree.node.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE || + (tree.node.nodeType === ELEMENT_NODE_TYPE && + tree.node.nodeName.toLowerCase() === 'object' && + (tree.node.namespaceURI == null || tree.node.namespaceURI === DOMNamespaces.html)) + ) { + insertTreeChildren(tree); + parentNode.insertBefore(tree.node, referenceNode); + } else { + parentNode.insertBefore(tree.node, referenceNode); + insertTreeChildren(tree); + } + }); + + function replaceChildWithTree(oldNode, newTree) { + oldNode.parentNode.replaceChild(newTree.node, oldNode); + insertTreeChildren(newTree); + } + + function queueChild(parentTree, childTree) { + if (enableLazy) { + parentTree.children.push(childTree); + } else { + parentTree.node.appendChild(childTree.node); + } + } + + function queueHTML(tree, html) { + if (enableLazy) { + tree.html = html; + } else { + setInnerHTML(tree.node, html); + } + } + + function queueText(tree, text) { + if (enableLazy) { + tree.text = text; + } else { + setTextContent(tree.node, text); + } + } + + function toString() { + return this.node.nodeName; + } + + function DOMLazyTree(node) { + return { + node: node, + children: [], + html: null, + text: null, + toString: toString, + }; + } + + DOMLazyTree.insertTreeBefore = insertTreeBefore; + DOMLazyTree.replaceChildWithTree = replaceChildWithTree; + DOMLazyTree.queueChild = queueChild; + DOMLazyTree.queueHTML = queueHTML; + DOMLazyTree.queueText = queueText; + + module.exports = DOMLazyTree; + + /***/ + }, + /* 103 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var _prodInvariant = __webpack_require__(7); + + var EventPluginRegistry = __webpack_require__(123); + var EventPluginUtils = __webpack_require__(202); + var ReactErrorUtils = __webpack_require__(208); + + var accumulateInto = __webpack_require__(334); + var forEachAccumulated = __webpack_require__(336); + var invariant = __webpack_require__(3); + + /** + * Internal store for event listeners + */ + var listenerBank = {}; + + /** + * Internal queue of events that have accumulated their dispatches and are + * waiting to have their dispatches executed. + */ + var eventQueue = null; + + /** + * Dispatches an event and releases it back into the pool, unless persistent. + * + * @param {?object} event Synthetic event to be dispatched. + * @param {boolean} simulated If the event is simulated (changes exn behavior) + * @private + */ + var executeDispatchesAndRelease = function (event, simulated) { + if (event) { + EventPluginUtils.executeDispatchesInOrder(event, simulated); + + if (!event.isPersistent()) { + event.constructor.release(event); + } + } + }; + var executeDispatchesAndReleaseSimulated = function (e) { + return executeDispatchesAndRelease(e, true); + }; + var executeDispatchesAndReleaseTopLevel = function (e) { + return executeDispatchesAndRelease(e, false); + }; + + var getDictionaryKey = function (inst) { + // Prevents V8 performance issue: + // https://github.com/facebook/react/pull/7232 + return '.' + inst._rootNodeID; + }; + + function isInteractive(tag) { + return tag === 'button' || tag === 'input' || tag === 'select' || tag === 'textarea'; + } + + function shouldPreventMouseEvent(name, type, props) { + switch (name) { + case 'onClick': + case 'onClickCapture': + case 'onDoubleClick': + case 'onDoubleClickCapture': + case 'onMouseDown': + case 'onMouseDownCapture': + case 'onMouseMove': + case 'onMouseMoveCapture': + case 'onMouseUp': + case 'onMouseUpCapture': + return !!(props.disabled && isInteractive(type)); + default: + return false; + } + } + + /** + * This is a unified interface for event plugins to be installed and configured. + * + * Event plugins can implement the following properties: + * + * `extractEvents` {function(string, DOMEventTarget, string, object): *} + * Required. When a top-level event is fired, this method is expected to + * extract synthetic events that will in turn be queued and dispatched. + * + * `eventTypes` {object} + * Optional, plugins that fire events must publish a mapping of registration + * names that are used to register listeners. Values of this mapping must + * be objects that contain `registrationName` or `phasedRegistrationNames`. + * + * `executeDispatch` {function(object, function, string)} + * Optional, allows plugins to override how an event gets dispatched. By + * default, the listener is simply invoked. + * + * Each plugin that is injected into `EventsPluginHub` is immediately operable. + * + * @public + */ + var EventPluginHub = { + /** + * Methods for injecting dependencies. + */ + injection: { + /** + * @param {array} InjectedEventPluginOrder + * @public + */ + injectEventPluginOrder: EventPluginRegistry.injectEventPluginOrder, + + /** + * @param {object} injectedNamesToPlugins Map from names to plugin modules. + */ + injectEventPluginsByName: EventPluginRegistry.injectEventPluginsByName, + }, + + /** + * Stores `listener` at `listenerBank[registrationName][key]`. Is idempotent. + * + * @param {object} inst The instance, which is the source of events. + * @param {string} registrationName Name of listener (e.g. `onClick`). + * @param {function} listener The callback to store. + */ + putListener: function (inst, registrationName, listener) { + !(typeof listener === 'function') + ? true + ? invariant( + false, + 'Expected %s listener to be a function, instead got type %s', + registrationName, + typeof listener, + ) + : _prodInvariant('94', registrationName, typeof listener) + : void 0; + + var key = getDictionaryKey(inst); + var bankForRegistrationName = + listenerBank[registrationName] || (listenerBank[registrationName] = {}); + bankForRegistrationName[key] = listener; + + var PluginModule = EventPluginRegistry.registrationNameModules[registrationName]; + if (PluginModule && PluginModule.didPutListener) { + PluginModule.didPutListener(inst, registrationName, listener); + } + }, + + /** + * @param {object} inst The instance, which is the source of events. + * @param {string} registrationName Name of listener (e.g. `onClick`). + * @return {?function} The stored callback. + */ + getListener: function (inst, registrationName) { + // TODO: shouldPreventMouseEvent is DOM-specific and definitely should not + // live here; needs to be moved to a better place soon + var bankForRegistrationName = listenerBank[registrationName]; + if ( + shouldPreventMouseEvent(registrationName, inst._currentElement.type, inst._currentElement.props) + ) { + return null; + } + var key = getDictionaryKey(inst); + return bankForRegistrationName && bankForRegistrationName[key]; + }, + + /** + * Deletes a listener from the registration bank. + * + * @param {object} inst The instance, which is the source of events. + * @param {string} registrationName Name of listener (e.g. `onClick`). + */ + deleteListener: function (inst, registrationName) { + var PluginModule = EventPluginRegistry.registrationNameModules[registrationName]; + if (PluginModule && PluginModule.willDeleteListener) { + PluginModule.willDeleteListener(inst, registrationName); + } + + var bankForRegistrationName = listenerBank[registrationName]; + // TODO: This should never be null -- when is it? + if (bankForRegistrationName) { + var key = getDictionaryKey(inst); + delete bankForRegistrationName[key]; + } + }, + + /** + * Deletes all listeners for the DOM element with the supplied ID. + * + * @param {object} inst The instance, which is the source of events. + */ + deleteAllListeners: function (inst) { + var key = getDictionaryKey(inst); + for (var registrationName in listenerBank) { + if (!listenerBank.hasOwnProperty(registrationName)) { + continue; + } + + if (!listenerBank[registrationName][key]) { + continue; + } + + var PluginModule = EventPluginRegistry.registrationNameModules[registrationName]; + if (PluginModule && PluginModule.willDeleteListener) { + PluginModule.willDeleteListener(inst, registrationName); + } + + delete listenerBank[registrationName][key]; + } + }, + + /** + * Allows registered plugins an opportunity to extract events from top-level + * native browser events. + * + * @return {*} An accumulation of synthetic events. + * @internal + */ + extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) { + var events; + var plugins = EventPluginRegistry.plugins; + for (var i = 0; i < plugins.length; i++) { + // Not every plugin in the ordering may be loaded at runtime. + var possiblePlugin = plugins[i]; + if (possiblePlugin) { + var extractedEvents = possiblePlugin.extractEvents( + topLevelType, + targetInst, + nativeEvent, + nativeEventTarget, + ); + if (extractedEvents) { + events = accumulateInto(events, extractedEvents); + } + } + } + return events; + }, + + /** + * Enqueues a synthetic event that should be dispatched when + * `processEventQueue` is invoked. + * + * @param {*} events An accumulation of synthetic events. + * @internal + */ + enqueueEvents: function (events) { + if (events) { + eventQueue = accumulateInto(eventQueue, events); + } + }, + + /** + * Dispatches all synthetic events on the event queue. + * + * @internal + */ + processEventQueue: function (simulated) { + // Set `eventQueue` to null before processing it so that we can tell if more + // events get enqueued while processing. + var processingEventQueue = eventQueue; + eventQueue = null; + if (simulated) { + forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseSimulated); + } else { + forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseTopLevel); + } + !!eventQueue + ? true + ? invariant( + false, + 'processEventQueue(): Additional events were enqueued while processing an event queue. Support for this has not yet been implemented.', + ) + : _prodInvariant('95') + : void 0; + // This would be a good time to rethrow if any of the event handlers threw. + ReactErrorUtils.rethrowCaughtError(); + }, + + /** + * These are needed for tests only. Do not use! + */ + __purge: function () { + listenerBank = {}; + }, + + __getListenerBank: function () { + return listenerBank; + }, + }; + + module.exports = EventPluginHub; + + /***/ + }, + /* 104 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var EventPluginHub = __webpack_require__(103); + var EventPluginUtils = __webpack_require__(202); + + var accumulateInto = __webpack_require__(334); + var forEachAccumulated = __webpack_require__(336); + var warning = __webpack_require__(4); + + var getListener = EventPluginHub.getListener; + + /** + * Some event types have a notion of different registration names for different + * "phases" of propagation. This finds listeners by a given phase. + */ + function listenerAtPhase(inst, event, propagationPhase) { + var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase]; + return getListener(inst, registrationName); + } + + /** + * Tags a `SyntheticEvent` with dispatched listeners. Creating this function + * here, allows us to not have to bind or create functions for each event. + * Mutating the event's members allows us to not have to create a wrapping + * "dispatch" object that pairs the event with the listener. + */ + function accumulateDirectionalDispatches(inst, phase, event) { + if (true) { + true ? warning(inst, 'Dispatching inst must not be null') : void 0; + } + var listener = listenerAtPhase(inst, event, phase); + if (listener) { + event._dispatchListeners = accumulateInto(event._dispatchListeners, listener); + event._dispatchInstances = accumulateInto(event._dispatchInstances, inst); + } + } + + /** + * Collect dispatches (must be entirely collected before dispatching - see unit + * tests). Lazily allocate the array to conserve memory. We must loop through + * each event and perform the traversal for each one. We cannot perform a + * single traversal for the entire collection of events because each event may + * have a different target. + */ + function accumulateTwoPhaseDispatchesSingle(event) { + if (event && event.dispatchConfig.phasedRegistrationNames) { + EventPluginUtils.traverseTwoPhase(event._targetInst, accumulateDirectionalDispatches, event); + } + } + + /** + * Same as `accumulateTwoPhaseDispatchesSingle`, but skips over the targetID. + */ + function accumulateTwoPhaseDispatchesSingleSkipTarget(event) { + if (event && event.dispatchConfig.phasedRegistrationNames) { + var targetInst = event._targetInst; + var parentInst = targetInst ? EventPluginUtils.getParentInstance(targetInst) : null; + EventPluginUtils.traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event); + } + } + + /** + * Accumulates without regard to direction, does not look for phased + * registration names. Same as `accumulateDirectDispatchesSingle` but without + * requiring that the `dispatchMarker` be the same as the dispatched ID. + */ + function accumulateDispatches(inst, ignoredDirection, event) { + if (event && event.dispatchConfig.registrationName) { + var registrationName = event.dispatchConfig.registrationName; + var listener = getListener(inst, registrationName); + if (listener) { + event._dispatchListeners = accumulateInto(event._dispatchListeners, listener); + event._dispatchInstances = accumulateInto(event._dispatchInstances, inst); + } + } + } + + /** + * Accumulates dispatches on an `SyntheticEvent`, but only for the + * `dispatchMarker`. + * @param {SyntheticEvent} event + */ + function accumulateDirectDispatchesSingle(event) { + if (event && event.dispatchConfig.registrationName) { + accumulateDispatches(event._targetInst, null, event); + } + } + + function accumulateTwoPhaseDispatches(events) { + forEachAccumulated(events, accumulateTwoPhaseDispatchesSingle); + } + + function accumulateTwoPhaseDispatchesSkipTarget(events) { + forEachAccumulated(events, accumulateTwoPhaseDispatchesSingleSkipTarget); + } + + function accumulateEnterLeaveDispatches(leave, enter, from, to) { + EventPluginUtils.traverseEnterLeave(from, to, accumulateDispatches, leave, enter); + } + + function accumulateDirectDispatches(events) { + forEachAccumulated(events, accumulateDirectDispatchesSingle); + } + + /** + * A small set of propagation patterns, each of which will accept a small amount + * of information, and generate a set of "dispatch ready event objects" - which + * are sets of events that have already been annotated with a set of dispatched + * listener functions/ids. The API is designed this way to discourage these + * propagation strategies from actually executing the dispatches, since we + * always want to collect the entire set of dispatches before executing event a + * single one. + * + * @constructor EventPropagators + */ + var EventPropagators = { + accumulateTwoPhaseDispatches: accumulateTwoPhaseDispatches, + accumulateTwoPhaseDispatchesSkipTarget: accumulateTwoPhaseDispatchesSkipTarget, + accumulateDirectDispatches: accumulateDirectDispatches, + accumulateEnterLeaveDispatches: accumulateEnterLeaveDispatches, + }; + + module.exports = EventPropagators; + + /***/ + }, + /* 105 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + /** + * `ReactInstanceMap` maintains a mapping from a public facing stateful + * instance (key) and the internal representation (value). This allows public + * methods to accept the user facing instance as an argument and map them back + * to internal methods. + */ + + // TODO: Replace this with ES6: var ReactInstanceMap = new Map(); + + var ReactInstanceMap = { + /** + * This API should be called `delete` but we'd have to make sure to always + * transform these to strings for IE support. When this transform is fully + * supported we can rename it. + */ + remove: function (key) { + key._reactInternalInstance = undefined; + }, + + get: function (key) { + return key._reactInternalInstance; + }, + + has: function (key) { + return key._reactInternalInstance !== undefined; + }, + + set: function (key, value) { + key._reactInternalInstance = value; + }, + }; + + module.exports = ReactInstanceMap; + + /***/ + }, + /* 106 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant__ = __webpack_require__(23); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_invariant__, + ); + /* unused harmony export compilePattern */ + /* harmony export (immutable) */ __webpack_exports__['b'] = matchPattern; + /* harmony export (immutable) */ __webpack_exports__['a'] = getParamNames; + /* unused harmony export getParams */ + /* harmony export (immutable) */ __webpack_exports__['c'] = formatPattern; + + function escapeRegExp(string) { + return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); + } + + function _compilePattern(pattern) { + var regexpSource = ''; + var paramNames = []; + var tokens = []; + + var match = void 0, + lastIndex = 0, + matcher = /:([a-zA-Z_$][a-zA-Z0-9_$]*)|\*\*|\*|\(|\)|\\\(|\\\)/g; + while ((match = matcher.exec(pattern))) { + if (match.index !== lastIndex) { + tokens.push(pattern.slice(lastIndex, match.index)); + regexpSource += escapeRegExp(pattern.slice(lastIndex, match.index)); + } + + if (match[1]) { + regexpSource += '([^/]+)'; + paramNames.push(match[1]); + } else if (match[0] === '**') { + regexpSource += '(.*)'; + paramNames.push('splat'); + } else if (match[0] === '*') { + regexpSource += '(.*?)'; + paramNames.push('splat'); + } else if (match[0] === '(') { + regexpSource += '(?:'; + } else if (match[0] === ')') { + regexpSource += ')?'; + } else if (match[0] === '\\(') { + regexpSource += '\\('; + } else if (match[0] === '\\)') { + regexpSource += '\\)'; + } + + tokens.push(match[0]); + + lastIndex = matcher.lastIndex; + } + + if (lastIndex !== pattern.length) { + tokens.push(pattern.slice(lastIndex, pattern.length)); + regexpSource += escapeRegExp(pattern.slice(lastIndex, pattern.length)); + } + + return { + pattern: pattern, + regexpSource: regexpSource, + paramNames: paramNames, + tokens: tokens, + }; + } + + var CompiledPatternsCache = Object.create(null); + + function compilePattern(pattern) { + if (!CompiledPatternsCache[pattern]) CompiledPatternsCache[pattern] = _compilePattern(pattern); + + return CompiledPatternsCache[pattern]; + } + + /** + * Attempts to match a pattern on the given pathname. Patterns may use + * the following special characters: + * + * - :paramName Matches a URL segment up to the next /, ?, or #. The + * captured string is considered a "param" + * - () Wraps a segment of the URL that is optional + * - * Consumes (non-greedy) all characters up to the next + * character in the pattern, or to the end of the URL if + * there is none + * - ** Consumes (greedy) all characters up to the next character + * in the pattern, or to the end of the URL if there is none + * + * The function calls callback(error, matched) when finished. + * The return value is an object with the following properties: + * + * - remainingPathname + * - paramNames + * - paramValues + */ + function matchPattern(pattern, pathname) { + // Ensure pattern starts with leading slash for consistency with pathname. + if (pattern.charAt(0) !== '/') { + pattern = '/' + pattern; + } + + var _compilePattern2 = compilePattern(pattern), + regexpSource = _compilePattern2.regexpSource, + paramNames = _compilePattern2.paramNames, + tokens = _compilePattern2.tokens; + + if (pattern.charAt(pattern.length - 1) !== '/') { + regexpSource += '/?'; // Allow optional path separator at end. + } + + // Special-case patterns like '*' for catch-all routes. + if (tokens[tokens.length - 1] === '*') { + regexpSource += '$'; + } + + var match = pathname.match(new RegExp('^' + regexpSource, 'i')); + if (match == null) { + return null; + } + + var matchedPath = match[0]; + var remainingPathname = pathname.substr(matchedPath.length); + + if (remainingPathname) { + // Require that the match ends at a path separator, if we didn't match + // the full path, so any remaining pathname is a new path segment. + if (matchedPath.charAt(matchedPath.length - 1) !== '/') { + return null; + } + + // If there is a remaining pathname, treat the path separator as part of + // the remaining pathname for properly continuing the match. + remainingPathname = '/' + remainingPathname; + } + + return { + remainingPathname: remainingPathname, + paramNames: paramNames, + paramValues: match.slice(1).map(function (v) { + return v && decodeURIComponent(v); + }), + }; + } + + function getParamNames(pattern) { + return compilePattern(pattern).paramNames; + } + + function getParams(pattern, pathname) { + var match = matchPattern(pattern, pathname); + if (!match) { + return null; + } + + var paramNames = match.paramNames, + paramValues = match.paramValues; + + var params = {}; + + paramNames.forEach(function (paramName, index) { + params[paramName] = paramValues[index]; + }); + + return params; + } + + /** + * Returns a version of the given pattern with params interpolated. Throws + * if there is a dynamic segment of the pattern for which there is no param. + */ + function formatPattern(pattern, params) { + params = params || {}; + + var _compilePattern3 = compilePattern(pattern), + tokens = _compilePattern3.tokens; + + var parenCount = 0, + pathname = '', + splatIndex = 0, + parenHistory = []; + + var token = void 0, + paramName = void 0, + paramValue = void 0; + for (var i = 0, len = tokens.length; i < len; ++i) { + token = tokens[i]; + + if (token === '*' || token === '**') { + paramValue = Array.isArray(params.splat) ? params.splat[splatIndex++] : params.splat; + + !(paramValue != null || parenCount > 0) + ? true + ? __WEBPACK_IMPORTED_MODULE_0_invariant___default()( + false, + 'Missing splat #%s for path "%s"', + splatIndex, + pattern, + ) + : invariant(false) + : void 0; + + if (paramValue != null) pathname += encodeURI(paramValue); + } else if (token === '(') { + parenHistory[parenCount] = ''; + parenCount += 1; + } else if (token === ')') { + var parenText = parenHistory.pop(); + parenCount -= 1; + + if (parenCount) parenHistory[parenCount - 1] += parenText; + else pathname += parenText; + } else if (token === '\\(') { + pathname += '('; + } else if (token === '\\)') { + pathname += ')'; + } else if (token.charAt(0) === ':') { + paramName = token.substring(1); + paramValue = params[paramName]; + + !(paramValue != null || parenCount > 0) + ? true + ? __WEBPACK_IMPORTED_MODULE_0_invariant___default()( + false, + 'Missing "%s" parameter for path "%s"', + paramName, + pattern, + ) + : invariant(false) + : void 0; + + if (paramValue == null) { + if (parenCount) { + parenHistory[parenCount - 1] = ''; + + var curTokenIdx = tokens.indexOf(token); + var tokensSubset = tokens.slice(curTokenIdx, tokens.length); + var nextParenIdx = -1; + + for (var _i = 0; _i < tokensSubset.length; _i++) { + if (tokensSubset[_i] == ')') { + nextParenIdx = _i; + break; + } + } + + !(nextParenIdx > 0) + ? true + ? __WEBPACK_IMPORTED_MODULE_0_invariant___default()( + false, + 'Path "%s" is missing end paren at segment "%s"', + pattern, + tokensSubset.join(''), + ) + : invariant(false) + : void 0; + + // jump to ending paren + i = curTokenIdx + nextParenIdx - 1; + } + } else if (parenCount) parenHistory[parenCount - 1] += encodeURIComponent(paramValue); + else pathname += encodeURIComponent(paramValue); + } else { + if (parenCount) parenHistory[parenCount - 1] += token; + else pathname += token; + } + } + + !(parenCount <= 0) + ? true + ? __WEBPACK_IMPORTED_MODULE_0_invariant___default()( + false, + 'Path "%s" is missing end paren', + pattern, + ) + : invariant(false) + : void 0; + + return pathname.replace(/\/+/g, '/'); + } + + /***/ + }, + /* 107 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(71); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_warning__, + ); + /* harmony export (immutable) */ __webpack_exports__['a'] = routerWarning; + /* unused harmony export _resetWarned */ + + var warned = {}; + + function routerWarning(falseToWarn, message) { + // Only issue deprecation warnings once. + if (message.indexOf('deprecated') !== -1) { + if (warned[message]) { + return; + } + + warned[message] = true; + } + + message = '[react-router] ' + message; + + for ( + var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; + _key < _len; + _key++ + ) { + args[_key - 2] = arguments[_key]; + } + + __WEBPACK_IMPORTED_MODULE_0_warning___default.a.apply(undefined, [falseToWarn, message].concat(args)); + } + + function _resetWarned() { + warned = {}; + } + + /***/ + }, + /* 108 */ + /***/ function (module, exports) { + var g; + + // This works in non-strict mode + g = (function () { + return this; + })(); + + try { + // This works if eval is allowed (see CSP) + g = g || Function('return this')() || (1, eval)('this'); + } catch (e) { + // This works if the window reference is available + if (typeof window === 'object') g = window; + } + + // g can still be undefined, but nothing to do about it... + // We return undefined, instead of nothing here, so it's + // easier to handle this case. if(!global) { ...} + + module.exports = g; + + /***/ + }, + /* 109 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'a', function () { + return BOOTSTRAP_CURRENT_USER; + }); + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'b', function () { + return BUILD_CURRENT_USER; + }); + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'c', function () { + return CLEAR_CURRENT_USER; + }); + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'd', function () { + return ROLLBACK_CURRENT_USER_TO_PERSISTENT_VERSION; + }); + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'e', function () { + return ASSIGN_CURRENT_USER_ATTRIBUTES; + }); + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'f', function () { + return ENTER_PENDING_CURRENT_USER_STATE; + }); + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'g', function () { + return SIGN_IN_CURRENT_USER_SUCCEED; + }); + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'h', function () { + return SIGN_IN_CURRENT_USER_FAILED; + }); + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'i', function () { + return CLEAR_CURRENT_USER_LOAD_ERROR; + }); + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'j', function () { + return SIGN_OUT_CURRENT_USER_SUCCEED; + }); + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'k', function () { + return SIGN_OUT_CURRENT_USER_FAILED; + }); + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'l', function () { + return CREATE_USER_SUCCEED; + }); + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'm', function () { + return CREATE_USER_INVALIDATED; + }); + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'n', function () { + return CREATE_USER_FAILED; + }); + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'o', function () { + return UPDATE_USER_SUCCEED; + }); + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'p', function () { + return UPDATE_USER_INVALIDATED; + }); + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'q', function () { + return UPDATE_USER_FAILED; + }); + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'r', function () { + return RESET_USER_PASSWORD_REQUEST_SUCCEED; + }); + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 's', function () { + return RESET_USER_PASSWORD_REQUEST_INVALIDATED; + }); + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 't', function () { + return RESET_USER_PASSWORD_REQUEST_FAILED; + }); + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'u', function () { + return RESET_USER_PASSWORD_SUCCEED; + }); + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'v', function () { + return RESET_USER_PASSWORD_INVALIDATED; + }); + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'w', function () { + return RESET_USER_PASSWORD_FAILED; + }); + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'x', function () { + return RESEND_CONFIRMATION_SUCCEED; + }); + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'y', function () { + return RESEND_CONFIRMATION_INVALIDATED; + }); + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'z', function () { + return RESEND_CONFIRMATION_FAILED; + }); + var BOOTSTRAP_CURRENT_USER = 'BOOTSTRAP_CURRENT_USER'; + var BUILD_CURRENT_USER = 'BUILD_CURRENT_USER'; + var CLEAR_CURRENT_USER = 'CREAR_CURRENT_USER'; + var ROLLBACK_CURRENT_USER_TO_PERSISTENT_VERSION = 'ROLLBACK_CURRENT_USER_TO_PERSISTENT_VERSION'; + var ASSIGN_CURRENT_USER_ATTRIBUTES = 'ASSIGN_CURRENT_USER_ATTRIBUTES'; + var ENTER_PENDING_CURRENT_USER_STATE = 'ENTER_PENDING_CURRENT_USER_STATE'; + var SIGN_IN_CURRENT_USER_SUCCEED = 'SIGN_IN_CURRENT_USER_SUCCEED'; + var SIGN_IN_CURRENT_USER_FAILED = 'SIGN_IN_CURRENT_USER_FAILED'; + var CLEAR_CURRENT_USER_LOAD_ERROR = 'CLEAR_CURRENT_USER_LOAD_ERROR'; + var SIGN_OUT_CURRENT_USER_SUCCEED = 'SIGN_OUT_CURRENT_USER_SUCCEED'; + var SIGN_OUT_CURRENT_USER_FAILED = 'SIGN_OUT_CURRENT_USER_FAILED'; + var CREATE_USER_SUCCEED = 'CREATE_USER_SUCCEED'; + var CREATE_USER_INVALIDATED = 'CREATE_USER_INVALIDATED'; + var CREATE_USER_FAILED = 'CREATE_USER_FAILED'; + var UPDATE_USER_SUCCEED = 'UPDATE_USER_SUCCEED'; + var UPDATE_USER_INVALIDATED = 'UPDATE_USER_INVALIDATED'; + var UPDATE_USER_FAILED = 'UPDATE_USER_FAILED'; + var RESET_USER_PASSWORD_REQUEST_SUCCEED = 'RESET_USER_PASSWORD_REQUEST_SUCCEED'; + var RESET_USER_PASSWORD_REQUEST_INVALIDATED = 'RESET_USER_PASSWORD_REQUEST_INVALIDATED'; + var RESET_USER_PASSWORD_REQUEST_FAILED = 'RESET_USER_PASSWORD_REQUEST_FAILED'; + var RESET_USER_PASSWORD_SUCCEED = 'RESET_USER_PASSWORD_SUCCEED'; + var RESET_USER_PASSWORD_INVALIDATED = 'RESET_USER_PASSWORD_INVALIDATED'; + var RESET_USER_PASSWORD_FAILED = 'RESET_USER_PASSWORD_FAILED'; + var RESEND_CONFIRMATION_SUCCEED = 'RESEND_CONFIRMATION_SUCCEED'; + var RESEND_CONFIRMATION_INVALIDATED = 'RESEND_CONFIRMATION_INVALIDATED'; + var RESEND_CONFIRMATION_FAILED = 'RESEND_CONFIRMATION_FAILED'; + + /***/ + }, + /* 110 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'a', function () { + return BOOTSTRAP_POSTS_PAGE_DATA; + }); + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'b', function () { + return BOOTSTRAP_POST_PAGE_DATA; + }); + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'c', function () { + return ENTER_PENDING_POST_PAGE_DATA_STATE; + }); + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'e', function () { + return FAIL_FETCH_POST_PAGE_DATA; + }); + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'd', function () { + return SUCCEED_FETCH_POST_PAGE_DATA; + }); + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'f', function () { + return BOOTSTRAP_AUTHORS_PAGE_DATA; + }); + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'g', function () { + return ENTER_PENDING_AUTHORS_PAGE_DATA_STATE; + }); + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'i', function () { + return FAIL_FETCH_AUTHORS_PAGE_DATA; + }); + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'h', function () { + return SUCCEED_FETCH_AUTHORS_PAGE_DATA; + }); + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'j', function () { + return BOOTSTRAP_AUTHOR_PAGE_DATA; + }); + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'k', function () { + return ENTER_PENDING_AUTHOR_PAGE_DATA_STATE; + }); + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'm', function () { + return FAIL_FETCH_AUTHOR_PAGE_DATA; + }); + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'l', function () { + return SUCCEED_FETCH_AUTHOR_PAGE_DATA; + }); + var BOOTSTRAP_POSTS_PAGE_DATA = 'BOOTSTRAP_POSTS_PAGE_DATA'; + var BOOTSTRAP_POST_PAGE_DATA = 'BOOTSTRAP_POST_PAGE_DATA'; + var ENTER_PENDING_POST_PAGE_DATA_STATE = 'ENTER_PENDING_POST_PAGE_DATA_STATE'; + var FAIL_FETCH_POST_PAGE_DATA = 'FAIL_FETCH_POST_PAGE_DATA'; + var SUCCEED_FETCH_POST_PAGE_DATA = 'SUCCEED_FETCH_POST_PAGE_DATA'; + var BOOTSTRAP_AUTHORS_PAGE_DATA = 'BOOTSTRAP_AUTHORS_PAGE_DATA'; + var ENTER_PENDING_AUTHORS_PAGE_DATA_STATE = 'ENTER_PENDING_AUTHORS_PAGE_DATA_STATE'; + var FAIL_FETCH_AUTHORS_PAGE_DATA = 'FAIL_FETCH_AUTHORS_PAGE_DATA'; + var SUCCEED_FETCH_AUTHORS_PAGE_DATA = 'SUCCEED_FETCH_AUTHORS_PAGE_DATA'; + var BOOTSTRAP_AUTHOR_PAGE_DATA = 'BOOTSTRAP_AUTHOR_PAGE_DATA'; + var ENTER_PENDING_AUTHOR_PAGE_DATA_STATE = 'ENTER_PENDING_AUTHOR_PAGE_DATA_STATE'; + var FAIL_FETCH_AUTHOR_PAGE_DATA = 'FAIL_FETCH_AUTHOR_PAGE_DATA'; + var SUCCEED_FETCH_AUTHOR_PAGE_DATA = 'SUCCEED_FETCH_AUTHOR_PAGE_DATA'; + + /***/ + }, + /* 111 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (_) { + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_app_utils_TmpIdUtil__ = __webpack_require__(131); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_immutable__ = __webpack_require__(18); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_immutable___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_immutable__, + ); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true, + }); + } else { + obj[key] = value; + } + return obj; + } + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var CollectionRecord = (function (_Immutable$Record) { + _inherits(CollectionRecord, _Immutable$Record); + + function CollectionRecord() { + _classCallCheck(this, CollectionRecord); + + return _possibleConstructorReturn( + this, + (CollectionRecord.__proto__ || Object.getPrototypeOf(CollectionRecord)).apply(this, arguments), + ); + } + + _createClass(CollectionRecord, [ + { + key: 'enterPendingState', + + /** + * + */ + value: function enterPendingState() { + return this.set('isPending', true); + }, + + /** + * + */ + }, + { + key: 'leavePendingState', + value: function leavePendingState() { + return this.set('isPending', false); + }, + + /** + * + */ + }, + { + key: 'clearNewItems', + value: function clearNewItems() { + return this.set('newItems', __WEBPACK_IMPORTED_MODULE_1_immutable___default.a.Map()); + }, + + /** + * + */ + }, + { + key: 'clearPagination', + value: function clearPagination() { + return this.set('pagination', __WEBPACK_IMPORTED_MODULE_1_immutable___default.a.Map()); + }, + + /** + * Builds new immutable item of given class from given attributes object, assigns its tmpId and puts it to newItems + * map with tmpId key. + * + * @param {Object} attributes - New item attributes + * @param {Function} ItemClass - Class of collection item + * @returns {ItemClass} + */ + }, + { + key: 'buildItem', + value: function buildItem(attributes, ItemClass) { + var newItemAttributes = { + tmpId: __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_0_app_utils_TmpIdUtil__['a' /* generateTmpId */], + )(), + }; + if (attributes) newItemAttributes = _.extend(newItemAttributes, attributes); + + var immutableItem = + __WEBPACK_IMPORTED_MODULE_1_immutable___default.a.fromJS(newItemAttributes); + var newDataHash = _defineProperty( + {}, + immutableItem.get('tmpId'), + new ItemClass(immutableItem), + ); + return this.mergeIn(['newItems'], newDataHash); + }, + + /** + * Builds new immutable item of given class from given attributes object, assigns its tmpId and puts it to newItems + * map with tmpId key. + * + * @param {Array} attributesArray - Array of new item attributes objects + * @param {Function} ItemClass - Class of collection item + * @returns {ItemClass} + */ + }, + { + key: 'buildItems', + value: function buildItems(attributesArray, ItemClass) { + var newDataHash = {}; + + attributesArray.forEach(function (attributes) { + var newItemAttributes = { + tmpId: __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_0_app_utils_TmpIdUtil__['a' /* generateTmpId */], + )(), + }; + if (attributes) newItemAttributes = _.extend(newItemAttributes, attributes); + + var immutableItem = + __WEBPACK_IMPORTED_MODULE_1_immutable___default.a.fromJS(newItemAttributes); + newDataHash[immutableItem.get('tmpId')] = new ItemClass(immutableItem); + }); + + return this.mergeIn(['newItems'], newDataHash); + }, + + /** + * Adds or updates existing new item from given attributes object or immutable item. Unlike buildItem() does not + * assumes that provided object already contains tmpId and does not assign it. + * + * @param {Object|Immutable.Map|Immuteble.Record} item - New attributes object or immutable item + * @param {Function} ItemClass - Class of collection item, will be used for building only from attributes object + * @returns {ItemClass} + */ + }, + { + key: 'putNewItem', + value: function putNewItem(item, ItemClass) { + var newItemHash = void 0; + + if (__WEBPACK_IMPORTED_MODULE_1_immutable___default.a.Iterable.isIterable(item)) { + newItemHash = _defineProperty({}, item.get('tmpId'), item); + } else { + var immutableItem = __WEBPACK_IMPORTED_MODULE_1_immutable___default.a.fromJS(item); + newItemHash = _defineProperty({}, item.tmpId, new ItemClass(immutableItem)); + } + + return this.mergeIn(['newItems'], newItemHash); + }, + + /** + * + */ + }, + { + key: 'deleteNewItem', + value: function deleteNewItem(item) { + if (__WEBPACK_IMPORTED_MODULE_1_immutable___default.a.Iterable.isIterable(item)) { + return this.deleteIn(['newItems', String(item.get('tmpId'))]); + } + + return this.deleteIn(['newItems', String(item)]); + }, + + /** + * + */ + }, + { + key: 'putItem', + value: function putItem(item, ItemClass) { + var newItemHash = void 0; + + if (__WEBPACK_IMPORTED_MODULE_1_immutable___default.a.Iterable.isIterable(item)) { + newItemHash = _defineProperty({}, item.get('id'), item); + } else { + var immutableItem = __WEBPACK_IMPORTED_MODULE_1_immutable___default.a.fromJS(item); + newItemHash = _defineProperty({}, item.id, new ItemClass(immutableItem)); + } + + return this.mergeIn(['items'], newItemHash); + }, + + /** + * @param {Object} itemsDataObject - Data object with items list + * @param {Object[]} itemsDataObject.list - Users on current page + * @param {Function} ItemClass - Class of collection item + */ + }, + { + key: 'putItems', + value: function putItems(itemsDataObject, ItemClass) { + var newItemsHash = {}; + _.each(itemsDataObject.list, function (item) { + newItemsHash[item.id] = new ItemClass(item); + }); + + return this.mergeIn(['items'], newItemsHash); + }, + + /** + * @param {Object} pageData - Data object with items on current page + * @param {Object[]} pageData.list - Users on current page + * @param {string} pageData.total - Total number of users found for current request without pagination + * @param {string} pageData.per_page - Maximum number of users per page + * @param {string|number} pageData.page - Current page of users pagination + * @param {string} paginationKey - Unique key for current pagination cache + * @param {Function} ItemClass - Class of collection item + */ + }, + { + key: 'putPage', + value: function putPage(pageData, paginationKey, ItemClass) { + var paginationHash = {}; + paginationHash[paginationKey] = { + total: pageData.total, + per_page: pageData.per_page, + }; + + paginationHash[paginationKey][pageData.page] = _.pluck(pageData.list, 'id'); + + var initialHash = {}; + _.each(pageData.list, function (item) { + var immutableItem = __WEBPACK_IMPORTED_MODULE_1_immutable___default.a.fromJS(item); + initialHash[item.id] = new ItemClass(immutableItem); + }); + + return this.withMutations(function (record) { + record.mergeDeepIn(['pagination'], paginationHash).mergeIn(['items'], initialHash); + }); + }, + + /** + * + */ + }, + { + key: 'assignPage', + value: function assignPage(pageData, paginationKey) { + var _this2 = this; + + var paginationHash = _defineProperty( + { + total: pageData.total, + per_page: pageData.per_page, + }, + pageData.page, + _.pluck(pageData.list, 'id'), + ); + + return this.withMutations(function (state) { + _.each(pageData.list, function (item) { + var itemId = String(item.id); + var updatedItem = _this2.get('items').get(itemId).assignAttributes(item); + state.setIn(['items', itemId], updatedItem); + }); + state.setIn( + ['pagination', paginationKey], + __WEBPACK_IMPORTED_MODULE_1_immutable___default.a.fromJS(paginationHash), + ); + }); + }, + + /** + * + */ + }, + { + key: 'getItemsOnPage', + value: function getItemsOnPage(paginationKey, page) { + var _this3 = this; + + var paginationCache = this.get('pagination').get(paginationKey); + if (!paginationCache) return false; + + var itemIdsList = paginationCache.get(page); + if (!itemIdsList) return false; + + var foundItems = __WEBPACK_IMPORTED_MODULE_1_immutable___default.a.fromJS([]); + itemIdsList.forEach(function (itemId) { + var foundItem = _this3.get('items').get(String(itemId)); + if (!foundItem) return; + + foundItems = foundItems.push(foundItem); + }); + + if (itemIdsList.size !== foundItems.size) return false; + return foundItems; + }, + + /** + * + */ + }, + { + key: 'getItem', + value: function getItem(id) { + return this.get('items').get(String(id)); + }, + + /** + * + */ + }, + { + key: 'getNewItem', + value: function getNewItem(tmpId) { + return this.get('newItems').get(String(tmpId)); + }, + + /** + * + */ + }, + { + key: 'assignItemAttributes', + value: function assignItemAttributes(id, attributes, validateAssigned) { + var updatedItem = this.getItem(id).assignAttributes(attributes, validateAssigned); + return this.setIn(['items', String(id)], updatedItem); + }, + + /** + * + */ + }, + { + key: 'assignNewItemAttributes', + value: function assignNewItemAttributes(tmpId, attributes, validateAssigned) { + var updatedNewItem = this.getNewItem(tmpId).assignAttributes(attributes, validateAssigned); + return this.setIn(['newItems', String(tmpId)], updatedNewItem); + }, + }, + ]); + + return CollectionRecord; + })( + __WEBPACK_IMPORTED_MODULE_1_immutable___default.a.Record({ + pagination: __WEBPACK_IMPORTED_MODULE_1_immutable___default.a.Map(), // Pagination cache, stores pages and item ids mapping for each type of query + items: __WEBPACK_IMPORTED_MODULE_1_immutable___default.a.Map(), // Items cache, stores items mapped to their ids + newItems: __WEBPACK_IMPORTED_MODULE_1_immutable___default.a.Map(), // Items not persisted on server + loadError: undefined, // Stores last data loading error + isPending: false, + }), + ); + + /* harmony default export */ __webpack_exports__['a'] = CollectionRecord; + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(60)); + + /***/ + }, + /* 112 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_app_records_entities_CommentRecord__ = + __webpack_require__(113); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__CollectionRecord__ = __webpack_require__(111); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + var _get = function get(object, property, receiver) { + if (object === null) object = Function.prototype; + var desc = Object.getOwnPropertyDescriptor(object, property); + if (desc === undefined) { + var parent = Object.getPrototypeOf(object); + if (parent === null) { + return undefined; + } else { + return get(parent, property, receiver); + } + } else if ('value' in desc) { + return desc.value; + } else { + var getter = desc.get; + if (getter === undefined) { + return undefined; + } + return getter.call(receiver); + } + }; + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var CommentsCollectionRecord = (function (_CollectionRecord) { + _inherits(CommentsCollectionRecord, _CollectionRecord); + + function CommentsCollectionRecord() { + _classCallCheck(this, CommentsCollectionRecord); + + return _possibleConstructorReturn( + this, + (CommentsCollectionRecord.__proto__ || Object.getPrototypeOf(CommentsCollectionRecord)).apply( + this, + arguments, + ), + ); + } + + _createClass(CommentsCollectionRecord, [ + { + key: 'putPage', + + /** + * @param {Object} pageData - Data object with items on current page + * @param {Object[]} pageData.list - Comments on current page + * @param {string} pageData.total - Total number of comments found for current request without pagination + * @param {string} pageData.per_page - Maximum number of comments per page + * @param {string|number} pageData.page - Current page of comments pagination + * @param {string} paginationKey - Unique key for current pagination cache + */ + value: function putPage(pageData, paginationKey) { + return _get( + CommentsCollectionRecord.prototype.__proto__ || + Object.getPrototypeOf(CommentsCollectionRecord.prototype), + 'putPage', + this, + ).call( + this, + pageData, + paginationKey, + __WEBPACK_IMPORTED_MODULE_0_app_records_entities_CommentRecord__['a' /* default */], + ); + }, + + /** + * + */ + }, + { + key: 'putComment', + value: function putComment(comment) { + return this.putItem( + comment, + __WEBPACK_IMPORTED_MODULE_0_app_records_entities_CommentRecord__['a' /* default */], + ); + }, + + /** + * + */ + }, + { + key: 'buildComment', + value: function buildComment(attributes) { + return this.buildItem( + attributes, + __WEBPACK_IMPORTED_MODULE_0_app_records_entities_CommentRecord__['a' /* default */], + ); + }, + + /** + * + */ + }, + { + key: 'insertIdToPageMappingAfterParentId', + value: function insertIdToPageMappingAfterParentId(paginationKey, page, id, parentId) { + var pageMapping = this.get('pagination').get(paginationKey).get(page); + var indexOfParentId = pageMapping.indexOf(parentId); + var updatedPageMapping = pageMapping.insert(indexOfParentId + 1, id); + return this.setIn(['pagination', paginationKey, page], updatedPageMapping); + }, + }, + ]); + + return CommentsCollectionRecord; + })(__WEBPACK_IMPORTED_MODULE_1__CollectionRecord__['a' /* default */]); + + /* harmony default export */ __webpack_exports__['a'] = CommentsCollectionRecord; + + /***/ + }, + /* 113 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_immutable__ = __webpack_require__(18); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_immutable___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_immutable__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_validate_js__ = __webpack_require__(228); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_validate_js___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_validate_js__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_to_camel_case__ = __webpack_require__(227); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_to_camel_case___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_2_to_camel_case__, + ); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var CommentRecord = (function (_Immutable$Record) { + _inherits(CommentRecord, _Immutable$Record); + + function CommentRecord() { + _classCallCheck(this, CommentRecord); + + return _possibleConstructorReturn( + this, + (CommentRecord.__proto__ || Object.getPrototypeOf(CommentRecord)).apply(this, arguments), + ); + } + + _createClass(CommentRecord, [ + { + key: 'getContentErrors', + + /** + * + */ + value: function getContentErrors() { + return this.get('errors').get('content'); + }, + + /** + * + */ + }, + { + key: 'assignAttributes', + value: function assignAttributes(attributes, validateAssigned) { + var _this2 = this; + + return this.withMutations(function (self) { + /* eslint-disable no-param-reassign */ + if (!self.get('persistentVersion') && self.get('id')) self.set('persistentVersion', _this2); + /* eslint-enable no-param-reassign */ + + self.merge(attributes); + + // Skip assigned atributes validation unless it is required: + if (!validateAssigned) return; + + // Validate each assigned attribute and update its errors: + for (var attribute in attributes) { + if (attributes.hasOwnProperty(attribute)) { + var validatorMethodName = __WEBPACK_IMPORTED_MODULE_2_to_camel_case___default()( + 'validate_' + attribute, + ); + if (validatorMethodName in self) self[validatorMethodName](); + } + } + }); + }, + + /** + * Validates name attribute. + */ + }, + { + key: 'validateContent', + value: function validateContent() { + var constraints = { + presence: { + message: 'не может быть пустым', + }, + }; + + return this._validateAttribute('content', constraints); + }, + + /** + * TODO: Move this method to mixin. + */ + }, + { + key: '_validateAttribute', + value: function _validateAttribute(attribute, constraints) { + var attributeErrors = __WEBPACK_IMPORTED_MODULE_1_validate_js___default.a.single( + this.get(attribute), + constraints, + ); + var validatedRecord = void 0; + + if (attributeErrors) { + validatedRecord = this.setIn( + ['errors', attribute], + __WEBPACK_IMPORTED_MODULE_0_immutable___default.a.fromJS(attributeErrors), + ); + } else { + validatedRecord = this.deleteIn(['errors', attribute]); + } + + return validatedRecord; + }, + }, + ]); + + return CommentRecord; + })( + __WEBPACK_IMPORTED_MODULE_0_immutable___default.a.Record({ + id: undefined, + post_id: undefined, + parent_id: undefined, + author_id: undefined, + depth: undefined, + created_at_utc: undefined, + content: undefined, + errors: __WEBPACK_IMPORTED_MODULE_0_immutable___default.a.Map(), + }), + ); + + /* harmony default export */ __webpack_exports__['a'] = CommentRecord; + + /***/ + }, + /* 114 */ + /***/ function (module, exports, __webpack_require__) { + var isObject = __webpack_require__(93); + module.exports = function (it) { + if (!isObject(it)) throw TypeError(it + ' is not an object!'); + return it; + }; + + /***/ + }, + /* 115 */ + /***/ function (module, exports, __webpack_require__) { + // optional / simple context binding + var aFunction = __webpack_require__(486); + module.exports = function (fn, that, length) { + aFunction(fn); + if (that === undefined) return fn; + switch (length) { + case 1: + return function (a) { + return fn.call(that, a); + }; + case 2: + return function (a, b) { + return fn.call(that, a, b); + }; + case 3: + return function (a, b, c) { + return fn.call(that, a, b, c); + }; + } + return function (/* ...args */) { + return fn.apply(that, arguments); + }; + }; + + /***/ + }, + /* 116 */ + /***/ function (module, exports) { + var hasOwnProperty = {}.hasOwnProperty; + module.exports = function (it, key) { + return hasOwnProperty.call(it, key); + }; + + /***/ + }, + /* 117 */ + /***/ function (module, exports) { + module.exports = {}; + + /***/ + }, + /* 118 */ + /***/ function (module, exports, __webpack_require__) { + // 7.1.13 ToObject(argument) + var defined = __webpack_require__(133); + module.exports = function (it) { + return Object(defined(it)); + }; + + /***/ + }, + /* 119 */ + /***/ function (module, exports, __webpack_require__) { + // getting tag from 19.1.3.6 Object.prototype.toString() + var cof = __webpack_require__(40), + TAG = __webpack_require__(12)('toStringTag'), + // ES3 wrong here + ARG = + cof( + (function () { + return arguments; + })(), + ) == 'Arguments'; + + // fallback for IE11 Script Access Denied error + var tryGet = function (it, key) { + try { + return it[key]; + } catch (e) { + /* empty */ + } + }; + + module.exports = function (it) { + var O, T, B; + return it === undefined + ? 'Undefined' + : it === null + ? 'Null' + : // @@toStringTag case + typeof (T = tryGet((O = Object(it)), TAG)) == 'string' + ? T + : // builtinTag case + ARG + ? cof(O) + : // ES3 arguments fallback + (B = cof(O)) == 'Object' && typeof O.callee == 'function' + ? 'Arguments' + : B; + }; + + /***/ + }, + /* 120 */ + /***/ function (module, exports, __webpack_require__) { + // fallback for non-array-like ES3 and non-enumerable old V8 strings + var cof = __webpack_require__(40); + module.exports = Object('z').propertyIsEnumerable(0) + ? Object + : function (it) { + return cof(it) == 'String' ? it.split('') : Object(it); + }; + + /***/ + }, + /* 121 */ + /***/ function (module, exports) { + exports.f = {}.propertyIsEnumerable; + + /***/ + }, + /* 122 */ + /***/ function (module, exports, __webpack_require__) { + /* WEBPACK VAR INJECTION */ (function (module) { + //! moment.js + //! version : 2.13.0 + //! authors : Tim Wood, Iskren Chernev, Moment.js contributors + //! license : MIT + //! momentjs.com + + (function (global, factory) { + true + ? (module.exports = factory()) + : typeof define === 'function' && define.amd + ? define(factory) + : (global.moment = factory()); + })(this, function () { + 'use strict'; + + var hookCallback; + + function utils_hooks__hooks() { + return hookCallback.apply(null, arguments); + } + + // This is done to register the method called with moment() + // without creating circular dependencies. + function setHookCallback(callback) { + hookCallback = callback; + } + + function isArray(input) { + return input instanceof Array || Object.prototype.toString.call(input) === '[object Array]'; + } + + function isDate(input) { + return input instanceof Date || Object.prototype.toString.call(input) === '[object Date]'; + } + + function map(arr, fn) { + var res = [], + i; + for (i = 0; i < arr.length; ++i) { + res.push(fn(arr[i], i)); + } + return res; + } + + function hasOwnProp(a, b) { + return Object.prototype.hasOwnProperty.call(a, b); + } + + function extend(a, b) { + for (var i in b) { + if (hasOwnProp(b, i)) { + a[i] = b[i]; + } + } + + if (hasOwnProp(b, 'toString')) { + a.toString = b.toString; + } + + if (hasOwnProp(b, 'valueOf')) { + a.valueOf = b.valueOf; + } + + return a; + } + + function create_utc__createUTC(input, format, locale, strict) { + return createLocalOrUTC(input, format, locale, strict, true).utc(); + } + + function defaultParsingFlags() { + // We need to deep clone this object. + return { + empty: false, + unusedTokens: [], + unusedInput: [], + overflow: -2, + charsLeftOver: 0, + nullInput: false, + invalidMonth: null, + invalidFormat: false, + userInvalidated: false, + iso: false, + parsedDateParts: [], + meridiem: null, + }; + } + + function getParsingFlags(m) { + if (m._pf == null) { + m._pf = defaultParsingFlags(); + } + return m._pf; + } + + var some; + if (Array.prototype.some) { + some = Array.prototype.some; + } else { + some = function (fun) { + var t = Object(this); + var len = t.length >>> 0; + + for (var i = 0; i < len; i++) { + if (i in t && fun.call(this, t[i], i, t)) { + return true; + } + } + + return false; + }; + } + + function valid__isValid(m) { + if (m._isValid == null) { + var flags = getParsingFlags(m); + var parsedParts = some.call(flags.parsedDateParts, function (i) { + return i != null; + }); + m._isValid = + !isNaN(m._d.getTime()) && + flags.overflow < 0 && + !flags.empty && + !flags.invalidMonth && + !flags.invalidWeekday && + !flags.nullInput && + !flags.invalidFormat && + !flags.userInvalidated && + (!flags.meridiem || (flags.meridiem && parsedParts)); + + if (m._strict) { + m._isValid = + m._isValid && + flags.charsLeftOver === 0 && + flags.unusedTokens.length === 0 && + flags.bigHour === undefined; + } + } + return m._isValid; + } + + function valid__createInvalid(flags) { + var m = create_utc__createUTC(NaN); + if (flags != null) { + extend(getParsingFlags(m), flags); + } else { + getParsingFlags(m).userInvalidated = true; + } + + return m; + } + + function isUndefined(input) { + return input === void 0; + } + + // Plugins that add properties should also add the key here (null value), + // so we can properly clone ourselves. + var momentProperties = (utils_hooks__hooks.momentProperties = []); + + function copyConfig(to, from) { + var i, prop, val; + + if (!isUndefined(from._isAMomentObject)) { + to._isAMomentObject = from._isAMomentObject; + } + if (!isUndefined(from._i)) { + to._i = from._i; + } + if (!isUndefined(from._f)) { + to._f = from._f; + } + if (!isUndefined(from._l)) { + to._l = from._l; + } + if (!isUndefined(from._strict)) { + to._strict = from._strict; + } + if (!isUndefined(from._tzm)) { + to._tzm = from._tzm; + } + if (!isUndefined(from._isUTC)) { + to._isUTC = from._isUTC; + } + if (!isUndefined(from._offset)) { + to._offset = from._offset; + } + if (!isUndefined(from._pf)) { + to._pf = getParsingFlags(from); + } + if (!isUndefined(from._locale)) { + to._locale = from._locale; + } + + if (momentProperties.length > 0) { + for (i in momentProperties) { + prop = momentProperties[i]; + val = from[prop]; + if (!isUndefined(val)) { + to[prop] = val; + } + } + } + + return to; + } + + var updateInProgress = false; + + // Moment prototype object + function Moment(config) { + copyConfig(this, config); + this._d = new Date(config._d != null ? config._d.getTime() : NaN); + // Prevent infinite loop in case updateOffset creates new moment + // objects. + if (updateInProgress === false) { + updateInProgress = true; + utils_hooks__hooks.updateOffset(this); + updateInProgress = false; + } + } + + function isMoment(obj) { + return obj instanceof Moment || (obj != null && obj._isAMomentObject != null); + } + + function absFloor(number) { + if (number < 0) { + return Math.ceil(number); + } else { + return Math.floor(number); + } + } + + function toInt(argumentForCoercion) { + var coercedNumber = +argumentForCoercion, + value = 0; + + if (coercedNumber !== 0 && isFinite(coercedNumber)) { + value = absFloor(coercedNumber); + } + + return value; + } + + // compare two arrays, return the number of differences + function compareArrays(array1, array2, dontConvert) { + var len = Math.min(array1.length, array2.length), + lengthDiff = Math.abs(array1.length - array2.length), + diffs = 0, + i; + for (i = 0; i < len; i++) { + if ( + (dontConvert && array1[i] !== array2[i]) || + (!dontConvert && toInt(array1[i]) !== toInt(array2[i])) + ) { + diffs++; + } + } + return diffs + lengthDiff; + } + + function warn(msg) { + if ( + utils_hooks__hooks.suppressDeprecationWarnings === false && + typeof console !== 'undefined' && + console.warn + ) { + console.warn('Deprecation warning: ' + msg); + } + } + + function deprecate(msg, fn) { + var firstTime = true; + + return extend(function () { + if (utils_hooks__hooks.deprecationHandler != null) { + utils_hooks__hooks.deprecationHandler(null, msg); + } + if (firstTime) { + warn( + msg + + '\nArguments: ' + + Array.prototype.slice.call(arguments).join(', ') + + '\n' + + new Error().stack, + ); + firstTime = false; + } + return fn.apply(this, arguments); + }, fn); + } + + var deprecations = {}; + + function deprecateSimple(name, msg) { + if (utils_hooks__hooks.deprecationHandler != null) { + utils_hooks__hooks.deprecationHandler(name, msg); + } + if (!deprecations[name]) { + warn(msg); + deprecations[name] = true; + } + } + + utils_hooks__hooks.suppressDeprecationWarnings = false; + utils_hooks__hooks.deprecationHandler = null; + + function isFunction(input) { + return input instanceof Function || Object.prototype.toString.call(input) === '[object Function]'; + } + + function isObject(input) { + return Object.prototype.toString.call(input) === '[object Object]'; + } + + function locale_set__set(config) { + var prop, i; + for (i in config) { + prop = config[i]; + if (isFunction(prop)) { + this[i] = prop; + } else { + this['_' + i] = prop; + } + } + this._config = config; + // Lenient ordinal parsing accepts just a number in addition to + // number + (possibly) stuff coming from _ordinalParseLenient. + this._ordinalParseLenient = new RegExp(this._ordinalParse.source + '|' + /\d{1,2}/.source); + } + + function mergeConfigs(parentConfig, childConfig) { + var res = extend({}, parentConfig), + prop; + for (prop in childConfig) { + if (hasOwnProp(childConfig, prop)) { + if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) { + res[prop] = {}; + extend(res[prop], parentConfig[prop]); + extend(res[prop], childConfig[prop]); + } else if (childConfig[prop] != null) { + res[prop] = childConfig[prop]; + } else { + delete res[prop]; + } + } + } + return res; + } + + function Locale(config) { + if (config != null) { + this.set(config); + } + } + + var keys; + + if (Object.keys) { + keys = Object.keys; + } else { + keys = function (obj) { + var i, + res = []; + for (i in obj) { + if (hasOwnProp(obj, i)) { + res.push(i); + } + } + return res; + }; + } + + // internal storage for locale config files + var locales = {}; + var globalLocale; + + function normalizeLocale(key) { + return key ? key.toLowerCase().replace('_', '-') : key; + } + + // pick the locale from the array + // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each + // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root + function chooseLocale(names) { + var i = 0, + j, + next, + locale, + split; + + while (i < names.length) { + split = normalizeLocale(names[i]).split('-'); + j = split.length; + next = normalizeLocale(names[i + 1]); + next = next ? next.split('-') : null; + while (j > 0) { + locale = loadLocale(split.slice(0, j).join('-')); + if (locale) { + return locale; + } + if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) { + //the next array item is better than a shallower substring of this one + break; + } + j--; + } + i++; + } + return null; + } + + function loadLocale(name) { + var oldLocale = null; + // TODO: Find a better way to register and load all the locales in Node + if (!locales[name] && typeof module !== 'undefined' && module && module.exports) { + try { + oldLocale = globalLocale._abbr; + __webpack_require__(741)('./' + name); + // because defineLocale currently also sets the global locale, we + // want to undo that for lazy loaded locales + locale_locales__getSetGlobalLocale(oldLocale); + } catch (e) {} + } + return locales[name]; + } + + // This function will load locale and then set the global locale. If + // no arguments are passed in, it will simply return the current global + // locale key. + function locale_locales__getSetGlobalLocale(key, values) { + var data; + if (key) { + if (isUndefined(values)) { + data = locale_locales__getLocale(key); + } else { + data = defineLocale(key, values); + } + + if (data) { + // moment.duration._locale = moment._locale = data; + globalLocale = data; + } + } + + return globalLocale._abbr; + } + + function defineLocale(name, config) { + if (config !== null) { + config.abbr = name; + if (locales[name] != null) { + deprecateSimple( + 'defineLocaleOverride', + 'use moment.updateLocale(localeName, config) to change ' + + 'an existing locale. moment.defineLocale(localeName, ' + + 'config) should only be used for creating a new locale', + ); + config = mergeConfigs(locales[name]._config, config); + } else if (config.parentLocale != null) { + if (locales[config.parentLocale] != null) { + config = mergeConfigs(locales[config.parentLocale]._config, config); + } else { + // treat as if there is no base config + deprecateSimple('parentLocaleUndefined', 'specified parentLocale is not defined yet'); + } + } + locales[name] = new Locale(config); + + // backwards compat for now: also set the locale + locale_locales__getSetGlobalLocale(name); + + return locales[name]; + } else { + // useful for testing + delete locales[name]; + return null; + } + } + + function updateLocale(name, config) { + if (config != null) { + var locale; + if (locales[name] != null) { + config = mergeConfigs(locales[name]._config, config); + } + locale = new Locale(config); + locale.parentLocale = locales[name]; + locales[name] = locale; + + // backwards compat for now: also set the locale + locale_locales__getSetGlobalLocale(name); + } else { + // pass null for config to unupdate, useful for tests + if (locales[name] != null) { + if (locales[name].parentLocale != null) { + locales[name] = locales[name].parentLocale; + } else if (locales[name] != null) { + delete locales[name]; + } + } + } + return locales[name]; + } + + // returns locale data + function locale_locales__getLocale(key) { + var locale; + + if (key && key._locale && key._locale._abbr) { + key = key._locale._abbr; + } + + if (!key) { + return globalLocale; + } + + if (!isArray(key)) { + //short-circuit everything else + locale = loadLocale(key); + if (locale) { + return locale; + } + key = [key]; + } + + return chooseLocale(key); + } + + function locale_locales__listLocales() { + return keys(locales); + } + + var aliases = {}; + + function addUnitAlias(unit, shorthand) { + var lowerCase = unit.toLowerCase(); + aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit; + } + + function normalizeUnits(units) { + return typeof units === 'string' ? aliases[units] || aliases[units.toLowerCase()] : undefined; + } + + function normalizeObjectUnits(inputObject) { + var normalizedInput = {}, + normalizedProp, + prop; + + for (prop in inputObject) { + if (hasOwnProp(inputObject, prop)) { + normalizedProp = normalizeUnits(prop); + if (normalizedProp) { + normalizedInput[normalizedProp] = inputObject[prop]; + } + } + } + + return normalizedInput; + } + + function makeGetSet(unit, keepTime) { + return function (value) { + if (value != null) { + get_set__set(this, unit, value); + utils_hooks__hooks.updateOffset(this, keepTime); + return this; + } else { + return get_set__get(this, unit); + } + }; + } + + function get_set__get(mom, unit) { + return mom.isValid() ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]() : NaN; + } + + function get_set__set(mom, unit, value) { + if (mom.isValid()) { + mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value); + } + } + + // MOMENTS + + function getSet(units, value) { + var unit; + if (typeof units === 'object') { + for (unit in units) { + this.set(unit, units[unit]); + } + } else { + units = normalizeUnits(units); + if (isFunction(this[units])) { + return this[units](value); + } + } + return this; + } + + function zeroFill(number, targetLength, forceSign) { + var absNumber = '' + Math.abs(number), + zerosToFill = targetLength - absNumber.length, + sign = number >= 0; + return ( + (sign ? (forceSign ? '+' : '') : '-') + + Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + + absNumber + ); + } + + var formattingTokens = + /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g; + + var localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g; + + var formatFunctions = {}; + + var formatTokenFunctions = {}; + + // token: 'M' + // padded: ['MM', 2] + // ordinal: 'Mo' + // callback: function () { this.month() + 1 } + function addFormatToken(token, padded, ordinal, callback) { + var func = callback; + if (typeof callback === 'string') { + func = function () { + return this[callback](); + }; + } + if (token) { + formatTokenFunctions[token] = func; + } + if (padded) { + formatTokenFunctions[padded[0]] = function () { + return zeroFill(func.apply(this, arguments), padded[1], padded[2]); + }; + } + if (ordinal) { + formatTokenFunctions[ordinal] = function () { + return this.localeData().ordinal(func.apply(this, arguments), token); + }; + } + } + + function removeFormattingTokens(input) { + if (input.match(/\[[\s\S]/)) { + return input.replace(/^\[|\]$/g, ''); + } + return input.replace(/\\/g, ''); + } + + function makeFormatFunction(format) { + var array = format.match(formattingTokens), + i, + length; + + for (i = 0, length = array.length; i < length; i++) { + if (formatTokenFunctions[array[i]]) { + array[i] = formatTokenFunctions[array[i]]; + } else { + array[i] = removeFormattingTokens(array[i]); + } + } + + return function (mom) { + var output = '', + i; + for (i = 0; i < length; i++) { + output += array[i] instanceof Function ? array[i].call(mom, format) : array[i]; + } + return output; + }; + } + + // format date using native date object + function formatMoment(m, format) { + if (!m.isValid()) { + return m.localeData().invalidDate(); + } + + format = expandFormat(format, m.localeData()); + formatFunctions[format] = formatFunctions[format] || makeFormatFunction(format); + + return formatFunctions[format](m); + } + + function expandFormat(format, locale) { + var i = 5; + + function replaceLongDateFormatTokens(input) { + return locale.longDateFormat(input) || input; + } + + localFormattingTokens.lastIndex = 0; + while (i >= 0 && localFormattingTokens.test(format)) { + format = format.replace(localFormattingTokens, replaceLongDateFormatTokens); + localFormattingTokens.lastIndex = 0; + i -= 1; + } + + return format; + } + + var match1 = /\d/; // 0 - 9 + var match2 = /\d\d/; // 00 - 99 + var match3 = /\d{3}/; // 000 - 999 + var match4 = /\d{4}/; // 0000 - 9999 + var match6 = /[+-]?\d{6}/; // -999999 - 999999 + var match1to2 = /\d\d?/; // 0 - 99 + var match3to4 = /\d\d\d\d?/; // 999 - 9999 + var match5to6 = /\d\d\d\d\d\d?/; // 99999 - 999999 + var match1to3 = /\d{1,3}/; // 0 - 999 + var match1to4 = /\d{1,4}/; // 0 - 9999 + var match1to6 = /[+-]?\d{1,6}/; // -999999 - 999999 + + var matchUnsigned = /\d+/; // 0 - inf + var matchSigned = /[+-]?\d+/; // -inf - inf + + var matchOffset = /Z|[+-]\d\d:?\d\d/gi; // +00:00 -00:00 +0000 -0000 or Z + var matchShortOffset = /Z|[+-]\d\d(?::?\d\d)?/gi; // +00 -00 +00:00 -00:00 +0000 -0000 or Z + + var matchTimestamp = /[+-]?\d+(\.\d{1,3})?/; // 123456789 123456789.123 + + // any word (or two) characters or numbers including two/three word month in arabic. + // includes scottish gaelic two word and hyphenated months + var matchWord = + /[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i; + + var regexes = {}; + + function addRegexToken(token, regex, strictRegex) { + regexes[token] = isFunction(regex) + ? regex + : function (isStrict, localeData) { + return isStrict && strictRegex ? strictRegex : regex; + }; + } + + function getParseRegexForToken(token, config) { + if (!hasOwnProp(regexes, token)) { + return new RegExp(unescapeFormat(token)); + } + + return regexes[token](config._strict, config._locale); + } + + // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript + function unescapeFormat(s) { + return regexEscape( + s + .replace('\\', '') + .replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function (matched, p1, p2, p3, p4) { + return p1 || p2 || p3 || p4; + }), + ); + } + + function regexEscape(s) { + return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'); + } + + var tokens = {}; + + function addParseToken(token, callback) { + var i, + func = callback; + if (typeof token === 'string') { + token = [token]; + } + if (typeof callback === 'number') { + func = function (input, array) { + array[callback] = toInt(input); + }; + } + for (i = 0; i < token.length; i++) { + tokens[token[i]] = func; + } + } + + function addWeekParseToken(token, callback) { + addParseToken(token, function (input, array, config, token) { + config._w = config._w || {}; + callback(input, config._w, config, token); + }); + } + + function addTimeToArrayFromToken(token, input, config) { + if (input != null && hasOwnProp(tokens, token)) { + tokens[token](input, config._a, config, token); + } + } + + var YEAR = 0; + var MONTH = 1; + var DATE = 2; + var HOUR = 3; + var MINUTE = 4; + var SECOND = 5; + var MILLISECOND = 6; + var WEEK = 7; + var WEEKDAY = 8; + + var indexOf; + + if (Array.prototype.indexOf) { + indexOf = Array.prototype.indexOf; + } else { + indexOf = function (o) { + // I know + var i; + for (i = 0; i < this.length; ++i) { + if (this[i] === o) { + return i; + } + } + return -1; + }; + } + + function daysInMonth(year, month) { + return new Date(Date.UTC(year, month + 1, 0)).getUTCDate(); + } + + // FORMATTING + + addFormatToken('M', ['MM', 2], 'Mo', function () { + return this.month() + 1; + }); + + addFormatToken('MMM', 0, 0, function (format) { + return this.localeData().monthsShort(this, format); + }); + + addFormatToken('MMMM', 0, 0, function (format) { + return this.localeData().months(this, format); + }); + + // ALIASES + + addUnitAlias('month', 'M'); + + // PARSING + + addRegexToken('M', match1to2); + addRegexToken('MM', match1to2, match2); + addRegexToken('MMM', function (isStrict, locale) { + return locale.monthsShortRegex(isStrict); + }); + addRegexToken('MMMM', function (isStrict, locale) { + return locale.monthsRegex(isStrict); + }); + + addParseToken(['M', 'MM'], function (input, array) { + array[MONTH] = toInt(input) - 1; + }); + + addParseToken(['MMM', 'MMMM'], function (input, array, config, token) { + var month = config._locale.monthsParse(input, token, config._strict); + // if we didn't find a month name, mark the date as invalid. + if (month != null) { + array[MONTH] = month; + } else { + getParsingFlags(config).invalidMonth = input; + } + }); + + // LOCALES + + var MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/; + var defaultLocaleMonths = + 'January_February_March_April_May_June_July_August_September_October_November_December'.split( + '_', + ); + function localeMonths(m, format) { + return isArray(this._months) + ? this._months[m.month()] + : this._months[MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'][m.month()]; + } + + var defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'); + function localeMonthsShort(m, format) { + return isArray(this._monthsShort) + ? this._monthsShort[m.month()] + : this._monthsShort[MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'][m.month()]; + } + + function units_month__handleStrictParse(monthName, format, strict) { + var i, + ii, + mom, + llc = monthName.toLocaleLowerCase(); + if (!this._monthsParse) { + // this is not used + this._monthsParse = []; + this._longMonthsParse = []; + this._shortMonthsParse = []; + for (i = 0; i < 12; ++i) { + mom = create_utc__createUTC([2000, i]); + this._shortMonthsParse[i] = this.monthsShort(mom, '').toLocaleLowerCase(); + this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase(); + } + } + + if (strict) { + if (format === 'MMM') { + ii = indexOf.call(this._shortMonthsParse, llc); + return ii !== -1 ? ii : null; + } else { + ii = indexOf.call(this._longMonthsParse, llc); + return ii !== -1 ? ii : null; + } + } else { + if (format === 'MMM') { + ii = indexOf.call(this._shortMonthsParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._longMonthsParse, llc); + return ii !== -1 ? ii : null; + } else { + ii = indexOf.call(this._longMonthsParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._shortMonthsParse, llc); + return ii !== -1 ? ii : null; + } + } + } + + function localeMonthsParse(monthName, format, strict) { + var i, mom, regex; + + if (this._monthsParseExact) { + return units_month__handleStrictParse.call(this, monthName, format, strict); + } + + if (!this._monthsParse) { + this._monthsParse = []; + this._longMonthsParse = []; + this._shortMonthsParse = []; + } + + // TODO: add sorting + // Sorting makes sure if one month (or abbr) is a prefix of another + // see sorting in computeMonthsParse + for (i = 0; i < 12; i++) { + // make the regex if we don't have it already + mom = create_utc__createUTC([2000, i]); + if (strict && !this._longMonthsParse[i]) { + this._longMonthsParse[i] = new RegExp('^' + this.months(mom, '').replace('.', '') + '$', 'i'); + this._shortMonthsParse[i] = new RegExp( + '^' + this.monthsShort(mom, '').replace('.', '') + '$', + 'i', + ); + } + if (!strict && !this._monthsParse[i]) { + regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, ''); + this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i'); + } + // test the regex + if (strict && format === 'MMMM' && this._longMonthsParse[i].test(monthName)) { + return i; + } else if (strict && format === 'MMM' && this._shortMonthsParse[i].test(monthName)) { + return i; + } else if (!strict && this._monthsParse[i].test(monthName)) { + return i; + } + } + } + + // MOMENTS + + function setMonth(mom, value) { + var dayOfMonth; + + if (!mom.isValid()) { + // No op + return mom; + } + + if (typeof value === 'string') { + if (/^\d+$/.test(value)) { + value = toInt(value); + } else { + value = mom.localeData().monthsParse(value); + // TODO: Another silent failure? + if (typeof value !== 'number') { + return mom; + } + } + } + + dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value)); + mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth); + return mom; + } + + function getSetMonth(value) { + if (value != null) { + setMonth(this, value); + utils_hooks__hooks.updateOffset(this, true); + return this; + } else { + return get_set__get(this, 'Month'); + } + } + + function getDaysInMonth() { + return daysInMonth(this.year(), this.month()); + } + + var defaultMonthsShortRegex = matchWord; + function monthsShortRegex(isStrict) { + if (this._monthsParseExact) { + if (!hasOwnProp(this, '_monthsRegex')) { + computeMonthsParse.call(this); + } + if (isStrict) { + return this._monthsShortStrictRegex; + } else { + return this._monthsShortRegex; + } + } else { + return this._monthsShortStrictRegex && isStrict + ? this._monthsShortStrictRegex + : this._monthsShortRegex; + } + } + + var defaultMonthsRegex = matchWord; + function monthsRegex(isStrict) { + if (this._monthsParseExact) { + if (!hasOwnProp(this, '_monthsRegex')) { + computeMonthsParse.call(this); + } + if (isStrict) { + return this._monthsStrictRegex; + } else { + return this._monthsRegex; + } + } else { + return this._monthsStrictRegex && isStrict ? this._monthsStrictRegex : this._monthsRegex; + } + } + + function computeMonthsParse() { + function cmpLenRev(a, b) { + return b.length - a.length; + } + + var shortPieces = [], + longPieces = [], + mixedPieces = [], + i, + mom; + for (i = 0; i < 12; i++) { + // make the regex if we don't have it already + mom = create_utc__createUTC([2000, i]); + shortPieces.push(this.monthsShort(mom, '')); + longPieces.push(this.months(mom, '')); + mixedPieces.push(this.months(mom, '')); + mixedPieces.push(this.monthsShort(mom, '')); + } + // Sorting makes sure if one month (or abbr) is a prefix of another it + // will match the longer piece. + shortPieces.sort(cmpLenRev); + longPieces.sort(cmpLenRev); + mixedPieces.sort(cmpLenRev); + for (i = 0; i < 12; i++) { + shortPieces[i] = regexEscape(shortPieces[i]); + longPieces[i] = regexEscape(longPieces[i]); + mixedPieces[i] = regexEscape(mixedPieces[i]); + } + + this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i'); + this._monthsShortRegex = this._monthsRegex; + this._monthsStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i'); + this._monthsShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i'); + } + + function checkOverflow(m) { + var overflow; + var a = m._a; + + if (a && getParsingFlags(m).overflow === -2) { + overflow = + a[MONTH] < 0 || a[MONTH] > 11 + ? MONTH + : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) + ? DATE + : a[HOUR] < 0 || + a[HOUR] > 24 || + (a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0)) + ? HOUR + : a[MINUTE] < 0 || a[MINUTE] > 59 + ? MINUTE + : a[SECOND] < 0 || a[SECOND] > 59 + ? SECOND + : a[MILLISECOND] < 0 || a[MILLISECOND] > 999 + ? MILLISECOND + : -1; + + if (getParsingFlags(m)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) { + overflow = DATE; + } + if (getParsingFlags(m)._overflowWeeks && overflow === -1) { + overflow = WEEK; + } + if (getParsingFlags(m)._overflowWeekday && overflow === -1) { + overflow = WEEKDAY; + } + + getParsingFlags(m).overflow = overflow; + } + + return m; + } + + // iso 8601 regex + // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00) + var extendedIsoRegex = + /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/; + var basicIsoRegex = + /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/; + + var tzRegex = /Z|[+-]\d\d(?::?\d\d)?/; + + var isoDates = [ + ['YYYYYY-MM-DD', /[+-]\d{6}-\d\d-\d\d/], + ['YYYY-MM-DD', /\d{4}-\d\d-\d\d/], + ['GGGG-[W]WW-E', /\d{4}-W\d\d-\d/], + ['GGGG-[W]WW', /\d{4}-W\d\d/, false], + ['YYYY-DDD', /\d{4}-\d{3}/], + ['YYYY-MM', /\d{4}-\d\d/, false], + ['YYYYYYMMDD', /[+-]\d{10}/], + ['YYYYMMDD', /\d{8}/], + // YYYYMM is NOT allowed by the standard + ['GGGG[W]WWE', /\d{4}W\d{3}/], + ['GGGG[W]WW', /\d{4}W\d{2}/, false], + ['YYYYDDD', /\d{7}/], + ]; + + // iso time formats and regexes + var isoTimes = [ + ['HH:mm:ss.SSSS', /\d\d:\d\d:\d\d\.\d+/], + ['HH:mm:ss,SSSS', /\d\d:\d\d:\d\d,\d+/], + ['HH:mm:ss', /\d\d:\d\d:\d\d/], + ['HH:mm', /\d\d:\d\d/], + ['HHmmss.SSSS', /\d\d\d\d\d\d\.\d+/], + ['HHmmss,SSSS', /\d\d\d\d\d\d,\d+/], + ['HHmmss', /\d\d\d\d\d\d/], + ['HHmm', /\d\d\d\d/], + ['HH', /\d\d/], + ]; + + var aspNetJsonRegex = /^\/?Date\((\-?\d+)/i; + + // date from iso format + function configFromISO(config) { + var i, + l, + string = config._i, + match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string), + allowTime, + dateFormat, + timeFormat, + tzFormat; + + if (match) { + getParsingFlags(config).iso = true; + + for (i = 0, l = isoDates.length; i < l; i++) { + if (isoDates[i][1].exec(match[1])) { + dateFormat = isoDates[i][0]; + allowTime = isoDates[i][2] !== false; + break; + } + } + if (dateFormat == null) { + config._isValid = false; + return; + } + if (match[3]) { + for (i = 0, l = isoTimes.length; i < l; i++) { + if (isoTimes[i][1].exec(match[3])) { + // match[2] should be 'T' or space + timeFormat = (match[2] || ' ') + isoTimes[i][0]; + break; + } + } + if (timeFormat == null) { + config._isValid = false; + return; + } + } + if (!allowTime && timeFormat != null) { + config._isValid = false; + return; + } + if (match[4]) { + if (tzRegex.exec(match[4])) { + tzFormat = 'Z'; + } else { + config._isValid = false; + return; + } + } + config._f = dateFormat + (timeFormat || '') + (tzFormat || ''); + configFromStringAndFormat(config); + } else { + config._isValid = false; + } + } + + // date from iso format or fallback + function configFromString(config) { + var matched = aspNetJsonRegex.exec(config._i); + + if (matched !== null) { + config._d = new Date(+matched[1]); + return; + } + + configFromISO(config); + if (config._isValid === false) { + delete config._isValid; + utils_hooks__hooks.createFromInputFallback(config); + } + } + + utils_hooks__hooks.createFromInputFallback = deprecate( + 'moment construction falls back to js Date. This is ' + + 'discouraged and will be removed in upcoming major ' + + 'release. Please refer to ' + + 'https://github.com/moment/moment/issues/1407 for more info.', + function (config) { + config._d = new Date(config._i + (config._useUTC ? ' UTC' : '')); + }, + ); + + function createDate(y, m, d, h, M, s, ms) { + //can't just apply() to create a date: + //http://stackoverflow.com/questions/181348/instantiating-a-javascript-object-by-calling-prototype-constructor-apply + var date = new Date(y, m, d, h, M, s, ms); + + //the date constructor remaps years 0-99 to 1900-1999 + if (y < 100 && y >= 0 && isFinite(date.getFullYear())) { + date.setFullYear(y); + } + return date; + } + + function createUTCDate(y) { + var date = new Date(Date.UTC.apply(null, arguments)); + + //the Date.UTC function remaps years 0-99 to 1900-1999 + if (y < 100 && y >= 0 && isFinite(date.getUTCFullYear())) { + date.setUTCFullYear(y); + } + return date; + } + + // FORMATTING + + addFormatToken('Y', 0, 0, function () { + var y = this.year(); + return y <= 9999 ? '' + y : '+' + y; + }); + + addFormatToken(0, ['YY', 2], 0, function () { + return this.year() % 100; + }); + + addFormatToken(0, ['YYYY', 4], 0, 'year'); + addFormatToken(0, ['YYYYY', 5], 0, 'year'); + addFormatToken(0, ['YYYYYY', 6, true], 0, 'year'); + + // ALIASES + + addUnitAlias('year', 'y'); + + // PARSING + + addRegexToken('Y', matchSigned); + addRegexToken('YY', match1to2, match2); + addRegexToken('YYYY', match1to4, match4); + addRegexToken('YYYYY', match1to6, match6); + addRegexToken('YYYYYY', match1to6, match6); + + addParseToken(['YYYYY', 'YYYYYY'], YEAR); + addParseToken('YYYY', function (input, array) { + array[YEAR] = input.length === 2 ? utils_hooks__hooks.parseTwoDigitYear(input) : toInt(input); + }); + addParseToken('YY', function (input, array) { + array[YEAR] = utils_hooks__hooks.parseTwoDigitYear(input); + }); + addParseToken('Y', function (input, array) { + array[YEAR] = parseInt(input, 10); + }); + + // HELPERS + + function daysInYear(year) { + return isLeapYear(year) ? 366 : 365; + } + + function isLeapYear(year) { + return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0; + } + + // HOOKS + + utils_hooks__hooks.parseTwoDigitYear = function (input) { + return toInt(input) + (toInt(input) > 68 ? 1900 : 2000); + }; + + // MOMENTS + + var getSetYear = makeGetSet('FullYear', true); + + function getIsLeapYear() { + return isLeapYear(this.year()); + } + + // start-of-first-week - start-of-year + function firstWeekOffset(year, dow, doy) { + var // first-week day -- which january is always in the first week (4 for iso, 1 for other) + fwd = 7 + dow - doy, + // first-week day local weekday -- which local weekday is fwd + fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7; + + return -fwdlw + fwd - 1; + } + + //http://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday + function dayOfYearFromWeeks(year, week, weekday, dow, doy) { + var localWeekday = (7 + weekday - dow) % 7, + weekOffset = firstWeekOffset(year, dow, doy), + dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset, + resYear, + resDayOfYear; + + if (dayOfYear <= 0) { + resYear = year - 1; + resDayOfYear = daysInYear(resYear) + dayOfYear; + } else if (dayOfYear > daysInYear(year)) { + resYear = year + 1; + resDayOfYear = dayOfYear - daysInYear(year); + } else { + resYear = year; + resDayOfYear = dayOfYear; + } + + return { + year: resYear, + dayOfYear: resDayOfYear, + }; + } + + function weekOfYear(mom, dow, doy) { + var weekOffset = firstWeekOffset(mom.year(), dow, doy), + week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1, + resWeek, + resYear; + + if (week < 1) { + resYear = mom.year() - 1; + resWeek = week + weeksInYear(resYear, dow, doy); + } else if (week > weeksInYear(mom.year(), dow, doy)) { + resWeek = week - weeksInYear(mom.year(), dow, doy); + resYear = mom.year() + 1; + } else { + resYear = mom.year(); + resWeek = week; + } + + return { + week: resWeek, + year: resYear, + }; + } + + function weeksInYear(year, dow, doy) { + var weekOffset = firstWeekOffset(year, dow, doy), + weekOffsetNext = firstWeekOffset(year + 1, dow, doy); + return (daysInYear(year) - weekOffset + weekOffsetNext) / 7; + } + + // Pick the first defined of two or three arguments. + function defaults(a, b, c) { + if (a != null) { + return a; + } + if (b != null) { + return b; + } + return c; + } + + function currentDateArray(config) { + // hooks is actually the exported moment object + var nowValue = new Date(utils_hooks__hooks.now()); + if (config._useUTC) { + return [nowValue.getUTCFullYear(), nowValue.getUTCMonth(), nowValue.getUTCDate()]; + } + return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()]; + } + + // convert an array to a date. + // the array should mirror the parameters below + // note: all values past the year are optional and will default to the lowest possible value. + // [year, month, day , hour, minute, second, millisecond] + function configFromArray(config) { + var i, + date, + input = [], + currentDate, + yearToUse; + + if (config._d) { + return; + } + + currentDate = currentDateArray(config); + + //compute day of the year from weeks and weekdays + if (config._w && config._a[DATE] == null && config._a[MONTH] == null) { + dayOfYearFromWeekInfo(config); + } + + //if the day of the year is set, figure out what it is + if (config._dayOfYear) { + yearToUse = defaults(config._a[YEAR], currentDate[YEAR]); + + if (config._dayOfYear > daysInYear(yearToUse)) { + getParsingFlags(config)._overflowDayOfYear = true; + } + + date = createUTCDate(yearToUse, 0, config._dayOfYear); + config._a[MONTH] = date.getUTCMonth(); + config._a[DATE] = date.getUTCDate(); + } + + // Default to current date. + // * if no year, month, day of month are given, default to today + // * if day of month is given, default month and year + // * if month is given, default only year + // * if year is given, don't default anything + for (i = 0; i < 3 && config._a[i] == null; ++i) { + config._a[i] = input[i] = currentDate[i]; + } + + // Zero out whatever was not defaulted, including time + for (; i < 7; i++) { + config._a[i] = input[i] = config._a[i] == null ? (i === 2 ? 1 : 0) : config._a[i]; + } + + // Check for 24:00:00.000 + if ( + config._a[HOUR] === 24 && + config._a[MINUTE] === 0 && + config._a[SECOND] === 0 && + config._a[MILLISECOND] === 0 + ) { + config._nextDay = true; + config._a[HOUR] = 0; + } + + config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input); + // Apply timezone offset from input. The actual utcOffset can be changed + // with parseZone. + if (config._tzm != null) { + config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm); + } + + if (config._nextDay) { + config._a[HOUR] = 24; + } + } + + function dayOfYearFromWeekInfo(config) { + var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow; + + w = config._w; + if (w.GG != null || w.W != null || w.E != null) { + dow = 1; + doy = 4; + + // TODO: We need to take the current isoWeekYear, but that depends on + // how we interpret now (local, utc, fixed offset). So create + // a now version of current config (take local/utc/offset flags, and + // create now). + weekYear = defaults(w.GG, config._a[YEAR], weekOfYear(local__createLocal(), 1, 4).year); + week = defaults(w.W, 1); + weekday = defaults(w.E, 1); + if (weekday < 1 || weekday > 7) { + weekdayOverflow = true; + } + } else { + dow = config._locale._week.dow; + doy = config._locale._week.doy; + + weekYear = defaults(w.gg, config._a[YEAR], weekOfYear(local__createLocal(), dow, doy).year); + week = defaults(w.w, 1); + + if (w.d != null) { + // weekday -- low day numbers are considered next week + weekday = w.d; + if (weekday < 0 || weekday > 6) { + weekdayOverflow = true; + } + } else if (w.e != null) { + // local weekday -- counting starts from begining of week + weekday = w.e + dow; + if (w.e < 0 || w.e > 6) { + weekdayOverflow = true; + } + } else { + // default to begining of week + weekday = dow; + } + } + if (week < 1 || week > weeksInYear(weekYear, dow, doy)) { + getParsingFlags(config)._overflowWeeks = true; + } else if (weekdayOverflow != null) { + getParsingFlags(config)._overflowWeekday = true; + } else { + temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy); + config._a[YEAR] = temp.year; + config._dayOfYear = temp.dayOfYear; + } + } + + // constant that refers to the ISO standard + utils_hooks__hooks.ISO_8601 = function () {}; + + // date from string and format string + function configFromStringAndFormat(config) { + // TODO: Move this to another part of the creation flow to prevent circular deps + if (config._f === utils_hooks__hooks.ISO_8601) { + configFromISO(config); + return; + } + + config._a = []; + getParsingFlags(config).empty = true; + + // This array is used to make a Date, either with `new Date` or `Date.UTC` + var string = '' + config._i, + i, + parsedInput, + tokens, + token, + skipped, + stringLength = string.length, + totalParsedInputLength = 0; + + tokens = expandFormat(config._f, config._locale).match(formattingTokens) || []; + + for (i = 0; i < tokens.length; i++) { + token = tokens[i]; + parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0]; + // console.log('token', token, 'parsedInput', parsedInput, + // 'regex', getParseRegexForToken(token, config)); + if (parsedInput) { + skipped = string.substr(0, string.indexOf(parsedInput)); + if (skipped.length > 0) { + getParsingFlags(config).unusedInput.push(skipped); + } + string = string.slice(string.indexOf(parsedInput) + parsedInput.length); + totalParsedInputLength += parsedInput.length; + } + // don't parse if it's not a known token + if (formatTokenFunctions[token]) { + if (parsedInput) { + getParsingFlags(config).empty = false; + } else { + getParsingFlags(config).unusedTokens.push(token); + } + addTimeToArrayFromToken(token, parsedInput, config); + } else if (config._strict && !parsedInput) { + getParsingFlags(config).unusedTokens.push(token); + } + } + + // add remaining unparsed input length to the string + getParsingFlags(config).charsLeftOver = stringLength - totalParsedInputLength; + if (string.length > 0) { + getParsingFlags(config).unusedInput.push(string); + } + + // clear _12h flag if hour is <= 12 + if (getParsingFlags(config).bigHour === true && config._a[HOUR] <= 12 && config._a[HOUR] > 0) { + getParsingFlags(config).bigHour = undefined; + } + + getParsingFlags(config).parsedDateParts = config._a.slice(0); + getParsingFlags(config).meridiem = config._meridiem; + // handle meridiem + config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], config._meridiem); + + configFromArray(config); + checkOverflow(config); + } + + function meridiemFixWrap(locale, hour, meridiem) { + var isPm; + + if (meridiem == null) { + // nothing to do + return hour; + } + if (locale.meridiemHour != null) { + return locale.meridiemHour(hour, meridiem); + } else if (locale.isPM != null) { + // Fallback + isPm = locale.isPM(meridiem); + if (isPm && hour < 12) { + hour += 12; + } + if (!isPm && hour === 12) { + hour = 0; + } + return hour; + } else { + // this is not supposed to happen + return hour; + } + } + + // date from string and array of format strings + function configFromStringAndArray(config) { + var tempConfig, bestMoment, scoreToBeat, i, currentScore; + + if (config._f.length === 0) { + getParsingFlags(config).invalidFormat = true; + config._d = new Date(NaN); + return; + } + + for (i = 0; i < config._f.length; i++) { + currentScore = 0; + tempConfig = copyConfig({}, config); + if (config._useUTC != null) { + tempConfig._useUTC = config._useUTC; + } + tempConfig._f = config._f[i]; + configFromStringAndFormat(tempConfig); + + if (!valid__isValid(tempConfig)) { + continue; + } + + // if there is any input that was not parsed add a penalty for that format + currentScore += getParsingFlags(tempConfig).charsLeftOver; + + //or tokens + currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10; + + getParsingFlags(tempConfig).score = currentScore; + + if (scoreToBeat == null || currentScore < scoreToBeat) { + scoreToBeat = currentScore; + bestMoment = tempConfig; + } + } + + extend(config, bestMoment || tempConfig); + } + + function configFromObject(config) { + if (config._d) { + return; + } + + var i = normalizeObjectUnits(config._i); + config._a = map( + [i.year, i.month, i.day || i.date, i.hour, i.minute, i.second, i.millisecond], + function (obj) { + return obj && parseInt(obj, 10); + }, + ); + + configFromArray(config); + } + + function createFromConfig(config) { + var res = new Moment(checkOverflow(prepareConfig(config))); + if (res._nextDay) { + // Adding is smart enough around DST + res.add(1, 'd'); + res._nextDay = undefined; + } + + return res; + } + + function prepareConfig(config) { + var input = config._i, + format = config._f; + + config._locale = config._locale || locale_locales__getLocale(config._l); + + if (input === null || (format === undefined && input === '')) { + return valid__createInvalid({ nullInput: true }); + } + + if (typeof input === 'string') { + config._i = input = config._locale.preparse(input); + } + + if (isMoment(input)) { + return new Moment(checkOverflow(input)); + } else if (isArray(format)) { + configFromStringAndArray(config); + } else if (format) { + configFromStringAndFormat(config); + } else if (isDate(input)) { + config._d = input; + } else { + configFromInput(config); + } + + if (!valid__isValid(config)) { + config._d = null; + } + + return config; + } + + function configFromInput(config) { + var input = config._i; + if (input === undefined) { + config._d = new Date(utils_hooks__hooks.now()); + } else if (isDate(input)) { + config._d = new Date(input.valueOf()); + } else if (typeof input === 'string') { + configFromString(config); + } else if (isArray(input)) { + config._a = map(input.slice(0), function (obj) { + return parseInt(obj, 10); + }); + configFromArray(config); + } else if (typeof input === 'object') { + configFromObject(config); + } else if (typeof input === 'number') { + // from milliseconds + config._d = new Date(input); + } else { + utils_hooks__hooks.createFromInputFallback(config); + } + } + + function createLocalOrUTC(input, format, locale, strict, isUTC) { + var c = {}; + + if (typeof locale === 'boolean') { + strict = locale; + locale = undefined; + } + // object construction must be done this way. + // https://github.com/moment/moment/issues/1423 + c._isAMomentObject = true; + c._useUTC = c._isUTC = isUTC; + c._l = locale; + c._i = input; + c._f = format; + c._strict = strict; + + return createFromConfig(c); + } + + function local__createLocal(input, format, locale, strict) { + return createLocalOrUTC(input, format, locale, strict, false); + } + + var prototypeMin = deprecate( + 'moment().min is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548', + function () { + var other = local__createLocal.apply(null, arguments); + if (this.isValid() && other.isValid()) { + return other < this ? this : other; + } else { + return valid__createInvalid(); + } + }, + ); + + var prototypeMax = deprecate( + 'moment().max is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548', + function () { + var other = local__createLocal.apply(null, arguments); + if (this.isValid() && other.isValid()) { + return other > this ? this : other; + } else { + return valid__createInvalid(); + } + }, + ); + + // Pick a moment m from moments so that m[fn](other) is true for all + // other. This relies on the function fn to be transitive. + // + // moments should either be an array of moment objects or an array, whose + // first element is an array of moment objects. + function pickBy(fn, moments) { + var res, i; + if (moments.length === 1 && isArray(moments[0])) { + moments = moments[0]; + } + if (!moments.length) { + return local__createLocal(); + } + res = moments[0]; + for (i = 1; i < moments.length; ++i) { + if (!moments[i].isValid() || moments[i][fn](res)) { + res = moments[i]; + } + } + return res; + } + + // TODO: Use [].sort instead? + function min() { + var args = [].slice.call(arguments, 0); + + return pickBy('isBefore', args); + } + + function max() { + var args = [].slice.call(arguments, 0); + + return pickBy('isAfter', args); + } + + var now = function () { + return Date.now ? Date.now() : +new Date(); + }; + + function Duration(duration) { + var normalizedInput = normalizeObjectUnits(duration), + years = normalizedInput.year || 0, + quarters = normalizedInput.quarter || 0, + months = normalizedInput.month || 0, + weeks = normalizedInput.week || 0, + days = normalizedInput.day || 0, + hours = normalizedInput.hour || 0, + minutes = normalizedInput.minute || 0, + seconds = normalizedInput.second || 0, + milliseconds = normalizedInput.millisecond || 0; + + // representation for dateAddRemove + this._milliseconds = + +milliseconds + + seconds * 1e3 + // 1000 + minutes * 6e4 + // 1000 * 60 + hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978 + // Because of dateAddRemove treats 24 hours as different from a + // day when working around DST, we need to store them separately + this._days = +days + weeks * 7; + // It is impossible translate months into days without knowing + // which months you are are talking about, so we have to store + // it separately. + this._months = +months + quarters * 3 + years * 12; + + this._data = {}; + + this._locale = locale_locales__getLocale(); + + this._bubble(); + } + + function isDuration(obj) { + return obj instanceof Duration; + } + + // FORMATTING + + function offset(token, separator) { + addFormatToken(token, 0, 0, function () { + var offset = this.utcOffset(); + var sign = '+'; + if (offset < 0) { + offset = -offset; + sign = '-'; + } + return sign + zeroFill(~~(offset / 60), 2) + separator + zeroFill(~~offset % 60, 2); + }); + } + + offset('Z', ':'); + offset('ZZ', ''); + + // PARSING + + addRegexToken('Z', matchShortOffset); + addRegexToken('ZZ', matchShortOffset); + addParseToken(['Z', 'ZZ'], function (input, array, config) { + config._useUTC = true; + config._tzm = offsetFromString(matchShortOffset, input); + }); + + // HELPERS + + // timezone chunker + // '+10:00' > ['10', '00'] + // '-1530' > ['-15', '30'] + var chunkOffset = /([\+\-]|\d\d)/gi; + + function offsetFromString(matcher, string) { + var matches = (string || '').match(matcher) || []; + var chunk = matches[matches.length - 1] || []; + var parts = (chunk + '').match(chunkOffset) || ['-', 0, 0]; + var minutes = +(parts[1] * 60) + toInt(parts[2]); + + return parts[0] === '+' ? minutes : -minutes; + } + + // Return a moment from input, that is local/utc/zone equivalent to model. + function cloneWithOffset(input, model) { + var res, diff; + if (model._isUTC) { + res = model.clone(); + diff = + (isMoment(input) || isDate(input) ? input.valueOf() : local__createLocal(input).valueOf()) - + res.valueOf(); + // Use low-level api, because this fn is low-level api. + res._d.setTime(res._d.valueOf() + diff); + utils_hooks__hooks.updateOffset(res, false); + return res; + } else { + return local__createLocal(input).local(); + } + } + + function getDateOffset(m) { + // On Firefox.24 Date#getTimezoneOffset returns a floating point. + // https://github.com/moment/moment/pull/1871 + return -Math.round(m._d.getTimezoneOffset() / 15) * 15; + } + + // HOOKS + + // This function will be called whenever a moment is mutated. + // It is intended to keep the offset in sync with the timezone. + utils_hooks__hooks.updateOffset = function () {}; + + // MOMENTS + + // keepLocalTime = true means only change the timezone, without + // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]--> + // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset + // +0200, so we adjust the time as needed, to be valid. + // + // Keeping the time actually adds/subtracts (one hour) + // from the actual represented time. That is why we call updateOffset + // a second time. In case it wants us to change the offset again + // _changeInProgress == true case, then we have to adjust, because + // there is no such time in the given timezone. + function getSetOffset(input, keepLocalTime) { + var offset = this._offset || 0, + localAdjust; + if (!this.isValid()) { + return input != null ? this : NaN; + } + if (input != null) { + if (typeof input === 'string') { + input = offsetFromString(matchShortOffset, input); + } else if (Math.abs(input) < 16) { + input = input * 60; + } + if (!this._isUTC && keepLocalTime) { + localAdjust = getDateOffset(this); + } + this._offset = input; + this._isUTC = true; + if (localAdjust != null) { + this.add(localAdjust, 'm'); + } + if (offset !== input) { + if (!keepLocalTime || this._changeInProgress) { + add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false); + } else if (!this._changeInProgress) { + this._changeInProgress = true; + utils_hooks__hooks.updateOffset(this, true); + this._changeInProgress = null; + } + } + return this; + } else { + return this._isUTC ? offset : getDateOffset(this); + } + } + + function getSetZone(input, keepLocalTime) { + if (input != null) { + if (typeof input !== 'string') { + input = -input; + } + + this.utcOffset(input, keepLocalTime); + + return this; + } else { + return -this.utcOffset(); + } + } + + function setOffsetToUTC(keepLocalTime) { + return this.utcOffset(0, keepLocalTime); + } + + function setOffsetToLocal(keepLocalTime) { + if (this._isUTC) { + this.utcOffset(0, keepLocalTime); + this._isUTC = false; + + if (keepLocalTime) { + this.subtract(getDateOffset(this), 'm'); + } + } + return this; + } + + function setOffsetToParsedOffset() { + if (this._tzm) { + this.utcOffset(this._tzm); + } else if (typeof this._i === 'string') { + this.utcOffset(offsetFromString(matchOffset, this._i)); + } + return this; + } + + function hasAlignedHourOffset(input) { + if (!this.isValid()) { + return false; + } + input = input ? local__createLocal(input).utcOffset() : 0; + + return (this.utcOffset() - input) % 60 === 0; + } + + function isDaylightSavingTime() { + return ( + this.utcOffset() > this.clone().month(0).utcOffset() || + this.utcOffset() > this.clone().month(5).utcOffset() + ); + } + + function isDaylightSavingTimeShifted() { + if (!isUndefined(this._isDSTShifted)) { + return this._isDSTShifted; + } + + var c = {}; + + copyConfig(c, this); + c = prepareConfig(c); + + if (c._a) { + var other = c._isUTC ? create_utc__createUTC(c._a) : local__createLocal(c._a); + this._isDSTShifted = this.isValid() && compareArrays(c._a, other.toArray()) > 0; + } else { + this._isDSTShifted = false; + } + + return this._isDSTShifted; + } + + function isLocal() { + return this.isValid() ? !this._isUTC : false; + } + + function isUtcOffset() { + return this.isValid() ? this._isUTC : false; + } + + function isUtc() { + return this.isValid() ? this._isUTC && this._offset === 0 : false; + } + + // ASP.NET json date format regex + var aspNetRegex = /^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?\d*)?$/; + + // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html + // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere + // and further modified to allow for strings containing both week and day + var isoRegex = + /^(-)?P(?:(-?[0-9,.]*)Y)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)W)?(?:(-?[0-9,.]*)D)?(?:T(?:(-?[0-9,.]*)H)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)S)?)?$/; + + function create__createDuration(input, key) { + var duration = input, + // matching against regexp is expensive, do it on demand + match = null, + sign, + ret, + diffRes; + + if (isDuration(input)) { + duration = { + ms: input._milliseconds, + d: input._days, + M: input._months, + }; + } else if (typeof input === 'number') { + duration = {}; + if (key) { + duration[key] = input; + } else { + duration.milliseconds = input; + } + } else if (!!(match = aspNetRegex.exec(input))) { + sign = match[1] === '-' ? -1 : 1; + duration = { + y: 0, + d: toInt(match[DATE]) * sign, + h: toInt(match[HOUR]) * sign, + m: toInt(match[MINUTE]) * sign, + s: toInt(match[SECOND]) * sign, + ms: toInt(match[MILLISECOND]) * sign, + }; + } else if (!!(match = isoRegex.exec(input))) { + sign = match[1] === '-' ? -1 : 1; + duration = { + y: parseIso(match[2], sign), + M: parseIso(match[3], sign), + w: parseIso(match[4], sign), + d: parseIso(match[5], sign), + h: parseIso(match[6], sign), + m: parseIso(match[7], sign), + s: parseIso(match[8], sign), + }; + } else if (duration == null) { + // checks for null or undefined + duration = {}; + } else if (typeof duration === 'object' && ('from' in duration || 'to' in duration)) { + diffRes = momentsDifference(local__createLocal(duration.from), local__createLocal(duration.to)); + + duration = {}; + duration.ms = diffRes.milliseconds; + duration.M = diffRes.months; + } + + ret = new Duration(duration); + + if (isDuration(input) && hasOwnProp(input, '_locale')) { + ret._locale = input._locale; + } + + return ret; + } + + create__createDuration.fn = Duration.prototype; + + function parseIso(inp, sign) { + // We'd normally use ~~inp for this, but unfortunately it also + // converts floats to ints. + // inp may be undefined, so careful calling replace on it. + var res = inp && parseFloat(inp.replace(',', '.')); + // apply sign while we're at it + return (isNaN(res) ? 0 : res) * sign; + } + + function positiveMomentsDifference(base, other) { + var res = { milliseconds: 0, months: 0 }; + + res.months = other.month() - base.month() + (other.year() - base.year()) * 12; + if (base.clone().add(res.months, 'M').isAfter(other)) { + --res.months; + } + + res.milliseconds = +other - +base.clone().add(res.months, 'M'); + + return res; + } + + function momentsDifference(base, other) { + var res; + if (!(base.isValid() && other.isValid())) { + return { milliseconds: 0, months: 0 }; + } + + other = cloneWithOffset(other, base); + if (base.isBefore(other)) { + res = positiveMomentsDifference(base, other); + } else { + res = positiveMomentsDifference(other, base); + res.milliseconds = -res.milliseconds; + res.months = -res.months; + } + + return res; + } + + function absRound(number) { + if (number < 0) { + return Math.round(-1 * number) * -1; + } else { + return Math.round(number); + } + } + + // TODO: remove 'name' arg after deprecation is removed + function createAdder(direction, name) { + return function (val, period) { + var dur, tmp; + //invert the arguments, but complain about it + if (period !== null && !isNaN(+period)) { + deprecateSimple( + name, + 'moment().' + + name + + '(period, number) is deprecated. Please use moment().' + + name + + '(number, period).', + ); + tmp = val; + val = period; + period = tmp; + } + + val = typeof val === 'string' ? +val : val; + dur = create__createDuration(val, period); + add_subtract__addSubtract(this, dur, direction); + return this; + }; + } + + function add_subtract__addSubtract(mom, duration, isAdding, updateOffset) { + var milliseconds = duration._milliseconds, + days = absRound(duration._days), + months = absRound(duration._months); + + if (!mom.isValid()) { + // No op + return; + } + + updateOffset = updateOffset == null ? true : updateOffset; + + if (milliseconds) { + mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding); + } + if (days) { + get_set__set(mom, 'Date', get_set__get(mom, 'Date') + days * isAdding); + } + if (months) { + setMonth(mom, get_set__get(mom, 'Month') + months * isAdding); + } + if (updateOffset) { + utils_hooks__hooks.updateOffset(mom, days || months); + } + } + + var add_subtract__add = createAdder(1, 'add'); + var add_subtract__subtract = createAdder(-1, 'subtract'); + + function moment_calendar__calendar(time, formats) { + // We want to compare the start of today, vs this. + // Getting start-of-today depends on whether we're local/utc/offset or not. + var now = time || local__createLocal(), + sod = cloneWithOffset(now, this).startOf('day'), + diff = this.diff(sod, 'days', true), + format = + diff < -6 + ? 'sameElse' + : diff < -1 + ? 'lastWeek' + : diff < 0 + ? 'lastDay' + : diff < 1 + ? 'sameDay' + : diff < 2 + ? 'nextDay' + : diff < 7 + ? 'nextWeek' + : 'sameElse'; + + var output = formats && (isFunction(formats[format]) ? formats[format]() : formats[format]); + + return this.format(output || this.localeData().calendar(format, this, local__createLocal(now))); + } + + function clone() { + return new Moment(this); + } + + function isAfter(input, units) { + var localInput = isMoment(input) ? input : local__createLocal(input); + if (!(this.isValid() && localInput.isValid())) { + return false; + } + units = normalizeUnits(!isUndefined(units) ? units : 'millisecond'); + if (units === 'millisecond') { + return this.valueOf() > localInput.valueOf(); + } else { + return localInput.valueOf() < this.clone().startOf(units).valueOf(); + } + } + + function isBefore(input, units) { + var localInput = isMoment(input) ? input : local__createLocal(input); + if (!(this.isValid() && localInput.isValid())) { + return false; + } + units = normalizeUnits(!isUndefined(units) ? units : 'millisecond'); + if (units === 'millisecond') { + return this.valueOf() < localInput.valueOf(); + } else { + return this.clone().endOf(units).valueOf() < localInput.valueOf(); + } + } + + function isBetween(from, to, units, inclusivity) { + inclusivity = inclusivity || '()'; + return ( + (inclusivity[0] === '(' ? this.isAfter(from, units) : !this.isBefore(from, units)) && + (inclusivity[1] === ')' ? this.isBefore(to, units) : !this.isAfter(to, units)) + ); + } + + function isSame(input, units) { + var localInput = isMoment(input) ? input : local__createLocal(input), + inputMs; + if (!(this.isValid() && localInput.isValid())) { + return false; + } + units = normalizeUnits(units || 'millisecond'); + if (units === 'millisecond') { + return this.valueOf() === localInput.valueOf(); + } else { + inputMs = localInput.valueOf(); + return ( + this.clone().startOf(units).valueOf() <= inputMs && + inputMs <= this.clone().endOf(units).valueOf() + ); + } + } + + function isSameOrAfter(input, units) { + return this.isSame(input, units) || this.isAfter(input, units); + } + + function isSameOrBefore(input, units) { + return this.isSame(input, units) || this.isBefore(input, units); + } + + function diff(input, units, asFloat) { + var that, zoneDelta, delta, output; + + if (!this.isValid()) { + return NaN; + } + + that = cloneWithOffset(input, this); + + if (!that.isValid()) { + return NaN; + } + + zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4; + + units = normalizeUnits(units); + + if (units === 'year' || units === 'month' || units === 'quarter') { + output = monthDiff(this, that); + if (units === 'quarter') { + output = output / 3; + } else if (units === 'year') { + output = output / 12; + } + } else { + delta = this - that; + output = + units === 'second' + ? delta / 1e3 // 1000 + : units === 'minute' + ? delta / 6e4 // 1000 * 60 + : units === 'hour' + ? delta / 36e5 // 1000 * 60 * 60 + : units === 'day' + ? (delta - zoneDelta) / 864e5 // 1000 * 60 * 60 * 24, negate dst + : units === 'week' + ? (delta - zoneDelta) / 6048e5 // 1000 * 60 * 60 * 24 * 7, negate dst + : delta; + } + return asFloat ? output : absFloor(output); + } + + function monthDiff(a, b) { + // difference in months + var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()), + // b is in (anchor - 1 month, anchor + 1 month) + anchor = a.clone().add(wholeMonthDiff, 'months'), + anchor2, + adjust; + + if (b - anchor < 0) { + anchor2 = a.clone().add(wholeMonthDiff - 1, 'months'); + // linear across the month + adjust = (b - anchor) / (anchor - anchor2); + } else { + anchor2 = a.clone().add(wholeMonthDiff + 1, 'months'); + // linear across the month + adjust = (b - anchor) / (anchor2 - anchor); + } + + //check for negative zero, return zero if negative zero + return -(wholeMonthDiff + adjust) || 0; + } + + utils_hooks__hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ'; + utils_hooks__hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]'; + + function toString() { + return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ'); + } + + function moment_format__toISOString() { + var m = this.clone().utc(); + if (0 < m.year() && m.year() <= 9999) { + if (isFunction(Date.prototype.toISOString)) { + // native implementation is ~50x faster, use it when we can + return this.toDate().toISOString(); + } else { + return formatMoment(m, 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]'); + } + } else { + return formatMoment(m, 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]'); + } + } + + function format(inputString) { + if (!inputString) { + inputString = this.isUtc() + ? utils_hooks__hooks.defaultFormatUtc + : utils_hooks__hooks.defaultFormat; + } + var output = formatMoment(this, inputString); + return this.localeData().postformat(output); + } + + function from(time, withoutSuffix) { + if ( + this.isValid() && + ((isMoment(time) && time.isValid()) || local__createLocal(time).isValid()) + ) { + return create__createDuration({ to: this, from: time }) + .locale(this.locale()) + .humanize(!withoutSuffix); + } else { + return this.localeData().invalidDate(); + } + } + + function fromNow(withoutSuffix) { + return this.from(local__createLocal(), withoutSuffix); + } + + function to(time, withoutSuffix) { + if ( + this.isValid() && + ((isMoment(time) && time.isValid()) || local__createLocal(time).isValid()) + ) { + return create__createDuration({ from: this, to: time }) + .locale(this.locale()) + .humanize(!withoutSuffix); + } else { + return this.localeData().invalidDate(); + } + } + + function toNow(withoutSuffix) { + return this.to(local__createLocal(), withoutSuffix); + } + + // If passed a locale key, it will set the locale for this + // instance. Otherwise, it will return the locale configuration + // variables for this instance. + function locale(key) { + var newLocaleData; + + if (key === undefined) { + return this._locale._abbr; + } else { + newLocaleData = locale_locales__getLocale(key); + if (newLocaleData != null) { + this._locale = newLocaleData; + } + return this; + } + } + + var lang = deprecate( + 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.', + function (key) { + if (key === undefined) { + return this.localeData(); + } else { + return this.locale(key); + } + }, + ); + + function localeData() { + return this._locale; + } + + function startOf(units) { + units = normalizeUnits(units); + // the following switch intentionally omits break keywords + // to utilize falling through the cases. + switch (units) { + case 'year': + this.month(0); + /* falls through */ + case 'quarter': + case 'month': + this.date(1); + /* falls through */ + case 'week': + case 'isoWeek': + case 'day': + case 'date': + this.hours(0); + /* falls through */ + case 'hour': + this.minutes(0); + /* falls through */ + case 'minute': + this.seconds(0); + /* falls through */ + case 'second': + this.milliseconds(0); + } + + // weeks are a special case + if (units === 'week') { + this.weekday(0); + } + if (units === 'isoWeek') { + this.isoWeekday(1); + } + + // quarters are also special + if (units === 'quarter') { + this.month(Math.floor(this.month() / 3) * 3); + } + + return this; + } + + function endOf(units) { + units = normalizeUnits(units); + if (units === undefined || units === 'millisecond') { + return this; + } + + // 'date' is an alias for 'day', so it should be considered as such. + if (units === 'date') { + units = 'day'; + } + + return this.startOf(units) + .add(1, units === 'isoWeek' ? 'week' : units) + .subtract(1, 'ms'); + } + + function to_type__valueOf() { + return this._d.valueOf() - (this._offset || 0) * 60000; + } + + function unix() { + return Math.floor(this.valueOf() / 1000); + } + + function toDate() { + return this._offset ? new Date(this.valueOf()) : this._d; + } + + function toArray() { + var m = this; + return [m.year(), m.month(), m.date(), m.hour(), m.minute(), m.second(), m.millisecond()]; + } + + function toObject() { + var m = this; + return { + years: m.year(), + months: m.month(), + date: m.date(), + hours: m.hours(), + minutes: m.minutes(), + seconds: m.seconds(), + milliseconds: m.milliseconds(), + }; + } + + function toJSON() { + // new Date(NaN).toJSON() === null + return this.isValid() ? this.toISOString() : null; + } + + function moment_valid__isValid() { + return valid__isValid(this); + } + + function parsingFlags() { + return extend({}, getParsingFlags(this)); + } + + function invalidAt() { + return getParsingFlags(this).overflow; + } + + function creationData() { + return { + input: this._i, + format: this._f, + locale: this._locale, + isUTC: this._isUTC, + strict: this._strict, + }; + } + + // FORMATTING + + addFormatToken(0, ['gg', 2], 0, function () { + return this.weekYear() % 100; + }); + + addFormatToken(0, ['GG', 2], 0, function () { + return this.isoWeekYear() % 100; + }); + + function addWeekYearFormatToken(token, getter) { + addFormatToken(0, [token, token.length], 0, getter); + } + + addWeekYearFormatToken('gggg', 'weekYear'); + addWeekYearFormatToken('ggggg', 'weekYear'); + addWeekYearFormatToken('GGGG', 'isoWeekYear'); + addWeekYearFormatToken('GGGGG', 'isoWeekYear'); + + // ALIASES + + addUnitAlias('weekYear', 'gg'); + addUnitAlias('isoWeekYear', 'GG'); + + // PARSING + + addRegexToken('G', matchSigned); + addRegexToken('g', matchSigned); + addRegexToken('GG', match1to2, match2); + addRegexToken('gg', match1to2, match2); + addRegexToken('GGGG', match1to4, match4); + addRegexToken('gggg', match1to4, match4); + addRegexToken('GGGGG', match1to6, match6); + addRegexToken('ggggg', match1to6, match6); + + addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function (input, week, config, token) { + week[token.substr(0, 2)] = toInt(input); + }); + + addWeekParseToken(['gg', 'GG'], function (input, week, config, token) { + week[token] = utils_hooks__hooks.parseTwoDigitYear(input); + }); + + // MOMENTS + + function getSetWeekYear(input) { + return getSetWeekYearHelper.call( + this, + input, + this.week(), + this.weekday(), + this.localeData()._week.dow, + this.localeData()._week.doy, + ); + } + + function getSetISOWeekYear(input) { + return getSetWeekYearHelper.call(this, input, this.isoWeek(), this.isoWeekday(), 1, 4); + } + + function getISOWeeksInYear() { + return weeksInYear(this.year(), 1, 4); + } + + function getWeeksInYear() { + var weekInfo = this.localeData()._week; + return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy); + } + + function getSetWeekYearHelper(input, week, weekday, dow, doy) { + var weeksTarget; + if (input == null) { + return weekOfYear(this, dow, doy).year; + } else { + weeksTarget = weeksInYear(input, dow, doy); + if (week > weeksTarget) { + week = weeksTarget; + } + return setWeekAll.call(this, input, week, weekday, dow, doy); + } + } + + function setWeekAll(weekYear, week, weekday, dow, doy) { + var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy), + date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear); + + this.year(date.getUTCFullYear()); + this.month(date.getUTCMonth()); + this.date(date.getUTCDate()); + return this; + } + + // FORMATTING + + addFormatToken('Q', 0, 'Qo', 'quarter'); + + // ALIASES + + addUnitAlias('quarter', 'Q'); + + // PARSING + + addRegexToken('Q', match1); + addParseToken('Q', function (input, array) { + array[MONTH] = (toInt(input) - 1) * 3; + }); + + // MOMENTS + + function getSetQuarter(input) { + return input == null + ? Math.ceil((this.month() + 1) / 3) + : this.month((input - 1) * 3 + (this.month() % 3)); + } + + // FORMATTING + + addFormatToken('w', ['ww', 2], 'wo', 'week'); + addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek'); + + // ALIASES + + addUnitAlias('week', 'w'); + addUnitAlias('isoWeek', 'W'); + + // PARSING + + addRegexToken('w', match1to2); + addRegexToken('ww', match1to2, match2); + addRegexToken('W', match1to2); + addRegexToken('WW', match1to2, match2); + + addWeekParseToken(['w', 'ww', 'W', 'WW'], function (input, week, config, token) { + week[token.substr(0, 1)] = toInt(input); + }); + + // HELPERS + + // LOCALES + + function localeWeek(mom) { + return weekOfYear(mom, this._week.dow, this._week.doy).week; + } + + var defaultLocaleWeek = { + dow: 0, // Sunday is the first day of the week. + doy: 6, // The week that contains Jan 1st is the first week of the year. + }; + + function localeFirstDayOfWeek() { + return this._week.dow; + } + + function localeFirstDayOfYear() { + return this._week.doy; + } + + // MOMENTS + + function getSetWeek(input) { + var week = this.localeData().week(this); + return input == null ? week : this.add((input - week) * 7, 'd'); + } + + function getSetISOWeek(input) { + var week = weekOfYear(this, 1, 4).week; + return input == null ? week : this.add((input - week) * 7, 'd'); + } + + // FORMATTING + + addFormatToken('D', ['DD', 2], 'Do', 'date'); + + // ALIASES + + addUnitAlias('date', 'D'); + + // PARSING + + addRegexToken('D', match1to2); + addRegexToken('DD', match1to2, match2); + addRegexToken('Do', function (isStrict, locale) { + return isStrict ? locale._ordinalParse : locale._ordinalParseLenient; + }); + + addParseToken(['D', 'DD'], DATE); + addParseToken('Do', function (input, array) { + array[DATE] = toInt(input.match(match1to2)[0], 10); + }); + + // MOMENTS + + var getSetDayOfMonth = makeGetSet('Date', true); + + // FORMATTING + + addFormatToken('d', 0, 'do', 'day'); + + addFormatToken('dd', 0, 0, function (format) { + return this.localeData().weekdaysMin(this, format); + }); + + addFormatToken('ddd', 0, 0, function (format) { + return this.localeData().weekdaysShort(this, format); + }); + + addFormatToken('dddd', 0, 0, function (format) { + return this.localeData().weekdays(this, format); + }); + + addFormatToken('e', 0, 0, 'weekday'); + addFormatToken('E', 0, 0, 'isoWeekday'); + + // ALIASES + + addUnitAlias('day', 'd'); + addUnitAlias('weekday', 'e'); + addUnitAlias('isoWeekday', 'E'); + + // PARSING + + addRegexToken('d', match1to2); + addRegexToken('e', match1to2); + addRegexToken('E', match1to2); + addRegexToken('dd', function (isStrict, locale) { + return locale.weekdaysMinRegex(isStrict); + }); + addRegexToken('ddd', function (isStrict, locale) { + return locale.weekdaysShortRegex(isStrict); + }); + addRegexToken('dddd', function (isStrict, locale) { + return locale.weekdaysRegex(isStrict); + }); + + addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) { + var weekday = config._locale.weekdaysParse(input, token, config._strict); + // if we didn't get a weekday name, mark the date as invalid + if (weekday != null) { + week.d = weekday; + } else { + getParsingFlags(config).invalidWeekday = input; + } + }); + + addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) { + week[token] = toInt(input); + }); + + // HELPERS + + function parseWeekday(input, locale) { + if (typeof input !== 'string') { + return input; + } + + if (!isNaN(input)) { + return parseInt(input, 10); + } + + input = locale.weekdaysParse(input); + if (typeof input === 'number') { + return input; + } + + return null; + } + + // LOCALES + + var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'); + function localeWeekdays(m, format) { + return isArray(this._weekdays) + ? this._weekdays[m.day()] + : this._weekdays[this._weekdays.isFormat.test(format) ? 'format' : 'standalone'][m.day()]; + } + + var defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'); + function localeWeekdaysShort(m) { + return this._weekdaysShort[m.day()]; + } + + var defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'); + function localeWeekdaysMin(m) { + return this._weekdaysMin[m.day()]; + } + + function day_of_week__handleStrictParse(weekdayName, format, strict) { + var i, + ii, + mom, + llc = weekdayName.toLocaleLowerCase(); + if (!this._weekdaysParse) { + this._weekdaysParse = []; + this._shortWeekdaysParse = []; + this._minWeekdaysParse = []; + + for (i = 0; i < 7; ++i) { + mom = create_utc__createUTC([2000, 1]).day(i); + this._minWeekdaysParse[i] = this.weekdaysMin(mom, '').toLocaleLowerCase(); + this._shortWeekdaysParse[i] = this.weekdaysShort(mom, '').toLocaleLowerCase(); + this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase(); + } + } + + if (strict) { + if (format === 'dddd') { + ii = indexOf.call(this._weekdaysParse, llc); + return ii !== -1 ? ii : null; + } else if (format === 'ddd') { + ii = indexOf.call(this._shortWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } else { + ii = indexOf.call(this._minWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } + } else { + if (format === 'dddd') { + ii = indexOf.call(this._weekdaysParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._shortWeekdaysParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._minWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } else if (format === 'ddd') { + ii = indexOf.call(this._shortWeekdaysParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._weekdaysParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._minWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } else { + ii = indexOf.call(this._minWeekdaysParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._weekdaysParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._shortWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } + } + } + + function localeWeekdaysParse(weekdayName, format, strict) { + var i, mom, regex; + + if (this._weekdaysParseExact) { + return day_of_week__handleStrictParse.call(this, weekdayName, format, strict); + } + + if (!this._weekdaysParse) { + this._weekdaysParse = []; + this._minWeekdaysParse = []; + this._shortWeekdaysParse = []; + this._fullWeekdaysParse = []; + } + + for (i = 0; i < 7; i++) { + // make the regex if we don't have it already + + mom = create_utc__createUTC([2000, 1]).day(i); + if (strict && !this._fullWeekdaysParse[i]) { + this._fullWeekdaysParse[i] = new RegExp( + '^' + this.weekdays(mom, '').replace('.', '\.?') + '$', + 'i', + ); + this._shortWeekdaysParse[i] = new RegExp( + '^' + this.weekdaysShort(mom, '').replace('.', '\.?') + '$', + 'i', + ); + this._minWeekdaysParse[i] = new RegExp( + '^' + this.weekdaysMin(mom, '').replace('.', '\.?') + '$', + 'i', + ); + } + if (!this._weekdaysParse[i]) { + regex = + '^' + + this.weekdays(mom, '') + + '|^' + + this.weekdaysShort(mom, '') + + '|^' + + this.weekdaysMin(mom, ''); + this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i'); + } + // test the regex + if (strict && format === 'dddd' && this._fullWeekdaysParse[i].test(weekdayName)) { + return i; + } else if (strict && format === 'ddd' && this._shortWeekdaysParse[i].test(weekdayName)) { + return i; + } else if (strict && format === 'dd' && this._minWeekdaysParse[i].test(weekdayName)) { + return i; + } else if (!strict && this._weekdaysParse[i].test(weekdayName)) { + return i; + } + } + } + + // MOMENTS + + function getSetDayOfWeek(input) { + if (!this.isValid()) { + return input != null ? this : NaN; + } + var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay(); + if (input != null) { + input = parseWeekday(input, this.localeData()); + return this.add(input - day, 'd'); + } else { + return day; + } + } + + function getSetLocaleDayOfWeek(input) { + if (!this.isValid()) { + return input != null ? this : NaN; + } + var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7; + return input == null ? weekday : this.add(input - weekday, 'd'); + } + + function getSetISODayOfWeek(input) { + if (!this.isValid()) { + return input != null ? this : NaN; + } + // behaves the same as moment#day except + // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6) + // as a setter, sunday should belong to the previous week. + return input == null ? this.day() || 7 : this.day(this.day() % 7 ? input : input - 7); + } + + var defaultWeekdaysRegex = matchWord; + function weekdaysRegex(isStrict) { + if (this._weekdaysParseExact) { + if (!hasOwnProp(this, '_weekdaysRegex')) { + computeWeekdaysParse.call(this); + } + if (isStrict) { + return this._weekdaysStrictRegex; + } else { + return this._weekdaysRegex; + } + } else { + return this._weekdaysStrictRegex && isStrict ? this._weekdaysStrictRegex : this._weekdaysRegex; + } + } + + var defaultWeekdaysShortRegex = matchWord; + function weekdaysShortRegex(isStrict) { + if (this._weekdaysParseExact) { + if (!hasOwnProp(this, '_weekdaysRegex')) { + computeWeekdaysParse.call(this); + } + if (isStrict) { + return this._weekdaysShortStrictRegex; + } else { + return this._weekdaysShortRegex; + } + } else { + return this._weekdaysShortStrictRegex && isStrict + ? this._weekdaysShortStrictRegex + : this._weekdaysShortRegex; + } + } + + var defaultWeekdaysMinRegex = matchWord; + function weekdaysMinRegex(isStrict) { + if (this._weekdaysParseExact) { + if (!hasOwnProp(this, '_weekdaysRegex')) { + computeWeekdaysParse.call(this); + } + if (isStrict) { + return this._weekdaysMinStrictRegex; + } else { + return this._weekdaysMinRegex; + } + } else { + return this._weekdaysMinStrictRegex && isStrict + ? this._weekdaysMinStrictRegex + : this._weekdaysMinRegex; + } + } + + function computeWeekdaysParse() { + function cmpLenRev(a, b) { + return b.length - a.length; + } + + var minPieces = [], + shortPieces = [], + longPieces = [], + mixedPieces = [], + i, + mom, + minp, + shortp, + longp; + for (i = 0; i < 7; i++) { + // make the regex if we don't have it already + mom = create_utc__createUTC([2000, 1]).day(i); + minp = this.weekdaysMin(mom, ''); + shortp = this.weekdaysShort(mom, ''); + longp = this.weekdays(mom, ''); + minPieces.push(minp); + shortPieces.push(shortp); + longPieces.push(longp); + mixedPieces.push(minp); + mixedPieces.push(shortp); + mixedPieces.push(longp); + } + // Sorting makes sure if one weekday (or abbr) is a prefix of another it + // will match the longer piece. + minPieces.sort(cmpLenRev); + shortPieces.sort(cmpLenRev); + longPieces.sort(cmpLenRev); + mixedPieces.sort(cmpLenRev); + for (i = 0; i < 7; i++) { + shortPieces[i] = regexEscape(shortPieces[i]); + longPieces[i] = regexEscape(longPieces[i]); + mixedPieces[i] = regexEscape(mixedPieces[i]); + } + + this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i'); + this._weekdaysShortRegex = this._weekdaysRegex; + this._weekdaysMinRegex = this._weekdaysRegex; + + this._weekdaysStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i'); + this._weekdaysShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i'); + this._weekdaysMinStrictRegex = new RegExp('^(' + minPieces.join('|') + ')', 'i'); + } + + // FORMATTING + + addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear'); + + // ALIASES + + addUnitAlias('dayOfYear', 'DDD'); + + // PARSING + + addRegexToken('DDD', match1to3); + addRegexToken('DDDD', match3); + addParseToken(['DDD', 'DDDD'], function (input, array, config) { + config._dayOfYear = toInt(input); + }); + + // HELPERS + + // MOMENTS + + function getSetDayOfYear(input) { + var dayOfYear = + Math.round((this.clone().startOf('day') - this.clone().startOf('year')) / 864e5) + 1; + return input == null ? dayOfYear : this.add(input - dayOfYear, 'd'); + } + + // FORMATTING + + function hFormat() { + return this.hours() % 12 || 12; + } + + function kFormat() { + return this.hours() || 24; + } + + addFormatToken('H', ['HH', 2], 0, 'hour'); + addFormatToken('h', ['hh', 2], 0, hFormat); + addFormatToken('k', ['kk', 2], 0, kFormat); + + addFormatToken('hmm', 0, 0, function () { + return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2); + }); + + addFormatToken('hmmss', 0, 0, function () { + return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2) + zeroFill(this.seconds(), 2); + }); + + addFormatToken('Hmm', 0, 0, function () { + return '' + this.hours() + zeroFill(this.minutes(), 2); + }); + + addFormatToken('Hmmss', 0, 0, function () { + return '' + this.hours() + zeroFill(this.minutes(), 2) + zeroFill(this.seconds(), 2); + }); + + function meridiem(token, lowercase) { + addFormatToken(token, 0, 0, function () { + return this.localeData().meridiem(this.hours(), this.minutes(), lowercase); + }); + } + + meridiem('a', true); + meridiem('A', false); + + // ALIASES + + addUnitAlias('hour', 'h'); + + // PARSING + + function matchMeridiem(isStrict, locale) { + return locale._meridiemParse; + } + + addRegexToken('a', matchMeridiem); + addRegexToken('A', matchMeridiem); + addRegexToken('H', match1to2); + addRegexToken('h', match1to2); + addRegexToken('HH', match1to2, match2); + addRegexToken('hh', match1to2, match2); + + addRegexToken('hmm', match3to4); + addRegexToken('hmmss', match5to6); + addRegexToken('Hmm', match3to4); + addRegexToken('Hmmss', match5to6); + + addParseToken(['H', 'HH'], HOUR); + addParseToken(['a', 'A'], function (input, array, config) { + config._isPm = config._locale.isPM(input); + config._meridiem = input; + }); + addParseToken(['h', 'hh'], function (input, array, config) { + array[HOUR] = toInt(input); + getParsingFlags(config).bigHour = true; + }); + addParseToken('hmm', function (input, array, config) { + var pos = input.length - 2; + array[HOUR] = toInt(input.substr(0, pos)); + array[MINUTE] = toInt(input.substr(pos)); + getParsingFlags(config).bigHour = true; + }); + addParseToken('hmmss', function (input, array, config) { + var pos1 = input.length - 4; + var pos2 = input.length - 2; + array[HOUR] = toInt(input.substr(0, pos1)); + array[MINUTE] = toInt(input.substr(pos1, 2)); + array[SECOND] = toInt(input.substr(pos2)); + getParsingFlags(config).bigHour = true; + }); + addParseToken('Hmm', function (input, array, config) { + var pos = input.length - 2; + array[HOUR] = toInt(input.substr(0, pos)); + array[MINUTE] = toInt(input.substr(pos)); + }); + addParseToken('Hmmss', function (input, array, config) { + var pos1 = input.length - 4; + var pos2 = input.length - 2; + array[HOUR] = toInt(input.substr(0, pos1)); + array[MINUTE] = toInt(input.substr(pos1, 2)); + array[SECOND] = toInt(input.substr(pos2)); + }); + + // LOCALES + + function localeIsPM(input) { + // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays + // Using charAt should be more compatible. + return (input + '').toLowerCase().charAt(0) === 'p'; + } + + var defaultLocaleMeridiemParse = /[ap]\.?m?\.?/i; + function localeMeridiem(hours, minutes, isLower) { + if (hours > 11) { + return isLower ? 'pm' : 'PM'; + } else { + return isLower ? 'am' : 'AM'; + } + } + + // MOMENTS + + // Setting the hour should keep the time, because the user explicitly + // specified which hour he wants. So trying to maintain the same hour (in + // a new timezone) makes sense. Adding/subtracting hours does not follow + // this rule. + var getSetHour = makeGetSet('Hours', true); + + // FORMATTING + + addFormatToken('m', ['mm', 2], 0, 'minute'); + + // ALIASES + + addUnitAlias('minute', 'm'); + + // PARSING + + addRegexToken('m', match1to2); + addRegexToken('mm', match1to2, match2); + addParseToken(['m', 'mm'], MINUTE); + + // MOMENTS + + var getSetMinute = makeGetSet('Minutes', false); + + // FORMATTING + + addFormatToken('s', ['ss', 2], 0, 'second'); + + // ALIASES + + addUnitAlias('second', 's'); + + // PARSING + + addRegexToken('s', match1to2); + addRegexToken('ss', match1to2, match2); + addParseToken(['s', 'ss'], SECOND); + + // MOMENTS + + var getSetSecond = makeGetSet('Seconds', false); + + // FORMATTING + + addFormatToken('S', 0, 0, function () { + return ~~(this.millisecond() / 100); + }); + + addFormatToken(0, ['SS', 2], 0, function () { + return ~~(this.millisecond() / 10); + }); + + addFormatToken(0, ['SSS', 3], 0, 'millisecond'); + addFormatToken(0, ['SSSS', 4], 0, function () { + return this.millisecond() * 10; + }); + addFormatToken(0, ['SSSSS', 5], 0, function () { + return this.millisecond() * 100; + }); + addFormatToken(0, ['SSSSSS', 6], 0, function () { + return this.millisecond() * 1000; + }); + addFormatToken(0, ['SSSSSSS', 7], 0, function () { + return this.millisecond() * 10000; + }); + addFormatToken(0, ['SSSSSSSS', 8], 0, function () { + return this.millisecond() * 100000; + }); + addFormatToken(0, ['SSSSSSSSS', 9], 0, function () { + return this.millisecond() * 1000000; + }); + + // ALIASES + + addUnitAlias('millisecond', 'ms'); + + // PARSING + + addRegexToken('S', match1to3, match1); + addRegexToken('SS', match1to3, match2); + addRegexToken('SSS', match1to3, match3); + + var token; + for (token = 'SSSS'; token.length <= 9; token += 'S') { + addRegexToken(token, matchUnsigned); + } + + function parseMs(input, array) { + array[MILLISECOND] = toInt(('0.' + input) * 1000); + } + + for (token = 'S'; token.length <= 9; token += 'S') { + addParseToken(token, parseMs); + } + // MOMENTS + + var getSetMillisecond = makeGetSet('Milliseconds', false); + + // FORMATTING + + addFormatToken('z', 0, 0, 'zoneAbbr'); + addFormatToken('zz', 0, 0, 'zoneName'); + + // MOMENTS + + function getZoneAbbr() { + return this._isUTC ? 'UTC' : ''; + } + + function getZoneName() { + return this._isUTC ? 'Coordinated Universal Time' : ''; + } + + var momentPrototype__proto = Moment.prototype; + + momentPrototype__proto.add = add_subtract__add; + momentPrototype__proto.calendar = moment_calendar__calendar; + momentPrototype__proto.clone = clone; + momentPrototype__proto.diff = diff; + momentPrototype__proto.endOf = endOf; + momentPrototype__proto.format = format; + momentPrototype__proto.from = from; + momentPrototype__proto.fromNow = fromNow; + momentPrototype__proto.to = to; + momentPrototype__proto.toNow = toNow; + momentPrototype__proto.get = getSet; + momentPrototype__proto.invalidAt = invalidAt; + momentPrototype__proto.isAfter = isAfter; + momentPrototype__proto.isBefore = isBefore; + momentPrototype__proto.isBetween = isBetween; + momentPrototype__proto.isSame = isSame; + momentPrototype__proto.isSameOrAfter = isSameOrAfter; + momentPrototype__proto.isSameOrBefore = isSameOrBefore; + momentPrototype__proto.isValid = moment_valid__isValid; + momentPrototype__proto.lang = lang; + momentPrototype__proto.locale = locale; + momentPrototype__proto.localeData = localeData; + momentPrototype__proto.max = prototypeMax; + momentPrototype__proto.min = prototypeMin; + momentPrototype__proto.parsingFlags = parsingFlags; + momentPrototype__proto.set = getSet; + momentPrototype__proto.startOf = startOf; + momentPrototype__proto.subtract = add_subtract__subtract; + momentPrototype__proto.toArray = toArray; + momentPrototype__proto.toObject = toObject; + momentPrototype__proto.toDate = toDate; + momentPrototype__proto.toISOString = moment_format__toISOString; + momentPrototype__proto.toJSON = toJSON; + momentPrototype__proto.toString = toString; + momentPrototype__proto.unix = unix; + momentPrototype__proto.valueOf = to_type__valueOf; + momentPrototype__proto.creationData = creationData; + + // Year + momentPrototype__proto.year = getSetYear; + momentPrototype__proto.isLeapYear = getIsLeapYear; + + // Week Year + momentPrototype__proto.weekYear = getSetWeekYear; + momentPrototype__proto.isoWeekYear = getSetISOWeekYear; + + // Quarter + momentPrototype__proto.quarter = momentPrototype__proto.quarters = getSetQuarter; + + // Month + momentPrototype__proto.month = getSetMonth; + momentPrototype__proto.daysInMonth = getDaysInMonth; + + // Week + momentPrototype__proto.week = momentPrototype__proto.weeks = getSetWeek; + momentPrototype__proto.isoWeek = momentPrototype__proto.isoWeeks = getSetISOWeek; + momentPrototype__proto.weeksInYear = getWeeksInYear; + momentPrototype__proto.isoWeeksInYear = getISOWeeksInYear; + + // Day + momentPrototype__proto.date = getSetDayOfMonth; + momentPrototype__proto.day = momentPrototype__proto.days = getSetDayOfWeek; + momentPrototype__proto.weekday = getSetLocaleDayOfWeek; + momentPrototype__proto.isoWeekday = getSetISODayOfWeek; + momentPrototype__proto.dayOfYear = getSetDayOfYear; + + // Hour + momentPrototype__proto.hour = momentPrototype__proto.hours = getSetHour; + + // Minute + momentPrototype__proto.minute = momentPrototype__proto.minutes = getSetMinute; + + // Second + momentPrototype__proto.second = momentPrototype__proto.seconds = getSetSecond; + + // Millisecond + momentPrototype__proto.millisecond = momentPrototype__proto.milliseconds = getSetMillisecond; + + // Offset + momentPrototype__proto.utcOffset = getSetOffset; + momentPrototype__proto.utc = setOffsetToUTC; + momentPrototype__proto.local = setOffsetToLocal; + momentPrototype__proto.parseZone = setOffsetToParsedOffset; + momentPrototype__proto.hasAlignedHourOffset = hasAlignedHourOffset; + momentPrototype__proto.isDST = isDaylightSavingTime; + momentPrototype__proto.isDSTShifted = isDaylightSavingTimeShifted; + momentPrototype__proto.isLocal = isLocal; + momentPrototype__proto.isUtcOffset = isUtcOffset; + momentPrototype__proto.isUtc = isUtc; + momentPrototype__proto.isUTC = isUtc; + + // Timezone + momentPrototype__proto.zoneAbbr = getZoneAbbr; + momentPrototype__proto.zoneName = getZoneName; + + // Deprecations + momentPrototype__proto.dates = deprecate( + 'dates accessor is deprecated. Use date instead.', + getSetDayOfMonth, + ); + momentPrototype__proto.months = deprecate( + 'months accessor is deprecated. Use month instead', + getSetMonth, + ); + momentPrototype__proto.years = deprecate( + 'years accessor is deprecated. Use year instead', + getSetYear, + ); + momentPrototype__proto.zone = deprecate( + 'moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779', + getSetZone, + ); + + var momentPrototype = momentPrototype__proto; + + function moment__createUnix(input) { + return local__createLocal(input * 1000); + } + + function moment__createInZone() { + return local__createLocal.apply(null, arguments).parseZone(); + } + + var defaultCalendar = { + sameDay: '[Today at] LT', + nextDay: '[Tomorrow at] LT', + nextWeek: 'dddd [at] LT', + lastDay: '[Yesterday at] LT', + lastWeek: '[Last] dddd [at] LT', + sameElse: 'L', + }; + + function locale_calendar__calendar(key, mom, now) { + var output = this._calendar[key]; + return isFunction(output) ? output.call(mom, now) : output; + } + + var defaultLongDateFormat = { + LTS: 'h:mm:ss A', + LT: 'h:mm A', + L: 'MM/DD/YYYY', + LL: 'MMMM D, YYYY', + LLL: 'MMMM D, YYYY h:mm A', + LLLL: 'dddd, MMMM D, YYYY h:mm A', + }; + + function longDateFormat(key) { + var format = this._longDateFormat[key], + formatUpper = this._longDateFormat[key.toUpperCase()]; + + if (format || !formatUpper) { + return format; + } + + this._longDateFormat[key] = formatUpper.replace(/MMMM|MM|DD|dddd/g, function (val) { + return val.slice(1); + }); + + return this._longDateFormat[key]; + } + + var defaultInvalidDate = 'Invalid date'; + + function invalidDate() { + return this._invalidDate; + } + + var defaultOrdinal = '%d'; + var defaultOrdinalParse = /\d{1,2}/; + + function ordinal(number) { + return this._ordinal.replace('%d', number); + } + + function preParsePostFormat(string) { + return string; + } + + var defaultRelativeTime = { + future: 'in %s', + past: '%s ago', + s: 'a few seconds', + m: 'a minute', + mm: '%d minutes', + h: 'an hour', + hh: '%d hours', + d: 'a day', + dd: '%d days', + M: 'a month', + MM: '%d months', + y: 'a year', + yy: '%d years', + }; + + function relative__relativeTime(number, withoutSuffix, string, isFuture) { + var output = this._relativeTime[string]; + return isFunction(output) + ? output(number, withoutSuffix, string, isFuture) + : output.replace(/%d/i, number); + } + + function pastFuture(diff, output) { + var format = this._relativeTime[diff > 0 ? 'future' : 'past']; + return isFunction(format) ? format(output) : format.replace(/%s/i, output); + } + + var prototype__proto = Locale.prototype; + + prototype__proto._calendar = defaultCalendar; + prototype__proto.calendar = locale_calendar__calendar; + prototype__proto._longDateFormat = defaultLongDateFormat; + prototype__proto.longDateFormat = longDateFormat; + prototype__proto._invalidDate = defaultInvalidDate; + prototype__proto.invalidDate = invalidDate; + prototype__proto._ordinal = defaultOrdinal; + prototype__proto.ordinal = ordinal; + prototype__proto._ordinalParse = defaultOrdinalParse; + prototype__proto.preparse = preParsePostFormat; + prototype__proto.postformat = preParsePostFormat; + prototype__proto._relativeTime = defaultRelativeTime; + prototype__proto.relativeTime = relative__relativeTime; + prototype__proto.pastFuture = pastFuture; + prototype__proto.set = locale_set__set; + + // Month + prototype__proto.months = localeMonths; + prototype__proto._months = defaultLocaleMonths; + prototype__proto.monthsShort = localeMonthsShort; + prototype__proto._monthsShort = defaultLocaleMonthsShort; + prototype__proto.monthsParse = localeMonthsParse; + prototype__proto._monthsRegex = defaultMonthsRegex; + prototype__proto.monthsRegex = monthsRegex; + prototype__proto._monthsShortRegex = defaultMonthsShortRegex; + prototype__proto.monthsShortRegex = monthsShortRegex; + + // Week + prototype__proto.week = localeWeek; + prototype__proto._week = defaultLocaleWeek; + prototype__proto.firstDayOfYear = localeFirstDayOfYear; + prototype__proto.firstDayOfWeek = localeFirstDayOfWeek; + + // Day of Week + prototype__proto.weekdays = localeWeekdays; + prototype__proto._weekdays = defaultLocaleWeekdays; + prototype__proto.weekdaysMin = localeWeekdaysMin; + prototype__proto._weekdaysMin = defaultLocaleWeekdaysMin; + prototype__proto.weekdaysShort = localeWeekdaysShort; + prototype__proto._weekdaysShort = defaultLocaleWeekdaysShort; + prototype__proto.weekdaysParse = localeWeekdaysParse; + + prototype__proto._weekdaysRegex = defaultWeekdaysRegex; + prototype__proto.weekdaysRegex = weekdaysRegex; + prototype__proto._weekdaysShortRegex = defaultWeekdaysShortRegex; + prototype__proto.weekdaysShortRegex = weekdaysShortRegex; + prototype__proto._weekdaysMinRegex = defaultWeekdaysMinRegex; + prototype__proto.weekdaysMinRegex = weekdaysMinRegex; + + // Hours + prototype__proto.isPM = localeIsPM; + prototype__proto._meridiemParse = defaultLocaleMeridiemParse; + prototype__proto.meridiem = localeMeridiem; + + function lists__get(format, index, field, setter) { + var locale = locale_locales__getLocale(); + var utc = create_utc__createUTC().set(setter, index); + return locale[field](utc, format); + } + + function listMonthsImpl(format, index, field) { + if (typeof format === 'number') { + index = format; + format = undefined; + } + + format = format || ''; + + if (index != null) { + return lists__get(format, index, field, 'month'); + } + + var i; + var out = []; + for (i = 0; i < 12; i++) { + out[i] = lists__get(format, i, field, 'month'); + } + return out; + } + + // () + // (5) + // (fmt, 5) + // (fmt) + // (true) + // (true, 5) + // (true, fmt, 5) + // (true, fmt) + function listWeekdaysImpl(localeSorted, format, index, field) { + if (typeof localeSorted === 'boolean') { + if (typeof format === 'number') { + index = format; + format = undefined; + } + + format = format || ''; + } else { + format = localeSorted; + index = format; + localeSorted = false; + + if (typeof format === 'number') { + index = format; + format = undefined; + } + + format = format || ''; + } + + var locale = locale_locales__getLocale(), + shift = localeSorted ? locale._week.dow : 0; + + if (index != null) { + return lists__get(format, (index + shift) % 7, field, 'day'); + } + + var i; + var out = []; + for (i = 0; i < 7; i++) { + out[i] = lists__get(format, (i + shift) % 7, field, 'day'); + } + return out; + } + + function lists__listMonths(format, index) { + return listMonthsImpl(format, index, 'months'); + } + + function lists__listMonthsShort(format, index) { + return listMonthsImpl(format, index, 'monthsShort'); + } + + function lists__listWeekdays(localeSorted, format, index) { + return listWeekdaysImpl(localeSorted, format, index, 'weekdays'); + } + + function lists__listWeekdaysShort(localeSorted, format, index) { + return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort'); + } + + function lists__listWeekdaysMin(localeSorted, format, index) { + return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin'); + } + + locale_locales__getSetGlobalLocale('en', { + ordinalParse: /\d{1,2}(th|st|nd|rd)/, + ordinal: function (number) { + var b = number % 10, + output = + toInt((number % 100) / 10) === 1 + ? 'th' + : b === 1 + ? 'st' + : b === 2 + ? 'nd' + : b === 3 + ? 'rd' + : 'th'; + return number + output; + }, + }); + + // Side effect imports + utils_hooks__hooks.lang = deprecate( + 'moment.lang is deprecated. Use moment.locale instead.', + locale_locales__getSetGlobalLocale, + ); + utils_hooks__hooks.langData = deprecate( + 'moment.langData is deprecated. Use moment.localeData instead.', + locale_locales__getLocale, + ); + + var mathAbs = Math.abs; + + function duration_abs__abs() { + var data = this._data; + + this._milliseconds = mathAbs(this._milliseconds); + this._days = mathAbs(this._days); + this._months = mathAbs(this._months); + + data.milliseconds = mathAbs(data.milliseconds); + data.seconds = mathAbs(data.seconds); + data.minutes = mathAbs(data.minutes); + data.hours = mathAbs(data.hours); + data.months = mathAbs(data.months); + data.years = mathAbs(data.years); + + return this; + } + + function duration_add_subtract__addSubtract(duration, input, value, direction) { + var other = create__createDuration(input, value); + + duration._milliseconds += direction * other._milliseconds; + duration._days += direction * other._days; + duration._months += direction * other._months; + + return duration._bubble(); + } + + // supports only 2.0-style add(1, 's') or add(duration) + function duration_add_subtract__add(input, value) { + return duration_add_subtract__addSubtract(this, input, value, 1); + } + + // supports only 2.0-style subtract(1, 's') or subtract(duration) + function duration_add_subtract__subtract(input, value) { + return duration_add_subtract__addSubtract(this, input, value, -1); + } + + function absCeil(number) { + if (number < 0) { + return Math.floor(number); + } else { + return Math.ceil(number); + } + } + + function bubble() { + var milliseconds = this._milliseconds; + var days = this._days; + var months = this._months; + var data = this._data; + var seconds, minutes, hours, years, monthsFromDays; + + // if we have a mix of positive and negative values, bubble down first + // check: https://github.com/moment/moment/issues/2166 + if ( + !( + (milliseconds >= 0 && days >= 0 && months >= 0) || + (milliseconds <= 0 && days <= 0 && months <= 0) + ) + ) { + milliseconds += absCeil(monthsToDays(months) + days) * 864e5; + days = 0; + months = 0; + } + + // The following code bubbles up values, see the tests for + // examples of what that means. + data.milliseconds = milliseconds % 1000; + + seconds = absFloor(milliseconds / 1000); + data.seconds = seconds % 60; + + minutes = absFloor(seconds / 60); + data.minutes = minutes % 60; + + hours = absFloor(minutes / 60); + data.hours = hours % 24; + + days += absFloor(hours / 24); + + // convert days to months + monthsFromDays = absFloor(daysToMonths(days)); + months += monthsFromDays; + days -= absCeil(monthsToDays(monthsFromDays)); + + // 12 months -> 1 year + years = absFloor(months / 12); + months %= 12; + + data.days = days; + data.months = months; + data.years = years; + + return this; + } + + function daysToMonths(days) { + // 400 years have 146097 days (taking into account leap year rules) + // 400 years have 12 months === 4800 + return (days * 4800) / 146097; + } + + function monthsToDays(months) { + // the reverse of daysToMonths + return (months * 146097) / 4800; + } + + function as(units) { + var days; + var months; + var milliseconds = this._milliseconds; + + units = normalizeUnits(units); + + if (units === 'month' || units === 'year') { + days = this._days + milliseconds / 864e5; + months = this._months + daysToMonths(days); + return units === 'month' ? months : months / 12; + } else { + // handle milliseconds separately because of floating point math errors (issue #1867) + days = this._days + Math.round(monthsToDays(this._months)); + switch (units) { + case 'week': + return days / 7 + milliseconds / 6048e5; + case 'day': + return days + milliseconds / 864e5; + case 'hour': + return days * 24 + milliseconds / 36e5; + case 'minute': + return days * 1440 + milliseconds / 6e4; + case 'second': + return days * 86400 + milliseconds / 1000; + // Math.floor prevents floating point math errors here + case 'millisecond': + return Math.floor(days * 864e5) + milliseconds; + default: + throw new Error('Unknown unit ' + units); + } + } + } + + // TODO: Use this.as('ms')? + function duration_as__valueOf() { + return ( + this._milliseconds + + this._days * 864e5 + + (this._months % 12) * 2592e6 + + toInt(this._months / 12) * 31536e6 + ); + } + + function makeAs(alias) { + return function () { + return this.as(alias); + }; + } + + var asMilliseconds = makeAs('ms'); + var asSeconds = makeAs('s'); + var asMinutes = makeAs('m'); + var asHours = makeAs('h'); + var asDays = makeAs('d'); + var asWeeks = makeAs('w'); + var asMonths = makeAs('M'); + var asYears = makeAs('y'); + + function duration_get__get(units) { + units = normalizeUnits(units); + return this[units + 's'](); + } + + function makeGetter(name) { + return function () { + return this._data[name]; + }; + } + + var milliseconds = makeGetter('milliseconds'); + var seconds = makeGetter('seconds'); + var minutes = makeGetter('minutes'); + var hours = makeGetter('hours'); + var days = makeGetter('days'); + var months = makeGetter('months'); + var years = makeGetter('years'); + + function weeks() { + return absFloor(this.days() / 7); + } + + var round = Math.round; + var thresholds = { + s: 45, // seconds to minute + m: 45, // minutes to hour + h: 22, // hours to day + d: 26, // days to month + M: 11, // months to year + }; + + // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize + function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) { + return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture); + } + + function duration_humanize__relativeTime(posNegDuration, withoutSuffix, locale) { + var duration = create__createDuration(posNegDuration).abs(); + var seconds = round(duration.as('s')); + var minutes = round(duration.as('m')); + var hours = round(duration.as('h')); + var days = round(duration.as('d')); + var months = round(duration.as('M')); + var years = round(duration.as('y')); + + var a = (seconds < thresholds.s && ['s', seconds]) || + (minutes <= 1 && ['m']) || + (minutes < thresholds.m && ['mm', minutes]) || + (hours <= 1 && ['h']) || + (hours < thresholds.h && ['hh', hours]) || + (days <= 1 && ['d']) || + (days < thresholds.d && ['dd', days]) || + (months <= 1 && ['M']) || + (months < thresholds.M && ['MM', months]) || + (years <= 1 && ['y']) || ['yy', years]; + + a[2] = withoutSuffix; + a[3] = +posNegDuration > 0; + a[4] = locale; + return substituteTimeAgo.apply(null, a); + } + + // This function allows you to set a threshold for relative time strings + function duration_humanize__getSetRelativeTimeThreshold(threshold, limit) { + if (thresholds[threshold] === undefined) { + return false; + } + if (limit === undefined) { + return thresholds[threshold]; + } + thresholds[threshold] = limit; + return true; + } + + function humanize(withSuffix) { + var locale = this.localeData(); + var output = duration_humanize__relativeTime(this, !withSuffix, locale); + + if (withSuffix) { + output = locale.pastFuture(+this, output); + } + + return locale.postformat(output); + } + + var iso_string__abs = Math.abs; + + function iso_string__toISOString() { + // for ISO strings we do not use the normal bubbling rules: + // * milliseconds bubble up until they become hours + // * days do not bubble at all + // * months bubble up until they become years + // This is because there is no context-free conversion between hours and days + // (think of clock changes) + // and also not between days and months (28-31 days per month) + var seconds = iso_string__abs(this._milliseconds) / 1000; + var days = iso_string__abs(this._days); + var months = iso_string__abs(this._months); + var minutes, hours, years; + + // 3600 seconds -> 60 minutes -> 1 hour + minutes = absFloor(seconds / 60); + hours = absFloor(minutes / 60); + seconds %= 60; + minutes %= 60; + + // 12 months -> 1 year + years = absFloor(months / 12); + months %= 12; + + // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js + var Y = years; + var M = months; + var D = days; + var h = hours; + var m = minutes; + var s = seconds; + var total = this.asSeconds(); + + if (!total) { + // this is the same as C#'s (Noda) and python (isodate)... + // but not other JS (goog.date) + return 'P0D'; + } + + return ( + (total < 0 ? '-' : '') + + 'P' + + (Y ? Y + 'Y' : '') + + (M ? M + 'M' : '') + + (D ? D + 'D' : '') + + (h || m || s ? 'T' : '') + + (h ? h + 'H' : '') + + (m ? m + 'M' : '') + + (s ? s + 'S' : '') + ); + } + + var duration_prototype__proto = Duration.prototype; + + duration_prototype__proto.abs = duration_abs__abs; + duration_prototype__proto.add = duration_add_subtract__add; + duration_prototype__proto.subtract = duration_add_subtract__subtract; + duration_prototype__proto.as = as; + duration_prototype__proto.asMilliseconds = asMilliseconds; + duration_prototype__proto.asSeconds = asSeconds; + duration_prototype__proto.asMinutes = asMinutes; + duration_prototype__proto.asHours = asHours; + duration_prototype__proto.asDays = asDays; + duration_prototype__proto.asWeeks = asWeeks; + duration_prototype__proto.asMonths = asMonths; + duration_prototype__proto.asYears = asYears; + duration_prototype__proto.valueOf = duration_as__valueOf; + duration_prototype__proto._bubble = bubble; + duration_prototype__proto.get = duration_get__get; + duration_prototype__proto.milliseconds = milliseconds; + duration_prototype__proto.seconds = seconds; + duration_prototype__proto.minutes = minutes; + duration_prototype__proto.hours = hours; + duration_prototype__proto.days = days; + duration_prototype__proto.weeks = weeks; + duration_prototype__proto.months = months; + duration_prototype__proto.years = years; + duration_prototype__proto.humanize = humanize; + duration_prototype__proto.toISOString = iso_string__toISOString; + duration_prototype__proto.toString = iso_string__toISOString; + duration_prototype__proto.toJSON = iso_string__toISOString; + duration_prototype__proto.locale = locale; + duration_prototype__proto.localeData = localeData; + + // Deprecations + duration_prototype__proto.toIsoString = deprecate( + 'toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)', + iso_string__toISOString, + ); + duration_prototype__proto.lang = lang; + + // Side effect imports + + // FORMATTING + + addFormatToken('X', 0, 0, 'unix'); + addFormatToken('x', 0, 0, 'valueOf'); + + // PARSING + + addRegexToken('x', matchSigned); + addRegexToken('X', matchTimestamp); + addParseToken('X', function (input, array, config) { + config._d = new Date(parseFloat(input, 10) * 1000); + }); + addParseToken('x', function (input, array, config) { + config._d = new Date(toInt(input)); + }); + + // Side effect imports + + utils_hooks__hooks.version = '2.13.0'; + + setHookCallback(local__createLocal); + + utils_hooks__hooks.fn = momentPrototype; + utils_hooks__hooks.min = min; + utils_hooks__hooks.max = max; + utils_hooks__hooks.now = now; + utils_hooks__hooks.utc = create_utc__createUTC; + utils_hooks__hooks.unix = moment__createUnix; + utils_hooks__hooks.months = lists__listMonths; + utils_hooks__hooks.isDate = isDate; + utils_hooks__hooks.locale = locale_locales__getSetGlobalLocale; + utils_hooks__hooks.invalid = valid__createInvalid; + utils_hooks__hooks.duration = create__createDuration; + utils_hooks__hooks.isMoment = isMoment; + utils_hooks__hooks.weekdays = lists__listWeekdays; + utils_hooks__hooks.parseZone = moment__createInZone; + utils_hooks__hooks.localeData = locale_locales__getLocale; + utils_hooks__hooks.isDuration = isDuration; + utils_hooks__hooks.monthsShort = lists__listMonthsShort; + utils_hooks__hooks.weekdaysMin = lists__listWeekdaysMin; + utils_hooks__hooks.defineLocale = defineLocale; + utils_hooks__hooks.updateLocale = updateLocale; + utils_hooks__hooks.locales = locale_locales__listLocales; + utils_hooks__hooks.weekdaysShort = lists__listWeekdaysShort; + utils_hooks__hooks.normalizeUnits = normalizeUnits; + utils_hooks__hooks.relativeTimeThreshold = duration_humanize__getSetRelativeTimeThreshold; + utils_hooks__hooks.prototype = momentPrototype; + + var _moment = utils_hooks__hooks; + + return _moment; + }); + /* WEBPACK VAR INJECTION */ + }).call(exports, __webpack_require__(229)(module)); + + /***/ + }, + /* 123 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + var _prodInvariant = __webpack_require__(7); + + var invariant = __webpack_require__(3); + + /** + * Injectable ordering of event plugins. + */ + var eventPluginOrder = null; + + /** + * Injectable mapping from names to event plugin modules. + */ + var namesToPlugins = {}; + + /** + * Recomputes the plugin list using the injected plugins and plugin ordering. + * + * @private + */ + function recomputePluginOrdering() { + if (!eventPluginOrder) { + // Wait until an `eventPluginOrder` is injected. + return; + } + for (var pluginName in namesToPlugins) { + var pluginModule = namesToPlugins[pluginName]; + var pluginIndex = eventPluginOrder.indexOf(pluginName); + !(pluginIndex > -1) + ? true + ? invariant( + false, + 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', + pluginName, + ) + : _prodInvariant('96', pluginName) + : void 0; + if (EventPluginRegistry.plugins[pluginIndex]) { + continue; + } + !pluginModule.extractEvents + ? true + ? invariant( + false, + 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', + pluginName, + ) + : _prodInvariant('97', pluginName) + : void 0; + EventPluginRegistry.plugins[pluginIndex] = pluginModule; + var publishedEvents = pluginModule.eventTypes; + for (var eventName in publishedEvents) { + !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) + ? true + ? invariant( + false, + 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', + eventName, + pluginName, + ) + : _prodInvariant('98', eventName, pluginName) + : void 0; + } + } + } + + /** + * Publishes an event so that it can be dispatched by the supplied plugin. + * + * @param {object} dispatchConfig Dispatch configuration for the event. + * @param {object} PluginModule Plugin publishing the event. + * @return {boolean} True if the event was successfully published. + * @private + */ + function publishEventForPlugin(dispatchConfig, pluginModule, eventName) { + !!EventPluginRegistry.eventNameDispatchConfigs.hasOwnProperty(eventName) + ? true + ? invariant( + false, + 'EventPluginHub: More than one plugin attempted to publish the same event name, `%s`.', + eventName, + ) + : _prodInvariant('99', eventName) + : void 0; + EventPluginRegistry.eventNameDispatchConfigs[eventName] = dispatchConfig; + + var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames; + if (phasedRegistrationNames) { + for (var phaseName in phasedRegistrationNames) { + if (phasedRegistrationNames.hasOwnProperty(phaseName)) { + var phasedRegistrationName = phasedRegistrationNames[phaseName]; + publishRegistrationName(phasedRegistrationName, pluginModule, eventName); + } + } + return true; + } else if (dispatchConfig.registrationName) { + publishRegistrationName(dispatchConfig.registrationName, pluginModule, eventName); + return true; + } + return false; + } + + /** + * Publishes a registration name that is used to identify dispatched events and + * can be used with `EventPluginHub.putListener` to register listeners. + * + * @param {string} registrationName Registration name to add. + * @param {object} PluginModule Plugin publishing the event. + * @private + */ + function publishRegistrationName(registrationName, pluginModule, eventName) { + !!EventPluginRegistry.registrationNameModules[registrationName] + ? true + ? invariant( + false, + 'EventPluginHub: More than one plugin attempted to publish the same registration name, `%s`.', + registrationName, + ) + : _prodInvariant('100', registrationName) + : void 0; + EventPluginRegistry.registrationNameModules[registrationName] = pluginModule; + EventPluginRegistry.registrationNameDependencies[registrationName] = + pluginModule.eventTypes[eventName].dependencies; + + if (true) { + var lowerCasedName = registrationName.toLowerCase(); + EventPluginRegistry.possibleRegistrationNames[lowerCasedName] = registrationName; + + if (registrationName === 'onDoubleClick') { + EventPluginRegistry.possibleRegistrationNames.ondblclick = registrationName; + } + } + } + + /** + * Registers plugins so that they can extract and dispatch events. + * + * @see {EventPluginHub} + */ + var EventPluginRegistry = { + /** + * Ordered list of injected plugins. + */ + plugins: [], + + /** + * Mapping from event name to dispatch config + */ + eventNameDispatchConfigs: {}, + + /** + * Mapping from registration name to plugin module + */ + registrationNameModules: {}, + + /** + * Mapping from registration name to event name + */ + registrationNameDependencies: {}, + + /** + * Mapping from lowercase registration names to the properly cased version, + * used to warn in the case of missing event handlers. Available + * only in __DEV__. + * @type {Object} + */ + possibleRegistrationNames: true ? {} : null, + // Trust the developer to only use possibleRegistrationNames in __DEV__ + + /** + * Injects an ordering of plugins (by plugin name). This allows the ordering + * to be decoupled from injection of the actual plugins so that ordering is + * always deterministic regardless of packaging, on-the-fly injection, etc. + * + * @param {array} InjectedEventPluginOrder + * @internal + * @see {EventPluginHub.injection.injectEventPluginOrder} + */ + injectEventPluginOrder: function (injectedEventPluginOrder) { + !!eventPluginOrder + ? true + ? invariant( + false, + 'EventPluginRegistry: Cannot inject event plugin ordering more than once. You are likely trying to load more than one copy of React.', + ) + : _prodInvariant('101') + : void 0; + // Clone the ordering so it cannot be dynamically mutated. + eventPluginOrder = Array.prototype.slice.call(injectedEventPluginOrder); + recomputePluginOrdering(); + }, + + /** + * Injects plugins to be used by `EventPluginHub`. The plugin names must be + * in the ordering injected by `injectEventPluginOrder`. + * + * Plugins can be injected as part of page initialization or on-the-fly. + * + * @param {object} injectedNamesToPlugins Map from names to plugin modules. + * @internal + * @see {EventPluginHub.injection.injectEventPluginsByName} + */ + injectEventPluginsByName: function (injectedNamesToPlugins) { + var isOrderingDirty = false; + for (var pluginName in injectedNamesToPlugins) { + if (!injectedNamesToPlugins.hasOwnProperty(pluginName)) { + continue; + } + var pluginModule = injectedNamesToPlugins[pluginName]; + if (!namesToPlugins.hasOwnProperty(pluginName) || namesToPlugins[pluginName] !== pluginModule) { + !!namesToPlugins[pluginName] + ? true + ? invariant( + false, + 'EventPluginRegistry: Cannot inject two different event plugins using the same name, `%s`.', + pluginName, + ) + : _prodInvariant('102', pluginName) + : void 0; + namesToPlugins[pluginName] = pluginModule; + isOrderingDirty = true; + } + } + if (isOrderingDirty) { + recomputePluginOrdering(); + } + }, + + /** + * Looks up the plugin for the supplied event. + * + * @param {object} event A synthetic event. + * @return {?object} The plugin that created the supplied event. + * @internal + */ + getPluginModuleForEvent: function (event) { + var dispatchConfig = event.dispatchConfig; + if (dispatchConfig.registrationName) { + return EventPluginRegistry.registrationNameModules[dispatchConfig.registrationName] || null; + } + if (dispatchConfig.phasedRegistrationNames !== undefined) { + // pulling phasedRegistrationNames out of dispatchConfig helps Flow see + // that it is not undefined. + var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames; + + for (var phase in phasedRegistrationNames) { + if (!phasedRegistrationNames.hasOwnProperty(phase)) { + continue; + } + var pluginModule = EventPluginRegistry.registrationNameModules[phasedRegistrationNames[phase]]; + if (pluginModule) { + return pluginModule; + } + } + } + return null; + }, + + /** + * Exposed for unit testing. + * @private + */ + _resetEventPlugins: function () { + eventPluginOrder = null; + for (var pluginName in namesToPlugins) { + if (namesToPlugins.hasOwnProperty(pluginName)) { + delete namesToPlugins[pluginName]; + } + } + EventPluginRegistry.plugins.length = 0; + + var eventNameDispatchConfigs = EventPluginRegistry.eventNameDispatchConfigs; + for (var eventName in eventNameDispatchConfigs) { + if (eventNameDispatchConfigs.hasOwnProperty(eventName)) { + delete eventNameDispatchConfigs[eventName]; + } + } + + var registrationNameModules = EventPluginRegistry.registrationNameModules; + for (var registrationName in registrationNameModules) { + if (registrationNameModules.hasOwnProperty(registrationName)) { + delete registrationNameModules[registrationName]; + } + } + + if (true) { + var possibleRegistrationNames = EventPluginRegistry.possibleRegistrationNames; + for (var lowerCasedName in possibleRegistrationNames) { + if (possibleRegistrationNames.hasOwnProperty(lowerCasedName)) { + delete possibleRegistrationNames[lowerCasedName]; + } + } + } + }, + }; + + module.exports = EventPluginRegistry; + + /***/ + }, + /* 124 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var _assign = __webpack_require__(9); + + var EventPluginRegistry = __webpack_require__(123); + var ReactEventEmitterMixin = __webpack_require__(776); + var ViewportMetrics = __webpack_require__(333); + + var getVendorPrefixedEventName = __webpack_require__(339); + var isEventSupported = __webpack_require__(215); + + /** + * Summary of `ReactBrowserEventEmitter` event handling: + * + * - Top-level delegation is used to trap most native browser events. This + * may only occur in the main thread and is the responsibility of + * ReactEventListener, which is injected and can therefore support pluggable + * event sources. This is the only work that occurs in the main thread. + * + * - We normalize and de-duplicate events to account for browser quirks. This + * may be done in the worker thread. + * + * - Forward these native events (with the associated top-level type used to + * trap it) to `EventPluginHub`, which in turn will ask plugins if they want + * to extract any synthetic events. + * + * - The `EventPluginHub` will then process each event by annotating them with + * "dispatches", a sequence of listeners and IDs that care about that event. + * + * - The `EventPluginHub` then dispatches the events. + * + * Overview of React and the event system: + * + * +------------+ . + * | DOM | . + * +------------+ . + * | . + * v . + * +------------+ . + * | ReactEvent | . + * | Listener | . + * +------------+ . +-----------+ + * | . +--------+|SimpleEvent| + * | . | |Plugin | + * +-----|------+ . v +-----------+ + * | | | . +--------------+ +------------+ + * | +-----------.--->|EventPluginHub| | Event | + * | | . | | +-----------+ | Propagators| + * | ReactEvent | . | | |TapEvent | |------------| + * | Emitter | . | |<---+|Plugin | |other plugin| + * | | . | | +-----------+ | utilities | + * | +-----------.--->| | +------------+ + * | | | . +--------------+ + * +-----|------+ . ^ +-----------+ + * | . | |Enter/Leave| + * + . +-------+|Plugin | + * +-------------+ . +-----------+ + * | application | . + * |-------------| . + * | | . + * | | . + * +-------------+ . + * . + * React Core . General Purpose Event Plugin System + */ + + var hasEventPageXY; + var alreadyListeningTo = {}; + var isMonitoringScrollValue = false; + var reactTopListenersCounter = 0; + + // For events like 'submit' which don't consistently bubble (which we trap at a + // lower node than `document`), binding at `document` would cause duplicate + // events so we don't include them here + var topEventMapping = { + topAbort: 'abort', + topAnimationEnd: getVendorPrefixedEventName('animationend') || 'animationend', + topAnimationIteration: getVendorPrefixedEventName('animationiteration') || 'animationiteration', + topAnimationStart: getVendorPrefixedEventName('animationstart') || 'animationstart', + topBlur: 'blur', + topCanPlay: 'canplay', + topCanPlayThrough: 'canplaythrough', + topChange: 'change', + topClick: 'click', + topCompositionEnd: 'compositionend', + topCompositionStart: 'compositionstart', + topCompositionUpdate: 'compositionupdate', + topContextMenu: 'contextmenu', + topCopy: 'copy', + topCut: 'cut', + topDoubleClick: 'dblclick', + topDrag: 'drag', + topDragEnd: 'dragend', + topDragEnter: 'dragenter', + topDragExit: 'dragexit', + topDragLeave: 'dragleave', + topDragOver: 'dragover', + topDragStart: 'dragstart', + topDrop: 'drop', + topDurationChange: 'durationchange', + topEmptied: 'emptied', + topEncrypted: 'encrypted', + topEnded: 'ended', + topError: 'error', + topFocus: 'focus', + topInput: 'input', + topKeyDown: 'keydown', + topKeyPress: 'keypress', + topKeyUp: 'keyup', + topLoadedData: 'loadeddata', + topLoadedMetadata: 'loadedmetadata', + topLoadStart: 'loadstart', + topMouseDown: 'mousedown', + topMouseMove: 'mousemove', + topMouseOut: 'mouseout', + topMouseOver: 'mouseover', + topMouseUp: 'mouseup', + topPaste: 'paste', + topPause: 'pause', + topPlay: 'play', + topPlaying: 'playing', + topProgress: 'progress', + topRateChange: 'ratechange', + topScroll: 'scroll', + topSeeked: 'seeked', + topSeeking: 'seeking', + topSelectionChange: 'selectionchange', + topStalled: 'stalled', + topSuspend: 'suspend', + topTextInput: 'textInput', + topTimeUpdate: 'timeupdate', + topTouchCancel: 'touchcancel', + topTouchEnd: 'touchend', + topTouchMove: 'touchmove', + topTouchStart: 'touchstart', + topTransitionEnd: getVendorPrefixedEventName('transitionend') || 'transitionend', + topVolumeChange: 'volumechange', + topWaiting: 'waiting', + topWheel: 'wheel', + }; + + /** + * To ensure no conflicts with other potential React instances on the page + */ + var topListenersIDKey = '_reactListenersID' + String(Math.random()).slice(2); + + function getListeningForDocument(mountAt) { + // In IE8, `mountAt` is a host object and doesn't have `hasOwnProperty` + // directly. + if (!Object.prototype.hasOwnProperty.call(mountAt, topListenersIDKey)) { + mountAt[topListenersIDKey] = reactTopListenersCounter++; + alreadyListeningTo[mountAt[topListenersIDKey]] = {}; + } + return alreadyListeningTo[mountAt[topListenersIDKey]]; + } + + /** + * `ReactBrowserEventEmitter` is used to attach top-level event listeners. For + * example: + * + * EventPluginHub.putListener('myID', 'onClick', myFunction); + * + * This would allocate a "registration" of `('onClick', myFunction)` on 'myID'. + * + * @internal + */ + var ReactBrowserEventEmitter = _assign({}, ReactEventEmitterMixin, { + /** + * Injectable event backend + */ + ReactEventListener: null, + + injection: { + /** + * @param {object} ReactEventListener + */ + injectReactEventListener: function (ReactEventListener) { + ReactEventListener.setHandleTopLevel(ReactBrowserEventEmitter.handleTopLevel); + ReactBrowserEventEmitter.ReactEventListener = ReactEventListener; + }, + }, + + /** + * Sets whether or not any created callbacks should be enabled. + * + * @param {boolean} enabled True if callbacks should be enabled. + */ + setEnabled: function (enabled) { + if (ReactBrowserEventEmitter.ReactEventListener) { + ReactBrowserEventEmitter.ReactEventListener.setEnabled(enabled); + } + }, + + /** + * @return {boolean} True if callbacks are enabled. + */ + isEnabled: function () { + return !!( + ReactBrowserEventEmitter.ReactEventListener && + ReactBrowserEventEmitter.ReactEventListener.isEnabled() + ); + }, + + /** + * We listen for bubbled touch events on the document object. + * + * Firefox v8.01 (and possibly others) exhibited strange behavior when + * mounting `onmousemove` events at some node that was not the document + * element. The symptoms were that if your mouse is not moving over something + * contained within that mount point (for example on the background) the + * top-level listeners for `onmousemove` won't be called. However, if you + * register the `mousemove` on the document object, then it will of course + * catch all `mousemove`s. This along with iOS quirks, justifies restricting + * top-level listeners to the document object only, at least for these + * movement types of events and possibly all events. + * + * @see http://www.quirksmode.org/blog/archives/2010/09/click_event_del.html + * + * Also, `keyup`/`keypress`/`keydown` do not bubble to the window on IE, but + * they bubble to document. + * + * @param {string} registrationName Name of listener (e.g. `onClick`). + * @param {object} contentDocumentHandle Document which owns the container + */ + listenTo: function (registrationName, contentDocumentHandle) { + var mountAt = contentDocumentHandle; + var isListening = getListeningForDocument(mountAt); + var dependencies = EventPluginRegistry.registrationNameDependencies[registrationName]; + + for (var i = 0; i < dependencies.length; i++) { + var dependency = dependencies[i]; + if (!(isListening.hasOwnProperty(dependency) && isListening[dependency])) { + if (dependency === 'topWheel') { + if (isEventSupported('wheel')) { + ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topWheel', 'wheel', mountAt); + } else if (isEventSupported('mousewheel')) { + ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent( + 'topWheel', + 'mousewheel', + mountAt, + ); + } else { + // Firefox needs to capture a different mouse scroll event. + // @see http://www.quirksmode.org/dom/events/tests/scroll.html + ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent( + 'topWheel', + 'DOMMouseScroll', + mountAt, + ); + } + } else if (dependency === 'topScroll') { + if (isEventSupported('scroll', true)) { + ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent( + 'topScroll', + 'scroll', + mountAt, + ); + } else { + ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent( + 'topScroll', + 'scroll', + ReactBrowserEventEmitter.ReactEventListener.WINDOW_HANDLE, + ); + } + } else if (dependency === 'topFocus' || dependency === 'topBlur') { + if (isEventSupported('focus', true)) { + ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent('topFocus', 'focus', mountAt); + ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent('topBlur', 'blur', mountAt); + } else if (isEventSupported('focusin')) { + // IE has `focusin` and `focusout` events which bubble. + // @see http://www.quirksmode.org/blog/archives/2008/04/delegating_the.html + ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent( + 'topFocus', + 'focusin', + mountAt, + ); + ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent( + 'topBlur', + 'focusout', + mountAt, + ); + } + + // to make sure blur and focus event listeners are only attached once + isListening.topBlur = true; + isListening.topFocus = true; + } else if (topEventMapping.hasOwnProperty(dependency)) { + ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent( + dependency, + topEventMapping[dependency], + mountAt, + ); + } + + isListening[dependency] = true; + } + } + }, + + trapBubbledEvent: function (topLevelType, handlerBaseName, handle) { + return ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent( + topLevelType, + handlerBaseName, + handle, + ); + }, + + trapCapturedEvent: function (topLevelType, handlerBaseName, handle) { + return ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent( + topLevelType, + handlerBaseName, + handle, + ); + }, + + /** + * Protect against document.createEvent() returning null + * Some popup blocker extensions appear to do this: + * https://github.com/facebook/react/issues/6887 + */ + supportsEventPageXY: function () { + if (!document.createEvent) { + return false; + } + var ev = document.createEvent('MouseEvent'); + return ev != null && 'pageX' in ev; + }, + + /** + * Listens to window scroll and resize events. We cache scroll values so that + * application code can access them without triggering reflows. + * + * ViewportMetrics is only used by SyntheticMouse/TouchEvent and only when + * pageX/pageY isn't supported (legacy browsers). + * + * NOTE: Scroll events do not bubble. + * + * @see http://www.quirksmode.org/dom/events/scroll.html + */ + ensureScrollValueMonitoring: function () { + if (hasEventPageXY === undefined) { + hasEventPageXY = ReactBrowserEventEmitter.supportsEventPageXY(); + } + if (!hasEventPageXY && !isMonitoringScrollValue) { + var refresh = ViewportMetrics.refreshScrollValues; + ReactBrowserEventEmitter.ReactEventListener.monitorScrollValue(refresh); + isMonitoringScrollValue = true; + } + }, + }); + + module.exports = ReactBrowserEventEmitter; + + /***/ + }, + /* 125 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var SyntheticEvent = __webpack_require__(51); + + var getEventTarget = __webpack_require__(213); + + /** + * @interface UIEvent + * @see http://www.w3.org/TR/DOM-Level-3-Events/ + */ + var UIEventInterface = { + view: function (event) { + if (event.view) { + return event.view; + } + + var target = getEventTarget(event); + if (target.window === target) { + // target is a window object + return target; + } + + var doc = target.ownerDocument; + // TODO: Figure out why `ownerDocument` is sometimes undefined in IE8. + if (doc) { + return doc.defaultView || doc.parentWindow; + } else { + return window; + } + }, + detail: function (event) { + return event.detail || 0; + }, + }; + + /** + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @extends {SyntheticEvent} + */ + function SyntheticUIEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); + } + + SyntheticEvent.augmentClass(SyntheticUIEvent, UIEventInterface); + + module.exports = SyntheticUIEvent; + + /***/ + }, + /* 126 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(52); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + /* harmony export (immutable) */ __webpack_exports__['c'] = falsy; + /* unused harmony export history */ + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'a', function () { + return component; + }); + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'b', function () { + return components; + }); + /* unused harmony export route */ + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'd', function () { + return routes; + }); + + function falsy(props, propName, componentName) { + if (props[propName]) + return new Error('<' + componentName + '> should not have a "' + propName + '" prop'); + } + + var history = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0_prop_types__['shape'])({ + listen: __WEBPACK_IMPORTED_MODULE_0_prop_types__['func'].isRequired, + push: __WEBPACK_IMPORTED_MODULE_0_prop_types__['func'].isRequired, + replace: __WEBPACK_IMPORTED_MODULE_0_prop_types__['func'].isRequired, + go: __WEBPACK_IMPORTED_MODULE_0_prop_types__['func'].isRequired, + goBack: __WEBPACK_IMPORTED_MODULE_0_prop_types__['func'].isRequired, + goForward: __WEBPACK_IMPORTED_MODULE_0_prop_types__['func'].isRequired, + }); + + var component = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0_prop_types__['oneOfType'])([ + __WEBPACK_IMPORTED_MODULE_0_prop_types__['func'], + __WEBPACK_IMPORTED_MODULE_0_prop_types__['string'], + ]); + var components = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0_prop_types__['oneOfType'])([ + component, + __WEBPACK_IMPORTED_MODULE_0_prop_types__['object'], + ]); + var route = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0_prop_types__['oneOfType'])([ + __WEBPACK_IMPORTED_MODULE_0_prop_types__['object'], + __WEBPACK_IMPORTED_MODULE_0_prop_types__['element'], + ]); + var routes = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0_prop_types__['oneOfType'])([ + route, + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0_prop_types__['arrayOf'])(route), + ]); + + /***/ + }, + /* 127 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_app_constants_SharedConstants__ = + __webpack_require__(110); + /* harmony export (immutable) */ __webpack_exports__['a'] = bootstrapPostsPageData; + /* harmony export (immutable) */ __webpack_exports__['b'] = bootstrapPostPageData; + /* unused harmony export enterPendingPostPageDataState */ + /* unused harmony export succeedFetchPostPageDataState */ + /* unused harmony export failFetchPostPageDataState */ + /* harmony export (immutable) */ __webpack_exports__['g'] = loadPostPageData; + /* harmony export (immutable) */ __webpack_exports__['d'] = bootstrapAuthorsPageData; + /* unused harmony export enterPendingAuthorsPageDataState */ + /* unused harmony export succeedFetchAuthorsPageDataState */ + /* unused harmony export failFetchAuthorsPageDataState */ + /* harmony export (immutable) */ __webpack_exports__['f'] = loadAuthorsPageData; + /* harmony export (immutable) */ __webpack_exports__['c'] = bootstrapAuthorPageData; + /* unused harmony export enterPendingAuthorPageDataState */ + /* unused harmony export succeedFetchAuthorPageDataState */ + /* unused harmony export failFetchAuthorPageDataState */ + /* harmony export (immutable) */ __webpack_exports__['e'] = loadAuthorPageData; + + /** + * + */ + function bootstrapPostsPageData(pageData, paginationKey) { + return { + type: __WEBPACK_IMPORTED_MODULE_0_app_constants_SharedConstants__[ + 'a' /* BOOTSTRAP_POSTS_PAGE_DATA */ + ], + pageData: pageData, + paginationKey: paginationKey, + }; + } + + /** + * + */ + function bootstrapPostPageData(pageData, paginationKey) { + return { + type: __WEBPACK_IMPORTED_MODULE_0_app_constants_SharedConstants__[ + 'b' /* BOOTSTRAP_POST_PAGE_DATA */ + ], + pageData: pageData, + paginationKey: paginationKey, + }; + } + + /** + * + */ + function enterPendingPostPageDataState() { + return { + type: __WEBPACK_IMPORTED_MODULE_0_app_constants_SharedConstants__[ + 'c' /* ENTER_PENDING_POST_PAGE_DATA_STATE */ + ], + }; + } + + /** + * + */ + function succeedFetchPostPageDataState(pageData, paginationKey) { + return { + type: __WEBPACK_IMPORTED_MODULE_0_app_constants_SharedConstants__[ + 'd' /* SUCCEED_FETCH_POST_PAGE_DATA */ + ], + pageData: pageData, + paginationKey: paginationKey, + }; + } + + /** + * + */ + function failFetchPostPageDataState(error) { + return { + type: __WEBPACK_IMPORTED_MODULE_0_app_constants_SharedConstants__[ + 'e' /* FAIL_FETCH_POST_PAGE_DATA */ + ], + error: error, + }; + } + + /** + * + */ + function loadPostPageData(postId, paginationKey) { + return function (dispatch) { + dispatch(enterPendingPostPageDataState()); + + jQuery.ajax({ + url: '/posts/' + postId + '.json', + dataType: 'json', + cache: false, + success: function success(pageData) { + dispatch(succeedFetchPostPageDataState(pageData, paginationKey)); + }, + error: function error(jqXHR) { + dispatch(failFetchPostPageDataState(jqXHR.error)); + }, + }); + }; + } + + /** + * + */ + function bootstrapAuthorsPageData(pageData, paginationKey) { + return { + type: __WEBPACK_IMPORTED_MODULE_0_app_constants_SharedConstants__[ + 'f' /* BOOTSTRAP_AUTHORS_PAGE_DATA */ + ], + pageData: pageData, + paginationKey: paginationKey, + }; + } + + /** + * + */ + function enterPendingAuthorsPageDataState() { + return { + type: __WEBPACK_IMPORTED_MODULE_0_app_constants_SharedConstants__[ + 'g' /* ENTER_PENDING_AUTHORS_PAGE_DATA_STATE */ + ], + }; + } + + /** + * + */ + function succeedFetchAuthorsPageDataState(pageData, paginationKey) { + return { + type: __WEBPACK_IMPORTED_MODULE_0_app_constants_SharedConstants__[ + 'h' /* SUCCEED_FETCH_AUTHORS_PAGE_DATA */ + ], + pageData: pageData, + paginationKey: paginationKey, + }; + } + + /** + * + */ + function failFetchAuthorsPageDataState(error) { + return { + type: __WEBPACK_IMPORTED_MODULE_0_app_constants_SharedConstants__[ + 'i' /* FAIL_FETCH_AUTHORS_PAGE_DATA */ + ], + error: error, + }; + } + + /** + * + */ + function loadAuthorsPageData(paginationKey, query) { + return function (dispatch) { + dispatch(enterPendingAuthorsPageDataState()); + + jQuery.ajax({ + url: '/authors.json', + dataType: 'json', + data: query, + cache: false, + success: function success(pageData) { + dispatch(succeedFetchAuthorsPageDataState(pageData, paginationKey)); + }, + error: function error(jqXHR) { + dispatch(failFetchAuthorsPageDataState(jqXHR.error)); + }, + }); + }; + } + + /** + * + */ + function bootstrapAuthorPageData(pageData, paginationKey) { + return { + type: __WEBPACK_IMPORTED_MODULE_0_app_constants_SharedConstants__[ + 'j' /* BOOTSTRAP_AUTHOR_PAGE_DATA */ + ], + pageData: pageData, + paginationKey: paginationKey, + }; + } + + /** + * + */ + function enterPendingAuthorPageDataState() { + return { + type: __WEBPACK_IMPORTED_MODULE_0_app_constants_SharedConstants__[ + 'k' /* ENTER_PENDING_AUTHOR_PAGE_DATA_STATE */ + ], + }; + } + + /** + * + */ + function succeedFetchAuthorPageDataState(pageData, paginationKey) { + return { + type: __WEBPACK_IMPORTED_MODULE_0_app_constants_SharedConstants__[ + 'l' /* SUCCEED_FETCH_AUTHOR_PAGE_DATA */ + ], + pageData: pageData, + paginationKey: paginationKey, + }; + } + + /** + * + */ + function failFetchAuthorPageDataState(error) { + return { + type: __WEBPACK_IMPORTED_MODULE_0_app_constants_SharedConstants__[ + 'm' /* FAIL_FETCH_AUTHOR_PAGE_DATA */ + ], + error: error, + }; + } + + /** + * + */ + function loadAuthorPageData(authorId, paginationKey) { + return function (dispatch) { + dispatch(enterPendingAuthorPageDataState()); + + jQuery.ajax({ + url: '/authors/' + authorId + '.json', + dataType: 'json', + cache: false, + success: function success(pageData) { + dispatch(succeedFetchAuthorPageDataState(pageData, paginationKey)); + }, + error: function error(jqXHR) { + dispatch(failFetchAuthorPageDataState(jqXHR.error)); + }, + }); + }; + } + + /***/ + }, + /* 128 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__constants_UIStateConstants__ = + __webpack_require__(250); + /* harmony export (immutable) */ __webpack_exports__['d'] = setWindowScrollTop; + /* harmony export (immutable) */ __webpack_exports__['c'] = setHeaderWithoutBreadcrumbsHeight; + /* harmony export (immutable) */ __webpack_exports__['a'] = setMainImageHeight; + /* harmony export (immutable) */ __webpack_exports__['b'] = setBreadcrumbsHeight; + + /** + * + */ + function setWindowScrollTop(windowScrollTop) { + return { + type: __WEBPACK_IMPORTED_MODULE_0__constants_UIStateConstants__['a' /* WINDOW_SCROLLED */], + windowScrollTop: windowScrollTop, + }; + } + + /** + * + */ + function setHeaderWithoutBreadcrumbsHeight(headerWithoutBreadcrumbsHeight) { + return { + type: __WEBPACK_IMPORTED_MODULE_0__constants_UIStateConstants__[ + 'b' /* HEADER_WIHOUT_BREADCRUMBS_RESIZED */ + ], + headerWithoutBreadcrumbsHeight: headerWithoutBreadcrumbsHeight, + }; + } + + /** + * + */ + function setMainImageHeight(mainImageHeight) { + return { + type: __WEBPACK_IMPORTED_MODULE_0__constants_UIStateConstants__['c' /* MAIN_IMAGE_RESIZED */], + mainImageHeight: mainImageHeight, + }; + } + + /** + * + */ + function setBreadcrumbsHeight(breadcrumbsHeight) { + return { + type: __WEBPACK_IMPORTED_MODULE_0__constants_UIStateConstants__['d' /* BREADCRUMBS_RESIZED */], + breadcrumbsHeight: breadcrumbsHeight, + }; + } + + /***/ + }, + /* 129 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'b', function () { + return BUILD_COMMENT; + }); + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'c', function () { + return REMOVE_TMP_COMMENT; + }); + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'd', function () { + return ASSIGN_COMMENT_ATTRIBUTES; + }); + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'e', function () { + return ENTER_PENDING_COMMENT_STATE; + }); + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'a', function () { + return CREATE_COMMENT_SUCCEED; + }); + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'f', function () { + return CREATE_COMMENT_INVALIDATED; + }); + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'g', function () { + return CREATE_COMMENT_FAILED; + }); + var BUILD_COMMENT = 'BUILD_COMMENT'; + var REMOVE_TMP_COMMENT = 'REMOVE_TMP_COMMENT'; + var ASSIGN_COMMENT_ATTRIBUTES = 'ASSIGN_COMMENT_ATTRIBUTES'; + var ENTER_PENDING_COMMENT_STATE = 'ENTER_PENDING_COMMENT_STATE'; + var CREATE_COMMENT_SUCCEED = 'CREATE_COMMENT_SUCCEED'; + var CREATE_COMMENT_INVALIDATED = 'CREATE_COMMENT_INVALIDATED'; + var CREATE_COMMENT_FAILED = 'CREATE_COMMENT_FAILED'; + + /***/ + }, + /* 130 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'a', function () { + return REQUEST_POSTS; + }); + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'b', function () { + return RECEIVE_POSTS; + }); + var REQUEST_POSTS = 'REQUEST_POSTS'; + var RECEIVE_POSTS = 'RECEIVE_POSTS'; + + /***/ + }, + /* 131 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = generateTmpId; + var tmpIdCounter = 1; + + /** + * + */ + function generateTmpId() { + return tmpIdCounter++; + } + + /***/ + }, + /* 132 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = { default: __webpack_require__(482), __esModule: true }; + + /***/ + }, + /* 133 */ + /***/ function (module, exports) { + // 7.2.1 RequireObjectCoercible(argument) + module.exports = function (it) { + if (it == undefined) throw TypeError("Can't call method on " + it); + return it; + }; + + /***/ + }, + /* 134 */ + /***/ function (module, exports, __webpack_require__) { + // 7.1.15 ToLength + var toInteger = __webpack_require__(164), + min = Math.min; + module.exports = function (it) { + return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 + }; + + /***/ + }, + /* 135 */ + /***/ function (module, exports, __webpack_require__) { + // false -> Array#indexOf + // true -> Array#includes + var toIObject = __webpack_require__(32), + toLength = __webpack_require__(19), + toIndex = __webpack_require__(83); + module.exports = function (IS_INCLUDES) { + return function ($this, el, fromIndex) { + var O = toIObject($this), + length = toLength(O.length), + index = toIndex(fromIndex, length), + value; + // Array#includes uses SameValueZero equality algorithm + if (IS_INCLUDES && el != el) + while (length > index) { + value = O[index++]; + if (value != value) return true; + // Array#toIndex ignores holes, Array#includes - not + } + else + for (; length > index; index++) + if (IS_INCLUDES || index in O) { + if (O[index] === el) return IS_INCLUDES || index || 0; + } + return !IS_INCLUDES && -1; + }; + }; + + /***/ + }, + /* 136 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var global = __webpack_require__(8), + $export = __webpack_require__(0), + redefine = __webpack_require__(30), + redefineAll = __webpack_require__(81), + meta = __webpack_require__(63), + forOf = __webpack_require__(95), + anInstance = __webpack_require__(76), + isObject = __webpack_require__(11), + fails = __webpack_require__(10), + $iterDetect = __webpack_require__(141), + setToStringTag = __webpack_require__(97), + inheritIfRequired = __webpack_require__(173); + + module.exports = function (NAME, wrapper, methods, common, IS_MAP, IS_WEAK) { + var Base = global[NAME], + C = Base, + ADDER = IS_MAP ? 'set' : 'add', + proto = C && C.prototype, + O = {}; + var fixMethod = function (KEY) { + var fn = proto[KEY]; + redefine( + proto, + KEY, + KEY == 'delete' + ? function (a) { + return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a); + } + : KEY == 'has' + ? function has(a) { + return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a); + } + : KEY == 'get' + ? function get(a) { + return IS_WEAK && !isObject(a) ? undefined : fn.call(this, a === 0 ? 0 : a); + } + : KEY == 'add' + ? function add(a) { + fn.call(this, a === 0 ? 0 : a); + return this; + } + : function set(a, b) { + fn.call(this, a === 0 ? 0 : a, b); + return this; + }, + ); + }; + if ( + typeof C != 'function' || + !( + IS_WEAK || + (proto.forEach && + !fails(function () { + new C().entries().next(); + })) + ) + ) { + // create collection constructor + C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER); + redefineAll(C.prototype, methods); + meta.NEED = true; + } else { + var instance = new C(), + // early implementations not supports chaining + HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance, + // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false + THROWS_ON_PRIMITIVES = fails(function () { + instance.has(1); + }), + // most early implementations doesn't supports iterables, most modern - not close it correctly + ACCEPT_ITERABLES = $iterDetect(function (iter) { + new C(iter); + }), // eslint-disable-line no-new + // for early implementations -0 and +0 not the same + BUGGY_ZERO = + !IS_WEAK && + fails(function () { + // V8 ~ Chromium 42- fails only with 5+ elements + var $instance = new C(), + index = 5; + while (index--) $instance[ADDER](index, index); + return !$instance.has(-0); + }); + if (!ACCEPT_ITERABLES) { + C = wrapper(function (target, iterable) { + anInstance(target, C, NAME); + var that = inheritIfRequired(new Base(), target, C); + if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that); + return that; + }); + C.prototype = proto; + proto.constructor = C; + } + if (THROWS_ON_PRIMITIVES || BUGGY_ZERO) { + fixMethod('delete'); + fixMethod('has'); + IS_MAP && fixMethod('get'); + } + if (BUGGY_ZERO || HASNT_CHAINING) fixMethod(ADDER); + // weak collections should not contains .clear method + if (IS_WEAK && proto.clear) delete proto.clear; + } + + setToStringTag(C, NAME); + + O[NAME] = C; + $export($export.G + $export.W + $export.F * (C != Base), O); + + if (!IS_WEAK) common.setStrong(C, NAME, IS_MAP); + + return C; + }; + + /***/ + }, + /* 137 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var hide = __webpack_require__(29), + redefine = __webpack_require__(30), + fails = __webpack_require__(10), + defined = __webpack_require__(41), + wks = __webpack_require__(12); + + module.exports = function (KEY, length, exec) { + var SYMBOL = wks(KEY), + fns = exec(defined, SYMBOL, ''[KEY]), + strfn = fns[0], + rxfn = fns[1]; + if ( + fails(function () { + var O = {}; + O[SYMBOL] = function () { + return 7; + }; + return ''[KEY](O) != 7; + }) + ) { + redefine(String.prototype, KEY, strfn); + hide( + RegExp.prototype, + SYMBOL, + length == 2 + ? // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue) + // 21.2.5.11 RegExp.prototype[@@split](string, limit) + function (string, arg) { + return rxfn.call(string, this, arg); + } + : // 21.2.5.6 RegExp.prototype[@@match](string) + // 21.2.5.9 RegExp.prototype[@@search](string) + function (string) { + return rxfn.call(string, this); + }, + ); + } + }; + + /***/ + }, + /* 138 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // 21.2.5.3 get RegExp.prototype.flags + var anObject = __webpack_require__(5); + module.exports = function () { + var that = anObject(this), + result = ''; + if (that.global) result += 'g'; + if (that.ignoreCase) result += 'i'; + if (that.multiline) result += 'm'; + if (that.unicode) result += 'u'; + if (that.sticky) result += 'y'; + return result; + }; + + /***/ + }, + /* 139 */ + /***/ function (module, exports) { + // fast apply, http://jsperf.lnkit.com/fast-apply/5 + module.exports = function (fn, args, that) { + var un = that === undefined; + switch (args.length) { + case 0: + return un ? fn() : fn.call(that); + case 1: + return un ? fn(args[0]) : fn.call(that, args[0]); + case 2: + return un ? fn(args[0], args[1]) : fn.call(that, args[0], args[1]); + case 3: + return un ? fn(args[0], args[1], args[2]) : fn.call(that, args[0], args[1], args[2]); + case 4: + return un + ? fn(args[0], args[1], args[2], args[3]) + : fn.call(that, args[0], args[1], args[2], args[3]); + } + return fn.apply(that, args); + }; + + /***/ + }, + /* 140 */ + /***/ function (module, exports, __webpack_require__) { + // 7.2.8 IsRegExp(argument) + var isObject = __webpack_require__(11), + cof = __webpack_require__(40), + MATCH = __webpack_require__(12)('match'); + module.exports = function (it) { + var isRegExp; + return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp'); + }; + + /***/ + }, + /* 141 */ + /***/ function (module, exports, __webpack_require__) { + var ITERATOR = __webpack_require__(12)('iterator'), + SAFE_CLOSING = false; + + try { + var riter = [7][ITERATOR](); + riter['return'] = function () { + SAFE_CLOSING = true; + }; + Array.from(riter, function () { + throw 2; + }); + } catch (e) { + /* empty */ + } + + module.exports = function (exec, skipClosing) { + if (!skipClosing && !SAFE_CLOSING) return false; + var safe = false; + try { + var arr = [7], + iter = arr[ITERATOR](); + iter.next = function () { + return { done: (safe = true) }; + }; + arr[ITERATOR] = function () { + return iter; + }; + exec(arr); + } catch (e) { + /* empty */ + } + return safe; + }; + + /***/ + }, + /* 142 */ + /***/ function (module, exports, __webpack_require__) { + // Forced replacement prototype accessors methods + module.exports = + __webpack_require__(77) || + !__webpack_require__(10)(function () { + var K = Math.random(); + // In FF throws only define methods + __defineSetter__.call(null, K, function () { + /* empty */ + }); + delete __webpack_require__(8)[K]; + }); + + /***/ + }, + /* 143 */ + /***/ function (module, exports) { + exports.f = Object.getOwnPropertySymbols; + + /***/ + }, + /* 144 */ + /***/ function (module, exports, __webpack_require__) { + var global = __webpack_require__(8), + SHARED = '__core-js_shared__', + store = global[SHARED] || (global[SHARED] = {}); + module.exports = function (key) { + return store[key] || (store[key] = {}); + }; + + /***/ + }, + /* 145 */ + /***/ function (module, exports, __webpack_require__) { + var global = __webpack_require__(8), + hide = __webpack_require__(29), + uid = __webpack_require__(84), + TYPED = uid('typed_array'), + VIEW = uid('view'), + ABV = !!(global.ArrayBuffer && global.DataView), + CONSTR = ABV, + i = 0, + l = 9, + Typed; + + var TypedArrayConstructors = + 'Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array'.split( + ',', + ); + + while (i < l) { + if ((Typed = global[TypedArrayConstructors[i++]])) { + hide(Typed.prototype, TYPED, true); + hide(Typed.prototype, VIEW, true); + } else CONSTR = false; + } + + module.exports = { + ABV: ABV, + CONSTR: CONSTR, + TYPED: TYPED, + VIEW: VIEW, + }; + + /***/ + }, + /* 146 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + /** + * Indicates that navigation was caused by a call to history.push. + */ + var PUSH = (exports.PUSH = 'PUSH'); + + /** + * Indicates that navigation was caused by a call to history.replace. + */ + var REPLACE = (exports.REPLACE = 'REPLACE'); + + /** + * Indicates that navigation was caused by some other action such + * as using a browser's back/forward buttons and/or manually manipulating + * the URL in a browser's location bar. This is the default. + * + * See https://developer.mozilla.org/en-US/docs/Web/API/WindowEventHandlers/onpopstate + * for more information. + */ + var POP = (exports.POP = 'POP'); + + /***/ + }, + /* 147 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + var addEventListener = (exports.addEventListener = function addEventListener(node, event, listener) { + return node.addEventListener + ? node.addEventListener(event, listener, false) + : node.attachEvent('on' + event, listener); + }); + + var removeEventListener = (exports.removeEventListener = function removeEventListener( + node, + event, + listener, + ) { + return node.removeEventListener + ? node.removeEventListener(event, listener, false) + : node.detachEvent('on' + event, listener); + }); + + /** + * Returns true if the HTML5 history API is supported. Taken from Modernizr. + * + * https://github.com/Modernizr/Modernizr/blob/master/LICENSE + * https://github.com/Modernizr/Modernizr/blob/master/feature-detects/history.js + * changed to avoid false negatives for Windows Phones: https://github.com/reactjs/react-router/issues/586 + */ + var supportsHistory = (exports.supportsHistory = function supportsHistory() { + var ua = window.navigator.userAgent; + + if ( + (ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && + ua.indexOf('Mobile Safari') !== -1 && + ua.indexOf('Chrome') === -1 && + ua.indexOf('Windows Phone') === -1 + ) + return false; + + return window.history && 'pushState' in window.history; + }); + + /** + * Returns false if using go(n) with hash history causes a full page reload. + */ + var supportsGoWithoutReloadUsingHash = (exports.supportsGoWithoutReloadUsingHash = + function supportsGoWithoutReloadUsingHash() { + return window.navigator.userAgent.indexOf('Firefox') === -1; + }); + + /** + * Returns true if browser fires popstate on hash change. + * IE10 and IE11 do not. + */ + var supportsPopstateOnHashchange = (exports.supportsPopstateOnHashchange = + function supportsPopstateOnHashchange() { + return window.navigator.userAgent.indexOf('Trident') === -1; + }); + + /** + * Returns true if a given popstate event is an extraneous WebKit event. + * Accounts for the fact that Chrome on iOS fires real popstate events + * containing undefined state when pressing the back button. + */ + var isExtraneousPopstateEvent = (exports.isExtraneousPopstateEvent = function isExtraneousPopstateEvent( + event, + ) { + return event.state === undefined && navigator.userAgent.indexOf('CriOS') === -1; + }); + + /***/ + }, + /* 148 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var SyntheticUIEvent = __webpack_require__(125); + var ViewportMetrics = __webpack_require__(333); + + var getEventModifierState = __webpack_require__(212); + + /** + * @interface MouseEvent + * @see http://www.w3.org/TR/DOM-Level-3-Events/ + */ + var MouseEventInterface = { + screenX: null, + screenY: null, + clientX: null, + clientY: null, + ctrlKey: null, + shiftKey: null, + altKey: null, + metaKey: null, + getModifierState: getEventModifierState, + button: function (event) { + // Webkit, Firefox, IE9+ + // which: 1 2 3 + // button: 0 1 2 (standard) + var button = event.button; + if ('which' in event) { + return button; + } + // IE<9 + // which: undefined + // button: 0 0 0 + // button: 1 4 2 (onmouseup) + return button === 2 ? 2 : button === 4 ? 1 : 0; + }, + buttons: null, + relatedTarget: function (event) { + return ( + event.relatedTarget || + (event.fromElement === event.srcElement ? event.toElement : event.fromElement) + ); + }, + // "Proprietary" Interface. + pageX: function (event) { + return 'pageX' in event ? event.pageX : event.clientX + ViewportMetrics.currentScrollLeft; + }, + pageY: function (event) { + return 'pageY' in event ? event.pageY : event.clientY + ViewportMetrics.currentScrollTop; + }, + }; + + /** + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @extends {SyntheticUIEvent} + */ + function SyntheticMouseEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); + } + + SyntheticUIEvent.augmentClass(SyntheticMouseEvent, MouseEventInterface); + + module.exports = SyntheticMouseEvent; + + /***/ + }, + /* 149 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + var _prodInvariant = __webpack_require__(7); + + var invariant = __webpack_require__(3); + + var OBSERVED_ERROR = {}; + + /** + * `Transaction` creates a black box that is able to wrap any method such that + * certain invariants are maintained before and after the method is invoked + * (Even if an exception is thrown while invoking the wrapped method). Whoever + * instantiates a transaction can provide enforcers of the invariants at + * creation time. The `Transaction` class itself will supply one additional + * automatic invariant for you - the invariant that any transaction instance + * should not be run while it is already being run. You would typically create a + * single instance of a `Transaction` for reuse multiple times, that potentially + * is used to wrap several different methods. Wrappers are extremely simple - + * they only require implementing two methods. + * + *
+       *                       wrappers (injected at creation time)
+       *                                      +        +
+       *                                      |        |
+       *                    +-----------------|--------|--------------+
+       *                    |                 v        |              |
+       *                    |      +---------------+   |              |
+       *                    |   +--|    wrapper1   |---|----+         |
+       *                    |   |  +---------------+   v    |         |
+       *                    |   |          +-------------+  |         |
+       *                    |   |     +----|   wrapper2  |--------+   |
+       *                    |   |     |    +-------------+  |     |   |
+       *                    |   |     |                     |     |   |
+       *                    |   v     v                     v     v   | wrapper
+       *                    | +---+ +---+   +---------+   +---+ +---+ | invariants
+       * perform(anyMethod) | |   | |   |   |         |   |   | |   | | maintained
+       * +----------------->|-|---|-|---|-->|anyMethod|---|---|-|---|-|-------->
+       *                    | |   | |   |   |         |   |   | |   | |
+       *                    | |   | |   |   |         |   |   | |   | |
+       *                    | |   | |   |   |         |   |   | |   | |
+       *                    | +---+ +---+   +---------+   +---+ +---+ |
+       *                    |  initialize                    close    |
+       *                    +-----------------------------------------+
+       * 
+ * + * Use cases: + * - Preserving the input selection ranges before/after reconciliation. + * Restoring selection even in the event of an unexpected error. + * - Deactivating events while rearranging the DOM, preventing blurs/focuses, + * while guaranteeing that afterwards, the event system is reactivated. + * - Flushing a queue of collected DOM mutations to the main UI thread after a + * reconciliation takes place in a worker thread. + * - Invoking any collected `componentDidUpdate` callbacks after rendering new + * content. + * - (Future use case): Wrapping particular flushes of the `ReactWorker` queue + * to preserve the `scrollTop` (an automatic scroll aware DOM). + * - (Future use case): Layout calculations before and after DOM updates. + * + * Transactional plugin API: + * - A module that has an `initialize` method that returns any precomputation. + * - and a `close` method that accepts the precomputation. `close` is invoked + * when the wrapped process is completed, or has failed. + * + * @param {Array} transactionWrapper Wrapper modules + * that implement `initialize` and `close`. + * @return {Transaction} Single transaction for reuse in thread. + * + * @class Transaction + */ + var TransactionImpl = { + /** + * Sets up this instance so that it is prepared for collecting metrics. Does + * so such that this setup method may be used on an instance that is already + * initialized, in a way that does not consume additional memory upon reuse. + * That can be useful if you decide to make your subclass of this mixin a + * "PooledClass". + */ + reinitializeTransaction: function () { + this.transactionWrappers = this.getTransactionWrappers(); + if (this.wrapperInitData) { + this.wrapperInitData.length = 0; + } else { + this.wrapperInitData = []; + } + this._isInTransaction = false; + }, + + _isInTransaction: false, + + /** + * @abstract + * @return {Array} Array of transaction wrappers. + */ + getTransactionWrappers: null, + + isInTransaction: function () { + return !!this._isInTransaction; + }, + + /** + * Executes the function within a safety window. Use this for the top level + * methods that result in large amounts of computation/mutations that would + * need to be safety checked. The optional arguments helps prevent the need + * to bind in many cases. + * + * @param {function} method Member of scope to call. + * @param {Object} scope Scope to invoke from. + * @param {Object?=} a Argument to pass to the method. + * @param {Object?=} b Argument to pass to the method. + * @param {Object?=} c Argument to pass to the method. + * @param {Object?=} d Argument to pass to the method. + * @param {Object?=} e Argument to pass to the method. + * @param {Object?=} f Argument to pass to the method. + * + * @return {*} Return value from `method`. + */ + perform: function (method, scope, a, b, c, d, e, f) { + !!this.isInTransaction() + ? true + ? invariant( + false, + 'Transaction.perform(...): Cannot initialize a transaction when there is already an outstanding transaction.', + ) + : _prodInvariant('27') + : void 0; + var errorThrown; + var ret; + try { + this._isInTransaction = true; + // Catching errors makes debugging more difficult, so we start with + // errorThrown set to true before setting it to false after calling + // close -- if it's still set to true in the finally block, it means + // one of these calls threw. + errorThrown = true; + this.initializeAll(0); + ret = method.call(scope, a, b, c, d, e, f); + errorThrown = false; + } finally { + try { + if (errorThrown) { + // If `method` throws, prefer to show that stack trace over any thrown + // by invoking `closeAll`. + try { + this.closeAll(0); + } catch (err) {} + } else { + // Since `method` didn't throw, we don't want to silence the exception + // here. + this.closeAll(0); + } + } finally { + this._isInTransaction = false; + } + } + return ret; + }, + + initializeAll: function (startIndex) { + var transactionWrappers = this.transactionWrappers; + for (var i = startIndex; i < transactionWrappers.length; i++) { + var wrapper = transactionWrappers[i]; + try { + // Catching errors makes debugging more difficult, so we start with the + // OBSERVED_ERROR state before overwriting it with the real return value + // of initialize -- if it's still set to OBSERVED_ERROR in the finally + // block, it means wrapper.initialize threw. + this.wrapperInitData[i] = OBSERVED_ERROR; + this.wrapperInitData[i] = wrapper.initialize ? wrapper.initialize.call(this) : null; + } finally { + if (this.wrapperInitData[i] === OBSERVED_ERROR) { + // The initializer for wrapper i threw an error; initialize the + // remaining wrappers but silence any exceptions from them to ensure + // that the first error is the one to bubble up. + try { + this.initializeAll(i + 1); + } catch (err) {} + } + } + } + }, + + /** + * Invokes each of `this.transactionWrappers.close[i]` functions, passing into + * them the respective return values of `this.transactionWrappers.init[i]` + * (`close`rs that correspond to initializers that failed will not be + * invoked). + */ + closeAll: function (startIndex) { + !this.isInTransaction() + ? true + ? invariant(false, 'Transaction.closeAll(): Cannot close transaction when none are open.') + : _prodInvariant('28') + : void 0; + var transactionWrappers = this.transactionWrappers; + for (var i = startIndex; i < transactionWrappers.length; i++) { + var wrapper = transactionWrappers[i]; + var initData = this.wrapperInitData[i]; + var errorThrown; + try { + // Catching errors makes debugging more difficult, so we start with + // errorThrown set to true before setting it to false after calling + // close -- if it's still set to true in the finally block, it means + // wrapper.close threw. + errorThrown = true; + if (initData !== OBSERVED_ERROR && wrapper.close) { + wrapper.close.call(this, initData); + } + errorThrown = false; + } finally { + if (errorThrown) { + // The closer for wrapper i threw an error; close the remaining + // wrappers but silence any exceptions from them to ensure that the + // first error is the one to bubble up. + try { + this.closeAll(i + 1); + } catch (e) {} + } + } + } + this.wrapperInitData.length = 0; + }, + }; + + module.exports = TransactionImpl; + + /***/ + }, + /* 150 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2016-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * Based on the escape-html library, which is used under the MIT License below: + * + * Copyright (c) 2012-2013 TJ Holowaychuk + * Copyright (c) 2015 Andreas Lubbe + * Copyright (c) 2015 Tiancheng "Timothy" Gu + * + * 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. + * + */ + + // code copied and modified from escape-html + /** + * Module variables. + * @private + */ + + var matchHtmlRegExp = /["'&<>]/; + + /** + * Escape special characters in the given string of html. + * + * @param {string} string The string to escape for inserting into HTML + * @return {string} + * @public + */ + + function escapeHtml(string) { + var str = '' + string; + var match = matchHtmlRegExp.exec(str); + + if (!match) { + return str; + } + + var escape; + var html = ''; + var index = 0; + var lastIndex = 0; + + for (index = match.index; index < str.length; index++) { + switch (str.charCodeAt(index)) { + case 34: + // " + escape = '"'; + break; + case 38: + // & + escape = '&'; + break; + case 39: + // ' + escape = '''; // modified from escape-html; used to be ''' + break; + case 60: + // < + escape = '<'; + break; + case 62: + // > + escape = '>'; + break; + default: + continue; + } + + if (lastIndex !== index) { + html += str.substring(lastIndex, index); + } + + lastIndex = index + 1; + html += escape; + } + + return lastIndex !== index ? html + str.substring(lastIndex, index) : html; + } + // end code copied and modified from escape-html + + /** + * Escapes text to prevent scripting attacks. + * + * @param {*} text Text value to escape. + * @return {string} An escaped string. + */ + function escapeTextContentForBrowser(text) { + if (typeof text === 'boolean' || typeof text === 'number') { + // this shortcircuit helps perf for types that we know will never have + // special characters, especially given that this function is used often + // for numeric dom ids. + return '' + text; + } + return escapeHtml(text); + } + + module.exports = escapeTextContentForBrowser; + + /***/ + }, + /* 151 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var ExecutionEnvironment = __webpack_require__(17); + var DOMNamespaces = __webpack_require__(201); + + var WHITESPACE_TEST = /^[ \r\n\t\f]/; + var NONVISIBLE_TEST = /<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/; + + var createMicrosoftUnsafeLocalFunction = __webpack_require__(210); + + // SVG temp container for IE lacking innerHTML + var reusableSVGContainer; + + /** + * Set the innerHTML property of a node, ensuring that whitespace is preserved + * even in IE8. + * + * @param {DOMElement} node + * @param {string} html + * @internal + */ + var setInnerHTML = createMicrosoftUnsafeLocalFunction(function (node, html) { + // IE does not have innerHTML for SVG nodes, so instead we inject the + // new markup in a temp node and then move the child nodes across into + // the target node + if (node.namespaceURI === DOMNamespaces.svg && !('innerHTML' in node)) { + reusableSVGContainer = reusableSVGContainer || document.createElement('div'); + reusableSVGContainer.innerHTML = '' + html + ''; + var svgNode = reusableSVGContainer.firstChild; + while (svgNode.firstChild) { + node.appendChild(svgNode.firstChild); + } + } else { + node.innerHTML = html; + } + }); + + if (ExecutionEnvironment.canUseDOM) { + // IE8: When updating a just created node with innerHTML only leading + // whitespace is removed. When updating an existing node with innerHTML + // whitespace in root TextNodes is also collapsed. + // @see quirksmode.org/bugreports/archives/2004/11/innerhtml_and_t.html + + // Feature detection; only IE8 is known to behave improperly like this. + var testElement = document.createElement('div'); + testElement.innerHTML = ' '; + if (testElement.innerHTML === '') { + setInnerHTML = function (node, html) { + // Magic theory: IE8 supposedly differentiates between added and updated + // nodes when processing innerHTML, innerHTML on updated nodes suffers + // from worse whitespace behavior. Re-adding a node like this triggers + // the initial and more favorable whitespace behavior. + // TODO: What to do on a detached node? + if (node.parentNode) { + node.parentNode.replaceChild(node, node); + } + + // We also implement a workaround for non-visible tags disappearing into + // thin air on IE8, this only happens if there is no visible text + // in-front of the non-visible tags. Piggyback on the whitespace fix + // and simply check if any non-visible tags appear in the source. + if (WHITESPACE_TEST.test(html) || (html[0] === '<' && NONVISIBLE_TEST.test(html))) { + // Recover leading whitespace by temporarily prepending any character. + // \uFEFF has the potential advantage of being zero-width/invisible. + // UglifyJS drops U+FEFF chars when parsing, so use String.fromCharCode + // in hopes that this is preserved even if "\uFEFF" is transformed to + // the actual Unicode character (by Babel, for example). + // https://github.com/mishoo/UglifyJS2/blob/v2.4.20/lib/parse.js#L216 + node.innerHTML = String.fromCharCode(0xfeff) + html; + + // deleteData leaves an empty `TextNode` which offsets the index of all + // children. Definitely want to avoid this. + var textNode = node.firstChild; + if (textNode.data.length === 1) { + node.removeChild(textNode); + } else { + textNode.deleteData(0, 1); + } + } else { + node.innerHTML = html; + } + }; + } + testElement = null; + } + + module.exports = setInnerHTML; + + /***/ + }, + /* 152 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + var canDefineProperty = false; + if (true) { + try { + // $FlowFixMe https://github.com/facebook/flow/issues/285 + Object.defineProperty({}, 'x', { get: function () {} }); + canDefineProperty = true; + } catch (x) { + // IE will fail on defineProperty + } + } + + module.exports = canDefineProperty; + + /***/ + }, + /* 153 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (_) { + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_router__ = __webpack_require__(13); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__constants_CommentsConstants__ = + __webpack_require__(129); + /* harmony export (immutable) */ __webpack_exports__['a'] = buildComment; + /* harmony export (immutable) */ __webpack_exports__['b'] = removeTmpComment; + /* harmony export (immutable) */ __webpack_exports__['c'] = assignTmpCommentAttributes; + /* unused harmony export enterPendingCommentState */ + /* unused harmony export createCommentSucceed */ + /* unused harmony export createCommentInvalidated */ + /* unused harmony export createCommentFailed */ + /* harmony export (immutable) */ __webpack_exports__['d'] = createComment; + + /** + * + */ + function buildComment(attributes) { + return { + type: __WEBPACK_IMPORTED_MODULE_1__constants_CommentsConstants__['b' /* BUILD_COMMENT */], + attributes: attributes, + }; + } + + /** + * + */ + function removeTmpComment(commentTmpId) { + return { + type: __WEBPACK_IMPORTED_MODULE_1__constants_CommentsConstants__['c' /* REMOVE_TMP_COMMENT */], + commentTmpId: commentTmpId, + }; + } + + /** + * + */ + function assignTmpCommentAttributes(tmpId, attributes, validateAssigned) { + return { + type: __WEBPACK_IMPORTED_MODULE_1__constants_CommentsConstants__[ + 'd' /* ASSIGN_COMMENT_ATTRIBUTES */ + ], + tmpId: tmpId, + attributes: attributes, + validateAssigned: validateAssigned, + }; + } + + /** + * + */ + function enterPendingCommentState() { + return { + type: __WEBPACK_IMPORTED_MODULE_1__constants_CommentsConstants__[ + 'e' /* ENTER_PENDING_COMMENT_STATE */ + ], + }; + } + + /** + * + */ + function createCommentSucceed(commentTmpId, locationPathname, responseData) { + return { + type: __WEBPACK_IMPORTED_MODULE_1__constants_CommentsConstants__[ + 'a' /* CREATE_COMMENT_SUCCEED */ + ], + commentTmpId: commentTmpId, + locationPathname: locationPathname, + responseData: responseData, + }; + } + + /** + * + */ + function createCommentInvalidated(commentTmpId, responseData) { + return { + type: __WEBPACK_IMPORTED_MODULE_1__constants_CommentsConstants__[ + 'f' /* CREATE_COMMENT_INVALIDATED */ + ], + commentTmpId: commentTmpId, + responseData: responseData, + }; + } + + /** + * + */ + function createCommentFailed() { + return { + type: __WEBPACK_IMPORTED_MODULE_1__constants_CommentsConstants__['g' /* CREATE_COMMENT_FAILED */], + }; + } + + /** + * + */ + function createComment(commentTmpId, locationPathname, attributes) { + return function (dispatch) { + // Dispacth ENTER_PENDING_COMMENT_STATE to move comments list to pending state: + dispatch(enterPendingCommentState()); + + jQuery.ajax({ + url: '/comments/new.json', + method: 'POST', + dataType: 'json', + data: attributes, + cache: false, + success: function success(responseData) { + if (!_.isEmpty(responseData.comment.errors)) { + dispatch(createCommentInvalidated(commentTmpId, responseData)); + return; + } + + // Navigate to path without query params to close all respond forms on comments: + __WEBPACK_IMPORTED_MODULE_0_react_router__['a' /* browserHistory */].push(locationPathname); + dispatch(createCommentSucceed(commentTmpId, locationPathname, responseData)); + }, + error: function error(jqXHR) { + dispatch(createCommentFailed(jqXHR.error)); + }, + }); + }; + } + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(60)); + + /***/ + }, + /* 154 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'b', function () { + return BUILD_AUTHOR_FEEDBACK; + }); + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'c', function () { + return ASSIGN_AUTHOR_FEEDBACK_ATTRIBUTES; + }); + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'f', function () { + return REMOVE_AUTHOR_FEEDBACK; + }); + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'd', function () { + return ENTER_PENDING_AUTHOR_FEEDBACK_STATE; + }); + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'a', function () { + return CREATE_AUTHOR_FEEDBACK_SUCCEED; + }); + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'e', function () { + return CREATE_AUTHOR_FEEDBACK_INVALIDATED; + }); + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'g', function () { + return CREATE_AUTHOR_FEEDBACK_FAILED; + }); + var BUILD_AUTHOR_FEEDBACK = 'BUILD_AUTHOR_FEEDBACK'; + var ASSIGN_AUTHOR_FEEDBACK_ATTRIBUTES = 'ASSIGN_AUTHOR_FEEDBACK_ATTRIBUTES'; + var REMOVE_AUTHOR_FEEDBACK = 'REMOVE_AUTHOR_FEEDBACK'; + var ENTER_PENDING_AUTHOR_FEEDBACK_STATE = 'ENTER_PENDING_AUTHOR_FEEDBACK_STATE'; + var CREATE_AUTHOR_FEEDBACK_SUCCEED = 'CREATE_AUTHOR_FEEDBACK_SUCCEED'; + var CREATE_AUTHOR_FEEDBACK_INVALIDATED = 'CREATE_AUTHOR_FEEDBACK_INVALIDATED'; + var CREATE_AUTHOR_FEEDBACK_FAILED = 'CREATE_AUTHOR_FEEDBACK_FAILED'; + + /***/ + }, + /* 155 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = { default: __webpack_require__(485), __esModule: true }; + + /***/ + }, + /* 156 */ + /***/ function (module, exports) { + var toString = {}.toString; + + module.exports = function (it) { + return toString.call(it).slice(8, -1); + }; + + /***/ + }, + /* 157 */ + /***/ function (module, exports, __webpack_require__) { + var ctx = __webpack_require__(115), + call = __webpack_require__(264), + isArrayIter = __webpack_require__(263), + anObject = __webpack_require__(114), + toLength = __webpack_require__(134), + getIterFn = __webpack_require__(270), + BREAK = {}, + RETURN = {}; + var exports = (module.exports = function (iterable, entries, fn, that, ITERATOR) { + var iterFn = ITERATOR + ? function () { + return iterable; + } + : getIterFn(iterable), + f = ctx(fn, that, entries ? 2 : 1), + index = 0, + length, + step, + iterator, + result; + if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!'); + // fast case for arrays with default iterator + if (isArrayIter(iterFn)) + for (length = toLength(iterable.length); length > index; index++) { + result = entries ? f(anObject((step = iterable[index]))[0], step[1]) : f(iterable[index]); + if (result === BREAK || result === RETURN) return result; + } + else + for (iterator = iterFn.call(iterable); !(step = iterator.next()).done; ) { + result = call(iterator, f, step.value, entries); + if (result === BREAK || result === RETURN) return result; + } + }); + exports.BREAK = BREAK; + exports.RETURN = RETURN; + + /***/ + }, + /* 158 */ + /***/ function (module, exports, __webpack_require__) { + // fallback for non-array-like ES3 and non-enumerable old V8 strings + var cof = __webpack_require__(156); + module.exports = Object('z').propertyIsEnumerable(0) + ? Object + : function (it) { + return cof(it) == 'String' ? it.split('') : Object(it); + }; + + /***/ + }, + /* 159 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var LIBRARY = __webpack_require__(502), + $export = __webpack_require__(91), + redefine = __webpack_require__(510), + hide = __webpack_require__(75), + has = __webpack_require__(116), + Iterators = __webpack_require__(117), + $iterCreate = __webpack_require__(500), + setToStringTag = __webpack_require__(162), + getPrototypeOf = __webpack_require__(506), + ITERATOR = __webpack_require__(47)('iterator'), + BUGGY = !([].keys && 'next' in [].keys()), // Safari has buggy iterators w/o `next` + FF_ITERATOR = '@@iterator', + KEYS = 'keys', + VALUES = 'values'; + + var returnThis = function () { + return this; + }; + + module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) { + $iterCreate(Constructor, NAME, next); + var getMethod = function (kind) { + if (!BUGGY && kind in proto) return proto[kind]; + switch (kind) { + case KEYS: + return function keys() { + return new Constructor(this, kind); + }; + case VALUES: + return function values() { + return new Constructor(this, kind); + }; + } + return function entries() { + return new Constructor(this, kind); + }; + }; + var TAG = NAME + ' Iterator', + DEF_VALUES = DEFAULT == VALUES, + VALUES_BUG = false, + proto = Base.prototype, + $native = proto[ITERATOR] || proto[FF_ITERATOR] || (DEFAULT && proto[DEFAULT]), + $default = $native || getMethod(DEFAULT), + $entries = DEFAULT ? (!DEF_VALUES ? $default : getMethod('entries')) : undefined, + $anyNative = NAME == 'Array' ? proto.entries || $native : $native, + methods, + key, + IteratorPrototype; + // Fix native + if ($anyNative) { + IteratorPrototype = getPrototypeOf($anyNative.call(new Base())); + if (IteratorPrototype !== Object.prototype) { + // Set @@toStringTag to native iterators + setToStringTag(IteratorPrototype, TAG, true); + // fix for some old engines + if (!LIBRARY && !has(IteratorPrototype, ITERATOR)) hide(IteratorPrototype, ITERATOR, returnThis); + } + } + // fix Array#{values, @@iterator}.name in V8 / FF + if (DEF_VALUES && $native && $native.name !== VALUES) { + VALUES_BUG = true; + $default = function values() { + return $native.call(this); + }; + } + // Define iterator + if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) { + hide(proto, ITERATOR, $default); + } + // Plug for library + Iterators[NAME] = $default; + Iterators[TAG] = returnThis; + if (DEFAULT) { + methods = { + values: DEF_VALUES ? $default : getMethod(VALUES), + keys: IS_SET ? $default : getMethod(KEYS), + entries: $entries, + }; + if (FORCED) + for (key in methods) { + if (!(key in proto)) redefine(proto, key, methods[key]); + } + else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); + } + return methods; + }; + + /***/ + }, + /* 160 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.14 / 15.2.3.14 Object.keys(O) + var $keys = __webpack_require__(507), + enumBugKeys = __webpack_require__(262); + + module.exports = + Object.keys || + function keys(O) { + return $keys(O, enumBugKeys); + }; + + /***/ + }, + /* 161 */ + /***/ function (module, exports) { + module.exports = function (bitmap, value) { + return { + enumerable: !(bitmap & 1), + configurable: !(bitmap & 2), + writable: !(bitmap & 4), + value: value, + }; + }; + + /***/ + }, + /* 162 */ + /***/ function (module, exports, __webpack_require__) { + var def = __webpack_require__(62).f, + has = __webpack_require__(116), + TAG = __webpack_require__(47)('toStringTag'); + + module.exports = function (it, tag, stat) { + if (it && !has((it = stat ? it : it.prototype), TAG)) + def(it, TAG, { configurable: true, value: tag }); + }; + + /***/ + }, + /* 163 */ + /***/ function (module, exports, __webpack_require__) { + var shared = __webpack_require__(269)('keys'), + uid = __webpack_require__(166); + module.exports = function (key) { + return shared[key] || (shared[key] = uid(key)); + }; + + /***/ + }, + /* 164 */ + /***/ function (module, exports) { + // 7.1.4 ToInteger + var ceil = Math.ceil, + floor = Math.floor; + module.exports = function (it) { + return isNaN((it = +it)) ? 0 : (it > 0 ? floor : ceil)(it); + }; + + /***/ + }, + /* 165 */ + /***/ function (module, exports, __webpack_require__) { + // to indexed object, toObject with fallback for non-array-like ES3 strings + var IObject = __webpack_require__(158), + defined = __webpack_require__(133); + module.exports = function (it) { + return IObject(defined(it)); + }; + + /***/ + }, + /* 166 */ + /***/ function (module, exports) { + var id = 0, + px = Math.random(); + module.exports = function (key) { + return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); + }; + + /***/ + }, + /* 167 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + // 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length) + + var toObject = __webpack_require__(20), + toIndex = __webpack_require__(83), + toLength = __webpack_require__(19); + module.exports = function fill(value /*, start = 0, end = @length */) { + var O = toObject(this), + length = toLength(O.length), + aLen = arguments.length, + index = toIndex(aLen > 1 ? arguments[1] : undefined, length), + end = aLen > 2 ? arguments[2] : undefined, + endPos = end === undefined ? length : toIndex(end, length); + while (endPos > index) O[index++] = value; + return O; + }; + + /***/ + }, + /* 168 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $defineProperty = __webpack_require__(15), + createDesc = __webpack_require__(64); + + module.exports = function (object, index, value) { + if (index in object) $defineProperty.f(object, index, createDesc(0, value)); + else object[index] = value; + }; + + /***/ + }, + /* 169 */ + /***/ function (module, exports, __webpack_require__) { + var isObject = __webpack_require__(11), + document = __webpack_require__(8).document, + // in old IE typeof document.createElement is 'object' + is = isObject(document) && isObject(document.createElement); + module.exports = function (it) { + return is ? document.createElement(it) : {}; + }; + + /***/ + }, + /* 170 */ + /***/ function (module, exports) { + // IE 8- don't enum bug keys + module.exports = + 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'.split( + ',', + ); + + /***/ + }, + /* 171 */ + /***/ function (module, exports, __webpack_require__) { + var MATCH = __webpack_require__(12)('match'); + module.exports = function (KEY) { + var re = /./; + try { + '/./'[KEY](re); + } catch (e) { + try { + re[MATCH] = false; + return !'/./'[KEY](re); + } catch (f) { + /* empty */ + } + } + return true; + }; + + /***/ + }, + /* 172 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = __webpack_require__(8).document && document.documentElement; + + /***/ + }, + /* 173 */ + /***/ function (module, exports, __webpack_require__) { + var isObject = __webpack_require__(11), + setPrototypeOf = __webpack_require__(181).set; + module.exports = function (that, target, C) { + var P, + S = target.constructor; + if ( + S !== C && + typeof S == 'function' && + (P = S.prototype) !== C.prototype && + isObject(P) && + setPrototypeOf + ) { + setPrototypeOf(that, P); + } + return that; + }; + + /***/ + }, + /* 174 */ + /***/ function (module, exports, __webpack_require__) { + // check on default Array iterator + var Iterators = __webpack_require__(96), + ITERATOR = __webpack_require__(12)('iterator'), + ArrayProto = Array.prototype; + + module.exports = function (it) { + return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it); + }; + + /***/ + }, + /* 175 */ + /***/ function (module, exports, __webpack_require__) { + // 7.2.2 IsArray(argument) + var cof = __webpack_require__(40); + module.exports = + Array.isArray || + function isArray(arg) { + return cof(arg) == 'Array'; + }; + + /***/ + }, + /* 176 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var create = __webpack_require__(78), + descriptor = __webpack_require__(64), + setToStringTag = __webpack_require__(97), + IteratorPrototype = {}; + + // 25.1.2.1.1 %IteratorPrototype%[@@iterator]() + __webpack_require__(29)(IteratorPrototype, __webpack_require__(12)('iterator'), function () { + return this; + }); + + module.exports = function (Constructor, NAME, next) { + Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) }); + setToStringTag(Constructor, NAME + ' Iterator'); + }; + + /***/ + }, + /* 177 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var LIBRARY = __webpack_require__(77), + $export = __webpack_require__(0), + redefine = __webpack_require__(30), + hide = __webpack_require__(29), + has = __webpack_require__(27), + Iterators = __webpack_require__(96), + $iterCreate = __webpack_require__(176), + setToStringTag = __webpack_require__(97), + getPrototypeOf = __webpack_require__(37), + ITERATOR = __webpack_require__(12)('iterator'), + BUGGY = !([].keys && 'next' in [].keys()), // Safari has buggy iterators w/o `next` + FF_ITERATOR = '@@iterator', + KEYS = 'keys', + VALUES = 'values'; + + var returnThis = function () { + return this; + }; + + module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) { + $iterCreate(Constructor, NAME, next); + var getMethod = function (kind) { + if (!BUGGY && kind in proto) return proto[kind]; + switch (kind) { + case KEYS: + return function keys() { + return new Constructor(this, kind); + }; + case VALUES: + return function values() { + return new Constructor(this, kind); + }; + } + return function entries() { + return new Constructor(this, kind); + }; + }; + var TAG = NAME + ' Iterator', + DEF_VALUES = DEFAULT == VALUES, + VALUES_BUG = false, + proto = Base.prototype, + $native = proto[ITERATOR] || proto[FF_ITERATOR] || (DEFAULT && proto[DEFAULT]), + $default = $native || getMethod(DEFAULT), + $entries = DEFAULT ? (!DEF_VALUES ? $default : getMethod('entries')) : undefined, + $anyNative = NAME == 'Array' ? proto.entries || $native : $native, + methods, + key, + IteratorPrototype; + // Fix native + if ($anyNative) { + IteratorPrototype = getPrototypeOf($anyNative.call(new Base())); + if (IteratorPrototype !== Object.prototype) { + // Set @@toStringTag to native iterators + setToStringTag(IteratorPrototype, TAG, true); + // fix for some old engines + if (!LIBRARY && !has(IteratorPrototype, ITERATOR)) hide(IteratorPrototype, ITERATOR, returnThis); + } + } + // fix Array#{values, @@iterator}.name in V8 / FF + if (DEF_VALUES && $native && $native.name !== VALUES) { + VALUES_BUG = true; + $default = function values() { + return $native.call(this); + }; + } + // Define iterator + if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) { + hide(proto, ITERATOR, $default); + } + // Plug for library + Iterators[NAME] = $default; + Iterators[TAG] = returnThis; + if (DEFAULT) { + methods = { + values: DEF_VALUES ? $default : getMethod(VALUES), + keys: IS_SET ? $default : getMethod(KEYS), + entries: $entries, + }; + if (FORCED) + for (key in methods) { + if (!(key in proto)) redefine(proto, key, methods[key]); + } + else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); + } + return methods; + }; + + /***/ + }, + /* 178 */ + /***/ function (module, exports) { + // 20.2.2.14 Math.expm1(x) + var $expm1 = Math.expm1; + module.exports = + !$expm1 || + // Old FF bug + $expm1(10) > 22025.465794806719 || + $expm1(10) < 22025.4657948067165168 || + // Tor Browser bug + $expm1(-2e-17) != -2e-17 + ? function expm1(x) { + return (x = +x) == 0 ? x : x > -1e-6 && x < 1e-6 ? x + (x * x) / 2 : Math.exp(x) - 1; + } + : $expm1; + + /***/ + }, + /* 179 */ + /***/ function (module, exports) { + // 20.2.2.28 Math.sign(x) + module.exports = + Math.sign || + function sign(x) { + return (x = +x) == 0 || x != x ? x : x < 0 ? -1 : 1; + }; + + /***/ + }, + /* 180 */ + /***/ function (module, exports, __webpack_require__) { + var global = __webpack_require__(8), + macrotask = __webpack_require__(188).set, + Observer = global.MutationObserver || global.WebKitMutationObserver, + process = global.process, + Promise = global.Promise, + isNode = __webpack_require__(40)(process) == 'process'; + + module.exports = function () { + var head, last, notify; + + var flush = function () { + var parent, fn; + if (isNode && (parent = process.domain)) parent.exit(); + while (head) { + fn = head.fn; + head = head.next; + try { + fn(); + } catch (e) { + if (head) notify(); + else last = undefined; + throw e; + } + } + last = undefined; + if (parent) parent.enter(); + }; + + // Node.js + if (isNode) { + notify = function () { + process.nextTick(flush); + }; + // browsers with MutationObserver + } else if (Observer) { + var toggle = true, + node = document.createTextNode(''); + new Observer(flush).observe(node, { characterData: true }); // eslint-disable-line no-new + notify = function () { + node.data = toggle = !toggle; + }; + // environments with maybe non-completely correct, but existent Promise + } else if (Promise && Promise.resolve) { + var promise = Promise.resolve(); + notify = function () { + promise.then(flush); + }; + // for other environments - macrotask based on: + // - setImmediate + // - MessageChannel + // - window.postMessag + // - onreadystatechange + // - setTimeout + } else { + notify = function () { + // strange IE + webpack dev server bug - use .call(global) + macrotask.call(global, flush); + }; + } + + return function (fn) { + var task = { fn: fn, next: undefined }; + if (last) last.next = task; + if (!head) { + head = task; + notify(); + } + last = task; + }; + }; + + /***/ + }, + /* 181 */ + /***/ function (module, exports, __webpack_require__) { + // Works with __proto__ only. Old v8 can't work with null proto objects. + /* eslint-disable no-proto */ + var isObject = __webpack_require__(11), + anObject = __webpack_require__(5); + var check = function (O, proto) { + anObject(O); + if (!isObject(proto) && proto !== null) throw TypeError(proto + ": can't set as prototype!"); + }; + module.exports = { + set: + Object.setPrototypeOf || + ('__proto__' in {} // eslint-disable-line + ? (function (test, buggy, set) { + try { + set = __webpack_require__(56)( + Function.call, + __webpack_require__(36).f(Object.prototype, '__proto__').set, + 2, + ); + set(test, []); + buggy = !(test instanceof Array); + } catch (e) { + buggy = true; + } + return function setPrototypeOf(O, proto) { + check(O, proto); + if (buggy) O.__proto__ = proto; + else set(O, proto); + return O; + }; + })({}, false) + : undefined), + check: check, + }; + + /***/ + }, + /* 182 */ + /***/ function (module, exports, __webpack_require__) { + var shared = __webpack_require__(144)('keys'), + uid = __webpack_require__(84); + module.exports = function (key) { + return shared[key] || (shared[key] = uid(key)); + }; + + /***/ + }, + /* 183 */ + /***/ function (module, exports, __webpack_require__) { + // 7.3.20 SpeciesConstructor(O, defaultConstructor) + var anObject = __webpack_require__(5), + aFunction = __webpack_require__(28), + SPECIES = __webpack_require__(12)('species'); + module.exports = function (O, D) { + var C = anObject(O).constructor, + S; + return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S); + }; + + /***/ + }, + /* 184 */ + /***/ function (module, exports, __webpack_require__) { + var toInteger = __webpack_require__(65), + defined = __webpack_require__(41); + // true -> String#at + // false -> String#codePointAt + module.exports = function (TO_STRING) { + return function (that, pos) { + var s = String(defined(that)), + i = toInteger(pos), + l = s.length, + a, + b; + if (i < 0 || i >= l) return TO_STRING ? '' : undefined; + a = s.charCodeAt(i); + return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff + ? TO_STRING + ? s.charAt(i) + : a + : TO_STRING + ? s.slice(i, i + 2) + : ((a - 0xd800) << 10) + (b - 0xdc00) + 0x10000; + }; + }; + + /***/ + }, + /* 185 */ + /***/ function (module, exports, __webpack_require__) { + // helper for String#{startsWith, endsWith, includes} + var isRegExp = __webpack_require__(140), + defined = __webpack_require__(41); + + module.exports = function (that, searchString, NAME) { + if (isRegExp(searchString)) throw TypeError('String#' + NAME + " doesn't accept regex!"); + return String(defined(that)); + }; + + /***/ + }, + /* 186 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var toInteger = __webpack_require__(65), + defined = __webpack_require__(41); + + module.exports = function repeat(count) { + var str = String(defined(this)), + res = '', + n = toInteger(count); + if (n < 0 || n == Infinity) throw RangeError("Count can't be negative"); + for (; n > 0; (n >>>= 1) && (str += str)) if (n & 1) res += str; + return res; + }; + + /***/ + }, + /* 187 */ + /***/ function (module, exports) { + module.exports = + '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' + + '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'; + + /***/ + }, + /* 188 */ + /***/ function (module, exports, __webpack_require__) { + var ctx = __webpack_require__(56), + invoke = __webpack_require__(139), + html = __webpack_require__(172), + cel = __webpack_require__(169), + global = __webpack_require__(8), + process = global.process, + setTask = global.setImmediate, + clearTask = global.clearImmediate, + MessageChannel = global.MessageChannel, + counter = 0, + queue = {}, + ONREADYSTATECHANGE = 'onreadystatechange', + defer, + channel, + port; + var run = function () { + var id = +this; + if (queue.hasOwnProperty(id)) { + var fn = queue[id]; + delete queue[id]; + fn(); + } + }; + var listener = function (event) { + run.call(event.data); + }; + // Node.js 0.9+ & IE10+ has setImmediate, otherwise: + if (!setTask || !clearTask) { + setTask = function setImmediate(fn) { + var args = [], + i = 1; + while (arguments.length > i) args.push(arguments[i++]); + queue[++counter] = function () { + invoke(typeof fn == 'function' ? fn : Function(fn), args); + }; + defer(counter); + return counter; + }; + clearTask = function clearImmediate(id) { + delete queue[id]; + }; + // Node.js 0.8- + if (__webpack_require__(40)(process) == 'process') { + defer = function (id) { + process.nextTick(ctx(run, id, 1)); + }; + // Browsers with MessageChannel, includes WebWorkers + } else if (MessageChannel) { + channel = new MessageChannel(); + port = channel.port2; + channel.port1.onmessage = listener; + defer = ctx(port.postMessage, port, 1); + // Browsers with postMessage, skip WebWorkers + // IE8 has postMessage, but it's sync & typeof its postMessage is 'object' + } else if (global.addEventListener && typeof postMessage == 'function' && !global.importScripts) { + defer = function (id) { + global.postMessage(id + '', '*'); + }; + global.addEventListener('message', listener, false); + // IE8- + } else if (ONREADYSTATECHANGE in cel('script')) { + defer = function (id) { + html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function () { + html.removeChild(this); + run.call(id); + }; + }; + // Rest old browsers + } else { + defer = function (id) { + setTimeout(ctx(run, id, 1), 0); + }; + } + } + module.exports = { + set: setTask, + clear: clearTask, + }; + + /***/ + }, + /* 189 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var global = __webpack_require__(8), + DESCRIPTORS = __webpack_require__(14), + LIBRARY = __webpack_require__(77), + $typed = __webpack_require__(145), + hide = __webpack_require__(29), + redefineAll = __webpack_require__(81), + fails = __webpack_require__(10), + anInstance = __webpack_require__(76), + toInteger = __webpack_require__(65), + toLength = __webpack_require__(19), + gOPN = __webpack_require__(79).f, + dP = __webpack_require__(15).f, + arrayFill = __webpack_require__(167), + setToStringTag = __webpack_require__(97), + ARRAY_BUFFER = 'ArrayBuffer', + DATA_VIEW = 'DataView', + PROTOTYPE = 'prototype', + WRONG_LENGTH = 'Wrong length!', + WRONG_INDEX = 'Wrong index!', + $ArrayBuffer = global[ARRAY_BUFFER], + $DataView = global[DATA_VIEW], + Math = global.Math, + RangeError = global.RangeError, + Infinity = global.Infinity, + BaseBuffer = $ArrayBuffer, + abs = Math.abs, + pow = Math.pow, + floor = Math.floor, + log = Math.log, + LN2 = Math.LN2, + BUFFER = 'buffer', + BYTE_LENGTH = 'byteLength', + BYTE_OFFSET = 'byteOffset', + $BUFFER = DESCRIPTORS ? '_b' : BUFFER, + $LENGTH = DESCRIPTORS ? '_l' : BYTE_LENGTH, + $OFFSET = DESCRIPTORS ? '_o' : BYTE_OFFSET; + + // IEEE754 conversions based on https://github.com/feross/ieee754 + var packIEEE754 = function (value, mLen, nBytes) { + var buffer = Array(nBytes), + eLen = nBytes * 8 - mLen - 1, + eMax = (1 << eLen) - 1, + eBias = eMax >> 1, + rt = mLen === 23 ? pow(2, -24) - pow(2, -77) : 0, + i = 0, + s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0, + e, + m, + c; + value = abs(value); + if (value != value || value === Infinity) { + m = value != value ? 1 : 0; + e = eMax; + } else { + e = floor(log(value) / LN2); + if (value * (c = pow(2, -e)) < 1) { + e--; + c *= 2; + } + if (e + eBias >= 1) { + value += rt / c; + } else { + value += rt * pow(2, 1 - eBias); + } + if (value * c >= 2) { + e++; + c /= 2; + } + if (e + eBias >= eMax) { + m = 0; + e = eMax; + } else if (e + eBias >= 1) { + m = (value * c - 1) * pow(2, mLen); + e = e + eBias; + } else { + m = value * pow(2, eBias - 1) * pow(2, mLen); + e = 0; + } + } + for (; mLen >= 8; buffer[i++] = m & 255, m /= 256, mLen -= 8); + e = (e << mLen) | m; + eLen += mLen; + for (; eLen > 0; buffer[i++] = e & 255, e /= 256, eLen -= 8); + buffer[--i] |= s * 128; + return buffer; + }; + var unpackIEEE754 = function (buffer, mLen, nBytes) { + var eLen = nBytes * 8 - mLen - 1, + eMax = (1 << eLen) - 1, + eBias = eMax >> 1, + nBits = eLen - 7, + i = nBytes - 1, + s = buffer[i--], + e = s & 127, + m; + s >>= 7; + for (; nBits > 0; e = e * 256 + buffer[i], i--, nBits -= 8); + m = e & ((1 << -nBits) - 1); + e >>= -nBits; + nBits += mLen; + for (; nBits > 0; m = m * 256 + buffer[i], i--, nBits -= 8); + if (e === 0) { + e = 1 - eBias; + } else if (e === eMax) { + return m ? NaN : s ? -Infinity : Infinity; + } else { + m = m + pow(2, mLen); + e = e - eBias; + } + return (s ? -1 : 1) * m * pow(2, e - mLen); + }; + + var unpackI32 = function (bytes) { + return (bytes[3] << 24) | (bytes[2] << 16) | (bytes[1] << 8) | bytes[0]; + }; + var packI8 = function (it) { + return [it & 0xff]; + }; + var packI16 = function (it) { + return [it & 0xff, (it >> 8) & 0xff]; + }; + var packI32 = function (it) { + return [it & 0xff, (it >> 8) & 0xff, (it >> 16) & 0xff, (it >> 24) & 0xff]; + }; + var packF64 = function (it) { + return packIEEE754(it, 52, 8); + }; + var packF32 = function (it) { + return packIEEE754(it, 23, 4); + }; + + var addGetter = function (C, key, internal) { + dP(C[PROTOTYPE], key, { + get: function () { + return this[internal]; + }, + }); + }; + + var get = function (view, bytes, index, isLittleEndian) { + var numIndex = +index, + intIndex = toInteger(numIndex); + if (numIndex != intIndex || intIndex < 0 || intIndex + bytes > view[$LENGTH]) + throw RangeError(WRONG_INDEX); + var store = view[$BUFFER]._b, + start = intIndex + view[$OFFSET], + pack = store.slice(start, start + bytes); + return isLittleEndian ? pack : pack.reverse(); + }; + var set = function (view, bytes, index, conversion, value, isLittleEndian) { + var numIndex = +index, + intIndex = toInteger(numIndex); + if (numIndex != intIndex || intIndex < 0 || intIndex + bytes > view[$LENGTH]) + throw RangeError(WRONG_INDEX); + var store = view[$BUFFER]._b, + start = intIndex + view[$OFFSET], + pack = conversion(+value); + for (var i = 0; i < bytes; i++) store[start + i] = pack[isLittleEndian ? i : bytes - i - 1]; + }; + + var validateArrayBufferArguments = function (that, length) { + anInstance(that, $ArrayBuffer, ARRAY_BUFFER); + var numberLength = +length, + byteLength = toLength(numberLength); + if (numberLength != byteLength) throw RangeError(WRONG_LENGTH); + return byteLength; + }; + + if (!$typed.ABV) { + $ArrayBuffer = function ArrayBuffer(length) { + var byteLength = validateArrayBufferArguments(this, length); + this._b = arrayFill.call(Array(byteLength), 0); + this[$LENGTH] = byteLength; + }; + + $DataView = function DataView(buffer, byteOffset, byteLength) { + anInstance(this, $DataView, DATA_VIEW); + anInstance(buffer, $ArrayBuffer, DATA_VIEW); + var bufferLength = buffer[$LENGTH], + offset = toInteger(byteOffset); + if (offset < 0 || offset > bufferLength) throw RangeError('Wrong offset!'); + byteLength = byteLength === undefined ? bufferLength - offset : toLength(byteLength); + if (offset + byteLength > bufferLength) throw RangeError(WRONG_LENGTH); + this[$BUFFER] = buffer; + this[$OFFSET] = offset; + this[$LENGTH] = byteLength; + }; + + if (DESCRIPTORS) { + addGetter($ArrayBuffer, BYTE_LENGTH, '_l'); + addGetter($DataView, BUFFER, '_b'); + addGetter($DataView, BYTE_LENGTH, '_l'); + addGetter($DataView, BYTE_OFFSET, '_o'); + } + + redefineAll($DataView[PROTOTYPE], { + getInt8: function getInt8(byteOffset) { + return (get(this, 1, byteOffset)[0] << 24) >> 24; + }, + getUint8: function getUint8(byteOffset) { + return get(this, 1, byteOffset)[0]; + }, + getInt16: function getInt16(byteOffset /*, littleEndian */) { + var bytes = get(this, 2, byteOffset, arguments[1]); + return (((bytes[1] << 8) | bytes[0]) << 16) >> 16; + }, + getUint16: function getUint16(byteOffset /*, littleEndian */) { + var bytes = get(this, 2, byteOffset, arguments[1]); + return (bytes[1] << 8) | bytes[0]; + }, + getInt32: function getInt32(byteOffset /*, littleEndian */) { + return unpackI32(get(this, 4, byteOffset, arguments[1])); + }, + getUint32: function getUint32(byteOffset /*, littleEndian */) { + return unpackI32(get(this, 4, byteOffset, arguments[1])) >>> 0; + }, + getFloat32: function getFloat32(byteOffset /*, littleEndian */) { + return unpackIEEE754(get(this, 4, byteOffset, arguments[1]), 23, 4); + }, + getFloat64: function getFloat64(byteOffset /*, littleEndian */) { + return unpackIEEE754(get(this, 8, byteOffset, arguments[1]), 52, 8); + }, + setInt8: function setInt8(byteOffset, value) { + set(this, 1, byteOffset, packI8, value); + }, + setUint8: function setUint8(byteOffset, value) { + set(this, 1, byteOffset, packI8, value); + }, + setInt16: function setInt16(byteOffset, value /*, littleEndian */) { + set(this, 2, byteOffset, packI16, value, arguments[2]); + }, + setUint16: function setUint16(byteOffset, value /*, littleEndian */) { + set(this, 2, byteOffset, packI16, value, arguments[2]); + }, + setInt32: function setInt32(byteOffset, value /*, littleEndian */) { + set(this, 4, byteOffset, packI32, value, arguments[2]); + }, + setUint32: function setUint32(byteOffset, value /*, littleEndian */) { + set(this, 4, byteOffset, packI32, value, arguments[2]); + }, + setFloat32: function setFloat32(byteOffset, value /*, littleEndian */) { + set(this, 4, byteOffset, packF32, value, arguments[2]); + }, + setFloat64: function setFloat64(byteOffset, value /*, littleEndian */) { + set(this, 8, byteOffset, packF64, value, arguments[2]); + }, + }); + } else { + if ( + !fails(function () { + new $ArrayBuffer(); // eslint-disable-line no-new + }) || + !fails(function () { + new $ArrayBuffer(0.5); // eslint-disable-line no-new + }) + ) { + $ArrayBuffer = function ArrayBuffer(length) { + return new BaseBuffer(validateArrayBufferArguments(this, length)); + }; + var ArrayBufferProto = ($ArrayBuffer[PROTOTYPE] = BaseBuffer[PROTOTYPE]); + for (var keys = gOPN(BaseBuffer), j = 0, key; keys.length > j; ) { + if (!((key = keys[j++]) in $ArrayBuffer)) hide($ArrayBuffer, key, BaseBuffer[key]); + } + if (!LIBRARY) ArrayBufferProto.constructor = $ArrayBuffer; + } + // iOS Safari 7.x bug + var view = new $DataView(new $ArrayBuffer(2)), + $setInt8 = $DataView[PROTOTYPE].setInt8; + view.setInt8(0, 2147483648); + view.setInt8(1, 2147483649); + if (view.getInt8(0) || !view.getInt8(1)) + redefineAll( + $DataView[PROTOTYPE], + { + setInt8: function setInt8(byteOffset, value) { + $setInt8.call(this, byteOffset, (value << 24) >> 24); + }, + setUint8: function setUint8(byteOffset, value) { + $setInt8.call(this, byteOffset, (value << 24) >> 24); + }, + }, + true, + ); + } + setToStringTag($ArrayBuffer, ARRAY_BUFFER); + setToStringTag($DataView, DATA_VIEW); + hide($DataView[PROTOTYPE], $typed.VIEW, true); + exports[ARRAY_BUFFER] = $ArrayBuffer; + exports[DATA_VIEW] = $DataView; + + /***/ + }, + /* 190 */ + /***/ function (module, exports, __webpack_require__) { + var global = __webpack_require__(8), + core = __webpack_require__(55), + LIBRARY = __webpack_require__(77), + wksExt = __webpack_require__(295), + defineProperty = __webpack_require__(15).f; + module.exports = function (name) { + var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {}); + if (name.charAt(0) != '_' && !(name in $Symbol)) + defineProperty($Symbol, name, { value: wksExt.f(name) }); + }; + + /***/ + }, + /* 191 */ + /***/ function (module, exports, __webpack_require__) { + var classof = __webpack_require__(119), + ITERATOR = __webpack_require__(12)('iterator'), + Iterators = __webpack_require__(96); + module.exports = __webpack_require__(55).getIteratorMethod = function (it) { + if (it != undefined) return it[ITERATOR] || it['@@iterator'] || Iterators[classof(it)]; + }; + + /***/ + }, + /* 192 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var addToUnscopables = __webpack_require__(94), + step = __webpack_require__(283), + Iterators = __webpack_require__(96), + toIObject = __webpack_require__(32); + + // 22.1.3.4 Array.prototype.entries() + // 22.1.3.13 Array.prototype.keys() + // 22.1.3.29 Array.prototype.values() + // 22.1.3.30 Array.prototype[@@iterator]() + module.exports = __webpack_require__(177)( + Array, + 'Array', + function (iterated, kind) { + this._t = toIObject(iterated); // target + this._i = 0; // next index + this._k = kind; // kind + // 22.1.5.2.1 %ArrayIteratorPrototype%.next() + }, + function () { + var O = this._t, + kind = this._k, + index = this._i++; + if (!O || index >= O.length) { + this._t = undefined; + return step(1); + } + if (kind == 'keys') return step(0, index); + if (kind == 'values') return step(0, O[index]); + return step(0, [index, O[index]]); + }, + 'values', + ); + + // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) + Iterators.Arguments = Iterators.Array; + + addToUnscopables('keys'); + addToUnscopables('values'); + addToUnscopables('entries'); + + /***/ + }, + /* 193 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = { + ResizeSensor: __webpack_require__(300), + ElementQueries: __webpack_require__(704), + }; + + /***/ + }, + /* 194 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @typechecks + * + */ + + /*eslint-disable no-self-compare */ + + var hasOwnProperty = Object.prototype.hasOwnProperty; + + /** + * inlined Object.is polyfill to avoid requiring consumers ship their own + * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is + */ + function is(x, y) { + // SameValue algorithm + if (x === y) { + // Steps 1-5, 7-10 + // Steps 6.b-6.e: +0 != -0 + // Added the nonzero y check to make Flow happy, but it is redundant + return x !== 0 || y !== 0 || 1 / x === 1 / y; + } else { + // Step 6.a: NaN == NaN + return x !== x && y !== y; + } + } + + /** + * Performs equality by iterating through keys on an object and returning false + * when any key has values which are not strictly equal between the arguments. + * Returns true when the values of all keys are strictly equal. + */ + function shallowEqual(objA, objB) { + if (is(objA, objB)) { + return true; + } + + if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) { + return false; + } + + var keysA = Object.keys(objA); + var keysB = Object.keys(objB); + + if (keysA.length !== keysB.length) { + return false; + } + + // Test for A's keys different from B. + for (var i = 0; i < keysA.length; i++) { + if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) { + return false; + } + } + + return true; + } + + module.exports = shallowEqual; + + /***/ + }, + /* 195 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + exports.go = + exports.replaceLocation = + exports.pushLocation = + exports.startListener = + exports.getUserConfirmation = + exports.getCurrentLocation = + undefined; + + var _LocationUtils = __webpack_require__(99); + + var _DOMUtils = __webpack_require__(147); + + var _DOMStateStorage = __webpack_require__(304); + + var _PathUtils = __webpack_require__(67); + + var _ExecutionEnvironment = __webpack_require__(196); + + var PopStateEvent = 'popstate'; + var HashChangeEvent = 'hashchange'; + + var needsHashchangeListener = + _ExecutionEnvironment.canUseDOM && !(0, _DOMUtils.supportsPopstateOnHashchange)(); + + var _createLocation = function _createLocation(historyState) { + var key = historyState && historyState.key; + + return (0, _LocationUtils.createLocation)( + { + pathname: window.location.pathname, + search: window.location.search, + hash: window.location.hash, + state: key ? (0, _DOMStateStorage.readState)(key) : undefined, + }, + undefined, + key, + ); + }; + + var getCurrentLocation = (exports.getCurrentLocation = function getCurrentLocation() { + var historyState = void 0; + try { + historyState = window.history.state || {}; + } catch (error) { + // IE 11 sometimes throws when accessing window.history.state + // See https://github.com/ReactTraining/history/pull/289 + historyState = {}; + } + + return _createLocation(historyState); + }); + + var getUserConfirmation = (exports.getUserConfirmation = function getUserConfirmation( + message, + callback, + ) { + return callback(window.confirm(message)); + }); // eslint-disable-line no-alert + + var startListener = (exports.startListener = function startListener(listener) { + var handlePopState = function handlePopState(event) { + if ((0, _DOMUtils.isExtraneousPopstateEvent)(event)) + // Ignore extraneous popstate events in WebKit + return; + listener(_createLocation(event.state)); + }; + + (0, _DOMUtils.addEventListener)(window, PopStateEvent, handlePopState); + + var handleUnpoppedHashChange = function handleUnpoppedHashChange() { + return listener(getCurrentLocation()); + }; + + if (needsHashchangeListener) { + (0, _DOMUtils.addEventListener)(window, HashChangeEvent, handleUnpoppedHashChange); + } + + return function () { + (0, _DOMUtils.removeEventListener)(window, PopStateEvent, handlePopState); + + if (needsHashchangeListener) { + (0, _DOMUtils.removeEventListener)(window, HashChangeEvent, handleUnpoppedHashChange); + } + }; + }); + + var updateLocation = function updateLocation(location, updateState) { + var state = location.state, + key = location.key; + + if (state !== undefined) (0, _DOMStateStorage.saveState)(key, state); + + updateState({ key: key }, (0, _PathUtils.createPath)(location)); + }; + + var pushLocation = (exports.pushLocation = function pushLocation(location) { + return updateLocation(location, function (state, path) { + return window.history.pushState(state, null, path); + }); + }); + + var replaceLocation = (exports.replaceLocation = function replaceLocation(location) { + return updateLocation(location, function (state, path) { + return window.history.replaceState(state, null, path); + }); + }); + + var go = (exports.go = function go(n) { + if (n) window.history.go(n); + }); + + /***/ + }, + /* 196 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + var canUseDOM = (exports.canUseDOM = !!( + typeof window !== 'undefined' && + window.document && + window.document.createElement + )); + + /***/ + }, + /* 197 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + + var _AsyncUtils = __webpack_require__(723); + + var _PathUtils = __webpack_require__(67); + + var _runTransitionHook = __webpack_require__(198); + + var _runTransitionHook2 = _interopRequireDefault(_runTransitionHook); + + var _Actions = __webpack_require__(146); + + var _LocationUtils = __webpack_require__(99); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + var createHistory = function createHistory() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + var getCurrentLocation = options.getCurrentLocation, + getUserConfirmation = options.getUserConfirmation, + pushLocation = options.pushLocation, + replaceLocation = options.replaceLocation, + go = options.go, + keyLength = options.keyLength; + + var currentLocation = void 0; + var pendingLocation = void 0; + var beforeListeners = []; + var listeners = []; + var allKeys = []; + + var getCurrentIndex = function getCurrentIndex() { + if (pendingLocation && pendingLocation.action === _Actions.POP) + return allKeys.indexOf(pendingLocation.key); + + if (currentLocation) return allKeys.indexOf(currentLocation.key); + + return -1; + }; + + var updateLocation = function updateLocation(nextLocation) { + var currentIndex = getCurrentIndex(); + + currentLocation = nextLocation; + + if (currentLocation.action === _Actions.PUSH) { + allKeys = [].concat(allKeys.slice(0, currentIndex + 1), [currentLocation.key]); + } else if (currentLocation.action === _Actions.REPLACE) { + allKeys[currentIndex] = currentLocation.key; + } + + listeners.forEach(function (listener) { + return listener(currentLocation); + }); + }; + + var listenBefore = function listenBefore(listener) { + beforeListeners.push(listener); + + return function () { + return (beforeListeners = beforeListeners.filter(function (item) { + return item !== listener; + })); + }; + }; + + var listen = function listen(listener) { + listeners.push(listener); + + return function () { + return (listeners = listeners.filter(function (item) { + return item !== listener; + })); + }; + }; + + var confirmTransitionTo = function confirmTransitionTo(location, callback) { + (0, _AsyncUtils.loopAsync)( + beforeListeners.length, + function (index, next, done) { + (0, _runTransitionHook2.default)(beforeListeners[index], location, function (result) { + return result != null ? done(result) : next(); + }); + }, + function (message) { + if (getUserConfirmation && typeof message === 'string') { + getUserConfirmation(message, function (ok) { + return callback(ok !== false); + }); + } else { + callback(message !== false); + } + }, + ); + }; + + var transitionTo = function transitionTo(nextLocation) { + if ( + (currentLocation && (0, _LocationUtils.locationsAreEqual)(currentLocation, nextLocation)) || + (pendingLocation && (0, _LocationUtils.locationsAreEqual)(pendingLocation, nextLocation)) + ) + return; // Nothing to do + + pendingLocation = nextLocation; + + confirmTransitionTo(nextLocation, function (ok) { + if (pendingLocation !== nextLocation) return; // Transition was interrupted during confirmation + + pendingLocation = null; + + if (ok) { + // Treat PUSH to same path like REPLACE to be consistent with browsers + if (nextLocation.action === _Actions.PUSH) { + var prevPath = (0, _PathUtils.createPath)(currentLocation); + var nextPath = (0, _PathUtils.createPath)(nextLocation); + + if ( + nextPath === prevPath && + (0, _LocationUtils.statesAreEqual)(currentLocation.state, nextLocation.state) + ) + nextLocation.action = _Actions.REPLACE; + } + + if (nextLocation.action === _Actions.POP) { + updateLocation(nextLocation); + } else if (nextLocation.action === _Actions.PUSH) { + if (pushLocation(nextLocation) !== false) updateLocation(nextLocation); + } else if (nextLocation.action === _Actions.REPLACE) { + if (replaceLocation(nextLocation) !== false) updateLocation(nextLocation); + } + } else if (currentLocation && nextLocation.action === _Actions.POP) { + var prevIndex = allKeys.indexOf(currentLocation.key); + var nextIndex = allKeys.indexOf(nextLocation.key); + + if (prevIndex !== -1 && nextIndex !== -1) go(prevIndex - nextIndex); // Restore the URL + } + }); + }; + + var push = function push(input) { + return transitionTo(createLocation(input, _Actions.PUSH)); + }; + + var replace = function replace(input) { + return transitionTo(createLocation(input, _Actions.REPLACE)); + }; + + var goBack = function goBack() { + return go(-1); + }; + + var goForward = function goForward() { + return go(1); + }; + + var createKey = function createKey() { + return Math.random() + .toString(36) + .substr(2, keyLength || 6); + }; + + var createHref = function createHref(location) { + return (0, _PathUtils.createPath)(location); + }; + + var createLocation = function createLocation(location, action) { + var key = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : createKey(); + return (0, _LocationUtils.createLocation)(location, action, key); + }; + + return { + getCurrentLocation: getCurrentLocation, + listenBefore: listenBefore, + listen: listen, + transitionTo: transitionTo, + push: push, + replace: replace, + go: go, + goBack: goBack, + goForward: goForward, + createKey: createKey, + createPath: _PathUtils.createPath, + createHref: createHref, + createLocation: createLocation, + }; + }; + + exports.default = createHistory; + + /***/ + }, + /* 198 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + + var _warning = __webpack_require__(71); + + var _warning2 = _interopRequireDefault(_warning); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + var runTransitionHook = function runTransitionHook(hook, location, callback) { + var result = hook(location, callback); + + if (hook.length < 2) { + // Assume the hook runs synchronously and automatically + // call the callback with the return value. + callback(result); + } else { + true + ? (0, _warning2.default)( + result === undefined, + 'You should not "return" in a transition hook with a callback argument; ' + + 'call the callback instead', + ) + : void 0; + } + }; + + exports.default = runTransitionHook; + + /***/ + }, + /* 199 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__ = __webpack_require__(729); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getPrototype_js__ = __webpack_require__(731); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isObjectLike_js__ = __webpack_require__(736); + + /** `Object#toString` result references. */ + var objectTag = '[object Object]'; + + /** Used for built-in method references. */ + var funcProto = Function.prototype, + objectProto = Object.prototype; + + /** Used to resolve the decompiled source of functions. */ + var funcToString = funcProto.toString; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** Used to infer the `Object` constructor. */ + var objectCtorString = funcToString.call(Object); + + /** + * Checks if `value` is a plain object, that is, an object created by the + * `Object` constructor or one with a `[[Prototype]]` of `null`. + * + * @static + * @memberOf _ + * @since 0.8.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * _.isPlainObject(new Foo); + * // => false + * + * _.isPlainObject([1, 2, 3]); + * // => false + * + * _.isPlainObject({ 'x': 0, 'y': 0 }); + * // => true + * + * _.isPlainObject(Object.create(null)); + * // => true + */ + function isPlainObject(value) { + if ( + !__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__isObjectLike_js__['a' /* default */])(value) || + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__['a' /* default */])(value) != + objectTag + ) { + return false; + } + var proto = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__getPrototype_js__['a' /* default */])( + value, + ); + if (proto === null) { + return true; + } + var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; + return ( + typeof Ctor == 'function' && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString + ); + } + + /* harmony default export */ __webpack_exports__['a'] = isPlainObject; + + /***/ + }, + /* 200 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var DOMLazyTree = __webpack_require__(102); + var Danger = __webpack_require__(753); + var ReactDOMComponentTree = __webpack_require__(16); + var ReactInstrumentation = __webpack_require__(33); + + var createMicrosoftUnsafeLocalFunction = __webpack_require__(210); + var setInnerHTML = __webpack_require__(151); + var setTextContent = __webpack_require__(341); + + function getNodeAfter(parentNode, node) { + // Special case for text components, which return [open, close] comments + // from getHostNode. + if (Array.isArray(node)) { + node = node[1]; + } + return node ? node.nextSibling : parentNode.firstChild; + } + + /** + * Inserts `childNode` as a child of `parentNode` at the `index`. + * + * @param {DOMElement} parentNode Parent node in which to insert. + * @param {DOMElement} childNode Child node to insert. + * @param {number} index Index at which to insert the child. + * @internal + */ + var insertChildAt = createMicrosoftUnsafeLocalFunction(function (parentNode, childNode, referenceNode) { + // We rely exclusively on `insertBefore(node, null)` instead of also using + // `appendChild(node)`. (Using `undefined` is not allowed by all browsers so + // we are careful to use `null`.) + parentNode.insertBefore(childNode, referenceNode); + }); + + function insertLazyTreeChildAt(parentNode, childTree, referenceNode) { + DOMLazyTree.insertTreeBefore(parentNode, childTree, referenceNode); + } + + function moveChild(parentNode, childNode, referenceNode) { + if (Array.isArray(childNode)) { + moveDelimitedText(parentNode, childNode[0], childNode[1], referenceNode); + } else { + insertChildAt(parentNode, childNode, referenceNode); + } + } + + function removeChild(parentNode, childNode) { + if (Array.isArray(childNode)) { + var closingComment = childNode[1]; + childNode = childNode[0]; + removeDelimitedText(parentNode, childNode, closingComment); + parentNode.removeChild(closingComment); + } + parentNode.removeChild(childNode); + } + + function moveDelimitedText(parentNode, openingComment, closingComment, referenceNode) { + var node = openingComment; + while (true) { + var nextNode = node.nextSibling; + insertChildAt(parentNode, node, referenceNode); + if (node === closingComment) { + break; + } + node = nextNode; + } + } + + function removeDelimitedText(parentNode, startNode, closingComment) { + while (true) { + var node = startNode.nextSibling; + if (node === closingComment) { + // The closing comment is removed by ReactMultiChild. + break; + } else { + parentNode.removeChild(node); + } + } + } + + function replaceDelimitedText(openingComment, closingComment, stringText) { + var parentNode = openingComment.parentNode; + var nodeAfterComment = openingComment.nextSibling; + if (nodeAfterComment === closingComment) { + // There are no text nodes between the opening and closing comments; insert + // a new one if stringText isn't empty. + if (stringText) { + insertChildAt(parentNode, document.createTextNode(stringText), nodeAfterComment); + } + } else { + if (stringText) { + // Set the text content of the first node after the opening comment, and + // remove all following nodes up until the closing comment. + setTextContent(nodeAfterComment, stringText); + removeDelimitedText(parentNode, nodeAfterComment, closingComment); + } else { + removeDelimitedText(parentNode, openingComment, closingComment); + } + } + + if (true) { + ReactInstrumentation.debugTool.onHostOperation({ + instanceID: ReactDOMComponentTree.getInstanceFromNode(openingComment)._debugID, + type: 'replace text', + payload: stringText, + }); + } + } + + var dangerouslyReplaceNodeWithMarkup = Danger.dangerouslyReplaceNodeWithMarkup; + if (true) { + dangerouslyReplaceNodeWithMarkup = function (oldChild, markup, prevInstance) { + Danger.dangerouslyReplaceNodeWithMarkup(oldChild, markup); + if (prevInstance._debugID !== 0) { + ReactInstrumentation.debugTool.onHostOperation({ + instanceID: prevInstance._debugID, + type: 'replace with', + payload: markup.toString(), + }); + } else { + var nextInstance = ReactDOMComponentTree.getInstanceFromNode(markup.node); + if (nextInstance._debugID !== 0) { + ReactInstrumentation.debugTool.onHostOperation({ + instanceID: nextInstance._debugID, + type: 'mount', + payload: markup.toString(), + }); + } + } + }; + } + + /** + * Operations for updating with DOM children. + */ + var DOMChildrenOperations = { + dangerouslyReplaceNodeWithMarkup: dangerouslyReplaceNodeWithMarkup, + + replaceDelimitedText: replaceDelimitedText, + + /** + * Updates a component's children by processing a series of updates. The + * update configurations are each expected to have a `parentNode` property. + * + * @param {array} updates List of update configurations. + * @internal + */ + processUpdates: function (parentNode, updates) { + if (true) { + var parentNodeDebugID = ReactDOMComponentTree.getInstanceFromNode(parentNode)._debugID; + } + + for (var k = 0; k < updates.length; k++) { + var update = updates[k]; + switch (update.type) { + case 'INSERT_MARKUP': + insertLazyTreeChildAt(parentNode, update.content, getNodeAfter(parentNode, update.afterNode)); + if (true) { + ReactInstrumentation.debugTool.onHostOperation({ + instanceID: parentNodeDebugID, + type: 'insert child', + payload: { toIndex: update.toIndex, content: update.content.toString() }, + }); + } + break; + case 'MOVE_EXISTING': + moveChild(parentNode, update.fromNode, getNodeAfter(parentNode, update.afterNode)); + if (true) { + ReactInstrumentation.debugTool.onHostOperation({ + instanceID: parentNodeDebugID, + type: 'move child', + payload: { fromIndex: update.fromIndex, toIndex: update.toIndex }, + }); + } + break; + case 'SET_MARKUP': + setInnerHTML(parentNode, update.content); + if (true) { + ReactInstrumentation.debugTool.onHostOperation({ + instanceID: parentNodeDebugID, + type: 'replace children', + payload: update.content.toString(), + }); + } + break; + case 'TEXT_CONTENT': + setTextContent(parentNode, update.content); + if (true) { + ReactInstrumentation.debugTool.onHostOperation({ + instanceID: parentNodeDebugID, + type: 'replace text', + payload: update.content.toString(), + }); + } + break; + case 'REMOVE_NODE': + removeChild(parentNode, update.fromNode); + if (true) { + ReactInstrumentation.debugTool.onHostOperation({ + instanceID: parentNodeDebugID, + type: 'remove child', + payload: { fromIndex: update.fromIndex }, + }); + } + break; + } + } + }, + }; + + module.exports = DOMChildrenOperations; + + /***/ + }, + /* 201 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var DOMNamespaces = { + html: 'http://www.w3.org/1999/xhtml', + mathml: 'http://www.w3.org/1998/Math/MathML', + svg: 'http://www.w3.org/2000/svg', + }; + + module.exports = DOMNamespaces; + + /***/ + }, + /* 202 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var _prodInvariant = __webpack_require__(7); + + var ReactErrorUtils = __webpack_require__(208); + + var invariant = __webpack_require__(3); + var warning = __webpack_require__(4); + + /** + * Injected dependencies: + */ + + /** + * - `ComponentTree`: [required] Module that can convert between React instances + * and actual node references. + */ + var ComponentTree; + var TreeTraversal; + var injection = { + injectComponentTree: function (Injected) { + ComponentTree = Injected; + if (true) { + true + ? warning( + Injected && Injected.getNodeFromInstance && Injected.getInstanceFromNode, + 'EventPluginUtils.injection.injectComponentTree(...): Injected ' + + 'module is missing getNodeFromInstance or getInstanceFromNode.', + ) + : void 0; + } + }, + injectTreeTraversal: function (Injected) { + TreeTraversal = Injected; + if (true) { + true + ? warning( + Injected && Injected.isAncestor && Injected.getLowestCommonAncestor, + 'EventPluginUtils.injection.injectTreeTraversal(...): Injected ' + + 'module is missing isAncestor or getLowestCommonAncestor.', + ) + : void 0; + } + }, + }; + + function isEndish(topLevelType) { + return ( + topLevelType === 'topMouseUp' || topLevelType === 'topTouchEnd' || topLevelType === 'topTouchCancel' + ); + } + + function isMoveish(topLevelType) { + return topLevelType === 'topMouseMove' || topLevelType === 'topTouchMove'; + } + function isStartish(topLevelType) { + return topLevelType === 'topMouseDown' || topLevelType === 'topTouchStart'; + } + + var validateEventDispatches; + if (true) { + validateEventDispatches = function (event) { + var dispatchListeners = event._dispatchListeners; + var dispatchInstances = event._dispatchInstances; + + var listenersIsArr = Array.isArray(dispatchListeners); + var listenersLen = listenersIsArr ? dispatchListeners.length : dispatchListeners ? 1 : 0; + + var instancesIsArr = Array.isArray(dispatchInstances); + var instancesLen = instancesIsArr ? dispatchInstances.length : dispatchInstances ? 1 : 0; + + true + ? warning( + instancesIsArr === listenersIsArr && instancesLen === listenersLen, + 'EventPluginUtils: Invalid `event`.', + ) + : void 0; + }; + } + + /** + * Dispatch the event to the listener. + * @param {SyntheticEvent} event SyntheticEvent to handle + * @param {boolean} simulated If the event is simulated (changes exn behavior) + * @param {function} listener Application-level callback + * @param {*} inst Internal component instance + */ + function executeDispatch(event, simulated, listener, inst) { + var type = event.type || 'unknown-event'; + event.currentTarget = EventPluginUtils.getNodeFromInstance(inst); + if (simulated) { + ReactErrorUtils.invokeGuardedCallbackWithCatch(type, listener, event); + } else { + ReactErrorUtils.invokeGuardedCallback(type, listener, event); + } + event.currentTarget = null; + } + + /** + * Standard/simple iteration through an event's collected dispatches. + */ + function executeDispatchesInOrder(event, simulated) { + var dispatchListeners = event._dispatchListeners; + var dispatchInstances = event._dispatchInstances; + if (true) { + validateEventDispatches(event); + } + if (Array.isArray(dispatchListeners)) { + for (var i = 0; i < dispatchListeners.length; i++) { + if (event.isPropagationStopped()) { + break; + } + // Listeners and Instances are two parallel arrays that are always in sync. + executeDispatch(event, simulated, dispatchListeners[i], dispatchInstances[i]); + } + } else if (dispatchListeners) { + executeDispatch(event, simulated, dispatchListeners, dispatchInstances); + } + event._dispatchListeners = null; + event._dispatchInstances = null; + } + + /** + * Standard/simple iteration through an event's collected dispatches, but stops + * at the first dispatch execution returning true, and returns that id. + * + * @return {?string} id of the first dispatch execution who's listener returns + * true, or null if no listener returned true. + */ + function executeDispatchesInOrderStopAtTrueImpl(event) { + var dispatchListeners = event._dispatchListeners; + var dispatchInstances = event._dispatchInstances; + if (true) { + validateEventDispatches(event); + } + if (Array.isArray(dispatchListeners)) { + for (var i = 0; i < dispatchListeners.length; i++) { + if (event.isPropagationStopped()) { + break; + } + // Listeners and Instances are two parallel arrays that are always in sync. + if (dispatchListeners[i](event, dispatchInstances[i])) { + return dispatchInstances[i]; + } + } + } else if (dispatchListeners) { + if (dispatchListeners(event, dispatchInstances)) { + return dispatchInstances; + } + } + return null; + } + + /** + * @see executeDispatchesInOrderStopAtTrueImpl + */ + function executeDispatchesInOrderStopAtTrue(event) { + var ret = executeDispatchesInOrderStopAtTrueImpl(event); + event._dispatchInstances = null; + event._dispatchListeners = null; + return ret; + } + + /** + * Execution of a "direct" dispatch - there must be at most one dispatch + * accumulated on the event or it is considered an error. It doesn't really make + * sense for an event with multiple dispatches (bubbled) to keep track of the + * return values at each dispatch execution, but it does tend to make sense when + * dealing with "direct" dispatches. + * + * @return {*} The return value of executing the single dispatch. + */ + function executeDirectDispatch(event) { + if (true) { + validateEventDispatches(event); + } + var dispatchListener = event._dispatchListeners; + var dispatchInstance = event._dispatchInstances; + !!Array.isArray(dispatchListener) + ? true + ? invariant(false, 'executeDirectDispatch(...): Invalid `event`.') + : _prodInvariant('103') + : void 0; + event.currentTarget = dispatchListener + ? EventPluginUtils.getNodeFromInstance(dispatchInstance) + : null; + var res = dispatchListener ? dispatchListener(event) : null; + event.currentTarget = null; + event._dispatchListeners = null; + event._dispatchInstances = null; + return res; + } + + /** + * @param {SyntheticEvent} event + * @return {boolean} True iff number of dispatches accumulated is greater than 0. + */ + function hasDispatches(event) { + return !!event._dispatchListeners; + } + + /** + * General utilities that are useful in creating custom Event Plugins. + */ + var EventPluginUtils = { + isEndish: isEndish, + isMoveish: isMoveish, + isStartish: isStartish, + + executeDirectDispatch: executeDirectDispatch, + executeDispatchesInOrder: executeDispatchesInOrder, + executeDispatchesInOrderStopAtTrue: executeDispatchesInOrderStopAtTrue, + hasDispatches: hasDispatches, + + getInstanceFromNode: function (node) { + return ComponentTree.getInstanceFromNode(node); + }, + getNodeFromInstance: function (node) { + return ComponentTree.getNodeFromInstance(node); + }, + isAncestor: function (a, b) { + return TreeTraversal.isAncestor(a, b); + }, + getLowestCommonAncestor: function (a, b) { + return TreeTraversal.getLowestCommonAncestor(a, b); + }, + getParentInstance: function (inst) { + return TreeTraversal.getParentInstance(inst); + }, + traverseTwoPhase: function (target, fn, arg) { + return TreeTraversal.traverseTwoPhase(target, fn, arg); + }, + traverseEnterLeave: function (from, to, fn, argFrom, argTo) { + return TreeTraversal.traverseEnterLeave(from, to, fn, argFrom, argTo); + }, + + injection: injection, + }; + + module.exports = EventPluginUtils; + + /***/ + }, + /* 203 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + /** + * Escape and wrap key so it is safe to use as a reactid + * + * @param {string} key to be escaped. + * @return {string} the escaped key. + */ + + function escape(key) { + var escapeRegex = /[=:]/g; + var escaperLookup = { + '=': '=0', + ':': '=2', + }; + var escapedString = ('' + key).replace(escapeRegex, function (match) { + return escaperLookup[match]; + }); + + return '$' + escapedString; + } + + /** + * Unescape and unwrap key for human-readable display + * + * @param {string} key to unescape. + * @return {string} the unescaped key. + */ + function unescape(key) { + var unescapeRegex = /(=0|=2)/g; + var unescaperLookup = { + '=0': '=', + '=2': ':', + }; + var keySubstring = key[0] === '.' && key[1] === '$' ? key.substring(2) : key.substring(1); + + return ('' + keySubstring).replace(unescapeRegex, function (match) { + return unescaperLookup[match]; + }); + } + + var KeyEscapeUtils = { + escape: escape, + unescape: unescape, + }; + + module.exports = KeyEscapeUtils; + + /***/ + }, + /* 204 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var _prodInvariant = __webpack_require__(7); + + var ReactPropTypesSecret = __webpack_require__(329); + var propTypesFactory = __webpack_require__(101); + + var React = __webpack_require__(38); + var PropTypes = propTypesFactory(React.isValidElement); + + var invariant = __webpack_require__(3); + var warning = __webpack_require__(4); + + var hasReadOnlyValue = { + button: true, + checkbox: true, + image: true, + hidden: true, + radio: true, + reset: true, + submit: true, + }; + + function _assertSingleLink(inputProps) { + !(inputProps.checkedLink == null || inputProps.valueLink == null) + ? true + ? invariant( + false, + "Cannot provide a checkedLink and a valueLink. If you want to use checkedLink, you probably don't want to use valueLink and vice versa.", + ) + : _prodInvariant('87') + : void 0; + } + function _assertValueLink(inputProps) { + _assertSingleLink(inputProps); + !(inputProps.value == null && inputProps.onChange == null) + ? true + ? invariant( + false, + "Cannot provide a valueLink and a value or onChange event. If you want to use value or onChange, you probably don't want to use valueLink.", + ) + : _prodInvariant('88') + : void 0; + } + + function _assertCheckedLink(inputProps) { + _assertSingleLink(inputProps); + !(inputProps.checked == null && inputProps.onChange == null) + ? true + ? invariant( + false, + "Cannot provide a checkedLink and a checked property or onChange event. If you want to use checked or onChange, you probably don't want to use checkedLink", + ) + : _prodInvariant('89') + : void 0; + } + + var propTypes = { + value: function (props, propName, componentName) { + if ( + !props[propName] || + hasReadOnlyValue[props.type] || + props.onChange || + props.readOnly || + props.disabled + ) { + return null; + } + return new Error( + 'You provided a `value` prop to a form field without an ' + + '`onChange` handler. This will render a read-only field. If ' + + 'the field should be mutable use `defaultValue`. Otherwise, ' + + 'set either `onChange` or `readOnly`.', + ); + }, + checked: function (props, propName, componentName) { + if (!props[propName] || props.onChange || props.readOnly || props.disabled) { + return null; + } + return new Error( + 'You provided a `checked` prop to a form field without an ' + + '`onChange` handler. This will render a read-only field. If ' + + 'the field should be mutable use `defaultChecked`. Otherwise, ' + + 'set either `onChange` or `readOnly`.', + ); + }, + onChange: PropTypes.func, + }; + + var loggedTypeFailures = {}; + function getDeclarationErrorAddendum(owner) { + if (owner) { + var name = owner.getName(); + if (name) { + return ' Check the render method of `' + name + '`.'; + } + } + return ''; + } + + /** + * Provide a linked `value` attribute for controlled forms. You should not use + * this outside of the ReactDOM controlled form components. + */ + var LinkedValueUtils = { + checkPropTypes: function (tagName, props, owner) { + for (var propName in propTypes) { + if (propTypes.hasOwnProperty(propName)) { + var error = propTypes[propName](props, propName, tagName, 'prop', null, ReactPropTypesSecret); + } + if (error instanceof Error && !(error.message in loggedTypeFailures)) { + // Only monitor this failure once because there tends to be a lot of the + // same error. + loggedTypeFailures[error.message] = true; + + var addendum = getDeclarationErrorAddendum(owner); + true ? warning(false, 'Failed form propType: %s%s', error.message, addendum) : void 0; + } + } + }, + + /** + * @param {object} inputProps Props for form component + * @return {*} current value of the input either from value prop or link. + */ + getValue: function (inputProps) { + if (inputProps.valueLink) { + _assertValueLink(inputProps); + return inputProps.valueLink.value; + } + return inputProps.value; + }, + + /** + * @param {object} inputProps Props for form component + * @return {*} current checked status of the input either from checked prop + * or link. + */ + getChecked: function (inputProps) { + if (inputProps.checkedLink) { + _assertCheckedLink(inputProps); + return inputProps.checkedLink.value; + } + return inputProps.checked; + }, + + /** + * @param {object} inputProps Props for form component + * @param {SyntheticEvent} event change event to handle + */ + executeOnChange: function (inputProps, event) { + if (inputProps.valueLink) { + _assertValueLink(inputProps); + return inputProps.valueLink.requestChange(event.target.value); + } else if (inputProps.checkedLink) { + _assertCheckedLink(inputProps); + return inputProps.checkedLink.requestChange(event.target.checked); + } else if (inputProps.onChange) { + return inputProps.onChange.call(undefined, event); + } + }, + }; + + module.exports = LinkedValueUtils; + + /***/ + }, + /* 205 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2014-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + var _prodInvariant = __webpack_require__(7); + + var invariant = __webpack_require__(3); + + var injected = false; + + var ReactComponentEnvironment = { + /** + * Optionally injectable hook for swapping out mount images in the middle of + * the tree. + */ + replaceNodeWithMarkup: null, + + /** + * Optionally injectable hook for processing a queue of child updates. Will + * later move into MultiChildComponents. + */ + processChildrenUpdates: null, + + injection: { + injectEnvironment: function (environment) { + !!injected + ? true + ? invariant(false, 'ReactCompositeComponent: injectEnvironment() can only be called once.') + : _prodInvariant('104') + : void 0; + ReactComponentEnvironment.replaceNodeWithMarkup = environment.replaceNodeWithMarkup; + ReactComponentEnvironment.processChildrenUpdates = environment.processChildrenUpdates; + injected = true; + }, + }, + }; + + module.exports = ReactComponentEnvironment; + + /***/ + }, + /* 206 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + /* globals __REACT_DEVTOOLS_GLOBAL_HOOK__*/ + + var ReactDOMComponentTree = __webpack_require__(16); + var ReactDefaultInjection = __webpack_require__(321); + var ReactMount = __webpack_require__(327); + var ReactReconciler = __webpack_require__(69); + var ReactUpdates = __webpack_require__(34); + var ReactVersion = __webpack_require__(332); + + var findDOMNode = __webpack_require__(335); + var getHostComponentFromComposite = __webpack_require__(337); + var renderSubtreeIntoContainer = __webpack_require__(812); + var warning = __webpack_require__(4); + + ReactDefaultInjection.inject(); + + var ReactDOM = { + findDOMNode: findDOMNode, + render: ReactMount.render, + unmountComponentAtNode: ReactMount.unmountComponentAtNode, + version: ReactVersion, + + /* eslint-disable camelcase */ + unstable_batchedUpdates: ReactUpdates.batchedUpdates, + unstable_renderSubtreeIntoContainer: renderSubtreeIntoContainer, + }; + + // Inject the runtime into a devtools global hook regardless of browser. + // Allows for debugging when the hook is injected on the page. + if ( + typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' && + typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject === 'function' + ) { + __REACT_DEVTOOLS_GLOBAL_HOOK__.inject({ + ComponentTree: { + getClosestInstanceFromNode: ReactDOMComponentTree.getClosestInstanceFromNode, + getNodeFromInstance: function (inst) { + // inst is an internal instance (but could be a composite) + if (inst._renderedComponent) { + inst = getHostComponentFromComposite(inst); + } + if (inst) { + return ReactDOMComponentTree.getNodeFromInstance(inst); + } else { + return null; + } + }, + }, + Mount: ReactMount, + Reconciler: ReactReconciler, + }); + } + + if (true) { + var ExecutionEnvironment = __webpack_require__(17); + if (ExecutionEnvironment.canUseDOM && window.top === window.self) { + // First check if devtools is not installed + if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined') { + // If we're in Chrome or Firefox, provide a download link if not installed. + if ( + (navigator.userAgent.indexOf('Chrome') > -1 && navigator.userAgent.indexOf('Edge') === -1) || + navigator.userAgent.indexOf('Firefox') > -1 + ) { + // Firefox does not have the issue with devtools loaded over file:// + var showFileUrlMessage = + window.location.protocol.indexOf('http') === -1 && + navigator.userAgent.indexOf('Firefox') === -1; + console.debug( + 'Download the React DevTools ' + + (showFileUrlMessage ? 'and use an HTTP server (instead of a file: URL) ' : '') + + 'for a better development experience: ' + + 'https://fb.me/react-devtools', + ); + } + } + + var testFunc = function testFn() {}; + true + ? warning( + (testFunc.name || testFunc.toString()).indexOf('testFn') !== -1, + "It looks like you're using a minified copy of the development build " + + 'of React. When deploying React apps to production, make sure to use ' + + 'the production build which skips development warnings and is faster. ' + + 'See https://fb.me/react-minification for more details.', + ) + : void 0; + + // If we're in IE8, check to see if we are in compatibility mode and provide + // information on preventing compatibility mode + var ieCompatibilityMode = document.documentMode && document.documentMode < 8; + + true + ? warning( + !ieCompatibilityMode, + 'Internet Explorer is running in compatibility mode; please add the ' + + 'following tag to your HTML to prevent this from happening: ' + + '', + ) + : void 0; + + var expectedFeatures = [ + // shims + Array.isArray, + Array.prototype.every, + Array.prototype.forEach, + Array.prototype.indexOf, + Array.prototype.map, + Date.now, + Function.prototype.bind, + Object.keys, + String.prototype.trim, + ]; + + for (var i = 0; i < expectedFeatures.length; i++) { + if (!expectedFeatures[i]) { + true + ? warning( + false, + 'One or more ES5 shims expected by React are not available: ' + + 'https://fb.me/react-warning-polyfills', + ) + : void 0; + break; + } + } + } + } + + if (true) { + var ReactInstrumentation = __webpack_require__(33); + var ReactDOMUnknownPropertyHook = __webpack_require__(774); + var ReactDOMNullInputValuePropHook = __webpack_require__(767); + var ReactDOMInvalidARIAHook = __webpack_require__(766); + + ReactInstrumentation.debugTool.addHook(ReactDOMUnknownPropertyHook); + ReactInstrumentation.debugTool.addHook(ReactDOMNullInputValuePropHook); + ReactInstrumentation.debugTool.addHook(ReactDOMInvalidARIAHook); + } + + module.exports = ReactDOM; + + /***/ + }, + /* 207 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var _assign = __webpack_require__(9); + + var ReactUpdates = __webpack_require__(34); + var Transaction = __webpack_require__(149); + + var emptyFunction = __webpack_require__(22); + + var RESET_BATCHED_UPDATES = { + initialize: emptyFunction, + close: function () { + ReactDefaultBatchingStrategy.isBatchingUpdates = false; + }, + }; + + var FLUSH_BATCHED_UPDATES = { + initialize: emptyFunction, + close: ReactUpdates.flushBatchedUpdates.bind(ReactUpdates), + }; + + var TRANSACTION_WRAPPERS = [FLUSH_BATCHED_UPDATES, RESET_BATCHED_UPDATES]; + + function ReactDefaultBatchingStrategyTransaction() { + this.reinitializeTransaction(); + } + + _assign(ReactDefaultBatchingStrategyTransaction.prototype, Transaction, { + getTransactionWrappers: function () { + return TRANSACTION_WRAPPERS; + }, + }); + + var transaction = new ReactDefaultBatchingStrategyTransaction(); + + var ReactDefaultBatchingStrategy = { + isBatchingUpdates: false, + + /** + * Call the provided function in a context within which calls to `setState` + * and friends are batched such that components aren't updated unnecessarily. + */ + batchedUpdates: function (callback, a, b, c, d, e) { + var alreadyBatchingUpdates = ReactDefaultBatchingStrategy.isBatchingUpdates; + + ReactDefaultBatchingStrategy.isBatchingUpdates = true; + + // The code is written this way to avoid extra allocations + if (alreadyBatchingUpdates) { + return callback(a, b, c, d, e); + } else { + return transaction.perform(callback, null, a, b, c, d, e); + } + }, + }; + + module.exports = ReactDefaultBatchingStrategy; + + /***/ + }, + /* 208 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + var caughtError = null; + + /** + * Call a function while guarding against errors that happens within it. + * + * @param {String} name of the guard to use for logging or debugging + * @param {Function} func The function to invoke + * @param {*} a First argument + * @param {*} b Second argument + */ + function invokeGuardedCallback(name, func, a) { + try { + func(a); + } catch (x) { + if (caughtError === null) { + caughtError = x; + } + } + } + + var ReactErrorUtils = { + invokeGuardedCallback: invokeGuardedCallback, + + /** + * Invoked by ReactTestUtils.Simulate so that any errors thrown by the event + * handler are sure to be rethrown by rethrowCaughtError. + */ + invokeGuardedCallbackWithCatch: invokeGuardedCallback, + + /** + * During execution of guarded functions we will capture the first error which + * we will rethrow to be handled by the top level error handler. + */ + rethrowCaughtError: function () { + if (caughtError) { + var error = caughtError; + caughtError = null; + throw error; + } + }, + }; + + if (true) { + /** + * To help development we can get better devtools integration by simulating a + * real browser event. + */ + if ( + typeof window !== 'undefined' && + typeof window.dispatchEvent === 'function' && + typeof document !== 'undefined' && + typeof document.createEvent === 'function' + ) { + var fakeNode = document.createElement('react'); + ReactErrorUtils.invokeGuardedCallback = function (name, func, a) { + var boundFunc = func.bind(null, a); + var evtType = 'react-' + name; + fakeNode.addEventListener(evtType, boundFunc, false); + var evt = document.createEvent('Event'); + evt.initEvent(evtType, false, false); + fakeNode.dispatchEvent(evt); + fakeNode.removeEventListener(evtType, boundFunc, false); + }; + } + } + + module.exports = ReactErrorUtils; + + /***/ + }, + /* 209 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var _prodInvariant = __webpack_require__(7); + + var ReactCurrentOwner = __webpack_require__(53); + var ReactInstanceMap = __webpack_require__(105); + var ReactInstrumentation = __webpack_require__(33); + var ReactUpdates = __webpack_require__(34); + + var invariant = __webpack_require__(3); + var warning = __webpack_require__(4); + + function enqueueUpdate(internalInstance) { + ReactUpdates.enqueueUpdate(internalInstance); + } + + function formatUnexpectedArgument(arg) { + var type = typeof arg; + if (type !== 'object') { + return type; + } + var displayName = (arg.constructor && arg.constructor.name) || type; + var keys = Object.keys(arg); + if (keys.length > 0 && keys.length < 20) { + return displayName + ' (keys: ' + keys.join(', ') + ')'; + } + return displayName; + } + + function getInternalInstanceReadyForUpdate(publicInstance, callerName) { + var internalInstance = ReactInstanceMap.get(publicInstance); + if (!internalInstance) { + if (true) { + var ctor = publicInstance.constructor; + // Only warn when we have a callerName. Otherwise we should be silent. + // We're probably calling from enqueueCallback. We don't want to warn + // there because we already warned for the corresponding lifecycle method. + true + ? warning( + !callerName, + '%s(...): Can only update a mounted or mounting component. ' + + 'This usually means you called %s() on an unmounted component. ' + + 'This is a no-op. Please check the code for the %s component.', + callerName, + callerName, + (ctor && (ctor.displayName || ctor.name)) || 'ReactClass', + ) + : void 0; + } + return null; + } + + if (true) { + true + ? warning( + ReactCurrentOwner.current == null, + '%s(...): Cannot update during an existing state transition (such as ' + + "within `render` or another component's constructor). Render methods " + + 'should be a pure function of props and state; constructor ' + + 'side-effects are an anti-pattern, but can be moved to ' + + '`componentWillMount`.', + callerName, + ) + : void 0; + } + + return internalInstance; + } + + /** + * ReactUpdateQueue allows for state updates to be scheduled into a later + * reconciliation step. + */ + var ReactUpdateQueue = { + /** + * Checks whether or not this composite component is mounted. + * @param {ReactClass} publicInstance The instance we want to test. + * @return {boolean} True if mounted, false otherwise. + * @protected + * @final + */ + isMounted: function (publicInstance) { + if (true) { + var owner = ReactCurrentOwner.current; + if (owner !== null) { + true + ? warning( + owner._warnedAboutRefsInRender, + '%s is accessing isMounted inside its render() function. ' + + 'render() should be a pure function of props and state. It should ' + + 'never access something that requires stale data from the previous ' + + 'render, such as refs. Move this logic to componentDidMount and ' + + 'componentDidUpdate instead.', + owner.getName() || 'A component', + ) + : void 0; + owner._warnedAboutRefsInRender = true; + } + } + var internalInstance = ReactInstanceMap.get(publicInstance); + if (internalInstance) { + // During componentWillMount and render this will still be null but after + // that will always render to something. At least for now. So we can use + // this hack. + return !!internalInstance._renderedComponent; + } else { + return false; + } + }, + + /** + * Enqueue a callback that will be executed after all the pending updates + * have processed. + * + * @param {ReactClass} publicInstance The instance to use as `this` context. + * @param {?function} callback Called after state is updated. + * @param {string} callerName Name of the calling function in the public API. + * @internal + */ + enqueueCallback: function (publicInstance, callback, callerName) { + ReactUpdateQueue.validateCallback(callback, callerName); + var internalInstance = getInternalInstanceReadyForUpdate(publicInstance); + + // Previously we would throw an error if we didn't have an internal + // instance. Since we want to make it a no-op instead, we mirror the same + // behavior we have in other enqueue* methods. + // We also need to ignore callbacks in componentWillMount. See + // enqueueUpdates. + if (!internalInstance) { + return null; + } + + if (internalInstance._pendingCallbacks) { + internalInstance._pendingCallbacks.push(callback); + } else { + internalInstance._pendingCallbacks = [callback]; + } + // TODO: The callback here is ignored when setState is called from + // componentWillMount. Either fix it or disallow doing so completely in + // favor of getInitialState. Alternatively, we can disallow + // componentWillMount during server-side rendering. + enqueueUpdate(internalInstance); + }, + + enqueueCallbackInternal: function (internalInstance, callback) { + if (internalInstance._pendingCallbacks) { + internalInstance._pendingCallbacks.push(callback); + } else { + internalInstance._pendingCallbacks = [callback]; + } + enqueueUpdate(internalInstance); + }, + + /** + * Forces an update. This should only be invoked when it is known with + * certainty that we are **not** in a DOM transaction. + * + * You may want to call this when you know that some deeper aspect of the + * component's state has changed but `setState` was not called. + * + * This will not invoke `shouldComponentUpdate`, but it will invoke + * `componentWillUpdate` and `componentDidUpdate`. + * + * @param {ReactClass} publicInstance The instance that should rerender. + * @internal + */ + enqueueForceUpdate: function (publicInstance) { + var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, 'forceUpdate'); + + if (!internalInstance) { + return; + } + + internalInstance._pendingForceUpdate = true; + + enqueueUpdate(internalInstance); + }, + + /** + * Replaces all of the state. Always use this or `setState` to mutate state. + * You should treat `this.state` as immutable. + * + * There is no guarantee that `this.state` will be immediately updated, so + * accessing `this.state` after calling this method may return the old value. + * + * @param {ReactClass} publicInstance The instance that should rerender. + * @param {object} completeState Next state. + * @internal + */ + enqueueReplaceState: function (publicInstance, completeState, callback) { + var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, 'replaceState'); + + if (!internalInstance) { + return; + } + + internalInstance._pendingStateQueue = [completeState]; + internalInstance._pendingReplaceState = true; + + // Future-proof 15.5 + if (callback !== undefined && callback !== null) { + ReactUpdateQueue.validateCallback(callback, 'replaceState'); + if (internalInstance._pendingCallbacks) { + internalInstance._pendingCallbacks.push(callback); + } else { + internalInstance._pendingCallbacks = [callback]; + } + } + + enqueueUpdate(internalInstance); + }, + + /** + * Sets a subset of the state. This only exists because _pendingState is + * internal. This provides a merging strategy that is not available to deep + * properties which is confusing. TODO: Expose pendingState or don't use it + * during the merge. + * + * @param {ReactClass} publicInstance The instance that should rerender. + * @param {object} partialState Next partial state to be merged with state. + * @internal + */ + enqueueSetState: function (publicInstance, partialState) { + if (true) { + ReactInstrumentation.debugTool.onSetState(); + true + ? warning( + partialState != null, + 'setState(...): You passed an undefined or null state object; ' + + 'instead, use forceUpdate().', + ) + : void 0; + } + + var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, 'setState'); + + if (!internalInstance) { + return; + } + + var queue = internalInstance._pendingStateQueue || (internalInstance._pendingStateQueue = []); + queue.push(partialState); + + enqueueUpdate(internalInstance); + }, + + enqueueElementInternal: function (internalInstance, nextElement, nextContext) { + internalInstance._pendingElement = nextElement; + // TODO: introduce _pendingContext instead of setting it directly. + internalInstance._context = nextContext; + enqueueUpdate(internalInstance); + }, + + validateCallback: function (callback, callerName) { + !(!callback || typeof callback === 'function') + ? true + ? invariant( + false, + '%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.', + callerName, + formatUnexpectedArgument(callback), + ) + : _prodInvariant('122', callerName, formatUnexpectedArgument(callback)) + : void 0; + }, + }; + + module.exports = ReactUpdateQueue; + + /***/ + }, + /* 210 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + /* globals MSApp */ + + /** + * Create a function which has 'unsafe' privileges (required by windows8 apps) + */ + + var createMicrosoftUnsafeLocalFunction = function (func) { + if (typeof MSApp !== 'undefined' && MSApp.execUnsafeLocalFunction) { + return function (arg0, arg1, arg2, arg3) { + MSApp.execUnsafeLocalFunction(function () { + return func(arg0, arg1, arg2, arg3); + }); + }; + } else { + return func; + } + }; + + module.exports = createMicrosoftUnsafeLocalFunction; + + /***/ + }, + /* 211 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + /** + * `charCode` represents the actual "character code" and is safe to use with + * `String.fromCharCode`. As such, only keys that correspond to printable + * characters produce a valid `charCode`, the only exception to this is Enter. + * The Tab-key is considered non-printable and does not have a `charCode`, + * presumably because it does not produce a tab-character in browsers. + * + * @param {object} nativeEvent Native browser event. + * @return {number} Normalized `charCode` property. + */ + + function getEventCharCode(nativeEvent) { + var charCode; + var keyCode = nativeEvent.keyCode; + + if ('charCode' in nativeEvent) { + charCode = nativeEvent.charCode; + + // FF does not set `charCode` for the Enter-key, check against `keyCode`. + if (charCode === 0 && keyCode === 13) { + charCode = 13; + } + } else { + // IE8 does not implement `charCode`, but `keyCode` has the correct value. + charCode = keyCode; + } + + // Some non-printable keys are reported in `charCode`/`keyCode`, discard them. + // Must not discard the (non-)printable Enter-key. + if (charCode >= 32 || charCode === 13) { + return charCode; + } + + return 0; + } + + module.exports = getEventCharCode; + + /***/ + }, + /* 212 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + /** + * Translation from modifier key to the associated property in the event. + * @see http://www.w3.org/TR/DOM-Level-3-Events/#keys-Modifiers + */ + + var modifierKeyToProp = { + Alt: 'altKey', + Control: 'ctrlKey', + Meta: 'metaKey', + Shift: 'shiftKey', + }; + + // IE8 does not implement getModifierState so we simply map it to the only + // modifier keys exposed by the event itself, does not support Lock-keys. + // Currently, all major browsers except Chrome seems to support Lock-keys. + function modifierStateGetter(keyArg) { + var syntheticEvent = this; + var nativeEvent = syntheticEvent.nativeEvent; + if (nativeEvent.getModifierState) { + return nativeEvent.getModifierState(keyArg); + } + var keyProp = modifierKeyToProp[keyArg]; + return keyProp ? !!nativeEvent[keyProp] : false; + } + + function getEventModifierState(nativeEvent) { + return modifierStateGetter; + } + + module.exports = getEventModifierState; + + /***/ + }, + /* 213 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + /** + * Gets the target node from a native browser event by accounting for + * inconsistencies in browser DOM APIs. + * + * @param {object} nativeEvent Native browser event. + * @return {DOMEventTarget} Target node. + */ + + function getEventTarget(nativeEvent) { + var target = nativeEvent.target || nativeEvent.srcElement || window; + + // Normalize SVG element events #4963 + if (target.correspondingUseElement) { + target = target.correspondingUseElement; + } + + // Safari may fire events on text nodes (Node.TEXT_NODE is 3). + // @see http://www.quirksmode.org/js/events_properties.html + return target.nodeType === 3 ? target.parentNode : target; + } + + module.exports = getEventTarget; + + /***/ + }, + /* 214 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var _prodInvariant = __webpack_require__(7), + _assign = __webpack_require__(9); + + var ReactCompositeComponent = __webpack_require__(316); + var ReactEmptyComponent = __webpack_require__(322); + var ReactHostComponent = __webpack_require__(324); + + var getNextDebugID = __webpack_require__(371); + var invariant = __webpack_require__(3); + var warning = __webpack_require__(4); + + // To avoid a cyclic dependency, we create the final class in this module + var ReactCompositeComponentWrapper = function (element) { + this.construct(element); + }; + + function getDeclarationErrorAddendum(owner) { + if (owner) { + var name = owner.getName(); + if (name) { + return ' Check the render method of `' + name + '`.'; + } + } + return ''; + } + + /** + * Check if the type reference is a known internal type. I.e. not a user + * provided composite type. + * + * @param {function} type + * @return {boolean} Returns true if this is a valid internal type. + */ + function isInternalComponentType(type) { + return ( + typeof type === 'function' && + typeof type.prototype !== 'undefined' && + typeof type.prototype.mountComponent === 'function' && + typeof type.prototype.receiveComponent === 'function' + ); + } + + /** + * Given a ReactNode, create an instance that will actually be mounted. + * + * @param {ReactNode} node + * @param {boolean} shouldHaveDebugID + * @return {object} A new instance of the element's constructor. + * @protected + */ + function instantiateReactComponent(node, shouldHaveDebugID) { + var instance; + + if (node === null || node === false) { + instance = ReactEmptyComponent.create(instantiateReactComponent); + } else if (typeof node === 'object') { + var element = node; + var type = element.type; + if (typeof type !== 'function' && typeof type !== 'string') { + var info = ''; + if (true) { + if ( + type === undefined || + (typeof type === 'object' && type !== null && Object.keys(type).length === 0) + ) { + info += ' You likely forgot to export your component from the file ' + "it's defined in."; + } + } + info += getDeclarationErrorAddendum(element._owner); + true + ? true + ? invariant( + false, + 'Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s', + type == null ? type : typeof type, + info, + ) + : _prodInvariant('130', type == null ? type : typeof type, info) + : void 0; + } + + // Special case string values + if (typeof element.type === 'string') { + instance = ReactHostComponent.createInternalComponent(element); + } else if (isInternalComponentType(element.type)) { + // This is temporarily available for custom components that are not string + // representations. I.e. ART. Once those are updated to use the string + // representation, we can drop this code path. + instance = new element.type(element); + + // We renamed this. Allow the old name for compat. :( + if (!instance.getHostNode) { + instance.getHostNode = instance.getNativeNode; + } + } else { + instance = new ReactCompositeComponentWrapper(element); + } + } else if (typeof node === 'string' || typeof node === 'number') { + instance = ReactHostComponent.createInstanceForText(node); + } else { + true + ? true + ? invariant(false, 'Encountered invalid React node of type %s', typeof node) + : _prodInvariant('131', typeof node) + : void 0; + } + + if (true) { + true + ? warning( + typeof instance.mountComponent === 'function' && + typeof instance.receiveComponent === 'function' && + typeof instance.getHostNode === 'function' && + typeof instance.unmountComponent === 'function', + 'Only React Components can be mounted.', + ) + : void 0; + } + + // These two fields are used by the DOM and ART diffing algorithms + // respectively. Instead of using expandos on components, we should be + // storing the state needed by the diffing algorithms elsewhere. + instance._mountIndex = 0; + instance._mountImage = null; + + if (true) { + instance._debugID = shouldHaveDebugID ? getNextDebugID() : 0; + } + + // Internal instances should fully constructed at this point, so they should + // not get any new fields added to them at this point. + if (true) { + if (Object.preventExtensions) { + Object.preventExtensions(instance); + } + } + + return instance; + } + + _assign(ReactCompositeComponentWrapper.prototype, ReactCompositeComponent, { + _instantiateReactComponent: instantiateReactComponent, + }); + + module.exports = instantiateReactComponent; + + /***/ + }, + /* 215 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var ExecutionEnvironment = __webpack_require__(17); + + var useHasFeature; + if (ExecutionEnvironment.canUseDOM) { + useHasFeature = + document.implementation && + document.implementation.hasFeature && + // always returns true in newer browsers as per the standard. + // @see http://dom.spec.whatwg.org/#dom-domimplementation-hasfeature + document.implementation.hasFeature('', '') !== true; + } + + /** + * Checks if an event is supported in the current execution environment. + * + * NOTE: This will not work correctly for non-generic events such as `change`, + * `reset`, `load`, `error`, and `select`. + * + * Borrows from Modernizr. + * + * @param {string} eventNameSuffix Event name, e.g. "click". + * @param {?boolean} capture Check if the capture phase is supported. + * @return {boolean} True if the event is supported. + * @internal + * @license Modernizr 3.0.0pre (Custom Build) | MIT + */ + function isEventSupported(eventNameSuffix, capture) { + if (!ExecutionEnvironment.canUseDOM || (capture && !('addEventListener' in document))) { + return false; + } + + var eventName = 'on' + eventNameSuffix; + var isSupported = eventName in document; + + if (!isSupported) { + var element = document.createElement('div'); + element.setAttribute(eventName, 'return;'); + isSupported = typeof element[eventName] === 'function'; + } + + if (!isSupported && useHasFeature && eventNameSuffix === 'wheel') { + // This is the only way to test support for the `wheel` event in IE9+. + isSupported = document.implementation.hasFeature('Events.wheel', '3.0'); + } + + return isSupported; + } + + module.exports = isEventSupported; + + /***/ + }, + /* 216 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + /** + * Given a `prevElement` and `nextElement`, determines if the existing + * instance should be updated as opposed to being destroyed or replaced by a new + * instance. Both arguments are elements. This ensures that this logic can + * operate on stateless trees without any backing instance. + * + * @param {?object} prevElement + * @param {?object} nextElement + * @return {boolean} True if the existing instance should be updated. + * @protected + */ + + function shouldUpdateReactComponent(prevElement, nextElement) { + var prevEmpty = prevElement === null || prevElement === false; + var nextEmpty = nextElement === null || nextElement === false; + if (prevEmpty || nextEmpty) { + return prevEmpty === nextEmpty; + } + + var prevType = typeof prevElement; + var nextType = typeof nextElement; + if (prevType === 'string' || prevType === 'number') { + return nextType === 'string' || nextType === 'number'; + } else { + return ( + nextType === 'object' && + prevElement.type === nextElement.type && + prevElement.key === nextElement.key + ); + } + } + + module.exports = shouldUpdateReactComponent; + + /***/ + }, + /* 217 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var _assign = __webpack_require__(9); + + var emptyFunction = __webpack_require__(22); + var warning = __webpack_require__(4); + + var validateDOMNesting = emptyFunction; + + if (true) { + // This validation code was written based on the HTML5 parsing spec: + // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope + // + // Note: this does not catch all invalid nesting, nor does it try to (as it's + // not clear what practical benefit doing so provides); instead, we warn only + // for cases where the parser will give a parse tree differing from what React + // intended. For example,
is invalid but we don't warn + // because it still parses correctly; we do warn for other cases like nested + //

tags where the beginning of the second element implicitly closes the + // first, causing a confusing mess. + + // https://html.spec.whatwg.org/multipage/syntax.html#special + var specialTags = [ + 'address', + 'applet', + 'area', + 'article', + 'aside', + 'base', + 'basefont', + 'bgsound', + 'blockquote', + 'body', + 'br', + 'button', + 'caption', + 'center', + 'col', + 'colgroup', + 'dd', + 'details', + 'dir', + 'div', + 'dl', + 'dt', + 'embed', + 'fieldset', + 'figcaption', + 'figure', + 'footer', + 'form', + 'frame', + 'frameset', + 'h1', + 'h2', + 'h3', + 'h4', + 'h5', + 'h6', + 'head', + 'header', + 'hgroup', + 'hr', + 'html', + 'iframe', + 'img', + 'input', + 'isindex', + 'li', + 'link', + 'listing', + 'main', + 'marquee', + 'menu', + 'menuitem', + 'meta', + 'nav', + 'noembed', + 'noframes', + 'noscript', + 'object', + 'ol', + 'p', + 'param', + 'plaintext', + 'pre', + 'script', + 'section', + 'select', + 'source', + 'style', + 'summary', + 'table', + 'tbody', + 'td', + 'template', + 'textarea', + 'tfoot', + 'th', + 'thead', + 'title', + 'tr', + 'track', + 'ul', + 'wbr', + 'xmp', + ]; + + // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope + var inScopeTags = [ + 'applet', + 'caption', + 'html', + 'table', + 'td', + 'th', + 'marquee', + 'object', + 'template', + + // https://html.spec.whatwg.org/multipage/syntax.html#html-integration-point + // TODO: Distinguish by namespace here -- for , including it here + // errs on the side of fewer warnings + 'foreignObject', + 'desc', + 'title', + ]; + + // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-button-scope + var buttonScopeTags = inScopeTags.concat(['button']); + + // https://html.spec.whatwg.org/multipage/syntax.html#generate-implied-end-tags + var impliedEndTags = ['dd', 'dt', 'li', 'option', 'optgroup', 'p', 'rp', 'rt']; + + var emptyAncestorInfo = { + current: null, + + formTag: null, + aTagInScope: null, + buttonTagInScope: null, + nobrTagInScope: null, + pTagInButtonScope: null, + + listItemTagAutoclosing: null, + dlItemTagAutoclosing: null, + }; + + var updatedAncestorInfo = function (oldInfo, tag, instance) { + var ancestorInfo = _assign({}, oldInfo || emptyAncestorInfo); + var info = { tag: tag, instance: instance }; + + if (inScopeTags.indexOf(tag) !== -1) { + ancestorInfo.aTagInScope = null; + ancestorInfo.buttonTagInScope = null; + ancestorInfo.nobrTagInScope = null; + } + if (buttonScopeTags.indexOf(tag) !== -1) { + ancestorInfo.pTagInButtonScope = null; + } + + // See rules for 'li', 'dd', 'dt' start tags in + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody + if (specialTags.indexOf(tag) !== -1 && tag !== 'address' && tag !== 'div' && tag !== 'p') { + ancestorInfo.listItemTagAutoclosing = null; + ancestorInfo.dlItemTagAutoclosing = null; + } + + ancestorInfo.current = info; + + if (tag === 'form') { + ancestorInfo.formTag = info; + } + if (tag === 'a') { + ancestorInfo.aTagInScope = info; + } + if (tag === 'button') { + ancestorInfo.buttonTagInScope = info; + } + if (tag === 'nobr') { + ancestorInfo.nobrTagInScope = info; + } + if (tag === 'p') { + ancestorInfo.pTagInButtonScope = info; + } + if (tag === 'li') { + ancestorInfo.listItemTagAutoclosing = info; + } + if (tag === 'dd' || tag === 'dt') { + ancestorInfo.dlItemTagAutoclosing = info; + } + + return ancestorInfo; + }; + + /** + * Returns whether + */ + var isTagValidWithParent = function (tag, parentTag) { + // First, let's check if we're in an unusual parsing mode... + switch (parentTag) { + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inselect + case 'select': + return tag === 'option' || tag === 'optgroup' || tag === '#text'; + case 'optgroup': + return tag === 'option' || tag === '#text'; + // Strictly speaking, seeing an <option> doesn't mean we're in a <select> + // but + case 'option': + return tag === '#text'; + + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intd + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incaption + // No special behavior since these rules fall back to "in body" mode for + // all except special table nodes which cause bad parsing behavior anyway. + + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intr + case 'tr': + return ( + tag === 'th' || tag === 'td' || tag === 'style' || tag === 'script' || tag === 'template' + ); + + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intbody + case 'tbody': + case 'thead': + case 'tfoot': + return tag === 'tr' || tag === 'style' || tag === 'script' || tag === 'template'; + + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incolgroup + case 'colgroup': + return tag === 'col' || tag === 'template'; + + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intable + case 'table': + return ( + tag === 'caption' || + tag === 'colgroup' || + tag === 'tbody' || + tag === 'tfoot' || + tag === 'thead' || + tag === 'style' || + tag === 'script' || + tag === 'template' + ); + + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inhead + case 'head': + return ( + tag === 'base' || + tag === 'basefont' || + tag === 'bgsound' || + tag === 'link' || + tag === 'meta' || + tag === 'title' || + tag === 'noscript' || + tag === 'noframes' || + tag === 'style' || + tag === 'script' || + tag === 'template' + ); + + // https://html.spec.whatwg.org/multipage/semantics.html#the-html-element + case 'html': + return tag === 'head' || tag === 'body'; + case '#document': + return tag === 'html'; + } + + // Probably in the "in body" parsing mode, so we outlaw only tag combos + // where the parsing rules cause implicit opens or closes to be added. + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody + switch (tag) { + case 'h1': + case 'h2': + case 'h3': + case 'h4': + case 'h5': + case 'h6': + return ( + parentTag !== 'h1' && + parentTag !== 'h2' && + parentTag !== 'h3' && + parentTag !== 'h4' && + parentTag !== 'h5' && + parentTag !== 'h6' + ); + + case 'rp': + case 'rt': + return impliedEndTags.indexOf(parentTag) === -1; + + case 'body': + case 'caption': + case 'col': + case 'colgroup': + case 'frame': + case 'head': + case 'html': + case 'tbody': + case 'td': + case 'tfoot': + case 'th': + case 'thead': + case 'tr': + // These tags are only valid with a few parents that have special child + // parsing rules -- if we're down here, then none of those matched and + // so we allow it only if we don't know what the parent is, as all other + // cases are invalid. + return parentTag == null; + } + + return true; + }; + + /** + * Returns whether + */ + var findInvalidAncestorForTag = function (tag, ancestorInfo) { + switch (tag) { + case 'address': + case 'article': + case 'aside': + case 'blockquote': + case 'center': + case 'details': + case 'dialog': + case 'dir': + case 'div': + case 'dl': + case 'fieldset': + case 'figcaption': + case 'figure': + case 'footer': + case 'header': + case 'hgroup': + case 'main': + case 'menu': + case 'nav': + case 'ol': + case 'p': + case 'section': + case 'summary': + case 'ul': + case 'pre': + case 'listing': + case 'table': + case 'hr': + case 'xmp': + case 'h1': + case 'h2': + case 'h3': + case 'h4': + case 'h5': + case 'h6': + return ancestorInfo.pTagInButtonScope; + + case 'form': + return ancestorInfo.formTag || ancestorInfo.pTagInButtonScope; + + case 'li': + return ancestorInfo.listItemTagAutoclosing; + + case 'dd': + case 'dt': + return ancestorInfo.dlItemTagAutoclosing; + + case 'button': + return ancestorInfo.buttonTagInScope; + + case 'a': + // Spec says something about storing a list of markers, but it sounds + // equivalent to this check. + return ancestorInfo.aTagInScope; + + case 'nobr': + return ancestorInfo.nobrTagInScope; + } + + return null; + }; + + /** + * Given a ReactCompositeComponent instance, return a list of its recursive + * owners, starting at the root and ending with the instance itself. + */ + var findOwnerStack = function (instance) { + if (!instance) { + return []; + } + + var stack = []; + do { + stack.push(instance); + } while ((instance = instance._currentElement._owner)); + stack.reverse(); + return stack; + }; + + var didWarn = {}; + + validateDOMNesting = function (childTag, childText, childInstance, ancestorInfo) { + ancestorInfo = ancestorInfo || emptyAncestorInfo; + var parentInfo = ancestorInfo.current; + var parentTag = parentInfo && parentInfo.tag; + + if (childText != null) { + true + ? warning( + childTag == null, + 'validateDOMNesting: when childText is passed, childTag should be null', + ) + : void 0; + childTag = '#text'; + } + + var invalidParent = isTagValidWithParent(childTag, parentTag) ? null : parentInfo; + var invalidAncestor = invalidParent ? null : findInvalidAncestorForTag(childTag, ancestorInfo); + var problematic = invalidParent || invalidAncestor; + + if (problematic) { + var ancestorTag = problematic.tag; + var ancestorInstance = problematic.instance; + + var childOwner = childInstance && childInstance._currentElement._owner; + var ancestorOwner = ancestorInstance && ancestorInstance._currentElement._owner; + + var childOwners = findOwnerStack(childOwner); + var ancestorOwners = findOwnerStack(ancestorOwner); + + var minStackLen = Math.min(childOwners.length, ancestorOwners.length); + var i; + + var deepestCommon = -1; + for (i = 0; i < minStackLen; i++) { + if (childOwners[i] === ancestorOwners[i]) { + deepestCommon = i; + } else { + break; + } + } + + var UNKNOWN = '(unknown)'; + var childOwnerNames = childOwners.slice(deepestCommon + 1).map(function (inst) { + return inst.getName() || UNKNOWN; + }); + var ancestorOwnerNames = ancestorOwners.slice(deepestCommon + 1).map(function (inst) { + return inst.getName() || UNKNOWN; + }); + var ownerInfo = [] + .concat( + // If the parent and child instances have a common owner ancestor, start + // with that -- otherwise we just start with the parent's owners. + deepestCommon !== -1 ? childOwners[deepestCommon].getName() || UNKNOWN : [], + ancestorOwnerNames, + ancestorTag, + // If we're warning about an invalid (non-parent) ancestry, add '...' + invalidAncestor ? ['...'] : [], + childOwnerNames, + childTag, + ) + .join(' > '); + + var warnKey = !!invalidParent + '|' + childTag + '|' + ancestorTag + '|' + ownerInfo; + if (didWarn[warnKey]) { + return; + } + didWarn[warnKey] = true; + + var tagDisplayName = childTag; + var whitespaceInfo = ''; + if (childTag === '#text') { + if (/\S/.test(childText)) { + tagDisplayName = 'Text nodes'; + } else { + tagDisplayName = 'Whitespace text nodes'; + whitespaceInfo = + " Make sure you don't have any extra whitespace between tags on " + + 'each line of your source code.'; + } + } else { + tagDisplayName = '<' + childTag + '>'; + } + + if (invalidParent) { + var info = ''; + if (ancestorTag === 'table' && childTag === 'tr') { + info += ' Add a <tbody> to your code to match the DOM tree generated by ' + 'the browser.'; + } + true + ? warning( + false, + 'validateDOMNesting(...): %s cannot appear as a child of <%s>.%s ' + 'See %s.%s', + tagDisplayName, + ancestorTag, + whitespaceInfo, + ownerInfo, + info, + ) + : void 0; + } else { + true + ? warning( + false, + 'validateDOMNesting(...): %s cannot appear as a descendant of ' + '<%s>. See %s.', + tagDisplayName, + ancestorTag, + ownerInfo, + ) + : void 0; + } + } + }; + + validateDOMNesting.updatedAncestorInfo = updatedAncestorInfo; + + // For testing + validateDOMNesting.isTagValidInContext = function (tag, ancestorInfo) { + ancestorInfo = ancestorInfo || emptyAncestorInfo; + var parentInfo = ancestorInfo.current; + var parentTag = parentInfo && parentInfo.tag; + return isTagValidWithParent(tag, parentTag) && !findInvalidAncestorForTag(tag, ancestorInfo); + }; + } + + module.exports = validateDOMNesting; + + /***/ + }, + /* 218 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + module.exports = __webpack_require__(770); + + /***/ + }, + /* 219 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.default = createReactElement; + + var _react = __webpack_require__(1); + + var _react2 = _interopRequireDefault(_react); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + /** + * Logic to either call the generatorFunction or call React.createElement to get the + * React.Component + * @param options + * @param options.componentObj + * @param options.props + * @param options.domNodeId + * @param options.trace + * @param options.location + * @returns {Element} + */ + function createReactElement(_ref) { + var componentObj = _ref.componentObj, + props = _ref.props, + railsContext = _ref.railsContext, + domNodeId = _ref.domNodeId, + trace = _ref.trace; + var name = componentObj.name, + component = componentObj.component, + generatorFunction = componentObj.generatorFunction; + + if (trace) { + if (railsContext && railsContext.serverSide) { + console.log( + 'RENDERED ' + name + ' to dom node with id: ' + domNodeId + ' with railsContext:', + railsContext, + ); + } else { + console.log( + 'RENDERED ' + name + ' to dom node with id: ' + domNodeId + ' with props, railsContext:', + props, + railsContext, + ); + } + } + + if (generatorFunction) { + return component(props, railsContext); + } + + return _react2.default.createElement(component, props); + } /* eslint-disable react/prop-types */ + + /***/ + }, + /* 220 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = warning; + /** + * Prints a warning in the console if it exists. + * + * @param {String} message The warning message. + * @returns {void} + */ + function warning(message) { + /* eslint-disable no-console */ + if (typeof console !== 'undefined' && typeof console.error === 'function') { + console.error(message); + } + /* eslint-enable no-console */ + try { + // This error was thrown as a convenience so that if you enable + // "break on all exceptions" in your console, + // it would pause the execution at this line. + throw new Error(message); + /* eslint-disable no-empty */ + } catch (e) {} + /* eslint-enable no-empty */ + } + + /***/ + }, + /* 221 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['b'] = loopAsync; + /* harmony export (immutable) */ __webpack_exports__['a'] = mapAsync; + function loopAsync(turns, work, callback) { + var currentTurn = 0, + isDone = false; + var sync = false, + hasNext = false, + doneArgs = void 0; + + function done() { + isDone = true; + if (sync) { + // Iterate instead of recursing if possible. + doneArgs = [].concat(Array.prototype.slice.call(arguments)); + return; + } + + callback.apply(this, arguments); + } + + function next() { + if (isDone) { + return; + } + + hasNext = true; + if (sync) { + // Iterate instead of recursing if possible. + return; + } + + sync = true; + + while (!isDone && currentTurn < turns && hasNext) { + hasNext = false; + work.call(this, currentTurn++, next, done); + } + + sync = false; + + if (isDone) { + // This means the loop finished synchronously. + callback.apply(this, doneArgs); + return; + } + + if (currentTurn >= turns && hasNext) { + isDone = true; + callback(); + } + } + + next(); + } + + function mapAsync(array, work, callback) { + var length = array.length; + var values = []; + + if (length === 0) return callback(null, values); + + var isDone = false, + doneCount = 0; + + function done(index, error, value) { + if (isDone) return; + + if (error) { + isDone = true; + callback(error); + } else { + values[index] = value; + + isDone = ++doneCount === length; + + if (isDone) callback(null, values); + } + } + + array.forEach(function (item, index) { + work(item, index, function (error, value) { + done(index, error, value); + }); + }); + } + + /***/ + }, + /* 222 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(52); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + /* harmony export (immutable) */ __webpack_exports__['a'] = ContextProvider; + /* harmony export (immutable) */ __webpack_exports__['b'] = ContextSubscriber; + + // Works around issues with context updates failing to propagate. + // Caveat: the context value is expected to never change its identity. + // https://github.com/facebook/react/issues/2517 + // https://github.com/reactjs/react-router/issues/470 + + var contextProviderShape = __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.shape({ + subscribe: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired, + eventIndex: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number.isRequired, + }); + + function makeContextName(name) { + return '@@contextSubscriber/' + name; + } + + function ContextProvider(name) { + var _childContextTypes, _ref2; + + var contextName = makeContextName(name); + var listenersKey = contextName + '/listeners'; + var eventIndexKey = contextName + '/eventIndex'; + var subscribeKey = contextName + '/subscribe'; + + return ( + (_ref2 = { + childContextTypes: + ((_childContextTypes = {}), + (_childContextTypes[contextName] = contextProviderShape.isRequired), + _childContextTypes), + + getChildContext: function getChildContext() { + var _ref; + + return ( + (_ref = {}), + (_ref[contextName] = { + eventIndex: this[eventIndexKey], + subscribe: this[subscribeKey], + }), + _ref + ); + }, + componentWillMount: function componentWillMount() { + this[listenersKey] = []; + this[eventIndexKey] = 0; + }, + componentWillReceiveProps: function componentWillReceiveProps() { + this[eventIndexKey]++; + }, + componentDidUpdate: function componentDidUpdate() { + var _this = this; + + this[listenersKey].forEach(function (listener) { + return listener(_this[eventIndexKey]); + }); + }, + }), + (_ref2[subscribeKey] = function (listener) { + var _this2 = this; + + // No need to immediately call listener here. + this[listenersKey].push(listener); + + return function () { + _this2[listenersKey] = _this2[listenersKey].filter(function (item) { + return item !== listener; + }); + }; + }), + _ref2 + ); + } + + function ContextSubscriber(name) { + var _contextTypes, _ref4; + + var contextName = makeContextName(name); + var lastRenderedEventIndexKey = contextName + '/lastRenderedEventIndex'; + var handleContextUpdateKey = contextName + '/handleContextUpdate'; + var unsubscribeKey = contextName + '/unsubscribe'; + + return ( + (_ref4 = { + contextTypes: + ((_contextTypes = {}), (_contextTypes[contextName] = contextProviderShape), _contextTypes), + + getInitialState: function getInitialState() { + var _ref3; + + if (!this.context[contextName]) { + return {}; + } + + return ( + (_ref3 = {}), (_ref3[lastRenderedEventIndexKey] = this.context[contextName].eventIndex), _ref3 + ); + }, + componentDidMount: function componentDidMount() { + if (!this.context[contextName]) { + return; + } + + this[unsubscribeKey] = this.context[contextName].subscribe(this[handleContextUpdateKey]); + }, + componentWillReceiveProps: function componentWillReceiveProps() { + var _setState; + + if (!this.context[contextName]) { + return; + } + + this.setState( + ((_setState = {}), + (_setState[lastRenderedEventIndexKey] = this.context[contextName].eventIndex), + _setState), + ); + }, + componentWillUnmount: function componentWillUnmount() { + if (!this[unsubscribeKey]) { + return; + } + + this[unsubscribeKey](); + this[unsubscribeKey] = null; + }, + }), + (_ref4[handleContextUpdateKey] = function (eventIndex) { + if (eventIndex !== this.state[lastRenderedEventIndexKey]) { + var _setState2; + + this.setState( + ((_setState2 = {}), (_setState2[lastRenderedEventIndexKey] = eventIndex), _setState2), + ); + } + }), + _ref4 + ); + } + + /***/ + }, + /* 223 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(52); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'a', function () { + return routerShape; + }); + /* unused harmony export locationShape */ + + var routerShape = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0_prop_types__['shape'])({ + push: __WEBPACK_IMPORTED_MODULE_0_prop_types__['func'].isRequired, + replace: __WEBPACK_IMPORTED_MODULE_0_prop_types__['func'].isRequired, + go: __WEBPACK_IMPORTED_MODULE_0_prop_types__['func'].isRequired, + goBack: __WEBPACK_IMPORTED_MODULE_0_prop_types__['func'].isRequired, + goForward: __WEBPACK_IMPORTED_MODULE_0_prop_types__['func'].isRequired, + setRouteLeaveHook: __WEBPACK_IMPORTED_MODULE_0_prop_types__['func'].isRequired, + isActive: __WEBPACK_IMPORTED_MODULE_0_prop_types__['func'].isRequired, + }); + + var locationShape = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0_prop_types__['shape'])({ + pathname: __WEBPACK_IMPORTED_MODULE_0_prop_types__['string'].isRequired, + search: __WEBPACK_IMPORTED_MODULE_0_prop_types__['string'].isRequired, + state: __WEBPACK_IMPORTED_MODULE_0_prop_types__['object'], + action: __WEBPACK_IMPORTED_MODULE_0_prop_types__['string'].isRequired, + key: __WEBPACK_IMPORTED_MODULE_0_prop_types__['string'], + }); + + /***/ + }, + /* 224 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant__ = __webpack_require__(23); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_invariant__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_create_react_class__ = __webpack_require__(59); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_create_react_class___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_create_react_class__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types__ = __webpack_require__(52); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_3_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__getRouteParams__ = __webpack_require__(848); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__ContextUtils__ = __webpack_require__(222); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__RouteUtils__ = __webpack_require__(70); + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + var _typeof = + typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' + ? function (obj) { + return typeof obj; + } + : function (obj) { + return obj && + typeof Symbol === 'function' && + obj.constructor === Symbol && + obj !== Symbol.prototype + ? 'symbol' + : typeof obj; + }; + + /** + * A <RouterContext> renders the component tree for a given router state + * and sets the history object and the current location in context. + */ + var RouterContext = __WEBPACK_IMPORTED_MODULE_2_create_react_class___default()({ + displayName: 'RouterContext', + + mixins: [ + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__ContextUtils__['a' /* ContextProvider */])( + 'router', + ), + ], + + propTypes: { + router: __WEBPACK_IMPORTED_MODULE_3_prop_types__['object'].isRequired, + location: __WEBPACK_IMPORTED_MODULE_3_prop_types__['object'].isRequired, + routes: __WEBPACK_IMPORTED_MODULE_3_prop_types__['array'].isRequired, + params: __WEBPACK_IMPORTED_MODULE_3_prop_types__['object'].isRequired, + components: __WEBPACK_IMPORTED_MODULE_3_prop_types__['array'].isRequired, + createElement: __WEBPACK_IMPORTED_MODULE_3_prop_types__['func'].isRequired, + }, + + getDefaultProps: function getDefaultProps() { + return { + createElement: __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement, + }; + }, + + childContextTypes: { + router: __WEBPACK_IMPORTED_MODULE_3_prop_types__['object'].isRequired, + }, + + getChildContext: function getChildContext() { + return { + router: this.props.router, + }; + }, + createElement: function createElement(component, props) { + return component == null ? null : this.props.createElement(component, props); + }, + render: function render() { + var _this = this; + + var _props = this.props, + location = _props.location, + routes = _props.routes, + params = _props.params, + components = _props.components, + router = _props.router; + + var element = null; + + if (components) { + element = components.reduceRight(function (element, components, index) { + if (components == null) return element; // Don't create new children; use the grandchildren. + + var route = routes[index]; + var routeParams = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_4__getRouteParams__['a' /* default */], + )(route, params); + var props = { + location: location, + params: params, + route: route, + router: router, + routeParams: routeParams, + routes: routes, + }; + + if ( + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__RouteUtils__['a' /* isReactChildren */])( + element, + ) + ) { + props.children = element; + } else if (element) { + for (var prop in element) { + if (Object.prototype.hasOwnProperty.call(element, prop)) props[prop] = element[prop]; + } + } + + if ((typeof components === 'undefined' ? 'undefined' : _typeof(components)) === 'object') { + var elements = {}; + + for (var key in components) { + if (Object.prototype.hasOwnProperty.call(components, key)) { + // Pass through the key as a prop to createElement to allow + // custom createElement functions to know which named component + // they're rendering, for e.g. matching up to fetched data. + elements[key] = _this.createElement( + components[key], + _extends( + { + key: key, + }, + props, + ), + ); + } + } + + return elements; + } + + return _this.createElement(components, props); + }, element); + } + + !( + element === null || + element === false || + __WEBPACK_IMPORTED_MODULE_1_react___default.a.isValidElement(element) + ) + ? true + ? __WEBPACK_IMPORTED_MODULE_0_invariant___default()( + false, + 'The root route must render a single element', + ) + : invariant(false) + : void 0; + + return element; + }, + }); + + /* harmony default export */ __webpack_exports__['a'] = RouterContext; + + /***/ + }, + /* 225 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var _prodInvariant = __webpack_require__(87); + + var ReactNoopUpdateQueue = __webpack_require__(226); + + var canDefineProperty = __webpack_require__(152); + var emptyObject = __webpack_require__(66); + var invariant = __webpack_require__(3); + var warning = __webpack_require__(4); + + /** + * Base class helpers for the updating state of a component. + */ + function ReactComponent(props, context, updater) { + this.props = props; + this.context = context; + this.refs = emptyObject; + // We initialize the default updater but the real one gets injected by the + // renderer. + this.updater = updater || ReactNoopUpdateQueue; + } + + ReactComponent.prototype.isReactComponent = {}; + + /** + * Sets a subset of the state. Always use this to mutate + * state. You should treat `this.state` as immutable. + * + * There is no guarantee that `this.state` will be immediately updated, so + * accessing `this.state` after calling this method may return the old value. + * + * There is no guarantee that calls to `setState` will run synchronously, + * as they may eventually be batched together. You can provide an optional + * callback that will be executed when the call to setState is actually + * completed. + * + * When a function is provided to setState, it will be called at some point in + * the future (not synchronously). It will be called with the up to date + * component arguments (state, props, context). These values can be different + * from this.* because your function may be called after receiveProps but before + * shouldComponentUpdate, and this new state, props, and context will not yet be + * assigned to this. + * + * @param {object|function} partialState Next partial state or function to + * produce next partial state to be merged with current state. + * @param {?function} callback Called after state is updated. + * @final + * @protected + */ + ReactComponent.prototype.setState = function (partialState, callback) { + !(typeof partialState === 'object' || typeof partialState === 'function' || partialState == null) + ? true + ? invariant( + false, + 'setState(...): takes an object of state variables to update or a function which returns an object of state variables.', + ) + : _prodInvariant('85') + : void 0; + this.updater.enqueueSetState(this, partialState); + if (callback) { + this.updater.enqueueCallback(this, callback, 'setState'); + } + }; + + /** + * Forces an update. This should only be invoked when it is known with + * certainty that we are **not** in a DOM transaction. + * + * You may want to call this when you know that some deeper aspect of the + * component's state has changed but `setState` was not called. + * + * This will not invoke `shouldComponentUpdate`, but it will invoke + * `componentWillUpdate` and `componentDidUpdate`. + * + * @param {?function} callback Called after update is complete. + * @final + * @protected + */ + ReactComponent.prototype.forceUpdate = function (callback) { + this.updater.enqueueForceUpdate(this); + if (callback) { + this.updater.enqueueCallback(this, callback, 'forceUpdate'); + } + }; + + /** + * Deprecated APIs. These APIs used to exist on classic React classes but since + * we would like to deprecate them, we're not going to move them over to this + * modern base class. Instead, we define a getter that warns if it's accessed. + */ + if (true) { + var deprecatedAPIs = { + isMounted: [ + 'isMounted', + 'Instead, make sure to clean up subscriptions and pending requests in ' + + 'componentWillUnmount to prevent memory leaks.', + ], + replaceState: [ + 'replaceState', + 'Refactor your code to use setState instead (see ' + + 'https://github.com/facebook/react/issues/3236).', + ], + }; + var defineDeprecationWarning = function (methodName, info) { + if (canDefineProperty) { + Object.defineProperty(ReactComponent.prototype, methodName, { + get: function () { + true + ? warning( + false, + '%s(...) is deprecated in plain JavaScript React classes. %s', + info[0], + info[1], + ) + : void 0; + return undefined; + }, + }); + } + }; + for (var fnName in deprecatedAPIs) { + if (deprecatedAPIs.hasOwnProperty(fnName)) { + defineDeprecationWarning(fnName, deprecatedAPIs[fnName]); + } + } + } + + module.exports = ReactComponent; + + /***/ + }, + /* 226 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var warning = __webpack_require__(4); + + function warnNoop(publicInstance, callerName) { + if (true) { + var constructor = publicInstance.constructor; + true + ? warning( + false, + '%s(...): Can only update a mounted or mounting component. ' + + 'This usually means you called %s() on an unmounted component. ' + + 'This is a no-op. Please check the code for the %s component.', + callerName, + callerName, + (constructor && (constructor.displayName || constructor.name)) || 'ReactClass', + ) + : void 0; + } + } + + /** + * This is the abstract API for an update queue. + */ + var ReactNoopUpdateQueue = { + /** + * Checks whether or not this composite component is mounted. + * @param {ReactClass} publicInstance The instance we want to test. + * @return {boolean} True if mounted, false otherwise. + * @protected + * @final + */ + isMounted: function (publicInstance) { + return false; + }, + + /** + * Enqueue a callback that will be executed after all the pending updates + * have processed. + * + * @param {ReactClass} publicInstance The instance to use as `this` context. + * @param {?function} callback Called after state is updated. + * @internal + */ + enqueueCallback: function (publicInstance, callback) {}, + + /** + * Forces an update. This should only be invoked when it is known with + * certainty that we are **not** in a DOM transaction. + * + * You may want to call this when you know that some deeper aspect of the + * component's state has changed but `setState` was not called. + * + * This will not invoke `shouldComponentUpdate`, but it will invoke + * `componentWillUpdate` and `componentDidUpdate`. + * + * @param {ReactClass} publicInstance The instance that should rerender. + * @internal + */ + enqueueForceUpdate: function (publicInstance) { + warnNoop(publicInstance, 'forceUpdate'); + }, + + /** + * Replaces all of the state. Always use this or `setState` to mutate state. + * You should treat `this.state` as immutable. + * + * There is no guarantee that `this.state` will be immediately updated, so + * accessing `this.state` after calling this method may return the old value. + * + * @param {ReactClass} publicInstance The instance that should rerender. + * @param {object} completeState Next state. + * @internal + */ + enqueueReplaceState: function (publicInstance, completeState) { + warnNoop(publicInstance, 'replaceState'); + }, + + /** + * Sets a subset of the state. This only exists because _pendingState is + * internal. This provides a merging strategy that is not available to deep + * properties which is confusing. TODO: Expose pendingState or don't use it + * during the merge. + * + * @param {ReactClass} publicInstance The instance that should rerender. + * @param {object} partialState Next partial state to be merged with state. + * @internal + */ + enqueueSetState: function (publicInstance, partialState) { + warnNoop(publicInstance, 'setState'); + }, + }; + + module.exports = ReactNoopUpdateQueue; + + /***/ + }, + /* 227 */ + /***/ function (module, exports, __webpack_require__) { + var space = __webpack_require__(891); + + /** + * Export. + */ + + module.exports = toCamelCase; + + /** + * Convert a `string` to camel case. + * + * @param {String} string + * @return {String} + */ + + function toCamelCase(string) { + return space(string).replace(/\s(\w)/g, function (matches, letter) { + return letter.toUpperCase(); + }); + } + + /***/ + }, + /* 228 */ + /***/ function (module, exports, __webpack_require__) { + /* WEBPACK VAR INJECTION */ (function (module) { + /*! + * validate.js 0.10.0 + * + * (c) 2013-2016 Nicklas Ansman, 2013 Wrapp + * Validate.js may be freely distributed under the MIT license. + * For all details and documentation: + * http://validatejs.org/ + */ + + (function (exports, module, define) { + 'use strict'; + + // The main function that calls the validators specified by the constraints. + // The options are the following: + // - format (string) - An option that controls how the returned value is formatted + // * flat - Returns a flat array of just the error messages + // * grouped - Returns the messages grouped by attribute (default) + // * detailed - Returns an array of the raw validation data + // - fullMessages (boolean) - If `true` (default) the attribute name is prepended to the error. + // + // Please note that the options are also passed to each validator. + var validate = function (attributes, constraints, options) { + options = v.extend({}, v.options, options); + + var results = v.runValidations(attributes, constraints, options), + attr, + validator; + + for (attr in results) { + for (validator in results[attr]) { + if (v.isPromise(results[attr][validator])) { + throw new Error('Use validate.async if you want support for promises'); + } + } + } + return validate.processValidationResults(results, options); + }; + + var v = validate; + + // Copies over attributes from one or more sources to a single destination. + // Very much similar to underscore's extend. + // The first argument is the target object and the remaining arguments will be + // used as sources. + v.extend = function (obj) { + [].slice.call(arguments, 1).forEach(function (source) { + for (var attr in source) { + obj[attr] = source[attr]; + } + }); + return obj; + }; + + v.extend(validate, { + // This is the version of the library as a semver. + // The toString function will allow it to be coerced into a string + version: { + major: 0, + minor: 10, + patch: 0, + metadata: null, + toString: function () { + var version = v.format('%{major}.%{minor}.%{patch}', v.version); + if (!v.isEmpty(v.version.metadata)) { + version += '+' + v.version.metadata; + } + return version; + }, + }, + + // Below is the dependencies that are used in validate.js + + // The constructor of the Promise implementation. + // If you are using Q.js, RSVP or any other A+ compatible implementation + // override this attribute to be the constructor of that promise. + // Since jQuery promises aren't A+ compatible they won't work. + Promise: typeof Promise !== 'undefined' ? Promise : /* istanbul ignore next */ null, + + EMPTY_STRING_REGEXP: /^\s*$/, + + // Runs the validators specified by the constraints object. + // Will return an array of the format: + // [{attribute: "<attribute name>", error: "<validation result>"}, ...] + runValidations: function (attributes, constraints, options) { + var results = [], + attr, + validatorName, + value, + validators, + validator, + validatorOptions, + error; + + if (v.isDomElement(attributes) || v.isJqueryElement(attributes)) { + attributes = v.collectFormValues(attributes); + } + + // Loops through each constraints, finds the correct validator and run it. + for (attr in constraints) { + value = v.getDeepObjectValue(attributes, attr); + // This allows the constraints for an attribute to be a function. + // The function will be called with the value, attribute name, the complete dict of + // attributes as well as the options and constraints passed in. + // This is useful when you want to have different + // validations depending on the attribute value. + validators = v.result(constraints[attr], value, attributes, attr, options, constraints); + + for (validatorName in validators) { + validator = v.validators[validatorName]; + + if (!validator) { + error = v.format('Unknown validator %{name}', { name: validatorName }); + throw new Error(error); + } + + validatorOptions = validators[validatorName]; + // This allows the options to be a function. The function will be + // called with the value, attribute name, the complete dict of + // attributes as well as the options and constraints passed in. + // This is useful when you want to have different + // validations depending on the attribute value. + validatorOptions = v.result( + validatorOptions, + value, + attributes, + attr, + options, + constraints, + ); + if (!validatorOptions) { + continue; + } + results.push({ + attribute: attr, + value: value, + validator: validatorName, + globalOptions: options, + attributes: attributes, + options: validatorOptions, + error: validator.call(validator, value, validatorOptions, attr, attributes, options), + }); + } + } + + return results; + }, + + // Takes the output from runValidations and converts it to the correct + // output format. + processValidationResults: function (errors, options) { + var attr; + + errors = v.pruneEmptyErrors(errors, options); + errors = v.expandMultipleErrors(errors, options); + errors = v.convertErrorMessages(errors, options); + + switch (options.format || 'grouped') { + case 'detailed': + // Do nothing more to the errors + break; + + case 'flat': + errors = v.flattenErrorsToArray(errors); + break; + + case 'grouped': + errors = v.groupErrorsByAttribute(errors); + for (attr in errors) { + errors[attr] = v.flattenErrorsToArray(errors[attr]); + } + break; + + default: + throw new Error(v.format('Unknown format %{format}', options)); + } + + return v.isEmpty(errors) ? undefined : errors; + }, + + // Runs the validations with support for promises. + // This function will return a promise that is settled when all the + // validation promises have been completed. + // It can be called even if no validations returned a promise. + async: function (attributes, constraints, options) { + options = v.extend({}, v.async.options, options); + + var WrapErrors = + options.wrapErrors || + function (errors) { + return errors; + }; + + // Removes unknown attributes + if (options.cleanAttributes !== false) { + attributes = v.cleanAttributes(attributes, constraints); + } + + var results = v.runValidations(attributes, constraints, options); + + return new v.Promise(function (resolve, reject) { + v.waitForResults(results).then( + function () { + var errors = v.processValidationResults(results, options); + if (errors) { + reject(new WrapErrors(errors, options, attributes, constraints)); + } else { + resolve(attributes); + } + }, + function (err) { + reject(err); + }, + ); + }); + }, + + single: function (value, constraints, options) { + options = v.extend({}, v.single.options, options, { + format: 'flat', + fullMessages: false, + }); + return v({ single: value }, { single: constraints }, options); + }, + + // Returns a promise that is resolved when all promises in the results array + // are settled. The promise returned from this function is always resolved, + // never rejected. + // This function modifies the input argument, it replaces the promises + // with the value returned from the promise. + waitForResults: function (results) { + // Create a sequence of all the results starting with a resolved promise. + return results.reduce( + function (memo, result) { + // If this result isn't a promise skip it in the sequence. + if (!v.isPromise(result.error)) { + return memo; + } + + return memo.then(function () { + return result.error.then( + function (error) { + result.error = error || null; + }, + function (error) { + if (error instanceof Error) { + throw error; + } + v.error( + 'Rejecting promises with the result is deprecated. Please use the resolve callback instead.', + ); + result.error = error; + }, + ); + }); + }, + new v.Promise(function (r) { + r(); + }), + ); // A resolved promise + }, + + // If the given argument is a call: function the and: function return the value + // otherwise just return the value. Additional arguments will be passed as + // arguments to the function. + // Example: + // ``` + // result('foo') // 'foo' + // result(Math.max, 1, 2) // 2 + // ``` + result: function (value) { + var args = [].slice.call(arguments, 1); + if (typeof value === 'function') { + value = value.apply(null, args); + } + return value; + }, + + // Checks if the value is a number. This function does not consider NaN a + // number like many other `isNumber` functions do. + isNumber: function (value) { + return typeof value === 'number' && !isNaN(value); + }, + + // Returns false if the object is not a function + isFunction: function (value) { + return typeof value === 'function'; + }, + + // A simple check to verify that the value is an integer. Uses `isNumber` + // and a simple modulo check. + isInteger: function (value) { + return v.isNumber(value) && value % 1 === 0; + }, + + // Checks if the value is a boolean + isBoolean: function (value) { + return typeof value === 'boolean'; + }, + + // Uses the `Object` function to check if the given argument is an object. + isObject: function (obj) { + return obj === Object(obj); + }, + + // Simply checks if the object is an instance of a date + isDate: function (obj) { + return obj instanceof Date; + }, + + // Returns false if the object is `null` of `undefined` + isDefined: function (obj) { + return obj !== null && obj !== undefined; + }, + + // Checks if the given argument is a promise. Anything with a `then` + // function is considered a promise. + isPromise: function (p) { + return !!p && v.isFunction(p.then); + }, + + isJqueryElement: function (o) { + return o && v.isString(o.jquery); + }, + + isDomElement: function (o) { + if (!o) { + return false; + } + + if (!o.querySelectorAll || !o.querySelector) { + return false; + } + + if (v.isObject(document) && o === document) { + return true; + } + + // http://stackoverflow.com/a/384380/699304 + /* istanbul ignore else */ + if (typeof HTMLElement === 'object') { + return o instanceof HTMLElement; + } else { + return ( + o && + typeof o === 'object' && + o !== null && + o.nodeType === 1 && + typeof o.nodeName === 'string' + ); + } + }, + + isEmpty: function (value) { + var attr; + + // Null and undefined are empty + if (!v.isDefined(value)) { + return true; + } + + // functions are non empty + if (v.isFunction(value)) { + return false; + } + + // Whitespace only strings are empty + if (v.isString(value)) { + return v.EMPTY_STRING_REGEXP.test(value); + } + + // For arrays we use the length property + if (v.isArray(value)) { + return value.length === 0; + } + + // Dates have no attributes but aren't empty + if (v.isDate(value)) { + return false; + } + + // If we find at least one property we consider it non empty + if (v.isObject(value)) { + for (attr in value) { + return false; + } + return true; + } + + return false; + }, + + // Formats the specified strings with the given values like so: + // ``` + // format("Foo: %{foo}", {foo: "bar"}) // "Foo bar" + // ``` + // If you want to write %{...} without having it replaced simply + // prefix it with % like this `Foo: %%{foo}` and it will be returned + // as `"Foo: %{foo}"` + format: v.extend( + function (str, vals) { + if (!v.isString(str)) { + return str; + } + return str.replace(v.format.FORMAT_REGEXP, function (m0, m1, m2) { + if (m1 === '%') { + return '%{' + m2 + '}'; + } else { + return String(vals[m2]); + } + }); + }, + { + // Finds %{key} style patterns in the given string + FORMAT_REGEXP: /(%?)%\{([^\}]+)\}/g, + }, + ), + + // "Prettifies" the given string. + // Prettifying means replacing [.\_-] with spaces as well as splitting + // camel case words. + prettify: function (str) { + if (v.isNumber(str)) { + // If there are more than 2 decimals round it to two + if ((str * 100) % 1 === 0) { + return '' + str; + } else { + return parseFloat(Math.round(str * 100) / 100).toFixed(2); + } + } + + if (v.isArray(str)) { + return str + .map(function (s) { + return v.prettify(s); + }) + .join(', '); + } + + if (v.isObject(str)) { + return str.toString(); + } + + // Ensure the string is actually a string + str = '' + str; + + return ( + str + // Splits keys separated by periods + .replace(/([^\s])\.([^\s])/g, '$1 $2') + // Removes backslashes + .replace(/\\+/g, '') + // Replaces - and - with space + .replace(/[_-]/g, ' ') + // Splits camel cased words + .replace(/([a-z])([A-Z])/g, function (m0, m1, m2) { + return '' + m1 + ' ' + m2.toLowerCase(); + }) + .toLowerCase() + ); + }, + + stringifyValue: function (value) { + return v.prettify(value); + }, + + isString: function (value) { + return typeof value === 'string'; + }, + + isArray: function (value) { + return {}.toString.call(value) === '[object Array]'; + }, + + // Checks if the object is a hash, which is equivalent to an object that + // is neither an array nor a function. + isHash: function (value) { + return v.isObject(value) && !v.isArray(value) && !v.isFunction(value); + }, + + contains: function (obj, value) { + if (!v.isDefined(obj)) { + return false; + } + if (v.isArray(obj)) { + return obj.indexOf(value) !== -1; + } + return value in obj; + }, + + unique: function (array) { + if (!v.isArray(array)) { + return array; + } + return array.filter(function (el, index, array) { + return array.indexOf(el) == index; + }); + }, + + forEachKeyInKeypath: function (object, keypath, callback) { + if (!v.isString(keypath)) { + return undefined; + } + + var key = '', + i, + escape = false; + + for (i = 0; i < keypath.length; ++i) { + switch (keypath[i]) { + case '.': + if (escape) { + escape = false; + key += '.'; + } else { + object = callback(object, key, false); + key = ''; + } + break; + + case '\\': + if (escape) { + escape = false; + key += '\\'; + } else { + escape = true; + } + break; + + default: + escape = false; + key += keypath[i]; + break; + } + } + + return callback(object, key, true); + }, + + getDeepObjectValue: function (obj, keypath) { + if (!v.isObject(obj)) { + return undefined; + } + + return v.forEachKeyInKeypath(obj, keypath, function (obj, key) { + if (v.isObject(obj)) { + return obj[key]; + } + }); + }, + + // This returns an object with all the values of the form. + // It uses the input name as key and the value as value + // So for example this: + // <input type="text" name="email" value="foo@bar.com" /> + // would return: + // {email: "foo@bar.com"} + collectFormValues: function (form, options) { + var values = {}, + i, + input, + inputs, + value; + + if (v.isJqueryElement(form)) { + form = form[0]; + } + + if (!form) { + return values; + } + + options = options || {}; + + inputs = form.querySelectorAll('input[name], textarea[name]'); + for (i = 0; i < inputs.length; ++i) { + input = inputs.item(i); + + if (v.isDefined(input.getAttribute('data-ignored'))) { + continue; + } + + value = v.sanitizeFormValue(input.value, options); + if (input.type === 'number') { + value = value ? +value : null; + } else if (input.type === 'checkbox') { + if (input.attributes.value) { + if (!input.checked) { + value = values[input.name] || null; + } + } else { + value = input.checked; + } + } else if (input.type === 'radio') { + if (!input.checked) { + value = values[input.name] || null; + } + } + values[input.name] = value; + } + + inputs = form.querySelectorAll('select[name]'); + for (i = 0; i < inputs.length; ++i) { + input = inputs.item(i); + value = v.sanitizeFormValue(input.options[input.selectedIndex].value, options); + values[input.name] = value; + } + + return values; + }, + + sanitizeFormValue: function (value, options) { + if (options.trim && v.isString(value)) { + value = value.trim(); + } + + if (options.nullify !== false && value === '') { + return null; + } + return value; + }, + + capitalize: function (str) { + if (!v.isString(str)) { + return str; + } + return str[0].toUpperCase() + str.slice(1); + }, + + // Remove all errors who's error attribute is empty (null or undefined) + pruneEmptyErrors: function (errors) { + return errors.filter(function (error) { + return !v.isEmpty(error.error); + }); + }, + + // In + // [{error: ["err1", "err2"], ...}] + // Out + // [{error: "err1", ...}, {error: "err2", ...}] + // + // All attributes in an error with multiple messages are duplicated + // when expanding the errors. + expandMultipleErrors: function (errors) { + var ret = []; + errors.forEach(function (error) { + // Removes errors without a message + if (v.isArray(error.error)) { + error.error.forEach(function (msg) { + ret.push(v.extend({}, error, { error: msg })); + }); + } else { + ret.push(error); + } + }); + return ret; + }, + + // Converts the error mesages by prepending the attribute name unless the + // message is prefixed by ^ + convertErrorMessages: function (errors, options) { + options = options || {}; + + var ret = []; + errors.forEach(function (errorInfo) { + var error = v.result( + errorInfo.error, + errorInfo.value, + errorInfo.attribute, + errorInfo.options, + errorInfo.attributes, + errorInfo.globalOptions, + ); + + if (!v.isString(error)) { + ret.push(errorInfo); + return; + } + + if (error[0] === '^') { + error = error.slice(1); + } else if (options.fullMessages !== false) { + error = v.capitalize(v.prettify(errorInfo.attribute)) + ' ' + error; + } + error = error.replace(/\\\^/g, '^'); + error = v.format(error, { value: v.stringifyValue(errorInfo.value) }); + ret.push(v.extend({}, errorInfo, { error: error })); + }); + return ret; + }, + + // In: + // [{attribute: "<attributeName>", ...}] + // Out: + // {"<attributeName>": [{attribute: "<attributeName>", ...}]} + groupErrorsByAttribute: function (errors) { + var ret = {}; + errors.forEach(function (error) { + var list = ret[error.attribute]; + if (list) { + list.push(error); + } else { + ret[error.attribute] = [error]; + } + }); + return ret; + }, + + // In: + // [{error: "<message 1>", ...}, {error: "<message 2>", ...}] + // Out: + // ["<message 1>", "<message 2>"] + flattenErrorsToArray: function (errors) { + return errors.map(function (error) { + return error.error; + }); + }, + + cleanAttributes: function (attributes, whitelist) { + function whitelistCreator(obj, key, last) { + if (v.isObject(obj[key])) { + return obj[key]; + } + return (obj[key] = last ? true : {}); + } + + function buildObjectWhitelist(whitelist) { + var ow = {}, + lastObject, + attr; + for (attr in whitelist) { + if (!whitelist[attr]) { + continue; + } + v.forEachKeyInKeypath(ow, attr, whitelistCreator); + } + return ow; + } + + function cleanRecursive(attributes, whitelist) { + if (!v.isObject(attributes)) { + return attributes; + } + + var ret = v.extend({}, attributes), + w, + attribute; + + for (attribute in attributes) { + w = whitelist[attribute]; + + if (v.isObject(w)) { + ret[attribute] = cleanRecursive(ret[attribute], w); + } else if (!w) { + delete ret[attribute]; + } + } + return ret; + } + + if (!v.isObject(whitelist) || !v.isObject(attributes)) { + return {}; + } + + whitelist = buildObjectWhitelist(whitelist); + return cleanRecursive(attributes, whitelist); + }, + + exposeModule: function (validate, root, exports, module, define) { + if (exports) { + if (module && module.exports) { + exports = module.exports = validate; + } + exports.validate = validate; + } else { + root.validate = validate; + if (validate.isFunction(define) && define.amd) { + define([], function () { + return validate; + }); + } + } + }, + + warn: function (msg) { + if (typeof console !== 'undefined' && console.warn) { + console.warn('[validate.js] ' + msg); + } + }, + + error: function (msg) { + if (typeof console !== 'undefined' && console.error) { + console.error('[validate.js] ' + msg); + } + }, + }); + + validate.validators = { + // Presence validates that the value isn't empty + presence: function (value, options) { + options = v.extend({}, this.options, options); + if (v.isEmpty(value)) { + return options.message || this.message || "can't be blank"; + } + }, + length: function (value, options, attribute) { + // Empty values are allowed + if (v.isEmpty(value)) { + return; + } + + options = v.extend({}, this.options, options); + + var is = options.is, + maximum = options.maximum, + minimum = options.minimum, + tokenizer = + options.tokenizer || + function (val) { + return val; + }, + err, + errors = []; + + value = tokenizer(value); + var length = value.length; + if (!v.isNumber(length)) { + v.error( + v.format('Attribute %{attr} has a non numeric value for `length`', { attr: attribute }), + ); + return options.message || this.notValid || 'has an incorrect length'; + } + + // Is checks + if (v.isNumber(is) && length !== is) { + err = + options.wrongLength || + this.wrongLength || + 'is the wrong length (should be %{count} characters)'; + errors.push(v.format(err, { count: is })); + } + + if (v.isNumber(minimum) && length < minimum) { + err = options.tooShort || this.tooShort || 'is too short (minimum is %{count} characters)'; + errors.push(v.format(err, { count: minimum })); + } + + if (v.isNumber(maximum) && length > maximum) { + err = options.tooLong || this.tooLong || 'is too long (maximum is %{count} characters)'; + errors.push(v.format(err, { count: maximum })); + } + + if (errors.length > 0) { + return options.message || errors; + } + }, + numericality: function (value, options) { + // Empty values are fine + if (v.isEmpty(value)) { + return; + } + + options = v.extend({}, this.options, options); + + var errors = [], + name, + count, + checks = { + greaterThan: function (v, c) { + return v > c; + }, + greaterThanOrEqualTo: function (v, c) { + return v >= c; + }, + equalTo: function (v, c) { + return v === c; + }, + lessThan: function (v, c) { + return v < c; + }, + lessThanOrEqualTo: function (v, c) { + return v <= c; + }, + divisibleBy: function (v, c) { + return v % c === 0; + }, + }; + + // Strict will check that it is a valid looking number + if (v.isString(value) && options.strict) { + var pattern = '^(0|[1-9]\\d*)'; + if (!options.onlyInteger) { + pattern += '(\\.\\d+)?'; + } + pattern += '$'; + + if (!new RegExp(pattern).test(value)) { + return options.message || options.notValid || this.notValid || 'must be a valid number'; + } + } + + // Coerce the value to a number unless we're being strict. + if (options.noStrings !== true && v.isString(value)) { + value = +value; + } + + // If it's not a number we shouldn't continue since it will compare it. + if (!v.isNumber(value)) { + return options.message || options.notValid || this.notValid || 'is not a number'; + } + + // Same logic as above, sort of. Don't bother with comparisons if this + // doesn't pass. + if (options.onlyInteger && !v.isInteger(value)) { + return options.message || options.notInteger || this.notInteger || 'must be an integer'; + } + + for (name in checks) { + count = options[name]; + if (v.isNumber(count) && !checks[name](value, count)) { + // This picks the default message if specified + // For example the greaterThan check uses the message from + // this.notGreaterThan so we capitalize the name and prepend "not" + var key = 'not' + v.capitalize(name); + var msg = options[key] || this[key] || 'must be %{type} %{count}'; + + errors.push( + v.format(msg, { + count: count, + type: v.prettify(name), + }), + ); + } + } + + if (options.odd && value % 2 !== 1) { + errors.push(options.notOdd || this.notOdd || 'must be odd'); + } + if (options.even && value % 2 !== 0) { + errors.push(options.notEven || this.notEven || 'must be even'); + } + + if (errors.length) { + return options.message || errors; + } + }, + datetime: v.extend( + function (value, options) { + if (!v.isFunction(this.parse) || !v.isFunction(this.format)) { + throw new Error( + 'Both the parse and format functions needs to be set to use the datetime/date validator', + ); + } + + // Empty values are fine + if (v.isEmpty(value)) { + return; + } + + options = v.extend({}, this.options, options); + + var err, + errors = [], + earliest = options.earliest ? this.parse(options.earliest, options) : NaN, + latest = options.latest ? this.parse(options.latest, options) : NaN; + + value = this.parse(value, options); + + // 86400000 is the number of seconds in a day, this is used to remove + // the time from the date + if (isNaN(value) || (options.dateOnly && value % 86400000 !== 0)) { + err = options.notValid || options.message || this.notValid || 'must be a valid date'; + return v.format(err, { value: arguments[0] }); + } + + if (!isNaN(earliest) && value < earliest) { + err = + options.tooEarly || options.message || this.tooEarly || 'must be no earlier than %{date}'; + err = v.format(err, { + value: this.format(value, options), + date: this.format(earliest, options), + }); + errors.push(err); + } + + if (!isNaN(latest) && value > latest) { + err = options.tooLate || options.message || this.tooLate || 'must be no later than %{date}'; + err = v.format(err, { + date: this.format(latest, options), + value: this.format(value, options), + }); + errors.push(err); + } + + if (errors.length) { + return v.unique(errors); + } + }, + { + parse: null, + format: null, + }, + ), + date: function (value, options) { + options = v.extend({}, options, { dateOnly: true }); + return v.validators.datetime.call(v.validators.datetime, value, options); + }, + format: function (value, options) { + if (v.isString(options) || options instanceof RegExp) { + options = { pattern: options }; + } + + options = v.extend({}, this.options, options); + + var message = options.message || this.message || 'is invalid', + pattern = options.pattern, + match; + + // Empty values are allowed + if (v.isEmpty(value)) { + return; + } + if (!v.isString(value)) { + return message; + } + + if (v.isString(pattern)) { + pattern = new RegExp(options.pattern, options.flags); + } + match = pattern.exec(value); + if (!match || match[0].length != value.length) { + return message; + } + }, + inclusion: function (value, options) { + // Empty values are fine + if (v.isEmpty(value)) { + return; + } + if (v.isArray(options)) { + options = { within: options }; + } + options = v.extend({}, this.options, options); + if (v.contains(options.within, value)) { + return; + } + var message = options.message || this.message || '^%{value} is not included in the list'; + return v.format(message, { value: value }); + }, + exclusion: function (value, options) { + // Empty values are fine + if (v.isEmpty(value)) { + return; + } + if (v.isArray(options)) { + options = { within: options }; + } + options = v.extend({}, this.options, options); + if (!v.contains(options.within, value)) { + return; + } + var message = options.message || this.message || '^%{value} is restricted'; + return v.format(message, { value: value }); + }, + email: v.extend( + function (value, options) { + options = v.extend({}, this.options, options); + var message = options.message || this.message || 'is not a valid email'; + // Empty values are fine + if (v.isEmpty(value)) { + return; + } + if (!v.isString(value)) { + return message; + } + if (!this.PATTERN.exec(value)) { + return message; + } + }, + { + PATTERN: + /^[a-z0-9\u007F-\uffff!#$%&'*+\/=?^_`{|}~-]+(?:\.[a-z0-9\u007F-\uffff!#$%&'*+\/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z]{2,}$/i, + }, + ), + equality: function (value, options, attribute, attributes) { + if (v.isEmpty(value)) { + return; + } + + if (v.isString(options)) { + options = { attribute: options }; + } + options = v.extend({}, this.options, options); + var message = options.message || this.message || 'is not equal to %{attribute}'; + + if (v.isEmpty(options.attribute) || !v.isString(options.attribute)) { + throw new Error('The attribute must be a non empty string'); + } + + var otherValue = v.getDeepObjectValue(attributes, options.attribute), + comparator = + options.comparator || + function (v1, v2) { + return v1 === v2; + }; + + if (!comparator(value, otherValue, options, attribute, attributes)) { + return v.format(message, { attribute: v.prettify(options.attribute) }); + } + }, + + // A URL validator that is used to validate URLs with the ability to + // restrict schemes and some domains. + url: function (value, options) { + if (v.isEmpty(value)) { + return; + } + + options = v.extend({}, this.options, options); + + var message = options.message || this.message || 'is not a valid url', + schemes = options.schemes || this.schemes || ['http', 'https'], + allowLocal = options.allowLocal || this.allowLocal || false; + + if (!v.isString(value)) { + return message; + } + + // https://gist.github.com/dperini/729294 + var regex = + '^' + + // schemes + '(?:(?:' + + schemes.join('|') + + '):\\/\\/)' + + // credentials + '(?:\\S+(?::\\S*)?@)?'; + + regex += '(?:'; + + var tld = '(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))'; + + // This ia a special case for the localhost hostname + if (allowLocal) { + tld += '?'; + } else { + // private & local addresses + regex += + '(?!10(?:\\.\\d{1,3}){3})' + + '(?!127(?:\\.\\d{1,3}){3})' + + '(?!169\\.254(?:\\.\\d{1,3}){2})' + + '(?!192\\.168(?:\\.\\d{1,3}){2})' + + '(?!172' + + '\\.(?:1[6-9]|2\\d|3[0-1])' + + '(?:\\.\\d{1,3})' + + '{2})'; + } + + var hostname = + '(?:(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)' + + '(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)*' + + tld + + ')'; + + // reserved addresses + regex += + '(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])' + + '(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}' + + '(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))' + + '|' + + hostname + + // port number + '(?::\\d{2,5})?' + + // path + '(?:\\/[^\\s]*)?' + + '$'; + + var PATTERN = new RegExp(regex, 'i'); + if (!PATTERN.exec(value)) { + return message; + } + }, + }; + + validate.exposeModule(validate, this, exports, module, __webpack_require__(378)); + }).call( + this, + true ? /* istanbul ignore next */ exports : null, + true ? /* istanbul ignore next */ module : null, + __webpack_require__(378), + ); + + /* WEBPACK VAR INJECTION */ + }).call(exports, __webpack_require__(229)(module)); + + /***/ + }, + /* 229 */ + /***/ function (module, exports) { + module.exports = function (module) { + if (!module.webpackPolyfill) { + module.deprecate = function () {}; + module.paths = []; + // module.parent = undefined by default + if (!module.children) module.children = []; + Object.defineProperty(module, 'loaded', { + enumerable: true, + get: function () { + return module.l; + }, + }); + Object.defineProperty(module, 'id', { + enumerable: true, + get: function () { + return module.i; + }, + }); + module.webpackPolyfill = 1; + } + return module; + }; + + /***/ + }, + /* 230 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (_) { + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__constants_AuthorFeedbackConstants__ = + __webpack_require__(154); + /* harmony export (immutable) */ __webpack_exports__['a'] = buildAuthorFeedback; + /* harmony export (immutable) */ __webpack_exports__['c'] = assignAuthorFeedbackAttributes; + /* harmony export (immutable) */ __webpack_exports__['b'] = removeAuthorFeedback; + /* unused harmony export enterPendingAuthorFeedbackState */ + /* unused harmony export createAuthorFeedbackSucceed */ + /* unused harmony export createAuthorFeedbackInvalidated */ + /* unused harmony export createAuthorFeedbackFailed */ + /* harmony export (immutable) */ __webpack_exports__['d'] = createAuthorFeedback; + + /** + * + */ + function buildAuthorFeedback(attributes) { + return { + type: __WEBPACK_IMPORTED_MODULE_0__constants_AuthorFeedbackConstants__[ + 'b' /* BUILD_AUTHOR_FEEDBACK */ + ], + attributes: attributes, + }; + } + + /** + * + */ + function assignAuthorFeedbackAttributes(attributes, validateAssigned) { + return { + type: __WEBPACK_IMPORTED_MODULE_0__constants_AuthorFeedbackConstants__[ + 'c' /* ASSIGN_AUTHOR_FEEDBACK_ATTRIBUTES */ + ], + attributes: attributes, + validateAssigned: validateAssigned, + }; + } + + /** + * + */ + function removeAuthorFeedback() { + return { + type: __WEBPACK_IMPORTED_MODULE_0__constants_AuthorFeedbackConstants__[ + 'f' /* REMOVE_AUTHOR_FEEDBACK */ + ], + }; + } + + /** + * + */ + function enterPendingAuthorFeedbackState() { + return { + type: __WEBPACK_IMPORTED_MODULE_0__constants_AuthorFeedbackConstants__[ + 'd' /* ENTER_PENDING_AUTHOR_FEEDBACK_STATE */ + ], + }; + } + + /** + * + */ + function createAuthorFeedbackSucceed(commentTmpId, locationPathname, responseData) { + return { + type: __WEBPACK_IMPORTED_MODULE_0__constants_AuthorFeedbackConstants__[ + 'a' /* CREATE_AUTHOR_FEEDBACK_SUCCEED */ + ], + commentTmpId: commentTmpId, + locationPathname: locationPathname, + responseData: responseData, + }; + } + + /** + * + */ + function createAuthorFeedbackInvalidated(responseData) { + return { + type: __WEBPACK_IMPORTED_MODULE_0__constants_AuthorFeedbackConstants__[ + 'e' /* CREATE_AUTHOR_FEEDBACK_INVALIDATED */ + ], + responseData: responseData, + }; + } + + /** + * + */ + function createAuthorFeedbackFailed() { + return { + type: __WEBPACK_IMPORTED_MODULE_0__constants_AuthorFeedbackConstants__[ + 'g' /* CREATE_AUTHOR_FEEDBACK_FAILED */ + ], + }; + } + + /** + * + */ + function createAuthorFeedback(attributes) { + return function (dispatch) { + // Dispacth ENTER_PENDING_AUTHOR_FEEDBACK_STATE to move comments list to pending state: + dispatch(enterPendingAuthorFeedbackState()); + + jQuery.ajax({ + url: '/feedbacks/new.json', + method: 'POST', + dataType: 'json', + data: attributes, + cache: false, + success: function success(responseData) { + if (!_.isEmpty(responseData.feedback.errors)) { + dispatch(createAuthorFeedbackInvalidated(responseData)); + return; + } + + dispatch(createAuthorFeedbackSucceed(responseData)); + }, + error: function error(jqXHR) { + dispatch(createAuthorFeedbackFailed(jqXHR.error)); + }, + }); + }; + } + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(60)); + + /***/ + }, + /* 231 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__constants_FlashesConstants__ = + __webpack_require__(249); + /* harmony export (immutable) */ __webpack_exports__['a'] = addFlashMessage; + /* harmony export (immutable) */ __webpack_exports__['b'] = removeFlashMessage; + + /** + * + */ + function addFlashMessage(flash) { + return { + type: __WEBPACK_IMPORTED_MODULE_0__constants_FlashesConstants__['a' /* ADD_FLASH_MESSAGE */], + flash: flash, + }; + } + + /** + * + */ + function removeFlashMessage(flash) { + return { + type: __WEBPACK_IMPORTED_MODULE_0__constants_FlashesConstants__['b' /* REMOVE_FLASH_MESSAGE */], + flash: flash, + }; + } + + /***/ + }, + /* 232 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (React) { + Object.defineProperty(__webpack_exports__, '__esModule', { value: true }); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(2); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_app_utils_PaginationKeyUtil__ = + __webpack_require__(26); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_app_actions_sharedActions__ = + __webpack_require__(127); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_app_components_libs_AuthorLib__ = + __webpack_require__(242); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_app_components_shared_ProgressBar__ = + __webpack_require__(25); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__author_loader_Author__ = + __webpack_require__(385); + var _slicedToArray = (function () { + function sliceIterator(arr, i) { + var _arr = []; + var _n = true; + var _d = false; + var _e = undefined; + try { + for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { + _arr.push(_s.value); + if (i && _arr.length === i) break; + } + } catch (err) { + _d = true; + _e = err; + } finally { + try { + if (!_n && _i['return']) _i['return'](); + } finally { + if (_d) throw _e; + } + } + return _arr; + } + return function (arr, i) { + if (Array.isArray(arr)) { + return arr; + } else if (Symbol.iterator in Object(arr)) { + return sliceIterator(arr, i); + } else { + throw new TypeError('Invalid attempt to destructure non-iterable instance'); + } + }; + })(); + + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var AuthorLoader = (function (_React$Component) { + _inherits(AuthorLoader, _React$Component); + + /** + * + */ + + /** + * + */ + function AuthorLoader(props, context) { + _classCallCheck(this, AuthorLoader); + + var _this = _possibleConstructorReturn( + this, + (AuthorLoader.__proto__ || Object.getPrototypeOf(AuthorLoader)).call(this, props, context), + ); + + _this.onStoreUpdate = function () { + _this.setState({ + authors: _this.context.store.getState().authors, + tags: _this.context.store.getState().tags, + }); + }; + + _this.state = { + authors: context.store.getState().authors, + tags: context.store.getState().tags, + }; + return _this; + } + + /** + * + */ + + /** + * + */ + + /** + * Gets store from context. + */ + + _createClass(AuthorLoader, [ + { + key: 'componentDidMount', + value: function componentDidMount() { + var paginationKey = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_1_app_utils_PaginationKeyUtil__['a' /* calculatePaginationKey */], + )(this.props.location.pathname, this.props.location.search); + + var _getRelatedDataFromSt = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_3_app_components_libs_AuthorLib__[ + 'a' /* getRelatedDataFromStore */ + ], + )({ + paginationKey: paginationKey, + authorId: this.props.params.id, + authorsCollection: this.state.authors, + tagsCollection: this.state.tags, + }), + _getRelatedDataFromSt2 = _slicedToArray(_getRelatedDataFromSt, 2), + author = _getRelatedDataFromSt2[0], + tagsList = _getRelatedDataFromSt2[1]; + + if (!author || !tagsList) { + this.unsubscribe = this.context.store.subscribe(this.onStoreUpdate); + var authorId = this.props.params.id; + this.context.store.dispatch( + __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_2_app_actions_sharedActions__['e' /* loadAuthorPageData */], + )(authorId, paginationKey), + ); + } + }, + + /** + * + */ + }, + { + key: 'render', + value: function render() { + var authors = this.state.authors; + var tags = this.state.tags; + var paginationKey = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_1_app_utils_PaginationKeyUtil__['a' /* calculatePaginationKey */], + )(this.props.location.pathname, this.props.location.search); + + var _getRelatedDataFromSt3 = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_3_app_components_libs_AuthorLib__[ + 'a' /* getRelatedDataFromStore */ + ], + )({ + paginationKey: paginationKey, + authorId: this.props.params.id, + authorsCollection: authors, + tagsCollection: tags, + }), + _getRelatedDataFromSt4 = _slicedToArray(_getRelatedDataFromSt3, 2), + author = _getRelatedDataFromSt4[0], + tagsList = _getRelatedDataFromSt4[1]; + + if (authors.get('isPending') || tags.get('isPending') || !author || !tagsList) { + return React.createElement( + __WEBPACK_IMPORTED_MODULE_4_app_components_shared_ProgressBar__['a' /* default */], + { label: '\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430...' }, + ); + } + + if (this.unsubscribe) { + this.unsubscribe(); + this.unsubscribe = null; + } + + return React.createElement( + __WEBPACK_IMPORTED_MODULE_5__author_loader_Author__['a' /* default */], + { author: author, tags: tagsList, params: this.props.params }, + ); + }, + }, + ]); + + return AuthorLoader; + })(React.Component); + + AuthorLoader.contextTypes = { + store: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object.isRequired, + }; + AuthorLoader.propTypes = { + params: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.shape({ + id: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string.isRequired, + }).isRequired, + location: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.shape({ + search: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string, + pathname: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string.isRequired, + }).isRequired, + }; + + /* harmony default export */ __webpack_exports__['default'] = AuthorLoader; + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(1)); + + /***/ + }, + /* 233 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (React) { + Object.defineProperty(__webpack_exports__, '__esModule', { value: true }); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(2); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_app_utils_PaginationKeyUtil__ = + __webpack_require__(26); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_app_actions_sharedActions__ = + __webpack_require__(127); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__authors_loader_Authors__ = + __webpack_require__(390); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_app_components_shared_ProgressBar__ = + __webpack_require__(25); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var AuthorsLoader = (function (_React$Component) { + _inherits(AuthorsLoader, _React$Component); + + /** + * + */ + + /** + * Gets store from context. + */ + function AuthorsLoader(props, context) { + _classCallCheck(this, AuthorsLoader); + + var _this = _possibleConstructorReturn( + this, + (AuthorsLoader.__proto__ || Object.getPrototypeOf(AuthorsLoader)).call(this, props, context), + ); + + _this.onStoreUpdate = function () { + _this.setState({ authors: _this.context.store.getState().authors }); + }; + + _this.state = { authors: context.store.getState().authors }; + return _this; + } + + /** + * + */ + + /** + * + */ + + _createClass(AuthorsLoader, [ + { + key: 'componentDidMount', + + /** + * + */ + value: function componentDidMount() { + var authors = this.state.authors; + var paginationKey = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_1_app_utils_PaginationKeyUtil__['a' /* calculatePaginationKey */], + )(this.props.location.pathname, this.props.location.search); + var page = this.getCurrentPage(); + + var authorsOnPage = authors.getItemsOnPage(paginationKey, page); + + if (!authorsOnPage) { + this.unsubscribe = this.context.store.subscribe(this.onStoreUpdate); + this.context.store.dispatch( + __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_2_app_actions_sharedActions__['f' /* loadAuthorsPageData */], + )(paginationKey, this.props.location.query), + ); + } + }, + + /** + * + */ + }, + { + key: 'getCurrentPage', + value: function getCurrentPage() { + return this.props.location.query.page || '1'; + }, + + /** + * + */ + }, + { + key: 'render', + value: function render() { + var authors = this.state.authors; + var paginationKey = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_1_app_utils_PaginationKeyUtil__['a' /* calculatePaginationKey */], + )(this.props.location.pathname, this.props.location.search); + var page = this.getCurrentPage(); + var authorsOnPage = authors.getItemsOnPage(paginationKey, page); + + if (authors.get('isPending') || !authorsOnPage) { + return React.createElement( + __WEBPACK_IMPORTED_MODULE_4_app_components_shared_ProgressBar__['a' /* default */], + { label: '\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430...' }, + ); + } + + if (this.unsubscribe) { + this.unsubscribe(); + this.unsubscribe = null; + } + + return React.createElement( + __WEBPACK_IMPORTED_MODULE_3__authors_loader_Authors__['a' /* default */], + { authors: authorsOnPage }, + ); + }, + }, + ]); + + return AuthorsLoader; + })(React.Component); + + AuthorsLoader.contextTypes = { + store: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object.isRequired, + }; + AuthorsLoader.propTypes = { + location: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.shape({ + search: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string, + pathname: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string.isRequired, + query: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object, + }).isRequired, + }; + + /* harmony default export */ __webpack_exports__['default'] = AuthorsLoader; + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(1)); + + /***/ + }, + /* 234 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (React) { + Object.defineProperty(__webpack_exports__, '__esModule', { value: true }); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(2); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__current_user_loader_CurrentUser__ = + __webpack_require__(391); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_app_actions_currentUserActions__ = + __webpack_require__(21); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var PostLoader = (function (_React$Component) { + _inherits(PostLoader, _React$Component); + + function PostLoader() { + _classCallCheck(this, PostLoader); + + return _possibleConstructorReturn( + this, + (PostLoader.__proto__ || Object.getPrototypeOf(PostLoader)).apply(this, arguments), + ); + } + + _createClass(PostLoader, [ + { + key: 'componentWillUnmount', + + /** + * + */ + value: function componentWillUnmount() { + this.context.store.dispatch( + __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_2_app_actions_currentUserActions__[ + 'c' /* rollbackCurrentUserToPersistentVersion */ + ], + )(), + ); + }, + + /** + * + */ + + /** + * Gets store from context. + */ + }, + { + key: 'render', + value: function render() { + var storeState = this.context.store.getState(); + var currentUserContainer = storeState.currentUserContainer; + var currentUser = currentUserContainer.getCurrentUser(); + + if ( + currentUserContainer.get('isPending') || + !currentUserContainer.containsPersistentCurrentUser() + ) { + throw new Error('Current user should be set for profile page.'); + } + + return React.createElement( + __WEBPACK_IMPORTED_MODULE_1__current_user_loader_CurrentUser__['a' /* default */], + { currentUser: currentUser }, + ); + }, + }, + ]); + + return PostLoader; + })(React.Component); + + PostLoader.contextTypes = { + store: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object.isRequired, + }; + + /* harmony default export */ __webpack_exports__['default'] = PostLoader; + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(1)); + + /***/ + }, + /* 235 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (React) { + Object.defineProperty(__webpack_exports__, '__esModule', { value: true }); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(2); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_app_actions_sharedActions__ = + __webpack_require__(127); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_app_utils_PaginationKeyUtil__ = + __webpack_require__(26); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_app_components_libs_PostLib__ = + __webpack_require__(243); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__post_loader_Post__ = __webpack_require__(405); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_app_components_shared_ProgressBar__ = + __webpack_require__(25); + var _slicedToArray = (function () { + function sliceIterator(arr, i) { + var _arr = []; + var _n = true; + var _d = false; + var _e = undefined; + try { + for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { + _arr.push(_s.value); + if (i && _arr.length === i) break; + } + } catch (err) { + _d = true; + _e = err; + } finally { + try { + if (!_n && _i['return']) _i['return'](); + } finally { + if (_d) throw _e; + } + } + return _arr; + } + return function (arr, i) { + if (Array.isArray(arr)) { + return arr; + } else if (Symbol.iterator in Object(arr)) { + return sliceIterator(arr, i); + } else { + throw new TypeError('Invalid attempt to destructure non-iterable instance'); + } + }; + })(); + + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var PostLoader = (function (_React$Component) { + _inherits(PostLoader, _React$Component); + + /** + * + */ + + /** + * + */ + function PostLoader(props, context) { + _classCallCheck(this, PostLoader); + + var _this = _possibleConstructorReturn( + this, + (PostLoader.__proto__ || Object.getPrototypeOf(PostLoader)).call(this, props, context), + ); + + _this.onStoreUpdate = function () { + _this.setState({ + posts: _this.context.store.getState().posts, + authors: _this.context.store.getState().authors, + tags: _this.context.store.getState().tags, + comments: _this.context.store.getState().comments, + }); + }; + + _this.state = { + posts: context.store.getState().posts, + authors: context.store.getState().authors, + tags: context.store.getState().tags, + comments: context.store.getState().comments, + }; + return _this; + } + + /** + * + */ + + /** + * + */ + + /** + * Gets store from context. + */ + + _createClass(PostLoader, [ + { + key: 'componentDidMount', + value: function componentDidMount() { + var paginationKey = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_2_app_utils_PaginationKeyUtil__['a' /* calculatePaginationKey */], + )(this.props.location.pathname, this.props.location.search); + + var _getRelatedDataFromSt = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_3_app_components_libs_PostLib__[ + 'a' /* getRelatedDataFromStore */ + ], + )({ + paginationKey: paginationKey, + postId: this.props.params.id, + postsCollection: this.state.posts, + authorsCollection: this.state.authors, + tagsCollection: this.state.tags, + commentsCollection: this.state.comments, + }), + _getRelatedDataFromSt2 = _slicedToArray(_getRelatedDataFromSt, 4), + post = _getRelatedDataFromSt2[0], + authorsList = _getRelatedDataFromSt2[1], + tagsForPost = _getRelatedDataFromSt2[2], + commentsTree = _getRelatedDataFromSt2[3]; + + if (!post || !post.get('content') || !authorsList || !tagsForPost || !commentsTree) { + this.unsubscribe = this.context.store.subscribe(this.onStoreUpdate); + var postId = this.props.params.id; + this.context.store.dispatch( + __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_1_app_actions_sharedActions__['g' /* loadPostPageData */], + )(postId, paginationKey), + ); + } + }, + + /** + * + */ + }, + { + key: 'render', + value: function render() { + var posts = this.state.posts; + var authors = this.state.authors; + var tags = this.state.tags; + var comments = this.state.comments; + + var paginationKey = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_2_app_utils_PaginationKeyUtil__['a' /* calculatePaginationKey */], + )(this.props.location.pathname, this.props.location.search); + + var _getRelatedDataFromSt3 = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_3_app_components_libs_PostLib__[ + 'a' /* getRelatedDataFromStore */ + ], + )({ + paginationKey: paginationKey, + postId: this.props.params.id, + postsCollection: posts, + authorsCollection: authors, + tagsCollection: tags, + commentsCollection: comments, + }), + _getRelatedDataFromSt4 = _slicedToArray(_getRelatedDataFromSt3, 4), + post = _getRelatedDataFromSt4[0], + authorsList = _getRelatedDataFromSt4[1], + tagsForPost = _getRelatedDataFromSt4[2], + commentsTree = _getRelatedDataFromSt4[3]; + + if ( + posts.get('isPending') || + authors.get('isPending') || + tags.get('isPending') || + comments.get('isPending') || + !post || + !post.get('content') || + !authorsList || + !tagsForPost || + !commentsTree + ) { + return React.createElement( + __WEBPACK_IMPORTED_MODULE_5_app_components_shared_ProgressBar__['a' /* default */], + { label: '\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430...' }, + ); + } + + if (this.unsubscribe) { + this.unsubscribe(); + this.unsubscribe = null; + } + + var author = authors.getAuthor(post.get('author_id')); + var isCurrentUserLoggedIn = this.context.store + .getState() + .currentUserContainer.containsPersistentCurrentUser(); + + return React.createElement( + __WEBPACK_IMPORTED_MODULE_4__post_loader_Post__['a' /* default */], + { + post: post, + author: author, + tags: tagsForPost, + isCurrentUserLoggedIn: isCurrentUserLoggedIn, + location: this.props.location, + params: this.props.params, + }, + ); + }, + }, + ]); + + return PostLoader; + })(React.Component); + + PostLoader.contextTypes = { + store: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object.isRequired, + }; + PostLoader.propTypes = { + params: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.shape({ + id: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string.isRequired, + }).isRequired, + location: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.shape({ + search: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string, + pathname: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string.isRequired, + }).isRequired, + }; + + /* harmony default export */ __webpack_exports__['default'] = PostLoader; + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(1)); + + /***/ + }, + /* 236 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (React) { + Object.defineProperty(__webpack_exports__, '__esModule', { value: true }); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(2); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_app_utils_PaginationKeyUtil__ = + __webpack_require__(26); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_app_components_libs_PostsLib__ = + __webpack_require__(244); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_app_actions_postsActions__ = + __webpack_require__(383); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__posts_loader_Posts__ = __webpack_require__(418); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_app_components_shared_ProgressBar__ = + __webpack_require__(25); + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + var _slicedToArray = (function () { + function sliceIterator(arr, i) { + var _arr = []; + var _n = true; + var _d = false; + var _e = undefined; + try { + for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { + _arr.push(_s.value); + if (i && _arr.length === i) break; + } + } catch (err) { + _d = true; + _e = err; + } finally { + try { + if (!_n && _i['return']) _i['return'](); + } finally { + if (_d) throw _e; + } + } + return _arr; + } + return function (arr, i) { + if (Array.isArray(arr)) { + return arr; + } else if (Symbol.iterator in Object(arr)) { + return sliceIterator(arr, i); + } else { + throw new TypeError('Invalid attempt to destructure non-iterable instance'); + } + }; + })(); + + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var PostsLoader = (function (_React$Component) { + _inherits(PostsLoader, _React$Component); + + /** + * + */ + + /** + * Gets store from context. + */ + function PostsLoader(props, context) { + _classCallCheck(this, PostsLoader); + + var _this = _possibleConstructorReturn( + this, + (PostsLoader.__proto__ || Object.getPrototypeOf(PostsLoader)).call(this, props, context), + ); + + _this.state = { + posts: context.store.getState().posts, + tags: context.store.getState().tags, + authors: context.store.getState().authors, + }; + + _this.onStoreUpdate = _this.onStoreUpdate.bind(_this); + return _this; + } + + /** + * + */ + + /** + * + */ + + _createClass(PostsLoader, [ + { + key: 'componentDidMount', + value: function componentDidMount() { + var paginationKey = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_1_app_utils_PaginationKeyUtil__['a' /* calculatePaginationKey */], + )(this.props.location.pathname, this.props.location.search); + var page = this.getCurrentPage(); + + var _getRelatedDataFromSt = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_2_app_components_libs_PostsLib__[ + 'a' /* getRelatedDataFromStore */ + ], + )({ + page: page, + paginationKey: paginationKey, + postsCollection: this.state.posts, + authorsCollection: this.state.authors, + tagsCollection: this.state.tags, + }), + _getRelatedDataFromSt2 = _slicedToArray(_getRelatedDataFromSt, 3), + postsOnPage = _getRelatedDataFromSt2[0], + tagsOnPage = _getRelatedDataFromSt2[1], + authorsForPosts = _getRelatedDataFromSt2[2]; + + if (!postsOnPage || !authorsForPosts || !tagsOnPage) { + this.unsubscribe = this.context.store.subscribe(this.onStoreUpdate); + this.context.store.dispatch( + __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_3_app_actions_postsActions__['a' /* fetchPosts */], + )(paginationKey, this.props.location.query), + ); + } + }, + + /** + * + */ + }, + { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + var paginationKey = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_1_app_utils_PaginationKeyUtil__['a' /* calculatePaginationKey */], + )(nextProps.location.pathname, nextProps.location.search); + var page = nextProps.location.query.page || '1'; + + var _getRelatedDataFromSt3 = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_2_app_components_libs_PostsLib__[ + 'a' /* getRelatedDataFromStore */ + ], + )({ + page: page, + paginationKey: paginationKey, + postsCollection: this.state.posts, + authorsCollection: this.state.authors, + tagsCollection: this.state.tags, + }), + _getRelatedDataFromSt4 = _slicedToArray(_getRelatedDataFromSt3, 3), + postsOnPage = _getRelatedDataFromSt4[0], + tagsOnPage = _getRelatedDataFromSt4[1], + authorsForPosts = _getRelatedDataFromSt4[2]; + + if (!postsOnPage || !authorsForPosts || !tagsOnPage) { + this.unsubscribe = this.context.store.subscribe(this.onStoreUpdate); + this.context.store.dispatch( + __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_3_app_actions_postsActions__['a' /* fetchPosts */], + )(paginationKey, nextProps.location.query), + ); + } + }, + + /** + * + */ + }, + { + key: 'getCurrentPage', + value: function getCurrentPage() { + return this.props.location.query.page || '1'; + }, + + /** + * + */ + }, + { + key: 'onStoreUpdate', + value: function onStoreUpdate() { + this.setState({ + posts: this.context.store.getState().posts, + tags: this.context.store.getState().tags, + authors: this.context.store.getState().authors, + }); + }, + + /** + * + */ + }, + { + key: 'render', + value: function render() { + var posts = this.state.posts; + var tags = this.state.tags; + var authors = this.state.authors; + + var paginationKey = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_1_app_utils_PaginationKeyUtil__['a' /* calculatePaginationKey */], + )(this.props.location.pathname, this.props.location.search); + var page = this.getCurrentPage(); + + var _getRelatedDataFromSt5 = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_2_app_components_libs_PostsLib__[ + 'a' /* getRelatedDataFromStore */ + ], + )({ + page: page, + paginationKey: paginationKey, + postsCollection: posts, + authorsCollection: authors, + tagsCollection: tags, + }), + _getRelatedDataFromSt6 = _slicedToArray(_getRelatedDataFromSt5, 3), + postsOnPage = _getRelatedDataFromSt6[0], + tagsOnPage = _getRelatedDataFromSt6[1], + authorsForPosts = _getRelatedDataFromSt6[2]; + + if ( + posts.get('isPending') || + tags.get('isPending') || + authors.get('isPending') || + !postsOnPage || + !authorsForPosts || + !tagsOnPage + ) { + return React.createElement( + __WEBPACK_IMPORTED_MODULE_5_app_components_shared_ProgressBar__['a' /* default */], + { label: '\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430...' }, + ); + } + + if (this.unsubscribe) { + this.unsubscribe(); + this.unsubscribe = null; + } + + return React.createElement( + __WEBPACK_IMPORTED_MODULE_4__posts_loader_Posts__['a' /* default */], + _extends({}, this.props, { tags: tagsOnPage }), + ); + }, + }, + ]); + + return PostsLoader; + })(React.Component); + + PostsLoader.contextTypes = { + store: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object.isRequired, + }; + PostsLoader.propTypes = { + location: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.shape({ + search: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string, + pathname: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string.isRequired, + query: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object, + }).isRequired, + }; + + /* harmony default export */ __webpack_exports__['default'] = PostsLoader; + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(1)); + + /***/ + }, + /* 237 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (React) { + Object.defineProperty(__webpack_exports__, '__esModule', { value: true }); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(2); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_app_actions_currentUserActions__ = + __webpack_require__(21); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__resend_confirmation_loader_ResendConfirmation__ = + __webpack_require__(424); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var ResendConfirmationLoader = (function (_React$Component) { + _inherits(ResendConfirmationLoader, _React$Component); + + function ResendConfirmationLoader() { + _classCallCheck(this, ResendConfirmationLoader); + + return _possibleConstructorReturn( + this, + (ResendConfirmationLoader.__proto__ || Object.getPrototypeOf(ResendConfirmationLoader)).apply( + this, + arguments, + ), + ); + } + + _createClass(ResendConfirmationLoader, [ + { + key: 'componentWillMount', + + /** + * + */ + value: function componentWillMount() { + this.context.store.dispatch( + __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_1_app_actions_currentUserActions__['g' /* buildCurrentUser */], + )({}), + ); + }, + + /** + * + */ + + /** + * Gets store from context. + */ + }, + { + key: 'componentWillUnmount', + value: function componentWillUnmount() { + this.context.store.dispatch( + __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_1_app_actions_currentUserActions__['h' /* clearCurrentUser */], + )(), + ); + }, + + /** + * + */ + }, + { + key: 'render', + value: function render() { + var storeState = this.context.store.getState(); + var currentUserContainer = storeState.currentUserContainer; + + if (currentUserContainer.containsPersistentCurrentUser()) { + throw new Error('Current user should not be set for resend confirmation page.'); + } + + return React.createElement( + __WEBPACK_IMPORTED_MODULE_2__resend_confirmation_loader_ResendConfirmation__[ + 'a' /* default */ + ], + null, + ); + }, + }, + ]); + + return ResendConfirmationLoader; + })(React.Component); + + ResendConfirmationLoader.contextTypes = { + store: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object.isRequired, + }; + + /* harmony default export */ __webpack_exports__['default'] = ResendConfirmationLoader; + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(1)); + + /***/ + }, + /* 238 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (React) { + Object.defineProperty(__webpack_exports__, '__esModule', { value: true }); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(2); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__reset_password_loader_ResetPassword__ = + __webpack_require__(427); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_app_actions_currentUserActions__ = + __webpack_require__(21); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var ResetPasswordLoader = (function (_React$Component) { + _inherits(ResetPasswordLoader, _React$Component); + + function ResetPasswordLoader() { + _classCallCheck(this, ResetPasswordLoader); + + return _possibleConstructorReturn( + this, + (ResetPasswordLoader.__proto__ || Object.getPrototypeOf(ResetPasswordLoader)).apply( + this, + arguments, + ), + ); + } + + _createClass(ResetPasswordLoader, [ + { + key: 'componentWillMount', + + /** + * + */ + value: function componentWillMount() { + this.context.store.dispatch( + __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_2_app_actions_currentUserActions__['g' /* buildCurrentUser */], + )({}), + ); + }, + + /** + * + */ + + /** + * Gets store from context. + */ + }, + { + key: 'componentWillUnmount', + value: function componentWillUnmount() { + this.context.store.dispatch( + __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_2_app_actions_currentUserActions__['h' /* clearCurrentUser */], + )(), + ); + }, + + /** + * + */ + }, + { + key: 'render', + value: function render() { + var storeState = this.context.store.getState(); + var currentUserContainer = storeState.currentUserContainer; + + if (currentUserContainer.containsPersistentCurrentUser()) { + throw new Error('Current user should not be set for reset password page.'); + } + + return React.createElement( + __WEBPACK_IMPORTED_MODULE_1__reset_password_loader_ResetPassword__['a' /* default */], + this.props, + ); + }, + }, + ]); + + return ResetPasswordLoader; + })(React.Component); + + ResetPasswordLoader.contextTypes = { + store: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object.isRequired, + }; + + /* harmony default export */ __webpack_exports__['default'] = ResetPasswordLoader; + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(1)); + + /***/ + }, + /* 239 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (React) { + Object.defineProperty(__webpack_exports__, '__esModule', { value: true }); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(2); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__reset_password_request_loader_ResetPasswordRequest__ = + __webpack_require__(430); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_app_actions_currentUserActions__ = + __webpack_require__(21); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var ResetPasswordRequestLoader = (function (_React$Component) { + _inherits(ResetPasswordRequestLoader, _React$Component); + + function ResetPasswordRequestLoader() { + _classCallCheck(this, ResetPasswordRequestLoader); + + return _possibleConstructorReturn( + this, + ( + ResetPasswordRequestLoader.__proto__ || Object.getPrototypeOf(ResetPasswordRequestLoader) + ).apply(this, arguments), + ); + } + + _createClass(ResetPasswordRequestLoader, [ + { + key: 'componentWillMount', + + /** + * + */ + value: function componentWillMount() { + this.context.store.dispatch( + __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_2_app_actions_currentUserActions__['g' /* buildCurrentUser */], + )({}), + ); + }, + + /** + * + */ + + /** + * Gets store from context. + */ + }, + { + key: 'componentWillUnmount', + value: function componentWillUnmount() { + this.context.store.dispatch( + __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_2_app_actions_currentUserActions__['h' /* clearCurrentUser */], + )(), + ); + }, + + /** + * + */ + }, + { + key: 'render', + value: function render() { + var storeState = this.context.store.getState(); + var currentUserContainer = storeState.currentUserContainer; + + if (currentUserContainer.containsPersistentCurrentUser()) { + throw new Error('Current user should not be set for reset password request page.'); + } + + return React.createElement( + __WEBPACK_IMPORTED_MODULE_1__reset_password_request_loader_ResetPasswordRequest__[ + 'a' /* default */ + ], + null, + ); + }, + }, + ]); + + return ResetPasswordRequestLoader; + })(React.Component); + + ResetPasswordRequestLoader.contextTypes = { + store: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object.isRequired, + }; + + /* harmony default export */ __webpack_exports__['default'] = ResetPasswordRequestLoader; + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(1)); + + /***/ + }, + /* 240 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (React) { + Object.defineProperty(__webpack_exports__, '__esModule', { value: true }); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(2); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__sign_in_loader_SignIn__ = + __webpack_require__(456); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var SignInLoader = (function (_React$Component) { + _inherits(SignInLoader, _React$Component); + + function SignInLoader() { + _classCallCheck(this, SignInLoader); + + return _possibleConstructorReturn( + this, + (SignInLoader.__proto__ || Object.getPrototypeOf(SignInLoader)).apply(this, arguments), + ); + } + + _createClass(SignInLoader, [ + { + key: 'render', + + /** + * + */ + value: function render() { + if (this.context.store.getState().currentUser) { + throw new Error('Current user should not be set for registration page.'); + } + + return React.createElement( + __WEBPACK_IMPORTED_MODULE_1__sign_in_loader_SignIn__['a' /* default */], + null, + ); + }, + /** + * Gets store from context. + */ + }, + ]); + + return SignInLoader; + })(React.Component); + + SignInLoader.contextTypes = { + store: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object.isRequired, + }; + + /* harmony default export */ __webpack_exports__['default'] = SignInLoader; + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(1)); + + /***/ + }, + /* 241 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (React) { + Object.defineProperty(__webpack_exports__, '__esModule', { value: true }); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(2); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__sign_up_loader_SignUp__ = + __webpack_require__(459); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_app_actions_currentUserActions__ = + __webpack_require__(21); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var SignUpLoader = (function (_React$Component) { + _inherits(SignUpLoader, _React$Component); + + function SignUpLoader() { + _classCallCheck(this, SignUpLoader); + + return _possibleConstructorReturn( + this, + (SignUpLoader.__proto__ || Object.getPrototypeOf(SignUpLoader)).apply(this, arguments), + ); + } + + _createClass(SignUpLoader, [ + { + key: 'componentWillMount', + + /** + * + */ + value: function componentWillMount() { + this.context.store.dispatch( + __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_2_app_actions_currentUserActions__['g' /* buildCurrentUser */], + )({}), + ); + }, + + /** + * + */ + + /** + * Gets store from context. + */ + }, + { + key: 'componentWillUnmount', + value: function componentWillUnmount() { + this.context.store.dispatch( + __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_2_app_actions_currentUserActions__['h' /* clearCurrentUser */], + )(), + ); + }, + + /** + * + */ + }, + { + key: 'render', + value: function render() { + var storeState = this.context.store.getState(); + var currentUserContainer = storeState.currentUserContainer; + + if (currentUserContainer.containsPersistentCurrentUser()) { + throw new Error('Current user should not be set for registration page.'); + } + + return React.createElement( + __WEBPACK_IMPORTED_MODULE_1__sign_up_loader_SignUp__['a' /* default */], + null, + ); + }, + }, + ]); + + return SignUpLoader; + })(React.Component); + + SignUpLoader.contextTypes = { + store: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object.isRequired, + }; + + /* harmony default export */ __webpack_exports__['default'] = SignUpLoader; + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(1)); + + /***/ + }, + /* 242 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = getRelatedDataFromStore; + /** + * + */ + function getRelatedDataFromStore(params) { + if (!params.authorId) throw new Error('Missing authorId parameter.'); + if (!params.paginationKey) throw new Error('Missing paginationKey parameter.'); + if (!params.authorsCollection) throw new Error('Missing authorsCollection parameter.'); + if (!params.tagsCollection) throw new Error('Missing tagsCollection parameter.'); + + // Get post form store: + var authors = params.authorsCollection; + var authorId = params.authorId; + var author = authors.getAuthor(authorId); + + // Get tags form store: + var tags = params.tagsCollection; + var tagsList = tags.getTagsOnPage(params.paginationKey, '1'); + + return [author, tagsList]; + } + + /***/ + }, + /* 243 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = getRelatedDataFromStore; + /** + * + */ + function getRelatedDataFromStore(params) { + if (!params.postId) throw new Error('Missing postId parameter.'); + if (!params.paginationKey) throw new Error('Missing paginationKey parameter.'); + if (!params.postsCollection) throw new Error('Missing postsCollection parameter.'); + if (!params.authorsCollection) throw new Error('Missing authorsCollection parameter.'); + if (!params.tagsCollection) throw new Error('Missing tagsCollection parameter.'); + if (!params.commentsCollection) throw new Error('Missing commentsCollection parameter.'); + + // Get post form store: + var posts = params.postsCollection; + var postId = params.postId; + var post = posts.getPost(postId); + + // Get authors form store: + var authors = params.authorsCollection; + var authorsList = authors.getItemsOnPage(params.paginationKey, '1'); + + // Get tags form store: + var tags = params.tagsCollection; + var tagsForPost = tags.getTagsForPost(post); + + // Get comments from store: + var comments = params.commentsCollection; + var commentsTree = comments.getItemsOnPage(params.paginationKey, '1'); + + return [post, authorsList, tagsForPost, commentsTree]; + } + + /***/ + }, + /* 244 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = getRelatedDataFromStore; + /** + * + */ + function getRelatedDataFromStore(params) { + if (!params.page) throw new Error('Missing page parameter.'); + if (!params.paginationKey) throw new Error('Missing paginationKey parameter.'); + if (!params.postsCollection) throw new Error('Missing postsCollection parameter.'); + if (!params.authorsCollection) throw new Error('Missing authorsCollection parameter.'); + if (!params.tagsCollection) throw new Error('Missing tagsCollection parameter.'); + + var posts = params.postsCollection; + var tags = params.tagsCollection; + var authors = params.authorsCollection; + + var postsOnPage = posts.getItemsOnPage(params.paginationKey, params.page); + var tagsOnPage = tags.getItemsOnPage(params.paginationKey, '1'); + var authorsForPosts = authors.getAuthorsForPosts(postsOnPage); + + return [postsOnPage, tagsOnPage, authorsForPosts]; + } + + /***/ + }, + /* 245 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (React) { + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(2); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_redux__ = __webpack_require__(6); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_app_utils_PaginationKeyUtil__ = + __webpack_require__(26); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_app_records_collections_CommentsCollectionRecord__ = + __webpack_require__(112); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_app_records_collections_AuthorsCollectionRecord__ = + __webpack_require__(73); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__Comment__ = __webpack_require__(408); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var Comments = (function (_React$Component) { + _inherits(Comments, _React$Component); + + function Comments() { + _classCallCheck(this, Comments); + + return _possibleConstructorReturn( + this, + (Comments.__proto__ || Object.getPrototypeOf(Comments)).apply(this, arguments), + ); + } + + _createClass(Comments, [ + { + key: 'renderBranchLine', + + /** + * + */ + value: function renderBranchLine() { + var _this2 = this; + + // Get comments from store: + var paginationKey = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_2_app_utils_PaginationKeyUtil__['a' /* calculatePaginationKey */], + )(this.props.location.pathname, this.props.location.search); + var commentsOnPage = this.props.commentsCollection.getItemsOnPage(paginationKey, '1'); + var commentsOnPageForParent = commentsOnPage.filter(function (comment) { + if (!_this2.props.parentCommentId) return !comment.get('parent_id'); + return comment.get('parent_id') === _this2.props.parentCommentId; + }); + + if (!commentsOnPageForParent.size) return null; + return React.createElement('div', { className: 'branch-line' }); + }, + + /** + * + */ + + /** + * + */ + }, + { + key: 'renderComments', + value: function renderComments() { + var _this3 = this; + + // Get comments from store: + var paginationKey = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_2_app_utils_PaginationKeyUtil__['a' /* calculatePaginationKey */], + )(this.props.location.pathname, this.props.location.search); + var commentsOnPage = this.props.commentsCollection.getItemsOnPage(paginationKey, '1'); + var commentsOnPageForParent = commentsOnPage.filter(function (comment) { + if (!_this3.props.parentCommentId) return !comment.get('parent_id'); + return comment.get('parent_id') === _this3.props.parentCommentId; + }); + + var result = []; + + commentsOnPageForParent.forEach(function (comment, index) { + var author = _this3.props.authorsCollection.getAuthor(comment.get('author_id')); + var isLastLeaf = _this3.props.parentCommentId && index === commentsOnPageForParent.size - 1; + + result.push( + React.createElement(__WEBPACK_IMPORTED_MODULE_5__Comment__['a' /* default */], { + key: comment.get('id'), + author: author, + comment: comment, + isLastLeaf: isLastLeaf, + isCurrentUserLoggedIn: _this3.props.isCurrentUserLoggedIn, + location: _this3.props.location, + }), + ); + }); + + return result; + }, + + /** + * + */ + }, + { + key: 'render', + value: function render() { + return React.createElement( + 'div', + { className: 'comments' }, + this.renderBranchLine(), + this.renderComments(), + ); + }, + }, + ]); + + return Comments; + })(React.Component); + + /** + * + */ + + Comments.propTypes = { + commentsCollection: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.instanceOf( + __WEBPACK_IMPORTED_MODULE_3_app_records_collections_CommentsCollectionRecord__['a' /* default */], + ).isRequired, + authorsCollection: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.instanceOf( + __WEBPACK_IMPORTED_MODULE_4_app_records_collections_AuthorsCollectionRecord__['a' /* default */], + ).isRequired, + parentCommentId: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number, + isCurrentUserLoggedIn: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string, + location: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.shape({ + search: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string, + pathname: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string.isRequired, + }).isRequired, + }; + var mapStateToProps = function mapStateToProps(state, ownProps) { + return { + commentsCollection: state.comments, + authorsCollection: state.authors, + }; + }; + + /* harmony default export */ __webpack_exports__['a'] = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_1_react_redux__['b' /* connect */], + )(mapStateToProps)(Comments); + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(1)); + + /***/ + }, + /* 246 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (React, _) { + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(2); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames__ = __webpack_require__(35); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_classnames__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_router__ = __webpack_require__(13); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_react_redux__ = __webpack_require__(6); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_app_actions_commentsActions__ = + __webpack_require__(153); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_app_records_entities_CommentRecord__ = + __webpack_require__(113); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_app_records_collections_CommentsCollectionRecord__ = + __webpack_require__(112); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_app_components_shared_SubmitButton__ = + __webpack_require__(72); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var CommentForm = (function (_React$Component) { + _inherits(CommentForm, _React$Component); + + function CommentForm() { + var _ref; + + var _temp, _this, _ret; + + _classCallCheck(this, CommentForm); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return ( + (_ret = + ((_temp = + ((_this = _possibleConstructorReturn( + this, + (_ref = CommentForm.__proto__ || Object.getPrototypeOf(CommentForm)).call.apply( + _ref, + [this].concat(args), + ), + )), + _this)), + (_this.onContentChange = function (event) { + _this.props.onContentChange(_this.props.commentTmpId, event.target.value); + }), + (_this.onSubmit = function (event) { + event.preventDefault(); + var tmpComment = _this.props.commentsCollection.getNewItem(_this.props.commentTmpId); + _this.props.onSubmit(_this.props.commentTmpId, _this.props.location.pathname, { + comment: { + post_id: tmpComment.get('post_id'), + parent_id: tmpComment.get('parent_id'), + content: tmpComment.get('content'), + }, + }); + }), + _temp)), + _possibleConstructorReturn(_this, _ret) + ); + } + /** + * + */ + + /** + * + */ + + /** + * + */ + + _createClass(CommentForm, [ + { + key: 'renderCancelButton', + + /** + * + */ + value: function renderCancelButton() { + if (!this.props.comment) return null; + + var alteredQuery = _.clone(this.props.location.query); + delete alteredQuery.respond_form_opened_for_comment_with_id; + + var locationForClosedForm = { + pathname: this.props.location.pathname, + query: alteredQuery, + }; + + return React.createElement( + __WEBPACK_IMPORTED_MODULE_2_react_router__['f' /* Link */], + { + to: locationForClosedForm, + href: locationForClosedForm, + className: 'btn btn-default btn-sm', + }, + React.createElement('span', { + className: 'glyphicon glyphicon-remove', + 'aria-hidden': 'true', + }), + ' \u041E\u0442\u043C\u0435\u043D\u0430', + ); + }, + + /** + * + */ + }, + { + key: 'render', + value: function render() { + var placeholder = void 0; + var formClass = void 0; + + if (this.props.comment) { + var commentWithOpenedRespondFormId = + this.props.location.query.respond_form_opened_for_comment_with_id; + var currentCommentId = String(this.props.comment.get('id')); + + if (commentWithOpenedRespondFormId !== currentCommentId) return null; + if (!this.props.isCurrentUserLoggedIn) return null; + + formClass = 'form-respond'; + placeholder = 'введите ответ'; + } else { + if (!this.props.isCurrentUserLoggedIn) { + return React.createElement( + 'h4', + { className: 'text-center can-not-leave-comment-message' }, + React.createElement('span', { + className: 'glyphicon glyphicon-exclamation-sign', + 'aria-hidden': 'true', + }), + ' ', + '\u0418\u0437\u0432\u0438\u043D\u0438\u0442\u0435, \u043D\u043E \u0442\u043E\u043B\u044C\u043A\u043E \u0430\u0432\u0442\u043E\u0440\u0438\u0437\u043E\u0432\u0430\u043D\u043D\u044B\u0435 \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u0438 \u043C\u043E\u0433\u0443\u0442 \u043E\u0441\u0442\u0430\u0432\u043B\u044F\u0442\u044C \u043A\u043E\u043C\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u0438!', + ); + } + + formClass = 'form-root'; + placeholder = 'введите новый комментарий'; + } + + var commentsCollection = this.props.commentsCollection; + var tmpComment = commentsCollection.getNewItem(this.props.commentTmpId); + var contentErrors = tmpComment.getContentErrors(); + var contentError = contentErrors ? contentErrors.first() : undefined; + var contentFormGroupClass = __WEBPACK_IMPORTED_MODULE_1_classnames___default()( + 'form-group form-group-content', + { 'has-error': contentError }, + ); + + return React.createElement( + 'form', + { onSubmit: this.onSubmit, className: formClass }, + React.createElement('input', { name: 'utf8', type: 'hidden', value: '\u2713' }), + React.createElement('input', { name: 'authenticity_token', type: 'hidden', value: '' }), + React.createElement( + 'div', + { className: contentFormGroupClass }, + React.createElement('textarea', { + value: tmpComment.get('content') || '', + onChange: this.onContentChange, + className: 'form-control', + id: 'comment_content', + placeholder: placeholder, + type: 'email', + name: 'comment[content]', + }), + React.createElement('span', { className: 'help-block' }, contentError), + ), + React.createElement( + __WEBPACK_IMPORTED_MODULE_7_app_components_shared_SubmitButton__['a' /* default */], + { + className: 'btn btn-default btn-sm', + readyText: '\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C', + pendingText: '\u0414\u043E\u0431\u0430\u0432\u043B\u0435\u043D\u0438\u0435...', + isDisabled: commentsCollection.get('isPending'), + }, + React.createElement('span', { + className: 'glyphicon glyphicon-ok', + 'aria-hidden': 'true', + }), + ), + '\xA0', + this.renderCancelButton(), + ); + }, + }, + ]); + + return CommentForm; + })(React.Component); + + /** + * + */ + + CommentForm.propTypes = { + location: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.shape({ + pathname: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string.isRequired, + query: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object, + }).isRequired, + comment: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.instanceOf( + __WEBPACK_IMPORTED_MODULE_5_app_records_entities_CommentRecord__['a' /* default */], + ), + commentsCollection: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.instanceOf( + __WEBPACK_IMPORTED_MODULE_6_app_records_collections_CommentsCollectionRecord__['a' /* default */], + ).isRequired, + isCurrentUserLoggedIn: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string, + onContentChange: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired, + onSubmit: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired, + commentTmpId: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number.isRequired, + }; + var mapStateToProps = function mapStateToProps(state, ownProps) { + return { + authenticityToken: state.railsContext.get('authenticityToken'), + commentsCollection: state.comments, + }; + }; + + /** + * + */ + var mapDispatchToProps = function mapDispatchToProps(dispatch) { + return { + onContentChange: function onContentChange(commentTmpId, content) { + dispatch( + __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_4_app_actions_commentsActions__[ + 'c' /* assignTmpCommentAttributes */ + ], + )(commentTmpId, { content: content }, true), + ); + }, + onSubmit: function onSubmit(commentTmpId, locationPathname, attributes) { + dispatch( + __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_4_app_actions_commentsActions__['d' /* createComment */], + )(commentTmpId, locationPathname, attributes), + ); + }, + }; + }; + + /* harmony default export */ __webpack_exports__['a'] = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_3_react_redux__['b' /* connect */], + )( + mapStateToProps, + mapDispatchToProps, + )(CommentForm); + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(1), __webpack_require__(60)); + + /***/ + }, + /* 247 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (React) { + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(2); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames__ = __webpack_require__(35); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_classnames__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_app_records_single_item_containers_CurrentUserContainerRecord__ = + __webpack_require__(39); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_app_components_shared_SubmitButton__ = + __webpack_require__(72); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var UserEmailForm = (function (_React$Component) { + _inherits(UserEmailForm, _React$Component); + + function UserEmailForm() { + var _ref; + + var _temp, _this, _ret; + + _classCallCheck(this, UserEmailForm); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return ( + (_ret = + ((_temp = + ((_this = _possibleConstructorReturn( + this, + (_ref = UserEmailForm.__proto__ || Object.getPrototypeOf(UserEmailForm)).call.apply( + _ref, + [this].concat(args), + ), + )), + _this)), + (_this.onEmailChange = function (event) { + var email = event.target.value; + _this.props.onEmailChange(email); + }), + (_this.onFormSubmit = function (event) { + event.preventDefault(); + + var currentUser = _this.props.currentUserContainer.getCurrentUser(); + _this.props.onSubmit({ + user: { + email: currentUser.get('email') || '', + }, + }); + }), + _temp)), + _possibleConstructorReturn(_this, _ret) + ); + } + /** + * + */ + + /** + * + */ + + /** + * + */ + + _createClass(UserEmailForm, [ + { + key: 'renderSubmitButton', + + /** + * + */ + value: function renderSubmitButton() { + var readyText = this.props.resetPasswordRequestMode + ? 'Отправить запрос' + : 'Отправить инструкции'; + var glyphIcon = React.createElement('span', { + className: 'glyphicon glyphicon-send', + 'aria-hidden': 'true', + }); + + return React.createElement( + __WEBPACK_IMPORTED_MODULE_3_app_components_shared_SubmitButton__['a' /* default */], + { + className: 'btn btn-lg btn-primary btn-block', + isDisabled: this.props.currentUserContainer.get('isPending'), + readyText: readyText, + pendingText: + '\u041E\u0442\u043F\u0440\u0430\u0432\u043A\u0430 \u0434\u0430\u043D\u043D\u044B\u0445...', + }, + glyphIcon, + ); + }, + + /** + * + */ + }, + { + key: 'render', + value: function render() { + var currentUser = this.props.currentUserContainer.getCurrentUser(); + + var formContainerClassName = this.props.resetPasswordRequestMode + ? 'reset-password-request-form-container' + : 'resend-confirmation-form-container'; + var formClassName = this.props.resetPasswordRequestMode + ? 'reset-password-request-form' + : 'resend-confirmation-form'; + var formAction = this.props.resetPasswordRequestMode + ? 'users/current' + : '/users/resend-confirmation'; + + var emailErrors = currentUser.getEmailErrors(); + var emailError = emailErrors ? emailErrors.first() : undefined; + var emailFormGroupClass = __WEBPACK_IMPORTED_MODULE_1_classnames___default()( + 'form-group form-group-email', + { 'has-error': emailError }, + ); + + return React.createElement( + 'div', + { className: 'col-md-offset-3 col-md-6' }, + React.createElement( + 'section', + { className: formContainerClassName }, + React.createElement( + 'form', + { + onSubmit: this.onFormSubmit, + className: formClassName, + action: formAction, + acceptCharset: 'UTF-8', + method: 'post', + }, + React.createElement('input', { name: 'utf8', type: 'hidden', value: '\u2713' }), + React.createElement('input', { + name: 'authenticity_token', + type: 'hidden', + value: this.props.authenticityToken, + }), + React.createElement( + 'div', + { className: emailFormGroupClass }, + React.createElement( + 'label', + { className: 'control-label', htmlFor: 'user_email' }, + 'Email', + ), + React.createElement('input', { + onChange: this.onEmailChange, + value: currentUser.get('email') || '', + className: 'form-control', + id: 'user_email', + placeholder: '\u0432\u0432\u0435\u0434\u0438\u0442\u0435 email', + type: 'email', + name: 'user[email]', + }), + React.createElement('span', { className: 'help-block' }, emailError), + ), + this.renderSubmitButton(), + ), + ), + ); + }, + }, + ]); + + return UserEmailForm; + })(React.Component); + + UserEmailForm.propTypes = { + resetPasswordRequestMode: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.bool, + onEmailChange: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired, + onSubmit: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired, + authenticityToken: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string.isRequired, + currentUserContainer: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.instanceOf( + __WEBPACK_IMPORTED_MODULE_2_app_records_single_item_containers_CurrentUserContainerRecord__[ + 'a' /* default */ + ], + ).isRequired, + }; + + /* harmony default export */ __webpack_exports__['a'] = UserEmailForm; + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(1)); + + /***/ + }, + /* 248 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (React) { + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(2); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames__ = __webpack_require__(35); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_classnames__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_app_records_single_item_containers_CurrentUserContainerRecord__ = + __webpack_require__(39); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_app_components_shared_SubmitButton__ = + __webpack_require__(72); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var UserForm = (function (_React$Component) { + _inherits(UserForm, _React$Component); + + function UserForm() { + var _ref; + + var _temp, _this, _ret; + + _classCallCheck(this, UserForm); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return ( + (_ret = + ((_temp = + ((_this = _possibleConstructorReturn( + this, + (_ref = UserForm.__proto__ || Object.getPrototypeOf(UserForm)).call.apply( + _ref, + [this].concat(args), + ), + )), + _this)), + (_this.onNameChange = function (event) { + var name = event.target.value; + _this.props.onNameChange(name); + }), + (_this.onEmailChange = function (event) { + var email = event.target.value; + _this.props.onEmailChange(email); + }), + (_this.onPasswordChange = function (event) { + var password = event.target.value; + _this.props.onPasswordChange(password); + }), + (_this.onPasswordConfirmationChange = function (event) { + var passwordConfirmation = event.target.value; + _this.props.onPasswordConfirmationChange(passwordConfirmation); + }), + (_this.onCurrentPasswordChange = function (event) { + var currentPassword = event.target.value; + _this.props.onCurrentPasswordChange(currentPassword); + }), + (_this.onFormSubmit = function (event) { + event.preventDefault(); + + var currentUser = _this.props.currentUserContainer.getCurrentUser(); + _this.props.onSubmit({ + user: { + name: currentUser.get('name') || '', + email: currentUser.get('email') || '', + password: currentUser.get('password') || '', + password_confirmation: currentUser.get('password_confirmation') || '', + current_password: currentUser.get('current_password') || '', + avatar_attributes: { + id: currentUser.get('avatar_id'), + crop_x: currentUser.get('avatar_crop_x'), + crop_y: currentUser.get('avatar_crop_y'), + crop_width: currentUser.get('avatar_crop_width'), + crop_height: currentUser.get('avatar_crop_height'), + }, + }, + }); + }), + _temp)), + _possibleConstructorReturn(_this, _ret) + ); + } + /** + * + */ + + /** + * + */ + + /** + * + */ + + /** + * + */ + + /** + * + */ + + /** + * + */ + + /** + * + */ + + _createClass(UserForm, [ + { + key: 'renderEditPasswordNotice', + + /** + * + */ + value: function renderEditPasswordNotice() { + if (!this.props.editMode) return null; + + return React.createElement( + 'p', + { className: 'text-info edit-password-notice' }, + '\u0417\u0430\u043F\u043E\u043B\u043D\u0438\u0442\u0435 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0435 \u043F\u043E\u043B\u044F \u0435\u0441\u043B\u0438 \u043D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u0430 \u0441\u043C\u0435\u043D\u0430 \u043F\u0430\u0440\u043E\u043B\u044F:', + ); + }, + + /** + * + */ + }, + { + key: 'renderCurrentPasswordFormGroup', + value: function renderCurrentPasswordFormGroup() { + if (!this.props.editMode) return null; + + var currentUser = this.props.currentUserContainer.getCurrentUser(); + + var currentPasswordErrors = currentUser.getCurrentPasswordErrors(); + var currentPasswordError = currentPasswordErrors ? currentPasswordErrors.first() : undefined; + var currentPasswordFormGroupClass = __WEBPACK_IMPORTED_MODULE_1_classnames___default()( + 'form-group form-group-current-password', + { + 'has-error': currentPasswordError, + }, + ); + + return React.createElement( + 'div', + { className: currentPasswordFormGroupClass }, + React.createElement( + 'label', + { className: 'control-label', htmlFor: 'user_password_confirmation' }, + '\u0422\u0435\u043A\u0443\u0449\u0438\u0439 \u043F\u0430\u0440\u043E\u043B\u044C', + ), + React.createElement('input', { + onChange: this.onCurrentPasswordChange, + value: currentUser.get('current_password') || '', + className: 'form-control', + id: 'user_current_password', + placeholder: + '\u0432\u0432\u0435\u0434\u0438\u0442\u0435 \u0442\u0435\u043A\u0443\u0449\u0438\u0439 \u043F\u0430\u0440\u043E\u043B\u044C', + type: 'password', + name: 'user[current_password]', + }), + React.createElement('span', { className: 'help-block' }, currentPasswordError), + ); + }, + + /** + * + */ + }, + { + key: 'renderSubmitButton', + value: function renderSubmitButton() { + var readyText = this.props.editMode ? 'Сохранить изменения' : 'Регистрация'; + var glyphIcon = React.createElement('span', { + className: 'glyphicon glyphicon-save', + 'aria-hidden': 'true', + }); + + return React.createElement( + __WEBPACK_IMPORTED_MODULE_3_app_components_shared_SubmitButton__['a' /* default */], + { + className: 'btn btn-lg btn-primary btn-block', + isDisabled: this.props.currentUserContainer.get('isPending'), + readyText: readyText, + pendingText: + '\u041E\u0442\u043F\u0440\u0430\u0432\u043A\u0430 \u0434\u0430\u043D\u043D\u044B\u0445...', + }, + glyphIcon, + ); + }, + + /** + * + */ + }, + { + key: 'render', + value: function render() { + var currentUser = this.props.currentUserContainer.getCurrentUser(); + + var formContainerClassName = this.props.editMode + ? 'edit-current-user-form-container' + : 'sign-up-form-container'; + var formClassName = this.props.editMode ? 'edit-current-user-form' : 'sign-up-form'; + var formAction = this.props.editMode ? 'users/current' : '/users/sign-in'; + var formMethod = this.props.editMode ? 'put' : 'post'; + + var nameErrors = currentUser.getNameErrors(); + var nameError = nameErrors ? nameErrors.first() : undefined; + var nameFormGroupClass = __WEBPACK_IMPORTED_MODULE_1_classnames___default()( + 'form-group form-group-name', + { 'has-error': nameError }, + ); + + var emailErrors = currentUser.getEmailErrors(); + var emailError = emailErrors ? emailErrors.first() : undefined; + var emailFormGroupClass = __WEBPACK_IMPORTED_MODULE_1_classnames___default()( + 'form-group form-group-email', + { 'has-error': emailError }, + ); + + var passwordErrors = currentUser.getPasswordErrors(); + var passwordError = passwordErrors ? passwordErrors.first() : undefined; + var passwordFormGroupClass = __WEBPACK_IMPORTED_MODULE_1_classnames___default()( + 'form-group form-group-password', + { 'has-error': passwordError }, + ); + + var passwordConfirmationErrors = currentUser.getPasswordConfirmationErrors(); + var passwordConfirmationError = passwordConfirmationErrors + ? passwordConfirmationErrors.first() + : undefined; + var passwordConfirmationFormGroupClass = __WEBPACK_IMPORTED_MODULE_1_classnames___default()( + 'form-group form-group-password-confirmation', + { + 'has-error': passwordConfirmationError, + }, + ); + + return React.createElement( + 'div', + { className: 'col-md-offset-3 col-md-6' }, + React.createElement( + 'section', + { className: formContainerClassName }, + React.createElement( + 'form', + { + onSubmit: this.onFormSubmit, + className: formClassName, + action: formAction, + acceptCharset: 'UTF-8', + method: formMethod, + }, + React.createElement('input', { name: 'utf8', type: 'hidden', value: '\u2713' }), + React.createElement('input', { + name: 'authenticity_token', + type: 'hidden', + value: this.props.authenticityToken, + }), + React.createElement( + 'div', + { className: nameFormGroupClass }, + React.createElement( + 'label', + { className: 'control-label', htmlFor: 'user_name' }, + '\u0418\u043C\u044F', + ), + React.createElement('input', { + onChange: this.onNameChange, + value: currentUser.get('name') || '', + className: 'form-control', + id: 'user_name', + placeholder: '\u0432\u0432\u0435\u0434\u0438\u0442\u0435 \u0438\u043C\u044F', + type: 'text', + name: 'user[name]', + }), + React.createElement('span', { className: 'help-block' }, nameError), + ), + React.createElement( + 'div', + { className: emailFormGroupClass }, + React.createElement( + 'label', + { className: 'control-label', htmlFor: 'user_email' }, + 'Email', + ), + React.createElement('input', { + onChange: this.onEmailChange, + value: currentUser.get('email') || '', + className: 'form-control', + id: 'user_email', + placeholder: '\u0432\u0432\u0435\u0434\u0438\u0442\u0435 email', + type: 'email', + name: 'user[email]', + }), + React.createElement('span', { className: 'help-block' }, emailError), + ), + this.renderCurrentPasswordFormGroup(), + this.renderEditPasswordNotice(), + React.createElement( + 'div', + { className: passwordFormGroupClass }, + React.createElement( + 'label', + { className: 'control-label', htmlFor: 'user_password' }, + '\u041F\u0430\u0440\u043E\u043B\u044C', + ), + React.createElement('input', { + onChange: this.onPasswordChange, + value: currentUser.get('password') || '', + className: 'form-control', + id: 'user_password', + placeholder: + '\u0432\u0432\u0435\u0434\u0438\u0442\u0435 \u043F\u0430\u0440\u043E\u043B\u044C', + type: 'password', + name: 'user[password]', + }), + React.createElement('span', { className: 'help-block' }, passwordError), + ), + React.createElement( + 'div', + { className: passwordConfirmationFormGroupClass }, + React.createElement( + 'label', + { className: 'control-label', htmlFor: 'user_password_confirmation' }, + '\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u0435', + ), + React.createElement('input', { + onChange: this.onPasswordConfirmationChange, + value: currentUser.get('password_confirmation') || '', + className: 'form-control', + id: 'user_password_confirmation', + placeholder: + '\u0432\u0432\u0435\u0434\u0438\u0442\u0435 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u0435 \u043F\u0430\u0440\u043E\u043B\u044F', + type: 'password', + name: 'user[password_confirmation]', + }), + React.createElement('span', { className: 'help-block' }, passwordConfirmationError), + ), + this.renderSubmitButton(), + ), + ), + ); + }, + }, + ]); + + return UserForm; + })(React.Component); + + UserForm.propTypes = { + editMode: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.bool, + onNameChange: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired, + onEmailChange: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired, + onPasswordChange: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired, + onPasswordConfirmationChange: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired, + onCurrentPasswordChange: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func, + onSubmit: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired, + authenticityToken: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string.isRequired, + currentUserContainer: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.instanceOf( + __WEBPACK_IMPORTED_MODULE_2_app_records_single_item_containers_CurrentUserContainerRecord__[ + 'a' /* default */ + ], + ).isRequired, + }; + + /* harmony default export */ __webpack_exports__['a'] = UserForm; + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(1)); + + /***/ + }, + /* 249 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'a', function () { + return ADD_FLASH_MESSAGE; + }); + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'b', function () { + return REMOVE_FLASH_MESSAGE; + }); + var ADD_FLASH_MESSAGE = 'ADD_FLASH_MESSAGE'; + var REMOVE_FLASH_MESSAGE = 'REMOVE_FLASH_MESSAGE'; + + /***/ + }, + /* 250 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'a', function () { + return WINDOW_SCROLLED; + }); + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'b', function () { + return HEADER_WIHOUT_BREADCRUMBS_RESIZED; + }); + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'c', function () { + return MAIN_IMAGE_RESIZED; + }); + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'd', function () { + return BREADCRUMBS_RESIZED; + }); + var WINDOW_SCROLLED = 'WINDOW_SCROLLED'; + var HEADER_WIHOUT_BREADCRUMBS_RESIZED = 'HEADER_WIHOUT_BREADCRUMBS_RESIZED'; + var MAIN_IMAGE_RESIZED = 'MAIN_IMAGE_RESIZED'; + var BREADCRUMBS_RESIZED = 'BREADCRUMBS_RESIZED'; + + /***/ + }, + /* 251 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_app_records_entities_FlashRecord__ = + __webpack_require__(253); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__CollectionRecord__ = __webpack_require__(111); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var FlashesCollectionRecord = (function (_CollectionRecord) { + _inherits(FlashesCollectionRecord, _CollectionRecord); + + function FlashesCollectionRecord() { + _classCallCheck(this, FlashesCollectionRecord); + + return _possibleConstructorReturn( + this, + (FlashesCollectionRecord.__proto__ || Object.getPrototypeOf(FlashesCollectionRecord)).apply( + this, + arguments, + ), + ); + } + + _createClass(FlashesCollectionRecord, [ + { + key: 'buildFlash', + + /** + * + */ + value: function buildFlash(attributes) { + return this.buildItem( + attributes, + __WEBPACK_IMPORTED_MODULE_0_app_records_entities_FlashRecord__['a' /* default */], + ); + }, + + /** + * + */ + }, + { + key: 'getFlashes', + value: function getFlashes() { + return this.get('newItems').toList(); + }, + + /** + * + */ + }, + { + key: 'deleteFlash', + value: function deleteFlash(flash) { + return this.deleteNewItem(flash); + }, + }, + ]); + + return FlashesCollectionRecord; + })(__WEBPACK_IMPORTED_MODULE_1__CollectionRecord__['a' /* default */]); + + /* harmony default export */ __webpack_exports__['a'] = FlashesCollectionRecord; + + /***/ + }, + /* 252 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_immutable__ = __webpack_require__(18); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_immutable___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_immutable__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_validate_js__ = __webpack_require__(228); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_validate_js___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_validate_js__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_to_camel_case__ = __webpack_require__(227); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_to_camel_case___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_2_to_camel_case__, + ); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var CurrentUserRecord = (function (_Immutable$Record) { + _inherits(CurrentUserRecord, _Immutable$Record); + + function CurrentUserRecord() { + _classCallCheck(this, CurrentUserRecord); + + return _possibleConstructorReturn( + this, + (CurrentUserRecord.__proto__ || Object.getPrototypeOf(CurrentUserRecord)).apply(this, arguments), + ); + } + + _createClass(CurrentUserRecord, [ + { + key: 'getEmailErrors', + + /** + * + */ + value: function getEmailErrors() { + return this.get('errors').get('email'); + }, + + /** + * + */ + }, + { + key: 'getNameErrors', + value: function getNameErrors() { + return this.get('errors').get('name'); + }, + + /** + * + */ + }, + { + key: 'getPasswordErrors', + value: function getPasswordErrors() { + return this.get('errors').get('password'); + }, + + /** + * + */ + }, + { + key: 'getPasswordConfirmationErrors', + value: function getPasswordConfirmationErrors() { + return this.get('errors').get('password_confirmation'); + }, + + /** + * + */ + }, + { + key: 'getCurrentPasswordErrors', + value: function getCurrentPasswordErrors() { + return this.get('errors').get('current_password'); + }, + + /** + * + */ + }, + { + key: 'getAvatarImageErrors', + value: function getAvatarImageErrors() { + return this.get('avatar_errors').get('image'); + }, + + /** + * + */ + }, + { + key: 'assignAttributes', + value: function assignAttributes(attributes, validateAssigned) { + var _this2 = this; + + return this.withMutations(function (self) { + /* eslint-disable no-param-reassign */ + if (!self.get('persistentVersion') && self.get('id')) self.set('persistentVersion', _this2); + /* eslint-enable no-param-reassign */ + + self.merge(attributes); + + // Skip assigned atributes validation unless it is required: + if (!validateAssigned) return; + + // Validate each assigned attribute and update its errors: + for (var attribute in attributes) { + if (attributes.hasOwnProperty(attribute)) { + var validatorMethodName = __WEBPACK_IMPORTED_MODULE_2_to_camel_case___default()( + 'validate_' + attribute, + ); + if (validatorMethodName in self) self[validatorMethodName](); + } + } + }); + }, + + /** + * + */ + }, + { + key: 'updateAttributes', + value: function updateAttributes(attributes) { + return this.withMutations(function (self) { + return self.set('persistentVersion', undefined).merge(attributes); + }); + }, + + /** + * + */ + }, + { + key: 'isValid', + value: function isValid() { + return this.get('errors').size === 0; + }, + + /** + * + */ + }, + { + key: 'getPersistentVersion', + value: function getPersistentVersion() { + var persistentVersion = this.get('persistentVersion'); + if (persistentVersion) return persistentVersion; + return this; + }, + + /** + * + */ + }, + { + key: 'rollbackToPersistentVersion', + value: function rollbackToPersistentVersion() { + var persistentVersion = this.get('persistentVersion'); + if (!persistentVersion) return this; + return persistentVersion; + }, + + /** + * + */ + }, + { + key: 'cleanUpPasswords', + value: function cleanUpPasswords() { + return this.withMutations(function (self) { + self.remove('password'); + self.remove('password_confirmation'); + self.remove('current_password'); + }); + }, + + /** + * Validates email attribute. + */ + }, + { + key: 'validateEmail', + value: function validateEmail() { + var constraints = { + presence: { + message: 'не может быть пустым', + }, + email: { + message: 'неверный формат', + }, + }; + + return this._validateAttribute('email', constraints); + }, + + /** + * Validates name attribute. + */ + }, + { + key: 'validateName', + value: function validateName() { + var constraints = { + presence: { + message: 'не может быть пустым', + }, + }; + + return this._validateAttribute('name', constraints); + }, + + /** + * + */ + }, + { + key: 'validatePassword', + value: function validatePassword() { + var constraints = { + presence: { + message: 'не может быть пустым', + }, + length: { + minimum: 6, + maximum: 20, + tooShort: 'недостаточной длины (не может быть меньше 6 символов)', + tooLong: 'слишком длинный', + }, + }; + + return this._validateAttribute('password', constraints); + }, + + /** + * + */ + }, + { + key: 'validatePasswordConfirmation', + value: function validatePasswordConfirmation() { + var constraints = { + password_confirmation: { + presence: { + message: 'не может быть пустым', + }, + equality: { + attribute: 'password', + message: 'должно совпадать с паролем', + }, + }, + }; + + var attributeErrors = __WEBPACK_IMPORTED_MODULE_1_validate_js___default()( + { + password: this.get('password'), + password_confirmation: this.get('password_confirmation'), + }, + constraints, + { fullMessages: false }, + ); + + var validatedRecord = void 0; + + if (attributeErrors) { + validatedRecord = this.setIn( + ['errors', 'password_confirmation'], + __WEBPACK_IMPORTED_MODULE_0_immutable___default.a.fromJS(attributeErrors), + ); + } else { + validatedRecord = this.deleteIn(['errors', 'password_confirmation']); + } + + return validatedRecord; + }, + + /** + * TODO: Move this method to mixin. + */ + }, + { + key: '_validateAttribute', + value: function _validateAttribute(attribute, constraints) { + var attributeErrors = __WEBPACK_IMPORTED_MODULE_1_validate_js___default.a.single( + this.get(attribute), + constraints, + ); + var validatedRecord = void 0; + + if (attributeErrors) { + validatedRecord = this.setIn( + ['errors', attribute], + __WEBPACK_IMPORTED_MODULE_0_immutable___default.a.fromJS(attributeErrors), + ); + } else { + validatedRecord = this.deleteIn(['errors', attribute]); + } + + return validatedRecord; + }, + }, + ]); + + return CurrentUserRecord; + })( + __WEBPACK_IMPORTED_MODULE_0_immutable___default.a.Record({ + id: undefined, + password: undefined, + password_confirmation: undefined, + current_password: undefined, + email: undefined, + name: undefined, + avatar_id: undefined, + avatar_height: undefined, + avatar_width: undefined, + avatar_url: undefined, + avatar_crop_x: undefined, + avatar_crop_y: undefined, + avatar_crop_width: undefined, + avatar_crop_height: undefined, + avatar_thumb_url: undefined, + avatar_preview_url: undefined, + errors: __WEBPACK_IMPORTED_MODULE_0_immutable___default.a.Map(), + avatar_errors: __WEBPACK_IMPORTED_MODULE_0_immutable___default.a.Map(), + persistentVersion: undefined, + }), + ); + + /* harmony default export */ __webpack_exports__['a'] = CurrentUserRecord; + + /***/ + }, + /* 253 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_immutable__ = __webpack_require__(18); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_immutable___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_immutable__, + ); + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var FlashRecord = (function (_Immutable$Record) { + _inherits(FlashRecord, _Immutable$Record); + + function FlashRecord() { + _classCallCheck(this, FlashRecord); + + return _possibleConstructorReturn( + this, + (FlashRecord.__proto__ || Object.getPrototypeOf(FlashRecord)).apply(this, arguments), + ); + } + + return FlashRecord; + })( + __WEBPACK_IMPORTED_MODULE_0_immutable___default.a.Record({ + tmpId: undefined, + type: undefined, + message: undefined, + }), + ); + + /* harmony default export */ __webpack_exports__['a'] = FlashRecord; + + /***/ + }, + /* 254 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__SingleItemContainerRecord__ = + __webpack_require__(255); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_app_records_entities_AuthorFeedbackRecord__ = + __webpack_require__(462); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var AuthorFeedbackContainer = (function (_SingleItemContainerR) { + _inherits(AuthorFeedbackContainer, _SingleItemContainerR); + + function AuthorFeedbackContainer() { + _classCallCheck(this, AuthorFeedbackContainer); + + return _possibleConstructorReturn( + this, + (AuthorFeedbackContainer.__proto__ || Object.getPrototypeOf(AuthorFeedbackContainer)).apply( + this, + arguments, + ), + ); + } + + _createClass(AuthorFeedbackContainer, [ + { + key: 'getAuthorFeedback', + + /** + * + */ + value: function getAuthorFeedback() { + return this.getItem(); + }, + + /** + * + */ + }, + { + key: 'buildAuthorFeedback', + value: function buildAuthorFeedback(attributes) { + return this.buildItem( + attributes, + __WEBPACK_IMPORTED_MODULE_1_app_records_entities_AuthorFeedbackRecord__['a' /* default */], + ); + }, + + /** + * + */ + }, + { + key: 'assignAuthorFeedbackAttributes', + value: function assignAuthorFeedbackAttributes(attributes, validateAssigned) { + return this.assignItemAttributes(attributes, validateAssigned); + }, + + /** + * + */ + }, + { + key: 'deleteAuthorFeedback', + value: function deleteAuthorFeedback() { + return this.clearItem(); + }, + }, + ]); + + return AuthorFeedbackContainer; + })(__WEBPACK_IMPORTED_MODULE_0__SingleItemContainerRecord__['a' /* default */]); + + /* harmony default export */ __webpack_exports__['a'] = AuthorFeedbackContainer; + + /***/ + }, + /* 255 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_app_utils_TmpIdUtil__ = __webpack_require__(131); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_immutable__ = __webpack_require__(18); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_immutable___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_immutable__, + ); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var SingleItemContainerRecord = (function (_Immutable$Record) { + _inherits(SingleItemContainerRecord, _Immutable$Record); + + function SingleItemContainerRecord() { + _classCallCheck(this, SingleItemContainerRecord); + + return _possibleConstructorReturn( + this, + (SingleItemContainerRecord.__proto__ || Object.getPrototypeOf(SingleItemContainerRecord)).apply( + this, + arguments, + ), + ); + } + + _createClass(SingleItemContainerRecord, [ + { + key: 'enterPendingState', + + /** + * + */ + value: function enterPendingState() { + return this.set('isPending', true); + }, + + /** + * + */ + }, + { + key: 'leavePendingState', + value: function leavePendingState() { + return this.set('isPending', false); + }, + + /** + * + */ + }, + { + key: 'getItem', + value: function getItem() { + return this.get('item'); + }, + + /** + * + */ + }, + { + key: 'putItem', + value: function putItem(item, ItemClass) { + if (__WEBPACK_IMPORTED_MODULE_1_immutable___default.a.Iterable.isIterable(item)) { + return this.set('item', item); + } + + var immutableItem = __WEBPACK_IMPORTED_MODULE_1_immutable___default.a.fromJS(item); + return this.set('item', new ItemClass(immutableItem)); + }, + + /** + * Builds new immutable item of given class from given attributes object, assigns its tmpId and puts it to newItems + * map with tmpId key. + * + * @param {Object} attributes - New item attributes + * @param {Function} ItemClass - Class of collection item + * @returns {ItemClass} + */ + }, + { + key: 'buildItem', + value: function buildItem(attributes, ItemClass) { + var immutableItem = __WEBPACK_IMPORTED_MODULE_1_immutable___default.a.fromJS(attributes); + return this.set('item', new ItemClass(immutableItem)); + }, + + /** + * + */ + }, + { + key: 'assignItemAttributes', + value: function assignItemAttributes(attributes, validateAssigned) { + var updatedItem = this.get('item').assignAttributes(attributes, validateAssigned); + return this.set('item', updatedItem); + }, + + /** + * + */ + }, + { + key: 'setLoadError', + value: function setLoadError(loadError) { + return this.set('loadError', loadError); + }, + + /** + * + */ + }, + { + key: 'clearItem', + value: function clearItem() { + return this.remove('item'); + }, + + /** + * + */ + }, + { + key: 'rollbackItemToPersistentVersion', + value: function rollbackItemToPersistentVersion() { + return this.set('item', this.get('item').rollbackToPersistentVersion()); + }, + + /** + * + */ + }, + { + key: 'clearLoadError', + value: function clearLoadError() { + return this.remove('loadError'); + }, + }, + ]); + + return SingleItemContainerRecord; + })( + __WEBPACK_IMPORTED_MODULE_1_immutable___default.a.Record({ + item: undefined, + loadError: undefined, // Stores last data loading error + isPending: false, + }), + ); + + /* harmony default export */ __webpack_exports__['a'] = SingleItemContainerRecord; + + /***/ + }, + /* 256 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = { default: __webpack_require__(481), __esModule: true }; + + /***/ + }, + /* 257 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = { default: __webpack_require__(483), __esModule: true }; + + /***/ + }, + /* 258 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = { default: __webpack_require__(484), __esModule: true }; + + /***/ + }, + /* 259 */ + /***/ function (module, exports) { + module.exports = function (it, Constructor, name, forbiddenField) { + if (!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)) { + throw TypeError(name + ': incorrect invocation!'); + } + return it; + }; + + /***/ + }, + /* 260 */ + /***/ function (module, exports, __webpack_require__) { + // getting tag from 19.1.3.6 Object.prototype.toString() + var cof = __webpack_require__(156), + TAG = __webpack_require__(47)('toStringTag'), + // ES3 wrong here + ARG = + cof( + (function () { + return arguments; + })(), + ) == 'Arguments'; + + // fallback for IE11 Script Access Denied error + var tryGet = function (it, key) { + try { + return it[key]; + } catch (e) { + /* empty */ + } + }; + + module.exports = function (it) { + var O, T, B; + return it === undefined + ? 'Undefined' + : it === null + ? 'Null' + : // @@toStringTag case + typeof (T = tryGet((O = Object(it)), TAG)) == 'string' + ? T + : // builtinTag case + ARG + ? cof(O) + : // ES3 arguments fallback + (B = cof(O)) == 'Object' && typeof O.callee == 'function' + ? 'Arguments' + : B; + }; + + /***/ + }, + /* 261 */ + /***/ function (module, exports, __webpack_require__) { + var isObject = __webpack_require__(93), + document = __webpack_require__(61).document, + // in old IE typeof document.createElement is 'object' + is = isObject(document) && isObject(document.createElement); + module.exports = function (it) { + return is ? document.createElement(it) : {}; + }; + + /***/ + }, + /* 262 */ + /***/ function (module, exports) { + // IE 8- don't enum bug keys + module.exports = + 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'.split( + ',', + ); + + /***/ + }, + /* 263 */ + /***/ function (module, exports, __webpack_require__) { + // check on default Array iterator + var Iterators = __webpack_require__(117), + ITERATOR = __webpack_require__(47)('iterator'), + ArrayProto = Array.prototype; + + module.exports = function (it) { + return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it); + }; + + /***/ + }, + /* 264 */ + /***/ function (module, exports, __webpack_require__) { + // call something on iterator step with safe closing on error + var anObject = __webpack_require__(114); + module.exports = function (iterator, fn, value, entries) { + try { + return entries ? fn(anObject(value)[0], value[1]) : fn(value); + // 7.4.6 IteratorClose(iterator, completion) + } catch (e) { + var ret = iterator['return']; + if (ret !== undefined) anObject(ret.call(iterator)); + throw e; + } + }; + + /***/ + }, + /* 265 */ + /***/ function (module, exports) { + module.exports = function (done, value) { + return { value: value, done: !!done }; + }; + + /***/ + }, + /* 266 */ + /***/ function (module, exports, __webpack_require__) { + var META = __webpack_require__(166)('meta'), + isObject = __webpack_require__(93), + has = __webpack_require__(116), + setDesc = __webpack_require__(62).f, + id = 0; + var isExtensible = + Object.isExtensible || + function () { + return true; + }; + var FREEZE = !__webpack_require__(92)(function () { + return isExtensible(Object.preventExtensions({})); + }); + var setMeta = function (it) { + setDesc(it, META, { + value: { + i: 'O' + ++id, // object ID + w: {}, // weak collections IDs + }, + }); + }; + var fastKey = function (it, create) { + // return primitive with prefix + if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; + if (!has(it, META)) { + // can't set metadata to uncaught frozen object + if (!isExtensible(it)) return 'F'; + // not necessary to add metadata + if (!create) return 'E'; + // add missing metadata + setMeta(it); + // return object ID + } + return it[META].i; + }; + var getWeak = function (it, create) { + if (!has(it, META)) { + // can't set metadata to uncaught frozen object + if (!isExtensible(it)) return true; + // not necessary to add metadata + if (!create) return false; + // add missing metadata + setMeta(it); + // return hash weak collections IDs + } + return it[META].w; + }; + // add metadata on freeze-family methods calling + var onFreeze = function (it) { + if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it); + return it; + }; + var meta = (module.exports = { + KEY: META, + NEED: false, + fastKey: fastKey, + getWeak: getWeak, + onFreeze: onFreeze, + }); + + /***/ + }, + /* 267 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) + var anObject = __webpack_require__(114), + dPs = __webpack_require__(504), + enumBugKeys = __webpack_require__(262), + IE_PROTO = __webpack_require__(163)('IE_PROTO'), + Empty = function () { + /* empty */ + }, + PROTOTYPE = 'prototype'; + + // Create object with fake `null` prototype: use iframe Object with cleared prototype + var createDict = function () { + // Thrash, waste and sodomy: IE GC bug + var iframe = __webpack_require__(261)('iframe'), + i = enumBugKeys.length, + lt = '<', + gt = '>', + iframeDocument; + iframe.style.display = 'none'; + __webpack_require__(497).appendChild(iframe); + iframe.src = 'javascript:'; // eslint-disable-line no-script-url + // createDict = iframe.contentWindow.Object; + // html.removeChild(iframe); + iframeDocument = iframe.contentWindow.document; + iframeDocument.open(); + iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); + iframeDocument.close(); + createDict = iframeDocument.F; + while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]]; + return createDict(); + }; + + module.exports = + Object.create || + function create(O, Properties) { + var result; + if (O !== null) { + Empty[PROTOTYPE] = anObject(O); + result = new Empty(); + Empty[PROTOTYPE] = null; + // add "__proto__" for Object.getPrototypeOf polyfill + result[IE_PROTO] = O; + } else result = createDict(); + return Properties === undefined ? result : dPs(result, Properties); + }; + + /***/ + }, + /* 268 */ + /***/ function (module, exports, __webpack_require__) { + var hide = __webpack_require__(75); + module.exports = function (target, src, safe) { + for (var key in src) { + if (safe && target[key]) target[key] = src[key]; + else hide(target, key, src[key]); + } + return target; + }; + + /***/ + }, + /* 269 */ + /***/ function (module, exports, __webpack_require__) { + var global = __webpack_require__(61), + SHARED = '__core-js_shared__', + store = global[SHARED] || (global[SHARED] = {}); + module.exports = function (key) { + return store[key] || (store[key] = {}); + }; + + /***/ + }, + /* 270 */ + /***/ function (module, exports, __webpack_require__) { + var classof = __webpack_require__(260), + ITERATOR = __webpack_require__(47)('iterator'), + Iterators = __webpack_require__(117); + module.exports = __webpack_require__(54).getIteratorMethod = function (it) { + if (it != undefined) return it[ITERATOR] || it['@@iterator'] || Iterators[classof(it)]; + }; + + /***/ + }, + /* 271 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $at = __webpack_require__(512)(true); + + // 21.1.3.27 String.prototype[@@iterator]() + __webpack_require__(159)( + String, + 'String', + function (iterated) { + this._t = String(iterated); // target + this._i = 0; // next index + // 21.1.5.2.1 %StringIteratorPrototype%.next() + }, + function () { + var O = this._t, + index = this._i, + point; + if (index >= O.length) return { value: undefined, done: true }; + point = $at(O, index); + this._i += point.length; + return { value: point, done: false }; + }, + ); + + /***/ + }, + /* 272 */ + /***/ function (module, exports, __webpack_require__) { + var cof = __webpack_require__(40); + module.exports = function (it, msg) { + if (typeof it != 'number' && cof(it) != 'Number') throw TypeError(msg); + return +it; + }; + + /***/ + }, + /* 273 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + // 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length) + + var toObject = __webpack_require__(20), + toIndex = __webpack_require__(83), + toLength = __webpack_require__(19); + + module.exports = + [].copyWithin || + function copyWithin(target /*= 0*/, start /*= 0, end = @length*/) { + var O = toObject(this), + len = toLength(O.length), + to = toIndex(target, len), + from = toIndex(start, len), + end = arguments.length > 2 ? arguments[2] : undefined, + count = Math.min((end === undefined ? len : toIndex(end, len)) - from, len - to), + inc = 1; + if (from < to && to < from + count) { + inc = -1; + from += count - 1; + to += count - 1; + } + while (count-- > 0) { + if (from in O) O[to] = O[from]; + else delete O[to]; + to += inc; + from += inc; + } + return O; + }; + + /***/ + }, + /* 274 */ + /***/ function (module, exports, __webpack_require__) { + var forOf = __webpack_require__(95); + + module.exports = function (iter, ITERATOR) { + var result = []; + forOf(iter, false, result.push, result, ITERATOR); + return result; + }; + + /***/ + }, + /* 275 */ + /***/ function (module, exports, __webpack_require__) { + var aFunction = __webpack_require__(28), + toObject = __webpack_require__(20), + IObject = __webpack_require__(120), + toLength = __webpack_require__(19); + + module.exports = function (that, callbackfn, aLen, memo, isRight) { + aFunction(callbackfn); + var O = toObject(that), + self = IObject(O), + length = toLength(O.length), + index = isRight ? length - 1 : 0, + i = isRight ? -1 : 1; + if (aLen < 2) + for (;;) { + if (index in self) { + memo = self[index]; + index += i; + break; + } + index += i; + if (isRight ? index < 0 : length <= index) { + throw TypeError('Reduce of empty array with no initial value'); + } + } + for (; isRight ? index >= 0 : length > index; index += i) + if (index in self) { + memo = callbackfn(memo, self[index], index, O); + } + return memo; + }; + + /***/ + }, + /* 276 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var aFunction = __webpack_require__(28), + isObject = __webpack_require__(11), + invoke = __webpack_require__(139), + arraySlice = [].slice, + factories = {}; + + var construct = function (F, len, args) { + if (!(len in factories)) { + for (var n = [], i = 0; i < len; i++) n[i] = 'a[' + i + ']'; + factories[len] = Function('F,a', 'return new F(' + n.join(',') + ')'); + } + return factories[len](F, args); + }; + + module.exports = + Function.bind || + function bind(that /*, args... */) { + var fn = aFunction(this), + partArgs = arraySlice.call(arguments, 1); + var bound = function (/* args... */) { + var args = partArgs.concat(arraySlice.call(arguments)); + return this instanceof bound ? construct(fn, args.length, args) : invoke(fn, args, that); + }; + if (isObject(fn.prototype)) bound.prototype = fn.prototype; + return bound; + }; + + /***/ + }, + /* 277 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var dP = __webpack_require__(15).f, + create = __webpack_require__(78), + redefineAll = __webpack_require__(81), + ctx = __webpack_require__(56), + anInstance = __webpack_require__(76), + defined = __webpack_require__(41), + forOf = __webpack_require__(95), + $iterDefine = __webpack_require__(177), + step = __webpack_require__(283), + setSpecies = __webpack_require__(82), + DESCRIPTORS = __webpack_require__(14), + fastKey = __webpack_require__(63).fastKey, + SIZE = DESCRIPTORS ? '_s' : 'size'; + + var getEntry = function (that, key) { + // fast case + var index = fastKey(key), + entry; + if (index !== 'F') return that._i[index]; + // frozen object case + for (entry = that._f; entry; entry = entry.n) { + if (entry.k == key) return entry; + } + }; + + module.exports = { + getConstructor: function (wrapper, NAME, IS_MAP, ADDER) { + var C = wrapper(function (that, iterable) { + anInstance(that, C, NAME, '_i'); + that._i = create(null); // index + that._f = undefined; // first entry + that._l = undefined; // last entry + that[SIZE] = 0; // size + if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that); + }); + redefineAll(C.prototype, { + // 23.1.3.1 Map.prototype.clear() + // 23.2.3.2 Set.prototype.clear() + clear: function clear() { + for (var that = this, data = that._i, entry = that._f; entry; entry = entry.n) { + entry.r = true; + if (entry.p) entry.p = entry.p.n = undefined; + delete data[entry.i]; + } + that._f = that._l = undefined; + that[SIZE] = 0; + }, + // 23.1.3.3 Map.prototype.delete(key) + // 23.2.3.4 Set.prototype.delete(value) + delete: function (key) { + var that = this, + entry = getEntry(that, key); + if (entry) { + var next = entry.n, + prev = entry.p; + delete that._i[entry.i]; + entry.r = true; + if (prev) prev.n = next; + if (next) next.p = prev; + if (that._f == entry) that._f = next; + if (that._l == entry) that._l = prev; + that[SIZE]--; + } + return !!entry; + }, + // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined) + // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined) + forEach: function forEach(callbackfn /*, that = undefined */) { + anInstance(this, C, 'forEach'); + var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3), + entry; + while ((entry = entry ? entry.n : this._f)) { + f(entry.v, entry.k, this); + // revert to the last existing entry + while (entry && entry.r) entry = entry.p; + } + }, + // 23.1.3.7 Map.prototype.has(key) + // 23.2.3.7 Set.prototype.has(value) + has: function has(key) { + return !!getEntry(this, key); + }, + }); + if (DESCRIPTORS) + dP(C.prototype, 'size', { + get: function () { + return defined(this[SIZE]); + }, + }); + return C; + }, + def: function (that, key, value) { + var entry = getEntry(that, key), + prev, + index; + // change existing entry + if (entry) { + entry.v = value; + // create new entry + } else { + that._l = entry = { + i: (index = fastKey(key, true)), // <- index + k: key, // <- key + v: value, // <- value + p: (prev = that._l), // <- previous entry + n: undefined, // <- next entry + r: false, // <- removed + }; + if (!that._f) that._f = entry; + if (prev) prev.n = entry; + that[SIZE]++; + // add to index + if (index !== 'F') that._i[index] = entry; + } + return that; + }, + getEntry: getEntry, + setStrong: function (C, NAME, IS_MAP) { + // add .keys, .values, .entries, [@@iterator] + // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11 + $iterDefine( + C, + NAME, + function (iterated, kind) { + this._t = iterated; // target + this._k = kind; // kind + this._l = undefined; // previous + }, + function () { + var that = this, + kind = that._k, + entry = that._l; + // revert to the last existing entry + while (entry && entry.r) entry = entry.p; + // get next entry + if (!that._t || !(that._l = entry = entry ? entry.n : that._t._f)) { + // or finish the iteration + that._t = undefined; + return step(1); + } + // return step by kind + if (kind == 'keys') return step(0, entry.k); + if (kind == 'values') return step(0, entry.v); + return step(0, [entry.k, entry.v]); + }, + IS_MAP ? 'entries' : 'values', + !IS_MAP, + true, + ); + + // add [@@species], 23.1.2.2, 23.2.2.2 + setSpecies(NAME); + }, + }; + + /***/ + }, + /* 278 */ + /***/ function (module, exports, __webpack_require__) { + // https://github.com/DavidBruant/Map-Set.prototype.toJSON + var classof = __webpack_require__(119), + from = __webpack_require__(274); + module.exports = function (NAME) { + return function toJSON() { + if (classof(this) != NAME) throw TypeError(NAME + "#toJSON isn't generic"); + return from(this); + }; + }; + + /***/ + }, + /* 279 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var redefineAll = __webpack_require__(81), + getWeak = __webpack_require__(63).getWeak, + anObject = __webpack_require__(5), + isObject = __webpack_require__(11), + anInstance = __webpack_require__(76), + forOf = __webpack_require__(95), + createArrayMethod = __webpack_require__(48), + $has = __webpack_require__(27), + arrayFind = createArrayMethod(5), + arrayFindIndex = createArrayMethod(6), + id = 0; + + // fallback for uncaught frozen keys + var uncaughtFrozenStore = function (that) { + return that._l || (that._l = new UncaughtFrozenStore()); + }; + var UncaughtFrozenStore = function () { + this.a = []; + }; + var findUncaughtFrozen = function (store, key) { + return arrayFind(store.a, function (it) { + return it[0] === key; + }); + }; + UncaughtFrozenStore.prototype = { + get: function (key) { + var entry = findUncaughtFrozen(this, key); + if (entry) return entry[1]; + }, + has: function (key) { + return !!findUncaughtFrozen(this, key); + }, + set: function (key, value) { + var entry = findUncaughtFrozen(this, key); + if (entry) entry[1] = value; + else this.a.push([key, value]); + }, + delete: function (key) { + var index = arrayFindIndex(this.a, function (it) { + return it[0] === key; + }); + if (~index) this.a.splice(index, 1); + return !!~index; + }, + }; + + module.exports = { + getConstructor: function (wrapper, NAME, IS_MAP, ADDER) { + var C = wrapper(function (that, iterable) { + anInstance(that, C, NAME, '_i'); + that._i = id++; // collection id + that._l = undefined; // leak store for uncaught frozen objects + if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that); + }); + redefineAll(C.prototype, { + // 23.3.3.2 WeakMap.prototype.delete(key) + // 23.4.3.3 WeakSet.prototype.delete(value) + delete: function (key) { + if (!isObject(key)) return false; + var data = getWeak(key); + if (data === true) return uncaughtFrozenStore(this)['delete'](key); + return data && $has(data, this._i) && delete data[this._i]; + }, + // 23.3.3.4 WeakMap.prototype.has(key) + // 23.4.3.4 WeakSet.prototype.has(value) + has: function has(key) { + if (!isObject(key)) return false; + var data = getWeak(key); + if (data === true) return uncaughtFrozenStore(this).has(key); + return data && $has(data, this._i); + }, + }); + return C; + }, + def: function (that, key, value) { + var data = getWeak(anObject(key), true); + if (data === true) uncaughtFrozenStore(that).set(key, value); + else data[that._i] = value; + return that; + }, + ufstore: uncaughtFrozenStore, + }; + + /***/ + }, + /* 280 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = + !__webpack_require__(14) && + !__webpack_require__(10)(function () { + return ( + Object.defineProperty(__webpack_require__(169)('div'), 'a', { + get: function () { + return 7; + }, + }).a != 7 + ); + }); + + /***/ + }, + /* 281 */ + /***/ function (module, exports, __webpack_require__) { + // 20.1.2.3 Number.isInteger(number) + var isObject = __webpack_require__(11), + floor = Math.floor; + module.exports = function isInteger(it) { + return !isObject(it) && isFinite(it) && floor(it) === it; + }; + + /***/ + }, + /* 282 */ + /***/ function (module, exports, __webpack_require__) { + // call something on iterator step with safe closing on error + var anObject = __webpack_require__(5); + module.exports = function (iterator, fn, value, entries) { + try { + return entries ? fn(anObject(value)[0], value[1]) : fn(value); + // 7.4.6 IteratorClose(iterator, completion) + } catch (e) { + var ret = iterator['return']; + if (ret !== undefined) anObject(ret.call(iterator)); + throw e; + } + }; + + /***/ + }, + /* 283 */ + /***/ function (module, exports) { + module.exports = function (done, value) { + return { value: value, done: !!done }; + }; + + /***/ + }, + /* 284 */ + /***/ function (module, exports) { + // 20.2.2.20 Math.log1p(x) + module.exports = + Math.log1p || + function log1p(x) { + return (x = +x) > -1e-8 && x < 1e-8 ? x - (x * x) / 2 : Math.log(1 + x); + }; + + /***/ + }, + /* 285 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // 19.1.2.1 Object.assign(target, source, ...) + var getKeys = __webpack_require__(80), + gOPS = __webpack_require__(143), + pIE = __webpack_require__(121), + toObject = __webpack_require__(20), + IObject = __webpack_require__(120), + $assign = Object.assign; + + // should work with symbols and should have deterministic property order (V8 bug) + module.exports = + !$assign || + __webpack_require__(10)(function () { + var A = {}, + B = {}, + S = Symbol(), + K = 'abcdefghijklmnopqrst'; + A[S] = 7; + K.split('').forEach(function (k) { + B[k] = k; + }); + return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K; + }) + ? function assign(target, source) { + // eslint-disable-line no-unused-vars + var T = toObject(target), + aLen = arguments.length, + index = 1, + getSymbols = gOPS.f, + isEnum = pIE.f; + while (aLen > index) { + var S = IObject(arguments[index++]), + keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S), + length = keys.length, + j = 0, + key; + while (length > j) if (isEnum.call(S, (key = keys[j++]))) T[key] = S[key]; + } + return T; + } + : $assign; + + /***/ + }, + /* 286 */ + /***/ function (module, exports, __webpack_require__) { + var dP = __webpack_require__(15), + anObject = __webpack_require__(5), + getKeys = __webpack_require__(80); + + module.exports = __webpack_require__(14) + ? Object.defineProperties + : function defineProperties(O, Properties) { + anObject(O); + var keys = getKeys(Properties), + length = keys.length, + i = 0, + P; + while (length > i) dP.f(O, (P = keys[i++]), Properties[P]); + return O; + }; + + /***/ + }, + /* 287 */ + /***/ function (module, exports, __webpack_require__) { + // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window + var toIObject = __webpack_require__(32), + gOPN = __webpack_require__(79).f, + toString = {}.toString; + + var windowNames = + typeof window == 'object' && window && Object.getOwnPropertyNames + ? Object.getOwnPropertyNames(window) + : []; + + var getWindowNames = function (it) { + try { + return gOPN(it); + } catch (e) { + return windowNames.slice(); + } + }; + + module.exports.f = function getOwnPropertyNames(it) { + return windowNames && toString.call(it) == '[object Window]' + ? getWindowNames(it) + : gOPN(toIObject(it)); + }; + + /***/ + }, + /* 288 */ + /***/ function (module, exports, __webpack_require__) { + var has = __webpack_require__(27), + toIObject = __webpack_require__(32), + arrayIndexOf = __webpack_require__(135)(false), + IE_PROTO = __webpack_require__(182)('IE_PROTO'); + + module.exports = function (object, names) { + var O = toIObject(object), + i = 0, + result = [], + key; + for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key); + // Don't enum bug & hidden keys + while (names.length > i) + if (has(O, (key = names[i++]))) { + ~arrayIndexOf(result, key) || result.push(key); + } + return result; + }; + + /***/ + }, + /* 289 */ + /***/ function (module, exports, __webpack_require__) { + var getKeys = __webpack_require__(80), + toIObject = __webpack_require__(32), + isEnum = __webpack_require__(121).f; + module.exports = function (isEntries) { + return function (it) { + var O = toIObject(it), + keys = getKeys(O), + length = keys.length, + i = 0, + result = [], + key; + while (length > i) + if (isEnum.call(O, (key = keys[i++]))) { + result.push(isEntries ? [key, O[key]] : O[key]); + } + return result; + }; + }; + + /***/ + }, + /* 290 */ + /***/ function (module, exports, __webpack_require__) { + // all object keys, includes non-enumerable and symbols + var gOPN = __webpack_require__(79), + gOPS = __webpack_require__(143), + anObject = __webpack_require__(5), + Reflect = __webpack_require__(8).Reflect; + module.exports = + (Reflect && Reflect.ownKeys) || + function ownKeys(it) { + var keys = gOPN.f(anObject(it)), + getSymbols = gOPS.f; + return getSymbols ? keys.concat(getSymbols(it)) : keys; + }; + + /***/ + }, + /* 291 */ + /***/ function (module, exports, __webpack_require__) { + var $parseFloat = __webpack_require__(8).parseFloat, + $trim = __webpack_require__(98).trim; + + module.exports = + 1 / $parseFloat(__webpack_require__(187) + '-0') !== -Infinity + ? function parseFloat(str) { + var string = $trim(String(str), 3), + result = $parseFloat(string); + return result === 0 && string.charAt(0) == '-' ? -0 : result; + } + : $parseFloat; + + /***/ + }, + /* 292 */ + /***/ function (module, exports, __webpack_require__) { + var $parseInt = __webpack_require__(8).parseInt, + $trim = __webpack_require__(98).trim, + ws = __webpack_require__(187), + hex = /^[\-+]?0[xX]/; + + module.exports = + $parseInt(ws + '08') !== 8 || $parseInt(ws + '0x16') !== 22 + ? function parseInt(str, radix) { + var string = $trim(String(str), 3); + return $parseInt(string, radix >>> 0 || (hex.test(string) ? 16 : 10)); + } + : $parseInt; + + /***/ + }, + /* 293 */ + /***/ function (module, exports) { + // 7.2.9 SameValue(x, y) + module.exports = + Object.is || + function is(x, y) { + return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y; + }; + + /***/ + }, + /* 294 */ + /***/ function (module, exports, __webpack_require__) { + // https://github.com/tc39/proposal-string-pad-start-end + var toLength = __webpack_require__(19), + repeat = __webpack_require__(186), + defined = __webpack_require__(41); + + module.exports = function (that, maxLength, fillString, left) { + var S = String(defined(that)), + stringLength = S.length, + fillStr = fillString === undefined ? ' ' : String(fillString), + intMaxLength = toLength(maxLength); + if (intMaxLength <= stringLength || fillStr == '') return S; + var fillLen = intMaxLength - stringLength, + stringFiller = repeat.call(fillStr, Math.ceil(fillLen / fillStr.length)); + if (stringFiller.length > fillLen) stringFiller = stringFiller.slice(0, fillLen); + return left ? stringFiller + S : S + stringFiller; + }; + + /***/ + }, + /* 295 */ + /***/ function (module, exports, __webpack_require__) { + exports.f = __webpack_require__(12); + + /***/ + }, + /* 296 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var strong = __webpack_require__(277); + + // 23.1 Map Objects + module.exports = __webpack_require__(136)( + 'Map', + function (get) { + return function Map() { + return get(this, arguments.length > 0 ? arguments[0] : undefined); + }; + }, + { + // 23.1.3.6 Map.prototype.get(key) + get: function get(key) { + var entry = strong.getEntry(this, key); + return entry && entry.v; + }, + // 23.1.3.9 Map.prototype.set(key, value) + set: function set(key, value) { + return strong.def(this, key === 0 ? 0 : key, value); + }, + }, + strong, + true, + ); + + /***/ + }, + /* 297 */ + /***/ function (module, exports, __webpack_require__) { + // 21.2.5.3 get RegExp.prototype.flags() + if (__webpack_require__(14) && /./g.flags != 'g') + __webpack_require__(15).f(RegExp.prototype, 'flags', { + configurable: true, + get: __webpack_require__(138), + }); + + /***/ + }, + /* 298 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var strong = __webpack_require__(277); + + // 23.2 Set Objects + module.exports = __webpack_require__(136)( + 'Set', + function (get) { + return function Set() { + return get(this, arguments.length > 0 ? arguments[0] : undefined); + }; + }, + { + // 23.2.3.1 Set.prototype.add(value) + add: function add(value) { + return strong.def(this, (value = value === 0 ? 0 : value), value); + }, + }, + strong, + ); + + /***/ + }, + /* 299 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var each = __webpack_require__(48)(0), + redefine = __webpack_require__(30), + meta = __webpack_require__(63), + assign = __webpack_require__(285), + weak = __webpack_require__(279), + isObject = __webpack_require__(11), + getWeak = meta.getWeak, + isExtensible = Object.isExtensible, + uncaughtFrozenStore = weak.ufstore, + tmp = {}, + InternalMap; + + var wrapper = function (get) { + return function WeakMap() { + return get(this, arguments.length > 0 ? arguments[0] : undefined); + }; + }; + + var methods = { + // 23.3.3.3 WeakMap.prototype.get(key) + get: function get(key) { + if (isObject(key)) { + var data = getWeak(key); + if (data === true) return uncaughtFrozenStore(this).get(key); + return data ? data[this._i] : undefined; + } + }, + // 23.3.3.5 WeakMap.prototype.set(key, value) + set: function set(key, value) { + return weak.def(this, key, value); + }, + }; + + // 23.3 WeakMap Objects + var $WeakMap = (module.exports = __webpack_require__(136)( + 'WeakMap', + wrapper, + methods, + weak, + true, + true, + )); + + // IE11 WeakMap frozen keys fix + if (new $WeakMap().set((Object.freeze || Object)(tmp), 7).get(tmp) != 7) { + InternalMap = weak.getConstructor(wrapper); + assign(InternalMap.prototype, methods); + meta.NEED = true; + each(['delete', 'has', 'get', 'set'], function (key) { + var proto = $WeakMap.prototype, + method = proto[key]; + redefine(proto, key, function (a, b) { + // store frozen objects on internal weakmap shim + if (isObject(a) && !isExtensible(a)) { + if (!this._f) this._f = new InternalMap(); + var result = this._f[key](a, b); + return key == 'set' ? this : result; + // store all the rest on native weakmap + } + return method.call(this, a, b); + }); + }); + } + + /***/ + }, + /* 300 */ + /***/ function (module, exports, __webpack_require__) { + var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__; /** + * Copyright Marc J. Schmidt. See the LICENSE file at the top-level + * directory of this distribution and at + * https://github.com/marcj/css-element-queries/blob/master/LICENSE. + */ + (function (root, factory) { + if (true) { + !((__WEBPACK_AMD_DEFINE_FACTORY__ = factory), + (__WEBPACK_AMD_DEFINE_RESULT__ = + typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' + ? __WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module) + : __WEBPACK_AMD_DEFINE_FACTORY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else if (typeof exports === 'object') { + module.exports = factory(); + } else { + root.ResizeSensor = factory(); + } + })(this, function () { + //Make sure it does not throw in a SSR (Server Side Rendering) situation + if (typeof window === 'undefined') { + return null; + } + // Only used for the dirty checking, so the event callback count is limted to max 1 call per fps per sensor. + // In combination with the event based resize sensor this saves cpu time, because the sensor is too fast and + // would generate too many unnecessary events. + var requestAnimationFrame = + window.requestAnimationFrame || + window.mozRequestAnimationFrame || + window.webkitRequestAnimationFrame || + function (fn) { + return window.setTimeout(fn, 20); + }; + + /** + * Iterate over each of the provided element(s). + * + * @param {HTMLElement|HTMLElement[]} elements + * @param {Function} callback + */ + function forEachElement(elements, callback) { + var elementsType = Object.prototype.toString.call(elements); + var isCollectionTyped = + '[object Array]' === elementsType || + '[object NodeList]' === elementsType || + '[object HTMLCollection]' === elementsType || + '[object Object]' === elementsType || + ('undefined' !== typeof jQuery && elements instanceof jQuery) || //jquery + ('undefined' !== typeof Elements && elements instanceof Elements); //mootools + var i = 0, + j = elements.length; + if (isCollectionTyped) { + for (; i < j; i++) { + callback(elements[i]); + } + } else { + callback(elements); + } + } + + /** + * Class for dimension change detection. + * + * @param {Element|Element[]|Elements|jQuery} element + * @param {Function} callback + * + * @constructor + */ + var ResizeSensor = function (element, callback) { + /** + * + * @constructor + */ + function EventQueue() { + var q = []; + this.add = function (ev) { + q.push(ev); + }; + + var i, j; + this.call = function () { + for (i = 0, j = q.length; i < j; i++) { + q[i].call(); + } + }; + + this.remove = function (ev) { + var newQueue = []; + for (i = 0, j = q.length; i < j; i++) { + if (q[i] !== ev) newQueue.push(q[i]); + } + q = newQueue; + }; + + this.length = function () { + return q.length; + }; + } + + /** + * @param {HTMLElement} element + * @param {String} prop + * @returns {String|Number} + */ + function getComputedStyle(element, prop) { + if (element.currentStyle) { + return element.currentStyle[prop]; + } else if (window.getComputedStyle) { + return window.getComputedStyle(element, null).getPropertyValue(prop); + } else { + return element.style[prop]; + } + } + + /** + * + * @param {HTMLElement} element + * @param {Function} resized + */ + function attachResizeEvent(element, resized) { + if (!element.resizedAttached) { + element.resizedAttached = new EventQueue(); + element.resizedAttached.add(resized); + } else if (element.resizedAttached) { + element.resizedAttached.add(resized); + return; + } + + element.resizeSensor = document.createElement('div'); + element.resizeSensor.className = 'resize-sensor'; + var style = + 'position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;'; + var styleChild = 'position: absolute; left: 0; top: 0; transition: 0s;'; + + element.resizeSensor.style.cssText = style; + element.resizeSensor.innerHTML = + '<div class="resize-sensor-expand" style="' + + style + + '">' + + '<div style="' + + styleChild + + '"></div>' + + '</div>' + + '<div class="resize-sensor-shrink" style="' + + style + + '">' + + '<div style="' + + styleChild + + ' width: 200%; height: 200%"></div>' + + '</div>'; + element.appendChild(element.resizeSensor); + + if (getComputedStyle(element, 'position') == 'static') { + element.style.position = 'relative'; + } + + var expand = element.resizeSensor.childNodes[0]; + var expandChild = expand.childNodes[0]; + var shrink = element.resizeSensor.childNodes[1]; + var dirty, rafId, newWidth, newHeight; + var lastWidth = element.offsetWidth; + var lastHeight = element.offsetHeight; + + var reset = function () { + expandChild.style.width = '100000px'; + expandChild.style.height = '100000px'; + + expand.scrollLeft = 100000; + expand.scrollTop = 100000; + + shrink.scrollLeft = 100000; + shrink.scrollTop = 100000; + }; + + reset(); + + var onResized = function () { + rafId = 0; + + if (!dirty) return; + + lastWidth = newWidth; + lastHeight = newHeight; + + if (element.resizedAttached) { + element.resizedAttached.call(); + } + }; + + var onScroll = function () { + newWidth = element.offsetWidth; + newHeight = element.offsetHeight; + dirty = newWidth != lastWidth || newHeight != lastHeight; + + if (dirty && !rafId) { + rafId = requestAnimationFrame(onResized); + } + + reset(); + }; + + var addEvent = function (el, name, cb) { + if (el.attachEvent) { + el.attachEvent('on' + name, cb); + } else { + el.addEventListener(name, cb); + } + }; + + addEvent(expand, 'scroll', onScroll); + addEvent(shrink, 'scroll', onScroll); + } + + forEachElement(element, function (elem) { + attachResizeEvent(elem, callback); + }); + + this.detach = function (ev) { + ResizeSensor.detach(element, ev); + }; + }; + + ResizeSensor.detach = function (element, ev) { + forEachElement(element, function (elem) { + if (elem.resizedAttached && typeof ev == 'function') { + elem.resizedAttached.remove(ev); + if (elem.resizedAttached.length()) return; + } + if (elem.resizeSensor) { + if (elem.contains(elem.resizeSensor)) { + elem.removeChild(elem.resizeSensor); + } + delete elem.resizeSensor; + delete elem.resizedAttached; + } + }); + }; + + return ResizeSensor; + }); + + /***/ + }, + /* 301 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + /** + * Copyright (c) 2013-present, Facebook, Inc. + * + * 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 + * + * http://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. + * + * @typechecks + */ + + var emptyFunction = __webpack_require__(22); + + /** + * Upstream version of event listener. Does not take into account specific + * nature of platform. + */ + var EventListener = { + /** + * Listen to DOM events during the bubble phase. + * + * @param {DOMEventTarget} target DOM element to register listener on. + * @param {string} eventType Event type, e.g. 'click' or 'mouseover'. + * @param {function} callback Callback function. + * @return {object} Object with a `remove` method. + */ + listen: function listen(target, eventType, callback) { + if (target.addEventListener) { + target.addEventListener(eventType, callback, false); + return { + remove: function remove() { + target.removeEventListener(eventType, callback, false); + }, + }; + } else if (target.attachEvent) { + target.attachEvent('on' + eventType, callback); + return { + remove: function remove() { + target.detachEvent('on' + eventType, callback); + }, + }; + } + }, + + /** + * Listen to DOM events during the capture phase. + * + * @param {DOMEventTarget} target DOM element to register listener on. + * @param {string} eventType Event type, e.g. 'click' or 'mouseover'. + * @param {function} callback Callback function. + * @return {object} Object with a `remove` method. + */ + capture: function capture(target, eventType, callback) { + if (target.addEventListener) { + target.addEventListener(eventType, callback, true); + return { + remove: function remove() { + target.removeEventListener(eventType, callback, true); + }, + }; + } else { + if (true) { + console.error( + 'Attempted to listen to events during the capture phase on a ' + + 'browser that does not support the capture phase. Your application ' + + 'will not receive some events.', + ); + } + return { + remove: emptyFunction, + }; + } + }, + + registerDefault: function registerDefault() {}, + }; + + module.exports = EventListener; + + /***/ + }, + /* 302 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + /** + * @param {DOMElement} node input/textarea to focus + */ + + function focusNode(node) { + // IE8 can throw "Can't move focus to the control because it is invisible, + // not enabled, or of a type that does not accept the focus." for all kinds of + // reasons that are too expensive and fragile to test. + try { + node.focus(); + } catch (e) {} + } + + module.exports = focusNode; + + /***/ + }, + /* 303 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + /** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @typechecks + */ + + /* eslint-disable fb-www/typeof-undefined */ + + /** + * Same as document.activeElement but wraps in a try-catch block. In IE it is + * not safe to call document.activeElement if there is nothing focused. + * + * The activeElement will be null only if the document or document body is not + * yet defined. + * + * @param {?DOMDocument} doc Defaults to current document. + * @return {?DOMElement} + */ + function getActiveElement(doc) /*?DOMElement*/ { + doc = doc || (typeof document !== 'undefined' ? document : undefined); + if (typeof doc === 'undefined') { + return null; + } + try { + return doc.activeElement || doc.body; + } catch (e) { + return doc.body; + } + } + + module.exports = getActiveElement; + + /***/ + }, + /* 304 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + exports.readState = exports.saveState = undefined; + + var _warning = __webpack_require__(71); + + var _warning2 = _interopRequireDefault(_warning); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + var QuotaExceededErrors = { + QuotaExceededError: true, + QUOTA_EXCEEDED_ERR: true, + }; + + var SecurityErrors = { + SecurityError: true, + }; + + var KeyPrefix = '@@History/'; + + var createKey = function createKey(key) { + return KeyPrefix + key; + }; + + var saveState = (exports.saveState = function saveState(key, state) { + if (!window.sessionStorage) { + // Session storage is not available or hidden. + // sessionStorage is undefined in Internet Explorer when served via file protocol. + true + ? (0, _warning2.default)(false, '[history] Unable to save state; sessionStorage is not available') + : void 0; + + return; + } + + try { + if (state == null) { + window.sessionStorage.removeItem(createKey(key)); + } else { + window.sessionStorage.setItem(createKey(key), JSON.stringify(state)); + } + } catch (error) { + if (SecurityErrors[error.name]) { + // Blocking cookies in Chrome/Firefox/Safari throws SecurityError on any + // attempt to access window.sessionStorage. + true + ? (0, _warning2.default)( + false, + '[history] Unable to save state; sessionStorage is not available due to security settings', + ) + : void 0; + + return; + } + + if (QuotaExceededErrors[error.name] && window.sessionStorage.length === 0) { + // Safari "private mode" throws QuotaExceededError. + true + ? (0, _warning2.default)( + false, + '[history] Unable to save state; sessionStorage is not available in Safari private mode', + ) + : void 0; + + return; + } + + throw error; + } + }); + + var readState = (exports.readState = function readState(key) { + var json = void 0; + try { + json = window.sessionStorage.getItem(createKey(key)); + } catch (error) { + if (SecurityErrors[error.name]) { + // Blocking cookies in Chrome/Firefox/Safari throws SecurityError on any + // attempt to access window.sessionStorage. + true + ? (0, _warning2.default)( + false, + '[history] Unable to read state; sessionStorage is not available due to security settings', + ) + : void 0; + + return undefined; + } + } + + if (json) { + try { + return JSON.parse(json); + } catch (error) { + // Ignore invalid JSON. + } + } + + return undefined; + }); + + /***/ + }, + /* 305 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + var _runTransitionHook = __webpack_require__(198); + + var _runTransitionHook2 = _interopRequireDefault(_runTransitionHook); + + var _PathUtils = __webpack_require__(67); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + var useBasename = function useBasename(createHistory) { + return function () { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + + var history = createHistory(options); + var basename = options.basename; + + var addBasename = function addBasename(location) { + if (!location) return location; + + if (basename && location.basename == null) { + if (location.pathname.toLowerCase().indexOf(basename.toLowerCase()) === 0) { + location.pathname = location.pathname.substring(basename.length); + location.basename = basename; + + if (location.pathname === '') location.pathname = '/'; + } else { + location.basename = ''; + } + } + + return location; + }; + + var prependBasename = function prependBasename(location) { + if (!basename) return location; + + var object = typeof location === 'string' ? (0, _PathUtils.parsePath)(location) : location; + var pname = object.pathname; + var normalizedBasename = basename.slice(-1) === '/' ? basename : basename + '/'; + var normalizedPathname = pname.charAt(0) === '/' ? pname.slice(1) : pname; + var pathname = normalizedBasename + normalizedPathname; + + return _extends({}, object, { + pathname: pathname, + }); + }; + + // Override all read methods with basename-aware versions. + var getCurrentLocation = function getCurrentLocation() { + return addBasename(history.getCurrentLocation()); + }; + + var listenBefore = function listenBefore(hook) { + return history.listenBefore(function (location, callback) { + return (0, _runTransitionHook2.default)(hook, addBasename(location), callback); + }); + }; + + var listen = function listen(listener) { + return history.listen(function (location) { + return listener(addBasename(location)); + }); + }; + + // Override all write methods with basename-aware versions. + var push = function push(location) { + return history.push(prependBasename(location)); + }; + + var replace = function replace(location) { + return history.replace(prependBasename(location)); + }; + + var createPath = function createPath(location) { + return history.createPath(prependBasename(location)); + }; + + var createHref = function createHref(location) { + return history.createHref(prependBasename(location)); + }; + + var createLocation = function createLocation(location) { + for ( + var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; + _key < _len; + _key++ + ) { + args[_key - 1] = arguments[_key]; + } + + return addBasename( + history.createLocation.apply(history, [prependBasename(location)].concat(args)), + ); + }; + + return _extends({}, history, { + getCurrentLocation: getCurrentLocation, + listenBefore: listenBefore, + listen: listen, + push: push, + replace: replace, + createPath: createPath, + createHref: createHref, + createLocation: createLocation, + }); + }; + }; + + exports.default = useBasename; + + /***/ + }, + /* 306 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + var _queryString = __webpack_require__(312); + + var _runTransitionHook = __webpack_require__(198); + + var _runTransitionHook2 = _interopRequireDefault(_runTransitionHook); + + var _LocationUtils = __webpack_require__(99); + + var _PathUtils = __webpack_require__(67); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + var defaultStringifyQuery = function defaultStringifyQuery(query) { + return (0, _queryString.stringify)(query).replace(/%20/g, '+'); + }; + + var defaultParseQueryString = _queryString.parse; + + /** + * Returns a new createHistory function that may be used to create + * history objects that know how to handle URL queries. + */ + var useQueries = function useQueries(createHistory) { + return function () { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + + var history = createHistory(options); + var stringifyQuery = options.stringifyQuery, + parseQueryString = options.parseQueryString; + + if (typeof stringifyQuery !== 'function') stringifyQuery = defaultStringifyQuery; + + if (typeof parseQueryString !== 'function') parseQueryString = defaultParseQueryString; + + var decodeQuery = function decodeQuery(location) { + if (!location) return location; + + if (location.query == null) location.query = parseQueryString(location.search.substring(1)); + + return location; + }; + + var encodeQuery = function encodeQuery(location, query) { + if (query == null) return location; + + var object = typeof location === 'string' ? (0, _PathUtils.parsePath)(location) : location; + var queryString = stringifyQuery(query); + var search = queryString ? '?' + queryString : ''; + + return _extends({}, object, { + search: search, + }); + }; + + // Override all read methods with query-aware versions. + var getCurrentLocation = function getCurrentLocation() { + return decodeQuery(history.getCurrentLocation()); + }; + + var listenBefore = function listenBefore(hook) { + return history.listenBefore(function (location, callback) { + return (0, _runTransitionHook2.default)(hook, decodeQuery(location), callback); + }); + }; + + var listen = function listen(listener) { + return history.listen(function (location) { + return listener(decodeQuery(location)); + }); + }; + + // Override all write methods with query-aware versions. + var push = function push(location) { + return history.push(encodeQuery(location, location.query)); + }; + + var replace = function replace(location) { + return history.replace(encodeQuery(location, location.query)); + }; + + var createPath = function createPath(location) { + return history.createPath(encodeQuery(location, location.query)); + }; + + var createHref = function createHref(location) { + return history.createHref(encodeQuery(location, location.query)); + }; + + var createLocation = function createLocation(location) { + for ( + var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; + _key < _len; + _key++ + ) { + args[_key - 1] = arguments[_key]; + } + + var newLocation = history.createLocation.apply( + history, + [encodeQuery(location, location.query)].concat(args), + ); + + if (location.query) newLocation.query = (0, _LocationUtils.createQuery)(location.query); + + return decodeQuery(newLocation); + }; + + return _extends({}, history, { + getCurrentLocation: getCurrentLocation, + listenBefore: listenBefore, + listen: listen, + push: push, + replace: replace, + createPath: createPath, + createHref: createHref, + createLocation: createLocation, + }); + }; + }; + + exports.default = useQueries; + + /***/ + }, + /* 307 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2015, Yahoo! Inc. + * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. + */ + + var REACT_STATICS = { + childContextTypes: true, + contextTypes: true, + defaultProps: true, + displayName: true, + getDefaultProps: true, + mixins: true, + propTypes: true, + type: true, + }; + + var KNOWN_STATICS = { + name: true, + length: true, + prototype: true, + caller: true, + arguments: true, + arity: true, + }; + + var isGetOwnPropertySymbolsAvailable = typeof Object.getOwnPropertySymbols === 'function'; + + module.exports = function hoistNonReactStatics(targetComponent, sourceComponent, customStatics) { + if (typeof sourceComponent !== 'string') { + // don't hoist over string (html) components + var keys = Object.getOwnPropertyNames(sourceComponent); + + /* istanbul ignore else */ + if (isGetOwnPropertySymbolsAvailable) { + keys = keys.concat(Object.getOwnPropertySymbols(sourceComponent)); + } + + for (var i = 0; i < keys.length; ++i) { + if ( + !REACT_STATICS[keys[i]] && + !KNOWN_STATICS[keys[i]] && + (!customStatics || !customStatics[keys[i]]) + ) { + try { + targetComponent[keys[i]] = sourceComponent[keys[i]]; + } catch (error) {} + } + } + } + + return targetComponent; + }; + + /***/ + }, + /* 308 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__root_js__ = __webpack_require__(735); + + /** Built-in value references. */ + var Symbol = __WEBPACK_IMPORTED_MODULE_0__root_js__['a' /* default */].Symbol; + + /* harmony default export */ __webpack_exports__['a'] = Symbol; + + /***/ + }, + /* 309 */ + /***/ function (module, exports, __webpack_require__) { + //! moment.js locale configuration + //! locale : great britain english (en-gb) + //! author : Chris Gedrim : https://github.com/chrisgedrim + + (function (global, factory) { + true + ? factory(__webpack_require__(122)) + : typeof define === 'function' && define.amd + ? define(['moment'], factory) + : factory(global.moment); + })(this, function (moment) { + 'use strict'; + + var en_gb = moment.defineLocale('en-gb', { + months: + 'January_February_March_April_May_June_July_August_September_October_November_December'.split( + '_', + ), + monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), + weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'), + weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), + weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[Today at] LT', + nextDay: '[Tomorrow at] LT', + nextWeek: 'dddd [at] LT', + lastDay: '[Yesterday at] LT', + lastWeek: '[Last] dddd [at] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'in %s', + past: '%s ago', + s: 'a few seconds', + m: 'a minute', + mm: '%d minutes', + h: 'an hour', + hh: '%d hours', + d: 'a day', + dd: '%d days', + M: 'a month', + MM: '%d months', + y: 'a year', + yy: '%d years', + }, + ordinalParse: /\d{1,2}(st|nd|rd|th)/, + ordinal: function (number) { + var b = number % 10, + output = + ~~((number % 100) / 10) === 1 + ? 'th' + : b === 1 + ? 'st' + : b === 2 + ? 'nd' + : b === 3 + ? 'rd' + : 'th'; + return number + output; + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + return en_gb; + }); + + /***/ + }, + /* 310 */ + /***/ function (module, exports, __webpack_require__) { + //! moment.js locale configuration + //! locale : russian (ru) + //! author : Viktorminator : https://github.com/Viktorminator + //! Author : Menelion Elensúle : https://github.com/Oire + //! author : Коренберг Марк : https://github.com/socketpair + + (function (global, factory) { + true + ? factory(__webpack_require__(122)) + : typeof define === 'function' && define.amd + ? define(['moment'], factory) + : factory(global.moment); + })(this, function (moment) { + 'use strict'; + + function plural(word, num) { + var forms = word.split('_'); + return num % 10 === 1 && num % 100 !== 11 + ? forms[0] + : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) + ? forms[1] + : forms[2]; + } + function relativeTimeWithPlural(number, withoutSuffix, key) { + var format = { + mm: withoutSuffix ? 'минута_минуты_минут' : 'минуту_минуты_минут', + hh: 'час_часа_часов', + dd: 'день_дня_дней', + MM: 'месяц_месяца_месяцев', + yy: 'год_года_лет', + }; + if (key === 'm') { + return withoutSuffix ? 'минута' : 'минуту'; + } else { + return number + ' ' + plural(format[key], +number); + } + } + var monthsParse = [ + /^янв/i, + /^фев/i, + /^мар/i, + /^апр/i, + /^ма[йя]/i, + /^июн/i, + /^июл/i, + /^авг/i, + /^сен/i, + /^окт/i, + /^ноя/i, + /^дек/i, + ]; + + // http://new.gramota.ru/spravka/rules/139-prop : § 103 + // Сокращения месяцев: http://new.gramota.ru/spravka/buro/search-answer?s=242637 + // CLDR data: http://www.unicode.org/cldr/charts/28/summary/ru.html#1753 + var ru = moment.defineLocale('ru', { + months: { + format: 'января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря'.split( + '_', + ), + standalone: + 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split('_'), + }, + monthsShort: { + // по CLDR именно "июл." и "июн.", но какой смысл менять букву на точку ? + format: 'янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.'.split('_'), + standalone: 'янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.'.split('_'), + }, + weekdays: { + standalone: 'воскресенье_понедельник_вторник_среда_четверг_пятница_суббота'.split('_'), + format: 'воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу'.split('_'), + isFormat: /\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?\] ?dddd/, + }, + weekdaysShort: 'вс_пн_вт_ср_чт_пт_сб'.split('_'), + weekdaysMin: 'вс_пн_вт_ср_чт_пт_сб'.split('_'), + monthsParse: monthsParse, + longMonthsParse: monthsParse, + shortMonthsParse: monthsParse, + monthsRegex: + /^(сентябр[яь]|октябр[яь]|декабр[яь]|феврал[яь]|январ[яь]|апрел[яь]|августа?|ноябр[яь]|сент\.|февр\.|нояб\.|июнь|янв.|июль|дек.|авг.|апр.|марта|мар[.т]|окт.|июн[яь]|июл[яь]|ма[яй])/i, + monthsShortRegex: + /^(сентябр[яь]|октябр[яь]|декабр[яь]|феврал[яь]|январ[яь]|апрел[яь]|августа?|ноябр[яь]|сент\.|февр\.|нояб\.|июнь|янв.|июль|дек.|авг.|апр.|марта|мар[.т]|окт.|июн[яь]|июл[яь]|ма[яй])/i, + monthsStrictRegex: + /^(сентябр[яь]|октябр[яь]|декабр[яь]|феврал[яь]|январ[яь]|апрел[яь]|августа?|ноябр[яь]|марта?|июн[яь]|июл[яь]|ма[яй])/i, + monthsShortStrictRegex: + /^(нояб\.|февр\.|сент\.|июль|янв\.|июн[яь]|мар[.т]|авг\.|апр\.|окт\.|дек\.|ма[яй])/i, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D MMMM YYYY г.', + LLL: 'D MMMM YYYY г., HH:mm', + LLLL: 'dddd, D MMMM YYYY г., HH:mm', + }, + calendar: { + sameDay: '[Сегодня в] LT', + nextDay: '[Завтра в] LT', + lastDay: '[Вчера в] LT', + nextWeek: function (now) { + if (now.week() !== this.week()) { + switch (this.day()) { + case 0: + return '[В следующее] dddd [в] LT'; + case 1: + case 2: + case 4: + return '[В следующий] dddd [в] LT'; + case 3: + case 5: + case 6: + return '[В следующую] dddd [в] LT'; + } + } else { + if (this.day() === 2) { + return '[Во] dddd [в] LT'; + } else { + return '[В] dddd [в] LT'; + } + } + }, + lastWeek: function (now) { + if (now.week() !== this.week()) { + switch (this.day()) { + case 0: + return '[В прошлое] dddd [в] LT'; + case 1: + case 2: + case 4: + return '[В прошлый] dddd [в] LT'; + case 3: + case 5: + case 6: + return '[В прошлую] dddd [в] LT'; + } + } else { + if (this.day() === 2) { + return '[Во] dddd [в] LT'; + } else { + return '[В] dddd [в] LT'; + } + } + }, + sameElse: 'L', + }, + relativeTime: { + future: 'через %s', + past: '%s назад', + s: 'несколько секунд', + m: relativeTimeWithPlural, + mm: relativeTimeWithPlural, + h: 'час', + hh: relativeTimeWithPlural, + d: 'день', + dd: relativeTimeWithPlural, + M: 'месяц', + MM: relativeTimeWithPlural, + y: 'год', + yy: relativeTimeWithPlural, + }, + meridiemParse: /ночи|утра|дня|вечера/i, + isPM: function (input) { + return /^(дня|вечера)$/.test(input); + }, + meridiem: function (hour, minute, isLower) { + if (hour < 4) { + return 'ночи'; + } else if (hour < 12) { + return 'утра'; + } else if (hour < 17) { + return 'дня'; + } else { + return 'вечера'; + } + }, + ordinalParse: /\d{1,2}-(й|го|я)/, + ordinal: function (number, period) { + switch (period) { + case 'M': + case 'd': + case 'DDD': + return number + '-й'; + case 'D': + return number + '-го'; + case 'w': + case 'W': + return number + '-я'; + default: + return number; + } + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 1st is the first week of the year. + }, + }); + + return ru; + }); + + /***/ + }, + /* 311 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + + var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; + + module.exports = ReactPropTypesSecret; + + /***/ + }, + /* 312 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var strictUriEncode = __webpack_require__(886); + var objectAssign = __webpack_require__(9); + + function encode(value, opts) { + if (opts.encode) { + return opts.strict ? strictUriEncode(value) : encodeURIComponent(value); + } + + return value; + } + + exports.extract = function (str) { + return str.split('?')[1] || ''; + }; + + exports.parse = function (str) { + // Create an object with no prototype + // https://github.com/sindresorhus/query-string/issues/47 + var ret = Object.create(null); + + if (typeof str !== 'string') { + return ret; + } + + str = str.trim().replace(/^(\?|#|&)/, ''); + + if (!str) { + return ret; + } + + str.split('&').forEach(function (param) { + var parts = param.replace(/\+/g, ' ').split('='); + // Firefox (pre 40) decodes `%3D` to `=` + // https://github.com/sindresorhus/query-string/pull/37 + var key = parts.shift(); + var val = parts.length > 0 ? parts.join('=') : undefined; + + key = decodeURIComponent(key); + + // missing `=` should be `null`: + // http://w3.org/TR/2012/WD-url-20120524/#collect-url-parameters + val = val === undefined ? null : decodeURIComponent(val); + + if (ret[key] === undefined) { + ret[key] = val; + } else if (Array.isArray(ret[key])) { + ret[key].push(val); + } else { + ret[key] = [ret[key], val]; + } + }); + + return ret; + }; + + exports.stringify = function (obj, opts) { + var defaults = { + encode: true, + strict: true, + }; + + opts = objectAssign(defaults, opts); + + return obj + ? Object.keys(obj) + .sort() + .map(function (key) { + var val = obj[key]; + + if (val === undefined) { + return ''; + } + + if (val === null) { + return encode(key, opts); + } + + if (Array.isArray(val)) { + var result = []; + + val.slice().forEach(function (val2) { + if (val2 === undefined) { + return; + } + + if (val2 === null) { + result.push(encode(key, opts)); + } else { + result.push(encode(key, opts) + '=' + encode(val2, opts)); + } + }); + + return result.join('&'); + } + + return encode(key, opts) + '=' + encode(val, opts); + }) + .filter(function (x) { + return x.length > 0; + }) + .join('&') + : ''; + }; + + /***/ + }, + /* 313 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + /** + * CSS properties which accept numbers but are not in units of "px". + */ + + var isUnitlessNumber = { + animationIterationCount: true, + borderImageOutset: true, + borderImageSlice: true, + borderImageWidth: true, + boxFlex: true, + boxFlexGroup: true, + boxOrdinalGroup: true, + columnCount: true, + flex: true, + flexGrow: true, + flexPositive: true, + flexShrink: true, + flexNegative: true, + flexOrder: true, + gridRow: true, + gridColumn: true, + fontWeight: true, + lineClamp: true, + lineHeight: true, + opacity: true, + order: true, + orphans: true, + tabSize: true, + widows: true, + zIndex: true, + zoom: true, + + // SVG-related properties + fillOpacity: true, + floodOpacity: true, + stopOpacity: true, + strokeDasharray: true, + strokeDashoffset: true, + strokeMiterlimit: true, + strokeOpacity: true, + strokeWidth: true, + }; + + /** + * @param {string} prefix vendor-specific prefix, eg: Webkit + * @param {string} key style name, eg: transitionDuration + * @return {string} style name prefixed with `prefix`, properly camelCased, eg: + * WebkitTransitionDuration + */ + function prefixKey(prefix, key) { + return prefix + key.charAt(0).toUpperCase() + key.substring(1); + } + + /** + * Support style names that may come passed in prefixed by adding permutations + * of vendor prefixes. + */ + var prefixes = ['Webkit', 'ms', 'Moz', 'O']; + + // Using Object.keys here, or else the vanilla for-in loop makes IE8 go into an + // infinite loop, because it iterates over the newly added props too. + Object.keys(isUnitlessNumber).forEach(function (prop) { + prefixes.forEach(function (prefix) { + isUnitlessNumber[prefixKey(prefix, prop)] = isUnitlessNumber[prop]; + }); + }); + + /** + * Most style properties can be unset by doing .style[prop] = '' but IE8 + * doesn't like doing that with shorthand properties so for the properties that + * IE8 breaks on, which are listed here, we instead unset each of the + * individual properties. See http://bugs.jquery.com/ticket/12385. + * The 4-value 'clock' properties like margin, padding, border-width seem to + * behave without any problems. Curiously, list-style works too without any + * special prodding. + */ + var shorthandPropertyExpansions = { + background: { + backgroundAttachment: true, + backgroundColor: true, + backgroundImage: true, + backgroundPositionX: true, + backgroundPositionY: true, + backgroundRepeat: true, + }, + backgroundPosition: { + backgroundPositionX: true, + backgroundPositionY: true, + }, + border: { + borderWidth: true, + borderStyle: true, + borderColor: true, + }, + borderBottom: { + borderBottomWidth: true, + borderBottomStyle: true, + borderBottomColor: true, + }, + borderLeft: { + borderLeftWidth: true, + borderLeftStyle: true, + borderLeftColor: true, + }, + borderRight: { + borderRightWidth: true, + borderRightStyle: true, + borderRightColor: true, + }, + borderTop: { + borderTopWidth: true, + borderTopStyle: true, + borderTopColor: true, + }, + font: { + fontStyle: true, + fontVariant: true, + fontWeight: true, + fontSize: true, + lineHeight: true, + fontFamily: true, + }, + outline: { + outlineWidth: true, + outlineStyle: true, + outlineColor: true, + }, + }; + + var CSSProperty = { + isUnitlessNumber: isUnitlessNumber, + shorthandPropertyExpansions: shorthandPropertyExpansions, + }; + + module.exports = CSSProperty; + + /***/ + }, + /* 314 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + var _prodInvariant = __webpack_require__(7); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + var PooledClass = __webpack_require__(85); + + var invariant = __webpack_require__(3); + + /** + * A specialized pseudo-event module to help keep track of components waiting to + * be notified when their DOM representations are available for use. + * + * This implements `PooledClass`, so you should never need to instantiate this. + * Instead, use `CallbackQueue.getPooled()`. + * + * @class ReactMountReady + * @implements PooledClass + * @internal + */ + + var CallbackQueue = (function () { + function CallbackQueue(arg) { + _classCallCheck(this, CallbackQueue); + + this._callbacks = null; + this._contexts = null; + this._arg = arg; + } + + /** + * Enqueues a callback to be invoked when `notifyAll` is invoked. + * + * @param {function} callback Invoked when `notifyAll` is invoked. + * @param {?object} context Context to call `callback` with. + * @internal + */ + + CallbackQueue.prototype.enqueue = function enqueue(callback, context) { + this._callbacks = this._callbacks || []; + this._callbacks.push(callback); + this._contexts = this._contexts || []; + this._contexts.push(context); + }; + + /** + * Invokes all enqueued callbacks and clears the queue. This is invoked after + * the DOM representation of a component has been created or updated. + * + * @internal + */ + + CallbackQueue.prototype.notifyAll = function notifyAll() { + var callbacks = this._callbacks; + var contexts = this._contexts; + var arg = this._arg; + if (callbacks && contexts) { + !(callbacks.length === contexts.length) + ? true + ? invariant(false, 'Mismatched list of contexts in callback queue') + : _prodInvariant('24') + : void 0; + this._callbacks = null; + this._contexts = null; + for (var i = 0; i < callbacks.length; i++) { + callbacks[i].call(contexts[i], arg); + } + callbacks.length = 0; + contexts.length = 0; + } + }; + + CallbackQueue.prototype.checkpoint = function checkpoint() { + return this._callbacks ? this._callbacks.length : 0; + }; + + CallbackQueue.prototype.rollback = function rollback(len) { + if (this._callbacks && this._contexts) { + this._callbacks.length = len; + this._contexts.length = len; + } + }; + + /** + * Resets the internal queue. + * + * @internal + */ + + CallbackQueue.prototype.reset = function reset() { + this._callbacks = null; + this._contexts = null; + }; + + /** + * `PooledClass` looks for this. + */ + + CallbackQueue.prototype.destructor = function destructor() { + this.reset(); + }; + + return CallbackQueue; + })(); + + module.exports = PooledClass.addPoolingTo(CallbackQueue); + + /***/ + }, + /* 315 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var DOMProperty = __webpack_require__(68); + var ReactDOMComponentTree = __webpack_require__(16); + var ReactInstrumentation = __webpack_require__(33); + + var quoteAttributeValueForBrowser = __webpack_require__(811); + var warning = __webpack_require__(4); + + var VALID_ATTRIBUTE_NAME_REGEX = new RegExp( + '^[' + DOMProperty.ATTRIBUTE_NAME_START_CHAR + '][' + DOMProperty.ATTRIBUTE_NAME_CHAR + ']*$', + ); + var illegalAttributeNameCache = {}; + var validatedAttributeNameCache = {}; + + function isAttributeNameSafe(attributeName) { + if (validatedAttributeNameCache.hasOwnProperty(attributeName)) { + return true; + } + if (illegalAttributeNameCache.hasOwnProperty(attributeName)) { + return false; + } + if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) { + validatedAttributeNameCache[attributeName] = true; + return true; + } + illegalAttributeNameCache[attributeName] = true; + true ? warning(false, 'Invalid attribute name: `%s`', attributeName) : void 0; + return false; + } + + function shouldIgnoreValue(propertyInfo, value) { + return ( + value == null || + (propertyInfo.hasBooleanValue && !value) || + (propertyInfo.hasNumericValue && isNaN(value)) || + (propertyInfo.hasPositiveNumericValue && value < 1) || + (propertyInfo.hasOverloadedBooleanValue && value === false) + ); + } + + /** + * Operations for dealing with DOM properties. + */ + var DOMPropertyOperations = { + /** + * Creates markup for the ID property. + * + * @param {string} id Unescaped ID. + * @return {string} Markup string. + */ + createMarkupForID: function (id) { + return DOMProperty.ID_ATTRIBUTE_NAME + '=' + quoteAttributeValueForBrowser(id); + }, + + setAttributeForID: function (node, id) { + node.setAttribute(DOMProperty.ID_ATTRIBUTE_NAME, id); + }, + + createMarkupForRoot: function () { + return DOMProperty.ROOT_ATTRIBUTE_NAME + '=""'; + }, + + setAttributeForRoot: function (node) { + node.setAttribute(DOMProperty.ROOT_ATTRIBUTE_NAME, ''); + }, + + /** + * Creates markup for a property. + * + * @param {string} name + * @param {*} value + * @return {?string} Markup string, or null if the property was invalid. + */ + createMarkupForProperty: function (name, value) { + var propertyInfo = DOMProperty.properties.hasOwnProperty(name) + ? DOMProperty.properties[name] + : null; + if (propertyInfo) { + if (shouldIgnoreValue(propertyInfo, value)) { + return ''; + } + var attributeName = propertyInfo.attributeName; + if (propertyInfo.hasBooleanValue || (propertyInfo.hasOverloadedBooleanValue && value === true)) { + return attributeName + '=""'; + } + return attributeName + '=' + quoteAttributeValueForBrowser(value); + } else if (DOMProperty.isCustomAttribute(name)) { + if (value == null) { + return ''; + } + return name + '=' + quoteAttributeValueForBrowser(value); + } + return null; + }, + + /** + * Creates markup for a custom property. + * + * @param {string} name + * @param {*} value + * @return {string} Markup string, or empty string if the property was invalid. + */ + createMarkupForCustomAttribute: function (name, value) { + if (!isAttributeNameSafe(name) || value == null) { + return ''; + } + return name + '=' + quoteAttributeValueForBrowser(value); + }, + + /** + * Sets the value for a property on a node. + * + * @param {DOMElement} node + * @param {string} name + * @param {*} value + */ + setValueForProperty: function (node, name, value) { + var propertyInfo = DOMProperty.properties.hasOwnProperty(name) + ? DOMProperty.properties[name] + : null; + if (propertyInfo) { + var mutationMethod = propertyInfo.mutationMethod; + if (mutationMethod) { + mutationMethod(node, value); + } else if (shouldIgnoreValue(propertyInfo, value)) { + this.deleteValueForProperty(node, name); + return; + } else if (propertyInfo.mustUseProperty) { + // Contrary to `setAttribute`, object properties are properly + // `toString`ed by IE8/9. + node[propertyInfo.propertyName] = value; + } else { + var attributeName = propertyInfo.attributeName; + var namespace = propertyInfo.attributeNamespace; + // `setAttribute` with objects becomes only `[object]` in IE8/9, + // ('' + value) makes it output the correct toString()-value. + if (namespace) { + node.setAttributeNS(namespace, attributeName, '' + value); + } else if ( + propertyInfo.hasBooleanValue || + (propertyInfo.hasOverloadedBooleanValue && value === true) + ) { + node.setAttribute(attributeName, ''); + } else { + node.setAttribute(attributeName, '' + value); + } + } + } else if (DOMProperty.isCustomAttribute(name)) { + DOMPropertyOperations.setValueForAttribute(node, name, value); + return; + } + + if (true) { + var payload = {}; + payload[name] = value; + ReactInstrumentation.debugTool.onHostOperation({ + instanceID: ReactDOMComponentTree.getInstanceFromNode(node)._debugID, + type: 'update attribute', + payload: payload, + }); + } + }, + + setValueForAttribute: function (node, name, value) { + if (!isAttributeNameSafe(name)) { + return; + } + if (value == null) { + node.removeAttribute(name); + } else { + node.setAttribute(name, '' + value); + } + + if (true) { + var payload = {}; + payload[name] = value; + ReactInstrumentation.debugTool.onHostOperation({ + instanceID: ReactDOMComponentTree.getInstanceFromNode(node)._debugID, + type: 'update attribute', + payload: payload, + }); + } + }, + + /** + * Deletes an attributes from a node. + * + * @param {DOMElement} node + * @param {string} name + */ + deleteValueForAttribute: function (node, name) { + node.removeAttribute(name); + if (true) { + ReactInstrumentation.debugTool.onHostOperation({ + instanceID: ReactDOMComponentTree.getInstanceFromNode(node)._debugID, + type: 'remove attribute', + payload: name, + }); + } + }, + + /** + * Deletes the value for a property on a node. + * + * @param {DOMElement} node + * @param {string} name + */ + deleteValueForProperty: function (node, name) { + var propertyInfo = DOMProperty.properties.hasOwnProperty(name) + ? DOMProperty.properties[name] + : null; + if (propertyInfo) { + var mutationMethod = propertyInfo.mutationMethod; + if (mutationMethod) { + mutationMethod(node, undefined); + } else if (propertyInfo.mustUseProperty) { + var propName = propertyInfo.propertyName; + if (propertyInfo.hasBooleanValue) { + node[propName] = false; + } else { + node[propName] = ''; + } + } else { + node.removeAttribute(propertyInfo.attributeName); + } + } else if (DOMProperty.isCustomAttribute(name)) { + node.removeAttribute(name); + } + + if (true) { + ReactInstrumentation.debugTool.onHostOperation({ + instanceID: ReactDOMComponentTree.getInstanceFromNode(node)._debugID, + type: 'remove attribute', + payload: name, + }); + } + }, + }; + + module.exports = DOMPropertyOperations; + + /***/ + }, + /* 316 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var _prodInvariant = __webpack_require__(7), + _assign = __webpack_require__(9); + + var React = __webpack_require__(38); + var ReactComponentEnvironment = __webpack_require__(205); + var ReactCurrentOwner = __webpack_require__(53); + var ReactErrorUtils = __webpack_require__(208); + var ReactInstanceMap = __webpack_require__(105); + var ReactInstrumentation = __webpack_require__(33); + var ReactNodeTypes = __webpack_require__(328); + var ReactReconciler = __webpack_require__(69); + + if (true) { + var checkReactTypeSpec = __webpack_require__(805); + } + + var emptyObject = __webpack_require__(66); + var invariant = __webpack_require__(3); + var shallowEqual = __webpack_require__(194); + var shouldUpdateReactComponent = __webpack_require__(216); + var warning = __webpack_require__(4); + + var CompositeTypes = { + ImpureClass: 0, + PureClass: 1, + StatelessFunctional: 2, + }; + + function StatelessComponent(Component) {} + StatelessComponent.prototype.render = function () { + var Component = ReactInstanceMap.get(this)._currentElement.type; + var element = Component(this.props, this.context, this.updater); + warnIfInvalidElement(Component, element); + return element; + }; + + function warnIfInvalidElement(Component, element) { + if (true) { + true + ? warning( + element === null || element === false || React.isValidElement(element), + '%s(...): A valid React element (or null) must be returned. You may have ' + + 'returned undefined, an array or some other invalid object.', + Component.displayName || Component.name || 'Component', + ) + : void 0; + true + ? warning( + !Component.childContextTypes, + '%s(...): childContextTypes cannot be defined on a functional component.', + Component.displayName || Component.name || 'Component', + ) + : void 0; + } + } + + function shouldConstruct(Component) { + return !!(Component.prototype && Component.prototype.isReactComponent); + } + + function isPureComponent(Component) { + return !!(Component.prototype && Component.prototype.isPureReactComponent); + } + + // Separated into a function to contain deoptimizations caused by try/finally. + function measureLifeCyclePerf(fn, debugID, timerType) { + if (debugID === 0) { + // Top-level wrappers (see ReactMount) and empty components (see + // ReactDOMEmptyComponent) are invisible to hooks and devtools. + // Both are implementation details that should go away in the future. + return fn(); + } + + ReactInstrumentation.debugTool.onBeginLifeCycleTimer(debugID, timerType); + try { + return fn(); + } finally { + ReactInstrumentation.debugTool.onEndLifeCycleTimer(debugID, timerType); + } + } + + /** + * ------------------ The Life-Cycle of a Composite Component ------------------ + * + * - constructor: Initialization of state. The instance is now retained. + * - componentWillMount + * - render + * - [children's constructors] + * - [children's componentWillMount and render] + * - [children's componentDidMount] + * - componentDidMount + * + * Update Phases: + * - componentWillReceiveProps (only called if parent updated) + * - shouldComponentUpdate + * - componentWillUpdate + * - render + * - [children's constructors or receive props phases] + * - componentDidUpdate + * + * - componentWillUnmount + * - [children's componentWillUnmount] + * - [children destroyed] + * - (destroyed): The instance is now blank, released by React and ready for GC. + * + * ----------------------------------------------------------------------------- + */ + + /** + * An incrementing ID assigned to each component when it is mounted. This is + * used to enforce the order in which `ReactUpdates` updates dirty components. + * + * @private + */ + var nextMountID = 1; + + /** + * @lends {ReactCompositeComponent.prototype} + */ + var ReactCompositeComponent = { + /** + * Base constructor for all composite component. + * + * @param {ReactElement} element + * @final + * @internal + */ + construct: function (element) { + this._currentElement = element; + this._rootNodeID = 0; + this._compositeType = null; + this._instance = null; + this._hostParent = null; + this._hostContainerInfo = null; + + // See ReactUpdateQueue + this._updateBatchNumber = null; + this._pendingElement = null; + this._pendingStateQueue = null; + this._pendingReplaceState = false; + this._pendingForceUpdate = false; + + this._renderedNodeType = null; + this._renderedComponent = null; + this._context = null; + this._mountOrder = 0; + this._topLevelWrapper = null; + + // See ReactUpdates and ReactUpdateQueue. + this._pendingCallbacks = null; + + // ComponentWillUnmount shall only be called once + this._calledComponentWillUnmount = false; + + if (true) { + this._warnedAboutRefsInRender = false; + } + }, + + /** + * Initializes the component, renders markup, and registers event listeners. + * + * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction + * @param {?object} hostParent + * @param {?object} hostContainerInfo + * @param {?object} context + * @return {?string} Rendered markup to be inserted into the DOM. + * @final + * @internal + */ + mountComponent: function (transaction, hostParent, hostContainerInfo, context) { + var _this = this; + + this._context = context; + this._mountOrder = nextMountID++; + this._hostParent = hostParent; + this._hostContainerInfo = hostContainerInfo; + + var publicProps = this._currentElement.props; + var publicContext = this._processContext(context); + + var Component = this._currentElement.type; + + var updateQueue = transaction.getUpdateQueue(); + + // Initialize the public class + var doConstruct = shouldConstruct(Component); + var inst = this._constructComponent(doConstruct, publicProps, publicContext, updateQueue); + var renderedElement; + + // Support functional components + if (!doConstruct && (inst == null || inst.render == null)) { + renderedElement = inst; + warnIfInvalidElement(Component, renderedElement); + !(inst === null || inst === false || React.isValidElement(inst)) + ? true + ? invariant( + false, + '%s(...): A valid React element (or null) must be returned. You may have returned undefined, an array or some other invalid object.', + Component.displayName || Component.name || 'Component', + ) + : _prodInvariant('105', Component.displayName || Component.name || 'Component') + : void 0; + inst = new StatelessComponent(Component); + this._compositeType = CompositeTypes.StatelessFunctional; + } else { + if (isPureComponent(Component)) { + this._compositeType = CompositeTypes.PureClass; + } else { + this._compositeType = CompositeTypes.ImpureClass; + } + } + + if (true) { + // This will throw later in _renderValidatedComponent, but add an early + // warning now to help debugging + if (inst.render == null) { + true + ? warning( + false, + '%s(...): No `render` method found on the returned component ' + + 'instance: you may have forgotten to define `render`.', + Component.displayName || Component.name || 'Component', + ) + : void 0; + } + + var propsMutated = inst.props !== publicProps; + var componentName = Component.displayName || Component.name || 'Component'; + + true + ? warning( + inst.props === undefined || !propsMutated, + '%s(...): When calling super() in `%s`, make sure to pass ' + + "up the same props that your component's constructor was passed.", + componentName, + componentName, + ) + : void 0; + } + + // These should be set up in the constructor, but as a convenience for + // simpler class abstractions, we set them up after the fact. + inst.props = publicProps; + inst.context = publicContext; + inst.refs = emptyObject; + inst.updater = updateQueue; + + this._instance = inst; + + // Store a reference from the instance back to the internal representation + ReactInstanceMap.set(inst, this); + + if (true) { + // Since plain JS classes are defined without any special initialization + // logic, we can not catch common errors early. Therefore, we have to + // catch them here, at initialization time, instead. + true + ? warning( + !inst.getInitialState || inst.getInitialState.isReactClassApproved || inst.state, + 'getInitialState was defined on %s, a plain JavaScript class. ' + + 'This is only supported for classes created using React.createClass. ' + + 'Did you mean to define a state property instead?', + this.getName() || 'a component', + ) + : void 0; + true + ? warning( + !inst.getDefaultProps || inst.getDefaultProps.isReactClassApproved, + 'getDefaultProps was defined on %s, a plain JavaScript class. ' + + 'This is only supported for classes created using React.createClass. ' + + 'Use a static property to define defaultProps instead.', + this.getName() || 'a component', + ) + : void 0; + true + ? warning( + !inst.propTypes, + 'propTypes was defined as an instance property on %s. Use a static ' + + 'property to define propTypes instead.', + this.getName() || 'a component', + ) + : void 0; + true + ? warning( + !inst.contextTypes, + 'contextTypes was defined as an instance property on %s. Use a ' + + 'static property to define contextTypes instead.', + this.getName() || 'a component', + ) + : void 0; + true + ? warning( + typeof inst.componentShouldUpdate !== 'function', + '%s has a method called ' + + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + + 'The name is phrased as a question because the function is ' + + 'expected to return a value.', + this.getName() || 'A component', + ) + : void 0; + true + ? warning( + typeof inst.componentDidUnmount !== 'function', + '%s has a method called ' + + 'componentDidUnmount(). But there is no such lifecycle method. ' + + 'Did you mean componentWillUnmount()?', + this.getName() || 'A component', + ) + : void 0; + true + ? warning( + typeof inst.componentWillRecieveProps !== 'function', + '%s has a method called ' + + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', + this.getName() || 'A component', + ) + : void 0; + } + + var initialState = inst.state; + if (initialState === undefined) { + inst.state = initialState = null; + } + !(typeof initialState === 'object' && !Array.isArray(initialState)) + ? true + ? invariant( + false, + '%s.state: must be set to an object or null', + this.getName() || 'ReactCompositeComponent', + ) + : _prodInvariant('106', this.getName() || 'ReactCompositeComponent') + : void 0; + + this._pendingStateQueue = null; + this._pendingReplaceState = false; + this._pendingForceUpdate = false; + + var markup; + if (inst.unstable_handleError) { + markup = this.performInitialMountWithErrorHandling( + renderedElement, + hostParent, + hostContainerInfo, + transaction, + context, + ); + } else { + markup = this.performInitialMount( + renderedElement, + hostParent, + hostContainerInfo, + transaction, + context, + ); + } + + if (inst.componentDidMount) { + if (true) { + transaction.getReactMountReady().enqueue(function () { + measureLifeCyclePerf( + function () { + return inst.componentDidMount(); + }, + _this._debugID, + 'componentDidMount', + ); + }); + } else { + transaction.getReactMountReady().enqueue(inst.componentDidMount, inst); + } + } + + return markup; + }, + + _constructComponent: function (doConstruct, publicProps, publicContext, updateQueue) { + if (true) { + ReactCurrentOwner.current = this; + try { + return this._constructComponentWithoutOwner( + doConstruct, + publicProps, + publicContext, + updateQueue, + ); + } finally { + ReactCurrentOwner.current = null; + } + } else { + return this._constructComponentWithoutOwner(doConstruct, publicProps, publicContext, updateQueue); + } + }, + + _constructComponentWithoutOwner: function (doConstruct, publicProps, publicContext, updateQueue) { + var Component = this._currentElement.type; + + if (doConstruct) { + if (true) { + return measureLifeCyclePerf( + function () { + return new Component(publicProps, publicContext, updateQueue); + }, + this._debugID, + 'ctor', + ); + } else { + return new Component(publicProps, publicContext, updateQueue); + } + } + + // This can still be an instance in case of factory components + // but we'll count this as time spent rendering as the more common case. + if (true) { + return measureLifeCyclePerf( + function () { + return Component(publicProps, publicContext, updateQueue); + }, + this._debugID, + 'render', + ); + } else { + return Component(publicProps, publicContext, updateQueue); + } + }, + + performInitialMountWithErrorHandling: function ( + renderedElement, + hostParent, + hostContainerInfo, + transaction, + context, + ) { + var markup; + var checkpoint = transaction.checkpoint(); + try { + markup = this.performInitialMount( + renderedElement, + hostParent, + hostContainerInfo, + transaction, + context, + ); + } catch (e) { + // Roll back to checkpoint, handle error (which may add items to the transaction), and take a new checkpoint + transaction.rollback(checkpoint); + this._instance.unstable_handleError(e); + if (this._pendingStateQueue) { + this._instance.state = this._processPendingState(this._instance.props, this._instance.context); + } + checkpoint = transaction.checkpoint(); + + this._renderedComponent.unmountComponent(true); + transaction.rollback(checkpoint); + + // Try again - we've informed the component about the error, so they can render an error message this time. + // If this throws again, the error will bubble up (and can be caught by a higher error boundary). + markup = this.performInitialMount( + renderedElement, + hostParent, + hostContainerInfo, + transaction, + context, + ); + } + return markup; + }, + + performInitialMount: function (renderedElement, hostParent, hostContainerInfo, transaction, context) { + var inst = this._instance; + + var debugID = 0; + if (true) { + debugID = this._debugID; + } + + if (inst.componentWillMount) { + if (true) { + measureLifeCyclePerf( + function () { + return inst.componentWillMount(); + }, + debugID, + 'componentWillMount', + ); + } else { + inst.componentWillMount(); + } + // When mounting, calls to `setState` by `componentWillMount` will set + // `this._pendingStateQueue` without triggering a re-render. + if (this._pendingStateQueue) { + inst.state = this._processPendingState(inst.props, inst.context); + } + } + + // If not a stateless component, we now render + if (renderedElement === undefined) { + renderedElement = this._renderValidatedComponent(); + } + + var nodeType = ReactNodeTypes.getType(renderedElement); + this._renderedNodeType = nodeType; + var child = this._instantiateReactComponent( + renderedElement, + nodeType !== ReactNodeTypes.EMPTY /* shouldHaveDebugID */, + ); + this._renderedComponent = child; + + var markup = ReactReconciler.mountComponent( + child, + transaction, + hostParent, + hostContainerInfo, + this._processChildContext(context), + debugID, + ); + + if (true) { + if (debugID !== 0) { + var childDebugIDs = child._debugID !== 0 ? [child._debugID] : []; + ReactInstrumentation.debugTool.onSetChildren(debugID, childDebugIDs); + } + } + + return markup; + }, + + getHostNode: function () { + return ReactReconciler.getHostNode(this._renderedComponent); + }, + + /** + * Releases any resources allocated by `mountComponent`. + * + * @final + * @internal + */ + unmountComponent: function (safely) { + if (!this._renderedComponent) { + return; + } + + var inst = this._instance; + + if (inst.componentWillUnmount && !inst._calledComponentWillUnmount) { + inst._calledComponentWillUnmount = true; + + if (safely) { + var name = this.getName() + '.componentWillUnmount()'; + ReactErrorUtils.invokeGuardedCallback(name, inst.componentWillUnmount.bind(inst)); + } else { + if (true) { + measureLifeCyclePerf( + function () { + return inst.componentWillUnmount(); + }, + this._debugID, + 'componentWillUnmount', + ); + } else { + inst.componentWillUnmount(); + } + } + } + + if (this._renderedComponent) { + ReactReconciler.unmountComponent(this._renderedComponent, safely); + this._renderedNodeType = null; + this._renderedComponent = null; + this._instance = null; + } + + // Reset pending fields + // Even if this component is scheduled for another update in ReactUpdates, + // it would still be ignored because these fields are reset. + this._pendingStateQueue = null; + this._pendingReplaceState = false; + this._pendingForceUpdate = false; + this._pendingCallbacks = null; + this._pendingElement = null; + + // These fields do not really need to be reset since this object is no + // longer accessible. + this._context = null; + this._rootNodeID = 0; + this._topLevelWrapper = null; + + // Delete the reference from the instance to this internal representation + // which allow the internals to be properly cleaned up even if the user + // leaks a reference to the public instance. + ReactInstanceMap.remove(inst); + + // Some existing components rely on inst.props even after they've been + // destroyed (in event handlers). + // TODO: inst.props = null; + // TODO: inst.state = null; + // TODO: inst.context = null; + }, + + /** + * Filters the context object to only contain keys specified in + * `contextTypes` + * + * @param {object} context + * @return {?object} + * @private + */ + _maskContext: function (context) { + var Component = this._currentElement.type; + var contextTypes = Component.contextTypes; + if (!contextTypes) { + return emptyObject; + } + var maskedContext = {}; + for (var contextName in contextTypes) { + maskedContext[contextName] = context[contextName]; + } + return maskedContext; + }, + + /** + * Filters the context object to only contain keys specified in + * `contextTypes`, and asserts that they are valid. + * + * @param {object} context + * @return {?object} + * @private + */ + _processContext: function (context) { + var maskedContext = this._maskContext(context); + if (true) { + var Component = this._currentElement.type; + if (Component.contextTypes) { + this._checkContextTypes(Component.contextTypes, maskedContext, 'context'); + } + } + return maskedContext; + }, + + /** + * @param {object} currentContext + * @return {object} + * @private + */ + _processChildContext: function (currentContext) { + var Component = this._currentElement.type; + var inst = this._instance; + var childContext; + + if (inst.getChildContext) { + if (true) { + ReactInstrumentation.debugTool.onBeginProcessingChildContext(); + try { + childContext = inst.getChildContext(); + } finally { + ReactInstrumentation.debugTool.onEndProcessingChildContext(); + } + } else { + childContext = inst.getChildContext(); + } + } + + if (childContext) { + !(typeof Component.childContextTypes === 'object') + ? true + ? invariant( + false, + '%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().', + this.getName() || 'ReactCompositeComponent', + ) + : _prodInvariant('107', this.getName() || 'ReactCompositeComponent') + : void 0; + if (true) { + this._checkContextTypes(Component.childContextTypes, childContext, 'child context'); + } + for (var name in childContext) { + !(name in Component.childContextTypes) + ? true + ? invariant( + false, + '%s.getChildContext(): key "%s" is not defined in childContextTypes.', + this.getName() || 'ReactCompositeComponent', + name, + ) + : _prodInvariant('108', this.getName() || 'ReactCompositeComponent', name) + : void 0; + } + return _assign({}, currentContext, childContext); + } + return currentContext; + }, + + /** + * Assert that the context types are valid + * + * @param {object} typeSpecs Map of context field to a ReactPropType + * @param {object} values Runtime values that need to be type-checked + * @param {string} location e.g. "prop", "context", "child context" + * @private + */ + _checkContextTypes: function (typeSpecs, values, location) { + if (true) { + checkReactTypeSpec(typeSpecs, values, location, this.getName(), null, this._debugID); + } + }, + + receiveComponent: function (nextElement, transaction, nextContext) { + var prevElement = this._currentElement; + var prevContext = this._context; + + this._pendingElement = null; + + this.updateComponent(transaction, prevElement, nextElement, prevContext, nextContext); + }, + + /** + * If any of `_pendingElement`, `_pendingStateQueue`, or `_pendingForceUpdate` + * is set, update the component. + * + * @param {ReactReconcileTransaction} transaction + * @internal + */ + performUpdateIfNecessary: function (transaction) { + if (this._pendingElement != null) { + ReactReconciler.receiveComponent(this, this._pendingElement, transaction, this._context); + } else if (this._pendingStateQueue !== null || this._pendingForceUpdate) { + this.updateComponent( + transaction, + this._currentElement, + this._currentElement, + this._context, + this._context, + ); + } else { + this._updateBatchNumber = null; + } + }, + + /** + * Perform an update to a mounted component. The componentWillReceiveProps and + * shouldComponentUpdate methods are called, then (assuming the update isn't + * skipped) the remaining update lifecycle methods are called and the DOM + * representation is updated. + * + * By default, this implements React's rendering and reconciliation algorithm. + * Sophisticated clients may wish to override this. + * + * @param {ReactReconcileTransaction} transaction + * @param {ReactElement} prevParentElement + * @param {ReactElement} nextParentElement + * @internal + * @overridable + */ + updateComponent: function ( + transaction, + prevParentElement, + nextParentElement, + prevUnmaskedContext, + nextUnmaskedContext, + ) { + var inst = this._instance; + !(inst != null) + ? true + ? invariant( + false, + 'Attempted to update component `%s` that has already been unmounted (or failed to mount).', + this.getName() || 'ReactCompositeComponent', + ) + : _prodInvariant('136', this.getName() || 'ReactCompositeComponent') + : void 0; + + var willReceive = false; + var nextContext; + + // Determine if the context has changed or not + if (this._context === nextUnmaskedContext) { + nextContext = inst.context; + } else { + nextContext = this._processContext(nextUnmaskedContext); + willReceive = true; + } + + var prevProps = prevParentElement.props; + var nextProps = nextParentElement.props; + + // Not a simple state update but a props update + if (prevParentElement !== nextParentElement) { + willReceive = true; + } + + // An update here will schedule an update but immediately set + // _pendingStateQueue which will ensure that any state updates gets + // immediately reconciled instead of waiting for the next batch. + if (willReceive && inst.componentWillReceiveProps) { + if (true) { + measureLifeCyclePerf( + function () { + return inst.componentWillReceiveProps(nextProps, nextContext); + }, + this._debugID, + 'componentWillReceiveProps', + ); + } else { + inst.componentWillReceiveProps(nextProps, nextContext); + } + } + + var nextState = this._processPendingState(nextProps, nextContext); + var shouldUpdate = true; + + if (!this._pendingForceUpdate) { + if (inst.shouldComponentUpdate) { + if (true) { + shouldUpdate = measureLifeCyclePerf( + function () { + return inst.shouldComponentUpdate(nextProps, nextState, nextContext); + }, + this._debugID, + 'shouldComponentUpdate', + ); + } else { + shouldUpdate = inst.shouldComponentUpdate(nextProps, nextState, nextContext); + } + } else { + if (this._compositeType === CompositeTypes.PureClass) { + shouldUpdate = !shallowEqual(prevProps, nextProps) || !shallowEqual(inst.state, nextState); + } + } + } + + if (true) { + true + ? warning( + shouldUpdate !== undefined, + '%s.shouldComponentUpdate(): Returned undefined instead of a ' + + 'boolean value. Make sure to return true or false.', + this.getName() || 'ReactCompositeComponent', + ) + : void 0; + } + + this._updateBatchNumber = null; + if (shouldUpdate) { + this._pendingForceUpdate = false; + // Will set `this.props`, `this.state` and `this.context`. + this._performComponentUpdate( + nextParentElement, + nextProps, + nextState, + nextContext, + transaction, + nextUnmaskedContext, + ); + } else { + // If it's determined that a component should not update, we still want + // to set props and state but we shortcut the rest of the update. + this._currentElement = nextParentElement; + this._context = nextUnmaskedContext; + inst.props = nextProps; + inst.state = nextState; + inst.context = nextContext; + } + }, + + _processPendingState: function (props, context) { + var inst = this._instance; + var queue = this._pendingStateQueue; + var replace = this._pendingReplaceState; + this._pendingReplaceState = false; + this._pendingStateQueue = null; + + if (!queue) { + return inst.state; + } + + if (replace && queue.length === 1) { + return queue[0]; + } + + var nextState = _assign({}, replace ? queue[0] : inst.state); + for (var i = replace ? 1 : 0; i < queue.length; i++) { + var partial = queue[i]; + _assign( + nextState, + typeof partial === 'function' ? partial.call(inst, nextState, props, context) : partial, + ); + } + + return nextState; + }, + + /** + * Merges new props and state, notifies delegate methods of update and + * performs update. + * + * @param {ReactElement} nextElement Next element + * @param {object} nextProps Next public object to set as properties. + * @param {?object} nextState Next object to set as state. + * @param {?object} nextContext Next public object to set as context. + * @param {ReactReconcileTransaction} transaction + * @param {?object} unmaskedContext + * @private + */ + _performComponentUpdate: function ( + nextElement, + nextProps, + nextState, + nextContext, + transaction, + unmaskedContext, + ) { + var _this2 = this; + + var inst = this._instance; + + var hasComponentDidUpdate = Boolean(inst.componentDidUpdate); + var prevProps; + var prevState; + var prevContext; + if (hasComponentDidUpdate) { + prevProps = inst.props; + prevState = inst.state; + prevContext = inst.context; + } + + if (inst.componentWillUpdate) { + if (true) { + measureLifeCyclePerf( + function () { + return inst.componentWillUpdate(nextProps, nextState, nextContext); + }, + this._debugID, + 'componentWillUpdate', + ); + } else { + inst.componentWillUpdate(nextProps, nextState, nextContext); + } + } + + this._currentElement = nextElement; + this._context = unmaskedContext; + inst.props = nextProps; + inst.state = nextState; + inst.context = nextContext; + + this._updateRenderedComponent(transaction, unmaskedContext); + + if (hasComponentDidUpdate) { + if (true) { + transaction.getReactMountReady().enqueue(function () { + measureLifeCyclePerf( + inst.componentDidUpdate.bind(inst, prevProps, prevState, prevContext), + _this2._debugID, + 'componentDidUpdate', + ); + }); + } else { + transaction + .getReactMountReady() + .enqueue(inst.componentDidUpdate.bind(inst, prevProps, prevState, prevContext), inst); + } + } + }, + + /** + * Call the component's `render` method and update the DOM accordingly. + * + * @param {ReactReconcileTransaction} transaction + * @internal + */ + _updateRenderedComponent: function (transaction, context) { + var prevComponentInstance = this._renderedComponent; + var prevRenderedElement = prevComponentInstance._currentElement; + var nextRenderedElement = this._renderValidatedComponent(); + + var debugID = 0; + if (true) { + debugID = this._debugID; + } + + if (shouldUpdateReactComponent(prevRenderedElement, nextRenderedElement)) { + ReactReconciler.receiveComponent( + prevComponentInstance, + nextRenderedElement, + transaction, + this._processChildContext(context), + ); + } else { + var oldHostNode = ReactReconciler.getHostNode(prevComponentInstance); + ReactReconciler.unmountComponent(prevComponentInstance, false); + + var nodeType = ReactNodeTypes.getType(nextRenderedElement); + this._renderedNodeType = nodeType; + var child = this._instantiateReactComponent( + nextRenderedElement, + nodeType !== ReactNodeTypes.EMPTY /* shouldHaveDebugID */, + ); + this._renderedComponent = child; + + var nextMarkup = ReactReconciler.mountComponent( + child, + transaction, + this._hostParent, + this._hostContainerInfo, + this._processChildContext(context), + debugID, + ); + + if (true) { + if (debugID !== 0) { + var childDebugIDs = child._debugID !== 0 ? [child._debugID] : []; + ReactInstrumentation.debugTool.onSetChildren(debugID, childDebugIDs); + } + } + + this._replaceNodeWithMarkup(oldHostNode, nextMarkup, prevComponentInstance); + } + }, + + /** + * Overridden in shallow rendering. + * + * @protected + */ + _replaceNodeWithMarkup: function (oldHostNode, nextMarkup, prevInstance) { + ReactComponentEnvironment.replaceNodeWithMarkup(oldHostNode, nextMarkup, prevInstance); + }, + + /** + * @protected + */ + _renderValidatedComponentWithoutOwnerOrContext: function () { + var inst = this._instance; + var renderedElement; + + if (true) { + renderedElement = measureLifeCyclePerf( + function () { + return inst.render(); + }, + this._debugID, + 'render', + ); + } else { + renderedElement = inst.render(); + } + + if (true) { + // We allow auto-mocks to proceed as if they're returning null. + if (renderedElement === undefined && inst.render._isMockFunction) { + // This is probably bad practice. Consider warning here and + // deprecating this convenience. + renderedElement = null; + } + } + + return renderedElement; + }, + + /** + * @private + */ + _renderValidatedComponent: function () { + var renderedElement; + if (true) { + ReactCurrentOwner.current = this; + try { + renderedElement = this._renderValidatedComponentWithoutOwnerOrContext(); + } finally { + ReactCurrentOwner.current = null; + } + } else { + renderedElement = this._renderValidatedComponentWithoutOwnerOrContext(); + } + !( + // TODO: An `isValidNode` function would probably be more appropriate + (renderedElement === null || renderedElement === false || React.isValidElement(renderedElement)) + ) + ? true + ? invariant( + false, + '%s.render(): A valid React element (or null) must be returned. You may have returned undefined, an array or some other invalid object.', + this.getName() || 'ReactCompositeComponent', + ) + : _prodInvariant('109', this.getName() || 'ReactCompositeComponent') + : void 0; + + return renderedElement; + }, + + /** + * Lazily allocates the refs object and stores `component` as `ref`. + * + * @param {string} ref Reference name. + * @param {component} component Component to store as `ref`. + * @final + * @private + */ + attachRef: function (ref, component) { + var inst = this.getPublicInstance(); + !(inst != null) + ? true + ? invariant(false, 'Stateless function components cannot have refs.') + : _prodInvariant('110') + : void 0; + var publicComponentInstance = component.getPublicInstance(); + if (true) { + var componentName = component && component.getName ? component.getName() : 'a component'; + true + ? warning( + publicComponentInstance != null || + component._compositeType !== CompositeTypes.StatelessFunctional, + 'Stateless function components cannot be given refs ' + + '(See ref "%s" in %s created by %s). ' + + 'Attempts to access this ref will fail.', + ref, + componentName, + this.getName(), + ) + : void 0; + } + var refs = inst.refs === emptyObject ? (inst.refs = {}) : inst.refs; + refs[ref] = publicComponentInstance; + }, + + /** + * Detaches a reference name. + * + * @param {string} ref Name to dereference. + * @final + * @private + */ + detachRef: function (ref) { + var refs = this.getPublicInstance().refs; + delete refs[ref]; + }, + + /** + * Get a text description of the component that can be used to identify it + * in error messages. + * @return {string} The name or null. + * @internal + */ + getName: function () { + var type = this._currentElement.type; + var constructor = this._instance && this._instance.constructor; + return ( + type.displayName || + (constructor && constructor.displayName) || + type.name || + (constructor && constructor.name) || + null + ); + }, + + /** + * Get the publicly accessible representation of this component - i.e. what + * is exposed by refs and returned by render. Can be null for stateless + * components. + * + * @return {ReactComponent} the public component instance. + * @internal + */ + getPublicInstance: function () { + var inst = this._instance; + if (this._compositeType === CompositeTypes.StatelessFunctional) { + return null; + } + return inst; + }, + + // Stub + _instantiateReactComponent: null, + }; + + module.exports = ReactCompositeComponent; + + /***/ + }, + /* 317 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var ReactDOMComponentFlags = { + hasCachedChildNodes: 1 << 0, + }; + + module.exports = ReactDOMComponentFlags; + + /***/ + }, + /* 318 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var validateDOMNesting = __webpack_require__(217); + + var DOC_NODE_TYPE = 9; + + function ReactDOMContainerInfo(topLevelWrapper, node) { + var info = { + _topLevelWrapper: topLevelWrapper, + _idCounter: 1, + _ownerDocument: node ? (node.nodeType === DOC_NODE_TYPE ? node : node.ownerDocument) : null, + _node: node, + _tag: node ? node.nodeName.toLowerCase() : null, + _namespaceURI: node ? node.namespaceURI : null, + }; + if (true) { + info._ancestorInfo = node ? validateDOMNesting.updatedAncestorInfo(null, info._tag, null) : null; + } + return info; + } + + module.exports = ReactDOMContainerInfo; + + /***/ + }, + /* 319 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var _assign = __webpack_require__(9); + + var LinkedValueUtils = __webpack_require__(204); + var ReactDOMComponentTree = __webpack_require__(16); + var ReactUpdates = __webpack_require__(34); + + var warning = __webpack_require__(4); + + var didWarnValueLink = false; + var didWarnValueDefaultValue = false; + + function updateOptionsIfPendingUpdateAndMounted() { + if (this._rootNodeID && this._wrapperState.pendingUpdate) { + this._wrapperState.pendingUpdate = false; + + var props = this._currentElement.props; + var value = LinkedValueUtils.getValue(props); + + if (value != null) { + updateOptions(this, Boolean(props.multiple), value); + } + } + } + + function getDeclarationErrorAddendum(owner) { + if (owner) { + var name = owner.getName(); + if (name) { + return ' Check the render method of `' + name + '`.'; + } + } + return ''; + } + + var valuePropNames = ['value', 'defaultValue']; + + /** + * Validation function for `value` and `defaultValue`. + * @private + */ + function checkSelectPropTypes(inst, props) { + var owner = inst._currentElement._owner; + LinkedValueUtils.checkPropTypes('select', props, owner); + + if (props.valueLink !== undefined && !didWarnValueLink) { + true + ? warning( + false, + '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.', + ) + : void 0; + didWarnValueLink = true; + } + + for (var i = 0; i < valuePropNames.length; i++) { + var propName = valuePropNames[i]; + if (props[propName] == null) { + continue; + } + var isArray = Array.isArray(props[propName]); + if (props.multiple && !isArray) { + true + ? warning( + false, + 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', + propName, + getDeclarationErrorAddendum(owner), + ) + : void 0; + } else if (!props.multiple && isArray) { + true + ? warning( + false, + 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', + propName, + getDeclarationErrorAddendum(owner), + ) + : void 0; + } + } + } + + /** + * @param {ReactDOMComponent} inst + * @param {boolean} multiple + * @param {*} propValue A stringable (with `multiple`, a list of stringables). + * @private + */ + function updateOptions(inst, multiple, propValue) { + var selectedValue, i; + var options = ReactDOMComponentTree.getNodeFromInstance(inst).options; + + if (multiple) { + selectedValue = {}; + for (i = 0; i < propValue.length; i++) { + selectedValue['' + propValue[i]] = true; + } + for (i = 0; i < options.length; i++) { + var selected = selectedValue.hasOwnProperty(options[i].value); + if (options[i].selected !== selected) { + options[i].selected = selected; + } + } + } else { + // Do not set `select.value` as exact behavior isn't consistent across all + // browsers for all cases. + selectedValue = '' + propValue; + for (i = 0; i < options.length; i++) { + if (options[i].value === selectedValue) { + options[i].selected = true; + return; + } + } + if (options.length) { + options[0].selected = true; + } + } + } + + /** + * Implements a <select> host component that allows optionally setting the + * props `value` and `defaultValue`. If `multiple` is false, the prop must be a + * stringable. If `multiple` is true, the prop must be an array of stringables. + * + * If `value` is not supplied (or null/undefined), user actions that change the + * selected option will trigger updates to the rendered options. + * + * If it is supplied (and not null/undefined), the rendered options will not + * update in response to user actions. Instead, the `value` prop must change in + * order for the rendered options to update. + * + * If `defaultValue` is provided, any options with the supplied values will be + * selected. + */ + var ReactDOMSelect = { + getHostProps: function (inst, props) { + return _assign({}, props, { + onChange: inst._wrapperState.onChange, + value: undefined, + }); + }, + + mountWrapper: function (inst, props) { + if (true) { + checkSelectPropTypes(inst, props); + } + + var value = LinkedValueUtils.getValue(props); + inst._wrapperState = { + pendingUpdate: false, + initialValue: value != null ? value : props.defaultValue, + listeners: null, + onChange: _handleChange.bind(inst), + wasMultiple: Boolean(props.multiple), + }; + + if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue) { + true + ? warning( + false, + 'Select elements must be either controlled or uncontrolled ' + + '(specify either the value prop, or the defaultValue prop, but not ' + + 'both). Decide between using a controlled or uncontrolled select ' + + 'element and remove one of these props. More info: ' + + 'https://fb.me/react-controlled-components', + ) + : void 0; + didWarnValueDefaultValue = true; + } + }, + + getSelectValueContext: function (inst) { + // ReactDOMOption looks at this initial value so the initial generated + // markup has correct `selected` attributes + return inst._wrapperState.initialValue; + }, + + postUpdateWrapper: function (inst) { + var props = inst._currentElement.props; + + // After the initial mount, we control selected-ness manually so don't pass + // this value down + inst._wrapperState.initialValue = undefined; + + var wasMultiple = inst._wrapperState.wasMultiple; + inst._wrapperState.wasMultiple = Boolean(props.multiple); + + var value = LinkedValueUtils.getValue(props); + if (value != null) { + inst._wrapperState.pendingUpdate = false; + updateOptions(inst, Boolean(props.multiple), value); + } else if (wasMultiple !== Boolean(props.multiple)) { + // For simplicity, reapply `defaultValue` if `multiple` is toggled. + if (props.defaultValue != null) { + updateOptions(inst, Boolean(props.multiple), props.defaultValue); + } else { + // Revert the select back to its default unselected state. + updateOptions(inst, Boolean(props.multiple), props.multiple ? [] : ''); + } + } + }, + }; + + function _handleChange(event) { + var props = this._currentElement.props; + var returnValue = LinkedValueUtils.executeOnChange(props, event); + + if (this._rootNodeID) { + this._wrapperState.pendingUpdate = true; + } + ReactUpdates.asap(updateOptionsIfPendingUpdateAndMounted, this); + return returnValue; + } + + module.exports = ReactDOMSelect; + + /***/ + }, + /* 320 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2016-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + var ReactInvalidSetStateWarningHook = __webpack_require__(780); + var ReactHostOperationHistoryHook = __webpack_require__(778); + var ReactComponentTreeHook = __webpack_require__(24); + var ExecutionEnvironment = __webpack_require__(17); + + var performanceNow = __webpack_require__(722); + var warning = __webpack_require__(4); + + var hooks = []; + var didHookThrowForEvent = {}; + + function callHook(event, fn, context, arg1, arg2, arg3, arg4, arg5) { + try { + fn.call(context, arg1, arg2, arg3, arg4, arg5); + } catch (e) { + true + ? warning( + didHookThrowForEvent[event], + 'Exception thrown by hook while handling %s: %s', + event, + e + '\n' + e.stack, + ) + : void 0; + didHookThrowForEvent[event] = true; + } + } + + function emitEvent(event, arg1, arg2, arg3, arg4, arg5) { + for (var i = 0; i < hooks.length; i++) { + var hook = hooks[i]; + var fn = hook[event]; + if (fn) { + callHook(event, fn, hook, arg1, arg2, arg3, arg4, arg5); + } + } + } + + var isProfiling = false; + var flushHistory = []; + var lifeCycleTimerStack = []; + var currentFlushNesting = 0; + var currentFlushMeasurements = []; + var currentFlushStartTime = 0; + var currentTimerDebugID = null; + var currentTimerStartTime = 0; + var currentTimerNestedFlushDuration = 0; + var currentTimerType = null; + + var lifeCycleTimerHasWarned = false; + + function clearHistory() { + ReactComponentTreeHook.purgeUnmountedComponents(); + ReactHostOperationHistoryHook.clearHistory(); + } + + function getTreeSnapshot(registeredIDs) { + return registeredIDs.reduce(function (tree, id) { + var ownerID = ReactComponentTreeHook.getOwnerID(id); + var parentID = ReactComponentTreeHook.getParentID(id); + tree[id] = { + displayName: ReactComponentTreeHook.getDisplayName(id), + text: ReactComponentTreeHook.getText(id), + updateCount: ReactComponentTreeHook.getUpdateCount(id), + childIDs: ReactComponentTreeHook.getChildIDs(id), + // Text nodes don't have owners but this is close enough. + ownerID: ownerID || (parentID && ReactComponentTreeHook.getOwnerID(parentID)) || 0, + parentID: parentID, + }; + return tree; + }, {}); + } + + function resetMeasurements() { + var previousStartTime = currentFlushStartTime; + var previousMeasurements = currentFlushMeasurements; + var previousOperations = ReactHostOperationHistoryHook.getHistory(); + + if (currentFlushNesting === 0) { + currentFlushStartTime = 0; + currentFlushMeasurements = []; + clearHistory(); + return; + } + + if (previousMeasurements.length || previousOperations.length) { + var registeredIDs = ReactComponentTreeHook.getRegisteredIDs(); + flushHistory.push({ + duration: performanceNow() - previousStartTime, + measurements: previousMeasurements || [], + operations: previousOperations || [], + treeSnapshot: getTreeSnapshot(registeredIDs), + }); + } + + clearHistory(); + currentFlushStartTime = performanceNow(); + currentFlushMeasurements = []; + } + + function checkDebugID(debugID) { + var allowRoot = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + + if (allowRoot && debugID === 0) { + return; + } + if (!debugID) { + true ? warning(false, 'ReactDebugTool: debugID may not be empty.') : void 0; + } + } + + function beginLifeCycleTimer(debugID, timerType) { + if (currentFlushNesting === 0) { + return; + } + if (currentTimerType && !lifeCycleTimerHasWarned) { + true + ? warning( + false, + 'There is an internal error in the React performance measurement code. ' + + 'Did not expect %s timer to start while %s timer is still in ' + + 'progress for %s instance.', + timerType, + currentTimerType || 'no', + debugID === currentTimerDebugID ? 'the same' : 'another', + ) + : void 0; + lifeCycleTimerHasWarned = true; + } + currentTimerStartTime = performanceNow(); + currentTimerNestedFlushDuration = 0; + currentTimerDebugID = debugID; + currentTimerType = timerType; + } + + function endLifeCycleTimer(debugID, timerType) { + if (currentFlushNesting === 0) { + return; + } + if (currentTimerType !== timerType && !lifeCycleTimerHasWarned) { + true + ? warning( + false, + 'There is an internal error in the React performance measurement code. ' + + 'We did not expect %s timer to stop while %s timer is still in ' + + 'progress for %s instance. Please report this as a bug in React.', + timerType, + currentTimerType || 'no', + debugID === currentTimerDebugID ? 'the same' : 'another', + ) + : void 0; + lifeCycleTimerHasWarned = true; + } + if (isProfiling) { + currentFlushMeasurements.push({ + timerType: timerType, + instanceID: debugID, + duration: performanceNow() - currentTimerStartTime - currentTimerNestedFlushDuration, + }); + } + currentTimerStartTime = 0; + currentTimerNestedFlushDuration = 0; + currentTimerDebugID = null; + currentTimerType = null; + } + + function pauseCurrentLifeCycleTimer() { + var currentTimer = { + startTime: currentTimerStartTime, + nestedFlushStartTime: performanceNow(), + debugID: currentTimerDebugID, + timerType: currentTimerType, + }; + lifeCycleTimerStack.push(currentTimer); + currentTimerStartTime = 0; + currentTimerNestedFlushDuration = 0; + currentTimerDebugID = null; + currentTimerType = null; + } + + function resumeCurrentLifeCycleTimer() { + var _lifeCycleTimerStack$ = lifeCycleTimerStack.pop(), + startTime = _lifeCycleTimerStack$.startTime, + nestedFlushStartTime = _lifeCycleTimerStack$.nestedFlushStartTime, + debugID = _lifeCycleTimerStack$.debugID, + timerType = _lifeCycleTimerStack$.timerType; + + var nestedFlushDuration = performanceNow() - nestedFlushStartTime; + currentTimerStartTime = startTime; + currentTimerNestedFlushDuration += nestedFlushDuration; + currentTimerDebugID = debugID; + currentTimerType = timerType; + } + + var lastMarkTimeStamp = 0; + var canUsePerformanceMeasure = + typeof performance !== 'undefined' && + typeof performance.mark === 'function' && + typeof performance.clearMarks === 'function' && + typeof performance.measure === 'function' && + typeof performance.clearMeasures === 'function'; + + function shouldMark(debugID) { + if (!isProfiling || !canUsePerformanceMeasure) { + return false; + } + var element = ReactComponentTreeHook.getElement(debugID); + if (element == null || typeof element !== 'object') { + return false; + } + var isHostElement = typeof element.type === 'string'; + if (isHostElement) { + return false; + } + return true; + } + + function markBegin(debugID, markType) { + if (!shouldMark(debugID)) { + return; + } + + var markName = debugID + '::' + markType; + lastMarkTimeStamp = performanceNow(); + performance.mark(markName); + } + + function markEnd(debugID, markType) { + if (!shouldMark(debugID)) { + return; + } + + var markName = debugID + '::' + markType; + var displayName = ReactComponentTreeHook.getDisplayName(debugID) || 'Unknown'; + + // Chrome has an issue of dropping markers recorded too fast: + // https://bugs.chromium.org/p/chromium/issues/detail?id=640652 + // To work around this, we will not report very small measurements. + // I determined the magic number by tweaking it back and forth. + // 0.05ms was enough to prevent the issue, but I set it to 0.1ms to be safe. + // When the bug is fixed, we can `measure()` unconditionally if we want to. + var timeStamp = performanceNow(); + if (timeStamp - lastMarkTimeStamp > 0.1) { + var measurementName = displayName + ' [' + markType + ']'; + performance.measure(measurementName, markName); + } + + performance.clearMarks(markName); + performance.clearMeasures(measurementName); + } + + var ReactDebugTool = { + addHook: function (hook) { + hooks.push(hook); + }, + removeHook: function (hook) { + for (var i = 0; i < hooks.length; i++) { + if (hooks[i] === hook) { + hooks.splice(i, 1); + i--; + } + } + }, + isProfiling: function () { + return isProfiling; + }, + beginProfiling: function () { + if (isProfiling) { + return; + } + + isProfiling = true; + flushHistory.length = 0; + resetMeasurements(); + ReactDebugTool.addHook(ReactHostOperationHistoryHook); + }, + endProfiling: function () { + if (!isProfiling) { + return; + } + + isProfiling = false; + resetMeasurements(); + ReactDebugTool.removeHook(ReactHostOperationHistoryHook); + }, + getFlushHistory: function () { + return flushHistory; + }, + onBeginFlush: function () { + currentFlushNesting++; + resetMeasurements(); + pauseCurrentLifeCycleTimer(); + emitEvent('onBeginFlush'); + }, + onEndFlush: function () { + resetMeasurements(); + currentFlushNesting--; + resumeCurrentLifeCycleTimer(); + emitEvent('onEndFlush'); + }, + onBeginLifeCycleTimer: function (debugID, timerType) { + checkDebugID(debugID); + emitEvent('onBeginLifeCycleTimer', debugID, timerType); + markBegin(debugID, timerType); + beginLifeCycleTimer(debugID, timerType); + }, + onEndLifeCycleTimer: function (debugID, timerType) { + checkDebugID(debugID); + endLifeCycleTimer(debugID, timerType); + markEnd(debugID, timerType); + emitEvent('onEndLifeCycleTimer', debugID, timerType); + }, + onBeginProcessingChildContext: function () { + emitEvent('onBeginProcessingChildContext'); + }, + onEndProcessingChildContext: function () { + emitEvent('onEndProcessingChildContext'); + }, + onHostOperation: function (operation) { + checkDebugID(operation.instanceID); + emitEvent('onHostOperation', operation); + }, + onSetState: function () { + emitEvent('onSetState'); + }, + onSetChildren: function (debugID, childDebugIDs) { + checkDebugID(debugID); + childDebugIDs.forEach(checkDebugID); + emitEvent('onSetChildren', debugID, childDebugIDs); + }, + onBeforeMountComponent: function (debugID, element, parentDebugID) { + checkDebugID(debugID); + checkDebugID(parentDebugID, true); + emitEvent('onBeforeMountComponent', debugID, element, parentDebugID); + markBegin(debugID, 'mount'); + }, + onMountComponent: function (debugID) { + checkDebugID(debugID); + markEnd(debugID, 'mount'); + emitEvent('onMountComponent', debugID); + }, + onBeforeUpdateComponent: function (debugID, element) { + checkDebugID(debugID); + emitEvent('onBeforeUpdateComponent', debugID, element); + markBegin(debugID, 'update'); + }, + onUpdateComponent: function (debugID) { + checkDebugID(debugID); + markEnd(debugID, 'update'); + emitEvent('onUpdateComponent', debugID); + }, + onBeforeUnmountComponent: function (debugID) { + checkDebugID(debugID); + emitEvent('onBeforeUnmountComponent', debugID); + markBegin(debugID, 'unmount'); + }, + onUnmountComponent: function (debugID) { + checkDebugID(debugID); + markEnd(debugID, 'unmount'); + emitEvent('onUnmountComponent', debugID); + }, + onTestEvent: function () { + emitEvent('onTestEvent'); + }, + }; + + // TODO remove these when RN/www gets updated + ReactDebugTool.addDevtool = ReactDebugTool.addHook; + ReactDebugTool.removeDevtool = ReactDebugTool.removeHook; + + ReactDebugTool.addHook(ReactInvalidSetStateWarningHook); + ReactDebugTool.addHook(ReactComponentTreeHook); + var url = (ExecutionEnvironment.canUseDOM && window.location.href) || ''; + if (/[?&]react_perf\b/.test(url)) { + ReactDebugTool.beginProfiling(); + } + + module.exports = ReactDebugTool; + + /***/ + }, + /* 321 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var ARIADOMPropertyConfig = __webpack_require__(748); + var BeforeInputEventPlugin = __webpack_require__(750); + var ChangeEventPlugin = __webpack_require__(752); + var DefaultEventPluginOrder = __webpack_require__(754); + var EnterLeaveEventPlugin = __webpack_require__(755); + var HTMLDOMPropertyConfig = __webpack_require__(758); + var ReactComponentBrowserEnvironment = __webpack_require__(760); + var ReactDOMComponent = __webpack_require__(761); + var ReactDOMComponentTree = __webpack_require__(16); + var ReactDOMEmptyComponent = __webpack_require__(762); + var ReactDOMTreeTraversal = __webpack_require__(773); + var ReactDOMTextComponent = __webpack_require__(771); + var ReactDefaultBatchingStrategy = __webpack_require__(207); + var ReactEventListener = __webpack_require__(777); + var ReactInjection = __webpack_require__(779); + var ReactReconcileTransaction = __webpack_require__(330); + var SVGDOMPropertyConfig = __webpack_require__(791); + var SelectEventPlugin = __webpack_require__(792); + var SimpleEventPlugin = __webpack_require__(793); + + var alreadyInjected = false; + + function inject() { + if (alreadyInjected) { + // TODO: This is currently true because these injections are shared between + // the client and the server package. They should be built independently + // and not share any injection state. Then this problem will be solved. + return; + } + alreadyInjected = true; + + ReactInjection.EventEmitter.injectReactEventListener(ReactEventListener); + + /** + * Inject modules for resolving DOM hierarchy and plugin ordering. + */ + ReactInjection.EventPluginHub.injectEventPluginOrder(DefaultEventPluginOrder); + ReactInjection.EventPluginUtils.injectComponentTree(ReactDOMComponentTree); + ReactInjection.EventPluginUtils.injectTreeTraversal(ReactDOMTreeTraversal); + + /** + * Some important event plugins included by default (without having to require + * them). + */ + ReactInjection.EventPluginHub.injectEventPluginsByName({ + SimpleEventPlugin: SimpleEventPlugin, + EnterLeaveEventPlugin: EnterLeaveEventPlugin, + ChangeEventPlugin: ChangeEventPlugin, + SelectEventPlugin: SelectEventPlugin, + BeforeInputEventPlugin: BeforeInputEventPlugin, + }); + + ReactInjection.HostComponent.injectGenericComponentClass(ReactDOMComponent); + + ReactInjection.HostComponent.injectTextComponentClass(ReactDOMTextComponent); + + ReactInjection.DOMProperty.injectDOMPropertyConfig(ARIADOMPropertyConfig); + ReactInjection.DOMProperty.injectDOMPropertyConfig(HTMLDOMPropertyConfig); + ReactInjection.DOMProperty.injectDOMPropertyConfig(SVGDOMPropertyConfig); + + ReactInjection.EmptyComponent.injectEmptyComponentFactory(function (instantiate) { + return new ReactDOMEmptyComponent(instantiate); + }); + + ReactInjection.Updates.injectReconcileTransaction(ReactReconcileTransaction); + ReactInjection.Updates.injectBatchingStrategy(ReactDefaultBatchingStrategy); + + ReactInjection.Component.injectEnvironment(ReactComponentBrowserEnvironment); + } + + module.exports = { + inject: inject, + }; + + /***/ + }, + /* 322 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2014-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var emptyComponentFactory; + + var ReactEmptyComponentInjection = { + injectEmptyComponentFactory: function (factory) { + emptyComponentFactory = factory; + }, + }; + + var ReactEmptyComponent = { + create: function (instantiate) { + return emptyComponentFactory(instantiate); + }, + }; + + ReactEmptyComponent.injection = ReactEmptyComponentInjection; + + module.exports = ReactEmptyComponent; + + /***/ + }, + /* 323 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + var ReactFeatureFlags = { + // When true, call console.time() before and .timeEnd() after each top-level + // render (both initial renders and updates). Useful when looking at prod-mode + // timeline profiles in Chrome, for example. + logTopLevelRenders: false, + }; + + module.exports = ReactFeatureFlags; + + /***/ + }, + /* 324 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2014-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var _prodInvariant = __webpack_require__(7); + + var invariant = __webpack_require__(3); + + var genericComponentClass = null; + var textComponentClass = null; + + var ReactHostComponentInjection = { + // This accepts a class that receives the tag string. This is a catch all + // that can render any kind of tag. + injectGenericComponentClass: function (componentClass) { + genericComponentClass = componentClass; + }, + // This accepts a text component class that takes the text string to be + // rendered as props. + injectTextComponentClass: function (componentClass) { + textComponentClass = componentClass; + }, + }; + + /** + * Get a host internal component class for a specific tag. + * + * @param {ReactElement} element The element to create. + * @return {function} The internal class constructor function. + */ + function createInternalComponent(element) { + !genericComponentClass + ? true + ? invariant(false, 'There is no registered component for the tag %s', element.type) + : _prodInvariant('111', element.type) + : void 0; + return new genericComponentClass(element); + } + + /** + * @param {ReactText} text + * @return {ReactComponent} + */ + function createInstanceForText(text) { + return new textComponentClass(text); + } + + /** + * @param {ReactComponent} component + * @return {boolean} + */ + function isTextComponent(component) { + return component instanceof textComponentClass; + } + + var ReactHostComponent = { + createInternalComponent: createInternalComponent, + createInstanceForText: createInstanceForText, + isTextComponent: isTextComponent, + injection: ReactHostComponentInjection, + }; + + module.exports = ReactHostComponent; + + /***/ + }, + /* 325 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var ReactDOMSelection = __webpack_require__(769); + + var containsNode = __webpack_require__(711); + var focusNode = __webpack_require__(302); + var getActiveElement = __webpack_require__(303); + + function isInDocument(node) { + return containsNode(document.documentElement, node); + } + + /** + * @ReactInputSelection: React input selection module. Based on Selection.js, + * but modified to be suitable for react and has a couple of bug fixes (doesn't + * assume buttons have range selections allowed). + * Input selection module for React. + */ + var ReactInputSelection = { + hasSelectionCapabilities: function (elem) { + var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase(); + return ( + nodeName && + ((nodeName === 'input' && elem.type === 'text') || + nodeName === 'textarea' || + elem.contentEditable === 'true') + ); + }, + + getSelectionInformation: function () { + var focusedElem = getActiveElement(); + return { + focusedElem: focusedElem, + selectionRange: ReactInputSelection.hasSelectionCapabilities(focusedElem) + ? ReactInputSelection.getSelection(focusedElem) + : null, + }; + }, + + /** + * @restoreSelection: If any selection information was potentially lost, + * restore it. This is useful when performing operations that could remove dom + * nodes and place them back in, resulting in focus being lost. + */ + restoreSelection: function (priorSelectionInformation) { + var curFocusedElem = getActiveElement(); + var priorFocusedElem = priorSelectionInformation.focusedElem; + var priorSelectionRange = priorSelectionInformation.selectionRange; + if (curFocusedElem !== priorFocusedElem && isInDocument(priorFocusedElem)) { + if (ReactInputSelection.hasSelectionCapabilities(priorFocusedElem)) { + ReactInputSelection.setSelection(priorFocusedElem, priorSelectionRange); + } + focusNode(priorFocusedElem); + } + }, + + /** + * @getSelection: Gets the selection bounds of a focused textarea, input or + * contentEditable node. + * -@input: Look up selection bounds of this input + * -@return {start: selectionStart, end: selectionEnd} + */ + getSelection: function (input) { + var selection; + + if ('selectionStart' in input) { + // Modern browser with input or textarea. + selection = { + start: input.selectionStart, + end: input.selectionEnd, + }; + } else if (document.selection && input.nodeName && input.nodeName.toLowerCase() === 'input') { + // IE8 input. + var range = document.selection.createRange(); + // There can only be one selection per document in IE, so it must + // be in our element. + if (range.parentElement() === input) { + selection = { + start: -range.moveStart('character', -input.value.length), + end: -range.moveEnd('character', -input.value.length), + }; + } + } else { + // Content editable or old IE textarea. + selection = ReactDOMSelection.getOffsets(input); + } + + return selection || { start: 0, end: 0 }; + }, + + /** + * @setSelection: Sets the selection bounds of a textarea or input and focuses + * the input. + * -@input Set selection bounds of this input or textarea + * -@offsets Object of same form that is returned from get* + */ + setSelection: function (input, offsets) { + var start = offsets.start; + var end = offsets.end; + if (end === undefined) { + end = start; + } + + if ('selectionStart' in input) { + input.selectionStart = start; + input.selectionEnd = Math.min(end, input.value.length); + } else if (document.selection && input.nodeName && input.nodeName.toLowerCase() === 'input') { + var range = input.createTextRange(); + range.collapse(true); + range.moveStart('character', start); + range.moveEnd('character', end - start); + range.select(); + } else { + ReactDOMSelection.setOffsets(input, offsets); + } + }, + }; + + module.exports = ReactInputSelection; + + /***/ + }, + /* 326 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var adler32 = __webpack_require__(804); + + var TAG_END = /\/?>/; + var COMMENT_START = /^<\!\-\-/; + + var ReactMarkupChecksum = { + CHECKSUM_ATTR_NAME: 'data-react-checksum', + + /** + * @param {string} markup Markup string + * @return {string} Markup string with checksum attribute attached + */ + addChecksumToMarkup: function (markup) { + var checksum = adler32(markup); + + // Add checksum (handle both parent tags, comments and self-closing tags) + if (COMMENT_START.test(markup)) { + return markup; + } else { + return markup.replace( + TAG_END, + ' ' + ReactMarkupChecksum.CHECKSUM_ATTR_NAME + '="' + checksum + '"$&', + ); + } + }, + + /** + * @param {string} markup to use + * @param {DOMElement} element root React element + * @returns {boolean} whether or not the markup is the same + */ + canReuseMarkup: function (markup, element) { + var existingChecksum = element.getAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME); + existingChecksum = existingChecksum && parseInt(existingChecksum, 10); + var markupChecksum = adler32(markup); + return markupChecksum === existingChecksum; + }, + }; + + module.exports = ReactMarkupChecksum; + + /***/ + }, + /* 327 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var _prodInvariant = __webpack_require__(7); + + var DOMLazyTree = __webpack_require__(102); + var DOMProperty = __webpack_require__(68); + var React = __webpack_require__(38); + var ReactBrowserEventEmitter = __webpack_require__(124); + var ReactCurrentOwner = __webpack_require__(53); + var ReactDOMComponentTree = __webpack_require__(16); + var ReactDOMContainerInfo = __webpack_require__(318); + var ReactDOMFeatureFlags = __webpack_require__(763); + var ReactFeatureFlags = __webpack_require__(323); + var ReactInstanceMap = __webpack_require__(105); + var ReactInstrumentation = __webpack_require__(33); + var ReactMarkupChecksum = __webpack_require__(326); + var ReactReconciler = __webpack_require__(69); + var ReactUpdateQueue = __webpack_require__(209); + var ReactUpdates = __webpack_require__(34); + + var emptyObject = __webpack_require__(66); + var instantiateReactComponent = __webpack_require__(214); + var invariant = __webpack_require__(3); + var setInnerHTML = __webpack_require__(151); + var shouldUpdateReactComponent = __webpack_require__(216); + var warning = __webpack_require__(4); + + var ATTR_NAME = DOMProperty.ID_ATTRIBUTE_NAME; + var ROOT_ATTR_NAME = DOMProperty.ROOT_ATTRIBUTE_NAME; + + var ELEMENT_NODE_TYPE = 1; + var DOC_NODE_TYPE = 9; + var DOCUMENT_FRAGMENT_NODE_TYPE = 11; + + var instancesByReactRootID = {}; + + /** + * Finds the index of the first character + * that's not common between the two given strings. + * + * @return {number} the index of the character where the strings diverge + */ + function firstDifferenceIndex(string1, string2) { + var minLen = Math.min(string1.length, string2.length); + for (var i = 0; i < minLen; i++) { + if (string1.charAt(i) !== string2.charAt(i)) { + return i; + } + } + return string1.length === string2.length ? -1 : minLen; + } + + /** + * @param {DOMElement|DOMDocument} container DOM element that may contain + * a React component + * @return {?*} DOM element that may have the reactRoot ID, or null. + */ + function getReactRootElementInContainer(container) { + if (!container) { + return null; + } + + if (container.nodeType === DOC_NODE_TYPE) { + return container.documentElement; + } else { + return container.firstChild; + } + } + + function internalGetID(node) { + // If node is something like a window, document, or text node, none of + // which support attributes or a .getAttribute method, gracefully return + // the empty string, as if the attribute were missing. + return (node.getAttribute && node.getAttribute(ATTR_NAME)) || ''; + } + + /** + * Mounts this component and inserts it into the DOM. + * + * @param {ReactComponent} componentInstance The instance to mount. + * @param {DOMElement} container DOM element to mount into. + * @param {ReactReconcileTransaction} transaction + * @param {boolean} shouldReuseMarkup If true, do not insert markup + */ + function mountComponentIntoNode(wrapperInstance, container, transaction, shouldReuseMarkup, context) { + var markerName; + if (ReactFeatureFlags.logTopLevelRenders) { + var wrappedElement = wrapperInstance._currentElement.props.child; + var type = wrappedElement.type; + markerName = 'React mount: ' + (typeof type === 'string' ? type : type.displayName || type.name); + console.time(markerName); + } + + var markup = ReactReconciler.mountComponent( + wrapperInstance, + transaction, + null, + ReactDOMContainerInfo(wrapperInstance, container), + context, + 0 /* parentDebugID */, + ); + + if (markerName) { + console.timeEnd(markerName); + } + + wrapperInstance._renderedComponent._topLevelWrapper = wrapperInstance; + ReactMount._mountImageIntoNode(markup, container, wrapperInstance, shouldReuseMarkup, transaction); + } + + /** + * Batched mount. + * + * @param {ReactComponent} componentInstance The instance to mount. + * @param {DOMElement} container DOM element to mount into. + * @param {boolean} shouldReuseMarkup If true, do not insert markup + */ + function batchedMountComponentIntoNode(componentInstance, container, shouldReuseMarkup, context) { + var transaction = ReactUpdates.ReactReconcileTransaction.getPooled( + /* useCreateElement */ + !shouldReuseMarkup && ReactDOMFeatureFlags.useCreateElement, + ); + transaction.perform( + mountComponentIntoNode, + null, + componentInstance, + container, + transaction, + shouldReuseMarkup, + context, + ); + ReactUpdates.ReactReconcileTransaction.release(transaction); + } + + /** + * Unmounts a component and removes it from the DOM. + * + * @param {ReactComponent} instance React component instance. + * @param {DOMElement} container DOM element to unmount from. + * @final + * @internal + * @see {ReactMount.unmountComponentAtNode} + */ + function unmountComponentFromNode(instance, container, safely) { + if (true) { + ReactInstrumentation.debugTool.onBeginFlush(); + } + ReactReconciler.unmountComponent(instance, safely); + if (true) { + ReactInstrumentation.debugTool.onEndFlush(); + } + + if (container.nodeType === DOC_NODE_TYPE) { + container = container.documentElement; + } + + // http://jsperf.com/emptying-a-node + while (container.lastChild) { + container.removeChild(container.lastChild); + } + } + + /** + * True if the supplied DOM node has a direct React-rendered child that is + * not a React root element. Useful for warning in `render`, + * `unmountComponentAtNode`, etc. + * + * @param {?DOMElement} node The candidate DOM node. + * @return {boolean} True if the DOM element contains a direct child that was + * rendered by React but is not a root element. + * @internal + */ + function hasNonRootReactChild(container) { + var rootEl = getReactRootElementInContainer(container); + if (rootEl) { + var inst = ReactDOMComponentTree.getInstanceFromNode(rootEl); + return !!(inst && inst._hostParent); + } + } + + /** + * True if the supplied DOM node is a React DOM element and + * it has been rendered by another copy of React. + * + * @param {?DOMElement} node The candidate DOM node. + * @return {boolean} True if the DOM has been rendered by another copy of React + * @internal + */ + function nodeIsRenderedByOtherInstance(container) { + var rootEl = getReactRootElementInContainer(container); + return !!(rootEl && isReactNode(rootEl) && !ReactDOMComponentTree.getInstanceFromNode(rootEl)); + } + + /** + * True if the supplied DOM node is a valid node element. + * + * @param {?DOMElement} node The candidate DOM node. + * @return {boolean} True if the DOM is a valid DOM node. + * @internal + */ + function isValidContainer(node) { + return !!( + node && + (node.nodeType === ELEMENT_NODE_TYPE || + node.nodeType === DOC_NODE_TYPE || + node.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE) + ); + } + + /** + * True if the supplied DOM node is a valid React node element. + * + * @param {?DOMElement} node The candidate DOM node. + * @return {boolean} True if the DOM is a valid React DOM node. + * @internal + */ + function isReactNode(node) { + return isValidContainer(node) && (node.hasAttribute(ROOT_ATTR_NAME) || node.hasAttribute(ATTR_NAME)); + } + + function getHostRootInstanceInContainer(container) { + var rootEl = getReactRootElementInContainer(container); + var prevHostInstance = rootEl && ReactDOMComponentTree.getInstanceFromNode(rootEl); + return prevHostInstance && !prevHostInstance._hostParent ? prevHostInstance : null; + } + + function getTopLevelWrapperInContainer(container) { + var root = getHostRootInstanceInContainer(container); + return root ? root._hostContainerInfo._topLevelWrapper : null; + } + + /** + * Temporary (?) hack so that we can store all top-level pending updates on + * composites instead of having to worry about different types of components + * here. + */ + var topLevelRootCounter = 1; + var TopLevelWrapper = function () { + this.rootID = topLevelRootCounter++; + }; + TopLevelWrapper.prototype.isReactComponent = {}; + if (true) { + TopLevelWrapper.displayName = 'TopLevelWrapper'; + } + TopLevelWrapper.prototype.render = function () { + return this.props.child; + }; + TopLevelWrapper.isReactTopLevelWrapper = true; + + /** + * Mounting is the process of initializing a React component by creating its + * representative DOM elements and inserting them into a supplied `container`. + * Any prior content inside `container` is destroyed in the process. + * + * ReactMount.render( + * component, + * document.getElementById('container') + * ); + * + * <div id="container"> <-- Supplied `container`. + * <div data-reactid=".3"> <-- Rendered reactRoot of React + * // ... component. + * </div> + * </div> + * + * Inside of `container`, the first element rendered is the "reactRoot". + */ + var ReactMount = { + TopLevelWrapper: TopLevelWrapper, + + /** + * Used by devtools. The keys are not important. + */ + _instancesByReactRootID: instancesByReactRootID, + + /** + * This is a hook provided to support rendering React components while + * ensuring that the apparent scroll position of its `container` does not + * change. + * + * @param {DOMElement} container The `container` being rendered into. + * @param {function} renderCallback This must be called once to do the render. + */ + scrollMonitor: function (container, renderCallback) { + renderCallback(); + }, + + /** + * Take a component that's already mounted into the DOM and replace its props + * @param {ReactComponent} prevComponent component instance already in the DOM + * @param {ReactElement} nextElement component instance to render + * @param {DOMElement} container container to render into + * @param {?function} callback function triggered on completion + */ + _updateRootComponent: function (prevComponent, nextElement, nextContext, container, callback) { + ReactMount.scrollMonitor(container, function () { + ReactUpdateQueue.enqueueElementInternal(prevComponent, nextElement, nextContext); + if (callback) { + ReactUpdateQueue.enqueueCallbackInternal(prevComponent, callback); + } + }); + + return prevComponent; + }, + + /** + * Render a new component into the DOM. Hooked by hooks! + * + * @param {ReactElement} nextElement element to render + * @param {DOMElement} container container to render into + * @param {boolean} shouldReuseMarkup if we should skip the markup insertion + * @return {ReactComponent} nextComponent + */ + _renderNewRootComponent: function (nextElement, container, shouldReuseMarkup, context) { + // Various parts of our code (such as ReactCompositeComponent's + // _renderValidatedComponent) assume that calls to render aren't nested; + // verify that that's the case. + true + ? warning( + ReactCurrentOwner.current == null, + '_renderNewRootComponent(): Render methods should be a pure function ' + + 'of props and state; triggering nested component updates from ' + + 'render is not allowed. If necessary, trigger nested updates in ' + + 'componentDidUpdate. Check the render method of %s.', + (ReactCurrentOwner.current && ReactCurrentOwner.current.getName()) || + 'ReactCompositeComponent', + ) + : void 0; + + !isValidContainer(container) + ? true + ? invariant(false, '_registerComponent(...): Target container is not a DOM element.') + : _prodInvariant('37') + : void 0; + + ReactBrowserEventEmitter.ensureScrollValueMonitoring(); + var componentInstance = instantiateReactComponent(nextElement, false); + + // The initial render is synchronous but any updates that happen during + // rendering, in componentWillMount or componentDidMount, will be batched + // according to the current batching strategy. + + ReactUpdates.batchedUpdates( + batchedMountComponentIntoNode, + componentInstance, + container, + shouldReuseMarkup, + context, + ); + + var wrapperID = componentInstance._instance.rootID; + instancesByReactRootID[wrapperID] = componentInstance; + + return componentInstance; + }, + + /** + * Renders a React component into the DOM in the supplied `container`. + * + * If the React component was previously rendered into `container`, this will + * perform an update on it and only mutate the DOM as necessary to reflect the + * latest React component. + * + * @param {ReactComponent} parentComponent The conceptual parent of this render tree. + * @param {ReactElement} nextElement Component element to render. + * @param {DOMElement} container DOM element to render into. + * @param {?function} callback function triggered on completion + * @return {ReactComponent} Component instance rendered in `container`. + */ + renderSubtreeIntoContainer: function (parentComponent, nextElement, container, callback) { + !(parentComponent != null && ReactInstanceMap.has(parentComponent)) + ? true + ? invariant(false, 'parentComponent must be a valid React Component') + : _prodInvariant('38') + : void 0; + return ReactMount._renderSubtreeIntoContainer(parentComponent, nextElement, container, callback); + }, + + _renderSubtreeIntoContainer: function (parentComponent, nextElement, container, callback) { + ReactUpdateQueue.validateCallback(callback, 'ReactDOM.render'); + !React.isValidElement(nextElement) + ? true + ? invariant( + false, + 'ReactDOM.render(): Invalid component element.%s', + typeof nextElement === 'string' + ? " Instead of passing a string like 'div', pass " + + "React.createElement('div') or <div />." + : typeof nextElement === 'function' + ? ' Instead of passing a class like Foo, pass ' + 'React.createElement(Foo) or <Foo />.' + : // Check if it quacks like an element + nextElement != null && nextElement.props !== undefined + ? ' This may be caused by unintentionally loading two independent ' + + 'copies of React.' + : '', + ) + : _prodInvariant( + '39', + typeof nextElement === 'string' + ? " Instead of passing a string like 'div', pass " + + "React.createElement('div') or <div />." + : typeof nextElement === 'function' + ? ' Instead of passing a class like Foo, pass ' + 'React.createElement(Foo) or <Foo />.' + : nextElement != null && nextElement.props !== undefined + ? ' This may be caused by unintentionally loading two independent ' + + 'copies of React.' + : '', + ) + : void 0; + + true + ? warning( + !container || !container.tagName || container.tagName.toUpperCase() !== 'BODY', + 'render(): Rendering components directly into document.body is ' + + 'discouraged, since its children are often manipulated by third-party ' + + 'scripts and browser extensions. This may lead to subtle ' + + 'reconciliation issues. Try rendering into a container element created ' + + 'for your app.', + ) + : void 0; + + var nextWrappedElement = React.createElement(TopLevelWrapper, { child: nextElement }); + + var nextContext; + if (parentComponent) { + var parentInst = ReactInstanceMap.get(parentComponent); + nextContext = parentInst._processChildContext(parentInst._context); + } else { + nextContext = emptyObject; + } + + var prevComponent = getTopLevelWrapperInContainer(container); + + if (prevComponent) { + var prevWrappedElement = prevComponent._currentElement; + var prevElement = prevWrappedElement.props.child; + if (shouldUpdateReactComponent(prevElement, nextElement)) { + var publicInst = prevComponent._renderedComponent.getPublicInstance(); + var updatedCallback = + callback && + function () { + callback.call(publicInst); + }; + ReactMount._updateRootComponent( + prevComponent, + nextWrappedElement, + nextContext, + container, + updatedCallback, + ); + return publicInst; + } else { + ReactMount.unmountComponentAtNode(container); + } + } + + var reactRootElement = getReactRootElementInContainer(container); + var containerHasReactMarkup = reactRootElement && !!internalGetID(reactRootElement); + var containerHasNonRootReactChild = hasNonRootReactChild(container); + + if (true) { + true + ? warning( + !containerHasNonRootReactChild, + 'render(...): Replacing React-rendered children with a new root ' + + 'component. If you intended to update the children of this node, ' + + 'you should instead have the existing children update their state ' + + 'and render the new components instead of calling ReactDOM.render.', + ) + : void 0; + + if (!containerHasReactMarkup || reactRootElement.nextSibling) { + var rootElementSibling = reactRootElement; + while (rootElementSibling) { + if (internalGetID(rootElementSibling)) { + true + ? warning( + false, + 'render(): Target node has markup rendered by React, but there ' + + 'are unrelated nodes as well. This is most commonly caused by ' + + 'white-space inserted around server-rendered markup.', + ) + : void 0; + break; + } + rootElementSibling = rootElementSibling.nextSibling; + } + } + } + + var shouldReuseMarkup = containerHasReactMarkup && !prevComponent && !containerHasNonRootReactChild; + var component = ReactMount._renderNewRootComponent( + nextWrappedElement, + container, + shouldReuseMarkup, + nextContext, + )._renderedComponent.getPublicInstance(); + if (callback) { + callback.call(component); + } + return component; + }, + + /** + * Renders a React component into the DOM in the supplied `container`. + * See https://facebook.github.io/react/docs/top-level-api.html#reactdom.render + * + * If the React component was previously rendered into `container`, this will + * perform an update on it and only mutate the DOM as necessary to reflect the + * latest React component. + * + * @param {ReactElement} nextElement Component element to render. + * @param {DOMElement} container DOM element to render into. + * @param {?function} callback function triggered on completion + * @return {ReactComponent} Component instance rendered in `container`. + */ + render: function (nextElement, container, callback) { + return ReactMount._renderSubtreeIntoContainer(null, nextElement, container, callback); + }, + + /** + * Unmounts and destroys the React component rendered in the `container`. + * See https://facebook.github.io/react/docs/top-level-api.html#reactdom.unmountcomponentatnode + * + * @param {DOMElement} container DOM element containing a React component. + * @return {boolean} True if a component was found in and unmounted from + * `container` + */ + unmountComponentAtNode: function (container) { + // Various parts of our code (such as ReactCompositeComponent's + // _renderValidatedComponent) assume that calls to render aren't nested; + // verify that that's the case. (Strictly speaking, unmounting won't cause a + // render but we still don't expect to be in a render call here.) + true + ? warning( + ReactCurrentOwner.current == null, + 'unmountComponentAtNode(): Render methods should be a pure function ' + + 'of props and state; triggering nested component updates from render ' + + 'is not allowed. If necessary, trigger nested updates in ' + + 'componentDidUpdate. Check the render method of %s.', + (ReactCurrentOwner.current && ReactCurrentOwner.current.getName()) || + 'ReactCompositeComponent', + ) + : void 0; + + !isValidContainer(container) + ? true + ? invariant(false, 'unmountComponentAtNode(...): Target container is not a DOM element.') + : _prodInvariant('40') + : void 0; + + if (true) { + true + ? warning( + !nodeIsRenderedByOtherInstance(container), + "unmountComponentAtNode(): The node you're attempting to unmount " + + 'was rendered by another copy of React.', + ) + : void 0; + } + + var prevComponent = getTopLevelWrapperInContainer(container); + if (!prevComponent) { + // Check if the node being unmounted was rendered by React, but isn't a + // root node. + var containerHasNonRootReactChild = hasNonRootReactChild(container); + + // Check if the container itself is a React root node. + var isContainerReactRoot = container.nodeType === 1 && container.hasAttribute(ROOT_ATTR_NAME); + + if (true) { + true + ? warning( + !containerHasNonRootReactChild, + "unmountComponentAtNode(): The node you're attempting to unmount " + + 'was rendered by React and is not a top-level container. %s', + isContainerReactRoot + ? 'You may have accidentally passed in a React root node instead ' + 'of its container.' + : 'Instead, have the parent component update its state and ' + + 'rerender in order to remove this component.', + ) + : void 0; + } + + return false; + } + delete instancesByReactRootID[prevComponent._instance.rootID]; + ReactUpdates.batchedUpdates(unmountComponentFromNode, prevComponent, container, false); + return true; + }, + + _mountImageIntoNode: function (markup, container, instance, shouldReuseMarkup, transaction) { + !isValidContainer(container) + ? true + ? invariant(false, 'mountComponentIntoNode(...): Target container is not valid.') + : _prodInvariant('41') + : void 0; + + if (shouldReuseMarkup) { + var rootElement = getReactRootElementInContainer(container); + if (ReactMarkupChecksum.canReuseMarkup(markup, rootElement)) { + ReactDOMComponentTree.precacheNode(instance, rootElement); + return; + } else { + var checksum = rootElement.getAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME); + rootElement.removeAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME); + + var rootMarkup = rootElement.outerHTML; + rootElement.setAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME, checksum); + + var normalizedMarkup = markup; + if (true) { + // because rootMarkup is retrieved from the DOM, various normalizations + // will have occurred which will not be present in `markup`. Here, + // insert markup into a <div> or <iframe> depending on the container + // type to perform the same normalizations before comparing. + var normalizer; + if (container.nodeType === ELEMENT_NODE_TYPE) { + normalizer = document.createElement('div'); + normalizer.innerHTML = markup; + normalizedMarkup = normalizer.innerHTML; + } else { + normalizer = document.createElement('iframe'); + document.body.appendChild(normalizer); + normalizer.contentDocument.write(markup); + normalizedMarkup = normalizer.contentDocument.documentElement.outerHTML; + document.body.removeChild(normalizer); + } + } + + var diffIndex = firstDifferenceIndex(normalizedMarkup, rootMarkup); + var difference = + ' (client) ' + + normalizedMarkup.substring(diffIndex - 20, diffIndex + 20) + + '\n (server) ' + + rootMarkup.substring(diffIndex - 20, diffIndex + 20); + + !(container.nodeType !== DOC_NODE_TYPE) + ? true + ? invariant( + false, + "You're trying to render a component to the document using server rendering but the checksum was invalid. This usually means you rendered a different component type or props on the client from the one on the server, or your render() methods are impure. React cannot handle this case due to cross-browser quirks by rendering at the document root. You should look for environment dependent code in your components and ensure the props are the same client and server side:\n%s", + difference, + ) + : _prodInvariant('42', difference) + : void 0; + + if (true) { + true + ? warning( + false, + 'React attempted to reuse markup in a container but the ' + + 'checksum was invalid. This generally means that you are ' + + 'using server rendering and the markup generated on the ' + + 'server was not what the client was expecting. React injected ' + + 'new markup to compensate which works but you have lost many ' + + 'of the benefits of server rendering. Instead, figure out ' + + 'why the markup being generated is different on the client ' + + 'or server:\n%s', + difference, + ) + : void 0; + } + } + } + + !(container.nodeType !== DOC_NODE_TYPE) + ? true + ? invariant( + false, + "You're trying to render a component to the document but you didn't use server rendering. We can't do this without using server rendering due to cross-browser quirks. See ReactDOMServer.renderToString() for server rendering.", + ) + : _prodInvariant('43') + : void 0; + + if (transaction.useCreateElement) { + while (container.lastChild) { + container.removeChild(container.lastChild); + } + DOMLazyTree.insertTreeBefore(container, markup, null); + } else { + setInnerHTML(container, markup); + ReactDOMComponentTree.precacheNode(instance, container.firstChild); + } + + if (true) { + var hostNode = ReactDOMComponentTree.getInstanceFromNode(container.firstChild); + if (hostNode._debugID !== 0) { + ReactInstrumentation.debugTool.onHostOperation({ + instanceID: hostNode._debugID, + type: 'mount', + payload: markup.toString(), + }); + } + } + }, + }; + + module.exports = ReactMount; + + /***/ + }, + /* 328 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + var _prodInvariant = __webpack_require__(7); + + var React = __webpack_require__(38); + + var invariant = __webpack_require__(3); + + var ReactNodeTypes = { + HOST: 0, + COMPOSITE: 1, + EMPTY: 2, + + getType: function (node) { + if (node === null || node === false) { + return ReactNodeTypes.EMPTY; + } else if (React.isValidElement(node)) { + if (typeof node.type === 'function') { + return ReactNodeTypes.COMPOSITE; + } else { + return ReactNodeTypes.HOST; + } + } + true ? (true ? invariant(false, 'Unexpected node: %s', node) : _prodInvariant('26', node)) : void 0; + }, + }; + + module.exports = ReactNodeTypes; + + /***/ + }, + /* 329 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; + + module.exports = ReactPropTypesSecret; + + /***/ + }, + /* 330 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var _assign = __webpack_require__(9); + + var CallbackQueue = __webpack_require__(314); + var PooledClass = __webpack_require__(85); + var ReactBrowserEventEmitter = __webpack_require__(124); + var ReactInputSelection = __webpack_require__(325); + var ReactInstrumentation = __webpack_require__(33); + var Transaction = __webpack_require__(149); + var ReactUpdateQueue = __webpack_require__(209); + + /** + * Ensures that, when possible, the selection range (currently selected text + * input) is not disturbed by performing the transaction. + */ + var SELECTION_RESTORATION = { + /** + * @return {Selection} Selection information. + */ + initialize: ReactInputSelection.getSelectionInformation, + /** + * @param {Selection} sel Selection information returned from `initialize`. + */ + close: ReactInputSelection.restoreSelection, + }; + + /** + * Suppresses events (blur/focus) that could be inadvertently dispatched due to + * high level DOM manipulations (like temporarily removing a text input from the + * DOM). + */ + var EVENT_SUPPRESSION = { + /** + * @return {boolean} The enabled status of `ReactBrowserEventEmitter` before + * the reconciliation. + */ + initialize: function () { + var currentlyEnabled = ReactBrowserEventEmitter.isEnabled(); + ReactBrowserEventEmitter.setEnabled(false); + return currentlyEnabled; + }, + + /** + * @param {boolean} previouslyEnabled Enabled status of + * `ReactBrowserEventEmitter` before the reconciliation occurred. `close` + * restores the previous value. + */ + close: function (previouslyEnabled) { + ReactBrowserEventEmitter.setEnabled(previouslyEnabled); + }, + }; + + /** + * Provides a queue for collecting `componentDidMount` and + * `componentDidUpdate` callbacks during the transaction. + */ + var ON_DOM_READY_QUEUEING = { + /** + * Initializes the internal `onDOMReady` queue. + */ + initialize: function () { + this.reactMountReady.reset(); + }, + + /** + * After DOM is flushed, invoke all registered `onDOMReady` callbacks. + */ + close: function () { + this.reactMountReady.notifyAll(); + }, + }; + + /** + * Executed within the scope of the `Transaction` instance. Consider these as + * being member methods, but with an implied ordering while being isolated from + * each other. + */ + var TRANSACTION_WRAPPERS = [SELECTION_RESTORATION, EVENT_SUPPRESSION, ON_DOM_READY_QUEUEING]; + + if (true) { + TRANSACTION_WRAPPERS.push({ + initialize: ReactInstrumentation.debugTool.onBeginFlush, + close: ReactInstrumentation.debugTool.onEndFlush, + }); + } + + /** + * Currently: + * - The order that these are listed in the transaction is critical: + * - Suppresses events. + * - Restores selection range. + * + * Future: + * - Restore document/overflow scroll positions that were unintentionally + * modified via DOM insertions above the top viewport boundary. + * - Implement/integrate with customized constraint based layout system and keep + * track of which dimensions must be remeasured. + * + * @class ReactReconcileTransaction + */ + function ReactReconcileTransaction(useCreateElement) { + this.reinitializeTransaction(); + // Only server-side rendering really needs this option (see + // `ReactServerRendering`), but server-side uses + // `ReactServerRenderingTransaction` instead. This option is here so that it's + // accessible and defaults to false when `ReactDOMComponent` and + // `ReactDOMTextComponent` checks it in `mountComponent`.` + this.renderToStaticMarkup = false; + this.reactMountReady = CallbackQueue.getPooled(null); + this.useCreateElement = useCreateElement; + } + + var Mixin = { + /** + * @see Transaction + * @abstract + * @final + * @return {array<object>} List of operation wrap procedures. + * TODO: convert to array<TransactionWrapper> + */ + getTransactionWrappers: function () { + return TRANSACTION_WRAPPERS; + }, + + /** + * @return {object} The queue to collect `onDOMReady` callbacks with. + */ + getReactMountReady: function () { + return this.reactMountReady; + }, + + /** + * @return {object} The queue to collect React async events. + */ + getUpdateQueue: function () { + return ReactUpdateQueue; + }, + + /** + * Save current transaction state -- if the return value from this method is + * passed to `rollback`, the transaction will be reset to that state. + */ + checkpoint: function () { + // reactMountReady is the our only stateful wrapper + return this.reactMountReady.checkpoint(); + }, + + rollback: function (checkpoint) { + this.reactMountReady.rollback(checkpoint); + }, + + /** + * `PooledClass` looks for this, and will invoke this before allowing this + * instance to be reused. + */ + destructor: function () { + CallbackQueue.release(this.reactMountReady); + this.reactMountReady = null; + }, + }; + + _assign(ReactReconcileTransaction.prototype, Transaction, Mixin); + + PooledClass.addPoolingTo(ReactReconcileTransaction); + + module.exports = ReactReconcileTransaction; + + /***/ + }, + /* 331 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2014-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var _assign = __webpack_require__(9); + + var PooledClass = __webpack_require__(85); + var Transaction = __webpack_require__(149); + var ReactInstrumentation = __webpack_require__(33); + var ReactServerUpdateQueue = __webpack_require__(788); + + /** + * Executed within the scope of the `Transaction` instance. Consider these as + * being member methods, but with an implied ordering while being isolated from + * each other. + */ + var TRANSACTION_WRAPPERS = []; + + if (true) { + TRANSACTION_WRAPPERS.push({ + initialize: ReactInstrumentation.debugTool.onBeginFlush, + close: ReactInstrumentation.debugTool.onEndFlush, + }); + } + + var noopCallbackQueue = { + enqueue: function () {}, + }; + + /** + * @class ReactServerRenderingTransaction + * @param {boolean} renderToStaticMarkup + */ + function ReactServerRenderingTransaction(renderToStaticMarkup) { + this.reinitializeTransaction(); + this.renderToStaticMarkup = renderToStaticMarkup; + this.useCreateElement = false; + this.updateQueue = new ReactServerUpdateQueue(this); + } + + var Mixin = { + /** + * @see Transaction + * @abstract + * @final + * @return {array} Empty list of operation wrap procedures. + */ + getTransactionWrappers: function () { + return TRANSACTION_WRAPPERS; + }, + + /** + * @return {object} The queue to collect `onDOMReady` callbacks with. + */ + getReactMountReady: function () { + return noopCallbackQueue; + }, + + /** + * @return {object} The queue to collect React async events. + */ + getUpdateQueue: function () { + return this.updateQueue; + }, + + /** + * `PooledClass` looks for this, and will invoke this before allowing this + * instance to be reused. + */ + destructor: function () {}, + + checkpoint: function () {}, + + rollback: function () {}, + }; + + _assign(ReactServerRenderingTransaction.prototype, Transaction, Mixin); + + PooledClass.addPoolingTo(ReactServerRenderingTransaction); + + module.exports = ReactServerRenderingTransaction; + + /***/ + }, + /* 332 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + module.exports = '15.5.3'; + + /***/ + }, + /* 333 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var ViewportMetrics = { + currentScrollLeft: 0, + + currentScrollTop: 0, + + refreshScrollValues: function (scrollPosition) { + ViewportMetrics.currentScrollLeft = scrollPosition.x; + ViewportMetrics.currentScrollTop = scrollPosition.y; + }, + }; + + module.exports = ViewportMetrics; + + /***/ + }, + /* 334 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2014-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + var _prodInvariant = __webpack_require__(7); + + var invariant = __webpack_require__(3); + + /** + * Accumulates items that must not be null or undefined into the first one. This + * is used to conserve memory by avoiding array allocations, and thus sacrifices + * API cleanness. Since `current` can be null before being passed in and not + * null after this function, make sure to assign it back to `current`: + * + * `a = accumulateInto(a, b);` + * + * This API should be sparingly used. Try `accumulate` for something cleaner. + * + * @return {*|array<*>} An accumulation of items. + */ + + function accumulateInto(current, next) { + !(next != null) + ? true + ? invariant(false, 'accumulateInto(...): Accumulated items must not be null or undefined.') + : _prodInvariant('30') + : void 0; + + if (current == null) { + return next; + } + + // Both are not empty. Warning: Never call x.concat(y) when you are not + // certain that x is an Array (x could be a string with concat method). + if (Array.isArray(current)) { + if (Array.isArray(next)) { + current.push.apply(current, next); + return current; + } + current.push(next); + return current; + } + + if (Array.isArray(next)) { + // A bit too dangerous to mutate `next`. + return [current].concat(next); + } + + return [current, next]; + } + + module.exports = accumulateInto; + + /***/ + }, + /* 335 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var _prodInvariant = __webpack_require__(7); + + var ReactCurrentOwner = __webpack_require__(53); + var ReactDOMComponentTree = __webpack_require__(16); + var ReactInstanceMap = __webpack_require__(105); + + var getHostComponentFromComposite = __webpack_require__(337); + var invariant = __webpack_require__(3); + var warning = __webpack_require__(4); + + /** + * Returns the DOM node rendered by this element. + * + * See https://facebook.github.io/react/docs/top-level-api.html#reactdom.finddomnode + * + * @param {ReactComponent|DOMElement} componentOrElement + * @return {?DOMElement} The root node of this element. + */ + function findDOMNode(componentOrElement) { + if (true) { + var owner = ReactCurrentOwner.current; + if (owner !== null) { + true + ? warning( + owner._warnedAboutRefsInRender, + '%s is accessing findDOMNode inside its render(). ' + + 'render() should be a pure function of props and state. It should ' + + 'never access something that requires stale data from the previous ' + + 'render, such as refs. Move this logic to componentDidMount and ' + + 'componentDidUpdate instead.', + owner.getName() || 'A component', + ) + : void 0; + owner._warnedAboutRefsInRender = true; + } + } + if (componentOrElement == null) { + return null; + } + if (componentOrElement.nodeType === 1) { + return componentOrElement; + } + + var inst = ReactInstanceMap.get(componentOrElement); + if (inst) { + inst = getHostComponentFromComposite(inst); + return inst ? ReactDOMComponentTree.getNodeFromInstance(inst) : null; + } + + if (typeof componentOrElement.render === 'function') { + true + ? true + ? invariant(false, 'findDOMNode was called on an unmounted component.') + : _prodInvariant('44') + : void 0; + } else { + true + ? true + ? invariant( + false, + 'Element appears to be neither ReactComponent nor DOMNode (keys: %s)', + Object.keys(componentOrElement), + ) + : _prodInvariant('45', Object.keys(componentOrElement)) + : void 0; + } + } + + module.exports = findDOMNode; + + /***/ + }, + /* 336 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + /** + * @param {array} arr an "accumulation" of items which is either an Array or + * a single item. Useful when paired with the `accumulate` module. This is a + * simple utility that allows us to reason about a collection of items, but + * handling the case when there is exactly one item (and we do not need to + * allocate an array). + */ + + function forEachAccumulated(arr, cb, scope) { + if (Array.isArray(arr)) { + arr.forEach(cb, scope); + } else if (arr) { + cb.call(scope, arr); + } + } + + module.exports = forEachAccumulated; + + /***/ + }, + /* 337 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var ReactNodeTypes = __webpack_require__(328); + + function getHostComponentFromComposite(inst) { + var type; + + while ((type = inst._renderedNodeType) === ReactNodeTypes.COMPOSITE) { + inst = inst._renderedComponent; + } + + if (type === ReactNodeTypes.HOST) { + return inst._renderedComponent; + } else if (type === ReactNodeTypes.EMPTY) { + return null; + } + } + + module.exports = getHostComponentFromComposite; + + /***/ + }, + /* 338 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var ExecutionEnvironment = __webpack_require__(17); + + var contentKey = null; + + /** + * Gets the key used to access text content on a DOM node. + * + * @return {?string} Key used to access text content. + * @internal + */ + function getTextContentAccessor() { + if (!contentKey && ExecutionEnvironment.canUseDOM) { + // Prefer textContent to innerText because many browsers support both but + // SVG <text> elements don't support innerText even when <div> does. + contentKey = 'textContent' in document.documentElement ? 'textContent' : 'innerText'; + } + return contentKey; + } + + module.exports = getTextContentAccessor; + + /***/ + }, + /* 339 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var ExecutionEnvironment = __webpack_require__(17); + + /** + * Generate a mapping of standard vendor prefixes using the defined style property and event name. + * + * @param {string} styleProp + * @param {string} eventName + * @returns {object} + */ + function makePrefixMap(styleProp, eventName) { + var prefixes = {}; + + prefixes[styleProp.toLowerCase()] = eventName.toLowerCase(); + prefixes['Webkit' + styleProp] = 'webkit' + eventName; + prefixes['Moz' + styleProp] = 'moz' + eventName; + prefixes['ms' + styleProp] = 'MS' + eventName; + prefixes['O' + styleProp] = 'o' + eventName.toLowerCase(); + + return prefixes; + } + + /** + * A list of event names to a configurable list of vendor prefixes. + */ + var vendorPrefixes = { + animationend: makePrefixMap('Animation', 'AnimationEnd'), + animationiteration: makePrefixMap('Animation', 'AnimationIteration'), + animationstart: makePrefixMap('Animation', 'AnimationStart'), + transitionend: makePrefixMap('Transition', 'TransitionEnd'), + }; + + /** + * Event names that have already been detected and prefixed (if applicable). + */ + var prefixedEventNames = {}; + + /** + * Element to check for prefixes on. + */ + var style = {}; + + /** + * Bootstrap if a DOM exists. + */ + if (ExecutionEnvironment.canUseDOM) { + style = document.createElement('div').style; + + // On some platforms, in particular some releases of Android 4.x, + // the un-prefixed "animation" and "transition" properties are defined on the + // style object but the events that fire will still be prefixed, so we need + // to check if the un-prefixed events are usable, and if not remove them from the map. + if (!('AnimationEvent' in window)) { + delete vendorPrefixes.animationend.animation; + delete vendorPrefixes.animationiteration.animation; + delete vendorPrefixes.animationstart.animation; + } + + // Same as above + if (!('TransitionEvent' in window)) { + delete vendorPrefixes.transitionend.transition; + } + } + + /** + * Attempts to determine the correct vendor prefixed event name. + * + * @param {string} eventName + * @returns {string} + */ + function getVendorPrefixedEventName(eventName) { + if (prefixedEventNames[eventName]) { + return prefixedEventNames[eventName]; + } else if (!vendorPrefixes[eventName]) { + return eventName; + } + + var prefixMap = vendorPrefixes[eventName]; + + for (var styleProp in prefixMap) { + if (prefixMap.hasOwnProperty(styleProp) && styleProp in style) { + return (prefixedEventNames[eventName] = prefixMap[styleProp]); + } + } + + return ''; + } + + module.exports = getVendorPrefixedEventName; + + /***/ + }, + /* 340 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + /** + * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary + */ + + var supportedInputTypes = { + color: true, + date: true, + datetime: true, + 'datetime-local': true, + email: true, + month: true, + number: true, + password: true, + range: true, + search: true, + tel: true, + text: true, + time: true, + url: true, + week: true, + }; + + function isTextInputElement(elem) { + var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase(); + + if (nodeName === 'input') { + return !!supportedInputTypes[elem.type]; + } + + if (nodeName === 'textarea') { + return true; + } + + return false; + } + + module.exports = isTextInputElement; + + /***/ + }, + /* 341 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var ExecutionEnvironment = __webpack_require__(17); + var escapeTextContentForBrowser = __webpack_require__(150); + var setInnerHTML = __webpack_require__(151); + + /** + * Set the textContent property of a node, ensuring that whitespace is preserved + * even in IE8. innerText is a poor substitute for textContent and, among many + * issues, inserts <br> instead of the literal newline chars. innerHTML behaves + * as it should. + * + * @param {DOMElement} node + * @param {string} text + * @internal + */ + var setTextContent = function (node, text) { + if (text) { + var firstChild = node.firstChild; + + if (firstChild && firstChild === node.lastChild && firstChild.nodeType === 3) { + firstChild.nodeValue = text; + return; + } + } + node.textContent = text; + }; + + if (ExecutionEnvironment.canUseDOM) { + if (!('textContent' in document.documentElement)) { + setTextContent = function (node, text) { + if (node.nodeType === 3) { + node.nodeValue = text; + return; + } + setInnerHTML(node, escapeTextContentForBrowser(text)); + }; + } + } + + module.exports = setTextContent; + + /***/ + }, + /* 342 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var _prodInvariant = __webpack_require__(7); + + var ReactCurrentOwner = __webpack_require__(53); + var REACT_ELEMENT_TYPE = __webpack_require__(775); + + var getIteratorFn = __webpack_require__(809); + var invariant = __webpack_require__(3); + var KeyEscapeUtils = __webpack_require__(203); + var warning = __webpack_require__(4); + + var SEPARATOR = '.'; + var SUBSEPARATOR = ':'; + + /** + * This is inlined from ReactElement since this file is shared between + * isomorphic and renderers. We could extract this to a + * + */ + + /** + * TODO: Test that a single child and an array with one item have the same key + * pattern. + */ + + var didWarnAboutMaps = false; + + /** + * Generate a key string that identifies a component within a set. + * + * @param {*} component A component that could contain a manual key. + * @param {number} index Index that is used if a manual key is not provided. + * @return {string} + */ + function getComponentKey(component, index) { + // Do some typechecking here since we call this blindly. We want to ensure + // that we don't block potential future ES APIs. + if (component && typeof component === 'object' && component.key != null) { + // Explicit key + return KeyEscapeUtils.escape(component.key); + } + // Implicit key determined by the index in the set + return index.toString(36); + } + + /** + * @param {?*} children Children tree container. + * @param {!string} nameSoFar Name of the key path so far. + * @param {!function} callback Callback to invoke with each child found. + * @param {?*} traverseContext Used to pass information throughout the traversal + * process. + * @return {!number} The number of children in this subtree. + */ + function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) { + var type = typeof children; + + if (type === 'undefined' || type === 'boolean') { + // All of the above are perceived as null. + children = null; + } + + if ( + children === null || + type === 'string' || + type === 'number' || + // The following is inlined from ReactElement. This means we can optimize + // some checks. React Fiber also inlines this logic for similar purposes. + (type === 'object' && children.$$typeof === REACT_ELEMENT_TYPE) + ) { + callback( + traverseContext, + children, + // If it's the only child, treat the name as if it was wrapped in an array + // so that it's consistent if the number of children grows. + nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar, + ); + return 1; + } + + var child; + var nextName; + var subtreeCount = 0; // Count of children found in the current subtree. + var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR; + + if (Array.isArray(children)) { + for (var i = 0; i < children.length; i++) { + child = children[i]; + nextName = nextNamePrefix + getComponentKey(child, i); + subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext); + } + } else { + var iteratorFn = getIteratorFn(children); + if (iteratorFn) { + var iterator = iteratorFn.call(children); + var step; + if (iteratorFn !== children.entries) { + var ii = 0; + while (!(step = iterator.next()).done) { + child = step.value; + nextName = nextNamePrefix + getComponentKey(child, ii++); + subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext); + } + } else { + if (true) { + var mapsAsChildrenAddendum = ''; + if (ReactCurrentOwner.current) { + var mapsAsChildrenOwnerName = ReactCurrentOwner.current.getName(); + if (mapsAsChildrenOwnerName) { + mapsAsChildrenAddendum = ' Check the render method of `' + mapsAsChildrenOwnerName + '`.'; + } + } + true + ? warning( + didWarnAboutMaps, + 'Using Maps as children is not yet fully supported. It is an ' + + 'experimental feature that might be removed. Convert it to a ' + + 'sequence / iterable of keyed ReactElements instead.%s', + mapsAsChildrenAddendum, + ) + : void 0; + didWarnAboutMaps = true; + } + // Iterator will provide entry [k,v] tuples rather than values. + while (!(step = iterator.next()).done) { + var entry = step.value; + if (entry) { + child = entry[1]; + nextName = + nextNamePrefix + + KeyEscapeUtils.escape(entry[0]) + + SUBSEPARATOR + + getComponentKey(child, 0); + subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext); + } + } + } + } else if (type === 'object') { + var addendum = ''; + if (true) { + addendum = + ' If you meant to render a collection of children, use an array ' + + 'instead or wrap the object using createFragment(object) from the ' + + 'React add-ons.'; + if (children._isReactElement) { + addendum = + " It looks like you're using an element created by a different " + + 'version of React. Make sure to use only one copy of React.'; + } + if (ReactCurrentOwner.current) { + var name = ReactCurrentOwner.current.getName(); + if (name) { + addendum += ' Check the render method of `' + name + '`.'; + } + } + } + var childrenString = String(children); + true + ? true + ? invariant( + false, + 'Objects are not valid as a React child (found: %s).%s', + childrenString === '[object Object]' + ? 'object with keys {' + Object.keys(children).join(', ') + '}' + : childrenString, + addendum, + ) + : _prodInvariant( + '31', + childrenString === '[object Object]' + ? 'object with keys {' + Object.keys(children).join(', ') + '}' + : childrenString, + addendum, + ) + : void 0; + } + } + + return subtreeCount; + } + + /** + * Traverses children that are typically specified as `props.children`, but + * might also be specified through attributes: + * + * - `traverseAllChildren(this.props.children, ...)` + * - `traverseAllChildren(this.props.leftPanelChildren, ...)` + * + * The `traverseContext` is an optional argument that is passed through the + * entire traversal. It can be used to store accumulations or anything else that + * the callback might find relevant. + * + * @param {?*} children Children tree object. + * @param {!function} callback To invoke upon traversing each child. + * @param {?*} traverseContext Context for traversal. + * @return {!number} The number of children in this subtree. + */ + function traverseAllChildren(children, callback, traverseContext) { + if (children == null) { + return 0; + } + + return traverseAllChildrenImpl(children, '', callback, traverseContext); + } + + module.exports = traverseAllChildren; + + /***/ + }, + /* 343 */ + /***/ function (module, exports) { + exports.__esModule = true; + var ATTRIBUTE_NAMES = (exports.ATTRIBUTE_NAMES = { + BODY: 'bodyAttributes', + HTML: 'htmlAttributes', + TITLE: 'titleAttributes', + }); + + var TAG_NAMES = (exports.TAG_NAMES = { + BASE: 'base', + BODY: 'body', + HEAD: 'head', + HTML: 'html', + LINK: 'link', + META: 'meta', + NOSCRIPT: 'noscript', + SCRIPT: 'script', + STYLE: 'style', + TITLE: 'title', + }); + + var VALID_TAG_NAMES = (exports.VALID_TAG_NAMES = Object.keys(TAG_NAMES).map(function (name) { + return TAG_NAMES[name]; + })); + + var TAG_PROPERTIES = (exports.TAG_PROPERTIES = { + CHARSET: 'charset', + CSS_TEXT: 'cssText', + HREF: 'href', + HTTPEQUIV: 'http-equiv', + INNER_HTML: 'innerHTML', + ITEM_PROP: 'itemprop', + NAME: 'name', + PROPERTY: 'property', + REL: 'rel', + SRC: 'src', + }); + + var REACT_TAG_MAP = (exports.REACT_TAG_MAP = { + accesskey: 'accessKey', + charset: 'charSet', + class: 'className', + contenteditable: 'contentEditable', + contextmenu: 'contextMenu', + 'http-equiv': 'httpEquiv', + itemprop: 'itemProp', + tabindex: 'tabIndex', + }); + + var HELMET_PROPS = (exports.HELMET_PROPS = { + DEFAULT_TITLE: 'defaultTitle', + ENCODE_SPECIAL_CHARACTERS: 'encodeSpecialCharacters', + ON_CHANGE_CLIENT_STATE: 'onChangeClientState', + TITLE_TEMPLATE: 'titleTemplate', + }); + + var HTML_TAG_MAP = (exports.HTML_TAG_MAP = Object.keys(REACT_TAG_MAP).reduce(function (obj, key) { + obj[REACT_TAG_MAP[key]] = key; + return obj; + }, {})); + + var SELF_CLOSING_TAGS = (exports.SELF_CLOSING_TAGS = [ + TAG_NAMES.NOSCRIPT, + TAG_NAMES.SCRIPT, + TAG_NAMES.STYLE, + ]); + + var HELMET_ATTRIBUTE = (exports.HELMET_ATTRIBUTE = 'data-react-helmet'); + + /***/ + }, + /* 344 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + + var _from = __webpack_require__(256); + + var _from2 = _interopRequireDefault(_from); + + var _keys = __webpack_require__(155); + + var _keys2 = _interopRequireDefault(_keys); + + var _map = __webpack_require__(257); + + var _map2 = _interopRequireDefault(_map); + + var _generatorFunction = __webpack_require__(821); + + var _generatorFunction2 = _interopRequireDefault(_generatorFunction); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + var registeredComponents = new _map2.default(); // key = name used by react_on_rails + // value = { name, component, generatorFunction: boolean, isRenderer: boolean } + exports.default = { + /** + * @param components { component1: component1, component2: component2, etc. } + */ + register: function register(components) { + (0, _keys2.default)(components).forEach(function (name) { + if (registeredComponents.has(name)) { + console.warn('Called register for component that is already registered', name); + } + + var component = components[name]; + if (!component) { + throw new Error('Called register with null component named ' + name); + } + + var isGeneratorFunction = (0, _generatorFunction2.default)(component); + var isRenderer = isGeneratorFunction && component.length === 3; + + registeredComponents.set(name, { + name: name, + component: component, + generatorFunction: isGeneratorFunction, + isRenderer: isRenderer, + }); + }); + }, + + /** + * @param name + * @returns { name, component, generatorFunction } + */ + get: function get(name) { + if (registeredComponents.has(name)) { + return registeredComponents.get(name); + } + + var keys = (0, _from2.default)(registeredComponents.keys()).join(', '); + throw new Error( + 'Could not find component registered with name ' + + name + + '. Registered component names include [ ' + + keys + + ' ]. Maybe you forgot to register the component?', + ); + }, + + /** + * Get a Map containing all registered components. Useful for debugging. + * @returns Map where key is the component name and values are the + * { name, component, generatorFunction} + */ + components: function components() { + return registeredComponents; + }, + }; + + /***/ + }, + /* 345 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + + var _stringify = __webpack_require__(132); + + var _stringify2 = _interopRequireDefault(_stringify); + + exports.consoleReplay = consoleReplay; + exports.default = buildConsoleReplay; + + var _RenderUtils = __webpack_require__(817); + + var _RenderUtils2 = _interopRequireDefault(_RenderUtils); + + var _scriptSanitizedVal = __webpack_require__(822); + + var _scriptSanitizedVal2 = _interopRequireDefault(_scriptSanitizedVal); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + function consoleReplay() { + // console.history is a global polyfill used in server rendering. + if (!(console.history instanceof Array)) { + return ''; + } + + var lines = console.history.map(function (msg) { + var stringifiedList = msg.arguments.map(function (arg) { + var val = void 0; + try { + val = typeof arg === 'string' || arg instanceof String ? arg : (0, _stringify2.default)(arg); + } catch (e) { + val = e.message + ': ' + arg; + } + + return (0, _scriptSanitizedVal2.default)(val); + }); + + return ( + 'console.' + msg.level + '.apply(console, ' + (0, _stringify2.default)(stringifiedList) + ');' + ); + }); + + return lines.join('\n'); + } + + function buildConsoleReplay() { + return _RenderUtils2.default.wrapInScriptTags('consoleReplayLog', consoleReplay()); + } + + /***/ + }, + /* 346 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + + var _react = __webpack_require__(1); + + var _react2 = _interopRequireDefault(_react); + + var _server = __webpack_require__(218); + + var _server2 = _interopRequireDefault(_server); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + function handleGeneratorFunctionIssue(options) { + var e = options.e, + name = options.name; + + var msg = ''; + + if (name) { + var lastLine = + 'A generator function takes a single arg of props (and the location for react-router) ' + + 'and returns a ReactElement.'; + + var shouldBeGeneratorError = + "ERROR: ReactOnRails is incorrectly detecting generator function to be false. The React\ncomponent '" + + name + + "' seems to be a generator function.\n" + + lastLine; + var reMatchShouldBeGeneratorError = /Can't add property context, object is not extensible/; + if (reMatchShouldBeGeneratorError.test(e.message)) { + msg += shouldBeGeneratorError + '\n\n'; + console.error(shouldBeGeneratorError); + } + + shouldBeGeneratorError = + "ERROR: ReactOnRails is incorrectly detecting generatorFunction to be true, but the React\ncomponent '" + + name + + "' is not a generator function.\n" + + lastLine; + + var reMatchShouldNotBeGeneratorError = /Cannot call a class as a function/; + + if (reMatchShouldNotBeGeneratorError.test(e.message)) { + msg += shouldBeGeneratorError + '\n\n'; + console.error(shouldBeGeneratorError); + } + } + + return msg; + } + + var handleError = function handleError(options) { + var e = options.e, + jsCode = options.jsCode, + serverSide = options.serverSide; + + console.error('Exception in rendering!'); + + var msg = handleGeneratorFunctionIssue(options); + + if (jsCode) { + console.error('JS code was: ' + jsCode); + } + + if (e.fileName) { + console.error('location: ' + e.fileName + ':' + e.lineNumber); + } + + console.error('message: ' + e.message); + console.error('stack: ' + e.stack); + + if (serverSide) { + msg += + 'Exception in rendering!\n' + + (e.fileName ? '\nlocation: ' + e.fileName + ':' + e.lineNumber : '') + + '\nMessage: ' + + e.message + + '\n\n' + + e.stack; + + var reactElement = _react2.default.createElement('pre', null, msg); + return _server2.default.renderToString(reactElement); + } + + return undefined; + }; + + exports.default = handleError; + + /***/ + }, + /* 347 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.default = isResultNonReactComponent; + function isResultNonReactComponent(reactElementOrRouterResult) { + return !!( + reactElementOrRouterResult.renderedHtml || + reactElementOrRouterResult.redirectLocation || + reactElementOrRouterResult.error + ); + } + + /***/ + }, + /* 348 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_hoist_non_react_statics__ = + __webpack_require__(307); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_hoist_non_react_statics___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_hoist_non_react_statics__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(23); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_invariant__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_2_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__utils_Subscription__ = __webpack_require__(831); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__utils_PropTypes__ = __webpack_require__(350); + /* harmony export (immutable) */ __webpack_exports__['a'] = connectAdvanced; + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + function _objectWithoutProperties(obj, keys) { + var target = {}; + for (var i in obj) { + if (keys.indexOf(i) >= 0) continue; + if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; + target[i] = obj[i]; + } + return target; + } + + var hotReloadingVersion = 0; + var dummyState = {}; + function noop() {} + function makeSelectorStateful(sourceSelector, store) { + // wrap the selector in an object that tracks its results between runs. + var selector = { + run: function runComponentSelector(props) { + try { + var nextProps = sourceSelector(store.getState(), props); + if (nextProps !== selector.props || selector.error) { + selector.shouldComponentUpdate = true; + selector.props = nextProps; + selector.error = null; + } + } catch (error) { + selector.shouldComponentUpdate = true; + selector.error = error; + } + }, + }; + + return selector; + } + + function connectAdvanced( + /* + selectorFactory is a func that is responsible for returning the selector function used to + compute new props from state, props, and dispatch. For example: + export default connectAdvanced((dispatch, options) => (state, props) => ({ + thing: state.things[props.thingId], + saveThing: fields => dispatch(actionCreators.saveThing(props.thingId, fields)), + }))(YourComponent) + Access to dispatch is provided to the factory so selectorFactories can bind actionCreators + outside of their selector as an optimization. Options passed to connectAdvanced are passed to + the selectorFactory, along with displayName and WrappedComponent, as the second argument. + Note that selectorFactory is responsible for all caching/memoization of inbound and outbound + props. Do not use connectAdvanced directly without memoizing results between calls to your + selector, otherwise the Connect component will re-render on every state or props change. +*/ + selectorFactory, + ) { + var _contextTypes, _childContextTypes; + + var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, + _ref$getDisplayName = _ref.getDisplayName, + getDisplayName = + _ref$getDisplayName === undefined + ? function (name) { + return 'ConnectAdvanced(' + name + ')'; + } + : _ref$getDisplayName, + _ref$methodName = _ref.methodName, + methodName = _ref$methodName === undefined ? 'connectAdvanced' : _ref$methodName, + _ref$renderCountProp = _ref.renderCountProp, + renderCountProp = _ref$renderCountProp === undefined ? undefined : _ref$renderCountProp, + _ref$shouldHandleStat = _ref.shouldHandleStateChanges, + shouldHandleStateChanges = _ref$shouldHandleStat === undefined ? true : _ref$shouldHandleStat, + _ref$storeKey = _ref.storeKey, + storeKey = _ref$storeKey === undefined ? 'store' : _ref$storeKey, + _ref$withRef = _ref.withRef, + withRef = _ref$withRef === undefined ? false : _ref$withRef, + connectOptions = _objectWithoutProperties(_ref, [ + 'getDisplayName', + 'methodName', + 'renderCountProp', + 'shouldHandleStateChanges', + 'storeKey', + 'withRef', + ]); + + var subscriptionKey = storeKey + 'Subscription'; + var version = hotReloadingVersion++; + + var contextTypes = + ((_contextTypes = {}), + (_contextTypes[storeKey] = __WEBPACK_IMPORTED_MODULE_4__utils_PropTypes__['a' /* storeShape */]), + (_contextTypes[subscriptionKey] = + __WEBPACK_IMPORTED_MODULE_4__utils_PropTypes__['b' /* subscriptionShape */]), + _contextTypes); + var childContextTypes = + ((_childContextTypes = {}), + (_childContextTypes[subscriptionKey] = + __WEBPACK_IMPORTED_MODULE_4__utils_PropTypes__['b' /* subscriptionShape */]), + _childContextTypes); + + return function wrapWithConnect(WrappedComponent) { + __WEBPACK_IMPORTED_MODULE_1_invariant___default()( + typeof WrappedComponent == 'function', + 'You must pass a component to the function returned by ' + + ('connect. Instead received ' + JSON.stringify(WrappedComponent)), + ); + + var wrappedComponentName = WrappedComponent.displayName || WrappedComponent.name || 'Component'; + + var displayName = getDisplayName(wrappedComponentName); + + var selectorFactoryOptions = _extends({}, connectOptions, { + getDisplayName: getDisplayName, + methodName: methodName, + renderCountProp: renderCountProp, + shouldHandleStateChanges: shouldHandleStateChanges, + storeKey: storeKey, + withRef: withRef, + displayName: displayName, + wrappedComponentName: wrappedComponentName, + WrappedComponent: WrappedComponent, + }); + + var Connect = (function (_Component) { + _inherits(Connect, _Component); + + function Connect(props, context) { + _classCallCheck(this, Connect); + + var _this = _possibleConstructorReturn(this, _Component.call(this, props, context)); + + _this.version = version; + _this.state = {}; + _this.renderCount = 0; + _this.store = props[storeKey] || context[storeKey]; + _this.propsMode = Boolean(props[storeKey]); + _this.setWrappedInstance = _this.setWrappedInstance.bind(_this); + + __WEBPACK_IMPORTED_MODULE_1_invariant___default()( + _this.store, + 'Could not find "' + + storeKey + + '" in either the context or props of ' + + ('"' + displayName + '". Either wrap the root component in a <Provider>, ') + + ('or explicitly pass "' + storeKey + '" as a prop to "' + displayName + '".'), + ); + + _this.initSelector(); + _this.initSubscription(); + return _this; + } + + Connect.prototype.getChildContext = function getChildContext() { + var _ref2; + + // If this component received store from props, its subscription should be transparent + // to any descendants receiving store+subscription from context; it passes along + // subscription passed to it. Otherwise, it shadows the parent subscription, which allows + // Connect to control ordering of notifications to flow top-down. + var subscription = this.propsMode ? null : this.subscription; + return ( + (_ref2 = {}), (_ref2[subscriptionKey] = subscription || this.context[subscriptionKey]), _ref2 + ); + }; + + Connect.prototype.componentDidMount = function componentDidMount() { + if (!shouldHandleStateChanges) return; + + // componentWillMount fires during server side rendering, but componentDidMount and + // componentWillUnmount do not. Because of this, trySubscribe happens during ...didMount. + // Otherwise, unsubscription would never take place during SSR, causing a memory leak. + // To handle the case where a child component may have triggered a state change by + // dispatching an action in its componentWillMount, we have to re-run the select and maybe + // re-render. + this.subscription.trySubscribe(); + this.selector.run(this.props); + if (this.selector.shouldComponentUpdate) this.forceUpdate(); + }; + + Connect.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) { + this.selector.run(nextProps); + }; + + Connect.prototype.shouldComponentUpdate = function shouldComponentUpdate() { + return this.selector.shouldComponentUpdate; + }; + + Connect.prototype.componentWillUnmount = function componentWillUnmount() { + if (this.subscription) this.subscription.tryUnsubscribe(); + this.subscription = null; + this.notifyNestedSubs = noop; + this.store = null; + this.selector.run = noop; + this.selector.shouldComponentUpdate = false; + }; + + Connect.prototype.getWrappedInstance = function getWrappedInstance() { + __WEBPACK_IMPORTED_MODULE_1_invariant___default()( + withRef, + 'To access the wrapped instance, you need to specify ' + + ('{ withRef: true } in the options argument of the ' + methodName + '() call.'), + ); + return this.wrappedInstance; + }; + + Connect.prototype.setWrappedInstance = function setWrappedInstance(ref) { + this.wrappedInstance = ref; + }; + + Connect.prototype.initSelector = function initSelector() { + var sourceSelector = selectorFactory(this.store.dispatch, selectorFactoryOptions); + this.selector = makeSelectorStateful(sourceSelector, this.store); + this.selector.run(this.props); + }; + + Connect.prototype.initSubscription = function initSubscription() { + if (!shouldHandleStateChanges) return; + + // parentSub's source should match where store came from: props vs. context. A component + // connected to the store via props shouldn't use subscription from context, or vice versa. + var parentSub = (this.propsMode ? this.props : this.context)[subscriptionKey]; + this.subscription = new __WEBPACK_IMPORTED_MODULE_3__utils_Subscription__['a' /* default */]( + this.store, + parentSub, + this.onStateChange.bind(this), + ); + + // `notifyNestedSubs` is duplicated to handle the case where the component is unmounted in + // the middle of the notification loop, where `this.subscription` will then be null. An + // extra null check every change can be avoided by copying the method onto `this` and then + // replacing it with a no-op on unmount. This can probably be avoided if Subscription's + // listeners logic is changed to not call listeners that have been unsubscribed in the + // middle of the notification loop. + this.notifyNestedSubs = this.subscription.notifyNestedSubs.bind(this.subscription); + }; + + Connect.prototype.onStateChange = function onStateChange() { + this.selector.run(this.props); + + if (!this.selector.shouldComponentUpdate) { + this.notifyNestedSubs(); + } else { + this.componentDidUpdate = this.notifyNestedSubsOnComponentDidUpdate; + this.setState(dummyState); + } + }; + + Connect.prototype.notifyNestedSubsOnComponentDidUpdate = + function notifyNestedSubsOnComponentDidUpdate() { + // `componentDidUpdate` is conditionally implemented when `onStateChange` determines it + // needs to notify nested subs. Once called, it unimplements itself until further state + // changes occur. Doing it this way vs having a permanent `componentDidMount` that does + // a boolean check every time avoids an extra method call most of the time, resulting + // in some perf boost. + this.componentDidUpdate = undefined; + this.notifyNestedSubs(); + }; + + Connect.prototype.isSubscribed = function isSubscribed() { + return Boolean(this.subscription) && this.subscription.isSubscribed(); + }; + + Connect.prototype.addExtraProps = function addExtraProps(props) { + if (!withRef && !renderCountProp && !(this.propsMode && this.subscription)) return props; + // make a shallow copy so that fields added don't leak to the original selector. + // this is especially important for 'ref' since that's a reference back to the component + // instance. a singleton memoized selector would then be holding a reference to the + // instance, preventing the instance from being garbage collected, and that would be bad + var withExtras = _extends({}, props); + if (withRef) withExtras.ref = this.setWrappedInstance; + if (renderCountProp) withExtras[renderCountProp] = this.renderCount++; + if (this.propsMode && this.subscription) withExtras[subscriptionKey] = this.subscription; + return withExtras; + }; + + Connect.prototype.render = function render() { + var selector = this.selector; + selector.shouldComponentUpdate = false; + + if (selector.error) { + throw selector.error; + } else { + return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2_react__['createElement'])( + WrappedComponent, + this.addExtraProps(selector.props), + ); + } + }; + + return Connect; + })(__WEBPACK_IMPORTED_MODULE_2_react__['Component']); + + Connect.WrappedComponent = WrappedComponent; + Connect.displayName = displayName; + Connect.childContextTypes = childContextTypes; + Connect.contextTypes = contextTypes; + Connect.propTypes = contextTypes; + + if (true) { + Connect.prototype.componentWillUpdate = function componentWillUpdate() { + // We are hot reloading! + if (this.version !== version) { + this.version = version; + this.initSelector(); + + if (this.subscription) this.subscription.tryUnsubscribe(); + this.initSubscription(); + if (shouldHandleStateChanges) this.subscription.trySubscribe(); + } + }; + } + + return __WEBPACK_IMPORTED_MODULE_0_hoist_non_react_statics___default()(Connect, WrappedComponent); + }; + } + + /***/ + }, + /* 349 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils_verifyPlainObject__ = + __webpack_require__(351); + /* harmony export (immutable) */ __webpack_exports__['b'] = wrapMapToPropsConstant; + /* unused harmony export getDependsOnOwnProps */ + /* harmony export (immutable) */ __webpack_exports__['a'] = wrapMapToPropsFunc; + + function wrapMapToPropsConstant(getConstant) { + return function initConstantSelector(dispatch, options) { + var constant = getConstant(dispatch, options); + + function constantSelector() { + return constant; + } + constantSelector.dependsOnOwnProps = false; + return constantSelector; + }; + } + + // dependsOnOwnProps is used by createMapToPropsProxy to determine whether to pass props as args + // to the mapToProps function being wrapped. It is also used by makePurePropsSelector to determine + // whether mapToProps needs to be invoked when props have changed. + // + // A length of one signals that mapToProps does not depend on props from the parent component. + // A length of zero is assumed to mean mapToProps is getting args via arguments or ...args and + // therefore not reporting its length accurately.. + function getDependsOnOwnProps(mapToProps) { + return mapToProps.dependsOnOwnProps !== null && mapToProps.dependsOnOwnProps !== undefined + ? Boolean(mapToProps.dependsOnOwnProps) + : mapToProps.length !== 1; + } + + // Used by whenMapStateToPropsIsFunction and whenMapDispatchToPropsIsFunction, + // this function wraps mapToProps in a proxy function which does several things: + // + // * Detects whether the mapToProps function being called depends on props, which + // is used by selectorFactory to decide if it should reinvoke on props changes. + // + // * On first call, handles mapToProps if returns another function, and treats that + // new function as the true mapToProps for subsequent calls. + // + // * On first call, verifies the first result is a plain object, in order to warn + // the developer that their mapToProps function is not returning a valid result. + // + function wrapMapToPropsFunc(mapToProps, methodName) { + return function initProxySelector(dispatch, _ref) { + var displayName = _ref.displayName; + + var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) { + return proxy.dependsOnOwnProps + ? proxy.mapToProps(stateOrDispatch, ownProps) + : proxy.mapToProps(stateOrDispatch); + }; + + // allow detectFactoryAndVerify to get ownProps + proxy.dependsOnOwnProps = true; + + proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) { + proxy.mapToProps = mapToProps; + proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps); + var props = proxy(stateOrDispatch, ownProps); + + if (typeof props === 'function') { + proxy.mapToProps = props; + proxy.dependsOnOwnProps = getDependsOnOwnProps(props); + props = proxy(stateOrDispatch, ownProps); + } + + if (true) + __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_0__utils_verifyPlainObject__['a' /* default */], + )(props, displayName, methodName); + + return props; + }; + + return proxy; + }; + } + + /***/ + }, + /* 350 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(352); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'b', function () { + return subscriptionShape; + }); + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'a', function () { + return storeShape; + }); + + var subscriptionShape = __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.shape({ + trySubscribe: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired, + tryUnsubscribe: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired, + notifyNestedSubs: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired, + isSubscribed: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired, + }); + + var storeShape = __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.shape({ + subscribe: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired, + dispatch: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired, + getState: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired, + }); + + /***/ + }, + /* 351 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_isPlainObject__ = + __webpack_require__(199); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__warning__ = __webpack_require__(220); + /* harmony export (immutable) */ __webpack_exports__['a'] = verifyPlainObject; + + function verifyPlainObject(value, displayName, methodName) { + if ( + !__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0_lodash_es_isPlainObject__['a' /* default */])( + value, + ) + ) { + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__warning__['a' /* default */])( + methodName + + '() in ' + + displayName + + ' must return a plain object. Instead received ' + + value + + '.', + ); + } + } + + /***/ + }, + /* 352 */ + /***/ function (module, exports, __webpack_require__) { + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + + if (true) { + var REACT_ELEMENT_TYPE = + (typeof Symbol === 'function' && Symbol.for && Symbol.for('react.element')) || 0xeac7; + + var isValidElement = function (object) { + return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; + }; + + // By explicitly using `prop-types` you are opting into new development behavior. + // http://fb.me/prop-types-in-prod + var throwOnDirectAccess = true; + module.exports = __webpack_require__(834)(isValidElement, throwOnDirectAccess); + } else { + // By explicitly using `prop-types` you are opting into new production behavior. + // http://fb.me/prop-types-in-prod + module.exports = require('./factoryWithThrowingShims')(); + } + + /***/ + }, + /* 353 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + + var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; + + module.exports = ReactPropTypesSecret; + + /***/ + }, + /* 354 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + /** + * This action type will be dispatched by the history actions below. + * If you're writing a middleware to watch for navigation events, be sure to + * look for actions of this type. + */ + var CALL_HISTORY_METHOD = (exports.CALL_HISTORY_METHOD = '@@router/CALL_HISTORY_METHOD'); + + function updateLocation(method) { + return function () { + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return { + type: CALL_HISTORY_METHOD, + payload: { method: method, args: args }, + }; + }; + } + + /** + * These actions correspond to the history API. + * The associated routerMiddleware will capture these events before they get to + * your reducer and reissue them as the matching function on your history. + */ + var push = (exports.push = updateLocation('push')); + var replace = (exports.replace = updateLocation('replace')); + var go = (exports.go = updateLocation('go')); + var goBack = (exports.goBack = updateLocation('goBack')); + var goForward = (exports.goForward = updateLocation('goForward')); + + var routerActions = (exports.routerActions = { + push: push, + replace: replace, + go: go, + goBack: goBack, + goForward: goForward, + }); + + /***/ + }, + /* 355 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + exports.routerReducer = routerReducer; + /** + * This action type will be dispatched when your history + * receives a location change. + */ + var LOCATION_CHANGE = (exports.LOCATION_CHANGE = '@@router/LOCATION_CHANGE'); + + var initialState = { + locationBeforeTransitions: null, + }; + + /** + * This reducer will update the state with the most recent location history + * has transitioned to. This may not be in sync with the router, particularly + * if you have asynchronously-loaded routes, so reading from and relying on + * this state is discouraged. + */ + function routerReducer() { + var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState; + + var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, + type = _ref.type, + payload = _ref.payload; + + if (type === LOCATION_CHANGE) { + return _extends({}, state, { locationBeforeTransitions: payload }); + } + + return state; + } + + /***/ + }, + /* 356 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_create_react_class__ = __webpack_require__(59); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_create_react_class___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_create_react_class__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types__ = __webpack_require__(52); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_2_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_invariant__ = __webpack_require__(23); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_invariant___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_3_invariant__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__PropTypes__ = __webpack_require__(223); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__ContextUtils__ = __webpack_require__(222); + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + function _objectWithoutProperties(obj, keys) { + var target = {}; + for (var i in obj) { + if (keys.indexOf(i) >= 0) continue; + if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; + target[i] = obj[i]; + } + return target; + } + + function isLeftClickEvent(event) { + return event.button === 0; + } + + function isModifiedEvent(event) { + return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey); + } + + // TODO: De-duplicate against hasAnyProperties in createTransitionManager. + function isEmptyObject(object) { + for (var p in object) { + if (Object.prototype.hasOwnProperty.call(object, p)) return false; + } + return true; + } + + function resolveToLocation(to, router) { + return typeof to === 'function' ? to(router.location) : to; + } + + /** + * A <Link> is used to create an <a> element that links to a route. + * When that route is active, the link gets the value of its + * activeClassName prop. + * + * For example, assuming you have the following route: + * + * <Route path="/posts/:postID" component={Post} /> + * + * You could use the following component to link to that route: + * + * <Link to={`/posts/${post.id}`} /> + */ + var Link = __WEBPACK_IMPORTED_MODULE_1_create_react_class___default()({ + displayName: 'Link', + + mixins: [ + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__ContextUtils__['b' /* ContextSubscriber */])( + 'router', + ), + ], + + contextTypes: { + router: __WEBPACK_IMPORTED_MODULE_4__PropTypes__['a' /* routerShape */], + }, + + propTypes: { + to: __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2_prop_types__['oneOfType'])([ + __WEBPACK_IMPORTED_MODULE_2_prop_types__['string'], + __WEBPACK_IMPORTED_MODULE_2_prop_types__['object'], + __WEBPACK_IMPORTED_MODULE_2_prop_types__['func'], + ]), + activeStyle: __WEBPACK_IMPORTED_MODULE_2_prop_types__['object'], + activeClassName: __WEBPACK_IMPORTED_MODULE_2_prop_types__['string'], + onlyActiveOnIndex: __WEBPACK_IMPORTED_MODULE_2_prop_types__['bool'].isRequired, + onClick: __WEBPACK_IMPORTED_MODULE_2_prop_types__['func'], + target: __WEBPACK_IMPORTED_MODULE_2_prop_types__['string'], + }, + + getDefaultProps: function getDefaultProps() { + return { + onlyActiveOnIndex: false, + style: {}, + }; + }, + handleClick: function handleClick(event) { + if (this.props.onClick) this.props.onClick(event); + + if (event.defaultPrevented) return; + + var router = this.context.router; + + !router + ? true + ? __WEBPACK_IMPORTED_MODULE_3_invariant___default()( + false, + '<Link>s rendered outside of a router context cannot navigate.', + ) + : invariant(false) + : void 0; + + if (isModifiedEvent(event) || !isLeftClickEvent(event)) return; + + // If target prop is set (e.g. to "_blank"), let browser handle link. + /* istanbul ignore if: untestable with Karma */ + if (this.props.target) return; + + event.preventDefault(); + + router.push(resolveToLocation(this.props.to, router)); + }, + render: function render() { + var _props = this.props, + to = _props.to, + activeClassName = _props.activeClassName, + activeStyle = _props.activeStyle, + onlyActiveOnIndex = _props.onlyActiveOnIndex, + props = _objectWithoutProperties(_props, [ + 'to', + 'activeClassName', + 'activeStyle', + 'onlyActiveOnIndex', + ]); + + // Ignore if rendered outside the context of router to simplify unit testing. + + var router = this.context.router; + + if (router) { + // If user does not specify a `to` prop, return an empty anchor tag. + if (!to) { + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('a', props); + } + + var toLocation = resolveToLocation(to, router); + props.href = router.createHref(toLocation); + + if (activeClassName || (activeStyle != null && !isEmptyObject(activeStyle))) { + if (router.isActive(toLocation, onlyActiveOnIndex)) { + if (activeClassName) { + if (props.className) { + props.className += ' ' + activeClassName; + } else { + props.className = activeClassName; + } + } + + if (activeStyle) props.style = _extends({}, props.style, activeStyle); + } + } + } + + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'a', + _extends({}, props, { onClick: this.handleClick }), + ); + }, + }); + + /* harmony default export */ __webpack_exports__['a'] = Link; + + /***/ + }, + /* 357 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = isPromise; + function isPromise(obj) { + return obj && typeof obj.then === 'function'; + } + + /***/ + }, + /* 358 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_create_react_class__ = __webpack_require__(59); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_create_react_class___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_create_react_class__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(52); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant__ = __webpack_require__(23); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_2_invariant__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__RouteUtils__ = __webpack_require__(70); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__PatternUtils__ = __webpack_require__(106); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__ = __webpack_require__(126); + + /** + * A <Redirect> is used to declare another URL path a client should + * be sent to when they request a given URL. + * + * Redirects are placed alongside routes in the route configuration + * and are traversed in the same manner. + */ + /* eslint-disable react/require-render-return */ + var Redirect = __WEBPACK_IMPORTED_MODULE_0_create_react_class___default()({ + displayName: 'Redirect', + + statics: { + createRouteFromReactElement: function createRouteFromReactElement(element) { + var route = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_3__RouteUtils__['c' /* createRouteFromReactElement */], + )(element); + + if (route.from) route.path = route.from; + + route.onEnter = function (nextState, replace) { + var location = nextState.location, + params = nextState.params; + + var pathname = void 0; + if (route.to.charAt(0) === '/') { + pathname = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_4__PatternUtils__['c' /* formatPattern */], + )(route.to, params); + } else if (!route.to) { + pathname = location.pathname; + } else { + var routeIndex = nextState.routes.indexOf(route); + var parentPattern = Redirect.getRoutePattern(nextState.routes, routeIndex - 1); + var pattern = parentPattern.replace(/\/*$/, '/') + route.to; + pathname = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_4__PatternUtils__['c' /* formatPattern */], + )(pattern, params); + } + + replace({ + pathname: pathname, + query: route.query || location.query, + state: route.state || location.state, + }); + }; + + return route; + }, + getRoutePattern: function getRoutePattern(routes, routeIndex) { + var parentPattern = ''; + + for (var i = routeIndex; i >= 0; i--) { + var route = routes[i]; + var pattern = route.path || ''; + + parentPattern = pattern.replace(/\/*$/, '/') + parentPattern; + + if (pattern.indexOf('/') === 0) break; + } + + return '/' + parentPattern; + }, + }, + + propTypes: { + path: __WEBPACK_IMPORTED_MODULE_1_prop_types__['string'], + from: __WEBPACK_IMPORTED_MODULE_1_prop_types__['string'], // Alias for path + to: __WEBPACK_IMPORTED_MODULE_1_prop_types__['string'].isRequired, + query: __WEBPACK_IMPORTED_MODULE_1_prop_types__['object'], + state: __WEBPACK_IMPORTED_MODULE_1_prop_types__['object'], + onEnter: __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__['c' /* falsy */], + children: __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__['c' /* falsy */], + }, + + /* istanbul ignore next: sanity check */ + render: function render() { + true + ? true + ? __WEBPACK_IMPORTED_MODULE_2_invariant___default()( + false, + '<Redirect> elements are for router configuration only and should not be rendered', + ) + : invariant(false) + : void 0; + }, + }); + + /* harmony default export */ __webpack_exports__['a'] = Redirect; + + /***/ + }, + /* 359 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = createRouterObject; + /* harmony export (immutable) */ __webpack_exports__['b'] = assignRouterState; + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + function createRouterObject(history, transitionManager, state) { + var router = _extends({}, history, { + setRouteLeaveHook: transitionManager.listenBeforeLeavingRoute, + isActive: transitionManager.isActive, + }); + + return assignRouterState(router, state); + } + + function assignRouterState(router, _ref) { + var location = _ref.location, + params = _ref.params, + routes = _ref.routes; + + router.location = location; + router.params = params; + router.routes = routes; + + return router; + } + + /***/ + }, + /* 360 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries__ = + __webpack_require__(306); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename__ = + __webpack_require__(305); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_history_lib_createMemoryHistory__ = + __webpack_require__(728); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_history_lib_createMemoryHistory___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_history_lib_createMemoryHistory__); + /* harmony export (immutable) */ __webpack_exports__['a'] = createMemoryHistory; + + function createMemoryHistory(options) { + // signatures and type checking differ between `useQueries` and + // `createMemoryHistory`, have to create `memoryHistory` first because + // `useQueries` doesn't understand the signature + var memoryHistory = __WEBPACK_IMPORTED_MODULE_2_history_lib_createMemoryHistory___default()(options); + var createHistory = function createHistory() { + return memoryHistory; + }; + var history = __WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries___default()( + __WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename___default()(createHistory), + )(options); + return history; + } + + /***/ + }, + /* 361 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__useRouterHistory__ = __webpack_require__(363); + /* harmony export (immutable) */ __webpack_exports__['a'] = createRouterHistory; + + var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement); + + function createRouterHistory(createHistory) { + var history = void 0; + if (canUseDOM) + history = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__useRouterHistory__['a' /* default */])( + createHistory, + )(); + return history; + } + + /***/ + }, + /* 362 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__routerWarning__ = __webpack_require__(107); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__computeChangedRoutes__ = __webpack_require__(846); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__TransitionUtils__ = __webpack_require__(843); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isActive__ = __webpack_require__(850); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__getComponents__ = __webpack_require__(847); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__matchRoutes__ = __webpack_require__(852); + /* harmony export (immutable) */ __webpack_exports__['a'] = createTransitionManager; + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + function hasAnyProperties(object) { + for (var p in object) { + if (Object.prototype.hasOwnProperty.call(object, p)) return true; + } + return false; + } + + function createTransitionManager(history, routes) { + var state = {}; + + var _getTransitionUtils = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_2__TransitionUtils__['a' /* default */], + )(), + runEnterHooks = _getTransitionUtils.runEnterHooks, + runChangeHooks = _getTransitionUtils.runChangeHooks, + runLeaveHooks = _getTransitionUtils.runLeaveHooks; + + // Signature should be (location, indexOnly), but needs to support (path, + // query, indexOnly) + + function isActive(location, indexOnly) { + location = history.createLocation(location); + + return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__isActive__['a' /* default */])( + location, + indexOnly, + state.location, + state.routes, + state.params, + ); + } + + var partialNextState = void 0; + + function match(location, callback) { + if (partialNextState && partialNextState.location === location) { + // Continue from where we left off. + finishMatch(partialNextState, callback); + } else { + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__matchRoutes__['a' /* default */])( + routes, + location, + function (error, nextState) { + if (error) { + callback(error); + } else if (nextState) { + finishMatch(_extends({}, nextState, { location: location }), callback); + } else { + callback(); + } + }, + ); + } + } + + function finishMatch(nextState, callback) { + var _computeChangedRoutes = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_1__computeChangedRoutes__['a' /* default */], + )(state, nextState), + leaveRoutes = _computeChangedRoutes.leaveRoutes, + changeRoutes = _computeChangedRoutes.changeRoutes, + enterRoutes = _computeChangedRoutes.enterRoutes; + + runLeaveHooks(leaveRoutes, state); + + // Tear down confirmation hooks for left routes + leaveRoutes + .filter(function (route) { + return enterRoutes.indexOf(route) === -1; + }) + .forEach(removeListenBeforeHooksForRoute); + + // change and enter hooks are run in series + runChangeHooks(changeRoutes, state, nextState, function (error, redirectInfo) { + if (error || redirectInfo) return handleErrorOrRedirect(error, redirectInfo); + + runEnterHooks(enterRoutes, nextState, finishEnterHooks); + }); + + function finishEnterHooks(error, redirectInfo) { + if (error || redirectInfo) return handleErrorOrRedirect(error, redirectInfo); + + // TODO: Fetch components after state is updated. + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__getComponents__['a' /* default */])( + nextState, + function (error, components) { + if (error) { + callback(error); + } else { + // TODO: Make match a pure function and have some other API + // for "match and update state". + callback(null, null, (state = _extends({}, nextState, { components: components }))); + } + }, + ); + } + + function handleErrorOrRedirect(error, redirectInfo) { + if (error) callback(error); + else callback(null, redirectInfo); + } + } + + var RouteGuid = 1; + + function getRouteID(route) { + var create = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + + return route.__id__ || (create && (route.__id__ = RouteGuid++)); + } + + var RouteHooks = Object.create(null); + + function getRouteHooksForRoutes(routes) { + return routes + .map(function (route) { + return RouteHooks[getRouteID(route)]; + }) + .filter(function (hook) { + return hook; + }); + } + + function transitionHook(location, callback) { + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__matchRoutes__['a' /* default */])( + routes, + location, + function (error, nextState) { + if (nextState == null) { + // TODO: We didn't actually match anything, but hang + // onto error/nextState so we don't have to matchRoutes + // again in the listen callback. + callback(); + return; + } + + // Cache some state here so we don't have to + // matchRoutes() again in the listen callback. + partialNextState = _extends({}, nextState, { location: location }); + + var hooks = getRouteHooksForRoutes( + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__computeChangedRoutes__['a' /* default */])( + state, + partialNextState, + ).leaveRoutes, + ); + + var result = void 0; + for (var i = 0, len = hooks.length; result == null && i < len; ++i) { + // Passing the location arg here indicates to + // the user that this is a transition hook. + result = hooks[i](location); + } + + callback(result); + }, + ); + } + + /* istanbul ignore next: untestable with Karma */ + function beforeUnloadHook() { + // Synchronously check to see if any route hooks want + // to prevent the current window/tab from closing. + if (state.routes) { + var hooks = getRouteHooksForRoutes(state.routes); + + var message = void 0; + for (var i = 0, len = hooks.length; typeof message !== 'string' && i < len; ++i) { + // Passing no args indicates to the user that this is a + // beforeunload hook. We don't know the next location. + message = hooks[i](); + } + + return message; + } + } + + var unlistenBefore = void 0, + unlistenBeforeUnload = void 0; + + function removeListenBeforeHooksForRoute(route) { + var routeID = getRouteID(route); + if (!routeID) { + return; + } + + delete RouteHooks[routeID]; + + if (!hasAnyProperties(RouteHooks)) { + // teardown transition & beforeunload hooks + if (unlistenBefore) { + unlistenBefore(); + unlistenBefore = null; + } + + if (unlistenBeforeUnload) { + unlistenBeforeUnload(); + unlistenBeforeUnload = null; + } + } + } + + /** + * Registers the given hook function to run before leaving the given route. + * + * During a normal transition, the hook function receives the next location + * as its only argument and can return either a prompt message (string) to show the user, + * to make sure they want to leave the page; or `false`, to prevent the transition. + * Any other return value will have no effect. + * + * During the beforeunload event (in browsers) the hook receives no arguments. + * In this case it must return a prompt message to prevent the transition. + * + * Returns a function that may be used to unbind the listener. + */ + function listenBeforeLeavingRoute(route, hook) { + var thereWereNoRouteHooks = !hasAnyProperties(RouteHooks); + var routeID = getRouteID(route, true); + + RouteHooks[routeID] = hook; + + if (thereWereNoRouteHooks) { + // setup transition & beforeunload hooks + unlistenBefore = history.listenBefore(transitionHook); + + if (history.listenBeforeUnload) + unlistenBeforeUnload = history.listenBeforeUnload(beforeUnloadHook); + } + + return function () { + removeListenBeforeHooksForRoute(route); + }; + } + + /** + * This is the API for stateful environments. As the location + * changes, we update state and call the listener. We can also + * gracefully handle errors and redirects. + */ + function listen(listener) { + function historyListener(location) { + if (state.location === location) { + listener(null, state); + } else { + match(location, function (error, redirectLocation, nextState) { + if (error) { + listener(error); + } else if (redirectLocation) { + history.replace(redirectLocation); + } else if (nextState) { + listener(null, nextState); + } else { + true + ? __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__routerWarning__['a' /* default */])( + false, + 'Location "%s" did not match any routes', + location.pathname + location.search + location.hash, + ) + : void 0; + } + }); + } + } + + // TODO: Only use a single history listener. Otherwise we'll end up with + // multiple concurrent calls to match. + + // Set up the history listener first in case the initial match redirects. + var unsubscribe = history.listen(historyListener); + + if (state.location) { + // Picking up on a matchContext. + listener(null, state); + } else { + historyListener(history.getCurrentLocation()); + } + + return unsubscribe; + } + + return { + isActive: isActive, + match: match, + listenBeforeLeavingRoute: listenBeforeLeavingRoute, + listen: listen, + }; + } + + /***/ + }, + /* 363 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries__ = + __webpack_require__(306); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename__ = + __webpack_require__(305); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename__); + /* harmony export (immutable) */ __webpack_exports__['a'] = useRouterHistory; + + function useRouterHistory(createHistory) { + return function (options) { + var history = __WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries___default()( + __WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename___default()(createHistory), + )(options); + return history; + }; + } + + /***/ + }, + /* 364 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + + var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; + + module.exports = ReactPropTypesSecret; + + /***/ + }, + /* 365 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + + var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; + + module.exports = ReactPropTypesSecret; + + /***/ + }, + /* 366 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + /** + * Escape and wrap key so it is safe to use as a reactid + * + * @param {string} key to be escaped. + * @return {string} the escaped key. + */ + + function escape(key) { + var escapeRegex = /[=:]/g; + var escaperLookup = { + '=': '=0', + ':': '=2', + }; + var escapedString = ('' + key).replace(escapeRegex, function (match) { + return escaperLookup[match]; + }); + + return '$' + escapedString; + } + + /** + * Unescape and unwrap key for human-readable display + * + * @param {string} key to unescape. + * @return {string} the unescaped key. + */ + function unescape(key) { + var unescapeRegex = /(=0|=2)/g; + var unescaperLookup = { + '=0': '=', + '=2': ':', + }; + var keySubstring = key[0] === '.' && key[1] === '$' ? key.substring(2) : key.substring(1); + + return ('' + keySubstring).replace(unescapeRegex, function (match) { + return unescaperLookup[match]; + }); + } + + var KeyEscapeUtils = { + escape: escape, + unescape: unescape, + }; + + module.exports = KeyEscapeUtils; + + /***/ + }, + /* 367 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2014-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + // The Symbol used to tag the ReactElement type. If there is no native Symbol + // nor polyfill, then a plain number is used for performance. + + var REACT_ELEMENT_TYPE = + (typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.element')) || 0xeac7; + + module.exports = REACT_ELEMENT_TYPE; + + /***/ + }, + /* 368 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2014-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + /** + * ReactElementValidator provides a wrapper around a element factory + * which validates the props passed to the element. This is intended to be + * used only in DEV and could be replaced by a static type checker for languages + * that support it. + */ + + var ReactCurrentOwner = __webpack_require__(53); + var ReactComponentTreeHook = __webpack_require__(24); + var ReactElement = __webpack_require__(86); + + var checkReactTypeSpec = __webpack_require__(879); + + var canDefineProperty = __webpack_require__(152); + var getIteratorFn = __webpack_require__(370); + var warning = __webpack_require__(4); + + function getDeclarationErrorAddendum() { + if (ReactCurrentOwner.current) { + var name = ReactCurrentOwner.current.getName(); + if (name) { + return ' Check the render method of `' + name + '`.'; + } + } + return ''; + } + + function getSourceInfoErrorAddendum(elementProps) { + if (elementProps !== null && elementProps !== undefined && elementProps.__source !== undefined) { + var source = elementProps.__source; + var fileName = source.fileName.replace(/^.*[\\\/]/, ''); + var lineNumber = source.lineNumber; + return ' Check your code at ' + fileName + ':' + lineNumber + '.'; + } + return ''; + } + + /** + * Warn if there's no key explicitly set on dynamic arrays of children or + * object keys are not valid. This allows us to keep track of children between + * updates. + */ + var ownerHasKeyUseWarning = {}; + + function getCurrentComponentErrorInfo(parentType) { + var info = getDeclarationErrorAddendum(); + + if (!info) { + var parentName = + typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name; + if (parentName) { + info = ' Check the top-level render call using <' + parentName + '>.'; + } + } + return info; + } + + /** + * Warn if the element doesn't have an explicit key assigned to it. + * This element is in an array. The array could grow and shrink or be + * reordered. All children that haven't already been validated are required to + * have a "key" property assigned to it. Error statuses are cached so a warning + * will only be shown once. + * + * @internal + * @param {ReactElement} element Element that requires a key. + * @param {*} parentType element's parent's type. + */ + function validateExplicitKey(element, parentType) { + if (!element._store || element._store.validated || element.key != null) { + return; + } + element._store.validated = true; + + var memoizer = ownerHasKeyUseWarning.uniqueKey || (ownerHasKeyUseWarning.uniqueKey = {}); + + var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType); + if (memoizer[currentComponentErrorInfo]) { + return; + } + memoizer[currentComponentErrorInfo] = true; + + // Usually the current owner is the offender, but if it accepts children as a + // property, it may be the creator of the child that's responsible for + // assigning it a key. + var childOwner = ''; + if (element && element._owner && element._owner !== ReactCurrentOwner.current) { + // Give the component that originally created this child. + childOwner = ' It was passed a child from ' + element._owner.getName() + '.'; + } + + true + ? warning( + false, + 'Each child in an array or iterator should have a unique "key" prop.' + + '%s%s See https://fb.me/react-warning-keys for more information.%s', + currentComponentErrorInfo, + childOwner, + ReactComponentTreeHook.getCurrentStackAddendum(element), + ) + : void 0; + } + + /** + * Ensure that every element either is passed in a static location, in an + * array with an explicit keys property defined, or in an object literal + * with valid key property. + * + * @internal + * @param {ReactNode} node Statically passed child of any type. + * @param {*} parentType node's parent's type. + */ + function validateChildKeys(node, parentType) { + if (typeof node !== 'object') { + return; + } + if (Array.isArray(node)) { + for (var i = 0; i < node.length; i++) { + var child = node[i]; + if (ReactElement.isValidElement(child)) { + validateExplicitKey(child, parentType); + } + } + } else if (ReactElement.isValidElement(node)) { + // This element was passed in a valid location. + if (node._store) { + node._store.validated = true; + } + } else if (node) { + var iteratorFn = getIteratorFn(node); + // Entry iterators provide implicit keys. + if (iteratorFn) { + if (iteratorFn !== node.entries) { + var iterator = iteratorFn.call(node); + var step; + while (!(step = iterator.next()).done) { + if (ReactElement.isValidElement(step.value)) { + validateExplicitKey(step.value, parentType); + } + } + } + } + } + } + + /** + * Given an element, validate that its props follow the propTypes definition, + * provided by the type. + * + * @param {ReactElement} element + */ + function validatePropTypes(element) { + var componentClass = element.type; + if (typeof componentClass !== 'function') { + return; + } + var name = componentClass.displayName || componentClass.name; + if (componentClass.propTypes) { + checkReactTypeSpec(componentClass.propTypes, element.props, 'prop', name, element, null); + } + if (typeof componentClass.getDefaultProps === 'function') { + true + ? warning( + componentClass.getDefaultProps.isReactClassApproved, + 'getDefaultProps is only used on classic React.createClass ' + + 'definitions. Use a static property named `defaultProps` instead.', + ) + : void 0; + } + } + + var ReactElementValidator = { + createElement: function (type, props, children) { + var validType = typeof type === 'string' || typeof type === 'function'; + // We warn in this case but don't throw. We expect the element creation to + // succeed and there will likely be errors in render. + if (!validType) { + if (typeof type !== 'function' && typeof type !== 'string') { + var info = ''; + if ( + type === undefined || + (typeof type === 'object' && type !== null && Object.keys(type).length === 0) + ) { + info += ' You likely forgot to export your component from the file ' + "it's defined in."; + } + + var sourceInfo = getSourceInfoErrorAddendum(props); + if (sourceInfo) { + info += sourceInfo; + } else { + info += getDeclarationErrorAddendum(); + } + + info += ReactComponentTreeHook.getCurrentStackAddendum(); + + true + ? warning( + false, + 'React.createElement: type is invalid -- expected a string (for ' + + 'built-in components) or a class/function (for composite ' + + 'components) but got: %s.%s', + type == null ? type : typeof type, + info, + ) + : void 0; + } + } + + var element = ReactElement.createElement.apply(this, arguments); + + // The result can be nullish if a mock or a custom function is used. + // TODO: Drop this when these are no longer allowed as the type argument. + if (element == null) { + return element; + } + + // Skip key warning if the type isn't valid since our key validation logic + // doesn't expect a non-string/function type and can throw confusing errors. + // We don't want exception behavior to differ between dev and prod. + // (Rendering will throw with a helpful message and as soon as the type is + // fixed, the key warnings will appear.) + if (validType) { + for (var i = 2; i < arguments.length; i++) { + validateChildKeys(arguments[i], type); + } + } + + validatePropTypes(element); + + return element; + }, + + createFactory: function (type) { + var validatedFactory = ReactElementValidator.createElement.bind(null, type); + // Legacy hook TODO: Warn if this is accessed + validatedFactory.type = type; + + if (true) { + if (canDefineProperty) { + Object.defineProperty(validatedFactory, 'type', { + enumerable: false, + get: function () { + true + ? warning( + false, + 'Factory.type is deprecated. Access the class directly ' + + 'before passing it to createFactory.', + ) + : void 0; + Object.defineProperty(this, 'type', { + value: type, + }); + return type; + }, + }); + } + } + + return validatedFactory; + }, + + cloneElement: function (element, props, children) { + var newElement = ReactElement.cloneElement.apply(this, arguments); + for (var i = 2; i < arguments.length; i++) { + validateChildKeys(arguments[i], newElement.type); + } + validatePropTypes(newElement); + return newElement; + }, + }; + + module.exports = ReactElementValidator; + + /***/ + }, + /* 369 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + var ReactPropTypeLocationNames = {}; + + if (true) { + ReactPropTypeLocationNames = { + prop: 'prop', + context: 'context', + childContext: 'child context', + }; + } + + module.exports = ReactPropTypeLocationNames; + + /***/ + }, + /* 370 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + /* global Symbol */ + + var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; + var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec. + + /** + * Returns the iterator method function contained on the iterable object. + * + * Be sure to invoke the function with the iterable as context: + * + * var iteratorFn = getIteratorFn(myIterable); + * if (iteratorFn) { + * var iterator = iteratorFn.call(myIterable); + * ... + * } + * + * @param {?object} maybeIterable + * @return {?function} + */ + function getIteratorFn(maybeIterable) { + var iteratorFn = + maybeIterable && + ((ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL]) || maybeIterable[FAUX_ITERATOR_SYMBOL]); + if (typeof iteratorFn === 'function') { + return iteratorFn; + } + } + + module.exports = getIteratorFn; + + /***/ + }, + /* 371 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + var nextDebugID = 1; + + function getNextDebugID() { + return nextDebugID++; + } + + module.exports = getNextDebugID; + + /***/ + }, + /* 372 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var _prodInvariant = __webpack_require__(87); + + var ReactElement = __webpack_require__(86); + + var invariant = __webpack_require__(3); + + /** + * Returns the first child in a collection of children and verifies that there + * is only one child in the collection. + * + * See https://facebook.github.io/react/docs/top-level-api.html#react.children.only + * + * The current implementation of this function assumes that a single child gets + * passed without a wrapper, but the purpose of this helper function is to + * abstract away the particular structure of children. + * + * @param {?object} children Child collection structure. + * @return {ReactElement} The first and only `ReactElement` contained in the + * structure. + */ + function onlyChild(children) { + !ReactElement.isValidElement(children) + ? true + ? invariant(false, 'React.Children.only expected to receive a single React element child.') + : _prodInvariant('143') + : void 0; + return children; + } + + module.exports = onlyChild; + + /***/ + }, + /* 373 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var _prodInvariant = __webpack_require__(87); + + var ReactCurrentOwner = __webpack_require__(53); + var REACT_ELEMENT_TYPE = __webpack_require__(367); + + var getIteratorFn = __webpack_require__(370); + var invariant = __webpack_require__(3); + var KeyEscapeUtils = __webpack_require__(366); + var warning = __webpack_require__(4); + + var SEPARATOR = '.'; + var SUBSEPARATOR = ':'; + + /** + * This is inlined from ReactElement since this file is shared between + * isomorphic and renderers. We could extract this to a + * + */ + + /** + * TODO: Test that a single child and an array with one item have the same key + * pattern. + */ + + var didWarnAboutMaps = false; + + /** + * Generate a key string that identifies a component within a set. + * + * @param {*} component A component that could contain a manual key. + * @param {number} index Index that is used if a manual key is not provided. + * @return {string} + */ + function getComponentKey(component, index) { + // Do some typechecking here since we call this blindly. We want to ensure + // that we don't block potential future ES APIs. + if (component && typeof component === 'object' && component.key != null) { + // Explicit key + return KeyEscapeUtils.escape(component.key); + } + // Implicit key determined by the index in the set + return index.toString(36); + } + + /** + * @param {?*} children Children tree container. + * @param {!string} nameSoFar Name of the key path so far. + * @param {!function} callback Callback to invoke with each child found. + * @param {?*} traverseContext Used to pass information throughout the traversal + * process. + * @return {!number} The number of children in this subtree. + */ + function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) { + var type = typeof children; + + if (type === 'undefined' || type === 'boolean') { + // All of the above are perceived as null. + children = null; + } + + if ( + children === null || + type === 'string' || + type === 'number' || + // The following is inlined from ReactElement. This means we can optimize + // some checks. React Fiber also inlines this logic for similar purposes. + (type === 'object' && children.$$typeof === REACT_ELEMENT_TYPE) + ) { + callback( + traverseContext, + children, + // If it's the only child, treat the name as if it was wrapped in an array + // so that it's consistent if the number of children grows. + nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar, + ); + return 1; + } + + var child; + var nextName; + var subtreeCount = 0; // Count of children found in the current subtree. + var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR; + + if (Array.isArray(children)) { + for (var i = 0; i < children.length; i++) { + child = children[i]; + nextName = nextNamePrefix + getComponentKey(child, i); + subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext); + } + } else { + var iteratorFn = getIteratorFn(children); + if (iteratorFn) { + var iterator = iteratorFn.call(children); + var step; + if (iteratorFn !== children.entries) { + var ii = 0; + while (!(step = iterator.next()).done) { + child = step.value; + nextName = nextNamePrefix + getComponentKey(child, ii++); + subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext); + } + } else { + if (true) { + var mapsAsChildrenAddendum = ''; + if (ReactCurrentOwner.current) { + var mapsAsChildrenOwnerName = ReactCurrentOwner.current.getName(); + if (mapsAsChildrenOwnerName) { + mapsAsChildrenAddendum = ' Check the render method of `' + mapsAsChildrenOwnerName + '`.'; + } + } + true + ? warning( + didWarnAboutMaps, + 'Using Maps as children is not yet fully supported. It is an ' + + 'experimental feature that might be removed. Convert it to a ' + + 'sequence / iterable of keyed ReactElements instead.%s', + mapsAsChildrenAddendum, + ) + : void 0; + didWarnAboutMaps = true; + } + // Iterator will provide entry [k,v] tuples rather than values. + while (!(step = iterator.next()).done) { + var entry = step.value; + if (entry) { + child = entry[1]; + nextName = + nextNamePrefix + + KeyEscapeUtils.escape(entry[0]) + + SUBSEPARATOR + + getComponentKey(child, 0); + subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext); + } + } + } + } else if (type === 'object') { + var addendum = ''; + if (true) { + addendum = + ' If you meant to render a collection of children, use an array ' + + 'instead or wrap the object using createFragment(object) from the ' + + 'React add-ons.'; + if (children._isReactElement) { + addendum = + " It looks like you're using an element created by a different " + + 'version of React. Make sure to use only one copy of React.'; + } + if (ReactCurrentOwner.current) { + var name = ReactCurrentOwner.current.getName(); + if (name) { + addendum += ' Check the render method of `' + name + '`.'; + } + } + } + var childrenString = String(children); + true + ? true + ? invariant( + false, + 'Objects are not valid as a React child (found: %s).%s', + childrenString === '[object Object]' + ? 'object with keys {' + Object.keys(children).join(', ') + '}' + : childrenString, + addendum, + ) + : _prodInvariant( + '31', + childrenString === '[object Object]' + ? 'object with keys {' + Object.keys(children).join(', ') + '}' + : childrenString, + addendum, + ) + : void 0; + } + } + + return subtreeCount; + } + + /** + * Traverses children that are typically specified as `props.children`, but + * might also be specified through attributes: + * + * - `traverseAllChildren(this.props.children, ...)` + * - `traverseAllChildren(this.props.leftPanelChildren, ...)` + * + * The `traverseContext` is an optional argument that is passed through the + * entire traversal. It can be used to store accumulations or anything else that + * the callback might find relevant. + * + * @param {?*} children Children tree object. + * @param {!function} callback To invoke upon traversing each child. + * @param {?*} traverseContext Context for traversal. + * @return {!number} The number of children in this subtree. + */ + function traverseAllChildren(children, callback, traverseContext) { + if (children == null) { + return 0; + } + + return traverseAllChildrenImpl(children, '', callback, traverseContext); + } + + module.exports = traverseAllChildren; + + /***/ + }, + /* 374 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = compose; + /** + * Composes single-argument functions from right to left. The rightmost + * function can take multiple arguments as it provides the signature for + * the resulting composite function. + * + * @param {...Function} funcs The functions to compose. + * @returns {Function} A function obtained by composing the argument functions + * from right to left. For example, compose(f, g, h) is identical to doing + * (...args) => f(g(h(...args))). + */ + + function compose() { + for (var _len = arguments.length, funcs = Array(_len), _key = 0; _key < _len; _key++) { + funcs[_key] = arguments[_key]; + } + + if (funcs.length === 0) { + return function (arg) { + return arg; + }; + } + + if (funcs.length === 1) { + return funcs[0]; + } + + var last = funcs[funcs.length - 1]; + var rest = funcs.slice(0, -1); + return function () { + return rest.reduceRight( + function (composed, f) { + return f(composed); + }, + last.apply(undefined, arguments), + ); + }; + } + + /***/ + }, + /* 375 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_isPlainObject__ = + __webpack_require__(199); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_symbol_observable__ = __webpack_require__(887); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_symbol_observable___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_symbol_observable__); + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'b', function () { + return ActionTypes; + }); + /* harmony export (immutable) */ __webpack_exports__['a'] = createStore; + + /** + * These are private action types reserved by Redux. + * For any unknown actions, you must return the current state. + * If the current state is undefined, you must return the initial state. + * Do not reference these action types directly in your code. + */ + var ActionTypes = { + INIT: '@@redux/INIT', + }; + + /** + * Creates a Redux store that holds the state tree. + * The only way to change the data in the store is to call `dispatch()` on it. + * + * There should only be a single store in your app. To specify how different + * parts of the state tree respond to actions, you may combine several reducers + * into a single reducer function by using `combineReducers`. + * + * @param {Function} reducer A function that returns the next state tree, given + * the current state tree and the action to handle. + * + * @param {any} [preloadedState] The initial state. You may optionally specify it + * to hydrate the state from the server in universal apps, or to restore a + * previously serialized user session. + * If you use `combineReducers` to produce the root reducer function, this must be + * an object with the same shape as `combineReducers` keys. + * + * @param {Function} enhancer The store enhancer. You may optionally specify it + * to enhance the store with third-party capabilities such as middleware, + * time travel, persistence, etc. The only store enhancer that ships with Redux + * is `applyMiddleware()`. + * + * @returns {Store} A Redux store that lets you read the state, dispatch actions + * and subscribe to changes. + */ + function createStore(reducer, preloadedState, enhancer) { + var _ref2; + + if (typeof preloadedState === 'function' && typeof enhancer === 'undefined') { + enhancer = preloadedState; + preloadedState = undefined; + } + + if (typeof enhancer !== 'undefined') { + if (typeof enhancer !== 'function') { + throw new Error('Expected the enhancer to be a function.'); + } + + return enhancer(createStore)(reducer, preloadedState); + } + + if (typeof reducer !== 'function') { + throw new Error('Expected the reducer to be a function.'); + } + + var currentReducer = reducer; + var currentState = preloadedState; + var currentListeners = []; + var nextListeners = currentListeners; + var isDispatching = false; + + function ensureCanMutateNextListeners() { + if (nextListeners === currentListeners) { + nextListeners = currentListeners.slice(); + } + } + + /** + * Reads the state tree managed by the store. + * + * @returns {any} The current state tree of your application. + */ + function getState() { + return currentState; + } + + /** + * Adds a change listener. It will be called any time an action is dispatched, + * and some part of the state tree may potentially have changed. You may then + * call `getState()` to read the current state tree inside the callback. + * + * You may call `dispatch()` from a change listener, with the following + * caveats: + * + * 1. The subscriptions are snapshotted just before every `dispatch()` call. + * If you subscribe or unsubscribe while the listeners are being invoked, this + * will not have any effect on the `dispatch()` that is currently in progress. + * However, the next `dispatch()` call, whether nested or not, will use a more + * recent snapshot of the subscription list. + * + * 2. The listener should not expect to see all state changes, as the state + * might have been updated multiple times during a nested `dispatch()` before + * the listener is called. It is, however, guaranteed that all subscribers + * registered before the `dispatch()` started will be called with the latest + * state by the time it exits. + * + * @param {Function} listener A callback to be invoked on every dispatch. + * @returns {Function} A function to remove this change listener. + */ + function subscribe(listener) { + if (typeof listener !== 'function') { + throw new Error('Expected listener to be a function.'); + } + + var isSubscribed = true; + + ensureCanMutateNextListeners(); + nextListeners.push(listener); + + return function unsubscribe() { + if (!isSubscribed) { + return; + } + + isSubscribed = false; + + ensureCanMutateNextListeners(); + var index = nextListeners.indexOf(listener); + nextListeners.splice(index, 1); + }; + } + + /** + * Dispatches an action. It is the only way to trigger a state change. + * + * The `reducer` function, used to create the store, will be called with the + * current state tree and the given `action`. Its return value will + * be considered the **next** state of the tree, and the change listeners + * will be notified. + * + * The base implementation only supports plain object actions. If you want to + * dispatch a Promise, an Observable, a thunk, or something else, you need to + * wrap your store creating function into the corresponding middleware. For + * example, see the documentation for the `redux-thunk` package. Even the + * middleware will eventually dispatch plain object actions using this method. + * + * @param {Object} action A plain object representing “what changed”. It is + * a good idea to keep actions serializable so you can record and replay user + * sessions, or use the time travelling `redux-devtools`. An action must have + * a `type` property which may not be `undefined`. It is a good idea to use + * string constants for action types. + * + * @returns {Object} For convenience, the same action object you dispatched. + * + * Note that, if you use a custom middleware, it may wrap `dispatch()` to + * return something else (for example, a Promise you can await). + */ + function dispatch(action) { + if ( + !__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0_lodash_es_isPlainObject__['a' /* default */])( + action, + ) + ) { + throw new Error('Actions must be plain objects. ' + 'Use custom middleware for async actions.'); + } + + if (typeof action.type === 'undefined') { + throw new Error( + 'Actions may not have an undefined "type" property. ' + 'Have you misspelled a constant?', + ); + } + + if (isDispatching) { + throw new Error('Reducers may not dispatch actions.'); + } + + try { + isDispatching = true; + currentState = currentReducer(currentState, action); + } finally { + isDispatching = false; + } + + var listeners = (currentListeners = nextListeners); + for (var i = 0; i < listeners.length; i++) { + listeners[i](); + } + + return action; + } + + /** + * Replaces the reducer currently used by the store to calculate the state. + * + * You might need this if your app implements code splitting and you want to + * load some of the reducers dynamically. You might also need this if you + * implement a hot reloading mechanism for Redux. + * + * @param {Function} nextReducer The reducer for the store to use instead. + * @returns {void} + */ + function replaceReducer(nextReducer) { + if (typeof nextReducer !== 'function') { + throw new Error('Expected the nextReducer to be a function.'); + } + + currentReducer = nextReducer; + dispatch({ type: ActionTypes.INIT }); + } + + /** + * Interoperability point for observable/reactive libraries. + * @returns {observable} A minimal observable of state changes. + * For more information, see the observable proposal: + * https://github.com/zenparsing/es-observable + */ + function observable() { + var _ref; + + var outerSubscribe = subscribe; + return ( + (_ref = { + /** + * The minimal observable subscription method. + * @param {Object} observer Any object that can be used as an observer. + * The observer object should have a `next` method. + * @returns {subscription} An object with an `unsubscribe` method that can + * be used to unsubscribe the observable from the store, and prevent further + * emission of values from the observable. + */ + subscribe: function subscribe(observer) { + if (typeof observer !== 'object') { + throw new TypeError('Expected the observer to be an object.'); + } + + function observeState() { + if (observer.next) { + observer.next(getState()); + } + } + + observeState(); + var unsubscribe = outerSubscribe(observeState); + return { unsubscribe: unsubscribe }; + }, + }), + (_ref[__WEBPACK_IMPORTED_MODULE_1_symbol_observable___default.a] = function () { + return this; + }), + _ref + ); + } + + // When a store is created, an "INIT" action is dispatched so that every + // reducer returns their initial state. This effectively populates + // the initial state tree. + dispatch({ type: ActionTypes.INIT }); + + return ( + (_ref2 = { + dispatch: dispatch, + subscribe: subscribe, + getState: getState, + replaceReducer: replaceReducer, + }), + (_ref2[__WEBPACK_IMPORTED_MODULE_1_symbol_observable___default.a] = observable), + _ref2 + ); + } + + /***/ + }, + /* 376 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createStore__ = __webpack_require__(375); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__combineReducers__ = __webpack_require__(884); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__bindActionCreators__ = __webpack_require__(883); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__applyMiddleware__ = __webpack_require__(882); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__compose__ = __webpack_require__(374); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__utils_warning__ = __webpack_require__(377); + /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, 'c', function () { + return __WEBPACK_IMPORTED_MODULE_0__createStore__['a']; + }); + /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, 'a', function () { + return __WEBPACK_IMPORTED_MODULE_1__combineReducers__['a']; + }); + /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, 'e', function () { + return __WEBPACK_IMPORTED_MODULE_2__bindActionCreators__['a']; + }); + /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, 'd', function () { + return __WEBPACK_IMPORTED_MODULE_3__applyMiddleware__['a']; + }); + /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, 'b', function () { + return __WEBPACK_IMPORTED_MODULE_4__compose__['a']; + }); + + /* + * This is a dummy function to check if the function name has been altered by minification. + * If the function has been minified and NODE_ENV !== 'production', warn the user. + */ + function isCrushed() {} + + if ( + 'development' !== 'production' && + typeof isCrushed.name === 'string' && + isCrushed.name !== 'isCrushed' + ) { + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__utils_warning__['a' /* default */])( + "You are currently using minified code outside of NODE_ENV === 'production'. " + + 'This means that you are running a slower development build of Redux. ' + + 'You can use loose-envify (https://github.com/zertosh/loose-envify) for browserify ' + + 'or DefinePlugin for webpack (http://stackoverflow.com/questions/30030031) ' + + 'to ensure you have the correct code for your production build.', + ); + } + + /***/ + }, + /* 377 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = warning; + /** + * Prints a warning in the console if it exists. + * + * @param {String} message The warning message. + * @returns {void} + */ + function warning(message) { + /* eslint-disable no-console */ + if (typeof console !== 'undefined' && typeof console.error === 'function') { + console.error(message); + } + /* eslint-enable no-console */ + try { + // This error was thrown as a convenience so that if you enable + // "break on all exceptions" in your console, + // it would pause the execution at this line. + throw new Error(message); + /* eslint-disable no-empty */ + } catch (e) {} + /* eslint-enable no-empty */ + } + + /***/ + }, + /* 378 */ + /***/ function (module, exports) { + module.exports = function () { + throw new Error('define cannot be used indirect'); + }; + + /***/ + }, + /* 379 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + Object.defineProperty(__webpack_exports__, '__esModule', { value: true }); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__ServerAppGenerator__ = __webpack_require__(476); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_on_rails__ = __webpack_require__(816); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_on_rails___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_react_on_rails__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Store__ = __webpack_require__(382); + + __WEBPACK_IMPORTED_MODULE_1_react_on_rails___default.a.register({ + App: __WEBPACK_IMPORTED_MODULE_0__ServerAppGenerator__['a' /* default */], + }); + + __WEBPACK_IMPORTED_MODULE_1_react_on_rails___default.a.registerStore({ + Store: __WEBPACK_IMPORTED_MODULE_2__Store__['a' /* default */], + }); + + /***/ + }, + /* 380 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (global) { + __webpack_require__(702); + + __webpack_require__(479); + + __webpack_require__(480); + + if (global._babelPolyfill) { + throw new Error('only one instance of babel-polyfill is allowed'); + } + global._babelPolyfill = true; + + var DEFINE_PROPERTY = 'defineProperty'; + function define(O, key, value) { + O[key] || + Object[DEFINE_PROPERTY](O, key, { + writable: true, + configurable: true, + value: value, + }); + } + + define(String.prototype, 'padLeft', ''.padStart); + define(String.prototype, 'padRight', ''.padEnd); + + 'pop,reverse,shift,keys,values,entries,indexOf,every,some,forEach,map,filter,find,findIndex,includes,join,slice,concat,push,splice,unshift,sort,lastIndexOf,reduce,reduceRight,copyWithin,fill' + .split(',') + .forEach(function (key) { + [][key] && define(Array, key, Function.call.bind([][key])); + }); + /* WEBPACK VAR INJECTION */ + }).call(exports, __webpack_require__(108)); + + /***/ + }, + /* 381 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + module.exports = function (arr) { + if (!Array.isArray(arr)) { + throw new TypeError('Expected Array, got ' + typeof arr); + } + + var rand; + var tmp; + var len = arr.length; + var ret = arr.slice(); + + while (len) { + rand = Math.floor(Math.random() * len--); + tmp = ret[len]; + ret[len] = ret[rand]; + ret[rand] = tmp; + } + + return ret; + }; + + /***/ + }, + /* 382 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_redux__ = __webpack_require__(376); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_app_utils_PaginationKeyUtil__ = + __webpack_require__(26); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_redux_thunk__ = __webpack_require__(881); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_redux_thunk___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_2_redux_thunk__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__reducers_reducersIndex__ = + __webpack_require__(473); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_app_actions_flashesActions__ = + __webpack_require__(231); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_app_actions_sharedActions__ = + __webpack_require__(127); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_app_actions_currentUserActions__ = + __webpack_require__(21); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_app_records_entities_RailsContextRecord__ = + __webpack_require__(463); + var _typeof = + typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' + ? function (obj) { + return typeof obj; + } + : function (obj) { + return obj && + typeof Symbol === 'function' && + obj.constructor === Symbol && + obj !== Symbol.prototype + ? 'symbol' + : typeof obj; + }; + + /** + * Exports a function that takes the props and returns a Redux store. This is used so that 2 components can have the + * same store. + */ + /* harmony default export */ __webpack_exports__['a'] = function (props, railsContext) { + var combinedReducer = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_0_redux__['a' /* combineReducers */], + )(__WEBPACK_IMPORTED_MODULE_3__reducers_reducersIndex__['a' /* default */]); + var initialState = { + railsContext: new __WEBPACK_IMPORTED_MODULE_7_app_records_entities_RailsContextRecord__[ + 'a' /* default */ + ](railsContext), + }; + + // Use custom enhancers composer if Redux devtools are installed: + var composeEnhancers = + 'development' !== 'production' && + (typeof window === 'undefined' ? 'undefined' : _typeof(window)) === 'object' && + window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ + ? window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ + : __WEBPACK_IMPORTED_MODULE_0_redux__['b' /* compose */]; + + // Create store: + var store = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0_redux__['c' /* createStore */])( + combinedReducer, + initialState, + composeEnhancers( + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0_redux__['d' /* applyMiddleware */])( + __WEBPACK_IMPORTED_MODULE_2_redux_thunk___default.a, + ), + ), + ); + + if (props.flashes_init_data) { + props.flashes_init_data.forEach(function (flash) { + var addFlashMessageAction = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_4_app_actions_flashesActions__['a' /* addFlashMessage */], + )(flash); + store.dispatch(addFlashMessageAction); + }); + } + + if (props.posts_init_data) { + var bootstrapPostsPageDataAction = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_5_app_actions_sharedActions__['a' /* bootstrapPostsPageData */], + )( + props.posts_init_data, + __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_1_app_utils_PaginationKeyUtil__['a' /* calculatePaginationKey */], + )(railsContext.pathname, railsContext.search), + ); + store.dispatch(bootstrapPostsPageDataAction); + } + + if (props.post_init_data) { + var bootstrapPostPageDataAction = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_5_app_actions_sharedActions__['b' /* bootstrapPostPageData */], + )( + props.post_init_data, + __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_1_app_utils_PaginationKeyUtil__['a' /* calculatePaginationKey */], + )(railsContext.pathname, railsContext.search), + ); + store.dispatch(bootstrapPostPageDataAction); + } + + if (props.author_init_data) { + var bootstrapAuthorPageDataAction = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_5_app_actions_sharedActions__['c' /* bootstrapAuthorPageData */], + )( + props.author_init_data, + __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_1_app_utils_PaginationKeyUtil__['a' /* calculatePaginationKey */], + )(railsContext.pathname, railsContext.search), + ); + store.dispatch(bootstrapAuthorPageDataAction); + } + + if (props.authors_init_data) { + var bootstrapAuthorsPageDataAction = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_5_app_actions_sharedActions__['d' /* bootstrapAuthorsPageData */], + )( + props.authors_init_data, + __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_1_app_utils_PaginationKeyUtil__['a' /* calculatePaginationKey */], + )(railsContext.pathname, railsContext.search), + ); + store.dispatch(bootstrapAuthorsPageDataAction); + } + + if (props.current_user_init_error) { + var failedReceiveCurrentUserAction = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_6_app_actions_currentUserActions__['a' /* signInCurrentUserFailed */], + )(props.current_user_init_error); + store.dispatch(failedReceiveCurrentUserAction); + } + + if (props.current_user_init_data) { + var signInCurrentUserSucceedAction = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_6_app_actions_currentUserActions__['b' /* bootstrapCurrentUser */], + )(props.current_user_init_data.current_user); + store.dispatch(signInCurrentUserSucceedAction); + } + + return store; + }; + + /***/ + }, + /* 383 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__constants_PostsConstants__ = + __webpack_require__(130); + /* unused harmony export requestPosts */ + /* unused harmony export receivePosts */ + /* harmony export (immutable) */ __webpack_exports__['a'] = fetchPosts; + + /** + * + */ + function requestPosts() { + return { + type: __WEBPACK_IMPORTED_MODULE_0__constants_PostsConstants__['a' /* REQUEST_POSTS */], + }; + } + + /** + * + */ + function receivePosts(json, paginationKey) { + return { + type: __WEBPACK_IMPORTED_MODULE_0__constants_PostsConstants__['b' /* RECEIVE_POSTS */], + json: json, + paginationKey: paginationKey, + }; + } + + /** + * + */ + function fetchPosts(paginationKey, query) { + return function (dispatch) { + // Dispacth REQUEST_POSTS to move posts collection to pending state: + dispatch(requestPosts()); + + /* return fetch(`/posts.json?page=${page}`) + .then((response) => { return response.json(); }) + .then((json) => { dispatch(receivePosts(json, paginationKey)); }); */ + + jQuery.ajax({ + url: '/posts.json', + dataType: 'json', + data: query, + cache: false, + success: function success(pageData) { + dispatch(receivePosts(pageData, paginationKey)); + }, + error: function error(jqXHR) { + dispatch(failFetchPostPageDataState(jqXHR.error)); + }, + }); + }; + } + + /***/ + }, + /* 384 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (React) { + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__layout_ScrollSpy__ = __webpack_require__(399); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__layout_Flashes__ = __webpack_require__(395); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__layout_Header__ = __webpack_require__(397); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__layout_Content__ = __webpack_require__(394); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__layout_Footer__ = __webpack_require__(396); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__layout_PhotoSwipeRoot__ = + __webpack_require__(398); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var Layout = (function (_React$Component) { + _inherits(Layout, _React$Component); + + function Layout() { + _classCallCheck(this, Layout); + + return _possibleConstructorReturn( + this, + (Layout.__proto__ || Object.getPrototypeOf(Layout)).apply(this, arguments), + ); + } + + _createClass(Layout, [ + { + key: 'render', + + /** + * + */ + value: function render() { + return React.createElement( + 'div', + { id: 'layout' }, + React.createElement( + __WEBPACK_IMPORTED_MODULE_0__layout_ScrollSpy__['a' /* default */], + null, + ), + React.createElement( + __WEBPACK_IMPORTED_MODULE_1__layout_Flashes__['a' /* default */], + this.props, + ), + React.createElement( + 'div', + { id: 'header-and-content-wrap' }, + React.createElement( + __WEBPACK_IMPORTED_MODULE_2__layout_Header__['a' /* default */], + this.props, + ), + React.createElement( + __WEBPACK_IMPORTED_MODULE_3__layout_Content__['a' /* default */], + this.props, + ), + React.createElement('div', { id: 'push-footer' }), + ), + React.createElement(__WEBPACK_IMPORTED_MODULE_4__layout_Footer__['a' /* default */], null), + React.createElement( + __WEBPACK_IMPORTED_MODULE_5__layout_PhotoSwipeRoot__['a' /* default */], + null, + ), + ); + }, + }, + ]); + + return Layout; + })(React.Component); + + /* harmony default export */ __webpack_exports__['a'] = Layout; + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(1)); + + /***/ + }, + /* 385 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (React) { + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(2); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_helmet__ = __webpack_require__(44); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_helmet___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_react_helmet__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_immutable__ = __webpack_require__(18); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_immutable___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_2_immutable__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_app_records_entities_AuthorRecord__ = + __webpack_require__(46); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__author_PostsCount__ = __webpack_require__(387); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__author_Tags__ = __webpack_require__(388); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__author_FeedbackFormInitializer__ = + __webpack_require__(386); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var Author = (function (_React$Component) { + _inherits(Author, _React$Component); + + function Author() { + _classCallCheck(this, Author); + + return _possibleConstructorReturn( + this, + (Author.__proto__ || Object.getPrototypeOf(Author)).apply(this, arguments), + ); + } + + _createClass(Author, [ + { + key: 'render', + + /** + * + */ + value: function render() { + var author = this.props.author; + + return React.createElement( + 'div', + { id: 'author', className: 'page-content' }, + React.createElement( + __WEBPACK_IMPORTED_MODULE_1_react_helmet__['Helmet'], + null, + React.createElement('title', null, 'Bionic Workshop | ' + author.get('name')), + React.createElement('meta', { + name: 'description', + content: + '\u041F\u043E\u0434\u0440\u043E\u0431\u043D\u0430\u044F \u0438\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u044F \u043E\u0431 \u0430\u0432\u0442\u043E\u0440\u0435 \u043F\u0443\u0431\u043B\u0438\u043A\u0430\u0446\u0438\u0439 \u043F\u043E \u0438\u043C\u0435\u043D\u0438 ' + + author.get('name') + + '. \u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u0441\u0442\u0430\u0442\u0435\u0439 ' + + 'и тэги автора.', + }), + ), + React.createElement( + 'div', + { className: 'container' }, + React.createElement( + 'div', + { className: 'row' }, + React.createElement( + 'div', + { className: 'col-md-12' }, + React.createElement('h2', { className: 'text-center' }, author.get('name')), + React.createElement( + 'div', + { className: 'row' }, + React.createElement( + 'div', + { className: 'col-xs-6 col-ms-4 col-md-2' }, + React.createElement( + 'div', + { className: 'thumbnail' }, + React.createElement('img', { + src: author.get('avatar_preview_url'), + alt: author.get('name'), + }), + ), + ), + React.createElement( + 'div', + { className: 'col-xs-12 col-ms-8 col-md-10' }, + React.createElement( + 'span', + { className: 'description' }, + author.get('description'), + ), + React.createElement( + __WEBPACK_IMPORTED_MODULE_4__author_PostsCount__['a' /* default */], + { author: this.props.author }, + ), + React.createElement( + __WEBPACK_IMPORTED_MODULE_5__author_Tags__['a' /* default */], + { tags: this.props.tags }, + ), + React.createElement( + __WEBPACK_IMPORTED_MODULE_6__author_FeedbackFormInitializer__[ + 'a' /* default */ + ], + { author: this.props.author }, + ), + ), + ), + ), + ), + ), + ); + }, + /** + * + */ + }, + ]); + + return Author; + })(React.Component); + + Author.propTypes = { + params: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.shape({ + id: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string.isRequired, + }).isRequired, + author: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.instanceOf( + __WEBPACK_IMPORTED_MODULE_3_app_records_entities_AuthorRecord__['a' /* default */], + ).isRequired, + tags: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.instanceOf( + __WEBPACK_IMPORTED_MODULE_2_immutable___default.a.List, + ).isRequired, + }; + + /* harmony default export */ __webpack_exports__['a'] = Author; + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(1)); + + /***/ + }, + /* 386 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (React) { + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(2); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_app_actions_authorFeedbackActions__ = + __webpack_require__(230); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_app_records_entities_AuthorRecord__ = + __webpack_require__(46); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__feedback_form_initializer_FeedbackForm__ = + __webpack_require__(389); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var FeedbackFormInitializer = (function (_React$Component) { + _inherits(FeedbackFormInitializer, _React$Component); + + function FeedbackFormInitializer() { + _classCallCheck(this, FeedbackFormInitializer); + + return _possibleConstructorReturn( + this, + (FeedbackFormInitializer.__proto__ || Object.getPrototypeOf(FeedbackFormInitializer)).apply( + this, + arguments, + ), + ); + } + + _createClass(FeedbackFormInitializer, [ + { + key: 'componentWillMount', + + /** + * + */ + + /** + * Gets store from context. + */ + value: function componentWillMount() { + this.context.store.dispatch( + __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_1_app_actions_authorFeedbackActions__[ + 'a' /* buildAuthorFeedback */ + ], + )({ author_id: this.props.author.get('id') }), + ); + }, + + /** + * + */ + + /** + * + */ + }, + { + key: 'componentWillUnmount', + value: function componentWillUnmount() { + this.context.store.dispatch( + __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_1_app_actions_authorFeedbackActions__[ + 'b' /* removeAuthorFeedback */ + ], + )(), + ); + }, + + /** + * + */ + }, + { + key: 'render', + value: function render() { + return React.createElement( + __WEBPACK_IMPORTED_MODULE_3__feedback_form_initializer_FeedbackForm__['a' /* default */], + { author: this.props.author }, + ); + }, + }, + ]); + + return FeedbackFormInitializer; + })(React.Component); + + FeedbackFormInitializer.contextTypes = { + store: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object.isRequired, + }; + FeedbackFormInitializer.propTypes = { + author: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.instanceOf( + __WEBPACK_IMPORTED_MODULE_2_app_records_entities_AuthorRecord__['a' /* default */], + ).isRequired, + }; + + /* harmony default export */ __webpack_exports__['a'] = FeedbackFormInitializer; + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(1)); + + /***/ + }, + /* 387 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (React) { + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(2); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_app_records_entities_AuthorRecord__ = + __webpack_require__(46); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var PostsCount = (function (_React$Component) { + _inherits(PostsCount, _React$Component); + + function PostsCount() { + _classCallCheck(this, PostsCount); + + return _possibleConstructorReturn( + this, + (PostsCount.__proto__ || Object.getPrototypeOf(PostsCount)).apply(this, arguments), + ); + } + + _createClass(PostsCount, [ + { + key: 'render', + + /** + * + */ + value: function render() { + return React.createElement( + 'div', + { className: 'posts-count-container' }, + React.createElement('span', { + className: 'glyphicon glyphicon-book', + 'aria-hidden': 'true', + }), + '\xA0 \u0412\u0441\u0435\u0433\u043E \u043F\u0443\u0431\u043B\u0438\u043A\u0430\u0446\u0438\u0439: ', + React.createElement( + 'span', + { className: 'posts-count text-muted' }, + this.props.author.get('posts_count'), + ), + ); + }, + /** + * + */ + }, + ]); + + return PostsCount; + })(React.Component); + + PostsCount.propTypes = { + author: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.instanceOf( + __WEBPACK_IMPORTED_MODULE_1_app_records_entities_AuthorRecord__['a' /* default */], + ).isRequired, + }; + + /* harmony default export */ __webpack_exports__['a'] = PostsCount; + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(1)); + + /***/ + }, + /* 388 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (React) { + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(2); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_immutable__ = __webpack_require__(18); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_immutable___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_immutable__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_router__ = __webpack_require__(13); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var Tags = (function (_React$Component) { + _inherits(Tags, _React$Component); + + function Tags() { + _classCallCheck(this, Tags); + + return _possibleConstructorReturn( + this, + (Tags.__proto__ || Object.getPrototypeOf(Tags)).apply(this, arguments), + ); + } + + _createClass(Tags, [ + { + key: 'renderTags', + + /** + * + */ + value: function renderTags(tags) { + return tags.map(function (tag) { + var postsFilteredByTagLocation = '/?tag=' + tag.get('id'); + + return React.createElement( + __WEBPACK_IMPORTED_MODULE_2_react_router__['f' /* Link */], + { + href: postsFilteredByTagLocation, + to: postsFilteredByTagLocation, + key: tag.get('id'), + className: 'label label-info', + }, + tag.get('name'), + ); + }); + }, + + /** + * + */ + + /** + * + */ + }, + { + key: 'render', + value: function render() { + return React.createElement( + 'div', + { className: 'author-tags' }, + React.createElement('span', { + className: 'glyphicon glyphicon-tags', + 'aria-hidden': 'true', + }), + '\xA0 \u041E \u0447\u0435\u043C \u043F\u0438\u0448\u0435\u0442: ', + this.renderTags(this.props.tags), + ); + }, + }, + ]); + + return Tags; + })(React.Component); + + Tags.propTypes = { + tags: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.instanceOf( + __WEBPACK_IMPORTED_MODULE_1_immutable___default.a.List, + ).isRequired, + }; + + /* harmony default export */ __webpack_exports__['a'] = Tags; + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(1)); + + /***/ + }, + /* 389 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (React) { + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(2); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames__ = __webpack_require__(35); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_classnames__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_redux__ = __webpack_require__(6); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_app_actions_authorFeedbackActions__ = + __webpack_require__(230); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_app_records_entities_AuthorRecord__ = + __webpack_require__(46); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_app_records_single_item_containers_CurrentUserContainerRecord__ = + __webpack_require__(39); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_app_records_single_item_containers_AuthorFeedbackContainerRecord__ = + __webpack_require__(254); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_app_components_shared_SubmitButton__ = + __webpack_require__(72); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var FeedbackForm = (function (_React$Component) { + _inherits(FeedbackForm, _React$Component); + + function FeedbackForm() { + var _ref; + + var _temp, _this, _ret; + + _classCallCheck(this, FeedbackForm); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return ( + (_ret = + ((_temp = + ((_this = _possibleConstructorReturn( + this, + (_ref = FeedbackForm.__proto__ || Object.getPrototypeOf(FeedbackForm)).call.apply( + _ref, + [this].concat(args), + ), + )), + _this)), + (_this.onSenderEmailChange = function (event) { + _this.props.onFeedbackAttributesChange({ sender_email: event.target.value }); + }), + (_this.onUseCurrentUserEmailChange = function (event) { + _this.props.onFeedbackAttributesChange({ use_current_user_email: event.target.checked }); + }), + (_this.onMessageChange = function (event) { + _this.props.onFeedbackAttributesChange({ message: event.target.value }); + }), + (_this.onSubmit = function (event) { + event.preventDefault(); + + var authorFeedback = _this.props.authorFeedbackContainer.getAuthorFeedback(); + _this.props.onFormSubmit({ + feedback: { + author_id: authorFeedback.get('author_id'), + sender_email: authorFeedback.get('sender_email'), + use_current_user_email: authorFeedback.get('use_current_user_email'), + message: authorFeedback.get('message'), + }, + }); + }), + _temp)), + _possibleConstructorReturn(_this, _ret) + ); + } + /** + * + */ + + /** + * + */ + + /** + * + */ + + /** + * + */ + + /** + * + */ + + _createClass(FeedbackForm, [ + { + key: 'renderUseCurrentUserEmailCheckbox', + + /** + * + */ + value: function renderUseCurrentUserEmailCheckbox() { + if (!this.props.currentUserContainer.containsPersistentCurrentUser()) return null; + + var authorFeedback = this.props.authorFeedbackContainer.getAuthorFeedback(); + + return React.createElement( + 'div', + { className: 'form-group form-group-use-current-user-email' }, + React.createElement( + 'div', + { className: 'checkbox' }, + React.createElement( + 'label', + null, + React.createElement('input', { + name: 'feedback[use_current_user_email]', + type: 'hidden', + value: '0', + }), + React.createElement('input', { + onChange: this.onUseCurrentUserEmailChange, + value: authorFeedback.get('use_current_user_email'), + type: 'checkbox', + name: 'feedback[use_current_user_email]', + id: 'feedback_use_current_user_email', + }), + ' \u0418\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C \u043C\u043E\u0439 \u0442\u0435\u043A\u0443\u0449\u0438\u0439 Email', + ), + ), + ); + }, + + /** + * + */ + }, + { + key: 'render', + value: function render() { + if (!this.props.author.get('accepts_feedbacks')) { + return React.createElement( + 'h4', + { className: 'no-feedbacks-message' }, + React.createElement('span', { className: 'glyphicon glyphicon-ban-circle' }), + ' ', + '\u041A \u0441\u043E\u0436\u0430\u043B\u0435\u043D\u0438\u044E, \u0430\u0432\u0442\u043E\u0440 \u043D\u0435 \u043F\u0440\u0438\u043D\u0438\u043C\u0430\u0435\u0442 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u0435\u0439.', + ); + } + + var authorFeedbackContainer = this.props.authorFeedbackContainer; + var authorFeedback = authorFeedbackContainer.getAuthorFeedback(); + + var senderEmailErrors = authorFeedback.getSenderEmailErrors(); + var senderEmailError = senderEmailErrors ? senderEmailErrors.first() : undefined; + var senderEmailFormGroupClass = __WEBPACK_IMPORTED_MODULE_1_classnames___default()( + 'form-group form-group-sender-email', + { + 'has-error': senderEmailError, + }, + ); + + var messageErrors = authorFeedback.getMessageErrors(); + var messageError = messageErrors ? messageErrors.first() : undefined; + var messageFormGroupClass = __WEBPACK_IMPORTED_MODULE_1_classnames___default()( + 'form-group form-group-message', + { + 'has-error': messageError, + }, + ); + + return React.createElement( + 'section', + { className: 'feedback' }, + React.createElement( + 'h3', + null, + '\u041E\u0431\u0440\u0430\u0442\u043D\u0430\u044F \u0441\u0432\u044F\u0437\u044C ', + React.createElement( + 'small', + null, + '\u0417\u0430\u0434\u0430\u0439\u0442\u0435 \u0430\u0432\u0442\u043E\u0440\u0443 \u0432\u043E\u043F\u0440\u043E\u0441 \u0438\u043B\u0438 \u043F\u043E\u0434\u0435\u043B\u0438\u0442\u0435\u0441\u044C \u0438\u0434\u0435\u0435\u0439!', + ), + ), + React.createElement( + 'form', + { + onSubmit: this.onSubmit, + className: 'feedback-form', + action: '/feedbacks/new', + acceptCharset: 'UTF-8', + method: 'post', + }, + React.createElement('input', { name: 'utf8', type: 'hidden', value: '\u2713' }), + React.createElement('input', { + name: 'authenticity_token', + type: 'hidden', + value: this.props.authenticityToken, + }), + React.createElement( + 'div', + { className: senderEmailFormGroupClass }, + React.createElement( + 'label', + { className: 'control-label', htmlFor: 'feedback_sender_email' }, + 'Email', + ), + React.createElement('input', { + onChange: this.onSenderEmailChange, + value: authorFeedback.get('sender_email') || '', + disabled: authorFeedback.get('use_current_user_email'), + className: 'form-control', + id: 'feedback_sender_email', + placeholder: '\u0432\u0432\u0435\u0434\u0438\u0442\u0435 email', + type: 'email', + name: 'feedback[sender_email]', + }), + React.createElement('span', { className: 'help-block' }, senderEmailError), + ), + this.renderUseCurrentUserEmailCheckbox(), + React.createElement( + 'div', + { className: messageFormGroupClass }, + React.createElement( + 'label', + { className: 'control-label', htmlFor: 'feedback_message' }, + '\u0421\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435', + ), + React.createElement('textarea', { + onChange: this.onMessageChange, + value: authorFeedback.get('message') || '', + className: 'form-control', + id: 'feedback_message', + name: 'feedback[message]', + placeholder: + '\u0432\u0432\u0435\u0434\u0438\u0442\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435', + rows: '5', + }), + React.createElement('span', { className: 'help-block' }, messageError), + ), + React.createElement( + __WEBPACK_IMPORTED_MODULE_7_app_components_shared_SubmitButton__['a' /* default */], + { + className: 'btn btn-lg btn-primary btn-block', + isDisabled: authorFeedbackContainer.get('isPending'), + readyText: + '\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435', + pendingText: + '\u041E\u0442\u043F\u0440\u0430\u0432\u043A\u0430 \u0434\u0430\u043D\u043D\u044B\u0445...', + }, + React.createElement('span', { + className: 'glyphicon glyphicon-send', + 'aria-hidden': 'true', + }), + ), + ), + ); + }, + }, + ]); + + return FeedbackForm; + })(React.Component); + + /** + * + */ + + FeedbackForm.propTypes = { + author: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.instanceOf( + __WEBPACK_IMPORTED_MODULE_4_app_records_entities_AuthorRecord__['a' /* default */], + ).isRequired, + authenticityToken: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string.isRequired, + currentUserContainer: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.instanceOf( + __WEBPACK_IMPORTED_MODULE_5_app_records_single_item_containers_CurrentUserContainerRecord__[ + 'a' /* default */ + ], + ).isRequired, + authorFeedbackContainer: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.instanceOf( + __WEBPACK_IMPORTED_MODULE_6_app_records_single_item_containers_AuthorFeedbackContainerRecord__[ + 'a' /* default */ + ], + ).isRequired, + onFeedbackAttributesChange: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired, + onFormSubmit: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired, + }; + var mapStateToProps = function mapStateToProps(state, ownProps) { + return { + authenticityToken: state.railsContext.get('authenticityToken'), + currentUserContainer: state.currentUserContainer, + authorFeedbackContainer: state.authorFeedback, + }; + }; + + /** + * + */ + var mapDispatchToProps = function mapDispatchToProps(dispatch) { + return { + onFeedbackAttributesChange: function onFeedbackAttributesChange(attributes) { + dispatch( + __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_3_app_actions_authorFeedbackActions__[ + 'c' /* assignAuthorFeedbackAttributes */ + ], + )(attributes, true), + ); + }, + onFormSubmit: function onFormSubmit(attributes) { + dispatch( + __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_3_app_actions_authorFeedbackActions__[ + 'd' /* createAuthorFeedback */ + ], + )(attributes), + ); + }, + }; + }; + + /* harmony default export */ __webpack_exports__['a'] = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_2_react_redux__['b' /* connect */], + )( + mapStateToProps, + mapDispatchToProps, + )(FeedbackForm); + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(1)); + + /***/ + }, + /* 390 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (React) { + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(2); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_helmet__ = __webpack_require__(44); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_helmet___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_react_helmet__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_router__ = __webpack_require__(13); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_pluralize_ru__ = __webpack_require__(744); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_pluralize_ru___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_3_pluralize_ru__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_immutable__ = __webpack_require__(18); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_immutable___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_4_immutable__, + ); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var Authors = (function (_React$Component) { + _inherits(Authors, _React$Component); + + function Authors() { + _classCallCheck(this, Authors); + + return _possibleConstructorReturn( + this, + (Authors.__proto__ || Object.getPrototypeOf(Authors)).apply(this, arguments), + ); + } + + _createClass(Authors, [ + { + key: 'renderAuthors', + value: function renderAuthors() { + return this.props.authors.map(function (author) { + var authorLocation = '/authors/' + author.get('id'); + + return React.createElement( + 'div', + { key: author.get('id'), className: 'col-xs-6 col-ms-4 col-sm-3 col-md-2' }, + React.createElement( + __WEBPACK_IMPORTED_MODULE_2_react_router__['f' /* Link */], + { href: authorLocation, to: authorLocation, className: 'thumbnail thumbnail-author' }, + React.createElement('img', { + src: author.get('avatar_preview_url'), + alt: author.get('name'), + }), + React.createElement( + 'div', + { className: 'caption' }, + React.createElement( + 'h5', + { className: 'text-center' }, + React.createElement('strong', null, author.get('name')), + ), + React.createElement( + 'div', + { className: 'text-center' }, + React.createElement( + 'small', + null, + React.createElement( + 'strong', + { className: 'text-muted' }, + author.get('posts_count'), + '\xA0', + __WEBPACK_IMPORTED_MODULE_3_pluralize_ru___default()( + author.get('posts_count'), + 'публикаций', + 'публикация', + 'публикации', + 'публикаций', + ), + ), + ), + ), + ), + ), + ); + }); + }, + + /** + * + */ + + /** + * + */ + }, + { + key: 'render', + value: function render() { + return React.createElement( + 'div', + { id: 'authors', className: 'page-content' }, + React.createElement( + __WEBPACK_IMPORTED_MODULE_1_react_helmet__['Helmet'], + null, + React.createElement( + 'title', + null, + 'Bionic Workshop | \u0410\u0432\u0442\u043E\u0440\u044B', + ), + React.createElement('meta', { + name: 'description', + content: 'Здесь вы найдете полный список авторов публикаций нашего блога.', + }), + ), + React.createElement( + 'div', + { className: 'container' }, + React.createElement( + 'div', + { className: 'row' }, + React.createElement( + 'div', + { className: 'col-md-12' }, + React.createElement( + 'h2', + { className: 'text-center' }, + '\u0410\u0432\u0442\u043E\u0440\u044B', + ), + React.createElement('div', { className: 'row' }, this.renderAuthors()), + ), + ), + ), + ); + }, + }, + ]); + + return Authors; + })(React.Component); + + Authors.propTypes = { + authors: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.instanceOf( + __WEBPACK_IMPORTED_MODULE_4_immutable___default.a.List, + ).isRequired, + }; + + /* harmony default export */ __webpack_exports__['a'] = Authors; + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(1)); + + /***/ + }, + /* 391 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (React) { + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(2); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_helmet__ = __webpack_require__(44); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_helmet___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_react_helmet__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_app_records_entities_CurrentUserRecord__ = + __webpack_require__(252); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_app_components_shared_AvatarSelection__ = + __webpack_require__(454); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_app_components_shared_AvatarCrop__ = + __webpack_require__(453); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__current_user_Form__ = __webpack_require__(392); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__current_user_SignOutForm__ = + __webpack_require__(393); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var CurrentUser = (function (_React$Component) { + _inherits(CurrentUser, _React$Component); + + function CurrentUser() { + _classCallCheck(this, CurrentUser); + + return _possibleConstructorReturn( + this, + (CurrentUser.__proto__ || Object.getPrototypeOf(CurrentUser)).apply(this, arguments), + ); + } + + _createClass(CurrentUser, [ + { + key: 'render', + + /** + * + */ + value: function render() { + return React.createElement( + 'div', + { id: 'current-user', className: 'page-content' }, + React.createElement( + __WEBPACK_IMPORTED_MODULE_1_react_helmet__['Helmet'], + null, + React.createElement( + 'title', + null, + 'Bionic Workshop | \u041C\u043E\u0439 \u0430\u043A\u043A\u0430\u0443\u043D\u0442', + ), + React.createElement('meta', { + name: 'description', + content: + '\u0418\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0439\u0442\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443 \u0432\u0430\u0448\u0435\u0433\u043E \u0430\u043A\u043A\u0430\u0443\u043D\u0442\u0430 \u0447\u0442\u043E\u0431\u044B \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0438 \u043E\u0442\u043A\u043E\u0440\u0440\u0435\u043A\u0442\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0430\u0432\u0430\u0442\u0430\u0440, \u0438\u0437\u043C\u0435\u043D\u0438\u0442\u044C \u0443\u0447\u0435\u0442\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435, \u0432\u0430\u0448 email \u0438\u043B\u0438 \u043F\u0430\u0440\u043E\u043B\u044C.', + }), + ), + React.createElement( + 'div', + { className: 'container' }, + React.createElement( + 'div', + { className: 'row' }, + React.createElement( + 'div', + { className: 'col-md-12' }, + React.createElement( + 'h2', + { className: 'text-center profile-header' }, + '\u041C\u043E\u0439 \u0430\u043A\u043A\u0430\u0443\u043D\u0442', + ), + React.createElement( + __WEBPACK_IMPORTED_MODULE_3_app_components_shared_AvatarSelection__[ + 'a' /* default */ + ], + null, + ), + React.createElement( + __WEBPACK_IMPORTED_MODULE_4_app_components_shared_AvatarCrop__['a' /* default */], + null, + ), + React.createElement( + __WEBPACK_IMPORTED_MODULE_5__current_user_Form__['a' /* default */], + null, + ), + React.createElement( + __WEBPACK_IMPORTED_MODULE_6__current_user_SignOutForm__['a' /* default */], + null, + ), + ), + ), + ), + ); + }, + /** + * + */ + }, + ]); + + return CurrentUser; + })(React.Component); + + CurrentUser.propTypes = { + currentUser: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.instanceOf( + __WEBPACK_IMPORTED_MODULE_2_app_records_entities_CurrentUserRecord__['a' /* default */], + ).isRequired, + }; + + /* harmony default export */ __webpack_exports__['a'] = CurrentUser; + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(1)); + + /***/ + }, + /* 392 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_redux__ = __webpack_require__(6); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_app_actions_currentUserActions__ = + __webpack_require__(21); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_app_components_shared_UserForm__ = + __webpack_require__(248); + + /** + * + */ + var mapStateToProps = function mapStateToProps(state, ownProps) { + return { + authenticityToken: state.railsContext.get('authenticityToken'), + currentUserContainer: state.currentUserContainer, + }; + }; + + /** + * + */ + var mapDispatchToProps = function mapDispatchToProps(dispatch) { + return { + editMode: true, + onNameChange: function onNameChange(name) { + dispatch( + __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_1_app_actions_currentUserActions__[ + 'e' /* assignCurrentUserAttributes */ + ], + )({ name: name }, true), + ); + }, + onEmailChange: function onEmailChange(email) { + dispatch( + __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_1_app_actions_currentUserActions__[ + 'e' /* assignCurrentUserAttributes */ + ], + )({ email: email }, true), + ); + }, + onPasswordChange: function onPasswordChange(password) { + dispatch( + __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_1_app_actions_currentUserActions__[ + 'e' /* assignCurrentUserAttributes */ + ], + )({ password: password }, true), + ); + }, + onPasswordConfirmationChange: function onPasswordConfirmationChange(passwordConfirmation) { + dispatch( + __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_1_app_actions_currentUserActions__[ + 'e' /* assignCurrentUserAttributes */ + ], + )({ password_confirmation: passwordConfirmation }, true), + ); + }, + onCurrentPasswordChange: function onCurrentPasswordChange(currentPassword) { + dispatch( + __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_1_app_actions_currentUserActions__[ + 'e' /* assignCurrentUserAttributes */ + ], + )({ current_password: currentPassword }, true), + ); + }, + onSubmit: function onSubmit(attributes) { + dispatch( + __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_1_app_actions_currentUserActions__['f' /* updateCurrentUser */], + )(attributes), + ); + }, + }; + }; + + /* harmony default export */ __webpack_exports__['a'] = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_0_react_redux__['b' /* connect */], + )( + mapStateToProps, + mapDispatchToProps, + )(__WEBPACK_IMPORTED_MODULE_2_app_components_shared_UserForm__['a' /* default */]); + + /***/ + }, + /* 393 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (React) { + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(2); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_redux__ = __webpack_require__(6); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_app_actions_currentUserActions__ = + __webpack_require__(21); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_app_records_single_item_containers_CurrentUserContainerRecord__ = + __webpack_require__(39); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_app_components_shared_SubmitButton__ = + __webpack_require__(72); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var SignOutForm = (function (_React$Component) { + _inherits(SignOutForm, _React$Component); + + /** + * + */ + function SignOutForm(props, context) { + _classCallCheck(this, SignOutForm); + + var _this = _possibleConstructorReturn( + this, + (SignOutForm.__proto__ || Object.getPrototypeOf(SignOutForm)).call(this, props, context), + ); + + _this.onFormSubmit = _this.onFormSubmit.bind(_this); + return _this; + } + + /** + * + */ + + /** + * + */ + + _createClass(SignOutForm, [ + { + key: 'onFormSubmit', + value: function onFormSubmit(event) { + event.preventDefault(); + this.props.onSubmit(); + }, + + /** + * + */ + }, + { + key: 'render', + value: function render() { + return React.createElement( + 'div', + { id: 'avatar-selection', className: 'col-md-offset-3 col-md-6' }, + React.createElement( + 'form', + { + onSubmit: this.onFormSubmit, + className: 'sign-out-form', + action: '/users/sign_out', + acceptCharset: 'UTF-8', + method: 'post', + }, + React.createElement('input', { name: 'utf8', type: 'hidden', value: '\u2713' }), + React.createElement('input', { name: '_method', type: 'hidden', value: 'delete' }), + React.createElement('input', { + name: 'authenticity_token', + type: 'hidden', + value: this.props.authenticityToken, + }), + React.createElement( + __WEBPACK_IMPORTED_MODULE_4_app_components_shared_SubmitButton__['a' /* default */], + { + className: 'btn btn-lg btn-primary btn-block', + isDisabled: this.props.currentUserContainer.get('isPending'), + readyText: '\u0412\u044B\u0439\u0442\u0438', + pendingText: '\u0412\u044B\u0445\u043E\u0434...', + }, + React.createElement('span', { + className: 'glyphicon glyphicon-log-out', + 'aria-hidden': 'true', + }), + ), + ), + ); + }, + }, + ]); + + return SignOutForm; + })(React.Component); + + /** + * + */ + + SignOutForm.propTypes = { + onSubmit: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired, + authenticityToken: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string.isRequired, + currentUserContainer: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.instanceOf( + __WEBPACK_IMPORTED_MODULE_3_app_records_single_item_containers_CurrentUserContainerRecord__[ + 'a' /* default */ + ], + ).isRequired, + }; + var mapStateToProps = function mapStateToProps(state, ownProps) { + return { + authenticityToken: state.railsContext.get('authenticityToken'), + currentUserContainer: state.currentUserContainer, + }; + }; + + /** + * + */ + var mapDispatchToProps = function mapDispatchToProps(dispatch) { + return { + onSubmit: function onSubmit() { + dispatch( + __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_2_app_actions_currentUserActions__['d' /* deleteCurrentUser */], + )(), + ); + }, + }; + }; + + /* harmony default export */ __webpack_exports__['a'] = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_1_react_redux__['b' /* connect */], + )( + mapStateToProps, + mapDispatchToProps, + )(SignOutForm); + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(1)); + + /***/ + }, + /* 394 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (React) { + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(2); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_dom__ = __webpack_require__(43); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_dom___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_react_dom__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_redux__ = __webpack_require__(6); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_css_element_queries__ = __webpack_require__(193); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_css_element_queries___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_css_element_queries__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_app_actions_uiStateActions__ = + __webpack_require__(128); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__content_BreadcrumbsVisibilityWrapper__ = + __webpack_require__(400); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var Content = (function (_React$Component) { + _inherits(Content, _React$Component); + + function Content() { + _classCallCheck(this, Content); + + return _possibleConstructorReturn( + this, + (Content.__proto__ || Object.getPrototypeOf(Content)).apply(this, arguments), + ); + } + + _createClass(Content, [ + { + key: 'componentDidMount', + + /** + * + */ + value: function componentDidMount() { + var _this2 = this; + + var componentNode = __WEBPACK_IMPORTED_MODULE_1_react_dom___default.a.findDOMNode(this); + var $componentNode = $(componentNode); + var $mainImageNode = $componentNode.find('#main-image'); + + this.props.onMainImageHeighChange($mainImageNode.outerHeight()); + + this.resizeSensor = new __WEBPACK_IMPORTED_MODULE_3_css_element_queries__['ResizeSensor']( + $mainImageNode[0], + function () { + _this2.props.onMainImageHeighChange($mainImageNode.outerHeight()); + }, + ); + }, + + /** + * + */ + + /** + * + */ + }, + { + key: 'componentWillUnmount', + value: function componentWillUnmount() { + this.resizeSensor.detach(); + }, + + /** + * + */ + }, + { + key: 'render', + value: function render() { + return React.createElement( + 'section', + { id: 'content' }, + React.createElement('div', { id: 'main-image' }), + React.createElement('div', { id: 'main-image-fill-gradient' }), + React.createElement( + __WEBPACK_IMPORTED_MODULE_5__content_BreadcrumbsVisibilityWrapper__['a' /* default */], + { bredcumbsHandler: this.props.breadcrumbsComponent }, + ), + React.createElement('div', null, this.props.contentComponent), + ); + }, + }, + ]); + + return Content; + })(React.Component); + + /** + * + */ + + Content.propTypes = { + contentComponent: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.element, + breadcrumbsComponent: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.element, + onMainImageHeighChange: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired, + }; + var mapDispatchToProps = function mapDispatchToProps(dispatch) { + return { + onMainImageHeighChange: function onMainImageHeighChange(newHeight) { + dispatch( + __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_4_app_actions_uiStateActions__['a' /* setMainImageHeight */], + )(newHeight), + ); + }, + }; + }; + + /* harmony default export */ __webpack_exports__['a'] = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_2_react_redux__['b' /* connect */], + )( + null, + mapDispatchToProps, + )(Content); + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(1)); + + /***/ + }, + /* 395 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (React) { + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(2); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_redux__ = __webpack_require__(6); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_addons_css_transition_group__ = + __webpack_require__(747); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_addons_css_transition_group___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react_addons_css_transition_group__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_app_records_collections_FlashesCollectionRecord__ = + __webpack_require__(251); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__flashes_Flash__ = __webpack_require__(401); + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var Flashes = (function (_React$Component) { + _inherits(Flashes, _React$Component); + + function Flashes() { + _classCallCheck(this, Flashes); + + return _possibleConstructorReturn( + this, + (Flashes.__proto__ || Object.getPrototypeOf(Flashes)).apply(this, arguments), + ); + } + + _createClass(Flashes, [ + { + key: 'renderFlashes', + + /** + * + */ + value: function renderFlashes() { + var _this2 = this; + + return this.props.flashes.getFlashes().map(function (flash) { + return React.createElement( + __WEBPACK_IMPORTED_MODULE_4__flashes_Flash__['a' /* default */], + _extends({ key: flash.get('tmpId'), flash: flash }, _this2.props), + ); + }); + }, + + /** + * + */ + + /** + * + */ + }, + { + key: 'render', + value: function render() { + return React.createElement( + 'div', + { id: 'flashes' }, + React.createElement( + __WEBPACK_IMPORTED_MODULE_2_react_addons_css_transition_group___default.a, + { + transitionName: 'flash', + transitionEnterTimeout: 500, + transitionLeaveTimeout: 300, + }, + this.renderFlashes(), + ), + ); + }, + }, + ]); + + return Flashes; + })(React.Component); + + Flashes.propTypes = { + flashes: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.instanceOf( + __WEBPACK_IMPORTED_MODULE_3_app_records_collections_FlashesCollectionRecord__['a' /* default */], + ).isRequired, + }; + + var mapStateToProps = function mapStateToProps(state, ownProps) { + return { + flashes: state.flashes, + }; + }; + + /* harmony default export */ __webpack_exports__['a'] = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_1_react_redux__['b' /* connect */], + )(mapStateToProps)(Flashes); + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(1)); + + /***/ + }, + /* 396 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (React) { + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(2); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_redux__ = __webpack_require__(6); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_router__ = __webpack_require__(13); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var Footer = (function (_React$Component) { + _inherits(Footer, _React$Component); + + function Footer() { + _classCallCheck(this, Footer); + + return _possibleConstructorReturn( + this, + (Footer.__proto__ || Object.getPrototypeOf(Footer)).apply(this, arguments), + ); + } + + _createClass(Footer, [ + { + key: 'render', + + /** + * + */ + value: function render() { + var denisUdovenkoLocation = '/authors/1-denis-udovenko'; + + return React.createElement( + 'section', + { id: 'footer' }, + React.createElement( + 'div', + { className: 'container' }, + React.createElement( + 'div', + { className: 'row' }, + React.createElement( + 'div', + { className: 'col-md-3 social-links' }, + React.createElement( + 'a', + { href: 'https://vk.com/id295291178', className: 'vkontakte' }, + '\u0410\u043A\u043A\u0430\u0443\u043D\u0442 \u0412\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u0435', + ), + React.createElement( + 'a', + { + href: 'https://www.youtube.com/channel/UCiwf9KNadyhog87snkVDsUA', + className: 'you-tube', + }, + '\u041A\u0430\u043D\u0430\u043B YouTube', + ), + ), + React.createElement( + 'div', + { className: 'col-md-3 feeds' }, + React.createElement( + 'a', + { href: '/posts/feed.atom', className: 'posts-feed' }, + '\u041B\u0435\u043D\u0442\u0430 \u0441\u0442\u0430\u0442\u0435\u0439', + ), + React.createElement( + 'a', + { href: '/comments/feed.atom', className: 'comments-feed' }, + '\u041B\u0435\u043D\u0442\u0430 \u043A\u043E\u043C\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u0435\u0432', + ), + ), + React.createElement( + 'div', + { className: 'col-md-3 contact' }, + React.createElement( + __WEBPACK_IMPORTED_MODULE_2_react_router__['f' /* Link */], + { + to: denisUdovenkoLocation, + href: denisUdovenkoLocation, + className: 'contact-bug', + }, + '\u041D\u0430\u0448\u043B\u0438 \u0431\u0430\u0433? \u041F\u0438\u0448\u0438\u0442\u0435!', + ), + React.createElement( + __WEBPACK_IMPORTED_MODULE_2_react_router__['f' /* Link */], + { + to: denisUdovenkoLocation, + href: denisUdovenkoLocation, + className: 'contact-idea', + }, + '\u0415\u0441\u0442\u044C \u0438\u0434\u0435\u044F? \u041F\u0438\u0448\u0438\u0442\u0435!', + ), + ), + React.createElement( + 'div', + { className: 'col-md-3 developers' }, + React.createElement('div', { className: 'version' }, this.props.appVersion), + React.createElement( + 'div', + { className: 'author' }, + '\u0414\u0435\u043D\u0438\u0441 \u0423\u0434\u043E\u0432\u0435\u043D\u043A\u043E', + ), + ), + ), + ), + ); + }, + /** + * + */ + }, + ]); + + return Footer; + })(React.Component); + + /** + * + */ + + Footer.propTypes = { + appVersion: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string.isRequired, + }; + var mapStateToProps = function mapStateToProps(state, ownProps) { + return { + appVersion: state.railsContext.get('appVersion'), + }; + }; + + /* harmony default export */ __webpack_exports__['a'] = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_1_react_redux__['b' /* connect */], + )(mapStateToProps)(Footer); + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(1)); + + /***/ + }, + /* 397 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (React) { + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(2); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_dom__ = __webpack_require__(43); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_dom___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_react_dom__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_redux__ = __webpack_require__(6); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_react_router__ = __webpack_require__(13); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_classnames__ = __webpack_require__(35); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_classnames___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_4_classnames__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_css_element_queries__ = __webpack_require__(193); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_css_element_queries___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_css_element_queries__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_app_actions_uiStateActions__ = + __webpack_require__(128); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__header_MobileMenuButton__ = + __webpack_require__(403); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__header_SignInAndSignUpOrAccountLink__ = + __webpack_require__(404); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__header_BreadcrumbsPresenceWrapper__ = + __webpack_require__(402); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_svg_bionic_workshop_svg__ = + __webpack_require__(478); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_svg_bionic_workshop_svg___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_10_svg_bionic_workshop_svg__); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var Header = (function (_React$Component) { + _inherits(Header, _React$Component); + + function Header() { + var _ref; + + var _temp, _this, _ret; + + _classCallCheck(this, Header); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return ( + (_ret = + ((_temp = + ((_this = _possibleConstructorReturn( + this, + (_ref = Header.__proto__ || Object.getPrototypeOf(Header)).call.apply( + _ref, + [this].concat(args), + ), + )), + _this)), + (_this.state = { + mobileNavHidden: true, + }), + (_this.toggleMobileNav = function (event) { + event.preventDefault(); + _this.setState({ mobileNavHidden: !_this.state.mobileNavHidden }); + }), + _temp)), + _possibleConstructorReturn(_this, _ret) + ); + } + /** + * + */ + + /** + * + */ + + /** + * + */ + + _createClass(Header, [ + { + key: 'componentDidMount', + + /** + * + */ + value: function componentDidMount() { + var _this2 = this; + + var componentNode = __WEBPACK_IMPORTED_MODULE_1_react_dom___default.a.findDOMNode(this); + var $componentNode = $(componentNode); + var $headerWithoutBreadcrumbsNode = $componentNode.find('.header-without-breadcrumbs'); + + this.props.onHeightWithoutBreadcrumbsChange($headerWithoutBreadcrumbsNode.outerHeight()); + + this.resizeSensor = new __WEBPACK_IMPORTED_MODULE_5_css_element_queries__['ResizeSensor']( + $headerWithoutBreadcrumbsNode[0], + function () { + _this2.props.onHeightWithoutBreadcrumbsChange( + $headerWithoutBreadcrumbsNode.outerHeight(), + ); + }, + ); + }, + + /** + * + */ + }, + { + key: 'componentWillUnmount', + value: function componentWillUnmount() { + this.resizeSensor.detach(); + }, + + /** + * + */ + }, + { + key: 'render', + value: function render() { + var headerClass = __WEBPACK_IMPORTED_MODULE_4_classnames___default()({ + sticky: this.props.windowScrollTop > 0, + }); + var navClass = __WEBPACK_IMPORTED_MODULE_4_classnames___default()('navigation text-center', { + 'mobile-hidden': this.state.mobileNavHidden > 0, + }); + + var rootLocation = '/'; + var authorsLocation = '/authors'; + + return React.createElement( + 'section', + { id: 'header', className: headerClass }, + React.createElement( + 'div', + { className: 'header-without-breadcrumbs clearfix' }, + React.createElement( + 'div', + { className: 'name-caption-container' }, + React.createElement(__WEBPACK_IMPORTED_MODULE_10_svg_bionic_workshop_svg___default.a, { + className: 'name-caption-svg', + }), + ), + React.createElement( + __WEBPACK_IMPORTED_MODULE_7__header_MobileMenuButton__['a' /* default */], + { onClick: this.toggleMobileNav, isClosed: this.state.mobileNavHidden }, + ), + React.createElement( + 'h3', + { className: 'blog-description text-center' }, + '\u0422\u0435\u0445\u043D\u0438\u0447\u0435\u0441\u043A\u0438\u0439 \u0431\u043B\u043E\u0433 \u0434\u043B\u044F \u0442\u0435\u0445, \u043A\u0442\u043E \u0445\u043E\u0447\u0435\u0442 \u0438\u0434\u0442\u0438 \u0432\u043F\u0435\u0440\u0435\u0434 \u043D\u0435\u0441\u043C\u043E\u0442\u0440\u044F \u043D\u0438 \u043D\u0430 \u0447\u0442\u043E', + ), + React.createElement( + 'div', + { className: navClass }, + React.createElement( + __WEBPACK_IMPORTED_MODULE_3_react_router__['f' /* Link */], + { href: rootLocation, to: rootLocation }, + '\u0413\u043B\u0430\u0432\u043D\u0430\u044F', + ), + ' ', + React.createElement('span', { className: 'separator' }, '|'), + ' ', + React.createElement( + __WEBPACK_IMPORTED_MODULE_3_react_router__['f' /* Link */], + { href: authorsLocation, to: authorsLocation }, + '\u0410\u0432\u0442\u043E\u0440\u044B', + ), + ' ', + React.createElement('span', { className: 'separator' }, '|'), + ' ', + React.createElement( + __WEBPACK_IMPORTED_MODULE_8__header_SignInAndSignUpOrAccountLink__['a' /* default */], + null, + ), + ), + ), + React.createElement( + __WEBPACK_IMPORTED_MODULE_9__header_BreadcrumbsPresenceWrapper__['a' /* default */], + { + breadcrumbsComponent: this.props.breadcrumbsComponent, + windowScrollTop: this.props.windowScrollTop, + }, + ), + ); + }, + }, + ]); + + return Header; + })(React.Component); + + /** + * + */ + + Header.propTypes = { + windowScrollTop: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number, + breadcrumbsComponent: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.element, + onHeightWithoutBreadcrumbsChange: + __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired, + }; + var mapStateToProps = function mapStateToProps(state, ownProps) { + return { + windowScrollTop: state.uiState.get('windowScrollTop'), + }; + }; + + /** + * + */ + var mapDispatchToProps = function mapDispatchToProps(dispatch) { + return { + onHeightWithoutBreadcrumbsChange: function onHeightWithoutBreadcrumbsChange(newHeight) { + dispatch( + __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_6_app_actions_uiStateActions__[ + 'c' /* setHeaderWithoutBreadcrumbsHeight */ + ], + )(newHeight), + ); + }, + }; + }; + + /* harmony default export */ __webpack_exports__['a'] = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_2_react_redux__['b' /* connect */], + )( + mapStateToProps, + mapDispatchToProps, + )(Header); + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(1)); + + /***/ + }, + /* 398 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (React) { + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + var PhotoSwipeRoot = (function (_React$Component) { + _inherits(PhotoSwipeRoot, _React$Component); + + function PhotoSwipeRoot() { + _classCallCheck(this, PhotoSwipeRoot); + + return _possibleConstructorReturn( + this, + (PhotoSwipeRoot.__proto__ || Object.getPrototypeOf(PhotoSwipeRoot)).apply(this, arguments), + ); + } + + _createClass(PhotoSwipeRoot, [ + { + key: 'render', + + /** + * + */ + value: function render() { + return React.createElement( + 'div', + { className: 'pswp', tabIndex: '-1', role: 'dialog', 'aria-hidden': 'true' }, + React.createElement('div', { className: 'pswp__bg' }), + React.createElement( + 'div', + { className: 'pswp__scroll-wrap' }, + React.createElement( + 'div', + { className: 'pswp__container' }, + React.createElement('div', { className: 'pswp__item' }), + React.createElement('div', { className: 'pswp__item' }), + React.createElement('div', { className: 'pswp__item' }), + ), + React.createElement( + 'div', + { className: 'pswp__ui pswp__ui--hidden' }, + React.createElement( + 'div', + { className: 'pswp__top-bar' }, + React.createElement('div', { className: 'pswp__counter' }), + React.createElement('button', { + className: 'pswp__button pswp__button--close', + title: 'Close (Esc)', + }), + React.createElement('button', { + className: 'pswp__button pswp__button--share', + title: 'Share', + }), + React.createElement('button', { + className: 'pswp__button pswp__button--fs', + title: 'Toggle fullscreen', + }), + React.createElement('button', { + className: 'pswp__button pswp__button--zoom', + title: 'Zoom in/out', + }), + React.createElement( + 'div', + { className: 'pswp__preloader' }, + React.createElement( + 'div', + { className: 'pswp__preloader__icn' }, + React.createElement( + 'div', + { className: 'pswp__preloader__cut' }, + React.createElement('div', { className: 'pswp__preloader__donut' }), + ), + ), + ), + ), + React.createElement( + 'div', + { className: 'pswp__share-modal pswp__share-modal--hidden pswp__single-tap' }, + React.createElement('div', { className: 'pswp__share-tooltip' }), + ), + React.createElement('button', { + className: 'pswp__button pswp__button--arrow--left', + title: 'Previous (arrow left)', + }), + React.createElement('button', { + className: 'pswp__button pswp__button--arrow--right', + title: 'Next (arrow right)', + }), + React.createElement( + 'div', + { className: 'pswp__caption' }, + React.createElement('div', { className: 'pswp__caption__center' }), + ), + ), + ), + ); + }, + }, + ]); + + return PhotoSwipeRoot; + })(React.Component); + + /* harmony default export */ __webpack_exports__['a'] = PhotoSwipeRoot; + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(1)); + + /***/ + }, + /* 399 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (React) { + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(2); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_redux__ = __webpack_require__(6); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_app_actions_uiStateActions__ = + __webpack_require__(128); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var ScrollSpy = (function (_React$Component) { + _inherits(ScrollSpy, _React$Component); + + function ScrollSpy() { + _classCallCheck(this, ScrollSpy); + + return _possibleConstructorReturn( + this, + (ScrollSpy.__proto__ || Object.getPrototypeOf(ScrollSpy)).apply(this, arguments), + ); + } + + _createClass(ScrollSpy, [ + { + key: 'componentDidMount', + + /** + * + */ + value: function componentDidMount() { + var _this2 = this; + + this.props.onWindowScroll(window.pageYOffset); + + window.onscroll = function () { + _this2.props.onWindowScroll(window.pageYOffset); + }; + }, + + /** + * + */ + + /** + * + */ + }, + { + key: 'render', + value: function render() { + return null; + }, + }, + ]); + + return ScrollSpy; + })(React.Component); + + /** + * + */ + + ScrollSpy.propTypes = { + onWindowScroll: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired, + }; + var mapDispatchToProps = function mapDispatchToProps(dispatch) { + return { + onWindowScroll: function onWindowScroll(windowScrollTop) { + dispatch( + __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_2_app_actions_uiStateActions__['d' /* setWindowScrollTop */], + )(windowScrollTop), + ); + }, + }; + }; + + /* harmony default export */ __webpack_exports__['a'] = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_1_react_redux__['b' /* connect */], + )( + null, + mapDispatchToProps, + )(ScrollSpy); + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(1)); + + /***/ + }, + /* 400 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (React) { + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(2); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_dom__ = __webpack_require__(43); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_dom___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_react_dom__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_classnames__ = __webpack_require__(35); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_classnames___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_2_classnames__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_react_redux__ = __webpack_require__(6); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_css_element_queries__ = __webpack_require__(193); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_css_element_queries___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_css_element_queries__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_app_actions_uiStateActions__ = + __webpack_require__(128); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var BreadcrumbsVisibilityWrapper = (function (_React$Component) { + _inherits(BreadcrumbsVisibilityWrapper, _React$Component); + + function BreadcrumbsVisibilityWrapper() { + _classCallCheck(this, BreadcrumbsVisibilityWrapper); + + return _possibleConstructorReturn( + this, + ( + BreadcrumbsVisibilityWrapper.__proto__ || Object.getPrototypeOf(BreadcrumbsVisibilityWrapper) + ).apply(this, arguments), + ); + } + + _createClass(BreadcrumbsVisibilityWrapper, [ + { + key: 'componentDidMount', + + /** + * + */ + value: function componentDidMount() { + var _this2 = this; + + var componentNode = __WEBPACK_IMPORTED_MODULE_1_react_dom___default.a.findDOMNode(this); + var $componentNode = $(componentNode); + + this.props.onHeightChange($componentNode.outerHeight()); + + this.resizeSensor = new __WEBPACK_IMPORTED_MODULE_4_css_element_queries__['ResizeSensor']( + $componentNode[0], + function () { + _this2.props.onHeightChange($componentNode.outerHeight()); + }, + ); + }, + + /** + * + */ + + /** + * + */ + }, + { + key: 'componentWillUnmount', + value: function componentWillUnmount() { + this.resizeSensor.detach(); + }, + + /** + * + */ + }, + { + key: 'render', + value: function render() { + var windowScrollTop = this.props.windowScrollTop; + var headerWithoutBreadcrumbsHeight = this.props.headerWithoutBreadcrumbsHeight; + var mainImageHeight = this.props.mainImageHeight; + var paramsAbsent = + windowScrollTop === undefined || + headerWithoutBreadcrumbsHeight === undefined || + mainImageHeight === undefined; + + var wrapperClass = __WEBPACK_IMPORTED_MODULE_2_classnames___default()( + 'breadcrumbs-visibility-wrapper', + { + invisible: + !paramsAbsent && windowScrollTop > mainImageHeight - headerWithoutBreadcrumbsHeight, + }, + ); + + return React.createElement('div', { className: wrapperClass }, this.props.bredcumbsHandler); + }, + }, + ]); + + return BreadcrumbsVisibilityWrapper; + })(React.Component); + + /** + * + */ + + BreadcrumbsVisibilityWrapper.propTypes = { + windowScrollTop: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number, + headerWithoutBreadcrumbsHeight: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number, + mainImageHeight: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number, + bredcumbsHandler: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.element.isRequired, + onHeightChange: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired, + }; + var mapStateToProps = function mapStateToProps(state, ownProps) { + return { + windowScrollTop: state.uiState.get('windowScrollTop'), + headerWithoutBreadcrumbsHeight: state.uiState.get('headerWithoutBreadcrumbsHeight'), + mainImageHeight: state.uiState.get('mainImageHeight'), + }; + }; + + /** + * + */ + var mapDispatchToProps = function mapDispatchToProps(dispatch) { + return { + onHeightChange: function onHeightChange(newHeight) { + dispatch( + __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_5_app_actions_uiStateActions__['b' /* setBreadcrumbsHeight */], + )(newHeight), + ); + }, + }; + }; + + /* harmony default export */ __webpack_exports__['a'] = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_3_react_redux__['b' /* connect */], + )( + mapStateToProps, + mapDispatchToProps, + )(BreadcrumbsVisibilityWrapper); + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(1)); + + /***/ + }, + /* 401 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (React) { + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(2); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_redux__ = __webpack_require__(6); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_app_actions_flashesActions__ = + __webpack_require__(231); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_app_records_entities_FlashRecord__ = + __webpack_require__(253); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_classnames__ = __webpack_require__(35); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_classnames___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_4_classnames__, + ); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var Flash = (function (_React$Component) { + _inherits(Flash, _React$Component); + + function Flash() { + var _ref; + + var _temp, _this, _ret; + + _classCallCheck(this, Flash); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return ( + (_ret = + ((_temp = + ((_this = _possibleConstructorReturn( + this, + (_ref = Flash.__proto__ || Object.getPrototypeOf(Flash)).call.apply( + _ref, + [this].concat(args), + ), + )), + _this)), + (_this.onCloseButtonClick = function (event) { + event.preventDefault(); + _this.props.onRemoveFlash(_this.props.flash); + }), + _temp)), + _possibleConstructorReturn(_this, _ret) + ); + } + /** + * + */ + + /** + * + */ + + _createClass(Flash, [ + { + key: 'componentWillMount', + + /** + * + */ + value: function componentWillMount() { + var _this2 = this; + + this.timeoutId = setTimeout(function () { + _this2.props.onRemoveFlash(_this2.props.flash); + }, 7000); + }, + + /** + * + */ + }, + { + key: 'render', + value: function render() { + var flashType = this.props.flash.get('type'); + var flashMessageClass = __WEBPACK_IMPORTED_MODULE_4_classnames___default()( + 'flash-message alert', + { + 'alert-danger': flashType === 'alert', + 'alert-info': flashType === 'notice', + }, + ); + + return React.createElement( + 'div', + { className: flashMessageClass }, + React.createElement( + 'div', + null, + React.createElement( + 'a', + { + href: this.props.location.pathname + this.props.location.search, + onClick: this.onCloseButtonClick, + type: 'button', + className: 'close', + 'aria-label': 'Close', + }, + React.createElement('span', { 'aria-hidden': 'true' }, '\xD7'), + ), + React.createElement('div', { className: 'content' }, this.props.flash.get('message')), + ), + ); + }, + }, + ]); + + return Flash; + })(React.Component); + + /** + * + */ + + Flash.propTypes = { + onRemoveFlash: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired, + flash: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.instanceOf( + __WEBPACK_IMPORTED_MODULE_3_app_records_entities_FlashRecord__['a' /* default */], + ).isRequired, + location: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.shape({ + pathname: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string, + search: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string, + }).isRequired, + }; + var mapDispatchToProps = function mapDispatchToProps(dispatch) { + return { + onRemoveFlash: function onRemoveFlash(flash) { + dispatch( + __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_2_app_actions_flashesActions__['b' /* removeFlashMessage */], + )(flash), + ); + }, + }; + }; + + /* harmony default export */ __webpack_exports__['a'] = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_1_react_redux__['b' /* connect */], + )( + null, + mapDispatchToProps, + )(Flash); + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(1)); + + /***/ + }, + /* 402 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (React) { + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(2); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_redux__ = __webpack_require__(6); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var BreadcrumbsPresenceWrapper = (function (_React$Component) { + _inherits(BreadcrumbsPresenceWrapper, _React$Component); + + function BreadcrumbsPresenceWrapper() { + _classCallCheck(this, BreadcrumbsPresenceWrapper); + + return _possibleConstructorReturn( + this, + ( + BreadcrumbsPresenceWrapper.__proto__ || Object.getPrototypeOf(BreadcrumbsPresenceWrapper) + ).apply(this, arguments), + ); + } + + _createClass(BreadcrumbsPresenceWrapper, [ + { + key: 'render', + + /** + * + */ + value: function render() { + var windowScrollTop = this.props.windowScrollTop; + var headerWithoutBreadcrumbsHeight = this.props.headerWithoutBreadcrumbsHeight; + var mainImageHeight = this.props.mainImageHeight; + + if ( + windowScrollTop === undefined || + headerWithoutBreadcrumbsHeight === undefined || + mainImageHeight === undefined + ) { + return null; + } + + if (windowScrollTop <= mainImageHeight - headerWithoutBreadcrumbsHeight) return null; + + return this.props.breadcrumbsComponent; + }, + /** + * + */ + }, + ]); + + return BreadcrumbsPresenceWrapper; + })(React.Component); + + /** + * + */ + + BreadcrumbsPresenceWrapper.propTypes = { + windowScrollTop: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number, + headerWithoutBreadcrumbsHeight: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number, + mainImageHeight: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number, + breadcrumbsComponent: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.element.isRequired, + }; + var mapStateToProps = function mapStateToProps(state, ownProps) { + return { + headerWithoutBreadcrumbsHeight: state.uiState.get('headerWithoutBreadcrumbsHeight'), + mainImageHeight: state.uiState.get('mainImageHeight'), + }; + }; + + /* harmony default export */ __webpack_exports__['a'] = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_1_react_redux__['b' /* connect */], + )(mapStateToProps)(BreadcrumbsPresenceWrapper); + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(1)); + + /***/ + }, + /* 403 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (React) { + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(2); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var MobileMenuButton = (function (_React$Component) { + _inherits(MobileMenuButton, _React$Component); + + function MobileMenuButton() { + _classCallCheck(this, MobileMenuButton); + + return _possibleConstructorReturn( + this, + (MobileMenuButton.__proto__ || Object.getPrototypeOf(MobileMenuButton)).apply(this, arguments), + ); + } + + _createClass(MobileMenuButton, [ + { + key: 'render', + + /** + * + */ + value: function render() { + var glyphicon = this.props.isClosed + ? React.createElement('span', { className: 'glyphicon glyphicon-menu-hamburger' }) + : React.createElement('span', { className: 'glyphicon glyphicon-remove' }); + + return React.createElement( + 'a', + { onClick: this.props.onClick, href: '#', className: 'mobile-menu-button' }, + glyphicon, + ); + }, + /** + * + */ + }, + ]); + + return MobileMenuButton; + })(React.Component); + + MobileMenuButton.propTypes = { + isClosed: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.bool, + onClick: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired, + }; + + /* harmony default export */ __webpack_exports__['a'] = MobileMenuButton; + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(1)); + + /***/ + }, + /* 404 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (React) { + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(2); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_router__ = __webpack_require__(13); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_redux__ = __webpack_require__(6); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_app_records_single_item_containers_CurrentUserContainerRecord__ = + __webpack_require__(39); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var SignInAndSignUpOrAccountLink = (function (_React$Component) { + _inherits(SignInAndSignUpOrAccountLink, _React$Component); + + function SignInAndSignUpOrAccountLink() { + _classCallCheck(this, SignInAndSignUpOrAccountLink); + + return _possibleConstructorReturn( + this, + ( + SignInAndSignUpOrAccountLink.__proto__ || Object.getPrototypeOf(SignInAndSignUpOrAccountLink) + ).apply(this, arguments), + ); + } + + _createClass(SignInAndSignUpOrAccountLink, [ + { + key: 'render', + + /** + * + */ + value: function render() { + var signInLocation = '/users/sign-in'; + var signUpLocation = '/users/sign-up'; + var accountLocation = '/users/current'; + + if (this.props.currentUserContainer.containsPersistentCurrentUser()) { + return React.createElement( + __WEBPACK_IMPORTED_MODULE_1_react_router__['f' /* Link */], + { href: accountLocation, to: accountLocation }, + '\u041C\u043E\u0439 \u0430\u043A\u043A\u0430\u0443\u043D\u0442', + ); + } + + return React.createElement( + 'span', + null, + React.createElement( + __WEBPACK_IMPORTED_MODULE_1_react_router__['f' /* Link */], + { href: signInLocation, to: signInLocation }, + '\u0412\u0445\u043E\u0434', + ), + ' ', + React.createElement('span', { className: 'separator' }, '|'), + ' ', + React.createElement( + __WEBPACK_IMPORTED_MODULE_1_react_router__['f' /* Link */], + { href: signUpLocation, to: signUpLocation }, + '\u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044F', + ), + ); + }, + /** + * + */ + }, + ]); + + return SignInAndSignUpOrAccountLink; + })(React.Component); + + SignInAndSignUpOrAccountLink.propTypes = { + currentUserContainer: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.instanceOf( + __WEBPACK_IMPORTED_MODULE_3_app_records_single_item_containers_CurrentUserContainerRecord__[ + 'a' /* default */ + ], + ).isRequired, + }; + + var mapStateToProps = function mapStateToProps(state, ownProps) { + return { + currentUserContainer: state.currentUserContainer, + }; + }; + + /* harmony default export */ __webpack_exports__['a'] = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_2_react_redux__['b' /* connect */], + )(mapStateToProps)(SignInAndSignUpOrAccountLink); + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(1)); + + /***/ + }, + /* 405 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (React) { + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(2); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_redux__ = __webpack_require__(6); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_helmet__ = __webpack_require__(44); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_helmet___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_2_react_helmet__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_react_dom__ = __webpack_require__(43); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_react_dom___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_3_react_dom__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_immutable__ = __webpack_require__(18); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_immutable___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_4_immutable__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_app_records_entities_PostRecord__ = + __webpack_require__(90); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_app_records_entities_AuthorRecord__ = + __webpack_require__(46); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__post_AuthorAvatar__ = __webpack_require__(407); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__post_Author__ = __webpack_require__(406); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__post_PublishedTime__ = __webpack_require__(412); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__post_CommentsCount__ = + __webpack_require__(409); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__post_Tags__ = __webpack_require__(414); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__post_Content__ = __webpack_require__(411); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__post_RootCommentFormInitializer__ = + __webpack_require__(413); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__post_CommentsHeader__ = + __webpack_require__(410); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__post_Comments__ = __webpack_require__(245); + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var Post = (function (_React$Component) { + _inherits(Post, _React$Component); + + function Post() { + _classCallCheck(this, Post); + + return _possibleConstructorReturn( + this, + (Post.__proto__ || Object.getPrototypeOf(Post)).apply(this, arguments), + ); + } + + _createClass(Post, [ + { + key: 'componentDidMount', + + /** + * + */ + value: function componentDidMount() { + var _this2 = this; + + var componentNode = __WEBPACK_IMPORTED_MODULE_3_react_dom___default.a.findDOMNode(this); + var $componentNode = $(componentNode); + + this.$scrollToBottomButton = $componentNode.find('.scroll-to-bottom-button'); + this.$scrollToTopButton = $componentNode.find('.scroll-to-top-button'); + + this.$scrollToBottomButton.on('click', function () { + var headerWithoutBreadcrumbsHeight = _this2.props.headerWithoutBreadcrumbsHeight; + var breadcrumbsHeight = _this2.props.breadcrumbsHeight; + + if (!headerWithoutBreadcrumbsHeight || !breadcrumbsHeight) return; + + var ADDITIONAL_OFFSET = 30; + $(window).scrollTo('#comments', 300, { + offset: -(headerWithoutBreadcrumbsHeight + breadcrumbsHeight + ADDITIONAL_OFFSET), + }); + }); + + this.$scrollToTopButton.on('click', function () { + var headerWithoutBreadcrumbsHeight = _this2.props.headerWithoutBreadcrumbsHeight; + var breadcrumbsHeight = _this2.props.breadcrumbsHeight; + + if (!headerWithoutBreadcrumbsHeight || !breadcrumbsHeight) return; + + $(window).scrollTo('#post', 300, { + offset: -(headerWithoutBreadcrumbsHeight + breadcrumbsHeight), + }); + }); + }, + + /** + * + */ + + /** + * + */ + }, + { + key: 'componentWillUnmount', + value: function componentWillUnmount() { + this.$scrollToBottomButton.off(); + this.$scrollToTopButton.off(); + }, + + /** + * + */ + }, + { + key: 'render', + value: function render() { + var post = this.props.post; + var author = this.props.author; + var tags = this.props.tags; + + var commonProps = { + isCurrentUserLoggedIn: this.props.isCurrentUserLoggedIn, + location: this.props.location, + }; + + return React.createElement( + 'div', + { id: 'post', className: 'page-content' }, + React.createElement( + __WEBPACK_IMPORTED_MODULE_2_react_helmet__['Helmet'], + null, + React.createElement('title', null, 'Bionic Workshop | ' + post.get('title')), + React.createElement('meta', { + name: 'description', + content: post.get('description'), + }), + ), + React.createElement( + 'div', + { className: 'container' }, + React.createElement( + 'h2', + { className: 'text-center post-header' }, + this.props.post.get('title'), + ), + React.createElement( + 'div', + { className: 'btn btn-default scroll-to-bottom-button' }, + React.createElement('span', { className: 'glyphicon glyphicon-arrow-down' }), + ' \u041F\u0440\u043E\u043A\u0440\u0443\u0442\u0438\u0442\u044C \u043A \u043A\u043E\u043C\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u044F\u043C', + ), + React.createElement(__WEBPACK_IMPORTED_MODULE_7__post_AuthorAvatar__['a' /* default */], { + author: author, + }), + React.createElement(__WEBPACK_IMPORTED_MODULE_8__post_Author__['a' /* default */], { + author: author, + }), + React.createElement( + __WEBPACK_IMPORTED_MODULE_9__post_PublishedTime__['a' /* default */], + { post: post }, + ), + React.createElement( + __WEBPACK_IMPORTED_MODULE_10__post_CommentsCount__['a' /* default */], + { params: this.props.params }, + ), + React.createElement(__WEBPACK_IMPORTED_MODULE_11__post_Tags__['a' /* default */], { + tags: tags, + }), + React.createElement('div', { className: 'clearfix' }), + React.createElement(__WEBPACK_IMPORTED_MODULE_12__post_Content__['a' /* default */], { + post: post, + }), + React.createElement( + 'section', + { id: 'comments' }, + React.createElement( + 'div', + { className: 'btn btn-default scroll-to-top-button' }, + React.createElement('span', { className: 'glyphicon glyphicon-arrow-up' }), + ' \u041F\u0440\u043E\u043A\u0440\u0443\u0442\u0438\u0442\u044C \u043A \u043D\u0430\u0447\u0430\u043B\u0443', + ), + React.createElement( + __WEBPACK_IMPORTED_MODULE_14__post_CommentsHeader__['a' /* default */], + { location: this.props.location }, + ), + React.createElement( + __WEBPACK_IMPORTED_MODULE_13__post_RootCommentFormInitializer__['a' /* default */], + _extends({ post: this.props.post }, commonProps), + ), + React.createElement( + __WEBPACK_IMPORTED_MODULE_15__post_Comments__['a' /* default */], + commonProps, + ), + ), + ), + ); + }, + }, + ]); + + return Post; + })(React.Component); + + /** + * + */ + + Post.propTypes = { + location: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.shape({ + pathname: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string.isRequired, + query: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object, + }).isRequired, + params: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.shape({ + id: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string.isRequired, + }).isRequired, + isCurrentUserLoggedIn: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string, + post: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.instanceOf( + __WEBPACK_IMPORTED_MODULE_5_app_records_entities_PostRecord__['a' /* default */], + ).isRequired, + author: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.instanceOf( + __WEBPACK_IMPORTED_MODULE_6_app_records_entities_AuthorRecord__['a' /* default */], + ).isRequired, + tags: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.instanceOf( + __WEBPACK_IMPORTED_MODULE_4_immutable___default.a.List, + ).isRequired, + headerWithoutBreadcrumbsHeight: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number, + breadcrumbsHeight: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number, + }; + var mapStateToProps = function mapStateToProps(state, ownProps) { + return { + headerWithoutBreadcrumbsHeight: state.uiState.get('headerWithoutBreadcrumbsHeight'), + breadcrumbsHeight: state.uiState.get('breadcrumbsHeight'), + }; + }; + + /* harmony default export */ __webpack_exports__['a'] = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_1_react_redux__['b' /* connect */], + )(mapStateToProps)(Post); + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(1)); + + /***/ + }, + /* 406 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (React) { + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(2); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_router__ = __webpack_require__(13); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_app_records_entities_AuthorRecord__ = + __webpack_require__(46); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var Author = (function (_React$Component) { + _inherits(Author, _React$Component); + + function Author() { + _classCallCheck(this, Author); + + return _possibleConstructorReturn( + this, + (Author.__proto__ || Object.getPrototypeOf(Author)).apply(this, arguments), + ); + } + + _createClass(Author, [ + { + key: 'render', + + /** + * + */ + value: function render() { + var author = this.props.author; + var authorLocation = '/authors/' + author.get('id'); + + return React.createElement( + 'div', + { className: 'post-author' }, + React.createElement('span', { + className: 'glyphicon glyphicon-user', + 'aria-hidden': 'true', + }), + ' ', + React.createElement('span', { className: 'title' }, '\u0410\u0432\u0442\u043E\u0440:'), + ' ', + React.createElement( + __WEBPACK_IMPORTED_MODULE_1_react_router__['f' /* Link */], + { href: authorLocation, to: authorLocation }, + author.get('name'), + ), + ); + }, + /** + * + */ + }, + ]); + + return Author; + })(React.Component); + + Author.propTypes = { + author: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.instanceOf( + __WEBPACK_IMPORTED_MODULE_2_app_records_entities_AuthorRecord__['a' /* default */], + ).isRequired, + }; + + /* harmony default export */ __webpack_exports__['a'] = Author; + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(1)); + + /***/ + }, + /* 407 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (React) { + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(2); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_router__ = __webpack_require__(13); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_app_records_entities_AuthorRecord__ = + __webpack_require__(46); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var AuthorAvatar = (function (_React$Component) { + _inherits(AuthorAvatar, _React$Component); + + function AuthorAvatar() { + _classCallCheck(this, AuthorAvatar); + + return _possibleConstructorReturn( + this, + (AuthorAvatar.__proto__ || Object.getPrototypeOf(AuthorAvatar)).apply(this, arguments), + ); + } + + _createClass(AuthorAvatar, [ + { + key: 'render', + + /** + * + */ + value: function render() { + var author = this.props.author; + var authorLocation = '/authors/' + author.get('id'); + + return React.createElement( + __WEBPACK_IMPORTED_MODULE_1_react_router__['f' /* Link */], + { href: authorLocation, to: authorLocation, className: 'thumbnail thumbnail-author' }, + React.createElement('img', { src: author.get('avatar_thumb_url') }), + ); + }, + /** + * + */ + }, + ]); + + return AuthorAvatar; + })(React.Component); + + AuthorAvatar.propTypes = { + author: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.instanceOf( + __WEBPACK_IMPORTED_MODULE_2_app_records_entities_AuthorRecord__['a' /* default */], + ).isRequired, + }; + + /* harmony default export */ __webpack_exports__['a'] = AuthorAvatar; + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(1)); + + /***/ + }, + /* 408 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (React) { + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(2); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_dom__ = __webpack_require__(43); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_dom___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_react_dom__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_classnames__ = __webpack_require__(35); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_classnames___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_2_classnames__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_moment__ = __webpack_require__(122); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_moment___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_3_moment__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_app_records_entities_AuthorRecord__ = + __webpack_require__(46); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_app_records_entities_CommentRecord__ = + __webpack_require__(113); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__comment_RespondButtonContainer__ = + __webpack_require__(417); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__comment_Avatar__ = __webpack_require__(415); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__comment_FormInitializer__ = + __webpack_require__(416); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__Comments__ = __webpack_require__(245); + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var Comment = (function (_React$Component) { + _inherits(Comment, _React$Component); + + function Comment() { + _classCallCheck(this, Comment); + + return _possibleConstructorReturn( + this, + (Comment.__proto__ || Object.getPrototypeOf(Comment)).apply(this, arguments), + ); + } + + _createClass(Comment, [ + { + key: 'componentDidMount', + + /** + * + */ + value: function componentDidMount() { + var comment = this.props.comment; + var $node = $(__WEBPACK_IMPORTED_MODULE_1_react_dom___default.a.findDOMNode(this)); + var $publishedAtNode = $node.find('#comment-id-' + comment.get('id') + '-created-at'); + var publishedAtInBrowserTimezone = this.formatTime( + __WEBPACK_IMPORTED_MODULE_3_moment___default.a + .utc(this.props.comment.get('created_at_utc')) + .local(), + ); + $publishedAtNode.text(publishedAtInBrowserTimezone); + }, + + /** + * + */ + + /** + * + */ + }, + { + key: 'formatTime', + value: function formatTime(timeMoment) { + return timeMoment.locale('ru').format('D MMM YYYY, HH:mm'); + }, + + /** + * + */ + }, + { + key: 'render', + value: function render() { + var author = this.props.author; + var comment = this.props.comment; + + var commentClass = __WEBPACK_IMPORTED_MODULE_2_classnames___default()('comment', { + root: comment.get('depth') === 0, + 'last-leaf': this.props.isLastLeaf, + }); + + var style = { + marginLeft: comment.get('depth') ? '30px' : '0', + }; + + var createdAt = this.formatTime( + __WEBPACK_IMPORTED_MODULE_3_moment___default.a.utc(comment.get('created_at_utc')), + ); + var commonProps = { + location: this.props.location, + isCurrentUserLoggedIn: this.props.isCurrentUserLoggedIn, + }; + + return React.createElement( + 'div', + { className: commentClass, style: style }, + React.createElement('div', { className: 'branch-connector' }), + React.createElement('div', { className: 'branch-interrupter' }), + React.createElement( + 'div', + { className: 'panel panel-default' }, + React.createElement( + 'div', + { className: 'panel-heading' }, + React.createElement(__WEBPACK_IMPORTED_MODULE_7__comment_Avatar__['a' /* default */], { + author: this.props.author, + }), + React.createElement( + 'span', + { className: 'author-name text-muted' }, + author.get('name'), + ), + React.createElement('br', null), + React.createElement( + 'span', + { + id: 'comment-id-' + comment.get('id') + '-created-at', + className: 'created-at text-muted', + }, + createdAt, + ), + React.createElement('div', { className: 'clearfix' }), + ), + React.createElement( + 'div', + { className: 'panel-body text-muted' }, + React.createElement('span', { className: 'comment-content' }, comment.get('content')), + React.createElement( + __WEBPACK_IMPORTED_MODULE_6__comment_RespondButtonContainer__['a' /* default */], + _extends({ comment: this.props.comment }, commonProps), + ), + React.createElement( + __WEBPACK_IMPORTED_MODULE_8__comment_FormInitializer__['a' /* default */], + _extends({ comment: this.props.comment }, commonProps), + ), + ), + ), + React.createElement( + 'div', + { className: 'child-comments' }, + React.createElement( + __WEBPACK_IMPORTED_MODULE_9__Comments__['a' /* default */], + _extends({ parentCommentId: comment.get('id') }, commonProps), + ), + ), + ); + }, + }, + ]); + + return Comment; + })(React.Component); + + Comment.propTypes = { + location: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.shape({ + pathname: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string.isRequired, + query: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object, + }).isRequired, + author: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.instanceOf( + __WEBPACK_IMPORTED_MODULE_4_app_records_entities_AuthorRecord__['a' /* default */], + ).isRequired, + comment: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.instanceOf( + __WEBPACK_IMPORTED_MODULE_5_app_records_entities_CommentRecord__['a' /* default */], + ).isRequired, + isLastLeaf: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.bool, + isCurrentUserLoggedIn: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string, + }; + + /* harmony default export */ __webpack_exports__['a'] = Comment; + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(1)); + + /***/ + }, + /* 409 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (React) { + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(2); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_redux__ = __webpack_require__(6); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_app_records_collections_PostsCollectionRecord__ = + __webpack_require__(88); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var CommentsCount = (function (_React$Component) { + _inherits(CommentsCount, _React$Component); + + function CommentsCount() { + _classCallCheck(this, CommentsCount); + + return _possibleConstructorReturn( + this, + (CommentsCount.__proto__ || Object.getPrototypeOf(CommentsCount)).apply(this, arguments), + ); + } + + _createClass(CommentsCount, [ + { + key: 'render', + + /** + * + */ + value: function render() { + var postId = this.props.params.id; + var post = this.props.postsCollection.getPost(postId); + var commentsCount = post.get('comments_count'); + + return React.createElement( + 'div', + { className: 'post-comments-count' }, + React.createElement('span', { + className: 'glyphicon glyphicon-comment', + 'aria-hidden': 'true', + }), + ' ', + React.createElement( + 'span', + { className: 'title' }, + '\u041A\u043E\u043C\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u0435\u0432:', + ), + ' ', + React.createElement('span', { className: 'text-muted comments-count' }, commentsCount), + ); + }, + /** + * + */ + }, + ]); + + return CommentsCount; + })(React.Component); + + /** + * + */ + + CommentsCount.propTypes = { + params: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.shape({ + id: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string.isRequired, + }).isRequired, + postsCollection: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.instanceOf( + __WEBPACK_IMPORTED_MODULE_2_app_records_collections_PostsCollectionRecord__['a' /* default */], + ).isRequired, + }; + var mapStateToProps = function mapStateToProps(state, ownProps) { + return { + postsCollection: state.posts, + }; + }; + + /* harmony default export */ __webpack_exports__['a'] = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_1_react_redux__['b' /* connect */], + )(mapStateToProps)(CommentsCount); + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(1)); + + /***/ + }, + /* 410 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (React) { + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(2); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_redux__ = __webpack_require__(6); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_app_utils_PaginationKeyUtil__ = + __webpack_require__(26); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_app_records_collections_CommentsCollectionRecord__ = + __webpack_require__(112); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var CommentsHeader = (function (_React$Component) { + _inherits(CommentsHeader, _React$Component); + + function CommentsHeader() { + _classCallCheck(this, CommentsHeader); + + return _possibleConstructorReturn( + this, + (CommentsHeader.__proto__ || Object.getPrototypeOf(CommentsHeader)).apply(this, arguments), + ); + } + + _createClass(CommentsHeader, [ + { + key: 'render', + + /** + * + */ + value: function render() { + var paginationKey = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_2_app_utils_PaginationKeyUtil__['a' /* calculatePaginationKey */], + )(this.props.location.pathname, this.props.location.search); + var commentsOnPage = this.props.commentsCollection.getItemsOnPage(paginationKey, '1'); + + if (commentsOnPage.size) + return React.createElement( + 'h3', + { className: 'text-center' }, + '\u041A\u043E\u043C\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u0438', + ); + + return React.createElement( + 'h3', + { className: 'text-center' }, + '\u041A\u043E\u043C\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u0435\u0432 \u043F\u043E\u043A\u0430 \u043D\u0435\u0442. \u041E\u0441\u0442\u0430\u0432\u044C\u0442\u0435 \u043F\u0435\u0440\u0432\u044B\u0439!', + ); + }, + /** + * + */ + }, + ]); + + return CommentsHeader; + })(React.Component); + + /** + * + */ + + CommentsHeader.propTypes = { + commentsCollection: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.instanceOf( + __WEBPACK_IMPORTED_MODULE_3_app_records_collections_CommentsCollectionRecord__['a' /* default */], + ).isRequired, + location: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.shape({ + search: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string, + pathname: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string.isRequired, + }).isRequired, + }; + var mapStateToProps = function mapStateToProps(state, ownProps) { + return { commentsCollection: state.comments }; + }; + + /* harmony default export */ __webpack_exports__['a'] = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_1_react_redux__['b' /* connect */], + )(mapStateToProps)(CommentsHeader); + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(1)); + + /***/ + }, + /* 411 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (React) { + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(2); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_dom__ = __webpack_require__(43); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_dom___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_react_dom__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_app_records_entities_PostRecord__ = + __webpack_require__(90); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_photoswipe__ = __webpack_require__(743); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_photoswipe___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_3_photoswipe__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_photoswipe_dist_photoswipe_ui_default__ = + __webpack_require__(742); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_photoswipe_dist_photoswipe_ui_default___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_photoswipe_dist_photoswipe_ui_default__); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var Content = (function (_React$Component) { + _inherits(Content, _React$Component); + + function Content() { + _classCallCheck(this, Content); + + return _possibleConstructorReturn( + this, + (Content.__proto__ || Object.getPrototypeOf(Content)).apply(this, arguments), + ); + } + + _createClass(Content, [ + { + key: 'parseLocationPhotoSwipeHash', + + /** + * + */ + value: function parseLocationPhotoSwipeHash() { + var hash = window.location.hash.substring(1); + var params = {}; + + if (hash.length < 5) return params; + + var vars = hash.split('&'); + + for (var i = 0; i < vars.length; i++) { + if (!vars[i]) continue; + var pair = vars[i].split('='); + + if (pair.length < 2) continue; + params[pair[0]] = pair[1]; + } + + if (params.gid) params.gid = parseInt(params.gid, 10); + if (params.pid) params.pid = parseInt(params.pid, 10); + + return params; + }, + + /** + * + */ + + /** + * + */ + }, + { + key: 'openPhotoSwipe', + value: function openPhotoSwipe(pswpEl, items, itemIndex) { + var options = { + index: itemIndex, + getThumbBoundsFn: function getThumbBoundsFn(index) { + var thumbnail = items[index].element; + var pageYScroll = window.pageYOffset || document.documentElement.scrollTop; + var rect = thumbnail.getBoundingClientRect(); + + // eslint-disable-next-line id-length + return { x: rect.left, y: rect.top + pageYScroll, w: rect.width }; + }, + shareEl: false, + }; + + var gallery = new __WEBPACK_IMPORTED_MODULE_3_photoswipe___default.a( + pswpEl, + __WEBPACK_IMPORTED_MODULE_4_photoswipe_dist_photoswipe_ui_default___default.a, + items, + options, + ); + gallery.init(); + }, + + /** + * + */ + }, + { + key: 'componentDidMount', + value: function componentDidMount() { + var _this2 = this; + + var $node = $(__WEBPACK_IMPORTED_MODULE_1_react_dom___default.a.findDOMNode(this)); + var $pswpElement = $('.pswp'); + var items = []; + + $node.find('img').each(function (index, image) { + var $image = $(image); + $image.attr('pswp_index', index); + + var richFileId = $image.data('richFileId'); + var thumbSrc = $image.attr('src'); + var imageSizes = _this2.props.post.get('images_sizes').get(String(richFileId)); + + /* eslint-disable id-length */ + items.push({ + element: image, + src: imageSizes.get('src'), + msrc: thumbSrc, + w: imageSizes.get('width'), + h: imageSizes.get('height'), + }); + /* eslint-enable id-length */ + }); + + $node.find('img').bind('click', function (event) { + var $image = $(event.target); + _this2.openPhotoSwipe($pswpElement[0], items, Number($image.attr('pswp_index'))); + }); + + var hashData = this.parseLocationPhotoSwipeHash(); + + if (hashData.pid && hashData.gid && hashData.pid <= items.length) { + this.openPhotoSwipe($pswpElement[0], items, hashData.pid - 1); + } + }, + + /** + * + */ + }, + { + key: 'setContent', + value: function setContent() { + return { __html: this.props.post.get('content') }; + }, + + /** + * + */ + }, + { + key: 'render', + value: function render() { + return React.createElement( + 'div', + null, + React.createElement('div', { + className: 'post-content', + dangerouslySetInnerHTML: this.setContent(), + }), + ); + }, + }, + ]); + + return Content; + })(React.Component); + + Content.propTypes = { + post: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.instanceOf( + __WEBPACK_IMPORTED_MODULE_2_app_records_entities_PostRecord__['a' /* default */], + ).isRequired, + }; + + /* harmony default export */ __webpack_exports__['a'] = Content; + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(1)); + + /***/ + }, + /* 412 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (React) { + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(2); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_dom__ = __webpack_require__(43); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_dom___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_react_dom__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_moment__ = __webpack_require__(122); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_moment___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_2_moment__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_app_records_entities_PostRecord__ = + __webpack_require__(90); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var PublishedTime = (function (_React$Component) { + _inherits(PublishedTime, _React$Component); + + function PublishedTime() { + _classCallCheck(this, PublishedTime); + + return _possibleConstructorReturn( + this, + (PublishedTime.__proto__ || Object.getPrototypeOf(PublishedTime)).apply(this, arguments), + ); + } + + _createClass(PublishedTime, [ + { + key: 'formatTime', + + /** + * + */ + value: function formatTime(timeMoment) { + return timeMoment.locale('ru').format('D MMM YYYY, HH:mm'); + }, + + /** + * + */ + + /** + * + */ + }, + { + key: 'componentDidMount', + value: function componentDidMount() { + var $node = $(__WEBPACK_IMPORTED_MODULE_1_react_dom___default.a.findDOMNode(this)); + var $publishedAtNode = $node.find('.published-at'); + + var publishedAtInBrowserTimezone = this.formatTime( + __WEBPACK_IMPORTED_MODULE_2_moment___default.a + .utc(this.props.post.get('published_at_utc')) + .local(), + ); + $publishedAtNode.text(publishedAtInBrowserTimezone); + }, + + /** + * + */ + }, + { + key: 'render', + value: function render() { + var post = this.props.post; + var publishedAt = this.formatTime( + __WEBPACK_IMPORTED_MODULE_2_moment___default.a.utc(post.get('published_at_utc')), + ); + + return React.createElement( + 'div', + { className: 'post-published-time' }, + React.createElement('span', { + className: 'glyphicon glyphicon-calendar', + 'aria-hidden': 'true', + }), + ' ', + React.createElement( + 'span', + { className: 'title' }, + '\u041E\u043F\u0443\u0431\u043B\u0438\u043A\u043E\u0432\u0430\u043D\u043E:', + ), + ' ', + React.createElement('span', { className: 'text-muted published-at' }, publishedAt), + ); + }, + }, + ]); + + return PublishedTime; + })(React.Component); + + PublishedTime.propTypes = { + post: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.instanceOf( + __WEBPACK_IMPORTED_MODULE_3_app_records_entities_PostRecord__['a' /* default */], + ).isRequired, + }; + + /* harmony default export */ __webpack_exports__['a'] = PublishedTime; + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(1)); + + /***/ + }, + /* 413 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (React) { + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(2); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_app_utils_TmpIdUtil__ = __webpack_require__(131); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_app_actions_commentsActions__ = + __webpack_require__(153); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_app_records_entities_PostRecord__ = + __webpack_require__(90); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_app_components_shared_CommentForm__ = + __webpack_require__(246); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var RootCommentFormInitializer = (function (_React$Component) { + _inherits(RootCommentFormInitializer, _React$Component); + + function RootCommentFormInitializer() { + _classCallCheck(this, RootCommentFormInitializer); + + return _possibleConstructorReturn( + this, + ( + RootCommentFormInitializer.__proto__ || Object.getPrototypeOf(RootCommentFormInitializer) + ).apply(this, arguments), + ); + } + + _createClass(RootCommentFormInitializer, [ + { + key: 'componentWillMount', + + /** + * + */ + + /** + * Gets store from context. + */ + value: function componentWillMount() { + this.commentTmpId = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_1_app_utils_TmpIdUtil__['a' /* generateTmpId */], + )(); + this.context.store.dispatch( + __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_2_app_actions_commentsActions__['a' /* buildComment */], + )({ + tmpId: this.commentTmpId, + post_id: this.props.post.get('id'), + }), + ); + }, + + /** + * + */ + + /** + * + */ + }, + { + key: 'componentWillUnmount', + value: function componentWillUnmount() { + this.context.store.dispatch( + __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_2_app_actions_commentsActions__['b' /* removeTmpComment */], + )(this.commentTmpId), + ); + }, + + /** + * + */ + }, + { + key: 'render', + value: function render() { + return React.createElement( + __WEBPACK_IMPORTED_MODULE_4_app_components_shared_CommentForm__['a' /* default */], + { + commentTmpId: this.commentTmpId, + location: this.props.location, + isCurrentUserLoggedIn: this.props.isCurrentUserLoggedIn, + }, + ); + }, + }, + ]); + + return RootCommentFormInitializer; + })(React.Component); + + RootCommentFormInitializer.contextTypes = { + store: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object.isRequired, + }; + RootCommentFormInitializer.propTypes = { + location: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.shape({ + search: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string, + pathname: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string.isRequired, + }).isRequired, + post: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.instanceOf( + __WEBPACK_IMPORTED_MODULE_3_app_records_entities_PostRecord__['a' /* default */], + ).isRequired, + isCurrentUserLoggedIn: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string, + }; + + /* harmony default export */ __webpack_exports__['a'] = RootCommentFormInitializer; + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(1)); + + /***/ + }, + /* 414 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (React) { + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(2); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_immutable__ = __webpack_require__(18); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_immutable___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_immutable__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_router__ = __webpack_require__(13); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var Tags = (function (_React$Component) { + _inherits(Tags, _React$Component); + + function Tags() { + _classCallCheck(this, Tags); + + return _possibleConstructorReturn( + this, + (Tags.__proto__ || Object.getPrototypeOf(Tags)).apply(this, arguments), + ); + } + + _createClass(Tags, [ + { + key: 'renderTags', + + /** + * + */ + value: function renderTags(tags) { + return tags.map(function (tag) { + var postsFilteredByTagLocation = '/?tag=' + tag.get('id'); + + return React.createElement( + __WEBPACK_IMPORTED_MODULE_2_react_router__['f' /* Link */], + { + href: postsFilteredByTagLocation, + to: postsFilteredByTagLocation, + key: tag.get('id'), + className: 'label label-info', + }, + tag.get('name'), + ); + }); + }, + + /** + * + */ + + /** + * + */ + }, + { + key: 'render', + value: function render() { + return React.createElement( + 'div', + { className: 'post-tags' }, + React.createElement('span', { + className: 'glyphicon glyphicon-tags', + 'aria-hidden': 'true', + }), + ' ', + React.createElement('span', { className: 'title' }, '\u0422\u044D\u0433\u0438:'), + this.renderTags(this.props.tags), + ); + }, + }, + ]); + + return Tags; + })(React.Component); + + Tags.propTypes = { + tags: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.instanceOf( + __WEBPACK_IMPORTED_MODULE_1_immutable___default.a.List, + ).isRequired, + }; + + /* harmony default export */ __webpack_exports__['a'] = Tags; + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(1)); + + /***/ + }, + /* 415 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (React) { + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(2); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_app_records_entities_AuthorRecord__ = + __webpack_require__(46); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var Avatar = (function (_React$Component) { + _inherits(Avatar, _React$Component); + + function Avatar() { + _classCallCheck(this, Avatar); + + return _possibleConstructorReturn( + this, + (Avatar.__proto__ || Object.getPrototypeOf(Avatar)).apply(this, arguments), + ); + } + + _createClass(Avatar, [ + { + key: 'render', + + /** + * + */ + value: function render() { + var author = this.props.author; + + if (author.get('avatar_thumb_url')) { + return React.createElement('img', { + className: 'author-avatar', + src: author.get('avatar_thumb_url'), + }); + } + + return React.createElement('div', { className: 'no-avatar' }); + }, + /** + * + */ + }, + ]); + + return Avatar; + })(React.Component); + + Avatar.propTypes = { + author: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.instanceOf( + __WEBPACK_IMPORTED_MODULE_1_app_records_entities_AuthorRecord__['a' /* default */], + ).isRequired, + }; + + /* harmony default export */ __webpack_exports__['a'] = Avatar; + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(1)); + + /***/ + }, + /* 416 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (React) { + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(2); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_app_utils_TmpIdUtil__ = __webpack_require__(131); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_app_actions_commentsActions__ = + __webpack_require__(153); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_app_records_entities_CommentRecord__ = + __webpack_require__(113); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_app_components_shared_CommentForm__ = + __webpack_require__(246); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var FormInitializer = (function (_React$Component) { + _inherits(FormInitializer, _React$Component); + + function FormInitializer() { + _classCallCheck(this, FormInitializer); + + return _possibleConstructorReturn( + this, + (FormInitializer.__proto__ || Object.getPrototypeOf(FormInitializer)).apply(this, arguments), + ); + } + + _createClass(FormInitializer, [ + { + key: 'componentWillMount', + + /** + * + */ + + /** + * Gets store from context. + */ + value: function componentWillMount() { + this.commentTmpId = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_1_app_utils_TmpIdUtil__['a' /* generateTmpId */], + )(); + this.context.store.dispatch( + __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_2_app_actions_commentsActions__['a' /* buildComment */], + )({ + tmpId: this.commentTmpId, + post_id: this.props.comment.get('post_id'), + parent_id: this.props.comment.get('id'), + }), + ); + }, + + /** + * + */ + + /** + * + */ + }, + { + key: 'componentWillUnmount', + value: function componentWillUnmount() { + this.context.store.dispatch( + __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_2_app_actions_commentsActions__['b' /* removeTmpComment */], + )(this.commentTmpId), + ); + }, + + /** + * + */ + }, + { + key: 'render', + value: function render() { + return React.createElement( + __WEBPACK_IMPORTED_MODULE_4_app_components_shared_CommentForm__['a' /* default */], + { + commentTmpId: this.commentTmpId, + location: this.props.location, + comment: this.props.comment, + isCurrentUserLoggedIn: this.props.isCurrentUserLoggedIn, + }, + ); + }, + }, + ]); + + return FormInitializer; + })(React.Component); + + FormInitializer.contextTypes = { + store: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object.isRequired, + }; + FormInitializer.propTypes = { + location: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.shape({ + pathname: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string.isRequired, + query: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object, + }).isRequired, + comment: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.instanceOf( + __WEBPACK_IMPORTED_MODULE_3_app_records_entities_CommentRecord__['a' /* default */], + ).isRequired, + isCurrentUserLoggedIn: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string, + }; + + /* harmony default export */ __webpack_exports__['a'] = FormInitializer; + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(1)); + + /***/ + }, + /* 417 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (React, _) { + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(2); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_router__ = __webpack_require__(13); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_app_records_entities_CommentRecord__ = + __webpack_require__(113); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var RespondButtonContainer = (function (_React$Component) { + _inherits(RespondButtonContainer, _React$Component); + + function RespondButtonContainer() { + _classCallCheck(this, RespondButtonContainer); + + return _possibleConstructorReturn( + this, + (RespondButtonContainer.__proto__ || Object.getPrototypeOf(RespondButtonContainer)).apply( + this, + arguments, + ), + ); + } + + _createClass(RespondButtonContainer, [ + { + key: 'render', + + /** + * + */ + value: function render() { + if (!this.props.isCurrentUserLoggedIn) return null; + + var commentWithOpenedRespondFormId = + this.props.location.query.respond_form_opened_for_comment_with_id; + var currentCommentId = String(this.props.comment.get('id')); + if (commentWithOpenedRespondFormId === currentCommentId) return null; + + var alteredQuery = _.clone(this.props.location.query); + alteredQuery.respond_form_opened_for_comment_with_id = this.props.comment.get('id'); + + var locationForOpenedForm = { + pathname: this.props.location.pathname, + query: alteredQuery, + }; + + return React.createElement( + 'div', + { className: 'respond-button-container' }, + React.createElement( + __WEBPACK_IMPORTED_MODULE_1_react_router__['f' /* Link */], + { + to: locationForOpenedForm, + href: locationForOpenedForm, + className: 'btn btn-default btn-sm', + }, + React.createElement('span', { + className: 'glyphicon glyphicon-share-alt', + 'aria-hidden': 'true', + }), + ' \u041E\u0442\u0432\u0435\u0442\u0438\u0442\u044C...', + ), + ); + }, + /** + * + */ + }, + ]); + + return RespondButtonContainer; + })(React.Component); + + RespondButtonContainer.propTypes = { + location: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.shape({ + pathname: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string.isRequired, + query: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object, + }).isRequired, + comment: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.instanceOf( + __WEBPACK_IMPORTED_MODULE_2_app_records_entities_CommentRecord__['a' /* default */], + ).isRequired, + isCurrentUserLoggedIn: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string, + }; + + /* harmony default export */ __webpack_exports__['a'] = RespondButtonContainer; + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(1), __webpack_require__(60)); + + /***/ + }, + /* 418 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (React) { + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(2); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_helmet__ = __webpack_require__(44); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_helmet___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_react_helmet__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_immutable__ = __webpack_require__(18); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_immutable___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_2_immutable__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__posts_Header__ = __webpack_require__(419); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__posts_PostsList__ = __webpack_require__(421); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__posts_PaginationContainer__ = + __webpack_require__(420); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__posts_TagsCloud__ = __webpack_require__(422); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var Posts = (function (_React$Component) { + _inherits(Posts, _React$Component); + + function Posts() { + _classCallCheck(this, Posts); + + return _possibleConstructorReturn( + this, + (Posts.__proto__ || Object.getPrototypeOf(Posts)).apply(this, arguments), + ); + } + + _createClass(Posts, [ + { + key: 'render', + + /** + * + */ + value: function render() { + return React.createElement( + 'div', + { id: 'posts', className: 'page-content' }, + React.createElement( + __WEBPACK_IMPORTED_MODULE_1_react_helmet__['Helmet'], + null, + React.createElement( + 'title', + null, + 'Bionic Workshop | \u0413\u043B\u0430\u0432\u043D\u0430\u044F', + ), + React.createElement('meta', { + name: 'description', + content: + '\u0412 \u0431\u043B\u043E\u0433\u0435 Bionic Workshop \u043C\u044B \u0434\u0435\u043B\u0438\u043C\u0441\u044F \u043E\u043F\u044B\u0442\u043E\u043C \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u0438\u044F \u0431\u0438\u043E\u043D\u0438\u0447\u0435\u0441\u043A\u0438\u0445 \u043F\u0440\u043E\u0442\u0435\u0437\u043E\u0432, \u0440\u0430\u0441\u0441\u043A\u0430\u0437\u044B\u0432\u0430\u0435\u043C \u043E \u043F\u0440\u043E\u0431\u043B\u0435\u043C\u0430\u0445, \u043F\u043E\u0434\u0432\u043E\u0434\u043D\u044B\u0445 \u043A\u0430\u043C\u043D\u044F\u0445 \u0438 \u043F\u0443\u0442\u044F\u0445 \u043F\u043E\u0438\u0441\u043A\u0430 \u0440\u0435\u0448\u0435\u043D\u0438\u0439. \u0411\u043B\u043E\u0433 \u0441\u043E\u0437\u0434\u0430\u043D \u0414\u0435\u043D\u0438\u0441\u043E\u043C \u0423\u0434\u043E\u0432\u0435\u043D\u043A\u043E, \u0430\u043A\u0442\u0438\u0432\u043D\u044B\u043C \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u0435\u043C \u043F\u0440\u043E\u0442\u0435\u0437\u043E\u0432 \u043A\u0438\u0441\u0442\u0435\u0439 \u0440\u0443\u043A, \u043F\u043E\u0441\u0442\u0440\u0430\u0434\u0430\u0432\u0448\u0438\u043C \u043E\u0442 \u043D\u0430\u043F\u0430\u0434\u0435\u043D\u0438\u044F \u0431\u0435\u043B\u043E\u0439 \u0430\u043A\u0443\u043B\u044B.', + }), + ), + React.createElement( + 'div', + { className: 'container' }, + React.createElement( + 'div', + { className: 'row' }, + React.createElement( + 'div', + { className: 'col-md-9' }, + React.createElement( + __WEBPACK_IMPORTED_MODULE_3__posts_Header__['a' /* default */], + this.props, + ), + React.createElement( + __WEBPACK_IMPORTED_MODULE_4__posts_PostsList__['a' /* default */], + this.props, + ), + React.createElement( + __WEBPACK_IMPORTED_MODULE_5__posts_PaginationContainer__['a' /* default */], + this.props, + ), + ), + React.createElement(__WEBPACK_IMPORTED_MODULE_6__posts_TagsCloud__['a' /* default */], { + tags: this.props.tags, + }), + ), + ), + ); + }, + /** + * + */ + }, + ]); + + return Posts; + })(React.Component); + + Posts.propTypes = { + tags: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.instanceOf( + __WEBPACK_IMPORTED_MODULE_2_immutable___default.a.List, + ).isRequired, + }; + + /* harmony default export */ __webpack_exports__['a'] = Posts; + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(1)); + + /***/ + }, + /* 419 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (React) { + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(2); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_redux__ = __webpack_require__(6); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_app_records_collections_TagsCollectionRecord__ = + __webpack_require__(89); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var Header = (function (_React$Component) { + _inherits(Header, _React$Component); + + function Header() { + _classCallCheck(this, Header); + + return _possibleConstructorReturn( + this, + (Header.__proto__ || Object.getPrototypeOf(Header)).apply(this, arguments), + ); + } + + _createClass(Header, [ + { + key: 'render', + + /** + * + */ + value: function render() { + var tagId = this.props.location.query.tag; + + if (tagId) { + var tag = this.props.tagsCollection.getTag(tagId); + return React.createElement( + 'h2', + { className: 'text-center' }, + '\u041F\u0443\u0431\u043B\u0438\u043A\u0430\u0446\u0438\u0438 ', + React.createElement( + 'small', + null, + '\u0441 \u0442\u044D\u0433\u043E\u043C "', + tag.get('name'), + '"', + ), + ); + } + + return React.createElement( + 'h2', + { className: 'text-center' }, + '\u041F\u0443\u0431\u043B\u0438\u043A\u0430\u0446\u0438\u0438', + ); + }, + /** + * + */ + }, + ]); + + return Header; + })(React.Component); + + /** + * + */ + + Header.propTypes = { + location: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.shape({ + query: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object, + }).isRequired, + tagsCollection: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.instanceOf( + __WEBPACK_IMPORTED_MODULE_2_app_records_collections_TagsCollectionRecord__['a' /* default */], + ).isRequired, + }; + var mapStateToProps = function mapStateToProps(state, ownProps) { + return { tagsCollection: state.tags }; + }; + + /* harmony default export */ __webpack_exports__['a'] = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_1_react_redux__['b' /* connect */], + )(mapStateToProps)(Header); + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(1)); + + /***/ + }, + /* 420 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (React) { + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(2); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_redux__ = __webpack_require__(6); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_app_utils_PaginationKeyUtil__ = + __webpack_require__(26); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_app_records_collections_PostsCollectionRecord__ = + __webpack_require__(88); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_app_components_shared_Pagination__ = + __webpack_require__(455); + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var PaginationContainer = (function (_React$Component) { + _inherits(PaginationContainer, _React$Component); + + function PaginationContainer() { + _classCallCheck(this, PaginationContainer); + + return _possibleConstructorReturn( + this, + (PaginationContainer.__proto__ || Object.getPrototypeOf(PaginationContainer)).apply( + this, + arguments, + ), + ); + } + + _createClass(PaginationContainer, [ + { + key: 'render', + + /** + * + */ + value: function render() { + // Get posts list for current page: + var paginationKey = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_2_app_utils_PaginationKeyUtil__['a' /* calculatePaginationKey */], + )(this.props.location.pathname, this.props.location.search); + var pagination = this.props.postsCollection.get('pagination').get(paginationKey); + + return React.createElement( + __WEBPACK_IMPORTED_MODULE_4_app_components_shared_Pagination__['a' /* default */], + _extends( + { total: pagination.get('total'), perPage: pagination.get('per_page') }, + this.props, + ), + ); + }, + /** + * + */ + }, + ]); + + return PaginationContainer; + })(React.Component); + + /** + * + */ + + PaginationContainer.propTypes = { + location: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.shape({ + pathname: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string.isRequired, + search: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string.isRequired, + }).isRequired, + postsCollection: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.instanceOf( + __WEBPACK_IMPORTED_MODULE_3_app_records_collections_PostsCollectionRecord__['a' /* default */], + ).isRequired, + }; + var mapStateToProps = function mapStateToProps(state, ownProps) { + return { postsCollection: state.posts }; + }; + + /* harmony default export */ __webpack_exports__['a'] = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_1_react_redux__['b' /* connect */], + )(mapStateToProps)(PaginationContainer); + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(1)); + + /***/ + }, + /* 421 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (React) { + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(2); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_redux__ = __webpack_require__(6); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_app_utils_PaginationKeyUtil__ = + __webpack_require__(26); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_app_records_collections_PostsCollectionRecord__ = + __webpack_require__(88); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__posts_list_Post__ = __webpack_require__(423); + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var PostsList = (function (_React$Component) { + _inherits(PostsList, _React$Component); + + function PostsList() { + _classCallCheck(this, PostsList); + + return _possibleConstructorReturn( + this, + (PostsList.__proto__ || Object.getPrototypeOf(PostsList)).apply(this, arguments), + ); + } + + _createClass(PostsList, [ + { + key: 'renderPosts', + + /** + * + */ + value: function renderPosts() { + var _this2 = this; + + // Get posts list for current page: + var paginationKey = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_2_app_utils_PaginationKeyUtil__['a' /* calculatePaginationKey */], + )(this.props.location.pathname, this.props.location.search); + var page = this.props.location.query.page || '1'; + var posts = this.props.postsCollection.getItemsOnPage(paginationKey, page); + + return posts.map(function (post) { + return React.createElement( + __WEBPACK_IMPORTED_MODULE_4__posts_list_Post__['a' /* default */], + _extends({ key: post.get('id'), post: post }, _this2.props), + ); + }); + }, + + /** + * + */ + + /** + * + */ + }, + { + key: 'render', + value: function render() { + return React.createElement('section', { className: 'posts-list' }, this.renderPosts()); + }, + }, + ]); + + return PostsList; + })(React.Component); + + /** + * + */ + + PostsList.propTypes = { + location: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.shape({ + search: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string, + pathname: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string.isRequired, + query: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object, + }).isRequired, + postsCollection: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.instanceOf( + __WEBPACK_IMPORTED_MODULE_3_app_records_collections_PostsCollectionRecord__['a' /* default */], + ).isRequired, + }; + var mapStateToProps = function mapStateToProps(state, ownProps) { + return { postsCollection: state.posts }; + }; + + /* harmony default export */ __webpack_exports__['a'] = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_1_react_redux__['b' /* connect */], + )(mapStateToProps)(PostsList); + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(1)); + + /***/ + }, + /* 422 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (React, _) { + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_router__ = __webpack_require__(13); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_tagcloud__ = __webpack_require__(861); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_tagcloud___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_react_tagcloud__, + ); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var TagsCloud = (function (_React$Component) { + _inherits(TagsCloud, _React$Component); + + function TagsCloud() { + _classCallCheck(this, TagsCloud); + + return _possibleConstructorReturn( + this, + (TagsCloud.__proto__ || Object.getPrototypeOf(TagsCloud)).apply(this, arguments), + ); + } + + _createClass(TagsCloud, [ + { + key: 'render', + + /** + * + */ + value: function render() { + /*/const data = [ + { value: "JavaScript", count: 38 }, + { value: "React", count: 30 }, + { value: "Nodejs", count: 28 }, + { value: "Express.js", count: 25 }, + { value: "HTML5", count: 33 }, + { value: "MongoDB", count: 18 }, + { value: "CSS3", count: 20 } + ];*/ + + var data = this.props.tags + .map(function (tag) { + return { id: tag.get('id'), value: tag.get('name'), count: tag.get('posts_count') }; + }) + .toArray(); + + var styles = { + margin: '0px 3px', + verticalAlign: 'middle', + display: 'inline-block', + }; + + var colors = ['#337ab7', '#3c763d', '#31708f', '#8a6d3b', '#a94442', '#777777']; + var colorIndex = 0; + + var customRenderer = function customRenderer(tag, size, color) { + var fontSize = size + 'px'; + var style = _.extend({}, styles, { color: colors[colorIndex], fontSize: fontSize }); + + if (colorIndex >= colors.length - 1) { + colorIndex = 0; + } else { + colorIndex++; + } + + var filteredPostsLocation = '/?tag=' + tag.id; + return React.createElement( + __WEBPACK_IMPORTED_MODULE_0_react_router__['f' /* Link */], + { + key: tag.id, + to: filteredPostsLocation, + href: filteredPostsLocation, + className: 'tag-cloud-tag', + style: style, + }, + tag.value, + ); + }; + + return React.createElement( + 'div', + { className: 'col-md-3' }, + React.createElement('h2', { className: 'text-center' }, '\u0422\u044D\u0433\u0438'), + React.createElement(__WEBPACK_IMPORTED_MODULE_1_react_tagcloud__['TagCloud'], { + minSize: 12, + maxSize: 35, + tags: data, + disableRandomColor: true, + shuffle: false, + renderer: customRenderer, + }), + ); + }, + }, + ]); + + return TagsCloud; + })(React.Component); + + /* harmony default export */ __webpack_exports__['a'] = TagsCloud; + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(1), __webpack_require__(60)); + + /***/ + }, + /* 423 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (React) { + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(2); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_dom__ = __webpack_require__(43); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_dom___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_react_dom__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_router__ = __webpack_require__(13); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_react_redux__ = __webpack_require__(6); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_moment__ = __webpack_require__(122); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_moment___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_4_moment__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_app_utils_PaginationKeyUtil__ = + __webpack_require__(26); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_app_records_entities_PostRecord__ = + __webpack_require__(90); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_app_records_collections_TagsCollectionRecord__ = + __webpack_require__(89); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_app_records_collections_AuthorsCollectionRecord__ = + __webpack_require__(73); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var Post = (function (_React$Component) { + _inherits(Post, _React$Component); + + function Post() { + _classCallCheck(this, Post); + + return _possibleConstructorReturn( + this, + (Post.__proto__ || Object.getPrototypeOf(Post)).apply(this, arguments), + ); + } + + _createClass(Post, [ + { + key: 'formatTime', + + /** + * + */ + value: function formatTime(timeMoment) { + return timeMoment.locale('ru').format('D MMM YYYY, HH:mm'); + }, + + /** + * + */ + + /** + * + */ + }, + { + key: 'componentDidMount', + value: function componentDidMount() { + var $node = $(__WEBPACK_IMPORTED_MODULE_1_react_dom___default.a.findDOMNode(this)); + var $publishedAtNode = $node.find('.published-at'); + + var publishedAtInBrowserTimezone = this.formatTime( + __WEBPACK_IMPORTED_MODULE_4_moment___default.a + .utc(this.props.post.get('published_at_utc')) + .local(), + ); + $publishedAtNode.text(publishedAtInBrowserTimezone); + }, + + /** + * + */ + }, + { + key: 'renderTags', + value: function renderTags(tags) { + return tags.map(function (tag) { + return React.createElement( + 'span', + { key: tag.get('id'), className: 'label label-info' }, + tag.get('name'), + ); + }); + }, + + /** + * + */ + }, + { + key: 'render', + value: function render() { + var post = this.props.post; + + // Get tags for current post: + var paginationKey = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_5_app_utils_PaginationKeyUtil__['a' /* calculatePaginationKey */], + )(this.props.location.pathname, this.props.location.search); + var tagsCollection = this.props.tagsCollection; + var tags = tagsCollection.getTagsListForPostOnPage(post, paginationKey, '1'); + + var authorsCollection = this.props.authorsCollection; + var author = authorsCollection.getAuthor(post.get('author_id')); + var authorName = author.get('name'); + + var publishedAt = this.formatTime( + __WEBPACK_IMPORTED_MODULE_4_moment___default.a.utc(post.get('published_at_utc')), + ); + + var postLocation = '/posts/' + this.props.post.get('id'); + + return React.createElement( + 'div', + { className: 'row' }, + React.createElement( + 'div', + { className: 'col-md-12' }, + React.createElement( + __WEBPACK_IMPORTED_MODULE_2_react_router__['f' /* Link */], + { href: postLocation, to: postLocation, className: 'thumbnail' }, + React.createElement( + 'div', + { className: 'author-and-tags-container' }, + React.createElement( + 'div', + { className: 'author' }, + React.createElement('span', null, authorName), + ', ', + React.createElement('span', { className: 'published-at' }, publishedAt), + ), + React.createElement('div', { className: 'tags' }, this.renderTags(tags)), + React.createElement('div', { className: 'clearfix' }), + React.createElement( + 'div', + { className: 'respources-counts text-muted' }, + React.createElement('span', { + className: 'glyphicon glyphicon-picture', + 'aria-hidden': 'true', + }), + '\xA0', + post.get('images_sizes').size, + '\xA0', + React.createElement('span', { + className: 'glyphicon glyphicon-film', + 'aria-hidden': 'true', + }), + '\xA0', + post.get('videos_count'), + '\xA0', + React.createElement('span', { + className: 'glyphicon glyphicon-comment', + 'aria-hidden': 'true', + }), + '\xA0', + post.get('comments_count'), + ), + ), + React.createElement('h4', null, post.get('title')), + React.createElement('p', { className: 'post-description' }, post.get('description')), + React.createElement('div', { className: 'clearfix' }), + ), + ), + ); + }, + }, + ]); + + return Post; + })(React.Component); + + /** + * + */ + + Post.propTypes = { + location: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.shape({ + search: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string, + pathname: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string.isRequired, + query: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object, + }).isRequired, + post: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.instanceOf( + __WEBPACK_IMPORTED_MODULE_6_app_records_entities_PostRecord__['a' /* default */], + ).isRequired, + tagsCollection: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.instanceOf( + __WEBPACK_IMPORTED_MODULE_7_app_records_collections_TagsCollectionRecord__['a' /* default */], + ).isRequired, + authorsCollection: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.instanceOf( + __WEBPACK_IMPORTED_MODULE_8_app_records_collections_AuthorsCollectionRecord__['a' /* default */], + ).isRequired, + }; + var mapStateToProps = function mapStateToProps(state, ownProps) { + return { + tagsCollection: state.tags, + authorsCollection: state.authors, + }; + }; + + /* harmony default export */ __webpack_exports__['a'] = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_3_react_redux__['b' /* connect */], + )(mapStateToProps)(Post); + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(1)); + + /***/ + }, + /* 424 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (React) { + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_helmet__ = __webpack_require__(44); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_helmet___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react_helmet__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__resend_confirmation_Form__ = + __webpack_require__(425); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__resend_confirmation_Links__ = + __webpack_require__(426); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var ResendConfirmation = (function (_React$Component) { + _inherits(ResendConfirmation, _React$Component); + + function ResendConfirmation() { + _classCallCheck(this, ResendConfirmation); + + return _possibleConstructorReturn( + this, + (ResendConfirmation.__proto__ || Object.getPrototypeOf(ResendConfirmation)).apply( + this, + arguments, + ), + ); + } + + _createClass(ResendConfirmation, [ + { + key: 'render', + + /** + * + */ + value: function render() { + return React.createElement( + 'div', + { id: 'resend-confirmation', className: 'page-content' }, + React.createElement( + __WEBPACK_IMPORTED_MODULE_0_react_helmet__['Helmet'], + null, + React.createElement( + 'title', + null, + 'Bionic Workshop | \u041F\u043E\u0432\u0442\u043E\u0440\u043D\u0430\u044F \u043E\u0442\u043F\u0440\u0430\u0432\u043A\u0430 \u0438\u043D\u0441\u0442\u0440\u0443\u043A\u0446\u0438\u0439', + ), + React.createElement('meta', { + name: 'description', + content: + '\u041D\u0435 \u043F\u043E\u043B\u0443\u0447\u0438\u043B\u0438 \u043F\u0438\u0441\u044C\u043C\u043E \u0441 \u0438\u043D\u0441\u0442\u0440\u0443\u043A\u0446\u0438\u044F\u043C\u0438 \u0434\u043B\u044F \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u044F \u0430\u043A\u043A\u0430\u0443\u043D\u0442\u0430? \u0418\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0439\u0442\u0435 \u044D\u0442\u0443 \u0444\u043E\u0440\u043C\u0443 \u0447\u0442\u043E\u0431\u044B \u043E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C \u043F\u0438\u0441\u044C\u043C\u043E \u043F\u043E\u0432\u0442\u043E\u0440\u043D\u043E.', + }), + ), + React.createElement( + 'div', + { className: 'container' }, + React.createElement( + 'div', + { className: 'row' }, + React.createElement( + 'div', + { className: 'col-md-12' }, + React.createElement( + 'h2', + { className: 'text-center' }, + '\u041F\u043E\u0432\u0442\u043E\u0440\u043D\u0430\u044F \u043E\u0442\u043F\u0440\u0430\u0432\u043A\u0430 \u0438\u043D\u0441\u0442\u0440\u0443\u043A\u0446\u0438\u0439', + ), + React.createElement( + __WEBPACK_IMPORTED_MODULE_1__resend_confirmation_Form__['a' /* default */], + null, + ), + React.createElement( + __WEBPACK_IMPORTED_MODULE_2__resend_confirmation_Links__['a' /* default */], + null, + ), + ), + ), + ), + ); + }, + }, + ]); + + return ResendConfirmation; + })(React.Component); + + /* harmony default export */ __webpack_exports__['a'] = ResendConfirmation; + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(1)); + + /***/ + }, + /* 425 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_redux__ = __webpack_require__(6); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_app_actions_currentUserActions__ = + __webpack_require__(21); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_app_components_shared_UserEmailForm__ = + __webpack_require__(247); + + /** + * + */ + var mapStateToProps = function mapStateToProps(state, ownProps) { + return { + authenticityToken: state.railsContext.get('authenticityToken'), + currentUserContainer: state.currentUserContainer, + }; + }; + + /** + * + */ + var mapDispatchToProps = function mapDispatchToProps(dispatch) { + return { + resetPasswordRequestMode: false, + onEmailChange: function onEmailChange(email) { + dispatch( + __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_1_app_actions_currentUserActions__[ + 'e' /* assignCurrentUserAttributes */ + ], + )({ email: email }, true), + ); + }, + onSubmit: function onSubmit(attributes) { + dispatch( + __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_1_app_actions_currentUserActions__['i' /* resendConfirmation */], + )(attributes), + ); + }, + }; + }; + + /* harmony default export */ __webpack_exports__['a'] = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_0_react_redux__['b' /* connect */], + )( + mapStateToProps, + mapDispatchToProps, + )(__WEBPACK_IMPORTED_MODULE_2_app_components_shared_UserEmailForm__['a' /* default */]); + + /***/ + }, + /* 426 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (React) { + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_router__ = __webpack_require__(13); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var Links = (function (_React$Component) { + _inherits(Links, _React$Component); + + function Links() { + _classCallCheck(this, Links); + + return _possibleConstructorReturn( + this, + (Links.__proto__ || Object.getPrototypeOf(Links)).apply(this, arguments), + ); + } + + _createClass(Links, [ + { + key: 'render', + + /** + * + */ + value: function render() { + var signInLocation = '/users/sign-in'; + var signUpLocation = '/users/sign-up'; + var resetPasswordRequestLocation = '/users/reset-password-request'; + + return React.createElement( + 'div', + { className: 'col-md-offset-3 col-md-6 links' }, + React.createElement( + __WEBPACK_IMPORTED_MODULE_0_react_router__['f' /* Link */], + { href: signInLocation, to: signInLocation }, + '\u0412\u0445\u043E\u0434', + ), + ' ', + React.createElement('span', { className: 'separator' }, '|'), + ' ', + React.createElement( + __WEBPACK_IMPORTED_MODULE_0_react_router__['f' /* Link */], + { href: signUpLocation, to: signUpLocation }, + '\u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044F', + ), + ' ', + React.createElement('span', { className: 'separator' }, '|'), + ' ', + React.createElement( + __WEBPACK_IMPORTED_MODULE_0_react_router__['f' /* Link */], + { href: resetPasswordRequestLocation, to: resetPasswordRequestLocation }, + '\u0417\u0430\u0431\u044B\u043B\u0438 \u043F\u0430\u0440\u043E\u043B\u044C?', + ), + ); + }, + }, + ]); + + return Links; + })(React.Component); + + /* harmony default export */ __webpack_exports__['a'] = Links; + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(1)); + + /***/ + }, + /* 427 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (React) { + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_helmet__ = __webpack_require__(44); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_helmet___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react_helmet__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__reset_password_Form__ = + __webpack_require__(428); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__reset_password_Links__ = + __webpack_require__(429); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var ResetPassword = (function (_React$Component) { + _inherits(ResetPassword, _React$Component); + + function ResetPassword() { + _classCallCheck(this, ResetPassword); + + return _possibleConstructorReturn( + this, + (ResetPassword.__proto__ || Object.getPrototypeOf(ResetPassword)).apply(this, arguments), + ); + } + + _createClass(ResetPassword, [ + { + key: 'render', + + /** + * + */ + value: function render() { + return React.createElement( + 'div', + { id: 'reset-password', className: 'page-content' }, + React.createElement( + __WEBPACK_IMPORTED_MODULE_0_react_helmet__['Helmet'], + null, + React.createElement( + 'title', + null, + 'Bionic Workshop | \u0421\u043C\u0435\u043D\u0430 \u043F\u0430\u0440\u043E\u043B\u044F', + ), + React.createElement('meta', { + name: 'description', + content: + '\u0418\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0439\u0442\u0435 \u044D\u0442\u0443 \u0444\u043E\u0440\u043C\u0443 \u0434\u043B\u044F \u0443\u043A\u0430\u0437\u0430\u043D\u0438\u044F \u0432\u0430\u0448\u0435\u0433\u043E \u043D\u043E\u0432\u043E\u0433\u043E \u043F\u0430\u0440\u043E\u043B\u044F.', + }), + ), + React.createElement( + 'div', + { className: 'container' }, + React.createElement( + 'div', + { className: 'row' }, + React.createElement( + 'div', + { className: 'col-md-12' }, + React.createElement( + 'h2', + { className: 'text-center' }, + '\u0421\u043C\u0435\u043D\u0430 \u043F\u0430\u0440\u043E\u043B\u044F', + ), + React.createElement( + __WEBPACK_IMPORTED_MODULE_1__reset_password_Form__['a' /* default */], + this.props, + ), + React.createElement( + __WEBPACK_IMPORTED_MODULE_2__reset_password_Links__['a' /* default */], + null, + ), + ), + ), + ), + ); + }, + }, + ]); + + return ResetPassword; + })(React.Component); + + /* harmony default export */ __webpack_exports__['a'] = ResetPassword; + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(1)); + + /***/ + }, + /* 428 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (React) { + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(2); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames__ = __webpack_require__(35); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_classnames__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_redux__ = __webpack_require__(6); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_app_actions_currentUserActions__ = + __webpack_require__(21); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_app_records_single_item_containers_CurrentUserContainerRecord__ = + __webpack_require__(39); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_app_components_shared_SubmitButton__ = + __webpack_require__(72); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var Form = (function (_React$Component) { + _inherits(Form, _React$Component); + + function Form() { + var _ref; + + var _temp, _this, _ret; + + _classCallCheck(this, Form); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return ( + (_ret = + ((_temp = + ((_this = _possibleConstructorReturn( + this, + (_ref = Form.__proto__ || Object.getPrototypeOf(Form)).call.apply( + _ref, + [this].concat(args), + ), + )), + _this)), + (_this.onPasswordChange = function (event) { + var password = event.target.value; + _this.props.onPasswordChange(password); + }), + (_this.onPasswordConfirmationChange = function (event) { + var passwordConfirmation = event.target.value; + _this.props.onPasswordConfirmationChange(passwordConfirmation); + }), + (_this.onFormSubmit = function (event) { + event.preventDefault(); + + var currentUser = _this.props.currentUserContainer.getCurrentUser(); + _this.props.onSubmit({ + user: { + reset_password_token: _this.props.location.query.reset_password_token, + password: currentUser.get('password') || '', + password_confirmation: currentUser.get('password_confirmation') || '', + }, + }); + }), + _temp)), + _possibleConstructorReturn(_this, _ret) + ); + } + /** + * + */ + + /** + * + */ + + /** + * + */ + + /** + * + */ + + _createClass(Form, [ + { + key: 'render', + + /** + * + */ + value: function render() { + var currentUser = this.props.currentUserContainer.getCurrentUser(); + + var passwordErrors = currentUser.getPasswordErrors(); + var passwordError = passwordErrors ? passwordErrors.first() : undefined; + var passwordFormGroupClass = __WEBPACK_IMPORTED_MODULE_1_classnames___default()( + 'form-group form-group-password', + { 'has-error': passwordError }, + ); + + var passwordConfirmationErrors = currentUser.getPasswordConfirmationErrors(); + var passwordConfirmationError = passwordConfirmationErrors + ? passwordConfirmationErrors.first() + : undefined; + var passwordConfirmationFormGroupClass = __WEBPACK_IMPORTED_MODULE_1_classnames___default()( + 'form-group form-group-password-confirmation', + { + 'has-error': passwordConfirmationError, + }, + ); + + return React.createElement( + 'div', + { className: 'col-md-offset-3 col-md-6' }, + React.createElement( + 'section', + { className: 'reset-password-form-container' }, + React.createElement( + 'form', + { + onSubmit: this.onFormSubmit, + className: 'reset-password-form', + action: '/users/reset-password', + acceptCharset: 'UTF-8', + method: 'post', + }, + React.createElement('input', { name: 'utf8', type: 'hidden', value: '\u2713' }), + React.createElement('input', { + name: 'authenticity_token', + type: 'hidden', + value: this.props.authenticityToken, + }), + React.createElement('input', { + name: 'reset_password_token', + type: 'hidden', + value: this.props.location.query.reset_password_token, + }), + React.createElement('input', { name: '_method', type: 'hidden', value: 'patch' }), + React.createElement( + 'div', + { className: passwordFormGroupClass }, + React.createElement( + 'label', + { className: 'control-label', htmlFor: 'user_password' }, + '\u041F\u0430\u0440\u043E\u043B\u044C', + ), + React.createElement('input', { + onChange: this.onPasswordChange, + value: currentUser.get('password') || '', + className: 'form-control', + id: 'user_password', + placeholder: + '\u0432\u0432\u0435\u0434\u0438\u0442\u0435 \u043F\u0430\u0440\u043E\u043B\u044C', + type: 'password', + name: 'user[password]', + }), + React.createElement('span', { className: 'help-block' }, passwordError), + ), + React.createElement( + 'div', + { className: passwordConfirmationFormGroupClass }, + React.createElement( + 'label', + { className: 'control-label', htmlFor: 'user_password_confirmation' }, + '\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u0435', + ), + React.createElement('input', { + onChange: this.onPasswordConfirmationChange, + value: currentUser.get('password_confirmation') || '', + className: 'form-control', + id: 'user_password_confirmation', + placeholder: + '\u0432\u0432\u0435\u0434\u0438\u0442\u0435 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u0435 \u043F\u0430\u0440\u043E\u043B\u044F', + type: 'password', + name: 'user[password_confirmation]', + }), + React.createElement('span', { className: 'help-block' }, passwordConfirmationError), + ), + React.createElement( + __WEBPACK_IMPORTED_MODULE_5_app_components_shared_SubmitButton__['a' /* default */], + { + className: 'btn btn-lg btn-primary btn-block', + isDisabled: this.props.currentUserContainer.get('isPending'), + readyText: + '\u0418\u0437\u043C\u0435\u043D\u0438\u0442\u044C \u043F\u0430\u0440\u043E\u043B\u044C', + pendingText: + '\u041E\u0442\u043F\u0440\u0430\u0432\u043A\u0430 \u0434\u0430\u043D\u043D\u044B\u0445...', + }, + React.createElement('span', { + className: 'glyphicon glyphicon-ok', + 'aria-hidden': 'true', + }), + ), + ), + ), + ); + }, + }, + ]); + + return Form; + })(React.Component); + + /** + * + */ + + Form.propTypes = { + location: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.shape({ + query: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.shape({ + reset_password_token: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string.isRequired, + }), + }).isRequired, + onPasswordChange: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired, + onPasswordConfirmationChange: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired, + onSubmit: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired, + authenticityToken: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string.isRequired, + currentUserContainer: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.instanceOf( + __WEBPACK_IMPORTED_MODULE_4_app_records_single_item_containers_CurrentUserContainerRecord__[ + 'a' /* default */ + ], + ).isRequired, + }; + var mapStateToProps = function mapStateToProps(state, ownProps) { + return { + authenticityToken: state.railsContext.get('authenticityToken'), + currentUserContainer: state.currentUserContainer, + }; + }; + + /** + * + */ + var mapDispatchToProps = function mapDispatchToProps(dispatch) { + return { + onPasswordChange: function onPasswordChange(password) { + dispatch( + __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_3_app_actions_currentUserActions__[ + 'e' /* assignCurrentUserAttributes */ + ], + )({ password: password }, true), + ); + }, + onPasswordConfirmationChange: function onPasswordConfirmationChange(passwordConfirmation) { + dispatch( + __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_3_app_actions_currentUserActions__[ + 'e' /* assignCurrentUserAttributes */ + ], + )({ password_confirmation: passwordConfirmation }, true), + ); + }, + onSubmit: function onSubmit(attributes) { + dispatch( + __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_3_app_actions_currentUserActions__['j' /* resetUserPassword */], + )(attributes), + ); + }, + }; + }; + + /* harmony default export */ __webpack_exports__['a'] = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_2_react_redux__['b' /* connect */], + )( + mapStateToProps, + mapDispatchToProps, + )(Form); + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(1)); + + /***/ + }, + /* 429 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (React) { + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_router__ = __webpack_require__(13); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var Links = (function (_React$Component) { + _inherits(Links, _React$Component); + + function Links() { + _classCallCheck(this, Links); + + return _possibleConstructorReturn( + this, + (Links.__proto__ || Object.getPrototypeOf(Links)).apply(this, arguments), + ); + } + + _createClass(Links, [ + { + key: 'render', + + /** + * + */ + value: function render() { + var signInLocation = '/users/sign-in'; + var signUpLocation = '/users/sign-up'; + var resendConfirmationLocation = '/users/resend-confirmation'; + + return React.createElement( + 'div', + { className: 'col-md-offset-3 col-md-6 links' }, + React.createElement( + __WEBPACK_IMPORTED_MODULE_0_react_router__['f' /* Link */], + { href: signInLocation, to: signInLocation }, + '\u0412\u0445\u043E\u0434', + ), + ' ', + React.createElement('span', { className: 'separator' }, '|'), + ' ', + React.createElement( + __WEBPACK_IMPORTED_MODULE_0_react_router__['f' /* Link */], + { href: signUpLocation, to: signUpLocation }, + '\u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044F', + ), + ' ', + React.createElement('span', { className: 'separator' }, '|'), + ' ', + React.createElement( + __WEBPACK_IMPORTED_MODULE_0_react_router__['f' /* Link */], + { href: resendConfirmationLocation, to: resendConfirmationLocation }, + '\u041D\u0435 \u043F\u0440\u0438\u0448\u043B\u043E \u043F\u0438\u0441\u044C\u043C\u043E?', + ), + ); + }, + }, + ]); + + return Links; + })(React.Component); + + /* harmony default export */ __webpack_exports__['a'] = Links; + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(1)); + + /***/ + }, + /* 430 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (React) { + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_helmet__ = __webpack_require__(44); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_helmet___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react_helmet__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__reset_password_request_Form__ = + __webpack_require__(431); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__reset_password_request_Links__ = + __webpack_require__(432); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var ResetPasswordRequest = (function (_React$Component) { + _inherits(ResetPasswordRequest, _React$Component); + + function ResetPasswordRequest() { + _classCallCheck(this, ResetPasswordRequest); + + return _possibleConstructorReturn( + this, + (ResetPasswordRequest.__proto__ || Object.getPrototypeOf(ResetPasswordRequest)).apply( + this, + arguments, + ), + ); + } + + _createClass(ResetPasswordRequest, [ + { + key: 'render', + + /** + * + */ + value: function render() { + return React.createElement( + 'div', + { id: 'reset-password-request', className: 'page-content' }, + React.createElement( + __WEBPACK_IMPORTED_MODULE_0_react_helmet__['Helmet'], + null, + React.createElement( + 'title', + null, + 'Bionic Workshop | \u0417\u0430\u043F\u0440\u043E\u0441 \u043D\u0430 \u0441\u043C\u0435\u043D\u0443 \u043F\u0430\u0440\u043E\u043B\u044F', + ), + React.createElement('meta', { + name: 'description', + content: + '\u0417\u0430\u0431\u044B\u043B\u0438 \u043F\u0430\u0440\u043E\u043B\u044C \u0438 \u043D\u0435 \u043C\u043E\u0436\u0435\u0442\u0435 \u0432\u043E\u0439\u0442\u0438 \u0432 \u0441\u0438\u0441\u0442\u0435\u043C\u0443? \u0418\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0439\u0442\u0435 \u044D\u0442\u0443 \u0444\u043E\u0440\u043C\u0443 \u0447\u0442\u043E\u0431\u044B \u043E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C \u0441\u0441\u044B\u043B\u043A\u0443 \u0434\u043B\u044F \u0441\u043C\u0435\u043D\u044B \u043F\u0430\u0440\u043E\u043B\u044F \u043D\u0430 \u0432\u0430\u0448 email.', + }), + ), + React.createElement( + 'div', + { className: 'container' }, + React.createElement( + 'div', + { className: 'row' }, + React.createElement( + 'div', + { className: 'col-md-12' }, + React.createElement( + 'h2', + { className: 'text-center' }, + '\u0417\u0430\u043F\u0440\u043E\u0441 \u043D\u0430 \u0441\u043C\u0435\u043D\u0443 \u043F\u0430\u0440\u043E\u043B\u044F', + ), + React.createElement( + __WEBPACK_IMPORTED_MODULE_1__reset_password_request_Form__['a' /* default */], + null, + ), + React.createElement( + __WEBPACK_IMPORTED_MODULE_2__reset_password_request_Links__['a' /* default */], + null, + ), + ), + ), + ), + ); + }, + }, + ]); + + return ResetPasswordRequest; + })(React.Component); + + /* harmony default export */ __webpack_exports__['a'] = ResetPasswordRequest; + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(1)); + + /***/ + }, + /* 431 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_redux__ = __webpack_require__(6); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_app_actions_currentUserActions__ = + __webpack_require__(21); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_app_components_shared_UserEmailForm__ = + __webpack_require__(247); + + /** + * + */ + var mapStateToProps = function mapStateToProps(state, ownProps) { + return { + authenticityToken: state.railsContext.get('authenticityToken'), + currentUserContainer: state.currentUserContainer, + }; + }; + + /** + * + */ + var mapDispatchToProps = function mapDispatchToProps(dispatch) { + return { + resetPasswordRequestMode: true, + onEmailChange: function onEmailChange(email) { + dispatch( + __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_1_app_actions_currentUserActions__[ + 'e' /* assignCurrentUserAttributes */ + ], + )({ email: email }, true), + ); + }, + onSubmit: function onSubmit(attributes) { + dispatch( + __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_1_app_actions_currentUserActions__[ + 'k' /* sendUserPasswordRequest */ + ], + )(attributes), + ); + }, + }; + }; + + /* harmony default export */ __webpack_exports__['a'] = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_0_react_redux__['b' /* connect */], + )( + mapStateToProps, + mapDispatchToProps, + )(__WEBPACK_IMPORTED_MODULE_2_app_components_shared_UserEmailForm__['a' /* default */]); + + /***/ + }, + /* 432 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (React) { + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_router__ = __webpack_require__(13); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var Links = (function (_React$Component) { + _inherits(Links, _React$Component); + + function Links() { + _classCallCheck(this, Links); + + return _possibleConstructorReturn( + this, + (Links.__proto__ || Object.getPrototypeOf(Links)).apply(this, arguments), + ); + } + + _createClass(Links, [ + { + key: 'render', + + /** + * + */ + value: function render() { + var signInLocation = '/users/sign-in'; + var signUpLocation = '/users/sign-up'; + var resendConfirmationLocation = '/users/resend-confirmation'; + + return React.createElement( + 'div', + { className: 'col-md-offset-3 col-md-6 links' }, + React.createElement( + __WEBPACK_IMPORTED_MODULE_0_react_router__['f' /* Link */], + { href: signInLocation, to: signInLocation }, + '\u0412\u0445\u043E\u0434', + ), + ' ', + React.createElement('span', { className: 'separator' }, '|'), + ' ', + React.createElement( + __WEBPACK_IMPORTED_MODULE_0_react_router__['f' /* Link */], + { href: signUpLocation, to: signUpLocation }, + '\u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044F', + ), + ' ', + React.createElement('span', { className: 'separator' }, '|'), + ' ', + React.createElement( + __WEBPACK_IMPORTED_MODULE_0_react_router__['f' /* Link */], + { href: resendConfirmationLocation, to: resendConfirmationLocation }, + '\u041D\u0435 \u043F\u0440\u0438\u0448\u043B\u043E \u043F\u0438\u0441\u044C\u043C\u043E?', + ), + ); + }, + }, + ]); + + return Links; + })(React.Component); + + /* harmony default export */ __webpack_exports__['a'] = Links; + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(1)); + + /***/ + }, + /* 433 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (React) { + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(2); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_redux__ = __webpack_require__(6); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_app_utils_PaginationKeyUtil__ = + __webpack_require__(26); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_app_components_libs_AuthorLib__ = + __webpack_require__(242); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_app_records_collections_AuthorsCollectionRecord__ = + __webpack_require__(73); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_app_records_collections_TagsCollectionRecord__ = + __webpack_require__(89); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_app_components_shared_Breadcrumbs__ = + __webpack_require__(45); + var _slicedToArray = (function () { + function sliceIterator(arr, i) { + var _arr = []; + var _n = true; + var _d = false; + var _e = undefined; + try { + for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { + _arr.push(_s.value); + if (i && _arr.length === i) break; + } + } catch (err) { + _d = true; + _e = err; + } finally { + try { + if (!_n && _i['return']) _i['return'](); + } finally { + if (_d) throw _e; + } + } + return _arr; + } + return function (arr, i) { + if (Array.isArray(arr)) { + return arr; + } else if (Symbol.iterator in Object(arr)) { + return sliceIterator(arr, i); + } else { + throw new TypeError('Invalid attempt to destructure non-iterable instance'); + } + }; + })(); + + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var AuthorBreadcrumbsHandler = (function (_React$Component) { + _inherits(AuthorBreadcrumbsHandler, _React$Component); + + function AuthorBreadcrumbsHandler() { + _classCallCheck(this, AuthorBreadcrumbsHandler); + + return _possibleConstructorReturn( + this, + (AuthorBreadcrumbsHandler.__proto__ || Object.getPrototypeOf(AuthorBreadcrumbsHandler)).apply( + this, + arguments, + ), + ); + } + + _createClass(AuthorBreadcrumbsHandler, [ + { + key: 'render', + + /** + * + */ + value: function render() { + var authorsCollection = this.props.authorsCollection; + var tagsCollection = this.props.tagsCollection; + + var paginationKey = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_2_app_utils_PaginationKeyUtil__['a' /* calculatePaginationKey */], + )(this.props.location.pathname, this.props.location.search); + + var _getRelatedDataFromSt = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_3_app_components_libs_AuthorLib__[ + 'a' /* getRelatedDataFromStore */ + ], + )({ + paginationKey: paginationKey, + authorId: this.props.params.id, + authorsCollection: authorsCollection, + tagsCollection: tagsCollection, + }), + _getRelatedDataFromSt2 = _slicedToArray(_getRelatedDataFromSt, 2), + author = _getRelatedDataFromSt2[0], + tagsList = _getRelatedDataFromSt2[1]; + + if ( + authorsCollection.get('isPending') || + tagsCollection.get('isPending') || + !author || + !tagsList + ) { + return React.createElement( + __WEBPACK_IMPORTED_MODULE_6_app_components_shared_Breadcrumbs__['a' /* default */], + { activeItemName: '...' }, + ); + } + + return React.createElement( + __WEBPACK_IMPORTED_MODULE_6_app_components_shared_Breadcrumbs__['a' /* default */], + { + linkItems: [ + { location: '/', name: 'Главная' }, + { location: '/authors', name: 'Авторы' }, + ], + activeItemName: author.get('name'), + }, + ); + }, + /** + * + */ + }, + ]); + + return AuthorBreadcrumbsHandler; + })(React.Component); + + /** + * + */ + + AuthorBreadcrumbsHandler.propTypes = { + params: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.shape({ + id: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string.isRequired, + }).isRequired, + location: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.shape({ + search: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string, + pathname: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string.isRequired, + }).isRequired, + authorsCollection: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.instanceOf( + __WEBPACK_IMPORTED_MODULE_4_app_records_collections_AuthorsCollectionRecord__['a' /* default */], + ).isRequired, + tagsCollection: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.instanceOf( + __WEBPACK_IMPORTED_MODULE_5_app_records_collections_TagsCollectionRecord__['a' /* default */], + ).isRequired, + }; + var mapStateToProps = function mapStateToProps(state, ownProps) { + return { + authorsCollection: state.authors, + tagsCollection: state.tags, + }; + }; + + /* harmony default export */ __webpack_exports__['a'] = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_1_react_redux__['b' /* connect */], + )(mapStateToProps)(AuthorBreadcrumbsHandler); + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(1)); + + /***/ + }, + /* 434 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (React) { + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__shared_ProgressBar__ = __webpack_require__(25); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var AuthorHandler = (function (_React$Component) { + _inherits(AuthorHandler, _React$Component); + + function AuthorHandler() { + var _ref; + + var _temp, _this, _ret; + + _classCallCheck(this, AuthorHandler); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return ( + (_ret = + ((_temp = + ((_this = _possibleConstructorReturn( + this, + (_ref = AuthorHandler.__proto__ || Object.getPrototypeOf(AuthorHandler)).call.apply( + _ref, + [this].concat(args), + ), + )), + _this)), + (_this.state = { contentComponentLoadedTrigger: false }), + _temp)), + _possibleConstructorReturn(_this, _ret) + ); + } + + _createClass( + AuthorHandler, + [ + { + key: 'componentWillMount', + + /** + * + */ + value: function componentWillMount() { + var _this2 = this; + + // This constant should be replaced with explicit true of false by Webpack DefinePlugin: + if (true) { + AuthorHandler.contentComponent = __webpack_require__(232).default; + return; + } + + if (!AuthorHandler.contentComponent) { + AuthorHandler.loadWebpackChunk().then(function () { + _this2.setState({ contentComponentLoadedTrigger: true }); + }); + } + }, + + /** + * Renders loader. Loader code should be as lightweight as possible because + * it will be included into the main chunk. + */ + }, + { + key: 'renderLoader', + value: function renderLoader() { + return React.createElement( + __WEBPACK_IMPORTED_MODULE_0__shared_ProgressBar__['a' /* default */], + { label: '\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430...' }, + ); + }, + + /** + * + */ + }, + { + key: 'renderContent', + value: function renderContent() { + return React.createElement(AuthorHandler.contentComponent, this.props); + }, + + /** + * + */ + }, + { + key: 'render', + value: function render() { + if (AuthorHandler.contentComponent) return this.renderContent(); + return this.renderLoader(); + }, + }, + ], + [ + { + key: 'loadWebpackChunk', + + /** + * Loads named code chunk with own components. + */ + value: function loadWebpackChunk() { + var _this3 = this; + + return Promise.resolve() + .then( + function (require) { + _this3.contentComponent = __webpack_require__(232).default; + }.bind(null, __webpack_require__), + ) + .catch(__webpack_require__.oe); + }, + + /** + * + */ + }, + ], + ); + + return AuthorHandler; + })(React.Component); + + /* harmony default export */ __webpack_exports__['a'] = AuthorHandler; + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(1)); + + /***/ + }, + /* 435 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (React) { + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(2); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_redux__ = __webpack_require__(6); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_app_utils_PaginationKeyUtil__ = + __webpack_require__(26); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_app_records_collections_AuthorsCollectionRecord__ = + __webpack_require__(73); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_app_components_shared_Breadcrumbs__ = + __webpack_require__(45); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var AuthorsBreadcrumbsHandler = (function (_React$Component) { + _inherits(AuthorsBreadcrumbsHandler, _React$Component); + + function AuthorsBreadcrumbsHandler() { + _classCallCheck(this, AuthorsBreadcrumbsHandler); + + return _possibleConstructorReturn( + this, + (AuthorsBreadcrumbsHandler.__proto__ || Object.getPrototypeOf(AuthorsBreadcrumbsHandler)).apply( + this, + arguments, + ), + ); + } + + _createClass(AuthorsBreadcrumbsHandler, [ + { + key: 'getCurrentPage', + + /** + * + */ + value: function getCurrentPage() { + return this.props.location.query.page || '1'; + }, + + /** + * + */ + + /** + * + */ + }, + { + key: 'render', + value: function render() { + var authorsCollection = this.props.authorsCollection; + + var paginationKey = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_2_app_utils_PaginationKeyUtil__['a' /* calculatePaginationKey */], + )(this.props.location.pathname, this.props.location.search); + var authorsOnPage = authorsCollection.getItemsOnPage(paginationKey, this.getCurrentPage()); + + if (authorsCollection.get('isPending') || !authorsOnPage) { + return React.createElement( + __WEBPACK_IMPORTED_MODULE_4_app_components_shared_Breadcrumbs__['a' /* default */], + { activeItemName: '...' }, + ); + } + + return React.createElement( + __WEBPACK_IMPORTED_MODULE_4_app_components_shared_Breadcrumbs__['a' /* default */], + { + linkItems: [{ location: '/', name: 'Главная' }], + activeItemName: '\u0410\u0432\u0442\u043E\u0440\u044B', + }, + ); + }, + }, + ]); + + return AuthorsBreadcrumbsHandler; + })(React.Component); + + /** + * + */ + + AuthorsBreadcrumbsHandler.propTypes = { + location: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.shape({ + search: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string, + pathname: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string.isRequired, + query: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object, + }).isRequired, + authorsCollection: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.instanceOf( + __WEBPACK_IMPORTED_MODULE_3_app_records_collections_AuthorsCollectionRecord__['a' /* default */], + ).isRequired, + }; + var mapStateToProps = function mapStateToProps(state, ownProps) { + return { authorsCollection: state.authors }; + }; + + /* harmony default export */ __webpack_exports__['a'] = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_1_react_redux__['b' /* connect */], + )(mapStateToProps)(AuthorsBreadcrumbsHandler); + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(1)); + + /***/ + }, + /* 436 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (React) { + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__shared_ProgressBar__ = __webpack_require__(25); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var AuthorsHandler = (function (_React$Component) { + _inherits(AuthorsHandler, _React$Component); + + function AuthorsHandler() { + var _ref; + + var _temp, _this, _ret; + + _classCallCheck(this, AuthorsHandler); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return ( + (_ret = + ((_temp = + ((_this = _possibleConstructorReturn( + this, + (_ref = AuthorsHandler.__proto__ || Object.getPrototypeOf(AuthorsHandler)).call.apply( + _ref, + [this].concat(args), + ), + )), + _this)), + (_this.state = { contentComponentLoadedTrigger: false }), + _temp)), + _possibleConstructorReturn(_this, _ret) + ); + } + + _createClass( + AuthorsHandler, + [ + { + key: 'componentWillMount', + + /** + * + */ + value: function componentWillMount() { + var _this2 = this; + + // This constant should be replaced with explicit true of false by Webpack DefinePlugin: + if (true) { + AuthorsHandler.contentComponent = __webpack_require__(233).default; + return; + } + + if (!AuthorsHandler.contentComponent) { + AuthorsHandler.loadWebpackChunk().then(function () { + _this2.setState({ contentComponentLoadedTrigger: true }); + }); + } + }, + + /** + * Renders loader. Loader code should be as lightweight as possible because + * it will be included into the main chunk. + */ + }, + { + key: 'renderLoader', + value: function renderLoader() { + return React.createElement( + __WEBPACK_IMPORTED_MODULE_0__shared_ProgressBar__['a' /* default */], + { label: '\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430...' }, + ); + }, + + /** + * + */ + }, + { + key: 'renderContent', + value: function renderContent() { + return React.createElement(AuthorsHandler.contentComponent, this.props); + }, + + /** + * + */ + }, + { + key: 'render', + value: function render() { + if (AuthorsHandler.contentComponent) return this.renderContent(); + return this.renderLoader(); + }, + }, + ], + [ + { + key: 'loadWebpackChunk', + + /** + * Loads named code chunk with own components. + */ + value: function loadWebpackChunk() { + var _this3 = this; + + return Promise.resolve() + .then( + function (require) { + _this3.contentComponent = __webpack_require__(233).default; + }.bind(null, __webpack_require__), + ) + .catch(__webpack_require__.oe); + }, + + /** + * + */ + }, + ], + ); + + return AuthorsHandler; + })(React.Component); + + /* harmony default export */ __webpack_exports__['a'] = AuthorsHandler; + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(1)); + + /***/ + }, + /* 437 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (React) { + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(2); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_redux__ = __webpack_require__(6); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_app_records_single_item_containers_CurrentUserContainerRecord__ = + __webpack_require__(39); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_app_components_shared_Breadcrumbs__ = + __webpack_require__(45); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var CurrentUserBreadcrumbsHandler = (function (_React$Component) { + _inherits(CurrentUserBreadcrumbsHandler, _React$Component); + + function CurrentUserBreadcrumbsHandler() { + _classCallCheck(this, CurrentUserBreadcrumbsHandler); + + return _possibleConstructorReturn( + this, + ( + CurrentUserBreadcrumbsHandler.__proto__ || + Object.getPrototypeOf(CurrentUserBreadcrumbsHandler) + ).apply(this, arguments), + ); + } + + _createClass(CurrentUserBreadcrumbsHandler, [ + { + key: 'render', + + /** + * + */ + value: function render() { + var currentUserContainer = this.props.currentUserContainer; + + if ( + currentUserContainer.get('isPending') || + !currentUserContainer.containsPersistentCurrentUser() + ) { + return React.createElement( + __WEBPACK_IMPORTED_MODULE_3_app_components_shared_Breadcrumbs__['a' /* default */], + { activeItemName: '...' }, + ); + } + + return React.createElement( + __WEBPACK_IMPORTED_MODULE_3_app_components_shared_Breadcrumbs__['a' /* default */], + { + linkItems: [{ location: '/', name: 'Главная' }], + activeItemName: '\u041C\u043E\u0439 \u0430\u043A\u043A\u0430\u0443\u043D\u0442', + }, + ); + }, + /** + * + */ + }, + ]); + + return CurrentUserBreadcrumbsHandler; + })(React.Component); + + /** + * + */ + + CurrentUserBreadcrumbsHandler.propTypes = { + currentUserContainer: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.instanceOf( + __WEBPACK_IMPORTED_MODULE_2_app_records_single_item_containers_CurrentUserContainerRecord__[ + 'a' /* default */ + ], + ).isRequired, + }; + var mapStateToProps = function mapStateToProps(state, ownProps) { + return { currentUserContainer: state.currentUserContainer }; + }; + + /* harmony default export */ __webpack_exports__['a'] = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_1_react_redux__['b' /* connect */], + )(mapStateToProps)(CurrentUserBreadcrumbsHandler); + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(1)); + + /***/ + }, + /* 438 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (React) { + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__shared_ProgressBar__ = __webpack_require__(25); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var CurrentUserHandler = (function (_React$Component) { + _inherits(CurrentUserHandler, _React$Component); + + function CurrentUserHandler() { + var _ref; + + var _temp, _this, _ret; + + _classCallCheck(this, CurrentUserHandler); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return ( + (_ret = + ((_temp = + ((_this = _possibleConstructorReturn( + this, + (_ref = + CurrentUserHandler.__proto__ || Object.getPrototypeOf(CurrentUserHandler)).call.apply( + _ref, + [this].concat(args), + ), + )), + _this)), + (_this.state = { contentComponentLoadedTrigger: false }), + _temp)), + _possibleConstructorReturn(_this, _ret) + ); + } + + _createClass( + CurrentUserHandler, + [ + { + key: 'componentWillMount', + + /** + * + */ + value: function componentWillMount() { + var _this2 = this; + + // This constant should be replaced with explicit true of false by Webpack DefinePlugin: + if (true) { + CurrentUserHandler.contentComponent = __webpack_require__(234).default; + return; + } + + if (!CurrentUserHandler.contentComponent) { + CurrentUserHandler.loadWebpackChunk().then(function () { + _this2.setState({ contentComponentLoadedTrigger: true }); + }); + } + }, + + /** + * Renders loader. Loader code should be as lightweight as possible because + * it will be included into the main chunk. + */ + }, + { + key: 'renderLoader', + value: function renderLoader() { + return React.createElement( + __WEBPACK_IMPORTED_MODULE_0__shared_ProgressBar__['a' /* default */], + { label: '\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430...' }, + ); + }, + + /** + * + */ + }, + { + key: 'renderContent', + value: function renderContent() { + return React.createElement(CurrentUserHandler.contentComponent, this.props); + }, + + /** + * + */ + }, + { + key: 'render', + value: function render() { + if (CurrentUserHandler.contentComponent) return this.renderContent(); + return this.renderLoader(); + }, + }, + ], + [ + { + key: 'loadWebpackChunk', + + /** + * Loads named code chunk with own components. + */ + value: function loadWebpackChunk() { + var _this3 = this; + + return Promise.resolve() + .then( + function (require) { + _this3.contentComponent = __webpack_require__(234).default; + }.bind(null, __webpack_require__), + ) + .catch(__webpack_require__.oe); + }, + + /** + * + */ + }, + ], + ); + + return CurrentUserHandler; + })(React.Component); + + /* harmony default export */ __webpack_exports__['a'] = CurrentUserHandler; + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(1)); + + /***/ + }, + /* 439 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (React) { + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(2); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_redux__ = __webpack_require__(6); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_app_utils_PaginationKeyUtil__ = + __webpack_require__(26); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_app_components_libs_PostLib__ = + __webpack_require__(243); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_app_records_collections_PostsCollectionRecord__ = + __webpack_require__(88); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_app_records_collections_AuthorsCollectionRecord__ = + __webpack_require__(73); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_app_records_collections_TagsCollectionRecord__ = + __webpack_require__(89); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_app_records_collections_CommentsCollectionRecord__ = + __webpack_require__(112); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_app_components_shared_Breadcrumbs__ = + __webpack_require__(45); + var _slicedToArray = (function () { + function sliceIterator(arr, i) { + var _arr = []; + var _n = true; + var _d = false; + var _e = undefined; + try { + for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { + _arr.push(_s.value); + if (i && _arr.length === i) break; + } + } catch (err) { + _d = true; + _e = err; + } finally { + try { + if (!_n && _i['return']) _i['return'](); + } finally { + if (_d) throw _e; + } + } + return _arr; + } + return function (arr, i) { + if (Array.isArray(arr)) { + return arr; + } else if (Symbol.iterator in Object(arr)) { + return sliceIterator(arr, i); + } else { + throw new TypeError('Invalid attempt to destructure non-iterable instance'); + } + }; + })(); + + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var PostBreadcrumbsHandler = (function (_React$Component) { + _inherits(PostBreadcrumbsHandler, _React$Component); + + function PostBreadcrumbsHandler() { + _classCallCheck(this, PostBreadcrumbsHandler); + + return _possibleConstructorReturn( + this, + (PostBreadcrumbsHandler.__proto__ || Object.getPrototypeOf(PostBreadcrumbsHandler)).apply( + this, + arguments, + ), + ); + } + + _createClass(PostBreadcrumbsHandler, [ + { + key: 'render', + + /** + * + */ + value: function render() { + var postsCollection = this.props.postsCollection; + var authorsCollection = this.props.authorsCollection; + var tagsCollection = this.props.tagsCollection; + var commentsCollection = this.props.commentsCollection; + + var paginationKey = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_2_app_utils_PaginationKeyUtil__['a' /* calculatePaginationKey */], + )(this.props.location.pathname, this.props.location.search); + + var _getRelatedDataFromSt = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_3_app_components_libs_PostLib__[ + 'a' /* getRelatedDataFromStore */ + ], + )({ + paginationKey: paginationKey, + postId: this.props.params.id, + postsCollection: postsCollection, + authorsCollection: authorsCollection, + tagsCollection: tagsCollection, + commentsCollection: commentsCollection, + }), + _getRelatedDataFromSt2 = _slicedToArray(_getRelatedDataFromSt, 4), + post = _getRelatedDataFromSt2[0], + authorsList = _getRelatedDataFromSt2[1], + tagsForPost = _getRelatedDataFromSt2[2], + commentsTree = _getRelatedDataFromSt2[3]; + + if ( + postsCollection.get('isPending') || + authorsCollection.get('isPending') || + tagsCollection.get('isPending') || + commentsCollection.get('isPending') || + !post || + !post.get('content') || + !authorsList || + !tagsForPost || + !commentsTree + ) { + return React.createElement( + __WEBPACK_IMPORTED_MODULE_8_app_components_shared_Breadcrumbs__['a' /* default */], + { activeItemName: '...' }, + ); + } + + return React.createElement( + __WEBPACK_IMPORTED_MODULE_8_app_components_shared_Breadcrumbs__['a' /* default */], + { linkItems: [{ location: '/', name: 'Публикации' }], activeItemName: post.get('title') }, + ); + }, + /** + * + */ + }, + ]); + + return PostBreadcrumbsHandler; + })(React.Component); + + /** + * + */ + + PostBreadcrumbsHandler.propTypes = { + params: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.shape({ + id: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string.isRequired, + }).isRequired, + location: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.shape({ + search: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string, + pathname: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string.isRequired, + }).isRequired, + postsCollection: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.instanceOf( + __WEBPACK_IMPORTED_MODULE_4_app_records_collections_PostsCollectionRecord__['a' /* default */], + ).isRequired, + authorsCollection: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.instanceOf( + __WEBPACK_IMPORTED_MODULE_5_app_records_collections_AuthorsCollectionRecord__['a' /* default */], + ).isRequired, + tagsCollection: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.instanceOf( + __WEBPACK_IMPORTED_MODULE_6_app_records_collections_TagsCollectionRecord__['a' /* default */], + ).isRequired, + commentsCollection: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.instanceOf( + __WEBPACK_IMPORTED_MODULE_7_app_records_collections_CommentsCollectionRecord__['a' /* default */], + ).isRequired, + }; + var mapStateToProps = function mapStateToProps(state, ownProps) { + return { + postsCollection: state.posts, + authorsCollection: state.authors, + tagsCollection: state.tags, + commentsCollection: state.comments, + }; + }; + + /* harmony default export */ __webpack_exports__['a'] = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_1_react_redux__['b' /* connect */], + )(mapStateToProps)(PostBreadcrumbsHandler); + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(1)); + + /***/ + }, + /* 440 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (React) { + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__shared_ProgressBar__ = __webpack_require__(25); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var PostHandler = (function (_React$Component) { + _inherits(PostHandler, _React$Component); + + function PostHandler() { + _classCallCheck(this, PostHandler); + + return _possibleConstructorReturn( + this, + (PostHandler.__proto__ || Object.getPrototypeOf(PostHandler)).apply(this, arguments), + ); + } + + _createClass( + PostHandler, + [ + { + key: 'componentWillMount', + + /** + * + */ + value: function componentWillMount() { + var _this2 = this; + + // This constant should be replaced with explicit true of false by Webpack DefinePlugin: + if (true) { + PostHandler.contentComponent = __webpack_require__(235).default; + return; + } + + if (!PostHandler.contentComponent) { + PostHandler.loadWebpackChunk().then(function () { + _this2.setState({ contentComponentLoadedTrigger: true }); + }); + } + }, + + /** + * Renders loader. Loader code should be as lightweight as possible because + * it will be included into the main chunk. + */ + }, + { + key: 'renderLoader', + value: function renderLoader() { + return React.createElement( + __WEBPACK_IMPORTED_MODULE_0__shared_ProgressBar__['a' /* default */], + { label: '\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430...' }, + ); + }, + + /** + * + */ + }, + { + key: 'renderContent', + value: function renderContent() { + return React.createElement(PostHandler.contentComponent, this.props); + }, + + /** + * + */ + }, + { + key: 'render', + value: function render() { + if (PostHandler.contentComponent) return this.renderContent(); + return this.renderLoader(); + }, + }, + ], + [ + { + key: 'loadWebpackChunk', + + /** + * Loads named code chunk with own components. + */ + value: function loadWebpackChunk() { + var _this3 = this; + + return Promise.resolve() + .then( + function (require) { + _this3.contentComponent = __webpack_require__(235).default; + }.bind(null, __webpack_require__), + ) + .catch(__webpack_require__.oe); + }, + }, + ], + ); + + return PostHandler; + })(React.Component); + + /* harmony default export */ __webpack_exports__['a'] = PostHandler; + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(1)); + + /***/ + }, + /* 441 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (React) { + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(2); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_redux__ = __webpack_require__(6); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_app_utils_PaginationKeyUtil__ = + __webpack_require__(26); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_app_components_libs_PostsLib__ = + __webpack_require__(244); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_app_records_collections_PostsCollectionRecord__ = + __webpack_require__(88); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_app_records_collections_AuthorsCollectionRecord__ = + __webpack_require__(73); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_app_records_collections_TagsCollectionRecord__ = + __webpack_require__(89); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_app_components_shared_Breadcrumbs__ = + __webpack_require__(45); + var _slicedToArray = (function () { + function sliceIterator(arr, i) { + var _arr = []; + var _n = true; + var _d = false; + var _e = undefined; + try { + for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { + _arr.push(_s.value); + if (i && _arr.length === i) break; + } + } catch (err) { + _d = true; + _e = err; + } finally { + try { + if (!_n && _i['return']) _i['return'](); + } finally { + if (_d) throw _e; + } + } + return _arr; + } + return function (arr, i) { + if (Array.isArray(arr)) { + return arr; + } else if (Symbol.iterator in Object(arr)) { + return sliceIterator(arr, i); + } else { + throw new TypeError('Invalid attempt to destructure non-iterable instance'); + } + }; + })(); + + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var PostsBreadcrumbsHandler = (function (_React$Component) { + _inherits(PostsBreadcrumbsHandler, _React$Component); + + function PostsBreadcrumbsHandler() { + _classCallCheck(this, PostsBreadcrumbsHandler); + + return _possibleConstructorReturn( + this, + (PostsBreadcrumbsHandler.__proto__ || Object.getPrototypeOf(PostsBreadcrumbsHandler)).apply( + this, + arguments, + ), + ); + } + + _createClass(PostsBreadcrumbsHandler, [ + { + key: 'getCurrentPage', + + /** + * + */ + value: function getCurrentPage() { + return this.props.location.query.page || '1'; + }, + + /** + * + */ + + /** + * + */ + }, + { + key: 'render', + value: function render() { + var postsCollection = this.props.postsCollection; + var tagsCollection = this.props.tagsCollection; + var authorsCollection = this.props.authorsCollection; + + var paginationKey = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_2_app_utils_PaginationKeyUtil__['a' /* calculatePaginationKey */], + )(this.props.location.pathname, this.props.location.search); + var page = this.getCurrentPage(); + + var _getRelatedDataFromSt = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_3_app_components_libs_PostsLib__[ + 'a' /* getRelatedDataFromStore */ + ], + )({ + page: page, + paginationKey: paginationKey, + postsCollection: postsCollection, + authorsCollection: authorsCollection, + tagsCollection: tagsCollection, + }), + _getRelatedDataFromSt2 = _slicedToArray(_getRelatedDataFromSt, 3), + postsOnPage = _getRelatedDataFromSt2[0], + tagsOnPage = _getRelatedDataFromSt2[1], + authorsForPosts = _getRelatedDataFromSt2[2]; + + if ( + postsCollection.get('isPending') || + tagsCollection.get('isPending') || + authorsCollection.get('isPending') || + !postsOnPage || + !authorsForPosts || + !tagsOnPage + ) { + return React.createElement( + __WEBPACK_IMPORTED_MODULE_7_app_components_shared_Breadcrumbs__['a' /* default */], + { activeItemName: '...' }, + ); + } + + return React.createElement( + __WEBPACK_IMPORTED_MODULE_7_app_components_shared_Breadcrumbs__['a' /* default */], + { activeItemName: 'Главная' }, + ); + }, + }, + ]); + + return PostsBreadcrumbsHandler; + })(React.Component); + + /** + * + */ + + PostsBreadcrumbsHandler.propTypes = { + location: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.shape({ + search: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string, + pathname: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string.isRequired, + query: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object, + }).isRequired, + postsCollection: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.instanceOf( + __WEBPACK_IMPORTED_MODULE_4_app_records_collections_PostsCollectionRecord__['a' /* default */], + ).isRequired, + authorsCollection: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.instanceOf( + __WEBPACK_IMPORTED_MODULE_5_app_records_collections_AuthorsCollectionRecord__['a' /* default */], + ).isRequired, + tagsCollection: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.instanceOf( + __WEBPACK_IMPORTED_MODULE_6_app_records_collections_TagsCollectionRecord__['a' /* default */], + ).isRequired, + }; + var mapStateToProps = function mapStateToProps(state, ownProps) { + return { + postsCollection: state.posts, + authorsCollection: state.authors, + tagsCollection: state.tags, + }; + }; + + /* harmony default export */ __webpack_exports__['a'] = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_1_react_redux__['b' /* connect */], + )(mapStateToProps)(PostsBreadcrumbsHandler); + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(1)); + + /***/ + }, + /* 442 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (React) { + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_app_components_shared_ProgressBar__ = + __webpack_require__(25); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var PostsHandler = (function (_React$Component) { + _inherits(PostsHandler, _React$Component); + + function PostsHandler() { + var _ref; + + var _temp, _this, _ret; + + _classCallCheck(this, PostsHandler); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return ( + (_ret = + ((_temp = + ((_this = _possibleConstructorReturn( + this, + (_ref = PostsHandler.__proto__ || Object.getPrototypeOf(PostsHandler)).call.apply( + _ref, + [this].concat(args), + ), + )), + _this)), + (_this.state = { contentComponentLoadedTrigger: false }), + _temp)), + _possibleConstructorReturn(_this, _ret) + ); + } + + _createClass( + PostsHandler, + [ + { + key: 'componentWillMount', + + /** + * + */ + value: function componentWillMount() { + var _this2 = this; + + // This constant should be replaced with explicit true of false by Webpack DefinePlugin: + if (true) { + PostsHandler.contentComponent = __webpack_require__(236).default; + return; + } + + if (!PostsHandler.contentComponent) { + PostsHandler.loadWebpackChunk().then(function () { + _this2.setState({ contentComponentLoadedTrigger: true }); + }); + } + }, + + /** + * Renders loader. Loader code should be as lightweight as possible because + * it will be included into the main chunk. + */ + }, + { + key: 'renderLoader', + value: function renderLoader() { + return React.createElement( + __WEBPACK_IMPORTED_MODULE_0_app_components_shared_ProgressBar__['a' /* default */], + { label: '\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430...' }, + ); + }, + + /** + * + */ + }, + { + key: 'renderContent', + value: function renderContent() { + return React.createElement(PostsHandler.contentComponent, this.props); + }, + + /** + * + */ + }, + { + key: 'render', + value: function render() { + if (PostsHandler.contentComponent) return this.renderContent(); + return this.renderLoader(); + }, + }, + ], + [ + { + key: 'loadWebpackChunk', + + /** + * Loads named code chunk with own components. + */ + value: function loadWebpackChunk() { + var _this3 = this; + + return Promise.resolve() + .then( + function (require) { + _this3.contentComponent = __webpack_require__(236).default; + }.bind(null, __webpack_require__), + ) + .catch(__webpack_require__.oe); + }, + + /** + * + */ + }, + ], + ); + + return PostsHandler; + })(React.Component); + + /* harmony default export */ __webpack_exports__['a'] = PostsHandler; + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(1)); + + /***/ + }, + /* 443 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (React) { + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_app_components_shared_Breadcrumbs__ = + __webpack_require__(45); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var ResendConfirmationBreadcrumbsHandler = (function (_React$Component) { + _inherits(ResendConfirmationBreadcrumbsHandler, _React$Component); + + function ResendConfirmationBreadcrumbsHandler() { + _classCallCheck(this, ResendConfirmationBreadcrumbsHandler); + + return _possibleConstructorReturn( + this, + ( + ResendConfirmationBreadcrumbsHandler.__proto__ || + Object.getPrototypeOf(ResendConfirmationBreadcrumbsHandler) + ).apply(this, arguments), + ); + } + + _createClass(ResendConfirmationBreadcrumbsHandler, [ + { + key: 'render', + + /** + * + */ + value: function render() { + return React.createElement( + __WEBPACK_IMPORTED_MODULE_0_app_components_shared_Breadcrumbs__['a' /* default */], + { + linkItems: [ + { location: '/', name: 'Главная' }, + { location: '/users/sign-in', name: 'Вход' }, + ], + activeItemName: + '\u041F\u043E\u0432\u0442\u043E\u0440\u043D\u0430\u044F \u043E\u0442\u043F\u0440\u0430\u0432\u043A\u0430 \u0438\u043D\u0441\u0442\u0440\u0443\u043A\u0446\u0438\u0439', + }, + ); + }, + }, + ]); + + return ResendConfirmationBreadcrumbsHandler; + })(React.Component); + + /* harmony default export */ __webpack_exports__['a'] = ResendConfirmationBreadcrumbsHandler; + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(1)); + + /***/ + }, + /* 444 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (React) { + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__shared_ProgressBar__ = __webpack_require__(25); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var ResendConfirmationHandler = (function (_React$Component) { + _inherits(ResendConfirmationHandler, _React$Component); + + function ResendConfirmationHandler() { + var _ref; + + var _temp, _this, _ret; + + _classCallCheck(this, ResendConfirmationHandler); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return ( + (_ret = + ((_temp = + ((_this = _possibleConstructorReturn( + this, + (_ref = + ResendConfirmationHandler.__proto__ || + Object.getPrototypeOf(ResendConfirmationHandler)).call.apply(_ref, [this].concat(args)), + )), + _this)), + (_this.state = { contentComponentLoadedTrigger: false }), + _temp)), + _possibleConstructorReturn(_this, _ret) + ); + } + + _createClass( + ResendConfirmationHandler, + [ + { + key: 'componentWillMount', + + /** + * + */ + value: function componentWillMount() { + var _this2 = this; + + // This constant should be replaced with explicit true of false by Webpack DefinePlugin: + if (true) { + ResendConfirmationHandler.contentComponent = __webpack_require__(237).default; + return; + } + + if (!ResendConfirmationHandler.contentComponent) { + ResendConfirmationHandler.loadWebpackChunk().then(function () { + _this2.setState({ contentComponentLoadedTrigger: true }); + }); + } + }, + + /** + * Renders loader. Loader code should be as lightweight as possible because + * it will be included into the main chunk. + */ + }, + { + key: 'renderLoader', + value: function renderLoader() { + return React.createElement( + __WEBPACK_IMPORTED_MODULE_0__shared_ProgressBar__['a' /* default */], + { label: '\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430...' }, + ); + }, + + /** + * + */ + }, + { + key: 'renderContent', + value: function renderContent() { + return React.createElement(ResendConfirmationHandler.contentComponent, this.props); + }, + + /** + * + */ + }, + { + key: 'render', + value: function render() { + if (ResendConfirmationHandler.contentComponent) return this.renderContent(); + return this.renderLoader(); + }, + }, + ], + [ + { + key: 'loadWebpackChunk', + + /** + * Loads named code chunk with own components. + */ + value: function loadWebpackChunk() { + var _this3 = this; + + return Promise.resolve() + .then( + function (require) { + _this3.contentComponent = __webpack_require__(237).default; + }.bind(null, __webpack_require__), + ) + .catch(__webpack_require__.oe); + }, + + /** + * + */ + }, + ], + ); + + return ResendConfirmationHandler; + })(React.Component); + + /* harmony default export */ __webpack_exports__['a'] = ResendConfirmationHandler; + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(1)); + + /***/ + }, + /* 445 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (React) { + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_app_components_shared_Breadcrumbs__ = + __webpack_require__(45); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var ResetPasswordBreadcrumbsHandler = (function (_React$Component) { + _inherits(ResetPasswordBreadcrumbsHandler, _React$Component); + + function ResetPasswordBreadcrumbsHandler() { + _classCallCheck(this, ResetPasswordBreadcrumbsHandler); + + return _possibleConstructorReturn( + this, + ( + ResetPasswordBreadcrumbsHandler.__proto__ || + Object.getPrototypeOf(ResetPasswordBreadcrumbsHandler) + ).apply(this, arguments), + ); + } + + _createClass(ResetPasswordBreadcrumbsHandler, [ + { + key: 'render', + + /** + * + */ + value: function render() { + return React.createElement( + __WEBPACK_IMPORTED_MODULE_0_app_components_shared_Breadcrumbs__['a' /* default */], + { + linkItems: [ + { location: '/', name: 'Главная' }, + { location: '/users/sign-in', name: 'Вход' }, + ], + activeItemName: 'C\u043C\u0435\u043D\u0430 \u043F\u0430\u0440\u043E\u043B\u044F', + }, + ); + }, + }, + ]); + + return ResetPasswordBreadcrumbsHandler; + })(React.Component); + + /* harmony default export */ __webpack_exports__['a'] = ResetPasswordBreadcrumbsHandler; + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(1)); + + /***/ + }, + /* 446 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (React) { + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__shared_ProgressBar__ = __webpack_require__(25); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var ResetPasswordHandler = (function (_React$Component) { + _inherits(ResetPasswordHandler, _React$Component); + + function ResetPasswordHandler() { + var _ref; + + var _temp, _this, _ret; + + _classCallCheck(this, ResetPasswordHandler); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return ( + (_ret = + ((_temp = + ((_this = _possibleConstructorReturn( + this, + (_ref = + ResetPasswordHandler.__proto__ || + Object.getPrototypeOf(ResetPasswordHandler)).call.apply(_ref, [this].concat(args)), + )), + _this)), + (_this.state = { contentComponentLoadedTrigger: false }), + _temp)), + _possibleConstructorReturn(_this, _ret) + ); + } + + _createClass( + ResetPasswordHandler, + [ + { + key: 'componentWillMount', + + /** + * + */ + value: function componentWillMount() { + var _this2 = this; + + // This constant should be replaced with explicit true of false by Webpack DefinePlugin: + if (true) { + ResetPasswordHandler.contentComponent = __webpack_require__(238).default; + return; + } + + if (!ResetPasswordHandler.contentComponent) { + ResetPasswordHandler.loadWebpackChunk().then(function () { + _this2.setState({ contentComponentLoadedTrigger: true }); + }); + } + }, + + /** + * Renders loader. Loader code should be as lightweight as possible because + * it will be included into the main chunk. + */ + }, + { + key: 'renderLoader', + value: function renderLoader() { + return React.createElement( + __WEBPACK_IMPORTED_MODULE_0__shared_ProgressBar__['a' /* default */], + { label: '\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430...' }, + ); + }, + + /** + * + */ + }, + { + key: 'renderContent', + value: function renderContent() { + return React.createElement(ResetPasswordHandler.contentComponent, this.props); + }, + + /** + * + */ + }, + { + key: 'render', + value: function render() { + if (ResetPasswordHandler.contentComponent) return this.renderContent(); + return this.renderLoader(); + }, + }, + ], + [ + { + key: 'loadWebpackChunk', + + /** + * Loads named code chunk with own components. + */ + value: function loadWebpackChunk() { + var _this3 = this; + + return Promise.resolve() + .then( + function (require) { + _this3.contentComponent = __webpack_require__(238).default; + }.bind(null, __webpack_require__), + ) + .catch(__webpack_require__.oe); + }, + + /** + * + */ + }, + ], + ); + + return ResetPasswordHandler; + })(React.Component); + + /* harmony default export */ __webpack_exports__['a'] = ResetPasswordHandler; + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(1)); + + /***/ + }, + /* 447 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (React) { + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_app_components_shared_Breadcrumbs__ = + __webpack_require__(45); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var ResetPasswordRequestBreadcrumbsHandler = (function (_React$Component) { + _inherits(ResetPasswordRequestBreadcrumbsHandler, _React$Component); + + function ResetPasswordRequestBreadcrumbsHandler() { + _classCallCheck(this, ResetPasswordRequestBreadcrumbsHandler); + + return _possibleConstructorReturn( + this, + ( + ResetPasswordRequestBreadcrumbsHandler.__proto__ || + Object.getPrototypeOf(ResetPasswordRequestBreadcrumbsHandler) + ).apply(this, arguments), + ); + } + + _createClass(ResetPasswordRequestBreadcrumbsHandler, [ + { + key: 'render', + + /** + * + */ + value: function render() { + return React.createElement( + __WEBPACK_IMPORTED_MODULE_0_app_components_shared_Breadcrumbs__['a' /* default */], + { + linkItems: [ + { location: '/', name: 'Главная' }, + { location: '/users/sign-in', name: 'Вход' }, + ], + activeItemName: + '\u0417\u0430\u043F\u0440\u043E\u0441 \u043D\u0430 \u0441\u043C\u0435\u043D\u0443 \u043F\u0430\u0440\u043E\u043B\u044F', + }, + ); + }, + }, + ]); + + return ResetPasswordRequestBreadcrumbsHandler; + })(React.Component); + + /* harmony default export */ __webpack_exports__['a'] = ResetPasswordRequestBreadcrumbsHandler; + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(1)); + + /***/ + }, + /* 448 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (React) { + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__shared_ProgressBar__ = __webpack_require__(25); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var ResetPasswordRequestHandler = (function (_React$Component) { + _inherits(ResetPasswordRequestHandler, _React$Component); + + function ResetPasswordRequestHandler() { + var _ref; + + var _temp, _this, _ret; + + _classCallCheck(this, ResetPasswordRequestHandler); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return ( + (_ret = + ((_temp = + ((_this = _possibleConstructorReturn( + this, + (_ref = + ResetPasswordRequestHandler.__proto__ || + Object.getPrototypeOf(ResetPasswordRequestHandler)).call.apply( + _ref, + [this].concat(args), + ), + )), + _this)), + (_this.state = { contentComponentLoadedTrigger: false }), + _temp)), + _possibleConstructorReturn(_this, _ret) + ); + } + + _createClass( + ResetPasswordRequestHandler, + [ + { + key: 'componentWillMount', + + /** + * + */ + value: function componentWillMount() { + var _this2 = this; + + // This constant should be replaced with explicit true of false by Webpack DefinePlugin: + if (true) { + ResetPasswordRequestHandler.contentComponent = __webpack_require__(239).default; + return; + } + + if (!ResetPasswordRequestHandler.contentComponent) { + ResetPasswordRequestHandler.loadWebpackChunk().then(function () { + _this2.setState({ contentComponentLoadedTrigger: true }); + }); + } + }, + + /** + * Renders loader. Loader code should be as lightweight as possible because + * it will be included into the main chunk. + */ + }, + { + key: 'renderLoader', + value: function renderLoader() { + return React.createElement( + __WEBPACK_IMPORTED_MODULE_0__shared_ProgressBar__['a' /* default */], + { label: '\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430...' }, + ); + }, + + /** + * + */ + }, + { + key: 'renderContent', + value: function renderContent() { + return React.createElement(ResetPasswordRequestHandler.contentComponent, this.props); + }, + + /** + * + */ + }, + { + key: 'render', + value: function render() { + if (ResetPasswordRequestHandler.contentComponent) return this.renderContent(); + return this.renderLoader(); + }, + }, + ], + [ + { + key: 'loadWebpackChunk', + + /** + * Loads named code chunk with own components. + */ + value: function loadWebpackChunk() { + var _this3 = this; + + return Promise.resolve() + .then( + function (require) { + _this3.contentComponent = __webpack_require__(239).default; + }.bind(null, __webpack_require__), + ) + .catch(__webpack_require__.oe); + }, + + /** + * + */ + }, + ], + ); + + return ResetPasswordRequestHandler; + })(React.Component); + + /* harmony default export */ __webpack_exports__['a'] = ResetPasswordRequestHandler; + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(1)); + + /***/ + }, + /* 449 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (React) { + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_app_components_shared_Breadcrumbs__ = + __webpack_require__(45); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var SignInBreadcrumbsHandler = (function (_React$Component) { + _inherits(SignInBreadcrumbsHandler, _React$Component); + + function SignInBreadcrumbsHandler() { + _classCallCheck(this, SignInBreadcrumbsHandler); + + return _possibleConstructorReturn( + this, + (SignInBreadcrumbsHandler.__proto__ || Object.getPrototypeOf(SignInBreadcrumbsHandler)).apply( + this, + arguments, + ), + ); + } + + _createClass(SignInBreadcrumbsHandler, [ + { + key: 'render', + + /** + * + */ + value: function render() { + return React.createElement( + __WEBPACK_IMPORTED_MODULE_0_app_components_shared_Breadcrumbs__['a' /* default */], + { + linkItems: [{ location: '/', name: 'Главная' }], + activeItemName: '\u0412\u0445\u043E\u0434', + }, + ); + }, + }, + ]); + + return SignInBreadcrumbsHandler; + })(React.Component); + + /* harmony default export */ __webpack_exports__['a'] = SignInBreadcrumbsHandler; + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(1)); + + /***/ + }, + /* 450 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (React) { + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__shared_ProgressBar__ = __webpack_require__(25); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var SignInHandler = (function (_React$Component) { + _inherits(SignInHandler, _React$Component); + + function SignInHandler() { + var _ref; + + var _temp, _this, _ret; + + _classCallCheck(this, SignInHandler); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return ( + (_ret = + ((_temp = + ((_this = _possibleConstructorReturn( + this, + (_ref = SignInHandler.__proto__ || Object.getPrototypeOf(SignInHandler)).call.apply( + _ref, + [this].concat(args), + ), + )), + _this)), + (_this.state = { contentComponentLoadedTrigger: false }), + _temp)), + _possibleConstructorReturn(_this, _ret) + ); + } + + _createClass( + SignInHandler, + [ + { + key: 'componentWillMount', + + /** + * + */ + value: function componentWillMount() { + var _this2 = this; + + // This constant should be replaced with explicit true of false by Webpack DefinePlugin: + if (true) { + SignInHandler.contentComponent = __webpack_require__(240).default; + return; + } + + if (!SignInHandler.contentComponent) { + SignInHandler.loadWebpackChunk().then(function () { + _this2.setState({ contentComponentLoadedTrigger: true }); + }); + } + }, + + /** + * Renders loader. Loader code should be as lightweight as possible because + * it will be included into the main chunk. + */ + }, + { + key: 'renderLoader', + value: function renderLoader() { + return React.createElement( + __WEBPACK_IMPORTED_MODULE_0__shared_ProgressBar__['a' /* default */], + { label: '\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430...' }, + ); + }, + + /** + * + */ + }, + { + key: 'renderContent', + value: function renderContent() { + return React.createElement(SignInHandler.contentComponent, this.props); + }, + + /** + * + */ + }, + { + key: 'render', + value: function render() { + if (SignInHandler.contentComponent) return this.renderContent(); + return this.renderLoader(); + }, + }, + ], + [ + { + key: 'loadWebpackChunk', + + /** + * Loads named code chunk with own components. + */ + value: function loadWebpackChunk() { + var _this3 = this; + + return Promise.resolve() + .then( + function (require) { + _this3.contentComponent = __webpack_require__(240).default; + }.bind(null, __webpack_require__), + ) + .catch(__webpack_require__.oe); + }, + + /** + * + */ + }, + ], + ); + + return SignInHandler; + })(React.Component); + + /* harmony default export */ __webpack_exports__['a'] = SignInHandler; + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(1)); + + /***/ + }, + /* 451 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (React) { + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_app_components_shared_Breadcrumbs__ = + __webpack_require__(45); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var SignUpBreadcrumbsHandler = (function (_React$Component) { + _inherits(SignUpBreadcrumbsHandler, _React$Component); + + function SignUpBreadcrumbsHandler() { + _classCallCheck(this, SignUpBreadcrumbsHandler); + + return _possibleConstructorReturn( + this, + (SignUpBreadcrumbsHandler.__proto__ || Object.getPrototypeOf(SignUpBreadcrumbsHandler)).apply( + this, + arguments, + ), + ); + } + + _createClass(SignUpBreadcrumbsHandler, [ + { + key: 'render', + + /** + * + */ + value: function render() { + return React.createElement( + __WEBPACK_IMPORTED_MODULE_0_app_components_shared_Breadcrumbs__['a' /* default */], + { + linkItems: [{ location: '/', name: 'Главная' }], + activeItemName: '\u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044F', + }, + ); + }, + }, + ]); + + return SignUpBreadcrumbsHandler; + })(React.Component); + + /* harmony default export */ __webpack_exports__['a'] = SignUpBreadcrumbsHandler; + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(1)); + + /***/ + }, + /* 452 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (React) { + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__shared_ProgressBar__ = __webpack_require__(25); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var SignUpHandler = (function (_React$Component) { + _inherits(SignUpHandler, _React$Component); + + function SignUpHandler() { + var _ref; + + var _temp, _this, _ret; + + _classCallCheck(this, SignUpHandler); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return ( + (_ret = + ((_temp = + ((_this = _possibleConstructorReturn( + this, + (_ref = SignUpHandler.__proto__ || Object.getPrototypeOf(SignUpHandler)).call.apply( + _ref, + [this].concat(args), + ), + )), + _this)), + (_this.state = { contentComponentLoadedTrigger: false }), + _temp)), + _possibleConstructorReturn(_this, _ret) + ); + } + + _createClass( + SignUpHandler, + [ + { + key: 'componentWillMount', + + /** + * + */ + value: function componentWillMount() { + var _this2 = this; + + // This constant should be replaced with explicit true of false by Webpack DefinePlugin: + if (true) { + SignUpHandler.contentComponent = __webpack_require__(241).default; + return; + } + + if (!SignUpHandler.contentComponent) { + SignUpHandler.loadWebpackChunk().then(function () { + _this2.setState({ contentComponentLoadedTrigger: true }); + }); + } + }, + + /** + * Renders loader. Loader code should be as lightweight as possible because + * it will be included into the main chunk. + */ + }, + { + key: 'renderLoader', + value: function renderLoader() { + return React.createElement( + __WEBPACK_IMPORTED_MODULE_0__shared_ProgressBar__['a' /* default */], + { label: '\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430...' }, + ); + }, + + /** + * + */ + }, + { + key: 'renderContent', + value: function renderContent() { + return React.createElement(SignUpHandler.contentComponent, this.props); + }, + + /** + * + */ + }, + { + key: 'render', + value: function render() { + if (SignUpHandler.contentComponent) return this.renderContent(); + return this.renderLoader(); + }, + }, + ], + [ + { + key: 'loadWebpackChunk', + + /** + * Loads named code chunk with own components. + */ + value: function loadWebpackChunk() { + var _this3 = this; + + return Promise.resolve() + .then( + function (require) { + _this3.contentComponent = __webpack_require__(241).default; + }.bind(null, __webpack_require__), + ) + .catch(__webpack_require__.oe); + }, + + /** + * + */ + }, + ], + ); + + return SignUpHandler; + })(React.Component); + + /* harmony default export */ __webpack_exports__['a'] = SignUpHandler; + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(1)); + + /***/ + }, + /* 453 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (React) { + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(2); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_redux__ = __webpack_require__(6); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_modal_dist_react_modal__ = + __webpack_require__(814); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_modal_dist_react_modal___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react_modal_dist_react_modal__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_app_actions_currentUserActions__ = + __webpack_require__(21); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_app_records_single_item_containers_CurrentUserContainerRecord__ = + __webpack_require__(39); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var AvatarCrop = (function (_React$Component) { + _inherits(AvatarCrop, _React$Component); + + function AvatarCrop() { + var _ref; + + var _temp, _this, _ret; + + _classCallCheck(this, AvatarCrop); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return ( + (_ret = + ((_temp = + ((_this = _possibleConstructorReturn( + this, + (_ref = AvatarCrop.__proto__ || Object.getPrototypeOf(AvatarCrop)).call.apply( + _ref, + [this].concat(args), + ), + )), + _this)), + (_this.state = { + cropDialogIsOpen: false, + }), + (_this.onCropButtonClick = function () { + _this.setState({ cropDialogIsOpen: true }); + }), + (_this.onCancelCrop = function () { + _this.jcrop.destroy(); + _this.setState({ cropDialogIsOpen: false }); + }), + (_this.onConfirmCrop = function () { + // eslint-disable-next-line id-length + if ( + !_this.cropCoordinates || + _this.cropCoordinates.w === 0 || + _this.cropCoordinates.h === 0 + ) + return; + + _this.jcrop.destroy(); + _this.setState({ cropDialogIsOpen: false }); + + _this.props.onCropConfirm({ + avatar_crop_x: _this.cropCoordinates.x, + avatar_crop_y: _this.cropCoordinates.y, + avatar_crop_width: _this.cropCoordinates.w, + avatar_crop_height: _this.cropCoordinates.h, + }); + }), + (_this.onAfterCropDialogOpen = function () { + var currentUser = _this.props.currentUserContainer.getCurrentUser(); + var initialSelection = void 0; + + if ( + currentUser.get('avatar_crop_x') !== undefined && + currentUser.get('avatar_crop_y') !== undefined && + currentUser.get('avatar_crop_width') !== undefined && + currentUser.get('avatar_crop_height') !== undefined + ) { + initialSelection = [ + currentUser.get('avatar_crop_x'), + currentUser.get('avatar_crop_y'), + currentUser.get('avatar_crop_x') + currentUser.get('avatar_crop_width'), + currentUser.get('avatar_crop_y') + currentUser.get('avatar_crop_height'), + ]; + } else { + initialSelection = [0, 0, 200, 200]; + } + + var self = _this; + + $('#crop-target').Jcrop( + { + aspectRatio: 1, + setSelect: initialSelection, + allowSelect: false, + onChange: _this.storeCropCoordinates, + onSelect: _this.storeCropCoordinates, + }, + function () { + self.jcrop = this; + }, + ); + }), + (_this.storeCropCoordinates = function (coordinates) { + _this.cropCoordinates = coordinates; + }), + _temp)), + _possibleConstructorReturn(_this, _ret) + ); + } + /** + * + */ + + /** + * + */ + + /** + * + */ + + /** + * + */ + + /** + * + */ + + /** + * + */ + + /** + * + */ + + _createClass(AvatarCrop, [ + { + key: 'componentWillUnmount', + + /** + * + */ + value: function componentWillUnmount() { + if (this.jcrop) { + this.jcrop.destroy(); + } + }, + + /** + * + */ + }, + { + key: 'render', + value: function render() { + var currentUser = this.props.currentUserContainer.getCurrentUser(); + + return React.createElement( + 'div', + { className: 'col-md-offset-3 col-md-6 avatar-crop' }, + React.createElement( + 'button', + { + onClick: this.onCropButtonClick, + id: 'avatar-crop', + className: 'btn btn-default', + disabled: !currentUser.get('avatar_preview_url'), + }, + React.createElement('span', { + className: 'glyphicon glyphicon-scissors', + 'aria-hidden': 'true', + }), + ' \u041E\u0431\u0440\u0435\u0437\u0430\u0442\u044C', + ), + React.createElement( + __WEBPACK_IMPORTED_MODULE_2_react_modal_dist_react_modal___default.a, + { + isOpen: this.state.cropDialogIsOpen, + style: { + content: { + position: 'absolute', + top: '150px', + bottom: '10%', + }, + overlay: { + textAlign: 'center', + zIndex: 500, + backgroundColor: 'rgba(100, 100, 100, 0.9)', + }, + }, + onAfterOpen: this.onAfterCropDialogOpen, + contentLabel: 'Modal', + }, + React.createElement( + 'div', + { id: 'crop-target-container' }, + React.createElement('img', { + src: currentUser.get('avatar_url'), + id: 'crop-target', + alt: 'Responsive image', + }), + ), + React.createElement( + 'div', + { className: 'buttons' }, + React.createElement( + 'button', + { onClick: this.onConfirmCrop, className: 'btn btn-default apply' }, + React.createElement('span', { + className: 'glyphicon glyphicon-ok', + 'aria-hidden': 'true', + }), + ' \u041F\u0440\u0438\u043C\u0435\u043D\u0438\u0442\u044C', + ), + '\xA0\xA0', + React.createElement( + 'button', + { onClick: this.onCancelCrop, className: 'btn btn-default' }, + React.createElement('span', { + className: 'glyphicon glyphicon-remove', + 'aria-hidden': 'true', + }), + ' \u041E\u0442\u043C\u0435\u043D\u0430', + ), + ), + ), + ); + }, + }, + ]); + + return AvatarCrop; + })(React.Component); + + /** + * + */ + + AvatarCrop.propTypes = { + currentUserContainer: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.instanceOf( + __WEBPACK_IMPORTED_MODULE_4_app_records_single_item_containers_CurrentUserContainerRecord__[ + 'a' /* default */ + ], + ).isRequired, + onCropConfirm: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired, + }; + var mapStateToProps = function mapStateToProps(state, ownProps) { + return { + currentUserContainer: state.currentUserContainer, + }; + }; + + /** + * + */ + var mapDispatchToProps = function mapDispatchToProps(dispatch) { + return { + onCropConfirm: function onCropConfirm(attributes) { + dispatch( + __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_3_app_actions_currentUserActions__[ + 'e' /* assignCurrentUserAttributes */ + ], + )(attributes), + ); + }, + }; + }; + + /* harmony default export */ __webpack_exports__['a'] = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_1_react_redux__['b' /* connect */], + )( + mapStateToProps, + mapDispatchToProps, + )(AvatarCrop); + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(1)); + + /***/ + }, + /* 454 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (React) { + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(2); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames__ = __webpack_require__(35); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_classnames__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_redux__ = __webpack_require__(6); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_app_actions_currentUserActions__ = + __webpack_require__(21); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_app_records_single_item_containers_CurrentUserContainerRecord__ = + __webpack_require__(39); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var AvatarSelection = (function (_React$Component) { + _inherits(AvatarSelection, _React$Component); + + function AvatarSelection() { + _classCallCheck(this, AvatarSelection); + + return _possibleConstructorReturn( + this, + (AvatarSelection.__proto__ || Object.getPrototypeOf(AvatarSelection)).apply(this, arguments), + ); + } + + _createClass(AvatarSelection, [ + { + key: 'componentDidMount', + + /** + * + */ + value: function componentDidMount() { + var _this2 = this; + + this.$avatarProgressBarBox = $('#avatar-progress-bar-box'); + this.$avatarProgressBar = $('#avatar-progress-bar'); + + var self = this; + + this.uploader = new ss.SimpleUpload({ + button: 'avatar-ajax-upload', + dropzone: 'avatar-container', + url: '/users/avatars/create.json', + name: 'image', + data: { authenticity_token: this.props.authenticityToken }, + onSubmit: function onSubmit(filename, extension) { + self.$avatarProgressBarBox.show(); + this.setProgressBar(self.$avatarProgressBar[0]); + }, + + onComplete: function onComplete(filename, response) { + self.$avatarProgressBarBox.hide(); + + var JSONResponse = JSON.parse(response); + _this2.props.onAvatarUploadComplete({ + avatar_id: JSONResponse.id, + avatar_width: JSONResponse.width, + avatar_height: JSONResponse.height, + avatar_crop_x: undefined, + avatar_crop_y: undefined, + avatar_crop_width: undefined, + avatar_crop_height: undefined, + avatar_url: JSONResponse.url, + avatar_thumb_url: JSONResponse.thumb_url, + avatar_preview_url: JSONResponse.preview_url, + avatar_errors: JSONResponse.errors, + }); + }, + onError: function onError( + filename, + errorType, + status, + statusText, + response, + uploadBtn, + fileSize, + ) { + self.$avatarProgressBarBox.hide(); + + _this2.props.onAvatarUploadComplete({ + avatar_errors: { image: ['Не должено превышать 1МБ.'] }, + }); + }, + }); + }, + + /** + * + */ + + /** + * + */ + }, + { + key: 'componentWillUnmount', + value: function componentWillUnmount() { + this.uploader.destroy(); + }, + + /** + * + */ + }, + { + key: 'renderAvatar', + value: function renderAvatar() { + var currentUser = this.props.currentUserContainer.getCurrentUser(); + + if (currentUser.get('avatar_url')) { + // If avatar crop parameters present on current user record, render initial image in crop container: + if ( + currentUser.get('avatar_crop_x') !== undefined && + currentUser.get('avatar_crop_y') !== undefined && + currentUser.get('avatar_crop_width') !== undefined && + currentUser.get('avatar_crop_height') !== undefined + ) { + var rx = 200 / currentUser.get('avatar_crop_width'); + var ry = 200 / currentUser.get('avatar_crop_height'); + + var width = Math.round(rx * currentUser.get('avatar_width')) + 'px'; + var height = Math.round(ry * currentUser.get('avatar_height')) + 'px'; + var marginLeft = '-' + Math.round(rx * currentUser.get('avatar_crop_x')) + 'px'; + var marginTop = '-' + Math.round(ry * currentUser.get('avatar_crop_y')) + 'px'; + + return React.createElement( + 'div', + { className: 'cropped-avatar-wrapper img-thumbnail' }, + React.createElement( + 'div', + { className: 'cropped-avatar-container' }, + React.createElement('img', { + src: currentUser.get('avatar_url'), + style: { + width: width, + height: height, + marginLeft: marginLeft, + marginTop: marginTop, + }, + }), + ), + ); + } + + // If no avatar crop parameters present, render avatar preview: + return React.createElement('img', { + src: currentUser.get('avatar_preview_url'), + className: 'avatar img-thumbnail', + }); + } + + return React.createElement('div', { + className: 'no-avatar-placeholder img-responsive img-thumbnail', + alt: 'Responsive image', + }); + }, + + /** + * + */ + }, + { + key: 'render', + value: function render() { + var currentUser = this.props.currentUserContainer.getCurrentUser(); + + var avatarImageErrors = currentUser.getAvatarImageErrors(); + var avatarImageError = avatarImageErrors ? avatarImageErrors.first() : undefined; + var avatarSelectionClass = __WEBPACK_IMPORTED_MODULE_1_classnames___default()( + 'col-md-offset-3 col-md-6', + { 'has-error': avatarImageError }, + ); + + return React.createElement( + 'div', + { id: 'avatar-selection', className: avatarSelectionClass }, + React.createElement( + 'div', + { id: 'avatar-container' }, + React.createElement( + 'div', + { className: 'drag-and-drop-label' }, + '\u041F\u0435\u0440\u0435\u0442\u0430\u0449\u0438\u0442\u0435 \u0444\u043E\u0442\u043E', + ), + React.createElement( + 'div', + { id: 'avatar-progress-bar-box' }, + React.createElement('div', { id: 'avatar-progress-bar' }), + ), + this.renderAvatar(), + ), + React.createElement('span', { className: 'help-block' }, avatarImageError), + React.createElement( + 'button', + { id: 'avatar-ajax-upload', className: 'btn btn-default' }, + React.createElement('span', { + className: 'glyphicon glyphicon-picture', + 'aria-hidden': 'true', + }), + ' \u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0430\u0432\u0430\u0442\u0430\u0440', + ), + ); + }, + }, + ]); + + return AvatarSelection; + })(React.Component); + + /** + * + */ + + AvatarSelection.propTypes = { + authenticityToken: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string.isRequired, + currentUserContainer: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.instanceOf( + __WEBPACK_IMPORTED_MODULE_4_app_records_single_item_containers_CurrentUserContainerRecord__[ + 'a' /* default */ + ], + ).isRequired, + onAvatarUploadComplete: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired, + }; + var mapStateToProps = function mapStateToProps(state, ownProps) { + return { + authenticityToken: state.railsContext.get('authenticityToken'), + currentUserContainer: state.currentUserContainer, + }; + }; + + /** + * + */ + var mapDispatchToProps = function mapDispatchToProps(dispatch) { + return { + onAvatarUploadComplete: function onAvatarUploadComplete(attributes) { + dispatch( + __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_3_app_actions_currentUserActions__[ + 'e' /* assignCurrentUserAttributes */ + ], + )(attributes), + ); + }, + }; + }; + + /* harmony default export */ __webpack_exports__['a'] = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_2_react_redux__['b' /* connect */], + )( + mapStateToProps, + mapDispatchToProps, + )(AvatarSelection); + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(1)); + + /***/ + }, + /* 455 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (React, _) { + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(2); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_router__ = __webpack_require__(13); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var Pagination = (function (_React$Component) { + _inherits(Pagination, _React$Component); + + function Pagination() { + _classCallCheck(this, Pagination); + + return _possibleConstructorReturn( + this, + (Pagination.__proto__ || Object.getPrototypeOf(Pagination)).apply(this, arguments), + ); + } + + _createClass(Pagination, [ + { + key: 'alterLocationQueryPage', + + /** + * + */ + + /** + * + */ + value: function alterLocationQueryPage(page) { + var queryWithChangedPage = _.clone(this.props.location.query); + queryWithChangedPage.page = page; + + return { + pathname: this.props.location.pathname, + query: queryWithChangedPage, + }; + }, + + /** + * + */ + + /** + * + */ + }, + { + key: 'getCurrentPage', + value: function getCurrentPage() { + return this.props.location.query.page || '1'; + }, + + /** + * + */ + }, + { + key: 'getPagesCount', + value: function getPagesCount() { + return Math.ceil(this.props.total / this.props.perPage); + }, + + /** + * + */ + }, + { + key: 'renderPreviousPageButton', + value: function renderPreviousPageButton() { + var currentPage = this.getCurrentPage(); + + if (currentPage === '1') { + return React.createElement( + 'li', + { className: 'disabled' }, + React.createElement( + 'a', + { 'aria-label': 'Previous' }, + React.createElement('span', { 'aria-hidden': 'true' }, '\xAB'), + ), + ); + } + + var toAttr = this.alterLocationQueryPage(currentPage - 1); + var hrefAttr = this.context.router.createHref(toAttr); + + return React.createElement( + 'li', + null, + React.createElement( + __WEBPACK_IMPORTED_MODULE_1_react_router__['f' /* Link */], + { href: hrefAttr, to: toAttr, 'aria-label': 'Previous' }, + React.createElement('span', { 'aria-hidden': 'true' }, '\xAB'), + ), + ); + }, + + /** + * + */ + }, + { + key: 'renderNextPageButton', + value: function renderNextPageButton() { + var currentPage = this.getCurrentPage(); + var pagesCount = this.getPagesCount(); + + if (Number(currentPage) === pagesCount) { + return React.createElement( + 'li', + { className: 'disabled' }, + React.createElement( + 'a', + { 'aria-label': 'Next' }, + React.createElement('span', { 'aria-hidden': 'true' }, '\xBB'), + ), + ); + } + + var toAttr = this.alterLocationQueryPage(Number(currentPage) + 1); + var hrefAttr = this.context.router.createHref(toAttr); + + return React.createElement( + 'li', + null, + React.createElement( + __WEBPACK_IMPORTED_MODULE_1_react_router__['f' /* Link */], + { href: hrefAttr, to: toAttr, 'aria-label': 'Next' }, + React.createElement('span', { 'aria-hidden': 'true' }, '\xBB'), + ), + ); + }, + + /** + * + */ + }, + { + key: 'renderPages', + value: function renderPages() { + var currentPage = this.getCurrentPage(); + var pagesCount = this.getPagesCount(); + var pagesElements = []; + + for (var i = 1; i <= pagesCount; i++) { + var className = String(i) === currentPage ? 'active' : null; + var toAttr = this.alterLocationQueryPage(i); + var hrefAttr = this.context.router.createHref(toAttr); + + pagesElements.push( + React.createElement( + 'li', + { className: className, key: i }, + React.createElement( + __WEBPACK_IMPORTED_MODULE_1_react_router__['f' /* Link */], + { href: hrefAttr, to: toAttr }, + i, + ), + ), + ); + } + + return pagesElements; + }, + + /** + * + */ + }, + { + key: 'render', + value: function render() { + if (this.getPagesCount() <= 1) return null; + + return React.createElement( + 'nav', + { className: 'pagination-container' }, + React.createElement( + 'div', + { className: 'pagination-caption' }, + React.createElement('span', { + className: 'glyphicon glyphicon-book', + 'aria-hidden': 'true', + }), + ' \u0421\u0442\u0440\u0430\u043D\u0438\u0446\u0430:', + ), + '\xA0\xA0', + React.createElement( + 'ul', + { className: 'pagination' }, + this.renderPreviousPageButton(), + this.renderPages(), + this.renderNextPageButton(), + ), + ); + }, + }, + ]); + + return Pagination; + })(React.Component); + + Pagination.propTypes = { + location: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.shape({ + pathname: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string.isRequired, + query: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.shape({ + page: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string, + }).isRequired, + }).isRequired, + perPage: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number.isRequired, + total: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number.isRequired, + }; + Pagination.contextTypes = { + router: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object.isRequired, + }; + + /* harmony default export */ __webpack_exports__['a'] = Pagination; + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(1), __webpack_require__(60)); + + /***/ + }, + /* 456 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (React) { + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_helmet__ = __webpack_require__(44); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_helmet___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react_helmet__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__sign_in_Form__ = __webpack_require__(457); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var SignIn = (function (_React$Component) { + _inherits(SignIn, _React$Component); + + function SignIn() { + _classCallCheck(this, SignIn); + + return _possibleConstructorReturn( + this, + (SignIn.__proto__ || Object.getPrototypeOf(SignIn)).apply(this, arguments), + ); + } + + _createClass(SignIn, [ + { + key: 'render', + + /** + * + */ + value: function render() { + return React.createElement( + 'div', + { id: 'sign-in', className: 'page-content' }, + React.createElement( + __WEBPACK_IMPORTED_MODULE_0_react_helmet__['Helmet'], + null, + React.createElement( + 'title', + null, + 'Bionic Workshop | \u0412\u0445\u043E\u0434 \u0432 \u0441\u0438\u0441\u0442\u0435\u043C\u0443', + ), + React.createElement('meta', { + name: 'description', + content: + '\u0418\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0439\u0442\u0435 \u0444\u043E\u0440\u043C\u0443 \u0434\u043B\u044F \u0432\u0445\u043E\u0434\u0430 \u0432 \u0441\u0438\u0441\u0442\u0435\u043C\u0443 \u0447\u0442\u043E\u0431\u044B \u0438\u043C\u0435\u0442\u044C \u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E\u0441\u0442\u044C \u043E\u0441\u0442\u0430\u0432\u043B\u044F\u0442\u044C \u043A\u043E\u043C\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u0438 \u043A \u043F\u0443\u0431\u043B\u0438\u043A\u0430\u0446\u0438\u044F\u043C.', + }), + ), + React.createElement( + 'div', + { className: 'container' }, + React.createElement( + 'div', + { className: 'row' }, + React.createElement( + 'div', + { className: 'col-md-12' }, + React.createElement( + 'h2', + { className: 'text-center' }, + '\u0412\u0445\u043E\u0434 \u0432 \u0441\u0438\u0441\u0442\u0435\u043C\u0443', + ), + React.createElement( + __WEBPACK_IMPORTED_MODULE_1__sign_in_Form__['a' /* default */], + null, + ), + ), + ), + ), + ); + }, + }, + ]); + + return SignIn; + })(React.Component); + + /* harmony default export */ __webpack_exports__['a'] = SignIn; + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(1)); + + /***/ + }, + /* 457 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (React) { + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(2); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_redux__ = __webpack_require__(6); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_classnames__ = __webpack_require__(35); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_classnames___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_2_classnames__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_app_actions_currentUserActions__ = + __webpack_require__(21); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_app_records_single_item_containers_CurrentUserContainerRecord__ = + __webpack_require__(39); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_app_components_shared_SubmitButton__ = + __webpack_require__(72); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__form_Links__ = __webpack_require__(458); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var Form = (function (_React$Component) { + _inherits(Form, _React$Component); + + /** + * + */ + function Form(props, context) { + _classCallCheck(this, Form); + + var _this = _possibleConstructorReturn( + this, + (Form.__proto__ || Object.getPrototypeOf(Form)).call(this, props, context), + ); + + _this.state = { + email: '', + password: '', + rememberMe: false, + }; + + _this.onEmailChange = _this.onEmailChange.bind(_this); + _this.onPasswordChange = _this.onPasswordChange.bind(_this); + _this.onRememberMeChange = _this.onRememberMeChange.bind(_this); + _this.onFormSubmit = _this.onFormSubmit.bind(_this); + return _this; + } + + /** + * + */ + + /** + * + */ + + _createClass(Form, [ + { + key: 'componentWillUnmount', + value: function componentWillUnmount() { + this.props.onUnmount(); + }, + + /** + * + */ + }, + { + key: 'onEmailChange', + value: function onEmailChange(event) { + this.setState({ email: event.target.value }); + }, + + /** + * + */ + }, + { + key: 'onPasswordChange', + value: function onPasswordChange(event) { + this.setState({ password: event.target.value }); + }, + + /** + * + */ + }, + { + key: 'onRememberMeChange', + value: function onRememberMeChange(event) { + this.setState({ rememberMe: event.target.checked }); + }, + + /** + * + */ + }, + { + key: 'onFormSubmit', + value: function onFormSubmit(event) { + event.preventDefault(); + this.props.onSubmit(this.state.email, this.state.password, this.state.rememberMe); + }, + + /** + * + */ + }, + { + key: 'render', + value: function render() { + var validatedEmailFormGroupsClass = __WEBPACK_IMPORTED_MODULE_2_classnames___default()( + 'form-group form-group-email', + { + 'has-error': this.props.currentUserContainer.get('loadError'), + }, + ); + + var validatedPasswordFormGroupsClass = __WEBPACK_IMPORTED_MODULE_2_classnames___default()( + 'form-group form-group-password', + { + 'has-error': this.props.currentUserContainer.get('loadError'), + }, + ); + + return React.createElement( + 'div', + { className: 'col-md-offset-3 col-md-6' }, + React.createElement( + 'section', + { className: 'sign-in-form-container' }, + React.createElement( + 'form', + { + onSubmit: this.onFormSubmit, + className: 'sign-in-form', + action: '/users/sign-in', + acceptCharset: 'UTF-8', + method: 'post', + }, + React.createElement('input', { name: 'utf8', type: 'hidden', value: '\u2713' }), + React.createElement('input', { + name: 'authenticity_token', + type: 'hidden', + value: this.props.authenticityToken, + }), + React.createElement( + 'div', + { className: validatedEmailFormGroupsClass }, + React.createElement( + 'label', + { className: 'control-label', htmlFor: 'user_email' }, + 'Email', + ), + React.createElement('input', { + onChange: this.onEmailChange, + value: this.state.email, + className: 'form-control', + id: 'user_email', + placeholder: '\u0432\u0432\u0435\u0434\u0438\u0442\u0435 email', + type: 'email', + name: 'user[email]', + }), + ), + React.createElement( + 'div', + { className: validatedPasswordFormGroupsClass }, + React.createElement( + 'label', + { className: 'control-label', htmlFor: 'user_password' }, + '\u041F\u0430\u0440\u043E\u043B\u044C', + ), + React.createElement('input', { + onChange: this.onPasswordChange, + value: this.state.password, + autoComplete: 'off', + className: 'form-control', + id: 'user_password', + placeholder: + '\u0432\u0432\u0435\u0434\u0438\u0442\u0435 \u043F\u0430\u0440\u043E\u043B\u044C', + type: 'password', + name: 'user[password]', + }), + React.createElement( + 'span', + { className: 'help-block' }, + this.props.currentUserContainer.get('loadError'), + ), + ), + React.createElement( + 'div', + { className: 'form-group' }, + React.createElement( + 'div', + { className: 'checkbox' }, + React.createElement( + 'label', + null, + React.createElement('input', { + name: 'user[remember_me]', + type: 'hidden', + value: '0', + }), + React.createElement('input', { + onChange: this.onRememberMeChange, + value: this.state.rememberMe, + type: 'checkbox', + name: 'user[remember_me]', + id: 'user_remember_me', + }), + ' \u0417\u0430\u043F\u043E\u043C\u043D\u0438\u0442\u044C \u043C\u0435\u043D\u044F', + ), + ), + ), + React.createElement( + __WEBPACK_IMPORTED_MODULE_5_app_components_shared_SubmitButton__['a' /* default */], + { + className: 'btn btn-lg btn-primary btn-block', + isDisabled: this.props.currentUserContainer.get('isPending'), + readyText: '\u0412\u043E\u0439\u0442\u0438', + pendingText: + '\u041E\u0442\u043F\u0440\u0430\u0432\u043A\u0430 \u0434\u0430\u043D\u043D\u044B\u0445...', + }, + React.createElement('span', { + className: 'glyphicon glyphicon-log-in', + 'aria-hidden': 'true', + }), + ), + React.createElement(__WEBPACK_IMPORTED_MODULE_6__form_Links__['a' /* default */], null), + ), + ), + ); + }, + }, + ]); + + return Form; + })(React.Component); + + /** + * + */ + + Form.propTypes = { + onSubmit: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired, + onUnmount: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired, + authenticityToken: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string.isRequired, + currentUserContainer: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.instanceOf( + __WEBPACK_IMPORTED_MODULE_4_app_records_single_item_containers_CurrentUserContainerRecord__[ + 'a' /* default */ + ], + ).isRequired, + }; + var mapStateToProps = function mapStateToProps(state, ownProps) { + return { + authenticityToken: state.railsContext.get('authenticityToken'), + currentUserContainer: state.currentUserContainer, + }; + }; + + /** + * + */ + var mapDispatchToProps = function mapDispatchToProps(dispatch) { + return { + onSubmit: function onSubmit(email, password, rememberMe) { + dispatch( + __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_3_app_actions_currentUserActions__['m' /* fetchCurrentUser */], + )(email, password, rememberMe), + ); + }, + onUnmount: function onUnmount(id) { + dispatch( + __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_3_app_actions_currentUserActions__[ + 'n' /* clearCurrentUserLoadError */ + ], + )(), + ); + }, + }; + }; + + /* harmony default export */ __webpack_exports__['a'] = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_1_react_redux__['b' /* connect */], + )( + mapStateToProps, + mapDispatchToProps, + )(Form); + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(1)); + + /***/ + }, + /* 458 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (React) { + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_router__ = __webpack_require__(13); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var Links = (function (_React$Component) { + _inherits(Links, _React$Component); + + function Links() { + _classCallCheck(this, Links); + + return _possibleConstructorReturn( + this, + (Links.__proto__ || Object.getPrototypeOf(Links)).apply(this, arguments), + ); + } + + _createClass(Links, [ + { + key: 'render', + + /** + * + */ + value: function render() { + var signUpLocation = '/users/sign-up'; + var resetPasswordRequestLocation = '/users/reset-password-request'; + var resendConfirmationLocation = '/users/resend-confirmation'; + + return React.createElement( + 'div', + { className: 'links' }, + React.createElement( + __WEBPACK_IMPORTED_MODULE_0_react_router__['f' /* Link */], + { href: signUpLocation, to: signUpLocation }, + '\u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044F', + ), + ' ', + React.createElement('span', { className: 'separator' }, '|'), + ' ', + React.createElement( + __WEBPACK_IMPORTED_MODULE_0_react_router__['f' /* Link */], + { href: resetPasswordRequestLocation, to: resetPasswordRequestLocation }, + '\u0417\u0430\u0431\u044B\u043B\u0438 \u043F\u0430\u0440\u043E\u043B\u044C?', + ), + ' ', + React.createElement('span', { className: 'separator' }, '|'), + ' ', + React.createElement( + __WEBPACK_IMPORTED_MODULE_0_react_router__['f' /* Link */], + { href: resendConfirmationLocation, to: resendConfirmationLocation }, + '\u041D\u0435 \u043F\u0440\u0438\u0448\u043B\u043E \u043F\u0438\u0441\u044C\u043C\u043E?', + ), + ); + }, + }, + ]); + + return Links; + })(React.Component); + + /* harmony default export */ __webpack_exports__['a'] = Links; + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(1)); + + /***/ + }, + /* 459 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (React) { + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_helmet__ = __webpack_require__(44); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_helmet___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react_helmet__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__sign_up_Form__ = __webpack_require__(460); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__sign_up_Links__ = __webpack_require__(461); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var SignUp = (function (_React$Component) { + _inherits(SignUp, _React$Component); + + function SignUp() { + _classCallCheck(this, SignUp); + + return _possibleConstructorReturn( + this, + (SignUp.__proto__ || Object.getPrototypeOf(SignUp)).apply(this, arguments), + ); + } + + _createClass(SignUp, [ + { + key: 'render', + + /** + * + */ + value: function render() { + return React.createElement( + 'div', + { id: 'sign-up', className: 'page-content' }, + React.createElement( + __WEBPACK_IMPORTED_MODULE_0_react_helmet__['Helmet'], + null, + React.createElement( + 'title', + null, + 'Bionic Workshop | \u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044F', + ), + React.createElement('meta', { + name: 'description', + content: + '\u0417\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0439\u0442\u0435\u0441\u044C \u0432 \u0441\u0438\u0441\u0442\u0435\u043C\u0435 \u0447\u0442\u043E \u0438\u043C\u0435\u0442\u044C \u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E\u0441\u0442\u044C \u0432\u0445\u043E\u0434\u0438\u0442\u044C \u043F\u043E\u0434 \u0441\u043E\u0431\u0441\u0442\u0432\u0435\u043D\u043D\u044B\u043C \u0430\u043A\u043A\u0430\u0443\u043D\u0442\u043E\u043C, \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044C \u0430\u0432\u0430\u0442\u0430\u0440 \u0438 \u043E\u0441\u0442\u0430\u0432\u043B\u044F\u0442\u044C \u043A\u043E\u043C\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u0438 \u043A \u043F\u0443\u0431\u043B\u0438\u043A\u0430\u0446\u0438\u044F\u043C.', + }), + ), + React.createElement( + 'div', + { className: 'container' }, + React.createElement( + 'div', + { className: 'row' }, + React.createElement( + 'div', + { className: 'col-md-12' }, + React.createElement( + 'h2', + { className: 'text-center' }, + '\u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044F', + ), + React.createElement( + __WEBPACK_IMPORTED_MODULE_1__sign_up_Form__['a' /* default */], + null, + ), + React.createElement( + __WEBPACK_IMPORTED_MODULE_2__sign_up_Links__['a' /* default */], + null, + ), + ), + ), + ), + ); + }, + }, + ]); + + return SignUp; + })(React.Component); + + /* harmony default export */ __webpack_exports__['a'] = SignUp; + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(1)); + + /***/ + }, + /* 460 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_redux__ = __webpack_require__(6); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_app_actions_currentUserActions__ = + __webpack_require__(21); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_app_components_shared_UserForm__ = + __webpack_require__(248); + + /** + * + */ + var mapStateToProps = function mapStateToProps(state, ownProps) { + return { + authenticityToken: state.railsContext.get('authenticityToken'), + currentUserContainer: state.currentUserContainer, + }; + }; + + /** + * + */ + var mapDispatchToProps = function mapDispatchToProps(dispatch) { + return { + editMode: false, + onNameChange: function onNameChange(name) { + dispatch( + __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_1_app_actions_currentUserActions__[ + 'e' /* assignCurrentUserAttributes */ + ], + )({ name: name }, true), + ); + }, + onEmailChange: function onEmailChange(email) { + dispatch( + __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_1_app_actions_currentUserActions__[ + 'e' /* assignCurrentUserAttributes */ + ], + )({ email: email }, true), + ); + }, + onPasswordChange: function onPasswordChange(password) { + dispatch( + __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_1_app_actions_currentUserActions__[ + 'e' /* assignCurrentUserAttributes */ + ], + )({ password: password }, true), + ); + }, + onPasswordConfirmationChange: function onPasswordConfirmationChange(passwordConfirmation) { + dispatch( + __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_1_app_actions_currentUserActions__[ + 'e' /* assignCurrentUserAttributes */ + ], + )({ password_confirmation: passwordConfirmation }, true), + ); + }, + onSubmit: function onSubmit(attributes) { + dispatch( + __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_1_app_actions_currentUserActions__['l' /* createCurrentUser */], + )(attributes), + ); + }, + }; + }; + + /* harmony default export */ __webpack_exports__['a'] = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_0_react_redux__['b' /* connect */], + )( + mapStateToProps, + mapDispatchToProps, + )(__WEBPACK_IMPORTED_MODULE_2_app_components_shared_UserForm__['a' /* default */]); + + /***/ + }, + /* 461 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (React) { + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_router__ = __webpack_require__(13); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var Links = (function (_React$Component) { + _inherits(Links, _React$Component); + + function Links() { + _classCallCheck(this, Links); + + return _possibleConstructorReturn( + this, + (Links.__proto__ || Object.getPrototypeOf(Links)).apply(this, arguments), + ); + } + + _createClass(Links, [ + { + key: 'render', + + /** + * + */ + value: function render() { + var signInLocation = '/users/sign-in'; + var resetPasswordRequestLocation = '/users/reset-password-request'; + var resendConfirmationLocation = '/users/resend-confirmation'; + + return React.createElement( + 'div', + { className: 'col-md-offset-3 col-md-6 links' }, + React.createElement( + __WEBPACK_IMPORTED_MODULE_0_react_router__['f' /* Link */], + { href: signInLocation, to: signInLocation }, + '\u0412\u0445\u043E\u0434', + ), + ' ', + React.createElement('span', { className: 'separator' }, '|'), + ' ', + React.createElement( + __WEBPACK_IMPORTED_MODULE_0_react_router__['f' /* Link */], + { href: resetPasswordRequestLocation, to: resetPasswordRequestLocation }, + '\u0417\u0430\u0431\u044B\u043B\u0438 \u043F\u0430\u0440\u043E\u043B\u044C?', + ), + ' ', + React.createElement('span', { className: 'separator' }, '|'), + ' ', + React.createElement( + __WEBPACK_IMPORTED_MODULE_0_react_router__['f' /* Link */], + { href: resendConfirmationLocation, to: resendConfirmationLocation }, + '\u041D\u0435 \u043F\u0440\u0438\u0448\u043B\u043E \u043F\u0438\u0441\u044C\u043C\u043E?', + ), + ); + }, + }, + ]); + + return Links; + })(React.Component); + + /* harmony default export */ __webpack_exports__['a'] = Links; + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(1)); + + /***/ + }, + /* 462 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_immutable__ = __webpack_require__(18); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_immutable___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_immutable__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_validate_js__ = __webpack_require__(228); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_validate_js___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_validate_js__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_to_camel_case__ = __webpack_require__(227); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_to_camel_case___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_2_to_camel_case__, + ); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var AuthorFeedbackRecord = (function (_Immutable$Record) { + _inherits(AuthorFeedbackRecord, _Immutable$Record); + + function AuthorFeedbackRecord() { + _classCallCheck(this, AuthorFeedbackRecord); + + return _possibleConstructorReturn( + this, + (AuthorFeedbackRecord.__proto__ || Object.getPrototypeOf(AuthorFeedbackRecord)).apply( + this, + arguments, + ), + ); + } + + _createClass(AuthorFeedbackRecord, [ + { + key: 'getSenderEmailErrors', + + /** + * + */ + value: function getSenderEmailErrors() { + return this.get('errors').get('sender_email'); + }, + + /** + * + */ + }, + { + key: 'getMessageErrors', + value: function getMessageErrors() { + return this.get('errors').get('message'); + }, + + /** + * + */ + }, + { + key: 'assignAttributes', + value: function assignAttributes(attributes, validateAssigned) { + return this.withMutations(function (self) { + self.merge(attributes); + + // Skip assigned atributes validation unless it is required: + if (!validateAssigned) return; + + // Validate each assigned attribute and update its errors: + for (var attribute in attributes) { + if (attributes.hasOwnProperty(attribute)) { + var validatorMethodName = __WEBPACK_IMPORTED_MODULE_2_to_camel_case___default()( + 'validate_' + attribute, + ); + if (validatorMethodName in self) self[validatorMethodName](); + } + } + }); + }, + + /** + * Validates email attribute. + */ + }, + { + key: 'validateSenderEmail', + value: function validateSenderEmail() { + var constraints = { + presence: { + message: 'не может быть пустым', + }, + email: { + message: 'неверный формат', + }, + }; + + return this._validateAttribute('sender_email', constraints); + }, + + /** + * Validates name attribute. + */ + }, + { + key: 'validateMessage', + value: function validateMessage() { + var constraints = { + presence: { + message: 'не может быть пустым', + }, + }; + + return this._validateAttribute('message', constraints); + }, + + /** + * TODO: Move this method to mixin. + */ + }, + { + key: '_validateAttribute', + value: function _validateAttribute(attribute, constraints) { + var attributeErrors = __WEBPACK_IMPORTED_MODULE_1_validate_js___default.a.single( + this.get(attribute), + constraints, + ); + var validatedRecord = void 0; + + if (attributeErrors) { + validatedRecord = this.setIn( + ['errors', attribute], + __WEBPACK_IMPORTED_MODULE_0_immutable___default.a.fromJS(attributeErrors), + ); + } else { + validatedRecord = this.deleteIn(['errors', attribute]); + } + + return validatedRecord; + }, + }, + ]); + + return AuthorFeedbackRecord; + })( + __WEBPACK_IMPORTED_MODULE_0_immutable___default.a.Record({ + author_id: undefined, + sender_email: undefined, + use_current_user_email: undefined, + message: undefined, + errors: __WEBPACK_IMPORTED_MODULE_0_immutable___default.a.Map(), + }), + ); + + /* harmony default export */ __webpack_exports__['a'] = AuthorFeedbackRecord; + + /***/ + }, + /* 463 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_immutable__ = __webpack_require__(18); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_immutable___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_immutable__, + ); + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var RailsContextRecord = (function (_Immutable$Record) { + _inherits(RailsContextRecord, _Immutable$Record); + + function RailsContextRecord() { + _classCallCheck(this, RailsContextRecord); + + return _possibleConstructorReturn( + this, + (RailsContextRecord.__proto__ || Object.getPrototypeOf(RailsContextRecord)).apply( + this, + arguments, + ), + ); + } + + return RailsContextRecord; + })( + __WEBPACK_IMPORTED_MODULE_0_immutable___default.a.Record({ + host: undefined, + href: undefined, + appVersion: undefined, + authenticityToken: undefined, + httpAcceptLanguage: undefined, + i18nDefaultLocale: undefined, + i18nLocale: undefined, + inMailer: undefined, + location: undefined, + pathname: undefined, + port: undefined, + scheme: undefined, + search: undefined, + serverSide: undefined, + }), + ); + + /* harmony default export */ __webpack_exports__['a'] = RailsContextRecord; + + /***/ + }, + /* 464 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_immutable__ = __webpack_require__(18); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_immutable___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_immutable__, + ); + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var TagRecord = (function (_Immutable$Record) { + _inherits(TagRecord, _Immutable$Record); + + function TagRecord() { + _classCallCheck(this, TagRecord); + + return _possibleConstructorReturn( + this, + (TagRecord.__proto__ || Object.getPrototypeOf(TagRecord)).apply(this, arguments), + ); + } + + return TagRecord; + })( + __WEBPACK_IMPORTED_MODULE_0_immutable___default.a.Record({ + id: undefined, + name: undefined, + posts_count: undefined, + }), + ); + + /* harmony default export */ __webpack_exports__['a'] = TagRecord; + + /***/ + }, + /* 465 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_immutable__ = __webpack_require__(18); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_immutable___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_immutable__, + ); + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /** + * + */ + + var UIStateRecord = (function (_Immutable$Record) { + _inherits(UIStateRecord, _Immutable$Record); + + function UIStateRecord() { + _classCallCheck(this, UIStateRecord); + + return _possibleConstructorReturn( + this, + (UIStateRecord.__proto__ || Object.getPrototypeOf(UIStateRecord)).apply(this, arguments), + ); + } + + return UIStateRecord; + })( + __WEBPACK_IMPORTED_MODULE_0_immutable___default.a.Record({ + windowScrollTop: undefined, + headerWithoutBreadcrumbsHeight: undefined, + mainImageHeight: undefined, + breadcrumbsHeight: undefined, + }), + ); + + /* harmony default export */ __webpack_exports__['a'] = UIStateRecord; + + /***/ + }, + /* 466 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__constants_AuthorFeedbackConstants__ = + __webpack_require__(154); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_app_records_single_item_containers_AuthorFeedbackContainerRecord__ = + __webpack_require__(254); + /* harmony export (immutable) */ __webpack_exports__['a'] = authorFeedbackReducer; + + // Why name function the same as the reducer? + // https://github.com/gaearon/redux/issues/428#issuecomment-129223274 + // Naming the function will help with debugging! + function authorFeedbackReducer() { + var state = + arguments.length > 0 && arguments[0] !== undefined + ? arguments[0] + : new __WEBPACK_IMPORTED_MODULE_1_app_records_single_item_containers_AuthorFeedbackContainerRecord__[ + 'a' /* default */ + ](); + var action = arguments[1]; + var type = action.type; + + switch (type) { + case __WEBPACK_IMPORTED_MODULE_0__constants_AuthorFeedbackConstants__[ + 'b' /* BUILD_AUTHOR_FEEDBACK */ + ]: + return state.buildAuthorFeedback(action.attributes); + case __WEBPACK_IMPORTED_MODULE_0__constants_AuthorFeedbackConstants__[ + 'c' /* ASSIGN_AUTHOR_FEEDBACK_ATTRIBUTES */ + ]: + return state.assignAuthorFeedbackAttributes(action.attributes, action.validateAssigned); + case __WEBPACK_IMPORTED_MODULE_0__constants_AuthorFeedbackConstants__[ + 'd' /* ENTER_PENDING_AUTHOR_FEEDBACK_STATE */ + ]: + return state.enterPendingState(); + case __WEBPACK_IMPORTED_MODULE_0__constants_AuthorFeedbackConstants__[ + 'e' /* CREATE_AUTHOR_FEEDBACK_INVALIDATED */ + ]: + return state.withMutations(function (tmpState) { + tmpState.assignAuthorFeedbackAttributes({ errors: action.responseData.feedback.errors }); + tmpState.leavePendingState(); + }); + case __WEBPACK_IMPORTED_MODULE_0__constants_AuthorFeedbackConstants__[ + 'a' /* CREATE_AUTHOR_FEEDBACK_SUCCEED */ + ]: + return state.withMutations(function (tmpState) { + tmpState.assignAuthorFeedbackAttributes({ errors: {}, sender_email: '', message: '' }); + tmpState.leavePendingState(); + }); + case __WEBPACK_IMPORTED_MODULE_0__constants_AuthorFeedbackConstants__[ + 'f' /* REMOVE_AUTHOR_FEEDBACK */ + ]: + return state.deleteAuthorFeedback(); + default: + return state; + } + } + + /***/ + }, + /* 467 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_app_constants_SharedConstants__ = + __webpack_require__(110); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_app_constants_PostsConstants__ = + __webpack_require__(130); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_app_constants_CommentsConstants__ = + __webpack_require__(129); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_app_constants_CurrentUserConstants__ = + __webpack_require__(109); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_app_records_collections_AuthorsCollectionRecord__ = + __webpack_require__(73); + /* harmony export (immutable) */ __webpack_exports__['a'] = authorsReducer; + + // Why name function the same as the reducer? + // https://github.com/gaearon/redux/issues/428#issuecomment-129223274 + // Naming the function will help with debugging! + function authorsReducer() { + var state = + arguments.length > 0 && arguments[0] !== undefined + ? arguments[0] + : new __WEBPACK_IMPORTED_MODULE_4_app_records_collections_AuthorsCollectionRecord__[ + 'a' /* default */ + ](); + var action = arguments[1]; + var type = action.type; + + switch (type) { + case __WEBPACK_IMPORTED_MODULE_0_app_constants_SharedConstants__[ + 'a' /* BOOTSTRAP_POSTS_PAGE_DATA */ + ]: + return state.putAuthors(action.pageData.authors); + case __WEBPACK_IMPORTED_MODULE_1_app_constants_PostsConstants__['a' /* REQUEST_POSTS */]: + return state.enterPendingState(); + case __WEBPACK_IMPORTED_MODULE_1_app_constants_PostsConstants__['b' /* RECEIVE_POSTS */]: + return state.withMutations(function (tmpState) { + tmpState.putAuthors(action.json.authors); + tmpState.leavePendingState(); + }); + case __WEBPACK_IMPORTED_MODULE_0_app_constants_SharedConstants__[ + 'b' /* BOOTSTRAP_POST_PAGE_DATA */ + ]: + return state.putPage(action.pageData.authors, action.paginationKey); + case __WEBPACK_IMPORTED_MODULE_0_app_constants_SharedConstants__[ + 'c' /* ENTER_PENDING_POST_PAGE_DATA_STATE */ + ]: + return state.enterPendingState(); + case __WEBPACK_IMPORTED_MODULE_0_app_constants_SharedConstants__[ + 'd' /* SUCCEED_FETCH_POST_PAGE_DATA */ + ]: + return state.withMutations(function (tmpState) { + tmpState.putPage(action.pageData.authors, action.paginationKey); + tmpState.leavePendingState(); + }); + case __WEBPACK_IMPORTED_MODULE_0_app_constants_SharedConstants__[ + 'f' /* BOOTSTRAP_AUTHORS_PAGE_DATA */ + ]: + return state.putPage(action.pageData.authors, action.paginationKey); + case __WEBPACK_IMPORTED_MODULE_0_app_constants_SharedConstants__[ + 'g' /* ENTER_PENDING_AUTHORS_PAGE_DATA_STATE */ + ]: + return state.enterPendingState(); + case __WEBPACK_IMPORTED_MODULE_0_app_constants_SharedConstants__[ + 'h' /* SUCCEED_FETCH_AUTHORS_PAGE_DATA */ + ]: + return state.withMutations(function (tmpState) { + tmpState.putPage(action.pageData.authors, action.paginationKey); + tmpState.leavePendingState(); + }); + case __WEBPACK_IMPORTED_MODULE_0_app_constants_SharedConstants__[ + 'j' /* BOOTSTRAP_AUTHOR_PAGE_DATA */ + ]: + return state.putAuthor(action.pageData.author); + case __WEBPACK_IMPORTED_MODULE_2_app_constants_CommentsConstants__[ + 'a' /* CREATE_COMMENT_SUCCEED */ + ]: + return state.putAuthor(action.responseData.author); + /* eslint-disable no-case-declarations */ + case __WEBPACK_IMPORTED_MODULE_3_app_constants_CurrentUserConstants__[ + 'o' /* UPDATE_USER_SUCCEED */ + ]: + var authorMatchingToCurrentUser = state.getAuthor(action.responseData.current_user.id); + + if (authorMatchingToCurrentUser) { + return state.assignAuthorAttributes(action.responseData.current_user.id, { + avatar_thumb_url: action.responseData.current_user.avatar_thumb_url, + avatar_preview_url: action.responseData.current_user.avatar_preview_url, + }); + } + + return state; + /* eslint-enable no-case-declarations */ + default: + return state; + } + } + + /***/ + }, + /* 468 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__constants_CommentsConstants__ = + __webpack_require__(129); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_app_constants_SharedConstants__ = + __webpack_require__(110); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_app_records_collections_CommentsCollectionRecord__ = + __webpack_require__(112); + /* harmony export (immutable) */ __webpack_exports__['a'] = commentsReducer; + + // Why name function the same as the reducer? + // https://github.com/gaearon/redux/issues/428#issuecomment-129223274 + // Naming the function will help with debugging! + function commentsReducer() { + var state = + arguments.length > 0 && arguments[0] !== undefined + ? arguments[0] + : new __WEBPACK_IMPORTED_MODULE_2_app_records_collections_CommentsCollectionRecord__[ + 'a' /* default */ + ](); + var action = arguments[1]; + var type = action.type; + + switch (type) { + case __WEBPACK_IMPORTED_MODULE_0__constants_CommentsConstants__['b' /* BUILD_COMMENT */]: + return state.buildComment(action.attributes); + case __WEBPACK_IMPORTED_MODULE_0__constants_CommentsConstants__['c' /* REMOVE_TMP_COMMENT */]: + return state.deleteNewItem(action.commentTmpId); + case __WEBPACK_IMPORTED_MODULE_0__constants_CommentsConstants__[ + 'd' /* ASSIGN_COMMENT_ATTRIBUTES */ + ]: + return state.assignNewItemAttributes(action.tmpId, action.attributes, action.validateAssigned); + case __WEBPACK_IMPORTED_MODULE_0__constants_CommentsConstants__[ + 'e' /* ENTER_PENDING_COMMENT_STATE */ + ]: + return state.enterPendingState(); + case __WEBPACK_IMPORTED_MODULE_0__constants_CommentsConstants__[ + 'f' /* CREATE_COMMENT_INVALIDATED */ + ]: + return state.withMutations(function (tmpState) { + tmpState.assignNewItemAttributes(action.commentTmpId, { + errors: action.responseData.comment.errors, + }); + tmpState.leavePendingState(); + }); + case __WEBPACK_IMPORTED_MODULE_0__constants_CommentsConstants__['a' /* CREATE_COMMENT_SUCCEED */]: + return state.withMutations(function (tmpState) { + tmpState.assignNewItemAttributes(action.commentTmpId, { errors: {}, content: '' }); + tmpState.insertIdToPageMappingAfterParentId( + action.locationPathname, + '1', + action.responseData.comment.id, + action.responseData.comment.parent_id, + ); + tmpState.putComment(action.responseData.comment); + tmpState.leavePendingState(); + }); + case __WEBPACK_IMPORTED_MODULE_1_app_constants_SharedConstants__[ + 'b' /* BOOTSTRAP_POST_PAGE_DATA */ + ]: + return state.putPage(action.pageData.comments, action.paginationKey); + case __WEBPACK_IMPORTED_MODULE_1_app_constants_SharedConstants__[ + 'c' /* ENTER_PENDING_POST_PAGE_DATA_STATE */ + ]: + return state.enterPendingState(); + case __WEBPACK_IMPORTED_MODULE_1_app_constants_SharedConstants__[ + 'd' /* SUCCEED_FETCH_POST_PAGE_DATA */ + ]: + return state.withMutations(function (tmpState) { + tmpState.putPage(action.pageData.comments, action.paginationKey); + tmpState.leavePendingState(); + }); + default: + return state; + } + } + + /***/ + }, + /* 469 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_app_constants_CurrentUserConstants__ = + __webpack_require__(109); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_app_records_single_item_containers_CurrentUserContainerRecord__ = + __webpack_require__(39); + /* harmony export (immutable) */ __webpack_exports__['a'] = currentUserReducer; + + // Why name function the same as the reducer? + // https://github.com/gaearon/redux/issues/428#issuecomment-129223274 + // Naming the function will help with debugging! + function currentUserReducer() { + var state = + arguments.length > 0 && arguments[0] !== undefined + ? arguments[0] + : new __WEBPACK_IMPORTED_MODULE_1_app_records_single_item_containers_CurrentUserContainerRecord__[ + 'a' /* default */ + ](); + var action = arguments[1]; + var type = action.type; + + switch (type) { + case __WEBPACK_IMPORTED_MODULE_0_app_constants_CurrentUserConstants__[ + 'a' /* BOOTSTRAP_CURRENT_USER */ + ]: + return state.putCurrentUser(action.currentUser); + case __WEBPACK_IMPORTED_MODULE_0_app_constants_CurrentUserConstants__['b' /* BUILD_CURRENT_USER */]: + return state.buildCurrentUser(action.attributes); + case __WEBPACK_IMPORTED_MODULE_0_app_constants_CurrentUserConstants__['c' /* CLEAR_CURRENT_USER */]: + return state.deleteCurrentUser(); + case __WEBPACK_IMPORTED_MODULE_0_app_constants_CurrentUserConstants__[ + 'd' /* ROLLBACK_CURRENT_USER_TO_PERSISTENT_VERSION */ + ]: + return state.rollbackCurrentUserToPersistentVersion(); + case __WEBPACK_IMPORTED_MODULE_0_app_constants_CurrentUserConstants__[ + 'e' /* ASSIGN_CURRENT_USER_ATTRIBUTES */ + ]: + return state.assignCurrentUserAttributes(action.attributes, action.validateAssigned); + case __WEBPACK_IMPORTED_MODULE_0_app_constants_CurrentUserConstants__[ + 'f' /* ENTER_PENDING_CURRENT_USER_STATE */ + ]: + return state.enterPendingState(); + case __WEBPACK_IMPORTED_MODULE_0_app_constants_CurrentUserConstants__[ + 'g' /* SIGN_IN_CURRENT_USER_SUCCEED */ + ]: + return state.withMutations(function (tmpState) { + tmpState.putCurrentUser(action.currentUser); + tmpState.leavePendingState(); + }); + case __WEBPACK_IMPORTED_MODULE_0_app_constants_CurrentUserConstants__[ + 'h' /* SIGN_IN_CURRENT_USER_FAILED */ + ]: + return state.withMutations(function (tmpState) { + tmpState.setLoadError(action.loadError); + tmpState.leavePendingState(); + }); + case __WEBPACK_IMPORTED_MODULE_0_app_constants_CurrentUserConstants__[ + 'i' /* CLEAR_CURRENT_USER_LOAD_ERROR */ + ]: + return state.clearLoadError(); + case __WEBPACK_IMPORTED_MODULE_0_app_constants_CurrentUserConstants__[ + 'j' /* SIGN_OUT_CURRENT_USER_SUCCEED */ + ]: + return state.withMutations(function (tmpState) { + tmpState.deleteCurrentUser(); + tmpState.leavePendingState(); + }); + case __WEBPACK_IMPORTED_MODULE_0_app_constants_CurrentUserConstants__[ + 'm' /* CREATE_USER_INVALIDATED */ + ]: + return state.withMutations(function (tmpState) { + tmpState.buildCurrentUser(action.responseData.current_user); + tmpState.leavePendingState(); + }); + case __WEBPACK_IMPORTED_MODULE_0_app_constants_CurrentUserConstants__[ + 'o' /* UPDATE_USER_SUCCEED */ + ]: + return state.withMutations(function (tmpState) { + tmpState.putCurrentUser(action.responseData.current_user); + tmpState.leavePendingState(); + }); + case __WEBPACK_IMPORTED_MODULE_0_app_constants_CurrentUserConstants__[ + 'p' /* UPDATE_USER_INVALIDATED */ + ]: + return state.withMutations(function (tmpState) { + tmpState.cleanUpCurrentUserPasswords(); + tmpState.assignCurrentUserAttributes({ errors: action.responseData.current_user.errors }); + tmpState.leavePendingState(); + }); + case __WEBPACK_IMPORTED_MODULE_0_app_constants_CurrentUserConstants__[ + 's' /* RESET_USER_PASSWORD_REQUEST_INVALIDATED */ + ]: + return state.withMutations(function (tmpState) { + tmpState.assignCurrentUserAttributes({ errors: action.responseData.current_user.errors }); + tmpState.leavePendingState(); + }); + case __WEBPACK_IMPORTED_MODULE_0_app_constants_CurrentUserConstants__[ + 'u' /* RESET_USER_PASSWORD_SUCCEED */ + ]: + return state.withMutations(function (tmpState) { + tmpState.putCurrentUser(action.responseData.current_user); + tmpState.leavePendingState(); + }); + case __WEBPACK_IMPORTED_MODULE_0_app_constants_CurrentUserConstants__[ + 'v' /* RESET_USER_PASSWORD_INVALIDATED */ + ]: + return state.withMutations(function (tmpState) { + tmpState.assignCurrentUserAttributes({ errors: action.responseData.current_user.errors }); + tmpState.leavePendingState(); + }); + case __WEBPACK_IMPORTED_MODULE_0_app_constants_CurrentUserConstants__[ + 'y' /* RESEND_CONFIRMATION_INVALIDATED */ + ]: + return state.withMutations(function (tmpState) { + tmpState.assignCurrentUserAttributes({ errors: action.responseData.current_user.errors }); + tmpState.leavePendingState(); + }); + default: + return state; + } + } + + /***/ + }, + /* 470 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_app_constants_CurrentUserConstants__ = + __webpack_require__(109); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_app_constants_AuthorFeedbackConstants__ = + __webpack_require__(154); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__constants_FlashesConstants__ = + __webpack_require__(249); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_app_records_collections_FlashesCollectionRecord__ = + __webpack_require__(251); + /* harmony export (immutable) */ __webpack_exports__['a'] = flashesReducer; + + // Why name function the same as the reducer? + // https://github.com/gaearon/redux/issues/428#issuecomment-129223274 + // Naming the function will help with debugging! + function flashesReducer() { + var state = + arguments.length > 0 && arguments[0] !== undefined + ? arguments[0] + : new __WEBPACK_IMPORTED_MODULE_3_app_records_collections_FlashesCollectionRecord__[ + 'a' /* default */ + ](); + var action = arguments[1]; + var type = action.type; + + switch (type) { + case __WEBPACK_IMPORTED_MODULE_0_app_constants_CurrentUserConstants__[ + 'g' /* SIGN_IN_CURRENT_USER_SUCCEED */ + ]: + return state.buildFlash({ type: 'notice', message: 'Вход выполнен успешно!' }); + case __WEBPACK_IMPORTED_MODULE_0_app_constants_CurrentUserConstants__[ + 'j' /* SIGN_OUT_CURRENT_USER_SUCCEED */ + ]: + return state.buildFlash({ type: 'notice', message: 'Выход выполнен успешно!' }); + case __WEBPACK_IMPORTED_MODULE_0_app_constants_CurrentUserConstants__[ + 'l' /* CREATE_USER_SUCCEED */ + ]: + return state.buildFlash({ + type: 'notice', + message: + 'В течение нескольких минут вы получите письмо с инструкциями по подтверждению вашей учётной записи.', + }); + case __WEBPACK_IMPORTED_MODULE_0_app_constants_CurrentUserConstants__[ + 'o' /* UPDATE_USER_SUCCEED */ + ]: + return state.buildFlash({ + type: 'notice', + message: 'Ваша учётная запись успешно изменена.', + }); + case __WEBPACK_IMPORTED_MODULE_0_app_constants_CurrentUserConstants__[ + 'r' /* RESET_USER_PASSWORD_REQUEST_SUCCEED */ + ]: + return state.buildFlash({ + type: 'notice', + message: + 'В течение нескольких минут вы получите письмо с инструкциями по восстановлению вашего пароля.', + }); + case __WEBPACK_IMPORTED_MODULE_0_app_constants_CurrentUserConstants__[ + 'u' /* RESET_USER_PASSWORD_SUCCEED */ + ]: + return state.buildFlash({ + type: 'notice', + message: 'Ваш пароль успешно изменён. Теперь вы вошли в систему.', + }); + case __WEBPACK_IMPORTED_MODULE_0_app_constants_CurrentUserConstants__[ + 'x' /* RESEND_CONFIRMATION_SUCCEED */ + ]: + return state.buildFlash({ + type: 'notice', + message: + 'В течение нескольких минут вы получите письмо с инструкциями по подтверждению вашей учётной записи.', + }); + case __WEBPACK_IMPORTED_MODULE_1_app_constants_AuthorFeedbackConstants__[ + 'a' /* CREATE_AUTHOR_FEEDBACK_SUCCEED */ + ]: + return state.buildFlash({ + type: 'notice', + message: 'Ваше сообщение автору успешно отправлено.', + }); + case __WEBPACK_IMPORTED_MODULE_2__constants_FlashesConstants__['a' /* ADD_FLASH_MESSAGE */]: + return state.buildFlash(action.flash); + case __WEBPACK_IMPORTED_MODULE_2__constants_FlashesConstants__['b' /* REMOVE_FLASH_MESSAGE */]: + return state.deleteFlash(action.flash); + default: + return state; + } + } + + /***/ + }, + /* 471 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__constants_PostsConstants__ = + __webpack_require__(130); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_app_constants_SharedConstants__ = + __webpack_require__(110); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__constants_CommentsConstants__ = + __webpack_require__(129); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_app_records_collections_PostsCollectionRecord__ = + __webpack_require__(88); + /* harmony export (immutable) */ __webpack_exports__['a'] = postsReducer; + + // Why name function the same as the reducer? + // https://github.com/gaearon/redux/issues/428#issuecomment-129223274 + // Naming the function will help with debugging! + function postsReducer() { + var state = + arguments.length > 0 && arguments[0] !== undefined + ? arguments[0] + : new __WEBPACK_IMPORTED_MODULE_3_app_records_collections_PostsCollectionRecord__[ + 'a' /* default */ + ](); + var action = arguments[1]; + var type = action.type; + + switch (type) { + case __WEBPACK_IMPORTED_MODULE_1_app_constants_SharedConstants__[ + 'a' /* BOOTSTRAP_POSTS_PAGE_DATA */ + ]: + return state.putPage(action.pageData.posts, action.paginationKey); + case __WEBPACK_IMPORTED_MODULE_1_app_constants_SharedConstants__[ + 'b' /* BOOTSTRAP_POST_PAGE_DATA */ + ]: + return state.putPost(action.pageData.post); + case __WEBPACK_IMPORTED_MODULE_1_app_constants_SharedConstants__[ + 'c' /* ENTER_PENDING_POST_PAGE_DATA_STATE */ + ]: + return state.enterPendingState(); + case __WEBPACK_IMPORTED_MODULE_1_app_constants_SharedConstants__[ + 'd' /* SUCCEED_FETCH_POST_PAGE_DATA */ + ]: + return state.withMutations(function (tmpState) { + tmpState.putPost(action.pageData.post); + tmpState.leavePendingState(); + }); + case __WEBPACK_IMPORTED_MODULE_0__constants_PostsConstants__['a' /* REQUEST_POSTS */]: + return state.enterPendingState(); + case __WEBPACK_IMPORTED_MODULE_0__constants_PostsConstants__['b' /* RECEIVE_POSTS */]: + return state.withMutations(function (tmpState) { + tmpState.putPage(action.json.posts, action.paginationKey); + tmpState.leavePendingState(); + }); + /* eslint-disable no-case-declarations */ + case __WEBPACK_IMPORTED_MODULE_2__constants_CommentsConstants__['a' /* CREATE_COMMENT_SUCCEED */]: + var post = state.getPost(action.responseData.comment.post_id); + var prevCommentsCount = post.get('comments_count'); + return state.putPost(post.set('comments_count', prevCommentsCount + 1)); + /* eslint-enable no-case-declarations */ + default: + return state; + } + } + + /***/ + }, + /* 472 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_app_constants_CurrentUserConstants__ = + __webpack_require__(109); + /* harmony export (immutable) */ __webpack_exports__['a'] = railsContextReducer; + + // This will always get set + var initialState = {}; + + // Why name function the same as the reducer? + // https://github.com/gaearon/redux/issues/428#issuecomment-129223274 + // Naming the function will help with debugging! + function railsContextReducer() { + var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState; + var action = arguments[1]; + var type = action.type; + + switch (type) { + case __WEBPACK_IMPORTED_MODULE_0_app_constants_CurrentUserConstants__[ + 'g' /* SIGN_IN_CURRENT_USER_SUCCEED */ + ]: + case __WEBPACK_IMPORTED_MODULE_0_app_constants_CurrentUserConstants__[ + 'j' /* SIGN_OUT_CURRENT_USER_SUCCEED */ + ]: + return state.set('authenticityToken', action.authenticityToken); + default: + return state; + } + } + + /***/ + }, + /* 473 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_router_redux__ = __webpack_require__(835); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_router_redux___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react_router_redux__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__currentUserReducer__ = __webpack_require__(469); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__railsContextReducer__ = __webpack_require__(472); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__postsReducer__ = __webpack_require__(471); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__commentsReducer__ = __webpack_require__(468); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__authorsReducer__ = __webpack_require__(467); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__authorFeedbackReducer__ = + __webpack_require__(466); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__tagsReducer__ = __webpack_require__(474); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__flashesReducer__ = __webpack_require__(470); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__uiStateReducer__ = __webpack_require__(475); + + // This is how you do a directory of reducers. + // The `import * as reducers` does not work for a directory, but only with a single file + /* harmony default export */ __webpack_exports__['a'] = { + railsContext: __WEBPACK_IMPORTED_MODULE_2__railsContextReducer__['a' /* default */], + currentUserContainer: __WEBPACK_IMPORTED_MODULE_1__currentUserReducer__['a' /* default */], + posts: __WEBPACK_IMPORTED_MODULE_3__postsReducer__['a' /* default */], + comments: __WEBPACK_IMPORTED_MODULE_4__commentsReducer__['a' /* default */], + authors: __WEBPACK_IMPORTED_MODULE_5__authorsReducer__['a' /* default */], + authorFeedback: __WEBPACK_IMPORTED_MODULE_6__authorFeedbackReducer__['a' /* default */], + tags: __WEBPACK_IMPORTED_MODULE_7__tagsReducer__['a' /* default */], + flashes: __WEBPACK_IMPORTED_MODULE_8__flashesReducer__['a' /* default */], + routing: __WEBPACK_IMPORTED_MODULE_0_react_router_redux__['routerReducer'], + uiState: __WEBPACK_IMPORTED_MODULE_9__uiStateReducer__['a' /* default */], + }; + + /***/ + }, + /* 474 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_app_constants_SharedConstants__ = + __webpack_require__(110); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_app_constants_PostsConstants__ = + __webpack_require__(130); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_app_records_collections_TagsCollectionRecord__ = + __webpack_require__(89); + /* harmony export (immutable) */ __webpack_exports__['a'] = tagsReducer; + + // Why name function the same as the reducer? + // https://github.com/gaearon/redux/issues/428#issuecomment-129223274 + // Naming the function will help with debugging! + function tagsReducer() { + var state = + arguments.length > 0 && arguments[0] !== undefined + ? arguments[0] + : new __WEBPACK_IMPORTED_MODULE_2_app_records_collections_TagsCollectionRecord__[ + 'a' /* default */ + ](); + var action = arguments[1]; + var type = action.type; + + switch (type) { + case __WEBPACK_IMPORTED_MODULE_0_app_constants_SharedConstants__[ + 'a' /* BOOTSTRAP_POSTS_PAGE_DATA */ + ]: + return state.putPage(action.pageData.tags, action.paginationKey); + case __WEBPACK_IMPORTED_MODULE_1_app_constants_PostsConstants__['a' /* REQUEST_POSTS */]: + return state.enterPendingState(); + case __WEBPACK_IMPORTED_MODULE_1_app_constants_PostsConstants__['b' /* RECEIVE_POSTS */]: + return state.withMutations(function (tmpState) { + tmpState.putPage(action.json.tags, action.paginationKey); + tmpState.leavePendingState(); + }); + case __WEBPACK_IMPORTED_MODULE_0_app_constants_SharedConstants__[ + 'b' /* BOOTSTRAP_POST_PAGE_DATA */ + ]: + return state.putTags(action.pageData.tags); + case __WEBPACK_IMPORTED_MODULE_0_app_constants_SharedConstants__[ + 'c' /* ENTER_PENDING_POST_PAGE_DATA_STATE */ + ]: + return state.enterPendingState(); + case __WEBPACK_IMPORTED_MODULE_0_app_constants_SharedConstants__[ + 'd' /* SUCCEED_FETCH_POST_PAGE_DATA */ + ]: + return state.withMutations(function (tmpState) { + tmpState.putTags(action.pageData.tags); + tmpState.leavePendingState(); + }); + case __WEBPACK_IMPORTED_MODULE_0_app_constants_SharedConstants__[ + 'j' /* BOOTSTRAP_AUTHOR_PAGE_DATA */ + ]: + return state.putPage(action.pageData.tags, action.paginationKey); + case __WEBPACK_IMPORTED_MODULE_0_app_constants_SharedConstants__[ + 'l' /* SUCCEED_FETCH_AUTHOR_PAGE_DATA */ + ]: + return state.withMutations(function (tmpState) { + tmpState.putPage(action.pageData.tags, action.paginationKey); + tmpState.leavePendingState(); + }); + default: + return state; + } + } + + /***/ + }, + /* 475 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__constants_UIStateConstants__ = + __webpack_require__(250); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_app_records_entities_UIStateRecord__ = + __webpack_require__(465); + /* harmony export (immutable) */ __webpack_exports__['a'] = uiStateReducer; + + // Why name function the same as the reducer? + // https://github.com/gaearon/redux/issues/428#issuecomment-129223274 + // Naming the function will help with debugging! + function uiStateReducer() { + var state = + arguments.length > 0 && arguments[0] !== undefined + ? arguments[0] + : new __WEBPACK_IMPORTED_MODULE_1_app_records_entities_UIStateRecord__['a' /* default */](); + var action = arguments[1]; + var type = action.type; + + switch (type) { + case __WEBPACK_IMPORTED_MODULE_0__constants_UIStateConstants__['a' /* WINDOW_SCROLLED */]: + return state.set('windowScrollTop', action.windowScrollTop); + case __WEBPACK_IMPORTED_MODULE_0__constants_UIStateConstants__[ + 'b' /* HEADER_WIHOUT_BREADCRUMBS_RESIZED */ + ]: + return state.set('headerWithoutBreadcrumbsHeight', action.headerWithoutBreadcrumbsHeight); + case __WEBPACK_IMPORTED_MODULE_0__constants_UIStateConstants__['c' /* MAIN_IMAGE_RESIZED */]: + return state.set('mainImageHeight', action.mainImageHeight); + case __WEBPACK_IMPORTED_MODULE_0__constants_UIStateConstants__['d' /* BREADCRUMBS_RESIZED */]: + return state.set('breadcrumbsHeight', action.breadcrumbsHeight); + default: + return state; + } + } + + /***/ + }, + /* 476 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (React) { + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_router__ = __webpack_require__(13); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_redux__ = __webpack_require__(6); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__routes__ = __webpack_require__(477); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_react_helmet__ = __webpack_require__(44); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_react_helmet___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_3_react_helmet__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react_dom_server__ = __webpack_require__(218); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react_dom_server___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react_dom_server__); + + /** + * + */ + /* harmony default export */ __webpack_exports__['a'] = function (props, railsContext) { + // bootstrapStores(props, railsContext); + + var error = void 0; + var redirectLocation = void 0; + var routeProps = void 0; + + var location = railsContext.location; + + // See https://github.com/reactjs/react-router/blob/master/docs/guides/ServerRendering.md + + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0_react_router__['b' /* match */])( + { routes: __WEBPACK_IMPORTED_MODULE_2__routes__['a' /* default */], location: location }, + function (_error, _redirectLocation, _routeProps) { + error = _error; + redirectLocation = _redirectLocation; + routeProps = _routeProps; + }, + ); + + // This tell react_on_rails to skip server rendering any HTML. Note, client rendering + // will handle the redirect. What's key is that we don't try to render. + // Critical to return the Object properties to match this { error, redirectLocation } + if (error || redirectLocation) { + return { error: error, redirectLocation: redirectLocation }; + } + + // This is where we get the existing store. + var store = ReactOnRails.getStore('Store'); + + var componentHtml = __WEBPACK_IMPORTED_MODULE_4_react_dom_server___default.a.renderToString( + React.createElement( + __WEBPACK_IMPORTED_MODULE_1_react_redux__['a' /* Provider */], + { store: store }, + React.createElement( + __WEBPACK_IMPORTED_MODULE_0_react_router__['c' /* RouterContext */], + routeProps, + ), + ), + ); + + var helmet = __WEBPACK_IMPORTED_MODULE_3_react_helmet__['Helmet'].renderStatic(); + + // See https://github.com/shakacode/react_on_rails/blob/master/docs/additional-reading/react-helmet.md for details: + var renderedHtml = { + componentHtml: componentHtml, + title: helmet.title.toString(), + meta: helmet.meta.toString(), + }; + + return { renderedHtml: renderedHtml }; + }; + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(1)); + + /***/ + }, + /* 477 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (React) { + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_router__ = __webpack_require__(13); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_app_components_Layout__ = + __webpack_require__(384); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_app_components_route_handlers_PostsHandler__ = + __webpack_require__(442); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_app_components_route_handlers_PostsBreadcrumbsHandler__ = + __webpack_require__(441); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_app_components_route_handlers_PostHandler__ = + __webpack_require__(440); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_app_components_route_handlers_PostBreadcrumbsHandler__ = + __webpack_require__(439); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_app_components_route_handlers_AuthorsHandler__ = + __webpack_require__(436); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_app_components_route_handlers_AuthorsBreadcrumbsHandler__ = + __webpack_require__(435); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_app_components_route_handlers_AuthorHandler__ = + __webpack_require__(434); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_app_components_route_handlers_AuthorBreadcrumbsHandler__ = + __webpack_require__(433); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_app_components_route_handlers_SignInHandler__ = + __webpack_require__(450); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_11_app_components_route_handlers_SignInBreadcrumbsHandler__ = + __webpack_require__(449); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_12_app_components_route_handlers_SignUpHandler__ = + __webpack_require__(452); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_13_app_components_route_handlers_SignUpBreadcrumbsHandler__ = + __webpack_require__(451); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_14_app_components_route_handlers_ResetPasswordRequestHandler__ = + __webpack_require__(448); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_15_app_components_route_handlers_ResetPasswordRequestBreadcrumbsHandler__ = + __webpack_require__(447); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_16_app_components_route_handlers_ResetPasswordHandler__ = + __webpack_require__(446); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_17_app_components_route_handlers_ResetPasswordBreadcrumbsHandler__ = + __webpack_require__(445); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_18_app_components_route_handlers_ResendConfirmationHandler__ = + __webpack_require__(444); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_19_app_components_route_handlers_ResendConfirmationBreadcrumbsHandler__ = + __webpack_require__(443); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_20_app_components_route_handlers_CurrentUserHandler__ = + __webpack_require__(438); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_21_app_components_route_handlers_CurrentUserBreadcrumbsHandler__ = + __webpack_require__(437); + + /** + * + */ + /* harmony default export */ __webpack_exports__['a'] = React.createElement( + __WEBPACK_IMPORTED_MODULE_0_react_router__['d' /* Route */], + { path: '/', component: __WEBPACK_IMPORTED_MODULE_1_app_components_Layout__['a' /* default */] }, + React.createElement(__WEBPACK_IMPORTED_MODULE_0_react_router__['e' /* IndexRoute */], { + components: { + breadcrumbsComponent: + __WEBPACK_IMPORTED_MODULE_3_app_components_route_handlers_PostsBreadcrumbsHandler__[ + 'a' /* default */ + ], + contentComponent: + __WEBPACK_IMPORTED_MODULE_2_app_components_route_handlers_PostsHandler__['a' /* default */], + }, + }), + React.createElement(__WEBPACK_IMPORTED_MODULE_0_react_router__['d' /* Route */], { + path: '/posts/:id', + components: { + breadcrumbsComponent: + __WEBPACK_IMPORTED_MODULE_5_app_components_route_handlers_PostBreadcrumbsHandler__[ + 'a' /* default */ + ], + contentComponent: + __WEBPACK_IMPORTED_MODULE_4_app_components_route_handlers_PostHandler__['a' /* default */], + }, + }), + React.createElement(__WEBPACK_IMPORTED_MODULE_0_react_router__['d' /* Route */], { + path: '/authors', + components: { + breadcrumbsComponent: + __WEBPACK_IMPORTED_MODULE_7_app_components_route_handlers_AuthorsBreadcrumbsHandler__[ + 'a' /* default */ + ], + contentComponent: + __WEBPACK_IMPORTED_MODULE_6_app_components_route_handlers_AuthorsHandler__['a' /* default */], + }, + }), + React.createElement(__WEBPACK_IMPORTED_MODULE_0_react_router__['d' /* Route */], { + path: '/authors/:id', + components: { + breadcrumbsComponent: + __WEBPACK_IMPORTED_MODULE_9_app_components_route_handlers_AuthorBreadcrumbsHandler__[ + 'a' /* default */ + ], + contentComponent: + __WEBPACK_IMPORTED_MODULE_8_app_components_route_handlers_AuthorHandler__['a' /* default */], + }, + }), + React.createElement(__WEBPACK_IMPORTED_MODULE_0_react_router__['d' /* Route */], { + path: '/users/sign-in', + components: { + breadcrumbsComponent: + __WEBPACK_IMPORTED_MODULE_11_app_components_route_handlers_SignInBreadcrumbsHandler__[ + 'a' /* default */ + ], + contentComponent: + __WEBPACK_IMPORTED_MODULE_10_app_components_route_handlers_SignInHandler__['a' /* default */], + }, + }), + React.createElement(__WEBPACK_IMPORTED_MODULE_0_react_router__['d' /* Route */], { + path: '/users/sign-up', + components: { + breadcrumbsComponent: + __WEBPACK_IMPORTED_MODULE_13_app_components_route_handlers_SignUpBreadcrumbsHandler__[ + 'a' /* default */ + ], + contentComponent: + __WEBPACK_IMPORTED_MODULE_12_app_components_route_handlers_SignUpHandler__['a' /* default */], + }, + }), + React.createElement(__WEBPACK_IMPORTED_MODULE_0_react_router__['d' /* Route */], { + path: '/users/reset-password-request', + components: { + breadcrumbsComponent: + __WEBPACK_IMPORTED_MODULE_15_app_components_route_handlers_ResetPasswordRequestBreadcrumbsHandler__[ + 'a' /* default */ + ], + contentComponent: + __WEBPACK_IMPORTED_MODULE_14_app_components_route_handlers_ResetPasswordRequestHandler__[ + 'a' /* default */ + ], + }, + }), + React.createElement(__WEBPACK_IMPORTED_MODULE_0_react_router__['d' /* Route */], { + path: '/users/reset-password', + components: { + breadcrumbsComponent: + __WEBPACK_IMPORTED_MODULE_17_app_components_route_handlers_ResetPasswordBreadcrumbsHandler__[ + 'a' /* default */ + ], + contentComponent: + __WEBPACK_IMPORTED_MODULE_16_app_components_route_handlers_ResetPasswordHandler__[ + 'a' /* default */ + ], + }, + }), + React.createElement(__WEBPACK_IMPORTED_MODULE_0_react_router__['d' /* Route */], { + path: '/users/resend-confirmation', + components: { + breadcrumbsComponent: + __WEBPACK_IMPORTED_MODULE_19_app_components_route_handlers_ResendConfirmationBreadcrumbsHandler__[ + 'a' /* default */ + ], + contentComponent: + __WEBPACK_IMPORTED_MODULE_18_app_components_route_handlers_ResendConfirmationHandler__[ + 'a' /* default */ + ], + }, + }), + React.createElement(__WEBPACK_IMPORTED_MODULE_0_react_router__['d' /* Route */], { + path: '/users/current', + components: { + breadcrumbsComponent: + __WEBPACK_IMPORTED_MODULE_21_app_components_route_handlers_CurrentUserBreadcrumbsHandler__[ + 'a' /* default */ + ], + contentComponent: + __WEBPACK_IMPORTED_MODULE_20_app_components_route_handlers_CurrentUserHandler__[ + 'a' /* default */ + ], + }, + }), + ); + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(1)); + + /***/ + }, + /* 478 */ + /***/ function (module, exports, __webpack_require__) { + var React = __webpack_require__(1); + + function BionicWorkshop(props) { + return React.createElement('svg', props, [ + React.createElement( + 'metadata', + { key: 0 }, + '\nCreated by potrace 1.10, written by Peter Selinger 2001-2011\n', + ), + React.createElement( + 'g', + { + transform: 'translate(0.000000,36.000000) scale(0.100000,-0.100000)', + fill: '#000000', + stroke: 'none', + key: 1, + }, + [ + React.createElement('path', { + d: 'M32 343 c-17 -3 -22 -9 -17 -21 14 -33 17 -141 6 -173 -6 -18 -8 -35\n-5 -38 3 -3 41 -5 85 -5 109 2 148 29 119 82 -5 9 -12 43 -15 75 -5 41 -12 60\n-25 67 -22 12 -116 20 -148 13z m135 -49 c14 -37 -68 -66 -90 -32 -8 12 -7 20\n2 32 18 21 80 21 88 0z m7 -116 c20 -29 9 -39 -43 -40 -52 -1 -67 12 -52 41\n16 30 74 29 95 -1z', + key: 0, + }), + React.createElement('path', { + d: 'M1325 338 c2 -7 9 -47 14 -89 9 -76 35 -149 53 -149 5 0 17 18 25 40\n19 49 43 50 55 2 7 -25 14 -32 32 -32 22 0 25 6 35 73 7 39 16 89 22 110 13\n47 6 57 -37 57 -37 0 -43 -13 -18 -41 11 -12 14 -27 10 -44 -8 -32 -30 -32\n-44 0 -15 34 -38 32 -57 -5 -18 -35 -21 -36 -35 -10 -8 15 -7 27 5 50 9 17 13\n35 10 40 -9 15 -75 13 -70 -2z m173 -128 c7 0 12 -14 12 -32 l0 -33 -26 33\nc-31 39 -46 40 -73 5 -23 -29 -25 -28 -35 5 -6 17 -3 22 12 22 10 0 27 9 37\n20 l18 20 22 -20 c12 -11 27 -20 33 -20z', + key: 1, + }), + React.createElement('path', { + d: 'M1970 347 c0 -2 7 -19 16 -37 17 -32 15 -127 -2 -188 -6 -21 -4 -23\n17 -20 16 2 25 11 27 26 5 30 36 29 59 -4 15 -20 26 -25 53 -22 29 2 32 5 20\n15 -8 7 -31 26 -50 42 l-35 30 34 34 c32 34 32 36 13 46 -16 8 -25 6 -47 -11\n-33 -25 -43 -17 -47 42 -3 41 -6 45 -30 48 -16 2 -28 1 -28 -1z m80 -153 c0\n-8 -4 -14 -10 -14 -5 0 -10 9 -10 21 0 11 5 17 10 14 6 -3 10 -13 10 -21z', + key: 2, + }), + React.createElement('path', { + d: 'M2357 323 c4 -15 8 -71 7 -124 l-1 -96 29 -1 c29 -1 39 23 18 44 -14\n14 -1 70 21 90 26 23 67 11 75 -22 4 -14 2 -42 -4 -62 -13 -40 -5 -56 24 -50\n16 3 18 11 16 53 -2 28 -11 66 -20 85 -15 30 -22 35 -54 36 -42 1 -65 16 -70\n47 -2 14 -11 23 -26 25 -21 3 -22 1 -15 -25z', + key: 3, + }), + React.createElement('path', { + d: 'M276 326 c7 -19 38 -22 32 -3 -3 6 -12 13 -21 15 -12 2 -15 -1 -11\n-12z', + key: 4, + }), + React.createElement('path', { + d: 'M842 328 c6 -18 28 -21 28 -4 0 9 -7 16 -16 16 -9 0 -14 -5 -12 -12z', + key: 5, + }), + React.createElement('path', { + d: 'M240 270 c0 -6 11 -21 25 -33 21 -19 24 -28 19 -60 -5 -28 -13 -41\n-30 -48 -47 -17 -24 -28 51 -25 76 3 103 11 69 21 -42 14 -49 23 -55 71 -8 70\n-17 84 -50 84 -16 0 -29 -5 -29 -10z', + key: 6, + }), + React.createElement('path', { + d: 'M434 272 c-39 -27 -56 -100 -31 -133 32 -41 83 -47 145 -15 50 26 54\n75 11 129 -17 22 -28 27 -67 27 -26 0 -52 -4 -58 -8z m90 -32 c21 -8 26 -16\n26 -43 0 -41 -15 -57 -55 -57 -33 0 -75 31 -75 55 0 21 37 55 59 55 11 0 31\n-4 45 -10z', + key: 7, + }), + React.createElement('path', { + d: 'M605 190 l0 -90 28 0 c29 0 35 17 16 51 -27 52 34 126 80 97 26 -16\n32 -44 21 -93 -13 -55 -13 -55 15 -55 28 0 30 15 16 104 -11 64 -29 76 -110\n76 l-66 0 0 -90z', + key: 8, + }), + React.createElement('path', { + d: 'M806 271 c-3 -5 5 -16 19 -25 15 -10 25 -26 25 -41 0 -36 -18 -75\n-35 -75 -8 0 -15 -6 -15 -14 0 -12 45 -14 138 -7 23 2 12 21 -13 21 -29 0 -45\n26 -45 75 0 20 -5 45 -10 56 -11 19 -54 26 -64 10z', + key: 9, + }), + React.createElement('path', { + d: 'M1033 273 c-62 -8 -95 -94 -54 -144 32 -39 171 -39 171 1 0 5 -16 4\n-36 -1 -69 -20 -131 14 -119 64 4 15 13 31 21 38 20 16 82 14 103 -5 25 -23\n43 0 23 31 -9 14 -65 22 -109 16z', + key: 10, + }), + React.createElement('path', { + d: 'M1623 265 c-13 -9 -28 -33 -34 -55 -10 -33 -9 -43 5 -65 21 -32 58\n-47 99 -40 78 13 108 74 67 140 -20 32 -26 35 -69 35 -26 0 -56 -7 -68 -15z\nm113 -36 c17 -14 10 -69 -10 -81 -20 -13 -69 -8 -88 9 -41 37 -7 99 50 89 19\n-3 40 -10 48 -17z', + key: 11, + }), + React.createElement('path', { + d: 'M1868 273 c-69 -4 -80 -11 -53 -33 25 -21 14 -91 -18 -111 -27 -18\n42 -29 126 -20 20 2 3 21 -25 29 -65 16 -41 95 32 107 24 4 39 12 37 18 -4 14\n-10 14 -99 10z', + key: 12, + }), + React.createElement('path', { + d: 'M2203 268 c-47 -23 -20 -65 55 -87 44 -12 48 -17 33 -40 -9 -13 -37\n-12 -88 4 -19 6 -23 4 -23 -13 0 -23 34 -32 100 -28 43 3 70 24 70 53 0 21\n-38 53 -62 53 -36 0 -56 16 -40 32 10 10 19 10 44 0 35 -13 55 -3 45 22 -8 19\n-98 21 -134 4z', + key: 13, + }), + React.createElement('path', { + d: 'M2593 265 c-31 -21 -46 -81 -30 -114 26 -54 105 -64 161 -20 33 26\n35 78 5 120 -17 25 -27 29 -67 29 -27 0 -57 -7 -69 -15z m113 -36 c35 -29 5\n-89 -44 -89 -61 0 -91 52 -55 93 19 21 72 19 99 -4z', + key: 14, + }), + React.createElement('path', { + d: 'M2793 273 c-22 -4 -31 -27 -15 -37 15 -9 14 -142 -2 -180 -8 -20 -12\n-36 -8 -37 4 0 24 -2 44 -5 45 -5 55 8 26 36 -33 31 -14 53 51 62 84 10 124\n67 91 128 -18 33 -106 49 -187 33z m135 -43 c12 -12 22 -32 22 -45 0 -19 -7\n-26 -32 -33 -47 -13 -88 9 -88 47 0 23 6 32 28 39 39 15 46 14 70 -8z', + key: 15, + }), + ], + ), + ]); + } + + BionicWorkshop.displayName = 'BionicWorkshop'; + + BionicWorkshop.defaultProps = { + version: '1.0', + width: '300.000000pt', + height: '36.000000pt', + viewBox: '0 0 300.000000 36.000000', + preserveAspectRatio: 'xMidYMid meet', + }; + + module.exports = BionicWorkshop; + + BionicWorkshop.default = BionicWorkshop; + + /***/ + }, + /* 479 */ + /***/ function (module, exports, __webpack_require__) { + /* WEBPACK VAR INJECTION */ (function (global, process) { + /** + * Copyright (c) 2014, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * https://raw.github.com/facebook/regenerator/master/LICENSE file. An + * additional grant of patent rights can be found in the PATENTS file in + * the same directory. + */ + + !(function (global) { + 'use strict'; + + var hasOwn = Object.prototype.hasOwnProperty; + var undefined; // More compressible than void 0. + var $Symbol = typeof Symbol === 'function' ? Symbol : {}; + var iteratorSymbol = $Symbol.iterator || '@@iterator'; + var toStringTagSymbol = $Symbol.toStringTag || '@@toStringTag'; + + var inModule = typeof module === 'object'; + var runtime = global.regeneratorRuntime; + if (runtime) { + if (inModule) { + // If regeneratorRuntime is defined globally and we're in a module, + // make the exports object identical to regeneratorRuntime. + module.exports = runtime; + } + // Don't bother evaluating the rest of this file if the runtime was + // already defined globally. + return; + } + + // Define the runtime globally (as expected by generated code) as either + // module.exports (if we're in a module) or a new, empty object. + runtime = global.regeneratorRuntime = inModule ? module.exports : {}; + + function wrap(innerFn, outerFn, self, tryLocsList) { + // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator. + var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator; + var generator = Object.create(protoGenerator.prototype); + var context = new Context(tryLocsList || []); + + // The ._invoke method unifies the implementations of the .next, + // .throw, and .return methods. + generator._invoke = makeInvokeMethod(innerFn, self, context); + + return generator; + } + runtime.wrap = wrap; + + // Try/catch helper to minimize deoptimizations. Returns a completion + // record like context.tryEntries[i].completion. This interface could + // have been (and was previously) designed to take a closure to be + // invoked without arguments, but in all the cases we care about we + // already have an existing method we want to call, so there's no need + // to create a new function object. We can even get away with assuming + // the method takes exactly one argument, since that happens to be true + // in every case, so we don't have to touch the arguments object. The + // only additional allocation required is the completion record, which + // has a stable shape and so hopefully should be cheap to allocate. + function tryCatch(fn, obj, arg) { + try { + return { type: 'normal', arg: fn.call(obj, arg) }; + } catch (err) { + return { type: 'throw', arg: err }; + } + } + + var GenStateSuspendedStart = 'suspendedStart'; + var GenStateSuspendedYield = 'suspendedYield'; + var GenStateExecuting = 'executing'; + var GenStateCompleted = 'completed'; + + // Returning this object from the innerFn has the same effect as + // breaking out of the dispatch switch statement. + var ContinueSentinel = {}; + + // Dummy constructor functions that we use as the .constructor and + // .constructor.prototype properties for functions that return Generator + // objects. For full spec compliance, you may wish to configure your + // minifier not to mangle the names of these two functions. + function Generator() {} + function GeneratorFunction() {} + function GeneratorFunctionPrototype() {} + + var Gp = (GeneratorFunctionPrototype.prototype = Generator.prototype); + GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype; + GeneratorFunctionPrototype.constructor = GeneratorFunction; + GeneratorFunctionPrototype[toStringTagSymbol] = GeneratorFunction.displayName = 'GeneratorFunction'; + + // Helper for defining the .next, .throw, and .return methods of the + // Iterator interface in terms of a single ._invoke method. + function defineIteratorMethods(prototype) { + ['next', 'throw', 'return'].forEach(function (method) { + prototype[method] = function (arg) { + return this._invoke(method, arg); + }; + }); + } + + runtime.isGeneratorFunction = function (genFun) { + var ctor = typeof genFun === 'function' && genFun.constructor; + return ctor + ? ctor === GeneratorFunction || + // For the native GeneratorFunction constructor, the best we can + // do is to check its .name property. + (ctor.displayName || ctor.name) === 'GeneratorFunction' + : false; + }; + + runtime.mark = function (genFun) { + if (Object.setPrototypeOf) { + Object.setPrototypeOf(genFun, GeneratorFunctionPrototype); + } else { + genFun.__proto__ = GeneratorFunctionPrototype; + if (!(toStringTagSymbol in genFun)) { + genFun[toStringTagSymbol] = 'GeneratorFunction'; + } + } + genFun.prototype = Object.create(Gp); + return genFun; + }; + + // Within the body of any async function, `await x` is transformed to + // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test + // `value instanceof AwaitArgument` to determine if the yielded value is + // meant to be awaited. Some may consider the name of this method too + // cutesy, but they are curmudgeons. + runtime.awrap = function (arg) { + return new AwaitArgument(arg); + }; + + function AwaitArgument(arg) { + this.arg = arg; + } + + function AsyncIterator(generator) { + function invoke(method, arg, resolve, reject) { + var record = tryCatch(generator[method], generator, arg); + if (record.type === 'throw') { + reject(record.arg); + } else { + var result = record.arg; + var value = result.value; + if (value instanceof AwaitArgument) { + return Promise.resolve(value.arg).then( + function (value) { + invoke('next', value, resolve, reject); + }, + function (err) { + invoke('throw', err, resolve, reject); + }, + ); + } + + return Promise.resolve(value).then(function (unwrapped) { + // When a yielded Promise is resolved, its final value becomes + // the .value of the Promise<{value,done}> result for the + // current iteration. If the Promise is rejected, however, the + // result for this iteration will be rejected with the same + // reason. Note that rejections of yielded Promises are not + // thrown back into the generator function, as is the case + // when an awaited Promise is rejected. This difference in + // behavior between yield and await is important, because it + // allows the consumer to decide what to do with the yielded + // rejection (swallow it and continue, manually .throw it back + // into the generator, abandon iteration, whatever). With + // await, by contrast, there is no opportunity to examine the + // rejection reason outside the generator function, so the + // only option is to throw it from the await expression, and + // let the generator function handle the exception. + result.value = unwrapped; + resolve(result); + }, reject); + } + } + + if (typeof process === 'object' && process.domain) { + invoke = process.domain.bind(invoke); + } + + var previousPromise; + + function enqueue(method, arg) { + function callInvokeWithMethodAndArg() { + return new Promise(function (resolve, reject) { + invoke(method, arg, resolve, reject); + }); + } + + return (previousPromise = + // If enqueue has been called before, then we want to wait until + // all previous Promises have been resolved before calling invoke, + // so that results are always delivered in the correct order. If + // enqueue has not been called before, then it is important to + // call invoke immediately, without waiting on a callback to fire, + // so that the async generator function has the opportunity to do + // any necessary setup in a predictable way. This predictability + // is why the Promise constructor synchronously invokes its + // executor callback, and why async functions synchronously + // execute code before the first await. Since we implement simple + // async functions in terms of async generators, it is especially + // important to get this right, even though it requires care. + previousPromise + ? previousPromise.then( + callInvokeWithMethodAndArg, + // Avoid propagating failures to Promises returned by later + // invocations of the iterator. + callInvokeWithMethodAndArg, + ) + : callInvokeWithMethodAndArg()); + } + + // Define the unified helper method that is used to implement .next, + // .throw, and .return (see defineIteratorMethods). + this._invoke = enqueue; + } + + defineIteratorMethods(AsyncIterator.prototype); + + // Note that simple async functions are implemented on top of + // AsyncIterator objects; they just return a Promise for the value of + // the final result produced by the iterator. + runtime.async = function (innerFn, outerFn, self, tryLocsList) { + var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList)); + + return runtime.isGeneratorFunction(outerFn) + ? iter // If outerFn is a generator, return the full iterator. + : iter.next().then(function (result) { + return result.done ? result.value : iter.next(); + }); + }; + + function makeInvokeMethod(innerFn, self, context) { + var state = GenStateSuspendedStart; + + return function invoke(method, arg) { + if (state === GenStateExecuting) { + throw new Error('Generator is already running'); + } + + if (state === GenStateCompleted) { + if (method === 'throw') { + throw arg; + } + + // Be forgiving, per 25.3.3.3.3 of the spec: + // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume + return doneResult(); + } + + while (true) { + var delegate = context.delegate; + if (delegate) { + if ( + method === 'return' || + (method === 'throw' && delegate.iterator[method] === undefined) + ) { + // A return or throw (when the delegate iterator has no throw + // method) always terminates the yield* loop. + context.delegate = null; + + // If the delegate iterator has a return method, give it a + // chance to clean up. + var returnMethod = delegate.iterator['return']; + if (returnMethod) { + var record = tryCatch(returnMethod, delegate.iterator, arg); + if (record.type === 'throw') { + // If the return method threw an exception, let that + // exception prevail over the original return or throw. + method = 'throw'; + arg = record.arg; + continue; + } + } + + if (method === 'return') { + // Continue with the outer return, now that the delegate + // iterator has been terminated. + continue; + } + } + + var record = tryCatch(delegate.iterator[method], delegate.iterator, arg); + + if (record.type === 'throw') { + context.delegate = null; + + // Like returning generator.throw(uncaught), but without the + // overhead of an extra function call. + method = 'throw'; + arg = record.arg; + continue; + } + + // Delegate generator ran and handled its own exceptions so + // regardless of what the method was, we continue as if it is + // "next" with an undefined arg. + method = 'next'; + arg = undefined; + + var info = record.arg; + if (info.done) { + context[delegate.resultName] = info.value; + context.next = delegate.nextLoc; + } else { + state = GenStateSuspendedYield; + return info; + } + + context.delegate = null; + } + + if (method === 'next') { + // Setting context._sent for legacy support of Babel's + // function.sent implementation. + context.sent = context._sent = arg; + } else if (method === 'throw') { + if (state === GenStateSuspendedStart) { + state = GenStateCompleted; + throw arg; + } + + if (context.dispatchException(arg)) { + // If the dispatched exception was caught by a catch block, + // then let that catch block handle the exception normally. + method = 'next'; + arg = undefined; + } + } else if (method === 'return') { + context.abrupt('return', arg); + } + + state = GenStateExecuting; + + var record = tryCatch(innerFn, self, context); + if (record.type === 'normal') { + // If an exception is thrown from innerFn, we leave state === + // GenStateExecuting and loop back for another invocation. + state = context.done ? GenStateCompleted : GenStateSuspendedYield; + + var info = { + value: record.arg, + done: context.done, + }; + + if (record.arg === ContinueSentinel) { + if (context.delegate && method === 'next') { + // Deliberately forget the last sent value so that we don't + // accidentally pass it on to the delegate. + arg = undefined; + } + } else { + return info; + } + } else if (record.type === 'throw') { + state = GenStateCompleted; + // Dispatch the exception by looping back around to the + // context.dispatchException(arg) call above. + method = 'throw'; + arg = record.arg; + } + } + }; + } + + // Define Generator.prototype.{next,throw,return} in terms of the + // unified ._invoke helper method. + defineIteratorMethods(Gp); + + Gp[iteratorSymbol] = function () { + return this; + }; + + Gp[toStringTagSymbol] = 'Generator'; + + Gp.toString = function () { + return '[object Generator]'; + }; + + function pushTryEntry(locs) { + var entry = { tryLoc: locs[0] }; + + if (1 in locs) { + entry.catchLoc = locs[1]; + } + + if (2 in locs) { + entry.finallyLoc = locs[2]; + entry.afterLoc = locs[3]; + } + + this.tryEntries.push(entry); + } + + function resetTryEntry(entry) { + var record = entry.completion || {}; + record.type = 'normal'; + delete record.arg; + entry.completion = record; + } + + function Context(tryLocsList) { + // The root entry object (effectively a try statement without a catch + // or a finally block) gives us a place to store values thrown from + // locations where there is no enclosing try statement. + this.tryEntries = [{ tryLoc: 'root' }]; + tryLocsList.forEach(pushTryEntry, this); + this.reset(true); + } + + runtime.keys = function (object) { + var keys = []; + for (var key in object) { + keys.push(key); + } + keys.reverse(); + + // Rather than returning an object with a next method, we keep + // things simple and return the next function itself. + return function next() { + while (keys.length) { + var key = keys.pop(); + if (key in object) { + next.value = key; + next.done = false; + return next; + } + } + + // To avoid creating an additional object, we just hang the .value + // and .done properties off the next function object itself. This + // also ensures that the minifier will not anonymize the function. + next.done = true; + return next; + }; + }; + + function values(iterable) { + if (iterable) { + var iteratorMethod = iterable[iteratorSymbol]; + if (iteratorMethod) { + return iteratorMethod.call(iterable); + } + + if (typeof iterable.next === 'function') { + return iterable; + } + + if (!isNaN(iterable.length)) { + var i = -1, + next = function next() { + while (++i < iterable.length) { + if (hasOwn.call(iterable, i)) { + next.value = iterable[i]; + next.done = false; + return next; + } + } + + next.value = undefined; + next.done = true; + + return next; + }; + + return (next.next = next); + } + } + + // Return an iterator with no values. + return { next: doneResult }; + } + runtime.values = values; + + function doneResult() { + return { value: undefined, done: true }; + } + + Context.prototype = { + constructor: Context, + + reset: function (skipTempReset) { + this.prev = 0; + this.next = 0; + // Resetting context._sent for legacy support of Babel's + // function.sent implementation. + this.sent = this._sent = undefined; + this.done = false; + this.delegate = null; + + this.tryEntries.forEach(resetTryEntry); + + if (!skipTempReset) { + for (var name in this) { + // Not sure about the optimal order of these conditions: + if (name.charAt(0) === 't' && hasOwn.call(this, name) && !isNaN(+name.slice(1))) { + this[name] = undefined; + } + } + } + }, + + stop: function () { + this.done = true; + + var rootEntry = this.tryEntries[0]; + var rootRecord = rootEntry.completion; + if (rootRecord.type === 'throw') { + throw rootRecord.arg; + } + + return this.rval; + }, + + dispatchException: function (exception) { + if (this.done) { + throw exception; + } + + var context = this; + function handle(loc, caught) { + record.type = 'throw'; + record.arg = exception; + context.next = loc; + return !!caught; + } + + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + var record = entry.completion; + + if (entry.tryLoc === 'root') { + // Exception thrown outside of any try block that could handle + // it, so set the completion value of the entire function to + // throw the exception. + return handle('end'); + } + + if (entry.tryLoc <= this.prev) { + var hasCatch = hasOwn.call(entry, 'catchLoc'); + var hasFinally = hasOwn.call(entry, 'finallyLoc'); + + if (hasCatch && hasFinally) { + if (this.prev < entry.catchLoc) { + return handle(entry.catchLoc, true); + } else if (this.prev < entry.finallyLoc) { + return handle(entry.finallyLoc); + } + } else if (hasCatch) { + if (this.prev < entry.catchLoc) { + return handle(entry.catchLoc, true); + } + } else if (hasFinally) { + if (this.prev < entry.finallyLoc) { + return handle(entry.finallyLoc); + } + } else { + throw new Error('try statement without catch or finally'); + } + } + } + }, + + abrupt: function (type, arg) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + if ( + entry.tryLoc <= this.prev && + hasOwn.call(entry, 'finallyLoc') && + this.prev < entry.finallyLoc + ) { + var finallyEntry = entry; + break; + } + } + + if ( + finallyEntry && + (type === 'break' || type === 'continue') && + finallyEntry.tryLoc <= arg && + arg <= finallyEntry.finallyLoc + ) { + // Ignore the finally entry if control is not jumping to a + // location outside the try/catch block. + finallyEntry = null; + } + + var record = finallyEntry ? finallyEntry.completion : {}; + record.type = type; + record.arg = arg; + + if (finallyEntry) { + this.next = finallyEntry.finallyLoc; + } else { + this.complete(record); + } + + return ContinueSentinel; + }, + + complete: function (record, afterLoc) { + if (record.type === 'throw') { + throw record.arg; + } + + if (record.type === 'break' || record.type === 'continue') { + this.next = record.arg; + } else if (record.type === 'return') { + this.rval = record.arg; + this.next = 'end'; + } else if (record.type === 'normal' && afterLoc) { + this.next = afterLoc; + } + }, + + finish: function (finallyLoc) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + if (entry.finallyLoc === finallyLoc) { + this.complete(entry.completion, entry.afterLoc); + resetTryEntry(entry); + return ContinueSentinel; + } + } + }, + + catch: function (tryLoc) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + if (entry.tryLoc === tryLoc) { + var record = entry.completion; + if (record.type === 'throw') { + var thrown = record.arg; + resetTryEntry(entry); + } + return thrown; + } + } + + // The context.catch method must only be called with a location + // argument that corresponds to a known catch block. + throw new Error('illegal catch attempt'); + }, + + delegateYield: function (iterable, resultName, nextLoc) { + this.delegate = { + iterator: values(iterable), + resultName: resultName, + nextLoc: nextLoc, + }; + + return ContinueSentinel; + }, + }; + })( + // Among the various tricks for obtaining a reference to the global + // object, this seems to be the most reliable technique that does not + // use indirect eval (which violates Content Security Policy). + typeof global === 'object' + ? global + : typeof window === 'object' + ? window + : typeof self === 'object' + ? self + : this, + ); + + /* WEBPACK VAR INJECTION */ + }).call(exports, __webpack_require__(108), __webpack_require__(100)); + + /***/ + }, + /* 480 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(531); + module.exports = __webpack_require__(55).RegExp.escape; + + /***/ + }, + /* 481 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(271); + __webpack_require__(515); + module.exports = __webpack_require__(54).Array.from; + + /***/ + }, + /* 482 */ + /***/ function (module, exports, __webpack_require__) { + var core = __webpack_require__(54), + $JSON = core.JSON || (core.JSON = { stringify: JSON.stringify }); + module.exports = function stringify(it) { + // eslint-disable-line no-unused-vars + return $JSON.stringify.apply($JSON, arguments); + }; + + /***/ + }, + /* 483 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(520); + __webpack_require__(271); + __webpack_require__(522); + __webpack_require__(517); + __webpack_require__(521); + module.exports = __webpack_require__(54).Map; + + /***/ + }, + /* 484 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(518); + module.exports = __webpack_require__(54).Object.assign; + + /***/ + }, + /* 485 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(519); + module.exports = __webpack_require__(54).Object.keys; + + /***/ + }, + /* 486 */ + /***/ function (module, exports) { + module.exports = function (it) { + if (typeof it != 'function') throw TypeError(it + ' is not a function!'); + return it; + }; + + /***/ + }, + /* 487 */ + /***/ function (module, exports) { + module.exports = function () { + /* empty */ + }; + + /***/ + }, + /* 488 */ + /***/ function (module, exports, __webpack_require__) { + var forOf = __webpack_require__(157); + + module.exports = function (iter, ITERATOR) { + var result = []; + forOf(iter, false, result.push, result, ITERATOR); + return result; + }; + + /***/ + }, + /* 489 */ + /***/ function (module, exports, __webpack_require__) { + // false -> Array#indexOf + // true -> Array#includes + var toIObject = __webpack_require__(165), + toLength = __webpack_require__(134), + toIndex = __webpack_require__(513); + module.exports = function (IS_INCLUDES) { + return function ($this, el, fromIndex) { + var O = toIObject($this), + length = toLength(O.length), + index = toIndex(fromIndex, length), + value; + // Array#includes uses SameValueZero equality algorithm + if (IS_INCLUDES && el != el) + while (length > index) { + value = O[index++]; + if (value != value) return true; + // Array#toIndex ignores holes, Array#includes - not + } + else + for (; length > index; index++) + if (IS_INCLUDES || index in O) { + if (O[index] === el) return IS_INCLUDES || index || 0; + } + return !IS_INCLUDES && -1; + }; + }; + + /***/ + }, + /* 490 */ + /***/ function (module, exports, __webpack_require__) { + // 0 -> Array#forEach + // 1 -> Array#map + // 2 -> Array#filter + // 3 -> Array#some + // 4 -> Array#every + // 5 -> Array#find + // 6 -> Array#findIndex + var ctx = __webpack_require__(115), + IObject = __webpack_require__(158), + toObject = __webpack_require__(118), + toLength = __webpack_require__(134), + asc = __webpack_require__(492); + module.exports = function (TYPE, $create) { + var IS_MAP = TYPE == 1, + IS_FILTER = TYPE == 2, + IS_SOME = TYPE == 3, + IS_EVERY = TYPE == 4, + IS_FIND_INDEX = TYPE == 6, + NO_HOLES = TYPE == 5 || IS_FIND_INDEX, + create = $create || asc; + return function ($this, callbackfn, that) { + var O = toObject($this), + self = IObject(O), + f = ctx(callbackfn, that, 3), + length = toLength(self.length), + index = 0, + result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined, + val, + res; + for (; length > index; index++) + if (NO_HOLES || index in self) { + val = self[index]; + res = f(val, index, O); + if (TYPE) { + if (IS_MAP) + result[index] = res; // map + else if (res) + switch (TYPE) { + case 3: + return true; // some + case 5: + return val; // find + case 6: + return index; // findIndex + case 2: + result.push(val); // filter + } + else if (IS_EVERY) return false; // every + } + } + return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result; + }; + }; + + /***/ + }, + /* 491 */ + /***/ function (module, exports, __webpack_require__) { + var isObject = __webpack_require__(93), + isArray = __webpack_require__(499), + SPECIES = __webpack_require__(47)('species'); + + module.exports = function (original) { + var C; + if (isArray(original)) { + C = original.constructor; + // cross-realm fallback + if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined; + if (isObject(C)) { + C = C[SPECIES]; + if (C === null) C = undefined; + } + } + return C === undefined ? Array : C; + }; + + /***/ + }, + /* 492 */ + /***/ function (module, exports, __webpack_require__) { + // 9.4.2.3 ArraySpeciesCreate(originalArray, length) + var speciesConstructor = __webpack_require__(491); + + module.exports = function (original, length) { + return new (speciesConstructor(original))(length); + }; + + /***/ + }, + /* 493 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var dP = __webpack_require__(62).f, + create = __webpack_require__(267), + redefineAll = __webpack_require__(268), + ctx = __webpack_require__(115), + anInstance = __webpack_require__(259), + defined = __webpack_require__(133), + forOf = __webpack_require__(157), + $iterDefine = __webpack_require__(159), + step = __webpack_require__(265), + setSpecies = __webpack_require__(511), + DESCRIPTORS = __webpack_require__(74), + fastKey = __webpack_require__(266).fastKey, + SIZE = DESCRIPTORS ? '_s' : 'size'; + + var getEntry = function (that, key) { + // fast case + var index = fastKey(key), + entry; + if (index !== 'F') return that._i[index]; + // frozen object case + for (entry = that._f; entry; entry = entry.n) { + if (entry.k == key) return entry; + } + }; + + module.exports = { + getConstructor: function (wrapper, NAME, IS_MAP, ADDER) { + var C = wrapper(function (that, iterable) { + anInstance(that, C, NAME, '_i'); + that._i = create(null); // index + that._f = undefined; // first entry + that._l = undefined; // last entry + that[SIZE] = 0; // size + if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that); + }); + redefineAll(C.prototype, { + // 23.1.3.1 Map.prototype.clear() + // 23.2.3.2 Set.prototype.clear() + clear: function clear() { + for (var that = this, data = that._i, entry = that._f; entry; entry = entry.n) { + entry.r = true; + if (entry.p) entry.p = entry.p.n = undefined; + delete data[entry.i]; + } + that._f = that._l = undefined; + that[SIZE] = 0; + }, + // 23.1.3.3 Map.prototype.delete(key) + // 23.2.3.4 Set.prototype.delete(value) + delete: function (key) { + var that = this, + entry = getEntry(that, key); + if (entry) { + var next = entry.n, + prev = entry.p; + delete that._i[entry.i]; + entry.r = true; + if (prev) prev.n = next; + if (next) next.p = prev; + if (that._f == entry) that._f = next; + if (that._l == entry) that._l = prev; + that[SIZE]--; + } + return !!entry; + }, + // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined) + // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined) + forEach: function forEach(callbackfn /*, that = undefined */) { + anInstance(this, C, 'forEach'); + var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3), + entry; + while ((entry = entry ? entry.n : this._f)) { + f(entry.v, entry.k, this); + // revert to the last existing entry + while (entry && entry.r) entry = entry.p; + } + }, + // 23.1.3.7 Map.prototype.has(key) + // 23.2.3.7 Set.prototype.has(value) + has: function has(key) { + return !!getEntry(this, key); + }, + }); + if (DESCRIPTORS) + dP(C.prototype, 'size', { + get: function () { + return defined(this[SIZE]); + }, + }); + return C; + }, + def: function (that, key, value) { + var entry = getEntry(that, key), + prev, + index; + // change existing entry + if (entry) { + entry.v = value; + // create new entry + } else { + that._l = entry = { + i: (index = fastKey(key, true)), // <- index + k: key, // <- key + v: value, // <- value + p: (prev = that._l), // <- previous entry + n: undefined, // <- next entry + r: false, // <- removed + }; + if (!that._f) that._f = entry; + if (prev) prev.n = entry; + that[SIZE]++; + // add to index + if (index !== 'F') that._i[index] = entry; + } + return that; + }, + getEntry: getEntry, + setStrong: function (C, NAME, IS_MAP) { + // add .keys, .values, .entries, [@@iterator] + // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11 + $iterDefine( + C, + NAME, + function (iterated, kind) { + this._t = iterated; // target + this._k = kind; // kind + this._l = undefined; // previous + }, + function () { + var that = this, + kind = that._k, + entry = that._l; + // revert to the last existing entry + while (entry && entry.r) entry = entry.p; + // get next entry + if (!that._t || !(that._l = entry = entry ? entry.n : that._t._f)) { + // or finish the iteration + that._t = undefined; + return step(1); + } + // return step by kind + if (kind == 'keys') return step(0, entry.k); + if (kind == 'values') return step(0, entry.v); + return step(0, [entry.k, entry.v]); + }, + IS_MAP ? 'entries' : 'values', + !IS_MAP, + true, + ); + + // add [@@species], 23.1.2.2, 23.2.2.2 + setSpecies(NAME); + }, + }; + + /***/ + }, + /* 494 */ + /***/ function (module, exports, __webpack_require__) { + // https://github.com/DavidBruant/Map-Set.prototype.toJSON + var classof = __webpack_require__(260), + from = __webpack_require__(488); + module.exports = function (NAME) { + return function toJSON() { + if (classof(this) != NAME) throw TypeError(NAME + "#toJSON isn't generic"); + return from(this); + }; + }; + + /***/ + }, + /* 495 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var global = __webpack_require__(61), + $export = __webpack_require__(91), + meta = __webpack_require__(266), + fails = __webpack_require__(92), + hide = __webpack_require__(75), + redefineAll = __webpack_require__(268), + forOf = __webpack_require__(157), + anInstance = __webpack_require__(259), + isObject = __webpack_require__(93), + setToStringTag = __webpack_require__(162), + dP = __webpack_require__(62).f, + each = __webpack_require__(490)(0), + DESCRIPTORS = __webpack_require__(74); + + module.exports = function (NAME, wrapper, methods, common, IS_MAP, IS_WEAK) { + var Base = global[NAME], + C = Base, + ADDER = IS_MAP ? 'set' : 'add', + proto = C && C.prototype, + O = {}; + if ( + !DESCRIPTORS || + typeof C != 'function' || + !( + IS_WEAK || + (proto.forEach && + !fails(function () { + new C().entries().next(); + })) + ) + ) { + // create collection constructor + C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER); + redefineAll(C.prototype, methods); + meta.NEED = true; + } else { + C = wrapper(function (target, iterable) { + anInstance(target, C, NAME, '_c'); + target._c = new Base(); + if (iterable != undefined) forOf(iterable, IS_MAP, target[ADDER], target); + }); + each('add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON'.split(','), function (KEY) { + var IS_ADDER = KEY == 'add' || KEY == 'set'; + if (KEY in proto && !(IS_WEAK && KEY == 'clear')) + hide(C.prototype, KEY, function (a, b) { + anInstance(this, C, KEY); + if (!IS_ADDER && IS_WEAK && !isObject(a)) return KEY == 'get' ? undefined : false; + var result = this._c[KEY](a === 0 ? 0 : a, b); + return IS_ADDER ? this : result; + }); + }); + if ('size' in proto) + dP(C.prototype, 'size', { + get: function () { + return this._c.size; + }, + }); + } + + setToStringTag(C, NAME); + + O[NAME] = C; + $export($export.G + $export.W + $export.F, O); + + if (!IS_WEAK) common.setStrong(C, NAME, IS_MAP); + + return C; + }; + + /***/ + }, + /* 496 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $defineProperty = __webpack_require__(62), + createDesc = __webpack_require__(161); + + module.exports = function (object, index, value) { + if (index in object) $defineProperty.f(object, index, createDesc(0, value)); + else object[index] = value; + }; + + /***/ + }, + /* 497 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = __webpack_require__(61).document && document.documentElement; + + /***/ + }, + /* 498 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = + !__webpack_require__(74) && + !__webpack_require__(92)(function () { + return ( + Object.defineProperty(__webpack_require__(261)('div'), 'a', { + get: function () { + return 7; + }, + }).a != 7 + ); + }); + + /***/ + }, + /* 499 */ + /***/ function (module, exports, __webpack_require__) { + // 7.2.2 IsArray(argument) + var cof = __webpack_require__(156); + module.exports = + Array.isArray || + function isArray(arg) { + return cof(arg) == 'Array'; + }; + + /***/ + }, + /* 500 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var create = __webpack_require__(267), + descriptor = __webpack_require__(161), + setToStringTag = __webpack_require__(162), + IteratorPrototype = {}; + + // 25.1.2.1.1 %IteratorPrototype%[@@iterator]() + __webpack_require__(75)(IteratorPrototype, __webpack_require__(47)('iterator'), function () { + return this; + }); + + module.exports = function (Constructor, NAME, next) { + Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) }); + setToStringTag(Constructor, NAME + ' Iterator'); + }; + + /***/ + }, + /* 501 */ + /***/ function (module, exports, __webpack_require__) { + var ITERATOR = __webpack_require__(47)('iterator'), + SAFE_CLOSING = false; + + try { + var riter = [7][ITERATOR](); + riter['return'] = function () { + SAFE_CLOSING = true; + }; + Array.from(riter, function () { + throw 2; + }); + } catch (e) { + /* empty */ + } + + module.exports = function (exec, skipClosing) { + if (!skipClosing && !SAFE_CLOSING) return false; + var safe = false; + try { + var arr = [7], + iter = arr[ITERATOR](); + iter.next = function () { + return { done: (safe = true) }; + }; + arr[ITERATOR] = function () { + return iter; + }; + exec(arr); + } catch (e) { + /* empty */ + } + return safe; + }; + + /***/ + }, + /* 502 */ + /***/ function (module, exports) { + module.exports = true; + + /***/ + }, + /* 503 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // 19.1.2.1 Object.assign(target, source, ...) + var getKeys = __webpack_require__(160), + gOPS = __webpack_require__(505), + pIE = __webpack_require__(508), + toObject = __webpack_require__(118), + IObject = __webpack_require__(158), + $assign = Object.assign; + + // should work with symbols and should have deterministic property order (V8 bug) + module.exports = + !$assign || + __webpack_require__(92)(function () { + var A = {}, + B = {}, + S = Symbol(), + K = 'abcdefghijklmnopqrst'; + A[S] = 7; + K.split('').forEach(function (k) { + B[k] = k; + }); + return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K; + }) + ? function assign(target, source) { + // eslint-disable-line no-unused-vars + var T = toObject(target), + aLen = arguments.length, + index = 1, + getSymbols = gOPS.f, + isEnum = pIE.f; + while (aLen > index) { + var S = IObject(arguments[index++]), + keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S), + length = keys.length, + j = 0, + key; + while (length > j) if (isEnum.call(S, (key = keys[j++]))) T[key] = S[key]; + } + return T; + } + : $assign; + + /***/ + }, + /* 504 */ + /***/ function (module, exports, __webpack_require__) { + var dP = __webpack_require__(62), + anObject = __webpack_require__(114), + getKeys = __webpack_require__(160); + + module.exports = __webpack_require__(74) + ? Object.defineProperties + : function defineProperties(O, Properties) { + anObject(O); + var keys = getKeys(Properties), + length = keys.length, + i = 0, + P; + while (length > i) dP.f(O, (P = keys[i++]), Properties[P]); + return O; + }; + + /***/ + }, + /* 505 */ + /***/ function (module, exports) { + exports.f = Object.getOwnPropertySymbols; + + /***/ + }, + /* 506 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) + var has = __webpack_require__(116), + toObject = __webpack_require__(118), + IE_PROTO = __webpack_require__(163)('IE_PROTO'), + ObjectProto = Object.prototype; + + module.exports = + Object.getPrototypeOf || + function (O) { + O = toObject(O); + if (has(O, IE_PROTO)) return O[IE_PROTO]; + if (typeof O.constructor == 'function' && O instanceof O.constructor) { + return O.constructor.prototype; + } + return O instanceof Object ? ObjectProto : null; + }; + + /***/ + }, + /* 507 */ + /***/ function (module, exports, __webpack_require__) { + var has = __webpack_require__(116), + toIObject = __webpack_require__(165), + arrayIndexOf = __webpack_require__(489)(false), + IE_PROTO = __webpack_require__(163)('IE_PROTO'); + + module.exports = function (object, names) { + var O = toIObject(object), + i = 0, + result = [], + key; + for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key); + // Don't enum bug & hidden keys + while (names.length > i) + if (has(O, (key = names[i++]))) { + ~arrayIndexOf(result, key) || result.push(key); + } + return result; + }; + + /***/ + }, + /* 508 */ + /***/ function (module, exports) { + exports.f = {}.propertyIsEnumerable; + + /***/ + }, + /* 509 */ + /***/ function (module, exports, __webpack_require__) { + // most Object methods by ES6 should accept primitives + var $export = __webpack_require__(91), + core = __webpack_require__(54), + fails = __webpack_require__(92); + module.exports = function (KEY, exec) { + var fn = (core.Object || {})[KEY] || Object[KEY], + exp = {}; + exp[KEY] = exec(fn); + $export( + $export.S + + $export.F * + fails(function () { + fn(1); + }), + 'Object', + exp, + ); + }; + + /***/ + }, + /* 510 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = __webpack_require__(75); + + /***/ + }, + /* 511 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var global = __webpack_require__(61), + core = __webpack_require__(54), + dP = __webpack_require__(62), + DESCRIPTORS = __webpack_require__(74), + SPECIES = __webpack_require__(47)('species'); + + module.exports = function (KEY) { + var C = typeof core[KEY] == 'function' ? core[KEY] : global[KEY]; + if (DESCRIPTORS && C && !C[SPECIES]) + dP.f(C, SPECIES, { + configurable: true, + get: function () { + return this; + }, + }); + }; + + /***/ + }, + /* 512 */ + /***/ function (module, exports, __webpack_require__) { + var toInteger = __webpack_require__(164), + defined = __webpack_require__(133); + // true -> String#at + // false -> String#codePointAt + module.exports = function (TO_STRING) { + return function (that, pos) { + var s = String(defined(that)), + i = toInteger(pos), + l = s.length, + a, + b; + if (i < 0 || i >= l) return TO_STRING ? '' : undefined; + a = s.charCodeAt(i); + return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff + ? TO_STRING + ? s.charAt(i) + : a + : TO_STRING + ? s.slice(i, i + 2) + : ((a - 0xd800) << 10) + (b - 0xdc00) + 0x10000; + }; + }; + + /***/ + }, + /* 513 */ + /***/ function (module, exports, __webpack_require__) { + var toInteger = __webpack_require__(164), + max = Math.max, + min = Math.min; + module.exports = function (index, length) { + index = toInteger(index); + return index < 0 ? max(index + length, 0) : min(index, length); + }; + + /***/ + }, + /* 514 */ + /***/ function (module, exports, __webpack_require__) { + // 7.1.1 ToPrimitive(input [, PreferredType]) + var isObject = __webpack_require__(93); + // instead of the ES6 spec version, we didn't implement @@toPrimitive case + // and the second argument - flag - preferred type is a string + module.exports = function (it, S) { + if (!isObject(it)) return it; + var fn, val; + if (S && typeof (fn = it.toString) == 'function' && !isObject((val = fn.call(it)))) return val; + if (typeof (fn = it.valueOf) == 'function' && !isObject((val = fn.call(it)))) return val; + if (!S && typeof (fn = it.toString) == 'function' && !isObject((val = fn.call(it)))) return val; + throw TypeError("Can't convert object to primitive value"); + }; + + /***/ + }, + /* 515 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var ctx = __webpack_require__(115), + $export = __webpack_require__(91), + toObject = __webpack_require__(118), + call = __webpack_require__(264), + isArrayIter = __webpack_require__(263), + toLength = __webpack_require__(134), + createProperty = __webpack_require__(496), + getIterFn = __webpack_require__(270); + + $export( + $export.S + + $export.F * + !__webpack_require__(501)(function (iter) { + Array.from(iter); + }), + 'Array', + { + // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined) + from: function from(arrayLike /*, mapfn = undefined, thisArg = undefined*/) { + var O = toObject(arrayLike), + C = typeof this == 'function' ? this : Array, + aLen = arguments.length, + mapfn = aLen > 1 ? arguments[1] : undefined, + mapping = mapfn !== undefined, + index = 0, + iterFn = getIterFn(O), + length, + result, + step, + iterator; + if (mapping) mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2); + // if object isn't iterable or it's array with default iterator - use simple case + if (iterFn != undefined && !(C == Array && isArrayIter(iterFn))) { + for (iterator = iterFn.call(O), result = new C(); !(step = iterator.next()).done; index++) { + createProperty( + result, + index, + mapping ? call(iterator, mapfn, [step.value, index], true) : step.value, + ); + } + } else { + length = toLength(O.length); + for (result = new C(length); length > index; index++) { + createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]); + } + } + result.length = index; + return result; + }, + }, + ); + + /***/ + }, + /* 516 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var addToUnscopables = __webpack_require__(487), + step = __webpack_require__(265), + Iterators = __webpack_require__(117), + toIObject = __webpack_require__(165); + + // 22.1.3.4 Array.prototype.entries() + // 22.1.3.13 Array.prototype.keys() + // 22.1.3.29 Array.prototype.values() + // 22.1.3.30 Array.prototype[@@iterator]() + module.exports = __webpack_require__(159)( + Array, + 'Array', + function (iterated, kind) { + this._t = toIObject(iterated); // target + this._i = 0; // next index + this._k = kind; // kind + // 22.1.5.2.1 %ArrayIteratorPrototype%.next() + }, + function () { + var O = this._t, + kind = this._k, + index = this._i++; + if (!O || index >= O.length) { + this._t = undefined; + return step(1); + } + if (kind == 'keys') return step(0, index); + if (kind == 'values') return step(0, O[index]); + return step(0, [index, O[index]]); + }, + 'values', + ); + + // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) + Iterators.Arguments = Iterators.Array; + + addToUnscopables('keys'); + addToUnscopables('values'); + addToUnscopables('entries'); + + /***/ + }, + /* 517 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var strong = __webpack_require__(493); + + // 23.1 Map Objects + module.exports = __webpack_require__(495)( + 'Map', + function (get) { + return function Map() { + return get(this, arguments.length > 0 ? arguments[0] : undefined); + }; + }, + { + // 23.1.3.6 Map.prototype.get(key) + get: function get(key) { + var entry = strong.getEntry(this, key); + return entry && entry.v; + }, + // 23.1.3.9 Map.prototype.set(key, value) + set: function set(key, value) { + return strong.def(this, key === 0 ? 0 : key, value); + }, + }, + strong, + true, + ); + + /***/ + }, + /* 518 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.3.1 Object.assign(target, source) + var $export = __webpack_require__(91); + + $export($export.S + $export.F, 'Object', { assign: __webpack_require__(503) }); + + /***/ + }, + /* 519 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.14 Object.keys(O) + var toObject = __webpack_require__(118), + $keys = __webpack_require__(160); + + __webpack_require__(509)('keys', function () { + return function keys(it) { + return $keys(toObject(it)); + }; + }); + + /***/ + }, + /* 520 */ + /***/ function (module, exports) { + /***/ + }, + /* 521 */ + /***/ function (module, exports, __webpack_require__) { + // https://github.com/DavidBruant/Map-Set.prototype.toJSON + var $export = __webpack_require__(91); + + $export($export.P + $export.R, 'Map', { toJSON: __webpack_require__(494)('Map') }); + + /***/ + }, + /* 522 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(516); + var global = __webpack_require__(61), + hide = __webpack_require__(75), + Iterators = __webpack_require__(117), + TO_STRING_TAG = __webpack_require__(47)('toStringTag'); + + for ( + var collections = ['NodeList', 'DOMTokenList', 'MediaList', 'StyleSheetList', 'CSSRuleList'], i = 0; + i < 5; + i++ + ) { + var NAME = collections[i], + Collection = global[NAME], + proto = Collection && Collection.prototype; + if (proto && !proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME); + Iterators[NAME] = Iterators.Array; + } + + /***/ + }, + /* 523 */ + /***/ function (module, exports, __webpack_require__) { + var isObject = __webpack_require__(11), + isArray = __webpack_require__(175), + SPECIES = __webpack_require__(12)('species'); + + module.exports = function (original) { + var C; + if (isArray(original)) { + C = original.constructor; + // cross-realm fallback + if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined; + if (isObject(C)) { + C = C[SPECIES]; + if (C === null) C = undefined; + } + } + return C === undefined ? Array : C; + }; + + /***/ + }, + /* 524 */ + /***/ function (module, exports, __webpack_require__) { + // 9.4.2.3 ArraySpeciesCreate(originalArray, length) + var speciesConstructor = __webpack_require__(523); + + module.exports = function (original, length) { + return new (speciesConstructor(original))(length); + }; + + /***/ + }, + /* 525 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var anObject = __webpack_require__(5), + toPrimitive = __webpack_require__(50), + NUMBER = 'number'; + + module.exports = function (hint) { + if (hint !== 'string' && hint !== NUMBER && hint !== 'default') throw TypeError('Incorrect hint'); + return toPrimitive(anObject(this), hint != NUMBER); + }; + + /***/ + }, + /* 526 */ + /***/ function (module, exports, __webpack_require__) { + // all enumerable object keys, includes symbols + var getKeys = __webpack_require__(80), + gOPS = __webpack_require__(143), + pIE = __webpack_require__(121); + module.exports = function (it) { + var result = getKeys(it), + getSymbols = gOPS.f; + if (getSymbols) { + var symbols = getSymbols(it), + isEnum = pIE.f, + i = 0, + key; + while (symbols.length > i) if (isEnum.call(it, (key = symbols[i++]))) result.push(key); + } + return result; + }; + + /***/ + }, + /* 527 */ + /***/ function (module, exports, __webpack_require__) { + var getKeys = __webpack_require__(80), + toIObject = __webpack_require__(32); + module.exports = function (object, el) { + var O = toIObject(object), + keys = getKeys(O), + length = keys.length, + index = 0, + key; + while (length > index) if (O[(key = keys[index++])] === el) return key; + }; + + /***/ + }, + /* 528 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var path = __webpack_require__(529), + invoke = __webpack_require__(139), + aFunction = __webpack_require__(28); + module.exports = function (/* ...pargs */) { + var fn = aFunction(this), + length = arguments.length, + pargs = Array(length), + i = 0, + _ = path._, + holder = false; + while (length > i) if ((pargs[i] = arguments[i++]) === _) holder = true; + return function (/* ...args */) { + var that = this, + aLen = arguments.length, + j = 0, + k = 0, + args; + if (!holder && !aLen) return invoke(fn, pargs, that); + args = pargs.slice(); + if (holder) for (; length > j; j++) if (args[j] === _) args[j] = arguments[k++]; + while (aLen > k) args.push(arguments[k++]); + return invoke(fn, args, that); + }; + }; + + /***/ + }, + /* 529 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = __webpack_require__(8); + + /***/ + }, + /* 530 */ + /***/ function (module, exports) { + module.exports = function (regExp, replace) { + var replacer = + replace === Object(replace) + ? function (part) { + return replace[part]; + } + : replace; + return function (it) { + return String(it).replace(regExp, replacer); + }; + }; + + /***/ + }, + /* 531 */ + /***/ function (module, exports, __webpack_require__) { + // https://github.com/benjamingr/RexExp.escape + var $export = __webpack_require__(0), + $re = __webpack_require__(530)(/[\\^$*+?.()|[\]{}]/g, '\\$&'); + + $export($export.S, 'RegExp', { + escape: function escape(it) { + return $re(it); + }, + }); + + /***/ + }, + /* 532 */ + /***/ function (module, exports, __webpack_require__) { + // 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length) + var $export = __webpack_require__(0); + + $export($export.P, 'Array', { copyWithin: __webpack_require__(273) }); + + __webpack_require__(94)('copyWithin'); + + /***/ + }, + /* 533 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0), + $every = __webpack_require__(48)(4); + + $export($export.P + $export.F * !__webpack_require__(42)([].every, true), 'Array', { + // 22.1.3.5 / 15.4.4.16 Array.prototype.every(callbackfn [, thisArg]) + every: function every(callbackfn /* , thisArg */) { + return $every(this, callbackfn, arguments[1]); + }, + }); + + /***/ + }, + /* 534 */ + /***/ function (module, exports, __webpack_require__) { + // 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length) + var $export = __webpack_require__(0); + + $export($export.P, 'Array', { fill: __webpack_require__(167) }); + + __webpack_require__(94)('fill'); + + /***/ + }, + /* 535 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0), + $filter = __webpack_require__(48)(2); + + $export($export.P + $export.F * !__webpack_require__(42)([].filter, true), 'Array', { + // 22.1.3.7 / 15.4.4.20 Array.prototype.filter(callbackfn [, thisArg]) + filter: function filter(callbackfn /* , thisArg */) { + return $filter(this, callbackfn, arguments[1]); + }, + }); + + /***/ + }, + /* 536 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // 22.1.3.9 Array.prototype.findIndex(predicate, thisArg = undefined) + var $export = __webpack_require__(0), + $find = __webpack_require__(48)(6), + KEY = 'findIndex', + forced = true; + // Shouldn't skip holes + if (KEY in []) + Array(1)[KEY](function () { + forced = false; + }); + $export($export.P + $export.F * forced, 'Array', { + findIndex: function findIndex(callbackfn /*, that = undefined */) { + return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); + }, + }); + __webpack_require__(94)(KEY); + + /***/ + }, + /* 537 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // 22.1.3.8 Array.prototype.find(predicate, thisArg = undefined) + var $export = __webpack_require__(0), + $find = __webpack_require__(48)(5), + KEY = 'find', + forced = true; + // Shouldn't skip holes + if (KEY in []) + Array(1)[KEY](function () { + forced = false; + }); + $export($export.P + $export.F * forced, 'Array', { + find: function find(callbackfn /*, that = undefined */) { + return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); + }, + }); + __webpack_require__(94)(KEY); + + /***/ + }, + /* 538 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0), + $forEach = __webpack_require__(48)(0), + STRICT = __webpack_require__(42)([].forEach, true); + + $export($export.P + $export.F * !STRICT, 'Array', { + // 22.1.3.10 / 15.4.4.18 Array.prototype.forEach(callbackfn [, thisArg]) + forEach: function forEach(callbackfn /* , thisArg */) { + return $forEach(this, callbackfn, arguments[1]); + }, + }); + + /***/ + }, + /* 539 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var ctx = __webpack_require__(56), + $export = __webpack_require__(0), + toObject = __webpack_require__(20), + call = __webpack_require__(282), + isArrayIter = __webpack_require__(174), + toLength = __webpack_require__(19), + createProperty = __webpack_require__(168), + getIterFn = __webpack_require__(191); + + $export( + $export.S + + $export.F * + !__webpack_require__(141)(function (iter) { + Array.from(iter); + }), + 'Array', + { + // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined) + from: function from(arrayLike /*, mapfn = undefined, thisArg = undefined*/) { + var O = toObject(arrayLike), + C = typeof this == 'function' ? this : Array, + aLen = arguments.length, + mapfn = aLen > 1 ? arguments[1] : undefined, + mapping = mapfn !== undefined, + index = 0, + iterFn = getIterFn(O), + length, + result, + step, + iterator; + if (mapping) mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2); + // if object isn't iterable or it's array with default iterator - use simple case + if (iterFn != undefined && !(C == Array && isArrayIter(iterFn))) { + for (iterator = iterFn.call(O), result = new C(); !(step = iterator.next()).done; index++) { + createProperty( + result, + index, + mapping ? call(iterator, mapfn, [step.value, index], true) : step.value, + ); + } + } else { + length = toLength(O.length); + for (result = new C(length); length > index; index++) { + createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]); + } + } + result.length = index; + return result; + }, + }, + ); + + /***/ + }, + /* 540 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0), + $indexOf = __webpack_require__(135)(false), + $native = [].indexOf, + NEGATIVE_ZERO = !!$native && 1 / [1].indexOf(1, -0) < 0; + + $export($export.P + $export.F * (NEGATIVE_ZERO || !__webpack_require__(42)($native)), 'Array', { + // 22.1.3.11 / 15.4.4.14 Array.prototype.indexOf(searchElement [, fromIndex]) + indexOf: function indexOf(searchElement /*, fromIndex = 0 */) { + return NEGATIVE_ZERO + ? // convert -0 to +0 + $native.apply(this, arguments) || 0 + : $indexOf(this, searchElement, arguments[1]); + }, + }); + + /***/ + }, + /* 541 */ + /***/ function (module, exports, __webpack_require__) { + // 22.1.2.2 / 15.4.3.2 Array.isArray(arg) + var $export = __webpack_require__(0); + + $export($export.S, 'Array', { isArray: __webpack_require__(175) }); + + /***/ + }, + /* 542 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // 22.1.3.13 Array.prototype.join(separator) + var $export = __webpack_require__(0), + toIObject = __webpack_require__(32), + arrayJoin = [].join; + + // fallback for not array-like strings + $export( + $export.P + $export.F * (__webpack_require__(120) != Object || !__webpack_require__(42)(arrayJoin)), + 'Array', + { + join: function join(separator) { + return arrayJoin.call(toIObject(this), separator === undefined ? ',' : separator); + }, + }, + ); + + /***/ + }, + /* 543 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0), + toIObject = __webpack_require__(32), + toInteger = __webpack_require__(65), + toLength = __webpack_require__(19), + $native = [].lastIndexOf, + NEGATIVE_ZERO = !!$native && 1 / [1].lastIndexOf(1, -0) < 0; + + $export($export.P + $export.F * (NEGATIVE_ZERO || !__webpack_require__(42)($native)), 'Array', { + // 22.1.3.14 / 15.4.4.15 Array.prototype.lastIndexOf(searchElement [, fromIndex]) + lastIndexOf: function lastIndexOf(searchElement /*, fromIndex = @[*-1] */) { + // convert -0 to +0 + if (NEGATIVE_ZERO) return $native.apply(this, arguments) || 0; + var O = toIObject(this), + length = toLength(O.length), + index = length - 1; + if (arguments.length > 1) index = Math.min(index, toInteger(arguments[1])); + if (index < 0) index = length + index; + for (; index >= 0; index--) if (index in O) if (O[index] === searchElement) return index || 0; + return -1; + }, + }); + + /***/ + }, + /* 544 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0), + $map = __webpack_require__(48)(1); + + $export($export.P + $export.F * !__webpack_require__(42)([].map, true), 'Array', { + // 22.1.3.15 / 15.4.4.19 Array.prototype.map(callbackfn [, thisArg]) + map: function map(callbackfn /* , thisArg */) { + return $map(this, callbackfn, arguments[1]); + }, + }); + + /***/ + }, + /* 545 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0), + createProperty = __webpack_require__(168); + + // WebKit Array.of isn't generic + $export( + $export.S + + $export.F * + __webpack_require__(10)(function () { + function F() {} + return !(Array.of.call(F) instanceof F); + }), + 'Array', + { + // 22.1.2.3 Array.of( ...items) + of: function of(/* ...args */) { + var index = 0, + aLen = arguments.length, + result = new (typeof this == 'function' ? this : Array)(aLen); + while (aLen > index) createProperty(result, index, arguments[index++]); + result.length = aLen; + return result; + }, + }, + ); + + /***/ + }, + /* 546 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0), + $reduce = __webpack_require__(275); + + $export($export.P + $export.F * !__webpack_require__(42)([].reduceRight, true), 'Array', { + // 22.1.3.19 / 15.4.4.22 Array.prototype.reduceRight(callbackfn [, initialValue]) + reduceRight: function reduceRight(callbackfn /* , initialValue */) { + return $reduce(this, callbackfn, arguments.length, arguments[1], true); + }, + }); + + /***/ + }, + /* 547 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0), + $reduce = __webpack_require__(275); + + $export($export.P + $export.F * !__webpack_require__(42)([].reduce, true), 'Array', { + // 22.1.3.18 / 15.4.4.21 Array.prototype.reduce(callbackfn [, initialValue]) + reduce: function reduce(callbackfn /* , initialValue */) { + return $reduce(this, callbackfn, arguments.length, arguments[1], false); + }, + }); + + /***/ + }, + /* 548 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0), + html = __webpack_require__(172), + cof = __webpack_require__(40), + toIndex = __webpack_require__(83), + toLength = __webpack_require__(19), + arraySlice = [].slice; + + // fallback for not array-like ES3 strings and DOM objects + $export( + $export.P + + $export.F * + __webpack_require__(10)(function () { + if (html) arraySlice.call(html); + }), + 'Array', + { + slice: function slice(begin, end) { + var len = toLength(this.length), + klass = cof(this); + end = end === undefined ? len : end; + if (klass == 'Array') return arraySlice.call(this, begin, end); + var start = toIndex(begin, len), + upTo = toIndex(end, len), + size = toLength(upTo - start), + cloned = Array(size), + i = 0; + for (; i < size; i++) cloned[i] = klass == 'String' ? this.charAt(start + i) : this[start + i]; + return cloned; + }, + }, + ); + + /***/ + }, + /* 549 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0), + $some = __webpack_require__(48)(3); + + $export($export.P + $export.F * !__webpack_require__(42)([].some, true), 'Array', { + // 22.1.3.23 / 15.4.4.17 Array.prototype.some(callbackfn [, thisArg]) + some: function some(callbackfn /* , thisArg */) { + return $some(this, callbackfn, arguments[1]); + }, + }); + + /***/ + }, + /* 550 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0), + aFunction = __webpack_require__(28), + toObject = __webpack_require__(20), + fails = __webpack_require__(10), + $sort = [].sort, + test = [1, 2, 3]; + + $export( + $export.P + + $export.F * + (fails(function () { + // IE8- + test.sort(undefined); + }) || + !fails(function () { + // V8 bug + test.sort(null); + // Old WebKit + }) || + !__webpack_require__(42)($sort)), + 'Array', + { + // 22.1.3.25 Array.prototype.sort(comparefn) + sort: function sort(comparefn) { + return comparefn === undefined + ? $sort.call(toObject(this)) + : $sort.call(toObject(this), aFunction(comparefn)); + }, + }, + ); + + /***/ + }, + /* 551 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(82)('Array'); + + /***/ + }, + /* 552 */ + /***/ function (module, exports, __webpack_require__) { + // 20.3.3.1 / 15.9.4.4 Date.now() + var $export = __webpack_require__(0); + + $export($export.S, 'Date', { + now: function () { + return new Date().getTime(); + }, + }); + + /***/ + }, + /* 553 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString() + var $export = __webpack_require__(0), + fails = __webpack_require__(10), + getTime = Date.prototype.getTime; + + var lz = function (num) { + return num > 9 ? num : '0' + num; + }; + + // PhantomJS / old WebKit has a broken implementations + $export( + $export.P + + $export.F * + (fails(function () { + return new Date(-5e13 - 1).toISOString() != '0385-07-25T07:06:39.999Z'; + }) || + !fails(function () { + new Date(NaN).toISOString(); + })), + 'Date', + { + toISOString: function toISOString() { + if (!isFinite(getTime.call(this))) throw RangeError('Invalid time value'); + var d = this, + y = d.getUTCFullYear(), + m = d.getUTCMilliseconds(), + s = y < 0 ? '-' : y > 9999 ? '+' : ''; + return ( + s + + ('00000' + Math.abs(y)).slice(s ? -6 : -4) + + '-' + + lz(d.getUTCMonth() + 1) + + '-' + + lz(d.getUTCDate()) + + 'T' + + lz(d.getUTCHours()) + + ':' + + lz(d.getUTCMinutes()) + + ':' + + lz(d.getUTCSeconds()) + + '.' + + (m > 99 ? m : '0' + lz(m)) + + 'Z' + ); + }, + }, + ); + + /***/ + }, + /* 554 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0), + toObject = __webpack_require__(20), + toPrimitive = __webpack_require__(50); + + $export( + $export.P + + $export.F * + __webpack_require__(10)(function () { + return ( + new Date(NaN).toJSON() !== null || + Date.prototype.toJSON.call({ + toISOString: function () { + return 1; + }, + }) !== 1 + ); + }), + 'Date', + { + toJSON: function toJSON(key) { + var O = toObject(this), + pv = toPrimitive(O); + return typeof pv == 'number' && !isFinite(pv) ? null : O.toISOString(); + }, + }, + ); + + /***/ + }, + /* 555 */ + /***/ function (module, exports, __webpack_require__) { + var TO_PRIMITIVE = __webpack_require__(12)('toPrimitive'), + proto = Date.prototype; + + if (!(TO_PRIMITIVE in proto)) __webpack_require__(29)(proto, TO_PRIMITIVE, __webpack_require__(525)); + + /***/ + }, + /* 556 */ + /***/ function (module, exports, __webpack_require__) { + var DateProto = Date.prototype, + INVALID_DATE = 'Invalid Date', + TO_STRING = 'toString', + $toString = DateProto[TO_STRING], + getTime = DateProto.getTime; + if (new Date(NaN) + '' != INVALID_DATE) { + __webpack_require__(30)(DateProto, TO_STRING, function toString() { + var value = getTime.call(this); + return value === value ? $toString.call(this) : INVALID_DATE; + }); + } + + /***/ + }, + /* 557 */ + /***/ function (module, exports, __webpack_require__) { + // 19.2.3.2 / 15.3.4.5 Function.prototype.bind(thisArg, args...) + var $export = __webpack_require__(0); + + $export($export.P, 'Function', { bind: __webpack_require__(276) }); + + /***/ + }, + /* 558 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var isObject = __webpack_require__(11), + getPrototypeOf = __webpack_require__(37), + HAS_INSTANCE = __webpack_require__(12)('hasInstance'), + FunctionProto = Function.prototype; + // 19.2.3.6 Function.prototype[@@hasInstance](V) + if (!(HAS_INSTANCE in FunctionProto)) + __webpack_require__(15).f(FunctionProto, HAS_INSTANCE, { + value: function (O) { + if (typeof this != 'function' || !isObject(O)) return false; + if (!isObject(this.prototype)) return O instanceof this; + // for environment w/o native `@@hasInstance` logic enough `instanceof`, but add this: + while ((O = getPrototypeOf(O))) if (this.prototype === O) return true; + return false; + }, + }); + + /***/ + }, + /* 559 */ + /***/ function (module, exports, __webpack_require__) { + var dP = __webpack_require__(15).f, + createDesc = __webpack_require__(64), + has = __webpack_require__(27), + FProto = Function.prototype, + nameRE = /^\s*function ([^ (]*)/, + NAME = 'name'; + + var isExtensible = + Object.isExtensible || + function () { + return true; + }; + + // 19.2.4.2 name + NAME in FProto || + (__webpack_require__(14) && + dP(FProto, NAME, { + configurable: true, + get: function () { + try { + var that = this, + name = ('' + that).match(nameRE)[1]; + has(that, NAME) || !isExtensible(that) || dP(that, NAME, createDesc(5, name)); + return name; + } catch (e) { + return ''; + } + }, + })); + + /***/ + }, + /* 560 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.3 Math.acosh(x) + var $export = __webpack_require__(0), + log1p = __webpack_require__(284), + sqrt = Math.sqrt, + $acosh = Math.acosh; + + $export( + $export.S + + $export.F * + !( + $acosh && + // V8 bug: https://code.google.com/p/v8/issues/detail?id=3509 + Math.floor($acosh(Number.MAX_VALUE)) == 710 && + // Tor Browser bug: Math.acosh(Infinity) -> NaN + $acosh(Infinity) == Infinity + ), + 'Math', + { + acosh: function acosh(x) { + return (x = +x) < 1 + ? NaN + : x > 94906265.62425156 + ? Math.log(x) + Math.LN2 + : log1p(x - 1 + sqrt(x - 1) * sqrt(x + 1)); + }, + }, + ); + + /***/ + }, + /* 561 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.5 Math.asinh(x) + var $export = __webpack_require__(0), + $asinh = Math.asinh; + + function asinh(x) { + return !isFinite((x = +x)) || x == 0 ? x : x < 0 ? -asinh(-x) : Math.log(x + Math.sqrt(x * x + 1)); + } + + // Tor Browser bug: Math.asinh(0) -> -0 + $export($export.S + $export.F * !($asinh && 1 / $asinh(0) > 0), 'Math', { asinh: asinh }); + + /***/ + }, + /* 562 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.7 Math.atanh(x) + var $export = __webpack_require__(0), + $atanh = Math.atanh; + + // Tor Browser bug: Math.atanh(-0) -> 0 + $export($export.S + $export.F * !($atanh && 1 / $atanh(-0) < 0), 'Math', { + atanh: function atanh(x) { + return (x = +x) == 0 ? x : Math.log((1 + x) / (1 - x)) / 2; + }, + }); + + /***/ + }, + /* 563 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.9 Math.cbrt(x) + var $export = __webpack_require__(0), + sign = __webpack_require__(179); + + $export($export.S, 'Math', { + cbrt: function cbrt(x) { + return sign((x = +x)) * Math.pow(Math.abs(x), 1 / 3); + }, + }); + + /***/ + }, + /* 564 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.11 Math.clz32(x) + var $export = __webpack_require__(0); + + $export($export.S, 'Math', { + clz32: function clz32(x) { + return (x >>>= 0) ? 31 - Math.floor(Math.log(x + 0.5) * Math.LOG2E) : 32; + }, + }); + + /***/ + }, + /* 565 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.12 Math.cosh(x) + var $export = __webpack_require__(0), + exp = Math.exp; + + $export($export.S, 'Math', { + cosh: function cosh(x) { + return (exp((x = +x)) + exp(-x)) / 2; + }, + }); + + /***/ + }, + /* 566 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.14 Math.expm1(x) + var $export = __webpack_require__(0), + $expm1 = __webpack_require__(178); + + $export($export.S + $export.F * ($expm1 != Math.expm1), 'Math', { expm1: $expm1 }); + + /***/ + }, + /* 567 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.16 Math.fround(x) + var $export = __webpack_require__(0), + sign = __webpack_require__(179), + pow = Math.pow, + EPSILON = pow(2, -52), + EPSILON32 = pow(2, -23), + MAX32 = pow(2, 127) * (2 - EPSILON32), + MIN32 = pow(2, -126); + + var roundTiesToEven = function (n) { + return n + 1 / EPSILON - 1 / EPSILON; + }; + + $export($export.S, 'Math', { + fround: function fround(x) { + var $abs = Math.abs(x), + $sign = sign(x), + a, + result; + if ($abs < MIN32) return $sign * roundTiesToEven($abs / MIN32 / EPSILON32) * MIN32 * EPSILON32; + a = (1 + EPSILON32 / EPSILON) * $abs; + result = a - (a - $abs); + if (result > MAX32 || result != result) return $sign * Infinity; + return $sign * result; + }, + }); + + /***/ + }, + /* 568 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.17 Math.hypot([value1[, value2[, … ]]]) + var $export = __webpack_require__(0), + abs = Math.abs; + + $export($export.S, 'Math', { + hypot: function hypot(value1, value2) { + // eslint-disable-line no-unused-vars + var sum = 0, + i = 0, + aLen = arguments.length, + larg = 0, + arg, + div; + while (i < aLen) { + arg = abs(arguments[i++]); + if (larg < arg) { + div = larg / arg; + sum = sum * div * div + 1; + larg = arg; + } else if (arg > 0) { + div = arg / larg; + sum += div * div; + } else sum += arg; + } + return larg === Infinity ? Infinity : larg * Math.sqrt(sum); + }, + }); + + /***/ + }, + /* 569 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.18 Math.imul(x, y) + var $export = __webpack_require__(0), + $imul = Math.imul; + + // some WebKit versions fails with big numbers, some has wrong arity + $export( + $export.S + + $export.F * + __webpack_require__(10)(function () { + return $imul(0xffffffff, 5) != -5 || $imul.length != 2; + }), + 'Math', + { + imul: function imul(x, y) { + var UINT16 = 0xffff, + xn = +x, + yn = +y, + xl = UINT16 & xn, + yl = UINT16 & yn; + return ( + 0 | (xl * yl + ((((UINT16 & (xn >>> 16)) * yl + xl * (UINT16 & (yn >>> 16))) << 16) >>> 0)) + ); + }, + }, + ); + + /***/ + }, + /* 570 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.21 Math.log10(x) + var $export = __webpack_require__(0); + + $export($export.S, 'Math', { + log10: function log10(x) { + return Math.log(x) / Math.LN10; + }, + }); + + /***/ + }, + /* 571 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.20 Math.log1p(x) + var $export = __webpack_require__(0); + + $export($export.S, 'Math', { log1p: __webpack_require__(284) }); + + /***/ + }, + /* 572 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.22 Math.log2(x) + var $export = __webpack_require__(0); + + $export($export.S, 'Math', { + log2: function log2(x) { + return Math.log(x) / Math.LN2; + }, + }); + + /***/ + }, + /* 573 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.28 Math.sign(x) + var $export = __webpack_require__(0); + + $export($export.S, 'Math', { sign: __webpack_require__(179) }); + + /***/ + }, + /* 574 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.30 Math.sinh(x) + var $export = __webpack_require__(0), + expm1 = __webpack_require__(178), + exp = Math.exp; + + // V8 near Chromium 38 has a problem with very small numbers + $export( + $export.S + + $export.F * + __webpack_require__(10)(function () { + return !Math.sinh(-2e-17) != -2e-17; + }), + 'Math', + { + sinh: function sinh(x) { + return Math.abs((x = +x)) < 1 + ? (expm1(x) - expm1(-x)) / 2 + : (exp(x - 1) - exp(-x - 1)) * (Math.E / 2); + }, + }, + ); + + /***/ + }, + /* 575 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.33 Math.tanh(x) + var $export = __webpack_require__(0), + expm1 = __webpack_require__(178), + exp = Math.exp; + + $export($export.S, 'Math', { + tanh: function tanh(x) { + var a = expm1((x = +x)), + b = expm1(-x); + return a == Infinity ? 1 : b == Infinity ? -1 : (a - b) / (exp(x) + exp(-x)); + }, + }); + + /***/ + }, + /* 576 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.34 Math.trunc(x) + var $export = __webpack_require__(0); + + $export($export.S, 'Math', { + trunc: function trunc(it) { + return (it > 0 ? Math.floor : Math.ceil)(it); + }, + }); + + /***/ + }, + /* 577 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var global = __webpack_require__(8), + has = __webpack_require__(27), + cof = __webpack_require__(40), + inheritIfRequired = __webpack_require__(173), + toPrimitive = __webpack_require__(50), + fails = __webpack_require__(10), + gOPN = __webpack_require__(79).f, + gOPD = __webpack_require__(36).f, + dP = __webpack_require__(15).f, + $trim = __webpack_require__(98).trim, + NUMBER = 'Number', + $Number = global[NUMBER], + Base = $Number, + proto = $Number.prototype, + // Opera ~12 has broken Object#toString + BROKEN_COF = cof(__webpack_require__(78)(proto)) == NUMBER, + TRIM = 'trim' in String.prototype; + + // 7.1.3 ToNumber(argument) + var toNumber = function (argument) { + var it = toPrimitive(argument, false); + if (typeof it == 'string' && it.length > 2) { + it = TRIM ? it.trim() : $trim(it, 3); + var first = it.charCodeAt(0), + third, + radix, + maxCode; + if (first === 43 || first === 45) { + third = it.charCodeAt(2); + if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix + } else if (first === 48) { + switch (it.charCodeAt(1)) { + case 66: + case 98: + radix = 2; + maxCode = 49; + break; // fast equal /^0b[01]+$/i + case 79: + case 111: + radix = 8; + maxCode = 55; + break; // fast equal /^0o[0-7]+$/i + default: + return +it; + } + for (var digits = it.slice(2), i = 0, l = digits.length, code; i < l; i++) { + code = digits.charCodeAt(i); + // parseInt parses a string to a first unavailable symbol + // but ToNumber should return NaN if a string contains unavailable symbols + if (code < 48 || code > maxCode) return NaN; + } + return parseInt(digits, radix); + } + } + return +it; + }; + + if (!$Number(' 0o1') || !$Number('0b1') || $Number('+0x1')) { + $Number = function Number(value) { + var it = arguments.length < 1 ? 0 : value, + that = this; + return that instanceof $Number && + // check on 1..constructor(foo) case + (BROKEN_COF + ? fails(function () { + proto.valueOf.call(that); + }) + : cof(that) != NUMBER) + ? inheritIfRequired(new Base(toNumber(it)), that, $Number) + : toNumber(it); + }; + for ( + var keys = __webpack_require__(14) + ? gOPN(Base) + : // ES3: + ( + 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' + + // ES6 (in case, if modules with ES6 Number statics required before): + 'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' + + 'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger' + ).split(','), + j = 0, + key; + keys.length > j; + j++ + ) { + if (has(Base, (key = keys[j])) && !has($Number, key)) { + dP($Number, key, gOPD(Base, key)); + } + } + $Number.prototype = proto; + proto.constructor = $Number; + __webpack_require__(30)(global, NUMBER, $Number); + } + + /***/ + }, + /* 578 */ + /***/ function (module, exports, __webpack_require__) { + // 20.1.2.1 Number.EPSILON + var $export = __webpack_require__(0); + + $export($export.S, 'Number', { EPSILON: Math.pow(2, -52) }); + + /***/ + }, + /* 579 */ + /***/ function (module, exports, __webpack_require__) { + // 20.1.2.2 Number.isFinite(number) + var $export = __webpack_require__(0), + _isFinite = __webpack_require__(8).isFinite; + + $export($export.S, 'Number', { + isFinite: function isFinite(it) { + return typeof it == 'number' && _isFinite(it); + }, + }); + + /***/ + }, + /* 580 */ + /***/ function (module, exports, __webpack_require__) { + // 20.1.2.3 Number.isInteger(number) + var $export = __webpack_require__(0); + + $export($export.S, 'Number', { isInteger: __webpack_require__(281) }); + + /***/ + }, + /* 581 */ + /***/ function (module, exports, __webpack_require__) { + // 20.1.2.4 Number.isNaN(number) + var $export = __webpack_require__(0); + + $export($export.S, 'Number', { + isNaN: function isNaN(number) { + return number != number; + }, + }); + + /***/ + }, + /* 582 */ + /***/ function (module, exports, __webpack_require__) { + // 20.1.2.5 Number.isSafeInteger(number) + var $export = __webpack_require__(0), + isInteger = __webpack_require__(281), + abs = Math.abs; + + $export($export.S, 'Number', { + isSafeInteger: function isSafeInteger(number) { + return isInteger(number) && abs(number) <= 0x1fffffffffffff; + }, + }); + + /***/ + }, + /* 583 */ + /***/ function (module, exports, __webpack_require__) { + // 20.1.2.6 Number.MAX_SAFE_INTEGER + var $export = __webpack_require__(0); + + $export($export.S, 'Number', { MAX_SAFE_INTEGER: 0x1fffffffffffff }); + + /***/ + }, + /* 584 */ + /***/ function (module, exports, __webpack_require__) { + // 20.1.2.10 Number.MIN_SAFE_INTEGER + var $export = __webpack_require__(0); + + $export($export.S, 'Number', { MIN_SAFE_INTEGER: -0x1fffffffffffff }); + + /***/ + }, + /* 585 */ + /***/ function (module, exports, __webpack_require__) { + var $export = __webpack_require__(0), + $parseFloat = __webpack_require__(291); + // 20.1.2.12 Number.parseFloat(string) + $export($export.S + $export.F * (Number.parseFloat != $parseFloat), 'Number', { + parseFloat: $parseFloat, + }); + + /***/ + }, + /* 586 */ + /***/ function (module, exports, __webpack_require__) { + var $export = __webpack_require__(0), + $parseInt = __webpack_require__(292); + // 20.1.2.13 Number.parseInt(string, radix) + $export($export.S + $export.F * (Number.parseInt != $parseInt), 'Number', { parseInt: $parseInt }); + + /***/ + }, + /* 587 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0), + toInteger = __webpack_require__(65), + aNumberValue = __webpack_require__(272), + repeat = __webpack_require__(186), + $toFixed = (1).toFixed, + floor = Math.floor, + data = [0, 0, 0, 0, 0, 0], + ERROR = 'Number.toFixed: incorrect invocation!', + ZERO = '0'; + + var multiply = function (n, c) { + var i = -1, + c2 = c; + while (++i < 6) { + c2 += n * data[i]; + data[i] = c2 % 1e7; + c2 = floor(c2 / 1e7); + } + }; + var divide = function (n) { + var i = 6, + c = 0; + while (--i >= 0) { + c += data[i]; + data[i] = floor(c / n); + c = (c % n) * 1e7; + } + }; + var numToString = function () { + var i = 6, + s = ''; + while (--i >= 0) { + if (s !== '' || i === 0 || data[i] !== 0) { + var t = String(data[i]); + s = s === '' ? t : s + repeat.call(ZERO, 7 - t.length) + t; + } + } + return s; + }; + var pow = function (x, n, acc) { + return n === 0 ? acc : n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc); + }; + var log = function (x) { + var n = 0, + x2 = x; + while (x2 >= 4096) { + n += 12; + x2 /= 4096; + } + while (x2 >= 2) { + n += 1; + x2 /= 2; + } + return n; + }; + + $export( + $export.P + + $export.F * + ((!!$toFixed && + ((0.00008).toFixed(3) !== '0.000' || + (0.9).toFixed(0) !== '1' || + (1.255).toFixed(2) !== '1.25' || + (1000000000000000128).toFixed(0) !== '1000000000000000128')) || + !__webpack_require__(10)(function () { + // V8 ~ Android 4.3- + $toFixed.call({}); + })), + 'Number', + { + toFixed: function toFixed(fractionDigits) { + var x = aNumberValue(this, ERROR), + f = toInteger(fractionDigits), + s = '', + m = ZERO, + e, + z, + j, + k; + if (f < 0 || f > 20) throw RangeError(ERROR); + if (x != x) return 'NaN'; + if (x <= -1e21 || x >= 1e21) return String(x); + if (x < 0) { + s = '-'; + x = -x; + } + if (x > 1e-21) { + e = log(x * pow(2, 69, 1)) - 69; + z = e < 0 ? x * pow(2, -e, 1) : x / pow(2, e, 1); + z *= 0x10000000000000; + e = 52 - e; + if (e > 0) { + multiply(0, z); + j = f; + while (j >= 7) { + multiply(1e7, 0); + j -= 7; + } + multiply(pow(10, j, 1), 0); + j = e - 1; + while (j >= 23) { + divide(1 << 23); + j -= 23; + } + divide(1 << j); + multiply(1, 1); + divide(2); + m = numToString(); + } else { + multiply(0, z); + multiply(1 << -e, 0); + m = numToString() + repeat.call(ZERO, f); + } + } + if (f > 0) { + k = m.length; + m = + s + (k <= f ? '0.' + repeat.call(ZERO, f - k) + m : m.slice(0, k - f) + '.' + m.slice(k - f)); + } else { + m = s + m; + } + return m; + }, + }, + ); + + /***/ + }, + /* 588 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0), + $fails = __webpack_require__(10), + aNumberValue = __webpack_require__(272), + $toPrecision = (1).toPrecision; + + $export( + $export.P + + $export.F * + ($fails(function () { + // IE7- + return $toPrecision.call(1, undefined) !== '1'; + }) || + !$fails(function () { + // V8 ~ Android 4.3- + $toPrecision.call({}); + })), + 'Number', + { + toPrecision: function toPrecision(precision) { + var that = aNumberValue(this, 'Number#toPrecision: incorrect invocation!'); + return precision === undefined ? $toPrecision.call(that) : $toPrecision.call(that, precision); + }, + }, + ); + + /***/ + }, + /* 589 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.3.1 Object.assign(target, source) + var $export = __webpack_require__(0); + + $export($export.S + $export.F, 'Object', { assign: __webpack_require__(285) }); + + /***/ + }, + /* 590 */ + /***/ function (module, exports, __webpack_require__) { + var $export = __webpack_require__(0); + // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) + $export($export.S, 'Object', { create: __webpack_require__(78) }); + + /***/ + }, + /* 591 */ + /***/ function (module, exports, __webpack_require__) { + var $export = __webpack_require__(0); + // 19.1.2.3 / 15.2.3.7 Object.defineProperties(O, Properties) + $export($export.S + $export.F * !__webpack_require__(14), 'Object', { + defineProperties: __webpack_require__(286), + }); + + /***/ + }, + /* 592 */ + /***/ function (module, exports, __webpack_require__) { + var $export = __webpack_require__(0); + // 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes) + $export($export.S + $export.F * !__webpack_require__(14), 'Object', { + defineProperty: __webpack_require__(15).f, + }); + + /***/ + }, + /* 593 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.5 Object.freeze(O) + var isObject = __webpack_require__(11), + meta = __webpack_require__(63).onFreeze; + + __webpack_require__(49)('freeze', function ($freeze) { + return function freeze(it) { + return $freeze && isObject(it) ? $freeze(meta(it)) : it; + }; + }); + + /***/ + }, + /* 594 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) + var toIObject = __webpack_require__(32), + $getOwnPropertyDescriptor = __webpack_require__(36).f; + + __webpack_require__(49)('getOwnPropertyDescriptor', function () { + return function getOwnPropertyDescriptor(it, key) { + return $getOwnPropertyDescriptor(toIObject(it), key); + }; + }); + + /***/ + }, + /* 595 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.7 Object.getOwnPropertyNames(O) + __webpack_require__(49)('getOwnPropertyNames', function () { + return __webpack_require__(287).f; + }); + + /***/ + }, + /* 596 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.9 Object.getPrototypeOf(O) + var toObject = __webpack_require__(20), + $getPrototypeOf = __webpack_require__(37); + + __webpack_require__(49)('getPrototypeOf', function () { + return function getPrototypeOf(it) { + return $getPrototypeOf(toObject(it)); + }; + }); + + /***/ + }, + /* 597 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.11 Object.isExtensible(O) + var isObject = __webpack_require__(11); + + __webpack_require__(49)('isExtensible', function ($isExtensible) { + return function isExtensible(it) { + return isObject(it) ? ($isExtensible ? $isExtensible(it) : true) : false; + }; + }); + + /***/ + }, + /* 598 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.12 Object.isFrozen(O) + var isObject = __webpack_require__(11); + + __webpack_require__(49)('isFrozen', function ($isFrozen) { + return function isFrozen(it) { + return isObject(it) ? ($isFrozen ? $isFrozen(it) : false) : true; + }; + }); + + /***/ + }, + /* 599 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.13 Object.isSealed(O) + var isObject = __webpack_require__(11); + + __webpack_require__(49)('isSealed', function ($isSealed) { + return function isSealed(it) { + return isObject(it) ? ($isSealed ? $isSealed(it) : false) : true; + }; + }); + + /***/ + }, + /* 600 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.3.10 Object.is(value1, value2) + var $export = __webpack_require__(0); + $export($export.S, 'Object', { is: __webpack_require__(293) }); + + /***/ + }, + /* 601 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.14 Object.keys(O) + var toObject = __webpack_require__(20), + $keys = __webpack_require__(80); + + __webpack_require__(49)('keys', function () { + return function keys(it) { + return $keys(toObject(it)); + }; + }); + + /***/ + }, + /* 602 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.15 Object.preventExtensions(O) + var isObject = __webpack_require__(11), + meta = __webpack_require__(63).onFreeze; + + __webpack_require__(49)('preventExtensions', function ($preventExtensions) { + return function preventExtensions(it) { + return $preventExtensions && isObject(it) ? $preventExtensions(meta(it)) : it; + }; + }); + + /***/ + }, + /* 603 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.17 Object.seal(O) + var isObject = __webpack_require__(11), + meta = __webpack_require__(63).onFreeze; + + __webpack_require__(49)('seal', function ($seal) { + return function seal(it) { + return $seal && isObject(it) ? $seal(meta(it)) : it; + }; + }); + + /***/ + }, + /* 604 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.3.19 Object.setPrototypeOf(O, proto) + var $export = __webpack_require__(0); + $export($export.S, 'Object', { setPrototypeOf: __webpack_require__(181).set }); + + /***/ + }, + /* 605 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // 19.1.3.6 Object.prototype.toString() + var classof = __webpack_require__(119), + test = {}; + test[__webpack_require__(12)('toStringTag')] = 'z'; + if (test + '' != '[object z]') { + __webpack_require__(30)( + Object.prototype, + 'toString', + function toString() { + return '[object ' + classof(this) + ']'; + }, + true, + ); + } + + /***/ + }, + /* 606 */ + /***/ function (module, exports, __webpack_require__) { + var $export = __webpack_require__(0), + $parseFloat = __webpack_require__(291); + // 18.2.4 parseFloat(string) + $export($export.G + $export.F * (parseFloat != $parseFloat), { parseFloat: $parseFloat }); + + /***/ + }, + /* 607 */ + /***/ function (module, exports, __webpack_require__) { + var $export = __webpack_require__(0), + $parseInt = __webpack_require__(292); + // 18.2.5 parseInt(string, radix) + $export($export.G + $export.F * (parseInt != $parseInt), { parseInt: $parseInt }); + + /***/ + }, + /* 608 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var LIBRARY = __webpack_require__(77), + global = __webpack_require__(8), + ctx = __webpack_require__(56), + classof = __webpack_require__(119), + $export = __webpack_require__(0), + isObject = __webpack_require__(11), + aFunction = __webpack_require__(28), + anInstance = __webpack_require__(76), + forOf = __webpack_require__(95), + speciesConstructor = __webpack_require__(183), + task = __webpack_require__(188).set, + microtask = __webpack_require__(180)(), + PROMISE = 'Promise', + TypeError = global.TypeError, + process = global.process, + $Promise = global[PROMISE], + process = global.process, + isNode = classof(process) == 'process', + empty = function () { + /* empty */ + }, + Internal, + GenericPromiseCapability, + Wrapper; + + var USE_NATIVE = !!(function () { + try { + // correct subclassing with @@species support + var promise = $Promise.resolve(1), + FakePromise = ((promise.constructor = {})[__webpack_require__(12)('species')] = function (exec) { + exec(empty, empty); + }); + // unhandled rejections tracking support, NodeJS Promise without it fails @@species test + return ( + (isNode || typeof PromiseRejectionEvent == 'function') && + promise.then(empty) instanceof FakePromise + ); + } catch (e) { + /* empty */ + } + })(); + + // helpers + var sameConstructor = function (a, b) { + // with library wrapper special case + return a === b || (a === $Promise && b === Wrapper); + }; + var isThenable = function (it) { + var then; + return isObject(it) && typeof (then = it.then) == 'function' ? then : false; + }; + var newPromiseCapability = function (C) { + return sameConstructor($Promise, C) ? new PromiseCapability(C) : new GenericPromiseCapability(C); + }; + var PromiseCapability = (GenericPromiseCapability = function (C) { + var resolve, reject; + this.promise = new C(function ($$resolve, $$reject) { + if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor'); + resolve = $$resolve; + reject = $$reject; + }); + this.resolve = aFunction(resolve); + this.reject = aFunction(reject); + }); + var perform = function (exec) { + try { + exec(); + } catch (e) { + return { error: e }; + } + }; + var notify = function (promise, isReject) { + if (promise._n) return; + promise._n = true; + var chain = promise._c; + microtask(function () { + var value = promise._v, + ok = promise._s == 1, + i = 0; + var run = function (reaction) { + var handler = ok ? reaction.ok : reaction.fail, + resolve = reaction.resolve, + reject = reaction.reject, + domain = reaction.domain, + result, + then; + try { + if (handler) { + if (!ok) { + if (promise._h == 2) onHandleUnhandled(promise); + promise._h = 1; + } + if (handler === true) result = value; + else { + if (domain) domain.enter(); + result = handler(value); + if (domain) domain.exit(); + } + if (result === reaction.promise) { + reject(TypeError('Promise-chain cycle')); + } else if ((then = isThenable(result))) { + then.call(result, resolve, reject); + } else resolve(result); + } else reject(value); + } catch (e) { + reject(e); + } + }; + while (chain.length > i) run(chain[i++]); // variable length - can't use forEach + promise._c = []; + promise._n = false; + if (isReject && !promise._h) onUnhandled(promise); + }); + }; + var onUnhandled = function (promise) { + task.call(global, function () { + var value = promise._v, + abrupt, + handler, + console; + if (isUnhandled(promise)) { + abrupt = perform(function () { + if (isNode) { + process.emit('unhandledRejection', value, promise); + } else if ((handler = global.onunhandledrejection)) { + handler({ promise: promise, reason: value }); + } else if ((console = global.console) && console.error) { + console.error('Unhandled promise rejection', value); + } + }); + // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should + promise._h = isNode || isUnhandled(promise) ? 2 : 1; + } + promise._a = undefined; + if (abrupt) throw abrupt.error; + }); + }; + var isUnhandled = function (promise) { + if (promise._h == 1) return false; + var chain = promise._a || promise._c, + i = 0, + reaction; + while (chain.length > i) { + reaction = chain[i++]; + if (reaction.fail || !isUnhandled(reaction.promise)) return false; + } + return true; + }; + var onHandleUnhandled = function (promise) { + task.call(global, function () { + var handler; + if (isNode) { + process.emit('rejectionHandled', promise); + } else if ((handler = global.onrejectionhandled)) { + handler({ promise: promise, reason: promise._v }); + } + }); + }; + var $reject = function (value) { + var promise = this; + if (promise._d) return; + promise._d = true; + promise = promise._w || promise; // unwrap + promise._v = value; + promise._s = 2; + if (!promise._a) promise._a = promise._c.slice(); + notify(promise, true); + }; + var $resolve = function (value) { + var promise = this, + then; + if (promise._d) return; + promise._d = true; + promise = promise._w || promise; // unwrap + try { + if (promise === value) throw TypeError("Promise can't be resolved itself"); + if ((then = isThenable(value))) { + microtask(function () { + var wrapper = { _w: promise, _d: false }; // wrap + try { + then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1)); + } catch (e) { + $reject.call(wrapper, e); + } + }); + } else { + promise._v = value; + promise._s = 1; + notify(promise, false); + } + } catch (e) { + $reject.call({ _w: promise, _d: false }, e); // wrap + } + }; + + // constructor polyfill + if (!USE_NATIVE) { + // 25.4.3.1 Promise(executor) + $Promise = function Promise(executor) { + anInstance(this, $Promise, PROMISE, '_h'); + aFunction(executor); + Internal.call(this); + try { + executor(ctx($resolve, this, 1), ctx($reject, this, 1)); + } catch (err) { + $reject.call(this, err); + } + }; + Internal = function Promise(executor) { + this._c = []; // <- awaiting reactions + this._a = undefined; // <- checked in isUnhandled reactions + this._s = 0; // <- state + this._d = false; // <- done + this._v = undefined; // <- value + this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled + this._n = false; // <- notify + }; + Internal.prototype = __webpack_require__(81)($Promise.prototype, { + // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected) + then: function then(onFulfilled, onRejected) { + var reaction = newPromiseCapability(speciesConstructor(this, $Promise)); + reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true; + reaction.fail = typeof onRejected == 'function' && onRejected; + reaction.domain = isNode ? process.domain : undefined; + this._c.push(reaction); + if (this._a) this._a.push(reaction); + if (this._s) notify(this, false); + return reaction.promise; + }, + // 25.4.5.1 Promise.prototype.catch(onRejected) + catch: function (onRejected) { + return this.then(undefined, onRejected); + }, + }); + PromiseCapability = function () { + var promise = new Internal(); + this.promise = promise; + this.resolve = ctx($resolve, promise, 1); + this.reject = ctx($reject, promise, 1); + }; + } + + $export($export.G + $export.W + $export.F * !USE_NATIVE, { Promise: $Promise }); + __webpack_require__(97)($Promise, PROMISE); + __webpack_require__(82)(PROMISE); + Wrapper = __webpack_require__(55)[PROMISE]; + + // statics + $export($export.S + $export.F * !USE_NATIVE, PROMISE, { + // 25.4.4.5 Promise.reject(r) + reject: function reject(r) { + var capability = newPromiseCapability(this), + $$reject = capability.reject; + $$reject(r); + return capability.promise; + }, + }); + $export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, { + // 25.4.4.6 Promise.resolve(x) + resolve: function resolve(x) { + // instanceof instead of internal slot check because we should fix it without replacement native Promise core + if (x instanceof $Promise && sameConstructor(x.constructor, this)) return x; + var capability = newPromiseCapability(this), + $$resolve = capability.resolve; + $$resolve(x); + return capability.promise; + }, + }); + $export( + $export.S + + $export.F * + !( + USE_NATIVE && + __webpack_require__(141)(function (iter) { + $Promise.all(iter)['catch'](empty); + }) + ), + PROMISE, + { + // 25.4.4.1 Promise.all(iterable) + all: function all(iterable) { + var C = this, + capability = newPromiseCapability(C), + resolve = capability.resolve, + reject = capability.reject; + var abrupt = perform(function () { + var values = [], + index = 0, + remaining = 1; + forOf(iterable, false, function (promise) { + var $index = index++, + alreadyCalled = false; + values.push(undefined); + remaining++; + C.resolve(promise).then(function (value) { + if (alreadyCalled) return; + alreadyCalled = true; + values[$index] = value; + --remaining || resolve(values); + }, reject); + }); + --remaining || resolve(values); + }); + if (abrupt) reject(abrupt.error); + return capability.promise; + }, + // 25.4.4.4 Promise.race(iterable) + race: function race(iterable) { + var C = this, + capability = newPromiseCapability(C), + reject = capability.reject; + var abrupt = perform(function () { + forOf(iterable, false, function (promise) { + C.resolve(promise).then(capability.resolve, reject); + }); + }); + if (abrupt) reject(abrupt.error); + return capability.promise; + }, + }, + ); + + /***/ + }, + /* 609 */ + /***/ function (module, exports, __webpack_require__) { + // 26.1.1 Reflect.apply(target, thisArgument, argumentsList) + var $export = __webpack_require__(0), + aFunction = __webpack_require__(28), + anObject = __webpack_require__(5), + rApply = (__webpack_require__(8).Reflect || {}).apply, + fApply = Function.apply; + // MS Edge argumentsList argument is optional + $export( + $export.S + + $export.F * + !__webpack_require__(10)(function () { + rApply(function () {}); + }), + 'Reflect', + { + apply: function apply(target, thisArgument, argumentsList) { + var T = aFunction(target), + L = anObject(argumentsList); + return rApply ? rApply(T, thisArgument, L) : fApply.call(T, thisArgument, L); + }, + }, + ); + + /***/ + }, + /* 610 */ + /***/ function (module, exports, __webpack_require__) { + // 26.1.2 Reflect.construct(target, argumentsList [, newTarget]) + var $export = __webpack_require__(0), + create = __webpack_require__(78), + aFunction = __webpack_require__(28), + anObject = __webpack_require__(5), + isObject = __webpack_require__(11), + fails = __webpack_require__(10), + bind = __webpack_require__(276), + rConstruct = (__webpack_require__(8).Reflect || {}).construct; + + // MS Edge supports only 2 arguments and argumentsList argument is optional + // FF Nightly sets third argument as `new.target`, but does not create `this` from it + var NEW_TARGET_BUG = fails(function () { + function F() {} + return !(rConstruct(function () {}, [], F) instanceof F); + }); + var ARGS_BUG = !fails(function () { + rConstruct(function () {}); + }); + + $export($export.S + $export.F * (NEW_TARGET_BUG || ARGS_BUG), 'Reflect', { + construct: function construct(Target, args /*, newTarget*/) { + aFunction(Target); + anObject(args); + var newTarget = arguments.length < 3 ? Target : aFunction(arguments[2]); + if (ARGS_BUG && !NEW_TARGET_BUG) return rConstruct(Target, args, newTarget); + if (Target == newTarget) { + // w/o altered newTarget, optimization for 0-4 arguments + switch (args.length) { + case 0: + return new Target(); + case 1: + return new Target(args[0]); + case 2: + return new Target(args[0], args[1]); + case 3: + return new Target(args[0], args[1], args[2]); + case 4: + return new Target(args[0], args[1], args[2], args[3]); + } + // w/o altered newTarget, lot of arguments case + var $args = [null]; + $args.push.apply($args, args); + return new (bind.apply(Target, $args))(); + } + // with altered newTarget, not support built-in constructors + var proto = newTarget.prototype, + instance = create(isObject(proto) ? proto : Object.prototype), + result = Function.apply.call(Target, instance, args); + return isObject(result) ? result : instance; + }, + }); + + /***/ + }, + /* 611 */ + /***/ function (module, exports, __webpack_require__) { + // 26.1.3 Reflect.defineProperty(target, propertyKey, attributes) + var dP = __webpack_require__(15), + $export = __webpack_require__(0), + anObject = __webpack_require__(5), + toPrimitive = __webpack_require__(50); + + // MS Edge has broken Reflect.defineProperty - throwing instead of returning false + $export( + $export.S + + $export.F * + __webpack_require__(10)(function () { + Reflect.defineProperty(dP.f({}, 1, { value: 1 }), 1, { value: 2 }); + }), + 'Reflect', + { + defineProperty: function defineProperty(target, propertyKey, attributes) { + anObject(target); + propertyKey = toPrimitive(propertyKey, true); + anObject(attributes); + try { + dP.f(target, propertyKey, attributes); + return true; + } catch (e) { + return false; + } + }, + }, + ); + + /***/ + }, + /* 612 */ + /***/ function (module, exports, __webpack_require__) { + // 26.1.4 Reflect.deleteProperty(target, propertyKey) + var $export = __webpack_require__(0), + gOPD = __webpack_require__(36).f, + anObject = __webpack_require__(5); + + $export($export.S, 'Reflect', { + deleteProperty: function deleteProperty(target, propertyKey) { + var desc = gOPD(anObject(target), propertyKey); + return desc && !desc.configurable ? false : delete target[propertyKey]; + }, + }); + + /***/ + }, + /* 613 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // 26.1.5 Reflect.enumerate(target) + var $export = __webpack_require__(0), + anObject = __webpack_require__(5); + var Enumerate = function (iterated) { + this._t = anObject(iterated); // target + this._i = 0; // next index + var keys = (this._k = []), // keys + key; + for (key in iterated) keys.push(key); + }; + __webpack_require__(176)(Enumerate, 'Object', function () { + var that = this, + keys = that._k, + key; + do { + if (that._i >= keys.length) return { value: undefined, done: true }; + } while (!((key = keys[that._i++]) in that._t)); + return { value: key, done: false }; + }); + + $export($export.S, 'Reflect', { + enumerate: function enumerate(target) { + return new Enumerate(target); + }, + }); + + /***/ + }, + /* 614 */ + /***/ function (module, exports, __webpack_require__) { + // 26.1.7 Reflect.getOwnPropertyDescriptor(target, propertyKey) + var gOPD = __webpack_require__(36), + $export = __webpack_require__(0), + anObject = __webpack_require__(5); + + $export($export.S, 'Reflect', { + getOwnPropertyDescriptor: function getOwnPropertyDescriptor(target, propertyKey) { + return gOPD.f(anObject(target), propertyKey); + }, + }); + + /***/ + }, + /* 615 */ + /***/ function (module, exports, __webpack_require__) { + // 26.1.8 Reflect.getPrototypeOf(target) + var $export = __webpack_require__(0), + getProto = __webpack_require__(37), + anObject = __webpack_require__(5); + + $export($export.S, 'Reflect', { + getPrototypeOf: function getPrototypeOf(target) { + return getProto(anObject(target)); + }, + }); + + /***/ + }, + /* 616 */ + /***/ function (module, exports, __webpack_require__) { + // 26.1.6 Reflect.get(target, propertyKey [, receiver]) + var gOPD = __webpack_require__(36), + getPrototypeOf = __webpack_require__(37), + has = __webpack_require__(27), + $export = __webpack_require__(0), + isObject = __webpack_require__(11), + anObject = __webpack_require__(5); + + function get(target, propertyKey /*, receiver*/) { + var receiver = arguments.length < 3 ? target : arguments[2], + desc, + proto; + if (anObject(target) === receiver) return target[propertyKey]; + if ((desc = gOPD.f(target, propertyKey))) + return has(desc, 'value') + ? desc.value + : desc.get !== undefined + ? desc.get.call(receiver) + : undefined; + if (isObject((proto = getPrototypeOf(target)))) return get(proto, propertyKey, receiver); + } + + $export($export.S, 'Reflect', { get: get }); + + /***/ + }, + /* 617 */ + /***/ function (module, exports, __webpack_require__) { + // 26.1.9 Reflect.has(target, propertyKey) + var $export = __webpack_require__(0); + + $export($export.S, 'Reflect', { + has: function has(target, propertyKey) { + return propertyKey in target; + }, + }); + + /***/ + }, + /* 618 */ + /***/ function (module, exports, __webpack_require__) { + // 26.1.10 Reflect.isExtensible(target) + var $export = __webpack_require__(0), + anObject = __webpack_require__(5), + $isExtensible = Object.isExtensible; + + $export($export.S, 'Reflect', { + isExtensible: function isExtensible(target) { + anObject(target); + return $isExtensible ? $isExtensible(target) : true; + }, + }); + + /***/ + }, + /* 619 */ + /***/ function (module, exports, __webpack_require__) { + // 26.1.11 Reflect.ownKeys(target) + var $export = __webpack_require__(0); + + $export($export.S, 'Reflect', { ownKeys: __webpack_require__(290) }); + + /***/ + }, + /* 620 */ + /***/ function (module, exports, __webpack_require__) { + // 26.1.12 Reflect.preventExtensions(target) + var $export = __webpack_require__(0), + anObject = __webpack_require__(5), + $preventExtensions = Object.preventExtensions; + + $export($export.S, 'Reflect', { + preventExtensions: function preventExtensions(target) { + anObject(target); + try { + if ($preventExtensions) $preventExtensions(target); + return true; + } catch (e) { + return false; + } + }, + }); + + /***/ + }, + /* 621 */ + /***/ function (module, exports, __webpack_require__) { + // 26.1.14 Reflect.setPrototypeOf(target, proto) + var $export = __webpack_require__(0), + setProto = __webpack_require__(181); + + if (setProto) + $export($export.S, 'Reflect', { + setPrototypeOf: function setPrototypeOf(target, proto) { + setProto.check(target, proto); + try { + setProto.set(target, proto); + return true; + } catch (e) { + return false; + } + }, + }); + + /***/ + }, + /* 622 */ + /***/ function (module, exports, __webpack_require__) { + // 26.1.13 Reflect.set(target, propertyKey, V [, receiver]) + var dP = __webpack_require__(15), + gOPD = __webpack_require__(36), + getPrototypeOf = __webpack_require__(37), + has = __webpack_require__(27), + $export = __webpack_require__(0), + createDesc = __webpack_require__(64), + anObject = __webpack_require__(5), + isObject = __webpack_require__(11); + + function set(target, propertyKey, V /*, receiver*/) { + var receiver = arguments.length < 4 ? target : arguments[3], + ownDesc = gOPD.f(anObject(target), propertyKey), + existingDescriptor, + proto; + if (!ownDesc) { + if (isObject((proto = getPrototypeOf(target)))) { + return set(proto, propertyKey, V, receiver); + } + ownDesc = createDesc(0); + } + if (has(ownDesc, 'value')) { + if (ownDesc.writable === false || !isObject(receiver)) return false; + existingDescriptor = gOPD.f(receiver, propertyKey) || createDesc(0); + existingDescriptor.value = V; + dP.f(receiver, propertyKey, existingDescriptor); + return true; + } + return ownDesc.set === undefined ? false : (ownDesc.set.call(receiver, V), true); + } + + $export($export.S, 'Reflect', { set: set }); + + /***/ + }, + /* 623 */ + /***/ function (module, exports, __webpack_require__) { + var global = __webpack_require__(8), + inheritIfRequired = __webpack_require__(173), + dP = __webpack_require__(15).f, + gOPN = __webpack_require__(79).f, + isRegExp = __webpack_require__(140), + $flags = __webpack_require__(138), + $RegExp = global.RegExp, + Base = $RegExp, + proto = $RegExp.prototype, + re1 = /a/g, + re2 = /a/g, + // "new" creates a new object, old webkit buggy here + CORRECT_NEW = new $RegExp(re1) !== re1; + + if ( + __webpack_require__(14) && + (!CORRECT_NEW || + __webpack_require__(10)(function () { + re2[__webpack_require__(12)('match')] = false; + // RegExp constructor can alter flags and IsRegExp works correct with @@match + return $RegExp(re1) != re1 || $RegExp(re2) == re2 || $RegExp(re1, 'i') != '/a/i'; + })) + ) { + $RegExp = function RegExp(p, f) { + var tiRE = this instanceof $RegExp, + piRE = isRegExp(p), + fiU = f === undefined; + return !tiRE && piRE && p.constructor === $RegExp && fiU + ? p + : inheritIfRequired( + CORRECT_NEW + ? new Base(piRE && !fiU ? p.source : p, f) + : Base((piRE = p instanceof $RegExp) ? p.source : p, piRE && fiU ? $flags.call(p) : f), + tiRE ? this : proto, + $RegExp, + ); + }; + var proxy = function (key) { + key in $RegExp || + dP($RegExp, key, { + configurable: true, + get: function () { + return Base[key]; + }, + set: function (it) { + Base[key] = it; + }, + }); + }; + for (var keys = gOPN(Base), i = 0; keys.length > i; ) proxy(keys[i++]); + proto.constructor = $RegExp; + $RegExp.prototype = proto; + __webpack_require__(30)(global, 'RegExp', $RegExp); + } + + __webpack_require__(82)('RegExp'); + + /***/ + }, + /* 624 */ + /***/ function (module, exports, __webpack_require__) { + // @@match logic + __webpack_require__(137)('match', 1, function (defined, MATCH, $match) { + // 21.1.3.11 String.prototype.match(regexp) + return [ + function match(regexp) { + 'use strict'; + var O = defined(this), + fn = regexp == undefined ? undefined : regexp[MATCH]; + return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[MATCH](String(O)); + }, + $match, + ]; + }); + + /***/ + }, + /* 625 */ + /***/ function (module, exports, __webpack_require__) { + // @@replace logic + __webpack_require__(137)('replace', 2, function (defined, REPLACE, $replace) { + // 21.1.3.14 String.prototype.replace(searchValue, replaceValue) + return [ + function replace(searchValue, replaceValue) { + 'use strict'; + var O = defined(this), + fn = searchValue == undefined ? undefined : searchValue[REPLACE]; + return fn !== undefined + ? fn.call(searchValue, O, replaceValue) + : $replace.call(String(O), searchValue, replaceValue); + }, + $replace, + ]; + }); + + /***/ + }, + /* 626 */ + /***/ function (module, exports, __webpack_require__) { + // @@search logic + __webpack_require__(137)('search', 1, function (defined, SEARCH, $search) { + // 21.1.3.15 String.prototype.search(regexp) + return [ + function search(regexp) { + 'use strict'; + var O = defined(this), + fn = regexp == undefined ? undefined : regexp[SEARCH]; + return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O)); + }, + $search, + ]; + }); + + /***/ + }, + /* 627 */ + /***/ function (module, exports, __webpack_require__) { + // @@split logic + __webpack_require__(137)('split', 2, function (defined, SPLIT, $split) { + 'use strict'; + var isRegExp = __webpack_require__(140), + _split = $split, + $push = [].push, + $SPLIT = 'split', + LENGTH = 'length', + LAST_INDEX = 'lastIndex'; + if ( + 'abbc'[$SPLIT](/(b)*/)[1] == 'c' || + 'test'[$SPLIT](/(?:)/, -1)[LENGTH] != 4 || + 'ab'[$SPLIT](/(?:ab)*/)[LENGTH] != 2 || + '.'[$SPLIT](/(.?)(.?)/)[LENGTH] != 4 || + '.'[$SPLIT](/()()/)[LENGTH] > 1 || + ''[$SPLIT](/.?/)[LENGTH] + ) { + var NPCG = /()??/.exec('')[1] === undefined; // nonparticipating capturing group + // based on es5-shim implementation, need to rework it + $split = function (separator, limit) { + var string = String(this); + if (separator === undefined && limit === 0) return []; + // If `separator` is not a regex, use native split + if (!isRegExp(separator)) return _split.call(string, separator, limit); + var output = []; + var flags = + (separator.ignoreCase ? 'i' : '') + + (separator.multiline ? 'm' : '') + + (separator.unicode ? 'u' : '') + + (separator.sticky ? 'y' : ''); + var lastLastIndex = 0; + var splitLimit = limit === undefined ? 4294967295 : limit >>> 0; + // Make `global` and avoid `lastIndex` issues by working with a copy + var separatorCopy = new RegExp(separator.source, flags + 'g'); + var separator2, match, lastIndex, lastLength, i; + // Doesn't need flags gy, but they don't hurt + if (!NPCG) separator2 = new RegExp('^' + separatorCopy.source + '$(?!\\s)', flags); + while ((match = separatorCopy.exec(string))) { + // `separatorCopy.lastIndex` is not reliable cross-browser + lastIndex = match.index + match[0][LENGTH]; + if (lastIndex > lastLastIndex) { + output.push(string.slice(lastLastIndex, match.index)); + // Fix browsers whose `exec` methods don't consistently return `undefined` for NPCG + if (!NPCG && match[LENGTH] > 1) + match[0].replace(separator2, function () { + for (i = 1; i < arguments[LENGTH] - 2; i++) + if (arguments[i] === undefined) match[i] = undefined; + }); + if (match[LENGTH] > 1 && match.index < string[LENGTH]) $push.apply(output, match.slice(1)); + lastLength = match[0][LENGTH]; + lastLastIndex = lastIndex; + if (output[LENGTH] >= splitLimit) break; + } + if (separatorCopy[LAST_INDEX] === match.index) separatorCopy[LAST_INDEX]++; // Avoid an infinite loop + } + if (lastLastIndex === string[LENGTH]) { + if (lastLength || !separatorCopy.test('')) output.push(''); + } else output.push(string.slice(lastLastIndex)); + return output[LENGTH] > splitLimit ? output.slice(0, splitLimit) : output; + }; + // Chakra, V8 + } else if ('0'[$SPLIT](undefined, 0)[LENGTH]) { + $split = function (separator, limit) { + return separator === undefined && limit === 0 ? [] : _split.call(this, separator, limit); + }; + } + // 21.1.3.17 String.prototype.split(separator, limit) + return [ + function split(separator, limit) { + var O = defined(this), + fn = separator == undefined ? undefined : separator[SPLIT]; + return fn !== undefined ? fn.call(separator, O, limit) : $split.call(String(O), separator, limit); + }, + $split, + ]; + }); + + /***/ + }, + /* 628 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + __webpack_require__(297); + var anObject = __webpack_require__(5), + $flags = __webpack_require__(138), + DESCRIPTORS = __webpack_require__(14), + TO_STRING = 'toString', + $toString = /./[TO_STRING]; + + var define = function (fn) { + __webpack_require__(30)(RegExp.prototype, TO_STRING, fn, true); + }; + + // 21.2.5.14 RegExp.prototype.toString() + if ( + __webpack_require__(10)(function () { + return $toString.call({ source: 'a', flags: 'b' }) != '/a/b'; + }) + ) { + define(function toString() { + var R = anObject(this); + return '/'.concat( + R.source, + '/', + 'flags' in R ? R.flags : !DESCRIPTORS && R instanceof RegExp ? $flags.call(R) : undefined, + ); + }); + // FF44- RegExp#toString has a wrong name + } else if ($toString.name != TO_STRING) { + define(function toString() { + return $toString.call(this); + }); + } + + /***/ + }, + /* 629 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // B.2.3.2 String.prototype.anchor(name) + __webpack_require__(31)('anchor', function (createHTML) { + return function anchor(name) { + return createHTML(this, 'a', 'name', name); + }; + }); + + /***/ + }, + /* 630 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // B.2.3.3 String.prototype.big() + __webpack_require__(31)('big', function (createHTML) { + return function big() { + return createHTML(this, 'big', '', ''); + }; + }); + + /***/ + }, + /* 631 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // B.2.3.4 String.prototype.blink() + __webpack_require__(31)('blink', function (createHTML) { + return function blink() { + return createHTML(this, 'blink', '', ''); + }; + }); + + /***/ + }, + /* 632 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // B.2.3.5 String.prototype.bold() + __webpack_require__(31)('bold', function (createHTML) { + return function bold() { + return createHTML(this, 'b', '', ''); + }; + }); + + /***/ + }, + /* 633 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0), + $at = __webpack_require__(184)(false); + $export($export.P, 'String', { + // 21.1.3.3 String.prototype.codePointAt(pos) + codePointAt: function codePointAt(pos) { + return $at(this, pos); + }, + }); + + /***/ + }, + /* 634 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + // 21.1.3.6 String.prototype.endsWith(searchString [, endPosition]) + + var $export = __webpack_require__(0), + toLength = __webpack_require__(19), + context = __webpack_require__(185), + ENDS_WITH = 'endsWith', + $endsWith = ''[ENDS_WITH]; + + $export($export.P + $export.F * __webpack_require__(171)(ENDS_WITH), 'String', { + endsWith: function endsWith(searchString /*, endPosition = @length */) { + var that = context(this, searchString, ENDS_WITH), + endPosition = arguments.length > 1 ? arguments[1] : undefined, + len = toLength(that.length), + end = endPosition === undefined ? len : Math.min(toLength(endPosition), len), + search = String(searchString); + return $endsWith + ? $endsWith.call(that, search, end) + : that.slice(end - search.length, end) === search; + }, + }); + + /***/ + }, + /* 635 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // B.2.3.6 String.prototype.fixed() + __webpack_require__(31)('fixed', function (createHTML) { + return function fixed() { + return createHTML(this, 'tt', '', ''); + }; + }); + + /***/ + }, + /* 636 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // B.2.3.7 String.prototype.fontcolor(color) + __webpack_require__(31)('fontcolor', function (createHTML) { + return function fontcolor(color) { + return createHTML(this, 'font', 'color', color); + }; + }); + + /***/ + }, + /* 637 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // B.2.3.8 String.prototype.fontsize(size) + __webpack_require__(31)('fontsize', function (createHTML) { + return function fontsize(size) { + return createHTML(this, 'font', 'size', size); + }; + }); + + /***/ + }, + /* 638 */ + /***/ function (module, exports, __webpack_require__) { + var $export = __webpack_require__(0), + toIndex = __webpack_require__(83), + fromCharCode = String.fromCharCode, + $fromCodePoint = String.fromCodePoint; + + // length should be 1, old FF problem + $export($export.S + $export.F * (!!$fromCodePoint && $fromCodePoint.length != 1), 'String', { + // 21.1.2.2 String.fromCodePoint(...codePoints) + fromCodePoint: function fromCodePoint(x) { + // eslint-disable-line no-unused-vars + var res = [], + aLen = arguments.length, + i = 0, + code; + while (aLen > i) { + code = +arguments[i++]; + if (toIndex(code, 0x10ffff) !== code) throw RangeError(code + ' is not a valid code point'); + res.push( + code < 0x10000 + ? fromCharCode(code) + : fromCharCode(((code -= 0x10000) >> 10) + 0xd800, (code % 0x400) + 0xdc00), + ); + } + return res.join(''); + }, + }); + + /***/ + }, + /* 639 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + // 21.1.3.7 String.prototype.includes(searchString, position = 0) + + var $export = __webpack_require__(0), + context = __webpack_require__(185), + INCLUDES = 'includes'; + + $export($export.P + $export.F * __webpack_require__(171)(INCLUDES), 'String', { + includes: function includes(searchString /*, position = 0 */) { + return !!~context(this, searchString, INCLUDES).indexOf( + searchString, + arguments.length > 1 ? arguments[1] : undefined, + ); + }, + }); + + /***/ + }, + /* 640 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // B.2.3.9 String.prototype.italics() + __webpack_require__(31)('italics', function (createHTML) { + return function italics() { + return createHTML(this, 'i', '', ''); + }; + }); + + /***/ + }, + /* 641 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $at = __webpack_require__(184)(true); + + // 21.1.3.27 String.prototype[@@iterator]() + __webpack_require__(177)( + String, + 'String', + function (iterated) { + this._t = String(iterated); // target + this._i = 0; // next index + // 21.1.5.2.1 %StringIteratorPrototype%.next() + }, + function () { + var O = this._t, + index = this._i, + point; + if (index >= O.length) return { value: undefined, done: true }; + point = $at(O, index); + this._i += point.length; + return { value: point, done: false }; + }, + ); + + /***/ + }, + /* 642 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // B.2.3.10 String.prototype.link(url) + __webpack_require__(31)('link', function (createHTML) { + return function link(url) { + return createHTML(this, 'a', 'href', url); + }; + }); + + /***/ + }, + /* 643 */ + /***/ function (module, exports, __webpack_require__) { + var $export = __webpack_require__(0), + toIObject = __webpack_require__(32), + toLength = __webpack_require__(19); + + $export($export.S, 'String', { + // 21.1.2.4 String.raw(callSite, ...substitutions) + raw: function raw(callSite) { + var tpl = toIObject(callSite.raw), + len = toLength(tpl.length), + aLen = arguments.length, + res = [], + i = 0; + while (len > i) { + res.push(String(tpl[i++])); + if (i < aLen) res.push(String(arguments[i])); + } + return res.join(''); + }, + }); + + /***/ + }, + /* 644 */ + /***/ function (module, exports, __webpack_require__) { + var $export = __webpack_require__(0); + + $export($export.P, 'String', { + // 21.1.3.13 String.prototype.repeat(count) + repeat: __webpack_require__(186), + }); + + /***/ + }, + /* 645 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // B.2.3.11 String.prototype.small() + __webpack_require__(31)('small', function (createHTML) { + return function small() { + return createHTML(this, 'small', '', ''); + }; + }); + + /***/ + }, + /* 646 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + // 21.1.3.18 String.prototype.startsWith(searchString [, position ]) + + var $export = __webpack_require__(0), + toLength = __webpack_require__(19), + context = __webpack_require__(185), + STARTS_WITH = 'startsWith', + $startsWith = ''[STARTS_WITH]; + + $export($export.P + $export.F * __webpack_require__(171)(STARTS_WITH), 'String', { + startsWith: function startsWith(searchString /*, position = 0 */) { + var that = context(this, searchString, STARTS_WITH), + index = toLength(Math.min(arguments.length > 1 ? arguments[1] : undefined, that.length)), + search = String(searchString); + return $startsWith + ? $startsWith.call(that, search, index) + : that.slice(index, index + search.length) === search; + }, + }); + + /***/ + }, + /* 647 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // B.2.3.12 String.prototype.strike() + __webpack_require__(31)('strike', function (createHTML) { + return function strike() { + return createHTML(this, 'strike', '', ''); + }; + }); + + /***/ + }, + /* 648 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // B.2.3.13 String.prototype.sub() + __webpack_require__(31)('sub', function (createHTML) { + return function sub() { + return createHTML(this, 'sub', '', ''); + }; + }); + + /***/ + }, + /* 649 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // B.2.3.14 String.prototype.sup() + __webpack_require__(31)('sup', function (createHTML) { + return function sup() { + return createHTML(this, 'sup', '', ''); + }; + }); + + /***/ + }, + /* 650 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // 21.1.3.25 String.prototype.trim() + __webpack_require__(98)('trim', function ($trim) { + return function trim() { + return $trim(this, 3); + }; + }); + + /***/ + }, + /* 651 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // ECMAScript 6 symbols shim + var global = __webpack_require__(8), + has = __webpack_require__(27), + DESCRIPTORS = __webpack_require__(14), + $export = __webpack_require__(0), + redefine = __webpack_require__(30), + META = __webpack_require__(63).KEY, + $fails = __webpack_require__(10), + shared = __webpack_require__(144), + setToStringTag = __webpack_require__(97), + uid = __webpack_require__(84), + wks = __webpack_require__(12), + wksExt = __webpack_require__(295), + wksDefine = __webpack_require__(190), + keyOf = __webpack_require__(527), + enumKeys = __webpack_require__(526), + isArray = __webpack_require__(175), + anObject = __webpack_require__(5), + toIObject = __webpack_require__(32), + toPrimitive = __webpack_require__(50), + createDesc = __webpack_require__(64), + _create = __webpack_require__(78), + gOPNExt = __webpack_require__(287), + $GOPD = __webpack_require__(36), + $DP = __webpack_require__(15), + $keys = __webpack_require__(80), + gOPD = $GOPD.f, + dP = $DP.f, + gOPN = gOPNExt.f, + $Symbol = global.Symbol, + $JSON = global.JSON, + _stringify = $JSON && $JSON.stringify, + PROTOTYPE = 'prototype', + HIDDEN = wks('_hidden'), + TO_PRIMITIVE = wks('toPrimitive'), + isEnum = {}.propertyIsEnumerable, + SymbolRegistry = shared('symbol-registry'), + AllSymbols = shared('symbols'), + OPSymbols = shared('op-symbols'), + ObjectProto = Object[PROTOTYPE], + USE_NATIVE = typeof $Symbol == 'function', + QObject = global.QObject; + // Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173 + var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild; + + // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687 + var setSymbolDesc = + DESCRIPTORS && + $fails(function () { + return ( + _create( + dP({}, 'a', { + get: function () { + return dP(this, 'a', { value: 7 }).a; + }, + }), + ).a != 7 + ); + }) + ? function (it, key, D) { + var protoDesc = gOPD(ObjectProto, key); + if (protoDesc) delete ObjectProto[key]; + dP(it, key, D); + if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc); + } + : dP; + + var wrap = function (tag) { + var sym = (AllSymbols[tag] = _create($Symbol[PROTOTYPE])); + sym._k = tag; + return sym; + }; + + var isSymbol = + USE_NATIVE && typeof $Symbol.iterator == 'symbol' + ? function (it) { + return typeof it == 'symbol'; + } + : function (it) { + return it instanceof $Symbol; + }; + + var $defineProperty = function defineProperty(it, key, D) { + if (it === ObjectProto) $defineProperty(OPSymbols, key, D); + anObject(it); + key = toPrimitive(key, true); + anObject(D); + if (has(AllSymbols, key)) { + if (!D.enumerable) { + if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {})); + it[HIDDEN][key] = true; + } else { + if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false; + D = _create(D, { enumerable: createDesc(0, false) }); + } + return setSymbolDesc(it, key, D); + } + return dP(it, key, D); + }; + var $defineProperties = function defineProperties(it, P) { + anObject(it); + var keys = enumKeys((P = toIObject(P))), + i = 0, + l = keys.length, + key; + while (l > i) $defineProperty(it, (key = keys[i++]), P[key]); + return it; + }; + var $create = function create(it, P) { + return P === undefined ? _create(it) : $defineProperties(_create(it), P); + }; + var $propertyIsEnumerable = function propertyIsEnumerable(key) { + var E = isEnum.call(this, (key = toPrimitive(key, true))); + if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false; + return E || !has(this, key) || !has(AllSymbols, key) || (has(this, HIDDEN) && this[HIDDEN][key]) + ? E + : true; + }; + var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) { + it = toIObject(it); + key = toPrimitive(key, true); + if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return; + var D = gOPD(it, key); + if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true; + return D; + }; + var $getOwnPropertyNames = function getOwnPropertyNames(it) { + var names = gOPN(toIObject(it)), + result = [], + i = 0, + key; + while (names.length > i) { + if (!has(AllSymbols, (key = names[i++])) && key != HIDDEN && key != META) result.push(key); + } + return result; + }; + var $getOwnPropertySymbols = function getOwnPropertySymbols(it) { + var IS_OP = it === ObjectProto, + names = gOPN(IS_OP ? OPSymbols : toIObject(it)), + result = [], + i = 0, + key; + while (names.length > i) { + if (has(AllSymbols, (key = names[i++])) && (IS_OP ? has(ObjectProto, key) : true)) + result.push(AllSymbols[key]); + } + return result; + }; + + // 19.4.1.1 Symbol([description]) + if (!USE_NATIVE) { + $Symbol = function Symbol() { + if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!'); + var tag = uid(arguments.length > 0 ? arguments[0] : undefined); + var $set = function (value) { + if (this === ObjectProto) $set.call(OPSymbols, value); + if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false; + setSymbolDesc(this, tag, createDesc(1, value)); + }; + if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set }); + return wrap(tag); + }; + redefine($Symbol[PROTOTYPE], 'toString', function toString() { + return this._k; + }); + + $GOPD.f = $getOwnPropertyDescriptor; + $DP.f = $defineProperty; + __webpack_require__(79).f = gOPNExt.f = $getOwnPropertyNames; + __webpack_require__(121).f = $propertyIsEnumerable; + __webpack_require__(143).f = $getOwnPropertySymbols; + + if (DESCRIPTORS && !__webpack_require__(77)) { + redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true); + } + + wksExt.f = function (name) { + return wrap(wks(name)); + }; + } + + $export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol }); + + for ( + var symbols = + // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14 + 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'.split( + ',', + ), + i = 0; + symbols.length > i; + + ) + wks(symbols[i++]); + + for (var symbols = $keys(wks.store), i = 0; symbols.length > i; ) wksDefine(symbols[i++]); + + $export($export.S + $export.F * !USE_NATIVE, 'Symbol', { + // 19.4.2.1 Symbol.for(key) + for: function (key) { + return has(SymbolRegistry, (key += '')) + ? SymbolRegistry[key] + : (SymbolRegistry[key] = $Symbol(key)); + }, + // 19.4.2.5 Symbol.keyFor(sym) + keyFor: function keyFor(key) { + if (isSymbol(key)) return keyOf(SymbolRegistry, key); + throw TypeError(key + ' is not a symbol!'); + }, + useSetter: function () { + setter = true; + }, + useSimple: function () { + setter = false; + }, + }); + + $export($export.S + $export.F * !USE_NATIVE, 'Object', { + // 19.1.2.2 Object.create(O [, Properties]) + create: $create, + // 19.1.2.4 Object.defineProperty(O, P, Attributes) + defineProperty: $defineProperty, + // 19.1.2.3 Object.defineProperties(O, Properties) + defineProperties: $defineProperties, + // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) + getOwnPropertyDescriptor: $getOwnPropertyDescriptor, + // 19.1.2.7 Object.getOwnPropertyNames(O) + getOwnPropertyNames: $getOwnPropertyNames, + // 19.1.2.8 Object.getOwnPropertySymbols(O) + getOwnPropertySymbols: $getOwnPropertySymbols, + }); + + // 24.3.2 JSON.stringify(value [, replacer [, space]]) + $JSON && + $export( + $export.S + + $export.F * + (!USE_NATIVE || + $fails(function () { + var S = $Symbol(); + // MS Edge converts symbol values to JSON as {} + // WebKit converts symbol values to JSON as null + // V8 throws on boxed symbols + return ( + _stringify([S]) != '[null]' || + _stringify({ a: S }) != '{}' || + _stringify(Object(S)) != '{}' + ); + })), + 'JSON', + { + stringify: function stringify(it) { + if (it === undefined || isSymbol(it)) return; // IE8 returns string on undefined + var args = [it], + i = 1, + replacer, + $replacer; + while (arguments.length > i) args.push(arguments[i++]); + replacer = args[1]; + if (typeof replacer == 'function') $replacer = replacer; + if ($replacer || !isArray(replacer)) + replacer = function (key, value) { + if ($replacer) value = $replacer.call(this, key, value); + if (!isSymbol(value)) return value; + }; + args[1] = replacer; + return _stringify.apply($JSON, args); + }, + }, + ); + + // 19.4.3.4 Symbol.prototype[@@toPrimitive](hint) + $Symbol[PROTOTYPE][TO_PRIMITIVE] || + __webpack_require__(29)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf); + // 19.4.3.5 Symbol.prototype[@@toStringTag] + setToStringTag($Symbol, 'Symbol'); + // 20.2.1.9 Math[@@toStringTag] + setToStringTag(Math, 'Math', true); + // 24.3.3 JSON[@@toStringTag] + setToStringTag(global.JSON, 'JSON', true); + + /***/ + }, + /* 652 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0), + $typed = __webpack_require__(145), + buffer = __webpack_require__(189), + anObject = __webpack_require__(5), + toIndex = __webpack_require__(83), + toLength = __webpack_require__(19), + isObject = __webpack_require__(11), + ArrayBuffer = __webpack_require__(8).ArrayBuffer, + speciesConstructor = __webpack_require__(183), + $ArrayBuffer = buffer.ArrayBuffer, + $DataView = buffer.DataView, + $isView = $typed.ABV && ArrayBuffer.isView, + $slice = $ArrayBuffer.prototype.slice, + VIEW = $typed.VIEW, + ARRAY_BUFFER = 'ArrayBuffer'; + + $export($export.G + $export.W + $export.F * (ArrayBuffer !== $ArrayBuffer), { + ArrayBuffer: $ArrayBuffer, + }); + + $export($export.S + $export.F * !$typed.CONSTR, ARRAY_BUFFER, { + // 24.1.3.1 ArrayBuffer.isView(arg) + isView: function isView(it) { + return ($isView && $isView(it)) || (isObject(it) && VIEW in it); + }, + }); + + $export( + $export.P + + $export.U + + $export.F * + __webpack_require__(10)(function () { + return !new $ArrayBuffer(2).slice(1, undefined).byteLength; + }), + ARRAY_BUFFER, + { + // 24.1.4.3 ArrayBuffer.prototype.slice(start, end) + slice: function slice(start, end) { + if ($slice !== undefined && end === undefined) return $slice.call(anObject(this), start); // FF fix + var len = anObject(this).byteLength, + first = toIndex(start, len), + final = toIndex(end === undefined ? len : end, len), + result = new (speciesConstructor(this, $ArrayBuffer))(toLength(final - first)), + viewS = new $DataView(this), + viewT = new $DataView(result), + index = 0; + while (first < final) { + viewT.setUint8(index++, viewS.getUint8(first++)); + } + return result; + }, + }, + ); + + __webpack_require__(82)(ARRAY_BUFFER); + + /***/ + }, + /* 653 */ + /***/ function (module, exports, __webpack_require__) { + var $export = __webpack_require__(0); + $export($export.G + $export.W + $export.F * !__webpack_require__(145).ABV, { + DataView: __webpack_require__(189).DataView, + }); + + /***/ + }, + /* 654 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(58)('Float32', 4, function (init) { + return function Float32Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; + }); + + /***/ + }, + /* 655 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(58)('Float64', 8, function (init) { + return function Float64Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; + }); + + /***/ + }, + /* 656 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(58)('Int16', 2, function (init) { + return function Int16Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; + }); + + /***/ + }, + /* 657 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(58)('Int32', 4, function (init) { + return function Int32Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; + }); + + /***/ + }, + /* 658 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(58)('Int8', 1, function (init) { + return function Int8Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; + }); + + /***/ + }, + /* 659 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(58)('Uint16', 2, function (init) { + return function Uint16Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; + }); + + /***/ + }, + /* 660 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(58)('Uint32', 4, function (init) { + return function Uint32Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; + }); + + /***/ + }, + /* 661 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(58)('Uint8', 1, function (init) { + return function Uint8Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; + }); + + /***/ + }, + /* 662 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(58)( + 'Uint8', + 1, + function (init) { + return function Uint8ClampedArray(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; + }, + true, + ); + + /***/ + }, + /* 663 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var weak = __webpack_require__(279); + + // 23.4 WeakSet Objects + __webpack_require__(136)( + 'WeakSet', + function (get) { + return function WeakSet() { + return get(this, arguments.length > 0 ? arguments[0] : undefined); + }; + }, + { + // 23.4.3.1 WeakSet.prototype.add(value) + add: function add(value) { + return weak.def(this, value, true); + }, + }, + weak, + false, + true, + ); + + /***/ + }, + /* 664 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // https://github.com/tc39/Array.prototype.includes + var $export = __webpack_require__(0), + $includes = __webpack_require__(135)(true); + + $export($export.P, 'Array', { + includes: function includes(el /*, fromIndex = 0 */) { + return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined); + }, + }); + + __webpack_require__(94)('includes'); + + /***/ + }, + /* 665 */ + /***/ function (module, exports, __webpack_require__) { + // https://github.com/rwaldron/tc39-notes/blob/master/es6/2014-09/sept-25.md#510-globalasap-for-enqueuing-a-microtask + var $export = __webpack_require__(0), + microtask = __webpack_require__(180)(), + process = __webpack_require__(8).process, + isNode = __webpack_require__(40)(process) == 'process'; + + $export($export.G, { + asap: function asap(fn) { + var domain = isNode && process.domain; + microtask(domain ? domain.bind(fn) : fn); + }, + }); + + /***/ + }, + /* 666 */ + /***/ function (module, exports, __webpack_require__) { + // https://github.com/ljharb/proposal-is-error + var $export = __webpack_require__(0), + cof = __webpack_require__(40); + + $export($export.S, 'Error', { + isError: function isError(it) { + return cof(it) === 'Error'; + }, + }); + + /***/ + }, + /* 667 */ + /***/ function (module, exports, __webpack_require__) { + // https://github.com/DavidBruant/Map-Set.prototype.toJSON + var $export = __webpack_require__(0); + + $export($export.P + $export.R, 'Map', { toJSON: __webpack_require__(278)('Map') }); + + /***/ + }, + /* 668 */ + /***/ function (module, exports, __webpack_require__) { + // https://gist.github.com/BrendanEich/4294d5c212a6d2254703 + var $export = __webpack_require__(0); + + $export($export.S, 'Math', { + iaddh: function iaddh(x0, x1, y0, y1) { + var $x0 = x0 >>> 0, + $x1 = x1 >>> 0, + $y0 = y0 >>> 0; + return ($x1 + (y1 >>> 0) + ((($x0 & $y0) | (($x0 | $y0) & ~(($x0 + $y0) >>> 0))) >>> 31)) | 0; + }, + }); + + /***/ + }, + /* 669 */ + /***/ function (module, exports, __webpack_require__) { + // https://gist.github.com/BrendanEich/4294d5c212a6d2254703 + var $export = __webpack_require__(0); + + $export($export.S, 'Math', { + imulh: function imulh(u, v) { + var UINT16 = 0xffff, + $u = +u, + $v = +v, + u0 = $u & UINT16, + v0 = $v & UINT16, + u1 = $u >> 16, + v1 = $v >> 16, + t = ((u1 * v0) >>> 0) + ((u0 * v0) >>> 16); + return u1 * v1 + (t >> 16) + ((((u0 * v1) >>> 0) + (t & UINT16)) >> 16); + }, + }); + + /***/ + }, + /* 670 */ + /***/ function (module, exports, __webpack_require__) { + // https://gist.github.com/BrendanEich/4294d5c212a6d2254703 + var $export = __webpack_require__(0); + + $export($export.S, 'Math', { + isubh: function isubh(x0, x1, y0, y1) { + var $x0 = x0 >>> 0, + $x1 = x1 >>> 0, + $y0 = y0 >>> 0; + return ($x1 - (y1 >>> 0) - (((~$x0 & $y0) | (~($x0 ^ $y0) & (($x0 - $y0) >>> 0))) >>> 31)) | 0; + }, + }); + + /***/ + }, + /* 671 */ + /***/ function (module, exports, __webpack_require__) { + // https://gist.github.com/BrendanEich/4294d5c212a6d2254703 + var $export = __webpack_require__(0); + + $export($export.S, 'Math', { + umulh: function umulh(u, v) { + var UINT16 = 0xffff, + $u = +u, + $v = +v, + u0 = $u & UINT16, + v0 = $v & UINT16, + u1 = $u >>> 16, + v1 = $v >>> 16, + t = ((u1 * v0) >>> 0) + ((u0 * v0) >>> 16); + return u1 * v1 + (t >>> 16) + ((((u0 * v1) >>> 0) + (t & UINT16)) >>> 16); + }, + }); + + /***/ + }, + /* 672 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0), + toObject = __webpack_require__(20), + aFunction = __webpack_require__(28), + $defineProperty = __webpack_require__(15); + + // B.2.2.2 Object.prototype.__defineGetter__(P, getter) + __webpack_require__(14) && + $export($export.P + __webpack_require__(142), 'Object', { + __defineGetter__: function __defineGetter__(P, getter) { + $defineProperty.f(toObject(this), P, { + get: aFunction(getter), + enumerable: true, + configurable: true, + }); + }, + }); + + /***/ + }, + /* 673 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0), + toObject = __webpack_require__(20), + aFunction = __webpack_require__(28), + $defineProperty = __webpack_require__(15); + + // B.2.2.3 Object.prototype.__defineSetter__(P, setter) + __webpack_require__(14) && + $export($export.P + __webpack_require__(142), 'Object', { + __defineSetter__: function __defineSetter__(P, setter) { + $defineProperty.f(toObject(this), P, { + set: aFunction(setter), + enumerable: true, + configurable: true, + }); + }, + }); + + /***/ + }, + /* 674 */ + /***/ function (module, exports, __webpack_require__) { + // https://github.com/tc39/proposal-object-values-entries + var $export = __webpack_require__(0), + $entries = __webpack_require__(289)(true); + + $export($export.S, 'Object', { + entries: function entries(it) { + return $entries(it); + }, + }); + + /***/ + }, + /* 675 */ + /***/ function (module, exports, __webpack_require__) { + // https://github.com/tc39/proposal-object-getownpropertydescriptors + var $export = __webpack_require__(0), + ownKeys = __webpack_require__(290), + toIObject = __webpack_require__(32), + gOPD = __webpack_require__(36), + createProperty = __webpack_require__(168); + + $export($export.S, 'Object', { + getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object) { + var O = toIObject(object), + getDesc = gOPD.f, + keys = ownKeys(O), + result = {}, + i = 0, + key; + while (keys.length > i) createProperty(result, (key = keys[i++]), getDesc(O, key)); + return result; + }, + }); + + /***/ + }, + /* 676 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0), + toObject = __webpack_require__(20), + toPrimitive = __webpack_require__(50), + getPrototypeOf = __webpack_require__(37), + getOwnPropertyDescriptor = __webpack_require__(36).f; + + // B.2.2.4 Object.prototype.__lookupGetter__(P) + __webpack_require__(14) && + $export($export.P + __webpack_require__(142), 'Object', { + __lookupGetter__: function __lookupGetter__(P) { + var O = toObject(this), + K = toPrimitive(P, true), + D; + do { + if ((D = getOwnPropertyDescriptor(O, K))) return D.get; + } while ((O = getPrototypeOf(O))); + }, + }); + + /***/ + }, + /* 677 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0), + toObject = __webpack_require__(20), + toPrimitive = __webpack_require__(50), + getPrototypeOf = __webpack_require__(37), + getOwnPropertyDescriptor = __webpack_require__(36).f; + + // B.2.2.5 Object.prototype.__lookupSetter__(P) + __webpack_require__(14) && + $export($export.P + __webpack_require__(142), 'Object', { + __lookupSetter__: function __lookupSetter__(P) { + var O = toObject(this), + K = toPrimitive(P, true), + D; + do { + if ((D = getOwnPropertyDescriptor(O, K))) return D.set; + } while ((O = getPrototypeOf(O))); + }, + }); + + /***/ + }, + /* 678 */ + /***/ function (module, exports, __webpack_require__) { + // https://github.com/tc39/proposal-object-values-entries + var $export = __webpack_require__(0), + $values = __webpack_require__(289)(false); + + $export($export.S, 'Object', { + values: function values(it) { + return $values(it); + }, + }); + + /***/ + }, + /* 679 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // https://github.com/zenparsing/es-observable + var $export = __webpack_require__(0), + global = __webpack_require__(8), + core = __webpack_require__(55), + microtask = __webpack_require__(180)(), + OBSERVABLE = __webpack_require__(12)('observable'), + aFunction = __webpack_require__(28), + anObject = __webpack_require__(5), + anInstance = __webpack_require__(76), + redefineAll = __webpack_require__(81), + hide = __webpack_require__(29), + forOf = __webpack_require__(95), + RETURN = forOf.RETURN; + + var getMethod = function (fn) { + return fn == null ? undefined : aFunction(fn); + }; + + var cleanupSubscription = function (subscription) { + var cleanup = subscription._c; + if (cleanup) { + subscription._c = undefined; + cleanup(); + } + }; + + var subscriptionClosed = function (subscription) { + return subscription._o === undefined; + }; + + var closeSubscription = function (subscription) { + if (!subscriptionClosed(subscription)) { + subscription._o = undefined; + cleanupSubscription(subscription); + } + }; + + var Subscription = function (observer, subscriber) { + anObject(observer); + this._c = undefined; + this._o = observer; + observer = new SubscriptionObserver(this); + try { + var cleanup = subscriber(observer), + subscription = cleanup; + if (cleanup != null) { + if (typeof cleanup.unsubscribe === 'function') + cleanup = function () { + subscription.unsubscribe(); + }; + else aFunction(cleanup); + this._c = cleanup; + } + } catch (e) { + observer.error(e); + return; + } + if (subscriptionClosed(this)) cleanupSubscription(this); + }; + + Subscription.prototype = redefineAll( + {}, + { + unsubscribe: function unsubscribe() { + closeSubscription(this); + }, + }, + ); + + var SubscriptionObserver = function (subscription) { + this._s = subscription; + }; + + SubscriptionObserver.prototype = redefineAll( + {}, + { + next: function next(value) { + var subscription = this._s; + if (!subscriptionClosed(subscription)) { + var observer = subscription._o; + try { + var m = getMethod(observer.next); + if (m) return m.call(observer, value); + } catch (e) { + try { + closeSubscription(subscription); + } finally { + throw e; + } + } + } + }, + error: function error(value) { + var subscription = this._s; + if (subscriptionClosed(subscription)) throw value; + var observer = subscription._o; + subscription._o = undefined; + try { + var m = getMethod(observer.error); + if (!m) throw value; + value = m.call(observer, value); + } catch (e) { + try { + cleanupSubscription(subscription); + } finally { + throw e; + } + } + cleanupSubscription(subscription); + return value; + }, + complete: function complete(value) { + var subscription = this._s; + if (!subscriptionClosed(subscription)) { + var observer = subscription._o; + subscription._o = undefined; + try { + var m = getMethod(observer.complete); + value = m ? m.call(observer, value) : undefined; + } catch (e) { + try { + cleanupSubscription(subscription); + } finally { + throw e; + } + } + cleanupSubscription(subscription); + return value; + } + }, + }, + ); + + var $Observable = function Observable(subscriber) { + anInstance(this, $Observable, 'Observable', '_f')._f = aFunction(subscriber); + }; + + redefineAll($Observable.prototype, { + subscribe: function subscribe(observer) { + return new Subscription(observer, this._f); + }, + forEach: function forEach(fn) { + var that = this; + return new (core.Promise || global.Promise)(function (resolve, reject) { + aFunction(fn); + var subscription = that.subscribe({ + next: function (value) { + try { + return fn(value); + } catch (e) { + reject(e); + subscription.unsubscribe(); + } + }, + error: reject, + complete: resolve, + }); + }); + }, + }); + + redefineAll($Observable, { + from: function from(x) { + var C = typeof this === 'function' ? this : $Observable; + var method = getMethod(anObject(x)[OBSERVABLE]); + if (method) { + var observable = anObject(method.call(x)); + return observable.constructor === C + ? observable + : new C(function (observer) { + return observable.subscribe(observer); + }); + } + return new C(function (observer) { + var done = false; + microtask(function () { + if (!done) { + try { + if ( + forOf(x, false, function (it) { + observer.next(it); + if (done) return RETURN; + }) === RETURN + ) + return; + } catch (e) { + if (done) throw e; + observer.error(e); + return; + } + observer.complete(); + } + }); + return function () { + done = true; + }; + }); + }, + of: function of() { + for (var i = 0, l = arguments.length, items = Array(l); i < l; ) items[i] = arguments[i++]; + return new (typeof this === 'function' ? this : $Observable)(function (observer) { + var done = false; + microtask(function () { + if (!done) { + for (var i = 0; i < items.length; ++i) { + observer.next(items[i]); + if (done) return; + } + observer.complete(); + } + }); + return function () { + done = true; + }; + }); + }, + }); + + hide($Observable.prototype, OBSERVABLE, function () { + return this; + }); + + $export($export.G, { Observable: $Observable }); + + __webpack_require__(82)('Observable'); + + /***/ + }, + /* 680 */ + /***/ function (module, exports, __webpack_require__) { + var metadata = __webpack_require__(57), + anObject = __webpack_require__(5), + toMetaKey = metadata.key, + ordinaryDefineOwnMetadata = metadata.set; + + metadata.exp({ + defineMetadata: function defineMetadata(metadataKey, metadataValue, target, targetKey) { + ordinaryDefineOwnMetadata(metadataKey, metadataValue, anObject(target), toMetaKey(targetKey)); + }, + }); + + /***/ + }, + /* 681 */ + /***/ function (module, exports, __webpack_require__) { + var metadata = __webpack_require__(57), + anObject = __webpack_require__(5), + toMetaKey = metadata.key, + getOrCreateMetadataMap = metadata.map, + store = metadata.store; + + metadata.exp({ + deleteMetadata: function deleteMetadata(metadataKey, target /*, targetKey */) { + var targetKey = arguments.length < 3 ? undefined : toMetaKey(arguments[2]), + metadataMap = getOrCreateMetadataMap(anObject(target), targetKey, false); + if (metadataMap === undefined || !metadataMap['delete'](metadataKey)) return false; + if (metadataMap.size) return true; + var targetMetadata = store.get(target); + targetMetadata['delete'](targetKey); + return !!targetMetadata.size || store['delete'](target); + }, + }); + + /***/ + }, + /* 682 */ + /***/ function (module, exports, __webpack_require__) { + var Set = __webpack_require__(298), + from = __webpack_require__(274), + metadata = __webpack_require__(57), + anObject = __webpack_require__(5), + getPrototypeOf = __webpack_require__(37), + ordinaryOwnMetadataKeys = metadata.keys, + toMetaKey = metadata.key; + + var ordinaryMetadataKeys = function (O, P) { + var oKeys = ordinaryOwnMetadataKeys(O, P), + parent = getPrototypeOf(O); + if (parent === null) return oKeys; + var pKeys = ordinaryMetadataKeys(parent, P); + return pKeys.length ? (oKeys.length ? from(new Set(oKeys.concat(pKeys))) : pKeys) : oKeys; + }; + + metadata.exp({ + getMetadataKeys: function getMetadataKeys(target /*, targetKey */) { + return ordinaryMetadataKeys( + anObject(target), + arguments.length < 2 ? undefined : toMetaKey(arguments[1]), + ); + }, + }); + + /***/ + }, + /* 683 */ + /***/ function (module, exports, __webpack_require__) { + var metadata = __webpack_require__(57), + anObject = __webpack_require__(5), + getPrototypeOf = __webpack_require__(37), + ordinaryHasOwnMetadata = metadata.has, + ordinaryGetOwnMetadata = metadata.get, + toMetaKey = metadata.key; + + var ordinaryGetMetadata = function (MetadataKey, O, P) { + var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P); + if (hasOwn) return ordinaryGetOwnMetadata(MetadataKey, O, P); + var parent = getPrototypeOf(O); + return parent !== null ? ordinaryGetMetadata(MetadataKey, parent, P) : undefined; + }; + + metadata.exp({ + getMetadata: function getMetadata(metadataKey, target /*, targetKey */) { + return ordinaryGetMetadata( + metadataKey, + anObject(target), + arguments.length < 3 ? undefined : toMetaKey(arguments[2]), + ); + }, + }); + + /***/ + }, + /* 684 */ + /***/ function (module, exports, __webpack_require__) { + var metadata = __webpack_require__(57), + anObject = __webpack_require__(5), + ordinaryOwnMetadataKeys = metadata.keys, + toMetaKey = metadata.key; + + metadata.exp({ + getOwnMetadataKeys: function getOwnMetadataKeys(target /*, targetKey */) { + return ordinaryOwnMetadataKeys( + anObject(target), + arguments.length < 2 ? undefined : toMetaKey(arguments[1]), + ); + }, + }); + + /***/ + }, + /* 685 */ + /***/ function (module, exports, __webpack_require__) { + var metadata = __webpack_require__(57), + anObject = __webpack_require__(5), + ordinaryGetOwnMetadata = metadata.get, + toMetaKey = metadata.key; + + metadata.exp({ + getOwnMetadata: function getOwnMetadata(metadataKey, target /*, targetKey */) { + return ordinaryGetOwnMetadata( + metadataKey, + anObject(target), + arguments.length < 3 ? undefined : toMetaKey(arguments[2]), + ); + }, + }); + + /***/ + }, + /* 686 */ + /***/ function (module, exports, __webpack_require__) { + var metadata = __webpack_require__(57), + anObject = __webpack_require__(5), + getPrototypeOf = __webpack_require__(37), + ordinaryHasOwnMetadata = metadata.has, + toMetaKey = metadata.key; + + var ordinaryHasMetadata = function (MetadataKey, O, P) { + var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P); + if (hasOwn) return true; + var parent = getPrototypeOf(O); + return parent !== null ? ordinaryHasMetadata(MetadataKey, parent, P) : false; + }; + + metadata.exp({ + hasMetadata: function hasMetadata(metadataKey, target /*, targetKey */) { + return ordinaryHasMetadata( + metadataKey, + anObject(target), + arguments.length < 3 ? undefined : toMetaKey(arguments[2]), + ); + }, + }); + + /***/ + }, + /* 687 */ + /***/ function (module, exports, __webpack_require__) { + var metadata = __webpack_require__(57), + anObject = __webpack_require__(5), + ordinaryHasOwnMetadata = metadata.has, + toMetaKey = metadata.key; + + metadata.exp({ + hasOwnMetadata: function hasOwnMetadata(metadataKey, target /*, targetKey */) { + return ordinaryHasOwnMetadata( + metadataKey, + anObject(target), + arguments.length < 3 ? undefined : toMetaKey(arguments[2]), + ); + }, + }); + + /***/ + }, + /* 688 */ + /***/ function (module, exports, __webpack_require__) { + var metadata = __webpack_require__(57), + anObject = __webpack_require__(5), + aFunction = __webpack_require__(28), + toMetaKey = metadata.key, + ordinaryDefineOwnMetadata = metadata.set; + + metadata.exp({ + metadata: function metadata(metadataKey, metadataValue) { + return function decorator(target, targetKey) { + ordinaryDefineOwnMetadata( + metadataKey, + metadataValue, + (targetKey !== undefined ? anObject : aFunction)(target), + toMetaKey(targetKey), + ); + }; + }, + }); + + /***/ + }, + /* 689 */ + /***/ function (module, exports, __webpack_require__) { + // https://github.com/DavidBruant/Map-Set.prototype.toJSON + var $export = __webpack_require__(0); + + $export($export.P + $export.R, 'Set', { toJSON: __webpack_require__(278)('Set') }); + + /***/ + }, + /* 690 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // https://github.com/mathiasbynens/String.prototype.at + var $export = __webpack_require__(0), + $at = __webpack_require__(184)(true); + + $export($export.P, 'String', { + at: function at(pos) { + return $at(this, pos); + }, + }); + + /***/ + }, + /* 691 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // https://tc39.github.io/String.prototype.matchAll/ + var $export = __webpack_require__(0), + defined = __webpack_require__(41), + toLength = __webpack_require__(19), + isRegExp = __webpack_require__(140), + getFlags = __webpack_require__(138), + RegExpProto = RegExp.prototype; + + var $RegExpStringIterator = function (regexp, string) { + this._r = regexp; + this._s = string; + }; + + __webpack_require__(176)($RegExpStringIterator, 'RegExp String', function next() { + var match = this._r.exec(this._s); + return { value: match, done: match === null }; + }); + + $export($export.P, 'String', { + matchAll: function matchAll(regexp) { + defined(this); + if (!isRegExp(regexp)) throw TypeError(regexp + ' is not a regexp!'); + var S = String(this), + flags = 'flags' in RegExpProto ? String(regexp.flags) : getFlags.call(regexp), + rx = new RegExp(regexp.source, ~flags.indexOf('g') ? flags : 'g' + flags); + rx.lastIndex = toLength(regexp.lastIndex); + return new $RegExpStringIterator(rx, S); + }, + }); + + /***/ + }, + /* 692 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // https://github.com/tc39/proposal-string-pad-start-end + var $export = __webpack_require__(0), + $pad = __webpack_require__(294); + + $export($export.P, 'String', { + padEnd: function padEnd(maxLength /*, fillString = ' ' */) { + return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, false); + }, + }); + + /***/ + }, + /* 693 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // https://github.com/tc39/proposal-string-pad-start-end + var $export = __webpack_require__(0), + $pad = __webpack_require__(294); + + $export($export.P, 'String', { + padStart: function padStart(maxLength /*, fillString = ' ' */) { + return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, true); + }, + }); + + /***/ + }, + /* 694 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // https://github.com/sebmarkbage/ecmascript-string-left-right-trim + __webpack_require__(98)( + 'trimLeft', + function ($trim) { + return function trimLeft() { + return $trim(this, 1); + }; + }, + 'trimStart', + ); + + /***/ + }, + /* 695 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // https://github.com/sebmarkbage/ecmascript-string-left-right-trim + __webpack_require__(98)( + 'trimRight', + function ($trim) { + return function trimRight() { + return $trim(this, 2); + }; + }, + 'trimEnd', + ); + + /***/ + }, + /* 696 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(190)('asyncIterator'); + + /***/ + }, + /* 697 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(190)('observable'); + + /***/ + }, + /* 698 */ + /***/ function (module, exports, __webpack_require__) { + // https://github.com/ljharb/proposal-global + var $export = __webpack_require__(0); + + $export($export.S, 'System', { global: __webpack_require__(8) }); + + /***/ + }, + /* 699 */ + /***/ function (module, exports, __webpack_require__) { + var $iterators = __webpack_require__(192), + redefine = __webpack_require__(30), + global = __webpack_require__(8), + hide = __webpack_require__(29), + Iterators = __webpack_require__(96), + wks = __webpack_require__(12), + ITERATOR = wks('iterator'), + TO_STRING_TAG = wks('toStringTag'), + ArrayValues = Iterators.Array; + + for ( + var collections = ['NodeList', 'DOMTokenList', 'MediaList', 'StyleSheetList', 'CSSRuleList'], i = 0; + i < 5; + i++ + ) { + var NAME = collections[i], + Collection = global[NAME], + proto = Collection && Collection.prototype, + key; + if (proto) { + if (!proto[ITERATOR]) hide(proto, ITERATOR, ArrayValues); + if (!proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME); + Iterators[NAME] = ArrayValues; + for (key in $iterators) if (!proto[key]) redefine(proto, key, $iterators[key], true); + } + } + + /***/ + }, + /* 700 */ + /***/ function (module, exports, __webpack_require__) { + var $export = __webpack_require__(0), + $task = __webpack_require__(188); + $export($export.G + $export.B, { + setImmediate: $task.set, + clearImmediate: $task.clear, + }); + + /***/ + }, + /* 701 */ + /***/ function (module, exports, __webpack_require__) { + // ie9- setTimeout & setInterval additional parameters fix + var global = __webpack_require__(8), + $export = __webpack_require__(0), + invoke = __webpack_require__(139), + partial = __webpack_require__(528), + navigator = global.navigator, + MSIE = !!navigator && /MSIE .\./.test(navigator.userAgent); // <- dirty ie9- check + var wrap = function (set) { + return MSIE + ? function (fn, time /*, ...args */) { + return set( + invoke(partial, [].slice.call(arguments, 2), typeof fn == 'function' ? fn : Function(fn)), + time, + ); + } + : set; + }; + $export($export.G + $export.B + $export.F * MSIE, { + setTimeout: wrap(global.setTimeout), + setInterval: wrap(global.setInterval), + }); + + /***/ + }, + /* 702 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(651); + __webpack_require__(590); + __webpack_require__(592); + __webpack_require__(591); + __webpack_require__(594); + __webpack_require__(596); + __webpack_require__(601); + __webpack_require__(595); + __webpack_require__(593); + __webpack_require__(603); + __webpack_require__(602); + __webpack_require__(598); + __webpack_require__(599); + __webpack_require__(597); + __webpack_require__(589); + __webpack_require__(600); + __webpack_require__(604); + __webpack_require__(605); + __webpack_require__(557); + __webpack_require__(559); + __webpack_require__(558); + __webpack_require__(607); + __webpack_require__(606); + __webpack_require__(577); + __webpack_require__(587); + __webpack_require__(588); + __webpack_require__(578); + __webpack_require__(579); + __webpack_require__(580); + __webpack_require__(581); + __webpack_require__(582); + __webpack_require__(583); + __webpack_require__(584); + __webpack_require__(585); + __webpack_require__(586); + __webpack_require__(560); + __webpack_require__(561); + __webpack_require__(562); + __webpack_require__(563); + __webpack_require__(564); + __webpack_require__(565); + __webpack_require__(566); + __webpack_require__(567); + __webpack_require__(568); + __webpack_require__(569); + __webpack_require__(570); + __webpack_require__(571); + __webpack_require__(572); + __webpack_require__(573); + __webpack_require__(574); + __webpack_require__(575); + __webpack_require__(576); + __webpack_require__(638); + __webpack_require__(643); + __webpack_require__(650); + __webpack_require__(641); + __webpack_require__(633); + __webpack_require__(634); + __webpack_require__(639); + __webpack_require__(644); + __webpack_require__(646); + __webpack_require__(629); + __webpack_require__(630); + __webpack_require__(631); + __webpack_require__(632); + __webpack_require__(635); + __webpack_require__(636); + __webpack_require__(637); + __webpack_require__(640); + __webpack_require__(642); + __webpack_require__(645); + __webpack_require__(647); + __webpack_require__(648); + __webpack_require__(649); + __webpack_require__(552); + __webpack_require__(554); + __webpack_require__(553); + __webpack_require__(556); + __webpack_require__(555); + __webpack_require__(541); + __webpack_require__(539); + __webpack_require__(545); + __webpack_require__(542); + __webpack_require__(548); + __webpack_require__(550); + __webpack_require__(538); + __webpack_require__(544); + __webpack_require__(535); + __webpack_require__(549); + __webpack_require__(533); + __webpack_require__(547); + __webpack_require__(546); + __webpack_require__(540); + __webpack_require__(543); + __webpack_require__(532); + __webpack_require__(534); + __webpack_require__(537); + __webpack_require__(536); + __webpack_require__(551); + __webpack_require__(192); + __webpack_require__(623); + __webpack_require__(628); + __webpack_require__(297); + __webpack_require__(624); + __webpack_require__(625); + __webpack_require__(626); + __webpack_require__(627); + __webpack_require__(608); + __webpack_require__(296); + __webpack_require__(298); + __webpack_require__(299); + __webpack_require__(663); + __webpack_require__(652); + __webpack_require__(653); + __webpack_require__(658); + __webpack_require__(661); + __webpack_require__(662); + __webpack_require__(656); + __webpack_require__(659); + __webpack_require__(657); + __webpack_require__(660); + __webpack_require__(654); + __webpack_require__(655); + __webpack_require__(609); + __webpack_require__(610); + __webpack_require__(611); + __webpack_require__(612); + __webpack_require__(613); + __webpack_require__(616); + __webpack_require__(614); + __webpack_require__(615); + __webpack_require__(617); + __webpack_require__(618); + __webpack_require__(619); + __webpack_require__(620); + __webpack_require__(622); + __webpack_require__(621); + __webpack_require__(664); + __webpack_require__(690); + __webpack_require__(693); + __webpack_require__(692); + __webpack_require__(694); + __webpack_require__(695); + __webpack_require__(691); + __webpack_require__(696); + __webpack_require__(697); + __webpack_require__(675); + __webpack_require__(678); + __webpack_require__(674); + __webpack_require__(672); + __webpack_require__(673); + __webpack_require__(676); + __webpack_require__(677); + __webpack_require__(667); + __webpack_require__(689); + __webpack_require__(698); + __webpack_require__(666); + __webpack_require__(668); + __webpack_require__(670); + __webpack_require__(669); + __webpack_require__(671); + __webpack_require__(680); + __webpack_require__(681); + __webpack_require__(683); + __webpack_require__(682); + __webpack_require__(685); + __webpack_require__(684); + __webpack_require__(686); + __webpack_require__(687); + __webpack_require__(688); + __webpack_require__(665); + __webpack_require__(679); + __webpack_require__(701); + __webpack_require__(700); + __webpack_require__(699); + module.exports = __webpack_require__(55); + + /***/ + }, + /* 703 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var _assign = __webpack_require__(9); + + var emptyObject = __webpack_require__(66); + var _invariant = __webpack_require__(3); + + if (true) { + var warning = __webpack_require__(4); + } + + var MIXINS_KEY = 'mixins'; + + // Helper function to allow the creation of anonymous functions which do not + // have .name set to the name of the variable being assigned to. + function identity(fn) { + return fn; + } + + var ReactPropTypeLocationNames; + if (true) { + ReactPropTypeLocationNames = { + prop: 'prop', + context: 'context', + childContext: 'child context', + }; + } else { + ReactPropTypeLocationNames = {}; + } + + function factory(ReactComponent, isValidElement, ReactNoopUpdateQueue) { + /** + * Policies that describe methods in `ReactClassInterface`. + */ + + var injectedMixins = []; + + /** + * Composite components are higher-level components that compose other composite + * or host components. + * + * To create a new type of `ReactClass`, pass a specification of + * your new class to `React.createClass`. The only requirement of your class + * specification is that you implement a `render` method. + * + * var MyComponent = React.createClass({ + * render: function() { + * return <div>Hello World</div>; + * } + * }); + * + * The class specification supports a specific protocol of methods that have + * special meaning (e.g. `render`). See `ReactClassInterface` for + * more the comprehensive protocol. Any other properties and methods in the + * class specification will be available on the prototype. + * + * @interface ReactClassInterface + * @internal + */ + var ReactClassInterface = { + /** + * An array of Mixin objects to include when defining your component. + * + * @type {array} + * @optional + */ + mixins: 'DEFINE_MANY', + + /** + * An object containing properties and methods that should be defined on + * the component's constructor instead of its prototype (static methods). + * + * @type {object} + * @optional + */ + statics: 'DEFINE_MANY', + + /** + * Definition of prop types for this component. + * + * @type {object} + * @optional + */ + propTypes: 'DEFINE_MANY', + + /** + * Definition of context types for this component. + * + * @type {object} + * @optional + */ + contextTypes: 'DEFINE_MANY', + + /** + * Definition of context types this component sets for its children. + * + * @type {object} + * @optional + */ + childContextTypes: 'DEFINE_MANY', + + // ==== Definition methods ==== + + /** + * Invoked when the component is mounted. Values in the mapping will be set on + * `this.props` if that prop is not specified (i.e. using an `in` check). + * + * This method is invoked before `getInitialState` and therefore cannot rely + * on `this.state` or use `this.setState`. + * + * @return {object} + * @optional + */ + getDefaultProps: 'DEFINE_MANY_MERGED', + + /** + * Invoked once before the component is mounted. The return value will be used + * as the initial value of `this.state`. + * + * getInitialState: function() { + * return { + * isOn: false, + * fooBaz: new BazFoo() + * } + * } + * + * @return {object} + * @optional + */ + getInitialState: 'DEFINE_MANY_MERGED', + + /** + * @return {object} + * @optional + */ + getChildContext: 'DEFINE_MANY_MERGED', + + /** + * Uses props from `this.props` and state from `this.state` to render the + * structure of the component. + * + * No guarantees are made about when or how often this method is invoked, so + * it must not have side effects. + * + * render: function() { + * var name = this.props.name; + * return <div>Hello, {name}!</div>; + * } + * + * @return {ReactComponent} + * @nosideeffects + * @required + */ + render: 'DEFINE_ONCE', + + // ==== Delegate methods ==== + + /** + * Invoked when the component is initially created and about to be mounted. + * This may have side effects, but any external subscriptions or data created + * by this method must be cleaned up in `componentWillUnmount`. + * + * @optional + */ + componentWillMount: 'DEFINE_MANY', + + /** + * Invoked when the component has been mounted and has a DOM representation. + * However, there is no guarantee that the DOM node is in the document. + * + * Use this as an opportunity to operate on the DOM when the component has + * been mounted (initialized and rendered) for the first time. + * + * @param {DOMElement} rootNode DOM element representing the component. + * @optional + */ + componentDidMount: 'DEFINE_MANY', + + /** + * Invoked before the component receives new props. + * + * Use this as an opportunity to react to a prop transition by updating the + * state using `this.setState`. Current props are accessed via `this.props`. + * + * componentWillReceiveProps: function(nextProps, nextContext) { + * this.setState({ + * likesIncreasing: nextProps.likeCount > this.props.likeCount + * }); + * } + * + * NOTE: There is no equivalent `componentWillReceiveState`. An incoming prop + * transition may cause a state change, but the opposite is not true. If you + * need it, you are probably looking for `componentWillUpdate`. + * + * @param {object} nextProps + * @optional + */ + componentWillReceiveProps: 'DEFINE_MANY', + + /** + * Invoked while deciding if the component should be updated as a result of + * receiving new props, state and/or context. + * + * Use this as an opportunity to `return false` when you're certain that the + * transition to the new props/state/context will not require a component + * update. + * + * shouldComponentUpdate: function(nextProps, nextState, nextContext) { + * return !equal(nextProps, this.props) || + * !equal(nextState, this.state) || + * !equal(nextContext, this.context); + * } + * + * @param {object} nextProps + * @param {?object} nextState + * @param {?object} nextContext + * @return {boolean} True if the component should update. + * @optional + */ + shouldComponentUpdate: 'DEFINE_ONCE', + + /** + * Invoked when the component is about to update due to a transition from + * `this.props`, `this.state` and `this.context` to `nextProps`, `nextState` + * and `nextContext`. + * + * Use this as an opportunity to perform preparation before an update occurs. + * + * NOTE: You **cannot** use `this.setState()` in this method. + * + * @param {object} nextProps + * @param {?object} nextState + * @param {?object} nextContext + * @param {ReactReconcileTransaction} transaction + * @optional + */ + componentWillUpdate: 'DEFINE_MANY', + + /** + * Invoked when the component's DOM representation has been updated. + * + * Use this as an opportunity to operate on the DOM when the component has + * been updated. + * + * @param {object} prevProps + * @param {?object} prevState + * @param {?object} prevContext + * @param {DOMElement} rootNode DOM element representing the component. + * @optional + */ + componentDidUpdate: 'DEFINE_MANY', + + /** + * Invoked when the component is about to be removed from its parent and have + * its DOM representation destroyed. + * + * Use this as an opportunity to deallocate any external resources. + * + * NOTE: There is no `componentDidUnmount` since your component will have been + * destroyed by that point. + * + * @optional + */ + componentWillUnmount: 'DEFINE_MANY', + + // ==== Advanced methods ==== + + /** + * Updates the component's currently mounted DOM representation. + * + * By default, this implements React's rendering and reconciliation algorithm. + * Sophisticated clients may wish to override this. + * + * @param {ReactReconcileTransaction} transaction + * @internal + * @overridable + */ + updateComponent: 'OVERRIDE_BASE', + }; + + /** + * Mapping from class specification keys to special processing functions. + * + * Although these are declared like instance properties in the specification + * when defining classes using `React.createClass`, they are actually static + * and are accessible on the constructor instead of the prototype. Despite + * being static, they must be defined outside of the "statics" key under + * which all other static methods are defined. + */ + var RESERVED_SPEC_KEYS = { + displayName: function (Constructor, displayName) { + Constructor.displayName = displayName; + }, + mixins: function (Constructor, mixins) { + if (mixins) { + for (var i = 0; i < mixins.length; i++) { + mixSpecIntoComponent(Constructor, mixins[i]); + } + } + }, + childContextTypes: function (Constructor, childContextTypes) { + if (true) { + validateTypeDef(Constructor, childContextTypes, 'childContext'); + } + Constructor.childContextTypes = _assign({}, Constructor.childContextTypes, childContextTypes); + }, + contextTypes: function (Constructor, contextTypes) { + if (true) { + validateTypeDef(Constructor, contextTypes, 'context'); + } + Constructor.contextTypes = _assign({}, Constructor.contextTypes, contextTypes); + }, + /** + * Special case getDefaultProps which should move into statics but requires + * automatic merging. + */ + getDefaultProps: function (Constructor, getDefaultProps) { + if (Constructor.getDefaultProps) { + Constructor.getDefaultProps = createMergedResultFunction( + Constructor.getDefaultProps, + getDefaultProps, + ); + } else { + Constructor.getDefaultProps = getDefaultProps; + } + }, + propTypes: function (Constructor, propTypes) { + if (true) { + validateTypeDef(Constructor, propTypes, 'prop'); + } + Constructor.propTypes = _assign({}, Constructor.propTypes, propTypes); + }, + statics: function (Constructor, statics) { + mixStaticSpecIntoComponent(Constructor, statics); + }, + autobind: function () {}, + }; + + function validateTypeDef(Constructor, typeDef, location) { + for (var propName in typeDef) { + if (typeDef.hasOwnProperty(propName)) { + // use a warning instead of an _invariant so components + // don't show up in prod but only in __DEV__ + true + ? warning( + typeof typeDef[propName] === 'function', + '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', + Constructor.displayName || 'ReactClass', + ReactPropTypeLocationNames[location], + propName, + ) + : void 0; + } + } + } + + function validateMethodOverride(isAlreadyDefined, name) { + var specPolicy = ReactClassInterface.hasOwnProperty(name) ? ReactClassInterface[name] : null; + + // Disallow overriding of base class methods unless explicitly allowed. + if (ReactClassMixin.hasOwnProperty(name)) { + _invariant( + specPolicy === 'OVERRIDE_BASE', + 'ReactClassInterface: You are attempting to override ' + + '`%s` from your class specification. Ensure that your method names ' + + 'do not overlap with React methods.', + name, + ); + } + + // Disallow defining methods more than once unless explicitly allowed. + if (isAlreadyDefined) { + _invariant( + specPolicy === 'DEFINE_MANY' || specPolicy === 'DEFINE_MANY_MERGED', + 'ReactClassInterface: You are attempting to define ' + + '`%s` on your component more than once. This conflict may be due ' + + 'to a mixin.', + name, + ); + } + } + + /** + * Mixin helper which handles policy validation and reserved + * specification keys when building React classes. + */ + function mixSpecIntoComponent(Constructor, spec) { + if (!spec) { + if (true) { + var typeofSpec = typeof spec; + var isMixinValid = typeofSpec === 'object' && spec !== null; + + true + ? warning( + isMixinValid, + "%s: You're attempting to include a mixin that is either null " + + 'or not an object. Check the mixins included by the component, ' + + 'as well as any mixins they include themselves. ' + + 'Expected object but got %s.', + Constructor.displayName || 'ReactClass', + spec === null ? null : typeofSpec, + ) + : void 0; + } + + return; + } + + _invariant( + typeof spec !== 'function', + "ReactClass: You're attempting to " + + 'use a component class or function as a mixin. Instead, just use a ' + + 'regular object.', + ); + _invariant( + !isValidElement(spec), + "ReactClass: You're attempting to " + + 'use a component as a mixin. Instead, just use a regular object.', + ); + + var proto = Constructor.prototype; + var autoBindPairs = proto.__reactAutoBindPairs; + + // By handling mixins before any other properties, we ensure the same + // chaining order is applied to methods with DEFINE_MANY policy, whether + // mixins are listed before or after these methods in the spec. + if (spec.hasOwnProperty(MIXINS_KEY)) { + RESERVED_SPEC_KEYS.mixins(Constructor, spec.mixins); + } + + for (var name in spec) { + if (!spec.hasOwnProperty(name)) { + continue; + } + + if (name === MIXINS_KEY) { + // We have already handled mixins in a special case above. + continue; + } + + var property = spec[name]; + var isAlreadyDefined = proto.hasOwnProperty(name); + validateMethodOverride(isAlreadyDefined, name); + + if (RESERVED_SPEC_KEYS.hasOwnProperty(name)) { + RESERVED_SPEC_KEYS[name](Constructor, property); + } else { + // Setup methods on prototype: + // The following member methods should not be automatically bound: + // 1. Expected ReactClass methods (in the "interface"). + // 2. Overridden methods (that were mixed in). + var isReactClassMethod = ReactClassInterface.hasOwnProperty(name); + var isFunction = typeof property === 'function'; + var shouldAutoBind = + isFunction && !isReactClassMethod && !isAlreadyDefined && spec.autobind !== false; + + if (shouldAutoBind) { + autoBindPairs.push(name, property); + proto[name] = property; + } else { + if (isAlreadyDefined) { + var specPolicy = ReactClassInterface[name]; + + // These cases should already be caught by validateMethodOverride. + _invariant( + isReactClassMethod && + (specPolicy === 'DEFINE_MANY_MERGED' || specPolicy === 'DEFINE_MANY'), + 'ReactClass: Unexpected spec policy %s for key %s ' + 'when mixing in component specs.', + specPolicy, + name, + ); + + // For methods which are defined more than once, call the existing + // methods before calling the new property, merging if appropriate. + if (specPolicy === 'DEFINE_MANY_MERGED') { + proto[name] = createMergedResultFunction(proto[name], property); + } else if (specPolicy === 'DEFINE_MANY') { + proto[name] = createChainedFunction(proto[name], property); + } + } else { + proto[name] = property; + if (true) { + // Add verbose displayName to the function, which helps when looking + // at profiling tools. + if (typeof property === 'function' && spec.displayName) { + proto[name].displayName = spec.displayName + '_' + name; + } + } + } + } + } + } + } + + function mixStaticSpecIntoComponent(Constructor, statics) { + if (!statics) { + return; + } + for (var name in statics) { + var property = statics[name]; + if (!statics.hasOwnProperty(name)) { + continue; + } + + var isReserved = name in RESERVED_SPEC_KEYS; + _invariant( + !isReserved, + 'ReactClass: You are attempting to define a reserved ' + + 'property, `%s`, that shouldn\'t be on the "statics" key. Define it ' + + 'as an instance property instead; it will still be accessible on the ' + + 'constructor.', + name, + ); + + var isInherited = name in Constructor; + _invariant( + !isInherited, + 'ReactClass: You are attempting to define ' + + '`%s` on your component more than once. This conflict may be ' + + 'due to a mixin.', + name, + ); + Constructor[name] = property; + } + } + + /** + * Merge two objects, but throw if both contain the same key. + * + * @param {object} one The first object, which is mutated. + * @param {object} two The second object + * @return {object} one after it has been mutated to contain everything in two. + */ + function mergeIntoWithNoDuplicateKeys(one, two) { + _invariant( + one && two && typeof one === 'object' && typeof two === 'object', + 'mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.', + ); + + for (var key in two) { + if (two.hasOwnProperty(key)) { + _invariant( + one[key] === undefined, + 'mergeIntoWithNoDuplicateKeys(): ' + + 'Tried to merge two objects with the same key: `%s`. This conflict ' + + 'may be due to a mixin; in particular, this may be caused by two ' + + 'getInitialState() or getDefaultProps() methods returning objects ' + + 'with clashing keys.', + key, + ); + one[key] = two[key]; + } + } + return one; + } + + /** + * Creates a function that invokes two functions and merges their return values. + * + * @param {function} one Function to invoke first. + * @param {function} two Function to invoke second. + * @return {function} Function that invokes the two argument functions. + * @private + */ + function createMergedResultFunction(one, two) { + return function mergedResult() { + var a = one.apply(this, arguments); + var b = two.apply(this, arguments); + if (a == null) { + return b; + } else if (b == null) { + return a; + } + var c = {}; + mergeIntoWithNoDuplicateKeys(c, a); + mergeIntoWithNoDuplicateKeys(c, b); + return c; + }; + } + + /** + * Creates a function that invokes two functions and ignores their return vales. + * + * @param {function} one Function to invoke first. + * @param {function} two Function to invoke second. + * @return {function} Function that invokes the two argument functions. + * @private + */ + function createChainedFunction(one, two) { + return function chainedFunction() { + one.apply(this, arguments); + two.apply(this, arguments); + }; + } + + /** + * Binds a method to the component. + * + * @param {object} component Component whose method is going to be bound. + * @param {function} method Method to be bound. + * @return {function} The bound method. + */ + function bindAutoBindMethod(component, method) { + var boundMethod = method.bind(component); + if (true) { + boundMethod.__reactBoundContext = component; + boundMethod.__reactBoundMethod = method; + boundMethod.__reactBoundArguments = null; + var componentName = component.constructor.displayName; + var _bind = boundMethod.bind; + boundMethod.bind = function (newThis) { + for ( + var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; + _key < _len; + _key++ + ) { + args[_key - 1] = arguments[_key]; + } + + // User is trying to bind() an autobound method; we effectively will + // ignore the value of "this" that the user is trying to use, so + // let's warn. + if (newThis !== component && newThis !== null) { + true + ? warning( + false, + 'bind(): React component methods may only be bound to the ' + + 'component instance. See %s', + componentName, + ) + : void 0; + } else if (!args.length) { + true + ? warning( + false, + 'bind(): You are binding a component method to the component. ' + + 'React does this for you automatically in a high-performance ' + + 'way, so you can safely remove this call. See %s', + componentName, + ) + : void 0; + return boundMethod; + } + var reboundMethod = _bind.apply(boundMethod, arguments); + reboundMethod.__reactBoundContext = component; + reboundMethod.__reactBoundMethod = method; + reboundMethod.__reactBoundArguments = args; + return reboundMethod; + }; + } + return boundMethod; + } + + /** + * Binds all auto-bound methods in a component. + * + * @param {object} component Component whose method is going to be bound. + */ + function bindAutoBindMethods(component) { + var pairs = component.__reactAutoBindPairs; + for (var i = 0; i < pairs.length; i += 2) { + var autoBindKey = pairs[i]; + var method = pairs[i + 1]; + component[autoBindKey] = bindAutoBindMethod(component, method); + } + } + + var IsMountedMixin = { + componentDidMount: function () { + this.__isMounted = true; + }, + componentWillUnmount: function () { + this.__isMounted = false; + }, + }; + + /** + * Add more to the ReactClass base class. These are all legacy features and + * therefore not already part of the modern ReactComponent. + */ + var ReactClassMixin = { + /** + * TODO: This will be deprecated because state should always keep a consistent + * type signature and the only use case for this, is to avoid that. + */ + replaceState: function (newState, callback) { + this.updater.enqueueReplaceState(this, newState, callback); + }, + + /** + * Checks whether or not this composite component is mounted. + * @return {boolean} True if mounted, false otherwise. + * @protected + * @final + */ + isMounted: function () { + if (true) { + true + ? warning( + this.__didWarnIsMounted, + '%s: isMounted is deprecated. Instead, make sure to clean up ' + + 'subscriptions and pending requests in componentWillUnmount to ' + + 'prevent memory leaks.', + (this.constructor && this.constructor.displayName) || this.name || 'Component', + ) + : void 0; + this.__didWarnIsMounted = true; + } + return !!this.__isMounted; + }, + }; + + var ReactClassComponent = function () {}; + _assign(ReactClassComponent.prototype, ReactComponent.prototype, ReactClassMixin); + + /** + * Creates a composite component class given a class specification. + * See https://facebook.github.io/react/docs/top-level-api.html#react.createclass + * + * @param {object} spec Class specification (which must define `render`). + * @return {function} Component constructor function. + * @public + */ + function createClass(spec) { + // To keep our warnings more understandable, we'll use a little hack here to + // ensure that Constructor.name !== 'Constructor'. This makes sure we don't + // unnecessarily identify a class without displayName as 'Constructor'. + var Constructor = identity(function (props, context, updater) { + // This constructor gets overridden by mocks. The argument is used + // by mocks to assert on what gets mounted. + + if (true) { + true + ? warning( + this instanceof Constructor, + 'Something is calling a React component directly. Use a factory or ' + + 'JSX instead. See: https://fb.me/react-legacyfactory', + ) + : void 0; + } + + // Wire up auto-binding + if (this.__reactAutoBindPairs.length) { + bindAutoBindMethods(this); + } + + this.props = props; + this.context = context; + this.refs = emptyObject; + this.updater = updater || ReactNoopUpdateQueue; + + this.state = null; + + // ReactClasses doesn't have constructors. Instead, they use the + // getInitialState and componentWillMount methods for initialization. + + var initialState = this.getInitialState ? this.getInitialState() : null; + if (true) { + // We allow auto-mocks to proceed as if they're returning null. + if (initialState === undefined && this.getInitialState._isMockFunction) { + // This is probably bad practice. Consider warning here and + // deprecating this convenience. + initialState = null; + } + } + _invariant( + typeof initialState === 'object' && !Array.isArray(initialState), + '%s.getInitialState(): must return an object or null', + Constructor.displayName || 'ReactCompositeComponent', + ); + + this.state = initialState; + }); + Constructor.prototype = new ReactClassComponent(); + Constructor.prototype.constructor = Constructor; + Constructor.prototype.__reactAutoBindPairs = []; + + injectedMixins.forEach(mixSpecIntoComponent.bind(null, Constructor)); + + mixSpecIntoComponent(Constructor, IsMountedMixin); + mixSpecIntoComponent(Constructor, spec); + + // Initialize the defaultProps property after all mixins have been merged. + if (Constructor.getDefaultProps) { + Constructor.defaultProps = Constructor.getDefaultProps(); + } + + if (true) { + // This is a tag to indicate that the use of these method names is ok, + // since it's used with createClass. If it's not, then it's likely a + // mistake so we'll warn you to use the static property, property + // initializer or constructor respectively. + if (Constructor.getDefaultProps) { + Constructor.getDefaultProps.isReactClassApproved = {}; + } + if (Constructor.prototype.getInitialState) { + Constructor.prototype.getInitialState.isReactClassApproved = {}; + } + } + + _invariant( + Constructor.prototype.render, + 'createClass(...): Class specification must implement a `render` method.', + ); + + if (true) { + true + ? warning( + !Constructor.prototype.componentShouldUpdate, + '%s has a method called ' + + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + + 'The name is phrased as a question because the function is ' + + 'expected to return a value.', + spec.displayName || 'A component', + ) + : void 0; + true + ? warning( + !Constructor.prototype.componentWillRecieveProps, + '%s has a method called ' + + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', + spec.displayName || 'A component', + ) + : void 0; + } + + // Reduce time spent doing lookups by setting these on the prototype. + for (var methodName in ReactClassInterface) { + if (!Constructor.prototype[methodName]) { + Constructor.prototype[methodName] = null; + } + } + + return Constructor; + } + + return createClass; + } + + module.exports = factory; + + /***/ + }, + /* 704 */ + /***/ function (module, exports, __webpack_require__) { + var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; /** + * Copyright Marc J. Schmidt. See the LICENSE file at the top-level + * directory of this distribution and at + * https://github.com/marcj/css-element-queries/blob/master/LICENSE. + */ + (function (root, factory) { + if (true) { + !((__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(300)]), + (__WEBPACK_AMD_DEFINE_FACTORY__ = factory), + (__WEBPACK_AMD_DEFINE_RESULT__ = + typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' + ? __WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__) + : __WEBPACK_AMD_DEFINE_FACTORY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else if (typeof exports === 'object') { + module.exports = factory(require('./ResizeSensor.js')); + } else { + root.ElementQueries = factory(root.ResizeSensor); + } + })(this, function (ResizeSensor) { + /** + * + * @type {Function} + * @constructor + */ + var ElementQueries = function () { + var trackingActive = false; + var elements = []; + + /** + * + * @param element + * @returns {Number} + */ + function getEmSize(element) { + if (!element) { + element = document.documentElement; + } + var fontSize = window.getComputedStyle(element, null).fontSize; + return parseFloat(fontSize) || 16; + } + + /** + * + * @copyright https://github.com/Mr0grog/element-query/blob/master/LICENSE + * + * @param {HTMLElement} element + * @param {*} value + * @returns {*} + */ + function convertToPx(element, value) { + var numbers = value.split(/\d/); + var units = numbers[numbers.length - 1]; + value = parseFloat(value); + switch (units) { + case 'px': + return value; + case 'em': + return value * getEmSize(element); + case 'rem': + return value * getEmSize(); + // Viewport units! + // According to http://quirksmode.org/mobile/tableViewport.html + // documentElement.clientWidth/Height gets us the most reliable info + case 'vw': + return (value * document.documentElement.clientWidth) / 100; + case 'vh': + return (value * document.documentElement.clientHeight) / 100; + case 'vmin': + case 'vmax': + var vw = document.documentElement.clientWidth / 100; + var vh = document.documentElement.clientHeight / 100; + var chooser = Math[units === 'vmin' ? 'min' : 'max']; + return value * chooser(vw, vh); + default: + return value; + // for now, not supporting physical units (since they are just a set number of px) + // or ex/ch (getting accurate measurements is hard) + } + } + + /** + * + * @param {HTMLElement} element + * @constructor + */ + function SetupInformation(element) { + this.element = element; + this.options = {}; + var key, + option, + width = 0, + height = 0, + value, + actualValue, + attrValues, + attrValue, + attrName; + + /** + * @param {Object} option {mode: 'min|max', property: 'width|height', value: '123px'} + */ + this.addOption = function (option) { + var idx = [option.mode, option.property, option.value].join(','); + this.options[idx] = option; + }; + + var attributes = ['min-width', 'min-height', 'max-width', 'max-height']; + + /** + * Extracts the computed width/height and sets to min/max- attribute. + */ + this.call = function () { + // extract current dimensions + width = this.element.offsetWidth; + height = this.element.offsetHeight; + + attrValues = {}; + + for (key in this.options) { + if (!this.options.hasOwnProperty(key)) { + continue; + } + option = this.options[key]; + + value = convertToPx(this.element, option.value); + + actualValue = option.property == 'width' ? width : height; + attrName = option.mode + '-' + option.property; + attrValue = ''; + + if (option.mode == 'min' && actualValue >= value) { + attrValue += option.value; + } + + if (option.mode == 'max' && actualValue <= value) { + attrValue += option.value; + } + + if (!attrValues[attrName]) attrValues[attrName] = ''; + if (attrValue && -1 === (' ' + attrValues[attrName] + ' ').indexOf(' ' + attrValue + ' ')) { + attrValues[attrName] += ' ' + attrValue; + } + } + + for (var k in attributes) { + if (!attributes.hasOwnProperty(k)) continue; + + if (attrValues[attributes[k]]) { + this.element.setAttribute(attributes[k], attrValues[attributes[k]].substr(1)); + } else { + this.element.removeAttribute(attributes[k]); + } + } + }; + } + + /** + * @param {HTMLElement} element + * @param {Object} options + */ + function setupElement(element, options) { + if (element.elementQueriesSetupInformation) { + element.elementQueriesSetupInformation.addOption(options); + } else { + element.elementQueriesSetupInformation = new SetupInformation(element); + element.elementQueriesSetupInformation.addOption(options); + element.elementQueriesSensor = new ResizeSensor(element, function () { + element.elementQueriesSetupInformation.call(); + }); + } + element.elementQueriesSetupInformation.call(); + + if (trackingActive && elements.indexOf(element) < 0) { + elements.push(element); + } + } + + /** + * @param {String} selector + * @param {String} mode min|max + * @param {String} property width|height + * @param {String} value + */ + var allQueries = {}; + function queueQuery(selector, mode, property, value) { + if (typeof allQueries[mode] == 'undefined') allQueries[mode] = {}; + if (typeof allQueries[mode][property] == 'undefined') allQueries[mode][property] = {}; + if (typeof allQueries[mode][property][value] == 'undefined') + allQueries[mode][property][value] = selector; + else allQueries[mode][property][value] += ',' + selector; + } + + function getQuery() { + var query; + if (document.querySelectorAll) query = document.querySelectorAll.bind(document); + if (!query && 'undefined' !== typeof $$) query = $$; + if (!query && 'undefined' !== typeof jQuery) query = jQuery; + + if (!query) { + throw "No document.querySelectorAll, jQuery or Mootools's $$ found."; + } + + return query; + } + + /** + * Start the magic. Go through all collected rules (readRules()) and attach the resize-listener. + */ + function findElementQueriesElements() { + var query = getQuery(); + + for (var mode in allQueries) + if (allQueries.hasOwnProperty(mode)) { + for (var property in allQueries[mode]) + if (allQueries[mode].hasOwnProperty(property)) { + for (var value in allQueries[mode][property]) + if (allQueries[mode][property].hasOwnProperty(value)) { + var elements = query(allQueries[mode][property][value]); + for (var i = 0, j = elements.length; i < j; i++) { + setupElement(elements[i], { + mode: mode, + property: property, + value: value, + }); + } + } + } + } + } + + /** + * + * @param {HTMLElement} element + */ + function attachResponsiveImage(element) { + var children = []; + var rules = []; + var sources = []; + var defaultImageId = 0; + var lastActiveImage = -1; + var loadedImages = []; + + for (var i in element.children) { + if (!element.children.hasOwnProperty(i)) continue; + + if (element.children[i].tagName && element.children[i].tagName.toLowerCase() === 'img') { + children.push(element.children[i]); + + var minWidth = + element.children[i].getAttribute('min-width') || + element.children[i].getAttribute('data-min-width'); + //var minHeight = element.children[i].getAttribute('min-height') || element.children[i].getAttribute('data-min-height'); + var src = + element.children[i].getAttribute('data-src') || element.children[i].getAttribute('url'); + + sources.push(src); + + var rule = { + minWidth: minWidth, + }; + + rules.push(rule); + + if (!minWidth) { + defaultImageId = children.length - 1; + element.children[i].style.display = 'block'; + } else { + element.children[i].style.display = 'none'; + } + } + } + + lastActiveImage = defaultImageId; + + function check() { + var imageToDisplay = false, + i; + + for (i in children) { + if (!children.hasOwnProperty(i)) continue; + + if (rules[i].minWidth) { + if (element.offsetWidth > rules[i].minWidth) { + imageToDisplay = i; + } + } + } + + if (!imageToDisplay) { + //no rule matched, show default + imageToDisplay = defaultImageId; + } + + if (lastActiveImage != imageToDisplay) { + //image change + + if (!loadedImages[imageToDisplay]) { + //image has not been loaded yet, we need to load the image first in memory to prevent flash of + //no content + + var image = new Image(); + image.onload = function () { + children[imageToDisplay].src = sources[imageToDisplay]; + + children[lastActiveImage].style.display = 'none'; + children[imageToDisplay].style.display = 'block'; + + loadedImages[imageToDisplay] = true; + + lastActiveImage = imageToDisplay; + }; + + image.src = sources[imageToDisplay]; + } else { + children[lastActiveImage].style.display = 'none'; + children[imageToDisplay].style.display = 'block'; + lastActiveImage = imageToDisplay; + } + } else { + //make sure for initial check call the .src is set correctly + children[imageToDisplay].src = sources[imageToDisplay]; + } + } + + element.resizeSensor = new ResizeSensor(element, check); + check(); + + if (trackingActive) { + elements.push(element); + } + } + + function findResponsiveImages() { + var query = getQuery(); + + var elements = query('[data-responsive-image],[responsive-image]'); + for (var i = 0, j = elements.length; i < j; i++) { + attachResponsiveImage(elements[i]); + } + } + + var regex = + /,?[\s\t]*([^,\n]*?)((?:\[[\s\t]*?(?:min|max)-(?:width|height)[\s\t]*?[~$\^]?=[\s\t]*?"[^"]*?"[\s\t]*?])+)([^,\n\s\{]*)/gim; + var attrRegex = /\[[\s\t]*?(min|max)-(width|height)[\s\t]*?[~$\^]?=[\s\t]*?"([^"]*?)"[\s\t]*?]/gim; + /** + * @param {String} css + */ + function extractQuery(css) { + var match; + var smatch; + css = css.replace(/'/g, '"'); + while (null !== (match = regex.exec(css))) { + smatch = match[1] + match[3]; + attrs = match[2]; + + while (null !== (attrMatch = attrRegex.exec(attrs))) { + queueQuery(smatch, attrMatch[1], attrMatch[2], attrMatch[3]); + } + } + } + + /** + * @param {CssRule[]|String} rules + */ + function readRules(rules) { + var selector = ''; + if (!rules) { + return; + } + if ('string' === typeof rules) { + rules = rules.toLowerCase(); + if (-1 !== rules.indexOf('min-width') || -1 !== rules.indexOf('max-width')) { + extractQuery(rules); + } + } else { + for (var i = 0, j = rules.length; i < j; i++) { + if (1 === rules[i].type) { + selector = rules[i].selectorText || rules[i].cssText; + if (-1 !== selector.indexOf('min-height') || -1 !== selector.indexOf('max-height')) { + extractQuery(selector); + } else if (-1 !== selector.indexOf('min-width') || -1 !== selector.indexOf('max-width')) { + extractQuery(selector); + } + } else if (4 === rules[i].type) { + readRules(rules[i].cssRules || rules[i].rules); + } + } + } + } + + var defaultCssInjected = false; + + /** + * Searches all css rules and setups the event listener to all elements with element query rules.. + * + * @param {Boolean} withTracking allows and requires you to use detach, since we store internally all used elements + * (no garbage collection possible if you don not call .detach() first) + */ + this.init = function (withTracking) { + trackingActive = typeof withTracking === 'undefined' ? false : withTracking; + + for (var i = 0, j = document.styleSheets.length; i < j; i++) { + try { + readRules( + document.styleSheets[i].cssRules || + document.styleSheets[i].rules || + document.styleSheets[i].cssText, + ); + } catch (e) { + if (e.name !== 'SecurityError') { + throw e; + } + } + } + + if (!defaultCssInjected) { + var style = document.createElement('style'); + style.type = 'text/css'; + style.innerHTML = + '[responsive-image] > img, [data-responsive-image] {overflow: hidden; padding: 0; } [responsive-image] > img, [data-responsive-image] > img { width: 100%;}'; + document.getElementsByTagName('head')[0].appendChild(style); + defaultCssInjected = true; + } + + findElementQueriesElements(); + findResponsiveImages(); + }; + + /** + * + * @param {Boolean} withTracking allows and requires you to use detach, since we store internally all used elements + * (no garbage collection possible if you don not call .detach() first) + */ + this.update = function (withTracking) { + this.init(withTracking); + }; + + this.detach = function () { + if (!this.withTracking) { + throw ( + 'withTracking is not enabled. We can not detach elements since we don not store it.' + + 'Use ElementQueries.withTracking = true; before domready or call ElementQueryes.update(true).' + ); + } + + var element; + while ((element = elements.pop())) { + ElementQueries.detach(element); + } + + elements = []; + }; + }; + + /** + * + * @param {Boolean} withTracking allows and requires you to use detach, since we store internally all used elements + * (no garbage collection possible if you don not call .detach() first) + */ + ElementQueries.update = function (withTracking) { + ElementQueries.instance.update(withTracking); + }; + + /** + * Removes all sensor and elementquery information from the element. + * + * @param {HTMLElement} element + */ + ElementQueries.detach = function (element) { + if (element.elementQueriesSetupInformation) { + //element queries + element.elementQueriesSensor.detach(); + delete element.elementQueriesSetupInformation; + delete element.elementQueriesSensor; + } else if (element.resizeSensor) { + //responsive image + + element.resizeSensor.detach(); + delete element.resizeSensor; + } else { + //console.log('detached already', element); + } + }; + + ElementQueries.withTracking = false; + + ElementQueries.init = function () { + if (!ElementQueries.instance) { + ElementQueries.instance = new ElementQueries(); + } + + ElementQueries.instance.init(ElementQueries.withTracking); + }; + + var domLoaded = function (callback) { + /* Internet Explorer */ + /*@cc_on + @if (@_win32 || @_win64) + document.write('<script id="ieScriptLoad" defer src="//:"><\/script>'); + document.getElementById('ieScriptLoad').onreadystatechange = function() { + if (this.readyState == 'complete') { + callback(); + } + }; + @end @*/ + /* Mozilla, Chrome, Opera */ + if (document.addEventListener) { + document.addEventListener('DOMContentLoaded', callback, false); + } else if (/KHTML|WebKit|iCab/i.test(navigator.userAgent)) { + /* Safari, iCab, Konqueror */ + var DOMLoadTimer = setInterval(function () { + if (/loaded|complete/i.test(document.readyState)) { + callback(); + clearInterval(DOMLoadTimer); + } + }, 10); + } else + /* Other web browsers */ + window.onload = callback; + }; + + ElementQueries.listen = function () { + domLoaded(ElementQueries.init); + }; + + // make available to common module loader + if (typeof module !== 'undefined' && typeof module.exports !== 'undefined') { + module.exports = ElementQueries; + } else { + window.ElementQueries = ElementQueries; + ElementQueries.listen(); + } + + return ElementQueries; + }); + + /***/ + }, + /* 705 */ + /***/ function (module, exports, __webpack_require__) { + var pSlice = Array.prototype.slice; + var objectKeys = __webpack_require__(707); + var isArguments = __webpack_require__(706); + + var deepEqual = (module.exports = function (actual, expected, opts) { + if (!opts) opts = {}; + // 7.1. All identical values are equivalent, as determined by ===. + if (actual === expected) { + return true; + } else if (actual instanceof Date && expected instanceof Date) { + return actual.getTime() === expected.getTime(); + + // 7.3. Other pairs that do not both pass typeof value == 'object', + // equivalence is determined by ==. + } else if (!actual || !expected || (typeof actual != 'object' && typeof expected != 'object')) { + return opts.strict ? actual === expected : actual == expected; + + // 7.4. For all other Object pairs, including Array objects, equivalence is + // determined by having the same number of owned properties (as verified + // with Object.prototype.hasOwnProperty.call), the same set of keys + // (although not necessarily the same order), equivalent values for every + // corresponding key, and an identical 'prototype' property. Note: this + // accounts for both named and indexed properties on Arrays. + } else { + return objEquiv(actual, expected, opts); + } + }); + + function isUndefinedOrNull(value) { + return value === null || value === undefined; + } + + function isBuffer(x) { + if (!x || typeof x !== 'object' || typeof x.length !== 'number') return false; + if (typeof x.copy !== 'function' || typeof x.slice !== 'function') { + return false; + } + if (x.length > 0 && typeof x[0] !== 'number') return false; + return true; + } + + function objEquiv(a, b, opts) { + var i, key; + if (isUndefinedOrNull(a) || isUndefinedOrNull(b)) return false; + // an identical 'prototype' property. + if (a.prototype !== b.prototype) return false; + //~~~I've managed to break Object.keys through screwy arguments passing. + // Converting to array solves the problem. + if (isArguments(a)) { + if (!isArguments(b)) { + return false; + } + a = pSlice.call(a); + b = pSlice.call(b); + return deepEqual(a, b, opts); + } + if (isBuffer(a)) { + if (!isBuffer(b)) { + return false; + } + if (a.length !== b.length) return false; + for (i = 0; i < a.length; i++) { + if (a[i] !== b[i]) return false; + } + return true; + } + try { + var ka = objectKeys(a), + kb = objectKeys(b); + } catch (e) { + //happens when one is a string literal and the other isn't + return false; + } + // having the same number of owned properties (keys incorporates + // hasOwnProperty) + if (ka.length != kb.length) return false; + //the same set of keys (although not necessarily the same order), + ka.sort(); + kb.sort(); + //~~~cheap key test + for (i = ka.length - 1; i >= 0; i--) { + if (ka[i] != kb[i]) return false; + } + //equivalent values for every corresponding key, and + //~~~possibly expensive deep test + for (i = ka.length - 1; i >= 0; i--) { + key = ka[i]; + if (!deepEqual(a[key], b[key], opts)) return false; + } + return typeof a === typeof b; + } + + /***/ + }, + /* 706 */ + /***/ function (module, exports) { + var supportsArgumentsClass = + (function () { + return Object.prototype.toString.call(arguments); + })() == '[object Arguments]'; + + exports = module.exports = supportsArgumentsClass ? supported : unsupported; + + exports.supported = supported; + function supported(object) { + return Object.prototype.toString.call(object) == '[object Arguments]'; + } + + exports.unsupported = unsupported; + function unsupported(object) { + return ( + (object && + typeof object == 'object' && + typeof object.length == 'number' && + Object.prototype.hasOwnProperty.call(object, 'callee') && + !Object.prototype.propertyIsEnumerable.call(object, 'callee')) || + false + ); + } + + /***/ + }, + /* 707 */ + /***/ function (module, exports) { + exports = module.exports = typeof Object.keys === 'function' ? Object.keys : shim; + + exports.shim = shim; + function shim(obj) { + var keys = []; + for (var key in obj) keys.push(key); + return keys; + } + + /***/ + }, + /* 708 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + /** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @typechecks + */ + + var invariant = __webpack_require__(3); + + /** + * The CSSCore module specifies the API (and implements most of the methods) + * that should be used when dealing with the display of elements (via their + * CSS classes and visibility on screen. It is an API focused on mutating the + * display and not reading it as no logical state should be encoded in the + * display of elements. + */ + + /* Slow implementation for browsers that don't natively support .matches() */ + function matchesSelector_SLOW(element, selector) { + var root = element; + while (root.parentNode) { + root = root.parentNode; + } + + var all = root.querySelectorAll(selector); + return Array.prototype.indexOf.call(all, element) !== -1; + } + + var CSSCore = { + /** + * Adds the class passed in to the element if it doesn't already have it. + * + * @param {DOMElement} element the element to set the class on + * @param {string} className the CSS className + * @return {DOMElement} the element passed in + */ + addClass: function addClass(element, className) { + !!/\s/.test(className) + ? true + ? invariant( + false, + 'CSSCore.addClass takes only a single class name. "%s" contains ' + 'multiple classes.', + className, + ) + : invariant(false) + : void 0; + + if (className) { + if (element.classList) { + element.classList.add(className); + } else if (!CSSCore.hasClass(element, className)) { + element.className = element.className + ' ' + className; + } + } + return element; + }, + + /** + * Removes the class passed in from the element + * + * @param {DOMElement} element the element to set the class on + * @param {string} className the CSS className + * @return {DOMElement} the element passed in + */ + removeClass: function removeClass(element, className) { + !!/\s/.test(className) + ? true + ? invariant( + false, + 'CSSCore.removeClass takes only a single class name. "%s" contains ' + 'multiple classes.', + className, + ) + : invariant(false) + : void 0; + + if (className) { + if (element.classList) { + element.classList.remove(className); + } else if (CSSCore.hasClass(element, className)) { + element.className = element.className + .replace(new RegExp('(^|\\s)' + className + '(?:\\s|$)', 'g'), '$1') + .replace(/\s+/g, ' ') // multiple spaces to one + .replace(/^\s*|\s*$/g, ''); // trim the ends + } + } + return element; + }, + + /** + * Helper to add or remove a class from an element based on a condition. + * + * @param {DOMElement} element the element to set the class on + * @param {string} className the CSS className + * @param {*} bool condition to whether to add or remove the class + * @return {DOMElement} the element passed in + */ + conditionClass: function conditionClass(element, className, bool) { + return (bool ? CSSCore.addClass : CSSCore.removeClass)(element, className); + }, + + /** + * Tests whether the element has the class specified. + * + * @param {DOMNode|DOMWindow} element the element to check the class on + * @param {string} className the CSS className + * @return {boolean} true if the element has the class, false if not + */ + hasClass: function hasClass(element, className) { + !!/\s/.test(className) + ? true + ? invariant(false, 'CSS.hasClass takes only a single class name.') + : invariant(false) + : void 0; + if (element.classList) { + return !!className && element.classList.contains(className); + } + return (' ' + element.className + ' ').indexOf(' ' + className + ' ') > -1; + }, + + /** + * Tests whether the element matches the selector specified + * + * @param {DOMNode|DOMWindow} element the element that we are querying + * @param {string} selector the CSS selector + * @return {boolean} true if the element matches the selector, false if not + */ + matchesSelector: function matchesSelector(element, selector) { + var matchesImpl = + element.matches || + element.webkitMatchesSelector || + element.mozMatchesSelector || + element.msMatchesSelector || + function (s) { + return matchesSelector_SLOW(element, s); + }; + return matchesImpl.call(element, selector); + }, + }; + + module.exports = CSSCore; + + /***/ + }, + /* 709 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + /** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @typechecks + */ + + var _hyphenPattern = /-(.)/g; + + /** + * Camelcases a hyphenated string, for example: + * + * > camelize('background-color') + * < "backgroundColor" + * + * @param {string} string + * @return {string} + */ + function camelize(string) { + return string.replace(_hyphenPattern, function (_, character) { + return character.toUpperCase(); + }); + } + + module.exports = camelize; + + /***/ + }, + /* 710 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @typechecks + */ + + var camelize = __webpack_require__(709); + + var msPattern = /^-ms-/; + + /** + * Camelcases a hyphenated CSS property name, for example: + * + * > camelizeStyleName('background-color') + * < "backgroundColor" + * > camelizeStyleName('-moz-transition') + * < "MozTransition" + * > camelizeStyleName('-ms-transition') + * < "msTransition" + * + * As Andi Smith suggests + * (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix + * is converted to lowercase `ms`. + * + * @param {string} string + * @return {string} + */ + function camelizeStyleName(string) { + return camelize(string.replace(msPattern, 'ms-')); + } + + module.exports = camelizeStyleName; + + /***/ + }, + /* 711 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + /** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + var isTextNode = __webpack_require__(719); + + /*eslint-disable no-bitwise */ + + /** + * Checks if a given DOM node contains or is another DOM node. + */ + function containsNode(outerNode, innerNode) { + if (!outerNode || !innerNode) { + return false; + } else if (outerNode === innerNode) { + return true; + } else if (isTextNode(outerNode)) { + return false; + } else if (isTextNode(innerNode)) { + return containsNode(outerNode, innerNode.parentNode); + } else if ('contains' in outerNode) { + return outerNode.contains(innerNode); + } else if (outerNode.compareDocumentPosition) { + return !!(outerNode.compareDocumentPosition(innerNode) & 16); + } else { + return false; + } + } + + module.exports = containsNode; + + /***/ + }, + /* 712 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + /** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @typechecks + */ + + var invariant = __webpack_require__(3); + + /** + * Convert array-like objects to arrays. + * + * This API assumes the caller knows the contents of the data type. For less + * well defined inputs use createArrayFromMixed. + * + * @param {object|function|filelist} obj + * @return {array} + */ + function toArray(obj) { + var length = obj.length; + + // Some browsers builtin objects can report typeof 'function' (e.g. NodeList + // in old versions of Safari). + !(!Array.isArray(obj) && (typeof obj === 'object' || typeof obj === 'function')) + ? true + ? invariant(false, 'toArray: Array-like object expected') + : invariant(false) + : void 0; + + !(typeof length === 'number') + ? true + ? invariant(false, 'toArray: Object needs a length property') + : invariant(false) + : void 0; + + !(length === 0 || length - 1 in obj) + ? true + ? invariant(false, 'toArray: Object should have keys for indices') + : invariant(false) + : void 0; + + !(typeof obj.callee !== 'function') + ? true + ? invariant( + false, + "toArray: Object can't be `arguments`. Use rest params " + + '(function(...args) {}) or Array.from() instead.', + ) + : invariant(false) + : void 0; + + // Old IE doesn't give collections access to hasOwnProperty. Assume inputs + // without method will throw during the slice call and skip straight to the + // fallback. + if (obj.hasOwnProperty) { + try { + return Array.prototype.slice.call(obj); + } catch (e) { + // IE < 9 does not support Array#slice on collections objects + } + } + + // Fall back to copying key by key. This assumes all keys have a value, + // so will not preserve sparsely populated inputs. + var ret = Array(length); + for (var ii = 0; ii < length; ii++) { + ret[ii] = obj[ii]; + } + return ret; + } + + /** + * Perform a heuristic test to determine if an object is "array-like". + * + * A monk asked Joshu, a Zen master, "Has a dog Buddha nature?" + * Joshu replied: "Mu." + * + * This function determines if its argument has "array nature": it returns + * true if the argument is an actual array, an `arguments' object, or an + * HTMLCollection (e.g. node.childNodes or node.getElementsByTagName()). + * + * It will return false for other array-like objects like Filelist. + * + * @param {*} obj + * @return {boolean} + */ + function hasArrayNature(obj) { + return ( + // not null/false + !!obj && + // arrays are objects, NodeLists are functions in Safari + (typeof obj == 'object' || typeof obj == 'function') && + // quacks like an array + 'length' in obj && + // not window + !('setInterval' in obj) && + // no DOM node should be considered an array-like + // a 'select' element has 'length' and 'item' properties on IE8 + typeof obj.nodeType != 'number' && + // a real array + (Array.isArray(obj) || + // arguments + 'callee' in obj || + // HTMLCollection/NodeList + 'item' in obj) + ); + } + + /** + * Ensure that the argument is an array by wrapping it in an array if it is not. + * Creates a copy of the argument if it is already an array. + * + * This is mostly useful idiomatically: + * + * var createArrayFromMixed = require('createArrayFromMixed'); + * + * function takesOneOrMoreThings(things) { + * things = createArrayFromMixed(things); + * ... + * } + * + * This allows you to treat `things' as an array, but accept scalars in the API. + * + * If you need to convert an array-like object, like `arguments`, into an array + * use toArray instead. + * + * @param {*} obj + * @return {array} + */ + function createArrayFromMixed(obj) { + if (!hasArrayNature(obj)) { + return [obj]; + } else if (Array.isArray(obj)) { + return obj.slice(); + } else { + return toArray(obj); + } + } + + module.exports = createArrayFromMixed; + + /***/ + }, + /* 713 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + /** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @typechecks + */ + + /*eslint-disable fb-www/unsafe-html*/ + + var ExecutionEnvironment = __webpack_require__(17); + + var createArrayFromMixed = __webpack_require__(712); + var getMarkupWrap = __webpack_require__(714); + var invariant = __webpack_require__(3); + + /** + * Dummy container used to render all markup. + */ + var dummyNode = ExecutionEnvironment.canUseDOM ? document.createElement('div') : null; + + /** + * Pattern used by `getNodeName`. + */ + var nodeNamePattern = /^\s*<(\w+)/; + + /** + * Extracts the `nodeName` of the first element in a string of markup. + * + * @param {string} markup String of markup. + * @return {?string} Node name of the supplied markup. + */ + function getNodeName(markup) { + var nodeNameMatch = markup.match(nodeNamePattern); + return nodeNameMatch && nodeNameMatch[1].toLowerCase(); + } + + /** + * Creates an array containing the nodes rendered from the supplied markup. The + * optionally supplied `handleScript` function will be invoked once for each + * <script> element that is rendered. If no `handleScript` function is supplied, + * an exception is thrown if any <script> elements are rendered. + * + * @param {string} markup A string of valid HTML markup. + * @param {?function} handleScript Invoked once for each rendered <script>. + * @return {array<DOMElement|DOMTextNode>} An array of rendered nodes. + */ + function createNodesFromMarkup(markup, handleScript) { + var node = dummyNode; + !!!dummyNode + ? true + ? invariant(false, 'createNodesFromMarkup dummy not initialized') + : invariant(false) + : void 0; + var nodeName = getNodeName(markup); + + var wrap = nodeName && getMarkupWrap(nodeName); + if (wrap) { + node.innerHTML = wrap[1] + markup + wrap[2]; + + var wrapDepth = wrap[0]; + while (wrapDepth--) { + node = node.lastChild; + } + } else { + node.innerHTML = markup; + } + + var scripts = node.getElementsByTagName('script'); + if (scripts.length) { + !handleScript + ? true + ? invariant(false, 'createNodesFromMarkup(...): Unexpected <script> element rendered.') + : invariant(false) + : void 0; + createArrayFromMixed(scripts).forEach(handleScript); + } + + var nodes = Array.from(node.childNodes); + while (node.lastChild) { + node.removeChild(node.lastChild); + } + return nodes; + } + + module.exports = createNodesFromMarkup; + + /***/ + }, + /* 714 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + /** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + /*eslint-disable fb-www/unsafe-html */ + + var ExecutionEnvironment = __webpack_require__(17); + + var invariant = __webpack_require__(3); + + /** + * Dummy container used to detect which wraps are necessary. + */ + var dummyNode = ExecutionEnvironment.canUseDOM ? document.createElement('div') : null; + + /** + * Some browsers cannot use `innerHTML` to render certain elements standalone, + * so we wrap them, render the wrapped nodes, then extract the desired node. + * + * In IE8, certain elements cannot render alone, so wrap all elements ('*'). + */ + + var shouldWrap = {}; + + var selectWrap = [1, '<select multiple="true">', '</select>']; + var tableWrap = [1, '<table>', '</table>']; + var trWrap = [3, '<table><tbody><tr>', '</tr></tbody></table>']; + + var svgWrap = [1, '<svg xmlns="http://www.w3.org/2000/svg">', '</svg>']; + + var markupWrap = { + '*': [1, '?<div>', '</div>'], + + area: [1, '<map>', '</map>'], + col: [2, '<table><tbody></tbody><colgroup>', '</colgroup></table>'], + legend: [1, '<fieldset>', '</fieldset>'], + param: [1, '<object>', '</object>'], + tr: [2, '<table><tbody>', '</tbody></table>'], + + optgroup: selectWrap, + option: selectWrap, + + caption: tableWrap, + colgroup: tableWrap, + tbody: tableWrap, + tfoot: tableWrap, + thead: tableWrap, + + td: trWrap, + th: trWrap, + }; + + // Initialize the SVG elements since we know they'll always need to be wrapped + // consistently. If they are created inside a <div> they will be initialized in + // the wrong namespace (and will not display). + var svgElements = [ + 'circle', + 'clipPath', + 'defs', + 'ellipse', + 'g', + 'image', + 'line', + 'linearGradient', + 'mask', + 'path', + 'pattern', + 'polygon', + 'polyline', + 'radialGradient', + 'rect', + 'stop', + 'text', + 'tspan', + ]; + svgElements.forEach(function (nodeName) { + markupWrap[nodeName] = svgWrap; + shouldWrap[nodeName] = true; + }); + + /** + * Gets the markup wrap configuration for the supplied `nodeName`. + * + * NOTE: This lazily detects which wraps are necessary for the current browser. + * + * @param {string} nodeName Lowercase `nodeName`. + * @return {?array} Markup wrap configuration, if applicable. + */ + function getMarkupWrap(nodeName) { + !!!dummyNode + ? true + ? invariant(false, 'Markup wrapping node not initialized') + : invariant(false) + : void 0; + if (!markupWrap.hasOwnProperty(nodeName)) { + nodeName = '*'; + } + if (!shouldWrap.hasOwnProperty(nodeName)) { + if (nodeName === '*') { + dummyNode.innerHTML = '<link />'; + } else { + dummyNode.innerHTML = '<' + nodeName + '></' + nodeName + '>'; + } + shouldWrap[nodeName] = !dummyNode.firstChild; + } + return shouldWrap[nodeName] ? markupWrap[nodeName] : null; + } + + module.exports = getMarkupWrap; + + /***/ + }, + /* 715 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @typechecks + */ + + /** + * Gets the scroll position of the supplied element or window. + * + * The return values are unbounded, unlike `getScrollPosition`. This means they + * may be negative or exceed the element boundaries (which is possible using + * inertial scrolling). + * + * @param {DOMWindow|DOMElement} scrollable + * @return {object} Map with `x` and `y` keys. + */ + + function getUnboundedScrollPosition(scrollable) { + if (scrollable.Window && scrollable instanceof scrollable.Window) { + return { + x: scrollable.pageXOffset || scrollable.document.documentElement.scrollLeft, + y: scrollable.pageYOffset || scrollable.document.documentElement.scrollTop, + }; + } + return { + x: scrollable.scrollLeft, + y: scrollable.scrollTop, + }; + } + + module.exports = getUnboundedScrollPosition; + + /***/ + }, + /* 716 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + /** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @typechecks + */ + + var _uppercasePattern = /([A-Z])/g; + + /** + * Hyphenates a camelcased string, for example: + * + * > hyphenate('backgroundColor') + * < "background-color" + * + * For CSS style names, use `hyphenateStyleName` instead which works properly + * with all vendor prefixes, including `ms`. + * + * @param {string} string + * @return {string} + */ + function hyphenate(string) { + return string.replace(_uppercasePattern, '-$1').toLowerCase(); + } + + module.exports = hyphenate; + + /***/ + }, + /* 717 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @typechecks + */ + + var hyphenate = __webpack_require__(716); + + var msPattern = /^ms-/; + + /** + * Hyphenates a camelcased CSS property name, for example: + * + * > hyphenateStyleName('backgroundColor') + * < "background-color" + * > hyphenateStyleName('MozTransition') + * < "-moz-transition" + * > hyphenateStyleName('msTransition') + * < "-ms-transition" + * + * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix + * is converted to `-ms-`. + * + * @param {string} string + * @return {string} + */ + function hyphenateStyleName(string) { + return hyphenate(string).replace(msPattern, '-ms-'); + } + + module.exports = hyphenateStyleName; + + /***/ + }, + /* 718 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + /** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @typechecks + */ + + /** + * @param {*} object The object to check. + * @return {boolean} Whether or not the object is a DOM node. + */ + function isNode(object) { + var doc = object ? object.ownerDocument || object : document; + var defaultView = doc.defaultView || window; + return !!( + object && + (typeof defaultView.Node === 'function' + ? object instanceof defaultView.Node + : typeof object === 'object' && + typeof object.nodeType === 'number' && + typeof object.nodeName === 'string') + ); + } + + module.exports = isNode; + + /***/ + }, + /* 719 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + /** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @typechecks + */ + + var isNode = __webpack_require__(718); + + /** + * @param {*} object The object to check. + * @return {boolean} Whether or not the object is a DOM text node. + */ + function isTextNode(object) { + return isNode(object) && object.nodeType == 3; + } + + module.exports = isTextNode; + + /***/ + }, + /* 720 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + * @typechecks static-only + */ + + /** + * Memoizes the return value of a function that accepts one string argument. + */ + + function memoizeStringOnly(callback) { + var cache = {}; + return function (string) { + if (!cache.hasOwnProperty(string)) { + cache[string] = callback.call(this, string); + } + return cache[string]; + }; + } + + module.exports = memoizeStringOnly; + + /***/ + }, + /* 721 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @typechecks + */ + + var ExecutionEnvironment = __webpack_require__(17); + + var performance; + + if (ExecutionEnvironment.canUseDOM) { + performance = window.performance || window.msPerformance || window.webkitPerformance; + } + + module.exports = performance || {}; + + /***/ + }, + /* 722 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + /** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @typechecks + */ + + var performance = __webpack_require__(721); + + var performanceNow; + + /** + * Detect if we can use `window.performance.now()` and gracefully fallback to + * `Date.now()` if it doesn't exist. We need to support Firefox < 15 for now + * because of Facebook's testing infrastructure. + */ + if (performance.now) { + performanceNow = function performanceNow() { + return performance.now(); + }; + } else { + performanceNow = function performanceNow() { + return Date.now(); + }; + } + + module.exports = performanceNow; + + /***/ + }, + /* 723 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + var loopAsync = (exports.loopAsync = function loopAsync(turns, work, callback) { + var currentTurn = 0, + isDone = false; + var isSync = false, + hasNext = false, + doneArgs = void 0; + + var done = function done() { + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + isDone = true; + + if (isSync) { + // Iterate instead of recursing if possible. + doneArgs = args; + return; + } + + callback.apply(undefined, args); + }; + + var next = function next() { + if (isDone) return; + + hasNext = true; + + if (isSync) return; // Iterate instead of recursing if possible. + + isSync = true; + + while (!isDone && currentTurn < turns && hasNext) { + hasNext = false; + work(currentTurn++, next, done); + } + + isSync = false; + + if (isDone) { + // This means the loop finished synchronously. + callback.apply(undefined, doneArgs); + return; + } + + if (currentTurn >= turns && hasNext) { + isDone = true; + callback(); + } + }; + + next(); + }); + + /***/ + }, + /* 724 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + exports.replaceLocation = + exports.pushLocation = + exports.startListener = + exports.getCurrentLocation = + exports.go = + exports.getUserConfirmation = + undefined; + + var _BrowserProtocol = __webpack_require__(195); + + Object.defineProperty(exports, 'getUserConfirmation', { + enumerable: true, + get: function get() { + return _BrowserProtocol.getUserConfirmation; + }, + }); + Object.defineProperty(exports, 'go', { + enumerable: true, + get: function get() { + return _BrowserProtocol.go; + }, + }); + + var _warning = __webpack_require__(71); + + var _warning2 = _interopRequireDefault(_warning); + + var _LocationUtils = __webpack_require__(99); + + var _DOMUtils = __webpack_require__(147); + + var _DOMStateStorage = __webpack_require__(304); + + var _PathUtils = __webpack_require__(67); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + var HashChangeEvent = 'hashchange'; + + var getHashPath = function getHashPath() { + // We can't use window.location.hash here because it's not + // consistent across browsers - Firefox will pre-decode it! + var href = window.location.href; + var hashIndex = href.indexOf('#'); + return hashIndex === -1 ? '' : href.substring(hashIndex + 1); + }; + + var pushHashPath = function pushHashPath(path) { + return (window.location.hash = path); + }; + + var replaceHashPath = function replaceHashPath(path) { + var hashIndex = window.location.href.indexOf('#'); + + window.location.replace(window.location.href.slice(0, hashIndex >= 0 ? hashIndex : 0) + '#' + path); + }; + + var getCurrentLocation = (exports.getCurrentLocation = function getCurrentLocation( + pathCoder, + queryKey, + ) { + var path = pathCoder.decodePath(getHashPath()); + var key = (0, _PathUtils.getQueryStringValueFromPath)(path, queryKey); + + var state = void 0; + if (key) { + path = (0, _PathUtils.stripQueryStringValueFromPath)(path, queryKey); + state = (0, _DOMStateStorage.readState)(key); + } + + var init = (0, _PathUtils.parsePath)(path); + init.state = state; + + return (0, _LocationUtils.createLocation)(init, undefined, key); + }); + + var prevLocation = void 0; + + var startListener = (exports.startListener = function startListener(listener, pathCoder, queryKey) { + var handleHashChange = function handleHashChange() { + var path = getHashPath(); + var encodedPath = pathCoder.encodePath(path); + + if (path !== encodedPath) { + // Always be sure we have a properly-encoded hash. + replaceHashPath(encodedPath); + } else { + var currentLocation = getCurrentLocation(pathCoder, queryKey); + + if (prevLocation && currentLocation.key && prevLocation.key === currentLocation.key) return; // Ignore extraneous hashchange events + + prevLocation = currentLocation; + + listener(currentLocation); + } + }; + + // Ensure the hash is encoded properly. + var path = getHashPath(); + var encodedPath = pathCoder.encodePath(path); + + if (path !== encodedPath) replaceHashPath(encodedPath); + + (0, _DOMUtils.addEventListener)(window, HashChangeEvent, handleHashChange); + + return function () { + return (0, _DOMUtils.removeEventListener)(window, HashChangeEvent, handleHashChange); + }; + }); + + var updateLocation = function updateLocation(location, pathCoder, queryKey, updateHash) { + var state = location.state, + key = location.key; + + var path = pathCoder.encodePath((0, _PathUtils.createPath)(location)); + + if (state !== undefined) { + path = (0, _PathUtils.addQueryStringValueToPath)(path, queryKey, key); + (0, _DOMStateStorage.saveState)(key, state); + } + + prevLocation = location; + + updateHash(path); + }; + + var pushLocation = (exports.pushLocation = function pushLocation(location, pathCoder, queryKey) { + return updateLocation(location, pathCoder, queryKey, function (path) { + if (getHashPath() !== path) { + pushHashPath(path); + } else { + true ? (0, _warning2.default)(false, 'You cannot PUSH the same path using hash history') : void 0; + } + }); + }); + + var replaceLocation = (exports.replaceLocation = function replaceLocation( + location, + pathCoder, + queryKey, + ) { + return updateLocation(location, pathCoder, queryKey, function (path) { + if (getHashPath() !== path) replaceHashPath(path); + }); + }); + + /***/ + }, + /* 725 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + exports.replaceLocation = + exports.pushLocation = + exports.getCurrentLocation = + exports.go = + exports.getUserConfirmation = + undefined; + + var _BrowserProtocol = __webpack_require__(195); + + Object.defineProperty(exports, 'getUserConfirmation', { + enumerable: true, + get: function get() { + return _BrowserProtocol.getUserConfirmation; + }, + }); + Object.defineProperty(exports, 'go', { + enumerable: true, + get: function get() { + return _BrowserProtocol.go; + }, + }); + + var _LocationUtils = __webpack_require__(99); + + var _PathUtils = __webpack_require__(67); + + var getCurrentLocation = (exports.getCurrentLocation = function getCurrentLocation() { + return (0, _LocationUtils.createLocation)(window.location); + }); + + var pushLocation = (exports.pushLocation = function pushLocation(location) { + window.location.href = (0, _PathUtils.createPath)(location); + return false; // Don't update location + }); + + var replaceLocation = (exports.replaceLocation = function replaceLocation(location) { + window.location.replace((0, _PathUtils.createPath)(location)); + return false; // Don't update location + }); + + /***/ + }, + /* 726 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + var _invariant = __webpack_require__(23); + + var _invariant2 = _interopRequireDefault(_invariant); + + var _ExecutionEnvironment = __webpack_require__(196); + + var _BrowserProtocol = __webpack_require__(195); + + var BrowserProtocol = _interopRequireWildcard(_BrowserProtocol); + + var _RefreshProtocol = __webpack_require__(725); + + var RefreshProtocol = _interopRequireWildcard(_RefreshProtocol); + + var _DOMUtils = __webpack_require__(147); + + var _createHistory = __webpack_require__(197); + + var _createHistory2 = _interopRequireDefault(_createHistory); + + function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; + } + } + newObj.default = obj; + return newObj; + } + } + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + /** + * Creates and returns a history object that uses HTML5's history API + * (pushState, replaceState, and the popstate event) to manage history. + * This is the recommended method of managing history in browsers because + * it provides the cleanest URLs. + * + * Note: In browsers that do not support the HTML5 history API full + * page reloads will be used to preserve clean URLs. You can force this + * behavior using { forceRefresh: true } in options. + */ + var createBrowserHistory = function createBrowserHistory() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + + !_ExecutionEnvironment.canUseDOM + ? true + ? (0, _invariant2.default)(false, 'Browser history needs a DOM') + : (0, _invariant2.default)(false) + : void 0; + + var useRefresh = options.forceRefresh || !(0, _DOMUtils.supportsHistory)(); + var Protocol = useRefresh ? RefreshProtocol : BrowserProtocol; + + var getUserConfirmation = Protocol.getUserConfirmation, + getCurrentLocation = Protocol.getCurrentLocation, + pushLocation = Protocol.pushLocation, + replaceLocation = Protocol.replaceLocation, + go = Protocol.go; + + var history = (0, _createHistory2.default)( + _extends( + { + getUserConfirmation: getUserConfirmation, + }, + options, + { + getCurrentLocation: getCurrentLocation, + pushLocation: pushLocation, + replaceLocation: replaceLocation, + go: go, + }, + ), + ); + + var listenerCount = 0, + stopListener = void 0; + + var startListener = function startListener(listener, before) { + if (++listenerCount === 1) stopListener = BrowserProtocol.startListener(history.transitionTo); + + var unlisten = before ? history.listenBefore(listener) : history.listen(listener); + + return function () { + unlisten(); + + if (--listenerCount === 0) stopListener(); + }; + }; + + var listenBefore = function listenBefore(listener) { + return startListener(listener, true); + }; + + var listen = function listen(listener) { + return startListener(listener, false); + }; + + return _extends({}, history, { + listenBefore: listenBefore, + listen: listen, + }); + }; + + exports.default = createBrowserHistory; + + /***/ + }, + /* 727 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + var _warning = __webpack_require__(71); + + var _warning2 = _interopRequireDefault(_warning); + + var _invariant = __webpack_require__(23); + + var _invariant2 = _interopRequireDefault(_invariant); + + var _ExecutionEnvironment = __webpack_require__(196); + + var _DOMUtils = __webpack_require__(147); + + var _HashProtocol = __webpack_require__(724); + + var HashProtocol = _interopRequireWildcard(_HashProtocol); + + var _createHistory = __webpack_require__(197); + + var _createHistory2 = _interopRequireDefault(_createHistory); + + function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; + } + } + newObj.default = obj; + return newObj; + } + } + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + var DefaultQueryKey = '_k'; + + var addLeadingSlash = function addLeadingSlash(path) { + return path.charAt(0) === '/' ? path : '/' + path; + }; + + var HashPathCoders = { + hashbang: { + encodePath: function encodePath(path) { + return path.charAt(0) === '!' ? path : '!' + path; + }, + decodePath: function decodePath(path) { + return path.charAt(0) === '!' ? path.substring(1) : path; + }, + }, + noslash: { + encodePath: function encodePath(path) { + return path.charAt(0) === '/' ? path.substring(1) : path; + }, + decodePath: addLeadingSlash, + }, + slash: { + encodePath: addLeadingSlash, + decodePath: addLeadingSlash, + }, + }; + + var createHashHistory = function createHashHistory() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + + !_ExecutionEnvironment.canUseDOM + ? true + ? (0, _invariant2.default)(false, 'Hash history needs a DOM') + : (0, _invariant2.default)(false) + : void 0; + + var queryKey = options.queryKey, + hashType = options.hashType; + + true + ? (0, _warning2.default)( + queryKey !== false, + "Using { queryKey: false } no longer works. Instead, just don't " + + "use location state if you don't want a key in your URL query string", + ) + : void 0; + + if (typeof queryKey !== 'string') queryKey = DefaultQueryKey; + + if (hashType == null) hashType = 'slash'; + + if (!(hashType in HashPathCoders)) { + true ? (0, _warning2.default)(false, 'Invalid hash type: %s', hashType) : void 0; + + hashType = 'slash'; + } + + var pathCoder = HashPathCoders[hashType]; + + var getUserConfirmation = HashProtocol.getUserConfirmation; + + var getCurrentLocation = function getCurrentLocation() { + return HashProtocol.getCurrentLocation(pathCoder, queryKey); + }; + + var pushLocation = function pushLocation(location) { + return HashProtocol.pushLocation(location, pathCoder, queryKey); + }; + + var replaceLocation = function replaceLocation(location) { + return HashProtocol.replaceLocation(location, pathCoder, queryKey); + }; + + var history = (0, _createHistory2.default)( + _extends( + { + getUserConfirmation: getUserConfirmation, + }, + options, + { + getCurrentLocation: getCurrentLocation, + pushLocation: pushLocation, + replaceLocation: replaceLocation, + go: HashProtocol.go, + }, + ), + ); + + var listenerCount = 0, + stopListener = void 0; + + var startListener = function startListener(listener, before) { + if (++listenerCount === 1) + stopListener = HashProtocol.startListener(history.transitionTo, pathCoder, queryKey); + + var unlisten = before ? history.listenBefore(listener) : history.listen(listener); + + return function () { + unlisten(); + + if (--listenerCount === 0) stopListener(); + }; + }; + + var listenBefore = function listenBefore(listener) { + return startListener(listener, true); + }; + + var listen = function listen(listener) { + return startListener(listener, false); + }; + + var goIsSupportedWithoutReload = (0, _DOMUtils.supportsGoWithoutReloadUsingHash)(); + + var go = function go(n) { + true + ? (0, _warning2.default)( + goIsSupportedWithoutReload, + 'Hash history go(n) causes a full page reload in this browser', + ) + : void 0; + + history.go(n); + }; + + var createHref = function createHref(path) { + return '#' + pathCoder.encodePath(history.createHref(path)); + }; + + return _extends({}, history, { + listenBefore: listenBefore, + listen: listen, + go: go, + createHref: createHref, + }); + }; + + exports.default = createHashHistory; + + /***/ + }, + /* 728 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + var _warning = __webpack_require__(71); + + var _warning2 = _interopRequireDefault(_warning); + + var _invariant = __webpack_require__(23); + + var _invariant2 = _interopRequireDefault(_invariant); + + var _LocationUtils = __webpack_require__(99); + + var _PathUtils = __webpack_require__(67); + + var _createHistory = __webpack_require__(197); + + var _createHistory2 = _interopRequireDefault(_createHistory); + + var _Actions = __webpack_require__(146); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + var createStateStorage = function createStateStorage(entries) { + return entries + .filter(function (entry) { + return entry.state; + }) + .reduce(function (memo, entry) { + memo[entry.key] = entry.state; + return memo; + }, {}); + }; + + var createMemoryHistory = function createMemoryHistory() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + + if (Array.isArray(options)) { + options = { entries: options }; + } else if (typeof options === 'string') { + options = { entries: [options] }; + } + + var getCurrentLocation = function getCurrentLocation() { + var entry = entries[current]; + var path = (0, _PathUtils.createPath)(entry); + + var key = void 0, + state = void 0; + if (entry.key) { + key = entry.key; + state = readState(key); + } + + var init = (0, _PathUtils.parsePath)(path); + + return (0, _LocationUtils.createLocation)(_extends({}, init, { state: state }), undefined, key); + }; + + var canGo = function canGo(n) { + var index = current + n; + return index >= 0 && index < entries.length; + }; + + var go = function go(n) { + if (!n) return; + + if (!canGo(n)) { + true ? (0, _warning2.default)(false, 'Cannot go(%s) there is not enough history', n) : void 0; + + return; + } + + current += n; + var currentLocation = getCurrentLocation(); + + // Change action to POP + history.transitionTo(_extends({}, currentLocation, { action: _Actions.POP })); + }; + + var pushLocation = function pushLocation(location) { + current += 1; + + if (current < entries.length) entries.splice(current); + + entries.push(location); + + saveState(location.key, location.state); + }; + + var replaceLocation = function replaceLocation(location) { + entries[current] = location; + saveState(location.key, location.state); + }; + + var history = (0, _createHistory2.default)( + _extends({}, options, { + getCurrentLocation: getCurrentLocation, + pushLocation: pushLocation, + replaceLocation: replaceLocation, + go: go, + }), + ); + + var _options = options, + entries = _options.entries, + current = _options.current; + + if (typeof entries === 'string') { + entries = [entries]; + } else if (!Array.isArray(entries)) { + entries = ['/']; + } + + entries = entries.map(function (entry) { + return (0, _LocationUtils.createLocation)(entry); + }); + + if (current == null) { + current = entries.length - 1; + } else { + !(current >= 0 && current < entries.length) + ? true + ? (0, _invariant2.default)( + false, + 'Current index must be >= 0 and < %s, was %s', + entries.length, + current, + ) + : (0, _invariant2.default)(false) + : void 0; + } + + var storage = createStateStorage(entries); + + var saveState = function saveState(key, state) { + return (storage[key] = state); + }; + + var readState = function readState(key) { + return storage[key]; + }; + + return _extends({}, history, { + canGo: canGo, + }); + }; + + exports.default = createMemoryHistory; + + /***/ + }, + /* 729 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Symbol_js__ = __webpack_require__(308); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getRawTag_js__ = __webpack_require__(732); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__objectToString_js__ = __webpack_require__(733); + + /** `Object#toString` result references. */ + var nullTag = '[object Null]', + undefinedTag = '[object Undefined]'; + + /** Built-in value references. */ + var symToStringTag = __WEBPACK_IMPORTED_MODULE_0__Symbol_js__['a' /* default */] + ? __WEBPACK_IMPORTED_MODULE_0__Symbol_js__['a' /* default */].toStringTag + : undefined; + + /** + * The base implementation of `getTag` without fallbacks for buggy environments. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ + function baseGetTag(value) { + if (value == null) { + return value === undefined ? undefinedTag : nullTag; + } + return symToStringTag && symToStringTag in Object(value) + ? __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__getRawTag_js__['a' /* default */])(value) + : __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__objectToString_js__['a' /* default */])(value); + } + + /* harmony default export */ __webpack_exports__['a'] = baseGetTag; + + /***/ + }, + /* 730 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (global) { + /** Detect free variable `global` from Node.js. */ + var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + + /* harmony default export */ __webpack_exports__['a'] = freeGlobal; + + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(108)); + + /***/ + }, + /* 731 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__overArg_js__ = __webpack_require__(734); + + /** Built-in value references. */ + var getPrototype = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__overArg_js__['a' /* default */])( + Object.getPrototypeOf, + Object, + ); + + /* harmony default export */ __webpack_exports__['a'] = getPrototype; + + /***/ + }, + /* 732 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Symbol_js__ = __webpack_require__(308); + + /** Used for built-in method references. */ + var objectProto = Object.prototype; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ + var nativeObjectToString = objectProto.toString; + + /** Built-in value references. */ + var symToStringTag = __WEBPACK_IMPORTED_MODULE_0__Symbol_js__['a' /* default */] + ? __WEBPACK_IMPORTED_MODULE_0__Symbol_js__['a' /* default */].toStringTag + : undefined; + + /** + * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the raw `toStringTag`. + */ + function getRawTag(value) { + var isOwn = hasOwnProperty.call(value, symToStringTag), + tag = value[symToStringTag]; + + try { + value[symToStringTag] = undefined; + var unmasked = true; + } catch (e) {} + + var result = nativeObjectToString.call(value); + if (unmasked) { + if (isOwn) { + value[symToStringTag] = tag; + } else { + delete value[symToStringTag]; + } + } + return result; + } + + /* harmony default export */ __webpack_exports__['a'] = getRawTag; + + /***/ + }, + /* 733 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /** Used for built-in method references. */ + var objectProto = Object.prototype; + + /** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ + var nativeObjectToString = objectProto.toString; + + /** + * Converts `value` to a string using `Object.prototype.toString`. + * + * @private + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + */ + function objectToString(value) { + return nativeObjectToString.call(value); + } + + /* harmony default export */ __webpack_exports__['a'] = objectToString; + + /***/ + }, + /* 734 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ + function overArg(func, transform) { + return function (arg) { + return func(transform(arg)); + }; + } + + /* harmony default export */ __webpack_exports__['a'] = overArg; + + /***/ + }, + /* 735 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__freeGlobal_js__ = __webpack_require__(730); + + /** Detect free variable `self`. */ + var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + + /** Used as a reference to the global object. */ + var root = + __WEBPACK_IMPORTED_MODULE_0__freeGlobal_js__['a' /* default */] || + freeSelf || + Function('return this')(); + + /* harmony default export */ __webpack_exports__['a'] = root; + + /***/ + }, + /* 736 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ + function isObjectLike(value) { + return value != null && typeof value == 'object'; + } + + /* harmony default export */ __webpack_exports__['a'] = isObjectLike; + + /***/ + }, + /* 737 */ + /***/ function (module, exports) { + /** + * lodash 3.9.1 (Custom Build) <https://lodash.com/> + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/> + * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license <https://lodash.com/license> + */ + + /** `Object#toString` result references. */ + var funcTag = '[object Function]'; + + /** Used to detect host constructors (Safari > 5). */ + var reIsHostCtor = /^\[object .+?Constructor\]$/; + + /** + * Checks if `value` is object-like. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + */ + function isObjectLike(value) { + return !!value && typeof value == 'object'; + } + + /** Used for native method references. */ + var objectProto = Object.prototype; + + /** Used to resolve the decompiled source of functions. */ + var fnToString = Function.prototype.toString; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** + * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ + var objToString = objectProto.toString; + + /** Used to detect if a method is native. */ + var reIsNative = RegExp( + '^' + + fnToString + .call(hasOwnProperty) + .replace(/[\\^$.*+?()[\]{}|]/g, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + + '$', + ); + + /** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ + function getNative(object, key) { + var value = object == null ? undefined : object[key]; + return isNative(value) ? value : undefined; + } + + /** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ + function isFunction(value) { + // The use of `Object#toString` avoids issues with the `typeof` operator + // in older versions of Chrome and Safari which return 'function' for regexes + // and Safari 8 equivalents which return 'object' for typed array constructors. + return isObject(value) && objToString.call(value) == funcTag; + } + + /** + * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. + * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(1); + * // => false + */ + function isObject(value) { + // Avoid a V8 JIT bug in Chrome 19-20. + // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); + } + + /** + * Checks if `value` is a native function. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, else `false`. + * @example + * + * _.isNative(Array.prototype.push); + * // => true + * + * _.isNative(_); + * // => false + */ + function isNative(value) { + if (value == null) { + return false; + } + if (isFunction(value)) { + return reIsNative.test(fnToString.call(value)); + } + return isObjectLike(value) && reIsHostCtor.test(value); + } + + module.exports = getNative; + + /***/ + }, + /* 738 */ + /***/ function (module, exports) { + /** + * lodash (Custom Build) <https://lodash.com/> + * Build: `lodash modularize exports="npm" -o ./` + * Copyright jQuery Foundation and other contributors <https://jquery.org/> + * Released under MIT license <https://lodash.com/license> + * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ + + /** Used as references for various `Number` constants. */ + var MAX_SAFE_INTEGER = 9007199254740991; + + /** `Object#toString` result references. */ + var argsTag = '[object Arguments]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]'; + + /** Used for built-in method references. */ + var objectProto = Object.prototype; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ + var objectToString = objectProto.toString; + + /** Built-in value references. */ + var propertyIsEnumerable = objectProto.propertyIsEnumerable; + + /** + * Checks if `value` is likely an `arguments` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + * else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ + function isArguments(value) { + // Safari 8.1 makes `arguments.callee` enumerable in strict mode. + return ( + isArrayLikeObject(value) && + hasOwnProperty.call(value, 'callee') && + (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag) + ); + } + + /** + * Checks if `value` is array-like. A value is considered array-like if it's + * not a function and has a `value.length` that's an integer greater than or + * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + * @example + * + * _.isArrayLike([1, 2, 3]); + * // => true + * + * _.isArrayLike(document.body.children); + * // => true + * + * _.isArrayLike('abc'); + * // => true + * + * _.isArrayLike(_.noop); + * // => false + */ + function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); + } + + /** + * This method is like `_.isArrayLike` except that it also checks if `value` + * is an object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array-like object, + * else `false`. + * @example + * + * _.isArrayLikeObject([1, 2, 3]); + * // => true + * + * _.isArrayLikeObject(document.body.children); + * // => true + * + * _.isArrayLikeObject('abc'); + * // => false + * + * _.isArrayLikeObject(_.noop); + * // => false + */ + function isArrayLikeObject(value) { + return isObjectLike(value) && isArrayLike(value); + } + + /** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ + function isFunction(value) { + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 8-9 which returns 'object' for typed array and other constructors. + var tag = isObject(value) ? objectToString.call(value) : ''; + return tag == funcTag || tag == genTag; + } + + /** + * Checks if `value` is a valid array-like length. + * + * **Note:** This method is loosely based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @example + * + * _.isLength(3); + * // => true + * + * _.isLength(Number.MIN_VALUE); + * // => false + * + * _.isLength(Infinity); + * // => false + * + * _.isLength('3'); + * // => false + */ + function isLength(value) { + return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + + /** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ + function isObject(value) { + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); + } + + /** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ + function isObjectLike(value) { + return !!value && typeof value == 'object'; + } + + module.exports = isArguments; + + /***/ + }, + /* 739 */ + /***/ function (module, exports) { + /** + * lodash 3.0.4 (Custom Build) <https://lodash.com/> + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/> + * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license <https://lodash.com/license> + */ + + /** `Object#toString` result references. */ + var arrayTag = '[object Array]', + funcTag = '[object Function]'; + + /** Used to detect host constructors (Safari > 5). */ + var reIsHostCtor = /^\[object .+?Constructor\]$/; + + /** + * Checks if `value` is object-like. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + */ + function isObjectLike(value) { + return !!value && typeof value == 'object'; + } + + /** Used for native method references. */ + var objectProto = Object.prototype; + + /** Used to resolve the decompiled source of functions. */ + var fnToString = Function.prototype.toString; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** + * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ + var objToString = objectProto.toString; + + /** Used to detect if a method is native. */ + var reIsNative = RegExp( + '^' + + fnToString + .call(hasOwnProperty) + .replace(/[\\^$.*+?()[\]{}|]/g, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + + '$', + ); + + /* Native method references for those with the same name as other `lodash` methods. */ + var nativeIsArray = getNative(Array, 'isArray'); + + /** + * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer) + * of an array-like value. + */ + var MAX_SAFE_INTEGER = 9007199254740991; + + /** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ + function getNative(object, key) { + var value = object == null ? undefined : object[key]; + return isNative(value) ? value : undefined; + } + + /** + * Checks if `value` is a valid array-like length. + * + * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + */ + function isLength(value) { + return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + + /** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(function() { return arguments; }()); + * // => false + */ + var isArray = + nativeIsArray || + function (value) { + return isObjectLike(value) && isLength(value.length) && objToString.call(value) == arrayTag; + }; + + /** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ + function isFunction(value) { + // The use of `Object#toString` avoids issues with the `typeof` operator + // in older versions of Chrome and Safari which return 'function' for regexes + // and Safari 8 equivalents which return 'object' for typed array constructors. + return isObject(value) && objToString.call(value) == funcTag; + } + + /** + * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. + * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(1); + * // => false + */ + function isObject(value) { + // Avoid a V8 JIT bug in Chrome 19-20. + // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); + } + + /** + * Checks if `value` is a native function. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, else `false`. + * @example + * + * _.isNative(Array.prototype.push); + * // => true + * + * _.isNative(_); + * // => false + */ + function isNative(value) { + if (value == null) { + return false; + } + if (isFunction(value)) { + return reIsNative.test(fnToString.call(value)); + } + return isObjectLike(value) && reIsHostCtor.test(value); + } + + module.exports = isArray; + + /***/ + }, + /* 740 */ + /***/ function (module, exports, __webpack_require__) { + /** + * lodash 3.1.2 (Custom Build) <https://lodash.com/> + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/> + * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license <https://lodash.com/license> + */ + var getNative = __webpack_require__(737), + isArguments = __webpack_require__(738), + isArray = __webpack_require__(739); + + /** Used to detect unsigned integer values. */ + var reIsUint = /^\d+$/; + + /** Used for native method references. */ + var objectProto = Object.prototype; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /* Native method references for those with the same name as other `lodash` methods. */ + var nativeKeys = getNative(Object, 'keys'); + + /** + * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer) + * of an array-like value. + */ + var MAX_SAFE_INTEGER = 9007199254740991; + + /** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new function. + */ + function baseProperty(key) { + return function (object) { + return object == null ? undefined : object[key]; + }; + } + + /** + * Gets the "length" property value of `object`. + * + * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) + * that affects Safari on at least iOS 8.1-8.3 ARM64. + * + * @private + * @param {Object} object The object to query. + * @returns {*} Returns the "length" value. + */ + var getLength = baseProperty('length'); + + /** + * Checks if `value` is array-like. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + */ + function isArrayLike(value) { + return value != null && isLength(getLength(value)); + } + + /** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ + function isIndex(value, length) { + value = typeof value == 'number' || reIsUint.test(value) ? +value : -1; + length = length == null ? MAX_SAFE_INTEGER : length; + return value > -1 && value % 1 == 0 && value < length; + } + + /** + * Checks if `value` is a valid array-like length. + * + * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + */ + function isLength(value) { + return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + + /** + * A fallback implementation of `Object.keys` which creates an array of the + * own enumerable property names of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + function shimKeys(object) { + var props = keysIn(object), + propsLength = props.length, + length = propsLength && object.length; + + var allowIndexes = !!length && isLength(length) && (isArray(object) || isArguments(object)); + + var index = -1, + result = []; + + while (++index < propsLength) { + var key = props[index]; + if ((allowIndexes && isIndex(key, length)) || hasOwnProperty.call(object, key)) { + result.push(key); + } + } + return result; + } + + /** + * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. + * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(1); + * // => false + */ + function isObject(value) { + // Avoid a V8 JIT bug in Chrome 19-20. + // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); + } + + /** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys) + * for more details. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ + var keys = !nativeKeys + ? shimKeys + : function (object) { + var Ctor = object == null ? undefined : object.constructor; + if ( + (typeof Ctor == 'function' && Ctor.prototype === object) || + (typeof object != 'function' && isArrayLike(object)) + ) { + return shimKeys(object); + } + return isObject(object) ? nativeKeys(object) : []; + }; + + /** + * Creates an array of the own and inherited enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keysIn(new Foo); + * // => ['a', 'b', 'c'] (iteration order is not guaranteed) + */ + function keysIn(object) { + if (object == null) { + return []; + } + if (!isObject(object)) { + object = Object(object); + } + var length = object.length; + length = (length && isLength(length) && (isArray(object) || isArguments(object)) && length) || 0; + + var Ctor = object.constructor, + index = -1, + isProto = typeof Ctor == 'function' && Ctor.prototype === object, + result = Array(length), + skipIndexes = length > 0; + + while (++index < length) { + result[index] = index + ''; + } + for (var key in object) { + if ( + !(skipIndexes && isIndex(key, length)) && + !(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key))) + ) { + result.push(key); + } + } + return result; + } + + module.exports = keys; + + /***/ + }, + /* 741 */ + /***/ function (module, exports, __webpack_require__) { + var map = { + './en-gb': 309, + './en-gb.js': 309, + './ru': 310, + './ru.js': 310, + }; + function webpackContext(req) { + return __webpack_require__(webpackContextResolve(req)); + } + function webpackContextResolve(req) { + var id = map[req]; + if (!(id + 1)) + // check for number or string + throw new Error("Cannot find module '" + req + "'."); + return id; + } + webpackContext.keys = function webpackContextKeys() { + return Object.keys(map); + }; + webpackContext.resolve = webpackContextResolve; + module.exports = webpackContext; + webpackContext.id = 741; + + /***/ + }, + /* 742 */ + /***/ function (module, exports, __webpack_require__) { + var __WEBPACK_AMD_DEFINE_FACTORY__, + __WEBPACK_AMD_DEFINE_RESULT__; /*! PhotoSwipe Default UI - 4.1.1 - 2015-12-24 + * http://photoswipe.com + * Copyright (c) 2015 Dmitry Semenov; */ + /** + * + * UI on top of main sliding area (caption, arrows, close button, etc.). + * Built just using public methods/properties of PhotoSwipe. + * + */ + (function (root, factory) { + if (true) { + !((__WEBPACK_AMD_DEFINE_FACTORY__ = factory), + (__WEBPACK_AMD_DEFINE_RESULT__ = + typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' + ? __WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module) + : __WEBPACK_AMD_DEFINE_FACTORY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else if (typeof exports === 'object') { + module.exports = factory(); + } else { + root.PhotoSwipeUI_Default = factory(); + } + })(this, function () { + 'use strict'; + + var PhotoSwipeUI_Default = function (pswp, framework) { + var ui = this; + var _overlayUIUpdated = false, + _controlsVisible = true, + _fullscrenAPI, + _controls, + _captionContainer, + _fakeCaptionContainer, + _indexIndicator, + _shareButton, + _shareModal, + _shareModalHidden = true, + _initalCloseOnScrollValue, + _isIdle, + _listen, + _loadingIndicator, + _loadingIndicatorHidden, + _loadingIndicatorTimeout, + _galleryHasOneSlide, + _options, + _defaultUIOptions = { + barsSize: { top: 44, bottom: 'auto' }, + closeElClasses: ['item', 'caption', 'zoom-wrap', 'ui', 'top-bar'], + timeToIdle: 4000, + timeToIdleOutside: 1000, + loadingIndicatorDelay: 1000, // 2s + + addCaptionHTMLFn: function (item, captionEl /*, isFake */) { + if (!item.title) { + captionEl.children[0].innerHTML = ''; + return false; + } + captionEl.children[0].innerHTML = item.title; + return true; + }, + + closeEl: true, + captionEl: true, + fullscreenEl: true, + zoomEl: true, + shareEl: true, + counterEl: true, + arrowEl: true, + preloaderEl: true, + + tapToClose: false, + tapToToggleControls: true, + + clickToCloseNonZoomable: true, + + shareButtons: [ + { + id: 'facebook', + label: 'Share on Facebook', + url: 'https://www.facebook.com/sharer/sharer.php?u={{url}}', + }, + { + id: 'twitter', + label: 'Tweet', + url: 'https://twitter.com/intent/tweet?text={{text}}&url={{url}}', + }, + { + id: 'pinterest', + label: 'Pin it', + url: + 'http://www.pinterest.com/pin/create/button/' + + '?url={{url}}&media={{image_url}}&description={{text}}', + }, + { id: 'download', label: 'Download image', url: '{{raw_image_url}}', download: true }, + ], + getImageURLForShare: function (/* shareButtonData */) { + return pswp.currItem.src || ''; + }, + getPageURLForShare: function (/* shareButtonData */) { + return window.location.href; + }, + getTextForShare: function (/* shareButtonData */) { + return pswp.currItem.title || ''; + }, + + indexIndicatorSep: ' / ', + fitControlsWidth: 1200, + }, + _blockControlsTap, + _blockControlsTapTimeout; + + var _onControlsTap = function (e) { + if (_blockControlsTap) { + return true; + } + + e = e || window.event; + + if (_options.timeToIdle && _options.mouseUsed && !_isIdle) { + // reset idle timer + _onIdleMouseMove(); + } + + var target = e.target || e.srcElement, + uiElement, + clickedClass = target.getAttribute('class') || '', + found; + + for (var i = 0; i < _uiElements.length; i++) { + uiElement = _uiElements[i]; + if (uiElement.onTap && clickedClass.indexOf('pswp__' + uiElement.name) > -1) { + uiElement.onTap(); + found = true; + } + } + + if (found) { + if (e.stopPropagation) { + e.stopPropagation(); + } + _blockControlsTap = true; + + // Some versions of Android don't prevent ghost click event + // when preventDefault() was called on touchstart and/or touchend. + // + // This happens on v4.3, 4.2, 4.1, + // older versions strangely work correctly, + // but just in case we add delay on all of them) + var tapDelay = framework.features.isOldAndroid ? 600 : 30; + _blockControlsTapTimeout = setTimeout(function () { + _blockControlsTap = false; + }, tapDelay); + } + }, + _fitControlsInViewport = function () { + return ( + !pswp.likelyTouchDevice || _options.mouseUsed || screen.width > _options.fitControlsWidth + ); + }, + _togglePswpClass = function (el, cName, add) { + framework[(add ? 'add' : 'remove') + 'Class'](el, 'pswp__' + cName); + }, + // add class when there is just one item in the gallery + // (by default it hides left/right arrows and 1ofX counter) + _countNumItems = function () { + var hasOneSlide = _options.getNumItemsFn() === 1; + + if (hasOneSlide !== _galleryHasOneSlide) { + _togglePswpClass(_controls, 'ui--one-slide', hasOneSlide); + _galleryHasOneSlide = hasOneSlide; + } + }, + _toggleShareModalClass = function () { + _togglePswpClass(_shareModal, 'share-modal--hidden', _shareModalHidden); + }, + _toggleShareModal = function () { + _shareModalHidden = !_shareModalHidden; + + if (!_shareModalHidden) { + _toggleShareModalClass(); + setTimeout(function () { + if (!_shareModalHidden) { + framework.addClass(_shareModal, 'pswp__share-modal--fade-in'); + } + }, 30); + } else { + framework.removeClass(_shareModal, 'pswp__share-modal--fade-in'); + setTimeout(function () { + if (_shareModalHidden) { + _toggleShareModalClass(); + } + }, 300); + } + + if (!_shareModalHidden) { + _updateShareURLs(); + } + return false; + }, + _openWindowPopup = function (e) { + e = e || window.event; + var target = e.target || e.srcElement; + + pswp.shout('shareLinkClick', e, target); + + if (!target.href) { + return false; + } + + if (target.hasAttribute('download')) { + return true; + } + + window.open( + target.href, + 'pswp_share', + 'scrollbars=yes,resizable=yes,toolbar=no,' + + 'location=yes,width=550,height=420,top=100,left=' + + (window.screen ? Math.round(screen.width / 2 - 275) : 100), + ); + + if (!_shareModalHidden) { + _toggleShareModal(); + } + + return false; + }, + _updateShareURLs = function () { + var shareButtonOut = '', + shareButtonData, + shareURL, + image_url, + page_url, + share_text; + + for (var i = 0; i < _options.shareButtons.length; i++) { + shareButtonData = _options.shareButtons[i]; + + image_url = _options.getImageURLForShare(shareButtonData); + page_url = _options.getPageURLForShare(shareButtonData); + share_text = _options.getTextForShare(shareButtonData); + + shareURL = shareButtonData.url + .replace('{{url}}', encodeURIComponent(page_url)) + .replace('{{image_url}}', encodeURIComponent(image_url)) + .replace('{{raw_image_url}}', image_url) + .replace('{{text}}', encodeURIComponent(share_text)); + + shareButtonOut += + '<a href="' + + shareURL + + '" target="_blank" ' + + 'class="pswp__share--' + + shareButtonData.id + + '"' + + (shareButtonData.download ? 'download' : '') + + '>' + + shareButtonData.label + + '</a>'; + + if (_options.parseShareButtonOut) { + shareButtonOut = _options.parseShareButtonOut(shareButtonData, shareButtonOut); + } + } + _shareModal.children[0].innerHTML = shareButtonOut; + _shareModal.children[0].onclick = _openWindowPopup; + }, + _hasCloseClass = function (target) { + for (var i = 0; i < _options.closeElClasses.length; i++) { + if (framework.hasClass(target, 'pswp__' + _options.closeElClasses[i])) { + return true; + } + } + }, + _idleInterval, + _idleTimer, + _idleIncrement = 0, + _onIdleMouseMove = function () { + clearTimeout(_idleTimer); + _idleIncrement = 0; + if (_isIdle) { + ui.setIdle(false); + } + }, + _onMouseLeaveWindow = function (e) { + e = e ? e : window.event; + var from = e.relatedTarget || e.toElement; + if (!from || from.nodeName === 'HTML') { + clearTimeout(_idleTimer); + _idleTimer = setTimeout(function () { + ui.setIdle(true); + }, _options.timeToIdleOutside); + } + }, + _setupFullscreenAPI = function () { + if (_options.fullscreenEl && !framework.features.isOldAndroid) { + if (!_fullscrenAPI) { + _fullscrenAPI = ui.getFullscreenAPI(); + } + if (_fullscrenAPI) { + framework.bind(document, _fullscrenAPI.eventK, ui.updateFullscreen); + ui.updateFullscreen(); + framework.addClass(pswp.template, 'pswp--supports-fs'); + } else { + framework.removeClass(pswp.template, 'pswp--supports-fs'); + } + } + }, + _setupLoadingIndicator = function () { + // Setup loading indicator + if (_options.preloaderEl) { + _toggleLoadingIndicator(true); + + _listen('beforeChange', function () { + clearTimeout(_loadingIndicatorTimeout); + + // display loading indicator with delay + _loadingIndicatorTimeout = setTimeout(function () { + if (pswp.currItem && pswp.currItem.loading) { + if ( + !pswp.allowProgressiveImg() || + (pswp.currItem.img && !pswp.currItem.img.naturalWidth) + ) { + // show preloader if progressive loading is not enabled, + // or image width is not defined yet (because of slow connection) + _toggleLoadingIndicator(false); + // items-controller.js function allowProgressiveImg + } + } else { + _toggleLoadingIndicator(true); // hide preloader + } + }, _options.loadingIndicatorDelay); + }); + _listen('imageLoadComplete', function (index, item) { + if (pswp.currItem === item) { + _toggleLoadingIndicator(true); + } + }); + } + }, + _toggleLoadingIndicator = function (hide) { + if (_loadingIndicatorHidden !== hide) { + _togglePswpClass(_loadingIndicator, 'preloader--active', !hide); + _loadingIndicatorHidden = hide; + } + }, + _applyNavBarGaps = function (item) { + var gap = item.vGap; + + if (_fitControlsInViewport()) { + var bars = _options.barsSize; + if (_options.captionEl && bars.bottom === 'auto') { + if (!_fakeCaptionContainer) { + _fakeCaptionContainer = framework.createEl('pswp__caption pswp__caption--fake'); + _fakeCaptionContainer.appendChild(framework.createEl('pswp__caption__center')); + _controls.insertBefore(_fakeCaptionContainer, _captionContainer); + framework.addClass(_controls, 'pswp__ui--fit'); + } + if (_options.addCaptionHTMLFn(item, _fakeCaptionContainer, true)) { + var captionSize = _fakeCaptionContainer.clientHeight; + gap.bottom = parseInt(captionSize, 10) || 44; + } else { + gap.bottom = bars.top; // if no caption, set size of bottom gap to size of top + } + } else { + gap.bottom = bars.bottom === 'auto' ? 0 : bars.bottom; + } + + // height of top bar is static, no need to calculate it + gap.top = bars.top; + } else { + gap.top = gap.bottom = 0; + } + }, + _setupIdle = function () { + // Hide controls when mouse is used + if (_options.timeToIdle) { + _listen('mouseUsed', function () { + framework.bind(document, 'mousemove', _onIdleMouseMove); + framework.bind(document, 'mouseout', _onMouseLeaveWindow); + + _idleInterval = setInterval(function () { + _idleIncrement++; + if (_idleIncrement === 2) { + ui.setIdle(true); + } + }, _options.timeToIdle / 2); + }); + } + }, + _setupHidingControlsDuringGestures = function () { + // Hide controls on vertical drag + _listen('onVerticalDrag', function (now) { + if (_controlsVisible && now < 0.95) { + ui.hideControls(); + } else if (!_controlsVisible && now >= 0.95) { + ui.showControls(); + } + }); + + // Hide controls when pinching to close + var pinchControlsHidden; + _listen('onPinchClose', function (now) { + if (_controlsVisible && now < 0.9) { + ui.hideControls(); + pinchControlsHidden = true; + } else if (pinchControlsHidden && !_controlsVisible && now > 0.9) { + ui.showControls(); + } + }); + + _listen('zoomGestureEnded', function () { + pinchControlsHidden = false; + if (pinchControlsHidden && !_controlsVisible) { + ui.showControls(); + } + }); + }; + + var _uiElements = [ + { + name: 'caption', + option: 'captionEl', + onInit: function (el) { + _captionContainer = el; + }, + }, + { + name: 'share-modal', + option: 'shareEl', + onInit: function (el) { + _shareModal = el; + }, + onTap: function () { + _toggleShareModal(); + }, + }, + { + name: 'button--share', + option: 'shareEl', + onInit: function (el) { + _shareButton = el; + }, + onTap: function () { + _toggleShareModal(); + }, + }, + { + name: 'button--zoom', + option: 'zoomEl', + onTap: pswp.toggleDesktopZoom, + }, + { + name: 'counter', + option: 'counterEl', + onInit: function (el) { + _indexIndicator = el; + }, + }, + { + name: 'button--close', + option: 'closeEl', + onTap: pswp.close, + }, + { + name: 'button--arrow--left', + option: 'arrowEl', + onTap: pswp.prev, + }, + { + name: 'button--arrow--right', + option: 'arrowEl', + onTap: pswp.next, + }, + { + name: 'button--fs', + option: 'fullscreenEl', + onTap: function () { + if (_fullscrenAPI.isFullscreen()) { + _fullscrenAPI.exit(); + } else { + _fullscrenAPI.enter(); + } + }, + }, + { + name: 'preloader', + option: 'preloaderEl', + onInit: function (el) { + _loadingIndicator = el; + }, + }, + ]; + + var _setupUIElements = function () { + var item, classAttr, uiElement; + + var loopThroughChildElements = function (sChildren) { + if (!sChildren) { + return; + } + + var l = sChildren.length; + for (var i = 0; i < l; i++) { + item = sChildren[i]; + classAttr = item.className; + + for (var a = 0; a < _uiElements.length; a++) { + uiElement = _uiElements[a]; + + if (classAttr.indexOf('pswp__' + uiElement.name) > -1) { + if (_options[uiElement.option]) { + // if element is not disabled from options + + framework.removeClass(item, 'pswp__element--disabled'); + if (uiElement.onInit) { + uiElement.onInit(item); + } + + //item.style.display = 'block'; + } else { + framework.addClass(item, 'pswp__element--disabled'); + //item.style.display = 'none'; + } + } + } + } + }; + loopThroughChildElements(_controls.children); + + var topBar = framework.getChildByClass(_controls, 'pswp__top-bar'); + if (topBar) { + loopThroughChildElements(topBar.children); + } + }; + + ui.init = function () { + // extend options + framework.extend(pswp.options, _defaultUIOptions, true); + + // create local link for fast access + _options = pswp.options; + + // find pswp__ui element + _controls = framework.getChildByClass(pswp.scrollWrap, 'pswp__ui'); + + // create local link + _listen = pswp.listen; + + _setupHidingControlsDuringGestures(); + + // update controls when slides change + _listen('beforeChange', ui.update); + + // toggle zoom on double-tap + _listen('doubleTap', function (point) { + var initialZoomLevel = pswp.currItem.initialZoomLevel; + if (pswp.getZoomLevel() !== initialZoomLevel) { + pswp.zoomTo(initialZoomLevel, point, 333); + } else { + pswp.zoomTo(_options.getDoubleTapZoom(false, pswp.currItem), point, 333); + } + }); + + // Allow text selection in caption + _listen('preventDragEvent', function (e, isDown, preventObj) { + var t = e.target || e.srcElement; + if ( + t && + t.getAttribute('class') && + e.type.indexOf('mouse') > -1 && + (t.getAttribute('class').indexOf('__caption') > 0 || /(SMALL|STRONG|EM)/i.test(t.tagName)) + ) { + preventObj.prevent = false; + } + }); + + // bind events for UI + _listen('bindEvents', function () { + framework.bind(_controls, 'pswpTap click', _onControlsTap); + framework.bind(pswp.scrollWrap, 'pswpTap', ui.onGlobalTap); + + if (!pswp.likelyTouchDevice) { + framework.bind(pswp.scrollWrap, 'mouseover', ui.onMouseOver); + } + }); + + // unbind events for UI + _listen('unbindEvents', function () { + if (!_shareModalHidden) { + _toggleShareModal(); + } + + if (_idleInterval) { + clearInterval(_idleInterval); + } + framework.unbind(document, 'mouseout', _onMouseLeaveWindow); + framework.unbind(document, 'mousemove', _onIdleMouseMove); + framework.unbind(_controls, 'pswpTap click', _onControlsTap); + framework.unbind(pswp.scrollWrap, 'pswpTap', ui.onGlobalTap); + framework.unbind(pswp.scrollWrap, 'mouseover', ui.onMouseOver); + + if (_fullscrenAPI) { + framework.unbind(document, _fullscrenAPI.eventK, ui.updateFullscreen); + if (_fullscrenAPI.isFullscreen()) { + _options.hideAnimationDuration = 0; + _fullscrenAPI.exit(); + } + _fullscrenAPI = null; + } + }); + + // clean up things when gallery is destroyed + _listen('destroy', function () { + if (_options.captionEl) { + if (_fakeCaptionContainer) { + _controls.removeChild(_fakeCaptionContainer); + } + framework.removeClass(_captionContainer, 'pswp__caption--empty'); + } + + if (_shareModal) { + _shareModal.children[0].onclick = null; + } + framework.removeClass(_controls, 'pswp__ui--over-close'); + framework.addClass(_controls, 'pswp__ui--hidden'); + ui.setIdle(false); + }); + + if (!_options.showAnimationDuration) { + framework.removeClass(_controls, 'pswp__ui--hidden'); + } + _listen('initialZoomIn', function () { + if (_options.showAnimationDuration) { + framework.removeClass(_controls, 'pswp__ui--hidden'); + } + }); + _listen('initialZoomOut', function () { + framework.addClass(_controls, 'pswp__ui--hidden'); + }); + + _listen('parseVerticalMargin', _applyNavBarGaps); + + _setupUIElements(); + + if (_options.shareEl && _shareButton && _shareModal) { + _shareModalHidden = true; + } + + _countNumItems(); + + _setupIdle(); + + _setupFullscreenAPI(); + + _setupLoadingIndicator(); + }; + + ui.setIdle = function (isIdle) { + _isIdle = isIdle; + _togglePswpClass(_controls, 'ui--idle', isIdle); + }; + + ui.update = function () { + // Don't update UI if it's hidden + if (_controlsVisible && pswp.currItem) { + ui.updateIndexIndicator(); + + if (_options.captionEl) { + _options.addCaptionHTMLFn(pswp.currItem, _captionContainer); + + _togglePswpClass(_captionContainer, 'caption--empty', !pswp.currItem.title); + } + + _overlayUIUpdated = true; + } else { + _overlayUIUpdated = false; + } + + if (!_shareModalHidden) { + _toggleShareModal(); + } + + _countNumItems(); + }; + + ui.updateFullscreen = function (e) { + if (e) { + // some browsers change window scroll position during the fullscreen + // so PhotoSwipe updates it just in case + setTimeout(function () { + pswp.setScrollOffset(0, framework.getScrollY()); + }, 50); + } + + // toogle pswp--fs class on root element + framework[(_fullscrenAPI.isFullscreen() ? 'add' : 'remove') + 'Class'](pswp.template, 'pswp--fs'); + }; + + ui.updateIndexIndicator = function () { + if (_options.counterEl) { + _indexIndicator.innerHTML = + pswp.getCurrentIndex() + 1 + _options.indexIndicatorSep + _options.getNumItemsFn(); + } + }; + + ui.onGlobalTap = function (e) { + e = e || window.event; + var target = e.target || e.srcElement; + + if (_blockControlsTap) { + return; + } + + if (e.detail && e.detail.pointerType === 'mouse') { + // close gallery if clicked outside of the image + if (_hasCloseClass(target)) { + pswp.close(); + return; + } + + if (framework.hasClass(target, 'pswp__img')) { + if (pswp.getZoomLevel() === 1 && pswp.getZoomLevel() <= pswp.currItem.fitRatio) { + if (_options.clickToCloseNonZoomable) { + pswp.close(); + } + } else { + pswp.toggleDesktopZoom(e.detail.releasePoint); + } + } + } else { + // tap anywhere (except buttons) to toggle visibility of controls + if (_options.tapToToggleControls) { + if (_controlsVisible) { + ui.hideControls(); + } else { + ui.showControls(); + } + } + + // tap to close gallery + if ( + _options.tapToClose && + (framework.hasClass(target, 'pswp__img') || _hasCloseClass(target)) + ) { + pswp.close(); + return; + } + } + }; + ui.onMouseOver = function (e) { + e = e || window.event; + var target = e.target || e.srcElement; + + // add class when mouse is over an element that should close the gallery + _togglePswpClass(_controls, 'ui--over-close', _hasCloseClass(target)); + }; + + ui.hideControls = function () { + framework.addClass(_controls, 'pswp__ui--hidden'); + _controlsVisible = false; + }; + + ui.showControls = function () { + _controlsVisible = true; + if (!_overlayUIUpdated) { + ui.update(); + } + framework.removeClass(_controls, 'pswp__ui--hidden'); + }; + + ui.supportsFullscreen = function () { + var d = document; + return !!( + d.exitFullscreen || + d.mozCancelFullScreen || + d.webkitExitFullscreen || + d.msExitFullscreen + ); + }; + + ui.getFullscreenAPI = function () { + var dE = document.documentElement, + api, + tF = 'fullscreenchange'; + + if (dE.requestFullscreen) { + api = { + enterK: 'requestFullscreen', + exitK: 'exitFullscreen', + elementK: 'fullscreenElement', + eventK: tF, + }; + } else if (dE.mozRequestFullScreen) { + api = { + enterK: 'mozRequestFullScreen', + exitK: 'mozCancelFullScreen', + elementK: 'mozFullScreenElement', + eventK: 'moz' + tF, + }; + } else if (dE.webkitRequestFullscreen) { + api = { + enterK: 'webkitRequestFullscreen', + exitK: 'webkitExitFullscreen', + elementK: 'webkitFullscreenElement', + eventK: 'webkit' + tF, + }; + } else if (dE.msRequestFullscreen) { + api = { + enterK: 'msRequestFullscreen', + exitK: 'msExitFullscreen', + elementK: 'msFullscreenElement', + eventK: 'MSFullscreenChange', + }; + } + + if (api) { + api.enter = function () { + // disable close-on-scroll in fullscreen + _initalCloseOnScrollValue = _options.closeOnScroll; + _options.closeOnScroll = false; + + if (this.enterK === 'webkitRequestFullscreen') { + pswp.template[this.enterK](Element.ALLOW_KEYBOARD_INPUT); + } else { + return pswp.template[this.enterK](); + } + }; + api.exit = function () { + _options.closeOnScroll = _initalCloseOnScrollValue; + + return document[this.exitK](); + }; + api.isFullscreen = function () { + return document[this.elementK]; + }; + } + + return api; + }; + }; + return PhotoSwipeUI_Default; + }); + + /***/ + }, + /* 743 */ + /***/ function (module, exports, __webpack_require__) { + var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__; /*! PhotoSwipe - v4.1.1 - 2015-12-24 + * http://photoswipe.com + * Copyright (c) 2015 Dmitry Semenov; */ + (function (root, factory) { + if (true) { + !((__WEBPACK_AMD_DEFINE_FACTORY__ = factory), + (__WEBPACK_AMD_DEFINE_RESULT__ = + typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' + ? __WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module) + : __WEBPACK_AMD_DEFINE_FACTORY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else if (typeof exports === 'object') { + module.exports = factory(); + } else { + root.PhotoSwipe = factory(); + } + })(this, function () { + 'use strict'; + var PhotoSwipe = function (template, UiClass, items, options) { + /*>>framework-bridge*/ + /** + * + * Set of generic functions used by gallery. + * + * You're free to modify anything here as long as functionality is kept. + * + */ + var framework = { + features: null, + bind: function (target, type, listener, unbind) { + var methodName = (unbind ? 'remove' : 'add') + 'EventListener'; + type = type.split(' '); + for (var i = 0; i < type.length; i++) { + if (type[i]) { + target[methodName](type[i], listener, false); + } + } + }, + isArray: function (obj) { + return obj instanceof Array; + }, + createEl: function (classes, tag) { + var el = document.createElement(tag || 'div'); + if (classes) { + el.className = classes; + } + return el; + }, + getScrollY: function () { + var yOffset = window.pageYOffset; + return yOffset !== undefined ? yOffset : document.documentElement.scrollTop; + }, + unbind: function (target, type, listener) { + framework.bind(target, type, listener, true); + }, + removeClass: function (el, className) { + var reg = new RegExp('(\\s|^)' + className + '(\\s|$)'); + el.className = el.className + .replace(reg, ' ') + .replace(/^\s\s*/, '') + .replace(/\s\s*$/, ''); + }, + addClass: function (el, className) { + if (!framework.hasClass(el, className)) { + el.className += (el.className ? ' ' : '') + className; + } + }, + hasClass: function (el, className) { + return el.className && new RegExp('(^|\\s)' + className + '(\\s|$)').test(el.className); + }, + getChildByClass: function (parentEl, childClassName) { + var node = parentEl.firstChild; + while (node) { + if (framework.hasClass(node, childClassName)) { + return node; + } + node = node.nextSibling; + } + }, + arraySearch: function (array, value, key) { + var i = array.length; + while (i--) { + if (array[i][key] === value) { + return i; + } + } + return -1; + }, + extend: function (o1, o2, preventOverwrite) { + for (var prop in o2) { + if (o2.hasOwnProperty(prop)) { + if (preventOverwrite && o1.hasOwnProperty(prop)) { + continue; + } + o1[prop] = o2[prop]; + } + } + }, + easing: { + sine: { + out: function (k) { + return Math.sin(k * (Math.PI / 2)); + }, + inOut: function (k) { + return -(Math.cos(Math.PI * k) - 1) / 2; + }, + }, + cubic: { + out: function (k) { + return --k * k * k + 1; + }, + }, + /* + elastic: { + out: function ( k ) { + + var s, a = 0.1, p = 0.4; + if ( k === 0 ) return 0; + if ( k === 1 ) return 1; + if ( !a || a < 1 ) { a = 1; s = p / 4; } + else s = p * Math.asin( 1 / a ) / ( 2 * Math.PI ); + return ( a * Math.pow( 2, - 10 * k) * Math.sin( ( k - s ) * ( 2 * Math.PI ) / p ) + 1 ); + + }, + }, + back: { + out: function ( k ) { + var s = 1.70158; + return --k * k * ( ( s + 1 ) * k + s ) + 1; + } + } + */ + }, + + /** + * + * @return {object} + * + * { + * raf : request animation frame function + * caf : cancel animation frame function + * transfrom : transform property key (with vendor), or null if not supported + * oldIE : IE8 or below + * } + * + */ + detectFeatures: function () { + if (framework.features) { + return framework.features; + } + var helperEl = framework.createEl(), + helperStyle = helperEl.style, + vendor = '', + features = {}; + + // IE8 and below + features.oldIE = document.all && !document.addEventListener; + + features.touch = 'ontouchstart' in window; + + if (window.requestAnimationFrame) { + features.raf = window.requestAnimationFrame; + features.caf = window.cancelAnimationFrame; + } + + features.pointerEvent = navigator.pointerEnabled || navigator.msPointerEnabled; + + // fix false-positive detection of old Android in new IE + // (IE11 ua string contains "Android 4.0") + + if (!features.pointerEvent) { + var ua = navigator.userAgent; + + // Detect if device is iPhone or iPod and if it's older than iOS 8 + // http://stackoverflow.com/a/14223920 + // + // This detection is made because of buggy top/bottom toolbars + // that don't trigger window.resize event. + // For more info refer to _isFixedPosition variable in core.js + + if (/iP(hone|od)/.test(navigator.platform)) { + var v = navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/); + if (v && v.length > 0) { + v = parseInt(v[1], 10); + if (v >= 1 && v < 8) { + features.isOldIOSPhone = true; + } + } + } + + // Detect old Android (before KitKat) + // due to bugs related to position:fixed + // http://stackoverflow.com/questions/7184573/pick-up-the-android-version-in-the-browser-by-javascript + + var match = ua.match(/Android\s([0-9\.]*)/); + var androidversion = match ? match[1] : 0; + androidversion = parseFloat(androidversion); + if (androidversion >= 1) { + if (androidversion < 4.4) { + features.isOldAndroid = true; // for fixed position bug & performance + } + features.androidVersion = androidversion; // for touchend bug + } + features.isMobileOpera = /opera mini|opera mobi/i.test(ua); + + // p.s. yes, yes, UA sniffing is bad, propose your solution for above bugs. + } + + var styleChecks = ['transform', 'perspective', 'animationName'], + vendors = ['', 'webkit', 'Moz', 'ms', 'O'], + styleCheckItem, + styleName; + + for (var i = 0; i < 4; i++) { + vendor = vendors[i]; + + for (var a = 0; a < 3; a++) { + styleCheckItem = styleChecks[a]; + + // uppercase first letter of property name, if vendor is present + styleName = + vendor + + (vendor + ? styleCheckItem.charAt(0).toUpperCase() + styleCheckItem.slice(1) + : styleCheckItem); + + if (!features[styleCheckItem] && styleName in helperStyle) { + features[styleCheckItem] = styleName; + } + } + + if (vendor && !features.raf) { + vendor = vendor.toLowerCase(); + features.raf = window[vendor + 'RequestAnimationFrame']; + if (features.raf) { + features.caf = + window[vendor + 'CancelAnimationFrame'] || + window[vendor + 'CancelRequestAnimationFrame']; + } + } + } + + if (!features.raf) { + var lastTime = 0; + features.raf = function (fn) { + var currTime = new Date().getTime(); + var timeToCall = Math.max(0, 16 - (currTime - lastTime)); + var id = window.setTimeout(function () { + fn(currTime + timeToCall); + }, timeToCall); + lastTime = currTime + timeToCall; + return id; + }; + features.caf = function (id) { + clearTimeout(id); + }; + } + + // Detect SVG support + features.svg = + !!document.createElementNS && + !!document.createElementNS('http://www.w3.org/2000/svg', 'svg').createSVGRect; + + framework.features = features; + + return features; + }, + }; + + framework.detectFeatures(); + + // Override addEventListener for old versions of IE + if (framework.features.oldIE) { + framework.bind = function (target, type, listener, unbind) { + type = type.split(' '); + + var methodName = (unbind ? 'detach' : 'attach') + 'Event', + evName, + _handleEv = function () { + listener.handleEvent.call(listener); + }; + + for (var i = 0; i < type.length; i++) { + evName = type[i]; + if (evName) { + if (typeof listener === 'object' && listener.handleEvent) { + if (!unbind) { + listener['oldIE' + evName] = _handleEv; + } else { + if (!listener['oldIE' + evName]) { + return false; + } + } + + target[methodName]('on' + evName, listener['oldIE' + evName]); + } else { + target[methodName]('on' + evName, listener); + } + } + } + }; + } + + /*>>framework-bridge*/ + + /*>>core*/ + //function(template, UiClass, items, options) + + var self = this; + + /** + * Static vars, don't change unless you know what you're doing. + */ + var DOUBLE_TAP_RADIUS = 25, + NUM_HOLDERS = 3; + + /** + * Options + */ + var _options = { + allowPanToNext: true, + spacing: 0.12, + bgOpacity: 1, + mouseUsed: false, + loop: true, + pinchToClose: true, + closeOnScroll: true, + closeOnVerticalDrag: true, + verticalDragRange: 0.75, + hideAnimationDuration: 333, + showAnimationDuration: 333, + showHideOpacity: false, + focus: true, + escKey: true, + arrowKeys: true, + mainScrollEndFriction: 0.35, + panEndFriction: 0.35, + isClickableElement: function (el) { + return el.tagName === 'A'; + }, + getDoubleTapZoom: function (isMouseClick, item) { + if (isMouseClick) { + return 1; + } else { + return item.initialZoomLevel < 0.7 ? 1 : 1.33; + } + }, + maxSpreadZoom: 1.33, + modal: true, + + // not fully implemented yet + scaleMode: 'fit', // TODO + }; + framework.extend(_options, options); + + /** + * Private helper variables & functions + */ + + var _getEmptyPoint = function () { + return { x: 0, y: 0 }; + }; + + var _isOpen, + _isDestroying, + _closedByScroll, + _currentItemIndex, + _containerStyle, + _containerShiftIndex, + _currPanDist = _getEmptyPoint(), + _startPanOffset = _getEmptyPoint(), + _panOffset = _getEmptyPoint(), + _upMoveEvents, // drag move, drag end & drag cancel events array + _downEvents, // drag start events array + _globalEventHandlers, + _viewportSize = {}, + _currZoomLevel, + _startZoomLevel, + _translatePrefix, + _translateSufix, + _updateSizeInterval, + _itemsNeedUpdate, + _currPositionIndex = 0, + _offset = {}, + _slideSize = _getEmptyPoint(), // size of slide area, including spacing + _itemHolders, + _prevItemIndex, + _indexDiff = 0, // difference of indexes since last content update + _dragStartEvent, + _dragMoveEvent, + _dragEndEvent, + _dragCancelEvent, + _transformKey, + _pointerEventEnabled, + _isFixedPosition = true, + _likelyTouchDevice, + _modules = [], + _requestAF, + _cancelAF, + _initalClassName, + _initalWindowScrollY, + _oldIE, + _currentWindowScrollY, + _features, + _windowVisibleSize = {}, + _renderMaxResolution = false, + // Registers PhotoSWipe module (History, Controller ...) + _registerModule = function (name, module) { + framework.extend(self, module.publicMethods); + _modules.push(name); + }, + _getLoopedId = function (index) { + var numSlides = _getNumItems(); + if (index > numSlides - 1) { + return index - numSlides; + } else if (index < 0) { + return numSlides + index; + } + return index; + }, + // Micro bind/trigger + _listeners = {}, + _listen = function (name, fn) { + if (!_listeners[name]) { + _listeners[name] = []; + } + return _listeners[name].push(fn); + }, + _shout = function (name) { + var listeners = _listeners[name]; + + if (listeners) { + var args = Array.prototype.slice.call(arguments); + args.shift(); + + for (var i = 0; i < listeners.length; i++) { + listeners[i].apply(self, args); + } + } + }, + _getCurrentTime = function () { + return new Date().getTime(); + }, + _applyBgOpacity = function (opacity) { + _bgOpacity = opacity; + self.bg.style.opacity = opacity * _options.bgOpacity; + }, + _applyZoomTransform = function (styleObj, x, y, zoom, item) { + if (!_renderMaxResolution || (item && item !== self.currItem)) { + zoom = zoom / (item ? item.fitRatio : self.currItem.fitRatio); + } + + styleObj[_transformKey] = + _translatePrefix + x + 'px, ' + y + 'px' + _translateSufix + ' scale(' + zoom + ')'; + }, + _applyCurrentZoomPan = function (allowRenderResolution) { + if (_currZoomElementStyle) { + if (allowRenderResolution) { + if (_currZoomLevel > self.currItem.fitRatio) { + if (!_renderMaxResolution) { + _setImageSize(self.currItem, false, true); + _renderMaxResolution = true; + } + } else { + if (_renderMaxResolution) { + _setImageSize(self.currItem); + _renderMaxResolution = false; + } + } + } + + _applyZoomTransform(_currZoomElementStyle, _panOffset.x, _panOffset.y, _currZoomLevel); + } + }, + _applyZoomPanToItem = function (item) { + if (item.container) { + _applyZoomTransform( + item.container.style, + item.initialPosition.x, + item.initialPosition.y, + item.initialZoomLevel, + item, + ); + } + }, + _setTranslateX = function (x, elStyle) { + elStyle[_transformKey] = _translatePrefix + x + 'px, 0px' + _translateSufix; + }, + _moveMainScroll = function (x, dragging) { + if (!_options.loop && dragging) { + var newSlideIndexOffset = + _currentItemIndex + (_slideSize.x * _currPositionIndex - x) / _slideSize.x, + delta = Math.round(x - _mainScrollPos.x); + + if ( + (newSlideIndexOffset < 0 && delta > 0) || + (newSlideIndexOffset >= _getNumItems() - 1 && delta < 0) + ) { + x = _mainScrollPos.x + delta * _options.mainScrollEndFriction; + } + } + + _mainScrollPos.x = x; + _setTranslateX(x, _containerStyle); + }, + _calculatePanOffset = function (axis, zoomLevel) { + var m = _midZoomPoint[axis] - _offset[axis]; + return _startPanOffset[axis] + _currPanDist[axis] + m - m * (zoomLevel / _startZoomLevel); + }, + _equalizePoints = function (p1, p2) { + p1.x = p2.x; + p1.y = p2.y; + if (p2.id) { + p1.id = p2.id; + } + }, + _roundPoint = function (p) { + p.x = Math.round(p.x); + p.y = Math.round(p.y); + }, + _mouseMoveTimeout = null, + _onFirstMouseMove = function () { + // Wait until mouse move event is fired at least twice during 100ms + // We do this, because some mobile browsers trigger it on touchstart + if (_mouseMoveTimeout) { + framework.unbind(document, 'mousemove', _onFirstMouseMove); + framework.addClass(template, 'pswp--has_mouse'); + _options.mouseUsed = true; + _shout('mouseUsed'); + } + _mouseMoveTimeout = setTimeout(function () { + _mouseMoveTimeout = null; + }, 100); + }, + _bindEvents = function () { + framework.bind(document, 'keydown', self); + + if (_features.transform) { + // don't bind click event in browsers that don't support transform (mostly IE8) + framework.bind(self.scrollWrap, 'click', self); + } + + if (!_options.mouseUsed) { + framework.bind(document, 'mousemove', _onFirstMouseMove); + } + + framework.bind(window, 'resize scroll', self); + + _shout('bindEvents'); + }, + _unbindEvents = function () { + framework.unbind(window, 'resize', self); + framework.unbind(window, 'scroll', _globalEventHandlers.scroll); + framework.unbind(document, 'keydown', self); + framework.unbind(document, 'mousemove', _onFirstMouseMove); + + if (_features.transform) { + framework.unbind(self.scrollWrap, 'click', self); + } + + if (_isDragging) { + framework.unbind(window, _upMoveEvents, self); + } + + _shout('unbindEvents'); + }, + _calculatePanBounds = function (zoomLevel, update) { + var bounds = _calculateItemSize(self.currItem, _viewportSize, zoomLevel); + if (update) { + _currPanBounds = bounds; + } + return bounds; + }, + _getMinZoomLevel = function (item) { + if (!item) { + item = self.currItem; + } + return item.initialZoomLevel; + }, + _getMaxZoomLevel = function (item) { + if (!item) { + item = self.currItem; + } + return item.w > 0 ? _options.maxSpreadZoom : 1; + }, + // Return true if offset is out of the bounds + _modifyDestPanOffset = function (axis, destPanBounds, destPanOffset, destZoomLevel) { + if (destZoomLevel === self.currItem.initialZoomLevel) { + destPanOffset[axis] = self.currItem.initialPosition[axis]; + return true; + } else { + destPanOffset[axis] = _calculatePanOffset(axis, destZoomLevel); + + if (destPanOffset[axis] > destPanBounds.min[axis]) { + destPanOffset[axis] = destPanBounds.min[axis]; + return true; + } else if (destPanOffset[axis] < destPanBounds.max[axis]) { + destPanOffset[axis] = destPanBounds.max[axis]; + return true; + } + } + return false; + }, + _setupTransforms = function () { + if (_transformKey) { + // setup 3d transforms + var allow3dTransform = _features.perspective && !_likelyTouchDevice; + _translatePrefix = 'translate' + (allow3dTransform ? '3d(' : '('); + _translateSufix = _features.perspective ? ', 0px)' : ')'; + return; + } + + // Override zoom/pan/move functions in case old browser is used (most likely IE) + // (so they use left/top/width/height, instead of CSS transform) + + _transformKey = 'left'; + framework.addClass(template, 'pswp--ie'); + + _setTranslateX = function (x, elStyle) { + elStyle.left = x + 'px'; + }; + _applyZoomPanToItem = function (item) { + var zoomRatio = item.fitRatio > 1 ? 1 : item.fitRatio, + s = item.container.style, + w = zoomRatio * item.w, + h = zoomRatio * item.h; + + s.width = w + 'px'; + s.height = h + 'px'; + s.left = item.initialPosition.x + 'px'; + s.top = item.initialPosition.y + 'px'; + }; + _applyCurrentZoomPan = function () { + if (_currZoomElementStyle) { + var s = _currZoomElementStyle, + item = self.currItem, + zoomRatio = item.fitRatio > 1 ? 1 : item.fitRatio, + w = zoomRatio * item.w, + h = zoomRatio * item.h; + + s.width = w + 'px'; + s.height = h + 'px'; + + s.left = _panOffset.x + 'px'; + s.top = _panOffset.y + 'px'; + } + }; + }, + _onKeyDown = function (e) { + var keydownAction = ''; + if (_options.escKey && e.keyCode === 27) { + keydownAction = 'close'; + } else if (_options.arrowKeys) { + if (e.keyCode === 37) { + keydownAction = 'prev'; + } else if (e.keyCode === 39) { + keydownAction = 'next'; + } + } + + if (keydownAction) { + // don't do anything if special key pressed to prevent from overriding default browser actions + // e.g. in Chrome on Mac cmd+arrow-left returns to previous page + if (!e.ctrlKey && !e.altKey && !e.shiftKey && !e.metaKey) { + if (e.preventDefault) { + e.preventDefault(); + } else { + e.returnValue = false; + } + self[keydownAction](); + } + } + }, + _onGlobalClick = function (e) { + if (!e) { + return; + } + + // don't allow click event to pass through when triggering after drag or some other gesture + if (_moved || _zoomStarted || _mainScrollAnimating || _verticalDragInitiated) { + e.preventDefault(); + e.stopPropagation(); + } + }, + _updatePageScrollOffset = function () { + self.setScrollOffset(0, framework.getScrollY()); + }; + + // Micro animation engine + var _animations = {}, + _numAnimations = 0, + _stopAnimation = function (name) { + if (_animations[name]) { + if (_animations[name].raf) { + _cancelAF(_animations[name].raf); + } + _numAnimations--; + delete _animations[name]; + } + }, + _registerStartAnimation = function (name) { + if (_animations[name]) { + _stopAnimation(name); + } + if (!_animations[name]) { + _numAnimations++; + _animations[name] = {}; + } + }, + _stopAllAnimations = function () { + for (var prop in _animations) { + if (_animations.hasOwnProperty(prop)) { + _stopAnimation(prop); + } + } + }, + _animateProp = function (name, b, endProp, d, easingFn, onUpdate, onComplete) { + var startAnimTime = _getCurrentTime(), + t; + _registerStartAnimation(name); + + var animloop = function () { + if (_animations[name]) { + t = _getCurrentTime() - startAnimTime; // time diff + //b - beginning (start prop) + //d - anim duration + + if (t >= d) { + _stopAnimation(name); + onUpdate(endProp); + if (onComplete) { + onComplete(); + } + return; + } + onUpdate((endProp - b) * easingFn(t / d) + b); + + _animations[name].raf = _requestAF(animloop); + } + }; + animloop(); + }; + + var publicMethods = { + // make a few local variables and functions public + shout: _shout, + listen: _listen, + viewportSize: _viewportSize, + options: _options, + + isMainScrollAnimating: function () { + return _mainScrollAnimating; + }, + getZoomLevel: function () { + return _currZoomLevel; + }, + getCurrentIndex: function () { + return _currentItemIndex; + }, + isDragging: function () { + return _isDragging; + }, + isZooming: function () { + return _isZooming; + }, + setScrollOffset: function (x, y) { + _offset.x = x; + _currentWindowScrollY = _offset.y = y; + _shout('updateScrollOffset', _offset); + }, + applyZoomPan: function (zoomLevel, panX, panY, allowRenderResolution) { + _panOffset.x = panX; + _panOffset.y = panY; + _currZoomLevel = zoomLevel; + _applyCurrentZoomPan(allowRenderResolution); + }, + + init: function () { + if (_isOpen || _isDestroying) { + return; + } + + var i; + + self.framework = framework; // basic functionality + self.template = template; // root DOM element of PhotoSwipe + self.bg = framework.getChildByClass(template, 'pswp__bg'); + + _initalClassName = template.className; + _isOpen = true; + + _features = framework.detectFeatures(); + _requestAF = _features.raf; + _cancelAF = _features.caf; + _transformKey = _features.transform; + _oldIE = _features.oldIE; + + self.scrollWrap = framework.getChildByClass(template, 'pswp__scroll-wrap'); + self.container = framework.getChildByClass(self.scrollWrap, 'pswp__container'); + + _containerStyle = self.container.style; // for fast access + + // Objects that hold slides (there are only 3 in DOM) + self.itemHolders = _itemHolders = [ + { el: self.container.children[0], wrap: 0, index: -1 }, + { el: self.container.children[1], wrap: 0, index: -1 }, + { el: self.container.children[2], wrap: 0, index: -1 }, + ]; + + // hide nearby item holders until initial zoom animation finishes (to avoid extra Paints) + _itemHolders[0].el.style.display = _itemHolders[2].el.style.display = 'none'; + + _setupTransforms(); + + // Setup global events + _globalEventHandlers = { + resize: self.updateSize, + scroll: _updatePageScrollOffset, + keydown: _onKeyDown, + click: _onGlobalClick, + }; + + // disable show/hide effects on old browsers that don't support CSS animations or transforms, + // old IOS, Android and Opera mobile. Blackberry seems to work fine, even older models. + var oldPhone = _features.isOldIOSPhone || _features.isOldAndroid || _features.isMobileOpera; + if (!_features.animationName || !_features.transform || oldPhone) { + _options.showAnimationDuration = _options.hideAnimationDuration = 0; + } + + // init modules + for (i = 0; i < _modules.length; i++) { + self['init' + _modules[i]](); + } + + // init + if (UiClass) { + var ui = (self.ui = new UiClass(self, framework)); + ui.init(); + } + + _shout('firstUpdate'); + _currentItemIndex = _currentItemIndex || _options.index || 0; + // validate index + if (isNaN(_currentItemIndex) || _currentItemIndex < 0 || _currentItemIndex >= _getNumItems()) { + _currentItemIndex = 0; + } + self.currItem = _getItemAt(_currentItemIndex); + + if (_features.isOldIOSPhone || _features.isOldAndroid) { + _isFixedPosition = false; + } + + template.setAttribute('aria-hidden', 'false'); + if (_options.modal) { + if (!_isFixedPosition) { + template.style.position = 'absolute'; + template.style.top = framework.getScrollY() + 'px'; + } else { + template.style.position = 'fixed'; + } + } + + if (_currentWindowScrollY === undefined) { + _shout('initialLayout'); + _currentWindowScrollY = _initalWindowScrollY = framework.getScrollY(); + } + + // add classes to root element of PhotoSwipe + var rootClasses = 'pswp--open '; + if (_options.mainClass) { + rootClasses += _options.mainClass + ' '; + } + if (_options.showHideOpacity) { + rootClasses += 'pswp--animate_opacity '; + } + rootClasses += _likelyTouchDevice ? 'pswp--touch' : 'pswp--notouch'; + rootClasses += _features.animationName ? ' pswp--css_animation' : ''; + rootClasses += _features.svg ? ' pswp--svg' : ''; + framework.addClass(template, rootClasses); + + self.updateSize(); + + // initial update + _containerShiftIndex = -1; + _indexDiff = null; + for (i = 0; i < NUM_HOLDERS; i++) { + _setTranslateX((i + _containerShiftIndex) * _slideSize.x, _itemHolders[i].el.style); + } + + if (!_oldIE) { + framework.bind(self.scrollWrap, _downEvents, self); // no dragging for old IE + } + + _listen('initialZoomInEnd', function () { + self.setContent(_itemHolders[0], _currentItemIndex - 1); + self.setContent(_itemHolders[2], _currentItemIndex + 1); + + _itemHolders[0].el.style.display = _itemHolders[2].el.style.display = 'block'; + + if (_options.focus) { + // focus causes layout, + // which causes lag during the animation, + // that's why we delay it untill the initial zoom transition ends + template.focus(); + } + + _bindEvents(); + }); + + // set content for center slide (first time) + self.setContent(_itemHolders[1], _currentItemIndex); + + self.updateCurrItem(); + + _shout('afterInit'); + + if (!_isFixedPosition) { + // On all versions of iOS lower than 8.0, we check size of viewport every second. + // + // This is done to detect when Safari top & bottom bars appear, + // as this action doesn't trigger any events (like resize). + // + // On iOS8 they fixed this. + // + // 10 Nov 2014: iOS 7 usage ~40%. iOS 8 usage 56%. + + _updateSizeInterval = setInterval(function () { + if ( + !_numAnimations && + !_isDragging && + !_isZooming && + _currZoomLevel === self.currItem.initialZoomLevel + ) { + self.updateSize(); + } + }, 1000); + } + + framework.addClass(template, 'pswp--visible'); + }, + + // Close the gallery, then destroy it + close: function () { + if (!_isOpen) { + return; + } + + _isOpen = false; + _isDestroying = true; + _shout('close'); + _unbindEvents(); + + _showOrHide(self.currItem, null, true, self.destroy); + }, + + // destroys the gallery (unbinds events, cleans up intervals and timeouts to avoid memory leaks) + destroy: function () { + _shout('destroy'); + + if (_showOrHideTimeout) { + clearTimeout(_showOrHideTimeout); + } + + template.setAttribute('aria-hidden', 'true'); + template.className = _initalClassName; + + if (_updateSizeInterval) { + clearInterval(_updateSizeInterval); + } + + framework.unbind(self.scrollWrap, _downEvents, self); + + // we unbind scroll event at the end, as closing animation may depend on it + framework.unbind(window, 'scroll', self); + + _stopDragUpdateLoop(); + + _stopAllAnimations(); + + _listeners = null; + }, + + /** + * Pan image to position + * @param {Number} x + * @param {Number} y + * @param {Boolean} force Will ignore bounds if set to true. + */ + panTo: function (x, y, force) { + if (!force) { + if (x > _currPanBounds.min.x) { + x = _currPanBounds.min.x; + } else if (x < _currPanBounds.max.x) { + x = _currPanBounds.max.x; + } + + if (y > _currPanBounds.min.y) { + y = _currPanBounds.min.y; + } else if (y < _currPanBounds.max.y) { + y = _currPanBounds.max.y; + } + } + + _panOffset.x = x; + _panOffset.y = y; + _applyCurrentZoomPan(); + }, + + handleEvent: function (e) { + e = e || window.event; + if (_globalEventHandlers[e.type]) { + _globalEventHandlers[e.type](e); + } + }, + + goTo: function (index) { + index = _getLoopedId(index); + + var diff = index - _currentItemIndex; + _indexDiff = diff; + + _currentItemIndex = index; + self.currItem = _getItemAt(_currentItemIndex); + _currPositionIndex -= diff; + + _moveMainScroll(_slideSize.x * _currPositionIndex); + + _stopAllAnimations(); + _mainScrollAnimating = false; + + self.updateCurrItem(); + }, + next: function () { + self.goTo(_currentItemIndex + 1); + }, + prev: function () { + self.goTo(_currentItemIndex - 1); + }, + + // update current zoom/pan objects + updateCurrZoomItem: function (emulateSetContent) { + if (emulateSetContent) { + _shout('beforeChange', 0); + } + + // itemHolder[1] is middle (current) item + if (_itemHolders[1].el.children.length) { + var zoomElement = _itemHolders[1].el.children[0]; + if (framework.hasClass(zoomElement, 'pswp__zoom-wrap')) { + _currZoomElementStyle = zoomElement.style; + } else { + _currZoomElementStyle = null; + } + } else { + _currZoomElementStyle = null; + } + + _currPanBounds = self.currItem.bounds; + _startZoomLevel = _currZoomLevel = self.currItem.initialZoomLevel; + + _panOffset.x = _currPanBounds.center.x; + _panOffset.y = _currPanBounds.center.y; + + if (emulateSetContent) { + _shout('afterChange'); + } + }, + + invalidateCurrItems: function () { + _itemsNeedUpdate = true; + for (var i = 0; i < NUM_HOLDERS; i++) { + if (_itemHolders[i].item) { + _itemHolders[i].item.needsUpdate = true; + } + } + }, + + updateCurrItem: function (beforeAnimation) { + if (_indexDiff === 0) { + return; + } + + var diffAbs = Math.abs(_indexDiff), + tempHolder; + + if (beforeAnimation && diffAbs < 2) { + return; + } + + self.currItem = _getItemAt(_currentItemIndex); + _renderMaxResolution = false; + + _shout('beforeChange', _indexDiff); + + if (diffAbs >= NUM_HOLDERS) { + _containerShiftIndex += _indexDiff + (_indexDiff > 0 ? -NUM_HOLDERS : NUM_HOLDERS); + diffAbs = NUM_HOLDERS; + } + for (var i = 0; i < diffAbs; i++) { + if (_indexDiff > 0) { + tempHolder = _itemHolders.shift(); + _itemHolders[NUM_HOLDERS - 1] = tempHolder; // move first to last + + _containerShiftIndex++; + _setTranslateX((_containerShiftIndex + 2) * _slideSize.x, tempHolder.el.style); + self.setContent(tempHolder, _currentItemIndex - diffAbs + i + 1 + 1); + } else { + tempHolder = _itemHolders.pop(); + _itemHolders.unshift(tempHolder); // move last to first + + _containerShiftIndex--; + _setTranslateX(_containerShiftIndex * _slideSize.x, tempHolder.el.style); + self.setContent(tempHolder, _currentItemIndex + diffAbs - i - 1 - 1); + } + } + + // reset zoom/pan on previous item + if (_currZoomElementStyle && Math.abs(_indexDiff) === 1) { + var prevItem = _getItemAt(_prevItemIndex); + if (prevItem.initialZoomLevel !== _currZoomLevel) { + _calculateItemSize(prevItem, _viewportSize); + _setImageSize(prevItem); + _applyZoomPanToItem(prevItem); + } + } + + // reset diff after update + _indexDiff = 0; + + self.updateCurrZoomItem(); + + _prevItemIndex = _currentItemIndex; + + _shout('afterChange'); + }, + + updateSize: function (force) { + if (!_isFixedPosition && _options.modal) { + var windowScrollY = framework.getScrollY(); + if (_currentWindowScrollY !== windowScrollY) { + template.style.top = windowScrollY + 'px'; + _currentWindowScrollY = windowScrollY; + } + if ( + !force && + _windowVisibleSize.x === window.innerWidth && + _windowVisibleSize.y === window.innerHeight + ) { + return; + } + _windowVisibleSize.x = window.innerWidth; + _windowVisibleSize.y = window.innerHeight; + + //template.style.width = _windowVisibleSize.x + 'px'; + template.style.height = _windowVisibleSize.y + 'px'; + } + + _viewportSize.x = self.scrollWrap.clientWidth; + _viewportSize.y = self.scrollWrap.clientHeight; + + _updatePageScrollOffset(); + + _slideSize.x = _viewportSize.x + Math.round(_viewportSize.x * _options.spacing); + _slideSize.y = _viewportSize.y; + + _moveMainScroll(_slideSize.x * _currPositionIndex); + + _shout('beforeResize'); // even may be used for example to switch image sources + + // don't re-calculate size on inital size update + if (_containerShiftIndex !== undefined) { + var holder, item, hIndex; + + for (var i = 0; i < NUM_HOLDERS; i++) { + holder = _itemHolders[i]; + _setTranslateX((i + _containerShiftIndex) * _slideSize.x, holder.el.style); + + hIndex = _currentItemIndex + i - 1; + + if (_options.loop && _getNumItems() > 2) { + hIndex = _getLoopedId(hIndex); + } + + // update zoom level on items and refresh source (if needsUpdate) + item = _getItemAt(hIndex); + + // re-render gallery item if `needsUpdate`, + // or doesn't have `bounds` (entirely new slide object) + if (item && (_itemsNeedUpdate || item.needsUpdate || !item.bounds)) { + self.cleanSlide(item); + + self.setContent(holder, hIndex); + + // if "center" slide + if (i === 1) { + self.currItem = item; + self.updateCurrZoomItem(true); + } + + item.needsUpdate = false; + } else if (holder.index === -1 && hIndex >= 0) { + // add content first time + self.setContent(holder, hIndex); + } + if (item && item.container) { + _calculateItemSize(item, _viewportSize); + _setImageSize(item); + _applyZoomPanToItem(item); + } + } + _itemsNeedUpdate = false; + } + + _startZoomLevel = _currZoomLevel = self.currItem.initialZoomLevel; + _currPanBounds = self.currItem.bounds; + + if (_currPanBounds) { + _panOffset.x = _currPanBounds.center.x; + _panOffset.y = _currPanBounds.center.y; + _applyCurrentZoomPan(true); + } + + _shout('resize'); + }, + + // Zoom current item to + zoomTo: function (destZoomLevel, centerPoint, speed, easingFn, updateFn) { + /* + if(destZoomLevel === 'fit') { + destZoomLevel = self.currItem.fitRatio; + } else if(destZoomLevel === 'fill') { + destZoomLevel = self.currItem.fillRatio; + } + */ + + if (centerPoint) { + _startZoomLevel = _currZoomLevel; + _midZoomPoint.x = Math.abs(centerPoint.x) - _panOffset.x; + _midZoomPoint.y = Math.abs(centerPoint.y) - _panOffset.y; + _equalizePoints(_startPanOffset, _panOffset); + } + + var destPanBounds = _calculatePanBounds(destZoomLevel, false), + destPanOffset = {}; + + _modifyDestPanOffset('x', destPanBounds, destPanOffset, destZoomLevel); + _modifyDestPanOffset('y', destPanBounds, destPanOffset, destZoomLevel); + + var initialZoomLevel = _currZoomLevel; + var initialPanOffset = { + x: _panOffset.x, + y: _panOffset.y, + }; + + _roundPoint(destPanOffset); + + var onUpdate = function (now) { + if (now === 1) { + _currZoomLevel = destZoomLevel; + _panOffset.x = destPanOffset.x; + _panOffset.y = destPanOffset.y; + } else { + _currZoomLevel = (destZoomLevel - initialZoomLevel) * now + initialZoomLevel; + _panOffset.x = (destPanOffset.x - initialPanOffset.x) * now + initialPanOffset.x; + _panOffset.y = (destPanOffset.y - initialPanOffset.y) * now + initialPanOffset.y; + } + + if (updateFn) { + updateFn(now); + } + + _applyCurrentZoomPan(now === 1); + }; + + if (speed) { + _animateProp('customZoomTo', 0, 1, speed, easingFn || framework.easing.sine.inOut, onUpdate); + } else { + onUpdate(1); + } + }, + }; + + /*>>core*/ + + /*>>gestures*/ + /** + * Mouse/touch/pointer event handlers. + * + * separated from @core.js for readability + */ + + var MIN_SWIPE_DISTANCE = 30, + DIRECTION_CHECK_OFFSET = 10; // amount of pixels to drag to determine direction of swipe + + var _gestureStartTime, + _gestureCheckSpeedTime, + // pool of objects that are used during dragging of zooming + p = {}, // first point + p2 = {}, // second point (for zoom gesture) + delta = {}, + _currPoint = {}, + _startPoint = {}, + _currPointers = [], + _startMainScrollPos = {}, + _releaseAnimData, + _posPoints = [], // array of points during dragging, used to determine type of gesture + _tempPoint = {}, + _isZoomingIn, + _verticalDragInitiated, + _oldAndroidTouchEndTimeout, + _currZoomedItemIndex = 0, + _centerPoint = _getEmptyPoint(), + _lastReleaseTime = 0, + _isDragging, // at least one pointer is down + _isMultitouch, // at least two _pointers are down + _zoomStarted, // zoom level changed during zoom gesture + _moved, + _dragAnimFrame, + _mainScrollShifted, + _currentPoints, // array of current touch points + _isZooming, + _currPointsDistance, + _startPointsDistance, + _currPanBounds, + _mainScrollPos = _getEmptyPoint(), + _currZoomElementStyle, + _mainScrollAnimating, // true, if animation after swipe gesture is running + _midZoomPoint = _getEmptyPoint(), + _currCenterPoint = _getEmptyPoint(), + _direction, + _isFirstMove, + _opacityChanged, + _bgOpacity, + _wasOverInitialZoom, + _isEqualPoints = function (p1, p2) { + return p1.x === p2.x && p1.y === p2.y; + }, + _isNearbyPoints = function (touch0, touch1) { + return ( + Math.abs(touch0.x - touch1.x) < DOUBLE_TAP_RADIUS && + Math.abs(touch0.y - touch1.y) < DOUBLE_TAP_RADIUS + ); + }, + _calculatePointsDistance = function (p1, p2) { + _tempPoint.x = Math.abs(p1.x - p2.x); + _tempPoint.y = Math.abs(p1.y - p2.y); + return Math.sqrt(_tempPoint.x * _tempPoint.x + _tempPoint.y * _tempPoint.y); + }, + _stopDragUpdateLoop = function () { + if (_dragAnimFrame) { + _cancelAF(_dragAnimFrame); + _dragAnimFrame = null; + } + }, + _dragUpdateLoop = function () { + if (_isDragging) { + _dragAnimFrame = _requestAF(_dragUpdateLoop); + _renderMovement(); + } + }, + _canPan = function () { + return !(_options.scaleMode === 'fit' && _currZoomLevel === self.currItem.initialZoomLevel); + }, + // find the closest parent DOM element + _closestElement = function (el, fn) { + if (!el || el === document) { + return false; + } + + // don't search elements above pswp__scroll-wrap + if (el.getAttribute('class') && el.getAttribute('class').indexOf('pswp__scroll-wrap') > -1) { + return false; + } + + if (fn(el)) { + return el; + } + + return _closestElement(el.parentNode, fn); + }, + _preventObj = {}, + _preventDefaultEventBehaviour = function (e, isDown) { + _preventObj.prevent = !_closestElement(e.target, _options.isClickableElement); + + _shout('preventDragEvent', e, isDown, _preventObj); + return _preventObj.prevent; + }, + _convertTouchToPoint = function (touch, p) { + p.x = touch.pageX; + p.y = touch.pageY; + p.id = touch.identifier; + return p; + }, + _findCenterOfPoints = function (p1, p2, pCenter) { + pCenter.x = (p1.x + p2.x) * 0.5; + pCenter.y = (p1.y + p2.y) * 0.5; + }, + _pushPosPoint = function (time, x, y) { + if (time - _gestureCheckSpeedTime > 50) { + var o = _posPoints.length > 2 ? _posPoints.shift() : {}; + o.x = x; + o.y = y; + _posPoints.push(o); + _gestureCheckSpeedTime = time; + } + }, + _calculateVerticalDragOpacityRatio = function () { + var yOffset = _panOffset.y - self.currItem.initialPosition.y; // difference between initial and current position + return 1 - Math.abs(yOffset / (_viewportSize.y / 2)); + }, + // points pool, reused during touch events + _ePoint1 = {}, + _ePoint2 = {}, + _tempPointsArr = [], + _tempCounter, + _getTouchPoints = function (e) { + // clean up previous points, without recreating array + while (_tempPointsArr.length > 0) { + _tempPointsArr.pop(); + } + + if (!_pointerEventEnabled) { + if (e.type.indexOf('touch') > -1) { + if (e.touches && e.touches.length > 0) { + _tempPointsArr[0] = _convertTouchToPoint(e.touches[0], _ePoint1); + if (e.touches.length > 1) { + _tempPointsArr[1] = _convertTouchToPoint(e.touches[1], _ePoint2); + } + } + } else { + _ePoint1.x = e.pageX; + _ePoint1.y = e.pageY; + _ePoint1.id = ''; + _tempPointsArr[0] = _ePoint1; //_ePoint1; + } + } else { + _tempCounter = 0; + // we can use forEach, as pointer events are supported only in modern browsers + _currPointers.forEach(function (p) { + if (_tempCounter === 0) { + _tempPointsArr[0] = p; + } else if (_tempCounter === 1) { + _tempPointsArr[1] = p; + } + _tempCounter++; + }); + } + return _tempPointsArr; + }, + _panOrMoveMainScroll = function (axis, delta) { + var panFriction, + overDiff = 0, + newOffset = _panOffset[axis] + delta[axis], + startOverDiff, + dir = delta[axis] > 0, + newMainScrollPosition = _mainScrollPos.x + delta.x, + mainScrollDiff = _mainScrollPos.x - _startMainScrollPos.x, + newPanPos, + newMainScrollPos; + + // calculate fdistance over the bounds and friction + if (newOffset > _currPanBounds.min[axis] || newOffset < _currPanBounds.max[axis]) { + panFriction = _options.panEndFriction; + // Linear increasing of friction, so at 1/4 of viewport it's at max value. + // Looks not as nice as was expected. Left for history. + // panFriction = (1 - (_panOffset[axis] + delta[axis] + panBounds.min[axis]) / (_viewportSize[axis] / 4) ); + } else { + panFriction = 1; + } + + newOffset = _panOffset[axis] + delta[axis] * panFriction; + + // move main scroll or start panning + if (_options.allowPanToNext || _currZoomLevel === self.currItem.initialZoomLevel) { + if (!_currZoomElementStyle) { + newMainScrollPos = newMainScrollPosition; + } else if (_direction === 'h' && axis === 'x' && !_zoomStarted) { + if (dir) { + if (newOffset > _currPanBounds.min[axis]) { + panFriction = _options.panEndFriction; + overDiff = _currPanBounds.min[axis] - newOffset; + startOverDiff = _currPanBounds.min[axis] - _startPanOffset[axis]; + } + + // drag right + if ((startOverDiff <= 0 || mainScrollDiff < 0) && _getNumItems() > 1) { + newMainScrollPos = newMainScrollPosition; + if (mainScrollDiff < 0 && newMainScrollPosition > _startMainScrollPos.x) { + newMainScrollPos = _startMainScrollPos.x; + } + } else { + if (_currPanBounds.min.x !== _currPanBounds.max.x) { + newPanPos = newOffset; + } + } + } else { + if (newOffset < _currPanBounds.max[axis]) { + panFriction = _options.panEndFriction; + overDiff = newOffset - _currPanBounds.max[axis]; + startOverDiff = _startPanOffset[axis] - _currPanBounds.max[axis]; + } + + if ((startOverDiff <= 0 || mainScrollDiff > 0) && _getNumItems() > 1) { + newMainScrollPos = newMainScrollPosition; + + if (mainScrollDiff > 0 && newMainScrollPosition < _startMainScrollPos.x) { + newMainScrollPos = _startMainScrollPos.x; + } + } else { + if (_currPanBounds.min.x !== _currPanBounds.max.x) { + newPanPos = newOffset; + } + } + } + + // + } + + if (axis === 'x') { + if (newMainScrollPos !== undefined) { + _moveMainScroll(newMainScrollPos, true); + if (newMainScrollPos === _startMainScrollPos.x) { + _mainScrollShifted = false; + } else { + _mainScrollShifted = true; + } + } + + if (_currPanBounds.min.x !== _currPanBounds.max.x) { + if (newPanPos !== undefined) { + _panOffset.x = newPanPos; + } else if (!_mainScrollShifted) { + _panOffset.x += delta.x * panFriction; + } + } + + return newMainScrollPos !== undefined; + } + } + + if (!_mainScrollAnimating) { + if (!_mainScrollShifted) { + if (_currZoomLevel > self.currItem.fitRatio) { + _panOffset[axis] += delta[axis] * panFriction; + } + } + } + }, + // Pointerdown/touchstart/mousedown handler + _onDragStart = function (e) { + // Allow dragging only via left mouse button. + // As this handler is not added in IE8 - we ignore e.which + // + // http://www.quirksmode.org/js/events_properties.html + // https://developer.mozilla.org/en-US/docs/Web/API/event.button + if (e.type === 'mousedown' && e.button > 0) { + return; + } + + if (_initialZoomRunning) { + e.preventDefault(); + return; + } + + if (_oldAndroidTouchEndTimeout && e.type === 'mousedown') { + return; + } + + if (_preventDefaultEventBehaviour(e, true)) { + e.preventDefault(); + } + + _shout('pointerDown'); + + if (_pointerEventEnabled) { + var pointerIndex = framework.arraySearch(_currPointers, e.pointerId, 'id'); + if (pointerIndex < 0) { + pointerIndex = _currPointers.length; + } + _currPointers[pointerIndex] = { x: e.pageX, y: e.pageY, id: e.pointerId }; + } + + var startPointsList = _getTouchPoints(e), + numPoints = startPointsList.length; + + _currentPoints = null; + + _stopAllAnimations(); + + // init drag + if (!_isDragging || numPoints === 1) { + _isDragging = _isFirstMove = true; + framework.bind(window, _upMoveEvents, self); + + _isZoomingIn = + _wasOverInitialZoom = + _opacityChanged = + _verticalDragInitiated = + _mainScrollShifted = + _moved = + _isMultitouch = + _zoomStarted = + false; + + _direction = null; + + _shout('firstTouchStart', startPointsList); + + _equalizePoints(_startPanOffset, _panOffset); + + _currPanDist.x = _currPanDist.y = 0; + _equalizePoints(_currPoint, startPointsList[0]); + _equalizePoints(_startPoint, _currPoint); + + //_equalizePoints(_startMainScrollPos, _mainScrollPos); + _startMainScrollPos.x = _slideSize.x * _currPositionIndex; + + _posPoints = [ + { + x: _currPoint.x, + y: _currPoint.y, + }, + ]; + + _gestureCheckSpeedTime = _gestureStartTime = _getCurrentTime(); + + //_mainScrollAnimationEnd(true); + _calculatePanBounds(_currZoomLevel, true); + + // Start rendering + _stopDragUpdateLoop(); + _dragUpdateLoop(); + } + + // init zoom + if (!_isZooming && numPoints > 1 && !_mainScrollAnimating && !_mainScrollShifted) { + _startZoomLevel = _currZoomLevel; + _zoomStarted = false; // true if zoom changed at least once + + _isZooming = _isMultitouch = true; + _currPanDist.y = _currPanDist.x = 0; + + _equalizePoints(_startPanOffset, _panOffset); + + _equalizePoints(p, startPointsList[0]); + _equalizePoints(p2, startPointsList[1]); + + _findCenterOfPoints(p, p2, _currCenterPoint); + + _midZoomPoint.x = Math.abs(_currCenterPoint.x) - _panOffset.x; + _midZoomPoint.y = Math.abs(_currCenterPoint.y) - _panOffset.y; + _currPointsDistance = _startPointsDistance = _calculatePointsDistance(p, p2); + } + }, + // Pointermove/touchmove/mousemove handler + _onDragMove = function (e) { + e.preventDefault(); + + if (_pointerEventEnabled) { + var pointerIndex = framework.arraySearch(_currPointers, e.pointerId, 'id'); + if (pointerIndex > -1) { + var p = _currPointers[pointerIndex]; + p.x = e.pageX; + p.y = e.pageY; + } + } + + if (_isDragging) { + var touchesList = _getTouchPoints(e); + if (!_direction && !_moved && !_isZooming) { + if (_mainScrollPos.x !== _slideSize.x * _currPositionIndex) { + // if main scroll position is shifted – direction is always horizontal + _direction = 'h'; + } else { + var diff = + Math.abs(touchesList[0].x - _currPoint.x) - Math.abs(touchesList[0].y - _currPoint.y); + // check the direction of movement + if (Math.abs(diff) >= DIRECTION_CHECK_OFFSET) { + _direction = diff > 0 ? 'h' : 'v'; + _currentPoints = touchesList; + } + } + } else { + _currentPoints = touchesList; + } + } + }, + // + _renderMovement = function () { + if (!_currentPoints) { + return; + } + + var numPoints = _currentPoints.length; + + if (numPoints === 0) { + return; + } + + _equalizePoints(p, _currentPoints[0]); + + delta.x = p.x - _currPoint.x; + delta.y = p.y - _currPoint.y; + + if (_isZooming && numPoints > 1) { + // Handle behaviour for more than 1 point + + _currPoint.x = p.x; + _currPoint.y = p.y; + + // check if one of two points changed + if (!delta.x && !delta.y && _isEqualPoints(_currentPoints[1], p2)) { + return; + } + + _equalizePoints(p2, _currentPoints[1]); + + if (!_zoomStarted) { + _zoomStarted = true; + _shout('zoomGestureStarted'); + } + + // Distance between two points + var pointsDistance = _calculatePointsDistance(p, p2); + + var zoomLevel = _calculateZoomLevel(pointsDistance); + + // slightly over the of initial zoom level + if (zoomLevel > self.currItem.initialZoomLevel + self.currItem.initialZoomLevel / 15) { + _wasOverInitialZoom = true; + } + + // Apply the friction if zoom level is out of the bounds + var zoomFriction = 1, + minZoomLevel = _getMinZoomLevel(), + maxZoomLevel = _getMaxZoomLevel(); + + if (zoomLevel < minZoomLevel) { + if ( + _options.pinchToClose && + !_wasOverInitialZoom && + _startZoomLevel <= self.currItem.initialZoomLevel + ) { + // fade out background if zooming out + var minusDiff = minZoomLevel - zoomLevel; + var percent = 1 - minusDiff / (minZoomLevel / 1.2); + + _applyBgOpacity(percent); + _shout('onPinchClose', percent); + _opacityChanged = true; + } else { + zoomFriction = (minZoomLevel - zoomLevel) / minZoomLevel; + if (zoomFriction > 1) { + zoomFriction = 1; + } + zoomLevel = minZoomLevel - zoomFriction * (minZoomLevel / 3); + } + } else if (zoomLevel > maxZoomLevel) { + // 1.5 - extra zoom level above the max. E.g. if max is x6, real max 6 + 1.5 = 7.5 + zoomFriction = (zoomLevel - maxZoomLevel) / (minZoomLevel * 6); + if (zoomFriction > 1) { + zoomFriction = 1; + } + zoomLevel = maxZoomLevel + zoomFriction * minZoomLevel; + } + + if (zoomFriction < 0) { + zoomFriction = 0; + } + + // distance between touch points after friction is applied + _currPointsDistance = pointsDistance; + + // _centerPoint - The point in the middle of two pointers + _findCenterOfPoints(p, p2, _centerPoint); + + // paning with two pointers pressed + _currPanDist.x += _centerPoint.x - _currCenterPoint.x; + _currPanDist.y += _centerPoint.y - _currCenterPoint.y; + _equalizePoints(_currCenterPoint, _centerPoint); + + _panOffset.x = _calculatePanOffset('x', zoomLevel); + _panOffset.y = _calculatePanOffset('y', zoomLevel); + + _isZoomingIn = zoomLevel > _currZoomLevel; + _currZoomLevel = zoomLevel; + _applyCurrentZoomPan(); + } else { + // handle behaviour for one point (dragging or panning) + + if (!_direction) { + return; + } + + if (_isFirstMove) { + _isFirstMove = false; + + // subtract drag distance that was used during the detection direction + + if (Math.abs(delta.x) >= DIRECTION_CHECK_OFFSET) { + delta.x -= _currentPoints[0].x - _startPoint.x; + } + + if (Math.abs(delta.y) >= DIRECTION_CHECK_OFFSET) { + delta.y -= _currentPoints[0].y - _startPoint.y; + } + } + + _currPoint.x = p.x; + _currPoint.y = p.y; + + // do nothing if pointers position hasn't changed + if (delta.x === 0 && delta.y === 0) { + return; + } + + if (_direction === 'v' && _options.closeOnVerticalDrag) { + if (!_canPan()) { + _currPanDist.y += delta.y; + _panOffset.y += delta.y; + + var opacityRatio = _calculateVerticalDragOpacityRatio(); + + _verticalDragInitiated = true; + _shout('onVerticalDrag', opacityRatio); + + _applyBgOpacity(opacityRatio); + _applyCurrentZoomPan(); + return; + } + } + + _pushPosPoint(_getCurrentTime(), p.x, p.y); + + _moved = true; + _currPanBounds = self.currItem.bounds; + + var mainScrollChanged = _panOrMoveMainScroll('x', delta); + if (!mainScrollChanged) { + _panOrMoveMainScroll('y', delta); + + _roundPoint(_panOffset); + _applyCurrentZoomPan(); + } + } + }, + // Pointerup/pointercancel/touchend/touchcancel/mouseup event handler + _onDragRelease = function (e) { + if (_features.isOldAndroid) { + if (_oldAndroidTouchEndTimeout && e.type === 'mouseup') { + return; + } + + // on Android (v4.1, 4.2, 4.3 & possibly older) + // ghost mousedown/up event isn't preventable via e.preventDefault, + // which causes fake mousedown event + // so we block mousedown/up for 600ms + if (e.type.indexOf('touch') > -1) { + clearTimeout(_oldAndroidTouchEndTimeout); + _oldAndroidTouchEndTimeout = setTimeout(function () { + _oldAndroidTouchEndTimeout = 0; + }, 600); + } + } + + _shout('pointerUp'); + + if (_preventDefaultEventBehaviour(e, false)) { + e.preventDefault(); + } + + var releasePoint; + + if (_pointerEventEnabled) { + var pointerIndex = framework.arraySearch(_currPointers, e.pointerId, 'id'); + + if (pointerIndex > -1) { + releasePoint = _currPointers.splice(pointerIndex, 1)[0]; + + if (navigator.pointerEnabled) { + releasePoint.type = e.pointerType || 'mouse'; + } else { + var MSPOINTER_TYPES = { + 4: 'mouse', // event.MSPOINTER_TYPE_MOUSE + 2: 'touch', // event.MSPOINTER_TYPE_TOUCH + 3: 'pen', // event.MSPOINTER_TYPE_PEN + }; + releasePoint.type = MSPOINTER_TYPES[e.pointerType]; + + if (!releasePoint.type) { + releasePoint.type = e.pointerType || 'mouse'; + } + } + } + } + + var touchList = _getTouchPoints(e), + gestureType, + numPoints = touchList.length; + + if (e.type === 'mouseup') { + numPoints = 0; + } + + // Do nothing if there were 3 touch points or more + if (numPoints === 2) { + _currentPoints = null; + return true; + } + + // if second pointer released + if (numPoints === 1) { + _equalizePoints(_startPoint, touchList[0]); + } + + // pointer hasn't moved, send "tap release" point + if (numPoints === 0 && !_direction && !_mainScrollAnimating) { + if (!releasePoint) { + if (e.type === 'mouseup') { + releasePoint = { x: e.pageX, y: e.pageY, type: 'mouse' }; + } else if (e.changedTouches && e.changedTouches[0]) { + releasePoint = { + x: e.changedTouches[0].pageX, + y: e.changedTouches[0].pageY, + type: 'touch', + }; + } + } + + _shout('touchRelease', e, releasePoint); + } + + // Difference in time between releasing of two last touch points (zoom gesture) + var releaseTimeDiff = -1; + + // Gesture completed, no pointers left + if (numPoints === 0) { + _isDragging = false; + framework.unbind(window, _upMoveEvents, self); + + _stopDragUpdateLoop(); + + if (_isZooming) { + // Two points released at the same time + releaseTimeDiff = 0; + } else if (_lastReleaseTime !== -1) { + releaseTimeDiff = _getCurrentTime() - _lastReleaseTime; + } + } + _lastReleaseTime = numPoints === 1 ? _getCurrentTime() : -1; + + if (releaseTimeDiff !== -1 && releaseTimeDiff < 150) { + gestureType = 'zoom'; + } else { + gestureType = 'swipe'; + } + + if (_isZooming && numPoints < 2) { + _isZooming = false; + + // Only second point released + if (numPoints === 1) { + gestureType = 'zoomPointerUp'; + } + _shout('zoomGestureEnded'); + } + + _currentPoints = null; + if (!_moved && !_zoomStarted && !_mainScrollAnimating && !_verticalDragInitiated) { + // nothing to animate + return; + } + + _stopAllAnimations(); + + if (!_releaseAnimData) { + _releaseAnimData = _initDragReleaseAnimationData(); + } + + _releaseAnimData.calculateSwipeSpeed('x'); + + if (_verticalDragInitiated) { + var opacityRatio = _calculateVerticalDragOpacityRatio(); + + if (opacityRatio < _options.verticalDragRange) { + self.close(); + } else { + var initalPanY = _panOffset.y, + initialBgOpacity = _bgOpacity; + + _animateProp('verticalDrag', 0, 1, 300, framework.easing.cubic.out, function (now) { + _panOffset.y = (self.currItem.initialPosition.y - initalPanY) * now + initalPanY; + + _applyBgOpacity((1 - initialBgOpacity) * now + initialBgOpacity); + _applyCurrentZoomPan(); + }); + + _shout('onVerticalDrag', 1); + } + + return; + } + + // main scroll + if ((_mainScrollShifted || _mainScrollAnimating) && numPoints === 0) { + var itemChanged = _finishSwipeMainScrollGesture(gestureType, _releaseAnimData); + if (itemChanged) { + return; + } + gestureType = 'zoomPointerUp'; + } + + // prevent zoom/pan animation when main scroll animation runs + if (_mainScrollAnimating) { + return; + } + + // Complete simple zoom gesture (reset zoom level if it's out of the bounds) + if (gestureType !== 'swipe') { + _completeZoomGesture(); + return; + } + + // Complete pan gesture if main scroll is not shifted, and it's possible to pan current image + if (!_mainScrollShifted && _currZoomLevel > self.currItem.fitRatio) { + _completePanGesture(_releaseAnimData); + } + }, + // Returns object with data about gesture + // It's created only once and then reused + _initDragReleaseAnimationData = function () { + // temp local vars + var lastFlickDuration, tempReleasePos; + + // s = this + var s = { + lastFlickOffset: {}, + lastFlickDist: {}, + lastFlickSpeed: {}, + slowDownRatio: {}, + slowDownRatioReverse: {}, + speedDecelerationRatio: {}, + speedDecelerationRatioAbs: {}, + distanceOffset: {}, + backAnimDestination: {}, + backAnimStarted: {}, + calculateSwipeSpeed: function (axis) { + if (_posPoints.length > 1) { + lastFlickDuration = _getCurrentTime() - _gestureCheckSpeedTime + 50; + tempReleasePos = _posPoints[_posPoints.length - 2][axis]; + } else { + lastFlickDuration = _getCurrentTime() - _gestureStartTime; // total gesture duration + tempReleasePos = _startPoint[axis]; + } + s.lastFlickOffset[axis] = _currPoint[axis] - tempReleasePos; + s.lastFlickDist[axis] = Math.abs(s.lastFlickOffset[axis]); + if (s.lastFlickDist[axis] > 20) { + s.lastFlickSpeed[axis] = s.lastFlickOffset[axis] / lastFlickDuration; + } else { + s.lastFlickSpeed[axis] = 0; + } + if (Math.abs(s.lastFlickSpeed[axis]) < 0.1) { + s.lastFlickSpeed[axis] = 0; + } + + s.slowDownRatio[axis] = 0.95; + s.slowDownRatioReverse[axis] = 1 - s.slowDownRatio[axis]; + s.speedDecelerationRatio[axis] = 1; + }, + + calculateOverBoundsAnimOffset: function (axis, speed) { + if (!s.backAnimStarted[axis]) { + if (_panOffset[axis] > _currPanBounds.min[axis]) { + s.backAnimDestination[axis] = _currPanBounds.min[axis]; + } else if (_panOffset[axis] < _currPanBounds.max[axis]) { + s.backAnimDestination[axis] = _currPanBounds.max[axis]; + } + + if (s.backAnimDestination[axis] !== undefined) { + s.slowDownRatio[axis] = 0.7; + s.slowDownRatioReverse[axis] = 1 - s.slowDownRatio[axis]; + if (s.speedDecelerationRatioAbs[axis] < 0.05) { + s.lastFlickSpeed[axis] = 0; + s.backAnimStarted[axis] = true; + + _animateProp( + 'bounceZoomPan' + axis, + _panOffset[axis], + s.backAnimDestination[axis], + speed || 300, + framework.easing.sine.out, + function (pos) { + _panOffset[axis] = pos; + _applyCurrentZoomPan(); + }, + ); + } + } + } + }, + + // Reduces the speed by slowDownRatio (per 10ms) + calculateAnimOffset: function (axis) { + if (!s.backAnimStarted[axis]) { + s.speedDecelerationRatio[axis] = + s.speedDecelerationRatio[axis] * + (s.slowDownRatio[axis] + + s.slowDownRatioReverse[axis] - + (s.slowDownRatioReverse[axis] * s.timeDiff) / 10); + + s.speedDecelerationRatioAbs[axis] = Math.abs( + s.lastFlickSpeed[axis] * s.speedDecelerationRatio[axis], + ); + s.distanceOffset[axis] = + s.lastFlickSpeed[axis] * s.speedDecelerationRatio[axis] * s.timeDiff; + _panOffset[axis] += s.distanceOffset[axis]; + } + }, + + panAnimLoop: function () { + if (_animations.zoomPan) { + _animations.zoomPan.raf = _requestAF(s.panAnimLoop); + + s.now = _getCurrentTime(); + s.timeDiff = s.now - s.lastNow; + s.lastNow = s.now; + + s.calculateAnimOffset('x'); + s.calculateAnimOffset('y'); + + _applyCurrentZoomPan(); + + s.calculateOverBoundsAnimOffset('x'); + s.calculateOverBoundsAnimOffset('y'); + + if (s.speedDecelerationRatioAbs.x < 0.05 && s.speedDecelerationRatioAbs.y < 0.05) { + // round pan position + _panOffset.x = Math.round(_panOffset.x); + _panOffset.y = Math.round(_panOffset.y); + _applyCurrentZoomPan(); + + _stopAnimation('zoomPan'); + return; + } + } + }, + }; + return s; + }, + _completePanGesture = function (animData) { + // calculate swipe speed for Y axis (paanning) + animData.calculateSwipeSpeed('y'); + + _currPanBounds = self.currItem.bounds; + + animData.backAnimDestination = {}; + animData.backAnimStarted = {}; + + // Avoid acceleration animation if speed is too low + if ( + Math.abs(animData.lastFlickSpeed.x) <= 0.05 && + Math.abs(animData.lastFlickSpeed.y) <= 0.05 + ) { + animData.speedDecelerationRatioAbs.x = animData.speedDecelerationRatioAbs.y = 0; + + // Run pan drag release animation. E.g. if you drag image and release finger without momentum. + animData.calculateOverBoundsAnimOffset('x'); + animData.calculateOverBoundsAnimOffset('y'); + return true; + } + + // Animation loop that controls the acceleration after pan gesture ends + _registerStartAnimation('zoomPan'); + animData.lastNow = _getCurrentTime(); + animData.panAnimLoop(); + }, + _finishSwipeMainScrollGesture = function (gestureType, _releaseAnimData) { + var itemChanged; + if (!_mainScrollAnimating) { + _currZoomedItemIndex = _currentItemIndex; + } + + var itemsDiff; + + if (gestureType === 'swipe') { + var totalShiftDist = _currPoint.x - _startPoint.x, + isFastLastFlick = _releaseAnimData.lastFlickDist.x < 10; + + // if container is shifted for more than MIN_SWIPE_DISTANCE, + // and last flick gesture was in right direction + if ( + totalShiftDist > MIN_SWIPE_DISTANCE && + (isFastLastFlick || _releaseAnimData.lastFlickOffset.x > 20) + ) { + // go to prev item + itemsDiff = -1; + } else if ( + totalShiftDist < -MIN_SWIPE_DISTANCE && + (isFastLastFlick || _releaseAnimData.lastFlickOffset.x < -20) + ) { + // go to next item + itemsDiff = 1; + } + } + + var nextCircle; + + if (itemsDiff) { + _currentItemIndex += itemsDiff; + + if (_currentItemIndex < 0) { + _currentItemIndex = _options.loop ? _getNumItems() - 1 : 0; + nextCircle = true; + } else if (_currentItemIndex >= _getNumItems()) { + _currentItemIndex = _options.loop ? 0 : _getNumItems() - 1; + nextCircle = true; + } + + if (!nextCircle || _options.loop) { + _indexDiff += itemsDiff; + _currPositionIndex -= itemsDiff; + itemChanged = true; + } + } + + var animateToX = _slideSize.x * _currPositionIndex; + var animateToDist = Math.abs(animateToX - _mainScrollPos.x); + var finishAnimDuration; + + if (!itemChanged && animateToX > _mainScrollPos.x !== _releaseAnimData.lastFlickSpeed.x > 0) { + // "return to current" duration, e.g. when dragging from slide 0 to -1 + finishAnimDuration = 333; + } else { + finishAnimDuration = + Math.abs(_releaseAnimData.lastFlickSpeed.x) > 0 + ? animateToDist / Math.abs(_releaseAnimData.lastFlickSpeed.x) + : 333; + + finishAnimDuration = Math.min(finishAnimDuration, 400); + finishAnimDuration = Math.max(finishAnimDuration, 250); + } + + if (_currZoomedItemIndex === _currentItemIndex) { + itemChanged = false; + } + + _mainScrollAnimating = true; + + _shout('mainScrollAnimStart'); + + _animateProp( + 'mainScroll', + _mainScrollPos.x, + animateToX, + finishAnimDuration, + framework.easing.cubic.out, + _moveMainScroll, + function () { + _stopAllAnimations(); + _mainScrollAnimating = false; + _currZoomedItemIndex = -1; + + if (itemChanged || _currZoomedItemIndex !== _currentItemIndex) { + self.updateCurrItem(); + } + + _shout('mainScrollAnimComplete'); + }, + ); + + if (itemChanged) { + self.updateCurrItem(true); + } + + return itemChanged; + }, + _calculateZoomLevel = function (touchesDistance) { + return (1 / _startPointsDistance) * touchesDistance * _startZoomLevel; + }, + // Resets zoom if it's out of bounds + _completeZoomGesture = function () { + var destZoomLevel = _currZoomLevel, + minZoomLevel = _getMinZoomLevel(), + maxZoomLevel = _getMaxZoomLevel(); + + if (_currZoomLevel < minZoomLevel) { + destZoomLevel = minZoomLevel; + } else if (_currZoomLevel > maxZoomLevel) { + destZoomLevel = maxZoomLevel; + } + + var destOpacity = 1, + onUpdate, + initialOpacity = _bgOpacity; + + if (_opacityChanged && !_isZoomingIn && !_wasOverInitialZoom && _currZoomLevel < minZoomLevel) { + //_closedByScroll = true; + self.close(); + return true; + } + + if (_opacityChanged) { + onUpdate = function (now) { + _applyBgOpacity((destOpacity - initialOpacity) * now + initialOpacity); + }; + } + + self.zoomTo(destZoomLevel, 0, 200, framework.easing.cubic.out, onUpdate); + return true; + }; + + _registerModule('Gestures', { + publicMethods: { + initGestures: function () { + // helper function that builds touch/pointer/mouse events + var addEventNames = function (pref, down, move, up, cancel) { + _dragStartEvent = pref + down; + _dragMoveEvent = pref + move; + _dragEndEvent = pref + up; + if (cancel) { + _dragCancelEvent = pref + cancel; + } else { + _dragCancelEvent = ''; + } + }; + + _pointerEventEnabled = _features.pointerEvent; + if (_pointerEventEnabled && _features.touch) { + // we don't need touch events, if browser supports pointer events + _features.touch = false; + } + + if (_pointerEventEnabled) { + if (navigator.pointerEnabled) { + addEventNames('pointer', 'down', 'move', 'up', 'cancel'); + } else { + // IE10 pointer events are case-sensitive + addEventNames('MSPointer', 'Down', 'Move', 'Up', 'Cancel'); + } + } else if (_features.touch) { + addEventNames('touch', 'start', 'move', 'end', 'cancel'); + _likelyTouchDevice = true; + } else { + addEventNames('mouse', 'down', 'move', 'up'); + } + + _upMoveEvents = _dragMoveEvent + ' ' + _dragEndEvent + ' ' + _dragCancelEvent; + _downEvents = _dragStartEvent; + + if (_pointerEventEnabled && !_likelyTouchDevice) { + _likelyTouchDevice = navigator.maxTouchPoints > 1 || navigator.msMaxTouchPoints > 1; + } + // make variable public + self.likelyTouchDevice = _likelyTouchDevice; + + _globalEventHandlers[_dragStartEvent] = _onDragStart; + _globalEventHandlers[_dragMoveEvent] = _onDragMove; + _globalEventHandlers[_dragEndEvent] = _onDragRelease; // the Kraken + + if (_dragCancelEvent) { + _globalEventHandlers[_dragCancelEvent] = _globalEventHandlers[_dragEndEvent]; + } + + // Bind mouse events on device with detected hardware touch support, in case it supports multiple types of input. + if (_features.touch) { + _downEvents += ' mousedown'; + _upMoveEvents += ' mousemove mouseup'; + _globalEventHandlers.mousedown = _globalEventHandlers[_dragStartEvent]; + _globalEventHandlers.mousemove = _globalEventHandlers[_dragMoveEvent]; + _globalEventHandlers.mouseup = _globalEventHandlers[_dragEndEvent]; + } + + if (!_likelyTouchDevice) { + // don't allow pan to next slide from zoomed state on Desktop + _options.allowPanToNext = false; + } + }, + }, + }); + + /*>>gestures*/ + + /*>>show-hide-transition*/ + /** + * show-hide-transition.js: + * + * Manages initial opening or closing transition. + * + * If you're not planning to use transition for gallery at all, + * you may set options hideAnimationDuration and showAnimationDuration to 0, + * and just delete startAnimation function. + * + */ + + var _showOrHideTimeout, + _showOrHide = function (item, img, out, completeFn) { + if (_showOrHideTimeout) { + clearTimeout(_showOrHideTimeout); + } + + _initialZoomRunning = true; + _initialContentSet = true; + + // dimensions of small thumbnail {x:,y:,w:}. + // Height is optional, as calculated based on large image. + var thumbBounds; + if (item.initialLayout) { + thumbBounds = item.initialLayout; + item.initialLayout = null; + } else { + thumbBounds = _options.getThumbBoundsFn && _options.getThumbBoundsFn(_currentItemIndex); + } + + var duration = out ? _options.hideAnimationDuration : _options.showAnimationDuration; + + var onComplete = function () { + _stopAnimation('initialZoom'); + if (!out) { + _applyBgOpacity(1); + if (img) { + img.style.display = 'block'; + } + framework.addClass(template, 'pswp--animated-in'); + _shout('initialZoom' + (out ? 'OutEnd' : 'InEnd')); + } else { + self.template.removeAttribute('style'); + self.bg.removeAttribute('style'); + } + + if (completeFn) { + completeFn(); + } + _initialZoomRunning = false; + }; + + // if bounds aren't provided, just open gallery without animation + if (!duration || !thumbBounds || thumbBounds.x === undefined) { + _shout('initialZoom' + (out ? 'Out' : 'In')); + + _currZoomLevel = item.initialZoomLevel; + _equalizePoints(_panOffset, item.initialPosition); + _applyCurrentZoomPan(); + + template.style.opacity = out ? 0 : 1; + _applyBgOpacity(1); + + if (duration) { + setTimeout(function () { + onComplete(); + }, duration); + } else { + onComplete(); + } + + return; + } + + var startAnimation = function () { + var closeWithRaf = _closedByScroll, + fadeEverything = !self.currItem.src || self.currItem.loadError || _options.showHideOpacity; + + // apply hw-acceleration to image + if (item.miniImg) { + item.miniImg.style.webkitBackfaceVisibility = 'hidden'; + } + + if (!out) { + _currZoomLevel = thumbBounds.w / item.w; + _panOffset.x = thumbBounds.x; + _panOffset.y = thumbBounds.y - _initalWindowScrollY; + + self[fadeEverything ? 'template' : 'bg'].style.opacity = 0.001; + _applyCurrentZoomPan(); + } + + _registerStartAnimation('initialZoom'); + + if (out && !closeWithRaf) { + framework.removeClass(template, 'pswp--animated-in'); + } + + if (fadeEverything) { + if (out) { + framework[(closeWithRaf ? 'remove' : 'add') + 'Class'](template, 'pswp--animate_opacity'); + } else { + setTimeout(function () { + framework.addClass(template, 'pswp--animate_opacity'); + }, 30); + } + } + + _showOrHideTimeout = setTimeout( + function () { + _shout('initialZoom' + (out ? 'Out' : 'In')); + + if (!out) { + // "in" animation always uses CSS transitions (instead of rAF). + // CSS transition work faster here, + // as developer may also want to animate other things, + // like ui on top of sliding area, which can be animated just via CSS + + _currZoomLevel = item.initialZoomLevel; + _equalizePoints(_panOffset, item.initialPosition); + _applyCurrentZoomPan(); + _applyBgOpacity(1); + + if (fadeEverything) { + template.style.opacity = 1; + } else { + _applyBgOpacity(1); + } + + _showOrHideTimeout = setTimeout(onComplete, duration + 20); + } else { + // "out" animation uses rAF only when PhotoSwipe is closed by browser scroll, to recalculate position + var destZoomLevel = thumbBounds.w / item.w, + initialPanOffset = { + x: _panOffset.x, + y: _panOffset.y, + }, + initialZoomLevel = _currZoomLevel, + initalBgOpacity = _bgOpacity, + onUpdate = function (now) { + if (now === 1) { + _currZoomLevel = destZoomLevel; + _panOffset.x = thumbBounds.x; + _panOffset.y = thumbBounds.y - _currentWindowScrollY; + } else { + _currZoomLevel = (destZoomLevel - initialZoomLevel) * now + initialZoomLevel; + _panOffset.x = (thumbBounds.x - initialPanOffset.x) * now + initialPanOffset.x; + _panOffset.y = + (thumbBounds.y - _currentWindowScrollY - initialPanOffset.y) * now + + initialPanOffset.y; + } + + _applyCurrentZoomPan(); + if (fadeEverything) { + template.style.opacity = 1 - now; + } else { + _applyBgOpacity(initalBgOpacity - now * initalBgOpacity); + } + }; + + if (closeWithRaf) { + _animateProp( + 'initialZoom', + 0, + 1, + duration, + framework.easing.cubic.out, + onUpdate, + onComplete, + ); + } else { + onUpdate(1); + _showOrHideTimeout = setTimeout(onComplete, duration + 20); + } + } + }, + out ? 25 : 90, + ); // Main purpose of this delay is to give browser time to paint and + // create composite layers of PhotoSwipe UI parts (background, controls, caption, arrows). + // Which avoids lag at the beginning of scale transition. + }; + startAnimation(); + }; + + /*>>show-hide-transition*/ + + /*>>items-controller*/ + /** + * + * Controller manages gallery items, their dimensions, and their content. + * + */ + + var _items, + _tempPanAreaSize = {}, + _imagesToAppendPool = [], + _initialContentSet, + _initialZoomRunning, + _controllerDefaultOptions = { + index: 0, + errorMsg: + '<div class="pswp__error-msg"><a href="%url%" target="_blank">The image</a> could not be loaded.</div>', + forceProgressiveLoading: false, // TODO + preload: [1, 1], + getNumItemsFn: function () { + return _items.length; + }, + }; + + var _getItemAt, + _getNumItems, + _initialIsLoop, + _getZeroBounds = function () { + return { + center: { x: 0, y: 0 }, + max: { x: 0, y: 0 }, + min: { x: 0, y: 0 }, + }; + }, + _calculateSingleItemPanBounds = function (item, realPanElementW, realPanElementH) { + var bounds = item.bounds; + + // position of element when it's centered + bounds.center.x = Math.round((_tempPanAreaSize.x - realPanElementW) / 2); + bounds.center.y = Math.round((_tempPanAreaSize.y - realPanElementH) / 2) + item.vGap.top; + + // maximum pan position + bounds.max.x = + realPanElementW > _tempPanAreaSize.x + ? Math.round(_tempPanAreaSize.x - realPanElementW) + : bounds.center.x; + + bounds.max.y = + realPanElementH > _tempPanAreaSize.y + ? Math.round(_tempPanAreaSize.y - realPanElementH) + item.vGap.top + : bounds.center.y; + + // minimum pan position + bounds.min.x = realPanElementW > _tempPanAreaSize.x ? 0 : bounds.center.x; + bounds.min.y = realPanElementH > _tempPanAreaSize.y ? item.vGap.top : bounds.center.y; + }, + _calculateItemSize = function (item, viewportSize, zoomLevel) { + if (item.src && !item.loadError) { + var isInitial = !zoomLevel; + + if (isInitial) { + if (!item.vGap) { + item.vGap = { top: 0, bottom: 0 }; + } + // allows overriding vertical margin for individual items + _shout('parseVerticalMargin', item); + } + + _tempPanAreaSize.x = viewportSize.x; + _tempPanAreaSize.y = viewportSize.y - item.vGap.top - item.vGap.bottom; + + if (isInitial) { + var hRatio = _tempPanAreaSize.x / item.w; + var vRatio = _tempPanAreaSize.y / item.h; + + item.fitRatio = hRatio < vRatio ? hRatio : vRatio; + //item.fillRatio = hRatio > vRatio ? hRatio : vRatio; + + var scaleMode = _options.scaleMode; + + if (scaleMode === 'orig') { + zoomLevel = 1; + } else if (scaleMode === 'fit') { + zoomLevel = item.fitRatio; + } + + if (zoomLevel > 1) { + zoomLevel = 1; + } + + item.initialZoomLevel = zoomLevel; + + if (!item.bounds) { + // reuse bounds object + item.bounds = _getZeroBounds(); + } + } + + if (!zoomLevel) { + return; + } + + _calculateSingleItemPanBounds(item, item.w * zoomLevel, item.h * zoomLevel); + + if (isInitial && zoomLevel === item.initialZoomLevel) { + item.initialPosition = item.bounds.center; + } + + return item.bounds; + } else { + item.w = item.h = 0; + item.initialZoomLevel = item.fitRatio = 1; + item.bounds = _getZeroBounds(); + item.initialPosition = item.bounds.center; + + // if it's not image, we return zero bounds (content is not zoomable) + return item.bounds; + } + }, + _appendImage = function (index, item, baseDiv, img, preventAnimation, keepPlaceholder) { + if (item.loadError) { + return; + } + + if (img) { + item.imageAppended = true; + _setImageSize(item, img, item === self.currItem && _renderMaxResolution); + + baseDiv.appendChild(img); + + if (keepPlaceholder) { + setTimeout(function () { + if (item && item.loaded && item.placeholder) { + item.placeholder.style.display = 'none'; + item.placeholder = null; + } + }, 500); + } + } + }, + _preloadImage = function (item) { + item.loading = true; + item.loaded = false; + var img = (item.img = framework.createEl('pswp__img', 'img')); + var onComplete = function () { + item.loading = false; + item.loaded = true; + + if (item.loadComplete) { + item.loadComplete(item); + } else { + item.img = null; // no need to store image object + } + img.onload = img.onerror = null; + img = null; + }; + img.onload = onComplete; + img.onerror = function () { + item.loadError = true; + onComplete(); + }; + + img.src = item.src; // + '?a=' + Math.random(); + + return img; + }, + _checkForError = function (item, cleanUp) { + if (item.src && item.loadError && item.container) { + if (cleanUp) { + item.container.innerHTML = ''; + } + + item.container.innerHTML = _options.errorMsg.replace('%url%', item.src); + return true; + } + }, + _setImageSize = function (item, img, maxRes) { + if (!item.src) { + return; + } + + if (!img) { + img = item.container.lastChild; + } + + var w = maxRes ? item.w : Math.round(item.w * item.fitRatio), + h = maxRes ? item.h : Math.round(item.h * item.fitRatio); + + if (item.placeholder && !item.loaded) { + item.placeholder.style.width = w + 'px'; + item.placeholder.style.height = h + 'px'; + } + + img.style.width = w + 'px'; + img.style.height = h + 'px'; + }, + _appendImagesPool = function () { + if (_imagesToAppendPool.length) { + var poolItem; + + for (var i = 0; i < _imagesToAppendPool.length; i++) { + poolItem = _imagesToAppendPool[i]; + if (poolItem.holder.index === poolItem.index) { + _appendImage( + poolItem.index, + poolItem.item, + poolItem.baseDiv, + poolItem.img, + false, + poolItem.clearPlaceholder, + ); + } + } + _imagesToAppendPool = []; + } + }; + + _registerModule('Controller', { + publicMethods: { + lazyLoadItem: function (index) { + index = _getLoopedId(index); + var item = _getItemAt(index); + + if (!item || ((item.loaded || item.loading) && !_itemsNeedUpdate)) { + return; + } + + _shout('gettingData', index, item); + + if (!item.src) { + return; + } + + _preloadImage(item); + }, + initController: function () { + framework.extend(_options, _controllerDefaultOptions, true); + self.items = _items = items; + _getItemAt = self.getItemAt; + _getNumItems = _options.getNumItemsFn; //self.getNumItems; + + _initialIsLoop = _options.loop; + if (_getNumItems() < 3) { + _options.loop = false; // disable loop if less then 3 items + } + + _listen('beforeChange', function (diff) { + var p = _options.preload, + isNext = diff === null ? true : diff >= 0, + preloadBefore = Math.min(p[0], _getNumItems()), + preloadAfter = Math.min(p[1], _getNumItems()), + i; + + for (i = 1; i <= (isNext ? preloadAfter : preloadBefore); i++) { + self.lazyLoadItem(_currentItemIndex + i); + } + for (i = 1; i <= (isNext ? preloadBefore : preloadAfter); i++) { + self.lazyLoadItem(_currentItemIndex - i); + } + }); + + _listen('initialLayout', function () { + self.currItem.initialLayout = + _options.getThumbBoundsFn && _options.getThumbBoundsFn(_currentItemIndex); + }); + + _listen('mainScrollAnimComplete', _appendImagesPool); + _listen('initialZoomInEnd', _appendImagesPool); + + _listen('destroy', function () { + var item; + for (var i = 0; i < _items.length; i++) { + item = _items[i]; + // remove reference to DOM elements, for GC + if (item.container) { + item.container = null; + } + if (item.placeholder) { + item.placeholder = null; + } + if (item.img) { + item.img = null; + } + if (item.preloader) { + item.preloader = null; + } + if (item.loadError) { + item.loaded = item.loadError = false; + } + } + _imagesToAppendPool = null; + }); + }, + + getItemAt: function (index) { + if (index >= 0) { + return _items[index] !== undefined ? _items[index] : false; + } + return false; + }, + + allowProgressiveImg: function () { + // 1. Progressive image loading isn't working on webkit/blink + // when hw-acceleration (e.g. translateZ) is applied to IMG element. + // That's why in PhotoSwipe parent element gets zoom transform, not image itself. + // + // 2. Progressive image loading sometimes blinks in webkit/blink when applying animation to parent element. + // That's why it's disabled on touch devices (mainly because of swipe transition) + // + // 3. Progressive image loading sometimes doesn't work in IE (up to 11). + + // Don't allow progressive loading on non-large touch devices + return ( + _options.forceProgressiveLoading || + !_likelyTouchDevice || + _options.mouseUsed || + screen.width > 1200 + ); + // 1200 - to eliminate touch devices with large screen (like Chromebook Pixel) + }, + + setContent: function (holder, index) { + if (_options.loop) { + index = _getLoopedId(index); + } + + var prevItem = self.getItemAt(holder.index); + if (prevItem) { + prevItem.container = null; + } + + var item = self.getItemAt(index), + img; + + if (!item) { + holder.el.innerHTML = ''; + return; + } + + // allow to override data + _shout('gettingData', index, item); + + holder.index = index; + holder.item = item; + + // base container DIV is created only once for each of 3 holders + var baseDiv = (item.container = framework.createEl('pswp__zoom-wrap')); + + if (!item.src && item.html) { + if (item.html.tagName) { + baseDiv.appendChild(item.html); + } else { + baseDiv.innerHTML = item.html; + } + } + + _checkForError(item); + + _calculateItemSize(item, _viewportSize); + + if (item.src && !item.loadError && !item.loaded) { + item.loadComplete = function (item) { + // gallery closed before image finished loading + if (!_isOpen) { + return; + } + + // check if holder hasn't changed while image was loading + if (holder && holder.index === index) { + if (_checkForError(item, true)) { + item.loadComplete = item.img = null; + _calculateItemSize(item, _viewportSize); + _applyZoomPanToItem(item); + + if (holder.index === _currentItemIndex) { + // recalculate dimensions + self.updateCurrZoomItem(); + } + return; + } + if (!item.imageAppended) { + if (_features.transform && (_mainScrollAnimating || _initialZoomRunning)) { + _imagesToAppendPool.push({ + item: item, + baseDiv: baseDiv, + img: item.img, + index: index, + holder: holder, + clearPlaceholder: true, + }); + } else { + _appendImage( + index, + item, + baseDiv, + item.img, + _mainScrollAnimating || _initialZoomRunning, + true, + ); + } + } else { + // remove preloader & mini-img + if (!_initialZoomRunning && item.placeholder) { + item.placeholder.style.display = 'none'; + item.placeholder = null; + } + } + } + + item.loadComplete = null; + item.img = null; // no need to store image element after it's added + + _shout('imageLoadComplete', index, item); + }; + + if (framework.features.transform) { + var placeholderClassName = 'pswp__img pswp__img--placeholder'; + placeholderClassName += item.msrc ? '' : ' pswp__img--placeholder--blank'; + + var placeholder = framework.createEl(placeholderClassName, item.msrc ? 'img' : ''); + if (item.msrc) { + placeholder.src = item.msrc; + } + + _setImageSize(item, placeholder); + + baseDiv.appendChild(placeholder); + item.placeholder = placeholder; + } + + if (!item.loading) { + _preloadImage(item); + } + + if (self.allowProgressiveImg()) { + // just append image + if (!_initialContentSet && _features.transform) { + _imagesToAppendPool.push({ + item: item, + baseDiv: baseDiv, + img: item.img, + index: index, + holder: holder, + }); + } else { + _appendImage(index, item, baseDiv, item.img, true, true); + } + } + } else if (item.src && !item.loadError) { + // image object is created every time, due to bugs of image loading & delay when switching images + img = framework.createEl('pswp__img', 'img'); + img.style.opacity = 1; + img.src = item.src; + _setImageSize(item, img); + _appendImage(index, item, baseDiv, img, true); + } + + if (!_initialContentSet && index === _currentItemIndex) { + _currZoomElementStyle = baseDiv.style; + _showOrHide(item, img || item.img); + } else { + _applyZoomPanToItem(item); + } + + holder.el.innerHTML = ''; + holder.el.appendChild(baseDiv); + }, + + cleanSlide: function (item) { + if (item.img) { + item.img.onload = item.img.onerror = null; + } + item.loaded = item.loading = item.img = item.imageAppended = false; + }, + }, + }); + + /*>>items-controller*/ + + /*>>tap*/ + /** + * tap.js: + * + * Displatches tap and double-tap events. + * + */ + + var tapTimer, + tapReleasePoint = {}, + _dispatchTapEvent = function (origEvent, releasePoint, pointerType) { + var e = document.createEvent('CustomEvent'), + eDetail = { + origEvent: origEvent, + target: origEvent.target, + releasePoint: releasePoint, + pointerType: pointerType || 'touch', + }; + + e.initCustomEvent('pswpTap', true, true, eDetail); + origEvent.target.dispatchEvent(e); + }; + + _registerModule('Tap', { + publicMethods: { + initTap: function () { + _listen('firstTouchStart', self.onTapStart); + _listen('touchRelease', self.onTapRelease); + _listen('destroy', function () { + tapReleasePoint = {}; + tapTimer = null; + }); + }, + onTapStart: function (touchList) { + if (touchList.length > 1) { + clearTimeout(tapTimer); + tapTimer = null; + } + }, + onTapRelease: function (e, releasePoint) { + if (!releasePoint) { + return; + } + + if (!_moved && !_isMultitouch && !_numAnimations) { + var p0 = releasePoint; + if (tapTimer) { + clearTimeout(tapTimer); + tapTimer = null; + + // Check if taped on the same place + if (_isNearbyPoints(p0, tapReleasePoint)) { + _shout('doubleTap', p0); + return; + } + } + + if (releasePoint.type === 'mouse') { + _dispatchTapEvent(e, releasePoint, 'mouse'); + return; + } + + var clickedTagName = e.target.tagName.toUpperCase(); + // avoid double tap delay on buttons and elements that have class pswp__single-tap + if (clickedTagName === 'BUTTON' || framework.hasClass(e.target, 'pswp__single-tap')) { + _dispatchTapEvent(e, releasePoint); + return; + } + + _equalizePoints(tapReleasePoint, p0); + + tapTimer = setTimeout(function () { + _dispatchTapEvent(e, releasePoint); + tapTimer = null; + }, 300); + } + }, + }, + }); + + /*>>tap*/ + + /*>>desktop-zoom*/ + /** + * + * desktop-zoom.js: + * + * - Binds mousewheel event for paning zoomed image. + * - Manages "dragging", "zoomed-in", "zoom-out" classes. + * (which are used for cursors and zoom icon) + * - Adds toggleDesktopZoom function. + * + */ + + var _wheelDelta; + + _registerModule('DesktopZoom', { + publicMethods: { + initDesktopZoom: function () { + if (_oldIE) { + // no zoom for old IE (<=8) + return; + } + + if (_likelyTouchDevice) { + // if detected hardware touch support, we wait until mouse is used, + // and only then apply desktop-zoom features + _listen('mouseUsed', function () { + self.setupDesktopZoom(); + }); + } else { + self.setupDesktopZoom(true); + } + }, + + setupDesktopZoom: function (onInit) { + _wheelDelta = {}; + + var events = 'wheel mousewheel DOMMouseScroll'; + + _listen('bindEvents', function () { + framework.bind(template, events, self.handleMouseWheel); + }); + + _listen('unbindEvents', function () { + if (_wheelDelta) { + framework.unbind(template, events, self.handleMouseWheel); + } + }); + + self.mouseZoomedIn = false; + + var hasDraggingClass, + updateZoomable = function () { + if (self.mouseZoomedIn) { + framework.removeClass(template, 'pswp--zoomed-in'); + self.mouseZoomedIn = false; + } + if (_currZoomLevel < 1) { + framework.addClass(template, 'pswp--zoom-allowed'); + } else { + framework.removeClass(template, 'pswp--zoom-allowed'); + } + removeDraggingClass(); + }, + removeDraggingClass = function () { + if (hasDraggingClass) { + framework.removeClass(template, 'pswp--dragging'); + hasDraggingClass = false; + } + }; + + _listen('resize', updateZoomable); + _listen('afterChange', updateZoomable); + _listen('pointerDown', function () { + if (self.mouseZoomedIn) { + hasDraggingClass = true; + framework.addClass(template, 'pswp--dragging'); + } + }); + _listen('pointerUp', removeDraggingClass); + + if (!onInit) { + updateZoomable(); + } + }, + + handleMouseWheel: function (e) { + if (_currZoomLevel <= self.currItem.fitRatio) { + if (_options.modal) { + if (!_options.closeOnScroll || _numAnimations || _isDragging) { + e.preventDefault(); + } else if (_transformKey && Math.abs(e.deltaY) > 2) { + // close PhotoSwipe + // if browser supports transforms & scroll changed enough + _closedByScroll = true; + self.close(); + } + } + return true; + } + + // allow just one event to fire + e.stopPropagation(); + + // https://developer.mozilla.org/en-US/docs/Web/Events/wheel + _wheelDelta.x = 0; + + if ('deltaX' in e) { + if (e.deltaMode === 1 /* DOM_DELTA_LINE */) { + // 18 - average line height + _wheelDelta.x = e.deltaX * 18; + _wheelDelta.y = e.deltaY * 18; + } else { + _wheelDelta.x = e.deltaX; + _wheelDelta.y = e.deltaY; + } + } else if ('wheelDelta' in e) { + if (e.wheelDeltaX) { + _wheelDelta.x = -0.16 * e.wheelDeltaX; + } + if (e.wheelDeltaY) { + _wheelDelta.y = -0.16 * e.wheelDeltaY; + } else { + _wheelDelta.y = -0.16 * e.wheelDelta; + } + } else if ('detail' in e) { + _wheelDelta.y = e.detail; + } else { + return; + } + + _calculatePanBounds(_currZoomLevel, true); + + var newPanX = _panOffset.x - _wheelDelta.x, + newPanY = _panOffset.y - _wheelDelta.y; + + // only prevent scrolling in nonmodal mode when not at edges + if ( + _options.modal || + (newPanX <= _currPanBounds.min.x && + newPanX >= _currPanBounds.max.x && + newPanY <= _currPanBounds.min.y && + newPanY >= _currPanBounds.max.y) + ) { + e.preventDefault(); + } + + // TODO: use rAF instead of mousewheel? + self.panTo(newPanX, newPanY); + }, + + toggleDesktopZoom: function (centerPoint) { + centerPoint = centerPoint || { + x: _viewportSize.x / 2 + _offset.x, + y: _viewportSize.y / 2 + _offset.y, + }; + + var doubleTapZoomLevel = _options.getDoubleTapZoom(true, self.currItem); + var zoomOut = _currZoomLevel === doubleTapZoomLevel; + + self.mouseZoomedIn = !zoomOut; + + self.zoomTo(zoomOut ? self.currItem.initialZoomLevel : doubleTapZoomLevel, centerPoint, 333); + framework[(!zoomOut ? 'add' : 'remove') + 'Class'](template, 'pswp--zoomed-in'); + }, + }, + }); + + /*>>desktop-zoom*/ + + /*>>history*/ + /** + * + * history.js: + * + * - Back button to close gallery. + * + * - Unique URL for each slide: example.com/&pid=1&gid=3 + * (where PID is picture index, and GID and gallery index) + * + * - Switch URL when slides change. + * + */ + + var _historyDefaultOptions = { + history: true, + galleryUID: 1, + }; + + var _historyUpdateTimeout, + _hashChangeTimeout, + _hashAnimCheckTimeout, + _hashChangedByScript, + _hashChangedByHistory, + _hashReseted, + _initialHash, + _historyChanged, + _closedFromURL, + _urlChangedOnce, + _windowLoc, + _supportsPushState, + _getHash = function () { + return _windowLoc.hash.substring(1); + }, + _cleanHistoryTimeouts = function () { + if (_historyUpdateTimeout) { + clearTimeout(_historyUpdateTimeout); + } + + if (_hashAnimCheckTimeout) { + clearTimeout(_hashAnimCheckTimeout); + } + }, + // pid - Picture index + // gid - Gallery index + _parseItemIndexFromURL = function () { + var hash = _getHash(), + params = {}; + + if (hash.length < 5) { + // pid=1 + return params; + } + + var i, + vars = hash.split('&'); + for (i = 0; i < vars.length; i++) { + if (!vars[i]) { + continue; + } + var pair = vars[i].split('='); + if (pair.length < 2) { + continue; + } + params[pair[0]] = pair[1]; + } + if (_options.galleryPIDs) { + // detect custom pid in hash and search for it among the items collection + var searchfor = params.pid; + params.pid = 0; // if custom pid cannot be found, fallback to the first item + for (i = 0; i < _items.length; i++) { + if (_items[i].pid === searchfor) { + params.pid = i; + break; + } + } + } else { + params.pid = parseInt(params.pid, 10) - 1; + } + if (params.pid < 0) { + params.pid = 0; + } + return params; + }, + _updateHash = function () { + if (_hashAnimCheckTimeout) { + clearTimeout(_hashAnimCheckTimeout); + } + + if (_numAnimations || _isDragging) { + // changing browser URL forces layout/paint in some browsers, which causes noticable lag during animation + // that's why we update hash only when no animations running + _hashAnimCheckTimeout = setTimeout(_updateHash, 500); + return; + } + + if (_hashChangedByScript) { + clearTimeout(_hashChangeTimeout); + } else { + _hashChangedByScript = true; + } + + var pid = _currentItemIndex + 1; + var item = _getItemAt(_currentItemIndex); + if (item.hasOwnProperty('pid')) { + // carry forward any custom pid assigned to the item + pid = item.pid; + } + var newHash = _initialHash + '&' + 'gid=' + _options.galleryUID + '&' + 'pid=' + pid; + + if (!_historyChanged) { + if (_windowLoc.hash.indexOf(newHash) === -1) { + _urlChangedOnce = true; + } + // first time - add new hisory record, then just replace + } + + var newURL = _windowLoc.href.split('#')[0] + '#' + newHash; + + if (_supportsPushState) { + if ('#' + newHash !== window.location.hash) { + history[_historyChanged ? 'replaceState' : 'pushState']('', document.title, newURL); + } + } else { + if (_historyChanged) { + _windowLoc.replace(newURL); + } else { + _windowLoc.hash = newHash; + } + } + + _historyChanged = true; + _hashChangeTimeout = setTimeout(function () { + _hashChangedByScript = false; + }, 60); + }; + + _registerModule('History', { + publicMethods: { + initHistory: function () { + framework.extend(_options, _historyDefaultOptions, true); + + if (!_options.history) { + return; + } + + _windowLoc = window.location; + _urlChangedOnce = false; + _closedFromURL = false; + _historyChanged = false; + _initialHash = _getHash(); + _supportsPushState = 'pushState' in history; + + if (_initialHash.indexOf('gid=') > -1) { + _initialHash = _initialHash.split('&gid=')[0]; + _initialHash = _initialHash.split('?gid=')[0]; + } + + _listen('afterChange', self.updateURL); + _listen('unbindEvents', function () { + framework.unbind(window, 'hashchange', self.onHashChange); + }); + + var returnToOriginal = function () { + _hashReseted = true; + if (!_closedFromURL) { + if (_urlChangedOnce) { + history.back(); + } else { + if (_initialHash) { + _windowLoc.hash = _initialHash; + } else { + if (_supportsPushState) { + // remove hash from url without refreshing it or scrolling to top + history.pushState('', document.title, _windowLoc.pathname + _windowLoc.search); + } else { + _windowLoc.hash = ''; + } + } + } + } + + _cleanHistoryTimeouts(); + }; + + _listen('unbindEvents', function () { + if (_closedByScroll) { + // if PhotoSwipe is closed by scroll, we go "back" before the closing animation starts + // this is done to keep the scroll position + returnToOriginal(); + } + }); + _listen('destroy', function () { + if (!_hashReseted) { + returnToOriginal(); + } + }); + _listen('firstUpdate', function () { + _currentItemIndex = _parseItemIndexFromURL().pid; + }); + + var index = _initialHash.indexOf('pid='); + if (index > -1) { + _initialHash = _initialHash.substring(0, index); + if (_initialHash.slice(-1) === '&') { + _initialHash = _initialHash.slice(0, -1); + } + } + + setTimeout(function () { + if (_isOpen) { + // hasn't destroyed yet + framework.bind(window, 'hashchange', self.onHashChange); + } + }, 40); + }, + onHashChange: function () { + if (_getHash() === _initialHash) { + _closedFromURL = true; + self.close(); + return; + } + if (!_hashChangedByScript) { + _hashChangedByHistory = true; + self.goTo(_parseItemIndexFromURL().pid); + _hashChangedByHistory = false; + } + }, + updateURL: function () { + // Delay the update of URL, to avoid lag during transition, + // and to not to trigger actions like "refresh page sound" or "blinking favicon" to often + + _cleanHistoryTimeouts(); + + if (_hashChangedByHistory) { + return; + } + + if (!_historyChanged) { + _updateHash(); // first time + } else { + _historyUpdateTimeout = setTimeout(_updateHash, 800); + } + }, + }, + }); + + /*>>history*/ + framework.extend(self, publicMethods); + }; + return PhotoSwipe; + }); + + /***/ + }, + /* 744 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + module.exports = function pluralize(i, str0, str1, str2, str3) { + if (!i) return parse(str0, i); + switch (plural(i)) { + case 0: + return parse(str1, i); + case 1: + return parse(str2, i); + default: + return parse(str3, i); + } + }; + + function parse(str) { + var args = [].slice.call(arguments, 1); + var i = 0; + + return str.replace(/%d/g, function () { + return args[i++]; + }); + } + + function plural(a) { + if (a % 10 === 1 && a % 100 !== 11) { + return 0; + } else if (a % 10 >= 2 && a % 10 <= 4 && (a % 100 < 10 || a % 100 >= 20)) { + return 1; + } else { + return 2; + } + } + + /***/ + }, + /* 745 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + + var invariant = __webpack_require__(3); + var warning = __webpack_require__(4); + + var ReactPropTypesSecret = __webpack_require__(311); + + var loggedTypeFailures = {}; + + /** + * Assert that the values match with the type specs. + * Error messages are memorized and will only be shown once. + * + * @param {object} typeSpecs Map of name to a ReactPropType + * @param {object} values Runtime values that need to be type-checked + * @param {string} location e.g. "prop", "context", "child context" + * @param {string} componentName Name of the component for error messages. + * @param {?Function} getStack Returns the component stack. + * @private + */ + function checkPropTypes(typeSpecs, values, location, componentName, getStack) { + if (true) { + for (var typeSpecName in typeSpecs) { + if (typeSpecs.hasOwnProperty(typeSpecName)) { + var error; + // Prop type validation may throw. In case they do, we don't want to + // fail the render phase where it didn't fail before. So we log it. + // After these have been cleaned up, we'll let them throw. + try { + // This is intentionally an invariant that gets caught. It's the same + // behavior as without this statement except with a better message. + invariant( + typeof typeSpecs[typeSpecName] === 'function', + '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', + componentName || 'React class', + location, + typeSpecName, + ); + error = typeSpecs[typeSpecName]( + values, + typeSpecName, + componentName, + location, + null, + ReactPropTypesSecret, + ); + } catch (ex) { + error = ex; + } + true + ? warning( + !error || error instanceof Error, + '%s: type specification of %s `%s` is invalid; the type checker ' + + 'function must return `null` or an `Error` but returned a %s. ' + + 'You may have forgotten to pass an argument to the type checker ' + + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + + 'shape all require an argument).', + componentName || 'React class', + location, + typeSpecName, + typeof error, + ) + : void 0; + if (error instanceof Error && !(error.message in loggedTypeFailures)) { + // Only monitor this failure once because there tends to be a lot of the + // same error. + loggedTypeFailures[error.message] = true; + + var stack = getStack ? getStack() : ''; + + true + ? warning( + false, + 'Failed %s type: %s%s', + location, + error.message, + stack != null ? stack : '', + ) + : void 0; + } + } + } + } + } + + module.exports = checkPropTypes; + + /***/ + }, + /* 746 */ + /***/ function (module, exports, __webpack_require__) { + var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; // randomColor by David Merfield under the CC0 license + // https://github.com/davidmerfield/randomColor/ + + (function (root, factory) { + // Support AMD + if (true) { + !((__WEBPACK_AMD_DEFINE_ARRAY__ = []), + (__WEBPACK_AMD_DEFINE_FACTORY__ = factory), + (__WEBPACK_AMD_DEFINE_RESULT__ = + typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' + ? __WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__) + : __WEBPACK_AMD_DEFINE_FACTORY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + + // Support CommonJS + } else if (typeof exports === 'object') { + var randomColor = factory(); + + // Support NodeJS & Component, which allow module.exports to be a function + if (typeof module === 'object' && module && module.exports) { + exports = module.exports = randomColor; + } + + // Support CommonJS 1.1.1 spec + exports.randomColor = randomColor; + + // Support vanilla script loading + } else { + root.randomColor = factory(); + } + })(this, function () { + // Seed to get repeatable colors + var seed = null; + + // Shared color dictionary + var colorDictionary = {}; + + // Populate the color dictionary + loadColorBounds(); + + var randomColor = function (options) { + options = options || {}; + + // Check if there is a seed and ensure it's an + // integer. Otherwise, reset the seed value. + if (options.seed && options.seed === parseInt(options.seed, 10)) { + seed = options.seed; + + // A string was passed as a seed + } else if (typeof options.seed === 'string') { + seed = stringToInteger(options.seed); + + // Something was passed as a seed but it wasn't an integer or string + } else if (options.seed !== undefined && options.seed !== null) { + throw new TypeError('The seed value must be an integer or string'); + + // No seed, reset the value outside. + } else { + seed = null; + } + + var H, S, B; + + // Check if we need to generate multiple colors + if (options.count !== null && options.count !== undefined) { + var totalColors = options.count, + colors = []; + + options.count = null; + + while (totalColors > colors.length) { + // Since we're generating multiple colors, + // incremement the seed. Otherwise we'd just + // generate the same color each time... + if (seed && options.seed) options.seed += 1; + + colors.push(randomColor(options)); + } + + options.count = totalColors; + + return colors; + } + + // First we pick a hue (H) + H = pickHue(options); + + // Then use H to determine saturation (S) + S = pickSaturation(H, options); + + // Then use S and H to determine brightness (B). + B = pickBrightness(H, S, options); + + // Then we return the HSB color in the desired format + return setFormat([H, S, B], options); + }; + + function pickHue(options) { + var hueRange = getHueRange(options.hue), + hue = randomWithin(hueRange); + + // Instead of storing red as two seperate ranges, + // we group them, using negative numbers + if (hue < 0) { + hue = 360 + hue; + } + + return hue; + } + + function pickSaturation(hue, options) { + if (options.luminosity === 'random') { + return randomWithin([0, 100]); + } + + if (options.hue === 'monochrome') { + return 0; + } + + var saturationRange = getSaturationRange(hue); + + var sMin = saturationRange[0], + sMax = saturationRange[1]; + + switch (options.luminosity) { + case 'bright': + sMin = 55; + break; + + case 'dark': + sMin = sMax - 10; + break; + + case 'light': + sMax = 55; + break; + } + + return randomWithin([sMin, sMax]); + } + + function pickBrightness(H, S, options) { + var bMin = getMinimumBrightness(H, S), + bMax = 100; + + switch (options.luminosity) { + case 'dark': + bMax = bMin + 20; + break; + + case 'light': + bMin = (bMax + bMin) / 2; + break; + + case 'random': + bMin = 0; + bMax = 100; + break; + } + + return randomWithin([bMin, bMax]); + } + + function setFormat(hsv, options) { + switch (options.format) { + case 'hsvArray': + return hsv; + + case 'hslArray': + return HSVtoHSL(hsv); + + case 'hsl': + var hsl = HSVtoHSL(hsv); + return 'hsl(' + hsl[0] + ', ' + hsl[1] + '%, ' + hsl[2] + '%)'; + + case 'hsla': + var hslColor = HSVtoHSL(hsv); + return ( + 'hsla(' + hslColor[0] + ', ' + hslColor[1] + '%, ' + hslColor[2] + '%, ' + Math.random() + ')' + ); + + case 'rgbArray': + return HSVtoRGB(hsv); + + case 'rgb': + var rgb = HSVtoRGB(hsv); + return 'rgb(' + rgb.join(', ') + ')'; + + case 'rgba': + var rgbColor = HSVtoRGB(hsv); + return 'rgba(' + rgbColor.join(', ') + ', ' + Math.random() + ')'; + + default: + return HSVtoHex(hsv); + } + } + + function getMinimumBrightness(H, S) { + var lowerBounds = getColorInfo(H).lowerBounds; + + for (var i = 0; i < lowerBounds.length - 1; i++) { + var s1 = lowerBounds[i][0], + v1 = lowerBounds[i][1]; + + var s2 = lowerBounds[i + 1][0], + v2 = lowerBounds[i + 1][1]; + + if (S >= s1 && S <= s2) { + var m = (v2 - v1) / (s2 - s1), + b = v1 - m * s1; + + return m * S + b; + } + } + + return 0; + } + + function getHueRange(colorInput) { + if (typeof parseInt(colorInput) === 'number') { + var number = parseInt(colorInput); + + if (number < 360 && number > 0) { + return [number, number]; + } + } + + if (typeof colorInput === 'string') { + if (colorDictionary[colorInput]) { + var color = colorDictionary[colorInput]; + if (color.hueRange) { + return color.hueRange; + } + } + } + + return [0, 360]; + } + + function getSaturationRange(hue) { + return getColorInfo(hue).saturationRange; + } + + function getColorInfo(hue) { + // Maps red colors to make picking hue easier + if (hue >= 334 && hue <= 360) { + hue -= 360; + } + + for (var colorName in colorDictionary) { + var color = colorDictionary[colorName]; + if (color.hueRange && hue >= color.hueRange[0] && hue <= color.hueRange[1]) { + return colorDictionary[colorName]; + } + } + return 'Color not found'; + } + + function randomWithin(range) { + if (seed === null) { + return Math.floor(range[0] + Math.random() * (range[1] + 1 - range[0])); + } else { + //Seeded random algorithm from http://indiegamr.com/generate-repeatable-random-numbers-in-js/ + var max = range[1] || 1; + var min = range[0] || 0; + seed = (seed * 9301 + 49297) % 233280; + var rnd = seed / 233280.0; + return Math.floor(min + rnd * (max - min)); + } + } + + function HSVtoHex(hsv) { + var rgb = HSVtoRGB(hsv); + + function componentToHex(c) { + var hex = c.toString(16); + return hex.length == 1 ? '0' + hex : hex; + } + + var hex = '#' + componentToHex(rgb[0]) + componentToHex(rgb[1]) + componentToHex(rgb[2]); + + return hex; + } + + function defineColor(name, hueRange, lowerBounds) { + var sMin = lowerBounds[0][0], + sMax = lowerBounds[lowerBounds.length - 1][0], + bMin = lowerBounds[lowerBounds.length - 1][1], + bMax = lowerBounds[0][1]; + + colorDictionary[name] = { + hueRange: hueRange, + lowerBounds: lowerBounds, + saturationRange: [sMin, sMax], + brightnessRange: [bMin, bMax], + }; + } + + function loadColorBounds() { + defineColor('monochrome', null, [ + [0, 0], + [100, 0], + ]); + + defineColor( + 'red', + [-26, 18], + [ + [20, 100], + [30, 92], + [40, 89], + [50, 85], + [60, 78], + [70, 70], + [80, 60], + [90, 55], + [100, 50], + ], + ); + + defineColor( + 'orange', + [19, 46], + [ + [20, 100], + [30, 93], + [40, 88], + [50, 86], + [60, 85], + [70, 70], + [100, 70], + ], + ); + + defineColor( + 'yellow', + [47, 62], + [ + [25, 100], + [40, 94], + [50, 89], + [60, 86], + [70, 84], + [80, 82], + [90, 80], + [100, 75], + ], + ); + + defineColor( + 'green', + [63, 178], + [ + [30, 100], + [40, 90], + [50, 85], + [60, 81], + [70, 74], + [80, 64], + [90, 50], + [100, 40], + ], + ); + + defineColor( + 'blue', + [179, 257], + [ + [20, 100], + [30, 86], + [40, 80], + [50, 74], + [60, 60], + [70, 52], + [80, 44], + [90, 39], + [100, 35], + ], + ); + + defineColor( + 'purple', + [258, 282], + [ + [20, 100], + [30, 87], + [40, 79], + [50, 70], + [60, 65], + [70, 59], + [80, 52], + [90, 45], + [100, 42], + ], + ); + + defineColor( + 'pink', + [283, 334], + [ + [20, 100], + [30, 90], + [40, 86], + [60, 84], + [80, 80], + [90, 75], + [100, 73], + ], + ); + } + + function HSVtoRGB(hsv) { + // this doesn't work for the values of 0 and 360 + // here's the hacky fix + var h = hsv[0]; + if (h === 0) { + h = 1; + } + if (h === 360) { + h = 359; + } + + // Rebase the h,s,v values + h = h / 360; + var s = hsv[1] / 100, + v = hsv[2] / 100; + + var h_i = Math.floor(h * 6), + f = h * 6 - h_i, + p = v * (1 - s), + q = v * (1 - f * s), + t = v * (1 - (1 - f) * s), + r = 256, + g = 256, + b = 256; + + switch (h_i) { + case 0: + r = v; + g = t; + b = p; + break; + case 1: + r = q; + g = v; + b = p; + break; + case 2: + r = p; + g = v; + b = t; + break; + case 3: + r = p; + g = q; + b = v; + break; + case 4: + r = t; + g = p; + b = v; + break; + case 5: + r = v; + g = p; + b = q; + break; + } + + var result = [Math.floor(r * 255), Math.floor(g * 255), Math.floor(b * 255)]; + return result; + } + + function HSVtoHSL(hsv) { + var h = hsv[0], + s = hsv[1] / 100, + v = hsv[2] / 100, + k = (2 - s) * v; + + return [h, Math.round(((s * v) / (k < 1 ? k : 2 - k)) * 10000) / 100, (k / 2) * 100]; + } + + function stringToInteger(string) { + var total = 0; + for (var i = 0; i !== string.length; i++) { + if (total >= Number.MAX_SAFE_INTEGER) break; + total += string.charCodeAt(i); + } + return total; + } + + return randomColor; + }); + + /***/ + }, + /* 747 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = __webpack_require__(867); + + /***/ + }, + /* 748 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var ARIADOMPropertyConfig = { + Properties: { + // Global States and Properties + 'aria-current': 0, // state + 'aria-details': 0, + 'aria-disabled': 0, // state + 'aria-hidden': 0, // state + 'aria-invalid': 0, // state + 'aria-keyshortcuts': 0, + 'aria-label': 0, + 'aria-roledescription': 0, + // Widget Attributes + 'aria-autocomplete': 0, + 'aria-checked': 0, + 'aria-expanded': 0, + 'aria-haspopup': 0, + 'aria-level': 0, + 'aria-modal': 0, + 'aria-multiline': 0, + 'aria-multiselectable': 0, + 'aria-orientation': 0, + 'aria-placeholder': 0, + 'aria-pressed': 0, + 'aria-readonly': 0, + 'aria-required': 0, + 'aria-selected': 0, + 'aria-sort': 0, + 'aria-valuemax': 0, + 'aria-valuemin': 0, + 'aria-valuenow': 0, + 'aria-valuetext': 0, + // Live Region Attributes + 'aria-atomic': 0, + 'aria-busy': 0, + 'aria-live': 0, + 'aria-relevant': 0, + // Drag-and-Drop Attributes + 'aria-dropeffect': 0, + 'aria-grabbed': 0, + // Relationship Attributes + 'aria-activedescendant': 0, + 'aria-colcount': 0, + 'aria-colindex': 0, + 'aria-colspan': 0, + 'aria-controls': 0, + 'aria-describedby': 0, + 'aria-errormessage': 0, + 'aria-flowto': 0, + 'aria-labelledby': 0, + 'aria-owns': 0, + 'aria-posinset': 0, + 'aria-rowcount': 0, + 'aria-rowindex': 0, + 'aria-rowspan': 0, + 'aria-setsize': 0, + }, + DOMAttributeNames: {}, + DOMPropertyNames: {}, + }; + + module.exports = ARIADOMPropertyConfig; + + /***/ + }, + /* 749 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var ReactDOMComponentTree = __webpack_require__(16); + + var focusNode = __webpack_require__(302); + + var AutoFocusUtils = { + focusDOMComponent: function () { + focusNode(ReactDOMComponentTree.getNodeFromInstance(this)); + }, + }; + + module.exports = AutoFocusUtils; + + /***/ + }, + /* 750 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var EventPropagators = __webpack_require__(104); + var ExecutionEnvironment = __webpack_require__(17); + var FallbackCompositionState = __webpack_require__(757); + var SyntheticCompositionEvent = __webpack_require__(796); + var SyntheticInputEvent = __webpack_require__(799); + + var END_KEYCODES = [9, 13, 27, 32]; // Tab, Return, Esc, Space + var START_KEYCODE = 229; + + var canUseCompositionEvent = ExecutionEnvironment.canUseDOM && 'CompositionEvent' in window; + + var documentMode = null; + if (ExecutionEnvironment.canUseDOM && 'documentMode' in document) { + documentMode = document.documentMode; + } + + // Webkit offers a very useful `textInput` event that can be used to + // directly represent `beforeInput`. The IE `textinput` event is not as + // useful, so we don't use it. + var canUseTextInputEvent = + ExecutionEnvironment.canUseDOM && 'TextEvent' in window && !documentMode && !isPresto(); + + // In IE9+, we have access to composition events, but the data supplied + // by the native compositionend event may be incorrect. Japanese ideographic + // spaces, for instance (\u3000) are not recorded correctly. + var useFallbackCompositionData = + ExecutionEnvironment.canUseDOM && + (!canUseCompositionEvent || (documentMode && documentMode > 8 && documentMode <= 11)); + + /** + * Opera <= 12 includes TextEvent in window, but does not fire + * text input events. Rely on keypress instead. + */ + function isPresto() { + var opera = window.opera; + return ( + typeof opera === 'object' && + typeof opera.version === 'function' && + parseInt(opera.version(), 10) <= 12 + ); + } + + var SPACEBAR_CODE = 32; + var SPACEBAR_CHAR = String.fromCharCode(SPACEBAR_CODE); + + // Events and their corresponding property names. + var eventTypes = { + beforeInput: { + phasedRegistrationNames: { + bubbled: 'onBeforeInput', + captured: 'onBeforeInputCapture', + }, + dependencies: ['topCompositionEnd', 'topKeyPress', 'topTextInput', 'topPaste'], + }, + compositionEnd: { + phasedRegistrationNames: { + bubbled: 'onCompositionEnd', + captured: 'onCompositionEndCapture', + }, + dependencies: [ + 'topBlur', + 'topCompositionEnd', + 'topKeyDown', + 'topKeyPress', + 'topKeyUp', + 'topMouseDown', + ], + }, + compositionStart: { + phasedRegistrationNames: { + bubbled: 'onCompositionStart', + captured: 'onCompositionStartCapture', + }, + dependencies: [ + 'topBlur', + 'topCompositionStart', + 'topKeyDown', + 'topKeyPress', + 'topKeyUp', + 'topMouseDown', + ], + }, + compositionUpdate: { + phasedRegistrationNames: { + bubbled: 'onCompositionUpdate', + captured: 'onCompositionUpdateCapture', + }, + dependencies: [ + 'topBlur', + 'topCompositionUpdate', + 'topKeyDown', + 'topKeyPress', + 'topKeyUp', + 'topMouseDown', + ], + }, + }; + + // Track whether we've ever handled a keypress on the space key. + var hasSpaceKeypress = false; + + /** + * Return whether a native keypress event is assumed to be a command. + * This is required because Firefox fires `keypress` events for key commands + * (cut, copy, select-all, etc.) even though no character is inserted. + */ + function isKeypressCommand(nativeEvent) { + return ( + (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) && + // ctrlKey && altKey is equivalent to AltGr, and is not a command. + !(nativeEvent.ctrlKey && nativeEvent.altKey) + ); + } + + /** + * Translate native top level events into event types. + * + * @param {string} topLevelType + * @return {object} + */ + function getCompositionEventType(topLevelType) { + switch (topLevelType) { + case 'topCompositionStart': + return eventTypes.compositionStart; + case 'topCompositionEnd': + return eventTypes.compositionEnd; + case 'topCompositionUpdate': + return eventTypes.compositionUpdate; + } + } + + /** + * Does our fallback best-guess model think this event signifies that + * composition has begun? + * + * @param {string} topLevelType + * @param {object} nativeEvent + * @return {boolean} + */ + function isFallbackCompositionStart(topLevelType, nativeEvent) { + return topLevelType === 'topKeyDown' && nativeEvent.keyCode === START_KEYCODE; + } + + /** + * Does our fallback mode think that this event is the end of composition? + * + * @param {string} topLevelType + * @param {object} nativeEvent + * @return {boolean} + */ + function isFallbackCompositionEnd(topLevelType, nativeEvent) { + switch (topLevelType) { + case 'topKeyUp': + // Command keys insert or clear IME input. + return END_KEYCODES.indexOf(nativeEvent.keyCode) !== -1; + case 'topKeyDown': + // Expect IME keyCode on each keydown. If we get any other + // code we must have exited earlier. + return nativeEvent.keyCode !== START_KEYCODE; + case 'topKeyPress': + case 'topMouseDown': + case 'topBlur': + // Events are not possible without cancelling IME. + return true; + default: + return false; + } + } + + /** + * Google Input Tools provides composition data via a CustomEvent, + * with the `data` property populated in the `detail` object. If this + * is available on the event object, use it. If not, this is a plain + * composition event and we have nothing special to extract. + * + * @param {object} nativeEvent + * @return {?string} + */ + function getDataFromCustomEvent(nativeEvent) { + var detail = nativeEvent.detail; + if (typeof detail === 'object' && 'data' in detail) { + return detail.data; + } + return null; + } + + // Track the current IME composition fallback object, if any. + var currentComposition = null; + + /** + * @return {?object} A SyntheticCompositionEvent. + */ + function extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) { + var eventType; + var fallbackData; + + if (canUseCompositionEvent) { + eventType = getCompositionEventType(topLevelType); + } else if (!currentComposition) { + if (isFallbackCompositionStart(topLevelType, nativeEvent)) { + eventType = eventTypes.compositionStart; + } + } else if (isFallbackCompositionEnd(topLevelType, nativeEvent)) { + eventType = eventTypes.compositionEnd; + } + + if (!eventType) { + return null; + } + + if (useFallbackCompositionData) { + // The current composition is stored statically and must not be + // overwritten while composition continues. + if (!currentComposition && eventType === eventTypes.compositionStart) { + currentComposition = FallbackCompositionState.getPooled(nativeEventTarget); + } else if (eventType === eventTypes.compositionEnd) { + if (currentComposition) { + fallbackData = currentComposition.getData(); + } + } + } + + var event = SyntheticCompositionEvent.getPooled( + eventType, + targetInst, + nativeEvent, + nativeEventTarget, + ); + + if (fallbackData) { + // Inject data generated from fallback path into the synthetic event. + // This matches the property of native CompositionEventInterface. + event.data = fallbackData; + } else { + var customData = getDataFromCustomEvent(nativeEvent); + if (customData !== null) { + event.data = customData; + } + } + + EventPropagators.accumulateTwoPhaseDispatches(event); + return event; + } + + /** + * @param {string} topLevelType Record from `EventConstants`. + * @param {object} nativeEvent Native browser event. + * @return {?string} The string corresponding to this `beforeInput` event. + */ + function getNativeBeforeInputChars(topLevelType, nativeEvent) { + switch (topLevelType) { + case 'topCompositionEnd': + return getDataFromCustomEvent(nativeEvent); + case 'topKeyPress': + /** + * If native `textInput` events are available, our goal is to make + * use of them. However, there is a special case: the spacebar key. + * In Webkit, preventing default on a spacebar `textInput` event + * cancels character insertion, but it *also* causes the browser + * to fall back to its default spacebar behavior of scrolling the + * page. + * + * Tracking at: + * https://code.google.com/p/chromium/issues/detail?id=355103 + * + * To avoid this issue, use the keypress event as if no `textInput` + * event is available. + */ + var which = nativeEvent.which; + if (which !== SPACEBAR_CODE) { + return null; + } + + hasSpaceKeypress = true; + return SPACEBAR_CHAR; + + case 'topTextInput': + // Record the characters to be added to the DOM. + var chars = nativeEvent.data; + + // If it's a spacebar character, assume that we have already handled + // it at the keypress level and bail immediately. Android Chrome + // doesn't give us keycodes, so we need to blacklist it. + if (chars === SPACEBAR_CHAR && hasSpaceKeypress) { + return null; + } + + return chars; + + default: + // For other native event types, do nothing. + return null; + } + } + + /** + * For browsers that do not provide the `textInput` event, extract the + * appropriate string to use for SyntheticInputEvent. + * + * @param {string} topLevelType Record from `EventConstants`. + * @param {object} nativeEvent Native browser event. + * @return {?string} The fallback string for this `beforeInput` event. + */ + function getFallbackBeforeInputChars(topLevelType, nativeEvent) { + // If we are currently composing (IME) and using a fallback to do so, + // try to extract the composed characters from the fallback object. + // If composition event is available, we extract a string only at + // compositionevent, otherwise extract it at fallback events. + if (currentComposition) { + if ( + topLevelType === 'topCompositionEnd' || + (!canUseCompositionEvent && isFallbackCompositionEnd(topLevelType, nativeEvent)) + ) { + var chars = currentComposition.getData(); + FallbackCompositionState.release(currentComposition); + currentComposition = null; + return chars; + } + return null; + } + + switch (topLevelType) { + case 'topPaste': + // If a paste event occurs after a keypress, throw out the input + // chars. Paste events should not lead to BeforeInput events. + return null; + case 'topKeyPress': + /** + * As of v27, Firefox may fire keypress events even when no character + * will be inserted. A few possibilities: + * + * - `which` is `0`. Arrow keys, Esc key, etc. + * + * - `which` is the pressed key code, but no char is available. + * Ex: 'AltGr + d` in Polish. There is no modified character for + * this key combination and no character is inserted into the + * document, but FF fires the keypress for char code `100` anyway. + * No `input` event will occur. + * + * - `which` is the pressed key code, but a command combination is + * being used. Ex: `Cmd+C`. No character is inserted, and no + * `input` event will occur. + */ + if (nativeEvent.which && !isKeypressCommand(nativeEvent)) { + return String.fromCharCode(nativeEvent.which); + } + return null; + case 'topCompositionEnd': + return useFallbackCompositionData ? null : nativeEvent.data; + default: + return null; + } + } + + /** + * Extract a SyntheticInputEvent for `beforeInput`, based on either native + * `textInput` or fallback behavior. + * + * @return {?object} A SyntheticInputEvent. + */ + function extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) { + var chars; + + if (canUseTextInputEvent) { + chars = getNativeBeforeInputChars(topLevelType, nativeEvent); + } else { + chars = getFallbackBeforeInputChars(topLevelType, nativeEvent); + } + + // If no characters are being inserted, no BeforeInput event should + // be fired. + if (!chars) { + return null; + } + + var event = SyntheticInputEvent.getPooled( + eventTypes.beforeInput, + targetInst, + nativeEvent, + nativeEventTarget, + ); + + event.data = chars; + EventPropagators.accumulateTwoPhaseDispatches(event); + return event; + } + + /** + * Create an `onBeforeInput` event to match + * http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105/#events-inputevents. + * + * This event plugin is based on the native `textInput` event + * available in Chrome, Safari, Opera, and IE. This event fires after + * `onKeyPress` and `onCompositionEnd`, but before `onInput`. + * + * `beforeInput` is spec'd but not implemented in any browsers, and + * the `input` event does not provide any useful information about what has + * actually been added, contrary to the spec. Thus, `textInput` is the best + * available event to identify the characters that have actually been inserted + * into the target node. + * + * This plugin is also responsible for emitting `composition` events, thus + * allowing us to share composition fallback code for both `beforeInput` and + * `composition` event types. + */ + var BeforeInputEventPlugin = { + eventTypes: eventTypes, + + extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) { + return [ + extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget), + extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget), + ]; + }, + }; + + module.exports = BeforeInputEventPlugin; + + /***/ + }, + /* 751 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var CSSProperty = __webpack_require__(313); + var ExecutionEnvironment = __webpack_require__(17); + var ReactInstrumentation = __webpack_require__(33); + + var camelizeStyleName = __webpack_require__(710); + var dangerousStyleValue = __webpack_require__(806); + var hyphenateStyleName = __webpack_require__(717); + var memoizeStringOnly = __webpack_require__(720); + var warning = __webpack_require__(4); + + var processStyleName = memoizeStringOnly(function (styleName) { + return hyphenateStyleName(styleName); + }); + + var hasShorthandPropertyBug = false; + var styleFloatAccessor = 'cssFloat'; + if (ExecutionEnvironment.canUseDOM) { + var tempStyle = document.createElement('div').style; + try { + // IE8 throws "Invalid argument." if resetting shorthand style properties. + tempStyle.font = ''; + } catch (e) { + hasShorthandPropertyBug = true; + } + // IE8 only supports accessing cssFloat (standard) as styleFloat + if (document.documentElement.style.cssFloat === undefined) { + styleFloatAccessor = 'styleFloat'; + } + } + + if (true) { + // 'msTransform' is correct, but the other prefixes should be capitalized + var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/; + + // style values shouldn't contain a semicolon + var badStyleValueWithSemicolonPattern = /;\s*$/; + + var warnedStyleNames = {}; + var warnedStyleValues = {}; + var warnedForNaNValue = false; + + var warnHyphenatedStyleName = function (name, owner) { + if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) { + return; + } + + warnedStyleNames[name] = true; + true + ? warning( + false, + 'Unsupported style property %s. Did you mean %s?%s', + name, + camelizeStyleName(name), + checkRenderMessage(owner), + ) + : void 0; + }; + + var warnBadVendoredStyleName = function (name, owner) { + if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) { + return; + } + + warnedStyleNames[name] = true; + true + ? warning( + false, + 'Unsupported vendor-prefixed style property %s. Did you mean %s?%s', + name, + name.charAt(0).toUpperCase() + name.slice(1), + checkRenderMessage(owner), + ) + : void 0; + }; + + var warnStyleValueWithSemicolon = function (name, value, owner) { + if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) { + return; + } + + warnedStyleValues[value] = true; + true + ? warning( + false, + "Style property values shouldn't contain a semicolon.%s " + 'Try "%s: %s" instead.', + checkRenderMessage(owner), + name, + value.replace(badStyleValueWithSemicolonPattern, ''), + ) + : void 0; + }; + + var warnStyleValueIsNaN = function (name, value, owner) { + if (warnedForNaNValue) { + return; + } + + warnedForNaNValue = true; + true + ? warning( + false, + '`NaN` is an invalid value for the `%s` css style property.%s', + name, + checkRenderMessage(owner), + ) + : void 0; + }; + + var checkRenderMessage = function (owner) { + if (owner) { + var name = owner.getName(); + if (name) { + return ' Check the render method of `' + name + '`.'; + } + } + return ''; + }; + + /** + * @param {string} name + * @param {*} value + * @param {ReactDOMComponent} component + */ + var warnValidStyle = function (name, value, component) { + var owner; + if (component) { + owner = component._currentElement._owner; + } + if (name.indexOf('-') > -1) { + warnHyphenatedStyleName(name, owner); + } else if (badVendoredStyleNamePattern.test(name)) { + warnBadVendoredStyleName(name, owner); + } else if (badStyleValueWithSemicolonPattern.test(value)) { + warnStyleValueWithSemicolon(name, value, owner); + } + + if (typeof value === 'number' && isNaN(value)) { + warnStyleValueIsNaN(name, value, owner); + } + }; + } + + /** + * Operations for dealing with CSS properties. + */ + var CSSPropertyOperations = { + /** + * Serializes a mapping of style properties for use as inline styles: + * + * > createMarkupForStyles({width: '200px', height: 0}) + * "width:200px;height:0;" + * + * Undefined values are ignored so that declarative programming is easier. + * The result should be HTML-escaped before insertion into the DOM. + * + * @param {object} styles + * @param {ReactDOMComponent} component + * @return {?string} + */ + createMarkupForStyles: function (styles, component) { + var serialized = ''; + for (var styleName in styles) { + if (!styles.hasOwnProperty(styleName)) { + continue; + } + var styleValue = styles[styleName]; + if (true) { + warnValidStyle(styleName, styleValue, component); + } + if (styleValue != null) { + serialized += processStyleName(styleName) + ':'; + serialized += dangerousStyleValue(styleName, styleValue, component) + ';'; + } + } + return serialized || null; + }, + + /** + * Sets the value for multiple styles on a node. If a value is specified as + * '' (empty string), the corresponding style property will be unset. + * + * @param {DOMElement} node + * @param {object} styles + * @param {ReactDOMComponent} component + */ + setValueForStyles: function (node, styles, component) { + if (true) { + ReactInstrumentation.debugTool.onHostOperation({ + instanceID: component._debugID, + type: 'update styles', + payload: styles, + }); + } + + var style = node.style; + for (var styleName in styles) { + if (!styles.hasOwnProperty(styleName)) { + continue; + } + if (true) { + warnValidStyle(styleName, styles[styleName], component); + } + var styleValue = dangerousStyleValue(styleName, styles[styleName], component); + if (styleName === 'float' || styleName === 'cssFloat') { + styleName = styleFloatAccessor; + } + if (styleValue) { + style[styleName] = styleValue; + } else { + var expansion = hasShorthandPropertyBug && CSSProperty.shorthandPropertyExpansions[styleName]; + if (expansion) { + // Shorthand property that IE8 won't like unsetting, so unset each + // component to placate it + for (var individualStyleName in expansion) { + style[individualStyleName] = ''; + } + } else { + style[styleName] = ''; + } + } + } + }, + }; + + module.exports = CSSPropertyOperations; + + /***/ + }, + /* 752 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var EventPluginHub = __webpack_require__(103); + var EventPropagators = __webpack_require__(104); + var ExecutionEnvironment = __webpack_require__(17); + var ReactDOMComponentTree = __webpack_require__(16); + var ReactUpdates = __webpack_require__(34); + var SyntheticEvent = __webpack_require__(51); + + var getEventTarget = __webpack_require__(213); + var isEventSupported = __webpack_require__(215); + var isTextInputElement = __webpack_require__(340); + + var eventTypes = { + change: { + phasedRegistrationNames: { + bubbled: 'onChange', + captured: 'onChangeCapture', + }, + dependencies: [ + 'topBlur', + 'topChange', + 'topClick', + 'topFocus', + 'topInput', + 'topKeyDown', + 'topKeyUp', + 'topSelectionChange', + ], + }, + }; + + /** + * For IE shims + */ + var activeElement = null; + var activeElementInst = null; + var activeElementValue = null; + var activeElementValueProp = null; + + /** + * SECTION: handle `change` event + */ + function shouldUseChangeEvent(elem) { + var nodeName = elem.nodeName && elem.nodeName.toLowerCase(); + return nodeName === 'select' || (nodeName === 'input' && elem.type === 'file'); + } + + var doesChangeEventBubble = false; + if (ExecutionEnvironment.canUseDOM) { + // See `handleChange` comment below + doesChangeEventBubble = + isEventSupported('change') && (!document.documentMode || document.documentMode > 8); + } + + function manualDispatchChangeEvent(nativeEvent) { + var event = SyntheticEvent.getPooled( + eventTypes.change, + activeElementInst, + nativeEvent, + getEventTarget(nativeEvent), + ); + EventPropagators.accumulateTwoPhaseDispatches(event); + + // If change and propertychange bubbled, we'd just bind to it like all the + // other events and have it go through ReactBrowserEventEmitter. Since it + // doesn't, we manually listen for the events and so we have to enqueue and + // process the abstract event manually. + // + // Batching is necessary here in order to ensure that all event handlers run + // before the next rerender (including event handlers attached to ancestor + // elements instead of directly on the input). Without this, controlled + // components don't work properly in conjunction with event bubbling because + // the component is rerendered and the value reverted before all the event + // handlers can run. See https://github.com/facebook/react/issues/708. + ReactUpdates.batchedUpdates(runEventInBatch, event); + } + + function runEventInBatch(event) { + EventPluginHub.enqueueEvents(event); + EventPluginHub.processEventQueue(false); + } + + function startWatchingForChangeEventIE8(target, targetInst) { + activeElement = target; + activeElementInst = targetInst; + activeElement.attachEvent('onchange', manualDispatchChangeEvent); + } + + function stopWatchingForChangeEventIE8() { + if (!activeElement) { + return; + } + activeElement.detachEvent('onchange', manualDispatchChangeEvent); + activeElement = null; + activeElementInst = null; + } + + function getTargetInstForChangeEvent(topLevelType, targetInst) { + if (topLevelType === 'topChange') { + return targetInst; + } + } + function handleEventsForChangeEventIE8(topLevelType, target, targetInst) { + if (topLevelType === 'topFocus') { + // stopWatching() should be a noop here but we call it just in case we + // missed a blur event somehow. + stopWatchingForChangeEventIE8(); + startWatchingForChangeEventIE8(target, targetInst); + } else if (topLevelType === 'topBlur') { + stopWatchingForChangeEventIE8(); + } + } + + /** + * SECTION: handle `input` event + */ + var isInputEventSupported = false; + if (ExecutionEnvironment.canUseDOM) { + // IE9 claims to support the input event but fails to trigger it when + // deleting text, so we ignore its input events. + // IE10+ fire input events to often, such when a placeholder + // changes or when an input with a placeholder is focused. + isInputEventSupported = + isEventSupported('input') && (!document.documentMode || document.documentMode > 11); + } + + /** + * (For IE <=11) Replacement getter/setter for the `value` property that gets + * set on the active element. + */ + var newValueProp = { + get: function () { + return activeElementValueProp.get.call(this); + }, + set: function (val) { + // Cast to a string so we can do equality checks. + activeElementValue = '' + val; + activeElementValueProp.set.call(this, val); + }, + }; + + /** + * (For IE <=11) Starts tracking propertychange events on the passed-in element + * and override the value property so that we can distinguish user events from + * value changes in JS. + */ + function startWatchingForValueChange(target, targetInst) { + activeElement = target; + activeElementInst = targetInst; + activeElementValue = target.value; + activeElementValueProp = Object.getOwnPropertyDescriptor(target.constructor.prototype, 'value'); + + // Not guarded in a canDefineProperty check: IE8 supports defineProperty only + // on DOM elements + Object.defineProperty(activeElement, 'value', newValueProp); + if (activeElement.attachEvent) { + activeElement.attachEvent('onpropertychange', handlePropertyChange); + } else { + activeElement.addEventListener('propertychange', handlePropertyChange, false); + } + } + + /** + * (For IE <=11) Removes the event listeners from the currently-tracked element, + * if any exists. + */ + function stopWatchingForValueChange() { + if (!activeElement) { + return; + } + + // delete restores the original property definition + delete activeElement.value; + + if (activeElement.detachEvent) { + activeElement.detachEvent('onpropertychange', handlePropertyChange); + } else { + activeElement.removeEventListener('propertychange', handlePropertyChange, false); + } + + activeElement = null; + activeElementInst = null; + activeElementValue = null; + activeElementValueProp = null; + } + + /** + * (For IE <=11) Handles a propertychange event, sending a `change` event if + * the value of the active element has changed. + */ + function handlePropertyChange(nativeEvent) { + if (nativeEvent.propertyName !== 'value') { + return; + } + var value = nativeEvent.srcElement.value; + if (value === activeElementValue) { + return; + } + activeElementValue = value; + + manualDispatchChangeEvent(nativeEvent); + } + + /** + * If a `change` event should be fired, returns the target's ID. + */ + function getTargetInstForInputEvent(topLevelType, targetInst) { + if (topLevelType === 'topInput') { + // In modern browsers (i.e., not IE8 or IE9), the input event is exactly + // what we want so fall through here and trigger an abstract event + return targetInst; + } + } + + function handleEventsForInputEventIE(topLevelType, target, targetInst) { + if (topLevelType === 'topFocus') { + // In IE8, we can capture almost all .value changes by adding a + // propertychange handler and looking for events with propertyName + // equal to 'value' + // In IE9-11, propertychange fires for most input events but is buggy and + // doesn't fire when text is deleted, but conveniently, selectionchange + // appears to fire in all of the remaining cases so we catch those and + // forward the event if the value has changed + // In either case, we don't want to call the event handler if the value + // is changed from JS so we redefine a setter for `.value` that updates + // our activeElementValue variable, allowing us to ignore those changes + // + // stopWatching() should be a noop here but we call it just in case we + // missed a blur event somehow. + stopWatchingForValueChange(); + startWatchingForValueChange(target, targetInst); + } else if (topLevelType === 'topBlur') { + stopWatchingForValueChange(); + } + } + + // For IE8 and IE9. + function getTargetInstForInputEventIE(topLevelType, targetInst) { + if ( + topLevelType === 'topSelectionChange' || + topLevelType === 'topKeyUp' || + topLevelType === 'topKeyDown' + ) { + // On the selectionchange event, the target is just document which isn't + // helpful for us so just check activeElement instead. + // + // 99% of the time, keydown and keyup aren't necessary. IE8 fails to fire + // propertychange on the first input event after setting `value` from a + // script and fires only keydown, keypress, keyup. Catching keyup usually + // gets it and catching keydown lets us fire an event for the first + // keystroke if user does a key repeat (it'll be a little delayed: right + // before the second keystroke). Other input methods (e.g., paste) seem to + // fire selectionchange normally. + if (activeElement && activeElement.value !== activeElementValue) { + activeElementValue = activeElement.value; + return activeElementInst; + } + } + } + + /** + * SECTION: handle `click` event + */ + function shouldUseClickEvent(elem) { + // Use the `click` event to detect changes to checkbox and radio inputs. + // This approach works across all browsers, whereas `change` does not fire + // until `blur` in IE8. + return ( + elem.nodeName && + elem.nodeName.toLowerCase() === 'input' && + (elem.type === 'checkbox' || elem.type === 'radio') + ); + } + + function getTargetInstForClickEvent(topLevelType, targetInst) { + if (topLevelType === 'topClick') { + return targetInst; + } + } + + function handleControlledInputBlur(inst, node) { + // TODO: In IE, inst is occasionally null. Why? + if (inst == null) { + return; + } + + // Fiber and ReactDOM keep wrapper state in separate places + var state = inst._wrapperState || node._wrapperState; + + if (!state || !state.controlled || node.type !== 'number') { + return; + } + + // If controlled, assign the value attribute to the current value on blur + var value = '' + node.value; + if (node.getAttribute('value') !== value) { + node.setAttribute('value', value); + } + } + + /** + * This plugin creates an `onChange` event that normalizes change events + * across form elements. This event fires at a time when it's possible to + * change the element's value without seeing a flicker. + * + * Supported elements are: + * - input (see `isTextInputElement`) + * - textarea + * - select + */ + var ChangeEventPlugin = { + eventTypes: eventTypes, + + extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) { + var targetNode = targetInst ? ReactDOMComponentTree.getNodeFromInstance(targetInst) : window; + + var getTargetInstFunc, handleEventFunc; + if (shouldUseChangeEvent(targetNode)) { + if (doesChangeEventBubble) { + getTargetInstFunc = getTargetInstForChangeEvent; + } else { + handleEventFunc = handleEventsForChangeEventIE8; + } + } else if (isTextInputElement(targetNode)) { + if (isInputEventSupported) { + getTargetInstFunc = getTargetInstForInputEvent; + } else { + getTargetInstFunc = getTargetInstForInputEventIE; + handleEventFunc = handleEventsForInputEventIE; + } + } else if (shouldUseClickEvent(targetNode)) { + getTargetInstFunc = getTargetInstForClickEvent; + } + + if (getTargetInstFunc) { + var inst = getTargetInstFunc(topLevelType, targetInst); + if (inst) { + var event = SyntheticEvent.getPooled(eventTypes.change, inst, nativeEvent, nativeEventTarget); + event.type = 'change'; + EventPropagators.accumulateTwoPhaseDispatches(event); + return event; + } + } + + if (handleEventFunc) { + handleEventFunc(topLevelType, targetNode, targetInst); + } + + // When blurring, set the value attribute for number inputs + if (topLevelType === 'topBlur') { + handleControlledInputBlur(targetInst, targetNode); + } + }, + }; + + module.exports = ChangeEventPlugin; + + /***/ + }, + /* 753 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var _prodInvariant = __webpack_require__(7); + + var DOMLazyTree = __webpack_require__(102); + var ExecutionEnvironment = __webpack_require__(17); + + var createNodesFromMarkup = __webpack_require__(713); + var emptyFunction = __webpack_require__(22); + var invariant = __webpack_require__(3); + + var Danger = { + /** + * Replaces a node with a string of markup at its current position within its + * parent. The markup must render into a single root node. + * + * @param {DOMElement} oldChild Child node to replace. + * @param {string} markup Markup to render in place of the child node. + * @internal + */ + dangerouslyReplaceNodeWithMarkup: function (oldChild, markup) { + !ExecutionEnvironment.canUseDOM + ? true + ? invariant( + false, + 'dangerouslyReplaceNodeWithMarkup(...): Cannot render markup in a worker thread. Make sure `window` and `document` are available globally before requiring React when unit testing or use ReactDOMServer.renderToString() for server rendering.', + ) + : _prodInvariant('56') + : void 0; + !markup + ? true + ? invariant(false, 'dangerouslyReplaceNodeWithMarkup(...): Missing markup.') + : _prodInvariant('57') + : void 0; + !(oldChild.nodeName !== 'HTML') + ? true + ? invariant( + false, + 'dangerouslyReplaceNodeWithMarkup(...): Cannot replace markup of the <html> node. This is because browser quirks make this unreliable and/or slow. If you want to render to the root you must use server rendering. See ReactDOMServer.renderToString().', + ) + : _prodInvariant('58') + : void 0; + + if (typeof markup === 'string') { + var newChild = createNodesFromMarkup(markup, emptyFunction)[0]; + oldChild.parentNode.replaceChild(newChild, oldChild); + } else { + DOMLazyTree.replaceChildWithTree(oldChild, markup); + } + }, + }; + + module.exports = Danger; + + /***/ + }, + /* 754 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + /** + * Module that is injectable into `EventPluginHub`, that specifies a + * deterministic ordering of `EventPlugin`s. A convenient way to reason about + * plugins, without having to package every one of them. This is better than + * having plugins be ordered in the same order that they are injected because + * that ordering would be influenced by the packaging order. + * `ResponderEventPlugin` must occur before `SimpleEventPlugin` so that + * preventing default on events is convenient in `SimpleEventPlugin` handlers. + */ + + var DefaultEventPluginOrder = [ + 'ResponderEventPlugin', + 'SimpleEventPlugin', + 'TapEventPlugin', + 'EnterLeaveEventPlugin', + 'ChangeEventPlugin', + 'SelectEventPlugin', + 'BeforeInputEventPlugin', + ]; + + module.exports = DefaultEventPluginOrder; + + /***/ + }, + /* 755 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var EventPropagators = __webpack_require__(104); + var ReactDOMComponentTree = __webpack_require__(16); + var SyntheticMouseEvent = __webpack_require__(148); + + var eventTypes = { + mouseEnter: { + registrationName: 'onMouseEnter', + dependencies: ['topMouseOut', 'topMouseOver'], + }, + mouseLeave: { + registrationName: 'onMouseLeave', + dependencies: ['topMouseOut', 'topMouseOver'], + }, + }; + + var EnterLeaveEventPlugin = { + eventTypes: eventTypes, + + /** + * For almost every interaction we care about, there will be both a top-level + * `mouseover` and `mouseout` event that occurs. Only use `mouseout` so that + * we do not extract duplicate events. However, moving the mouse into the + * browser from outside will not fire a `mouseout` event. In this case, we use + * the `mouseover` top-level event. + */ + extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) { + if (topLevelType === 'topMouseOver' && (nativeEvent.relatedTarget || nativeEvent.fromElement)) { + return null; + } + if (topLevelType !== 'topMouseOut' && topLevelType !== 'topMouseOver') { + // Must not be a mouse in or mouse out - ignoring. + return null; + } + + var win; + if (nativeEventTarget.window === nativeEventTarget) { + // `nativeEventTarget` is probably a window object. + win = nativeEventTarget; + } else { + // TODO: Figure out why `ownerDocument` is sometimes undefined in IE8. + var doc = nativeEventTarget.ownerDocument; + if (doc) { + win = doc.defaultView || doc.parentWindow; + } else { + win = window; + } + } + + var from; + var to; + if (topLevelType === 'topMouseOut') { + from = targetInst; + var related = nativeEvent.relatedTarget || nativeEvent.toElement; + to = related ? ReactDOMComponentTree.getClosestInstanceFromNode(related) : null; + } else { + // Moving to a node from outside the window. + from = null; + to = targetInst; + } + + if (from === to) { + // Nothing pertains to our managed components. + return null; + } + + var fromNode = from == null ? win : ReactDOMComponentTree.getNodeFromInstance(from); + var toNode = to == null ? win : ReactDOMComponentTree.getNodeFromInstance(to); + + var leave = SyntheticMouseEvent.getPooled( + eventTypes.mouseLeave, + from, + nativeEvent, + nativeEventTarget, + ); + leave.type = 'mouseleave'; + leave.target = fromNode; + leave.relatedTarget = toNode; + + var enter = SyntheticMouseEvent.getPooled( + eventTypes.mouseEnter, + to, + nativeEvent, + nativeEventTarget, + ); + enter.type = 'mouseenter'; + enter.target = toNode; + enter.relatedTarget = fromNode; + + EventPropagators.accumulateEnterLeaveDispatches(leave, enter, from, to); + + return [leave, enter]; + }, + }; + + module.exports = EnterLeaveEventPlugin; + + /***/ + }, + /* 756 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + /** + * Types of raw signals from the browser caught at the top level. + */ + var topLevelTypes = { + topAbort: null, + topAnimationEnd: null, + topAnimationIteration: null, + topAnimationStart: null, + topBlur: null, + topCanPlay: null, + topCanPlayThrough: null, + topChange: null, + topClick: null, + topCompositionEnd: null, + topCompositionStart: null, + topCompositionUpdate: null, + topContextMenu: null, + topCopy: null, + topCut: null, + topDoubleClick: null, + topDrag: null, + topDragEnd: null, + topDragEnter: null, + topDragExit: null, + topDragLeave: null, + topDragOver: null, + topDragStart: null, + topDrop: null, + topDurationChange: null, + topEmptied: null, + topEncrypted: null, + topEnded: null, + topError: null, + topFocus: null, + topInput: null, + topInvalid: null, + topKeyDown: null, + topKeyPress: null, + topKeyUp: null, + topLoad: null, + topLoadedData: null, + topLoadedMetadata: null, + topLoadStart: null, + topMouseDown: null, + topMouseMove: null, + topMouseOut: null, + topMouseOver: null, + topMouseUp: null, + topPaste: null, + topPause: null, + topPlay: null, + topPlaying: null, + topProgress: null, + topRateChange: null, + topReset: null, + topScroll: null, + topSeeked: null, + topSeeking: null, + topSelectionChange: null, + topStalled: null, + topSubmit: null, + topSuspend: null, + topTextInput: null, + topTimeUpdate: null, + topTouchCancel: null, + topTouchEnd: null, + topTouchMove: null, + topTouchStart: null, + topTransitionEnd: null, + topVolumeChange: null, + topWaiting: null, + topWheel: null, + }; + + var EventConstants = { + topLevelTypes: topLevelTypes, + }; + + module.exports = EventConstants; + + /***/ + }, + /* 757 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var _assign = __webpack_require__(9); + + var PooledClass = __webpack_require__(85); + + var getTextContentAccessor = __webpack_require__(338); + + /** + * This helper class stores information about text content of a target node, + * allowing comparison of content before and after a given event. + * + * Identify the node where selection currently begins, then observe + * both its text content and its current position in the DOM. Since the + * browser may natively replace the target node during composition, we can + * use its position to find its replacement. + * + * @param {DOMEventTarget} root + */ + function FallbackCompositionState(root) { + this._root = root; + this._startText = this.getText(); + this._fallbackText = null; + } + + _assign(FallbackCompositionState.prototype, { + destructor: function () { + this._root = null; + this._startText = null; + this._fallbackText = null; + }, + + /** + * Get current text of input. + * + * @return {string} + */ + getText: function () { + if ('value' in this._root) { + return this._root.value; + } + return this._root[getTextContentAccessor()]; + }, + + /** + * Determine the differing substring between the initially stored + * text content and the current content. + * + * @return {string} + */ + getData: function () { + if (this._fallbackText) { + return this._fallbackText; + } + + var start; + var startValue = this._startText; + var startLength = startValue.length; + var end; + var endValue = this.getText(); + var endLength = endValue.length; + + for (start = 0; start < startLength; start++) { + if (startValue[start] !== endValue[start]) { + break; + } + } + + var minEnd = startLength - start; + for (end = 1; end <= minEnd; end++) { + if (startValue[startLength - end] !== endValue[endLength - end]) { + break; + } + } + + var sliceTail = end > 1 ? 1 - end : undefined; + this._fallbackText = endValue.slice(start, sliceTail); + return this._fallbackText; + }, + }); + + PooledClass.addPoolingTo(FallbackCompositionState); + + module.exports = FallbackCompositionState; + + /***/ + }, + /* 758 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var DOMProperty = __webpack_require__(68); + + var MUST_USE_PROPERTY = DOMProperty.injection.MUST_USE_PROPERTY; + var HAS_BOOLEAN_VALUE = DOMProperty.injection.HAS_BOOLEAN_VALUE; + var HAS_NUMERIC_VALUE = DOMProperty.injection.HAS_NUMERIC_VALUE; + var HAS_POSITIVE_NUMERIC_VALUE = DOMProperty.injection.HAS_POSITIVE_NUMERIC_VALUE; + var HAS_OVERLOADED_BOOLEAN_VALUE = DOMProperty.injection.HAS_OVERLOADED_BOOLEAN_VALUE; + + var HTMLDOMPropertyConfig = { + isCustomAttribute: RegExp.prototype.test.bind( + new RegExp('^(data|aria)-[' + DOMProperty.ATTRIBUTE_NAME_CHAR + ']*$'), + ), + Properties: { + /** + * Standard Properties + */ + accept: 0, + acceptCharset: 0, + accessKey: 0, + action: 0, + allowFullScreen: HAS_BOOLEAN_VALUE, + allowTransparency: 0, + alt: 0, + // specifies target context for links with `preload` type + as: 0, + async: HAS_BOOLEAN_VALUE, + autoComplete: 0, + // autoFocus is polyfilled/normalized by AutoFocusUtils + // autoFocus: HAS_BOOLEAN_VALUE, + autoPlay: HAS_BOOLEAN_VALUE, + capture: HAS_BOOLEAN_VALUE, + cellPadding: 0, + cellSpacing: 0, + charSet: 0, + challenge: 0, + checked: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE, + cite: 0, + classID: 0, + className: 0, + cols: HAS_POSITIVE_NUMERIC_VALUE, + colSpan: 0, + content: 0, + contentEditable: 0, + contextMenu: 0, + controls: HAS_BOOLEAN_VALUE, + coords: 0, + crossOrigin: 0, + data: 0, // For `<object />` acts as `src`. + dateTime: 0, + default: HAS_BOOLEAN_VALUE, + defer: HAS_BOOLEAN_VALUE, + dir: 0, + disabled: HAS_BOOLEAN_VALUE, + download: HAS_OVERLOADED_BOOLEAN_VALUE, + draggable: 0, + encType: 0, + form: 0, + formAction: 0, + formEncType: 0, + formMethod: 0, + formNoValidate: HAS_BOOLEAN_VALUE, + formTarget: 0, + frameBorder: 0, + headers: 0, + height: 0, + hidden: HAS_BOOLEAN_VALUE, + high: 0, + href: 0, + hrefLang: 0, + htmlFor: 0, + httpEquiv: 0, + icon: 0, + id: 0, + inputMode: 0, + integrity: 0, + is: 0, + keyParams: 0, + keyType: 0, + kind: 0, + label: 0, + lang: 0, + list: 0, + loop: HAS_BOOLEAN_VALUE, + low: 0, + manifest: 0, + marginHeight: 0, + marginWidth: 0, + max: 0, + maxLength: 0, + media: 0, + mediaGroup: 0, + method: 0, + min: 0, + minLength: 0, + // Caution; `option.selected` is not updated if `select.multiple` is + // disabled with `removeAttribute`. + multiple: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE, + muted: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE, + name: 0, + nonce: 0, + noValidate: HAS_BOOLEAN_VALUE, + open: HAS_BOOLEAN_VALUE, + optimum: 0, + pattern: 0, + placeholder: 0, + playsInline: HAS_BOOLEAN_VALUE, + poster: 0, + preload: 0, + profile: 0, + radioGroup: 0, + readOnly: HAS_BOOLEAN_VALUE, + referrerPolicy: 0, + rel: 0, + required: HAS_BOOLEAN_VALUE, + reversed: HAS_BOOLEAN_VALUE, + role: 0, + rows: HAS_POSITIVE_NUMERIC_VALUE, + rowSpan: HAS_NUMERIC_VALUE, + sandbox: 0, + scope: 0, + scoped: HAS_BOOLEAN_VALUE, + scrolling: 0, + seamless: HAS_BOOLEAN_VALUE, + selected: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE, + shape: 0, + size: HAS_POSITIVE_NUMERIC_VALUE, + sizes: 0, + span: HAS_POSITIVE_NUMERIC_VALUE, + spellCheck: 0, + src: 0, + srcDoc: 0, + srcLang: 0, + srcSet: 0, + start: HAS_NUMERIC_VALUE, + step: 0, + style: 0, + summary: 0, + tabIndex: 0, + target: 0, + title: 0, + // Setting .type throws on non-<input> tags + type: 0, + useMap: 0, + value: 0, + width: 0, + wmode: 0, + wrap: 0, + + /** + * RDFa Properties + */ + about: 0, + datatype: 0, + inlist: 0, + prefix: 0, + // property is also supported for OpenGraph in meta tags. + property: 0, + resource: 0, + typeof: 0, + vocab: 0, + + /** + * Non-standard Properties + */ + // autoCapitalize and autoCorrect are supported in Mobile Safari for + // keyboard hints. + autoCapitalize: 0, + autoCorrect: 0, + // autoSave allows WebKit/Blink to persist values of input fields on page reloads + autoSave: 0, + // color is for Safari mask-icon link + color: 0, + // itemProp, itemScope, itemType are for + // Microdata support. See http://schema.org/docs/gs.html + itemProp: 0, + itemScope: HAS_BOOLEAN_VALUE, + itemType: 0, + // itemID and itemRef are for Microdata support as well but + // only specified in the WHATWG spec document. See + // https://html.spec.whatwg.org/multipage/microdata.html#microdata-dom-api + itemID: 0, + itemRef: 0, + // results show looking glass icon and recent searches on input + // search fields in WebKit/Blink + results: 0, + // IE-only attribute that specifies security restrictions on an iframe + // as an alternative to the sandbox attribute on IE<10 + security: 0, + // IE-only attribute that controls focus behavior + unselectable: 0, + }, + DOMAttributeNames: { + acceptCharset: 'accept-charset', + className: 'class', + htmlFor: 'for', + httpEquiv: 'http-equiv', + }, + DOMPropertyNames: {}, + DOMMutationMethods: { + value: function (node, value) { + if (value == null) { + return node.removeAttribute('value'); + } + + // Number inputs get special treatment due to some edge cases in + // Chrome. Let everything else assign the value attribute as normal. + // https://github.com/facebook/react/issues/7253#issuecomment-236074326 + if (node.type !== 'number' || node.hasAttribute('value') === false) { + node.setAttribute('value', '' + value); + } else if ( + node.validity && + !node.validity.badInput && + node.ownerDocument.activeElement !== node + ) { + // Don't assign an attribute if validation reports bad + // input. Chrome will clear the value. Additionally, don't + // operate on inputs that have focus, otherwise Chrome might + // strip off trailing decimal places and cause the user's + // cursor position to jump to the beginning of the input. + // + // In ReactDOMInput, we have an onBlur event that will trigger + // this function again when focus is lost. + node.setAttribute('value', '' + value); + } + }, + }, + }; + + module.exports = HTMLDOMPropertyConfig; + + /***/ + }, + /* 759 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (process) { + /** + * Copyright 2014-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var ReactReconciler = __webpack_require__(69); + + var instantiateReactComponent = __webpack_require__(214); + var KeyEscapeUtils = __webpack_require__(203); + var shouldUpdateReactComponent = __webpack_require__(216); + var traverseAllChildren = __webpack_require__(342); + var warning = __webpack_require__(4); + + var ReactComponentTreeHook; + + if ( + typeof process !== 'undefined' && + __webpack_require__.i({ NODE_ENV: 'development', WEBPACK_SERVER_BUILD: true }) && + 'development' === 'test' + ) { + // Temporary hack. + // Inline requires don't work well with Jest: + // https://github.com/facebook/react/issues/7240 + // Remove the inline requires when we don't need them anymore: + // https://github.com/facebook/react/pull/7178 + ReactComponentTreeHook = __webpack_require__(24); + } + + function instantiateChild(childInstances, child, name, selfDebugID) { + // We found a component instance. + var keyUnique = childInstances[name] === undefined; + if (true) { + if (!ReactComponentTreeHook) { + ReactComponentTreeHook = __webpack_require__(24); + } + if (!keyUnique) { + true + ? warning( + false, + 'flattenChildren(...): Encountered two children with the same key, ' + + '`%s`. Child keys must be unique; when two children share a key, only ' + + 'the first child will be used.%s', + KeyEscapeUtils.unescape(name), + ReactComponentTreeHook.getStackAddendumByID(selfDebugID), + ) + : void 0; + } + } + if (child != null && keyUnique) { + childInstances[name] = instantiateReactComponent(child, true); + } + } + + /** + * ReactChildReconciler provides helpers for initializing or updating a set of + * children. Its output is suitable for passing it onto ReactMultiChild which + * does diffed reordering and insertion. + */ + var ReactChildReconciler = { + /** + * Generates a "mount image" for each of the supplied children. In the case + * of `ReactDOMComponent`, a mount image is a string of markup. + * + * @param {?object} nestedChildNodes Nested child maps. + * @return {?object} A set of child instances. + * @internal + */ + instantiateChildren: function ( + nestedChildNodes, + transaction, + context, + selfDebugID, // 0 in production and for roots + ) { + if (nestedChildNodes == null) { + return null; + } + var childInstances = {}; + + if (true) { + traverseAllChildren( + nestedChildNodes, + function (childInsts, child, name) { + return instantiateChild(childInsts, child, name, selfDebugID); + }, + childInstances, + ); + } else { + traverseAllChildren(nestedChildNodes, instantiateChild, childInstances); + } + return childInstances; + }, + + /** + * Updates the rendered children and returns a new set of children. + * + * @param {?object} prevChildren Previously initialized set of children. + * @param {?object} nextChildren Flat child element maps. + * @param {ReactReconcileTransaction} transaction + * @param {object} context + * @return {?object} A new set of child instances. + * @internal + */ + updateChildren: function ( + prevChildren, + nextChildren, + mountImages, + removedNodes, + transaction, + hostParent, + hostContainerInfo, + context, + selfDebugID, // 0 in production and for roots + ) { + // We currently don't have a way to track moves here but if we use iterators + // instead of for..in we can zip the iterators and check if an item has + // moved. + // TODO: If nothing has changed, return the prevChildren object so that we + // can quickly bailout if nothing has changed. + if (!nextChildren && !prevChildren) { + return; + } + var name; + var prevChild; + for (name in nextChildren) { + if (!nextChildren.hasOwnProperty(name)) { + continue; + } + prevChild = prevChildren && prevChildren[name]; + var prevElement = prevChild && prevChild._currentElement; + var nextElement = nextChildren[name]; + if (prevChild != null && shouldUpdateReactComponent(prevElement, nextElement)) { + ReactReconciler.receiveComponent(prevChild, nextElement, transaction, context); + nextChildren[name] = prevChild; + } else { + if (prevChild) { + removedNodes[name] = ReactReconciler.getHostNode(prevChild); + ReactReconciler.unmountComponent(prevChild, false); + } + // The child must be instantiated before it's mounted. + var nextChildInstance = instantiateReactComponent(nextElement, true); + nextChildren[name] = nextChildInstance; + // Creating mount image now ensures refs are resolved in right order + // (see https://github.com/facebook/react/pull/7101 for explanation). + var nextChildMountImage = ReactReconciler.mountComponent( + nextChildInstance, + transaction, + hostParent, + hostContainerInfo, + context, + selfDebugID, + ); + mountImages.push(nextChildMountImage); + } + } + // Unmount children that are no longer present. + for (name in prevChildren) { + if (prevChildren.hasOwnProperty(name) && !(nextChildren && nextChildren.hasOwnProperty(name))) { + prevChild = prevChildren[name]; + removedNodes[name] = ReactReconciler.getHostNode(prevChild); + ReactReconciler.unmountComponent(prevChild, false); + } + } + }, + + /** + * Unmounts all rendered children. This should be used to clean up children + * when this component is unmounted. + * + * @param {?object} renderedChildren Previously initialized set of children. + * @internal + */ + unmountChildren: function (renderedChildren, safely) { + for (var name in renderedChildren) { + if (renderedChildren.hasOwnProperty(name)) { + var renderedChild = renderedChildren[name]; + ReactReconciler.unmountComponent(renderedChild, safely); + } + } + }, + }; + + module.exports = ReactChildReconciler; + /* WEBPACK VAR INJECTION */ + }).call(exports, __webpack_require__(100)); + + /***/ + }, + /* 760 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var DOMChildrenOperations = __webpack_require__(200); + var ReactDOMIDOperations = __webpack_require__(764); + + /** + * Abstracts away all functionality of the reconciler that requires knowledge of + * the browser context. TODO: These callers should be refactored to avoid the + * need for this injection. + */ + var ReactComponentBrowserEnvironment = { + processChildrenUpdates: ReactDOMIDOperations.dangerouslyProcessChildrenUpdates, + + replaceNodeWithMarkup: DOMChildrenOperations.dangerouslyReplaceNodeWithMarkup, + }; + + module.exports = ReactComponentBrowserEnvironment; + + /***/ + }, + /* 761 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + /* global hasOwnProperty:true */ + + var _prodInvariant = __webpack_require__(7), + _assign = __webpack_require__(9); + + var AutoFocusUtils = __webpack_require__(749); + var CSSPropertyOperations = __webpack_require__(751); + var DOMLazyTree = __webpack_require__(102); + var DOMNamespaces = __webpack_require__(201); + var DOMProperty = __webpack_require__(68); + var DOMPropertyOperations = __webpack_require__(315); + var EventPluginHub = __webpack_require__(103); + var EventPluginRegistry = __webpack_require__(123); + var ReactBrowserEventEmitter = __webpack_require__(124); + var ReactDOMComponentFlags = __webpack_require__(317); + var ReactDOMComponentTree = __webpack_require__(16); + var ReactDOMInput = __webpack_require__(765); + var ReactDOMOption = __webpack_require__(768); + var ReactDOMSelect = __webpack_require__(319); + var ReactDOMTextarea = __webpack_require__(772); + var ReactInstrumentation = __webpack_require__(33); + var ReactMultiChild = __webpack_require__(781); + var ReactServerRenderingTransaction = __webpack_require__(331); + + var emptyFunction = __webpack_require__(22); + var escapeTextContentForBrowser = __webpack_require__(150); + var invariant = __webpack_require__(3); + var isEventSupported = __webpack_require__(215); + var shallowEqual = __webpack_require__(194); + var validateDOMNesting = __webpack_require__(217); + var warning = __webpack_require__(4); + + var Flags = ReactDOMComponentFlags; + var deleteListener = EventPluginHub.deleteListener; + var getNode = ReactDOMComponentTree.getNodeFromInstance; + var listenTo = ReactBrowserEventEmitter.listenTo; + var registrationNameModules = EventPluginRegistry.registrationNameModules; + + // For quickly matching children type, to test if can be treated as content. + var CONTENT_TYPES = { string: true, number: true }; + + var STYLE = 'style'; + var HTML = '__html'; + var RESERVED_PROPS = { + children: null, + dangerouslySetInnerHTML: null, + suppressContentEditableWarning: null, + }; + + // Node type for document fragments (Node.DOCUMENT_FRAGMENT_NODE). + var DOC_FRAGMENT_TYPE = 11; + + function getDeclarationErrorAddendum(internalInstance) { + if (internalInstance) { + var owner = internalInstance._currentElement._owner || null; + if (owner) { + var name = owner.getName(); + if (name) { + return ' This DOM node was rendered by `' + name + '`.'; + } + } + } + return ''; + } + + function friendlyStringify(obj) { + if (typeof obj === 'object') { + if (Array.isArray(obj)) { + return '[' + obj.map(friendlyStringify).join(', ') + ']'; + } else { + var pairs = []; + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + var keyEscaped = /^[a-z$_][\w$_]*$/i.test(key) ? key : JSON.stringify(key); + pairs.push(keyEscaped + ': ' + friendlyStringify(obj[key])); + } + } + return '{' + pairs.join(', ') + '}'; + } + } else if (typeof obj === 'string') { + return JSON.stringify(obj); + } else if (typeof obj === 'function') { + return '[function object]'; + } + // Differs from JSON.stringify in that undefined because undefined and that + // inf and nan don't become null + return String(obj); + } + + var styleMutationWarning = {}; + + function checkAndWarnForMutatedStyle(style1, style2, component) { + if (style1 == null || style2 == null) { + return; + } + if (shallowEqual(style1, style2)) { + return; + } + + var componentName = component._tag; + var owner = component._currentElement._owner; + var ownerName; + if (owner) { + ownerName = owner.getName(); + } + + var hash = ownerName + '|' + componentName; + + if (styleMutationWarning.hasOwnProperty(hash)) { + return; + } + + styleMutationWarning[hash] = true; + + true + ? warning( + false, + '`%s` was passed a style object that has previously been mutated. ' + + 'Mutating `style` is deprecated. Consider cloning it beforehand. Check ' + + 'the `render` %s. Previous style: %s. Mutated style: %s.', + componentName, + owner ? 'of `' + ownerName + '`' : 'using <' + componentName + '>', + friendlyStringify(style1), + friendlyStringify(style2), + ) + : void 0; + } + + /** + * @param {object} component + * @param {?object} props + */ + function assertValidProps(component, props) { + if (!props) { + return; + } + // Note the use of `==` which checks for null or undefined. + if (voidElementTags[component._tag]) { + !(props.children == null && props.dangerouslySetInnerHTML == null) + ? true + ? invariant( + false, + '%s is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.%s', + component._tag, + component._currentElement._owner + ? ' Check the render method of ' + component._currentElement._owner.getName() + '.' + : '', + ) + : _prodInvariant( + '137', + component._tag, + component._currentElement._owner + ? ' Check the render method of ' + component._currentElement._owner.getName() + '.' + : '', + ) + : void 0; + } + if (props.dangerouslySetInnerHTML != null) { + !(props.children == null) + ? true + ? invariant(false, 'Can only set one of `children` or `props.dangerouslySetInnerHTML`.') + : _prodInvariant('60') + : void 0; + !(typeof props.dangerouslySetInnerHTML === 'object' && HTML in props.dangerouslySetInnerHTML) + ? true + ? invariant( + false, + '`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://fb.me/react-invariant-dangerously-set-inner-html for more information.', + ) + : _prodInvariant('61') + : void 0; + } + if (true) { + true + ? warning( + props.innerHTML == null, + 'Directly setting property `innerHTML` is not permitted. ' + + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.', + ) + : void 0; + true + ? warning( + props.suppressContentEditableWarning || !props.contentEditable || props.children == null, + 'A component is `contentEditable` and contains `children` managed by ' + + 'React. It is now your responsibility to guarantee that none of ' + + 'those nodes are unexpectedly modified or duplicated. This is ' + + 'probably not intentional.', + ) + : void 0; + true + ? warning( + props.onFocusIn == null && props.onFocusOut == null, + 'React uses onFocus and onBlur instead of onFocusIn and onFocusOut. ' + + 'All React events are normalized to bubble, so onFocusIn and onFocusOut ' + + 'are not needed/supported by React.', + ) + : void 0; + } + !(props.style == null || typeof props.style === 'object') + ? true + ? invariant( + false, + "The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.%s", + getDeclarationErrorAddendum(component), + ) + : _prodInvariant('62', getDeclarationErrorAddendum(component)) + : void 0; + } + + function enqueuePutListener(inst, registrationName, listener, transaction) { + if (transaction instanceof ReactServerRenderingTransaction) { + return; + } + if (true) { + // IE8 has no API for event capturing and the `onScroll` event doesn't + // bubble. + true + ? warning( + registrationName !== 'onScroll' || isEventSupported('scroll', true), + "This browser doesn't support the `onScroll` event", + ) + : void 0; + } + var containerInfo = inst._hostContainerInfo; + var isDocumentFragment = containerInfo._node && containerInfo._node.nodeType === DOC_FRAGMENT_TYPE; + var doc = isDocumentFragment ? containerInfo._node : containerInfo._ownerDocument; + listenTo(registrationName, doc); + transaction.getReactMountReady().enqueue(putListener, { + inst: inst, + registrationName: registrationName, + listener: listener, + }); + } + + function putListener() { + var listenerToPut = this; + EventPluginHub.putListener( + listenerToPut.inst, + listenerToPut.registrationName, + listenerToPut.listener, + ); + } + + function inputPostMount() { + var inst = this; + ReactDOMInput.postMountWrapper(inst); + } + + function textareaPostMount() { + var inst = this; + ReactDOMTextarea.postMountWrapper(inst); + } + + function optionPostMount() { + var inst = this; + ReactDOMOption.postMountWrapper(inst); + } + + var setAndValidateContentChildDev = emptyFunction; + if (true) { + setAndValidateContentChildDev = function (content) { + var hasExistingContent = this._contentDebugID != null; + var debugID = this._debugID; + // This ID represents the inlined child that has no backing instance: + var contentDebugID = -debugID; + + if (content == null) { + if (hasExistingContent) { + ReactInstrumentation.debugTool.onUnmountComponent(this._contentDebugID); + } + this._contentDebugID = null; + return; + } + + validateDOMNesting(null, String(content), this, this._ancestorInfo); + this._contentDebugID = contentDebugID; + if (hasExistingContent) { + ReactInstrumentation.debugTool.onBeforeUpdateComponent(contentDebugID, content); + ReactInstrumentation.debugTool.onUpdateComponent(contentDebugID); + } else { + ReactInstrumentation.debugTool.onBeforeMountComponent(contentDebugID, content, debugID); + ReactInstrumentation.debugTool.onMountComponent(contentDebugID); + ReactInstrumentation.debugTool.onSetChildren(debugID, [contentDebugID]); + } + }; + } + + // There are so many media events, it makes sense to just + // maintain a list rather than create a `trapBubbledEvent` for each + var mediaEvents = { + topAbort: 'abort', + topCanPlay: 'canplay', + topCanPlayThrough: 'canplaythrough', + topDurationChange: 'durationchange', + topEmptied: 'emptied', + topEncrypted: 'encrypted', + topEnded: 'ended', + topError: 'error', + topLoadedData: 'loadeddata', + topLoadedMetadata: 'loadedmetadata', + topLoadStart: 'loadstart', + topPause: 'pause', + topPlay: 'play', + topPlaying: 'playing', + topProgress: 'progress', + topRateChange: 'ratechange', + topSeeked: 'seeked', + topSeeking: 'seeking', + topStalled: 'stalled', + topSuspend: 'suspend', + topTimeUpdate: 'timeupdate', + topVolumeChange: 'volumechange', + topWaiting: 'waiting', + }; + + function trapBubbledEventsLocal() { + var inst = this; + // If a component renders to null or if another component fatals and causes + // the state of the tree to be corrupted, `node` here can be null. + !inst._rootNodeID + ? true + ? invariant(false, 'Must be mounted to trap events') + : _prodInvariant('63') + : void 0; + var node = getNode(inst); + !node + ? true + ? invariant(false, 'trapBubbledEvent(...): Requires node to be rendered.') + : _prodInvariant('64') + : void 0; + + switch (inst._tag) { + case 'iframe': + case 'object': + inst._wrapperState.listeners = [ + ReactBrowserEventEmitter.trapBubbledEvent('topLoad', 'load', node), + ]; + break; + case 'video': + case 'audio': + inst._wrapperState.listeners = []; + // Create listener for each media event + for (var event in mediaEvents) { + if (mediaEvents.hasOwnProperty(event)) { + inst._wrapperState.listeners.push( + ReactBrowserEventEmitter.trapBubbledEvent(event, mediaEvents[event], node), + ); + } + } + break; + case 'source': + inst._wrapperState.listeners = [ + ReactBrowserEventEmitter.trapBubbledEvent('topError', 'error', node), + ]; + break; + case 'img': + inst._wrapperState.listeners = [ + ReactBrowserEventEmitter.trapBubbledEvent('topError', 'error', node), + ReactBrowserEventEmitter.trapBubbledEvent('topLoad', 'load', node), + ]; + break; + case 'form': + inst._wrapperState.listeners = [ + ReactBrowserEventEmitter.trapBubbledEvent('topReset', 'reset', node), + ReactBrowserEventEmitter.trapBubbledEvent('topSubmit', 'submit', node), + ]; + break; + case 'input': + case 'select': + case 'textarea': + inst._wrapperState.listeners = [ + ReactBrowserEventEmitter.trapBubbledEvent('topInvalid', 'invalid', node), + ]; + break; + } + } + + function postUpdateSelectWrapper() { + ReactDOMSelect.postUpdateWrapper(this); + } + + // For HTML, certain tags should omit their close tag. We keep a whitelist for + // those special-case tags. + + var omittedCloseTags = { + area: true, + base: true, + br: true, + col: true, + embed: true, + hr: true, + img: true, + input: true, + keygen: true, + link: true, + meta: true, + param: true, + source: true, + track: true, + wbr: true, + }; + + var newlineEatingTags = { + listing: true, + pre: true, + textarea: true, + }; + + // For HTML, certain tags cannot have children. This has the same purpose as + // `omittedCloseTags` except that `menuitem` should still have its closing tag. + + var voidElementTags = _assign( + { + menuitem: true, + }, + omittedCloseTags, + ); + + // We accept any tag to be rendered but since this gets injected into arbitrary + // HTML, we want to make sure that it's a safe tag. + // http://www.w3.org/TR/REC-xml/#NT-Name + + var VALID_TAG_REGEX = /^[a-zA-Z][a-zA-Z:_\.\-\d]*$/; // Simplified subset + var validatedTagCache = {}; + var hasOwnProperty = {}.hasOwnProperty; + + function validateDangerousTag(tag) { + if (!hasOwnProperty.call(validatedTagCache, tag)) { + !VALID_TAG_REGEX.test(tag) + ? true + ? invariant(false, 'Invalid tag: %s', tag) + : _prodInvariant('65', tag) + : void 0; + validatedTagCache[tag] = true; + } + } + + function isCustomComponent(tagName, props) { + return tagName.indexOf('-') >= 0 || props.is != null; + } + + var globalIdCounter = 1; + + /** + * Creates a new React class that is idempotent and capable of containing other + * React components. It accepts event listeners and DOM properties that are + * valid according to `DOMProperty`. + * + * - Event listeners: `onClick`, `onMouseDown`, etc. + * - DOM properties: `className`, `name`, `title`, etc. + * + * The `style` property functions differently from the DOM API. It accepts an + * object mapping of style properties to values. + * + * @constructor ReactDOMComponent + * @extends ReactMultiChild + */ + function ReactDOMComponent(element) { + var tag = element.type; + validateDangerousTag(tag); + this._currentElement = element; + this._tag = tag.toLowerCase(); + this._namespaceURI = null; + this._renderedChildren = null; + this._previousStyle = null; + this._previousStyleCopy = null; + this._hostNode = null; + this._hostParent = null; + this._rootNodeID = 0; + this._domID = 0; + this._hostContainerInfo = null; + this._wrapperState = null; + this._topLevelWrapper = null; + this._flags = 0; + if (true) { + this._ancestorInfo = null; + setAndValidateContentChildDev.call(this, null); + } + } + + ReactDOMComponent.displayName = 'ReactDOMComponent'; + + ReactDOMComponent.Mixin = { + /** + * Generates root tag markup then recurses. This method has side effects and + * is not idempotent. + * + * @internal + * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction + * @param {?ReactDOMComponent} the parent component instance + * @param {?object} info about the host container + * @param {object} context + * @return {string} The computed markup. + */ + mountComponent: function (transaction, hostParent, hostContainerInfo, context) { + this._rootNodeID = globalIdCounter++; + this._domID = hostContainerInfo._idCounter++; + this._hostParent = hostParent; + this._hostContainerInfo = hostContainerInfo; + + var props = this._currentElement.props; + + switch (this._tag) { + case 'audio': + case 'form': + case 'iframe': + case 'img': + case 'link': + case 'object': + case 'source': + case 'video': + this._wrapperState = { + listeners: null, + }; + transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this); + break; + case 'input': + ReactDOMInput.mountWrapper(this, props, hostParent); + props = ReactDOMInput.getHostProps(this, props); + transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this); + break; + case 'option': + ReactDOMOption.mountWrapper(this, props, hostParent); + props = ReactDOMOption.getHostProps(this, props); + break; + case 'select': + ReactDOMSelect.mountWrapper(this, props, hostParent); + props = ReactDOMSelect.getHostProps(this, props); + transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this); + break; + case 'textarea': + ReactDOMTextarea.mountWrapper(this, props, hostParent); + props = ReactDOMTextarea.getHostProps(this, props); + transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this); + break; + } + + assertValidProps(this, props); + + // We create tags in the namespace of their parent container, except HTML + // tags get no namespace. + var namespaceURI; + var parentTag; + if (hostParent != null) { + namespaceURI = hostParent._namespaceURI; + parentTag = hostParent._tag; + } else if (hostContainerInfo._tag) { + namespaceURI = hostContainerInfo._namespaceURI; + parentTag = hostContainerInfo._tag; + } + if (namespaceURI == null || (namespaceURI === DOMNamespaces.svg && parentTag === 'foreignobject')) { + namespaceURI = DOMNamespaces.html; + } + if (namespaceURI === DOMNamespaces.html) { + if (this._tag === 'svg') { + namespaceURI = DOMNamespaces.svg; + } else if (this._tag === 'math') { + namespaceURI = DOMNamespaces.mathml; + } + } + this._namespaceURI = namespaceURI; + + if (true) { + var parentInfo; + if (hostParent != null) { + parentInfo = hostParent._ancestorInfo; + } else if (hostContainerInfo._tag) { + parentInfo = hostContainerInfo._ancestorInfo; + } + if (parentInfo) { + // parentInfo should always be present except for the top-level + // component when server rendering + validateDOMNesting(this._tag, null, this, parentInfo); + } + this._ancestorInfo = validateDOMNesting.updatedAncestorInfo(parentInfo, this._tag, this); + } + + var mountImage; + if (transaction.useCreateElement) { + var ownerDocument = hostContainerInfo._ownerDocument; + var el; + if (namespaceURI === DOMNamespaces.html) { + if (this._tag === 'script') { + // Create the script via .innerHTML so its "parser-inserted" flag is + // set to true and it does not execute + var div = ownerDocument.createElement('div'); + var type = this._currentElement.type; + div.innerHTML = '<' + type + '></' + type + '>'; + el = div.removeChild(div.firstChild); + } else if (props.is) { + el = ownerDocument.createElement(this._currentElement.type, props.is); + } else { + // Separate else branch instead of using `props.is || undefined` above becuase of a Firefox bug. + // See discussion in https://github.com/facebook/react/pull/6896 + // and discussion in https://bugzilla.mozilla.org/show_bug.cgi?id=1276240 + el = ownerDocument.createElement(this._currentElement.type); + } + } else { + el = ownerDocument.createElementNS(namespaceURI, this._currentElement.type); + } + ReactDOMComponentTree.precacheNode(this, el); + this._flags |= Flags.hasCachedChildNodes; + if (!this._hostParent) { + DOMPropertyOperations.setAttributeForRoot(el); + } + this._updateDOMProperties(null, props, transaction); + var lazyTree = DOMLazyTree(el); + this._createInitialChildren(transaction, props, context, lazyTree); + mountImage = lazyTree; + } else { + var tagOpen = this._createOpenTagMarkupAndPutListeners(transaction, props); + var tagContent = this._createContentMarkup(transaction, props, context); + if (!tagContent && omittedCloseTags[this._tag]) { + mountImage = tagOpen + '/>'; + } else { + mountImage = tagOpen + '>' + tagContent + '</' + this._currentElement.type + '>'; + } + } + + switch (this._tag) { + case 'input': + transaction.getReactMountReady().enqueue(inputPostMount, this); + if (props.autoFocus) { + transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this); + } + break; + case 'textarea': + transaction.getReactMountReady().enqueue(textareaPostMount, this); + if (props.autoFocus) { + transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this); + } + break; + case 'select': + if (props.autoFocus) { + transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this); + } + break; + case 'button': + if (props.autoFocus) { + transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this); + } + break; + case 'option': + transaction.getReactMountReady().enqueue(optionPostMount, this); + break; + } + + return mountImage; + }, + + /** + * Creates markup for the open tag and all attributes. + * + * This method has side effects because events get registered. + * + * Iterating over object properties is faster than iterating over arrays. + * @see http://jsperf.com/obj-vs-arr-iteration + * + * @private + * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction + * @param {object} props + * @return {string} Markup of opening tag. + */ + _createOpenTagMarkupAndPutListeners: function (transaction, props) { + var ret = '<' + this._currentElement.type; + + for (var propKey in props) { + if (!props.hasOwnProperty(propKey)) { + continue; + } + var propValue = props[propKey]; + if (propValue == null) { + continue; + } + if (registrationNameModules.hasOwnProperty(propKey)) { + if (propValue) { + enqueuePutListener(this, propKey, propValue, transaction); + } + } else { + if (propKey === STYLE) { + if (propValue) { + if (true) { + // See `_updateDOMProperties`. style block + this._previousStyle = propValue; + } + propValue = this._previousStyleCopy = _assign({}, props.style); + } + propValue = CSSPropertyOperations.createMarkupForStyles(propValue, this); + } + var markup = null; + if (this._tag != null && isCustomComponent(this._tag, props)) { + if (!RESERVED_PROPS.hasOwnProperty(propKey)) { + markup = DOMPropertyOperations.createMarkupForCustomAttribute(propKey, propValue); + } + } else { + markup = DOMPropertyOperations.createMarkupForProperty(propKey, propValue); + } + if (markup) { + ret += ' ' + markup; + } + } + } + + // For static pages, no need to put React ID and checksum. Saves lots of + // bytes. + if (transaction.renderToStaticMarkup) { + return ret; + } + + if (!this._hostParent) { + ret += ' ' + DOMPropertyOperations.createMarkupForRoot(); + } + ret += ' ' + DOMPropertyOperations.createMarkupForID(this._domID); + return ret; + }, + + /** + * Creates markup for the content between the tags. + * + * @private + * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction + * @param {object} props + * @param {object} context + * @return {string} Content markup. + */ + _createContentMarkup: function (transaction, props, context) { + var ret = ''; + + // Intentional use of != to avoid catching zero/false. + var innerHTML = props.dangerouslySetInnerHTML; + if (innerHTML != null) { + if (innerHTML.__html != null) { + ret = innerHTML.__html; + } + } else { + var contentToUse = CONTENT_TYPES[typeof props.children] ? props.children : null; + var childrenToUse = contentToUse != null ? null : props.children; + if (contentToUse != null) { + // TODO: Validate that text is allowed as a child of this node + ret = escapeTextContentForBrowser(contentToUse); + if (true) { + setAndValidateContentChildDev.call(this, contentToUse); + } + } else if (childrenToUse != null) { + var mountImages = this.mountChildren(childrenToUse, transaction, context); + ret = mountImages.join(''); + } + } + if (newlineEatingTags[this._tag] && ret.charAt(0) === '\n') { + // text/html ignores the first character in these tags if it's a newline + // Prefer to break application/xml over text/html (for now) by adding + // a newline specifically to get eaten by the parser. (Alternately for + // textareas, replacing "^\n" with "\r\n" doesn't get eaten, and the first + // \r is normalized out by HTMLTextAreaElement#value.) + // See: <http://www.w3.org/TR/html-polyglot/#newlines-in-textarea-and-pre> + // See: <http://www.w3.org/TR/html5/syntax.html#element-restrictions> + // See: <http://www.w3.org/TR/html5/syntax.html#newlines> + // See: Parsing of "textarea" "listing" and "pre" elements + // from <http://www.w3.org/TR/html5/syntax.html#parsing-main-inbody> + return '\n' + ret; + } else { + return ret; + } + }, + + _createInitialChildren: function (transaction, props, context, lazyTree) { + // Intentional use of != to avoid catching zero/false. + var innerHTML = props.dangerouslySetInnerHTML; + if (innerHTML != null) { + if (innerHTML.__html != null) { + DOMLazyTree.queueHTML(lazyTree, innerHTML.__html); + } + } else { + var contentToUse = CONTENT_TYPES[typeof props.children] ? props.children : null; + var childrenToUse = contentToUse != null ? null : props.children; + // TODO: Validate that text is allowed as a child of this node + if (contentToUse != null) { + // Avoid setting textContent when the text is empty. In IE11 setting + // textContent on a text area will cause the placeholder to not + // show within the textarea until it has been focused and blurred again. + // https://github.com/facebook/react/issues/6731#issuecomment-254874553 + if (contentToUse !== '') { + if (true) { + setAndValidateContentChildDev.call(this, contentToUse); + } + DOMLazyTree.queueText(lazyTree, contentToUse); + } + } else if (childrenToUse != null) { + var mountImages = this.mountChildren(childrenToUse, transaction, context); + for (var i = 0; i < mountImages.length; i++) { + DOMLazyTree.queueChild(lazyTree, mountImages[i]); + } + } + } + }, + + /** + * Receives a next element and updates the component. + * + * @internal + * @param {ReactElement} nextElement + * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction + * @param {object} context + */ + receiveComponent: function (nextElement, transaction, context) { + var prevElement = this._currentElement; + this._currentElement = nextElement; + this.updateComponent(transaction, prevElement, nextElement, context); + }, + + /** + * Updates a DOM component after it has already been allocated and + * attached to the DOM. Reconciles the root DOM node, then recurses. + * + * @param {ReactReconcileTransaction} transaction + * @param {ReactElement} prevElement + * @param {ReactElement} nextElement + * @internal + * @overridable + */ + updateComponent: function (transaction, prevElement, nextElement, context) { + var lastProps = prevElement.props; + var nextProps = this._currentElement.props; + + switch (this._tag) { + case 'input': + lastProps = ReactDOMInput.getHostProps(this, lastProps); + nextProps = ReactDOMInput.getHostProps(this, nextProps); + break; + case 'option': + lastProps = ReactDOMOption.getHostProps(this, lastProps); + nextProps = ReactDOMOption.getHostProps(this, nextProps); + break; + case 'select': + lastProps = ReactDOMSelect.getHostProps(this, lastProps); + nextProps = ReactDOMSelect.getHostProps(this, nextProps); + break; + case 'textarea': + lastProps = ReactDOMTextarea.getHostProps(this, lastProps); + nextProps = ReactDOMTextarea.getHostProps(this, nextProps); + break; + } + + assertValidProps(this, nextProps); + this._updateDOMProperties(lastProps, nextProps, transaction); + this._updateDOMChildren(lastProps, nextProps, transaction, context); + + switch (this._tag) { + case 'input': + // Update the wrapper around inputs *after* updating props. This has to + // happen after `_updateDOMProperties`. Otherwise HTML5 input validations + // raise warnings and prevent the new value from being assigned. + ReactDOMInput.updateWrapper(this); + break; + case 'textarea': + ReactDOMTextarea.updateWrapper(this); + break; + case 'select': + // <select> value update needs to occur after <option> children + // reconciliation + transaction.getReactMountReady().enqueue(postUpdateSelectWrapper, this); + break; + } + }, + + /** + * Reconciles the properties by detecting differences in property values and + * updating the DOM as necessary. This function is probably the single most + * critical path for performance optimization. + * + * TODO: Benchmark whether checking for changed values in memory actually + * improves performance (especially statically positioned elements). + * TODO: Benchmark the effects of putting this at the top since 99% of props + * do not change for a given reconciliation. + * TODO: Benchmark areas that can be improved with caching. + * + * @private + * @param {object} lastProps + * @param {object} nextProps + * @param {?DOMElement} node + */ + _updateDOMProperties: function (lastProps, nextProps, transaction) { + var propKey; + var styleName; + var styleUpdates; + for (propKey in lastProps) { + if ( + nextProps.hasOwnProperty(propKey) || + !lastProps.hasOwnProperty(propKey) || + lastProps[propKey] == null + ) { + continue; + } + if (propKey === STYLE) { + var lastStyle = this._previousStyleCopy; + for (styleName in lastStyle) { + if (lastStyle.hasOwnProperty(styleName)) { + styleUpdates = styleUpdates || {}; + styleUpdates[styleName] = ''; + } + } + this._previousStyleCopy = null; + } else if (registrationNameModules.hasOwnProperty(propKey)) { + if (lastProps[propKey]) { + // Only call deleteListener if there was a listener previously or + // else willDeleteListener gets called when there wasn't actually a + // listener (e.g., onClick={null}) + deleteListener(this, propKey); + } + } else if (isCustomComponent(this._tag, lastProps)) { + if (!RESERVED_PROPS.hasOwnProperty(propKey)) { + DOMPropertyOperations.deleteValueForAttribute(getNode(this), propKey); + } + } else if (DOMProperty.properties[propKey] || DOMProperty.isCustomAttribute(propKey)) { + DOMPropertyOperations.deleteValueForProperty(getNode(this), propKey); + } + } + for (propKey in nextProps) { + var nextProp = nextProps[propKey]; + var lastProp = + propKey === STYLE + ? this._previousStyleCopy + : lastProps != null + ? lastProps[propKey] + : undefined; + if ( + !nextProps.hasOwnProperty(propKey) || + nextProp === lastProp || + (nextProp == null && lastProp == null) + ) { + continue; + } + if (propKey === STYLE) { + if (nextProp) { + if (true) { + checkAndWarnForMutatedStyle(this._previousStyleCopy, this._previousStyle, this); + this._previousStyle = nextProp; + } + nextProp = this._previousStyleCopy = _assign({}, nextProp); + } else { + this._previousStyleCopy = null; + } + if (lastProp) { + // Unset styles on `lastProp` but not on `nextProp`. + for (styleName in lastProp) { + if ( + lastProp.hasOwnProperty(styleName) && + (!nextProp || !nextProp.hasOwnProperty(styleName)) + ) { + styleUpdates = styleUpdates || {}; + styleUpdates[styleName] = ''; + } + } + // Update styles that changed since `lastProp`. + for (styleName in nextProp) { + if (nextProp.hasOwnProperty(styleName) && lastProp[styleName] !== nextProp[styleName]) { + styleUpdates = styleUpdates || {}; + styleUpdates[styleName] = nextProp[styleName]; + } + } + } else { + // Relies on `updateStylesByID` not mutating `styleUpdates`. + styleUpdates = nextProp; + } + } else if (registrationNameModules.hasOwnProperty(propKey)) { + if (nextProp) { + enqueuePutListener(this, propKey, nextProp, transaction); + } else if (lastProp) { + deleteListener(this, propKey); + } + } else if (isCustomComponent(this._tag, nextProps)) { + if (!RESERVED_PROPS.hasOwnProperty(propKey)) { + DOMPropertyOperations.setValueForAttribute(getNode(this), propKey, nextProp); + } + } else if (DOMProperty.properties[propKey] || DOMProperty.isCustomAttribute(propKey)) { + var node = getNode(this); + // If we're updating to null or undefined, we should remove the property + // from the DOM node instead of inadvertently setting to a string. This + // brings us in line with the same behavior we have on initial render. + if (nextProp != null) { + DOMPropertyOperations.setValueForProperty(node, propKey, nextProp); + } else { + DOMPropertyOperations.deleteValueForProperty(node, propKey); + } + } + } + if (styleUpdates) { + CSSPropertyOperations.setValueForStyles(getNode(this), styleUpdates, this); + } + }, + + /** + * Reconciles the children with the various properties that affect the + * children content. + * + * @param {object} lastProps + * @param {object} nextProps + * @param {ReactReconcileTransaction} transaction + * @param {object} context + */ + _updateDOMChildren: function (lastProps, nextProps, transaction, context) { + var lastContent = CONTENT_TYPES[typeof lastProps.children] ? lastProps.children : null; + var nextContent = CONTENT_TYPES[typeof nextProps.children] ? nextProps.children : null; + + var lastHtml = lastProps.dangerouslySetInnerHTML && lastProps.dangerouslySetInnerHTML.__html; + var nextHtml = nextProps.dangerouslySetInnerHTML && nextProps.dangerouslySetInnerHTML.__html; + + // Note the use of `!=` which checks for null or undefined. + var lastChildren = lastContent != null ? null : lastProps.children; + var nextChildren = nextContent != null ? null : nextProps.children; + + // If we're switching from children to content/html or vice versa, remove + // the old content + var lastHasContentOrHtml = lastContent != null || lastHtml != null; + var nextHasContentOrHtml = nextContent != null || nextHtml != null; + if (lastChildren != null && nextChildren == null) { + this.updateChildren(null, transaction, context); + } else if (lastHasContentOrHtml && !nextHasContentOrHtml) { + this.updateTextContent(''); + if (true) { + ReactInstrumentation.debugTool.onSetChildren(this._debugID, []); + } + } + + if (nextContent != null) { + if (lastContent !== nextContent) { + this.updateTextContent('' + nextContent); + if (true) { + setAndValidateContentChildDev.call(this, nextContent); + } + } + } else if (nextHtml != null) { + if (lastHtml !== nextHtml) { + this.updateMarkup('' + nextHtml); + } + if (true) { + ReactInstrumentation.debugTool.onSetChildren(this._debugID, []); + } + } else if (nextChildren != null) { + if (true) { + setAndValidateContentChildDev.call(this, null); + } + + this.updateChildren(nextChildren, transaction, context); + } + }, + + getHostNode: function () { + return getNode(this); + }, + + /** + * Destroys all event registrations for this instance. Does not remove from + * the DOM. That must be done by the parent. + * + * @internal + */ + unmountComponent: function (safely) { + switch (this._tag) { + case 'audio': + case 'form': + case 'iframe': + case 'img': + case 'link': + case 'object': + case 'source': + case 'video': + var listeners = this._wrapperState.listeners; + if (listeners) { + for (var i = 0; i < listeners.length; i++) { + listeners[i].remove(); + } + } + break; + case 'html': + case 'head': + case 'body': + /** + * Components like <html> <head> and <body> can't be removed or added + * easily in a cross-browser way, however it's valuable to be able to + * take advantage of React's reconciliation for styling and <title> + * management. So we just document it and throw in dangerous cases. + */ + true + ? true + ? invariant( + false, + '<%s> tried to unmount. Because of cross-browser quirks it is impossible to unmount some top-level components (eg <html>, <head>, and <body>) reliably and efficiently. To fix this, have a single top-level component that never unmounts render these elements.', + this._tag, + ) + : _prodInvariant('66', this._tag) + : void 0; + break; + } + + this.unmountChildren(safely); + ReactDOMComponentTree.uncacheNode(this); + EventPluginHub.deleteAllListeners(this); + this._rootNodeID = 0; + this._domID = 0; + this._wrapperState = null; + + if (true) { + setAndValidateContentChildDev.call(this, null); + } + }, + + getPublicInstance: function () { + return getNode(this); + }, + }; + + _assign(ReactDOMComponent.prototype, ReactDOMComponent.Mixin, ReactMultiChild.Mixin); + + module.exports = ReactDOMComponent; + + /***/ + }, + /* 762 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2014-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var _assign = __webpack_require__(9); + + var DOMLazyTree = __webpack_require__(102); + var ReactDOMComponentTree = __webpack_require__(16); + + var ReactDOMEmptyComponent = function (instantiate) { + // ReactCompositeComponent uses this: + this._currentElement = null; + // ReactDOMComponentTree uses these: + this._hostNode = null; + this._hostParent = null; + this._hostContainerInfo = null; + this._domID = 0; + }; + _assign(ReactDOMEmptyComponent.prototype, { + mountComponent: function (transaction, hostParent, hostContainerInfo, context) { + var domID = hostContainerInfo._idCounter++; + this._domID = domID; + this._hostParent = hostParent; + this._hostContainerInfo = hostContainerInfo; + + var nodeValue = ' react-empty: ' + this._domID + ' '; + if (transaction.useCreateElement) { + var ownerDocument = hostContainerInfo._ownerDocument; + var node = ownerDocument.createComment(nodeValue); + ReactDOMComponentTree.precacheNode(this, node); + return DOMLazyTree(node); + } else { + if (transaction.renderToStaticMarkup) { + // Normally we'd insert a comment node, but since this is a situation + // where React won't take over (static pages), we can simply return + // nothing. + return ''; + } + return '<!--' + nodeValue + '-->'; + } + }, + receiveComponent: function () {}, + getHostNode: function () { + return ReactDOMComponentTree.getNodeFromInstance(this); + }, + unmountComponent: function () { + ReactDOMComponentTree.uncacheNode(this); + }, + }); + + module.exports = ReactDOMEmptyComponent; + + /***/ + }, + /* 763 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var ReactDOMFeatureFlags = { + useCreateElement: true, + useFiber: false, + }; + + module.exports = ReactDOMFeatureFlags; + + /***/ + }, + /* 764 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var DOMChildrenOperations = __webpack_require__(200); + var ReactDOMComponentTree = __webpack_require__(16); + + /** + * Operations used to process updates to DOM nodes. + */ + var ReactDOMIDOperations = { + /** + * Updates a component's children by processing a series of updates. + * + * @param {array<object>} updates List of update configurations. + * @internal + */ + dangerouslyProcessChildrenUpdates: function (parentInst, updates) { + var node = ReactDOMComponentTree.getNodeFromInstance(parentInst); + DOMChildrenOperations.processUpdates(node, updates); + }, + }; + + module.exports = ReactDOMIDOperations; + + /***/ + }, + /* 765 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var _prodInvariant = __webpack_require__(7), + _assign = __webpack_require__(9); + + var DOMPropertyOperations = __webpack_require__(315); + var LinkedValueUtils = __webpack_require__(204); + var ReactDOMComponentTree = __webpack_require__(16); + var ReactUpdates = __webpack_require__(34); + + var invariant = __webpack_require__(3); + var warning = __webpack_require__(4); + + var didWarnValueLink = false; + var didWarnCheckedLink = false; + var didWarnValueDefaultValue = false; + var didWarnCheckedDefaultChecked = false; + var didWarnControlledToUncontrolled = false; + var didWarnUncontrolledToControlled = false; + + function forceUpdateIfMounted() { + if (this._rootNodeID) { + // DOM component is still mounted; update + ReactDOMInput.updateWrapper(this); + } + } + + function isControlled(props) { + var usesChecked = props.type === 'checkbox' || props.type === 'radio'; + return usesChecked ? props.checked != null : props.value != null; + } + + /** + * Implements an <input> host component that allows setting these optional + * props: `checked`, `value`, `defaultChecked`, and `defaultValue`. + * + * If `checked` or `value` are not supplied (or null/undefined), user actions + * that affect the checked state or value will trigger updates to the element. + * + * If they are supplied (and not null/undefined), the rendered element will not + * trigger updates to the element. Instead, the props must change in order for + * the rendered element to be updated. + * + * The rendered element will be initialized as unchecked (or `defaultChecked`) + * with an empty value (or `defaultValue`). + * + * @see http://www.w3.org/TR/2012/WD-html5-20121025/the-input-element.html + */ + var ReactDOMInput = { + getHostProps: function (inst, props) { + var value = LinkedValueUtils.getValue(props); + var checked = LinkedValueUtils.getChecked(props); + + var hostProps = _assign( + { + // Make sure we set .type before any other properties (setting .value + // before .type means .value is lost in IE11 and below) + type: undefined, + // Make sure we set .step before .value (setting .value before .step + // means .value is rounded on mount, based upon step precision) + step: undefined, + // Make sure we set .min & .max before .value (to ensure proper order + // in corner cases such as min or max deriving from value, e.g. Issue #7170) + min: undefined, + max: undefined, + }, + props, + { + defaultChecked: undefined, + defaultValue: undefined, + value: value != null ? value : inst._wrapperState.initialValue, + checked: checked != null ? checked : inst._wrapperState.initialChecked, + onChange: inst._wrapperState.onChange, + }, + ); + + return hostProps; + }, + + mountWrapper: function (inst, props) { + if (true) { + LinkedValueUtils.checkPropTypes('input', props, inst._currentElement._owner); + + var owner = inst._currentElement._owner; + + if (props.valueLink !== undefined && !didWarnValueLink) { + true + ? warning( + false, + '`valueLink` prop on `input` is deprecated; set `value` and `onChange` instead.', + ) + : void 0; + didWarnValueLink = true; + } + if (props.checkedLink !== undefined && !didWarnCheckedLink) { + true + ? warning( + false, + '`checkedLink` prop on `input` is deprecated; set `value` and `onChange` instead.', + ) + : void 0; + didWarnCheckedLink = true; + } + if ( + props.checked !== undefined && + props.defaultChecked !== undefined && + !didWarnCheckedDefaultChecked + ) { + true + ? warning( + false, + '%s contains an input of type %s with both checked and defaultChecked props. ' + + 'Input elements must be either controlled or uncontrolled ' + + '(specify either the checked prop, or the defaultChecked prop, but not ' + + 'both). Decide between using a controlled or uncontrolled input ' + + 'element and remove one of these props. More info: ' + + 'https://fb.me/react-controlled-components', + (owner && owner.getName()) || 'A component', + props.type, + ) + : void 0; + didWarnCheckedDefaultChecked = true; + } + if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue) { + true + ? warning( + false, + '%s contains an input of type %s with both value and defaultValue props. ' + + 'Input elements must be either controlled or uncontrolled ' + + '(specify either the value prop, or the defaultValue prop, but not ' + + 'both). Decide between using a controlled or uncontrolled input ' + + 'element and remove one of these props. More info: ' + + 'https://fb.me/react-controlled-components', + (owner && owner.getName()) || 'A component', + props.type, + ) + : void 0; + didWarnValueDefaultValue = true; + } + } + + var defaultValue = props.defaultValue; + inst._wrapperState = { + initialChecked: props.checked != null ? props.checked : props.defaultChecked, + initialValue: props.value != null ? props.value : defaultValue, + listeners: null, + onChange: _handleChange.bind(inst), + controlled: isControlled(props), + }; + }, + + updateWrapper: function (inst) { + var props = inst._currentElement.props; + + if (true) { + var controlled = isControlled(props); + var owner = inst._currentElement._owner; + + if (!inst._wrapperState.controlled && controlled && !didWarnUncontrolledToControlled) { + true + ? warning( + false, + '%s is changing an uncontrolled input of type %s to be controlled. ' + + 'Input elements should not switch from uncontrolled to controlled (or vice versa). ' + + 'Decide between using a controlled or uncontrolled input ' + + 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components', + (owner && owner.getName()) || 'A component', + props.type, + ) + : void 0; + didWarnUncontrolledToControlled = true; + } + if (inst._wrapperState.controlled && !controlled && !didWarnControlledToUncontrolled) { + true + ? warning( + false, + '%s is changing a controlled input of type %s to be uncontrolled. ' + + 'Input elements should not switch from controlled to uncontrolled (or vice versa). ' + + 'Decide between using a controlled or uncontrolled input ' + + 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components', + (owner && owner.getName()) || 'A component', + props.type, + ) + : void 0; + didWarnControlledToUncontrolled = true; + } + } + + // TODO: Shouldn't this be getChecked(props)? + var checked = props.checked; + if (checked != null) { + DOMPropertyOperations.setValueForProperty( + ReactDOMComponentTree.getNodeFromInstance(inst), + 'checked', + checked || false, + ); + } + + var node = ReactDOMComponentTree.getNodeFromInstance(inst); + var value = LinkedValueUtils.getValue(props); + if (value != null) { + if (value === 0 && node.value === '') { + node.value = '0'; + // Note: IE9 reports a number inputs as 'text', so check props instead. + } else if (props.type === 'number') { + // Simulate `input.valueAsNumber`. IE9 does not support it + var valueAsNumber = parseFloat(node.value, 10) || 0; + + // eslint-disable-next-line + if (value != valueAsNumber) { + // Cast `value` to a string to ensure the value is set correctly. While + // browsers typically do this as necessary, jsdom doesn't. + node.value = '' + value; + } + // eslint-disable-next-line + } else if (value != node.value) { + // Cast `value` to a string to ensure the value is set correctly. While + // browsers typically do this as necessary, jsdom doesn't. + node.value = '' + value; + } + } else { + if (props.value == null && props.defaultValue != null) { + // In Chrome, assigning defaultValue to certain input types triggers input validation. + // For number inputs, the display value loses trailing decimal points. For email inputs, + // Chrome raises "The specified value <x> is not a valid email address". + // + // Here we check to see if the defaultValue has actually changed, avoiding these problems + // when the user is inputting text + // + // https://github.com/facebook/react/issues/7253 + if (node.defaultValue !== '' + props.defaultValue) { + node.defaultValue = '' + props.defaultValue; + } + } + if (props.checked == null && props.defaultChecked != null) { + node.defaultChecked = !!props.defaultChecked; + } + } + }, + + postMountWrapper: function (inst) { + var props = inst._currentElement.props; + + // This is in postMount because we need access to the DOM node, which is not + // available until after the component has mounted. + var node = ReactDOMComponentTree.getNodeFromInstance(inst); + + // Detach value from defaultValue. We won't do anything if we're working on + // submit or reset inputs as those values & defaultValues are linked. They + // are not resetable nodes so this operation doesn't matter and actually + // removes browser-default values (eg "Submit Query") when no value is + // provided. + + switch (props.type) { + case 'submit': + case 'reset': + break; + case 'color': + case 'date': + case 'datetime': + case 'datetime-local': + case 'month': + case 'time': + case 'week': + // This fixes the no-show issue on iOS Safari and Android Chrome: + // https://github.com/facebook/react/issues/7233 + node.value = ''; + node.value = node.defaultValue; + break; + default: + node.value = node.value; + break; + } + + // Normally, we'd just do `node.checked = node.checked` upon initial mount, less this bug + // this is needed to work around a chrome bug where setting defaultChecked + // will sometimes influence the value of checked (even after detachment). + // Reference: https://bugs.chromium.org/p/chromium/issues/detail?id=608416 + // We need to temporarily unset name to avoid disrupting radio button groups. + var name = node.name; + if (name !== '') { + node.name = ''; + } + node.defaultChecked = !node.defaultChecked; + node.defaultChecked = !node.defaultChecked; + if (name !== '') { + node.name = name; + } + }, + }; + + function _handleChange(event) { + var props = this._currentElement.props; + + var returnValue = LinkedValueUtils.executeOnChange(props, event); + + // Here we use asap to wait until all updates have propagated, which + // is important when using controlled components within layers: + // https://github.com/facebook/react/issues/1698 + ReactUpdates.asap(forceUpdateIfMounted, this); + + var name = props.name; + if (props.type === 'radio' && name != null) { + var rootNode = ReactDOMComponentTree.getNodeFromInstance(this); + var queryRoot = rootNode; + + while (queryRoot.parentNode) { + queryRoot = queryRoot.parentNode; + } + + // If `rootNode.form` was non-null, then we could try `form.elements`, + // but that sometimes behaves strangely in IE8. We could also try using + // `form.getElementsByName`, but that will only return direct children + // and won't include inputs that use the HTML5 `form=` attribute. Since + // the input might not even be in a form, let's just use the global + // `querySelectorAll` to ensure we don't miss anything. + var group = queryRoot.querySelectorAll( + 'input[name=' + JSON.stringify('' + name) + '][type="radio"]', + ); + + for (var i = 0; i < group.length; i++) { + var otherNode = group[i]; + if (otherNode === rootNode || otherNode.form !== rootNode.form) { + continue; + } + // This will throw if radio buttons rendered by different copies of React + // and the same name are rendered into the same form (same as #1939). + // That's probably okay; we don't support it just as we don't support + // mixing React radio buttons with non-React ones. + var otherInstance = ReactDOMComponentTree.getInstanceFromNode(otherNode); + !otherInstance + ? true + ? invariant( + false, + 'ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.', + ) + : _prodInvariant('90') + : void 0; + // If this is a controlled radio button group, forcing the input that + // was previously checked to update will cause it to be come re-checked + // as appropriate. + ReactUpdates.asap(forceUpdateIfMounted, otherInstance); + } + } + + return returnValue; + } + + module.exports = ReactDOMInput; + + /***/ + }, + /* 766 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var DOMProperty = __webpack_require__(68); + var ReactComponentTreeHook = __webpack_require__(24); + + var warning = __webpack_require__(4); + + var warnedProperties = {}; + var rARIA = new RegExp('^(aria)-[' + DOMProperty.ATTRIBUTE_NAME_CHAR + ']*$'); + + function validateProperty(tagName, name, debugID) { + if (warnedProperties.hasOwnProperty(name) && warnedProperties[name]) { + return true; + } + + if (rARIA.test(name)) { + var lowerCasedName = name.toLowerCase(); + var standardName = DOMProperty.getPossibleStandardName.hasOwnProperty(lowerCasedName) + ? DOMProperty.getPossibleStandardName[lowerCasedName] + : null; + + // If this is an aria-* attribute, but is not listed in the known DOM + // DOM properties, then it is an invalid aria-* attribute. + if (standardName == null) { + warnedProperties[name] = true; + return false; + } + // aria-* attributes should be lowercase; suggest the lowercase version. + if (name !== standardName) { + true + ? warning( + false, + 'Unknown ARIA attribute %s. Did you mean %s?%s', + name, + standardName, + ReactComponentTreeHook.getStackAddendumByID(debugID), + ) + : void 0; + warnedProperties[name] = true; + return true; + } + } + + return true; + } + + function warnInvalidARIAProps(debugID, element) { + var invalidProps = []; + + for (var key in element.props) { + var isValid = validateProperty(element.type, key, debugID); + if (!isValid) { + invalidProps.push(key); + } + } + + var unknownPropString = invalidProps + .map(function (prop) { + return '`' + prop + '`'; + }) + .join(', '); + + if (invalidProps.length === 1) { + true + ? warning( + false, + 'Invalid aria prop %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop%s', + unknownPropString, + element.type, + ReactComponentTreeHook.getStackAddendumByID(debugID), + ) + : void 0; + } else if (invalidProps.length > 1) { + true + ? warning( + false, + 'Invalid aria props %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop%s', + unknownPropString, + element.type, + ReactComponentTreeHook.getStackAddendumByID(debugID), + ) + : void 0; + } + } + + function handleElement(debugID, element) { + if (element == null || typeof element.type !== 'string') { + return; + } + if (element.type.indexOf('-') >= 0 || element.props.is) { + return; + } + + warnInvalidARIAProps(debugID, element); + } + + var ReactDOMInvalidARIAHook = { + onBeforeMountComponent: function (debugID, element) { + if (true) { + handleElement(debugID, element); + } + }, + onBeforeUpdateComponent: function (debugID, element) { + if (true) { + handleElement(debugID, element); + } + }, + }; + + module.exports = ReactDOMInvalidARIAHook; + + /***/ + }, + /* 767 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var ReactComponentTreeHook = __webpack_require__(24); + + var warning = __webpack_require__(4); + + var didWarnValueNull = false; + + function handleElement(debugID, element) { + if (element == null) { + return; + } + if (element.type !== 'input' && element.type !== 'textarea' && element.type !== 'select') { + return; + } + if (element.props != null && element.props.value === null && !didWarnValueNull) { + true + ? warning( + false, + '`value` prop on `%s` should not be null. ' + + 'Consider using the empty string to clear the component or `undefined` ' + + 'for uncontrolled components.%s', + element.type, + ReactComponentTreeHook.getStackAddendumByID(debugID), + ) + : void 0; + + didWarnValueNull = true; + } + } + + var ReactDOMNullInputValuePropHook = { + onBeforeMountComponent: function (debugID, element) { + handleElement(debugID, element); + }, + onBeforeUpdateComponent: function (debugID, element) { + handleElement(debugID, element); + }, + }; + + module.exports = ReactDOMNullInputValuePropHook; + + /***/ + }, + /* 768 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var _assign = __webpack_require__(9); + + var React = __webpack_require__(38); + var ReactDOMComponentTree = __webpack_require__(16); + var ReactDOMSelect = __webpack_require__(319); + + var warning = __webpack_require__(4); + var didWarnInvalidOptionChildren = false; + + function flattenChildren(children) { + var content = ''; + + // Flatten children and warn if they aren't strings or numbers; + // invalid types are ignored. + React.Children.forEach(children, function (child) { + if (child == null) { + return; + } + if (typeof child === 'string' || typeof child === 'number') { + content += child; + } else if (!didWarnInvalidOptionChildren) { + didWarnInvalidOptionChildren = true; + true ? warning(false, 'Only strings and numbers are supported as <option> children.') : void 0; + } + }); + + return content; + } + + /** + * Implements an <option> host component that warns when `selected` is set. + */ + var ReactDOMOption = { + mountWrapper: function (inst, props, hostParent) { + // TODO (yungsters): Remove support for `selected` in <option>. + if (true) { + true + ? warning( + props.selected == null, + 'Use the `defaultValue` or `value` props on <select> instead of ' + + 'setting `selected` on <option>.', + ) + : void 0; + } + + // Look up whether this option is 'selected' + var selectValue = null; + if (hostParent != null) { + var selectParent = hostParent; + + if (selectParent._tag === 'optgroup') { + selectParent = selectParent._hostParent; + } + + if (selectParent != null && selectParent._tag === 'select') { + selectValue = ReactDOMSelect.getSelectValueContext(selectParent); + } + } + + // If the value is null (e.g., no specified value or after initial mount) + // or missing (e.g., for <datalist>), we don't change props.selected + var selected = null; + if (selectValue != null) { + var value; + if (props.value != null) { + value = props.value + ''; + } else { + value = flattenChildren(props.children); + } + selected = false; + if (Array.isArray(selectValue)) { + // multiple + for (var i = 0; i < selectValue.length; i++) { + if ('' + selectValue[i] === value) { + selected = true; + break; + } + } + } else { + selected = '' + selectValue === value; + } + } + + inst._wrapperState = { selected: selected }; + }, + + postMountWrapper: function (inst) { + // value="" should make a value attribute (#6219) + var props = inst._currentElement.props; + if (props.value != null) { + var node = ReactDOMComponentTree.getNodeFromInstance(inst); + node.setAttribute('value', props.value); + } + }, + + getHostProps: function (inst, props) { + var hostProps = _assign({ selected: undefined, children: undefined }, props); + + // Read state only from initial mount because <select> updates value + // manually; we need the initial state only for server rendering + if (inst._wrapperState.selected != null) { + hostProps.selected = inst._wrapperState.selected; + } + + var content = flattenChildren(props.children); + + if (content) { + hostProps.children = content; + } + + return hostProps; + }, + }; + + module.exports = ReactDOMOption; + + /***/ + }, + /* 769 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var ExecutionEnvironment = __webpack_require__(17); + + var getNodeForCharacterOffset = __webpack_require__(810); + var getTextContentAccessor = __webpack_require__(338); + + /** + * While `isCollapsed` is available on the Selection object and `collapsed` + * is available on the Range object, IE11 sometimes gets them wrong. + * If the anchor/focus nodes and offsets are the same, the range is collapsed. + */ + function isCollapsed(anchorNode, anchorOffset, focusNode, focusOffset) { + return anchorNode === focusNode && anchorOffset === focusOffset; + } + + /** + * Get the appropriate anchor and focus node/offset pairs for IE. + * + * The catch here is that IE's selection API doesn't provide information + * about whether the selection is forward or backward, so we have to + * behave as though it's always forward. + * + * IE text differs from modern selection in that it behaves as though + * block elements end with a new line. This means character offsets will + * differ between the two APIs. + * + * @param {DOMElement} node + * @return {object} + */ + function getIEOffsets(node) { + var selection = document.selection; + var selectedRange = selection.createRange(); + var selectedLength = selectedRange.text.length; + + // Duplicate selection so we can move range without breaking user selection. + var fromStart = selectedRange.duplicate(); + fromStart.moveToElementText(node); + fromStart.setEndPoint('EndToStart', selectedRange); + + var startOffset = fromStart.text.length; + var endOffset = startOffset + selectedLength; + + return { + start: startOffset, + end: endOffset, + }; + } + + /** + * @param {DOMElement} node + * @return {?object} + */ + function getModernOffsets(node) { + var selection = window.getSelection && window.getSelection(); + + if (!selection || selection.rangeCount === 0) { + return null; + } + + var anchorNode = selection.anchorNode; + var anchorOffset = selection.anchorOffset; + var focusNode = selection.focusNode; + var focusOffset = selection.focusOffset; + + var currentRange = selection.getRangeAt(0); + + // In Firefox, range.startContainer and range.endContainer can be "anonymous + // divs", e.g. the up/down buttons on an <input type="number">. Anonymous + // divs do not seem to expose properties, triggering a "Permission denied + // error" if any of its properties are accessed. The only seemingly possible + // way to avoid erroring is to access a property that typically works for + // non-anonymous divs and catch any error that may otherwise arise. See + // https://bugzilla.mozilla.org/show_bug.cgi?id=208427 + try { + /* eslint-disable no-unused-expressions */ + currentRange.startContainer.nodeType; + currentRange.endContainer.nodeType; + /* eslint-enable no-unused-expressions */ + } catch (e) { + return null; + } + + // If the node and offset values are the same, the selection is collapsed. + // `Selection.isCollapsed` is available natively, but IE sometimes gets + // this value wrong. + var isSelectionCollapsed = isCollapsed( + selection.anchorNode, + selection.anchorOffset, + selection.focusNode, + selection.focusOffset, + ); + + var rangeLength = isSelectionCollapsed ? 0 : currentRange.toString().length; + + var tempRange = currentRange.cloneRange(); + tempRange.selectNodeContents(node); + tempRange.setEnd(currentRange.startContainer, currentRange.startOffset); + + var isTempRangeCollapsed = isCollapsed( + tempRange.startContainer, + tempRange.startOffset, + tempRange.endContainer, + tempRange.endOffset, + ); + + var start = isTempRangeCollapsed ? 0 : tempRange.toString().length; + var end = start + rangeLength; + + // Detect whether the selection is backward. + var detectionRange = document.createRange(); + detectionRange.setStart(anchorNode, anchorOffset); + detectionRange.setEnd(focusNode, focusOffset); + var isBackward = detectionRange.collapsed; + + return { + start: isBackward ? end : start, + end: isBackward ? start : end, + }; + } + + /** + * @param {DOMElement|DOMTextNode} node + * @param {object} offsets + */ + function setIEOffsets(node, offsets) { + var range = document.selection.createRange().duplicate(); + var start, end; + + if (offsets.end === undefined) { + start = offsets.start; + end = start; + } else if (offsets.start > offsets.end) { + start = offsets.end; + end = offsets.start; + } else { + start = offsets.start; + end = offsets.end; + } + + range.moveToElementText(node); + range.moveStart('character', start); + range.setEndPoint('EndToStart', range); + range.moveEnd('character', end - start); + range.select(); + } + + /** + * In modern non-IE browsers, we can support both forward and backward + * selections. + * + * Note: IE10+ supports the Selection object, but it does not support + * the `extend` method, which means that even in modern IE, it's not possible + * to programmatically create a backward selection. Thus, for all IE + * versions, we use the old IE API to create our selections. + * + * @param {DOMElement|DOMTextNode} node + * @param {object} offsets + */ + function setModernOffsets(node, offsets) { + if (!window.getSelection) { + return; + } + + var selection = window.getSelection(); + var length = node[getTextContentAccessor()].length; + var start = Math.min(offsets.start, length); + var end = offsets.end === undefined ? start : Math.min(offsets.end, length); + + // IE 11 uses modern selection, but doesn't support the extend method. + // Flip backward selections, so we can set with a single range. + if (!selection.extend && start > end) { + var temp = end; + end = start; + start = temp; + } + + var startMarker = getNodeForCharacterOffset(node, start); + var endMarker = getNodeForCharacterOffset(node, end); + + if (startMarker && endMarker) { + var range = document.createRange(); + range.setStart(startMarker.node, startMarker.offset); + selection.removeAllRanges(); + + if (start > end) { + selection.addRange(range); + selection.extend(endMarker.node, endMarker.offset); + } else { + range.setEnd(endMarker.node, endMarker.offset); + selection.addRange(range); + } + } + } + + var useIEOffsets = + ExecutionEnvironment.canUseDOM && 'selection' in document && !('getSelection' in window); + + var ReactDOMSelection = { + /** + * @param {DOMElement} node + */ + getOffsets: useIEOffsets ? getIEOffsets : getModernOffsets, + + /** + * @param {DOMElement|DOMTextNode} node + * @param {object} offsets + */ + setOffsets: useIEOffsets ? setIEOffsets : setModernOffsets, + }; + + module.exports = ReactDOMSelection; + + /***/ + }, + /* 770 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var ReactDefaultInjection = __webpack_require__(321); + var ReactServerRendering = __webpack_require__(787); + var ReactVersion = __webpack_require__(332); + + ReactDefaultInjection.inject(); + + var ReactDOMServer = { + renderToString: ReactServerRendering.renderToString, + renderToStaticMarkup: ReactServerRendering.renderToStaticMarkup, + version: ReactVersion, + }; + + module.exports = ReactDOMServer; + + /***/ + }, + /* 771 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var _prodInvariant = __webpack_require__(7), + _assign = __webpack_require__(9); + + var DOMChildrenOperations = __webpack_require__(200); + var DOMLazyTree = __webpack_require__(102); + var ReactDOMComponentTree = __webpack_require__(16); + + var escapeTextContentForBrowser = __webpack_require__(150); + var invariant = __webpack_require__(3); + var validateDOMNesting = __webpack_require__(217); + + /** + * Text nodes violate a couple assumptions that React makes about components: + * + * - When mounting text into the DOM, adjacent text nodes are merged. + * - Text nodes cannot be assigned a React root ID. + * + * This component is used to wrap strings between comment nodes so that they + * can undergo the same reconciliation that is applied to elements. + * + * TODO: Investigate representing React components in the DOM with text nodes. + * + * @class ReactDOMTextComponent + * @extends ReactComponent + * @internal + */ + var ReactDOMTextComponent = function (text) { + // TODO: This is really a ReactText (ReactNode), not a ReactElement + this._currentElement = text; + this._stringText = '' + text; + // ReactDOMComponentTree uses these: + this._hostNode = null; + this._hostParent = null; + + // Properties + this._domID = 0; + this._mountIndex = 0; + this._closingComment = null; + this._commentNodes = null; + }; + + _assign(ReactDOMTextComponent.prototype, { + /** + * Creates the markup for this text node. This node is not intended to have + * any features besides containing text content. + * + * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction + * @return {string} Markup for this text node. + * @internal + */ + mountComponent: function (transaction, hostParent, hostContainerInfo, context) { + if (true) { + var parentInfo; + if (hostParent != null) { + parentInfo = hostParent._ancestorInfo; + } else if (hostContainerInfo != null) { + parentInfo = hostContainerInfo._ancestorInfo; + } + if (parentInfo) { + // parentInfo should always be present except for the top-level + // component when server rendering + validateDOMNesting(null, this._stringText, this, parentInfo); + } + } + + var domID = hostContainerInfo._idCounter++; + var openingValue = ' react-text: ' + domID + ' '; + var closingValue = ' /react-text '; + this._domID = domID; + this._hostParent = hostParent; + if (transaction.useCreateElement) { + var ownerDocument = hostContainerInfo._ownerDocument; + var openingComment = ownerDocument.createComment(openingValue); + var closingComment = ownerDocument.createComment(closingValue); + var lazyTree = DOMLazyTree(ownerDocument.createDocumentFragment()); + DOMLazyTree.queueChild(lazyTree, DOMLazyTree(openingComment)); + if (this._stringText) { + DOMLazyTree.queueChild(lazyTree, DOMLazyTree(ownerDocument.createTextNode(this._stringText))); + } + DOMLazyTree.queueChild(lazyTree, DOMLazyTree(closingComment)); + ReactDOMComponentTree.precacheNode(this, openingComment); + this._closingComment = closingComment; + return lazyTree; + } else { + var escapedText = escapeTextContentForBrowser(this._stringText); + + if (transaction.renderToStaticMarkup) { + // Normally we'd wrap this between comment nodes for the reasons stated + // above, but since this is a situation where React won't take over + // (static pages), we can simply return the text as it is. + return escapedText; + } + + return '<!--' + openingValue + '-->' + escapedText + '<!--' + closingValue + '-->'; + } + }, + + /** + * Updates this component by updating the text content. + * + * @param {ReactText} nextText The next text content + * @param {ReactReconcileTransaction} transaction + * @internal + */ + receiveComponent: function (nextText, transaction) { + if (nextText !== this._currentElement) { + this._currentElement = nextText; + var nextStringText = '' + nextText; + if (nextStringText !== this._stringText) { + // TODO: Save this as pending props and use performUpdateIfNecessary + // and/or updateComponent to do the actual update for consistency with + // other component types? + this._stringText = nextStringText; + var commentNodes = this.getHostNode(); + DOMChildrenOperations.replaceDelimitedText(commentNodes[0], commentNodes[1], nextStringText); + } + } + }, + + getHostNode: function () { + var hostNode = this._commentNodes; + if (hostNode) { + return hostNode; + } + if (!this._closingComment) { + var openingComment = ReactDOMComponentTree.getNodeFromInstance(this); + var node = openingComment.nextSibling; + while (true) { + !(node != null) + ? true + ? invariant(false, 'Missing closing comment for text component %s', this._domID) + : _prodInvariant('67', this._domID) + : void 0; + if (node.nodeType === 8 && node.nodeValue === ' /react-text ') { + this._closingComment = node; + break; + } + node = node.nextSibling; + } + } + hostNode = [this._hostNode, this._closingComment]; + this._commentNodes = hostNode; + return hostNode; + }, + + unmountComponent: function () { + this._closingComment = null; + this._commentNodes = null; + ReactDOMComponentTree.uncacheNode(this); + }, + }); + + module.exports = ReactDOMTextComponent; + + /***/ + }, + /* 772 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var _prodInvariant = __webpack_require__(7), + _assign = __webpack_require__(9); + + var LinkedValueUtils = __webpack_require__(204); + var ReactDOMComponentTree = __webpack_require__(16); + var ReactUpdates = __webpack_require__(34); + + var invariant = __webpack_require__(3); + var warning = __webpack_require__(4); + + var didWarnValueLink = false; + var didWarnValDefaultVal = false; + + function forceUpdateIfMounted() { + if (this._rootNodeID) { + // DOM component is still mounted; update + ReactDOMTextarea.updateWrapper(this); + } + } + + /** + * Implements a <textarea> host component that allows setting `value`, and + * `defaultValue`. This differs from the traditional DOM API because value is + * usually set as PCDATA children. + * + * If `value` is not supplied (or null/undefined), user actions that affect the + * value will trigger updates to the element. + * + * If `value` is supplied (and not null/undefined), the rendered element will + * not trigger updates to the element. Instead, the `value` prop must change in + * order for the rendered element to be updated. + * + * The rendered element will be initialized with an empty value, the prop + * `defaultValue` if specified, or the children content (deprecated). + */ + var ReactDOMTextarea = { + getHostProps: function (inst, props) { + !(props.dangerouslySetInnerHTML == null) + ? true + ? invariant(false, '`dangerouslySetInnerHTML` does not make sense on <textarea>.') + : _prodInvariant('91') + : void 0; + + // Always set children to the same thing. In IE9, the selection range will + // get reset if `textContent` is mutated. We could add a check in setTextContent + // to only set the value if/when the value differs from the node value (which would + // completely solve this IE9 bug), but Sebastian+Ben seemed to like this solution. + // The value can be a boolean or object so that's why it's forced to be a string. + var hostProps = _assign({}, props, { + value: undefined, + defaultValue: undefined, + children: '' + inst._wrapperState.initialValue, + onChange: inst._wrapperState.onChange, + }); + + return hostProps; + }, + + mountWrapper: function (inst, props) { + if (true) { + LinkedValueUtils.checkPropTypes('textarea', props, inst._currentElement._owner); + if (props.valueLink !== undefined && !didWarnValueLink) { + true + ? warning( + false, + '`valueLink` prop on `textarea` is deprecated; set `value` and `onChange` instead.', + ) + : void 0; + didWarnValueLink = true; + } + if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValDefaultVal) { + true + ? warning( + false, + 'Textarea elements must be either controlled or uncontrolled ' + + '(specify either the value prop, or the defaultValue prop, but not ' + + 'both). Decide between using a controlled or uncontrolled textarea ' + + 'and remove one of these props. More info: ' + + 'https://fb.me/react-controlled-components', + ) + : void 0; + didWarnValDefaultVal = true; + } + } + + var value = LinkedValueUtils.getValue(props); + var initialValue = value; + + // Only bother fetching default value if we're going to use it + if (value == null) { + var defaultValue = props.defaultValue; + // TODO (yungsters): Remove support for children content in <textarea>. + var children = props.children; + if (children != null) { + if (true) { + true + ? warning( + false, + 'Use the `defaultValue` or `value` props instead of setting ' + + 'children on <textarea>.', + ) + : void 0; + } + !(defaultValue == null) + ? true + ? invariant(false, 'If you supply `defaultValue` on a <textarea>, do not pass children.') + : _prodInvariant('92') + : void 0; + if (Array.isArray(children)) { + !(children.length <= 1) + ? true + ? invariant(false, '<textarea> can only have at most one child.') + : _prodInvariant('93') + : void 0; + children = children[0]; + } + + defaultValue = '' + children; + } + if (defaultValue == null) { + defaultValue = ''; + } + initialValue = defaultValue; + } + + inst._wrapperState = { + initialValue: '' + initialValue, + listeners: null, + onChange: _handleChange.bind(inst), + }; + }, + + updateWrapper: function (inst) { + var props = inst._currentElement.props; + + var node = ReactDOMComponentTree.getNodeFromInstance(inst); + var value = LinkedValueUtils.getValue(props); + if (value != null) { + // Cast `value` to a string to ensure the value is set correctly. While + // browsers typically do this as necessary, jsdom doesn't. + var newValue = '' + value; + + // To avoid side effects (such as losing text selection), only set value if changed + if (newValue !== node.value) { + node.value = newValue; + } + if (props.defaultValue == null) { + node.defaultValue = newValue; + } + } + if (props.defaultValue != null) { + node.defaultValue = props.defaultValue; + } + }, + + postMountWrapper: function (inst) { + // This is in postMount because we need access to the DOM node, which is not + // available until after the component has mounted. + var node = ReactDOMComponentTree.getNodeFromInstance(inst); + var textContent = node.textContent; + + // Only set node.value if textContent is equal to the expected + // initial value. In IE10/IE11 there is a bug where the placeholder attribute + // will populate textContent as well. + // https://developer.microsoft.com/microsoft-edge/platform/issues/101525/ + if (textContent === inst._wrapperState.initialValue) { + node.value = textContent; + } + }, + }; + + function _handleChange(event) { + var props = this._currentElement.props; + var returnValue = LinkedValueUtils.executeOnChange(props, event); + ReactUpdates.asap(forceUpdateIfMounted, this); + return returnValue; + } + + module.exports = ReactDOMTextarea; + + /***/ + }, + /* 773 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var _prodInvariant = __webpack_require__(7); + + var invariant = __webpack_require__(3); + + /** + * Return the lowest common ancestor of A and B, or null if they are in + * different trees. + */ + function getLowestCommonAncestor(instA, instB) { + !('_hostNode' in instA) + ? true + ? invariant(false, 'getNodeFromInstance: Invalid argument.') + : _prodInvariant('33') + : void 0; + !('_hostNode' in instB) + ? true + ? invariant(false, 'getNodeFromInstance: Invalid argument.') + : _prodInvariant('33') + : void 0; + + var depthA = 0; + for (var tempA = instA; tempA; tempA = tempA._hostParent) { + depthA++; + } + var depthB = 0; + for (var tempB = instB; tempB; tempB = tempB._hostParent) { + depthB++; + } + + // If A is deeper, crawl up. + while (depthA - depthB > 0) { + instA = instA._hostParent; + depthA--; + } + + // If B is deeper, crawl up. + while (depthB - depthA > 0) { + instB = instB._hostParent; + depthB--; + } + + // Walk in lockstep until we find a match. + var depth = depthA; + while (depth--) { + if (instA === instB) { + return instA; + } + instA = instA._hostParent; + instB = instB._hostParent; + } + return null; + } + + /** + * Return if A is an ancestor of B. + */ + function isAncestor(instA, instB) { + !('_hostNode' in instA) + ? true + ? invariant(false, 'isAncestor: Invalid argument.') + : _prodInvariant('35') + : void 0; + !('_hostNode' in instB) + ? true + ? invariant(false, 'isAncestor: Invalid argument.') + : _prodInvariant('35') + : void 0; + + while (instB) { + if (instB === instA) { + return true; + } + instB = instB._hostParent; + } + return false; + } + + /** + * Return the parent instance of the passed-in instance. + */ + function getParentInstance(inst) { + !('_hostNode' in inst) + ? true + ? invariant(false, 'getParentInstance: Invalid argument.') + : _prodInvariant('36') + : void 0; + + return inst._hostParent; + } + + /** + * Simulates the traversal of a two-phase, capture/bubble event dispatch. + */ + function traverseTwoPhase(inst, fn, arg) { + var path = []; + while (inst) { + path.push(inst); + inst = inst._hostParent; + } + var i; + for (i = path.length; i-- > 0; ) { + fn(path[i], 'captured', arg); + } + for (i = 0; i < path.length; i++) { + fn(path[i], 'bubbled', arg); + } + } + + /** + * Traverses the ID hierarchy and invokes the supplied `cb` on any IDs that + * should would receive a `mouseEnter` or `mouseLeave` event. + * + * Does not invoke the callback on the nearest common ancestor because nothing + * "entered" or "left" that element. + */ + function traverseEnterLeave(from, to, fn, argFrom, argTo) { + var common = from && to ? getLowestCommonAncestor(from, to) : null; + var pathFrom = []; + while (from && from !== common) { + pathFrom.push(from); + from = from._hostParent; + } + var pathTo = []; + while (to && to !== common) { + pathTo.push(to); + to = to._hostParent; + } + var i; + for (i = 0; i < pathFrom.length; i++) { + fn(pathFrom[i], 'bubbled', argFrom); + } + for (i = pathTo.length; i-- > 0; ) { + fn(pathTo[i], 'captured', argTo); + } + } + + module.exports = { + isAncestor: isAncestor, + getLowestCommonAncestor: getLowestCommonAncestor, + getParentInstance: getParentInstance, + traverseTwoPhase: traverseTwoPhase, + traverseEnterLeave: traverseEnterLeave, + }; + + /***/ + }, + /* 774 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var DOMProperty = __webpack_require__(68); + var EventPluginRegistry = __webpack_require__(123); + var ReactComponentTreeHook = __webpack_require__(24); + + var warning = __webpack_require__(4); + + if (true) { + var reactProps = { + children: true, + dangerouslySetInnerHTML: true, + key: true, + ref: true, + + autoFocus: true, + defaultValue: true, + valueLink: true, + defaultChecked: true, + checkedLink: true, + innerHTML: true, + suppressContentEditableWarning: true, + onFocusIn: true, + onFocusOut: true, + }; + var warnedProperties = {}; + + var validateProperty = function (tagName, name, debugID) { + if (DOMProperty.properties.hasOwnProperty(name) || DOMProperty.isCustomAttribute(name)) { + return true; + } + if ( + (reactProps.hasOwnProperty(name) && reactProps[name]) || + (warnedProperties.hasOwnProperty(name) && warnedProperties[name]) + ) { + return true; + } + if (EventPluginRegistry.registrationNameModules.hasOwnProperty(name)) { + return true; + } + warnedProperties[name] = true; + var lowerCasedName = name.toLowerCase(); + + // data-* attributes should be lowercase; suggest the lowercase version + var standardName = DOMProperty.isCustomAttribute(lowerCasedName) + ? lowerCasedName + : DOMProperty.getPossibleStandardName.hasOwnProperty(lowerCasedName) + ? DOMProperty.getPossibleStandardName[lowerCasedName] + : null; + + var registrationName = EventPluginRegistry.possibleRegistrationNames.hasOwnProperty(lowerCasedName) + ? EventPluginRegistry.possibleRegistrationNames[lowerCasedName] + : null; + + if (standardName != null) { + true + ? warning( + false, + 'Unknown DOM property %s. Did you mean %s?%s', + name, + standardName, + ReactComponentTreeHook.getStackAddendumByID(debugID), + ) + : void 0; + return true; + } else if (registrationName != null) { + true + ? warning( + false, + 'Unknown event handler property %s. Did you mean `%s`?%s', + name, + registrationName, + ReactComponentTreeHook.getStackAddendumByID(debugID), + ) + : void 0; + return true; + } else { + // We were unable to guess which prop the user intended. + // It is likely that the user was just blindly spreading/forwarding props + // Components should be careful to only render valid props/attributes. + // Warning will be invoked in warnUnknownProperties to allow grouping. + return false; + } + }; + } + + var warnUnknownProperties = function (debugID, element) { + var unknownProps = []; + for (var key in element.props) { + var isValid = validateProperty(element.type, key, debugID); + if (!isValid) { + unknownProps.push(key); + } + } + + var unknownPropString = unknownProps + .map(function (prop) { + return '`' + prop + '`'; + }) + .join(', '); + + if (unknownProps.length === 1) { + true + ? warning( + false, + 'Unknown prop %s on <%s> tag. Remove this prop from the element. ' + + 'For details, see https://fb.me/react-unknown-prop%s', + unknownPropString, + element.type, + ReactComponentTreeHook.getStackAddendumByID(debugID), + ) + : void 0; + } else if (unknownProps.length > 1) { + true + ? warning( + false, + 'Unknown props %s on <%s> tag. Remove these props from the element. ' + + 'For details, see https://fb.me/react-unknown-prop%s', + unknownPropString, + element.type, + ReactComponentTreeHook.getStackAddendumByID(debugID), + ) + : void 0; + } + }; + + function handleElement(debugID, element) { + if (element == null || typeof element.type !== 'string') { + return; + } + if (element.type.indexOf('-') >= 0 || element.props.is) { + return; + } + warnUnknownProperties(debugID, element); + } + + var ReactDOMUnknownPropertyHook = { + onBeforeMountComponent: function (debugID, element) { + handleElement(debugID, element); + }, + onBeforeUpdateComponent: function (debugID, element) { + handleElement(debugID, element); + }, + }; + + module.exports = ReactDOMUnknownPropertyHook; + + /***/ + }, + /* 775 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2014-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + // The Symbol used to tag the ReactElement type. If there is no native Symbol + // nor polyfill, then a plain number is used for performance. + + var REACT_ELEMENT_TYPE = + (typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.element')) || 0xeac7; + + module.exports = REACT_ELEMENT_TYPE; + + /***/ + }, + /* 776 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var EventPluginHub = __webpack_require__(103); + + function runEventQueueInBatch(events) { + EventPluginHub.enqueueEvents(events); + EventPluginHub.processEventQueue(false); + } + + var ReactEventEmitterMixin = { + /** + * Streams a fired top-level event to `EventPluginHub` where plugins have the + * opportunity to create `ReactEvent`s to be dispatched. + */ + handleTopLevel: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) { + var events = EventPluginHub.extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget); + runEventQueueInBatch(events); + }, + }; + + module.exports = ReactEventEmitterMixin; + + /***/ + }, + /* 777 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var _assign = __webpack_require__(9); + + var EventListener = __webpack_require__(301); + var ExecutionEnvironment = __webpack_require__(17); + var PooledClass = __webpack_require__(85); + var ReactDOMComponentTree = __webpack_require__(16); + var ReactUpdates = __webpack_require__(34); + + var getEventTarget = __webpack_require__(213); + var getUnboundedScrollPosition = __webpack_require__(715); + + /** + * Find the deepest React component completely containing the root of the + * passed-in instance (for use when entire React trees are nested within each + * other). If React trees are not nested, returns null. + */ + function findParent(inst) { + // TODO: It may be a good idea to cache this to prevent unnecessary DOM + // traversal, but caching is difficult to do correctly without using a + // mutation observer to listen for all DOM changes. + while (inst._hostParent) { + inst = inst._hostParent; + } + var rootNode = ReactDOMComponentTree.getNodeFromInstance(inst); + var container = rootNode.parentNode; + return ReactDOMComponentTree.getClosestInstanceFromNode(container); + } + + // Used to store ancestor hierarchy in top level callback + function TopLevelCallbackBookKeeping(topLevelType, nativeEvent) { + this.topLevelType = topLevelType; + this.nativeEvent = nativeEvent; + this.ancestors = []; + } + _assign(TopLevelCallbackBookKeeping.prototype, { + destructor: function () { + this.topLevelType = null; + this.nativeEvent = null; + this.ancestors.length = 0; + }, + }); + PooledClass.addPoolingTo(TopLevelCallbackBookKeeping, PooledClass.twoArgumentPooler); + + function handleTopLevelImpl(bookKeeping) { + var nativeEventTarget = getEventTarget(bookKeeping.nativeEvent); + var targetInst = ReactDOMComponentTree.getClosestInstanceFromNode(nativeEventTarget); + + // Loop through the hierarchy, in case there's any nested components. + // It's important that we build the array of ancestors before calling any + // event handlers, because event handlers can modify the DOM, leading to + // inconsistencies with ReactMount's node cache. See #1105. + var ancestor = targetInst; + do { + bookKeeping.ancestors.push(ancestor); + ancestor = ancestor && findParent(ancestor); + } while (ancestor); + + for (var i = 0; i < bookKeeping.ancestors.length; i++) { + targetInst = bookKeeping.ancestors[i]; + ReactEventListener._handleTopLevel( + bookKeeping.topLevelType, + targetInst, + bookKeeping.nativeEvent, + getEventTarget(bookKeeping.nativeEvent), + ); + } + } + + function scrollValueMonitor(cb) { + var scrollPosition = getUnboundedScrollPosition(window); + cb(scrollPosition); + } + + var ReactEventListener = { + _enabled: true, + _handleTopLevel: null, + + WINDOW_HANDLE: ExecutionEnvironment.canUseDOM ? window : null, + + setHandleTopLevel: function (handleTopLevel) { + ReactEventListener._handleTopLevel = handleTopLevel; + }, + + setEnabled: function (enabled) { + ReactEventListener._enabled = !!enabled; + }, + + isEnabled: function () { + return ReactEventListener._enabled; + }, + + /** + * Traps top-level events by using event bubbling. + * + * @param {string} topLevelType Record from `EventConstants`. + * @param {string} handlerBaseName Event name (e.g. "click"). + * @param {object} element Element on which to attach listener. + * @return {?object} An object with a remove function which will forcefully + * remove the listener. + * @internal + */ + trapBubbledEvent: function (topLevelType, handlerBaseName, element) { + if (!element) { + return null; + } + return EventListener.listen( + element, + handlerBaseName, + ReactEventListener.dispatchEvent.bind(null, topLevelType), + ); + }, + + /** + * Traps a top-level event by using event capturing. + * + * @param {string} topLevelType Record from `EventConstants`. + * @param {string} handlerBaseName Event name (e.g. "click"). + * @param {object} element Element on which to attach listener. + * @return {?object} An object with a remove function which will forcefully + * remove the listener. + * @internal + */ + trapCapturedEvent: function (topLevelType, handlerBaseName, element) { + if (!element) { + return null; + } + return EventListener.capture( + element, + handlerBaseName, + ReactEventListener.dispatchEvent.bind(null, topLevelType), + ); + }, + + monitorScrollValue: function (refresh) { + var callback = scrollValueMonitor.bind(null, refresh); + EventListener.listen(window, 'scroll', callback); + }, + + dispatchEvent: function (topLevelType, nativeEvent) { + if (!ReactEventListener._enabled) { + return; + } + + var bookKeeping = TopLevelCallbackBookKeeping.getPooled(topLevelType, nativeEvent); + try { + // Event queue being processed in the same cycle allows + // `preventDefault`. + ReactUpdates.batchedUpdates(handleTopLevelImpl, bookKeeping); + } finally { + TopLevelCallbackBookKeeping.release(bookKeeping); + } + }, + }; + + module.exports = ReactEventListener; + + /***/ + }, + /* 778 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2016-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + var history = []; + + var ReactHostOperationHistoryHook = { + onHostOperation: function (operation) { + history.push(operation); + }, + clearHistory: function () { + if (ReactHostOperationHistoryHook._preventClearing) { + // Should only be used for tests. + return; + } + + history = []; + }, + getHistory: function () { + return history; + }, + }; + + module.exports = ReactHostOperationHistoryHook; + + /***/ + }, + /* 779 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var DOMProperty = __webpack_require__(68); + var EventPluginHub = __webpack_require__(103); + var EventPluginUtils = __webpack_require__(202); + var ReactComponentEnvironment = __webpack_require__(205); + var ReactEmptyComponent = __webpack_require__(322); + var ReactBrowserEventEmitter = __webpack_require__(124); + var ReactHostComponent = __webpack_require__(324); + var ReactUpdates = __webpack_require__(34); + + var ReactInjection = { + Component: ReactComponentEnvironment.injection, + DOMProperty: DOMProperty.injection, + EmptyComponent: ReactEmptyComponent.injection, + EventPluginHub: EventPluginHub.injection, + EventPluginUtils: EventPluginUtils.injection, + EventEmitter: ReactBrowserEventEmitter.injection, + HostComponent: ReactHostComponent.injection, + Updates: ReactUpdates.injection, + }; + + module.exports = ReactInjection; + + /***/ + }, + /* 780 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2016-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + var warning = __webpack_require__(4); + + if (true) { + var processingChildContext = false; + + var warnInvalidSetState = function () { + true + ? warning( + !processingChildContext, + 'setState(...): Cannot call setState() inside getChildContext()', + ) + : void 0; + }; + } + + var ReactInvalidSetStateWarningHook = { + onBeginProcessingChildContext: function () { + processingChildContext = true; + }, + onEndProcessingChildContext: function () { + processingChildContext = false; + }, + onSetState: function () { + warnInvalidSetState(); + }, + }; + + module.exports = ReactInvalidSetStateWarningHook; + + /***/ + }, + /* 781 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var _prodInvariant = __webpack_require__(7); + + var ReactComponentEnvironment = __webpack_require__(205); + var ReactInstanceMap = __webpack_require__(105); + var ReactInstrumentation = __webpack_require__(33); + + var ReactCurrentOwner = __webpack_require__(53); + var ReactReconciler = __webpack_require__(69); + var ReactChildReconciler = __webpack_require__(759); + + var emptyFunction = __webpack_require__(22); + var flattenChildren = __webpack_require__(807); + var invariant = __webpack_require__(3); + + /** + * Make an update for markup to be rendered and inserted at a supplied index. + * + * @param {string} markup Markup that renders into an element. + * @param {number} toIndex Destination index. + * @private + */ + function makeInsertMarkup(markup, afterNode, toIndex) { + // NOTE: Null values reduce hidden classes. + return { + type: 'INSERT_MARKUP', + content: markup, + fromIndex: null, + fromNode: null, + toIndex: toIndex, + afterNode: afterNode, + }; + } + + /** + * Make an update for moving an existing element to another index. + * + * @param {number} fromIndex Source index of the existing element. + * @param {number} toIndex Destination index of the element. + * @private + */ + function makeMove(child, afterNode, toIndex) { + // NOTE: Null values reduce hidden classes. + return { + type: 'MOVE_EXISTING', + content: null, + fromIndex: child._mountIndex, + fromNode: ReactReconciler.getHostNode(child), + toIndex: toIndex, + afterNode: afterNode, + }; + } + + /** + * Make an update for removing an element at an index. + * + * @param {number} fromIndex Index of the element to remove. + * @private + */ + function makeRemove(child, node) { + // NOTE: Null values reduce hidden classes. + return { + type: 'REMOVE_NODE', + content: null, + fromIndex: child._mountIndex, + fromNode: node, + toIndex: null, + afterNode: null, + }; + } + + /** + * Make an update for setting the markup of a node. + * + * @param {string} markup Markup that renders into an element. + * @private + */ + function makeSetMarkup(markup) { + // NOTE: Null values reduce hidden classes. + return { + type: 'SET_MARKUP', + content: markup, + fromIndex: null, + fromNode: null, + toIndex: null, + afterNode: null, + }; + } + + /** + * Make an update for setting the text content. + * + * @param {string} textContent Text content to set. + * @private + */ + function makeTextContent(textContent) { + // NOTE: Null values reduce hidden classes. + return { + type: 'TEXT_CONTENT', + content: textContent, + fromIndex: null, + fromNode: null, + toIndex: null, + afterNode: null, + }; + } + + /** + * Push an update, if any, onto the queue. Creates a new queue if none is + * passed and always returns the queue. Mutative. + */ + function enqueue(queue, update) { + if (update) { + queue = queue || []; + queue.push(update); + } + return queue; + } + + /** + * Processes any enqueued updates. + * + * @private + */ + function processQueue(inst, updateQueue) { + ReactComponentEnvironment.processChildrenUpdates(inst, updateQueue); + } + + var setChildrenForInstrumentation = emptyFunction; + if (true) { + var getDebugID = function (inst) { + if (!inst._debugID) { + // Check for ART-like instances. TODO: This is silly/gross. + var internal; + if ((internal = ReactInstanceMap.get(inst))) { + inst = internal; + } + } + return inst._debugID; + }; + setChildrenForInstrumentation = function (children) { + var debugID = getDebugID(this); + // TODO: React Native empty components are also multichild. + // This means they still get into this method but don't have _debugID. + if (debugID !== 0) { + ReactInstrumentation.debugTool.onSetChildren( + debugID, + children + ? Object.keys(children).map(function (key) { + return children[key]._debugID; + }) + : [], + ); + } + }; + } + + /** + * ReactMultiChild are capable of reconciling multiple children. + * + * @class ReactMultiChild + * @internal + */ + var ReactMultiChild = { + /** + * Provides common functionality for components that must reconcile multiple + * children. This is used by `ReactDOMComponent` to mount, update, and + * unmount child components. + * + * @lends {ReactMultiChild.prototype} + */ + Mixin: { + _reconcilerInstantiateChildren: function (nestedChildren, transaction, context) { + if (true) { + var selfDebugID = getDebugID(this); + if (this._currentElement) { + try { + ReactCurrentOwner.current = this._currentElement._owner; + return ReactChildReconciler.instantiateChildren( + nestedChildren, + transaction, + context, + selfDebugID, + ); + } finally { + ReactCurrentOwner.current = null; + } + } + } + return ReactChildReconciler.instantiateChildren(nestedChildren, transaction, context); + }, + + _reconcilerUpdateChildren: function ( + prevChildren, + nextNestedChildrenElements, + mountImages, + removedNodes, + transaction, + context, + ) { + var nextChildren; + var selfDebugID = 0; + if (true) { + selfDebugID = getDebugID(this); + if (this._currentElement) { + try { + ReactCurrentOwner.current = this._currentElement._owner; + nextChildren = flattenChildren(nextNestedChildrenElements, selfDebugID); + } finally { + ReactCurrentOwner.current = null; + } + ReactChildReconciler.updateChildren( + prevChildren, + nextChildren, + mountImages, + removedNodes, + transaction, + this, + this._hostContainerInfo, + context, + selfDebugID, + ); + return nextChildren; + } + } + nextChildren = flattenChildren(nextNestedChildrenElements, selfDebugID); + ReactChildReconciler.updateChildren( + prevChildren, + nextChildren, + mountImages, + removedNodes, + transaction, + this, + this._hostContainerInfo, + context, + selfDebugID, + ); + return nextChildren; + }, + + /** + * Generates a "mount image" for each of the supplied children. In the case + * of `ReactDOMComponent`, a mount image is a string of markup. + * + * @param {?object} nestedChildren Nested child maps. + * @return {array} An array of mounted representations. + * @internal + */ + mountChildren: function (nestedChildren, transaction, context) { + var children = this._reconcilerInstantiateChildren(nestedChildren, transaction, context); + this._renderedChildren = children; + + var mountImages = []; + var index = 0; + for (var name in children) { + if (children.hasOwnProperty(name)) { + var child = children[name]; + var selfDebugID = 0; + if (true) { + selfDebugID = getDebugID(this); + } + var mountImage = ReactReconciler.mountComponent( + child, + transaction, + this, + this._hostContainerInfo, + context, + selfDebugID, + ); + child._mountIndex = index++; + mountImages.push(mountImage); + } + } + + if (true) { + setChildrenForInstrumentation.call(this, children); + } + + return mountImages; + }, + + /** + * Replaces any rendered children with a text content string. + * + * @param {string} nextContent String of content. + * @internal + */ + updateTextContent: function (nextContent) { + var prevChildren = this._renderedChildren; + // Remove any rendered children. + ReactChildReconciler.unmountChildren(prevChildren, false); + for (var name in prevChildren) { + if (prevChildren.hasOwnProperty(name)) { + true + ? true + ? invariant(false, 'updateTextContent called on non-empty component.') + : _prodInvariant('118') + : void 0; + } + } + // Set new text content. + var updates = [makeTextContent(nextContent)]; + processQueue(this, updates); + }, + + /** + * Replaces any rendered children with a markup string. + * + * @param {string} nextMarkup String of markup. + * @internal + */ + updateMarkup: function (nextMarkup) { + var prevChildren = this._renderedChildren; + // Remove any rendered children. + ReactChildReconciler.unmountChildren(prevChildren, false); + for (var name in prevChildren) { + if (prevChildren.hasOwnProperty(name)) { + true + ? true + ? invariant(false, 'updateTextContent called on non-empty component.') + : _prodInvariant('118') + : void 0; + } + } + var updates = [makeSetMarkup(nextMarkup)]; + processQueue(this, updates); + }, + + /** + * Updates the rendered children with new children. + * + * @param {?object} nextNestedChildrenElements Nested child element maps. + * @param {ReactReconcileTransaction} transaction + * @internal + */ + updateChildren: function (nextNestedChildrenElements, transaction, context) { + // Hook used by React ART + this._updateChildren(nextNestedChildrenElements, transaction, context); + }, + + /** + * @param {?object} nextNestedChildrenElements Nested child element maps. + * @param {ReactReconcileTransaction} transaction + * @final + * @protected + */ + _updateChildren: function (nextNestedChildrenElements, transaction, context) { + var prevChildren = this._renderedChildren; + var removedNodes = {}; + var mountImages = []; + var nextChildren = this._reconcilerUpdateChildren( + prevChildren, + nextNestedChildrenElements, + mountImages, + removedNodes, + transaction, + context, + ); + if (!nextChildren && !prevChildren) { + return; + } + var updates = null; + var name; + // `nextIndex` will increment for each child in `nextChildren`, but + // `lastIndex` will be the last index visited in `prevChildren`. + var nextIndex = 0; + var lastIndex = 0; + // `nextMountIndex` will increment for each newly mounted child. + var nextMountIndex = 0; + var lastPlacedNode = null; + for (name in nextChildren) { + if (!nextChildren.hasOwnProperty(name)) { + continue; + } + var prevChild = prevChildren && prevChildren[name]; + var nextChild = nextChildren[name]; + if (prevChild === nextChild) { + updates = enqueue(updates, this.moveChild(prevChild, lastPlacedNode, nextIndex, lastIndex)); + lastIndex = Math.max(prevChild._mountIndex, lastIndex); + prevChild._mountIndex = nextIndex; + } else { + if (prevChild) { + // Update `lastIndex` before `_mountIndex` gets unset by unmounting. + lastIndex = Math.max(prevChild._mountIndex, lastIndex); + // The `removedNodes` loop below will actually remove the child. + } + // The child must be instantiated before it's mounted. + updates = enqueue( + updates, + this._mountChildAtIndex( + nextChild, + mountImages[nextMountIndex], + lastPlacedNode, + nextIndex, + transaction, + context, + ), + ); + nextMountIndex++; + } + nextIndex++; + lastPlacedNode = ReactReconciler.getHostNode(nextChild); + } + // Remove children that are no longer present. + for (name in removedNodes) { + if (removedNodes.hasOwnProperty(name)) { + updates = enqueue(updates, this._unmountChild(prevChildren[name], removedNodes[name])); + } + } + if (updates) { + processQueue(this, updates); + } + this._renderedChildren = nextChildren; + + if (true) { + setChildrenForInstrumentation.call(this, nextChildren); + } + }, + + /** + * Unmounts all rendered children. This should be used to clean up children + * when this component is unmounted. It does not actually perform any + * backend operations. + * + * @internal + */ + unmountChildren: function (safely) { + var renderedChildren = this._renderedChildren; + ReactChildReconciler.unmountChildren(renderedChildren, safely); + this._renderedChildren = null; + }, + + /** + * Moves a child component to the supplied index. + * + * @param {ReactComponent} child Component to move. + * @param {number} toIndex Destination index of the element. + * @param {number} lastIndex Last index visited of the siblings of `child`. + * @protected + */ + moveChild: function (child, afterNode, toIndex, lastIndex) { + // If the index of `child` is less than `lastIndex`, then it needs to + // be moved. Otherwise, we do not need to move it because a child will be + // inserted or moved before `child`. + if (child._mountIndex < lastIndex) { + return makeMove(child, afterNode, toIndex); + } + }, + + /** + * Creates a child component. + * + * @param {ReactComponent} child Component to create. + * @param {string} mountImage Markup to insert. + * @protected + */ + createChild: function (child, afterNode, mountImage) { + return makeInsertMarkup(mountImage, afterNode, child._mountIndex); + }, + + /** + * Removes a child component. + * + * @param {ReactComponent} child Child to remove. + * @protected + */ + removeChild: function (child, node) { + return makeRemove(child, node); + }, + + /** + * Mounts a child with the supplied name. + * + * NOTE: This is part of `updateChildren` and is here for readability. + * + * @param {ReactComponent} child Component to mount. + * @param {string} name Name of the child. + * @param {number} index Index at which to insert the child. + * @param {ReactReconcileTransaction} transaction + * @private + */ + _mountChildAtIndex: function (child, mountImage, afterNode, index, transaction, context) { + child._mountIndex = index; + return this.createChild(child, afterNode, mountImage); + }, + + /** + * Unmounts a rendered child. + * + * NOTE: This is part of `updateChildren` and is here for readability. + * + * @param {ReactComponent} child Component to unmount. + * @private + */ + _unmountChild: function (child, node) { + var update = this.removeChild(child, node); + child._mountIndex = null; + return update; + }, + }, + }; + + module.exports = ReactMultiChild; + + /***/ + }, + /* 782 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + var _prodInvariant = __webpack_require__(7); + + var invariant = __webpack_require__(3); + + /** + * @param {?object} object + * @return {boolean} True if `object` is a valid owner. + * @final + */ + function isValidOwner(object) { + return !!(object && typeof object.attachRef === 'function' && typeof object.detachRef === 'function'); + } + + /** + * ReactOwners are capable of storing references to owned components. + * + * All components are capable of //being// referenced by owner components, but + * only ReactOwner components are capable of //referencing// owned components. + * The named reference is known as a "ref". + * + * Refs are available when mounted and updated during reconciliation. + * + * var MyComponent = React.createClass({ + * render: function() { + * return ( + * <div onClick={this.handleClick}> + * <CustomComponent ref="custom" /> + * </div> + * ); + * }, + * handleClick: function() { + * this.refs.custom.handleClick(); + * }, + * componentDidMount: function() { + * this.refs.custom.initialize(); + * } + * }); + * + * Refs should rarely be used. When refs are used, they should only be done to + * control data that is not handled by React's data flow. + * + * @class ReactOwner + */ + var ReactOwner = { + /** + * Adds a component by ref to an owner component. + * + * @param {ReactComponent} component Component to reference. + * @param {string} ref Name by which to refer to the component. + * @param {ReactOwner} owner Component on which to record the ref. + * @final + * @internal + */ + addComponentAsRefTo: function (component, ref, owner) { + !isValidOwner(owner) + ? true + ? invariant( + false, + "addComponentAsRefTo(...): Only a ReactOwner can have refs. You might be adding a ref to a component that was not created inside a component's `render` method, or you have multiple copies of React loaded (details: https://fb.me/react-refs-must-have-owner).", + ) + : _prodInvariant('119') + : void 0; + owner.attachRef(ref, component); + }, + + /** + * Removes a component by ref from an owner component. + * + * @param {ReactComponent} component Component to dereference. + * @param {string} ref Name of the ref to remove. + * @param {ReactOwner} owner Component on which the ref is recorded. + * @final + * @internal + */ + removeComponentAsRefFrom: function (component, ref, owner) { + !isValidOwner(owner) + ? true + ? invariant( + false, + "removeComponentAsRefFrom(...): Only a ReactOwner can have refs. You might be removing a ref to a component that was not created inside a component's `render` method, or you have multiple copies of React loaded (details: https://fb.me/react-refs-must-have-owner).", + ) + : _prodInvariant('120') + : void 0; + var ownerPublicInstance = owner.getPublicInstance(); + // Check that `component`'s owner is still alive and that `component` is still the current ref + // because we do not want to detach the ref if another component stole it. + if (ownerPublicInstance && ownerPublicInstance.refs[ref] === component.getPublicInstance()) { + owner.detachRef(ref); + } + }, + }; + + module.exports = ReactOwner; + + /***/ + }, + /* 783 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2016-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + var _assign = __webpack_require__(9); + + var _extends = + _assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + var ReactDebugTool = __webpack_require__(320); + var warning = __webpack_require__(4); + var alreadyWarned = false; + + function roundFloat(val) { + var base = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2; + + var n = Math.pow(10, base); + return Math.floor(val * n) / n; + } + + // Flow type definition of console.table is too strict right now, see + // https://github.com/facebook/flow/pull/2353 for updates + function consoleTable(table) { + console.table(table); + } + + function warnInProduction() { + if (alreadyWarned) { + return; + } + alreadyWarned = true; + if (typeof console !== 'undefined') { + console.error( + 'ReactPerf is not supported in the production builds of React. ' + + 'To collect measurements, please use the development build of React instead.', + ); + } + } + + function getLastMeasurements() { + if (false) { + warnInProduction(); + return []; + } + + return ReactDebugTool.getFlushHistory(); + } + + function getExclusive() { + var flushHistory = + arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getLastMeasurements(); + + if (false) { + warnInProduction(); + return []; + } + + var aggregatedStats = {}; + var affectedIDs = {}; + + function updateAggregatedStats(treeSnapshot, instanceID, timerType, applyUpdate) { + var displayName = treeSnapshot[instanceID].displayName; + + var key = displayName; + var stats = aggregatedStats[key]; + if (!stats) { + affectedIDs[key] = {}; + stats = aggregatedStats[key] = { + key: key, + instanceCount: 0, + counts: {}, + durations: {}, + totalDuration: 0, + }; + } + if (!stats.durations[timerType]) { + stats.durations[timerType] = 0; + } + if (!stats.counts[timerType]) { + stats.counts[timerType] = 0; + } + affectedIDs[key][instanceID] = true; + applyUpdate(stats); + } + + flushHistory.forEach(function (flush) { + var measurements = flush.measurements, + treeSnapshot = flush.treeSnapshot; + + measurements.forEach(function (measurement) { + var duration = measurement.duration, + instanceID = measurement.instanceID, + timerType = measurement.timerType; + + updateAggregatedStats(treeSnapshot, instanceID, timerType, function (stats) { + stats.totalDuration += duration; + stats.durations[timerType] += duration; + stats.counts[timerType]++; + }); + }); + }); + + return Object.keys(aggregatedStats) + .map(function (key) { + return _extends({}, aggregatedStats[key], { + instanceCount: Object.keys(affectedIDs[key]).length, + }); + }) + .sort(function (a, b) { + return b.totalDuration - a.totalDuration; + }); + } + + function getInclusive() { + var flushHistory = + arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getLastMeasurements(); + + if (false) { + warnInProduction(); + return []; + } + + var aggregatedStats = {}; + var affectedIDs = {}; + + function updateAggregatedStats(treeSnapshot, instanceID, applyUpdate) { + var _treeSnapshot$instanc = treeSnapshot[instanceID], + displayName = _treeSnapshot$instanc.displayName, + ownerID = _treeSnapshot$instanc.ownerID; + + var owner = treeSnapshot[ownerID]; + var key = (owner ? owner.displayName + ' > ' : '') + displayName; + var stats = aggregatedStats[key]; + if (!stats) { + affectedIDs[key] = {}; + stats = aggregatedStats[key] = { + key: key, + instanceCount: 0, + inclusiveRenderDuration: 0, + renderCount: 0, + }; + } + affectedIDs[key][instanceID] = true; + applyUpdate(stats); + } + + var isCompositeByID = {}; + flushHistory.forEach(function (flush) { + var measurements = flush.measurements; + + measurements.forEach(function (measurement) { + var instanceID = measurement.instanceID, + timerType = measurement.timerType; + + if (timerType !== 'render') { + return; + } + isCompositeByID[instanceID] = true; + }); + }); + + flushHistory.forEach(function (flush) { + var measurements = flush.measurements, + treeSnapshot = flush.treeSnapshot; + + measurements.forEach(function (measurement) { + var duration = measurement.duration, + instanceID = measurement.instanceID, + timerType = measurement.timerType; + + if (timerType !== 'render') { + return; + } + updateAggregatedStats(treeSnapshot, instanceID, function (stats) { + stats.renderCount++; + }); + var nextParentID = instanceID; + while (nextParentID) { + // As we traverse parents, only count inclusive time towards composites. + // We know something is a composite if its render() was called. + if (isCompositeByID[nextParentID]) { + updateAggregatedStats(treeSnapshot, nextParentID, function (stats) { + stats.inclusiveRenderDuration += duration; + }); + } + nextParentID = treeSnapshot[nextParentID].parentID; + } + }); + }); + + return Object.keys(aggregatedStats) + .map(function (key) { + return _extends({}, aggregatedStats[key], { + instanceCount: Object.keys(affectedIDs[key]).length, + }); + }) + .sort(function (a, b) { + return b.inclusiveRenderDuration - a.inclusiveRenderDuration; + }); + } + + function getWasted() { + var flushHistory = + arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getLastMeasurements(); + + if (false) { + warnInProduction(); + return []; + } + + var aggregatedStats = {}; + var affectedIDs = {}; + + function updateAggregatedStats(treeSnapshot, instanceID, applyUpdate) { + var _treeSnapshot$instanc2 = treeSnapshot[instanceID], + displayName = _treeSnapshot$instanc2.displayName, + ownerID = _treeSnapshot$instanc2.ownerID; + + var owner = treeSnapshot[ownerID]; + var key = (owner ? owner.displayName + ' > ' : '') + displayName; + var stats = aggregatedStats[key]; + if (!stats) { + affectedIDs[key] = {}; + stats = aggregatedStats[key] = { + key: key, + instanceCount: 0, + inclusiveRenderDuration: 0, + renderCount: 0, + }; + } + affectedIDs[key][instanceID] = true; + applyUpdate(stats); + } + + flushHistory.forEach(function (flush) { + var measurements = flush.measurements, + treeSnapshot = flush.treeSnapshot, + operations = flush.operations; + + var isDefinitelyNotWastedByID = {}; + + // Find host components associated with an operation in this batch. + // Mark all components in their parent tree as definitely not wasted. + operations.forEach(function (operation) { + var instanceID = operation.instanceID; + + var nextParentID = instanceID; + while (nextParentID) { + isDefinitelyNotWastedByID[nextParentID] = true; + nextParentID = treeSnapshot[nextParentID].parentID; + } + }); + + // Find composite components that rendered in this batch. + // These are potential candidates for being wasted renders. + var renderedCompositeIDs = {}; + measurements.forEach(function (measurement) { + var instanceID = measurement.instanceID, + timerType = measurement.timerType; + + if (timerType !== 'render') { + return; + } + renderedCompositeIDs[instanceID] = true; + }); + + measurements.forEach(function (measurement) { + var duration = measurement.duration, + instanceID = measurement.instanceID, + timerType = measurement.timerType; + + if (timerType !== 'render') { + return; + } + + // If there was a DOM update below this component, or it has just been + // mounted, its render() is not considered wasted. + var updateCount = treeSnapshot[instanceID].updateCount; + + if (isDefinitelyNotWastedByID[instanceID] || updateCount === 0) { + return; + } + + // We consider this render() wasted. + updateAggregatedStats(treeSnapshot, instanceID, function (stats) { + stats.renderCount++; + }); + + var nextParentID = instanceID; + while (nextParentID) { + // Any parents rendered during this batch are considered wasted + // unless we previously marked them as dirty. + var isWasted = renderedCompositeIDs[nextParentID] && !isDefinitelyNotWastedByID[nextParentID]; + if (isWasted) { + updateAggregatedStats(treeSnapshot, nextParentID, function (stats) { + stats.inclusiveRenderDuration += duration; + }); + } + nextParentID = treeSnapshot[nextParentID].parentID; + } + }); + }); + + return Object.keys(aggregatedStats) + .map(function (key) { + return _extends({}, aggregatedStats[key], { + instanceCount: Object.keys(affectedIDs[key]).length, + }); + }) + .sort(function (a, b) { + return b.inclusiveRenderDuration - a.inclusiveRenderDuration; + }); + } + + function getOperations() { + var flushHistory = + arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getLastMeasurements(); + + if (false) { + warnInProduction(); + return []; + } + + var stats = []; + flushHistory.forEach(function (flush, flushIndex) { + var operations = flush.operations, + treeSnapshot = flush.treeSnapshot; + + operations.forEach(function (operation) { + var instanceID = operation.instanceID, + type = operation.type, + payload = operation.payload; + var _treeSnapshot$instanc3 = treeSnapshot[instanceID], + displayName = _treeSnapshot$instanc3.displayName, + ownerID = _treeSnapshot$instanc3.ownerID; + + var owner = treeSnapshot[ownerID]; + var key = (owner ? owner.displayName + ' > ' : '') + displayName; + + stats.push({ + flushIndex: flushIndex, + instanceID: instanceID, + key: key, + type: type, + ownerID: ownerID, + payload: payload, + }); + }); + }); + return stats; + } + + function printExclusive(flushHistory) { + if (false) { + warnInProduction(); + return; + } + + var stats = getExclusive(flushHistory); + var table = stats.map(function (item) { + var key = item.key, + instanceCount = item.instanceCount, + totalDuration = item.totalDuration; + + var renderCount = item.counts.render || 0; + var renderDuration = item.durations.render || 0; + return { + Component: key, + 'Total time (ms)': roundFloat(totalDuration), + 'Instance count': instanceCount, + 'Total render time (ms)': roundFloat(renderDuration), + 'Average render time (ms)': renderCount ? roundFloat(renderDuration / renderCount) : undefined, + 'Render count': renderCount, + 'Total lifecycle time (ms)': roundFloat(totalDuration - renderDuration), + }; + }); + consoleTable(table); + } + + function printInclusive(flushHistory) { + if (false) { + warnInProduction(); + return; + } + + var stats = getInclusive(flushHistory); + var table = stats.map(function (item) { + var key = item.key, + instanceCount = item.instanceCount, + inclusiveRenderDuration = item.inclusiveRenderDuration, + renderCount = item.renderCount; + + return { + 'Owner > Component': key, + 'Inclusive render time (ms)': roundFloat(inclusiveRenderDuration), + 'Instance count': instanceCount, + 'Render count': renderCount, + }; + }); + consoleTable(table); + } + + function printWasted(flushHistory) { + if (false) { + warnInProduction(); + return; + } + + var stats = getWasted(flushHistory); + var table = stats.map(function (item) { + var key = item.key, + instanceCount = item.instanceCount, + inclusiveRenderDuration = item.inclusiveRenderDuration, + renderCount = item.renderCount; + + return { + 'Owner > Component': key, + 'Inclusive wasted time (ms)': roundFloat(inclusiveRenderDuration), + 'Instance count': instanceCount, + 'Render count': renderCount, + }; + }); + consoleTable(table); + } + + function printOperations(flushHistory) { + if (false) { + warnInProduction(); + return; + } + + var stats = getOperations(flushHistory); + var table = stats.map(function (stat) { + return { + 'Owner > Node': stat.key, + Operation: stat.type, + Payload: typeof stat.payload === 'object' ? JSON.stringify(stat.payload) : stat.payload, + 'Flush index': stat.flushIndex, + 'Owner Component ID': stat.ownerID, + 'DOM Component ID': stat.instanceID, + }; + }); + consoleTable(table); + } + + var warnedAboutPrintDOM = false; + function printDOM(measurements) { + true + ? warning( + warnedAboutPrintDOM, + '`ReactPerf.printDOM(...)` is deprecated. Use ' + '`ReactPerf.printOperations(...)` instead.', + ) + : void 0; + warnedAboutPrintDOM = true; + return printOperations(measurements); + } + + var warnedAboutGetMeasurementsSummaryMap = false; + function getMeasurementsSummaryMap(measurements) { + true + ? warning( + warnedAboutGetMeasurementsSummaryMap, + '`ReactPerf.getMeasurementsSummaryMap(...)` is deprecated. Use ' + + '`ReactPerf.getWasted(...)` instead.', + ) + : void 0; + warnedAboutGetMeasurementsSummaryMap = true; + return getWasted(measurements); + } + + function start() { + if (false) { + warnInProduction(); + return; + } + + ReactDebugTool.beginProfiling(); + } + + function stop() { + if (false) { + warnInProduction(); + return; + } + + ReactDebugTool.endProfiling(); + } + + function isRunning() { + if (false) { + warnInProduction(); + return false; + } + + return ReactDebugTool.isProfiling(); + } + + var ReactPerfAnalysis = { + getLastMeasurements: getLastMeasurements, + getExclusive: getExclusive, + getInclusive: getInclusive, + getWasted: getWasted, + getOperations: getOperations, + printExclusive: printExclusive, + printInclusive: printInclusive, + printWasted: printWasted, + printOperations: printOperations, + start: start, + stop: stop, + isRunning: isRunning, + // Deprecated: + printDOM: printDOM, + getMeasurementsSummaryMap: getMeasurementsSummaryMap, + }; + + module.exports = ReactPerfAnalysis; + + /***/ + }, + /* 784 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + var ReactPropTypeLocationNames = {}; + + if (true) { + ReactPropTypeLocationNames = { + prop: 'prop', + context: 'context', + childContext: 'child context', + }; + } + + module.exports = ReactPropTypeLocationNames; + + /***/ + }, + /* 785 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + var ReactOwner = __webpack_require__(782); + + var ReactRef = {}; + + function attachRef(ref, component, owner) { + if (typeof ref === 'function') { + ref(component.getPublicInstance()); + } else { + // Legacy ref + ReactOwner.addComponentAsRefTo(component, ref, owner); + } + } + + function detachRef(ref, component, owner) { + if (typeof ref === 'function') { + ref(null); + } else { + // Legacy ref + ReactOwner.removeComponentAsRefFrom(component, ref, owner); + } + } + + ReactRef.attachRefs = function (instance, element) { + if (element === null || typeof element !== 'object') { + return; + } + var ref = element.ref; + if (ref != null) { + attachRef(ref, instance, element._owner); + } + }; + + ReactRef.shouldUpdateRefs = function (prevElement, nextElement) { + // If either the owner or a `ref` has changed, make sure the newest owner + // has stored a reference to `this`, and the previous owner (if different) + // has forgotten the reference to `this`. We use the element instead + // of the public this.props because the post processing cannot determine + // a ref. The ref conceptually lives on the element. + + // TODO: Should this even be possible? The owner cannot change because + // it's forbidden by shouldUpdateReactComponent. The ref can change + // if you swap the keys of but not the refs. Reconsider where this check + // is made. It probably belongs where the key checking and + // instantiateReactComponent is done. + + var prevRef = null; + var prevOwner = null; + if (prevElement !== null && typeof prevElement === 'object') { + prevRef = prevElement.ref; + prevOwner = prevElement._owner; + } + + var nextRef = null; + var nextOwner = null; + if (nextElement !== null && typeof nextElement === 'object') { + nextRef = nextElement.ref; + nextOwner = nextElement._owner; + } + + return ( + prevRef !== nextRef || + // If owner changes but we have an unchanged function ref, don't update refs + (typeof nextRef === 'string' && nextOwner !== prevOwner) + ); + }; + + ReactRef.detachRefs = function (instance, element) { + if (element === null || typeof element !== 'object') { + return; + } + var ref = element.ref; + if (ref != null) { + detachRef(ref, instance, element._owner); + } + }; + + module.exports = ReactRef; + + /***/ + }, + /* 786 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2014-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var ReactServerBatchingStrategy = { + isBatchingUpdates: false, + batchedUpdates: function (callback) { + // Don't do anything here. During the server rendering we don't want to + // schedule any updates. We will simply ignore them. + }, + }; + + module.exports = ReactServerBatchingStrategy; + + /***/ + }, + /* 787 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var _prodInvariant = __webpack_require__(7); + + var React = __webpack_require__(38); + var ReactDOMContainerInfo = __webpack_require__(318); + var ReactDefaultBatchingStrategy = __webpack_require__(207); + var ReactInstrumentation = __webpack_require__(33); + var ReactMarkupChecksum = __webpack_require__(326); + var ReactReconciler = __webpack_require__(69); + var ReactServerBatchingStrategy = __webpack_require__(786); + var ReactServerRenderingTransaction = __webpack_require__(331); + var ReactUpdates = __webpack_require__(34); + + var emptyObject = __webpack_require__(66); + var instantiateReactComponent = __webpack_require__(214); + var invariant = __webpack_require__(3); + + var pendingTransactions = 0; + + /** + * @param {ReactElement} element + * @return {string} the HTML markup + */ + function renderToStringImpl(element, makeStaticMarkup) { + var transaction; + try { + ReactUpdates.injection.injectBatchingStrategy(ReactServerBatchingStrategy); + + transaction = ReactServerRenderingTransaction.getPooled(makeStaticMarkup); + + pendingTransactions++; + + return transaction.perform(function () { + var componentInstance = instantiateReactComponent(element, true); + var markup = ReactReconciler.mountComponent( + componentInstance, + transaction, + null, + ReactDOMContainerInfo(), + emptyObject, + 0 /* parentDebugID */, + ); + if (true) { + ReactInstrumentation.debugTool.onUnmountComponent(componentInstance._debugID); + } + if (!makeStaticMarkup) { + markup = ReactMarkupChecksum.addChecksumToMarkup(markup); + } + return markup; + }, null); + } finally { + pendingTransactions--; + ReactServerRenderingTransaction.release(transaction); + // Revert to the DOM batching strategy since these two renderers + // currently share these stateful modules. + if (!pendingTransactions) { + ReactUpdates.injection.injectBatchingStrategy(ReactDefaultBatchingStrategy); + } + } + } + + /** + * Render a ReactElement to its initial HTML. This should only be used on the + * server. + * See https://facebook.github.io/react/docs/top-level-api.html#reactdomserver.rendertostring + */ + function renderToString(element) { + !React.isValidElement(element) + ? true + ? invariant(false, 'renderToString(): You must pass a valid ReactElement.') + : _prodInvariant('46') + : void 0; + return renderToStringImpl(element, false); + } + + /** + * Similar to renderToString, except this doesn't create extra DOM attributes + * such as data-react-id that React uses internally. + * See https://facebook.github.io/react/docs/top-level-api.html#reactdomserver.rendertostaticmarkup + */ + function renderToStaticMarkup(element) { + !React.isValidElement(element) + ? true + ? invariant(false, 'renderToStaticMarkup(): You must pass a valid ReactElement.') + : _prodInvariant('47') + : void 0; + return renderToStringImpl(element, true); + } + + module.exports = { + renderToString: renderToString, + renderToStaticMarkup: renderToStaticMarkup, + }; + + /***/ + }, + /* 788 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + var ReactUpdateQueue = __webpack_require__(209); + + var warning = __webpack_require__(4); + + function warnNoop(publicInstance, callerName) { + if (true) { + var constructor = publicInstance.constructor; + true + ? warning( + false, + '%s(...): Can only update a mounting component. ' + + 'This usually means you called %s() outside componentWillMount() on the server. ' + + 'This is a no-op. Please check the code for the %s component.', + callerName, + callerName, + (constructor && (constructor.displayName || constructor.name)) || 'ReactClass', + ) + : void 0; + } + } + + /** + * This is the update queue used for server rendering. + * It delegates to ReactUpdateQueue while server rendering is in progress and + * switches to ReactNoopUpdateQueue after the transaction has completed. + * @class ReactServerUpdateQueue + * @param {Transaction} transaction + */ + + var ReactServerUpdateQueue = (function () { + function ReactServerUpdateQueue(transaction) { + _classCallCheck(this, ReactServerUpdateQueue); + + this.transaction = transaction; + } + + /** + * Checks whether or not this composite component is mounted. + * @param {ReactClass} publicInstance The instance we want to test. + * @return {boolean} True if mounted, false otherwise. + * @protected + * @final + */ + + ReactServerUpdateQueue.prototype.isMounted = function isMounted(publicInstance) { + return false; + }; + + /** + * Enqueue a callback that will be executed after all the pending updates + * have processed. + * + * @param {ReactClass} publicInstance The instance to use as `this` context. + * @param {?function} callback Called after state is updated. + * @internal + */ + + ReactServerUpdateQueue.prototype.enqueueCallback = function enqueueCallback( + publicInstance, + callback, + callerName, + ) { + if (this.transaction.isInTransaction()) { + ReactUpdateQueue.enqueueCallback(publicInstance, callback, callerName); + } + }; + + /** + * Forces an update. This should only be invoked when it is known with + * certainty that we are **not** in a DOM transaction. + * + * You may want to call this when you know that some deeper aspect of the + * component's state has changed but `setState` was not called. + * + * This will not invoke `shouldComponentUpdate`, but it will invoke + * `componentWillUpdate` and `componentDidUpdate`. + * + * @param {ReactClass} publicInstance The instance that should rerender. + * @internal + */ + + ReactServerUpdateQueue.prototype.enqueueForceUpdate = function enqueueForceUpdate(publicInstance) { + if (this.transaction.isInTransaction()) { + ReactUpdateQueue.enqueueForceUpdate(publicInstance); + } else { + warnNoop(publicInstance, 'forceUpdate'); + } + }; + + /** + * Replaces all of the state. Always use this or `setState` to mutate state. + * You should treat `this.state` as immutable. + * + * There is no guarantee that `this.state` will be immediately updated, so + * accessing `this.state` after calling this method may return the old value. + * + * @param {ReactClass} publicInstance The instance that should rerender. + * @param {object|function} completeState Next state. + * @internal + */ + + ReactServerUpdateQueue.prototype.enqueueReplaceState = function enqueueReplaceState( + publicInstance, + completeState, + ) { + if (this.transaction.isInTransaction()) { + ReactUpdateQueue.enqueueReplaceState(publicInstance, completeState); + } else { + warnNoop(publicInstance, 'replaceState'); + } + }; + + /** + * Sets a subset of the state. This only exists because _pendingState is + * internal. This provides a merging strategy that is not available to deep + * properties which is confusing. TODO: Expose pendingState or don't use it + * during the merge. + * + * @param {ReactClass} publicInstance The instance that should rerender. + * @param {object|function} partialState Next partial state to be merged with state. + * @internal + */ + + ReactServerUpdateQueue.prototype.enqueueSetState = function enqueueSetState( + publicInstance, + partialState, + ) { + if (this.transaction.isInTransaction()) { + ReactUpdateQueue.enqueueSetState(publicInstance, partialState); + } else { + warnNoop(publicInstance, 'setState'); + } + }; + + return ReactServerUpdateQueue; + })(); + + module.exports = ReactServerUpdateQueue; + + /***/ + }, + /* 789 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var _prodInvariant = __webpack_require__(7), + _assign = __webpack_require__(9); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + var React = __webpack_require__(38); + var ReactCompositeComponent = __webpack_require__(316); + var ReactDefaultBatchingStrategy = __webpack_require__(207); + var ReactReconciler = __webpack_require__(69); + var ReactReconcileTransaction = __webpack_require__(330); + var ReactUpdates = __webpack_require__(34); + + var emptyObject = __webpack_require__(66); + var getNextDebugID = __webpack_require__(371); + var invariant = __webpack_require__(3); + + function injectDefaults() { + ReactUpdates.injection.injectReconcileTransaction(ReactReconcileTransaction); + ReactUpdates.injection.injectBatchingStrategy(ReactDefaultBatchingStrategy); + } + + var NoopInternalComponent = (function () { + function NoopInternalComponent(element) { + _classCallCheck(this, NoopInternalComponent); + + this._renderedOutput = element; + this._currentElement = element; + + if (true) { + this._debugID = getNextDebugID(); + } + } + + NoopInternalComponent.prototype.mountComponent = function mountComponent() {}; + + NoopInternalComponent.prototype.receiveComponent = function receiveComponent(element) { + this._renderedOutput = element; + this._currentElement = element; + }; + + NoopInternalComponent.prototype.unmountComponent = function unmountComponent() {}; + + NoopInternalComponent.prototype.getHostNode = function getHostNode() { + return undefined; + }; + + NoopInternalComponent.prototype.getPublicInstance = function getPublicInstance() { + return null; + }; + + return NoopInternalComponent; + })(); + + var ShallowComponentWrapper = function (element) { + // TODO: Consolidate with instantiateReactComponent + if (true) { + this._debugID = getNextDebugID(); + } + + this.construct(element); + }; + _assign(ShallowComponentWrapper.prototype, ReactCompositeComponent, { + _constructComponent: ReactCompositeComponent._constructComponentWithoutOwner, + _instantiateReactComponent: function (element) { + return new NoopInternalComponent(element); + }, + _replaceNodeWithMarkup: function () {}, + _renderValidatedComponent: ReactCompositeComponent._renderValidatedComponentWithoutOwnerOrContext, + }); + + function _batchedRender(renderer, element, context) { + var transaction = ReactUpdates.ReactReconcileTransaction.getPooled(true); + renderer._render(element, transaction, context); + ReactUpdates.ReactReconcileTransaction.release(transaction); + } + + var ReactShallowRenderer = (function () { + function ReactShallowRenderer() { + _classCallCheck(this, ReactShallowRenderer); + + this._instance = null; + } + + ReactShallowRenderer.prototype.getMountedInstance = function getMountedInstance() { + return this._instance ? this._instance._instance : null; + }; + + ReactShallowRenderer.prototype.render = function render(element, context) { + // Ensure we've done the default injections. This might not be true in the + // case of a simple test that only requires React and the TestUtils in + // conjunction with an inline-requires transform. + injectDefaults(); + + !React.isValidElement(element) + ? true + ? invariant( + false, + 'ReactShallowRenderer render(): Invalid component element.%s', + typeof element === 'function' + ? ' Instead of passing a component class, make sure to instantiate ' + + 'it by passing it to React.createElement.' + : '', + ) + : _prodInvariant( + '12', + typeof element === 'function' + ? ' Instead of passing a component class, make sure to instantiate ' + + 'it by passing it to React.createElement.' + : '', + ) + : void 0; + !(typeof element.type !== 'string') + ? true + ? invariant( + false, + 'ReactShallowRenderer render(): Shallow rendering works only with custom components, not primitives (%s). Instead of calling `.render(el)` and inspecting the rendered output, look at `el.props` directly instead.', + element.type, + ) + : _prodInvariant('13', element.type) + : void 0; + + if (!context) { + context = emptyObject; + } + ReactUpdates.batchedUpdates(_batchedRender, this, element, context); + + return this.getRenderOutput(); + }; + + ReactShallowRenderer.prototype.getRenderOutput = function getRenderOutput() { + return ( + (this._instance && + this._instance._renderedComponent && + this._instance._renderedComponent._renderedOutput) || + null + ); + }; + + ReactShallowRenderer.prototype.unmount = function unmount() { + if (this._instance) { + ReactReconciler.unmountComponent(this._instance, false); + } + }; + + ReactShallowRenderer.prototype._render = function _render(element, transaction, context) { + if (this._instance) { + ReactReconciler.receiveComponent(this._instance, element, transaction, context); + } else { + var instance = new ShallowComponentWrapper(element); + ReactReconciler.mountComponent(instance, transaction, null, null, context, 0); + this._instance = instance; + } + }; + + return ReactShallowRenderer; + })(); + + ReactShallowRenderer.createRenderer = function () { + return new ReactShallowRenderer(); + }; + + module.exports = ReactShallowRenderer; + + /***/ + }, + /* 790 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var _prodInvariant = __webpack_require__(7), + _assign = __webpack_require__(9); + + var EventConstants = __webpack_require__(756); + var EventPluginHub = __webpack_require__(103); + var EventPluginRegistry = __webpack_require__(123); + var EventPropagators = __webpack_require__(104); + var React = __webpack_require__(38); + var ReactDOM = __webpack_require__(206); + var ReactDOMComponentTree = __webpack_require__(16); + var ReactBrowserEventEmitter = __webpack_require__(124); + var ReactInstanceMap = __webpack_require__(105); + var ReactUpdates = __webpack_require__(34); + var SyntheticEvent = __webpack_require__(51); + var ReactShallowRenderer = __webpack_require__(789); + + var findDOMNode = __webpack_require__(335); + var invariant = __webpack_require__(3); + var warning = __webpack_require__(4); + + var topLevelTypes = EventConstants.topLevelTypes; + + function Event(suffix) {} + + // In react 16+ shallowRenderer will not be accessible via ReactTestUtils.createRenderer() + // Instead it will be available via react-test-renderer/shallow + // Maintain backwards compat for 15.5.0 release, but warn about using the deprecated method + var hasWarnedAboutCreateRenderer = false; + function createRendererWithWarning() { + true + ? warning( + hasWarnedAboutCreateRenderer, + 'Shallow renderer has been moved to react-test-renderer/shallow. ' + + 'Update references to remove this warning.', + ) + : void 0; + hasWarnedAboutCreateRenderer = true; + + return new ReactShallowRenderer(); + } + + /** + * @class ReactTestUtils + */ + + function findAllInRenderedTreeInternal(inst, test) { + if (!inst || !inst.getPublicInstance) { + return []; + } + var publicInst = inst.getPublicInstance(); + var ret = test(publicInst) ? [publicInst] : []; + var currentElement = inst._currentElement; + if (ReactTestUtils.isDOMComponent(publicInst)) { + var renderedChildren = inst._renderedChildren; + var key; + for (key in renderedChildren) { + if (!renderedChildren.hasOwnProperty(key)) { + continue; + } + ret = ret.concat(findAllInRenderedTreeInternal(renderedChildren[key], test)); + } + } else if (React.isValidElement(currentElement) && typeof currentElement.type === 'function') { + ret = ret.concat(findAllInRenderedTreeInternal(inst._renderedComponent, test)); + } + return ret; + } + + /** + * Utilities for making it easy to test React components. + * + * See https://facebook.github.io/react/docs/test-utils.html + * + * Todo: Support the entire DOM.scry query syntax. For now, these simple + * utilities will suffice for testing purposes. + * @lends ReactTestUtils + */ + var ReactTestUtils = { + renderIntoDocument: function (element) { + var div = document.createElement('div'); + // None of our tests actually require attaching the container to the + // DOM, and doing so creates a mess that we rely on test isolation to + // clean up, so we're going to stop honoring the name of this method + // (and probably rename it eventually) if no problems arise. + // document.documentElement.appendChild(div); + return ReactDOM.render(element, div); + }, + + isElement: function (element) { + return React.isValidElement(element); + }, + + isElementOfType: function (inst, convenienceConstructor) { + return React.isValidElement(inst) && inst.type === convenienceConstructor; + }, + + isDOMComponent: function (inst) { + return !!(inst && inst.nodeType === 1 && inst.tagName); + }, + + isDOMComponentElement: function (inst) { + return !!(inst && React.isValidElement(inst) && !!inst.tagName); + }, + + isCompositeComponent: function (inst) { + if (ReactTestUtils.isDOMComponent(inst)) { + // Accessing inst.setState warns; just return false as that'll be what + // this returns when we have DOM nodes as refs directly + return false; + } + return inst != null && typeof inst.render === 'function' && typeof inst.setState === 'function'; + }, + + isCompositeComponentWithType: function (inst, type) { + if (!ReactTestUtils.isCompositeComponent(inst)) { + return false; + } + var internalInstance = ReactInstanceMap.get(inst); + var constructor = internalInstance._currentElement.type; + + return constructor === type; + }, + + isCompositeComponentElement: function (inst) { + if (!React.isValidElement(inst)) { + return false; + } + // We check the prototype of the type that will get mounted, not the + // instance itself. This is a future proof way of duck typing. + var prototype = inst.type.prototype; + return typeof prototype.render === 'function' && typeof prototype.setState === 'function'; + }, + + isCompositeComponentElementWithType: function (inst, type) { + var internalInstance = ReactInstanceMap.get(inst); + var constructor = internalInstance._currentElement.type; + + return !!(ReactTestUtils.isCompositeComponentElement(inst) && constructor === type); + }, + + getRenderedChildOfCompositeComponent: function (inst) { + if (!ReactTestUtils.isCompositeComponent(inst)) { + return null; + } + var internalInstance = ReactInstanceMap.get(inst); + return internalInstance._renderedComponent.getPublicInstance(); + }, + + findAllInRenderedTree: function (inst, test) { + if (!inst) { + return []; + } + !ReactTestUtils.isCompositeComponent(inst) + ? true + ? invariant(false, 'findAllInRenderedTree(...): instance must be a composite component') + : _prodInvariant('10') + : void 0; + return findAllInRenderedTreeInternal(ReactInstanceMap.get(inst), test); + }, + + /** + * Finds all instance of components in the rendered tree that are DOM + * components with the class name matching `className`. + * @return {array} an array of all the matches. + */ + scryRenderedDOMComponentsWithClass: function (root, classNames) { + return ReactTestUtils.findAllInRenderedTree(root, function (inst) { + if (ReactTestUtils.isDOMComponent(inst)) { + var className = inst.className; + if (typeof className !== 'string') { + // SVG, probably. + className = inst.getAttribute('class') || ''; + } + var classList = className.split(/\s+/); + + if (!Array.isArray(classNames)) { + !(classNames !== undefined) + ? true + ? invariant( + false, + 'TestUtils.scryRenderedDOMComponentsWithClass expects a className as a second argument.', + ) + : _prodInvariant('11') + : void 0; + classNames = classNames.split(/\s+/); + } + return classNames.every(function (name) { + return classList.indexOf(name) !== -1; + }); + } + return false; + }); + }, + + /** + * Like scryRenderedDOMComponentsWithClass but expects there to be one result, + * and returns that one result, or throws exception if there is any other + * number of matches besides one. + * @return {!ReactDOMComponent} The one match. + */ + findRenderedDOMComponentWithClass: function (root, className) { + var all = ReactTestUtils.scryRenderedDOMComponentsWithClass(root, className); + if (all.length !== 1) { + throw new Error( + 'Did not find exactly one match (found: ' + all.length + ') ' + 'for class:' + className, + ); + } + return all[0]; + }, + + /** + * Finds all instance of components in the rendered tree that are DOM + * components with the tag name matching `tagName`. + * @return {array} an array of all the matches. + */ + scryRenderedDOMComponentsWithTag: function (root, tagName) { + return ReactTestUtils.findAllInRenderedTree(root, function (inst) { + return ( + ReactTestUtils.isDOMComponent(inst) && inst.tagName.toUpperCase() === tagName.toUpperCase() + ); + }); + }, + + /** + * Like scryRenderedDOMComponentsWithTag but expects there to be one result, + * and returns that one result, or throws exception if there is any other + * number of matches besides one. + * @return {!ReactDOMComponent} The one match. + */ + findRenderedDOMComponentWithTag: function (root, tagName) { + var all = ReactTestUtils.scryRenderedDOMComponentsWithTag(root, tagName); + if (all.length !== 1) { + throw new Error( + 'Did not find exactly one match (found: ' + all.length + ') ' + 'for tag:' + tagName, + ); + } + return all[0]; + }, + + /** + * Finds all instances of components with type equal to `componentType`. + * @return {array} an array of all the matches. + */ + scryRenderedComponentsWithType: function (root, componentType) { + return ReactTestUtils.findAllInRenderedTree(root, function (inst) { + return ReactTestUtils.isCompositeComponentWithType(inst, componentType); + }); + }, + + /** + * Same as `scryRenderedComponentsWithType` but expects there to be one result + * and returns that one result, or throws exception if there is any other + * number of matches besides one. + * @return {!ReactComponent} The one match. + */ + findRenderedComponentWithType: function (root, componentType) { + var all = ReactTestUtils.scryRenderedComponentsWithType(root, componentType); + if (all.length !== 1) { + throw new Error( + 'Did not find exactly one match (found: ' + + all.length + + ') ' + + 'for componentType:' + + componentType, + ); + } + return all[0]; + }, + + /** + * Pass a mocked component module to this method to augment it with + * useful methods that allow it to be used as a dummy React component. + * Instead of rendering as usual, the component will become a simple + * <div> containing any provided children. + * + * @param {object} module the mock function object exported from a + * module that defines the component to be mocked + * @param {?string} mockTagName optional dummy root tag name to return + * from render method (overrides + * module.mockTagName if provided) + * @return {object} the ReactTestUtils object (for chaining) + */ + mockComponent: function (module, mockTagName) { + mockTagName = mockTagName || module.mockTagName || 'div'; + + module.prototype.render.mockImplementation(function () { + return React.createElement(mockTagName, null, this.props.children); + }); + + return this; + }, + + /** + * Simulates a top level event being dispatched from a raw event that occurred + * on an `Element` node. + * @param {Object} topLevelType A type from `EventConstants.topLevelTypes` + * @param {!Element} node The dom to simulate an event occurring on. + * @param {?Event} fakeNativeEvent Fake native event to use in SyntheticEvent. + */ + simulateNativeEventOnNode: function (topLevelType, node, fakeNativeEvent) { + fakeNativeEvent.target = node; + ReactBrowserEventEmitter.ReactEventListener.dispatchEvent(topLevelType, fakeNativeEvent); + }, + + /** + * Simulates a top level event being dispatched from a raw event that occurred + * on the `ReactDOMComponent` `comp`. + * @param {Object} topLevelType A type from `EventConstants.topLevelTypes`. + * @param {!ReactDOMComponent} comp + * @param {?Event} fakeNativeEvent Fake native event to use in SyntheticEvent. + */ + simulateNativeEventOnDOMComponent: function (topLevelType, comp, fakeNativeEvent) { + ReactTestUtils.simulateNativeEventOnNode(topLevelType, findDOMNode(comp), fakeNativeEvent); + }, + + nativeTouchData: function (x, y) { + return { + touches: [{ pageX: x, pageY: y }], + }; + }, + + createRenderer: createRendererWithWarning, + + Simulate: null, + SimulateNative: {}, + }; + + /** + * Exports: + * + * - `ReactTestUtils.Simulate.click(Element/ReactDOMComponent)` + * - `ReactTestUtils.Simulate.mouseMove(Element/ReactDOMComponent)` + * - `ReactTestUtils.Simulate.change(Element/ReactDOMComponent)` + * - ... (All keys from event plugin `eventTypes` objects) + */ + function makeSimulator(eventType) { + return function (domComponentOrNode, eventData) { + var node; + !!React.isValidElement(domComponentOrNode) + ? true + ? invariant( + false, + 'TestUtils.Simulate expects a component instance and not a ReactElement.TestUtils.Simulate will not work if you are using shallow rendering.', + ) + : _prodInvariant('14') + : void 0; + if (ReactTestUtils.isDOMComponent(domComponentOrNode)) { + node = findDOMNode(domComponentOrNode); + } else if (domComponentOrNode.tagName) { + node = domComponentOrNode; + } + + var dispatchConfig = EventPluginRegistry.eventNameDispatchConfigs[eventType]; + + var fakeNativeEvent = new Event(); + fakeNativeEvent.target = node; + fakeNativeEvent.type = eventType.toLowerCase(); + + // We don't use SyntheticEvent.getPooled in order to not have to worry about + // properly destroying any properties assigned from `eventData` upon release + var event = new SyntheticEvent( + dispatchConfig, + ReactDOMComponentTree.getInstanceFromNode(node), + fakeNativeEvent, + node, + ); + // Since we aren't using pooling, always persist the event. This will make + // sure it's marked and won't warn when setting additional properties. + event.persist(); + _assign(event, eventData); + + if (dispatchConfig.phasedRegistrationNames) { + EventPropagators.accumulateTwoPhaseDispatches(event); + } else { + EventPropagators.accumulateDirectDispatches(event); + } + + ReactUpdates.batchedUpdates(function () { + EventPluginHub.enqueueEvents(event); + EventPluginHub.processEventQueue(true); + }); + }; + } + + function buildSimulators() { + ReactTestUtils.Simulate = {}; + + var eventType; + for (eventType in EventPluginRegistry.eventNameDispatchConfigs) { + /** + * @param {!Element|ReactDOMComponent} domComponentOrNode + * @param {?object} eventData Fake event data to use in SyntheticEvent. + */ + ReactTestUtils.Simulate[eventType] = makeSimulator(eventType); + } + } + + // Rebuild ReactTestUtils.Simulate whenever event plugins are injected + var oldInjectEventPluginOrder = EventPluginHub.injection.injectEventPluginOrder; + EventPluginHub.injection.injectEventPluginOrder = function () { + oldInjectEventPluginOrder.apply(this, arguments); + buildSimulators(); + }; + var oldInjectEventPlugins = EventPluginHub.injection.injectEventPluginsByName; + EventPluginHub.injection.injectEventPluginsByName = function () { + oldInjectEventPlugins.apply(this, arguments); + buildSimulators(); + }; + + buildSimulators(); + + /** + * Exports: + * + * - `ReactTestUtils.SimulateNative.click(Element/ReactDOMComponent)` + * - `ReactTestUtils.SimulateNative.mouseMove(Element/ReactDOMComponent)` + * - `ReactTestUtils.SimulateNative.mouseIn/ReactDOMComponent)` + * - `ReactTestUtils.SimulateNative.mouseOut(Element/ReactDOMComponent)` + * - ... (All keys from `EventConstants.topLevelTypes`) + * + * Note: Top level event types are a subset of the entire set of handler types + * (which include a broader set of "synthetic" events). For example, onDragDone + * is a synthetic event. Except when testing an event plugin or React's event + * handling code specifically, you probably want to use ReactTestUtils.Simulate + * to dispatch synthetic events. + */ + + function makeNativeSimulator(eventType) { + return function (domComponentOrNode, nativeEventData) { + var fakeNativeEvent = new Event(eventType); + _assign(fakeNativeEvent, nativeEventData); + if (ReactTestUtils.isDOMComponent(domComponentOrNode)) { + ReactTestUtils.simulateNativeEventOnDOMComponent(eventType, domComponentOrNode, fakeNativeEvent); + } else if (domComponentOrNode.tagName) { + // Will allow on actual dom nodes. + ReactTestUtils.simulateNativeEventOnNode(eventType, domComponentOrNode, fakeNativeEvent); + } + }; + } + + Object.keys(topLevelTypes).forEach(function (eventType) { + // Event type is stored as 'topClick' - we transform that to 'click' + var convenienceName = + eventType.indexOf('top') === 0 + ? eventType.charAt(3).toLowerCase() + eventType.substr(4) + : eventType; + /** + * @param {!Element|ReactDOMComponent} domComponentOrNode + * @param {?Event} nativeEventData Fake native event to use in SyntheticEvent. + */ + ReactTestUtils.SimulateNative[convenienceName] = makeNativeSimulator(eventType); + }); + + module.exports = ReactTestUtils; + + /***/ + }, + /* 791 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var NS = { + xlink: 'http://www.w3.org/1999/xlink', + xml: 'http://www.w3.org/XML/1998/namespace', + }; + + // We use attributes for everything SVG so let's avoid some duplication and run + // code instead. + // The following are all specified in the HTML config already so we exclude here. + // - class (as className) + // - color + // - height + // - id + // - lang + // - max + // - media + // - method + // - min + // - name + // - style + // - target + // - type + // - width + var ATTRS = { + accentHeight: 'accent-height', + accumulate: 0, + additive: 0, + alignmentBaseline: 'alignment-baseline', + allowReorder: 'allowReorder', + alphabetic: 0, + amplitude: 0, + arabicForm: 'arabic-form', + ascent: 0, + attributeName: 'attributeName', + attributeType: 'attributeType', + autoReverse: 'autoReverse', + azimuth: 0, + baseFrequency: 'baseFrequency', + baseProfile: 'baseProfile', + baselineShift: 'baseline-shift', + bbox: 0, + begin: 0, + bias: 0, + by: 0, + calcMode: 'calcMode', + capHeight: 'cap-height', + clip: 0, + clipPath: 'clip-path', + clipRule: 'clip-rule', + clipPathUnits: 'clipPathUnits', + colorInterpolation: 'color-interpolation', + colorInterpolationFilters: 'color-interpolation-filters', + colorProfile: 'color-profile', + colorRendering: 'color-rendering', + contentScriptType: 'contentScriptType', + contentStyleType: 'contentStyleType', + cursor: 0, + cx: 0, + cy: 0, + d: 0, + decelerate: 0, + descent: 0, + diffuseConstant: 'diffuseConstant', + direction: 0, + display: 0, + divisor: 0, + dominantBaseline: 'dominant-baseline', + dur: 0, + dx: 0, + dy: 0, + edgeMode: 'edgeMode', + elevation: 0, + enableBackground: 'enable-background', + end: 0, + exponent: 0, + externalResourcesRequired: 'externalResourcesRequired', + fill: 0, + fillOpacity: 'fill-opacity', + fillRule: 'fill-rule', + filter: 0, + filterRes: 'filterRes', + filterUnits: 'filterUnits', + floodColor: 'flood-color', + floodOpacity: 'flood-opacity', + focusable: 0, + fontFamily: 'font-family', + fontSize: 'font-size', + fontSizeAdjust: 'font-size-adjust', + fontStretch: 'font-stretch', + fontStyle: 'font-style', + fontVariant: 'font-variant', + fontWeight: 'font-weight', + format: 0, + from: 0, + fx: 0, + fy: 0, + g1: 0, + g2: 0, + glyphName: 'glyph-name', + glyphOrientationHorizontal: 'glyph-orientation-horizontal', + glyphOrientationVertical: 'glyph-orientation-vertical', + glyphRef: 'glyphRef', + gradientTransform: 'gradientTransform', + gradientUnits: 'gradientUnits', + hanging: 0, + horizAdvX: 'horiz-adv-x', + horizOriginX: 'horiz-origin-x', + ideographic: 0, + imageRendering: 'image-rendering', + in: 0, + in2: 0, + intercept: 0, + k: 0, + k1: 0, + k2: 0, + k3: 0, + k4: 0, + kernelMatrix: 'kernelMatrix', + kernelUnitLength: 'kernelUnitLength', + kerning: 0, + keyPoints: 'keyPoints', + keySplines: 'keySplines', + keyTimes: 'keyTimes', + lengthAdjust: 'lengthAdjust', + letterSpacing: 'letter-spacing', + lightingColor: 'lighting-color', + limitingConeAngle: 'limitingConeAngle', + local: 0, + markerEnd: 'marker-end', + markerMid: 'marker-mid', + markerStart: 'marker-start', + markerHeight: 'markerHeight', + markerUnits: 'markerUnits', + markerWidth: 'markerWidth', + mask: 0, + maskContentUnits: 'maskContentUnits', + maskUnits: 'maskUnits', + mathematical: 0, + mode: 0, + numOctaves: 'numOctaves', + offset: 0, + opacity: 0, + operator: 0, + order: 0, + orient: 0, + orientation: 0, + origin: 0, + overflow: 0, + overlinePosition: 'overline-position', + overlineThickness: 'overline-thickness', + paintOrder: 'paint-order', + panose1: 'panose-1', + pathLength: 'pathLength', + patternContentUnits: 'patternContentUnits', + patternTransform: 'patternTransform', + patternUnits: 'patternUnits', + pointerEvents: 'pointer-events', + points: 0, + pointsAtX: 'pointsAtX', + pointsAtY: 'pointsAtY', + pointsAtZ: 'pointsAtZ', + preserveAlpha: 'preserveAlpha', + preserveAspectRatio: 'preserveAspectRatio', + primitiveUnits: 'primitiveUnits', + r: 0, + radius: 0, + refX: 'refX', + refY: 'refY', + renderingIntent: 'rendering-intent', + repeatCount: 'repeatCount', + repeatDur: 'repeatDur', + requiredExtensions: 'requiredExtensions', + requiredFeatures: 'requiredFeatures', + restart: 0, + result: 0, + rotate: 0, + rx: 0, + ry: 0, + scale: 0, + seed: 0, + shapeRendering: 'shape-rendering', + slope: 0, + spacing: 0, + specularConstant: 'specularConstant', + specularExponent: 'specularExponent', + speed: 0, + spreadMethod: 'spreadMethod', + startOffset: 'startOffset', + stdDeviation: 'stdDeviation', + stemh: 0, + stemv: 0, + stitchTiles: 'stitchTiles', + stopColor: 'stop-color', + stopOpacity: 'stop-opacity', + strikethroughPosition: 'strikethrough-position', + strikethroughThickness: 'strikethrough-thickness', + string: 0, + stroke: 0, + strokeDasharray: 'stroke-dasharray', + strokeDashoffset: 'stroke-dashoffset', + strokeLinecap: 'stroke-linecap', + strokeLinejoin: 'stroke-linejoin', + strokeMiterlimit: 'stroke-miterlimit', + strokeOpacity: 'stroke-opacity', + strokeWidth: 'stroke-width', + surfaceScale: 'surfaceScale', + systemLanguage: 'systemLanguage', + tableValues: 'tableValues', + targetX: 'targetX', + targetY: 'targetY', + textAnchor: 'text-anchor', + textDecoration: 'text-decoration', + textRendering: 'text-rendering', + textLength: 'textLength', + to: 0, + transform: 0, + u1: 0, + u2: 0, + underlinePosition: 'underline-position', + underlineThickness: 'underline-thickness', + unicode: 0, + unicodeBidi: 'unicode-bidi', + unicodeRange: 'unicode-range', + unitsPerEm: 'units-per-em', + vAlphabetic: 'v-alphabetic', + vHanging: 'v-hanging', + vIdeographic: 'v-ideographic', + vMathematical: 'v-mathematical', + values: 0, + vectorEffect: 'vector-effect', + version: 0, + vertAdvY: 'vert-adv-y', + vertOriginX: 'vert-origin-x', + vertOriginY: 'vert-origin-y', + viewBox: 'viewBox', + viewTarget: 'viewTarget', + visibility: 0, + widths: 0, + wordSpacing: 'word-spacing', + writingMode: 'writing-mode', + x: 0, + xHeight: 'x-height', + x1: 0, + x2: 0, + xChannelSelector: 'xChannelSelector', + xlinkActuate: 'xlink:actuate', + xlinkArcrole: 'xlink:arcrole', + xlinkHref: 'xlink:href', + xlinkRole: 'xlink:role', + xlinkShow: 'xlink:show', + xlinkTitle: 'xlink:title', + xlinkType: 'xlink:type', + xmlBase: 'xml:base', + xmlns: 0, + xmlnsXlink: 'xmlns:xlink', + xmlLang: 'xml:lang', + xmlSpace: 'xml:space', + y: 0, + y1: 0, + y2: 0, + yChannelSelector: 'yChannelSelector', + z: 0, + zoomAndPan: 'zoomAndPan', + }; + + var SVGDOMPropertyConfig = { + Properties: {}, + DOMAttributeNamespaces: { + xlinkActuate: NS.xlink, + xlinkArcrole: NS.xlink, + xlinkHref: NS.xlink, + xlinkRole: NS.xlink, + xlinkShow: NS.xlink, + xlinkTitle: NS.xlink, + xlinkType: NS.xlink, + xmlBase: NS.xml, + xmlLang: NS.xml, + xmlSpace: NS.xml, + }, + DOMAttributeNames: {}, + }; + + Object.keys(ATTRS).forEach(function (key) { + SVGDOMPropertyConfig.Properties[key] = 0; + if (ATTRS[key]) { + SVGDOMPropertyConfig.DOMAttributeNames[key] = ATTRS[key]; + } + }); + + module.exports = SVGDOMPropertyConfig; + + /***/ + }, + /* 792 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var EventPropagators = __webpack_require__(104); + var ExecutionEnvironment = __webpack_require__(17); + var ReactDOMComponentTree = __webpack_require__(16); + var ReactInputSelection = __webpack_require__(325); + var SyntheticEvent = __webpack_require__(51); + + var getActiveElement = __webpack_require__(303); + var isTextInputElement = __webpack_require__(340); + var shallowEqual = __webpack_require__(194); + + var skipSelectionChangeEvent = + ExecutionEnvironment.canUseDOM && 'documentMode' in document && document.documentMode <= 11; + + var eventTypes = { + select: { + phasedRegistrationNames: { + bubbled: 'onSelect', + captured: 'onSelectCapture', + }, + dependencies: [ + 'topBlur', + 'topContextMenu', + 'topFocus', + 'topKeyDown', + 'topKeyUp', + 'topMouseDown', + 'topMouseUp', + 'topSelectionChange', + ], + }, + }; + + var activeElement = null; + var activeElementInst = null; + var lastSelection = null; + var mouseDown = false; + + // Track whether a listener exists for this plugin. If none exist, we do + // not extract events. See #3639. + var hasListener = false; + + /** + * Get an object which is a unique representation of the current selection. + * + * The return value will not be consistent across nodes or browsers, but + * two identical selections on the same node will return identical objects. + * + * @param {DOMElement} node + * @return {object} + */ + function getSelection(node) { + if ('selectionStart' in node && ReactInputSelection.hasSelectionCapabilities(node)) { + return { + start: node.selectionStart, + end: node.selectionEnd, + }; + } else if (window.getSelection) { + var selection = window.getSelection(); + return { + anchorNode: selection.anchorNode, + anchorOffset: selection.anchorOffset, + focusNode: selection.focusNode, + focusOffset: selection.focusOffset, + }; + } else if (document.selection) { + var range = document.selection.createRange(); + return { + parentElement: range.parentElement(), + text: range.text, + top: range.boundingTop, + left: range.boundingLeft, + }; + } + } + + /** + * Poll selection to see whether it's changed. + * + * @param {object} nativeEvent + * @return {?SyntheticEvent} + */ + function constructSelectEvent(nativeEvent, nativeEventTarget) { + // Ensure we have the right element, and that the user is not dragging a + // selection (this matches native `select` event behavior). In HTML5, select + // fires only on input and textarea thus if there's no focused element we + // won't dispatch. + if (mouseDown || activeElement == null || activeElement !== getActiveElement()) { + return null; + } + + // Only fire when selection has actually changed. + var currentSelection = getSelection(activeElement); + if (!lastSelection || !shallowEqual(lastSelection, currentSelection)) { + lastSelection = currentSelection; + + var syntheticEvent = SyntheticEvent.getPooled( + eventTypes.select, + activeElementInst, + nativeEvent, + nativeEventTarget, + ); + + syntheticEvent.type = 'select'; + syntheticEvent.target = activeElement; + + EventPropagators.accumulateTwoPhaseDispatches(syntheticEvent); + + return syntheticEvent; + } + + return null; + } + + /** + * This plugin creates an `onSelect` event that normalizes select events + * across form elements. + * + * Supported elements are: + * - input (see `isTextInputElement`) + * - textarea + * - contentEditable + * + * This differs from native browser implementations in the following ways: + * - Fires on contentEditable fields as well as inputs. + * - Fires for collapsed selection. + * - Fires after user input. + */ + var SelectEventPlugin = { + eventTypes: eventTypes, + + extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) { + if (!hasListener) { + return null; + } + + var targetNode = targetInst ? ReactDOMComponentTree.getNodeFromInstance(targetInst) : window; + + switch (topLevelType) { + // Track the input node that has focus. + case 'topFocus': + if (isTextInputElement(targetNode) || targetNode.contentEditable === 'true') { + activeElement = targetNode; + activeElementInst = targetInst; + lastSelection = null; + } + break; + case 'topBlur': + activeElement = null; + activeElementInst = null; + lastSelection = null; + break; + + // Don't fire the event while the user is dragging. This matches the + // semantics of the native select event. + case 'topMouseDown': + mouseDown = true; + break; + case 'topContextMenu': + case 'topMouseUp': + mouseDown = false; + return constructSelectEvent(nativeEvent, nativeEventTarget); + + // Chrome and IE fire non-standard event when selection is changed (and + // sometimes when it hasn't). IE's event fires out of order with respect + // to key and input events on deletion, so we discard it. + // + // Firefox doesn't support selectionchange, so check selection status + // after each key entry. The selection changes after keydown and before + // keyup, but we check on keydown as well in the case of holding down a + // key, when multiple keydown events are fired but only one keyup is. + // This is also our approach for IE handling, for the reason above. + case 'topSelectionChange': + if (skipSelectionChangeEvent) { + break; + } + // falls through + case 'topKeyDown': + case 'topKeyUp': + return constructSelectEvent(nativeEvent, nativeEventTarget); + } + + return null; + }, + + didPutListener: function (inst, registrationName, listener) { + if (registrationName === 'onSelect') { + hasListener = true; + } + }, + }; + + module.exports = SelectEventPlugin; + + /***/ + }, + /* 793 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + var _prodInvariant = __webpack_require__(7); + + var EventListener = __webpack_require__(301); + var EventPropagators = __webpack_require__(104); + var ReactDOMComponentTree = __webpack_require__(16); + var SyntheticAnimationEvent = __webpack_require__(794); + var SyntheticClipboardEvent = __webpack_require__(795); + var SyntheticEvent = __webpack_require__(51); + var SyntheticFocusEvent = __webpack_require__(798); + var SyntheticKeyboardEvent = __webpack_require__(800); + var SyntheticMouseEvent = __webpack_require__(148); + var SyntheticDragEvent = __webpack_require__(797); + var SyntheticTouchEvent = __webpack_require__(801); + var SyntheticTransitionEvent = __webpack_require__(802); + var SyntheticUIEvent = __webpack_require__(125); + var SyntheticWheelEvent = __webpack_require__(803); + + var emptyFunction = __webpack_require__(22); + var getEventCharCode = __webpack_require__(211); + var invariant = __webpack_require__(3); + + /** + * Turns + * ['abort', ...] + * into + * eventTypes = { + * 'abort': { + * phasedRegistrationNames: { + * bubbled: 'onAbort', + * captured: 'onAbortCapture', + * }, + * dependencies: ['topAbort'], + * }, + * ... + * }; + * topLevelEventsToDispatchConfig = { + * 'topAbort': { sameConfig } + * }; + */ + var eventTypes = {}; + var topLevelEventsToDispatchConfig = {}; + [ + 'abort', + 'animationEnd', + 'animationIteration', + 'animationStart', + 'blur', + 'canPlay', + 'canPlayThrough', + 'click', + 'contextMenu', + 'copy', + 'cut', + 'doubleClick', + 'drag', + 'dragEnd', + 'dragEnter', + 'dragExit', + 'dragLeave', + 'dragOver', + 'dragStart', + 'drop', + 'durationChange', + 'emptied', + 'encrypted', + 'ended', + 'error', + 'focus', + 'input', + 'invalid', + 'keyDown', + 'keyPress', + 'keyUp', + 'load', + 'loadedData', + 'loadedMetadata', + 'loadStart', + 'mouseDown', + 'mouseMove', + 'mouseOut', + 'mouseOver', + 'mouseUp', + 'paste', + 'pause', + 'play', + 'playing', + 'progress', + 'rateChange', + 'reset', + 'scroll', + 'seeked', + 'seeking', + 'stalled', + 'submit', + 'suspend', + 'timeUpdate', + 'touchCancel', + 'touchEnd', + 'touchMove', + 'touchStart', + 'transitionEnd', + 'volumeChange', + 'waiting', + 'wheel', + ].forEach(function (event) { + var capitalizedEvent = event[0].toUpperCase() + event.slice(1); + var onEvent = 'on' + capitalizedEvent; + var topEvent = 'top' + capitalizedEvent; + + var type = { + phasedRegistrationNames: { + bubbled: onEvent, + captured: onEvent + 'Capture', + }, + dependencies: [topEvent], + }; + eventTypes[event] = type; + topLevelEventsToDispatchConfig[topEvent] = type; + }); + + var onClickListeners = {}; + + function getDictionaryKey(inst) { + // Prevents V8 performance issue: + // https://github.com/facebook/react/pull/7232 + return '.' + inst._rootNodeID; + } + + function isInteractive(tag) { + return tag === 'button' || tag === 'input' || tag === 'select' || tag === 'textarea'; + } + + var SimpleEventPlugin = { + eventTypes: eventTypes, + + extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) { + var dispatchConfig = topLevelEventsToDispatchConfig[topLevelType]; + if (!dispatchConfig) { + return null; + } + var EventConstructor; + switch (topLevelType) { + case 'topAbort': + case 'topCanPlay': + case 'topCanPlayThrough': + case 'topDurationChange': + case 'topEmptied': + case 'topEncrypted': + case 'topEnded': + case 'topError': + case 'topInput': + case 'topInvalid': + case 'topLoad': + case 'topLoadedData': + case 'topLoadedMetadata': + case 'topLoadStart': + case 'topPause': + case 'topPlay': + case 'topPlaying': + case 'topProgress': + case 'topRateChange': + case 'topReset': + case 'topSeeked': + case 'topSeeking': + case 'topStalled': + case 'topSubmit': + case 'topSuspend': + case 'topTimeUpdate': + case 'topVolumeChange': + case 'topWaiting': + // HTML Events + // @see http://www.w3.org/TR/html5/index.html#events-0 + EventConstructor = SyntheticEvent; + break; + case 'topKeyPress': + // Firefox creates a keypress event for function keys too. This removes + // the unwanted keypress events. Enter is however both printable and + // non-printable. One would expect Tab to be as well (but it isn't). + if (getEventCharCode(nativeEvent) === 0) { + return null; + } + /* falls through */ + case 'topKeyDown': + case 'topKeyUp': + EventConstructor = SyntheticKeyboardEvent; + break; + case 'topBlur': + case 'topFocus': + EventConstructor = SyntheticFocusEvent; + break; + case 'topClick': + // Firefox creates a click event on right mouse clicks. This removes the + // unwanted click events. + if (nativeEvent.button === 2) { + return null; + } + /* falls through */ + case 'topDoubleClick': + case 'topMouseDown': + case 'topMouseMove': + case 'topMouseUp': + // TODO: Disabled elements should not respond to mouse events + /* falls through */ + case 'topMouseOut': + case 'topMouseOver': + case 'topContextMenu': + EventConstructor = SyntheticMouseEvent; + break; + case 'topDrag': + case 'topDragEnd': + case 'topDragEnter': + case 'topDragExit': + case 'topDragLeave': + case 'topDragOver': + case 'topDragStart': + case 'topDrop': + EventConstructor = SyntheticDragEvent; + break; + case 'topTouchCancel': + case 'topTouchEnd': + case 'topTouchMove': + case 'topTouchStart': + EventConstructor = SyntheticTouchEvent; + break; + case 'topAnimationEnd': + case 'topAnimationIteration': + case 'topAnimationStart': + EventConstructor = SyntheticAnimationEvent; + break; + case 'topTransitionEnd': + EventConstructor = SyntheticTransitionEvent; + break; + case 'topScroll': + EventConstructor = SyntheticUIEvent; + break; + case 'topWheel': + EventConstructor = SyntheticWheelEvent; + break; + case 'topCopy': + case 'topCut': + case 'topPaste': + EventConstructor = SyntheticClipboardEvent; + break; + } + !EventConstructor + ? true + ? invariant(false, 'SimpleEventPlugin: Unhandled event type, `%s`.', topLevelType) + : _prodInvariant('86', topLevelType) + : void 0; + var event = EventConstructor.getPooled(dispatchConfig, targetInst, nativeEvent, nativeEventTarget); + EventPropagators.accumulateTwoPhaseDispatches(event); + return event; + }, + + didPutListener: function (inst, registrationName, listener) { + // Mobile Safari does not fire properly bubble click events on + // non-interactive elements, which means delegated click listeners do not + // fire. The workaround for this bug involves attaching an empty click + // listener on the target node. + // http://www.quirksmode.org/blog/archives/2010/09/click_event_del.html + if (registrationName === 'onClick' && !isInteractive(inst._tag)) { + var key = getDictionaryKey(inst); + var node = ReactDOMComponentTree.getNodeFromInstance(inst); + if (!onClickListeners[key]) { + onClickListeners[key] = EventListener.listen(node, 'click', emptyFunction); + } + } + }, + + willDeleteListener: function (inst, registrationName) { + if (registrationName === 'onClick' && !isInteractive(inst._tag)) { + var key = getDictionaryKey(inst); + onClickListeners[key].remove(); + delete onClickListeners[key]; + } + }, + }; + + module.exports = SimpleEventPlugin; + + /***/ + }, + /* 794 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var SyntheticEvent = __webpack_require__(51); + + /** + * @interface Event + * @see http://www.w3.org/TR/css3-animations/#AnimationEvent-interface + * @see https://developer.mozilla.org/en-US/docs/Web/API/AnimationEvent + */ + var AnimationEventInterface = { + animationName: null, + elapsedTime: null, + pseudoElement: null, + }; + + /** + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @extends {SyntheticEvent} + */ + function SyntheticAnimationEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); + } + + SyntheticEvent.augmentClass(SyntheticAnimationEvent, AnimationEventInterface); + + module.exports = SyntheticAnimationEvent; + + /***/ + }, + /* 795 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var SyntheticEvent = __webpack_require__(51); + + /** + * @interface Event + * @see http://www.w3.org/TR/clipboard-apis/ + */ + var ClipboardEventInterface = { + clipboardData: function (event) { + return 'clipboardData' in event ? event.clipboardData : window.clipboardData; + }, + }; + + /** + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @extends {SyntheticUIEvent} + */ + function SyntheticClipboardEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); + } + + SyntheticEvent.augmentClass(SyntheticClipboardEvent, ClipboardEventInterface); + + module.exports = SyntheticClipboardEvent; + + /***/ + }, + /* 796 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var SyntheticEvent = __webpack_require__(51); + + /** + * @interface Event + * @see http://www.w3.org/TR/DOM-Level-3-Events/#events-compositionevents + */ + var CompositionEventInterface = { + data: null, + }; + + /** + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @extends {SyntheticUIEvent} + */ + function SyntheticCompositionEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); + } + + SyntheticEvent.augmentClass(SyntheticCompositionEvent, CompositionEventInterface); + + module.exports = SyntheticCompositionEvent; + + /***/ + }, + /* 797 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var SyntheticMouseEvent = __webpack_require__(148); + + /** + * @interface DragEvent + * @see http://www.w3.org/TR/DOM-Level-3-Events/ + */ + var DragEventInterface = { + dataTransfer: null, + }; + + /** + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @extends {SyntheticUIEvent} + */ + function SyntheticDragEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + return SyntheticMouseEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); + } + + SyntheticMouseEvent.augmentClass(SyntheticDragEvent, DragEventInterface); + + module.exports = SyntheticDragEvent; + + /***/ + }, + /* 798 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var SyntheticUIEvent = __webpack_require__(125); + + /** + * @interface FocusEvent + * @see http://www.w3.org/TR/DOM-Level-3-Events/ + */ + var FocusEventInterface = { + relatedTarget: null, + }; + + /** + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @extends {SyntheticUIEvent} + */ + function SyntheticFocusEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); + } + + SyntheticUIEvent.augmentClass(SyntheticFocusEvent, FocusEventInterface); + + module.exports = SyntheticFocusEvent; + + /***/ + }, + /* 799 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var SyntheticEvent = __webpack_require__(51); + + /** + * @interface Event + * @see http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105 + * /#events-inputevents + */ + var InputEventInterface = { + data: null, + }; + + /** + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @extends {SyntheticUIEvent} + */ + function SyntheticInputEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); + } + + SyntheticEvent.augmentClass(SyntheticInputEvent, InputEventInterface); + + module.exports = SyntheticInputEvent; + + /***/ + }, + /* 800 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var SyntheticUIEvent = __webpack_require__(125); + + var getEventCharCode = __webpack_require__(211); + var getEventKey = __webpack_require__(808); + var getEventModifierState = __webpack_require__(212); + + /** + * @interface KeyboardEvent + * @see http://www.w3.org/TR/DOM-Level-3-Events/ + */ + var KeyboardEventInterface = { + key: getEventKey, + location: null, + ctrlKey: null, + shiftKey: null, + altKey: null, + metaKey: null, + repeat: null, + locale: null, + getModifierState: getEventModifierState, + // Legacy Interface + charCode: function (event) { + // `charCode` is the result of a KeyPress event and represents the value of + // the actual printable character. + + // KeyPress is deprecated, but its replacement is not yet final and not + // implemented in any major browser. Only KeyPress has charCode. + if (event.type === 'keypress') { + return getEventCharCode(event); + } + return 0; + }, + keyCode: function (event) { + // `keyCode` is the result of a KeyDown/Up event and represents the value of + // physical keyboard key. + + // The actual meaning of the value depends on the users' keyboard layout + // which cannot be detected. Assuming that it is a US keyboard layout + // provides a surprisingly accurate mapping for US and European users. + // Due to this, it is left to the user to implement at this time. + if (event.type === 'keydown' || event.type === 'keyup') { + return event.keyCode; + } + return 0; + }, + which: function (event) { + // `which` is an alias for either `keyCode` or `charCode` depending on the + // type of the event. + if (event.type === 'keypress') { + return getEventCharCode(event); + } + if (event.type === 'keydown' || event.type === 'keyup') { + return event.keyCode; + } + return 0; + }, + }; + + /** + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @extends {SyntheticUIEvent} + */ + function SyntheticKeyboardEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); + } + + SyntheticUIEvent.augmentClass(SyntheticKeyboardEvent, KeyboardEventInterface); + + module.exports = SyntheticKeyboardEvent; + + /***/ + }, + /* 801 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var SyntheticUIEvent = __webpack_require__(125); + + var getEventModifierState = __webpack_require__(212); + + /** + * @interface TouchEvent + * @see http://www.w3.org/TR/touch-events/ + */ + var TouchEventInterface = { + touches: null, + targetTouches: null, + changedTouches: null, + altKey: null, + metaKey: null, + ctrlKey: null, + shiftKey: null, + getModifierState: getEventModifierState, + }; + + /** + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @extends {SyntheticUIEvent} + */ + function SyntheticTouchEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); + } + + SyntheticUIEvent.augmentClass(SyntheticTouchEvent, TouchEventInterface); + + module.exports = SyntheticTouchEvent; + + /***/ + }, + /* 802 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var SyntheticEvent = __webpack_require__(51); + + /** + * @interface Event + * @see http://www.w3.org/TR/2009/WD-css3-transitions-20090320/#transition-events- + * @see https://developer.mozilla.org/en-US/docs/Web/API/TransitionEvent + */ + var TransitionEventInterface = { + propertyName: null, + elapsedTime: null, + pseudoElement: null, + }; + + /** + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @extends {SyntheticEvent} + */ + function SyntheticTransitionEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); + } + + SyntheticEvent.augmentClass(SyntheticTransitionEvent, TransitionEventInterface); + + module.exports = SyntheticTransitionEvent; + + /***/ + }, + /* 803 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var SyntheticMouseEvent = __webpack_require__(148); + + /** + * @interface WheelEvent + * @see http://www.w3.org/TR/DOM-Level-3-Events/ + */ + var WheelEventInterface = { + deltaX: function (event) { + return 'deltaX' in event + ? event.deltaX + : // Fallback to `wheelDeltaX` for Webkit and normalize (right is positive). + 'wheelDeltaX' in event + ? -event.wheelDeltaX + : 0; + }, + deltaY: function (event) { + return 'deltaY' in event + ? event.deltaY + : // Fallback to `wheelDeltaY` for Webkit and normalize (down is positive). + 'wheelDeltaY' in event + ? -event.wheelDeltaY + : // Fallback to `wheelDelta` for IE<9 and normalize (down is positive). + 'wheelDelta' in event + ? -event.wheelDelta + : 0; + }, + deltaZ: null, + + // Browsers without "deltaMode" is reporting in raw wheel delta where one + // notch on the scroll is always +/- 120, roughly equivalent to pixels. + // A good approximation of DOM_DELTA_LINE (1) is 5% of viewport size or + // ~40 pixels, for DOM_DELTA_SCREEN (2) it is 87.5% of viewport size. + deltaMode: null, + }; + + /** + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @extends {SyntheticMouseEvent} + */ + function SyntheticWheelEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + return SyntheticMouseEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); + } + + SyntheticMouseEvent.augmentClass(SyntheticWheelEvent, WheelEventInterface); + + module.exports = SyntheticWheelEvent; + + /***/ + }, + /* 804 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + var MOD = 65521; + + // adler32 is not cryptographically strong, and is only used to sanity check that + // markup generated on the server matches the markup generated on the client. + // This implementation (a modified version of the SheetJS version) has been optimized + // for our use case, at the expense of conforming to the adler32 specification + // for non-ascii inputs. + function adler32(data) { + var a = 1; + var b = 0; + var i = 0; + var l = data.length; + var m = l & ~0x3; + while (i < m) { + var n = Math.min(i + 4096, m); + for (; i < n; i += 4) { + b += + (a += data.charCodeAt(i)) + + (a += data.charCodeAt(i + 1)) + + (a += data.charCodeAt(i + 2)) + + (a += data.charCodeAt(i + 3)); + } + a %= MOD; + b %= MOD; + } + for (; i < l; i++) { + b += a += data.charCodeAt(i); + } + a %= MOD; + b %= MOD; + return a | (b << 16); + } + + module.exports = adler32; + + /***/ + }, + /* 805 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (process) { + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var _prodInvariant = __webpack_require__(7); + + var ReactPropTypeLocationNames = __webpack_require__(784); + var ReactPropTypesSecret = __webpack_require__(329); + + var invariant = __webpack_require__(3); + var warning = __webpack_require__(4); + + var ReactComponentTreeHook; + + if ( + typeof process !== 'undefined' && + __webpack_require__.i({ NODE_ENV: 'development', WEBPACK_SERVER_BUILD: true }) && + 'development' === 'test' + ) { + // Temporary hack. + // Inline requires don't work well with Jest: + // https://github.com/facebook/react/issues/7240 + // Remove the inline requires when we don't need them anymore: + // https://github.com/facebook/react/pull/7178 + ReactComponentTreeHook = __webpack_require__(24); + } + + var loggedTypeFailures = {}; + + /** + * Assert that the values match with the type specs. + * Error messages are memorized and will only be shown once. + * + * @param {object} typeSpecs Map of name to a ReactPropType + * @param {object} values Runtime values that need to be type-checked + * @param {string} location e.g. "prop", "context", "child context" + * @param {string} componentName Name of the component for error messages. + * @param {?object} element The React element that is being type-checked + * @param {?number} debugID The React component instance that is being type-checked + * @private + */ + function checkReactTypeSpec(typeSpecs, values, location, componentName, element, debugID) { + for (var typeSpecName in typeSpecs) { + if (typeSpecs.hasOwnProperty(typeSpecName)) { + var error; + // Prop type validation may throw. In case they do, we don't want to + // fail the render phase where it didn't fail before. So we log it. + // After these have been cleaned up, we'll let them throw. + try { + // This is intentionally an invariant that gets caught. It's the same + // behavior as without this statement except with a better message. + !(typeof typeSpecs[typeSpecName] === 'function') + ? true + ? invariant( + false, + '%s: %s type `%s` is invalid; it must be a function, usually from React.PropTypes.', + componentName || 'React class', + ReactPropTypeLocationNames[location], + typeSpecName, + ) + : _prodInvariant( + '84', + componentName || 'React class', + ReactPropTypeLocationNames[location], + typeSpecName, + ) + : void 0; + error = typeSpecs[typeSpecName]( + values, + typeSpecName, + componentName, + location, + null, + ReactPropTypesSecret, + ); + } catch (ex) { + error = ex; + } + true + ? warning( + !error || error instanceof Error, + '%s: type specification of %s `%s` is invalid; the type checker ' + + 'function must return `null` or an `Error` but returned a %s. ' + + 'You may have forgotten to pass an argument to the type checker ' + + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + + 'shape all require an argument).', + componentName || 'React class', + ReactPropTypeLocationNames[location], + typeSpecName, + typeof error, + ) + : void 0; + if (error instanceof Error && !(error.message in loggedTypeFailures)) { + // Only monitor this failure once because there tends to be a lot of the + // same error. + loggedTypeFailures[error.message] = true; + + var componentStackInfo = ''; + + if (true) { + if (!ReactComponentTreeHook) { + ReactComponentTreeHook = __webpack_require__(24); + } + if (debugID !== null) { + componentStackInfo = ReactComponentTreeHook.getStackAddendumByID(debugID); + } else if (element !== null) { + componentStackInfo = ReactComponentTreeHook.getCurrentStackAddendum(element); + } + } + + true + ? warning(false, 'Failed %s type: %s%s', location, error.message, componentStackInfo) + : void 0; + } + } + } + } + + module.exports = checkReactTypeSpec; + /* WEBPACK VAR INJECTION */ + }).call(exports, __webpack_require__(100)); + + /***/ + }, + /* 806 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var CSSProperty = __webpack_require__(313); + var warning = __webpack_require__(4); + + var isUnitlessNumber = CSSProperty.isUnitlessNumber; + var styleWarnings = {}; + + /** + * Convert a value into the proper css writable value. The style name `name` + * should be logical (no hyphens), as specified + * in `CSSProperty.isUnitlessNumber`. + * + * @param {string} name CSS property name such as `topMargin`. + * @param {*} value CSS property value such as `10px`. + * @param {ReactDOMComponent} component + * @return {string} Normalized style value with dimensions applied. + */ + function dangerousStyleValue(name, value, component) { + // Note that we've removed escapeTextForBrowser() calls here since the + // whole string will be escaped when the attribute is injected into + // the markup. If you provide unsafe user data here they can inject + // arbitrary CSS which may be problematic (I couldn't repro this): + // https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet + // http://www.thespanner.co.uk/2007/11/26/ultimate-xss-css-injection/ + // This is not an XSS hole but instead a potential CSS injection issue + // which has lead to a greater discussion about how we're going to + // trust URLs moving forward. See #2115901 + + var isEmpty = value == null || typeof value === 'boolean' || value === ''; + if (isEmpty) { + return ''; + } + + var isNonNumeric = isNaN(value); + if ( + isNonNumeric || + value === 0 || + (isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name]) + ) { + return '' + value; // cast to string + } + + if (typeof value === 'string') { + if (true) { + // Allow '0' to pass through without warning. 0 is already special and + // doesn't require units, so we don't need to warn about it. + if (component && value !== '0') { + var owner = component._currentElement._owner; + var ownerName = owner ? owner.getName() : null; + if (ownerName && !styleWarnings[ownerName]) { + styleWarnings[ownerName] = {}; + } + var warned = false; + if (ownerName) { + var warnings = styleWarnings[ownerName]; + warned = warnings[name]; + if (!warned) { + warnings[name] = true; + } + } + if (!warned) { + true + ? warning( + false, + 'a `%s` tag (owner: `%s`) was passed a numeric string value ' + + 'for CSS property `%s` (value: `%s`) which will be treated ' + + 'as a unitless number in a future version of React.', + component._currentElement.type, + ownerName || 'unknown', + name, + value, + ) + : void 0; + } + } + } + value = value.trim(); + } + return value + 'px'; + } + + module.exports = dangerousStyleValue; + + /***/ + }, + /* 807 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (process) { + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + var KeyEscapeUtils = __webpack_require__(203); + var traverseAllChildren = __webpack_require__(342); + var warning = __webpack_require__(4); + + var ReactComponentTreeHook; + + if ( + typeof process !== 'undefined' && + __webpack_require__.i({ NODE_ENV: 'development', WEBPACK_SERVER_BUILD: true }) && + 'development' === 'test' + ) { + // Temporary hack. + // Inline requires don't work well with Jest: + // https://github.com/facebook/react/issues/7240 + // Remove the inline requires when we don't need them anymore: + // https://github.com/facebook/react/pull/7178 + ReactComponentTreeHook = __webpack_require__(24); + } + + /** + * @param {function} traverseContext Context passed through traversal. + * @param {?ReactComponent} child React child component. + * @param {!string} name String name of key path to child. + * @param {number=} selfDebugID Optional debugID of the current internal instance. + */ + function flattenSingleChildIntoContext(traverseContext, child, name, selfDebugID) { + // We found a component instance. + if (traverseContext && typeof traverseContext === 'object') { + var result = traverseContext; + var keyUnique = result[name] === undefined; + if (true) { + if (!ReactComponentTreeHook) { + ReactComponentTreeHook = __webpack_require__(24); + } + if (!keyUnique) { + true + ? warning( + false, + 'flattenChildren(...): Encountered two children with the same key, ' + + '`%s`. Child keys must be unique; when two children share a key, only ' + + 'the first child will be used.%s', + KeyEscapeUtils.unescape(name), + ReactComponentTreeHook.getStackAddendumByID(selfDebugID), + ) + : void 0; + } + } + if (keyUnique && child != null) { + result[name] = child; + } + } + } + + /** + * Flattens children that are typically specified as `props.children`. Any null + * children will not be included in the resulting object. + * @return {!object} flattened children keyed by name. + */ + function flattenChildren(children, selfDebugID) { + if (children == null) { + return children; + } + var result = {}; + + if (true) { + traverseAllChildren( + children, + function (traverseContext, child, name) { + return flattenSingleChildIntoContext(traverseContext, child, name, selfDebugID); + }, + result, + ); + } else { + traverseAllChildren(children, flattenSingleChildIntoContext, result); + } + return result; + } + + module.exports = flattenChildren; + /* WEBPACK VAR INJECTION */ + }).call(exports, __webpack_require__(100)); + + /***/ + }, + /* 808 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var getEventCharCode = __webpack_require__(211); + + /** + * Normalization of deprecated HTML5 `key` values + * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names + */ + var normalizeKey = { + Esc: 'Escape', + Spacebar: ' ', + Left: 'ArrowLeft', + Up: 'ArrowUp', + Right: 'ArrowRight', + Down: 'ArrowDown', + Del: 'Delete', + Win: 'OS', + Menu: 'ContextMenu', + Apps: 'ContextMenu', + Scroll: 'ScrollLock', + MozPrintableKey: 'Unidentified', + }; + + /** + * Translation from legacy `keyCode` to HTML5 `key` + * Only special keys supported, all others depend on keyboard layout or browser + * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names + */ + var translateToKey = { + 8: 'Backspace', + 9: 'Tab', + 12: 'Clear', + 13: 'Enter', + 16: 'Shift', + 17: 'Control', + 18: 'Alt', + 19: 'Pause', + 20: 'CapsLock', + 27: 'Escape', + 32: ' ', + 33: 'PageUp', + 34: 'PageDown', + 35: 'End', + 36: 'Home', + 37: 'ArrowLeft', + 38: 'ArrowUp', + 39: 'ArrowRight', + 40: 'ArrowDown', + 45: 'Insert', + 46: 'Delete', + 112: 'F1', + 113: 'F2', + 114: 'F3', + 115: 'F4', + 116: 'F5', + 117: 'F6', + 118: 'F7', + 119: 'F8', + 120: 'F9', + 121: 'F10', + 122: 'F11', + 123: 'F12', + 144: 'NumLock', + 145: 'ScrollLock', + 224: 'Meta', + }; + + /** + * @param {object} nativeEvent Native browser event. + * @return {string} Normalized `key` property. + */ + function getEventKey(nativeEvent) { + if (nativeEvent.key) { + // Normalize inconsistent values reported by browsers due to + // implementations of a working draft specification. + + // FireFox implements `key` but returns `MozPrintableKey` for all + // printable characters (normalized to `Unidentified`), ignore it. + var key = normalizeKey[nativeEvent.key] || nativeEvent.key; + if (key !== 'Unidentified') { + return key; + } + } + + // Browser does not implement `key`, polyfill as much of it as we can. + if (nativeEvent.type === 'keypress') { + var charCode = getEventCharCode(nativeEvent); + + // The enter-key is technically both printable and non-printable and can + // thus be captured by `keypress`, no other non-printable key should. + return charCode === 13 ? 'Enter' : String.fromCharCode(charCode); + } + if (nativeEvent.type === 'keydown' || nativeEvent.type === 'keyup') { + // While user keyboard layout determines the actual meaning of each + // `keyCode` value, almost all function keys have a universal value. + return translateToKey[nativeEvent.keyCode] || 'Unidentified'; + } + return ''; + } + + module.exports = getEventKey; + + /***/ + }, + /* 809 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + /* global Symbol */ + + var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; + var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec. + + /** + * Returns the iterator method function contained on the iterable object. + * + * Be sure to invoke the function with the iterable as context: + * + * var iteratorFn = getIteratorFn(myIterable); + * if (iteratorFn) { + * var iterator = iteratorFn.call(myIterable); + * ... + * } + * + * @param {?object} maybeIterable + * @return {?function} + */ + function getIteratorFn(maybeIterable) { + var iteratorFn = + maybeIterable && + ((ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL]) || maybeIterable[FAUX_ITERATOR_SYMBOL]); + if (typeof iteratorFn === 'function') { + return iteratorFn; + } + } + + module.exports = getIteratorFn; + + /***/ + }, + /* 810 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + /** + * Given any node return the first leaf node without children. + * + * @param {DOMElement|DOMTextNode} node + * @return {DOMElement|DOMTextNode} + */ + + function getLeafNode(node) { + while (node && node.firstChild) { + node = node.firstChild; + } + return node; + } + + /** + * Get the next sibling within a container. This will walk up the + * DOM if a node's siblings have been exhausted. + * + * @param {DOMElement|DOMTextNode} node + * @return {?DOMElement|DOMTextNode} + */ + function getSiblingNode(node) { + while (node) { + if (node.nextSibling) { + return node.nextSibling; + } + node = node.parentNode; + } + } + + /** + * Get object describing the nodes which contain characters at offset. + * + * @param {DOMElement|DOMTextNode} root + * @param {number} offset + * @return {?object} + */ + function getNodeForCharacterOffset(root, offset) { + var node = getLeafNode(root); + var nodeStart = 0; + var nodeEnd = 0; + + while (node) { + if (node.nodeType === 3) { + nodeEnd = nodeStart + node.textContent.length; + + if (nodeStart <= offset && nodeEnd >= offset) { + return { + node: node, + offset: offset - nodeStart, + }; + } + + nodeStart = nodeEnd; + } + + node = getLeafNode(getSiblingNode(node)); + } + } + + module.exports = getNodeForCharacterOffset; + + /***/ + }, + /* 811 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var escapeTextContentForBrowser = __webpack_require__(150); + + /** + * Escapes attribute value to prevent scripting attacks. + * + * @param {*} value Value to escape. + * @return {string} An escaped string. + */ + function quoteAttributeValueForBrowser(value) { + return '"' + escapeTextContentForBrowser(value) + '"'; + } + + module.exports = quoteAttributeValueForBrowser; + + /***/ + }, + /* 812 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var ReactMount = __webpack_require__(327); + + module.exports = ReactMount.renderSubtreeIntoContainer; + + /***/ + }, + /* 813 */ + /***/ function (module, exports, __webpack_require__) { + exports.__esModule = true; + exports.warn = + exports.requestIdleCallback = + exports.reducePropsToState = + exports.mapStateOnServer = + exports.handleClientStateChange = + exports.convertReactPropstoHtmlAttributes = + undefined; + + var _typeof = + typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' + ? function (obj) { + return typeof obj; + } + : function (obj) { + return obj && + typeof Symbol === 'function' && + obj.constructor === Symbol && + obj !== Symbol.prototype + ? 'symbol' + : typeof obj; + }; + + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + var _react = __webpack_require__(1); + + var _react2 = _interopRequireDefault(_react); + + var _objectAssign = __webpack_require__(9); + + var _objectAssign2 = _interopRequireDefault(_objectAssign); + + var _HelmetConstants = __webpack_require__(343); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + var encodeSpecialCharacters = function encodeSpecialCharacters(str) { + var encode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + + if (encode === false) { + return String(str); + } + + return String(str) + .replace(/&/g, '&') + .replace(/</g, '<') + .replace(/>/g, '>') + .replace(/"/g, '"') + .replace(/'/g, '''); + }; + + var getTitleFromPropsList = function getTitleFromPropsList(propsList) { + var innermostTitle = getInnermostProperty(propsList, _HelmetConstants.TAG_NAMES.TITLE); + var innermostTemplate = getInnermostProperty(propsList, _HelmetConstants.HELMET_PROPS.TITLE_TEMPLATE); + + if (innermostTemplate && innermostTitle) { + // use function arg to avoid need to escape $ characters + return innermostTemplate.replace(/%s/g, function () { + return innermostTitle; + }); + } + + var innermostDefaultTitle = getInnermostProperty( + propsList, + _HelmetConstants.HELMET_PROPS.DEFAULT_TITLE, + ); + + return innermostTitle || innermostDefaultTitle || undefined; + }; + + var getOnChangeClientState = function getOnChangeClientState(propsList) { + return ( + getInnermostProperty(propsList, _HelmetConstants.HELMET_PROPS.ON_CHANGE_CLIENT_STATE) || + function () {} + ); + }; + + var getAttributesFromPropsList = function getAttributesFromPropsList(tagType, propsList) { + return propsList + .filter(function (props) { + return typeof props[tagType] !== 'undefined'; + }) + .map(function (props) { + return props[tagType]; + }) + .reduce(function (tagAttrs, current) { + return _extends({}, tagAttrs, current); + }, {}); + }; + + var getBaseTagFromPropsList = function getBaseTagFromPropsList(primaryAttributes, propsList) { + return propsList + .filter(function (props) { + return typeof props[_HelmetConstants.TAG_NAMES.BASE] !== 'undefined'; + }) + .map(function (props) { + return props[_HelmetConstants.TAG_NAMES.BASE]; + }) + .reverse() + .reduce(function (innermostBaseTag, tag) { + if (!innermostBaseTag.length) { + var keys = Object.keys(tag); + + for (var i = 0; i < keys.length; i++) { + var attributeKey = keys[i]; + var lowerCaseAttributeKey = attributeKey.toLowerCase(); + + if (primaryAttributes.indexOf(lowerCaseAttributeKey) !== -1 && tag[lowerCaseAttributeKey]) { + return innermostBaseTag.concat(tag); + } + } + } + + return innermostBaseTag; + }, []); + }; + + var getTagsFromPropsList = function getTagsFromPropsList(tagName, primaryAttributes, propsList) { + // Calculate list of tags, giving priority innermost component (end of the propslist) + var approvedSeenTags = {}; + + return propsList + .filter(function (props) { + if (Array.isArray(props[tagName])) { + return true; + } + if (typeof props[tagName] !== 'undefined') { + warn( + 'Helmet: ' + + tagName + + ' should be of type "Array". Instead found type "' + + _typeof(props[tagName]) + + '"', + ); + } + return false; + }) + .map(function (props) { + return props[tagName]; + }) + .reverse() + .reduce(function (approvedTags, instanceTags) { + var instanceSeenTags = {}; + + instanceTags + .filter(function (tag) { + var primaryAttributeKey = void 0; + var keys = Object.keys(tag); + for (var i = 0; i < keys.length; i++) { + var attributeKey = keys[i]; + var lowerCaseAttributeKey = attributeKey.toLowerCase(); + + // Special rule with link tags, since rel and href are both primary tags, rel takes priority + if ( + primaryAttributes.indexOf(lowerCaseAttributeKey) !== -1 && + !( + primaryAttributeKey === _HelmetConstants.TAG_PROPERTIES.REL && + tag[primaryAttributeKey].toLowerCase() === 'canonical' + ) && + !( + lowerCaseAttributeKey === _HelmetConstants.TAG_PROPERTIES.REL && + tag[lowerCaseAttributeKey].toLowerCase() === 'stylesheet' + ) + ) { + primaryAttributeKey = lowerCaseAttributeKey; + } + // Special case for innerHTML which doesn't work lowercased + if ( + primaryAttributes.indexOf(attributeKey) !== -1 && + (attributeKey === _HelmetConstants.TAG_PROPERTIES.INNER_HTML || + attributeKey === _HelmetConstants.TAG_PROPERTIES.CSS_TEXT || + attributeKey === _HelmetConstants.TAG_PROPERTIES.ITEM_PROP) + ) { + primaryAttributeKey = attributeKey; + } + } + + if (!primaryAttributeKey || !tag[primaryAttributeKey]) { + return false; + } + + var value = tag[primaryAttributeKey].toLowerCase(); + + if (!approvedSeenTags[primaryAttributeKey]) { + approvedSeenTags[primaryAttributeKey] = {}; + } + + if (!instanceSeenTags[primaryAttributeKey]) { + instanceSeenTags[primaryAttributeKey] = {}; + } + + if (!approvedSeenTags[primaryAttributeKey][value]) { + instanceSeenTags[primaryAttributeKey][value] = true; + return true; + } + + return false; + }) + .reverse() + .forEach(function (tag) { + return approvedTags.push(tag); + }); + + // Update seen tags with tags from this instance + var keys = Object.keys(instanceSeenTags); + for (var i = 0; i < keys.length; i++) { + var attributeKey = keys[i]; + var tagUnion = (0, _objectAssign2.default)( + {}, + approvedSeenTags[attributeKey], + instanceSeenTags[attributeKey], + ); + + approvedSeenTags[attributeKey] = tagUnion; + } + + return approvedTags; + }, []) + .reverse(); + }; + + var getInnermostProperty = function getInnermostProperty(propsList, property) { + for (var i = propsList.length - 1; i >= 0; i--) { + var props = propsList[i]; + + if (props.hasOwnProperty(property)) { + return props[property]; + } + } + + return null; + }; + + var reducePropsToState = function reducePropsToState(propsList) { + return { + baseTag: getBaseTagFromPropsList([_HelmetConstants.TAG_PROPERTIES.HREF], propsList), + bodyAttributes: getAttributesFromPropsList(_HelmetConstants.ATTRIBUTE_NAMES.BODY, propsList), + encode: getInnermostProperty(propsList, _HelmetConstants.HELMET_PROPS.ENCODE_SPECIAL_CHARACTERS), + htmlAttributes: getAttributesFromPropsList(_HelmetConstants.ATTRIBUTE_NAMES.HTML, propsList), + linkTags: getTagsFromPropsList( + _HelmetConstants.TAG_NAMES.LINK, + [_HelmetConstants.TAG_PROPERTIES.REL, _HelmetConstants.TAG_PROPERTIES.HREF], + propsList, + ), + metaTags: getTagsFromPropsList( + _HelmetConstants.TAG_NAMES.META, + [ + _HelmetConstants.TAG_PROPERTIES.NAME, + _HelmetConstants.TAG_PROPERTIES.CHARSET, + _HelmetConstants.TAG_PROPERTIES.HTTPEQUIV, + _HelmetConstants.TAG_PROPERTIES.PROPERTY, + _HelmetConstants.TAG_PROPERTIES.ITEM_PROP, + ], + propsList, + ), + noscriptTags: getTagsFromPropsList( + _HelmetConstants.TAG_NAMES.NOSCRIPT, + [_HelmetConstants.TAG_PROPERTIES.INNER_HTML], + propsList, + ), + onChangeClientState: getOnChangeClientState(propsList), + scriptTags: getTagsFromPropsList( + _HelmetConstants.TAG_NAMES.SCRIPT, + [_HelmetConstants.TAG_PROPERTIES.SRC, _HelmetConstants.TAG_PROPERTIES.INNER_HTML], + propsList, + ), + styleTags: getTagsFromPropsList( + _HelmetConstants.TAG_NAMES.STYLE, + [_HelmetConstants.TAG_PROPERTIES.CSS_TEXT], + propsList, + ), + title: getTitleFromPropsList(propsList), + titleAttributes: getAttributesFromPropsList(_HelmetConstants.ATTRIBUTE_NAMES.TITLE, propsList), + }; + }; + + var requestIdleCallback = (function () { + if (typeof window !== 'undefined' && typeof window.requestIdleCallback !== 'undefined') { + return window.requestIdleCallback; + } + + return function (cb) { + var start = Date.now(); + return setTimeout(function () { + cb({ + didTimeout: false, + timeRemaining: function timeRemaining() { + return Math.max(0, 50 - (Date.now() - start)); + }, + }); + }, 1); + }; + })(); + + var cancelIdleCallback = (function () { + if (typeof window !== 'undefined' && typeof window.cancelIdleCallback !== 'undefined') { + return window.cancelIdleCallback; + } + + return function (id) { + return clearTimeout(id); + }; + })(); + + var warn = function warn(msg) { + return console && typeof console.warn === 'function' && console.warn(msg); + }; + + var _helmetIdleCallback = null; + + var handleClientStateChange = function handleClientStateChange(newState) { + var baseTag = newState.baseTag, + bodyAttributes = newState.bodyAttributes, + htmlAttributes = newState.htmlAttributes, + linkTags = newState.linkTags, + metaTags = newState.metaTags, + noscriptTags = newState.noscriptTags, + onChangeClientState = newState.onChangeClientState, + scriptTags = newState.scriptTags, + styleTags = newState.styleTags, + title = newState.title, + titleAttributes = newState.titleAttributes; + + if (_helmetIdleCallback) { + cancelIdleCallback(_helmetIdleCallback); + } + + _helmetIdleCallback = requestIdleCallback(function () { + updateAttributes(_HelmetConstants.TAG_NAMES.BODY, bodyAttributes); + updateAttributes(_HelmetConstants.TAG_NAMES.HTML, htmlAttributes); + + updateTitle(title, titleAttributes); + + var tagUpdates = { + baseTag: updateTags(_HelmetConstants.TAG_NAMES.BASE, baseTag), + linkTags: updateTags(_HelmetConstants.TAG_NAMES.LINK, linkTags), + metaTags: updateTags(_HelmetConstants.TAG_NAMES.META, metaTags), + noscriptTags: updateTags(_HelmetConstants.TAG_NAMES.NOSCRIPT, noscriptTags), + scriptTags: updateTags(_HelmetConstants.TAG_NAMES.SCRIPT, scriptTags), + styleTags: updateTags(_HelmetConstants.TAG_NAMES.STYLE, styleTags), + }; + + var addedTags = {}; + var removedTags = {}; + + Object.keys(tagUpdates).forEach(function (tagType) { + var _tagUpdates$tagType = tagUpdates[tagType], + newTags = _tagUpdates$tagType.newTags, + oldTags = _tagUpdates$tagType.oldTags; + + if (newTags.length) { + addedTags[tagType] = newTags; + } + if (oldTags.length) { + removedTags[tagType] = tagUpdates[tagType].oldTags; + } + }); + + _helmetIdleCallback = null; + onChangeClientState(newState, addedTags, removedTags); + }); + }; + + var updateTitle = function updateTitle(title, attributes) { + if (typeof title === 'string' && document.title !== title) { + document.title = title; + } + + updateAttributes(_HelmetConstants.TAG_NAMES.TITLE, attributes); + }; + + var updateAttributes = function updateAttributes(tagName, attributes) { + var elementTag = document.getElementsByTagName(tagName)[0]; + + if (!elementTag) { + return; + } + + var helmetAttributeString = elementTag.getAttribute(_HelmetConstants.HELMET_ATTRIBUTE); + var helmetAttributes = helmetAttributeString ? helmetAttributeString.split(',') : []; + var attributesToRemove = [].concat(helmetAttributes); + var attributeKeys = Object.keys(attributes); + + for (var i = 0; i < attributeKeys.length; i++) { + var attribute = attributeKeys[i]; + var value = attributes[attribute] || ''; + + if (elementTag.getAttribute(attribute) !== value) { + elementTag.setAttribute(attribute, value); + } + + if (helmetAttributes.indexOf(attribute) === -1) { + helmetAttributes.push(attribute); + } + + var indexToSave = attributesToRemove.indexOf(attribute); + if (indexToSave !== -1) { + attributesToRemove.splice(indexToSave, 1); + } + } + + for (var _i = attributesToRemove.length - 1; _i >= 0; _i--) { + elementTag.removeAttribute(attributesToRemove[_i]); + } + + if (helmetAttributes.length === attributesToRemove.length) { + elementTag.removeAttribute(_HelmetConstants.HELMET_ATTRIBUTE); + } else if (elementTag.getAttribute(_HelmetConstants.HELMET_ATTRIBUTE) !== attributeKeys.join(',')) { + elementTag.setAttribute(_HelmetConstants.HELMET_ATTRIBUTE, attributeKeys.join(',')); + } + }; + + var updateTags = function updateTags(type, tags) { + var headElement = document.head || document.querySelector(_HelmetConstants.TAG_NAMES.HEAD); + var tagNodes = headElement.querySelectorAll(type + '[' + _HelmetConstants.HELMET_ATTRIBUTE + ']'); + var oldTags = Array.prototype.slice.call(tagNodes); + var newTags = []; + var indexToDelete = void 0; + + if (tags && tags.length) { + tags.forEach(function (tag) { + var newElement = document.createElement(type); + + for (var attribute in tag) { + if (tag.hasOwnProperty(attribute)) { + if (attribute === _HelmetConstants.TAG_PROPERTIES.INNER_HTML) { + newElement.innerHTML = tag.innerHTML; + } else if (attribute === _HelmetConstants.TAG_PROPERTIES.CSS_TEXT) { + if (newElement.styleSheet) { + newElement.styleSheet.cssText = tag.cssText; + } else { + newElement.appendChild(document.createTextNode(tag.cssText)); + } + } else { + var value = typeof tag[attribute] === 'undefined' ? '' : tag[attribute]; + newElement.setAttribute(attribute, value); + } + } + } + + newElement.setAttribute(_HelmetConstants.HELMET_ATTRIBUTE, 'true'); + + // Remove a duplicate tag from domTagstoRemove, so it isn't cleared. + if ( + oldTags.some(function (existingTag, index) { + indexToDelete = index; + return newElement.isEqualNode(existingTag); + }) + ) { + oldTags.splice(indexToDelete, 1); + } else { + newTags.push(newElement); + } + }); + } + + oldTags.forEach(function (tag) { + return tag.parentNode.removeChild(tag); + }); + newTags.forEach(function (tag) { + return headElement.appendChild(tag); + }); + + return { + oldTags: oldTags, + newTags: newTags, + }; + }; + + var generateElementAttributesAsString = function generateElementAttributesAsString(attributes) { + return Object.keys(attributes).reduce(function (str, key) { + var attr = typeof attributes[key] !== 'undefined' ? key + '="' + attributes[key] + '"' : '' + key; + return str ? str + ' ' + attr : attr; + }, ''); + }; + + var generateTitleAsString = function generateTitleAsString(type, title, attributes, encode) { + var attributeString = generateElementAttributesAsString(attributes); + return attributeString + ? '<' + + type + + ' ' + + _HelmetConstants.HELMET_ATTRIBUTE + + '="true" ' + + attributeString + + '>' + + encodeSpecialCharacters(title, encode) + + '</' + + type + + '>' + : '<' + + type + + ' ' + + _HelmetConstants.HELMET_ATTRIBUTE + + '="true">' + + encodeSpecialCharacters(title, encode) + + '</' + + type + + '>'; + }; + + var generateTagsAsString = function generateTagsAsString(type, tags, encode) { + return tags.reduce(function (str, tag) { + var attributeHtml = Object.keys(tag) + .filter(function (attribute) { + return !( + attribute === _HelmetConstants.TAG_PROPERTIES.INNER_HTML || + attribute === _HelmetConstants.TAG_PROPERTIES.CSS_TEXT + ); + }) + .reduce(function (string, attribute) { + var attr = + typeof tag[attribute] === 'undefined' + ? attribute + : attribute + '="' + encodeSpecialCharacters(tag[attribute], encode) + '"'; + return string ? string + ' ' + attr : attr; + }, ''); + + var tagContent = tag.innerHTML || tag.cssText || ''; + + var isSelfClosing = _HelmetConstants.SELF_CLOSING_TAGS.indexOf(type) === -1; + + return ( + str + + '<' + + type + + ' ' + + _HelmetConstants.HELMET_ATTRIBUTE + + '="true" ' + + attributeHtml + + (isSelfClosing ? '/>' : '>' + tagContent + '</' + type + '>') + ); + }, ''); + }; + + var convertElementAttributestoReactProps = function convertElementAttributestoReactProps(attributes) { + var initProps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + return Object.keys(attributes).reduce(function (obj, key) { + obj[_HelmetConstants.REACT_TAG_MAP[key] || key] = attributes[key]; + return obj; + }, initProps); + }; + + var convertReactPropstoHtmlAttributes = function convertReactPropstoHtmlAttributes(props) { + var initAttributes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + return Object.keys(props).reduce(function (obj, key) { + obj[_HelmetConstants.HTML_TAG_MAP[key] || key] = props[key]; + return obj; + }, initAttributes); + }; + + var generateTitleAsReactComponent = function generateTitleAsReactComponent(type, title, attributes) { + var _initProps; + + // assigning into an array to define toString function on it + var initProps = + ((_initProps = { + key: title, + }), + (_initProps[_HelmetConstants.HELMET_ATTRIBUTE] = true), + _initProps); + var props = convertElementAttributestoReactProps(attributes, initProps); + + return [_react2.default.createElement(_HelmetConstants.TAG_NAMES.TITLE, props, title)]; + }; + + var generateTagsAsReactComponent = function generateTagsAsReactComponent(type, tags) { + return tags.map(function (tag, i) { + var _mappedTag; + + var mappedTag = + ((_mappedTag = { + key: i, + }), + (_mappedTag[_HelmetConstants.HELMET_ATTRIBUTE] = true), + _mappedTag); + + Object.keys(tag).forEach(function (attribute) { + var mappedAttribute = _HelmetConstants.REACT_TAG_MAP[attribute] || attribute; + + if ( + mappedAttribute === _HelmetConstants.TAG_PROPERTIES.INNER_HTML || + mappedAttribute === _HelmetConstants.TAG_PROPERTIES.CSS_TEXT + ) { + var content = tag.innerHTML || tag.cssText; + mappedTag.dangerouslySetInnerHTML = { __html: content }; + } else { + mappedTag[mappedAttribute] = tag[attribute]; + } + }); + + return _react2.default.createElement(type, mappedTag); + }); + }; + + var getMethodsForTag = function getMethodsForTag(type, tags, encode) { + switch (type) { + case _HelmetConstants.TAG_NAMES.TITLE: + return { + toComponent: function toComponent() { + return generateTitleAsReactComponent(type, tags.title, tags.titleAttributes, encode); + }, + toString: function toString() { + return generateTitleAsString(type, tags.title, tags.titleAttributes, encode); + }, + }; + case _HelmetConstants.ATTRIBUTE_NAMES.BODY: + case _HelmetConstants.ATTRIBUTE_NAMES.HTML: + return { + toComponent: function toComponent() { + return convertElementAttributestoReactProps(tags); + }, + toString: function toString() { + return generateElementAttributesAsString(tags); + }, + }; + default: + return { + toComponent: function toComponent() { + return generateTagsAsReactComponent(type, tags); + }, + toString: function toString() { + return generateTagsAsString(type, tags, encode); + }, + }; + } + }; + + var mapStateOnServer = function mapStateOnServer(_ref) { + var baseTag = _ref.baseTag, + bodyAttributes = _ref.bodyAttributes, + encode = _ref.encode, + htmlAttributes = _ref.htmlAttributes, + linkTags = _ref.linkTags, + metaTags = _ref.metaTags, + noscriptTags = _ref.noscriptTags, + scriptTags = _ref.scriptTags, + styleTags = _ref.styleTags, + _ref$title = _ref.title, + title = _ref$title === undefined ? '' : _ref$title, + titleAttributes = _ref.titleAttributes; + return { + base: getMethodsForTag(_HelmetConstants.TAG_NAMES.BASE, baseTag, encode), + bodyAttributes: getMethodsForTag(_HelmetConstants.ATTRIBUTE_NAMES.BODY, bodyAttributes, encode), + htmlAttributes: getMethodsForTag(_HelmetConstants.ATTRIBUTE_NAMES.HTML, htmlAttributes, encode), + link: getMethodsForTag(_HelmetConstants.TAG_NAMES.LINK, linkTags, encode), + meta: getMethodsForTag(_HelmetConstants.TAG_NAMES.META, metaTags, encode), + noscript: getMethodsForTag(_HelmetConstants.TAG_NAMES.NOSCRIPT, noscriptTags, encode), + script: getMethodsForTag(_HelmetConstants.TAG_NAMES.SCRIPT, scriptTags, encode), + style: getMethodsForTag(_HelmetConstants.TAG_NAMES.STYLE, styleTags, encode), + title: getMethodsForTag( + _HelmetConstants.TAG_NAMES.TITLE, + { title: title, titleAttributes: titleAttributes }, + encode, + ), + }; + }; + + exports.convertReactPropstoHtmlAttributes = convertReactPropstoHtmlAttributes; + exports.handleClientStateChange = handleClientStateChange; + exports.mapStateOnServer = mapStateOnServer; + exports.reducePropsToState = reducePropsToState; + exports.requestIdleCallback = requestIdleCallback; + exports.warn = warn; + + /***/ + }, + /* 814 */ + /***/ function (module, exports, __webpack_require__) { + (function webpackUniversalModuleDefinition(root, factory) { + if (true) module.exports = factory(__webpack_require__(1), __webpack_require__(43)); + else if (typeof define === 'function' && define.amd) define(['react', 'react-dom'], factory); + else if (typeof exports === 'object') + exports['ReactModal'] = factory(require('react'), require('react-dom')); + else root['ReactModal'] = factory(root['React'], root['ReactDOM']); + })(this, function (__WEBPACK_EXTERNAL_MODULE_2__, __WEBPACK_EXTERNAL_MODULE_3__) { + return /******/ (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] = { + /******/ exports: {}, + /******/ id: moduleId, + /******/ loaded: false, + /******/ + }); + + /******/ // Execute the module function + /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); + + /******/ // Flag the module as loaded + /******/ module.loaded = 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; + + /******/ // __webpack_public_path__ + /******/ __webpack_require__.p = '/'; + + /******/ // Load entry module and return exports + /******/ return __webpack_require__(0); + /******/ + })( + /************************************************************************/ + /******/ [ + /* 0 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + module.exports = __webpack_require__(1); + + /***/ + }, + /* 1 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var React = __webpack_require__(2); + var ReactDOM = __webpack_require__(3); + var PropTypes = __webpack_require__(4); + var ExecutionEnvironment = __webpack_require__(12); + var ModalPortal = React.createFactory(__webpack_require__(13)); + var ariaAppHider = __webpack_require__(22); + var refCount = __webpack_require__(23); + var elementClass = __webpack_require__(24); + var renderSubtreeIntoContainer = __webpack_require__(3).unstable_renderSubtreeIntoContainer; + var Assign = __webpack_require__(17); + var createReactClass = __webpack_require__(18); + + var SafeHTMLElement = ExecutionEnvironment.canUseDOM ? window.HTMLElement : {}; + var AppElement = ExecutionEnvironment.canUseDOM + ? document.body + : { appendChild: function appendChild() {} }; + + function getParentElement(parentSelector) { + return parentSelector(); + } + + var Modal = createReactClass({ + displayName: 'Modal', + statics: { + setAppElement: function setAppElement(element) { + AppElement = ariaAppHider.setElement(element); + }, + injectCSS: function injectCSS() { + 'production' !== undefined && + console.warn( + 'React-Modal: injectCSS has been deprecated ' + + 'and no longer has any effect. It will be removed in a later version', + ); + }, + }, + + propTypes: { + isOpen: PropTypes.bool.isRequired, + style: PropTypes.shape({ + content: PropTypes.object, + overlay: PropTypes.object, + }), + portalClassName: PropTypes.string, + appElement: PropTypes.instanceOf(SafeHTMLElement), + onAfterOpen: PropTypes.func, + onRequestClose: PropTypes.func, + closeTimeoutMS: PropTypes.number, + ariaHideApp: PropTypes.bool, + shouldCloseOnOverlayClick: PropTypes.bool, + parentSelector: PropTypes.func, + role: PropTypes.string, + contentLabel: PropTypes.string.isRequired, + }, + + getDefaultProps: function getDefaultProps() { + return { + isOpen: false, + portalClassName: 'ReactModalPortal', + ariaHideApp: true, + closeTimeoutMS: 0, + shouldCloseOnOverlayClick: true, + parentSelector: function parentSelector() { + return document.body; + }, + }; + }, + + componentDidMount: function componentDidMount() { + this.node = document.createElement('div'); + this.node.className = this.props.portalClassName; + + if (this.props.isOpen) refCount.add(this); + + var parent = getParentElement(this.props.parentSelector); + parent.appendChild(this.node); + this.renderPortal(this.props); + }, + + componentWillReceiveProps: function componentWillReceiveProps(newProps) { + if (newProps.isOpen) refCount.add(this); + if (!newProps.isOpen) refCount.remove(this); + var currentParent = getParentElement(this.props.parentSelector); + var newParent = getParentElement(newProps.parentSelector); + + if (newParent !== currentParent) { + currentParent.removeChild(this.node); + newParent.appendChild(this.node); + } + + this.renderPortal(newProps); + }, + + componentWillUnmount: function componentWillUnmount() { + refCount.remove(this); + + if (this.props.ariaHideApp) { + ariaAppHider.show(this.props.appElement); + } + + var state = this.portal.state; + var now = Date.now(); + var closesAt = + state.isOpen && + this.props.closeTimeoutMS && + (state.closesAt || now + this.props.closeTimeoutMS); + + if (closesAt) { + if (!state.beforeClose) { + this.portal.closeWithTimeout(); + } + + var that = this; + setTimeout(function () { + that.removePortal(); + }, closesAt - now); + } else { + this.removePortal(); + } + }, + + removePortal: function removePortal() { + ReactDOM.unmountComponentAtNode(this.node); + var parent = getParentElement(this.props.parentSelector); + parent.removeChild(this.node); + if (refCount.count() === 0) { + elementClass(document.body).remove('ReactModal__Body--open'); + } + }, + + renderPortal: function renderPortal(props) { + if (props.isOpen || refCount.count() > 0) { + elementClass(document.body).add('ReactModal__Body--open'); + } else { + elementClass(document.body).remove('ReactModal__Body--open'); + } + + if (props.ariaHideApp) { + ariaAppHider.toggle(props.isOpen, props.appElement); + } + + this.portal = renderSubtreeIntoContainer( + this, + ModalPortal(Assign({}, props, { defaultStyles: Modal.defaultStyles })), + this.node, + ); + }, + + render: function render() { + return React.DOM.noscript(); + }, + }); + + Modal.defaultStyles = { + overlay: { + position: 'fixed', + top: 0, + left: 0, + right: 0, + bottom: 0, + backgroundColor: 'rgba(255, 255, 255, 0.75)', + }, + content: { + position: 'absolute', + top: '40px', + left: '40px', + right: '40px', + bottom: '40px', + border: '1px solid #ccc', + background: '#fff', + overflow: 'auto', + WebkitOverflowScrolling: 'touch', + borderRadius: '4px', + outline: 'none', + padding: '20px', + }, + }; + + module.exports = Modal; + + /***/ + }, + /* 2 */ + /***/ function (module, exports) { + module.exports = __WEBPACK_EXTERNAL_MODULE_2__; + + /***/ + }, + /* 3 */ + /***/ function (module, exports) { + module.exports = __WEBPACK_EXTERNAL_MODULE_3__; + + /***/ + }, + /* 4 */ + /***/ function (module, exports, __webpack_require__) { + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + + if (undefined !== 'production') { + var REACT_ELEMENT_TYPE = + (typeof Symbol === 'function' && Symbol.for && Symbol.for('react.element')) || 0xeac7; + + var isValidElement = function (object) { + return ( + typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE + ); + }; + + // By explicitly using `prop-types` you are opting into new development behavior. + // http://fb.me/prop-types-in-prod + var throwOnDirectAccess = true; + module.exports = __webpack_require__(5)(isValidElement, throwOnDirectAccess); + } else { + // By explicitly using `prop-types` you are opting into new production behavior. + // http://fb.me/prop-types-in-prod + module.exports = __webpack_require__(11)(); + } + + /***/ + }, + /* 5 */ + /***/ function (module, exports, __webpack_require__) { + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + + 'use strict'; + + var emptyFunction = __webpack_require__(6); + var invariant = __webpack_require__(7); + var warning = __webpack_require__(8); + + var ReactPropTypesSecret = __webpack_require__(9); + var checkPropTypes = __webpack_require__(10); + + module.exports = function (isValidElement, throwOnDirectAccess) { + /* global Symbol */ + var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; + var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec. + + /** + * Returns the iterator method function contained on the iterable object. + * + * Be sure to invoke the function with the iterable as context: + * + * var iteratorFn = getIteratorFn(myIterable); + * if (iteratorFn) { + * var iterator = iteratorFn.call(myIterable); + * ... + * } + * + * @param {?object} maybeIterable + * @return {?function} + */ + function getIteratorFn(maybeIterable) { + var iteratorFn = + maybeIterable && + ((ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL]) || + maybeIterable[FAUX_ITERATOR_SYMBOL]); + if (typeof iteratorFn === 'function') { + return iteratorFn; + } + } + + /** + * Collection of methods that allow declaration and validation of props that are + * supplied to React components. Example usage: + * + * var Props = require('ReactPropTypes'); + * var MyArticle = React.createClass({ + * propTypes: { + * // An optional string prop named "description". + * description: Props.string, + * + * // A required enum prop named "category". + * category: Props.oneOf(['News','Photos']).isRequired, + * + * // A prop named "dialog" that requires an instance of Dialog. + * dialog: Props.instanceOf(Dialog).isRequired + * }, + * render: function() { ... } + * }); + * + * A more formal specification of how these methods are used: + * + * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...) + * decl := ReactPropTypes.{type}(.isRequired)? + * + * Each and every declaration produces a function with the same signature. This + * allows the creation of custom validation functions. For example: + * + * var MyLink = React.createClass({ + * propTypes: { + * // An optional string or URI prop named "href". + * href: function(props, propName, componentName) { + * var propValue = props[propName]; + * if (propValue != null && typeof propValue !== 'string' && + * !(propValue instanceof URI)) { + * return new Error( + * 'Expected a string or an URI for ' + propName + ' in ' + + * componentName + * ); + * } + * } + * }, + * render: function() {...} + * }); + * + * @internal + */ + + var ANONYMOUS = '<<anonymous>>'; + + // Important! + // Keep this list in sync with production version in `./factoryWithThrowingShims.js`. + var ReactPropTypes = { + array: createPrimitiveTypeChecker('array'), + bool: createPrimitiveTypeChecker('boolean'), + func: createPrimitiveTypeChecker('function'), + number: createPrimitiveTypeChecker('number'), + object: createPrimitiveTypeChecker('object'), + string: createPrimitiveTypeChecker('string'), + symbol: createPrimitiveTypeChecker('symbol'), + + any: createAnyTypeChecker(), + arrayOf: createArrayOfTypeChecker, + element: createElementTypeChecker(), + instanceOf: createInstanceTypeChecker, + node: createNodeChecker(), + objectOf: createObjectOfTypeChecker, + oneOf: createEnumTypeChecker, + oneOfType: createUnionTypeChecker, + shape: createShapeTypeChecker, + }; + + /** + * inlined Object.is polyfill to avoid requiring consumers ship their own + * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is + */ + /*eslint-disable no-self-compare*/ + function is(x, y) { + // SameValue algorithm + if (x === y) { + // Steps 1-5, 7-10 + // Steps 6.b-6.e: +0 != -0 + return x !== 0 || 1 / x === 1 / y; + } else { + // Step 6.a: NaN == NaN + return x !== x && y !== y; + } + } + /*eslint-enable no-self-compare*/ + + /** + * We use an Error-like object for backward compatibility as people may call + * PropTypes directly and inspect their output. However, we don't use real + * Errors anymore. We don't inspect their stack anyway, and creating them + * is prohibitively expensive if they are created too often, such as what + * happens in oneOfType() for any type before the one that matched. + */ + function PropTypeError(message) { + this.message = message; + this.stack = ''; + } + // Make `instanceof Error` still work for returned errors. + PropTypeError.prototype = Error.prototype; + + function createChainableTypeChecker(validate) { + if (undefined !== 'production') { + var manualPropTypeCallCache = {}; + } + function checkType( + isRequired, + props, + propName, + componentName, + location, + propFullName, + secret, + ) { + componentName = componentName || ANONYMOUS; + propFullName = propFullName || propName; + + if (secret !== ReactPropTypesSecret) { + if (throwOnDirectAccess) { + // New behavior only for users of `prop-types` package + invariant( + false, + 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' + + 'Use `PropTypes.checkPropTypes()` to call them. ' + + 'Read more at http://fb.me/use-check-prop-types', + ); + } else if (undefined !== 'production' && typeof console !== 'undefined') { + // Old behavior for people using React.PropTypes + var cacheKey = componentName + ':' + propName; + if (!manualPropTypeCallCache[cacheKey]) { + warning( + false, + 'You are manually calling a React.PropTypes validation ' + + 'function for the `%s` prop on `%s`. This is deprecated ' + + 'and will throw in the standalone `prop-types` package. ' + + 'You may be seeing this warning due to a third-party PropTypes ' + + 'library. See https://fb.me/react-warning-dont-call-proptypes ' + + 'for details.', + propFullName, + componentName, + ); + manualPropTypeCallCache[cacheKey] = true; + } + } + } + if (props[propName] == null) { + if (isRequired) { + if (props[propName] === null) { + return new PropTypeError( + 'The ' + + location + + ' `' + + propFullName + + '` is marked as required ' + + ('in `' + componentName + '`, but its value is `null`.'), + ); + } + return new PropTypeError( + 'The ' + + location + + ' `' + + propFullName + + '` is marked as required in ' + + ('`' + componentName + '`, but its value is `undefined`.'), + ); + } + return null; + } else { + return validate(props, propName, componentName, location, propFullName); + } + } + + var chainedCheckType = checkType.bind(null, false); + chainedCheckType.isRequired = checkType.bind(null, true); + + return chainedCheckType; + } + + function createPrimitiveTypeChecker(expectedType) { + function validate(props, propName, componentName, location, propFullName, secret) { + var propValue = props[propName]; + var propType = getPropType(propValue); + if (propType !== expectedType) { + // `propValue` being instance of, say, date/regexp, pass the 'object' + // check, but we can offer a more precise error message here rather than + // 'of type `object`'. + var preciseType = getPreciseType(propValue); + + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` of type ' + + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + + ('`' + expectedType + '`.'), + ); + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createAnyTypeChecker() { + return createChainableTypeChecker(emptyFunction.thatReturnsNull); + } + + function createArrayOfTypeChecker(typeChecker) { + function validate(props, propName, componentName, location, propFullName) { + if (typeof typeChecker !== 'function') { + return new PropTypeError( + 'Property `' + + propFullName + + '` of component `' + + componentName + + '` has invalid PropType notation inside arrayOf.', + ); + } + var propValue = props[propName]; + if (!Array.isArray(propValue)) { + var propType = getPropType(propValue); + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` of type ' + + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'), + ); + } + for (var i = 0; i < propValue.length; i++) { + var error = typeChecker( + propValue, + i, + componentName, + location, + propFullName + '[' + i + ']', + ReactPropTypesSecret, + ); + if (error instanceof Error) { + return error; + } + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createElementTypeChecker() { + function validate(props, propName, componentName, location, propFullName) { + var propValue = props[propName]; + if (!isValidElement(propValue)) { + var propType = getPropType(propValue); + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` of type ' + + ('`' + + propType + + '` supplied to `' + + componentName + + '`, expected a single ReactElement.'), + ); + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createInstanceTypeChecker(expectedClass) { + function validate(props, propName, componentName, location, propFullName) { + if (!(props[propName] instanceof expectedClass)) { + var expectedClassName = expectedClass.name || ANONYMOUS; + var actualClassName = getClassName(props[propName]); + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` of type ' + + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + + ('instance of `' + expectedClassName + '`.'), + ); + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createEnumTypeChecker(expectedValues) { + if (!Array.isArray(expectedValues)) { + undefined !== 'production' + ? warning(false, 'Invalid argument supplied to oneOf, expected an instance of array.') + : void 0; + return emptyFunction.thatReturnsNull; + } + + function validate(props, propName, componentName, location, propFullName) { + var propValue = props[propName]; + for (var i = 0; i < expectedValues.length; i++) { + if (is(propValue, expectedValues[i])) { + return null; + } + } + + var valuesString = JSON.stringify(expectedValues); + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` of value `' + + propValue + + '` ' + + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'), + ); + } + return createChainableTypeChecker(validate); + } + + function createObjectOfTypeChecker(typeChecker) { + function validate(props, propName, componentName, location, propFullName) { + if (typeof typeChecker !== 'function') { + return new PropTypeError( + 'Property `' + + propFullName + + '` of component `' + + componentName + + '` has invalid PropType notation inside objectOf.', + ); + } + var propValue = props[propName]; + var propType = getPropType(propValue); + if (propType !== 'object') { + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` of type ' + + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'), + ); + } + for (var key in propValue) { + if (propValue.hasOwnProperty(key)) { + var error = typeChecker( + propValue, + key, + componentName, + location, + propFullName + '.' + key, + ReactPropTypesSecret, + ); + if (error instanceof Error) { + return error; + } + } + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createUnionTypeChecker(arrayOfTypeCheckers) { + if (!Array.isArray(arrayOfTypeCheckers)) { + undefined !== 'production' + ? warning( + false, + 'Invalid argument supplied to oneOfType, expected an instance of array.', + ) + : void 0; + return emptyFunction.thatReturnsNull; + } + + function validate(props, propName, componentName, location, propFullName) { + for (var i = 0; i < arrayOfTypeCheckers.length; i++) { + var checker = arrayOfTypeCheckers[i]; + if ( + checker( + props, + propName, + componentName, + location, + propFullName, + ReactPropTypesSecret, + ) == null + ) { + return null; + } + } + + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` supplied to ' + + ('`' + componentName + '`.'), + ); + } + return createChainableTypeChecker(validate); + } + + function createNodeChecker() { + function validate(props, propName, componentName, location, propFullName) { + if (!isNode(props[propName])) { + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` supplied to ' + + ('`' + componentName + '`, expected a ReactNode.'), + ); + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createShapeTypeChecker(shapeTypes) { + function validate(props, propName, componentName, location, propFullName) { + var propValue = props[propName]; + var propType = getPropType(propValue); + if (propType !== 'object') { + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` of type `' + + propType + + '` ' + + ('supplied to `' + componentName + '`, expected `object`.'), + ); + } + for (var key in shapeTypes) { + var checker = shapeTypes[key]; + if (!checker) { + continue; + } + var error = checker( + propValue, + key, + componentName, + location, + propFullName + '.' + key, + ReactPropTypesSecret, + ); + if (error) { + return error; + } + } + return null; + } + return createChainableTypeChecker(validate); + } + + function isNode(propValue) { + switch (typeof propValue) { + case 'number': + case 'string': + case 'undefined': + return true; + case 'boolean': + return !propValue; + case 'object': + if (Array.isArray(propValue)) { + return propValue.every(isNode); + } + if (propValue === null || isValidElement(propValue)) { + return true; + } + + var iteratorFn = getIteratorFn(propValue); + if (iteratorFn) { + var iterator = iteratorFn.call(propValue); + var step; + if (iteratorFn !== propValue.entries) { + while (!(step = iterator.next()).done) { + if (!isNode(step.value)) { + return false; + } + } + } else { + // Iterator will provide entry [k,v] tuples rather than values. + while (!(step = iterator.next()).done) { + var entry = step.value; + if (entry) { + if (!isNode(entry[1])) { + return false; + } + } + } + } + } else { + return false; + } + + return true; + default: + return false; + } + } + + function isSymbol(propType, propValue) { + // Native Symbol. + if (propType === 'symbol') { + return true; + } + + // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol' + if (propValue['@@toStringTag'] === 'Symbol') { + return true; + } + + // Fallback for non-spec compliant Symbols which are polyfilled. + if (typeof Symbol === 'function' && propValue instanceof Symbol) { + return true; + } + + return false; + } + + // Equivalent of `typeof` but with special handling for array and regexp. + function getPropType(propValue) { + var propType = typeof propValue; + if (Array.isArray(propValue)) { + return 'array'; + } + if (propValue instanceof RegExp) { + // Old webkits (at least until Android 4.0) return 'function' rather than + // 'object' for typeof a RegExp. We'll normalize this here so that /bla/ + // passes PropTypes.object. + return 'object'; + } + if (isSymbol(propType, propValue)) { + return 'symbol'; + } + return propType; + } + + // This handles more types than `getPropType`. Only used for error messages. + // See `createPrimitiveTypeChecker`. + function getPreciseType(propValue) { + var propType = getPropType(propValue); + if (propType === 'object') { + if (propValue instanceof Date) { + return 'date'; + } else if (propValue instanceof RegExp) { + return 'regexp'; + } + } + return propType; + } + + // Returns class name of the object, if any. + function getClassName(propValue) { + if (!propValue.constructor || !propValue.constructor.name) { + return ANONYMOUS; + } + return propValue.constructor.name; + } + + ReactPropTypes.checkPropTypes = checkPropTypes; + ReactPropTypes.PropTypes = ReactPropTypes; + + return ReactPropTypes; + }; + + /***/ + }, + /* 6 */ + /***/ function (module, exports) { + 'use strict'; + + /** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + function makeEmptyFunction(arg) { + return function () { + return arg; + }; + } + + /** + * This function accepts and discards inputs; it has no side effects. This is + * primarily useful idiomatically for overridable function endpoints which + * always need to be callable, since JS lacks a null-call idiom ala Cocoa. + */ + var emptyFunction = function emptyFunction() {}; + + emptyFunction.thatReturns = makeEmptyFunction; + emptyFunction.thatReturnsFalse = makeEmptyFunction(false); + emptyFunction.thatReturnsTrue = makeEmptyFunction(true); + emptyFunction.thatReturnsNull = makeEmptyFunction(null); + emptyFunction.thatReturnsThis = function () { + return this; + }; + emptyFunction.thatReturnsArgument = function (arg) { + return arg; + }; + + module.exports = emptyFunction; + + /***/ + }, + /* 7 */ + /***/ function (module, exports, __webpack_require__) { + /** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + 'use strict'; + + /** + * Use invariant() to assert state which your program assumes to be true. + * + * Provide sprintf-style format (only %s is supported) and arguments + * to provide information about what broke and what you were + * expecting. + * + * The invariant message will be stripped in production, but the invariant + * will remain to ensure logic does not differ in production. + */ + + var validateFormat = function validateFormat(format) {}; + + if (undefined !== 'production') { + validateFormat = function validateFormat(format) { + if (format === undefined) { + throw new Error('invariant requires an error message argument'); + } + }; + } + + function invariant(condition, format, a, b, c, d, e, f) { + validateFormat(format); + + if (!condition) { + var error; + if (format === undefined) { + error = new Error( + 'Minified exception occurred; use the non-minified dev environment ' + + 'for the full error message and additional helpful warnings.', + ); + } else { + var args = [a, b, c, d, e, f]; + var argIndex = 0; + error = new Error( + format.replace(/%s/g, function () { + return args[argIndex++]; + }), + ); + error.name = 'Invariant Violation'; + } + + error.framesToPop = 1; // we don't care about invariant's own frame + throw error; + } + } + + module.exports = invariant; + + /***/ + }, + /* 8 */ + /***/ function (module, exports, __webpack_require__) { + /** + * Copyright 2014-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + 'use strict'; + + var emptyFunction = __webpack_require__(6); + + /** + * Similar to invariant but only logs a warning if the condition is not met. + * This can be used to log issues in development environments in critical + * paths. Removing the logging code for production environments will keep the + * same logic and follow the same code paths. + */ + + var warning = emptyFunction; + + if (undefined !== 'production') { + (function () { + var printWarning = function printWarning(format) { + for ( + var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; + _key < _len; + _key++ + ) { + args[_key - 1] = arguments[_key]; + } + + var argIndex = 0; + var message = + 'Warning: ' + + format.replace(/%s/g, function () { + return args[argIndex++]; + }); + if (typeof console !== 'undefined') { + console.error(message); + } + try { + // --- Welcome to debugging React --- + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + throw new Error(message); + } catch (x) {} + }; + + warning = function warning(condition, format) { + if (format === undefined) { + throw new Error( + '`warning(condition, format, ...args)` requires a warning ' + 'message argument', + ); + } + + if (format.indexOf('Failed Composite propType: ') === 0) { + return; // Ignore CompositeComponent proptype check. + } + + if (!condition) { + for ( + var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; + _key2 < _len2; + _key2++ + ) { + args[_key2 - 2] = arguments[_key2]; + } + + printWarning.apply(undefined, [format].concat(args)); + } + }; + })(); + } + + module.exports = warning; + + /***/ + }, + /* 9 */ + /***/ function (module, exports) { + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + + 'use strict'; + + var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; + + module.exports = ReactPropTypesSecret; + + /***/ + }, + /* 10 */ + /***/ function (module, exports, __webpack_require__) { + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + + 'use strict'; + + if (undefined !== 'production') { + var invariant = __webpack_require__(7); + var warning = __webpack_require__(8); + var ReactPropTypesSecret = __webpack_require__(9); + var loggedTypeFailures = {}; + } + + /** + * Assert that the values match with the type specs. + * Error messages are memorized and will only be shown once. + * + * @param {object} typeSpecs Map of name to a ReactPropType + * @param {object} values Runtime values that need to be type-checked + * @param {string} location e.g. "prop", "context", "child context" + * @param {string} componentName Name of the component for error messages. + * @param {?Function} getStack Returns the component stack. + * @private + */ + function checkPropTypes(typeSpecs, values, location, componentName, getStack) { + if (undefined !== 'production') { + for (var typeSpecName in typeSpecs) { + if (typeSpecs.hasOwnProperty(typeSpecName)) { + var error; + // Prop type validation may throw. In case they do, we don't want to + // fail the render phase where it didn't fail before. So we log it. + // After these have been cleaned up, we'll let them throw. + try { + // This is intentionally an invariant that gets caught. It's the same + // behavior as without this statement except with a better message. + invariant( + typeof typeSpecs[typeSpecName] === 'function', + '%s: %s type `%s` is invalid; it must be a function, usually from ' + + 'React.PropTypes.', + componentName || 'React class', + location, + typeSpecName, + ); + error = typeSpecs[typeSpecName]( + values, + typeSpecName, + componentName, + location, + null, + ReactPropTypesSecret, + ); + } catch (ex) { + error = ex; + } + warning( + !error || error instanceof Error, + '%s: type specification of %s `%s` is invalid; the type checker ' + + 'function must return `null` or an `Error` but returned a %s. ' + + 'You may have forgotten to pass an argument to the type checker ' + + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + + 'shape all require an argument).', + componentName || 'React class', + location, + typeSpecName, + typeof error, + ); + if (error instanceof Error && !(error.message in loggedTypeFailures)) { + // Only monitor this failure once because there tends to be a lot of the + // same error. + loggedTypeFailures[error.message] = true; + + var stack = getStack ? getStack() : ''; + + warning( + false, + 'Failed %s type: %s%s', + location, + error.message, + stack != null ? stack : '', + ); + } + } + } + } + } + + module.exports = checkPropTypes; + + /***/ + }, + /* 11 */ + /***/ function (module, exports, __webpack_require__) { + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + + 'use strict'; + + var emptyFunction = __webpack_require__(6); + var invariant = __webpack_require__(7); + + module.exports = function () { + // Important! + // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`. + function shim() { + invariant( + false, + 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' + + 'Use PropTypes.checkPropTypes() to call them. ' + + 'Read more at http://fb.me/use-check-prop-types', + ); + } + shim.isRequired = shim; + function getShim() { + return shim; + } + var ReactPropTypes = { + array: shim, + bool: shim, + func: shim, + number: shim, + object: shim, + string: shim, + symbol: shim, + + any: shim, + arrayOf: getShim, + element: shim, + instanceOf: getShim, + node: shim, + objectOf: getShim, + oneOf: getShim, + oneOfType: getShim, + shape: getShim, + }; + + ReactPropTypes.checkPropTypes = emptyFunction; + ReactPropTypes.PropTypes = ReactPropTypes; + + return ReactPropTypes; + }; + + /***/ + }, + /* 12 */ + /***/ function (module, exports, __webpack_require__) { + var __WEBPACK_AMD_DEFINE_RESULT__; /*! + Copyright (c) 2015 Jed Watson. + Based on code that is Copyright 2013-2015, Facebook, Inc. + All rights reserved. + */ + + (function () { + 'use strict'; + + var canUseDOM = !!( + typeof window !== 'undefined' && + window.document && + window.document.createElement + ); + + var ExecutionEnvironment = { + canUseDOM: canUseDOM, + + canUseWorkers: typeof Worker !== 'undefined', + + canUseEventListeners: canUseDOM && !!(window.addEventListener || window.attachEvent), + + canUseViewport: canUseDOM && !!window.screen, + }; + + if (true) { + !((__WEBPACK_AMD_DEFINE_RESULT__ = function () { + return ExecutionEnvironment; + }.call(exports, __webpack_require__, exports, module)), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && + (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else if (typeof module !== 'undefined' && module.exports) { + module.exports = ExecutionEnvironment; + } else { + window.ExecutionEnvironment = ExecutionEnvironment; + } + })(); + + /***/ + }, + /* 13 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var React = __webpack_require__(2); + var div = React.DOM.div; + var focusManager = __webpack_require__(14); + var scopeTab = __webpack_require__(16); + var Assign = __webpack_require__(17); + var createReactClass = __webpack_require__(18); + + // so that our CSS is statically analyzable + var CLASS_NAMES = { + overlay: { + base: 'ReactModal__Overlay', + afterOpen: 'ReactModal__Overlay--after-open', + beforeClose: 'ReactModal__Overlay--before-close', + }, + content: { + base: 'ReactModal__Content', + afterOpen: 'ReactModal__Content--after-open', + beforeClose: 'ReactModal__Content--before-close', + }, + }; + + var ModalPortal = (module.exports = createReactClass({ + displayName: 'ModalPortal', + shouldClose: null, + + getDefaultProps: function getDefaultProps() { + return { + style: { + overlay: {}, + content: {}, + }, + }; + }, + + getInitialState: function getInitialState() { + return { + afterOpen: false, + beforeClose: false, + }; + }, + + componentDidMount: function componentDidMount() { + // Focus needs to be set when mounting and already open + if (this.props.isOpen) { + this.setFocusAfterRender(true); + this.open(); + } + }, + + componentWillUnmount: function componentWillUnmount() { + clearTimeout(this.closeTimer); + }, + + componentWillReceiveProps: function componentWillReceiveProps(newProps) { + // Focus only needs to be set once when the modal is being opened + if (!this.props.isOpen && newProps.isOpen) { + this.setFocusAfterRender(true); + this.open(); + } else if (this.props.isOpen && !newProps.isOpen) { + this.close(); + } + }, + + componentDidUpdate: function componentDidUpdate() { + if (this.focusAfterRender) { + this.focusContent(); + this.setFocusAfterRender(false); + } + }, + + setFocusAfterRender: function setFocusAfterRender(focus) { + this.focusAfterRender = focus; + }, + + afterClose: function afterClose() { + focusManager.returnFocus(); + focusManager.teardownScopedFocus(); + }, + + open: function open() { + if (this.state.afterOpen && this.state.beforeClose) { + clearTimeout(this.closeTimer); + this.setState({ beforeClose: false }); + } else { + focusManager.setupScopedFocus(this.node); + focusManager.markForFocusLater(); + this.setState( + { isOpen: true }, + function () { + this.setState({ afterOpen: true }); + + if (this.props.isOpen && this.props.onAfterOpen) { + this.props.onAfterOpen(); + } + }.bind(this), + ); + } + }, + + close: function close() { + if (this.props.closeTimeoutMS > 0) this.closeWithTimeout(); + else this.closeWithoutTimeout(); + }, + + focusContent: function focusContent() { + // Don't steal focus from inner elements + if (!this.contentHasFocus()) { + this.refs.content.focus(); + } + }, + + closeWithTimeout: function closeWithTimeout() { + var closesAt = Date.now() + this.props.closeTimeoutMS; + this.setState( + { beforeClose: true, closesAt: closesAt }, + function () { + this.closeTimer = setTimeout( + this.closeWithoutTimeout, + this.state.closesAt - Date.now(), + ); + }.bind(this), + ); + }, + + closeWithoutTimeout: function closeWithoutTimeout() { + this.setState( + { + beforeClose: false, + isOpen: false, + afterOpen: false, + closesAt: null, + }, + this.afterClose, + ); + }, + + handleKeyDown: function handleKeyDown(event) { + if (event.keyCode == 9 /*tab*/) scopeTab(this.refs.content, event); + if (event.keyCode == 27 /*esc*/) { + event.preventDefault(); + this.requestClose(event); + } + }, + + handleOverlayOnClick: function handleOverlayOnClick(event) { + if (this.shouldClose === null) { + this.shouldClose = true; + } + + if (this.shouldClose && this.props.shouldCloseOnOverlayClick) { + if (this.ownerHandlesClose()) this.requestClose(event); + else this.focusContent(); + } + this.shouldClose = null; + }, + + handleContentOnClick: function handleContentOnClick() { + this.shouldClose = false; + }, + + requestClose: function requestClose(event) { + if (this.ownerHandlesClose()) this.props.onRequestClose(event); + }, + + ownerHandlesClose: function ownerHandlesClose() { + return this.props.onRequestClose; + }, + + shouldBeClosed: function shouldBeClosed() { + return !this.state.isOpen && !this.state.beforeClose; + }, + + contentHasFocus: function contentHasFocus() { + return ( + document.activeElement === this.refs.content || + this.refs.content.contains(document.activeElement) + ); + }, + + buildClassName: function buildClassName(which, additional) { + var className = CLASS_NAMES[which].base; + if (this.state.afterOpen) className += ' ' + CLASS_NAMES[which].afterOpen; + if (this.state.beforeClose) className += ' ' + CLASS_NAMES[which].beforeClose; + return additional ? className + ' ' + additional : className; + }, + + render: function render() { + var contentStyles = this.props.className ? {} : this.props.defaultStyles.content; + var overlayStyles = this.props.overlayClassName ? {} : this.props.defaultStyles.overlay; + + return this.shouldBeClosed() + ? div() + : div( + { + ref: 'overlay', + className: this.buildClassName('overlay', this.props.overlayClassName), + style: Assign({}, overlayStyles, this.props.style.overlay || {}), + onClick: this.handleOverlayOnClick, + }, + div( + { + ref: 'content', + style: Assign({}, contentStyles, this.props.style.content || {}), + className: this.buildClassName('content', this.props.className), + tabIndex: '-1', + onKeyDown: this.handleKeyDown, + onClick: this.handleContentOnClick, + role: this.props.role, + 'aria-label': this.props.contentLabel, + }, + this.props.children, + ), + ); + }, + })); + + /***/ + }, + /* 14 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var findTabbable = __webpack_require__(15); + var focusLaterElements = []; + var modalElement = null; + var needToFocus = false; + + function handleBlur(event) { + needToFocus = true; + } + + function handleFocus(event) { + if (needToFocus) { + needToFocus = false; + if (!modalElement) { + return; + } + // need to see how jQuery shims document.on('focusin') so we don't need the + // setTimeout, firefox doesn't support focusin, if it did, we could focus + // the element outside of a setTimeout. Side-effect of this implementation + // is that the document.body gets focus, and then we focus our element right + // after, seems fine. + setTimeout(function () { + if (modalElement.contains(document.activeElement)) return; + var el = findTabbable(modalElement)[0] || modalElement; + el.focus(); + }, 0); + } + } + + exports.markForFocusLater = function () { + focusLaterElements.push(document.activeElement); + }; + + exports.returnFocus = function () { + var toFocus = null; + try { + toFocus = focusLaterElements.pop(); + toFocus.focus(); + return; + } catch (e) { + console.warn( + 'You tried to return focus to ' + toFocus + ' but it is not in the DOM anymore', + ); + } + }; + + exports.setupScopedFocus = function (element) { + modalElement = element; + + if (window.addEventListener) { + window.addEventListener('blur', handleBlur, false); + document.addEventListener('focus', handleFocus, true); + } else { + window.attachEvent('onBlur', handleBlur); + document.attachEvent('onFocus', handleFocus); + } + }; + + exports.teardownScopedFocus = function () { + modalElement = null; + + if (window.addEventListener) { + window.removeEventListener('blur', handleBlur); + document.removeEventListener('focus', handleFocus); + } else { + window.detachEvent('onBlur', handleBlur); + document.detachEvent('onFocus', handleFocus); + } + }; + + /***/ + }, + /* 15 */ + /***/ function (module, exports) { + 'use strict'; + + /*! + * Adapted from jQuery UI core + * + * http://jqueryui.com + * + * Copyright 2014 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/category/ui-core/ + */ + + function focusable(element, isTabIndexNotNaN) { + var nodeName = element.nodeName.toLowerCase(); + return ( + (/input|select|textarea|button|object/.test(nodeName) + ? !element.disabled + : 'a' === nodeName + ? element.href || isTabIndexNotNaN + : isTabIndexNotNaN) && visible(element) + ); + } + + function hidden(el) { + return (el.offsetWidth <= 0 && el.offsetHeight <= 0) || el.style.display === 'none'; + } + + function visible(element) { + while (element) { + if (element === document.body) break; + if (hidden(element)) return false; + element = element.parentNode; + } + return true; + } + + function tabbable(element) { + var tabIndex = element.getAttribute('tabindex'); + if (tabIndex === null) tabIndex = undefined; + var isTabIndexNaN = isNaN(tabIndex); + return (isTabIndexNaN || tabIndex >= 0) && focusable(element, !isTabIndexNaN); + } + + function findTabbableDescendants(element) { + return [].slice.call(element.querySelectorAll('*'), 0).filter(function (el) { + return tabbable(el); + }); + } + + module.exports = findTabbableDescendants; + + /***/ + }, + /* 16 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var findTabbable = __webpack_require__(15); + + module.exports = function (node, event) { + var tabbable = findTabbable(node); + if (!tabbable.length) { + event.preventDefault(); + return; + } + var finalTabbable = tabbable[event.shiftKey ? 0 : tabbable.length - 1]; + var leavingFinalTabbable = + finalTabbable === document.activeElement || + // handle immediate shift+tab after opening with mouse + node === document.activeElement; + if (!leavingFinalTabbable) return; + event.preventDefault(); + var target = tabbable[event.shiftKey ? tabbable.length - 1 : 0]; + target.focus(); + }; + + /***/ + }, + /* 17 */ + /***/ function (module, exports) { + /** + * lodash (Custom Build) <https://lodash.com/> + * Build: `lodash modularize exports="npm" -o ./` + * Copyright jQuery Foundation and other contributors <https://jquery.org/> + * Released under MIT license <https://lodash.com/license> + * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ + + /** Used as references for various `Number` constants. */ + var MAX_SAFE_INTEGER = 9007199254740991; + + /** `Object#toString` result references. */ + var argsTag = '[object Arguments]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]'; + + /** Used to detect unsigned integer values. */ + var reIsUint = /^(?:0|[1-9]\d*)$/; + + /** + * A faster alternative to `Function#apply`, this function invokes `func` + * with the `this` binding of `thisArg` and the arguments of `args`. + * + * @private + * @param {Function} func The function to invoke. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} args The arguments to invoke `func` with. + * @returns {*} Returns the result of `func`. + */ + function apply(func, thisArg, args) { + switch (args.length) { + case 0: + return func.call(thisArg); + case 1: + return func.call(thisArg, args[0]); + case 2: + return func.call(thisArg, args[0], args[1]); + case 3: + return func.call(thisArg, args[0], args[1], args[2]); + } + return func.apply(thisArg, args); + } + + /** + * The base implementation of `_.times` without support for iteratee shorthands + * or max array length checks. + * + * @private + * @param {number} n The number of times to invoke `iteratee`. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the array of results. + */ + function baseTimes(n, iteratee) { + var index = -1, + result = Array(n); + + while (++index < n) { + result[index] = iteratee(index); + } + return result; + } + + /** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ + function overArg(func, transform) { + return function (arg) { + return func(transform(arg)); + }; + } + + /** Used for built-in method references. */ + var objectProto = Object.prototype; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ + var objectToString = objectProto.toString; + + /** Built-in value references. */ + var propertyIsEnumerable = objectProto.propertyIsEnumerable; + + /* Built-in method references for those with the same name as other `lodash` methods. */ + var nativeKeys = overArg(Object.keys, Object), + nativeMax = Math.max; + + /** Detect if properties shadowing those on `Object.prototype` are non-enumerable. */ + var nonEnumShadows = !propertyIsEnumerable.call({ valueOf: 1 }, 'valueOf'); + + /** + * Creates an array of the enumerable property names of the array-like `value`. + * + * @private + * @param {*} value The value to query. + * @param {boolean} inherited Specify returning inherited property names. + * @returns {Array} Returns the array of property names. + */ + function arrayLikeKeys(value, inherited) { + // Safari 8.1 makes `arguments.callee` enumerable in strict mode. + // Safari 9 makes `arguments.length` enumerable in strict mode. + var result = isArray(value) || isArguments(value) ? baseTimes(value.length, String) : []; + + var length = result.length, + skipIndexes = !!length; + + for (var key in value) { + if ( + (inherited || hasOwnProperty.call(value, key)) && + !(skipIndexes && (key == 'length' || isIndex(key, length))) + ) { + result.push(key); + } + } + return result; + } + + /** + * Assigns `value` to `key` of `object` if the existing value is not equivalent + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ + function assignValue(object, key, value) { + var objValue = object[key]; + if ( + !(hasOwnProperty.call(object, key) && eq(objValue, value)) || + (value === undefined && !(key in object)) + ) { + object[key] = value; + } + } + + /** + * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + function baseKeys(object) { + if (!isPrototype(object)) { + return nativeKeys(object); + } + var result = []; + for (var key in Object(object)) { + if (hasOwnProperty.call(object, key) && key != 'constructor') { + result.push(key); + } + } + return result; + } + + /** + * The base implementation of `_.rest` which doesn't validate or coerce arguments. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + */ + function baseRest(func, start) { + start = nativeMax(start === undefined ? func.length - 1 : start, 0); + return function () { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + array = Array(length); + + while (++index < length) { + array[index] = args[start + index]; + } + index = -1; + var otherArgs = Array(start + 1); + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = array; + return apply(func, this, otherArgs); + }; + } + + /** + * Copies properties of `source` to `object`. + * + * @private + * @param {Object} source The object to copy properties from. + * @param {Array} props The property identifiers to copy. + * @param {Object} [object={}] The object to copy properties to. + * @param {Function} [customizer] The function to customize copied values. + * @returns {Object} Returns `object`. + */ + function copyObject(source, props, object, customizer) { + object || (object = {}); + + var index = -1, + length = props.length; + + while (++index < length) { + var key = props[index]; + + var newValue = customizer + ? customizer(object[key], source[key], key, object, source) + : undefined; + + assignValue(object, key, newValue === undefined ? source[key] : newValue); + } + return object; + } + + /** + * Creates a function like `_.assign`. + * + * @private + * @param {Function} assigner The function to assign values. + * @returns {Function} Returns the new assigner function. + */ + function createAssigner(assigner) { + return baseRest(function (object, sources) { + var index = -1, + length = sources.length, + customizer = length > 1 ? sources[length - 1] : undefined, + guard = length > 2 ? sources[2] : undefined; + + customizer = + assigner.length > 3 && typeof customizer == 'function' + ? (length--, customizer) + : undefined; + + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + customizer = length < 3 ? undefined : customizer; + length = 1; + } + object = Object(object); + while (++index < length) { + var source = sources[index]; + if (source) { + assigner(object, source, index, customizer); + } + } + return object; + }); + } + + /** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ + function isIndex(value, length) { + length = length == null ? MAX_SAFE_INTEGER : length; + return ( + !!length && + (typeof value == 'number' || reIsUint.test(value)) && + value > -1 && + value % 1 == 0 && + value < length + ); + } + + /** + * Checks if the given arguments are from an iteratee call. + * + * @private + * @param {*} value The potential iteratee value argument. + * @param {*} index The potential iteratee index or key argument. + * @param {*} object The potential iteratee object argument. + * @returns {boolean} Returns `true` if the arguments are from an iteratee call, + * else `false`. + */ + function isIterateeCall(value, index, object) { + if (!isObject(object)) { + return false; + } + var type = typeof index; + if ( + type == 'number' + ? isArrayLike(object) && isIndex(index, object.length) + : type == 'string' && index in object + ) { + return eq(object[index], value); + } + return false; + } + + /** + * Checks if `value` is likely a prototype object. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. + */ + function isPrototype(value) { + var Ctor = value && value.constructor, + proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; + + return value === proto; + } + + /** + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ + function eq(value, other) { + return value === other || (value !== value && other !== other); + } + + /** + * Checks if `value` is likely an `arguments` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + * else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ + function isArguments(value) { + // Safari 8.1 makes `arguments.callee` enumerable in strict mode. + return ( + isArrayLikeObject(value) && + hasOwnProperty.call(value, 'callee') && + (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag) + ); + } + + /** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ + var isArray = Array.isArray; + + /** + * Checks if `value` is array-like. A value is considered array-like if it's + * not a function and has a `value.length` that's an integer greater than or + * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + * @example + * + * _.isArrayLike([1, 2, 3]); + * // => true + * + * _.isArrayLike(document.body.children); + * // => true + * + * _.isArrayLike('abc'); + * // => true + * + * _.isArrayLike(_.noop); + * // => false + */ + function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); + } + + /** + * This method is like `_.isArrayLike` except that it also checks if `value` + * is an object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array-like object, + * else `false`. + * @example + * + * _.isArrayLikeObject([1, 2, 3]); + * // => true + * + * _.isArrayLikeObject(document.body.children); + * // => true + * + * _.isArrayLikeObject('abc'); + * // => false + * + * _.isArrayLikeObject(_.noop); + * // => false + */ + function isArrayLikeObject(value) { + return isObjectLike(value) && isArrayLike(value); + } + + /** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ + function isFunction(value) { + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 8-9 which returns 'object' for typed array and other constructors. + var tag = isObject(value) ? objectToString.call(value) : ''; + return tag == funcTag || tag == genTag; + } + + /** + * Checks if `value` is a valid array-like length. + * + * **Note:** This method is loosely based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @example + * + * _.isLength(3); + * // => true + * + * _.isLength(Number.MIN_VALUE); + * // => false + * + * _.isLength(Infinity); + * // => false + * + * _.isLength('3'); + * // => false + */ + function isLength(value) { + return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + + /** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ + function isObject(value) { + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); + } + + /** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ + function isObjectLike(value) { + return !!value && typeof value == 'object'; + } + + /** + * Assigns own enumerable string keyed properties of source objects to the + * destination object. Source objects are applied from left to right. + * Subsequent sources overwrite property assignments of previous sources. + * + * **Note:** This method mutates `object` and is loosely based on + * [`Object.assign`](https://mdn.io/Object/assign). + * + * @static + * @memberOf _ + * @since 0.10.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.assignIn + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * function Bar() { + * this.c = 3; + * } + * + * Foo.prototype.b = 2; + * Bar.prototype.d = 4; + * + * _.assign({ 'a': 0 }, new Foo, new Bar); + * // => { 'a': 1, 'c': 3 } + */ + var assign = createAssigner(function (object, source) { + if (nonEnumShadows || isPrototype(source) || isArrayLike(source)) { + copyObject(source, keys(source), object); + return; + } + for (var key in source) { + if (hasOwnProperty.call(source, key)) { + assignValue(object, key, source[key]); + } + } + }); + + /** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * for more details. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ + function keys(object) { + return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); + } + + module.exports = assign; + + /***/ + }, + /* 18 */ + /***/ function (module, exports, __webpack_require__) { + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + 'use strict'; + + var React = __webpack_require__(2); + var factory = __webpack_require__(19); + + // Hack to grab NoopUpdateQueue from isomorphic React + var ReactNoopUpdateQueue = new React.Component().updater; + + module.exports = factory(React.Component, React.isValidElement, ReactNoopUpdateQueue); + + /***/ + }, + /* 19 */ + /***/ function (module, exports, __webpack_require__) { + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + 'use strict'; + + var _assign = __webpack_require__(20); + + var emptyObject = __webpack_require__(21); + var _invariant = __webpack_require__(7); + + if (undefined !== 'production') { + var warning = __webpack_require__(8); + } + + var MIXINS_KEY = 'mixins'; + + // Helper function to allow the creation of anonymous functions which do not + // have .name set to the name of the variable being assigned to. + function identity(fn) { + return fn; + } + + var ReactPropTypeLocationNames; + if (undefined !== 'production') { + ReactPropTypeLocationNames = { + prop: 'prop', + context: 'context', + childContext: 'child context', + }; + } else { + ReactPropTypeLocationNames = {}; + } + + function factory(ReactComponent, isValidElement, ReactNoopUpdateQueue) { + /** + * Policies that describe methods in `ReactClassInterface`. + */ + + var injectedMixins = []; + + /** + * Composite components are higher-level components that compose other composite + * or host components. + * + * To create a new type of `ReactClass`, pass a specification of + * your new class to `React.createClass`. The only requirement of your class + * specification is that you implement a `render` method. + * + * var MyComponent = React.createClass({ + * render: function() { + * return <div>Hello World</div>; + * } + * }); + * + * The class specification supports a specific protocol of methods that have + * special meaning (e.g. `render`). See `ReactClassInterface` for + * more the comprehensive protocol. Any other properties and methods in the + * class specification will be available on the prototype. + * + * @interface ReactClassInterface + * @internal + */ + var ReactClassInterface = { + /** + * An array of Mixin objects to include when defining your component. + * + * @type {array} + * @optional + */ + mixins: 'DEFINE_MANY', + + /** + * An object containing properties and methods that should be defined on + * the component's constructor instead of its prototype (static methods). + * + * @type {object} + * @optional + */ + statics: 'DEFINE_MANY', + + /** + * Definition of prop types for this component. + * + * @type {object} + * @optional + */ + propTypes: 'DEFINE_MANY', + + /** + * Definition of context types for this component. + * + * @type {object} + * @optional + */ + contextTypes: 'DEFINE_MANY', + + /** + * Definition of context types this component sets for its children. + * + * @type {object} + * @optional + */ + childContextTypes: 'DEFINE_MANY', + + // ==== Definition methods ==== + + /** + * Invoked when the component is mounted. Values in the mapping will be set on + * `this.props` if that prop is not specified (i.e. using an `in` check). + * + * This method is invoked before `getInitialState` and therefore cannot rely + * on `this.state` or use `this.setState`. + * + * @return {object} + * @optional + */ + getDefaultProps: 'DEFINE_MANY_MERGED', + + /** + * Invoked once before the component is mounted. The return value will be used + * as the initial value of `this.state`. + * + * getInitialState: function() { + * return { + * isOn: false, + * fooBaz: new BazFoo() + * } + * } + * + * @return {object} + * @optional + */ + getInitialState: 'DEFINE_MANY_MERGED', + + /** + * @return {object} + * @optional + */ + getChildContext: 'DEFINE_MANY_MERGED', + + /** + * Uses props from `this.props` and state from `this.state` to render the + * structure of the component. + * + * No guarantees are made about when or how often this method is invoked, so + * it must not have side effects. + * + * render: function() { + * var name = this.props.name; + * return <div>Hello, {name}!</div>; + * } + * + * @return {ReactComponent} + * @nosideeffects + * @required + */ + render: 'DEFINE_ONCE', + + // ==== Delegate methods ==== + + /** + * Invoked when the component is initially created and about to be mounted. + * This may have side effects, but any external subscriptions or data created + * by this method must be cleaned up in `componentWillUnmount`. + * + * @optional + */ + componentWillMount: 'DEFINE_MANY', + + /** + * Invoked when the component has been mounted and has a DOM representation. + * However, there is no guarantee that the DOM node is in the document. + * + * Use this as an opportunity to operate on the DOM when the component has + * been mounted (initialized and rendered) for the first time. + * + * @param {DOMElement} rootNode DOM element representing the component. + * @optional + */ + componentDidMount: 'DEFINE_MANY', + + /** + * Invoked before the component receives new props. + * + * Use this as an opportunity to react to a prop transition by updating the + * state using `this.setState`. Current props are accessed via `this.props`. + * + * componentWillReceiveProps: function(nextProps, nextContext) { + * this.setState({ + * likesIncreasing: nextProps.likeCount > this.props.likeCount + * }); + * } + * + * NOTE: There is no equivalent `componentWillReceiveState`. An incoming prop + * transition may cause a state change, but the opposite is not true. If you + * need it, you are probably looking for `componentWillUpdate`. + * + * @param {object} nextProps + * @optional + */ + componentWillReceiveProps: 'DEFINE_MANY', + + /** + * Invoked while deciding if the component should be updated as a result of + * receiving new props, state and/or context. + * + * Use this as an opportunity to `return false` when you're certain that the + * transition to the new props/state/context will not require a component + * update. + * + * shouldComponentUpdate: function(nextProps, nextState, nextContext) { + * return !equal(nextProps, this.props) || + * !equal(nextState, this.state) || + * !equal(nextContext, this.context); + * } + * + * @param {object} nextProps + * @param {?object} nextState + * @param {?object} nextContext + * @return {boolean} True if the component should update. + * @optional + */ + shouldComponentUpdate: 'DEFINE_ONCE', + + /** + * Invoked when the component is about to update due to a transition from + * `this.props`, `this.state` and `this.context` to `nextProps`, `nextState` + * and `nextContext`. + * + * Use this as an opportunity to perform preparation before an update occurs. + * + * NOTE: You **cannot** use `this.setState()` in this method. + * + * @param {object} nextProps + * @param {?object} nextState + * @param {?object} nextContext + * @param {ReactReconcileTransaction} transaction + * @optional + */ + componentWillUpdate: 'DEFINE_MANY', + + /** + * Invoked when the component's DOM representation has been updated. + * + * Use this as an opportunity to operate on the DOM when the component has + * been updated. + * + * @param {object} prevProps + * @param {?object} prevState + * @param {?object} prevContext + * @param {DOMElement} rootNode DOM element representing the component. + * @optional + */ + componentDidUpdate: 'DEFINE_MANY', + + /** + * Invoked when the component is about to be removed from its parent and have + * its DOM representation destroyed. + * + * Use this as an opportunity to deallocate any external resources. + * + * NOTE: There is no `componentDidUnmount` since your component will have been + * destroyed by that point. + * + * @optional + */ + componentWillUnmount: 'DEFINE_MANY', + + // ==== Advanced methods ==== + + /** + * Updates the component's currently mounted DOM representation. + * + * By default, this implements React's rendering and reconciliation algorithm. + * Sophisticated clients may wish to override this. + * + * @param {ReactReconcileTransaction} transaction + * @internal + * @overridable + */ + updateComponent: 'OVERRIDE_BASE', + }; + + /** + * Mapping from class specification keys to special processing functions. + * + * Although these are declared like instance properties in the specification + * when defining classes using `React.createClass`, they are actually static + * and are accessible on the constructor instead of the prototype. Despite + * being static, they must be defined outside of the "statics" key under + * which all other static methods are defined. + */ + var RESERVED_SPEC_KEYS = { + displayName: function (Constructor, displayName) { + Constructor.displayName = displayName; + }, + mixins: function (Constructor, mixins) { + if (mixins) { + for (var i = 0; i < mixins.length; i++) { + mixSpecIntoComponent(Constructor, mixins[i]); + } + } + }, + childContextTypes: function (Constructor, childContextTypes) { + if (undefined !== 'production') { + validateTypeDef(Constructor, childContextTypes, 'childContext'); + } + Constructor.childContextTypes = _assign( + {}, + Constructor.childContextTypes, + childContextTypes, + ); + }, + contextTypes: function (Constructor, contextTypes) { + if (undefined !== 'production') { + validateTypeDef(Constructor, contextTypes, 'context'); + } + Constructor.contextTypes = _assign({}, Constructor.contextTypes, contextTypes); + }, + /** + * Special case getDefaultProps which should move into statics but requires + * automatic merging. + */ + getDefaultProps: function (Constructor, getDefaultProps) { + if (Constructor.getDefaultProps) { + Constructor.getDefaultProps = createMergedResultFunction( + Constructor.getDefaultProps, + getDefaultProps, + ); + } else { + Constructor.getDefaultProps = getDefaultProps; + } + }, + propTypes: function (Constructor, propTypes) { + if (undefined !== 'production') { + validateTypeDef(Constructor, propTypes, 'prop'); + } + Constructor.propTypes = _assign({}, Constructor.propTypes, propTypes); + }, + statics: function (Constructor, statics) { + mixStaticSpecIntoComponent(Constructor, statics); + }, + autobind: function () {}, + }; + + function validateTypeDef(Constructor, typeDef, location) { + for (var propName in typeDef) { + if (typeDef.hasOwnProperty(propName)) { + // use a warning instead of an _invariant so components + // don't show up in prod but only in __DEV__ + undefined !== 'production' + ? warning( + typeof typeDef[propName] === 'function', + '%s: %s type `%s` is invalid; it must be a function, usually from ' + + 'React.PropTypes.', + Constructor.displayName || 'ReactClass', + ReactPropTypeLocationNames[location], + propName, + ) + : void 0; + } + } + } + + function validateMethodOverride(isAlreadyDefined, name) { + var specPolicy = ReactClassInterface.hasOwnProperty(name) + ? ReactClassInterface[name] + : null; + + // Disallow overriding of base class methods unless explicitly allowed. + if (ReactClassMixin.hasOwnProperty(name)) { + _invariant( + specPolicy === 'OVERRIDE_BASE', + 'ReactClassInterface: You are attempting to override ' + + '`%s` from your class specification. Ensure that your method names ' + + 'do not overlap with React methods.', + name, + ); + } + + // Disallow defining methods more than once unless explicitly allowed. + if (isAlreadyDefined) { + _invariant( + specPolicy === 'DEFINE_MANY' || specPolicy === 'DEFINE_MANY_MERGED', + 'ReactClassInterface: You are attempting to define ' + + '`%s` on your component more than once. This conflict may be due ' + + 'to a mixin.', + name, + ); + } + } + + /** + * Mixin helper which handles policy validation and reserved + * specification keys when building React classes. + */ + function mixSpecIntoComponent(Constructor, spec) { + if (!spec) { + if (undefined !== 'production') { + var typeofSpec = typeof spec; + var isMixinValid = typeofSpec === 'object' && spec !== null; + + undefined !== 'production' + ? warning( + isMixinValid, + "%s: You're attempting to include a mixin that is either null " + + 'or not an object. Check the mixins included by the component, ' + + 'as well as any mixins they include themselves. ' + + 'Expected object but got %s.', + Constructor.displayName || 'ReactClass', + spec === null ? null : typeofSpec, + ) + : void 0; + } + + return; + } + + _invariant( + typeof spec !== 'function', + "ReactClass: You're attempting to " + + 'use a component class or function as a mixin. Instead, just use a ' + + 'regular object.', + ); + _invariant( + !isValidElement(spec), + "ReactClass: You're attempting to " + + 'use a component as a mixin. Instead, just use a regular object.', + ); + + var proto = Constructor.prototype; + var autoBindPairs = proto.__reactAutoBindPairs; + + // By handling mixins before any other properties, we ensure the same + // chaining order is applied to methods with DEFINE_MANY policy, whether + // mixins are listed before or after these methods in the spec. + if (spec.hasOwnProperty(MIXINS_KEY)) { + RESERVED_SPEC_KEYS.mixins(Constructor, spec.mixins); + } + + for (var name in spec) { + if (!spec.hasOwnProperty(name)) { + continue; + } + + if (name === MIXINS_KEY) { + // We have already handled mixins in a special case above. + continue; + } + + var property = spec[name]; + var isAlreadyDefined = proto.hasOwnProperty(name); + validateMethodOverride(isAlreadyDefined, name); + + if (RESERVED_SPEC_KEYS.hasOwnProperty(name)) { + RESERVED_SPEC_KEYS[name](Constructor, property); + } else { + // Setup methods on prototype: + // The following member methods should not be automatically bound: + // 1. Expected ReactClass methods (in the "interface"). + // 2. Overridden methods (that were mixed in). + var isReactClassMethod = ReactClassInterface.hasOwnProperty(name); + var isFunction = typeof property === 'function'; + var shouldAutoBind = + isFunction && !isReactClassMethod && !isAlreadyDefined && spec.autobind !== false; + + if (shouldAutoBind) { + autoBindPairs.push(name, property); + proto[name] = property; + } else { + if (isAlreadyDefined) { + var specPolicy = ReactClassInterface[name]; + + // These cases should already be caught by validateMethodOverride. + _invariant( + isReactClassMethod && + (specPolicy === 'DEFINE_MANY_MERGED' || specPolicy === 'DEFINE_MANY'), + 'ReactClass: Unexpected spec policy %s for key %s ' + + 'when mixing in component specs.', + specPolicy, + name, + ); + + // For methods which are defined more than once, call the existing + // methods before calling the new property, merging if appropriate. + if (specPolicy === 'DEFINE_MANY_MERGED') { + proto[name] = createMergedResultFunction(proto[name], property); + } else if (specPolicy === 'DEFINE_MANY') { + proto[name] = createChainedFunction(proto[name], property); + } + } else { + proto[name] = property; + if (undefined !== 'production') { + // Add verbose displayName to the function, which helps when looking + // at profiling tools. + if (typeof property === 'function' && spec.displayName) { + proto[name].displayName = spec.displayName + '_' + name; + } + } + } + } + } + } + } + + function mixStaticSpecIntoComponent(Constructor, statics) { + if (!statics) { + return; + } + for (var name in statics) { + var property = statics[name]; + if (!statics.hasOwnProperty(name)) { + continue; + } + + var isReserved = name in RESERVED_SPEC_KEYS; + _invariant( + !isReserved, + 'ReactClass: You are attempting to define a reserved ' + + 'property, `%s`, that shouldn\'t be on the "statics" key. Define it ' + + 'as an instance property instead; it will still be accessible on the ' + + 'constructor.', + name, + ); + + var isInherited = name in Constructor; + _invariant( + !isInherited, + 'ReactClass: You are attempting to define ' + + '`%s` on your component more than once. This conflict may be ' + + 'due to a mixin.', + name, + ); + Constructor[name] = property; + } + } + + /** + * Merge two objects, but throw if both contain the same key. + * + * @param {object} one The first object, which is mutated. + * @param {object} two The second object + * @return {object} one after it has been mutated to contain everything in two. + */ + function mergeIntoWithNoDuplicateKeys(one, two) { + _invariant( + one && two && typeof one === 'object' && typeof two === 'object', + 'mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.', + ); + + for (var key in two) { + if (two.hasOwnProperty(key)) { + _invariant( + one[key] === undefined, + 'mergeIntoWithNoDuplicateKeys(): ' + + 'Tried to merge two objects with the same key: `%s`. This conflict ' + + 'may be due to a mixin; in particular, this may be caused by two ' + + 'getInitialState() or getDefaultProps() methods returning objects ' + + 'with clashing keys.', + key, + ); + one[key] = two[key]; + } + } + return one; + } + + /** + * Creates a function that invokes two functions and merges their return values. + * + * @param {function} one Function to invoke first. + * @param {function} two Function to invoke second. + * @return {function} Function that invokes the two argument functions. + * @private + */ + function createMergedResultFunction(one, two) { + return function mergedResult() { + var a = one.apply(this, arguments); + var b = two.apply(this, arguments); + if (a == null) { + return b; + } else if (b == null) { + return a; + } + var c = {}; + mergeIntoWithNoDuplicateKeys(c, a); + mergeIntoWithNoDuplicateKeys(c, b); + return c; + }; + } + + /** + * Creates a function that invokes two functions and ignores their return vales. + * + * @param {function} one Function to invoke first. + * @param {function} two Function to invoke second. + * @return {function} Function that invokes the two argument functions. + * @private + */ + function createChainedFunction(one, two) { + return function chainedFunction() { + one.apply(this, arguments); + two.apply(this, arguments); + }; + } + + /** + * Binds a method to the component. + * + * @param {object} component Component whose method is going to be bound. + * @param {function} method Method to be bound. + * @return {function} The bound method. + */ + function bindAutoBindMethod(component, method) { + var boundMethod = method.bind(component); + if (undefined !== 'production') { + boundMethod.__reactBoundContext = component; + boundMethod.__reactBoundMethod = method; + boundMethod.__reactBoundArguments = null; + var componentName = component.constructor.displayName; + var _bind = boundMethod.bind; + boundMethod.bind = function (newThis) { + for ( + var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; + _key < _len; + _key++ + ) { + args[_key - 1] = arguments[_key]; + } + + // User is trying to bind() an autobound method; we effectively will + // ignore the value of "this" that the user is trying to use, so + // let's warn. + if (newThis !== component && newThis !== null) { + undefined !== 'production' + ? warning( + false, + 'bind(): React component methods may only be bound to the ' + + 'component instance. See %s', + componentName, + ) + : void 0; + } else if (!args.length) { + undefined !== 'production' + ? warning( + false, + 'bind(): You are binding a component method to the component. ' + + 'React does this for you automatically in a high-performance ' + + 'way, so you can safely remove this call. See %s', + componentName, + ) + : void 0; + return boundMethod; + } + var reboundMethod = _bind.apply(boundMethod, arguments); + reboundMethod.__reactBoundContext = component; + reboundMethod.__reactBoundMethod = method; + reboundMethod.__reactBoundArguments = args; + return reboundMethod; + }; + } + return boundMethod; + } + + /** + * Binds all auto-bound methods in a component. + * + * @param {object} component Component whose method is going to be bound. + */ + function bindAutoBindMethods(component) { + var pairs = component.__reactAutoBindPairs; + for (var i = 0; i < pairs.length; i += 2) { + var autoBindKey = pairs[i]; + var method = pairs[i + 1]; + component[autoBindKey] = bindAutoBindMethod(component, method); + } + } + + var IsMountedMixin = { + componentDidMount: function () { + this.__isMounted = true; + }, + componentWillUnmount: function () { + this.__isMounted = false; + }, + }; + + /** + * Add more to the ReactClass base class. These are all legacy features and + * therefore not already part of the modern ReactComponent. + */ + var ReactClassMixin = { + /** + * TODO: This will be deprecated because state should always keep a consistent + * type signature and the only use case for this, is to avoid that. + */ + replaceState: function (newState, callback) { + this.updater.enqueueReplaceState(this, newState, callback); + }, + + /** + * Checks whether or not this composite component is mounted. + * @return {boolean} True if mounted, false otherwise. + * @protected + * @final + */ + isMounted: function () { + if (undefined !== 'production') { + undefined !== 'production' + ? warning( + this.__didWarnIsMounted, + '%s: isMounted is deprecated. Instead, make sure to clean up ' + + 'subscriptions and pending requests in componentWillUnmount to ' + + 'prevent memory leaks.', + (this.constructor && this.constructor.displayName) || this.name || 'Component', + ) + : void 0; + this.__didWarnIsMounted = true; + } + return !!this.__isMounted; + }, + }; + + var ReactClassComponent = function () {}; + _assign(ReactClassComponent.prototype, ReactComponent.prototype, ReactClassMixin); + + /** + * Creates a composite component class given a class specification. + * See https://facebook.github.io/react/docs/top-level-api.html#react.createclass + * + * @param {object} spec Class specification (which must define `render`). + * @return {function} Component constructor function. + * @public + */ + function createClass(spec) { + // To keep our warnings more understandable, we'll use a little hack here to + // ensure that Constructor.name !== 'Constructor'. This makes sure we don't + // unnecessarily identify a class without displayName as 'Constructor'. + var Constructor = identity(function (props, context, updater) { + // This constructor gets overridden by mocks. The argument is used + // by mocks to assert on what gets mounted. + + if (undefined !== 'production') { + undefined !== 'production' + ? warning( + this instanceof Constructor, + 'Something is calling a React component directly. Use a factory or ' + + 'JSX instead. See: https://fb.me/react-legacyfactory', + ) + : void 0; + } + + // Wire up auto-binding + if (this.__reactAutoBindPairs.length) { + bindAutoBindMethods(this); + } + + this.props = props; + this.context = context; + this.refs = emptyObject; + this.updater = updater || ReactNoopUpdateQueue; + + this.state = null; + + // ReactClasses doesn't have constructors. Instead, they use the + // getInitialState and componentWillMount methods for initialization. + + var initialState = this.getInitialState ? this.getInitialState() : null; + if (undefined !== 'production') { + // We allow auto-mocks to proceed as if they're returning null. + if (initialState === undefined && this.getInitialState._isMockFunction) { + // This is probably bad practice. Consider warning here and + // deprecating this convenience. + initialState = null; + } + } + _invariant( + typeof initialState === 'object' && !Array.isArray(initialState), + '%s.getInitialState(): must return an object or null', + Constructor.displayName || 'ReactCompositeComponent', + ); + + this.state = initialState; + }); + Constructor.prototype = new ReactClassComponent(); + Constructor.prototype.constructor = Constructor; + Constructor.prototype.__reactAutoBindPairs = []; + + injectedMixins.forEach(mixSpecIntoComponent.bind(null, Constructor)); + + mixSpecIntoComponent(Constructor, IsMountedMixin); + mixSpecIntoComponent(Constructor, spec); + + // Initialize the defaultProps property after all mixins have been merged. + if (Constructor.getDefaultProps) { + Constructor.defaultProps = Constructor.getDefaultProps(); + } + + if (undefined !== 'production') { + // This is a tag to indicate that the use of these method names is ok, + // since it's used with createClass. If it's not, then it's likely a + // mistake so we'll warn you to use the static property, property + // initializer or constructor respectively. + if (Constructor.getDefaultProps) { + Constructor.getDefaultProps.isReactClassApproved = {}; + } + if (Constructor.prototype.getInitialState) { + Constructor.prototype.getInitialState.isReactClassApproved = {}; + } + } + + _invariant( + Constructor.prototype.render, + 'createClass(...): Class specification must implement a `render` method.', + ); + + if (undefined !== 'production') { + undefined !== 'production' + ? warning( + !Constructor.prototype.componentShouldUpdate, + '%s has a method called ' + + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + + 'The name is phrased as a question because the function is ' + + 'expected to return a value.', + spec.displayName || 'A component', + ) + : void 0; + undefined !== 'production' + ? warning( + !Constructor.prototype.componentWillRecieveProps, + '%s has a method called ' + + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', + spec.displayName || 'A component', + ) + : void 0; + } + + // Reduce time spent doing lookups by setting these on the prototype. + for (var methodName in ReactClassInterface) { + if (!Constructor.prototype[methodName]) { + Constructor.prototype[methodName] = null; + } + } + + return Constructor; + } + + return createClass; + } + + module.exports = factory; + + /***/ + }, + /* 20 */ + /***/ function (module, exports) { + /* + object-assign + (c) Sindre Sorhus + @license MIT + */ + + 'use strict'; + /* eslint-disable no-unused-vars */ + var getOwnPropertySymbols = Object.getOwnPropertySymbols; + var hasOwnProperty = Object.prototype.hasOwnProperty; + var propIsEnumerable = Object.prototype.propertyIsEnumerable; + + function toObject(val) { + if (val === null || val === undefined) { + throw new TypeError('Object.assign cannot be called with null or undefined'); + } + + return Object(val); + } + + function shouldUseNative() { + try { + if (!Object.assign) { + return false; + } + + // Detect buggy property enumeration order in older V8 versions. + + // https://bugs.chromium.org/p/v8/issues/detail?id=4118 + var test1 = new String('abc'); // eslint-disable-line no-new-wrappers + test1[5] = 'de'; + if (Object.getOwnPropertyNames(test1)[0] === '5') { + return false; + } + + // https://bugs.chromium.org/p/v8/issues/detail?id=3056 + var test2 = {}; + for (var i = 0; i < 10; i++) { + test2['_' + String.fromCharCode(i)] = i; + } + var order2 = Object.getOwnPropertyNames(test2).map(function (n) { + return test2[n]; + }); + if (order2.join('') !== '0123456789') { + return false; + } + + // https://bugs.chromium.org/p/v8/issues/detail?id=3056 + var test3 = {}; + 'abcdefghijklmnopqrst'.split('').forEach(function (letter) { + test3[letter] = letter; + }); + if (Object.keys(Object.assign({}, test3)).join('') !== 'abcdefghijklmnopqrst') { + return false; + } + + return true; + } catch (err) { + // We don't expect any of the above to throw, but better to be safe. + return false; + } + } + + module.exports = shouldUseNative() + ? Object.assign + : function (target, source) { + var from; + var to = toObject(target); + var symbols; + + for (var s = 1; s < arguments.length; s++) { + from = Object(arguments[s]); + + for (var key in from) { + if (hasOwnProperty.call(from, key)) { + to[key] = from[key]; + } + } + + if (getOwnPropertySymbols) { + symbols = getOwnPropertySymbols(from); + for (var i = 0; i < symbols.length; i++) { + if (propIsEnumerable.call(from, symbols[i])) { + to[symbols[i]] = from[symbols[i]]; + } + } + } + } + + return to; + }; + + /***/ + }, + /* 21 */ + /***/ function (module, exports, __webpack_require__) { + /** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + 'use strict'; + + var emptyObject = {}; + + if (undefined !== 'production') { + Object.freeze(emptyObject); + } + + module.exports = emptyObject; + + /***/ + }, + /* 22 */ + /***/ function (module, exports) { + 'use strict'; + + var _element = typeof document !== 'undefined' ? document.body : null; + + function setElement(element) { + if (typeof element === 'string') { + var el = document.querySelectorAll(element); + element = 'length' in el ? el[0] : el; + } + _element = element || _element; + return _element; + } + + function hide(appElement) { + validateElement(appElement); + (appElement || _element).setAttribute('aria-hidden', 'true'); + } + + function show(appElement) { + validateElement(appElement); + (appElement || _element).removeAttribute('aria-hidden'); + } + + function toggle(shouldHide, appElement) { + if (shouldHide) hide(appElement); + else show(appElement); + } + + function validateElement(appElement) { + if (!appElement && !_element) + throw new Error( + 'react-modal: You must set an element with `Modal.setAppElement(el)` to make this accessible', + ); + } + + function resetForTesting() { + _element = document.body; + } + + exports.toggle = toggle; + exports.setElement = setElement; + exports.show = show; + exports.hide = hide; + exports.resetForTesting = resetForTesting; + + /***/ + }, + /* 23 */ + /***/ function (module, exports) { + 'use strict'; + + var modals = []; + + module.exports = { + add: function add(element) { + if (modals.indexOf(element) === -1) { + modals.push(element); + } + }, + remove: function remove(element) { + var index = modals.indexOf(element); + if (index === -1) { + return; + } + modals.splice(index, 1); + }, + count: function count() { + return modals.length; + }, + }; + + /***/ + }, + /* 24 */ + /***/ function (module, exports) { + module.exports = function (opts) { + return new ElementClass(opts); + }; + + function indexOf(arr, prop) { + if (arr.indexOf) return arr.indexOf(prop); + for (var i = 0, len = arr.length; i < len; i++) if (arr[i] === prop) return i; + return -1; + } + + function ElementClass(opts) { + if (!(this instanceof ElementClass)) return new ElementClass(opts); + var self = this; + if (!opts) opts = {}; + + // similar doing instanceof HTMLElement but works in IE8 + if (opts.nodeType) opts = { el: opts }; + + this.opts = opts; + this.el = opts.el || document.body; + if (typeof this.el !== 'object') this.el = document.querySelector(this.el); + } + + ElementClass.prototype.add = function (className) { + var el = this.el; + if (!el) return; + if (el.className === '') return (el.className = className); + var classes = el.className.split(' '); + if (indexOf(classes, className) > -1) return classes; + classes.push(className); + el.className = classes.join(' '); + return classes; + }; + + ElementClass.prototype.remove = function (className) { + var el = this.el; + if (!el) return; + if (el.className === '') return; + var classes = el.className.split(' '); + var idx = indexOf(classes, className); + if (idx > -1) classes.splice(idx, 1); + el.className = classes.join(' '); + return classes; + }; + + ElementClass.prototype.has = function (className) { + var el = this.el; + if (!el) return; + var classes = el.className.split(' '); + return indexOf(classes, className) > -1; + }; + + ElementClass.prototype.toggle = function (className) { + var el = this.el; + if (!el) return; + if (this.has(className)) this.remove(className); + else this.add(className); + }; + + /***/ + }, + /******/ + ], + ); + }); + + /***/ + }, + /* 815 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + + var _assign = __webpack_require__(258); + + var _assign2 = _interopRequireDefault(_assign); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + exports.default = { + authenticityToken: function authenticityToken() { + var token = document.querySelector('meta[name="csrf-token"]'); + if (token && token instanceof window.HTMLMetaElement) { + return token.content; + } + return null; + }, + authenticityHeaders: function authenticityHeaders() { + var otherHeaders = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + + return (0, _assign2.default)(otherHeaders, { + 'X-CSRF-Token': this.authenticityToken(), + 'X-Requested-With': 'XMLHttpRequest', + }); + }, + }; + + /***/ + }, + /* 816 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + + var _assign = __webpack_require__(258); + + var _assign2 = _interopRequireDefault(_assign); + + var _stringify = __webpack_require__(132); + + var _stringify2 = _interopRequireDefault(_stringify); + + var _keys = __webpack_require__(155); + + var _keys2 = _interopRequireDefault(_keys); + + var _reactDom = __webpack_require__(43); + + var _reactDom2 = _interopRequireDefault(_reactDom); + + var _clientStartup = __webpack_require__(819); + + var ClientStartup = _interopRequireWildcard(_clientStartup); + + var _handleError2 = __webpack_require__(346); + + var _handleError3 = _interopRequireDefault(_handleError2); + + var _ComponentRegistry = __webpack_require__(344); + + var _ComponentRegistry2 = _interopRequireDefault(_ComponentRegistry); + + var _StoreRegistry = __webpack_require__(818); + + var _StoreRegistry2 = _interopRequireDefault(_StoreRegistry); + + var _serverRenderReactComponent2 = __webpack_require__(823); + + var _serverRenderReactComponent3 = _interopRequireDefault(_serverRenderReactComponent2); + + var _buildConsoleReplay2 = __webpack_require__(345); + + var _buildConsoleReplay3 = _interopRequireDefault(_buildConsoleReplay2); + + var _createReactElement = __webpack_require__(219); + + var _createReactElement2 = _interopRequireDefault(_createReactElement); + + var _Authenticity = __webpack_require__(815); + + var _Authenticity2 = _interopRequireDefault(_Authenticity); + + var _context = __webpack_require__(820); + + var _context2 = _interopRequireDefault(_context); + + function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; + } + } + newObj.default = obj; + return newObj; + } + } + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + var ctx = (0, _context2.default)(); + + var DEFAULT_OPTIONS = { + traceTurbolinks: false, + }; + + ctx.ReactOnRails = { + /** + * Main entry point to using the react-on-rails npm package. This is how Rails will be able to + * find you components for rendering. + * @param components (key is component name, value is component) + */ + register: function register(components) { + _ComponentRegistry2.default.register(components); + }, + + /** + * Allows registration of store generators to be used by multiple react components on one Rails + * view. store generators are functions that take one arg, props, and return a store. Note that + * the setStore API is different in tha it's the actual store hydrated with props. + * @param stores (keys are store names, values are the store generators) + */ + registerStore: function registerStore(stores) { + if (!stores) { + throw new Error( + 'Called ReactOnRails.registerStores with a null or undefined, rather than ' + + 'an Object with keys being the store names and the values are the store generators.', + ); + } + + _StoreRegistry2.default.register(stores); + }, + + /** + * Allows retrieval of the store by name. This store will be hydrated by any Rails form props. + * Pass optional param throwIfMissing = false if you want to use this call to get back null if the + * store with name is not registered. + * @param name + * @param throwIfMissing Defaults to true. Set to false to have this call return undefined if + * there is no store with the given name. + * @returns Redux Store, possibly hydrated + */ + getStore: function getStore(name) { + var throwIfMissing = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + + return _StoreRegistry2.default.getStore(name, throwIfMissing); + }, + + /** + * Set options for ReactOnRails, typically before you call ReactOnRails.register + * Available Options: + * `traceTurbolinks: true|false Gives you debugging messages on Turbolinks events + */ + setOptions: function setOptions(newOptions) { + if ('traceTurbolinks' in newOptions) { + this.options.traceTurbolinks = newOptions.traceTurbolinks; + + // eslint-disable-next-line no-param-reassign + delete newOptions.traceTurbolinks; + } + + if ((0, _keys2.default)(newOptions).length > 0) { + throw new Error( + 'Invalid options passed to ReactOnRails.options: ', + (0, _stringify2.default)(newOptions), + ); + } + }, + + /** + * Allow directly calling the page loaded script in case the default events that trigger react + * rendering are not sufficient, such as when loading JavaScript asynchronously with TurboLinks: + * More details can be found here: + * https://github.com/shakacode/react_on_rails/blob/master/docs/additional-reading/turbolinks.md + */ + reactOnRailsPageLoaded: function reactOnRailsPageLoaded() { + ClientStartup.reactOnRailsPageLoaded(); + }, + + /** + * Returns CSRF authenticity token inserted by Rails csrf_meta_tags + * @returns String or null + */ + + authenticityToken: function authenticityToken() { + return _Authenticity2.default.authenticityToken(); + }, + + /** + * Returns header with csrf authenticity token and XMLHttpRequest + * @param {*} other headers + * @returns {*} header + */ + + authenticityHeaders: function authenticityHeaders() { + var otherHeaders = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + + return _Authenticity2.default.authenticityHeaders(otherHeaders); + }, + + // ///////////////////////////////////////////////////////////////////////////// + // INTERNALLY USED APIs + // ///////////////////////////////////////////////////////////////////////////// + + /** + * Retrieve an option by key. + * @param key + * @returns option value + */ + option: function option(key) { + return this.options[key]; + }, + + /** + * Allows retrieval of the store generator by name. This is used internally by ReactOnRails after + * a rails form loads to prepare stores. + * @param name + * @returns Redux Store generator function + */ + getStoreGenerator: function getStoreGenerator(name) { + return _StoreRegistry2.default.getStoreGenerator(name); + }, + + /** + * Allows saving the store populated by Rails form props. Used internally by ReactOnRails. + * @param name + * @returns Redux Store, possibly hydrated + */ + setStore: function setStore(name, store) { + return _StoreRegistry2.default.setStore(name, store); + }, + + /** + * Clears hydratedStores to avoid accidental usage of wrong store hydrated in previous/parallel + * request. + */ + clearHydratedStores: function clearHydratedStores() { + _StoreRegistry2.default.clearHydratedStores(); + }, + + /** + * ReactOnRails.render("HelloWorldApp", {name: "Stranger"}, 'app'); + * + * Does this: + * ReactDOM.render(React.createElement(HelloWorldApp, {name: "Stranger"}), + * document.getElementById('app')) + * + * @param name Name of your registered component + * @param props Props to pass to your component + * @param domNodeId + * @returns {virtualDomElement} Reference to your component's backing instance + */ + render: function render(name, props, domNodeId) { + var componentObj = _ComponentRegistry2.default.get(name); + var reactElement = (0, _createReactElement2.default)({ + componentObj: componentObj, + props: props, + domNodeId: domNodeId, + }); + + // eslint-disable-next-line react/no-render-return-value + return _reactDom2.default.render(reactElement, document.getElementById(domNodeId)); + }, + + /** + * Get the component that you registered + * @param name + * @returns {name, component, generatorFunction, isRenderer} + */ + getComponent: function getComponent(name) { + return _ComponentRegistry2.default.get(name); + }, + + /** + * Used by server rendering by Rails + * @param options + */ + serverRenderReactComponent: function serverRenderReactComponent(options) { + return (0, _serverRenderReactComponent3.default)(options); + }, + + /** + * Used by Rails to catch errors in rendering + * @param options + */ + handleError: function handleError(options) { + return (0, _handleError3.default)(options); + }, + + /** + * Used by Rails server rendering to replay console messages. + */ + buildConsoleReplay: function buildConsoleReplay() { + return (0, _buildConsoleReplay3.default)(); + }, + + /** + * Get an Object containing all registered components. Useful for debugging. + * @returns {*} + */ + registeredComponents: function registeredComponents() { + return _ComponentRegistry2.default.components(); + }, + + /** + * Get an Object containing all registered store generators. Useful for debugging. + * @returns {*} + */ + storeGenerators: function storeGenerators() { + return _StoreRegistry2.default.storeGenerators(); + }, + + /** + * Get an Object containing all hydrated stores. Useful for debugging. + * @returns {*} + */ + stores: function stores() { + return _StoreRegistry2.default.stores(); + }, + resetOptions: function resetOptions() { + this.options = (0, _assign2.default)({}, DEFAULT_OPTIONS); + }, + }; + + ctx.ReactOnRails.resetOptions(); + + ClientStartup.clientStartup(ctx); + + exports.default = ctx.ReactOnRails; + + /***/ + }, + /* 817 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.default = { + wrapInScriptTags: function wrapInScriptTags(scriptId, scriptBody) { + if (!scriptBody) { + return ''; + } + + return '\n<script id="' + scriptId + '">\n' + scriptBody + '\n</script>'; + }, + }; + + /***/ + }, + /* 818 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + + var _from = __webpack_require__(256); + + var _from2 = _interopRequireDefault(_from); + + var _keys = __webpack_require__(155); + + var _keys2 = _interopRequireDefault(_keys); + + var _map = __webpack_require__(257); + + var _map2 = _interopRequireDefault(_map); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + // key = name used by react_on_rails to identify the store + // value = redux store creator, which is a function that takes props and returns a store + var registeredStoreGenerators = new _map2.default(); + var hydratedStores = new _map2.default(); + + exports.default = { + /** + * Register a store generator, a function that takes props and returns a store. + * @param storeGenerators { name1: storeGenerator1, name2: storeGenerator2 } + */ + register: function register(storeGenerators) { + (0, _keys2.default)(storeGenerators).forEach(function (name) { + if (registeredStoreGenerators.has(name)) { + console.warn('Called registerStore for store that is already registered', name); + } + + var store = storeGenerators[name]; + if (!store) { + throw new Error( + 'Called ReactOnRails.registerStores with a null or undefined as a value ' + + ('for the store generator with key ' + name + '.'), + ); + } + + registeredStoreGenerators.set(name, store); + }); + }, + + /** + * Used by components to get the hydrated store which contains props. + * @param name + * @param throwIfMissing Defaults to true. Set to false to have this call return undefined if + * there is no store with the given name. + * @returns Redux Store, possibly hydrated + */ + getStore: function getStore(name) { + var throwIfMissing = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + + if (hydratedStores.has(name)) { + return hydratedStores.get(name); + } + + var storeKeys = (0, _from2.default)(hydratedStores.keys()).join(', '); + + if (storeKeys.length === 0) { + var msg = + 'There are no stores hydrated and you are requesting the store ' + + name + + ".\nThis can happen if you are server rendering and either:\n1. You do not call redux_store near the top of your controller action's view (not the layout)\n and before any call to react_component.\n2. You do not render redux_store_hydration_data anywhere on your page."; + throw new Error(msg); + } + + if (throwIfMissing) { + console.log('storeKeys', storeKeys); + throw new Error( + "Could not find hydrated store with name '" + + name + + "'. " + + ('Hydrated store names include [' + storeKeys + '].'), + ); + } + + return undefined; + }, + + /** + * Internally used function to get the store creator that was passed to `register`. + * @param name + * @returns storeCreator with given name + */ + getStoreGenerator: function getStoreGenerator(name) { + if (registeredStoreGenerators.has(name)) { + return registeredStoreGenerators.get(name); + } + + var storeKeys = (0, _from2.default)(registeredStoreGenerators.keys()).join(', '); + throw new Error( + "Could not find store registered with name '" + + name + + "'. Registered store " + + ('names include [ ' + storeKeys + ' ]. Maybe you forgot to register the store?'), + ); + }, + + /** + * Internally used function to set the hydrated store after a Rails page is loaded. + * @param name + * @param store (not the storeGenerator, but the hydrated store) + */ + setStore: function setStore(name, store) { + hydratedStores.set(name, store); + }, + + /** + * Internally used function to completely clear hydratedStores Map. + */ + clearHydratedStores: function clearHydratedStores() { + hydratedStores.clear(); + }, + + /** + * Get a Map containing all registered store generators. Useful for debugging. + * @returns Map where key is the component name and values are the store generators. + */ + storeGenerators: function storeGenerators() { + return registeredStoreGenerators; + }, + + /** + * Get a Map containing all hydrated stores. Useful for debugging. + * @returns Map where key is the component name and values are the hydrated stores. + */ + stores: function stores() { + return hydratedStores; + }, + }; + + /***/ + }, + /* 819 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (global) { + Object.defineProperty(exports, '__esModule', { + value: true, + }); + + var _stringify = __webpack_require__(132); + + var _stringify2 = _interopRequireDefault(_stringify); + + exports.reactOnRailsPageLoaded = reactOnRailsPageLoaded; + exports.clientStartup = clientStartup; + + var _reactDom = __webpack_require__(43); + + var _reactDom2 = _interopRequireDefault(_reactDom); + + var _createReactElement = __webpack_require__(219); + + var _createReactElement2 = _interopRequireDefault(_createReactElement); + + var _isCreateReactElementResultNonReactComponent = __webpack_require__(347); + + var _isCreateReactElementResultNonReactComponent2 = _interopRequireDefault( + _isCreateReactElementResultNonReactComponent, + ); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + var REACT_ON_RAILS_STORE_ATTRIBUTE = + 'data-js-react-on-rails-store'; /* global ReactOnRails Turbolinks */ + + function findContext() { + if (typeof window.ReactOnRails !== 'undefined') { + return window; + } else if (typeof ReactOnRails !== 'undefined') { + return global; + } + + throw new Error('ReactOnRails is undefined in both global and window namespaces.\n '); + } + + function debugTurbolinks() { + if (!window) { + return; + } + + var context = findContext(); + if (context.ReactOnRails.option('traceTurbolinks')) { + var _console; + + for (var _len = arguments.length, msg = Array(_len), _key = 0; _key < _len; _key++) { + msg[_key] = arguments[_key]; + } + + (_console = console).log.apply(_console, ['TURBO:'].concat(msg)); + } + } + + function turbolinksInstalled() { + return typeof Turbolinks !== 'undefined'; + } + + function forEach(fn, className, railsContext) { + var els = document.getElementsByClassName(className); + for (var i = 0; i < els.length; i += 1) { + fn(els[i], railsContext); + } + } + + function forEachByAttribute(fn, attributeName, railsContext) { + var els = document.querySelectorAll('[' + attributeName + ']'); + for (var i = 0; i < els.length; i += 1) { + fn(els[i], railsContext); + } + } + + function forEachComponent(fn, railsContext) { + forEach(fn, 'js-react-on-rails-component', railsContext); + } + + function initializeStore(el, railsContext) { + var context = findContext(); + var name = el.getAttribute(REACT_ON_RAILS_STORE_ATTRIBUTE); + var props = JSON.parse(el.textContent); + var storeGenerator = context.ReactOnRails.getStoreGenerator(name); + var store = storeGenerator(props, railsContext); + context.ReactOnRails.setStore(name, store); + } + + function forEachStore(railsContext) { + forEachByAttribute(initializeStore, REACT_ON_RAILS_STORE_ATTRIBUTE, railsContext); + } + + function turbolinksVersion5() { + return typeof Turbolinks.controller !== 'undefined'; + } + + function turbolinksSupported() { + return Turbolinks.supported; + } + + function delegateToRenderer(componentObj, props, railsContext, domNodeId, trace) { + var name = componentObj.name, + component = componentObj.component, + isRenderer = componentObj.isRenderer; + + if (isRenderer) { + if (trace) { + console.log( + 'DELEGATING TO RENDERER ' + + name + + ' for dom node with id: ' + + domNodeId + + ' with props, railsContext:', + props, + railsContext, + ); + } + + component(props, railsContext, domNodeId); + return true; + } + + return false; + } + + /** + * Used for client rendering by ReactOnRails. Either calls ReactDOM.render or delegates + * to a renderer registered by the user. + * @param el + */ + function render(el, railsContext) { + var context = findContext(); + var jsonEl = JSON.parse(el.textContent); + var name = jsonEl.component_name; + var domNodeId = jsonEl.dom_id; + var props = jsonEl.props; + var trace = jsonEl.trace; + + try { + var domNode = document.getElementById(domNodeId); + if (domNode) { + var componentObj = context.ReactOnRails.getComponent(name); + if (delegateToRenderer(componentObj, props, railsContext, domNodeId, trace)) { + return; + } + + var reactElementOrRouterResult = (0, _createReactElement2.default)({ + componentObj: componentObj, + props: props, + domNodeId: domNodeId, + trace: trace, + railsContext: railsContext, + }); + + if ((0, _isCreateReactElementResultNonReactComponent2.default)(reactElementOrRouterResult)) { + throw new Error( + 'You returned a server side type of react-router error: ' + + (0, _stringify2.default)(reactElementOrRouterResult) + + '\nYou should return a React.Component always for the client side entry point.', + ); + } else { + _reactDom2.default.render(reactElementOrRouterResult, domNode); + } + } + } catch (e) { + e.message = + 'ReactOnRails encountered an error while rendering component: ' + + name + + '.\n' + + ('Original message: ' + e.message); + throw e; + } + } + + function parseRailsContext() { + var el = document.getElementById('js-react-on-rails-context'); + if (el) { + return JSON.parse(el.textContent); + } + + return null; + } + + function reactOnRailsPageLoaded() { + debugTurbolinks('reactOnRailsPageLoaded'); + + var railsContext = parseRailsContext(); + forEachStore(railsContext); + forEachComponent(render, railsContext); + } + + function unmount(el) { + var elData = JSON.parse(el.textContent); + var domNodeId = elData.dom_id; + var domNode = document.getElementById(domNodeId); + _reactDom2.default.unmountComponentAtNode(domNode); + } + + function reactOnRailsPageUnloaded() { + debugTurbolinks('reactOnRailsPageUnloaded'); + forEachComponent(unmount); + } + + function clientStartup(context) { + var document = context.document; + + // Check if server rendering + if (!document) { + return; + } + + // Tried with a file local variable, but the install handler gets called twice. + // eslint-disable-next-line no-underscore-dangle + if (context.__REACT_ON_RAILS_EVENT_HANDLERS_RAN_ONCE__) { + return; + } + + // eslint-disable-next-line no-underscore-dangle, no-param-reassign + context.__REACT_ON_RAILS_EVENT_HANDLERS_RAN_ONCE__ = true; + + debugTurbolinks('Adding DOMContentLoaded event to install event listeners.'); + + document.addEventListener('DOMContentLoaded', function () { + // Install listeners when running on the client (browser). + // We must do this check for turbolinks AFTER the document is loaded because we load the + // Webpack bundles first. + + if (turbolinksInstalled() && turbolinksSupported()) { + if (turbolinksVersion5()) { + debugTurbolinks( + 'USING TURBOLINKS 5: document added event listeners ' + + 'turbolinks:before-render and turbolinks:render.', + ); + document.addEventListener('turbolinks:before-render', reactOnRailsPageUnloaded); + document.addEventListener('turbolinks:render', reactOnRailsPageLoaded); + reactOnRailsPageLoaded(); + } else { + debugTurbolinks( + 'USING TURBOLINKS 2: document added event listeners page:before-unload and ' + + 'page:change.', + ); + document.addEventListener('page:before-unload', reactOnRailsPageUnloaded); + document.addEventListener('page:change', reactOnRailsPageLoaded); + } + } else { + debugTurbolinks('NOT USING TURBOLINKS: DOMContentLoaded event, calling reactOnRailsPageLoaded'); + reactOnRailsPageLoaded(); + } + }); + } + /* WEBPACK VAR INJECTION */ + }).call(exports, __webpack_require__(108)); + + /***/ + }, + /* 820 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (global) { + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.default = context; + + /** + * Get the context, be it window or global + * @returns {boolean|Window|*|context} + */ + function context() { + return ( + (typeof window !== 'undefined' && window) || (typeof global !== 'undefined' && global) || this + ); + } + /* WEBPACK VAR INJECTION */ + }).call(exports, __webpack_require__(108)); + + /***/ + }, + /* 821 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.default = generatorFunction; + + // See discussion: + // https://discuss.reactjs.org/t/how-to-determine-if-js-object-is-react-component/2825/2 + + /** + * Used to determine we'll call be calling React.createElement on the component of if this is a + * generator function used return a function that takes props to return a React element + * @param component + * @returns {boolean} + */ + function generatorFunction(component) { + if (!component.prototype) { + return false; + } + + // es5 or es6 React Component + return !component.prototype.isReactComponent; + } + + /***/ + }, + /* 822 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + + exports.default = function (val) { + // Replace closing + var re = /<\/\W*script/gi; + return val.replace(re, '(/script'); + }; + + /***/ + }, + /* 823 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + + var _stringify = __webpack_require__(132); + + var _stringify2 = _interopRequireDefault(_stringify); + + exports.default = serverRenderReactComponent; + + var _server = __webpack_require__(218); + + var _server2 = _interopRequireDefault(_server); + + var _ComponentRegistry = __webpack_require__(344); + + var _ComponentRegistry2 = _interopRequireDefault(_ComponentRegistry); + + var _createReactElement = __webpack_require__(219); + + var _createReactElement2 = _interopRequireDefault(_createReactElement); + + var _isCreateReactElementResultNonReactComponent = __webpack_require__(347); + + var _isCreateReactElementResultNonReactComponent2 = _interopRequireDefault( + _isCreateReactElementResultNonReactComponent, + ); + + var _buildConsoleReplay = __webpack_require__(345); + + var _buildConsoleReplay2 = _interopRequireDefault(_buildConsoleReplay); + + var _handleError = __webpack_require__(346); + + var _handleError2 = _interopRequireDefault(_handleError); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + function serverRenderReactComponent(options) { + var name = options.name, + domNodeId = options.domNodeId, + trace = options.trace, + props = options.props, + railsContext = options.railsContext; + + var htmlResult = ''; + var hasErrors = false; + + try { + var componentObj = _ComponentRegistry2.default.get(name); + if (componentObj.isRenderer) { + throw new Error( + "Detected a renderer while server rendering component '" + + name + + "'. See https://github.com/shakacode/react_on_rails#renderer-functions", + ); + } + + var reactElementOrRouterResult = (0, _createReactElement2.default)({ + componentObj: componentObj, + domNodeId: domNodeId, + trace: trace, + props: props, + railsContext: railsContext, + }); + + if ((0, _isCreateReactElementResultNonReactComponent2.default)(reactElementOrRouterResult)) { + // We let the client side handle any redirect + // Set hasErrors in case we want to throw a Rails exception + hasErrors = !!reactElementOrRouterResult.routeError; + + if (hasErrors) { + console.error( + 'React Router ERROR: ' + (0, _stringify2.default)(reactElementOrRouterResult.routeError), + ); + } + + if (reactElementOrRouterResult.redirectLocation) { + if (trace) { + var redirectLocation = reactElementOrRouterResult.redirectLocation; + var redirectPath = redirectLocation.pathname + redirectLocation.search; + console.log( + 'ROUTER REDIRECT: ' + + name + + ' to dom node with id: ' + + domNodeId + + ', redirect to ' + + redirectPath, + ); + } + // For redirects on server rendering, we can't stop Rails from returning the same result. + // Possibly, someday, we could have the rails server redirect. + } else { + htmlResult = reactElementOrRouterResult.renderedHtml; + } + } else { + htmlResult = _server2.default.renderToString(reactElementOrRouterResult); + } + } catch (e) { + hasErrors = true; + htmlResult = (0, _handleError2.default)({ + e: e, + name: name, + serverSide: true, + }); + } + + var consoleReplayScript = (0, _buildConsoleReplay2.default)(); + + return (0, _stringify2.default)({ + html: htmlResult, + consoleReplayScript: consoleReplayScript, + hasErrors: hasErrors, + }); + } + + /***/ + }, + /* 824 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(352); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_PropTypes__ = __webpack_require__(350); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__utils_warning__ = __webpack_require__(220); + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'a', function () { + return Provider; + }); + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + var didWarnAboutReceivingStore = false; + function warnAboutReceivingStore() { + if (didWarnAboutReceivingStore) { + return; + } + didWarnAboutReceivingStore = true; + + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__utils_warning__['a' /* default */])( + '<Provider> does not support changing `store` on the fly. ' + + 'It is most likely that you see this error because you updated to ' + + 'Redux 2.x and React Redux 2.x which no longer hot reload reducers ' + + 'automatically. See https://github.com/reactjs/react-redux/releases/' + + 'tag/v2.0.0 for the migration instructions.', + ); + } + + var Provider = (function (_Component) { + _inherits(Provider, _Component); + + Provider.prototype.getChildContext = function getChildContext() { + return { store: this.store, storeSubscription: null }; + }; + + function Provider(props, context) { + _classCallCheck(this, Provider); + + var _this = _possibleConstructorReturn(this, _Component.call(this, props, context)); + + _this.store = props.store; + return _this; + } + + Provider.prototype.render = function render() { + return __WEBPACK_IMPORTED_MODULE_0_react__['Children'].only(this.props.children); + }; + + return Provider; + })(__WEBPACK_IMPORTED_MODULE_0_react__['Component']); + + if (true) { + Provider.prototype.componentWillReceiveProps = function (nextProps) { + var store = this.store; + var nextStore = nextProps.store; + + if (store !== nextStore) { + warnAboutReceivingStore(); + } + }; + } + + Provider.propTypes = { + store: __WEBPACK_IMPORTED_MODULE_2__utils_PropTypes__['a' /* storeShape */].isRequired, + children: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.element.isRequired, + }; + Provider.childContextTypes = { + store: __WEBPACK_IMPORTED_MODULE_2__utils_PropTypes__['a' /* storeShape */].isRequired, + storeSubscription: __WEBPACK_IMPORTED_MODULE_2__utils_PropTypes__['b' /* subscriptionShape */], + }; + Provider.displayName = 'Provider'; + + /***/ + }, + /* 825 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__components_connectAdvanced__ = + __webpack_require__(348); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__ = __webpack_require__(832); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__mapDispatchToProps__ = __webpack_require__(826); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__mapStateToProps__ = __webpack_require__(827); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__mergeProps__ = __webpack_require__(828); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__selectorFactory__ = __webpack_require__(829); + /* unused harmony export createConnect */ + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + function _objectWithoutProperties(obj, keys) { + var target = {}; + for (var i in obj) { + if (keys.indexOf(i) >= 0) continue; + if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; + target[i] = obj[i]; + } + return target; + } + + /* + connect is a facade over connectAdvanced. It turns its args into a compatible + selectorFactory, which has the signature: + + (dispatch, options) => (nextState, nextOwnProps) => nextFinalProps + + connect passes its args to connectAdvanced as options, which will in turn pass them to + selectorFactory each time a Connect component instance is instantiated or hot reloaded. + + selectorFactory returns a final props selector from its mapStateToProps, + mapStateToPropsFactories, mapDispatchToProps, mapDispatchToPropsFactories, mergeProps, + mergePropsFactories, and pure args. + + The resulting final props selector is called by the Connect component instance whenever + it receives new props or store state. + */ + + function match(arg, factories, name) { + for (var i = factories.length - 1; i >= 0; i--) { + var result = factories[i](arg); + if (result) return result; + } + + return function (dispatch, options) { + throw new Error( + 'Invalid value of type ' + + typeof arg + + ' for ' + + name + + ' argument when connecting component ' + + options.wrappedComponentName + + '.', + ); + }; + } + + function strictEqual(a, b) { + return a === b; + } + + // createConnect with default args builds the 'official' connect behavior. Calling it with + // different options opens up some testing and extensibility scenarios + function createConnect() { + var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, + _ref$connectHOC = _ref.connectHOC, + connectHOC = + _ref$connectHOC === undefined + ? __WEBPACK_IMPORTED_MODULE_0__components_connectAdvanced__['a' /* default */] + : _ref$connectHOC, + _ref$mapStateToPropsF = _ref.mapStateToPropsFactories, + mapStateToPropsFactories = + _ref$mapStateToPropsF === undefined + ? __WEBPACK_IMPORTED_MODULE_3__mapStateToProps__['a' /* default */] + : _ref$mapStateToPropsF, + _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories, + mapDispatchToPropsFactories = + _ref$mapDispatchToPro === undefined + ? __WEBPACK_IMPORTED_MODULE_2__mapDispatchToProps__['a' /* default */] + : _ref$mapDispatchToPro, + _ref$mergePropsFactor = _ref.mergePropsFactories, + mergePropsFactories = + _ref$mergePropsFactor === undefined + ? __WEBPACK_IMPORTED_MODULE_4__mergeProps__['a' /* default */] + : _ref$mergePropsFactor, + _ref$selectorFactory = _ref.selectorFactory, + selectorFactory = + _ref$selectorFactory === undefined + ? __WEBPACK_IMPORTED_MODULE_5__selectorFactory__['a' /* default */] + : _ref$selectorFactory; + + return function connect(mapStateToProps, mapDispatchToProps, mergeProps) { + var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}, + _ref2$pure = _ref2.pure, + pure = _ref2$pure === undefined ? true : _ref2$pure, + _ref2$areStatesEqual = _ref2.areStatesEqual, + areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual, + _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual, + areOwnPropsEqual = + _ref2$areOwnPropsEqua === undefined + ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__['a' /* default */] + : _ref2$areOwnPropsEqua, + _ref2$areStatePropsEq = _ref2.areStatePropsEqual, + areStatePropsEqual = + _ref2$areStatePropsEq === undefined + ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__['a' /* default */] + : _ref2$areStatePropsEq, + _ref2$areMergedPropsE = _ref2.areMergedPropsEqual, + areMergedPropsEqual = + _ref2$areMergedPropsE === undefined + ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__['a' /* default */] + : _ref2$areMergedPropsE, + extraOptions = _objectWithoutProperties(_ref2, [ + 'pure', + 'areStatesEqual', + 'areOwnPropsEqual', + 'areStatePropsEqual', + 'areMergedPropsEqual', + ]); + + var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps'); + var initMapDispatchToProps = match( + mapDispatchToProps, + mapDispatchToPropsFactories, + 'mapDispatchToProps', + ); + var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps'); + + return connectHOC( + selectorFactory, + _extends( + { + // used in error messages + methodName: 'connect', + + // used to compute Connect's displayName from the wrapped component's displayName. + getDisplayName: function getDisplayName(name) { + return 'Connect(' + name + ')'; + }, + + // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes + shouldHandleStateChanges: Boolean(mapStateToProps), + + // passed through to selectorFactory + initMapStateToProps: initMapStateToProps, + initMapDispatchToProps: initMapDispatchToProps, + initMergeProps: initMergeProps, + pure: pure, + areStatesEqual: areStatesEqual, + areOwnPropsEqual: areOwnPropsEqual, + areStatePropsEqual: areStatePropsEqual, + areMergedPropsEqual: areMergedPropsEqual, + }, + extraOptions, + ), + ); + }; + } + + /* harmony default export */ __webpack_exports__['a'] = createConnect(); + + /***/ + }, + /* 826 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_redux__ = __webpack_require__(376); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__wrapMapToProps__ = __webpack_require__(349); + /* unused harmony export whenMapDispatchToPropsIsFunction */ + /* unused harmony export whenMapDispatchToPropsIsMissing */ + /* unused harmony export whenMapDispatchToPropsIsObject */ + + function whenMapDispatchToPropsIsFunction(mapDispatchToProps) { + return typeof mapDispatchToProps === 'function' + ? __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_1__wrapMapToProps__['a' /* wrapMapToPropsFunc */], + )(mapDispatchToProps, 'mapDispatchToProps') + : undefined; + } + + function whenMapDispatchToPropsIsMissing(mapDispatchToProps) { + return !mapDispatchToProps + ? __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_1__wrapMapToProps__['b' /* wrapMapToPropsConstant */], + )(function (dispatch) { + return { dispatch: dispatch }; + }) + : undefined; + } + + function whenMapDispatchToPropsIsObject(mapDispatchToProps) { + return mapDispatchToProps && typeof mapDispatchToProps === 'object' + ? __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_1__wrapMapToProps__['b' /* wrapMapToPropsConstant */], + )(function (dispatch) { + return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0_redux__['e' /* bindActionCreators */])( + mapDispatchToProps, + dispatch, + ); + }) + : undefined; + } + + /* harmony default export */ __webpack_exports__['a'] = [ + whenMapDispatchToPropsIsFunction, + whenMapDispatchToPropsIsMissing, + whenMapDispatchToPropsIsObject, + ]; + + /***/ + }, + /* 827 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__wrapMapToProps__ = __webpack_require__(349); + /* unused harmony export whenMapStateToPropsIsFunction */ + /* unused harmony export whenMapStateToPropsIsMissing */ + + function whenMapStateToPropsIsFunction(mapStateToProps) { + return typeof mapStateToProps === 'function' + ? __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_0__wrapMapToProps__['a' /* wrapMapToPropsFunc */], + )(mapStateToProps, 'mapStateToProps') + : undefined; + } + + function whenMapStateToPropsIsMissing(mapStateToProps) { + return !mapStateToProps + ? __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_0__wrapMapToProps__['b' /* wrapMapToPropsConstant */], + )(function () { + return {}; + }) + : undefined; + } + + /* harmony default export */ __webpack_exports__['a'] = [ + whenMapStateToPropsIsFunction, + whenMapStateToPropsIsMissing, + ]; + + /***/ + }, + /* 828 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils_verifyPlainObject__ = + __webpack_require__(351); + /* unused harmony export defaultMergeProps */ + /* unused harmony export wrapMergePropsFunc */ + /* unused harmony export whenMergePropsIsFunction */ + /* unused harmony export whenMergePropsIsOmitted */ + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + function defaultMergeProps(stateProps, dispatchProps, ownProps) { + return _extends({}, ownProps, stateProps, dispatchProps); + } + + function wrapMergePropsFunc(mergeProps) { + return function initMergePropsProxy(dispatch, _ref) { + var displayName = _ref.displayName, + pure = _ref.pure, + areMergedPropsEqual = _ref.areMergedPropsEqual; + + var hasRunOnce = false; + var mergedProps = void 0; + + return function mergePropsProxy(stateProps, dispatchProps, ownProps) { + var nextMergedProps = mergeProps(stateProps, dispatchProps, ownProps); + + if (hasRunOnce) { + if (!pure || !areMergedPropsEqual(nextMergedProps, mergedProps)) mergedProps = nextMergedProps; + } else { + hasRunOnce = true; + mergedProps = nextMergedProps; + + if (true) + __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_0__utils_verifyPlainObject__['a' /* default */], + )(mergedProps, displayName, 'mergeProps'); + } + + return mergedProps; + }; + }; + } + + function whenMergePropsIsFunction(mergeProps) { + return typeof mergeProps === 'function' ? wrapMergePropsFunc(mergeProps) : undefined; + } + + function whenMergePropsIsOmitted(mergeProps) { + return !mergeProps + ? function () { + return defaultMergeProps; + } + : undefined; + } + + /* harmony default export */ __webpack_exports__['a'] = [ + whenMergePropsIsFunction, + whenMergePropsIsOmitted, + ]; + + /***/ + }, + /* 829 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__verifySubselectors__ = __webpack_require__(830); + /* unused harmony export impureFinalPropsSelectorFactory */ + /* unused harmony export pureFinalPropsSelectorFactory */ + /* harmony export (immutable) */ __webpack_exports__['a'] = finalPropsSelectorFactory; + function _objectWithoutProperties(obj, keys) { + var target = {}; + for (var i in obj) { + if (keys.indexOf(i) >= 0) continue; + if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; + target[i] = obj[i]; + } + return target; + } + + function impureFinalPropsSelectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch) { + return function impureFinalPropsSelector(state, ownProps) { + return mergeProps( + mapStateToProps(state, ownProps), + mapDispatchToProps(dispatch, ownProps), + ownProps, + ); + }; + } + + function pureFinalPropsSelectorFactory( + mapStateToProps, + mapDispatchToProps, + mergeProps, + dispatch, + _ref, + ) { + var areStatesEqual = _ref.areStatesEqual, + areOwnPropsEqual = _ref.areOwnPropsEqual, + areStatePropsEqual = _ref.areStatePropsEqual; + + var hasRunAtLeastOnce = false; + var state = void 0; + var ownProps = void 0; + var stateProps = void 0; + var dispatchProps = void 0; + var mergedProps = void 0; + + function handleFirstCall(firstState, firstOwnProps) { + state = firstState; + ownProps = firstOwnProps; + stateProps = mapStateToProps(state, ownProps); + dispatchProps = mapDispatchToProps(dispatch, ownProps); + mergedProps = mergeProps(stateProps, dispatchProps, ownProps); + hasRunAtLeastOnce = true; + return mergedProps; + } + + function handleNewPropsAndNewState() { + stateProps = mapStateToProps(state, ownProps); + + if (mapDispatchToProps.dependsOnOwnProps) dispatchProps = mapDispatchToProps(dispatch, ownProps); + + mergedProps = mergeProps(stateProps, dispatchProps, ownProps); + return mergedProps; + } + + function handleNewProps() { + if (mapStateToProps.dependsOnOwnProps) stateProps = mapStateToProps(state, ownProps); + + if (mapDispatchToProps.dependsOnOwnProps) dispatchProps = mapDispatchToProps(dispatch, ownProps); + + mergedProps = mergeProps(stateProps, dispatchProps, ownProps); + return mergedProps; + } + + function handleNewState() { + var nextStateProps = mapStateToProps(state, ownProps); + var statePropsChanged = !areStatePropsEqual(nextStateProps, stateProps); + stateProps = nextStateProps; + + if (statePropsChanged) mergedProps = mergeProps(stateProps, dispatchProps, ownProps); + + return mergedProps; + } + + function handleSubsequentCalls(nextState, nextOwnProps) { + var propsChanged = !areOwnPropsEqual(nextOwnProps, ownProps); + var stateChanged = !areStatesEqual(nextState, state); + state = nextState; + ownProps = nextOwnProps; + + if (propsChanged && stateChanged) return handleNewPropsAndNewState(); + if (propsChanged) return handleNewProps(); + if (stateChanged) return handleNewState(); + return mergedProps; + } + + return function pureFinalPropsSelector(nextState, nextOwnProps) { + return hasRunAtLeastOnce + ? handleSubsequentCalls(nextState, nextOwnProps) + : handleFirstCall(nextState, nextOwnProps); + }; + } + + // TODO: Add more comments + + // If pure is true, the selector returned by selectorFactory will memoize its results, + // allowing connectAdvanced's shouldComponentUpdate to return false if final + // props have not changed. If false, the selector will always return a new + // object and shouldComponentUpdate will always return true. + + function finalPropsSelectorFactory(dispatch, _ref2) { + var initMapStateToProps = _ref2.initMapStateToProps, + initMapDispatchToProps = _ref2.initMapDispatchToProps, + initMergeProps = _ref2.initMergeProps, + options = _objectWithoutProperties(_ref2, [ + 'initMapStateToProps', + 'initMapDispatchToProps', + 'initMergeProps', + ]); + + var mapStateToProps = initMapStateToProps(dispatch, options); + var mapDispatchToProps = initMapDispatchToProps(dispatch, options); + var mergeProps = initMergeProps(dispatch, options); + + if (true) { + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__verifySubselectors__['a' /* default */])( + mapStateToProps, + mapDispatchToProps, + mergeProps, + options.displayName, + ); + } + + var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory; + + return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options); + } + + /***/ + }, + /* 830 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils_warning__ = __webpack_require__(220); + /* harmony export (immutable) */ __webpack_exports__['a'] = verifySubselectors; + + function verify(selector, methodName, displayName) { + if (!selector) { + throw new Error('Unexpected value for ' + methodName + ' in ' + displayName + '.'); + } else if (methodName === 'mapStateToProps' || methodName === 'mapDispatchToProps') { + if (!selector.hasOwnProperty('dependsOnOwnProps')) { + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__utils_warning__['a' /* default */])( + 'The selector for ' + + methodName + + ' of ' + + displayName + + ' did not specify a value for dependsOnOwnProps.', + ); + } + } + } + + function verifySubselectors(mapStateToProps, mapDispatchToProps, mergeProps, displayName) { + verify(mapStateToProps, 'mapStateToProps', displayName); + verify(mapDispatchToProps, 'mapDispatchToProps', displayName); + verify(mergeProps, 'mergeProps', displayName); + } + + /***/ + }, + /* 831 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'a', function () { + return Subscription; + }); + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + // encapsulates the subscription logic for connecting a component to the redux store, as + // well as nesting subscriptions of descendant components, so that we can ensure the + // ancestor components re-render before descendants + + var CLEARED = null; + var nullListeners = { + notify: function notify() {}, + }; + + function createListenerCollection() { + // the current/next pattern is copied from redux's createStore code. + // TODO: refactor+expose that code to be reusable here? + var current = []; + var next = []; + + return { + clear: function clear() { + next = CLEARED; + current = CLEARED; + }, + notify: function notify() { + var listeners = (current = next); + for (var i = 0; i < listeners.length; i++) { + listeners[i](); + } + }, + subscribe: function subscribe(listener) { + var isSubscribed = true; + if (next === current) next = current.slice(); + next.push(listener); + + return function unsubscribe() { + if (!isSubscribed || current === CLEARED) return; + isSubscribed = false; + + if (next === current) next = current.slice(); + next.splice(next.indexOf(listener), 1); + }; + }, + }; + } + + var Subscription = (function () { + function Subscription(store, parentSub, onStateChange) { + _classCallCheck(this, Subscription); + + this.store = store; + this.parentSub = parentSub; + this.onStateChange = onStateChange; + this.unsubscribe = null; + this.listeners = nullListeners; + } + + Subscription.prototype.addNestedSub = function addNestedSub(listener) { + this.trySubscribe(); + return this.listeners.subscribe(listener); + }; + + Subscription.prototype.notifyNestedSubs = function notifyNestedSubs() { + this.listeners.notify(); + }; + + Subscription.prototype.isSubscribed = function isSubscribed() { + return Boolean(this.unsubscribe); + }; + + Subscription.prototype.trySubscribe = function trySubscribe() { + if (!this.unsubscribe) { + this.unsubscribe = this.parentSub + ? this.parentSub.addNestedSub(this.onStateChange) + : this.store.subscribe(this.onStateChange); + + this.listeners = createListenerCollection(); + } + }; + + Subscription.prototype.tryUnsubscribe = function tryUnsubscribe() { + if (this.unsubscribe) { + this.unsubscribe(); + this.unsubscribe = null; + this.listeners.clear(); + this.listeners = nullListeners; + } + }; + + return Subscription; + })(); + + /***/ + }, + /* 832 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = shallowEqual; + var hasOwn = Object.prototype.hasOwnProperty; + + function is(x, y) { + if (x === y) { + return x !== 0 || y !== 0 || 1 / x === 1 / y; + } else { + return x !== x && y !== y; + } + } + + function shallowEqual(objA, objB) { + if (is(objA, objB)) return true; + + if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) { + return false; + } + + var keysA = Object.keys(objA); + var keysB = Object.keys(objB); + + if (keysA.length !== keysB.length) return false; + + for (var i = 0; i < keysA.length; i++) { + if (!hasOwn.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) { + return false; + } + } + + return true; + } + + /***/ + }, + /* 833 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + + if (true) { + var invariant = __webpack_require__(3); + var warning = __webpack_require__(4); + var ReactPropTypesSecret = __webpack_require__(353); + var loggedTypeFailures = {}; + } + + /** + * Assert that the values match with the type specs. + * Error messages are memorized and will only be shown once. + * + * @param {object} typeSpecs Map of name to a ReactPropType + * @param {object} values Runtime values that need to be type-checked + * @param {string} location e.g. "prop", "context", "child context" + * @param {string} componentName Name of the component for error messages. + * @param {?Function} getStack Returns the component stack. + * @private + */ + function checkPropTypes(typeSpecs, values, location, componentName, getStack) { + if (true) { + for (var typeSpecName in typeSpecs) { + if (typeSpecs.hasOwnProperty(typeSpecName)) { + var error; + // Prop type validation may throw. In case they do, we don't want to + // fail the render phase where it didn't fail before. So we log it. + // After these have been cleaned up, we'll let them throw. + try { + // This is intentionally an invariant that gets caught. It's the same + // behavior as without this statement except with a better message. + invariant( + typeof typeSpecs[typeSpecName] === 'function', + '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', + componentName || 'React class', + location, + typeSpecName, + ); + error = typeSpecs[typeSpecName]( + values, + typeSpecName, + componentName, + location, + null, + ReactPropTypesSecret, + ); + } catch (ex) { + error = ex; + } + warning( + !error || error instanceof Error, + '%s: type specification of %s `%s` is invalid; the type checker ' + + 'function must return `null` or an `Error` but returned a %s. ' + + 'You may have forgotten to pass an argument to the type checker ' + + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + + 'shape all require an argument).', + componentName || 'React class', + location, + typeSpecName, + typeof error, + ); + if (error instanceof Error && !(error.message in loggedTypeFailures)) { + // Only monitor this failure once because there tends to be a lot of the + // same error. + loggedTypeFailures[error.message] = true; + + var stack = getStack ? getStack() : ''; + + warning(false, 'Failed %s type: %s%s', location, error.message, stack != null ? stack : ''); + } + } + } + } + } + + module.exports = checkPropTypes; + + /***/ + }, + /* 834 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + + var emptyFunction = __webpack_require__(22); + var invariant = __webpack_require__(3); + var warning = __webpack_require__(4); + + var ReactPropTypesSecret = __webpack_require__(353); + var checkPropTypes = __webpack_require__(833); + + module.exports = function (isValidElement, throwOnDirectAccess) { + /* global Symbol */ + var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; + var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec. + + /** + * Returns the iterator method function contained on the iterable object. + * + * Be sure to invoke the function with the iterable as context: + * + * var iteratorFn = getIteratorFn(myIterable); + * if (iteratorFn) { + * var iterator = iteratorFn.call(myIterable); + * ... + * } + * + * @param {?object} maybeIterable + * @return {?function} + */ + function getIteratorFn(maybeIterable) { + var iteratorFn = + maybeIterable && + ((ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL]) || maybeIterable[FAUX_ITERATOR_SYMBOL]); + if (typeof iteratorFn === 'function') { + return iteratorFn; + } + } + + /** + * Collection of methods that allow declaration and validation of props that are + * supplied to React components. Example usage: + * + * var Props = require('ReactPropTypes'); + * var MyArticle = React.createClass({ + * propTypes: { + * // An optional string prop named "description". + * description: Props.string, + * + * // A required enum prop named "category". + * category: Props.oneOf(['News','Photos']).isRequired, + * + * // A prop named "dialog" that requires an instance of Dialog. + * dialog: Props.instanceOf(Dialog).isRequired + * }, + * render: function() { ... } + * }); + * + * A more formal specification of how these methods are used: + * + * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...) + * decl := ReactPropTypes.{type}(.isRequired)? + * + * Each and every declaration produces a function with the same signature. This + * allows the creation of custom validation functions. For example: + * + * var MyLink = React.createClass({ + * propTypes: { + * // An optional string or URI prop named "href". + * href: function(props, propName, componentName) { + * var propValue = props[propName]; + * if (propValue != null && typeof propValue !== 'string' && + * !(propValue instanceof URI)) { + * return new Error( + * 'Expected a string or an URI for ' + propName + ' in ' + + * componentName + * ); + * } + * } + * }, + * render: function() {...} + * }); + * + * @internal + */ + + var ANONYMOUS = '<<anonymous>>'; + + // Important! + // Keep this list in sync with production version in `./factoryWithThrowingShims.js`. + var ReactPropTypes = { + array: createPrimitiveTypeChecker('array'), + bool: createPrimitiveTypeChecker('boolean'), + func: createPrimitiveTypeChecker('function'), + number: createPrimitiveTypeChecker('number'), + object: createPrimitiveTypeChecker('object'), + string: createPrimitiveTypeChecker('string'), + symbol: createPrimitiveTypeChecker('symbol'), + + any: createAnyTypeChecker(), + arrayOf: createArrayOfTypeChecker, + element: createElementTypeChecker(), + instanceOf: createInstanceTypeChecker, + node: createNodeChecker(), + objectOf: createObjectOfTypeChecker, + oneOf: createEnumTypeChecker, + oneOfType: createUnionTypeChecker, + shape: createShapeTypeChecker, + }; + + /** + * inlined Object.is polyfill to avoid requiring consumers ship their own + * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is + */ + /*eslint-disable no-self-compare*/ + function is(x, y) { + // SameValue algorithm + if (x === y) { + // Steps 1-5, 7-10 + // Steps 6.b-6.e: +0 != -0 + return x !== 0 || 1 / x === 1 / y; + } else { + // Step 6.a: NaN == NaN + return x !== x && y !== y; + } + } + /*eslint-enable no-self-compare*/ + + /** + * We use an Error-like object for backward compatibility as people may call + * PropTypes directly and inspect their output. However, we don't use real + * Errors anymore. We don't inspect their stack anyway, and creating them + * is prohibitively expensive if they are created too often, such as what + * happens in oneOfType() for any type before the one that matched. + */ + function PropTypeError(message) { + this.message = message; + this.stack = ''; + } + // Make `instanceof Error` still work for returned errors. + PropTypeError.prototype = Error.prototype; + + function createChainableTypeChecker(validate) { + if (true) { + var manualPropTypeCallCache = {}; + var manualPropTypeWarningCount = 0; + } + function checkType(isRequired, props, propName, componentName, location, propFullName, secret) { + componentName = componentName || ANONYMOUS; + propFullName = propFullName || propName; + + if (secret !== ReactPropTypesSecret) { + if (throwOnDirectAccess) { + // New behavior only for users of `prop-types` package + invariant( + false, + 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' + + 'Use `PropTypes.checkPropTypes()` to call them. ' + + 'Read more at http://fb.me/use-check-prop-types', + ); + } else if ('development' !== 'production' && typeof console !== 'undefined') { + // Old behavior for people using React.PropTypes + var cacheKey = componentName + ':' + propName; + if ( + !manualPropTypeCallCache[cacheKey] && + // Avoid spamming the console because they are often not actionable except for lib authors + manualPropTypeWarningCount < 3 + ) { + warning( + false, + 'You are manually calling a React.PropTypes validation ' + + 'function for the `%s` prop on `%s`. This is deprecated ' + + 'and will throw in the standalone `prop-types` package. ' + + 'You may be seeing this warning due to a third-party PropTypes ' + + 'library. See https://fb.me/react-warning-dont-call-proptypes ' + + 'for details.', + propFullName, + componentName, + ); + manualPropTypeCallCache[cacheKey] = true; + manualPropTypeWarningCount++; + } + } + } + if (props[propName] == null) { + if (isRequired) { + if (props[propName] === null) { + return new PropTypeError( + 'The ' + + location + + ' `' + + propFullName + + '` is marked as required ' + + ('in `' + componentName + '`, but its value is `null`.'), + ); + } + return new PropTypeError( + 'The ' + + location + + ' `' + + propFullName + + '` is marked as required in ' + + ('`' + componentName + '`, but its value is `undefined`.'), + ); + } + return null; + } else { + return validate(props, propName, componentName, location, propFullName); + } + } + + var chainedCheckType = checkType.bind(null, false); + chainedCheckType.isRequired = checkType.bind(null, true); + + return chainedCheckType; + } + + function createPrimitiveTypeChecker(expectedType) { + function validate(props, propName, componentName, location, propFullName, secret) { + var propValue = props[propName]; + var propType = getPropType(propValue); + if (propType !== expectedType) { + // `propValue` being instance of, say, date/regexp, pass the 'object' + // check, but we can offer a more precise error message here rather than + // 'of type `object`'. + var preciseType = getPreciseType(propValue); + + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` of type ' + + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + + ('`' + expectedType + '`.'), + ); + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createAnyTypeChecker() { + return createChainableTypeChecker(emptyFunction.thatReturnsNull); + } + + function createArrayOfTypeChecker(typeChecker) { + function validate(props, propName, componentName, location, propFullName) { + if (typeof typeChecker !== 'function') { + return new PropTypeError( + 'Property `' + + propFullName + + '` of component `' + + componentName + + '` has invalid PropType notation inside arrayOf.', + ); + } + var propValue = props[propName]; + if (!Array.isArray(propValue)) { + var propType = getPropType(propValue); + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` of type ' + + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'), + ); + } + for (var i = 0; i < propValue.length; i++) { + var error = typeChecker( + propValue, + i, + componentName, + location, + propFullName + '[' + i + ']', + ReactPropTypesSecret, + ); + if (error instanceof Error) { + return error; + } + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createElementTypeChecker() { + function validate(props, propName, componentName, location, propFullName) { + var propValue = props[propName]; + if (!isValidElement(propValue)) { + var propType = getPropType(propValue); + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` of type ' + + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'), + ); + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createInstanceTypeChecker(expectedClass) { + function validate(props, propName, componentName, location, propFullName) { + if (!(props[propName] instanceof expectedClass)) { + var expectedClassName = expectedClass.name || ANONYMOUS; + var actualClassName = getClassName(props[propName]); + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` of type ' + + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + + ('instance of `' + expectedClassName + '`.'), + ); + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createEnumTypeChecker(expectedValues) { + if (!Array.isArray(expectedValues)) { + true + ? warning(false, 'Invalid argument supplied to oneOf, expected an instance of array.') + : void 0; + return emptyFunction.thatReturnsNull; + } + + function validate(props, propName, componentName, location, propFullName) { + var propValue = props[propName]; + for (var i = 0; i < expectedValues.length; i++) { + if (is(propValue, expectedValues[i])) { + return null; + } + } + + var valuesString = JSON.stringify(expectedValues); + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` of value `' + + propValue + + '` ' + + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'), + ); + } + return createChainableTypeChecker(validate); + } + + function createObjectOfTypeChecker(typeChecker) { + function validate(props, propName, componentName, location, propFullName) { + if (typeof typeChecker !== 'function') { + return new PropTypeError( + 'Property `' + + propFullName + + '` of component `' + + componentName + + '` has invalid PropType notation inside objectOf.', + ); + } + var propValue = props[propName]; + var propType = getPropType(propValue); + if (propType !== 'object') { + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` of type ' + + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'), + ); + } + for (var key in propValue) { + if (propValue.hasOwnProperty(key)) { + var error = typeChecker( + propValue, + key, + componentName, + location, + propFullName + '.' + key, + ReactPropTypesSecret, + ); + if (error instanceof Error) { + return error; + } + } + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createUnionTypeChecker(arrayOfTypeCheckers) { + if (!Array.isArray(arrayOfTypeCheckers)) { + true + ? warning(false, 'Invalid argument supplied to oneOfType, expected an instance of array.') + : void 0; + return emptyFunction.thatReturnsNull; + } + + function validate(props, propName, componentName, location, propFullName) { + for (var i = 0; i < arrayOfTypeCheckers.length; i++) { + var checker = arrayOfTypeCheckers[i]; + if ( + checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null + ) { + return null; + } + } + + return new PropTypeError( + 'Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'), + ); + } + return createChainableTypeChecker(validate); + } + + function createNodeChecker() { + function validate(props, propName, componentName, location, propFullName) { + if (!isNode(props[propName])) { + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` supplied to ' + + ('`' + componentName + '`, expected a ReactNode.'), + ); + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createShapeTypeChecker(shapeTypes) { + function validate(props, propName, componentName, location, propFullName) { + var propValue = props[propName]; + var propType = getPropType(propValue); + if (propType !== 'object') { + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` of type `' + + propType + + '` ' + + ('supplied to `' + componentName + '`, expected `object`.'), + ); + } + for (var key in shapeTypes) { + var checker = shapeTypes[key]; + if (!checker) { + continue; + } + var error = checker( + propValue, + key, + componentName, + location, + propFullName + '.' + key, + ReactPropTypesSecret, + ); + if (error) { + return error; + } + } + return null; + } + return createChainableTypeChecker(validate); + } + + function isNode(propValue) { + switch (typeof propValue) { + case 'number': + case 'string': + case 'undefined': + return true; + case 'boolean': + return !propValue; + case 'object': + if (Array.isArray(propValue)) { + return propValue.every(isNode); + } + if (propValue === null || isValidElement(propValue)) { + return true; + } + + var iteratorFn = getIteratorFn(propValue); + if (iteratorFn) { + var iterator = iteratorFn.call(propValue); + var step; + if (iteratorFn !== propValue.entries) { + while (!(step = iterator.next()).done) { + if (!isNode(step.value)) { + return false; + } + } + } else { + // Iterator will provide entry [k,v] tuples rather than values. + while (!(step = iterator.next()).done) { + var entry = step.value; + if (entry) { + if (!isNode(entry[1])) { + return false; + } + } + } + } + } else { + return false; + } + + return true; + default: + return false; + } + } + + function isSymbol(propType, propValue) { + // Native Symbol. + if (propType === 'symbol') { + return true; + } + + // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol' + if (propValue['@@toStringTag'] === 'Symbol') { + return true; + } + + // Fallback for non-spec compliant Symbols which are polyfilled. + if (typeof Symbol === 'function' && propValue instanceof Symbol) { + return true; + } + + return false; + } + + // Equivalent of `typeof` but with special handling for array and regexp. + function getPropType(propValue) { + var propType = typeof propValue; + if (Array.isArray(propValue)) { + return 'array'; + } + if (propValue instanceof RegExp) { + // Old webkits (at least until Android 4.0) return 'function' rather than + // 'object' for typeof a RegExp. We'll normalize this here so that /bla/ + // passes PropTypes.object. + return 'object'; + } + if (isSymbol(propType, propValue)) { + return 'symbol'; + } + return propType; + } + + // This handles more types than `getPropType`. Only used for error messages. + // See `createPrimitiveTypeChecker`. + function getPreciseType(propValue) { + var propType = getPropType(propValue); + if (propType === 'object') { + if (propValue instanceof Date) { + return 'date'; + } else if (propValue instanceof RegExp) { + return 'regexp'; + } + } + return propType; + } + + // Returns class name of the object, if any. + function getClassName(propValue) { + if (!propValue.constructor || !propValue.constructor.name) { + return ANONYMOUS; + } + return propValue.constructor.name; + } + + ReactPropTypes.checkPropTypes = checkPropTypes; + ReactPropTypes.PropTypes = ReactPropTypes; + + return ReactPropTypes; + }; + + /***/ + }, + /* 835 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.routerMiddleware = + exports.routerActions = + exports.goForward = + exports.goBack = + exports.go = + exports.replace = + exports.push = + exports.CALL_HISTORY_METHOD = + exports.routerReducer = + exports.LOCATION_CHANGE = + exports.syncHistoryWithStore = + undefined; + + var _reducer = __webpack_require__(355); + + Object.defineProperty(exports, 'LOCATION_CHANGE', { + enumerable: true, + get: function get() { + return _reducer.LOCATION_CHANGE; + }, + }); + Object.defineProperty(exports, 'routerReducer', { + enumerable: true, + get: function get() { + return _reducer.routerReducer; + }, + }); + + var _actions = __webpack_require__(354); + + Object.defineProperty(exports, 'CALL_HISTORY_METHOD', { + enumerable: true, + get: function get() { + return _actions.CALL_HISTORY_METHOD; + }, + }); + Object.defineProperty(exports, 'push', { + enumerable: true, + get: function get() { + return _actions.push; + }, + }); + Object.defineProperty(exports, 'replace', { + enumerable: true, + get: function get() { + return _actions.replace; + }, + }); + Object.defineProperty(exports, 'go', { + enumerable: true, + get: function get() { + return _actions.go; + }, + }); + Object.defineProperty(exports, 'goBack', { + enumerable: true, + get: function get() { + return _actions.goBack; + }, + }); + Object.defineProperty(exports, 'goForward', { + enumerable: true, + get: function get() { + return _actions.goForward; + }, + }); + Object.defineProperty(exports, 'routerActions', { + enumerable: true, + get: function get() { + return _actions.routerActions; + }, + }); + + var _sync = __webpack_require__(837); + + var _sync2 = _interopRequireDefault(_sync); + + var _middleware = __webpack_require__(836); + + var _middleware2 = _interopRequireDefault(_middleware); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + exports.syncHistoryWithStore = _sync2['default']; + exports.routerMiddleware = _middleware2['default']; + + /***/ + }, + /* 836 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports['default'] = routerMiddleware; + + var _actions = __webpack_require__(354); + + function _toConsumableArray(arr) { + if (Array.isArray(arr)) { + for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { + arr2[i] = arr[i]; + } + return arr2; + } else { + return Array.from(arr); + } + } + + /** + * This middleware captures CALL_HISTORY_METHOD actions to redirect to the + * provided history object. This will prevent these actions from reaching your + * reducer or any middleware that comes after this one. + */ + function routerMiddleware(history) { + return function () { + return function (next) { + return function (action) { + if (action.type !== _actions.CALL_HISTORY_METHOD) { + return next(action); + } + + var _action$payload = action.payload, + method = _action$payload.method, + args = _action$payload.args; + + history[method].apply(history, _toConsumableArray(args)); + }; + }; + }; + } + + /***/ + }, + /* 837 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + exports['default'] = syncHistoryWithStore; + + var _reducer = __webpack_require__(355); + + var defaultSelectLocationState = function defaultSelectLocationState(state) { + return state.routing; + }; + + /** + * This function synchronizes your history state with the Redux store. + * Location changes flow from history to the store. An enhanced history is + * returned with a listen method that responds to store updates for location. + * + * When this history is provided to the router, this means the location data + * will flow like this: + * history.push -> store.dispatch -> enhancedHistory.listen -> router + * This ensures that when the store state changes due to a replay or other + * event, the router will be updated appropriately and can transition to the + * correct router state. + */ + function syncHistoryWithStore(history, store) { + var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}, + _ref$selectLocationSt = _ref.selectLocationState, + selectLocationState = + _ref$selectLocationSt === undefined ? defaultSelectLocationState : _ref$selectLocationSt, + _ref$adjustUrlOnRepla = _ref.adjustUrlOnReplay, + adjustUrlOnReplay = _ref$adjustUrlOnRepla === undefined ? true : _ref$adjustUrlOnRepla; + + // Ensure that the reducer is mounted on the store and functioning properly. + if (typeof selectLocationState(store.getState()) === 'undefined') { + throw new Error( + 'Expected the routing state to be available either as `state.routing` ' + + 'or as the custom expression you can specify as `selectLocationState` ' + + 'in the `syncHistoryWithStore()` options. ' + + "Ensure you have added the `routerReducer` to your store's " + + 'reducers via `combineReducers` or whatever method you use to isolate ' + + 'your reducers.', + ); + } + + var initialLocation = void 0; + var isTimeTraveling = void 0; + var unsubscribeFromStore = void 0; + var unsubscribeFromHistory = void 0; + var currentLocation = void 0; + + // What does the store say about current location? + var getLocationInStore = function getLocationInStore(useInitialIfEmpty) { + var locationState = selectLocationState(store.getState()); + return locationState.locationBeforeTransitions || (useInitialIfEmpty ? initialLocation : undefined); + }; + + // Init initialLocation with potential location in store + initialLocation = getLocationInStore(); + + // If the store is replayed, update the URL in the browser to match. + if (adjustUrlOnReplay) { + var handleStoreChange = function handleStoreChange() { + var locationInStore = getLocationInStore(true); + if (currentLocation === locationInStore || initialLocation === locationInStore) { + return; + } + + // Update address bar to reflect store state + isTimeTraveling = true; + currentLocation = locationInStore; + history.transitionTo( + _extends({}, locationInStore, { + action: 'PUSH', + }), + ); + isTimeTraveling = false; + }; + + unsubscribeFromStore = store.subscribe(handleStoreChange); + handleStoreChange(); + } + + // Whenever location changes, dispatch an action to get it in the store + var handleLocationChange = function handleLocationChange(location) { + // ... unless we just caused that location change + if (isTimeTraveling) { + return; + } + + // Remember where we are + currentLocation = location; + + // Are we being called for the first time? + if (!initialLocation) { + // Remember as a fallback in case state is reset + initialLocation = location; + + // Respect persisted location, if any + if (getLocationInStore()) { + return; + } + } + + // Tell the store to update by dispatching an action + store.dispatch({ + type: _reducer.LOCATION_CHANGE, + payload: location, + }); + }; + unsubscribeFromHistory = history.listen(handleLocationChange); + + // support history 3.x + if (history.getCurrentLocation) { + handleLocationChange(history.getCurrentLocation()); + } + + // The enhanced history uses store as source of truth + return _extends({}, history, { + // The listeners are subscribed to the store instead of history + listen: function listen(listener) { + // Copy of last location. + var lastPublishedLocation = getLocationInStore(true); + + // Keep track of whether we unsubscribed, as Redux store + // only applies changes in subscriptions on next dispatch + var unsubscribed = false; + var unsubscribeFromStore = store.subscribe(function () { + var currentLocation = getLocationInStore(true); + if (currentLocation === lastPublishedLocation) { + return; + } + lastPublishedLocation = currentLocation; + if (!unsubscribed) { + listener(lastPublishedLocation); + } + }); + + // History listeners expect a synchronous call. Make the first call to the + // listener after subscribing to the store, in case the listener causes a + // location change (e.g. when it redirects) + listener(lastPublishedLocation); + + // Let user unsubscribe later + return function () { + unsubscribed = true; + unsubscribeFromStore(); + }; + }, + + // It also provides a way to destroy internal listeners + unsubscribe: function unsubscribe() { + if (adjustUrlOnReplay) { + unsubscribeFromStore(); + } + unsubscribeFromHistory(); + }, + }); + } + + /***/ + }, + /* 838 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_create_react_class__ = __webpack_require__(59); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_create_react_class___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_create_react_class__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Link__ = __webpack_require__(356); + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + /** + * An <IndexLink> is used to link to an <IndexRoute>. + */ + var IndexLink = __WEBPACK_IMPORTED_MODULE_1_create_react_class___default()({ + displayName: 'IndexLink', + + render: function render() { + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_2__Link__['a' /* default */], + _extends({}, this.props, { onlyActiveOnIndex: true }), + ); + }, + }); + + /* unused harmony default export */ var _unused_webpack_default_export = IndexLink; + + /***/ + }, + /* 839 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_create_react_class__ = __webpack_require__(59); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_create_react_class___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_create_react_class__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(52); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__routerWarning__ = __webpack_require__(107); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_invariant__ = __webpack_require__(23); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_invariant___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_3_invariant__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Redirect__ = __webpack_require__(358); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__ = __webpack_require__(126); + + /** + * An <IndexRedirect> is used to redirect from an indexRoute. + */ + /* eslint-disable react/require-render-return */ + var IndexRedirect = __WEBPACK_IMPORTED_MODULE_0_create_react_class___default()({ + displayName: 'IndexRedirect', + + statics: { + createRouteFromReactElement: function createRouteFromReactElement(element, parentRoute) { + /* istanbul ignore else: sanity check */ + if (parentRoute) { + parentRoute.indexRoute = + __WEBPACK_IMPORTED_MODULE_4__Redirect__['a' /* default */].createRouteFromReactElement( + element, + ); + } else { + true + ? __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__routerWarning__['a' /* default */])( + false, + 'An <IndexRedirect> does not make sense at the root of your route config', + ) + : void 0; + } + }, + }, + + propTypes: { + to: __WEBPACK_IMPORTED_MODULE_1_prop_types__['string'].isRequired, + query: __WEBPACK_IMPORTED_MODULE_1_prop_types__['object'], + state: __WEBPACK_IMPORTED_MODULE_1_prop_types__['object'], + onEnter: __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__['c' /* falsy */], + children: __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__['c' /* falsy */], + }, + + /* istanbul ignore next: sanity check */ + render: function render() { + true + ? true + ? __WEBPACK_IMPORTED_MODULE_3_invariant___default()( + false, + '<IndexRedirect> elements are for router configuration only and should not be rendered', + ) + : invariant(false) + : void 0; + }, + }); + + /* unused harmony default export */ var _unused_webpack_default_export = IndexRedirect; + + /***/ + }, + /* 840 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_create_react_class__ = __webpack_require__(59); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_create_react_class___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_create_react_class__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(52); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__routerWarning__ = __webpack_require__(107); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_invariant__ = __webpack_require__(23); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_invariant___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_3_invariant__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__RouteUtils__ = __webpack_require__(70); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__ = __webpack_require__(126); + + /** + * An <IndexRoute> is used to specify its parent's <Route indexRoute> in + * a JSX route config. + */ + /* eslint-disable react/require-render-return */ + var IndexRoute = __WEBPACK_IMPORTED_MODULE_0_create_react_class___default()({ + displayName: 'IndexRoute', + + statics: { + createRouteFromReactElement: function createRouteFromReactElement(element, parentRoute) { + /* istanbul ignore else: sanity check */ + if (parentRoute) { + parentRoute.indexRoute = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_4__RouteUtils__['c' /* createRouteFromReactElement */], + )(element); + } else { + true + ? __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__routerWarning__['a' /* default */])( + false, + 'An <IndexRoute> does not make sense at the root of your route config', + ) + : void 0; + } + }, + }, + + propTypes: { + path: __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__['c' /* falsy */], + component: __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__['a' /* component */], + components: __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__['b' /* components */], + getComponent: __WEBPACK_IMPORTED_MODULE_1_prop_types__['func'], + getComponents: __WEBPACK_IMPORTED_MODULE_1_prop_types__['func'], + }, + + /* istanbul ignore next: sanity check */ + render: function render() { + true + ? true + ? __WEBPACK_IMPORTED_MODULE_3_invariant___default()( + false, + '<IndexRoute> elements are for router configuration only and should not be rendered', + ) + : invariant(false) + : void 0; + }, + }); + + /* harmony default export */ __webpack_exports__['a'] = IndexRoute; + + /***/ + }, + /* 841 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_create_react_class__ = __webpack_require__(59); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_create_react_class___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_create_react_class__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(52); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant__ = __webpack_require__(23); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_2_invariant__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__RouteUtils__ = __webpack_require__(70); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__InternalPropTypes__ = __webpack_require__(126); + + /** + * A <Route> is used to declare which components are rendered to the + * page when the URL matches a given pattern. + * + * Routes are arranged in a nested tree structure. When a new URL is + * requested, the tree is searched depth-first to find a route whose + * path matches the URL. When one is found, all routes in the tree + * that lead to it are considered "active" and their components are + * rendered into the DOM, nested in the same order as in the tree. + */ + /* eslint-disable react/require-render-return */ + var Route = __WEBPACK_IMPORTED_MODULE_0_create_react_class___default()({ + displayName: 'Route', + + statics: { + createRouteFromReactElement: + __WEBPACK_IMPORTED_MODULE_3__RouteUtils__['c' /* createRouteFromReactElement */], + }, + + propTypes: { + path: __WEBPACK_IMPORTED_MODULE_1_prop_types__['string'], + component: __WEBPACK_IMPORTED_MODULE_4__InternalPropTypes__['a' /* component */], + components: __WEBPACK_IMPORTED_MODULE_4__InternalPropTypes__['b' /* components */], + getComponent: __WEBPACK_IMPORTED_MODULE_1_prop_types__['func'], + getComponents: __WEBPACK_IMPORTED_MODULE_1_prop_types__['func'], + }, + + /* istanbul ignore next: sanity check */ + render: function render() { + true + ? true + ? __WEBPACK_IMPORTED_MODULE_2_invariant___default()( + false, + '<Route> elements are for router configuration only and should not be rendered', + ) + : invariant(false) + : void 0; + }, + }); + + /* harmony default export */ __webpack_exports__['a'] = Route; + + /***/ + }, + /* 842 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant__ = __webpack_require__(23); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_invariant__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_create_react_class__ = __webpack_require__(59); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_create_react_class___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_create_react_class__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types__ = __webpack_require__(52); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_3_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__createTransitionManager__ = + __webpack_require__(362); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__ = __webpack_require__(126); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__RouterContext__ = __webpack_require__(224); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__RouteUtils__ = __webpack_require__(70); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__RouterUtils__ = __webpack_require__(359); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__routerWarning__ = __webpack_require__(107); + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + function _objectWithoutProperties(obj, keys) { + var target = {}; + for (var i in obj) { + if (keys.indexOf(i) >= 0) continue; + if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; + target[i] = obj[i]; + } + return target; + } + + var propTypes = { + history: __WEBPACK_IMPORTED_MODULE_3_prop_types__['object'], + children: __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__['d' /* routes */], + routes: __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__['d' /* routes */], // alias for children + render: __WEBPACK_IMPORTED_MODULE_3_prop_types__['func'], + createElement: __WEBPACK_IMPORTED_MODULE_3_prop_types__['func'], + onError: __WEBPACK_IMPORTED_MODULE_3_prop_types__['func'], + onUpdate: __WEBPACK_IMPORTED_MODULE_3_prop_types__['func'], + + // PRIVATE: For client-side rehydration of server match. + matchContext: __WEBPACK_IMPORTED_MODULE_3_prop_types__['object'], + }; + + /** + * A <Router> is a high-level API for automatically setting up + * a router that renders a <RouterContext> with all the props + * it needs each time the URL changes. + */ + var Router = __WEBPACK_IMPORTED_MODULE_2_create_react_class___default()({ + displayName: 'Router', + + propTypes: propTypes, + + getDefaultProps: function getDefaultProps() { + return { + render: function render(props) { + return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_6__RouterContext__['a' /* default */], + props, + ); + }, + }; + }, + getInitialState: function getInitialState() { + return { + location: null, + routes: null, + params: null, + components: null, + }; + }, + handleError: function handleError(error) { + if (this.props.onError) { + this.props.onError.call(this, error); + } else { + // Throw errors by default so we don't silently swallow them! + throw error; // This error probably occurred in getChildRoutes or getComponents. + } + }, + createRouterObject: function createRouterObject(state) { + var matchContext = this.props.matchContext; + + if (matchContext) { + return matchContext.router; + } + + var history = this.props.history; + + return __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_8__RouterUtils__['a' /* createRouterObject */], + )(history, this.transitionManager, state); + }, + createTransitionManager: function createTransitionManager() { + var matchContext = this.props.matchContext; + + if (matchContext) { + return matchContext.transitionManager; + } + + var history = this.props.history; + var _props = this.props, + routes = _props.routes, + children = _props.children; + + !history.getCurrentLocation + ? true + ? __WEBPACK_IMPORTED_MODULE_0_invariant___default()( + false, + 'You have provided a history object created with history v4.x or v2.x ' + + 'and earlier. This version of React Router is only compatible with v3 ' + + 'history objects. Please change to history v3.x.', + ) + : invariant(false) + : void 0; + + return __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_4__createTransitionManager__['a' /* default */], + )( + history, + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_7__RouteUtils__['b' /* createRoutes */])( + routes || children, + ), + ); + }, + componentWillMount: function componentWillMount() { + var _this = this; + + this.transitionManager = this.createTransitionManager(); + this.router = this.createRouterObject(this.state); + + this._unlisten = this.transitionManager.listen(function (error, state) { + if (error) { + _this.handleError(error); + } else { + // Keep the identity of this.router because of a caveat in ContextUtils: + // they only work if the object identity is preserved. + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__RouterUtils__['b' /* assignRouterState */])( + _this.router, + state, + ); + _this.setState(state, _this.props.onUpdate); + } + }); + }, + + /* istanbul ignore next: sanity check */ + componentWillReceiveProps: function componentWillReceiveProps(nextProps) { + true + ? __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__routerWarning__['a' /* default */])( + nextProps.history === this.props.history, + 'You cannot change <Router history>; it will be ignored', + ) + : void 0; + + true + ? __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__routerWarning__['a' /* default */])( + (nextProps.routes || nextProps.children) === (this.props.routes || this.props.children), + 'You cannot change <Router routes>; it will be ignored', + ) + : void 0; + }, + componentWillUnmount: function componentWillUnmount() { + if (this._unlisten) this._unlisten(); + }, + render: function render() { + var _state = this.state, + location = _state.location, + routes = _state.routes, + params = _state.params, + components = _state.components; + + var _props2 = this.props, + createElement = _props2.createElement, + render = _props2.render, + props = _objectWithoutProperties(_props2, ['createElement', 'render']); + + if (location == null) return null; // Async match + + // Only forward non-Router-specific props to routing context, as those are + // the only ones that might be custom routing context props. + Object.keys(propTypes).forEach(function (propType) { + return delete props[propType]; + }); + + return render( + _extends({}, props, { + router: this.router, + location: location, + routes: routes, + params: params, + components: components, + createElement: createElement, + }), + ); + }, + }); + + /* unused harmony default export */ var _unused_webpack_default_export = Router; + + /***/ + }, + /* 843 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__AsyncUtils__ = __webpack_require__(221); + /* harmony export (immutable) */ __webpack_exports__['a'] = getTransitionUtils; + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + var PendingHooks = function PendingHooks() { + var _this = this; + + _classCallCheck(this, PendingHooks); + + this.hooks = []; + + this.add = function (hook) { + return _this.hooks.push(hook); + }; + + this.remove = function (hook) { + return (_this.hooks = _this.hooks.filter(function (h) { + return h !== hook; + })); + }; + + this.has = function (hook) { + return _this.hooks.indexOf(hook) !== -1; + }; + + this.clear = function () { + return (_this.hooks = []); + }; + }; + + function getTransitionUtils() { + var enterHooks = new PendingHooks(); + var changeHooks = new PendingHooks(); + + function createTransitionHook(hook, route, asyncArity, pendingHooks) { + var isSync = hook.length < asyncArity; + + var transitionHook = function transitionHook() { + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + hook.apply(route, args); + + if (isSync) { + var callback = args[args.length - 1]; + // Assume hook executes synchronously and + // automatically call the callback. + callback(); + } + }; + + pendingHooks.add(transitionHook); + + return transitionHook; + } + + function getEnterHooks(routes) { + return routes.reduce(function (hooks, route) { + if (route.onEnter) hooks.push(createTransitionHook(route.onEnter, route, 3, enterHooks)); + return hooks; + }, []); + } + + function getChangeHooks(routes) { + return routes.reduce(function (hooks, route) { + if (route.onChange) hooks.push(createTransitionHook(route.onChange, route, 4, changeHooks)); + return hooks; + }, []); + } + + function runTransitionHooks(length, iter, callback) { + if (!length) { + callback(); + return; + } + + var redirectInfo = void 0; + function replace(location) { + redirectInfo = location; + } + + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__AsyncUtils__['b' /* loopAsync */])( + length, + function (index, next, done) { + iter(index, replace, function (error) { + if (error || redirectInfo) { + done(error, redirectInfo); // No need to continue. + } else { + next(); + } + }); + }, + callback, + ); + } + + /** + * Runs all onEnter hooks in the given array of routes in order + * with onEnter(nextState, replace, callback) and calls + * callback(error, redirectInfo) when finished. The first hook + * to use replace short-circuits the loop. + * + * If a hook needs to run asynchronously, it may use the callback + * function. However, doing so will cause the transition to pause, + * which could lead to a non-responsive UI if the hook is slow. + */ + function runEnterHooks(routes, nextState, callback) { + enterHooks.clear(); + var hooks = getEnterHooks(routes); + return runTransitionHooks( + hooks.length, + function (index, replace, next) { + var wrappedNext = function wrappedNext() { + if (enterHooks.has(hooks[index])) { + next.apply(undefined, arguments); + enterHooks.remove(hooks[index]); + } + }; + hooks[index](nextState, replace, wrappedNext); + }, + callback, + ); + } + + /** + * Runs all onChange hooks in the given array of routes in order + * with onChange(prevState, nextState, replace, callback) and calls + * callback(error, redirectInfo) when finished. The first hook + * to use replace short-circuits the loop. + * + * If a hook needs to run asynchronously, it may use the callback + * function. However, doing so will cause the transition to pause, + * which could lead to a non-responsive UI if the hook is slow. + */ + function runChangeHooks(routes, state, nextState, callback) { + changeHooks.clear(); + var hooks = getChangeHooks(routes); + return runTransitionHooks( + hooks.length, + function (index, replace, next) { + var wrappedNext = function wrappedNext() { + if (changeHooks.has(hooks[index])) { + next.apply(undefined, arguments); + changeHooks.remove(hooks[index]); + } + }; + hooks[index](state, nextState, replace, wrappedNext); + }, + callback, + ); + } + + /** + * Runs all onLeave hooks in the given array of routes in order. + */ + function runLeaveHooks(routes, prevState) { + for (var i = 0, len = routes.length; i < len; ++i) { + if (routes[i].onLeave) routes[i].onLeave.call(routes[i], prevState); + } + } + + return { + runEnterHooks: runEnterHooks, + runChangeHooks: runChangeHooks, + runLeaveHooks: runLeaveHooks, + }; + } + + /***/ + }, + /* 844 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__RouterContext__ = __webpack_require__(224); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__routerWarning__ = __webpack_require__(107); + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + /* unused harmony default export */ var _unused_webpack_default_export = function () { + for (var _len = arguments.length, middlewares = Array(_len), _key = 0; _key < _len; _key++) { + middlewares[_key] = arguments[_key]; + } + + if (true) { + middlewares.forEach(function (middleware, index) { + true + ? __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__routerWarning__['a' /* default */])( + middleware.renderRouterContext || middleware.renderRouteComponent, + 'The middleware specified at index ' + + index + + ' does not appear to be ' + + 'a valid React Router middleware.', + ) + : void 0; + }); + } + + var withContext = middlewares + .map(function (middleware) { + return middleware.renderRouterContext; + }) + .filter(Boolean); + var withComponent = middlewares + .map(function (middleware) { + return middleware.renderRouteComponent; + }) + .filter(Boolean); + + var makeCreateElement = function makeCreateElement() { + var baseCreateElement = + arguments.length > 0 && arguments[0] !== undefined + ? arguments[0] + : __WEBPACK_IMPORTED_MODULE_0_react__['createElement']; + return function (Component, props) { + return withComponent.reduceRight( + function (previous, renderRouteComponent) { + return renderRouteComponent(previous, props); + }, + baseCreateElement(Component, props), + ); + }; + }; + + return function (renderProps) { + return withContext.reduceRight( + function (previous, renderRouterContext) { + return renderRouterContext(previous, renderProps); + }, + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_1__RouterContext__['a' /* default */], + _extends({}, renderProps, { + createElement: makeCreateElement(renderProps.createElement), + }), + ), + ); + }; + }; + + /***/ + }, + /* 845 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_createBrowserHistory__ = + __webpack_require__(726); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_createBrowserHistory___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_history_lib_createBrowserHistory__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__createRouterHistory__ = __webpack_require__(361); + + /* harmony default export */ __webpack_exports__['a'] = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_1__createRouterHistory__['a' /* default */], + )(__WEBPACK_IMPORTED_MODULE_0_history_lib_createBrowserHistory___default.a); + + /***/ + }, + /* 846 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__PatternUtils__ = __webpack_require__(106); + + function routeParamsChanged(route, prevState, nextState) { + if (!route.path) return false; + + var paramNames = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_0__PatternUtils__['a' /* getParamNames */], + )(route.path); + + return paramNames.some(function (paramName) { + return prevState.params[paramName] !== nextState.params[paramName]; + }); + } + + /** + * Returns an object of { leaveRoutes, changeRoutes, enterRoutes } determined by + * the change from prevState to nextState. We leave routes if either + * 1) they are not in the next state or 2) they are in the next state + * but their params have changed (i.e. /users/123 => /users/456). + * + * leaveRoutes are ordered starting at the leaf route of the tree + * we're leaving up to the common parent route. enterRoutes are ordered + * from the top of the tree we're entering down to the leaf route. + * + * changeRoutes are any routes that didn't leave or enter during + * the transition. + */ + function computeChangedRoutes(prevState, nextState) { + var prevRoutes = prevState && prevState.routes; + var nextRoutes = nextState.routes; + + var leaveRoutes = void 0, + changeRoutes = void 0, + enterRoutes = void 0; + if (prevRoutes) { + var parentIsLeaving = false; + leaveRoutes = prevRoutes.filter(function (route) { + if (parentIsLeaving) { + return true; + } else { + var isLeaving = + nextRoutes.indexOf(route) === -1 || routeParamsChanged(route, prevState, nextState); + if (isLeaving) parentIsLeaving = true; + return isLeaving; + } + }); + + // onLeave hooks start at the leaf route. + leaveRoutes.reverse(); + + enterRoutes = []; + changeRoutes = []; + + nextRoutes.forEach(function (route) { + var isNew = prevRoutes.indexOf(route) === -1; + var paramsChanged = leaveRoutes.indexOf(route) !== -1; + + if (isNew || paramsChanged) enterRoutes.push(route); + else changeRoutes.push(route); + }); + } else { + leaveRoutes = []; + changeRoutes = []; + enterRoutes = nextRoutes; + } + + return { + leaveRoutes: leaveRoutes, + changeRoutes: changeRoutes, + enterRoutes: enterRoutes, + }; + } + + /* harmony default export */ __webpack_exports__['a'] = computeChangedRoutes; + + /***/ + }, + /* 847 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__AsyncUtils__ = __webpack_require__(221); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__PromiseUtils__ = __webpack_require__(357); + + function getComponentsForRoute(nextState, route, callback) { + if (route.component || route.components) { + callback(null, route.component || route.components); + return; + } + + var getComponent = route.getComponent || route.getComponents; + if (getComponent) { + var componentReturn = getComponent.call(route, nextState, callback); + if ( + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__PromiseUtils__['a' /* isPromise */])( + componentReturn, + ) + ) + componentReturn.then(function (component) { + return callback(null, component); + }, callback); + } else { + callback(); + } + } + + /** + * Asynchronously fetches all components needed for the given router + * state and calls callback(error, components) when finished. + * + * Note: This operation may finish synchronously if no routes have an + * asynchronous getComponents method. + */ + function getComponents(nextState, callback) { + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__AsyncUtils__['a' /* mapAsync */])( + nextState.routes, + function (route, index, callback) { + getComponentsForRoute(nextState, route, callback); + }, + callback, + ); + } + + /* harmony default export */ __webpack_exports__['a'] = getComponents; + + /***/ + }, + /* 848 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__PatternUtils__ = __webpack_require__(106); + + /** + * Extracts an object of params the given route cares about from + * the given params object. + */ + function getRouteParams(route, params) { + var routeParams = {}; + + if (!route.path) return routeParams; + + __webpack_require__ + .i(__WEBPACK_IMPORTED_MODULE_0__PatternUtils__['a' /* getParamNames */])(route.path) + .forEach(function (p) { + if (Object.prototype.hasOwnProperty.call(params, p)) { + routeParams[p] = params[p]; + } + }); + + return routeParams; + } + + /* harmony default export */ __webpack_exports__['a'] = getRouteParams; + + /***/ + }, + /* 849 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_createHashHistory__ = + __webpack_require__(727); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_createHashHistory___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_history_lib_createHashHistory__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__createRouterHistory__ = __webpack_require__(361); + + /* unused harmony default export */ var _unused_webpack_default_export = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_1__createRouterHistory__['a' /* default */], + )(__WEBPACK_IMPORTED_MODULE_0_history_lib_createHashHistory___default.a); + + /***/ + }, + /* 850 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__PatternUtils__ = __webpack_require__(106); + /* harmony export (immutable) */ __webpack_exports__['a'] = isActive; + var _typeof = + typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' + ? function (obj) { + return typeof obj; + } + : function (obj) { + return obj && + typeof Symbol === 'function' && + obj.constructor === Symbol && + obj !== Symbol.prototype + ? 'symbol' + : typeof obj; + }; + + function deepEqual(a, b) { + if (a == b) return true; + + if (a == null || b == null) return false; + + if (Array.isArray(a)) { + return ( + Array.isArray(b) && + a.length === b.length && + a.every(function (item, index) { + return deepEqual(item, b[index]); + }) + ); + } + + if ((typeof a === 'undefined' ? 'undefined' : _typeof(a)) === 'object') { + for (var p in a) { + if (!Object.prototype.hasOwnProperty.call(a, p)) { + continue; + } + + if (a[p] === undefined) { + if (b[p] !== undefined) { + return false; + } + } else if (!Object.prototype.hasOwnProperty.call(b, p)) { + return false; + } else if (!deepEqual(a[p], b[p])) { + return false; + } + } + + return true; + } + + return String(a) === String(b); + } + + /** + * Returns true if the current pathname matches the supplied one, net of + * leading and trailing slash normalization. This is sufficient for an + * indexOnly route match. + */ + function pathIsActive(pathname, currentPathname) { + // Normalize leading slash for consistency. Leading slash on pathname has + // already been normalized in isActive. See caveat there. + if (currentPathname.charAt(0) !== '/') { + currentPathname = '/' + currentPathname; + } + + // Normalize the end of both path names too. Maybe `/foo/` shouldn't show + // `/foo` as active, but in this case, we would already have failed the + // match. + if (pathname.charAt(pathname.length - 1) !== '/') { + pathname += '/'; + } + if (currentPathname.charAt(currentPathname.length - 1) !== '/') { + currentPathname += '/'; + } + + return currentPathname === pathname; + } + + /** + * Returns true if the given pathname matches the active routes and params. + */ + function routeIsActive(pathname, routes, params) { + var remainingPathname = pathname, + paramNames = [], + paramValues = []; + + // for...of would work here but it's probably slower post-transpilation. + for (var i = 0, len = routes.length; i < len; ++i) { + var route = routes[i]; + var pattern = route.path || ''; + + if (pattern.charAt(0) === '/') { + remainingPathname = pathname; + paramNames = []; + paramValues = []; + } + + if (remainingPathname !== null && pattern) { + var matched = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_0__PatternUtils__['b' /* matchPattern */], + )(pattern, remainingPathname); + if (matched) { + remainingPathname = matched.remainingPathname; + paramNames = [].concat(paramNames, matched.paramNames); + paramValues = [].concat(paramValues, matched.paramValues); + } else { + remainingPathname = null; + } + + if (remainingPathname === '') { + // We have an exact match on the route. Just check that all the params + // match. + // FIXME: This doesn't work on repeated params. + return paramNames.every(function (paramName, index) { + return String(paramValues[index]) === String(params[paramName]); + }); + } + } + } + + return false; + } + + /** + * Returns true if all key/value pairs in the given query are + * currently active. + */ + function queryIsActive(query, activeQuery) { + if (activeQuery == null) return query == null; + + if (query == null) return true; + + return deepEqual(query, activeQuery); + } + + /** + * Returns true if a <Link> to the given pathname/query combination is + * currently active. + */ + function isActive(_ref, indexOnly, currentLocation, routes, params) { + var pathname = _ref.pathname, + query = _ref.query; + + if (currentLocation == null) return false; + + // TODO: This is a bit ugly. It keeps around support for treating pathnames + // without preceding slashes as absolute paths, but possibly also works + // around the same quirks with basenames as in matchRoutes. + if (pathname.charAt(0) !== '/') { + pathname = '/' + pathname; + } + + if (!pathIsActive(pathname, currentLocation.pathname)) { + // The path check is necessary and sufficient for indexOnly, but otherwise + // we still need to check the routes. + if (indexOnly || !routeIsActive(pathname, routes, params)) { + return false; + } + } + + return queryIsActive(query, currentLocation.query); + } + + /***/ + }, + /* 851 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_Actions__ = __webpack_require__(146); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_Actions___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_history_lib_Actions__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(23); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_invariant__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__createMemoryHistory__ = __webpack_require__(360); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__createTransitionManager__ = + __webpack_require__(362); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__RouteUtils__ = __webpack_require__(70); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__RouterUtils__ = __webpack_require__(359); + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + function _objectWithoutProperties(obj, keys) { + var target = {}; + for (var i in obj) { + if (keys.indexOf(i) >= 0) continue; + if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; + target[i] = obj[i]; + } + return target; + } + + /** + * A high-level API to be used for server-side rendering. + * + * This function matches a location to a set of routes and calls + * callback(error, redirectLocation, renderProps) when finished. + * + * Note: You probably don't want to use this in a browser unless you're using + * server-side rendering with async routes. + */ + function match(_ref, callback) { + var history = _ref.history, + routes = _ref.routes, + location = _ref.location, + options = _objectWithoutProperties(_ref, ['history', 'routes', 'location']); + + !(history || location) + ? true + ? __WEBPACK_IMPORTED_MODULE_1_invariant___default()(false, 'match needs a history or a location') + : invariant(false) + : void 0; + + history = history + ? history + : __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__createMemoryHistory__['a' /* default */])( + options, + ); + var transitionManager = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_3__createTransitionManager__['a' /* default */], + )( + history, + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__RouteUtils__['b' /* createRoutes */])(routes), + ); + + if (location) { + // Allow match({ location: '/the/path', ... }) + location = history.createLocation(location); + } else { + location = history.getCurrentLocation(); + } + + transitionManager.match(location, function (error, redirectLocation, nextState) { + var renderProps = void 0; + + if (nextState) { + var router = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_5__RouterUtils__['a' /* createRouterObject */], + )(history, transitionManager, nextState); + renderProps = _extends({}, nextState, { + router: router, + matchContext: { transitionManager: transitionManager, router: router }, + }); + } + + callback( + error, + redirectLocation && + history.createLocation( + redirectLocation, + __WEBPACK_IMPORTED_MODULE_0_history_lib_Actions__['REPLACE'], + ), + renderProps, + ); + }); + } + + /* harmony default export */ __webpack_exports__['a'] = match; + + /***/ + }, + /* 852 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__AsyncUtils__ = __webpack_require__(221); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__PromiseUtils__ = __webpack_require__(357); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__PatternUtils__ = __webpack_require__(106); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__routerWarning__ = __webpack_require__(107); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__RouteUtils__ = __webpack_require__(70); + /* harmony export (immutable) */ __webpack_exports__['a'] = matchRoutes; + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + function getChildRoutes(route, location, paramNames, paramValues, callback) { + if (route.childRoutes) { + return [null, route.childRoutes]; + } + if (!route.getChildRoutes) { + return []; + } + + var sync = true, + result = void 0; + + var partialNextState = { + location: location, + params: createParams(paramNames, paramValues), + }; + + var childRoutesReturn = route.getChildRoutes(partialNextState, function (error, childRoutes) { + childRoutes = + !error && + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__RouteUtils__['b' /* createRoutes */])( + childRoutes, + ); + if (sync) { + result = [error, childRoutes]; + return; + } + + callback(error, childRoutes); + }); + + if ( + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__PromiseUtils__['a' /* isPromise */])( + childRoutesReturn, + ) + ) + childRoutesReturn.then(function (childRoutes) { + return callback( + null, + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__RouteUtils__['b' /* createRoutes */])( + childRoutes, + ), + ); + }, callback); + + sync = false; + return result; // Might be undefined. + } + + function getIndexRoute(route, location, paramNames, paramValues, callback) { + if (route.indexRoute) { + callback(null, route.indexRoute); + } else if (route.getIndexRoute) { + var partialNextState = { + location: location, + params: createParams(paramNames, paramValues), + }; + + var indexRoutesReturn = route.getIndexRoute(partialNextState, function (error, indexRoute) { + callback( + error, + !error && + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__RouteUtils__['b' /* createRoutes */])( + indexRoute, + )[0], + ); + }); + + if ( + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__PromiseUtils__['a' /* isPromise */])( + indexRoutesReturn, + ) + ) + indexRoutesReturn.then(function (indexRoute) { + return callback( + null, + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__RouteUtils__['b' /* createRoutes */])( + indexRoute, + )[0], + ); + }, callback); + } else if (route.childRoutes || route.getChildRoutes) { + var onChildRoutes = function onChildRoutes(error, childRoutes) { + if (error) { + callback(error); + return; + } + + var pathless = childRoutes.filter(function (childRoute) { + return !childRoute.path; + }); + + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__AsyncUtils__['b' /* loopAsync */])( + pathless.length, + function (index, next, done) { + getIndexRoute( + pathless[index], + location, + paramNames, + paramValues, + function (error, indexRoute) { + if (error || indexRoute) { + var routes = [pathless[index]].concat( + Array.isArray(indexRoute) ? indexRoute : [indexRoute], + ); + done(error, routes); + } else { + next(); + } + }, + ); + }, + function (err, routes) { + callback(null, routes); + }, + ); + }; + + var result = getChildRoutes(route, location, paramNames, paramValues, onChildRoutes); + if (result) { + onChildRoutes.apply(undefined, result); + } + } else { + callback(); + } + } + + function assignParams(params, paramNames, paramValues) { + return paramNames.reduce(function (params, paramName, index) { + var paramValue = paramValues && paramValues[index]; + + if (Array.isArray(params[paramName])) { + params[paramName].push(paramValue); + } else if (paramName in params) { + params[paramName] = [params[paramName], paramValue]; + } else { + params[paramName] = paramValue; + } + + return params; + }, params); + } + + function createParams(paramNames, paramValues) { + return assignParams({}, paramNames, paramValues); + } + + function matchRouteDeep(route, location, remainingPathname, paramNames, paramValues, callback) { + var pattern = route.path || ''; + + if (pattern.charAt(0) === '/') { + remainingPathname = location.pathname; + paramNames = []; + paramValues = []; + } + + // Only try to match the path if the route actually has a pattern, and if + // we're not just searching for potential nested absolute paths. + if (remainingPathname !== null && pattern) { + try { + var matched = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_2__PatternUtils__['b' /* matchPattern */], + )(pattern, remainingPathname); + if (matched) { + remainingPathname = matched.remainingPathname; + paramNames = [].concat(paramNames, matched.paramNames); + paramValues = [].concat(paramValues, matched.paramValues); + } else { + remainingPathname = null; + } + } catch (error) { + callback(error); + } + + // By assumption, pattern is non-empty here, which is the prerequisite for + // actually terminating a match. + if (remainingPathname === '') { + var match = { + routes: [route], + params: createParams(paramNames, paramValues), + }; + + getIndexRoute(route, location, paramNames, paramValues, function (error, indexRoute) { + if (error) { + callback(error); + } else { + if (Array.isArray(indexRoute)) { + var _match$routes; + + true + ? __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__routerWarning__['a' /* default */])( + indexRoute.every(function (route) { + return !route.path; + }), + 'Index routes should not have paths', + ) + : void 0; + (_match$routes = match.routes).push.apply(_match$routes, indexRoute); + } else if (indexRoute) { + true + ? __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__routerWarning__['a' /* default */])( + !indexRoute.path, + 'Index routes should not have paths', + ) + : void 0; + match.routes.push(indexRoute); + } + + callback(null, match); + } + }); + + return; + } + } + + if (remainingPathname != null || route.childRoutes) { + // Either a) this route matched at least some of the path or b) + // we don't have to load this route's children asynchronously. In + // either case continue checking for matches in the subtree. + var onChildRoutes = function onChildRoutes(error, childRoutes) { + if (error) { + callback(error); + } else if (childRoutes) { + // Check the child routes to see if any of them match. + matchRoutes( + childRoutes, + location, + function (error, match) { + if (error) { + callback(error); + } else if (match) { + // A child route matched! Augment the match and pass it up the stack. + match.routes.unshift(route); + callback(null, match); + } else { + callback(); + } + }, + remainingPathname, + paramNames, + paramValues, + ); + } else { + callback(); + } + }; + + var result = getChildRoutes(route, location, paramNames, paramValues, onChildRoutes); + if (result) { + onChildRoutes.apply(undefined, result); + } + } else { + callback(); + } + } + + /** + * Asynchronously matches the given location to a set of routes and calls + * callback(error, state) when finished. The state object will have the + * following properties: + * + * - routes An array of routes that matched, in hierarchical order + * - params An object of URL parameters + * + * Note: This operation may finish synchronously if no routes have an + * asynchronous getChildRoutes method. + */ + function matchRoutes(routes, location, callback, remainingPathname) { + var paramNames = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : []; + var paramValues = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : []; + + if (remainingPathname === undefined) { + // TODO: This is a little bit ugly, but it works around a quirk in history + // that strips the leading slash from pathnames when using basenames with + // trailing slashes. + if (location.pathname.charAt(0) !== '/') { + location = _extends({}, location, { + pathname: '/' + location.pathname, + }); + } + remainingPathname = location.pathname; + } + + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__AsyncUtils__['b' /* loopAsync */])( + routes.length, + function (index, next, done) { + matchRouteDeep( + routes[index], + location, + remainingPathname, + paramNames, + paramValues, + function (error, match) { + if (error || match) { + done(error, match); + } else { + next(); + } + }, + ); + }, + callback, + ); + } + + /***/ + }, + /* 853 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant__ = __webpack_require__(23); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_invariant__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_create_react_class__ = __webpack_require__(59); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_create_react_class___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_create_react_class__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_hoist_non_react_statics__ = + __webpack_require__(307); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_hoist_non_react_statics___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_hoist_non_react_statics__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__ContextUtils__ = __webpack_require__(222); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__PropTypes__ = __webpack_require__(223); + /* unused harmony export default */ + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + function getDisplayName(WrappedComponent) { + return WrappedComponent.displayName || WrappedComponent.name || 'Component'; + } + + function withRouter(WrappedComponent, options) { + var withRef = options && options.withRef; + + var WithRouter = __WEBPACK_IMPORTED_MODULE_2_create_react_class___default()({ + displayName: 'WithRouter', + + mixins: [ + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__ContextUtils__['b' /* ContextSubscriber */])( + 'router', + ), + ], + + contextTypes: { router: __WEBPACK_IMPORTED_MODULE_5__PropTypes__['a' /* routerShape */] }, + propTypes: { router: __WEBPACK_IMPORTED_MODULE_5__PropTypes__['a' /* routerShape */] }, + + getWrappedInstance: function getWrappedInstance() { + !withRef + ? true + ? __WEBPACK_IMPORTED_MODULE_0_invariant___default()( + false, + 'To access the wrapped instance, you need to specify ' + + '`{ withRef: true }` as the second argument of the withRouter() call.', + ) + : invariant(false) + : void 0; + + return this.wrappedInstance; + }, + render: function render() { + var _this = this; + + var router = this.props.router || this.context.router; + if (!router) { + return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + WrappedComponent, + this.props, + ); + } + + var params = router.params, + location = router.location, + routes = router.routes; + + var props = _extends({}, this.props, { + router: router, + params: params, + location: location, + routes: routes, + }); + + if (withRef) { + props.ref = function (c) { + _this.wrappedInstance = c; + }; + } + + return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(WrappedComponent, props); + }, + }); + + WithRouter.displayName = 'withRouter(' + getDisplayName(WrappedComponent) + ')'; + WithRouter.WrappedComponent = WrappedComponent; + + return __WEBPACK_IMPORTED_MODULE_3_hoist_non_react_statics___default()(WithRouter, WrappedComponent); + } + + /***/ + }, + /* 854 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + + if (true) { + var invariant = __webpack_require__(3); + var warning = __webpack_require__(4); + var ReactPropTypesSecret = __webpack_require__(364); + var loggedTypeFailures = {}; + } + + /** + * Assert that the values match with the type specs. + * Error messages are memorized and will only be shown once. + * + * @param {object} typeSpecs Map of name to a ReactPropType + * @param {object} values Runtime values that need to be type-checked + * @param {string} location e.g. "prop", "context", "child context" + * @param {string} componentName Name of the component for error messages. + * @param {?Function} getStack Returns the component stack. + * @private + */ + function checkPropTypes(typeSpecs, values, location, componentName, getStack) { + if (true) { + for (var typeSpecName in typeSpecs) { + if (typeSpecs.hasOwnProperty(typeSpecName)) { + var error; + // Prop type validation may throw. In case they do, we don't want to + // fail the render phase where it didn't fail before. So we log it. + // After these have been cleaned up, we'll let them throw. + try { + // This is intentionally an invariant that gets caught. It's the same + // behavior as without this statement except with a better message. + invariant( + typeof typeSpecs[typeSpecName] === 'function', + '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', + componentName || 'React class', + location, + typeSpecName, + ); + error = typeSpecs[typeSpecName]( + values, + typeSpecName, + componentName, + location, + null, + ReactPropTypesSecret, + ); + } catch (ex) { + error = ex; + } + warning( + !error || error instanceof Error, + '%s: type specification of %s `%s` is invalid; the type checker ' + + 'function must return `null` or an `Error` but returned a %s. ' + + 'You may have forgotten to pass an argument to the type checker ' + + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + + 'shape all require an argument).', + componentName || 'React class', + location, + typeSpecName, + typeof error, + ); + if (error instanceof Error && !(error.message in loggedTypeFailures)) { + // Only monitor this failure once because there tends to be a lot of the + // same error. + loggedTypeFailures[error.message] = true; + + var stack = getStack ? getStack() : ''; + + warning(false, 'Failed %s type: %s%s', location, error.message, stack != null ? stack : ''); + } + } + } + } + } + + module.exports = checkPropTypes; + + /***/ + }, + /* 855 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + + var emptyFunction = __webpack_require__(22); + var invariant = __webpack_require__(3); + var warning = __webpack_require__(4); + + var ReactPropTypesSecret = __webpack_require__(364); + var checkPropTypes = __webpack_require__(854); + + module.exports = function (isValidElement, throwOnDirectAccess) { + /* global Symbol */ + var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; + var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec. + + /** + * Returns the iterator method function contained on the iterable object. + * + * Be sure to invoke the function with the iterable as context: + * + * var iteratorFn = getIteratorFn(myIterable); + * if (iteratorFn) { + * var iterator = iteratorFn.call(myIterable); + * ... + * } + * + * @param {?object} maybeIterable + * @return {?function} + */ + function getIteratorFn(maybeIterable) { + var iteratorFn = + maybeIterable && + ((ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL]) || maybeIterable[FAUX_ITERATOR_SYMBOL]); + if (typeof iteratorFn === 'function') { + return iteratorFn; + } + } + + /** + * Collection of methods that allow declaration and validation of props that are + * supplied to React components. Example usage: + * + * var Props = require('ReactPropTypes'); + * var MyArticle = React.createClass({ + * propTypes: { + * // An optional string prop named "description". + * description: Props.string, + * + * // A required enum prop named "category". + * category: Props.oneOf(['News','Photos']).isRequired, + * + * // A prop named "dialog" that requires an instance of Dialog. + * dialog: Props.instanceOf(Dialog).isRequired + * }, + * render: function() { ... } + * }); + * + * A more formal specification of how these methods are used: + * + * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...) + * decl := ReactPropTypes.{type}(.isRequired)? + * + * Each and every declaration produces a function with the same signature. This + * allows the creation of custom validation functions. For example: + * + * var MyLink = React.createClass({ + * propTypes: { + * // An optional string or URI prop named "href". + * href: function(props, propName, componentName) { + * var propValue = props[propName]; + * if (propValue != null && typeof propValue !== 'string' && + * !(propValue instanceof URI)) { + * return new Error( + * 'Expected a string or an URI for ' + propName + ' in ' + + * componentName + * ); + * } + * } + * }, + * render: function() {...} + * }); + * + * @internal + */ + + var ANONYMOUS = '<<anonymous>>'; + + // Important! + // Keep this list in sync with production version in `./factoryWithThrowingShims.js`. + var ReactPropTypes = { + array: createPrimitiveTypeChecker('array'), + bool: createPrimitiveTypeChecker('boolean'), + func: createPrimitiveTypeChecker('function'), + number: createPrimitiveTypeChecker('number'), + object: createPrimitiveTypeChecker('object'), + string: createPrimitiveTypeChecker('string'), + symbol: createPrimitiveTypeChecker('symbol'), + + any: createAnyTypeChecker(), + arrayOf: createArrayOfTypeChecker, + element: createElementTypeChecker(), + instanceOf: createInstanceTypeChecker, + node: createNodeChecker(), + objectOf: createObjectOfTypeChecker, + oneOf: createEnumTypeChecker, + oneOfType: createUnionTypeChecker, + shape: createShapeTypeChecker, + }; + + /** + * inlined Object.is polyfill to avoid requiring consumers ship their own + * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is + */ + /*eslint-disable no-self-compare*/ + function is(x, y) { + // SameValue algorithm + if (x === y) { + // Steps 1-5, 7-10 + // Steps 6.b-6.e: +0 != -0 + return x !== 0 || 1 / x === 1 / y; + } else { + // Step 6.a: NaN == NaN + return x !== x && y !== y; + } + } + /*eslint-enable no-self-compare*/ + + /** + * We use an Error-like object for backward compatibility as people may call + * PropTypes directly and inspect their output. However, we don't use real + * Errors anymore. We don't inspect their stack anyway, and creating them + * is prohibitively expensive if they are created too often, such as what + * happens in oneOfType() for any type before the one that matched. + */ + function PropTypeError(message) { + this.message = message; + this.stack = ''; + } + // Make `instanceof Error` still work for returned errors. + PropTypeError.prototype = Error.prototype; + + function createChainableTypeChecker(validate) { + if (true) { + var manualPropTypeCallCache = {}; + var manualPropTypeWarningCount = 0; + } + function checkType(isRequired, props, propName, componentName, location, propFullName, secret) { + componentName = componentName || ANONYMOUS; + propFullName = propFullName || propName; + + if (secret !== ReactPropTypesSecret) { + if (throwOnDirectAccess) { + // New behavior only for users of `prop-types` package + invariant( + false, + 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' + + 'Use `PropTypes.checkPropTypes()` to call them. ' + + 'Read more at http://fb.me/use-check-prop-types', + ); + } else if ('development' !== 'production' && typeof console !== 'undefined') { + // Old behavior for people using React.PropTypes + var cacheKey = componentName + ':' + propName; + if ( + !manualPropTypeCallCache[cacheKey] && + // Avoid spamming the console because they are often not actionable except for lib authors + manualPropTypeWarningCount < 3 + ) { + warning( + false, + 'You are manually calling a React.PropTypes validation ' + + 'function for the `%s` prop on `%s`. This is deprecated ' + + 'and will throw in the standalone `prop-types` package. ' + + 'You may be seeing this warning due to a third-party PropTypes ' + + 'library. See https://fb.me/react-warning-dont-call-proptypes ' + + 'for details.', + propFullName, + componentName, + ); + manualPropTypeCallCache[cacheKey] = true; + manualPropTypeWarningCount++; + } + } + } + if (props[propName] == null) { + if (isRequired) { + if (props[propName] === null) { + return new PropTypeError( + 'The ' + + location + + ' `' + + propFullName + + '` is marked as required ' + + ('in `' + componentName + '`, but its value is `null`.'), + ); + } + return new PropTypeError( + 'The ' + + location + + ' `' + + propFullName + + '` is marked as required in ' + + ('`' + componentName + '`, but its value is `undefined`.'), + ); + } + return null; + } else { + return validate(props, propName, componentName, location, propFullName); + } + } + + var chainedCheckType = checkType.bind(null, false); + chainedCheckType.isRequired = checkType.bind(null, true); + + return chainedCheckType; + } + + function createPrimitiveTypeChecker(expectedType) { + function validate(props, propName, componentName, location, propFullName, secret) { + var propValue = props[propName]; + var propType = getPropType(propValue); + if (propType !== expectedType) { + // `propValue` being instance of, say, date/regexp, pass the 'object' + // check, but we can offer a more precise error message here rather than + // 'of type `object`'. + var preciseType = getPreciseType(propValue); + + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` of type ' + + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + + ('`' + expectedType + '`.'), + ); + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createAnyTypeChecker() { + return createChainableTypeChecker(emptyFunction.thatReturnsNull); + } + + function createArrayOfTypeChecker(typeChecker) { + function validate(props, propName, componentName, location, propFullName) { + if (typeof typeChecker !== 'function') { + return new PropTypeError( + 'Property `' + + propFullName + + '` of component `' + + componentName + + '` has invalid PropType notation inside arrayOf.', + ); + } + var propValue = props[propName]; + if (!Array.isArray(propValue)) { + var propType = getPropType(propValue); + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` of type ' + + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'), + ); + } + for (var i = 0; i < propValue.length; i++) { + var error = typeChecker( + propValue, + i, + componentName, + location, + propFullName + '[' + i + ']', + ReactPropTypesSecret, + ); + if (error instanceof Error) { + return error; + } + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createElementTypeChecker() { + function validate(props, propName, componentName, location, propFullName) { + var propValue = props[propName]; + if (!isValidElement(propValue)) { + var propType = getPropType(propValue); + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` of type ' + + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'), + ); + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createInstanceTypeChecker(expectedClass) { + function validate(props, propName, componentName, location, propFullName) { + if (!(props[propName] instanceof expectedClass)) { + var expectedClassName = expectedClass.name || ANONYMOUS; + var actualClassName = getClassName(props[propName]); + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` of type ' + + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + + ('instance of `' + expectedClassName + '`.'), + ); + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createEnumTypeChecker(expectedValues) { + if (!Array.isArray(expectedValues)) { + true + ? warning(false, 'Invalid argument supplied to oneOf, expected an instance of array.') + : void 0; + return emptyFunction.thatReturnsNull; + } + + function validate(props, propName, componentName, location, propFullName) { + var propValue = props[propName]; + for (var i = 0; i < expectedValues.length; i++) { + if (is(propValue, expectedValues[i])) { + return null; + } + } + + var valuesString = JSON.stringify(expectedValues); + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` of value `' + + propValue + + '` ' + + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'), + ); + } + return createChainableTypeChecker(validate); + } + + function createObjectOfTypeChecker(typeChecker) { + function validate(props, propName, componentName, location, propFullName) { + if (typeof typeChecker !== 'function') { + return new PropTypeError( + 'Property `' + + propFullName + + '` of component `' + + componentName + + '` has invalid PropType notation inside objectOf.', + ); + } + var propValue = props[propName]; + var propType = getPropType(propValue); + if (propType !== 'object') { + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` of type ' + + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'), + ); + } + for (var key in propValue) { + if (propValue.hasOwnProperty(key)) { + var error = typeChecker( + propValue, + key, + componentName, + location, + propFullName + '.' + key, + ReactPropTypesSecret, + ); + if (error instanceof Error) { + return error; + } + } + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createUnionTypeChecker(arrayOfTypeCheckers) { + if (!Array.isArray(arrayOfTypeCheckers)) { + true + ? warning(false, 'Invalid argument supplied to oneOfType, expected an instance of array.') + : void 0; + return emptyFunction.thatReturnsNull; + } + + function validate(props, propName, componentName, location, propFullName) { + for (var i = 0; i < arrayOfTypeCheckers.length; i++) { + var checker = arrayOfTypeCheckers[i]; + if ( + checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null + ) { + return null; + } + } + + return new PropTypeError( + 'Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'), + ); + } + return createChainableTypeChecker(validate); + } + + function createNodeChecker() { + function validate(props, propName, componentName, location, propFullName) { + if (!isNode(props[propName])) { + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` supplied to ' + + ('`' + componentName + '`, expected a ReactNode.'), + ); + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createShapeTypeChecker(shapeTypes) { + function validate(props, propName, componentName, location, propFullName) { + var propValue = props[propName]; + var propType = getPropType(propValue); + if (propType !== 'object') { + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` of type `' + + propType + + '` ' + + ('supplied to `' + componentName + '`, expected `object`.'), + ); + } + for (var key in shapeTypes) { + var checker = shapeTypes[key]; + if (!checker) { + continue; + } + var error = checker( + propValue, + key, + componentName, + location, + propFullName + '.' + key, + ReactPropTypesSecret, + ); + if (error) { + return error; + } + } + return null; + } + return createChainableTypeChecker(validate); + } + + function isNode(propValue) { + switch (typeof propValue) { + case 'number': + case 'string': + case 'undefined': + return true; + case 'boolean': + return !propValue; + case 'object': + if (Array.isArray(propValue)) { + return propValue.every(isNode); + } + if (propValue === null || isValidElement(propValue)) { + return true; + } + + var iteratorFn = getIteratorFn(propValue); + if (iteratorFn) { + var iterator = iteratorFn.call(propValue); + var step; + if (iteratorFn !== propValue.entries) { + while (!(step = iterator.next()).done) { + if (!isNode(step.value)) { + return false; + } + } + } else { + // Iterator will provide entry [k,v] tuples rather than values. + while (!(step = iterator.next()).done) { + var entry = step.value; + if (entry) { + if (!isNode(entry[1])) { + return false; + } + } + } + } + } else { + return false; + } + + return true; + default: + return false; + } + } + + function isSymbol(propType, propValue) { + // Native Symbol. + if (propType === 'symbol') { + return true; + } + + // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol' + if (propValue['@@toStringTag'] === 'Symbol') { + return true; + } + + // Fallback for non-spec compliant Symbols which are polyfilled. + if (typeof Symbol === 'function' && propValue instanceof Symbol) { + return true; + } + + return false; + } + + // Equivalent of `typeof` but with special handling for array and regexp. + function getPropType(propValue) { + var propType = typeof propValue; + if (Array.isArray(propValue)) { + return 'array'; + } + if (propValue instanceof RegExp) { + // Old webkits (at least until Android 4.0) return 'function' rather than + // 'object' for typeof a RegExp. We'll normalize this here so that /bla/ + // passes PropTypes.object. + return 'object'; + } + if (isSymbol(propType, propValue)) { + return 'symbol'; + } + return propType; + } + + // This handles more types than `getPropType`. Only used for error messages. + // See `createPrimitiveTypeChecker`. + function getPreciseType(propValue) { + var propType = getPropType(propValue); + if (propType === 'object') { + if (propValue instanceof Date) { + return 'date'; + } else if (propValue instanceof RegExp) { + return 'regexp'; + } + } + return propType; + } + + // Returns class name of the object, if any. + function getClassName(propValue) { + if (!propValue.constructor || !propValue.constructor.name) { + return ANONYMOUS; + } + return propValue.constructor.name; + } + + ReactPropTypes.checkPropTypes = checkPropTypes; + ReactPropTypes.PropTypes = ReactPropTypes; + + return ReactPropTypes; + }; + + /***/ + }, + /* 856 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + var _react = __webpack_require__(1); + + var _react2 = _interopRequireDefault(_react); + + var _exenv = __webpack_require__(857); + + var _exenv2 = _interopRequireDefault(_exenv); + + var _shallowequal = __webpack_require__(885); + + var _shallowequal2 = _interopRequireDefault(_shallowequal); + + module.exports = function withSideEffect( + reducePropsToState, + handleStateChangeOnClient, + mapStateOnServer, + ) { + if (typeof reducePropsToState !== 'function') { + throw new Error('Expected reducePropsToState to be a function.'); + } + if (typeof handleStateChangeOnClient !== 'function') { + throw new Error('Expected handleStateChangeOnClient to be a function.'); + } + if (typeof mapStateOnServer !== 'undefined' && typeof mapStateOnServer !== 'function') { + throw new Error('Expected mapStateOnServer to either be undefined or a function.'); + } + + function getDisplayName(WrappedComponent) { + return WrappedComponent.displayName || WrappedComponent.name || 'Component'; + } + + return function wrap(WrappedComponent) { + if (typeof WrappedComponent !== 'function') { + throw new Error('Expected WrappedComponent to be a React component.'); + } + + var mountedInstances = []; + var state = undefined; + + function emitChange() { + state = reducePropsToState( + mountedInstances.map(function (instance) { + return instance.props; + }), + ); + + if (SideEffect.canUseDOM) { + handleStateChangeOnClient(state); + } else if (mapStateOnServer) { + state = mapStateOnServer(state); + } + } + + var SideEffect = (function (_Component) { + _inherits(SideEffect, _Component); + + function SideEffect() { + _classCallCheck(this, SideEffect); + + _Component.apply(this, arguments); + } + + SideEffect.peek = function peek() { + return state; + }; + + SideEffect.rewind = function rewind() { + if (SideEffect.canUseDOM) { + throw new Error( + 'You may only call rewind() on the server. Call peek() to read the current state.', + ); + } + + var recordedState = state; + state = undefined; + mountedInstances = []; + return recordedState; + }; + + SideEffect.prototype.shouldComponentUpdate = function shouldComponentUpdate(nextProps) { + return !_shallowequal2['default'](nextProps, this.props); + }; + + SideEffect.prototype.componentWillMount = function componentWillMount() { + mountedInstances.push(this); + emitChange(); + }; + + SideEffect.prototype.componentDidUpdate = function componentDidUpdate() { + emitChange(); + }; + + SideEffect.prototype.componentWillUnmount = function componentWillUnmount() { + var index = mountedInstances.indexOf(this); + mountedInstances.splice(index, 1); + emitChange(); + }; + + SideEffect.prototype.render = function render() { + return _react2['default'].createElement(WrappedComponent, this.props); + }; + + _createClass(SideEffect, null, [ + { + key: 'displayName', + + // Try to use displayName of wrapped component + value: 'SideEffect(' + getDisplayName(WrappedComponent) + ')', + + // Expose canUseDOM so tests can monkeypatch it + enumerable: true, + }, + { + key: 'canUseDOM', + value: _exenv2['default'].canUseDOM, + enumerable: true, + }, + ]); + + return SideEffect; + })(_react.Component); + + return SideEffect; + }; + }; + + /***/ + }, + /* 857 */ + /***/ function (module, exports, __webpack_require__) { + var __WEBPACK_AMD_DEFINE_RESULT__; /*! + Copyright (c) 2015 Jed Watson. + Based on code that is Copyright 2013-2015, Facebook, Inc. + All rights reserved. +*/ + /* global define */ + + (function () { + 'use strict'; + + var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement); + + var ExecutionEnvironment = { + canUseDOM: canUseDOM, + + canUseWorkers: typeof Worker !== 'undefined', + + canUseEventListeners: canUseDOM && !!(window.addEventListener || window.attachEvent), + + canUseViewport: canUseDOM && !!window.screen, + }; + + if (true) { + !((__WEBPACK_AMD_DEFINE_RESULT__ = function () { + return ExecutionEnvironment; + }.call(exports, __webpack_require__, exports, module)), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else if (typeof module !== 'undefined' && module.exports) { + module.exports = ExecutionEnvironment; + } else { + window.ExecutionEnvironment = ExecutionEnvironment; + } + })(); + + /***/ + }, + /* 858 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.TagCloud = undefined; + + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + var _react = __webpack_require__(1); + + var _react2 = _interopRequireDefault(_react); + + var _propTypes = __webpack_require__(864); + + var _propTypes2 = _interopRequireDefault(_propTypes); + + var _defaultRenderer = __webpack_require__(859); + + var _arrayShuffle = __webpack_require__(381); + + var _arrayShuffle2 = _interopRequireDefault(_arrayShuffle); + + var _randomcolor = __webpack_require__(746); + + var _randomcolor2 = _interopRequireDefault(_randomcolor); + + var _helpers = __webpack_require__(860); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + function _toConsumableArray(arr) { + if (Array.isArray(arr)) { + for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { + arr2[i] = arr[i]; + } + return arr2; + } else { + return Array.from(arr); + } + } + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + var eventHandlers = ['onClick', 'onDoubleClick', 'onMouseMove']; + var cloudProps = [ + 'tags', + 'shuffle', + 'renderer', + 'maxSize', + 'minSize', + 'colorOptions', + 'disableRandomColor', + ]; + + var generateColor = function generateColor(tag, _ref) { + var disableRandomColor = _ref.disableRandomColor, + colorOptions = _ref.colorOptions; + + if (tag.color) { + return tag.color; + } + if (disableRandomColor) { + return undefined; + } + return (0, _randomcolor2.default)(colorOptions); + }; + + var TagCloud = (exports.TagCloud = (function (_React$Component) { + _inherits(TagCloud, _React$Component); + + function TagCloud() { + _classCallCheck(this, TagCloud); + + return _possibleConstructorReturn( + this, + (TagCloud.__proto__ || Object.getPrototypeOf(TagCloud)).apply(this, arguments), + ); + } + + _createClass(TagCloud, [ + { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(newProps) { + var propsEqual = (0, _helpers.propertiesEqual)( + this.props, + newProps, + Object.keys(TagCloud.propTypes), + ); + var tagsEqual = (0, _helpers.arraysEqual)(newProps.tags, this.props.tags); + if (!tagsEqual || !propsEqual) { + this._populate(newProps); + } + }, + }, + { + key: 'componentWillMount', + value: function componentWillMount() { + this._populate(this.props); + }, + }, + { + key: 'render', + value: function render() { + var props = (0, _helpers.omitProps)(this.props, [].concat(cloudProps, eventHandlers)); + var tagElements = this._attachEventHandlers(); + return _react2.default.createElement('div', props, tagElements); + }, + }, + { + key: '_attachEventHandlers', + value: function _attachEventHandlers() { + var _this2 = this; + + var cloudHandlers = (0, _helpers.includeProps)(this.props, eventHandlers); + return this._data.map(function (_ref2) { + var tag = _ref2.tag, + fontSize = _ref2.fontSize, + color = _ref2.color; + + var elem = _this2.props.renderer(tag, fontSize, color); + var tagHandlers = (0, _helpers.includeProps)(elem.props, eventHandlers); + var globalHandlers = Object.keys(cloudHandlers).reduce(function (r, k) { + r[k] = function (e) { + cloudHandlers[k](tag, e); + tagHandlers[k] && tagHandlers(e); + }; + return r; + }, {}); + return _react2.default.cloneElement(elem, globalHandlers); + }); + }, + }, + { + key: '_populate', + value: function _populate(props) { + var tags = props.tags, + shuffle = props.shuffle, + minSize = props.minSize, + maxSize = props.maxSize; + + var counts = tags.map(function (tag) { + return tag.count; + }), + min = Math.min.apply(Math, _toConsumableArray(counts)), + max = Math.max.apply(Math, _toConsumableArray(counts)); + var data = tags.map(function (tag) { + return { + tag: tag, + color: generateColor(tag, props), + fontSize: (0, _helpers.fontSizeConverter)(tag.count, min, max, minSize, maxSize), + }; + }); + this._data = shuffle ? (0, _arrayShuffle2.default)(data) : data; + }, + }, + ]); + + return TagCloud; + })(_react2.default.Component)); + + TagCloud.propTypes = { + tags: _propTypes2.default.array.isRequired, + maxSize: _propTypes2.default.number.isRequired, + minSize: _propTypes2.default.number.isRequired, + shuffle: _propTypes2.default.bool, + colorOptions: _propTypes2.default.object, + disableRandomColor: _propTypes2.default.bool, + renderer: _propTypes2.default.func, + className: _propTypes2.default.string, + }; + + TagCloud.defaultProps = { + renderer: _defaultRenderer.defaultRenderer, + shuffle: true, + className: 'tag-cloud', + colorOptions: {}, + }; + + /***/ + }, + /* 859 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.defaultRenderer = undefined; + + var _react = __webpack_require__(1); + + var _react2 = _interopRequireDefault(_react); + + var _objectAssign = __webpack_require__(9); + + var _objectAssign2 = _interopRequireDefault(_objectAssign); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + var defaultRenderer = (exports.defaultRenderer = function defaultRenderer(tag, size, color) { + var fontSize = size + 'px'; + var key = tag.key || tag.value; + var style = (0, _objectAssign2.default)({}, styles, { color: color, fontSize: fontSize }); + return _react2.default.createElement( + 'span', + { className: 'tag-cloud-tag', style: style, key: key }, + tag.value, + ); + }); + + var styles = { + margin: '0px 3px', + verticalAlign: 'middle', + display: 'inline-block', + }; + + /***/ + }, + /* 860 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + /** + * Creates new object from target excluding given properties. + */ + var omitProps = (exports.omitProps = function omitProps(target, props) { + return Object.keys(target).reduce(function (r, key) { + if (!~props.indexOf(key)) { + r[key] = target[key]; + } + return r; + }, {}); + }); + + /** + * Creates new object from target including all available properties. + */ + var includeProps = (exports.includeProps = function includeProps(target, props) { + return Object.keys(target).reduce(function (r, key) { + if (~props.indexOf(key) && key in target) { + r[key] = target[key]; + } + return r; + }, {}); + }); + + /** + * Computes appropriate font size of tag. + */ + var fontSizeConverter = (exports.fontSizeConverter = function fontSizeConverter( + count, + min, + max, + minSize, + maxSize, + ) { + return Math.round(((count - min) * (maxSize - minSize)) / (max - min) + minSize); + }); + + /** + * Returns true if arrays contains the same elements. + */ + var arraysEqual = (exports.arraysEqual = function arraysEqual(arr1, arr2) { + if (arr1.length !== arr2.length) { + return false; + } + return arr1.every(function (o, i) { + return o === arr2[i]; + }); + }); + + var propertiesEqual = (exports.propertiesEqual = function propertiesEqual(o1, o2, properties) { + return properties.every(function (prop) { + return o1[prop] === o2[prop]; + }); + }); + + /***/ + }, + /* 861 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + + var _TagCloud = __webpack_require__(858); + + Object.defineProperty(exports, 'TagCloud', { + enumerable: true, + get: function get() { + return _TagCloud.TagCloud; + }, + }); + + /***/ + }, + /* 862 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + + if (true) { + var invariant = __webpack_require__(3); + var warning = __webpack_require__(4); + var ReactPropTypesSecret = __webpack_require__(365); + var loggedTypeFailures = {}; + } + + /** + * Assert that the values match with the type specs. + * Error messages are memorized and will only be shown once. + * + * @param {object} typeSpecs Map of name to a ReactPropType + * @param {object} values Runtime values that need to be type-checked + * @param {string} location e.g. "prop", "context", "child context" + * @param {string} componentName Name of the component for error messages. + * @param {?Function} getStack Returns the component stack. + * @private + */ + function checkPropTypes(typeSpecs, values, location, componentName, getStack) { + if (true) { + for (var typeSpecName in typeSpecs) { + if (typeSpecs.hasOwnProperty(typeSpecName)) { + var error; + // Prop type validation may throw. In case they do, we don't want to + // fail the render phase where it didn't fail before. So we log it. + // After these have been cleaned up, we'll let them throw. + try { + // This is intentionally an invariant that gets caught. It's the same + // behavior as without this statement except with a better message. + invariant( + typeof typeSpecs[typeSpecName] === 'function', + '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', + componentName || 'React class', + location, + typeSpecName, + ); + error = typeSpecs[typeSpecName]( + values, + typeSpecName, + componentName, + location, + null, + ReactPropTypesSecret, + ); + } catch (ex) { + error = ex; + } + warning( + !error || error instanceof Error, + '%s: type specification of %s `%s` is invalid; the type checker ' + + 'function must return `null` or an `Error` but returned a %s. ' + + 'You may have forgotten to pass an argument to the type checker ' + + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + + 'shape all require an argument).', + componentName || 'React class', + location, + typeSpecName, + typeof error, + ); + if (error instanceof Error && !(error.message in loggedTypeFailures)) { + // Only monitor this failure once because there tends to be a lot of the + // same error. + loggedTypeFailures[error.message] = true; + + var stack = getStack ? getStack() : ''; + + warning(false, 'Failed %s type: %s%s', location, error.message, stack != null ? stack : ''); + } + } + } + } + } + + module.exports = checkPropTypes; + + /***/ + }, + /* 863 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + + var emptyFunction = __webpack_require__(22); + var invariant = __webpack_require__(3); + var warning = __webpack_require__(4); + + var ReactPropTypesSecret = __webpack_require__(365); + var checkPropTypes = __webpack_require__(862); + + module.exports = function (isValidElement, throwOnDirectAccess) { + /* global Symbol */ + var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; + var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec. + + /** + * Returns the iterator method function contained on the iterable object. + * + * Be sure to invoke the function with the iterable as context: + * + * var iteratorFn = getIteratorFn(myIterable); + * if (iteratorFn) { + * var iterator = iteratorFn.call(myIterable); + * ... + * } + * + * @param {?object} maybeIterable + * @return {?function} + */ + function getIteratorFn(maybeIterable) { + var iteratorFn = + maybeIterable && + ((ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL]) || maybeIterable[FAUX_ITERATOR_SYMBOL]); + if (typeof iteratorFn === 'function') { + return iteratorFn; + } + } + + /** + * Collection of methods that allow declaration and validation of props that are + * supplied to React components. Example usage: + * + * var Props = require('ReactPropTypes'); + * var MyArticle = React.createClass({ + * propTypes: { + * // An optional string prop named "description". + * description: Props.string, + * + * // A required enum prop named "category". + * category: Props.oneOf(['News','Photos']).isRequired, + * + * // A prop named "dialog" that requires an instance of Dialog. + * dialog: Props.instanceOf(Dialog).isRequired + * }, + * render: function() { ... } + * }); + * + * A more formal specification of how these methods are used: + * + * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...) + * decl := ReactPropTypes.{type}(.isRequired)? + * + * Each and every declaration produces a function with the same signature. This + * allows the creation of custom validation functions. For example: + * + * var MyLink = React.createClass({ + * propTypes: { + * // An optional string or URI prop named "href". + * href: function(props, propName, componentName) { + * var propValue = props[propName]; + * if (propValue != null && typeof propValue !== 'string' && + * !(propValue instanceof URI)) { + * return new Error( + * 'Expected a string or an URI for ' + propName + ' in ' + + * componentName + * ); + * } + * } + * }, + * render: function() {...} + * }); + * + * @internal + */ + + var ANONYMOUS = '<<anonymous>>'; + + // Important! + // Keep this list in sync with production version in `./factoryWithThrowingShims.js`. + var ReactPropTypes = { + array: createPrimitiveTypeChecker('array'), + bool: createPrimitiveTypeChecker('boolean'), + func: createPrimitiveTypeChecker('function'), + number: createPrimitiveTypeChecker('number'), + object: createPrimitiveTypeChecker('object'), + string: createPrimitiveTypeChecker('string'), + symbol: createPrimitiveTypeChecker('symbol'), + + any: createAnyTypeChecker(), + arrayOf: createArrayOfTypeChecker, + element: createElementTypeChecker(), + instanceOf: createInstanceTypeChecker, + node: createNodeChecker(), + objectOf: createObjectOfTypeChecker, + oneOf: createEnumTypeChecker, + oneOfType: createUnionTypeChecker, + shape: createShapeTypeChecker, + }; + + /** + * inlined Object.is polyfill to avoid requiring consumers ship their own + * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is + */ + /*eslint-disable no-self-compare*/ + function is(x, y) { + // SameValue algorithm + if (x === y) { + // Steps 1-5, 7-10 + // Steps 6.b-6.e: +0 != -0 + return x !== 0 || 1 / x === 1 / y; + } else { + // Step 6.a: NaN == NaN + return x !== x && y !== y; + } + } + /*eslint-enable no-self-compare*/ + + /** + * We use an Error-like object for backward compatibility as people may call + * PropTypes directly and inspect their output. However, we don't use real + * Errors anymore. We don't inspect their stack anyway, and creating them + * is prohibitively expensive if they are created too often, such as what + * happens in oneOfType() for any type before the one that matched. + */ + function PropTypeError(message) { + this.message = message; + this.stack = ''; + } + // Make `instanceof Error` still work for returned errors. + PropTypeError.prototype = Error.prototype; + + function createChainableTypeChecker(validate) { + if (true) { + var manualPropTypeCallCache = {}; + var manualPropTypeWarningCount = 0; + } + function checkType(isRequired, props, propName, componentName, location, propFullName, secret) { + componentName = componentName || ANONYMOUS; + propFullName = propFullName || propName; + + if (secret !== ReactPropTypesSecret) { + if (throwOnDirectAccess) { + // New behavior only for users of `prop-types` package + invariant( + false, + 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' + + 'Use `PropTypes.checkPropTypes()` to call them. ' + + 'Read more at http://fb.me/use-check-prop-types', + ); + } else if ('development' !== 'production' && typeof console !== 'undefined') { + // Old behavior for people using React.PropTypes + var cacheKey = componentName + ':' + propName; + if ( + !manualPropTypeCallCache[cacheKey] && + // Avoid spamming the console because they are often not actionable except for lib authors + manualPropTypeWarningCount < 3 + ) { + warning( + false, + 'You are manually calling a React.PropTypes validation ' + + 'function for the `%s` prop on `%s`. This is deprecated ' + + 'and will throw in the standalone `prop-types` package. ' + + 'You may be seeing this warning due to a third-party PropTypes ' + + 'library. See https://fb.me/react-warning-dont-call-proptypes ' + + 'for details.', + propFullName, + componentName, + ); + manualPropTypeCallCache[cacheKey] = true; + manualPropTypeWarningCount++; + } + } + } + if (props[propName] == null) { + if (isRequired) { + if (props[propName] === null) { + return new PropTypeError( + 'The ' + + location + + ' `' + + propFullName + + '` is marked as required ' + + ('in `' + componentName + '`, but its value is `null`.'), + ); + } + return new PropTypeError( + 'The ' + + location + + ' `' + + propFullName + + '` is marked as required in ' + + ('`' + componentName + '`, but its value is `undefined`.'), + ); + } + return null; + } else { + return validate(props, propName, componentName, location, propFullName); + } + } + + var chainedCheckType = checkType.bind(null, false); + chainedCheckType.isRequired = checkType.bind(null, true); + + return chainedCheckType; + } + + function createPrimitiveTypeChecker(expectedType) { + function validate(props, propName, componentName, location, propFullName, secret) { + var propValue = props[propName]; + var propType = getPropType(propValue); + if (propType !== expectedType) { + // `propValue` being instance of, say, date/regexp, pass the 'object' + // check, but we can offer a more precise error message here rather than + // 'of type `object`'. + var preciseType = getPreciseType(propValue); + + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` of type ' + + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + + ('`' + expectedType + '`.'), + ); + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createAnyTypeChecker() { + return createChainableTypeChecker(emptyFunction.thatReturnsNull); + } + + function createArrayOfTypeChecker(typeChecker) { + function validate(props, propName, componentName, location, propFullName) { + if (typeof typeChecker !== 'function') { + return new PropTypeError( + 'Property `' + + propFullName + + '` of component `' + + componentName + + '` has invalid PropType notation inside arrayOf.', + ); + } + var propValue = props[propName]; + if (!Array.isArray(propValue)) { + var propType = getPropType(propValue); + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` of type ' + + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'), + ); + } + for (var i = 0; i < propValue.length; i++) { + var error = typeChecker( + propValue, + i, + componentName, + location, + propFullName + '[' + i + ']', + ReactPropTypesSecret, + ); + if (error instanceof Error) { + return error; + } + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createElementTypeChecker() { + function validate(props, propName, componentName, location, propFullName) { + var propValue = props[propName]; + if (!isValidElement(propValue)) { + var propType = getPropType(propValue); + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` of type ' + + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'), + ); + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createInstanceTypeChecker(expectedClass) { + function validate(props, propName, componentName, location, propFullName) { + if (!(props[propName] instanceof expectedClass)) { + var expectedClassName = expectedClass.name || ANONYMOUS; + var actualClassName = getClassName(props[propName]); + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` of type ' + + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + + ('instance of `' + expectedClassName + '`.'), + ); + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createEnumTypeChecker(expectedValues) { + if (!Array.isArray(expectedValues)) { + true + ? warning(false, 'Invalid argument supplied to oneOf, expected an instance of array.') + : void 0; + return emptyFunction.thatReturnsNull; + } + + function validate(props, propName, componentName, location, propFullName) { + var propValue = props[propName]; + for (var i = 0; i < expectedValues.length; i++) { + if (is(propValue, expectedValues[i])) { + return null; + } + } + + var valuesString = JSON.stringify(expectedValues); + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` of value `' + + propValue + + '` ' + + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'), + ); + } + return createChainableTypeChecker(validate); + } + + function createObjectOfTypeChecker(typeChecker) { + function validate(props, propName, componentName, location, propFullName) { + if (typeof typeChecker !== 'function') { + return new PropTypeError( + 'Property `' + + propFullName + + '` of component `' + + componentName + + '` has invalid PropType notation inside objectOf.', + ); + } + var propValue = props[propName]; + var propType = getPropType(propValue); + if (propType !== 'object') { + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` of type ' + + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'), + ); + } + for (var key in propValue) { + if (propValue.hasOwnProperty(key)) { + var error = typeChecker( + propValue, + key, + componentName, + location, + propFullName + '.' + key, + ReactPropTypesSecret, + ); + if (error instanceof Error) { + return error; + } + } + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createUnionTypeChecker(arrayOfTypeCheckers) { + if (!Array.isArray(arrayOfTypeCheckers)) { + true + ? warning(false, 'Invalid argument supplied to oneOfType, expected an instance of array.') + : void 0; + return emptyFunction.thatReturnsNull; + } + + function validate(props, propName, componentName, location, propFullName) { + for (var i = 0; i < arrayOfTypeCheckers.length; i++) { + var checker = arrayOfTypeCheckers[i]; + if ( + checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null + ) { + return null; + } + } + + return new PropTypeError( + 'Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'), + ); + } + return createChainableTypeChecker(validate); + } + + function createNodeChecker() { + function validate(props, propName, componentName, location, propFullName) { + if (!isNode(props[propName])) { + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` supplied to ' + + ('`' + componentName + '`, expected a ReactNode.'), + ); + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createShapeTypeChecker(shapeTypes) { + function validate(props, propName, componentName, location, propFullName) { + var propValue = props[propName]; + var propType = getPropType(propValue); + if (propType !== 'object') { + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` of type `' + + propType + + '` ' + + ('supplied to `' + componentName + '`, expected `object`.'), + ); + } + for (var key in shapeTypes) { + var checker = shapeTypes[key]; + if (!checker) { + continue; + } + var error = checker( + propValue, + key, + componentName, + location, + propFullName + '.' + key, + ReactPropTypesSecret, + ); + if (error) { + return error; + } + } + return null; + } + return createChainableTypeChecker(validate); + } + + function isNode(propValue) { + switch (typeof propValue) { + case 'number': + case 'string': + case 'undefined': + return true; + case 'boolean': + return !propValue; + case 'object': + if (Array.isArray(propValue)) { + return propValue.every(isNode); + } + if (propValue === null || isValidElement(propValue)) { + return true; + } + + var iteratorFn = getIteratorFn(propValue); + if (iteratorFn) { + var iterator = iteratorFn.call(propValue); + var step; + if (iteratorFn !== propValue.entries) { + while (!(step = iterator.next()).done) { + if (!isNode(step.value)) { + return false; + } + } + } else { + // Iterator will provide entry [k,v] tuples rather than values. + while (!(step = iterator.next()).done) { + var entry = step.value; + if (entry) { + if (!isNode(entry[1])) { + return false; + } + } + } + } + } else { + return false; + } + + return true; + default: + return false; + } + } + + function isSymbol(propType, propValue) { + // Native Symbol. + if (propType === 'symbol') { + return true; + } + + // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol' + if (propValue['@@toStringTag'] === 'Symbol') { + return true; + } + + // Fallback for non-spec compliant Symbols which are polyfilled. + if (typeof Symbol === 'function' && propValue instanceof Symbol) { + return true; + } + + return false; + } + + // Equivalent of `typeof` but with special handling for array and regexp. + function getPropType(propValue) { + var propType = typeof propValue; + if (Array.isArray(propValue)) { + return 'array'; + } + if (propValue instanceof RegExp) { + // Old webkits (at least until Android 4.0) return 'function' rather than + // 'object' for typeof a RegExp. We'll normalize this here so that /bla/ + // passes PropTypes.object. + return 'object'; + } + if (isSymbol(propType, propValue)) { + return 'symbol'; + } + return propType; + } + + // This handles more types than `getPropType`. Only used for error messages. + // See `createPrimitiveTypeChecker`. + function getPreciseType(propValue) { + var propType = getPropType(propValue); + if (propType === 'object') { + if (propValue instanceof Date) { + return 'date'; + } else if (propValue instanceof RegExp) { + return 'regexp'; + } + } + return propType; + } + + // Returns class name of the object, if any. + function getClassName(propValue) { + if (!propValue.constructor || !propValue.constructor.name) { + return ANONYMOUS; + } + return propValue.constructor.name; + } + + ReactPropTypes.checkPropTypes = checkPropTypes; + ReactPropTypes.PropTypes = ReactPropTypes; + + return ReactPropTypes; + }; + + /***/ + }, + /* 864 */ + /***/ function (module, exports, __webpack_require__) { + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + + if (true) { + var REACT_ELEMENT_TYPE = + (typeof Symbol === 'function' && Symbol.for && Symbol.for('react.element')) || 0xeac7; + + var isValidElement = function (object) { + return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; + }; + + // By explicitly using `prop-types` you are opting into new development behavior. + // http://fb.me/prop-types-in-prod + var throwOnDirectAccess = true; + module.exports = __webpack_require__(863)(isValidElement, throwOnDirectAccess); + } else { + // By explicitly using `prop-types` you are opting into new production behavior. + // http://fb.me/prop-types-in-prod + module.exports = require('./factoryWithThrowingShims')(); + } + + /***/ + }, + /* 865 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + var _prodInvariant = __webpack_require__(87); + + var invariant = __webpack_require__(3); + + /** + * Static poolers. Several custom versions for each potential number of + * arguments. A completely generic pooler is easy to implement, but would + * require accessing the `arguments` object. In each of these, `this` refers to + * the Class itself, not an instance. If any others are needed, simply add them + * here, or in their own files. + */ + var oneArgumentPooler = function (copyFieldsFrom) { + var Klass = this; + if (Klass.instancePool.length) { + var instance = Klass.instancePool.pop(); + Klass.call(instance, copyFieldsFrom); + return instance; + } else { + return new Klass(copyFieldsFrom); + } + }; + + var twoArgumentPooler = function (a1, a2) { + var Klass = this; + if (Klass.instancePool.length) { + var instance = Klass.instancePool.pop(); + Klass.call(instance, a1, a2); + return instance; + } else { + return new Klass(a1, a2); + } + }; + + var threeArgumentPooler = function (a1, a2, a3) { + var Klass = this; + if (Klass.instancePool.length) { + var instance = Klass.instancePool.pop(); + Klass.call(instance, a1, a2, a3); + return instance; + } else { + return new Klass(a1, a2, a3); + } + }; + + var fourArgumentPooler = function (a1, a2, a3, a4) { + var Klass = this; + if (Klass.instancePool.length) { + var instance = Klass.instancePool.pop(); + Klass.call(instance, a1, a2, a3, a4); + return instance; + } else { + return new Klass(a1, a2, a3, a4); + } + }; + + var standardReleaser = function (instance) { + var Klass = this; + !(instance instanceof Klass) + ? true + ? invariant(false, 'Trying to release an instance into a pool of a different type.') + : _prodInvariant('25') + : void 0; + instance.destructor(); + if (Klass.instancePool.length < Klass.poolSize) { + Klass.instancePool.push(instance); + } + }; + + var DEFAULT_POOL_SIZE = 10; + var DEFAULT_POOLER = oneArgumentPooler; + + /** + * Augments `CopyConstructor` to be a poolable class, augmenting only the class + * itself (statically) not adding any prototypical fields. Any CopyConstructor + * you give this may have a `poolSize` property, and will look for a + * prototypical `destructor` on instances. + * + * @param {Function} CopyConstructor Constructor that can be used to reset. + * @param {Function} pooler Customizable pooler. + */ + var addPoolingTo = function (CopyConstructor, pooler) { + // Casting as any so that flow ignores the actual implementation and trusts + // it to match the type we declared + var NewKlass = CopyConstructor; + NewKlass.instancePool = []; + NewKlass.getPooled = pooler || DEFAULT_POOLER; + if (!NewKlass.poolSize) { + NewKlass.poolSize = DEFAULT_POOL_SIZE; + } + NewKlass.release = standardReleaser; + return NewKlass; + }; + + var PooledClass = { + addPoolingTo: addPoolingTo, + oneArgumentPooler: oneArgumentPooler, + twoArgumentPooler: twoArgumentPooler, + threeArgumentPooler: threeArgumentPooler, + fourArgumentPooler: fourArgumentPooler, + }; + + module.exports = PooledClass; + + /***/ + }, + /* 866 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var ReactDOM = __webpack_require__(206); + + exports.getReactDOM = function () { + return ReactDOM; + }; + + if (true) { + var ReactPerf; + var ReactTestUtils; + + exports.getReactPerf = function () { + if (!ReactPerf) { + ReactPerf = __webpack_require__(783); + } + return ReactPerf; + }; + + exports.getReactTestUtils = function () { + if (!ReactTestUtils) { + ReactTestUtils = __webpack_require__(790); + } + return ReactTestUtils; + }; + } + + /***/ + }, + /* 867 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var _assign = __webpack_require__(9); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + var React = __webpack_require__(38); + var propTypesFactory = __webpack_require__(101); + var PropTypes = propTypesFactory(React.isValidElement); + + var ReactTransitionGroup = __webpack_require__(877); + var ReactCSSTransitionGroupChild = __webpack_require__(868); + + function createTransitionTimeoutPropValidator(transitionType) { + var timeoutPropName = 'transition' + transitionType + 'Timeout'; + var enabledPropName = 'transition' + transitionType; + + return function (props) { + // If the transition is enabled + if (props[enabledPropName]) { + // If no timeout duration is provided + if (props[timeoutPropName] == null) { + return new Error( + timeoutPropName + + " wasn't supplied to ReactCSSTransitionGroup: " + + "this can cause unreliable animations and won't be supported in " + + 'a future version of React. See ' + + 'https://fb.me/react-animation-transition-group-timeout for more ' + + 'information.', + ); + + // If the duration isn't a number + } else if (typeof props[timeoutPropName] !== 'number') { + return new Error(timeoutPropName + ' must be a number (in milliseconds)'); + } + } + }; + } + + /** + * An easy way to perform CSS transitions and animations when a React component + * enters or leaves the DOM. + * See https://facebook.github.io/react/docs/animation.html#high-level-api-reactcsstransitiongroup + */ + + var ReactCSSTransitionGroup = (function (_React$Component) { + _inherits(ReactCSSTransitionGroup, _React$Component); + + function ReactCSSTransitionGroup() { + var _temp, _this, _ret; + + _classCallCheck(this, ReactCSSTransitionGroup); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return ( + (_ret = + ((_temp = + ((_this = _possibleConstructorReturn( + this, + _React$Component.call.apply(_React$Component, [this].concat(args)), + )), + _this)), + (_this._wrapChild = function (child) { + // We need to provide this childFactory so that + // ReactCSSTransitionGroupChild can receive updates to name, enter, and + // leave while it is leaving. + return React.createElement( + ReactCSSTransitionGroupChild, + { + name: _this.props.transitionName, + appear: _this.props.transitionAppear, + enter: _this.props.transitionEnter, + leave: _this.props.transitionLeave, + appearTimeout: _this.props.transitionAppearTimeout, + enterTimeout: _this.props.transitionEnterTimeout, + leaveTimeout: _this.props.transitionLeaveTimeout, + }, + child, + ); + }), + _temp)), + _possibleConstructorReturn(_this, _ret) + ); + } + + ReactCSSTransitionGroup.prototype.render = function render() { + return React.createElement( + ReactTransitionGroup, + _assign({}, this.props, { childFactory: this._wrapChild }), + ); + }; + + return ReactCSSTransitionGroup; + })(React.Component); + + ReactCSSTransitionGroup.displayName = 'ReactCSSTransitionGroup'; + ReactCSSTransitionGroup.propTypes = { + transitionName: ReactCSSTransitionGroupChild.propTypes.name, + + transitionAppear: PropTypes.bool, + transitionEnter: PropTypes.bool, + transitionLeave: PropTypes.bool, + transitionAppearTimeout: createTransitionTimeoutPropValidator('Appear'), + transitionEnterTimeout: createTransitionTimeoutPropValidator('Enter'), + transitionLeaveTimeout: createTransitionTimeoutPropValidator('Leave'), + }; + ReactCSSTransitionGroup.defaultProps = { + transitionAppear: false, + transitionEnter: true, + transitionLeave: true, + }; + + module.exports = ReactCSSTransitionGroup; + + /***/ + }, + /* 868 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + var React = __webpack_require__(38); + var ReactAddonsDOMDependencies = __webpack_require__(866); + + var propTypesFactory = __webpack_require__(101); + var PropTypes = propTypesFactory(React.isValidElement); + + var CSSCore = __webpack_require__(708); + var ReactTransitionEvents = __webpack_require__(876); + + var onlyChild = __webpack_require__(372); + + var TICK = 17; + + var ReactCSSTransitionGroupChild = (function (_React$Component) { + _inherits(ReactCSSTransitionGroupChild, _React$Component); + + function ReactCSSTransitionGroupChild() { + var _temp, _this, _ret; + + _classCallCheck(this, ReactCSSTransitionGroupChild); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return ( + (_ret = + ((_temp = + ((_this = _possibleConstructorReturn( + this, + _React$Component.call.apply(_React$Component, [this].concat(args)), + )), + _this)), + (_this._isMounted = false), + (_this.transition = function (animationType, finishCallback, userSpecifiedDelay) { + var node = ReactAddonsDOMDependencies.getReactDOM().findDOMNode(_this); + + if (!node) { + if (finishCallback) { + finishCallback(); + } + return; + } + + var className = _this.props.name[animationType] || _this.props.name + '-' + animationType; + var activeClassName = _this.props.name[animationType + 'Active'] || className + '-active'; + var timeout = null; + + var endListener = function (e) { + if (e && e.target !== node) { + return; + } + + clearTimeout(timeout); + + CSSCore.removeClass(node, className); + CSSCore.removeClass(node, activeClassName); + + ReactTransitionEvents.removeEndEventListener(node, endListener); + + // Usually this optional callback is used for informing an owner of + // a leave animation and telling it to remove the child. + if (finishCallback) { + finishCallback(); + } + }; + + CSSCore.addClass(node, className); + + // Need to do this to actually trigger a transition. + _this.queueClassAndNode(activeClassName, node); + + // If the user specified a timeout delay. + if (userSpecifiedDelay) { + // Clean-up the animation after the specified delay + timeout = setTimeout(endListener, userSpecifiedDelay); + _this.transitionTimeouts.push(timeout); + } else { + // DEPRECATED: this listener will be removed in a future version of react + ReactTransitionEvents.addEndEventListener(node, endListener); + } + }), + (_this.queueClassAndNode = function (className, node) { + _this.classNameAndNodeQueue.push({ + className: className, + node: node, + }); + + if (!_this.timeout) { + _this.timeout = setTimeout(_this.flushClassNameAndNodeQueue, TICK); + } + }), + (_this.flushClassNameAndNodeQueue = function () { + if (_this._isMounted) { + _this.classNameAndNodeQueue.forEach(function (obj) { + CSSCore.addClass(obj.node, obj.className); + }); + } + _this.classNameAndNodeQueue.length = 0; + _this.timeout = null; + }), + (_this.componentWillAppear = function (done) { + if (_this.props.appear) { + _this.transition('appear', done, _this.props.appearTimeout); + } else { + done(); + } + }), + (_this.componentWillEnter = function (done) { + if (_this.props.enter) { + _this.transition('enter', done, _this.props.enterTimeout); + } else { + done(); + } + }), + (_this.componentWillLeave = function (done) { + if (_this.props.leave) { + _this.transition('leave', done, _this.props.leaveTimeout); + } else { + done(); + } + }), + _temp)), + _possibleConstructorReturn(_this, _ret) + ); + } + + ReactCSSTransitionGroupChild.prototype.componentWillMount = function componentWillMount() { + this.classNameAndNodeQueue = []; + this.transitionTimeouts = []; + }; + + ReactCSSTransitionGroupChild.prototype.componentDidMount = function componentDidMount() { + this._isMounted = true; + }; + + ReactCSSTransitionGroupChild.prototype.componentWillUnmount = function componentWillUnmount() { + this._isMounted = false; + + if (this.timeout) { + clearTimeout(this.timeout); + } + this.transitionTimeouts.forEach(function (timeout) { + clearTimeout(timeout); + }); + + this.classNameAndNodeQueue.length = 0; + }; + + ReactCSSTransitionGroupChild.prototype.render = function render() { + return onlyChild(this.props.children); + }; + + return ReactCSSTransitionGroupChild; + })(React.Component); + + ReactCSSTransitionGroupChild.propTypes = { + name: PropTypes.oneOfType([ + PropTypes.string, + PropTypes.shape({ + enter: PropTypes.string, + leave: PropTypes.string, + active: PropTypes.string, + }), + PropTypes.shape({ + enter: PropTypes.string, + enterActive: PropTypes.string, + leave: PropTypes.string, + leaveActive: PropTypes.string, + appear: PropTypes.string, + appearActive: PropTypes.string, + }), + ]).isRequired, + + // Once we require timeouts to be specified, we can remove the + // boolean flags (appear etc.) and just accept a number + // or a bool for the timeout flags (appearTimeout etc.) + appear: PropTypes.bool, + enter: PropTypes.bool, + leave: PropTypes.bool, + appearTimeout: PropTypes.number, + enterTimeout: PropTypes.number, + leaveTimeout: PropTypes.number, + }; + + module.exports = ReactCSSTransitionGroupChild; + + /***/ + }, + /* 869 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var PooledClass = __webpack_require__(865); + var ReactElement = __webpack_require__(86); + + var emptyFunction = __webpack_require__(22); + var traverseAllChildren = __webpack_require__(373); + + var twoArgumentPooler = PooledClass.twoArgumentPooler; + var fourArgumentPooler = PooledClass.fourArgumentPooler; + + var userProvidedKeyEscapeRegex = /\/+/g; + function escapeUserProvidedKey(text) { + return ('' + text).replace(userProvidedKeyEscapeRegex, '$&/'); + } + + /** + * PooledClass representing the bookkeeping associated with performing a child + * traversal. Allows avoiding binding callbacks. + * + * @constructor ForEachBookKeeping + * @param {!function} forEachFunction Function to perform traversal with. + * @param {?*} forEachContext Context to perform context with. + */ + function ForEachBookKeeping(forEachFunction, forEachContext) { + this.func = forEachFunction; + this.context = forEachContext; + this.count = 0; + } + ForEachBookKeeping.prototype.destructor = function () { + this.func = null; + this.context = null; + this.count = 0; + }; + PooledClass.addPoolingTo(ForEachBookKeeping, twoArgumentPooler); + + function forEachSingleChild(bookKeeping, child, name) { + var func = bookKeeping.func, + context = bookKeeping.context; + + func.call(context, child, bookKeeping.count++); + } + + /** + * Iterates through children that are typically specified as `props.children`. + * + * See https://facebook.github.io/react/docs/top-level-api.html#react.children.foreach + * + * The provided forEachFunc(child, index) will be called for each + * leaf child. + * + * @param {?*} children Children tree container. + * @param {function(*, int)} forEachFunc + * @param {*} forEachContext Context for forEachContext. + */ + function forEachChildren(children, forEachFunc, forEachContext) { + if (children == null) { + return children; + } + var traverseContext = ForEachBookKeeping.getPooled(forEachFunc, forEachContext); + traverseAllChildren(children, forEachSingleChild, traverseContext); + ForEachBookKeeping.release(traverseContext); + } + + /** + * PooledClass representing the bookkeeping associated with performing a child + * mapping. Allows avoiding binding callbacks. + * + * @constructor MapBookKeeping + * @param {!*} mapResult Object containing the ordered map of results. + * @param {!function} mapFunction Function to perform mapping with. + * @param {?*} mapContext Context to perform mapping with. + */ + function MapBookKeeping(mapResult, keyPrefix, mapFunction, mapContext) { + this.result = mapResult; + this.keyPrefix = keyPrefix; + this.func = mapFunction; + this.context = mapContext; + this.count = 0; + } + MapBookKeeping.prototype.destructor = function () { + this.result = null; + this.keyPrefix = null; + this.func = null; + this.context = null; + this.count = 0; + }; + PooledClass.addPoolingTo(MapBookKeeping, fourArgumentPooler); + + function mapSingleChildIntoContext(bookKeeping, child, childKey) { + var result = bookKeeping.result, + keyPrefix = bookKeeping.keyPrefix, + func = bookKeeping.func, + context = bookKeeping.context; + + var mappedChild = func.call(context, child, bookKeeping.count++); + if (Array.isArray(mappedChild)) { + mapIntoWithKeyPrefixInternal(mappedChild, result, childKey, emptyFunction.thatReturnsArgument); + } else if (mappedChild != null) { + if (ReactElement.isValidElement(mappedChild)) { + mappedChild = ReactElement.cloneAndReplaceKey( + mappedChild, + // Keep both the (mapped) and old keys if they differ, just as + // traverseAllChildren used to do for objects as children + keyPrefix + + (mappedChild.key && (!child || child.key !== mappedChild.key) + ? escapeUserProvidedKey(mappedChild.key) + '/' + : '') + + childKey, + ); + } + result.push(mappedChild); + } + } + + function mapIntoWithKeyPrefixInternal(children, array, prefix, func, context) { + var escapedPrefix = ''; + if (prefix != null) { + escapedPrefix = escapeUserProvidedKey(prefix) + '/'; + } + var traverseContext = MapBookKeeping.getPooled(array, escapedPrefix, func, context); + traverseAllChildren(children, mapSingleChildIntoContext, traverseContext); + MapBookKeeping.release(traverseContext); + } + + /** + * Maps children that are typically specified as `props.children`. + * + * See https://facebook.github.io/react/docs/top-level-api.html#react.children.map + * + * The provided mapFunction(child, key, index) will be called for each + * leaf child. + * + * @param {?*} children Children tree container. + * @param {function(*, int)} func The map function. + * @param {*} context Context for mapFunction. + * @return {object} Object containing the ordered map of results. + */ + function mapChildren(children, func, context) { + if (children == null) { + return children; + } + var result = []; + mapIntoWithKeyPrefixInternal(children, result, null, func, context); + return result; + } + + function forEachSingleChildDummy(traverseContext, child, name) { + return null; + } + + /** + * Count the number of children that are typically specified as + * `props.children`. + * + * See https://facebook.github.io/react/docs/top-level-api.html#react.children.count + * + * @param {?*} children Children tree container. + * @return {number} The number of children. + */ + function countChildren(children, context) { + return traverseAllChildren(children, forEachSingleChildDummy, null); + } + + /** + * Flatten a children object (typically specified as `props.children`) and + * return an array with appropriately re-keyed children. + * + * See https://facebook.github.io/react/docs/top-level-api.html#react.children.toarray + */ + function toArray(children) { + var result = []; + mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument); + return result; + } + + var ReactChildren = { + forEach: forEachChildren, + map: mapChildren, + mapIntoWithKeyPrefixInternal: mapIntoWithKeyPrefixInternal, + count: countChildren, + toArray: toArray, + }; + + module.exports = ReactChildren; + + /***/ + }, + /* 870 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var _prodInvariant = __webpack_require__(87), + _assign = __webpack_require__(9); + + var ReactComponent = __webpack_require__(225); + var ReactElement = __webpack_require__(86); + var ReactPropTypeLocationNames = __webpack_require__(369); + var ReactNoopUpdateQueue = __webpack_require__(226); + + var emptyObject = __webpack_require__(66); + var invariant = __webpack_require__(3); + var warning = __webpack_require__(4); + + var MIXINS_KEY = 'mixins'; + + // Helper function to allow the creation of anonymous functions which do not + // have .name set to the name of the variable being assigned to. + function identity(fn) { + return fn; + } + + /** + * Policies that describe methods in `ReactClassInterface`. + */ + + var injectedMixins = []; + + /** + * Composite components are higher-level components that compose other composite + * or host components. + * + * To create a new type of `ReactClass`, pass a specification of + * your new class to `React.createClass`. The only requirement of your class + * specification is that you implement a `render` method. + * + * var MyComponent = React.createClass({ + * render: function() { + * return <div>Hello World</div>; + * } + * }); + * + * The class specification supports a specific protocol of methods that have + * special meaning (e.g. `render`). See `ReactClassInterface` for + * more the comprehensive protocol. Any other properties and methods in the + * class specification will be available on the prototype. + * + * @interface ReactClassInterface + * @internal + */ + var ReactClassInterface = { + /** + * An array of Mixin objects to include when defining your component. + * + * @type {array} + * @optional + */ + mixins: 'DEFINE_MANY', + + /** + * An object containing properties and methods that should be defined on + * the component's constructor instead of its prototype (static methods). + * + * @type {object} + * @optional + */ + statics: 'DEFINE_MANY', + + /** + * Definition of prop types for this component. + * + * @type {object} + * @optional + */ + propTypes: 'DEFINE_MANY', + + /** + * Definition of context types for this component. + * + * @type {object} + * @optional + */ + contextTypes: 'DEFINE_MANY', + + /** + * Definition of context types this component sets for its children. + * + * @type {object} + * @optional + */ + childContextTypes: 'DEFINE_MANY', + + // ==== Definition methods ==== + + /** + * Invoked when the component is mounted. Values in the mapping will be set on + * `this.props` if that prop is not specified (i.e. using an `in` check). + * + * This method is invoked before `getInitialState` and therefore cannot rely + * on `this.state` or use `this.setState`. + * + * @return {object} + * @optional + */ + getDefaultProps: 'DEFINE_MANY_MERGED', + + /** + * Invoked once before the component is mounted. The return value will be used + * as the initial value of `this.state`. + * + * getInitialState: function() { + * return { + * isOn: false, + * fooBaz: new BazFoo() + * } + * } + * + * @return {object} + * @optional + */ + getInitialState: 'DEFINE_MANY_MERGED', + + /** + * @return {object} + * @optional + */ + getChildContext: 'DEFINE_MANY_MERGED', + + /** + * Uses props from `this.props` and state from `this.state` to render the + * structure of the component. + * + * No guarantees are made about when or how often this method is invoked, so + * it must not have side effects. + * + * render: function() { + * var name = this.props.name; + * return <div>Hello, {name}!</div>; + * } + * + * @return {ReactComponent} + * @required + */ + render: 'DEFINE_ONCE', + + // ==== Delegate methods ==== + + /** + * Invoked when the component is initially created and about to be mounted. + * This may have side effects, but any external subscriptions or data created + * by this method must be cleaned up in `componentWillUnmount`. + * + * @optional + */ + componentWillMount: 'DEFINE_MANY', + + /** + * Invoked when the component has been mounted and has a DOM representation. + * However, there is no guarantee that the DOM node is in the document. + * + * Use this as an opportunity to operate on the DOM when the component has + * been mounted (initialized and rendered) for the first time. + * + * @param {DOMElement} rootNode DOM element representing the component. + * @optional + */ + componentDidMount: 'DEFINE_MANY', + + /** + * Invoked before the component receives new props. + * + * Use this as an opportunity to react to a prop transition by updating the + * state using `this.setState`. Current props are accessed via `this.props`. + * + * componentWillReceiveProps: function(nextProps, nextContext) { + * this.setState({ + * likesIncreasing: nextProps.likeCount > this.props.likeCount + * }); + * } + * + * NOTE: There is no equivalent `componentWillReceiveState`. An incoming prop + * transition may cause a state change, but the opposite is not true. If you + * need it, you are probably looking for `componentWillUpdate`. + * + * @param {object} nextProps + * @optional + */ + componentWillReceiveProps: 'DEFINE_MANY', + + /** + * Invoked while deciding if the component should be updated as a result of + * receiving new props, state and/or context. + * + * Use this as an opportunity to `return false` when you're certain that the + * transition to the new props/state/context will not require a component + * update. + * + * shouldComponentUpdate: function(nextProps, nextState, nextContext) { + * return !equal(nextProps, this.props) || + * !equal(nextState, this.state) || + * !equal(nextContext, this.context); + * } + * + * @param {object} nextProps + * @param {?object} nextState + * @param {?object} nextContext + * @return {boolean} True if the component should update. + * @optional + */ + shouldComponentUpdate: 'DEFINE_ONCE', + + /** + * Invoked when the component is about to update due to a transition from + * `this.props`, `this.state` and `this.context` to `nextProps`, `nextState` + * and `nextContext`. + * + * Use this as an opportunity to perform preparation before an update occurs. + * + * NOTE: You **cannot** use `this.setState()` in this method. + * + * @param {object} nextProps + * @param {?object} nextState + * @param {?object} nextContext + * @param {ReactReconcileTransaction} transaction + * @optional + */ + componentWillUpdate: 'DEFINE_MANY', + + /** + * Invoked when the component's DOM representation has been updated. + * + * Use this as an opportunity to operate on the DOM when the component has + * been updated. + * + * @param {object} prevProps + * @param {?object} prevState + * @param {?object} prevContext + * @param {DOMElement} rootNode DOM element representing the component. + * @optional + */ + componentDidUpdate: 'DEFINE_MANY', + + /** + * Invoked when the component is about to be removed from its parent and have + * its DOM representation destroyed. + * + * Use this as an opportunity to deallocate any external resources. + * + * NOTE: There is no `componentDidUnmount` since your component will have been + * destroyed by that point. + * + * @optional + */ + componentWillUnmount: 'DEFINE_MANY', + + // ==== Advanced methods ==== + + /** + * Updates the component's currently mounted DOM representation. + * + * By default, this implements React's rendering and reconciliation algorithm. + * Sophisticated clients may wish to override this. + * + * @param {ReactReconcileTransaction} transaction + * @internal + * @overridable + */ + updateComponent: 'OVERRIDE_BASE', + }; + + /** + * Mapping from class specification keys to special processing functions. + * + * Although these are declared like instance properties in the specification + * when defining classes using `React.createClass`, they are actually static + * and are accessible on the constructor instead of the prototype. Despite + * being static, they must be defined outside of the "statics" key under + * which all other static methods are defined. + */ + var RESERVED_SPEC_KEYS = { + displayName: function (Constructor, displayName) { + Constructor.displayName = displayName; + }, + mixins: function (Constructor, mixins) { + if (mixins) { + for (var i = 0; i < mixins.length; i++) { + mixSpecIntoComponent(Constructor, mixins[i]); + } + } + }, + childContextTypes: function (Constructor, childContextTypes) { + if (true) { + validateTypeDef(Constructor, childContextTypes, 'childContext'); + } + Constructor.childContextTypes = _assign({}, Constructor.childContextTypes, childContextTypes); + }, + contextTypes: function (Constructor, contextTypes) { + if (true) { + validateTypeDef(Constructor, contextTypes, 'context'); + } + Constructor.contextTypes = _assign({}, Constructor.contextTypes, contextTypes); + }, + /** + * Special case getDefaultProps which should move into statics but requires + * automatic merging. + */ + getDefaultProps: function (Constructor, getDefaultProps) { + if (Constructor.getDefaultProps) { + Constructor.getDefaultProps = createMergedResultFunction( + Constructor.getDefaultProps, + getDefaultProps, + ); + } else { + Constructor.getDefaultProps = getDefaultProps; + } + }, + propTypes: function (Constructor, propTypes) { + if (true) { + validateTypeDef(Constructor, propTypes, 'prop'); + } + Constructor.propTypes = _assign({}, Constructor.propTypes, propTypes); + }, + statics: function (Constructor, statics) { + mixStaticSpecIntoComponent(Constructor, statics); + }, + autobind: function () {}, + }; + + function validateTypeDef(Constructor, typeDef, location) { + for (var propName in typeDef) { + if (typeDef.hasOwnProperty(propName)) { + // use a warning instead of an invariant so components + // don't show up in prod but only in __DEV__ + true + ? warning( + typeof typeDef[propName] === 'function', + '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', + Constructor.displayName || 'ReactClass', + ReactPropTypeLocationNames[location], + propName, + ) + : void 0; + } + } + } + + function validateMethodOverride(isAlreadyDefined, name) { + var specPolicy = ReactClassInterface.hasOwnProperty(name) ? ReactClassInterface[name] : null; + + // Disallow overriding of base class methods unless explicitly allowed. + if (ReactClassMixin.hasOwnProperty(name)) { + !(specPolicy === 'OVERRIDE_BASE') + ? true + ? invariant( + false, + 'ReactClassInterface: You are attempting to override `%s` from your class specification. Ensure that your method names do not overlap with React methods.', + name, + ) + : _prodInvariant('73', name) + : void 0; + } + + // Disallow defining methods more than once unless explicitly allowed. + if (isAlreadyDefined) { + !(specPolicy === 'DEFINE_MANY' || specPolicy === 'DEFINE_MANY_MERGED') + ? true + ? invariant( + false, + 'ReactClassInterface: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.', + name, + ) + : _prodInvariant('74', name) + : void 0; + } + } + + /** + * Mixin helper which handles policy validation and reserved + * specification keys when building React classes. + */ + function mixSpecIntoComponent(Constructor, spec) { + if (!spec) { + if (true) { + var typeofSpec = typeof spec; + var isMixinValid = typeofSpec === 'object' && spec !== null; + + true + ? warning( + isMixinValid, + "%s: You're attempting to include a mixin that is either null " + + 'or not an object. Check the mixins included by the component, ' + + 'as well as any mixins they include themselves. ' + + 'Expected object but got %s.', + Constructor.displayName || 'ReactClass', + spec === null ? null : typeofSpec, + ) + : void 0; + } + + return; + } + + !(typeof spec !== 'function') + ? true + ? invariant( + false, + "ReactClass: You're attempting to use a component class or function as a mixin. Instead, just use a regular object.", + ) + : _prodInvariant('75') + : void 0; + !!ReactElement.isValidElement(spec) + ? true + ? invariant( + false, + "ReactClass: You're attempting to use a component as a mixin. Instead, just use a regular object.", + ) + : _prodInvariant('76') + : void 0; + + var proto = Constructor.prototype; + var autoBindPairs = proto.__reactAutoBindPairs; + + // By handling mixins before any other properties, we ensure the same + // chaining order is applied to methods with DEFINE_MANY policy, whether + // mixins are listed before or after these methods in the spec. + if (spec.hasOwnProperty(MIXINS_KEY)) { + RESERVED_SPEC_KEYS.mixins(Constructor, spec.mixins); + } + + for (var name in spec) { + if (!spec.hasOwnProperty(name)) { + continue; + } + + if (name === MIXINS_KEY) { + // We have already handled mixins in a special case above. + continue; + } + + var property = spec[name]; + var isAlreadyDefined = proto.hasOwnProperty(name); + validateMethodOverride(isAlreadyDefined, name); + + if (RESERVED_SPEC_KEYS.hasOwnProperty(name)) { + RESERVED_SPEC_KEYS[name](Constructor, property); + } else { + // Setup methods on prototype: + // The following member methods should not be automatically bound: + // 1. Expected ReactClass methods (in the "interface"). + // 2. Overridden methods (that were mixed in). + var isReactClassMethod = ReactClassInterface.hasOwnProperty(name); + var isFunction = typeof property === 'function'; + var shouldAutoBind = + isFunction && !isReactClassMethod && !isAlreadyDefined && spec.autobind !== false; + + if (shouldAutoBind) { + autoBindPairs.push(name, property); + proto[name] = property; + } else { + if (isAlreadyDefined) { + var specPolicy = ReactClassInterface[name]; + + // These cases should already be caught by validateMethodOverride. + !(isReactClassMethod && (specPolicy === 'DEFINE_MANY_MERGED' || specPolicy === 'DEFINE_MANY')) + ? true + ? invariant( + false, + 'ReactClass: Unexpected spec policy %s for key %s when mixing in component specs.', + specPolicy, + name, + ) + : _prodInvariant('77', specPolicy, name) + : void 0; + + // For methods which are defined more than once, call the existing + // methods before calling the new property, merging if appropriate. + if (specPolicy === 'DEFINE_MANY_MERGED') { + proto[name] = createMergedResultFunction(proto[name], property); + } else if (specPolicy === 'DEFINE_MANY') { + proto[name] = createChainedFunction(proto[name], property); + } + } else { + proto[name] = property; + if (true) { + // Add verbose displayName to the function, which helps when looking + // at profiling tools. + if (typeof property === 'function' && spec.displayName) { + proto[name].displayName = spec.displayName + '_' + name; + } + } + } + } + } + } + } + + function mixStaticSpecIntoComponent(Constructor, statics) { + if (!statics) { + return; + } + for (var name in statics) { + var property = statics[name]; + if (!statics.hasOwnProperty(name)) { + continue; + } + + var isReserved = name in RESERVED_SPEC_KEYS; + !!isReserved + ? true + ? invariant( + false, + 'ReactClass: You are attempting to define a reserved property, `%s`, that shouldn\'t be on the "statics" key. Define it as an instance property instead; it will still be accessible on the constructor.', + name, + ) + : _prodInvariant('78', name) + : void 0; + + var isInherited = name in Constructor; + !!isInherited + ? true + ? invariant( + false, + 'ReactClass: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.', + name, + ) + : _prodInvariant('79', name) + : void 0; + Constructor[name] = property; + } + } + + /** + * Merge two objects, but throw if both contain the same key. + * + * @param {object} one The first object, which is mutated. + * @param {object} two The second object + * @return {object} one after it has been mutated to contain everything in two. + */ + function mergeIntoWithNoDuplicateKeys(one, two) { + !(one && two && typeof one === 'object' && typeof two === 'object') + ? true + ? invariant(false, 'mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.') + : _prodInvariant('80') + : void 0; + + for (var key in two) { + if (two.hasOwnProperty(key)) { + !(one[key] === undefined) + ? true + ? invariant( + false, + 'mergeIntoWithNoDuplicateKeys(): Tried to merge two objects with the same key: `%s`. This conflict may be due to a mixin; in particular, this may be caused by two getInitialState() or getDefaultProps() methods returning objects with clashing keys.', + key, + ) + : _prodInvariant('81', key) + : void 0; + one[key] = two[key]; + } + } + return one; + } + + /** + * Creates a function that invokes two functions and merges their return values. + * + * @param {function} one Function to invoke first. + * @param {function} two Function to invoke second. + * @return {function} Function that invokes the two argument functions. + * @private + */ + function createMergedResultFunction(one, two) { + return function mergedResult() { + var a = one.apply(this, arguments); + var b = two.apply(this, arguments); + if (a == null) { + return b; + } else if (b == null) { + return a; + } + var c = {}; + mergeIntoWithNoDuplicateKeys(c, a); + mergeIntoWithNoDuplicateKeys(c, b); + return c; + }; + } + + /** + * Creates a function that invokes two functions and ignores their return vales. + * + * @param {function} one Function to invoke first. + * @param {function} two Function to invoke second. + * @return {function} Function that invokes the two argument functions. + * @private + */ + function createChainedFunction(one, two) { + return function chainedFunction() { + one.apply(this, arguments); + two.apply(this, arguments); + }; + } + + /** + * Binds a method to the component. + * + * @param {object} component Component whose method is going to be bound. + * @param {function} method Method to be bound. + * @return {function} The bound method. + */ + function bindAutoBindMethod(component, method) { + var boundMethod = method.bind(component); + if (true) { + boundMethod.__reactBoundContext = component; + boundMethod.__reactBoundMethod = method; + boundMethod.__reactBoundArguments = null; + var componentName = component.constructor.displayName; + var _bind = boundMethod.bind; + boundMethod.bind = function (newThis) { + for ( + var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; + _key < _len; + _key++ + ) { + args[_key - 1] = arguments[_key]; + } + + // User is trying to bind() an autobound method; we effectively will + // ignore the value of "this" that the user is trying to use, so + // let's warn. + if (newThis !== component && newThis !== null) { + true + ? warning( + false, + 'bind(): React component methods may only be bound to the ' + + 'component instance. See %s', + componentName, + ) + : void 0; + } else if (!args.length) { + true + ? warning( + false, + 'bind(): You are binding a component method to the component. ' + + 'React does this for you automatically in a high-performance ' + + 'way, so you can safely remove this call. See %s', + componentName, + ) + : void 0; + return boundMethod; + } + var reboundMethod = _bind.apply(boundMethod, arguments); + reboundMethod.__reactBoundContext = component; + reboundMethod.__reactBoundMethod = method; + reboundMethod.__reactBoundArguments = args; + return reboundMethod; + }; + } + return boundMethod; + } + + /** + * Binds all auto-bound methods in a component. + * + * @param {object} component Component whose method is going to be bound. + */ + function bindAutoBindMethods(component) { + var pairs = component.__reactAutoBindPairs; + for (var i = 0; i < pairs.length; i += 2) { + var autoBindKey = pairs[i]; + var method = pairs[i + 1]; + component[autoBindKey] = bindAutoBindMethod(component, method); + } + } + + /** + * Add more to the ReactClass base class. These are all legacy features and + * therefore not already part of the modern ReactComponent. + */ + var ReactClassMixin = { + /** + * TODO: This will be deprecated because state should always keep a consistent + * type signature and the only use case for this, is to avoid that. + */ + replaceState: function (newState, callback) { + this.updater.enqueueReplaceState(this, newState); + if (callback) { + this.updater.enqueueCallback(this, callback, 'replaceState'); + } + }, + + /** + * Checks whether or not this composite component is mounted. + * @return {boolean} True if mounted, false otherwise. + * @protected + * @final + */ + isMounted: function () { + return this.updater.isMounted(this); + }, + }; + + var ReactClassComponent = function () {}; + _assign(ReactClassComponent.prototype, ReactComponent.prototype, ReactClassMixin); + + var didWarnDeprecated = false; + + /** + * Module for creating composite components. + * + * @class ReactClass + */ + var ReactClass = { + /** + * Creates a composite component class given a class specification. + * See https://facebook.github.io/react/docs/top-level-api.html#react.createclass + * + * @param {object} spec Class specification (which must define `render`). + * @return {function} Component constructor function. + * @public + */ + createClass: function (spec) { + if (true) { + true + ? warning( + didWarnDeprecated, + '%s: React.createClass is deprecated and will be removed in version 16. ' + + "Use plain JavaScript classes instead. If you're not yet ready to " + + 'migrate, create-react-class is available on npm as a ' + + 'drop-in replacement.', + (spec && spec.displayName) || 'A Component', + ) + : void 0; + didWarnDeprecated = true; + } + + // To keep our warnings more understandable, we'll use a little hack here to + // ensure that Constructor.name !== 'Constructor'. This makes sure we don't + // unnecessarily identify a class without displayName as 'Constructor'. + var Constructor = identity(function (props, context, updater) { + // This constructor gets overridden by mocks. The argument is used + // by mocks to assert on what gets mounted. + + if (true) { + true + ? warning( + this instanceof Constructor, + 'Something is calling a React component directly. Use a factory or ' + + 'JSX instead. See: https://fb.me/react-legacyfactory', + ) + : void 0; + } + + // Wire up auto-binding + if (this.__reactAutoBindPairs.length) { + bindAutoBindMethods(this); + } + + this.props = props; + this.context = context; + this.refs = emptyObject; + this.updater = updater || ReactNoopUpdateQueue; + + this.state = null; + + // ReactClasses doesn't have constructors. Instead, they use the + // getInitialState and componentWillMount methods for initialization. + + var initialState = this.getInitialState ? this.getInitialState() : null; + if (true) { + // We allow auto-mocks to proceed as if they're returning null. + if (initialState === undefined && this.getInitialState._isMockFunction) { + // This is probably bad practice. Consider warning here and + // deprecating this convenience. + initialState = null; + } + } + !(typeof initialState === 'object' && !Array.isArray(initialState)) + ? true + ? invariant( + false, + '%s.getInitialState(): must return an object or null', + Constructor.displayName || 'ReactCompositeComponent', + ) + : _prodInvariant('82', Constructor.displayName || 'ReactCompositeComponent') + : void 0; + + this.state = initialState; + }); + Constructor.prototype = new ReactClassComponent(); + Constructor.prototype.constructor = Constructor; + Constructor.prototype.__reactAutoBindPairs = []; + + injectedMixins.forEach(mixSpecIntoComponent.bind(null, Constructor)); + + mixSpecIntoComponent(Constructor, spec); + + // Initialize the defaultProps property after all mixins have been merged. + if (Constructor.getDefaultProps) { + Constructor.defaultProps = Constructor.getDefaultProps(); + } + + if (true) { + // This is a tag to indicate that the use of these method names is ok, + // since it's used with createClass. If it's not, then it's likely a + // mistake so we'll warn you to use the static property, property + // initializer or constructor respectively. + if (Constructor.getDefaultProps) { + Constructor.getDefaultProps.isReactClassApproved = {}; + } + if (Constructor.prototype.getInitialState) { + Constructor.prototype.getInitialState.isReactClassApproved = {}; + } + } + + !Constructor.prototype.render + ? true + ? invariant(false, 'createClass(...): Class specification must implement a `render` method.') + : _prodInvariant('83') + : void 0; + + if (true) { + true + ? warning( + !Constructor.prototype.componentShouldUpdate, + '%s has a method called ' + + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + + 'The name is phrased as a question because the function is ' + + 'expected to return a value.', + spec.displayName || 'A component', + ) + : void 0; + true + ? warning( + !Constructor.prototype.componentWillRecieveProps, + '%s has a method called ' + + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', + spec.displayName || 'A component', + ) + : void 0; + } + + // Reduce time spent doing lookups by setting these on the prototype. + for (var methodName in ReactClassInterface) { + if (!Constructor.prototype[methodName]) { + Constructor.prototype[methodName] = null; + } + } + + return Constructor; + }, + + injection: { + injectMixin: function (mixin) { + injectedMixins.push(mixin); + }, + }, + }; + + module.exports = ReactClass; + + /***/ + }, + /* 871 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var ReactElement = __webpack_require__(86); + + /** + * Create a factory that creates HTML tag elements. + * + * @private + */ + var createDOMFactory = ReactElement.createFactory; + if (true) { + var ReactElementValidator = __webpack_require__(368); + createDOMFactory = ReactElementValidator.createFactory; + } + + /** + * Creates a mapping from supported HTML tags to `ReactDOMComponent` classes. + * This is also accessible via `React.DOM`. + * + * @public + */ + var ReactDOMFactories = { + a: createDOMFactory('a'), + abbr: createDOMFactory('abbr'), + address: createDOMFactory('address'), + area: createDOMFactory('area'), + article: createDOMFactory('article'), + aside: createDOMFactory('aside'), + audio: createDOMFactory('audio'), + b: createDOMFactory('b'), + base: createDOMFactory('base'), + bdi: createDOMFactory('bdi'), + bdo: createDOMFactory('bdo'), + big: createDOMFactory('big'), + blockquote: createDOMFactory('blockquote'), + body: createDOMFactory('body'), + br: createDOMFactory('br'), + button: createDOMFactory('button'), + canvas: createDOMFactory('canvas'), + caption: createDOMFactory('caption'), + cite: createDOMFactory('cite'), + code: createDOMFactory('code'), + col: createDOMFactory('col'), + colgroup: createDOMFactory('colgroup'), + data: createDOMFactory('data'), + datalist: createDOMFactory('datalist'), + dd: createDOMFactory('dd'), + del: createDOMFactory('del'), + details: createDOMFactory('details'), + dfn: createDOMFactory('dfn'), + dialog: createDOMFactory('dialog'), + div: createDOMFactory('div'), + dl: createDOMFactory('dl'), + dt: createDOMFactory('dt'), + em: createDOMFactory('em'), + embed: createDOMFactory('embed'), + fieldset: createDOMFactory('fieldset'), + figcaption: createDOMFactory('figcaption'), + figure: createDOMFactory('figure'), + footer: createDOMFactory('footer'), + form: createDOMFactory('form'), + h1: createDOMFactory('h1'), + h2: createDOMFactory('h2'), + h3: createDOMFactory('h3'), + h4: createDOMFactory('h4'), + h5: createDOMFactory('h5'), + h6: createDOMFactory('h6'), + head: createDOMFactory('head'), + header: createDOMFactory('header'), + hgroup: createDOMFactory('hgroup'), + hr: createDOMFactory('hr'), + html: createDOMFactory('html'), + i: createDOMFactory('i'), + iframe: createDOMFactory('iframe'), + img: createDOMFactory('img'), + input: createDOMFactory('input'), + ins: createDOMFactory('ins'), + kbd: createDOMFactory('kbd'), + keygen: createDOMFactory('keygen'), + label: createDOMFactory('label'), + legend: createDOMFactory('legend'), + li: createDOMFactory('li'), + link: createDOMFactory('link'), + main: createDOMFactory('main'), + map: createDOMFactory('map'), + mark: createDOMFactory('mark'), + menu: createDOMFactory('menu'), + menuitem: createDOMFactory('menuitem'), + meta: createDOMFactory('meta'), + meter: createDOMFactory('meter'), + nav: createDOMFactory('nav'), + noscript: createDOMFactory('noscript'), + object: createDOMFactory('object'), + ol: createDOMFactory('ol'), + optgroup: createDOMFactory('optgroup'), + option: createDOMFactory('option'), + output: createDOMFactory('output'), + p: createDOMFactory('p'), + param: createDOMFactory('param'), + picture: createDOMFactory('picture'), + pre: createDOMFactory('pre'), + progress: createDOMFactory('progress'), + q: createDOMFactory('q'), + rp: createDOMFactory('rp'), + rt: createDOMFactory('rt'), + ruby: createDOMFactory('ruby'), + s: createDOMFactory('s'), + samp: createDOMFactory('samp'), + script: createDOMFactory('script'), + section: createDOMFactory('section'), + select: createDOMFactory('select'), + small: createDOMFactory('small'), + source: createDOMFactory('source'), + span: createDOMFactory('span'), + strong: createDOMFactory('strong'), + style: createDOMFactory('style'), + sub: createDOMFactory('sub'), + summary: createDOMFactory('summary'), + sup: createDOMFactory('sup'), + table: createDOMFactory('table'), + tbody: createDOMFactory('tbody'), + td: createDOMFactory('td'), + textarea: createDOMFactory('textarea'), + tfoot: createDOMFactory('tfoot'), + th: createDOMFactory('th'), + thead: createDOMFactory('thead'), + time: createDOMFactory('time'), + title: createDOMFactory('title'), + tr: createDOMFactory('tr'), + track: createDOMFactory('track'), + u: createDOMFactory('u'), + ul: createDOMFactory('ul'), + var: createDOMFactory('var'), + video: createDOMFactory('video'), + wbr: createDOMFactory('wbr'), + + // SVG + circle: createDOMFactory('circle'), + clipPath: createDOMFactory('clipPath'), + defs: createDOMFactory('defs'), + ellipse: createDOMFactory('ellipse'), + g: createDOMFactory('g'), + image: createDOMFactory('image'), + line: createDOMFactory('line'), + linearGradient: createDOMFactory('linearGradient'), + mask: createDOMFactory('mask'), + path: createDOMFactory('path'), + pattern: createDOMFactory('pattern'), + polygon: createDOMFactory('polygon'), + polyline: createDOMFactory('polyline'), + radialGradient: createDOMFactory('radialGradient'), + rect: createDOMFactory('rect'), + stop: createDOMFactory('stop'), + svg: createDOMFactory('svg'), + text: createDOMFactory('text'), + tspan: createDOMFactory('tspan'), + }; + + module.exports = ReactDOMFactories; + + /***/ + }, + /* 872 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var _require = __webpack_require__(86), + isValidElement = _require.isValidElement; + + var factory = __webpack_require__(101); + + module.exports = factory(isValidElement); + + /***/ + }, + /* 873 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; + + module.exports = ReactPropTypesSecret; + + /***/ + }, + /* 874 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var _assign = __webpack_require__(9); + + var ReactComponent = __webpack_require__(225); + var ReactNoopUpdateQueue = __webpack_require__(226); + + var emptyObject = __webpack_require__(66); + + /** + * Base class helpers for the updating state of a component. + */ + function ReactPureComponent(props, context, updater) { + // Duplicated from ReactComponent. + this.props = props; + this.context = context; + this.refs = emptyObject; + // We initialize the default updater but the real one gets injected by the + // renderer. + this.updater = updater || ReactNoopUpdateQueue; + } + + function ComponentDummy() {} + ComponentDummy.prototype = ReactComponent.prototype; + ReactPureComponent.prototype = new ComponentDummy(); + ReactPureComponent.prototype.constructor = ReactPureComponent; + // Avoid an extra prototype jump for these methods. + _assign(ReactPureComponent.prototype, ReactComponent.prototype); + ReactPureComponent.prototype.isPureReactComponent = true; + + module.exports = ReactPureComponent; + + /***/ + }, + /* 875 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var flattenChildren = __webpack_require__(880); + + var ReactTransitionChildMapping = { + /** + * Given `this.props.children`, return an object mapping key to child. Just + * simple syntactic sugar around flattenChildren(). + * + * @param {*} children `this.props.children` + * @param {number=} selfDebugID Optional debugID of the current internal instance. + * @return {object} Mapping of key to child + */ + getChildMapping: function (children, selfDebugID) { + if (!children) { + return children; + } + + if (true) { + return flattenChildren(children, selfDebugID); + } + + return flattenChildren(children); + }, + + /** + * When you're adding or removing children some may be added or removed in the + * same render pass. We want to show *both* since we want to simultaneously + * animate elements in and out. This function takes a previous set of keys + * and a new set of keys and merges them with its best guess of the correct + * ordering. In the future we may expose some of the utilities in + * ReactMultiChild to make this easy, but for now React itself does not + * directly have this concept of the union of prevChildren and nextChildren + * so we implement it here. + * + * @param {object} prev prev children as returned from + * `ReactTransitionChildMapping.getChildMapping()`. + * @param {object} next next children as returned from + * `ReactTransitionChildMapping.getChildMapping()`. + * @return {object} a key set that contains all keys in `prev` and all keys + * in `next` in a reasonable order. + */ + mergeChildMappings: function (prev, next) { + prev = prev || {}; + next = next || {}; + + function getValueForKey(key) { + if (next.hasOwnProperty(key)) { + return next[key]; + } else { + return prev[key]; + } + } + + // For each key of `next`, the list of keys to insert before that key in + // the combined list + var nextKeysPending = {}; + + var pendingKeys = []; + for (var prevKey in prev) { + if (next.hasOwnProperty(prevKey)) { + if (pendingKeys.length) { + nextKeysPending[prevKey] = pendingKeys; + pendingKeys = []; + } + } else { + pendingKeys.push(prevKey); + } + } + + var i; + var childMapping = {}; + for (var nextKey in next) { + if (nextKeysPending.hasOwnProperty(nextKey)) { + for (i = 0; i < nextKeysPending[nextKey].length; i++) { + var pendingNextKey = nextKeysPending[nextKey][i]; + childMapping[nextKeysPending[nextKey][i]] = getValueForKey(pendingNextKey); + } + } + childMapping[nextKey] = getValueForKey(nextKey); + } + + // Finally, add the keys which didn't appear before any key in `next` + for (i = 0; i < pendingKeys.length; i++) { + childMapping[pendingKeys[i]] = getValueForKey(pendingKeys[i]); + } + + return childMapping; + }, + }; + + module.exports = ReactTransitionChildMapping; + + /***/ + }, + /* 876 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var ExecutionEnvironment = __webpack_require__(17); + + var getVendorPrefixedEventName = __webpack_require__(339); + + var endEvents = []; + + function detectEvents() { + var animEnd = getVendorPrefixedEventName('animationend'); + var transEnd = getVendorPrefixedEventName('transitionend'); + + if (animEnd) { + endEvents.push(animEnd); + } + + if (transEnd) { + endEvents.push(transEnd); + } + } + + if (ExecutionEnvironment.canUseDOM) { + detectEvents(); + } + + // We use the raw {add|remove}EventListener() call because EventListener + // does not know how to remove event listeners and we really should + // clean up. Also, these events are not triggered in older browsers + // so we should be A-OK here. + + function addEventListener(node, eventName, eventListener) { + node.addEventListener(eventName, eventListener, false); + } + + function removeEventListener(node, eventName, eventListener) { + node.removeEventListener(eventName, eventListener, false); + } + + var ReactTransitionEvents = { + addEndEventListener: function (node, eventListener) { + if (endEvents.length === 0) { + // If CSS transitions are not supported, trigger an "end animation" + // event immediately. + window.setTimeout(eventListener, 0); + return; + } + endEvents.forEach(function (endEvent) { + addEventListener(node, endEvent, eventListener); + }); + }, + + removeEndEventListener: function (node, eventListener) { + if (endEvents.length === 0) { + return; + } + endEvents.forEach(function (endEvent) { + removeEventListener(node, endEvent, eventListener); + }); + }, + }; + + module.exports = ReactTransitionEvents; + + /***/ + }, + /* 877 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var _assign = __webpack_require__(9); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + var React = __webpack_require__(38); + var ReactTransitionChildMapping = __webpack_require__(875); + + var propTypesFactory = __webpack_require__(101); + var PropTypes = propTypesFactory(React.isValidElement); + + var emptyFunction = __webpack_require__(22); + + /** + * A basis for animations. When children are declaratively added or removed, + * special lifecycle hooks are called. + * See https://facebook.github.io/react/docs/animation.html#low-level-api-reacttransitiongroup + */ + + var ReactTransitionGroup = (function (_React$Component) { + _inherits(ReactTransitionGroup, _React$Component); + + function ReactTransitionGroup() { + var _temp, _this, _ret; + + _classCallCheck(this, ReactTransitionGroup); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return ( + (_ret = + ((_temp = + ((_this = _possibleConstructorReturn( + this, + _React$Component.call.apply(_React$Component, [this].concat(args)), + )), + _this)), + (_this.state = { + // TODO: can we get useful debug information to show at this point? + children: ReactTransitionChildMapping.getChildMapping(_this.props.children), + }), + (_this.performAppear = function (key) { + _this.currentlyTransitioningKeys[key] = true; + + var component = _this.refs[key]; + + if (component.componentWillAppear) { + component.componentWillAppear(_this._handleDoneAppearing.bind(_this, key)); + } else { + _this._handleDoneAppearing(key); + } + }), + (_this._handleDoneAppearing = function (key) { + var component = _this.refs[key]; + if (component.componentDidAppear) { + component.componentDidAppear(); + } + + delete _this.currentlyTransitioningKeys[key]; + + var currentChildMapping = ReactTransitionChildMapping.getChildMapping(_this.props.children); + + if (!currentChildMapping || !currentChildMapping.hasOwnProperty(key)) { + // This was removed before it had fully appeared. Remove it. + _this.performLeave(key); + } + }), + (_this.performEnter = function (key) { + _this.currentlyTransitioningKeys[key] = true; + + var component = _this.refs[key]; + + if (component.componentWillEnter) { + component.componentWillEnter(_this._handleDoneEntering.bind(_this, key)); + } else { + _this._handleDoneEntering(key); + } + }), + (_this._handleDoneEntering = function (key) { + var component = _this.refs[key]; + if (component.componentDidEnter) { + component.componentDidEnter(); + } + + delete _this.currentlyTransitioningKeys[key]; + + var currentChildMapping = ReactTransitionChildMapping.getChildMapping(_this.props.children); + + if (!currentChildMapping || !currentChildMapping.hasOwnProperty(key)) { + // This was removed before it had fully entered. Remove it. + _this.performLeave(key); + } + }), + (_this.performLeave = function (key) { + _this.currentlyTransitioningKeys[key] = true; + + var component = _this.refs[key]; + if (component.componentWillLeave) { + component.componentWillLeave(_this._handleDoneLeaving.bind(_this, key)); + } else { + // Note that this is somewhat dangerous b/c it calls setState() + // again, effectively mutating the component before all the work + // is done. + _this._handleDoneLeaving(key); + } + }), + (_this._handleDoneLeaving = function (key) { + var component = _this.refs[key]; + + if (component.componentDidLeave) { + component.componentDidLeave(); + } + + delete _this.currentlyTransitioningKeys[key]; + + var currentChildMapping = ReactTransitionChildMapping.getChildMapping(_this.props.children); + + if (currentChildMapping && currentChildMapping.hasOwnProperty(key)) { + // This entered again before it fully left. Add it again. + _this.performEnter(key); + } else { + _this.setState(function (state) { + var newChildren = _assign({}, state.children); + delete newChildren[key]; + return { children: newChildren }; + }); + } + }), + _temp)), + _possibleConstructorReturn(_this, _ret) + ); + } + + ReactTransitionGroup.prototype.componentWillMount = function componentWillMount() { + this.currentlyTransitioningKeys = {}; + this.keysToEnter = []; + this.keysToLeave = []; + }; + + ReactTransitionGroup.prototype.componentDidMount = function componentDidMount() { + var initialChildMapping = this.state.children; + for (var key in initialChildMapping) { + if (initialChildMapping[key]) { + this.performAppear(key); + } + } + }; + + ReactTransitionGroup.prototype.componentWillReceiveProps = function componentWillReceiveProps( + nextProps, + ) { + var nextChildMapping = ReactTransitionChildMapping.getChildMapping(nextProps.children); + var prevChildMapping = this.state.children; + + this.setState({ + children: ReactTransitionChildMapping.mergeChildMappings(prevChildMapping, nextChildMapping), + }); + + var key; + + for (key in nextChildMapping) { + var hasPrev = prevChildMapping && prevChildMapping.hasOwnProperty(key); + if (nextChildMapping[key] && !hasPrev && !this.currentlyTransitioningKeys[key]) { + this.keysToEnter.push(key); + } + } + + for (key in prevChildMapping) { + var hasNext = nextChildMapping && nextChildMapping.hasOwnProperty(key); + if (prevChildMapping[key] && !hasNext && !this.currentlyTransitioningKeys[key]) { + this.keysToLeave.push(key); + } + } + + // If we want to someday check for reordering, we could do it here. + }; + + ReactTransitionGroup.prototype.componentDidUpdate = function componentDidUpdate() { + var keysToEnter = this.keysToEnter; + this.keysToEnter = []; + keysToEnter.forEach(this.performEnter); + + var keysToLeave = this.keysToLeave; + this.keysToLeave = []; + keysToLeave.forEach(this.performLeave); + }; + + ReactTransitionGroup.prototype.render = function render() { + // TODO: we could get rid of the need for the wrapper node + // by cloning a single child + var childrenToRender = []; + for (var key in this.state.children) { + var child = this.state.children[key]; + if (child) { + // You may need to apply reactive updates to a child as it is leaving. + // The normal React way to do it won't work since the child will have + // already been removed. In case you need this behavior you can provide + // a childFactory function to wrap every child, even the ones that are + // leaving. + childrenToRender.push( + React.cloneElement(this.props.childFactory(child), { ref: key, key: key }), + ); + } + } + + // Do not forward ReactTransitionGroup props to primitive DOM nodes + var props = _assign({}, this.props); + delete props.transitionLeave; + delete props.transitionName; + delete props.transitionAppear; + delete props.transitionEnter; + delete props.childFactory; + delete props.transitionLeaveTimeout; + delete props.transitionEnterTimeout; + delete props.transitionAppearTimeout; + delete props.component; + + return React.createElement(this.props.component, props, childrenToRender); + }; + + return ReactTransitionGroup; + })(React.Component); + + ReactTransitionGroup.displayName = 'ReactTransitionGroup'; + ReactTransitionGroup.propTypes = { + component: PropTypes.any, + childFactory: PropTypes.func, + }; + ReactTransitionGroup.defaultProps = { + component: 'span', + childFactory: emptyFunction.thatReturnsArgument, + }; + + module.exports = ReactTransitionGroup; + + /***/ + }, + /* 878 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + module.exports = '15.5.3'; + + /***/ + }, + /* 879 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (process) { + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var _prodInvariant = __webpack_require__(87); + + var ReactPropTypeLocationNames = __webpack_require__(369); + var ReactPropTypesSecret = __webpack_require__(873); + + var invariant = __webpack_require__(3); + var warning = __webpack_require__(4); + + var ReactComponentTreeHook; + + if ( + typeof process !== 'undefined' && + __webpack_require__.i({ NODE_ENV: 'development', WEBPACK_SERVER_BUILD: true }) && + 'development' === 'test' + ) { + // Temporary hack. + // Inline requires don't work well with Jest: + // https://github.com/facebook/react/issues/7240 + // Remove the inline requires when we don't need them anymore: + // https://github.com/facebook/react/pull/7178 + ReactComponentTreeHook = __webpack_require__(24); + } + + var loggedTypeFailures = {}; + + /** + * Assert that the values match with the type specs. + * Error messages are memorized and will only be shown once. + * + * @param {object} typeSpecs Map of name to a ReactPropType + * @param {object} values Runtime values that need to be type-checked + * @param {string} location e.g. "prop", "context", "child context" + * @param {string} componentName Name of the component for error messages. + * @param {?object} element The React element that is being type-checked + * @param {?number} debugID The React component instance that is being type-checked + * @private + */ + function checkReactTypeSpec(typeSpecs, values, location, componentName, element, debugID) { + for (var typeSpecName in typeSpecs) { + if (typeSpecs.hasOwnProperty(typeSpecName)) { + var error; + // Prop type validation may throw. In case they do, we don't want to + // fail the render phase where it didn't fail before. So we log it. + // After these have been cleaned up, we'll let them throw. + try { + // This is intentionally an invariant that gets caught. It's the same + // behavior as without this statement except with a better message. + !(typeof typeSpecs[typeSpecName] === 'function') + ? true + ? invariant( + false, + '%s: %s type `%s` is invalid; it must be a function, usually from React.PropTypes.', + componentName || 'React class', + ReactPropTypeLocationNames[location], + typeSpecName, + ) + : _prodInvariant( + '84', + componentName || 'React class', + ReactPropTypeLocationNames[location], + typeSpecName, + ) + : void 0; + error = typeSpecs[typeSpecName]( + values, + typeSpecName, + componentName, + location, + null, + ReactPropTypesSecret, + ); + } catch (ex) { + error = ex; + } + true + ? warning( + !error || error instanceof Error, + '%s: type specification of %s `%s` is invalid; the type checker ' + + 'function must return `null` or an `Error` but returned a %s. ' + + 'You may have forgotten to pass an argument to the type checker ' + + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + + 'shape all require an argument).', + componentName || 'React class', + ReactPropTypeLocationNames[location], + typeSpecName, + typeof error, + ) + : void 0; + if (error instanceof Error && !(error.message in loggedTypeFailures)) { + // Only monitor this failure once because there tends to be a lot of the + // same error. + loggedTypeFailures[error.message] = true; + + var componentStackInfo = ''; + + if (true) { + if (!ReactComponentTreeHook) { + ReactComponentTreeHook = __webpack_require__(24); + } + if (debugID !== null) { + componentStackInfo = ReactComponentTreeHook.getStackAddendumByID(debugID); + } else if (element !== null) { + componentStackInfo = ReactComponentTreeHook.getCurrentStackAddendum(element); + } + } + + true + ? warning(false, 'Failed %s type: %s%s', location, error.message, componentStackInfo) + : void 0; + } + } + } + } + + module.exports = checkReactTypeSpec; + /* WEBPACK VAR INJECTION */ + }).call(exports, __webpack_require__(100)); + + /***/ + }, + /* 880 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (process) { + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + var KeyEscapeUtils = __webpack_require__(366); + var traverseAllChildren = __webpack_require__(373); + var warning = __webpack_require__(4); + + var ReactComponentTreeHook; + + if ( + typeof process !== 'undefined' && + __webpack_require__.i({ NODE_ENV: 'development', WEBPACK_SERVER_BUILD: true }) && + 'development' === 'test' + ) { + // Temporary hack. + // Inline requires don't work well with Jest: + // https://github.com/facebook/react/issues/7240 + // Remove the inline requires when we don't need them anymore: + // https://github.com/facebook/react/pull/7178 + ReactComponentTreeHook = __webpack_require__(24); + } + + /** + * @param {function} traverseContext Context passed through traversal. + * @param {?ReactComponent} child React child component. + * @param {!string} name String name of key path to child. + * @param {number=} selfDebugID Optional debugID of the current internal instance. + */ + function flattenSingleChildIntoContext(traverseContext, child, name, selfDebugID) { + // We found a component instance. + if (traverseContext && typeof traverseContext === 'object') { + var result = traverseContext; + var keyUnique = result[name] === undefined; + if (true) { + if (!ReactComponentTreeHook) { + ReactComponentTreeHook = __webpack_require__(24); + } + if (!keyUnique) { + true + ? warning( + false, + 'flattenChildren(...): Encountered two children with the same key, ' + + '`%s`. Child keys must be unique; when two children share a key, only ' + + 'the first child will be used.%s', + KeyEscapeUtils.unescape(name), + ReactComponentTreeHook.getStackAddendumByID(selfDebugID), + ) + : void 0; + } + } + if (keyUnique && child != null) { + result[name] = child; + } + } + } + + /** + * Flattens children that are typically specified as `props.children`. Any null + * children will not be included in the resulting object. + * @return {!object} flattened children keyed by name. + */ + function flattenChildren(children, selfDebugID) { + if (children == null) { + return children; + } + var result = {}; + + if (true) { + traverseAllChildren( + children, + function (traverseContext, child, name) { + return flattenSingleChildIntoContext(traverseContext, child, name, selfDebugID); + }, + result, + ); + } else { + traverseAllChildren(children, flattenSingleChildIntoContext, result); + } + return result; + } + + module.exports = flattenChildren; + /* WEBPACK VAR INJECTION */ + }).call(exports, __webpack_require__(100)); + + /***/ + }, + /* 881 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + function createThunkMiddleware(extraArgument) { + return function (_ref) { + var dispatch = _ref.dispatch; + var getState = _ref.getState; + return function (next) { + return function (action) { + if (typeof action === 'function') { + return action(dispatch, getState, extraArgument); + } + + return next(action); + }; + }; + }; + } + + var thunk = createThunkMiddleware(); + thunk.withExtraArgument = createThunkMiddleware; + + exports['default'] = thunk; + + /***/ + }, + /* 882 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__compose__ = __webpack_require__(374); + /* harmony export (immutable) */ __webpack_exports__['a'] = applyMiddleware; + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + /** + * Creates a store enhancer that applies middleware to the dispatch method + * of the Redux store. This is handy for a variety of tasks, such as expressing + * asynchronous actions in a concise manner, or logging every action payload. + * + * See `redux-thunk` package as an example of the Redux middleware. + * + * Because middleware is potentially asynchronous, this should be the first + * store enhancer in the composition chain. + * + * Note that each middleware will be given the `dispatch` and `getState` functions + * as named arguments. + * + * @param {...Function} middlewares The middleware chain to be applied. + * @returns {Function} A store enhancer applying the middleware. + */ + function applyMiddleware() { + for (var _len = arguments.length, middlewares = Array(_len), _key = 0; _key < _len; _key++) { + middlewares[_key] = arguments[_key]; + } + + return function (createStore) { + return function (reducer, preloadedState, enhancer) { + var store = createStore(reducer, preloadedState, enhancer); + var _dispatch = store.dispatch; + var chain = []; + + var middlewareAPI = { + getState: store.getState, + dispatch: function dispatch(action) { + return _dispatch(action); + }, + }; + chain = middlewares.map(function (middleware) { + return middleware(middlewareAPI); + }); + _dispatch = __WEBPACK_IMPORTED_MODULE_0__compose__['a' /* default */].apply( + undefined, + chain, + )(store.dispatch); + + return _extends({}, store, { + dispatch: _dispatch, + }); + }; + }; + } + + /***/ + }, + /* 883 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = bindActionCreators; + function bindActionCreator(actionCreator, dispatch) { + return function () { + return dispatch(actionCreator.apply(undefined, arguments)); + }; + } + + /** + * Turns an object whose values are action creators, into an object with the + * same keys, but with every function wrapped into a `dispatch` call so they + * may be invoked directly. This is just a convenience method, as you can call + * `store.dispatch(MyActionCreators.doSomething())` yourself just fine. + * + * For convenience, you can also pass a single function as the first argument, + * and get a function in return. + * + * @param {Function|Object} actionCreators An object whose values are action + * creator functions. One handy way to obtain it is to use ES6 `import * as` + * syntax. You may also pass a single function. + * + * @param {Function} dispatch The `dispatch` function available on your Redux + * store. + * + * @returns {Function|Object} The object mimicking the original object, but with + * every action creator wrapped into the `dispatch` call. If you passed a + * function as `actionCreators`, the return value will also be a single + * function. + */ + function bindActionCreators(actionCreators, dispatch) { + if (typeof actionCreators === 'function') { + return bindActionCreator(actionCreators, dispatch); + } + + if (typeof actionCreators !== 'object' || actionCreators === null) { + throw new Error( + 'bindActionCreators expected an object or a function, instead received ' + + (actionCreators === null ? 'null' : typeof actionCreators) + + '. ' + + 'Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?', + ); + } + + var keys = Object.keys(actionCreators); + var boundActionCreators = {}; + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + var actionCreator = actionCreators[key]; + if (typeof actionCreator === 'function') { + boundActionCreators[key] = bindActionCreator(actionCreator, dispatch); + } + } + return boundActionCreators; + } + + /***/ + }, + /* 884 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createStore__ = __webpack_require__(375); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_es_isPlainObject__ = + __webpack_require__(199); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_warning__ = __webpack_require__(377); + /* harmony export (immutable) */ __webpack_exports__['a'] = combineReducers; + + function getUndefinedStateErrorMessage(key, action) { + var actionType = action && action.type; + var actionName = (actionType && '"' + actionType.toString() + '"') || 'an action'; + + return ( + 'Given action ' + + actionName + + ', reducer "' + + key + + '" returned undefined. ' + + 'To ignore an action, you must explicitly return the previous state.' + ); + } + + function getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) { + var reducerKeys = Object.keys(reducers); + var argumentName = + action && action.type === __WEBPACK_IMPORTED_MODULE_0__createStore__['b' /* ActionTypes */].INIT + ? 'preloadedState argument passed to createStore' + : 'previous state received by the reducer'; + + if (reducerKeys.length === 0) { + return ( + 'Store does not have a valid reducer. Make sure the argument passed ' + + 'to combineReducers is an object whose values are reducers.' + ); + } + + if ( + !__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_lodash_es_isPlainObject__['a' /* default */])( + inputState, + ) + ) { + return ( + 'The ' + + argumentName + + ' has unexpected type of "' + + {}.toString.call(inputState).match(/\s([a-z|A-Z]+)/)[1] + + '". Expected argument to be an object with the following ' + + ('keys: "' + reducerKeys.join('", "') + '"') + ); + } + + var unexpectedKeys = Object.keys(inputState).filter(function (key) { + return !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key]; + }); + + unexpectedKeys.forEach(function (key) { + unexpectedKeyCache[key] = true; + }); + + if (unexpectedKeys.length > 0) { + return ( + 'Unexpected ' + + (unexpectedKeys.length > 1 ? 'keys' : 'key') + + ' ' + + ('"' + unexpectedKeys.join('", "') + '" found in ' + argumentName + '. ') + + 'Expected to find one of the known reducer keys instead: ' + + ('"' + reducerKeys.join('", "') + '". Unexpected keys will be ignored.') + ); + } + } + + function assertReducerSanity(reducers) { + Object.keys(reducers).forEach(function (key) { + var reducer = reducers[key]; + var initialState = reducer(undefined, { + type: __WEBPACK_IMPORTED_MODULE_0__createStore__['b' /* ActionTypes */].INIT, + }); + + if (typeof initialState === 'undefined') { + throw new Error( + 'Reducer "' + + key + + '" returned undefined during initialization. ' + + 'If the state passed to the reducer is undefined, you must ' + + 'explicitly return the initial state. The initial state may ' + + 'not be undefined.', + ); + } + + var type = + '@@redux/PROBE_UNKNOWN_ACTION_' + Math.random().toString(36).substring(7).split('').join('.'); + if (typeof reducer(undefined, { type: type }) === 'undefined') { + throw new Error( + 'Reducer "' + + key + + '" returned undefined when probed with a random type. ' + + ("Don't try to handle " + + __WEBPACK_IMPORTED_MODULE_0__createStore__['b' /* ActionTypes */].INIT + + ' or other actions in "redux/*" ') + + 'namespace. They are considered private. Instead, you must return the ' + + 'current state for any unknown actions, unless it is undefined, ' + + 'in which case you must return the initial state, regardless of the ' + + 'action type. The initial state may not be undefined.', + ); + } + }); + } + + /** + * Turns an object whose values are different reducer functions, into a single + * reducer function. It will call every child reducer, and gather their results + * into a single state object, whose keys correspond to the keys of the passed + * reducer functions. + * + * @param {Object} reducers An object whose values correspond to different + * reducer functions that need to be combined into one. One handy way to obtain + * it is to use ES6 `import * as reducers` syntax. The reducers may never return + * undefined for any action. Instead, they should return their initial state + * if the state passed to them was undefined, and the current state for any + * unrecognized action. + * + * @returns {Function} A reducer function that invokes every reducer inside the + * passed object, and builds a state object with the same shape. + */ + function combineReducers(reducers) { + var reducerKeys = Object.keys(reducers); + var finalReducers = {}; + for (var i = 0; i < reducerKeys.length; i++) { + var key = reducerKeys[i]; + + if (true) { + if (typeof reducers[key] === 'undefined') { + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__utils_warning__['a' /* default */])( + 'No reducer provided for key "' + key + '"', + ); + } + } + + if (typeof reducers[key] === 'function') { + finalReducers[key] = reducers[key]; + } + } + var finalReducerKeys = Object.keys(finalReducers); + + if (true) { + var unexpectedKeyCache = {}; + } + + var sanityError; + try { + assertReducerSanity(finalReducers); + } catch (e) { + sanityError = e; + } + + return function combination() { + var state = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; + var action = arguments[1]; + + if (sanityError) { + throw sanityError; + } + + if (true) { + var warningMessage = getUnexpectedStateShapeWarningMessage( + state, + finalReducers, + action, + unexpectedKeyCache, + ); + if (warningMessage) { + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__utils_warning__['a' /* default */])( + warningMessage, + ); + } + } + + var hasChanged = false; + var nextState = {}; + for (var i = 0; i < finalReducerKeys.length; i++) { + var key = finalReducerKeys[i]; + var reducer = finalReducers[key]; + var previousStateForKey = state[key]; + var nextStateForKey = reducer(previousStateForKey, action); + if (typeof nextStateForKey === 'undefined') { + var errorMessage = getUndefinedStateErrorMessage(key, action); + throw new Error(errorMessage); + } + nextState[key] = nextStateForKey; + hasChanged = hasChanged || nextStateForKey !== previousStateForKey; + } + return hasChanged ? nextState : state; + }; + } + + /***/ + }, + /* 885 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var fetchKeys = __webpack_require__(740); + + module.exports = function shallowEqual(objA, objB, compare, compareContext) { + var ret = compare ? compare.call(compareContext, objA, objB) : void 0; + + if (ret !== void 0) { + return !!ret; + } + + if (objA === objB) { + return true; + } + + if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) { + return false; + } + + var keysA = fetchKeys(objA); + var keysB = fetchKeys(objB); + + var len = keysA.length; + if (len !== keysB.length) { + return false; + } + + compareContext = compareContext || null; + + // Test for A's keys different from B. + var bHasOwnProperty = Object.prototype.hasOwnProperty.bind(objB); + for (var i = 0; i < len; i++) { + var key = keysA[i]; + if (!bHasOwnProperty(key)) { + return false; + } + var valueA = objA[key]; + var valueB = objB[key]; + + var _ret = compare ? compare.call(compareContext, valueA, valueB, key) : void 0; + if (_ret === false || (_ret === void 0 && valueA !== valueB)) { + return false; + } + } + + return true; + }; + + /***/ + }, + /* 886 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + module.exports = function (str) { + return encodeURIComponent(str).replace(/[!'()*]/g, function (c) { + return '%' + c.charCodeAt(0).toString(16).toUpperCase(); + }); + }; + + /***/ + }, + /* 887 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = __webpack_require__(888); + + /***/ + }, + /* 888 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (global, module) { + Object.defineProperty(exports, '__esModule', { + value: true, + }); + + var _ponyfill = __webpack_require__(889); + + var _ponyfill2 = _interopRequireDefault(_ponyfill); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + var root; /* global window */ + + if (typeof self !== 'undefined') { + root = self; + } else if (typeof window !== 'undefined') { + root = window; + } else if (typeof global !== 'undefined') { + root = global; + } else if (true) { + root = module; + } else { + root = Function('return this')(); + } + + var result = (0, _ponyfill2['default'])(root); + exports['default'] = result; + /* WEBPACK VAR INJECTION */ + }).call(exports, __webpack_require__(108), __webpack_require__(229)(module)); + + /***/ + }, + /* 889 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports['default'] = symbolObservablePonyfill; + function symbolObservablePonyfill(root) { + var result; + var _Symbol = root.Symbol; + + if (typeof _Symbol === 'function') { + if (_Symbol.observable) { + result = _Symbol.observable; + } else { + result = _Symbol('observable'); + _Symbol.observable = result; + } + } else { + result = '@@observable'; + } + + return result; + } + + /***/ + }, + /* 890 */ + /***/ function (module, exports) { + /** + * Export. + */ + + module.exports = toNoCase; + + /** + * Test whether a string is camel-case. + */ + + var hasSpace = /\s/; + var hasSeparator = /(_|-|\.|:)/; + var hasCamel = /([a-z][A-Z]|[A-Z][a-z])/; + + /** + * Remove any starting case from a `string`, like camel or snake, but keep + * spaces and punctuation that may be important otherwise. + * + * @param {String} string + * @return {String} + */ + + function toNoCase(string) { + if (hasSpace.test(string)) return string.toLowerCase(); + if (hasSeparator.test(string)) return (unseparate(string) || string).toLowerCase(); + if (hasCamel.test(string)) return uncamelize(string).toLowerCase(); + return string.toLowerCase(); + } + + /** + * Separator splitter. + */ + + var separatorSplitter = /[\W_]+(.|$)/g; + + /** + * Un-separate a `string`. + * + * @param {String} string + * @return {String} + */ + + function unseparate(string) { + return string.replace(separatorSplitter, function (m, next) { + return next ? ' ' + next : ''; + }); + } + + /** + * Camelcase splitter. + */ + + var camelSplitter = /(.)([A-Z]+)/g; + + /** + * Un-camelcase a `string`. + * + * @param {String} string + * @return {String} + */ + + function uncamelize(string) { + return string.replace(camelSplitter, function (m, previous, uppers) { + return previous + ' ' + uppers.toLowerCase().split('').join(' '); + }); + } + + /***/ + }, + /* 891 */ + /***/ function (module, exports, __webpack_require__) { + var clean = __webpack_require__(890); + + /** + * Export. + */ + + module.exports = toSpaceCase; + + /** + * Convert a `string` to space case. + * + * @param {String} string + * @return {String} + */ + + function toSpaceCase(string) { + return clean(string) + .replace(/[\W_]+(.|$)/g, function (matches, match) { + return match ? ' ' + match : ''; + }) + .trim(); + } + + /***/ + }, + /* 892 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(380); + module.exports = __webpack_require__(379); + + /***/ + }, + /******/ + ], +); diff --git a/packages/react-on-rails-pro-node-renderer/tests/fixtures/projects/bionicworkshop/fa6ccf6b/signInPageWithFlashRenderingRequest.js b/packages/react-on-rails-pro-node-renderer/tests/fixtures/projects/bionicworkshop/fa6ccf6b/signInPageWithFlashRenderingRequest.js new file mode 100644 index 0000000000..241861cc43 --- /dev/null +++ b/packages/react-on-rails-pro-node-renderer/tests/fixtures/projects/bionicworkshop/fa6ccf6b/signInPageWithFlashRenderingRequest.js @@ -0,0 +1,18 @@ +(function() { + var railsContext = {"inMailer":false,"i18nLocale":"ru","i18nDefaultLocale":"ru","href":"http://0.0.0.0:3000/users/sign-in","location":"/users/sign-in","scheme":"http","host":"0.0.0.0","port":3000,"pathname":"/users/sign-in","search":null,"httpAcceptLanguage":"ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4","appVersion":"v1.5.4-1-g6d0afe8\n","authenticityToken":"gnVz8X0d14ED4eVOs43lhP63qRiafnfE7KQpmxspmoEjNmNWXpw+WgT/pLjCQoSLVMayN41NeTPUZUsWZaPRRg==","serverSide":true}; + ReactOnRails.clearHydratedStores(); +var reduxProps, store, storeGenerator; +reduxProps = {"flashes_init_data":[{"message":"Вам необходимо войти в систему или зарегистрироваться.","type":"alert"}]}; +storeGenerator = ReactOnRails.getStoreGenerator('Store'); +store = storeGenerator(reduxProps, railsContext); +ReactOnRails.setStore('Store', store); + + var props = {}; + return ReactOnRails.serverRenderReactComponent({ + name: 'App', + domNodeId: 'react-root', + props: props, + trace: true, + railsContext: railsContext + }); +})() diff --git a/packages/react-on-rails-pro-node-renderer/tests/fixtures/projects/friendsandguests/1a7fe417/layoutNavbarRenderingRequest.js b/packages/react-on-rails-pro-node-renderer/tests/fixtures/projects/friendsandguests/1a7fe417/layoutNavbarRenderingRequest.js new file mode 100644 index 0000000000..a8aaf66337 --- /dev/null +++ b/packages/react-on-rails-pro-node-renderer/tests/fixtures/projects/friendsandguests/1a7fe417/layoutNavbarRenderingRequest.js @@ -0,0 +1,18 @@ +(function() { + var railsContext = {"inMailer":false,"i18nLocale":"en","i18nDefaultLocale":"en","href":"http://app.lvh.me:3000/","location":"/","scheme":"http","host":"app.lvh.me","port":3000,"pathname":"/","search":null,"httpAcceptLanguage":"ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4","railsEnv":"development","honeybadgerEnv":"development","launchdarklyAllFlags":{"blv_redux":false,"temp-calendar":true},"launchdarklySettings":{"key":"3917","anonymous":false,"email":"justin@friendsandguests.com","firstName":"Justin","lastName":"Gordon"},"cloudinaryUrl":"https://res.cloudinary.com/dsm07vjyu/image/upload/","desktop":true,"tablet":false,"mobile":false,"userId":3917,"userEmail":"justin@friendsandguests.com","serverSide":true}; + ReactOnRails.clearHydratedStores(); +var reduxProps, store, storeGenerator; +reduxProps = {"navbar":{"publicPaths":{"listingsIndexPath":"/s","aboutPath":"/about","faqPath":"/faq","pricingPath":"/pricing","communityUrl":"https://community.friendsandguests.com/login","hostsPath":"/hosts"},"user":{"id":3917,"avatarUrl":"https://res.cloudinary.com/dsm07vjyu/image/gravatar/d_default_avatar.png/60ffe5c75d594b26bfe72bace107f421.png","firstName":"Justin","messagesPath":"/inbox","profilePath":"/users/justingordon951","accountPath":"/account/edit","signOutPath":"/users/sign_out","adminPath":"/admin","listingsCount":0,"invitationsCount":0,"conversationsCount":0,"guestListMembershipRequestsCount":0},"signedInPaths":{"listingInvitationsPath":"/listing_invitations","joinedListingInvitationsPath":"/listing_memberships","favoritesPath":"/favorites","managePropertiesPath":"/manage/listings","newListingPath":"/manage/listings/new"}}}; +storeGenerator = ReactOnRails.getStoreGenerator('appStore'); +store = storeGenerator(reduxProps, railsContext); +ReactOnRails.setStore('appStore', store); + + var props = {}; + return ReactOnRails.serverRenderReactComponent({ + name: 'LayoutNavbar', + domNodeId: 'LayoutNavbar-react-component-9262e955-8eb5-4114-9ce5-bc9a53962271', + props: props, + trace: true, + railsContext: railsContext + }); +})() diff --git a/packages/react-on-rails-pro-node-renderer/tests/fixtures/projects/friendsandguests/1a7fe417/listingIndexRenderingRequest.js b/packages/react-on-rails-pro-node-renderer/tests/fixtures/projects/friendsandguests/1a7fe417/listingIndexRenderingRequest.js new file mode 100644 index 0000000000..f8edfc9271 --- /dev/null +++ b/packages/react-on-rails-pro-node-renderer/tests/fixtures/projects/friendsandguests/1a7fe417/listingIndexRenderingRequest.js @@ -0,0 +1,18 @@ +(function() { + var railsContext = {"inMailer":false,"i18nLocale":"en","i18nDefaultLocale":"en","href":"http://app.lvh.me:3000/s","location":"/s","scheme":"http","host":"app.lvh.me","port":3000,"pathname":"/s","search":null,"httpAcceptLanguage":"ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4","railsEnv":"development","honeybadgerEnv":"development","launchdarklyAllFlags":{"blv_redux":false,"temp-calendar":true},"launchdarklySettings":{"key":"test-key-1000","anonymous":false,"email":"user@example.com","firstName":"Test","lastName":"User"},"cloudinaryUrl":"https://res.cloudinary.com/dsm07vjyu/image/upload/","desktop":true,"tablet":false,"mobile":false,"userId":1000,"userEmail":"user@example.com","serverSide":true}; + ReactOnRails.clearHydratedStores(); +var reduxProps, store, storeGenerator; +reduxProps = {"navbar":{"publicPaths":{"listingsIndexPath":"/s","aboutPath":"/about","faqPath":"/faq","pricingPath":"/pricing","communityUrl":"https://community.friendsandguests.com/login","hostsPath":"/hosts"},"user":{"id":1000,"avatarUrl":"https://res.cloudinary.com/dsm07vjyu/image/gravatar/d_default_avatar.png/60ffe5c75d594b26bfe72bace107f421.png","firstName":"Test","messagesPath":"/inbox","profilePath":"/users/testuser1000","accountPath":"/account/edit","signOutPath":"/users/sign_out","adminPath":"/admin","listingsCount":0,"invitationsCount":0,"conversationsCount":0,"guestListMembershipRequestsCount":0},"signedInPaths":{"listingInvitationsPath":"/listing_invitations","joinedListingInvitationsPath":"/listing_memberships","favoritesPath":"/favorites","managePropertiesPath":"/manage/listings","newListingPath":"/manage/listings/new"}}}; +storeGenerator = ReactOnRails.getStoreGenerator('appStore'); +store = storeGenerator(reduxProps, railsContext); +ReactOnRails.setStore('appStore', store); + + var props = {"listings":[{"userContext":{"isManagedByCurrentUser":false,"favorited":false,"listingRelationshipType":"public_guest","hostRelationshipType":"unknown","guestListMembershipId":null},"id":6545,"title":"Sleek Silk Computer","price":null,"roomType":"shared_room","lat":20.759738,"lng":-156.453135,"apt":"283","country":"United States","city":"Kihei","state":"HI","zipCode":"96753","street":"123 Test Street","propertyType":null,"privacyMode":"public","displayMode":"full_details","favoritesCount":2,"displayAddress":"Kihei, HI, United States","htmlUrl":"/listings/6545","photos":[],"owner":{"avatarUrl":"https://res.cloudinary.com/dsm07vjyu/image/upload/v1494831684/ptrfmbuofsut09alijr0.png","coverImageUrl":"https://res.cloudinary.com/dsm07vjyu/image/upload/v1494831686/vyhxosmpf2jowxbefodt.jpg","id":2001,"username":"testuser2001","firstName":"Jane","lastName":"Smith","fullName":"Jane Smith","aboutMeDetails":"This is a test user profile description for testing purposes only.","createdAt":"2017-05-15T17:00:04.213+10:00","lastSignInAt":"2017-01-29T07:27:20.075+10:00","personalWebsiteUrl":".example.com","twitterUrl":null,"facebookUrl":null,"linkedinUrl":"http://linkedin.com/","vrboUrl":null,"airbnbUrl":null,"fbConnected":false,"url":"/users/testuser2001"}},{"userContext":{"isManagedByCurrentUser":false,"favorited":false,"listingRelationshipType":"public_guest","hostRelationshipType":"unknown","guestListMembershipId":null},"id":6546,"title":"Synergistic Leather Shirt","price":null,"roomType":"shared_room","lat":20.770863,"lng":-156.454992,"apt":"8872","country":"United States","city":"Kihei","state":"HI","zipCode":"96753","street":"456 Example Ave","propertyType":null,"privacyMode":"public","displayMode":"full_details","favoritesCount":3,"displayAddress":"Kihei, HI, United States","htmlUrl":"/listings/6546","photos":[{"cloudUrl":"https://res.cloudinary.com/dsm07vjyu/image/upload/ck9lhmsifpmoi8xyep4f.jpg","id":3662,"publicId":"ck9lhmsifpmoi8xyep4f","version":"1494831873","format":"jpg","position":0,"resourceType":"image","width":1024,"height":682,"description":null,"listingId":6546},{"cloudUrl":"https://res.cloudinary.com/dsm07vjyu/image/upload/znmwgsfvibk8xdploxw2.jpg","id":3663,"publicId":"znmwgsfvibk8xdploxw2","version":"1494831874","format":"jpg","position":1,"resourceType":"image","width":1280,"height":694,"description":null,"listingId":6546}],"owner":{"avatarUrl":"https://res.cloudinary.com/dsm07vjyu/image/upload/v1494831730/woqtbsvkbtqycbg12uum.png","coverImageUrl":"https://res.cloudinary.com/dsm07vjyu/image/upload/v1494831731/a3m5txdnjijykdqtpccu.png","id":2002,"username":"testuser2002","firstName":"John","lastName":"Doe","fullName":"John Doe","aboutMeDetails":"This is a test user profile description for testing purposes only.","createdAt":"2017-05-15T17:00:05.292+10:00","lastSignInAt":"2016-05-24T17:55:19.323+10:00","personalWebsiteUrl":".example.com","twitterUrl":null,"facebookUrl":null,"linkedinUrl":"http://linkedin.com/","vrboUrl":null,"airbnbUrl":null,"fbConnected":false,"url":"/users/testuser2002"}},{"userContext":{"isManagedByCurrentUser":false,"favorited":false,"listingRelationshipType":"public_guest","hostRelationshipType":"unknown","guestListMembershipId":null},"id":6509,"title":"Sleek Paper Pants","price":37,"roomType":"shared_room","lat":20.909175,"lng":-156.400598,"apt":"34779","country":"United States","city":"Paia","state":"HI","zipCode":"96779","street":"789 Sample Blvd","propertyType":null,"privacyMode":"public","displayMode":"full_details","favoritesCount":0,"displayAddress":"Paia, HI, United States","htmlUrl":"/listings/6509","photos":[{"cloudUrl":"https://res.cloudinary.com/dsm07vjyu/image/upload/b4th3hqehelm4lih2aem.jpg","id":3600,"publicId":"b4th3hqehelm4lih2aem","version":"1494831742","format":"jpg","position":0,"resourceType":"image","width":1600,"height":1200,"description":null,"listingId":6509},{"cloudUrl":"https://res.cloudinary.com/dsm07vjyu/image/upload/yiqlje5i6atk2rkvdbum.jpg","id":3601,"publicId":"yiqlje5i6atk2rkvdbum","version":"1494831744","format":"jpg","position":1,"resourceType":"image","width":1440,"height":900,"description":null,"listingId":6509}],"owner":{"avatarUrl":"https://res.cloudinary.com/dsm07vjyu/image/facebook/d_default_avatar.png/111420839208092.png","coverImageUrl":null,"id":2003,"username":"testuser2003","firstName":"Bob","lastName":"Jones","fullName":"Bob Jones","aboutMeDetails":"This is a test user profile description for testing purposes only.","createdAt":"2017-05-15T17:00:02.363+10:00","lastSignInAt":"2016-04-25T20:00:38.505+10:00","personalWebsiteUrl":".example.com","twitterUrl":null,"facebookUrl":"https://facebook.com/test123","linkedinUrl":"http://linkedin.com/","vrboUrl":null,"airbnbUrl":null,"fbConnected":true,"url":"/users/testuser2003"}},{"userContext":{"isManagedByCurrentUser":false,"favorited":false,"listingRelationshipType":"public_guest","hostRelationshipType":"unknown","guestListMembershipId":null},"id":6511,"title":"Awesome Copper Gloves","roomType":"shared_room","lat":null,"lng":null,"country":"United States","city":"Kahului","state":"HI","privacyMode":"private","displayMode":"limited_preview","favoritesCount":0,"displayAddress":"Kahului, HI, United States","htmlUrl":"/listings/6511","photos":[{"cloudUrl":"https://res.cloudinary.com/dsm07vjyu/image/upload/okp9bcese5hztbzyujap.jpg","id":3602,"publicId":"okp9bcese5hztbzyujap","version":"1494831746","format":"jpg","position":0,"resourceType":"image","width":3264,"height":2448,"description":null,"listingId":6511}]},{"userContext":{"isManagedByCurrentUser":false,"favorited":false,"listingRelationshipType":"public_guest","hostRelationshipType":"unknown","guestListMembershipId":null},"id":6517,"title":"Lightweight Steel Shoes","price":457,"roomType":"entire_home","lat":20.911737,"lng":-156.404244,"apt":"723","country":"United States","city":"Paia","state":"HI","zipCode":"96779","street":"321 Demo Dr","propertyType":null,"privacyMode":"public","displayMode":"full_details","favoritesCount":2,"displayAddress":"Paia, HI, United States","htmlUrl":"/listings/6517","photos":[],"owner":{"avatarUrl":"https://res.cloudinary.com/dsm07vjyu/image/upload/v1494831692/yszafdzkragaqumyfhca.png","coverImageUrl":"https://res.cloudinary.com/dsm07vjyu/image/upload/v1494831694/zvxrsdvokvnfhef2s6td.jpg","id":2004,"username":"testuser2004","firstName":"Alice","lastName":"Brown","fullName":"Alice Brown","aboutMeDetails":"This is a test user profile description for testing purposes only.","createdAt":"2017-05-15T17:00:04.367+10:00","lastSignInAt":"2016-06-12T02:36:36.464+10:00","personalWebsiteUrl":".example.com","twitterUrl":null,"facebookUrl":null,"linkedinUrl":"http://linkedin.com/","vrboUrl":null,"airbnbUrl":null,"fbConnected":false,"url":"/users/testuser2004"}},{"userContext":{"isManagedByCurrentUser":false,"favorited":false,"listingRelationshipType":"public_guest","hostRelationshipType":"unknown","guestListMembershipId":null},"id":6519,"title":"Awesome Concrete Shoes","roomType":"entire_home","lat":null,"lng":null,"country":"United States","city":"Lahaina","state":"HI","privacyMode":"private","displayMode":"limited_preview","favoritesCount":0,"displayAddress":"Lahaina, HI, United States","htmlUrl":"/listings/6519","photos":[{"cloudUrl":"https://res.cloudinary.com/dsm07vjyu/image/upload/axj8rhwg6lxvhhseedr8.jpg","id":3616,"publicId":"axj8rhwg6lxvhhseedr8","version":"1494831775","format":"jpg","position":0,"resourceType":"image","width":1600,"height":1200,"description":null,"listingId":6519}]},{"userContext":{"isManagedByCurrentUser":false,"favorited":false,"listingRelationshipType":"public_guest","hostRelationshipType":"unknown","guestListMembershipId":null},"id":6522,"title":"Synergistic Marble Table","roomType":"shared_room","lat":null,"lng":null,"country":"United States","city":"Lahaina","state":"HI","privacyMode":"private","displayMode":"limited_preview","favoritesCount":0,"displayAddress":"Lahaina, HI, United States","htmlUrl":"/listings/6522","photos":[{"cloudUrl":"https://res.cloudinary.com/dsm07vjyu/image/upload/j6wik1eeudpuhqqmbp1o.jpg","id":3622,"publicId":"j6wik1eeudpuhqqmbp1o","version":"1494831788","format":"jpg","position":0,"resourceType":"image","width":1024,"height":682,"description":null,"listingId":6522}]},{"userContext":{"isManagedByCurrentUser":false,"favorited":false,"listingRelationshipType":"public_guest","hostRelationshipType":"unknown","guestListMembershipId":null},"id":6525,"title":"Small Marble Gloves","roomType":"shared_room","lat":null,"lng":null,"country":"United States","city":"Kihei","state":"HI","privacyMode":"private","displayMode":"limited_preview","favoritesCount":0,"displayAddress":"Kihei, HI, United States","htmlUrl":"/listings/6525","photos":[{"cloudUrl":"https://res.cloudinary.com/dsm07vjyu/image/upload/fopxiwlltnj9xyyqlkih.jpg","id":3626,"publicId":"fopxiwlltnj9xyyqlkih","version":"1494831796","format":"jpg","position":0,"resourceType":"image","width":3264,"height":2448,"description":null,"listingId":6525}]},{"userContext":{"isManagedByCurrentUser":false,"favorited":false,"listingRelationshipType":"public_guest","hostRelationshipType":"unknown","guestListMembershipId":null},"id":6527,"title":"Ergonomic Bronze Pants","price":559,"roomType":"private_room","lat":20.738545,"lng":-156.451875,"apt":"9545","country":"United States","city":"Kihei","state":"HI","zipCode":"96753","street":"555 Test Ln","propertyType":null,"privacyMode":"public","displayMode":"full_details","favoritesCount":0,"displayAddress":"Kihei, HI, United States","htmlUrl":"/listings/6527","photos":[{"cloudUrl":"https://res.cloudinary.com/dsm07vjyu/image/upload/fxivflmpyuf0dadwaf88.jpg","id":3630,"publicId":"fxivflmpyuf0dadwaf88","version":"1494831804","format":"jpg","position":0,"resourceType":"image","width":1024,"height":682,"description":null,"listingId":6527},{"cloudUrl":"https://res.cloudinary.com/dsm07vjyu/image/upload/dlmmuvin0pxmcgaes7ef.jpg","id":3631,"publicId":"dlmmuvin0pxmcgaes7ef","version":"1494831806","format":"jpg","position":1,"resourceType":"image","width":1280,"height":694,"description":null,"listingId":6527}],"owner":{"avatarUrl":"https://res.cloudinary.com/dsm07vjyu/image/gravatar/d_default_avatar.png/0d4f81d3d1e01497b8cc7e467a93833c.png","coverImageUrl":null,"id":2005,"username":"testuser2005","firstName":"Carol","lastName":"Davis","fullName":"Carol Davis","aboutMeDetails":"This is a test user profile description for testing purposes only.","createdAt":"2017-05-15T17:00:03.981+10:00","lastSignInAt":"2016-10-26T04:41:00.029+10:00","personalWebsiteUrl":".example.com","twitterUrl":null,"facebookUrl":null,"linkedinUrl":"http://linkedin.com/","vrboUrl":null,"airbnbUrl":null,"fbConnected":false,"url":"/users/testuser2005"}},{"userContext":{"isManagedByCurrentUser":false,"favorited":false,"listingRelationshipType":"public_guest","hostRelationshipType":"unknown","guestListMembershipId":null},"id":6541,"title":"Enormous Bronze Table","roomType":"shared_room","lat":null,"lng":null,"country":"United States","city":"Kihei","state":"HI","privacyMode":"private","displayMode":"limited_preview","favoritesCount":0,"displayAddress":"Kihei, HI, United States","htmlUrl":"/listings/6541","photos":[{"cloudUrl":"https://res.cloudinary.com/dsm07vjyu/image/upload/gdeuvdmcc465deiiy08r.jpg","id":3654,"publicId":"gdeuvdmcc465deiiy08r","version":"1494831855","format":"jpg","position":0,"resourceType":"image","width":1024,"height":682,"description":null,"listingId":6541}]}],"meta":{"location":"North America","swLat":20.0,"swLng":-160.0,"neLat":70.0,"neLng":-60.0,"roomTypes":[],"bedrooms":null,"bathrooms":null,"beds":null,"relationshipTypes":[],"price":[],"amenityIds":[],"pageSize":17,"page":1,"guests":null,"totalCount":10,"hasMore":false},"bundle":"listings-index-client-bundle","user":{"avatarUrl":"https://res.cloudinary.com/dsm07vjyu/image/gravatar/d_default_avatar.png/60ffe5c75d594b26bfe72bace107f421.png","coverImageUrl":null,"id":1000,"username":"testuser1000","firstName":"Test","lastName":"User","fullName":"Test User","aboutMeDetails":null,"createdAt":"2017-05-15T17:05:31.376+10:00","lastSignInAt":"2017-05-19T16:47:46.141+10:00","personalWebsiteUrl":null,"twitterUrl":null,"facebookUrl":null,"linkedinUrl":null,"vrboUrl":null,"airbnbUrl":null,"fbConnected":false,"url":"/users/testuser1000"}}; + return ReactOnRails.serverRenderReactComponent({ + name: 'ListingsIndex', + domNodeId: 'ListingsIndex-react-component-5ec6d337-6f93-45ae-965b-304ded14c68f', + props: props, + trace: true, + railsContext: railsContext + }); +})() diff --git a/packages/react-on-rails-pro-node-renderer/tests/fixtures/projects/friendsandguests/1a7fe417/listingsShowRenderingRequest.js b/packages/react-on-rails-pro-node-renderer/tests/fixtures/projects/friendsandguests/1a7fe417/listingsShowRenderingRequest.js new file mode 100644 index 0000000000..9704bbc386 --- /dev/null +++ b/packages/react-on-rails-pro-node-renderer/tests/fixtures/projects/friendsandguests/1a7fe417/listingsShowRenderingRequest.js @@ -0,0 +1,18 @@ +(function() { + var railsContext = {"inMailer":false,"i18nLocale":"en","i18nDefaultLocale":"en","href":"http://app.lvh.me:3000/listings/6546","location":"/listings/6546","scheme":"http","host":"app.lvh.me","port":3000,"pathname":"/listings/6546","search":null,"httpAcceptLanguage":"ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4","railsEnv":"development","honeybadgerEnv":"development","launchdarklyAllFlags":{"blv_redux":false,"temp-calendar":true},"launchdarklySettings":{"key":"3917","anonymous":false,"email":"justin@friendsandguests.com","firstName":"Justin","lastName":"Gordon"},"cloudinaryUrl":"https://res.cloudinary.com/dsm07vjyu/image/upload/","desktop":true,"tablet":false,"mobile":false,"userId":3917,"userEmail":"justin@friendsandguests.com","serverSide":true}; + ReactOnRails.clearHydratedStores(); +var reduxProps, store, storeGenerator; +reduxProps = {"navbar":{"publicPaths":{"listingsIndexPath":"/s","aboutPath":"/about","faqPath":"/faq","pricingPath":"/pricing","communityUrl":"https://community.friendsandguests.com/login","hostsPath":"/hosts"},"user":{"id":3917,"avatarUrl":"https://res.cloudinary.com/dsm07vjyu/image/gravatar/d_default_avatar.png/60ffe5c75d594b26bfe72bace107f421.png","firstName":"Justin","messagesPath":"/inbox","profilePath":"/users/justingordon951","accountPath":"/account/edit","signOutPath":"/users/sign_out","adminPath":"/admin","listingsCount":0,"invitationsCount":0,"conversationsCount":0,"guestListMembershipRequestsCount":0},"signedInPaths":{"listingInvitationsPath":"/listing_invitations","joinedListingInvitationsPath":"/listing_memberships","favoritesPath":"/favorites","managePropertiesPath":"/manage/listings","newListingPath":"/manage/listings/new"}}}; +storeGenerator = ReactOnRails.getStoreGenerator('appStore'); +store = storeGenerator(reduxProps, railsContext); +ReactOnRails.setStore('appStore', store); + + var props = {"listing":{"userContext":{"isManagedByCurrentUser":false,"favorited":false,"listingRelationshipType":"public_guest","hostRelationshipType":"unknown","guestListMembershipId":null},"id":6546,"title":"Synergistic Leather Shirt","summary":"Please send me a message if you'd like to book my place or get on my guest list.","favoritesCount":3,"state":"HI","city":"Kihei","country":"United States","lat":20.770863,"lng":-156.454992,"bathrooms":3.5,"bedrooms":2,"beds":1,"maxGuests":4,"roomType":"shared_room","privacyMode":"public","displayMode":"full_details","createdAt":"2017-03-25T05:24:25.077+10:00","updatedAt":"2017-05-19T13:46:30.684+10:00","description":"Permit: BBWK2009-0003. GET/TAT: W01107960-01.\n\nKahale Makani is uust around the corner from Baby Beach and Baldwin Beach. Fully remodeled!!\n\nKahale Makani is located off the ocean in Spreckelsville / Paia. By car, we're just one minute to Spreckelsville beach, and one minute to Paia. Take a morning walk alon the beach to Paia for breakfast. Kahale Makani has a two story main house, sitting next to the garage/cottage structure.\n\n\nThe main house is lovely, with a modern style, and plenty of light. The small yard area to the side of the house has great privacy, a large deck, and is surrounded by tropical plants. The interior has a well equipped kitchen, TV/DVD, CD stereo, telephone, laundry, and fresh new furnishings.\n\nWill you spend time indoors? With a patio like this, we seriously doubt it!! The large overhung patio is a perfect place to sit outdoors - grill dinner on the built-in gas BBQ, and dine on the patio. Lounge on the huge outdoor sofa / chairs.\n\nKitchen –\n•\tlots of counter space and gourmet appliances.\n•\tFisher and Paykel fridge and drawer style dishwasher.\n\nMaster bedroom –\n•\tKing bed\n•\tTV/DVD\n•\tEnsuite bathroom with soaking tub and large shower\n\nBedroom #2 –\n•\tQueen bed with bamboo bed frame\n•\tShares bath with bedroom #3\n\nBedroom #3 –\n•\tTwin beds\n•\tShares bath with bedroom #3\n\nThere are very few legal vacation rental homes / cottages in Maui that offer such a wonderful setting, with such close proximity to the beach.\nHOUSE RULES\nAloha! We are delighted that you are considering this property for your vacation lodging. We are sure that you would enjoy this lovely vacation home.\nThis property has a vacation rental permit issued by the County of Maui, and is subject to the rules and restrictions imposed by the County for all short term rental homes. Please understand that we would be unable to accept a rental that does not agree to abide by these rules. Note: properties without a short term rental permit are subject to closure by the County.\n1. Neighbors - Please be considerate of our neighbors. Noise carries easily to their homes, particularly in the evening. NO loud music, NO parties, NO amplified sound of any nature at any time. Many neighbors must be up early in the morning to go to work, and it's important that your use of this property does not impact them in any way.\n2. Quiet Hours - Quiet time is from 9pm to 8am.\n3. Use of the Property - Additional friends/family CANNOT be invited to the property and it cannot be used as a 'meeting place'. The property can be used ONLY by the guests listed on the rental agreement. The County law allows us to accommodate a maximum of two guests x the number of bedrooms.\n4. Parking - There is plenty of parking on the property. Vehicles CANNOT be parked on the street at any time. When vehicles are on the street, there is insufficient space for emergency vehicles, fire trucks, the trash truck or neighbors to get down the road.\nAdditional information with respect to care and maintenance of the house will be included in the rental agreement.","amenityIds":[19,10,24,28,34,1,3],"checkIn":8,"checkOut":12,"cleaningFee":null,"deposit":null,"minimumStay":null,"monthlyDiscount":0,"price":null,"weeklyDiscount":0,"propertyType":null,"closeTo":null,"apt":"8872","street":"505 Ekahi Way","zipCode":"96753","urls":[],"newConversationPath":"/conversations/new?listing_id=6546","photos":[{"cloudUrl":"https://res.cloudinary.com/dsm07vjyu/image/upload/ck9lhmsifpmoi8xyep4f.jpg","id":3662,"publicId":"ck9lhmsifpmoi8xyep4f","version":"1494831873","format":"jpg","position":0,"resourceType":"image","width":1024,"height":682,"description":null,"listingId":6546},{"cloudUrl":"https://res.cloudinary.com/dsm07vjyu/image/upload/znmwgsfvibk8xdploxw2.jpg","id":3663,"publicId":"znmwgsfvibk8xdploxw2","version":"1494831874","format":"jpg","position":1,"resourceType":"image","width":1280,"height":694,"description":null,"listingId":6546}],"owner":{"avatarUrl":"https://res.cloudinary.com/dsm07vjyu/image/upload/v1494831730/woqtbsvkbtqycbg12uum.png","coverImageUrl":"https://res.cloudinary.com/dsm07vjyu/image/upload/v1494831731/a3m5txdnjijykdqtpccu.png","id":3916,"username":"michaelfox885","firstName":"michael","lastName":"fox","fullName":"michael fox","aboutMeDetails":"I have been in the Maui condo rental business for over twenty five years and have, over the years sent thousands of happy guests to our condos. We're located in Burnaby, British Columbia, Canada (just outside Vancouver). We have been married for thirty eight years and have three children with whom we spent many happy holidays on Maui and continue to do so now as well. At one point we even talked about packing up and moving to Maui but that did not materialize. Our hobbies are cycling (especially around our gorgeous seawall here in Vancouver), walking, yoga, reading and going to the cinema.","createdAt":"2017-05-15T17:00:05.292+10:00","lastSignInAt":"2016-05-24T17:55:19.323+10:00","personalWebsiteUrl":".example.com","twitterUrl":null,"facebookUrl":null,"linkedinUrl":"http://linkedin.com/","vrboUrl":null,"airbnbUrl":null,"fbConnected":false,"url":"/users/michaelfox885"},"systemHouseRules":[],"customHouseRules":[]},"bundle":"listings-show-client-bundle","user":{"avatarUrl":"https://res.cloudinary.com/dsm07vjyu/image/gravatar/d_default_avatar.png/60ffe5c75d594b26bfe72bace107f421.png","coverImageUrl":null,"id":3917,"username":"justingordon951","firstName":"Justin","lastName":"Gordon","fullName":"Justin Gordon","aboutMeDetails":null,"createdAt":"2017-05-15T17:05:31.376+10:00","lastSignInAt":"2017-05-19T16:47:46.141+10:00","personalWebsiteUrl":null,"twitterUrl":null,"facebookUrl":null,"linkedinUrl":null,"vrboUrl":null,"airbnbUrl":null,"fbConnected":false,"url":"/users/justingordon951"}}; + return ReactOnRails.serverRenderReactComponent({ + name: 'ListingsShow', + domNodeId: 'ListingsShow-react-component-37bfcbad-61e4-4882-937f-546a163dbaec', + props: props, + trace: true, + railsContext: railsContext + }); +})() diff --git a/packages/react-on-rails-pro-node-renderer/tests/fixtures/projects/friendsandguests/1a7fe417/server-bundle.js b/packages/react-on-rails-pro-node-renderer/tests/fixtures/projects/friendsandguests/1a7fe417/server-bundle.js new file mode 100644 index 0000000000..729a34ee62 --- /dev/null +++ b/packages/react-on-rails-pro-node-renderer/tests/fixtures/projects/friendsandguests/1a7fe417/server-bundle.js @@ -0,0 +1,20392 @@ +/******/ (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; + /******/ + /******/ // identity function for calling harmony imports with the correct context + /******/ __webpack_require__.i = function (value) { + return value; + }; + /******/ + /******/ // define getter function for harmony exports + /******/ __webpack_require__.d = function (exports, name, getter) { + /******/ if (!__webpack_require__.o(exports, name)) { + /******/ Object.defineProperty(exports, name, { + /******/ configurable: false, + /******/ enumerable: true, + /******/ get: getter, + /******/ + }); + /******/ + } + /******/ + }; + /******/ + /******/ // 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 = 897)); + /******/ +})( + /************************************************************************/ + /******/ [ + /* 0 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/prop-types/index.js ***! + \*******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\nif (true) {\n var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' &&\n Symbol.for &&\n Symbol.for('react.element')) ||\n 0xeac7;\n\n var isValidElement = function(object) {\n return typeof object === 'object' &&\n object !== null &&\n object.$$typeof === REACT_ELEMENT_TYPE;\n };\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = __webpack_require__(/*! ./factoryWithTypeCheckers */ 1219)(isValidElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/prop-types/index.js\n// module id = 0\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/prop-types/index.js?", + ); + + /***/ + }, + /* 1 */ + /* unknown exports provided */ + /* all exports used */ + /*!**************************!*\ + !*** ./~/react/react.js ***! + \**************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nmodule.exports = __webpack_require__(/*! ./lib/React */ 83);\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react/react.js\n// module id = 1\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react/react.js?', + ); + + /***/ + }, + /* 2 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/classnames/index.js ***! + \*******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!\n Copyright (c) 2016 Jed Watson.\n Licensed under the MIT License (MIT), see\n http://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames () {\n\t\tvar classes = [];\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (!arg) continue;\n\n\t\t\tvar argType = typeof arg;\n\n\t\t\tif (argType === 'string' || argType === 'number') {\n\t\t\t\tclasses.push(arg);\n\t\t\t} else if (Array.isArray(arg)) {\n\t\t\t\tclasses.push(classNames.apply(null, arg));\n\t\t\t} else if (argType === 'object') {\n\t\t\t\tfor (var key in arg) {\n\t\t\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\t\t\tclasses.push(key);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.join(' ');\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tmodule.exports = classNames;\n\t} else if (true) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\t!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = function () {\n\t\t\treturn classNames;\n\t\t}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/classnames/index.js\n// module id = 2\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/classnames/index.js?", + ); + + /***/ + }, + /* 3 */ + /* unknown exports provided */ + /* all exports used */ + /*!****************************!*\ + !*** ./~/moment/moment.js ***! + \****************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "/* WEBPACK VAR INJECTION */(function(module) {//! moment.js\n//! version : 2.18.1\n//! authors : Tim Wood, Iskren Chernev, Moment.js contributors\n//! license : MIT\n//! momentjs.com\n\n;(function (global, factory) {\n true ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n global.moment = factory()\n}(this, (function () { 'use strict';\n\nvar hookCallback;\n\nfunction hooks () {\n return hookCallback.apply(null, arguments);\n}\n\n// This is done to register the method called with moment()\n// without creating circular dependencies.\nfunction setHookCallback (callback) {\n hookCallback = callback;\n}\n\nfunction isArray(input) {\n return input instanceof Array || Object.prototype.toString.call(input) === '[object Array]';\n}\n\nfunction isObject(input) {\n // IE8 will treat undefined and null as object if it wasn't for\n // input != null\n return input != null && Object.prototype.toString.call(input) === '[object Object]';\n}\n\nfunction isObjectEmpty(obj) {\n var k;\n for (k in obj) {\n // even if its not own property I'd still call it non-empty\n return false;\n }\n return true;\n}\n\nfunction isUndefined(input) {\n return input === void 0;\n}\n\nfunction isNumber(input) {\n return typeof input === 'number' || Object.prototype.toString.call(input) === '[object Number]';\n}\n\nfunction isDate(input) {\n return input instanceof Date || Object.prototype.toString.call(input) === '[object Date]';\n}\n\nfunction map(arr, fn) {\n var res = [], i;\n for (i = 0; i < arr.length; ++i) {\n res.push(fn(arr[i], i));\n }\n return res;\n}\n\nfunction hasOwnProp(a, b) {\n return Object.prototype.hasOwnProperty.call(a, b);\n}\n\nfunction extend(a, b) {\n for (var i in b) {\n if (hasOwnProp(b, i)) {\n a[i] = b[i];\n }\n }\n\n if (hasOwnProp(b, 'toString')) {\n a.toString = b.toString;\n }\n\n if (hasOwnProp(b, 'valueOf')) {\n a.valueOf = b.valueOf;\n }\n\n return a;\n}\n\nfunction createUTC (input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, true).utc();\n}\n\nfunction defaultParsingFlags() {\n // We need to deep clone this object.\n return {\n empty : false,\n unusedTokens : [],\n unusedInput : [],\n overflow : -2,\n charsLeftOver : 0,\n nullInput : false,\n invalidMonth : null,\n invalidFormat : false,\n userInvalidated : false,\n iso : false,\n parsedDateParts : [],\n meridiem : null,\n rfc2822 : false,\n weekdayMismatch : false\n };\n}\n\nfunction getParsingFlags(m) {\n if (m._pf == null) {\n m._pf = defaultParsingFlags();\n }\n return m._pf;\n}\n\nvar some;\nif (Array.prototype.some) {\n some = Array.prototype.some;\n} else {\n some = function (fun) {\n var t = Object(this);\n var len = t.length >>> 0;\n\n for (var i = 0; i < len; i++) {\n if (i in t && fun.call(this, t[i], i, t)) {\n return true;\n }\n }\n\n return false;\n };\n}\n\nvar some$1 = some;\n\nfunction isValid(m) {\n if (m._isValid == null) {\n var flags = getParsingFlags(m);\n var parsedParts = some$1.call(flags.parsedDateParts, function (i) {\n return i != null;\n });\n var isNowValid = !isNaN(m._d.getTime()) &&\n flags.overflow < 0 &&\n !flags.empty &&\n !flags.invalidMonth &&\n !flags.invalidWeekday &&\n !flags.nullInput &&\n !flags.invalidFormat &&\n !flags.userInvalidated &&\n (!flags.meridiem || (flags.meridiem && parsedParts));\n\n if (m._strict) {\n isNowValid = isNowValid &&\n flags.charsLeftOver === 0 &&\n flags.unusedTokens.length === 0 &&\n flags.bigHour === undefined;\n }\n\n if (Object.isFrozen == null || !Object.isFrozen(m)) {\n m._isValid = isNowValid;\n }\n else {\n return isNowValid;\n }\n }\n return m._isValid;\n}\n\nfunction createInvalid (flags) {\n var m = createUTC(NaN);\n if (flags != null) {\n extend(getParsingFlags(m), flags);\n }\n else {\n getParsingFlags(m).userInvalidated = true;\n }\n\n return m;\n}\n\n// Plugins that add properties should also add the key here (null value),\n// so we can properly clone ourselves.\nvar momentProperties = hooks.momentProperties = [];\n\nfunction copyConfig(to, from) {\n var i, prop, val;\n\n if (!isUndefined(from._isAMomentObject)) {\n to._isAMomentObject = from._isAMomentObject;\n }\n if (!isUndefined(from._i)) {\n to._i = from._i;\n }\n if (!isUndefined(from._f)) {\n to._f = from._f;\n }\n if (!isUndefined(from._l)) {\n to._l = from._l;\n }\n if (!isUndefined(from._strict)) {\n to._strict = from._strict;\n }\n if (!isUndefined(from._tzm)) {\n to._tzm = from._tzm;\n }\n if (!isUndefined(from._isUTC)) {\n to._isUTC = from._isUTC;\n }\n if (!isUndefined(from._offset)) {\n to._offset = from._offset;\n }\n if (!isUndefined(from._pf)) {\n to._pf = getParsingFlags(from);\n }\n if (!isUndefined(from._locale)) {\n to._locale = from._locale;\n }\n\n if (momentProperties.length > 0) {\n for (i = 0; i < momentProperties.length; i++) {\n prop = momentProperties[i];\n val = from[prop];\n if (!isUndefined(val)) {\n to[prop] = val;\n }\n }\n }\n\n return to;\n}\n\nvar updateInProgress = false;\n\n// Moment prototype object\nfunction Moment(config) {\n copyConfig(this, config);\n this._d = new Date(config._d != null ? config._d.getTime() : NaN);\n if (!this.isValid()) {\n this._d = new Date(NaN);\n }\n // Prevent infinite loop in case updateOffset creates new moment\n // objects.\n if (updateInProgress === false) {\n updateInProgress = true;\n hooks.updateOffset(this);\n updateInProgress = false;\n }\n}\n\nfunction isMoment (obj) {\n return obj instanceof Moment || (obj != null && obj._isAMomentObject != null);\n}\n\nfunction absFloor (number) {\n if (number < 0) {\n // -0 -> 0\n return Math.ceil(number) || 0;\n } else {\n return Math.floor(number);\n }\n}\n\nfunction toInt(argumentForCoercion) {\n var coercedNumber = +argumentForCoercion,\n value = 0;\n\n if (coercedNumber !== 0 && isFinite(coercedNumber)) {\n value = absFloor(coercedNumber);\n }\n\n return value;\n}\n\n// compare two arrays, return the number of differences\nfunction compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if ((dontConvert && array1[i] !== array2[i]) ||\n (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n}\n\nfunction warn(msg) {\n if (hooks.suppressDeprecationWarnings === false &&\n (typeof console !== 'undefined') && console.warn) {\n console.warn('Deprecation warning: ' + msg);\n }\n}\n\nfunction deprecate(msg, fn) {\n var firstTime = true;\n\n return extend(function () {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(null, msg);\n }\n if (firstTime) {\n var args = [];\n var arg;\n for (var i = 0; i < arguments.length; i++) {\n arg = '';\n if (typeof arguments[i] === 'object') {\n arg += '\\n[' + i + '] ';\n for (var key in arguments[0]) {\n arg += key + ': ' + arguments[0][key] + ', ';\n }\n arg = arg.slice(0, -2); // Remove trailing comma and space\n } else {\n arg = arguments[i];\n }\n args.push(arg);\n }\n warn(msg + '\\nArguments: ' + Array.prototype.slice.call(args).join('') + '\\n' + (new Error()).stack);\n firstTime = false;\n }\n return fn.apply(this, arguments);\n }, fn);\n}\n\nvar deprecations = {};\n\nfunction deprecateSimple(name, msg) {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(name, msg);\n }\n if (!deprecations[name]) {\n warn(msg);\n deprecations[name] = true;\n }\n}\n\nhooks.suppressDeprecationWarnings = false;\nhooks.deprecationHandler = null;\n\nfunction isFunction(input) {\n return input instanceof Function || Object.prototype.toString.call(input) === '[object Function]';\n}\n\nfunction set (config) {\n var prop, i;\n for (i in config) {\n prop = config[i];\n if (isFunction(prop)) {\n this[i] = prop;\n } else {\n this['_' + i] = prop;\n }\n }\n this._config = config;\n // Lenient ordinal parsing accepts just a number in addition to\n // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n this._dayOfMonthOrdinalParseLenient = new RegExp(\n (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +\n '|' + (/\\d{1,2}/).source);\n}\n\nfunction mergeConfigs(parentConfig, childConfig) {\n var res = extend({}, parentConfig), prop;\n for (prop in childConfig) {\n if (hasOwnProp(childConfig, prop)) {\n if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {\n res[prop] = {};\n extend(res[prop], parentConfig[prop]);\n extend(res[prop], childConfig[prop]);\n } else if (childConfig[prop] != null) {\n res[prop] = childConfig[prop];\n } else {\n delete res[prop];\n }\n }\n }\n for (prop in parentConfig) {\n if (hasOwnProp(parentConfig, prop) &&\n !hasOwnProp(childConfig, prop) &&\n isObject(parentConfig[prop])) {\n // make sure changes to properties don't modify parent config\n res[prop] = extend({}, res[prop]);\n }\n }\n return res;\n}\n\nfunction Locale(config) {\n if (config != null) {\n this.set(config);\n }\n}\n\nvar keys;\n\nif (Object.keys) {\n keys = Object.keys;\n} else {\n keys = function (obj) {\n var i, res = [];\n for (i in obj) {\n if (hasOwnProp(obj, i)) {\n res.push(i);\n }\n }\n return res;\n };\n}\n\nvar keys$1 = keys;\n\nvar defaultCalendar = {\n sameDay : '[Today at] LT',\n nextDay : '[Tomorrow at] LT',\n nextWeek : 'dddd [at] LT',\n lastDay : '[Yesterday at] LT',\n lastWeek : '[Last] dddd [at] LT',\n sameElse : 'L'\n};\n\nfunction calendar (key, mom, now) {\n var output = this._calendar[key] || this._calendar['sameElse'];\n return isFunction(output) ? output.call(mom, now) : output;\n}\n\nvar defaultLongDateFormat = {\n LTS : 'h:mm:ss A',\n LT : 'h:mm A',\n L : 'MM/DD/YYYY',\n LL : 'MMMM D, YYYY',\n LLL : 'MMMM D, YYYY h:mm A',\n LLLL : 'dddd, MMMM D, YYYY h:mm A'\n};\n\nfunction longDateFormat (key) {\n var format = this._longDateFormat[key],\n formatUpper = this._longDateFormat[key.toUpperCase()];\n\n if (format || !formatUpper) {\n return format;\n }\n\n this._longDateFormat[key] = formatUpper.replace(/MMMM|MM|DD|dddd/g, function (val) {\n return val.slice(1);\n });\n\n return this._longDateFormat[key];\n}\n\nvar defaultInvalidDate = 'Invalid date';\n\nfunction invalidDate () {\n return this._invalidDate;\n}\n\nvar defaultOrdinal = '%d';\nvar defaultDayOfMonthOrdinalParse = /\\d{1,2}/;\n\nfunction ordinal (number) {\n return this._ordinal.replace('%d', number);\n}\n\nvar defaultRelativeTime = {\n future : 'in %s',\n past : '%s ago',\n s : 'a few seconds',\n ss : '%d seconds',\n m : 'a minute',\n mm : '%d minutes',\n h : 'an hour',\n hh : '%d hours',\n d : 'a day',\n dd : '%d days',\n M : 'a month',\n MM : '%d months',\n y : 'a year',\n yy : '%d years'\n};\n\nfunction relativeTime (number, withoutSuffix, string, isFuture) {\n var output = this._relativeTime[string];\n return (isFunction(output)) ?\n output(number, withoutSuffix, string, isFuture) :\n output.replace(/%d/i, number);\n}\n\nfunction pastFuture (diff, output) {\n var format = this._relativeTime[diff > 0 ? 'future' : 'past'];\n return isFunction(format) ? format(output) : format.replace(/%s/i, output);\n}\n\nvar aliases = {};\n\nfunction addUnitAlias (unit, shorthand) {\n var lowerCase = unit.toLowerCase();\n aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;\n}\n\nfunction normalizeUnits(units) {\n return typeof units === 'string' ? aliases[units] || aliases[units.toLowerCase()] : undefined;\n}\n\nfunction normalizeObjectUnits(inputObject) {\n var normalizedInput = {},\n normalizedProp,\n prop;\n\n for (prop in inputObject) {\n if (hasOwnProp(inputObject, prop)) {\n normalizedProp = normalizeUnits(prop);\n if (normalizedProp) {\n normalizedInput[normalizedProp] = inputObject[prop];\n }\n }\n }\n\n return normalizedInput;\n}\n\nvar priorities = {};\n\nfunction addUnitPriority(unit, priority) {\n priorities[unit] = priority;\n}\n\nfunction getPrioritizedUnits(unitsObj) {\n var units = [];\n for (var u in unitsObj) {\n units.push({unit: u, priority: priorities[u]});\n }\n units.sort(function (a, b) {\n return a.priority - b.priority;\n });\n return units;\n}\n\nfunction makeGetSet (unit, keepTime) {\n return function (value) {\n if (value != null) {\n set$1(this, unit, value);\n hooks.updateOffset(this, keepTime);\n return this;\n } else {\n return get(this, unit);\n }\n };\n}\n\nfunction get (mom, unit) {\n return mom.isValid() ?\n mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]() : NaN;\n}\n\nfunction set$1 (mom, unit, value) {\n if (mom.isValid()) {\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);\n }\n}\n\n// MOMENTS\n\nfunction stringGet (units) {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units]();\n }\n return this;\n}\n\n\nfunction stringSet (units, value) {\n if (typeof units === 'object') {\n units = normalizeObjectUnits(units);\n var prioritized = getPrioritizedUnits(units);\n for (var i = 0; i < prioritized.length; i++) {\n this[prioritized[i].unit](units[prioritized[i].unit]);\n }\n } else {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units](value);\n }\n }\n return this;\n}\n\nfunction zeroFill(number, targetLength, forceSign) {\n var absNumber = '' + Math.abs(number),\n zerosToFill = targetLength - absNumber.length,\n sign = number >= 0;\n return (sign ? (forceSign ? '+' : '') : '-') +\n Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + absNumber;\n}\n\nvar formattingTokens = /(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g;\n\nvar localFormattingTokens = /(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g;\n\nvar formatFunctions = {};\n\nvar formatTokenFunctions = {};\n\n// token: 'M'\n// padded: ['MM', 2]\n// ordinal: 'Mo'\n// callback: function () { this.month() + 1 }\nfunction addFormatToken (token, padded, ordinal, callback) {\n var func = callback;\n if (typeof callback === 'string') {\n func = function () {\n return this[callback]();\n };\n }\n if (token) {\n formatTokenFunctions[token] = func;\n }\n if (padded) {\n formatTokenFunctions[padded[0]] = function () {\n return zeroFill(func.apply(this, arguments), padded[1], padded[2]);\n };\n }\n if (ordinal) {\n formatTokenFunctions[ordinal] = function () {\n return this.localeData().ordinal(func.apply(this, arguments), token);\n };\n }\n}\n\nfunction removeFormattingTokens(input) {\n if (input.match(/\\[[\\s\\S]/)) {\n return input.replace(/^\\[|\\]$/g, '');\n }\n return input.replace(/\\\\/g, '');\n}\n\nfunction makeFormatFunction(format) {\n var array = format.match(formattingTokens), i, length;\n\n for (i = 0, length = array.length; i < length; i++) {\n if (formatTokenFunctions[array[i]]) {\n array[i] = formatTokenFunctions[array[i]];\n } else {\n array[i] = removeFormattingTokens(array[i]);\n }\n }\n\n return function (mom) {\n var output = '', i;\n for (i = 0; i < length; i++) {\n output += isFunction(array[i]) ? array[i].call(mom, format) : array[i];\n }\n return output;\n };\n}\n\n// format date using native date object\nfunction formatMoment(m, format) {\n if (!m.isValid()) {\n return m.localeData().invalidDate();\n }\n\n format = expandFormat(format, m.localeData());\n formatFunctions[format] = formatFunctions[format] || makeFormatFunction(format);\n\n return formatFunctions[format](m);\n}\n\nfunction expandFormat(format, locale) {\n var i = 5;\n\n function replaceLongDateFormatTokens(input) {\n return locale.longDateFormat(input) || input;\n }\n\n localFormattingTokens.lastIndex = 0;\n while (i >= 0 && localFormattingTokens.test(format)) {\n format = format.replace(localFormattingTokens, replaceLongDateFormatTokens);\n localFormattingTokens.lastIndex = 0;\n i -= 1;\n }\n\n return format;\n}\n\nvar match1 = /\\d/; // 0 - 9\nvar match2 = /\\d\\d/; // 00 - 99\nvar match3 = /\\d{3}/; // 000 - 999\nvar match4 = /\\d{4}/; // 0000 - 9999\nvar match6 = /[+-]?\\d{6}/; // -999999 - 999999\nvar match1to2 = /\\d\\d?/; // 0 - 99\nvar match3to4 = /\\d\\d\\d\\d?/; // 999 - 9999\nvar match5to6 = /\\d\\d\\d\\d\\d\\d?/; // 99999 - 999999\nvar match1to3 = /\\d{1,3}/; // 0 - 999\nvar match1to4 = /\\d{1,4}/; // 0 - 9999\nvar match1to6 = /[+-]?\\d{1,6}/; // -999999 - 999999\n\nvar matchUnsigned = /\\d+/; // 0 - inf\nvar matchSigned = /[+-]?\\d+/; // -inf - inf\n\nvar matchOffset = /Z|[+-]\\d\\d:?\\d\\d/gi; // +00:00 -00:00 +0000 -0000 or Z\nvar matchShortOffset = /Z|[+-]\\d\\d(?::?\\d\\d)?/gi; // +00 -00 +00:00 -00:00 +0000 -0000 or Z\n\nvar matchTimestamp = /[+-]?\\d+(\\.\\d{1,3})?/; // 123456789 123456789.123\n\n// any word (or two) characters or numbers including two/three word month in arabic.\n// includes scottish gaelic two word and hyphenated months\nvar matchWord = /[0-9]*['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]+|[\\u0600-\\u06FF\\/]+(\\s*?[\\u0600-\\u06FF]+){1,2}/i;\n\n\nvar regexes = {};\n\nfunction addRegexToken (token, regex, strictRegex) {\n regexes[token] = isFunction(regex) ? regex : function (isStrict, localeData) {\n return (isStrict && strictRegex) ? strictRegex : regex;\n };\n}\n\nfunction getParseRegexForToken (token, config) {\n if (!hasOwnProp(regexes, token)) {\n return new RegExp(unescapeFormat(token));\n }\n\n return regexes[token](config._strict, config._locale);\n}\n\n// Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript\nfunction unescapeFormat(s) {\n return regexEscape(s.replace('\\\\', '').replace(/\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g, function (matched, p1, p2, p3, p4) {\n return p1 || p2 || p3 || p4;\n }));\n}\n\nfunction regexEscape(s) {\n return s.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n}\n\nvar tokens = {};\n\nfunction addParseToken (token, callback) {\n var i, func = callback;\n if (typeof token === 'string') {\n token = [token];\n }\n if (isNumber(callback)) {\n func = function (input, array) {\n array[callback] = toInt(input);\n };\n }\n for (i = 0; i < token.length; i++) {\n tokens[token[i]] = func;\n }\n}\n\nfunction addWeekParseToken (token, callback) {\n addParseToken(token, function (input, array, config, token) {\n config._w = config._w || {};\n callback(input, config._w, config, token);\n });\n}\n\nfunction addTimeToArrayFromToken(token, input, config) {\n if (input != null && hasOwnProp(tokens, token)) {\n tokens[token](input, config._a, config, token);\n }\n}\n\nvar YEAR = 0;\nvar MONTH = 1;\nvar DATE = 2;\nvar HOUR = 3;\nvar MINUTE = 4;\nvar SECOND = 5;\nvar MILLISECOND = 6;\nvar WEEK = 7;\nvar WEEKDAY = 8;\n\nvar indexOf;\n\nif (Array.prototype.indexOf) {\n indexOf = Array.prototype.indexOf;\n} else {\n indexOf = function (o) {\n // I know\n var i;\n for (i = 0; i < this.length; ++i) {\n if (this[i] === o) {\n return i;\n }\n }\n return -1;\n };\n}\n\nvar indexOf$1 = indexOf;\n\nfunction daysInMonth(year, month) {\n return new Date(Date.UTC(year, month + 1, 0)).getUTCDate();\n}\n\n// FORMATTING\n\naddFormatToken('M', ['MM', 2], 'Mo', function () {\n return this.month() + 1;\n});\n\naddFormatToken('MMM', 0, 0, function (format) {\n return this.localeData().monthsShort(this, format);\n});\n\naddFormatToken('MMMM', 0, 0, function (format) {\n return this.localeData().months(this, format);\n});\n\n// ALIASES\n\naddUnitAlias('month', 'M');\n\n// PRIORITY\n\naddUnitPriority('month', 8);\n\n// PARSING\n\naddRegexToken('M', match1to2);\naddRegexToken('MM', match1to2, match2);\naddRegexToken('MMM', function (isStrict, locale) {\n return locale.monthsShortRegex(isStrict);\n});\naddRegexToken('MMMM', function (isStrict, locale) {\n return locale.monthsRegex(isStrict);\n});\n\naddParseToken(['M', 'MM'], function (input, array) {\n array[MONTH] = toInt(input) - 1;\n});\n\naddParseToken(['MMM', 'MMMM'], function (input, array, config, token) {\n var month = config._locale.monthsParse(input, token, config._strict);\n // if we didn't find a month name, mark the date as invalid.\n if (month != null) {\n array[MONTH] = month;\n } else {\n getParsingFlags(config).invalidMonth = input;\n }\n});\n\n// LOCALES\n\nvar MONTHS_IN_FORMAT = /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?/;\nvar defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_');\nfunction localeMonths (m, format) {\n if (!m) {\n return isArray(this._months) ? this._months :\n this._months['standalone'];\n }\n return isArray(this._months) ? this._months[m.month()] :\n this._months[(this._months.isFormat || MONTHS_IN_FORMAT).test(format) ? 'format' : 'standalone'][m.month()];\n}\n\nvar defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_');\nfunction localeMonthsShort (m, format) {\n if (!m) {\n return isArray(this._monthsShort) ? this._monthsShort :\n this._monthsShort['standalone'];\n }\n return isArray(this._monthsShort) ? this._monthsShort[m.month()] :\n this._monthsShort[MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'][m.month()];\n}\n\nfunction handleStrictParse(monthName, format, strict) {\n var i, ii, mom, llc = monthName.toLocaleLowerCase();\n if (!this._monthsParse) {\n // this is not used\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n for (i = 0; i < 12; ++i) {\n mom = createUTC([2000, i]);\n this._shortMonthsParse[i] = this.monthsShort(mom, '').toLocaleLowerCase();\n this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'MMM') {\n ii = indexOf$1.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf$1.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'MMM') {\n ii = indexOf$1.call(this._shortMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf$1.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf$1.call(this._longMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf$1.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n}\n\nfunction localeMonthsParse (monthName, format, strict) {\n var i, mom, regex;\n\n if (this._monthsParseExact) {\n return handleStrictParse.call(this, monthName, format, strict);\n }\n\n if (!this._monthsParse) {\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n }\n\n // TODO: add sorting\n // Sorting makes sure if one month (or abbr) is a prefix of another\n // see sorting in computeMonthsParse\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n if (strict && !this._longMonthsParse[i]) {\n this._longMonthsParse[i] = new RegExp('^' + this.months(mom, '').replace('.', '') + '$', 'i');\n this._shortMonthsParse[i] = new RegExp('^' + this.monthsShort(mom, '').replace('.', '') + '$', 'i');\n }\n if (!strict && !this._monthsParse[i]) {\n regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');\n this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (strict && format === 'MMMM' && this._longMonthsParse[i].test(monthName)) {\n return i;\n } else if (strict && format === 'MMM' && this._shortMonthsParse[i].test(monthName)) {\n return i;\n } else if (!strict && this._monthsParse[i].test(monthName)) {\n return i;\n }\n }\n}\n\n// MOMENTS\n\nfunction setMonth (mom, value) {\n var dayOfMonth;\n\n if (!mom.isValid()) {\n // No op\n return mom;\n }\n\n if (typeof value === 'string') {\n if (/^\\d+$/.test(value)) {\n value = toInt(value);\n } else {\n value = mom.localeData().monthsParse(value);\n // TODO: Another silent failure?\n if (!isNumber(value)) {\n return mom;\n }\n }\n }\n\n dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);\n return mom;\n}\n\nfunction getSetMonth (value) {\n if (value != null) {\n setMonth(this, value);\n hooks.updateOffset(this, true);\n return this;\n } else {\n return get(this, 'Month');\n }\n}\n\nfunction getDaysInMonth () {\n return daysInMonth(this.year(), this.month());\n}\n\nvar defaultMonthsShortRegex = matchWord;\nfunction monthsShortRegex (isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsShortStrictRegex;\n } else {\n return this._monthsShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsShortRegex')) {\n this._monthsShortRegex = defaultMonthsShortRegex;\n }\n return this._monthsShortStrictRegex && isStrict ?\n this._monthsShortStrictRegex : this._monthsShortRegex;\n }\n}\n\nvar defaultMonthsRegex = matchWord;\nfunction monthsRegex (isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsStrictRegex;\n } else {\n return this._monthsRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsRegex')) {\n this._monthsRegex = defaultMonthsRegex;\n }\n return this._monthsStrictRegex && isStrict ?\n this._monthsStrictRegex : this._monthsRegex;\n }\n}\n\nfunction computeMonthsParse () {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var shortPieces = [], longPieces = [], mixedPieces = [],\n i, mom;\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n shortPieces.push(this.monthsShort(mom, ''));\n longPieces.push(this.months(mom, ''));\n mixedPieces.push(this.months(mom, ''));\n mixedPieces.push(this.monthsShort(mom, ''));\n }\n // Sorting makes sure if one month (or abbr) is a prefix of another it\n // will match the longer piece.\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n for (i = 0; i < 12; i++) {\n shortPieces[i] = regexEscape(shortPieces[i]);\n longPieces[i] = regexEscape(longPieces[i]);\n }\n for (i = 0; i < 24; i++) {\n mixedPieces[i] = regexEscape(mixedPieces[i]);\n }\n\n this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._monthsShortRegex = this._monthsRegex;\n this._monthsStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i');\n this._monthsShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i');\n}\n\n// FORMATTING\n\naddFormatToken('Y', 0, 0, function () {\n var y = this.year();\n return y <= 9999 ? '' + y : '+' + y;\n});\n\naddFormatToken(0, ['YY', 2], 0, function () {\n return this.year() % 100;\n});\n\naddFormatToken(0, ['YYYY', 4], 0, 'year');\naddFormatToken(0, ['YYYYY', 5], 0, 'year');\naddFormatToken(0, ['YYYYYY', 6, true], 0, 'year');\n\n// ALIASES\n\naddUnitAlias('year', 'y');\n\n// PRIORITIES\n\naddUnitPriority('year', 1);\n\n// PARSING\n\naddRegexToken('Y', matchSigned);\naddRegexToken('YY', match1to2, match2);\naddRegexToken('YYYY', match1to4, match4);\naddRegexToken('YYYYY', match1to6, match6);\naddRegexToken('YYYYYY', match1to6, match6);\n\naddParseToken(['YYYYY', 'YYYYYY'], YEAR);\naddParseToken('YYYY', function (input, array) {\n array[YEAR] = input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);\n});\naddParseToken('YY', function (input, array) {\n array[YEAR] = hooks.parseTwoDigitYear(input);\n});\naddParseToken('Y', function (input, array) {\n array[YEAR] = parseInt(input, 10);\n});\n\n// HELPERS\n\nfunction daysInYear(year) {\n return isLeapYear(year) ? 366 : 365;\n}\n\nfunction isLeapYear(year) {\n return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n}\n\n// HOOKS\n\nhooks.parseTwoDigitYear = function (input) {\n return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);\n};\n\n// MOMENTS\n\nvar getSetYear = makeGetSet('FullYear', true);\n\nfunction getIsLeapYear () {\n return isLeapYear(this.year());\n}\n\nfunction createDate (y, m, d, h, M, s, ms) {\n // can't just apply() to create a date:\n // https://stackoverflow.com/q/181348\n var date = new Date(y, m, d, h, M, s, ms);\n\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0 && isFinite(date.getFullYear())) {\n date.setFullYear(y);\n }\n return date;\n}\n\nfunction createUTCDate (y) {\n var date = new Date(Date.UTC.apply(null, arguments));\n\n // the Date.UTC function remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0 && isFinite(date.getUTCFullYear())) {\n date.setUTCFullYear(y);\n }\n return date;\n}\n\n// start-of-first-week - start-of-year\nfunction firstWeekOffset(year, dow, doy) {\n var // first-week day -- which january is always in the first week (4 for iso, 1 for other)\n fwd = 7 + dow - doy,\n // first-week day local weekday -- which local weekday is fwd\n fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;\n\n return -fwdlw + fwd - 1;\n}\n\n// https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday\nfunction dayOfYearFromWeeks(year, week, weekday, dow, doy) {\n var localWeekday = (7 + weekday - dow) % 7,\n weekOffset = firstWeekOffset(year, dow, doy),\n dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,\n resYear, resDayOfYear;\n\n if (dayOfYear <= 0) {\n resYear = year - 1;\n resDayOfYear = daysInYear(resYear) + dayOfYear;\n } else if (dayOfYear > daysInYear(year)) {\n resYear = year + 1;\n resDayOfYear = dayOfYear - daysInYear(year);\n } else {\n resYear = year;\n resDayOfYear = dayOfYear;\n }\n\n return {\n year: resYear,\n dayOfYear: resDayOfYear\n };\n}\n\nfunction weekOfYear(mom, dow, doy) {\n var weekOffset = firstWeekOffset(mom.year(), dow, doy),\n week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,\n resWeek, resYear;\n\n if (week < 1) {\n resYear = mom.year() - 1;\n resWeek = week + weeksInYear(resYear, dow, doy);\n } else if (week > weeksInYear(mom.year(), dow, doy)) {\n resWeek = week - weeksInYear(mom.year(), dow, doy);\n resYear = mom.year() + 1;\n } else {\n resYear = mom.year();\n resWeek = week;\n }\n\n return {\n week: resWeek,\n year: resYear\n };\n}\n\nfunction weeksInYear(year, dow, doy) {\n var weekOffset = firstWeekOffset(year, dow, doy),\n weekOffsetNext = firstWeekOffset(year + 1, dow, doy);\n return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;\n}\n\n// FORMATTING\n\naddFormatToken('w', ['ww', 2], 'wo', 'week');\naddFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');\n\n// ALIASES\n\naddUnitAlias('week', 'w');\naddUnitAlias('isoWeek', 'W');\n\n// PRIORITIES\n\naddUnitPriority('week', 5);\naddUnitPriority('isoWeek', 5);\n\n// PARSING\n\naddRegexToken('w', match1to2);\naddRegexToken('ww', match1to2, match2);\naddRegexToken('W', match1to2);\naddRegexToken('WW', match1to2, match2);\n\naddWeekParseToken(['w', 'ww', 'W', 'WW'], function (input, week, config, token) {\n week[token.substr(0, 1)] = toInt(input);\n});\n\n// HELPERS\n\n// LOCALES\n\nfunction localeWeek (mom) {\n return weekOfYear(mom, this._week.dow, this._week.doy).week;\n}\n\nvar defaultLocaleWeek = {\n dow : 0, // Sunday is the first day of the week.\n doy : 6 // The week that contains Jan 1st is the first week of the year.\n};\n\nfunction localeFirstDayOfWeek () {\n return this._week.dow;\n}\n\nfunction localeFirstDayOfYear () {\n return this._week.doy;\n}\n\n// MOMENTS\n\nfunction getSetWeek (input) {\n var week = this.localeData().week(this);\n return input == null ? week : this.add((input - week) * 7, 'd');\n}\n\nfunction getSetISOWeek (input) {\n var week = weekOfYear(this, 1, 4).week;\n return input == null ? week : this.add((input - week) * 7, 'd');\n}\n\n// FORMATTING\n\naddFormatToken('d', 0, 'do', 'day');\n\naddFormatToken('dd', 0, 0, function (format) {\n return this.localeData().weekdaysMin(this, format);\n});\n\naddFormatToken('ddd', 0, 0, function (format) {\n return this.localeData().weekdaysShort(this, format);\n});\n\naddFormatToken('dddd', 0, 0, function (format) {\n return this.localeData().weekdays(this, format);\n});\n\naddFormatToken('e', 0, 0, 'weekday');\naddFormatToken('E', 0, 0, 'isoWeekday');\n\n// ALIASES\n\naddUnitAlias('day', 'd');\naddUnitAlias('weekday', 'e');\naddUnitAlias('isoWeekday', 'E');\n\n// PRIORITY\naddUnitPriority('day', 11);\naddUnitPriority('weekday', 11);\naddUnitPriority('isoWeekday', 11);\n\n// PARSING\n\naddRegexToken('d', match1to2);\naddRegexToken('e', match1to2);\naddRegexToken('E', match1to2);\naddRegexToken('dd', function (isStrict, locale) {\n return locale.weekdaysMinRegex(isStrict);\n});\naddRegexToken('ddd', function (isStrict, locale) {\n return locale.weekdaysShortRegex(isStrict);\n});\naddRegexToken('dddd', function (isStrict, locale) {\n return locale.weekdaysRegex(isStrict);\n});\n\naddWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {\n var weekday = config._locale.weekdaysParse(input, token, config._strict);\n // if we didn't get a weekday name, mark the date as invalid\n if (weekday != null) {\n week.d = weekday;\n } else {\n getParsingFlags(config).invalidWeekday = input;\n }\n});\n\naddWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {\n week[token] = toInt(input);\n});\n\n// HELPERS\n\nfunction parseWeekday(input, locale) {\n if (typeof input !== 'string') {\n return input;\n }\n\n if (!isNaN(input)) {\n return parseInt(input, 10);\n }\n\n input = locale.weekdaysParse(input);\n if (typeof input === 'number') {\n return input;\n }\n\n return null;\n}\n\nfunction parseIsoWeekday(input, locale) {\n if (typeof input === 'string') {\n return locale.weekdaysParse(input) % 7 || 7;\n }\n return isNaN(input) ? null : input;\n}\n\n// LOCALES\n\nvar defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_');\nfunction localeWeekdays (m, format) {\n if (!m) {\n return isArray(this._weekdays) ? this._weekdays :\n this._weekdays['standalone'];\n }\n return isArray(this._weekdays) ? this._weekdays[m.day()] :\n this._weekdays[this._weekdays.isFormat.test(format) ? 'format' : 'standalone'][m.day()];\n}\n\nvar defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_');\nfunction localeWeekdaysShort (m) {\n return (m) ? this._weekdaysShort[m.day()] : this._weekdaysShort;\n}\n\nvar defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_');\nfunction localeWeekdaysMin (m) {\n return (m) ? this._weekdaysMin[m.day()] : this._weekdaysMin;\n}\n\nfunction handleStrictParse$1(weekdayName, format, strict) {\n var i, ii, mom, llc = weekdayName.toLocaleLowerCase();\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._minWeekdaysParse = [];\n\n for (i = 0; i < 7; ++i) {\n mom = createUTC([2000, 1]).day(i);\n this._minWeekdaysParse[i] = this.weekdaysMin(mom, '').toLocaleLowerCase();\n this._shortWeekdaysParse[i] = this.weekdaysShort(mom, '').toLocaleLowerCase();\n this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'dddd') {\n ii = indexOf$1.call(this._weekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf$1.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf$1.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'dddd') {\n ii = indexOf$1.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf$1.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf$1.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf$1.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf$1.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf$1.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf$1.call(this._minWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf$1.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf$1.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n}\n\nfunction localeWeekdaysParse (weekdayName, format, strict) {\n var i, mom, regex;\n\n if (this._weekdaysParseExact) {\n return handleStrictParse$1.call(this, weekdayName, format, strict);\n }\n\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._minWeekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._fullWeekdaysParse = [];\n }\n\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n\n mom = createUTC([2000, 1]).day(i);\n if (strict && !this._fullWeekdaysParse[i]) {\n this._fullWeekdaysParse[i] = new RegExp('^' + this.weekdays(mom, '').replace('.', '\\.?') + '$', 'i');\n this._shortWeekdaysParse[i] = new RegExp('^' + this.weekdaysShort(mom, '').replace('.', '\\.?') + '$', 'i');\n this._minWeekdaysParse[i] = new RegExp('^' + this.weekdaysMin(mom, '').replace('.', '\\.?') + '$', 'i');\n }\n if (!this._weekdaysParse[i]) {\n regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, '');\n this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (strict && format === 'dddd' && this._fullWeekdaysParse[i].test(weekdayName)) {\n return i;\n } else if (strict && format === 'ddd' && this._shortWeekdaysParse[i].test(weekdayName)) {\n return i;\n } else if (strict && format === 'dd' && this._minWeekdaysParse[i].test(weekdayName)) {\n return i;\n } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {\n return i;\n }\n }\n}\n\n// MOMENTS\n\nfunction getSetDayOfWeek (input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();\n if (input != null) {\n input = parseWeekday(input, this.localeData());\n return this.add(input - day, 'd');\n } else {\n return day;\n }\n}\n\nfunction getSetLocaleDayOfWeek (input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;\n return input == null ? weekday : this.add(input - weekday, 'd');\n}\n\nfunction getSetISODayOfWeek (input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n // behaves the same as moment#day except\n // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)\n // as a setter, sunday should belong to the previous week.\n\n if (input != null) {\n var weekday = parseIsoWeekday(input, this.localeData());\n return this.day(this.day() % 7 ? weekday : weekday - 7);\n } else {\n return this.day() || 7;\n }\n}\n\nvar defaultWeekdaysRegex = matchWord;\nfunction weekdaysRegex (isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysStrictRegex;\n } else {\n return this._weekdaysRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n this._weekdaysRegex = defaultWeekdaysRegex;\n }\n return this._weekdaysStrictRegex && isStrict ?\n this._weekdaysStrictRegex : this._weekdaysRegex;\n }\n}\n\nvar defaultWeekdaysShortRegex = matchWord;\nfunction weekdaysShortRegex (isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysShortStrictRegex;\n } else {\n return this._weekdaysShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysShortRegex')) {\n this._weekdaysShortRegex = defaultWeekdaysShortRegex;\n }\n return this._weekdaysShortStrictRegex && isStrict ?\n this._weekdaysShortStrictRegex : this._weekdaysShortRegex;\n }\n}\n\nvar defaultWeekdaysMinRegex = matchWord;\nfunction weekdaysMinRegex (isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysMinStrictRegex;\n } else {\n return this._weekdaysMinRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysMinRegex')) {\n this._weekdaysMinRegex = defaultWeekdaysMinRegex;\n }\n return this._weekdaysMinStrictRegex && isStrict ?\n this._weekdaysMinStrictRegex : this._weekdaysMinRegex;\n }\n}\n\n\nfunction computeWeekdaysParse () {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var minPieces = [], shortPieces = [], longPieces = [], mixedPieces = [],\n i, mom, minp, shortp, longp;\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, 1]).day(i);\n minp = this.weekdaysMin(mom, '');\n shortp = this.weekdaysShort(mom, '');\n longp = this.weekdays(mom, '');\n minPieces.push(minp);\n shortPieces.push(shortp);\n longPieces.push(longp);\n mixedPieces.push(minp);\n mixedPieces.push(shortp);\n mixedPieces.push(longp);\n }\n // Sorting makes sure if one weekday (or abbr) is a prefix of another it\n // will match the longer piece.\n minPieces.sort(cmpLenRev);\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n for (i = 0; i < 7; i++) {\n shortPieces[i] = regexEscape(shortPieces[i]);\n longPieces[i] = regexEscape(longPieces[i]);\n mixedPieces[i] = regexEscape(mixedPieces[i]);\n }\n\n this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._weekdaysShortRegex = this._weekdaysRegex;\n this._weekdaysMinRegex = this._weekdaysRegex;\n\n this._weekdaysStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i');\n this._weekdaysShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i');\n this._weekdaysMinStrictRegex = new RegExp('^(' + minPieces.join('|') + ')', 'i');\n}\n\n// FORMATTING\n\nfunction hFormat() {\n return this.hours() % 12 || 12;\n}\n\nfunction kFormat() {\n return this.hours() || 24;\n}\n\naddFormatToken('H', ['HH', 2], 0, 'hour');\naddFormatToken('h', ['hh', 2], 0, hFormat);\naddFormatToken('k', ['kk', 2], 0, kFormat);\n\naddFormatToken('hmm', 0, 0, function () {\n return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);\n});\n\naddFormatToken('hmmss', 0, 0, function () {\n return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2);\n});\n\naddFormatToken('Hmm', 0, 0, function () {\n return '' + this.hours() + zeroFill(this.minutes(), 2);\n});\n\naddFormatToken('Hmmss', 0, 0, function () {\n return '' + this.hours() + zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2);\n});\n\nfunction meridiem (token, lowercase) {\n addFormatToken(token, 0, 0, function () {\n return this.localeData().meridiem(this.hours(), this.minutes(), lowercase);\n });\n}\n\nmeridiem('a', true);\nmeridiem('A', false);\n\n// ALIASES\n\naddUnitAlias('hour', 'h');\n\n// PRIORITY\naddUnitPriority('hour', 13);\n\n// PARSING\n\nfunction matchMeridiem (isStrict, locale) {\n return locale._meridiemParse;\n}\n\naddRegexToken('a', matchMeridiem);\naddRegexToken('A', matchMeridiem);\naddRegexToken('H', match1to2);\naddRegexToken('h', match1to2);\naddRegexToken('k', match1to2);\naddRegexToken('HH', match1to2, match2);\naddRegexToken('hh', match1to2, match2);\naddRegexToken('kk', match1to2, match2);\n\naddRegexToken('hmm', match3to4);\naddRegexToken('hmmss', match5to6);\naddRegexToken('Hmm', match3to4);\naddRegexToken('Hmmss', match5to6);\n\naddParseToken(['H', 'HH'], HOUR);\naddParseToken(['k', 'kk'], function (input, array, config) {\n var kInput = toInt(input);\n array[HOUR] = kInput === 24 ? 0 : kInput;\n});\naddParseToken(['a', 'A'], function (input, array, config) {\n config._isPm = config._locale.isPM(input);\n config._meridiem = input;\n});\naddParseToken(['h', 'hh'], function (input, array, config) {\n array[HOUR] = toInt(input);\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('hmmss', function (input, array, config) {\n var pos1 = input.length - 4;\n var pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('Hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n});\naddParseToken('Hmmss', function (input, array, config) {\n var pos1 = input.length - 4;\n var pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n});\n\n// LOCALES\n\nfunction localeIsPM (input) {\n // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays\n // Using charAt should be more compatible.\n return ((input + '').toLowerCase().charAt(0) === 'p');\n}\n\nvar defaultLocaleMeridiemParse = /[ap]\\.?m?\\.?/i;\nfunction localeMeridiem (hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'pm' : 'PM';\n } else {\n return isLower ? 'am' : 'AM';\n }\n}\n\n\n// MOMENTS\n\n// Setting the hour should keep the time, because the user explicitly\n// specified which hour he wants. So trying to maintain the same hour (in\n// a new timezone) makes sense. Adding/subtracting hours does not follow\n// this rule.\nvar getSetHour = makeGetSet('Hours', true);\n\n// months\n// week\n// weekdays\n// meridiem\nvar baseConfig = {\n calendar: defaultCalendar,\n longDateFormat: defaultLongDateFormat,\n invalidDate: defaultInvalidDate,\n ordinal: defaultOrdinal,\n dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,\n relativeTime: defaultRelativeTime,\n\n months: defaultLocaleMonths,\n monthsShort: defaultLocaleMonthsShort,\n\n week: defaultLocaleWeek,\n\n weekdays: defaultLocaleWeekdays,\n weekdaysMin: defaultLocaleWeekdaysMin,\n weekdaysShort: defaultLocaleWeekdaysShort,\n\n meridiemParse: defaultLocaleMeridiemParse\n};\n\n// internal storage for locale config files\nvar locales = {};\nvar localeFamilies = {};\nvar globalLocale;\n\nfunction normalizeLocale(key) {\n return key ? key.toLowerCase().replace('_', '-') : key;\n}\n\n// pick the locale from the array\n// try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each\n// substring from most specific to least, but move to the next array item if it's a more specific variant than the current root\nfunction chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}\n\nfunction loadLocale(name) {\n var oldLocale = null;\n // TODO: Find a better way to register and load all the locales in Node\n if (!locales[name] && (typeof module !== 'undefined') &&\n module && module.exports) {\n try {\n oldLocale = globalLocale._abbr;\n __webpack_require__(/*! ./locale */ 1210)(\"./\" + name);\n // because defineLocale currently also sets the global locale, we\n // want to undo that for lazy loaded locales\n getSetGlobalLocale(oldLocale);\n } catch (e) { }\n }\n return locales[name];\n}\n\n// This function will load locale and then set the global locale. If\n// no arguments are passed in, it will simply return the current global\n// locale key.\nfunction getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}\n\nfunction defineLocale (name, config) {\n if (config !== null) {\n var parentConfig = baseConfig;\n config.abbr = name;\n if (locales[name] != null) {\n deprecateSimple('defineLocaleOverride',\n 'use moment.updateLocale(localeName, config) to change ' +\n 'an existing locale. moment.defineLocale(localeName, ' +\n 'config) should only be used for creating a new locale ' +\n 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.');\n parentConfig = locales[name]._config;\n } else if (config.parentLocale != null) {\n if (locales[config.parentLocale] != null) {\n parentConfig = locales[config.parentLocale]._config;\n } else {\n if (!localeFamilies[config.parentLocale]) {\n localeFamilies[config.parentLocale] = [];\n }\n localeFamilies[config.parentLocale].push({\n name: name,\n config: config\n });\n return null;\n }\n }\n locales[name] = new Locale(mergeConfigs(parentConfig, config));\n\n if (localeFamilies[name]) {\n localeFamilies[name].forEach(function (x) {\n defineLocale(x.name, x.config);\n });\n }\n\n // backwards compat for now: also set the locale\n // make sure we set the locale AFTER all child locales have been\n // created, so we won't end up with the child locale set.\n getSetGlobalLocale(name);\n\n\n return locales[name];\n } else {\n // useful for testing\n delete locales[name];\n return null;\n }\n}\n\nfunction updateLocale(name, config) {\n if (config != null) {\n var locale, parentConfig = baseConfig;\n // MERGE\n if (locales[name] != null) {\n parentConfig = locales[name]._config;\n }\n config = mergeConfigs(parentConfig, config);\n locale = new Locale(config);\n locale.parentLocale = locales[name];\n locales[name] = locale;\n\n // backwards compat for now: also set the locale\n getSetGlobalLocale(name);\n } else {\n // pass null for config to unupdate, useful for tests\n if (locales[name] != null) {\n if (locales[name].parentLocale != null) {\n locales[name] = locales[name].parentLocale;\n } else if (locales[name] != null) {\n delete locales[name];\n }\n }\n }\n return locales[name];\n}\n\n// returns locale data\nfunction getLocale (key) {\n var locale;\n\n if (key && key._locale && key._locale._abbr) {\n key = key._locale._abbr;\n }\n\n if (!key) {\n return globalLocale;\n }\n\n if (!isArray(key)) {\n //short-circuit everything else\n locale = loadLocale(key);\n if (locale) {\n return locale;\n }\n key = [key];\n }\n\n return chooseLocale(key);\n}\n\nfunction listLocales() {\n return keys$1(locales);\n}\n\nfunction checkOverflow (m) {\n var overflow;\n var a = m._a;\n\n if (a && getParsingFlags(m).overflow === -2) {\n overflow =\n a[MONTH] < 0 || a[MONTH] > 11 ? MONTH :\n a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) ? DATE :\n a[HOUR] < 0 || a[HOUR] > 24 || (a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0)) ? HOUR :\n a[MINUTE] < 0 || a[MINUTE] > 59 ? MINUTE :\n a[SECOND] < 0 || a[SECOND] > 59 ? SECOND :\n a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND :\n -1;\n\n if (getParsingFlags(m)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) {\n overflow = DATE;\n }\n if (getParsingFlags(m)._overflowWeeks && overflow === -1) {\n overflow = WEEK;\n }\n if (getParsingFlags(m)._overflowWeekday && overflow === -1) {\n overflow = WEEKDAY;\n }\n\n getParsingFlags(m).overflow = overflow;\n }\n\n return m;\n}\n\n// iso 8601 regex\n// 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)\nvar extendedIsoRegex = /^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([\\+\\-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/;\nvar basicIsoRegex = /^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([\\+\\-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/;\n\nvar tzRegex = /Z|[+-]\\d\\d(?::?\\d\\d)?/;\n\nvar isoDates = [\n ['YYYYYY-MM-DD', /[+-]\\d{6}-\\d\\d-\\d\\d/],\n ['YYYY-MM-DD', /\\d{4}-\\d\\d-\\d\\d/],\n ['GGGG-[W]WW-E', /\\d{4}-W\\d\\d-\\d/],\n ['GGGG-[W]WW', /\\d{4}-W\\d\\d/, false],\n ['YYYY-DDD', /\\d{4}-\\d{3}/],\n ['YYYY-MM', /\\d{4}-\\d\\d/, false],\n ['YYYYYYMMDD', /[+-]\\d{10}/],\n ['YYYYMMDD', /\\d{8}/],\n // YYYYMM is NOT allowed by the standard\n ['GGGG[W]WWE', /\\d{4}W\\d{3}/],\n ['GGGG[W]WW', /\\d{4}W\\d{2}/, false],\n ['YYYYDDD', /\\d{7}/]\n];\n\n// iso time formats and regexes\nvar isoTimes = [\n ['HH:mm:ss.SSSS', /\\d\\d:\\d\\d:\\d\\d\\.\\d+/],\n ['HH:mm:ss,SSSS', /\\d\\d:\\d\\d:\\d\\d,\\d+/],\n ['HH:mm:ss', /\\d\\d:\\d\\d:\\d\\d/],\n ['HH:mm', /\\d\\d:\\d\\d/],\n ['HHmmss.SSSS', /\\d\\d\\d\\d\\d\\d\\.\\d+/],\n ['HHmmss,SSSS', /\\d\\d\\d\\d\\d\\d,\\d+/],\n ['HHmmss', /\\d\\d\\d\\d\\d\\d/],\n ['HHmm', /\\d\\d\\d\\d/],\n ['HH', /\\d\\d/]\n];\n\nvar aspNetJsonRegex = /^\\/?Date\\((\\-?\\d+)/i;\n\n// date from iso format\nfunction configFromISO(config) {\n var i, l,\n string = config._i,\n match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),\n allowTime, dateFormat, timeFormat, tzFormat;\n\n if (match) {\n getParsingFlags(config).iso = true;\n\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(match[1])) {\n dateFormat = isoDates[i][0];\n allowTime = isoDates[i][2] !== false;\n break;\n }\n }\n if (dateFormat == null) {\n config._isValid = false;\n return;\n }\n if (match[3]) {\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(match[3])) {\n // match[2] should be 'T' or space\n timeFormat = (match[2] || ' ') + isoTimes[i][0];\n break;\n }\n }\n if (timeFormat == null) {\n config._isValid = false;\n return;\n }\n }\n if (!allowTime && timeFormat != null) {\n config._isValid = false;\n return;\n }\n if (match[4]) {\n if (tzRegex.exec(match[4])) {\n tzFormat = 'Z';\n } else {\n config._isValid = false;\n return;\n }\n }\n config._f = dateFormat + (timeFormat || '') + (tzFormat || '');\n configFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n}\n\n// RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3\nvar basicRfcRegex = /^((?:Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d?\\d\\s(?:Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(?:\\d\\d)?\\d\\d\\s)(\\d\\d:\\d\\d)(\\:\\d\\d)?(\\s(?:UT|GMT|[ECMP][SD]T|[A-IK-Za-ik-z]|[+-]\\d{4}))$/;\n\n// date and time from ref 2822 format\nfunction configFromRFC2822(config) {\n var string, match, dayFormat,\n dateFormat, timeFormat, tzFormat;\n var timezones = {\n ' GMT': ' +0000',\n ' EDT': ' -0400',\n ' EST': ' -0500',\n ' CDT': ' -0500',\n ' CST': ' -0600',\n ' MDT': ' -0600',\n ' MST': ' -0700',\n ' PDT': ' -0700',\n ' PST': ' -0800'\n };\n var military = 'YXWVUTSRQPONZABCDEFGHIKLM';\n var timezone, timezoneIndex;\n\n string = config._i\n .replace(/\\([^\\)]*\\)|[\\n\\t]/g, ' ') // Remove comments and folding whitespace\n .replace(/(\\s\\s+)/g, ' ') // Replace multiple-spaces with a single space\n .replace(/^\\s|\\s$/g, ''); // Remove leading and trailing spaces\n match = basicRfcRegex.exec(string);\n\n if (match) {\n dayFormat = match[1] ? 'ddd' + ((match[1].length === 5) ? ', ' : ' ') : '';\n dateFormat = 'D MMM ' + ((match[2].length > 10) ? 'YYYY ' : 'YY ');\n timeFormat = 'HH:mm' + (match[4] ? ':ss' : '');\n\n // TODO: Replace the vanilla JS Date object with an indepentent day-of-week check.\n if (match[1]) { // day of week given\n var momentDate = new Date(match[2]);\n var momentDay = ['Sun','Mon','Tue','Wed','Thu','Fri','Sat'][momentDate.getDay()];\n\n if (match[1].substr(0,3) !== momentDay) {\n getParsingFlags(config).weekdayMismatch = true;\n config._isValid = false;\n return;\n }\n }\n\n switch (match[5].length) {\n case 2: // military\n if (timezoneIndex === 0) {\n timezone = ' +0000';\n } else {\n timezoneIndex = military.indexOf(match[5][1].toUpperCase()) - 12;\n timezone = ((timezoneIndex < 0) ? ' -' : ' +') +\n (('' + timezoneIndex).replace(/^-?/, '0')).match(/..$/)[0] + '00';\n }\n break;\n case 4: // Zone\n timezone = timezones[match[5]];\n break;\n default: // UT or +/-9999\n timezone = timezones[' GMT'];\n }\n match[5] = timezone;\n config._i = match.splice(1).join('');\n tzFormat = ' ZZ';\n config._f = dayFormat + dateFormat + timeFormat + tzFormat;\n configFromStringAndFormat(config);\n getParsingFlags(config).rfc2822 = true;\n } else {\n config._isValid = false;\n }\n}\n\n// date from iso format or fallback\nfunction configFromString(config) {\n var matched = aspNetJsonRegex.exec(config._i);\n\n if (matched !== null) {\n config._d = new Date(+matched[1]);\n return;\n }\n\n configFromISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n configFromRFC2822(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n // Final attempt, use Input Fallback\n hooks.createFromInputFallback(config);\n}\n\nhooks.createFromInputFallback = deprecate(\n 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +\n 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +\n 'discouraged and will be removed in an upcoming major release. Please refer to ' +\n 'http://momentjs.com/guides/#/warnings/js-date/ for more info.',\n function (config) {\n config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));\n }\n);\n\n// Pick the first defined of two or three arguments.\nfunction defaults(a, b, c) {\n if (a != null) {\n return a;\n }\n if (b != null) {\n return b;\n }\n return c;\n}\n\nfunction currentDateArray(config) {\n // hooks is actually the exported moment object\n var nowValue = new Date(hooks.now());\n if (config._useUTC) {\n return [nowValue.getUTCFullYear(), nowValue.getUTCMonth(), nowValue.getUTCDate()];\n }\n return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];\n}\n\n// convert an array to a date.\n// the array should mirror the parameters below\n// note: all values past the year are optional and will default to the lowest possible value.\n// [year, month, day , hour, minute, second, millisecond]\nfunction configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear != null) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse) || config._dayOfYear === 0) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n}\n\nfunction dayOfYearFromWeekInfo(config) {\n var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow;\n\n w = config._w;\n if (w.GG != null || w.W != null || w.E != null) {\n dow = 1;\n doy = 4;\n\n // TODO: We need to take the current isoWeekYear, but that depends on\n // how we interpret now (local, utc, fixed offset). So create\n // a now version of current config (take local/utc/offset flags, and\n // create now).\n weekYear = defaults(w.GG, config._a[YEAR], weekOfYear(createLocal(), 1, 4).year);\n week = defaults(w.W, 1);\n weekday = defaults(w.E, 1);\n if (weekday < 1 || weekday > 7) {\n weekdayOverflow = true;\n }\n } else {\n dow = config._locale._week.dow;\n doy = config._locale._week.doy;\n\n var curWeek = weekOfYear(createLocal(), dow, doy);\n\n weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);\n\n // Default to current week.\n week = defaults(w.w, curWeek.week);\n\n if (w.d != null) {\n // weekday -- low day numbers are considered next week\n weekday = w.d;\n if (weekday < 0 || weekday > 6) {\n weekdayOverflow = true;\n }\n } else if (w.e != null) {\n // local weekday -- counting starts from begining of week\n weekday = w.e + dow;\n if (w.e < 0 || w.e > 6) {\n weekdayOverflow = true;\n }\n } else {\n // default to begining of week\n weekday = dow;\n }\n }\n if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {\n getParsingFlags(config)._overflowWeeks = true;\n } else if (weekdayOverflow != null) {\n getParsingFlags(config)._overflowWeekday = true;\n } else {\n temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);\n config._a[YEAR] = temp.year;\n config._dayOfYear = temp.dayOfYear;\n }\n}\n\n// constant that refers to the ISO standard\nhooks.ISO_8601 = function () {};\n\n// constant that refers to the RFC 2822 form\nhooks.RFC_2822 = function () {};\n\n// date from string and format string\nfunction configFromStringAndFormat(config) {\n // TODO: Move this to another part of the creation flow to prevent circular deps\n if (config._f === hooks.ISO_8601) {\n configFromISO(config);\n return;\n }\n if (config._f === hooks.RFC_2822) {\n configFromRFC2822(config);\n return;\n }\n config._a = [];\n getParsingFlags(config).empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n // console.log('token', token, 'parsedInput', parsedInput,\n // 'regex', getParseRegexForToken(token, config));\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n getParsingFlags(config).unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n getParsingFlags(config).empty = false;\n }\n else {\n getParsingFlags(config).unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n getParsingFlags(config).unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n getParsingFlags(config).charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n getParsingFlags(config).unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (config._a[HOUR] <= 12 &&\n getParsingFlags(config).bigHour === true &&\n config._a[HOUR] > 0) {\n getParsingFlags(config).bigHour = undefined;\n }\n\n getParsingFlags(config).parsedDateParts = config._a.slice(0);\n getParsingFlags(config).meridiem = config._meridiem;\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], config._meridiem);\n\n configFromArray(config);\n checkOverflow(config);\n}\n\n\nfunction meridiemFixWrap (locale, hour, meridiem) {\n var isPm;\n\n if (meridiem == null) {\n // nothing to do\n return hour;\n }\n if (locale.meridiemHour != null) {\n return locale.meridiemHour(hour, meridiem);\n } else if (locale.isPM != null) {\n // Fallback\n isPm = locale.isPM(meridiem);\n if (isPm && hour < 12) {\n hour += 12;\n }\n if (!isPm && hour === 12) {\n hour = 0;\n }\n return hour;\n } else {\n // this is not supposed to happen\n return hour;\n }\n}\n\n// date from string and array of format strings\nfunction configFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n getParsingFlags(config).invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._f = config._f[i];\n configFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += getParsingFlags(tempConfig).charsLeftOver;\n\n //or tokens\n currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;\n\n getParsingFlags(tempConfig).score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n}\n\nfunction configFromObject(config) {\n if (config._d) {\n return;\n }\n\n var i = normalizeObjectUnits(config._i);\n config._a = map([i.year, i.month, i.day || i.date, i.hour, i.minute, i.second, i.millisecond], function (obj) {\n return obj && parseInt(obj, 10);\n });\n\n configFromArray(config);\n}\n\nfunction createFromConfig (config) {\n var res = new Moment(checkOverflow(prepareConfig(config)));\n if (res._nextDay) {\n // Adding is smart enough around DST\n res.add(1, 'd');\n res._nextDay = undefined;\n }\n\n return res;\n}\n\nfunction prepareConfig (config) {\n var input = config._i,\n format = config._f;\n\n config._locale = config._locale || getLocale(config._l);\n\n if (input === null || (format === undefined && input === '')) {\n return createInvalid({nullInput: true});\n }\n\n if (typeof input === 'string') {\n config._i = input = config._locale.preparse(input);\n }\n\n if (isMoment(input)) {\n return new Moment(checkOverflow(input));\n } else if (isDate(input)) {\n config._d = input;\n } else if (isArray(format)) {\n configFromStringAndArray(config);\n } else if (format) {\n configFromStringAndFormat(config);\n } else {\n configFromInput(config);\n }\n\n if (!isValid(config)) {\n config._d = null;\n }\n\n return config;\n}\n\nfunction configFromInput(config) {\n var input = config._i;\n if (isUndefined(input)) {\n config._d = new Date(hooks.now());\n } else if (isDate(input)) {\n config._d = new Date(input.valueOf());\n } else if (typeof input === 'string') {\n configFromString(config);\n } else if (isArray(input)) {\n config._a = map(input.slice(0), function (obj) {\n return parseInt(obj, 10);\n });\n configFromArray(config);\n } else if (isObject(input)) {\n configFromObject(config);\n } else if (isNumber(input)) {\n // from milliseconds\n config._d = new Date(input);\n } else {\n hooks.createFromInputFallback(config);\n }\n}\n\nfunction createLocalOrUTC (input, format, locale, strict, isUTC) {\n var c = {};\n\n if (locale === true || locale === false) {\n strict = locale;\n locale = undefined;\n }\n\n if ((isObject(input) && isObjectEmpty(input)) ||\n (isArray(input) && input.length === 0)) {\n input = undefined;\n }\n // object construction must be done this way.\n // https://github.com/moment/moment/issues/1423\n c._isAMomentObject = true;\n c._useUTC = c._isUTC = isUTC;\n c._l = locale;\n c._i = input;\n c._f = format;\n c._strict = strict;\n\n return createFromConfig(c);\n}\n\nfunction createLocal (input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, false);\n}\n\nvar prototypeMin = deprecate(\n 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other < this ? this : other;\n } else {\n return createInvalid();\n }\n }\n);\n\nvar prototypeMax = deprecate(\n 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other > this ? this : other;\n } else {\n return createInvalid();\n }\n }\n);\n\n// Pick a moment m from moments so that m[fn](other) is true for all\n// other. This relies on the function fn to be transitive.\n//\n// moments should either be an array of moment objects or an array, whose\n// first element is an array of moment objects.\nfunction pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n}\n\n// TODO: Use [].sort instead?\nfunction min () {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isBefore', args);\n}\n\nfunction max () {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isAfter', args);\n}\n\nvar now = function () {\n return Date.now ? Date.now() : +(new Date());\n};\n\nvar ordering = ['year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', 'millisecond'];\n\nfunction isDurationValid(m) {\n for (var key in m) {\n if (!(ordering.indexOf(key) !== -1 && (m[key] == null || !isNaN(m[key])))) {\n return false;\n }\n }\n\n var unitHasDecimal = false;\n for (var i = 0; i < ordering.length; ++i) {\n if (m[ordering[i]]) {\n if (unitHasDecimal) {\n return false; // only allow non-integers for smallest unit\n }\n if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {\n unitHasDecimal = true;\n }\n }\n }\n\n return true;\n}\n\nfunction isValid$1() {\n return this._isValid;\n}\n\nfunction createInvalid$1() {\n return createDuration(NaN);\n}\n\nfunction Duration (duration) {\n var normalizedInput = normalizeObjectUnits(duration),\n years = normalizedInput.year || 0,\n quarters = normalizedInput.quarter || 0,\n months = normalizedInput.month || 0,\n weeks = normalizedInput.week || 0,\n days = normalizedInput.day || 0,\n hours = normalizedInput.hour || 0,\n minutes = normalizedInput.minute || 0,\n seconds = normalizedInput.second || 0,\n milliseconds = normalizedInput.millisecond || 0;\n\n this._isValid = isDurationValid(normalizedInput);\n\n // representation for dateAddRemove\n this._milliseconds = +milliseconds +\n seconds * 1e3 + // 1000\n minutes * 6e4 + // 1000 * 60\n hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978\n // Because of dateAddRemove treats 24 hours as different from a\n // day when working around DST, we need to store them separately\n this._days = +days +\n weeks * 7;\n // It is impossible translate months into days without knowing\n // which months you are are talking about, so we have to store\n // it separately.\n this._months = +months +\n quarters * 3 +\n years * 12;\n\n this._data = {};\n\n this._locale = getLocale();\n\n this._bubble();\n}\n\nfunction isDuration (obj) {\n return obj instanceof Duration;\n}\n\nfunction absRound (number) {\n if (number < 0) {\n return Math.round(-1 * number) * -1;\n } else {\n return Math.round(number);\n }\n}\n\n// FORMATTING\n\nfunction offset (token, separator) {\n addFormatToken(token, 0, 0, function () {\n var offset = this.utcOffset();\n var sign = '+';\n if (offset < 0) {\n offset = -offset;\n sign = '-';\n }\n return sign + zeroFill(~~(offset / 60), 2) + separator + zeroFill(~~(offset) % 60, 2);\n });\n}\n\noffset('Z', ':');\noffset('ZZ', '');\n\n// PARSING\n\naddRegexToken('Z', matchShortOffset);\naddRegexToken('ZZ', matchShortOffset);\naddParseToken(['Z', 'ZZ'], function (input, array, config) {\n config._useUTC = true;\n config._tzm = offsetFromString(matchShortOffset, input);\n});\n\n// HELPERS\n\n// timezone chunker\n// '+10:00' > ['10', '00']\n// '-1530' > ['-15', '30']\nvar chunkOffset = /([\\+\\-]|\\d\\d)/gi;\n\nfunction offsetFromString(matcher, string) {\n var matches = (string || '').match(matcher);\n\n if (matches === null) {\n return null;\n }\n\n var chunk = matches[matches.length - 1] || [];\n var parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];\n var minutes = +(parts[1] * 60) + toInt(parts[2]);\n\n return minutes === 0 ?\n 0 :\n parts[0] === '+' ? minutes : -minutes;\n}\n\n// Return a moment from input, that is local/utc/zone equivalent to model.\nfunction cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n}\n\nfunction getDateOffset (m) {\n // On Firefox.24 Date#getTimezoneOffset returns a floating point.\n // https://github.com/moment/moment/pull/1871\n return -Math.round(m._d.getTimezoneOffset() / 15) * 15;\n}\n\n// HOOKS\n\n// This function will be called whenever a moment is mutated.\n// It is intended to keep the offset in sync with the timezone.\nhooks.updateOffset = function () {};\n\n// MOMENTS\n\n// keepLocalTime = true means only change the timezone, without\n// affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->\n// 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset\n// +0200, so we adjust the time as needed, to be valid.\n//\n// Keeping the time actually adds/subtracts (one hour)\n// from the actual represented time. That is why we call updateOffset\n// a second time. In case it wants us to change the offset again\n// _changeInProgress == true case, then we have to adjust, because\n// there is no such time in the given timezone.\nfunction getSetOffset (input, keepLocalTime, keepMinutes) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16 && !keepMinutes) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(this, createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n}\n\nfunction getSetZone (input, keepLocalTime) {\n if (input != null) {\n if (typeof input !== 'string') {\n input = -input;\n }\n\n this.utcOffset(input, keepLocalTime);\n\n return this;\n } else {\n return -this.utcOffset();\n }\n}\n\nfunction setOffsetToUTC (keepLocalTime) {\n return this.utcOffset(0, keepLocalTime);\n}\n\nfunction setOffsetToLocal (keepLocalTime) {\n if (this._isUTC) {\n this.utcOffset(0, keepLocalTime);\n this._isUTC = false;\n\n if (keepLocalTime) {\n this.subtract(getDateOffset(this), 'm');\n }\n }\n return this;\n}\n\nfunction setOffsetToParsedOffset () {\n if (this._tzm != null) {\n this.utcOffset(this._tzm, false, true);\n } else if (typeof this._i === 'string') {\n var tZone = offsetFromString(matchOffset, this._i);\n if (tZone != null) {\n this.utcOffset(tZone);\n }\n else {\n this.utcOffset(0, true);\n }\n }\n return this;\n}\n\nfunction hasAlignedHourOffset (input) {\n if (!this.isValid()) {\n return false;\n }\n input = input ? createLocal(input).utcOffset() : 0;\n\n return (this.utcOffset() - input) % 60 === 0;\n}\n\nfunction isDaylightSavingTime () {\n return (\n this.utcOffset() > this.clone().month(0).utcOffset() ||\n this.utcOffset() > this.clone().month(5).utcOffset()\n );\n}\n\nfunction isDaylightSavingTimeShifted () {\n if (!isUndefined(this._isDSTShifted)) {\n return this._isDSTShifted;\n }\n\n var c = {};\n\n copyConfig(c, this);\n c = prepareConfig(c);\n\n if (c._a) {\n var other = c._isUTC ? createUTC(c._a) : createLocal(c._a);\n this._isDSTShifted = this.isValid() &&\n compareArrays(c._a, other.toArray()) > 0;\n } else {\n this._isDSTShifted = false;\n }\n\n return this._isDSTShifted;\n}\n\nfunction isLocal () {\n return this.isValid() ? !this._isUTC : false;\n}\n\nfunction isUtcOffset () {\n return this.isValid() ? this._isUTC : false;\n}\n\nfunction isUtc () {\n return this.isValid() ? this._isUTC && this._offset === 0 : false;\n}\n\n// ASP.NET json date format regex\nvar aspNetRegex = /^(\\-)?(?:(\\d*)[. ])?(\\d+)\\:(\\d+)(?:\\:(\\d+)(\\.\\d*)?)?$/;\n\n// from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html\n// somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere\n// and further modified to allow for strings containing both week and day\nvar isoRegex = /^(-)?P(?:(-?[0-9,.]*)Y)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)W)?(?:(-?[0-9,.]*)D)?(?:T(?:(-?[0-9,.]*)H)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)S)?)?$/;\n\nfunction createDuration (input, key) {\n var duration = input,\n // matching against regexp is expensive, do it on demand\n match = null,\n sign,\n ret,\n diffRes;\n\n if (isDuration(input)) {\n duration = {\n ms : input._milliseconds,\n d : input._days,\n M : input._months\n };\n } else if (isNumber(input)) {\n duration = {};\n if (key) {\n duration[key] = input;\n } else {\n duration.milliseconds = input;\n }\n } else if (!!(match = aspNetRegex.exec(input))) {\n sign = (match[1] === '-') ? -1 : 1;\n duration = {\n y : 0,\n d : toInt(match[DATE]) * sign,\n h : toInt(match[HOUR]) * sign,\n m : toInt(match[MINUTE]) * sign,\n s : toInt(match[SECOND]) * sign,\n ms : toInt(absRound(match[MILLISECOND] * 1000)) * sign // the millisecond decimal point is included in the match\n };\n } else if (!!(match = isoRegex.exec(input))) {\n sign = (match[1] === '-') ? -1 : 1;\n duration = {\n y : parseIso(match[2], sign),\n M : parseIso(match[3], sign),\n w : parseIso(match[4], sign),\n d : parseIso(match[5], sign),\n h : parseIso(match[6], sign),\n m : parseIso(match[7], sign),\n s : parseIso(match[8], sign)\n };\n } else if (duration == null) {// checks for null or undefined\n duration = {};\n } else if (typeof duration === 'object' && ('from' in duration || 'to' in duration)) {\n diffRes = momentsDifference(createLocal(duration.from), createLocal(duration.to));\n\n duration = {};\n duration.ms = diffRes.milliseconds;\n duration.M = diffRes.months;\n }\n\n ret = new Duration(duration);\n\n if (isDuration(input) && hasOwnProp(input, '_locale')) {\n ret._locale = input._locale;\n }\n\n return ret;\n}\n\ncreateDuration.fn = Duration.prototype;\ncreateDuration.invalid = createInvalid$1;\n\nfunction parseIso (inp, sign) {\n // We'd normally use ~~inp for this, but unfortunately it also\n // converts floats to ints.\n // inp may be undefined, so careful calling replace on it.\n var res = inp && parseFloat(inp.replace(',', '.'));\n // apply sign while we're at it\n return (isNaN(res) ? 0 : res) * sign;\n}\n\nfunction positiveMomentsDifference(base, other) {\n var res = {milliseconds: 0, months: 0};\n\n res.months = other.month() - base.month() +\n (other.year() - base.year()) * 12;\n if (base.clone().add(res.months, 'M').isAfter(other)) {\n --res.months;\n }\n\n res.milliseconds = +other - +(base.clone().add(res.months, 'M'));\n\n return res;\n}\n\nfunction momentsDifference(base, other) {\n var res;\n if (!(base.isValid() && other.isValid())) {\n return {milliseconds: 0, months: 0};\n }\n\n other = cloneWithOffset(other, base);\n if (base.isBefore(other)) {\n res = positiveMomentsDifference(base, other);\n } else {\n res = positiveMomentsDifference(other, base);\n res.milliseconds = -res.milliseconds;\n res.months = -res.months;\n }\n\n return res;\n}\n\n// TODO: remove 'name' arg after deprecation is removed\nfunction createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n tmp = val; val = period; period = tmp;\n }\n\n val = typeof val === 'string' ? +val : val;\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n}\n\nfunction addSubtract (mom, duration, isAdding, updateOffset) {\n var milliseconds = duration._milliseconds,\n days = absRound(duration._days),\n months = absRound(duration._months);\n\n if (!mom.isValid()) {\n // No op\n return;\n }\n\n updateOffset = updateOffset == null ? true : updateOffset;\n\n if (milliseconds) {\n mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);\n }\n if (days) {\n set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);\n }\n if (months) {\n setMonth(mom, get(mom, 'Month') + months * isAdding);\n }\n if (updateOffset) {\n hooks.updateOffset(mom, days || months);\n }\n}\n\nvar add = createAdder(1, 'add');\nvar subtract = createAdder(-1, 'subtract');\n\nfunction getCalendarFormat(myMoment, now) {\n var diff = myMoment.diff(now, 'days', true);\n return diff < -6 ? 'sameElse' :\n diff < -1 ? 'lastWeek' :\n diff < 0 ? 'lastDay' :\n diff < 1 ? 'sameDay' :\n diff < 2 ? 'nextDay' :\n diff < 7 ? 'nextWeek' : 'sameElse';\n}\n\nfunction calendar$1 (time, formats) {\n // We want to compare the start of today, vs this.\n // Getting start-of-today depends on whether we're local/utc/offset or not.\n var now = time || createLocal(),\n sod = cloneWithOffset(now, this).startOf('day'),\n format = hooks.calendarFormat(this, sod) || 'sameElse';\n\n var output = formats && (isFunction(formats[format]) ? formats[format].call(this, now) : formats[format]);\n\n return this.format(output || this.localeData().calendar(format, this, createLocal(now)));\n}\n\nfunction clone () {\n return new Moment(this);\n}\n\nfunction isAfter (input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(!isUndefined(units) ? units : 'millisecond');\n if (units === 'millisecond') {\n return this.valueOf() > localInput.valueOf();\n } else {\n return localInput.valueOf() < this.clone().startOf(units).valueOf();\n }\n}\n\nfunction isBefore (input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(!isUndefined(units) ? units : 'millisecond');\n if (units === 'millisecond') {\n return this.valueOf() < localInput.valueOf();\n } else {\n return this.clone().endOf(units).valueOf() < localInput.valueOf();\n }\n}\n\nfunction isBetween (from, to, units, inclusivity) {\n inclusivity = inclusivity || '()';\n return (inclusivity[0] === '(' ? this.isAfter(from, units) : !this.isBefore(from, units)) &&\n (inclusivity[1] === ')' ? this.isBefore(to, units) : !this.isAfter(to, units));\n}\n\nfunction isSame (input, units) {\n var localInput = isMoment(input) ? input : createLocal(input),\n inputMs;\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units || 'millisecond');\n if (units === 'millisecond') {\n return this.valueOf() === localInput.valueOf();\n } else {\n inputMs = localInput.valueOf();\n return this.clone().startOf(units).valueOf() <= inputMs && inputMs <= this.clone().endOf(units).valueOf();\n }\n}\n\nfunction isSameOrAfter (input, units) {\n return this.isSame(input, units) || this.isAfter(input,units);\n}\n\nfunction isSameOrBefore (input, units) {\n return this.isSame(input, units) || this.isBefore(input,units);\n}\n\nfunction diff (input, units, asFloat) {\n var that,\n zoneDelta,\n delta, output;\n\n if (!this.isValid()) {\n return NaN;\n }\n\n that = cloneWithOffset(input, this);\n\n if (!that.isValid()) {\n return NaN;\n }\n\n zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;\n\n units = normalizeUnits(units);\n\n if (units === 'year' || units === 'month' || units === 'quarter') {\n output = monthDiff(this, that);\n if (units === 'quarter') {\n output = output / 3;\n } else if (units === 'year') {\n output = output / 12;\n }\n } else {\n delta = this - that;\n output = units === 'second' ? delta / 1e3 : // 1000\n units === 'minute' ? delta / 6e4 : // 1000 * 60\n units === 'hour' ? delta / 36e5 : // 1000 * 60 * 60\n units === 'day' ? (delta - zoneDelta) / 864e5 : // 1000 * 60 * 60 * 24, negate dst\n units === 'week' ? (delta - zoneDelta) / 6048e5 : // 1000 * 60 * 60 * 24 * 7, negate dst\n delta;\n }\n return asFloat ? output : absFloor(output);\n}\n\nfunction monthDiff (a, b) {\n // difference in months\n var wholeMonthDiff = ((b.year() - a.year()) * 12) + (b.month() - a.month()),\n // b is in (anchor - 1 month, anchor + 1 month)\n anchor = a.clone().add(wholeMonthDiff, 'months'),\n anchor2, adjust;\n\n if (b - anchor < 0) {\n anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor - anchor2);\n } else {\n anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor2 - anchor);\n }\n\n //check for negative zero, return zero if negative zero\n return -(wholeMonthDiff + adjust) || 0;\n}\n\nhooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';\nhooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';\n\nfunction toString () {\n return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');\n}\n\nfunction toISOString() {\n if (!this.isValid()) {\n return null;\n }\n var m = this.clone().utc();\n if (m.year() < 0 || m.year() > 9999) {\n return formatMoment(m, 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]');\n }\n if (isFunction(Date.prototype.toISOString)) {\n // native implementation is ~50x faster, use it when we can\n return this.toDate().toISOString();\n }\n return formatMoment(m, 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]');\n}\n\n/**\n * Return a human readable representation of a moment that can\n * also be evaluated to get a new moment which is the same\n *\n * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects\n */\nfunction inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}\n\nfunction format (inputString) {\n if (!inputString) {\n inputString = this.isUtc() ? hooks.defaultFormatUtc : hooks.defaultFormat;\n }\n var output = formatMoment(this, inputString);\n return this.localeData().postformat(output);\n}\n\nfunction from (time, withoutSuffix) {\n if (this.isValid() &&\n ((isMoment(time) && time.isValid()) ||\n createLocal(time).isValid())) {\n return createDuration({to: this, from: time}).locale(this.locale()).humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n}\n\nfunction fromNow (withoutSuffix) {\n return this.from(createLocal(), withoutSuffix);\n}\n\nfunction to (time, withoutSuffix) {\n if (this.isValid() &&\n ((isMoment(time) && time.isValid()) ||\n createLocal(time).isValid())) {\n return createDuration({from: this, to: time}).locale(this.locale()).humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n}\n\nfunction toNow (withoutSuffix) {\n return this.to(createLocal(), withoutSuffix);\n}\n\n// If passed a locale key, it will set the locale for this\n// instance. Otherwise, it will return the locale configuration\n// variables for this instance.\nfunction locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}\n\nvar lang = deprecate(\n 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',\n function (key) {\n if (key === undefined) {\n return this.localeData();\n } else {\n return this.locale(key);\n }\n }\n);\n\nfunction localeData () {\n return this._locale;\n}\n\nfunction startOf (units) {\n units = normalizeUnits(units);\n // the following switch intentionally omits break keywords\n // to utilize falling through the cases.\n switch (units) {\n case 'year':\n this.month(0);\n /* falls through */\n case 'quarter':\n case 'month':\n this.date(1);\n /* falls through */\n case 'week':\n case 'isoWeek':\n case 'day':\n case 'date':\n this.hours(0);\n /* falls through */\n case 'hour':\n this.minutes(0);\n /* falls through */\n case 'minute':\n this.seconds(0);\n /* falls through */\n case 'second':\n this.milliseconds(0);\n }\n\n // weeks are a special case\n if (units === 'week') {\n this.weekday(0);\n }\n if (units === 'isoWeek') {\n this.isoWeekday(1);\n }\n\n // quarters are also special\n if (units === 'quarter') {\n this.month(Math.floor(this.month() / 3) * 3);\n }\n\n return this;\n}\n\nfunction endOf (units) {\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond') {\n return this;\n }\n\n // 'date' is an alias for 'day', so it should be considered as such.\n if (units === 'date') {\n units = 'day';\n }\n\n return this.startOf(units).add(1, (units === 'isoWeek' ? 'week' : units)).subtract(1, 'ms');\n}\n\nfunction valueOf () {\n return this._d.valueOf() - ((this._offset || 0) * 60000);\n}\n\nfunction unix () {\n return Math.floor(this.valueOf() / 1000);\n}\n\nfunction toDate () {\n return new Date(this.valueOf());\n}\n\nfunction toArray () {\n var m = this;\n return [m.year(), m.month(), m.date(), m.hour(), m.minute(), m.second(), m.millisecond()];\n}\n\nfunction toObject () {\n var m = this;\n return {\n years: m.year(),\n months: m.month(),\n date: m.date(),\n hours: m.hours(),\n minutes: m.minutes(),\n seconds: m.seconds(),\n milliseconds: m.milliseconds()\n };\n}\n\nfunction toJSON () {\n // new Date(NaN).toJSON() === null\n return this.isValid() ? this.toISOString() : null;\n}\n\nfunction isValid$2 () {\n return isValid(this);\n}\n\nfunction parsingFlags () {\n return extend({}, getParsingFlags(this));\n}\n\nfunction invalidAt () {\n return getParsingFlags(this).overflow;\n}\n\nfunction creationData() {\n return {\n input: this._i,\n format: this._f,\n locale: this._locale,\n isUTC: this._isUTC,\n strict: this._strict\n };\n}\n\n// FORMATTING\n\naddFormatToken(0, ['gg', 2], 0, function () {\n return this.weekYear() % 100;\n});\n\naddFormatToken(0, ['GG', 2], 0, function () {\n return this.isoWeekYear() % 100;\n});\n\nfunction addWeekYearFormatToken (token, getter) {\n addFormatToken(0, [token, token.length], 0, getter);\n}\n\naddWeekYearFormatToken('gggg', 'weekYear');\naddWeekYearFormatToken('ggggg', 'weekYear');\naddWeekYearFormatToken('GGGG', 'isoWeekYear');\naddWeekYearFormatToken('GGGGG', 'isoWeekYear');\n\n// ALIASES\n\naddUnitAlias('weekYear', 'gg');\naddUnitAlias('isoWeekYear', 'GG');\n\n// PRIORITY\n\naddUnitPriority('weekYear', 1);\naddUnitPriority('isoWeekYear', 1);\n\n\n// PARSING\n\naddRegexToken('G', matchSigned);\naddRegexToken('g', matchSigned);\naddRegexToken('GG', match1to2, match2);\naddRegexToken('gg', match1to2, match2);\naddRegexToken('GGGG', match1to4, match4);\naddRegexToken('gggg', match1to4, match4);\naddRegexToken('GGGGG', match1to6, match6);\naddRegexToken('ggggg', match1to6, match6);\n\naddWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function (input, week, config, token) {\n week[token.substr(0, 2)] = toInt(input);\n});\n\naddWeekParseToken(['gg', 'GG'], function (input, week, config, token) {\n week[token] = hooks.parseTwoDigitYear(input);\n});\n\n// MOMENTS\n\nfunction getSetWeekYear (input) {\n return getSetWeekYearHelper.call(this,\n input,\n this.week(),\n this.weekday(),\n this.localeData()._week.dow,\n this.localeData()._week.doy);\n}\n\nfunction getSetISOWeekYear (input) {\n return getSetWeekYearHelper.call(this,\n input, this.isoWeek(), this.isoWeekday(), 1, 4);\n}\n\nfunction getISOWeeksInYear () {\n return weeksInYear(this.year(), 1, 4);\n}\n\nfunction getWeeksInYear () {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);\n}\n\nfunction getSetWeekYearHelper(input, week, weekday, dow, doy) {\n var weeksTarget;\n if (input == null) {\n return weekOfYear(this, dow, doy).year;\n } else {\n weeksTarget = weeksInYear(input, dow, doy);\n if (week > weeksTarget) {\n week = weeksTarget;\n }\n return setWeekAll.call(this, input, week, weekday, dow, doy);\n }\n}\n\nfunction setWeekAll(weekYear, week, weekday, dow, doy) {\n var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),\n date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);\n\n this.year(date.getUTCFullYear());\n this.month(date.getUTCMonth());\n this.date(date.getUTCDate());\n return this;\n}\n\n// FORMATTING\n\naddFormatToken('Q', 0, 'Qo', 'quarter');\n\n// ALIASES\n\naddUnitAlias('quarter', 'Q');\n\n// PRIORITY\n\naddUnitPriority('quarter', 7);\n\n// PARSING\n\naddRegexToken('Q', match1);\naddParseToken('Q', function (input, array) {\n array[MONTH] = (toInt(input) - 1) * 3;\n});\n\n// MOMENTS\n\nfunction getSetQuarter (input) {\n return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3);\n}\n\n// FORMATTING\n\naddFormatToken('D', ['DD', 2], 'Do', 'date');\n\n// ALIASES\n\naddUnitAlias('date', 'D');\n\n// PRIOROITY\naddUnitPriority('date', 9);\n\n// PARSING\n\naddRegexToken('D', match1to2);\naddRegexToken('DD', match1to2, match2);\naddRegexToken('Do', function (isStrict, locale) {\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n return isStrict ?\n (locale._dayOfMonthOrdinalParse || locale._ordinalParse) :\n locale._dayOfMonthOrdinalParseLenient;\n});\n\naddParseToken(['D', 'DD'], DATE);\naddParseToken('Do', function (input, array) {\n array[DATE] = toInt(input.match(match1to2)[0], 10);\n});\n\n// MOMENTS\n\nvar getSetDayOfMonth = makeGetSet('Date', true);\n\n// FORMATTING\n\naddFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');\n\n// ALIASES\n\naddUnitAlias('dayOfYear', 'DDD');\n\n// PRIORITY\naddUnitPriority('dayOfYear', 4);\n\n// PARSING\n\naddRegexToken('DDD', match1to3);\naddRegexToken('DDDD', match3);\naddParseToken(['DDD', 'DDDD'], function (input, array, config) {\n config._dayOfYear = toInt(input);\n});\n\n// HELPERS\n\n// MOMENTS\n\nfunction getSetDayOfYear (input) {\n var dayOfYear = Math.round((this.clone().startOf('day') - this.clone().startOf('year')) / 864e5) + 1;\n return input == null ? dayOfYear : this.add((input - dayOfYear), 'd');\n}\n\n// FORMATTING\n\naddFormatToken('m', ['mm', 2], 0, 'minute');\n\n// ALIASES\n\naddUnitAlias('minute', 'm');\n\n// PRIORITY\n\naddUnitPriority('minute', 14);\n\n// PARSING\n\naddRegexToken('m', match1to2);\naddRegexToken('mm', match1to2, match2);\naddParseToken(['m', 'mm'], MINUTE);\n\n// MOMENTS\n\nvar getSetMinute = makeGetSet('Minutes', false);\n\n// FORMATTING\n\naddFormatToken('s', ['ss', 2], 0, 'second');\n\n// ALIASES\n\naddUnitAlias('second', 's');\n\n// PRIORITY\n\naddUnitPriority('second', 15);\n\n// PARSING\n\naddRegexToken('s', match1to2);\naddRegexToken('ss', match1to2, match2);\naddParseToken(['s', 'ss'], SECOND);\n\n// MOMENTS\n\nvar getSetSecond = makeGetSet('Seconds', false);\n\n// FORMATTING\n\naddFormatToken('S', 0, 0, function () {\n return ~~(this.millisecond() / 100);\n});\n\naddFormatToken(0, ['SS', 2], 0, function () {\n return ~~(this.millisecond() / 10);\n});\n\naddFormatToken(0, ['SSS', 3], 0, 'millisecond');\naddFormatToken(0, ['SSSS', 4], 0, function () {\n return this.millisecond() * 10;\n});\naddFormatToken(0, ['SSSSS', 5], 0, function () {\n return this.millisecond() * 100;\n});\naddFormatToken(0, ['SSSSSS', 6], 0, function () {\n return this.millisecond() * 1000;\n});\naddFormatToken(0, ['SSSSSSS', 7], 0, function () {\n return this.millisecond() * 10000;\n});\naddFormatToken(0, ['SSSSSSSS', 8], 0, function () {\n return this.millisecond() * 100000;\n});\naddFormatToken(0, ['SSSSSSSSS', 9], 0, function () {\n return this.millisecond() * 1000000;\n});\n\n\n// ALIASES\n\naddUnitAlias('millisecond', 'ms');\n\n// PRIORITY\n\naddUnitPriority('millisecond', 16);\n\n// PARSING\n\naddRegexToken('S', match1to3, match1);\naddRegexToken('SS', match1to3, match2);\naddRegexToken('SSS', match1to3, match3);\n\nvar token;\nfor (token = 'SSSS'; token.length <= 9; token += 'S') {\n addRegexToken(token, matchUnsigned);\n}\n\nfunction parseMs(input, array) {\n array[MILLISECOND] = toInt(('0.' + input) * 1000);\n}\n\nfor (token = 'S'; token.length <= 9; token += 'S') {\n addParseToken(token, parseMs);\n}\n// MOMENTS\n\nvar getSetMillisecond = makeGetSet('Milliseconds', false);\n\n// FORMATTING\n\naddFormatToken('z', 0, 0, 'zoneAbbr');\naddFormatToken('zz', 0, 0, 'zoneName');\n\n// MOMENTS\n\nfunction getZoneAbbr () {\n return this._isUTC ? 'UTC' : '';\n}\n\nfunction getZoneName () {\n return this._isUTC ? 'Coordinated Universal Time' : '';\n}\n\nvar proto = Moment.prototype;\n\nproto.add = add;\nproto.calendar = calendar$1;\nproto.clone = clone;\nproto.diff = diff;\nproto.endOf = endOf;\nproto.format = format;\nproto.from = from;\nproto.fromNow = fromNow;\nproto.to = to;\nproto.toNow = toNow;\nproto.get = stringGet;\nproto.invalidAt = invalidAt;\nproto.isAfter = isAfter;\nproto.isBefore = isBefore;\nproto.isBetween = isBetween;\nproto.isSame = isSame;\nproto.isSameOrAfter = isSameOrAfter;\nproto.isSameOrBefore = isSameOrBefore;\nproto.isValid = isValid$2;\nproto.lang = lang;\nproto.locale = locale;\nproto.localeData = localeData;\nproto.max = prototypeMax;\nproto.min = prototypeMin;\nproto.parsingFlags = parsingFlags;\nproto.set = stringSet;\nproto.startOf = startOf;\nproto.subtract = subtract;\nproto.toArray = toArray;\nproto.toObject = toObject;\nproto.toDate = toDate;\nproto.toISOString = toISOString;\nproto.inspect = inspect;\nproto.toJSON = toJSON;\nproto.toString = toString;\nproto.unix = unix;\nproto.valueOf = valueOf;\nproto.creationData = creationData;\n\n// Year\nproto.year = getSetYear;\nproto.isLeapYear = getIsLeapYear;\n\n// Week Year\nproto.weekYear = getSetWeekYear;\nproto.isoWeekYear = getSetISOWeekYear;\n\n// Quarter\nproto.quarter = proto.quarters = getSetQuarter;\n\n// Month\nproto.month = getSetMonth;\nproto.daysInMonth = getDaysInMonth;\n\n// Week\nproto.week = proto.weeks = getSetWeek;\nproto.isoWeek = proto.isoWeeks = getSetISOWeek;\nproto.weeksInYear = getWeeksInYear;\nproto.isoWeeksInYear = getISOWeeksInYear;\n\n// Day\nproto.date = getSetDayOfMonth;\nproto.day = proto.days = getSetDayOfWeek;\nproto.weekday = getSetLocaleDayOfWeek;\nproto.isoWeekday = getSetISODayOfWeek;\nproto.dayOfYear = getSetDayOfYear;\n\n// Hour\nproto.hour = proto.hours = getSetHour;\n\n// Minute\nproto.minute = proto.minutes = getSetMinute;\n\n// Second\nproto.second = proto.seconds = getSetSecond;\n\n// Millisecond\nproto.millisecond = proto.milliseconds = getSetMillisecond;\n\n// Offset\nproto.utcOffset = getSetOffset;\nproto.utc = setOffsetToUTC;\nproto.local = setOffsetToLocal;\nproto.parseZone = setOffsetToParsedOffset;\nproto.hasAlignedHourOffset = hasAlignedHourOffset;\nproto.isDST = isDaylightSavingTime;\nproto.isLocal = isLocal;\nproto.isUtcOffset = isUtcOffset;\nproto.isUtc = isUtc;\nproto.isUTC = isUtc;\n\n// Timezone\nproto.zoneAbbr = getZoneAbbr;\nproto.zoneName = getZoneName;\n\n// Deprecations\nproto.dates = deprecate('dates accessor is deprecated. Use date instead.', getSetDayOfMonth);\nproto.months = deprecate('months accessor is deprecated. Use month instead', getSetMonth);\nproto.years = deprecate('years accessor is deprecated. Use year instead', getSetYear);\nproto.zone = deprecate('moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/', getSetZone);\nproto.isDSTShifted = deprecate('isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information', isDaylightSavingTimeShifted);\n\nfunction createUnix (input) {\n return createLocal(input * 1000);\n}\n\nfunction createInZone () {\n return createLocal.apply(null, arguments).parseZone();\n}\n\nfunction preParsePostFormat (string) {\n return string;\n}\n\nvar proto$1 = Locale.prototype;\n\nproto$1.calendar = calendar;\nproto$1.longDateFormat = longDateFormat;\nproto$1.invalidDate = invalidDate;\nproto$1.ordinal = ordinal;\nproto$1.preparse = preParsePostFormat;\nproto$1.postformat = preParsePostFormat;\nproto$1.relativeTime = relativeTime;\nproto$1.pastFuture = pastFuture;\nproto$1.set = set;\n\n// Month\nproto$1.months = localeMonths;\nproto$1.monthsShort = localeMonthsShort;\nproto$1.monthsParse = localeMonthsParse;\nproto$1.monthsRegex = monthsRegex;\nproto$1.monthsShortRegex = monthsShortRegex;\n\n// Week\nproto$1.week = localeWeek;\nproto$1.firstDayOfYear = localeFirstDayOfYear;\nproto$1.firstDayOfWeek = localeFirstDayOfWeek;\n\n// Day of Week\nproto$1.weekdays = localeWeekdays;\nproto$1.weekdaysMin = localeWeekdaysMin;\nproto$1.weekdaysShort = localeWeekdaysShort;\nproto$1.weekdaysParse = localeWeekdaysParse;\n\nproto$1.weekdaysRegex = weekdaysRegex;\nproto$1.weekdaysShortRegex = weekdaysShortRegex;\nproto$1.weekdaysMinRegex = weekdaysMinRegex;\n\n// Hours\nproto$1.isPM = localeIsPM;\nproto$1.meridiem = localeMeridiem;\n\nfunction get$1 (format, index, field, setter) {\n var locale = getLocale();\n var utc = createUTC().set(setter, index);\n return locale[field](utc, format);\n}\n\nfunction listMonthsImpl (format, index, field) {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n\n if (index != null) {\n return get$1(format, index, field, 'month');\n }\n\n var i;\n var out = [];\n for (i = 0; i < 12; i++) {\n out[i] = get$1(format, i, field, 'month');\n }\n return out;\n}\n\n// ()\n// (5)\n// (fmt, 5)\n// (fmt)\n// (true)\n// (true, 5)\n// (true, fmt, 5)\n// (true, fmt)\nfunction listWeekdaysImpl (localeSorted, format, index, field) {\n if (typeof localeSorted === 'boolean') {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n } else {\n format = localeSorted;\n index = format;\n localeSorted = false;\n\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n }\n\n var locale = getLocale(),\n shift = localeSorted ? locale._week.dow : 0;\n\n if (index != null) {\n return get$1(format, (index + shift) % 7, field, 'day');\n }\n\n var i;\n var out = [];\n for (i = 0; i < 7; i++) {\n out[i] = get$1(format, (i + shift) % 7, field, 'day');\n }\n return out;\n}\n\nfunction listMonths (format, index) {\n return listMonthsImpl(format, index, 'months');\n}\n\nfunction listMonthsShort (format, index) {\n return listMonthsImpl(format, index, 'monthsShort');\n}\n\nfunction listWeekdays (localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdays');\n}\n\nfunction listWeekdaysShort (localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');\n}\n\nfunction listWeekdaysMin (localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');\n}\n\ngetSetGlobalLocale('en', {\n dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\n ordinal : function (number) {\n var b = number % 10,\n output = (toInt(number % 100 / 10) === 1) ? 'th' :\n (b === 1) ? 'st' :\n (b === 2) ? 'nd' :\n (b === 3) ? 'rd' : 'th';\n return number + output;\n }\n});\n\n// Side effect imports\nhooks.lang = deprecate('moment.lang is deprecated. Use moment.locale instead.', getSetGlobalLocale);\nhooks.langData = deprecate('moment.langData is deprecated. Use moment.localeData instead.', getLocale);\n\nvar mathAbs = Math.abs;\n\nfunction abs () {\n var data = this._data;\n\n this._milliseconds = mathAbs(this._milliseconds);\n this._days = mathAbs(this._days);\n this._months = mathAbs(this._months);\n\n data.milliseconds = mathAbs(data.milliseconds);\n data.seconds = mathAbs(data.seconds);\n data.minutes = mathAbs(data.minutes);\n data.hours = mathAbs(data.hours);\n data.months = mathAbs(data.months);\n data.years = mathAbs(data.years);\n\n return this;\n}\n\nfunction addSubtract$1 (duration, input, value, direction) {\n var other = createDuration(input, value);\n\n duration._milliseconds += direction * other._milliseconds;\n duration._days += direction * other._days;\n duration._months += direction * other._months;\n\n return duration._bubble();\n}\n\n// supports only 2.0-style add(1, 's') or add(duration)\nfunction add$1 (input, value) {\n return addSubtract$1(this, input, value, 1);\n}\n\n// supports only 2.0-style subtract(1, 's') or subtract(duration)\nfunction subtract$1 (input, value) {\n return addSubtract$1(this, input, value, -1);\n}\n\nfunction absCeil (number) {\n if (number < 0) {\n return Math.floor(number);\n } else {\n return Math.ceil(number);\n }\n}\n\nfunction bubble () {\n var milliseconds = this._milliseconds;\n var days = this._days;\n var months = this._months;\n var data = this._data;\n var seconds, minutes, hours, years, monthsFromDays;\n\n // if we have a mix of positive and negative values, bubble down first\n // check: https://github.com/moment/moment/issues/2166\n if (!((milliseconds >= 0 && days >= 0 && months >= 0) ||\n (milliseconds <= 0 && days <= 0 && months <= 0))) {\n milliseconds += absCeil(monthsToDays(months) + days) * 864e5;\n days = 0;\n months = 0;\n }\n\n // The following code bubbles up values, see the tests for\n // examples of what that means.\n data.milliseconds = milliseconds % 1000;\n\n seconds = absFloor(milliseconds / 1000);\n data.seconds = seconds % 60;\n\n minutes = absFloor(seconds / 60);\n data.minutes = minutes % 60;\n\n hours = absFloor(minutes / 60);\n data.hours = hours % 24;\n\n days += absFloor(hours / 24);\n\n // convert days to months\n monthsFromDays = absFloor(daysToMonths(days));\n months += monthsFromDays;\n days -= absCeil(monthsToDays(monthsFromDays));\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n data.days = days;\n data.months = months;\n data.years = years;\n\n return this;\n}\n\nfunction daysToMonths (days) {\n // 400 years have 146097 days (taking into account leap year rules)\n // 400 years have 12 months === 4800\n return days * 4800 / 146097;\n}\n\nfunction monthsToDays (months) {\n // the reverse of daysToMonths\n return months * 146097 / 4800;\n}\n\nfunction as (units) {\n if (!this.isValid()) {\n return NaN;\n }\n var days;\n var months;\n var milliseconds = this._milliseconds;\n\n units = normalizeUnits(units);\n\n if (units === 'month' || units === 'year') {\n days = this._days + milliseconds / 864e5;\n months = this._months + daysToMonths(days);\n return units === 'month' ? months : months / 12;\n } else {\n // handle milliseconds separately because of floating point math errors (issue #1867)\n days = this._days + Math.round(monthsToDays(this._months));\n switch (units) {\n case 'week' : return days / 7 + milliseconds / 6048e5;\n case 'day' : return days + milliseconds / 864e5;\n case 'hour' : return days * 24 + milliseconds / 36e5;\n case 'minute' : return days * 1440 + milliseconds / 6e4;\n case 'second' : return days * 86400 + milliseconds / 1000;\n // Math.floor prevents floating point math errors here\n case 'millisecond': return Math.floor(days * 864e5) + milliseconds;\n default: throw new Error('Unknown unit ' + units);\n }\n }\n}\n\n// TODO: Use this.as('ms')?\nfunction valueOf$1 () {\n if (!this.isValid()) {\n return NaN;\n }\n return (\n this._milliseconds +\n this._days * 864e5 +\n (this._months % 12) * 2592e6 +\n toInt(this._months / 12) * 31536e6\n );\n}\n\nfunction makeAs (alias) {\n return function () {\n return this.as(alias);\n };\n}\n\nvar asMilliseconds = makeAs('ms');\nvar asSeconds = makeAs('s');\nvar asMinutes = makeAs('m');\nvar asHours = makeAs('h');\nvar asDays = makeAs('d');\nvar asWeeks = makeAs('w');\nvar asMonths = makeAs('M');\nvar asYears = makeAs('y');\n\nfunction get$2 (units) {\n units = normalizeUnits(units);\n return this.isValid() ? this[units + 's']() : NaN;\n}\n\nfunction makeGetter(name) {\n return function () {\n return this.isValid() ? this._data[name] : NaN;\n };\n}\n\nvar milliseconds = makeGetter('milliseconds');\nvar seconds = makeGetter('seconds');\nvar minutes = makeGetter('minutes');\nvar hours = makeGetter('hours');\nvar days = makeGetter('days');\nvar months = makeGetter('months');\nvar years = makeGetter('years');\n\nfunction weeks () {\n return absFloor(this.days() / 7);\n}\n\nvar round = Math.round;\nvar thresholds = {\n ss: 44, // a few seconds to seconds\n s : 45, // seconds to minute\n m : 45, // minutes to hour\n h : 22, // hours to day\n d : 26, // days to month\n M : 11 // months to year\n};\n\n// helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize\nfunction substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {\n return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);\n}\n\nfunction relativeTime$1 (posNegDuration, withoutSuffix, locale) {\n var duration = createDuration(posNegDuration).abs();\n var seconds = round(duration.as('s'));\n var minutes = round(duration.as('m'));\n var hours = round(duration.as('h'));\n var days = round(duration.as('d'));\n var months = round(duration.as('M'));\n var years = round(duration.as('y'));\n\n var a = seconds <= thresholds.ss && ['s', seconds] ||\n seconds < thresholds.s && ['ss', seconds] ||\n minutes <= 1 && ['m'] ||\n minutes < thresholds.m && ['mm', minutes] ||\n hours <= 1 && ['h'] ||\n hours < thresholds.h && ['hh', hours] ||\n days <= 1 && ['d'] ||\n days < thresholds.d && ['dd', days] ||\n months <= 1 && ['M'] ||\n months < thresholds.M && ['MM', months] ||\n years <= 1 && ['y'] || ['yy', years];\n\n a[2] = withoutSuffix;\n a[3] = +posNegDuration > 0;\n a[4] = locale;\n return substituteTimeAgo.apply(null, a);\n}\n\n// This function allows you to set the rounding function for relative time strings\nfunction getSetRelativeTimeRounding (roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof(roundingFunction) === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n}\n\n// This function allows you to set a threshold for relative time strings\nfunction getSetRelativeTimeThreshold (threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n}\n\nfunction humanize (withSuffix) {\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var locale = this.localeData();\n var output = relativeTime$1(this, !withSuffix, locale);\n\n if (withSuffix) {\n output = locale.pastFuture(+this, output);\n }\n\n return locale.postformat(output);\n}\n\nvar abs$1 = Math.abs;\n\nfunction toISOString$1() {\n // for ISO strings we do not use the normal bubbling rules:\n // * milliseconds bubble up until they become hours\n // * days do not bubble at all\n // * months bubble up until they become years\n // This is because there is no context-free conversion between hours and days\n // (think of clock changes)\n // and also not between days and months (28-31 days per month)\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var seconds = abs$1(this._milliseconds) / 1000;\n var days = abs$1(this._days);\n var months = abs$1(this._months);\n var minutes, hours, years;\n\n // 3600 seconds -> 60 minutes -> 1 hour\n minutes = absFloor(seconds / 60);\n hours = absFloor(minutes / 60);\n seconds %= 60;\n minutes %= 60;\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n\n // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js\n var Y = years;\n var M = months;\n var D = days;\n var h = hours;\n var m = minutes;\n var s = seconds;\n var total = this.asSeconds();\n\n if (!total) {\n // this is the same as C#'s (Noda) and python (isodate)...\n // but not other JS (goog.date)\n return 'P0D';\n }\n\n return (total < 0 ? '-' : '') +\n 'P' +\n (Y ? Y + 'Y' : '') +\n (M ? M + 'M' : '') +\n (D ? D + 'D' : '') +\n ((h || m || s) ? 'T' : '') +\n (h ? h + 'H' : '') +\n (m ? m + 'M' : '') +\n (s ? s + 'S' : '');\n}\n\nvar proto$2 = Duration.prototype;\n\nproto$2.isValid = isValid$1;\nproto$2.abs = abs;\nproto$2.add = add$1;\nproto$2.subtract = subtract$1;\nproto$2.as = as;\nproto$2.asMilliseconds = asMilliseconds;\nproto$2.asSeconds = asSeconds;\nproto$2.asMinutes = asMinutes;\nproto$2.asHours = asHours;\nproto$2.asDays = asDays;\nproto$2.asWeeks = asWeeks;\nproto$2.asMonths = asMonths;\nproto$2.asYears = asYears;\nproto$2.valueOf = valueOf$1;\nproto$2._bubble = bubble;\nproto$2.get = get$2;\nproto$2.milliseconds = milliseconds;\nproto$2.seconds = seconds;\nproto$2.minutes = minutes;\nproto$2.hours = hours;\nproto$2.days = days;\nproto$2.weeks = weeks;\nproto$2.months = months;\nproto$2.years = years;\nproto$2.humanize = humanize;\nproto$2.toISOString = toISOString$1;\nproto$2.toString = toISOString$1;\nproto$2.toJSON = toISOString$1;\nproto$2.locale = locale;\nproto$2.localeData = localeData;\n\n// Deprecations\nproto$2.toIsoString = deprecate('toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)', toISOString$1);\nproto$2.lang = lang;\n\n// Side effect imports\n\n// FORMATTING\n\naddFormatToken('X', 0, 0, 'unix');\naddFormatToken('x', 0, 0, 'valueOf');\n\n// PARSING\n\naddRegexToken('x', matchSigned);\naddRegexToken('X', matchTimestamp);\naddParseToken('X', function (input, array, config) {\n config._d = new Date(parseFloat(input, 10) * 1000);\n});\naddParseToken('x', function (input, array, config) {\n config._d = new Date(toInt(input));\n});\n\n// Side effect imports\n\n\nhooks.version = '2.18.1';\n\nsetHookCallback(createLocal);\n\nhooks.fn = proto;\nhooks.min = min;\nhooks.max = max;\nhooks.now = now;\nhooks.utc = createUTC;\nhooks.unix = createUnix;\nhooks.months = listMonths;\nhooks.isDate = isDate;\nhooks.locale = getSetGlobalLocale;\nhooks.invalid = createInvalid;\nhooks.duration = createDuration;\nhooks.isMoment = isMoment;\nhooks.weekdays = listWeekdays;\nhooks.parseZone = createInZone;\nhooks.localeData = getLocale;\nhooks.isDuration = isDuration;\nhooks.monthsShort = listMonthsShort;\nhooks.weekdaysMin = listWeekdaysMin;\nhooks.defineLocale = defineLocale;\nhooks.updateLocale = updateLocale;\nhooks.locales = listLocales;\nhooks.weekdaysShort = listWeekdaysShort;\nhooks.normalizeUnits = normalizeUnits;\nhooks.relativeTimeRounding = getSetRelativeTimeRounding;\nhooks.relativeTimeThreshold = getSetRelativeTimeThreshold;\nhooks.calendarFormat = getCalendarFormat;\nhooks.prototype = proto;\n\nreturn hooks;\n\n})));\n\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(/*! ./../webpack/buildin/module.js */ 275)(module)))\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/moment.js\n// module id = 3\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/moment.js?", + ); + + /***/ + }, + /* 4 */ + /* unknown exports provided */ + /* all exports used */ + /*!****************************!*\ + !*** ./app/types/index.js ***! + \****************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "Object.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_immutable__ = __webpack_require__(/*! immutable */ 26);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_immutable___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_immutable__);\n\n\nif (typeof exports !== 'undefined') Object.defineProperty(exports, 'babelPluginFlowReactPropTypes_proptype_User', {\n value: __webpack_require__(/*! react */ 1).PropTypes.shape({\n id: __webpack_require__(/*! prop-types */ 0).number.isRequired,\n allMutualFriendsCount: __webpack_require__(/*! prop-types */ 0).number,\n avatarUrl: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n firstName: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n lastName: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n url: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n phone: __webpack_require__(/*! prop-types */ 0).string,\n email: __webpack_require__(/*! prop-types */ 0).string,\n aboutMeDetails: __webpack_require__(/*! prop-types */ 0).string,\n coverImageUrl: __webpack_require__(/*! prop-types */ 0).string,\n fbConnected: __webpack_require__(/*! prop-types */ 0).bool.isRequired,\n fbFriend: __webpack_require__(/*! prop-types */ 0).bool,\n relationshipType: __webpack_require__(/*! prop-types */ 0).string,\n username: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n facebookUrl: __webpack_require__(/*! prop-types */ 0).string,\n twitterUrl: __webpack_require__(/*! prop-types */ 0).string,\n linkedinUrl: __webpack_require__(/*! prop-types */ 0).string,\n airbnbUrl: __webpack_require__(/*! prop-types */ 0).string,\n vrboUrl: __webpack_require__(/*! prop-types */ 0).string,\n personalWebsiteUrl: __webpack_require__(/*! prop-types */ 0).string\n })\n});\nif (typeof exports !== 'undefined') Object.defineProperty(exports, 'babelPluginFlowReactPropTypes_proptype_Users', {\n value: __webpack_require__(/*! react */ 1).PropTypes.shape({})\n});\nif (typeof exports !== 'undefined') Object.defineProperty(exports, 'babelPluginFlowReactPropTypes_proptype_GuestListMembershipBase', {\n value: __webpack_require__(/*! react */ 1).PropTypes.shape({\n id: __webpack_require__(/*! prop-types */ 0).number.isRequired,\n listing: __webpack_require__(/*! prop-types */ 0).number.isRequired,\n guestResponse: __webpack_require__(/*! prop-types */ 0).any.isRequired,\n revoked: __webpack_require__(/*! prop-types */ 0).bool.isRequired,\n updatedAt: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n createdAt: __webpack_require__(/*! prop-types */ 0).string.isRequired\n })\n});\nif (typeof exports !== 'undefined') Object.defineProperty(exports, 'babelPluginFlowReactPropTypes_proptype_GuestListUserMembership', {\n value: __webpack_require__(/*! react */ 1).PropTypes.shape({\n recipientEmail: __webpack_require__(/*! prop-types */ 0).string,\n recipientName: __webpack_require__(/*! prop-types */ 0).oneOf([true]).isRequired,\n user: __webpack_require__(/*! prop-types */ 0).number.isRequired\n })\n});\nif (typeof exports !== 'undefined') Object.defineProperty(exports, 'babelPluginFlowReactPropTypes_proptype_GuestListEmailMembership', {\n value: __webpack_require__(/*! react */ 1).PropTypes.shape({\n recipientEmail: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n recipientName: __webpack_require__(/*! prop-types */ 0).string,\n user: __webpack_require__(/*! prop-types */ 0).oneOf([true]).isRequired\n })\n});\nif (typeof exports !== 'undefined') Object.defineProperty(exports, 'babelPluginFlowReactPropTypes_proptype_GuestListMemberships', {\n value: __webpack_require__(/*! react */ 1).PropTypes.shape({})\n});\nif (typeof exports !== 'undefined') Object.defineProperty(exports, 'babelPluginFlowReactPropTypes_proptype_GuestSuggestion', {\n value: __webpack_require__(/*! react */ 1).PropTypes.shape({\n id: __webpack_require__(/*! prop-types */ 0).number.isRequired,\n guestList: __webpack_require__(/*! prop-types */ 0).number,\n isSelected: __webpack_require__(/*! prop-types */ 0).bool.isRequired,\n isDisabled: __webpack_require__(/*! prop-types */ 0).bool.isRequired,\n status: __webpack_require__(/*! prop-types */ 0).string,\n user: __webpack_require__(/*! prop-types */ 0).shape({\n id: __webpack_require__(/*! prop-types */ 0).number.isRequired,\n allMutualFriendsCount: __webpack_require__(/*! prop-types */ 0).number,\n avatarUrl: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n firstName: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n lastName: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n url: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n phone: __webpack_require__(/*! prop-types */ 0).string,\n email: __webpack_require__(/*! prop-types */ 0).string,\n aboutMeDetails: __webpack_require__(/*! prop-types */ 0).string,\n coverImageUrl: __webpack_require__(/*! prop-types */ 0).string,\n fbConnected: __webpack_require__(/*! prop-types */ 0).bool.isRequired,\n fbFriend: __webpack_require__(/*! prop-types */ 0).bool,\n relationshipType: __webpack_require__(/*! prop-types */ 0).string,\n username: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n facebookUrl: __webpack_require__(/*! prop-types */ 0).string,\n twitterUrl: __webpack_require__(/*! prop-types */ 0).string,\n linkedinUrl: __webpack_require__(/*! prop-types */ 0).string,\n airbnbUrl: __webpack_require__(/*! prop-types */ 0).string,\n vrboUrl: __webpack_require__(/*! prop-types */ 0).string,\n personalWebsiteUrl: __webpack_require__(/*! prop-types */ 0).string\n }).isRequired\n })\n});\nif (typeof exports !== 'undefined') Object.defineProperty(exports, 'babelPluginFlowReactPropTypes_proptype_GuestSuggestions', {\n value: __webpack_require__(/*! react */ 1).PropTypes.shape({})\n});\nif (typeof exports !== 'undefined') Object.defineProperty(exports, 'babelPluginFlowReactPropTypes_proptype_Photo', {\n value: __webpack_require__(/*! react */ 1).PropTypes.shape({\n id: __webpack_require__(/*! prop-types */ 0).number.isRequired,\n listingId: __webpack_require__(/*! prop-types */ 0).number.isRequired,\n cloudUrl: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n format: __webpack_require__(/*! prop-types */ 0).string,\n description: __webpack_require__(/*! prop-types */ 0).string,\n width: __webpack_require__(/*! prop-types */ 0).number,\n height: __webpack_require__(/*! prop-types */ 0).number,\n position: __webpack_require__(/*! prop-types */ 0).number.isRequired,\n publicId: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n resourceType: __webpack_require__(/*! prop-types */ 0).string,\n version: __webpack_require__(/*! prop-types */ 0).string\n })\n});\nif (typeof exports !== 'undefined') Object.defineProperty(exports, 'babelPluginFlowReactPropTypes_proptype_NormalizedCloudinaryPhotoData', {\n value: __webpack_require__(/*! react */ 1).PropTypes.shape({\n cloudUrl: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n format: __webpack_require__(/*! prop-types */ 0).string,\n width: __webpack_require__(/*! prop-types */ 0).number,\n height: __webpack_require__(/*! prop-types */ 0).number,\n publicId: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n resourceType: __webpack_require__(/*! prop-types */ 0).string,\n version: __webpack_require__(/*! prop-types */ 0).string\n })\n});\nif (typeof exports !== 'undefined') Object.defineProperty(exports, 'babelPluginFlowReactPropTypes_proptype_Amenity', {\n value: __webpack_require__(/*! react */ 1).PropTypes.shape({\n id: __webpack_require__(/*! prop-types */ 0).number.isRequired,\n name: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n category: __webpack_require__(/*! prop-types */ 0).string.isRequired\n })\n});\nif (typeof exports !== 'undefined') Object.defineProperty(exports, 'babelPluginFlowReactPropTypes_proptype_Listing', {\n value: __webpack_require__(/*! react */ 1).PropTypes.shape({\n id: __webpack_require__(/*! prop-types */ 0).any.isRequired,\n title: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n summary: __webpack_require__(/*! prop-types */ 0).string,\n description: __webpack_require__(/*! prop-types */ 0).string,\n country: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n state: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n city: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n street: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n apt: __webpack_require__(/*! prop-types */ 0).string,\n zipCode: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n closeTo: __webpack_require__(/*! prop-types */ 0).string,\n lat: __webpack_require__(/*! prop-types */ 0).number.isRequired,\n lng: __webpack_require__(/*! prop-types */ 0).number.isRequired,\n roomType: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n propertyType: __webpack_require__(/*! prop-types */ 0).string,\n bathrooms: __webpack_require__(/*! prop-types */ 0).number,\n bedrooms: __webpack_require__(/*! prop-types */ 0).number,\n beds: __webpack_require__(/*! prop-types */ 0).number,\n maxGuests: __webpack_require__(/*! prop-types */ 0).number,\n minimumStay: __webpack_require__(/*! prop-types */ 0).number,\n checkIn: __webpack_require__(/*! prop-types */ 0).number,\n checkOut: __webpack_require__(/*! prop-types */ 0).number,\n price: __webpack_require__(/*! prop-types */ 0).number,\n weeklyDiscount: __webpack_require__(/*! prop-types */ 0).number.isRequired,\n monthlyDiscount: __webpack_require__(/*! prop-types */ 0).number.isRequired,\n deposit: __webpack_require__(/*! prop-types */ 0).number,\n cleaningFee: __webpack_require__(/*! prop-types */ 0).number,\n privacyMode: __webpack_require__(/*! prop-types */ 0).any.isRequired,\n dirty: __webpack_require__(/*! prop-types */ 0).bool.isRequired,\n offline: __webpack_require__(/*! prop-types */ 0).bool.isRequired,\n published: __webpack_require__(/*! prop-types */ 0).bool.isRequired,\n photos: __webpack_require__(/*! prop-types */ 0).arrayOf(__webpack_require__(/*! prop-types */ 0).any).isRequired,\n amenityIds: __webpack_require__(/*! prop-types */ 0).arrayOf(__webpack_require__(/*! prop-types */ 0).any).isRequired,\n listingUrls: __webpack_require__(/*! prop-types */ 0).arrayOf(__webpack_require__(/*! prop-types */ 0).any).isRequired,\n systemHouseRules: __webpack_require__(/*! prop-types */ 0).arrayOf(__webpack_require__(/*! prop-types */ 0).any).isRequired,\n customHouseRules: __webpack_require__(/*! prop-types */ 0).arrayOf(__webpack_require__(/*! prop-types */ 0).any).isRequired,\n owner: __webpack_require__(/*! prop-types */ 0).shape({\n id: __webpack_require__(/*! prop-types */ 0).number.isRequired,\n allMutualFriendsCount: __webpack_require__(/*! prop-types */ 0).number,\n avatarUrl: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n firstName: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n lastName: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n url: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n phone: __webpack_require__(/*! prop-types */ 0).string,\n email: __webpack_require__(/*! prop-types */ 0).string,\n aboutMeDetails: __webpack_require__(/*! prop-types */ 0).string,\n coverImageUrl: __webpack_require__(/*! prop-types */ 0).string,\n fbConnected: __webpack_require__(/*! prop-types */ 0).bool.isRequired,\n fbFriend: __webpack_require__(/*! prop-types */ 0).bool,\n relationshipType: __webpack_require__(/*! prop-types */ 0).string,\n username: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n facebookUrl: __webpack_require__(/*! prop-types */ 0).string,\n twitterUrl: __webpack_require__(/*! prop-types */ 0).string,\n linkedinUrl: __webpack_require__(/*! prop-types */ 0).string,\n airbnbUrl: __webpack_require__(/*! prop-types */ 0).string,\n vrboUrl: __webpack_require__(/*! prop-types */ 0).string,\n personalWebsiteUrl: __webpack_require__(/*! prop-types */ 0).string\n }).isRequired,\n createdAt: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n updatedAt: __webpack_require__(/*! prop-types */ 0).string.isRequired\n })\n}); // TODO\n\nif (typeof exports !== 'undefined') Object.defineProperty(exports, 'babelPluginFlowReactPropTypes_proptype_ContextualListingUserContext', {\n value: __webpack_require__(/*! react */ 1).PropTypes.shape({\n favorited: __webpack_require__(/*! prop-types */ 0).bool.isRequired,\n isManagedByCurrentUser: __webpack_require__(/*! prop-types */ 0).bool.isRequired,\n hostRelationshipType: __webpack_require__(/*! prop-types */ 0).any.isRequired,\n listingRelationshipType: __webpack_require__(/*! prop-types */ 0).any.isRequired,\n guestListMembershipId: __webpack_require__(/*! prop-types */ 0).number\n })\n});\nif (typeof exports !== 'undefined') Object.defineProperty(exports, 'babelPluginFlowReactPropTypes_proptype_ContextualListing', {\n value: __webpack_require__(/*! react */ 1).PropTypes.shape({\n id: __webpack_require__(/*! prop-types */ 0).any.isRequired,\n title: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n summary: __webpack_require__(/*! prop-types */ 0).string,\n description: __webpack_require__(/*! prop-types */ 0).string,\n country: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n state: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n city: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n street: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n apt: __webpack_require__(/*! prop-types */ 0).string,\n zipCode: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n closeTo: __webpack_require__(/*! prop-types */ 0).string,\n lat: __webpack_require__(/*! prop-types */ 0).number.isRequired,\n lng: __webpack_require__(/*! prop-types */ 0).number.isRequired,\n roomType: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n propertyType: __webpack_require__(/*! prop-types */ 0).string,\n bathrooms: __webpack_require__(/*! prop-types */ 0).number,\n bedrooms: __webpack_require__(/*! prop-types */ 0).number,\n beds: __webpack_require__(/*! prop-types */ 0).number,\n maxGuests: __webpack_require__(/*! prop-types */ 0).number,\n minimumStay: __webpack_require__(/*! prop-types */ 0).number,\n checkIn: __webpack_require__(/*! prop-types */ 0).number,\n checkOut: __webpack_require__(/*! prop-types */ 0).number,\n price: __webpack_require__(/*! prop-types */ 0).number,\n weeklyDiscount: __webpack_require__(/*! prop-types */ 0).number.isRequired,\n monthlyDiscount: __webpack_require__(/*! prop-types */ 0).number.isRequired,\n deposit: __webpack_require__(/*! prop-types */ 0).number,\n cleaningFee: __webpack_require__(/*! prop-types */ 0).number,\n privacyMode: __webpack_require__(/*! prop-types */ 0).any.isRequired,\n photos: __webpack_require__(/*! prop-types */ 0).arrayOf(__webpack_require__(/*! prop-types */ 0).shape({\n id: __webpack_require__(/*! prop-types */ 0).number.isRequired,\n listingId: __webpack_require__(/*! prop-types */ 0).number.isRequired,\n cloudUrl: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n format: __webpack_require__(/*! prop-types */ 0).string,\n description: __webpack_require__(/*! prop-types */ 0).string,\n width: __webpack_require__(/*! prop-types */ 0).number,\n height: __webpack_require__(/*! prop-types */ 0).number,\n position: __webpack_require__(/*! prop-types */ 0).number.isRequired,\n publicId: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n resourceType: __webpack_require__(/*! prop-types */ 0).string,\n version: __webpack_require__(/*! prop-types */ 0).string\n })).isRequired,\n amenityIds: __webpack_require__(/*! prop-types */ 0).arrayOf(__webpack_require__(/*! prop-types */ 0).any).isRequired,\n urls: __webpack_require__(/*! prop-types */ 0).arrayOf(__webpack_require__(/*! prop-types */ 0).string).isRequired,\n systemHouseRules: __webpack_require__(/*! prop-types */ 0).arrayOf(__webpack_require__(/*! prop-types */ 0).any).isRequired,\n customHouseRules: __webpack_require__(/*! prop-types */ 0).arrayOf(__webpack_require__(/*! prop-types */ 0).any).isRequired,\n owner: __webpack_require__(/*! prop-types */ 0).shape({\n id: __webpack_require__(/*! prop-types */ 0).number.isRequired,\n allMutualFriendsCount: __webpack_require__(/*! prop-types */ 0).number,\n avatarUrl: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n firstName: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n lastName: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n url: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n phone: __webpack_require__(/*! prop-types */ 0).string,\n email: __webpack_require__(/*! prop-types */ 0).string,\n aboutMeDetails: __webpack_require__(/*! prop-types */ 0).string,\n coverImageUrl: __webpack_require__(/*! prop-types */ 0).string,\n fbConnected: __webpack_require__(/*! prop-types */ 0).bool.isRequired,\n fbFriend: __webpack_require__(/*! prop-types */ 0).bool,\n relationshipType: __webpack_require__(/*! prop-types */ 0).string,\n username: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n facebookUrl: __webpack_require__(/*! prop-types */ 0).string,\n twitterUrl: __webpack_require__(/*! prop-types */ 0).string,\n linkedinUrl: __webpack_require__(/*! prop-types */ 0).string,\n airbnbUrl: __webpack_require__(/*! prop-types */ 0).string,\n vrboUrl: __webpack_require__(/*! prop-types */ 0).string,\n personalWebsiteUrl: __webpack_require__(/*! prop-types */ 0).string\n }).isRequired,\n displayMode: __webpack_require__(/*! prop-types */ 0).oneOf(['full_details']).isRequired,\n favoritesCount: __webpack_require__(/*! prop-types */ 0).number.isRequired,\n newConversationPath: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n userContext: __webpack_require__(/*! prop-types */ 0).shape({\n favorited: __webpack_require__(/*! prop-types */ 0).bool.isRequired,\n isManagedByCurrentUser: __webpack_require__(/*! prop-types */ 0).bool.isRequired,\n hostRelationshipType: __webpack_require__(/*! prop-types */ 0).any.isRequired,\n listingRelationshipType: __webpack_require__(/*! prop-types */ 0).any.isRequired,\n guestListMembershipId: __webpack_require__(/*! prop-types */ 0).number,\n __exact__: function __exact__(values, prop, displayName) {\n var props = {\n favorited: true,\n isManagedByCurrentUser: true,\n hostRelationshipType: true,\n listingRelationshipType: true,\n guestListMembershipId: true\n };\n var extra = [];\n\n for (var k in values) {\n if (values.hasOwnProperty(k) && !props.hasOwnProperty(k)) {\n extra.push(k);\n }\n }\n\n if (extra.length > 0) {\n return new Error('Invalid additional prop(s) ' + JSON.stringify(extra));\n }\n }\n }).isRequired,\n createdAt: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n updatedAt: __webpack_require__(/*! prop-types */ 0).string.isRequired\n })\n});\nif (typeof exports !== 'undefined') Object.defineProperty(exports, 'babelPluginFlowReactPropTypes_proptype_LimitedContextualListing', {\n value: __webpack_require__(/*! react */ 1).PropTypes.shape({\n id: __webpack_require__(/*! prop-types */ 0).any.isRequired,\n title: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n summary: __webpack_require__(/*! prop-types */ 0).string,\n country: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n state: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n city: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n lat: __webpack_require__(/*! prop-types */ 0).number.isRequired,\n lng: __webpack_require__(/*! prop-types */ 0).number.isRequired,\n roomType: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n bathrooms: __webpack_require__(/*! prop-types */ 0).number,\n bedrooms: __webpack_require__(/*! prop-types */ 0).number,\n beds: __webpack_require__(/*! prop-types */ 0).number,\n maxGuests: __webpack_require__(/*! prop-types */ 0).number,\n privacyMode: __webpack_require__(/*! prop-types */ 0).oneOf(['private']).isRequired,\n photos: __webpack_require__(/*! prop-types */ 0).arrayOf(__webpack_require__(/*! prop-types */ 0).any).isRequired,\n displayMode: __webpack_require__(/*! prop-types */ 0).oneOf(['limited_preview']).isRequired,\n favoritesCount: __webpack_require__(/*! prop-types */ 0).number.isRequired,\n newConversationPath: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n userContext: __webpack_require__(/*! prop-types */ 0).shape({\n favorited: __webpack_require__(/*! prop-types */ 0).bool.isRequired,\n isManagedByCurrentUser: __webpack_require__(/*! prop-types */ 0).bool.isRequired,\n hostRelationshipType: __webpack_require__(/*! prop-types */ 0).any.isRequired,\n listingRelationshipType: __webpack_require__(/*! prop-types */ 0).any.isRequired,\n guestListMembershipId: __webpack_require__(/*! prop-types */ 0).number,\n __exact__: function __exact__(values, prop, displayName) {\n var props = {\n favorited: true,\n isManagedByCurrentUser: true,\n hostRelationshipType: true,\n listingRelationshipType: true,\n guestListMembershipId: true\n };\n var extra = [];\n\n for (var k in values) {\n if (values.hasOwnProperty(k) && !props.hasOwnProperty(k)) {\n extra.push(k);\n }\n }\n\n if (extra.length > 0) {\n return new Error('Invalid additional prop(s) ' + JSON.stringify(extra));\n }\n }\n }).isRequired,\n createdAt: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n updatedAt: __webpack_require__(/*! prop-types */ 0).string.isRequired\n })\n});\nif (typeof exports !== 'undefined') Object.defineProperty(exports, 'babelPluginFlowReactPropTypes_proptype_ListingInfoPublic', {\n value: __webpack_require__(/*! react */ 1).PropTypes.shape({\n id: __webpack_require__(/*! prop-types */ 0).number.isRequired,\n title: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n price: __webpack_require__(/*! prop-types */ 0).number,\n roomType: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n lat: __webpack_require__(/*! prop-types */ 0).number.isRequired,\n lng: __webpack_require__(/*! prop-types */ 0).number.isRequired,\n apt: __webpack_require__(/*! prop-types */ 0).string,\n country: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n city: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n state: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n zipCode: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n street: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n propertyType: __webpack_require__(/*! prop-types */ 0).string,\n displayMode: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n favoritesCount: __webpack_require__(/*! prop-types */ 0).number.isRequired,\n displayAddress: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n htmlUrl: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n photos: __webpack_require__(/*! prop-types */ 0).arrayOf(__webpack_require__(/*! prop-types */ 0).shape({\n id: __webpack_require__(/*! prop-types */ 0).number.isRequired,\n listingId: __webpack_require__(/*! prop-types */ 0).number.isRequired,\n cloudUrl: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n format: __webpack_require__(/*! prop-types */ 0).string,\n description: __webpack_require__(/*! prop-types */ 0).string,\n width: __webpack_require__(/*! prop-types */ 0).number,\n height: __webpack_require__(/*! prop-types */ 0).number,\n position: __webpack_require__(/*! prop-types */ 0).number.isRequired,\n publicId: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n resourceType: __webpack_require__(/*! prop-types */ 0).string,\n version: __webpack_require__(/*! prop-types */ 0).string\n })).isRequired,\n owner: __webpack_require__(/*! prop-types */ 0).shape({\n id: __webpack_require__(/*! prop-types */ 0).number.isRequired,\n allMutualFriendsCount: __webpack_require__(/*! prop-types */ 0).number,\n avatarUrl: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n firstName: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n lastName: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n url: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n phone: __webpack_require__(/*! prop-types */ 0).string,\n email: __webpack_require__(/*! prop-types */ 0).string,\n aboutMeDetails: __webpack_require__(/*! prop-types */ 0).string,\n coverImageUrl: __webpack_require__(/*! prop-types */ 0).string,\n fbConnected: __webpack_require__(/*! prop-types */ 0).bool.isRequired,\n fbFriend: __webpack_require__(/*! prop-types */ 0).bool,\n relationshipType: __webpack_require__(/*! prop-types */ 0).string,\n username: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n facebookUrl: __webpack_require__(/*! prop-types */ 0).string,\n twitterUrl: __webpack_require__(/*! prop-types */ 0).string,\n linkedinUrl: __webpack_require__(/*! prop-types */ 0).string,\n airbnbUrl: __webpack_require__(/*! prop-types */ 0).string,\n vrboUrl: __webpack_require__(/*! prop-types */ 0).string,\n personalWebsiteUrl: __webpack_require__(/*! prop-types */ 0).string\n }).isRequired,\n userContext: __webpack_require__(/*! prop-types */ 0).shape({\n listingRelationshipType: __webpack_require__(/*! prop-types */ 0).string,\n hostRelationshipType: __webpack_require__(/*! prop-types */ 0).string,\n favorited: __webpack_require__(/*! prop-types */ 0).bool,\n isManagedByCurrentUser: __webpack_require__(/*! prop-types */ 0).bool\n }).isRequired\n })\n});\nif (typeof exports !== 'undefined') Object.defineProperty(exports, 'babelPluginFlowReactPropTypes_proptype_GuestListMembershipRequest', {\n value: __webpack_require__(/*! react */ 1).PropTypes.shape({\n id: __webpack_require__(/*! prop-types */ 0).number.isRequired,\n userId: __webpack_require__(/*! prop-types */ 0).number.isRequired,\n listingId: __webpack_require__(/*! prop-types */ 0).number.isRequired,\n status: __webpack_require__(/*! prop-types */ 0).any.isRequired,\n createdAt: __webpack_require__(/*! prop-types */ 0).any.isRequired,\n updatedAt: __webpack_require__(/*! prop-types */ 0).any.isRequired\n })\n});\nif (typeof exports !== 'undefined') Object.defineProperty(exports, 'babelPluginFlowReactPropTypes_proptype_GuestListMembershipRequests', {\n value: __webpack_require__(/*! react */ 1).PropTypes.shape({})\n});\nif (typeof exports !== 'undefined') Object.defineProperty(exports, 'babelPluginFlowReactPropTypes_proptype_DomEvent', {\n value: __webpack_require__(/*! react */ 1).PropTypes.shape({\n target: __webpack_require__(/*! prop-types */ 0).shape({\n value: __webpack_require__(/*! prop-types */ 0).string,\n checked: __webpack_require__(/*! prop-types */ 0).bool\n }).isRequired,\n defaultPrevented: __webpack_require__(/*! prop-types */ 0).bool.isRequired,\n preventDefault: __webpack_require__(/*! prop-types */ 0).func.isRequired,\n stopPropagation: __webpack_require__(/*! prop-types */ 0).func.isRequired\n })\n});\nif (typeof exports !== 'undefined') Object.defineProperty(exports, 'babelPluginFlowReactPropTypes_proptype_ValidationLayerHandlers', {\n value: __webpack_require__(/*! react */ 1).PropTypes.shape({\n onChange: __webpack_require__(/*! prop-types */ 0).func.isRequired,\n onSubmit: __webpack_require__(/*! prop-types */ 0).func.isRequired\n })\n});\nif (typeof exports !== 'undefined') Object.defineProperty(exports, 'babelPluginFlowReactPropTypes_proptype_ValidationLayerField', {\n value: __webpack_require__(/*! react */ 1).PropTypes.shape({\n attr: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n validate: __webpack_require__(/*! prop-types */ 0).func,\n validateAsync: __webpack_require__(/*! prop-types */ 0).any,\n handlers: __webpack_require__(/*! prop-types */ 0).shape({\n onChange: __webpack_require__(/*! prop-types */ 0).func.isRequired,\n onSubmit: __webpack_require__(/*! prop-types */ 0).func.isRequired\n }),\n filter: __webpack_require__(/*! prop-types */ 0).func,\n transformBeforeRender: __webpack_require__(/*! prop-types */ 0).func,\n transformBeforeStore: __webpack_require__(/*! prop-types */ 0).func,\n omitDomId: __webpack_require__(/*! prop-types */ 0).bool,\n omitRef: __webpack_require__(/*! prop-types */ 0).bool,\n omitOnChange: __webpack_require__(/*! prop-types */ 0).bool,\n omitOnBlur: __webpack_require__(/*! prop-types */ 0).bool\n })\n});\nif (typeof exports !== 'undefined') Object.defineProperty(exports, 'babelPluginFlowReactPropTypes_proptype_ResponseError', {\n value: __webpack_require__(/*! react */ 1).PropTypes.shape({\n isApiError: __webpack_require__(/*! prop-types */ 0).bool,\n response: __webpack_require__(/*! prop-types */ 0).shape({\n body: __webpack_require__(/*! prop-types */ 0).object.isRequired,\n status: __webpack_require__(/*! prop-types */ 0).number.isRequired\n }).isRequired\n })\n});\nif (typeof exports !== 'undefined') Object.defineProperty(exports, 'babelPluginFlowReactPropTypes_proptype_ApiError', {\n value: __webpack_require__(/*! react */ 1).PropTypes.shape({\n code: __webpack_require__(/*! prop-types */ 0).number.isRequired,\n data: __webpack_require__(/*! prop-types */ 0).shape({\n errors: __webpack_require__(/*! prop-types */ 0).any.isRequired,\n message: __webpack_require__(/*! prop-types */ 0).string.isRequired\n }).isRequired\n })\n});\nif (typeof exports !== 'undefined') Object.defineProperty(exports, 'babelPluginFlowReactPropTypes_proptype_GeoLocation', {\n value: __webpack_require__(/*! react */ 1).PropTypes.shape({\n street: __webpack_require__(/*! prop-types */ 0).string,\n city: __webpack_require__(/*! prop-types */ 0).string,\n zipCode: __webpack_require__(/*! prop-types */ 0).string,\n state: __webpack_require__(/*! prop-types */ 0).string,\n country: __webpack_require__(/*! prop-types */ 0).string,\n lat: __webpack_require__(/*! prop-types */ 0).number.isRequired,\n lng: __webpack_require__(/*! prop-types */ 0).number.isRequired,\n boundSwLat: __webpack_require__(/*! prop-types */ 0).number,\n boundSwLng: __webpack_require__(/*! prop-types */ 0).number,\n boundNeLat: __webpack_require__(/*! prop-types */ 0).number,\n boundNeLng: __webpack_require__(/*! prop-types */ 0).number,\n rawGeoData: __webpack_require__(/*! prop-types */ 0).string\n })\n});\nif (typeof exports !== 'undefined') Object.defineProperty(exports, 'babelPluginFlowReactPropTypes_proptype_GoogleMapRef', {\n value: __webpack_require__(/*! react */ 1).PropTypes.shape({\n props: __webpack_require__(/*! prop-types */ 0).shape({\n map: __webpack_require__(/*! prop-types */ 0).any.isRequired\n }).isRequired,\n getZoom: __webpack_require__(/*! prop-types */ 0).func.isRequired\n })\n});\nif (typeof exports !== 'undefined') Object.defineProperty(exports, 'babelPluginFlowReactPropTypes_proptype_GoogleMapsCenter', {\n value: __webpack_require__(/*! react */ 1).PropTypes.shape({\n lat: __webpack_require__(/*! prop-types */ 0).number.isRequired,\n lng: __webpack_require__(/*! prop-types */ 0).number.isRequired\n })\n});\n\n\n// // DEPRECATED: Use type from `libs/components/Svg` instead\nif (typeof exports !== 'undefined') Object.defineProperty(exports, 'babelPluginFlowReactPropTypes_proptype_GoogleMapsPlace', {\n value: __webpack_require__(/*! react */ 1).PropTypes.shape({\n address_components: __webpack_require__(/*! prop-types */ 0).arrayOf(__webpack_require__(/*! prop-types */ 0).shape({\n long_name: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n types: __webpack_require__(/*! prop-types */ 0).arrayOf(__webpack_require__(/*! prop-types */ 0).any).isRequired\n })).isRequired,\n geometry: __webpack_require__(/*! prop-types */ 0).shape({\n location: __webpack_require__(/*! prop-types */ 0).shape({\n lat: __webpack_require__(/*! prop-types */ 0).number.isRequired,\n lng: __webpack_require__(/*! prop-types */ 0).number.isRequired\n }).isRequired,\n viewport: __webpack_require__(/*! prop-types */ 0).shape({\n getSouthWest: __webpack_require__(/*! prop-types */ 0).func.isRequired,\n getNorthEast: __webpack_require__(/*! prop-types */ 0).func.isRequired\n })\n }).isRequired\n })\n});\nif (typeof exports !== 'undefined') Object.defineProperty(exports, 'babelPluginFlowReactPropTypes_proptype_SvgProps', {\n value: __webpack_require__(/*! react */ 1).PropTypes.shape({\n className: __webpack_require__(/*! prop-types */ 0).string,\n title: __webpack_require__(/*! prop-types */ 0).string,\n viewBoxWidth: __webpack_require__(/*! prop-types */ 0).number,\n viewBoxHeight: __webpack_require__(/*! prop-types */ 0).number\n })\n});\nif (typeof exports !== 'undefined') Object.defineProperty(exports, 'babelPluginFlowReactPropTypes_proptype_CloudinaryTransformationsBase', {\n value: __webpack_require__(/*! react */ 1).PropTypes.shape({\n width: __webpack_require__(/*! prop-types */ 0).oneOfType([__webpack_require__(/*! prop-types */ 0).string, __webpack_require__(/*! prop-types */ 0).number, function (props, propName, componentName) {\n if (props[propName] != null) return new Error('Invalid prop `' + propName + '` of value `' + value + '` passed to `' + componentName + '`. Expected undefined or null.');\n }]),\n height: __webpack_require__(/*! prop-types */ 0).oneOfType([__webpack_require__(/*! prop-types */ 0).string, __webpack_require__(/*! prop-types */ 0).number, function (props, propName, componentName) {\n if (props[propName] != null) return new Error('Invalid prop `' + propName + '` of value `' + value + '` passed to `' + componentName + '`. Expected undefined or null.');\n }]),\n format: __webpack_require__(/*! prop-types */ 0).oneOfType([__webpack_require__(/*! prop-types */ 0).any, function (props, propName, componentName) {\n if (props[propName] != null) return new Error('Invalid prop `' + propName + '` of value `' + value + '` passed to `' + componentName + '`. Expected undefined or null.');\n }]),\n fetchFormat: __webpack_require__(/*! prop-types */ 0).oneOfType([__webpack_require__(/*! prop-types */ 0).any, __webpack_require__(/*! prop-types */ 0).oneOf(['auto']), function (props, propName, componentName) {\n if (props[propName] != null) return new Error('Invalid prop `' + propName + '` of value `' + value + '` passed to `' + componentName + '`. Expected undefined or null.');\n }]),\n dpr: __webpack_require__(/*! prop-types */ 0).oneOfType([__webpack_require__(/*! prop-types */ 0).string, __webpack_require__(/*! prop-types */ 0).number, function (props, propName, componentName) {\n if (props[propName] != null) return new Error('Invalid prop `' + propName + '` of value `' + value + '` passed to `' + componentName + '`. Expected undefined or null.');\n }]),\n crop: __webpack_require__(/*! prop-types */ 0).oneOfType([__webpack_require__(/*! prop-types */ 0).oneOf(['fit']), __webpack_require__(/*! prop-types */ 0).oneOf(['fill']), __webpack_require__(/*! prop-types */ 0).oneOf(['crop']), __webpack_require__(/*! prop-types */ 0).oneOf(['scale']), function (props, propName, componentName) {\n if (props[propName] != null) return new Error('Invalid prop `' + propName + '` of value `' + value + '` passed to `' + componentName + '`. Expected undefined or null.');\n }]),\n radius: __webpack_require__(/*! prop-types */ 0).oneOfType([__webpack_require__(/*! prop-types */ 0).string, __webpack_require__(/*! prop-types */ 0).number, function (props, propName, componentName) {\n if (props[propName] != null) return new Error('Invalid prop `' + propName + '` of value `' + value + '` passed to `' + componentName + '`. Expected undefined or null.');\n }]),\n quality: __webpack_require__(/*! prop-types */ 0).oneOfType([__webpack_require__(/*! prop-types */ 0).string, __webpack_require__(/*! prop-types */ 0).number, function (props, propName, componentName) {\n if (props[propName] != null) return new Error('Invalid prop `' + propName + '` of value `' + value + '` passed to `' + componentName + '`. Expected undefined or null.');\n }]),\n gravity: __webpack_require__(/*! prop-types */ 0).oneOfType([__webpack_require__(/*! prop-types */ 0).string, function (props, propName, componentName) {\n if (props[propName] != null) return new Error('Invalid prop `' + propName + '` of value `' + value + '` passed to `' + componentName + '`. Expected undefined or null.');\n }]),\n saturation: __webpack_require__(/*! prop-types */ 0).oneOfType([__webpack_require__(/*! prop-types */ 0).string, __webpack_require__(/*! prop-types */ 0).number, function (props, propName, componentName) {\n if (props[propName] != null) return new Error('Invalid prop `' + propName + '` of value `' + value + '` passed to `' + componentName + '`. Expected undefined or null.');\n }]),\n contrast: __webpack_require__(/*! prop-types */ 0).oneOfType([__webpack_require__(/*! prop-types */ 0).string, __webpack_require__(/*! prop-types */ 0).number, function (props, propName, componentName) {\n if (props[propName] != null) return new Error('Invalid prop `' + propName + '` of value `' + value + '` passed to `' + componentName + '`. Expected undefined or null.');\n }]),\n background: __webpack_require__(/*! prop-types */ 0).oneOfType([__webpack_require__(/*! prop-types */ 0).string, function (props, propName, componentName) {\n if (props[propName] != null) return new Error('Invalid prop `' + propName + '` of value `' + value + '` passed to `' + componentName + '`. Expected undefined or null.');\n }]),\n opacity: __webpack_require__(/*! prop-types */ 0).oneOfType([__webpack_require__(/*! prop-types */ 0).string, __webpack_require__(/*! prop-types */ 0).number, function (props, propName, componentName) {\n if (props[propName] != null) return new Error('Invalid prop `' + propName + '` of value `' + value + '` passed to `' + componentName + '`. Expected undefined or null.');\n }]),\n art: __webpack_require__(/*! prop-types */ 0).oneOfType([__webpack_require__(/*! prop-types */ 0).string, function (props, propName, componentName) {\n if (props[propName] != null) return new Error('Invalid prop `' + propName + '` of value `' + value + '` passed to `' + componentName + '`. Expected undefined or null.');\n }]),\n gradient_fade: __webpack_require__(/*! prop-types */ 0).oneOfType([__webpack_require__(/*! prop-types */ 0).string, __webpack_require__(/*! prop-types */ 0).number, function (props, propName, componentName) {\n if (props[propName] != null) return new Error('Invalid prop `' + propName + '` of value `' + value + '` passed to `' + componentName + '`. Expected undefined or null.');\n }]),\n blur: __webpack_require__(/*! prop-types */ 0).oneOfType([__webpack_require__(/*! prop-types */ 0).string, __webpack_require__(/*! prop-types */ 0).number, function (props, propName, componentName) {\n if (props[propName] != null) return new Error('Invalid prop `' + propName + '` of value `' + value + '` passed to `' + componentName + '`. Expected undefined or null.');\n }, function (props, propName, componentName) {\n if (props[propName] != null) return new Error('Invalid prop `' + propName + '` of value `' + value + '` passed to `' + componentName + '`. Expected undefined or null.');\n }])\n })\n});\nif (typeof exports !== 'undefined') Object.defineProperty(exports, 'babelPluginFlowReactPropTypes_proptype_CloudinaryTransformations', {\n value: __webpack_require__(/*! react */ 1).PropTypes.shape({\n transforms: __webpack_require__(/*! prop-types */ 0).arrayOf(__webpack_require__(/*! prop-types */ 0).any)\n })\n});\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/types/index.js\n// module id = 4\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/types/index.js?", + ); + + /***/ + }, + /* 5 */ + /* unknown exports provided */ + /* all exports used */ + /*!********************************************!*\ + !*** ./~/babel-runtime/helpers/extends.js ***! + \********************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nexports.__esModule = true;\n\nvar _assign = __webpack_require__(/*! ../core-js/object/assign */ 147);\n\nvar _assign2 = _interopRequireDefault(_assign);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = _assign2.default || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/babel-runtime/helpers/extends.js\n// module id = 5\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/babel-runtime/helpers/extends.js?', + ); + + /***/ + }, + /* 6 */ + /* unknown exports provided */ + /* all exports used */ + /*!***************************************************!*\ + !*** ./~/babel-runtime/helpers/classCallCheck.js ***! + \***************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nexports.__esModule = true;\n\nexports.default = function (instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError("Cannot call a class as a function");\n }\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/babel-runtime/helpers/classCallCheck.js\n// module id = 6\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/babel-runtime/helpers/classCallCheck.js?', + ); + + /***/ + }, + /* 7 */ + /* unknown exports provided */ + /* all exports used */ + /*!*********************************************!*\ + !*** ./~/babel-runtime/helpers/inherits.js ***! + \*********************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nexports.__esModule = true;\n\nvar _setPrototypeOf = __webpack_require__(/*! ../core-js/object/set-prototype-of */ 900);\n\nvar _setPrototypeOf2 = _interopRequireDefault(_setPrototypeOf);\n\nvar _create = __webpack_require__(/*! ../core-js/object/create */ 898);\n\nvar _create2 = _interopRequireDefault(_create);\n\nvar _typeof2 = __webpack_require__(/*! ../helpers/typeof */ 148);\n\nvar _typeof3 = _interopRequireDefault(_typeof2);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = function (subClass, superClass) {\n if (typeof superClass !== "function" && superClass !== null) {\n throw new TypeError("Super expression must either be null or a function, not " + (typeof superClass === "undefined" ? "undefined" : (0, _typeof3.default)(superClass)));\n }\n\n subClass.prototype = (0, _create2.default)(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf2.default ? (0, _setPrototypeOf2.default)(subClass, superClass) : subClass.__proto__ = superClass;\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/babel-runtime/helpers/inherits.js\n// module id = 7\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/babel-runtime/helpers/inherits.js?', + ); + + /***/ + }, + /* 8 */ + /* unknown exports provided */ + /* all exports used */ + /*!**************************************************************!*\ + !*** ./~/babel-runtime/helpers/possibleConstructorReturn.js ***! + \**************************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nexports.__esModule = true;\n\nvar _typeof2 = __webpack_require__(/*! ../helpers/typeof */ 148);\n\nvar _typeof3 = _interopRequireDefault(_typeof2);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = function (self, call) {\n if (!self) {\n throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");\n }\n\n return call && ((typeof call === "undefined" ? "undefined" : (0, _typeof3.default)(call)) === "object" || typeof call === "function") ? call : self;\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/babel-runtime/helpers/possibleConstructorReturn.js\n// module id = 8\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/babel-runtime/helpers/possibleConstructorReturn.js?', + ); + + /***/ + }, + /* 9 */ + /* unknown exports provided */ + /* all exports used */ + /*!************************************************************!*\ + !*** ./~/babel-runtime/helpers/objectWithoutProperties.js ***! + \************************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nexports.__esModule = true;\n\nexports.default = function (obj, keys) {\n var target = {};\n\n for (var i in obj) {\n if (keys.indexOf(i) >= 0) continue;\n if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;\n target[i] = obj[i];\n }\n\n return target;\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/babel-runtime/helpers/objectWithoutProperties.js\n// module id = 9\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/babel-runtime/helpers/objectWithoutProperties.js?', + ); + + /***/ + }, + /* 10 */ + /* exports provided: prefix, bsClass, bsStyles, bsSizes, getClassSet, splitBsProps, splitBsPropsAndOmit, addStyle, _curry */ + /* exports used: splitBsProps, getClassSet, bsClass, bsSizes, prefix, splitBsPropsAndOmit, bsStyles */ + /*!******************************************************!*\ + !*** ./~/react-bootstrap/es/utils/bootstrapUtils.js ***! + \******************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_object_entries__ = __webpack_require__(/*! babel-runtime/core-js/object/entries */ 314);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_object_entries___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_object_entries__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends__ = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant__ = __webpack_require__(/*! invariant */ 25);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_invariant__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__StyleConfig__ = __webpack_require__(/*! ./StyleConfig */ 32);\n/* harmony export (immutable) */ __webpack_exports__[\"e\"] = prefix;\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return bsClass; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"g\", function() { return bsStyles; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return bsSizes; });\n/* harmony export (immutable) */ __webpack_exports__[\"b\"] = getClassSet;\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = splitBsProps;\n/* harmony export (immutable) */ __webpack_exports__[\"f\"] = splitBsPropsAndOmit;\n/* unused harmony export addStyle */\n/* unused harmony export _curry */\n\n\n// TODO: The publicly exposed parts of this should be in lib/BootstrapUtils.\n\n\n\n\n\n\nfunction curry(fn) {\n return function () {\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n var last = args[args.length - 1];\n if (typeof last === 'function') {\n return fn.apply(undefined, args);\n }\n return function (Component) {\n return fn.apply(undefined, args.concat([Component]));\n };\n };\n}\n\nfunction prefix(props, variant) {\n !(props.bsClass != null) ? true ? __WEBPACK_IMPORTED_MODULE_2_invariant___default()(false, 'A `bsClass` prop is required for this component') : invariant(false) : void 0;\n return props.bsClass + (variant ? '-' + variant : '');\n}\n\nvar bsClass = curry(function (defaultClass, Component) {\n var propTypes = Component.propTypes || (Component.propTypes = {});\n var defaultProps = Component.defaultProps || (Component.defaultProps = {});\n\n propTypes.bsClass = __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.string;\n defaultProps.bsClass = defaultClass;\n\n return Component;\n});\n\nvar bsStyles = curry(function (styles, defaultStyle, Component) {\n if (typeof defaultStyle !== 'string') {\n Component = defaultStyle;\n defaultStyle = undefined;\n }\n\n var existing = Component.STYLES || [];\n var propTypes = Component.propTypes || {};\n\n styles.forEach(function (style) {\n if (existing.indexOf(style) === -1) {\n existing.push(style);\n }\n });\n\n var propType = __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.oneOf(existing);\n\n // expose the values on the propType function for documentation\n Component.STYLES = propType._values = existing;\n\n Component.propTypes = __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends___default()({}, propTypes, {\n bsStyle: propType\n });\n\n if (defaultStyle !== undefined) {\n var defaultProps = Component.defaultProps || (Component.defaultProps = {});\n defaultProps.bsStyle = defaultStyle;\n }\n\n return Component;\n});\n\nvar bsSizes = curry(function (sizes, defaultSize, Component) {\n if (typeof defaultSize !== 'string') {\n Component = defaultSize;\n defaultSize = undefined;\n }\n\n var existing = Component.SIZES || [];\n var propTypes = Component.propTypes || {};\n\n sizes.forEach(function (size) {\n if (existing.indexOf(size) === -1) {\n existing.push(size);\n }\n });\n\n var values = [];\n existing.forEach(function (size) {\n var mappedSize = __WEBPACK_IMPORTED_MODULE_4__StyleConfig__[\"a\" /* SIZE_MAP */][size];\n if (mappedSize && mappedSize !== size) {\n values.push(mappedSize);\n }\n\n values.push(size);\n });\n\n var propType = __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.oneOf(values);\n propType._values = values;\n\n // expose the values on the propType function for documentation\n Component.SIZES = existing;\n\n Component.propTypes = __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends___default()({}, propTypes, {\n bsSize: propType\n });\n\n if (defaultSize !== undefined) {\n if (!Component.defaultProps) {\n Component.defaultProps = {};\n }\n Component.defaultProps.bsSize = defaultSize;\n }\n\n return Component;\n});\n\nfunction getClassSet(props) {\n var _classes;\n\n var classes = (_classes = {}, _classes[prefix(props)] = true, _classes);\n\n if (props.bsSize) {\n var bsSize = __WEBPACK_IMPORTED_MODULE_4__StyleConfig__[\"a\" /* SIZE_MAP */][props.bsSize] || props.bsSize;\n classes[prefix(props, bsSize)] = true;\n }\n\n if (props.bsStyle) {\n classes[prefix(props, props.bsStyle)] = true;\n }\n\n return classes;\n}\n\nfunction getBsProps(props) {\n return {\n bsClass: props.bsClass,\n bsSize: props.bsSize,\n bsStyle: props.bsStyle,\n bsRole: props.bsRole\n };\n}\n\nfunction isBsProp(propName) {\n return propName === 'bsClass' || propName === 'bsSize' || propName === 'bsStyle' || propName === 'bsRole';\n}\n\nfunction splitBsProps(props) {\n var elementProps = {};\n __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_object_entries___default()(props).forEach(function (_ref) {\n var propName = _ref[0],\n propValue = _ref[1];\n\n if (!isBsProp(propName)) {\n elementProps[propName] = propValue;\n }\n });\n\n return [getBsProps(props), elementProps];\n}\n\nfunction splitBsPropsAndOmit(props, omittedPropNames) {\n var isOmittedProp = {};\n omittedPropNames.forEach(function (propName) {\n isOmittedProp[propName] = true;\n });\n\n var elementProps = {};\n __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_object_entries___default()(props).forEach(function (_ref2) {\n var propName = _ref2[0],\n propValue = _ref2[1];\n\n if (!isBsProp(propName) && !isOmittedProp[propName]) {\n elementProps[propName] = propValue;\n }\n });\n\n return [getBsProps(props), elementProps];\n}\n\n/**\n * Add a style variant to a Component. Mutates the propTypes of the component\n * in order to validate the new variant.\n */\nfunction addStyle(Component) {\n for (var _len2 = arguments.length, styleVariant = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n styleVariant[_key2 - 1] = arguments[_key2];\n }\n\n bsStyles(styleVariant, Component);\n}\n\nvar _curry = curry;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/utils/bootstrapUtils.js\n// module id = 10\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/utils/bootstrapUtils.js?", + ); + + /***/ + }, + /* 11 */ + /* exports provided: H1, A, Link, LinkLike, Button, ButtonLike, Image, Spinner, Ellipsis, CloseModalIcon, CloseButton, Modal, ConfirmModal, Tooltip, IconTooltip, Dropdown, DropdownLEGACY, ZebraList, Uploader, Navbar, Section, DataTable, FullScreen, MutualFriendsTooltip, Glyphicon, NotificationBadge, RelationshipIndicator, GoogleMaps, Alert, SelectInputTextOnMount, CopyToClipboard, ListingTile, CalculatedBreakpoint, HostDoor, HostStories, HostHeroImage, HostSection, HostSectionHeader, CallToActionStrip, HostSteps, CallToActionSection */ + /* exports used: CallToActionSection, HostDoor, Button, HostSectionHeader, CalculatedBreakpoint, A, Image, RelationshipIndicator, Spinner, ListingTile, ButtonLike, HostHeroImage, CallToActionStrip, HostSteps, HostStories, HostSection, Glyphicon, GoogleMaps, ConfirmModal, LinkLike, IconTooltip, Tooltip, Modal, Ellipsis, Navbar */ + /*!**************************************!*\ + !*** ./app/libs/components/index.js ***! + \**************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__H1_H1__ = __webpack_require__(/*! ./H1/H1 */ 796);\n/* unused harmony reexport H1 */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Links_A__ = __webpack_require__(/*! ./Links/A */ 807);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return __WEBPACK_IMPORTED_MODULE_1__Links_A__["a"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Links_Link__ = __webpack_require__(/*! ./Links/Link */ 808);\n/* unused harmony reexport Link */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Links_LinkLike__ = __webpack_require__(/*! ./Links/LinkLike */ 809);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "t", function() { return __WEBPACK_IMPORTED_MODULE_3__Links_LinkLike__["a"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Button_Button__ = __webpack_require__(/*! ./Button/Button */ 299);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return __WEBPACK_IMPORTED_MODULE_4__Button_Button__["a"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__ButtonLike_ButtonLike__ = __webpack_require__(/*! ./ButtonLike/ButtonLike */ 748);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return __WEBPACK_IMPORTED_MODULE_5__ButtonLike_ButtonLike__["a"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__Image_Image__ = __webpack_require__(/*! ./Image/Image */ 806);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return __WEBPACK_IMPORTED_MODULE_6__Image_Image__["a"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__Spinner_Spinner__ = __webpack_require__(/*! ./Spinner/Spinner */ 836);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return __WEBPACK_IMPORTED_MODULE_7__Spinner_Spinner__["a"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__Ellipsis_Ellipsis__ = __webpack_require__(/*! ./Ellipsis/Ellipsis */ 790);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "x", function() { return __WEBPACK_IMPORTED_MODULE_8__Ellipsis_Ellipsis__["a"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__CloseModalIcon_CloseModalIcon__ = __webpack_require__(/*! ./CloseModalIcon/CloseModalIcon */ 753);\n/* unused harmony reexport CloseModalIcon */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__CloseButton_CloseButton__ = __webpack_require__(/*! ./CloseButton/CloseButton */ 752);\n/* unused harmony reexport CloseButton */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__Modal_Modal__ = __webpack_require__(/*! ./Modal/Modal */ 820);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "w", function() { return __WEBPACK_IMPORTED_MODULE_11__Modal_Modal__["a"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__ConfirmModal_ConfirmModal__ = __webpack_require__(/*! ./ConfirmModal/ConfirmModal */ 754);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "s", function() { return __WEBPACK_IMPORTED_MODULE_12__ConfirmModal_ConfirmModal__["a"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__Tooltip_Tooltip__ = __webpack_require__(/*! ./Tooltip/Tooltip */ 837);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "v", function() { return __WEBPACK_IMPORTED_MODULE_13__Tooltip_Tooltip__["a"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__IconTooltip_IconTooltip__ = __webpack_require__(/*! ./IconTooltip/IconTooltip */ 805);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "u", function() { return __WEBPACK_IMPORTED_MODULE_14__IconTooltip_IconTooltip__["a"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__Dropdown_Dropdown__ = __webpack_require__(/*! ./Dropdown/Dropdown */ 780);\n/* unused harmony reexport Dropdown */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__DropdownLEGACY_Dropdown__ = __webpack_require__(/*! ./DropdownLEGACY/Dropdown */ 788);\n/* unused harmony reexport DropdownLEGACY */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__ZebraList_ZebraList__ = __webpack_require__(/*! ./ZebraList/ZebraList */ 843);\n/* unused harmony reexport ZebraList */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__Uploader_Uploader__ = __webpack_require__(/*! ./Uploader/Uploader */ 838);\n/* unused harmony reexport Uploader */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_19__Navbar_Navbar__ = __webpack_require__(/*! ./Navbar/Navbar */ 828);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "y", function() { return __WEBPACK_IMPORTED_MODULE_19__Navbar_Navbar__["a"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_20__Section_Section__ = __webpack_require__(/*! ./Section/Section */ 834);\n/* unused harmony reexport Section */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_21__DataTable_DataTable__ = __webpack_require__(/*! ./DataTable/DataTable */ 759);\n/* unused harmony reexport DataTable */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_22__FullScreen_FullScreen__ = __webpack_require__(/*! ./FullScreen/FullScreen */ 791);\n/* unused harmony reexport FullScreen */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_23__MutualFriendsTooltip_MutualFriendsTooltip__ = __webpack_require__(/*! ./MutualFriendsTooltip/MutualFriendsTooltip */ 824);\n/* unused harmony reexport MutualFriendsTooltip */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_24__Glyphicon_Glyphicon__ = __webpack_require__(/*! ./Glyphicon/Glyphicon */ 792);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "q", function() { return __WEBPACK_IMPORTED_MODULE_24__Glyphicon_Glyphicon__["a"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_25__NotificationBadge_NotificationBadge__ = __webpack_require__(/*! ./NotificationBadge/NotificationBadge */ 830);\n/* unused harmony reexport NotificationBadge */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_26__RelationshipIndicator_RelationshipIndicator__ = __webpack_require__(/*! ./RelationshipIndicator/RelationshipIndicator */ 831);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return __WEBPACK_IMPORTED_MODULE_26__RelationshipIndicator_RelationshipIndicator__["a"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_27__GoogleMaps__ = __webpack_require__(/*! ./GoogleMaps */ 795);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "r", function() { return __WEBPACK_IMPORTED_MODULE_27__GoogleMaps__["a"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_28__Alert_Alert__ = __webpack_require__(/*! ./Alert/Alert */ 747);\n/* unused harmony reexport Alert */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_29__SelectInputTextOnMount_SelectInputTextOnMount__ = __webpack_require__(/*! ./SelectInputTextOnMount/SelectInputTextOnMount */ 835);\n/* unused harmony reexport SelectInputTextOnMount */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_30__CopyToClipboard_CopyToClipboard__ = __webpack_require__(/*! ./CopyToClipboard/CopyToClipboard */ 755);\n/* unused harmony reexport CopyToClipboard */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_31__ListingTile_ListingTile__ = __webpack_require__(/*! ./ListingTile/ListingTile */ 137);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return __WEBPACK_IMPORTED_MODULE_31__ListingTile_ListingTile__["a"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_32__CalculatedBreakpoint_CalculatedBreakpoint__ = __webpack_require__(/*! ./CalculatedBreakpoint/CalculatedBreakpoint */ 749);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return __WEBPACK_IMPORTED_MODULE_32__CalculatedBreakpoint_CalculatedBreakpoint__["a"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_33__HostDoor_HostDoor__ = __webpack_require__(/*! ./HostDoor/HostDoor */ 797);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_33__HostDoor_HostDoor__["a"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_34__HostStories_HostStories__ = __webpack_require__(/*! ./HostStories/HostStories */ 803);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return __WEBPACK_IMPORTED_MODULE_34__HostStories_HostStories__["a"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_35__HostHeroImage_HostHeroImage__ = __webpack_require__(/*! ./HostHeroImage/HostHeroImage */ 798);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return __WEBPACK_IMPORTED_MODULE_35__HostHeroImage_HostHeroImage__["a"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_36__HostSection_HostSection__ = __webpack_require__(/*! ./HostSection/HostSection */ 799);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return __WEBPACK_IMPORTED_MODULE_36__HostSection_HostSection__["a"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_37__HostSectionHeader_HostSectionHeader__ = __webpack_require__(/*! ./HostSectionHeader/HostSectionHeader */ 800);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return __WEBPACK_IMPORTED_MODULE_37__HostSectionHeader_HostSectionHeader__["a"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_38__CallToActionStrip_CallToActionStrip__ = __webpack_require__(/*! ./CallToActionStrip/CallToActionStrip */ 751);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return __WEBPACK_IMPORTED_MODULE_38__CallToActionStrip_CallToActionStrip__["a"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_39__HostSteps_HostSteps__ = __webpack_require__(/*! ./HostSteps/HostSteps */ 802);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return __WEBPACK_IMPORTED_MODULE_39__HostSteps_HostSteps__["a"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_40__CallToActionSection_CallToActionSection__ = __webpack_require__(/*! ./CallToActionSection/CallToActionSection */ 750);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_40__CallToActionSection_CallToActionSection__["a"]; });\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/index.js\n// module id = 11\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/index.js?', + ); + + /***/ + }, + /* 12 */ + /* unknown exports provided */ + /* all exports used */ + /*!*********************************!*\ + !*** ./~/fbjs/lib/invariant.js ***! + \*********************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright (c) 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar validateFormat = function validateFormat(format) {};\n\nif (true) {\n validateFormat = function validateFormat(format) {\n if (format === undefined) {\n throw new Error('invariant requires an error message argument');\n }\n };\n}\n\nfunction invariant(condition, format, a, b, c, d, e, f) {\n validateFormat(format);\n\n if (!condition) {\n var error;\n if (format === undefined) {\n error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');\n } else {\n var args = [a, b, c, d, e, f];\n var argIndex = 0;\n error = new Error(format.replace(/%s/g, function () {\n return args[argIndex++];\n }));\n error.name = 'Invariant Violation';\n }\n\n error.framesToPop = 1; // we don't care about invariant's own frame\n throw error;\n }\n}\n\nmodule.exports = invariant;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/fbjs/lib/invariant.js\n// module id = 12\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/fbjs/lib/invariant.js?", + ); + + /***/ + }, + /* 13 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/fbjs/lib/warning.js ***! + \*******************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2014-2015, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar emptyFunction = __webpack_require__(/*! ./emptyFunction */ 40);\n\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\nvar warning = emptyFunction;\n\nif (true) {\n (function () {\n var printWarning = function printWarning(format) {\n for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n var argIndex = 0;\n var message = 'Warning: ' + format.replace(/%s/g, function () {\n return args[argIndex++];\n });\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n };\n\n warning = function warning(condition, format) {\n if (format === undefined) {\n throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');\n }\n\n if (format.indexOf('Failed Composite propType: ') === 0) {\n return; // Ignore CompositeComponent proptype check.\n }\n\n if (!condition) {\n for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {\n args[_key2 - 2] = arguments[_key2];\n }\n\n printWarning.apply(undefined, [format].concat(args));\n }\n };\n })();\n}\n\nmodule.exports = warning;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/fbjs/lib/warning.js\n// module id = 13\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/fbjs/lib/warning.js?", + ); + + /***/ + }, + /* 14 */ + /* unknown exports provided */ + /* exports used: default */ + /*!************************!*\ + !*** ./~/lodash/fp.js ***! + \************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + 'var _ = __webpack_require__(/*! ./lodash.min */ 1203).runInContext();\nmodule.exports = __webpack_require__(/*! ./fp/_baseConvert */ 1198)(_, _);\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/fp.js\n// module id = 14\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/lodash/fp.js?', + ); + + /***/ + }, + /* 15 */ + /* exports provided: default */ + /* exports used: default */ + /*!************************************************!*\ + !*** ./app/libs/templates/SvgIconTemplate.jsx ***! + \************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\n// DEPRECATED: Use `libs/components/Svg` instead\n\n\n\nvar SvgIconTemplate = function SvgIconTemplate(_ref) {\n var children = _ref.children,\n title = _ref.title,\n viewBoxWidth = _ref.viewBoxWidth,\n viewBoxHeight = _ref.viewBoxHeight,\n otherProps = _objectWithoutProperties(_ref, ["children", "title", "viewBoxWidth", "viewBoxHeight"]);\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n "svg",\n _extends({}, otherProps, {\n viewBox: "0 0 " + viewBoxWidth + " " + viewBoxHeight,\n xmlns: "http://www.w3.org/2000/svg",\n "aria-labelledby": title + "-title"\n }),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n "title",\n { id: title + "-title" },\n title\n ),\n children\n );\n};\n\nSvgIconTemplate.propTypes = {\n children: __webpack_require__(/*! prop-types */ 0).any,\n title: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n viewBoxWidth: __webpack_require__(/*! prop-types */ 0).number.isRequired,\n viewBoxHeight: __webpack_require__(/*! prop-types */ 0).number.isRequired\n};\n/* harmony default export */ __webpack_exports__["a"] = (SvgIconTemplate);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/templates/SvgIconTemplate.jsx\n// module id = 15\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/templates/SvgIconTemplate.jsx?', + ); + + /***/ + }, + /* 16 */ + /* unknown exports provided */ + /* all exports used */ + /*!******************************!*\ + !*** ./~/react-dom/index.js ***! + \******************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nmodule.exports = __webpack_require__(/*! ./lib/ReactDOM */ 1330);\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/index.js\n// module id = 16\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/index.js?', + ); + + /***/ + }, + /* 17 */ + /* unknown exports provided */ + /* all exports used */ + /*!***********************************************!*\ + !*** ./~/react-dom/lib/reactProdInvariant.js ***! + \***********************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright (c) 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * \n */\n\n\n/**\n * WARNING: DO NOT manually require this module.\n * This is a replacement for `invariant(...)` used by the error code system\n * and will _only_ be required by the corresponding babel pass.\n * It always throws.\n */\n\nfunction reactProdInvariant(code) {\n var argCount = arguments.length - 1;\n\n var message = 'Minified React error #' + code + '; visit ' + 'http://facebook.github.io/react/docs/error-decoder.html?invariant=' + code;\n\n for (var argIdx = 0; argIdx < argCount; argIdx++) {\n message += '&args[]=' + encodeURIComponent(arguments[argIdx + 1]);\n }\n\n message += ' for the full message or use the non-minified dev environment' + ' for full errors and additional helpful warnings.';\n\n var error = new Error(message);\n error.name = 'Invariant Violation';\n error.framesToPop = 1; // we don't care about reactProdInvariant's own frame\n\n throw error;\n}\n\nmodule.exports = reactProdInvariant;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/reactProdInvariant.js\n// module id = 17\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/reactProdInvariant.js?", + ); + + /***/ + }, + /* 18 */ + /* unknown exports provided */ + /* all exports used */ + /*!***********************************************!*\ + !*** ./~/react-prop-types/lib/elementType.js ***! + \***********************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nexports.__esModule = true;\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol ? \"symbol\" : typeof obj; };\n\nvar _react = __webpack_require__(/*! react */ 1);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _createChainableTypeChecker = __webpack_require__(/*! ./utils/createChainableTypeChecker */ 176);\n\nvar _createChainableTypeChecker2 = _interopRequireDefault(_createChainableTypeChecker);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction elementType(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = typeof propValue === 'undefined' ? 'undefined' : _typeof(propValue);\n\n if (_react2.default.isValidElement(propValue)) {\n return new Error('Invalid ' + location + ' `' + propFullName + '` of type ReactElement ' + ('supplied to `' + componentName + '`, expected an element type (a string ') + 'or a ReactClass).');\n }\n\n if (propType !== 'function' && propType !== 'string') {\n return new Error('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected an element type (a string ') + 'or a ReactClass).');\n }\n\n return null;\n}\n\nexports.default = (0, _createChainableTypeChecker2.default)(elementType);\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-prop-types/lib/elementType.js\n// module id = 18\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-prop-types/lib/elementType.js?", + ); + + /***/ + }, + /* 19 */ + /* unknown exports provided */ + /* exports used: default */ + /*!****************************!*\ + !*** ./~/lodash/lodash.js ***! + \****************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "/* WEBPACK VAR INJECTION */(function(global, module) {var __WEBPACK_AMD_DEFINE_RESULT__;/**\n * @license\n * Lodash <https://lodash.com/>\n * Copyright JS Foundation and other contributors <https://js.foundation/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n;(function() {\n\n /** Used as a safe reference for `undefined` in pre-ES5 environments. */\n var undefined;\n\n /** Used as the semantic version number. */\n var VERSION = '4.17.4';\n\n /** Used as the size to enable large array optimizations. */\n var LARGE_ARRAY_SIZE = 200;\n\n /** Error message constants. */\n var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.',\n FUNC_ERROR_TEXT = 'Expected a function';\n\n /** Used to stand-in for `undefined` hash values. */\n var HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n /** Used as the maximum memoize cache size. */\n var MAX_MEMOIZE_SIZE = 500;\n\n /** Used as the internal argument placeholder. */\n var PLACEHOLDER = '__lodash_placeholder__';\n\n /** Used to compose bitmasks for cloning. */\n var CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n /** Used to compose bitmasks for value comparisons. */\n var COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n /** Used to compose bitmasks for function metadata. */\n var WRAP_BIND_FLAG = 1,\n WRAP_BIND_KEY_FLAG = 2,\n WRAP_CURRY_BOUND_FLAG = 4,\n WRAP_CURRY_FLAG = 8,\n WRAP_CURRY_RIGHT_FLAG = 16,\n WRAP_PARTIAL_FLAG = 32,\n WRAP_PARTIAL_RIGHT_FLAG = 64,\n WRAP_ARY_FLAG = 128,\n WRAP_REARG_FLAG = 256,\n WRAP_FLIP_FLAG = 512;\n\n /** Used as default options for `_.truncate`. */\n var DEFAULT_TRUNC_LENGTH = 30,\n DEFAULT_TRUNC_OMISSION = '...';\n\n /** Used to detect hot functions by number of calls within a span of milliseconds. */\n var HOT_COUNT = 800,\n HOT_SPAN = 16;\n\n /** Used to indicate the type of lazy iteratees. */\n var LAZY_FILTER_FLAG = 1,\n LAZY_MAP_FLAG = 2,\n LAZY_WHILE_FLAG = 3;\n\n /** Used as references for various `Number` constants. */\n var INFINITY = 1 / 0,\n MAX_SAFE_INTEGER = 9007199254740991,\n MAX_INTEGER = 1.7976931348623157e+308,\n NAN = 0 / 0;\n\n /** Used as references for the maximum length and index of an array. */\n var MAX_ARRAY_LENGTH = 4294967295,\n MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1,\n HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;\n\n /** Used to associate wrap methods with their bit flags. */\n var wrapFlags = [\n ['ary', WRAP_ARY_FLAG],\n ['bind', WRAP_BIND_FLAG],\n ['bindKey', WRAP_BIND_KEY_FLAG],\n ['curry', WRAP_CURRY_FLAG],\n ['curryRight', WRAP_CURRY_RIGHT_FLAG],\n ['flip', WRAP_FLIP_FLAG],\n ['partial', WRAP_PARTIAL_FLAG],\n ['partialRight', WRAP_PARTIAL_RIGHT_FLAG],\n ['rearg', WRAP_REARG_FLAG]\n ];\n\n /** `Object#toString` result references. */\n var argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n asyncTag = '[object AsyncFunction]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n domExcTag = '[object DOMException]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n nullTag = '[object Null]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n proxyTag = '[object Proxy]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n undefinedTag = '[object Undefined]',\n weakMapTag = '[object WeakMap]',\n weakSetTag = '[object WeakSet]';\n\n var arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n /** Used to match empty string literals in compiled template source. */\n var reEmptyStringLeading = /\\b__p \\+= '';/g,\n reEmptyStringMiddle = /\\b(__p \\+=) '' \\+/g,\n reEmptyStringTrailing = /(__e\\(.*?\\)|\\b__t\\)) \\+\\n'';/g;\n\n /** Used to match HTML entities and HTML characters. */\n var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g,\n reUnescapedHtml = /[&<>\"']/g,\n reHasEscapedHtml = RegExp(reEscapedHtml.source),\n reHasUnescapedHtml = RegExp(reUnescapedHtml.source);\n\n /** Used to match template delimiters. */\n var reEscape = /<%-([\\s\\S]+?)%>/g,\n reEvaluate = /<%([\\s\\S]+?)%>/g,\n reInterpolate = /<%=([\\s\\S]+?)%>/g;\n\n /** Used to match property names within property paths. */\n var reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n reIsPlainProp = /^\\w*$/,\n reLeadingDot = /^\\./,\n rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n /**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\n var reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g,\n reHasRegExpChar = RegExp(reRegExpChar.source);\n\n /** Used to match leading and trailing whitespace. */\n var reTrim = /^\\s+|\\s+$/g,\n reTrimStart = /^\\s+/,\n reTrimEnd = /\\s+$/;\n\n /** Used to match wrap detail comments. */\n var reWrapComment = /\\{(?:\\n\\/\\* \\[wrapped with .+\\] \\*\\/)?\\n?/,\n reWrapDetails = /\\{\\n\\/\\* \\[wrapped with (.+)\\] \\*/,\n reSplitDetails = /,? & /;\n\n /** Used to match words composed of alphanumeric characters. */\n var reAsciiWord = /[^\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\x7f]+/g;\n\n /** Used to match backslashes in property paths. */\n var reEscapeChar = /\\\\(\\\\)?/g;\n\n /**\n * Used to match\n * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components).\n */\n var reEsTemplate = /\\$\\{([^\\\\}]*(?:\\\\.[^\\\\}]*)*)\\}/g;\n\n /** Used to match `RegExp` flags from their coerced string values. */\n var reFlags = /\\w*$/;\n\n /** Used to detect bad signed hexadecimal string values. */\n var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n /** Used to detect binary string values. */\n var reIsBinary = /^0b[01]+$/i;\n\n /** Used to detect host constructors (Safari). */\n var reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n /** Used to detect octal string values. */\n var reIsOctal = /^0o[0-7]+$/i;\n\n /** Used to detect unsigned integer values. */\n var reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n /** Used to match Latin Unicode letters (excluding mathematical operators). */\n var reLatin = /[\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\xff\\u0100-\\u017f]/g;\n\n /** Used to ensure capturing order of template delimiters. */\n var reNoMatch = /($^)/;\n\n /** Used to match unescaped characters in compiled string literals. */\n var reUnescapedString = /['\\n\\r\\u2028\\u2029\\\\]/g;\n\n /** Used to compose unicode character classes. */\n var rsAstralRange = '\\\\ud800-\\\\udfff',\n rsComboMarksRange = '\\\\u0300-\\\\u036f',\n reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,\n rsDingbatRange = '\\\\u2700-\\\\u27bf',\n rsLowerRange = 'a-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xff',\n rsMathOpRange = '\\\\xac\\\\xb1\\\\xd7\\\\xf7',\n rsNonCharRange = '\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf',\n rsPunctuationRange = '\\\\u2000-\\\\u206f',\n rsSpaceRange = ' \\\\t\\\\x0b\\\\f\\\\xa0\\\\ufeff\\\\n\\\\r\\\\u2028\\\\u2029\\\\u1680\\\\u180e\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200a\\\\u202f\\\\u205f\\\\u3000',\n rsUpperRange = 'A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde',\n rsVarRange = '\\\\ufe0e\\\\ufe0f',\n rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;\n\n /** Used to compose unicode capture groups. */\n var rsApos = \"['\\u2019]\",\n rsAstral = '[' + rsAstralRange + ']',\n rsBreak = '[' + rsBreakRange + ']',\n rsCombo = '[' + rsComboRange + ']',\n rsDigits = '\\\\d+',\n rsDingbat = '[' + rsDingbatRange + ']',\n rsLower = '[' + rsLowerRange + ']',\n rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',\n rsFitz = '\\\\ud83c[\\\\udffb-\\\\udfff]',\n rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',\n rsNonAstral = '[^' + rsAstralRange + ']',\n rsRegional = '(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}',\n rsSurrPair = '[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]',\n rsUpper = '[' + rsUpperRange + ']',\n rsZWJ = '\\\\u200d';\n\n /** Used to compose unicode regexes. */\n var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',\n rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',\n rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',\n rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',\n reOptMod = rsModifier + '?',\n rsOptVar = '[' + rsVarRange + ']?',\n rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',\n rsOrdLower = '\\\\d*(?:(?:1st|2nd|3rd|(?![123])\\\\dth)\\\\b)',\n rsOrdUpper = '\\\\d*(?:(?:1ST|2ND|3RD|(?![123])\\\\dTH)\\\\b)',\n rsSeq = rsOptVar + reOptMod + rsOptJoin,\n rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq,\n rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';\n\n /** Used to match apostrophes. */\n var reApos = RegExp(rsApos, 'g');\n\n /**\n * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and\n * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).\n */\n var reComboMark = RegExp(rsCombo, 'g');\n\n /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */\n var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');\n\n /** Used to match complex or compound words. */\n var reUnicodeWord = RegExp([\n rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',\n rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',\n rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,\n rsUpper + '+' + rsOptContrUpper,\n rsOrdUpper,\n rsOrdLower,\n rsDigits,\n rsEmoji\n ].join('|'), 'g');\n\n /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */\n var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']');\n\n /** Used to detect strings that need a more robust regexp to match words. */\n var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;\n\n /** Used to assign default `context` object properties. */\n var contextProps = [\n 'Array', 'Buffer', 'DataView', 'Date', 'Error', 'Float32Array', 'Float64Array',\n 'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object',\n 'Promise', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', 'Uint8Array',\n 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap',\n '_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout'\n ];\n\n /** Used to make template sourceURLs easier to identify. */\n var templateCounter = -1;\n\n /** Used to identify `toStringTag` values of typed arrays. */\n var typedArrayTags = {};\n typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\n typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\n typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\n typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\n typedArrayTags[uint32Tag] = true;\n typedArrayTags[argsTag] = typedArrayTags[arrayTag] =\n typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\n typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\n typedArrayTags[errorTag] = typedArrayTags[funcTag] =\n typedArrayTags[mapTag] = typedArrayTags[numberTag] =\n typedArrayTags[objectTag] = typedArrayTags[regexpTag] =\n typedArrayTags[setTag] = typedArrayTags[stringTag] =\n typedArrayTags[weakMapTag] = false;\n\n /** Used to identify `toStringTag` values supported by `_.clone`. */\n var cloneableTags = {};\n cloneableTags[argsTag] = cloneableTags[arrayTag] =\n cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\n cloneableTags[boolTag] = cloneableTags[dateTag] =\n cloneableTags[float32Tag] = cloneableTags[float64Tag] =\n cloneableTags[int8Tag] = cloneableTags[int16Tag] =\n cloneableTags[int32Tag] = cloneableTags[mapTag] =\n cloneableTags[numberTag] = cloneableTags[objectTag] =\n cloneableTags[regexpTag] = cloneableTags[setTag] =\n cloneableTags[stringTag] = cloneableTags[symbolTag] =\n cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\n cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\n cloneableTags[errorTag] = cloneableTags[funcTag] =\n cloneableTags[weakMapTag] = false;\n\n /** Used to map Latin Unicode letters to basic Latin letters. */\n var deburredLetters = {\n // Latin-1 Supplement block.\n '\\xc0': 'A', '\\xc1': 'A', '\\xc2': 'A', '\\xc3': 'A', '\\xc4': 'A', '\\xc5': 'A',\n '\\xe0': 'a', '\\xe1': 'a', '\\xe2': 'a', '\\xe3': 'a', '\\xe4': 'a', '\\xe5': 'a',\n '\\xc7': 'C', '\\xe7': 'c',\n '\\xd0': 'D', '\\xf0': 'd',\n '\\xc8': 'E', '\\xc9': 'E', '\\xca': 'E', '\\xcb': 'E',\n '\\xe8': 'e', '\\xe9': 'e', '\\xea': 'e', '\\xeb': 'e',\n '\\xcc': 'I', '\\xcd': 'I', '\\xce': 'I', '\\xcf': 'I',\n '\\xec': 'i', '\\xed': 'i', '\\xee': 'i', '\\xef': 'i',\n '\\xd1': 'N', '\\xf1': 'n',\n '\\xd2': 'O', '\\xd3': 'O', '\\xd4': 'O', '\\xd5': 'O', '\\xd6': 'O', '\\xd8': 'O',\n '\\xf2': 'o', '\\xf3': 'o', '\\xf4': 'o', '\\xf5': 'o', '\\xf6': 'o', '\\xf8': 'o',\n '\\xd9': 'U', '\\xda': 'U', '\\xdb': 'U', '\\xdc': 'U',\n '\\xf9': 'u', '\\xfa': 'u', '\\xfb': 'u', '\\xfc': 'u',\n '\\xdd': 'Y', '\\xfd': 'y', '\\xff': 'y',\n '\\xc6': 'Ae', '\\xe6': 'ae',\n '\\xde': 'Th', '\\xfe': 'th',\n '\\xdf': 'ss',\n // Latin Extended-A block.\n '\\u0100': 'A', '\\u0102': 'A', '\\u0104': 'A',\n '\\u0101': 'a', '\\u0103': 'a', '\\u0105': 'a',\n '\\u0106': 'C', '\\u0108': 'C', '\\u010a': 'C', '\\u010c': 'C',\n '\\u0107': 'c', '\\u0109': 'c', '\\u010b': 'c', '\\u010d': 'c',\n '\\u010e': 'D', '\\u0110': 'D', '\\u010f': 'd', '\\u0111': 'd',\n '\\u0112': 'E', '\\u0114': 'E', '\\u0116': 'E', '\\u0118': 'E', '\\u011a': 'E',\n '\\u0113': 'e', '\\u0115': 'e', '\\u0117': 'e', '\\u0119': 'e', '\\u011b': 'e',\n '\\u011c': 'G', '\\u011e': 'G', '\\u0120': 'G', '\\u0122': 'G',\n '\\u011d': 'g', '\\u011f': 'g', '\\u0121': 'g', '\\u0123': 'g',\n '\\u0124': 'H', '\\u0126': 'H', '\\u0125': 'h', '\\u0127': 'h',\n '\\u0128': 'I', '\\u012a': 'I', '\\u012c': 'I', '\\u012e': 'I', '\\u0130': 'I',\n '\\u0129': 'i', '\\u012b': 'i', '\\u012d': 'i', '\\u012f': 'i', '\\u0131': 'i',\n '\\u0134': 'J', '\\u0135': 'j',\n '\\u0136': 'K', '\\u0137': 'k', '\\u0138': 'k',\n '\\u0139': 'L', '\\u013b': 'L', '\\u013d': 'L', '\\u013f': 'L', '\\u0141': 'L',\n '\\u013a': 'l', '\\u013c': 'l', '\\u013e': 'l', '\\u0140': 'l', '\\u0142': 'l',\n '\\u0143': 'N', '\\u0145': 'N', '\\u0147': 'N', '\\u014a': 'N',\n '\\u0144': 'n', '\\u0146': 'n', '\\u0148': 'n', '\\u014b': 'n',\n '\\u014c': 'O', '\\u014e': 'O', '\\u0150': 'O',\n '\\u014d': 'o', '\\u014f': 'o', '\\u0151': 'o',\n '\\u0154': 'R', '\\u0156': 'R', '\\u0158': 'R',\n '\\u0155': 'r', '\\u0157': 'r', '\\u0159': 'r',\n '\\u015a': 'S', '\\u015c': 'S', '\\u015e': 'S', '\\u0160': 'S',\n '\\u015b': 's', '\\u015d': 's', '\\u015f': 's', '\\u0161': 's',\n '\\u0162': 'T', '\\u0164': 'T', '\\u0166': 'T',\n '\\u0163': 't', '\\u0165': 't', '\\u0167': 't',\n '\\u0168': 'U', '\\u016a': 'U', '\\u016c': 'U', '\\u016e': 'U', '\\u0170': 'U', '\\u0172': 'U',\n '\\u0169': 'u', '\\u016b': 'u', '\\u016d': 'u', '\\u016f': 'u', '\\u0171': 'u', '\\u0173': 'u',\n '\\u0174': 'W', '\\u0175': 'w',\n '\\u0176': 'Y', '\\u0177': 'y', '\\u0178': 'Y',\n '\\u0179': 'Z', '\\u017b': 'Z', '\\u017d': 'Z',\n '\\u017a': 'z', '\\u017c': 'z', '\\u017e': 'z',\n '\\u0132': 'IJ', '\\u0133': 'ij',\n '\\u0152': 'Oe', '\\u0153': 'oe',\n '\\u0149': \"'n\", '\\u017f': 's'\n };\n\n /** Used to map characters to HTML entities. */\n var htmlEscapes = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": '''\n };\n\n /** Used to map HTML entities to characters. */\n var htmlUnescapes = {\n '&': '&',\n '<': '<',\n '>': '>',\n '"': '\"',\n ''': \"'\"\n };\n\n /** Used to escape characters for inclusion in compiled string literals. */\n var stringEscapes = {\n '\\\\': '\\\\',\n \"'\": \"'\",\n '\\n': 'n',\n '\\r': 'r',\n '\\u2028': 'u2028',\n '\\u2029': 'u2029'\n };\n\n /** Built-in method references without a dependency on `root`. */\n var freeParseFloat = parseFloat,\n freeParseInt = parseInt;\n\n /** Detect free variable `global` from Node.js. */\n var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n /** Detect free variable `self`. */\n var freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n /** Used as a reference to the global object. */\n var root = freeGlobal || freeSelf || Function('return this')();\n\n /** Detect free variable `exports`. */\n var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n /** Detect free variable `module`. */\n var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n /** Detect the popular CommonJS extension `module.exports`. */\n var moduleExports = freeModule && freeModule.exports === freeExports;\n\n /** Detect free variable `process` from Node.js. */\n var freeProcess = moduleExports && freeGlobal.process;\n\n /** Used to access faster Node.js helpers. */\n var nodeUtil = (function() {\n try {\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n }());\n\n /* Node.js helper references. */\n var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer,\n nodeIsDate = nodeUtil && nodeUtil.isDate,\n nodeIsMap = nodeUtil && nodeUtil.isMap,\n nodeIsRegExp = nodeUtil && nodeUtil.isRegExp,\n nodeIsSet = nodeUtil && nodeUtil.isSet,\n nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n /*--------------------------------------------------------------------------*/\n\n /**\n * Adds the key-value `pair` to `map`.\n *\n * @private\n * @param {Object} map The map to modify.\n * @param {Array} pair The key-value pair to add.\n * @returns {Object} Returns `map`.\n */\n function addMapEntry(map, pair) {\n // Don't return `map.set` because it's not chainable in IE 11.\n map.set(pair[0], pair[1]);\n return map;\n }\n\n /**\n * Adds `value` to `set`.\n *\n * @private\n * @param {Object} set The set to modify.\n * @param {*} value The value to add.\n * @returns {Object} Returns `set`.\n */\n function addSetEntry(set, value) {\n // Don't return `set.add` because it's not chainable in IE 11.\n set.add(value);\n return set;\n }\n\n /**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\n function apply(func, thisArg, args) {\n switch (args.length) {\n case 0: return func.call(thisArg);\n case 1: return func.call(thisArg, args[0]);\n case 2: return func.call(thisArg, args[0], args[1]);\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\n }\n return func.apply(thisArg, args);\n }\n\n /**\n * A specialized version of `baseAggregator` for arrays.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform keys.\n * @param {Object} accumulator The initial aggregated object.\n * @returns {Function} Returns `accumulator`.\n */\n function arrayAggregator(array, setter, iteratee, accumulator) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n var value = array[index];\n setter(accumulator, value, iteratee(value), array);\n }\n return accumulator;\n }\n\n /**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\n function arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n }\n\n /**\n * A specialized version of `_.forEachRight` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\n function arrayEachRight(array, iteratee) {\n var length = array == null ? 0 : array.length;\n\n while (length--) {\n if (iteratee(array[length], length, array) === false) {\n break;\n }\n }\n return array;\n }\n\n /**\n * A specialized version of `_.every` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\n * else `false`.\n */\n function arrayEvery(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (!predicate(array[index], index, array)) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\n function arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n }\n\n /**\n * A specialized version of `_.includes` for arrays without support for\n * specifying an index to search from.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\n function arrayIncludes(array, value) {\n var length = array == null ? 0 : array.length;\n return !!length && baseIndexOf(array, value, 0) > -1;\n }\n\n /**\n * This function is like `arrayIncludes` except that it accepts a comparator.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @param {Function} comparator The comparator invoked per element.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\n function arrayIncludesWith(array, value, comparator) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (comparator(value, array[index])) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\n function arrayMap(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length,\n result = Array(length);\n\n while (++index < length) {\n result[index] = iteratee(array[index], index, array);\n }\n return result;\n }\n\n /**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\n function arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n }\n\n /**\n * A specialized version of `_.reduce` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @param {boolean} [initAccum] Specify using the first element of `array` as\n * the initial value.\n * @returns {*} Returns the accumulated value.\n */\n function arrayReduce(array, iteratee, accumulator, initAccum) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n if (initAccum && length) {\n accumulator = array[++index];\n }\n while (++index < length) {\n accumulator = iteratee(accumulator, array[index], index, array);\n }\n return accumulator;\n }\n\n /**\n * A specialized version of `_.reduceRight` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @param {boolean} [initAccum] Specify using the last element of `array` as\n * the initial value.\n * @returns {*} Returns the accumulated value.\n */\n function arrayReduceRight(array, iteratee, accumulator, initAccum) {\n var length = array == null ? 0 : array.length;\n if (initAccum && length) {\n accumulator = array[--length];\n }\n while (length--) {\n accumulator = iteratee(accumulator, array[length], length, array);\n }\n return accumulator;\n }\n\n /**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\n function arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * Gets the size of an ASCII `string`.\n *\n * @private\n * @param {string} string The string inspect.\n * @returns {number} Returns the string size.\n */\n var asciiSize = baseProperty('length');\n\n /**\n * Converts an ASCII `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\n function asciiToArray(string) {\n return string.split('');\n }\n\n /**\n * Splits an ASCII `string` into an array of its words.\n *\n * @private\n * @param {string} The string to inspect.\n * @returns {Array} Returns the words of `string`.\n */\n function asciiWords(string) {\n return string.match(reAsciiWord) || [];\n }\n\n /**\n * The base implementation of methods like `_.findKey` and `_.findLastKey`,\n * without support for iteratee shorthands, which iterates over `collection`\n * using `eachFunc`.\n *\n * @private\n * @param {Array|Object} collection The collection to inspect.\n * @param {Function} predicate The function invoked per iteration.\n * @param {Function} eachFunc The function to iterate over `collection`.\n * @returns {*} Returns the found element or its key, else `undefined`.\n */\n function baseFindKey(collection, predicate, eachFunc) {\n var result;\n eachFunc(collection, function(value, key, collection) {\n if (predicate(value, key, collection)) {\n result = key;\n return false;\n }\n });\n return result;\n }\n\n /**\n * The base implementation of `_.findIndex` and `_.findLastIndex` without\n * support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} predicate The function invoked per iteration.\n * @param {number} fromIndex The index to search from.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function baseFindIndex(array, predicate, fromIndex, fromRight) {\n var length = array.length,\n index = fromIndex + (fromRight ? 1 : -1);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (predicate(array[index], index, array)) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * The base implementation of `_.indexOf` without `fromIndex` bounds checks.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function baseIndexOf(array, value, fromIndex) {\n return value === value\n ? strictIndexOf(array, value, fromIndex)\n : baseFindIndex(array, baseIsNaN, fromIndex);\n }\n\n /**\n * This function is like `baseIndexOf` except that it accepts a comparator.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @param {Function} comparator The comparator invoked per element.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function baseIndexOfWith(array, value, fromIndex, comparator) {\n var index = fromIndex - 1,\n length = array.length;\n\n while (++index < length) {\n if (comparator(array[index], value)) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * The base implementation of `_.isNaN` without support for number objects.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n */\n function baseIsNaN(value) {\n return value !== value;\n }\n\n /**\n * The base implementation of `_.mean` and `_.meanBy` without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {number} Returns the mean.\n */\n function baseMean(array, iteratee) {\n var length = array == null ? 0 : array.length;\n return length ? (baseSum(array, iteratee) / length) : NAN;\n }\n\n /**\n * The base implementation of `_.property` without support for deep paths.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\n function baseProperty(key) {\n return function(object) {\n return object == null ? undefined : object[key];\n };\n }\n\n /**\n * The base implementation of `_.propertyOf` without support for deep paths.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Function} Returns the new accessor function.\n */\n function basePropertyOf(object) {\n return function(key) {\n return object == null ? undefined : object[key];\n };\n }\n\n /**\n * The base implementation of `_.reduce` and `_.reduceRight`, without support\n * for iteratee shorthands, which iterates over `collection` using `eachFunc`.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} accumulator The initial value.\n * @param {boolean} initAccum Specify using the first or last element of\n * `collection` as the initial value.\n * @param {Function} eachFunc The function to iterate over `collection`.\n * @returns {*} Returns the accumulated value.\n */\n function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {\n eachFunc(collection, function(value, index, collection) {\n accumulator = initAccum\n ? (initAccum = false, value)\n : iteratee(accumulator, value, index, collection);\n });\n return accumulator;\n }\n\n /**\n * The base implementation of `_.sortBy` which uses `comparer` to define the\n * sort order of `array` and replaces criteria objects with their corresponding\n * values.\n *\n * @private\n * @param {Array} array The array to sort.\n * @param {Function} comparer The function to define sort order.\n * @returns {Array} Returns `array`.\n */\n function baseSortBy(array, comparer) {\n var length = array.length;\n\n array.sort(comparer);\n while (length--) {\n array[length] = array[length].value;\n }\n return array;\n }\n\n /**\n * The base implementation of `_.sum` and `_.sumBy` without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {number} Returns the sum.\n */\n function baseSum(array, iteratee) {\n var result,\n index = -1,\n length = array.length;\n\n while (++index < length) {\n var current = iteratee(array[index]);\n if (current !== undefined) {\n result = result === undefined ? current : (result + current);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\n function baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n }\n\n /**\n * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array\n * of key-value pairs for `object` corresponding to the property names of `props`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array} props The property names to get values for.\n * @returns {Object} Returns the key-value pairs.\n */\n function baseToPairs(object, props) {\n return arrayMap(props, function(key) {\n return [key, object[key]];\n });\n }\n\n /**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\n function baseUnary(func) {\n return function(value) {\n return func(value);\n };\n }\n\n /**\n * The base implementation of `_.values` and `_.valuesIn` which creates an\n * array of `object` property values corresponding to the property names\n * of `props`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array} props The property names to get values for.\n * @returns {Object} Returns the array of property values.\n */\n function baseValues(object, props) {\n return arrayMap(props, function(key) {\n return object[key];\n });\n }\n\n /**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function cacheHas(cache, key) {\n return cache.has(key);\n }\n\n /**\n * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol\n * that is not found in the character symbols.\n *\n * @private\n * @param {Array} strSymbols The string symbols to inspect.\n * @param {Array} chrSymbols The character symbols to find.\n * @returns {number} Returns the index of the first unmatched string symbol.\n */\n function charsStartIndex(strSymbols, chrSymbols) {\n var index = -1,\n length = strSymbols.length;\n\n while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}\n return index;\n }\n\n /**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol\n * that is not found in the character symbols.\n *\n * @private\n * @param {Array} strSymbols The string symbols to inspect.\n * @param {Array} chrSymbols The character symbols to find.\n * @returns {number} Returns the index of the last unmatched string symbol.\n */\n function charsEndIndex(strSymbols, chrSymbols) {\n var index = strSymbols.length;\n\n while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}\n return index;\n }\n\n /**\n * Gets the number of `placeholder` occurrences in `array`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} placeholder The placeholder to search for.\n * @returns {number} Returns the placeholder count.\n */\n function countHolders(array, placeholder) {\n var length = array.length,\n result = 0;\n\n while (length--) {\n if (array[length] === placeholder) {\n ++result;\n }\n }\n return result;\n }\n\n /**\n * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A\n * letters to basic Latin letters.\n *\n * @private\n * @param {string} letter The matched letter to deburr.\n * @returns {string} Returns the deburred letter.\n */\n var deburrLetter = basePropertyOf(deburredLetters);\n\n /**\n * Used by `_.escape` to convert characters to HTML entities.\n *\n * @private\n * @param {string} chr The matched character to escape.\n * @returns {string} Returns the escaped character.\n */\n var escapeHtmlChar = basePropertyOf(htmlEscapes);\n\n /**\n * Used by `_.template` to escape characters for inclusion in compiled string literals.\n *\n * @private\n * @param {string} chr The matched character to escape.\n * @returns {string} Returns the escaped character.\n */\n function escapeStringChar(chr) {\n return '\\\\' + stringEscapes[chr];\n }\n\n /**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\n function getValue(object, key) {\n return object == null ? undefined : object[key];\n }\n\n /**\n * Checks if `string` contains Unicode symbols.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {boolean} Returns `true` if a symbol is found, else `false`.\n */\n function hasUnicode(string) {\n return reHasUnicode.test(string);\n }\n\n /**\n * Checks if `string` contains a word composed of Unicode symbols.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {boolean} Returns `true` if a word is found, else `false`.\n */\n function hasUnicodeWord(string) {\n return reHasUnicodeWord.test(string);\n }\n\n /**\n * Converts `iterator` to an array.\n *\n * @private\n * @param {Object} iterator The iterator to convert.\n * @returns {Array} Returns the converted array.\n */\n function iteratorToArray(iterator) {\n var data,\n result = [];\n\n while (!(data = iterator.next()).done) {\n result.push(data.value);\n }\n return result;\n }\n\n /**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\n function mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n }\n\n /**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\n function overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n }\n\n /**\n * Replaces all `placeholder` elements in `array` with an internal placeholder\n * and returns an array of their indexes.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {*} placeholder The placeholder to replace.\n * @returns {Array} Returns the new array of placeholder indexes.\n */\n function replaceHolders(array, placeholder) {\n var index = -1,\n length = array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (value === placeholder || value === PLACEHOLDER) {\n array[index] = PLACEHOLDER;\n result[resIndex++] = index;\n }\n }\n return result;\n }\n\n /**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\n function setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n }\n\n /**\n * Converts `set` to its value-value pairs.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the value-value pairs.\n */\n function setToPairs(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = [value, value];\n });\n return result;\n }\n\n /**\n * A specialized version of `_.indexOf` which performs strict equality\n * comparisons of values, i.e. `===`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function strictIndexOf(array, value, fromIndex) {\n var index = fromIndex - 1,\n length = array.length;\n\n while (++index < length) {\n if (array[index] === value) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * A specialized version of `_.lastIndexOf` which performs strict equality\n * comparisons of values, i.e. `===`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function strictLastIndexOf(array, value, fromIndex) {\n var index = fromIndex + 1;\n while (index--) {\n if (array[index] === value) {\n return index;\n }\n }\n return index;\n }\n\n /**\n * Gets the number of symbols in `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the string size.\n */\n function stringSize(string) {\n return hasUnicode(string)\n ? unicodeSize(string)\n : asciiSize(string);\n }\n\n /**\n * Converts `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\n function stringToArray(string) {\n return hasUnicode(string)\n ? unicodeToArray(string)\n : asciiToArray(string);\n }\n\n /**\n * Used by `_.unescape` to convert HTML entities to characters.\n *\n * @private\n * @param {string} chr The matched character to unescape.\n * @returns {string} Returns the unescaped character.\n */\n var unescapeHtmlChar = basePropertyOf(htmlUnescapes);\n\n /**\n * Gets the size of a Unicode `string`.\n *\n * @private\n * @param {string} string The string inspect.\n * @returns {number} Returns the string size.\n */\n function unicodeSize(string) {\n var result = reUnicode.lastIndex = 0;\n while (reUnicode.test(string)) {\n ++result;\n }\n return result;\n }\n\n /**\n * Converts a Unicode `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\n function unicodeToArray(string) {\n return string.match(reUnicode) || [];\n }\n\n /**\n * Splits a Unicode `string` into an array of its words.\n *\n * @private\n * @param {string} The string to inspect.\n * @returns {Array} Returns the words of `string`.\n */\n function unicodeWords(string) {\n return string.match(reUnicodeWord) || [];\n }\n\n /*--------------------------------------------------------------------------*/\n\n /**\n * Create a new pristine `lodash` function using the `context` object.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category Util\n * @param {Object} [context=root] The context object.\n * @returns {Function} Returns a new `lodash` function.\n * @example\n *\n * _.mixin({ 'foo': _.constant('foo') });\n *\n * var lodash = _.runInContext();\n * lodash.mixin({ 'bar': lodash.constant('bar') });\n *\n * _.isFunction(_.foo);\n * // => true\n * _.isFunction(_.bar);\n * // => false\n *\n * lodash.isFunction(lodash.foo);\n * // => false\n * lodash.isFunction(lodash.bar);\n * // => true\n *\n * // Create a suped-up `defer` in Node.js.\n * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer;\n */\n var runInContext = (function runInContext(context) {\n context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps));\n\n /** Built-in constructor references. */\n var Array = context.Array,\n Date = context.Date,\n Error = context.Error,\n Function = context.Function,\n Math = context.Math,\n Object = context.Object,\n RegExp = context.RegExp,\n String = context.String,\n TypeError = context.TypeError;\n\n /** Used for built-in method references. */\n var arrayProto = Array.prototype,\n funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n /** Used to detect overreaching core-js shims. */\n var coreJsData = context['__core-js_shared__'];\n\n /** Used to resolve the decompiled source of functions. */\n var funcToString = funcProto.toString;\n\n /** Used to check objects for own properties. */\n var hasOwnProperty = objectProto.hasOwnProperty;\n\n /** Used to generate unique IDs. */\n var idCounter = 0;\n\n /** Used to detect methods masquerading as native. */\n var maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n }());\n\n /**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\n var nativeObjectToString = objectProto.toString;\n\n /** Used to infer the `Object` constructor. */\n var objectCtorString = funcToString.call(Object);\n\n /** Used to restore the original `_` reference in `_.noConflict`. */\n var oldDash = root._;\n\n /** Used to detect if a method is native. */\n var reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n );\n\n /** Built-in value references. */\n var Buffer = moduleExports ? context.Buffer : undefined,\n Symbol = context.Symbol,\n Uint8Array = context.Uint8Array,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined,\n getPrototype = overArg(Object.getPrototypeOf, Object),\n objectCreate = Object.create,\n propertyIsEnumerable = objectProto.propertyIsEnumerable,\n splice = arrayProto.splice,\n spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined,\n symIterator = Symbol ? Symbol.iterator : undefined,\n symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n var defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n }());\n\n /** Mocked built-ins. */\n var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout,\n ctxNow = Date && Date.now !== root.Date.now && Date.now,\n ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;\n\n /* Built-in method references for those with the same name as other `lodash` methods. */\n var nativeCeil = Math.ceil,\n nativeFloor = Math.floor,\n nativeGetSymbols = Object.getOwnPropertySymbols,\n nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,\n nativeIsFinite = context.isFinite,\n nativeJoin = arrayProto.join,\n nativeKeys = overArg(Object.keys, Object),\n nativeMax = Math.max,\n nativeMin = Math.min,\n nativeNow = Date.now,\n nativeParseInt = context.parseInt,\n nativeRandom = Math.random,\n nativeReverse = arrayProto.reverse;\n\n /* Built-in method references that are verified to be native. */\n var DataView = getNative(context, 'DataView'),\n Map = getNative(context, 'Map'),\n Promise = getNative(context, 'Promise'),\n Set = getNative(context, 'Set'),\n WeakMap = getNative(context, 'WeakMap'),\n nativeCreate = getNative(Object, 'create');\n\n /** Used to store function metadata. */\n var metaMap = WeakMap && new WeakMap;\n\n /** Used to lookup unminified function names. */\n var realNames = {};\n\n /** Used to detect maps, sets, and weakmaps. */\n var dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n /** Used to convert symbols to primitives and strings. */\n var symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a `lodash` object which wraps `value` to enable implicit method\n * chain sequences. Methods that operate on and return arrays, collections,\n * and functions can be chained together. Methods that retrieve a single value\n * or may return a primitive value will automatically end the chain sequence\n * and return the unwrapped value. Otherwise, the value must be unwrapped\n * with `_#value`.\n *\n * Explicit chain sequences, which must be unwrapped with `_#value`, may be\n * enabled using `_.chain`.\n *\n * The execution of chained methods is lazy, that is, it's deferred until\n * `_#value` is implicitly or explicitly called.\n *\n * Lazy evaluation allows several methods to support shortcut fusion.\n * Shortcut fusion is an optimization to merge iteratee calls; this avoids\n * the creation of intermediate arrays and can greatly reduce the number of\n * iteratee executions. Sections of a chain sequence qualify for shortcut\n * fusion if the section is applied to an array and iteratees accept only\n * one argument. The heuristic for whether a section qualifies for shortcut\n * fusion is subject to change.\n *\n * Chaining is supported in custom builds as long as the `_#value` method is\n * directly or indirectly included in the build.\n *\n * In addition to lodash methods, wrappers have `Array` and `String` methods.\n *\n * The wrapper `Array` methods are:\n * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`\n *\n * The wrapper `String` methods are:\n * `replace` and `split`\n *\n * The wrapper methods that support shortcut fusion are:\n * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,\n * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,\n * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`\n *\n * The chainable wrapper methods are:\n * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,\n * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,\n * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,\n * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,\n * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,\n * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,\n * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,\n * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,\n * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,\n * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,\n * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,\n * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,\n * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,\n * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,\n * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,\n * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,\n * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,\n * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,\n * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,\n * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,\n * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,\n * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,\n * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,\n * `zipObject`, `zipObjectDeep`, and `zipWith`\n *\n * The wrapper methods that are **not** chainable by default are:\n * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,\n * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`,\n * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`,\n * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,\n * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`,\n * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,\n * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,\n * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`,\n * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`,\n * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`,\n * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,\n * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,\n * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`,\n * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`,\n * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,\n * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`,\n * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,\n * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,\n * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,\n * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`,\n * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`,\n * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,\n * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`,\n * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`,\n * `upperFirst`, `value`, and `words`\n *\n * @name _\n * @constructor\n * @category Seq\n * @param {*} value The value to wrap in a `lodash` instance.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * var wrapped = _([1, 2, 3]);\n *\n * // Returns an unwrapped value.\n * wrapped.reduce(_.add);\n * // => 6\n *\n * // Returns a wrapped value.\n * var squares = wrapped.map(square);\n *\n * _.isArray(squares);\n * // => false\n *\n * _.isArray(squares.value());\n * // => true\n */\n function lodash(value) {\n if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {\n if (value instanceof LodashWrapper) {\n return value;\n }\n if (hasOwnProperty.call(value, '__wrapped__')) {\n return wrapperClone(value);\n }\n }\n return new LodashWrapper(value);\n }\n\n /**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\n var baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n }());\n\n /**\n * The function whose prototype chain sequence wrappers inherit from.\n *\n * @private\n */\n function baseLodash() {\n // No operation performed.\n }\n\n /**\n * The base constructor for creating `lodash` wrapper objects.\n *\n * @private\n * @param {*} value The value to wrap.\n * @param {boolean} [chainAll] Enable explicit method chain sequences.\n */\n function LodashWrapper(value, chainAll) {\n this.__wrapped__ = value;\n this.__actions__ = [];\n this.__chain__ = !!chainAll;\n this.__index__ = 0;\n this.__values__ = undefined;\n }\n\n /**\n * By default, the template delimiters used by lodash are like those in\n * embedded Ruby (ERB) as well as ES2015 template strings. Change the\n * following template settings to use alternative delimiters.\n *\n * @static\n * @memberOf _\n * @type {Object}\n */\n lodash.templateSettings = {\n\n /**\n * Used to detect `data` property values to be HTML-escaped.\n *\n * @memberOf _.templateSettings\n * @type {RegExp}\n */\n 'escape': reEscape,\n\n /**\n * Used to detect code to be evaluated.\n *\n * @memberOf _.templateSettings\n * @type {RegExp}\n */\n 'evaluate': reEvaluate,\n\n /**\n * Used to detect `data` property values to inject.\n *\n * @memberOf _.templateSettings\n * @type {RegExp}\n */\n 'interpolate': reInterpolate,\n\n /**\n * Used to reference the data object in the template text.\n *\n * @memberOf _.templateSettings\n * @type {string}\n */\n 'variable': '',\n\n /**\n * Used to import variables into the compiled template.\n *\n * @memberOf _.templateSettings\n * @type {Object}\n */\n 'imports': {\n\n /**\n * A reference to the `lodash` function.\n *\n * @memberOf _.templateSettings.imports\n * @type {Function}\n */\n '_': lodash\n }\n };\n\n // Ensure wrappers are instances of `baseLodash`.\n lodash.prototype = baseLodash.prototype;\n lodash.prototype.constructor = lodash;\n\n LodashWrapper.prototype = baseCreate(baseLodash.prototype);\n LodashWrapper.prototype.constructor = LodashWrapper;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.\n *\n * @private\n * @constructor\n * @param {*} value The value to wrap.\n */\n function LazyWrapper(value) {\n this.__wrapped__ = value;\n this.__actions__ = [];\n this.__dir__ = 1;\n this.__filtered__ = false;\n this.__iteratees__ = [];\n this.__takeCount__ = MAX_ARRAY_LENGTH;\n this.__views__ = [];\n }\n\n /**\n * Creates a clone of the lazy wrapper object.\n *\n * @private\n * @name clone\n * @memberOf LazyWrapper\n * @returns {Object} Returns the cloned `LazyWrapper` object.\n */\n function lazyClone() {\n var result = new LazyWrapper(this.__wrapped__);\n result.__actions__ = copyArray(this.__actions__);\n result.__dir__ = this.__dir__;\n result.__filtered__ = this.__filtered__;\n result.__iteratees__ = copyArray(this.__iteratees__);\n result.__takeCount__ = this.__takeCount__;\n result.__views__ = copyArray(this.__views__);\n return result;\n }\n\n /**\n * Reverses the direction of lazy iteration.\n *\n * @private\n * @name reverse\n * @memberOf LazyWrapper\n * @returns {Object} Returns the new reversed `LazyWrapper` object.\n */\n function lazyReverse() {\n if (this.__filtered__) {\n var result = new LazyWrapper(this);\n result.__dir__ = -1;\n result.__filtered__ = true;\n } else {\n result = this.clone();\n result.__dir__ *= -1;\n }\n return result;\n }\n\n /**\n * Extracts the unwrapped value from its lazy wrapper.\n *\n * @private\n * @name value\n * @memberOf LazyWrapper\n * @returns {*} Returns the unwrapped value.\n */\n function lazyValue() {\n var array = this.__wrapped__.value(),\n dir = this.__dir__,\n isArr = isArray(array),\n isRight = dir < 0,\n arrLength = isArr ? array.length : 0,\n view = getView(0, arrLength, this.__views__),\n start = view.start,\n end = view.end,\n length = end - start,\n index = isRight ? end : (start - 1),\n iteratees = this.__iteratees__,\n iterLength = iteratees.length,\n resIndex = 0,\n takeCount = nativeMin(length, this.__takeCount__);\n\n if (!isArr || (!isRight && arrLength == length && takeCount == length)) {\n return baseWrapperValue(array, this.__actions__);\n }\n var result = [];\n\n outer:\n while (length-- && resIndex < takeCount) {\n index += dir;\n\n var iterIndex = -1,\n value = array[index];\n\n while (++iterIndex < iterLength) {\n var data = iteratees[iterIndex],\n iteratee = data.iteratee,\n type = data.type,\n computed = iteratee(value);\n\n if (type == LAZY_MAP_FLAG) {\n value = computed;\n } else if (!computed) {\n if (type == LAZY_FILTER_FLAG) {\n continue outer;\n } else {\n break outer;\n }\n }\n }\n result[resIndex++] = value;\n }\n return result;\n }\n\n // Ensure `LazyWrapper` is an instance of `baseLodash`.\n LazyWrapper.prototype = baseCreate(baseLodash.prototype);\n LazyWrapper.prototype.constructor = LazyWrapper;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\n function Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n }\n\n /**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\n function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }\n\n /**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\n function hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n }\n\n /**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\n function hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n }\n\n /**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n }\n\n /**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\n function hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n }\n\n // Add methods to `Hash`.\n Hash.prototype.clear = hashClear;\n Hash.prototype['delete'] = hashDelete;\n Hash.prototype.get = hashGet;\n Hash.prototype.has = hashHas;\n Hash.prototype.set = hashSet;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\n function ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n }\n\n /**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\n function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }\n\n /**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\n function listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n }\n\n /**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\n function listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n }\n\n /**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n }\n\n /**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\n function listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n }\n\n // Add methods to `ListCache`.\n ListCache.prototype.clear = listCacheClear;\n ListCache.prototype['delete'] = listCacheDelete;\n ListCache.prototype.get = listCacheGet;\n ListCache.prototype.has = listCacheHas;\n ListCache.prototype.set = listCacheSet;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\n function MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n }\n\n /**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\n function mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n }\n\n /**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\n function mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n }\n\n /**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\n function mapCacheGet(key) {\n return getMapData(this, key).get(key);\n }\n\n /**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function mapCacheHas(key) {\n return getMapData(this, key).has(key);\n }\n\n /**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\n function mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n }\n\n // Add methods to `MapCache`.\n MapCache.prototype.clear = mapCacheClear;\n MapCache.prototype['delete'] = mapCacheDelete;\n MapCache.prototype.get = mapCacheGet;\n MapCache.prototype.has = mapCacheHas;\n MapCache.prototype.set = mapCacheSet;\n\n /*------------------------------------------------------------------------*/\n\n /**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\n function SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n }\n\n /**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\n function setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n }\n\n /**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\n function setCacheHas(value) {\n return this.__data__.has(value);\n }\n\n // Add methods to `SetCache`.\n SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\n SetCache.prototype.has = setCacheHas;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\n function Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n }\n\n /**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\n function stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n }\n\n /**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\n function stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n }\n\n /**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\n function stackGet(key) {\n return this.__data__.get(key);\n }\n\n /**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function stackHas(key) {\n return this.__data__.has(key);\n }\n\n /**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\n function stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n }\n\n // Add methods to `Stack`.\n Stack.prototype.clear = stackClear;\n Stack.prototype['delete'] = stackDelete;\n Stack.prototype.get = stackGet;\n Stack.prototype.has = stackHas;\n Stack.prototype.set = stackSet;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\n function arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n }\n\n /**\n * A specialized version of `_.sample` for arrays.\n *\n * @private\n * @param {Array} array The array to sample.\n * @returns {*} Returns the random element.\n */\n function arraySample(array) {\n var length = array.length;\n return length ? array[baseRandom(0, length - 1)] : undefined;\n }\n\n /**\n * A specialized version of `_.sampleSize` for arrays.\n *\n * @private\n * @param {Array} array The array to sample.\n * @param {number} n The number of elements to sample.\n * @returns {Array} Returns the random elements.\n */\n function arraySampleSize(array, n) {\n return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length));\n }\n\n /**\n * A specialized version of `_.shuffle` for arrays.\n *\n * @private\n * @param {Array} array The array to shuffle.\n * @returns {Array} Returns the new shuffled array.\n */\n function arrayShuffle(array) {\n return shuffleSelf(copyArray(array));\n }\n\n /**\n * This function is like `assignValue` except that it doesn't assign\n * `undefined` values.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\n function assignMergeValue(object, key, value) {\n if ((value !== undefined && !eq(object[key], value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n }\n\n /**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\n function assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n }\n\n /**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n }\n\n /**\n * Aggregates elements of `collection` on `accumulator` with keys transformed\n * by `iteratee` and values set by `setter`.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform keys.\n * @param {Object} accumulator The initial aggregated object.\n * @returns {Function} Returns `accumulator`.\n */\n function baseAggregator(collection, setter, iteratee, accumulator) {\n baseEach(collection, function(value, key, collection) {\n setter(accumulator, value, iteratee(value), collection);\n });\n return accumulator;\n }\n\n /**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\n function baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n }\n\n /**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\n function baseAssignIn(object, source) {\n return object && copyObject(source, keysIn(source), object);\n }\n\n /**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\n function baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n }\n\n /**\n * The base implementation of `_.at` without support for individual paths.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {string[]} paths The property paths to pick.\n * @returns {Array} Returns the picked elements.\n */\n function baseAt(object, paths) {\n var index = -1,\n length = paths.length,\n result = Array(length),\n skip = object == null;\n\n while (++index < length) {\n result[index] = skip ? undefined : get(object, paths[index]);\n }\n return result;\n }\n\n /**\n * The base implementation of `_.clamp` which doesn't coerce arguments.\n *\n * @private\n * @param {number} number The number to clamp.\n * @param {number} [lower] The lower bound.\n * @param {number} upper The upper bound.\n * @returns {number} Returns the clamped number.\n */\n function baseClamp(number, lower, upper) {\n if (number === number) {\n if (upper !== undefined) {\n number = number <= upper ? number : upper;\n }\n if (lower !== undefined) {\n number = number >= lower ? number : lower;\n }\n }\n return number;\n }\n\n /**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\n function baseClone(value, bitmask, customizer, key, object, stack) {\n var result,\n isDeep = bitmask & CLONE_DEEP_FLAG,\n isFlat = bitmask & CLONE_FLAT_FLAG,\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\n if (!isDeep) {\n return isFlat\n ? copySymbolsIn(value, baseAssignIn(result, value))\n : copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, baseClone, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n var keysFunc = isFull\n ? (isFlat ? getAllKeysIn : getAllKeys)\n : (isFlat ? keysIn : keys);\n\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n }\n\n /**\n * The base implementation of `_.conforms` which doesn't clone `source`.\n *\n * @private\n * @param {Object} source The object of property predicates to conform to.\n * @returns {Function} Returns the new spec function.\n */\n function baseConforms(source) {\n var props = keys(source);\n return function(object) {\n return baseConformsTo(object, source, props);\n };\n }\n\n /**\n * The base implementation of `_.conformsTo` which accepts `props` to check.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property predicates to conform to.\n * @returns {boolean} Returns `true` if `object` conforms, else `false`.\n */\n function baseConformsTo(object, source, props) {\n var length = props.length;\n if (object == null) {\n return !length;\n }\n object = Object(object);\n while (length--) {\n var key = props[length],\n predicate = source[key],\n value = object[key];\n\n if ((value === undefined && !(key in object)) || !predicate(value)) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * The base implementation of `_.delay` and `_.defer` which accepts `args`\n * to provide to `func`.\n *\n * @private\n * @param {Function} func The function to delay.\n * @param {number} wait The number of milliseconds to delay invocation.\n * @param {Array} args The arguments to provide to `func`.\n * @returns {number|Object} Returns the timer id or timeout object.\n */\n function baseDelay(func, wait, args) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n return setTimeout(function() { func.apply(undefined, args); }, wait);\n }\n\n /**\n * The base implementation of methods like `_.difference` without support\n * for excluding multiple arrays or iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Array} values The values to exclude.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n */\n function baseDifference(array, values, iteratee, comparator) {\n var index = -1,\n includes = arrayIncludes,\n isCommon = true,\n length = array.length,\n result = [],\n valuesLength = values.length;\n\n if (!length) {\n return result;\n }\n if (iteratee) {\n values = arrayMap(values, baseUnary(iteratee));\n }\n if (comparator) {\n includes = arrayIncludesWith;\n isCommon = false;\n }\n else if (values.length >= LARGE_ARRAY_SIZE) {\n includes = cacheHas;\n isCommon = false;\n values = new SetCache(values);\n }\n outer:\n while (++index < length) {\n var value = array[index],\n computed = iteratee == null ? value : iteratee(value);\n\n value = (comparator || value !== 0) ? value : 0;\n if (isCommon && computed === computed) {\n var valuesIndex = valuesLength;\n while (valuesIndex--) {\n if (values[valuesIndex] === computed) {\n continue outer;\n }\n }\n result.push(value);\n }\n else if (!includes(values, computed, comparator)) {\n result.push(value);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.forEach` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n */\n var baseEach = createBaseEach(baseForOwn);\n\n /**\n * The base implementation of `_.forEachRight` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n */\n var baseEachRight = createBaseEach(baseForOwnRight, true);\n\n /**\n * The base implementation of `_.every` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\n * else `false`\n */\n function baseEvery(collection, predicate) {\n var result = true;\n baseEach(collection, function(value, index, collection) {\n result = !!predicate(value, index, collection);\n return result;\n });\n return result;\n }\n\n /**\n * The base implementation of methods like `_.max` and `_.min` which accepts a\n * `comparator` to determine the extremum value.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The iteratee invoked per iteration.\n * @param {Function} comparator The comparator used to compare values.\n * @returns {*} Returns the extremum value.\n */\n function baseExtremum(array, iteratee, comparator) {\n var index = -1,\n length = array.length;\n\n while (++index < length) {\n var value = array[index],\n current = iteratee(value);\n\n if (current != null && (computed === undefined\n ? (current === current && !isSymbol(current))\n : comparator(current, computed)\n )) {\n var computed = current,\n result = value;\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.fill` without an iteratee call guard.\n *\n * @private\n * @param {Array} array The array to fill.\n * @param {*} value The value to fill `array` with.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns `array`.\n */\n function baseFill(array, value, start, end) {\n var length = array.length;\n\n start = toInteger(start);\n if (start < 0) {\n start = -start > length ? 0 : (length + start);\n }\n end = (end === undefined || end > length) ? length : toInteger(end);\n if (end < 0) {\n end += length;\n }\n end = start > end ? 0 : toLength(end);\n while (start < end) {\n array[start++] = value;\n }\n return array;\n }\n\n /**\n * The base implementation of `_.filter` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\n function baseFilter(collection, predicate) {\n var result = [];\n baseEach(collection, function(value, index, collection) {\n if (predicate(value, index, collection)) {\n result.push(value);\n }\n });\n return result;\n }\n\n /**\n * The base implementation of `_.flatten` with support for restricting flattening.\n *\n * @private\n * @param {Array} array The array to flatten.\n * @param {number} depth The maximum recursion depth.\n * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.\n * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.\n * @param {Array} [result=[]] The initial result value.\n * @returns {Array} Returns the new flattened array.\n */\n function baseFlatten(array, depth, predicate, isStrict, result) {\n var index = -1,\n length = array.length;\n\n predicate || (predicate = isFlattenable);\n result || (result = []);\n\n while (++index < length) {\n var value = array[index];\n if (depth > 0 && predicate(value)) {\n if (depth > 1) {\n // Recursively flatten arrays (susceptible to call stack limits).\n baseFlatten(value, depth - 1, predicate, isStrict, result);\n } else {\n arrayPush(result, value);\n }\n } else if (!isStrict) {\n result[result.length] = value;\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `baseForOwn` which iterates over `object`\n * properties returned by `keysFunc` and invokes `iteratee` for each property.\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\n var baseFor = createBaseFor();\n\n /**\n * This function is like `baseFor` except that it iterates over properties\n * in the opposite order.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\n var baseForRight = createBaseFor(true);\n\n /**\n * The base implementation of `_.forOwn` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\n function baseForOwn(object, iteratee) {\n return object && baseFor(object, iteratee, keys);\n }\n\n /**\n * The base implementation of `_.forOwnRight` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\n function baseForOwnRight(object, iteratee) {\n return object && baseForRight(object, iteratee, keys);\n }\n\n /**\n * The base implementation of `_.functions` which creates an array of\n * `object` function property names filtered from `props`.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Array} props The property names to filter.\n * @returns {Array} Returns the function names.\n */\n function baseFunctions(object, props) {\n return arrayFilter(props, function(key) {\n return isFunction(object[key]);\n });\n }\n\n /**\n * The base implementation of `_.get` without support for default values.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @returns {*} Returns the resolved value.\n */\n function baseGet(object, path) {\n path = castPath(path, object);\n\n var index = 0,\n length = path.length;\n\n while (object != null && index < length) {\n object = object[toKey(path[index++])];\n }\n return (index && index == length) ? object : undefined;\n }\n\n /**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\n function baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n }\n\n /**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\n function baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n }\n\n /**\n * The base implementation of `_.gt` which doesn't coerce arguments.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is greater than `other`,\n * else `false`.\n */\n function baseGt(value, other) {\n return value > other;\n }\n\n /**\n * The base implementation of `_.has` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\n function baseHas(object, key) {\n return object != null && hasOwnProperty.call(object, key);\n }\n\n /**\n * The base implementation of `_.hasIn` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\n function baseHasIn(object, key) {\n return object != null && key in Object(object);\n }\n\n /**\n * The base implementation of `_.inRange` which doesn't coerce arguments.\n *\n * @private\n * @param {number} number The number to check.\n * @param {number} start The start of the range.\n * @param {number} end The end of the range.\n * @returns {boolean} Returns `true` if `number` is in the range, else `false`.\n */\n function baseInRange(number, start, end) {\n return number >= nativeMin(start, end) && number < nativeMax(start, end);\n }\n\n /**\n * The base implementation of methods like `_.intersection`, without support\n * for iteratee shorthands, that accepts an array of arrays to inspect.\n *\n * @private\n * @param {Array} arrays The arrays to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of shared values.\n */\n function baseIntersection(arrays, iteratee, comparator) {\n var includes = comparator ? arrayIncludesWith : arrayIncludes,\n length = arrays[0].length,\n othLength = arrays.length,\n othIndex = othLength,\n caches = Array(othLength),\n maxLength = Infinity,\n result = [];\n\n while (othIndex--) {\n var array = arrays[othIndex];\n if (othIndex && iteratee) {\n array = arrayMap(array, baseUnary(iteratee));\n }\n maxLength = nativeMin(array.length, maxLength);\n caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))\n ? new SetCache(othIndex && array)\n : undefined;\n }\n array = arrays[0];\n\n var index = -1,\n seen = caches[0];\n\n outer:\n while (++index < length && result.length < maxLength) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n value = (comparator || value !== 0) ? value : 0;\n if (!(seen\n ? cacheHas(seen, computed)\n : includes(result, computed, comparator)\n )) {\n othIndex = othLength;\n while (--othIndex) {\n var cache = caches[othIndex];\n if (!(cache\n ? cacheHas(cache, computed)\n : includes(arrays[othIndex], computed, comparator))\n ) {\n continue outer;\n }\n }\n if (seen) {\n seen.push(computed);\n }\n result.push(value);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.invert` and `_.invertBy` which inverts\n * `object` with values transformed by `iteratee` and set by `setter`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform values.\n * @param {Object} accumulator The initial inverted object.\n * @returns {Function} Returns `accumulator`.\n */\n function baseInverter(object, setter, iteratee, accumulator) {\n baseForOwn(object, function(value, key, object) {\n setter(accumulator, iteratee(value), key, object);\n });\n return accumulator;\n }\n\n /**\n * The base implementation of `_.invoke` without support for individual\n * method arguments.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the method to invoke.\n * @param {Array} args The arguments to invoke the method with.\n * @returns {*} Returns the result of the invoked method.\n */\n function baseInvoke(object, path, args) {\n path = castPath(path, object);\n object = parent(object, path);\n var func = object == null ? object : object[toKey(last(path))];\n return func == null ? undefined : apply(func, object, args);\n }\n\n /**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\n function baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n }\n\n /**\n * The base implementation of `_.isArrayBuffer` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.\n */\n function baseIsArrayBuffer(value) {\n return isObjectLike(value) && baseGetTag(value) == arrayBufferTag;\n }\n\n /**\n * The base implementation of `_.isDate` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a date object, else `false`.\n */\n function baseIsDate(value) {\n return isObjectLike(value) && baseGetTag(value) == dateTag;\n }\n\n /**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\n function baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n }\n\n /**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\n function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n }\n\n /**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\n function baseIsMap(value) {\n return isObjectLike(value) && getTag(value) == mapTag;\n }\n\n /**\n * The base implementation of `_.isMatch` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @param {Array} matchData The property names, values, and compare flags to match.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n */\n function baseIsMatch(object, source, matchData, customizer) {\n var index = matchData.length,\n length = index,\n noCustomizer = !customizer;\n\n if (object == null) {\n return !length;\n }\n object = Object(object);\n while (index--) {\n var data = matchData[index];\n if ((noCustomizer && data[2])\n ? data[1] !== object[data[0]]\n : !(data[0] in object)\n ) {\n return false;\n }\n }\n while (++index < length) {\n data = matchData[index];\n var key = data[0],\n objValue = object[key],\n srcValue = data[1];\n\n if (noCustomizer && data[2]) {\n if (objValue === undefined && !(key in object)) {\n return false;\n }\n } else {\n var stack = new Stack;\n if (customizer) {\n var result = customizer(objValue, srcValue, key, object, source, stack);\n }\n if (!(result === undefined\n ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)\n : result\n )) {\n return false;\n }\n }\n }\n return true;\n }\n\n /**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\n function baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n }\n\n /**\n * The base implementation of `_.isRegExp` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.\n */\n function baseIsRegExp(value) {\n return isObjectLike(value) && baseGetTag(value) == regexpTag;\n }\n\n /**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\n function baseIsSet(value) {\n return isObjectLike(value) && getTag(value) == setTag;\n }\n\n /**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\n function baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n }\n\n /**\n * The base implementation of `_.iteratee`.\n *\n * @private\n * @param {*} [value=_.identity] The value to convert to an iteratee.\n * @returns {Function} Returns the iteratee.\n */\n function baseIteratee(value) {\n // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.\n // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.\n if (typeof value == 'function') {\n return value;\n }\n if (value == null) {\n return identity;\n }\n if (typeof value == 'object') {\n return isArray(value)\n ? baseMatchesProperty(value[0], value[1])\n : baseMatches(value);\n }\n return property(value);\n }\n\n /**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\n function baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\n function baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.lt` which doesn't coerce arguments.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is less than `other`,\n * else `false`.\n */\n function baseLt(value, other) {\n return value < other;\n }\n\n /**\n * The base implementation of `_.map` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\n function baseMap(collection, iteratee) {\n var index = -1,\n result = isArrayLike(collection) ? Array(collection.length) : [];\n\n baseEach(collection, function(value, key, collection) {\n result[++index] = iteratee(value, key, collection);\n });\n return result;\n }\n\n /**\n * The base implementation of `_.matches` which doesn't clone `source`.\n *\n * @private\n * @param {Object} source The object of property values to match.\n * @returns {Function} Returns the new spec function.\n */\n function baseMatches(source) {\n var matchData = getMatchData(source);\n if (matchData.length == 1 && matchData[0][2]) {\n return matchesStrictComparable(matchData[0][0], matchData[0][1]);\n }\n return function(object) {\n return object === source || baseIsMatch(object, source, matchData);\n };\n }\n\n /**\n * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.\n *\n * @private\n * @param {string} path The path of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\n function baseMatchesProperty(path, srcValue) {\n if (isKey(path) && isStrictComparable(srcValue)) {\n return matchesStrictComparable(toKey(path), srcValue);\n }\n return function(object) {\n var objValue = get(object, path);\n return (objValue === undefined && objValue === srcValue)\n ? hasIn(object, path)\n : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);\n };\n }\n\n /**\n * The base implementation of `_.merge` without support for multiple sources.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} [customizer] The function to customize merged values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\n function baseMerge(object, source, srcIndex, customizer, stack) {\n if (object === source) {\n return;\n }\n baseFor(source, function(srcValue, key) {\n if (isObject(srcValue)) {\n stack || (stack = new Stack);\n baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);\n }\n else {\n var newValue = customizer\n ? customizer(object[key], srcValue, (key + ''), object, source, stack)\n : undefined;\n\n if (newValue === undefined) {\n newValue = srcValue;\n }\n assignMergeValue(object, key, newValue);\n }\n }, keysIn);\n }\n\n /**\n * A specialized version of `baseMerge` for arrays and objects which performs\n * deep merges and tracks traversed objects enabling objects with circular\n * references to be merged.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {string} key The key of the value to merge.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} mergeFunc The function to merge values.\n * @param {Function} [customizer] The function to customize assigned values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\n function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {\n var objValue = object[key],\n srcValue = source[key],\n stacked = stack.get(srcValue);\n\n if (stacked) {\n assignMergeValue(object, key, stacked);\n return;\n }\n var newValue = customizer\n ? customizer(objValue, srcValue, (key + ''), object, source, stack)\n : undefined;\n\n var isCommon = newValue === undefined;\n\n if (isCommon) {\n var isArr = isArray(srcValue),\n isBuff = !isArr && isBuffer(srcValue),\n isTyped = !isArr && !isBuff && isTypedArray(srcValue);\n\n newValue = srcValue;\n if (isArr || isBuff || isTyped) {\n if (isArray(objValue)) {\n newValue = objValue;\n }\n else if (isArrayLikeObject(objValue)) {\n newValue = copyArray(objValue);\n }\n else if (isBuff) {\n isCommon = false;\n newValue = cloneBuffer(srcValue, true);\n }\n else if (isTyped) {\n isCommon = false;\n newValue = cloneTypedArray(srcValue, true);\n }\n else {\n newValue = [];\n }\n }\n else if (isPlainObject(srcValue) || isArguments(srcValue)) {\n newValue = objValue;\n if (isArguments(objValue)) {\n newValue = toPlainObject(objValue);\n }\n else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) {\n newValue = initCloneObject(srcValue);\n }\n }\n else {\n isCommon = false;\n }\n }\n if (isCommon) {\n // Recursively merge objects and arrays (susceptible to call stack limits).\n stack.set(srcValue, newValue);\n mergeFunc(newValue, srcValue, srcIndex, customizer, stack);\n stack['delete'](srcValue);\n }\n assignMergeValue(object, key, newValue);\n }\n\n /**\n * The base implementation of `_.nth` which doesn't coerce arguments.\n *\n * @private\n * @param {Array} array The array to query.\n * @param {number} n The index of the element to return.\n * @returns {*} Returns the nth element of `array`.\n */\n function baseNth(array, n) {\n var length = array.length;\n if (!length) {\n return;\n }\n n += n < 0 ? length : 0;\n return isIndex(n, length) ? array[n] : undefined;\n }\n\n /**\n * The base implementation of `_.orderBy` without param guards.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.\n * @param {string[]} orders The sort orders of `iteratees`.\n * @returns {Array} Returns the new sorted array.\n */\n function baseOrderBy(collection, iteratees, orders) {\n var index = -1;\n iteratees = arrayMap(iteratees.length ? iteratees : [identity], baseUnary(getIteratee()));\n\n var result = baseMap(collection, function(value, key, collection) {\n var criteria = arrayMap(iteratees, function(iteratee) {\n return iteratee(value);\n });\n return { 'criteria': criteria, 'index': ++index, 'value': value };\n });\n\n return baseSortBy(result, function(object, other) {\n return compareMultiple(object, other, orders);\n });\n }\n\n /**\n * The base implementation of `_.pick` without support for individual\n * property identifiers.\n *\n * @private\n * @param {Object} object The source object.\n * @param {string[]} paths The property paths to pick.\n * @returns {Object} Returns the new object.\n */\n function basePick(object, paths) {\n return basePickBy(object, paths, function(value, path) {\n return hasIn(object, path);\n });\n }\n\n /**\n * The base implementation of `_.pickBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The source object.\n * @param {string[]} paths The property paths to pick.\n * @param {Function} predicate The function invoked per property.\n * @returns {Object} Returns the new object.\n */\n function basePickBy(object, paths, predicate) {\n var index = -1,\n length = paths.length,\n result = {};\n\n while (++index < length) {\n var path = paths[index],\n value = baseGet(object, path);\n\n if (predicate(value, path)) {\n baseSet(result, castPath(path, object), value);\n }\n }\n return result;\n }\n\n /**\n * A specialized version of `baseProperty` which supports deep paths.\n *\n * @private\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\n function basePropertyDeep(path) {\n return function(object) {\n return baseGet(object, path);\n };\n }\n\n /**\n * The base implementation of `_.pullAllBy` without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to remove.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns `array`.\n */\n function basePullAll(array, values, iteratee, comparator) {\n var indexOf = comparator ? baseIndexOfWith : baseIndexOf,\n index = -1,\n length = values.length,\n seen = array;\n\n if (array === values) {\n values = copyArray(values);\n }\n if (iteratee) {\n seen = arrayMap(array, baseUnary(iteratee));\n }\n while (++index < length) {\n var fromIndex = 0,\n value = values[index],\n computed = iteratee ? iteratee(value) : value;\n\n while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) {\n if (seen !== array) {\n splice.call(seen, fromIndex, 1);\n }\n splice.call(array, fromIndex, 1);\n }\n }\n return array;\n }\n\n /**\n * The base implementation of `_.pullAt` without support for individual\n * indexes or capturing the removed elements.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {number[]} indexes The indexes of elements to remove.\n * @returns {Array} Returns `array`.\n */\n function basePullAt(array, indexes) {\n var length = array ? indexes.length : 0,\n lastIndex = length - 1;\n\n while (length--) {\n var index = indexes[length];\n if (length == lastIndex || index !== previous) {\n var previous = index;\n if (isIndex(index)) {\n splice.call(array, index, 1);\n } else {\n baseUnset(array, index);\n }\n }\n }\n return array;\n }\n\n /**\n * The base implementation of `_.random` without support for returning\n * floating-point numbers.\n *\n * @private\n * @param {number} lower The lower bound.\n * @param {number} upper The upper bound.\n * @returns {number} Returns the random number.\n */\n function baseRandom(lower, upper) {\n return lower + nativeFloor(nativeRandom() * (upper - lower + 1));\n }\n\n /**\n * The base implementation of `_.range` and `_.rangeRight` which doesn't\n * coerce arguments.\n *\n * @private\n * @param {number} start The start of the range.\n * @param {number} end The end of the range.\n * @param {number} step The value to increment or decrement by.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Array} Returns the range of numbers.\n */\n function baseRange(start, end, step, fromRight) {\n var index = -1,\n length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),\n result = Array(length);\n\n while (length--) {\n result[fromRight ? length : ++index] = start;\n start += step;\n }\n return result;\n }\n\n /**\n * The base implementation of `_.repeat` which doesn't coerce arguments.\n *\n * @private\n * @param {string} string The string to repeat.\n * @param {number} n The number of times to repeat the string.\n * @returns {string} Returns the repeated string.\n */\n function baseRepeat(string, n) {\n var result = '';\n if (!string || n < 1 || n > MAX_SAFE_INTEGER) {\n return result;\n }\n // Leverage the exponentiation by squaring algorithm for a faster repeat.\n // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details.\n do {\n if (n % 2) {\n result += string;\n }\n n = nativeFloor(n / 2);\n if (n) {\n string += string;\n }\n } while (n);\n\n return result;\n }\n\n /**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\n function baseRest(func, start) {\n return setToString(overRest(func, start, identity), func + '');\n }\n\n /**\n * The base implementation of `_.sample`.\n *\n * @private\n * @param {Array|Object} collection The collection to sample.\n * @returns {*} Returns the random element.\n */\n function baseSample(collection) {\n return arraySample(values(collection));\n }\n\n /**\n * The base implementation of `_.sampleSize` without param guards.\n *\n * @private\n * @param {Array|Object} collection The collection to sample.\n * @param {number} n The number of elements to sample.\n * @returns {Array} Returns the random elements.\n */\n function baseSampleSize(collection, n) {\n var array = values(collection);\n return shuffleSelf(array, baseClamp(n, 0, array.length));\n }\n\n /**\n * The base implementation of `_.set`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @param {Function} [customizer] The function to customize path creation.\n * @returns {Object} Returns `object`.\n */\n function baseSet(object, path, value, customizer) {\n if (!isObject(object)) {\n return object;\n }\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n lastIndex = length - 1,\n nested = object;\n\n while (nested != null && ++index < length) {\n var key = toKey(path[index]),\n newValue = value;\n\n if (index != lastIndex) {\n var objValue = nested[key];\n newValue = customizer ? customizer(objValue, key, nested) : undefined;\n if (newValue === undefined) {\n newValue = isObject(objValue)\n ? objValue\n : (isIndex(path[index + 1]) ? [] : {});\n }\n }\n assignValue(nested, key, newValue);\n nested = nested[key];\n }\n return object;\n }\n\n /**\n * The base implementation of `setData` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to associate metadata with.\n * @param {*} data The metadata.\n * @returns {Function} Returns `func`.\n */\n var baseSetData = !metaMap ? identity : function(func, data) {\n metaMap.set(func, data);\n return func;\n };\n\n /**\n * The base implementation of `setToString` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\n var baseSetToString = !defineProperty ? identity : function(func, string) {\n return defineProperty(func, 'toString', {\n 'configurable': true,\n 'enumerable': false,\n 'value': constant(string),\n 'writable': true\n });\n };\n\n /**\n * The base implementation of `_.shuffle`.\n *\n * @private\n * @param {Array|Object} collection The collection to shuffle.\n * @returns {Array} Returns the new shuffled array.\n */\n function baseShuffle(collection) {\n return shuffleSelf(values(collection));\n }\n\n /**\n * The base implementation of `_.slice` without an iteratee call guard.\n *\n * @private\n * @param {Array} array The array to slice.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the slice of `array`.\n */\n function baseSlice(array, start, end) {\n var index = -1,\n length = array.length;\n\n if (start < 0) {\n start = -start > length ? 0 : (length + start);\n }\n end = end > length ? length : end;\n if (end < 0) {\n end += length;\n }\n length = start > end ? 0 : ((end - start) >>> 0);\n start >>>= 0;\n\n var result = Array(length);\n while (++index < length) {\n result[index] = array[index + start];\n }\n return result;\n }\n\n /**\n * The base implementation of `_.some` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\n function baseSome(collection, predicate) {\n var result;\n\n baseEach(collection, function(value, index, collection) {\n result = predicate(value, index, collection);\n return !result;\n });\n return !!result;\n }\n\n /**\n * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which\n * performs a binary search of `array` to determine the index at which `value`\n * should be inserted into `array` in order to maintain its sort order.\n *\n * @private\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {boolean} [retHighest] Specify returning the highest qualified index.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n */\n function baseSortedIndex(array, value, retHighest) {\n var low = 0,\n high = array == null ? low : array.length;\n\n if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) {\n while (low < high) {\n var mid = (low + high) >>> 1,\n computed = array[mid];\n\n if (computed !== null && !isSymbol(computed) &&\n (retHighest ? (computed <= value) : (computed < value))) {\n low = mid + 1;\n } else {\n high = mid;\n }\n }\n return high;\n }\n return baseSortedIndexBy(array, value, identity, retHighest);\n }\n\n /**\n * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy`\n * which invokes `iteratee` for `value` and each element of `array` to compute\n * their sort ranking. The iteratee is invoked with one argument; (value).\n *\n * @private\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {Function} iteratee The iteratee invoked per element.\n * @param {boolean} [retHighest] Specify returning the highest qualified index.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n */\n function baseSortedIndexBy(array, value, iteratee, retHighest) {\n value = iteratee(value);\n\n var low = 0,\n high = array == null ? 0 : array.length,\n valIsNaN = value !== value,\n valIsNull = value === null,\n valIsSymbol = isSymbol(value),\n valIsUndefined = value === undefined;\n\n while (low < high) {\n var mid = nativeFloor((low + high) / 2),\n computed = iteratee(array[mid]),\n othIsDefined = computed !== undefined,\n othIsNull = computed === null,\n othIsReflexive = computed === computed,\n othIsSymbol = isSymbol(computed);\n\n if (valIsNaN) {\n var setLow = retHighest || othIsReflexive;\n } else if (valIsUndefined) {\n setLow = othIsReflexive && (retHighest || othIsDefined);\n } else if (valIsNull) {\n setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull);\n } else if (valIsSymbol) {\n setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol);\n } else if (othIsNull || othIsSymbol) {\n setLow = false;\n } else {\n setLow = retHighest ? (computed <= value) : (computed < value);\n }\n if (setLow) {\n low = mid + 1;\n } else {\n high = mid;\n }\n }\n return nativeMin(high, MAX_ARRAY_INDEX);\n }\n\n /**\n * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without\n * support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n */\n function baseSortedUniq(array, iteratee) {\n var index = -1,\n length = array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n if (!index || !eq(computed, seen)) {\n var seen = computed;\n result[resIndex++] = value === 0 ? 0 : value;\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.toNumber` which doesn't ensure correct\n * conversions of binary, hexadecimal, or octal string values.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n */\n function baseToNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n return +value;\n }\n\n /**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\n function baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n if (isArray(value)) {\n // Recursively convert values (susceptible to call stack limits).\n return arrayMap(value, baseToString) + '';\n }\n if (isSymbol(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n }\n\n /**\n * The base implementation of `_.uniqBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n */\n function baseUniq(array, iteratee, comparator) {\n var index = -1,\n includes = arrayIncludes,\n length = array.length,\n isCommon = true,\n result = [],\n seen = result;\n\n if (comparator) {\n isCommon = false;\n includes = arrayIncludesWith;\n }\n else if (length >= LARGE_ARRAY_SIZE) {\n var set = iteratee ? null : createSet(array);\n if (set) {\n return setToArray(set);\n }\n isCommon = false;\n includes = cacheHas;\n seen = new SetCache;\n }\n else {\n seen = iteratee ? [] : result;\n }\n outer:\n while (++index < length) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n value = (comparator || value !== 0) ? value : 0;\n if (isCommon && computed === computed) {\n var seenIndex = seen.length;\n while (seenIndex--) {\n if (seen[seenIndex] === computed) {\n continue outer;\n }\n }\n if (iteratee) {\n seen.push(computed);\n }\n result.push(value);\n }\n else if (!includes(seen, computed, comparator)) {\n if (seen !== result) {\n seen.push(computed);\n }\n result.push(value);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.unset`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The property path to unset.\n * @returns {boolean} Returns `true` if the property is deleted, else `false`.\n */\n function baseUnset(object, path) {\n path = castPath(path, object);\n object = parent(object, path);\n return object == null || delete object[toKey(last(path))];\n }\n\n /**\n * The base implementation of `_.update`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to update.\n * @param {Function} updater The function to produce the updated value.\n * @param {Function} [customizer] The function to customize path creation.\n * @returns {Object} Returns `object`.\n */\n function baseUpdate(object, path, updater, customizer) {\n return baseSet(object, path, updater(baseGet(object, path)), customizer);\n }\n\n /**\n * The base implementation of methods like `_.dropWhile` and `_.takeWhile`\n * without support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to query.\n * @param {Function} predicate The function invoked per iteration.\n * @param {boolean} [isDrop] Specify dropping elements instead of taking them.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Array} Returns the slice of `array`.\n */\n function baseWhile(array, predicate, isDrop, fromRight) {\n var length = array.length,\n index = fromRight ? length : -1;\n\n while ((fromRight ? index-- : ++index < length) &&\n predicate(array[index], index, array)) {}\n\n return isDrop\n ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length))\n : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index));\n }\n\n /**\n * The base implementation of `wrapperValue` which returns the result of\n * performing a sequence of actions on the unwrapped `value`, where each\n * successive action is supplied the return value of the previous.\n *\n * @private\n * @param {*} value The unwrapped value.\n * @param {Array} actions Actions to perform to resolve the unwrapped value.\n * @returns {*} Returns the resolved value.\n */\n function baseWrapperValue(value, actions) {\n var result = value;\n if (result instanceof LazyWrapper) {\n result = result.value();\n }\n return arrayReduce(actions, function(result, action) {\n return action.func.apply(action.thisArg, arrayPush([result], action.args));\n }, result);\n }\n\n /**\n * The base implementation of methods like `_.xor`, without support for\n * iteratee shorthands, that accepts an array of arrays to inspect.\n *\n * @private\n * @param {Array} arrays The arrays to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of values.\n */\n function baseXor(arrays, iteratee, comparator) {\n var length = arrays.length;\n if (length < 2) {\n return length ? baseUniq(arrays[0]) : [];\n }\n var index = -1,\n result = Array(length);\n\n while (++index < length) {\n var array = arrays[index],\n othIndex = -1;\n\n while (++othIndex < length) {\n if (othIndex != index) {\n result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator);\n }\n }\n }\n return baseUniq(baseFlatten(result, 1), iteratee, comparator);\n }\n\n /**\n * This base implementation of `_.zipObject` which assigns values using `assignFunc`.\n *\n * @private\n * @param {Array} props The property identifiers.\n * @param {Array} values The property values.\n * @param {Function} assignFunc The function to assign values.\n * @returns {Object} Returns the new object.\n */\n function baseZipObject(props, values, assignFunc) {\n var index = -1,\n length = props.length,\n valsLength = values.length,\n result = {};\n\n while (++index < length) {\n var value = index < valsLength ? values[index] : undefined;\n assignFunc(result, props[index], value);\n }\n return result;\n }\n\n /**\n * Casts `value` to an empty array if it's not an array like object.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {Array|Object} Returns the cast array-like object.\n */\n function castArrayLikeObject(value) {\n return isArrayLikeObject(value) ? value : [];\n }\n\n /**\n * Casts `value` to `identity` if it's not a function.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {Function} Returns cast function.\n */\n function castFunction(value) {\n return typeof value == 'function' ? value : identity;\n }\n\n /**\n * Casts `value` to a path array if it's not one.\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {Object} [object] The object to query keys on.\n * @returns {Array} Returns the cast property path array.\n */\n function castPath(value, object) {\n if (isArray(value)) {\n return value;\n }\n return isKey(value, object) ? [value] : stringToPath(toString(value));\n }\n\n /**\n * A `baseRest` alias which can be replaced with `identity` by module\n * replacement plugins.\n *\n * @private\n * @type {Function}\n * @param {Function} func The function to apply a rest parameter to.\n * @returns {Function} Returns the new function.\n */\n var castRest = baseRest;\n\n /**\n * Casts `array` to a slice if it's needed.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {number} start The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the cast slice.\n */\n function castSlice(array, start, end) {\n var length = array.length;\n end = end === undefined ? length : end;\n return (!start && end >= length) ? array : baseSlice(array, start, end);\n }\n\n /**\n * A simple wrapper around the global [`clearTimeout`](https://mdn.io/clearTimeout).\n *\n * @private\n * @param {number|Object} id The timer id or timeout object of the timer to clear.\n */\n var clearTimeout = ctxClearTimeout || function(id) {\n return root.clearTimeout(id);\n };\n\n /**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\n function cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n }\n\n /**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\n function cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n }\n\n /**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\n function cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n }\n\n /**\n * Creates a clone of `map`.\n *\n * @private\n * @param {Object} map The map to clone.\n * @param {Function} cloneFunc The function to clone values.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned map.\n */\n function cloneMap(map, isDeep, cloneFunc) {\n var array = isDeep ? cloneFunc(mapToArray(map), CLONE_DEEP_FLAG) : mapToArray(map);\n return arrayReduce(array, addMapEntry, new map.constructor);\n }\n\n /**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\n function cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n }\n\n /**\n * Creates a clone of `set`.\n *\n * @private\n * @param {Object} set The set to clone.\n * @param {Function} cloneFunc The function to clone values.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned set.\n */\n function cloneSet(set, isDeep, cloneFunc) {\n var array = isDeep ? cloneFunc(setToArray(set), CLONE_DEEP_FLAG) : setToArray(set);\n return arrayReduce(array, addSetEntry, new set.constructor);\n }\n\n /**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\n function cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n }\n\n /**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\n function cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n }\n\n /**\n * Compares values to sort them in ascending order.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {number} Returns the sort order indicator for `value`.\n */\n function compareAscending(value, other) {\n if (value !== other) {\n var valIsDefined = value !== undefined,\n valIsNull = value === null,\n valIsReflexive = value === value,\n valIsSymbol = isSymbol(value);\n\n var othIsDefined = other !== undefined,\n othIsNull = other === null,\n othIsReflexive = other === other,\n othIsSymbol = isSymbol(other);\n\n if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||\n (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||\n (valIsNull && othIsDefined && othIsReflexive) ||\n (!valIsDefined && othIsReflexive) ||\n !valIsReflexive) {\n return 1;\n }\n if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||\n (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||\n (othIsNull && valIsDefined && valIsReflexive) ||\n (!othIsDefined && valIsReflexive) ||\n !othIsReflexive) {\n return -1;\n }\n }\n return 0;\n }\n\n /**\n * Used by `_.orderBy` to compare multiple properties of a value to another\n * and stable sort them.\n *\n * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,\n * specify an order of \"desc\" for descending or \"asc\" for ascending sort order\n * of corresponding values.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {boolean[]|string[]} orders The order to sort by for each property.\n * @returns {number} Returns the sort order indicator for `object`.\n */\n function compareMultiple(object, other, orders) {\n var index = -1,\n objCriteria = object.criteria,\n othCriteria = other.criteria,\n length = objCriteria.length,\n ordersLength = orders.length;\n\n while (++index < length) {\n var result = compareAscending(objCriteria[index], othCriteria[index]);\n if (result) {\n if (index >= ordersLength) {\n return result;\n }\n var order = orders[index];\n return result * (order == 'desc' ? -1 : 1);\n }\n }\n // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications\n // that causes it, under certain circumstances, to provide the same value for\n // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247\n // for more details.\n //\n // This also ensures a stable sort in V8 and other engines.\n // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.\n return object.index - other.index;\n }\n\n /**\n * Creates an array that is the composition of partially applied arguments,\n * placeholders, and provided arguments into a single array of arguments.\n *\n * @private\n * @param {Array} args The provided arguments.\n * @param {Array} partials The arguments to prepend to those provided.\n * @param {Array} holders The `partials` placeholder indexes.\n * @params {boolean} [isCurried] Specify composing for a curried function.\n * @returns {Array} Returns the new array of composed arguments.\n */\n function composeArgs(args, partials, holders, isCurried) {\n var argsIndex = -1,\n argsLength = args.length,\n holdersLength = holders.length,\n leftIndex = -1,\n leftLength = partials.length,\n rangeLength = nativeMax(argsLength - holdersLength, 0),\n result = Array(leftLength + rangeLength),\n isUncurried = !isCurried;\n\n while (++leftIndex < leftLength) {\n result[leftIndex] = partials[leftIndex];\n }\n while (++argsIndex < holdersLength) {\n if (isUncurried || argsIndex < argsLength) {\n result[holders[argsIndex]] = args[argsIndex];\n }\n }\n while (rangeLength--) {\n result[leftIndex++] = args[argsIndex++];\n }\n return result;\n }\n\n /**\n * This function is like `composeArgs` except that the arguments composition\n * is tailored for `_.partialRight`.\n *\n * @private\n * @param {Array} args The provided arguments.\n * @param {Array} partials The arguments to append to those provided.\n * @param {Array} holders The `partials` placeholder indexes.\n * @params {boolean} [isCurried] Specify composing for a curried function.\n * @returns {Array} Returns the new array of composed arguments.\n */\n function composeArgsRight(args, partials, holders, isCurried) {\n var argsIndex = -1,\n argsLength = args.length,\n holdersIndex = -1,\n holdersLength = holders.length,\n rightIndex = -1,\n rightLength = partials.length,\n rangeLength = nativeMax(argsLength - holdersLength, 0),\n result = Array(rangeLength + rightLength),\n isUncurried = !isCurried;\n\n while (++argsIndex < rangeLength) {\n result[argsIndex] = args[argsIndex];\n }\n var offset = argsIndex;\n while (++rightIndex < rightLength) {\n result[offset + rightIndex] = partials[rightIndex];\n }\n while (++holdersIndex < holdersLength) {\n if (isUncurried || argsIndex < argsLength) {\n result[offset + holders[holdersIndex]] = args[argsIndex++];\n }\n }\n return result;\n }\n\n /**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\n function copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n }\n\n /**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\n function copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n }\n\n /**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\n function copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n }\n\n /**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\n function copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n }\n\n /**\n * Creates a function like `_.groupBy`.\n *\n * @private\n * @param {Function} setter The function to set accumulator values.\n * @param {Function} [initializer] The accumulator object initializer.\n * @returns {Function} Returns the new aggregator function.\n */\n function createAggregator(setter, initializer) {\n return function(collection, iteratee) {\n var func = isArray(collection) ? arrayAggregator : baseAggregator,\n accumulator = initializer ? initializer() : {};\n\n return func(collection, setter, getIteratee(iteratee, 2), accumulator);\n };\n }\n\n /**\n * Creates a function like `_.assign`.\n *\n * @private\n * @param {Function} assigner The function to assign values.\n * @returns {Function} Returns the new assigner function.\n */\n function createAssigner(assigner) {\n return baseRest(function(object, sources) {\n var index = -1,\n length = sources.length,\n customizer = length > 1 ? sources[length - 1] : undefined,\n guard = length > 2 ? sources[2] : undefined;\n\n customizer = (assigner.length > 3 && typeof customizer == 'function')\n ? (length--, customizer)\n : undefined;\n\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n customizer = length < 3 ? undefined : customizer;\n length = 1;\n }\n object = Object(object);\n while (++index < length) {\n var source = sources[index];\n if (source) {\n assigner(object, source, index, customizer);\n }\n }\n return object;\n });\n }\n\n /**\n * Creates a `baseEach` or `baseEachRight` function.\n *\n * @private\n * @param {Function} eachFunc The function to iterate over a collection.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\n function createBaseEach(eachFunc, fromRight) {\n return function(collection, iteratee) {\n if (collection == null) {\n return collection;\n }\n if (!isArrayLike(collection)) {\n return eachFunc(collection, iteratee);\n }\n var length = collection.length,\n index = fromRight ? length : -1,\n iterable = Object(collection);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (iteratee(iterable[index], index, iterable) === false) {\n break;\n }\n }\n return collection;\n };\n }\n\n /**\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\n function createBaseFor(fromRight) {\n return function(object, iteratee, keysFunc) {\n var index = -1,\n iterable = Object(object),\n props = keysFunc(object),\n length = props.length;\n\n while (length--) {\n var key = props[fromRight ? length : ++index];\n if (iteratee(iterable[key], key, iterable) === false) {\n break;\n }\n }\n return object;\n };\n }\n\n /**\n * Creates a function that wraps `func` to invoke it with the optional `this`\n * binding of `thisArg`.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {*} [thisArg] The `this` binding of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createBind(func, bitmask, thisArg) {\n var isBind = bitmask & WRAP_BIND_FLAG,\n Ctor = createCtor(func);\n\n function wrapper() {\n var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n return fn.apply(isBind ? thisArg : this, arguments);\n }\n return wrapper;\n }\n\n /**\n * Creates a function like `_.lowerFirst`.\n *\n * @private\n * @param {string} methodName The name of the `String` case method to use.\n * @returns {Function} Returns the new case function.\n */\n function createCaseFirst(methodName) {\n return function(string) {\n string = toString(string);\n\n var strSymbols = hasUnicode(string)\n ? stringToArray(string)\n : undefined;\n\n var chr = strSymbols\n ? strSymbols[0]\n : string.charAt(0);\n\n var trailing = strSymbols\n ? castSlice(strSymbols, 1).join('')\n : string.slice(1);\n\n return chr[methodName]() + trailing;\n };\n }\n\n /**\n * Creates a function like `_.camelCase`.\n *\n * @private\n * @param {Function} callback The function to combine each word.\n * @returns {Function} Returns the new compounder function.\n */\n function createCompounder(callback) {\n return function(string) {\n return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');\n };\n }\n\n /**\n * Creates a function that produces an instance of `Ctor` regardless of\n * whether it was invoked as part of a `new` expression or by `call` or `apply`.\n *\n * @private\n * @param {Function} Ctor The constructor to wrap.\n * @returns {Function} Returns the new wrapped function.\n */\n function createCtor(Ctor) {\n return function() {\n // Use a `switch` statement to work with class constructors. See\n // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist\n // for more details.\n var args = arguments;\n switch (args.length) {\n case 0: return new Ctor;\n case 1: return new Ctor(args[0]);\n case 2: return new Ctor(args[0], args[1]);\n case 3: return new Ctor(args[0], args[1], args[2]);\n case 4: return new Ctor(args[0], args[1], args[2], args[3]);\n case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);\n case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);\n case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);\n }\n var thisBinding = baseCreate(Ctor.prototype),\n result = Ctor.apply(thisBinding, args);\n\n // Mimic the constructor's `return` behavior.\n // See https://es5.github.io/#x13.2.2 for more details.\n return isObject(result) ? result : thisBinding;\n };\n }\n\n /**\n * Creates a function that wraps `func` to enable currying.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {number} arity The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createCurry(func, bitmask, arity) {\n var Ctor = createCtor(func);\n\n function wrapper() {\n var length = arguments.length,\n args = Array(length),\n index = length,\n placeholder = getHolder(wrapper);\n\n while (index--) {\n args[index] = arguments[index];\n }\n var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder)\n ? []\n : replaceHolders(args, placeholder);\n\n length -= holders.length;\n if (length < arity) {\n return createRecurry(\n func, bitmask, createHybrid, wrapper.placeholder, undefined,\n args, holders, undefined, undefined, arity - length);\n }\n var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n return apply(fn, this, args);\n }\n return wrapper;\n }\n\n /**\n * Creates a `_.find` or `_.findLast` function.\n *\n * @private\n * @param {Function} findIndexFunc The function to find the collection index.\n * @returns {Function} Returns the new find function.\n */\n function createFind(findIndexFunc) {\n return function(collection, predicate, fromIndex) {\n var iterable = Object(collection);\n if (!isArrayLike(collection)) {\n var iteratee = getIteratee(predicate, 3);\n collection = keys(collection);\n predicate = function(key) { return iteratee(iterable[key], key, iterable); };\n }\n var index = findIndexFunc(collection, predicate, fromIndex);\n return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;\n };\n }\n\n /**\n * Creates a `_.flow` or `_.flowRight` function.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new flow function.\n */\n function createFlow(fromRight) {\n return flatRest(function(funcs) {\n var length = funcs.length,\n index = length,\n prereq = LodashWrapper.prototype.thru;\n\n if (fromRight) {\n funcs.reverse();\n }\n while (index--) {\n var func = funcs[index];\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n if (prereq && !wrapper && getFuncName(func) == 'wrapper') {\n var wrapper = new LodashWrapper([], true);\n }\n }\n index = wrapper ? index : length;\n while (++index < length) {\n func = funcs[index];\n\n var funcName = getFuncName(func),\n data = funcName == 'wrapper' ? getData(func) : undefined;\n\n if (data && isLaziable(data[0]) &&\n data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) &&\n !data[4].length && data[9] == 1\n ) {\n wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);\n } else {\n wrapper = (func.length == 1 && isLaziable(func))\n ? wrapper[funcName]()\n : wrapper.thru(func);\n }\n }\n return function() {\n var args = arguments,\n value = args[0];\n\n if (wrapper && args.length == 1 && isArray(value)) {\n return wrapper.plant(value).value();\n }\n var index = 0,\n result = length ? funcs[index].apply(this, args) : value;\n\n while (++index < length) {\n result = funcs[index].call(this, result);\n }\n return result;\n };\n });\n }\n\n /**\n * Creates a function that wraps `func` to invoke it with optional `this`\n * binding of `thisArg`, partial application, and currying.\n *\n * @private\n * @param {Function|string} func The function or method name to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {*} [thisArg] The `this` binding of `func`.\n * @param {Array} [partials] The arguments to prepend to those provided to\n * the new function.\n * @param {Array} [holders] The `partials` placeholder indexes.\n * @param {Array} [partialsRight] The arguments to append to those provided\n * to the new function.\n * @param {Array} [holdersRight] The `partialsRight` placeholder indexes.\n * @param {Array} [argPos] The argument positions of the new function.\n * @param {number} [ary] The arity cap of `func`.\n * @param {number} [arity] The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {\n var isAry = bitmask & WRAP_ARY_FLAG,\n isBind = bitmask & WRAP_BIND_FLAG,\n isBindKey = bitmask & WRAP_BIND_KEY_FLAG,\n isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG),\n isFlip = bitmask & WRAP_FLIP_FLAG,\n Ctor = isBindKey ? undefined : createCtor(func);\n\n function wrapper() {\n var length = arguments.length,\n args = Array(length),\n index = length;\n\n while (index--) {\n args[index] = arguments[index];\n }\n if (isCurried) {\n var placeholder = getHolder(wrapper),\n holdersCount = countHolders(args, placeholder);\n }\n if (partials) {\n args = composeArgs(args, partials, holders, isCurried);\n }\n if (partialsRight) {\n args = composeArgsRight(args, partialsRight, holdersRight, isCurried);\n }\n length -= holdersCount;\n if (isCurried && length < arity) {\n var newHolders = replaceHolders(args, placeholder);\n return createRecurry(\n func, bitmask, createHybrid, wrapper.placeholder, thisArg,\n args, newHolders, argPos, ary, arity - length\n );\n }\n var thisBinding = isBind ? thisArg : this,\n fn = isBindKey ? thisBinding[func] : func;\n\n length = args.length;\n if (argPos) {\n args = reorder(args, argPos);\n } else if (isFlip && length > 1) {\n args.reverse();\n }\n if (isAry && ary < length) {\n args.length = ary;\n }\n if (this && this !== root && this instanceof wrapper) {\n fn = Ctor || createCtor(fn);\n }\n return fn.apply(thisBinding, args);\n }\n return wrapper;\n }\n\n /**\n * Creates a function like `_.invertBy`.\n *\n * @private\n * @param {Function} setter The function to set accumulator values.\n * @param {Function} toIteratee The function to resolve iteratees.\n * @returns {Function} Returns the new inverter function.\n */\n function createInverter(setter, toIteratee) {\n return function(object, iteratee) {\n return baseInverter(object, setter, toIteratee(iteratee), {});\n };\n }\n\n /**\n * Creates a function that performs a mathematical operation on two values.\n *\n * @private\n * @param {Function} operator The function to perform the operation.\n * @param {number} [defaultValue] The value used for `undefined` arguments.\n * @returns {Function} Returns the new mathematical operation function.\n */\n function createMathOperation(operator, defaultValue) {\n return function(value, other) {\n var result;\n if (value === undefined && other === undefined) {\n return defaultValue;\n }\n if (value !== undefined) {\n result = value;\n }\n if (other !== undefined) {\n if (result === undefined) {\n return other;\n }\n if (typeof value == 'string' || typeof other == 'string') {\n value = baseToString(value);\n other = baseToString(other);\n } else {\n value = baseToNumber(value);\n other = baseToNumber(other);\n }\n result = operator(value, other);\n }\n return result;\n };\n }\n\n /**\n * Creates a function like `_.over`.\n *\n * @private\n * @param {Function} arrayFunc The function to iterate over iteratees.\n * @returns {Function} Returns the new over function.\n */\n function createOver(arrayFunc) {\n return flatRest(function(iteratees) {\n iteratees = arrayMap(iteratees, baseUnary(getIteratee()));\n return baseRest(function(args) {\n var thisArg = this;\n return arrayFunc(iteratees, function(iteratee) {\n return apply(iteratee, thisArg, args);\n });\n });\n });\n }\n\n /**\n * Creates the padding for `string` based on `length`. The `chars` string\n * is truncated if the number of characters exceeds `length`.\n *\n * @private\n * @param {number} length The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padding for `string`.\n */\n function createPadding(length, chars) {\n chars = chars === undefined ? ' ' : baseToString(chars);\n\n var charsLength = chars.length;\n if (charsLength < 2) {\n return charsLength ? baseRepeat(chars, length) : chars;\n }\n var result = baseRepeat(chars, nativeCeil(length / stringSize(chars)));\n return hasUnicode(chars)\n ? castSlice(stringToArray(result), 0, length).join('')\n : result.slice(0, length);\n }\n\n /**\n * Creates a function that wraps `func` to invoke it with the `this` binding\n * of `thisArg` and `partials` prepended to the arguments it receives.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} partials The arguments to prepend to those provided to\n * the new function.\n * @returns {Function} Returns the new wrapped function.\n */\n function createPartial(func, bitmask, thisArg, partials) {\n var isBind = bitmask & WRAP_BIND_FLAG,\n Ctor = createCtor(func);\n\n function wrapper() {\n var argsIndex = -1,\n argsLength = arguments.length,\n leftIndex = -1,\n leftLength = partials.length,\n args = Array(leftLength + argsLength),\n fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n\n while (++leftIndex < leftLength) {\n args[leftIndex] = partials[leftIndex];\n }\n while (argsLength--) {\n args[leftIndex++] = arguments[++argsIndex];\n }\n return apply(fn, isBind ? thisArg : this, args);\n }\n return wrapper;\n }\n\n /**\n * Creates a `_.range` or `_.rangeRight` function.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new range function.\n */\n function createRange(fromRight) {\n return function(start, end, step) {\n if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {\n end = step = undefined;\n }\n // Ensure the sign of `-0` is preserved.\n start = toFinite(start);\n if (end === undefined) {\n end = start;\n start = 0;\n } else {\n end = toFinite(end);\n }\n step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);\n return baseRange(start, end, step, fromRight);\n };\n }\n\n /**\n * Creates a function that performs a relational operation on two values.\n *\n * @private\n * @param {Function} operator The function to perform the operation.\n * @returns {Function} Returns the new relational operation function.\n */\n function createRelationalOperation(operator) {\n return function(value, other) {\n if (!(typeof value == 'string' && typeof other == 'string')) {\n value = toNumber(value);\n other = toNumber(other);\n }\n return operator(value, other);\n };\n }\n\n /**\n * Creates a function that wraps `func` to continue currying.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {Function} wrapFunc The function to create the `func` wrapper.\n * @param {*} placeholder The placeholder value.\n * @param {*} [thisArg] The `this` binding of `func`.\n * @param {Array} [partials] The arguments to prepend to those provided to\n * the new function.\n * @param {Array} [holders] The `partials` placeholder indexes.\n * @param {Array} [argPos] The argument positions of the new function.\n * @param {number} [ary] The arity cap of `func`.\n * @param {number} [arity] The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {\n var isCurry = bitmask & WRAP_CURRY_FLAG,\n newHolders = isCurry ? holders : undefined,\n newHoldersRight = isCurry ? undefined : holders,\n newPartials = isCurry ? partials : undefined,\n newPartialsRight = isCurry ? undefined : partials;\n\n bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG);\n bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);\n\n if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {\n bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG);\n }\n var newData = [\n func, bitmask, thisArg, newPartials, newHolders, newPartialsRight,\n newHoldersRight, argPos, ary, arity\n ];\n\n var result = wrapFunc.apply(undefined, newData);\n if (isLaziable(func)) {\n setData(result, newData);\n }\n result.placeholder = placeholder;\n return setWrapToString(result, func, bitmask);\n }\n\n /**\n * Creates a function like `_.round`.\n *\n * @private\n * @param {string} methodName The name of the `Math` method to use when rounding.\n * @returns {Function} Returns the new round function.\n */\n function createRound(methodName) {\n var func = Math[methodName];\n return function(number, precision) {\n number = toNumber(number);\n precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);\n if (precision) {\n // Shift with exponential notation to avoid floating-point issues.\n // See [MDN](https://mdn.io/round#Examples) for more details.\n var pair = (toString(number) + 'e').split('e'),\n value = func(pair[0] + 'e' + (+pair[1] + precision));\n\n pair = (toString(value) + 'e').split('e');\n return +(pair[0] + 'e' + (+pair[1] - precision));\n }\n return func(number);\n };\n }\n\n /**\n * Creates a set object of `values`.\n *\n * @private\n * @param {Array} values The values to add to the set.\n * @returns {Object} Returns the new set.\n */\n var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {\n return new Set(values);\n };\n\n /**\n * Creates a `_.toPairs` or `_.toPairsIn` function.\n *\n * @private\n * @param {Function} keysFunc The function to get the keys of a given object.\n * @returns {Function} Returns the new pairs function.\n */\n function createToPairs(keysFunc) {\n return function(object) {\n var tag = getTag(object);\n if (tag == mapTag) {\n return mapToArray(object);\n }\n if (tag == setTag) {\n return setToPairs(object);\n }\n return baseToPairs(object, keysFunc(object));\n };\n }\n\n /**\n * Creates a function that either curries or invokes `func` with optional\n * `this` binding and partially applied arguments.\n *\n * @private\n * @param {Function|string} func The function or method name to wrap.\n * @param {number} bitmask The bitmask flags.\n * 1 - `_.bind`\n * 2 - `_.bindKey`\n * 4 - `_.curry` or `_.curryRight` of a bound function\n * 8 - `_.curry`\n * 16 - `_.curryRight`\n * 32 - `_.partial`\n * 64 - `_.partialRight`\n * 128 - `_.rearg`\n * 256 - `_.ary`\n * 512 - `_.flip`\n * @param {*} [thisArg] The `this` binding of `func`.\n * @param {Array} [partials] The arguments to be partially applied.\n * @param {Array} [holders] The `partials` placeholder indexes.\n * @param {Array} [argPos] The argument positions of the new function.\n * @param {number} [ary] The arity cap of `func`.\n * @param {number} [arity] The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {\n var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;\n if (!isBindKey && typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var length = partials ? partials.length : 0;\n if (!length) {\n bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG);\n partials = holders = undefined;\n }\n ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0);\n arity = arity === undefined ? arity : toInteger(arity);\n length -= holders ? holders.length : 0;\n\n if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) {\n var partialsRight = partials,\n holdersRight = holders;\n\n partials = holders = undefined;\n }\n var data = isBindKey ? undefined : getData(func);\n\n var newData = [\n func, bitmask, thisArg, partials, holders, partialsRight, holdersRight,\n argPos, ary, arity\n ];\n\n if (data) {\n mergeData(newData, data);\n }\n func = newData[0];\n bitmask = newData[1];\n thisArg = newData[2];\n partials = newData[3];\n holders = newData[4];\n arity = newData[9] = newData[9] === undefined\n ? (isBindKey ? 0 : func.length)\n : nativeMax(newData[9] - length, 0);\n\n if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {\n bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);\n }\n if (!bitmask || bitmask == WRAP_BIND_FLAG) {\n var result = createBind(func, bitmask, thisArg);\n } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) {\n result = createCurry(func, bitmask, arity);\n } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) {\n result = createPartial(func, bitmask, thisArg, partials);\n } else {\n result = createHybrid.apply(undefined, newData);\n }\n var setter = data ? baseSetData : setData;\n return setWrapToString(setter(result, newData), func, bitmask);\n }\n\n /**\n * Used by `_.defaults` to customize its `_.assignIn` use to assign properties\n * of source objects to the destination object for all destination properties\n * that resolve to `undefined`.\n *\n * @private\n * @param {*} objValue The destination value.\n * @param {*} srcValue The source value.\n * @param {string} key The key of the property to assign.\n * @param {Object} object The parent object of `objValue`.\n * @returns {*} Returns the value to assign.\n */\n function customDefaultsAssignIn(objValue, srcValue, key, object) {\n if (objValue === undefined ||\n (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {\n return srcValue;\n }\n return objValue;\n }\n\n /**\n * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source\n * objects into destination objects that are passed thru.\n *\n * @private\n * @param {*} objValue The destination value.\n * @param {*} srcValue The source value.\n * @param {string} key The key of the property to merge.\n * @param {Object} object The parent object of `objValue`.\n * @param {Object} source The parent object of `srcValue`.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n * @returns {*} Returns the value to assign.\n */\n function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {\n if (isObject(objValue) && isObject(srcValue)) {\n // Recursively merge objects and arrays (susceptible to call stack limits).\n stack.set(srcValue, objValue);\n baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack);\n stack['delete'](srcValue);\n }\n return objValue;\n }\n\n /**\n * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain\n * objects.\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {string} key The key of the property to inspect.\n * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`.\n */\n function customOmitClone(value) {\n return isPlainObject(value) ? undefined : value;\n }\n\n /**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\n function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(array);\n if (stacked && stack.get(other)) {\n return stacked == other;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n }\n\n /**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\n function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n }\n\n /**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\n function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked && stack.get(other)) {\n return stacked == other;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n }\n\n /**\n * A specialized version of `baseRest` which flattens the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @returns {Function} Returns the new function.\n */\n function flatRest(func) {\n return setToString(overRest(func, undefined, flatten), func + '');\n }\n\n /**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\n function getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n }\n\n /**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\n function getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n }\n\n /**\n * Gets metadata for `func`.\n *\n * @private\n * @param {Function} func The function to query.\n * @returns {*} Returns the metadata for `func`.\n */\n var getData = !metaMap ? noop : function(func) {\n return metaMap.get(func);\n };\n\n /**\n * Gets the name of `func`.\n *\n * @private\n * @param {Function} func The function to query.\n * @returns {string} Returns the function name.\n */\n function getFuncName(func) {\n var result = (func.name + ''),\n array = realNames[result],\n length = hasOwnProperty.call(realNames, result) ? array.length : 0;\n\n while (length--) {\n var data = array[length],\n otherFunc = data.func;\n if (otherFunc == null || otherFunc == func) {\n return data.name;\n }\n }\n return result;\n }\n\n /**\n * Gets the argument placeholder value for `func`.\n *\n * @private\n * @param {Function} func The function to inspect.\n * @returns {*} Returns the placeholder value.\n */\n function getHolder(func) {\n var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func;\n return object.placeholder;\n }\n\n /**\n * Gets the appropriate \"iteratee\" function. If `_.iteratee` is customized,\n * this function returns the custom method, otherwise it returns `baseIteratee`.\n * If arguments are provided, the chosen function is invoked with them and\n * its result is returned.\n *\n * @private\n * @param {*} [value] The value to convert to an iteratee.\n * @param {number} [arity] The arity of the created iteratee.\n * @returns {Function} Returns the chosen function or its result.\n */\n function getIteratee() {\n var result = lodash.iteratee || iteratee;\n result = result === iteratee ? baseIteratee : result;\n return arguments.length ? result(arguments[0], arguments[1]) : result;\n }\n\n /**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\n function getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n }\n\n /**\n * Gets the property names, values, and compare flags of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the match data of `object`.\n */\n function getMatchData(object) {\n var result = keys(object),\n length = result.length;\n\n while (length--) {\n var key = result[length],\n value = object[key];\n\n result[length] = [key, value, isStrictComparable(value)];\n }\n return result;\n }\n\n /**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\n function getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n }\n\n /**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\n function getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n }\n\n /**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\n var getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n };\n\n /**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\n var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n };\n\n /**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\n var getTag = baseGetTag;\n\n // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\n if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n }\n\n /**\n * Gets the view, applying any `transforms` to the `start` and `end` positions.\n *\n * @private\n * @param {number} start The start of the view.\n * @param {number} end The end of the view.\n * @param {Array} transforms The transformations to apply to the view.\n * @returns {Object} Returns an object containing the `start` and `end`\n * positions of the view.\n */\n function getView(start, end, transforms) {\n var index = -1,\n length = transforms.length;\n\n while (++index < length) {\n var data = transforms[index],\n size = data.size;\n\n switch (data.type) {\n case 'drop': start += size; break;\n case 'dropRight': end -= size; break;\n case 'take': end = nativeMin(end, start + size); break;\n case 'takeRight': start = nativeMax(start, end - size); break;\n }\n }\n return { 'start': start, 'end': end };\n }\n\n /**\n * Extracts wrapper details from the `source` body comment.\n *\n * @private\n * @param {string} source The source to inspect.\n * @returns {Array} Returns the wrapper details.\n */\n function getWrapDetails(source) {\n var match = source.match(reWrapDetails);\n return match ? match[1].split(reSplitDetails) : [];\n }\n\n /**\n * Checks if `path` exists on `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @param {Function} hasFunc The function to check properties.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n */\n function hasPath(object, path, hasFunc) {\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n result = false;\n\n while (++index < length) {\n var key = toKey(path[index]);\n if (!(result = object != null && hasFunc(object, key))) {\n break;\n }\n object = object[key];\n }\n if (result || ++index != length) {\n return result;\n }\n length = object == null ? 0 : object.length;\n return !!length && isLength(length) && isIndex(key, length) &&\n (isArray(object) || isArguments(object));\n }\n\n /**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\n function initCloneArray(array) {\n var length = array.length,\n result = array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n }\n\n /**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\n function initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n }\n\n /**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {Function} cloneFunc The function to clone values.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\n function initCloneByTag(object, tag, cloneFunc, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return cloneMap(object, isDeep, cloneFunc);\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return cloneSet(object, isDeep, cloneFunc);\n\n case symbolTag:\n return cloneSymbol(object);\n }\n }\n\n /**\n * Inserts wrapper `details` in a comment at the top of the `source` body.\n *\n * @private\n * @param {string} source The source to modify.\n * @returns {Array} details The details to insert.\n * @returns {string} Returns the modified source.\n */\n function insertWrapDetails(source, details) {\n var length = details.length;\n if (!length) {\n return source;\n }\n var lastIndex = length - 1;\n details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex];\n details = details.join(length > 2 ? ', ' : ' ');\n return source.replace(reWrapComment, '{\\n/* [wrapped with ' + details + '] */\\n');\n }\n\n /**\n * Checks if `value` is a flattenable `arguments` object or array.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.\n */\n function isFlattenable(value) {\n return isArray(value) || isArguments(value) ||\n !!(spreadableSymbol && value && value[spreadableSymbol]);\n }\n\n /**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\n function isIndex(value, length) {\n length = length == null ? MAX_SAFE_INTEGER : length;\n return !!length &&\n (typeof value == 'number' || reIsUint.test(value)) &&\n (value > -1 && value % 1 == 0 && value < length);\n }\n\n /**\n * Checks if the given arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n * else `false`.\n */\n function isIterateeCall(value, index, object) {\n if (!isObject(object)) {\n return false;\n }\n var type = typeof index;\n if (type == 'number'\n ? (isArrayLike(object) && isIndex(index, object.length))\n : (type == 'string' && index in object)\n ) {\n return eq(object[index], value);\n }\n return false;\n }\n\n /**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\n function isKey(value, object) {\n if (isArray(value)) {\n return false;\n }\n var type = typeof value;\n if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n value == null || isSymbol(value)) {\n return true;\n }\n return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n (object != null && value in Object(object));\n }\n\n /**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\n function isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n }\n\n /**\n * Checks if `func` has a lazy counterpart.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` has a lazy counterpart,\n * else `false`.\n */\n function isLaziable(func) {\n var funcName = getFuncName(func),\n other = lodash[funcName];\n\n if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {\n return false;\n }\n if (func === other) {\n return true;\n }\n var data = getData(other);\n return !!data && func === data[0];\n }\n\n /**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\n function isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n }\n\n /**\n * Checks if `func` is capable of being masked.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `func` is maskable, else `false`.\n */\n var isMaskable = coreJsData ? isFunction : stubFalse;\n\n /**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\n function isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n }\n\n /**\n * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` if suitable for strict\n * equality comparisons, else `false`.\n */\n function isStrictComparable(value) {\n return value === value && !isObject(value);\n }\n\n /**\n * A specialized version of `matchesProperty` for source values suitable\n * for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\n function matchesStrictComparable(key, srcValue) {\n return function(object) {\n if (object == null) {\n return false;\n }\n return object[key] === srcValue &&\n (srcValue !== undefined || (key in Object(object)));\n };\n }\n\n /**\n * A specialized version of `_.memoize` which clears the memoized function's\n * cache when it exceeds `MAX_MEMOIZE_SIZE`.\n *\n * @private\n * @param {Function} func The function to have its output memoized.\n * @returns {Function} Returns the new memoized function.\n */\n function memoizeCapped(func) {\n var result = memoize(func, function(key) {\n if (cache.size === MAX_MEMOIZE_SIZE) {\n cache.clear();\n }\n return key;\n });\n\n var cache = result.cache;\n return result;\n }\n\n /**\n * Merges the function metadata of `source` into `data`.\n *\n * Merging metadata reduces the number of wrappers used to invoke a function.\n * This is possible because methods like `_.bind`, `_.curry`, and `_.partial`\n * may be applied regardless of execution order. Methods like `_.ary` and\n * `_.rearg` modify function arguments, making the order in which they are\n * executed important, preventing the merging of metadata. However, we make\n * an exception for a safe combined case where curried functions have `_.ary`\n * and or `_.rearg` applied.\n *\n * @private\n * @param {Array} data The destination metadata.\n * @param {Array} source The source metadata.\n * @returns {Array} Returns `data`.\n */\n function mergeData(data, source) {\n var bitmask = data[1],\n srcBitmask = source[1],\n newBitmask = bitmask | srcBitmask,\n isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);\n\n var isCombo =\n ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) ||\n ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) ||\n ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG));\n\n // Exit early if metadata can't be merged.\n if (!(isCommon || isCombo)) {\n return data;\n }\n // Use source `thisArg` if available.\n if (srcBitmask & WRAP_BIND_FLAG) {\n data[2] = source[2];\n // Set when currying a bound function.\n newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;\n }\n // Compose partial arguments.\n var value = source[3];\n if (value) {\n var partials = data[3];\n data[3] = partials ? composeArgs(partials, value, source[4]) : value;\n data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];\n }\n // Compose partial right arguments.\n value = source[5];\n if (value) {\n partials = data[5];\n data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;\n data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];\n }\n // Use source `argPos` if available.\n value = source[7];\n if (value) {\n data[7] = value;\n }\n // Use source `ary` if it's smaller.\n if (srcBitmask & WRAP_ARY_FLAG) {\n data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);\n }\n // Use source `arity` if one is not provided.\n if (data[9] == null) {\n data[9] = source[9];\n }\n // Use source `func` and merge bitmasks.\n data[0] = source[0];\n data[1] = newBitmask;\n\n return data;\n }\n\n /**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\n function nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n }\n\n /**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\n function objectToString(value) {\n return nativeObjectToString.call(value);\n }\n\n /**\n * A specialized version of `baseRest` which transforms the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @param {Function} transform The rest array transform.\n * @returns {Function} Returns the new function.\n */\n function overRest(func, start, transform) {\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n index = -1;\n var otherArgs = Array(start + 1);\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = transform(array);\n return apply(func, this, otherArgs);\n };\n }\n\n /**\n * Gets the parent value at `path` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array} path The path to get the parent value of.\n * @returns {*} Returns the parent value.\n */\n function parent(object, path) {\n return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));\n }\n\n /**\n * Reorder `array` according to the specified indexes where the element at\n * the first index is assigned as the first element, the element at\n * the second index is assigned as the second element, and so on.\n *\n * @private\n * @param {Array} array The array to reorder.\n * @param {Array} indexes The arranged array indexes.\n * @returns {Array} Returns `array`.\n */\n function reorder(array, indexes) {\n var arrLength = array.length,\n length = nativeMin(indexes.length, arrLength),\n oldArray = copyArray(array);\n\n while (length--) {\n var index = indexes[length];\n array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;\n }\n return array;\n }\n\n /**\n * Sets metadata for `func`.\n *\n * **Note:** If this function becomes hot, i.e. is invoked a lot in a short\n * period of time, it will trip its breaker and transition to an identity\n * function to avoid garbage collection pauses in V8. See\n * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070)\n * for more details.\n *\n * @private\n * @param {Function} func The function to associate metadata with.\n * @param {*} data The metadata.\n * @returns {Function} Returns `func`.\n */\n var setData = shortOut(baseSetData);\n\n /**\n * A simple wrapper around the global [`setTimeout`](https://mdn.io/setTimeout).\n *\n * @private\n * @param {Function} func The function to delay.\n * @param {number} wait The number of milliseconds to delay invocation.\n * @returns {number|Object} Returns the timer id or timeout object.\n */\n var setTimeout = ctxSetTimeout || function(func, wait) {\n return root.setTimeout(func, wait);\n };\n\n /**\n * Sets the `toString` method of `func` to return `string`.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\n var setToString = shortOut(baseSetToString);\n\n /**\n * Sets the `toString` method of `wrapper` to mimic the source of `reference`\n * with wrapper details in a comment at the top of the source body.\n *\n * @private\n * @param {Function} wrapper The function to modify.\n * @param {Function} reference The reference function.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @returns {Function} Returns `wrapper`.\n */\n function setWrapToString(wrapper, reference, bitmask) {\n var source = (reference + '');\n return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));\n }\n\n /**\n * Creates a function that'll short out and invoke `identity` instead\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n * milliseconds.\n *\n * @private\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new shortable function.\n */\n function shortOut(func) {\n var count = 0,\n lastCalled = 0;\n\n return function() {\n var stamp = nativeNow(),\n remaining = HOT_SPAN - (stamp - lastCalled);\n\n lastCalled = stamp;\n if (remaining > 0) {\n if (++count >= HOT_COUNT) {\n return arguments[0];\n }\n } else {\n count = 0;\n }\n return func.apply(undefined, arguments);\n };\n }\n\n /**\n * A specialized version of `_.shuffle` which mutates and sets the size of `array`.\n *\n * @private\n * @param {Array} array The array to shuffle.\n * @param {number} [size=array.length] The size of `array`.\n * @returns {Array} Returns `array`.\n */\n function shuffleSelf(array, size) {\n var index = -1,\n length = array.length,\n lastIndex = length - 1;\n\n size = size === undefined ? length : size;\n while (++index < size) {\n var rand = baseRandom(index, lastIndex),\n value = array[rand];\n\n array[rand] = array[index];\n array[index] = value;\n }\n array.length = size;\n return array;\n }\n\n /**\n * Converts `string` to a property path array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the property path array.\n */\n var stringToPath = memoizeCapped(function(string) {\n var result = [];\n if (reLeadingDot.test(string)) {\n result.push('');\n }\n string.replace(rePropName, function(match, number, quote, string) {\n result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));\n });\n return result;\n });\n\n /**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\n function toKey(value) {\n if (typeof value == 'string' || isSymbol(value)) {\n return value;\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n }\n\n /**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\n function toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n }\n\n /**\n * Updates wrapper `details` based on `bitmask` flags.\n *\n * @private\n * @returns {Array} details The details to modify.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @returns {Array} Returns `details`.\n */\n function updateWrapDetails(details, bitmask) {\n arrayEach(wrapFlags, function(pair) {\n var value = '_.' + pair[0];\n if ((bitmask & pair[1]) && !arrayIncludes(details, value)) {\n details.push(value);\n }\n });\n return details.sort();\n }\n\n /**\n * Creates a clone of `wrapper`.\n *\n * @private\n * @param {Object} wrapper The wrapper to clone.\n * @returns {Object} Returns the cloned wrapper.\n */\n function wrapperClone(wrapper) {\n if (wrapper instanceof LazyWrapper) {\n return wrapper.clone();\n }\n var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);\n result.__actions__ = copyArray(wrapper.__actions__);\n result.__index__ = wrapper.__index__;\n result.__values__ = wrapper.__values__;\n return result;\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates an array of elements split into groups the length of `size`.\n * If `array` can't be split evenly, the final chunk will be the remaining\n * elements.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to process.\n * @param {number} [size=1] The length of each chunk\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the new array of chunks.\n * @example\n *\n * _.chunk(['a', 'b', 'c', 'd'], 2);\n * // => [['a', 'b'], ['c', 'd']]\n *\n * _.chunk(['a', 'b', 'c', 'd'], 3);\n * // => [['a', 'b', 'c'], ['d']]\n */\n function chunk(array, size, guard) {\n if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) {\n size = 1;\n } else {\n size = nativeMax(toInteger(size), 0);\n }\n var length = array == null ? 0 : array.length;\n if (!length || size < 1) {\n return [];\n }\n var index = 0,\n resIndex = 0,\n result = Array(nativeCeil(length / size));\n\n while (index < length) {\n result[resIndex++] = baseSlice(array, index, (index += size));\n }\n return result;\n }\n\n /**\n * Creates an array with all falsey values removed. The values `false`, `null`,\n * `0`, `\"\"`, `undefined`, and `NaN` are falsey.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to compact.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * _.compact([0, 1, false, 2, '', 3]);\n * // => [1, 2, 3]\n */\n function compact(array) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (value) {\n result[resIndex++] = value;\n }\n }\n return result;\n }\n\n /**\n * Creates a new array concatenating `array` with any additional arrays\n * and/or values.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to concatenate.\n * @param {...*} [values] The values to concatenate.\n * @returns {Array} Returns the new concatenated array.\n * @example\n *\n * var array = [1];\n * var other = _.concat(array, 2, [3], [[4]]);\n *\n * console.log(other);\n * // => [1, 2, 3, [4]]\n *\n * console.log(array);\n * // => [1]\n */\n function concat() {\n var length = arguments.length;\n if (!length) {\n return [];\n }\n var args = Array(length - 1),\n array = arguments[0],\n index = length;\n\n while (index--) {\n args[index - 1] = arguments[index];\n }\n return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));\n }\n\n /**\n * Creates an array of `array` values not included in the other given arrays\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons. The order and references of result values are\n * determined by the first array.\n *\n * **Note:** Unlike `_.pullAll`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...Array} [values] The values to exclude.\n * @returns {Array} Returns the new array of filtered values.\n * @see _.without, _.xor\n * @example\n *\n * _.difference([2, 1], [2, 3]);\n * // => [1]\n */\n var difference = baseRest(function(array, values) {\n return isArrayLikeObject(array)\n ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))\n : [];\n });\n\n /**\n * This method is like `_.difference` except that it accepts `iteratee` which\n * is invoked for each element of `array` and `values` to generate the criterion\n * by which they're compared. The order and references of result values are\n * determined by the first array. The iteratee is invoked with one argument:\n * (value).\n *\n * **Note:** Unlike `_.pullAllBy`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...Array} [values] The values to exclude.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n * // => [1.2]\n *\n * // The `_.property` iteratee shorthand.\n * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x');\n * // => [{ 'x': 2 }]\n */\n var differenceBy = baseRest(function(array, values) {\n var iteratee = last(values);\n if (isArrayLikeObject(iteratee)) {\n iteratee = undefined;\n }\n return isArrayLikeObject(array)\n ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee, 2))\n : [];\n });\n\n /**\n * This method is like `_.difference` except that it accepts `comparator`\n * which is invoked to compare elements of `array` to `values`. The order and\n * references of result values are determined by the first array. The comparator\n * is invoked with two arguments: (arrVal, othVal).\n *\n * **Note:** Unlike `_.pullAllWith`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...Array} [values] The values to exclude.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n *\n * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);\n * // => [{ 'x': 2, 'y': 1 }]\n */\n var differenceWith = baseRest(function(array, values) {\n var comparator = last(values);\n if (isArrayLikeObject(comparator)) {\n comparator = undefined;\n }\n return isArrayLikeObject(array)\n ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator)\n : [];\n });\n\n /**\n * Creates a slice of `array` with `n` elements dropped from the beginning.\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to drop.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.drop([1, 2, 3]);\n * // => [2, 3]\n *\n * _.drop([1, 2, 3], 2);\n * // => [3]\n *\n * _.drop([1, 2, 3], 5);\n * // => []\n *\n * _.drop([1, 2, 3], 0);\n * // => [1, 2, 3]\n */\n function drop(array, n, guard) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n n = (guard || n === undefined) ? 1 : toInteger(n);\n return baseSlice(array, n < 0 ? 0 : n, length);\n }\n\n /**\n * Creates a slice of `array` with `n` elements dropped from the end.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to drop.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.dropRight([1, 2, 3]);\n * // => [1, 2]\n *\n * _.dropRight([1, 2, 3], 2);\n * // => [1]\n *\n * _.dropRight([1, 2, 3], 5);\n * // => []\n *\n * _.dropRight([1, 2, 3], 0);\n * // => [1, 2, 3]\n */\n function dropRight(array, n, guard) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n n = (guard || n === undefined) ? 1 : toInteger(n);\n n = length - n;\n return baseSlice(array, 0, n < 0 ? 0 : n);\n }\n\n /**\n * Creates a slice of `array` excluding elements dropped from the end.\n * Elements are dropped until `predicate` returns falsey. The predicate is\n * invoked with three arguments: (value, index, array).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': false }\n * ];\n *\n * _.dropRightWhile(users, function(o) { return !o.active; });\n * // => objects for ['barney']\n *\n * // The `_.matches` iteratee shorthand.\n * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false });\n * // => objects for ['barney', 'fred']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.dropRightWhile(users, ['active', false]);\n * // => objects for ['barney']\n *\n * // The `_.property` iteratee shorthand.\n * _.dropRightWhile(users, 'active');\n * // => objects for ['barney', 'fred', 'pebbles']\n */\n function dropRightWhile(array, predicate) {\n return (array && array.length)\n ? baseWhile(array, getIteratee(predicate, 3), true, true)\n : [];\n }\n\n /**\n * Creates a slice of `array` excluding elements dropped from the beginning.\n * Elements are dropped until `predicate` returns falsey. The predicate is\n * invoked with three arguments: (value, index, array).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.dropWhile(users, function(o) { return !o.active; });\n * // => objects for ['pebbles']\n *\n * // The `_.matches` iteratee shorthand.\n * _.dropWhile(users, { 'user': 'barney', 'active': false });\n * // => objects for ['fred', 'pebbles']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.dropWhile(users, ['active', false]);\n * // => objects for ['pebbles']\n *\n * // The `_.property` iteratee shorthand.\n * _.dropWhile(users, 'active');\n * // => objects for ['barney', 'fred', 'pebbles']\n */\n function dropWhile(array, predicate) {\n return (array && array.length)\n ? baseWhile(array, getIteratee(predicate, 3), true)\n : [];\n }\n\n /**\n * Fills elements of `array` with `value` from `start` up to, but not\n * including, `end`.\n *\n * **Note:** This method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 3.2.0\n * @category Array\n * @param {Array} array The array to fill.\n * @param {*} value The value to fill `array` with.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [1, 2, 3];\n *\n * _.fill(array, 'a');\n * console.log(array);\n * // => ['a', 'a', 'a']\n *\n * _.fill(Array(3), 2);\n * // => [2, 2, 2]\n *\n * _.fill([4, 6, 8, 10], '*', 1, 3);\n * // => [4, '*', '*', 10]\n */\n function fill(array, value, start, end) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n if (start && typeof start != 'number' && isIterateeCall(array, value, start)) {\n start = 0;\n end = length;\n }\n return baseFill(array, value, start, end);\n }\n\n /**\n * This method is like `_.find` except that it returns the index of the first\n * element `predicate` returns truthy for instead of the element itself.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {number} Returns the index of the found element, else `-1`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.findIndex(users, function(o) { return o.user == 'barney'; });\n * // => 0\n *\n * // The `_.matches` iteratee shorthand.\n * _.findIndex(users, { 'user': 'fred', 'active': false });\n * // => 1\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findIndex(users, ['active', false]);\n * // => 0\n *\n * // The `_.property` iteratee shorthand.\n * _.findIndex(users, 'active');\n * // => 2\n */\n function findIndex(array, predicate, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = fromIndex == null ? 0 : toInteger(fromIndex);\n if (index < 0) {\n index = nativeMax(length + index, 0);\n }\n return baseFindIndex(array, getIteratee(predicate, 3), index);\n }\n\n /**\n * This method is like `_.findIndex` except that it iterates over elements\n * of `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=array.length-1] The index to search from.\n * @returns {number} Returns the index of the found element, else `-1`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': false }\n * ];\n *\n * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; });\n * // => 2\n *\n * // The `_.matches` iteratee shorthand.\n * _.findLastIndex(users, { 'user': 'barney', 'active': true });\n * // => 0\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findLastIndex(users, ['active', false]);\n * // => 2\n *\n * // The `_.property` iteratee shorthand.\n * _.findLastIndex(users, 'active');\n * // => 0\n */\n function findLastIndex(array, predicate, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = length - 1;\n if (fromIndex !== undefined) {\n index = toInteger(fromIndex);\n index = fromIndex < 0\n ? nativeMax(length + index, 0)\n : nativeMin(index, length - 1);\n }\n return baseFindIndex(array, getIteratee(predicate, 3), index, true);\n }\n\n /**\n * Flattens `array` a single level deep.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * _.flatten([1, [2, [3, [4]], 5]]);\n * // => [1, 2, [3, [4]], 5]\n */\n function flatten(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseFlatten(array, 1) : [];\n }\n\n /**\n * Recursively flattens `array`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * _.flattenDeep([1, [2, [3, [4]], 5]]);\n * // => [1, 2, 3, 4, 5]\n */\n function flattenDeep(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseFlatten(array, INFINITY) : [];\n }\n\n /**\n * Recursively flatten `array` up to `depth` times.\n *\n * @static\n * @memberOf _\n * @since 4.4.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @param {number} [depth=1] The maximum recursion depth.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * var array = [1, [2, [3, [4]], 5]];\n *\n * _.flattenDepth(array, 1);\n * // => [1, 2, [3, [4]], 5]\n *\n * _.flattenDepth(array, 2);\n * // => [1, 2, 3, [4], 5]\n */\n function flattenDepth(array, depth) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n depth = depth === undefined ? 1 : toInteger(depth);\n return baseFlatten(array, depth);\n }\n\n /**\n * The inverse of `_.toPairs`; this method returns an object composed\n * from key-value `pairs`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} pairs The key-value pairs.\n * @returns {Object} Returns the new object.\n * @example\n *\n * _.fromPairs([['a', 1], ['b', 2]]);\n * // => { 'a': 1, 'b': 2 }\n */\n function fromPairs(pairs) {\n var index = -1,\n length = pairs == null ? 0 : pairs.length,\n result = {};\n\n while (++index < length) {\n var pair = pairs[index];\n result[pair[0]] = pair[1];\n }\n return result;\n }\n\n /**\n * Gets the first element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @alias first\n * @category Array\n * @param {Array} array The array to query.\n * @returns {*} Returns the first element of `array`.\n * @example\n *\n * _.head([1, 2, 3]);\n * // => 1\n *\n * _.head([]);\n * // => undefined\n */\n function head(array) {\n return (array && array.length) ? array[0] : undefined;\n }\n\n /**\n * Gets the index at which the first occurrence of `value` is found in `array`\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons. If `fromIndex` is negative, it's used as the\n * offset from the end of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.indexOf([1, 2, 1, 2], 2);\n * // => 1\n *\n * // Search from the `fromIndex`.\n * _.indexOf([1, 2, 1, 2], 2, 2);\n * // => 3\n */\n function indexOf(array, value, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = fromIndex == null ? 0 : toInteger(fromIndex);\n if (index < 0) {\n index = nativeMax(length + index, 0);\n }\n return baseIndexOf(array, value, index);\n }\n\n /**\n * Gets all but the last element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.initial([1, 2, 3]);\n * // => [1, 2]\n */\n function initial(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseSlice(array, 0, -1) : [];\n }\n\n /**\n * Creates an array of unique values that are included in all given arrays\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons. The order and references of result values are\n * determined by the first array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @returns {Array} Returns the new array of intersecting values.\n * @example\n *\n * _.intersection([2, 1], [2, 3]);\n * // => [2]\n */\n var intersection = baseRest(function(arrays) {\n var mapped = arrayMap(arrays, castArrayLikeObject);\n return (mapped.length && mapped[0] === arrays[0])\n ? baseIntersection(mapped)\n : [];\n });\n\n /**\n * This method is like `_.intersection` except that it accepts `iteratee`\n * which is invoked for each element of each `arrays` to generate the criterion\n * by which they're compared. The order and references of result values are\n * determined by the first array. The iteratee is invoked with one argument:\n * (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new array of intersecting values.\n * @example\n *\n * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n * // => [2.1]\n *\n * // The `_.property` iteratee shorthand.\n * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 1 }]\n */\n var intersectionBy = baseRest(function(arrays) {\n var iteratee = last(arrays),\n mapped = arrayMap(arrays, castArrayLikeObject);\n\n if (iteratee === last(mapped)) {\n iteratee = undefined;\n } else {\n mapped.pop();\n }\n return (mapped.length && mapped[0] === arrays[0])\n ? baseIntersection(mapped, getIteratee(iteratee, 2))\n : [];\n });\n\n /**\n * This method is like `_.intersection` except that it accepts `comparator`\n * which is invoked to compare elements of `arrays`. The order and references\n * of result values are determined by the first array. The comparator is\n * invoked with two arguments: (arrVal, othVal).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of intersecting values.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n *\n * _.intersectionWith(objects, others, _.isEqual);\n * // => [{ 'x': 1, 'y': 2 }]\n */\n var intersectionWith = baseRest(function(arrays) {\n var comparator = last(arrays),\n mapped = arrayMap(arrays, castArrayLikeObject);\n\n comparator = typeof comparator == 'function' ? comparator : undefined;\n if (comparator) {\n mapped.pop();\n }\n return (mapped.length && mapped[0] === arrays[0])\n ? baseIntersection(mapped, undefined, comparator)\n : [];\n });\n\n /**\n * Converts all elements in `array` into a string separated by `separator`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to convert.\n * @param {string} [separator=','] The element separator.\n * @returns {string} Returns the joined string.\n * @example\n *\n * _.join(['a', 'b', 'c'], '~');\n * // => 'a~b~c'\n */\n function join(array, separator) {\n return array == null ? '' : nativeJoin.call(array, separator);\n }\n\n /**\n * Gets the last element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {*} Returns the last element of `array`.\n * @example\n *\n * _.last([1, 2, 3]);\n * // => 3\n */\n function last(array) {\n var length = array == null ? 0 : array.length;\n return length ? array[length - 1] : undefined;\n }\n\n /**\n * This method is like `_.indexOf` except that it iterates over elements of\n * `array` from right to left.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} [fromIndex=array.length-1] The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.lastIndexOf([1, 2, 1, 2], 2);\n * // => 3\n *\n * // Search from the `fromIndex`.\n * _.lastIndexOf([1, 2, 1, 2], 2, 2);\n * // => 1\n */\n function lastIndexOf(array, value, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = length;\n if (fromIndex !== undefined) {\n index = toInteger(fromIndex);\n index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);\n }\n return value === value\n ? strictLastIndexOf(array, value, index)\n : baseFindIndex(array, baseIsNaN, index, true);\n }\n\n /**\n * Gets the element at index `n` of `array`. If `n` is negative, the nth\n * element from the end is returned.\n *\n * @static\n * @memberOf _\n * @since 4.11.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=0] The index of the element to return.\n * @returns {*} Returns the nth element of `array`.\n * @example\n *\n * var array = ['a', 'b', 'c', 'd'];\n *\n * _.nth(array, 1);\n * // => 'b'\n *\n * _.nth(array, -2);\n * // => 'c';\n */\n function nth(array, n) {\n return (array && array.length) ? baseNth(array, toInteger(n)) : undefined;\n }\n\n /**\n * Removes all given values from `array` using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove`\n * to remove elements from an array by predicate.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {...*} [values] The values to remove.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = ['a', 'b', 'c', 'a', 'b', 'c'];\n *\n * _.pull(array, 'a', 'c');\n * console.log(array);\n * // => ['b', 'b']\n */\n var pull = baseRest(pullAll);\n\n /**\n * This method is like `_.pull` except that it accepts an array of values to remove.\n *\n * **Note:** Unlike `_.difference`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Array} values The values to remove.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = ['a', 'b', 'c', 'a', 'b', 'c'];\n *\n * _.pullAll(array, ['a', 'c']);\n * console.log(array);\n * // => ['b', 'b']\n */\n function pullAll(array, values) {\n return (array && array.length && values && values.length)\n ? basePullAll(array, values)\n : array;\n }\n\n /**\n * This method is like `_.pullAll` except that it accepts `iteratee` which is\n * invoked for each element of `array` and `values` to generate the criterion\n * by which they're compared. The iteratee is invoked with one argument: (value).\n *\n * **Note:** Unlike `_.differenceBy`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Array} values The values to remove.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];\n *\n * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x');\n * console.log(array);\n * // => [{ 'x': 2 }]\n */\n function pullAllBy(array, values, iteratee) {\n return (array && array.length && values && values.length)\n ? basePullAll(array, values, getIteratee(iteratee, 2))\n : array;\n }\n\n /**\n * This method is like `_.pullAll` except that it accepts `comparator` which\n * is invoked to compare elements of `array` to `values`. The comparator is\n * invoked with two arguments: (arrVal, othVal).\n *\n * **Note:** Unlike `_.differenceWith`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 4.6.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Array} values The values to remove.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }];\n *\n * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual);\n * console.log(array);\n * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }]\n */\n function pullAllWith(array, values, comparator) {\n return (array && array.length && values && values.length)\n ? basePullAll(array, values, undefined, comparator)\n : array;\n }\n\n /**\n * Removes elements from `array` corresponding to `indexes` and returns an\n * array of removed elements.\n *\n * **Note:** Unlike `_.at`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {...(number|number[])} [indexes] The indexes of elements to remove.\n * @returns {Array} Returns the new array of removed elements.\n * @example\n *\n * var array = ['a', 'b', 'c', 'd'];\n * var pulled = _.pullAt(array, [1, 3]);\n *\n * console.log(array);\n * // => ['a', 'c']\n *\n * console.log(pulled);\n * // => ['b', 'd']\n */\n var pullAt = flatRest(function(array, indexes) {\n var length = array == null ? 0 : array.length,\n result = baseAt(array, indexes);\n\n basePullAt(array, arrayMap(indexes, function(index) {\n return isIndex(index, length) ? +index : index;\n }).sort(compareAscending));\n\n return result;\n });\n\n /**\n * Removes all elements from `array` that `predicate` returns truthy for\n * and returns an array of the removed elements. The predicate is invoked\n * with three arguments: (value, index, array).\n *\n * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull`\n * to pull elements from an array by value.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new array of removed elements.\n * @example\n *\n * var array = [1, 2, 3, 4];\n * var evens = _.remove(array, function(n) {\n * return n % 2 == 0;\n * });\n *\n * console.log(array);\n * // => [1, 3]\n *\n * console.log(evens);\n * // => [2, 4]\n */\n function remove(array, predicate) {\n var result = [];\n if (!(array && array.length)) {\n return result;\n }\n var index = -1,\n indexes = [],\n length = array.length;\n\n predicate = getIteratee(predicate, 3);\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result.push(value);\n indexes.push(index);\n }\n }\n basePullAt(array, indexes);\n return result;\n }\n\n /**\n * Reverses `array` so that the first element becomes the last, the second\n * element becomes the second to last, and so on.\n *\n * **Note:** This method mutates `array` and is based on\n * [`Array#reverse`](https://mdn.io/Array/reverse).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [1, 2, 3];\n *\n * _.reverse(array);\n * // => [3, 2, 1]\n *\n * console.log(array);\n * // => [3, 2, 1]\n */\n function reverse(array) {\n return array == null ? array : nativeReverse.call(array);\n }\n\n /**\n * Creates a slice of `array` from `start` up to, but not including, `end`.\n *\n * **Note:** This method is used instead of\n * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are\n * returned.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to slice.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the slice of `array`.\n */\n function slice(array, start, end) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n if (end && typeof end != 'number' && isIterateeCall(array, start, end)) {\n start = 0;\n end = length;\n }\n else {\n start = start == null ? 0 : toInteger(start);\n end = end === undefined ? length : toInteger(end);\n }\n return baseSlice(array, start, end);\n }\n\n /**\n * Uses a binary search to determine the lowest index at which `value`\n * should be inserted into `array` in order to maintain its sort order.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n * @example\n *\n * _.sortedIndex([30, 50], 40);\n * // => 1\n */\n function sortedIndex(array, value) {\n return baseSortedIndex(array, value);\n }\n\n /**\n * This method is like `_.sortedIndex` except that it accepts `iteratee`\n * which is invoked for `value` and each element of `array` to compute their\n * sort ranking. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n * @example\n *\n * var objects = [{ 'x': 4 }, { 'x': 5 }];\n *\n * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });\n * // => 0\n *\n * // The `_.property` iteratee shorthand.\n * _.sortedIndexBy(objects, { 'x': 4 }, 'x');\n * // => 0\n */\n function sortedIndexBy(array, value, iteratee) {\n return baseSortedIndexBy(array, value, getIteratee(iteratee, 2));\n }\n\n /**\n * This method is like `_.indexOf` except that it performs a binary\n * search on a sorted `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.sortedIndexOf([4, 5, 5, 5, 6], 5);\n * // => 1\n */\n function sortedIndexOf(array, value) {\n var length = array == null ? 0 : array.length;\n if (length) {\n var index = baseSortedIndex(array, value);\n if (index < length && eq(array[index], value)) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * This method is like `_.sortedIndex` except that it returns the highest\n * index at which `value` should be inserted into `array` in order to\n * maintain its sort order.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n * @example\n *\n * _.sortedLastIndex([4, 5, 5, 5, 6], 5);\n * // => 4\n */\n function sortedLastIndex(array, value) {\n return baseSortedIndex(array, value, true);\n }\n\n /**\n * This method is like `_.sortedLastIndex` except that it accepts `iteratee`\n * which is invoked for `value` and each element of `array` to compute their\n * sort ranking. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n * @example\n *\n * var objects = [{ 'x': 4 }, { 'x': 5 }];\n *\n * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });\n * // => 1\n *\n * // The `_.property` iteratee shorthand.\n * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x');\n * // => 1\n */\n function sortedLastIndexBy(array, value, iteratee) {\n return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true);\n }\n\n /**\n * This method is like `_.lastIndexOf` except that it performs a binary\n * search on a sorted `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5);\n * // => 3\n */\n function sortedLastIndexOf(array, value) {\n var length = array == null ? 0 : array.length;\n if (length) {\n var index = baseSortedIndex(array, value, true) - 1;\n if (eq(array[index], value)) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * This method is like `_.uniq` except that it's designed and optimized\n * for sorted arrays.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.sortedUniq([1, 1, 2]);\n * // => [1, 2]\n */\n function sortedUniq(array) {\n return (array && array.length)\n ? baseSortedUniq(array)\n : [];\n }\n\n /**\n * This method is like `_.uniqBy` except that it's designed and optimized\n * for sorted arrays.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor);\n * // => [1.1, 2.3]\n */\n function sortedUniqBy(array, iteratee) {\n return (array && array.length)\n ? baseSortedUniq(array, getIteratee(iteratee, 2))\n : [];\n }\n\n /**\n * Gets all but the first element of `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.tail([1, 2, 3]);\n * // => [2, 3]\n */\n function tail(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseSlice(array, 1, length) : [];\n }\n\n /**\n * Creates a slice of `array` with `n` elements taken from the beginning.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to take.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.take([1, 2, 3]);\n * // => [1]\n *\n * _.take([1, 2, 3], 2);\n * // => [1, 2]\n *\n * _.take([1, 2, 3], 5);\n * // => [1, 2, 3]\n *\n * _.take([1, 2, 3], 0);\n * // => []\n */\n function take(array, n, guard) {\n if (!(array && array.length)) {\n return [];\n }\n n = (guard || n === undefined) ? 1 : toInteger(n);\n return baseSlice(array, 0, n < 0 ? 0 : n);\n }\n\n /**\n * Creates a slice of `array` with `n` elements taken from the end.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to take.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.takeRight([1, 2, 3]);\n * // => [3]\n *\n * _.takeRight([1, 2, 3], 2);\n * // => [2, 3]\n *\n * _.takeRight([1, 2, 3], 5);\n * // => [1, 2, 3]\n *\n * _.takeRight([1, 2, 3], 0);\n * // => []\n */\n function takeRight(array, n, guard) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n n = (guard || n === undefined) ? 1 : toInteger(n);\n n = length - n;\n return baseSlice(array, n < 0 ? 0 : n, length);\n }\n\n /**\n * Creates a slice of `array` with elements taken from the end. Elements are\n * taken until `predicate` returns falsey. The predicate is invoked with\n * three arguments: (value, index, array).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': false }\n * ];\n *\n * _.takeRightWhile(users, function(o) { return !o.active; });\n * // => objects for ['fred', 'pebbles']\n *\n * // The `_.matches` iteratee shorthand.\n * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false });\n * // => objects for ['pebbles']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.takeRightWhile(users, ['active', false]);\n * // => objects for ['fred', 'pebbles']\n *\n * // The `_.property` iteratee shorthand.\n * _.takeRightWhile(users, 'active');\n * // => []\n */\n function takeRightWhile(array, predicate) {\n return (array && array.length)\n ? baseWhile(array, getIteratee(predicate, 3), false, true)\n : [];\n }\n\n /**\n * Creates a slice of `array` with elements taken from the beginning. Elements\n * are taken until `predicate` returns falsey. The predicate is invoked with\n * three arguments: (value, index, array).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.takeWhile(users, function(o) { return !o.active; });\n * // => objects for ['barney', 'fred']\n *\n * // The `_.matches` iteratee shorthand.\n * _.takeWhile(users, { 'user': 'barney', 'active': false });\n * // => objects for ['barney']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.takeWhile(users, ['active', false]);\n * // => objects for ['barney', 'fred']\n *\n * // The `_.property` iteratee shorthand.\n * _.takeWhile(users, 'active');\n * // => []\n */\n function takeWhile(array, predicate) {\n return (array && array.length)\n ? baseWhile(array, getIteratee(predicate, 3))\n : [];\n }\n\n /**\n * Creates an array of unique values, in order, from all given arrays using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @returns {Array} Returns the new array of combined values.\n * @example\n *\n * _.union([2], [1, 2]);\n * // => [2, 1]\n */\n var union = baseRest(function(arrays) {\n return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));\n });\n\n /**\n * This method is like `_.union` except that it accepts `iteratee` which is\n * invoked for each element of each `arrays` to generate the criterion by\n * which uniqueness is computed. Result values are chosen from the first\n * array in which the value occurs. The iteratee is invoked with one argument:\n * (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new array of combined values.\n * @example\n *\n * _.unionBy([2.1], [1.2, 2.3], Math.floor);\n * // => [2.1, 1.2]\n *\n * // The `_.property` iteratee shorthand.\n * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 1 }, { 'x': 2 }]\n */\n var unionBy = baseRest(function(arrays) {\n var iteratee = last(arrays);\n if (isArrayLikeObject(iteratee)) {\n iteratee = undefined;\n }\n return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2));\n });\n\n /**\n * This method is like `_.union` except that it accepts `comparator` which\n * is invoked to compare elements of `arrays`. Result values are chosen from\n * the first array in which the value occurs. The comparator is invoked\n * with two arguments: (arrVal, othVal).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of combined values.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n *\n * _.unionWith(objects, others, _.isEqual);\n * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]\n */\n var unionWith = baseRest(function(arrays) {\n var comparator = last(arrays);\n comparator = typeof comparator == 'function' ? comparator : undefined;\n return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator);\n });\n\n /**\n * Creates a duplicate-free version of an array, using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons, in which only the first occurrence of each element\n * is kept. The order of result values is determined by the order they occur\n * in the array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.uniq([2, 1, 2]);\n * // => [2, 1]\n */\n function uniq(array) {\n return (array && array.length) ? baseUniq(array) : [];\n }\n\n /**\n * This method is like `_.uniq` except that it accepts `iteratee` which is\n * invoked for each element in `array` to generate the criterion by which\n * uniqueness is computed. The order of result values is determined by the\n * order they occur in the array. The iteratee is invoked with one argument:\n * (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.uniqBy([2.1, 1.2, 2.3], Math.floor);\n * // => [2.1, 1.2]\n *\n * // The `_.property` iteratee shorthand.\n * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 1 }, { 'x': 2 }]\n */\n function uniqBy(array, iteratee) {\n return (array && array.length) ? baseUniq(array, getIteratee(iteratee, 2)) : [];\n }\n\n /**\n * This method is like `_.uniq` except that it accepts `comparator` which\n * is invoked to compare elements of `array`. The order of result values is\n * determined by the order they occur in the array.The comparator is invoked\n * with two arguments: (arrVal, othVal).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }];\n *\n * _.uniqWith(objects, _.isEqual);\n * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]\n */\n function uniqWith(array, comparator) {\n comparator = typeof comparator == 'function' ? comparator : undefined;\n return (array && array.length) ? baseUniq(array, undefined, comparator) : [];\n }\n\n /**\n * This method is like `_.zip` except that it accepts an array of grouped\n * elements and creates an array regrouping the elements to their pre-zip\n * configuration.\n *\n * @static\n * @memberOf _\n * @since 1.2.0\n * @category Array\n * @param {Array} array The array of grouped elements to process.\n * @returns {Array} Returns the new array of regrouped elements.\n * @example\n *\n * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]);\n * // => [['a', 1, true], ['b', 2, false]]\n *\n * _.unzip(zipped);\n * // => [['a', 'b'], [1, 2], [true, false]]\n */\n function unzip(array) {\n if (!(array && array.length)) {\n return [];\n }\n var length = 0;\n array = arrayFilter(array, function(group) {\n if (isArrayLikeObject(group)) {\n length = nativeMax(group.length, length);\n return true;\n }\n });\n return baseTimes(length, function(index) {\n return arrayMap(array, baseProperty(index));\n });\n }\n\n /**\n * This method is like `_.unzip` except that it accepts `iteratee` to specify\n * how regrouped values should be combined. The iteratee is invoked with the\n * elements of each group: (...group).\n *\n * @static\n * @memberOf _\n * @since 3.8.0\n * @category Array\n * @param {Array} array The array of grouped elements to process.\n * @param {Function} [iteratee=_.identity] The function to combine\n * regrouped values.\n * @returns {Array} Returns the new array of regrouped elements.\n * @example\n *\n * var zipped = _.zip([1, 2], [10, 20], [100, 200]);\n * // => [[1, 10, 100], [2, 20, 200]]\n *\n * _.unzipWith(zipped, _.add);\n * // => [3, 30, 300]\n */\n function unzipWith(array, iteratee) {\n if (!(array && array.length)) {\n return [];\n }\n var result = unzip(array);\n if (iteratee == null) {\n return result;\n }\n return arrayMap(result, function(group) {\n return apply(iteratee, undefined, group);\n });\n }\n\n /**\n * Creates an array excluding all given values using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * **Note:** Unlike `_.pull`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...*} [values] The values to exclude.\n * @returns {Array} Returns the new array of filtered values.\n * @see _.difference, _.xor\n * @example\n *\n * _.without([2, 1, 2, 3], 1, 2);\n * // => [3]\n */\n var without = baseRest(function(array, values) {\n return isArrayLikeObject(array)\n ? baseDifference(array, values)\n : [];\n });\n\n /**\n * Creates an array of unique values that is the\n * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference)\n * of the given arrays. The order of result values is determined by the order\n * they occur in the arrays.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @returns {Array} Returns the new array of filtered values.\n * @see _.difference, _.without\n * @example\n *\n * _.xor([2, 1], [2, 3]);\n * // => [1, 3]\n */\n var xor = baseRest(function(arrays) {\n return baseXor(arrayFilter(arrays, isArrayLikeObject));\n });\n\n /**\n * This method is like `_.xor` except that it accepts `iteratee` which is\n * invoked for each element of each `arrays` to generate the criterion by\n * which by which they're compared. The order of result values is determined\n * by the order they occur in the arrays. The iteratee is invoked with one\n * argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n * // => [1.2, 3.4]\n *\n * // The `_.property` iteratee shorthand.\n * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 2 }]\n */\n var xorBy = baseRest(function(arrays) {\n var iteratee = last(arrays);\n if (isArrayLikeObject(iteratee)) {\n iteratee = undefined;\n }\n return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2));\n });\n\n /**\n * This method is like `_.xor` except that it accepts `comparator` which is\n * invoked to compare elements of `arrays`. The order of result values is\n * determined by the order they occur in the arrays. The comparator is invoked\n * with two arguments: (arrVal, othVal).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n *\n * _.xorWith(objects, others, _.isEqual);\n * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]\n */\n var xorWith = baseRest(function(arrays) {\n var comparator = last(arrays);\n comparator = typeof comparator == 'function' ? comparator : undefined;\n return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator);\n });\n\n /**\n * Creates an array of grouped elements, the first of which contains the\n * first elements of the given arrays, the second of which contains the\n * second elements of the given arrays, and so on.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {...Array} [arrays] The arrays to process.\n * @returns {Array} Returns the new array of grouped elements.\n * @example\n *\n * _.zip(['a', 'b'], [1, 2], [true, false]);\n * // => [['a', 1, true], ['b', 2, false]]\n */\n var zip = baseRest(unzip);\n\n /**\n * This method is like `_.fromPairs` except that it accepts two arrays,\n * one of property identifiers and one of corresponding values.\n *\n * @static\n * @memberOf _\n * @since 0.4.0\n * @category Array\n * @param {Array} [props=[]] The property identifiers.\n * @param {Array} [values=[]] The property values.\n * @returns {Object} Returns the new object.\n * @example\n *\n * _.zipObject(['a', 'b'], [1, 2]);\n * // => { 'a': 1, 'b': 2 }\n */\n function zipObject(props, values) {\n return baseZipObject(props || [], values || [], assignValue);\n }\n\n /**\n * This method is like `_.zipObject` except that it supports property paths.\n *\n * @static\n * @memberOf _\n * @since 4.1.0\n * @category Array\n * @param {Array} [props=[]] The property identifiers.\n * @param {Array} [values=[]] The property values.\n * @returns {Object} Returns the new object.\n * @example\n *\n * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]);\n * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } }\n */\n function zipObjectDeep(props, values) {\n return baseZipObject(props || [], values || [], baseSet);\n }\n\n /**\n * This method is like `_.zip` except that it accepts `iteratee` to specify\n * how grouped values should be combined. The iteratee is invoked with the\n * elements of each group: (...group).\n *\n * @static\n * @memberOf _\n * @since 3.8.0\n * @category Array\n * @param {...Array} [arrays] The arrays to process.\n * @param {Function} [iteratee=_.identity] The function to combine\n * grouped values.\n * @returns {Array} Returns the new array of grouped elements.\n * @example\n *\n * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) {\n * return a + b + c;\n * });\n * // => [111, 222]\n */\n var zipWith = baseRest(function(arrays) {\n var length = arrays.length,\n iteratee = length > 1 ? arrays[length - 1] : undefined;\n\n iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined;\n return unzipWith(arrays, iteratee);\n });\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a `lodash` wrapper instance that wraps `value` with explicit method\n * chain sequences enabled. The result of such sequences must be unwrapped\n * with `_#value`.\n *\n * @static\n * @memberOf _\n * @since 1.3.0\n * @category Seq\n * @param {*} value The value to wrap.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36 },\n * { 'user': 'fred', 'age': 40 },\n * { 'user': 'pebbles', 'age': 1 }\n * ];\n *\n * var youngest = _\n * .chain(users)\n * .sortBy('age')\n * .map(function(o) {\n * return o.user + ' is ' + o.age;\n * })\n * .head()\n * .value();\n * // => 'pebbles is 1'\n */\n function chain(value) {\n var result = lodash(value);\n result.__chain__ = true;\n return result;\n }\n\n /**\n * This method invokes `interceptor` and returns `value`. The interceptor\n * is invoked with one argument; (value). The purpose of this method is to\n * \"tap into\" a method chain sequence in order to modify intermediate results.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Seq\n * @param {*} value The value to provide to `interceptor`.\n * @param {Function} interceptor The function to invoke.\n * @returns {*} Returns `value`.\n * @example\n *\n * _([1, 2, 3])\n * .tap(function(array) {\n * // Mutate input array.\n * array.pop();\n * })\n * .reverse()\n * .value();\n * // => [2, 1]\n */\n function tap(value, interceptor) {\n interceptor(value);\n return value;\n }\n\n /**\n * This method is like `_.tap` except that it returns the result of `interceptor`.\n * The purpose of this method is to \"pass thru\" values replacing intermediate\n * results in a method chain sequence.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Seq\n * @param {*} value The value to provide to `interceptor`.\n * @param {Function} interceptor The function to invoke.\n * @returns {*} Returns the result of `interceptor`.\n * @example\n *\n * _(' abc ')\n * .chain()\n * .trim()\n * .thru(function(value) {\n * return [value];\n * })\n * .value();\n * // => ['abc']\n */\n function thru(value, interceptor) {\n return interceptor(value);\n }\n\n /**\n * This method is the wrapper version of `_.at`.\n *\n * @name at\n * @memberOf _\n * @since 1.0.0\n * @category Seq\n * @param {...(string|string[])} [paths] The property paths to pick.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };\n *\n * _(object).at(['a[0].b.c', 'a[1]']).value();\n * // => [3, 4]\n */\n var wrapperAt = flatRest(function(paths) {\n var length = paths.length,\n start = length ? paths[0] : 0,\n value = this.__wrapped__,\n interceptor = function(object) { return baseAt(object, paths); };\n\n if (length > 1 || this.__actions__.length ||\n !(value instanceof LazyWrapper) || !isIndex(start)) {\n return this.thru(interceptor);\n }\n value = value.slice(start, +start + (length ? 1 : 0));\n value.__actions__.push({\n 'func': thru,\n 'args': [interceptor],\n 'thisArg': undefined\n });\n return new LodashWrapper(value, this.__chain__).thru(function(array) {\n if (length && !array.length) {\n array.push(undefined);\n }\n return array;\n });\n });\n\n /**\n * Creates a `lodash` wrapper instance with explicit method chain sequences enabled.\n *\n * @name chain\n * @memberOf _\n * @since 0.1.0\n * @category Seq\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36 },\n * { 'user': 'fred', 'age': 40 }\n * ];\n *\n * // A sequence without explicit chaining.\n * _(users).head();\n * // => { 'user': 'barney', 'age': 36 }\n *\n * // A sequence with explicit chaining.\n * _(users)\n * .chain()\n * .head()\n * .pick('user')\n * .value();\n * // => { 'user': 'barney' }\n */\n function wrapperChain() {\n return chain(this);\n }\n\n /**\n * Executes the chain sequence and returns the wrapped result.\n *\n * @name commit\n * @memberOf _\n * @since 3.2.0\n * @category Seq\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var array = [1, 2];\n * var wrapped = _(array).push(3);\n *\n * console.log(array);\n * // => [1, 2]\n *\n * wrapped = wrapped.commit();\n * console.log(array);\n * // => [1, 2, 3]\n *\n * wrapped.last();\n * // => 3\n *\n * console.log(array);\n * // => [1, 2, 3]\n */\n function wrapperCommit() {\n return new LodashWrapper(this.value(), this.__chain__);\n }\n\n /**\n * Gets the next value on a wrapped object following the\n * [iterator protocol](https://mdn.io/iteration_protocols#iterator).\n *\n * @name next\n * @memberOf _\n * @since 4.0.0\n * @category Seq\n * @returns {Object} Returns the next iterator value.\n * @example\n *\n * var wrapped = _([1, 2]);\n *\n * wrapped.next();\n * // => { 'done': false, 'value': 1 }\n *\n * wrapped.next();\n * // => { 'done': false, 'value': 2 }\n *\n * wrapped.next();\n * // => { 'done': true, 'value': undefined }\n */\n function wrapperNext() {\n if (this.__values__ === undefined) {\n this.__values__ = toArray(this.value());\n }\n var done = this.__index__ >= this.__values__.length,\n value = done ? undefined : this.__values__[this.__index__++];\n\n return { 'done': done, 'value': value };\n }\n\n /**\n * Enables the wrapper to be iterable.\n *\n * @name Symbol.iterator\n * @memberOf _\n * @since 4.0.0\n * @category Seq\n * @returns {Object} Returns the wrapper object.\n * @example\n *\n * var wrapped = _([1, 2]);\n *\n * wrapped[Symbol.iterator]() === wrapped;\n * // => true\n *\n * Array.from(wrapped);\n * // => [1, 2]\n */\n function wrapperToIterator() {\n return this;\n }\n\n /**\n * Creates a clone of the chain sequence planting `value` as the wrapped value.\n *\n * @name plant\n * @memberOf _\n * @since 3.2.0\n * @category Seq\n * @param {*} value The value to plant.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * var wrapped = _([1, 2]).map(square);\n * var other = wrapped.plant([3, 4]);\n *\n * other.value();\n * // => [9, 16]\n *\n * wrapped.value();\n * // => [1, 4]\n */\n function wrapperPlant(value) {\n var result,\n parent = this;\n\n while (parent instanceof baseLodash) {\n var clone = wrapperClone(parent);\n clone.__index__ = 0;\n clone.__values__ = undefined;\n if (result) {\n previous.__wrapped__ = clone;\n } else {\n result = clone;\n }\n var previous = clone;\n parent = parent.__wrapped__;\n }\n previous.__wrapped__ = value;\n return result;\n }\n\n /**\n * This method is the wrapper version of `_.reverse`.\n *\n * **Note:** This method mutates the wrapped array.\n *\n * @name reverse\n * @memberOf _\n * @since 0.1.0\n * @category Seq\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var array = [1, 2, 3];\n *\n * _(array).reverse().value()\n * // => [3, 2, 1]\n *\n * console.log(array);\n * // => [3, 2, 1]\n */\n function wrapperReverse() {\n var value = this.__wrapped__;\n if (value instanceof LazyWrapper) {\n var wrapped = value;\n if (this.__actions__.length) {\n wrapped = new LazyWrapper(this);\n }\n wrapped = wrapped.reverse();\n wrapped.__actions__.push({\n 'func': thru,\n 'args': [reverse],\n 'thisArg': undefined\n });\n return new LodashWrapper(wrapped, this.__chain__);\n }\n return this.thru(reverse);\n }\n\n /**\n * Executes the chain sequence to resolve the unwrapped value.\n *\n * @name value\n * @memberOf _\n * @since 0.1.0\n * @alias toJSON, valueOf\n * @category Seq\n * @returns {*} Returns the resolved unwrapped value.\n * @example\n *\n * _([1, 2, 3]).value();\n * // => [1, 2, 3]\n */\n function wrapperValue() {\n return baseWrapperValue(this.__wrapped__, this.__actions__);\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates an object composed of keys generated from the results of running\n * each element of `collection` thru `iteratee`. The corresponding value of\n * each key is the number of times the key was returned by `iteratee`. The\n * iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n * @returns {Object} Returns the composed aggregate object.\n * @example\n *\n * _.countBy([6.1, 4.2, 6.3], Math.floor);\n * // => { '4': 1, '6': 2 }\n *\n * // The `_.property` iteratee shorthand.\n * _.countBy(['one', 'two', 'three'], 'length');\n * // => { '3': 2, '5': 1 }\n */\n var countBy = createAggregator(function(result, value, key) {\n if (hasOwnProperty.call(result, key)) {\n ++result[key];\n } else {\n baseAssignValue(result, key, 1);\n }\n });\n\n /**\n * Checks if `predicate` returns truthy for **all** elements of `collection`.\n * Iteration is stopped once `predicate` returns falsey. The predicate is\n * invoked with three arguments: (value, index|key, collection).\n *\n * **Note:** This method returns `true` for\n * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because\n * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of\n * elements of empty collections.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\n * else `false`.\n * @example\n *\n * _.every([true, 1, null, 'yes'], Boolean);\n * // => false\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': false },\n * { 'user': 'fred', 'age': 40, 'active': false }\n * ];\n *\n * // The `_.matches` iteratee shorthand.\n * _.every(users, { 'user': 'barney', 'active': false });\n * // => false\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.every(users, ['active', false]);\n * // => true\n *\n * // The `_.property` iteratee shorthand.\n * _.every(users, 'active');\n * // => false\n */\n function every(collection, predicate, guard) {\n var func = isArray(collection) ? arrayEvery : baseEvery;\n if (guard && isIterateeCall(collection, predicate, guard)) {\n predicate = undefined;\n }\n return func(collection, getIteratee(predicate, 3));\n }\n\n /**\n * Iterates over elements of `collection`, returning an array of all elements\n * `predicate` returns truthy for. The predicate is invoked with three\n * arguments: (value, index|key, collection).\n *\n * **Note:** Unlike `_.remove`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n * @see _.reject\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': true },\n * { 'user': 'fred', 'age': 40, 'active': false }\n * ];\n *\n * _.filter(users, function(o) { return !o.active; });\n * // => objects for ['fred']\n *\n * // The `_.matches` iteratee shorthand.\n * _.filter(users, { 'age': 36, 'active': true });\n * // => objects for ['barney']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.filter(users, ['active', false]);\n * // => objects for ['fred']\n *\n * // The `_.property` iteratee shorthand.\n * _.filter(users, 'active');\n * // => objects for ['barney']\n */\n function filter(collection, predicate) {\n var func = isArray(collection) ? arrayFilter : baseFilter;\n return func(collection, getIteratee(predicate, 3));\n }\n\n /**\n * Iterates over elements of `collection`, returning the first element\n * `predicate` returns truthy for. The predicate is invoked with three\n * arguments: (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {*} Returns the matched element, else `undefined`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': true },\n * { 'user': 'fred', 'age': 40, 'active': false },\n * { 'user': 'pebbles', 'age': 1, 'active': true }\n * ];\n *\n * _.find(users, function(o) { return o.age < 40; });\n * // => object for 'barney'\n *\n * // The `_.matches` iteratee shorthand.\n * _.find(users, { 'age': 1, 'active': true });\n * // => object for 'pebbles'\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.find(users, ['active', false]);\n * // => object for 'fred'\n *\n * // The `_.property` iteratee shorthand.\n * _.find(users, 'active');\n * // => object for 'barney'\n */\n var find = createFind(findIndex);\n\n /**\n * This method is like `_.find` except that it iterates over elements of\n * `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=collection.length-1] The index to search from.\n * @returns {*} Returns the matched element, else `undefined`.\n * @example\n *\n * _.findLast([1, 2, 3, 4], function(n) {\n * return n % 2 == 1;\n * });\n * // => 3\n */\n var findLast = createFind(findLastIndex);\n\n /**\n * Creates a flattened array of values by running each element in `collection`\n * thru `iteratee` and flattening the mapped results. The iteratee is invoked\n * with three arguments: (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * function duplicate(n) {\n * return [n, n];\n * }\n *\n * _.flatMap([1, 2], duplicate);\n * // => [1, 1, 2, 2]\n */\n function flatMap(collection, iteratee) {\n return baseFlatten(map(collection, iteratee), 1);\n }\n\n /**\n * This method is like `_.flatMap` except that it recursively flattens the\n * mapped results.\n *\n * @static\n * @memberOf _\n * @since 4.7.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * function duplicate(n) {\n * return [[[n, n]]];\n * }\n *\n * _.flatMapDeep([1, 2], duplicate);\n * // => [1, 1, 2, 2]\n */\n function flatMapDeep(collection, iteratee) {\n return baseFlatten(map(collection, iteratee), INFINITY);\n }\n\n /**\n * This method is like `_.flatMap` except that it recursively flattens the\n * mapped results up to `depth` times.\n *\n * @static\n * @memberOf _\n * @since 4.7.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {number} [depth=1] The maximum recursion depth.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * function duplicate(n) {\n * return [[[n, n]]];\n * }\n *\n * _.flatMapDepth([1, 2], duplicate, 2);\n * // => [[1, 1], [2, 2]]\n */\n function flatMapDepth(collection, iteratee, depth) {\n depth = depth === undefined ? 1 : toInteger(depth);\n return baseFlatten(map(collection, iteratee), depth);\n }\n\n /**\n * Iterates over elements of `collection` and invokes `iteratee` for each element.\n * The iteratee is invoked with three arguments: (value, index|key, collection).\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * **Note:** As with other \"Collections\" methods, objects with a \"length\"\n * property are iterated like arrays. To avoid this behavior use `_.forIn`\n * or `_.forOwn` for object iteration.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @alias each\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n * @see _.forEachRight\n * @example\n *\n * _.forEach([1, 2], function(value) {\n * console.log(value);\n * });\n * // => Logs `1` then `2`.\n *\n * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'a' then 'b' (iteration order is not guaranteed).\n */\n function forEach(collection, iteratee) {\n var func = isArray(collection) ? arrayEach : baseEach;\n return func(collection, getIteratee(iteratee, 3));\n }\n\n /**\n * This method is like `_.forEach` except that it iterates over elements of\n * `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @alias eachRight\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n * @see _.forEach\n * @example\n *\n * _.forEachRight([1, 2], function(value) {\n * console.log(value);\n * });\n * // => Logs `2` then `1`.\n */\n function forEachRight(collection, iteratee) {\n var func = isArray(collection) ? arrayEachRight : baseEachRight;\n return func(collection, getIteratee(iteratee, 3));\n }\n\n /**\n * Creates an object composed of keys generated from the results of running\n * each element of `collection` thru `iteratee`. The order of grouped values\n * is determined by the order they occur in `collection`. The corresponding\n * value of each key is an array of elements responsible for generating the\n * key. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n * @returns {Object} Returns the composed aggregate object.\n * @example\n *\n * _.groupBy([6.1, 4.2, 6.3], Math.floor);\n * // => { '4': [4.2], '6': [6.1, 6.3] }\n *\n * // The `_.property` iteratee shorthand.\n * _.groupBy(['one', 'two', 'three'], 'length');\n * // => { '3': ['one', 'two'], '5': ['three'] }\n */\n var groupBy = createAggregator(function(result, value, key) {\n if (hasOwnProperty.call(result, key)) {\n result[key].push(value);\n } else {\n baseAssignValue(result, key, [value]);\n }\n });\n\n /**\n * Checks if `value` is in `collection`. If `collection` is a string, it's\n * checked for a substring of `value`, otherwise\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * is used for equality comparisons. If `fromIndex` is negative, it's used as\n * the offset from the end of `collection`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object|string} collection The collection to inspect.\n * @param {*} value The value to search for.\n * @param {number} [fromIndex=0] The index to search from.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.\n * @returns {boolean} Returns `true` if `value` is found, else `false`.\n * @example\n *\n * _.includes([1, 2, 3], 1);\n * // => true\n *\n * _.includes([1, 2, 3], 1, 2);\n * // => false\n *\n * _.includes({ 'a': 1, 'b': 2 }, 1);\n * // => true\n *\n * _.includes('abcd', 'bc');\n * // => true\n */\n function includes(collection, value, fromIndex, guard) {\n collection = isArrayLike(collection) ? collection : values(collection);\n fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0;\n\n var length = collection.length;\n if (fromIndex < 0) {\n fromIndex = nativeMax(length + fromIndex, 0);\n }\n return isString(collection)\n ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1)\n : (!!length && baseIndexOf(collection, value, fromIndex) > -1);\n }\n\n /**\n * Invokes the method at `path` of each element in `collection`, returning\n * an array of the results of each invoked method. Any additional arguments\n * are provided to each invoked method. If `path` is a function, it's invoked\n * for, and `this` bound to, each element in `collection`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Array|Function|string} path The path of the method to invoke or\n * the function invoked per iteration.\n * @param {...*} [args] The arguments to invoke each method with.\n * @returns {Array} Returns the array of results.\n * @example\n *\n * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort');\n * // => [[1, 5, 7], [1, 2, 3]]\n *\n * _.invokeMap([123, 456], String.prototype.split, '');\n * // => [['1', '2', '3'], ['4', '5', '6']]\n */\n var invokeMap = baseRest(function(collection, path, args) {\n var index = -1,\n isFunc = typeof path == 'function',\n result = isArrayLike(collection) ? Array(collection.length) : [];\n\n baseEach(collection, function(value) {\n result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args);\n });\n return result;\n });\n\n /**\n * Creates an object composed of keys generated from the results of running\n * each element of `collection` thru `iteratee`. The corresponding value of\n * each key is the last element responsible for generating the key. The\n * iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n * @returns {Object} Returns the composed aggregate object.\n * @example\n *\n * var array = [\n * { 'dir': 'left', 'code': 97 },\n * { 'dir': 'right', 'code': 100 }\n * ];\n *\n * _.keyBy(array, function(o) {\n * return String.fromCharCode(o.code);\n * });\n * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }\n *\n * _.keyBy(array, 'dir');\n * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }\n */\n var keyBy = createAggregator(function(result, value, key) {\n baseAssignValue(result, key, value);\n });\n\n /**\n * Creates an array of values by running each element in `collection` thru\n * `iteratee`. The iteratee is invoked with three arguments:\n * (value, index|key, collection).\n *\n * Many lodash methods are guarded to work as iteratees for methods like\n * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.\n *\n * The guarded methods are:\n * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,\n * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,\n * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,\n * `template`, `trim`, `trimEnd`, `trimStart`, and `words`\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * _.map([4, 8], square);\n * // => [16, 64]\n *\n * _.map({ 'a': 4, 'b': 8 }, square);\n * // => [16, 64] (iteration order is not guaranteed)\n *\n * var users = [\n * { 'user': 'barney' },\n * { 'user': 'fred' }\n * ];\n *\n * // The `_.property` iteratee shorthand.\n * _.map(users, 'user');\n * // => ['barney', 'fred']\n */\n function map(collection, iteratee) {\n var func = isArray(collection) ? arrayMap : baseMap;\n return func(collection, getIteratee(iteratee, 3));\n }\n\n /**\n * This method is like `_.sortBy` except that it allows specifying the sort\n * orders of the iteratees to sort by. If `orders` is unspecified, all values\n * are sorted in ascending order. Otherwise, specify an order of \"desc\" for\n * descending or \"asc\" for ascending sort order of corresponding values.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]]\n * The iteratees to sort by.\n * @param {string[]} [orders] The sort orders of `iteratees`.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.\n * @returns {Array} Returns the new sorted array.\n * @example\n *\n * var users = [\n * { 'user': 'fred', 'age': 48 },\n * { 'user': 'barney', 'age': 34 },\n * { 'user': 'fred', 'age': 40 },\n * { 'user': 'barney', 'age': 36 }\n * ];\n *\n * // Sort by `user` in ascending order and by `age` in descending order.\n * _.orderBy(users, ['user', 'age'], ['asc', 'desc']);\n * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]\n */\n function orderBy(collection, iteratees, orders, guard) {\n if (collection == null) {\n return [];\n }\n if (!isArray(iteratees)) {\n iteratees = iteratees == null ? [] : [iteratees];\n }\n orders = guard ? undefined : orders;\n if (!isArray(orders)) {\n orders = orders == null ? [] : [orders];\n }\n return baseOrderBy(collection, iteratees, orders);\n }\n\n /**\n * Creates an array of elements split into two groups, the first of which\n * contains elements `predicate` returns truthy for, the second of which\n * contains elements `predicate` returns falsey for. The predicate is\n * invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the array of grouped elements.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': false },\n * { 'user': 'fred', 'age': 40, 'active': true },\n * { 'user': 'pebbles', 'age': 1, 'active': false }\n * ];\n *\n * _.partition(users, function(o) { return o.active; });\n * // => objects for [['fred'], ['barney', 'pebbles']]\n *\n * // The `_.matches` iteratee shorthand.\n * _.partition(users, { 'age': 1, 'active': false });\n * // => objects for [['pebbles'], ['barney', 'fred']]\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.partition(users, ['active', false]);\n * // => objects for [['barney', 'pebbles'], ['fred']]\n *\n * // The `_.property` iteratee shorthand.\n * _.partition(users, 'active');\n * // => objects for [['fred'], ['barney', 'pebbles']]\n */\n var partition = createAggregator(function(result, value, key) {\n result[key ? 0 : 1].push(value);\n }, function() { return [[], []]; });\n\n /**\n * Reduces `collection` to a value which is the accumulated result of running\n * each element in `collection` thru `iteratee`, where each successive\n * invocation is supplied the return value of the previous. If `accumulator`\n * is not given, the first element of `collection` is used as the initial\n * value. The iteratee is invoked with four arguments:\n * (accumulator, value, index|key, collection).\n *\n * Many lodash methods are guarded to work as iteratees for methods like\n * `_.reduce`, `_.reduceRight`, and `_.transform`.\n *\n * The guarded methods are:\n * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,\n * and `sortBy`\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @returns {*} Returns the accumulated value.\n * @see _.reduceRight\n * @example\n *\n * _.reduce([1, 2], function(sum, n) {\n * return sum + n;\n * }, 0);\n * // => 3\n *\n * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {\n * (result[value] || (result[value] = [])).push(key);\n * return result;\n * }, {});\n * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)\n */\n function reduce(collection, iteratee, accumulator) {\n var func = isArray(collection) ? arrayReduce : baseReduce,\n initAccum = arguments.length < 3;\n\n return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach);\n }\n\n /**\n * This method is like `_.reduce` except that it iterates over elements of\n * `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @returns {*} Returns the accumulated value.\n * @see _.reduce\n * @example\n *\n * var array = [[0, 1], [2, 3], [4, 5]];\n *\n * _.reduceRight(array, function(flattened, other) {\n * return flattened.concat(other);\n * }, []);\n * // => [4, 5, 2, 3, 0, 1]\n */\n function reduceRight(collection, iteratee, accumulator) {\n var func = isArray(collection) ? arrayReduceRight : baseReduce,\n initAccum = arguments.length < 3;\n\n return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight);\n }\n\n /**\n * The opposite of `_.filter`; this method returns the elements of `collection`\n * that `predicate` does **not** return truthy for.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n * @see _.filter\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': false },\n * { 'user': 'fred', 'age': 40, 'active': true }\n * ];\n *\n * _.reject(users, function(o) { return !o.active; });\n * // => objects for ['fred']\n *\n * // The `_.matches` iteratee shorthand.\n * _.reject(users, { 'age': 40, 'active': true });\n * // => objects for ['barney']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.reject(users, ['active', false]);\n * // => objects for ['fred']\n *\n * // The `_.property` iteratee shorthand.\n * _.reject(users, 'active');\n * // => objects for ['barney']\n */\n function reject(collection, predicate) {\n var func = isArray(collection) ? arrayFilter : baseFilter;\n return func(collection, negate(getIteratee(predicate, 3)));\n }\n\n /**\n * Gets a random element from `collection`.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to sample.\n * @returns {*} Returns the random element.\n * @example\n *\n * _.sample([1, 2, 3, 4]);\n * // => 2\n */\n function sample(collection) {\n var func = isArray(collection) ? arraySample : baseSample;\n return func(collection);\n }\n\n /**\n * Gets `n` random elements at unique keys from `collection` up to the\n * size of `collection`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to sample.\n * @param {number} [n=1] The number of elements to sample.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the random elements.\n * @example\n *\n * _.sampleSize([1, 2, 3], 2);\n * // => [3, 1]\n *\n * _.sampleSize([1, 2, 3], 4);\n * // => [2, 3, 1]\n */\n function sampleSize(collection, n, guard) {\n if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) {\n n = 1;\n } else {\n n = toInteger(n);\n }\n var func = isArray(collection) ? arraySampleSize : baseSampleSize;\n return func(collection, n);\n }\n\n /**\n * Creates an array of shuffled values, using a version of the\n * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to shuffle.\n * @returns {Array} Returns the new shuffled array.\n * @example\n *\n * _.shuffle([1, 2, 3, 4]);\n * // => [4, 1, 3, 2]\n */\n function shuffle(collection) {\n var func = isArray(collection) ? arrayShuffle : baseShuffle;\n return func(collection);\n }\n\n /**\n * Gets the size of `collection` by returning its length for array-like\n * values or the number of own enumerable string keyed properties for objects.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object|string} collection The collection to inspect.\n * @returns {number} Returns the collection size.\n * @example\n *\n * _.size([1, 2, 3]);\n * // => 3\n *\n * _.size({ 'a': 1, 'b': 2 });\n * // => 2\n *\n * _.size('pebbles');\n * // => 7\n */\n function size(collection) {\n if (collection == null) {\n return 0;\n }\n if (isArrayLike(collection)) {\n return isString(collection) ? stringSize(collection) : collection.length;\n }\n var tag = getTag(collection);\n if (tag == mapTag || tag == setTag) {\n return collection.size;\n }\n return baseKeys(collection).length;\n }\n\n /**\n * Checks if `predicate` returns truthy for **any** element of `collection`.\n * Iteration is stopped once `predicate` returns truthy. The predicate is\n * invoked with three arguments: (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n * @example\n *\n * _.some([null, 0, 'yes', false], Boolean);\n * // => true\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false }\n * ];\n *\n * // The `_.matches` iteratee shorthand.\n * _.some(users, { 'user': 'barney', 'active': false });\n * // => false\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.some(users, ['active', false]);\n * // => true\n *\n * // The `_.property` iteratee shorthand.\n * _.some(users, 'active');\n * // => true\n */\n function some(collection, predicate, guard) {\n var func = isArray(collection) ? arraySome : baseSome;\n if (guard && isIterateeCall(collection, predicate, guard)) {\n predicate = undefined;\n }\n return func(collection, getIteratee(predicate, 3));\n }\n\n /**\n * Creates an array of elements, sorted in ascending order by the results of\n * running each element in a collection thru each iteratee. This method\n * performs a stable sort, that is, it preserves the original sort order of\n * equal elements. The iteratees are invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {...(Function|Function[])} [iteratees=[_.identity]]\n * The iteratees to sort by.\n * @returns {Array} Returns the new sorted array.\n * @example\n *\n * var users = [\n * { 'user': 'fred', 'age': 48 },\n * { 'user': 'barney', 'age': 36 },\n * { 'user': 'fred', 'age': 40 },\n * { 'user': 'barney', 'age': 34 }\n * ];\n *\n * _.sortBy(users, [function(o) { return o.user; }]);\n * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]\n *\n * _.sortBy(users, ['user', 'age']);\n * // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]]\n */\n var sortBy = baseRest(function(collection, iteratees) {\n if (collection == null) {\n return [];\n }\n var length = iteratees.length;\n if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {\n iteratees = [];\n } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {\n iteratees = [iteratees[0]];\n }\n return baseOrderBy(collection, baseFlatten(iteratees, 1), []);\n });\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\n var now = ctxNow || function() {\n return root.Date.now();\n };\n\n /*------------------------------------------------------------------------*/\n\n /**\n * The opposite of `_.before`; this method creates a function that invokes\n * `func` once it's called `n` or more times.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {number} n The number of calls before `func` is invoked.\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * var saves = ['profile', 'settings'];\n *\n * var done = _.after(saves.length, function() {\n * console.log('done saving!');\n * });\n *\n * _.forEach(saves, function(type) {\n * asyncSave({ 'type': type, 'complete': done });\n * });\n * // => Logs 'done saving!' after the two async saves have completed.\n */\n function after(n, func) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n n = toInteger(n);\n return function() {\n if (--n < 1) {\n return func.apply(this, arguments);\n }\n };\n }\n\n /**\n * Creates a function that invokes `func`, with up to `n` arguments,\n * ignoring any additional arguments.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} func The function to cap arguments for.\n * @param {number} [n=func.length] The arity cap.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the new capped function.\n * @example\n *\n * _.map(['6', '8', '10'], _.ary(parseInt, 1));\n * // => [6, 8, 10]\n */\n function ary(func, n, guard) {\n n = guard ? undefined : n;\n n = (func && n == null) ? func.length : n;\n return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n);\n }\n\n /**\n * Creates a function that invokes `func`, with the `this` binding and arguments\n * of the created function, while it's called less than `n` times. Subsequent\n * calls to the created function return the result of the last `func` invocation.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {number} n The number of calls at which `func` is no longer invoked.\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * jQuery(element).on('click', _.before(5, addContactToList));\n * // => Allows adding up to 4 contacts to the list.\n */\n function before(n, func) {\n var result;\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n n = toInteger(n);\n return function() {\n if (--n > 0) {\n result = func.apply(this, arguments);\n }\n if (n <= 1) {\n func = undefined;\n }\n return result;\n };\n }\n\n /**\n * Creates a function that invokes `func` with the `this` binding of `thisArg`\n * and `partials` prepended to the arguments it receives.\n *\n * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,\n * may be used as a placeholder for partially applied arguments.\n *\n * **Note:** Unlike native `Function#bind`, this method doesn't set the \"length\"\n * property of bound functions.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to bind.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {...*} [partials] The arguments to be partially applied.\n * @returns {Function} Returns the new bound function.\n * @example\n *\n * function greet(greeting, punctuation) {\n * return greeting + ' ' + this.user + punctuation;\n * }\n *\n * var object = { 'user': 'fred' };\n *\n * var bound = _.bind(greet, object, 'hi');\n * bound('!');\n * // => 'hi fred!'\n *\n * // Bound with placeholders.\n * var bound = _.bind(greet, object, _, '!');\n * bound('hi');\n * // => 'hi fred!'\n */\n var bind = baseRest(function(func, thisArg, partials) {\n var bitmask = WRAP_BIND_FLAG;\n if (partials.length) {\n var holders = replaceHolders(partials, getHolder(bind));\n bitmask |= WRAP_PARTIAL_FLAG;\n }\n return createWrap(func, bitmask, thisArg, partials, holders);\n });\n\n /**\n * Creates a function that invokes the method at `object[key]` with `partials`\n * prepended to the arguments it receives.\n *\n * This method differs from `_.bind` by allowing bound functions to reference\n * methods that may be redefined or don't yet exist. See\n * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern)\n * for more details.\n *\n * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic\n * builds, may be used as a placeholder for partially applied arguments.\n *\n * @static\n * @memberOf _\n * @since 0.10.0\n * @category Function\n * @param {Object} object The object to invoke the method on.\n * @param {string} key The key of the method.\n * @param {...*} [partials] The arguments to be partially applied.\n * @returns {Function} Returns the new bound function.\n * @example\n *\n * var object = {\n * 'user': 'fred',\n * 'greet': function(greeting, punctuation) {\n * return greeting + ' ' + this.user + punctuation;\n * }\n * };\n *\n * var bound = _.bindKey(object, 'greet', 'hi');\n * bound('!');\n * // => 'hi fred!'\n *\n * object.greet = function(greeting, punctuation) {\n * return greeting + 'ya ' + this.user + punctuation;\n * };\n *\n * bound('!');\n * // => 'hiya fred!'\n *\n * // Bound with placeholders.\n * var bound = _.bindKey(object, 'greet', _, '!');\n * bound('hi');\n * // => 'hiya fred!'\n */\n var bindKey = baseRest(function(object, key, partials) {\n var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG;\n if (partials.length) {\n var holders = replaceHolders(partials, getHolder(bindKey));\n bitmask |= WRAP_PARTIAL_FLAG;\n }\n return createWrap(key, bitmask, object, partials, holders);\n });\n\n /**\n * Creates a function that accepts arguments of `func` and either invokes\n * `func` returning its result, if at least `arity` number of arguments have\n * been provided, or returns a function that accepts the remaining `func`\n * arguments, and so on. The arity of `func` may be specified if `func.length`\n * is not sufficient.\n *\n * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,\n * may be used as a placeholder for provided arguments.\n *\n * **Note:** This method doesn't set the \"length\" property of curried functions.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Function\n * @param {Function} func The function to curry.\n * @param {number} [arity=func.length] The arity of `func`.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the new curried function.\n * @example\n *\n * var abc = function(a, b, c) {\n * return [a, b, c];\n * };\n *\n * var curried = _.curry(abc);\n *\n * curried(1)(2)(3);\n * // => [1, 2, 3]\n *\n * curried(1, 2)(3);\n * // => [1, 2, 3]\n *\n * curried(1, 2, 3);\n * // => [1, 2, 3]\n *\n * // Curried with placeholders.\n * curried(1)(_, 3)(2);\n * // => [1, 2, 3]\n */\n function curry(func, arity, guard) {\n arity = guard ? undefined : arity;\n var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity);\n result.placeholder = curry.placeholder;\n return result;\n }\n\n /**\n * This method is like `_.curry` except that arguments are applied to `func`\n * in the manner of `_.partialRight` instead of `_.partial`.\n *\n * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic\n * builds, may be used as a placeholder for provided arguments.\n *\n * **Note:** This method doesn't set the \"length\" property of curried functions.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} func The function to curry.\n * @param {number} [arity=func.length] The arity of `func`.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the new curried function.\n * @example\n *\n * var abc = function(a, b, c) {\n * return [a, b, c];\n * };\n *\n * var curried = _.curryRight(abc);\n *\n * curried(3)(2)(1);\n * // => [1, 2, 3]\n *\n * curried(2, 3)(1);\n * // => [1, 2, 3]\n *\n * curried(1, 2, 3);\n * // => [1, 2, 3]\n *\n * // Curried with placeholders.\n * curried(3)(1, _)(2);\n * // => [1, 2, 3]\n */\n function curryRight(func, arity, guard) {\n arity = guard ? undefined : arity;\n var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity);\n result.placeholder = curryRight.placeholder;\n return result;\n }\n\n /**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\n function debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n result = wait - timeSinceLastCall;\n\n return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n }\n\n /**\n * Defers invoking the `func` until the current call stack has cleared. Any\n * additional arguments are provided to `func` when it's invoked.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to defer.\n * @param {...*} [args] The arguments to invoke `func` with.\n * @returns {number} Returns the timer id.\n * @example\n *\n * _.defer(function(text) {\n * console.log(text);\n * }, 'deferred');\n * // => Logs 'deferred' after one millisecond.\n */\n var defer = baseRest(function(func, args) {\n return baseDelay(func, 1, args);\n });\n\n /**\n * Invokes `func` after `wait` milliseconds. Any additional arguments are\n * provided to `func` when it's invoked.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to delay.\n * @param {number} wait The number of milliseconds to delay invocation.\n * @param {...*} [args] The arguments to invoke `func` with.\n * @returns {number} Returns the timer id.\n * @example\n *\n * _.delay(function(text) {\n * console.log(text);\n * }, 1000, 'later');\n * // => Logs 'later' after one second.\n */\n var delay = baseRest(function(func, wait, args) {\n return baseDelay(func, toNumber(wait) || 0, args);\n });\n\n /**\n * Creates a function that invokes `func` with arguments reversed.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Function\n * @param {Function} func The function to flip arguments for.\n * @returns {Function} Returns the new flipped function.\n * @example\n *\n * var flipped = _.flip(function() {\n * return _.toArray(arguments);\n * });\n *\n * flipped('a', 'b', 'c', 'd');\n * // => ['d', 'c', 'b', 'a']\n */\n function flip(func) {\n return createWrap(func, WRAP_FLIP_FLAG);\n }\n\n /**\n * Creates a function that memoizes the result of `func`. If `resolver` is\n * provided, it determines the cache key for storing the result based on the\n * arguments provided to the memoized function. By default, the first argument\n * provided to the memoized function is used as the map cache key. The `func`\n * is invoked with the `this` binding of the memoized function.\n *\n * **Note:** The cache is exposed as the `cache` property on the memoized\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\n * constructor with one whose instances implement the\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n * method interface of `clear`, `delete`, `get`, `has`, and `set`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to have its output memoized.\n * @param {Function} [resolver] The function to resolve the cache key.\n * @returns {Function} Returns the new memoized function.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n * var other = { 'c': 3, 'd': 4 };\n *\n * var values = _.memoize(_.values);\n * values(object);\n * // => [1, 2]\n *\n * values(other);\n * // => [3, 4]\n *\n * object.a = 2;\n * values(object);\n * // => [1, 2]\n *\n * // Modify the result cache.\n * values.cache.set(object, ['a', 'b']);\n * values(object);\n * // => ['a', 'b']\n *\n * // Replace `_.memoize.Cache`.\n * _.memoize.Cache = WeakMap;\n */\n function memoize(func, resolver) {\n if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var memoized = function() {\n var args = arguments,\n key = resolver ? resolver.apply(this, args) : args[0],\n cache = memoized.cache;\n\n if (cache.has(key)) {\n return cache.get(key);\n }\n var result = func.apply(this, args);\n memoized.cache = cache.set(key, result) || cache;\n return result;\n };\n memoized.cache = new (memoize.Cache || MapCache);\n return memoized;\n }\n\n // Expose `MapCache`.\n memoize.Cache = MapCache;\n\n /**\n * Creates a function that negates the result of the predicate `func`. The\n * `func` predicate is invoked with the `this` binding and arguments of the\n * created function.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} predicate The predicate to negate.\n * @returns {Function} Returns the new negated function.\n * @example\n *\n * function isEven(n) {\n * return n % 2 == 0;\n * }\n *\n * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));\n * // => [1, 3, 5]\n */\n function negate(predicate) {\n if (typeof predicate != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n return function() {\n var args = arguments;\n switch (args.length) {\n case 0: return !predicate.call(this);\n case 1: return !predicate.call(this, args[0]);\n case 2: return !predicate.call(this, args[0], args[1]);\n case 3: return !predicate.call(this, args[0], args[1], args[2]);\n }\n return !predicate.apply(this, args);\n };\n }\n\n /**\n * Creates a function that is restricted to invoking `func` once. Repeat calls\n * to the function return the value of the first invocation. The `func` is\n * invoked with the `this` binding and arguments of the created function.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * var initialize = _.once(createApplication);\n * initialize();\n * initialize();\n * // => `createApplication` is invoked once\n */\n function once(func) {\n return before(2, func);\n }\n\n /**\n * Creates a function that invokes `func` with its arguments transformed.\n *\n * @static\n * @since 4.0.0\n * @memberOf _\n * @category Function\n * @param {Function} func The function to wrap.\n * @param {...(Function|Function[])} [transforms=[_.identity]]\n * The argument transforms.\n * @returns {Function} Returns the new function.\n * @example\n *\n * function doubled(n) {\n * return n * 2;\n * }\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * var func = _.overArgs(function(x, y) {\n * return [x, y];\n * }, [square, doubled]);\n *\n * func(9, 3);\n * // => [81, 6]\n *\n * func(10, 5);\n * // => [100, 10]\n */\n var overArgs = castRest(function(func, transforms) {\n transforms = (transforms.length == 1 && isArray(transforms[0]))\n ? arrayMap(transforms[0], baseUnary(getIteratee()))\n : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee()));\n\n var funcsLength = transforms.length;\n return baseRest(function(args) {\n var index = -1,\n length = nativeMin(args.length, funcsLength);\n\n while (++index < length) {\n args[index] = transforms[index].call(this, args[index]);\n }\n return apply(func, this, args);\n });\n });\n\n /**\n * Creates a function that invokes `func` with `partials` prepended to the\n * arguments it receives. This method is like `_.bind` except it does **not**\n * alter the `this` binding.\n *\n * The `_.partial.placeholder` value, which defaults to `_` in monolithic\n * builds, may be used as a placeholder for partially applied arguments.\n *\n * **Note:** This method doesn't set the \"length\" property of partially\n * applied functions.\n *\n * @static\n * @memberOf _\n * @since 0.2.0\n * @category Function\n * @param {Function} func The function to partially apply arguments to.\n * @param {...*} [partials] The arguments to be partially applied.\n * @returns {Function} Returns the new partially applied function.\n * @example\n *\n * function greet(greeting, name) {\n * return greeting + ' ' + name;\n * }\n *\n * var sayHelloTo = _.partial(greet, 'hello');\n * sayHelloTo('fred');\n * // => 'hello fred'\n *\n * // Partially applied with placeholders.\n * var greetFred = _.partial(greet, _, 'fred');\n * greetFred('hi');\n * // => 'hi fred'\n */\n var partial = baseRest(function(func, partials) {\n var holders = replaceHolders(partials, getHolder(partial));\n return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders);\n });\n\n /**\n * This method is like `_.partial` except that partially applied arguments\n * are appended to the arguments it receives.\n *\n * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic\n * builds, may be used as a placeholder for partially applied arguments.\n *\n * **Note:** This method doesn't set the \"length\" property of partially\n * applied functions.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Function\n * @param {Function} func The function to partially apply arguments to.\n * @param {...*} [partials] The arguments to be partially applied.\n * @returns {Function} Returns the new partially applied function.\n * @example\n *\n * function greet(greeting, name) {\n * return greeting + ' ' + name;\n * }\n *\n * var greetFred = _.partialRight(greet, 'fred');\n * greetFred('hi');\n * // => 'hi fred'\n *\n * // Partially applied with placeholders.\n * var sayHelloTo = _.partialRight(greet, 'hello', _);\n * sayHelloTo('fred');\n * // => 'hello fred'\n */\n var partialRight = baseRest(function(func, partials) {\n var holders = replaceHolders(partials, getHolder(partialRight));\n return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders);\n });\n\n /**\n * Creates a function that invokes `func` with arguments arranged according\n * to the specified `indexes` where the argument value at the first index is\n * provided as the first argument, the argument value at the second index is\n * provided as the second argument, and so on.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} func The function to rearrange arguments for.\n * @param {...(number|number[])} indexes The arranged argument indexes.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var rearged = _.rearg(function(a, b, c) {\n * return [a, b, c];\n * }, [2, 0, 1]);\n *\n * rearged('b', 'c', 'a')\n * // => ['a', 'b', 'c']\n */\n var rearg = flatRest(function(func, indexes) {\n return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes);\n });\n\n /**\n * Creates a function that invokes `func` with the `this` binding of the\n * created function and arguments from `start` and beyond provided as\n * an array.\n *\n * **Note:** This method is based on the\n * [rest parameter](https://mdn.io/rest_parameters).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Function\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var say = _.rest(function(what, names) {\n * return what + ' ' + _.initial(names).join(', ') +\n * (_.size(names) > 1 ? ', & ' : '') + _.last(names);\n * });\n *\n * say('hello', 'fred', 'barney', 'pebbles');\n * // => 'hello fred, barney, & pebbles'\n */\n function rest(func, start) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n start = start === undefined ? start : toInteger(start);\n return baseRest(func, start);\n }\n\n /**\n * Creates a function that invokes `func` with the `this` binding of the\n * create function and an array of arguments much like\n * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply).\n *\n * **Note:** This method is based on the\n * [spread operator](https://mdn.io/spread_operator).\n *\n * @static\n * @memberOf _\n * @since 3.2.0\n * @category Function\n * @param {Function} func The function to spread arguments over.\n * @param {number} [start=0] The start position of the spread.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var say = _.spread(function(who, what) {\n * return who + ' says ' + what;\n * });\n *\n * say(['fred', 'hello']);\n * // => 'fred says hello'\n *\n * var numbers = Promise.all([\n * Promise.resolve(40),\n * Promise.resolve(36)\n * ]);\n *\n * numbers.then(_.spread(function(x, y) {\n * return x + y;\n * }));\n * // => a Promise of 76\n */\n function spread(func, start) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n start = start == null ? 0 : nativeMax(toInteger(start), 0);\n return baseRest(function(args) {\n var array = args[start],\n otherArgs = castSlice(args, 0, start);\n\n if (array) {\n arrayPush(otherArgs, array);\n }\n return apply(func, this, otherArgs);\n });\n }\n\n /**\n * Creates a throttled function that only invokes `func` at most once per\n * every `wait` milliseconds. The throttled function comes with a `cancel`\n * method to cancel delayed `func` invocations and a `flush` method to\n * immediately invoke them. Provide `options` to indicate whether `func`\n * should be invoked on the leading and/or trailing edge of the `wait`\n * timeout. The `func` is invoked with the last arguments provided to the\n * throttled function. Subsequent calls to the throttled function return the\n * result of the last `func` invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the throttled function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.throttle` and `_.debounce`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to throttle.\n * @param {number} [wait=0] The number of milliseconds to throttle invocations to.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=true]\n * Specify invoking on the leading edge of the timeout.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new throttled function.\n * @example\n *\n * // Avoid excessively updating the position while scrolling.\n * jQuery(window).on('scroll', _.throttle(updatePosition, 100));\n *\n * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.\n * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });\n * jQuery(element).on('click', throttled);\n *\n * // Cancel the trailing throttled invocation.\n * jQuery(window).on('popstate', throttled.cancel);\n */\n function throttle(func, wait, options) {\n var leading = true,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n if (isObject(options)) {\n leading = 'leading' in options ? !!options.leading : leading;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n return debounce(func, wait, {\n 'leading': leading,\n 'maxWait': wait,\n 'trailing': trailing\n });\n }\n\n /**\n * Creates a function that accepts up to one argument, ignoring any\n * additional arguments.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Function\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n * @example\n *\n * _.map(['6', '8', '10'], _.unary(parseInt));\n * // => [6, 8, 10]\n */\n function unary(func) {\n return ary(func, 1);\n }\n\n /**\n * Creates a function that provides `value` to `wrapper` as its first\n * argument. Any additional arguments provided to the function are appended\n * to those provided to the `wrapper`. The wrapper is invoked with the `this`\n * binding of the created function.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {*} value The value to wrap.\n * @param {Function} [wrapper=identity] The wrapper function.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var p = _.wrap(_.escape, function(func, text) {\n * return '<p>' + func(text) + '</p>';\n * });\n *\n * p('fred, barney, & pebbles');\n * // => '<p>fred, barney, & pebbles</p>'\n */\n function wrap(value, wrapper) {\n return partial(castFunction(wrapper), value);\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Casts `value` as an array if it's not one.\n *\n * @static\n * @memberOf _\n * @since 4.4.0\n * @category Lang\n * @param {*} value The value to inspect.\n * @returns {Array} Returns the cast array.\n * @example\n *\n * _.castArray(1);\n * // => [1]\n *\n * _.castArray({ 'a': 1 });\n * // => [{ 'a': 1 }]\n *\n * _.castArray('abc');\n * // => ['abc']\n *\n * _.castArray(null);\n * // => [null]\n *\n * _.castArray(undefined);\n * // => [undefined]\n *\n * _.castArray();\n * // => []\n *\n * var array = [1, 2, 3];\n * console.log(_.castArray(array) === array);\n * // => true\n */\n function castArray() {\n if (!arguments.length) {\n return [];\n }\n var value = arguments[0];\n return isArray(value) ? value : [value];\n }\n\n /**\n * Creates a shallow clone of `value`.\n *\n * **Note:** This method is loosely based on the\n * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)\n * and supports cloning arrays, array buffers, booleans, date objects, maps,\n * numbers, `Object` objects, regexes, sets, strings, symbols, and typed\n * arrays. The own enumerable properties of `arguments` objects are cloned\n * as plain objects. An empty object is returned for uncloneable values such\n * as error objects, functions, DOM nodes, and WeakMaps.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to clone.\n * @returns {*} Returns the cloned value.\n * @see _.cloneDeep\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var shallow = _.clone(objects);\n * console.log(shallow[0] === objects[0]);\n * // => true\n */\n function clone(value) {\n return baseClone(value, CLONE_SYMBOLS_FLAG);\n }\n\n /**\n * This method is like `_.clone` except that it accepts `customizer` which\n * is invoked to produce the cloned value. If `customizer` returns `undefined`,\n * cloning is handled by the method instead. The `customizer` is invoked with\n * up to four arguments; (value [, index|key, object, stack]).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to clone.\n * @param {Function} [customizer] The function to customize cloning.\n * @returns {*} Returns the cloned value.\n * @see _.cloneDeepWith\n * @example\n *\n * function customizer(value) {\n * if (_.isElement(value)) {\n * return value.cloneNode(false);\n * }\n * }\n *\n * var el = _.cloneWith(document.body, customizer);\n *\n * console.log(el === document.body);\n * // => false\n * console.log(el.nodeName);\n * // => 'BODY'\n * console.log(el.childNodes.length);\n * // => 0\n */\n function cloneWith(value, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return baseClone(value, CLONE_SYMBOLS_FLAG, customizer);\n }\n\n /**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\n function cloneDeep(value) {\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n }\n\n /**\n * This method is like `_.cloneWith` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @param {Function} [customizer] The function to customize cloning.\n * @returns {*} Returns the deep cloned value.\n * @see _.cloneWith\n * @example\n *\n * function customizer(value) {\n * if (_.isElement(value)) {\n * return value.cloneNode(true);\n * }\n * }\n *\n * var el = _.cloneDeepWith(document.body, customizer);\n *\n * console.log(el === document.body);\n * // => false\n * console.log(el.nodeName);\n * // => 'BODY'\n * console.log(el.childNodes.length);\n * // => 20\n */\n function cloneDeepWith(value, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer);\n }\n\n /**\n * Checks if `object` conforms to `source` by invoking the predicate\n * properties of `source` with the corresponding property values of `object`.\n *\n * **Note:** This method is equivalent to `_.conforms` when `source` is\n * partially applied.\n *\n * @static\n * @memberOf _\n * @since 4.14.0\n * @category Lang\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property predicates to conform to.\n * @returns {boolean} Returns `true` if `object` conforms, else `false`.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n *\n * _.conformsTo(object, { 'b': function(n) { return n > 1; } });\n * // => true\n *\n * _.conformsTo(object, { 'b': function(n) { return n > 2; } });\n * // => false\n */\n function conformsTo(object, source) {\n return source == null || baseConformsTo(object, source, keys(source));\n }\n\n /**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\n function eq(value, other) {\n return value === other || (value !== value && other !== other);\n }\n\n /**\n * Checks if `value` is greater than `other`.\n *\n * @static\n * @memberOf _\n * @since 3.9.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is greater than `other`,\n * else `false`.\n * @see _.lt\n * @example\n *\n * _.gt(3, 1);\n * // => true\n *\n * _.gt(3, 3);\n * // => false\n *\n * _.gt(1, 3);\n * // => false\n */\n var gt = createRelationalOperation(baseGt);\n\n /**\n * Checks if `value` is greater than or equal to `other`.\n *\n * @static\n * @memberOf _\n * @since 3.9.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is greater than or equal to\n * `other`, else `false`.\n * @see _.lte\n * @example\n *\n * _.gte(3, 1);\n * // => true\n *\n * _.gte(3, 3);\n * // => true\n *\n * _.gte(1, 3);\n * // => false\n */\n var gte = createRelationalOperation(function(value, other) {\n return value >= other;\n });\n\n /**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\n var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n };\n\n /**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\n var isArray = Array.isArray;\n\n /**\n * Checks if `value` is classified as an `ArrayBuffer` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.\n * @example\n *\n * _.isArrayBuffer(new ArrayBuffer(2));\n * // => true\n *\n * _.isArrayBuffer(new Array(2));\n * // => false\n */\n var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer;\n\n /**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\n function isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n }\n\n /**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n * else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\n function isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n }\n\n /**\n * Checks if `value` is classified as a boolean primitive or object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a boolean, else `false`.\n * @example\n *\n * _.isBoolean(false);\n * // => true\n *\n * _.isBoolean(null);\n * // => false\n */\n function isBoolean(value) {\n return value === true || value === false ||\n (isObjectLike(value) && baseGetTag(value) == boolTag);\n }\n\n /**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\n var isBuffer = nativeIsBuffer || stubFalse;\n\n /**\n * Checks if `value` is classified as a `Date` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a date object, else `false`.\n * @example\n *\n * _.isDate(new Date);\n * // => true\n *\n * _.isDate('Mon April 23 2012');\n * // => false\n */\n var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;\n\n /**\n * Checks if `value` is likely a DOM element.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`.\n * @example\n *\n * _.isElement(document.body);\n * // => true\n *\n * _.isElement('<body>');\n * // => false\n */\n function isElement(value) {\n return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);\n }\n\n /**\n * Checks if `value` is an empty object, collection, map, or set.\n *\n * Objects are considered empty if they have no own enumerable string keyed\n * properties.\n *\n * Array-like values such as `arguments` objects, arrays, buffers, strings, or\n * jQuery-like collections are considered empty if they have a `length` of `0`.\n * Similarly, maps and sets are considered empty if they have a `size` of `0`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is empty, else `false`.\n * @example\n *\n * _.isEmpty(null);\n * // => true\n *\n * _.isEmpty(true);\n * // => true\n *\n * _.isEmpty(1);\n * // => true\n *\n * _.isEmpty([1, 2, 3]);\n * // => false\n *\n * _.isEmpty({ 'a': 1 });\n * // => false\n */\n function isEmpty(value) {\n if (value == null) {\n return true;\n }\n if (isArrayLike(value) &&\n (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||\n isBuffer(value) || isTypedArray(value) || isArguments(value))) {\n return !value.length;\n }\n var tag = getTag(value);\n if (tag == mapTag || tag == setTag) {\n return !value.size;\n }\n if (isPrototype(value)) {\n return !baseKeys(value).length;\n }\n for (var key in value) {\n if (hasOwnProperty.call(value, key)) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\n function isEqual(value, other) {\n return baseIsEqual(value, other);\n }\n\n /**\n * This method is like `_.isEqual` except that it accepts `customizer` which\n * is invoked to compare values. If `customizer` returns `undefined`, comparisons\n * are handled by the method instead. The `customizer` is invoked with up to\n * six arguments: (objValue, othValue [, index|key, object, other, stack]).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * function isGreeting(value) {\n * return /^h(?:i|ello)$/.test(value);\n * }\n *\n * function customizer(objValue, othValue) {\n * if (isGreeting(objValue) && isGreeting(othValue)) {\n * return true;\n * }\n * }\n *\n * var array = ['hello', 'goodbye'];\n * var other = ['hi', 'goodbye'];\n *\n * _.isEqualWith(array, other, customizer);\n * // => true\n */\n function isEqualWith(value, other, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n var result = customizer ? customizer(value, other) : undefined;\n return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result;\n }\n\n /**\n * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,\n * `SyntaxError`, `TypeError`, or `URIError` object.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an error object, else `false`.\n * @example\n *\n * _.isError(new Error);\n * // => true\n *\n * _.isError(Error);\n * // => false\n */\n function isError(value) {\n if (!isObjectLike(value)) {\n return false;\n }\n var tag = baseGetTag(value);\n return tag == errorTag || tag == domExcTag ||\n (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value));\n }\n\n /**\n * Checks if `value` is a finite primitive number.\n *\n * **Note:** This method is based on\n * [`Number.isFinite`](https://mdn.io/Number/isFinite).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a finite number, else `false`.\n * @example\n *\n * _.isFinite(3);\n * // => true\n *\n * _.isFinite(Number.MIN_VALUE);\n * // => true\n *\n * _.isFinite(Infinity);\n * // => false\n *\n * _.isFinite('3');\n * // => false\n */\n function isFinite(value) {\n return typeof value == 'number' && nativeIsFinite(value);\n }\n\n /**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\n function isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n }\n\n /**\n * Checks if `value` is an integer.\n *\n * **Note:** This method is based on\n * [`Number.isInteger`](https://mdn.io/Number/isInteger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an integer, else `false`.\n * @example\n *\n * _.isInteger(3);\n * // => true\n *\n * _.isInteger(Number.MIN_VALUE);\n * // => false\n *\n * _.isInteger(Infinity);\n * // => false\n *\n * _.isInteger('3');\n * // => false\n */\n function isInteger(value) {\n return typeof value == 'number' && value == toInteger(value);\n }\n\n /**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\n function isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n }\n\n /**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\n function isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n }\n\n /**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\n function isObjectLike(value) {\n return value != null && typeof value == 'object';\n }\n\n /**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\n var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\n /**\n * Performs a partial deep comparison between `object` and `source` to\n * determine if `object` contains equivalent property values.\n *\n * **Note:** This method is equivalent to `_.matches` when `source` is\n * partially applied.\n *\n * Partial comparisons will match empty array and empty object `source`\n * values against any array or object value, respectively. See `_.isEqual`\n * for a list of supported value comparisons.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n *\n * _.isMatch(object, { 'b': 2 });\n * // => true\n *\n * _.isMatch(object, { 'b': 1 });\n * // => false\n */\n function isMatch(object, source) {\n return object === source || baseIsMatch(object, source, getMatchData(source));\n }\n\n /**\n * This method is like `_.isMatch` except that it accepts `customizer` which\n * is invoked to compare values. If `customizer` returns `undefined`, comparisons\n * are handled by the method instead. The `customizer` is invoked with five\n * arguments: (objValue, srcValue, index|key, object, source).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n * @example\n *\n * function isGreeting(value) {\n * return /^h(?:i|ello)$/.test(value);\n * }\n *\n * function customizer(objValue, srcValue) {\n * if (isGreeting(objValue) && isGreeting(srcValue)) {\n * return true;\n * }\n * }\n *\n * var object = { 'greeting': 'hello' };\n * var source = { 'greeting': 'hi' };\n *\n * _.isMatchWith(object, source, customizer);\n * // => true\n */\n function isMatchWith(object, source, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return baseIsMatch(object, source, getMatchData(source), customizer);\n }\n\n /**\n * Checks if `value` is `NaN`.\n *\n * **Note:** This method is based on\n * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as\n * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for\n * `undefined` and other non-number values.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n * @example\n *\n * _.isNaN(NaN);\n * // => true\n *\n * _.isNaN(new Number(NaN));\n * // => true\n *\n * isNaN(undefined);\n * // => true\n *\n * _.isNaN(undefined);\n * // => false\n */\n function isNaN(value) {\n // An `NaN` primitive is the only value that is not equal to itself.\n // Perform the `toStringTag` check first to avoid errors with some\n // ActiveX objects in IE.\n return isNumber(value) && value != +value;\n }\n\n /**\n * Checks if `value` is a pristine native function.\n *\n * **Note:** This method can't reliably detect native functions in the presence\n * of the core-js package because core-js circumvents this kind of detection.\n * Despite multiple requests, the core-js maintainer has made it clear: any\n * attempt to fix the detection will be obstructed. As a result, we're left\n * with little choice but to throw an error. Unfortunately, this also affects\n * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill),\n * which rely on core-js.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n * @example\n *\n * _.isNative(Array.prototype.push);\n * // => true\n *\n * _.isNative(_);\n * // => false\n */\n function isNative(value) {\n if (isMaskable(value)) {\n throw new Error(CORE_ERROR_TEXT);\n }\n return baseIsNative(value);\n }\n\n /**\n * Checks if `value` is `null`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `null`, else `false`.\n * @example\n *\n * _.isNull(null);\n * // => true\n *\n * _.isNull(void 0);\n * // => false\n */\n function isNull(value) {\n return value === null;\n }\n\n /**\n * Checks if `value` is `null` or `undefined`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is nullish, else `false`.\n * @example\n *\n * _.isNil(null);\n * // => true\n *\n * _.isNil(void 0);\n * // => true\n *\n * _.isNil(NaN);\n * // => false\n */\n function isNil(value) {\n return value == null;\n }\n\n /**\n * Checks if `value` is classified as a `Number` primitive or object.\n *\n * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are\n * classified as numbers, use the `_.isFinite` method.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a number, else `false`.\n * @example\n *\n * _.isNumber(3);\n * // => true\n *\n * _.isNumber(Number.MIN_VALUE);\n * // => true\n *\n * _.isNumber(Infinity);\n * // => true\n *\n * _.isNumber('3');\n * // => false\n */\n function isNumber(value) {\n return typeof value == 'number' ||\n (isObjectLike(value) && baseGetTag(value) == numberTag);\n }\n\n /**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\n function isPlainObject(value) {\n if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n return false;\n }\n var proto = getPrototype(value);\n if (proto === null) {\n return true;\n }\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n funcToString.call(Ctor) == objectCtorString;\n }\n\n /**\n * Checks if `value` is classified as a `RegExp` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.\n * @example\n *\n * _.isRegExp(/abc/);\n * // => true\n *\n * _.isRegExp('/abc/');\n * // => false\n */\n var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;\n\n /**\n * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754\n * double precision number which isn't the result of a rounded unsafe integer.\n *\n * **Note:** This method is based on\n * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`.\n * @example\n *\n * _.isSafeInteger(3);\n * // => true\n *\n * _.isSafeInteger(Number.MIN_VALUE);\n * // => false\n *\n * _.isSafeInteger(Infinity);\n * // => false\n *\n * _.isSafeInteger('3');\n * // => false\n */\n function isSafeInteger(value) {\n return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER;\n }\n\n /**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\n var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\n /**\n * Checks if `value` is classified as a `String` primitive or object.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a string, else `false`.\n * @example\n *\n * _.isString('abc');\n * // => true\n *\n * _.isString(1);\n * // => false\n */\n function isString(value) {\n return typeof value == 'string' ||\n (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);\n }\n\n /**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\n function isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n }\n\n /**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\n var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\n /**\n * Checks if `value` is `undefined`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.\n * @example\n *\n * _.isUndefined(void 0);\n * // => true\n *\n * _.isUndefined(null);\n * // => false\n */\n function isUndefined(value) {\n return value === undefined;\n }\n\n /**\n * Checks if `value` is classified as a `WeakMap` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a weak map, else `false`.\n * @example\n *\n * _.isWeakMap(new WeakMap);\n * // => true\n *\n * _.isWeakMap(new Map);\n * // => false\n */\n function isWeakMap(value) {\n return isObjectLike(value) && getTag(value) == weakMapTag;\n }\n\n /**\n * Checks if `value` is classified as a `WeakSet` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a weak set, else `false`.\n * @example\n *\n * _.isWeakSet(new WeakSet);\n * // => true\n *\n * _.isWeakSet(new Set);\n * // => false\n */\n function isWeakSet(value) {\n return isObjectLike(value) && baseGetTag(value) == weakSetTag;\n }\n\n /**\n * Checks if `value` is less than `other`.\n *\n * @static\n * @memberOf _\n * @since 3.9.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is less than `other`,\n * else `false`.\n * @see _.gt\n * @example\n *\n * _.lt(1, 3);\n * // => true\n *\n * _.lt(3, 3);\n * // => false\n *\n * _.lt(3, 1);\n * // => false\n */\n var lt = createRelationalOperation(baseLt);\n\n /**\n * Checks if `value` is less than or equal to `other`.\n *\n * @static\n * @memberOf _\n * @since 3.9.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is less than or equal to\n * `other`, else `false`.\n * @see _.gte\n * @example\n *\n * _.lte(1, 3);\n * // => true\n *\n * _.lte(3, 3);\n * // => true\n *\n * _.lte(3, 1);\n * // => false\n */\n var lte = createRelationalOperation(function(value, other) {\n return value <= other;\n });\n\n /**\n * Converts `value` to an array.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Array} Returns the converted array.\n * @example\n *\n * _.toArray({ 'a': 1, 'b': 2 });\n * // => [1, 2]\n *\n * _.toArray('abc');\n * // => ['a', 'b', 'c']\n *\n * _.toArray(1);\n * // => []\n *\n * _.toArray(null);\n * // => []\n */\n function toArray(value) {\n if (!value) {\n return [];\n }\n if (isArrayLike(value)) {\n return isString(value) ? stringToArray(value) : copyArray(value);\n }\n if (symIterator && value[symIterator]) {\n return iteratorToArray(value[symIterator]());\n }\n var tag = getTag(value),\n func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values);\n\n return func(value);\n }\n\n /**\n * Converts `value` to a finite number.\n *\n * @static\n * @memberOf _\n * @since 4.12.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted number.\n * @example\n *\n * _.toFinite(3.2);\n * // => 3.2\n *\n * _.toFinite(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toFinite(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toFinite('3.2');\n * // => 3.2\n */\n function toFinite(value) {\n if (!value) {\n return value === 0 ? value : 0;\n }\n value = toNumber(value);\n if (value === INFINITY || value === -INFINITY) {\n var sign = (value < 0 ? -1 : 1);\n return sign * MAX_INTEGER;\n }\n return value === value ? value : 0;\n }\n\n /**\n * Converts `value` to an integer.\n *\n * **Note:** This method is loosely based on\n * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toInteger(3.2);\n * // => 3\n *\n * _.toInteger(Number.MIN_VALUE);\n * // => 0\n *\n * _.toInteger(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toInteger('3.2');\n * // => 3\n */\n function toInteger(value) {\n var result = toFinite(value),\n remainder = result % 1;\n\n return result === result ? (remainder ? result - remainder : result) : 0;\n }\n\n /**\n * Converts `value` to an integer suitable for use as the length of an\n * array-like object.\n *\n * **Note:** This method is based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toLength(3.2);\n * // => 3\n *\n * _.toLength(Number.MIN_VALUE);\n * // => 0\n *\n * _.toLength(Infinity);\n * // => 4294967295\n *\n * _.toLength('3.2');\n * // => 3\n */\n function toLength(value) {\n return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0;\n }\n\n /**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\n function toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = value.replace(reTrim, '');\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n }\n\n /**\n * Converts `value` to a plain object flattening inherited enumerable string\n * keyed properties of `value` to own properties of the plain object.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Object} Returns the converted plain object.\n * @example\n *\n * function Foo() {\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.assign({ 'a': 1 }, new Foo);\n * // => { 'a': 1, 'b': 2 }\n *\n * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));\n * // => { 'a': 1, 'b': 2, 'c': 3 }\n */\n function toPlainObject(value) {\n return copyObject(value, keysIn(value));\n }\n\n /**\n * Converts `value` to a safe integer. A safe integer can be compared and\n * represented correctly.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toSafeInteger(3.2);\n * // => 3\n *\n * _.toSafeInteger(Number.MIN_VALUE);\n * // => 0\n *\n * _.toSafeInteger(Infinity);\n * // => 9007199254740991\n *\n * _.toSafeInteger('3.2');\n * // => 3\n */\n function toSafeInteger(value) {\n return value\n ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER)\n : (value === 0 ? value : 0);\n }\n\n /**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\n function toString(value) {\n return value == null ? '' : baseToString(value);\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Assigns own enumerable string keyed properties of source objects to the\n * destination object. Source objects are applied from left to right.\n * Subsequent sources overwrite property assignments of previous sources.\n *\n * **Note:** This method mutates `object` and is loosely based on\n * [`Object.assign`](https://mdn.io/Object/assign).\n *\n * @static\n * @memberOf _\n * @since 0.10.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.assignIn\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * function Bar() {\n * this.c = 3;\n * }\n *\n * Foo.prototype.b = 2;\n * Bar.prototype.d = 4;\n *\n * _.assign({ 'a': 0 }, new Foo, new Bar);\n * // => { 'a': 1, 'c': 3 }\n */\n var assign = createAssigner(function(object, source) {\n if (isPrototype(source) || isArrayLike(source)) {\n copyObject(source, keys(source), object);\n return;\n }\n for (var key in source) {\n if (hasOwnProperty.call(source, key)) {\n assignValue(object, key, source[key]);\n }\n }\n });\n\n /**\n * This method is like `_.assign` except that it iterates over own and\n * inherited source properties.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @alias extend\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.assign\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * function Bar() {\n * this.c = 3;\n * }\n *\n * Foo.prototype.b = 2;\n * Bar.prototype.d = 4;\n *\n * _.assignIn({ 'a': 0 }, new Foo, new Bar);\n * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 }\n */\n var assignIn = createAssigner(function(object, source) {\n copyObject(source, keysIn(source), object);\n });\n\n /**\n * This method is like `_.assignIn` except that it accepts `customizer`\n * which is invoked to produce the assigned values. If `customizer` returns\n * `undefined`, assignment is handled by the method instead. The `customizer`\n * is invoked with five arguments: (objValue, srcValue, key, object, source).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @alias extendWith\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} sources The source objects.\n * @param {Function} [customizer] The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @see _.assignWith\n * @example\n *\n * function customizer(objValue, srcValue) {\n * return _.isUndefined(objValue) ? srcValue : objValue;\n * }\n *\n * var defaults = _.partialRight(_.assignInWith, customizer);\n *\n * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n * // => { 'a': 1, 'b': 2 }\n */\n var assignInWith = createAssigner(function(object, source, srcIndex, customizer) {\n copyObject(source, keysIn(source), object, customizer);\n });\n\n /**\n * This method is like `_.assign` except that it accepts `customizer`\n * which is invoked to produce the assigned values. If `customizer` returns\n * `undefined`, assignment is handled by the method instead. The `customizer`\n * is invoked with five arguments: (objValue, srcValue, key, object, source).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} sources The source objects.\n * @param {Function} [customizer] The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @see _.assignInWith\n * @example\n *\n * function customizer(objValue, srcValue) {\n * return _.isUndefined(objValue) ? srcValue : objValue;\n * }\n *\n * var defaults = _.partialRight(_.assignWith, customizer);\n *\n * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n * // => { 'a': 1, 'b': 2 }\n */\n var assignWith = createAssigner(function(object, source, srcIndex, customizer) {\n copyObject(source, keys(source), object, customizer);\n });\n\n /**\n * Creates an array of values corresponding to `paths` of `object`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {...(string|string[])} [paths] The property paths to pick.\n * @returns {Array} Returns the picked values.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };\n *\n * _.at(object, ['a[0].b.c', 'a[1]']);\n * // => [3, 4]\n */\n var at = flatRest(baseAt);\n\n /**\n * Creates an object that inherits from the `prototype` object. If a\n * `properties` object is given, its own enumerable string keyed properties\n * are assigned to the created object.\n *\n * @static\n * @memberOf _\n * @since 2.3.0\n * @category Object\n * @param {Object} prototype The object to inherit from.\n * @param {Object} [properties] The properties to assign to the object.\n * @returns {Object} Returns the new object.\n * @example\n *\n * function Shape() {\n * this.x = 0;\n * this.y = 0;\n * }\n *\n * function Circle() {\n * Shape.call(this);\n * }\n *\n * Circle.prototype = _.create(Shape.prototype, {\n * 'constructor': Circle\n * });\n *\n * var circle = new Circle;\n * circle instanceof Circle;\n * // => true\n *\n * circle instanceof Shape;\n * // => true\n */\n function create(prototype, properties) {\n var result = baseCreate(prototype);\n return properties == null ? result : baseAssign(result, properties);\n }\n\n /**\n * Assigns own and inherited enumerable string keyed properties of source\n * objects to the destination object for all destination properties that\n * resolve to `undefined`. Source objects are applied from left to right.\n * Once a property is set, additional values of the same property are ignored.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.defaultsDeep\n * @example\n *\n * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n * // => { 'a': 1, 'b': 2 }\n */\n var defaults = baseRest(function(args) {\n args.push(undefined, customDefaultsAssignIn);\n return apply(assignInWith, undefined, args);\n });\n\n /**\n * This method is like `_.defaults` except that it recursively assigns\n * default properties.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 3.10.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.defaults\n * @example\n *\n * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } });\n * // => { 'a': { 'b': 2, 'c': 3 } }\n */\n var defaultsDeep = baseRest(function(args) {\n args.push(undefined, customDefaultsMerge);\n return apply(mergeWith, undefined, args);\n });\n\n /**\n * This method is like `_.find` except that it returns the key of the first\n * element `predicate` returns truthy for instead of the element itself.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category Object\n * @param {Object} object The object to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {string|undefined} Returns the key of the matched element,\n * else `undefined`.\n * @example\n *\n * var users = {\n * 'barney': { 'age': 36, 'active': true },\n * 'fred': { 'age': 40, 'active': false },\n * 'pebbles': { 'age': 1, 'active': true }\n * };\n *\n * _.findKey(users, function(o) { return o.age < 40; });\n * // => 'barney' (iteration order is not guaranteed)\n *\n * // The `_.matches` iteratee shorthand.\n * _.findKey(users, { 'age': 1, 'active': true });\n * // => 'pebbles'\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findKey(users, ['active', false]);\n * // => 'fred'\n *\n * // The `_.property` iteratee shorthand.\n * _.findKey(users, 'active');\n * // => 'barney'\n */\n function findKey(object, predicate) {\n return baseFindKey(object, getIteratee(predicate, 3), baseForOwn);\n }\n\n /**\n * This method is like `_.findKey` except that it iterates over elements of\n * a collection in the opposite order.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Object\n * @param {Object} object The object to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {string|undefined} Returns the key of the matched element,\n * else `undefined`.\n * @example\n *\n * var users = {\n * 'barney': { 'age': 36, 'active': true },\n * 'fred': { 'age': 40, 'active': false },\n * 'pebbles': { 'age': 1, 'active': true }\n * };\n *\n * _.findLastKey(users, function(o) { return o.age < 40; });\n * // => returns 'pebbles' assuming `_.findKey` returns 'barney'\n *\n * // The `_.matches` iteratee shorthand.\n * _.findLastKey(users, { 'age': 36, 'active': true });\n * // => 'barney'\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findLastKey(users, ['active', false]);\n * // => 'fred'\n *\n * // The `_.property` iteratee shorthand.\n * _.findLastKey(users, 'active');\n * // => 'pebbles'\n */\n function findLastKey(object, predicate) {\n return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight);\n }\n\n /**\n * Iterates over own and inherited enumerable string keyed properties of an\n * object and invokes `iteratee` for each property. The iteratee is invoked\n * with three arguments: (value, key, object). Iteratee functions may exit\n * iteration early by explicitly returning `false`.\n *\n * @static\n * @memberOf _\n * @since 0.3.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forInRight\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forIn(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed).\n */\n function forIn(object, iteratee) {\n return object == null\n ? object\n : baseFor(object, getIteratee(iteratee, 3), keysIn);\n }\n\n /**\n * This method is like `_.forIn` except that it iterates over properties of\n * `object` in the opposite order.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forIn\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forInRight(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'.\n */\n function forInRight(object, iteratee) {\n return object == null\n ? object\n : baseForRight(object, getIteratee(iteratee, 3), keysIn);\n }\n\n /**\n * Iterates over own enumerable string keyed properties of an object and\n * invokes `iteratee` for each property. The iteratee is invoked with three\n * arguments: (value, key, object). Iteratee functions may exit iteration\n * early by explicitly returning `false`.\n *\n * @static\n * @memberOf _\n * @since 0.3.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forOwnRight\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forOwn(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'a' then 'b' (iteration order is not guaranteed).\n */\n function forOwn(object, iteratee) {\n return object && baseForOwn(object, getIteratee(iteratee, 3));\n }\n\n /**\n * This method is like `_.forOwn` except that it iterates over properties of\n * `object` in the opposite order.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forOwn\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forOwnRight(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'.\n */\n function forOwnRight(object, iteratee) {\n return object && baseForOwnRight(object, getIteratee(iteratee, 3));\n }\n\n /**\n * Creates an array of function property names from own enumerable properties\n * of `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to inspect.\n * @returns {Array} Returns the function names.\n * @see _.functionsIn\n * @example\n *\n * function Foo() {\n * this.a = _.constant('a');\n * this.b = _.constant('b');\n * }\n *\n * Foo.prototype.c = _.constant('c');\n *\n * _.functions(new Foo);\n * // => ['a', 'b']\n */\n function functions(object) {\n return object == null ? [] : baseFunctions(object, keys(object));\n }\n\n /**\n * Creates an array of function property names from own and inherited\n * enumerable properties of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to inspect.\n * @returns {Array} Returns the function names.\n * @see _.functions\n * @example\n *\n * function Foo() {\n * this.a = _.constant('a');\n * this.b = _.constant('b');\n * }\n *\n * Foo.prototype.c = _.constant('c');\n *\n * _.functionsIn(new Foo);\n * // => ['a', 'b', 'c']\n */\n function functionsIn(object) {\n return object == null ? [] : baseFunctions(object, keysIn(object));\n }\n\n /**\n * Gets the value at `path` of `object`. If the resolved value is\n * `undefined`, the `defaultValue` is returned in its place.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.get(object, 'a[0].b.c');\n * // => 3\n *\n * _.get(object, ['a', '0', 'b', 'c']);\n * // => 3\n *\n * _.get(object, 'a.b.c', 'default');\n * // => 'default'\n */\n function get(object, path, defaultValue) {\n var result = object == null ? undefined : baseGet(object, path);\n return result === undefined ? defaultValue : result;\n }\n\n /**\n * Checks if `path` is a direct property of `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = { 'a': { 'b': 2 } };\n * var other = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.has(object, 'a');\n * // => true\n *\n * _.has(object, 'a.b');\n * // => true\n *\n * _.has(object, ['a', 'b']);\n * // => true\n *\n * _.has(other, 'a');\n * // => false\n */\n function has(object, path) {\n return object != null && hasPath(object, path, baseHas);\n }\n\n /**\n * Checks if `path` is a direct or inherited property of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.hasIn(object, 'a');\n * // => true\n *\n * _.hasIn(object, 'a.b');\n * // => true\n *\n * _.hasIn(object, ['a', 'b']);\n * // => true\n *\n * _.hasIn(object, 'b');\n * // => false\n */\n function hasIn(object, path) {\n return object != null && hasPath(object, path, baseHasIn);\n }\n\n /**\n * Creates an object composed of the inverted keys and values of `object`.\n * If `object` contains duplicate values, subsequent values overwrite\n * property assignments of previous values.\n *\n * @static\n * @memberOf _\n * @since 0.7.0\n * @category Object\n * @param {Object} object The object to invert.\n * @returns {Object} Returns the new inverted object.\n * @example\n *\n * var object = { 'a': 1, 'b': 2, 'c': 1 };\n *\n * _.invert(object);\n * // => { '1': 'c', '2': 'b' }\n */\n var invert = createInverter(function(result, value, key) {\n result[value] = key;\n }, constant(identity));\n\n /**\n * This method is like `_.invert` except that the inverted object is generated\n * from the results of running each element of `object` thru `iteratee`. The\n * corresponding inverted value of each inverted key is an array of keys\n * responsible for generating the inverted value. The iteratee is invoked\n * with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.1.0\n * @category Object\n * @param {Object} object The object to invert.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Object} Returns the new inverted object.\n * @example\n *\n * var object = { 'a': 1, 'b': 2, 'c': 1 };\n *\n * _.invertBy(object);\n * // => { '1': ['a', 'c'], '2': ['b'] }\n *\n * _.invertBy(object, function(value) {\n * return 'group' + value;\n * });\n * // => { 'group1': ['a', 'c'], 'group2': ['b'] }\n */\n var invertBy = createInverter(function(result, value, key) {\n if (hasOwnProperty.call(result, value)) {\n result[value].push(key);\n } else {\n result[value] = [key];\n }\n }, getIteratee);\n\n /**\n * Invokes the method at `path` of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the method to invoke.\n * @param {...*} [args] The arguments to invoke the method with.\n * @returns {*} Returns the result of the invoked method.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] };\n *\n * _.invoke(object, 'a[0].b.c.slice', 1, 3);\n * // => [2, 3]\n */\n var invoke = baseRest(baseInvoke);\n\n /**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\n function keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n }\n\n /**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\n function keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n }\n\n /**\n * The opposite of `_.mapValues`; this method creates an object with the\n * same values as `object` and keys generated by running each own enumerable\n * string keyed property of `object` thru `iteratee`. The iteratee is invoked\n * with three arguments: (value, key, object).\n *\n * @static\n * @memberOf _\n * @since 3.8.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns the new mapped object.\n * @see _.mapValues\n * @example\n *\n * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {\n * return key + value;\n * });\n * // => { 'a1': 1, 'b2': 2 }\n */\n function mapKeys(object, iteratee) {\n var result = {};\n iteratee = getIteratee(iteratee, 3);\n\n baseForOwn(object, function(value, key, object) {\n baseAssignValue(result, iteratee(value, key, object), value);\n });\n return result;\n }\n\n /**\n * Creates an object with the same keys as `object` and values generated\n * by running each own enumerable string keyed property of `object` thru\n * `iteratee`. The iteratee is invoked with three arguments:\n * (value, key, object).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns the new mapped object.\n * @see _.mapKeys\n * @example\n *\n * var users = {\n * 'fred': { 'user': 'fred', 'age': 40 },\n * 'pebbles': { 'user': 'pebbles', 'age': 1 }\n * };\n *\n * _.mapValues(users, function(o) { return o.age; });\n * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\n *\n * // The `_.property` iteratee shorthand.\n * _.mapValues(users, 'age');\n * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\n */\n function mapValues(object, iteratee) {\n var result = {};\n iteratee = getIteratee(iteratee, 3);\n\n baseForOwn(object, function(value, key, object) {\n baseAssignValue(result, key, iteratee(value, key, object));\n });\n return result;\n }\n\n /**\n * This method is like `_.assign` except that it recursively merges own and\n * inherited enumerable string keyed properties of source objects into the\n * destination object. Source properties that resolve to `undefined` are\n * skipped if a destination value exists. Array and plain object properties\n * are merged recursively. Other objects and value types are overridden by\n * assignment. Source objects are applied from left to right. Subsequent\n * sources overwrite property assignments of previous sources.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {\n * 'a': [{ 'b': 2 }, { 'd': 4 }]\n * };\n *\n * var other = {\n * 'a': [{ 'c': 3 }, { 'e': 5 }]\n * };\n *\n * _.merge(object, other);\n * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }\n */\n var merge = createAssigner(function(object, source, srcIndex) {\n baseMerge(object, source, srcIndex);\n });\n\n /**\n * This method is like `_.merge` except that it accepts `customizer` which\n * is invoked to produce the merged values of the destination and source\n * properties. If `customizer` returns `undefined`, merging is handled by the\n * method instead. The `customizer` is invoked with six arguments:\n * (objValue, srcValue, key, object, source, stack).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} sources The source objects.\n * @param {Function} customizer The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @example\n *\n * function customizer(objValue, srcValue) {\n * if (_.isArray(objValue)) {\n * return objValue.concat(srcValue);\n * }\n * }\n *\n * var object = { 'a': [1], 'b': [2] };\n * var other = { 'a': [3], 'b': [4] };\n *\n * _.mergeWith(object, other, customizer);\n * // => { 'a': [1, 3], 'b': [2, 4] }\n */\n var mergeWith = createAssigner(function(object, source, srcIndex, customizer) {\n baseMerge(object, source, srcIndex, customizer);\n });\n\n /**\n * The opposite of `_.pick`; this method creates an object composed of the\n * own and inherited enumerable property paths of `object` that are not omitted.\n *\n * **Note:** This method is considerably slower than `_.pick`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The source object.\n * @param {...(string|string[])} [paths] The property paths to omit.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.omit(object, ['a', 'c']);\n * // => { 'b': '2' }\n */\n var omit = flatRest(function(object, paths) {\n var result = {};\n if (object == null) {\n return result;\n }\n var isDeep = false;\n paths = arrayMap(paths, function(path) {\n path = castPath(path, object);\n isDeep || (isDeep = path.length > 1);\n return path;\n });\n copyObject(object, getAllKeysIn(object), result);\n if (isDeep) {\n result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);\n }\n var length = paths.length;\n while (length--) {\n baseUnset(result, paths[length]);\n }\n return result;\n });\n\n /**\n * The opposite of `_.pickBy`; this method creates an object composed of\n * the own and inherited enumerable string keyed properties of `object` that\n * `predicate` doesn't return truthy for. The predicate is invoked with two\n * arguments: (value, key).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The source object.\n * @param {Function} [predicate=_.identity] The function invoked per property.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.omitBy(object, _.isNumber);\n * // => { 'b': '2' }\n */\n function omitBy(object, predicate) {\n return pickBy(object, negate(getIteratee(predicate)));\n }\n\n /**\n * Creates an object composed of the picked `object` properties.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The source object.\n * @param {...(string|string[])} [paths] The property paths to pick.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.pick(object, ['a', 'c']);\n * // => { 'a': 1, 'c': 3 }\n */\n var pick = flatRest(function(object, paths) {\n return object == null ? {} : basePick(object, paths);\n });\n\n /**\n * Creates an object composed of the `object` properties `predicate` returns\n * truthy for. The predicate is invoked with two arguments: (value, key).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The source object.\n * @param {Function} [predicate=_.identity] The function invoked per property.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.pickBy(object, _.isNumber);\n * // => { 'a': 1, 'c': 3 }\n */\n function pickBy(object, predicate) {\n if (object == null) {\n return {};\n }\n var props = arrayMap(getAllKeysIn(object), function(prop) {\n return [prop];\n });\n predicate = getIteratee(predicate);\n return basePickBy(object, props, function(value, path) {\n return predicate(value, path[0]);\n });\n }\n\n /**\n * This method is like `_.get` except that if the resolved value is a\n * function it's invoked with the `this` binding of its parent object and\n * its result is returned.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to resolve.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };\n *\n * _.result(object, 'a[0].b.c1');\n * // => 3\n *\n * _.result(object, 'a[0].b.c2');\n * // => 4\n *\n * _.result(object, 'a[0].b.c3', 'default');\n * // => 'default'\n *\n * _.result(object, 'a[0].b.c3', _.constant('default'));\n * // => 'default'\n */\n function result(object, path, defaultValue) {\n path = castPath(path, object);\n\n var index = -1,\n length = path.length;\n\n // Ensure the loop is entered when path is empty.\n if (!length) {\n length = 1;\n object = undefined;\n }\n while (++index < length) {\n var value = object == null ? undefined : object[toKey(path[index])];\n if (value === undefined) {\n index = length;\n value = defaultValue;\n }\n object = isFunction(value) ? value.call(object) : value;\n }\n return object;\n }\n\n /**\n * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,\n * it's created. Arrays are created for missing index properties while objects\n * are created for all other missing properties. Use `_.setWith` to customize\n * `path` creation.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.set(object, 'a[0].b.c', 4);\n * console.log(object.a[0].b.c);\n * // => 4\n *\n * _.set(object, ['x', '0', 'y', 'z'], 5);\n * console.log(object.x[0].y.z);\n * // => 5\n */\n function set(object, path, value) {\n return object == null ? object : baseSet(object, path, value);\n }\n\n /**\n * This method is like `_.set` except that it accepts `customizer` which is\n * invoked to produce the objects of `path`. If `customizer` returns `undefined`\n * path creation is handled by the method instead. The `customizer` is invoked\n * with three arguments: (nsValue, key, nsObject).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @param {Function} [customizer] The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {};\n *\n * _.setWith(object, '[0][1]', 'a', Object);\n * // => { '0': { '1': 'a' } }\n */\n function setWith(object, path, value, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return object == null ? object : baseSet(object, path, value, customizer);\n }\n\n /**\n * Creates an array of own enumerable string keyed-value pairs for `object`\n * which can be consumed by `_.fromPairs`. If `object` is a map or set, its\n * entries are returned.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @alias entries\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the key-value pairs.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.toPairs(new Foo);\n * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed)\n */\n var toPairs = createToPairs(keys);\n\n /**\n * Creates an array of own and inherited enumerable string keyed-value pairs\n * for `object` which can be consumed by `_.fromPairs`. If `object` is a map\n * or set, its entries are returned.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @alias entriesIn\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the key-value pairs.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.toPairsIn(new Foo);\n * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed)\n */\n var toPairsIn = createToPairs(keysIn);\n\n /**\n * An alternative to `_.reduce`; this method transforms `object` to a new\n * `accumulator` object which is the result of running each of its own\n * enumerable string keyed properties thru `iteratee`, with each invocation\n * potentially mutating the `accumulator` object. If `accumulator` is not\n * provided, a new object with the same `[[Prototype]]` will be used. The\n * iteratee is invoked with four arguments: (accumulator, value, key, object).\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @static\n * @memberOf _\n * @since 1.3.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {*} [accumulator] The custom accumulator value.\n * @returns {*} Returns the accumulated value.\n * @example\n *\n * _.transform([2, 3, 4], function(result, n) {\n * result.push(n *= n);\n * return n % 2 == 0;\n * }, []);\n * // => [4, 9]\n *\n * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {\n * (result[value] || (result[value] = [])).push(key);\n * }, {});\n * // => { '1': ['a', 'c'], '2': ['b'] }\n */\n function transform(object, iteratee, accumulator) {\n var isArr = isArray(object),\n isArrLike = isArr || isBuffer(object) || isTypedArray(object);\n\n iteratee = getIteratee(iteratee, 4);\n if (accumulator == null) {\n var Ctor = object && object.constructor;\n if (isArrLike) {\n accumulator = isArr ? new Ctor : [];\n }\n else if (isObject(object)) {\n accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};\n }\n else {\n accumulator = {};\n }\n }\n (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) {\n return iteratee(accumulator, value, index, object);\n });\n return accumulator;\n }\n\n /**\n * Removes the property at `path` of `object`.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to unset.\n * @returns {boolean} Returns `true` if the property is deleted, else `false`.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 7 } }] };\n * _.unset(object, 'a[0].b.c');\n * // => true\n *\n * console.log(object);\n * // => { 'a': [{ 'b': {} }] };\n *\n * _.unset(object, ['a', '0', 'b', 'c']);\n * // => true\n *\n * console.log(object);\n * // => { 'a': [{ 'b': {} }] };\n */\n function unset(object, path) {\n return object == null ? true : baseUnset(object, path);\n }\n\n /**\n * This method is like `_.set` except that accepts `updater` to produce the\n * value to set. Use `_.updateWith` to customize `path` creation. The `updater`\n * is invoked with one argument: (value).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.6.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {Function} updater The function to produce the updated value.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.update(object, 'a[0].b.c', function(n) { return n * n; });\n * console.log(object.a[0].b.c);\n * // => 9\n *\n * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; });\n * console.log(object.x[0].y.z);\n * // => 0\n */\n function update(object, path, updater) {\n return object == null ? object : baseUpdate(object, path, castFunction(updater));\n }\n\n /**\n * This method is like `_.update` except that it accepts `customizer` which is\n * invoked to produce the objects of `path`. If `customizer` returns `undefined`\n * path creation is handled by the method instead. The `customizer` is invoked\n * with three arguments: (nsValue, key, nsObject).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.6.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {Function} updater The function to produce the updated value.\n * @param {Function} [customizer] The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {};\n *\n * _.updateWith(object, '[0][1]', _.constant('a'), Object);\n * // => { '0': { '1': 'a' } }\n */\n function updateWith(object, path, updater, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer);\n }\n\n /**\n * Creates an array of the own enumerable string keyed property values of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property values.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.values(new Foo);\n * // => [1, 2] (iteration order is not guaranteed)\n *\n * _.values('hi');\n * // => ['h', 'i']\n */\n function values(object) {\n return object == null ? [] : baseValues(object, keys(object));\n }\n\n /**\n * Creates an array of the own and inherited enumerable string keyed property\n * values of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property values.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.valuesIn(new Foo);\n * // => [1, 2, 3] (iteration order is not guaranteed)\n */\n function valuesIn(object) {\n return object == null ? [] : baseValues(object, keysIn(object));\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Clamps `number` within the inclusive `lower` and `upper` bounds.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Number\n * @param {number} number The number to clamp.\n * @param {number} [lower] The lower bound.\n * @param {number} upper The upper bound.\n * @returns {number} Returns the clamped number.\n * @example\n *\n * _.clamp(-10, -5, 5);\n * // => -5\n *\n * _.clamp(10, -5, 5);\n * // => 5\n */\n function clamp(number, lower, upper) {\n if (upper === undefined) {\n upper = lower;\n lower = undefined;\n }\n if (upper !== undefined) {\n upper = toNumber(upper);\n upper = upper === upper ? upper : 0;\n }\n if (lower !== undefined) {\n lower = toNumber(lower);\n lower = lower === lower ? lower : 0;\n }\n return baseClamp(toNumber(number), lower, upper);\n }\n\n /**\n * Checks if `n` is between `start` and up to, but not including, `end`. If\n * `end` is not specified, it's set to `start` with `start` then set to `0`.\n * If `start` is greater than `end` the params are swapped to support\n * negative ranges.\n *\n * @static\n * @memberOf _\n * @since 3.3.0\n * @category Number\n * @param {number} number The number to check.\n * @param {number} [start=0] The start of the range.\n * @param {number} end The end of the range.\n * @returns {boolean} Returns `true` if `number` is in the range, else `false`.\n * @see _.range, _.rangeRight\n * @example\n *\n * _.inRange(3, 2, 4);\n * // => true\n *\n * _.inRange(4, 8);\n * // => true\n *\n * _.inRange(4, 2);\n * // => false\n *\n * _.inRange(2, 2);\n * // => false\n *\n * _.inRange(1.2, 2);\n * // => true\n *\n * _.inRange(5.2, 4);\n * // => false\n *\n * _.inRange(-3, -2, -6);\n * // => true\n */\n function inRange(number, start, end) {\n start = toFinite(start);\n if (end === undefined) {\n end = start;\n start = 0;\n } else {\n end = toFinite(end);\n }\n number = toNumber(number);\n return baseInRange(number, start, end);\n }\n\n /**\n * Produces a random number between the inclusive `lower` and `upper` bounds.\n * If only one argument is provided a number between `0` and the given number\n * is returned. If `floating` is `true`, or either `lower` or `upper` are\n * floats, a floating-point number is returned instead of an integer.\n *\n * **Note:** JavaScript follows the IEEE-754 standard for resolving\n * floating-point values which can produce unexpected results.\n *\n * @static\n * @memberOf _\n * @since 0.7.0\n * @category Number\n * @param {number} [lower=0] The lower bound.\n * @param {number} [upper=1] The upper bound.\n * @param {boolean} [floating] Specify returning a floating-point number.\n * @returns {number} Returns the random number.\n * @example\n *\n * _.random(0, 5);\n * // => an integer between 0 and 5\n *\n * _.random(5);\n * // => also an integer between 0 and 5\n *\n * _.random(5, true);\n * // => a floating-point number between 0 and 5\n *\n * _.random(1.2, 5.2);\n * // => a floating-point number between 1.2 and 5.2\n */\n function random(lower, upper, floating) {\n if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) {\n upper = floating = undefined;\n }\n if (floating === undefined) {\n if (typeof upper == 'boolean') {\n floating = upper;\n upper = undefined;\n }\n else if (typeof lower == 'boolean') {\n floating = lower;\n lower = undefined;\n }\n }\n if (lower === undefined && upper === undefined) {\n lower = 0;\n upper = 1;\n }\n else {\n lower = toFinite(lower);\n if (upper === undefined) {\n upper = lower;\n lower = 0;\n } else {\n upper = toFinite(upper);\n }\n }\n if (lower > upper) {\n var temp = lower;\n lower = upper;\n upper = temp;\n }\n if (floating || lower % 1 || upper % 1) {\n var rand = nativeRandom();\n return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper);\n }\n return baseRandom(lower, upper);\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the camel cased string.\n * @example\n *\n * _.camelCase('Foo Bar');\n * // => 'fooBar'\n *\n * _.camelCase('--foo-bar--');\n * // => 'fooBar'\n *\n * _.camelCase('__FOO_BAR__');\n * // => 'fooBar'\n */\n var camelCase = createCompounder(function(result, word, index) {\n word = word.toLowerCase();\n return result + (index ? capitalize(word) : word);\n });\n\n /**\n * Converts the first character of `string` to upper case and the remaining\n * to lower case.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to capitalize.\n * @returns {string} Returns the capitalized string.\n * @example\n *\n * _.capitalize('FRED');\n * // => 'Fred'\n */\n function capitalize(string) {\n return upperFirst(toString(string).toLowerCase());\n }\n\n /**\n * Deburrs `string` by converting\n * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)\n * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)\n * letters to basic Latin letters and removing\n * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to deburr.\n * @returns {string} Returns the deburred string.\n * @example\n *\n * _.deburr('déjà vu');\n * // => 'deja vu'\n */\n function deburr(string) {\n string = toString(string);\n return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');\n }\n\n /**\n * Checks if `string` ends with the given target string.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to inspect.\n * @param {string} [target] The string to search for.\n * @param {number} [position=string.length] The position to search up to.\n * @returns {boolean} Returns `true` if `string` ends with `target`,\n * else `false`.\n * @example\n *\n * _.endsWith('abc', 'c');\n * // => true\n *\n * _.endsWith('abc', 'b');\n * // => false\n *\n * _.endsWith('abc', 'b', 2);\n * // => true\n */\n function endsWith(string, target, position) {\n string = toString(string);\n target = baseToString(target);\n\n var length = string.length;\n position = position === undefined\n ? length\n : baseClamp(toInteger(position), 0, length);\n\n var end = position;\n position -= target.length;\n return position >= 0 && string.slice(position, end) == target;\n }\n\n /**\n * Converts the characters \"&\", \"<\", \">\", '\"', and \"'\" in `string` to their\n * corresponding HTML entities.\n *\n * **Note:** No other characters are escaped. To escape additional\n * characters use a third-party library like [_he_](https://mths.be/he).\n *\n * Though the \">\" character is escaped for symmetry, characters like\n * \">\" and \"/\" don't need escaping in HTML and have no special meaning\n * unless they're part of a tag or unquoted attribute value. See\n * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)\n * (under \"semi-related fun fact\") for more details.\n *\n * When working with HTML you should always\n * [quote attribute values](http://wonko.com/post/html-escaping) to reduce\n * XSS vectors.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category String\n * @param {string} [string=''] The string to escape.\n * @returns {string} Returns the escaped string.\n * @example\n *\n * _.escape('fred, barney, & pebbles');\n * // => 'fred, barney, & pebbles'\n */\n function escape(string) {\n string = toString(string);\n return (string && reHasUnescapedHtml.test(string))\n ? string.replace(reUnescapedHtml, escapeHtmlChar)\n : string;\n }\n\n /**\n * Escapes the `RegExp` special characters \"^\", \"$\", \"\\\", \".\", \"*\", \"+\",\n * \"?\", \"(\", \")\", \"[\", \"]\", \"{\", \"}\", and \"|\" in `string`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to escape.\n * @returns {string} Returns the escaped string.\n * @example\n *\n * _.escapeRegExp('[lodash](https://lodash.com/)');\n * // => '\\[lodash\\]\\(https://lodash\\.com/\\)'\n */\n function escapeRegExp(string) {\n string = toString(string);\n return (string && reHasRegExpChar.test(string))\n ? string.replace(reRegExpChar, '\\\\$&')\n : string;\n }\n\n /**\n * Converts `string` to\n * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the kebab cased string.\n * @example\n *\n * _.kebabCase('Foo Bar');\n * // => 'foo-bar'\n *\n * _.kebabCase('fooBar');\n * // => 'foo-bar'\n *\n * _.kebabCase('__FOO_BAR__');\n * // => 'foo-bar'\n */\n var kebabCase = createCompounder(function(result, word, index) {\n return result + (index ? '-' : '') + word.toLowerCase();\n });\n\n /**\n * Converts `string`, as space separated words, to lower case.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the lower cased string.\n * @example\n *\n * _.lowerCase('--Foo-Bar--');\n * // => 'foo bar'\n *\n * _.lowerCase('fooBar');\n * // => 'foo bar'\n *\n * _.lowerCase('__FOO_BAR__');\n * // => 'foo bar'\n */\n var lowerCase = createCompounder(function(result, word, index) {\n return result + (index ? ' ' : '') + word.toLowerCase();\n });\n\n /**\n * Converts the first character of `string` to lower case.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.lowerFirst('Fred');\n * // => 'fred'\n *\n * _.lowerFirst('FRED');\n * // => 'fRED'\n */\n var lowerFirst = createCaseFirst('toLowerCase');\n\n /**\n * Pads `string` on the left and right sides if it's shorter than `length`.\n * Padding characters are truncated if they can't be evenly divided by `length`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to pad.\n * @param {number} [length=0] The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padded string.\n * @example\n *\n * _.pad('abc', 8);\n * // => ' abc '\n *\n * _.pad('abc', 8, '_-');\n * // => '_-abc_-_'\n *\n * _.pad('abc', 3);\n * // => 'abc'\n */\n function pad(string, length, chars) {\n string = toString(string);\n length = toInteger(length);\n\n var strLength = length ? stringSize(string) : 0;\n if (!length || strLength >= length) {\n return string;\n }\n var mid = (length - strLength) / 2;\n return (\n createPadding(nativeFloor(mid), chars) +\n string +\n createPadding(nativeCeil(mid), chars)\n );\n }\n\n /**\n * Pads `string` on the right side if it's shorter than `length`. Padding\n * characters are truncated if they exceed `length`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to pad.\n * @param {number} [length=0] The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padded string.\n * @example\n *\n * _.padEnd('abc', 6);\n * // => 'abc '\n *\n * _.padEnd('abc', 6, '_-');\n * // => 'abc_-_'\n *\n * _.padEnd('abc', 3);\n * // => 'abc'\n */\n function padEnd(string, length, chars) {\n string = toString(string);\n length = toInteger(length);\n\n var strLength = length ? stringSize(string) : 0;\n return (length && strLength < length)\n ? (string + createPadding(length - strLength, chars))\n : string;\n }\n\n /**\n * Pads `string` on the left side if it's shorter than `length`. Padding\n * characters are truncated if they exceed `length`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to pad.\n * @param {number} [length=0] The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padded string.\n * @example\n *\n * _.padStart('abc', 6);\n * // => ' abc'\n *\n * _.padStart('abc', 6, '_-');\n * // => '_-_abc'\n *\n * _.padStart('abc', 3);\n * // => 'abc'\n */\n function padStart(string, length, chars) {\n string = toString(string);\n length = toInteger(length);\n\n var strLength = length ? stringSize(string) : 0;\n return (length && strLength < length)\n ? (createPadding(length - strLength, chars) + string)\n : string;\n }\n\n /**\n * Converts `string` to an integer of the specified radix. If `radix` is\n * `undefined` or `0`, a `radix` of `10` is used unless `value` is a\n * hexadecimal, in which case a `radix` of `16` is used.\n *\n * **Note:** This method aligns with the\n * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category String\n * @param {string} string The string to convert.\n * @param {number} [radix=10] The radix to interpret `value` by.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.parseInt('08');\n * // => 8\n *\n * _.map(['6', '08', '10'], _.parseInt);\n * // => [6, 8, 10]\n */\n function parseInt(string, radix, guard) {\n if (guard || radix == null) {\n radix = 0;\n } else if (radix) {\n radix = +radix;\n }\n return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0);\n }\n\n /**\n * Repeats the given string `n` times.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to repeat.\n * @param {number} [n=1] The number of times to repeat the string.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {string} Returns the repeated string.\n * @example\n *\n * _.repeat('*', 3);\n * // => '***'\n *\n * _.repeat('abc', 2);\n * // => 'abcabc'\n *\n * _.repeat('abc', 0);\n * // => ''\n */\n function repeat(string, n, guard) {\n if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) {\n n = 1;\n } else {\n n = toInteger(n);\n }\n return baseRepeat(toString(string), n);\n }\n\n /**\n * Replaces matches for `pattern` in `string` with `replacement`.\n *\n * **Note:** This method is based on\n * [`String#replace`](https://mdn.io/String/replace).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to modify.\n * @param {RegExp|string} pattern The pattern to replace.\n * @param {Function|string} replacement The match replacement.\n * @returns {string} Returns the modified string.\n * @example\n *\n * _.replace('Hi Fred', 'Fred', 'Barney');\n * // => 'Hi Barney'\n */\n function replace() {\n var args = arguments,\n string = toString(args[0]);\n\n return args.length < 3 ? string : string.replace(args[1], args[2]);\n }\n\n /**\n * Converts `string` to\n * [snake case](https://en.wikipedia.org/wiki/Snake_case).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the snake cased string.\n * @example\n *\n * _.snakeCase('Foo Bar');\n * // => 'foo_bar'\n *\n * _.snakeCase('fooBar');\n * // => 'foo_bar'\n *\n * _.snakeCase('--FOO-BAR--');\n * // => 'foo_bar'\n */\n var snakeCase = createCompounder(function(result, word, index) {\n return result + (index ? '_' : '') + word.toLowerCase();\n });\n\n /**\n * Splits `string` by `separator`.\n *\n * **Note:** This method is based on\n * [`String#split`](https://mdn.io/String/split).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to split.\n * @param {RegExp|string} separator The separator pattern to split by.\n * @param {number} [limit] The length to truncate results to.\n * @returns {Array} Returns the string segments.\n * @example\n *\n * _.split('a-b-c', '-', 2);\n * // => ['a', 'b']\n */\n function split(string, separator, limit) {\n if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) {\n separator = limit = undefined;\n }\n limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0;\n if (!limit) {\n return [];\n }\n string = toString(string);\n if (string && (\n typeof separator == 'string' ||\n (separator != null && !isRegExp(separator))\n )) {\n separator = baseToString(separator);\n if (!separator && hasUnicode(string)) {\n return castSlice(stringToArray(string), 0, limit);\n }\n }\n return string.split(separator, limit);\n }\n\n /**\n * Converts `string` to\n * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage).\n *\n * @static\n * @memberOf _\n * @since 3.1.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the start cased string.\n * @example\n *\n * _.startCase('--foo-bar--');\n * // => 'Foo Bar'\n *\n * _.startCase('fooBar');\n * // => 'Foo Bar'\n *\n * _.startCase('__FOO_BAR__');\n * // => 'FOO BAR'\n */\n var startCase = createCompounder(function(result, word, index) {\n return result + (index ? ' ' : '') + upperFirst(word);\n });\n\n /**\n * Checks if `string` starts with the given target string.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to inspect.\n * @param {string} [target] The string to search for.\n * @param {number} [position=0] The position to search from.\n * @returns {boolean} Returns `true` if `string` starts with `target`,\n * else `false`.\n * @example\n *\n * _.startsWith('abc', 'a');\n * // => true\n *\n * _.startsWith('abc', 'b');\n * // => false\n *\n * _.startsWith('abc', 'b', 1);\n * // => true\n */\n function startsWith(string, target, position) {\n string = toString(string);\n position = position == null\n ? 0\n : baseClamp(toInteger(position), 0, string.length);\n\n target = baseToString(target);\n return string.slice(position, position + target.length) == target;\n }\n\n /**\n * Creates a compiled template function that can interpolate data properties\n * in \"interpolate\" delimiters, HTML-escape interpolated data properties in\n * \"escape\" delimiters, and execute JavaScript in \"evaluate\" delimiters. Data\n * properties may be accessed as free variables in the template. If a setting\n * object is given, it takes precedence over `_.templateSettings` values.\n *\n * **Note:** In the development build `_.template` utilizes\n * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)\n * for easier debugging.\n *\n * For more information on precompiling templates see\n * [lodash's custom builds documentation](https://lodash.com/custom-builds).\n *\n * For more information on Chrome extension sandboxes see\n * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category String\n * @param {string} [string=''] The template string.\n * @param {Object} [options={}] The options object.\n * @param {RegExp} [options.escape=_.templateSettings.escape]\n * The HTML \"escape\" delimiter.\n * @param {RegExp} [options.evaluate=_.templateSettings.evaluate]\n * The \"evaluate\" delimiter.\n * @param {Object} [options.imports=_.templateSettings.imports]\n * An object to import into the template as free variables.\n * @param {RegExp} [options.interpolate=_.templateSettings.interpolate]\n * The \"interpolate\" delimiter.\n * @param {string} [options.sourceURL='lodash.templateSources[n]']\n * The sourceURL of the compiled template.\n * @param {string} [options.variable='obj']\n * The data object variable name.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the compiled template function.\n * @example\n *\n * // Use the \"interpolate\" delimiter to create a compiled template.\n * var compiled = _.template('hello <%= user %>!');\n * compiled({ 'user': 'fred' });\n * // => 'hello fred!'\n *\n * // Use the HTML \"escape\" delimiter to escape data property values.\n * var compiled = _.template('<b><%- value %></b>');\n * compiled({ 'value': '<script>' });\n * // => '<b><script></b>'\n *\n * // Use the \"evaluate\" delimiter to execute JavaScript and generate HTML.\n * var compiled = _.template('<% _.forEach(users, function(user) { %><li><%- user %></li><% }); %>');\n * compiled({ 'users': ['fred', 'barney'] });\n * // => '<li>fred</li><li>barney</li>'\n *\n * // Use the internal `print` function in \"evaluate\" delimiters.\n * var compiled = _.template('<% print(\"hello \" + user); %>!');\n * compiled({ 'user': 'barney' });\n * // => 'hello barney!'\n *\n * // Use the ES template literal delimiter as an \"interpolate\" delimiter.\n * // Disable support by replacing the \"interpolate\" delimiter.\n * var compiled = _.template('hello ${ user }!');\n * compiled({ 'user': 'pebbles' });\n * // => 'hello pebbles!'\n *\n * // Use backslashes to treat delimiters as plain text.\n * var compiled = _.template('<%= \"\\\\<%- value %\\\\>\" %>');\n * compiled({ 'value': 'ignored' });\n * // => '<%- value %>'\n *\n * // Use the `imports` option to import `jQuery` as `jq`.\n * var text = '<% jq.each(users, function(user) { %><li><%- user %></li><% }); %>';\n * var compiled = _.template(text, { 'imports': { 'jq': jQuery } });\n * compiled({ 'users': ['fred', 'barney'] });\n * // => '<li>fred</li><li>barney</li>'\n *\n * // Use the `sourceURL` option to specify a custom sourceURL for the template.\n * var compiled = _.template('hello <%= user %>!', { 'sourceURL': '/basic/greeting.jst' });\n * compiled(data);\n * // => Find the source of \"greeting.jst\" under the Sources tab or Resources panel of the web inspector.\n *\n * // Use the `variable` option to ensure a with-statement isn't used in the compiled template.\n * var compiled = _.template('hi <%= data.user %>!', { 'variable': 'data' });\n * compiled.source;\n * // => function(data) {\n * // var __t, __p = '';\n * // __p += 'hi ' + ((__t = ( data.user )) == null ? '' : __t) + '!';\n * // return __p;\n * // }\n *\n * // Use custom template delimiters.\n * _.templateSettings.interpolate = /{{([\\s\\S]+?)}}/g;\n * var compiled = _.template('hello {{ user }}!');\n * compiled({ 'user': 'mustache' });\n * // => 'hello mustache!'\n *\n * // Use the `source` property to inline compiled templates for meaningful\n * // line numbers in error messages and stack traces.\n * fs.writeFileSync(path.join(process.cwd(), 'jst.js'), '\\\n * var JST = {\\\n * \"main\": ' + _.template(mainText).source + '\\\n * };\\\n * ');\n */\n function template(string, options, guard) {\n // Based on John Resig's `tmpl` implementation\n // (http://ejohn.org/blog/javascript-micro-templating/)\n // and Laura Doktorova's doT.js (https://github.com/olado/doT).\n var settings = lodash.templateSettings;\n\n if (guard && isIterateeCall(string, options, guard)) {\n options = undefined;\n }\n string = toString(string);\n options = assignInWith({}, options, settings, customDefaultsAssignIn);\n\n var imports = assignInWith({}, options.imports, settings.imports, customDefaultsAssignIn),\n importsKeys = keys(imports),\n importsValues = baseValues(imports, importsKeys);\n\n var isEscaping,\n isEvaluating,\n index = 0,\n interpolate = options.interpolate || reNoMatch,\n source = \"__p += '\";\n\n // Compile the regexp to match each delimiter.\n var reDelimiters = RegExp(\n (options.escape || reNoMatch).source + '|' +\n interpolate.source + '|' +\n (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + '|' +\n (options.evaluate || reNoMatch).source + '|$'\n , 'g');\n\n // Use a sourceURL for easier debugging.\n var sourceURL = '//# sourceURL=' +\n ('sourceURL' in options\n ? options.sourceURL\n : ('lodash.templateSources[' + (++templateCounter) + ']')\n ) + '\\n';\n\n string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) {\n interpolateValue || (interpolateValue = esTemplateValue);\n\n // Escape characters that can't be included in string literals.\n source += string.slice(index, offset).replace(reUnescapedString, escapeStringChar);\n\n // Replace delimiters with snippets.\n if (escapeValue) {\n isEscaping = true;\n source += \"' +\\n__e(\" + escapeValue + \") +\\n'\";\n }\n if (evaluateValue) {\n isEvaluating = true;\n source += \"';\\n\" + evaluateValue + \";\\n__p += '\";\n }\n if (interpolateValue) {\n source += \"' +\\n((__t = (\" + interpolateValue + \")) == null ? '' : __t) +\\n'\";\n }\n index = offset + match.length;\n\n // The JS engine embedded in Adobe products needs `match` returned in\n // order to produce the correct `offset` value.\n return match;\n });\n\n source += \"';\\n\";\n\n // If `variable` is not specified wrap a with-statement around the generated\n // code to add the data object to the top of the scope chain.\n var variable = options.variable;\n if (!variable) {\n source = 'with (obj) {\\n' + source + '\\n}\\n';\n }\n // Cleanup code by stripping empty strings.\n source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source)\n .replace(reEmptyStringMiddle, '$1')\n .replace(reEmptyStringTrailing, '$1;');\n\n // Frame code as the function body.\n source = 'function(' + (variable || 'obj') + ') {\\n' +\n (variable\n ? ''\n : 'obj || (obj = {});\\n'\n ) +\n \"var __t, __p = ''\" +\n (isEscaping\n ? ', __e = _.escape'\n : ''\n ) +\n (isEvaluating\n ? ', __j = Array.prototype.join;\\n' +\n \"function print() { __p += __j.call(arguments, '') }\\n\"\n : ';\\n'\n ) +\n source +\n 'return __p\\n}';\n\n var result = attempt(function() {\n return Function(importsKeys, sourceURL + 'return ' + source)\n .apply(undefined, importsValues);\n });\n\n // Provide the compiled function's source by its `toString` method or\n // the `source` property as a convenience for inlining compiled templates.\n result.source = source;\n if (isError(result)) {\n throw result;\n }\n return result;\n }\n\n /**\n * Converts `string`, as a whole, to lower case just like\n * [String#toLowerCase](https://mdn.io/toLowerCase).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the lower cased string.\n * @example\n *\n * _.toLower('--Foo-Bar--');\n * // => '--foo-bar--'\n *\n * _.toLower('fooBar');\n * // => 'foobar'\n *\n * _.toLower('__FOO_BAR__');\n * // => '__foo_bar__'\n */\n function toLower(value) {\n return toString(value).toLowerCase();\n }\n\n /**\n * Converts `string`, as a whole, to upper case just like\n * [String#toUpperCase](https://mdn.io/toUpperCase).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the upper cased string.\n * @example\n *\n * _.toUpper('--foo-bar--');\n * // => '--FOO-BAR--'\n *\n * _.toUpper('fooBar');\n * // => 'FOOBAR'\n *\n * _.toUpper('__foo_bar__');\n * // => '__FOO_BAR__'\n */\n function toUpper(value) {\n return toString(value).toUpperCase();\n }\n\n /**\n * Removes leading and trailing whitespace or specified characters from `string`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to trim.\n * @param {string} [chars=whitespace] The characters to trim.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {string} Returns the trimmed string.\n * @example\n *\n * _.trim(' abc ');\n * // => 'abc'\n *\n * _.trim('-_-abc-_-', '_-');\n * // => 'abc'\n *\n * _.map([' foo ', ' bar '], _.trim);\n * // => ['foo', 'bar']\n */\n function trim(string, chars, guard) {\n string = toString(string);\n if (string && (guard || chars === undefined)) {\n return string.replace(reTrim, '');\n }\n if (!string || !(chars = baseToString(chars))) {\n return string;\n }\n var strSymbols = stringToArray(string),\n chrSymbols = stringToArray(chars),\n start = charsStartIndex(strSymbols, chrSymbols),\n end = charsEndIndex(strSymbols, chrSymbols) + 1;\n\n return castSlice(strSymbols, start, end).join('');\n }\n\n /**\n * Removes trailing whitespace or specified characters from `string`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to trim.\n * @param {string} [chars=whitespace] The characters to trim.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {string} Returns the trimmed string.\n * @example\n *\n * _.trimEnd(' abc ');\n * // => ' abc'\n *\n * _.trimEnd('-_-abc-_-', '_-');\n * // => '-_-abc'\n */\n function trimEnd(string, chars, guard) {\n string = toString(string);\n if (string && (guard || chars === undefined)) {\n return string.replace(reTrimEnd, '');\n }\n if (!string || !(chars = baseToString(chars))) {\n return string;\n }\n var strSymbols = stringToArray(string),\n end = charsEndIndex(strSymbols, stringToArray(chars)) + 1;\n\n return castSlice(strSymbols, 0, end).join('');\n }\n\n /**\n * Removes leading whitespace or specified characters from `string`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to trim.\n * @param {string} [chars=whitespace] The characters to trim.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {string} Returns the trimmed string.\n * @example\n *\n * _.trimStart(' abc ');\n * // => 'abc '\n *\n * _.trimStart('-_-abc-_-', '_-');\n * // => 'abc-_-'\n */\n function trimStart(string, chars, guard) {\n string = toString(string);\n if (string && (guard || chars === undefined)) {\n return string.replace(reTrimStart, '');\n }\n if (!string || !(chars = baseToString(chars))) {\n return string;\n }\n var strSymbols = stringToArray(string),\n start = charsStartIndex(strSymbols, stringToArray(chars));\n\n return castSlice(strSymbols, start).join('');\n }\n\n /**\n * Truncates `string` if it's longer than the given maximum string length.\n * The last characters of the truncated string are replaced with the omission\n * string which defaults to \"...\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to truncate.\n * @param {Object} [options={}] The options object.\n * @param {number} [options.length=30] The maximum string length.\n * @param {string} [options.omission='...'] The string to indicate text is omitted.\n * @param {RegExp|string} [options.separator] The separator pattern to truncate to.\n * @returns {string} Returns the truncated string.\n * @example\n *\n * _.truncate('hi-diddly-ho there, neighborino');\n * // => 'hi-diddly-ho there, neighbo...'\n *\n * _.truncate('hi-diddly-ho there, neighborino', {\n * 'length': 24,\n * 'separator': ' '\n * });\n * // => 'hi-diddly-ho there,...'\n *\n * _.truncate('hi-diddly-ho there, neighborino', {\n * 'length': 24,\n * 'separator': /,? +/\n * });\n * // => 'hi-diddly-ho there...'\n *\n * _.truncate('hi-diddly-ho there, neighborino', {\n * 'omission': ' [...]'\n * });\n * // => 'hi-diddly-ho there, neig [...]'\n */\n function truncate(string, options) {\n var length = DEFAULT_TRUNC_LENGTH,\n omission = DEFAULT_TRUNC_OMISSION;\n\n if (isObject(options)) {\n var separator = 'separator' in options ? options.separator : separator;\n length = 'length' in options ? toInteger(options.length) : length;\n omission = 'omission' in options ? baseToString(options.omission) : omission;\n }\n string = toString(string);\n\n var strLength = string.length;\n if (hasUnicode(string)) {\n var strSymbols = stringToArray(string);\n strLength = strSymbols.length;\n }\n if (length >= strLength) {\n return string;\n }\n var end = length - stringSize(omission);\n if (end < 1) {\n return omission;\n }\n var result = strSymbols\n ? castSlice(strSymbols, 0, end).join('')\n : string.slice(0, end);\n\n if (separator === undefined) {\n return result + omission;\n }\n if (strSymbols) {\n end += (result.length - end);\n }\n if (isRegExp(separator)) {\n if (string.slice(end).search(separator)) {\n var match,\n substring = result;\n\n if (!separator.global) {\n separator = RegExp(separator.source, toString(reFlags.exec(separator)) + 'g');\n }\n separator.lastIndex = 0;\n while ((match = separator.exec(substring))) {\n var newEnd = match.index;\n }\n result = result.slice(0, newEnd === undefined ? end : newEnd);\n }\n } else if (string.indexOf(baseToString(separator), end) != end) {\n var index = result.lastIndexOf(separator);\n if (index > -1) {\n result = result.slice(0, index);\n }\n }\n return result + omission;\n }\n\n /**\n * The inverse of `_.escape`; this method converts the HTML entities\n * `&`, `<`, `>`, `"`, and `'` in `string` to\n * their corresponding characters.\n *\n * **Note:** No other HTML entities are unescaped. To unescape additional\n * HTML entities use a third-party library like [_he_](https://mths.be/he).\n *\n * @static\n * @memberOf _\n * @since 0.6.0\n * @category String\n * @param {string} [string=''] The string to unescape.\n * @returns {string} Returns the unescaped string.\n * @example\n *\n * _.unescape('fred, barney, & pebbles');\n * // => 'fred, barney, & pebbles'\n */\n function unescape(string) {\n string = toString(string);\n return (string && reHasEscapedHtml.test(string))\n ? string.replace(reEscapedHtml, unescapeHtmlChar)\n : string;\n }\n\n /**\n * Converts `string`, as space separated words, to upper case.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the upper cased string.\n * @example\n *\n * _.upperCase('--foo-bar');\n * // => 'FOO BAR'\n *\n * _.upperCase('fooBar');\n * // => 'FOO BAR'\n *\n * _.upperCase('__foo_bar__');\n * // => 'FOO BAR'\n */\n var upperCase = createCompounder(function(result, word, index) {\n return result + (index ? ' ' : '') + word.toUpperCase();\n });\n\n /**\n * Converts the first character of `string` to upper case.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.upperFirst('fred');\n * // => 'Fred'\n *\n * _.upperFirst('FRED');\n * // => 'FRED'\n */\n var upperFirst = createCaseFirst('toUpperCase');\n\n /**\n * Splits `string` into an array of its words.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to inspect.\n * @param {RegExp|string} [pattern] The pattern to match words.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the words of `string`.\n * @example\n *\n * _.words('fred, barney, & pebbles');\n * // => ['fred', 'barney', 'pebbles']\n *\n * _.words('fred, barney, & pebbles', /[^, ]+/g);\n * // => ['fred', 'barney', '&', 'pebbles']\n */\n function words(string, pattern, guard) {\n string = toString(string);\n pattern = guard ? undefined : pattern;\n\n if (pattern === undefined) {\n return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);\n }\n return string.match(pattern) || [];\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Attempts to invoke `func`, returning either the result or the caught error\n * object. Any additional arguments are provided to `func` when it's invoked.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Util\n * @param {Function} func The function to attempt.\n * @param {...*} [args] The arguments to invoke `func` with.\n * @returns {*} Returns the `func` result or error object.\n * @example\n *\n * // Avoid throwing errors for invalid selectors.\n * var elements = _.attempt(function(selector) {\n * return document.querySelectorAll(selector);\n * }, '>_>');\n *\n * if (_.isError(elements)) {\n * elements = [];\n * }\n */\n var attempt = baseRest(function(func, args) {\n try {\n return apply(func, undefined, args);\n } catch (e) {\n return isError(e) ? e : new Error(e);\n }\n });\n\n /**\n * Binds methods of an object to the object itself, overwriting the existing\n * method.\n *\n * **Note:** This method doesn't set the \"length\" property of bound functions.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {Object} object The object to bind and assign the bound methods to.\n * @param {...(string|string[])} methodNames The object method names to bind.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var view = {\n * 'label': 'docs',\n * 'click': function() {\n * console.log('clicked ' + this.label);\n * }\n * };\n *\n * _.bindAll(view, ['click']);\n * jQuery(element).on('click', view.click);\n * // => Logs 'clicked docs' when clicked.\n */\n var bindAll = flatRest(function(object, methodNames) {\n arrayEach(methodNames, function(key) {\n key = toKey(key);\n baseAssignValue(object, key, bind(object[key], object));\n });\n return object;\n });\n\n /**\n * Creates a function that iterates over `pairs` and invokes the corresponding\n * function of the first predicate to return truthy. The predicate-function\n * pairs are invoked with the `this` binding and arguments of the created\n * function.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Util\n * @param {Array} pairs The predicate-function pairs.\n * @returns {Function} Returns the new composite function.\n * @example\n *\n * var func = _.cond([\n * [_.matches({ 'a': 1 }), _.constant('matches A')],\n * [_.conforms({ 'b': _.isNumber }), _.constant('matches B')],\n * [_.stubTrue, _.constant('no match')]\n * ]);\n *\n * func({ 'a': 1, 'b': 2 });\n * // => 'matches A'\n *\n * func({ 'a': 0, 'b': 1 });\n * // => 'matches B'\n *\n * func({ 'a': '1', 'b': '2' });\n * // => 'no match'\n */\n function cond(pairs) {\n var length = pairs == null ? 0 : pairs.length,\n toIteratee = getIteratee();\n\n pairs = !length ? [] : arrayMap(pairs, function(pair) {\n if (typeof pair[1] != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n return [toIteratee(pair[0]), pair[1]];\n });\n\n return baseRest(function(args) {\n var index = -1;\n while (++index < length) {\n var pair = pairs[index];\n if (apply(pair[0], this, args)) {\n return apply(pair[1], this, args);\n }\n }\n });\n }\n\n /**\n * Creates a function that invokes the predicate properties of `source` with\n * the corresponding property values of a given object, returning `true` if\n * all predicates return truthy, else `false`.\n *\n * **Note:** The created function is equivalent to `_.conformsTo` with\n * `source` partially applied.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Util\n * @param {Object} source The object of property predicates to conform to.\n * @returns {Function} Returns the new spec function.\n * @example\n *\n * var objects = [\n * { 'a': 2, 'b': 1 },\n * { 'a': 1, 'b': 2 }\n * ];\n *\n * _.filter(objects, _.conforms({ 'b': function(n) { return n > 1; } }));\n * // => [{ 'a': 1, 'b': 2 }]\n */\n function conforms(source) {\n return baseConforms(baseClone(source, CLONE_DEEP_FLAG));\n }\n\n /**\n * Creates a function that returns `value`.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {*} value The value to return from the new function.\n * @returns {Function} Returns the new constant function.\n * @example\n *\n * var objects = _.times(2, _.constant({ 'a': 1 }));\n *\n * console.log(objects);\n * // => [{ 'a': 1 }, { 'a': 1 }]\n *\n * console.log(objects[0] === objects[1]);\n * // => true\n */\n function constant(value) {\n return function() {\n return value;\n };\n }\n\n /**\n * Checks `value` to determine whether a default value should be returned in\n * its place. The `defaultValue` is returned if `value` is `NaN`, `null`,\n * or `undefined`.\n *\n * @static\n * @memberOf _\n * @since 4.14.0\n * @category Util\n * @param {*} value The value to check.\n * @param {*} defaultValue The default value.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * _.defaultTo(1, 10);\n * // => 1\n *\n * _.defaultTo(undefined, 10);\n * // => 10\n */\n function defaultTo(value, defaultValue) {\n return (value == null || value !== value) ? defaultValue : value;\n }\n\n /**\n * Creates a function that returns the result of invoking the given functions\n * with the `this` binding of the created function, where each successive\n * invocation is supplied the return value of the previous.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Util\n * @param {...(Function|Function[])} [funcs] The functions to invoke.\n * @returns {Function} Returns the new composite function.\n * @see _.flowRight\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * var addSquare = _.flow([_.add, square]);\n * addSquare(1, 2);\n * // => 9\n */\n var flow = createFlow();\n\n /**\n * This method is like `_.flow` except that it creates a function that\n * invokes the given functions from right to left.\n *\n * @static\n * @since 3.0.0\n * @memberOf _\n * @category Util\n * @param {...(Function|Function[])} [funcs] The functions to invoke.\n * @returns {Function} Returns the new composite function.\n * @see _.flow\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * var addSquare = _.flowRight([square, _.add]);\n * addSquare(1, 2);\n * // => 9\n */\n var flowRight = createFlow(true);\n\n /**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\n function identity(value) {\n return value;\n }\n\n /**\n * Creates a function that invokes `func` with the arguments of the created\n * function. If `func` is a property name, the created function returns the\n * property value for a given element. If `func` is an array or object, the\n * created function returns `true` for elements that contain the equivalent\n * source properties, otherwise it returns `false`.\n *\n * @static\n * @since 4.0.0\n * @memberOf _\n * @category Util\n * @param {*} [func=_.identity] The value to convert to a callback.\n * @returns {Function} Returns the callback.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': true },\n * { 'user': 'fred', 'age': 40, 'active': false }\n * ];\n *\n * // The `_.matches` iteratee shorthand.\n * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true }));\n * // => [{ 'user': 'barney', 'age': 36, 'active': true }]\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.filter(users, _.iteratee(['user', 'fred']));\n * // => [{ 'user': 'fred', 'age': 40 }]\n *\n * // The `_.property` iteratee shorthand.\n * _.map(users, _.iteratee('user'));\n * // => ['barney', 'fred']\n *\n * // Create custom iteratee shorthands.\n * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) {\n * return !_.isRegExp(func) ? iteratee(func) : function(string) {\n * return func.test(string);\n * };\n * });\n *\n * _.filter(['abc', 'def'], /ef/);\n * // => ['def']\n */\n function iteratee(func) {\n return baseIteratee(typeof func == 'function' ? func : baseClone(func, CLONE_DEEP_FLAG));\n }\n\n /**\n * Creates a function that performs a partial deep comparison between a given\n * object and `source`, returning `true` if the given object has equivalent\n * property values, else `false`.\n *\n * **Note:** The created function is equivalent to `_.isMatch` with `source`\n * partially applied.\n *\n * Partial comparisons will match empty array and empty object `source`\n * values against any array or object value, respectively. See `_.isEqual`\n * for a list of supported value comparisons.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Util\n * @param {Object} source The object of property values to match.\n * @returns {Function} Returns the new spec function.\n * @example\n *\n * var objects = [\n * { 'a': 1, 'b': 2, 'c': 3 },\n * { 'a': 4, 'b': 5, 'c': 6 }\n * ];\n *\n * _.filter(objects, _.matches({ 'a': 4, 'c': 6 }));\n * // => [{ 'a': 4, 'b': 5, 'c': 6 }]\n */\n function matches(source) {\n return baseMatches(baseClone(source, CLONE_DEEP_FLAG));\n }\n\n /**\n * Creates a function that performs a partial deep comparison between the\n * value at `path` of a given object to `srcValue`, returning `true` if the\n * object value is equivalent, else `false`.\n *\n * **Note:** Partial comparisons will match empty array and empty object\n * `srcValue` values against any array or object value, respectively. See\n * `_.isEqual` for a list of supported value comparisons.\n *\n * @static\n * @memberOf _\n * @since 3.2.0\n * @category Util\n * @param {Array|string} path The path of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n * @example\n *\n * var objects = [\n * { 'a': 1, 'b': 2, 'c': 3 },\n * { 'a': 4, 'b': 5, 'c': 6 }\n * ];\n *\n * _.find(objects, _.matchesProperty('a', 4));\n * // => { 'a': 4, 'b': 5, 'c': 6 }\n */\n function matchesProperty(path, srcValue) {\n return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG));\n }\n\n /**\n * Creates a function that invokes the method at `path` of a given object.\n * Any additional arguments are provided to the invoked method.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Util\n * @param {Array|string} path The path of the method to invoke.\n * @param {...*} [args] The arguments to invoke the method with.\n * @returns {Function} Returns the new invoker function.\n * @example\n *\n * var objects = [\n * { 'a': { 'b': _.constant(2) } },\n * { 'a': { 'b': _.constant(1) } }\n * ];\n *\n * _.map(objects, _.method('a.b'));\n * // => [2, 1]\n *\n * _.map(objects, _.method(['a', 'b']));\n * // => [2, 1]\n */\n var method = baseRest(function(path, args) {\n return function(object) {\n return baseInvoke(object, path, args);\n };\n });\n\n /**\n * The opposite of `_.method`; this method creates a function that invokes\n * the method at a given path of `object`. Any additional arguments are\n * provided to the invoked method.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Util\n * @param {Object} object The object to query.\n * @param {...*} [args] The arguments to invoke the method with.\n * @returns {Function} Returns the new invoker function.\n * @example\n *\n * var array = _.times(3, _.constant),\n * object = { 'a': array, 'b': array, 'c': array };\n *\n * _.map(['a[2]', 'c[0]'], _.methodOf(object));\n * // => [2, 0]\n *\n * _.map([['a', '2'], ['c', '0']], _.methodOf(object));\n * // => [2, 0]\n */\n var methodOf = baseRest(function(object, args) {\n return function(path) {\n return baseInvoke(object, path, args);\n };\n });\n\n /**\n * Adds all own enumerable string keyed function properties of a source\n * object to the destination object. If `object` is a function, then methods\n * are added to its prototype as well.\n *\n * **Note:** Use `_.runInContext` to create a pristine `lodash` function to\n * avoid conflicts caused by modifying the original.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {Function|Object} [object=lodash] The destination object.\n * @param {Object} source The object of functions to add.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.chain=true] Specify whether mixins are chainable.\n * @returns {Function|Object} Returns `object`.\n * @example\n *\n * function vowels(string) {\n * return _.filter(string, function(v) {\n * return /[aeiou]/i.test(v);\n * });\n * }\n *\n * _.mixin({ 'vowels': vowels });\n * _.vowels('fred');\n * // => ['e']\n *\n * _('fred').vowels().value();\n * // => ['e']\n *\n * _.mixin({ 'vowels': vowels }, { 'chain': false });\n * _('fred').vowels();\n * // => ['e']\n */\n function mixin(object, source, options) {\n var props = keys(source),\n methodNames = baseFunctions(source, props);\n\n if (options == null &&\n !(isObject(source) && (methodNames.length || !props.length))) {\n options = source;\n source = object;\n object = this;\n methodNames = baseFunctions(source, keys(source));\n }\n var chain = !(isObject(options) && 'chain' in options) || !!options.chain,\n isFunc = isFunction(object);\n\n arrayEach(methodNames, function(methodName) {\n var func = source[methodName];\n object[methodName] = func;\n if (isFunc) {\n object.prototype[methodName] = function() {\n var chainAll = this.__chain__;\n if (chain || chainAll) {\n var result = object(this.__wrapped__),\n actions = result.__actions__ = copyArray(this.__actions__);\n\n actions.push({ 'func': func, 'args': arguments, 'thisArg': object });\n result.__chain__ = chainAll;\n return result;\n }\n return func.apply(object, arrayPush([this.value()], arguments));\n };\n }\n });\n\n return object;\n }\n\n /**\n * Reverts the `_` variable to its previous value and returns a reference to\n * the `lodash` function.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @returns {Function} Returns the `lodash` function.\n * @example\n *\n * var lodash = _.noConflict();\n */\n function noConflict() {\n if (root._ === this) {\n root._ = oldDash;\n }\n return this;\n }\n\n /**\n * This method returns `undefined`.\n *\n * @static\n * @memberOf _\n * @since 2.3.0\n * @category Util\n * @example\n *\n * _.times(2, _.noop);\n * // => [undefined, undefined]\n */\n function noop() {\n // No operation performed.\n }\n\n /**\n * Creates a function that gets the argument at index `n`. If `n` is negative,\n * the nth argument from the end is returned.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Util\n * @param {number} [n=0] The index of the argument to return.\n * @returns {Function} Returns the new pass-thru function.\n * @example\n *\n * var func = _.nthArg(1);\n * func('a', 'b', 'c', 'd');\n * // => 'b'\n *\n * var func = _.nthArg(-2);\n * func('a', 'b', 'c', 'd');\n * // => 'c'\n */\n function nthArg(n) {\n n = toInteger(n);\n return baseRest(function(args) {\n return baseNth(args, n);\n });\n }\n\n /**\n * Creates a function that invokes `iteratees` with the arguments it receives\n * and returns their results.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Util\n * @param {...(Function|Function[])} [iteratees=[_.identity]]\n * The iteratees to invoke.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var func = _.over([Math.max, Math.min]);\n *\n * func(1, 2, 3, 4);\n * // => [4, 1]\n */\n var over = createOver(arrayMap);\n\n /**\n * Creates a function that checks if **all** of the `predicates` return\n * truthy when invoked with the arguments it receives.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Util\n * @param {...(Function|Function[])} [predicates=[_.identity]]\n * The predicates to check.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var func = _.overEvery([Boolean, isFinite]);\n *\n * func('1');\n * // => true\n *\n * func(null);\n * // => false\n *\n * func(NaN);\n * // => false\n */\n var overEvery = createOver(arrayEvery);\n\n /**\n * Creates a function that checks if **any** of the `predicates` return\n * truthy when invoked with the arguments it receives.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Util\n * @param {...(Function|Function[])} [predicates=[_.identity]]\n * The predicates to check.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var func = _.overSome([Boolean, isFinite]);\n *\n * func('1');\n * // => true\n *\n * func(null);\n * // => true\n *\n * func(NaN);\n * // => false\n */\n var overSome = createOver(arraySome);\n\n /**\n * Creates a function that returns the value at `path` of a given object.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n * @example\n *\n * var objects = [\n * { 'a': { 'b': 2 } },\n * { 'a': { 'b': 1 } }\n * ];\n *\n * _.map(objects, _.property('a.b'));\n * // => [2, 1]\n *\n * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');\n * // => [1, 2]\n */\n function property(path) {\n return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);\n }\n\n /**\n * The opposite of `_.property`; this method creates a function that returns\n * the value at a given path of `object`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Util\n * @param {Object} object The object to query.\n * @returns {Function} Returns the new accessor function.\n * @example\n *\n * var array = [0, 1, 2],\n * object = { 'a': array, 'b': array, 'c': array };\n *\n * _.map(['a[2]', 'c[0]'], _.propertyOf(object));\n * // => [2, 0]\n *\n * _.map([['a', '2'], ['c', '0']], _.propertyOf(object));\n * // => [2, 0]\n */\n function propertyOf(object) {\n return function(path) {\n return object == null ? undefined : baseGet(object, path);\n };\n }\n\n /**\n * Creates an array of numbers (positive and/or negative) progressing from\n * `start` up to, but not including, `end`. A step of `-1` is used if a negative\n * `start` is specified without an `end` or `step`. If `end` is not specified,\n * it's set to `start` with `start` then set to `0`.\n *\n * **Note:** JavaScript follows the IEEE-754 standard for resolving\n * floating-point values which can produce unexpected results.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {number} [start=0] The start of the range.\n * @param {number} end The end of the range.\n * @param {number} [step=1] The value to increment or decrement by.\n * @returns {Array} Returns the range of numbers.\n * @see _.inRange, _.rangeRight\n * @example\n *\n * _.range(4);\n * // => [0, 1, 2, 3]\n *\n * _.range(-4);\n * // => [0, -1, -2, -3]\n *\n * _.range(1, 5);\n * // => [1, 2, 3, 4]\n *\n * _.range(0, 20, 5);\n * // => [0, 5, 10, 15]\n *\n * _.range(0, -4, -1);\n * // => [0, -1, -2, -3]\n *\n * _.range(1, 4, 0);\n * // => [1, 1, 1]\n *\n * _.range(0);\n * // => []\n */\n var range = createRange();\n\n /**\n * This method is like `_.range` except that it populates values in\n * descending order.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Util\n * @param {number} [start=0] The start of the range.\n * @param {number} end The end of the range.\n * @param {number} [step=1] The value to increment or decrement by.\n * @returns {Array} Returns the range of numbers.\n * @see _.inRange, _.range\n * @example\n *\n * _.rangeRight(4);\n * // => [3, 2, 1, 0]\n *\n * _.rangeRight(-4);\n * // => [-3, -2, -1, 0]\n *\n * _.rangeRight(1, 5);\n * // => [4, 3, 2, 1]\n *\n * _.rangeRight(0, 20, 5);\n * // => [15, 10, 5, 0]\n *\n * _.rangeRight(0, -4, -1);\n * // => [-3, -2, -1, 0]\n *\n * _.rangeRight(1, 4, 0);\n * // => [1, 1, 1]\n *\n * _.rangeRight(0);\n * // => []\n */\n var rangeRight = createRange(true);\n\n /**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\n function stubArray() {\n return [];\n }\n\n /**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\n function stubFalse() {\n return false;\n }\n\n /**\n * This method returns a new empty object.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Object} Returns the new empty object.\n * @example\n *\n * var objects = _.times(2, _.stubObject);\n *\n * console.log(objects);\n * // => [{}, {}]\n *\n * console.log(objects[0] === objects[1]);\n * // => false\n */\n function stubObject() {\n return {};\n }\n\n /**\n * This method returns an empty string.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {string} Returns the empty string.\n * @example\n *\n * _.times(2, _.stubString);\n * // => ['', '']\n */\n function stubString() {\n return '';\n }\n\n /**\n * This method returns `true`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `true`.\n * @example\n *\n * _.times(2, _.stubTrue);\n * // => [true, true]\n */\n function stubTrue() {\n return true;\n }\n\n /**\n * Invokes the iteratee `n` times, returning an array of the results of\n * each invocation. The iteratee is invoked with one argument; (index).\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n * @example\n *\n * _.times(3, String);\n * // => ['0', '1', '2']\n *\n * _.times(4, _.constant(0));\n * // => [0, 0, 0, 0]\n */\n function times(n, iteratee) {\n n = toInteger(n);\n if (n < 1 || n > MAX_SAFE_INTEGER) {\n return [];\n }\n var index = MAX_ARRAY_LENGTH,\n length = nativeMin(n, MAX_ARRAY_LENGTH);\n\n iteratee = getIteratee(iteratee);\n n -= MAX_ARRAY_LENGTH;\n\n var result = baseTimes(length, iteratee);\n while (++index < n) {\n iteratee(index);\n }\n return result;\n }\n\n /**\n * Converts `value` to a property path array.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Util\n * @param {*} value The value to convert.\n * @returns {Array} Returns the new property path array.\n * @example\n *\n * _.toPath('a.b.c');\n * // => ['a', 'b', 'c']\n *\n * _.toPath('a[0].b.c');\n * // => ['a', '0', 'b', 'c']\n */\n function toPath(value) {\n if (isArray(value)) {\n return arrayMap(value, toKey);\n }\n return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value)));\n }\n\n /**\n * Generates a unique ID. If `prefix` is given, the ID is appended to it.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {string} [prefix=''] The value to prefix the ID with.\n * @returns {string} Returns the unique ID.\n * @example\n *\n * _.uniqueId('contact_');\n * // => 'contact_104'\n *\n * _.uniqueId();\n * // => '105'\n */\n function uniqueId(prefix) {\n var id = ++idCounter;\n return toString(prefix) + id;\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Adds two numbers.\n *\n * @static\n * @memberOf _\n * @since 3.4.0\n * @category Math\n * @param {number} augend The first number in an addition.\n * @param {number} addend The second number in an addition.\n * @returns {number} Returns the total.\n * @example\n *\n * _.add(6, 4);\n * // => 10\n */\n var add = createMathOperation(function(augend, addend) {\n return augend + addend;\n }, 0);\n\n /**\n * Computes `number` rounded up to `precision`.\n *\n * @static\n * @memberOf _\n * @since 3.10.0\n * @category Math\n * @param {number} number The number to round up.\n * @param {number} [precision=0] The precision to round up to.\n * @returns {number} Returns the rounded up number.\n * @example\n *\n * _.ceil(4.006);\n * // => 5\n *\n * _.ceil(6.004, 2);\n * // => 6.01\n *\n * _.ceil(6040, -2);\n * // => 6100\n */\n var ceil = createRound('ceil');\n\n /**\n * Divide two numbers.\n *\n * @static\n * @memberOf _\n * @since 4.7.0\n * @category Math\n * @param {number} dividend The first number in a division.\n * @param {number} divisor The second number in a division.\n * @returns {number} Returns the quotient.\n * @example\n *\n * _.divide(6, 4);\n * // => 1.5\n */\n var divide = createMathOperation(function(dividend, divisor) {\n return dividend / divisor;\n }, 1);\n\n /**\n * Computes `number` rounded down to `precision`.\n *\n * @static\n * @memberOf _\n * @since 3.10.0\n * @category Math\n * @param {number} number The number to round down.\n * @param {number} [precision=0] The precision to round down to.\n * @returns {number} Returns the rounded down number.\n * @example\n *\n * _.floor(4.006);\n * // => 4\n *\n * _.floor(0.046, 2);\n * // => 0.04\n *\n * _.floor(4060, -2);\n * // => 4000\n */\n var floor = createRound('floor');\n\n /**\n * Computes the maximum value of `array`. If `array` is empty or falsey,\n * `undefined` is returned.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Math\n * @param {Array} array The array to iterate over.\n * @returns {*} Returns the maximum value.\n * @example\n *\n * _.max([4, 2, 8, 6]);\n * // => 8\n *\n * _.max([]);\n * // => undefined\n */\n function max(array) {\n return (array && array.length)\n ? baseExtremum(array, identity, baseGt)\n : undefined;\n }\n\n /**\n * This method is like `_.max` except that it accepts `iteratee` which is\n * invoked for each element in `array` to generate the criterion by which\n * the value is ranked. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Math\n * @param {Array} array The array to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {*} Returns the maximum value.\n * @example\n *\n * var objects = [{ 'n': 1 }, { 'n': 2 }];\n *\n * _.maxBy(objects, function(o) { return o.n; });\n * // => { 'n': 2 }\n *\n * // The `_.property` iteratee shorthand.\n * _.maxBy(objects, 'n');\n * // => { 'n': 2 }\n */\n function maxBy(array, iteratee) {\n return (array && array.length)\n ? baseExtremum(array, getIteratee(iteratee, 2), baseGt)\n : undefined;\n }\n\n /**\n * Computes the mean of the values in `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Math\n * @param {Array} array The array to iterate over.\n * @returns {number} Returns the mean.\n * @example\n *\n * _.mean([4, 2, 8, 6]);\n * // => 5\n */\n function mean(array) {\n return baseMean(array, identity);\n }\n\n /**\n * This method is like `_.mean` except that it accepts `iteratee` which is\n * invoked for each element in `array` to generate the value to be averaged.\n * The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.7.0\n * @category Math\n * @param {Array} array The array to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {number} Returns the mean.\n * @example\n *\n * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];\n *\n * _.meanBy(objects, function(o) { return o.n; });\n * // => 5\n *\n * // The `_.property` iteratee shorthand.\n * _.meanBy(objects, 'n');\n * // => 5\n */\n function meanBy(array, iteratee) {\n return baseMean(array, getIteratee(iteratee, 2));\n }\n\n /**\n * Computes the minimum value of `array`. If `array` is empty or falsey,\n * `undefined` is returned.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Math\n * @param {Array} array The array to iterate over.\n * @returns {*} Returns the minimum value.\n * @example\n *\n * _.min([4, 2, 8, 6]);\n * // => 2\n *\n * _.min([]);\n * // => undefined\n */\n function min(array) {\n return (array && array.length)\n ? baseExtremum(array, identity, baseLt)\n : undefined;\n }\n\n /**\n * This method is like `_.min` except that it accepts `iteratee` which is\n * invoked for each element in `array` to generate the criterion by which\n * the value is ranked. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Math\n * @param {Array} array The array to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {*} Returns the minimum value.\n * @example\n *\n * var objects = [{ 'n': 1 }, { 'n': 2 }];\n *\n * _.minBy(objects, function(o) { return o.n; });\n * // => { 'n': 1 }\n *\n * // The `_.property` iteratee shorthand.\n * _.minBy(objects, 'n');\n * // => { 'n': 1 }\n */\n function minBy(array, iteratee) {\n return (array && array.length)\n ? baseExtremum(array, getIteratee(iteratee, 2), baseLt)\n : undefined;\n }\n\n /**\n * Multiply two numbers.\n *\n * @static\n * @memberOf _\n * @since 4.7.0\n * @category Math\n * @param {number} multiplier The first number in a multiplication.\n * @param {number} multiplicand The second number in a multiplication.\n * @returns {number} Returns the product.\n * @example\n *\n * _.multiply(6, 4);\n * // => 24\n */\n var multiply = createMathOperation(function(multiplier, multiplicand) {\n return multiplier * multiplicand;\n }, 1);\n\n /**\n * Computes `number` rounded to `precision`.\n *\n * @static\n * @memberOf _\n * @since 3.10.0\n * @category Math\n * @param {number} number The number to round.\n * @param {number} [precision=0] The precision to round to.\n * @returns {number} Returns the rounded number.\n * @example\n *\n * _.round(4.006);\n * // => 4\n *\n * _.round(4.006, 2);\n * // => 4.01\n *\n * _.round(4060, -2);\n * // => 4100\n */\n var round = createRound('round');\n\n /**\n * Subtract two numbers.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Math\n * @param {number} minuend The first number in a subtraction.\n * @param {number} subtrahend The second number in a subtraction.\n * @returns {number} Returns the difference.\n * @example\n *\n * _.subtract(6, 4);\n * // => 2\n */\n var subtract = createMathOperation(function(minuend, subtrahend) {\n return minuend - subtrahend;\n }, 0);\n\n /**\n * Computes the sum of the values in `array`.\n *\n * @static\n * @memberOf _\n * @since 3.4.0\n * @category Math\n * @param {Array} array The array to iterate over.\n * @returns {number} Returns the sum.\n * @example\n *\n * _.sum([4, 2, 8, 6]);\n * // => 20\n */\n function sum(array) {\n return (array && array.length)\n ? baseSum(array, identity)\n : 0;\n }\n\n /**\n * This method is like `_.sum` except that it accepts `iteratee` which is\n * invoked for each element in `array` to generate the value to be summed.\n * The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Math\n * @param {Array} array The array to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {number} Returns the sum.\n * @example\n *\n * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];\n *\n * _.sumBy(objects, function(o) { return o.n; });\n * // => 20\n *\n * // The `_.property` iteratee shorthand.\n * _.sumBy(objects, 'n');\n * // => 20\n */\n function sumBy(array, iteratee) {\n return (array && array.length)\n ? baseSum(array, getIteratee(iteratee, 2))\n : 0;\n }\n\n /*------------------------------------------------------------------------*/\n\n // Add methods that return wrapped values in chain sequences.\n lodash.after = after;\n lodash.ary = ary;\n lodash.assign = assign;\n lodash.assignIn = assignIn;\n lodash.assignInWith = assignInWith;\n lodash.assignWith = assignWith;\n lodash.at = at;\n lodash.before = before;\n lodash.bind = bind;\n lodash.bindAll = bindAll;\n lodash.bindKey = bindKey;\n lodash.castArray = castArray;\n lodash.chain = chain;\n lodash.chunk = chunk;\n lodash.compact = compact;\n lodash.concat = concat;\n lodash.cond = cond;\n lodash.conforms = conforms;\n lodash.constant = constant;\n lodash.countBy = countBy;\n lodash.create = create;\n lodash.curry = curry;\n lodash.curryRight = curryRight;\n lodash.debounce = debounce;\n lodash.defaults = defaults;\n lodash.defaultsDeep = defaultsDeep;\n lodash.defer = defer;\n lodash.delay = delay;\n lodash.difference = difference;\n lodash.differenceBy = differenceBy;\n lodash.differenceWith = differenceWith;\n lodash.drop = drop;\n lodash.dropRight = dropRight;\n lodash.dropRightWhile = dropRightWhile;\n lodash.dropWhile = dropWhile;\n lodash.fill = fill;\n lodash.filter = filter;\n lodash.flatMap = flatMap;\n lodash.flatMapDeep = flatMapDeep;\n lodash.flatMapDepth = flatMapDepth;\n lodash.flatten = flatten;\n lodash.flattenDeep = flattenDeep;\n lodash.flattenDepth = flattenDepth;\n lodash.flip = flip;\n lodash.flow = flow;\n lodash.flowRight = flowRight;\n lodash.fromPairs = fromPairs;\n lodash.functions = functions;\n lodash.functionsIn = functionsIn;\n lodash.groupBy = groupBy;\n lodash.initial = initial;\n lodash.intersection = intersection;\n lodash.intersectionBy = intersectionBy;\n lodash.intersectionWith = intersectionWith;\n lodash.invert = invert;\n lodash.invertBy = invertBy;\n lodash.invokeMap = invokeMap;\n lodash.iteratee = iteratee;\n lodash.keyBy = keyBy;\n lodash.keys = keys;\n lodash.keysIn = keysIn;\n lodash.map = map;\n lodash.mapKeys = mapKeys;\n lodash.mapValues = mapValues;\n lodash.matches = matches;\n lodash.matchesProperty = matchesProperty;\n lodash.memoize = memoize;\n lodash.merge = merge;\n lodash.mergeWith = mergeWith;\n lodash.method = method;\n lodash.methodOf = methodOf;\n lodash.mixin = mixin;\n lodash.negate = negate;\n lodash.nthArg = nthArg;\n lodash.omit = omit;\n lodash.omitBy = omitBy;\n lodash.once = once;\n lodash.orderBy = orderBy;\n lodash.over = over;\n lodash.overArgs = overArgs;\n lodash.overEvery = overEvery;\n lodash.overSome = overSome;\n lodash.partial = partial;\n lodash.partialRight = partialRight;\n lodash.partition = partition;\n lodash.pick = pick;\n lodash.pickBy = pickBy;\n lodash.property = property;\n lodash.propertyOf = propertyOf;\n lodash.pull = pull;\n lodash.pullAll = pullAll;\n lodash.pullAllBy = pullAllBy;\n lodash.pullAllWith = pullAllWith;\n lodash.pullAt = pullAt;\n lodash.range = range;\n lodash.rangeRight = rangeRight;\n lodash.rearg = rearg;\n lodash.reject = reject;\n lodash.remove = remove;\n lodash.rest = rest;\n lodash.reverse = reverse;\n lodash.sampleSize = sampleSize;\n lodash.set = set;\n lodash.setWith = setWith;\n lodash.shuffle = shuffle;\n lodash.slice = slice;\n lodash.sortBy = sortBy;\n lodash.sortedUniq = sortedUniq;\n lodash.sortedUniqBy = sortedUniqBy;\n lodash.split = split;\n lodash.spread = spread;\n lodash.tail = tail;\n lodash.take = take;\n lodash.takeRight = takeRight;\n lodash.takeRightWhile = takeRightWhile;\n lodash.takeWhile = takeWhile;\n lodash.tap = tap;\n lodash.throttle = throttle;\n lodash.thru = thru;\n lodash.toArray = toArray;\n lodash.toPairs = toPairs;\n lodash.toPairsIn = toPairsIn;\n lodash.toPath = toPath;\n lodash.toPlainObject = toPlainObject;\n lodash.transform = transform;\n lodash.unary = unary;\n lodash.union = union;\n lodash.unionBy = unionBy;\n lodash.unionWith = unionWith;\n lodash.uniq = uniq;\n lodash.uniqBy = uniqBy;\n lodash.uniqWith = uniqWith;\n lodash.unset = unset;\n lodash.unzip = unzip;\n lodash.unzipWith = unzipWith;\n lodash.update = update;\n lodash.updateWith = updateWith;\n lodash.values = values;\n lodash.valuesIn = valuesIn;\n lodash.without = without;\n lodash.words = words;\n lodash.wrap = wrap;\n lodash.xor = xor;\n lodash.xorBy = xorBy;\n lodash.xorWith = xorWith;\n lodash.zip = zip;\n lodash.zipObject = zipObject;\n lodash.zipObjectDeep = zipObjectDeep;\n lodash.zipWith = zipWith;\n\n // Add aliases.\n lodash.entries = toPairs;\n lodash.entriesIn = toPairsIn;\n lodash.extend = assignIn;\n lodash.extendWith = assignInWith;\n\n // Add methods to `lodash.prototype`.\n mixin(lodash, lodash);\n\n /*------------------------------------------------------------------------*/\n\n // Add methods that return unwrapped values in chain sequences.\n lodash.add = add;\n lodash.attempt = attempt;\n lodash.camelCase = camelCase;\n lodash.capitalize = capitalize;\n lodash.ceil = ceil;\n lodash.clamp = clamp;\n lodash.clone = clone;\n lodash.cloneDeep = cloneDeep;\n lodash.cloneDeepWith = cloneDeepWith;\n lodash.cloneWith = cloneWith;\n lodash.conformsTo = conformsTo;\n lodash.deburr = deburr;\n lodash.defaultTo = defaultTo;\n lodash.divide = divide;\n lodash.endsWith = endsWith;\n lodash.eq = eq;\n lodash.escape = escape;\n lodash.escapeRegExp = escapeRegExp;\n lodash.every = every;\n lodash.find = find;\n lodash.findIndex = findIndex;\n lodash.findKey = findKey;\n lodash.findLast = findLast;\n lodash.findLastIndex = findLastIndex;\n lodash.findLastKey = findLastKey;\n lodash.floor = floor;\n lodash.forEach = forEach;\n lodash.forEachRight = forEachRight;\n lodash.forIn = forIn;\n lodash.forInRight = forInRight;\n lodash.forOwn = forOwn;\n lodash.forOwnRight = forOwnRight;\n lodash.get = get;\n lodash.gt = gt;\n lodash.gte = gte;\n lodash.has = has;\n lodash.hasIn = hasIn;\n lodash.head = head;\n lodash.identity = identity;\n lodash.includes = includes;\n lodash.indexOf = indexOf;\n lodash.inRange = inRange;\n lodash.invoke = invoke;\n lodash.isArguments = isArguments;\n lodash.isArray = isArray;\n lodash.isArrayBuffer = isArrayBuffer;\n lodash.isArrayLike = isArrayLike;\n lodash.isArrayLikeObject = isArrayLikeObject;\n lodash.isBoolean = isBoolean;\n lodash.isBuffer = isBuffer;\n lodash.isDate = isDate;\n lodash.isElement = isElement;\n lodash.isEmpty = isEmpty;\n lodash.isEqual = isEqual;\n lodash.isEqualWith = isEqualWith;\n lodash.isError = isError;\n lodash.isFinite = isFinite;\n lodash.isFunction = isFunction;\n lodash.isInteger = isInteger;\n lodash.isLength = isLength;\n lodash.isMap = isMap;\n lodash.isMatch = isMatch;\n lodash.isMatchWith = isMatchWith;\n lodash.isNaN = isNaN;\n lodash.isNative = isNative;\n lodash.isNil = isNil;\n lodash.isNull = isNull;\n lodash.isNumber = isNumber;\n lodash.isObject = isObject;\n lodash.isObjectLike = isObjectLike;\n lodash.isPlainObject = isPlainObject;\n lodash.isRegExp = isRegExp;\n lodash.isSafeInteger = isSafeInteger;\n lodash.isSet = isSet;\n lodash.isString = isString;\n lodash.isSymbol = isSymbol;\n lodash.isTypedArray = isTypedArray;\n lodash.isUndefined = isUndefined;\n lodash.isWeakMap = isWeakMap;\n lodash.isWeakSet = isWeakSet;\n lodash.join = join;\n lodash.kebabCase = kebabCase;\n lodash.last = last;\n lodash.lastIndexOf = lastIndexOf;\n lodash.lowerCase = lowerCase;\n lodash.lowerFirst = lowerFirst;\n lodash.lt = lt;\n lodash.lte = lte;\n lodash.max = max;\n lodash.maxBy = maxBy;\n lodash.mean = mean;\n lodash.meanBy = meanBy;\n lodash.min = min;\n lodash.minBy = minBy;\n lodash.stubArray = stubArray;\n lodash.stubFalse = stubFalse;\n lodash.stubObject = stubObject;\n lodash.stubString = stubString;\n lodash.stubTrue = stubTrue;\n lodash.multiply = multiply;\n lodash.nth = nth;\n lodash.noConflict = noConflict;\n lodash.noop = noop;\n lodash.now = now;\n lodash.pad = pad;\n lodash.padEnd = padEnd;\n lodash.padStart = padStart;\n lodash.parseInt = parseInt;\n lodash.random = random;\n lodash.reduce = reduce;\n lodash.reduceRight = reduceRight;\n lodash.repeat = repeat;\n lodash.replace = replace;\n lodash.result = result;\n lodash.round = round;\n lodash.runInContext = runInContext;\n lodash.sample = sample;\n lodash.size = size;\n lodash.snakeCase = snakeCase;\n lodash.some = some;\n lodash.sortedIndex = sortedIndex;\n lodash.sortedIndexBy = sortedIndexBy;\n lodash.sortedIndexOf = sortedIndexOf;\n lodash.sortedLastIndex = sortedLastIndex;\n lodash.sortedLastIndexBy = sortedLastIndexBy;\n lodash.sortedLastIndexOf = sortedLastIndexOf;\n lodash.startCase = startCase;\n lodash.startsWith = startsWith;\n lodash.subtract = subtract;\n lodash.sum = sum;\n lodash.sumBy = sumBy;\n lodash.template = template;\n lodash.times = times;\n lodash.toFinite = toFinite;\n lodash.toInteger = toInteger;\n lodash.toLength = toLength;\n lodash.toLower = toLower;\n lodash.toNumber = toNumber;\n lodash.toSafeInteger = toSafeInteger;\n lodash.toString = toString;\n lodash.toUpper = toUpper;\n lodash.trim = trim;\n lodash.trimEnd = trimEnd;\n lodash.trimStart = trimStart;\n lodash.truncate = truncate;\n lodash.unescape = unescape;\n lodash.uniqueId = uniqueId;\n lodash.upperCase = upperCase;\n lodash.upperFirst = upperFirst;\n\n // Add aliases.\n lodash.each = forEach;\n lodash.eachRight = forEachRight;\n lodash.first = head;\n\n mixin(lodash, (function() {\n var source = {};\n baseForOwn(lodash, function(func, methodName) {\n if (!hasOwnProperty.call(lodash.prototype, methodName)) {\n source[methodName] = func;\n }\n });\n return source;\n }()), { 'chain': false });\n\n /*------------------------------------------------------------------------*/\n\n /**\n * The semantic version number.\n *\n * @static\n * @memberOf _\n * @type {string}\n */\n lodash.VERSION = VERSION;\n\n // Assign default placeholders.\n arrayEach(['bind', 'bindKey', 'curry', 'curryRight', 'partial', 'partialRight'], function(methodName) {\n lodash[methodName].placeholder = lodash;\n });\n\n // Add `LazyWrapper` methods for `_.drop` and `_.take` variants.\n arrayEach(['drop', 'take'], function(methodName, index) {\n LazyWrapper.prototype[methodName] = function(n) {\n n = n === undefined ? 1 : nativeMax(toInteger(n), 0);\n\n var result = (this.__filtered__ && !index)\n ? new LazyWrapper(this)\n : this.clone();\n\n if (result.__filtered__) {\n result.__takeCount__ = nativeMin(n, result.__takeCount__);\n } else {\n result.__views__.push({\n 'size': nativeMin(n, MAX_ARRAY_LENGTH),\n 'type': methodName + (result.__dir__ < 0 ? 'Right' : '')\n });\n }\n return result;\n };\n\n LazyWrapper.prototype[methodName + 'Right'] = function(n) {\n return this.reverse()[methodName](n).reverse();\n };\n });\n\n // Add `LazyWrapper` methods that accept an `iteratee` value.\n arrayEach(['filter', 'map', 'takeWhile'], function(methodName, index) {\n var type = index + 1,\n isFilter = type == LAZY_FILTER_FLAG || type == LAZY_WHILE_FLAG;\n\n LazyWrapper.prototype[methodName] = function(iteratee) {\n var result = this.clone();\n result.__iteratees__.push({\n 'iteratee': getIteratee(iteratee, 3),\n 'type': type\n });\n result.__filtered__ = result.__filtered__ || isFilter;\n return result;\n };\n });\n\n // Add `LazyWrapper` methods for `_.head` and `_.last`.\n arrayEach(['head', 'last'], function(methodName, index) {\n var takeName = 'take' + (index ? 'Right' : '');\n\n LazyWrapper.prototype[methodName] = function() {\n return this[takeName](1).value()[0];\n };\n });\n\n // Add `LazyWrapper` methods for `_.initial` and `_.tail`.\n arrayEach(['initial', 'tail'], function(methodName, index) {\n var dropName = 'drop' + (index ? '' : 'Right');\n\n LazyWrapper.prototype[methodName] = function() {\n return this.__filtered__ ? new LazyWrapper(this) : this[dropName](1);\n };\n });\n\n LazyWrapper.prototype.compact = function() {\n return this.filter(identity);\n };\n\n LazyWrapper.prototype.find = function(predicate) {\n return this.filter(predicate).head();\n };\n\n LazyWrapper.prototype.findLast = function(predicate) {\n return this.reverse().find(predicate);\n };\n\n LazyWrapper.prototype.invokeMap = baseRest(function(path, args) {\n if (typeof path == 'function') {\n return new LazyWrapper(this);\n }\n return this.map(function(value) {\n return baseInvoke(value, path, args);\n });\n });\n\n LazyWrapper.prototype.reject = function(predicate) {\n return this.filter(negate(getIteratee(predicate)));\n };\n\n LazyWrapper.prototype.slice = function(start, end) {\n start = toInteger(start);\n\n var result = this;\n if (result.__filtered__ && (start > 0 || end < 0)) {\n return new LazyWrapper(result);\n }\n if (start < 0) {\n result = result.takeRight(-start);\n } else if (start) {\n result = result.drop(start);\n }\n if (end !== undefined) {\n end = toInteger(end);\n result = end < 0 ? result.dropRight(-end) : result.take(end - start);\n }\n return result;\n };\n\n LazyWrapper.prototype.takeRightWhile = function(predicate) {\n return this.reverse().takeWhile(predicate).reverse();\n };\n\n LazyWrapper.prototype.toArray = function() {\n return this.take(MAX_ARRAY_LENGTH);\n };\n\n // Add `LazyWrapper` methods to `lodash.prototype`.\n baseForOwn(LazyWrapper.prototype, function(func, methodName) {\n var checkIteratee = /^(?:filter|find|map|reject)|While$/.test(methodName),\n isTaker = /^(?:head|last)$/.test(methodName),\n lodashFunc = lodash[isTaker ? ('take' + (methodName == 'last' ? 'Right' : '')) : methodName],\n retUnwrapped = isTaker || /^find/.test(methodName);\n\n if (!lodashFunc) {\n return;\n }\n lodash.prototype[methodName] = function() {\n var value = this.__wrapped__,\n args = isTaker ? [1] : arguments,\n isLazy = value instanceof LazyWrapper,\n iteratee = args[0],\n useLazy = isLazy || isArray(value);\n\n var interceptor = function(value) {\n var result = lodashFunc.apply(lodash, arrayPush([value], args));\n return (isTaker && chainAll) ? result[0] : result;\n };\n\n if (useLazy && checkIteratee && typeof iteratee == 'function' && iteratee.length != 1) {\n // Avoid lazy use if the iteratee has a \"length\" value other than `1`.\n isLazy = useLazy = false;\n }\n var chainAll = this.__chain__,\n isHybrid = !!this.__actions__.length,\n isUnwrapped = retUnwrapped && !chainAll,\n onlyLazy = isLazy && !isHybrid;\n\n if (!retUnwrapped && useLazy) {\n value = onlyLazy ? value : new LazyWrapper(this);\n var result = func.apply(value, args);\n result.__actions__.push({ 'func': thru, 'args': [interceptor], 'thisArg': undefined });\n return new LodashWrapper(result, chainAll);\n }\n if (isUnwrapped && onlyLazy) {\n return func.apply(this, args);\n }\n result = this.thru(interceptor);\n return isUnwrapped ? (isTaker ? result.value()[0] : result.value()) : result;\n };\n });\n\n // Add `Array` methods to `lodash.prototype`.\n arrayEach(['pop', 'push', 'shift', 'sort', 'splice', 'unshift'], function(methodName) {\n var func = arrayProto[methodName],\n chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru',\n retUnwrapped = /^(?:pop|shift)$/.test(methodName);\n\n lodash.prototype[methodName] = function() {\n var args = arguments;\n if (retUnwrapped && !this.__chain__) {\n var value = this.value();\n return func.apply(isArray(value) ? value : [], args);\n }\n return this[chainName](function(value) {\n return func.apply(isArray(value) ? value : [], args);\n });\n };\n });\n\n // Map minified method names to their real names.\n baseForOwn(LazyWrapper.prototype, function(func, methodName) {\n var lodashFunc = lodash[methodName];\n if (lodashFunc) {\n var key = (lodashFunc.name + ''),\n names = realNames[key] || (realNames[key] = []);\n\n names.push({ 'name': methodName, 'func': lodashFunc });\n }\n });\n\n realNames[createHybrid(undefined, WRAP_BIND_KEY_FLAG).name] = [{\n 'name': 'wrapper',\n 'func': undefined\n }];\n\n // Add methods to `LazyWrapper`.\n LazyWrapper.prototype.clone = lazyClone;\n LazyWrapper.prototype.reverse = lazyReverse;\n LazyWrapper.prototype.value = lazyValue;\n\n // Add chain sequence methods to the `lodash` wrapper.\n lodash.prototype.at = wrapperAt;\n lodash.prototype.chain = wrapperChain;\n lodash.prototype.commit = wrapperCommit;\n lodash.prototype.next = wrapperNext;\n lodash.prototype.plant = wrapperPlant;\n lodash.prototype.reverse = wrapperReverse;\n lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue;\n\n // Add lazy aliases.\n lodash.prototype.first = lodash.prototype.head;\n\n if (symIterator) {\n lodash.prototype[symIterator] = wrapperToIterator;\n }\n return lodash;\n });\n\n /*--------------------------------------------------------------------------*/\n\n // Export lodash.\n var _ = runInContext();\n\n // Some AMD build optimizers, like r.js, check for condition patterns like:\n if (true) {\n // Expose Lodash on the global object to prevent errors when Lodash is\n // loaded by a script tag in the presence of an AMD loader.\n // See http://requirejs.org/docs/errors.html#mismatch for more details.\n // Use `_.noConflict` to remove Lodash from the global object.\n root._ = _;\n\n // Define as an anonymous module so, through path mapping, it can be\n // referenced as the \"underscore\" module.\n !(__WEBPACK_AMD_DEFINE_RESULT__ = function() {\n return _;\n }.call(exports, __webpack_require__, exports, module),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n }\n // Check for `exports` after `define` in case a build optimizer adds it.\n else if (freeModule) {\n // Export for Node.js.\n (freeModule.exports = _)._ = _;\n // Export for CommonJS support.\n freeExports._ = _;\n }\n else {\n // Export to the global object.\n root._ = _;\n }\n}.call(this));\n\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(/*! ./../webpack/buildin/global.js */ 104), __webpack_require__(/*! ./../webpack/buildin/module.js */ 275)(module)))\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/lodash.js\n// module id = 19\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/lodash/lodash.js?", + ); + + /***/ + }, + /* 20 */ + /* exports provided: toInt, isObject, isImmutable, isNullOrEmpty, isGoogleDefined, objectHasProp, fetchProp, stripPixels, buildNewEntityId, isNewEntityId, parseNewEntityId, toArray, isUrl, addProtocol, removeProtocol, domainName, createDebouncedHandler, createFunctionsChain, normalizePath, scopePath, externalUrlFor */ + /* exports used: toInt, externalUrlFor, isGoogleDefined, isObject, scopePath, createFunctionsChain, toArray, removeProtocol, domainName */ + /*!*********************************!*\ + !*** ./app/libs/utils/index.js ***! + \*********************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__enums_CommonConstant__ = __webpack_require__(/*! ../../enums/CommonConstant */ 740);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_fp__ = __webpack_require__(/*! lodash/fp */ 14);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_fp___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_lodash_fp__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__validations_regexes__ = __webpack_require__(/*! ./validations/regexes */ 894);\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = toInt;\n/* harmony export (immutable) */ __webpack_exports__[\"d\"] = isObject;\n/* unused harmony export isImmutable */\n/* unused harmony export isNullOrEmpty */\n/* harmony export (immutable) */ __webpack_exports__[\"c\"] = isGoogleDefined;\n/* unused harmony export objectHasProp */\n/* unused harmony export fetchProp */\n/* unused harmony export stripPixels */\n/* unused harmony export buildNewEntityId */\n/* unused harmony export isNewEntityId */\n/* unused harmony export parseNewEntityId */\n/* harmony export (immutable) */ __webpack_exports__[\"g\"] = toArray;\n/* unused harmony export isUrl */\n/* unused harmony export addProtocol */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"h\", function() { return removeProtocol; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"i\", function() { return domainName; });\n/* unused harmony export createDebouncedHandler */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"f\", function() { return createFunctionsChain; });\n/* unused harmony export normalizePath */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"e\", function() { return scopePath; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return externalUrlFor; });\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\n\n\n\n\nfunction toInt(value) {\n return parseInt(value, 10);\n}\n\nfunction isObject(subject) {\n return (typeof subject === 'undefined' ? 'undefined' : _typeof(subject)) === 'object' && Object.prototype.toString.call(subject) === '[object Object]';\n}\n\nfunction isImmutable(subject) {\n return !!subject.toJS;\n}\n\nfunction isNullOrEmpty(value) {\n return value === null && (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' || value === '';\n}\n\nfunction isGoogleDefined() {\n return typeof google !== 'undefined';\n}\n\nfunction objectHasProp(object, prop) {\n return object.has ? object.has(prop) : typeof object[prop] !== 'undefined';\n}\n\nfunction fetchProp(container, attr) {\n return container.get ? container.get(attr) : container[attr];\n}\n\nfunction stripPixels(value) {\n return value.replace('px', '');\n}\n\n/**\n * @desc Build id for `new` entity, which is about to be created.\n *\n * // New listing\n * buildNewEntityId() -> 'new'\n * // New listing for `property.id = 5`\n * buildNewEntityId(5) -> 'new_5'\n * // New listing for `property.id = 5` and `owner.id = 7`\n * buildNewEntityId(5, 7) -> 'new_5_7'\n *\n * We might want to be more explicit here\n * and place the type of associations in id:\n * buildNewEntityId(['property', 5], ['owner', 7]) -> 'new__property_5__owner_7'\n *\n * @param {...number} ...ids - association ids\n * @returns {string}\n */\nfunction buildNewEntityId() {\n var NEW_ENTITY_ID = __WEBPACK_IMPORTED_MODULE_0__enums_CommonConstant__[\"a\" /* default */].NEW_ENTITY_ID,\n NEW_ENTITY_ID_DELIMITER = __WEBPACK_IMPORTED_MODULE_0__enums_CommonConstant__[\"a\" /* default */].NEW_ENTITY_ID_DELIMITER;\n\n for (var _len = arguments.length, ids = Array(_len), _key = 0; _key < _len; _key++) {\n ids[_key] = arguments[_key];\n }\n\n return ids.length === 0 ? NEW_ENTITY_ID : // $FlowFixMe\n ids.reduce(function (newId, id) {\n return '' + newId + NEW_ENTITY_ID_DELIMITER + String(id);\n }, NEW_ENTITY_ID);\n}\n\n/**\n * @param {string} id - new entity id, e.g. new_1_34\n *\n * @returns array of param values, e.g. [1, 34]\n */\nvar isNewEntityId = function isNewEntityId(id) {\n var prefix = id.toString().slice(0, __WEBPACK_IMPORTED_MODULE_0__enums_CommonConstant__[\"a\" /* default */].NEW_ENTITY_ID.length);\n return prefix === __WEBPACK_IMPORTED_MODULE_0__enums_CommonConstant__[\"a\" /* default */].NEW_ENTITY_ID;\n};\n\n/**\n * @desc Parse `new` entity id.\n *\n * @param {string} id - new entity id\n * @returns {Array<string>}\n */\nfunction parseNewEntityId(id) {\n return id.split(__WEBPACK_IMPORTED_MODULE_0__enums_CommonConstant__[\"a\" /* default */].NEW_ENTITY_ID_DELIMITER);\n}\n\nfunction toArray(value) {\n return Array.isArray(value) ? value : [value];\n}\n\nfunction isUrl(value) {\n return !!value.match(__WEBPACK_IMPORTED_MODULE_2__validations_regexes__[\"a\" /* urlRegex */]);\n}\n\nvar addProtocol = function addProtocol(url) {\n if (isUrl(url)) return url;else if (isUrl('http://' + url)) return 'http://' + url;\n return url;\n};\n\nvar removeProtocol = function removeProtocol(url) {\n if (!isUrl(url)) return url;\n return __WEBPACK_IMPORTED_MODULE_2__validations_regexes__[\"b\" /* protocolRegex */].exec(url)[1];\n};\n\nvar domainName = function domainName(url) {\n if (!url.match(__WEBPACK_IMPORTED_MODULE_2__validations_regexes__[\"a\" /* urlRegex */])) return null;\n var domains = __WEBPACK_IMPORTED_MODULE_2__validations_regexes__[\"a\" /* urlRegex */].exec(url)[1].split('.');\n return domains[domains.length - 1];\n};\n\nvar createDebouncedHandler = function createDebouncedHandler(handler) {\n var interval = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 700;\n return __WEBPACK_IMPORTED_MODULE_1_lodash_fp___default.a.debounce(interval, handler);\n};\n\nvar createFunctionsChain = function createFunctionsChain() {\n for (var _len2 = arguments.length, funcs = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n funcs[_key2] = arguments[_key2];\n }\n\n return function () {\n for (var _len3 = arguments.length, args = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n args[_key3] = arguments[_key3];\n }\n\n return (\n // $FlowFixMe\n funcs.filter(function (func) {\n return typeof func === 'function';\n }).forEach(function (func) {\n return func.apply(undefined, args);\n })\n );\n };\n};\n\nvar normalizePath = __WEBPACK_IMPORTED_MODULE_1_lodash_fp___default.a.cond([[function (path) {\n return typeof path === 'string' && path[0] === '/';\n}, __WEBPACK_IMPORTED_MODULE_1_lodash_fp___default.a.identity], [__WEBPACK_IMPORTED_MODULE_1_lodash_fp___default.a.constant(true), function (path) {\n return '/' + path;\n}]]);\n\nvar scopePath = function scopePath(scope, path) {\n return path ? scope + normalizePath(path) : scope;\n};\n\nvar externalUrlFor = function externalUrlFor(url) {\n return (/^https?:\\/\\//i.test(url) ? url : 'http://' + url\n );\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/utils/index.js\n// module id = 20\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/utils/index.js?", + ); + + /***/ + }, + /* 21 */ + /* unknown exports provided */ + /* all exports used */ + /*!**********************************!*\ + !*** ./~/object-assign/index.js ***! + \**********************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/object-assign/index.js\n// module id = 21\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/object-assign/index.js?", + ); + + /***/ + }, + /* 22 */ + /* exports provided: default */ + /* exports used: default */ + /*!********************************!*\ + !*** ./app/libs/utils/Enum.js ***! + \********************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash__ = __webpack_require__(/*! lodash */ 19);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_lodash__);\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n\n\nvar Enum = function () {\n function Enum(enums) {\n _classCallCheck(this, Enum);\n\n var enumItems = [];\n\n // FIXME: Maybe someday (for-of -> reduce)\n // eslint-disable-next-line no-restricted-syntax\n var _iteratorNormalCompletion = true;\n var _didIteratorError = false;\n var _iteratorError = undefined;\n\n try {\n for (var _iterator = Object.keys(enums)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var key = _step.value;\n\n var enumItem = enums[key];\n var isFlat = (typeof enumItem === 'undefined' ? 'undefined' : _typeof(enumItem)) !== 'object';\n\n if (!isFlat) enumItem.key = key;\n if (__WEBPACK_IMPORTED_MODULE_0_lodash___default.a.isUndefined(this.isFlat)) this.isFlat = isFlat;\n\n this[key] = enumItem;\n enumItems.push(this[key]);\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n\n this.enumItems = enumItems;\n Object.freeze(this);\n }\n\n _createClass(Enum, [{\n key: 'get',\n value: function get(key) {\n if (__WEBPACK_IMPORTED_MODULE_0_lodash___default.a.isUndefined(this[key])) {\n throw new Error('[Enum]: Can\\'t find ' + key + '. Check spelling and make sure it exists in this Enum.');\n }\n\n return this[key];\n }\n }, {\n key: 'items',\n value: function items() {\n return this.enumItems;\n }\n }, {\n key: 'orderedItems',\n value: function orderedItems() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : { by: 'position' },\n by = _ref.by,\n order = _ref.order;\n\n var iteratees = this.isFlat ? null : by;\n return __WEBPACK_IMPORTED_MODULE_0_lodash___default.a.orderBy(this.enumItems, iteratees, order);\n }\n }, {\n key: 'fromValue',\n value: function fromValue(value) {\n return this.enumItems.find(function (item) {\n return item.value === value;\n });\n }\n }]);\n\n return Enum;\n}();\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Enum);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/utils/Enum.js\n// module id = 22\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/utils/Enum.js?", + ); + + /***/ + }, + /* 23 */ + /* unknown exports provided */ + /* all exports used */ + /*!******************************!*\ + !*** ./~/warning/browser.js ***! + \******************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2014-2015, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n\n\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\nvar warning = function() {};\n\nif (true) {\n warning = function(condition, format, args) {\n var len = arguments.length;\n args = new Array(len > 2 ? len - 2 : 0);\n for (var key = 2; key < len; key++) {\n args[key - 2] = arguments[key];\n }\n if (format === undefined) {\n throw new Error(\n '`warning(condition, format, ...args)` requires a warning ' +\n 'message argument'\n );\n }\n\n if (format.length < 10 || (/^[s\\W]*$/).test(format)) {\n throw new Error(\n 'The warning format should be able to uniquely identify this ' +\n 'warning. Please, use a more descriptive format than: ' + format\n );\n }\n\n if (!condition) {\n var argIndex = 0;\n var message = 'Warning: ' +\n format.replace(/%s/g, function() {\n return args[argIndex++];\n });\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch(x) {}\n }\n };\n}\n\nmodule.exports = warning;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/warning/browser.js\n// module id = 23\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/warning/browser.js?", + ); + + /***/ + }, + /* 24 */ + /* unknown exports provided */ + /* all exports used */ + /*!**************************************************!*\ + !*** ./~/react-dom/lib/ReactDOMComponentTree.js ***! + \**************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar _prodInvariant = __webpack_require__(/*! ./reactProdInvariant */ 17);\n\nvar DOMProperty = __webpack_require__(/*! ./DOMProperty */ 67);\nvar ReactDOMComponentFlags = __webpack_require__(/*! ./ReactDOMComponentFlags */ 534);\n\nvar invariant = __webpack_require__(/*! fbjs/lib/invariant */ 12);\n\nvar ATTR_NAME = DOMProperty.ID_ATTRIBUTE_NAME;\nvar Flags = ReactDOMComponentFlags;\n\nvar internalInstanceKey = '__reactInternalInstance$' + Math.random().toString(36).slice(2);\n\n/**\n * Check if a given node should be cached.\n */\nfunction shouldPrecacheNode(node, nodeID) {\n return node.nodeType === 1 && node.getAttribute(ATTR_NAME) === String(nodeID) || node.nodeType === 8 && node.nodeValue === ' react-text: ' + nodeID + ' ' || node.nodeType === 8 && node.nodeValue === ' react-empty: ' + nodeID + ' ';\n}\n\n/**\n * Drill down (through composites and empty components) until we get a host or\n * host text component.\n *\n * This is pretty polymorphic but unavoidable with the current structure we have\n * for `_renderedChildren`.\n */\nfunction getRenderedHostOrTextFromComponent(component) {\n var rendered;\n while (rendered = component._renderedComponent) {\n component = rendered;\n }\n return component;\n}\n\n/**\n * Populate `_hostNode` on the rendered host/text component with the given\n * DOM node. The passed `inst` can be a composite.\n */\nfunction precacheNode(inst, node) {\n var hostInst = getRenderedHostOrTextFromComponent(inst);\n hostInst._hostNode = node;\n node[internalInstanceKey] = hostInst;\n}\n\nfunction uncacheNode(inst) {\n var node = inst._hostNode;\n if (node) {\n delete node[internalInstanceKey];\n inst._hostNode = null;\n }\n}\n\n/**\n * Populate `_hostNode` on each child of `inst`, assuming that the children\n * match up with the DOM (element) children of `node`.\n *\n * We cache entire levels at once to avoid an n^2 problem where we access the\n * children of a node sequentially and have to walk from the start to our target\n * node every time.\n *\n * Since we update `_renderedChildren` and the actual DOM at (slightly)\n * different times, we could race here and see a newer `_renderedChildren` than\n * the DOM nodes we see. To avoid this, ReactMultiChild calls\n * `prepareToManageChildren` before we change `_renderedChildren`, at which\n * time the container's child nodes are always cached (until it unmounts).\n */\nfunction precacheChildNodes(inst, node) {\n if (inst._flags & Flags.hasCachedChildNodes) {\n return;\n }\n var children = inst._renderedChildren;\n var childNode = node.firstChild;\n outer: for (var name in children) {\n if (!children.hasOwnProperty(name)) {\n continue;\n }\n var childInst = children[name];\n var childID = getRenderedHostOrTextFromComponent(childInst)._domID;\n if (childID === 0) {\n // We're currently unmounting this child in ReactMultiChild; skip it.\n continue;\n }\n // We assume the child nodes are in the same order as the child instances.\n for (; childNode !== null; childNode = childNode.nextSibling) {\n if (shouldPrecacheNode(childNode, childID)) {\n precacheNode(childInst, childNode);\n continue outer;\n }\n }\n // We reached the end of the DOM children without finding an ID match.\n true ? true ? invariant(false, 'Unable to find element with ID %s.', childID) : _prodInvariant('32', childID) : void 0;\n }\n inst._flags |= Flags.hasCachedChildNodes;\n}\n\n/**\n * Given a DOM node, return the closest ReactDOMComponent or\n * ReactDOMTextComponent instance ancestor.\n */\nfunction getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n // Walk up the tree until we find an ancestor whose instance we have cached.\n var parents = [];\n while (!node[internalInstanceKey]) {\n parents.push(node);\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var closest;\n var inst;\n for (; node && (inst = node[internalInstanceKey]); node = parents.pop()) {\n closest = inst;\n if (parents.length) {\n precacheChildNodes(inst, node);\n }\n }\n\n return closest;\n}\n\n/**\n * Given a DOM node, return the ReactDOMComponent or ReactDOMTextComponent\n * instance, or null if the node was not rendered by this React.\n */\nfunction getInstanceFromNode(node) {\n var inst = getClosestInstanceFromNode(node);\n if (inst != null && inst._hostNode === node) {\n return inst;\n } else {\n return null;\n }\n}\n\n/**\n * Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding\n * DOM node.\n */\nfunction getNodeFromInstance(inst) {\n // Without this first invariant, passing a non-DOM-component triggers the next\n // invariant for a missing parent, which is super confusing.\n !(inst._hostNode !== undefined) ? true ? invariant(false, 'getNodeFromInstance: Invalid argument.') : _prodInvariant('33') : void 0;\n\n if (inst._hostNode) {\n return inst._hostNode;\n }\n\n // Walk up the tree until we find an ancestor whose DOM node we have cached.\n var parents = [];\n while (!inst._hostNode) {\n parents.push(inst);\n !inst._hostParent ? true ? invariant(false, 'React DOM tree root should always have a node reference.') : _prodInvariant('34') : void 0;\n inst = inst._hostParent;\n }\n\n // Now parents contains each ancestor that does *not* have a cached native\n // node, and `inst` is the deepest ancestor that does.\n for (; parents.length; inst = parents.pop()) {\n precacheChildNodes(inst, inst._hostNode);\n }\n\n return inst._hostNode;\n}\n\nvar ReactDOMComponentTree = {\n getClosestInstanceFromNode: getClosestInstanceFromNode,\n getInstanceFromNode: getInstanceFromNode,\n getNodeFromInstance: getNodeFromInstance,\n precacheChildNodes: precacheChildNodes,\n precacheNode: precacheNode,\n uncacheNode: uncacheNode\n};\n\nmodule.exports = ReactDOMComponentTree;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/ReactDOMComponentTree.js\n// module id = 24\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/ReactDOMComponentTree.js?", + ); + + /***/ + }, + /* 25 */ + /* unknown exports provided */ + /* all exports used */ + /*!********************************!*\ + !*** ./~/invariant/browser.js ***! + \********************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-2015, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar invariant = function(condition, format, a, b, c, d, e, f) {\n if (true) {\n if (format === undefined) {\n throw new Error('invariant requires an error message argument');\n }\n }\n\n if (!condition) {\n var error;\n if (format === undefined) {\n error = new Error(\n 'Minified exception occurred; use the non-minified dev environment ' +\n 'for the full error message and additional helpful warnings.'\n );\n } else {\n var args = [a, b, c, d, e, f];\n var argIndex = 0;\n error = new Error(\n format.replace(/%s/g, function() { return args[argIndex++]; })\n );\n error.name = 'Invariant Violation';\n }\n\n error.framesToPop = 1; // we don't care about invariant's own frame\n throw error;\n }\n};\n\nmodule.exports = invariant;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/invariant/browser.js\n// module id = 25\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/invariant/browser.js?", + ); + + /***/ + }, + /* 26 */ + /* unknown exports provided */ + /* exports used: fromJS, Map, Set, default, OrderedSet */ + /*!***************************************!*\ + !*** ./~/immutable/dist/immutable.js ***! + \***************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "/**\n * Copyright (c) 2014-2015, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n(function (global, factory) {\n true ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n (global.Immutable = factory());\n}(this, function () { 'use strict';var SLICE$0 = Array.prototype.slice;\n\n function createClass(ctor, superClass) {\n if (superClass) {\n ctor.prototype = Object.create(superClass.prototype);\n }\n ctor.prototype.constructor = ctor;\n }\n\n function Iterable(value) {\n return isIterable(value) ? value : Seq(value);\n }\n\n\n createClass(KeyedIterable, Iterable);\n function KeyedIterable(value) {\n return isKeyed(value) ? value : KeyedSeq(value);\n }\n\n\n createClass(IndexedIterable, Iterable);\n function IndexedIterable(value) {\n return isIndexed(value) ? value : IndexedSeq(value);\n }\n\n\n createClass(SetIterable, Iterable);\n function SetIterable(value) {\n return isIterable(value) && !isAssociative(value) ? value : SetSeq(value);\n }\n\n\n\n function isIterable(maybeIterable) {\n return !!(maybeIterable && maybeIterable[IS_ITERABLE_SENTINEL]);\n }\n\n function isKeyed(maybeKeyed) {\n return !!(maybeKeyed && maybeKeyed[IS_KEYED_SENTINEL]);\n }\n\n function isIndexed(maybeIndexed) {\n return !!(maybeIndexed && maybeIndexed[IS_INDEXED_SENTINEL]);\n }\n\n function isAssociative(maybeAssociative) {\n return isKeyed(maybeAssociative) || isIndexed(maybeAssociative);\n }\n\n function isOrdered(maybeOrdered) {\n return !!(maybeOrdered && maybeOrdered[IS_ORDERED_SENTINEL]);\n }\n\n Iterable.isIterable = isIterable;\n Iterable.isKeyed = isKeyed;\n Iterable.isIndexed = isIndexed;\n Iterable.isAssociative = isAssociative;\n Iterable.isOrdered = isOrdered;\n\n Iterable.Keyed = KeyedIterable;\n Iterable.Indexed = IndexedIterable;\n Iterable.Set = SetIterable;\n\n\n var IS_ITERABLE_SENTINEL = '@@__IMMUTABLE_ITERABLE__@@';\n var IS_KEYED_SENTINEL = '@@__IMMUTABLE_KEYED__@@';\n var IS_INDEXED_SENTINEL = '@@__IMMUTABLE_INDEXED__@@';\n var IS_ORDERED_SENTINEL = '@@__IMMUTABLE_ORDERED__@@';\n\n // Used for setting prototype methods that IE8 chokes on.\n var DELETE = 'delete';\n\n // Constants describing the size of trie nodes.\n var SHIFT = 5; // Resulted in best performance after ______?\n var SIZE = 1 << SHIFT;\n var MASK = SIZE - 1;\n\n // A consistent shared value representing \"not set\" which equals nothing other\n // than itself, and nothing that could be provided externally.\n var NOT_SET = {};\n\n // Boolean references, Rough equivalent of `bool &`.\n var CHANGE_LENGTH = { value: false };\n var DID_ALTER = { value: false };\n\n function MakeRef(ref) {\n ref.value = false;\n return ref;\n }\n\n function SetRef(ref) {\n ref && (ref.value = true);\n }\n\n // A function which returns a value representing an \"owner\" for transient writes\n // to tries. The return value will only ever equal itself, and will not equal\n // the return of any subsequent call of this function.\n function OwnerID() {}\n\n // http://jsperf.com/copy-array-inline\n function arrCopy(arr, offset) {\n offset = offset || 0;\n var len = Math.max(0, arr.length - offset);\n var newArr = new Array(len);\n for (var ii = 0; ii < len; ii++) {\n newArr[ii] = arr[ii + offset];\n }\n return newArr;\n }\n\n function ensureSize(iter) {\n if (iter.size === undefined) {\n iter.size = iter.__iterate(returnTrue);\n }\n return iter.size;\n }\n\n function wrapIndex(iter, index) {\n // This implements \"is array index\" which the ECMAString spec defines as:\n //\n // A String property name P is an array index if and only if\n // ToString(ToUint32(P)) is equal to P and ToUint32(P) is not equal\n // to 2^32−1.\n //\n // http://www.ecma-international.org/ecma-262/6.0/#sec-array-exotic-objects\n if (typeof index !== 'number') {\n var uint32Index = index >>> 0; // N >>> 0 is shorthand for ToUint32\n if ('' + uint32Index !== index || uint32Index === 4294967295) {\n return NaN;\n }\n index = uint32Index;\n }\n return index < 0 ? ensureSize(iter) + index : index;\n }\n\n function returnTrue() {\n return true;\n }\n\n function wholeSlice(begin, end, size) {\n return (begin === 0 || (size !== undefined && begin <= -size)) &&\n (end === undefined || (size !== undefined && end >= size));\n }\n\n function resolveBegin(begin, size) {\n return resolveIndex(begin, size, 0);\n }\n\n function resolveEnd(end, size) {\n return resolveIndex(end, size, size);\n }\n\n function resolveIndex(index, size, defaultIndex) {\n return index === undefined ?\n defaultIndex :\n index < 0 ?\n Math.max(0, size + index) :\n size === undefined ?\n index :\n Math.min(size, index);\n }\n\n /* global Symbol */\n\n var ITERATE_KEYS = 0;\n var ITERATE_VALUES = 1;\n var ITERATE_ENTRIES = 2;\n\n var REAL_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\n var FAUX_ITERATOR_SYMBOL = '@@iterator';\n\n var ITERATOR_SYMBOL = REAL_ITERATOR_SYMBOL || FAUX_ITERATOR_SYMBOL;\n\n\n function Iterator(next) {\n this.next = next;\n }\n\n Iterator.prototype.toString = function() {\n return '[Iterator]';\n };\n\n\n Iterator.KEYS = ITERATE_KEYS;\n Iterator.VALUES = ITERATE_VALUES;\n Iterator.ENTRIES = ITERATE_ENTRIES;\n\n Iterator.prototype.inspect =\n Iterator.prototype.toSource = function () { return this.toString(); }\n Iterator.prototype[ITERATOR_SYMBOL] = function () {\n return this;\n };\n\n\n function iteratorValue(type, k, v, iteratorResult) {\n var value = type === 0 ? k : type === 1 ? v : [k, v];\n iteratorResult ? (iteratorResult.value = value) : (iteratorResult = {\n value: value, done: false\n });\n return iteratorResult;\n }\n\n function iteratorDone() {\n return { value: undefined, done: true };\n }\n\n function hasIterator(maybeIterable) {\n return !!getIteratorFn(maybeIterable);\n }\n\n function isIterator(maybeIterator) {\n return maybeIterator && typeof maybeIterator.next === 'function';\n }\n\n function getIterator(iterable) {\n var iteratorFn = getIteratorFn(iterable);\n return iteratorFn && iteratorFn.call(iterable);\n }\n\n function getIteratorFn(iterable) {\n var iteratorFn = iterable && (\n (REAL_ITERATOR_SYMBOL && iterable[REAL_ITERATOR_SYMBOL]) ||\n iterable[FAUX_ITERATOR_SYMBOL]\n );\n if (typeof iteratorFn === 'function') {\n return iteratorFn;\n }\n }\n\n function isArrayLike(value) {\n return value && typeof value.length === 'number';\n }\n\n createClass(Seq, Iterable);\n function Seq(value) {\n return value === null || value === undefined ? emptySequence() :\n isIterable(value) ? value.toSeq() : seqFromValue(value);\n }\n\n Seq.of = function(/*...values*/) {\n return Seq(arguments);\n };\n\n Seq.prototype.toSeq = function() {\n return this;\n };\n\n Seq.prototype.toString = function() {\n return this.__toString('Seq {', '}');\n };\n\n Seq.prototype.cacheResult = function() {\n if (!this._cache && this.__iterateUncached) {\n this._cache = this.entrySeq().toArray();\n this.size = this._cache.length;\n }\n return this;\n };\n\n // abstract __iterateUncached(fn, reverse)\n\n Seq.prototype.__iterate = function(fn, reverse) {\n return seqIterate(this, fn, reverse, true);\n };\n\n // abstract __iteratorUncached(type, reverse)\n\n Seq.prototype.__iterator = function(type, reverse) {\n return seqIterator(this, type, reverse, true);\n };\n\n\n\n createClass(KeyedSeq, Seq);\n function KeyedSeq(value) {\n return value === null || value === undefined ?\n emptySequence().toKeyedSeq() :\n isIterable(value) ?\n (isKeyed(value) ? value.toSeq() : value.fromEntrySeq()) :\n keyedSeqFromValue(value);\n }\n\n KeyedSeq.prototype.toKeyedSeq = function() {\n return this;\n };\n\n\n\n createClass(IndexedSeq, Seq);\n function IndexedSeq(value) {\n return value === null || value === undefined ? emptySequence() :\n !isIterable(value) ? indexedSeqFromValue(value) :\n isKeyed(value) ? value.entrySeq() : value.toIndexedSeq();\n }\n\n IndexedSeq.of = function(/*...values*/) {\n return IndexedSeq(arguments);\n };\n\n IndexedSeq.prototype.toIndexedSeq = function() {\n return this;\n };\n\n IndexedSeq.prototype.toString = function() {\n return this.__toString('Seq [', ']');\n };\n\n IndexedSeq.prototype.__iterate = function(fn, reverse) {\n return seqIterate(this, fn, reverse, false);\n };\n\n IndexedSeq.prototype.__iterator = function(type, reverse) {\n return seqIterator(this, type, reverse, false);\n };\n\n\n\n createClass(SetSeq, Seq);\n function SetSeq(value) {\n return (\n value === null || value === undefined ? emptySequence() :\n !isIterable(value) ? indexedSeqFromValue(value) :\n isKeyed(value) ? value.entrySeq() : value\n ).toSetSeq();\n }\n\n SetSeq.of = function(/*...values*/) {\n return SetSeq(arguments);\n };\n\n SetSeq.prototype.toSetSeq = function() {\n return this;\n };\n\n\n\n Seq.isSeq = isSeq;\n Seq.Keyed = KeyedSeq;\n Seq.Set = SetSeq;\n Seq.Indexed = IndexedSeq;\n\n var IS_SEQ_SENTINEL = '@@__IMMUTABLE_SEQ__@@';\n\n Seq.prototype[IS_SEQ_SENTINEL] = true;\n\n\n\n createClass(ArraySeq, IndexedSeq);\n function ArraySeq(array) {\n this._array = array;\n this.size = array.length;\n }\n\n ArraySeq.prototype.get = function(index, notSetValue) {\n return this.has(index) ? this._array[wrapIndex(this, index)] : notSetValue;\n };\n\n ArraySeq.prototype.__iterate = function(fn, reverse) {\n var array = this._array;\n var maxIndex = array.length - 1;\n for (var ii = 0; ii <= maxIndex; ii++) {\n if (fn(array[reverse ? maxIndex - ii : ii], ii, this) === false) {\n return ii + 1;\n }\n }\n return ii;\n };\n\n ArraySeq.prototype.__iterator = function(type, reverse) {\n var array = this._array;\n var maxIndex = array.length - 1;\n var ii = 0;\n return new Iterator(function() \n {return ii > maxIndex ?\n iteratorDone() :\n iteratorValue(type, ii, array[reverse ? maxIndex - ii++ : ii++])}\n );\n };\n\n\n\n createClass(ObjectSeq, KeyedSeq);\n function ObjectSeq(object) {\n var keys = Object.keys(object);\n this._object = object;\n this._keys = keys;\n this.size = keys.length;\n }\n\n ObjectSeq.prototype.get = function(key, notSetValue) {\n if (notSetValue !== undefined && !this.has(key)) {\n return notSetValue;\n }\n return this._object[key];\n };\n\n ObjectSeq.prototype.has = function(key) {\n return this._object.hasOwnProperty(key);\n };\n\n ObjectSeq.prototype.__iterate = function(fn, reverse) {\n var object = this._object;\n var keys = this._keys;\n var maxIndex = keys.length - 1;\n for (var ii = 0; ii <= maxIndex; ii++) {\n var key = keys[reverse ? maxIndex - ii : ii];\n if (fn(object[key], key, this) === false) {\n return ii + 1;\n }\n }\n return ii;\n };\n\n ObjectSeq.prototype.__iterator = function(type, reverse) {\n var object = this._object;\n var keys = this._keys;\n var maxIndex = keys.length - 1;\n var ii = 0;\n return new Iterator(function() {\n var key = keys[reverse ? maxIndex - ii : ii];\n return ii++ > maxIndex ?\n iteratorDone() :\n iteratorValue(type, key, object[key]);\n });\n };\n\n ObjectSeq.prototype[IS_ORDERED_SENTINEL] = true;\n\n\n createClass(IterableSeq, IndexedSeq);\n function IterableSeq(iterable) {\n this._iterable = iterable;\n this.size = iterable.length || iterable.size;\n }\n\n IterableSeq.prototype.__iterateUncached = function(fn, reverse) {\n if (reverse) {\n return this.cacheResult().__iterate(fn, reverse);\n }\n var iterable = this._iterable;\n var iterator = getIterator(iterable);\n var iterations = 0;\n if (isIterator(iterator)) {\n var step;\n while (!(step = iterator.next()).done) {\n if (fn(step.value, iterations++, this) === false) {\n break;\n }\n }\n }\n return iterations;\n };\n\n IterableSeq.prototype.__iteratorUncached = function(type, reverse) {\n if (reverse) {\n return this.cacheResult().__iterator(type, reverse);\n }\n var iterable = this._iterable;\n var iterator = getIterator(iterable);\n if (!isIterator(iterator)) {\n return new Iterator(iteratorDone);\n }\n var iterations = 0;\n return new Iterator(function() {\n var step = iterator.next();\n return step.done ? step : iteratorValue(type, iterations++, step.value);\n });\n };\n\n\n\n createClass(IteratorSeq, IndexedSeq);\n function IteratorSeq(iterator) {\n this._iterator = iterator;\n this._iteratorCache = [];\n }\n\n IteratorSeq.prototype.__iterateUncached = function(fn, reverse) {\n if (reverse) {\n return this.cacheResult().__iterate(fn, reverse);\n }\n var iterator = this._iterator;\n var cache = this._iteratorCache;\n var iterations = 0;\n while (iterations < cache.length) {\n if (fn(cache[iterations], iterations++, this) === false) {\n return iterations;\n }\n }\n var step;\n while (!(step = iterator.next()).done) {\n var val = step.value;\n cache[iterations] = val;\n if (fn(val, iterations++, this) === false) {\n break;\n }\n }\n return iterations;\n };\n\n IteratorSeq.prototype.__iteratorUncached = function(type, reverse) {\n if (reverse) {\n return this.cacheResult().__iterator(type, reverse);\n }\n var iterator = this._iterator;\n var cache = this._iteratorCache;\n var iterations = 0;\n return new Iterator(function() {\n if (iterations >= cache.length) {\n var step = iterator.next();\n if (step.done) {\n return step;\n }\n cache[iterations] = step.value;\n }\n return iteratorValue(type, iterations, cache[iterations++]);\n });\n };\n\n\n\n\n // # pragma Helper functions\n\n function isSeq(maybeSeq) {\n return !!(maybeSeq && maybeSeq[IS_SEQ_SENTINEL]);\n }\n\n var EMPTY_SEQ;\n\n function emptySequence() {\n return EMPTY_SEQ || (EMPTY_SEQ = new ArraySeq([]));\n }\n\n function keyedSeqFromValue(value) {\n var seq =\n Array.isArray(value) ? new ArraySeq(value).fromEntrySeq() :\n isIterator(value) ? new IteratorSeq(value).fromEntrySeq() :\n hasIterator(value) ? new IterableSeq(value).fromEntrySeq() :\n typeof value === 'object' ? new ObjectSeq(value) :\n undefined;\n if (!seq) {\n throw new TypeError(\n 'Expected Array or iterable object of [k, v] entries, '+\n 'or keyed object: ' + value\n );\n }\n return seq;\n }\n\n function indexedSeqFromValue(value) {\n var seq = maybeIndexedSeqFromValue(value);\n if (!seq) {\n throw new TypeError(\n 'Expected Array or iterable object of values: ' + value\n );\n }\n return seq;\n }\n\n function seqFromValue(value) {\n var seq = maybeIndexedSeqFromValue(value) ||\n (typeof value === 'object' && new ObjectSeq(value));\n if (!seq) {\n throw new TypeError(\n 'Expected Array or iterable object of values, or keyed object: ' + value\n );\n }\n return seq;\n }\n\n function maybeIndexedSeqFromValue(value) {\n return (\n isArrayLike(value) ? new ArraySeq(value) :\n isIterator(value) ? new IteratorSeq(value) :\n hasIterator(value) ? new IterableSeq(value) :\n undefined\n );\n }\n\n function seqIterate(seq, fn, reverse, useKeys) {\n var cache = seq._cache;\n if (cache) {\n var maxIndex = cache.length - 1;\n for (var ii = 0; ii <= maxIndex; ii++) {\n var entry = cache[reverse ? maxIndex - ii : ii];\n if (fn(entry[1], useKeys ? entry[0] : ii, seq) === false) {\n return ii + 1;\n }\n }\n return ii;\n }\n return seq.__iterateUncached(fn, reverse);\n }\n\n function seqIterator(seq, type, reverse, useKeys) {\n var cache = seq._cache;\n if (cache) {\n var maxIndex = cache.length - 1;\n var ii = 0;\n return new Iterator(function() {\n var entry = cache[reverse ? maxIndex - ii : ii];\n return ii++ > maxIndex ?\n iteratorDone() :\n iteratorValue(type, useKeys ? entry[0] : ii - 1, entry[1]);\n });\n }\n return seq.__iteratorUncached(type, reverse);\n }\n\n function fromJS(json, converter) {\n return converter ?\n fromJSWith(converter, json, '', {'': json}) :\n fromJSDefault(json);\n }\n\n function fromJSWith(converter, json, key, parentJSON) {\n if (Array.isArray(json)) {\n return converter.call(parentJSON, key, IndexedSeq(json).map(function(v, k) {return fromJSWith(converter, v, k, json)}));\n }\n if (isPlainObj(json)) {\n return converter.call(parentJSON, key, KeyedSeq(json).map(function(v, k) {return fromJSWith(converter, v, k, json)}));\n }\n return json;\n }\n\n function fromJSDefault(json) {\n if (Array.isArray(json)) {\n return IndexedSeq(json).map(fromJSDefault).toList();\n }\n if (isPlainObj(json)) {\n return KeyedSeq(json).map(fromJSDefault).toMap();\n }\n return json;\n }\n\n function isPlainObj(value) {\n return value && (value.constructor === Object || value.constructor === undefined);\n }\n\n /**\n * An extension of the \"same-value\" algorithm as [described for use by ES6 Map\n * and Set](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map#Key_equality)\n *\n * NaN is considered the same as NaN, however -0 and 0 are considered the same\n * value, which is different from the algorithm described by\n * [`Object.is`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is).\n *\n * This is extended further to allow Objects to describe the values they\n * represent, by way of `valueOf` or `equals` (and `hashCode`).\n *\n * Note: because of this extension, the key equality of Immutable.Map and the\n * value equality of Immutable.Set will differ from ES6 Map and Set.\n *\n * ### Defining custom values\n *\n * The easiest way to describe the value an object represents is by implementing\n * `valueOf`. For example, `Date` represents a value by returning a unix\n * timestamp for `valueOf`:\n *\n * var date1 = new Date(1234567890000); // Fri Feb 13 2009 ...\n * var date2 = new Date(1234567890000);\n * date1.valueOf(); // 1234567890000\n * assert( date1 !== date2 );\n * assert( Immutable.is( date1, date2 ) );\n *\n * Note: overriding `valueOf` may have other implications if you use this object\n * where JavaScript expects a primitive, such as implicit string coercion.\n *\n * For more complex types, especially collections, implementing `valueOf` may\n * not be performant. An alternative is to implement `equals` and `hashCode`.\n *\n * `equals` takes another object, presumably of similar type, and returns true\n * if the it is equal. Equality is symmetrical, so the same result should be\n * returned if this and the argument are flipped.\n *\n * assert( a.equals(b) === b.equals(a) );\n *\n * `hashCode` returns a 32bit integer number representing the object which will\n * be used to determine how to store the value object in a Map or Set. You must\n * provide both or neither methods, one must not exist without the other.\n *\n * Also, an important relationship between these methods must be upheld: if two\n * values are equal, they *must* return the same hashCode. If the values are not\n * equal, they might have the same hashCode; this is called a hash collision,\n * and while undesirable for performance reasons, it is acceptable.\n *\n * if (a.equals(b)) {\n * assert( a.hashCode() === b.hashCode() );\n * }\n *\n * All Immutable collections implement `equals` and `hashCode`.\n *\n */\n function is(valueA, valueB) {\n if (valueA === valueB || (valueA !== valueA && valueB !== valueB)) {\n return true;\n }\n if (!valueA || !valueB) {\n return false;\n }\n if (typeof valueA.valueOf === 'function' &&\n typeof valueB.valueOf === 'function') {\n valueA = valueA.valueOf();\n valueB = valueB.valueOf();\n if (valueA === valueB || (valueA !== valueA && valueB !== valueB)) {\n return true;\n }\n if (!valueA || !valueB) {\n return false;\n }\n }\n if (typeof valueA.equals === 'function' &&\n typeof valueB.equals === 'function' &&\n valueA.equals(valueB)) {\n return true;\n }\n return false;\n }\n\n function deepEqual(a, b) {\n if (a === b) {\n return true;\n }\n\n if (\n !isIterable(b) ||\n a.size !== undefined && b.size !== undefined && a.size !== b.size ||\n a.__hash !== undefined && b.__hash !== undefined && a.__hash !== b.__hash ||\n isKeyed(a) !== isKeyed(b) ||\n isIndexed(a) !== isIndexed(b) ||\n isOrdered(a) !== isOrdered(b)\n ) {\n return false;\n }\n\n if (a.size === 0 && b.size === 0) {\n return true;\n }\n\n var notAssociative = !isAssociative(a);\n\n if (isOrdered(a)) {\n var entries = a.entries();\n return b.every(function(v, k) {\n var entry = entries.next().value;\n return entry && is(entry[1], v) && (notAssociative || is(entry[0], k));\n }) && entries.next().done;\n }\n\n var flipped = false;\n\n if (a.size === undefined) {\n if (b.size === undefined) {\n if (typeof a.cacheResult === 'function') {\n a.cacheResult();\n }\n } else {\n flipped = true;\n var _ = a;\n a = b;\n b = _;\n }\n }\n\n var allEqual = true;\n var bSize = b.__iterate(function(v, k) {\n if (notAssociative ? !a.has(v) :\n flipped ? !is(v, a.get(k, NOT_SET)) : !is(a.get(k, NOT_SET), v)) {\n allEqual = false;\n return false;\n }\n });\n\n return allEqual && a.size === bSize;\n }\n\n createClass(Repeat, IndexedSeq);\n\n function Repeat(value, times) {\n if (!(this instanceof Repeat)) {\n return new Repeat(value, times);\n }\n this._value = value;\n this.size = times === undefined ? Infinity : Math.max(0, times);\n if (this.size === 0) {\n if (EMPTY_REPEAT) {\n return EMPTY_REPEAT;\n }\n EMPTY_REPEAT = this;\n }\n }\n\n Repeat.prototype.toString = function() {\n if (this.size === 0) {\n return 'Repeat []';\n }\n return 'Repeat [ ' + this._value + ' ' + this.size + ' times ]';\n };\n\n Repeat.prototype.get = function(index, notSetValue) {\n return this.has(index) ? this._value : notSetValue;\n };\n\n Repeat.prototype.includes = function(searchValue) {\n return is(this._value, searchValue);\n };\n\n Repeat.prototype.slice = function(begin, end) {\n var size = this.size;\n return wholeSlice(begin, end, size) ? this :\n new Repeat(this._value, resolveEnd(end, size) - resolveBegin(begin, size));\n };\n\n Repeat.prototype.reverse = function() {\n return this;\n };\n\n Repeat.prototype.indexOf = function(searchValue) {\n if (is(this._value, searchValue)) {\n return 0;\n }\n return -1;\n };\n\n Repeat.prototype.lastIndexOf = function(searchValue) {\n if (is(this._value, searchValue)) {\n return this.size;\n }\n return -1;\n };\n\n Repeat.prototype.__iterate = function(fn, reverse) {\n for (var ii = 0; ii < this.size; ii++) {\n if (fn(this._value, ii, this) === false) {\n return ii + 1;\n }\n }\n return ii;\n };\n\n Repeat.prototype.__iterator = function(type, reverse) {var this$0 = this;\n var ii = 0;\n return new Iterator(function() \n {return ii < this$0.size ? iteratorValue(type, ii++, this$0._value) : iteratorDone()}\n );\n };\n\n Repeat.prototype.equals = function(other) {\n return other instanceof Repeat ?\n is(this._value, other._value) :\n deepEqual(other);\n };\n\n\n var EMPTY_REPEAT;\n\n function invariant(condition, error) {\n if (!condition) throw new Error(error);\n }\n\n createClass(Range, IndexedSeq);\n\n function Range(start, end, step) {\n if (!(this instanceof Range)) {\n return new Range(start, end, step);\n }\n invariant(step !== 0, 'Cannot step a Range by 0');\n start = start || 0;\n if (end === undefined) {\n end = Infinity;\n }\n step = step === undefined ? 1 : Math.abs(step);\n if (end < start) {\n step = -step;\n }\n this._start = start;\n this._end = end;\n this._step = step;\n this.size = Math.max(0, Math.ceil((end - start) / step - 1) + 1);\n if (this.size === 0) {\n if (EMPTY_RANGE) {\n return EMPTY_RANGE;\n }\n EMPTY_RANGE = this;\n }\n }\n\n Range.prototype.toString = function() {\n if (this.size === 0) {\n return 'Range []';\n }\n return 'Range [ ' +\n this._start + '...' + this._end +\n (this._step !== 1 ? ' by ' + this._step : '') +\n ' ]';\n };\n\n Range.prototype.get = function(index, notSetValue) {\n return this.has(index) ?\n this._start + wrapIndex(this, index) * this._step :\n notSetValue;\n };\n\n Range.prototype.includes = function(searchValue) {\n var possibleIndex = (searchValue - this._start) / this._step;\n return possibleIndex >= 0 &&\n possibleIndex < this.size &&\n possibleIndex === Math.floor(possibleIndex);\n };\n\n Range.prototype.slice = function(begin, end) {\n if (wholeSlice(begin, end, this.size)) {\n return this;\n }\n begin = resolveBegin(begin, this.size);\n end = resolveEnd(end, this.size);\n if (end <= begin) {\n return new Range(0, 0);\n }\n return new Range(this.get(begin, this._end), this.get(end, this._end), this._step);\n };\n\n Range.prototype.indexOf = function(searchValue) {\n var offsetValue = searchValue - this._start;\n if (offsetValue % this._step === 0) {\n var index = offsetValue / this._step;\n if (index >= 0 && index < this.size) {\n return index\n }\n }\n return -1;\n };\n\n Range.prototype.lastIndexOf = function(searchValue) {\n return this.indexOf(searchValue);\n };\n\n Range.prototype.__iterate = function(fn, reverse) {\n var maxIndex = this.size - 1;\n var step = this._step;\n var value = reverse ? this._start + maxIndex * step : this._start;\n for (var ii = 0; ii <= maxIndex; ii++) {\n if (fn(value, ii, this) === false) {\n return ii + 1;\n }\n value += reverse ? -step : step;\n }\n return ii;\n };\n\n Range.prototype.__iterator = function(type, reverse) {\n var maxIndex = this.size - 1;\n var step = this._step;\n var value = reverse ? this._start + maxIndex * step : this._start;\n var ii = 0;\n return new Iterator(function() {\n var v = value;\n value += reverse ? -step : step;\n return ii > maxIndex ? iteratorDone() : iteratorValue(type, ii++, v);\n });\n };\n\n Range.prototype.equals = function(other) {\n return other instanceof Range ?\n this._start === other._start &&\n this._end === other._end &&\n this._step === other._step :\n deepEqual(this, other);\n };\n\n\n var EMPTY_RANGE;\n\n createClass(Collection, Iterable);\n function Collection() {\n throw TypeError('Abstract');\n }\n\n\n createClass(KeyedCollection, Collection);function KeyedCollection() {}\n\n createClass(IndexedCollection, Collection);function IndexedCollection() {}\n\n createClass(SetCollection, Collection);function SetCollection() {}\n\n\n Collection.Keyed = KeyedCollection;\n Collection.Indexed = IndexedCollection;\n Collection.Set = SetCollection;\n\n var imul =\n typeof Math.imul === 'function' && Math.imul(0xffffffff, 2) === -2 ?\n Math.imul :\n function imul(a, b) {\n a = a | 0; // int\n b = b | 0; // int\n var c = a & 0xffff;\n var d = b & 0xffff;\n // Shift by 0 fixes the sign on the high part.\n return (c * d) + ((((a >>> 16) * d + c * (b >>> 16)) << 16) >>> 0) | 0; // int\n };\n\n // v8 has an optimization for storing 31-bit signed numbers.\n // Values which have either 00 or 11 as the high order bits qualify.\n // This function drops the highest order bit in a signed number, maintaining\n // the sign bit.\n function smi(i32) {\n return ((i32 >>> 1) & 0x40000000) | (i32 & 0xBFFFFFFF);\n }\n\n function hash(o) {\n if (o === false || o === null || o === undefined) {\n return 0;\n }\n if (typeof o.valueOf === 'function') {\n o = o.valueOf();\n if (o === false || o === null || o === undefined) {\n return 0;\n }\n }\n if (o === true) {\n return 1;\n }\n var type = typeof o;\n if (type === 'number') {\n if (o !== o || o === Infinity) {\n return 0;\n }\n var h = o | 0;\n if (h !== o) {\n h ^= o * 0xFFFFFFFF;\n }\n while (o > 0xFFFFFFFF) {\n o /= 0xFFFFFFFF;\n h ^= o;\n }\n return smi(h);\n }\n if (type === 'string') {\n return o.length > STRING_HASH_CACHE_MIN_STRLEN ? cachedHashString(o) : hashString(o);\n }\n if (typeof o.hashCode === 'function') {\n return o.hashCode();\n }\n if (type === 'object') {\n return hashJSObj(o);\n }\n if (typeof o.toString === 'function') {\n return hashString(o.toString());\n }\n throw new Error('Value type ' + type + ' cannot be hashed.');\n }\n\n function cachedHashString(string) {\n var hash = stringHashCache[string];\n if (hash === undefined) {\n hash = hashString(string);\n if (STRING_HASH_CACHE_SIZE === STRING_HASH_CACHE_MAX_SIZE) {\n STRING_HASH_CACHE_SIZE = 0;\n stringHashCache = {};\n }\n STRING_HASH_CACHE_SIZE++;\n stringHashCache[string] = hash;\n }\n return hash;\n }\n\n // http://jsperf.com/hashing-strings\n function hashString(string) {\n // This is the hash from JVM\n // The hash code for a string is computed as\n // s[0] * 31 ^ (n - 1) + s[1] * 31 ^ (n - 2) + ... + s[n - 1],\n // where s[i] is the ith character of the string and n is the length of\n // the string. We \"mod\" the result to make it between 0 (inclusive) and 2^31\n // (exclusive) by dropping high bits.\n var hash = 0;\n for (var ii = 0; ii < string.length; ii++) {\n hash = 31 * hash + string.charCodeAt(ii) | 0;\n }\n return smi(hash);\n }\n\n function hashJSObj(obj) {\n var hash;\n if (usingWeakMap) {\n hash = weakMap.get(obj);\n if (hash !== undefined) {\n return hash;\n }\n }\n\n hash = obj[UID_HASH_KEY];\n if (hash !== undefined) {\n return hash;\n }\n\n if (!canDefineProperty) {\n hash = obj.propertyIsEnumerable && obj.propertyIsEnumerable[UID_HASH_KEY];\n if (hash !== undefined) {\n return hash;\n }\n\n hash = getIENodeHash(obj);\n if (hash !== undefined) {\n return hash;\n }\n }\n\n hash = ++objHashUID;\n if (objHashUID & 0x40000000) {\n objHashUID = 0;\n }\n\n if (usingWeakMap) {\n weakMap.set(obj, hash);\n } else if (isExtensible !== undefined && isExtensible(obj) === false) {\n throw new Error('Non-extensible objects are not allowed as keys.');\n } else if (canDefineProperty) {\n Object.defineProperty(obj, UID_HASH_KEY, {\n 'enumerable': false,\n 'configurable': false,\n 'writable': false,\n 'value': hash\n });\n } else if (obj.propertyIsEnumerable !== undefined &&\n obj.propertyIsEnumerable === obj.constructor.prototype.propertyIsEnumerable) {\n // Since we can't define a non-enumerable property on the object\n // we'll hijack one of the less-used non-enumerable properties to\n // save our hash on it. Since this is a function it will not show up in\n // `JSON.stringify` which is what we want.\n obj.propertyIsEnumerable = function() {\n return this.constructor.prototype.propertyIsEnumerable.apply(this, arguments);\n };\n obj.propertyIsEnumerable[UID_HASH_KEY] = hash;\n } else if (obj.nodeType !== undefined) {\n // At this point we couldn't get the IE `uniqueID` to use as a hash\n // and we couldn't use a non-enumerable property to exploit the\n // dontEnum bug so we simply add the `UID_HASH_KEY` on the node\n // itself.\n obj[UID_HASH_KEY] = hash;\n } else {\n throw new Error('Unable to set a non-enumerable property on object.');\n }\n\n return hash;\n }\n\n // Get references to ES5 object methods.\n var isExtensible = Object.isExtensible;\n\n // True if Object.defineProperty works as expected. IE8 fails this test.\n var canDefineProperty = (function() {\n try {\n Object.defineProperty({}, '@', {});\n return true;\n } catch (e) {\n return false;\n }\n }());\n\n // IE has a `uniqueID` property on DOM nodes. We can construct the hash from it\n // and avoid memory leaks from the IE cloneNode bug.\n function getIENodeHash(node) {\n if (node && node.nodeType > 0) {\n switch (node.nodeType) {\n case 1: // Element\n return node.uniqueID;\n case 9: // Document\n return node.documentElement && node.documentElement.uniqueID;\n }\n }\n }\n\n // If possible, use a WeakMap.\n var usingWeakMap = typeof WeakMap === 'function';\n var weakMap;\n if (usingWeakMap) {\n weakMap = new WeakMap();\n }\n\n var objHashUID = 0;\n\n var UID_HASH_KEY = '__immutablehash__';\n if (typeof Symbol === 'function') {\n UID_HASH_KEY = Symbol(UID_HASH_KEY);\n }\n\n var STRING_HASH_CACHE_MIN_STRLEN = 16;\n var STRING_HASH_CACHE_MAX_SIZE = 255;\n var STRING_HASH_CACHE_SIZE = 0;\n var stringHashCache = {};\n\n function assertNotInfinite(size) {\n invariant(\n size !== Infinity,\n 'Cannot perform this action with an infinite size.'\n );\n }\n\n createClass(Map, KeyedCollection);\n\n // @pragma Construction\n\n function Map(value) {\n return value === null || value === undefined ? emptyMap() :\n isMap(value) && !isOrdered(value) ? value :\n emptyMap().withMutations(function(map ) {\n var iter = KeyedIterable(value);\n assertNotInfinite(iter.size);\n iter.forEach(function(v, k) {return map.set(k, v)});\n });\n }\n\n Map.of = function() {var keyValues = SLICE$0.call(arguments, 0);\n return emptyMap().withMutations(function(map ) {\n for (var i = 0; i < keyValues.length; i += 2) {\n if (i + 1 >= keyValues.length) {\n throw new Error('Missing value for key: ' + keyValues[i]);\n }\n map.set(keyValues[i], keyValues[i + 1]);\n }\n });\n };\n\n Map.prototype.toString = function() {\n return this.__toString('Map {', '}');\n };\n\n // @pragma Access\n\n Map.prototype.get = function(k, notSetValue) {\n return this._root ?\n this._root.get(0, undefined, k, notSetValue) :\n notSetValue;\n };\n\n // @pragma Modification\n\n Map.prototype.set = function(k, v) {\n return updateMap(this, k, v);\n };\n\n Map.prototype.setIn = function(keyPath, v) {\n return this.updateIn(keyPath, NOT_SET, function() {return v});\n };\n\n Map.prototype.remove = function(k) {\n return updateMap(this, k, NOT_SET);\n };\n\n Map.prototype.deleteIn = function(keyPath) {\n return this.updateIn(keyPath, function() {return NOT_SET});\n };\n\n Map.prototype.update = function(k, notSetValue, updater) {\n return arguments.length === 1 ?\n k(this) :\n this.updateIn([k], notSetValue, updater);\n };\n\n Map.prototype.updateIn = function(keyPath, notSetValue, updater) {\n if (!updater) {\n updater = notSetValue;\n notSetValue = undefined;\n }\n var updatedValue = updateInDeepMap(\n this,\n forceIterator(keyPath),\n notSetValue,\n updater\n );\n return updatedValue === NOT_SET ? undefined : updatedValue;\n };\n\n Map.prototype.clear = function() {\n if (this.size === 0) {\n return this;\n }\n if (this.__ownerID) {\n this.size = 0;\n this._root = null;\n this.__hash = undefined;\n this.__altered = true;\n return this;\n }\n return emptyMap();\n };\n\n // @pragma Composition\n\n Map.prototype.merge = function(/*...iters*/) {\n return mergeIntoMapWith(this, undefined, arguments);\n };\n\n Map.prototype.mergeWith = function(merger) {var iters = SLICE$0.call(arguments, 1);\n return mergeIntoMapWith(this, merger, iters);\n };\n\n Map.prototype.mergeIn = function(keyPath) {var iters = SLICE$0.call(arguments, 1);\n return this.updateIn(\n keyPath,\n emptyMap(),\n function(m ) {return typeof m.merge === 'function' ?\n m.merge.apply(m, iters) :\n iters[iters.length - 1]}\n );\n };\n\n Map.prototype.mergeDeep = function(/*...iters*/) {\n return mergeIntoMapWith(this, deepMerger, arguments);\n };\n\n Map.prototype.mergeDeepWith = function(merger) {var iters = SLICE$0.call(arguments, 1);\n return mergeIntoMapWith(this, deepMergerWith(merger), iters);\n };\n\n Map.prototype.mergeDeepIn = function(keyPath) {var iters = SLICE$0.call(arguments, 1);\n return this.updateIn(\n keyPath,\n emptyMap(),\n function(m ) {return typeof m.mergeDeep === 'function' ?\n m.mergeDeep.apply(m, iters) :\n iters[iters.length - 1]}\n );\n };\n\n Map.prototype.sort = function(comparator) {\n // Late binding\n return OrderedMap(sortFactory(this, comparator));\n };\n\n Map.prototype.sortBy = function(mapper, comparator) {\n // Late binding\n return OrderedMap(sortFactory(this, comparator, mapper));\n };\n\n // @pragma Mutability\n\n Map.prototype.withMutations = function(fn) {\n var mutable = this.asMutable();\n fn(mutable);\n return mutable.wasAltered() ? mutable.__ensureOwner(this.__ownerID) : this;\n };\n\n Map.prototype.asMutable = function() {\n return this.__ownerID ? this : this.__ensureOwner(new OwnerID());\n };\n\n Map.prototype.asImmutable = function() {\n return this.__ensureOwner();\n };\n\n Map.prototype.wasAltered = function() {\n return this.__altered;\n };\n\n Map.prototype.__iterator = function(type, reverse) {\n return new MapIterator(this, type, reverse);\n };\n\n Map.prototype.__iterate = function(fn, reverse) {var this$0 = this;\n var iterations = 0;\n this._root && this._root.iterate(function(entry ) {\n iterations++;\n return fn(entry[1], entry[0], this$0);\n }, reverse);\n return iterations;\n };\n\n Map.prototype.__ensureOwner = function(ownerID) {\n if (ownerID === this.__ownerID) {\n return this;\n }\n if (!ownerID) {\n this.__ownerID = ownerID;\n this.__altered = false;\n return this;\n }\n return makeMap(this.size, this._root, ownerID, this.__hash);\n };\n\n\n function isMap(maybeMap) {\n return !!(maybeMap && maybeMap[IS_MAP_SENTINEL]);\n }\n\n Map.isMap = isMap;\n\n var IS_MAP_SENTINEL = '@@__IMMUTABLE_MAP__@@';\n\n var MapPrototype = Map.prototype;\n MapPrototype[IS_MAP_SENTINEL] = true;\n MapPrototype[DELETE] = MapPrototype.remove;\n MapPrototype.removeIn = MapPrototype.deleteIn;\n\n\n // #pragma Trie Nodes\n\n\n\n function ArrayMapNode(ownerID, entries) {\n this.ownerID = ownerID;\n this.entries = entries;\n }\n\n ArrayMapNode.prototype.get = function(shift, keyHash, key, notSetValue) {\n var entries = this.entries;\n for (var ii = 0, len = entries.length; ii < len; ii++) {\n if (is(key, entries[ii][0])) {\n return entries[ii][1];\n }\n }\n return notSetValue;\n };\n\n ArrayMapNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n var removed = value === NOT_SET;\n\n var entries = this.entries;\n var idx = 0;\n for (var len = entries.length; idx < len; idx++) {\n if (is(key, entries[idx][0])) {\n break;\n }\n }\n var exists = idx < len;\n\n if (exists ? entries[idx][1] === value : removed) {\n return this;\n }\n\n SetRef(didAlter);\n (removed || !exists) && SetRef(didChangeSize);\n\n if (removed && entries.length === 1) {\n return; // undefined\n }\n\n if (!exists && !removed && entries.length >= MAX_ARRAY_MAP_SIZE) {\n return createNodes(ownerID, entries, key, value);\n }\n\n var isEditable = ownerID && ownerID === this.ownerID;\n var newEntries = isEditable ? entries : arrCopy(entries);\n\n if (exists) {\n if (removed) {\n idx === len - 1 ? newEntries.pop() : (newEntries[idx] = newEntries.pop());\n } else {\n newEntries[idx] = [key, value];\n }\n } else {\n newEntries.push([key, value]);\n }\n\n if (isEditable) {\n this.entries = newEntries;\n return this;\n }\n\n return new ArrayMapNode(ownerID, newEntries);\n };\n\n\n\n\n function BitmapIndexedNode(ownerID, bitmap, nodes) {\n this.ownerID = ownerID;\n this.bitmap = bitmap;\n this.nodes = nodes;\n }\n\n BitmapIndexedNode.prototype.get = function(shift, keyHash, key, notSetValue) {\n if (keyHash === undefined) {\n keyHash = hash(key);\n }\n var bit = (1 << ((shift === 0 ? keyHash : keyHash >>> shift) & MASK));\n var bitmap = this.bitmap;\n return (bitmap & bit) === 0 ? notSetValue :\n this.nodes[popCount(bitmap & (bit - 1))].get(shift + SHIFT, keyHash, key, notSetValue);\n };\n\n BitmapIndexedNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n if (keyHash === undefined) {\n keyHash = hash(key);\n }\n var keyHashFrag = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;\n var bit = 1 << keyHashFrag;\n var bitmap = this.bitmap;\n var exists = (bitmap & bit) !== 0;\n\n if (!exists && value === NOT_SET) {\n return this;\n }\n\n var idx = popCount(bitmap & (bit - 1));\n var nodes = this.nodes;\n var node = exists ? nodes[idx] : undefined;\n var newNode = updateNode(node, ownerID, shift + SHIFT, keyHash, key, value, didChangeSize, didAlter);\n\n if (newNode === node) {\n return this;\n }\n\n if (!exists && newNode && nodes.length >= MAX_BITMAP_INDEXED_SIZE) {\n return expandNodes(ownerID, nodes, bitmap, keyHashFrag, newNode);\n }\n\n if (exists && !newNode && nodes.length === 2 && isLeafNode(nodes[idx ^ 1])) {\n return nodes[idx ^ 1];\n }\n\n if (exists && newNode && nodes.length === 1 && isLeafNode(newNode)) {\n return newNode;\n }\n\n var isEditable = ownerID && ownerID === this.ownerID;\n var newBitmap = exists ? newNode ? bitmap : bitmap ^ bit : bitmap | bit;\n var newNodes = exists ? newNode ?\n setIn(nodes, idx, newNode, isEditable) :\n spliceOut(nodes, idx, isEditable) :\n spliceIn(nodes, idx, newNode, isEditable);\n\n if (isEditable) {\n this.bitmap = newBitmap;\n this.nodes = newNodes;\n return this;\n }\n\n return new BitmapIndexedNode(ownerID, newBitmap, newNodes);\n };\n\n\n\n\n function HashArrayMapNode(ownerID, count, nodes) {\n this.ownerID = ownerID;\n this.count = count;\n this.nodes = nodes;\n }\n\n HashArrayMapNode.prototype.get = function(shift, keyHash, key, notSetValue) {\n if (keyHash === undefined) {\n keyHash = hash(key);\n }\n var idx = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;\n var node = this.nodes[idx];\n return node ? node.get(shift + SHIFT, keyHash, key, notSetValue) : notSetValue;\n };\n\n HashArrayMapNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n if (keyHash === undefined) {\n keyHash = hash(key);\n }\n var idx = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;\n var removed = value === NOT_SET;\n var nodes = this.nodes;\n var node = nodes[idx];\n\n if (removed && !node) {\n return this;\n }\n\n var newNode = updateNode(node, ownerID, shift + SHIFT, keyHash, key, value, didChangeSize, didAlter);\n if (newNode === node) {\n return this;\n }\n\n var newCount = this.count;\n if (!node) {\n newCount++;\n } else if (!newNode) {\n newCount--;\n if (newCount < MIN_HASH_ARRAY_MAP_SIZE) {\n return packNodes(ownerID, nodes, newCount, idx);\n }\n }\n\n var isEditable = ownerID && ownerID === this.ownerID;\n var newNodes = setIn(nodes, idx, newNode, isEditable);\n\n if (isEditable) {\n this.count = newCount;\n this.nodes = newNodes;\n return this;\n }\n\n return new HashArrayMapNode(ownerID, newCount, newNodes);\n };\n\n\n\n\n function HashCollisionNode(ownerID, keyHash, entries) {\n this.ownerID = ownerID;\n this.keyHash = keyHash;\n this.entries = entries;\n }\n\n HashCollisionNode.prototype.get = function(shift, keyHash, key, notSetValue) {\n var entries = this.entries;\n for (var ii = 0, len = entries.length; ii < len; ii++) {\n if (is(key, entries[ii][0])) {\n return entries[ii][1];\n }\n }\n return notSetValue;\n };\n\n HashCollisionNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n if (keyHash === undefined) {\n keyHash = hash(key);\n }\n\n var removed = value === NOT_SET;\n\n if (keyHash !== this.keyHash) {\n if (removed) {\n return this;\n }\n SetRef(didAlter);\n SetRef(didChangeSize);\n return mergeIntoNode(this, ownerID, shift, keyHash, [key, value]);\n }\n\n var entries = this.entries;\n var idx = 0;\n for (var len = entries.length; idx < len; idx++) {\n if (is(key, entries[idx][0])) {\n break;\n }\n }\n var exists = idx < len;\n\n if (exists ? entries[idx][1] === value : removed) {\n return this;\n }\n\n SetRef(didAlter);\n (removed || !exists) && SetRef(didChangeSize);\n\n if (removed && len === 2) {\n return new ValueNode(ownerID, this.keyHash, entries[idx ^ 1]);\n }\n\n var isEditable = ownerID && ownerID === this.ownerID;\n var newEntries = isEditable ? entries : arrCopy(entries);\n\n if (exists) {\n if (removed) {\n idx === len - 1 ? newEntries.pop() : (newEntries[idx] = newEntries.pop());\n } else {\n newEntries[idx] = [key, value];\n }\n } else {\n newEntries.push([key, value]);\n }\n\n if (isEditable) {\n this.entries = newEntries;\n return this;\n }\n\n return new HashCollisionNode(ownerID, this.keyHash, newEntries);\n };\n\n\n\n\n function ValueNode(ownerID, keyHash, entry) {\n this.ownerID = ownerID;\n this.keyHash = keyHash;\n this.entry = entry;\n }\n\n ValueNode.prototype.get = function(shift, keyHash, key, notSetValue) {\n return is(key, this.entry[0]) ? this.entry[1] : notSetValue;\n };\n\n ValueNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n var removed = value === NOT_SET;\n var keyMatch = is(key, this.entry[0]);\n if (keyMatch ? value === this.entry[1] : removed) {\n return this;\n }\n\n SetRef(didAlter);\n\n if (removed) {\n SetRef(didChangeSize);\n return; // undefined\n }\n\n if (keyMatch) {\n if (ownerID && ownerID === this.ownerID) {\n this.entry[1] = value;\n return this;\n }\n return new ValueNode(ownerID, this.keyHash, [key, value]);\n }\n\n SetRef(didChangeSize);\n return mergeIntoNode(this, ownerID, shift, hash(key), [key, value]);\n };\n\n\n\n // #pragma Iterators\n\n ArrayMapNode.prototype.iterate =\n HashCollisionNode.prototype.iterate = function (fn, reverse) {\n var entries = this.entries;\n for (var ii = 0, maxIndex = entries.length - 1; ii <= maxIndex; ii++) {\n if (fn(entries[reverse ? maxIndex - ii : ii]) === false) {\n return false;\n }\n }\n }\n\n BitmapIndexedNode.prototype.iterate =\n HashArrayMapNode.prototype.iterate = function (fn, reverse) {\n var nodes = this.nodes;\n for (var ii = 0, maxIndex = nodes.length - 1; ii <= maxIndex; ii++) {\n var node = nodes[reverse ? maxIndex - ii : ii];\n if (node && node.iterate(fn, reverse) === false) {\n return false;\n }\n }\n }\n\n ValueNode.prototype.iterate = function (fn, reverse) {\n return fn(this.entry);\n }\n\n createClass(MapIterator, Iterator);\n\n function MapIterator(map, type, reverse) {\n this._type = type;\n this._reverse = reverse;\n this._stack = map._root && mapIteratorFrame(map._root);\n }\n\n MapIterator.prototype.next = function() {\n var type = this._type;\n var stack = this._stack;\n while (stack) {\n var node = stack.node;\n var index = stack.index++;\n var maxIndex;\n if (node.entry) {\n if (index === 0) {\n return mapIteratorValue(type, node.entry);\n }\n } else if (node.entries) {\n maxIndex = node.entries.length - 1;\n if (index <= maxIndex) {\n return mapIteratorValue(type, node.entries[this._reverse ? maxIndex - index : index]);\n }\n } else {\n maxIndex = node.nodes.length - 1;\n if (index <= maxIndex) {\n var subNode = node.nodes[this._reverse ? maxIndex - index : index];\n if (subNode) {\n if (subNode.entry) {\n return mapIteratorValue(type, subNode.entry);\n }\n stack = this._stack = mapIteratorFrame(subNode, stack);\n }\n continue;\n }\n }\n stack = this._stack = this._stack.__prev;\n }\n return iteratorDone();\n };\n\n\n function mapIteratorValue(type, entry) {\n return iteratorValue(type, entry[0], entry[1]);\n }\n\n function mapIteratorFrame(node, prev) {\n return {\n node: node,\n index: 0,\n __prev: prev\n };\n }\n\n function makeMap(size, root, ownerID, hash) {\n var map = Object.create(MapPrototype);\n map.size = size;\n map._root = root;\n map.__ownerID = ownerID;\n map.__hash = hash;\n map.__altered = false;\n return map;\n }\n\n var EMPTY_MAP;\n function emptyMap() {\n return EMPTY_MAP || (EMPTY_MAP = makeMap(0));\n }\n\n function updateMap(map, k, v) {\n var newRoot;\n var newSize;\n if (!map._root) {\n if (v === NOT_SET) {\n return map;\n }\n newSize = 1;\n newRoot = new ArrayMapNode(map.__ownerID, [[k, v]]);\n } else {\n var didChangeSize = MakeRef(CHANGE_LENGTH);\n var didAlter = MakeRef(DID_ALTER);\n newRoot = updateNode(map._root, map.__ownerID, 0, undefined, k, v, didChangeSize, didAlter);\n if (!didAlter.value) {\n return map;\n }\n newSize = map.size + (didChangeSize.value ? v === NOT_SET ? -1 : 1 : 0);\n }\n if (map.__ownerID) {\n map.size = newSize;\n map._root = newRoot;\n map.__hash = undefined;\n map.__altered = true;\n return map;\n }\n return newRoot ? makeMap(newSize, newRoot) : emptyMap();\n }\n\n function updateNode(node, ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n if (!node) {\n if (value === NOT_SET) {\n return node;\n }\n SetRef(didAlter);\n SetRef(didChangeSize);\n return new ValueNode(ownerID, keyHash, [key, value]);\n }\n return node.update(ownerID, shift, keyHash, key, value, didChangeSize, didAlter);\n }\n\n function isLeafNode(node) {\n return node.constructor === ValueNode || node.constructor === HashCollisionNode;\n }\n\n function mergeIntoNode(node, ownerID, shift, keyHash, entry) {\n if (node.keyHash === keyHash) {\n return new HashCollisionNode(ownerID, keyHash, [node.entry, entry]);\n }\n\n var idx1 = (shift === 0 ? node.keyHash : node.keyHash >>> shift) & MASK;\n var idx2 = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;\n\n var newNode;\n var nodes = idx1 === idx2 ?\n [mergeIntoNode(node, ownerID, shift + SHIFT, keyHash, entry)] :\n ((newNode = new ValueNode(ownerID, keyHash, entry)), idx1 < idx2 ? [node, newNode] : [newNode, node]);\n\n return new BitmapIndexedNode(ownerID, (1 << idx1) | (1 << idx2), nodes);\n }\n\n function createNodes(ownerID, entries, key, value) {\n if (!ownerID) {\n ownerID = new OwnerID();\n }\n var node = new ValueNode(ownerID, hash(key), [key, value]);\n for (var ii = 0; ii < entries.length; ii++) {\n var entry = entries[ii];\n node = node.update(ownerID, 0, undefined, entry[0], entry[1]);\n }\n return node;\n }\n\n function packNodes(ownerID, nodes, count, excluding) {\n var bitmap = 0;\n var packedII = 0;\n var packedNodes = new Array(count);\n for (var ii = 0, bit = 1, len = nodes.length; ii < len; ii++, bit <<= 1) {\n var node = nodes[ii];\n if (node !== undefined && ii !== excluding) {\n bitmap |= bit;\n packedNodes[packedII++] = node;\n }\n }\n return new BitmapIndexedNode(ownerID, bitmap, packedNodes);\n }\n\n function expandNodes(ownerID, nodes, bitmap, including, node) {\n var count = 0;\n var expandedNodes = new Array(SIZE);\n for (var ii = 0; bitmap !== 0; ii++, bitmap >>>= 1) {\n expandedNodes[ii] = bitmap & 1 ? nodes[count++] : undefined;\n }\n expandedNodes[including] = node;\n return new HashArrayMapNode(ownerID, count + 1, expandedNodes);\n }\n\n function mergeIntoMapWith(map, merger, iterables) {\n var iters = [];\n for (var ii = 0; ii < iterables.length; ii++) {\n var value = iterables[ii];\n var iter = KeyedIterable(value);\n if (!isIterable(value)) {\n iter = iter.map(function(v ) {return fromJS(v)});\n }\n iters.push(iter);\n }\n return mergeIntoCollectionWith(map, merger, iters);\n }\n\n function deepMerger(existing, value, key) {\n return existing && existing.mergeDeep && isIterable(value) ?\n existing.mergeDeep(value) :\n is(existing, value) ? existing : value;\n }\n\n function deepMergerWith(merger) {\n return function(existing, value, key) {\n if (existing && existing.mergeDeepWith && isIterable(value)) {\n return existing.mergeDeepWith(merger, value);\n }\n var nextValue = merger(existing, value, key);\n return is(existing, nextValue) ? existing : nextValue;\n };\n }\n\n function mergeIntoCollectionWith(collection, merger, iters) {\n iters = iters.filter(function(x ) {return x.size !== 0});\n if (iters.length === 0) {\n return collection;\n }\n if (collection.size === 0 && !collection.__ownerID && iters.length === 1) {\n return collection.constructor(iters[0]);\n }\n return collection.withMutations(function(collection ) {\n var mergeIntoMap = merger ?\n function(value, key) {\n collection.update(key, NOT_SET, function(existing )\n {return existing === NOT_SET ? value : merger(existing, value, key)}\n );\n } :\n function(value, key) {\n collection.set(key, value);\n }\n for (var ii = 0; ii < iters.length; ii++) {\n iters[ii].forEach(mergeIntoMap);\n }\n });\n }\n\n function updateInDeepMap(existing, keyPathIter, notSetValue, updater) {\n var isNotSet = existing === NOT_SET;\n var step = keyPathIter.next();\n if (step.done) {\n var existingValue = isNotSet ? notSetValue : existing;\n var newValue = updater(existingValue);\n return newValue === existingValue ? existing : newValue;\n }\n invariant(\n isNotSet || (existing && existing.set),\n 'invalid keyPath'\n );\n var key = step.value;\n var nextExisting = isNotSet ? NOT_SET : existing.get(key, NOT_SET);\n var nextUpdated = updateInDeepMap(\n nextExisting,\n keyPathIter,\n notSetValue,\n updater\n );\n return nextUpdated === nextExisting ? existing :\n nextUpdated === NOT_SET ? existing.remove(key) :\n (isNotSet ? emptyMap() : existing).set(key, nextUpdated);\n }\n\n function popCount(x) {\n x = x - ((x >> 1) & 0x55555555);\n x = (x & 0x33333333) + ((x >> 2) & 0x33333333);\n x = (x + (x >> 4)) & 0x0f0f0f0f;\n x = x + (x >> 8);\n x = x + (x >> 16);\n return x & 0x7f;\n }\n\n function setIn(array, idx, val, canEdit) {\n var newArray = canEdit ? array : arrCopy(array);\n newArray[idx] = val;\n return newArray;\n }\n\n function spliceIn(array, idx, val, canEdit) {\n var newLen = array.length + 1;\n if (canEdit && idx + 1 === newLen) {\n array[idx] = val;\n return array;\n }\n var newArray = new Array(newLen);\n var after = 0;\n for (var ii = 0; ii < newLen; ii++) {\n if (ii === idx) {\n newArray[ii] = val;\n after = -1;\n } else {\n newArray[ii] = array[ii + after];\n }\n }\n return newArray;\n }\n\n function spliceOut(array, idx, canEdit) {\n var newLen = array.length - 1;\n if (canEdit && idx === newLen) {\n array.pop();\n return array;\n }\n var newArray = new Array(newLen);\n var after = 0;\n for (var ii = 0; ii < newLen; ii++) {\n if (ii === idx) {\n after = 1;\n }\n newArray[ii] = array[ii + after];\n }\n return newArray;\n }\n\n var MAX_ARRAY_MAP_SIZE = SIZE / 4;\n var MAX_BITMAP_INDEXED_SIZE = SIZE / 2;\n var MIN_HASH_ARRAY_MAP_SIZE = SIZE / 4;\n\n createClass(List, IndexedCollection);\n\n // @pragma Construction\n\n function List(value) {\n var empty = emptyList();\n if (value === null || value === undefined) {\n return empty;\n }\n if (isList(value)) {\n return value;\n }\n var iter = IndexedIterable(value);\n var size = iter.size;\n if (size === 0) {\n return empty;\n }\n assertNotInfinite(size);\n if (size > 0 && size < SIZE) {\n return makeList(0, size, SHIFT, null, new VNode(iter.toArray()));\n }\n return empty.withMutations(function(list ) {\n list.setSize(size);\n iter.forEach(function(v, i) {return list.set(i, v)});\n });\n }\n\n List.of = function(/*...values*/) {\n return this(arguments);\n };\n\n List.prototype.toString = function() {\n return this.__toString('List [', ']');\n };\n\n // @pragma Access\n\n List.prototype.get = function(index, notSetValue) {\n index = wrapIndex(this, index);\n if (index >= 0 && index < this.size) {\n index += this._origin;\n var node = listNodeFor(this, index);\n return node && node.array[index & MASK];\n }\n return notSetValue;\n };\n\n // @pragma Modification\n\n List.prototype.set = function(index, value) {\n return updateList(this, index, value);\n };\n\n List.prototype.remove = function(index) {\n return !this.has(index) ? this :\n index === 0 ? this.shift() :\n index === this.size - 1 ? this.pop() :\n this.splice(index, 1);\n };\n\n List.prototype.insert = function(index, value) {\n return this.splice(index, 0, value);\n };\n\n List.prototype.clear = function() {\n if (this.size === 0) {\n return this;\n }\n if (this.__ownerID) {\n this.size = this._origin = this._capacity = 0;\n this._level = SHIFT;\n this._root = this._tail = null;\n this.__hash = undefined;\n this.__altered = true;\n return this;\n }\n return emptyList();\n };\n\n List.prototype.push = function(/*...values*/) {\n var values = arguments;\n var oldSize = this.size;\n return this.withMutations(function(list ) {\n setListBounds(list, 0, oldSize + values.length);\n for (var ii = 0; ii < values.length; ii++) {\n list.set(oldSize + ii, values[ii]);\n }\n });\n };\n\n List.prototype.pop = function() {\n return setListBounds(this, 0, -1);\n };\n\n List.prototype.unshift = function(/*...values*/) {\n var values = arguments;\n return this.withMutations(function(list ) {\n setListBounds(list, -values.length);\n for (var ii = 0; ii < values.length; ii++) {\n list.set(ii, values[ii]);\n }\n });\n };\n\n List.prototype.shift = function() {\n return setListBounds(this, 1);\n };\n\n // @pragma Composition\n\n List.prototype.merge = function(/*...iters*/) {\n return mergeIntoListWith(this, undefined, arguments);\n };\n\n List.prototype.mergeWith = function(merger) {var iters = SLICE$0.call(arguments, 1);\n return mergeIntoListWith(this, merger, iters);\n };\n\n List.prototype.mergeDeep = function(/*...iters*/) {\n return mergeIntoListWith(this, deepMerger, arguments);\n };\n\n List.prototype.mergeDeepWith = function(merger) {var iters = SLICE$0.call(arguments, 1);\n return mergeIntoListWith(this, deepMergerWith(merger), iters);\n };\n\n List.prototype.setSize = function(size) {\n return setListBounds(this, 0, size);\n };\n\n // @pragma Iteration\n\n List.prototype.slice = function(begin, end) {\n var size = this.size;\n if (wholeSlice(begin, end, size)) {\n return this;\n }\n return setListBounds(\n this,\n resolveBegin(begin, size),\n resolveEnd(end, size)\n );\n };\n\n List.prototype.__iterator = function(type, reverse) {\n var index = 0;\n var values = iterateList(this, reverse);\n return new Iterator(function() {\n var value = values();\n return value === DONE ?\n iteratorDone() :\n iteratorValue(type, index++, value);\n });\n };\n\n List.prototype.__iterate = function(fn, reverse) {\n var index = 0;\n var values = iterateList(this, reverse);\n var value;\n while ((value = values()) !== DONE) {\n if (fn(value, index++, this) === false) {\n break;\n }\n }\n return index;\n };\n\n List.prototype.__ensureOwner = function(ownerID) {\n if (ownerID === this.__ownerID) {\n return this;\n }\n if (!ownerID) {\n this.__ownerID = ownerID;\n return this;\n }\n return makeList(this._origin, this._capacity, this._level, this._root, this._tail, ownerID, this.__hash);\n };\n\n\n function isList(maybeList) {\n return !!(maybeList && maybeList[IS_LIST_SENTINEL]);\n }\n\n List.isList = isList;\n\n var IS_LIST_SENTINEL = '@@__IMMUTABLE_LIST__@@';\n\n var ListPrototype = List.prototype;\n ListPrototype[IS_LIST_SENTINEL] = true;\n ListPrototype[DELETE] = ListPrototype.remove;\n ListPrototype.setIn = MapPrototype.setIn;\n ListPrototype.deleteIn =\n ListPrototype.removeIn = MapPrototype.removeIn;\n ListPrototype.update = MapPrototype.update;\n ListPrototype.updateIn = MapPrototype.updateIn;\n ListPrototype.mergeIn = MapPrototype.mergeIn;\n ListPrototype.mergeDeepIn = MapPrototype.mergeDeepIn;\n ListPrototype.withMutations = MapPrototype.withMutations;\n ListPrototype.asMutable = MapPrototype.asMutable;\n ListPrototype.asImmutable = MapPrototype.asImmutable;\n ListPrototype.wasAltered = MapPrototype.wasAltered;\n\n\n\n function VNode(array, ownerID) {\n this.array = array;\n this.ownerID = ownerID;\n }\n\n // TODO: seems like these methods are very similar\n\n VNode.prototype.removeBefore = function(ownerID, level, index) {\n if (index === level ? 1 << level : 0 || this.array.length === 0) {\n return this;\n }\n var originIndex = (index >>> level) & MASK;\n if (originIndex >= this.array.length) {\n return new VNode([], ownerID);\n }\n var removingFirst = originIndex === 0;\n var newChild;\n if (level > 0) {\n var oldChild = this.array[originIndex];\n newChild = oldChild && oldChild.removeBefore(ownerID, level - SHIFT, index);\n if (newChild === oldChild && removingFirst) {\n return this;\n }\n }\n if (removingFirst && !newChild) {\n return this;\n }\n var editable = editableVNode(this, ownerID);\n if (!removingFirst) {\n for (var ii = 0; ii < originIndex; ii++) {\n editable.array[ii] = undefined;\n }\n }\n if (newChild) {\n editable.array[originIndex] = newChild;\n }\n return editable;\n };\n\n VNode.prototype.removeAfter = function(ownerID, level, index) {\n if (index === (level ? 1 << level : 0) || this.array.length === 0) {\n return this;\n }\n var sizeIndex = ((index - 1) >>> level) & MASK;\n if (sizeIndex >= this.array.length) {\n return this;\n }\n\n var newChild;\n if (level > 0) {\n var oldChild = this.array[sizeIndex];\n newChild = oldChild && oldChild.removeAfter(ownerID, level - SHIFT, index);\n if (newChild === oldChild && sizeIndex === this.array.length - 1) {\n return this;\n }\n }\n\n var editable = editableVNode(this, ownerID);\n editable.array.splice(sizeIndex + 1);\n if (newChild) {\n editable.array[sizeIndex] = newChild;\n }\n return editable;\n };\n\n\n\n var DONE = {};\n\n function iterateList(list, reverse) {\n var left = list._origin;\n var right = list._capacity;\n var tailPos = getTailOffset(right);\n var tail = list._tail;\n\n return iterateNodeOrLeaf(list._root, list._level, 0);\n\n function iterateNodeOrLeaf(node, level, offset) {\n return level === 0 ?\n iterateLeaf(node, offset) :\n iterateNode(node, level, offset);\n }\n\n function iterateLeaf(node, offset) {\n var array = offset === tailPos ? tail && tail.array : node && node.array;\n var from = offset > left ? 0 : left - offset;\n var to = right - offset;\n if (to > SIZE) {\n to = SIZE;\n }\n return function() {\n if (from === to) {\n return DONE;\n }\n var idx = reverse ? --to : from++;\n return array && array[idx];\n };\n }\n\n function iterateNode(node, level, offset) {\n var values;\n var array = node && node.array;\n var from = offset > left ? 0 : (left - offset) >> level;\n var to = ((right - offset) >> level) + 1;\n if (to > SIZE) {\n to = SIZE;\n }\n return function() {\n do {\n if (values) {\n var value = values();\n if (value !== DONE) {\n return value;\n }\n values = null;\n }\n if (from === to) {\n return DONE;\n }\n var idx = reverse ? --to : from++;\n values = iterateNodeOrLeaf(\n array && array[idx], level - SHIFT, offset + (idx << level)\n );\n } while (true);\n };\n }\n }\n\n function makeList(origin, capacity, level, root, tail, ownerID, hash) {\n var list = Object.create(ListPrototype);\n list.size = capacity - origin;\n list._origin = origin;\n list._capacity = capacity;\n list._level = level;\n list._root = root;\n list._tail = tail;\n list.__ownerID = ownerID;\n list.__hash = hash;\n list.__altered = false;\n return list;\n }\n\n var EMPTY_LIST;\n function emptyList() {\n return EMPTY_LIST || (EMPTY_LIST = makeList(0, 0, SHIFT));\n }\n\n function updateList(list, index, value) {\n index = wrapIndex(list, index);\n\n if (index !== index) {\n return list;\n }\n\n if (index >= list.size || index < 0) {\n return list.withMutations(function(list ) {\n index < 0 ?\n setListBounds(list, index).set(0, value) :\n setListBounds(list, 0, index + 1).set(index, value)\n });\n }\n\n index += list._origin;\n\n var newTail = list._tail;\n var newRoot = list._root;\n var didAlter = MakeRef(DID_ALTER);\n if (index >= getTailOffset(list._capacity)) {\n newTail = updateVNode(newTail, list.__ownerID, 0, index, value, didAlter);\n } else {\n newRoot = updateVNode(newRoot, list.__ownerID, list._level, index, value, didAlter);\n }\n\n if (!didAlter.value) {\n return list;\n }\n\n if (list.__ownerID) {\n list._root = newRoot;\n list._tail = newTail;\n list.__hash = undefined;\n list.__altered = true;\n return list;\n }\n return makeList(list._origin, list._capacity, list._level, newRoot, newTail);\n }\n\n function updateVNode(node, ownerID, level, index, value, didAlter) {\n var idx = (index >>> level) & MASK;\n var nodeHas = node && idx < node.array.length;\n if (!nodeHas && value === undefined) {\n return node;\n }\n\n var newNode;\n\n if (level > 0) {\n var lowerNode = node && node.array[idx];\n var newLowerNode = updateVNode(lowerNode, ownerID, level - SHIFT, index, value, didAlter);\n if (newLowerNode === lowerNode) {\n return node;\n }\n newNode = editableVNode(node, ownerID);\n newNode.array[idx] = newLowerNode;\n return newNode;\n }\n\n if (nodeHas && node.array[idx] === value) {\n return node;\n }\n\n SetRef(didAlter);\n\n newNode = editableVNode(node, ownerID);\n if (value === undefined && idx === newNode.array.length - 1) {\n newNode.array.pop();\n } else {\n newNode.array[idx] = value;\n }\n return newNode;\n }\n\n function editableVNode(node, ownerID) {\n if (ownerID && node && ownerID === node.ownerID) {\n return node;\n }\n return new VNode(node ? node.array.slice() : [], ownerID);\n }\n\n function listNodeFor(list, rawIndex) {\n if (rawIndex >= getTailOffset(list._capacity)) {\n return list._tail;\n }\n if (rawIndex < 1 << (list._level + SHIFT)) {\n var node = list._root;\n var level = list._level;\n while (node && level > 0) {\n node = node.array[(rawIndex >>> level) & MASK];\n level -= SHIFT;\n }\n return node;\n }\n }\n\n function setListBounds(list, begin, end) {\n // Sanitize begin & end using this shorthand for ToInt32(argument)\n // http://www.ecma-international.org/ecma-262/6.0/#sec-toint32\n if (begin !== undefined) {\n begin = begin | 0;\n }\n if (end !== undefined) {\n end = end | 0;\n }\n var owner = list.__ownerID || new OwnerID();\n var oldOrigin = list._origin;\n var oldCapacity = list._capacity;\n var newOrigin = oldOrigin + begin;\n var newCapacity = end === undefined ? oldCapacity : end < 0 ? oldCapacity + end : oldOrigin + end;\n if (newOrigin === oldOrigin && newCapacity === oldCapacity) {\n return list;\n }\n\n // If it's going to end after it starts, it's empty.\n if (newOrigin >= newCapacity) {\n return list.clear();\n }\n\n var newLevel = list._level;\n var newRoot = list._root;\n\n // New origin might need creating a higher root.\n var offsetShift = 0;\n while (newOrigin + offsetShift < 0) {\n newRoot = new VNode(newRoot && newRoot.array.length ? [undefined, newRoot] : [], owner);\n newLevel += SHIFT;\n offsetShift += 1 << newLevel;\n }\n if (offsetShift) {\n newOrigin += offsetShift;\n oldOrigin += offsetShift;\n newCapacity += offsetShift;\n oldCapacity += offsetShift;\n }\n\n var oldTailOffset = getTailOffset(oldCapacity);\n var newTailOffset = getTailOffset(newCapacity);\n\n // New size might need creating a higher root.\n while (newTailOffset >= 1 << (newLevel + SHIFT)) {\n newRoot = new VNode(newRoot && newRoot.array.length ? [newRoot] : [], owner);\n newLevel += SHIFT;\n }\n\n // Locate or create the new tail.\n var oldTail = list._tail;\n var newTail = newTailOffset < oldTailOffset ?\n listNodeFor(list, newCapacity - 1) :\n newTailOffset > oldTailOffset ? new VNode([], owner) : oldTail;\n\n // Merge Tail into tree.\n if (oldTail && newTailOffset > oldTailOffset && newOrigin < oldCapacity && oldTail.array.length) {\n newRoot = editableVNode(newRoot, owner);\n var node = newRoot;\n for (var level = newLevel; level > SHIFT; level -= SHIFT) {\n var idx = (oldTailOffset >>> level) & MASK;\n node = node.array[idx] = editableVNode(node.array[idx], owner);\n }\n node.array[(oldTailOffset >>> SHIFT) & MASK] = oldTail;\n }\n\n // If the size has been reduced, there's a chance the tail needs to be trimmed.\n if (newCapacity < oldCapacity) {\n newTail = newTail && newTail.removeAfter(owner, 0, newCapacity);\n }\n\n // If the new origin is within the tail, then we do not need a root.\n if (newOrigin >= newTailOffset) {\n newOrigin -= newTailOffset;\n newCapacity -= newTailOffset;\n newLevel = SHIFT;\n newRoot = null;\n newTail = newTail && newTail.removeBefore(owner, 0, newOrigin);\n\n // Otherwise, if the root has been trimmed, garbage collect.\n } else if (newOrigin > oldOrigin || newTailOffset < oldTailOffset) {\n offsetShift = 0;\n\n // Identify the new top root node of the subtree of the old root.\n while (newRoot) {\n var beginIndex = (newOrigin >>> newLevel) & MASK;\n if (beginIndex !== (newTailOffset >>> newLevel) & MASK) {\n break;\n }\n if (beginIndex) {\n offsetShift += (1 << newLevel) * beginIndex;\n }\n newLevel -= SHIFT;\n newRoot = newRoot.array[beginIndex];\n }\n\n // Trim the new sides of the new root.\n if (newRoot && newOrigin > oldOrigin) {\n newRoot = newRoot.removeBefore(owner, newLevel, newOrigin - offsetShift);\n }\n if (newRoot && newTailOffset < oldTailOffset) {\n newRoot = newRoot.removeAfter(owner, newLevel, newTailOffset - offsetShift);\n }\n if (offsetShift) {\n newOrigin -= offsetShift;\n newCapacity -= offsetShift;\n }\n }\n\n if (list.__ownerID) {\n list.size = newCapacity - newOrigin;\n list._origin = newOrigin;\n list._capacity = newCapacity;\n list._level = newLevel;\n list._root = newRoot;\n list._tail = newTail;\n list.__hash = undefined;\n list.__altered = true;\n return list;\n }\n return makeList(newOrigin, newCapacity, newLevel, newRoot, newTail);\n }\n\n function mergeIntoListWith(list, merger, iterables) {\n var iters = [];\n var maxSize = 0;\n for (var ii = 0; ii < iterables.length; ii++) {\n var value = iterables[ii];\n var iter = IndexedIterable(value);\n if (iter.size > maxSize) {\n maxSize = iter.size;\n }\n if (!isIterable(value)) {\n iter = iter.map(function(v ) {return fromJS(v)});\n }\n iters.push(iter);\n }\n if (maxSize > list.size) {\n list = list.setSize(maxSize);\n }\n return mergeIntoCollectionWith(list, merger, iters);\n }\n\n function getTailOffset(size) {\n return size < SIZE ? 0 : (((size - 1) >>> SHIFT) << SHIFT);\n }\n\n createClass(OrderedMap, Map);\n\n // @pragma Construction\n\n function OrderedMap(value) {\n return value === null || value === undefined ? emptyOrderedMap() :\n isOrderedMap(value) ? value :\n emptyOrderedMap().withMutations(function(map ) {\n var iter = KeyedIterable(value);\n assertNotInfinite(iter.size);\n iter.forEach(function(v, k) {return map.set(k, v)});\n });\n }\n\n OrderedMap.of = function(/*...values*/) {\n return this(arguments);\n };\n\n OrderedMap.prototype.toString = function() {\n return this.__toString('OrderedMap {', '}');\n };\n\n // @pragma Access\n\n OrderedMap.prototype.get = function(k, notSetValue) {\n var index = this._map.get(k);\n return index !== undefined ? this._list.get(index)[1] : notSetValue;\n };\n\n // @pragma Modification\n\n OrderedMap.prototype.clear = function() {\n if (this.size === 0) {\n return this;\n }\n if (this.__ownerID) {\n this.size = 0;\n this._map.clear();\n this._list.clear();\n return this;\n }\n return emptyOrderedMap();\n };\n\n OrderedMap.prototype.set = function(k, v) {\n return updateOrderedMap(this, k, v);\n };\n\n OrderedMap.prototype.remove = function(k) {\n return updateOrderedMap(this, k, NOT_SET);\n };\n\n OrderedMap.prototype.wasAltered = function() {\n return this._map.wasAltered() || this._list.wasAltered();\n };\n\n OrderedMap.prototype.__iterate = function(fn, reverse) {var this$0 = this;\n return this._list.__iterate(\n function(entry ) {return entry && fn(entry[1], entry[0], this$0)},\n reverse\n );\n };\n\n OrderedMap.prototype.__iterator = function(type, reverse) {\n return this._list.fromEntrySeq().__iterator(type, reverse);\n };\n\n OrderedMap.prototype.__ensureOwner = function(ownerID) {\n if (ownerID === this.__ownerID) {\n return this;\n }\n var newMap = this._map.__ensureOwner(ownerID);\n var newList = this._list.__ensureOwner(ownerID);\n if (!ownerID) {\n this.__ownerID = ownerID;\n this._map = newMap;\n this._list = newList;\n return this;\n }\n return makeOrderedMap(newMap, newList, ownerID, this.__hash);\n };\n\n\n function isOrderedMap(maybeOrderedMap) {\n return isMap(maybeOrderedMap) && isOrdered(maybeOrderedMap);\n }\n\n OrderedMap.isOrderedMap = isOrderedMap;\n\n OrderedMap.prototype[IS_ORDERED_SENTINEL] = true;\n OrderedMap.prototype[DELETE] = OrderedMap.prototype.remove;\n\n\n\n function makeOrderedMap(map, list, ownerID, hash) {\n var omap = Object.create(OrderedMap.prototype);\n omap.size = map ? map.size : 0;\n omap._map = map;\n omap._list = list;\n omap.__ownerID = ownerID;\n omap.__hash = hash;\n return omap;\n }\n\n var EMPTY_ORDERED_MAP;\n function emptyOrderedMap() {\n return EMPTY_ORDERED_MAP || (EMPTY_ORDERED_MAP = makeOrderedMap(emptyMap(), emptyList()));\n }\n\n function updateOrderedMap(omap, k, v) {\n var map = omap._map;\n var list = omap._list;\n var i = map.get(k);\n var has = i !== undefined;\n var newMap;\n var newList;\n if (v === NOT_SET) { // removed\n if (!has) {\n return omap;\n }\n if (list.size >= SIZE && list.size >= map.size * 2) {\n newList = list.filter(function(entry, idx) {return entry !== undefined && i !== idx});\n newMap = newList.toKeyedSeq().map(function(entry ) {return entry[0]}).flip().toMap();\n if (omap.__ownerID) {\n newMap.__ownerID = newList.__ownerID = omap.__ownerID;\n }\n } else {\n newMap = map.remove(k);\n newList = i === list.size - 1 ? list.pop() : list.set(i, undefined);\n }\n } else {\n if (has) {\n if (v === list.get(i)[1]) {\n return omap;\n }\n newMap = map;\n newList = list.set(i, [k, v]);\n } else {\n newMap = map.set(k, list.size);\n newList = list.set(list.size, [k, v]);\n }\n }\n if (omap.__ownerID) {\n omap.size = newMap.size;\n omap._map = newMap;\n omap._list = newList;\n omap.__hash = undefined;\n return omap;\n }\n return makeOrderedMap(newMap, newList);\n }\n\n createClass(ToKeyedSequence, KeyedSeq);\n function ToKeyedSequence(indexed, useKeys) {\n this._iter = indexed;\n this._useKeys = useKeys;\n this.size = indexed.size;\n }\n\n ToKeyedSequence.prototype.get = function(key, notSetValue) {\n return this._iter.get(key, notSetValue);\n };\n\n ToKeyedSequence.prototype.has = function(key) {\n return this._iter.has(key);\n };\n\n ToKeyedSequence.prototype.valueSeq = function() {\n return this._iter.valueSeq();\n };\n\n ToKeyedSequence.prototype.reverse = function() {var this$0 = this;\n var reversedSequence = reverseFactory(this, true);\n if (!this._useKeys) {\n reversedSequence.valueSeq = function() {return this$0._iter.toSeq().reverse()};\n }\n return reversedSequence;\n };\n\n ToKeyedSequence.prototype.map = function(mapper, context) {var this$0 = this;\n var mappedSequence = mapFactory(this, mapper, context);\n if (!this._useKeys) {\n mappedSequence.valueSeq = function() {return this$0._iter.toSeq().map(mapper, context)};\n }\n return mappedSequence;\n };\n\n ToKeyedSequence.prototype.__iterate = function(fn, reverse) {var this$0 = this;\n var ii;\n return this._iter.__iterate(\n this._useKeys ?\n function(v, k) {return fn(v, k, this$0)} :\n ((ii = reverse ? resolveSize(this) : 0),\n function(v ) {return fn(v, reverse ? --ii : ii++, this$0)}),\n reverse\n );\n };\n\n ToKeyedSequence.prototype.__iterator = function(type, reverse) {\n if (this._useKeys) {\n return this._iter.__iterator(type, reverse);\n }\n var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);\n var ii = reverse ? resolveSize(this) : 0;\n return new Iterator(function() {\n var step = iterator.next();\n return step.done ? step :\n iteratorValue(type, reverse ? --ii : ii++, step.value, step);\n });\n };\n\n ToKeyedSequence.prototype[IS_ORDERED_SENTINEL] = true;\n\n\n createClass(ToIndexedSequence, IndexedSeq);\n function ToIndexedSequence(iter) {\n this._iter = iter;\n this.size = iter.size;\n }\n\n ToIndexedSequence.prototype.includes = function(value) {\n return this._iter.includes(value);\n };\n\n ToIndexedSequence.prototype.__iterate = function(fn, reverse) {var this$0 = this;\n var iterations = 0;\n return this._iter.__iterate(function(v ) {return fn(v, iterations++, this$0)}, reverse);\n };\n\n ToIndexedSequence.prototype.__iterator = function(type, reverse) {\n var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);\n var iterations = 0;\n return new Iterator(function() {\n var step = iterator.next();\n return step.done ? step :\n iteratorValue(type, iterations++, step.value, step)\n });\n };\n\n\n\n createClass(ToSetSequence, SetSeq);\n function ToSetSequence(iter) {\n this._iter = iter;\n this.size = iter.size;\n }\n\n ToSetSequence.prototype.has = function(key) {\n return this._iter.includes(key);\n };\n\n ToSetSequence.prototype.__iterate = function(fn, reverse) {var this$0 = this;\n return this._iter.__iterate(function(v ) {return fn(v, v, this$0)}, reverse);\n };\n\n ToSetSequence.prototype.__iterator = function(type, reverse) {\n var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);\n return new Iterator(function() {\n var step = iterator.next();\n return step.done ? step :\n iteratorValue(type, step.value, step.value, step);\n });\n };\n\n\n\n createClass(FromEntriesSequence, KeyedSeq);\n function FromEntriesSequence(entries) {\n this._iter = entries;\n this.size = entries.size;\n }\n\n FromEntriesSequence.prototype.entrySeq = function() {\n return this._iter.toSeq();\n };\n\n FromEntriesSequence.prototype.__iterate = function(fn, reverse) {var this$0 = this;\n return this._iter.__iterate(function(entry ) {\n // Check if entry exists first so array access doesn't throw for holes\n // in the parent iteration.\n if (entry) {\n validateEntry(entry);\n var indexedIterable = isIterable(entry);\n return fn(\n indexedIterable ? entry.get(1) : entry[1],\n indexedIterable ? entry.get(0) : entry[0],\n this$0\n );\n }\n }, reverse);\n };\n\n FromEntriesSequence.prototype.__iterator = function(type, reverse) {\n var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);\n return new Iterator(function() {\n while (true) {\n var step = iterator.next();\n if (step.done) {\n return step;\n }\n var entry = step.value;\n // Check if entry exists first so array access doesn't throw for holes\n // in the parent iteration.\n if (entry) {\n validateEntry(entry);\n var indexedIterable = isIterable(entry);\n return iteratorValue(\n type,\n indexedIterable ? entry.get(0) : entry[0],\n indexedIterable ? entry.get(1) : entry[1],\n step\n );\n }\n }\n });\n };\n\n\n ToIndexedSequence.prototype.cacheResult =\n ToKeyedSequence.prototype.cacheResult =\n ToSetSequence.prototype.cacheResult =\n FromEntriesSequence.prototype.cacheResult =\n cacheResultThrough;\n\n\n function flipFactory(iterable) {\n var flipSequence = makeSequence(iterable);\n flipSequence._iter = iterable;\n flipSequence.size = iterable.size;\n flipSequence.flip = function() {return iterable};\n flipSequence.reverse = function () {\n var reversedSequence = iterable.reverse.apply(this); // super.reverse()\n reversedSequence.flip = function() {return iterable.reverse()};\n return reversedSequence;\n };\n flipSequence.has = function(key ) {return iterable.includes(key)};\n flipSequence.includes = function(key ) {return iterable.has(key)};\n flipSequence.cacheResult = cacheResultThrough;\n flipSequence.__iterateUncached = function (fn, reverse) {var this$0 = this;\n return iterable.__iterate(function(v, k) {return fn(k, v, this$0) !== false}, reverse);\n }\n flipSequence.__iteratorUncached = function(type, reverse) {\n if (type === ITERATE_ENTRIES) {\n var iterator = iterable.__iterator(type, reverse);\n return new Iterator(function() {\n var step = iterator.next();\n if (!step.done) {\n var k = step.value[0];\n step.value[0] = step.value[1];\n step.value[1] = k;\n }\n return step;\n });\n }\n return iterable.__iterator(\n type === ITERATE_VALUES ? ITERATE_KEYS : ITERATE_VALUES,\n reverse\n );\n }\n return flipSequence;\n }\n\n\n function mapFactory(iterable, mapper, context) {\n var mappedSequence = makeSequence(iterable);\n mappedSequence.size = iterable.size;\n mappedSequence.has = function(key ) {return iterable.has(key)};\n mappedSequence.get = function(key, notSetValue) {\n var v = iterable.get(key, NOT_SET);\n return v === NOT_SET ?\n notSetValue :\n mapper.call(context, v, key, iterable);\n };\n mappedSequence.__iterateUncached = function (fn, reverse) {var this$0 = this;\n return iterable.__iterate(\n function(v, k, c) {return fn(mapper.call(context, v, k, c), k, this$0) !== false},\n reverse\n );\n }\n mappedSequence.__iteratorUncached = function (type, reverse) {\n var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse);\n return new Iterator(function() {\n var step = iterator.next();\n if (step.done) {\n return step;\n }\n var entry = step.value;\n var key = entry[0];\n return iteratorValue(\n type,\n key,\n mapper.call(context, entry[1], key, iterable),\n step\n );\n });\n }\n return mappedSequence;\n }\n\n\n function reverseFactory(iterable, useKeys) {\n var reversedSequence = makeSequence(iterable);\n reversedSequence._iter = iterable;\n reversedSequence.size = iterable.size;\n reversedSequence.reverse = function() {return iterable};\n if (iterable.flip) {\n reversedSequence.flip = function () {\n var flipSequence = flipFactory(iterable);\n flipSequence.reverse = function() {return iterable.flip()};\n return flipSequence;\n };\n }\n reversedSequence.get = function(key, notSetValue) \n {return iterable.get(useKeys ? key : -1 - key, notSetValue)};\n reversedSequence.has = function(key )\n {return iterable.has(useKeys ? key : -1 - key)};\n reversedSequence.includes = function(value ) {return iterable.includes(value)};\n reversedSequence.cacheResult = cacheResultThrough;\n reversedSequence.__iterate = function (fn, reverse) {var this$0 = this;\n return iterable.__iterate(function(v, k) {return fn(v, k, this$0)}, !reverse);\n };\n reversedSequence.__iterator =\n function(type, reverse) {return iterable.__iterator(type, !reverse)};\n return reversedSequence;\n }\n\n\n function filterFactory(iterable, predicate, context, useKeys) {\n var filterSequence = makeSequence(iterable);\n if (useKeys) {\n filterSequence.has = function(key ) {\n var v = iterable.get(key, NOT_SET);\n return v !== NOT_SET && !!predicate.call(context, v, key, iterable);\n };\n filterSequence.get = function(key, notSetValue) {\n var v = iterable.get(key, NOT_SET);\n return v !== NOT_SET && predicate.call(context, v, key, iterable) ?\n v : notSetValue;\n };\n }\n filterSequence.__iterateUncached = function (fn, reverse) {var this$0 = this;\n var iterations = 0;\n iterable.__iterate(function(v, k, c) {\n if (predicate.call(context, v, k, c)) {\n iterations++;\n return fn(v, useKeys ? k : iterations - 1, this$0);\n }\n }, reverse);\n return iterations;\n };\n filterSequence.__iteratorUncached = function (type, reverse) {\n var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse);\n var iterations = 0;\n return new Iterator(function() {\n while (true) {\n var step = iterator.next();\n if (step.done) {\n return step;\n }\n var entry = step.value;\n var key = entry[0];\n var value = entry[1];\n if (predicate.call(context, value, key, iterable)) {\n return iteratorValue(type, useKeys ? key : iterations++, value, step);\n }\n }\n });\n }\n return filterSequence;\n }\n\n\n function countByFactory(iterable, grouper, context) {\n var groups = Map().asMutable();\n iterable.__iterate(function(v, k) {\n groups.update(\n grouper.call(context, v, k, iterable),\n 0,\n function(a ) {return a + 1}\n );\n });\n return groups.asImmutable();\n }\n\n\n function groupByFactory(iterable, grouper, context) {\n var isKeyedIter = isKeyed(iterable);\n var groups = (isOrdered(iterable) ? OrderedMap() : Map()).asMutable();\n iterable.__iterate(function(v, k) {\n groups.update(\n grouper.call(context, v, k, iterable),\n function(a ) {return (a = a || [], a.push(isKeyedIter ? [k, v] : v), a)}\n );\n });\n var coerce = iterableClass(iterable);\n return groups.map(function(arr ) {return reify(iterable, coerce(arr))});\n }\n\n\n function sliceFactory(iterable, begin, end, useKeys) {\n var originalSize = iterable.size;\n\n // Sanitize begin & end using this shorthand for ToInt32(argument)\n // http://www.ecma-international.org/ecma-262/6.0/#sec-toint32\n if (begin !== undefined) {\n begin = begin | 0;\n }\n if (end !== undefined) {\n if (end === Infinity) {\n end = originalSize;\n } else {\n end = end | 0;\n }\n }\n\n if (wholeSlice(begin, end, originalSize)) {\n return iterable;\n }\n\n var resolvedBegin = resolveBegin(begin, originalSize);\n var resolvedEnd = resolveEnd(end, originalSize);\n\n // begin or end will be NaN if they were provided as negative numbers and\n // this iterable's size is unknown. In that case, cache first so there is\n // a known size and these do not resolve to NaN.\n if (resolvedBegin !== resolvedBegin || resolvedEnd !== resolvedEnd) {\n return sliceFactory(iterable.toSeq().cacheResult(), begin, end, useKeys);\n }\n\n // Note: resolvedEnd is undefined when the original sequence's length is\n // unknown and this slice did not supply an end and should contain all\n // elements after resolvedBegin.\n // In that case, resolvedSize will be NaN and sliceSize will remain undefined.\n var resolvedSize = resolvedEnd - resolvedBegin;\n var sliceSize;\n if (resolvedSize === resolvedSize) {\n sliceSize = resolvedSize < 0 ? 0 : resolvedSize;\n }\n\n var sliceSeq = makeSequence(iterable);\n\n // If iterable.size is undefined, the size of the realized sliceSeq is\n // unknown at this point unless the number of items to slice is 0\n sliceSeq.size = sliceSize === 0 ? sliceSize : iterable.size && sliceSize || undefined;\n\n if (!useKeys && isSeq(iterable) && sliceSize >= 0) {\n sliceSeq.get = function (index, notSetValue) {\n index = wrapIndex(this, index);\n return index >= 0 && index < sliceSize ?\n iterable.get(index + resolvedBegin, notSetValue) :\n notSetValue;\n }\n }\n\n sliceSeq.__iterateUncached = function(fn, reverse) {var this$0 = this;\n if (sliceSize === 0) {\n return 0;\n }\n if (reverse) {\n return this.cacheResult().__iterate(fn, reverse);\n }\n var skipped = 0;\n var isSkipping = true;\n var iterations = 0;\n iterable.__iterate(function(v, k) {\n if (!(isSkipping && (isSkipping = skipped++ < resolvedBegin))) {\n iterations++;\n return fn(v, useKeys ? k : iterations - 1, this$0) !== false &&\n iterations !== sliceSize;\n }\n });\n return iterations;\n };\n\n sliceSeq.__iteratorUncached = function(type, reverse) {\n if (sliceSize !== 0 && reverse) {\n return this.cacheResult().__iterator(type, reverse);\n }\n // Don't bother instantiating parent iterator if taking 0.\n var iterator = sliceSize !== 0 && iterable.__iterator(type, reverse);\n var skipped = 0;\n var iterations = 0;\n return new Iterator(function() {\n while (skipped++ < resolvedBegin) {\n iterator.next();\n }\n if (++iterations > sliceSize) {\n return iteratorDone();\n }\n var step = iterator.next();\n if (useKeys || type === ITERATE_VALUES) {\n return step;\n } else if (type === ITERATE_KEYS) {\n return iteratorValue(type, iterations - 1, undefined, step);\n } else {\n return iteratorValue(type, iterations - 1, step.value[1], step);\n }\n });\n }\n\n return sliceSeq;\n }\n\n\n function takeWhileFactory(iterable, predicate, context) {\n var takeSequence = makeSequence(iterable);\n takeSequence.__iterateUncached = function(fn, reverse) {var this$0 = this;\n if (reverse) {\n return this.cacheResult().__iterate(fn, reverse);\n }\n var iterations = 0;\n iterable.__iterate(function(v, k, c) \n {return predicate.call(context, v, k, c) && ++iterations && fn(v, k, this$0)}\n );\n return iterations;\n };\n takeSequence.__iteratorUncached = function(type, reverse) {var this$0 = this;\n if (reverse) {\n return this.cacheResult().__iterator(type, reverse);\n }\n var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse);\n var iterating = true;\n return new Iterator(function() {\n if (!iterating) {\n return iteratorDone();\n }\n var step = iterator.next();\n if (step.done) {\n return step;\n }\n var entry = step.value;\n var k = entry[0];\n var v = entry[1];\n if (!predicate.call(context, v, k, this$0)) {\n iterating = false;\n return iteratorDone();\n }\n return type === ITERATE_ENTRIES ? step :\n iteratorValue(type, k, v, step);\n });\n };\n return takeSequence;\n }\n\n\n function skipWhileFactory(iterable, predicate, context, useKeys) {\n var skipSequence = makeSequence(iterable);\n skipSequence.__iterateUncached = function (fn, reverse) {var this$0 = this;\n if (reverse) {\n return this.cacheResult().__iterate(fn, reverse);\n }\n var isSkipping = true;\n var iterations = 0;\n iterable.__iterate(function(v, k, c) {\n if (!(isSkipping && (isSkipping = predicate.call(context, v, k, c)))) {\n iterations++;\n return fn(v, useKeys ? k : iterations - 1, this$0);\n }\n });\n return iterations;\n };\n skipSequence.__iteratorUncached = function(type, reverse) {var this$0 = this;\n if (reverse) {\n return this.cacheResult().__iterator(type, reverse);\n }\n var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse);\n var skipping = true;\n var iterations = 0;\n return new Iterator(function() {\n var step, k, v;\n do {\n step = iterator.next();\n if (step.done) {\n if (useKeys || type === ITERATE_VALUES) {\n return step;\n } else if (type === ITERATE_KEYS) {\n return iteratorValue(type, iterations++, undefined, step);\n } else {\n return iteratorValue(type, iterations++, step.value[1], step);\n }\n }\n var entry = step.value;\n k = entry[0];\n v = entry[1];\n skipping && (skipping = predicate.call(context, v, k, this$0));\n } while (skipping);\n return type === ITERATE_ENTRIES ? step :\n iteratorValue(type, k, v, step);\n });\n };\n return skipSequence;\n }\n\n\n function concatFactory(iterable, values) {\n var isKeyedIterable = isKeyed(iterable);\n var iters = [iterable].concat(values).map(function(v ) {\n if (!isIterable(v)) {\n v = isKeyedIterable ?\n keyedSeqFromValue(v) :\n indexedSeqFromValue(Array.isArray(v) ? v : [v]);\n } else if (isKeyedIterable) {\n v = KeyedIterable(v);\n }\n return v;\n }).filter(function(v ) {return v.size !== 0});\n\n if (iters.length === 0) {\n return iterable;\n }\n\n if (iters.length === 1) {\n var singleton = iters[0];\n if (singleton === iterable ||\n isKeyedIterable && isKeyed(singleton) ||\n isIndexed(iterable) && isIndexed(singleton)) {\n return singleton;\n }\n }\n\n var concatSeq = new ArraySeq(iters);\n if (isKeyedIterable) {\n concatSeq = concatSeq.toKeyedSeq();\n } else if (!isIndexed(iterable)) {\n concatSeq = concatSeq.toSetSeq();\n }\n concatSeq = concatSeq.flatten(true);\n concatSeq.size = iters.reduce(\n function(sum, seq) {\n if (sum !== undefined) {\n var size = seq.size;\n if (size !== undefined) {\n return sum + size;\n }\n }\n },\n 0\n );\n return concatSeq;\n }\n\n\n function flattenFactory(iterable, depth, useKeys) {\n var flatSequence = makeSequence(iterable);\n flatSequence.__iterateUncached = function(fn, reverse) {\n var iterations = 0;\n var stopped = false;\n function flatDeep(iter, currentDepth) {var this$0 = this;\n iter.__iterate(function(v, k) {\n if ((!depth || currentDepth < depth) && isIterable(v)) {\n flatDeep(v, currentDepth + 1);\n } else if (fn(v, useKeys ? k : iterations++, this$0) === false) {\n stopped = true;\n }\n return !stopped;\n }, reverse);\n }\n flatDeep(iterable, 0);\n return iterations;\n }\n flatSequence.__iteratorUncached = function(type, reverse) {\n var iterator = iterable.__iterator(type, reverse);\n var stack = [];\n var iterations = 0;\n return new Iterator(function() {\n while (iterator) {\n var step = iterator.next();\n if (step.done !== false) {\n iterator = stack.pop();\n continue;\n }\n var v = step.value;\n if (type === ITERATE_ENTRIES) {\n v = v[1];\n }\n if ((!depth || stack.length < depth) && isIterable(v)) {\n stack.push(iterator);\n iterator = v.__iterator(type, reverse);\n } else {\n return useKeys ? step : iteratorValue(type, iterations++, v, step);\n }\n }\n return iteratorDone();\n });\n }\n return flatSequence;\n }\n\n\n function flatMapFactory(iterable, mapper, context) {\n var coerce = iterableClass(iterable);\n return iterable.toSeq().map(\n function(v, k) {return coerce(mapper.call(context, v, k, iterable))}\n ).flatten(true);\n }\n\n\n function interposeFactory(iterable, separator) {\n var interposedSequence = makeSequence(iterable);\n interposedSequence.size = iterable.size && iterable.size * 2 -1;\n interposedSequence.__iterateUncached = function(fn, reverse) {var this$0 = this;\n var iterations = 0;\n iterable.__iterate(function(v, k) \n {return (!iterations || fn(separator, iterations++, this$0) !== false) &&\n fn(v, iterations++, this$0) !== false},\n reverse\n );\n return iterations;\n };\n interposedSequence.__iteratorUncached = function(type, reverse) {\n var iterator = iterable.__iterator(ITERATE_VALUES, reverse);\n var iterations = 0;\n var step;\n return new Iterator(function() {\n if (!step || iterations % 2) {\n step = iterator.next();\n if (step.done) {\n return step;\n }\n }\n return iterations % 2 ?\n iteratorValue(type, iterations++, separator) :\n iteratorValue(type, iterations++, step.value, step);\n });\n };\n return interposedSequence;\n }\n\n\n function sortFactory(iterable, comparator, mapper) {\n if (!comparator) {\n comparator = defaultComparator;\n }\n var isKeyedIterable = isKeyed(iterable);\n var index = 0;\n var entries = iterable.toSeq().map(\n function(v, k) {return [k, v, index++, mapper ? mapper(v, k, iterable) : v]}\n ).toArray();\n entries.sort(function(a, b) {return comparator(a[3], b[3]) || a[2] - b[2]}).forEach(\n isKeyedIterable ?\n function(v, i) { entries[i].length = 2; } :\n function(v, i) { entries[i] = v[1]; }\n );\n return isKeyedIterable ? KeyedSeq(entries) :\n isIndexed(iterable) ? IndexedSeq(entries) :\n SetSeq(entries);\n }\n\n\n function maxFactory(iterable, comparator, mapper) {\n if (!comparator) {\n comparator = defaultComparator;\n }\n if (mapper) {\n var entry = iterable.toSeq()\n .map(function(v, k) {return [v, mapper(v, k, iterable)]})\n .reduce(function(a, b) {return maxCompare(comparator, a[1], b[1]) ? b : a});\n return entry && entry[0];\n } else {\n return iterable.reduce(function(a, b) {return maxCompare(comparator, a, b) ? b : a});\n }\n }\n\n function maxCompare(comparator, a, b) {\n var comp = comparator(b, a);\n // b is considered the new max if the comparator declares them equal, but\n // they are not equal and b is in fact a nullish value.\n return (comp === 0 && b !== a && (b === undefined || b === null || b !== b)) || comp > 0;\n }\n\n\n function zipWithFactory(keyIter, zipper, iters) {\n var zipSequence = makeSequence(keyIter);\n zipSequence.size = new ArraySeq(iters).map(function(i ) {return i.size}).min();\n // Note: this a generic base implementation of __iterate in terms of\n // __iterator which may be more generically useful in the future.\n zipSequence.__iterate = function(fn, reverse) {\n /* generic:\n var iterator = this.__iterator(ITERATE_ENTRIES, reverse);\n var step;\n var iterations = 0;\n while (!(step = iterator.next()).done) {\n iterations++;\n if (fn(step.value[1], step.value[0], this) === false) {\n break;\n }\n }\n return iterations;\n */\n // indexed:\n var iterator = this.__iterator(ITERATE_VALUES, reverse);\n var step;\n var iterations = 0;\n while (!(step = iterator.next()).done) {\n if (fn(step.value, iterations++, this) === false) {\n break;\n }\n }\n return iterations;\n };\n zipSequence.__iteratorUncached = function(type, reverse) {\n var iterators = iters.map(function(i )\n {return (i = Iterable(i), getIterator(reverse ? i.reverse() : i))}\n );\n var iterations = 0;\n var isDone = false;\n return new Iterator(function() {\n var steps;\n if (!isDone) {\n steps = iterators.map(function(i ) {return i.next()});\n isDone = steps.some(function(s ) {return s.done});\n }\n if (isDone) {\n return iteratorDone();\n }\n return iteratorValue(\n type,\n iterations++,\n zipper.apply(null, steps.map(function(s ) {return s.value}))\n );\n });\n };\n return zipSequence\n }\n\n\n // #pragma Helper Functions\n\n function reify(iter, seq) {\n return isSeq(iter) ? seq : iter.constructor(seq);\n }\n\n function validateEntry(entry) {\n if (entry !== Object(entry)) {\n throw new TypeError('Expected [K, V] tuple: ' + entry);\n }\n }\n\n function resolveSize(iter) {\n assertNotInfinite(iter.size);\n return ensureSize(iter);\n }\n\n function iterableClass(iterable) {\n return isKeyed(iterable) ? KeyedIterable :\n isIndexed(iterable) ? IndexedIterable :\n SetIterable;\n }\n\n function makeSequence(iterable) {\n return Object.create(\n (\n isKeyed(iterable) ? KeyedSeq :\n isIndexed(iterable) ? IndexedSeq :\n SetSeq\n ).prototype\n );\n }\n\n function cacheResultThrough() {\n if (this._iter.cacheResult) {\n this._iter.cacheResult();\n this.size = this._iter.size;\n return this;\n } else {\n return Seq.prototype.cacheResult.call(this);\n }\n }\n\n function defaultComparator(a, b) {\n return a > b ? 1 : a < b ? -1 : 0;\n }\n\n function forceIterator(keyPath) {\n var iter = getIterator(keyPath);\n if (!iter) {\n // Array might not be iterable in this environment, so we need a fallback\n // to our wrapped type.\n if (!isArrayLike(keyPath)) {\n throw new TypeError('Expected iterable or array-like: ' + keyPath);\n }\n iter = getIterator(Iterable(keyPath));\n }\n return iter;\n }\n\n createClass(Record, KeyedCollection);\n\n function Record(defaultValues, name) {\n var hasInitialized;\n\n var RecordType = function Record(values) {\n if (values instanceof RecordType) {\n return values;\n }\n if (!(this instanceof RecordType)) {\n return new RecordType(values);\n }\n if (!hasInitialized) {\n hasInitialized = true;\n var keys = Object.keys(defaultValues);\n setProps(RecordTypePrototype, keys);\n RecordTypePrototype.size = keys.length;\n RecordTypePrototype._name = name;\n RecordTypePrototype._keys = keys;\n RecordTypePrototype._defaultValues = defaultValues;\n }\n this._map = Map(values);\n };\n\n var RecordTypePrototype = RecordType.prototype = Object.create(RecordPrototype);\n RecordTypePrototype.constructor = RecordType;\n\n return RecordType;\n }\n\n Record.prototype.toString = function() {\n return this.__toString(recordName(this) + ' {', '}');\n };\n\n // @pragma Access\n\n Record.prototype.has = function(k) {\n return this._defaultValues.hasOwnProperty(k);\n };\n\n Record.prototype.get = function(k, notSetValue) {\n if (!this.has(k)) {\n return notSetValue;\n }\n var defaultVal = this._defaultValues[k];\n return this._map ? this._map.get(k, defaultVal) : defaultVal;\n };\n\n // @pragma Modification\n\n Record.prototype.clear = function() {\n if (this.__ownerID) {\n this._map && this._map.clear();\n return this;\n }\n var RecordType = this.constructor;\n return RecordType._empty || (RecordType._empty = makeRecord(this, emptyMap()));\n };\n\n Record.prototype.set = function(k, v) {\n if (!this.has(k)) {\n throw new Error('Cannot set unknown key \"' + k + '\" on ' + recordName(this));\n }\n if (this._map && !this._map.has(k)) {\n var defaultVal = this._defaultValues[k];\n if (v === defaultVal) {\n return this;\n }\n }\n var newMap = this._map && this._map.set(k, v);\n if (this.__ownerID || newMap === this._map) {\n return this;\n }\n return makeRecord(this, newMap);\n };\n\n Record.prototype.remove = function(k) {\n if (!this.has(k)) {\n return this;\n }\n var newMap = this._map && this._map.remove(k);\n if (this.__ownerID || newMap === this._map) {\n return this;\n }\n return makeRecord(this, newMap);\n };\n\n Record.prototype.wasAltered = function() {\n return this._map.wasAltered();\n };\n\n Record.prototype.__iterator = function(type, reverse) {var this$0 = this;\n return KeyedIterable(this._defaultValues).map(function(_, k) {return this$0.get(k)}).__iterator(type, reverse);\n };\n\n Record.prototype.__iterate = function(fn, reverse) {var this$0 = this;\n return KeyedIterable(this._defaultValues).map(function(_, k) {return this$0.get(k)}).__iterate(fn, reverse);\n };\n\n Record.prototype.__ensureOwner = function(ownerID) {\n if (ownerID === this.__ownerID) {\n return this;\n }\n var newMap = this._map && this._map.__ensureOwner(ownerID);\n if (!ownerID) {\n this.__ownerID = ownerID;\n this._map = newMap;\n return this;\n }\n return makeRecord(this, newMap, ownerID);\n };\n\n\n var RecordPrototype = Record.prototype;\n RecordPrototype[DELETE] = RecordPrototype.remove;\n RecordPrototype.deleteIn =\n RecordPrototype.removeIn = MapPrototype.removeIn;\n RecordPrototype.merge = MapPrototype.merge;\n RecordPrototype.mergeWith = MapPrototype.mergeWith;\n RecordPrototype.mergeIn = MapPrototype.mergeIn;\n RecordPrototype.mergeDeep = MapPrototype.mergeDeep;\n RecordPrototype.mergeDeepWith = MapPrototype.mergeDeepWith;\n RecordPrototype.mergeDeepIn = MapPrototype.mergeDeepIn;\n RecordPrototype.setIn = MapPrototype.setIn;\n RecordPrototype.update = MapPrototype.update;\n RecordPrototype.updateIn = MapPrototype.updateIn;\n RecordPrototype.withMutations = MapPrototype.withMutations;\n RecordPrototype.asMutable = MapPrototype.asMutable;\n RecordPrototype.asImmutable = MapPrototype.asImmutable;\n\n\n function makeRecord(likeRecord, map, ownerID) {\n var record = Object.create(Object.getPrototypeOf(likeRecord));\n record._map = map;\n record.__ownerID = ownerID;\n return record;\n }\n\n function recordName(record) {\n return record._name || record.constructor.name || 'Record';\n }\n\n function setProps(prototype, names) {\n try {\n names.forEach(setProp.bind(undefined, prototype));\n } catch (error) {\n // Object.defineProperty failed. Probably IE8.\n }\n }\n\n function setProp(prototype, name) {\n Object.defineProperty(prototype, name, {\n get: function() {\n return this.get(name);\n },\n set: function(value) {\n invariant(this.__ownerID, 'Cannot set on an immutable record.');\n this.set(name, value);\n }\n });\n }\n\n createClass(Set, SetCollection);\n\n // @pragma Construction\n\n function Set(value) {\n return value === null || value === undefined ? emptySet() :\n isSet(value) && !isOrdered(value) ? value :\n emptySet().withMutations(function(set ) {\n var iter = SetIterable(value);\n assertNotInfinite(iter.size);\n iter.forEach(function(v ) {return set.add(v)});\n });\n }\n\n Set.of = function(/*...values*/) {\n return this(arguments);\n };\n\n Set.fromKeys = function(value) {\n return this(KeyedIterable(value).keySeq());\n };\n\n Set.prototype.toString = function() {\n return this.__toString('Set {', '}');\n };\n\n // @pragma Access\n\n Set.prototype.has = function(value) {\n return this._map.has(value);\n };\n\n // @pragma Modification\n\n Set.prototype.add = function(value) {\n return updateSet(this, this._map.set(value, true));\n };\n\n Set.prototype.remove = function(value) {\n return updateSet(this, this._map.remove(value));\n };\n\n Set.prototype.clear = function() {\n return updateSet(this, this._map.clear());\n };\n\n // @pragma Composition\n\n Set.prototype.union = function() {var iters = SLICE$0.call(arguments, 0);\n iters = iters.filter(function(x ) {return x.size !== 0});\n if (iters.length === 0) {\n return this;\n }\n if (this.size === 0 && !this.__ownerID && iters.length === 1) {\n return this.constructor(iters[0]);\n }\n return this.withMutations(function(set ) {\n for (var ii = 0; ii < iters.length; ii++) {\n SetIterable(iters[ii]).forEach(function(value ) {return set.add(value)});\n }\n });\n };\n\n Set.prototype.intersect = function() {var iters = SLICE$0.call(arguments, 0);\n if (iters.length === 0) {\n return this;\n }\n iters = iters.map(function(iter ) {return SetIterable(iter)});\n var originalSet = this;\n return this.withMutations(function(set ) {\n originalSet.forEach(function(value ) {\n if (!iters.every(function(iter ) {return iter.includes(value)})) {\n set.remove(value);\n }\n });\n });\n };\n\n Set.prototype.subtract = function() {var iters = SLICE$0.call(arguments, 0);\n if (iters.length === 0) {\n return this;\n }\n iters = iters.map(function(iter ) {return SetIterable(iter)});\n var originalSet = this;\n return this.withMutations(function(set ) {\n originalSet.forEach(function(value ) {\n if (iters.some(function(iter ) {return iter.includes(value)})) {\n set.remove(value);\n }\n });\n });\n };\n\n Set.prototype.merge = function() {\n return this.union.apply(this, arguments);\n };\n\n Set.prototype.mergeWith = function(merger) {var iters = SLICE$0.call(arguments, 1);\n return this.union.apply(this, iters);\n };\n\n Set.prototype.sort = function(comparator) {\n // Late binding\n return OrderedSet(sortFactory(this, comparator));\n };\n\n Set.prototype.sortBy = function(mapper, comparator) {\n // Late binding\n return OrderedSet(sortFactory(this, comparator, mapper));\n };\n\n Set.prototype.wasAltered = function() {\n return this._map.wasAltered();\n };\n\n Set.prototype.__iterate = function(fn, reverse) {var this$0 = this;\n return this._map.__iterate(function(_, k) {return fn(k, k, this$0)}, reverse);\n };\n\n Set.prototype.__iterator = function(type, reverse) {\n return this._map.map(function(_, k) {return k}).__iterator(type, reverse);\n };\n\n Set.prototype.__ensureOwner = function(ownerID) {\n if (ownerID === this.__ownerID) {\n return this;\n }\n var newMap = this._map.__ensureOwner(ownerID);\n if (!ownerID) {\n this.__ownerID = ownerID;\n this._map = newMap;\n return this;\n }\n return this.__make(newMap, ownerID);\n };\n\n\n function isSet(maybeSet) {\n return !!(maybeSet && maybeSet[IS_SET_SENTINEL]);\n }\n\n Set.isSet = isSet;\n\n var IS_SET_SENTINEL = '@@__IMMUTABLE_SET__@@';\n\n var SetPrototype = Set.prototype;\n SetPrototype[IS_SET_SENTINEL] = true;\n SetPrototype[DELETE] = SetPrototype.remove;\n SetPrototype.mergeDeep = SetPrototype.merge;\n SetPrototype.mergeDeepWith = SetPrototype.mergeWith;\n SetPrototype.withMutations = MapPrototype.withMutations;\n SetPrototype.asMutable = MapPrototype.asMutable;\n SetPrototype.asImmutable = MapPrototype.asImmutable;\n\n SetPrototype.__empty = emptySet;\n SetPrototype.__make = makeSet;\n\n function updateSet(set, newMap) {\n if (set.__ownerID) {\n set.size = newMap.size;\n set._map = newMap;\n return set;\n }\n return newMap === set._map ? set :\n newMap.size === 0 ? set.__empty() :\n set.__make(newMap);\n }\n\n function makeSet(map, ownerID) {\n var set = Object.create(SetPrototype);\n set.size = map ? map.size : 0;\n set._map = map;\n set.__ownerID = ownerID;\n return set;\n }\n\n var EMPTY_SET;\n function emptySet() {\n return EMPTY_SET || (EMPTY_SET = makeSet(emptyMap()));\n }\n\n createClass(OrderedSet, Set);\n\n // @pragma Construction\n\n function OrderedSet(value) {\n return value === null || value === undefined ? emptyOrderedSet() :\n isOrderedSet(value) ? value :\n emptyOrderedSet().withMutations(function(set ) {\n var iter = SetIterable(value);\n assertNotInfinite(iter.size);\n iter.forEach(function(v ) {return set.add(v)});\n });\n }\n\n OrderedSet.of = function(/*...values*/) {\n return this(arguments);\n };\n\n OrderedSet.fromKeys = function(value) {\n return this(KeyedIterable(value).keySeq());\n };\n\n OrderedSet.prototype.toString = function() {\n return this.__toString('OrderedSet {', '}');\n };\n\n\n function isOrderedSet(maybeOrderedSet) {\n return isSet(maybeOrderedSet) && isOrdered(maybeOrderedSet);\n }\n\n OrderedSet.isOrderedSet = isOrderedSet;\n\n var OrderedSetPrototype = OrderedSet.prototype;\n OrderedSetPrototype[IS_ORDERED_SENTINEL] = true;\n\n OrderedSetPrototype.__empty = emptyOrderedSet;\n OrderedSetPrototype.__make = makeOrderedSet;\n\n function makeOrderedSet(map, ownerID) {\n var set = Object.create(OrderedSetPrototype);\n set.size = map ? map.size : 0;\n set._map = map;\n set.__ownerID = ownerID;\n return set;\n }\n\n var EMPTY_ORDERED_SET;\n function emptyOrderedSet() {\n return EMPTY_ORDERED_SET || (EMPTY_ORDERED_SET = makeOrderedSet(emptyOrderedMap()));\n }\n\n createClass(Stack, IndexedCollection);\n\n // @pragma Construction\n\n function Stack(value) {\n return value === null || value === undefined ? emptyStack() :\n isStack(value) ? value :\n emptyStack().unshiftAll(value);\n }\n\n Stack.of = function(/*...values*/) {\n return this(arguments);\n };\n\n Stack.prototype.toString = function() {\n return this.__toString('Stack [', ']');\n };\n\n // @pragma Access\n\n Stack.prototype.get = function(index, notSetValue) {\n var head = this._head;\n index = wrapIndex(this, index);\n while (head && index--) {\n head = head.next;\n }\n return head ? head.value : notSetValue;\n };\n\n Stack.prototype.peek = function() {\n return this._head && this._head.value;\n };\n\n // @pragma Modification\n\n Stack.prototype.push = function(/*...values*/) {\n if (arguments.length === 0) {\n return this;\n }\n var newSize = this.size + arguments.length;\n var head = this._head;\n for (var ii = arguments.length - 1; ii >= 0; ii--) {\n head = {\n value: arguments[ii],\n next: head\n };\n }\n if (this.__ownerID) {\n this.size = newSize;\n this._head = head;\n this.__hash = undefined;\n this.__altered = true;\n return this;\n }\n return makeStack(newSize, head);\n };\n\n Stack.prototype.pushAll = function(iter) {\n iter = IndexedIterable(iter);\n if (iter.size === 0) {\n return this;\n }\n assertNotInfinite(iter.size);\n var newSize = this.size;\n var head = this._head;\n iter.reverse().forEach(function(value ) {\n newSize++;\n head = {\n value: value,\n next: head\n };\n });\n if (this.__ownerID) {\n this.size = newSize;\n this._head = head;\n this.__hash = undefined;\n this.__altered = true;\n return this;\n }\n return makeStack(newSize, head);\n };\n\n Stack.prototype.pop = function() {\n return this.slice(1);\n };\n\n Stack.prototype.unshift = function(/*...values*/) {\n return this.push.apply(this, arguments);\n };\n\n Stack.prototype.unshiftAll = function(iter) {\n return this.pushAll(iter);\n };\n\n Stack.prototype.shift = function() {\n return this.pop.apply(this, arguments);\n };\n\n Stack.prototype.clear = function() {\n if (this.size === 0) {\n return this;\n }\n if (this.__ownerID) {\n this.size = 0;\n this._head = undefined;\n this.__hash = undefined;\n this.__altered = true;\n return this;\n }\n return emptyStack();\n };\n\n Stack.prototype.slice = function(begin, end) {\n if (wholeSlice(begin, end, this.size)) {\n return this;\n }\n var resolvedBegin = resolveBegin(begin, this.size);\n var resolvedEnd = resolveEnd(end, this.size);\n if (resolvedEnd !== this.size) {\n // super.slice(begin, end);\n return IndexedCollection.prototype.slice.call(this, begin, end);\n }\n var newSize = this.size - resolvedBegin;\n var head = this._head;\n while (resolvedBegin--) {\n head = head.next;\n }\n if (this.__ownerID) {\n this.size = newSize;\n this._head = head;\n this.__hash = undefined;\n this.__altered = true;\n return this;\n }\n return makeStack(newSize, head);\n };\n\n // @pragma Mutability\n\n Stack.prototype.__ensureOwner = function(ownerID) {\n if (ownerID === this.__ownerID) {\n return this;\n }\n if (!ownerID) {\n this.__ownerID = ownerID;\n this.__altered = false;\n return this;\n }\n return makeStack(this.size, this._head, ownerID, this.__hash);\n };\n\n // @pragma Iteration\n\n Stack.prototype.__iterate = function(fn, reverse) {\n if (reverse) {\n return this.reverse().__iterate(fn);\n }\n var iterations = 0;\n var node = this._head;\n while (node) {\n if (fn(node.value, iterations++, this) === false) {\n break;\n }\n node = node.next;\n }\n return iterations;\n };\n\n Stack.prototype.__iterator = function(type, reverse) {\n if (reverse) {\n return this.reverse().__iterator(type);\n }\n var iterations = 0;\n var node = this._head;\n return new Iterator(function() {\n if (node) {\n var value = node.value;\n node = node.next;\n return iteratorValue(type, iterations++, value);\n }\n return iteratorDone();\n });\n };\n\n\n function isStack(maybeStack) {\n return !!(maybeStack && maybeStack[IS_STACK_SENTINEL]);\n }\n\n Stack.isStack = isStack;\n\n var IS_STACK_SENTINEL = '@@__IMMUTABLE_STACK__@@';\n\n var StackPrototype = Stack.prototype;\n StackPrototype[IS_STACK_SENTINEL] = true;\n StackPrototype.withMutations = MapPrototype.withMutations;\n StackPrototype.asMutable = MapPrototype.asMutable;\n StackPrototype.asImmutable = MapPrototype.asImmutable;\n StackPrototype.wasAltered = MapPrototype.wasAltered;\n\n\n function makeStack(size, head, ownerID, hash) {\n var map = Object.create(StackPrototype);\n map.size = size;\n map._head = head;\n map.__ownerID = ownerID;\n map.__hash = hash;\n map.__altered = false;\n return map;\n }\n\n var EMPTY_STACK;\n function emptyStack() {\n return EMPTY_STACK || (EMPTY_STACK = makeStack(0));\n }\n\n /**\n * Contributes additional methods to a constructor\n */\n function mixin(ctor, methods) {\n var keyCopier = function(key ) { ctor.prototype[key] = methods[key]; };\n Object.keys(methods).forEach(keyCopier);\n Object.getOwnPropertySymbols &&\n Object.getOwnPropertySymbols(methods).forEach(keyCopier);\n return ctor;\n }\n\n Iterable.Iterator = Iterator;\n\n mixin(Iterable, {\n\n // ### Conversion to other types\n\n toArray: function() {\n assertNotInfinite(this.size);\n var array = new Array(this.size || 0);\n this.valueSeq().__iterate(function(v, i) { array[i] = v; });\n return array;\n },\n\n toIndexedSeq: function() {\n return new ToIndexedSequence(this);\n },\n\n toJS: function() {\n return this.toSeq().map(\n function(value ) {return value && typeof value.toJS === 'function' ? value.toJS() : value}\n ).__toJS();\n },\n\n toJSON: function() {\n return this.toSeq().map(\n function(value ) {return value && typeof value.toJSON === 'function' ? value.toJSON() : value}\n ).__toJS();\n },\n\n toKeyedSeq: function() {\n return new ToKeyedSequence(this, true);\n },\n\n toMap: function() {\n // Use Late Binding here to solve the circular dependency.\n return Map(this.toKeyedSeq());\n },\n\n toObject: function() {\n assertNotInfinite(this.size);\n var object = {};\n this.__iterate(function(v, k) { object[k] = v; });\n return object;\n },\n\n toOrderedMap: function() {\n // Use Late Binding here to solve the circular dependency.\n return OrderedMap(this.toKeyedSeq());\n },\n\n toOrderedSet: function() {\n // Use Late Binding here to solve the circular dependency.\n return OrderedSet(isKeyed(this) ? this.valueSeq() : this);\n },\n\n toSet: function() {\n // Use Late Binding here to solve the circular dependency.\n return Set(isKeyed(this) ? this.valueSeq() : this);\n },\n\n toSetSeq: function() {\n return new ToSetSequence(this);\n },\n\n toSeq: function() {\n return isIndexed(this) ? this.toIndexedSeq() :\n isKeyed(this) ? this.toKeyedSeq() :\n this.toSetSeq();\n },\n\n toStack: function() {\n // Use Late Binding here to solve the circular dependency.\n return Stack(isKeyed(this) ? this.valueSeq() : this);\n },\n\n toList: function() {\n // Use Late Binding here to solve the circular dependency.\n return List(isKeyed(this) ? this.valueSeq() : this);\n },\n\n\n // ### Common JavaScript methods and properties\n\n toString: function() {\n return '[Iterable]';\n },\n\n __toString: function(head, tail) {\n if (this.size === 0) {\n return head + tail;\n }\n return head + ' ' + this.toSeq().map(this.__toStringMapper).join(', ') + ' ' + tail;\n },\n\n\n // ### ES6 Collection methods (ES6 Array and Map)\n\n concat: function() {var values = SLICE$0.call(arguments, 0);\n return reify(this, concatFactory(this, values));\n },\n\n includes: function(searchValue) {\n return this.some(function(value ) {return is(value, searchValue)});\n },\n\n entries: function() {\n return this.__iterator(ITERATE_ENTRIES);\n },\n\n every: function(predicate, context) {\n assertNotInfinite(this.size);\n var returnValue = true;\n this.__iterate(function(v, k, c) {\n if (!predicate.call(context, v, k, c)) {\n returnValue = false;\n return false;\n }\n });\n return returnValue;\n },\n\n filter: function(predicate, context) {\n return reify(this, filterFactory(this, predicate, context, true));\n },\n\n find: function(predicate, context, notSetValue) {\n var entry = this.findEntry(predicate, context);\n return entry ? entry[1] : notSetValue;\n },\n\n forEach: function(sideEffect, context) {\n assertNotInfinite(this.size);\n return this.__iterate(context ? sideEffect.bind(context) : sideEffect);\n },\n\n join: function(separator) {\n assertNotInfinite(this.size);\n separator = separator !== undefined ? '' + separator : ',';\n var joined = '';\n var isFirst = true;\n this.__iterate(function(v ) {\n isFirst ? (isFirst = false) : (joined += separator);\n joined += v !== null && v !== undefined ? v.toString() : '';\n });\n return joined;\n },\n\n keys: function() {\n return this.__iterator(ITERATE_KEYS);\n },\n\n map: function(mapper, context) {\n return reify(this, mapFactory(this, mapper, context));\n },\n\n reduce: function(reducer, initialReduction, context) {\n assertNotInfinite(this.size);\n var reduction;\n var useFirst;\n if (arguments.length < 2) {\n useFirst = true;\n } else {\n reduction = initialReduction;\n }\n this.__iterate(function(v, k, c) {\n if (useFirst) {\n useFirst = false;\n reduction = v;\n } else {\n reduction = reducer.call(context, reduction, v, k, c);\n }\n });\n return reduction;\n },\n\n reduceRight: function(reducer, initialReduction, context) {\n var reversed = this.toKeyedSeq().reverse();\n return reversed.reduce.apply(reversed, arguments);\n },\n\n reverse: function() {\n return reify(this, reverseFactory(this, true));\n },\n\n slice: function(begin, end) {\n return reify(this, sliceFactory(this, begin, end, true));\n },\n\n some: function(predicate, context) {\n return !this.every(not(predicate), context);\n },\n\n sort: function(comparator) {\n return reify(this, sortFactory(this, comparator));\n },\n\n values: function() {\n return this.__iterator(ITERATE_VALUES);\n },\n\n\n // ### More sequential methods\n\n butLast: function() {\n return this.slice(0, -1);\n },\n\n isEmpty: function() {\n return this.size !== undefined ? this.size === 0 : !this.some(function() {return true});\n },\n\n count: function(predicate, context) {\n return ensureSize(\n predicate ? this.toSeq().filter(predicate, context) : this\n );\n },\n\n countBy: function(grouper, context) {\n return countByFactory(this, grouper, context);\n },\n\n equals: function(other) {\n return deepEqual(this, other);\n },\n\n entrySeq: function() {\n var iterable = this;\n if (iterable._cache) {\n // We cache as an entries array, so we can just return the cache!\n return new ArraySeq(iterable._cache);\n }\n var entriesSequence = iterable.toSeq().map(entryMapper).toIndexedSeq();\n entriesSequence.fromEntrySeq = function() {return iterable.toSeq()};\n return entriesSequence;\n },\n\n filterNot: function(predicate, context) {\n return this.filter(not(predicate), context);\n },\n\n findEntry: function(predicate, context, notSetValue) {\n var found = notSetValue;\n this.__iterate(function(v, k, c) {\n if (predicate.call(context, v, k, c)) {\n found = [k, v];\n return false;\n }\n });\n return found;\n },\n\n findKey: function(predicate, context) {\n var entry = this.findEntry(predicate, context);\n return entry && entry[0];\n },\n\n findLast: function(predicate, context, notSetValue) {\n return this.toKeyedSeq().reverse().find(predicate, context, notSetValue);\n },\n\n findLastEntry: function(predicate, context, notSetValue) {\n return this.toKeyedSeq().reverse().findEntry(predicate, context, notSetValue);\n },\n\n findLastKey: function(predicate, context) {\n return this.toKeyedSeq().reverse().findKey(predicate, context);\n },\n\n first: function() {\n return this.find(returnTrue);\n },\n\n flatMap: function(mapper, context) {\n return reify(this, flatMapFactory(this, mapper, context));\n },\n\n flatten: function(depth) {\n return reify(this, flattenFactory(this, depth, true));\n },\n\n fromEntrySeq: function() {\n return new FromEntriesSequence(this);\n },\n\n get: function(searchKey, notSetValue) {\n return this.find(function(_, key) {return is(key, searchKey)}, undefined, notSetValue);\n },\n\n getIn: function(searchKeyPath, notSetValue) {\n var nested = this;\n // Note: in an ES6 environment, we would prefer:\n // for (var key of searchKeyPath) {\n var iter = forceIterator(searchKeyPath);\n var step;\n while (!(step = iter.next()).done) {\n var key = step.value;\n nested = nested && nested.get ? nested.get(key, NOT_SET) : NOT_SET;\n if (nested === NOT_SET) {\n return notSetValue;\n }\n }\n return nested;\n },\n\n groupBy: function(grouper, context) {\n return groupByFactory(this, grouper, context);\n },\n\n has: function(searchKey) {\n return this.get(searchKey, NOT_SET) !== NOT_SET;\n },\n\n hasIn: function(searchKeyPath) {\n return this.getIn(searchKeyPath, NOT_SET) !== NOT_SET;\n },\n\n isSubset: function(iter) {\n iter = typeof iter.includes === 'function' ? iter : Iterable(iter);\n return this.every(function(value ) {return iter.includes(value)});\n },\n\n isSuperset: function(iter) {\n iter = typeof iter.isSubset === 'function' ? iter : Iterable(iter);\n return iter.isSubset(this);\n },\n\n keyOf: function(searchValue) {\n return this.findKey(function(value ) {return is(value, searchValue)});\n },\n\n keySeq: function() {\n return this.toSeq().map(keyMapper).toIndexedSeq();\n },\n\n last: function() {\n return this.toSeq().reverse().first();\n },\n\n lastKeyOf: function(searchValue) {\n return this.toKeyedSeq().reverse().keyOf(searchValue);\n },\n\n max: function(comparator) {\n return maxFactory(this, comparator);\n },\n\n maxBy: function(mapper, comparator) {\n return maxFactory(this, comparator, mapper);\n },\n\n min: function(comparator) {\n return maxFactory(this, comparator ? neg(comparator) : defaultNegComparator);\n },\n\n minBy: function(mapper, comparator) {\n return maxFactory(this, comparator ? neg(comparator) : defaultNegComparator, mapper);\n },\n\n rest: function() {\n return this.slice(1);\n },\n\n skip: function(amount) {\n return this.slice(Math.max(0, amount));\n },\n\n skipLast: function(amount) {\n return reify(this, this.toSeq().reverse().skip(amount).reverse());\n },\n\n skipWhile: function(predicate, context) {\n return reify(this, skipWhileFactory(this, predicate, context, true));\n },\n\n skipUntil: function(predicate, context) {\n return this.skipWhile(not(predicate), context);\n },\n\n sortBy: function(mapper, comparator) {\n return reify(this, sortFactory(this, comparator, mapper));\n },\n\n take: function(amount) {\n return this.slice(0, Math.max(0, amount));\n },\n\n takeLast: function(amount) {\n return reify(this, this.toSeq().reverse().take(amount).reverse());\n },\n\n takeWhile: function(predicate, context) {\n return reify(this, takeWhileFactory(this, predicate, context));\n },\n\n takeUntil: function(predicate, context) {\n return this.takeWhile(not(predicate), context);\n },\n\n valueSeq: function() {\n return this.toIndexedSeq();\n },\n\n\n // ### Hashable Object\n\n hashCode: function() {\n return this.__hash || (this.__hash = hashIterable(this));\n }\n\n\n // ### Internal\n\n // abstract __iterate(fn, reverse)\n\n // abstract __iterator(type, reverse)\n });\n\n // var IS_ITERABLE_SENTINEL = '@@__IMMUTABLE_ITERABLE__@@';\n // var IS_KEYED_SENTINEL = '@@__IMMUTABLE_KEYED__@@';\n // var IS_INDEXED_SENTINEL = '@@__IMMUTABLE_INDEXED__@@';\n // var IS_ORDERED_SENTINEL = '@@__IMMUTABLE_ORDERED__@@';\n\n var IterablePrototype = Iterable.prototype;\n IterablePrototype[IS_ITERABLE_SENTINEL] = true;\n IterablePrototype[ITERATOR_SYMBOL] = IterablePrototype.values;\n IterablePrototype.__toJS = IterablePrototype.toArray;\n IterablePrototype.__toStringMapper = quoteString;\n IterablePrototype.inspect =\n IterablePrototype.toSource = function() { return this.toString(); };\n IterablePrototype.chain = IterablePrototype.flatMap;\n IterablePrototype.contains = IterablePrototype.includes;\n\n mixin(KeyedIterable, {\n\n // ### More sequential methods\n\n flip: function() {\n return reify(this, flipFactory(this));\n },\n\n mapEntries: function(mapper, context) {var this$0 = this;\n var iterations = 0;\n return reify(this,\n this.toSeq().map(\n function(v, k) {return mapper.call(context, [k, v], iterations++, this$0)}\n ).fromEntrySeq()\n );\n },\n\n mapKeys: function(mapper, context) {var this$0 = this;\n return reify(this,\n this.toSeq().flip().map(\n function(k, v) {return mapper.call(context, k, v, this$0)}\n ).flip()\n );\n }\n\n });\n\n var KeyedIterablePrototype = KeyedIterable.prototype;\n KeyedIterablePrototype[IS_KEYED_SENTINEL] = true;\n KeyedIterablePrototype[ITERATOR_SYMBOL] = IterablePrototype.entries;\n KeyedIterablePrototype.__toJS = IterablePrototype.toObject;\n KeyedIterablePrototype.__toStringMapper = function(v, k) {return JSON.stringify(k) + ': ' + quoteString(v)};\n\n\n\n mixin(IndexedIterable, {\n\n // ### Conversion to other types\n\n toKeyedSeq: function() {\n return new ToKeyedSequence(this, false);\n },\n\n\n // ### ES6 Collection methods (ES6 Array and Map)\n\n filter: function(predicate, context) {\n return reify(this, filterFactory(this, predicate, context, false));\n },\n\n findIndex: function(predicate, context) {\n var entry = this.findEntry(predicate, context);\n return entry ? entry[0] : -1;\n },\n\n indexOf: function(searchValue) {\n var key = this.keyOf(searchValue);\n return key === undefined ? -1 : key;\n },\n\n lastIndexOf: function(searchValue) {\n var key = this.lastKeyOf(searchValue);\n return key === undefined ? -1 : key;\n },\n\n reverse: function() {\n return reify(this, reverseFactory(this, false));\n },\n\n slice: function(begin, end) {\n return reify(this, sliceFactory(this, begin, end, false));\n },\n\n splice: function(index, removeNum /*, ...values*/) {\n var numArgs = arguments.length;\n removeNum = Math.max(removeNum | 0, 0);\n if (numArgs === 0 || (numArgs === 2 && !removeNum)) {\n return this;\n }\n // If index is negative, it should resolve relative to the size of the\n // collection. However size may be expensive to compute if not cached, so\n // only call count() if the number is in fact negative.\n index = resolveBegin(index, index < 0 ? this.count() : this.size);\n var spliced = this.slice(0, index);\n return reify(\n this,\n numArgs === 1 ?\n spliced :\n spliced.concat(arrCopy(arguments, 2), this.slice(index + removeNum))\n );\n },\n\n\n // ### More collection methods\n\n findLastIndex: function(predicate, context) {\n var entry = this.findLastEntry(predicate, context);\n return entry ? entry[0] : -1;\n },\n\n first: function() {\n return this.get(0);\n },\n\n flatten: function(depth) {\n return reify(this, flattenFactory(this, depth, false));\n },\n\n get: function(index, notSetValue) {\n index = wrapIndex(this, index);\n return (index < 0 || (this.size === Infinity ||\n (this.size !== undefined && index > this.size))) ?\n notSetValue :\n this.find(function(_, key) {return key === index}, undefined, notSetValue);\n },\n\n has: function(index) {\n index = wrapIndex(this, index);\n return index >= 0 && (this.size !== undefined ?\n this.size === Infinity || index < this.size :\n this.indexOf(index) !== -1\n );\n },\n\n interpose: function(separator) {\n return reify(this, interposeFactory(this, separator));\n },\n\n interleave: function(/*...iterables*/) {\n var iterables = [this].concat(arrCopy(arguments));\n var zipped = zipWithFactory(this.toSeq(), IndexedSeq.of, iterables);\n var interleaved = zipped.flatten(true);\n if (zipped.size) {\n interleaved.size = zipped.size * iterables.length;\n }\n return reify(this, interleaved);\n },\n\n keySeq: function() {\n return Range(0, this.size);\n },\n\n last: function() {\n return this.get(-1);\n },\n\n skipWhile: function(predicate, context) {\n return reify(this, skipWhileFactory(this, predicate, context, false));\n },\n\n zip: function(/*, ...iterables */) {\n var iterables = [this].concat(arrCopy(arguments));\n return reify(this, zipWithFactory(this, defaultZipper, iterables));\n },\n\n zipWith: function(zipper/*, ...iterables */) {\n var iterables = arrCopy(arguments);\n iterables[0] = this;\n return reify(this, zipWithFactory(this, zipper, iterables));\n }\n\n });\n\n IndexedIterable.prototype[IS_INDEXED_SENTINEL] = true;\n IndexedIterable.prototype[IS_ORDERED_SENTINEL] = true;\n\n\n\n mixin(SetIterable, {\n\n // ### ES6 Collection methods (ES6 Array and Map)\n\n get: function(value, notSetValue) {\n return this.has(value) ? value : notSetValue;\n },\n\n includes: function(value) {\n return this.has(value);\n },\n\n\n // ### More sequential methods\n\n keySeq: function() {\n return this.valueSeq();\n }\n\n });\n\n SetIterable.prototype.has = IterablePrototype.includes;\n SetIterable.prototype.contains = SetIterable.prototype.includes;\n\n\n // Mixin subclasses\n\n mixin(KeyedSeq, KeyedIterable.prototype);\n mixin(IndexedSeq, IndexedIterable.prototype);\n mixin(SetSeq, SetIterable.prototype);\n\n mixin(KeyedCollection, KeyedIterable.prototype);\n mixin(IndexedCollection, IndexedIterable.prototype);\n mixin(SetCollection, SetIterable.prototype);\n\n\n // #pragma Helper functions\n\n function keyMapper(v, k) {\n return k;\n }\n\n function entryMapper(v, k) {\n return [k, v];\n }\n\n function not(predicate) {\n return function() {\n return !predicate.apply(this, arguments);\n }\n }\n\n function neg(predicate) {\n return function() {\n return -predicate.apply(this, arguments);\n }\n }\n\n function quoteString(value) {\n return typeof value === 'string' ? JSON.stringify(value) : String(value);\n }\n\n function defaultZipper() {\n return arrCopy(arguments);\n }\n\n function defaultNegComparator(a, b) {\n return a < b ? 1 : a > b ? -1 : 0;\n }\n\n function hashIterable(iterable) {\n if (iterable.size === Infinity) {\n return 0;\n }\n var ordered = isOrdered(iterable);\n var keyed = isKeyed(iterable);\n var h = ordered ? 1 : 0;\n var size = iterable.__iterate(\n keyed ?\n ordered ?\n function(v, k) { h = 31 * h + hashMerge(hash(v), hash(k)) | 0; } :\n function(v, k) { h = h + hashMerge(hash(v), hash(k)) | 0; } :\n ordered ?\n function(v ) { h = 31 * h + hash(v) | 0; } :\n function(v ) { h = h + hash(v) | 0; }\n );\n return murmurHashOfSize(size, h);\n }\n\n function murmurHashOfSize(size, h) {\n h = imul(h, 0xCC9E2D51);\n h = imul(h << 15 | h >>> -15, 0x1B873593);\n h = imul(h << 13 | h >>> -13, 5);\n h = (h + 0xE6546B64 | 0) ^ size;\n h = imul(h ^ h >>> 16, 0x85EBCA6B);\n h = imul(h ^ h >>> 13, 0xC2B2AE35);\n h = smi(h ^ h >>> 16);\n return h;\n }\n\n function hashMerge(a, b) {\n return a ^ b + 0x9E3779B9 + (a << 6) + (a >> 2) | 0; // int\n }\n\n var Immutable = {\n\n Iterable: Iterable,\n\n Seq: Seq,\n Collection: Collection,\n Map: Map,\n OrderedMap: OrderedMap,\n List: List,\n Stack: Stack,\n Set: Set,\n OrderedSet: OrderedSet,\n\n Record: Record,\n Range: Range,\n Repeat: Repeat,\n\n is: is,\n fromJS: fromJS\n\n };\n\n return Immutable;\n\n}));\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/immutable/dist/immutable.js\n// module id = 26\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/immutable/dist/immutable.js?", + ); + + /***/ + }, + /* 27 */ + /* unknown exports provided */ + /* all exports used */ + /*!********************************************!*\ + !*** ./~/fbjs/lib/ExecutionEnvironment.js ***! + \********************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright (c) 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);\n\n/**\n * Simple, lightweight module assisting with the detection and context of\n * Worker. Helps avoid circular dependencies and allows code to reason about\n * whether or not they are in a Worker, even if they never include the main\n * `ReactWorker` dependency.\n */\nvar ExecutionEnvironment = {\n\n canUseDOM: canUseDOM,\n\n canUseWorkers: typeof Worker !== 'undefined',\n\n canUseEventListeners: canUseDOM && !!(window.addEventListener || window.attachEvent),\n\n canUseViewport: canUseDOM && !!window.screen,\n\n isInWorker: !canUseDOM // For now, this is true - might change in the future.\n\n};\n\nmodule.exports = ExecutionEnvironment;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/fbjs/lib/ExecutionEnvironment.js\n// module id = 27\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/fbjs/lib/ExecutionEnvironment.js?", + ); + + /***/ + }, + /* 28 */ + /* exports provided: default */ + /* exports used: default */ + /*!*************************************************************!*\ + !*** ./~/react-bootstrap/es/utils/createChainedFunction.js ***! + \*************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Safe chained function\n *\n * Will only create a new function if needed,\n * otherwise will pass back existing functions or null.\n *\n * @param {function} functions to chain\n * @returns {function|null}\n */\nfunction createChainedFunction() {\n for (var _len = arguments.length, funcs = Array(_len), _key = 0; _key < _len; _key++) {\n funcs[_key] = arguments[_key];\n }\n\n return funcs.filter(function (f) {\n return f != null;\n }).reduce(function (acc, f) {\n if (typeof f !== 'function') {\n throw new Error('Invalid Argument Type, must only provide functions, undefined, or null.');\n }\n\n if (acc === null) {\n return f;\n }\n\n return function chainedFunction() {\n for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n acc.apply(this, args);\n f.apply(this, args);\n };\n }, null);\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (createChainedFunction);\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/utils/createChainedFunction.js\n// module id = 28\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/utils/createChainedFunction.js?", + ); + + /***/ + }, + /* 29 */ + /* unknown exports provided */ + /* all exports used */ + /*!************************************!*\ + !*** ./~/react-dates/constants.js ***! + \************************************/ + /***/ function (module, exports) { + eval( + "module.exports = {\n DISPLAY_FORMAT: 'L',\n ISO_FORMAT: 'YYYY-MM-DD',\n\n START_DATE: 'startDate',\n END_DATE: 'endDate',\n\n HORIZONTAL_ORIENTATION: 'horizontal',\n VERTICAL_ORIENTATION: 'vertical',\n VERTICAL_SCROLLABLE: 'verticalScrollable',\n\n ANCHOR_LEFT: 'left',\n ANCHOR_RIGHT: 'right',\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dates/constants.js\n// module id = 29\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dates/constants.js?", + ); + + /***/ + }, + /* 30 */ + /* unknown exports provided */ + /* all exports used */ + /*!********************************************!*\ + !*** ./~/core-js/library/modules/_core.js ***! + \********************************************/ + /***/ function (module, exports) { + eval( + "var core = module.exports = {version: '2.4.0'};\nif(typeof __e == 'number')__e = core; // eslint-disable-line no-undef\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_core.js\n// module id = 30\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/_core.js?", + ); + + /***/ + }, + /* 31 */ + /* exports provided: Accordion, Alert, Badge, Breadcrumb, BreadcrumbItem, Button, ButtonGroup, ButtonToolbar, Carousel, CarouselItem, Checkbox, Clearfix, ControlLabel, Col, Collapse, Dropdown, DropdownButton, Fade, Form, FormControl, FormGroup, Glyphicon, Grid, HelpBlock, Image, InputGroup, Jumbotron, Label, ListGroup, ListGroupItem, Media, MenuItem, Modal, ModalBody, ModalFooter, ModalHeader, ModalTitle, Nav, Navbar, NavbarBrand, NavDropdown, NavItem, Overlay, OverlayTrigger, PageHeader, PageItem, Pager, Pagination, PaginationButton, Panel, PanelGroup, Popover, ProgressBar, Radio, ResponsiveEmbed, Row, SafeAnchor, SplitButton, Tab, TabContainer, TabContent, Table, TabPane, Tabs, Thumbnail, Tooltip, Well, utils */ + /* exports used: OverlayTrigger, Tooltip, Modal, MenuItem, ButtonGroup, DropdownButton, Button, Pagination, Navbar, Nav, NavItem, NavDropdown */ + /*!***************************************!*\ + !*** ./~/react-bootstrap/es/index.js ***! + \***************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Accordion__ = __webpack_require__(/*! ./Accordion */ 1248);\n/* unused harmony reexport Accordion */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Alert__ = __webpack_require__(/*! ./Alert */ 1249);\n/* unused harmony reexport Alert */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Badge__ = __webpack_require__(/*! ./Badge */ 1250);\n/* unused harmony reexport Badge */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Breadcrumb__ = __webpack_require__(/*! ./Breadcrumb */ 1251);\n/* unused harmony reexport Breadcrumb */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__BreadcrumbItem__ = __webpack_require__(/*! ./BreadcrumbItem */ 494);\n/* unused harmony reexport BreadcrumbItem */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__Button__ = __webpack_require__(/*! ./Button */ 119);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return __WEBPACK_IMPORTED_MODULE_5__Button__["a"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__ButtonGroup__ = __webpack_require__(/*! ./ButtonGroup */ 495);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return __WEBPACK_IMPORTED_MODULE_6__ButtonGroup__["a"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__ButtonToolbar__ = __webpack_require__(/*! ./ButtonToolbar */ 1252);\n/* unused harmony reexport ButtonToolbar */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__Carousel__ = __webpack_require__(/*! ./Carousel */ 1253);\n/* unused harmony reexport Carousel */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__CarouselItem__ = __webpack_require__(/*! ./CarouselItem */ 496);\n/* unused harmony reexport CarouselItem */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__Checkbox__ = __webpack_require__(/*! ./Checkbox */ 1255);\n/* unused harmony reexport Checkbox */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__Clearfix__ = __webpack_require__(/*! ./Clearfix */ 1256);\n/* unused harmony reexport Clearfix */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__ControlLabel__ = __webpack_require__(/*! ./ControlLabel */ 1258);\n/* unused harmony reexport ControlLabel */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__Col__ = __webpack_require__(/*! ./Col */ 1257);\n/* unused harmony reexport Col */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__Collapse__ = __webpack_require__(/*! ./Collapse */ 236);\n/* unused harmony reexport Collapse */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__Dropdown__ = __webpack_require__(/*! ./Dropdown */ 165);\n/* unused harmony reexport Dropdown */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__DropdownButton__ = __webpack_require__(/*! ./DropdownButton */ 1259);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return __WEBPACK_IMPORTED_MODULE_16__DropdownButton__["a"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__Fade__ = __webpack_require__(/*! ./Fade */ 166);\n/* unused harmony reexport Fade */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__Form__ = __webpack_require__(/*! ./Form */ 1261);\n/* unused harmony reexport Form */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_19__FormControl__ = __webpack_require__(/*! ./FormControl */ 1262);\n/* unused harmony reexport FormControl */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_20__FormGroup__ = __webpack_require__(/*! ./FormGroup */ 1265);\n/* unused harmony reexport FormGroup */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_21__Glyphicon__ = __webpack_require__(/*! ./Glyphicon */ 237);\n/* unused harmony reexport Glyphicon */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_22__Grid__ = __webpack_require__(/*! ./Grid */ 498);\n/* unused harmony reexport Grid */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_23__HelpBlock__ = __webpack_require__(/*! ./HelpBlock */ 1266);\n/* unused harmony reexport HelpBlock */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_24__Image__ = __webpack_require__(/*! ./Image */ 1267);\n/* unused harmony reexport Image */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_25__InputGroup__ = __webpack_require__(/*! ./InputGroup */ 1268);\n/* unused harmony reexport InputGroup */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_26__Jumbotron__ = __webpack_require__(/*! ./Jumbotron */ 1271);\n/* unused harmony reexport Jumbotron */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_27__Label__ = __webpack_require__(/*! ./Label */ 1272);\n/* unused harmony reexport Label */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_28__ListGroup__ = __webpack_require__(/*! ./ListGroup */ 1273);\n/* unused harmony reexport ListGroup */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_29__ListGroupItem__ = __webpack_require__(/*! ./ListGroupItem */ 499);\n/* unused harmony reexport ListGroupItem */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_30__Media__ = __webpack_require__(/*! ./Media */ 238);\n/* unused harmony reexport Media */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_31__MenuItem__ = __webpack_require__(/*! ./MenuItem */ 1280);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return __WEBPACK_IMPORTED_MODULE_31__MenuItem__["a"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_32__Modal__ = __webpack_require__(/*! ./Modal */ 1281);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return __WEBPACK_IMPORTED_MODULE_32__Modal__["a"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_33__ModalBody__ = __webpack_require__(/*! ./ModalBody */ 500);\n/* unused harmony reexport ModalBody */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_34__ModalFooter__ = __webpack_require__(/*! ./ModalFooter */ 501);\n/* unused harmony reexport ModalFooter */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_35__ModalHeader__ = __webpack_require__(/*! ./ModalHeader */ 502);\n/* unused harmony reexport ModalHeader */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_36__ModalTitle__ = __webpack_require__(/*! ./ModalTitle */ 503);\n/* unused harmony reexport ModalTitle */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_37__Nav__ = __webpack_require__(/*! ./Nav */ 504);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return __WEBPACK_IMPORTED_MODULE_37__Nav__["a"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_38__Navbar__ = __webpack_require__(/*! ./Navbar */ 1284);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return __WEBPACK_IMPORTED_MODULE_38__Navbar__["a"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_39__NavbarBrand__ = __webpack_require__(/*! ./NavbarBrand */ 506);\n/* unused harmony reexport NavbarBrand */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_40__NavDropdown__ = __webpack_require__(/*! ./NavDropdown */ 1283);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return __WEBPACK_IMPORTED_MODULE_40__NavDropdown__["a"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_41__NavItem__ = __webpack_require__(/*! ./NavItem */ 505);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return __WEBPACK_IMPORTED_MODULE_41__NavItem__["a"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_42__Overlay__ = __webpack_require__(/*! ./Overlay */ 507);\n/* unused harmony reexport Overlay */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_43__OverlayTrigger__ = __webpack_require__(/*! ./OverlayTrigger */ 1288);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_43__OverlayTrigger__["a"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_44__PageHeader__ = __webpack_require__(/*! ./PageHeader */ 1289);\n/* unused harmony reexport PageHeader */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_45__PageItem__ = __webpack_require__(/*! ./PageItem */ 1290);\n/* unused harmony reexport PageItem */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_46__Pager__ = __webpack_require__(/*! ./Pager */ 1291);\n/* unused harmony reexport Pager */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_47__Pagination__ = __webpack_require__(/*! ./Pagination */ 1292);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return __WEBPACK_IMPORTED_MODULE_47__Pagination__["a"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_48__PaginationButton__ = __webpack_require__(/*! ./PaginationButton */ 509);\n/* unused harmony reexport PaginationButton */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_49__Panel__ = __webpack_require__(/*! ./Panel */ 1293);\n/* unused harmony reexport Panel */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_50__PanelGroup__ = __webpack_require__(/*! ./PanelGroup */ 510);\n/* unused harmony reexport PanelGroup */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_51__Popover__ = __webpack_require__(/*! ./Popover */ 1294);\n/* unused harmony reexport Popover */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_52__ProgressBar__ = __webpack_require__(/*! ./ProgressBar */ 1295);\n/* unused harmony reexport ProgressBar */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_53__Radio__ = __webpack_require__(/*! ./Radio */ 1296);\n/* unused harmony reexport Radio */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_54__ResponsiveEmbed__ = __webpack_require__(/*! ./ResponsiveEmbed */ 1297);\n/* unused harmony reexport ResponsiveEmbed */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_55__Row__ = __webpack_require__(/*! ./Row */ 1298);\n/* unused harmony reexport Row */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_56__SafeAnchor__ = __webpack_require__(/*! ./SafeAnchor */ 54);\n/* unused harmony reexport SafeAnchor */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_57__SplitButton__ = __webpack_require__(/*! ./SplitButton */ 1299);\n/* unused harmony reexport SplitButton */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_58__Tab__ = __webpack_require__(/*! ./Tab */ 1301);\n/* unused harmony reexport Tab */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_59__TabContainer__ = __webpack_require__(/*! ./TabContainer */ 239);\n/* unused harmony reexport TabContainer */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_60__TabContent__ = __webpack_require__(/*! ./TabContent */ 240);\n/* unused harmony reexport TabContent */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_61__Table__ = __webpack_require__(/*! ./Table */ 1302);\n/* unused harmony reexport Table */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_62__TabPane__ = __webpack_require__(/*! ./TabPane */ 511);\n/* unused harmony reexport TabPane */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_63__Tabs__ = __webpack_require__(/*! ./Tabs */ 1303);\n/* unused harmony reexport Tabs */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_64__Thumbnail__ = __webpack_require__(/*! ./Thumbnail */ 1304);\n/* unused harmony reexport Thumbnail */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_65__Tooltip__ = __webpack_require__(/*! ./Tooltip */ 1305);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_65__Tooltip__["a"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_66__Well__ = __webpack_require__(/*! ./Well */ 1306);\n/* unused harmony reexport Well */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_67__utils__ = __webpack_require__(/*! ./utils */ 1310);\n/* unused harmony reexport utils */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/index.js\n// module id = 31\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/index.js?', + ); + + /***/ + }, + /* 32 */ + /* exports provided: Size, SIZE_MAP, DEVICE_SIZES, State, Style */ + /* exports used: SIZE_MAP, Size, State, Style, DEVICE_SIZES */ + /*!***************************************************!*\ + !*** ./~/react-bootstrap/es/utils/StyleConfig.js ***! + \***************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return Size; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return SIZE_MAP; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"e\", function() { return DEVICE_SIZES; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return State; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return Style; });\nvar Size = {\n LARGE: 'large',\n SMALL: 'small',\n XSMALL: 'xsmall'\n};\n\nvar SIZE_MAP = {\n large: 'lg',\n medium: 'md',\n small: 'sm',\n xsmall: 'xs',\n lg: 'lg',\n md: 'md',\n sm: 'sm',\n xs: 'xs'\n};\n\nvar DEVICE_SIZES = ['lg', 'md', 'sm', 'xs'];\n\nvar State = {\n SUCCESS: 'success',\n WARNING: 'warning',\n DANGER: 'danger',\n INFO: 'info'\n};\n\nvar Style = {\n DEFAULT: 'default',\n PRIMARY: 'primary',\n LINK: 'link',\n INVERSE: 'inverse'\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/utils/StyleConfig.js\n// module id = 32\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/utils/StyleConfig.js?", + ); + + /***/ + }, + /* 33 */ + /* exports provided: default */ + /* all exports used */ + /*!********************************************************!*\ + !*** ./app/bundles/listings-show/enums/ListingUnit.js ***! + \********************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "Object.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__libs_utils_Enum__ = __webpack_require__(/*! ../../../libs/utils/Enum */ 22);\n\n\nif (typeof exports !== 'undefined') Object.defineProperty(exports, 'babelPluginFlowReactPropTypes_proptype_ListingUnitType', {\n value: __webpack_require__(/*! react */ 1).PropTypes.shape({\n label: __webpack_require__(/*! prop-types */ 0).string,\n value: __webpack_require__(/*! prop-types */ 0).string.isRequired\n })\n});\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (new __WEBPACK_IMPORTED_MODULE_0__libs_utils_Enum__[\"a\" /* default */]({\n HEADER: {\n label: null,\n value: 'header'\n },\n SUMMARY: {\n label: 'Summary',\n value: 'summary'\n },\n MEMBERSHIP: {\n label: 'Get on the Guest List',\n value: 'membership'\n },\n DETAILS: {\n label: 'Details',\n value: 'details'\n },\n AMENITIES: {\n label: 'Amenities',\n value: 'amenities'\n },\n PRICES: {\n label: 'Prices',\n value: 'prices'\n },\n PHOTOS: {\n label: 'Photos',\n value: 'photos'\n },\n HOUSE_RULES: {\n label: 'House rules',\n value: 'rules'\n },\n DESCRIPTION: {\n label: 'About this listing',\n value: 'description'\n },\n URLS: {\n label: 'External links',\n value: 'urls'\n },\n HOST: {\n label: 'About the host',\n value: 'host'\n },\n LOCATION: {\n label: 'Location',\n value: 'location'\n }\n}));\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-show/enums/ListingUnit.js\n// module id = 33\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-show/enums/ListingUnit.js?", + ); + + /***/ + }, + /* 34 */ + /* exports provided: default */ + /* exports used: default */ + /*!**************************************************************!*\ + !*** ./~/react-bootstrap/es/utils/ValidComponentChildren.js ***! + \**************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n// TODO: This module should be ElementChildren, and should use named exports.\n\n\n\n/**\n * Iterates through children that are typically specified as `props.children`,\n * but only maps over children that are "valid components".\n *\n * The mapFunction provided index will be normalised to the components mapped,\n * so an invalid component would not increase the index.\n *\n * @param {?*} children Children tree container.\n * @param {function(*, int)} func.\n * @param {*} context Context for func.\n * @return {object} Object containing the ordered map of results.\n */\nfunction map(children, func, context) {\n var index = 0;\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.Children.map(children, function (child) {\n if (!__WEBPACK_IMPORTED_MODULE_0_react___default.a.isValidElement(child)) {\n return child;\n }\n\n return func.call(context, child, index++);\n });\n}\n\n/**\n * Iterates through children that are "valid components".\n *\n * The provided forEachFunc(child, index) will be called for each\n * leaf child with the index reflecting the position relative to "valid components".\n *\n * @param {?*} children Children tree container.\n * @param {function(*, int)} func.\n * @param {*} context Context for context.\n */\nfunction forEach(children, func, context) {\n var index = 0;\n\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.Children.forEach(children, function (child) {\n if (!__WEBPACK_IMPORTED_MODULE_0_react___default.a.isValidElement(child)) {\n return;\n }\n\n func.call(context, child, index++);\n });\n}\n\n/**\n * Count the number of "valid components" in the Children container.\n *\n * @param {?*} children Children tree container.\n * @returns {number}\n */\nfunction count(children) {\n var result = 0;\n\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.Children.forEach(children, function (child) {\n if (!__WEBPACK_IMPORTED_MODULE_0_react___default.a.isValidElement(child)) {\n return;\n }\n\n ++result;\n });\n\n return result;\n}\n\n/**\n * Finds children that are typically specified as `props.children`,\n * but only iterates over children that are "valid components".\n *\n * The provided forEachFunc(child, index) will be called for each\n * leaf child with the index reflecting the position relative to "valid components".\n *\n * @param {?*} children Children tree container.\n * @param {function(*, int)} func.\n * @param {*} context Context for func.\n * @returns {array} of children that meet the func return statement\n */\nfunction filter(children, func, context) {\n var index = 0;\n var result = [];\n\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.Children.forEach(children, function (child) {\n if (!__WEBPACK_IMPORTED_MODULE_0_react___default.a.isValidElement(child)) {\n return;\n }\n\n if (func.call(context, child, index++)) {\n result.push(child);\n }\n });\n\n return result;\n}\n\nfunction find(children, func, context) {\n var index = 0;\n var result = undefined;\n\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.Children.forEach(children, function (child) {\n if (result) {\n return;\n }\n if (!__WEBPACK_IMPORTED_MODULE_0_react___default.a.isValidElement(child)) {\n return;\n }\n\n if (func.call(context, child, index++)) {\n result = child;\n }\n });\n\n return result;\n}\n\nfunction every(children, func, context) {\n var index = 0;\n var result = true;\n\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.Children.forEach(children, function (child) {\n if (!result) {\n return;\n }\n if (!__WEBPACK_IMPORTED_MODULE_0_react___default.a.isValidElement(child)) {\n return;\n }\n\n if (!func.call(context, child, index++)) {\n result = false;\n }\n });\n\n return result;\n}\n\nfunction some(children, func, context) {\n var index = 0;\n var result = false;\n\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.Children.forEach(children, function (child) {\n if (result) {\n return;\n }\n if (!__WEBPACK_IMPORTED_MODULE_0_react___default.a.isValidElement(child)) {\n return;\n }\n\n if (func.call(context, child, index++)) {\n result = true;\n }\n });\n\n return result;\n}\n\nfunction toArray(children) {\n var result = [];\n\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.Children.forEach(children, function (child) {\n if (!__WEBPACK_IMPORTED_MODULE_0_react___default.a.isValidElement(child)) {\n return;\n }\n\n result.push(child);\n });\n\n return result;\n}\n\n/* harmony default export */ __webpack_exports__["a"] = ({\n map: map,\n forEach: forEach,\n count: count,\n find: find,\n filter: filter,\n every: every,\n some: some,\n toArray: toArray\n});\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/utils/ValidComponentChildren.js\n// module id = 34\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/utils/ValidComponentChildren.js?', + ); + + /***/ + }, + /* 35 */ + /* unknown exports provided */ + /* all exports used */ + /*!*************************************************!*\ + !*** ./~/react-dom/lib/ReactInstrumentation.js ***! + \*************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '/**\n * Copyright 2016-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * \n */\n\n\n\n// Trust the developer to only use ReactInstrumentation with a __DEV__ check\n\nvar debugTool = null;\n\nif (true) {\n var ReactDebugTool = __webpack_require__(/*! ./ReactDebugTool */ 1345);\n debugTool = ReactDebugTool;\n}\n\nmodule.exports = { debugTool: debugTool };\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/ReactInstrumentation.js\n// module id = 35\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/ReactInstrumentation.js?', + ); + + /***/ + }, + /* 36 */ + /* unknown exports provided */ + /* all exports used */ + /*!*************************************************************!*\ + !*** ./~/react-google-maps/lib/creators/GoogleMapHolder.js ***! + \*************************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\n\nvar _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();\n\nvar _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar _react = __webpack_require__(/*! react */ 1);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _warning = __webpack_require__(/*! warning */ 560);\n\nvar _warning2 = _interopRequireDefault(_warning);\n\nvar _eventListsGoogleMapEventList = __webpack_require__(/*! ../eventLists/GoogleMapEventList */ 1411);\n\nvar _eventListsGoogleMapEventList2 = _interopRequireDefault(_eventListsGoogleMapEventList);\n\nvar _utilsEventHandlerCreator = __webpack_require__(/*! ../utils/eventHandlerCreator */ 49);\n\nvar _utilsEventHandlerCreator2 = _interopRequireDefault(_utilsEventHandlerCreator);\n\nvar _utilsDefaultPropsCreator = __webpack_require__(/*! ../utils/defaultPropsCreator */ 42);\n\nvar _utilsDefaultPropsCreator2 = _interopRequireDefault(_utilsDefaultPropsCreator);\n\nvar _utilsComposeOptions = __webpack_require__(/*! ../utils/composeOptions */ 41);\n\nvar _utilsComposeOptions2 = _interopRequireDefault(_utilsComposeOptions);\n\nvar _utilsComponentLifecycleDecorator = __webpack_require__(/*! ../utils/componentLifecycleDecorator */ 48);\n\nvar _utilsComponentLifecycleDecorator2 = _interopRequireDefault(_utilsComponentLifecycleDecorator);\n\nvar mapControlledPropTypes = {\n // NOTICE!!!!!!\n //\n // Only expose those with getters & setters in the table as controlled props.\n //\n // [].map.call($0.querySelectorAll("tr>td>code"), function(it){ return it.textContent; }).filter(function(it){ return it.match(/^set/) && !it.match(/^setMap/); })\n //\n // https://developers.google.com/maps/documentation/javascript/3.exp/reference#Map\n center: _react.PropTypes.object,\n heading: _react.PropTypes.number,\n mapTypeId: _react.PropTypes.any,\n options: _react.PropTypes.object,\n streetView: _react.PropTypes.any,\n tilt: _react.PropTypes.number,\n zoom: _react.PropTypes.number\n};\n\nexports.mapControlledPropTypes = mapControlledPropTypes;\nvar mapDefaultPropTypes = (0, _utilsDefaultPropsCreator2["default"])(mapControlledPropTypes);\n\nexports.mapDefaultPropTypes = mapDefaultPropTypes;\nvar mapUpdaters = {\n center: function center(_center, component) {\n component.getMap().setCenter(_center);\n },\n heading: function heading(_heading, component) {\n component.getMap().setHeading(_heading);\n },\n mapTypeId: function mapTypeId(_mapTypeId, component) {\n component.getMap().setMapTypeId(_mapTypeId);\n },\n options: function options(_options, component) {\n component.getMap().setOptions(_options);\n },\n streetView: function streetView(_streetView, component) {\n component.getMap().setStreetView(_streetView);\n },\n tilt: function tilt(_tilt, component) {\n component.getMap().setTilt(_tilt);\n },\n zoom: function zoom(_zoom, component) {\n component.getMap().setZoom(_zoom);\n }\n};\n\nvar _eventHandlerCreator = (0, _utilsEventHandlerCreator2["default"])(_eventListsGoogleMapEventList2["default"]);\n\nvar eventPropTypes = _eventHandlerCreator.eventPropTypes;\nvar registerEvents = _eventHandlerCreator.registerEvents;\nvar mapEventPropTypes = eventPropTypes;\n\nexports.mapEventPropTypes = mapEventPropTypes;\n\nvar GoogleMapHolder = (function (_Component) {\n _inherits(GoogleMapHolder, _Component);\n\n function GoogleMapHolder() {\n _classCallCheck(this, _GoogleMapHolder);\n\n _get(Object.getPrototypeOf(_GoogleMapHolder.prototype), "constructor", this).apply(this, arguments);\n }\n\n _createClass(GoogleMapHolder, [{\n key: "getMap",\n value: function getMap() {\n return this.props.map;\n }\n }, {\n key: "render",\n value: function render() {\n var _this = this;\n\n return _react2["default"].createElement(\n "div",\n null,\n _react.Children.map(this.props.children, function (childElement) {\n if (_react2["default"].isValidElement(childElement)) {\n return _react2["default"].cloneElement(childElement, {\n mapHolderRef: _this\n });\n } else {\n return childElement;\n }\n })\n );\n }\n }], [{\n key: "_createMap",\n value: function _createMap(domEl, mapProps) {\n (0, _warning2["default"])("undefined" !== typeof google, "Make sure you\'ve put a <script> tag in your <head> element to load Google Maps JavaScript API v3.\\n If you\'re looking for built-in support to load it for you, use the \\"async/ScriptjsLoader\\" instead.\\n See https://github.com/tomchentw/react-google-maps/pull/168");\n // https://developers.google.com/maps/documentation/javascript/3.exp/reference#Map\n return new google.maps.Map(domEl, (0, _utilsComposeOptions2["default"])(mapProps, mapControlledPropTypes));\n }\n }, {\n key: "propTypes",\n value: {\n map: _react.PropTypes.object.isRequired\n },\n enumerable: true\n }]);\n\n var _GoogleMapHolder = GoogleMapHolder;\n GoogleMapHolder = (0, _utilsComponentLifecycleDecorator2["default"])({\n registerEvents: registerEvents,\n instanceMethodName: "getMap",\n updaters: mapUpdaters\n })(GoogleMapHolder) || GoogleMapHolder;\n return GoogleMapHolder;\n})(_react.Component);\n\nexports["default"] = GoogleMapHolder;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-google-maps/lib/creators/GoogleMapHolder.js\n// module id = 36\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-google-maps/lib/creators/GoogleMapHolder.js?', + ); + + /***/ + }, + /* 37 */ + /* unknown exports provided */ + /* all exports used */ + /*!***********************************************!*\ + !*** ./~/react/lib/ReactComponentTreeHook.js ***! + \***********************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2016-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * \n */\n\n\n\nvar _prodInvariant = __webpack_require__(/*! ./reactProdInvariant */ 85);\n\nvar ReactCurrentOwner = __webpack_require__(/*! ./ReactCurrentOwner */ 55);\n\nvar invariant = __webpack_require__(/*! fbjs/lib/invariant */ 12);\nvar warning = __webpack_require__(/*! fbjs/lib/warning */ 13);\n\nfunction isNative(fn) {\n // Based on isNative() from Lodash\n var funcToString = Function.prototype.toString;\n var hasOwnProperty = Object.prototype.hasOwnProperty;\n var reIsNative = RegExp('^' + funcToString\n // Take an example native function source for comparison\n .call(hasOwnProperty)\n // Strip regex characters so we can use it for regex\n .replace(/[\\\\^$.*+?()[\\]{}|]/g, '\\\\$&')\n // Remove hasOwnProperty from the template to make it generic\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$');\n try {\n var source = funcToString.call(fn);\n return reIsNative.test(source);\n } catch (err) {\n return false;\n }\n}\n\nvar canUseCollections =\n// Array.from\ntypeof Array.from === 'function' &&\n// Map\ntypeof Map === 'function' && isNative(Map) &&\n// Map.prototype.keys\nMap.prototype != null && typeof Map.prototype.keys === 'function' && isNative(Map.prototype.keys) &&\n// Set\ntypeof Set === 'function' && isNative(Set) &&\n// Set.prototype.keys\nSet.prototype != null && typeof Set.prototype.keys === 'function' && isNative(Set.prototype.keys);\n\nvar setItem;\nvar getItem;\nvar removeItem;\nvar getItemIDs;\nvar addRoot;\nvar removeRoot;\nvar getRootIDs;\n\nif (canUseCollections) {\n var itemMap = new Map();\n var rootIDSet = new Set();\n\n setItem = function (id, item) {\n itemMap.set(id, item);\n };\n getItem = function (id) {\n return itemMap.get(id);\n };\n removeItem = function (id) {\n itemMap['delete'](id);\n };\n getItemIDs = function () {\n return Array.from(itemMap.keys());\n };\n\n addRoot = function (id) {\n rootIDSet.add(id);\n };\n removeRoot = function (id) {\n rootIDSet['delete'](id);\n };\n getRootIDs = function () {\n return Array.from(rootIDSet.keys());\n };\n} else {\n var itemByKey = {};\n var rootByKey = {};\n\n // Use non-numeric keys to prevent V8 performance issues:\n // https://github.com/facebook/react/pull/7232\n var getKeyFromID = function (id) {\n return '.' + id;\n };\n var getIDFromKey = function (key) {\n return parseInt(key.substr(1), 10);\n };\n\n setItem = function (id, item) {\n var key = getKeyFromID(id);\n itemByKey[key] = item;\n };\n getItem = function (id) {\n var key = getKeyFromID(id);\n return itemByKey[key];\n };\n removeItem = function (id) {\n var key = getKeyFromID(id);\n delete itemByKey[key];\n };\n getItemIDs = function () {\n return Object.keys(itemByKey).map(getIDFromKey);\n };\n\n addRoot = function (id) {\n var key = getKeyFromID(id);\n rootByKey[key] = true;\n };\n removeRoot = function (id) {\n var key = getKeyFromID(id);\n delete rootByKey[key];\n };\n getRootIDs = function () {\n return Object.keys(rootByKey).map(getIDFromKey);\n };\n}\n\nvar unmountedIDs = [];\n\nfunction purgeDeep(id) {\n var item = getItem(id);\n if (item) {\n var childIDs = item.childIDs;\n\n removeItem(id);\n childIDs.forEach(purgeDeep);\n }\n}\n\nfunction describeComponentFrame(name, source, ownerName) {\n return '\\n in ' + (name || 'Unknown') + (source ? ' (at ' + source.fileName.replace(/^.*[\\\\\\/]/, '') + ':' + source.lineNumber + ')' : ownerName ? ' (created by ' + ownerName + ')' : '');\n}\n\nfunction getDisplayName(element) {\n if (element == null) {\n return '#empty';\n } else if (typeof element === 'string' || typeof element === 'number') {\n return '#text';\n } else if (typeof element.type === 'string') {\n return element.type;\n } else {\n return element.type.displayName || element.type.name || 'Unknown';\n }\n}\n\nfunction describeID(id) {\n var name = ReactComponentTreeHook.getDisplayName(id);\n var element = ReactComponentTreeHook.getElement(id);\n var ownerID = ReactComponentTreeHook.getOwnerID(id);\n var ownerName;\n if (ownerID) {\n ownerName = ReactComponentTreeHook.getDisplayName(ownerID);\n }\n true ? warning(element, 'ReactComponentTreeHook: Missing React element for debugID %s when ' + 'building stack', id) : void 0;\n return describeComponentFrame(name, element && element._source, ownerName);\n}\n\nvar ReactComponentTreeHook = {\n onSetChildren: function (id, nextChildIDs) {\n var item = getItem(id);\n !item ? true ? invariant(false, 'Item must have been set') : _prodInvariant('144') : void 0;\n item.childIDs = nextChildIDs;\n\n for (var i = 0; i < nextChildIDs.length; i++) {\n var nextChildID = nextChildIDs[i];\n var nextChild = getItem(nextChildID);\n !nextChild ? true ? invariant(false, 'Expected hook events to fire for the child before its parent includes it in onSetChildren().') : _prodInvariant('140') : void 0;\n !(nextChild.childIDs != null || typeof nextChild.element !== 'object' || nextChild.element == null) ? true ? invariant(false, 'Expected onSetChildren() to fire for a container child before its parent includes it in onSetChildren().') : _prodInvariant('141') : void 0;\n !nextChild.isMounted ? true ? invariant(false, 'Expected onMountComponent() to fire for the child before its parent includes it in onSetChildren().') : _prodInvariant('71') : void 0;\n if (nextChild.parentID == null) {\n nextChild.parentID = id;\n // TODO: This shouldn't be necessary but mounting a new root during in\n // componentWillMount currently causes not-yet-mounted components to\n // be purged from our tree data so their parent id is missing.\n }\n !(nextChild.parentID === id) ? true ? invariant(false, 'Expected onBeforeMountComponent() parent and onSetChildren() to be consistent (%s has parents %s and %s).', nextChildID, nextChild.parentID, id) : _prodInvariant('142', nextChildID, nextChild.parentID, id) : void 0;\n }\n },\n onBeforeMountComponent: function (id, element, parentID) {\n var item = {\n element: element,\n parentID: parentID,\n text: null,\n childIDs: [],\n isMounted: false,\n updateCount: 0\n };\n setItem(id, item);\n },\n onBeforeUpdateComponent: function (id, element) {\n var item = getItem(id);\n if (!item || !item.isMounted) {\n // We may end up here as a result of setState() in componentWillUnmount().\n // In this case, ignore the element.\n return;\n }\n item.element = element;\n },\n onMountComponent: function (id) {\n var item = getItem(id);\n !item ? true ? invariant(false, 'Item must have been set') : _prodInvariant('144') : void 0;\n item.isMounted = true;\n var isRoot = item.parentID === 0;\n if (isRoot) {\n addRoot(id);\n }\n },\n onUpdateComponent: function (id) {\n var item = getItem(id);\n if (!item || !item.isMounted) {\n // We may end up here as a result of setState() in componentWillUnmount().\n // In this case, ignore the element.\n return;\n }\n item.updateCount++;\n },\n onUnmountComponent: function (id) {\n var item = getItem(id);\n if (item) {\n // We need to check if it exists.\n // `item` might not exist if it is inside an error boundary, and a sibling\n // error boundary child threw while mounting. Then this instance never\n // got a chance to mount, but it still gets an unmounting event during\n // the error boundary cleanup.\n item.isMounted = false;\n var isRoot = item.parentID === 0;\n if (isRoot) {\n removeRoot(id);\n }\n }\n unmountedIDs.push(id);\n },\n purgeUnmountedComponents: function () {\n if (ReactComponentTreeHook._preventPurging) {\n // Should only be used for testing.\n return;\n }\n\n for (var i = 0; i < unmountedIDs.length; i++) {\n var id = unmountedIDs[i];\n purgeDeep(id);\n }\n unmountedIDs.length = 0;\n },\n isMounted: function (id) {\n var item = getItem(id);\n return item ? item.isMounted : false;\n },\n getCurrentStackAddendum: function (topElement) {\n var info = '';\n if (topElement) {\n var name = getDisplayName(topElement);\n var owner = topElement._owner;\n info += describeComponentFrame(name, topElement._source, owner && owner.getName());\n }\n\n var currentOwner = ReactCurrentOwner.current;\n var id = currentOwner && currentOwner._debugID;\n\n info += ReactComponentTreeHook.getStackAddendumByID(id);\n return info;\n },\n getStackAddendumByID: function (id) {\n var info = '';\n while (id) {\n info += describeID(id);\n id = ReactComponentTreeHook.getParentID(id);\n }\n return info;\n },\n getChildIDs: function (id) {\n var item = getItem(id);\n return item ? item.childIDs : [];\n },\n getDisplayName: function (id) {\n var element = ReactComponentTreeHook.getElement(id);\n if (!element) {\n return null;\n }\n return getDisplayName(element);\n },\n getElement: function (id) {\n var item = getItem(id);\n return item ? item.element : null;\n },\n getOwnerID: function (id) {\n var element = ReactComponentTreeHook.getElement(id);\n if (!element || !element._owner) {\n return null;\n }\n return element._owner._debugID;\n },\n getParentID: function (id) {\n var item = getItem(id);\n return item ? item.parentID : null;\n },\n getSource: function (id) {\n var item = getItem(id);\n var element = item ? item.element : null;\n var source = element != null ? element._source : null;\n return source;\n },\n getText: function (id) {\n var element = ReactComponentTreeHook.getElement(id);\n if (typeof element === 'string') {\n return element;\n } else if (typeof element === 'number') {\n return '' + element;\n } else {\n return null;\n }\n },\n getUpdateCount: function (id) {\n var item = getItem(id);\n return item ? item.updateCount : 0;\n },\n\n\n getRootIDs: getRootIDs,\n getRegisteredIDs: getItemIDs\n};\n\nmodule.exports = ReactComponentTreeHook;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react/lib/ReactComponentTreeHook.js\n// module id = 37\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react/lib/ReactComponentTreeHook.js?", + ); + + /***/ + }, + /* 38 */ + /* unknown exports provided */ + /* all exports used */ + /*!**********************************************!*\ + !*** ./~/core-js/library/modules/_export.js ***! + \**********************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "var global = __webpack_require__(/*! ./_global */ 53)\n , core = __webpack_require__(/*! ./_core */ 30)\n , ctx = __webpack_require__(/*! ./_ctx */ 93)\n , hide = __webpack_require__(/*! ./_hide */ 63)\n , PROTOTYPE = 'prototype';\n\nvar $export = function(type, name, source){\n var IS_FORCED = type & $export.F\n , IS_GLOBAL = type & $export.G\n , IS_STATIC = type & $export.S\n , IS_PROTO = type & $export.P\n , IS_BIND = type & $export.B\n , IS_WRAP = type & $export.W\n , exports = IS_GLOBAL ? core : core[name] || (core[name] = {})\n , expProto = exports[PROTOTYPE]\n , target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]\n , key, own, out;\n if(IS_GLOBAL)source = name;\n for(key in source){\n // contains in native\n own = !IS_FORCED && target && target[key] !== undefined;\n if(own && key in exports)continue;\n // export native or passed\n out = own ? target[key] : source[key];\n // prevent global pollution for namespaces\n exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]\n // bind timers to global for call from export context\n : IS_BIND && own ? ctx(out, global)\n // wrap global constructors for prevent change them in library\n : IS_WRAP && target[key] == out ? (function(C){\n var F = function(a, b, c){\n if(this instanceof C){\n switch(arguments.length){\n case 0: return new C;\n case 1: return new C(a);\n case 2: return new C(a, b);\n } return new C(a, b, c);\n } return C.apply(this, arguments);\n };\n F[PROTOTYPE] = C[PROTOTYPE];\n return F;\n // make static versions for prototype methods\n })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;\n // export proto methods to core.%CONSTRUCTOR%.methods.%NAME%\n if(IS_PROTO){\n (exports.virtual || (exports.virtual = {}))[key] = out;\n // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME%\n if(type & $export.R && expProto && !expProto[key])hide(expProto, key, out);\n }\n }\n};\n// type bitmap\n$export.F = 1; // forced\n$export.G = 2; // global\n$export.S = 4; // static\n$export.P = 8; // proto\n$export.B = 16; // bind\n$export.W = 32; // wrap\n$export.U = 64; // safe\n$export.R = 128; // real proto method for `library` \nmodule.exports = $export;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_export.js\n// module id = 38\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/_export.js?", + ); + + /***/ + }, + /* 39 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************************!*\ + !*** ./~/core-js/library/modules/_wks.js ***! + \*******************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "var store = __webpack_require__(/*! ./_shared */ 204)('wks')\n , uid = __webpack_require__(/*! ./_uid */ 153)\n , Symbol = __webpack_require__(/*! ./_global */ 53).Symbol\n , USE_SYMBOL = typeof Symbol == 'function';\n\nvar $exports = module.exports = function(name){\n return store[name] || (store[name] =\n USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));\n};\n\n$exports.store = store;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_wks.js\n// module id = 39\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/_wks.js?", + ); + + /***/ + }, + /* 40 */ + /* unknown exports provided */ + /* all exports used */ + /*!*************************************!*\ + !*** ./~/fbjs/lib/emptyFunction.js ***! + \*************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * \n */\n\nfunction makeEmptyFunction(arg) {\n return function () {\n return arg;\n };\n}\n\n/**\n * This function accepts and discards inputs; it has no side effects. This is\n * primarily useful idiomatically for overridable function endpoints which\n * always need to be callable, since JS lacks a null-call idiom ala Cocoa.\n */\nvar emptyFunction = function emptyFunction() {};\n\nemptyFunction.thatReturns = makeEmptyFunction;\nemptyFunction.thatReturnsFalse = makeEmptyFunction(false);\nemptyFunction.thatReturnsTrue = makeEmptyFunction(true);\nemptyFunction.thatReturnsNull = makeEmptyFunction(null);\nemptyFunction.thatReturnsThis = function () {\n return this;\n};\nemptyFunction.thatReturnsArgument = function (arg) {\n return arg;\n};\n\nmodule.exports = emptyFunction;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/fbjs/lib/emptyFunction.js\n// module id = 40\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/fbjs/lib/emptyFunction.js?', + ); + + /***/ + }, + /* 41 */ + /* unknown exports provided */ + /* all exports used */ + /*!*********************************************************!*\ + !*** ./~/react-google-maps/lib/utils/composeOptions.js ***! + \*********************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nexports["default"] = composeOptions;\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }\n\nvar _controlledOrDefault = __webpack_require__(/*! ./controlledOrDefault */ 1419);\n\nvar _controlledOrDefault2 = _interopRequireDefault(_controlledOrDefault);\n\nfunction composeOptions(props, controlledPropTypes) {\n var optionNameList = Object.keys(controlledPropTypes);\n var getter = (0, _controlledOrDefault2["default"])(props);\n\n // props from arguments may contain unknow props.\n // We only interested those in optionNameList\n return optionNameList.reduce(function (acc, optionName) {\n if ("options" !== optionName) {\n var value = getter(optionName);\n if ("undefined" !== typeof value) {\n acc[optionName] = value;\n }\n }\n return acc;\n }, _extends({}, getter("options")));\n}\n\nmodule.exports = exports["default"];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-google-maps/lib/utils/composeOptions.js\n// module id = 41\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-google-maps/lib/utils/composeOptions.js?', + ); + + /***/ + }, + /* 42 */ + /* unknown exports provided */ + /* all exports used */ + /*!**************************************************************!*\ + !*** ./~/react-google-maps/lib/utils/defaultPropsCreator.js ***! + \**************************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports["default"] = defaultPropsCreator;\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }\n\nvar _addDefaultPrefix = __webpack_require__(/*! ./addDefaultPrefix */ 559);\n\nvar _addDefaultPrefix2 = _interopRequireDefault(_addDefaultPrefix);\n\nfunction defaultPropsCreator(propTypes) {\n return Object.keys(propTypes).reduce(function (acc, name) {\n acc[(0, _addDefaultPrefix2["default"])(name)] = propTypes[name];\n return acc;\n }, {});\n}\n\nmodule.exports = exports["default"];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-google-maps/lib/utils/defaultPropsCreator.js\n// module id = 42\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-google-maps/lib/utils/defaultPropsCreator.js?', + ); + + /***/ + }, + /* 43 */ + /* exports provided: Unit, Table */ + /* exports used: Unit, Table */ + /*!******************************************************!*\ + !*** ./app/bundles/listings-show/ui/common/index.js ***! + \******************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Unit__ = __webpack_require__(/*! ./Unit */ 694);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_0__Unit__["a"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Table__ = __webpack_require__(/*! ./Table */ 693);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_1__Table__["a"]; });\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-show/ui/common/index.js\n// module id = 43\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-show/ui/common/index.js?', + ); + + /***/ + }, + /* 44 */ + /* exports provided: scrollTo, setPageTitle, isSmallScreen, mountDragAndDropEventListeners, unmountDragAndDropEventListeners, getDomNode, isEnterKey, isEscKey, onEscKey, preloadImage */ + /* exports used: isEnterKey, getDomNode, mountDragAndDropEventListeners, unmountDragAndDropEventListeners, onEscKey, setPageTitle, scrollTo, isSmallScreen */ + /*!*************************************!*\ + !*** ./app/libs/utils/dom/index.js ***! + \*************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__assets_styles_resources_screenSizes__ = __webpack_require__(/*! ../../../assets/styles/resources/screenSizes */ 105);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__scrollTo__ = __webpack_require__(/*! ./scrollTo */ 889);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"g\", function() { return __WEBPACK_IMPORTED_MODULE_1__scrollTo__[\"a\"]; });\n/* harmony export (immutable) */ __webpack_exports__[\"f\"] = setPageTitle;\n/* harmony export (immutable) */ __webpack_exports__[\"h\"] = isSmallScreen;\n/* harmony export (immutable) */ __webpack_exports__[\"c\"] = mountDragAndDropEventListeners;\n/* harmony export (immutable) */ __webpack_exports__[\"d\"] = unmountDragAndDropEventListeners;\n/* harmony export (immutable) */ __webpack_exports__[\"b\"] = getDomNode;\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = isEnterKey;\n/* unused harmony export isEscKey */\n/* harmony export (immutable) */ __webpack_exports__[\"e\"] = onEscKey;\n/* unused harmony export preloadImage */\n\n\n\n\nfunction setPageTitle(title) {\n document.title = title + ' - Friends and Guests';\n}\n\n// NB: This should be used only in event listeners.\n// Do not use it inside `render` on server\nfunction isSmallScreen() {\n return window.innerWidth < __WEBPACK_IMPORTED_MODULE_0__assets_styles_resources_screenSizes__[\"b\" /* SCREEN_SM */];\n}\n\nfunction mountDragAndDropEventListeners(ctx) {\n // $FlowFixMe\n ctx.htmlBody = document.getElementsByTagName('body')[0]; // eslint-disable-line no-param-reassign\n\n ctx.htmlBody.addEventListener('dragenter', ctx.handleDragEnter, false);\n // $FlowFixMe\n ctx.htmlBody.addEventListener('dragover', ctx.handleDragOver, false);\n // $FlowFixMe\n ctx.htmlBody.addEventListener('dragleave', ctx.handleDragLeave, false);\n // $FlowFixMe\n ctx.htmlBody.addEventListener('drop', ctx.handleDrop, false);\n}\n\nfunction unmountDragAndDropEventListeners(ctx) {\n ctx.htmlBody.removeEventListener('dragenter', ctx.handleDragEnter, false);\n ctx.htmlBody.removeEventListener('dragover', ctx.handleDragOver, false);\n ctx.htmlBody.removeEventListener('dragleave', ctx.handleDragLeave, false);\n ctx.htmlBody.removeEventListener('drop', ctx.handleDrop, false);\n}\n\nfunction getDomNode(stringIdOrRef) {\n if (typeof stringIdOrRef === 'string' && document.getElementById(stringIdOrRef)) {\n return document.getElementById(stringIdOrRef);\n } else if (stringIdOrRef && stringIdOrRef.nodeType && stringIdOrRef.nodeType === 1) {\n return stringIdOrRef;\n }\n\n return null;\n}\n\nfunction isEnterKey(event) {\n return event.keyCode === 13;\n}\n\nfunction isEscKey(event) {\n return event.keyCode === 27;\n}\n\nfunction onEscKey(event, handler) {\n if (isEscKey(event)) handler();\n}\n\n/**\n * @desc Preloads image file into browser's memory (and cache),\n * so when <img /> is injected into the DOM picture will show up immidiatly.\n *\n * Usecase:\n * - On uploading start you use `dataUrl` to show an image\n * - When photo is uploaded you preload it before dispatch success\n * and inject uploaded image url into the DOM:\n *\n */\nfunction preloadImage(imageUrl, callback) {\n var preloader = new Image();\n\n preloader.onload = function () {\n callback();\n if (preloader) preloader.src = '';\n preloader = null;\n };\n preloader.src = imageUrl;\n}\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/utils/dom/index.js\n// module id = 44\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/utils/dom/index.js?", + ); + + /***/ + }, + /* 45 */ + /* unknown exports provided */ + /* all exports used */ + /*!********************************!*\ + !*** ./~/can-use-dom/index.js ***! + \********************************/ + /***/ function (module, exports) { + eval( + "var canUseDOM = !!(\n typeof window !== 'undefined' &&\n window.document &&\n window.document.createElement\n);\n\nmodule.exports = canUseDOM;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/can-use-dom/index.js\n// module id = 45\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/can-use-dom/index.js?", + ); + + /***/ + }, + /* 46 */ + /* unknown exports provided */ + /* all exports used */ + /*!*************************************************!*\ + !*** ./~/core-js/library/modules/_object-dp.js ***! + \*************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "var anObject = __webpack_require__(/*! ./_an-object */ 72)\n , IE8_DOM_DEFINE = __webpack_require__(/*! ./_ie8-dom-define */ 320)\n , toPrimitive = __webpack_require__(/*! ./_to-primitive */ 206)\n , dP = Object.defineProperty;\n\nexports.f = __webpack_require__(/*! ./_descriptors */ 52) ? Object.defineProperty : function defineProperty(O, P, Attributes){\n anObject(O);\n P = toPrimitive(P, true);\n anObject(Attributes);\n if(IE8_DOM_DEFINE)try {\n return dP(O, P, Attributes);\n } catch(e){ /* empty */ }\n if('get' in Attributes || 'set' in Attributes)throw TypeError('Accessors not supported!');\n if('value' in Attributes)O[P] = Attributes.value;\n return O;\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_object-dp.js\n// module id = 46\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/_object-dp.js?", + ); + + /***/ + }, + /* 47 */ + /* unknown exports provided */ + /* all exports used */ + /*!*****************************************!*\ + !*** ./~/react-dom/lib/ReactUpdates.js ***! + \*****************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar _prodInvariant = __webpack_require__(/*! ./reactProdInvariant */ 17),\n _assign = __webpack_require__(/*! object-assign */ 21);\n\nvar CallbackQueue = __webpack_require__(/*! ./CallbackQueue */ 532);\nvar PooledClass = __webpack_require__(/*! ./PooledClass */ 78);\nvar ReactFeatureFlags = __webpack_require__(/*! ./ReactFeatureFlags */ 540);\nvar ReactReconciler = __webpack_require__(/*! ./ReactReconciler */ 79);\nvar Transaction = __webpack_require__(/*! ./Transaction */ 171);\n\nvar invariant = __webpack_require__(/*! fbjs/lib/invariant */ 12);\n\nvar dirtyComponents = [];\nvar updateBatchNumber = 0;\nvar asapCallbackQueue = CallbackQueue.getPooled();\nvar asapEnqueued = false;\n\nvar batchingStrategy = null;\n\nfunction ensureInjected() {\n !(ReactUpdates.ReactReconcileTransaction && batchingStrategy) ? true ? invariant(false, 'ReactUpdates: must inject a reconcile transaction class and batching strategy') : _prodInvariant('123') : void 0;\n}\n\nvar NESTED_UPDATES = {\n initialize: function () {\n this.dirtyComponentsLength = dirtyComponents.length;\n },\n close: function () {\n if (this.dirtyComponentsLength !== dirtyComponents.length) {\n // Additional updates were enqueued by componentDidUpdate handlers or\n // similar; before our own UPDATE_QUEUEING wrapper closes, we want to run\n // these new updates so that if A's componentDidUpdate calls setState on\n // B, B will update before the callback A's updater provided when calling\n // setState.\n dirtyComponents.splice(0, this.dirtyComponentsLength);\n flushBatchedUpdates();\n } else {\n dirtyComponents.length = 0;\n }\n }\n};\n\nvar UPDATE_QUEUEING = {\n initialize: function () {\n this.callbackQueue.reset();\n },\n close: function () {\n this.callbackQueue.notifyAll();\n }\n};\n\nvar TRANSACTION_WRAPPERS = [NESTED_UPDATES, UPDATE_QUEUEING];\n\nfunction ReactUpdatesFlushTransaction() {\n this.reinitializeTransaction();\n this.dirtyComponentsLength = null;\n this.callbackQueue = CallbackQueue.getPooled();\n this.reconcileTransaction = ReactUpdates.ReactReconcileTransaction.getPooled(\n /* useCreateElement */true);\n}\n\n_assign(ReactUpdatesFlushTransaction.prototype, Transaction, {\n getTransactionWrappers: function () {\n return TRANSACTION_WRAPPERS;\n },\n\n destructor: function () {\n this.dirtyComponentsLength = null;\n CallbackQueue.release(this.callbackQueue);\n this.callbackQueue = null;\n ReactUpdates.ReactReconcileTransaction.release(this.reconcileTransaction);\n this.reconcileTransaction = null;\n },\n\n perform: function (method, scope, a) {\n // Essentially calls `this.reconcileTransaction.perform(method, scope, a)`\n // with this transaction's wrappers around it.\n return Transaction.perform.call(this, this.reconcileTransaction.perform, this.reconcileTransaction, method, scope, a);\n }\n});\n\nPooledClass.addPoolingTo(ReactUpdatesFlushTransaction);\n\nfunction batchedUpdates(callback, a, b, c, d, e) {\n ensureInjected();\n return batchingStrategy.batchedUpdates(callback, a, b, c, d, e);\n}\n\n/**\n * Array comparator for ReactComponents by mount ordering.\n *\n * @param {ReactComponent} c1 first component you're comparing\n * @param {ReactComponent} c2 second component you're comparing\n * @return {number} Return value usable by Array.prototype.sort().\n */\nfunction mountOrderComparator(c1, c2) {\n return c1._mountOrder - c2._mountOrder;\n}\n\nfunction runBatchedUpdates(transaction) {\n var len = transaction.dirtyComponentsLength;\n !(len === dirtyComponents.length) ? true ? invariant(false, 'Expected flush transaction\\'s stored dirty-components length (%s) to match dirty-components array length (%s).', len, dirtyComponents.length) : _prodInvariant('124', len, dirtyComponents.length) : void 0;\n\n // Since reconciling a component higher in the owner hierarchy usually (not\n // always -- see shouldComponentUpdate()) will reconcile children, reconcile\n // them before their children by sorting the array.\n dirtyComponents.sort(mountOrderComparator);\n\n // Any updates enqueued while reconciling must be performed after this entire\n // batch. Otherwise, if dirtyComponents is [A, B] where A has children B and\n // C, B could update twice in a single batch if C's render enqueues an update\n // to B (since B would have already updated, we should skip it, and the only\n // way we can know to do so is by checking the batch counter).\n updateBatchNumber++;\n\n for (var i = 0; i < len; i++) {\n // If a component is unmounted before pending changes apply, it will still\n // be here, but we assume that it has cleared its _pendingCallbacks and\n // that performUpdateIfNecessary is a noop.\n var component = dirtyComponents[i];\n\n // If performUpdateIfNecessary happens to enqueue any new updates, we\n // shouldn't execute the callbacks until the next render happens, so\n // stash the callbacks first\n var callbacks = component._pendingCallbacks;\n component._pendingCallbacks = null;\n\n var markerName;\n if (ReactFeatureFlags.logTopLevelRenders) {\n var namedComponent = component;\n // Duck type TopLevelWrapper. This is probably always true.\n if (component._currentElement.type.isReactTopLevelWrapper) {\n namedComponent = component._renderedComponent;\n }\n markerName = 'React update: ' + namedComponent.getName();\n console.time(markerName);\n }\n\n ReactReconciler.performUpdateIfNecessary(component, transaction.reconcileTransaction, updateBatchNumber);\n\n if (markerName) {\n console.timeEnd(markerName);\n }\n\n if (callbacks) {\n for (var j = 0; j < callbacks.length; j++) {\n transaction.callbackQueue.enqueue(callbacks[j], component.getPublicInstance());\n }\n }\n }\n}\n\nvar flushBatchedUpdates = function () {\n // ReactUpdatesFlushTransaction's wrappers will clear the dirtyComponents\n // array and perform any updates enqueued by mount-ready handlers (i.e.,\n // componentDidUpdate) but we need to check here too in order to catch\n // updates enqueued by setState callbacks and asap calls.\n while (dirtyComponents.length || asapEnqueued) {\n if (dirtyComponents.length) {\n var transaction = ReactUpdatesFlushTransaction.getPooled();\n transaction.perform(runBatchedUpdates, null, transaction);\n ReactUpdatesFlushTransaction.release(transaction);\n }\n\n if (asapEnqueued) {\n asapEnqueued = false;\n var queue = asapCallbackQueue;\n asapCallbackQueue = CallbackQueue.getPooled();\n queue.notifyAll();\n CallbackQueue.release(queue);\n }\n }\n};\n\n/**\n * Mark a component as needing a rerender, adding an optional callback to a\n * list of functions which will be executed once the rerender occurs.\n */\nfunction enqueueUpdate(component) {\n ensureInjected();\n\n // Various parts of our code (such as ReactCompositeComponent's\n // _renderValidatedComponent) assume that calls to render aren't nested;\n // verify that that's the case. (This is called by each top-level update\n // function, like setState, forceUpdate, etc.; creation and\n // destruction of top-level components is guarded in ReactMount.)\n\n if (!batchingStrategy.isBatchingUpdates) {\n batchingStrategy.batchedUpdates(enqueueUpdate, component);\n return;\n }\n\n dirtyComponents.push(component);\n if (component._updateBatchNumber == null) {\n component._updateBatchNumber = updateBatchNumber + 1;\n }\n}\n\n/**\n * Enqueue a callback to be run at the end of the current batching cycle. Throws\n * if no updates are currently being performed.\n */\nfunction asap(callback, context) {\n !batchingStrategy.isBatchingUpdates ? true ? invariant(false, 'ReactUpdates.asap: Can\\'t enqueue an asap callback in a context whereupdates are not being batched.') : _prodInvariant('125') : void 0;\n asapCallbackQueue.enqueue(callback, context);\n asapEnqueued = true;\n}\n\nvar ReactUpdatesInjection = {\n injectReconcileTransaction: function (ReconcileTransaction) {\n !ReconcileTransaction ? true ? invariant(false, 'ReactUpdates: must provide a reconcile transaction class') : _prodInvariant('126') : void 0;\n ReactUpdates.ReactReconcileTransaction = ReconcileTransaction;\n },\n\n injectBatchingStrategy: function (_batchingStrategy) {\n !_batchingStrategy ? true ? invariant(false, 'ReactUpdates: must provide a batching strategy') : _prodInvariant('127') : void 0;\n !(typeof _batchingStrategy.batchedUpdates === 'function') ? true ? invariant(false, 'ReactUpdates: must provide a batchedUpdates() function') : _prodInvariant('128') : void 0;\n !(typeof _batchingStrategy.isBatchingUpdates === 'boolean') ? true ? invariant(false, 'ReactUpdates: must provide an isBatchingUpdates boolean attribute') : _prodInvariant('129') : void 0;\n batchingStrategy = _batchingStrategy;\n }\n};\n\nvar ReactUpdates = {\n /**\n * React references `ReactReconcileTransaction` using this property in order\n * to allow dependency injection.\n *\n * @internal\n */\n ReactReconcileTransaction: null,\n\n batchedUpdates: batchedUpdates,\n enqueueUpdate: enqueueUpdate,\n flushBatchedUpdates: flushBatchedUpdates,\n injection: ReactUpdatesInjection,\n asap: asap\n};\n\nmodule.exports = ReactUpdates;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/ReactUpdates.js\n// module id = 47\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/ReactUpdates.js?", + ); + + /***/ + }, + /* 48 */ + /* unknown exports provided */ + /* all exports used */ + /*!**********************************************************************!*\ + !*** ./~/react-google-maps/lib/utils/componentLifecycleDecorator.js ***! + \**********************************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports["default"] = componentLifecycleDecorator;\n\nfunction componentLifecycleDecorator(_ref) {\n var registerEvents = _ref.registerEvents;\n var instanceMethodName = _ref.instanceMethodName;\n var updaters = _ref.updaters;\n\n // This modify the Component.prototype directly\n return function (Component) {\n function register() {\n this._unregisterEvents = registerEvents(google.maps.event, this.props, this[instanceMethodName]());\n }\n\n function unregister() {\n if (this._unregisterEvents) {\n this._unregisterEvents();\n this._unregisterEvents = null;\n }\n }\n\n function noop() {}\n\n // Stash component\'s own lifecycle methods to be invoked later\n var componentDidMount = Component.prototype.hasOwnProperty("componentDidMount") ? Component.prototype.componentDidMount : noop;\n var componentDidUpdate = Component.prototype.hasOwnProperty("componentDidUpdate") ? Component.prototype.componentDidUpdate : noop;\n var componentWillUnmount = Component.prototype.hasOwnProperty("componentWillUnmount") ? Component.prototype.componentWillUnmount : noop;\n\n Object.defineProperty(Component.prototype, "componentDidMount", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function value() {\n // Hook into client\'s implementation, if it has any\n componentDidMount.call(this);\n\n register.call(this);\n }\n });\n\n Object.defineProperty(Component.prototype, "componentDidUpdate", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function value(prevProps) {\n unregister.call(this);\n\n for (var _name in updaters) {\n if (Object.prototype.hasOwnProperty.call(this.props, _name)) {\n updaters[_name](this.props[_name], this);\n }\n }\n\n // Hook into client\'s implementation, if it has any\n componentDidUpdate.call(this, prevProps);\n\n register.call(this);\n }\n });\n\n Object.defineProperty(Component.prototype, "componentWillUnmount", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function value() {\n // Hook into client\'s implementation, if it has any\n componentWillUnmount.call(this);\n\n unregister.call(this);\n var instance = this[instanceMethodName]();\n if ("setMap" in instance) {\n instance.setMap(null);\n }\n }\n });\n\n return Component;\n };\n}\n\nmodule.exports = exports["default"];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-google-maps/lib/utils/componentLifecycleDecorator.js\n// module id = 48\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-google-maps/lib/utils/componentLifecycleDecorator.js?', + ); + + /***/ + }, + /* 49 */ + /* unknown exports provided */ + /* all exports used */ + /*!**************************************************************!*\ + !*** ./~/react-google-maps/lib/utils/eventHandlerCreator.js ***! + \**************************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports["default"] = eventHandlerCreator;\n\nvar _react = __webpack_require__(/*! react */ 1);\n\nfunction groupToUpperCase(match, group) {\n return group.toUpperCase();\n}\n\nfunction toOnEventName(rawName) {\n return "on" + rawName.replace(/^(.)/, groupToUpperCase).replace(/_(.)/g, groupToUpperCase);\n}\n\nfunction eventHandlerCreator(rawNameList) {\n var eventPropTypes = {};\n var onEventNameByRawName = {};\n\n rawNameList.forEach(function (rawName) {\n var onEventName = toOnEventName(rawName);\n eventPropTypes[onEventName] = _react.PropTypes.func;\n onEventNameByRawName[rawName] = onEventName;\n });\n\n function registerEvents(event, props, googleMapInstance) {\n var registered = rawNameList.reduce(function (acc, rawName) {\n var onEventName = onEventNameByRawName[rawName];\n\n if (Object.prototype.hasOwnProperty.call(props, onEventName)) {\n acc.push(event.addListener(googleMapInstance, rawName, props[onEventName]));\n }\n return acc;\n }, []);\n\n return registered.forEach.bind(registered, event.removeListener, event);\n }\n\n return {\n eventPropTypes: eventPropTypes,\n registerEvents: registerEvents\n };\n}\n\nmodule.exports = exports["default"];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-google-maps/lib/utils/eventHandlerCreator.js\n// module id = 49\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-google-maps/lib/utils/eventHandlerCreator.js?', + ); + + /***/ + }, + /* 50 */ + /* unknown exports provided */ + /* exports used: default */ + /*!***********************************************************!*\ + !*** ./~/react-on-rails/node_package/lib/ReactOnRails.js ***! + \***********************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _assign = __webpack_require__(/*! babel-runtime/core-js/object/assign */ 147);\n\nvar _assign2 = _interopRequireDefault(_assign);\n\nvar _stringify = __webpack_require__(/*! babel-runtime/core-js/json/stringify */ 146);\n\nvar _stringify2 = _interopRequireDefault(_stringify);\n\nvar _keys = __webpack_require__(/*! babel-runtime/core-js/object/keys */ 194);\n\nvar _keys2 = _interopRequireDefault(_keys);\n\nvar _reactDom = __webpack_require__(/*! react-dom */ 16);\n\nvar _reactDom2 = _interopRequireDefault(_reactDom);\n\nvar _clientStartup = __webpack_require__(/*! ./clientStartup */ 1427);\n\nvar ClientStartup = _interopRequireWildcard(_clientStartup);\n\nvar _handleError2 = __webpack_require__(/*! ./handleError */ 563);\n\nvar _handleError3 = _interopRequireDefault(_handleError2);\n\nvar _ComponentRegistry = __webpack_require__(/*! ./ComponentRegistry */ 561);\n\nvar _ComponentRegistry2 = _interopRequireDefault(_ComponentRegistry);\n\nvar _StoreRegistry = __webpack_require__(/*! ./StoreRegistry */ 1426);\n\nvar _StoreRegistry2 = _interopRequireDefault(_StoreRegistry);\n\nvar _serverRenderReactComponent2 = __webpack_require__(/*! ./serverRenderReactComponent */ 1431);\n\nvar _serverRenderReactComponent3 = _interopRequireDefault(_serverRenderReactComponent2);\n\nvar _buildConsoleReplay2 = __webpack_require__(/*! ./buildConsoleReplay */ 562);\n\nvar _buildConsoleReplay3 = _interopRequireDefault(_buildConsoleReplay2);\n\nvar _createReactElement = __webpack_require__(/*! ./createReactElement */ 262);\n\nvar _createReactElement2 = _interopRequireDefault(_createReactElement);\n\nvar _Authenticity = __webpack_require__(/*! ./Authenticity */ 1424);\n\nvar _Authenticity2 = _interopRequireDefault(_Authenticity);\n\nvar _context = __webpack_require__(/*! ./context */ 1428);\n\nvar _context2 = _interopRequireDefault(_context);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar ctx = (0, _context2.default)();\n\nvar DEFAULT_OPTIONS = {\n traceTurbolinks: false\n};\n\nctx.ReactOnRails = {\n /**\n * Main entry point to using the react-on-rails npm package. This is how Rails will be able to\n * find you components for rendering.\n * @param components (key is component name, value is component)\n */\n register: function register(components) {\n _ComponentRegistry2.default.register(components);\n },\n\n\n /**\n * Allows registration of store generators to be used by multiple react components on one Rails\n * view. store generators are functions that take one arg, props, and return a store. Note that\n * the setStore API is different in tha it's the actual store hydrated with props.\n * @param stores (keys are store names, values are the store generators)\n */\n registerStore: function registerStore(stores) {\n if (!stores) {\n throw new Error('Called ReactOnRails.registerStores with a null or undefined, rather than ' + 'an Object with keys being the store names and the values are the store generators.');\n }\n\n _StoreRegistry2.default.register(stores);\n },\n\n\n /**\n * Allows retrieval of the store by name. This store will be hydrated by any Rails form props.\n * Pass optional param throwIfMissing = false if you want to use this call to get back null if the\n * store with name is not registered.\n * @param name\n * @param throwIfMissing Defaults to true. Set to false to have this call return undefined if\n * there is no store with the given name.\n * @returns Redux Store, possibly hydrated\n */\n getStore: function getStore(name) {\n var throwIfMissing = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n\n return _StoreRegistry2.default.getStore(name, throwIfMissing);\n },\n\n\n /**\n * Set options for ReactOnRails, typically before you call ReactOnRails.register\n * Available Options:\n * `traceTurbolinks: true|false Gives you debugging messages on Turbolinks events\n */\n setOptions: function setOptions(newOptions) {\n if ('traceTurbolinks' in newOptions) {\n this.options.traceTurbolinks = newOptions.traceTurbolinks;\n\n // eslint-disable-next-line no-param-reassign\n delete newOptions.traceTurbolinks;\n }\n\n if ((0, _keys2.default)(newOptions).length > 0) {\n throw new Error('Invalid options passed to ReactOnRails.options: ', (0, _stringify2.default)(newOptions));\n }\n },\n\n\n /**\n * Allow directly calling the page loaded script in case the default events that trigger react\n * rendering are not sufficient, such as when loading JavaScript asynchronously with TurboLinks:\n * More details can be found here:\n * https://github.com/shakacode/react_on_rails/blob/master/docs/additional-reading/turbolinks.md\n */\n reactOnRailsPageLoaded: function reactOnRailsPageLoaded() {\n ClientStartup.reactOnRailsPageLoaded();\n },\n\n\n /**\n * Returns CSRF authenticity token inserted by Rails csrf_meta_tags\n * @returns String or null\n */\n\n authenticityToken: function authenticityToken() {\n return _Authenticity2.default.authenticityToken();\n },\n\n\n /**\n * Returns header with csrf authenticity token and XMLHttpRequest\n * @param {*} other headers\n * @returns {*} header\n */\n\n authenticityHeaders: function authenticityHeaders() {\n var otherHeaders = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n return _Authenticity2.default.authenticityHeaders(otherHeaders);\n },\n\n\n // /////////////////////////////////////////////////////////////////////////////\n // INTERNALLY USED APIs\n // /////////////////////////////////////////////////////////////////////////////\n\n /**\n * Retrieve an option by key.\n * @param key\n * @returns option value\n */\n option: function option(key) {\n return this.options[key];\n },\n\n\n /**\n * Allows retrieval of the store generator by name. This is used internally by ReactOnRails after\n * a rails form loads to prepare stores.\n * @param name\n * @returns Redux Store generator function\n */\n getStoreGenerator: function getStoreGenerator(name) {\n return _StoreRegistry2.default.getStoreGenerator(name);\n },\n\n\n /**\n * Allows saving the store populated by Rails form props. Used internally by ReactOnRails.\n * @param name\n * @returns Redux Store, possibly hydrated\n */\n setStore: function setStore(name, store) {\n return _StoreRegistry2.default.setStore(name, store);\n },\n\n\n /**\n * Clears hydratedStores to avoid accidental usage of wrong store hydrated in previous/parallel\n * request.\n */\n clearHydratedStores: function clearHydratedStores() {\n _StoreRegistry2.default.clearHydratedStores();\n },\n\n\n /**\n * ReactOnRails.render(\"HelloWorldApp\", {name: \"Stranger\"}, 'app');\n *\n * Does this:\n * ReactDOM.render(React.createElement(HelloWorldApp, {name: \"Stranger\"}),\n * document.getElementById('app'))\n *\n * @param name Name of your registered component\n * @param props Props to pass to your component\n * @param domNodeId\n * @returns {virtualDomElement} Reference to your component's backing instance\n */\n render: function render(name, props, domNodeId) {\n var componentObj = _ComponentRegistry2.default.get(name);\n var reactElement = (0, _createReactElement2.default)({ componentObj: componentObj, props: props, domNodeId: domNodeId });\n\n // eslint-disable-next-line react/no-render-return-value\n return _reactDom2.default.render(reactElement, document.getElementById(domNodeId));\n },\n\n\n /**\n * Get the component that you registered\n * @param name\n * @returns {name, component, generatorFunction, isRenderer}\n */\n getComponent: function getComponent(name) {\n return _ComponentRegistry2.default.get(name);\n },\n\n\n /**\n * Used by server rendering by Rails\n * @param options\n */\n serverRenderReactComponent: function serverRenderReactComponent(options) {\n return (0, _serverRenderReactComponent3.default)(options);\n },\n\n\n /**\n * Used by Rails to catch errors in rendering\n * @param options\n */\n handleError: function handleError(options) {\n return (0, _handleError3.default)(options);\n },\n\n\n /**\n * Used by Rails server rendering to replay console messages.\n */\n buildConsoleReplay: function buildConsoleReplay() {\n return (0, _buildConsoleReplay3.default)();\n },\n\n\n /**\n * Get an Object containing all registered components. Useful for debugging.\n * @returns {*}\n */\n registeredComponents: function registeredComponents() {\n return _ComponentRegistry2.default.components();\n },\n\n\n /**\n * Get an Object containing all registered store generators. Useful for debugging.\n * @returns {*}\n */\n storeGenerators: function storeGenerators() {\n return _StoreRegistry2.default.storeGenerators();\n },\n\n\n /**\n * Get an Object containing all hydrated stores. Useful for debugging.\n * @returns {*}\n */\n stores: function stores() {\n return _StoreRegistry2.default.stores();\n },\n resetOptions: function resetOptions() {\n this.options = (0, _assign2.default)({}, DEFAULT_OPTIONS);\n }\n};\n\nctx.ReactOnRails.resetOptions();\n\nClientStartup.clientStartup(ctx);\n\nexports.default = ctx.ReactOnRails;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-on-rails/node_package/lib/ReactOnRails.js\n// module id = 50\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-on-rails/node_package/lib/ReactOnRails.js?", + ); + + /***/ + }, + /* 51 */ + /* exports provided: buildPhotoUrl, DEFAULT_RECOMMENDED_COVER_SIZE, DEFAULT_RECOMMENDED_COMMON_SIZE, isCoverPhotoHq, isCommonPhotoHq, toMegapixels, getDpr, calculatePhotoDimensions, getPhotoUrl, readDataUrl, buildCloudinaryFormData, buildPhotoData */ + /* exports used: buildPhotoUrl, calculatePhotoDimensions */ + /*!********************************************!*\ + !*** ./app/libs/utils/fng/photos/index.js ***! + \********************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0____ = __webpack_require__(/*! ../.. */ 20);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__buildPhotoUrl__ = __webpack_require__(/*! ./buildPhotoUrl */ 890);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return __WEBPACK_IMPORTED_MODULE_1__buildPhotoUrl__[\"a\"]; });\n/* unused harmony export DEFAULT_RECOMMENDED_COVER_SIZE */\n/* unused harmony export DEFAULT_RECOMMENDED_COMMON_SIZE */\n/* unused harmony export isCoverPhotoHq */\n/* unused harmony export isCommonPhotoHq */\n/* unused harmony export toMegapixels */\n/* unused harmony export getDpr */\n/* harmony export (immutable) */ __webpack_exports__[\"b\"] = calculatePhotoDimensions;\n/* unused harmony export getPhotoUrl */\n/* unused harmony export readDataUrl */\n/* unused harmony export buildCloudinaryFormData */\n/* unused harmony export buildPhotoData */\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\n\n\n\n\nvar DEFAULT_MAX_WIDTH = 2500;\n\nvar DEFAULT_RECOMMENDED_COVER_SIZE = [1600, 600];\nvar DEFAULT_RECOMMENDED_COMMON_SIZE = 500;\n\nfunction isCoverPhotoHq(photo) {\n var width = DEFAULT_RECOMMENDED_COVER_SIZE[0],\n height = DEFAULT_RECOMMENDED_COVER_SIZE[1];\n\n return photo.width >= width && photo.height >= height;\n}\n\nfunction isCommonPhotoHq(photo) {\n return photo.width >= DEFAULT_RECOMMENDED_COMMON_SIZE && photo.height >= DEFAULT_RECOMMENDED_COMMON_SIZE;\n}\n\nfunction toMegapixels(px) {\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0____[\"a\" /* toInt */])(px / 1000000);\n}\n\n/**\n * @desc Returns actual DPR on the client.\n * Most likely it will cause different DOM w/ server rendering.\n *\n * @return {number} - DPR: actual on the client and 1 on the server\n */\nfunction getDpr() {\n return typeof window !== 'undefined' ? window.devicePixelRatio : 1;\n}\n\nfunction calculatePhotoDimensions(width, height) {\n var maxWidth = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : DEFAULT_MAX_WIDTH;\n\n return width <= maxWidth ? { width: width, height: height } : { width: maxWidth, height: Math.floor(height * (maxWidth / width)) };\n}\n\n/**\n * @desc Deprecated.\n * Use `components/Image` & `buildPhotoUrl`\n *\n */\nfunction getPhotoUrl(photoUrl, width, height) {\n var resize = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'fit';\n\n var transform = 'w_' + width + ',h_' + height + ',c_' + resize;\n return photoUrl.replace('upload', 'upload/' + transform).replace('facebook', 'facebook/' + transform);\n}\n\nfunction readDataUrl(file, onLoad) {\n var reader = new FileReader();\n reader.onload = function (event) {\n return onLoad(event.target.result, file);\n };\n reader.readAsDataURL(file);\n}\n\nfunction buildCloudinaryFormData(data) {\n var file = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n var timestamp = data.timestamp,\n signature = data.signature,\n apiKey = data.apiKey,\n publicId = data.publicId;\n\n var formData = new FormData();\n formData.append('timestamp', timestamp);\n formData.append('api_key', apiKey);\n formData.append('signature', signature);\n\n if (file !== null) formData.append('file', file);\n if (publicId !== null) formData.append('public_id', publicId);\n\n return formData;\n}\n\nfunction buildPhotoData(_ref) {\n var cloudinaryData = _ref.cloudinaryData,\n position = _ref.position,\n rest = _objectWithoutProperties(_ref, ['cloudinaryData', 'position']);\n\n return _extends({\n publicId: cloudinaryData.public_id,\n version: cloudinaryData.version,\n format: cloudinaryData.format,\n resourceType: 'image',\n cloudUrl: cloudinaryData.url,\n width: cloudinaryData.width,\n height: cloudinaryData.height,\n position: position\n }, rest);\n}\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/utils/fng/photos/index.js\n// module id = 51\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/utils/fng/photos/index.js?", + ); + + /***/ + }, + /* 52 */ + /* unknown exports provided */ + /* all exports used */ + /*!***************************************************!*\ + !*** ./~/core-js/library/modules/_descriptors.js ***! + \***************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "// Thank's IE8 for his funny defineProperty\nmodule.exports = !__webpack_require__(/*! ./_fails */ 73)(function(){\n return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7;\n});\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_descriptors.js\n// module id = 52\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/_descriptors.js?", + ); + + /***/ + }, + /* 53 */ + /* unknown exports provided */ + /* all exports used */ + /*!**********************************************!*\ + !*** ./~/core-js/library/modules/_global.js ***! + \**********************************************/ + /***/ function (module, exports) { + eval( + "// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nvar global = module.exports = typeof window != 'undefined' && window.Math == Math\n ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')();\nif(typeof __g == 'number')__g = global; // eslint-disable-line no-undef\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_global.js\n// module id = 53\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/_global.js?", + ); + + /***/ + }, + /* 54 */ + /* exports provided: default */ + /* exports used: default */ + /*!********************************************!*\ + !*** ./~/react-bootstrap/es/SafeAnchor.js ***! + \********************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ 9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ 7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react_prop_types_lib_elementType__ = __webpack_require__(/*! react-prop-types/lib/elementType */ 18);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react_prop_types_lib_elementType___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_react_prop_types_lib_elementType__);\n\n\n\n\n\n\n\n\n\nvar propTypes = {\n href: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,\n onClick: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,\n disabled: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool,\n role: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,\n tabIndex: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.number, __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string]),\n /**\n * this is sort of silly but needed for Button\n */\n componentClass: __WEBPACK_IMPORTED_MODULE_7_react_prop_types_lib_elementType___default.a\n};\n\nvar defaultProps = {\n componentClass: 'a'\n};\n\nfunction isTrivialHref(href) {\n return !href || href.trim() === '#';\n}\n\n/**\n * There are situations due to browser quirks or Bootstrap CSS where\n * an anchor tag is needed, when semantically a button tag is the\n * better choice. SafeAnchor ensures that when an anchor is used like a\n * button its accessible. It also emulates input `disabled` behavior for\n * links, which is usually desirable for Buttons, NavItems, MenuItems, etc.\n */\n\nvar SafeAnchor = function (_React$Component) {\n __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default()(SafeAnchor, _React$Component);\n\n function SafeAnchor(props, context) {\n __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default()(this, SafeAnchor);\n\n var _this = __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.call(this, props, context));\n\n _this.handleClick = _this.handleClick.bind(_this);\n return _this;\n }\n\n SafeAnchor.prototype.handleClick = function handleClick(event) {\n var _props = this.props,\n disabled = _props.disabled,\n href = _props.href,\n onClick = _props.onClick;\n\n\n if (disabled || isTrivialHref(href)) {\n event.preventDefault();\n }\n\n if (disabled) {\n event.stopPropagation();\n return;\n }\n\n if (onClick) {\n onClick(event);\n }\n };\n\n SafeAnchor.prototype.render = function render() {\n var _props2 = this.props,\n Component = _props2.componentClass,\n disabled = _props2.disabled,\n props = __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default()(_props2, ['componentClass', 'disabled']);\n\n if (isTrivialHref(props.href)) {\n props.role = props.role || 'button';\n // we want to make sure there is a href attribute on the node\n // otherwise, the cursor incorrectly styled (except with role='button')\n props.href = props.href || '#';\n }\n\n if (disabled) {\n props.tabIndex = -1;\n props.style = __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({ pointerEvents: 'none' }, props.style);\n }\n\n return __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(Component, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, props, {\n onClick: this.handleClick\n }));\n };\n\n return SafeAnchor;\n}(__WEBPACK_IMPORTED_MODULE_5_react___default.a.Component);\n\nSafeAnchor.propTypes = propTypes;\nSafeAnchor.defaultProps = defaultProps;\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (SafeAnchor);\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/SafeAnchor.js\n// module id = 54\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/SafeAnchor.js?", + ); + + /***/ + }, + /* 55 */ + /* unknown exports provided */ + /* all exports used */ + /*!******************************************!*\ + !*** ./~/react/lib/ReactCurrentOwner.js ***! + \******************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * \n */\n\n\n\n/**\n * Keeps track of the current owner.\n *\n * The current owner is the component who should own any components that are\n * currently being constructed.\n */\nvar ReactCurrentOwner = {\n\n /**\n * @internal\n * @type {ReactComponent}\n */\n current: null\n\n};\n\nmodule.exports = ReactCurrentOwner;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react/lib/ReactCurrentOwner.js\n// module id = 55\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react/lib/ReactCurrentOwner.js?', + ); + + /***/ + }, + /* 56 */ + /* unknown exports provided */ + /* all exports used */ + /*!**************************************************!*\ + !*** ./app/bundles/layout-navbar/types/index.js ***! + \**************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + 'if (true) Object.defineProperty(exports, "babelPluginFlowReactPropTypes_proptype_User", {\n value: __webpack_require__(/*! react */ 1).PropTypes.shape({\n firstName: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n avatarUrl: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n messagesPath: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n profilePath: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n accountPath: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n signOutPath: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n adminPath: __webpack_require__(/*! prop-types */ 0).string,\n listingsCount: __webpack_require__(/*! prop-types */ 0).number.isRequired,\n invitationsCount: __webpack_require__(/*! prop-types */ 0).number.isRequired,\n guestNotificationsCount: __webpack_require__(/*! prop-types */ 0).number.isRequired,\n conversationsCount: __webpack_require__(/*! prop-types */ 0).number.isRequired,\n guestListMembershipRequestsCount: __webpack_require__(/*! prop-types */ 0).number.isRequired\n })\n});\nif (true) Object.defineProperty(exports, "babelPluginFlowReactPropTypes_proptype_SignedInPaths", {\n value: __webpack_require__(/*! react */ 1).PropTypes.shape({\n joinedListingInvitationsPath: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n listingInvitationsPath: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n favoritesPath: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n manageGuestListsPath: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n managePropertiesPath: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n newListingPath: __webpack_require__(/*! prop-types */ 0).string.isRequired\n })\n});\nif (true) Object.defineProperty(exports, "babelPluginFlowReactPropTypes_proptype_SignedOutPaths", {\n value: __webpack_require__(/*! react */ 1).PropTypes.shape({\n signInPath: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n signUpPath: __webpack_require__(/*! prop-types */ 0).string.isRequired\n })\n});\nif (true) Object.defineProperty(exports, "babelPluginFlowReactPropTypes_proptype_PublicPaths", {\n value: __webpack_require__(/*! react */ 1).PropTypes.shape({\n listingsIndexPath: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n aboutPath: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n faqPath: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n communityUrl: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n hostsPath: __webpack_require__(/*! prop-types */ 0).string.isRequired\n })\n});\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/layout-navbar/types/index.js\n// module id = 56\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/layout-navbar/types/index.js?', + ); + + /***/ + }, + /* 57 */ + /* exports provided: listingInfoShape, listingInfosShape, photoShape, photosShape, propertyInfoShape, userInfoShape, listingFiltersShape, searchMetaShape */ + /* exports used: listingInfoShape, userInfoShape, listingInfosShape, searchMetaShape, listingFiltersShape */ + /*!************************************!*\ + !*** ./app/libs/propTypeShapes.js ***! + \************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return listingInfoShape; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return listingInfosShape; });\n/* unused harmony export photoShape */\n/* unused harmony export photosShape */\n/* unused harmony export propertyInfoShape */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return userInfoShape; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return listingFiltersShape; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return searchMetaShape; });\n\n\nvar factory = {\n listingFiltersShape: function listingFiltersShape() {\n return __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.shape({\n roomTypes: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.arrayOf(__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string),\n relationshipType: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string,\n price: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.arrayOf(__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number),\n amenities: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.arrayOf(__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number),\n bed: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number,\n bedroom: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number,\n bathrooms: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number\n });\n },\n searchMetaShape: function searchMetaShape() {\n return __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.shape({\n location: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string.isRequired,\n page: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number.isRequired,\n pageSize: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number.isRequired,\n bounds: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.shape({\n neLat: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number.isRequired,\n neLng: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number.isRequired,\n swLat: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number.isRequired,\n swLng: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number.isRequired\n }),\n zoom: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number,\n filters: this.listingFiltersShape()\n });\n },\n listingInfoShape: function listingInfoShape() {\n return __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.shape({\n id: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number.isRequired,\n htmlUrl: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string.isRequired,\n owner: this.userInfoShape(),\n photos: this.photosShape().isRequired,\n price: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number,\n property: this.propertyInfoShape(),\n title: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string.isRequired,\n displayMode: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string.isRequired,\n favoritesCount: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number.isRequired,\n userContext: this.userContextShape().isRequired\n });\n },\n userContextShape: function userContextShape() {\n return __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.shape({\n favorited: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.bool.isRequired,\n hostRelationshipType: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string.isRequired,\n isManagedByCurrentUser: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.bool.isRequired,\n listingRelationshipType: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string.isRequired\n });\n },\n listingInfosShape: function listingInfosShape() {\n return __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.arrayOf(this.listingInfoShape());\n },\n photoShape: function photoShape() {\n return __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.shape({\n cloudUrl: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string.isRequired,\n description: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string,\n id: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number.isRequired\n });\n },\n photosShape: function photosShape() {\n return __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.arrayOf(this.photoShape());\n },\n propertyInfoShape: function propertyInfoShape() {\n return __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.shape({\n city: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string,\n id: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number.isRequired,\n lat: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number.isRequired,\n lng: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number.isRequired,\n name: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string.isRequired,\n state: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string,\n street: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string,\n zipCode: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string\n });\n },\n userInfoShape: function userInfoShape() {\n return __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.shape({\n aboutMeDetails: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string,\n allMutualFriendsCount: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number,\n avatarUrl: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string.isRequired,\n createdAt: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string.isRequired,\n coverImageUrl: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string,\n fbConnected: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.bool.isRequired,\n firstName: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string,\n id: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number.isRequired,\n lastName: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string,\n mutualFriendsCount: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number,\n mutualFriendsSample: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.arrayOf(__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string),\n relationshipType: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string\n });\n }\n};\n\nvar listingInfoShape = factory.listingInfoShape();\nvar listingInfosShape = factory.listingInfosShape();\nvar photoShape = factory.photoShape();\nvar photosShape = factory.photosShape();\nvar propertyInfoShape = factory.propertyInfoShape();\nvar userInfoShape = factory.userInfoShape();\nvar listingFiltersShape = factory.listingFiltersShape();\nvar searchMetaShape = factory.searchMetaShape();\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/propTypeShapes.js\n// module id = 57\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/propTypeShapes.js?', + ); + + /***/ + }, + /* 58 */ + /* unknown exports provided */ + /* exports used: default */ + /*!******************************************************!*\ + !*** ./app/libs/components/DataTable/DataTable.scss ***! + \******************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"wrapper": "DataTable__wrapper__3D4M1",\n\t"row": "DataTable__row__1si7w",\n\t"hoverable": "DataTable__hoverable__1srom",\n\t"col": "DataTable__col__c6oMp",\n\t"userAvatar": "DataTable__userAvatar__VED0r",\n\t"primary": "DataTable__primary__36tne",\n\t"white": "DataTable__white__16EIr",\n\t"col-sm-1": "DataTable__col-sm-1__2AQll",\n\t"col-md-1": "DataTable__col-md-1__wCTNJ",\n\t"col-lg-1": "DataTable__col-lg-1__31ZSU",\n\t"col-sm-2": "DataTable__col-sm-2__1aPnB",\n\t"col-md-2": "DataTable__col-md-2__2Sajp",\n\t"col-lg-2": "DataTable__col-lg-2__2P3mV",\n\t"col-sm-3": "DataTable__col-sm-3__2RGTb",\n\t"col-md-3": "DataTable__col-md-3__1BRrd",\n\t"col-lg-3": "DataTable__col-lg-3__2bDQF",\n\t"col-sm-4": "DataTable__col-sm-4__14cgl",\n\t"col-md-4": "DataTable__col-md-4__Ju-QH",\n\t"col-lg-4": "DataTable__col-lg-4__3KBuY",\n\t"col-sm-5": "DataTable__col-sm-5__3EQCi",\n\t"col-md-5": "DataTable__col-md-5__Hyf6M",\n\t"col-lg-5": "DataTable__col-lg-5__1GxrV",\n\t"col-sm-6": "DataTable__col-sm-6__3yfKt",\n\t"col-md-6": "DataTable__col-md-6__2hnW7",\n\t"col-lg-6": "DataTable__col-lg-6__1bpt8",\n\t"col-sm-7": "DataTable__col-sm-7__36_92",\n\t"col-md-7": "DataTable__col-md-7__1IL5o",\n\t"col-lg-7": "DataTable__col-lg-7__8E9Ch",\n\t"col-sm-8": "DataTable__col-sm-8__3BnuA",\n\t"col-md-8": "DataTable__col-md-8__3pg2i",\n\t"col-lg-8": "DataTable__col-lg-8__1_RPf",\n\t"col-sm-9": "DataTable__col-sm-9__OQHxG",\n\t"col-md-9": "DataTable__col-md-9__2i7Ba",\n\t"col-lg-9": "DataTable__col-lg-9__3f5s_",\n\t"col-sm-10": "DataTable__col-sm-10__16YQX",\n\t"col-md-10": "DataTable__col-md-10__2qSa8",\n\t"col-lg-10": "DataTable__col-lg-10__2KDm-",\n\t"col-sm-11": "DataTable__col-sm-11__1uLv7",\n\t"col-md-11": "DataTable__col-md-11__2pYdh",\n\t"col-lg-11": "DataTable__col-lg-11__3SeH6",\n\t"col-sm-12": "DataTable__col-sm-12__ulcPD",\n\t"col-md-12": "DataTable__col-md-12__3B_lT",\n\t"col-lg-12": "DataTable__col-lg-12__2ot5A",\n\t"col-sm-13": "DataTable__col-sm-13__ml8R3",\n\t"col-md-13": "DataTable__col-md-13__MOEy8",\n\t"col-lg-13": "DataTable__col-lg-13__2Yi8Z",\n\t"col-sm-14": "DataTable__col-sm-14__2XDc4",\n\t"col-md-14": "DataTable__col-md-14__2BqQv",\n\t"col-lg-14": "DataTable__col-lg-14__3LNIF",\n\t"col-sm-15": "DataTable__col-sm-15__3o4fb",\n\t"col-md-15": "DataTable__col-md-15__3i9TW",\n\t"col-lg-15": "DataTable__col-lg-15__2ZoMk",\n\t"col-sm-16": "DataTable__col-sm-16__2l9me",\n\t"col-md-16": "DataTable__col-md-16__li1Nb",\n\t"col-lg-16": "DataTable__col-lg-16__3V0kF",\n\t"header": "DataTable__header__3y5LD",\n\t"clickableControl": "DataTable__clickableControl__31as8",\n\t"selectRowCheckbox": "DataTable__selectRowCheckbox__rg3me",\n\t"selectedRow": "DataTable__selectedRow__1R-Dv",\n\t"userData": "DataTable__userData__1TAdC",\n\t"userMeta": "DataTable__userMeta__3MbO6",\n\t"selectAllUsers": "DataTable__selectAllUsers__3zrK_"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/DataTable/DataTable.scss\n// module id = 58\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/DataTable/DataTable.scss?', + ); + + /***/ + }, + /* 59 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************************!*\ + !*** ./~/react-dom/lib/SyntheticEvent.js ***! + \*******************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar _assign = __webpack_require__(/*! object-assign */ 21);\n\nvar PooledClass = __webpack_require__(/*! ./PooledClass */ 78);\n\nvar emptyFunction = __webpack_require__(/*! fbjs/lib/emptyFunction */ 40);\nvar warning = __webpack_require__(/*! fbjs/lib/warning */ 13);\n\nvar didWarnForAddedNewProperty = false;\nvar isProxySupported = typeof Proxy === 'function';\n\nvar shouldBeReleasedProperties = ['dispatchConfig', '_targetInst', 'nativeEvent', 'isDefaultPrevented', 'isPropagationStopped', '_dispatchListeners', '_dispatchInstances'];\n\n/**\n * @interface Event\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\nvar EventInterface = {\n type: null,\n target: null,\n // currentTarget is set when dispatching; no use in copying it here\n currentTarget: emptyFunction.thatReturnsNull,\n eventPhase: null,\n bubbles: null,\n cancelable: null,\n timeStamp: function (event) {\n return event.timeStamp || Date.now();\n },\n defaultPrevented: null,\n isTrusted: null\n};\n\n/**\n * Synthetic events are dispatched by event plugins, typically in response to a\n * top-level event delegation handler.\n *\n * These systems should generally use pooling to reduce the frequency of garbage\n * collection. The system should check `isPersistent` to determine whether the\n * event should be released into the pool after being dispatched. Users that\n * need a persisted event should invoke `persist`.\n *\n * Synthetic events (and subclasses) implement the DOM Level 3 Events API by\n * normalizing browser quirks. Subclasses do not necessarily have to implement a\n * DOM interface; custom application-specific events can also subclass this.\n *\n * @param {object} dispatchConfig Configuration used to dispatch this event.\n * @param {*} targetInst Marker identifying the event target.\n * @param {object} nativeEvent Native browser event.\n * @param {DOMEventTarget} nativeEventTarget Target node.\n */\nfunction SyntheticEvent(dispatchConfig, targetInst, nativeEvent, nativeEventTarget) {\n if (true) {\n // these have a getter/setter for warnings\n delete this.nativeEvent;\n delete this.preventDefault;\n delete this.stopPropagation;\n }\n\n this.dispatchConfig = dispatchConfig;\n this._targetInst = targetInst;\n this.nativeEvent = nativeEvent;\n\n var Interface = this.constructor.Interface;\n for (var propName in Interface) {\n if (!Interface.hasOwnProperty(propName)) {\n continue;\n }\n if (true) {\n delete this[propName]; // this has a getter/setter for warnings\n }\n var normalize = Interface[propName];\n if (normalize) {\n this[propName] = normalize(nativeEvent);\n } else {\n if (propName === 'target') {\n this.target = nativeEventTarget;\n } else {\n this[propName] = nativeEvent[propName];\n }\n }\n }\n\n var defaultPrevented = nativeEvent.defaultPrevented != null ? nativeEvent.defaultPrevented : nativeEvent.returnValue === false;\n if (defaultPrevented) {\n this.isDefaultPrevented = emptyFunction.thatReturnsTrue;\n } else {\n this.isDefaultPrevented = emptyFunction.thatReturnsFalse;\n }\n this.isPropagationStopped = emptyFunction.thatReturnsFalse;\n return this;\n}\n\n_assign(SyntheticEvent.prototype, {\n\n preventDefault: function () {\n this.defaultPrevented = true;\n var event = this.nativeEvent;\n if (!event) {\n return;\n }\n\n if (event.preventDefault) {\n event.preventDefault();\n } else if (typeof event.returnValue !== 'unknown') {\n // eslint-disable-line valid-typeof\n event.returnValue = false;\n }\n this.isDefaultPrevented = emptyFunction.thatReturnsTrue;\n },\n\n stopPropagation: function () {\n var event = this.nativeEvent;\n if (!event) {\n return;\n }\n\n if (event.stopPropagation) {\n event.stopPropagation();\n } else if (typeof event.cancelBubble !== 'unknown') {\n // eslint-disable-line valid-typeof\n // The ChangeEventPlugin registers a \"propertychange\" event for\n // IE. This event does not support bubbling or cancelling, and\n // any references to cancelBubble throw \"Member not found\". A\n // typeof check of \"unknown\" circumvents this issue (and is also\n // IE specific).\n event.cancelBubble = true;\n }\n\n this.isPropagationStopped = emptyFunction.thatReturnsTrue;\n },\n\n /**\n * We release all dispatched `SyntheticEvent`s after each event loop, adding\n * them back into the pool. This allows a way to hold onto a reference that\n * won't be added back into the pool.\n */\n persist: function () {\n this.isPersistent = emptyFunction.thatReturnsTrue;\n },\n\n /**\n * Checks if this event should be released back into the pool.\n *\n * @return {boolean} True if this should not be released, false otherwise.\n */\n isPersistent: emptyFunction.thatReturnsFalse,\n\n /**\n * `PooledClass` looks for `destructor` on each instance it releases.\n */\n destructor: function () {\n var Interface = this.constructor.Interface;\n for (var propName in Interface) {\n if (true) {\n Object.defineProperty(this, propName, getPooledWarningPropertyDefinition(propName, Interface[propName]));\n } else {\n this[propName] = null;\n }\n }\n for (var i = 0; i < shouldBeReleasedProperties.length; i++) {\n this[shouldBeReleasedProperties[i]] = null;\n }\n if (true) {\n Object.defineProperty(this, 'nativeEvent', getPooledWarningPropertyDefinition('nativeEvent', null));\n Object.defineProperty(this, 'preventDefault', getPooledWarningPropertyDefinition('preventDefault', emptyFunction));\n Object.defineProperty(this, 'stopPropagation', getPooledWarningPropertyDefinition('stopPropagation', emptyFunction));\n }\n }\n\n});\n\nSyntheticEvent.Interface = EventInterface;\n\nif (true) {\n if (isProxySupported) {\n /*eslint-disable no-func-assign */\n SyntheticEvent = new Proxy(SyntheticEvent, {\n construct: function (target, args) {\n return this.apply(target, Object.create(target.prototype), args);\n },\n apply: function (constructor, that, args) {\n return new Proxy(constructor.apply(that, args), {\n set: function (target, prop, value) {\n if (prop !== 'isPersistent' && !target.constructor.Interface.hasOwnProperty(prop) && shouldBeReleasedProperties.indexOf(prop) === -1) {\n true ? warning(didWarnForAddedNewProperty || target.isPersistent(), 'This synthetic event is reused for performance reasons. If you\\'re ' + 'seeing this, you\\'re adding a new property in the synthetic event object. ' + 'The property is never released. See ' + 'https://fb.me/react-event-pooling for more information.') : void 0;\n didWarnForAddedNewProperty = true;\n }\n target[prop] = value;\n return true;\n }\n });\n }\n });\n /*eslint-enable no-func-assign */\n }\n}\n/**\n * Helper to reduce boilerplate when creating subclasses.\n *\n * @param {function} Class\n * @param {?object} Interface\n */\nSyntheticEvent.augmentClass = function (Class, Interface) {\n var Super = this;\n\n var E = function () {};\n E.prototype = Super.prototype;\n var prototype = new E();\n\n _assign(prototype, Class.prototype);\n Class.prototype = prototype;\n Class.prototype.constructor = Class;\n\n Class.Interface = _assign({}, Super.Interface, Interface);\n Class.augmentClass = Super.augmentClass;\n\n PooledClass.addPoolingTo(Class, PooledClass.fourArgumentPooler);\n};\n\nPooledClass.addPoolingTo(SyntheticEvent, PooledClass.fourArgumentPooler);\n\nmodule.exports = SyntheticEvent;\n\n/**\n * Helper to nullify syntheticEvent instance properties when destructing\n *\n * @param {object} SyntheticEvent\n * @param {String} propName\n * @return {object} defineProperty object\n */\nfunction getPooledWarningPropertyDefinition(propName, getVal) {\n var isFunction = typeof getVal === 'function';\n return {\n configurable: true,\n set: set,\n get: get\n };\n\n function set(val) {\n var action = isFunction ? 'setting the method' : 'setting the property';\n warn(action, 'This is effectively a no-op');\n return val;\n }\n\n function get() {\n var action = isFunction ? 'accessing the method' : 'accessing the property';\n var result = isFunction ? 'This is a no-op function' : 'This is set to null';\n warn(action, result);\n return getVal;\n }\n\n function warn(action, result) {\n var warningCondition = false;\n true ? warning(warningCondition, 'This synthetic event is reused for performance reasons. If you\\'re seeing this, ' + 'you\\'re %s `%s` on a released/nullified synthetic event. %s. ' + 'If you must keep the original synthetic event around, use event.persist(). ' + 'See https://fb.me/react-event-pooling for more information.', action, propName, result) : void 0;\n }\n}\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/SyntheticEvent.js\n// module id = 59\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/SyntheticEvent.js?", + ); + + /***/ + }, + /* 60 */ + /* exports provided: default */ + /* exports used: default */ + /*!**********************************!*\ + !*** ./app/enums/DisplayMode.js ***! + \**********************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__libs_utils_Enum__ = __webpack_require__(/*! ../libs/utils/Enum */ 22);\n\n\n/* harmony default export */ __webpack_exports__["a"] = (new __WEBPACK_IMPORTED_MODULE_0__libs_utils_Enum__["a" /* default */]({\n FULL_DETAILS: \'full_details\',\n LIMITED_PREVIEW: \'limited_preview\'\n}));\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/enums/DisplayMode.js\n// module id = 60\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/enums/DisplayMode.js?', + ); + + /***/ + }, + /* 61 */ + /* unknown exports provided */ + /* all exports used */ + /*!**************************************************!*\ + !*** ./app/libs/components/Links/types/index.js ***! + \**************************************************/ + /***/ function (module, exports) { + eval( + '\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/Links/types/index.js\n// module id = 61\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/Links/types/index.js?', + ); + + /***/ + }, + /* 62 */ + /* exports provided: default */ + /* exports used: default */ + /*!***************************************!*\ + !*** ./app/libs/utils/api/apiCall.js ***! + \***************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0____ = __webpack_require__(/*! .. */ 20);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__index__ = __webpack_require__(/*! ./index */ 106);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__routes_api__ = __webpack_require__(/*! ../../routes/api */ 883);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__ajaxRequestTracker__ = __webpack_require__(/*! ./ajaxRequestTracker */ 887);\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = ({\n get: function get(params) {\n return this.callApi('GET', params);\n },\n post: function post(params) {\n return this.callApi('POST', params);\n },\n patch: function patch(params) {\n return this.callApi('PATCH', params);\n },\n put: function put(params) {\n return this.callApi('PUT', params);\n },\n delete: function _delete(params) {\n return this.callApi('DELETE', params);\n },\n callApi: function callApi(method, rawParams) {\n var parsedParams = this.parseRawParams(method, rawParams);\n\n var reqUrl = this.buildReqUrl(parsedParams);\n var reqParams = this.buildReqParams(parsedParams);\n\n var ajaxRequestTracker = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__ajaxRequestTracker__[\"a\" /* default */])();\n\n ajaxRequestTracker.start();\n\n return fetch(reqUrl, reqParams).then(function (res) {\n ajaxRequestTracker.end();\n return res;\n }).then(this.checkResponseStatus).then(this.parseResponse).catch(function (err) {\n ajaxRequestTracker.end();\n throw err;\n });\n },\n parseRawParams: function parseRawParams(method, rawParams) {\n return typeof rawParams === 'string' ? { method: method, url: rawParams } : Object.assign({}, { method: method }, rawParams);\n },\n buildReqUrl: function buildReqUrl(params) {\n return params.remote ? params.url : __WEBPACK_IMPORTED_MODULE_2__routes_api__[\"a\" /* apiRoutes */].apiScope(params.url);\n },\n buildReqParams: function buildReqParams(params) {\n var reqParams = {};\n\n reqParams.method = params.method;\n\n if (params.data) {\n reqParams.body = this.buildReqBody(params.data);\n }\n\n if (!params.remote) {\n reqParams.credentials = 'same-origin';\n reqParams.headers = {\n 'Content-Type': 'application/json',\n 'X-CSRF-Token': __WEBPACK_IMPORTED_MODULE_1__index__[\"a\" /* getCsrfToken */]()\n };\n } else if (params.remote && params.data && __WEBPACK_IMPORTED_MODULE_0____[\"d\" /* isObject */](this.parseImmutableData(params.data))) {\n reqParams.headers = {\n 'Content-Type': 'application/json'\n };\n }\n\n return reqParams;\n },\n buildReqBody: function buildReqBody(data) {\n var reqBody = this.parseImmutableData(data);\n\n return __WEBPACK_IMPORTED_MODULE_0____[\"d\" /* isObject */](reqBody) ? JSON.stringify(reqBody) : reqBody;\n },\n parseImmutableData: function parseImmutableData(data) {\n return typeof data.toJS === 'function' ? data.toJS() : data;\n },\n checkResponseStatus: function checkResponseStatus(response) {\n if (response.ok) return response;\n\n return response.json().then(function (errData) {\n var isBadCsrfToken = response.status === 401 && response.message === 'FnG: Bad Authenticity Token';\n if (isBadCsrfToken) window.location.reload();\n var error = new Error(response.statusText);\n error.isApiError = true;\n error.response = {\n body: errData,\n status: response.status\n };\n throw error;\n });\n },\n parseResponse: function parseResponse(response) {\n return response.status !== 204 ? response.json() : response;\n }\n});\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/utils/api/apiCall.js\n// module id = 62\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/utils/api/apiCall.js?", + ); + + /***/ + }, + /* 63 */ + /* unknown exports provided */ + /* all exports used */ + /*!********************************************!*\ + !*** ./~/core-js/library/modules/_hide.js ***! + \********************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + 'var dP = __webpack_require__(/*! ./_object-dp */ 46)\n , createDesc = __webpack_require__(/*! ./_property-desc */ 112);\nmodule.exports = __webpack_require__(/*! ./_descriptors */ 52) ? function(object, key, value){\n return dP.f(object, key, createDesc(1, value));\n} : function(object, key, value){\n object[key] = value;\n return object;\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_hide.js\n// module id = 63\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/_hide.js?', + ); + + /***/ + }, + /* 64 */ + /* unknown exports provided */ + /* all exports used */ + /*!**************************************************!*\ + !*** ./~/core-js/library/modules/_to-iobject.js ***! + \**************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + '// to indexed object, toObject with fallback for non-array-like ES3 strings\nvar IObject = __webpack_require__(/*! ./_iobject */ 198)\n , defined = __webpack_require__(/*! ./_defined */ 149);\nmodule.exports = function(it){\n return IObject(defined(it));\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_to-iobject.js\n// module id = 64\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/_to-iobject.js?', + ); + + /***/ + }, + /* 65 */ + /* unknown exports provided */ + /* all exports used */ + /*!*************************************!*\ + !*** ./~/dom-helpers/util/inDOM.js ***! + \*************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = !!(typeof window !== 'undefined' && window.document && window.document.createElement);\nmodule.exports = exports['default'];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/dom-helpers/util/inDOM.js\n// module id = 65\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/dom-helpers/util/inDOM.js?", + ); + + /***/ + }, + /* 66 */ + /* unknown exports provided */ + /* all exports used */ + /*!************************************!*\ + !*** ./~/history/lib/PathUtils.js ***! + \************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nexports.__esModule = true;\nexports.createPath = exports.parsePath = exports.getQueryStringValueFromPath = exports.stripQueryStringValueFromPath = exports.addQueryStringValueToPath = undefined;\n\nvar _warning = __webpack_require__(/*! warning */ 23);\n\nvar _warning2 = _interopRequireDefault(_warning);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar addQueryStringValueToPath = exports.addQueryStringValueToPath = function addQueryStringValueToPath(path, key, value) {\n var _parsePath = parsePath(path);\n\n var pathname = _parsePath.pathname;\n var search = _parsePath.search;\n var hash = _parsePath.hash;\n\n\n return createPath({\n pathname: pathname,\n search: search + (search.indexOf('?') === -1 ? '?' : '&') + key + '=' + value,\n hash: hash\n });\n};\n\nvar stripQueryStringValueFromPath = exports.stripQueryStringValueFromPath = function stripQueryStringValueFromPath(path, key) {\n var _parsePath2 = parsePath(path);\n\n var pathname = _parsePath2.pathname;\n var search = _parsePath2.search;\n var hash = _parsePath2.hash;\n\n\n return createPath({\n pathname: pathname,\n search: search.replace(new RegExp('([?&])' + key + '=[a-zA-Z0-9]+(&?)'), function (match, prefix, suffix) {\n return prefix === '?' ? prefix : suffix;\n }),\n hash: hash\n });\n};\n\nvar getQueryStringValueFromPath = exports.getQueryStringValueFromPath = function getQueryStringValueFromPath(path, key) {\n var _parsePath3 = parsePath(path);\n\n var search = _parsePath3.search;\n\n var match = search.match(new RegExp('[?&]' + key + '=([a-zA-Z0-9]+)'));\n return match && match[1];\n};\n\nvar extractPath = function extractPath(string) {\n var match = string.match(/^(https?:)?\\/\\/[^\\/]*/);\n return match == null ? string : string.substring(match[0].length);\n};\n\nvar parsePath = exports.parsePath = function parsePath(path) {\n var pathname = extractPath(path);\n var search = '';\n var hash = '';\n\n true ? (0, _warning2.default)(path === pathname, 'A path must be pathname + search + hash only, not a full URL like \"%s\"', path) : void 0;\n\n var hashIndex = pathname.indexOf('#');\n if (hashIndex !== -1) {\n hash = pathname.substring(hashIndex);\n pathname = pathname.substring(0, hashIndex);\n }\n\n var searchIndex = pathname.indexOf('?');\n if (searchIndex !== -1) {\n search = pathname.substring(searchIndex);\n pathname = pathname.substring(0, searchIndex);\n }\n\n if (pathname === '') pathname = '/';\n\n return {\n pathname: pathname,\n search: search,\n hash: hash\n };\n};\n\nvar createPath = exports.createPath = function createPath(location) {\n if (location == null || typeof location === 'string') return location;\n\n var basename = location.basename;\n var pathname = location.pathname;\n var search = location.search;\n var hash = location.hash;\n\n var path = (basename || '') + pathname;\n\n if (search && search !== '?') path += search;\n\n if (hash) path += hash;\n\n return path;\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/history/lib/PathUtils.js\n// module id = 66\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/history/lib/PathUtils.js?", + ); + + /***/ + }, + /* 67 */ + /* unknown exports provided */ + /* all exports used */ + /*!****************************************!*\ + !*** ./~/react-dom/lib/DOMProperty.js ***! + \****************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar _prodInvariant = __webpack_require__(/*! ./reactProdInvariant */ 17);\n\nvar invariant = __webpack_require__(/*! fbjs/lib/invariant */ 12);\n\nfunction checkMask(value, bitmask) {\n return (value & bitmask) === bitmask;\n}\n\nvar DOMPropertyInjection = {\n /**\n * Mapping from normalized, camelcased property names to a configuration that\n * specifies how the associated DOM property should be accessed or rendered.\n */\n MUST_USE_PROPERTY: 0x1,\n HAS_BOOLEAN_VALUE: 0x4,\n HAS_NUMERIC_VALUE: 0x8,\n HAS_POSITIVE_NUMERIC_VALUE: 0x10 | 0x8,\n HAS_OVERLOADED_BOOLEAN_VALUE: 0x20,\n\n /**\n * Inject some specialized knowledge about the DOM. This takes a config object\n * with the following properties:\n *\n * isCustomAttribute: function that given an attribute name will return true\n * if it can be inserted into the DOM verbatim. Useful for data-* or aria-*\n * attributes where it's impossible to enumerate all of the possible\n * attribute names,\n *\n * Properties: object mapping DOM property name to one of the\n * DOMPropertyInjection constants or null. If your attribute isn't in here,\n * it won't get written to the DOM.\n *\n * DOMAttributeNames: object mapping React attribute name to the DOM\n * attribute name. Attribute names not specified use the **lowercase**\n * normalized name.\n *\n * DOMAttributeNamespaces: object mapping React attribute name to the DOM\n * attribute namespace URL. (Attribute names not specified use no namespace.)\n *\n * DOMPropertyNames: similar to DOMAttributeNames but for DOM properties.\n * Property names not specified use the normalized name.\n *\n * DOMMutationMethods: Properties that require special mutation methods. If\n * `value` is undefined, the mutation method should unset the property.\n *\n * @param {object} domPropertyConfig the config as described above.\n */\n injectDOMPropertyConfig: function (domPropertyConfig) {\n var Injection = DOMPropertyInjection;\n var Properties = domPropertyConfig.Properties || {};\n var DOMAttributeNamespaces = domPropertyConfig.DOMAttributeNamespaces || {};\n var DOMAttributeNames = domPropertyConfig.DOMAttributeNames || {};\n var DOMPropertyNames = domPropertyConfig.DOMPropertyNames || {};\n var DOMMutationMethods = domPropertyConfig.DOMMutationMethods || {};\n\n if (domPropertyConfig.isCustomAttribute) {\n DOMProperty._isCustomAttributeFunctions.push(domPropertyConfig.isCustomAttribute);\n }\n\n for (var propName in Properties) {\n !!DOMProperty.properties.hasOwnProperty(propName) ? true ? invariant(false, 'injectDOMPropertyConfig(...): You\\'re trying to inject DOM property \\'%s\\' which has already been injected. You may be accidentally injecting the same DOM property config twice, or you may be injecting two configs that have conflicting property names.', propName) : _prodInvariant('48', propName) : void 0;\n\n var lowerCased = propName.toLowerCase();\n var propConfig = Properties[propName];\n\n var propertyInfo = {\n attributeName: lowerCased,\n attributeNamespace: null,\n propertyName: propName,\n mutationMethod: null,\n\n mustUseProperty: checkMask(propConfig, Injection.MUST_USE_PROPERTY),\n hasBooleanValue: checkMask(propConfig, Injection.HAS_BOOLEAN_VALUE),\n hasNumericValue: checkMask(propConfig, Injection.HAS_NUMERIC_VALUE),\n hasPositiveNumericValue: checkMask(propConfig, Injection.HAS_POSITIVE_NUMERIC_VALUE),\n hasOverloadedBooleanValue: checkMask(propConfig, Injection.HAS_OVERLOADED_BOOLEAN_VALUE)\n };\n !(propertyInfo.hasBooleanValue + propertyInfo.hasNumericValue + propertyInfo.hasOverloadedBooleanValue <= 1) ? true ? invariant(false, 'DOMProperty: Value can be one of boolean, overloaded boolean, or numeric value, but not a combination: %s', propName) : _prodInvariant('50', propName) : void 0;\n\n if (true) {\n DOMProperty.getPossibleStandardName[lowerCased] = propName;\n }\n\n if (DOMAttributeNames.hasOwnProperty(propName)) {\n var attributeName = DOMAttributeNames[propName];\n propertyInfo.attributeName = attributeName;\n if (true) {\n DOMProperty.getPossibleStandardName[attributeName] = propName;\n }\n }\n\n if (DOMAttributeNamespaces.hasOwnProperty(propName)) {\n propertyInfo.attributeNamespace = DOMAttributeNamespaces[propName];\n }\n\n if (DOMPropertyNames.hasOwnProperty(propName)) {\n propertyInfo.propertyName = DOMPropertyNames[propName];\n }\n\n if (DOMMutationMethods.hasOwnProperty(propName)) {\n propertyInfo.mutationMethod = DOMMutationMethods[propName];\n }\n\n DOMProperty.properties[propName] = propertyInfo;\n }\n }\n};\n\n/* eslint-disable max-len */\nvar ATTRIBUTE_NAME_START_CHAR = ':A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD';\n/* eslint-enable max-len */\n\n/**\n * DOMProperty exports lookup objects that can be used like functions:\n *\n * > DOMProperty.isValid['id']\n * true\n * > DOMProperty.isValid['foobar']\n * undefined\n *\n * Although this may be confusing, it performs better in general.\n *\n * @see http://jsperf.com/key-exists\n * @see http://jsperf.com/key-missing\n */\nvar DOMProperty = {\n\n ID_ATTRIBUTE_NAME: 'data-reactid',\n ROOT_ATTRIBUTE_NAME: 'data-reactroot',\n\n ATTRIBUTE_NAME_START_CHAR: ATTRIBUTE_NAME_START_CHAR,\n ATTRIBUTE_NAME_CHAR: ATTRIBUTE_NAME_START_CHAR + '\\\\-.0-9\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040',\n\n /**\n * Map from property \"standard name\" to an object with info about how to set\n * the property in the DOM. Each object contains:\n *\n * attributeName:\n * Used when rendering markup or with `*Attribute()`.\n * attributeNamespace\n * propertyName:\n * Used on DOM node instances. (This includes properties that mutate due to\n * external factors.)\n * mutationMethod:\n * If non-null, used instead of the property or `setAttribute()` after\n * initial render.\n * mustUseProperty:\n * Whether the property must be accessed and mutated as an object property.\n * hasBooleanValue:\n * Whether the property should be removed when set to a falsey value.\n * hasNumericValue:\n * Whether the property must be numeric or parse as a numeric and should be\n * removed when set to a falsey value.\n * hasPositiveNumericValue:\n * Whether the property must be positive numeric or parse as a positive\n * numeric and should be removed when set to a falsey value.\n * hasOverloadedBooleanValue:\n * Whether the property can be used as a flag as well as with a value.\n * Removed when strictly equal to false; present without a value when\n * strictly equal to true; present with a value otherwise.\n */\n properties: {},\n\n /**\n * Mapping from lowercase property names to the properly cased version, used\n * to warn in the case of missing properties. Available only in __DEV__.\n *\n * autofocus is predefined, because adding it to the property whitelist\n * causes unintended side effects.\n *\n * @type {Object}\n */\n getPossibleStandardName: true ? { autofocus: 'autoFocus' } : null,\n\n /**\n * All of the isCustomAttribute() functions that have been injected.\n */\n _isCustomAttributeFunctions: [],\n\n /**\n * Checks whether a property name is a custom attribute.\n * @method\n */\n isCustomAttribute: function (attributeName) {\n for (var i = 0; i < DOMProperty._isCustomAttributeFunctions.length; i++) {\n var isCustomAttributeFn = DOMProperty._isCustomAttributeFunctions[i];\n if (isCustomAttributeFn(attributeName)) {\n return true;\n }\n }\n return false;\n },\n\n injection: DOMPropertyInjection\n};\n\nmodule.exports = DOMProperty;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/DOMProperty.js\n// module id = 67\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/DOMProperty.js?", + ); + + /***/ + }, + /* 68 */ + /* exports provided: isReactChildren, createRouteFromReactElement, createRoutesFromReactChildren, createRoutes */ + /* exports used: isReactChildren, createRoutes, createRouteFromReactElement */ + /*!*****************************************!*\ + !*** ./~/react-router/es/RouteUtils.js ***! + \*****************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony export (immutable) */ __webpack_exports__["a"] = isReactChildren;\n/* harmony export (immutable) */ __webpack_exports__["c"] = createRouteFromReactElement;\n/* unused harmony export createRoutesFromReactChildren */\n/* harmony export (immutable) */ __webpack_exports__["b"] = createRoutes;\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\n\n\nfunction isValidChild(object) {\n return object == null || __WEBPACK_IMPORTED_MODULE_0_react___default.a.isValidElement(object);\n}\n\nfunction isReactChildren(object) {\n return isValidChild(object) || Array.isArray(object) && object.every(isValidChild);\n}\n\nfunction createRoute(defaultProps, props) {\n return _extends({}, defaultProps, props);\n}\n\nfunction createRouteFromReactElement(element) {\n var type = element.type;\n var route = createRoute(type.defaultProps, element.props);\n\n if (route.children) {\n var childRoutes = createRoutesFromReactChildren(route.children, route);\n\n if (childRoutes.length) route.childRoutes = childRoutes;\n\n delete route.children;\n }\n\n return route;\n}\n\n/**\n * Creates and returns a routes object from the given ReactChildren. JSX\n * provides a convenient way to visualize how routes in the hierarchy are\n * nested.\n *\n * import { Route, createRoutesFromReactChildren } from \'react-router\'\n *\n * const routes = createRoutesFromReactChildren(\n * <Route component={App}>\n * <Route path="home" component={Dashboard}/>\n * <Route path="news" component={NewsFeed}/>\n * </Route>\n * )\n *\n * Note: This method is automatically used when you provide <Route> children\n * to a <Router> component.\n */\nfunction createRoutesFromReactChildren(children, parentRoute) {\n var routes = [];\n\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.Children.forEach(children, function (element) {\n if (__WEBPACK_IMPORTED_MODULE_0_react___default.a.isValidElement(element)) {\n // Component classes may have a static create* method.\n if (element.type.createRouteFromReactElement) {\n var route = element.type.createRouteFromReactElement(element, parentRoute);\n\n if (route) routes.push(route);\n } else {\n routes.push(createRouteFromReactElement(element));\n }\n }\n });\n\n return routes;\n}\n\n/**\n * Creates and returns an array of routes from the given object which\n * may be a JSX route, a plain object route, or an array of either.\n */\nfunction createRoutes(routes) {\n if (isReactChildren(routes)) {\n routes = createRoutesFromReactChildren(routes);\n } else if (routes && !Array.isArray(routes)) {\n routes = [routes];\n }\n\n return routes;\n}\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-router/es/RouteUtils.js\n// module id = 68\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-router/es/RouteUtils.js?', + ); + + /***/ + }, + /* 69 */ + /* exports provided: default */ + /* exports used: default */ + /*!**********************************!*\ + !*** ./app/enums/PrivacyMode.js ***! + \**********************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__libs_utils_Enum__ = __webpack_require__(/*! ../libs/utils/Enum */ 22);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__libs_components_icons_IconPublic__ = __webpack_require__(/*! ../libs/components/icons/IconPublic */ 870);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__libs_components_icons_IconPrivate__ = __webpack_require__(/*! ../libs/components/icons/IconPrivate */ 141);\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (new __WEBPACK_IMPORTED_MODULE_0__libs_utils_Enum__[\"a\" /* default */]({\n PUBLIC: {\n value: 'public',\n label: 'Public access',\n note: 'Visible to everyone and highlighted to your Facebook friends and guest list members.',\n Icon: __WEBPACK_IMPORTED_MODULE_1__libs_components_icons_IconPublic__[\"a\" /* default */],\n iconClassName: 'publicIcon'\n },\n PRIVATE: {\n value: 'private',\n label: 'Private access',\n note: 'Hidden from strangers. Limited information for your Facebook friends. Full information for your curated guest lists.',\n Icon: __WEBPACK_IMPORTED_MODULE_2__libs_components_icons_IconPrivate__[\"a\" /* default */],\n iconClassName: 'privateIcon'\n }\n}));\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/enums/PrivacyMode.js\n// module id = 69\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/enums/PrivacyMode.js?", + ); + + /***/ + }, + /* 70 */ + /* exports provided: default */ + /* exports used: default */ + /*!*******************************!*\ + !*** ./app/enums/RoomType.js ***! + \*******************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__libs_utils_Enum__ = __webpack_require__(/*! ../libs/utils/Enum */ 22);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__libs_components_icons_IconHome__ = __webpack_require__(/*! ../libs/components/icons/IconHome */ 306);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__libs_components_icons_IconPrivateRoom__ = __webpack_require__(/*! ../libs/components/icons/IconPrivateRoom */ 869);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__libs_components_icons_IconSharedRoom__ = __webpack_require__(/*! ../libs/components/icons/IconSharedRoom */ 872);\n\n\n\n\n\n\n// Values must be in sync with app/models/listing.rb ROOM_TYPES\n// Keep in mind that we are disabling `bedrooms` select if RoomType value is not ENTIRE_HOME\n/* harmony default export */ __webpack_exports__[\"a\"] = (new __WEBPACK_IMPORTED_MODULE_0__libs_utils_Enum__[\"a\" /* default */]({\n ENTIRE_HOME: {\n label: 'Entire home/apt',\n value: 'entire_home',\n Icon: __WEBPACK_IMPORTED_MODULE_1__libs_components_icons_IconHome__[\"a\" /* default */],\n iconClassName: 'entireHomeIcon'\n },\n PRIVATE_ROOM: {\n label: 'Private room',\n value: 'private_room',\n Icon: __WEBPACK_IMPORTED_MODULE_2__libs_components_icons_IconPrivateRoom__[\"a\" /* default */],\n iconClassName: 'privateRoomIcon'\n },\n SHARED_ROOM: {\n label: 'Shared room',\n value: 'shared_room',\n Icon: __WEBPACK_IMPORTED_MODULE_3__libs_components_icons_IconSharedRoom__[\"a\" /* default */],\n iconClassName: 'sharedRoomIcon'\n }\n}));\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/enums/RoomType.js\n// module id = 70\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/enums/RoomType.js?", + ); + + /***/ + }, + /* 71 */ + /* exports provided: default */ + /* all exports used */ + /*!******************************************************************!*\ + !*** ./app/libs/components/DropdownLEGACY/withDropdownState.jsx ***! + \******************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + 'Object.defineProperty(__webpack_exports__, "__esModule", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_dom__ = __webpack_require__(/*! ../../utils/dom */ 44);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\n\n\n\n\n/*\n * Use `withStopPropagation` prop,\n * if you have controlled radio buttons or checkboxes\n * inside dropdown dialog.\n * This is needed, b/c we can\'t prevent default this event,\n * b/c of React issue.\n *\n * More details: https://github.com/facebook/react/issues/4930\n *\n */\nvar babelPluginFlowReactPropTypes_proptype_DomEvent = __webpack_require__(/*! ../../../types */ 4).babelPluginFlowReactPropTypes_proptype_DomEvent || __webpack_require__(/*! react */ 1).PropTypes.any;\n\nvar withDropdownState = function withDropdownState(Dropdown) {\n var _class, _temp;\n\n return _temp = _class = function (_React$Component) {\n _inherits(_class, _React$Component);\n\n function _class() {\n var _ref;\n\n _classCallCheck(this, _class);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n var _this = _possibleConstructorReturn(this, (_ref = _class.__proto__ || Object.getPrototypeOf(_class)).call.apply(_ref, [this].concat(args)));\n\n _this.handleInternalClick = function (event) {\n var withStopPropagation = _this.props.withStopPropagation;\n\n\n if (withStopPropagation) {\n event.stopPropagation();\n } else {\n event.preventDefault();\n }\n };\n\n _this.toggleVisibility = function (event) {\n _this.handleInternalClick(event);\n _this.setState({ isVisible: !_this.state.isVisible });\n };\n\n _this.hideDropdown = function () {\n _this.setState({ isVisible: false });\n };\n\n _this.hideDropdownOnClickOutside = function (event) {\n // TODO: Handle multiple dropdowns on same screen\n if (event.defaultPrevented) return;\n _this.hideDropdown();\n };\n\n _this.hideDropdownOnEscKey = function (event) {\n __WEBPACK_IMPORTED_MODULE_2__utils_dom__["e" /* onEscKey */](event, _this.hideDropdown);\n };\n\n _this.state = { isVisible: false };\n return _this;\n }\n\n _createClass(_class, [{\n key: \'componentDidMount\',\n value: function componentDidMount() {\n window.addEventListener(\'click\', this.hideDropdownOnClickOutside, false);\n window.addEventListener(\'keydown\', this.hideDropdownOnEscKey, false);\n }\n }, {\n key: \'componentWillUnmount\',\n value: function componentWillUnmount() {\n window.removeEventListener(\'click\', this.hideDropdownOnClickOutside, false);\n window.removeEventListener(\'keydown\', this.hideDropdownOnEscKey, false);\n }\n\n // $FlowFixMe\n\n }, {\n key: \'render\',\n value: function render() {\n // eslint-disable-next-line no-unused-vars\n var _props = this.props,\n withStopPropagation = _props.withStopPropagation,\n otherProps = _objectWithoutProperties(_props, [\'withStopPropagation\']);\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(Dropdown, _extends({}, otherProps, this.state, {\n toggleVisibility: this.toggleVisibility,\n hideDropdown: this.hideDropdown,\n handleInternalClick: this.handleInternalClick\n }));\n }\n }]);\n\n return _class;\n }(__WEBPACK_IMPORTED_MODULE_0_react___default.a.Component), _class.propTypes = {\n withStopPropagation: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool\n }, _temp;\n};\n\n/* harmony default export */ __webpack_exports__["default"] = (withDropdownState);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/DropdownLEGACY/withDropdownState.jsx\n// module id = 71\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/DropdownLEGACY/withDropdownState.jsx?', + ); + + /***/ + }, + /* 72 */ + /* unknown exports provided */ + /* all exports used */ + /*!*************************************************!*\ + !*** ./~/core-js/library/modules/_an-object.js ***! + \*************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "var isObject = __webpack_require__(/*! ./_is-object */ 75);\nmodule.exports = function(it){\n if(!isObject(it))throw TypeError(it + ' is not an object!');\n return it;\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_an-object.js\n// module id = 72\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/_an-object.js?", + ); + + /***/ + }, + /* 73 */ + /* unknown exports provided */ + /* all exports used */ + /*!*********************************************!*\ + !*** ./~/core-js/library/modules/_fails.js ***! + \*********************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = function(exec){\n try {\n return !!exec();\n } catch(e){\n return true;\n }\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_fails.js\n// module id = 73\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/_fails.js?', + ); + + /***/ + }, + /* 74 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************************!*\ + !*** ./~/core-js/library/modules/_has.js ***! + \*******************************************/ + /***/ function (module, exports) { + eval( + 'var hasOwnProperty = {}.hasOwnProperty;\nmodule.exports = function(it, key){\n return hasOwnProperty.call(it, key);\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_has.js\n// module id = 74\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/_has.js?', + ); + + /***/ + }, + /* 75 */ + /* unknown exports provided */ + /* all exports used */ + /*!*************************************************!*\ + !*** ./~/core-js/library/modules/_is-object.js ***! + \*************************************************/ + /***/ function (module, exports) { + eval( + "module.exports = function(it){\n return typeof it === 'object' ? it !== null : typeof it === 'function';\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_is-object.js\n// module id = 75\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/_is-object.js?", + ); + + /***/ + }, + /* 76 */ + /* unknown exports provided */ + /* all exports used */ + /*!***************************************************!*\ + !*** ./~/core-js/library/modules/_object-keys.js ***! + \***************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + '// 19.1.2.14 / 15.2.3.14 Object.keys(O)\nvar $keys = __webpack_require__(/*! ./_object-keys-internal */ 327)\n , enumBugKeys = __webpack_require__(/*! ./_enum-bug-keys */ 196);\n\nmodule.exports = Object.keys || function keys(O){\n return $keys(O, enumBugKeys);\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_object-keys.js\n// module id = 76\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/_object-keys.js?', + ); + + /***/ + }, + /* 77 */ + /* unknown exports provided */ + /* all exports used */ + /*!***************************!*\ + !*** ./~/lodash/_root.js ***! + \***************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "var freeGlobal = __webpack_require__(/*! ./_freeGlobal */ 1174);\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/_root.js\n// module id = 77\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/lodash/_root.js?", + ); + + /***/ + }, + /* 78 */ + /* unknown exports provided */ + /* all exports used */ + /*!****************************************!*\ + !*** ./~/react-dom/lib/PooledClass.js ***! + \****************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * \n */\n\n\n\nvar _prodInvariant = __webpack_require__(/*! ./reactProdInvariant */ 17);\n\nvar invariant = __webpack_require__(/*! fbjs/lib/invariant */ 12);\n\n/**\n * Static poolers. Several custom versions for each potential number of\n * arguments. A completely generic pooler is easy to implement, but would\n * require accessing the `arguments` object. In each of these, `this` refers to\n * the Class itself, not an instance. If any others are needed, simply add them\n * here, or in their own files.\n */\nvar oneArgumentPooler = function (copyFieldsFrom) {\n var Klass = this;\n if (Klass.instancePool.length) {\n var instance = Klass.instancePool.pop();\n Klass.call(instance, copyFieldsFrom);\n return instance;\n } else {\n return new Klass(copyFieldsFrom);\n }\n};\n\nvar twoArgumentPooler = function (a1, a2) {\n var Klass = this;\n if (Klass.instancePool.length) {\n var instance = Klass.instancePool.pop();\n Klass.call(instance, a1, a2);\n return instance;\n } else {\n return new Klass(a1, a2);\n }\n};\n\nvar threeArgumentPooler = function (a1, a2, a3) {\n var Klass = this;\n if (Klass.instancePool.length) {\n var instance = Klass.instancePool.pop();\n Klass.call(instance, a1, a2, a3);\n return instance;\n } else {\n return new Klass(a1, a2, a3);\n }\n};\n\nvar fourArgumentPooler = function (a1, a2, a3, a4) {\n var Klass = this;\n if (Klass.instancePool.length) {\n var instance = Klass.instancePool.pop();\n Klass.call(instance, a1, a2, a3, a4);\n return instance;\n } else {\n return new Klass(a1, a2, a3, a4);\n }\n};\n\nvar standardReleaser = function (instance) {\n var Klass = this;\n !(instance instanceof Klass) ? true ? invariant(false, 'Trying to release an instance into a pool of a different type.') : _prodInvariant('25') : void 0;\n instance.destructor();\n if (Klass.instancePool.length < Klass.poolSize) {\n Klass.instancePool.push(instance);\n }\n};\n\nvar DEFAULT_POOL_SIZE = 10;\nvar DEFAULT_POOLER = oneArgumentPooler;\n\n/**\n * Augments `CopyConstructor` to be a poolable class, augmenting only the class\n * itself (statically) not adding any prototypical fields. Any CopyConstructor\n * you give this may have a `poolSize` property, and will look for a\n * prototypical `destructor` on instances.\n *\n * @param {Function} CopyConstructor Constructor that can be used to reset.\n * @param {Function} pooler Customizable pooler.\n */\nvar addPoolingTo = function (CopyConstructor, pooler) {\n // Casting as any so that flow ignores the actual implementation and trusts\n // it to match the type we declared\n var NewKlass = CopyConstructor;\n NewKlass.instancePool = [];\n NewKlass.getPooled = pooler || DEFAULT_POOLER;\n if (!NewKlass.poolSize) {\n NewKlass.poolSize = DEFAULT_POOL_SIZE;\n }\n NewKlass.release = standardReleaser;\n return NewKlass;\n};\n\nvar PooledClass = {\n addPoolingTo: addPoolingTo,\n oneArgumentPooler: oneArgumentPooler,\n twoArgumentPooler: twoArgumentPooler,\n threeArgumentPooler: threeArgumentPooler,\n fourArgumentPooler: fourArgumentPooler\n};\n\nmodule.exports = PooledClass;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/PooledClass.js\n// module id = 78\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/PooledClass.js?", + ); + + /***/ + }, + /* 79 */ + /* unknown exports provided */ + /* all exports used */ + /*!********************************************!*\ + !*** ./~/react-dom/lib/ReactReconciler.js ***! + \********************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar ReactRef = __webpack_require__(/*! ./ReactRef */ 1356);\nvar ReactInstrumentation = __webpack_require__(/*! ./ReactInstrumentation */ 35);\n\nvar warning = __webpack_require__(/*! fbjs/lib/warning */ 13);\n\n/**\n * Helper to call ReactRef.attachRefs with this composite component, split out\n * to avoid allocations in the transaction mount-ready queue.\n */\nfunction attachRefs() {\n ReactRef.attachRefs(this, this._currentElement);\n}\n\nvar ReactReconciler = {\n\n /**\n * Initializes the component, renders markup, and registers event listeners.\n *\n * @param {ReactComponent} internalInstance\n * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction\n * @param {?object} the containing host component instance\n * @param {?object} info about the host container\n * @return {?string} Rendered markup to be inserted into the DOM.\n * @final\n * @internal\n */\n mountComponent: function (internalInstance, transaction, hostParent, hostContainerInfo, context, parentDebugID // 0 in production and for roots\n ) {\n if (true) {\n if (internalInstance._debugID !== 0) {\n ReactInstrumentation.debugTool.onBeforeMountComponent(internalInstance._debugID, internalInstance._currentElement, parentDebugID);\n }\n }\n var markup = internalInstance.mountComponent(transaction, hostParent, hostContainerInfo, context, parentDebugID);\n if (internalInstance._currentElement && internalInstance._currentElement.ref != null) {\n transaction.getReactMountReady().enqueue(attachRefs, internalInstance);\n }\n if (true) {\n if (internalInstance._debugID !== 0) {\n ReactInstrumentation.debugTool.onMountComponent(internalInstance._debugID);\n }\n }\n return markup;\n },\n\n /**\n * Returns a value that can be passed to\n * ReactComponentEnvironment.replaceNodeWithMarkup.\n */\n getHostNode: function (internalInstance) {\n return internalInstance.getHostNode();\n },\n\n /**\n * Releases any resources allocated by `mountComponent`.\n *\n * @final\n * @internal\n */\n unmountComponent: function (internalInstance, safely) {\n if (true) {\n if (internalInstance._debugID !== 0) {\n ReactInstrumentation.debugTool.onBeforeUnmountComponent(internalInstance._debugID);\n }\n }\n ReactRef.detachRefs(internalInstance, internalInstance._currentElement);\n internalInstance.unmountComponent(safely);\n if (true) {\n if (internalInstance._debugID !== 0) {\n ReactInstrumentation.debugTool.onUnmountComponent(internalInstance._debugID);\n }\n }\n },\n\n /**\n * Update a component using a new element.\n *\n * @param {ReactComponent} internalInstance\n * @param {ReactElement} nextElement\n * @param {ReactReconcileTransaction} transaction\n * @param {object} context\n * @internal\n */\n receiveComponent: function (internalInstance, nextElement, transaction, context) {\n var prevElement = internalInstance._currentElement;\n\n if (nextElement === prevElement && context === internalInstance._context) {\n // Since elements are immutable after the owner is rendered,\n // we can do a cheap identity compare here to determine if this is a\n // superfluous reconcile. It's possible for state to be mutable but such\n // change should trigger an update of the owner which would recreate\n // the element. We explicitly check for the existence of an owner since\n // it's possible for an element created outside a composite to be\n // deeply mutated and reused.\n\n // TODO: Bailing out early is just a perf optimization right?\n // TODO: Removing the return statement should affect correctness?\n return;\n }\n\n if (true) {\n if (internalInstance._debugID !== 0) {\n ReactInstrumentation.debugTool.onBeforeUpdateComponent(internalInstance._debugID, nextElement);\n }\n }\n\n var refsChanged = ReactRef.shouldUpdateRefs(prevElement, nextElement);\n\n if (refsChanged) {\n ReactRef.detachRefs(internalInstance, prevElement);\n }\n\n internalInstance.receiveComponent(nextElement, transaction, context);\n\n if (refsChanged && internalInstance._currentElement && internalInstance._currentElement.ref != null) {\n transaction.getReactMountReady().enqueue(attachRefs, internalInstance);\n }\n\n if (true) {\n if (internalInstance._debugID !== 0) {\n ReactInstrumentation.debugTool.onUpdateComponent(internalInstance._debugID);\n }\n }\n },\n\n /**\n * Flush any dirty changes in a component.\n *\n * @param {ReactComponent} internalInstance\n * @param {ReactReconcileTransaction} transaction\n * @internal\n */\n performUpdateIfNecessary: function (internalInstance, transaction, updateBatchNumber) {\n if (internalInstance._updateBatchNumber !== updateBatchNumber) {\n // The component's enqueued batch number should always be the current\n // batch or the following one.\n true ? warning(internalInstance._updateBatchNumber == null || internalInstance._updateBatchNumber === updateBatchNumber + 1, 'performUpdateIfNecessary: Unexpected batch number (current %s, ' + 'pending %s)', updateBatchNumber, internalInstance._updateBatchNumber) : void 0;\n return;\n }\n if (true) {\n if (internalInstance._debugID !== 0) {\n ReactInstrumentation.debugTool.onBeforeUpdateComponent(internalInstance._debugID, internalInstance._currentElement);\n }\n }\n internalInstance.performUpdateIfNecessary(transaction);\n if (true) {\n if (internalInstance._debugID !== 0) {\n ReactInstrumentation.debugTool.onUpdateComponent(internalInstance._debugID);\n }\n }\n }\n\n};\n\nmodule.exports = ReactReconciler;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/ReactReconciler.js\n// module id = 79\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/ReactReconciler.js?", + ); + + /***/ + }, + /* 80 */ + /* unknown exports provided */ + /* all exports used */ + /*!***********************************************!*\ + !*** ./~/react-moment-proptypes/src/index.js ***! + \***********************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "var moment = __webpack_require__(/*! moment */ 3);\nvar momentValidationWrapper = __webpack_require__(/*! ./moment-validation-wrapper */ 1423);\n\nmoment.createFromInputFallback = function(config) {\n config._d = new Date(config._i);\n};\n\nvar ANONYMOUS = '<<anonymous>>';\n\nvar ReactPropTypeLocationNames = {\n prop : 'prop',\n context : 'context',\n childContext : 'child context',\n};\n\nfunction createMomentChecker(type, typeValidator, validator, momentType) {\n\n function propValidator(\n isRequired, // Bound parameter to indicate with the propType is required\n predicate, // Bound parameter to allow user to add dynamic validation\n props,\n propName,\n componentName,\n location,\n propFullName\n ) {\n if (isRequired) {\n var locationName = ReactPropTypeLocationNames[ location ];\n componentName = componentName || ANONYMOUS;\n propFullName = propFullName || propName;\n if (!props.hasOwnProperty(propName)) {\n return new Error(\n 'Required ' + locationName + ' `' + propFullName +\n '` was not specified in `' +\n componentName + '`.'\n );\n }\n }\n\n var propValue = props[ propName ];\n var propType = typeof propValue;\n\n if (typeof propValue === 'undefined' || propValue === null) {\n return null;\n }\n\n if (typeValidator && !typeValidator(propValue)) {\n return new Error(\n 'Invalid input type: `' + propName + '` of type `' + propType + '` ' +\n 'supplied to `' + componentName + '`, expected `' + type + '`.'\n );\n }\n\n if (! validator(propValue)) {\n return new Error(\n 'Invalid ' + location + ' `' + propName + '` of type `' + propType + '` ' +\n 'supplied to `' + componentName + '`, expected `' + momentType + '`.'\n );\n }\n\n if (predicate && ! predicate(propValue)) {\n var predicateName = predicate.name || ANONYMOUS;\n return new Error(\n 'Invalid ' + location + ' `' + propName + '` of type `' + propType + '` ' +\n 'supplied to `' + componentName + '`. Failed to succeed with predicate `' +\n predicateName + '`.'\n );\n }\n\n return null;\n\n }\n\n var requiredPropValidator = propValidator.bind(null, false, null);\n requiredPropValidator.isRequired = propValidator.bind(null, true, null);\n requiredPropValidator.withPredicate = function predicateApplication(predicate) {\n if (typeof predicate !== 'function') {\n throw new Error('`predicate` must be a function');\n }\n var basePropValidator = propValidator.bind(null, false, predicate);\n basePropValidator.isRequired = propValidator.bind(null, true, predicate);\n return basePropValidator;\n };\n\n return requiredPropValidator;\n\n}\n\nmodule.exports = {\n\n momentObj : createMomentChecker(\n 'object',\n function(obj) {\n return typeof obj === 'object';\n },\n function isValid(value) {\n return momentValidationWrapper.isValidMoment(value);\n },\n 'Moment'\n ),\n\n momentString : createMomentChecker(\n 'string',\n function(str) {\n return typeof str === 'string';\n },\n function isValid(value) {\n return momentValidationWrapper.isValidMoment(moment(value));\n },\n 'Moment'\n ),\n\n momentDurationObj : createMomentChecker(\n 'object',\n function(obj) {\n return typeof obj === 'object';\n },\n function isValid(value) {\n return moment.isDuration(value);\n },\n 'Duration'\n ),\n\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-moment-proptypes/src/index.js\n// module id = 80\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-moment-proptypes/src/index.js?", + ); + + /***/ + }, + /* 81 */ + /* exports provided: Provider, connectAdvanced, connect */ + /* exports used: connect, Provider */ + /*!***********************************!*\ + !*** ./~/react-redux/es/index.js ***! + \***********************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__components_Provider__ = __webpack_require__(/*! ./components/Provider */ 1439);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__components_connectAdvanced__ = __webpack_require__(/*! ./components/connectAdvanced */ 571);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__connect_connect__ = __webpack_require__(/*! ./connect/connect */ 1440);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_0__components_Provider__["a"]; });\n/* unused harmony reexport connectAdvanced */\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_2__connect_connect__["a"]; });\n\n\n\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-redux/es/index.js\n// module id = 81\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-redux/es/index.js?', + ); + + /***/ + }, + /* 82 */ + /* exports provided: Router, Link, IndexLink, withRouter, IndexRedirect, IndexRoute, Redirect, Route, createRoutes, RouterContext, locationShape, routerShape, match, useRouterHistory, formatPattern, applyRouterMiddleware, browserHistory, hashHistory, createMemoryHistory */ + /* exports used: Link, useRouterHistory, Router, RouterContext, match, Route */ + /*!************************************!*\ + !*** ./~/react-router/es/index.js ***! + \************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Router__ = __webpack_require__(/*! ./Router */ 1452);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return __WEBPACK_IMPORTED_MODULE_0__Router__["a"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Link__ = __webpack_require__(/*! ./Link */ 575);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_1__Link__["a"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__IndexLink__ = __webpack_require__(/*! ./IndexLink */ 1448);\n/* unused harmony reexport IndexLink */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__withRouter__ = __webpack_require__(/*! ./withRouter */ 1463);\n/* unused harmony reexport withRouter */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__IndexRedirect__ = __webpack_require__(/*! ./IndexRedirect */ 1449);\n/* unused harmony reexport IndexRedirect */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__IndexRoute__ = __webpack_require__(/*! ./IndexRoute */ 1450);\n/* unused harmony reexport IndexRoute */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__Redirect__ = __webpack_require__(/*! ./Redirect */ 577);\n/* unused harmony reexport Redirect */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__Route__ = __webpack_require__(/*! ./Route */ 1451);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return __WEBPACK_IMPORTED_MODULE_7__Route__["a"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__RouteUtils__ = __webpack_require__(/*! ./RouteUtils */ 68);\n/* unused harmony reexport createRoutes */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__RouterContext__ = __webpack_require__(/*! ./RouterContext */ 269);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return __WEBPACK_IMPORTED_MODULE_9__RouterContext__["a"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__PropTypes__ = __webpack_require__(/*! ./PropTypes */ 268);\n/* unused harmony reexport locationShape */\n/* unused harmony reexport routerShape */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__match__ = __webpack_require__(/*! ./match */ 1461);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return __WEBPACK_IMPORTED_MODULE_11__match__["a"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__useRouterHistory__ = __webpack_require__(/*! ./useRouterHistory */ 582);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_12__useRouterHistory__["a"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__PatternUtils__ = __webpack_require__(/*! ./PatternUtils */ 101);\n/* unused harmony reexport formatPattern */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__applyRouterMiddleware__ = __webpack_require__(/*! ./applyRouterMiddleware */ 1454);\n/* unused harmony reexport applyRouterMiddleware */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__browserHistory__ = __webpack_require__(/*! ./browserHistory */ 1455);\n/* unused harmony reexport browserHistory */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__hashHistory__ = __webpack_require__(/*! ./hashHistory */ 1459);\n/* unused harmony reexport hashHistory */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__createMemoryHistory__ = __webpack_require__(/*! ./createMemoryHistory */ 579);\n/* unused harmony reexport createMemoryHistory */\n/* components */\n\n\n\n\n\n\n\n\n\n/* components (configuration) */\n\n\n\n\n\n\n\n\n\n\n/* utils */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/* histories */\n\n\n\n\n\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-router/es/index.js\n// module id = 82\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-router/es/index.js?', + ); + + /***/ + }, + /* 83 */ + /* unknown exports provided */ + /* all exports used */ + /*!******************************!*\ + !*** ./~/react/lib/React.js ***! + \******************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar _assign = __webpack_require__(/*! object-assign */ 21);\n\nvar ReactChildren = __webpack_require__(/*! ./ReactChildren */ 1472);\nvar ReactComponent = __webpack_require__(/*! ./ReactComponent */ 270);\nvar ReactPureComponent = __webpack_require__(/*! ./ReactPureComponent */ 1476);\nvar ReactClass = __webpack_require__(/*! ./ReactClass */ 1473);\nvar ReactDOMFactories = __webpack_require__(/*! ./ReactDOMFactories */ 1474);\nvar ReactElement = __webpack_require__(/*! ./ReactElement */ 84);\nvar ReactPropTypes = __webpack_require__(/*! ./ReactPropTypes */ 1475);\nvar ReactVersion = __webpack_require__(/*! ./ReactVersion */ 1477);\n\nvar onlyChild = __webpack_require__(/*! ./onlyChild */ 1479);\nvar warning = __webpack_require__(/*! fbjs/lib/warning */ 13);\n\nvar createElement = ReactElement.createElement;\nvar createFactory = ReactElement.createFactory;\nvar cloneElement = ReactElement.cloneElement;\n\nif (true) {\n var ReactElementValidator = __webpack_require__(/*! ./ReactElementValidator */ 584);\n createElement = ReactElementValidator.createElement;\n createFactory = ReactElementValidator.createFactory;\n cloneElement = ReactElementValidator.cloneElement;\n}\n\nvar __spread = _assign;\n\nif (true) {\n var warned = false;\n __spread = function () {\n true ? warning(warned, 'React.__spread is deprecated and should not be used. Use ' + 'Object.assign directly or another helper function with similar ' + 'semantics. You may be seeing this warning due to your compiler. ' + 'See https://fb.me/react-spread-deprecation for more details.') : void 0;\n warned = true;\n return _assign.apply(null, arguments);\n };\n}\n\nvar React = {\n\n // Modern\n\n Children: {\n map: ReactChildren.map,\n forEach: ReactChildren.forEach,\n count: ReactChildren.count,\n toArray: ReactChildren.toArray,\n only: onlyChild\n },\n\n Component: ReactComponent,\n PureComponent: ReactPureComponent,\n\n createElement: createElement,\n cloneElement: cloneElement,\n isValidElement: ReactElement.isValidElement,\n\n // Classic\n\n PropTypes: ReactPropTypes,\n createClass: ReactClass.createClass,\n createFactory: createFactory,\n createMixin: function (mixin) {\n // Currently a noop. Will be used to validate and trace mixins.\n return mixin;\n },\n\n // This looks DOM specific but these are actually isomorphic helpers\n // since they are just generating DOM strings.\n DOM: ReactDOMFactories,\n\n version: ReactVersion,\n\n // Deprecated hook for JSX spread, don't use this for anything.\n __spread: __spread\n};\n\nmodule.exports = React;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react/lib/React.js\n// module id = 83\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react/lib/React.js?", + ); + + /***/ + }, + /* 84 */ + /* unknown exports provided */ + /* all exports used */ + /*!*************************************!*\ + !*** ./~/react/lib/ReactElement.js ***! + \*************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2014-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar _assign = __webpack_require__(/*! object-assign */ 21);\n\nvar ReactCurrentOwner = __webpack_require__(/*! ./ReactCurrentOwner */ 55);\n\nvar warning = __webpack_require__(/*! fbjs/lib/warning */ 13);\nvar canDefineProperty = __webpack_require__(/*! ./canDefineProperty */ 273);\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nvar REACT_ELEMENT_TYPE = __webpack_require__(/*! ./ReactElementSymbol */ 583);\n\nvar RESERVED_PROPS = {\n key: true,\n ref: true,\n __self: true,\n __source: true\n};\n\nvar specialPropKeyWarningShown, specialPropRefWarningShown;\n\nfunction hasValidRef(config) {\n if (true) {\n if (hasOwnProperty.call(config, 'ref')) {\n var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;\n if (getter && getter.isReactWarning) {\n return false;\n }\n }\n }\n return config.ref !== undefined;\n}\n\nfunction hasValidKey(config) {\n if (true) {\n if (hasOwnProperty.call(config, 'key')) {\n var getter = Object.getOwnPropertyDescriptor(config, 'key').get;\n if (getter && getter.isReactWarning) {\n return false;\n }\n }\n }\n return config.key !== undefined;\n}\n\nfunction defineKeyPropWarningGetter(props, displayName) {\n var warnAboutAccessingKey = function () {\n if (!specialPropKeyWarningShown) {\n specialPropKeyWarningShown = true;\n true ? warning(false, '%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName) : void 0;\n }\n };\n warnAboutAccessingKey.isReactWarning = true;\n Object.defineProperty(props, 'key', {\n get: warnAboutAccessingKey,\n configurable: true\n });\n}\n\nfunction defineRefPropWarningGetter(props, displayName) {\n var warnAboutAccessingRef = function () {\n if (!specialPropRefWarningShown) {\n specialPropRefWarningShown = true;\n true ? warning(false, '%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName) : void 0;\n }\n };\n warnAboutAccessingRef.isReactWarning = true;\n Object.defineProperty(props, 'ref', {\n get: warnAboutAccessingRef,\n configurable: true\n });\n}\n\n/**\n * Factory method to create a new React element. This no longer adheres to\n * the class pattern, so do not use new to call it. Also, no instanceof check\n * will work. Instead test $$typeof field against Symbol.for('react.element') to check\n * if something is a React Element.\n *\n * @param {*} type\n * @param {*} key\n * @param {string|object} ref\n * @param {*} self A *temporary* helper to detect places where `this` is\n * different from the `owner` when React.createElement is called, so that we\n * can warn. We want to get rid of owner and replace string `ref`s with arrow\n * functions, and as long as `this` and owner are the same, there will be no\n * change in behavior.\n * @param {*} source An annotation object (added by a transpiler or otherwise)\n * indicating filename, line number, and/or other information.\n * @param {*} owner\n * @param {*} props\n * @internal\n */\nvar ReactElement = function (type, key, ref, self, source, owner, props) {\n var element = {\n // This tag allow us to uniquely identify this as a React Element\n $$typeof: REACT_ELEMENT_TYPE,\n\n // Built-in properties that belong on the element\n type: type,\n key: key,\n ref: ref,\n props: props,\n\n // Record the component responsible for creating this element.\n _owner: owner\n };\n\n if (true) {\n // The validation flag is currently mutative. We put it on\n // an external backing store so that we can freeze the whole object.\n // This can be replaced with a WeakMap once they are implemented in\n // commonly used development environments.\n element._store = {};\n\n // To make comparing ReactElements easier for testing purposes, we make\n // the validation flag non-enumerable (where possible, which should\n // include every environment we run tests in), so the test framework\n // ignores it.\n if (canDefineProperty) {\n Object.defineProperty(element._store, 'validated', {\n configurable: false,\n enumerable: false,\n writable: true,\n value: false\n });\n // self and source are DEV only properties.\n Object.defineProperty(element, '_self', {\n configurable: false,\n enumerable: false,\n writable: false,\n value: self\n });\n // Two elements created in two different places should be considered\n // equal for testing purposes and therefore we hide it from enumeration.\n Object.defineProperty(element, '_source', {\n configurable: false,\n enumerable: false,\n writable: false,\n value: source\n });\n } else {\n element._store.validated = false;\n element._self = self;\n element._source = source;\n }\n if (Object.freeze) {\n Object.freeze(element.props);\n Object.freeze(element);\n }\n }\n\n return element;\n};\n\n/**\n * Create and return a new ReactElement of the given type.\n * See https://facebook.github.io/react/docs/top-level-api.html#react.createelement\n */\nReactElement.createElement = function (type, config, children) {\n var propName;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n if (true) {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n if (true) {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n};\n\n/**\n * Return a function that produces ReactElements of a given type.\n * See https://facebook.github.io/react/docs/top-level-api.html#react.createfactory\n */\nReactElement.createFactory = function (type) {\n var factory = ReactElement.createElement.bind(null, type);\n // Expose the type on the factory and the prototype so that it can be\n // easily accessed on elements. E.g. `<Foo />.type === Foo`.\n // This should not be named `constructor` since this may not be the function\n // that created the element, and it may not even be a constructor.\n // Legacy hook TODO: Warn if this is accessed\n factory.type = type;\n return factory;\n};\n\nReactElement.cloneAndReplaceKey = function (oldElement, newKey) {\n var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);\n\n return newElement;\n};\n\n/**\n * Clone and return a new ReactElement using element as the starting point.\n * See https://facebook.github.io/react/docs/top-level-api.html#react.cloneelement\n */\nReactElement.cloneElement = function (element, config, children) {\n var propName;\n\n // Original props are copied\n var props = _assign({}, element.props);\n\n // Reserved names are extracted\n var key = element.key;\n var ref = element.ref;\n // Self is preserved since the owner is preserved.\n var self = element._self;\n // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n var source = element._source;\n\n // Owner will be preserved, unless ref is overridden\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n // Remaining properties override existing props\n var defaultProps;\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n};\n\n/**\n * Verifies the object is a ReactElement.\n * See https://facebook.github.io/react/docs/top-level-api.html#react.isvalidelement\n * @param {?object} object\n * @return {boolean} True if `object` is a valid component.\n * @final\n */\nReactElement.isValidElement = function (object) {\n return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n};\n\nmodule.exports = ReactElement;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react/lib/ReactElement.js\n// module id = 84\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react/lib/ReactElement.js?", + ); + + /***/ + }, + /* 85 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************************!*\ + !*** ./~/react/lib/reactProdInvariant.js ***! + \*******************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright (c) 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * \n */\n\n\n/**\n * WARNING: DO NOT manually require this module.\n * This is a replacement for `invariant(...)` used by the error code system\n * and will _only_ be required by the corresponding babel pass.\n * It always throws.\n */\n\nfunction reactProdInvariant(code) {\n var argCount = arguments.length - 1;\n\n var message = 'Minified React error #' + code + '; visit ' + 'http://facebook.github.io/react/docs/error-decoder.html?invariant=' + code;\n\n for (var argIdx = 0; argIdx < argCount; argIdx++) {\n message += '&args[]=' + encodeURIComponent(arguments[argIdx + 1]);\n }\n\n message += ' for the full message or use the non-minified dev environment' + ' for full errors and additional helpful warnings.';\n\n var error = new Error(message);\n error.name = 'Invariant Violation';\n error.framesToPop = 1; // we don't care about reactProdInvariant's own frame\n\n throw error;\n}\n\nmodule.exports = reactProdInvariant;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react/lib/reactProdInvariant.js\n// module id = 85\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react/lib/reactProdInvariant.js?", + ); + + /***/ + }, + /* 86 */ + /* exports provided: getWidgetsRailDomId, getListingUnitDomId, isLimitedPreview */ + /* exports used: getWidgetsRailDomId, getListingUnitDomId, isLimitedPreview */ + /*!**************************************************!*\ + !*** ./app/bundles/listings-show/utils/index.js ***! + \**************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__enums_DisplayMode__ = __webpack_require__(/*! ../../../enums/DisplayMode */ 60);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getWidgetsRailDomId; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return getListingUnitDomId; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return isLimitedPreview; });\nvar babelPluginFlowReactPropTypes_proptype_ContextualListingDisplayMode = __webpack_require__(/*! ../../../types */ 4).babelPluginFlowReactPropTypes_proptype_ContextualListingDisplayMode || __webpack_require__(/*! react */ 1).PropTypes.any;\n\n\n\n// This is id of a dom node, which holds SLV\'s sticky widgets (basically right column)\n// Instead of dealing w/ refs and shouldComponentUpdate all over the place,\n// Using simple dom id to get a ref, b/c it\'s just way simplier.\nvar WIDGETS_RAIL_DOM_ID = \'listing--widgets-rail\';\n\nvar getWidgetsRailDomId = function getWidgetsRailDomId() {\n return WIDGETS_RAIL_DOM_ID;\n};\nvar getListingUnitDomId = function getListingUnitDomId(unit) {\n return \'listing--\' + unit;\n};\n\nvar isLimitedPreview = function isLimitedPreview(displayMode) {\n return displayMode === __WEBPACK_IMPORTED_MODULE_0__enums_DisplayMode__["a" /* default */].LIMITED_PREVIEW;\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-show/utils/index.js\n// module id = 86\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-show/utils/index.js?', + ); + + /***/ + }, + /* 87 */ + /* exports provided: default */ + /* exports used: default */ + /*!***************************************!*\ + !*** ./app/enums/RelationshipType.js ***! + \***************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__libs_utils_Enum__ = __webpack_require__(/*! ../libs/utils/Enum */ 22);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__assets_styles_resources_variables__ = __webpack_require__(/*! ../assets/styles/resources/variables */ 131);\n\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (new __WEBPACK_IMPORTED_MODULE_0__libs_utils_Enum__[\"a\" /* default */]({\n MEMBERSHIP: {\n label: 'Guest List Host',\n value: 'membership',\n glyphIconClass: 'glyphicon-star-empty',\n color: __WEBPACK_IMPORTED_MODULE_1__assets_styles_resources_variables__[\"a\" /* RELATIONSHIP_MEMBERSHIP_COLOR */]\n },\n FRIEND: {\n label: 'Facebook Friend',\n value: 'fb_friend',\n glyphIconClass: 'glyphicon-user',\n color: __WEBPACK_IMPORTED_MODULE_1__assets_styles_resources_variables__[\"b\" /* RELATIONSHIP_FB_FRIEND_COLOR */]\n },\n OWNER: {\n label: 'Owner',\n value: 'owner',\n glyphIconClass: 'glyphicon-home',\n color: __WEBPACK_IMPORTED_MODULE_1__assets_styles_resources_variables__[\"c\" /* RELATIONSHIP_OWNER_COLOR */]\n },\n NONE: {\n label: 'Everybody',\n value: 'public_guest',\n glyphIconClass: 'glyphicon-globe',\n color: __WEBPACK_IMPORTED_MODULE_1__assets_styles_resources_variables__[\"d\" /* RELATIONSHIP_PUBLIC_GUEST_COLOR */]\n }\n}));\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/enums/RelationshipType.js\n// module id = 87\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/enums/RelationshipType.js?", + ); + + /***/ + }, + /* 88 */ + /* exports provided: default */ + /* exports used: default */ + /*!**************************************!*\ + !*** ./app/libs/redirectToSignIn.js ***! + \**************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony export (immutable) */ __webpack_exports__["a"] = redirectToSignIn;\nfunction redirectToSignIn() {\n window.location.href = window.location.origin + "/users/sign_in";\n}\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/redirectToSignIn.js\n// module id = 88\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/redirectToSignIn.js?', + ); + + /***/ + }, + /* 89 */ + /* exports provided: formatInflection, formatNumber, formatPrice, formatPercentage, formatTime, getParagraphs */ + /* exports used: formatInflection, getParagraphs, formatPrice, formatPercentage */ + /*!***************************************!*\ + !*** ./app/libs/utils/i18n/index.jsx ***! + \***************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_inflection__ = __webpack_require__(/*! inflection */ 218);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_inflection___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_inflection__);\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = formatInflection;\n/* unused harmony export formatNumber */\n/* harmony export (immutable) */ __webpack_exports__[\"c\"] = formatPrice;\n/* harmony export (immutable) */ __webpack_exports__[\"d\"] = formatPercentage;\n/* unused harmony export formatTime */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return getParagraphs; });\n\n\nfunction formatInflection(item, amount, label) {\n return (label || amount) + ' ' + __WEBPACK_IMPORTED_MODULE_0_inflection___default.a.inflect(item, amount);\n}\n\nfunction formatNumber(value, locale) {\n return value.toLocaleString(locale);\n}\n\nfunction formatPrice(price) {\n return price ? '$ ' + price : '';\n}\n\nfunction formatPercentage(percents) {\n return percents ? '% ' + percents : '';\n}\n\nfunction formatTime(time) {\n var hours24 = Math.floor(time / 60);\n var hours12 = hours24 > 12 ? hours24 - 12 : hours24;\n var minutes = time % 60 < 10 ? '0' + time % 60 : time % 60;\n var amPm = hours24 < 13 ? 'am' : 'pm';\n\n return hours12 + ':' + minutes + ' ' + amPm;\n}\n\nvar getParagraphs = function getParagraphs(text) {\n return text.split('\\n').filter(function (v) {\n return v;\n });\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/utils/i18n/index.jsx\n// module id = 89\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/utils/i18n/index.jsx?", + ); + + /***/ + }, + /* 90 */ + /* exports provided: createImmutableSelector, createCommonSelector */ + /* exports used: createCommonSelector */ + /*!**********************************************!*\ + !*** ./app/libs/utils/selectors/creators.js ***! + \**********************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_immutable__ = __webpack_require__(/*! immutable */ 26);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_immutable___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_immutable__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_reselect__ = __webpack_require__(/*! reselect */ 103);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_reselect___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_reselect__);\n/* harmony reexport (binding) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_1_reselect__, "createSelector")) __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_1_reselect__["createSelector"]; });\n/* unused harmony export createImmutableSelector */\n\n\n\nvar createImmutableSelector = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_reselect__["createSelectorCreator"])(__WEBPACK_IMPORTED_MODULE_1_reselect__["defaultMemoize"], function (currentVal, previousVal) {\n return __WEBPACK_IMPORTED_MODULE_0_immutable___default.a.is(currentVal, previousVal);\n});\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/utils/selectors/creators.js\n// module id = 90\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/utils/selectors/creators.js?', + ); + + /***/ + }, + /* 91 */ + /* unknown exports provided */ + /* all exports used */ + /*!****************************!*\ + !*** ./app/types/redux.js ***! + \****************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + 'if (true) Object.defineProperty(exports, "babelPluginFlowReactPropTypes_proptype_Action", {\n value: __webpack_require__(/*! react */ 1).PropTypes.shape({\n type: __webpack_require__(/*! prop-types */ 0).any.isRequired\n })\n});\n/* eslint-disable no-use-before-define */\n\n// ActionHandlerAtLeaf type is used w/ `redux-tree`\n// for action handlers that update state of external leaves\n\n// Types below are used mainly in utils/redux and not in bundles code,\n// b/c each bundle has its own State, so these types should be defined on the bundle level.\n// See example in: listings-manage/types\nif (true) Object.defineProperty(exports, "babelPluginFlowReactPropTypes_proptype_ActionHandlerAtLeaf", {\n value: __webpack_require__(/*! react */ 1).PropTypes.shape({\n leaf: __webpack_require__(/*! prop-types */ 0).arrayOf(__webpack_require__(/*! prop-types */ 0).string).isRequired,\n reduce: __webpack_require__(/*! prop-types */ 0).any.isRequired\n })\n});\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/types/redux.js\n// module id = 91\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/types/redux.js?', + ); + + /***/ + }, + /* 92 */ + /* unknown exports provided */ + /* exports used: default */ + /*!**************************************************!*\ + !*** ./~/babel-runtime/core-js/object/values.js ***! + \**************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + 'module.exports = { "default": __webpack_require__(/*! core-js/library/fn/object/values */ 916), __esModule: true };\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/babel-runtime/core-js/object/values.js\n// module id = 92\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/babel-runtime/core-js/object/values.js?', + ); + + /***/ + }, + /* 93 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************************!*\ + !*** ./~/core-js/library/modules/_ctx.js ***! + \*******************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + '// optional / simple context binding\nvar aFunction = __webpack_require__(/*! ./_a-function */ 919);\nmodule.exports = function(fn, that, length){\n aFunction(fn);\n if(that === undefined)return fn;\n switch(length){\n case 1: return function(a){\n return fn.call(that, a);\n };\n case 2: return function(a, b){\n return fn.call(that, a, b);\n };\n case 3: return function(a, b, c){\n return fn.call(that, a, b, c);\n };\n }\n return function(/* ...args */){\n return fn.apply(that, arguments);\n };\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_ctx.js\n// module id = 93\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/_ctx.js?', + ); + + /***/ + }, + /* 94 */ + /* unknown exports provided */ + /* all exports used */ + /*!****************************************!*\ + !*** ./~/dom-helpers/ownerDocument.js ***! + \****************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = ownerDocument;\nfunction ownerDocument(node) {\n return node && node.ownerDocument || document;\n}\nmodule.exports = exports["default"];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/dom-helpers/ownerDocument.js\n// module id = 94\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/dom-helpers/ownerDocument.js?', + ); + + /***/ + }, + /* 95 */ + /* unknown exports provided */ + /* all exports used */ + /*!*****************************************!*\ + !*** ./~/dom-helpers/query/contains.js ***! + \*****************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\n\nvar _inDOM = __webpack_require__(/*! ../util/inDOM */ 65);\n\nvar _inDOM2 = _interopRequireDefault(_inDOM);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = function () {\n // HTML DOM and SVG DOM may have different support levels,\n // so we need to check on context instead of a document root element.\n return _inDOM2.default ? function (context, node) {\n if (context.contains) {\n return context.contains(node);\n } else if (context.compareDocumentPosition) {\n return context === node || !!(context.compareDocumentPosition(node) & 16);\n } else {\n return fallback(context, node);\n }\n } : fallback;\n}();\n\nfunction fallback(context, node) {\n if (node) do {\n if (node === context) return true;\n } while (node = node.parentNode);\n\n return false;\n}\nmodule.exports = exports[\'default\'];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/dom-helpers/query/contains.js\n// module id = 95\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/dom-helpers/query/contains.js?', + ); + + /***/ + }, + /* 96 */ + /* unknown exports provided */ + /* all exports used */ + /*!***********************************!*\ + !*** ./~/fbjs/lib/emptyObject.js ***! + \***********************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '/**\n * Copyright (c) 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar emptyObject = {};\n\nif (true) {\n Object.freeze(emptyObject);\n}\n\nmodule.exports = emptyObject;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/fbjs/lib/emptyObject.js\n// module id = 96\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/fbjs/lib/emptyObject.js?', + ); + + /***/ + }, + /* 97 */ + /* unknown exports provided */ + /* all exports used */ + /*!************************************!*\ + !*** ./~/fbjs/lib/shallowEqual.js ***! + \************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright (c) 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * @typechecks\n * \n */\n\n/*eslint-disable no-self-compare */\n\n\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\n/**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\nfunction is(x, y) {\n // SameValue algorithm\n if (x === y) {\n // Steps 1-5, 7-10\n // Steps 6.b-6.e: +0 != -0\n // Added the nonzero y check to make Flow happy, but it is redundant\n return x !== 0 || y !== 0 || 1 / x === 1 / y;\n } else {\n // Step 6.a: NaN == NaN\n return x !== x && y !== y;\n }\n}\n\n/**\n * Performs equality by iterating through keys on an object and returning false\n * when any key has values which are not strictly equal between the arguments.\n * Returns true when the values of all keys are strictly equal.\n */\nfunction shallowEqual(objA, objB) {\n if (is(objA, objB)) {\n return true;\n }\n\n if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n return false;\n }\n\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) {\n return false;\n }\n\n // Test for A's keys different from B.\n for (var i = 0; i < keysA.length; i++) {\n if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n return false;\n }\n }\n\n return true;\n}\n\nmodule.exports = shallowEqual;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/fbjs/lib/shallowEqual.js\n// module id = 97\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/fbjs/lib/shallowEqual.js?", + ); + + /***/ + }, + /* 98 */ + /* unknown exports provided */ + /* all exports used */ + /*!****************************************!*\ + !*** ./~/history/lib/LocationUtils.js ***! + \****************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nexports.__esModule = true;\nexports.locationsAreEqual = exports.statesAreEqual = exports.createLocation = exports.createQuery = undefined;\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol ? \"symbol\" : typeof obj; };\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _invariant = __webpack_require__(/*! invariant */ 25);\n\nvar _invariant2 = _interopRequireDefault(_invariant);\n\nvar _warning = __webpack_require__(/*! warning */ 23);\n\nvar _warning2 = _interopRequireDefault(_warning);\n\nvar _PathUtils = __webpack_require__(/*! ./PathUtils */ 66);\n\nvar _Actions = __webpack_require__(/*! ./Actions */ 159);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar createQuery = exports.createQuery = function createQuery(props) {\n return _extends(Object.create(null), props);\n};\n\nvar createLocation = exports.createLocation = function createLocation() {\n var input = arguments.length <= 0 || arguments[0] === undefined ? '/' : arguments[0];\n var action = arguments.length <= 1 || arguments[1] === undefined ? _Actions.POP : arguments[1];\n var key = arguments.length <= 2 || arguments[2] === undefined ? null : arguments[2];\n\n var object = typeof input === 'string' ? (0, _PathUtils.parsePath)(input) : input;\n\n true ? (0, _warning2.default)(!object.path, 'Location descriptor objects should have a `pathname`, not a `path`.') : void 0;\n\n var pathname = object.pathname || '/';\n var search = object.search || '';\n var hash = object.hash || '';\n var state = object.state;\n\n return {\n pathname: pathname,\n search: search,\n hash: hash,\n state: state,\n action: action,\n key: key\n };\n};\n\nvar isDate = function isDate(object) {\n return Object.prototype.toString.call(object) === '[object Date]';\n};\n\nvar statesAreEqual = exports.statesAreEqual = function statesAreEqual(a, b) {\n if (a === b) return true;\n\n var typeofA = typeof a === 'undefined' ? 'undefined' : _typeof(a);\n var typeofB = typeof b === 'undefined' ? 'undefined' : _typeof(b);\n\n if (typeofA !== typeofB) return false;\n\n !(typeofA !== 'function') ? true ? (0, _invariant2.default)(false, 'You must not store functions in location state') : (0, _invariant2.default)(false) : void 0;\n\n // Not the same object, but same type.\n if (typeofA === 'object') {\n !!(isDate(a) && isDate(b)) ? true ? (0, _invariant2.default)(false, 'You must not store Date objects in location state') : (0, _invariant2.default)(false) : void 0;\n\n if (!Array.isArray(a)) {\n var keysofA = Object.keys(a);\n var keysofB = Object.keys(b);\n return keysofA.length === keysofB.length && keysofA.every(function (key) {\n return statesAreEqual(a[key], b[key]);\n });\n }\n\n return Array.isArray(b) && a.length === b.length && a.every(function (item, index) {\n return statesAreEqual(item, b[index]);\n });\n }\n\n // All other serializable types (string, number, boolean)\n // should be strict equal.\n return false;\n};\n\nvar locationsAreEqual = exports.locationsAreEqual = function locationsAreEqual(a, b) {\n return a.key === b.key &&\n // a.action === b.action && // Different action !== location change.\n a.pathname === b.pathname && a.search === b.search && a.hash === b.hash && statesAreEqual(a.state, b.state);\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/history/lib/LocationUtils.js\n// module id = 98\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/history/lib/LocationUtils.js?", + ); + + /***/ + }, + /* 99 */ + /* unknown exports provided */ + /* all exports used */ + /*!**********************************************!*\ + !*** ./~/react-dates/lib/utils/isSameDay.js ***! + \**********************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "Object.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports['default'] = isSameDay;\n\nvar _moment = __webpack_require__(/*! moment */ 3);\n\nvar _moment2 = _interopRequireDefault(_moment);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nfunction isSameDay(a, b) {\n if (!_moment2['default'].isMoment(a) || !_moment2['default'].isMoment(b)) return false;\n return a.isSame(b, 'day');\n}\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dates/lib/utils/isSameDay.js\n// module id = 99\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dates/lib/utils/isSameDay.js?", + ); + + /***/ + }, + /* 100 */ + /* unknown exports provided */ + /* all exports used */ + /*!****************************************!*\ + !*** ./~/react-dom/lib/DOMLazyTree.js ***! + \****************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2015-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar DOMNamespaces = __webpack_require__(/*! ./DOMNamespaces */ 246);\nvar setInnerHTML = __webpack_require__(/*! ./setInnerHTML */ 173);\n\nvar createMicrosoftUnsafeLocalFunction = __webpack_require__(/*! ./createMicrosoftUnsafeLocalFunction */ 253);\nvar setTextContent = __webpack_require__(/*! ./setTextContent */ 555);\n\nvar ELEMENT_NODE_TYPE = 1;\nvar DOCUMENT_FRAGMENT_NODE_TYPE = 11;\n\n/**\n * In IE (8-11) and Edge, appending nodes with no children is dramatically\n * faster than appending a full subtree, so we essentially queue up the\n * .appendChild calls here and apply them so each node is added to its parent\n * before any children are added.\n *\n * In other browsers, doing so is slower or neutral compared to the other order\n * (in Firefox, twice as slow) so we only do this inversion in IE.\n *\n * See https://github.com/spicyj/innerhtml-vs-createelement-vs-clonenode.\n */\nvar enableLazy = typeof document !== 'undefined' && typeof document.documentMode === 'number' || typeof navigator !== 'undefined' && typeof navigator.userAgent === 'string' && /\\bEdge\\/\\d/.test(navigator.userAgent);\n\nfunction insertTreeChildren(tree) {\n if (!enableLazy) {\n return;\n }\n var node = tree.node;\n var children = tree.children;\n if (children.length) {\n for (var i = 0; i < children.length; i++) {\n insertTreeBefore(node, children[i], null);\n }\n } else if (tree.html != null) {\n setInnerHTML(node, tree.html);\n } else if (tree.text != null) {\n setTextContent(node, tree.text);\n }\n}\n\nvar insertTreeBefore = createMicrosoftUnsafeLocalFunction(function (parentNode, tree, referenceNode) {\n // DocumentFragments aren't actually part of the DOM after insertion so\n // appending children won't update the DOM. We need to ensure the fragment\n // is properly populated first, breaking out of our lazy approach for just\n // this level. Also, some <object> plugins (like Flash Player) will read\n // <param> nodes immediately upon insertion into the DOM, so <object>\n // must also be populated prior to insertion into the DOM.\n if (tree.node.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE || tree.node.nodeType === ELEMENT_NODE_TYPE && tree.node.nodeName.toLowerCase() === 'object' && (tree.node.namespaceURI == null || tree.node.namespaceURI === DOMNamespaces.html)) {\n insertTreeChildren(tree);\n parentNode.insertBefore(tree.node, referenceNode);\n } else {\n parentNode.insertBefore(tree.node, referenceNode);\n insertTreeChildren(tree);\n }\n});\n\nfunction replaceChildWithTree(oldNode, newTree) {\n oldNode.parentNode.replaceChild(newTree.node, oldNode);\n insertTreeChildren(newTree);\n}\n\nfunction queueChild(parentTree, childTree) {\n if (enableLazy) {\n parentTree.children.push(childTree);\n } else {\n parentTree.node.appendChild(childTree.node);\n }\n}\n\nfunction queueHTML(tree, html) {\n if (enableLazy) {\n tree.html = html;\n } else {\n setInnerHTML(tree.node, html);\n }\n}\n\nfunction queueText(tree, text) {\n if (enableLazy) {\n tree.text = text;\n } else {\n setTextContent(tree.node, text);\n }\n}\n\nfunction toString() {\n return this.node.nodeName;\n}\n\nfunction DOMLazyTree(node) {\n return {\n node: node,\n children: [],\n html: null,\n text: null,\n toString: toString\n };\n}\n\nDOMLazyTree.insertTreeBefore = insertTreeBefore;\nDOMLazyTree.replaceChildWithTree = replaceChildWithTree;\nDOMLazyTree.queueChild = queueChild;\nDOMLazyTree.queueHTML = queueHTML;\nDOMLazyTree.queueText = queueText;\n\nmodule.exports = DOMLazyTree;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/DOMLazyTree.js\n// module id = 100\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/DOMLazyTree.js?", + ); + + /***/ + }, + /* 101 */ + /* exports provided: compilePattern, matchPattern, getParamNames, getParams, formatPattern */ + /* exports used: getParamNames, matchPattern, formatPattern */ + /*!*******************************************!*\ + !*** ./~/react-router/es/PatternUtils.js ***! + \*******************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant__ = __webpack_require__(/*! invariant */ 25);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_invariant__);\n/* unused harmony export compilePattern */\n/* harmony export (immutable) */ __webpack_exports__[\"b\"] = matchPattern;\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = getParamNames;\n/* unused harmony export getParams */\n/* harmony export (immutable) */ __webpack_exports__[\"c\"] = formatPattern;\n\n\nfunction escapeRegExp(string) {\n return string.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n}\n\nfunction _compilePattern(pattern) {\n var regexpSource = '';\n var paramNames = [];\n var tokens = [];\n\n var match = void 0,\n lastIndex = 0,\n matcher = /:([a-zA-Z_$][a-zA-Z0-9_$]*)|\\*\\*|\\*|\\(|\\)|\\\\\\(|\\\\\\)/g;\n while (match = matcher.exec(pattern)) {\n if (match.index !== lastIndex) {\n tokens.push(pattern.slice(lastIndex, match.index));\n regexpSource += escapeRegExp(pattern.slice(lastIndex, match.index));\n }\n\n if (match[1]) {\n regexpSource += '([^/]+)';\n paramNames.push(match[1]);\n } else if (match[0] === '**') {\n regexpSource += '(.*)';\n paramNames.push('splat');\n } else if (match[0] === '*') {\n regexpSource += '(.*?)';\n paramNames.push('splat');\n } else if (match[0] === '(') {\n regexpSource += '(?:';\n } else if (match[0] === ')') {\n regexpSource += ')?';\n } else if (match[0] === '\\\\(') {\n regexpSource += '\\\\(';\n } else if (match[0] === '\\\\)') {\n regexpSource += '\\\\)';\n }\n\n tokens.push(match[0]);\n\n lastIndex = matcher.lastIndex;\n }\n\n if (lastIndex !== pattern.length) {\n tokens.push(pattern.slice(lastIndex, pattern.length));\n regexpSource += escapeRegExp(pattern.slice(lastIndex, pattern.length));\n }\n\n return {\n pattern: pattern,\n regexpSource: regexpSource,\n paramNames: paramNames,\n tokens: tokens\n };\n}\n\nvar CompiledPatternsCache = Object.create(null);\n\nfunction compilePattern(pattern) {\n if (!CompiledPatternsCache[pattern]) CompiledPatternsCache[pattern] = _compilePattern(pattern);\n\n return CompiledPatternsCache[pattern];\n}\n\n/**\n * Attempts to match a pattern on the given pathname. Patterns may use\n * the following special characters:\n *\n * - :paramName Matches a URL segment up to the next /, ?, or #. The\n * captured string is considered a \"param\"\n * - () Wraps a segment of the URL that is optional\n * - * Consumes (non-greedy) all characters up to the next\n * character in the pattern, or to the end of the URL if\n * there is none\n * - ** Consumes (greedy) all characters up to the next character\n * in the pattern, or to the end of the URL if there is none\n *\n * The function calls callback(error, matched) when finished.\n * The return value is an object with the following properties:\n *\n * - remainingPathname\n * - paramNames\n * - paramValues\n */\nfunction matchPattern(pattern, pathname) {\n // Ensure pattern starts with leading slash for consistency with pathname.\n if (pattern.charAt(0) !== '/') {\n pattern = '/' + pattern;\n }\n\n var _compilePattern2 = compilePattern(pattern),\n regexpSource = _compilePattern2.regexpSource,\n paramNames = _compilePattern2.paramNames,\n tokens = _compilePattern2.tokens;\n\n if (pattern.charAt(pattern.length - 1) !== '/') {\n regexpSource += '/?'; // Allow optional path separator at end.\n }\n\n // Special-case patterns like '*' for catch-all routes.\n if (tokens[tokens.length - 1] === '*') {\n regexpSource += '$';\n }\n\n var match = pathname.match(new RegExp('^' + regexpSource, 'i'));\n if (match == null) {\n return null;\n }\n\n var matchedPath = match[0];\n var remainingPathname = pathname.substr(matchedPath.length);\n\n if (remainingPathname) {\n // Require that the match ends at a path separator, if we didn't match\n // the full path, so any remaining pathname is a new path segment.\n if (matchedPath.charAt(matchedPath.length - 1) !== '/') {\n return null;\n }\n\n // If there is a remaining pathname, treat the path separator as part of\n // the remaining pathname for properly continuing the match.\n remainingPathname = '/' + remainingPathname;\n }\n\n return {\n remainingPathname: remainingPathname,\n paramNames: paramNames,\n paramValues: match.slice(1).map(function (v) {\n return v && decodeURIComponent(v);\n })\n };\n}\n\nfunction getParamNames(pattern) {\n return compilePattern(pattern).paramNames;\n}\n\nfunction getParams(pattern, pathname) {\n var match = matchPattern(pattern, pathname);\n if (!match) {\n return null;\n }\n\n var paramNames = match.paramNames,\n paramValues = match.paramValues;\n\n var params = {};\n\n paramNames.forEach(function (paramName, index) {\n params[paramName] = paramValues[index];\n });\n\n return params;\n}\n\n/**\n * Returns a version of the given pattern with params interpolated. Throws\n * if there is a dynamic segment of the pattern for which there is no param.\n */\nfunction formatPattern(pattern, params) {\n params = params || {};\n\n var _compilePattern3 = compilePattern(pattern),\n tokens = _compilePattern3.tokens;\n\n var parenCount = 0,\n pathname = '',\n splatIndex = 0,\n parenHistory = [];\n\n var token = void 0,\n paramName = void 0,\n paramValue = void 0;\n for (var i = 0, len = tokens.length; i < len; ++i) {\n token = tokens[i];\n\n if (token === '*' || token === '**') {\n paramValue = Array.isArray(params.splat) ? params.splat[splatIndex++] : params.splat;\n\n !(paramValue != null || parenCount > 0) ? true ? __WEBPACK_IMPORTED_MODULE_0_invariant___default()(false, 'Missing splat #%s for path \"%s\"', splatIndex, pattern) : invariant(false) : void 0;\n\n if (paramValue != null) pathname += encodeURI(paramValue);\n } else if (token === '(') {\n parenHistory[parenCount] = '';\n parenCount += 1;\n } else if (token === ')') {\n var parenText = parenHistory.pop();\n parenCount -= 1;\n\n if (parenCount) parenHistory[parenCount - 1] += parenText;else pathname += parenText;\n } else if (token === '\\\\(') {\n pathname += '(';\n } else if (token === '\\\\)') {\n pathname += ')';\n } else if (token.charAt(0) === ':') {\n paramName = token.substring(1);\n paramValue = params[paramName];\n\n !(paramValue != null || parenCount > 0) ? true ? __WEBPACK_IMPORTED_MODULE_0_invariant___default()(false, 'Missing \"%s\" parameter for path \"%s\"', paramName, pattern) : invariant(false) : void 0;\n\n if (paramValue == null) {\n if (parenCount) {\n parenHistory[parenCount - 1] = '';\n\n var curTokenIdx = tokens.indexOf(token);\n var tokensSubset = tokens.slice(curTokenIdx, tokens.length);\n var nextParenIdx = -1;\n\n for (var _i = 0; _i < tokensSubset.length; _i++) {\n if (tokensSubset[_i] == ')') {\n nextParenIdx = _i;\n break;\n }\n }\n\n !(nextParenIdx > 0) ? true ? __WEBPACK_IMPORTED_MODULE_0_invariant___default()(false, 'Path \"%s\" is missing end paren at segment \"%s\"', pattern, tokensSubset.join('')) : invariant(false) : void 0;\n\n // jump to ending paren\n i = curTokenIdx + nextParenIdx - 1;\n }\n } else if (parenCount) parenHistory[parenCount - 1] += encodeURIComponent(paramValue);else pathname += encodeURIComponent(paramValue);\n } else {\n if (parenCount) parenHistory[parenCount - 1] += token;else pathname += token;\n }\n }\n\n !(parenCount <= 0) ? true ? __WEBPACK_IMPORTED_MODULE_0_invariant___default()(false, 'Path \"%s\" is missing end paren', pattern) : invariant(false) : void 0;\n\n return pathname.replace(/\\/+/g, '/');\n}\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-router/es/PatternUtils.js\n// module id = 101\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-router/es/PatternUtils.js?", + ); + + /***/ + }, + /* 102 */ + /* exports provided: default, _resetWarned */ + /* exports used: default */ + /*!********************************************!*\ + !*** ./~/react-router/es/routerWarning.js ***! + \********************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(/*! warning */ 23);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_warning__);\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = routerWarning;\n/* unused harmony export _resetWarned */\n\n\nvar warned = {};\n\nfunction routerWarning(falseToWarn, message) {\n // Only issue deprecation warnings once.\n if (message.indexOf('deprecated') !== -1) {\n if (warned[message]) {\n return;\n }\n\n warned[message] = true;\n }\n\n message = '[react-router] ' + message;\n\n for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\n args[_key - 2] = arguments[_key];\n }\n\n __WEBPACK_IMPORTED_MODULE_0_warning___default.a.apply(undefined, [falseToWarn, message].concat(args));\n}\n\nfunction _resetWarned() {\n warned = {};\n}\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-router/es/routerWarning.js\n// module id = 102\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-router/es/routerWarning.js?", + ); + + /***/ + }, + /* 103 */ + /* unknown exports provided */ + /* exports used: createStructuredSelector, createSelectorCreator, defaultMemoize, createSelector */ + /*!*********************************!*\ + !*** ./~/reselect/lib/index.js ***! + \*********************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nexports.__esModule = true;\nexports.defaultMemoize = defaultMemoize;\nexports.createSelectorCreator = createSelectorCreator;\nexports.createStructuredSelector = createStructuredSelector;\nfunction defaultEqualityCheck(a, b) {\n return a === b;\n}\n\nfunction areArgumentsShallowlyEqual(equalityCheck, prev, next) {\n if (prev === null || next === null || prev.length !== next.length) {\n return false;\n }\n\n // Do this in a for loop (and not a `forEach` or an `every`) so we can determine equality as fast as possible.\n var length = prev.length;\n for (var i = 0; i < length; i++) {\n if (!equalityCheck(prev[i], next[i])) {\n return false;\n }\n }\n\n return true;\n}\n\nfunction defaultMemoize(func) {\n var equalityCheck = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaultEqualityCheck;\n\n var lastArgs = null;\n var lastResult = null;\n // we reference arguments instead of spreading them for performance reasons\n return function () {\n if (!areArgumentsShallowlyEqual(equalityCheck, lastArgs, arguments)) {\n // apply arguments instead of spreading for performance.\n lastResult = func.apply(null, arguments);\n }\n\n lastArgs = arguments;\n return lastResult;\n };\n}\n\nfunction getDependencies(funcs) {\n var dependencies = Array.isArray(funcs[0]) ? funcs[0] : funcs;\n\n if (!dependencies.every(function (dep) {\n return typeof dep === 'function';\n })) {\n var dependencyTypes = dependencies.map(function (dep) {\n return typeof dep;\n }).join(', ');\n throw new Error('Selector creators expect all input-selectors to be functions, ' + ('instead received the following types: [' + dependencyTypes + ']'));\n }\n\n return dependencies;\n}\n\nfunction createSelectorCreator(memoize) {\n for (var _len = arguments.length, memoizeOptions = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n memoizeOptions[_key - 1] = arguments[_key];\n }\n\n return function () {\n for (var _len2 = arguments.length, funcs = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n funcs[_key2] = arguments[_key2];\n }\n\n var recomputations = 0;\n var resultFunc = funcs.pop();\n var dependencies = getDependencies(funcs);\n\n var memoizedResultFunc = memoize.apply(undefined, [function () {\n recomputations++;\n // apply arguments instead of spreading for performance.\n return resultFunc.apply(null, arguments);\n }].concat(memoizeOptions));\n\n // If a selector is called with the exact same arguments we don't need to traverse our dependencies again.\n var selector = defaultMemoize(function () {\n var params = [];\n var length = dependencies.length;\n\n for (var i = 0; i < length; i++) {\n // apply arguments instead of spreading and mutate a local list of params for performance.\n params.push(dependencies[i].apply(null, arguments));\n }\n\n // apply arguments instead of spreading for performance.\n return memoizedResultFunc.apply(null, params);\n });\n\n selector.resultFunc = resultFunc;\n selector.recomputations = function () {\n return recomputations;\n };\n selector.resetRecomputations = function () {\n return recomputations = 0;\n };\n return selector;\n };\n}\n\nvar createSelector = exports.createSelector = createSelectorCreator(defaultMemoize);\n\nfunction createStructuredSelector(selectors) {\n var selectorCreator = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : createSelector;\n\n if (typeof selectors !== 'object') {\n throw new Error('createStructuredSelector expects first argument to be an object ' + ('where each property is a selector, instead received a ' + typeof selectors));\n }\n var objectKeys = Object.keys(selectors);\n return selectorCreator(objectKeys.map(function (key) {\n return selectors[key];\n }), function () {\n for (var _len3 = arguments.length, values = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n values[_key3] = arguments[_key3];\n }\n\n return values.reduce(function (composition, value, index) {\n composition[objectKeys[index]] = value;\n return composition;\n }, {});\n });\n}\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/reselect/lib/index.js\n// module id = 103\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/reselect/lib/index.js?", + ); + + /***/ + }, + /* 104 */ + /* unknown exports provided */ + /* all exports used */ + /*!***********************************!*\ + !*** (webpack)/buildin/global.js ***! + \***********************************/ + /***/ function (module, exports) { + eval( + 'var g;\r\n\r\n// This works in non-strict mode\r\ng = (function() {\r\n\treturn this;\r\n})();\r\n\r\ntry {\r\n\t// This works if eval is allowed (see CSP)\r\n\tg = g || Function("return this")() || (1,eval)("this");\r\n} catch(e) {\r\n\t// This works if the window reference is available\r\n\tif(typeof window === "object")\r\n\t\tg = window;\r\n}\r\n\r\n// g can still be undefined, but nothing to do about it...\r\n// We return undefined, instead of nothing here, so it\'s\r\n// easier to handle this case. if(!global) { ...}\r\n\r\nmodule.exports = g;\r\n\n\n//////////////////\n// WEBPACK FOOTER\n// (webpack)/buildin/global.js\n// module id = 104\n// module chunks = 0\n\n//# sourceURL=webpack:///(webpack)/buildin/global.js?', + ); + + /***/ + }, + /* 105 */ + /* exports provided: SCREEN_SM, SCREEN_MD, SCREEN_LG, SCREEN_EUGENE_LG, SCREEN_EUGENE_MD, SCREEN_EUGENE_SM */ + /* exports used: SCREEN_MD, SCREEN_SM, SCREEN_EUGENE_MD, SCREEN_EUGENE_LG, SCREEN_LG */ + /*!****************************************************!*\ + !*** ./app/assets/styles/resources/screenSizes.js ***! + \****************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return SCREEN_SM; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return SCREEN_MD; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return SCREEN_LG; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return SCREEN_EUGENE_LG; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return SCREEN_EUGENE_MD; });\n/* unused harmony export SCREEN_EUGENE_SM */\nvar SCREEN_SM = 768;\nvar SCREEN_MD = 992;\nvar SCREEN_LG = 1100;\n\nvar SCREEN_EUGENE_LG = 1150;\nvar SCREEN_EUGENE_MD = 768;\nvar SCREEN_EUGENE_SM = 320;\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/assets/styles/resources/screenSizes.js\n// module id = 105\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/assets/styles/resources/screenSizes.js?', + ); + + /***/ + }, + /* 106 */ + /* exports provided: buildUrl, getCsrfToken */ + /* exports used: getCsrfToken, buildUrl */ + /*!*************************************!*\ + !*** ./app/libs/utils/api/index.js ***! + \*************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_qs__ = __webpack_require__(/*! qs */ 233);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_qs___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_qs__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_fp__ = __webpack_require__(/*! lodash/fp */ 14);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_fp___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_lodash_fp__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__enums_Environment__ = __webpack_require__(/*! ../../../enums/Environment */ 183);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__env__ = __webpack_require__(/*! ../env */ 310);\n/* harmony export (immutable) */ __webpack_exports__[\"b\"] = buildUrl;\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = getCsrfToken;\n\n\n\n\n\n\nfunction buildUrl(path, query) {\n var filteredQuery = __WEBPACK_IMPORTED_MODULE_1_lodash_fp___default.a.pickBy(__WEBPACK_IMPORTED_MODULE_1_lodash_fp___default.a.identity, query);\n return path + '?' + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0_qs__[\"stringify\"])(filteredQuery, { arrayFormat: 'brackets' });\n}\n\nfunction getCsrfToken() {\n var isTest = __WEBPACK_IMPORTED_MODULE_3__env__[\"c\" /* get */]('RAILS_ENV') === __WEBPACK_IMPORTED_MODULE_2__enums_Environment__[\"a\" /* default */].TEST;\n if (isTest) return null;\n\n var metas = document.querySelectorAll('meta');\n var token = __WEBPACK_IMPORTED_MODULE_1_lodash_fp___default.a.find({ name: 'csrf-token' }, metas);\n\n if (!token) throw new Error('Missing CSRF TOKEN in head');\n\n return token.content;\n}\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/utils/api/index.js\n// module id = 106\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/utils/api/index.js?", + ); + + /***/ + }, + /* 107 */ + /* exports provided: getGoogleMapOptions, getBounds, getPropertyBounds, getAddressComponent, getGeoData, isViewportInvalid, generateBounds */ + /* exports used: getGeoData, generateBounds, isViewportInvalid, getGoogleMapOptions */ + /*!*************************************!*\ + !*** ./app/libs/utils/geo/index.js ***! + \*************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_fp__ = __webpack_require__(/*! lodash/fp */ 14);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_fp___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_lodash_fp__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1____ = __webpack_require__(/*! .. */ 20);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__components_GoogleMaps_Map_styles_json__ = __webpack_require__(/*! ../../components/GoogleMaps/Map/styles.json */ 276);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__components_GoogleMaps_Map_styles_json___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__components_GoogleMaps_Map_styles_json__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return getGoogleMapOptions; });\n/* unused harmony export getBounds */\n/* unused harmony export getPropertyBounds */\n/* unused harmony export getAddressComponent */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return getGeoData; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return isViewportInvalid; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return generateBounds; });\n\n\n\n\nvar babelPluginFlowReactPropTypes_proptype_GeoLocation = __webpack_require__(/*! ../../../types */ 4).babelPluginFlowReactPropTypes_proptype_GeoLocation || __webpack_require__(/*! react */ 1).PropTypes.any;\n\nvar babelPluginFlowReactPropTypes_proptype_GoogleMapsPlace = __webpack_require__(/*! ../../../types */ 4).babelPluginFlowReactPropTypes_proptype_GoogleMapsPlace || __webpack_require__(/*! react */ 1).PropTypes.any;\n\n\n\nvar DEFAULT_RADIUS = 6000;\n\n// NOTE: Deprecated, use GoogleMaps.Map component instead\nif (typeof exports !== 'undefined') Object.defineProperty(exports, 'babelPluginFlowReactPropTypes_proptype_GoogleMapOptions', {\n value: __webpack_require__(/*! react */ 1).PropTypes.shape({\n draggable: __webpack_require__(/*! prop-types */ 0).bool,\n disableDefaultUI: __webpack_require__(/*! prop-types */ 0).bool.isRequired,\n zoomControl: __webpack_require__(/*! prop-types */ 0).bool.isRequired,\n zoomControlOptions: __webpack_require__(/*! prop-types */ 0).shape({\n position: __webpack_require__(/*! prop-types */ 0).string.isRequired\n }).isRequired,\n scrollwheel: __webpack_require__(/*! prop-types */ 0).bool.isRequired,\n styles: __webpack_require__(/*! prop-types */ 0).object.isRequired\n })\n});\nvar getGoogleMapOptions = function getGoogleMapOptions() {\n return {\n draggable: true,\n disableDefaultUI: true,\n zoomControl: true,\n zoomControlOptions: {\n position: google.maps.ControlPosition.TOP_LEFT\n },\n scrollwheel: false,\n styles: __WEBPACK_IMPORTED_MODULE_2__components_GoogleMaps_Map_styles_json___default.a\n };\n};\n\nfunction getBounds(boundSWLat, boundSWLng, boundNELat, boundNELng) {\n if (!__WEBPACK_IMPORTED_MODULE_1____[\"c\" /* isGoogleDefined */]()) return false;\n\n var southWest = new google.maps.LatLng(boundSWLat, boundSWLng);\n var northEast = new google.maps.LatLng(boundNELat, boundNELng);\n\n return new google.maps.LatLngBounds(southWest, northEast);\n}\n\nfunction getPropertyBounds(location) {\n if (!__WEBPACK_IMPORTED_MODULE_1____[\"c\" /* isGoogleDefined */]()) return false;\n\n var boundSWLat = parseFloat(location.boundSwLat);\n var boundSWLng = parseFloat(location.boundSwLng);\n var boundNELat = parseFloat(location.boundNeLat);\n var boundNELng = parseFloat(location.boundNeLng);\n\n if (!boundSWLat || !boundSWLng || !boundNELat || !boundNELng) {\n return false;\n }\n\n return getBounds(boundSWLat, boundSWLng, boundNELat, boundNELng);\n}\n\nvar getAddressComponent = function getAddressComponent(place, addressComponentName) {\n var addressComponent = place.address_components.find(function (component) {\n return component.types.find(function (type) {\n return type === addressComponentName;\n });\n });\n\n return addressComponent ? addressComponent.long_name : null // DO NOT REMOVE this `null`,\n // otherwise `undefined` value won't be included in the request body\n ;\n};\n\nvar getGeoData = function getGeoData(place) {\n return {\n rawGeoData: JSON.stringify(place),\n street: ['street_number', 'route'].map(function (addressComponentName) {\n return getAddressComponent(place, addressComponentName);\n }).filter(function (addressComponent) {\n return addressComponent;\n }).join(' '),\n city: getAddressComponent(place, 'locality') || getAddressComponent(place, 'administrative_area_level_3') || getAddressComponent(place, 'neighborhood'),\n zipCode: getAddressComponent(place, 'postal_code'),\n state: getAddressComponent(place, 'administrative_area_level_1'),\n country: getAddressComponent(place, 'country'),\n lat: __WEBPACK_IMPORTED_MODULE_0_lodash_fp___default.a.invoke('geometry.location.lat', place),\n lng: __WEBPACK_IMPORTED_MODULE_0_lodash_fp___default.a.invoke('geometry.location.lng', place)\n };\n};\n\nvar isViewportInvalid = function isViewportInvalid(neLat, swLat) {\n return neLat === swLat;\n};\n\nvar generateBounds = function generateBounds(lat, lng) {\n var centeredPlace = new google.maps.LatLng(lat, lng);\n var circle = new google.maps.Circle({ center: centeredPlace, radius: DEFAULT_RADIUS });\n return circle.getBounds();\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/utils/geo/index.js\n// module id = 107\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/utils/geo/index.js?", + ); + + /***/ + }, + /* 108 */ + /* exports provided: createActionsMap, actionWith, normalizeParamsId, normalizeEntitiesArray, normalizeMapIdKeys, normalizeEntitiesAttribute, withApiErrorMiddleware, makeActionCreator, makeApiErrorActionCreator, buildActionType, buildActionTypes */ + /* exports used: withApiErrorMiddleware, actionWith, normalizeParamsId, createActionsMap, buildActionType */ + /*!***************************************!*\ + !*** ./app/libs/utils/redux/index.js ***! + \***************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_immutable__ = __webpack_require__(/*! immutable */ 26);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_immutable___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_immutable__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_redux__ = __webpack_require__(/*! redux */ 129);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_fp__ = __webpack_require__(/*! lodash/fp */ 14);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_fp___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_lodash_fp__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__middlewares_apiErrors__ = __webpack_require__(/*! ./middlewares/apiErrors */ 193);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return createActionsMap; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return actionWith; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return normalizeParamsId; });\n/* unused harmony export normalizeEntitiesArray */\n/* unused harmony export normalizeMapIdKeys */\n/* unused harmony export normalizeEntitiesAttribute */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return withApiErrorMiddleware; });\n/* unused harmony export makeActionCreator */\n/* unused harmony export makeApiErrorActionCreator */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return buildActionType; });\n/* unused harmony export buildActionTypes */\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _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\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\n\n\n\n\nvar babelPluginFlowReactPropTypes_proptype_ActionCreators = __webpack_require__(/*! redux */ 129).babelPluginFlowReactPropTypes_proptype_ActionCreators || __webpack_require__(/*! react */ 1).PropTypes.any;\n\nvar babelPluginFlowReactPropTypes_proptype_ResponseError = __webpack_require__(/*! ../../../types */ 4).babelPluginFlowReactPropTypes_proptype_ResponseError || __webpack_require__(/*! react */ 1).PropTypes.any;\n\nvar babelPluginFlowReactPropTypes_proptype_Entities = __webpack_require__(/*! ../../../types */ 4).babelPluginFlowReactPropTypes_proptype_Entities || __webpack_require__(/*! react */ 1).PropTypes.any;\n\nvar babelPluginFlowReactPropTypes_proptype_Dispatch = __webpack_require__(/*! ../../../types/redux */ 91).babelPluginFlowReactPropTypes_proptype_Dispatch || __webpack_require__(/*! react */ 1).PropTypes.any;\n\nvar babelPluginFlowReactPropTypes_proptype_Thunk = __webpack_require__(/*! ../../../types/redux */ 91).babelPluginFlowReactPropTypes_proptype_Thunk || __webpack_require__(/*! react */ 1).PropTypes.any;\n\nvar babelPluginFlowReactPropTypes_proptype_Action = __webpack_require__(/*! ../../../types/redux */ 91).babelPluginFlowReactPropTypes_proptype_Action || __webpack_require__(/*! react */ 1).PropTypes.any;\n\n\n\nvar createActionsMap = function createActionsMap(rawActionsMap) {\n return function (dispatch) {\n return __WEBPACK_IMPORTED_MODULE_2_lodash_fp___default.a.mapValues(function (actions) {\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_redux__["bindActionCreators"])(actions, dispatch);\n }, rawActionsMap);\n };\n};\n\nvar actionWith = function actionWith(action, MIDDLEWARE_KEY, nextData) {\n var nextAction = _extends({}, action, nextData);\n delete nextAction[MIDDLEWARE_KEY];\n return nextAction;\n};\n\nvar normalizeParamsId = function normalizeParamsId(id) {\n return parseInt(id, 10) || undefined;\n};\n\nvar normalizeEntitiesArray = function normalizeEntitiesArray(entities) {\n return entities.reduce(function ($$reduction, entity) {\n return $$reduction.set(entity.id, __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0_immutable__["fromJS"])(entity));\n }, new __WEBPACK_IMPORTED_MODULE_0_immutable__["Map"]());\n};\n\nvar normalizeMapIdKeys = function normalizeMapIdKeys(entities) {\n return entities ? __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0_immutable__["fromJS"])(entities).mapKeys(normalizeParamsId) : new __WEBPACK_IMPORTED_MODULE_0_immutable__["Map"]();\n};\n\nvar normalizeEntitiesAttribute = function normalizeEntitiesAttribute(entities, attr) {\n var normalizer = function normalizer(normalized, entity) {\n var entityId = entity.get(\'id\');\n var attrValue = entity.get(attr);\n return normalized.setIn([entityId, attr], attrValue);\n };\n\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0_immutable__["fromJS"])(entities).reduce(normalizer, new __WEBPACK_IMPORTED_MODULE_0_immutable__["Map"]());\n};\n\nvar withApiErrorMiddleware = function withApiErrorMiddleware(action) {\n var error = action.error,\n type = action.type,\n otherAttrs = _objectWithoutProperties(action, [\'error\', \'type\']);\n\n return _extends(_defineProperty({}, __WEBPACK_IMPORTED_MODULE_3__middlewares_apiErrors__["a" /* API_ERROR */], {\n type: type,\n error: error\n }), otherAttrs);\n};\n\n/**\n * Returns a function that returns an action creator\n */\n\nvar makeActionCreator = function makeActionCreator(type) {\n for (var _len = arguments.length, argNames = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n argNames[_key - 1] = arguments[_key];\n }\n\n return function () {\n for (var _len2 = arguments.length, argValues = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n argValues[_key2] = arguments[_key2];\n }\n\n return __WEBPACK_IMPORTED_MODULE_2_lodash_fp___default.a.merge({ type: type }, __WEBPACK_IMPORTED_MODULE_2_lodash_fp___default.a.zipObject(argNames, argValues));\n };\n};\n\n/**\n * Returns a function that returns an action creator wrapped with ApiErrorMiddleware\n */\nvar makeApiErrorActionCreator = function makeApiErrorActionCreator(type) {\n for (var _len3 = arguments.length, argNames = Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {\n argNames[_key3 - 1] = arguments[_key3];\n }\n\n return function (error) {\n for (var _len4 = arguments.length, argValues = Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {\n argValues[_key4 - 1] = arguments[_key4];\n }\n\n return __WEBPACK_IMPORTED_MODULE_2_lodash_fp___default.a.flow(__WEBPACK_IMPORTED_MODULE_2_lodash_fp___default.a.merge({ type: type, error: error }), withApiErrorMiddleware)(__WEBPACK_IMPORTED_MODULE_2_lodash_fp___default.a.zipObject(argNames, argValues));\n };\n};\n\nvar toSnakeAndUpper = __WEBPACK_IMPORTED_MODULE_2_lodash_fp___default.a.flow(__WEBPACK_IMPORTED_MODULE_2_lodash_fp___default.a.snakeCase, __WEBPACK_IMPORTED_MODULE_2_lodash_fp___default.a.toUpper);\n\n/**\n * Makes action type strings\n * e.g.: buildActionType(\'todos\', \'createSucceeded\'); // \'TODOS__CREATE_SUCCEEDED\'\n */\nvar buildActionType = __WEBPACK_IMPORTED_MODULE_2_lodash_fp___default.a.curry(function (namespace, actionName) {\n return __WEBPACK_IMPORTED_MODULE_2_lodash_fp___default.a.flow(__WEBPACK_IMPORTED_MODULE_2_lodash_fp___default.a.map(toSnakeAndUpper), __WEBPACK_IMPORTED_MODULE_2_lodash_fp___default.a.join(\'__\'))([namespace, actionName]);\n});\n\n/**\n * Makes an object of action types with the given names as keys and the given names standardized and\n * namespaced as values.\n */\nvar buildActionTypes = function buildActionTypes(namespace, actionNames) {\n return __WEBPACK_IMPORTED_MODULE_2_lodash_fp___default.a.flow(__WEBPACK_IMPORTED_MODULE_2_lodash_fp___default.a.map(buildActionType(namespace)), __WEBPACK_IMPORTED_MODULE_2_lodash_fp___default.a.zipObject(actionNames))(actionNames);\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/utils/redux/index.js\n// module id = 108\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/utils/redux/index.js?', + ); + + /***/ + }, + /* 109 */ + /* unknown exports provided */ + /* all exports used */ + /*!***************************************************!*\ + !*** ./~/babel-runtime/helpers/defineProperty.js ***! + \***************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nexports.__esModule = true;\n\nvar _defineProperty = __webpack_require__(/*! ../core-js/object/define-property */ 899);\n\nvar _defineProperty2 = _interopRequireDefault(_defineProperty);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = function (obj, key, value) {\n if (key in obj) {\n (0, _defineProperty2.default)(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/babel-runtime/helpers/defineProperty.js\n// module id = 109\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/babel-runtime/helpers/defineProperty.js?', + ); + + /***/ + }, + /* 110 */ + /* unknown exports provided */ + /* all exports used */ + /*!*************************************************!*\ + !*** ./~/core-js/library/modules/_iterators.js ***! + \*************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_iterators.js\n// module id = 110\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/_iterators.js?', + ); + + /***/ + }, + /* 111 */ + /* unknown exports provided */ + /* all exports used */ + /*!**************************************************!*\ + !*** ./~/core-js/library/modules/_object-pie.js ***! + \**************************************************/ + /***/ function (module, exports) { + eval( + 'exports.f = {}.propertyIsEnumerable;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_object-pie.js\n// module id = 111\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/_object-pie.js?', + ); + + /***/ + }, + /* 112 */ + /* unknown exports provided */ + /* all exports used */ + /*!*****************************************************!*\ + !*** ./~/core-js/library/modules/_property-desc.js ***! + \*****************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = function(bitmap, value){\n return {\n enumerable : !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable : !(bitmap & 4),\n value : value\n };\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_property-desc.js\n// module id = 112\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/_property-desc.js?', + ); + + /***/ + }, + /* 113 */ + /* unknown exports provided */ + /* all exports used */ + /*!*************************************************!*\ + !*** ./~/core-js/library/modules/_to-object.js ***! + \*************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + '// 7.1.13 ToObject(argument)\nvar defined = __webpack_require__(/*! ./_defined */ 149);\nmodule.exports = function(it){\n return Object(defined(it));\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_to-object.js\n// module id = 113\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/_to-object.js?', + ); + + /***/ + }, + /* 114 */ + /* unknown exports provided */ + /* exports used: default */ + /*!********************************************************************************!*\ + !*** ./app/bundles/listings-show/ui/Listing/MembershipRequest/live/index.scss ***! + \********************************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"wrapper": "index__wrapper__1ipJF",\n\t"unit": "index__unit__22TMf",\n\t"iconCircle": "index__iconCircle__1TNEy",\n\t"marginRight": "index__marginRight__1yNRc",\n\t"iconKey": "index__iconKey__2rNah",\n\t"iconOk": "index__iconOk__1C-cK",\n\t"content": "index__content__2kr_y",\n\t"text": "index__text__3D3cQ",\n\t"buttonRow": "index__buttonRow__Fcc8p",\n\t"buttonWrapper": "index__buttonWrapper__3fd5S",\n\t"button": "index__button__2orq6",\n\t"processing": "index__processing__B1mA-",\n\t"error": "index__error__areFU",\n\t"note": "index__note__2KguH",\n\t"modal": "index__modal__3BKlE",\n\t"modalTitle": "index__modalTitle__3i3CT",\n\t"modalMessage": "index__modalMessage__1s_2O"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-show/ui/Listing/MembershipRequest/live/index.scss\n// module id = 114\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-show/ui/Listing/MembershipRequest/live/index.scss?', + ); + + /***/ + }, + /* 115 */ + /* unknown exports provided */ + /* all exports used */ + /*!**********************************!*\ + !*** ./~/dom-align/lib/utils.js ***! + \**********************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol ? \"symbol\" : typeof obj; };\n\nvar _propertyUtils = __webpack_require__(/*! ./propertyUtils */ 1108);\n\nvar RE_NUM = /[\\-+]?(?:\\d*\\.|)\\d+(?:[eE][\\-+]?\\d+|)/.source;\n\nvar getComputedStyleX = void 0;\n\nfunction force(x, y) {\n return x + y;\n}\n\nfunction css(el, name, v) {\n var value = v;\n if ((typeof name === 'undefined' ? 'undefined' : _typeof(name)) === 'object') {\n for (var i in name) {\n if (name.hasOwnProperty(i)) {\n css(el, i, name[i]);\n }\n }\n return undefined;\n }\n if (typeof value !== 'undefined') {\n if (typeof value === 'number') {\n value = value + 'px';\n }\n el.style[name] = value;\n return undefined;\n }\n return getComputedStyleX(el, name);\n}\n\nfunction getClientPosition(elem) {\n var box = void 0;\n var x = void 0;\n var y = void 0;\n var doc = elem.ownerDocument;\n var body = doc.body;\n var docElem = doc && doc.documentElement;\n // 根据 GBS 最新数据,A-Grade Browsers 都已支持 getBoundingClientRect 方法,不用再考虑传统的实现方式\n box = elem.getBoundingClientRect();\n\n // 注:jQuery 还考虑减去 docElem.clientLeft/clientTop\n // 但测试发现,这样反而会导致当 html 和 body 有边距/边框样式时,获取的值不正确\n // 此外,ie6 会忽略 html 的 margin 值,幸运地是没有谁会去设置 html 的 margin\n\n x = box.left;\n y = box.top;\n\n // In IE, most of the time, 2 extra pixels are added to the top and left\n // due to the implicit 2-pixel inset border. In IE6/7 quirks mode and\n // IE6 standards mode, this border can be overridden by setting the\n // document element's border to zero -- thus, we cannot rely on the\n // offset always being 2 pixels.\n\n // In quirks mode, the offset can be determined by querying the body's\n // clientLeft/clientTop, but in standards mode, it is found by querying\n // the document element's clientLeft/clientTop. Since we already called\n // getClientBoundingRect we have already forced a reflow, so it is not\n // too expensive just to query them all.\n\n // ie 下应该减去窗口的边框吧,毕竟默认 absolute 都是相对窗口定位的\n // 窗口边框标准是设 documentElement ,quirks 时设置 body\n // 最好禁止在 body 和 html 上边框 ,但 ie < 9 html 默认有 2px ,减去\n // 但是非 ie 不可能设置窗口边框,body html 也不是窗口 ,ie 可以通过 html,body 设置\n // 标准 ie 下 docElem.clientTop 就是 border-top\n // ie7 html 即窗口边框改变不了。永远为 2\n // 但标准 firefox/chrome/ie9 下 docElem.clientTop 是窗口边框,即使设了 border-top 也为 0\n\n x -= docElem.clientLeft || body.clientLeft || 0;\n y -= docElem.clientTop || body.clientTop || 0;\n\n return {\n left: x,\n top: y\n };\n}\n\nfunction getScroll(w, top) {\n var ret = w['page' + (top ? 'Y' : 'X') + 'Offset'];\n var method = 'scroll' + (top ? 'Top' : 'Left');\n if (typeof ret !== 'number') {\n var d = w.document;\n // ie6,7,8 standard mode\n ret = d.documentElement[method];\n if (typeof ret !== 'number') {\n // quirks mode\n ret = d.body[method];\n }\n }\n return ret;\n}\n\nfunction getScrollLeft(w) {\n return getScroll(w);\n}\n\nfunction getScrollTop(w) {\n return getScroll(w, true);\n}\n\nfunction getOffset(el) {\n var pos = getClientPosition(el);\n var doc = el.ownerDocument;\n var w = doc.defaultView || doc.parentWindow;\n pos.left += getScrollLeft(w);\n pos.top += getScrollTop(w);\n return pos;\n}\nfunction _getComputedStyle(elem, name, cs) {\n var computedStyle = cs;\n var val = '';\n var d = elem.ownerDocument;\n computedStyle = computedStyle || d.defaultView.getComputedStyle(elem, null);\n\n // https://github.com/kissyteam/kissy/issues/61\n if (computedStyle) {\n val = computedStyle.getPropertyValue(name) || computedStyle[name];\n }\n\n return val;\n}\n\nvar _RE_NUM_NO_PX = new RegExp('^(' + RE_NUM + ')(?!px)[a-z%]+$', 'i');\nvar RE_POS = /^(top|right|bottom|left)$/;\nvar CURRENT_STYLE = 'currentStyle';\nvar RUNTIME_STYLE = 'runtimeStyle';\nvar LEFT = 'left';\nvar PX = 'px';\n\nfunction _getComputedStyleIE(elem, name) {\n // currentStyle maybe null\n // http://msdn.microsoft.com/en-us/library/ms535231.aspx\n var ret = elem[CURRENT_STYLE] && elem[CURRENT_STYLE][name];\n\n // 当 width/height 设置为百分比时,通过 pixelLeft 方式转换的 width/height 值\n // 一开始就处理了! CUSTOM_STYLE.height,CUSTOM_STYLE.width ,cssHook 解决@2011-08-19\n // 在 ie 下不对,需要直接用 offset 方式\n // borderWidth 等值也有问题,但考虑到 borderWidth 设为百分比的概率很小,这里就不考虑了\n\n // From the awesome hack by Dean Edwards\n // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291\n // If we're not dealing with a regular pixel number\n // but a number that has a weird ending, we need to convert it to pixels\n // exclude left right for relativity\n if (_RE_NUM_NO_PX.test(ret) && !RE_POS.test(name)) {\n // Remember the original values\n var style = elem.style;\n var left = style[LEFT];\n var rsLeft = elem[RUNTIME_STYLE][LEFT];\n\n // prevent flashing of content\n elem[RUNTIME_STYLE][LEFT] = elem[CURRENT_STYLE][LEFT];\n\n // Put in the new values to get a computed value out\n style[LEFT] = name === 'fontSize' ? '1em' : ret || 0;\n ret = style.pixelLeft + PX;\n\n // Revert the changed values\n style[LEFT] = left;\n\n elem[RUNTIME_STYLE][LEFT] = rsLeft;\n }\n return ret === '' ? 'auto' : ret;\n}\n\nif (typeof window !== 'undefined') {\n getComputedStyleX = window.getComputedStyle ? _getComputedStyle : _getComputedStyleIE;\n}\n\nfunction getOffsetDirection(dir, option) {\n if (dir === 'left') {\n return option.useCssRight ? 'right' : dir;\n }\n return option.useCssBottom ? 'bottom' : dir;\n}\n\nfunction oppositeOffsetDirection(dir) {\n if (dir === 'left') {\n return 'right';\n } else if (dir === 'right') {\n return 'left';\n } else if (dir === 'top') {\n return 'bottom';\n } else if (dir === 'bottom') {\n return 'top';\n }\n}\n\n// 设置 elem 相对 elem.ownerDocument 的坐标\nfunction setLeftTop(elem, offset, option) {\n // set position first, in-case top/left are set even on static elem\n if (css(elem, 'position') === 'static') {\n elem.style.position = 'relative';\n }\n var presetH = -999;\n var presetV = -999;\n var horizontalProperty = getOffsetDirection('left', option);\n var verticalProperty = getOffsetDirection('top', option);\n var oppositeHorizontalProperty = oppositeOffsetDirection(horizontalProperty);\n var oppositeVerticalProperty = oppositeOffsetDirection(verticalProperty);\n\n if (horizontalProperty !== 'left') {\n presetH = 999;\n }\n\n if (verticalProperty !== 'top') {\n presetV = 999;\n }\n var originalTransition = '';\n var originalOffset = getOffset(elem);\n if ('left' in offset || 'top' in offset) {\n originalTransition = (0, _propertyUtils.getTransitionProperty)(elem) || '';\n (0, _propertyUtils.setTransitionProperty)(elem, 'none');\n }\n if ('left' in offset) {\n elem.style[oppositeHorizontalProperty] = '';\n elem.style[horizontalProperty] = presetH + 'px';\n }\n if ('top' in offset) {\n elem.style[oppositeVerticalProperty] = '';\n elem.style[verticalProperty] = presetV + 'px';\n }\n var old = getOffset(elem);\n var originalStyle = {};\n for (var key in offset) {\n if (offset.hasOwnProperty(key)) {\n var dir = getOffsetDirection(key, option);\n var preset = key === 'left' ? presetH : presetV;\n var off = originalOffset[key] - old[key];\n if (dir === key) {\n originalStyle[dir] = preset + off;\n } else {\n originalStyle[dir] = preset - off;\n }\n }\n }\n css(elem, originalStyle);\n // force relayout\n force(elem.offsetTop, elem.offsetLeft);\n if ('left' in offset || 'top' in offset) {\n (0, _propertyUtils.setTransitionProperty)(elem, originalTransition);\n }\n var ret = {};\n for (var _key in offset) {\n if (offset.hasOwnProperty(_key)) {\n var _dir = getOffsetDirection(_key, option);\n var _off = offset[_key] - originalOffset[_key];\n if (_key === _dir) {\n ret[_dir] = originalStyle[_dir] + _off;\n } else {\n ret[_dir] = originalStyle[_dir] - _off;\n }\n }\n }\n css(elem, ret);\n}\n\nfunction setTransform(elem, offset) {\n var originalOffset = getOffset(elem);\n var originalXY = (0, _propertyUtils.getTransformXY)(elem);\n var resultXY = { x: originalXY.x, y: originalXY.y };\n if ('left' in offset) {\n resultXY.x = originalXY.x + offset.left - originalOffset.left;\n }\n if ('top' in offset) {\n resultXY.y = originalXY.y + offset.top - originalOffset.top;\n }\n (0, _propertyUtils.setTransformXY)(elem, resultXY);\n}\n\nfunction setOffset(elem, offset, option) {\n if (option.useCssRight || option.useCssBottom) {\n setLeftTop(elem, offset, option);\n } else if (option.useCssTransform && (0, _propertyUtils.getTransformName)() in document.body.style) {\n setTransform(elem, offset, option);\n } else {\n setLeftTop(elem, offset, option);\n }\n}\n\nfunction each(arr, fn) {\n for (var i = 0; i < arr.length; i++) {\n fn(arr[i]);\n }\n}\n\nfunction isBorderBoxFn(elem) {\n return getComputedStyleX(elem, 'boxSizing') === 'border-box';\n}\n\nvar BOX_MODELS = ['margin', 'border', 'padding'];\nvar CONTENT_INDEX = -1;\nvar PADDING_INDEX = 2;\nvar BORDER_INDEX = 1;\nvar MARGIN_INDEX = 0;\n\nfunction swap(elem, options, callback) {\n var old = {};\n var style = elem.style;\n var name = void 0;\n\n // Remember the old values, and insert the new ones\n for (name in options) {\n if (options.hasOwnProperty(name)) {\n old[name] = style[name];\n style[name] = options[name];\n }\n }\n\n callback.call(elem);\n\n // Revert the old values\n for (name in options) {\n if (options.hasOwnProperty(name)) {\n style[name] = old[name];\n }\n }\n}\n\nfunction getPBMWidth(elem, props, which) {\n var value = 0;\n var prop = void 0;\n var j = void 0;\n var i = void 0;\n for (j = 0; j < props.length; j++) {\n prop = props[j];\n if (prop) {\n for (i = 0; i < which.length; i++) {\n var cssProp = void 0;\n if (prop === 'border') {\n cssProp = '' + prop + which[i] + 'Width';\n } else {\n cssProp = prop + which[i];\n }\n value += parseFloat(getComputedStyleX(elem, cssProp)) || 0;\n }\n }\n }\n return value;\n}\n\n/**\n * A crude way of determining if an object is a window\n * @member util\n */\nfunction isWindow(obj) {\n // must use == for ie8\n /* eslint eqeqeq:0 */\n return obj !== null && obj !== undefined && obj == obj.window;\n}\n\nvar domUtils = {};\n\neach(['Width', 'Height'], function (name) {\n domUtils['doc' + name] = function (refWin) {\n var d = refWin.document;\n return Math.max(\n // firefox chrome documentElement.scrollHeight< body.scrollHeight\n // ie standard mode : documentElement.scrollHeight> body.scrollHeight\n d.documentElement['scroll' + name],\n // quirks : documentElement.scrollHeight 最大等于可视窗口多一点?\n d.body['scroll' + name], domUtils['viewport' + name](d));\n };\n\n domUtils['viewport' + name] = function (win) {\n // pc browser includes scrollbar in window.innerWidth\n var prop = 'client' + name;\n var doc = win.document;\n var body = doc.body;\n var documentElement = doc.documentElement;\n var documentElementProp = documentElement[prop];\n // 标准模式取 documentElement\n // backcompat 取 body\n return doc.compatMode === 'CSS1Compat' && documentElementProp || body && body[prop] || documentElementProp;\n };\n});\n\n/*\n 得到元素的大小信息\n @param elem\n @param name\n @param {String} [extra] 'padding' : (css width) + padding\n 'border' : (css width) + padding + border\n 'margin' : (css width) + padding + border + margin\n */\nfunction getWH(elem, name, ex) {\n var extra = ex;\n if (isWindow(elem)) {\n return name === 'width' ? domUtils.viewportWidth(elem) : domUtils.viewportHeight(elem);\n } else if (elem.nodeType === 9) {\n return name === 'width' ? domUtils.docWidth(elem) : domUtils.docHeight(elem);\n }\n var which = name === 'width' ? ['Left', 'Right'] : ['Top', 'Bottom'];\n var borderBoxValue = name === 'width' ? elem.offsetWidth : elem.offsetHeight;\n var computedStyle = getComputedStyleX(elem);\n var isBorderBox = isBorderBoxFn(elem, computedStyle);\n var cssBoxValue = 0;\n if (borderBoxValue === null || borderBoxValue === undefined || borderBoxValue <= 0) {\n borderBoxValue = undefined;\n // Fall back to computed then un computed css if necessary\n cssBoxValue = getComputedStyleX(elem, name);\n if (cssBoxValue === null || cssBoxValue === undefined || Number(cssBoxValue) < 0) {\n cssBoxValue = elem.style[name] || 0;\n }\n // Normalize '', auto, and prepare for extra\n cssBoxValue = parseFloat(cssBoxValue) || 0;\n }\n if (extra === undefined) {\n extra = isBorderBox ? BORDER_INDEX : CONTENT_INDEX;\n }\n var borderBoxValueOrIsBorderBox = borderBoxValue !== undefined || isBorderBox;\n var val = borderBoxValue || cssBoxValue;\n if (extra === CONTENT_INDEX) {\n if (borderBoxValueOrIsBorderBox) {\n return val - getPBMWidth(elem, ['border', 'padding'], which, computedStyle);\n }\n return cssBoxValue;\n } else if (borderBoxValueOrIsBorderBox) {\n if (extra === BORDER_INDEX) {\n return val;\n }\n return val + (extra === PADDING_INDEX ? -getPBMWidth(elem, ['border'], which, computedStyle) : getPBMWidth(elem, ['margin'], which, computedStyle));\n }\n return cssBoxValue + getPBMWidth(elem, BOX_MODELS.slice(extra), which, computedStyle);\n}\n\nvar cssShow = {\n position: 'absolute',\n visibility: 'hidden',\n display: 'block'\n};\n\n// fix #119 : https://github.com/kissyteam/kissy/issues/119\nfunction getWHIgnoreDisplay() {\n for (var _len = arguments.length, args = Array(_len), _key2 = 0; _key2 < _len; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n var val = void 0;\n var elem = args[0];\n // in case elem is window\n // elem.offsetWidth === undefined\n if (elem.offsetWidth !== 0) {\n val = getWH.apply(undefined, args);\n } else {\n swap(elem, cssShow, function () {\n val = getWH.apply(undefined, args);\n });\n }\n return val;\n}\n\neach(['width', 'height'], function (name) {\n var first = name.charAt(0).toUpperCase() + name.slice(1);\n domUtils['outer' + first] = function (el, includeMargin) {\n return el && getWHIgnoreDisplay(el, name, includeMargin ? MARGIN_INDEX : BORDER_INDEX);\n };\n var which = name === 'width' ? ['Left', 'Right'] : ['Top', 'Bottom'];\n\n domUtils[name] = function (elem, v) {\n var val = v;\n if (val !== undefined) {\n if (elem) {\n var computedStyle = getComputedStyleX(elem);\n var isBorderBox = isBorderBoxFn(elem);\n if (isBorderBox) {\n val += getPBMWidth(elem, ['padding', 'border'], which, computedStyle);\n }\n return css(elem, name, val);\n }\n return undefined;\n }\n return elem && getWHIgnoreDisplay(elem, name, CONTENT_INDEX);\n };\n});\n\nfunction mix(to, from) {\n for (var i in from) {\n if (from.hasOwnProperty(i)) {\n to[i] = from[i];\n }\n }\n return to;\n}\n\nvar utils = {\n getWindow: function getWindow(node) {\n if (node && node.document && node.setTimeout) {\n return node;\n }\n var doc = node.ownerDocument || node;\n return doc.defaultView || doc.parentWindow;\n },\n offset: function offset(el, value, option) {\n if (typeof value !== 'undefined') {\n setOffset(el, value, option || {});\n } else {\n return getOffset(el);\n }\n },\n\n isWindow: isWindow,\n each: each,\n css: css,\n clone: function clone(obj) {\n var i = void 0;\n var ret = {};\n for (i in obj) {\n if (obj.hasOwnProperty(i)) {\n ret[i] = obj[i];\n }\n }\n var overflow = obj.overflow;\n if (overflow) {\n for (i in obj) {\n if (obj.hasOwnProperty(i)) {\n ret.overflow[i] = obj.overflow[i];\n }\n }\n }\n return ret;\n },\n\n mix: mix,\n getWindowScrollLeft: function getWindowScrollLeft(w) {\n return getScrollLeft(w);\n },\n getWindowScrollTop: function getWindowScrollTop(w) {\n return getScrollTop(w);\n },\n merge: function merge() {\n var ret = {};\n\n for (var _len2 = arguments.length, args = Array(_len2), _key3 = 0; _key3 < _len2; _key3++) {\n args[_key3] = arguments[_key3];\n }\n\n for (var i = 0; i < args.length; i++) {\n utils.mix(ret, args[i]);\n }\n return ret;\n },\n\n viewportWidth: 0,\n viewportHeight: 0\n};\n\nmix(utils, domUtils);\n\nexports[\"default\"] = utils;\nmodule.exports = exports['default'];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/dom-align/lib/utils.js\n// module id = 115\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/dom-align/lib/utils.js?", + ); + + /***/ + }, + /* 116 */ + /* unknown exports provided */ + /* all exports used */ + /*!******************************!*\ + !*** ./~/lodash/isObject.js ***! + \******************************/ + /***/ function (module, exports) { + eval( + "/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/isObject.js\n// module id = 116\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/lodash/isObject.js?", + ); + + /***/ + }, + /* 117 */ + /* unknown exports provided */ + /* exports used: default */ + /*!***************************************************!*\ + !*** ./~/react-addons-pure-render-mixin/index.js ***! + \***************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '/**\n * Copyright 2015-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar shallowEqual = __webpack_require__(/*! fbjs/lib/shallowEqual */ 97);\n\nmodule.exports = {\n shouldComponentUpdate: function(nextProps, nextState) {\n return (\n !shallowEqual(this.props, nextProps) ||\n !shallowEqual(this.state, nextState)\n );\n },\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-addons-pure-render-mixin/index.js\n// module id = 117\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-addons-pure-render-mixin/index.js?', + ); + + /***/ + }, + /* 118 */ + /* unknown exports provided */ + /* all exports used */ + /*!*************************************************!*\ + !*** ./~/react-addons-shallow-compare/index.js ***! + \*************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * @providesModule shallowCompare\n */\n\n\n\nvar shallowEqual = __webpack_require__(/*! fbjs/lib/shallowEqual */ 97);\n\n/**\n * Does a shallow comparison for props and state.\n * See ReactComponentWithPureRenderMixin\n * See also https://facebook.github.io/react/docs/shallow-compare.html\n */\nfunction shallowCompare(instance, nextProps, nextState) {\n return (\n !shallowEqual(instance.props, nextProps) ||\n !shallowEqual(instance.state, nextState)\n );\n}\n\nmodule.exports = shallowCompare;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-addons-shallow-compare/index.js\n// module id = 118\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-addons-shallow-compare/index.js?', + ); + + /***/ + }, + /* 119 */ + /* exports provided: default */ + /* exports used: default */ + /*!****************************************!*\ + !*** ./~/react-bootstrap/es/Button.js ***! + \****************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_object_values__ = __webpack_require__(/*! babel-runtime/core-js/object/values */ 92);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_object_values___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_object_values__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ 9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_extends__ = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_extends__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_classCallCheck__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_classCallCheck__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ 7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_react_prop_types_lib_elementType__ = __webpack_require__(/*! react-prop-types/lib/elementType */ 18);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_react_prop_types_lib_elementType___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_react_prop_types_lib_elementType__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__utils_bootstrapUtils__ = __webpack_require__(/*! ./utils/bootstrapUtils */ 10);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__utils_StyleConfig__ = __webpack_require__(/*! ./utils/StyleConfig */ 32);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__SafeAnchor__ = __webpack_require__(/*! ./SafeAnchor */ 54);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar propTypes = {\n active: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.bool,\n disabled: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.bool,\n block: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.bool,\n onClick: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.func,\n componentClass: __WEBPACK_IMPORTED_MODULE_9_react_prop_types_lib_elementType___default.a,\n href: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.string,\n /**\n * Defines HTML button type attribute\n * @defaultValue \'button\'\n */\n type: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.oneOf([\'button\', \'reset\', \'submit\'])\n};\n\nvar defaultProps = {\n active: false,\n block: false,\n disabled: false\n};\n\nvar Button = function (_React$Component) {\n __WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits___default()(Button, _React$Component);\n\n function Button() {\n __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_classCallCheck___default()(this, Button);\n\n return __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.apply(this, arguments));\n }\n\n Button.prototype.renderAnchor = function renderAnchor(elementProps, className) {\n return __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_12__SafeAnchor__["a" /* default */], __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_extends___default()({}, elementProps, {\n className: __WEBPACK_IMPORTED_MODULE_6_classnames___default()(className, elementProps.disabled && \'disabled\')\n }));\n };\n\n Button.prototype.renderButton = function renderButton(_ref, className) {\n var componentClass = _ref.componentClass,\n elementProps = __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default()(_ref, [\'componentClass\']);\n\n var Component = componentClass || \'button\';\n\n return __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement(Component, __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_extends___default()({}, elementProps, {\n type: elementProps.type || \'button\',\n className: className\n }));\n };\n\n Button.prototype.render = function render() {\n var _extends2;\n\n var _props = this.props,\n active = _props.active,\n block = _props.block,\n className = _props.className,\n props = __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default()(_props, [\'active\', \'block\', \'className\']);\n\n var _splitBsProps = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_10__utils_bootstrapUtils__["a" /* splitBsProps */])(props),\n bsProps = _splitBsProps[0],\n elementProps = _splitBsProps[1];\n\n var classes = __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_extends___default()({}, __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_10__utils_bootstrapUtils__["b" /* getClassSet */])(bsProps), (_extends2 = {\n active: active\n }, _extends2[__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_10__utils_bootstrapUtils__["e" /* prefix */])(bsProps, \'block\')] = block, _extends2));\n var fullClassName = __WEBPACK_IMPORTED_MODULE_6_classnames___default()(className, classes);\n\n if (elementProps.href) {\n return this.renderAnchor(elementProps, fullClassName);\n }\n\n return this.renderButton(elementProps, fullClassName);\n };\n\n return Button;\n}(__WEBPACK_IMPORTED_MODULE_7_react___default.a.Component);\n\nButton.propTypes = propTypes;\nButton.defaultProps = defaultProps;\n\n/* harmony default export */ __webpack_exports__["a"] = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_10__utils_bootstrapUtils__["c" /* bsClass */])(\'btn\', __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_10__utils_bootstrapUtils__["d" /* bsSizes */])([__WEBPACK_IMPORTED_MODULE_11__utils_StyleConfig__["b" /* Size */].LARGE, __WEBPACK_IMPORTED_MODULE_11__utils_StyleConfig__["b" /* Size */].SMALL, __WEBPACK_IMPORTED_MODULE_11__utils_StyleConfig__["b" /* Size */].XSMALL], __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_10__utils_bootstrapUtils__["g" /* bsStyles */])([].concat(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_object_values___default()(__WEBPACK_IMPORTED_MODULE_11__utils_StyleConfig__["c" /* State */]), [__WEBPACK_IMPORTED_MODULE_11__utils_StyleConfig__["d" /* Style */].DEFAULT, __WEBPACK_IMPORTED_MODULE_11__utils_StyleConfig__["d" /* Style */].PRIMARY, __WEBPACK_IMPORTED_MODULE_11__utils_StyleConfig__["d" /* Style */].LINK]), __WEBPACK_IMPORTED_MODULE_11__utils_StyleConfig__["d" /* Style */].DEFAULT, Button))));\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/Button.js\n// module id = 119\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/Button.js?', + ); + + /***/ + }, + /* 120 */ + /* unknown exports provided */ + /* all exports used */ + /*!****************************************************************!*\ + !*** ./~/react-dates/lib/shapes/ScrollableOrientationShape.js ***! + \****************************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + 'Object.defineProperty(exports, "__esModule", {\n value: true\n});\n\nvar _react = __webpack_require__(/*! react */ 1);\n\nvar _constants = __webpack_require__(/*! ../../constants */ 29);\n\nexports[\'default\'] = _react.PropTypes.oneOf([_constants.HORIZONTAL_ORIENTATION, _constants.VERTICAL_ORIENTATION, _constants.VERTICAL_SCROLLABLE]);\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dates/lib/shapes/ScrollableOrientationShape.js\n// module id = 120\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dates/lib/shapes/ScrollableOrientationShape.js?', + ); + + /***/ + }, + /* 121 */ + /* unknown exports provided */ + /* all exports used */ + /*!**********************************************************!*\ + !*** ./~/react-dates/lib/utils/isInclusivelyAfterDay.js ***! + \**********************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "Object.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports['default'] = isInclusivelyAfterDay;\n\nvar _moment = __webpack_require__(/*! moment */ 3);\n\nvar _moment2 = _interopRequireDefault(_moment);\n\nvar _isSameDay = __webpack_require__(/*! ./isSameDay */ 99);\n\nvar _isSameDay2 = _interopRequireDefault(_isSameDay);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nfunction isInclusivelyAfterDay(a, b) {\n if (!_moment2['default'].isMoment(a) || !_moment2['default'].isMoment(b)) return false;\n return a.isAfter(b) || (0, _isSameDay2['default'])(a, b);\n}\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dates/lib/utils/isInclusivelyAfterDay.js\n// module id = 121\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dates/lib/utils/isInclusivelyAfterDay.js?", + ); + + /***/ + }, + /* 122 */ + /* unknown exports provided */ + /* all exports used */ + /*!***************************************************!*\ + !*** ./~/react-dates/lib/utils/toMomentObject.js ***! + \***************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "Object.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports['default'] = toMomentObject;\n\nvar _moment = __webpack_require__(/*! moment */ 3);\n\nvar _moment2 = _interopRequireDefault(_moment);\n\nvar _constants = __webpack_require__(/*! ../../constants */ 29);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nfunction toMomentObject(dateString, customFormat) {\n var dateFormats = customFormat ? [customFormat, _constants.DISPLAY_FORMAT, _constants.ISO_FORMAT] : [_constants.DISPLAY_FORMAT, _constants.ISO_FORMAT];\n\n var date = (0, _moment2['default'])(dateString, dateFormats, true);\n return date.isValid() ? date.hour(12) : null;\n}\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dates/lib/utils/toMomentObject.js\n// module id = 122\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dates/lib/utils/toMomentObject.js?", + ); + + /***/ + }, + /* 123 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************************!*\ + !*** ./~/react-dom/lib/EventPluginHub.js ***! + \*******************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar _prodInvariant = __webpack_require__(/*! ./reactProdInvariant */ 17);\n\nvar EventPluginRegistry = __webpack_require__(/*! ./EventPluginRegistry */ 168);\nvar EventPluginUtils = __webpack_require__(/*! ./EventPluginUtils */ 247);\nvar ReactErrorUtils = __webpack_require__(/*! ./ReactErrorUtils */ 251);\n\nvar accumulateInto = __webpack_require__(/*! ./accumulateInto */ 550);\nvar forEachAccumulated = __webpack_require__(/*! ./forEachAccumulated */ 551);\nvar invariant = __webpack_require__(/*! fbjs/lib/invariant */ 12);\n\n/**\n * Internal store for event listeners\n */\nvar listenerBank = {};\n\n/**\n * Internal queue of events that have accumulated their dispatches and are\n * waiting to have their dispatches executed.\n */\nvar eventQueue = null;\n\n/**\n * Dispatches an event and releases it back into the pool, unless persistent.\n *\n * @param {?object} event Synthetic event to be dispatched.\n * @param {boolean} simulated If the event is simulated (changes exn behavior)\n * @private\n */\nvar executeDispatchesAndRelease = function (event, simulated) {\n if (event) {\n EventPluginUtils.executeDispatchesInOrder(event, simulated);\n\n if (!event.isPersistent()) {\n event.constructor.release(event);\n }\n }\n};\nvar executeDispatchesAndReleaseSimulated = function (e) {\n return executeDispatchesAndRelease(e, true);\n};\nvar executeDispatchesAndReleaseTopLevel = function (e) {\n return executeDispatchesAndRelease(e, false);\n};\n\nvar getDictionaryKey = function (inst) {\n // Prevents V8 performance issue:\n // https://github.com/facebook/react/pull/7232\n return '.' + inst._rootNodeID;\n};\n\nfunction isInteractive(tag) {\n return tag === 'button' || tag === 'input' || tag === 'select' || tag === 'textarea';\n}\n\nfunction shouldPreventMouseEvent(name, type, props) {\n switch (name) {\n case 'onClick':\n case 'onClickCapture':\n case 'onDoubleClick':\n case 'onDoubleClickCapture':\n case 'onMouseDown':\n case 'onMouseDownCapture':\n case 'onMouseMove':\n case 'onMouseMoveCapture':\n case 'onMouseUp':\n case 'onMouseUpCapture':\n return !!(props.disabled && isInteractive(type));\n default:\n return false;\n }\n}\n\n/**\n * This is a unified interface for event plugins to be installed and configured.\n *\n * Event plugins can implement the following properties:\n *\n * `extractEvents` {function(string, DOMEventTarget, string, object): *}\n * Required. When a top-level event is fired, this method is expected to\n * extract synthetic events that will in turn be queued and dispatched.\n *\n * `eventTypes` {object}\n * Optional, plugins that fire events must publish a mapping of registration\n * names that are used to register listeners. Values of this mapping must\n * be objects that contain `registrationName` or `phasedRegistrationNames`.\n *\n * `executeDispatch` {function(object, function, string)}\n * Optional, allows plugins to override how an event gets dispatched. By\n * default, the listener is simply invoked.\n *\n * Each plugin that is injected into `EventsPluginHub` is immediately operable.\n *\n * @public\n */\nvar EventPluginHub = {\n\n /**\n * Methods for injecting dependencies.\n */\n injection: {\n\n /**\n * @param {array} InjectedEventPluginOrder\n * @public\n */\n injectEventPluginOrder: EventPluginRegistry.injectEventPluginOrder,\n\n /**\n * @param {object} injectedNamesToPlugins Map from names to plugin modules.\n */\n injectEventPluginsByName: EventPluginRegistry.injectEventPluginsByName\n\n },\n\n /**\n * Stores `listener` at `listenerBank[registrationName][key]`. Is idempotent.\n *\n * @param {object} inst The instance, which is the source of events.\n * @param {string} registrationName Name of listener (e.g. `onClick`).\n * @param {function} listener The callback to store.\n */\n putListener: function (inst, registrationName, listener) {\n !(typeof listener === 'function') ? true ? invariant(false, 'Expected %s listener to be a function, instead got type %s', registrationName, typeof listener) : _prodInvariant('94', registrationName, typeof listener) : void 0;\n\n var key = getDictionaryKey(inst);\n var bankForRegistrationName = listenerBank[registrationName] || (listenerBank[registrationName] = {});\n bankForRegistrationName[key] = listener;\n\n var PluginModule = EventPluginRegistry.registrationNameModules[registrationName];\n if (PluginModule && PluginModule.didPutListener) {\n PluginModule.didPutListener(inst, registrationName, listener);\n }\n },\n\n /**\n * @param {object} inst The instance, which is the source of events.\n * @param {string} registrationName Name of listener (e.g. `onClick`).\n * @return {?function} The stored callback.\n */\n getListener: function (inst, registrationName) {\n // TODO: shouldPreventMouseEvent is DOM-specific and definitely should not\n // live here; needs to be moved to a better place soon\n var bankForRegistrationName = listenerBank[registrationName];\n if (shouldPreventMouseEvent(registrationName, inst._currentElement.type, inst._currentElement.props)) {\n return null;\n }\n var key = getDictionaryKey(inst);\n return bankForRegistrationName && bankForRegistrationName[key];\n },\n\n /**\n * Deletes a listener from the registration bank.\n *\n * @param {object} inst The instance, which is the source of events.\n * @param {string} registrationName Name of listener (e.g. `onClick`).\n */\n deleteListener: function (inst, registrationName) {\n var PluginModule = EventPluginRegistry.registrationNameModules[registrationName];\n if (PluginModule && PluginModule.willDeleteListener) {\n PluginModule.willDeleteListener(inst, registrationName);\n }\n\n var bankForRegistrationName = listenerBank[registrationName];\n // TODO: This should never be null -- when is it?\n if (bankForRegistrationName) {\n var key = getDictionaryKey(inst);\n delete bankForRegistrationName[key];\n }\n },\n\n /**\n * Deletes all listeners for the DOM element with the supplied ID.\n *\n * @param {object} inst The instance, which is the source of events.\n */\n deleteAllListeners: function (inst) {\n var key = getDictionaryKey(inst);\n for (var registrationName in listenerBank) {\n if (!listenerBank.hasOwnProperty(registrationName)) {\n continue;\n }\n\n if (!listenerBank[registrationName][key]) {\n continue;\n }\n\n var PluginModule = EventPluginRegistry.registrationNameModules[registrationName];\n if (PluginModule && PluginModule.willDeleteListener) {\n PluginModule.willDeleteListener(inst, registrationName);\n }\n\n delete listenerBank[registrationName][key];\n }\n },\n\n /**\n * Allows registered plugins an opportunity to extract events from top-level\n * native browser events.\n *\n * @return {*} An accumulation of synthetic events.\n * @internal\n */\n extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {\n var events;\n var plugins = EventPluginRegistry.plugins;\n for (var i = 0; i < plugins.length; i++) {\n // Not every plugin in the ordering may be loaded at runtime.\n var possiblePlugin = plugins[i];\n if (possiblePlugin) {\n var extractedEvents = possiblePlugin.extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget);\n if (extractedEvents) {\n events = accumulateInto(events, extractedEvents);\n }\n }\n }\n return events;\n },\n\n /**\n * Enqueues a synthetic event that should be dispatched when\n * `processEventQueue` is invoked.\n *\n * @param {*} events An accumulation of synthetic events.\n * @internal\n */\n enqueueEvents: function (events) {\n if (events) {\n eventQueue = accumulateInto(eventQueue, events);\n }\n },\n\n /**\n * Dispatches all synthetic events on the event queue.\n *\n * @internal\n */\n processEventQueue: function (simulated) {\n // Set `eventQueue` to null before processing it so that we can tell if more\n // events get enqueued while processing.\n var processingEventQueue = eventQueue;\n eventQueue = null;\n if (simulated) {\n forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseSimulated);\n } else {\n forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseTopLevel);\n }\n !!eventQueue ? true ? invariant(false, 'processEventQueue(): Additional events were enqueued while processing an event queue. Support for this has not yet been implemented.') : _prodInvariant('95') : void 0;\n // This would be a good time to rethrow if any of the event handlers threw.\n ReactErrorUtils.rethrowCaughtError();\n },\n\n /**\n * These are needed for tests only. Do not use!\n */\n __purge: function () {\n listenerBank = {};\n },\n\n __getListenerBank: function () {\n return listenerBank;\n }\n\n};\n\nmodule.exports = EventPluginHub;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/EventPluginHub.js\n// module id = 123\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/EventPluginHub.js?", + ); + + /***/ + }, + /* 124 */ + /* unknown exports provided */ + /* all exports used */ + /*!*********************************************!*\ + !*** ./~/react-dom/lib/EventPropagators.js ***! + \*********************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar EventPluginHub = __webpack_require__(/*! ./EventPluginHub */ 123);\nvar EventPluginUtils = __webpack_require__(/*! ./EventPluginUtils */ 247);\n\nvar accumulateInto = __webpack_require__(/*! ./accumulateInto */ 550);\nvar forEachAccumulated = __webpack_require__(/*! ./forEachAccumulated */ 551);\nvar warning = __webpack_require__(/*! fbjs/lib/warning */ 13);\n\nvar getListener = EventPluginHub.getListener;\n\n/**\n * Some event types have a notion of different registration names for different\n * "phases" of propagation. This finds listeners by a given phase.\n */\nfunction listenerAtPhase(inst, event, propagationPhase) {\n var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n return getListener(inst, registrationName);\n}\n\n/**\n * Tags a `SyntheticEvent` with dispatched listeners. Creating this function\n * here, allows us to not have to bind or create functions for each event.\n * Mutating the event\'s members allows us to not have to create a wrapping\n * "dispatch" object that pairs the event with the listener.\n */\nfunction accumulateDirectionalDispatches(inst, phase, event) {\n if (true) {\n true ? warning(inst, \'Dispatching inst must not be null\') : void 0;\n }\n var listener = listenerAtPhase(inst, event, phase);\n if (listener) {\n event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n }\n}\n\n/**\n * Collect dispatches (must be entirely collected before dispatching - see unit\n * tests). Lazily allocate the array to conserve memory. We must loop through\n * each event and perform the traversal for each one. We cannot perform a\n * single traversal for the entire collection of events because each event may\n * have a different target.\n */\nfunction accumulateTwoPhaseDispatchesSingle(event) {\n if (event && event.dispatchConfig.phasedRegistrationNames) {\n EventPluginUtils.traverseTwoPhase(event._targetInst, accumulateDirectionalDispatches, event);\n }\n}\n\n/**\n * Same as `accumulateTwoPhaseDispatchesSingle`, but skips over the targetID.\n */\nfunction accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n if (event && event.dispatchConfig.phasedRegistrationNames) {\n var targetInst = event._targetInst;\n var parentInst = targetInst ? EventPluginUtils.getParentInstance(targetInst) : null;\n EventPluginUtils.traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n }\n}\n\n/**\n * Accumulates without regard to direction, does not look for phased\n * registration names. Same as `accumulateDirectDispatchesSingle` but without\n * requiring that the `dispatchMarker` be the same as the dispatched ID.\n */\nfunction accumulateDispatches(inst, ignoredDirection, event) {\n if (event && event.dispatchConfig.registrationName) {\n var registrationName = event.dispatchConfig.registrationName;\n var listener = getListener(inst, registrationName);\n if (listener) {\n event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n }\n }\n}\n\n/**\n * Accumulates dispatches on an `SyntheticEvent`, but only for the\n * `dispatchMarker`.\n * @param {SyntheticEvent} event\n */\nfunction accumulateDirectDispatchesSingle(event) {\n if (event && event.dispatchConfig.registrationName) {\n accumulateDispatches(event._targetInst, null, event);\n }\n}\n\nfunction accumulateTwoPhaseDispatches(events) {\n forEachAccumulated(events, accumulateTwoPhaseDispatchesSingle);\n}\n\nfunction accumulateTwoPhaseDispatchesSkipTarget(events) {\n forEachAccumulated(events, accumulateTwoPhaseDispatchesSingleSkipTarget);\n}\n\nfunction accumulateEnterLeaveDispatches(leave, enter, from, to) {\n EventPluginUtils.traverseEnterLeave(from, to, accumulateDispatches, leave, enter);\n}\n\nfunction accumulateDirectDispatches(events) {\n forEachAccumulated(events, accumulateDirectDispatchesSingle);\n}\n\n/**\n * A small set of propagation patterns, each of which will accept a small amount\n * of information, and generate a set of "dispatch ready event objects" - which\n * are sets of events that have already been annotated with a set of dispatched\n * listener functions/ids. The API is designed this way to discourage these\n * propagation strategies from actually executing the dispatches, since we\n * always want to collect the entire set of dispatches before executing event a\n * single one.\n *\n * @constructor EventPropagators\n */\nvar EventPropagators = {\n accumulateTwoPhaseDispatches: accumulateTwoPhaseDispatches,\n accumulateTwoPhaseDispatchesSkipTarget: accumulateTwoPhaseDispatchesSkipTarget,\n accumulateDirectDispatches: accumulateDirectDispatches,\n accumulateEnterLeaveDispatches: accumulateEnterLeaveDispatches\n};\n\nmodule.exports = EventPropagators;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/EventPropagators.js\n// module id = 124\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/EventPropagators.js?', + ); + + /***/ + }, + /* 125 */ + /* unknown exports provided */ + /* all exports used */ + /*!*********************************************!*\ + !*** ./~/react-dom/lib/ReactInstanceMap.js ***! + \*********************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\n/**\n * `ReactInstanceMap` maintains a mapping from a public facing stateful\n * instance (key) and the internal representation (value). This allows public\n * methods to accept the user facing instance as an argument and map them back\n * to internal methods.\n */\n\n// TODO: Replace this with ES6: var ReactInstanceMap = new Map();\n\nvar ReactInstanceMap = {\n\n /**\n * This API should be called `delete` but we'd have to make sure to always\n * transform these to strings for IE support. When this transform is fully\n * supported we can rename it.\n */\n remove: function (key) {\n key._reactInternalInstance = undefined;\n },\n\n get: function (key) {\n return key._reactInternalInstance;\n },\n\n has: function (key) {\n return key._reactInternalInstance !== undefined;\n },\n\n set: function (key, value) {\n key._reactInternalInstance = value;\n }\n\n};\n\nmodule.exports = ReactInstanceMap;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/ReactInstanceMap.js\n// module id = 125\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/ReactInstanceMap.js?", + ); + + /***/ + }, + /* 126 */ + /* unknown exports provided */ + /* all exports used */ + /*!*********************************************!*\ + !*** ./~/react-dom/lib/SyntheticUIEvent.js ***! + \*********************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar SyntheticEvent = __webpack_require__(/*! ./SyntheticEvent */ 59);\n\nvar getEventTarget = __webpack_require__(/*! ./getEventTarget */ 256);\n\n/**\n * @interface UIEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\nvar UIEventInterface = {\n view: function (event) {\n if (event.view) {\n return event.view;\n }\n\n var target = getEventTarget(event);\n if (target.window === target) {\n // target is a window object\n return target;\n }\n\n var doc = target.ownerDocument;\n // TODO: Figure out why `ownerDocument` is sometimes undefined in IE8.\n if (doc) {\n return doc.defaultView || doc.parentWindow;\n } else {\n return window;\n }\n },\n detail: function (event) {\n return event.detail || 0;\n }\n};\n\n/**\n * @param {object} dispatchConfig Configuration used to dispatch this event.\n * @param {string} dispatchMarker Marker identifying the event target.\n * @param {object} nativeEvent Native browser event.\n * @extends {SyntheticEvent}\n */\nfunction SyntheticUIEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {\n return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);\n}\n\nSyntheticEvent.augmentClass(SyntheticUIEvent, UIEventInterface);\n\nmodule.exports = SyntheticUIEvent;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/SyntheticUIEvent.js\n// module id = 126\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/SyntheticUIEvent.js?', + ); + + /***/ + }, + /* 127 */ + /* unknown exports provided */ + /* all exports used */ + /*!*****************************************************!*\ + !*** ./~/react-overlays/lib/utils/ownerDocument.js ***! + \*****************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\n\nexports.default = function (componentOrElement) {\n return (0, _ownerDocument2.default)(_reactDom2.default.findDOMNode(componentOrElement));\n};\n\nvar _reactDom = __webpack_require__(/*! react-dom */ 16);\n\nvar _reactDom2 = _interopRequireDefault(_reactDom);\n\nvar _ownerDocument = __webpack_require__(/*! dom-helpers/ownerDocument */ 94);\n\nvar _ownerDocument2 = _interopRequireDefault(_ownerDocument);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nmodule.exports = exports[\'default\'];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-overlays/lib/utils/ownerDocument.js\n// module id = 127\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-overlays/lib/utils/ownerDocument.js?', + ); + + /***/ + }, + /* 128 */ + /* exports provided: falsy, history, component, components, route, routes */ + /* exports used: component, components, falsy, routes */ + /*!************************************************!*\ + !*** ./~/react-router/es/InternalPropTypes.js ***! + \************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony export (immutable) */ __webpack_exports__["c"] = falsy;\n/* unused harmony export history */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return component; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return components; });\n/* unused harmony export route */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return routes; });\n\n\nvar func = __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func,\n object = __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].object,\n arrayOf = __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].arrayOf,\n oneOfType = __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].oneOfType,\n element = __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].element,\n shape = __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].shape,\n string = __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].string;\n\n\nfunction falsy(props, propName, componentName) {\n if (props[propName]) return new Error(\'<\' + componentName + \'> should not have a "\' + propName + \'" prop\');\n}\n\nvar history = shape({\n listen: func.isRequired,\n push: func.isRequired,\n replace: func.isRequired,\n go: func.isRequired,\n goBack: func.isRequired,\n goForward: func.isRequired\n});\n\nvar component = oneOfType([func, string]);\nvar components = oneOfType([component, object]);\nvar route = oneOfType([object, element]);\nvar routes = oneOfType([route, arrayOf(route)]);\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-router/es/InternalPropTypes.js\n// module id = 128\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-router/es/InternalPropTypes.js?', + ); + + /***/ + }, + /* 129 */ + /* exports provided: createStore, combineReducers, bindActionCreators, applyMiddleware, compose */ + /* all exports used */ + /*!*****************************!*\ + !*** ./~/redux/es/index.js ***! + \*****************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + 'Object.defineProperty(__webpack_exports__, "__esModule", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createStore__ = __webpack_require__(/*! ./createStore */ 587);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__combineReducers__ = __webpack_require__(/*! ./combineReducers */ 1486);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__bindActionCreators__ = __webpack_require__(/*! ./bindActionCreators */ 1485);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__applyMiddleware__ = __webpack_require__(/*! ./applyMiddleware */ 1484);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__compose__ = __webpack_require__(/*! ./compose */ 586);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__utils_warning__ = __webpack_require__(/*! ./utils/warning */ 588);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "createStore", function() { return __WEBPACK_IMPORTED_MODULE_0__createStore__["a"]; });\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "combineReducers", function() { return __WEBPACK_IMPORTED_MODULE_1__combineReducers__["a"]; });\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "bindActionCreators", function() { return __WEBPACK_IMPORTED_MODULE_2__bindActionCreators__["a"]; });\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "applyMiddleware", function() { return __WEBPACK_IMPORTED_MODULE_3__applyMiddleware__["a"]; });\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "compose", function() { return __WEBPACK_IMPORTED_MODULE_4__compose__["a"]; });\n\n\n\n\n\n\n\n/*\n* This is a dummy function to check if the function name has been altered by minification.\n* If the function has been minified and NODE_ENV !== \'production\', warn the user.\n*/\nfunction isCrushed() {}\n\nif ("dev" !== \'production\' && typeof isCrushed.name === \'string\' && isCrushed.name !== \'isCrushed\') {\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__utils_warning__["a" /* default */])(\'You are currently using minified code outside of NODE_ENV === \\\'production\\\'. \' + \'This means that you are running a slower development build of Redux. \' + \'You can use loose-envify (https://github.com/zertosh/loose-envify) for browserify \' + \'or DefinePlugin for webpack (http://stackoverflow.com/questions/30030031) \' + \'to ensure you have the correct code for your production build.\');\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/redux/es/index.js\n// module id = 129\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/redux/es/index.js?', + ); + + /***/ + }, + /* 130 */ + /* exports provided: default */ + /* all exports used */ + /*!***********************************************!*\ + !*** ./app/assets/styles/resources/colors.js ***! + \***********************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "Object.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n teal: '#51ba9f',\n\n // colored: main\n primary: '#5ebfdc',\n success: '#5cb85c',\n info: '#5bc0de',\n warning: '#cb7516',\n danger: '#f9565b',\n\n // colored: messages\n successText: '#3c763d',\n successBg: '#dff0d8',\n\n infoText: '#31708f',\n infoBg: '#d9edf7',\n\n warningText: '#8a6d3b',\n warningBg: '#fcf8e3',\n\n dangerText: '#a94442',\n dangerBg: '#f2dede',\n\n // colored: additional\n primaryLight: '#eff9fc',\n\n // monochrome\n grayBase: '#000',\n grayDarkest: '#111',\n grayDarker: '#222',\n grayDark: '#333',\n gray: '#555',\n grayLight: '#777',\n grayLighter: '#a6a6a6',\n grayLightest: '#eee'\n});\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/assets/styles/resources/colors.js\n// module id = 130\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/assets/styles/resources/colors.js?", + ); + + /***/ + }, + /* 131 */ + /* exports provided: NAVBAR_HEIGHT, RELATIONSHIP_MEMBERSHIP_COLOR, RELATIONSHIP_CONTACT_COLOR, RELATIONSHIP_FB_FRIEND_COLOR, RELATIONSHIP_PUBLIC_GUEST_COLOR, RELATIONSHIP_OWNER_COLOR */ + /* exports used: RELATIONSHIP_MEMBERSHIP_COLOR, RELATIONSHIP_FB_FRIEND_COLOR, RELATIONSHIP_OWNER_COLOR, RELATIONSHIP_PUBLIC_GUEST_COLOR, NAVBAR_HEIGHT */ + /*!**************************************************!*\ + !*** ./app/assets/styles/resources/variables.js ***! + \**************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return NAVBAR_HEIGHT; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return RELATIONSHIP_MEMBERSHIP_COLOR; });\n/* unused harmony export RELATIONSHIP_CONTACT_COLOR */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return RELATIONSHIP_FB_FRIEND_COLOR; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return RELATIONSHIP_PUBLIC_GUEST_COLOR; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return RELATIONSHIP_OWNER_COLOR; });\n\n\n/**\n * @desc This module contains copies of SCSS variables from `./variables.scss`\n * that are used in JS components. Keep it in sync!\n */\n\n// Navbar\nvar NAVBAR_HEIGHT = 60;\n\n// Relationship Type Colors\nvar RELATIONSHIP_MEMBERSHIP_COLOR = \'#38b498\';\nvar RELATIONSHIP_CONTACT_COLOR = \'#4d71b9\';\nvar RELATIONSHIP_FB_FRIEND_COLOR = RELATIONSHIP_CONTACT_COLOR;\nvar RELATIONSHIP_PUBLIC_GUEST_COLOR = \'#d65be8\';\nvar RELATIONSHIP_OWNER_COLOR = \'#38b498\';\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/assets/styles/resources/variables.js\n// module id = 131\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/assets/styles/resources/variables.js?', + ); + + /***/ + }, + /* 132 */ + /* exports provided: default */ + /* exports used: default */ + /*!*****************************************************************!*\ + !*** ./app/bundles/layout-navbar/components/Dropdown/index.jsx ***! + \*****************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_bootstrap__ = __webpack_require__(/*! react-bootstrap */ 31);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Dropdown_scss__ = __webpack_require__(/*! ./Dropdown.scss */ 962);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Dropdown_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__Dropdown_scss__);\n\n\n\n\n\nvar Dropdown = function Dropdown(props) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_1_react_bootstrap__["l" /* NavDropdown */],\n { id: props.id, className: __WEBPACK_IMPORTED_MODULE_2__Dropdown_scss___default.a.Dropdown, title: props.title, noCaret: true },\n props.children\n );\n};\n\nDropdown.propTypes = {\n id: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n className: __webpack_require__(/*! prop-types */ 0).string,\n title: __webpack_require__(/*! prop-types */ 0).any.isRequired,\n children: __webpack_require__(/*! prop-types */ 0).any\n};\n/* harmony default export */ __webpack_exports__["a"] = (Dropdown);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/layout-navbar/components/Dropdown/index.jsx\n// module id = 132\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/layout-navbar/components/Dropdown/index.jsx?', + ); + + /***/ + }, + /* 133 */ + /* exports provided: default */ + /* exports used: default */ + /*!*********************************************************************!*\ + !*** ./app/bundles/layout-navbar/components/DropdownItem/index.jsx ***! + \*********************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_bootstrap__ = __webpack_require__(/*! react-bootstrap */ 31);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_fp__ = __webpack_require__(/*! lodash/fp */ 14);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_fp___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_lodash_fp__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__DropdownItem_scss__ = __webpack_require__(/*! ./DropdownItem.scss */ 963);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__DropdownItem_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__DropdownItem_scss__);\n\n\n\n\n\n\nvar DropdownItem = function DropdownItem(props) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_1_react_bootstrap__[\"d\" /* MenuItem */],\n {\n className: __WEBPACK_IMPORTED_MODULE_3__DropdownItem_scss___default.a.DropdownItem,\n href: props.href,\n rel: props.external ? 'noopener noreferrer' : undefined,\n target: props.external ? '_blank' : undefined\n },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'span',\n { className: __WEBPACK_IMPORTED_MODULE_3__DropdownItem_scss___default.a.label },\n props.name,\n __WEBPACK_IMPORTED_MODULE_2_lodash_fp___default.a.lt(0, props.notificationsCount) && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'span',\n { className: __WEBPACK_IMPORTED_MODULE_3__DropdownItem_scss___default.a.count },\n props.notificationsCount\n )\n )\n );\n};\n\nDropdownItem.propTypes = {\n href: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n name: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n external: __webpack_require__(/*! prop-types */ 0).bool,\n notificationsCount: __webpack_require__(/*! prop-types */ 0).number\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (DropdownItem);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/layout-navbar/components/DropdownItem/index.jsx\n// module id = 133\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/layout-navbar/components/DropdownItem/index.jsx?", + ); + + /***/ + }, + /* 134 */ + /* exports provided: default */ + /* exports used: default */ + /*!**********************************************************************!*\ + !*** ./app/bundles/layout-navbar/components/DropdownTitle/index.jsx ***! + \**********************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_fp__ = __webpack_require__(/*! lodash/fp */ 14);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_fp___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_lodash_fp__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__DropdownTitle_scss__ = __webpack_require__(/*! ./DropdownTitle.scss */ 964);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__DropdownTitle_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__DropdownTitle_scss__);\nfunction _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\n\n\n\n\n\n// $$FlowFixMe\nvar DropdownTitleWithChildren = function DropdownTitleWithChildren(props) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_3__DropdownTitle_scss___default.a.DropdownTitle, 'data-test-id': props.dataTestId },\n props.children\n );\n};\n\nDropdownTitleWithChildren.propTypes = {\n dataTestId: __webpack_require__(/*! prop-types */ 0).string,\n children: __webpack_require__(/*! prop-types */ 0).any,\n name: function name(props, propName, componentName) {\n if (props[propName] != null) return new Error('Invalid prop `' + propName + '` of value `' + value + '` passed to `' + componentName + '`. Expected undefined or null.');\n },\n Icon: function Icon(props, propName, componentName) {\n if (props[propName] != null) return new Error('Invalid prop `' + propName + '` of value `' + value + '` passed to `' + componentName + '`. Expected undefined or null.');\n },\n notificationsCount: function notificationsCount(props, propName, componentName) {\n if (props[propName] != null) return new Error('Invalid prop `' + propName + '` of value `' + value + '` passed to `' + componentName + '`. Expected undefined or null.');\n },\n nameClassName: function nameClassName(props, propName, componentName) {\n if (props[propName] != null) return new Error('Invalid prop `' + propName + '` of value `' + value + '` passed to `' + componentName + '`. Expected undefined or null.');\n }\n};\n\n\nvar DropdownTitleWithName = function DropdownTitleWithName(props) {\n var _classNames, _classNames2, _classNames3;\n\n return props.Icon ? __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n {\n className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()(__WEBPACK_IMPORTED_MODULE_3__DropdownTitle_scss___default.a.DropdownTitle, __WEBPACK_IMPORTED_MODULE_3__DropdownTitle_scss___default.a.iconWrapper),\n 'data-test-id': props.dataTestId\n },\n props.Icon && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(props.Icon, {\n className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()(__WEBPACK_IMPORTED_MODULE_3__DropdownTitle_scss___default.a.icon, (_classNames = {}, _defineProperty(_classNames, __WEBPACK_IMPORTED_MODULE_3__DropdownTitle_scss___default.a.icon__marginRight, props.addMarginRightToIcon), _defineProperty(_classNames, 'hidden-sm', props.hideIconSm), _defineProperty(_classNames, 'hidden-md', props.hideIconMd), _defineProperty(_classNames, 'hidden-lg', props.hideIconLg), _classNames))\n }),\n __WEBPACK_IMPORTED_MODULE_2_lodash_fp___default.a.lt(0, props.notificationsCount) && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'span',\n { className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()(__WEBPACK_IMPORTED_MODULE_3__DropdownTitle_scss___default.a.badge, 'hidden-xs') },\n props.notificationsCount\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'span',\n {\n className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()(__WEBPACK_IMPORTED_MODULE_3__DropdownTitle_scss___default.a.name, (_classNames2 = {}, _defineProperty(_classNames2, __WEBPACK_IMPORTED_MODULE_3__DropdownTitle_scss___default.a.name__marginLeft, props.addMarginLeftToName), _defineProperty(_classNames2, 'hidden-sm', props.hideNameSm), _defineProperty(_classNames2, 'hidden-md', props.hideNameMd), _defineProperty(_classNames2, 'hidden-lg', props.hideNameLg), _classNames2))\n },\n props.name\n ),\n __WEBPACK_IMPORTED_MODULE_2_lodash_fp___default.a.lt(0, props.notificationsCount) && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'span',\n { className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()('hidden-sm', 'hidden-md', 'hidden-lg', __WEBPACK_IMPORTED_MODULE_3__DropdownTitle_scss___default.a.mobileMenuCount) },\n props.notificationsCount\n )\n ) : __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_3__DropdownTitle_scss___default.a.DropdownTitle, 'data-test-id': props.dataTestId },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'span',\n {\n className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()(__WEBPACK_IMPORTED_MODULE_3__DropdownTitle_scss___default.a.name, (_classNames3 = {}, _defineProperty(_classNames3, __WEBPACK_IMPORTED_MODULE_3__DropdownTitle_scss___default.a.name__marginLeft, props.addMarginLeftToName), _defineProperty(_classNames3, 'hidden-sm', props.hideNameSm), _defineProperty(_classNames3, 'hidden-md', props.hideNameMd), _defineProperty(_classNames3, 'hidden-lg', props.hideNameLg), _classNames3))\n },\n props.name\n ),\n __WEBPACK_IMPORTED_MODULE_2_lodash_fp___default.a.lt(0, props.notificationsCount) && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'span',\n { className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()('hidden-sm', 'hidden-md', 'hidden-lg', __WEBPACK_IMPORTED_MODULE_3__DropdownTitle_scss___default.a.mobileMenuCount) },\n props.notificationsCount\n )\n );\n};\n\nDropdownTitleWithName.propTypes = {\n dataTestId: __webpack_require__(/*! prop-types */ 0).string,\n name: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n Icon: __webpack_require__(/*! prop-types */ 0).oneOfType([__webpack_require__(/*! prop-types */ 0).any, __webpack_require__(/*! prop-types */ 0).func]),\n notificationsCount: __webpack_require__(/*! prop-types */ 0).number,\n nameClassName: __webpack_require__(/*! prop-types */ 0).string,\n iconClassName: __webpack_require__(/*! prop-types */ 0).string,\n children: function children(props, propName, componentName) {\n if (props[propName] != null) return new Error('Invalid prop `' + propName + '` of value `' + value + '` passed to `' + componentName + '`. Expected undefined or null.');\n },\n addMarginRightToIcon: __webpack_require__(/*! prop-types */ 0).bool,\n addMarginLeftToName: __webpack_require__(/*! prop-types */ 0).bool,\n hideIconSm: __webpack_require__(/*! prop-types */ 0).bool,\n hideIconMd: __webpack_require__(/*! prop-types */ 0).bool,\n hideIconLg: __webpack_require__(/*! prop-types */ 0).bool,\n hideNameSm: __webpack_require__(/*! prop-types */ 0).bool,\n hideNameMd: __webpack_require__(/*! prop-types */ 0).bool,\n hideNameLg: __webpack_require__(/*! prop-types */ 0).bool\n};\n\n\nvar DropdownTitle = function DropdownTitle(props) {\n return props.name ? __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(DropdownTitleWithName, props) : __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(DropdownTitleWithChildren, props);\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (DropdownTitle);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/layout-navbar/components/DropdownTitle/index.jsx\n// module id = 134\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/layout-navbar/components/DropdownTitle/index.jsx?", + ); + + /***/ + }, + /* 135 */ + /* exports provided: default */ + /* exports used: default */ + /*!******************************!*\ + !*** ./app/enums/Amenity.js ***! + \******************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__libs_utils_Enum__ = __webpack_require__(/*! ../libs/utils/Enum */ 22);\n// KEEP IN SYNC WITH db/seed_data/amenities.rb\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (new __WEBPACK_IMPORTED_MODULE_0__libs_utils_Enum__[\"a\" /* default */]({\n // good_for\n COUPLES: {\n value: 1, // TODO: Replace w/ string id, we shouldn't dup DB's ids in enums\n label: 'Couples',\n category: 'good_for'\n },\n SOLO_ADVENTURERS: {\n value: 2,\n label: 'Solo adventurers',\n category: 'good_for'\n },\n BUSINESS_TRAVELERS: {\n value: 3,\n label: 'Business travelers',\n category: 'good_for'\n },\n FAMILIES: {\n value: 4,\n label: 'Families (with kids)',\n category: 'good_for'\n },\n BIG_GROUPS: {\n value: 5,\n label: 'Big groups',\n category: 'good_for'\n },\n FURRY_FRIENDS: {\n value: 6,\n label: 'Furry friends (pets)',\n category: 'good_for'\n },\n\n // common\n ESSENTIALS: {\n value: 7,\n label: 'Essentials',\n note: 'Towels, bed sheets, soap, and toilet paper',\n category: 'common'\n },\n WIFI: {\n value: 8,\n label: 'Wifi',\n category: 'common'\n },\n SHAMPOO: {\n value: 9,\n label: 'Shampoo',\n category: 'common'\n },\n CLOSET_DRAWERS: {\n value: 10,\n label: 'Closet/drawers',\n category: 'common'\n },\n TV: {\n value: 11,\n label: 'TV',\n category: 'common'\n },\n HEAT: {\n value: 12,\n label: 'Heat',\n category: 'common'\n },\n AIR_CONDITIONING: {\n value: 13,\n label: 'Air conditioning',\n category: 'common'\n },\n BREAKFAST: {\n value: 14,\n label: 'Breakfast, coffee, tea',\n category: 'common'\n },\n DESK_WORKSPACE: {\n value: 15,\n label: 'Desk/workspace',\n category: 'common'\n },\n FIREPLACE: {\n value: 16,\n label: 'Fireplace',\n category: 'common'\n },\n IRON: {\n value: 17,\n label: 'Iron',\n category: 'common'\n },\n HAIRDRYER: {\n value: 18,\n label: 'Hairdryer',\n category: 'common'\n },\n PETS_IN_THE_HOUSE: {\n value: 19,\n label: 'Pets in the house',\n category: 'common'\n },\n WHEELCHAIR_ACCESSIBLE: {\n value: 20,\n label: 'Wheelchair Accessible',\n category: 'common'\n },\n\n // spaces\n KITCHEN: {\n value: 21,\n label: 'Kitchen',\n category: 'spaces'\n },\n LAUNDRY_WASHER: {\n value: 22,\n label: 'Laundry - washer',\n category: 'spaces'\n },\n LAUNDRY_DRYER: {\n value: 23,\n label: 'Laundry - dryer',\n category: 'spaces'\n },\n PARKING_SPACE: {\n value: 24,\n label: 'Parking space',\n category: 'spaces'\n },\n ELEVATOR: {\n value: 25,\n label: 'Elevator',\n category: 'spaces'\n },\n POOL: {\n value: 26,\n label: 'Pool',\n category: 'spaces'\n },\n HOT_TUB: {\n value: 27,\n label: 'Hot Tub',\n category: 'spaces'\n },\n GYM: {\n value: 28,\n label: 'Gym',\n category: 'spaces'\n },\n\n // safety\n SMOKE_DETECTOR: {\n value: 29,\n label: 'Smoke detector',\n category: 'safety'\n },\n CARBON_MONOXIDE_DETECTOR: {\n value: 30,\n label: 'Carbon monoxide detector',\n category: 'safety'\n },\n FIRST_AID_KIT: {\n value: 31,\n label: 'First aid kit',\n category: 'safety'\n },\n SAFETY_CARD: {\n value: 32,\n label: 'Safety card',\n category: 'safety'\n },\n FIRE_EXTINGUISHER: {\n value: 33,\n label: 'Fire extinguisher',\n category: 'safety'\n },\n LOCK_ON_BEDROOM_DOOR: {\n value: 34,\n label: 'Lock on bedroom door',\n category: 'safety'\n }\n}));\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/enums/Amenity.js\n// module id = 135\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/enums/Amenity.js?", + ); + + /***/ + }, + /* 136 */ + /* exports provided: default */ + /* exports used: default */ + /*!**********************************************!*\ + !*** ./app/enums/ListingRelationshipType.js ***! + \**********************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__libs_utils_Enum__ = __webpack_require__(/*! ../libs/utils/Enum */ 22);\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (new __WEBPACK_IMPORTED_MODULE_0__libs_utils_Enum__[\"a\" /* default */]({\n OWNER: 'owner',\n PUBLIC_GUEST: 'public_guest',\n REQUESTED_MEMBERSHIP: 'requested_membership',\n INVITEE: 'invitee',\n MEMBERSHIP: 'membership'\n}));\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/enums/ListingRelationshipType.js\n// module id = 136\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/enums/ListingRelationshipType.js?", + ); + + /***/ + }, + /* 137 */ + /* exports provided: default */ + /* exports used: default */ + /*!*********************************************************!*\ + !*** ./app/libs/components/ListingTile/ListingTile.jsx ***! + \*********************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_bootstrap__ = __webpack_require__(/*! react-bootstrap */ 31);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_lodash__ = __webpack_require__(/*! lodash */ 19);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_lodash___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_lodash__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__utils_fng_photos__ = __webpack_require__(/*! ../../utils/fng/photos */ 51);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__propTypeShapes__ = __webpack_require__(/*! ../../propTypeShapes */ 57);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6____ = __webpack_require__(/*! .. */ 11);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__utils_fng_listings__ = __webpack_require__(/*! ../../utils/fng/listings */ 192);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__icons_IconPrivate__ = __webpack_require__(/*! ../icons/IconPrivate */ 141);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__enums_RoomType__ = __webpack_require__(/*! ../../../enums/RoomType */ 70);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__enums_PhotoRatio__ = __webpack_require__(/*! ../../../enums/PhotoRatio */ 743);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__enums_RelationshipType__ = __webpack_require__(/*! ../../../enums/RelationshipType */ 87);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__enums_PrivacyMode__ = __webpack_require__(/*! ../../../enums/PrivacyMode */ 69);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__HostInfoCard_HostInfoCard__ = __webpack_require__(/*! ./HostInfoCard/HostInfoCard */ 810);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__ListingFavorite_ListingFavorite__ = __webpack_require__(/*! ./ListingFavorite/ListingFavorite */ 811);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__ListingFavoritesCount_ListingFavoritesCount__ = __webpack_require__(/*! ./ListingFavoritesCount/ListingFavoritesCount */ 812);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__ListingPhoto_ListingPhoto__ = __webpack_require__(/*! ./ListingPhoto/ListingPhoto */ 813);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__ListingPhotoPlaceholder_ListingPhotoPlaceholder__ = __webpack_require__(/*! ./ListingPhotoPlaceholder/ListingPhotoPlaceholder */ 814);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__ListingTile_scss__ = __webpack_require__(/*! ./ListingTile.scss */ 1067);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__ListingTile_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_18__ListingTile_scss__);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _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\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\n\n\n\n\nvar babelPluginFlowReactPropTypes_proptype_Photo = __webpack_require__(/*! ../../../types */ 4).babelPluginFlowReactPropTypes_proptype_Photo || __webpack_require__(/*! react */ 1).PropTypes.any;\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n// FIXME: not always public\n\n\nvar AVATAR_SIZE = 80;\n\nvar ListingTile = function (_React$PureComponent) {\n _inherits(ListingTile, _React$PureComponent);\n\n /* KEEP IN SYNC WITH $host-info-card-height IN HostInfoCard.scss */\n function ListingTile(props) {\n _classCallCheck(this, ListingTile);\n\n var _this = _possibleConstructorReturn(this, (ListingTile.__proto__ || Object.getPrototypeOf(ListingTile)).call(this, props));\n\n __WEBPACK_IMPORTED_MODULE_3_lodash___default.a.bindAll(_this, ['onNext', 'onPrev', 'onHoverListing', 'onUnhoverListing', 'showHostInfoCard', 'hideHostInfoCard', 'showHideHostInfoCard']);\n\n _this.state = {\n photoIndex: 0,\n showHostInfoCard: false,\n hostInfoCardPosition: null,\n hostInfoCardAboveTarget: null,\n backgroundLoadPhotos: null\n };\n\n _this.debouncedShowHideHostInfoCard = __WEBPACK_IMPORTED_MODULE_3_lodash___default.a.debounce(_this.showHideHostInfoCard, 100);\n\n _this.hostDiv = null;\n return _this;\n }\n\n /* KEEP IN SYNC WITH $host-image-size-with-borders IN ListingTile.scss */\n\n\n _createClass(ListingTile, [{\n key: 'showHideHostInfoCard',\n value: function showHideHostInfoCard(showHostInfoCard) {\n if (!this.hostDiv) return;\n\n var _hostDiv$getBoundingC = this.hostDiv.getBoundingClientRect(),\n top = _hostDiv$getBoundingC.top,\n left = _hostDiv$getBoundingC.left;\n\n var hostInfoCardPosition = { left: left };\n var hostInfoCardAboveTarget = void 0;\n\n var topThreshold = ListingTile.HOST_INFO_CARD_HEIGHT + ListingTile.HOST_INFO_CARD_MIN_VERTICAL_OFFSET_IN_VIEWPORT;\n\n if (top < topThreshold) {\n // display below host image\n // $$FlowFixMe\n hostInfoCardPosition.top = top + ListingTile.HOST_IMAGE_HEIGHT;\n hostInfoCardAboveTarget = false;\n } else {\n // display above host image\n // $$FlowFixMe\n hostInfoCardPosition.top = top - ListingTile.HOST_INFO_CARD_HEIGHT;\n hostInfoCardAboveTarget = true;\n }\n\n this.setState({ showHostInfoCard: showHostInfoCard, hostInfoCardPosition: hostInfoCardPosition, hostInfoCardAboveTarget: hostInfoCardAboveTarget });\n }\n }, {\n key: 'showHostInfoCard',\n value: function showHostInfoCard() {\n this.debouncedShowHideHostInfoCard(true);\n }\n }, {\n key: 'hideHostInfoCard',\n value: function hideHostInfoCard() {\n this.debouncedShowHideHostInfoCard(false);\n }\n }, {\n key: 'onHoverListing',\n value: function onHoverListing() {\n if (this.props.onHoverListing) {\n var markerKey = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_7__utils_fng_listings__[\"a\" /* buildListingMarkerKey */])(this.props.listing);\n // $$FlowFixMe\n this.props.onHoverListing(markerKey);\n }\n }\n }, {\n key: 'onUnhoverListing',\n value: function onUnhoverListing() {\n if (this.props.onHoverListing) {\n this.props.onHoverListing(null);\n }\n }\n }, {\n key: 'onNext',\n value: function onNext() {\n var photoIndex = this.state.photoIndex;\n var photos = this.props.listing.photos;\n\n var nextPhotoIndex = (photoIndex + 1) % photos.length;\n var backgroundLoadPhotos = photos.slice(1);\n this.setState({ photoIndex: nextPhotoIndex, backgroundLoadPhotos: backgroundLoadPhotos });\n }\n }, {\n key: 'onPrev',\n value: function onPrev() {\n var photoIndex = this.state.photoIndex;\n var photos = this.props.listing.photos;\n\n var prevPhotoIndex = photoIndex === 0 ? photos.length - 1 : photoIndex - 1;\n var backgroundLoadPhotos = photos.slice(1);\n this.setState({ photoIndex: prevPhotoIndex, backgroundLoadPhotos: backgroundLoadPhotos });\n }\n }, {\n key: 'getImageParams',\n value: function getImageParams(photo) {\n if (!(photo && photo.cloudUrl)) return null;\n\n var requestedWidth = ListingTile.TILE_PHOTO_WIDTH;\n var requestedHeight = requestedWidth / __WEBPACK_IMPORTED_MODULE_10__enums_PhotoRatio__[\"a\" /* default */].LISTING_RESULTS_TILE;\n\n return {\n url: photo.cloudUrl,\n width: requestedWidth,\n height: requestedHeight,\n crop: 'fill',\n format: 'jpg'\n };\n }\n }, {\n key: 'renderSidebar',\n value: function renderSidebar() {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_18__ListingTile_scss___default.a.sidebar },\n this.renderPrice(),\n this.renderMembershipIndicator()\n );\n }\n }, {\n key: 'renderPrice',\n value: function renderPrice() {\n var price = this.props.listing.price;\n\n return price && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_18__ListingTile_scss___default.a.price },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'sup',\n null,\n '$'\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'span',\n null,\n price\n )\n );\n }\n }, {\n key: 'renderMembershipIndicator',\n value: function renderMembershipIndicator() {\n var _props$listing = this.props.listing,\n id = _props$listing.id,\n listingRelationshipType = _props$listing.userContext.listingRelationshipType;\n\n var type = __WEBPACK_IMPORTED_MODULE_11__enums_RelationshipType__[\"a\" /* default */].fromValue(listingRelationshipType);\n\n return type === __WEBPACK_IMPORTED_MODULE_11__enums_RelationshipType__[\"a\" /* default */].MEMBERSHIP && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_6____[\"h\" /* RelationshipIndicator */], {\n type: __WEBPACK_IMPORTED_MODULE_11__enums_RelationshipType__[\"a\" /* default */].MEMBERSHIP.value,\n tooltipId: id,\n className: __WEBPACK_IMPORTED_MODULE_18__ListingTile_scss___default.a.membershipIndicator\n });\n }\n }, {\n key: 'renderContactIndicator',\n value: function renderContactIndicator() {\n var _props$listing2 = this.props.listing,\n id = _props$listing2.id,\n hostRelationshipType = _props$listing2.userContext.hostRelationshipType;\n\n\n return (\n // TODO: use enum\n hostRelationshipType === 'contact' && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_6____[\"h\" /* RelationshipIndicator */], {\n type: __WEBPACK_IMPORTED_MODULE_11__enums_RelationshipType__[\"a\" /* default */].FRIEND.value,\n tooltipId: id,\n className: __WEBPACK_IMPORTED_MODULE_18__ListingTile_scss___default.a.contactIndicator\n })\n );\n }\n }, {\n key: 'renderPropertyOwnerIndicator',\n value: function renderPropertyOwnerIndicator() {\n var listing = this.props.listing;\n var listingRelationshipType = listing.userContext.listingRelationshipType;\n\n var type = __WEBPACK_IMPORTED_MODULE_11__enums_RelationshipType__[\"a\" /* default */].fromValue(listingRelationshipType);\n\n return type === __WEBPACK_IMPORTED_MODULE_11__enums_RelationshipType__[\"a\" /* default */].OWNER && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_6____[\"h\" /* RelationshipIndicator */],\n {\n type: listingRelationshipType,\n tooltipId: listing.id,\n className: __WEBPACK_IMPORTED_MODULE_18__ListingTile_scss___default.a.propertyOwnerIndicator,\n hideIcon: true\n },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'span',\n null,\n 'Your Listing'\n )\n );\n }\n }, {\n key: 'renderImageContainer',\n value: function renderImageContainer() {\n var photoIndex = this.state.photoIndex;\n var _props$listing3 = this.props.listing,\n id = _props$listing3.id,\n photos = _props$listing3.photos,\n favorited = _props$listing3.userContext.favorited;\n\n var photo = photos[photoIndex];\n\n var hidePrevNext = photos.length > 1 ? '' : 'hide';\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_18__ListingTile_scss___default.a.imageContainerOuter },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_18__ListingTile_scss___default.a.privacyPropertyOwnerContainerOuter },\n this.renderPrivacyIndicator(),\n this.renderPropertyOwnerIndicator()\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_18__ListingTile_scss___default.a.imageContainerInner },\n this.renderListingLink(this.renderListingPhoto(photo)),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()(__WEBPACK_IMPORTED_MODULE_18__ListingTile_scss___default.a.prev, hidePrevNext), onClick: this.onPrev },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('i', { className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()('glyphicon', 'glyphicon-chevron-left', __WEBPACK_IMPORTED_MODULE_18__ListingTile_scss___default.a.nextPrevIcon) })\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()(__WEBPACK_IMPORTED_MODULE_18__ListingTile_scss___default.a.next, hidePrevNext), onClick: this.onNext },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('i', { className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()('glyphicon', 'glyphicon-chevron-right', __WEBPACK_IMPORTED_MODULE_18__ListingTile_scss___default.a.nextPrevIcon) })\n )\n ),\n this.props.onFavoriteUnfavorite && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_18__ListingTile_scss___default.a.favoriteContainer },\n this.renderListingFavoritesCount(),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_14__ListingFavorite_ListingFavorite__[\"a\" /* default */], {\n listingId: id,\n favorited: favorited,\n onFavoriteUnfavorite: this.props.onFavoriteUnfavorite\n })\n ),\n this.renderListingLink(this.renderSidebar())\n );\n }\n }, {\n key: 'renderListingPhoto',\n value: function renderListingPhoto(photo) {\n var imageParams = this.getImageParams(photo);\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_18__ListingTile_scss___default.a.h100 },\n imageParams ? __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_16__ListingPhoto_ListingPhoto__[\"a\" /* default */], _extends({ className: __WEBPACK_IMPORTED_MODULE_18__ListingTile_scss___default.a.h100, imageClassName: __WEBPACK_IMPORTED_MODULE_18__ListingTile_scss___default.a.image }, { imageParams: imageParams })) : __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_17__ListingPhotoPlaceholder_ListingPhotoPlaceholder__[\"a\" /* default */], null)\n );\n }\n }, {\n key: 'renderListingLink',\n value: function renderListingLink(component) {\n var listing = this.props.listing;\n var htmlUrl = listing.htmlUrl;\n\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'a',\n { href: htmlUrl, className: __WEBPACK_IMPORTED_MODULE_18__ListingTile_scss___default.a.link, target: '_blank', rel: 'noopener noreferrer' },\n component\n );\n }\n }, {\n key: 'renderListingFavoritesCount',\n value: function renderListingFavoritesCount() {\n var _props$listing4 = this.props.listing,\n favoritesCount = _props$listing4.favoritesCount,\n id = _props$listing4.id;\n\n\n return favoritesCount > 0 && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_15__ListingFavoritesCount_ListingFavoritesCount__[\"a\" /* default */], { favoritesCount: favoritesCount, tooltipId: 'favorites-count-' + id });\n }\n }, {\n key: 'onScrollResultsPage',\n value: function onScrollResultsPage() {\n this.setState({ showHostInfoCard: false });\n }\n }, {\n key: 'renderHostInfoCard',\n value: function renderHostInfoCard() {\n if (this.state.showHostInfoCard) {\n var style = this.state.hostInfoCardPosition;\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { style: style, className: __WEBPACK_IMPORTED_MODULE_18__ListingTile_scss___default.a.hostInfoCard },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_13__HostInfoCard_HostInfoCard__[\"a\" /* default */], {\n listing: this.props.listing,\n onHover: this.showHostInfoCard,\n onUnhover: this.hideHostInfoCard,\n displayedAboveTarget: this.state.hostInfoCardAboveTarget\n })\n );\n }\n\n return null;\n }\n }, {\n key: 'renderHostInfo',\n value: function renderHostInfo() {\n var _this2 = this;\n\n var _props = this.props,\n owner = _props.listing.owner,\n showHostInfo = _props.showHostInfo;\n\n if (!owner) return null;\n\n var firstName = owner.firstName,\n url = owner.url,\n avatarUrl = owner.avatarUrl;\n\n var hostInfoCard = this.renderHostInfoCard();\n\n return showHostInfo && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_18__ListingTile_scss___default.a.hostInfo },\n this.renderContactIndicator(),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n {\n ref: function ref(node) {\n _this2.hostDiv = node;\n },\n className: __WEBPACK_IMPORTED_MODULE_18__ListingTile_scss___default.a.host,\n onMouseOver: this.showHostInfoCard,\n onMouseOut: this.hideHostInfoCard\n },\n hostInfoCard,\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'a',\n { href: url, target: '_blank', rel: 'noopener noreferrer' },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_6____[\"g\" /* Image */], {\n alt: firstName,\n url: avatarUrl,\n width: AVATAR_SIZE,\n height: AVATAR_SIZE,\n dpr: '2.0',\n crop: 'fill',\n radius: 'max',\n gravity: 'faces',\n className: __WEBPACK_IMPORTED_MODULE_18__ListingTile_scss___default.a.hostImage\n })\n )\n )\n );\n }\n }, {\n key: 'renderInfo',\n value: function renderInfo() {\n var _props2 = this.props,\n _props2$listing = _props2.listing,\n roomType = _props2$listing.roomType,\n title = _props2$listing.title,\n showHostInfo = _props2.showHostInfo,\n infoClassName = _props2.infoClassName;\n\n var roomTypeLabel = roomType ? __WEBPACK_IMPORTED_MODULE_9__enums_RoomType__[\"a\" /* default */].fromValue(roomType).label : '';\n var titleClassName = __WEBPACK_IMPORTED_MODULE_1_classnames___default()(__WEBPACK_IMPORTED_MODULE_18__ListingTile_scss___default.a.title, _defineProperty({}, __WEBPACK_IMPORTED_MODULE_18__ListingTile_scss___default.a.titleTruncated, showHostInfo));\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()(__WEBPACK_IMPORTED_MODULE_18__ListingTile_scss___default.a.info, infoClassName) },\n this.renderHostInfo(),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: titleClassName },\n this.renderListingLink(title)\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()(__WEBPACK_IMPORTED_MODULE_18__ListingTile_scss___default.a.subtitle, { hidden: roomTypeLabel === '' }) },\n roomTypeLabel\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n {\n className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()(__WEBPACK_IMPORTED_MODULE_18__ListingTile_scss___default.a.approximateLocation, {\n hidden: this.props.hideApproximateLocation\n })\n },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('span', { className: __WEBPACK_IMPORTED_MODULE_18__ListingTile_scss___default.a.pin }),\n 'Approximate location'\n )\n );\n }\n }, {\n key: 'renderBackgroundLoads',\n value: function renderBackgroundLoads() {\n var _this3 = this;\n\n var backgroundLoadPhotos = this.state.backgroundLoadPhotos;\n\n if (!backgroundLoadPhotos) {\n return null;\n }\n\n var photos = backgroundLoadPhotos.map(function (photo, i) {\n var imageParams = _this3.getImageParams(photo);\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('img', {\n alt: photo.description || 'listing photo',\n key: i,\n src: imageParams && __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__utils_fng_photos__[\"a\" /* buildPhotoUrl */])(imageParams)\n });\n });\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_18__ListingTile_scss___default.a.backgroundLoadPhotosContainer },\n photos\n );\n }\n }, {\n key: 'renderPrivacyIndicator',\n value: function renderPrivacyIndicator() {\n var _props$listing5 = this.props.listing,\n id = _props$listing5.id,\n privacyMode = _props$listing5.privacyMode;\n\n\n return privacyMode === __WEBPACK_IMPORTED_MODULE_12__enums_PrivacyMode__[\"a\" /* default */].PRIVATE.value && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_2_react_bootstrap__[\"a\" /* OverlayTrigger */],\n {\n trigger: ['hover', 'focus'],\n placement: 'bottom',\n overlay: __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_2_react_bootstrap__[\"b\" /* Tooltip */],\n { id: 'tooltip-listing-' + id },\n 'This is a private listing. The host requests that you keep the information confidential.'\n )\n },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_18__ListingTile_scss___default.a.privacyIndicatorContainer },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_8__icons_IconPrivate__[\"a\" /* default */], { small: true })\n )\n );\n }\n }, {\n key: 'render',\n value: function render() {\n var _props3 = this.props,\n listing = _props3.listing,\n className = _props3.className,\n hideInfo = _props3.hideInfo,\n isMini = _props3.isMini;\n\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n {\n id: 'listing-' + listing.id,\n className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()('listing-tile', className, __WEBPACK_IMPORTED_MODULE_18__ListingTile_scss___default.a.listingTile, _defineProperty({}, __WEBPACK_IMPORTED_MODULE_18__ListingTile_scss___default.a.isMini, isMini)),\n onMouseOver: this.onHoverListing,\n onMouseOut: this.onUnhoverListing\n },\n this.renderImageContainer(),\n !hideInfo && this.renderInfo(),\n this.renderBackgroundLoads()\n );\n }\n }]);\n\n return ListingTile;\n}(__WEBPACK_IMPORTED_MODULE_0_react___default.a.PureComponent);\n\nListingTile.HOST_INFO_CARD_HEIGHT = 92;\nListingTile.HOST_IMAGE_HEIGHT = 60;\nListingTile.HOST_INFO_CARD_MIN_VERTICAL_OFFSET_IN_VIEWPORT = 120;\nListingTile.TILE_PHOTO_WIDTH = 480;\nListingTile.propTypes = {\n listing: __webpack_require__(/*! prop-types */ 0).any.isRequired,\n className: __webpack_require__(/*! prop-types */ 0).string,\n infoClassName: __webpack_require__(/*! prop-types */ 0).string,\n isMini: __webpack_require__(/*! prop-types */ 0).bool,\n showHostInfo: __webpack_require__(/*! prop-types */ 0).bool,\n hideInfo: __webpack_require__(/*! prop-types */ 0).bool,\n hideApproximateLocation: __webpack_require__(/*! prop-types */ 0).bool,\n onFavoriteUnfavorite: __webpack_require__(/*! prop-types */ 0).func,\n onHoverListing: __webpack_require__(/*! prop-types */ 0).func\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (ListingTile);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/ListingTile/ListingTile.jsx\n// module id = 137\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/ListingTile/ListingTile.jsx?", + ); + + /***/ + }, + /* 138 */ + /* exports provided: default */ + /* all exports used */ + /*!*******************************************!*\ + !*** ./app/libs/components/Svg/index.jsx ***! + \*******************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "Object.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\n\n\nvar babelPluginFlowReactPropTypes_proptype_UiColor = __webpack_require__(/*! ../../../assets/styles/resources/colors */ 130).babelPluginFlowReactPropTypes_proptype_UiColor || __webpack_require__(/*! react */ 1).PropTypes.any;\n\nif (typeof exports !== 'undefined') Object.defineProperty(exports, 'babelPluginFlowReactPropTypes_proptype_SvgProps', {\n value: __webpack_require__(/*! react */ 1).PropTypes.shape({\n color: babelPluginFlowReactPropTypes_proptype_UiColor,\n className: __webpack_require__(/*! prop-types */ 0).string,\n title: __webpack_require__(/*! prop-types */ 0).string,\n viewBoxWidth: __webpack_require__(/*! prop-types */ 0).number,\n viewBoxHeight: __webpack_require__(/*! prop-types */ 0).number\n })\n});\n\n\nvar Svg = function Svg(_ref) {\n var children = _ref.children,\n title = _ref.title,\n viewBoxWidth = _ref.viewBoxWidth,\n viewBoxHeight = _ref.viewBoxHeight,\n otherProps = _objectWithoutProperties(_ref, ['children', 'title', 'viewBoxWidth', 'viewBoxHeight']);\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'svg',\n _extends({}, otherProps, {\n viewBox: '0 0 ' + viewBoxWidth + ' ' + viewBoxHeight,\n xmlns: 'http://www.w3.org/2000/svg',\n 'aria-labelledby': title + '-title'\n }),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'title',\n { id: title + '-title' },\n title\n ),\n children\n );\n};\n\nSvg.propTypes = {\n children: __webpack_require__(/*! prop-types */ 0).any,\n title: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n viewBoxWidth: __webpack_require__(/*! prop-types */ 0).number.isRequired,\n viewBoxHeight: __webpack_require__(/*! prop-types */ 0).number.isRequired\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (Svg);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/Svg/index.jsx\n// module id = 138\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/Svg/index.jsx?", + ); + + /***/ + }, + /* 139 */ + /* exports provided: default */ + /* exports used: default */ + /*!*************************************************!*\ + !*** ./app/libs/components/icons/IconClose.jsx ***! + \*************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__templates_SvgIconTemplate__ = __webpack_require__(/*! ../../templates/SvgIconTemplate */ 15);\n\n// jscs:disable maximumLineLength\n/* eslint max-len: 0 */\n\n\n\n\n\nvar IconClose = function IconClose(props) {\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_2__templates_SvgIconTemplate__[\"a\" /* default */],\n props,\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('path', {\n d: 'M9.89033308,11.0190076 L18.4178571,19.5464286 C18.5736813,19.7022527 18.7780769,19.7802747 18.9822527,19.7802747 C19.1864286,19.7802747 19.3908242,19.7024725 19.5468681,19.5464286 C19.8587363,19.235 19.8587363,18.7290659 19.5468681,18.4176374 L11.0192342,9.89010648 L19.5466484,1.36269231 C19.8585165,1.05126374 19.8585165,0.54532967 19.5466484,0.233901099 C19.2347802,-0.077967033 18.7295055,-0.077967033 18.4176374,0.233901099 L9.89037779,8.76126374 L1.36291209,0.233901099 C1.05104396,-0.077967033 0.545769231,-0.077967033 0.233901099,0.233901099 C-0.077967033,0.54532967 -0.077967033,1.05126374 0.233901099,1.36269231 L8.76148352,9.89017166 L0.233901099,18.4178571 C-0.077967033,18.7292857 -0.077967033,19.2352198 0.233901099,19.5466484 C0.389725275,19.7024725 0.594120879,19.7804945 0.798296703,19.7804945 C1.00247253,19.7804945 1.20686813,19.7026923 1.36269231,19.5466484 L9.89033308,11.0190076 Z',\n fillRule: 'evenodd'\n })\n );\n};\n\nIconClose.propTypes = {\n title: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string\n};\n\nIconClose.defaultProps = {\n title: 'Close',\n viewBoxWidth: 20,\n viewBoxHeight: 20\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (IconClose);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/icons/IconClose.jsx\n// module id = 139\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/icons/IconClose.jsx?", + ); + + /***/ + }, + /* 140 */ + /* exports provided: default */ + /* exports used: default */ + /*!**************************************************!*\ + !*** ./app/libs/components/icons/IconFngKey.jsx ***! + \**************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Svg__ = __webpack_require__(/*! ../Svg */ 138);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__assets_styles_resources_colors__ = __webpack_require__(/*! ../../../assets/styles/resources/colors */ 130);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__utils_createIcon__ = __webpack_require__(/*! ./utils/createIcon */ 190);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\n\n\n\n\n\n\n\nvar TITLE = 'Calendar';\nvar VIEWBOX_WIDTH = 32;\nvar VIEWBOX_HEIGHT = 32;\n\nvar IconFngKey = function IconFngKey(_ref) {\n var color = _ref.color,\n otherProps = _objectWithoutProperties(_ref, ['color']);\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_1__Svg__[\"default\"],\n _extends({ title: TITLE, viewBoxWidth: VIEWBOX_WIDTH, viewBoxHeight: VIEWBOX_HEIGHT }, otherProps),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('path', {\n d: 'M13.5889866,16.5889866 L7,10 L3,14 L-2.84217094e-14,11 L4,7 L-2.84217094e-14,3 L3,7.10542736e-15 L16.5889866,13.5889866 C18.1487535,12.5834753 20.0062378,12 22,12 C27.5228475,12 32,16.4771525 32,22 C32,27.5228475 27.5228475,32 22,32 C16.4771525,32 12,27.5228475 12,22 C12,20.0062378 12.5834753,18.1487535 13.5889866,16.5889866 Z M22,28 C25.3137085,28 28,25.3137085 28,22 C28,18.6862915 25.3137085,16 22,16 C18.6862915,16 16,18.6862915 16,22 C16,25.3137085 18.6862915,28 22,28 Z',\n fill: __WEBPACK_IMPORTED_MODULE_2__assets_styles_resources_colors__[\"default\"][color],\n fillRule: 'nonzero'\n })\n );\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__utils_createIcon__[\"a\" /* default */])({\n Icon: IconFngKey,\n viewBoxWidth: VIEWBOX_WIDTH,\n viewBoxHeight: VIEWBOX_HEIGHT\n}));\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/icons/IconFngKey.jsx\n// module id = 140\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/icons/IconFngKey.jsx?", + ); + + /***/ + }, + /* 141 */ + /* exports provided: default */ + /* exports used: default */ + /*!***************************************************!*\ + !*** ./app/libs/components/icons/IconPrivate.jsx ***! + \***************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__templates_SvgIconTemplate__ = __webpack_require__(/*! ../../templates/SvgIconTemplate */ 15);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\n\n\nvar babelPluginFlowReactPropTypes_proptype_SvgProps = __webpack_require__(/*! ../../../types */ 4).babelPluginFlowReactPropTypes_proptype_SvgProps || __webpack_require__(/*! react */ 1).PropTypes.any;\n\n\n\nvar IconPrivate = function IconPrivate(_ref) {\n var small = _ref.small,\n _ref$title = _ref.title,\n title = _ref$title === undefined ? 'Private' : _ref$title,\n otherProps = _objectWithoutProperties(_ref, ['small', 'title']);\n\n return small ? __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_1__templates_SvgIconTemplate__[\"a\" /* default */],\n _extends({ viewBoxWidth: 14, viewBoxHeight: 16 }, _extends({ title: title }, otherProps)),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('path', {\n d: 'M5,3.00335124 L5,10.9966488 C5,11.5522864 5.44769572,12 6.00166547,12 L7.99833453,12 C8.55397373,12 9,11.5532224 9,10.9966488 L9,3.00335124 C9,2.44771357 8.55230428,2 7.99833453,2 L6.00166547,2 C5.44602627,2 5,2.44677759 5,3.00335124 Z M3,3.00335124 C3,1.34464615 4.33902013,0 6.00166547,0 L7.99833453,0 C9.65610859,0 11,1.34237885 11,3.00335124 L11,10.9966488 C11,12.6553538 9.66097987,14 7.99833453,14 L6.00166547,14 C4.34389141,14 3,12.6576211 3,10.9966488 L3,3.00335124 Z',\n fillRule: 'evenodd'\n }),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('path', {\n d: 'M0,6.99201702 C0,5.8918564 0.897060126,5 2.00585866,5 L11.9941413,5 C13.1019465,5 14,5.90017617 14,6.99201702 L14,14.007983 C14,15.1081436 13.1029399,16 11.9941413,16 L2.00585866,16 C0.898053512,16 0,15.0998238 0,14.007983 L0,6.99201702 Z M6,9 L8,9 L8,12 L6,12 L6,9 Z',\n fillRule: 'evenodd'\n })\n ) : __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_1__templates_SvgIconTemplate__[\"a\" /* default */],\n _extends({ viewBoxWidth: 16, viewBoxHeight: 20 }, _extends({ title: title }, otherProps)),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('path', {\n d: 'M14.2222222,6.70065359 L14.0740741,6.70065359 L14.0740741,5.89542484 C14.0740741,2.64575163 11.3481481,0 8,0 C4.65185185,0 1.92592593,2.64575163 1.92592593,5.89542484 L1.92592593,6.70065359 L1.77777778,6.70065359 C0.8,6.70065359 0,7.47712418 0,8.42614379 L0,17.8300654 C0,18.779085 0.8,19.5555556 1.77777778,19.5555556 L14.2222222,19.5555556 C15.2,19.5555556 16,18.779085 16,17.8300654 L16,8.42614379 C16,7.47712418 15.2,6.70065359 14.2222222,6.70065359 L14.2222222,6.70065359 L14.2222222,6.70065359 Z M3.11111111,5.89542484 C3.11111111,3.27843137 5.3037037,1.1503268 8,1.1503268 C10.6962963,1.1503268 12.8888889,3.27843137 12.8888889,5.89542484 L12.8888889,6.70065359 L3.11111111,6.70065359 L3.11111111,5.89542484 L3.11111111,5.89542484 L3.11111111,5.89542484 Z M14.8148148,17.8300654 C14.8148148,18.1464052 14.5481481,18.4052288 14.2222222,18.4052288 L1.77777778,18.4052288 C1.45185185,18.4052288 1.18518519,18.1464052 1.18518519,17.8300654 L1.18518519,8.42614379 C1.18518519,8.10980392 1.45185185,7.85098039 1.77777778,7.85098039 L14.2222222,7.85098039 C14.5481481,7.85098039 14.8148148,8.10980392 14.8148148,8.42614379 L14.8148148,17.8300654 L14.8148148,17.8300654 L14.8148148,17.8300654 Z',\n fillRule: 'evenodd'\n }),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('path', {\n d: 'M9.66333326,12.4194584 C9.66333326,11.5053408 8.90651509,10.7777778 7.9983333,10.7777778 C7.0901515,10.7777778 6.33333333,11.5239962 6.33333333,12.4194584 C6.33333333,12.9045004 6.56037878,13.370887 6.93878786,13.6880298 L6.78742423,14.7887021 C6.76850378,14.9006348 6.80634469,15.0125676 6.8820265,15.0871894 C6.95770832,15.1618113 7.05231059,15.2177777 7.16583331,15.2177777 L8.83083328,15.2177777 C8.944356,15.2177777 9.03895827,15.1618113 9.11464009,15.0871894 C9.1903219,15.0125676 9.22816281,14.9006348 9.20924236,14.7887021 L9.05787873,13.7253407 C9.41736735,13.3895424 9.66333326,12.9231559 9.66333326,12.4194584 L9.66333326,12.4194584 Z',\n fillRule: 'evenodd'\n })\n );\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (IconPrivate);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/icons/IconPrivate.jsx\n// module id = 141\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/icons/IconPrivate.jsx?", + ); + + /***/ + }, + /* 142 */ + /* exports provided: createReducer, mergeEntities, mergeEntitiesFromAction, pushEntityIds, subtractEntities, clearEntities, mergeAttrs */ + /* exports used: createReducer */ + /*!*************************************************!*\ + !*** ./app/libs/utils/redux/reducers/common.js ***! + \*************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_immutable__ = __webpack_require__(/*! immutable */ 26);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_immutable___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_immutable__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_fp__ = __webpack_require__(/*! lodash/fp */ 14);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_fp___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_lodash_fp__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2____ = __webpack_require__(/*! ../.. */ 20);\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = createReducer;\n/* unused harmony export mergeEntities */\n/* unused harmony export mergeEntitiesFromAction */\n/* unused harmony export pushEntityIds */\n/* unused harmony export subtractEntities */\n/* unused harmony export clearEntities */\n/* unused harmony export mergeAttrs */\nfunction _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }\n\n\n\n\n\n\n/**\n * createReducer - Create a reducer that uses the object-mapping style as opposed to a switch\n * statement for handling different action types. The advantage to object-mapping style is that\n * each action handler can have its own specific flow annotations, as opposed to having a loose\n * kitchen sink of annotations for the entire reducer (as is the case with the switch statement\n * style).\n *\n * You will still want to export your initial state as a named export as well so that it\n * may be used when configuring your store's initial state.\n *\n * @param {$$Map} $$initialState - The initial state of the store.\n * @param {Object} handlers - An Object consisting of methods that handle the different\n * action types.\n * @return {function} - The reducer function\n */\n\nvar babelPluginFlowReactPropTypes_proptype_ActionHandler = __webpack_require__(/*! ../../../../types/redux */ 91).babelPluginFlowReactPropTypes_proptype_ActionHandler || __webpack_require__(/*! react */ 1).PropTypes.any;\n\nvar babelPluginFlowReactPropTypes_proptype_Action = __webpack_require__(/*! ../../../../types/redux */ 91).babelPluginFlowReactPropTypes_proptype_Action || __webpack_require__(/*! react */ 1).PropTypes.any;\n\nfunction createReducer(initialState, handlers) {\n return function reducer() {\n var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState;\n var action = arguments[1];\n\n return Object.hasOwnProperty.call(handlers, action.type) ? handlers[action.type](state, action) : state;\n };\n}\n\nfunction mergeEntities(state) {\n var entities = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n return state.mergeDeep({ entities: entities });\n}\n\nfunction mergeEntitiesFromAction(state, action) {\n var _action$entities = action.entities,\n entities = _action$entities === undefined ? {} : _action$entities,\n index = action.index;\n\n var toBeMerged = index ? { entities: entities, index: index } : { entities: entities };\n return state.mergeDeep(toBeMerged);\n}\n\n/**\n * pushEntityIds - Add the ids from a $$Map of entities to a $$List at the given path of $$state.\n * Useful in reducers for entities who are associated with other entities and need to be updated\n * when new entities are added but normalizr is unaware of the association.\n *\n * @param {Array<string|number>} path - the path to the nested $$List\n * @param {$$Map} $$state - the reducer's $$state\n * @param {$$Map} entities - the entities whose ids are to be pushed\n * @return {$$Map} - The next state\n */\nfunction pushEntityIds(path, state, entities) {\n var ids = entities.map(function ($$entity) {\n return $$entity.get('id');\n }).toArray();\n return state.updateIn(path, function (associatedIds) {\n return associatedIds.push.apply(associatedIds, _toConsumableArray(ids));\n });\n}\n\nfunction subtractEntities(state, entityIds) {\n return state.update('index', function ($$index) {\n return $$index.subtract(entityIds);\n }).update('entities', function (entities) {\n return entities.filter(function (_entity, id) {\n return entityIds.indexOf(parseInt(id, 10)) === -1;\n });\n });\n}\n\nfunction clearEntities(state) {\n var nextState = state.set('entities', new __WEBPACK_IMPORTED_MODULE_0_immutable__[\"Map\"]());\n return state.has('index') ? nextState.set('index', new __WEBPACK_IMPORTED_MODULE_0_immutable__[\"OrderedSet\"]()) : nextState;\n}\n\n/**\n * mergeAttrs - Merge attributes into entities. You can manually pass one or more ids corresponding\n * to the entity/entities involved, or you can pass a getter function that retrieves the ids from\n * the action. Likewise, you can manually pass one or more sets of attribute objects to be merged to\n * the entities, or you can pass a getter function that gets the attributes from the action.\n *\n * If you pass multiple ids, but only a single set of attributes, those attributes will be copied\n * to every entity. If you pass multiple ids and multiple sets of attribute objects, they attributes\n * will be merged to the ids in order. If the number of ids and the number of attribute objects do\n * not match, the function will throw an error.\n *\n * This function is useful in reducers for succinctly modifying a store's entities, even if data\n * must be retrieved from the action.\n *\n * ex:\n * [actonTypes.SET_NAME]: mergeAttrs(_.get('id'), _.get('name'))\n *\n * @param {number|Array<number>|(action: {}) => number|Array<number>} entityIds - the id, ids, or\n * getter function that returns the ids when given the action.\n * @param {{}|(action: {}) => {}|Array<number>} attrs - the attrs object, array of attrs objects,\n * or getter function that returns the attrs object or array of attrs object.\n * @param {$$Map} $$state - the reducer's store\n * @param {$$Map} action - the Redux action on which getter functions will be ran\n * @return {$$Map} - The next state\n */\nvar mergeAttrs = __WEBPACK_IMPORTED_MODULE_1_lodash_fp___default.a.curry(function (entityIds, attrs, $$state, action) {\n // Do what we need to do to get an array of ids from `entityIds`\n var ids = __WEBPACK_IMPORTED_MODULE_1_lodash_fp___default.a.cond([[function () {\n return __WEBPACK_IMPORTED_MODULE_1_lodash_fp___default.a.isInteger(entityIds);\n }, function () {\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2____[\"g\" /* toArray */])(entityIds);\n }], // wrap in array\n // $FlowFixMe: flow doesn't understand lodash conditions\n [function () {\n return __WEBPACK_IMPORTED_MODULE_1_lodash_fp___default.a.isFunction(entityIds);\n }, function () {\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2____[\"g\" /* toArray */])(entityIds(action));\n }], // execute on `action`\n [__WEBPACK_IMPORTED_MODULE_1_lodash_fp___default.a.constant(true), __WEBPACK_IMPORTED_MODULE_1_lodash_fp___default.a.constant(entityIds)]])();\n\n // Execute `attrs` on `action` if `attrs` is a function, otherwise leave it\n // $FlowFixMe: flow doesn't understand lodash conditions\n var tempAttrs = __WEBPACK_IMPORTED_MODULE_1_lodash_fp___default.a.isFunction(attrs) ? attrs(action) : attrs;\n\n // Then make the attrs into an array the same size as the `ids` array, filling with copies\n // of the attrs if necessary\n var finalAttrs = __WEBPACK_IMPORTED_MODULE_1_lodash_fp___default.a.isArrayLike(tempAttrs) ? tempAttrs : __WEBPACK_IMPORTED_MODULE_1_lodash_fp___default.a.fill(0, ids.length, tempAttrs, Array(ids.length));\n\n // Throw in the case we ended up with something weird, probably because we got passed more sets\n // of attrs than ids\n // $FlowFixMe: flow can't find `length` property, guess b/c can't figure out what it actually is\n if (ids.length !== finalAttrs.length) {\n // $FlowFixMe: flow can't find `length` property, guess b/c can't figure out what it actually is\n throw new Error('mergeAttrs: got ' + ids.length + ' ids but ' + finalAttrs.length + ' sets of attrs');\n }\n\n // Pair each id with its attrs object\n var idsAndAttrs = __WEBPACK_IMPORTED_MODULE_1_lodash_fp___default.a.zip(ids, finalAttrs);\n\n // Take each pair and merge its attrs object into the entity corresponding to the pair's `id`\n return __WEBPACK_IMPORTED_MODULE_1_lodash_fp___default.a.reduce(function ($$currState, idAndAttr) {\n return $$currState.mergeDeepIn(['entities', idAndAttr[0]], idAndAttr[1]);\n }, $$state, idsAndAttrs);\n});\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/utils/redux/reducers/common.js\n// module id = 142\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/utils/redux/reducers/common.js?", + ); + + /***/ + }, + /* 143 */ + /* unknown exports provided */ + /* all exports used */ + /*!********************************!*\ + !*** ./app/types/hostPages.js ***! + \********************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + 'if (true) Object.defineProperty(exports, "babelPluginFlowReactPropTypes_proptype_QaData", {\n value: __webpack_require__(/*! react */ 1).PropTypes.shape({\n question: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n answers: __webpack_require__(/*! prop-types */ 0).arrayOf(__webpack_require__(/*! prop-types */ 0).string).isRequired\n })\n});\nif (true) Object.defineProperty(exports, "babelPluginFlowReactPropTypes_proptype_HostStepData", {\n value: __webpack_require__(/*! react */ 1).PropTypes.shape({\n number: __webpack_require__(/*! prop-types */ 0).number.isRequired,\n title: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n createListingType: __webpack_require__(/*! prop-types */ 0).bool,\n typeTitle: __webpack_require__(/*! prop-types */ 0).string,\n QA: __webpack_require__(/*! prop-types */ 0).arrayOf(__webpack_require__(/*! prop-types */ 0).shape({\n question: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n answers: __webpack_require__(/*! prop-types */ 0).arrayOf(__webpack_require__(/*! prop-types */ 0).string).isRequired\n })).isRequired\n })\n});\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/types/hostPages.js\n// module id = 143\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/types/hostPages.js?', + ); + + /***/ + }, + /* 144 */ + /* unknown exports provided */ + /* all exports used */ + /*!***********************************!*\ + !*** ./app/types/pricingPanel.js ***! + \***********************************/ + /***/ function (module, exports) { + eval( + '\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/types/pricingPanel.js\n// module id = 144\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/types/pricingPanel.js?', + ); + + /***/ + }, + /* 145 */ + /* unknown exports provided */ + /* all exports used */ + /*!***********************************************!*\ + !*** ./~/babel-runtime/core-js/array/from.js ***! + \***********************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + 'module.exports = { "default": __webpack_require__(/*! core-js/library/fn/array/from */ 907), __esModule: true };\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/babel-runtime/core-js/array/from.js\n// module id = 145\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/babel-runtime/core-js/array/from.js?', + ); + + /***/ + }, + /* 146 */ + /* unknown exports provided */ + /* all exports used */ + /*!***************************************************!*\ + !*** ./~/babel-runtime/core-js/json/stringify.js ***! + \***************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + 'module.exports = { "default": __webpack_require__(/*! core-js/library/fn/json/stringify */ 908), __esModule: true };\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/babel-runtime/core-js/json/stringify.js\n// module id = 146\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/babel-runtime/core-js/json/stringify.js?', + ); + + /***/ + }, + /* 147 */ + /* unknown exports provided */ + /* all exports used */ + /*!**************************************************!*\ + !*** ./~/babel-runtime/core-js/object/assign.js ***! + \**************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + 'module.exports = { "default": __webpack_require__(/*! core-js/library/fn/object/assign */ 910), __esModule: true };\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/babel-runtime/core-js/object/assign.js\n// module id = 147\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/babel-runtime/core-js/object/assign.js?', + ); + + /***/ + }, + /* 148 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************************!*\ + !*** ./~/babel-runtime/helpers/typeof.js ***! + \*******************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nexports.__esModule = true;\n\nvar _iterator = __webpack_require__(/*! ../core-js/symbol/iterator */ 902);\n\nvar _iterator2 = _interopRequireDefault(_iterator);\n\nvar _symbol = __webpack_require__(/*! ../core-js/symbol */ 901);\n\nvar _symbol2 = _interopRequireDefault(_symbol);\n\nvar _typeof = typeof _symbol2.default === "function" && typeof _iterator2.default === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj; };\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = typeof _symbol2.default === "function" && _typeof(_iterator2.default) === "symbol" ? function (obj) {\n return typeof obj === "undefined" ? "undefined" : _typeof(obj);\n} : function (obj) {\n return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj === "undefined" ? "undefined" : _typeof(obj);\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/babel-runtime/helpers/typeof.js\n// module id = 148\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/babel-runtime/helpers/typeof.js?', + ); + + /***/ + }, + /* 149 */ + /* unknown exports provided */ + /* all exports used */ + /*!***********************************************!*\ + !*** ./~/core-js/library/modules/_defined.js ***! + \***********************************************/ + /***/ function (module, exports) { + eval( + '// 7.2.1 RequireObjectCoercible(argument)\nmodule.exports = function(it){\n if(it == undefined)throw TypeError("Can\'t call method on " + it);\n return it;\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_defined.js\n// module id = 149\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/_defined.js?', + ); + + /***/ + }, + /* 150 */ + /* unknown exports provided */ + /* all exports used */ + /*!*****************************************************!*\ + !*** ./~/core-js/library/modules/_object-create.js ***! + \*****************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])\nvar anObject = __webpack_require__(/*! ./_an-object */ 72)\n , dPs = __webpack_require__(/*! ./_object-dps */ 936)\n , enumBugKeys = __webpack_require__(/*! ./_enum-bug-keys */ 196)\n , IE_PROTO = __webpack_require__(/*! ./_shared-key */ 203)('IE_PROTO')\n , Empty = function(){ /* empty */ }\n , PROTOTYPE = 'prototype';\n\n// Create object with fake `null` prototype: use iframe Object with cleared prototype\nvar createDict = function(){\n // Thrash, waste and sodomy: IE GC bug\n var iframe = __webpack_require__(/*! ./_dom-create */ 319)('iframe')\n , i = enumBugKeys.length\n , lt = '<'\n , gt = '>'\n , iframeDocument;\n iframe.style.display = 'none';\n __webpack_require__(/*! ./_html */ 931).appendChild(iframe);\n iframe.src = 'javascript:'; // eslint-disable-line no-script-url\n // createDict = iframe.contentWindow.Object;\n // html.removeChild(iframe);\n iframeDocument = iframe.contentWindow.document;\n iframeDocument.open();\n iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);\n iframeDocument.close();\n createDict = iframeDocument.F;\n while(i--)delete createDict[PROTOTYPE][enumBugKeys[i]];\n return createDict();\n};\n\nmodule.exports = Object.create || function create(O, Properties){\n var result;\n if(O !== null){\n Empty[PROTOTYPE] = anObject(O);\n result = new Empty;\n Empty[PROTOTYPE] = null;\n // add \"__proto__\" for Object.getPrototypeOf polyfill\n result[IE_PROTO] = O;\n } else result = createDict();\n return Properties === undefined ? result : dPs(result, Properties);\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_object-create.js\n// module id = 150\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/_object-create.js?", + ); + + /***/ + }, + /* 151 */ + /* unknown exports provided */ + /* all exports used */ + /*!*********************************************************!*\ + !*** ./~/core-js/library/modules/_set-to-string-tag.js ***! + \*********************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "var def = __webpack_require__(/*! ./_object-dp */ 46).f\n , has = __webpack_require__(/*! ./_has */ 74)\n , TAG = __webpack_require__(/*! ./_wks */ 39)('toStringTag');\n\nmodule.exports = function(it, tag, stat){\n if(it && !has(it = stat ? it : it.prototype, TAG))def(it, TAG, {configurable: true, value: tag});\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_set-to-string-tag.js\n// module id = 151\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/_set-to-string-tag.js?", + ); + + /***/ + }, + /* 152 */ + /* unknown exports provided */ + /* all exports used */ + /*!*************************************************!*\ + !*** ./~/core-js/library/modules/_to-length.js ***! + \*************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + '// 7.1.15 ToLength\nvar toInteger = __webpack_require__(/*! ./_to-integer */ 205)\n , min = Math.min;\nmodule.exports = function(it){\n return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_to-length.js\n// module id = 152\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/_to-length.js?', + ); + + /***/ + }, + /* 153 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************************!*\ + !*** ./~/core-js/library/modules/_uid.js ***! + \*******************************************/ + /***/ function (module, exports) { + eval( + "var id = 0\n , px = Math.random();\nmodule.exports = function(key){\n return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_uid.js\n// module id = 153\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/_uid.js?", + ); + + /***/ + }, + /* 154 */ + /* unknown exports provided */ + /* exports used: default */ + /*!***************************************************************************!*\ + !*** ./app/bundles/listings-show/ui/Listing/Widgets/live/Host/index.scss ***! + \***************************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"unit": "index__unit__2h7NS",\n\t"hostData": "index__hostData__jM6Vy",\n\t"avatar": "index__avatar__6NrnZ",\n\t"incognito": "index__incognito__3h6EX",\n\t"fbFriendIcon": "index__fbFriendIcon__l2ycb",\n\t"info": "index__info__2aBmi",\n\t"name": "index__name__3J1qs",\n\t"nameLink": "index__nameLink__2I8M-",\n\t"phoneLink": "index__phoneLink__3dWlQ",\n\t"emailLink": "index__emailLink__1RktS",\n\t"messageButton": "index__messageButton__2ZDT1"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-show/ui/Listing/Widgets/live/Host/index.scss\n// module id = 154\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-show/ui/Listing/Widgets/live/Host/index.scss?', + ); + + /***/ + }, + /* 155 */ + /* unknown exports provided */ + /* exports used: default */ + /*!****************************************************!*\ + !*** ./app/libs/components/Dropdown/Dropdown.scss ***! + \****************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"menu": "Dropdown__menu__3TBzw",\n\t"menuItem": "Dropdown__menuItem__1sf09",\n\t"triangle": "Dropdown__triangle__gbNW8"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/Dropdown/Dropdown.scss\n// module id = 155\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/Dropdown/Dropdown.scss?', + ); + + /***/ + }, + /* 156 */ + /* unknown exports provided */ + /* all exports used */ + /*!************************************!*\ + !*** ./~/dom-helpers/events/on.js ***! + \************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _inDOM = __webpack_require__(/*! ../util/inDOM */ 65);\n\nvar _inDOM2 = _interopRequireDefault(_inDOM);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar on = function on() {};\nif (_inDOM2.default) {\n on = function () {\n\n if (document.addEventListener) return function (node, eventName, handler, capture) {\n return node.addEventListener(eventName, handler, capture || false);\n };else if (document.attachEvent) return function (node, eventName, handler) {\n return node.attachEvent('on' + eventName, function (e) {\n e = e || window.event;\n e.target = e.target || e.srcElement;\n e.currentTarget = node;\n handler.call(node, e);\n });\n };\n }();\n}\n\nexports.default = on;\nmodule.exports = exports['default'];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/dom-helpers/events/on.js\n// module id = 156\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/dom-helpers/events/on.js?", + ); + + /***/ + }, + /* 157 */ + /* unknown exports provided */ + /* all exports used */ + /*!*****************************************!*\ + !*** ./~/dom-helpers/query/isWindow.js ***! + \*****************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = getWindow;\nfunction getWindow(node) {\n return node === node.window ? node : node.nodeType === 9 ? node.defaultView || node.parentWindow : false;\n}\nmodule.exports = exports["default"];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/dom-helpers/query/isWindow.js\n// module id = 157\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/dom-helpers/query/isWindow.js?', + ); + + /***/ + }, + /* 158 */ + /* unknown exports provided */ + /* all exports used */ + /*!**************************************!*\ + !*** ./~/dom-helpers/style/index.js ***! + \**************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = style;\n\nvar _camelizeStyle = __webpack_require__(/*! ../util/camelizeStyle */ 344);\n\nvar _camelizeStyle2 = _interopRequireDefault(_camelizeStyle);\n\nvar _hyphenateStyle = __webpack_require__(/*! ../util/hyphenateStyle */ 1124);\n\nvar _hyphenateStyle2 = _interopRequireDefault(_hyphenateStyle);\n\nvar _getComputedStyle2 = __webpack_require__(/*! ./getComputedStyle */ 1119);\n\nvar _getComputedStyle3 = _interopRequireDefault(_getComputedStyle2);\n\nvar _removeStyle = __webpack_require__(/*! ./removeStyle */ 1120);\n\nvar _removeStyle2 = _interopRequireDefault(_removeStyle);\n\nvar _properties = __webpack_require__(/*! ../transition/properties */ 343);\n\nvar _isTransform = __webpack_require__(/*! ../transition/isTransform */ 1121);\n\nvar _isTransform2 = _interopRequireDefault(_isTransform);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction style(node, property, value) {\n var css = '';\n var transforms = '';\n var props = property;\n\n if (typeof property === 'string') {\n if (value === undefined) {\n return node.style[(0, _camelizeStyle2.default)(property)] || (0, _getComputedStyle3.default)(node).getPropertyValue((0, _hyphenateStyle2.default)(property));\n } else {\n (props = {})[property] = value;\n }\n }\n\n Object.keys(props).forEach(function (key) {\n var value = props[key];\n if (!value && value !== 0) {\n (0, _removeStyle2.default)(node, (0, _hyphenateStyle2.default)(key));\n } else if ((0, _isTransform2.default)(key)) {\n transforms += key + '(' + value + ') ';\n } else {\n css += (0, _hyphenateStyle2.default)(key) + ': ' + value + ';';\n }\n });\n\n if (transforms) {\n css += _properties.transform + ': ' + transforms + ';';\n }\n\n node.style.cssText += ';' + css;\n}\nmodule.exports = exports['default'];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/dom-helpers/style/index.js\n// module id = 158\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/dom-helpers/style/index.js?", + ); + + /***/ + }, + /* 159 */ + /* unknown exports provided */ + /* all exports used */ + /*!**********************************!*\ + !*** ./~/history/lib/Actions.js ***! + \**********************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nexports.__esModule = true;\n/**\n * Indicates that navigation was caused by a call to history.push.\n */\nvar PUSH = exports.PUSH = 'PUSH';\n\n/**\n * Indicates that navigation was caused by a call to history.replace.\n */\nvar REPLACE = exports.REPLACE = 'REPLACE';\n\n/**\n * Indicates that navigation was caused by some other action such\n * as using a browser's back/forward buttons and/or manually manipulating\n * the URL in a browser's location bar. This is the default.\n *\n * See https://developer.mozilla.org/en-US/docs/Web/API/WindowEventHandlers/onpopstate\n * for more information.\n */\nvar POP = exports.POP = 'POP';\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/history/lib/Actions.js\n// module id = 159\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/history/lib/Actions.js?", + ); + + /***/ + }, + /* 160 */ + /* unknown exports provided */ + /* all exports used */ + /*!***********************************!*\ + !*** ./~/history/lib/DOMUtils.js ***! + \***********************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nexports.__esModule = true;\nvar addEventListener = exports.addEventListener = function addEventListener(node, event, listener) {\n return node.addEventListener ? node.addEventListener(event, listener, false) : node.attachEvent('on' + event, listener);\n};\n\nvar removeEventListener = exports.removeEventListener = function removeEventListener(node, event, listener) {\n return node.removeEventListener ? node.removeEventListener(event, listener, false) : node.detachEvent('on' + event, listener);\n};\n\n/**\n * Returns true if the HTML5 history API is supported. Taken from Modernizr.\n *\n * https://github.com/Modernizr/Modernizr/blob/master/LICENSE\n * https://github.com/Modernizr/Modernizr/blob/master/feature-detects/history.js\n * changed to avoid false negatives for Windows Phones: https://github.com/reactjs/react-router/issues/586\n */\nvar supportsHistory = exports.supportsHistory = function supportsHistory() {\n var ua = window.navigator.userAgent;\n\n if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) return false;\n\n return window.history && 'pushState' in window.history;\n};\n\n/**\n * Returns false if using go(n) with hash history causes a full page reload.\n */\nvar supportsGoWithoutReloadUsingHash = exports.supportsGoWithoutReloadUsingHash = function supportsGoWithoutReloadUsingHash() {\n return window.navigator.userAgent.indexOf('Firefox') === -1;\n};\n\n/**\n * Returns true if browser fires popstate on hash change.\n * IE10 and IE11 do not.\n */\nvar supportsPopstateOnHashchange = exports.supportsPopstateOnHashchange = function supportsPopstateOnHashchange() {\n return window.navigator.userAgent.indexOf('Trident') === -1;\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/history/lib/DOMUtils.js\n// module id = 160\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/history/lib/DOMUtils.js?", + ); + + /***/ + }, + /* 161 */ + /* unknown exports provided */ + /* all exports used */ + /*!*********************************!*\ + !*** ./~/lodash/_createCtor.js ***! + \*********************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "var baseCreate = __webpack_require__(/*! ./_baseCreate */ 224),\n isObject = __webpack_require__(/*! ./isObject */ 116);\n\n/**\n * Creates a function that produces an instance of `Ctor` regardless of\n * whether it was invoked as part of a `new` expression or by `call` or `apply`.\n *\n * @private\n * @param {Function} Ctor The constructor to wrap.\n * @returns {Function} Returns the new wrapped function.\n */\nfunction createCtor(Ctor) {\n return function() {\n // Use a `switch` statement to work with class constructors. See\n // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist\n // for more details.\n var args = arguments;\n switch (args.length) {\n case 0: return new Ctor;\n case 1: return new Ctor(args[0]);\n case 2: return new Ctor(args[0], args[1]);\n case 3: return new Ctor(args[0], args[1], args[2]);\n case 4: return new Ctor(args[0], args[1], args[2], args[3]);\n case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);\n case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);\n case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);\n }\n var thisBinding = baseCreate(Ctor.prototype),\n result = Ctor.apply(thisBinding, args);\n\n // Mimic the constructor's `return` behavior.\n // See https://es5.github.io/#x13.2.2 for more details.\n return isObject(result) ? result : thisBinding;\n };\n}\n\nmodule.exports = createCtor;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/_createCtor.js\n// module id = 161\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/lodash/_createCtor.js?", + ); + + /***/ + }, + /* 162 */ + /* unknown exports provided */ + /* all exports used */ + /*!*************************************!*\ + !*** ./~/lodash/_replaceHolders.js ***! + \*************************************/ + /***/ function (module, exports) { + eval( + "/** Used as the internal argument placeholder. */\nvar PLACEHOLDER = '__lodash_placeholder__';\n\n/**\n * Replaces all `placeholder` elements in `array` with an internal placeholder\n * and returns an array of their indexes.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {*} placeholder The placeholder to replace.\n * @returns {Array} Returns the new array of placeholder indexes.\n */\nfunction replaceHolders(array, placeholder) {\n var index = -1,\n length = array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (value === placeholder || value === PLACEHOLDER) {\n array[index] = PLACEHOLDER;\n result[resIndex++] = index;\n }\n }\n return result;\n}\n\nmodule.exports = replaceHolders;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/_replaceHolders.js\n// module id = 162\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/lodash/_replaceHolders.js?", + ); + + /***/ + }, + /* 163 */ + /* unknown exports provided */ + /* all exports used */ + /*!**********************************!*\ + !*** ./~/lodash/isObjectLike.js ***! + \**********************************/ + /***/ function (module, exports) { + eval( + "/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/isObjectLike.js\n// module id = 163\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/lodash/isObjectLike.js?", + ); + + /***/ + }, + /* 164 */ + /* unknown exports provided */ + /* all exports used */ + /*!******************************!*\ + !*** ./~/process/browser.js ***! + \******************************/ + /***/ function (module, exports) { + eval( + "// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/process/browser.js\n// module id = 164\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/process/browser.js?", + ); + + /***/ + }, + /* 165 */ + /* exports provided: default */ + /* exports used: default */ + /*!******************************************!*\ + !*** ./~/react-bootstrap/es/Dropdown.js ***! + \******************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ 9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_objectWithoutProperties__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends__ = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ 7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_dom_helpers_activeElement__ = __webpack_require__(/*! dom-helpers/activeElement */ 339);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_dom_helpers_activeElement___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_dom_helpers_activeElement__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_dom_helpers_query_contains__ = __webpack_require__(/*! dom-helpers/query/contains */ 95);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_dom_helpers_query_contains___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_dom_helpers_query_contains__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_keycode__ = __webpack_require__(/*! keycode */ 219);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_keycode___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_keycode__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_10_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11_react_dom__ = __webpack_require__(/*! react-dom */ 16);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11_react_dom___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_11_react_dom__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12_react_prop_types_lib_all__ = __webpack_require__(/*! react-prop-types/lib/all */ 174);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12_react_prop_types_lib_all___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_12_react_prop_types_lib_all__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13_react_prop_types_lib_elementType__ = __webpack_require__(/*! react-prop-types/lib/elementType */ 18);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13_react_prop_types_lib_elementType___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_13_react_prop_types_lib_elementType__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14_react_prop_types_lib_isRequiredForA11y__ = __webpack_require__(/*! react-prop-types/lib/isRequiredForA11y */ 175);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14_react_prop_types_lib_isRequiredForA11y___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_14_react_prop_types_lib_isRequiredForA11y__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15_uncontrollable__ = __webpack_require__(/*! uncontrollable */ 178);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15_uncontrollable___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_15_uncontrollable__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16_warning__ = __webpack_require__(/*! warning */ 23);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_16_warning__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__ButtonGroup__ = __webpack_require__(/*! ./ButtonGroup */ 495);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__DropdownMenu__ = __webpack_require__(/*! ./DropdownMenu */ 1260);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_19__DropdownToggle__ = __webpack_require__(/*! ./DropdownToggle */ 497);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_20__utils_bootstrapUtils__ = __webpack_require__(/*! ./utils/bootstrapUtils */ 10);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_21__utils_createChainedFunction__ = __webpack_require__(/*! ./utils/createChainedFunction */ 28);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_22__utils_PropTypes__ = __webpack_require__(/*! ./utils/PropTypes */ 1307);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_23__utils_ValidComponentChildren__ = __webpack_require__(/*! ./utils/ValidComponentChildren */ 34);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar TOGGLE_ROLE = __WEBPACK_IMPORTED_MODULE_19__DropdownToggle__[\"a\" /* default */].defaultProps.bsRole;\nvar MENU_ROLE = __WEBPACK_IMPORTED_MODULE_18__DropdownMenu__[\"a\" /* default */].defaultProps.bsRole;\n\nvar propTypes = {\n /**\n * The menu will open above the dropdown button, instead of below it.\n */\n dropup: __WEBPACK_IMPORTED_MODULE_10_prop_types___default.a.bool,\n\n /**\n * An html id attribute, necessary for assistive technologies, such as screen readers.\n * @type {string|number}\n * @required\n */\n id: __WEBPACK_IMPORTED_MODULE_14_react_prop_types_lib_isRequiredForA11y___default()(__WEBPACK_IMPORTED_MODULE_10_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_10_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_10_prop_types___default.a.number])),\n\n componentClass: __WEBPACK_IMPORTED_MODULE_13_react_prop_types_lib_elementType___default.a,\n\n /**\n * The children of a Dropdown may be a `<Dropdown.Toggle>` or a `<Dropdown.Menu>`.\n * @type {node}\n */\n children: __WEBPACK_IMPORTED_MODULE_12_react_prop_types_lib_all___default()(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_22__utils_PropTypes__[\"a\" /* requiredRoles */])(TOGGLE_ROLE, MENU_ROLE), __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_22__utils_PropTypes__[\"b\" /* exclusiveRoles */])(MENU_ROLE)),\n\n /**\n * Whether or not component is disabled.\n */\n disabled: __WEBPACK_IMPORTED_MODULE_10_prop_types___default.a.bool,\n\n /**\n * Align the menu to the right side of the Dropdown toggle\n */\n pullRight: __WEBPACK_IMPORTED_MODULE_10_prop_types___default.a.bool,\n\n /**\n * Whether or not the Dropdown is visible.\n *\n * @controllable onToggle\n */\n open: __WEBPACK_IMPORTED_MODULE_10_prop_types___default.a.bool,\n\n /**\n * A callback fired when the Dropdown closes.\n */\n onClose: __WEBPACK_IMPORTED_MODULE_10_prop_types___default.a.func,\n\n /**\n * A callback fired when the Dropdown wishes to change visibility. Called with the requested\n * `open` value, the DOM event, and the source that fired it: `'click'`,`'keydown'`,`'rootClose'`, or `'select'`.\n *\n * ```js\n * function(Boolean isOpen, Object event, { String source }) {}\n * ```\n * @controllable open\n */\n onToggle: __WEBPACK_IMPORTED_MODULE_10_prop_types___default.a.func,\n\n /**\n * A callback fired when a menu item is selected.\n *\n * ```js\n * (eventKey: any, event: Object) => any\n * ```\n */\n onSelect: __WEBPACK_IMPORTED_MODULE_10_prop_types___default.a.func,\n\n /**\n * If `'menuitem'`, causes the dropdown to behave like a menu item rather than\n * a menu button.\n */\n role: __WEBPACK_IMPORTED_MODULE_10_prop_types___default.a.string,\n\n /**\n * Which event when fired outside the component will cause it to be closed\n */\n rootCloseEvent: __WEBPACK_IMPORTED_MODULE_10_prop_types___default.a.oneOf(['click', 'mousedown']),\n\n /**\n * @private\n */\n onMouseEnter: __WEBPACK_IMPORTED_MODULE_10_prop_types___default.a.func,\n /**\n * @private\n */\n onMouseLeave: __WEBPACK_IMPORTED_MODULE_10_prop_types___default.a.func\n};\n\nvar defaultProps = {\n componentClass: __WEBPACK_IMPORTED_MODULE_17__ButtonGroup__[\"a\" /* default */]\n};\n\nvar Dropdown = function (_React$Component) {\n __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default()(Dropdown, _React$Component);\n\n function Dropdown(props, context) {\n __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default()(this, Dropdown);\n\n var _this = __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.call(this, props, context));\n\n _this.handleClick = _this.handleClick.bind(_this);\n _this.handleKeyDown = _this.handleKeyDown.bind(_this);\n _this.handleClose = _this.handleClose.bind(_this);\n\n _this._focusInDropdown = false;\n _this.lastOpenEventType = null;\n return _this;\n }\n\n Dropdown.prototype.componentDidMount = function componentDidMount() {\n this.focusNextOnOpen();\n };\n\n Dropdown.prototype.componentWillUpdate = function componentWillUpdate(nextProps) {\n if (!nextProps.open && this.props.open) {\n this._focusInDropdown = __WEBPACK_IMPORTED_MODULE_7_dom_helpers_query_contains___default()(__WEBPACK_IMPORTED_MODULE_11_react_dom___default.a.findDOMNode(this.menu), __WEBPACK_IMPORTED_MODULE_6_dom_helpers_activeElement___default()(document));\n }\n };\n\n Dropdown.prototype.componentDidUpdate = function componentDidUpdate(prevProps) {\n var open = this.props.open;\n\n var prevOpen = prevProps.open;\n\n if (open && !prevOpen) {\n this.focusNextOnOpen();\n }\n\n if (!open && prevOpen) {\n // if focus hasn't already moved from the menu lets return it\n // to the toggle\n if (this._focusInDropdown) {\n this._focusInDropdown = false;\n this.focus();\n }\n }\n };\n\n Dropdown.prototype.handleClick = function handleClick(event) {\n if (this.props.disabled) {\n return;\n }\n\n this.toggleOpen(event, { source: 'click' });\n };\n\n Dropdown.prototype.handleKeyDown = function handleKeyDown(event) {\n if (this.props.disabled) {\n return;\n }\n\n switch (event.keyCode) {\n case __WEBPACK_IMPORTED_MODULE_8_keycode___default.a.codes.down:\n if (!this.props.open) {\n this.toggleOpen(event, { source: 'keydown' });\n } else if (this.menu.focusNext) {\n this.menu.focusNext();\n }\n event.preventDefault();\n break;\n case __WEBPACK_IMPORTED_MODULE_8_keycode___default.a.codes.esc:\n case __WEBPACK_IMPORTED_MODULE_8_keycode___default.a.codes.tab:\n this.handleClose(event, { source: 'keydown' });\n break;\n default:\n }\n };\n\n Dropdown.prototype.toggleOpen = function toggleOpen(event, eventDetails) {\n var open = !this.props.open;\n\n if (open) {\n this.lastOpenEventType = eventDetails.source;\n }\n\n if (this.props.onToggle) {\n this.props.onToggle(open, event, eventDetails);\n }\n };\n\n Dropdown.prototype.handleClose = function handleClose(event, eventDetails) {\n if (!this.props.open) {\n return;\n }\n\n this.toggleOpen(event, eventDetails);\n };\n\n Dropdown.prototype.focusNextOnOpen = function focusNextOnOpen() {\n var menu = this.menu;\n\n if (!menu.focusNext) {\n return;\n }\n\n if (this.lastOpenEventType === 'keydown' || this.props.role === 'menuitem') {\n menu.focusNext();\n }\n };\n\n Dropdown.prototype.focus = function focus() {\n var toggle = __WEBPACK_IMPORTED_MODULE_11_react_dom___default.a.findDOMNode(this.toggle);\n\n if (toggle && toggle.focus) {\n toggle.focus();\n }\n };\n\n Dropdown.prototype.renderToggle = function renderToggle(child, props) {\n var _this2 = this;\n\n var ref = function ref(c) {\n _this2.toggle = c;\n };\n\n if (typeof child.ref === 'string') {\n true ? __WEBPACK_IMPORTED_MODULE_16_warning___default()(false, 'String refs are not supported on `<Dropdown.Toggle>` components. ' + 'To apply a ref to the component use the callback signature:\\n\\n ' + 'https://facebook.github.io/react/docs/more-about-refs.html#the-ref-callback-attribute') : void 0;\n } else {\n ref = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_21__utils_createChainedFunction__[\"a\" /* default */])(child.ref, ref);\n }\n\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9_react__[\"cloneElement\"])(child, __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends___default()({}, props, {\n ref: ref,\n bsClass: __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_20__utils_bootstrapUtils__[\"e\" /* prefix */])(props, 'toggle'),\n onClick: __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_21__utils_createChainedFunction__[\"a\" /* default */])(child.props.onClick, this.handleClick),\n onKeyDown: __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_21__utils_createChainedFunction__[\"a\" /* default */])(child.props.onKeyDown, this.handleKeyDown)\n }));\n };\n\n Dropdown.prototype.renderMenu = function renderMenu(child, _ref) {\n var _this3 = this;\n\n var id = _ref.id,\n onClose = _ref.onClose,\n onSelect = _ref.onSelect,\n rootCloseEvent = _ref.rootCloseEvent,\n props = __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_objectWithoutProperties___default()(_ref, ['id', 'onClose', 'onSelect', 'rootCloseEvent']);\n\n var ref = function ref(c) {\n _this3.menu = c;\n };\n\n if (typeof child.ref === 'string') {\n true ? __WEBPACK_IMPORTED_MODULE_16_warning___default()(false, 'String refs are not supported on `<Dropdown.Menu>` components. ' + 'To apply a ref to the component use the callback signature:\\n\\n ' + 'https://facebook.github.io/react/docs/more-about-refs.html#the-ref-callback-attribute') : void 0;\n } else {\n ref = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_21__utils_createChainedFunction__[\"a\" /* default */])(child.ref, ref);\n }\n\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9_react__[\"cloneElement\"])(child, __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends___default()({}, props, {\n ref: ref,\n labelledBy: id,\n bsClass: __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_20__utils_bootstrapUtils__[\"e\" /* prefix */])(props, 'menu'),\n onClose: __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_21__utils_createChainedFunction__[\"a\" /* default */])(child.props.onClose, onClose, this.handleClose),\n onSelect: __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_21__utils_createChainedFunction__[\"a\" /* default */])(child.props.onSelect, onSelect, function (key, event) {\n return _this3.handleClose(event, { source: 'select' });\n }),\n rootCloseEvent: rootCloseEvent\n }));\n };\n\n Dropdown.prototype.render = function render() {\n var _classes,\n _this4 = this;\n\n var _props = this.props,\n Component = _props.componentClass,\n id = _props.id,\n dropup = _props.dropup,\n disabled = _props.disabled,\n pullRight = _props.pullRight,\n open = _props.open,\n onClose = _props.onClose,\n onSelect = _props.onSelect,\n role = _props.role,\n bsClass = _props.bsClass,\n className = _props.className,\n rootCloseEvent = _props.rootCloseEvent,\n children = _props.children,\n props = __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_objectWithoutProperties___default()(_props, ['componentClass', 'id', 'dropup', 'disabled', 'pullRight', 'open', 'onClose', 'onSelect', 'role', 'bsClass', 'className', 'rootCloseEvent', 'children']);\n\n delete props.onToggle;\n\n var classes = (_classes = {}, _classes[bsClass] = true, _classes.open = open, _classes.disabled = disabled, _classes);\n\n if (dropup) {\n classes[bsClass] = false;\n classes.dropup = true;\n }\n\n // This intentionally forwards bsSize and bsStyle (if set) to the\n // underlying component, to allow it to render size and style variants.\n\n return __WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement(\n Component,\n __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends___default()({}, props, {\n className: __WEBPACK_IMPORTED_MODULE_5_classnames___default()(className, classes)\n }),\n __WEBPACK_IMPORTED_MODULE_23__utils_ValidComponentChildren__[\"a\" /* default */].map(children, function (child) {\n switch (child.props.bsRole) {\n case TOGGLE_ROLE:\n return _this4.renderToggle(child, {\n id: id, disabled: disabled, open: open, role: role, bsClass: bsClass\n });\n case MENU_ROLE:\n return _this4.renderMenu(child, {\n id: id, open: open, pullRight: pullRight, bsClass: bsClass, onClose: onClose, onSelect: onSelect, rootCloseEvent: rootCloseEvent\n });\n default:\n return child;\n }\n })\n );\n };\n\n return Dropdown;\n}(__WEBPACK_IMPORTED_MODULE_9_react___default.a.Component);\n\nDropdown.propTypes = propTypes;\nDropdown.defaultProps = defaultProps;\n\n__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_20__utils_bootstrapUtils__[\"c\" /* bsClass */])('dropdown', Dropdown);\n\nvar UncontrolledDropdown = __WEBPACK_IMPORTED_MODULE_15_uncontrollable___default()(Dropdown, { open: 'onToggle' });\n\nUncontrolledDropdown.Toggle = __WEBPACK_IMPORTED_MODULE_19__DropdownToggle__[\"a\" /* default */];\nUncontrolledDropdown.Menu = __WEBPACK_IMPORTED_MODULE_18__DropdownMenu__[\"a\" /* default */];\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (UncontrolledDropdown);\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/Dropdown.js\n// module id = 165\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/Dropdown.js?", + ); + + /***/ + }, + /* 166 */ + /* exports provided: default */ + /* exports used: default */ + /*!**************************************!*\ + !*** ./~/react-bootstrap/es/Fade.js ***! + \**************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ 7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react_overlays_lib_Transition__ = __webpack_require__(/*! react-overlays/lib/Transition */ 567);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react_overlays_lib_Transition___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_react_overlays_lib_Transition__);\n\n\n\n\n\n\n\n\n\nvar propTypes = {\n /**\n * Show the component; triggers the fade in or fade out animation\n */\n 'in': __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool,\n\n /**\n * Wait until the first \"enter\" transition to mount the component (add it to the DOM)\n */\n mountOnEnter: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool,\n\n /**\n * Unmount the component (remove it from the DOM) when it is faded out\n */\n unmountOnExit: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool,\n\n /**\n * Run the fade in animation when the component mounts, if it is initially\n * shown\n */\n transitionAppear: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool,\n\n /**\n * Duration of the fade animation in milliseconds, to ensure that finishing\n * callbacks are fired even if the original browser transition end events are\n * canceled\n */\n timeout: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.number,\n\n /**\n * Callback fired before the component fades in\n */\n onEnter: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,\n /**\n * Callback fired after the component starts to fade in\n */\n onEntering: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,\n /**\n * Callback fired after the has component faded in\n */\n onEntered: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,\n /**\n * Callback fired before the component fades out\n */\n onExit: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,\n /**\n * Callback fired after the component starts to fade out\n */\n onExiting: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,\n /**\n * Callback fired after the component has faded out\n */\n onExited: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func\n};\n\nvar defaultProps = {\n 'in': false,\n timeout: 300,\n mountOnEnter: false,\n unmountOnExit: false,\n transitionAppear: false\n};\n\nvar Fade = function (_React$Component) {\n __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits___default()(Fade, _React$Component);\n\n function Fade() {\n __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck___default()(this, Fade);\n\n return __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.apply(this, arguments));\n }\n\n Fade.prototype.render = function render() {\n return __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7_react_overlays_lib_Transition___default.a, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, this.props, {\n className: __WEBPACK_IMPORTED_MODULE_4_classnames___default()(this.props.className, 'fade'),\n enteredClassName: 'in',\n enteringClassName: 'in'\n }));\n };\n\n return Fade;\n}(__WEBPACK_IMPORTED_MODULE_5_react___default.a.Component);\n\nFade.propTypes = propTypes;\nFade.defaultProps = defaultProps;\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Fade);\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/Fade.js\n// module id = 166\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/Fade.js?", + ); + + /***/ + }, + /* 167 */ + /* exports provided: default */ + /* exports used: default */ + /*!***********************************************************!*\ + !*** ./~/react-bootstrap/es/utils/splitComponentProps.js ***! + \***********************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_object_entries__ = __webpack_require__(/*! babel-runtime/core-js/object/entries */ 314);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_object_entries___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_object_entries__);\n/* harmony export (immutable) */ __webpack_exports__["a"] = splitComponentProps;\n\nfunction splitComponentProps(props, Component) {\n var componentPropTypes = Component.propTypes;\n\n var parentProps = {};\n var childProps = {};\n\n __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_object_entries___default()(props).forEach(function (_ref) {\n var propName = _ref[0],\n propValue = _ref[1];\n\n if (componentPropTypes[propName]) {\n parentProps[propName] = propValue;\n } else {\n childProps[propName] = propValue;\n }\n });\n\n return [parentProps, childProps];\n}\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/utils/splitComponentProps.js\n// module id = 167\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/utils/splitComponentProps.js?', + ); + + /***/ + }, + /* 168 */ + /* unknown exports provided */ + /* all exports used */ + /*!************************************************!*\ + !*** ./~/react-dom/lib/EventPluginRegistry.js ***! + \************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * \n */\n\n\n\nvar _prodInvariant = __webpack_require__(/*! ./reactProdInvariant */ 17);\n\nvar invariant = __webpack_require__(/*! fbjs/lib/invariant */ 12);\n\n/**\n * Injectable ordering of event plugins.\n */\nvar eventPluginOrder = null;\n\n/**\n * Injectable mapping from names to event plugin modules.\n */\nvar namesToPlugins = {};\n\n/**\n * Recomputes the plugin list using the injected plugins and plugin ordering.\n *\n * @private\n */\nfunction recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? true ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : _prodInvariant('96', pluginName) : void 0;\n if (EventPluginRegistry.plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? true ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : _prodInvariant('97', pluginName) : void 0;\n EventPluginRegistry.plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? true ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : _prodInvariant('98', eventName, pluginName) : void 0;\n }\n }\n}\n\n/**\n * Publishes an event so that it can be dispatched by the supplied plugin.\n *\n * @param {object} dispatchConfig Dispatch configuration for the event.\n * @param {object} PluginModule Plugin publishing the event.\n * @return {boolean} True if the event was successfully published.\n * @private\n */\nfunction publishEventForPlugin(dispatchConfig, pluginModule, eventName) {\n !!EventPluginRegistry.eventNameDispatchConfigs.hasOwnProperty(eventName) ? true ? invariant(false, 'EventPluginHub: More than one plugin attempted to publish the same event name, `%s`.', eventName) : _prodInvariant('99', eventName) : void 0;\n EventPluginRegistry.eventNameDispatchConfigs[eventName] = dispatchConfig;\n\n var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames;\n if (phasedRegistrationNames) {\n for (var phaseName in phasedRegistrationNames) {\n if (phasedRegistrationNames.hasOwnProperty(phaseName)) {\n var phasedRegistrationName = phasedRegistrationNames[phaseName];\n publishRegistrationName(phasedRegistrationName, pluginModule, eventName);\n }\n }\n return true;\n } else if (dispatchConfig.registrationName) {\n publishRegistrationName(dispatchConfig.registrationName, pluginModule, eventName);\n return true;\n }\n return false;\n}\n\n/**\n * Publishes a registration name that is used to identify dispatched events and\n * can be used with `EventPluginHub.putListener` to register listeners.\n *\n * @param {string} registrationName Registration name to add.\n * @param {object} PluginModule Plugin publishing the event.\n * @private\n */\nfunction publishRegistrationName(registrationName, pluginModule, eventName) {\n !!EventPluginRegistry.registrationNameModules[registrationName] ? true ? invariant(false, 'EventPluginHub: More than one plugin attempted to publish the same registration name, `%s`.', registrationName) : _prodInvariant('100', registrationName) : void 0;\n EventPluginRegistry.registrationNameModules[registrationName] = pluginModule;\n EventPluginRegistry.registrationNameDependencies[registrationName] = pluginModule.eventTypes[eventName].dependencies;\n\n if (true) {\n var lowerCasedName = registrationName.toLowerCase();\n EventPluginRegistry.possibleRegistrationNames[lowerCasedName] = registrationName;\n\n if (registrationName === 'onDoubleClick') {\n EventPluginRegistry.possibleRegistrationNames.ondblclick = registrationName;\n }\n }\n}\n\n/**\n * Registers plugins so that they can extract and dispatch events.\n *\n * @see {EventPluginHub}\n */\nvar EventPluginRegistry = {\n\n /**\n * Ordered list of injected plugins.\n */\n plugins: [],\n\n /**\n * Mapping from event name to dispatch config\n */\n eventNameDispatchConfigs: {},\n\n /**\n * Mapping from registration name to plugin module\n */\n registrationNameModules: {},\n\n /**\n * Mapping from registration name to event name\n */\n registrationNameDependencies: {},\n\n /**\n * Mapping from lowercase registration names to the properly cased version,\n * used to warn in the case of missing event handlers. Available\n * only in __DEV__.\n * @type {Object}\n */\n possibleRegistrationNames: true ? {} : null,\n // Trust the developer to only use possibleRegistrationNames in __DEV__\n\n /**\n * Injects an ordering of plugins (by plugin name). This allows the ordering\n * to be decoupled from injection of the actual plugins so that ordering is\n * always deterministic regardless of packaging, on-the-fly injection, etc.\n *\n * @param {array} InjectedEventPluginOrder\n * @internal\n * @see {EventPluginHub.injection.injectEventPluginOrder}\n */\n injectEventPluginOrder: function (injectedEventPluginOrder) {\n !!eventPluginOrder ? true ? invariant(false, 'EventPluginRegistry: Cannot inject event plugin ordering more than once. You are likely trying to load more than one copy of React.') : _prodInvariant('101') : void 0;\n // Clone the ordering so it cannot be dynamically mutated.\n eventPluginOrder = Array.prototype.slice.call(injectedEventPluginOrder);\n recomputePluginOrdering();\n },\n\n /**\n * Injects plugins to be used by `EventPluginHub`. The plugin names must be\n * in the ordering injected by `injectEventPluginOrder`.\n *\n * Plugins can be injected as part of page initialization or on-the-fly.\n *\n * @param {object} injectedNamesToPlugins Map from names to plugin modules.\n * @internal\n * @see {EventPluginHub.injection.injectEventPluginsByName}\n */\n injectEventPluginsByName: function (injectedNamesToPlugins) {\n var isOrderingDirty = false;\n for (var pluginName in injectedNamesToPlugins) {\n if (!injectedNamesToPlugins.hasOwnProperty(pluginName)) {\n continue;\n }\n var pluginModule = injectedNamesToPlugins[pluginName];\n if (!namesToPlugins.hasOwnProperty(pluginName) || namesToPlugins[pluginName] !== pluginModule) {\n !!namesToPlugins[pluginName] ? true ? invariant(false, 'EventPluginRegistry: Cannot inject two different event plugins using the same name, `%s`.', pluginName) : _prodInvariant('102', pluginName) : void 0;\n namesToPlugins[pluginName] = pluginModule;\n isOrderingDirty = true;\n }\n }\n if (isOrderingDirty) {\n recomputePluginOrdering();\n }\n },\n\n /**\n * Looks up the plugin for the supplied event.\n *\n * @param {object} event A synthetic event.\n * @return {?object} The plugin that created the supplied event.\n * @internal\n */\n getPluginModuleForEvent: function (event) {\n var dispatchConfig = event.dispatchConfig;\n if (dispatchConfig.registrationName) {\n return EventPluginRegistry.registrationNameModules[dispatchConfig.registrationName] || null;\n }\n if (dispatchConfig.phasedRegistrationNames !== undefined) {\n // pulling phasedRegistrationNames out of dispatchConfig helps Flow see\n // that it is not undefined.\n var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames;\n\n for (var phase in phasedRegistrationNames) {\n if (!phasedRegistrationNames.hasOwnProperty(phase)) {\n continue;\n }\n var pluginModule = EventPluginRegistry.registrationNameModules[phasedRegistrationNames[phase]];\n if (pluginModule) {\n return pluginModule;\n }\n }\n }\n return null;\n },\n\n /**\n * Exposed for unit testing.\n * @private\n */\n _resetEventPlugins: function () {\n eventPluginOrder = null;\n for (var pluginName in namesToPlugins) {\n if (namesToPlugins.hasOwnProperty(pluginName)) {\n delete namesToPlugins[pluginName];\n }\n }\n EventPluginRegistry.plugins.length = 0;\n\n var eventNameDispatchConfigs = EventPluginRegistry.eventNameDispatchConfigs;\n for (var eventName in eventNameDispatchConfigs) {\n if (eventNameDispatchConfigs.hasOwnProperty(eventName)) {\n delete eventNameDispatchConfigs[eventName];\n }\n }\n\n var registrationNameModules = EventPluginRegistry.registrationNameModules;\n for (var registrationName in registrationNameModules) {\n if (registrationNameModules.hasOwnProperty(registrationName)) {\n delete registrationNameModules[registrationName];\n }\n }\n\n if (true) {\n var possibleRegistrationNames = EventPluginRegistry.possibleRegistrationNames;\n for (var lowerCasedName in possibleRegistrationNames) {\n if (possibleRegistrationNames.hasOwnProperty(lowerCasedName)) {\n delete possibleRegistrationNames[lowerCasedName];\n }\n }\n }\n }\n\n};\n\nmodule.exports = EventPluginRegistry;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/EventPluginRegistry.js\n// module id = 168\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/EventPluginRegistry.js?", + ); + + /***/ + }, + /* 169 */ + /* unknown exports provided */ + /* all exports used */ + /*!*****************************************************!*\ + !*** ./~/react-dom/lib/ReactBrowserEventEmitter.js ***! + \*****************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar _assign = __webpack_require__(/*! object-assign */ 21);\n\nvar EventPluginRegistry = __webpack_require__(/*! ./EventPluginRegistry */ 168);\nvar ReactEventEmitterMixin = __webpack_require__(/*! ./ReactEventEmitterMixin */ 1347);\nvar ViewportMetrics = __webpack_require__(/*! ./ViewportMetrics */ 549);\n\nvar getVendorPrefixedEventName = __webpack_require__(/*! ./getVendorPrefixedEventName */ 1382);\nvar isEventSupported = __webpack_require__(/*! ./isEventSupported */ 258);\n\n/**\n * Summary of `ReactBrowserEventEmitter` event handling:\n *\n * - Top-level delegation is used to trap most native browser events. This\n * may only occur in the main thread and is the responsibility of\n * ReactEventListener, which is injected and can therefore support pluggable\n * event sources. This is the only work that occurs in the main thread.\n *\n * - We normalize and de-duplicate events to account for browser quirks. This\n * may be done in the worker thread.\n *\n * - Forward these native events (with the associated top-level type used to\n * trap it) to `EventPluginHub`, which in turn will ask plugins if they want\n * to extract any synthetic events.\n *\n * - The `EventPluginHub` will then process each event by annotating them with\n * \"dispatches\", a sequence of listeners and IDs that care about that event.\n *\n * - The `EventPluginHub` then dispatches the events.\n *\n * Overview of React and the event system:\n *\n * +------------+ .\n * | DOM | .\n * +------------+ .\n * | .\n * v .\n * +------------+ .\n * | ReactEvent | .\n * | Listener | .\n * +------------+ . +-----------+\n * | . +--------+|SimpleEvent|\n * | . | |Plugin |\n * +-----|------+ . v +-----------+\n * | | | . +--------------+ +------------+\n * | +-----------.--->|EventPluginHub| | Event |\n * | | . | | +-----------+ | Propagators|\n * | ReactEvent | . | | |TapEvent | |------------|\n * | Emitter | . | |<---+|Plugin | |other plugin|\n * | | . | | +-----------+ | utilities |\n * | +-----------.--->| | +------------+\n * | | | . +--------------+\n * +-----|------+ . ^ +-----------+\n * | . | |Enter/Leave|\n * + . +-------+|Plugin |\n * +-------------+ . +-----------+\n * | application | .\n * |-------------| .\n * | | .\n * | | .\n * +-------------+ .\n * .\n * React Core . General Purpose Event Plugin System\n */\n\nvar hasEventPageXY;\nvar alreadyListeningTo = {};\nvar isMonitoringScrollValue = false;\nvar reactTopListenersCounter = 0;\n\n// For events like 'submit' which don't consistently bubble (which we trap at a\n// lower node than `document`), binding at `document` would cause duplicate\n// events so we don't include them here\nvar topEventMapping = {\n topAbort: 'abort',\n topAnimationEnd: getVendorPrefixedEventName('animationend') || 'animationend',\n topAnimationIteration: getVendorPrefixedEventName('animationiteration') || 'animationiteration',\n topAnimationStart: getVendorPrefixedEventName('animationstart') || 'animationstart',\n topBlur: 'blur',\n topCanPlay: 'canplay',\n topCanPlayThrough: 'canplaythrough',\n topChange: 'change',\n topClick: 'click',\n topCompositionEnd: 'compositionend',\n topCompositionStart: 'compositionstart',\n topCompositionUpdate: 'compositionupdate',\n topContextMenu: 'contextmenu',\n topCopy: 'copy',\n topCut: 'cut',\n topDoubleClick: 'dblclick',\n topDrag: 'drag',\n topDragEnd: 'dragend',\n topDragEnter: 'dragenter',\n topDragExit: 'dragexit',\n topDragLeave: 'dragleave',\n topDragOver: 'dragover',\n topDragStart: 'dragstart',\n topDrop: 'drop',\n topDurationChange: 'durationchange',\n topEmptied: 'emptied',\n topEncrypted: 'encrypted',\n topEnded: 'ended',\n topError: 'error',\n topFocus: 'focus',\n topInput: 'input',\n topKeyDown: 'keydown',\n topKeyPress: 'keypress',\n topKeyUp: 'keyup',\n topLoadedData: 'loadeddata',\n topLoadedMetadata: 'loadedmetadata',\n topLoadStart: 'loadstart',\n topMouseDown: 'mousedown',\n topMouseMove: 'mousemove',\n topMouseOut: 'mouseout',\n topMouseOver: 'mouseover',\n topMouseUp: 'mouseup',\n topPaste: 'paste',\n topPause: 'pause',\n topPlay: 'play',\n topPlaying: 'playing',\n topProgress: 'progress',\n topRateChange: 'ratechange',\n topScroll: 'scroll',\n topSeeked: 'seeked',\n topSeeking: 'seeking',\n topSelectionChange: 'selectionchange',\n topStalled: 'stalled',\n topSuspend: 'suspend',\n topTextInput: 'textInput',\n topTimeUpdate: 'timeupdate',\n topTouchCancel: 'touchcancel',\n topTouchEnd: 'touchend',\n topTouchMove: 'touchmove',\n topTouchStart: 'touchstart',\n topTransitionEnd: getVendorPrefixedEventName('transitionend') || 'transitionend',\n topVolumeChange: 'volumechange',\n topWaiting: 'waiting',\n topWheel: 'wheel'\n};\n\n/**\n * To ensure no conflicts with other potential React instances on the page\n */\nvar topListenersIDKey = '_reactListenersID' + String(Math.random()).slice(2);\n\nfunction getListeningForDocument(mountAt) {\n // In IE8, `mountAt` is a host object and doesn't have `hasOwnProperty`\n // directly.\n if (!Object.prototype.hasOwnProperty.call(mountAt, topListenersIDKey)) {\n mountAt[topListenersIDKey] = reactTopListenersCounter++;\n alreadyListeningTo[mountAt[topListenersIDKey]] = {};\n }\n return alreadyListeningTo[mountAt[topListenersIDKey]];\n}\n\n/**\n * `ReactBrowserEventEmitter` is used to attach top-level event listeners. For\n * example:\n *\n * EventPluginHub.putListener('myID', 'onClick', myFunction);\n *\n * This would allocate a \"registration\" of `('onClick', myFunction)` on 'myID'.\n *\n * @internal\n */\nvar ReactBrowserEventEmitter = _assign({}, ReactEventEmitterMixin, {\n\n /**\n * Injectable event backend\n */\n ReactEventListener: null,\n\n injection: {\n /**\n * @param {object} ReactEventListener\n */\n injectReactEventListener: function (ReactEventListener) {\n ReactEventListener.setHandleTopLevel(ReactBrowserEventEmitter.handleTopLevel);\n ReactBrowserEventEmitter.ReactEventListener = ReactEventListener;\n }\n },\n\n /**\n * Sets whether or not any created callbacks should be enabled.\n *\n * @param {boolean} enabled True if callbacks should be enabled.\n */\n setEnabled: function (enabled) {\n if (ReactBrowserEventEmitter.ReactEventListener) {\n ReactBrowserEventEmitter.ReactEventListener.setEnabled(enabled);\n }\n },\n\n /**\n * @return {boolean} True if callbacks are enabled.\n */\n isEnabled: function () {\n return !!(ReactBrowserEventEmitter.ReactEventListener && ReactBrowserEventEmitter.ReactEventListener.isEnabled());\n },\n\n /**\n * We listen for bubbled touch events on the document object.\n *\n * Firefox v8.01 (and possibly others) exhibited strange behavior when\n * mounting `onmousemove` events at some node that was not the document\n * element. The symptoms were that if your mouse is not moving over something\n * contained within that mount point (for example on the background) the\n * top-level listeners for `onmousemove` won't be called. However, if you\n * register the `mousemove` on the document object, then it will of course\n * catch all `mousemove`s. This along with iOS quirks, justifies restricting\n * top-level listeners to the document object only, at least for these\n * movement types of events and possibly all events.\n *\n * @see http://www.quirksmode.org/blog/archives/2010/09/click_event_del.html\n *\n * Also, `keyup`/`keypress`/`keydown` do not bubble to the window on IE, but\n * they bubble to document.\n *\n * @param {string} registrationName Name of listener (e.g. `onClick`).\n * @param {object} contentDocumentHandle Document which owns the container\n */\n listenTo: function (registrationName, contentDocumentHandle) {\n var mountAt = contentDocumentHandle;\n var isListening = getListeningForDocument(mountAt);\n var dependencies = EventPluginRegistry.registrationNameDependencies[registrationName];\n\n for (var i = 0; i < dependencies.length; i++) {\n var dependency = dependencies[i];\n if (!(isListening.hasOwnProperty(dependency) && isListening[dependency])) {\n if (dependency === 'topWheel') {\n if (isEventSupported('wheel')) {\n ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topWheel', 'wheel', mountAt);\n } else if (isEventSupported('mousewheel')) {\n ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topWheel', 'mousewheel', mountAt);\n } else {\n // Firefox needs to capture a different mouse scroll event.\n // @see http://www.quirksmode.org/dom/events/tests/scroll.html\n ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topWheel', 'DOMMouseScroll', mountAt);\n }\n } else if (dependency === 'topScroll') {\n\n if (isEventSupported('scroll', true)) {\n ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent('topScroll', 'scroll', mountAt);\n } else {\n ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topScroll', 'scroll', ReactBrowserEventEmitter.ReactEventListener.WINDOW_HANDLE);\n }\n } else if (dependency === 'topFocus' || dependency === 'topBlur') {\n\n if (isEventSupported('focus', true)) {\n ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent('topFocus', 'focus', mountAt);\n ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent('topBlur', 'blur', mountAt);\n } else if (isEventSupported('focusin')) {\n // IE has `focusin` and `focusout` events which bubble.\n // @see http://www.quirksmode.org/blog/archives/2008/04/delegating_the.html\n ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topFocus', 'focusin', mountAt);\n ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topBlur', 'focusout', mountAt);\n }\n\n // to make sure blur and focus event listeners are only attached once\n isListening.topBlur = true;\n isListening.topFocus = true;\n } else if (topEventMapping.hasOwnProperty(dependency)) {\n ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(dependency, topEventMapping[dependency], mountAt);\n }\n\n isListening[dependency] = true;\n }\n }\n },\n\n trapBubbledEvent: function (topLevelType, handlerBaseName, handle) {\n return ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelType, handlerBaseName, handle);\n },\n\n trapCapturedEvent: function (topLevelType, handlerBaseName, handle) {\n return ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent(topLevelType, handlerBaseName, handle);\n },\n\n /**\n * Protect against document.createEvent() returning null\n * Some popup blocker extensions appear to do this:\n * https://github.com/facebook/react/issues/6887\n */\n supportsEventPageXY: function () {\n if (!document.createEvent) {\n return false;\n }\n var ev = document.createEvent('MouseEvent');\n return ev != null && 'pageX' in ev;\n },\n\n /**\n * Listens to window scroll and resize events. We cache scroll values so that\n * application code can access them without triggering reflows.\n *\n * ViewportMetrics is only used by SyntheticMouse/TouchEvent and only when\n * pageX/pageY isn't supported (legacy browsers).\n *\n * NOTE: Scroll events do not bubble.\n *\n * @see http://www.quirksmode.org/dom/events/scroll.html\n */\n ensureScrollValueMonitoring: function () {\n if (hasEventPageXY === undefined) {\n hasEventPageXY = ReactBrowserEventEmitter.supportsEventPageXY();\n }\n if (!hasEventPageXY && !isMonitoringScrollValue) {\n var refresh = ViewportMetrics.refreshScrollValues;\n ReactBrowserEventEmitter.ReactEventListener.monitorScrollValue(refresh);\n isMonitoringScrollValue = true;\n }\n }\n\n});\n\nmodule.exports = ReactBrowserEventEmitter;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/ReactBrowserEventEmitter.js\n// module id = 169\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/ReactBrowserEventEmitter.js?", + ); + + /***/ + }, + /* 170 */ + /* unknown exports provided */ + /* all exports used */ + /*!************************************************!*\ + !*** ./~/react-dom/lib/SyntheticMouseEvent.js ***! + \************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar SyntheticUIEvent = __webpack_require__(/*! ./SyntheticUIEvent */ 126);\nvar ViewportMetrics = __webpack_require__(/*! ./ViewportMetrics */ 549);\n\nvar getEventModifierState = __webpack_require__(/*! ./getEventModifierState */ 255);\n\n/**\n * @interface MouseEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\nvar MouseEventInterface = {\n screenX: null,\n screenY: null,\n clientX: null,\n clientY: null,\n ctrlKey: null,\n shiftKey: null,\n altKey: null,\n metaKey: null,\n getModifierState: getEventModifierState,\n button: function (event) {\n // Webkit, Firefox, IE9+\n // which: 1 2 3\n // button: 0 1 2 (standard)\n var button = event.button;\n if ('which' in event) {\n return button;\n }\n // IE<9\n // which: undefined\n // button: 0 0 0\n // button: 1 4 2 (onmouseup)\n return button === 2 ? 2 : button === 4 ? 1 : 0;\n },\n buttons: null,\n relatedTarget: function (event) {\n return event.relatedTarget || (event.fromElement === event.srcElement ? event.toElement : event.fromElement);\n },\n // \"Proprietary\" Interface.\n pageX: function (event) {\n return 'pageX' in event ? event.pageX : event.clientX + ViewportMetrics.currentScrollLeft;\n },\n pageY: function (event) {\n return 'pageY' in event ? event.pageY : event.clientY + ViewportMetrics.currentScrollTop;\n }\n};\n\n/**\n * @param {object} dispatchConfig Configuration used to dispatch this event.\n * @param {string} dispatchMarker Marker identifying the event target.\n * @param {object} nativeEvent Native browser event.\n * @extends {SyntheticUIEvent}\n */\nfunction SyntheticMouseEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {\n return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);\n}\n\nSyntheticUIEvent.augmentClass(SyntheticMouseEvent, MouseEventInterface);\n\nmodule.exports = SyntheticMouseEvent;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/SyntheticMouseEvent.js\n// module id = 170\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/SyntheticMouseEvent.js?", + ); + + /***/ + }, + /* 171 */ + /* unknown exports provided */ + /* all exports used */ + /*!****************************************!*\ + !*** ./~/react-dom/lib/Transaction.js ***! + \****************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * \n */\n\n\n\nvar _prodInvariant = __webpack_require__(/*! ./reactProdInvariant */ 17);\n\nvar invariant = __webpack_require__(/*! fbjs/lib/invariant */ 12);\n\nvar OBSERVED_ERROR = {};\n\n/**\n * `Transaction` creates a black box that is able to wrap any method such that\n * certain invariants are maintained before and after the method is invoked\n * (Even if an exception is thrown while invoking the wrapped method). Whoever\n * instantiates a transaction can provide enforcers of the invariants at\n * creation time. The `Transaction` class itself will supply one additional\n * automatic invariant for you - the invariant that any transaction instance\n * should not be run while it is already being run. You would typically create a\n * single instance of a `Transaction` for reuse multiple times, that potentially\n * is used to wrap several different methods. Wrappers are extremely simple -\n * they only require implementing two methods.\n *\n * <pre>\n * wrappers (injected at creation time)\n * + +\n * | |\n * +-----------------|--------|--------------+\n * | v | |\n * | +---------------+ | |\n * | +--| wrapper1 |---|----+ |\n * | | +---------------+ v | |\n * | | +-------------+ | |\n * | | +----| wrapper2 |--------+ |\n * | | | +-------------+ | | |\n * | | | | | |\n * | v v v v | wrapper\n * | +---+ +---+ +---------+ +---+ +---+ | invariants\n * perform(anyMethod) | | | | | | | | | | | | maintained\n * +----------------->|-|---|-|---|-->|anyMethod|---|---|-|---|-|-------->\n * | | | | | | | | | | | |\n * | | | | | | | | | | | |\n * | | | | | | | | | | | |\n * | +---+ +---+ +---------+ +---+ +---+ |\n * | initialize close |\n * +-----------------------------------------+\n * </pre>\n *\n * Use cases:\n * - Preserving the input selection ranges before/after reconciliation.\n * Restoring selection even in the event of an unexpected error.\n * - Deactivating events while rearranging the DOM, preventing blurs/focuses,\n * while guaranteeing that afterwards, the event system is reactivated.\n * - Flushing a queue of collected DOM mutations to the main UI thread after a\n * reconciliation takes place in a worker thread.\n * - Invoking any collected `componentDidUpdate` callbacks after rendering new\n * content.\n * - (Future use case): Wrapping particular flushes of the `ReactWorker` queue\n * to preserve the `scrollTop` (an automatic scroll aware DOM).\n * - (Future use case): Layout calculations before and after DOM updates.\n *\n * Transactional plugin API:\n * - A module that has an `initialize` method that returns any precomputation.\n * - and a `close` method that accepts the precomputation. `close` is invoked\n * when the wrapped process is completed, or has failed.\n *\n * @param {Array<TransactionalWrapper>} transactionWrapper Wrapper modules\n * that implement `initialize` and `close`.\n * @return {Transaction} Single transaction for reuse in thread.\n *\n * @class Transaction\n */\nvar TransactionImpl = {\n /**\n * Sets up this instance so that it is prepared for collecting metrics. Does\n * so such that this setup method may be used on an instance that is already\n * initialized, in a way that does not consume additional memory upon reuse.\n * That can be useful if you decide to make your subclass of this mixin a\n * \"PooledClass\".\n */\n reinitializeTransaction: function () {\n this.transactionWrappers = this.getTransactionWrappers();\n if (this.wrapperInitData) {\n this.wrapperInitData.length = 0;\n } else {\n this.wrapperInitData = [];\n }\n this._isInTransaction = false;\n },\n\n _isInTransaction: false,\n\n /**\n * @abstract\n * @return {Array<TransactionWrapper>} Array of transaction wrappers.\n */\n getTransactionWrappers: null,\n\n isInTransaction: function () {\n return !!this._isInTransaction;\n },\n\n /**\n * Executes the function within a safety window. Use this for the top level\n * methods that result in large amounts of computation/mutations that would\n * need to be safety checked. The optional arguments helps prevent the need\n * to bind in many cases.\n *\n * @param {function} method Member of scope to call.\n * @param {Object} scope Scope to invoke from.\n * @param {Object?=} a Argument to pass to the method.\n * @param {Object?=} b Argument to pass to the method.\n * @param {Object?=} c Argument to pass to the method.\n * @param {Object?=} d Argument to pass to the method.\n * @param {Object?=} e Argument to pass to the method.\n * @param {Object?=} f Argument to pass to the method.\n *\n * @return {*} Return value from `method`.\n */\n perform: function (method, scope, a, b, c, d, e, f) {\n !!this.isInTransaction() ? true ? invariant(false, 'Transaction.perform(...): Cannot initialize a transaction when there is already an outstanding transaction.') : _prodInvariant('27') : void 0;\n var errorThrown;\n var ret;\n try {\n this._isInTransaction = true;\n // Catching errors makes debugging more difficult, so we start with\n // errorThrown set to true before setting it to false after calling\n // close -- if it's still set to true in the finally block, it means\n // one of these calls threw.\n errorThrown = true;\n this.initializeAll(0);\n ret = method.call(scope, a, b, c, d, e, f);\n errorThrown = false;\n } finally {\n try {\n if (errorThrown) {\n // If `method` throws, prefer to show that stack trace over any thrown\n // by invoking `closeAll`.\n try {\n this.closeAll(0);\n } catch (err) {}\n } else {\n // Since `method` didn't throw, we don't want to silence the exception\n // here.\n this.closeAll(0);\n }\n } finally {\n this._isInTransaction = false;\n }\n }\n return ret;\n },\n\n initializeAll: function (startIndex) {\n var transactionWrappers = this.transactionWrappers;\n for (var i = startIndex; i < transactionWrappers.length; i++) {\n var wrapper = transactionWrappers[i];\n try {\n // Catching errors makes debugging more difficult, so we start with the\n // OBSERVED_ERROR state before overwriting it with the real return value\n // of initialize -- if it's still set to OBSERVED_ERROR in the finally\n // block, it means wrapper.initialize threw.\n this.wrapperInitData[i] = OBSERVED_ERROR;\n this.wrapperInitData[i] = wrapper.initialize ? wrapper.initialize.call(this) : null;\n } finally {\n if (this.wrapperInitData[i] === OBSERVED_ERROR) {\n // The initializer for wrapper i threw an error; initialize the\n // remaining wrappers but silence any exceptions from them to ensure\n // that the first error is the one to bubble up.\n try {\n this.initializeAll(i + 1);\n } catch (err) {}\n }\n }\n }\n },\n\n /**\n * Invokes each of `this.transactionWrappers.close[i]` functions, passing into\n * them the respective return values of `this.transactionWrappers.init[i]`\n * (`close`rs that correspond to initializers that failed will not be\n * invoked).\n */\n closeAll: function (startIndex) {\n !this.isInTransaction() ? true ? invariant(false, 'Transaction.closeAll(): Cannot close transaction when none are open.') : _prodInvariant('28') : void 0;\n var transactionWrappers = this.transactionWrappers;\n for (var i = startIndex; i < transactionWrappers.length; i++) {\n var wrapper = transactionWrappers[i];\n var initData = this.wrapperInitData[i];\n var errorThrown;\n try {\n // Catching errors makes debugging more difficult, so we start with\n // errorThrown set to true before setting it to false after calling\n // close -- if it's still set to true in the finally block, it means\n // wrapper.close threw.\n errorThrown = true;\n if (initData !== OBSERVED_ERROR && wrapper.close) {\n wrapper.close.call(this, initData);\n }\n errorThrown = false;\n } finally {\n if (errorThrown) {\n // The closer for wrapper i threw an error; close the remaining\n // wrappers but silence any exceptions from them to ensure that the\n // first error is the one to bubble up.\n try {\n this.closeAll(i + 1);\n } catch (e) {}\n }\n }\n }\n this.wrapperInitData.length = 0;\n }\n};\n\nmodule.exports = TransactionImpl;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/Transaction.js\n// module id = 171\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/Transaction.js?", + ); + + /***/ + }, + /* 172 */ + /* unknown exports provided */ + /* all exports used */ + /*!********************************************************!*\ + !*** ./~/react-dom/lib/escapeTextContentForBrowser.js ***! + \********************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2016-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * Based on the escape-html library, which is used under the MIT License below:\n *\n * Copyright (c) 2012-2013 TJ Holowaychuk\n * Copyright (c) 2015 Andreas Lubbe\n * Copyright (c) 2015 Tiancheng \"Timothy\" Gu\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * 'Software'), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\n * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\n * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n *\n */\n\n\n\n// code copied and modified from escape-html\n/**\n * Module variables.\n * @private\n */\n\nvar matchHtmlRegExp = /[\"'&<>]/;\n\n/**\n * Escape special characters in the given string of html.\n *\n * @param {string} string The string to escape for inserting into HTML\n * @return {string}\n * @public\n */\n\nfunction escapeHtml(string) {\n var str = '' + string;\n var match = matchHtmlRegExp.exec(str);\n\n if (!match) {\n return str;\n }\n\n var escape;\n var html = '';\n var index = 0;\n var lastIndex = 0;\n\n for (index = match.index; index < str.length; index++) {\n switch (str.charCodeAt(index)) {\n case 34:\n // \"\n escape = '"';\n break;\n case 38:\n // &\n escape = '&';\n break;\n case 39:\n // '\n escape = '''; // modified from escape-html; used to be '''\n break;\n case 60:\n // <\n escape = '<';\n break;\n case 62:\n // >\n escape = '>';\n break;\n default:\n continue;\n }\n\n if (lastIndex !== index) {\n html += str.substring(lastIndex, index);\n }\n\n lastIndex = index + 1;\n html += escape;\n }\n\n return lastIndex !== index ? html + str.substring(lastIndex, index) : html;\n}\n// end code copied and modified from escape-html\n\n\n/**\n * Escapes text to prevent scripting attacks.\n *\n * @param {*} text Text value to escape.\n * @return {string} An escaped string.\n */\nfunction escapeTextContentForBrowser(text) {\n if (typeof text === 'boolean' || typeof text === 'number') {\n // this shortcircuit helps perf for types that we know will never have\n // special characters, especially given that this function is used often\n // for numeric dom ids.\n return '' + text;\n }\n return escapeHtml(text);\n}\n\nmodule.exports = escapeTextContentForBrowser;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/escapeTextContentForBrowser.js\n// module id = 172\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/escapeTextContentForBrowser.js?", + ); + + /***/ + }, + /* 173 */ + /* unknown exports provided */ + /* all exports used */ + /*!*****************************************!*\ + !*** ./~/react-dom/lib/setInnerHTML.js ***! + \*****************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar ExecutionEnvironment = __webpack_require__(/*! fbjs/lib/ExecutionEnvironment */ 27);\nvar DOMNamespaces = __webpack_require__(/*! ./DOMNamespaces */ 246);\n\nvar WHITESPACE_TEST = /^[ \\r\\n\\t\\f]/;\nvar NONVISIBLE_TEST = /<(!--|link|noscript|meta|script|style)[ \\r\\n\\t\\f\\/>]/;\n\nvar createMicrosoftUnsafeLocalFunction = __webpack_require__(/*! ./createMicrosoftUnsafeLocalFunction */ 253);\n\n// SVG temp container for IE lacking innerHTML\nvar reusableSVGContainer;\n\n/**\n * Set the innerHTML property of a node, ensuring that whitespace is preserved\n * even in IE8.\n *\n * @param {DOMElement} node\n * @param {string} html\n * @internal\n */\nvar setInnerHTML = createMicrosoftUnsafeLocalFunction(function (node, html) {\n // IE does not have innerHTML for SVG nodes, so instead we inject the\n // new markup in a temp node and then move the child nodes across into\n // the target node\n if (node.namespaceURI === DOMNamespaces.svg && !('innerHTML' in node)) {\n reusableSVGContainer = reusableSVGContainer || document.createElement('div');\n reusableSVGContainer.innerHTML = '<svg>' + html + '</svg>';\n var svgNode = reusableSVGContainer.firstChild;\n while (svgNode.firstChild) {\n node.appendChild(svgNode.firstChild);\n }\n } else {\n node.innerHTML = html;\n }\n});\n\nif (ExecutionEnvironment.canUseDOM) {\n // IE8: When updating a just created node with innerHTML only leading\n // whitespace is removed. When updating an existing node with innerHTML\n // whitespace in root TextNodes is also collapsed.\n // @see quirksmode.org/bugreports/archives/2004/11/innerhtml_and_t.html\n\n // Feature detection; only IE8 is known to behave improperly like this.\n var testElement = document.createElement('div');\n testElement.innerHTML = ' ';\n if (testElement.innerHTML === '') {\n setInnerHTML = function (node, html) {\n // Magic theory: IE8 supposedly differentiates between added and updated\n // nodes when processing innerHTML, innerHTML on updated nodes suffers\n // from worse whitespace behavior. Re-adding a node like this triggers\n // the initial and more favorable whitespace behavior.\n // TODO: What to do on a detached node?\n if (node.parentNode) {\n node.parentNode.replaceChild(node, node);\n }\n\n // We also implement a workaround for non-visible tags disappearing into\n // thin air on IE8, this only happens if there is no visible text\n // in-front of the non-visible tags. Piggyback on the whitespace fix\n // and simply check if any non-visible tags appear in the source.\n if (WHITESPACE_TEST.test(html) || html[0] === '<' && NONVISIBLE_TEST.test(html)) {\n // Recover leading whitespace by temporarily prepending any character.\n // \\uFEFF has the potential advantage of being zero-width/invisible.\n // UglifyJS drops U+FEFF chars when parsing, so use String.fromCharCode\n // in hopes that this is preserved even if \"\\uFEFF\" is transformed to\n // the actual Unicode character (by Babel, for example).\n // https://github.com/mishoo/UglifyJS2/blob/v2.4.20/lib/parse.js#L216\n node.innerHTML = String.fromCharCode(0xFEFF) + html;\n\n // deleteData leaves an empty `TextNode` which offsets the index of all\n // children. Definitely want to avoid this.\n var textNode = node.firstChild;\n if (textNode.data.length === 1) {\n node.removeChild(textNode);\n } else {\n textNode.deleteData(0, 1);\n }\n } else {\n node.innerHTML = html;\n }\n };\n }\n testElement = null;\n}\n\nmodule.exports = setInnerHTML;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/setInnerHTML.js\n// module id = 173\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/setInnerHTML.js?", + ); + + /***/ + }, + /* 174 */ + /* unknown exports provided */ + /* exports used: default */ + /*!***************************************!*\ + !*** ./~/react-prop-types/lib/all.js ***! + \***************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nexports.__esModule = true;\nexports.default = all;\n\nvar _createChainableTypeChecker = __webpack_require__(/*! ./utils/createChainableTypeChecker */ 176);\n\nvar _createChainableTypeChecker2 = _interopRequireDefault(_createChainableTypeChecker);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction all() {\n for (var _len = arguments.length, validators = Array(_len), _key = 0; _key < _len; _key++) {\n validators[_key] = arguments[_key];\n }\n\n function allPropTypes() {\n for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n var error = null;\n\n validators.forEach(function (validator) {\n if (error != null) {\n return;\n }\n\n var result = validator.apply(undefined, args);\n if (result != null) {\n error = result;\n }\n });\n\n return error;\n }\n\n return (0, _createChainableTypeChecker2.default)(allPropTypes);\n}\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-prop-types/lib/all.js\n// module id = 174\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-prop-types/lib/all.js?', + ); + + /***/ + }, + /* 175 */ + /* unknown exports provided */ + /* exports used: default */ + /*!*****************************************************!*\ + !*** ./~/react-prop-types/lib/isRequiredForA11y.js ***! + \*****************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nexports.__esModule = true;\nexports.default = isRequiredForA11y;\nfunction isRequiredForA11y(validator) {\n return function validate(props, propName, componentName, location, propFullName) {\n var componentNameSafe = componentName || '<<anonymous>>';\n var propFullNameSafe = propFullName || propName;\n\n if (props[propName] == null) {\n return new Error('The ' + location + ' `' + propFullNameSafe + '` is required to make ' + ('`' + componentNameSafe + '` accessible for users of assistive ') + 'technologies such as screen readers.');\n }\n\n for (var _len = arguments.length, args = Array(_len > 5 ? _len - 5 : 0), _key = 5; _key < _len; _key++) {\n args[_key - 5] = arguments[_key];\n }\n\n return validator.apply(undefined, [props, propName, componentName, location, propFullName].concat(args));\n };\n}\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-prop-types/lib/isRequiredForA11y.js\n// module id = 175\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-prop-types/lib/isRequiredForA11y.js?", + ); + + /***/ + }, + /* 176 */ + /* unknown exports provided */ + /* all exports used */ + /*!********************************************************************!*\ + !*** ./~/react-prop-types/lib/utils/createChainableTypeChecker.js ***! + \********************************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nexports.__esModule = true;\nexports.default = createChainableTypeChecker;\n/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n// Mostly taken from ReactPropTypes.\n\nfunction createChainableTypeChecker(validate) {\n function checkType(isRequired, props, propName, componentName, location, propFullName) {\n var componentNameSafe = componentName || '<<anonymous>>';\n var propFullNameSafe = propFullName || propName;\n\n if (props[propName] == null) {\n if (isRequired) {\n return new Error('Required ' + location + ' `' + propFullNameSafe + '` was not specified ' + ('in `' + componentNameSafe + '`.'));\n }\n\n return null;\n }\n\n for (var _len = arguments.length, args = Array(_len > 6 ? _len - 6 : 0), _key = 6; _key < _len; _key++) {\n args[_key - 6] = arguments[_key];\n }\n\n return validate.apply(undefined, [props, propName, componentNameSafe, location, propFullNameSafe].concat(args));\n }\n\n var chainedCheckType = checkType.bind(null, false);\n chainedCheckType.isRequired = checkType.bind(null, true);\n\n return chainedCheckType;\n}\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-prop-types/lib/utils/createChainableTypeChecker.js\n// module id = 176\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-prop-types/lib/utils/createChainableTypeChecker.js?", + ); + + /***/ + }, + /* 177 */ + /* unknown exports provided */ + /* exports used: default */ + /*!*****************************************************!*\ + !*** ./~/react-responsive/dist/react-responsive.js ***! + \*****************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "(function webpackUniversalModuleDefinition(root, factory) {\n\tif(true)\n\t\tmodule.exports = factory(__webpack_require__(/*! react */ 1));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"react\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"MediaQuery\"] = factory(require(\"react\"));\n\telse\n\t\troot[\"MediaQuery\"] = factory(root[\"react\"]);\n})(this, function(__WEBPACK_EXTERNAL_MODULE_15__) {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\t\n\tvar _react = __webpack_require__(15);\n\t\n\tvar _react2 = _interopRequireDefault(_react);\n\t\n\tvar _propTypes = __webpack_require__(7);\n\t\n\tvar _propTypes2 = _interopRequireDefault(_propTypes);\n\t\n\tvar _matchmedia = __webpack_require__(11);\n\t\n\tvar _matchmedia2 = _interopRequireDefault(_matchmedia);\n\t\n\tvar _hyphenateStyleName = __webpack_require__(6);\n\t\n\tvar _hyphenateStyleName2 = _interopRequireDefault(_hyphenateStyleName);\n\t\n\tvar _mediaQuery = __webpack_require__(4);\n\t\n\tvar _mediaQuery2 = _interopRequireDefault(_mediaQuery);\n\t\n\tvar _toQuery = __webpack_require__(9);\n\t\n\tvar _toQuery2 = _interopRequireDefault(_toQuery);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\t\n\tvar defaultTypes = {\n\t component: _propTypes2.default.node,\n\t query: _propTypes2.default.string,\n\t values: _propTypes2.default.shape(_mediaQuery2.default.matchers),\n\t children: _propTypes2.default.oneOfType([_propTypes2.default.node, _propTypes2.default.function])\n\t};\n\tvar mediaKeys = Object.keys(_mediaQuery2.default.all);\n\tvar excludedQueryKeys = Object.keys(defaultTypes);\n\tvar excludedPropKeys = excludedQueryKeys.concat(mediaKeys);\n\t\n\tfunction omit(object, keys) {\n\t var newObject = _extends({}, object);\n\t keys.forEach(function (key) {\n\t return delete newObject[key];\n\t });\n\t return newObject;\n\t}\n\t\n\tvar MediaQuery = function (_React$Component) {\n\t _inherits(MediaQuery, _React$Component);\n\t\n\t function MediaQuery() {\n\t var _ref;\n\t\n\t var _temp, _this, _ret;\n\t\n\t _classCallCheck(this, MediaQuery);\n\t\n\t for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n\t args[_key] = arguments[_key];\n\t }\n\t\n\t return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = MediaQuery.__proto__ || Object.getPrototypeOf(MediaQuery)).call.apply(_ref, [this].concat(args))), _this), _this.state = { matches: false }, _this.updateMatches = function () {\n\t if (_this._mql.matches === _this.state.matches) {\n\t return;\n\t }\n\t _this.setState({\n\t matches: _this._mql.matches\n\t });\n\t }, _temp), _possibleConstructorReturn(_this, _ret);\n\t }\n\t\n\t _createClass(MediaQuery, [{\n\t key: 'componentWillMount',\n\t value: function componentWillMount() {\n\t this.updateQuery(this.props);\n\t }\n\t }, {\n\t key: 'componentWillReceiveProps',\n\t value: function componentWillReceiveProps(nextProps) {\n\t this.updateQuery(nextProps);\n\t }\n\t }, {\n\t key: 'updateQuery',\n\t value: function updateQuery(props) {\n\t var values = void 0;\n\t if (props.query) {\n\t this.query = props.query;\n\t } else {\n\t this.query = (0, _toQuery2.default)(omit(props, excludedQueryKeys));\n\t }\n\t\n\t if (!this.query) {\n\t throw new Error('Invalid or missing MediaQuery!');\n\t }\n\t\n\t if (props.values) {\n\t values = Object.keys(props.values).reduce(function (result, key) {\n\t result[(0, _hyphenateStyleName2.default)(key)] = props.values[key];\n\t return result;\n\t }, {});\n\t }\n\t\n\t if (this._mql) {\n\t this._mql.removeListener(this.updateMatches);\n\t }\n\t\n\t this._mql = (0, _matchmedia2.default)(this.query, values);\n\t this._mql.addListener(this.updateMatches);\n\t this.updateMatches();\n\t }\n\t }, {\n\t key: 'componentWillUnmount',\n\t value: function componentWillUnmount() {\n\t this._mql.removeListener(this.updateMatches);\n\t }\n\t }, {\n\t key: 'render',\n\t value: function render() {\n\t if (typeof this.props.children === 'function') {\n\t return this.props.children(this.state.matches);\n\t }\n\t\n\t if (this.state.matches === false) {\n\t return null;\n\t }\n\t var props = omit(this.props, excludedPropKeys);\n\t var hasMergeProps = Object.keys(props).length > 0;\n\t var childrenCount = _react2.default.Children.count(this.props.children);\n\t var wrapChildren = this.props.component || childrenCount > 1 || typeof this.props.children === 'string' || Array.isArray(this.props.children) && childrenCount == 1 || this.props.children === undefined;\n\t if (wrapChildren) {\n\t return _react2.default.createElement(this.props.component || 'div', props, this.props.children);\n\t } else if (hasMergeProps) {\n\t return _react2.default.cloneElement(this.props.children, props);\n\t } else if (childrenCount) {\n\t return this.props.children;\n\t } else {\n\t return null;\n\t }\n\t }\n\t }]);\n\t\n\t return MediaQuery;\n\t}(_react2.default.Component);\n\t\n\tMediaQuery.displayName = 'MediaQuery';\n\tMediaQuery.defaultProps = {\n\t values: {}\n\t};\n\texports.default = MediaQuery;\n\tmodule.exports = exports['default'];\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports) {\n\n\t// shim for using process in browser\n\tvar process = module.exports = {};\n\t\n\t// cached from whatever global is present so that test runners that stub it\n\t// don't break things. But we need to wrap it in a try catch in case it is\n\t// wrapped in strict mode code which doesn't define any globals. It's inside a\n\t// function because try/catches deoptimize in certain engines.\n\t\n\tvar cachedSetTimeout;\n\tvar cachedClearTimeout;\n\t\n\tfunction defaultSetTimout() {\n\t throw new Error('setTimeout has not been defined');\n\t}\n\tfunction defaultClearTimeout () {\n\t throw new Error('clearTimeout has not been defined');\n\t}\n\t(function () {\n\t try {\n\t if (typeof setTimeout === 'function') {\n\t cachedSetTimeout = setTimeout;\n\t } else {\n\t cachedSetTimeout = defaultSetTimout;\n\t }\n\t } catch (e) {\n\t cachedSetTimeout = defaultSetTimout;\n\t }\n\t try {\n\t if (typeof clearTimeout === 'function') {\n\t cachedClearTimeout = clearTimeout;\n\t } else {\n\t cachedClearTimeout = defaultClearTimeout;\n\t }\n\t } catch (e) {\n\t cachedClearTimeout = defaultClearTimeout;\n\t }\n\t} ())\n\tfunction runTimeout(fun) {\n\t if (cachedSetTimeout === setTimeout) {\n\t //normal enviroments in sane situations\n\t return setTimeout(fun, 0);\n\t }\n\t // if setTimeout wasn't available but was latter defined\n\t if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n\t cachedSetTimeout = setTimeout;\n\t return setTimeout(fun, 0);\n\t }\n\t try {\n\t // when when somebody has screwed with setTimeout but no I.E. maddness\n\t return cachedSetTimeout(fun, 0);\n\t } catch(e){\n\t try {\n\t // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n\t return cachedSetTimeout.call(null, fun, 0);\n\t } catch(e){\n\t // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n\t return cachedSetTimeout.call(this, fun, 0);\n\t }\n\t }\n\t\n\t\n\t}\n\tfunction runClearTimeout(marker) {\n\t if (cachedClearTimeout === clearTimeout) {\n\t //normal enviroments in sane situations\n\t return clearTimeout(marker);\n\t }\n\t // if clearTimeout wasn't available but was latter defined\n\t if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n\t cachedClearTimeout = clearTimeout;\n\t return clearTimeout(marker);\n\t }\n\t try {\n\t // when when somebody has screwed with setTimeout but no I.E. maddness\n\t return cachedClearTimeout(marker);\n\t } catch (e){\n\t try {\n\t // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n\t return cachedClearTimeout.call(null, marker);\n\t } catch (e){\n\t // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n\t // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n\t return cachedClearTimeout.call(this, marker);\n\t }\n\t }\n\t\n\t\n\t\n\t}\n\tvar queue = [];\n\tvar draining = false;\n\tvar currentQueue;\n\tvar queueIndex = -1;\n\t\n\tfunction cleanUpNextTick() {\n\t if (!draining || !currentQueue) {\n\t return;\n\t }\n\t draining = false;\n\t if (currentQueue.length) {\n\t queue = currentQueue.concat(queue);\n\t } else {\n\t queueIndex = -1;\n\t }\n\t if (queue.length) {\n\t drainQueue();\n\t }\n\t}\n\t\n\tfunction drainQueue() {\n\t if (draining) {\n\t return;\n\t }\n\t var timeout = runTimeout(cleanUpNextTick);\n\t draining = true;\n\t\n\t var len = queue.length;\n\t while(len) {\n\t currentQueue = queue;\n\t queue = [];\n\t while (++queueIndex < len) {\n\t if (currentQueue) {\n\t currentQueue[queueIndex].run();\n\t }\n\t }\n\t queueIndex = -1;\n\t len = queue.length;\n\t }\n\t currentQueue = null;\n\t draining = false;\n\t runClearTimeout(timeout);\n\t}\n\t\n\tprocess.nextTick = function (fun) {\n\t var args = new Array(arguments.length - 1);\n\t if (arguments.length > 1) {\n\t for (var i = 1; i < arguments.length; i++) {\n\t args[i - 1] = arguments[i];\n\t }\n\t }\n\t queue.push(new Item(fun, args));\n\t if (queue.length === 1 && !draining) {\n\t runTimeout(drainQueue);\n\t }\n\t};\n\t\n\t// v8 likes predictible objects\n\tfunction Item(fun, array) {\n\t this.fun = fun;\n\t this.array = array;\n\t}\n\tItem.prototype.run = function () {\n\t this.fun.apply(null, this.array);\n\t};\n\tprocess.title = 'browser';\n\tprocess.browser = true;\n\tprocess.env = {};\n\tprocess.argv = [];\n\tprocess.version = ''; // empty string to avoid regexp issues\n\tprocess.versions = {};\n\t\n\tfunction noop() {}\n\t\n\tprocess.on = noop;\n\tprocess.addListener = noop;\n\tprocess.once = noop;\n\tprocess.off = noop;\n\tprocess.removeListener = noop;\n\tprocess.removeAllListeners = noop;\n\tprocess.emit = noop;\n\t\n\tprocess.binding = function (name) {\n\t throw new Error('process.binding is not supported');\n\t};\n\t\n\tprocess.cwd = function () { return '/' };\n\tprocess.chdir = function (dir) {\n\t throw new Error('process.chdir is not supported');\n\t};\n\tprocess.umask = function() { return 0; };\n\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports) {\n\n\t\"use strict\";\n\t\n\t/**\n\t * Copyright (c) 2013-present, Facebook, Inc.\n\t * All rights reserved.\n\t *\n\t * This source code is licensed under the BSD-style license found in the\n\t * LICENSE file in the root directory of this source tree. An additional grant\n\t * of patent rights can be found in the PATENTS file in the same directory.\n\t *\n\t * \n\t */\n\t\n\tfunction makeEmptyFunction(arg) {\n\t return function () {\n\t return arg;\n\t };\n\t}\n\t\n\t/**\n\t * This function accepts and discards inputs; it has no side effects. This is\n\t * primarily useful idiomatically for overridable function endpoints which\n\t * always need to be callable, since JS lacks a null-call idiom ala Cocoa.\n\t */\n\tvar emptyFunction = function emptyFunction() {};\n\t\n\temptyFunction.thatReturns = makeEmptyFunction;\n\temptyFunction.thatReturnsFalse = makeEmptyFunction(false);\n\temptyFunction.thatReturnsTrue = makeEmptyFunction(true);\n\temptyFunction.thatReturnsNull = makeEmptyFunction(null);\n\temptyFunction.thatReturnsThis = function () {\n\t return this;\n\t};\n\temptyFunction.thatReturnsArgument = function (arg) {\n\t return arg;\n\t};\n\t\n\tmodule.exports = emptyFunction;\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(process) {/**\n\t * Copyright (c) 2013-present, Facebook, Inc.\n\t * All rights reserved.\n\t *\n\t * This source code is licensed under the BSD-style license found in the\n\t * LICENSE file in the root directory of this source tree. An additional grant\n\t * of patent rights can be found in the PATENTS file in the same directory.\n\t *\n\t */\n\t\n\t'use strict';\n\t\n\t/**\n\t * Use invariant() to assert state which your program assumes to be true.\n\t *\n\t * Provide sprintf-style format (only %s is supported) and arguments\n\t * to provide information about what broke and what you were\n\t * expecting.\n\t *\n\t * The invariant message will be stripped in production, but the invariant\n\t * will remain to ensure logic does not differ in production.\n\t */\n\t\n\tvar validateFormat = function validateFormat(format) {};\n\t\n\tif (process.env.NODE_ENV !== 'production') {\n\t validateFormat = function validateFormat(format) {\n\t if (format === undefined) {\n\t throw new Error('invariant requires an error message argument');\n\t }\n\t };\n\t}\n\t\n\tfunction invariant(condition, format, a, b, c, d, e, f) {\n\t validateFormat(format);\n\t\n\t if (!condition) {\n\t var error;\n\t if (format === undefined) {\n\t error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');\n\t } else {\n\t var args = [a, b, c, d, e, f];\n\t var argIndex = 0;\n\t error = new Error(format.replace(/%s/g, function () {\n\t return args[argIndex++];\n\t }));\n\t error.name = 'Invariant Violation';\n\t }\n\t\n\t error.framesToPop = 1; // we don't care about invariant's own frame\n\t throw error;\n\t }\n\t}\n\t\n\tmodule.exports = invariant;\n\t/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\t\n\tvar _propTypes = __webpack_require__(7);\n\t\n\tvar _propTypes2 = _interopRequireDefault(_propTypes);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tvar stringOrNumber = _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.number]);\n\t\n\t// properties that match media queries\n\tvar matchers = {\n\t orientation: _propTypes2.default.oneOf(['portrait', 'landscape']),\n\t\n\t scan: _propTypes2.default.oneOf(['progressive', 'interlace']),\n\t\n\t aspectRatio: _propTypes2.default.string,\n\t deviceAspectRatio: _propTypes2.default.string,\n\t\n\t height: stringOrNumber,\n\t deviceHeight: stringOrNumber,\n\t\n\t width: stringOrNumber,\n\t deviceWidth: stringOrNumber,\n\t\n\t color: _propTypes2.default.bool,\n\t\n\t colorIndex: _propTypes2.default.bool,\n\t\n\t monochrome: _propTypes2.default.bool,\n\t resolution: stringOrNumber\n\t};\n\t\n\t// media features\n\tvar features = _extends({\n\t minAspectRatio: _propTypes2.default.string,\n\t maxAspectRatio: _propTypes2.default.string,\n\t minDeviceAspectRatio: _propTypes2.default.string,\n\t maxDeviceAspectRatio: _propTypes2.default.string,\n\t\n\t minHeight: stringOrNumber,\n\t maxHeight: stringOrNumber,\n\t minDeviceHeight: stringOrNumber,\n\t maxDeviceHeight: stringOrNumber,\n\t\n\t minWidth: stringOrNumber,\n\t maxWidth: stringOrNumber,\n\t minDeviceWidth: stringOrNumber,\n\t maxDeviceWidth: stringOrNumber,\n\t\n\t minColor: _propTypes2.default.number,\n\t maxColor: _propTypes2.default.number,\n\t\n\t minColorIndex: _propTypes2.default.number,\n\t maxColorIndex: _propTypes2.default.number,\n\t\n\t minMonochrome: _propTypes2.default.number,\n\t maxMonochrome: _propTypes2.default.number,\n\t\n\t minResolution: stringOrNumber,\n\t maxResolution: stringOrNumber\n\t\n\t}, matchers);\n\t\n\t// media types\n\tvar types = {\n\t all: _propTypes2.default.bool,\n\t grid: _propTypes2.default.bool,\n\t aural: _propTypes2.default.bool,\n\t braille: _propTypes2.default.bool,\n\t handheld: _propTypes2.default.bool,\n\t print: _propTypes2.default.bool,\n\t projection: _propTypes2.default.bool,\n\t screen: _propTypes2.default.bool,\n\t tty: _propTypes2.default.bool,\n\t tv: _propTypes2.default.bool,\n\t embossed: _propTypes2.default.bool\n\t};\n\t\n\tvar all = _extends({}, types, features);\n\t\n\t// add the type property\n\tmatchers.type = Object.keys(types);\n\t\n\texports.default = {\n\t all: all,\n\t types: types,\n\t matchers: matchers,\n\t features: features\n\t};\n\tmodule.exports = exports['default'];\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(process) {/**\n\t * Copyright 2014-2015, Facebook, Inc.\n\t * All rights reserved.\n\t *\n\t * This source code is licensed under the BSD-style license found in the\n\t * LICENSE file in the root directory of this source tree. An additional grant\n\t * of patent rights can be found in the PATENTS file in the same directory.\n\t *\n\t */\n\t\n\t'use strict';\n\t\n\tvar emptyFunction = __webpack_require__(2);\n\t\n\t/**\n\t * Similar to invariant but only logs a warning if the condition is not met.\n\t * This can be used to log issues in development environments in critical\n\t * paths. Removing the logging code for production environments will keep the\n\t * same logic and follow the same code paths.\n\t */\n\t\n\tvar warning = emptyFunction;\n\t\n\tif (process.env.NODE_ENV !== 'production') {\n\t (function () {\n\t var printWarning = function printWarning(format) {\n\t for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n\t args[_key - 1] = arguments[_key];\n\t }\n\t\n\t var argIndex = 0;\n\t var message = 'Warning: ' + format.replace(/%s/g, function () {\n\t return args[argIndex++];\n\t });\n\t if (typeof console !== 'undefined') {\n\t console.error(message);\n\t }\n\t try {\n\t // --- Welcome to debugging React ---\n\t // This error was thrown as a convenience so that you can use this stack\n\t // to find the callsite that caused this warning to fire.\n\t throw new Error(message);\n\t } catch (x) {}\n\t };\n\t\n\t warning = function warning(condition, format) {\n\t if (format === undefined) {\n\t throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');\n\t }\n\t\n\t if (format.indexOf('Failed Composite propType: ') === 0) {\n\t return; // Ignore CompositeComponent proptype check.\n\t }\n\t\n\t if (!condition) {\n\t for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {\n\t args[_key2 - 2] = arguments[_key2];\n\t }\n\t\n\t printWarning.apply(undefined, [format].concat(args));\n\t }\n\t };\n\t })();\n\t}\n\t\n\tmodule.exports = warning;\n\t/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\t\n\tvar uppercasePattern = /[A-Z]/g;\n\tvar msPattern = /^ms-/;\n\tvar cache = {};\n\t\n\tfunction hyphenateStyleName(string) {\n\t return string in cache\n\t ? cache[string]\n\t : cache[string] = string\n\t .replace(uppercasePattern, '-$&')\n\t .toLowerCase()\n\t .replace(msPattern, '-ms-');\n\t}\n\t\n\tmodule.exports = hyphenateStyleName;\n\n\n/***/ }),\n/* 7 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(process) {/**\n\t * Copyright 2013-present, Facebook, Inc.\n\t * All rights reserved.\n\t *\n\t * This source code is licensed under the BSD-style license found in the\n\t * LICENSE file in the root directory of this source tree. An additional grant\n\t * of patent rights can be found in the PATENTS file in the same directory.\n\t */\n\t\n\tif (process.env.NODE_ENV !== 'production') {\n\t var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' &&\n\t Symbol.for &&\n\t Symbol.for('react.element')) ||\n\t 0xeac7;\n\t\n\t var isValidElement = function(object) {\n\t return typeof object === 'object' &&\n\t object !== null &&\n\t object.$$typeof === REACT_ELEMENT_TYPE;\n\t };\n\t\n\t // By explicitly using `prop-types` you are opting into new development behavior.\n\t // http://fb.me/prop-types-in-prod\n\t var throwOnDirectAccess = true;\n\t module.exports = __webpack_require__(14)(isValidElement, throwOnDirectAccess);\n\t} else {\n\t // By explicitly using `prop-types` you are opting into new production behavior.\n\t // http://fb.me/prop-types-in-prod\n\t module.exports = __webpack_require__(13)();\n\t}\n\t\n\t/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))\n\n/***/ }),\n/* 8 */\n/***/ (function(module, exports) {\n\n\t/**\n\t * Copyright 2013-present, Facebook, Inc.\n\t * All rights reserved.\n\t *\n\t * This source code is licensed under the BSD-style license found in the\n\t * LICENSE file in the root directory of this source tree. An additional grant\n\t * of patent rights can be found in the PATENTS file in the same directory.\n\t */\n\t\n\t'use strict';\n\t\n\tvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\t\n\tmodule.exports = ReactPropTypesSecret;\n\n\n/***/ }),\n/* 9 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\texports.default = function (obj) {\n\t var rules = [];\n\t Object.keys(_mediaQuery2.default.all).forEach(function (k) {\n\t var v = obj[k];\n\t if (v != null) {\n\t rules.push(keyVal(k, v));\n\t }\n\t });\n\t return join(rules);\n\t};\n\t\n\tvar _hyphenateStyleName = __webpack_require__(6);\n\t\n\tvar _hyphenateStyleName2 = _interopRequireDefault(_hyphenateStyleName);\n\t\n\tvar _mediaQuery = __webpack_require__(4);\n\t\n\tvar _mediaQuery2 = _interopRequireDefault(_mediaQuery);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tvar negate = function negate(cond) {\n\t return 'not ' + cond;\n\t};\n\t\n\tfunction keyVal(k, v) {\n\t var realKey = (0, _hyphenateStyleName2.default)(k);\n\t\n\t // px shorthand\n\t if (typeof v === 'number') {\n\t v = v + 'px';\n\t }\n\t if (v === true) {\n\t return k;\n\t }\n\t if (v === false) {\n\t return negate(k);\n\t }\n\t return '(' + realKey + ': ' + v + ')';\n\t}\n\t\n\tfunction join(conds) {\n\t return conds.join(' and ');\n\t}\n\t\n\tmodule.exports = exports['default'];\n\n/***/ }),\n/* 10 */\n/***/ (function(module, exports) {\n\n\t/*\n\tCopyright (c) 2014, Yahoo! Inc. All rights reserved.\n\tCopyrights licensed under the New BSD License.\n\tSee the accompanying LICENSE file for terms.\n\t*/\n\t\n\t'use strict';\n\t\n\texports.match = matchQuery;\n\texports.parse = parseQuery;\n\t\n\t// -----------------------------------------------------------------------------\n\t\n\tvar RE_MEDIA_QUERY = /(?:(only|not)?\\s*([^\\s\\(\\)]+)(?:\\s*and)?\\s*)?(.+)?/i,\n\t RE_MQ_EXPRESSION = /\\(\\s*([^\\s\\:\\)]+)\\s*(?:\\:\\s*([^\\s\\)]+))?\\s*\\)/,\n\t RE_MQ_FEATURE = /^(?:(min|max)-)?(.+)/,\n\t RE_LENGTH_UNIT = /(em|rem|px|cm|mm|in|pt|pc)?$/,\n\t RE_RESOLUTION_UNIT = /(dpi|dpcm|dppx)?$/;\n\t\n\tfunction matchQuery(mediaQuery, values) {\n\t return parseQuery(mediaQuery).some(function (query) {\n\t var inverse = query.inverse;\n\t\n\t // Either the parsed or specified `type` is \"all\", or the types must be\n\t // equal for a match.\n\t var typeMatch = query.type === 'all' || values.type === query.type;\n\t\n\t // Quit early when `type` doesn't match, but take \"not\" into account.\n\t if ((typeMatch && inverse) || !(typeMatch || inverse)) {\n\t return false;\n\t }\n\t\n\t var expressionsMatch = query.expressions.every(function (expression) {\n\t var feature = expression.feature,\n\t modifier = expression.modifier,\n\t expValue = expression.value,\n\t value = values[feature];\n\t\n\t // Missing or falsy values don't match.\n\t if (!value) { return false; }\n\t\n\t switch (feature) {\n\t case 'orientation':\n\t case 'scan':\n\t return value.toLowerCase() === expValue.toLowerCase();\n\t\n\t case 'width':\n\t case 'height':\n\t case 'device-width':\n\t case 'device-height':\n\t expValue = toPx(expValue);\n\t value = toPx(value);\n\t break;\n\t\n\t case 'resolution':\n\t expValue = toDpi(expValue);\n\t value = toDpi(value);\n\t break;\n\t\n\t case 'aspect-ratio':\n\t case 'device-aspect-ratio':\n\t case /* Deprecated */ 'device-pixel-ratio':\n\t expValue = toDecimal(expValue);\n\t value = toDecimal(value);\n\t break;\n\t\n\t case 'grid':\n\t case 'color':\n\t case 'color-index':\n\t case 'monochrome':\n\t expValue = parseInt(expValue, 10) || 1;\n\t value = parseInt(value, 10) || 0;\n\t break;\n\t }\n\t\n\t switch (modifier) {\n\t case 'min': return value >= expValue;\n\t case 'max': return value <= expValue;\n\t default : return value === expValue;\n\t }\n\t });\n\t\n\t return (expressionsMatch && !inverse) || (!expressionsMatch && inverse);\n\t });\n\t}\n\t\n\tfunction parseQuery(mediaQuery) {\n\t return mediaQuery.split(',').map(function (query) {\n\t query = query.trim();\n\t\n\t var captures = query.match(RE_MEDIA_QUERY),\n\t modifier = captures[1],\n\t type = captures[2],\n\t expressions = captures[3] || '',\n\t parsed = {};\n\t\n\t parsed.inverse = !!modifier && modifier.toLowerCase() === 'not';\n\t parsed.type = type ? type.toLowerCase() : 'all';\n\t\n\t // Split expressions into a list.\n\t expressions = expressions.match(/\\([^\\)]+\\)/g) || [];\n\t\n\t parsed.expressions = expressions.map(function (expression) {\n\t var captures = expression.match(RE_MQ_EXPRESSION),\n\t feature = captures[1].toLowerCase().match(RE_MQ_FEATURE);\n\t\n\t return {\n\t modifier: feature[1],\n\t feature : feature[2],\n\t value : captures[2]\n\t };\n\t });\n\t\n\t return parsed;\n\t });\n\t}\n\t\n\t// -- Utilities ----------------------------------------------------------------\n\t\n\tfunction toDecimal(ratio) {\n\t var decimal = Number(ratio),\n\t numbers;\n\t\n\t if (!decimal) {\n\t numbers = ratio.match(/^(\\d+)\\s*\\/\\s*(\\d+)$/);\n\t decimal = numbers[1] / numbers[2];\n\t }\n\t\n\t return decimal;\n\t}\n\t\n\tfunction toDpi(resolution) {\n\t var value = parseFloat(resolution),\n\t units = String(resolution).match(RE_RESOLUTION_UNIT)[1];\n\t\n\t switch (units) {\n\t case 'dpcm': return value / 2.54;\n\t case 'dppx': return value * 96;\n\t default : return value;\n\t }\n\t}\n\t\n\tfunction toPx(length) {\n\t var value = parseFloat(length),\n\t units = String(length).match(RE_LENGTH_UNIT)[1];\n\t\n\t switch (units) {\n\t case 'em' : return value * 16;\n\t case 'rem': return value * 16;\n\t case 'cm' : return value * 96 / 2.54;\n\t case 'mm' : return value * 96 / 2.54 / 10;\n\t case 'in' : return value * 96;\n\t case 'pt' : return value * 72;\n\t case 'pc' : return value * 72 / 12;\n\t default : return value;\n\t }\n\t}\n\n\n/***/ }),\n/* 11 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar staticMatch = __webpack_require__(10).match;\n\tvar dynamicMatch = typeof window !== 'undefined' ? window.matchMedia : null;\n\t\n\t// our fake MediaQueryList\n\tfunction Mql(query, values){\n\t var self = this;\n\t if(dynamicMatch){\n\t var mql = dynamicMatch.call(window, query);\n\t this.matches = mql.matches;\n\t this.media = mql.media;\n\t // TODO: is there a time it makes sense to remove this listener?\n\t mql.addListener(update);\n\t } else {\n\t this.matches = staticMatch(query, values);\n\t this.media = query;\n\t }\n\t\n\t this.addListener = addListener;\n\t this.removeListener = removeListener;\n\t\n\t function addListener(listener){\n\t if(mql){\n\t mql.addListener(listener);\n\t }\n\t }\n\t\n\t function removeListener(listener){\n\t if(mql){\n\t mql.removeListener(listener);\n\t }\n\t }\n\t\n\t // update ourselves!\n\t function update(evt){\n\t self.matches = evt.matches;\n\t self.media = evt.media;\n\t }\n\t}\n\t\n\tfunction matchMedia(query, values){\n\t return new Mql(query, values);\n\t}\n\t\n\tmodule.exports = matchMedia;\n\n\n/***/ }),\n/* 12 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(process) {/**\n\t * Copyright 2013-present, Facebook, Inc.\n\t * All rights reserved.\n\t *\n\t * This source code is licensed under the BSD-style license found in the\n\t * LICENSE file in the root directory of this source tree. An additional grant\n\t * of patent rights can be found in the PATENTS file in the same directory.\n\t */\n\t\n\t'use strict';\n\t\n\tif (process.env.NODE_ENV !== 'production') {\n\t var invariant = __webpack_require__(3);\n\t var warning = __webpack_require__(5);\n\t var ReactPropTypesSecret = __webpack_require__(8);\n\t var loggedTypeFailures = {};\n\t}\n\t\n\t/**\n\t * Assert that the values match with the type specs.\n\t * Error messages are memorized and will only be shown once.\n\t *\n\t * @param {object} typeSpecs Map of name to a ReactPropType\n\t * @param {object} values Runtime values that need to be type-checked\n\t * @param {string} location e.g. \"prop\", \"context\", \"child context\"\n\t * @param {string} componentName Name of the component for error messages.\n\t * @param {?Function} getStack Returns the component stack.\n\t * @private\n\t */\n\tfunction checkPropTypes(typeSpecs, values, location, componentName, getStack) {\n\t if (process.env.NODE_ENV !== 'production') {\n\t for (var typeSpecName in typeSpecs) {\n\t if (typeSpecs.hasOwnProperty(typeSpecName)) {\n\t var error;\n\t // Prop type validation may throw. In case they do, we don't want to\n\t // fail the render phase where it didn't fail before. So we log it.\n\t // After these have been cleaned up, we'll let them throw.\n\t try {\n\t // This is intentionally an invariant that gets caught. It's the same\n\t // behavior as without this statement except with a better message.\n\t invariant(typeof typeSpecs[typeSpecName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', componentName || 'React class', location, typeSpecName);\n\t error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);\n\t } catch (ex) {\n\t error = ex;\n\t }\n\t warning(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error);\n\t if (error instanceof Error && !(error.message in loggedTypeFailures)) {\n\t // Only monitor this failure once because there tends to be a lot of the\n\t // same error.\n\t loggedTypeFailures[error.message] = true;\n\t\n\t var stack = getStack ? getStack() : '';\n\t\n\t warning(false, 'Failed %s type: %s%s', location, error.message, stack != null ? stack : '');\n\t }\n\t }\n\t }\n\t }\n\t}\n\t\n\tmodule.exports = checkPropTypes;\n\t\n\t/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))\n\n/***/ }),\n/* 13 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/**\n\t * Copyright 2013-present, Facebook, Inc.\n\t * All rights reserved.\n\t *\n\t * This source code is licensed under the BSD-style license found in the\n\t * LICENSE file in the root directory of this source tree. An additional grant\n\t * of patent rights can be found in the PATENTS file in the same directory.\n\t */\n\t\n\t'use strict';\n\t\n\tvar emptyFunction = __webpack_require__(2);\n\tvar invariant = __webpack_require__(3);\n\t\n\tmodule.exports = function() {\n\t // Important!\n\t // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n\t function shim() {\n\t invariant(\n\t false,\n\t 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n\t 'Use PropTypes.checkPropTypes() to call them. ' +\n\t 'Read more at http://fb.me/use-check-prop-types'\n\t );\n\t };\n\t shim.isRequired = shim;\n\t function getShim() {\n\t return shim;\n\t };\n\t var ReactPropTypes = {\n\t array: shim,\n\t bool: shim,\n\t func: shim,\n\t number: shim,\n\t object: shim,\n\t string: shim,\n\t symbol: shim,\n\t\n\t any: shim,\n\t arrayOf: getShim,\n\t element: shim,\n\t instanceOf: getShim,\n\t node: shim,\n\t objectOf: getShim,\n\t oneOf: getShim,\n\t oneOfType: getShim,\n\t shape: getShim\n\t };\n\t\n\t ReactPropTypes.checkPropTypes = emptyFunction;\n\t ReactPropTypes.PropTypes = ReactPropTypes;\n\t\n\t return ReactPropTypes;\n\t};\n\n\n/***/ }),\n/* 14 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(process) {/**\n\t * Copyright 2013-present, Facebook, Inc.\n\t * All rights reserved.\n\t *\n\t * This source code is licensed under the BSD-style license found in the\n\t * LICENSE file in the root directory of this source tree. An additional grant\n\t * of patent rights can be found in the PATENTS file in the same directory.\n\t */\n\t\n\t'use strict';\n\t\n\tvar emptyFunction = __webpack_require__(2);\n\tvar invariant = __webpack_require__(3);\n\tvar warning = __webpack_require__(5);\n\t\n\tvar ReactPropTypesSecret = __webpack_require__(8);\n\tvar checkPropTypes = __webpack_require__(12);\n\t\n\tmodule.exports = function(isValidElement, throwOnDirectAccess) {\n\t /* global Symbol */\n\t var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\n\t var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.\n\t\n\t /**\n\t * Returns the iterator method function contained on the iterable object.\n\t *\n\t * Be sure to invoke the function with the iterable as context:\n\t *\n\t * var iteratorFn = getIteratorFn(myIterable);\n\t * if (iteratorFn) {\n\t * var iterator = iteratorFn.call(myIterable);\n\t * ...\n\t * }\n\t *\n\t * @param {?object} maybeIterable\n\t * @return {?function}\n\t */\n\t function getIteratorFn(maybeIterable) {\n\t var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);\n\t if (typeof iteratorFn === 'function') {\n\t return iteratorFn;\n\t }\n\t }\n\t\n\t /**\n\t * Collection of methods that allow declaration and validation of props that are\n\t * supplied to React components. Example usage:\n\t *\n\t * var Props = require('ReactPropTypes');\n\t * var MyArticle = React.createClass({\n\t * propTypes: {\n\t * // An optional string prop named \"description\".\n\t * description: Props.string,\n\t *\n\t * // A required enum prop named \"category\".\n\t * category: Props.oneOf(['News','Photos']).isRequired,\n\t *\n\t * // A prop named \"dialog\" that requires an instance of Dialog.\n\t * dialog: Props.instanceOf(Dialog).isRequired\n\t * },\n\t * render: function() { ... }\n\t * });\n\t *\n\t * A more formal specification of how these methods are used:\n\t *\n\t * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)\n\t * decl := ReactPropTypes.{type}(.isRequired)?\n\t *\n\t * Each and every declaration produces a function with the same signature. This\n\t * allows the creation of custom validation functions. For example:\n\t *\n\t * var MyLink = React.createClass({\n\t * propTypes: {\n\t * // An optional string or URI prop named \"href\".\n\t * href: function(props, propName, componentName) {\n\t * var propValue = props[propName];\n\t * if (propValue != null && typeof propValue !== 'string' &&\n\t * !(propValue instanceof URI)) {\n\t * return new Error(\n\t * 'Expected a string or an URI for ' + propName + ' in ' +\n\t * componentName\n\t * );\n\t * }\n\t * }\n\t * },\n\t * render: function() {...}\n\t * });\n\t *\n\t * @internal\n\t */\n\t\n\t var ANONYMOUS = '<<anonymous>>';\n\t\n\t // Important!\n\t // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.\n\t var ReactPropTypes = {\n\t array: createPrimitiveTypeChecker('array'),\n\t bool: createPrimitiveTypeChecker('boolean'),\n\t func: createPrimitiveTypeChecker('function'),\n\t number: createPrimitiveTypeChecker('number'),\n\t object: createPrimitiveTypeChecker('object'),\n\t string: createPrimitiveTypeChecker('string'),\n\t symbol: createPrimitiveTypeChecker('symbol'),\n\t\n\t any: createAnyTypeChecker(),\n\t arrayOf: createArrayOfTypeChecker,\n\t element: createElementTypeChecker(),\n\t instanceOf: createInstanceTypeChecker,\n\t node: createNodeChecker(),\n\t objectOf: createObjectOfTypeChecker,\n\t oneOf: createEnumTypeChecker,\n\t oneOfType: createUnionTypeChecker,\n\t shape: createShapeTypeChecker\n\t };\n\t\n\t /**\n\t * inlined Object.is polyfill to avoid requiring consumers ship their own\n\t * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n\t */\n\t /*eslint-disable no-self-compare*/\n\t function is(x, y) {\n\t // SameValue algorithm\n\t if (x === y) {\n\t // Steps 1-5, 7-10\n\t // Steps 6.b-6.e: +0 != -0\n\t return x !== 0 || 1 / x === 1 / y;\n\t } else {\n\t // Step 6.a: NaN == NaN\n\t return x !== x && y !== y;\n\t }\n\t }\n\t /*eslint-enable no-self-compare*/\n\t\n\t /**\n\t * We use an Error-like object for backward compatibility as people may call\n\t * PropTypes directly and inspect their output. However, we don't use real\n\t * Errors anymore. We don't inspect their stack anyway, and creating them\n\t * is prohibitively expensive if they are created too often, such as what\n\t * happens in oneOfType() for any type before the one that matched.\n\t */\n\t function PropTypeError(message) {\n\t this.message = message;\n\t this.stack = '';\n\t }\n\t // Make `instanceof Error` still work for returned errors.\n\t PropTypeError.prototype = Error.prototype;\n\t\n\t function createChainableTypeChecker(validate) {\n\t if (process.env.NODE_ENV !== 'production') {\n\t var manualPropTypeCallCache = {};\n\t var manualPropTypeWarningCount = 0;\n\t }\n\t function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {\n\t componentName = componentName || ANONYMOUS;\n\t propFullName = propFullName || propName;\n\t\n\t if (secret !== ReactPropTypesSecret) {\n\t if (throwOnDirectAccess) {\n\t // New behavior only for users of `prop-types` package\n\t invariant(\n\t false,\n\t 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n\t 'Use `PropTypes.checkPropTypes()` to call them. ' +\n\t 'Read more at http://fb.me/use-check-prop-types'\n\t );\n\t } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {\n\t // Old behavior for people using React.PropTypes\n\t var cacheKey = componentName + ':' + propName;\n\t if (\n\t !manualPropTypeCallCache[cacheKey] &&\n\t // Avoid spamming the console because they are often not actionable except for lib authors\n\t manualPropTypeWarningCount < 3\n\t ) {\n\t warning(\n\t false,\n\t 'You are manually calling a React.PropTypes validation ' +\n\t 'function for the `%s` prop on `%s`. This is deprecated ' +\n\t 'and will throw in the standalone `prop-types` package. ' +\n\t 'You may be seeing this warning due to a third-party PropTypes ' +\n\t 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.',\n\t propFullName,\n\t componentName\n\t );\n\t manualPropTypeCallCache[cacheKey] = true;\n\t manualPropTypeWarningCount++;\n\t }\n\t }\n\t }\n\t if (props[propName] == null) {\n\t if (isRequired) {\n\t if (props[propName] === null) {\n\t return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));\n\t }\n\t return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));\n\t }\n\t return null;\n\t } else {\n\t return validate(props, propName, componentName, location, propFullName);\n\t }\n\t }\n\t\n\t var chainedCheckType = checkType.bind(null, false);\n\t chainedCheckType.isRequired = checkType.bind(null, true);\n\t\n\t return chainedCheckType;\n\t }\n\t\n\t function createPrimitiveTypeChecker(expectedType) {\n\t function validate(props, propName, componentName, location, propFullName, secret) {\n\t var propValue = props[propName];\n\t var propType = getPropType(propValue);\n\t if (propType !== expectedType) {\n\t // `propValue` being instance of, say, date/regexp, pass the 'object'\n\t // check, but we can offer a more precise error message here rather than\n\t // 'of type `object`'.\n\t var preciseType = getPreciseType(propValue);\n\t\n\t return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));\n\t }\n\t return null;\n\t }\n\t return createChainableTypeChecker(validate);\n\t }\n\t\n\t function createAnyTypeChecker() {\n\t return createChainableTypeChecker(emptyFunction.thatReturnsNull);\n\t }\n\t\n\t function createArrayOfTypeChecker(typeChecker) {\n\t function validate(props, propName, componentName, location, propFullName) {\n\t if (typeof typeChecker !== 'function') {\n\t return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');\n\t }\n\t var propValue = props[propName];\n\t if (!Array.isArray(propValue)) {\n\t var propType = getPropType(propValue);\n\t return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));\n\t }\n\t for (var i = 0; i < propValue.length; i++) {\n\t var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);\n\t if (error instanceof Error) {\n\t return error;\n\t }\n\t }\n\t return null;\n\t }\n\t return createChainableTypeChecker(validate);\n\t }\n\t\n\t function createElementTypeChecker() {\n\t function validate(props, propName, componentName, location, propFullName) {\n\t var propValue = props[propName];\n\t if (!isValidElement(propValue)) {\n\t var propType = getPropType(propValue);\n\t return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));\n\t }\n\t return null;\n\t }\n\t return createChainableTypeChecker(validate);\n\t }\n\t\n\t function createInstanceTypeChecker(expectedClass) {\n\t function validate(props, propName, componentName, location, propFullName) {\n\t if (!(props[propName] instanceof expectedClass)) {\n\t var expectedClassName = expectedClass.name || ANONYMOUS;\n\t var actualClassName = getClassName(props[propName]);\n\t return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));\n\t }\n\t return null;\n\t }\n\t return createChainableTypeChecker(validate);\n\t }\n\t\n\t function createEnumTypeChecker(expectedValues) {\n\t if (!Array.isArray(expectedValues)) {\n\t process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid argument supplied to oneOf, expected an instance of array.') : void 0;\n\t return emptyFunction.thatReturnsNull;\n\t }\n\t\n\t function validate(props, propName, componentName, location, propFullName) {\n\t var propValue = props[propName];\n\t for (var i = 0; i < expectedValues.length; i++) {\n\t if (is(propValue, expectedValues[i])) {\n\t return null;\n\t }\n\t }\n\t\n\t var valuesString = JSON.stringify(expectedValues);\n\t return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));\n\t }\n\t return createChainableTypeChecker(validate);\n\t }\n\t\n\t function createObjectOfTypeChecker(typeChecker) {\n\t function validate(props, propName, componentName, location, propFullName) {\n\t if (typeof typeChecker !== 'function') {\n\t return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');\n\t }\n\t var propValue = props[propName];\n\t var propType = getPropType(propValue);\n\t if (propType !== 'object') {\n\t return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));\n\t }\n\t for (var key in propValue) {\n\t if (propValue.hasOwnProperty(key)) {\n\t var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n\t if (error instanceof Error) {\n\t return error;\n\t }\n\t }\n\t }\n\t return null;\n\t }\n\t return createChainableTypeChecker(validate);\n\t }\n\t\n\t function createUnionTypeChecker(arrayOfTypeCheckers) {\n\t if (!Array.isArray(arrayOfTypeCheckers)) {\n\t process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;\n\t return emptyFunction.thatReturnsNull;\n\t }\n\t\n\t function validate(props, propName, componentName, location, propFullName) {\n\t for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n\t var checker = arrayOfTypeCheckers[i];\n\t if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) {\n\t return null;\n\t }\n\t }\n\t\n\t return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));\n\t }\n\t return createChainableTypeChecker(validate);\n\t }\n\t\n\t function createNodeChecker() {\n\t function validate(props, propName, componentName, location, propFullName) {\n\t if (!isNode(props[propName])) {\n\t return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));\n\t }\n\t return null;\n\t }\n\t return createChainableTypeChecker(validate);\n\t }\n\t\n\t function createShapeTypeChecker(shapeTypes) {\n\t function validate(props, propName, componentName, location, propFullName) {\n\t var propValue = props[propName];\n\t var propType = getPropType(propValue);\n\t if (propType !== 'object') {\n\t return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n\t }\n\t for (var key in shapeTypes) {\n\t var checker = shapeTypes[key];\n\t if (!checker) {\n\t continue;\n\t }\n\t var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n\t if (error) {\n\t return error;\n\t }\n\t }\n\t return null;\n\t }\n\t return createChainableTypeChecker(validate);\n\t }\n\t\n\t function isNode(propValue) {\n\t switch (typeof propValue) {\n\t case 'number':\n\t case 'string':\n\t case 'undefined':\n\t return true;\n\t case 'boolean':\n\t return !propValue;\n\t case 'object':\n\t if (Array.isArray(propValue)) {\n\t return propValue.every(isNode);\n\t }\n\t if (propValue === null || isValidElement(propValue)) {\n\t return true;\n\t }\n\t\n\t var iteratorFn = getIteratorFn(propValue);\n\t if (iteratorFn) {\n\t var iterator = iteratorFn.call(propValue);\n\t var step;\n\t if (iteratorFn !== propValue.entries) {\n\t while (!(step = iterator.next()).done) {\n\t if (!isNode(step.value)) {\n\t return false;\n\t }\n\t }\n\t } else {\n\t // Iterator will provide entry [k,v] tuples rather than values.\n\t while (!(step = iterator.next()).done) {\n\t var entry = step.value;\n\t if (entry) {\n\t if (!isNode(entry[1])) {\n\t return false;\n\t }\n\t }\n\t }\n\t }\n\t } else {\n\t return false;\n\t }\n\t\n\t return true;\n\t default:\n\t return false;\n\t }\n\t }\n\t\n\t function isSymbol(propType, propValue) {\n\t // Native Symbol.\n\t if (propType === 'symbol') {\n\t return true;\n\t }\n\t\n\t // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'\n\t if (propValue['@@toStringTag'] === 'Symbol') {\n\t return true;\n\t }\n\t\n\t // Fallback for non-spec compliant Symbols which are polyfilled.\n\t if (typeof Symbol === 'function' && propValue instanceof Symbol) {\n\t return true;\n\t }\n\t\n\t return false;\n\t }\n\t\n\t // Equivalent of `typeof` but with special handling for array and regexp.\n\t function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }\n\t\n\t // This handles more types than `getPropType`. Only used for error messages.\n\t // See `createPrimitiveTypeChecker`.\n\t function getPreciseType(propValue) {\n\t var propType = getPropType(propValue);\n\t if (propType === 'object') {\n\t if (propValue instanceof Date) {\n\t return 'date';\n\t } else if (propValue instanceof RegExp) {\n\t return 'regexp';\n\t }\n\t }\n\t return propType;\n\t }\n\t\n\t // Returns class name of the object, if any.\n\t function getClassName(propValue) {\n\t if (!propValue.constructor || !propValue.constructor.name) {\n\t return ANONYMOUS;\n\t }\n\t return propValue.constructor.name;\n\t }\n\t\n\t ReactPropTypes.checkPropTypes = checkPropTypes;\n\t ReactPropTypes.PropTypes = ReactPropTypes;\n\t\n\t return ReactPropTypes;\n\t};\n\t\n\t/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))\n\n/***/ }),\n/* 15 */\n/***/ (function(module, exports) {\n\n\tmodule.exports = __WEBPACK_EXTERNAL_MODULE_15__;\n\n/***/ })\n/******/ ])\n});\n;\n//# sourceMappingURL=react-responsive.js.map\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-responsive/dist/react-responsive.js\n// module id = 177\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-responsive/dist/react-responsive.js?", + ); + + /***/ + }, + /* 178 */ + /* unknown exports provided */ + /* exports used: default */ + /*!***********************************!*\ + !*** ./~/uncontrollable/index.js ***! + \***********************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nexports.__esModule = true;\n\nvar _createUncontrollable = __webpack_require__(/*! ./createUncontrollable */ 1493);\n\nvar _createUncontrollable2 = _interopRequireDefault(_createUncontrollable);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mixin = {\n shouldComponentUpdate: function shouldComponentUpdate() {\n //let the forceUpdate trigger the update\n return !this._notifying;\n }\n};\n\nfunction set(component, propName, handler, value, args) {\n if (handler) {\n component._notifying = true;\n handler.call.apply(handler, [component, value].concat(args));\n component._notifying = false;\n }\n\n component._values[propName] = value;\n\n if (component.isMounted()) component.forceUpdate();\n}\n\nexports.default = (0, _createUncontrollable2.default)([mixin], set);\nmodule.exports = exports['default'];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/uncontrollable/index.js\n// module id = 178\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/uncontrollable/index.js?", + ); + + /***/ + }, + /* 179 */ + /* unknown exports provided */ + /* all exports used */ + /*!******************************************!*\ + !*** ./~/airbnb-prop-types/build/and.js ***! + \******************************************/ + /***/ function (module, exports) { + eval( + "Object.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports['default'] = andValidator;\nfunction andValidator(validators) {\n var name = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'and';\n\n if (!Array.isArray(validators)) {\n throw new TypeError('and: 2 or more validators are required');\n }\n if (validators.length <= 1) {\n throw new RangeError('and: 2 or more validators are required');\n }\n\n var validator = function () {\n function and() {\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n var firstError = null;\n validators.some(function (validatorFn) {\n firstError = validatorFn.apply(undefined, args);\n return firstError != null;\n });\n return firstError == null ? null : firstError;\n }\n\n return and;\n }();\n validator.typeName = name;\n\n validator.isRequired = function () {\n function andIsRequired() {\n for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n var firstError = null;\n validators.some(function (validatorFn) {\n firstError = validatorFn.isRequired.apply(validatorFn, args);\n return firstError != null;\n });\n return firstError == null ? null : firstError;\n }\n\n return andIsRequired;\n }();\n validator.isRequired.typeName = name;\n\n return validator;\n}\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/airbnb-prop-types/build/and.js\n// module id = 179\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/airbnb-prop-types/build/and.js?", + ); + + /***/ + }, + /* 180 */ + /* exports provided: default */ + /* exports used: default */ + /*!****************************************************************!*\ + !*** ./app/bundles/layout-navbar/components/NavItem/index.jsx ***! + \****************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_bootstrap__ = __webpack_require__(/*! react-bootstrap */ 31);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_lodash_fp__ = __webpack_require__(/*! lodash/fp */ 14);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_lodash_fp___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_lodash_fp__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__NavItem_scss__ = __webpack_require__(/*! ./NavItem.scss */ 965);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__NavItem_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__NavItem_scss__);\nfunction _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\n\n\n\n\n\n\nvar NavItem = function NavItem(props) {\n var _classNames, _classNames2, _classNames3;\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_1_react_bootstrap__[\"k\" /* NavItem */],\n { href: props.href, className: __WEBPACK_IMPORTED_MODULE_4__NavItem_scss___default.a.NavItem },\n props.Icon ? __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_4__NavItem_scss___default.a.iconWrapper },\n props.Icon && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(props.Icon, {\n className: __WEBPACK_IMPORTED_MODULE_2_classnames___default()(__WEBPACK_IMPORTED_MODULE_4__NavItem_scss___default.a.icon, (_classNames = {}, _defineProperty(_classNames, __WEBPACK_IMPORTED_MODULE_4__NavItem_scss___default.a.icon__marginRight, props.addMarginRightToIcon), _defineProperty(_classNames, 'hidden-sm', props.hideIconSm), _defineProperty(_classNames, 'hidden-md', props.hideIconMd), _defineProperty(_classNames, 'hidden-lg', props.hideIconLg), _classNames))\n }),\n __WEBPACK_IMPORTED_MODULE_3_lodash_fp___default.a.lt(0, props.notificationsCount) && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'span',\n { className: __WEBPACK_IMPORTED_MODULE_2_classnames___default()('hidden-xs', __WEBPACK_IMPORTED_MODULE_4__NavItem_scss___default.a.badge) },\n props.notificationsCount\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'span',\n {\n className: __WEBPACK_IMPORTED_MODULE_2_classnames___default()(__WEBPACK_IMPORTED_MODULE_4__NavItem_scss___default.a.name, (_classNames2 = {}, _defineProperty(_classNames2, __WEBPACK_IMPORTED_MODULE_4__NavItem_scss___default.a.name__marginLeft, props.addMarginLeftToName), _defineProperty(_classNames2, 'hidden-sm', props.hideNameSm), _defineProperty(_classNames2, 'hidden-md', props.hideNameMd), _defineProperty(_classNames2, 'hidden-lg', props.hideNameLg), _classNames2))\n },\n props.name\n ),\n __WEBPACK_IMPORTED_MODULE_3_lodash_fp___default.a.lt(0, props.notificationsCount) && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'span',\n {\n className: __WEBPACK_IMPORTED_MODULE_2_classnames___default()('hidden-sm', 'hidden-md', 'hidden-lg', __WEBPACK_IMPORTED_MODULE_4__NavItem_scss___default.a.mobileMenuCount)\n },\n props.notificationsCount\n )\n ) : __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'span',\n {\n className: __WEBPACK_IMPORTED_MODULE_2_classnames___default()(__WEBPACK_IMPORTED_MODULE_4__NavItem_scss___default.a.name, (_classNames3 = {}, _defineProperty(_classNames3, __WEBPACK_IMPORTED_MODULE_4__NavItem_scss___default.a.name__marginLeft, props.addMarginLeftToName), _defineProperty(_classNames3, 'hidden-sm', props.hideNameSm), _defineProperty(_classNames3, 'hidden-md', props.hideNameMd), _defineProperty(_classNames3, 'hidden-lg', props.hideNameLg), _classNames3))\n },\n props.name\n )\n );\n};\n\nNavItem.propTypes = {\n name: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n href: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n notificationsCount: __webpack_require__(/*! prop-types */ 0).number,\n Icon: __webpack_require__(/*! prop-types */ 0).oneOfType([__webpack_require__(/*! prop-types */ 0).any, __webpack_require__(/*! prop-types */ 0).func]),\n nameClassName: __webpack_require__(/*! prop-types */ 0).string,\n addMarginRightToIcon: __webpack_require__(/*! prop-types */ 0).bool,\n addMarginLeftToName: __webpack_require__(/*! prop-types */ 0).bool,\n hideIconSm: __webpack_require__(/*! prop-types */ 0).bool,\n hideIconMd: __webpack_require__(/*! prop-types */ 0).bool,\n hideIconLg: __webpack_require__(/*! prop-types */ 0).bool,\n hideNameSm: __webpack_require__(/*! prop-types */ 0).bool,\n hideNameMd: __webpack_require__(/*! prop-types */ 0).bool,\n hideNameLg: __webpack_require__(/*! prop-types */ 0).bool\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (NavItem);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/layout-navbar/components/NavItem/index.jsx\n// module id = 180\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/layout-navbar/components/NavItem/index.jsx?", + ); + + /***/ + }, + /* 181 */ + /* unknown exports provided */ + /* all exports used */ + /*!************************************************************************!*\ + !*** ./app/bundles/listings-show/ui/Listing/Amenities/common/types.js ***! + \************************************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "var babelPluginFlowReactPropTypes_proptype_Amenity = __webpack_require__(/*! ../../../../../../types */ 4).babelPluginFlowReactPropTypes_proptype_Amenity || __webpack_require__(/*! react */ 1).PropTypes.any;\n\nif (true) Object.defineProperty(exports, 'babelPluginFlowReactPropTypes_proptype_ContextualAmenity', {\n value: __webpack_require__(/*! react */ 1).PropTypes.shape({\n isUnavailable: __webpack_require__(/*! prop-types */ 0).bool.isRequired\n })\n});\nif (true) Object.defineProperty(exports, 'babelPluginFlowReactPropTypes_proptype_GroupedContextualAmenities', {\n value: __webpack_require__(/*! react */ 1).PropTypes.shape({\n category: __webpack_require__(/*! prop-types */ 0).shape({\n value: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n label: __webpack_require__(/*! prop-types */ 0).string\n }).isRequired,\n items: __webpack_require__(/*! prop-types */ 0).arrayOf(__webpack_require__(/*! prop-types */ 0).shape({\n isUnavailable: __webpack_require__(/*! prop-types */ 0).bool.isRequired\n })).isRequired\n })\n});\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-show/ui/Listing/Amenities/common/types.js\n// module id = 181\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-show/ui/Listing/Amenities/common/types.js?", + ); + + /***/ + }, + /* 182 */ + /* exports provided: AVATAR_SIZE, default */ + /* exports used: default, AVATAR_SIZE */ + /*!**************************************************************************!*\ + !*** ./app/bundles/listings-show/ui/Listing/Widgets/live/Host/index.jsx ***! + \**************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Details__ = __webpack_require__(/*! ./Details */ 680);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Incognito__ = __webpack_require__(/*! ./Incognito */ 681);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__MessageButton__ = __webpack_require__(/*! ./MessageButton */ 682);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__index_scss__ = __webpack_require__(/*! ./index.scss */ 154);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__index_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__index_scss__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return AVATAR_SIZE; });\n\n\nvar babelPluginFlowReactPropTypes_proptype_User = __webpack_require__(/*! ../../../../../../../types */ 4).babelPluginFlowReactPropTypes_proptype_User || __webpack_require__(/*! react */ 1).PropTypes.any;\n\n\n\n\n\n\n\nvar AVATAR_SIZE = 120; // KEEP IN SYNC with ./index.scss\n\nvar HostWidget = function HostWidget(_ref) {\n var owner = _ref.owner,\n newConversationPath = _ref.newConversationPath,\n cloudinaryUrl = _ref.cloudinaryUrl,\n isLimitedPreview = _ref.isLimitedPreview,\n isManagedByCurrentUser = _ref.isManagedByCurrentUser;\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n \'div\',\n { className: __WEBPACK_IMPORTED_MODULE_4__index_scss___default.a.unit },\n owner ? __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1__Details__["a" /* default */], { owner: owner }) : __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2__Incognito__["a" /* default */], { cloudinaryUrl: cloudinaryUrl }),\n !isLimitedPreview && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3__MessageButton__["a" /* default */], { newConversationPath: newConversationPath, isManagedByCurrentUser: isManagedByCurrentUser })\n );\n};\n\nHostWidget.propTypes = {\n owner: babelPluginFlowReactPropTypes_proptype_User,\n newConversationPath: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n cloudinaryUrl: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n isLimitedPreview: __webpack_require__(/*! prop-types */ 0).bool.isRequired,\n isManagedByCurrentUser: __webpack_require__(/*! prop-types */ 0).bool.isRequired\n};\n/* harmony default export */ __webpack_exports__["a"] = (HostWidget);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-show/ui/Listing/Widgets/live/Host/index.jsx\n// module id = 182\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-show/ui/Listing/Widgets/live/Host/index.jsx?', + ); + + /***/ + }, + /* 183 */ + /* exports provided: default */ + /* exports used: default */ + /*!**********************************!*\ + !*** ./app/enums/Environment.js ***! + \**********************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__libs_utils_Enum__ = __webpack_require__(/*! ../libs/utils/Enum */ 22);\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (new __WEBPACK_IMPORTED_MODULE_0__libs_utils_Enum__[\"a\" /* default */]({\n TEST: 'test',\n DEV: 'dev',\n PRODUCTION: 'production',\n STAGING: 'staging'\n}));\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/enums/Environment.js\n// module id = 183\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/enums/Environment.js?", + ); + + /***/ + }, + /* 184 */ + /* exports provided: default */ + /* exports used: default */ + /*!*************************************!*\ + !*** ./app/enums/ListingFilters.js ***! + \*************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash__ = __webpack_require__(/*! lodash */ 19);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_lodash__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__libs_utils_Enum__ = __webpack_require__(/*! ../libs/utils/Enum */ 22);\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (new __WEBPACK_IMPORTED_MODULE_2__libs_utils_Enum__[\"a\" /* default */]({\n BEDS: {\n label: 'Beds',\n value: 'beds',\n propType: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number,\n values: __WEBPACK_IMPORTED_MODULE_1_lodash___default.a.range(0, 8) },\n BEDROOMS: {\n label: 'Bedrooms',\n value: 'bedrooms',\n propType: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number\n },\n BATHROOMS: {\n label: 'Bathrooms',\n value: 'bathrooms',\n propType: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number\n },\n ROOM_TYPES: {\n label: 'Room Types',\n value: 'roomTypes',\n propType: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.arrayOf(__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string)\n },\n RELATIONSHIP_TYPE: {\n label: 'Relationship Type',\n value: 'relationshipType',\n propType: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number\n },\n PRICE: {\n label: 'Price',\n value: 'price',\n propType: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.arrayOf(__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number),\n values: [10, 1000] },\n AMENITY_IDS: {\n label: 'Amenities',\n value: 'amenityIds',\n propType: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.arrayOf(__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number)\n },\n GUESTS: {\n label: 'Guests',\n value: 'guests',\n propType: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number\n }\n}));\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/enums/ListingFilters.js\n// module id = 184\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/enums/ListingFilters.js?", + ); + + /***/ + }, + /* 185 */ + /* exports provided: default */ + /* exports used: default */ + /*!***********************************************************************************!*\ + !*** ./app/libs/components/DataTable/listings/selectors/listingSelector/index.js ***! + \***********************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_immutable__ = __webpack_require__(/*! immutable */ 26);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_immutable___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_immutable__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__utils_redux__ = __webpack_require__(/*! ../../../../../utils/redux */ 108);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_selectors_creators__ = __webpack_require__(/*! ../../../../../utils/selectors/creators */ 90);\n\n\n\n\n\nvar listingsStoreSelector = function listingsStoreSelector(state) {\n return state.listingsStore;\n};\n\nvar listingIdFromPropsSelector = function listingIdFromPropsSelector(_state, _ref) {\n var listingId = _ref.listingId;\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__utils_redux__["c" /* normalizeParamsId */])(listingId);\n};\n\n/* harmony default export */ __webpack_exports__["a"] = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__utils_selectors_creators__["a" /* createCommonSelector */])(listingsStoreSelector, listingIdFromPropsSelector, function (listingsStore, listingId) {\n return listingsStore.getIn([\'entities\', listingId]);\n}));\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/DataTable/listings/selectors/listingSelector/index.js\n// module id = 185\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/DataTable/listings/selectors/listingSelector/index.js?', + ); + + /***/ + }, + /* 186 */ + /* exports provided: computeLinkClassName, computeLinkLikeClassName */ + /* exports used: computeLinkClassName, computeLinkLikeClassName */ + /*!**************************************************!*\ + !*** ./app/libs/components/Links/utils/index.js ***! + \**************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__index_scss__ = __webpack_require__(/*! ../index.scss */ 1062);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__index_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__index_scss__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return computeLinkClassName; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return computeLinkLikeClassName; });\nfunction _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\nvar babelPluginFlowReactPropTypes_proptype_Underline = __webpack_require__(/*! ../types */ 61).babelPluginFlowReactPropTypes_proptype_Underline || __webpack_require__(/*! react */ 1).PropTypes.any;\n\nvar babelPluginFlowReactPropTypes_proptype_Color = __webpack_require__(/*! ../types */ 61).babelPluginFlowReactPropTypes_proptype_Color || __webpack_require__(/*! react */ 1).PropTypes.any;\n\n\n\nvar computeLinkClassName = function computeLinkClassName(_ref) {\n var _ref2;\n\n var color = _ref.color,\n underline = _ref.underline,\n disabled = _ref.disabled;\n return _ref2 = {}, _defineProperty(_ref2, __WEBPACK_IMPORTED_MODULE_0__index_scss___default.a.link, true), _defineProperty(_ref2, __WEBPACK_IMPORTED_MODULE_0__index_scss___default.a.underline, underline !== 'none'), _defineProperty(_ref2, __WEBPACK_IMPORTED_MODULE_0__index_scss___default.a.disabled, disabled), _defineProperty(_ref2, __WEBPACK_IMPORTED_MODULE_0__index_scss___default.a['color--' + color], color !== 'none'), _defineProperty(_ref2, __WEBPACK_IMPORTED_MODULE_0__index_scss___default.a['underlineSolidAlways--' + color], color !== 'none' && underline === 'always'), _defineProperty(_ref2, __WEBPACK_IMPORTED_MODULE_0__index_scss___default.a['underlineSolidActive--' + color], !disabled && color !== 'none' && underline === 'active'), _ref2;\n};\n\nvar computeLinkLikeClassName = function computeLinkLikeClassName(_ref3) {\n var _ref4;\n\n var color = _ref3.color,\n underline = _ref3.underline,\n disabled = _ref3.disabled;\n return _ref4 = {}, _defineProperty(_ref4, __WEBPACK_IMPORTED_MODULE_0__index_scss___default.a.link, true), _defineProperty(_ref4, __WEBPACK_IMPORTED_MODULE_0__index_scss___default.a.underline, underline !== 'none'), _defineProperty(_ref4, __WEBPACK_IMPORTED_MODULE_0__index_scss___default.a.disabled, disabled), _defineProperty(_ref4, __WEBPACK_IMPORTED_MODULE_0__index_scss___default.a['color--' + color], color !== 'none'), _defineProperty(_ref4, __WEBPACK_IMPORTED_MODULE_0__index_scss___default.a['underlineDottedAlways--' + color], color !== 'none' && underline === 'always'), _defineProperty(_ref4, __WEBPACK_IMPORTED_MODULE_0__index_scss___default.a['underlineDottedActive--' + color], !disabled && color !== 'none' && underline === 'active'), _ref4;\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/Links/utils/index.js\n// module id = 186\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/Links/utils/index.js?", + ); + + /***/ + }, + /* 187 */ + /* exports provided: default */ + /* all exports used */ + /*!********************************************************!*\ + !*** ./app/libs/components/forms/Input/Base/index.jsx ***! + \********************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "Object.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_fp__ = __webpack_require__(/*! lodash/fp */ 14);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_fp___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_lodash_fp__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__index_scss__ = __webpack_require__(/*! ./index.scss */ 1092);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__index_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__index_scss__);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\n\n\n\n\n\n\nif (typeof exports !== 'undefined') Object.defineProperty(exports, 'babelPluginFlowReactPropTypes_proptype_Props', {\n value: __webpack_require__(/*! react */ 1).PropTypes.shape({\n value: __webpack_require__(/*! prop-types */ 0).oneOfType([__webpack_require__(/*! prop-types */ 0).string, __webpack_require__(/*! prop-types */ 0).number, function (props, propName, componentName) {\n if (props[propName] != null) return new Error('Invalid prop `' + propName + '` of value `' + value + '` passed to `' + componentName + '`. Expected undefined or null.');\n }]),\n className: __webpack_require__(/*! prop-types */ 0).string,\n setRef: __webpack_require__(/*! prop-types */ 0).func\n })\n});\n\n\nvar Input = function Input(_ref) {\n var value = _ref.value,\n setRef = _ref.setRef,\n className = _ref.className,\n otherProps = _objectWithoutProperties(_ref, ['value', 'setRef', 'className']);\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('input', _extends({\n ref: setRef,\n type: 'text',\n value: __WEBPACK_IMPORTED_MODULE_2_lodash_fp___default.a.isNil(value) ? '' : value,\n className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()(__WEBPACK_IMPORTED_MODULE_3__index_scss___default.a.input, className)\n }, otherProps));\n};\n\nInput.propTypes = {\n value: __webpack_require__(/*! prop-types */ 0).oneOfType([__webpack_require__(/*! prop-types */ 0).string, __webpack_require__(/*! prop-types */ 0).number, function (props, propName, componentName) {\n if (props[propName] != null) return new Error('Invalid prop `' + propName + '` of value `' + value + '` passed to `' + componentName + '`. Expected undefined or null.');\n }]),\n className: __webpack_require__(/*! prop-types */ 0).string,\n setRef: __webpack_require__(/*! prop-types */ 0).func\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (Input);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/forms/Input/Base/index.jsx\n// module id = 187\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/forms/Input/Base/index.jsx?", + ); + + /***/ + }, + /* 188 */ + /* exports provided: default */ + /* exports used: default */ + /*!************************************************!*\ + !*** ./app/libs/components/icons/IconHost.jsx ***! + \************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__templates_SvgIconTemplate__ = __webpack_require__(/*! ../../templates/SvgIconTemplate */ 15);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\n\n\nvar babelPluginFlowReactPropTypes_proptype_SvgProps = __webpack_require__(/*! ../../../types */ 4).babelPluginFlowReactPropTypes_proptype_SvgProps || __webpack_require__(/*! react */ 1).PropTypes.any;\n\n\n\nvar IconHost = function IconHost(_ref) {\n var _ref$title = _ref.title,\n title = _ref$title === undefined ? 'Host' : _ref$title,\n _ref$viewBoxWidth = _ref.viewBoxWidth,\n viewBoxWidth = _ref$viewBoxWidth === undefined ? 18 : _ref$viewBoxWidth,\n _ref$viewBoxHeight = _ref.viewBoxHeight,\n viewBoxHeight = _ref$viewBoxHeight === undefined ? 18 : _ref$viewBoxHeight,\n otherProps = _objectWithoutProperties(_ref, ['title', 'viewBoxWidth', 'viewBoxHeight']);\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_1__templates_SvgIconTemplate__[\"a\" /* default */],\n _extends({ title: title, viewBoxWidth: viewBoxWidth, viewBoxHeight: viewBoxHeight }, otherProps),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'g',\n { stroke: 'none', strokeWidth: '1', fill: 'none', fillRule: 'evenodd' },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('polygon', { points: '0 9 9 0 18 9 16.5 10.5 9 3 1.5 10.5' }),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('polygon', { points: '2 7 4 7 4 16 14 16 14 7 16 7 16 18 2 18' })\n )\n );\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (IconHost);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/icons/IconHost.jsx\n// module id = 188\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/icons/IconHost.jsx?", + ); + + /***/ + }, + /* 189 */ + /* exports provided: default */ + /* exports used: default */ + /*!******************************************************!*\ + !*** ./app/libs/components/icons/IconMembership.jsx ***! + \******************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__templates_SvgIconTemplate__ = __webpack_require__(/*! ../../templates/SvgIconTemplate */ 15);\n\n/* eslint max-len: 0 */\n\n\n\n\n\nvar IconMembership = function IconMembership(props) {\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_2__templates_SvgIconTemplate__[\"a\" /* default */],\n props,\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'g',\n { fillRule: 'evenodd' },\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('polygon', { points: '2.5 4 .5 2 2 .5 9.5 8 8 9.5 4 5.5 2 7.5 .5 6' }),\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('path', { d: 'M11.5,16 C13.9852814,16 16,13.9852814 16,11.5 C16,9.01471863 13.9852814,7 11.5,7 C9.01471863,7 7,9.01471863 7,11.5 C7,13.9852814 9.01471863,16 11.5,16 Z M11.5,14 C12.8807119,14 14,12.8807119 14,11.5 C14,10.1192881 12.8807119,9 11.5,9 C10.1192881,9 9,10.1192881 9,11.5 C9,12.8807119 10.1192881,14 11.5,14 Z' })\n )\n );\n};\n\nIconMembership.propTypes = {\n title: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string\n};\n\nIconMembership.defaultProps = {\n title: 'Membership',\n viewBoxWidth: 18,\n viewBoxHeight: 18\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (IconMembership);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/icons/IconMembership.jsx\n// module id = 189\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/icons/IconMembership.jsx?", + ); + + /***/ + }, + /* 190 */ + /* exports provided: default */ + /* exports used: default */ + /*!********************************************************!*\ + !*** ./app/libs/components/icons/utils/createIcon.jsx ***! + \********************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n\n\n/**\n * @desc This utility is used to attach aspect ratio to an icon component.\n * Aspect ratio is used in reusable components to calculate width or height\n * of the icon, passed to component (e.g. Input.WithIcon).\n *\n */\nvar babelPluginFlowReactPropTypes_proptype_SvgProps = __webpack_require__(/*! ../../Svg */ 138).babelPluginFlowReactPropTypes_proptype_SvgProps || __webpack_require__(/*! react */ 1).PropTypes.any;\n\n/* harmony default export */ __webpack_exports__["a"] = (function (_ref) {\n var viewBoxWidth = _ref.viewBoxWidth,\n viewBoxHeight = _ref.viewBoxHeight,\n Icon = _ref.Icon;\n\n Icon.aspectRatio = viewBoxWidth / viewBoxHeight; // eslint-disable-line no-param-reassign\n return Icon;\n});\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/icons/utils/createIcon.jsx\n// module id = 190\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/icons/utils/createIcon.jsx?', + ); + + /***/ + }, + /* 191 */ + /* exports provided: default */ + /* exports used: default */ + /*!*********************************************!*\ + !*** ./app/libs/hocs/withIsMountedProp.jsx ***! + \*********************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_recompose__ = __webpack_require__(/*! recompose */ 1481);\n/* harmony export (immutable) */ __webpack_exports__["a"] = withIsMountedProp;\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\n\n\n/**\n * withIsMountedProp - HoC that feeds your BaseComponent a boolean prop called `isMounted` that\n * tells you whether or not the component has been mounted on the page. This functionality is\n * available in React.createClass but not with ES6 syntax or SFCs.\n *\n * @param {React Node} BaseComponent The Component that will receive the prop.\n * @return {BaseComponent} The Component, now loaded with the prop.\n */\nfunction withIsMountedProp(BaseComponent) {\n return function (_React$Component) {\n _inherits(withIsMountedPropHoC, _React$Component);\n\n function withIsMountedPropHoC() {\n var _ref;\n\n var _temp, _this, _ret;\n\n _classCallCheck(this, withIsMountedPropHoC);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = withIsMountedPropHoC.__proto__ || Object.getPrototypeOf(withIsMountedPropHoC)).call.apply(_ref, [this].concat(args))), _this), _this.displayName = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_recompose__["a" /* wrapDisplayName */])(BaseComponent, \'withIsMountedProp\'), _this.state = { isMounted: false }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n _createClass(withIsMountedPropHoC, [{\n key: \'componentDidMount\',\n value: function componentDidMount() {\n this.setState({ isMounted: true }); // eslint-disable-line react/no-did-mount-set-state\n }\n }, {\n key: \'render\',\n value: function render() {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(BaseComponent, _extends({ isMounted: this.state.isMounted }, this.props));\n }\n }]);\n\n return withIsMountedPropHoC;\n }(__WEBPACK_IMPORTED_MODULE_0_react___default.a.Component);\n}\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/hocs/withIsMountedProp.jsx\n// module id = 191\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/hocs/withIsMountedProp.jsx?', + ); + + /***/ + }, + /* 192 */ + /* exports provided: getLemSection, isEditMode, buildListingTitlePlaceholder, fetchBedroomsLabel, fetchNumericalLabel, buildListingMarkerKey */ + /* exports used: buildListingMarkerKey, fetchNumericalLabel, fetchBedroomsLabel */ + /*!**********************************************!*\ + !*** ./app/libs/utils/fng/listings/index.js ***! + \**********************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash__ = __webpack_require__(/*! lodash */ 19);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_lodash__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__i18n__ = __webpack_require__(/*! ../../i18n */ 89);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__enums_ListingViewMode__ = __webpack_require__(/*! ../../../../enums/ListingViewMode */ 741);\n/* unused harmony export getLemSection */\n/* unused harmony export isEditMode */\n/* unused harmony export buildListingTitlePlaceholder */\n/* harmony export (immutable) */ __webpack_exports__["c"] = fetchBedroomsLabel;\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return fetchNumericalLabel; });\n/* harmony export (immutable) */ __webpack_exports__["a"] = buildListingMarkerKey;\n\n\n\n\n\nfunction getLemSection(props, LiveSection, EditSection) {\n return props.viewMode === __WEBPACK_IMPORTED_MODULE_2__enums_ListingViewMode__["a" /* default */].EDIT ? EditSection : LiveSection;\n}\n\nfunction isEditMode(viewMode) {\n return viewMode === __WEBPACK_IMPORTED_MODULE_2__enums_ListingViewMode__["a" /* default */].EDIT;\n}\n\nfunction buildListingTitlePlaceholder(owner) {\n return owner.firstName + \'\\\'s Place\';\n}\n\nfunction fetchBedroomsLabel(value) {\n if (value === 0) {\n return \'Studio\';\n } else if (value) {\n return __WEBPACK_IMPORTED_MODULE_1__i18n__["a" /* formatInflection */](\'bedroom\', value);\n }\n\n return value;\n}\n\nvar fetchNumericalLabel = function fetchNumericalLabel(attr, value) {\n return __WEBPACK_IMPORTED_MODULE_0_lodash___default.a.isNil(value) ? value : __WEBPACK_IMPORTED_MODULE_1__i18n__["a" /* formatInflection */](attr, value);\n};\n\nfunction buildListingMarkerKey(listing) {\n return listing.propertyId ? \'property-\' + listing.propertyId : \'listing-\' + listing.id;\n}\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/utils/fng/listings/index.js\n// module id = 192\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/utils/fng/listings/index.js?', + ); + + /***/ + }, + /* 193 */ + /* exports provided: API_ERROR, default */ + /* exports used: API_ERROR, default */ + /*!*******************************************************!*\ + !*** ./app/libs/utils/redux/middlewares/apiErrors.js ***! + \*******************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0____ = __webpack_require__(/*! .. */ 108);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__errorTracker__ = __webpack_require__(/*! ../../errorTracker */ 312);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__enums_Environment__ = __webpack_require__(/*! ../../../../enums/Environment */ 183);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return API_ERROR; });\n\n\n\n\nvar API_ERROR = \'API_ERROR\';\n\n/* harmony default export */ __webpack_exports__["b"] = (function () {\n return function (next) {\n return function (action) {\n var apiErrorAction = action[API_ERROR];\n\n if (typeof apiErrorAction === \'undefined\') return next(action);\n\n var type = apiErrorAction.type,\n error = apiErrorAction.error;\n var isApiError = error.isApiError,\n response = error.response;\n\n\n var getApiErrorMsg = function getApiErrorMsg() {\n return \'-----------\' + \'Redux API Error Middleware Encountered Bad Response:\\n\' + (\'error code: \' + response.status) + (\'error data: \' + JSON.stringify(response.body, null, 2)) + (\' action: \' + JSON.stringify(apiErrorAction, null, 2)) + \'-----------\\n\';\n };\n\n var getNextAction = function getNextAction() {\n var nextErrorAction = isApiError ? { type: type, error: { code: response.status, data: response.body } } : { type: type, error: error };\n\n next(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0____["b" /* actionWith */])(action, API_ERROR, nextErrorAction));\n };\n\n switch ("dev") {\n case __WEBPACK_IMPORTED_MODULE_2__enums_Environment__["a" /* default */].TEST:\n {\n if (isApiError) throw getApiErrorMsg();\n throw error;\n }\n\n case __WEBPACK_IMPORTED_MODULE_2__enums_Environment__["a" /* default */].DEV:\n {\n console.error(error); // eslint-disable-line no-console\n return getNextAction();\n }\n\n default:\n {\n if (isApiError) {\n __WEBPACK_IMPORTED_MODULE_1__errorTracker__["a" /* notify */](error, { action: action, message: getApiErrorMsg() });\n } else {\n __WEBPACK_IMPORTED_MODULE_1__errorTracker__["a" /* notify */](error);\n }\n\n return getNextAction();\n }\n }\n };\n };\n});\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/utils/redux/middlewares/apiErrors.js\n// module id = 193\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/utils/redux/middlewares/apiErrors.js?', + ); + + /***/ + }, + /* 194 */ + /* unknown exports provided */ + /* all exports used */ + /*!************************************************!*\ + !*** ./~/babel-runtime/core-js/object/keys.js ***! + \************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + 'module.exports = { "default": __webpack_require__(/*! core-js/library/fn/object/keys */ 914), __esModule: true };\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/babel-runtime/core-js/object/keys.js\n// module id = 194\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/babel-runtime/core-js/object/keys.js?', + ); + + /***/ + }, + /* 195 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************************!*\ + !*** ./~/core-js/library/modules/_cof.js ***! + \*******************************************/ + /***/ function (module, exports) { + eval( + 'var toString = {}.toString;\n\nmodule.exports = function(it){\n return toString.call(it).slice(8, -1);\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_cof.js\n// module id = 195\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/_cof.js?', + ); + + /***/ + }, + /* 196 */ + /* unknown exports provided */ + /* all exports used */ + /*!*****************************************************!*\ + !*** ./~/core-js/library/modules/_enum-bug-keys.js ***! + \*****************************************************/ + /***/ function (module, exports) { + eval( + "// IE 8- don't enum bug keys\nmodule.exports = (\n 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'\n).split(',');\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_enum-bug-keys.js\n// module id = 196\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/_enum-bug-keys.js?", + ); + + /***/ + }, + /* 197 */ + /* unknown exports provided */ + /* all exports used */ + /*!**********************************************!*\ + !*** ./~/core-js/library/modules/_for-of.js ***! + \**********************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "var ctx = __webpack_require__(/*! ./_ctx */ 93)\n , call = __webpack_require__(/*! ./_iter-call */ 323)\n , isArrayIter = __webpack_require__(/*! ./_is-array-iter */ 321)\n , anObject = __webpack_require__(/*! ./_an-object */ 72)\n , toLength = __webpack_require__(/*! ./_to-length */ 152)\n , getIterFn = __webpack_require__(/*! ./core.get-iterator-method */ 331)\n , BREAK = {}\n , RETURN = {};\nvar exports = module.exports = function(iterable, entries, fn, that, ITERATOR){\n var iterFn = ITERATOR ? function(){ return iterable; } : getIterFn(iterable)\n , f = ctx(fn, that, entries ? 2 : 1)\n , index = 0\n , length, step, iterator, result;\n if(typeof iterFn != 'function')throw TypeError(iterable + ' is not iterable!');\n // fast case for arrays with default iterator\n if(isArrayIter(iterFn))for(length = toLength(iterable.length); length > index; index++){\n result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]);\n if(result === BREAK || result === RETURN)return result;\n } else for(iterator = iterFn.call(iterable); !(step = iterator.next()).done; ){\n result = call(iterator, f, step.value, entries);\n if(result === BREAK || result === RETURN)return result;\n }\n};\nexports.BREAK = BREAK;\nexports.RETURN = RETURN;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_for-of.js\n// module id = 197\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/_for-of.js?", + ); + + /***/ + }, + /* 198 */ + /* unknown exports provided */ + /* all exports used */ + /*!***********************************************!*\ + !*** ./~/core-js/library/modules/_iobject.js ***! + \***********************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "// fallback for non-array-like ES3 and non-enumerable old V8 strings\nvar cof = __webpack_require__(/*! ./_cof */ 195);\nmodule.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){\n return cof(it) == 'String' ? it.split('') : Object(it);\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_iobject.js\n// module id = 198\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/_iobject.js?", + ); + + /***/ + }, + /* 199 */ + /* unknown exports provided */ + /* all exports used */ + /*!***************************************************!*\ + !*** ./~/core-js/library/modules/_iter-define.js ***! + \***************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\nvar LIBRARY = __webpack_require__(/*! ./_library */ 200)\n , $export = __webpack_require__(/*! ./_export */ 38)\n , redefine = __webpack_require__(/*! ./_redefine */ 330)\n , hide = __webpack_require__(/*! ./_hide */ 63)\n , has = __webpack_require__(/*! ./_has */ 74)\n , Iterators = __webpack_require__(/*! ./_iterators */ 110)\n , $iterCreate = __webpack_require__(/*! ./_iter-create */ 932)\n , setToStringTag = __webpack_require__(/*! ./_set-to-string-tag */ 151)\n , getPrototypeOf = __webpack_require__(/*! ./_object-gpo */ 938)\n , ITERATOR = __webpack_require__(/*! ./_wks */ 39)('iterator')\n , BUGGY = !([].keys && 'next' in [].keys()) // Safari has buggy iterators w/o `next`\n , FF_ITERATOR = '@@iterator'\n , KEYS = 'keys'\n , VALUES = 'values';\n\nvar returnThis = function(){ return this; };\n\nmodule.exports = function(Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED){\n $iterCreate(Constructor, NAME, next);\n var getMethod = function(kind){\n if(!BUGGY && kind in proto)return proto[kind];\n switch(kind){\n case KEYS: return function keys(){ return new Constructor(this, kind); };\n case VALUES: return function values(){ return new Constructor(this, kind); };\n } return function entries(){ return new Constructor(this, kind); };\n };\n var TAG = NAME + ' Iterator'\n , DEF_VALUES = DEFAULT == VALUES\n , VALUES_BUG = false\n , proto = Base.prototype\n , $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]\n , $default = $native || getMethod(DEFAULT)\n , $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined\n , $anyNative = NAME == 'Array' ? proto.entries || $native : $native\n , methods, key, IteratorPrototype;\n // Fix native\n if($anyNative){\n IteratorPrototype = getPrototypeOf($anyNative.call(new Base));\n if(IteratorPrototype !== Object.prototype){\n // Set @@toStringTag to native iterators\n setToStringTag(IteratorPrototype, TAG, true);\n // fix for some old engines\n if(!LIBRARY && !has(IteratorPrototype, ITERATOR))hide(IteratorPrototype, ITERATOR, returnThis);\n }\n }\n // fix Array#{values, @@iterator}.name in V8 / FF\n if(DEF_VALUES && $native && $native.name !== VALUES){\n VALUES_BUG = true;\n $default = function values(){ return $native.call(this); };\n }\n // Define iterator\n if((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])){\n hide(proto, ITERATOR, $default);\n }\n // Plug for library\n Iterators[NAME] = $default;\n Iterators[TAG] = returnThis;\n if(DEFAULT){\n methods = {\n values: DEF_VALUES ? $default : getMethod(VALUES),\n keys: IS_SET ? $default : getMethod(KEYS),\n entries: $entries\n };\n if(FORCED)for(key in methods){\n if(!(key in proto))redefine(proto, key, methods[key]);\n } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);\n }\n return methods;\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_iter-define.js\n// module id = 199\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/_iter-define.js?", + ); + + /***/ + }, + /* 200 */ + /* unknown exports provided */ + /* all exports used */ + /*!***********************************************!*\ + !*** ./~/core-js/library/modules/_library.js ***! + \***********************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = true;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_library.js\n// module id = 200\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/_library.js?', + ); + + /***/ + }, + /* 201 */ + /* unknown exports provided */ + /* all exports used */ + /*!********************************************!*\ + !*** ./~/core-js/library/modules/_meta.js ***! + \********************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "var META = __webpack_require__(/*! ./_uid */ 153)('meta')\n , isObject = __webpack_require__(/*! ./_is-object */ 75)\n , has = __webpack_require__(/*! ./_has */ 74)\n , setDesc = __webpack_require__(/*! ./_object-dp */ 46).f\n , id = 0;\nvar isExtensible = Object.isExtensible || function(){\n return true;\n};\nvar FREEZE = !__webpack_require__(/*! ./_fails */ 73)(function(){\n return isExtensible(Object.preventExtensions({}));\n});\nvar setMeta = function(it){\n setDesc(it, META, {value: {\n i: 'O' + ++id, // object ID\n w: {} // weak collections IDs\n }});\n};\nvar fastKey = function(it, create){\n // return primitive with prefix\n if(!isObject(it))return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;\n if(!has(it, META)){\n // can't set metadata to uncaught frozen object\n if(!isExtensible(it))return 'F';\n // not necessary to add metadata\n if(!create)return 'E';\n // add missing metadata\n setMeta(it);\n // return object ID\n } return it[META].i;\n};\nvar getWeak = function(it, create){\n if(!has(it, META)){\n // can't set metadata to uncaught frozen object\n if(!isExtensible(it))return true;\n // not necessary to add metadata\n if(!create)return false;\n // add missing metadata\n setMeta(it);\n // return hash weak collections IDs\n } return it[META].w;\n};\n// add metadata on freeze-family methods calling\nvar onFreeze = function(it){\n if(FREEZE && meta.NEED && isExtensible(it) && !has(it, META))setMeta(it);\n return it;\n};\nvar meta = module.exports = {\n KEY: META,\n NEED: false,\n fastKey: fastKey,\n getWeak: getWeak,\n onFreeze: onFreeze\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_meta.js\n// module id = 201\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/_meta.js?", + ); + + /***/ + }, + /* 202 */ + /* unknown exports provided */ + /* all exports used */ + /*!***************************************************!*\ + !*** ./~/core-js/library/modules/_object-gops.js ***! + \***************************************************/ + /***/ function (module, exports) { + eval( + 'exports.f = Object.getOwnPropertySymbols;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_object-gops.js\n// module id = 202\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/_object-gops.js?', + ); + + /***/ + }, + /* 203 */ + /* unknown exports provided */ + /* all exports used */ + /*!**************************************************!*\ + !*** ./~/core-js/library/modules/_shared-key.js ***! + \**************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "var shared = __webpack_require__(/*! ./_shared */ 204)('keys')\n , uid = __webpack_require__(/*! ./_uid */ 153);\nmodule.exports = function(key){\n return shared[key] || (shared[key] = uid(key));\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_shared-key.js\n// module id = 203\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/_shared-key.js?", + ); + + /***/ + }, + /* 204 */ + /* unknown exports provided */ + /* all exports used */ + /*!**********************************************!*\ + !*** ./~/core-js/library/modules/_shared.js ***! + \**********************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "var global = __webpack_require__(/*! ./_global */ 53)\n , SHARED = '__core-js_shared__'\n , store = global[SHARED] || (global[SHARED] = {});\nmodule.exports = function(key){\n return store[key] || (store[key] = {});\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_shared.js\n// module id = 204\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/_shared.js?", + ); + + /***/ + }, + /* 205 */ + /* unknown exports provided */ + /* all exports used */ + /*!**************************************************!*\ + !*** ./~/core-js/library/modules/_to-integer.js ***! + \**************************************************/ + /***/ function (module, exports) { + eval( + '// 7.1.4 ToInteger\nvar ceil = Math.ceil\n , floor = Math.floor;\nmodule.exports = function(it){\n return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_to-integer.js\n// module id = 205\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/_to-integer.js?', + ); + + /***/ + }, + /* 206 */ + /* unknown exports provided */ + /* all exports used */ + /*!****************************************************!*\ + !*** ./~/core-js/library/modules/_to-primitive.js ***! + \****************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "// 7.1.1 ToPrimitive(input [, PreferredType])\nvar isObject = __webpack_require__(/*! ./_is-object */ 75);\n// instead of the ES6 spec version, we didn't implement @@toPrimitive case\n// and the second argument - flag - preferred type is a string\nmodule.exports = function(it, S){\n if(!isObject(it))return it;\n var fn, val;\n if(S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;\n if(typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it)))return val;\n if(!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;\n throw TypeError(\"Can't convert object to primitive value\");\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_to-primitive.js\n// module id = 206\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/_to-primitive.js?", + ); + + /***/ + }, + /* 207 */ + /* unknown exports provided */ + /* all exports used */ + /*!**************************************************!*\ + !*** ./~/core-js/library/modules/_wks-define.js ***! + \**************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "var global = __webpack_require__(/*! ./_global */ 53)\n , core = __webpack_require__(/*! ./_core */ 30)\n , LIBRARY = __webpack_require__(/*! ./_library */ 200)\n , wksExt = __webpack_require__(/*! ./_wks-ext */ 208)\n , defineProperty = __webpack_require__(/*! ./_object-dp */ 46).f;\nmodule.exports = function(name){\n var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {});\n if(name.charAt(0) != '_' && !(name in $Symbol))defineProperty($Symbol, name, {value: wksExt.f(name)});\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_wks-define.js\n// module id = 207\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/_wks-define.js?", + ); + + /***/ + }, + /* 208 */ + /* unknown exports provided */ + /* all exports used */ + /*!***********************************************!*\ + !*** ./~/core-js/library/modules/_wks-ext.js ***! + \***********************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + 'exports.f = __webpack_require__(/*! ./_wks */ 39);\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_wks-ext.js\n// module id = 208\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/_wks-ext.js?', + ); + + /***/ + }, + /* 209 */ + /* unknown exports provided */ + /* all exports used */ + /*!**********************************************************!*\ + !*** ./~/core-js/library/modules/es6.string.iterator.js ***! + \**********************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\nvar $at = __webpack_require__(/*! ./_string-at */ 942)(true);\n\n// 21.1.3.27 String.prototype[@@iterator]()\n__webpack_require__(/*! ./_iter-define */ 199)(String, 'String', function(iterated){\n this._t = String(iterated); // target\n this._i = 0; // next index\n// 21.1.5.2.1 %StringIteratorPrototype%.next()\n}, function(){\n var O = this._t\n , index = this._i\n , point;\n if(index >= O.length)return {value: undefined, done: true};\n point = $at(O, index);\n this._i += point.length;\n return {value: point, done: false};\n});\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/es6.string.iterator.js\n// module id = 209\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/es6.string.iterator.js?", + ); + + /***/ + }, + /* 210 */ + /* unknown exports provided */ + /* exports used: default */ + /*!*********************************************************!*\ + !*** ./app/libs/components/Navbar/NavItem/NavItem.scss ***! + \*********************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"link": "NavItem__link__2OuN_",\n\t"wrapper": "NavItem__wrapper__3Hsgu",\n\t"active": "NavItem__active__DZwp0",\n\t"label": "NavItem__label__2lVPS",\n\t"uppercase": "NavItem__uppercase__1YJfD"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/Navbar/NavItem/NavItem.scss\n// module id = 210\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/Navbar/NavItem/NavItem.scss?', + ); + + /***/ + }, + /* 211 */ + /* unknown exports provided */ + /* all exports used */ + /*!*************************************!*\ + !*** ./~/dom-helpers/events/off.js ***! + \*************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _inDOM = __webpack_require__(/*! ../util/inDOM */ 65);\n\nvar _inDOM2 = _interopRequireDefault(_inDOM);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar off = function off() {};\nif (_inDOM2.default) {\n off = function () {\n if (document.addEventListener) return function (node, eventName, handler, capture) {\n return node.removeEventListener(eventName, handler, capture || false);\n };else if (document.attachEvent) return function (node, eventName, handler) {\n return node.detachEvent('on' + eventName, handler);\n };\n }();\n}\n\nexports.default = off;\nmodule.exports = exports['default'];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/dom-helpers/events/off.js\n// module id = 211\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/dom-helpers/events/off.js?", + ); + + /***/ + }, + /* 212 */ + /* unknown exports provided */ + /* all exports used */ + /*!******************************************!*\ + !*** ./~/history/lib/BrowserProtocol.js ***! + \******************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nexports.__esModule = true;\nexports.go = exports.replaceLocation = exports.pushLocation = exports.startListener = exports.getUserConfirmation = exports.getCurrentLocation = undefined;\n\nvar _LocationUtils = __webpack_require__(/*! ./LocationUtils */ 98);\n\nvar _DOMUtils = __webpack_require__(/*! ./DOMUtils */ 160);\n\nvar _DOMStateStorage = __webpack_require__(/*! ./DOMStateStorage */ 350);\n\nvar _PathUtils = __webpack_require__(/*! ./PathUtils */ 66);\n\nvar _ExecutionEnvironment = __webpack_require__(/*! ./ExecutionEnvironment */ 213);\n\nvar PopStateEvent = 'popstate';\nvar HashChangeEvent = 'hashchange';\n\nvar needsHashchangeListener = _ExecutionEnvironment.canUseDOM && !(0, _DOMUtils.supportsPopstateOnHashchange)();\n\nvar _createLocation = function _createLocation(historyState) {\n var key = historyState && historyState.key;\n\n return (0, _LocationUtils.createLocation)({\n pathname: window.location.pathname,\n search: window.location.search,\n hash: window.location.hash,\n state: key ? (0, _DOMStateStorage.readState)(key) : undefined\n }, undefined, key);\n};\n\nvar getCurrentLocation = exports.getCurrentLocation = function getCurrentLocation() {\n var historyState = void 0;\n try {\n historyState = window.history.state || {};\n } catch (error) {\n // IE 11 sometimes throws when accessing window.history.state\n // See https://github.com/ReactTraining/history/pull/289\n historyState = {};\n }\n\n return _createLocation(historyState);\n};\n\nvar getUserConfirmation = exports.getUserConfirmation = function getUserConfirmation(message, callback) {\n return callback(window.confirm(message));\n}; // eslint-disable-line no-alert\n\nvar startListener = exports.startListener = function startListener(listener) {\n var handlePopState = function handlePopState(event) {\n if (event.state !== undefined) // Ignore extraneous popstate events in WebKit\n listener(_createLocation(event.state));\n };\n\n (0, _DOMUtils.addEventListener)(window, PopStateEvent, handlePopState);\n\n var handleUnpoppedHashChange = function handleUnpoppedHashChange() {\n return listener(getCurrentLocation());\n };\n\n if (needsHashchangeListener) {\n (0, _DOMUtils.addEventListener)(window, HashChangeEvent, handleUnpoppedHashChange);\n }\n\n return function () {\n (0, _DOMUtils.removeEventListener)(window, PopStateEvent, handlePopState);\n\n if (needsHashchangeListener) {\n (0, _DOMUtils.removeEventListener)(window, HashChangeEvent, handleUnpoppedHashChange);\n }\n };\n};\n\nvar updateLocation = function updateLocation(location, updateState) {\n var state = location.state;\n var key = location.key;\n\n\n if (state !== undefined) (0, _DOMStateStorage.saveState)(key, state);\n\n updateState({ key: key }, (0, _PathUtils.createPath)(location));\n};\n\nvar pushLocation = exports.pushLocation = function pushLocation(location) {\n return updateLocation(location, function (state, path) {\n return window.history.pushState(state, null, path);\n });\n};\n\nvar replaceLocation = exports.replaceLocation = function replaceLocation(location) {\n return updateLocation(location, function (state, path) {\n return window.history.replaceState(state, null, path);\n });\n};\n\nvar go = exports.go = function go(n) {\n if (n) window.history.go(n);\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/history/lib/BrowserProtocol.js\n// module id = 212\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/history/lib/BrowserProtocol.js?", + ); + + /***/ + }, + /* 213 */ + /* unknown exports provided */ + /* all exports used */ + /*!***********************************************!*\ + !*** ./~/history/lib/ExecutionEnvironment.js ***! + \***********************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nexports.__esModule = true;\nvar canUseDOM = exports.canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/history/lib/ExecutionEnvironment.js\n// module id = 213\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/history/lib/ExecutionEnvironment.js?", + ); + + /***/ + }, + /* 214 */ + /* unknown exports provided */ + /* exports used: default */ + /*!***********************************************!*\ + !*** ./~/history/lib/createBrowserHistory.js ***! + \***********************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nexports.__esModule = true;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _invariant = __webpack_require__(/*! invariant */ 25);\n\nvar _invariant2 = _interopRequireDefault(_invariant);\n\nvar _ExecutionEnvironment = __webpack_require__(/*! ./ExecutionEnvironment */ 213);\n\nvar _BrowserProtocol = __webpack_require__(/*! ./BrowserProtocol */ 212);\n\nvar BrowserProtocol = _interopRequireWildcard(_BrowserProtocol);\n\nvar _RefreshProtocol = __webpack_require__(/*! ./RefreshProtocol */ 1148);\n\nvar RefreshProtocol = _interopRequireWildcard(_RefreshProtocol);\n\nvar _DOMUtils = __webpack_require__(/*! ./DOMUtils */ 160);\n\nvar _createHistory = __webpack_require__(/*! ./createHistory */ 215);\n\nvar _createHistory2 = _interopRequireDefault(_createHistory);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Creates and returns a history object that uses HTML5's history API\n * (pushState, replaceState, and the popstate event) to manage history.\n * This is the recommended method of managing history in browsers because\n * it provides the cleanest URLs.\n *\n * Note: In browsers that do not support the HTML5 history API full\n * page reloads will be used to preserve clean URLs. You can force this\n * behavior using { forceRefresh: true } in options.\n */\nvar createBrowserHistory = function createBrowserHistory() {\n var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\n !_ExecutionEnvironment.canUseDOM ? true ? (0, _invariant2.default)(false, 'Browser history needs a DOM') : (0, _invariant2.default)(false) : void 0;\n\n var useRefresh = options.forceRefresh || !(0, _DOMUtils.supportsHistory)();\n var Protocol = useRefresh ? RefreshProtocol : BrowserProtocol;\n\n var getUserConfirmation = Protocol.getUserConfirmation;\n var getCurrentLocation = Protocol.getCurrentLocation;\n var pushLocation = Protocol.pushLocation;\n var replaceLocation = Protocol.replaceLocation;\n var go = Protocol.go;\n\n\n var history = (0, _createHistory2.default)(_extends({\n getUserConfirmation: getUserConfirmation }, options, {\n getCurrentLocation: getCurrentLocation,\n pushLocation: pushLocation,\n replaceLocation: replaceLocation,\n go: go\n }));\n\n var listenerCount = 0,\n stopListener = void 0;\n\n var startListener = function startListener(listener, before) {\n if (++listenerCount === 1) stopListener = BrowserProtocol.startListener(history.transitionTo);\n\n var unlisten = before ? history.listenBefore(listener) : history.listen(listener);\n\n return function () {\n unlisten();\n\n if (--listenerCount === 0) stopListener();\n };\n };\n\n var listenBefore = function listenBefore(listener) {\n return startListener(listener, true);\n };\n\n var listen = function listen(listener) {\n return startListener(listener, false);\n };\n\n return _extends({}, history, {\n listenBefore: listenBefore,\n listen: listen\n });\n};\n\nexports.default = createBrowserHistory;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/history/lib/createBrowserHistory.js\n// module id = 214\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/history/lib/createBrowserHistory.js?", + ); + + /***/ + }, + /* 215 */ + /* unknown exports provided */ + /* all exports used */ + /*!****************************************!*\ + !*** ./~/history/lib/createHistory.js ***! + \****************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nexports.__esModule = true;\n\nvar _AsyncUtils = __webpack_require__(/*! ./AsyncUtils */ 1146);\n\nvar _PathUtils = __webpack_require__(/*! ./PathUtils */ 66);\n\nvar _runTransitionHook = __webpack_require__(/*! ./runTransitionHook */ 216);\n\nvar _runTransitionHook2 = _interopRequireDefault(_runTransitionHook);\n\nvar _Actions = __webpack_require__(/*! ./Actions */ 159);\n\nvar _LocationUtils = __webpack_require__(/*! ./LocationUtils */ 98);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar createHistory = function createHistory() {\n var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n var getCurrentLocation = options.getCurrentLocation;\n var getUserConfirmation = options.getUserConfirmation;\n var pushLocation = options.pushLocation;\n var replaceLocation = options.replaceLocation;\n var go = options.go;\n var keyLength = options.keyLength;\n\n\n var currentLocation = void 0;\n var pendingLocation = void 0;\n var beforeListeners = [];\n var listeners = [];\n var allKeys = [];\n\n var getCurrentIndex = function getCurrentIndex() {\n if (pendingLocation && pendingLocation.action === _Actions.POP) return allKeys.indexOf(pendingLocation.key);\n\n if (currentLocation) return allKeys.indexOf(currentLocation.key);\n\n return -1;\n };\n\n var updateLocation = function updateLocation(nextLocation) {\n var currentIndex = getCurrentIndex();\n\n currentLocation = nextLocation;\n\n if (currentLocation.action === _Actions.PUSH) {\n allKeys = [].concat(allKeys.slice(0, currentIndex + 1), [currentLocation.key]);\n } else if (currentLocation.action === _Actions.REPLACE) {\n allKeys[currentIndex] = currentLocation.key;\n }\n\n listeners.forEach(function (listener) {\n return listener(currentLocation);\n });\n };\n\n var listenBefore = function listenBefore(listener) {\n beforeListeners.push(listener);\n\n return function () {\n return beforeListeners = beforeListeners.filter(function (item) {\n return item !== listener;\n });\n };\n };\n\n var listen = function listen(listener) {\n listeners.push(listener);\n\n return function () {\n return listeners = listeners.filter(function (item) {\n return item !== listener;\n });\n };\n };\n\n var confirmTransitionTo = function confirmTransitionTo(location, callback) {\n (0, _AsyncUtils.loopAsync)(beforeListeners.length, function (index, next, done) {\n (0, _runTransitionHook2.default)(beforeListeners[index], location, function (result) {\n return result != null ? done(result) : next();\n });\n }, function (message) {\n if (getUserConfirmation && typeof message === 'string') {\n getUserConfirmation(message, function (ok) {\n return callback(ok !== false);\n });\n } else {\n callback(message !== false);\n }\n });\n };\n\n var transitionTo = function transitionTo(nextLocation) {\n if (currentLocation && (0, _LocationUtils.locationsAreEqual)(currentLocation, nextLocation) || pendingLocation && (0, _LocationUtils.locationsAreEqual)(pendingLocation, nextLocation)) return; // Nothing to do\n\n pendingLocation = nextLocation;\n\n confirmTransitionTo(nextLocation, function (ok) {\n if (pendingLocation !== nextLocation) return; // Transition was interrupted during confirmation\n\n pendingLocation = null;\n\n if (ok) {\n // Treat PUSH to same path like REPLACE to be consistent with browsers\n if (nextLocation.action === _Actions.PUSH) {\n var prevPath = (0, _PathUtils.createPath)(currentLocation);\n var nextPath = (0, _PathUtils.createPath)(nextLocation);\n\n if (nextPath === prevPath && (0, _LocationUtils.statesAreEqual)(currentLocation.state, nextLocation.state)) nextLocation.action = _Actions.REPLACE;\n }\n\n if (nextLocation.action === _Actions.POP) {\n updateLocation(nextLocation);\n } else if (nextLocation.action === _Actions.PUSH) {\n if (pushLocation(nextLocation) !== false) updateLocation(nextLocation);\n } else if (nextLocation.action === _Actions.REPLACE) {\n if (replaceLocation(nextLocation) !== false) updateLocation(nextLocation);\n }\n } else if (currentLocation && nextLocation.action === _Actions.POP) {\n var prevIndex = allKeys.indexOf(currentLocation.key);\n var nextIndex = allKeys.indexOf(nextLocation.key);\n\n if (prevIndex !== -1 && nextIndex !== -1) go(prevIndex - nextIndex); // Restore the URL\n }\n });\n };\n\n var push = function push(input) {\n return transitionTo(createLocation(input, _Actions.PUSH));\n };\n\n var replace = function replace(input) {\n return transitionTo(createLocation(input, _Actions.REPLACE));\n };\n\n var goBack = function goBack() {\n return go(-1);\n };\n\n var goForward = function goForward() {\n return go(1);\n };\n\n var createKey = function createKey() {\n return Math.random().toString(36).substr(2, keyLength || 6);\n };\n\n var createHref = function createHref(location) {\n return (0, _PathUtils.createPath)(location);\n };\n\n var createLocation = function createLocation(location, action) {\n var key = arguments.length <= 2 || arguments[2] === undefined ? createKey() : arguments[2];\n return (0, _LocationUtils.createLocation)(location, action, key);\n };\n\n return {\n getCurrentLocation: getCurrentLocation,\n listenBefore: listenBefore,\n listen: listen,\n transitionTo: transitionTo,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n createKey: createKey,\n createPath: _PathUtils.createPath,\n createHref: createHref,\n createLocation: createLocation\n };\n};\n\nexports.default = createHistory;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/history/lib/createHistory.js\n// module id = 215\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/history/lib/createHistory.js?", + ); + + /***/ + }, + /* 216 */ + /* unknown exports provided */ + /* all exports used */ + /*!********************************************!*\ + !*** ./~/history/lib/runTransitionHook.js ***! + \********************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nexports.__esModule = true;\n\nvar _warning = __webpack_require__(/*! warning */ 23);\n\nvar _warning2 = _interopRequireDefault(_warning);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar runTransitionHook = function runTransitionHook(hook, location, callback) {\n var result = hook(location, callback);\n\n if (hook.length < 2) {\n // Assume the hook runs synchronously and automatically\n // call the callback with the return value.\n callback(result);\n } else {\n true ? (0, _warning2.default)(result === undefined, 'You should not \"return\" in a transition hook with a callback argument; ' + 'call the callback instead') : void 0;\n }\n};\n\nexports.default = runTransitionHook;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/history/lib/runTransitionHook.js\n// module id = 216\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/history/lib/runTransitionHook.js?", + ); + + /***/ + }, + /* 217 */ + /* unknown exports provided */ + /* exports used: default */ + /*!********************************************!*\ + !*** ./~/hoist-non-react-statics/index.js ***! + \********************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2015, Yahoo! Inc.\n * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.\n */\n\n\nvar REACT_STATICS = {\n childContextTypes: true,\n contextTypes: true,\n defaultProps: true,\n displayName: true,\n getDefaultProps: true,\n mixins: true,\n propTypes: true,\n type: true\n};\n\nvar KNOWN_STATICS = {\n name: true,\n length: true,\n prototype: true,\n caller: true,\n arguments: true,\n arity: true\n};\n\nvar isGetOwnPropertySymbolsAvailable = typeof Object.getOwnPropertySymbols === 'function';\n\nmodule.exports = function hoistNonReactStatics(targetComponent, sourceComponent, customStatics) {\n if (typeof sourceComponent !== 'string') { // don't hoist over string (html) components\n var keys = Object.getOwnPropertyNames(sourceComponent);\n\n /* istanbul ignore else */\n if (isGetOwnPropertySymbolsAvailable) {\n keys = keys.concat(Object.getOwnPropertySymbols(sourceComponent));\n }\n\n for (var i = 0; i < keys.length; ++i) {\n if (!REACT_STATICS[keys[i]] && !KNOWN_STATICS[keys[i]] && (!customStatics || !customStatics[keys[i]])) {\n try {\n targetComponent[keys[i]] = sourceComponent[keys[i]];\n } catch (error) {\n\n }\n }\n }\n }\n\n return targetComponent;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/hoist-non-react-statics/index.js\n// module id = 217\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/hoist-non-react-statics/index.js?", + ); + + /***/ + }, + /* 218 */ + /* unknown exports provided */ + /* exports used: inflect, default */ + /*!****************************************!*\ + !*** ./~/inflection/lib/inflection.js ***! + \****************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!\n * inflection\n * Copyright(c) 2011 Ben Lin <ben@dreamerslab.com>\n * MIT Licensed\n *\n * @fileoverview\n * A port of inflection-js to node.js module.\n */\n\n( function ( root, factory ){\n if( true ){\n !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?\n\t\t\t\t(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n }else if( typeof exports === 'object' ){\n module.exports = factory();\n }else{\n root.inflection = factory();\n }\n}( this, function (){\n\n /**\n * @description This is a list of nouns that use the same form for both singular and plural.\n * This list should remain entirely in lower case to correctly match Strings.\n * @private\n */\n var uncountable_words = [\n // 'access',\n 'accommodation',\n 'adulthood',\n 'advertising',\n 'advice',\n 'aggression',\n 'aid',\n 'air',\n 'aircraft',\n 'alcohol',\n 'anger',\n 'applause',\n 'arithmetic',\n // 'art',\n 'assistance',\n 'athletics',\n // 'attention',\n\n 'bacon',\n 'baggage',\n // 'ballet',\n // 'beauty',\n 'beef',\n // 'beer',\n // 'behavior',\n 'biology',\n // 'billiards',\n 'blood',\n 'botany',\n // 'bowels',\n 'bread',\n // 'business',\n 'butter',\n\n 'carbon',\n 'cardboard',\n 'cash',\n 'chalk',\n 'chaos',\n 'chess',\n 'crossroads',\n 'countryside',\n\n // 'damage',\n 'dancing',\n // 'danger',\n 'deer',\n // 'delight',\n // 'dessert',\n 'dignity',\n 'dirt',\n // 'distribution',\n 'dust',\n\n 'economics',\n 'education',\n 'electricity',\n // 'employment',\n // 'energy',\n 'engineering',\n 'enjoyment',\n // 'entertainment',\n 'envy',\n 'equipment',\n 'ethics',\n 'evidence',\n 'evolution',\n\n // 'failure',\n // 'faith',\n 'fame',\n 'fiction',\n // 'fish',\n 'flour',\n 'flu',\n 'food',\n // 'freedom',\n // 'fruit',\n 'fuel',\n 'fun',\n // 'funeral',\n 'furniture',\n\n 'gallows',\n 'garbage',\n 'garlic',\n // 'gas',\n 'genetics',\n // 'glass',\n 'gold',\n 'golf',\n 'gossip',\n 'grammar',\n // 'grass',\n 'gratitude',\n 'grief',\n // 'ground',\n 'guilt',\n 'gymnastics',\n\n // 'hair',\n 'happiness',\n 'hardware',\n 'harm',\n 'hate',\n 'hatred',\n 'health',\n 'heat',\n // 'height',\n 'help',\n 'homework',\n 'honesty',\n 'honey',\n 'hospitality',\n 'housework',\n 'humour',\n 'hunger',\n 'hydrogen',\n\n 'ice',\n 'importance',\n 'inflation',\n 'information',\n // 'injustice',\n 'innocence',\n // 'intelligence',\n 'iron',\n 'irony',\n\n 'jam',\n // 'jealousy',\n // 'jelly',\n 'jewelry',\n // 'joy',\n 'judo',\n // 'juice',\n // 'justice',\n\n 'karate',\n // 'kindness',\n 'knowledge',\n\n // 'labour',\n 'lack',\n // 'land',\n 'laughter',\n 'lava',\n 'leather',\n 'leisure',\n 'lightning',\n 'linguine',\n 'linguini',\n 'linguistics',\n 'literature',\n 'litter',\n 'livestock',\n 'logic',\n 'loneliness',\n // 'love',\n 'luck',\n 'luggage',\n\n 'macaroni',\n 'machinery',\n 'magic',\n // 'mail',\n 'management',\n 'mankind',\n 'marble',\n 'mathematics',\n 'mayonnaise',\n 'measles',\n // 'meat',\n // 'metal',\n 'methane',\n 'milk',\n 'minus',\n 'money',\n // 'moose',\n 'mud',\n 'music',\n 'mumps',\n\n 'nature',\n 'news',\n 'nitrogen',\n 'nonsense',\n 'nurture',\n 'nutrition',\n\n 'obedience',\n 'obesity',\n // 'oil',\n 'oxygen',\n\n // 'paper',\n // 'passion',\n 'pasta',\n 'patience',\n // 'permission',\n 'physics',\n 'poetry',\n 'pollution',\n 'poverty',\n // 'power',\n 'pride',\n // 'production',\n // 'progress',\n // 'pronunciation',\n 'psychology',\n 'publicity',\n 'punctuation',\n\n // 'quality',\n // 'quantity',\n 'quartz',\n\n 'racism',\n // 'rain',\n // 'recreation',\n 'relaxation',\n 'reliability',\n 'research',\n 'respect',\n 'revenge',\n 'rice',\n 'rubbish',\n 'rum',\n\n 'safety',\n // 'salad',\n // 'salt',\n // 'sand',\n // 'satire',\n 'scenery',\n 'seafood',\n 'seaside',\n 'series',\n 'shame',\n 'sheep',\n 'shopping',\n // 'silence',\n 'sleep',\n // 'slang'\n 'smoke',\n 'smoking',\n 'snow',\n 'soap',\n 'software',\n 'soil',\n // 'sorrow',\n // 'soup',\n 'spaghetti',\n // 'speed',\n 'species',\n // 'spelling',\n // 'sport',\n 'steam',\n // 'strength',\n 'stuff',\n 'stupidity',\n // 'success',\n // 'sugar',\n 'sunshine',\n 'symmetry',\n\n // 'tea',\n 'tennis',\n 'thirst',\n 'thunder',\n 'timber',\n // 'time',\n // 'toast',\n // 'tolerance',\n // 'trade',\n 'traffic',\n 'transportation',\n // 'travel',\n 'trust',\n\n // 'understanding',\n 'underwear',\n 'unemployment',\n 'unity',\n // 'usage',\n\n 'validity',\n 'veal',\n 'vegetation',\n 'vegetarianism',\n 'vengeance',\n 'violence',\n // 'vision',\n 'vitality',\n\n 'warmth',\n // 'water',\n 'wealth',\n 'weather',\n // 'weight',\n 'welfare',\n 'wheat',\n // 'whiskey',\n // 'width',\n 'wildlife',\n // 'wine',\n 'wisdom',\n // 'wood',\n // 'wool',\n // 'work',\n\n // 'yeast',\n 'yoga',\n\n 'zinc',\n 'zoology'\n ];\n\n /**\n * @description These rules translate from the singular form of a noun to its plural form.\n * @private\n */\n\n var regex = {\n plural : {\n men : new RegExp( '^(m|wom)en$' , 'gi' ),\n people : new RegExp( '(pe)ople$' , 'gi' ),\n children : new RegExp( '(child)ren$' , 'gi' ),\n tia : new RegExp( '([ti])a$' , 'gi' ),\n analyses : new RegExp( '((a)naly|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)ses$','gi' ),\n hives : new RegExp( '(hi|ti)ves$' , 'gi' ),\n curves : new RegExp( '(curve)s$' , 'gi' ),\n lrves : new RegExp( '([lr])ves$' , 'gi' ),\n aves : new RegExp( '([a])ves$' , 'gi' ),\n foves : new RegExp( '([^fo])ves$' , 'gi' ),\n movies : new RegExp( '(m)ovies$' , 'gi' ),\n aeiouyies : new RegExp( '([^aeiouy]|qu)ies$' , 'gi' ),\n series : new RegExp( '(s)eries$' , 'gi' ),\n xes : new RegExp( '(x|ch|ss|sh)es$' , 'gi' ),\n mice : new RegExp( '([m|l])ice$' , 'gi' ),\n buses : new RegExp( '(bus)es$' , 'gi' ),\n oes : new RegExp( '(o)es$' , 'gi' ),\n shoes : new RegExp( '(shoe)s$' , 'gi' ),\n crises : new RegExp( '(cris|ax|test)es$' , 'gi' ),\n octopi : new RegExp( '(octop|vir)i$' , 'gi' ),\n aliases : new RegExp( '(alias|canvas|status|campus)es$', 'gi' ),\n summonses : new RegExp( '^(summons)es$' , 'gi' ),\n oxen : new RegExp( '^(ox)en' , 'gi' ),\n matrices : new RegExp( '(matr)ices$' , 'gi' ),\n vertices : new RegExp( '(vert|ind)ices$' , 'gi' ),\n feet : new RegExp( '^feet$' , 'gi' ),\n teeth : new RegExp( '^teeth$' , 'gi' ),\n geese : new RegExp( '^geese$' , 'gi' ),\n quizzes : new RegExp( '(quiz)zes$' , 'gi' ),\n whereases : new RegExp( '^(whereas)es$' , 'gi' ),\n criteria : new RegExp( '^(criteri)a$' , 'gi' ),\n genera : new RegExp( '^genera$' , 'gi' ),\n ss : new RegExp( 'ss$' , 'gi' ),\n s : new RegExp( 's$' , 'gi' )\n },\n\n singular : {\n man : new RegExp( '^(m|wom)an$' , 'gi' ),\n person : new RegExp( '(pe)rson$' , 'gi' ),\n child : new RegExp( '(child)$' , 'gi' ),\n ox : new RegExp( '^(ox)$' , 'gi' ),\n axis : new RegExp( '(ax|test)is$' , 'gi' ),\n octopus : new RegExp( '(octop|vir)us$' , 'gi' ),\n alias : new RegExp( '(alias|status|canvas|campus)$', 'gi' ),\n summons : new RegExp( '^(summons)$' , 'gi' ),\n bus : new RegExp( '(bu)s$' , 'gi' ),\n buffalo : new RegExp( '(buffal|tomat|potat)o$' , 'gi' ),\n tium : new RegExp( '([ti])um$' , 'gi' ),\n sis : new RegExp( 'sis$' , 'gi' ),\n ffe : new RegExp( '(?:([^f])fe|([lr])f)$' , 'gi' ),\n hive : new RegExp( '(hi|ti)ve$' , 'gi' ),\n aeiouyy : new RegExp( '([^aeiouy]|qu)y$' , 'gi' ),\n x : new RegExp( '(x|ch|ss|sh)$' , 'gi' ),\n matrix : new RegExp( '(matr)ix$' , 'gi' ),\n vertex : new RegExp( '(vert|ind)ex$' , 'gi' ),\n mouse : new RegExp( '([m|l])ouse$' , 'gi' ),\n foot : new RegExp( '^foot$' , 'gi' ),\n tooth : new RegExp( '^tooth$' , 'gi' ),\n goose : new RegExp( '^goose$' , 'gi' ),\n quiz : new RegExp( '(quiz)$' , 'gi' ),\n whereas : new RegExp( '^(whereas)$' , 'gi' ),\n criterion : new RegExp( '^(criteri)on$' , 'gi' ),\n genus : new RegExp( '^genus$' , 'gi' ),\n s : new RegExp( 's$' , 'gi' ),\n common : new RegExp( '$' , 'gi' )\n }\n };\n\n var plural_rules = [\n\n // do not replace if its already a plural word\n [ regex.plural.men ],\n [ regex.plural.people ],\n [ regex.plural.children ],\n [ regex.plural.tia ],\n [ regex.plural.analyses ],\n [ regex.plural.hives ],\n [ regex.plural.curves ],\n [ regex.plural.lrves ],\n [ regex.plural.foves ],\n [ regex.plural.aeiouyies ],\n [ regex.plural.series ],\n [ regex.plural.movies ],\n [ regex.plural.xes ],\n [ regex.plural.mice ],\n [ regex.plural.buses ],\n [ regex.plural.oes ],\n [ regex.plural.shoes ],\n [ regex.plural.crises ],\n [ regex.plural.octopi ],\n [ regex.plural.aliases ],\n [ regex.plural.summonses ],\n [ regex.plural.oxen ],\n [ regex.plural.matrices ],\n [ regex.plural.feet ],\n [ regex.plural.teeth ],\n [ regex.plural.geese ],\n [ regex.plural.quizzes ],\n [ regex.plural.whereases ],\n [ regex.plural.criteria ],\n [ regex.plural.genera ],\n\n // original rule\n [ regex.singular.man , '$1en' ],\n [ regex.singular.person , '$1ople' ],\n [ regex.singular.child , '$1ren' ],\n [ regex.singular.ox , '$1en' ],\n [ regex.singular.axis , '$1es' ],\n [ regex.singular.octopus , '$1i' ],\n [ regex.singular.alias , '$1es' ],\n [ regex.singular.summons , '$1es' ],\n [ regex.singular.bus , '$1ses' ],\n [ regex.singular.buffalo , '$1oes' ],\n [ regex.singular.tium , '$1a' ],\n [ regex.singular.sis , 'ses' ],\n [ regex.singular.ffe , '$1$2ves' ],\n [ regex.singular.hive , '$1ves' ],\n [ regex.singular.aeiouyy , '$1ies' ],\n [ regex.singular.matrix , '$1ices' ],\n [ regex.singular.vertex , '$1ices' ],\n [ regex.singular.x , '$1es' ],\n [ regex.singular.mouse , '$1ice' ],\n [ regex.singular.foot , 'feet' ],\n [ regex.singular.tooth , 'teeth' ],\n [ regex.singular.goose , 'geese' ],\n [ regex.singular.quiz , '$1zes' ],\n [ regex.singular.whereas , '$1es' ],\n [ regex.singular.criterion, '$1a' ],\n [ regex.singular.genus , 'genera' ],\n\n [ regex.singular.s , 's' ],\n [ regex.singular.common, 's' ]\n ];\n\n /**\n * @description These rules translate from the plural form of a noun to its singular form.\n * @private\n */\n var singular_rules = [\n\n // do not replace if its already a singular word\n [ regex.singular.man ],\n [ regex.singular.person ],\n [ regex.singular.child ],\n [ regex.singular.ox ],\n [ regex.singular.axis ],\n [ regex.singular.octopus ],\n [ regex.singular.alias ],\n [ regex.singular.summons ],\n [ regex.singular.bus ],\n [ regex.singular.buffalo ],\n [ regex.singular.tium ],\n [ regex.singular.sis ],\n [ regex.singular.ffe ],\n [ regex.singular.hive ],\n [ regex.singular.aeiouyy ],\n [ regex.singular.x ],\n [ regex.singular.matrix ],\n [ regex.singular.mouse ],\n [ regex.singular.foot ],\n [ regex.singular.tooth ],\n [ regex.singular.goose ],\n [ regex.singular.quiz ],\n [ regex.singular.whereas ],\n [ regex.singular.criterion ],\n [ regex.singular.genus ],\n\n // original rule\n [ regex.plural.men , '$1an' ],\n [ regex.plural.people , '$1rson' ],\n [ regex.plural.children , '$1' ],\n [ regex.plural.genera , 'genus'],\n [ regex.plural.criteria , '$1on'],\n [ regex.plural.tia , '$1um' ],\n [ regex.plural.analyses , '$1$2sis' ],\n [ regex.plural.hives , '$1ve' ],\n [ regex.plural.curves , '$1' ],\n [ regex.plural.lrves , '$1f' ],\n [ regex.plural.aves , '$1ve' ],\n [ regex.plural.foves , '$1fe' ],\n [ regex.plural.movies , '$1ovie' ],\n [ regex.plural.aeiouyies, '$1y' ],\n [ regex.plural.series , '$1eries' ],\n [ regex.plural.xes , '$1' ],\n [ regex.plural.mice , '$1ouse' ],\n [ regex.plural.buses , '$1' ],\n [ regex.plural.oes , '$1' ],\n [ regex.plural.shoes , '$1' ],\n [ regex.plural.crises , '$1is' ],\n [ regex.plural.octopi , '$1us' ],\n [ regex.plural.aliases , '$1' ],\n [ regex.plural.summonses, '$1' ],\n [ regex.plural.oxen , '$1' ],\n [ regex.plural.matrices , '$1ix' ],\n [ regex.plural.vertices , '$1ex' ],\n [ regex.plural.feet , 'foot' ],\n [ regex.plural.teeth , 'tooth' ],\n [ regex.plural.geese , 'goose' ],\n [ regex.plural.quizzes , '$1' ],\n [ regex.plural.whereases, '$1' ],\n\n [ regex.plural.ss, 'ss' ],\n [ regex.plural.s , '' ]\n ];\n\n /**\n * @description This is a list of words that should not be capitalized for title case.\n * @private\n */\n var non_titlecased_words = [\n 'and', 'or', 'nor', 'a', 'an', 'the', 'so', 'but', 'to', 'of', 'at','by',\n 'from', 'into', 'on', 'onto', 'off', 'out', 'in', 'over', 'with', 'for'\n ];\n\n /**\n * @description These are regular expressions used for converting between String formats.\n * @private\n */\n var id_suffix = new RegExp( '(_ids|_id)$', 'g' );\n var underbar = new RegExp( '_', 'g' );\n var space_or_underbar = new RegExp( '[\\ _]', 'g' );\n var uppercase = new RegExp( '([A-Z])', 'g' );\n var underbar_prefix = new RegExp( '^_' );\n\n var inflector = {\n\n /**\n * A helper method that applies rules based replacement to a String.\n * @private\n * @function\n * @param {String} str String to modify and return based on the passed rules.\n * @param {Array: [RegExp, String]} rules Regexp to match paired with String to use for replacement\n * @param {Array: [String]} skip Strings to skip if they match\n * @param {String} override String to return as though this method succeeded (used to conform to APIs)\n * @returns {String} Return passed String modified by passed rules.\n * @example\n *\n * this._apply_rules( 'cows', singular_rules ); // === 'cow'\n */\n _apply_rules : function ( str, rules, skip, override ){\n if( override ){\n str = override;\n }else{\n var ignore = ( inflector.indexOf( skip, str.toLowerCase()) > -1 );\n\n if( !ignore ){\n var i = 0;\n var j = rules.length;\n\n for( ; i < j; i++ ){\n if( str.match( rules[ i ][ 0 ])){\n if( rules[ i ][ 1 ] !== undefined ){\n str = str.replace( rules[ i ][ 0 ], rules[ i ][ 1 ]);\n }\n break;\n }\n }\n }\n }\n\n return str;\n },\n\n\n\n /**\n * This lets us detect if an Array contains a given element.\n * @public\n * @function\n * @param {Array} arr The subject array.\n * @param {Object} item Object to locate in the Array.\n * @param {Number} from_index Starts checking from this position in the Array.(optional)\n * @param {Function} compare_func Function used to compare Array item vs passed item.(optional)\n * @returns {Number} Return index position in the Array of the passed item.\n * @example\n *\n * var inflection = require( 'inflection' );\n *\n * inflection.indexOf([ 'hi','there' ], 'guys' ); // === -1\n * inflection.indexOf([ 'hi','there' ], 'hi' ); // === 0\n */\n indexOf : function ( arr, item, from_index, compare_func ){\n if( !from_index ){\n from_index = -1;\n }\n\n var index = -1;\n var i = from_index;\n var j = arr.length;\n\n for( ; i < j; i++ ){\n if( arr[ i ] === item || compare_func && compare_func( arr[ i ], item )){\n index = i;\n break;\n }\n }\n\n return index;\n },\n\n\n\n /**\n * This function adds pluralization support to every String object.\n * @public\n * @function\n * @param {String} str The subject string.\n * @param {String} plural Overrides normal output with said String.(optional)\n * @returns {String} Singular English language nouns are returned in plural form.\n * @example\n *\n * var inflection = require( 'inflection' );\n *\n * inflection.pluralize( 'person' ); // === 'people'\n * inflection.pluralize( 'octopus' ); // === 'octopi'\n * inflection.pluralize( 'Hat' ); // === 'Hats'\n * inflection.pluralize( 'person', 'guys' ); // === 'guys'\n */\n pluralize : function ( str, plural ){\n return inflector._apply_rules( str, plural_rules, uncountable_words, plural );\n },\n\n\n\n /**\n * This function adds singularization support to every String object.\n * @public\n * @function\n * @param {String} str The subject string.\n * @param {String} singular Overrides normal output with said String.(optional)\n * @returns {String} Plural English language nouns are returned in singular form.\n * @example\n *\n * var inflection = require( 'inflection' );\n *\n * inflection.singularize( 'people' ); // === 'person'\n * inflection.singularize( 'octopi' ); // === 'octopus'\n * inflection.singularize( 'Hats' ); // === 'Hat'\n * inflection.singularize( 'guys', 'person' ); // === 'person'\n */\n singularize : function ( str, singular ){\n return inflector._apply_rules( str, singular_rules, uncountable_words, singular );\n },\n\n\n /**\n * This function will pluralize or singularlize a String appropriately based on an integer value\n * @public\n * @function\n * @param {String} str The subject string.\n * @param {Number} count The number to base pluralization off of.\n * @param {String} singular Overrides normal output with said String.(optional)\n * @param {String} plural Overrides normal output with said String.(optional)\n * @returns {String} English language nouns are returned in the plural or singular form based on the count.\n * @example\n *\n * var inflection = require( 'inflection' );\n *\n * inflection.inflect( 'people' 1 ); // === 'person'\n * inflection.inflect( 'octopi' 1 ); // === 'octopus'\n * inflection.inflect( 'Hats' 1 ); // === 'Hat'\n * inflection.inflect( 'guys', 1 , 'person' ); // === 'person'\n * inflection.inflect( 'person', 2 ); // === 'people'\n * inflection.inflect( 'octopus', 2 ); // === 'octopi'\n * inflection.inflect( 'Hat', 2 ); // === 'Hats'\n * inflection.inflect( 'person', 2, null, 'guys' ); // === 'guys'\n */\n inflect : function ( str, count, singular, plural ){\n count = parseInt( count, 10 );\n\n if( isNaN( count )) return str;\n\n if( count === 0 || count > 1 ){\n return inflector._apply_rules( str, plural_rules, uncountable_words, plural );\n }else{\n return inflector._apply_rules( str, singular_rules, uncountable_words, singular );\n }\n },\n\n\n\n /**\n * This function adds camelization support to every String object.\n * @public\n * @function\n * @param {String} str The subject string.\n * @param {Boolean} low_first_letter Default is to capitalize the first letter of the results.(optional)\n * Passing true will lowercase it.\n * @returns {String} Lower case underscored words will be returned in camel case.\n * additionally '/' is translated to '::'\n * @example\n *\n * var inflection = require( 'inflection' );\n *\n * inflection.camelize( 'message_properties' ); // === 'MessageProperties'\n * inflection.camelize( 'message_properties', true ); // === 'messageProperties'\n */\n camelize : function ( str, low_first_letter ){\n var str_path = str.split( '/' );\n var i = 0;\n var j = str_path.length;\n var str_arr, init_x, k, l, first;\n\n for( ; i < j; i++ ){\n str_arr = str_path[ i ].split( '_' );\n k = 0;\n l = str_arr.length;\n\n for( ; k < l; k++ ){\n if( k !== 0 ){\n str_arr[ k ] = str_arr[ k ].toLowerCase();\n }\n\n first = str_arr[ k ].charAt( 0 );\n first = low_first_letter && i === 0 && k === 0\n ? first.toLowerCase() : first.toUpperCase();\n str_arr[ k ] = first + str_arr[ k ].substring( 1 );\n }\n\n str_path[ i ] = str_arr.join( '' );\n }\n\n return str_path.join( '::' );\n },\n\n\n\n /**\n * This function adds underscore support to every String object.\n * @public\n * @function\n * @param {String} str The subject string.\n * @param {Boolean} all_upper_case Default is to lowercase and add underscore prefix.(optional)\n * Passing true will return as entered.\n * @returns {String} Camel cased words are returned as lower cased and underscored.\n * additionally '::' is translated to '/'.\n * @example\n *\n * var inflection = require( 'inflection' );\n *\n * inflection.underscore( 'MessageProperties' ); // === 'message_properties'\n * inflection.underscore( 'messageProperties' ); // === 'message_properties'\n * inflection.underscore( 'MP', true ); // === 'MP'\n */\n underscore : function ( str, all_upper_case ){\n if( all_upper_case && str === str.toUpperCase()) return str;\n\n var str_path = str.split( '::' );\n var i = 0;\n var j = str_path.length;\n\n for( ; i < j; i++ ){\n str_path[ i ] = str_path[ i ].replace( uppercase, '_$1' );\n str_path[ i ] = str_path[ i ].replace( underbar_prefix, '' );\n }\n\n return str_path.join( '/' ).toLowerCase();\n },\n\n\n\n /**\n * This function adds humanize support to every String object.\n * @public\n * @function\n * @param {String} str The subject string.\n * @param {Boolean} low_first_letter Default is to capitalize the first letter of the results.(optional)\n * Passing true will lowercase it.\n * @returns {String} Lower case underscored words will be returned in humanized form.\n * @example\n *\n * var inflection = require( 'inflection' );\n *\n * inflection.humanize( 'message_properties' ); // === 'Message properties'\n * inflection.humanize( 'message_properties', true ); // === 'message properties'\n */\n humanize : function ( str, low_first_letter ){\n str = str.toLowerCase();\n str = str.replace( id_suffix, '' );\n str = str.replace( underbar, ' ' );\n\n if( !low_first_letter ){\n str = inflector.capitalize( str );\n }\n\n return str;\n },\n\n\n\n /**\n * This function adds capitalization support to every String object.\n * @public\n * @function\n * @param {String} str The subject string.\n * @returns {String} All characters will be lower case and the first will be upper.\n * @example\n *\n * var inflection = require( 'inflection' );\n *\n * inflection.capitalize( 'message_properties' ); // === 'Message_properties'\n * inflection.capitalize( 'message properties', true ); // === 'Message properties'\n */\n capitalize : function ( str ){\n str = str.toLowerCase();\n\n return str.substring( 0, 1 ).toUpperCase() + str.substring( 1 );\n },\n\n\n\n /**\n * This function replaces underscores with dashes in the string.\n * @public\n * @function\n * @param {String} str The subject string.\n * @returns {String} Replaces all spaces or underscores with dashes.\n * @example\n *\n * var inflection = require( 'inflection' );\n *\n * inflection.dasherize( 'message_properties' ); // === 'message-properties'\n * inflection.dasherize( 'Message Properties' ); // === 'Message-Properties'\n */\n dasherize : function ( str ){\n return str.replace( space_or_underbar, '-' );\n },\n\n\n\n /**\n * This function adds titleize support to every String object.\n * @public\n * @function\n * @param {String} str The subject string.\n * @returns {String} Capitalizes words as you would for a book title.\n * @example\n *\n * var inflection = require( 'inflection' );\n *\n * inflection.titleize( 'message_properties' ); // === 'Message Properties'\n * inflection.titleize( 'message properties to keep' ); // === 'Message Properties to Keep'\n */\n titleize : function ( str ){\n str = str.toLowerCase().replace( underbar, ' ' );\n var str_arr = str.split( ' ' );\n var i = 0;\n var j = str_arr.length;\n var d, k, l;\n\n for( ; i < j; i++ ){\n d = str_arr[ i ].split( '-' );\n k = 0;\n l = d.length;\n\n for( ; k < l; k++){\n if( inflector.indexOf( non_titlecased_words, d[ k ].toLowerCase()) < 0 ){\n d[ k ] = inflector.capitalize( d[ k ]);\n }\n }\n\n str_arr[ i ] = d.join( '-' );\n }\n\n str = str_arr.join( ' ' );\n str = str.substring( 0, 1 ).toUpperCase() + str.substring( 1 );\n\n return str;\n },\n\n\n\n /**\n * This function adds demodulize support to every String object.\n * @public\n * @function\n * @param {String} str The subject string.\n * @returns {String} Removes module names leaving only class names.(Ruby style)\n * @example\n *\n * var inflection = require( 'inflection' );\n *\n * inflection.demodulize( 'Message::Bus::Properties' ); // === 'Properties'\n */\n demodulize : function ( str ){\n var str_arr = str.split( '::' );\n\n return str_arr[ str_arr.length - 1 ];\n },\n\n\n\n /**\n * This function adds tableize support to every String object.\n * @public\n * @function\n * @param {String} str The subject string.\n * @returns {String} Return camel cased words into their underscored plural form.\n * @example\n *\n * var inflection = require( 'inflection' );\n *\n * inflection.tableize( 'MessageBusProperty' ); // === 'message_bus_properties'\n */\n tableize : function ( str ){\n str = inflector.underscore( str );\n str = inflector.pluralize( str );\n\n return str;\n },\n\n\n\n /**\n * This function adds classification support to every String object.\n * @public\n * @function\n * @param {String} str The subject string.\n * @returns {String} Underscored plural nouns become the camel cased singular form.\n * @example\n *\n * var inflection = require( 'inflection' );\n *\n * inflection.classify( 'message_bus_properties' ); // === 'MessageBusProperty'\n */\n classify : function ( str ){\n str = inflector.camelize( str );\n str = inflector.singularize( str );\n\n return str;\n },\n\n\n\n /**\n * This function adds foreign key support to every String object.\n * @public\n * @function\n * @param {String} str The subject string.\n * @param {Boolean} drop_id_ubar Default is to seperate id with an underbar at the end of the class name,\n you can pass true to skip it.(optional)\n * @returns {String} Underscored plural nouns become the camel cased singular form.\n * @example\n *\n * var inflection = require( 'inflection' );\n *\n * inflection.foreign_key( 'MessageBusProperty' ); // === 'message_bus_property_id'\n * inflection.foreign_key( 'MessageBusProperty', true ); // === 'message_bus_propertyid'\n */\n foreign_key : function ( str, drop_id_ubar ){\n str = inflector.demodulize( str );\n str = inflector.underscore( str ) + (( drop_id_ubar ) ? ( '' ) : ( '_' )) + 'id';\n\n return str;\n },\n\n\n\n /**\n * This function adds ordinalize support to every String object.\n * @public\n * @function\n * @param {String} str The subject string.\n * @returns {String} Return all found numbers their sequence like '22nd'.\n * @example\n *\n * var inflection = require( 'inflection' );\n *\n * inflection.ordinalize( 'the 1 pitch' ); // === 'the 1st pitch'\n */\n ordinalize : function ( str ){\n var str_arr = str.split( ' ' );\n var i = 0;\n var j = str_arr.length;\n\n for( ; i < j; i++ ){\n var k = parseInt( str_arr[ i ], 10 );\n\n if( !isNaN( k )){\n var ltd = str_arr[ i ].substring( str_arr[ i ].length - 2 );\n var ld = str_arr[ i ].substring( str_arr[ i ].length - 1 );\n var suf = 'th';\n\n if( ltd != '11' && ltd != '12' && ltd != '13' ){\n if( ld === '1' ){\n suf = 'st';\n }else if( ld === '2' ){\n suf = 'nd';\n }else if( ld === '3' ){\n suf = 'rd';\n }\n }\n\n str_arr[ i ] += suf;\n }\n }\n\n return str_arr.join( ' ' );\n },\n\n /**\n * This function performs multiple inflection methods on a string\n * @public\n * @function\n * @param {String} str The subject string.\n * @param {Array} arr An array of inflection methods.\n * @returns {String}\n * @example\n *\n * var inflection = require( 'inflection' );\n *\n * inflection.transform( 'all job', [ 'pluralize', 'capitalize', 'dasherize' ]); // === 'All-jobs'\n */\n transform : function ( str, arr ){\n var i = 0;\n var j = arr.length;\n\n for( ;i < j; i++ ){\n var method = arr[ i ];\n\n if( inflector.hasOwnProperty( method )){\n str = inflector[ method ]( str );\n }\n }\n\n return str;\n }\n };\n\n/**\n * @public\n */\n inflector.version = '1.12.0';\n\n return inflector;\n}));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/inflection/lib/inflection.js\n// module id = 218\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/inflection/lib/inflection.js?", + ); + + /***/ + }, + /* 219 */ + /* unknown exports provided */ + /* exports used: default */ + /*!****************************!*\ + !*** ./~/keycode/index.js ***! + \****************************/ + /***/ function (module, exports) { + eval( + "// Source: http://jsfiddle.net/vWx8V/\n// http://stackoverflow.com/questions/5603195/full-list-of-javascript-keycodes\n\n/**\n * Conenience method returns corresponding value for given keyName or keyCode.\n *\n * @param {Mixed} keyCode {Number} or keyName {String}\n * @return {Mixed}\n * @api public\n */\n\nexports = module.exports = function(searchInput) {\n // Keyboard Events\n if (searchInput && 'object' === typeof searchInput) {\n var hasKeyCode = searchInput.which || searchInput.keyCode || searchInput.charCode\n if (hasKeyCode) searchInput = hasKeyCode\n }\n\n // Numbers\n if ('number' === typeof searchInput) return names[searchInput]\n\n // Everything else (cast to string)\n var search = String(searchInput)\n\n // check codes\n var foundNamedKey = codes[search.toLowerCase()]\n if (foundNamedKey) return foundNamedKey\n\n // check aliases\n var foundNamedKey = aliases[search.toLowerCase()]\n if (foundNamedKey) return foundNamedKey\n\n // weird character?\n if (search.length === 1) return search.charCodeAt(0)\n\n return undefined\n}\n\n/**\n * Get by name\n *\n * exports.code['enter'] // => 13\n */\n\nvar codes = exports.code = exports.codes = {\n 'backspace': 8,\n 'tab': 9,\n 'enter': 13,\n 'shift': 16,\n 'ctrl': 17,\n 'alt': 18,\n 'pause/break': 19,\n 'caps lock': 20,\n 'esc': 27,\n 'space': 32,\n 'page up': 33,\n 'page down': 34,\n 'end': 35,\n 'home': 36,\n 'left': 37,\n 'up': 38,\n 'right': 39,\n 'down': 40,\n 'insert': 45,\n 'delete': 46,\n 'command': 91,\n 'left command': 91,\n 'right command': 93,\n 'numpad *': 106,\n 'numpad +': 107,\n 'numpad -': 109,\n 'numpad .': 110,\n 'numpad /': 111,\n 'num lock': 144,\n 'scroll lock': 145,\n 'my computer': 182,\n 'my calculator': 183,\n ';': 186,\n '=': 187,\n ',': 188,\n '-': 189,\n '.': 190,\n '/': 191,\n '`': 192,\n '[': 219,\n '\\\\': 220,\n ']': 221,\n \"'\": 222\n}\n\n// Helper aliases\n\nvar aliases = exports.aliases = {\n 'windows': 91,\n '⇧': 16,\n '⌥': 18,\n '⌃': 17,\n '⌘': 91,\n 'ctl': 17,\n 'control': 17,\n 'option': 18,\n 'pause': 19,\n 'break': 19,\n 'caps': 20,\n 'return': 13,\n 'escape': 27,\n 'spc': 32,\n 'pgup': 33,\n 'pgdn': 34,\n 'ins': 45,\n 'del': 46,\n 'cmd': 91\n}\n\n\n/*!\n * Programatically add the following\n */\n\n// lower case chars\nfor (i = 97; i < 123; i++) codes[String.fromCharCode(i)] = i - 32\n\n// numbers\nfor (var i = 48; i < 58; i++) codes[i - 48] = i\n\n// function keys\nfor (i = 1; i < 13; i++) codes['f'+i] = i + 111\n\n// numpad keys\nfor (i = 0; i < 10; i++) codes['numpad '+i] = i + 96\n\n/**\n * Get by code\n *\n * exports.name[13] // => 'Enter'\n */\n\nvar names = exports.names = exports.title = {} // title for backward compat\n\n// Create reverse mapping\nfor (i in codes) names[codes[i]] = i\n\n// Add aliases\nfor (var alias in aliases) {\n codes[alias] = aliases[alias]\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/keycode/index.js\n// module id = 219\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/keycode/index.js?", + ); + + /***/ + }, + /* 220 */ + /* exports provided: default */ + /* exports used: default */ + /*!**************************************!*\ + !*** ./~/lodash-es/isPlainObject.js ***! + \**************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getPrototype_js__ = __webpack_require__(/*! ./_getPrototype.js */ 1152);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__ = __webpack_require__(/*! ./isObjectLike.js */ 1154);\n\n\n\n/** `Object#toString` result references. */\nvar objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to infer the `Object` constructor. */\nvar objectCtorString = funcToString.call(Object);\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n if (!__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__[\"a\" /* default */])(value) || objectToString.call(value) != objectTag) {\n return false;\n }\n var proto = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__getPrototype_js__[\"a\" /* default */])(value);\n if (proto === null) {\n return true;\n }\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return (typeof Ctor == 'function' &&\n Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString);\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (isPlainObject);\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash-es/isPlainObject.js\n// module id = 220\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/lodash-es/isPlainObject.js?", + ); + + /***/ + }, + /* 221 */ + /* unknown exports provided */ + /* all exports used */ + /*!**********************************!*\ + !*** ./~/lodash/_LazyWrapper.js ***! + \**********************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + 'var baseCreate = __webpack_require__(/*! ./_baseCreate */ 224),\n baseLodash = __webpack_require__(/*! ./_baseLodash */ 226);\n\n/** Used as references for the maximum length and index of an array. */\nvar MAX_ARRAY_LENGTH = 4294967295;\n\n/**\n * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.\n *\n * @private\n * @constructor\n * @param {*} value The value to wrap.\n */\nfunction LazyWrapper(value) {\n this.__wrapped__ = value;\n this.__actions__ = [];\n this.__dir__ = 1;\n this.__filtered__ = false;\n this.__iteratees__ = [];\n this.__takeCount__ = MAX_ARRAY_LENGTH;\n this.__views__ = [];\n}\n\n// Ensure `LazyWrapper` is an instance of `baseLodash`.\nLazyWrapper.prototype = baseCreate(baseLodash.prototype);\nLazyWrapper.prototype.constructor = LazyWrapper;\n\nmodule.exports = LazyWrapper;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/_LazyWrapper.js\n// module id = 221\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/lodash/_LazyWrapper.js?', + ); + + /***/ + }, + /* 222 */ + /* unknown exports provided */ + /* all exports used */ + /*!*****************************!*\ + !*** ./~/lodash/_Symbol.js ***! + \*****************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + 'var root = __webpack_require__(/*! ./_root */ 77);\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/_Symbol.js\n// module id = 222\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/lodash/_Symbol.js?', + ); + + /***/ + }, + /* 223 */ + /* unknown exports provided */ + /* all exports used */ + /*!****************************!*\ + !*** ./~/lodash/_apply.js ***! + \****************************/ + /***/ function (module, exports) { + eval( + '/**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\nfunction apply(func, thisArg, args) {\n switch (args.length) {\n case 0: return func.call(thisArg);\n case 1: return func.call(thisArg, args[0]);\n case 2: return func.call(thisArg, args[0], args[1]);\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\n }\n return func.apply(thisArg, args);\n}\n\nmodule.exports = apply;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/_apply.js\n// module id = 223\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/lodash/_apply.js?', + ); + + /***/ + }, + /* 224 */ + /* unknown exports provided */ + /* all exports used */ + /*!*********************************!*\ + !*** ./~/lodash/_baseCreate.js ***! + \*********************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + 'var isObject = __webpack_require__(/*! ./isObject */ 116);\n\n/** Built-in value references. */\nvar objectCreate = Object.create;\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n}());\n\nmodule.exports = baseCreate;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/_baseCreate.js\n// module id = 224\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/lodash/_baseCreate.js?', + ); + + /***/ + }, + /* 225 */ + /* unknown exports provided */ + /* all exports used */ + /*!*********************************!*\ + !*** ./~/lodash/_baseGetTag.js ***! + \*********************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "var Symbol = __webpack_require__(/*! ./_Symbol */ 222),\n getRawTag = __webpack_require__(/*! ./_getRawTag */ 1176),\n objectToString = __webpack_require__(/*! ./_objectToString */ 1185);\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/_baseGetTag.js\n// module id = 225\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/lodash/_baseGetTag.js?", + ); + + /***/ + }, + /* 226 */ + /* unknown exports provided */ + /* all exports used */ + /*!*********************************!*\ + !*** ./~/lodash/_baseLodash.js ***! + \*********************************/ + /***/ function (module, exports) { + eval( + '/**\n * The function whose prototype chain sequence wrappers inherit from.\n *\n * @private\n */\nfunction baseLodash() {\n // No operation performed.\n}\n\nmodule.exports = baseLodash;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/_baseLodash.js\n// module id = 226\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/lodash/_baseLodash.js?', + ); + + /***/ + }, + /* 227 */ + /* unknown exports provided */ + /* all exports used */ + /*!********************************!*\ + !*** ./~/lodash/_getHolder.js ***! + \********************************/ + /***/ function (module, exports) { + eval( + '/**\n * Gets the argument placeholder value for `func`.\n *\n * @private\n * @param {Function} func The function to inspect.\n * @returns {*} Returns the placeholder value.\n */\nfunction getHolder(func) {\n var object = func;\n return object.placeholder;\n}\n\nmodule.exports = getHolder;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/_getHolder.js\n// module id = 227\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/lodash/_getHolder.js?', + ); + + /***/ + }, + /* 228 */ + /* unknown exports provided */ + /* all exports used */ + /*!**********************************!*\ + !*** ./~/lodash/_setToString.js ***! + \**********************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + 'var baseSetToString = __webpack_require__(/*! ./_baseSetToString */ 1166),\n shortOut = __webpack_require__(/*! ./_shortOut */ 368);\n\n/**\n * Sets the `toString` method of `func` to return `string`.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar setToString = shortOut(baseSetToString);\n\nmodule.exports = setToString;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/_setToString.js\n// module id = 228\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/lodash/_setToString.js?', + ); + + /***/ + }, + /* 229 */ + /* unknown exports provided */ + /* all exports used */ + /*!******************************!*\ + !*** ./~/lodash/identity.js ***! + \******************************/ + /***/ function (module, exports) { + eval( + "/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\nmodule.exports = identity;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/identity.js\n// module id = 229\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/lodash/identity.js?", + ); + + /***/ + }, + /* 230 */ + /* unknown exports provided */ + /* exports used: schema, normalize */ + /*!***************************************!*\ + !*** ./~/normalizr/dist/src/index.js ***! + \***************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.denormalize = exports.normalize = exports.schema = undefined;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _Entity = __webpack_require__(/*! ./schemas/Entity */ 1212);\n\nvar _Entity2 = _interopRequireDefault(_Entity);\n\nvar _Union = __webpack_require__(/*! ./schemas/Union */ 1214);\n\nvar _Union2 = _interopRequireDefault(_Union);\n\nvar _Values = __webpack_require__(/*! ./schemas/Values */ 1215);\n\nvar _Values2 = _interopRequireDefault(_Values);\n\nvar _Array = __webpack_require__(/*! ./schemas/Array */ 1211);\n\nvar ArrayUtils = _interopRequireWildcard(_Array);\n\nvar _Object = __webpack_require__(/*! ./schemas/Object */ 1213);\n\nvar ObjectUtils = _interopRequireWildcard(_Object);\n\nvar _ImmutableUtils = __webpack_require__(/*! ./schemas/ImmutableUtils */ 231);\n\nvar ImmutableUtils = _interopRequireWildcard(_ImmutableUtils);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar visit = function visit(value, parent, key, schema, addEntity) {\n if ((typeof value === 'undefined' ? 'undefined' : _typeof(value)) !== 'object' || !value) {\n return value;\n }\n\n if ((typeof schema === 'undefined' ? 'undefined' : _typeof(schema)) === 'object' && (!schema.normalize || typeof schema.normalize !== 'function')) {\n var method = Array.isArray(schema) ? ArrayUtils.normalize : ObjectUtils.normalize;\n return method(schema, value, parent, key, visit, addEntity);\n }\n\n return schema.normalize(value, parent, key, visit, addEntity);\n};\n\nvar addEntities = function addEntities(entities) {\n return function (schema, processedEntity, value, parent, key) {\n var schemaKey = schema.key;\n var id = schema.getId(value, parent, key);\n if (!(schemaKey in entities)) {\n entities[schemaKey] = {};\n }\n\n var existingEntity = entities[schemaKey][id];\n if (existingEntity) {\n entities[schemaKey][id] = schema.merge(existingEntity, processedEntity);\n } else {\n entities[schemaKey][id] = processedEntity;\n }\n };\n};\n\nvar schema = exports.schema = {\n Array: ArrayUtils.default,\n Entity: _Entity2.default,\n Object: ObjectUtils.default,\n Union: _Union2.default,\n Values: _Values2.default\n};\n\nvar normalize = exports.normalize = function normalize(input, schema) {\n if (!input || (typeof input === 'undefined' ? 'undefined' : _typeof(input)) !== 'object') {\n throw new Error('Unexpected input given to normalize. Expected type to be \"object\", found \"' + (typeof input === 'undefined' ? 'undefined' : _typeof(input)) + '\".');\n }\n\n var entities = {};\n var addEntity = addEntities(entities);\n\n var result = visit(input, input, null, schema, addEntity);\n return { entities: entities, result: result };\n};\n\nvar unvisitEntity = function unvisitEntity(input, schema, unvisit, getEntity, cache) {\n var entity = getEntity(input, schema);\n if ((typeof entity === 'undefined' ? 'undefined' : _typeof(entity)) !== 'object' || entity === null) {\n return entity;\n }\n\n var id = schema.getId(entity);\n\n if (!cache[schema.key]) {\n cache[schema.key] = {};\n }\n\n if (!cache[schema.key][id]) {\n // Ensure we don't mutate it non-immutable objects\n var entityCopy = ImmutableUtils.isImmutable(entity) ? entity : _extends({}, entity);\n\n // Need to set this first so that if it is referenced further within the\n // denormalization the reference will already exist.\n cache[schema.key][id] = entityCopy;\n cache[schema.key][id] = schema.denormalize(entityCopy, unvisit);\n }\n\n return cache[schema.key][id];\n};\n\nvar getUnvisit = function getUnvisit(entities) {\n var cache = {};\n var getEntity = getEntities(entities);\n\n return function unvisit(input, schema) {\n if ((typeof schema === 'undefined' ? 'undefined' : _typeof(schema)) === 'object' && (!schema.denormalize || typeof schema.denormalize !== 'function')) {\n var method = Array.isArray(schema) ? ArrayUtils.denormalize : ObjectUtils.denormalize;\n return method(schema, input, unvisit);\n }\n\n if (input === undefined || input === null) {\n return input;\n }\n\n if (schema instanceof _Entity2.default) {\n return unvisitEntity(input, schema, unvisit, getEntity, cache);\n }\n\n return schema.denormalize(input, unvisit);\n };\n};\n\nvar getEntities = function getEntities(entities) {\n var isImmutable = ImmutableUtils.isImmutable(entities);\n\n return function (entityOrId, schema) {\n var schemaKey = schema.key;\n\n if ((typeof entityOrId === 'undefined' ? 'undefined' : _typeof(entityOrId)) === 'object') {\n return entityOrId;\n }\n\n return isImmutable ? entities.getIn([schemaKey, entityOrId.toString()]) : entities[schemaKey][entityOrId];\n };\n};\n\nvar denormalize = exports.denormalize = function denormalize(input, schema, entities) {\n if (!input) {\n return input;\n }\n\n return getUnvisit(entities)(input, schema);\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/normalizr/dist/src/index.js\n// module id = 230\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/normalizr/dist/src/index.js?", + ); + + /***/ + }, + /* 231 */ + /* unknown exports provided */ + /* all exports used */ + /*!********************************************************!*\ + !*** ./~/normalizr/dist/src/schemas/ImmutableUtils.js ***! + \********************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.isImmutable = isImmutable;\nexports.denormalizeImmutable = denormalizeImmutable;\n/**\n * Helpers to enable Immutable compatibility *without* bringing in\n * the 'immutable' package as a dependency.\n */\n\n/**\n * Check if an object is immutable by checking if it has a key specific\n * to the immutable library.\n *\n * @param {any} object\n * @return {bool}\n */\nfunction isImmutable(object) {\n return !!(object && (object.hasOwnProperty('__ownerID') || // Immutable.Map\n object._map && object._map.hasOwnProperty('__ownerID') // Immutable.Record\n ));\n}\n\n/**\n * Denormalize an immutable entity.\n *\n * @param {Schema} schema\n * @param {Immutable.Map|Immutable.Record} input\n * @param {function} unvisit\n * @param {function} getDenormalizedEntity\n * @return {Immutable.Map|Immutable.Record}\n */\nfunction denormalizeImmutable(schema, input, unvisit) {\n return Object.keys(schema).reduce(function (object, key) {\n // Immutable maps cast keys to strings on write so we need to ensure\n // we're accessing them using string keys.\n var stringKey = '' + key;\n\n if (object.has(stringKey)) {\n return object.set(stringKey, unvisit(object.get(stringKey), schema[stringKey]));\n } else {\n return object;\n }\n }, input);\n}\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/normalizr/dist/src/schemas/ImmutableUtils.js\n// module id = 231\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/normalizr/dist/src/schemas/ImmutableUtils.js?", + ); + + /***/ + }, + /* 232 */ + /* unknown exports provided */ + /* all exports used */ + /*!*****************************************************!*\ + !*** ./~/normalizr/dist/src/schemas/Polymorphic.js ***! + \*****************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar PolymorphicSchema = function () {\n function PolymorphicSchema(definition, schemaAttribute) {\n _classCallCheck(this, PolymorphicSchema);\n\n if (schemaAttribute) {\n this._schemaAttribute = typeof schemaAttribute === 'string' ? function (input) {\n return input[schemaAttribute];\n } : schemaAttribute;\n }\n this.define(definition);\n }\n\n _createClass(PolymorphicSchema, [{\n key: 'define',\n value: function define(definition) {\n this.schema = definition;\n }\n }, {\n key: 'getSchemaAttribute',\n value: function getSchemaAttribute(input, parent, key) {\n return !this.isSingleSchema && this._schemaAttribute(input, parent, key);\n }\n }, {\n key: 'inferSchema',\n value: function inferSchema(input, parent, key) {\n if (this.isSingleSchema) {\n return this.schema;\n }\n\n var attr = this.getSchemaAttribute(input, parent, key);\n return this.schema[attr];\n }\n }, {\n key: 'normalizeValue',\n value: function normalizeValue(value, parent, key, visit, addEntity) {\n var schema = this.inferSchema(value, parent, key);\n if (!schema) {\n return value;\n }\n var normalizedValue = visit(value, parent, key, schema, addEntity);\n return this.isSingleSchema || normalizedValue === undefined || normalizedValue === null ? normalizedValue : { id: normalizedValue, schema: this.getSchemaAttribute(value, parent, key) };\n }\n }, {\n key: 'denormalizeValue',\n value: function denormalizeValue(value, unvisit) {\n if (!this.isSingleSchema && !value.schema) {\n return value;\n }\n var schema = this.isSingleSchema ? this.schema : this.schema[value.schema];\n return unvisit(value.id || value, schema);\n }\n }, {\n key: 'isSingleSchema',\n get: function get() {\n return !this._schemaAttribute;\n }\n }]);\n\n return PolymorphicSchema;\n}();\n\nexports.default = PolymorphicSchema;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/normalizr/dist/src/schemas/Polymorphic.js\n// module id = 232\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/normalizr/dist/src/schemas/Polymorphic.js?", + ); + + /***/ + }, + /* 233 */ + /* unknown exports provided */ + /* exports used: stringify, parse */ + /*!***************************!*\ + !*** ./~/qs/lib/index.js ***! + \***************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nvar stringify = __webpack_require__(/*! ./stringify */ 1221);\nvar parse = __webpack_require__(/*! ./parse */ 1220);\nvar formats = __webpack_require__(/*! ./formats */ 487);\n\nmodule.exports = {\n formats: formats,\n parse: parse,\n stringify: stringify\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/qs/lib/index.js\n// module id = 233\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/qs/lib/index.js?', + ); + + /***/ + }, + /* 234 */ + /* unknown exports provided */ + /* all exports used */ + /*!***********************************!*\ + !*** ./~/rc-slider/lib/Handle.js ***! + \***********************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\n\nvar _extends2 = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n\nvar _extends3 = _interopRequireDefault(_extends2);\n\nvar _objectWithoutProperties2 = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ 9);\n\nvar _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);\n\nvar _classCallCheck2 = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 6);\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _possibleConstructorReturn2 = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 8);\n\nvar _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\nvar _inherits2 = __webpack_require__(/*! babel-runtime/helpers/inherits */ 7);\n\nvar _inherits3 = _interopRequireDefault(_inherits2);\n\nvar _react = __webpack_require__(/*! react */ 1);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _propTypes = __webpack_require__(/*! prop-types */ 0);\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }\n\nvar Handle = function (_React$Component) {\n (0, _inherits3["default"])(Handle, _React$Component);\n\n function Handle() {\n (0, _classCallCheck3["default"])(this, Handle);\n return (0, _possibleConstructorReturn3["default"])(this, _React$Component.apply(this, arguments));\n }\n\n Handle.prototype.render = function render() {\n var _props = this.props,\n className = _props.className,\n vertical = _props.vertical,\n offset = _props.offset,\n handleStyle = _props.handleStyle,\n restProps = (0, _objectWithoutProperties3["default"])(_props, [\'className\', \'vertical\', \'offset\', \'handleStyle\']);\n\n var style = vertical ? { bottom: offset + \'%\' } : { left: offset + \'%\' };\n\n var elStyle = (0, _extends3["default"])({}, style, handleStyle);\n return _react2["default"].createElement(\'div\', (0, _extends3["default"])({}, restProps, { className: className, style: elStyle }));\n };\n\n return Handle;\n}(_react2["default"].Component);\n\nexports["default"] = Handle;\n\n\nHandle.propTypes = {\n className: _propTypes2["default"].string,\n vertical: _propTypes2["default"].bool,\n offset: _propTypes2["default"].number,\n handleStyle: _propTypes2["default"].object\n};\nmodule.exports = exports[\'default\'];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/rc-slider/lib/Handle.js\n// module id = 234\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/rc-slider/lib/Handle.js?', + ); + + /***/ + }, + /* 235 */ + /* unknown exports provided */ + /* all exports used */ + /*!**********************************!*\ + !*** ./~/rc-slider/lib/utils.js ***! + \**********************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\n\nvar _toConsumableArray2 = __webpack_require__(/*! babel-runtime/helpers/toConsumableArray */ 315);\n\nvar _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2);\n\nexports.isEventFromHandle = isEventFromHandle;\nexports.isValueOutOfRange = isValueOutOfRange;\nexports.isNotTouchEvent = isNotTouchEvent;\nexports.getClosestPoint = getClosestPoint;\nexports.getPrecision = getPrecision;\nexports.getMousePosition = getMousePosition;\nexports.getTouchPosition = getTouchPosition;\nexports.getHandleCenterPosition = getHandleCenterPosition;\nexports.ensureValueInRange = ensureValueInRange;\nexports.ensureValuePrecision = ensureValuePrecision;\nexports.pauseEvent = pauseEvent;\n\nvar _reactDom = __webpack_require__(/*! react-dom */ 16);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }\n\nfunction isEventFromHandle(e, handles) {\n return Object.keys(handles).some(function (key) {\n return e.target === (0, _reactDom.findDOMNode)(handles[key]);\n });\n}\n\nfunction isValueOutOfRange(value, _ref) {\n var min = _ref.min,\n max = _ref.max;\n\n return value < min || value > max;\n}\n\nfunction isNotTouchEvent(e) {\n return e.touches.length > 1 || e.type.toLowerCase() === \'touchend\' && e.touches.length > 0;\n}\n\nfunction getClosestPoint(val, _ref2) {\n var marks = _ref2.marks,\n step = _ref2.step,\n min = _ref2.min;\n\n var points = Object.keys(marks).map(parseFloat);\n if (step !== null) {\n var closestStep = Math.round((val - min) / step) * step + min;\n points.push(closestStep);\n }\n var diffs = points.map(function (point) {\n return Math.abs(val - point);\n });\n return points[diffs.indexOf(Math.min.apply(Math, (0, _toConsumableArray3["default"])(diffs)))];\n}\n\nfunction getPrecision(step) {\n var stepString = step.toString();\n var precision = 0;\n if (stepString.indexOf(\'.\') >= 0) {\n precision = stepString.length - stepString.indexOf(\'.\') - 1;\n }\n return precision;\n}\n\nfunction getMousePosition(vertical, e) {\n return vertical ? e.clientY : e.pageX;\n}\n\nfunction getTouchPosition(vertical, e) {\n return vertical ? e.touches[0].clientY : e.touches[0].pageX;\n}\n\nfunction getHandleCenterPosition(vertical, handle) {\n var coords = handle.getBoundingClientRect();\n return vertical ? coords.top + coords.height * 0.5 : coords.left + coords.width * 0.5;\n}\n\nfunction ensureValueInRange(val, _ref3) {\n var max = _ref3.max,\n min = _ref3.min;\n\n if (val <= min) {\n return min;\n }\n if (val >= max) {\n return max;\n }\n return val;\n}\n\nfunction ensureValuePrecision(val, props) {\n var step = props.step;\n\n var closestPoint = getClosestPoint(val, props);\n return step === null ? closestPoint : parseFloat(closestPoint.toFixed(getPrecision(step)));\n}\n\nfunction pauseEvent(e) {\n e.stopPropagation();\n e.preventDefault();\n}\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/rc-slider/lib/utils.js\n// module id = 235\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/rc-slider/lib/utils.js?', + ); + + /***/ + }, + /* 236 */ + /* exports provided: default */ + /* exports used: default */ + /*!******************************************!*\ + !*** ./~/react-bootstrap/es/Collapse.js ***! + \******************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ 9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ 7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_dom_helpers_style__ = __webpack_require__(/*! dom-helpers/style */ 158);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_dom_helpers_style___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_dom_helpers_style__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_react_overlays_lib_Transition__ = __webpack_require__(/*! react-overlays/lib/Transition */ 567);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_react_overlays_lib_Transition___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_react_overlays_lib_Transition__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__utils_capitalize__ = __webpack_require__(/*! ./utils/capitalize */ 512);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__utils_createChainedFunction__ = __webpack_require__(/*! ./utils/createChainedFunction */ 28);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar MARGINS = {\n height: ['marginTop', 'marginBottom'],\n width: ['marginLeft', 'marginRight']\n};\n\n// reading a dimension prop will cause the browser to recalculate,\n// which will let our animations work\nfunction triggerBrowserReflow(node) {\n node.offsetHeight; // eslint-disable-line no-unused-expressions\n}\n\nfunction getDimensionValue(dimension, elem) {\n var value = elem['offset' + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_10__utils_capitalize__[\"a\" /* default */])(dimension)];\n var margins = MARGINS[dimension];\n\n return value + parseInt(__WEBPACK_IMPORTED_MODULE_6_dom_helpers_style___default()(elem, margins[0]), 10) + parseInt(__WEBPACK_IMPORTED_MODULE_6_dom_helpers_style___default()(elem, margins[1]), 10);\n}\n\nvar propTypes = {\n /**\n * Show the component; triggers the expand or collapse animation\n */\n 'in': __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.bool,\n\n /**\n * Wait until the first \"enter\" transition to mount the component (add it to the DOM)\n */\n mountOnEnter: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.bool,\n\n /**\n * Unmount the component (remove it from the DOM) when it is collapsed\n */\n unmountOnExit: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.bool,\n\n /**\n * Run the expand animation when the component mounts, if it is initially\n * shown\n */\n transitionAppear: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.bool,\n\n /**\n * Duration of the collapse animation in milliseconds, to ensure that\n * finishing callbacks are fired even if the original browser transition end\n * events are canceled\n */\n timeout: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.number,\n\n /**\n * Callback fired before the component expands\n */\n onEnter: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.func,\n /**\n * Callback fired after the component starts to expand\n */\n onEntering: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.func,\n /**\n * Callback fired after the component has expanded\n */\n onEntered: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.func,\n /**\n * Callback fired before the component collapses\n */\n onExit: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.func,\n /**\n * Callback fired after the component starts to collapse\n */\n onExiting: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.func,\n /**\n * Callback fired after the component has collapsed\n */\n onExited: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.func,\n\n /**\n * The dimension used when collapsing, or a function that returns the\n * dimension\n *\n * _Note: Bootstrap only partially supports 'width'!\n * You will need to supply your own CSS animation for the `.width` CSS class._\n */\n dimension: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.oneOf(['height', 'width']), __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.func]),\n\n /**\n * Function that returns the height or width of the animating DOM node\n *\n * Allows for providing some custom logic for how much the Collapse component\n * should animate in its specified dimension. Called with the current\n * dimension prop value and the DOM node.\n */\n getDimensionValue: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.func,\n\n /**\n * ARIA role of collapsible element\n */\n role: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.string\n};\n\nvar defaultProps = {\n 'in': false,\n timeout: 300,\n mountOnEnter: false,\n unmountOnExit: false,\n transitionAppear: false,\n\n dimension: 'height',\n getDimensionValue: getDimensionValue\n};\n\nvar Collapse = function (_React$Component) {\n __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default()(Collapse, _React$Component);\n\n function Collapse(props, context) {\n __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default()(this, Collapse);\n\n var _this = __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.call(this, props, context));\n\n _this.handleEnter = _this.handleEnter.bind(_this);\n _this.handleEntering = _this.handleEntering.bind(_this);\n _this.handleEntered = _this.handleEntered.bind(_this);\n _this.handleExit = _this.handleExit.bind(_this);\n _this.handleExiting = _this.handleExiting.bind(_this);\n return _this;\n }\n\n /* -- Expanding -- */\n\n\n Collapse.prototype.handleEnter = function handleEnter(elem) {\n var dimension = this._dimension();\n elem.style[dimension] = '0';\n };\n\n Collapse.prototype.handleEntering = function handleEntering(elem) {\n var dimension = this._dimension();\n elem.style[dimension] = this._getScrollDimensionValue(elem, dimension);\n };\n\n Collapse.prototype.handleEntered = function handleEntered(elem) {\n var dimension = this._dimension();\n elem.style[dimension] = null;\n };\n\n /* -- Collapsing -- */\n\n\n Collapse.prototype.handleExit = function handleExit(elem) {\n var dimension = this._dimension();\n elem.style[dimension] = this.props.getDimensionValue(dimension, elem) + 'px';\n triggerBrowserReflow(elem);\n };\n\n Collapse.prototype.handleExiting = function handleExiting(elem) {\n var dimension = this._dimension();\n elem.style[dimension] = '0';\n };\n\n Collapse.prototype._dimension = function _dimension() {\n return typeof this.props.dimension === 'function' ? this.props.dimension() : this.props.dimension;\n };\n\n // for testing\n\n\n Collapse.prototype._getScrollDimensionValue = function _getScrollDimensionValue(elem, dimension) {\n return elem['scroll' + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_10__utils_capitalize__[\"a\" /* default */])(dimension)] + 'px';\n };\n\n Collapse.prototype.render = function render() {\n var _props = this.props,\n onEnter = _props.onEnter,\n onEntering = _props.onEntering,\n onEntered = _props.onEntered,\n onExit = _props.onExit,\n onExiting = _props.onExiting,\n className = _props.className,\n props = __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default()(_props, ['onEnter', 'onEntering', 'onEntered', 'onExit', 'onExiting', 'className']);\n\n delete props.dimension;\n delete props.getDimensionValue;\n\n var handleEnter = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_11__utils_createChainedFunction__[\"a\" /* default */])(this.handleEnter, onEnter);\n var handleEntering = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_11__utils_createChainedFunction__[\"a\" /* default */])(this.handleEntering, onEntering);\n var handleEntered = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_11__utils_createChainedFunction__[\"a\" /* default */])(this.handleEntered, onEntered);\n var handleExit = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_11__utils_createChainedFunction__[\"a\" /* default */])(this.handleExit, onExit);\n var handleExiting = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_11__utils_createChainedFunction__[\"a\" /* default */])(this.handleExiting, onExiting);\n\n var classes = {\n width: this._dimension() === 'width'\n };\n\n return __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_9_react_overlays_lib_Transition___default.a, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, props, {\n 'aria-expanded': props.role ? props['in'] : null,\n className: __WEBPACK_IMPORTED_MODULE_5_classnames___default()(className, classes),\n exitedClassName: 'collapse',\n exitingClassName: 'collapsing',\n enteredClassName: 'collapse in',\n enteringClassName: 'collapsing',\n onEnter: handleEnter,\n onEntering: handleEntering,\n onEntered: handleEntered,\n onExit: handleExit,\n onExiting: handleExiting\n }));\n };\n\n return Collapse;\n}(__WEBPACK_IMPORTED_MODULE_7_react___default.a.Component);\n\nCollapse.propTypes = propTypes;\nCollapse.defaultProps = defaultProps;\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Collapse);\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/Collapse.js\n// module id = 236\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/Collapse.js?", + ); + + /***/ + }, + /* 237 */ + /* exports provided: default */ + /* exports used: default */ + /*!*******************************************!*\ + !*** ./~/react-bootstrap/es/Glyphicon.js ***! + \*******************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ 9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ 7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__ = __webpack_require__(/*! ./utils/bootstrapUtils */ 10);\n\n\n\n\n\n\n\n\n\n\n\nvar propTypes = {\n /**\n * An icon name without "glyphicon-" prefix. See e.g. http://getbootstrap.com/components/#glyphicons\n */\n glyph: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string.isRequired\n};\n\nvar Glyphicon = function (_React$Component) {\n __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default()(Glyphicon, _React$Component);\n\n function Glyphicon() {\n __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default()(this, Glyphicon);\n\n return __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.apply(this, arguments));\n }\n\n Glyphicon.prototype.render = function render() {\n var _extends2;\n\n var _props = this.props,\n glyph = _props.glyph,\n className = _props.className,\n props = __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default()(_props, [\'glyph\', \'className\']);\n\n var _splitBsProps = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__["a" /* splitBsProps */])(props),\n bsProps = _splitBsProps[0],\n elementProps = _splitBsProps[1];\n\n var classes = __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__["b" /* getClassSet */])(bsProps), (_extends2 = {}, _extends2[__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__["e" /* prefix */])(bsProps, glyph)] = true, _extends2));\n\n return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(\'span\', __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, elementProps, {\n className: __WEBPACK_IMPORTED_MODULE_5_classnames___default()(className, classes)\n }));\n };\n\n return Glyphicon;\n}(__WEBPACK_IMPORTED_MODULE_6_react___default.a.Component);\n\nGlyphicon.propTypes = propTypes;\n\n/* harmony default export */ __webpack_exports__["a"] = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__["c" /* bsClass */])(\'glyphicon\', Glyphicon));\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/Glyphicon.js\n// module id = 237\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/Glyphicon.js?', + ); + + /***/ + }, + /* 238 */ + /* exports provided: default */ + /* exports used: default */ + /*!***************************************!*\ + !*** ./~/react-bootstrap/es/Media.js ***! + \***************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ 9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ 7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react_prop_types_lib_elementType__ = __webpack_require__(/*! react-prop-types/lib/elementType */ 18);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react_prop_types_lib_elementType___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_react_prop_types_lib_elementType__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__MediaBody__ = __webpack_require__(/*! ./MediaBody */ 1274);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__MediaHeading__ = __webpack_require__(/*! ./MediaHeading */ 1275);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__MediaLeft__ = __webpack_require__(/*! ./MediaLeft */ 1276);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__MediaList__ = __webpack_require__(/*! ./MediaList */ 1277);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__MediaListItem__ = __webpack_require__(/*! ./MediaListItem */ 1278);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__MediaRight__ = __webpack_require__(/*! ./MediaRight */ 1279);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__utils_bootstrapUtils__ = __webpack_require__(/*! ./utils/bootstrapUtils */ 10);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar propTypes = {\n componentClass: __WEBPACK_IMPORTED_MODULE_7_react_prop_types_lib_elementType___default.a\n};\n\nvar defaultProps = {\n componentClass: \'div\'\n};\n\nvar Media = function (_React$Component) {\n __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default()(Media, _React$Component);\n\n function Media() {\n __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default()(this, Media);\n\n return __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.apply(this, arguments));\n }\n\n Media.prototype.render = function render() {\n var _props = this.props,\n Component = _props.componentClass,\n className = _props.className,\n props = __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default()(_props, [\'componentClass\', \'className\']);\n\n var _splitBsProps = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_14__utils_bootstrapUtils__["a" /* splitBsProps */])(props),\n bsProps = _splitBsProps[0],\n elementProps = _splitBsProps[1];\n\n var classes = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_14__utils_bootstrapUtils__["b" /* getClassSet */])(bsProps);\n\n return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(Component, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, elementProps, {\n className: __WEBPACK_IMPORTED_MODULE_5_classnames___default()(className, classes)\n }));\n };\n\n return Media;\n}(__WEBPACK_IMPORTED_MODULE_6_react___default.a.Component);\n\nMedia.propTypes = propTypes;\nMedia.defaultProps = defaultProps;\n\nMedia.Heading = __WEBPACK_IMPORTED_MODULE_9__MediaHeading__["a" /* default */];\nMedia.Body = __WEBPACK_IMPORTED_MODULE_8__MediaBody__["a" /* default */];\nMedia.Left = __WEBPACK_IMPORTED_MODULE_10__MediaLeft__["a" /* default */];\nMedia.Right = __WEBPACK_IMPORTED_MODULE_13__MediaRight__["a" /* default */];\nMedia.List = __WEBPACK_IMPORTED_MODULE_11__MediaList__["a" /* default */];\nMedia.ListItem = __WEBPACK_IMPORTED_MODULE_12__MediaListItem__["a" /* default */];\n\n/* harmony default export */ __webpack_exports__["a"] = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_14__utils_bootstrapUtils__["c" /* bsClass */])(\'media\', Media));\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/Media.js\n// module id = 238\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/Media.js?', + ); + + /***/ + }, + /* 239 */ + /* exports provided: default */ + /* exports used: default */ + /*!**********************************************!*\ + !*** ./~/react-bootstrap/es/TabContainer.js ***! + \**********************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ 9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_objectWithoutProperties__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ 7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_uncontrollable__ = __webpack_require__(/*! uncontrollable */ 178);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_uncontrollable___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_uncontrollable__);\n\n\n\n\n\n\n\n\nvar TAB = 'tab';\nvar PANE = 'pane';\n\nvar idPropType = __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.number]);\n\nvar propTypes = {\n /**\n * HTML id attribute, required if no `generateChildId` prop\n * is specified.\n */\n id: function id(props) {\n var error = null;\n\n if (!props.generateChildId) {\n for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n error = idPropType.apply(undefined, [props].concat(args));\n\n if (!error && !props.id) {\n error = new Error('In order to properly initialize Tabs in a way that is accessible ' + 'to assistive technologies (such as screen readers) an `id` or a ' + '`generateChildId` prop to TabContainer is required');\n }\n }\n\n return error;\n },\n\n\n /**\n * A function that takes an `eventKey` and `type` and returns a unique id for\n * child tab `<NavItem>`s and `<TabPane>`s. The function _must_ be a pure\n * function, meaning it should always return the _same_ id for the same set\n * of inputs. The default value requires that an `id` to be set for the\n * `<TabContainer>`.\n *\n * The `type` argument will either be `\"tab\"` or `\"pane\"`.\n *\n * @defaultValue (eventKey, type) => `${this.props.id}-${type}-${key}`\n */\n generateChildId: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.func,\n\n /**\n * A callback fired when a tab is selected.\n *\n * @controllable activeKey\n */\n onSelect: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.func,\n\n /**\n * The `eventKey` of the currently active tab.\n *\n * @controllable onSelect\n */\n activeKey: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.any\n};\n\nvar childContextTypes = {\n $bs_tabContainer: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.shape({\n activeKey: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.any,\n onSelect: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.func.isRequired,\n getTabId: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.func.isRequired,\n getPaneId: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.func.isRequired\n })\n};\n\nvar TabContainer = function (_React$Component) {\n __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits___default()(TabContainer, _React$Component);\n\n function TabContainer() {\n __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck___default()(this, TabContainer);\n\n return __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.apply(this, arguments));\n }\n\n TabContainer.prototype.getChildContext = function getChildContext() {\n var _props = this.props,\n activeKey = _props.activeKey,\n onSelect = _props.onSelect,\n generateChildId = _props.generateChildId,\n id = _props.id;\n\n\n var getId = generateChildId || function (key, type) {\n return id ? id + '-' + type + '-' + key : null;\n };\n\n return {\n $bs_tabContainer: {\n activeKey: activeKey,\n onSelect: onSelect,\n getTabId: function getTabId(key) {\n return getId(key, TAB);\n },\n getPaneId: function getPaneId(key) {\n return getId(key, PANE);\n }\n }\n };\n };\n\n TabContainer.prototype.render = function render() {\n var _props2 = this.props,\n children = _props2.children,\n props = __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_objectWithoutProperties___default()(_props2, ['children']);\n\n delete props.generateChildId;\n delete props.onSelect;\n delete props.activeKey;\n\n return __WEBPACK_IMPORTED_MODULE_4_react___default.a.cloneElement(__WEBPACK_IMPORTED_MODULE_4_react___default.a.Children.only(children), props);\n };\n\n return TabContainer;\n}(__WEBPACK_IMPORTED_MODULE_4_react___default.a.Component);\n\nTabContainer.propTypes = propTypes;\nTabContainer.childContextTypes = childContextTypes;\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (__WEBPACK_IMPORTED_MODULE_6_uncontrollable___default()(TabContainer, { activeKey: 'onSelect' }));\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/TabContainer.js\n// module id = 239\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/TabContainer.js?", + ); + + /***/ + }, + /* 240 */ + /* exports provided: default */ + /* exports used: default */ + /*!********************************************!*\ + !*** ./~/react-bootstrap/es/TabContent.js ***! + \********************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ 9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ 7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_react_prop_types_lib_elementType__ = __webpack_require__(/*! react-prop-types/lib/elementType */ 18);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_react_prop_types_lib_elementType___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_react_prop_types_lib_elementType__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__ = __webpack_require__(/*! ./utils/bootstrapUtils */ 10);\n\n\n\n\n\n\n\n\n\n\n\n\nvar propTypes = {\n componentClass: __WEBPACK_IMPORTED_MODULE_8_react_prop_types_lib_elementType___default.a,\n\n /**\n * Sets a default animation strategy for all children `<TabPane>`s. Use\n * `false` to disable, `true` to enable the default `<Fade>` animation or any\n * `<Transition>` component.\n */\n animation: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool, __WEBPACK_IMPORTED_MODULE_8_react_prop_types_lib_elementType___default.a]),\n\n /**\n * Wait until the first \"enter\" transition to mount tabs (add them to the DOM)\n */\n mountOnEnter: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,\n\n /**\n * Unmount tabs (remove it from the DOM) when they are no longer visible\n */\n unmountOnExit: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool\n};\n\nvar defaultProps = {\n componentClass: 'div',\n animation: true,\n mountOnEnter: false,\n unmountOnExit: false\n};\n\nvar contextTypes = {\n $bs_tabContainer: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.shape({\n activeKey: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.any\n })\n};\n\nvar childContextTypes = {\n $bs_tabContent: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.shape({\n bsClass: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string,\n animation: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool, __WEBPACK_IMPORTED_MODULE_8_react_prop_types_lib_elementType___default.a]),\n activeKey: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.any,\n mountOnEnter: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,\n unmountOnExit: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,\n onPaneEnter: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func.isRequired,\n onPaneExited: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func.isRequired,\n exiting: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool.isRequired\n })\n};\n\nvar TabContent = function (_React$Component) {\n __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default()(TabContent, _React$Component);\n\n function TabContent(props, context) {\n __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default()(this, TabContent);\n\n var _this = __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.call(this, props, context));\n\n _this.handlePaneEnter = _this.handlePaneEnter.bind(_this);\n _this.handlePaneExited = _this.handlePaneExited.bind(_this);\n\n // Active entries in state will be `null` unless `animation` is set. Need\n // to track active child in case keys swap and the active child changes\n // but the active key does not.\n _this.state = {\n activeKey: null,\n activeChild: null\n };\n return _this;\n }\n\n TabContent.prototype.getChildContext = function getChildContext() {\n var _props = this.props,\n bsClass = _props.bsClass,\n animation = _props.animation,\n mountOnEnter = _props.mountOnEnter,\n unmountOnExit = _props.unmountOnExit;\n\n\n var stateActiveKey = this.state.activeKey;\n var containerActiveKey = this.getContainerActiveKey();\n\n var activeKey = stateActiveKey != null ? stateActiveKey : containerActiveKey;\n var exiting = stateActiveKey != null && stateActiveKey !== containerActiveKey;\n\n return {\n $bs_tabContent: {\n bsClass: bsClass,\n animation: animation,\n activeKey: activeKey,\n mountOnEnter: mountOnEnter,\n unmountOnExit: unmountOnExit,\n onPaneEnter: this.handlePaneEnter,\n onPaneExited: this.handlePaneExited,\n exiting: exiting\n }\n };\n };\n\n TabContent.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {\n if (!nextProps.animation && this.state.activeChild) {\n this.setState({ activeKey: null, activeChild: null });\n }\n };\n\n TabContent.prototype.componentWillUnmount = function componentWillUnmount() {\n this.isUnmounted = true;\n };\n\n TabContent.prototype.handlePaneEnter = function handlePaneEnter(child, childKey) {\n if (!this.props.animation) {\n return false;\n }\n\n // It's possible that this child should be transitioning out.\n if (childKey !== this.getContainerActiveKey()) {\n return false;\n }\n\n this.setState({\n activeKey: childKey,\n activeChild: child\n });\n\n return true;\n };\n\n TabContent.prototype.handlePaneExited = function handlePaneExited(child) {\n // This might happen as everything is unmounting.\n if (this.isUnmounted) {\n return;\n }\n\n this.setState(function (_ref) {\n var activeChild = _ref.activeChild;\n\n if (activeChild !== child) {\n return null;\n }\n\n return {\n activeKey: null,\n activeChild: null\n };\n });\n };\n\n TabContent.prototype.getContainerActiveKey = function getContainerActiveKey() {\n var tabContainer = this.context.$bs_tabContainer;\n return tabContainer && tabContainer.activeKey;\n };\n\n TabContent.prototype.render = function render() {\n var _props2 = this.props,\n Component = _props2.componentClass,\n className = _props2.className,\n props = __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default()(_props2, ['componentClass', 'className']);\n\n var _splitBsPropsAndOmit = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__[\"f\" /* splitBsPropsAndOmit */])(props, ['animation', 'mountOnEnter', 'unmountOnExit']),\n bsProps = _splitBsPropsAndOmit[0],\n elementProps = _splitBsPropsAndOmit[1];\n\n return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(Component, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, elementProps, {\n className: __WEBPACK_IMPORTED_MODULE_5_classnames___default()(className, __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__[\"e\" /* prefix */])(bsProps, 'content'))\n }));\n };\n\n return TabContent;\n}(__WEBPACK_IMPORTED_MODULE_6_react___default.a.Component);\n\nTabContent.propTypes = propTypes;\nTabContent.defaultProps = defaultProps;\nTabContent.contextTypes = contextTypes;\nTabContent.childContextTypes = childContextTypes;\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__[\"c\" /* bsClass */])('tab', TabContent));\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/TabContent.js\n// module id = 240\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/TabContent.js?", + ); + + /***/ + }, + /* 241 */ + /* unknown exports provided */ + /* all exports used */ + /*!***************************************************!*\ + !*** ./~/react-dates/lib/components/DayPicker.js ***! + \***************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "module.exports =\n/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n\n\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ function(module, exports, __webpack_require__) {\n\n\tvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\n\tvar _createClass = function () {\n\t function defineProperties(target, props) {\n\t for (var i = 0; i < props.length; i++) {\n\t 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);\n\t }\n\t }return function (Constructor, protoProps, staticProps) {\n\t if (protoProps) defineProperties(Constructor.prototype, protoProps);if (staticProps) defineProperties(Constructor, staticProps);return Constructor;\n\t };\n\t}();\n\n\texports.calculateDimension = calculateDimension;\n\n\tvar _react = __webpack_require__(1);\n\n\tvar _react2 = _interopRequireDefault(_react);\n\n\tvar _reactAddonsShallowCompare = __webpack_require__(2);\n\n\tvar _reactAddonsShallowCompare2 = _interopRequireDefault(_reactAddonsShallowCompare);\n\n\tvar _reactDom = __webpack_require__(10);\n\n\tvar _reactDom2 = _interopRequireDefault(_reactDom);\n\n\tvar _moment = __webpack_require__(4);\n\n\tvar _moment2 = _interopRequireDefault(_moment);\n\n\tvar _classnames = __webpack_require__(5);\n\n\tvar _classnames2 = _interopRequireDefault(_classnames);\n\n\tvar _OutsideClickHandler = __webpack_require__(16);\n\n\tvar _OutsideClickHandler2 = _interopRequireDefault(_OutsideClickHandler);\n\n\tvar _CalendarMonthGrid = __webpack_require__(31);\n\n\tvar _CalendarMonthGrid2 = _interopRequireDefault(_CalendarMonthGrid);\n\n\tvar _DayPickerNavigation = __webpack_require__(32);\n\n\tvar _DayPickerNavigation2 = _interopRequireDefault(_DayPickerNavigation);\n\n\tvar _getTransformStyles = __webpack_require__(13);\n\n\tvar _getTransformStyles2 = _interopRequireDefault(_getTransformStyles);\n\n\tvar _ScrollableOrientationShape = __webpack_require__(8);\n\n\tvar _ScrollableOrientationShape2 = _interopRequireDefault(_ScrollableOrientationShape);\n\n\tvar _constants = __webpack_require__(9);\n\n\tfunction _interopRequireDefault(obj) {\n\t return obj && obj.__esModule ? obj : { 'default': 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 _possibleConstructorReturn(self, call) {\n\t if (!self) {\n\t throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n\t }return call && ((typeof call === \"undefined\" ? \"undefined\" : _typeof(call)) === \"object\" || typeof call === \"function\") ? call : self;\n\t}\n\n\tfunction _inherits(subClass, superClass) {\n\t if (typeof superClass !== \"function\" && superClass !== null) {\n\t throw new TypeError(\"Super expression must either be null or a function, not \" + (typeof superClass === \"undefined\" ? \"undefined\" : _typeof(superClass)));\n\t }subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n\t}\n\n\tvar CALENDAR_MONTH_WIDTH = 300;\n\tvar DAY_PICKER_PADDING = 9;\n\tvar MONTH_PADDING = 23;\n\tvar PREV_TRANSITION = 'prev';\n\tvar NEXT_TRANSITION = 'next';\n\n\tvar propTypes = {\n\t enableOutsideDays: _react.PropTypes.bool,\n\t numberOfMonths: _react.PropTypes.number,\n\t modifiers: _react.PropTypes.object,\n\t orientation: _ScrollableOrientationShape2['default'],\n\t withPortal: _react.PropTypes.bool,\n\t hidden: _react.PropTypes.bool,\n\t initialVisibleMonth: _react.PropTypes.func,\n\n\t navPrev: _react.PropTypes.node,\n\t navNext: _react.PropTypes.node,\n\n\t onDayClick: _react.PropTypes.func,\n\t onDayMouseEnter: _react.PropTypes.func,\n\t onDayMouseLeave: _react.PropTypes.func,\n\t onPrevMonthClick: _react.PropTypes.func,\n\t onNextMonthClick: _react.PropTypes.func,\n\t onOutsideClick: _react.PropTypes.func,\n\n\t renderDay: _react.PropTypes.func,\n\n\t // i18n\n\t monthFormat: _react.PropTypes.string\n\t};\n\n\tvar defaultProps = {\n\t enableOutsideDays: false,\n\t numberOfMonths: 1,\n\t modifiers: {},\n\t orientation: _constants.HORIZONTAL_ORIENTATION,\n\t withPortal: false,\n\t hidden: false,\n\n\t initialVisibleMonth: function () {\n\t function initialVisibleMonth() {\n\t return (0, _moment2['default'])();\n\t }\n\n\t return initialVisibleMonth;\n\t }(),\n\n\t navPrev: null,\n\t navNext: null,\n\n\t onDayClick: function () {\n\t function onDayClick() {}\n\n\t return onDayClick;\n\t }(),\n\t onDayMouseEnter: function () {\n\t function onDayMouseEnter() {}\n\n\t return onDayMouseEnter;\n\t }(),\n\t onDayMouseLeave: function () {\n\t function onDayMouseLeave() {}\n\n\t return onDayMouseLeave;\n\t }(),\n\t onPrevMonthClick: function () {\n\t function onPrevMonthClick() {}\n\n\t return onPrevMonthClick;\n\t }(),\n\t onNextMonthClick: function () {\n\t function onNextMonthClick() {}\n\n\t return onNextMonthClick;\n\t }(),\n\t onOutsideClick: function () {\n\t function onOutsideClick() {}\n\n\t return onOutsideClick;\n\t }(),\n\n\t renderDay: null,\n\t // i18n\n\t monthFormat: 'MMMM YYYY'\n\t};\n\n\tfunction applyTransformStyles(el, transform) {\n\t var opacity = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';\n\n\t var transformStyles = (0, _getTransformStyles2['default'])(transform);\n\t transformStyles.opacity = opacity;\n\n\t Object.keys(transformStyles).forEach(function (styleKey) {\n\t // eslint-disable-next-line no-param-reassign\n\t el.style[styleKey] = transformStyles[styleKey];\n\t });\n\t}\n\n\tfunction calculateDimension(el, axis) {\n\t var borderBox = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n\t var withMargin = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n\n\t if (!el) {\n\t return 0;\n\t }\n\n\t var axisStart = axis === 'width' ? 'Left' : 'Top';\n\t var axisEnd = axis === 'width' ? 'Right' : 'Bottom';\n\n\t // Only read styles if we need to\n\t var style = !borderBox || withMargin ? window.getComputedStyle(el) : {};\n\n\t // Offset includes border and padding\n\t var size = axis === 'width' ? el.offsetWidth : el.offsetHeight;\n\n\t // Get the inner size\n\t if (!borderBox) {\n\t size -= parseFloat(style['padding' + axisStart]) + parseFloat(style['padding' + axisEnd]) + parseFloat(style['border' + axisStart + 'Width']) + parseFloat(style['border' + axisEnd + 'Width']);\n\t }\n\n\t // Apply margin\n\t if (withMargin) {\n\t size += parseFloat(style['margin' + axisStart]) + parseFloat(style['margin' + axisEnd]);\n\t }\n\n\t return size;\n\t}\n\n\tfunction getMonthHeight(el) {\n\t var caption = el.querySelector('.js-CalendarMonth__caption');\n\t var grid = el.querySelector('.js-CalendarMonth__grid');\n\n\t // Need to separate out table children for FF\n\t // Add an additional +1 for the border\n\t return calculateDimension(caption, 'height', true, true) + calculateDimension(grid, 'height') + 1;\n\t}\n\n\tvar DayPicker = function (_React$Component) {\n\t _inherits(DayPicker, _React$Component);\n\n\t function DayPicker(props) {\n\t _classCallCheck(this, DayPicker);\n\n\t var _this = _possibleConstructorReturn(this, (DayPicker.__proto__ || Object.getPrototypeOf(DayPicker)).call(this, props));\n\n\t _this.hasSetInitialVisibleMonth = !props.hidden;\n\t _this.state = {\n\t currentMonth: props.hidden ? (0, _moment2['default'])() : props.initialVisibleMonth(),\n\t monthTransition: null,\n\t translationValue: 0,\n\t scrollableMonthMultiple: 1\n\t };\n\n\t _this.onPrevMonthClick = _this.onPrevMonthClick.bind(_this);\n\t _this.onNextMonthClick = _this.onNextMonthClick.bind(_this);\n\t _this.multiplyScrollableMonths = _this.multiplyScrollableMonths.bind(_this);\n\t _this.updateStateAfterMonthTransition = _this.updateStateAfterMonthTransition.bind(_this);\n\t return _this;\n\t }\n\n\t _createClass(DayPicker, [{\n\t key: 'componentDidMount',\n\t value: function () {\n\t function componentDidMount() {\n\t if (this.isHorizontal()) {\n\t this.adjustDayPickerHeight();\n\t this.initializeDayPickerWidth();\n\t }\n\t }\n\n\t return componentDidMount;\n\t }()\n\t }, {\n\t key: 'componentWillReceiveProps',\n\t value: function () {\n\t function componentWillReceiveProps(nextProps) {\n\t if (!nextProps.hidden) {\n\t if (!this.hasSetInitialVisibleMonth) {\n\t this.hasSetInitialVisibleMonth = true;\n\t this.setState({\n\t currentMonth: nextProps.initialVisibleMonth()\n\t });\n\t }\n\n\t if (!this.dayPickerWidth && this.isHorizontal()) {\n\t this.initializeDayPickerWidth();\n\t this.adjustDayPickerHeight();\n\t }\n\t }\n\t }\n\n\t return componentWillReceiveProps;\n\t }()\n\t }, {\n\t key: 'shouldComponentUpdate',\n\t value: function () {\n\t function shouldComponentUpdate(nextProps, nextState) {\n\t return (0, _reactAddonsShallowCompare2['default'])(this, nextProps, nextState);\n\t }\n\n\t return shouldComponentUpdate;\n\t }()\n\t }, {\n\t key: 'componentDidUpdate',\n\t value: function () {\n\t function componentDidUpdate(prevProps, prevState) {\n\t if (this.state.monthTransition || !this.state.currentMonth.isSame(prevState.currentMonth)) {\n\t if (this.isHorizontal()) {\n\t this.adjustDayPickerHeight();\n\t }\n\t }\n\t }\n\n\t return componentDidUpdate;\n\t }()\n\t }, {\n\t key: 'onPrevMonthClick',\n\t value: function () {\n\t function onPrevMonthClick(e) {\n\t if (e) e.preventDefault();\n\n\t if (this.props.onPrevMonthClick) {\n\t this.props.onPrevMonthClick(e);\n\t }\n\n\t var translationValue = this.isVertical() ? this.getMonthHeightByIndex(0) : this.dayPickerWidth;\n\n\t // The first CalendarMonth is always positioned absolute at top: 0 or left: 0\n\t // so we need to transform it to the appropriate location before the animation.\n\t // This behavior is because we would otherwise need a double-render in order to\n\t // adjust the container position once we had the height the first calendar\n\t // (ie first draw all the calendar, then in a second render, use the first calendar's\n\t // height to position the container). Variable calendar heights, amirite? <3 Maja\n\t this.translateFirstDayPickerForAnimation(translationValue);\n\n\t this.setState({\n\t monthTransition: PREV_TRANSITION,\n\t translationValue: translationValue\n\t });\n\t }\n\n\t return onPrevMonthClick;\n\t }()\n\t }, {\n\t key: 'onNextMonthClick',\n\t value: function () {\n\t function onNextMonthClick(e) {\n\t if (e) e.preventDefault();\n\t if (this.props.onNextMonthClick) {\n\t this.props.onNextMonthClick(e);\n\t }\n\n\t var translationValue = this.isVertical() ? -this.getMonthHeightByIndex(1) : -this.dayPickerWidth;\n\n\t this.setState({\n\t monthTransition: NEXT_TRANSITION,\n\t translationValue: translationValue\n\t });\n\t }\n\n\t return onNextMonthClick;\n\t }()\n\t }, {\n\t key: 'getMonthHeightByIndex',\n\t value: function () {\n\t function getMonthHeightByIndex(i) {\n\t return getMonthHeight(_reactDom2['default'].findDOMNode(this.refs.transitionContainer).querySelectorAll('.CalendarMonth')[i]);\n\t }\n\n\t return getMonthHeightByIndex;\n\t }()\n\t }, {\n\t key: 'multiplyScrollableMonths',\n\t value: function () {\n\t function multiplyScrollableMonths(e) {\n\t if (e) e.preventDefault();\n\n\t this.setState({\n\t scrollableMonthMultiple: this.state.scrollableMonthMultiple + 1\n\t });\n\t }\n\n\t return multiplyScrollableMonths;\n\t }()\n\t }, {\n\t key: 'isHorizontal',\n\t value: function () {\n\t function isHorizontal() {\n\t return this.props.orientation === _constants.HORIZONTAL_ORIENTATION;\n\t }\n\n\t return isHorizontal;\n\t }()\n\t }, {\n\t key: 'isVertical',\n\t value: function () {\n\t function isVertical() {\n\t return this.props.orientation === _constants.VERTICAL_ORIENTATION || this.props.orientation === _constants.VERTICAL_SCROLLABLE;\n\t }\n\n\t return isVertical;\n\t }()\n\t }, {\n\t key: 'initializeDayPickerWidth',\n\t value: function () {\n\t function initializeDayPickerWidth() {\n\t this.dayPickerWidth = calculateDimension(_reactDom2['default'].findDOMNode(this.refs.calendarMonthGrid).querySelector('.CalendarMonth'), 'width', true);\n\t }\n\n\t return initializeDayPickerWidth;\n\t }()\n\t }, {\n\t key: 'updateStateAfterMonthTransition',\n\t value: function () {\n\t function updateStateAfterMonthTransition() {\n\t var _state = this.state;\n\t var currentMonth = _state.currentMonth;\n\t var monthTransition = _state.monthTransition;\n\n\t var newMonth = currentMonth;\n\t if (monthTransition === PREV_TRANSITION) {\n\t newMonth = currentMonth.clone().subtract(1, 'month');\n\t } else if (monthTransition === NEXT_TRANSITION) {\n\t newMonth = currentMonth.clone().add(1, 'month');\n\t }\n\n\t // clear the previous transforms\n\t applyTransformStyles(_reactDom2['default'].findDOMNode(this.refs.calendarMonthGrid).querySelector('.CalendarMonth'), 'none');\n\n\t this.setState({\n\t currentMonth: newMonth,\n\t monthTransition: null,\n\t translationValue: 0\n\t });\n\t }\n\n\t return updateStateAfterMonthTransition;\n\t }()\n\t }, {\n\t key: 'adjustDayPickerHeight',\n\t value: function () {\n\t function adjustDayPickerHeight() {\n\t var transitionContainer = _reactDom2['default'].findDOMNode(this.refs.transitionContainer);\n\t var heights = [];\n\n\t Array.prototype.forEach.call(transitionContainer.querySelectorAll('.CalendarMonth'), function (el) {\n\t if (el.getAttribute('data-visible') === 'true') {\n\t heights.push(getMonthHeight(el));\n\t }\n\t });\n\n\t var newMonthHeight = Math.max.apply(Math, heights) + MONTH_PADDING;\n\n\t if (newMonthHeight !== calculateDimension(transitionContainer, 'height')) {\n\t this.monthHeight = newMonthHeight;\n\t transitionContainer.style.height = String(newMonthHeight) + 'px';\n\t }\n\t }\n\n\t return adjustDayPickerHeight;\n\t }()\n\t }, {\n\t key: 'translateFirstDayPickerForAnimation',\n\t value: function () {\n\t function translateFirstDayPickerForAnimation(translationValue) {\n\t var transformType = this.isVertical() ? 'translateY' : 'translateX';\n\t var transformValue = transformType + '(-' + String(translationValue) + 'px)';\n\n\t applyTransformStyles(_reactDom2['default'].findDOMNode(this.refs.transitionContainer).querySelector('.CalendarMonth'), transformValue, 1);\n\t }\n\n\t return translateFirstDayPickerForAnimation;\n\t }()\n\t }, {\n\t key: 'renderNavigation',\n\t value: function () {\n\t function renderNavigation() {\n\t var _props = this.props;\n\t var navPrev = _props.navPrev;\n\t var navNext = _props.navNext;\n\t var orientation = _props.orientation;\n\n\t var onNextMonthClick = void 0;\n\t if (orientation === _constants.VERTICAL_SCROLLABLE) {\n\t onNextMonthClick = this.multiplyScrollableMonths;\n\t } else {\n\t onNextMonthClick = this.onNextMonthClick;\n\t }\n\n\t return _react2['default'].createElement(_DayPickerNavigation2['default'], {\n\t onPrevMonthClick: this.onPrevMonthClick,\n\t onNextMonthClick: onNextMonthClick,\n\t navPrev: navPrev,\n\t navNext: navNext,\n\t orientation: orientation, j: true\n\t });\n\t }\n\n\t return renderNavigation;\n\t }()\n\t }, {\n\t key: 'renderWeekHeader',\n\t value: function () {\n\t function renderWeekHeader(index) {\n\t var horizontalStyle = {\n\t left: index * CALENDAR_MONTH_WIDTH\n\t };\n\n\t var style = this.isHorizontal() ? horizontalStyle : {};\n\n\t var header = [];\n\t for (var i = 0; i < 7; i++) {\n\t header.push(_react2['default'].createElement('li', { key: i }, _react2['default'].createElement('small', null, (0, _moment2['default'])().weekday(i).format('dd'))));\n\t }\n\n\t return _react2['default'].createElement('div', {\n\t className: 'DayPicker__week-header',\n\t key: 'week-' + String(index),\n\t style: style\n\t }, _react2['default'].createElement('ul', null, header));\n\t }\n\n\t return renderWeekHeader;\n\t }()\n\t }, {\n\t key: 'render',\n\t value: function () {\n\t function render() {\n\t var _state2 = this.state;\n\t var currentMonth = _state2.currentMonth;\n\t var monthTransition = _state2.monthTransition;\n\t var translationValue = _state2.translationValue;\n\t var scrollableMonthMultiple = _state2.scrollableMonthMultiple;\n\t var _props2 = this.props;\n\t var enableOutsideDays = _props2.enableOutsideDays;\n\t var numberOfMonths = _props2.numberOfMonths;\n\t var orientation = _props2.orientation;\n\t var modifiers = _props2.modifiers;\n\t var withPortal = _props2.withPortal;\n\t var onDayClick = _props2.onDayClick;\n\t var onDayMouseEnter = _props2.onDayMouseEnter;\n\t var onDayMouseLeave = _props2.onDayMouseLeave;\n\t var renderDay = _props2.renderDay;\n\t var onOutsideClick = _props2.onOutsideClick;\n\t var monthFormat = _props2.monthFormat;\n\n\t var numOfWeekHeaders = this.isVertical() ? 1 : numberOfMonths;\n\t var weekHeaders = [];\n\t for (var i = 0; i < numOfWeekHeaders; i++) {\n\t weekHeaders.push(this.renderWeekHeader(i));\n\t }\n\n\t var firstVisibleMonthIndex = 1;\n\t if (monthTransition === PREV_TRANSITION) {\n\t firstVisibleMonthIndex -= 1;\n\t } else if (monthTransition === NEXT_TRANSITION) {\n\t firstVisibleMonthIndex += 1;\n\t }\n\n\t var verticalScrollable = this.props.orientation === _constants.VERTICAL_SCROLLABLE;\n\n\t var dayPickerClassNames = (0, _classnames2['default'])('DayPicker', {\n\t 'DayPicker--horizontal': this.isHorizontal(),\n\t 'DayPicker--vertical': this.isVertical(),\n\t 'DayPicker--vertical-scrollable': verticalScrollable,\n\t 'DayPicker--portal': withPortal\n\t });\n\n\t var transitionContainerClasses = (0, _classnames2['default'])('transition-container', {\n\t 'transition-container--horizontal': this.isHorizontal(),\n\t 'transition-container--vertical': this.isVertical()\n\t });\n\n\t var horizontalWidth = CALENDAR_MONTH_WIDTH * numberOfMonths + 2 * DAY_PICKER_PADDING;\n\n\t // this is a kind of made-up value that generally looks good. we'll\n\t // probably want to let the user set this explicitly.\n\t var verticalHeight = 1.75 * CALENDAR_MONTH_WIDTH;\n\n\t var dayPickerStyle = {\n\t width: this.isHorizontal() && horizontalWidth,\n\n\t // These values are to center the datepicker (approximately) on the page\n\t marginLeft: this.isHorizontal() && withPortal && -horizontalWidth / 2,\n\t marginTop: this.isHorizontal() && withPortal && -CALENDAR_MONTH_WIDTH / 2\n\t };\n\n\t var transitionContainerStyle = {\n\t width: this.isHorizontal() && horizontalWidth,\n\t height: this.isVertical() && !verticalScrollable && !withPortal && verticalHeight\n\t };\n\n\t var isCalendarMonthGridAnimating = monthTransition !== null;\n\t var transformType = this.isVertical() ? 'translateY' : 'translateX';\n\t var transformValue = transformType + '(' + String(translationValue) + 'px)';\n\n\t return _react2['default'].createElement('div', { className: dayPickerClassNames, style: dayPickerStyle }, _react2['default'].createElement(_OutsideClickHandler2['default'], { onOutsideClick: onOutsideClick }, !verticalScrollable && this.renderNavigation(), _react2['default'].createElement('div', { className: 'DayPicker__week-headers' }, weekHeaders), _react2['default'].createElement('div', {\n\t className: transitionContainerClasses,\n\t ref: 'transitionContainer',\n\t style: transitionContainerStyle\n\t }, _react2['default'].createElement(_CalendarMonthGrid2['default'], {\n\t ref: 'calendarMonthGrid',\n\t transformValue: transformValue,\n\t enableOutsideDays: enableOutsideDays,\n\t firstVisibleMonthIndex: firstVisibleMonthIndex,\n\t initialMonth: currentMonth,\n\t isAnimating: isCalendarMonthGridAnimating,\n\t modifiers: modifiers,\n\t orientation: orientation,\n\t withPortal: withPortal,\n\t numberOfMonths: numberOfMonths * scrollableMonthMultiple,\n\t onDayClick: onDayClick,\n\t onDayMouseEnter: onDayMouseEnter,\n\t onDayMouseLeave: onDayMouseLeave,\n\t renderDay: renderDay,\n\t onMonthTransitionEnd: this.updateStateAfterMonthTransition,\n\t monthFormat: monthFormat\n\t }), verticalScrollable && this.renderNavigation())));\n\t }\n\n\t return render;\n\t }()\n\t }]);\n\n\t return DayPicker;\n\t}(_react2['default'].Component);\n\n\texports['default'] = DayPicker;\n\n\tDayPicker.propTypes = propTypes;\n\tDayPicker.defaultProps = defaultProps;\n\n/***/ },\n/* 1 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! react */ 1);\n\n/***/ },\n/* 2 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! react-addons-shallow-compare */ 118);\n\n/***/ },\n/* 3 */,\n/* 4 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! moment */ 3);\n\n/***/ },\n/* 5 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! classnames */ 2);\n\n/***/ },\n/* 6 */,\n/* 7 */,\n/* 8 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! ../shapes/ScrollableOrientationShape */ 120);\n\n/***/ },\n/* 9 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! ../../constants */ 29);\n\n/***/ },\n/* 10 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! react-dom */ 16);\n\n/***/ },\n/* 11 */,\n/* 12 */,\n/* 13 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! ../utils/getTransformStyles */ 527);\n\n/***/ },\n/* 14 */,\n/* 15 */,\n/* 16 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! ./OutsideClickHandler */ 242);\n\n/***/ },\n/* 17 */,\n/* 18 */,\n/* 19 */,\n/* 20 */,\n/* 21 */,\n/* 22 */,\n/* 23 */,\n/* 24 */,\n/* 25 */,\n/* 26 */,\n/* 27 */,\n/* 28 */,\n/* 29 */,\n/* 30 */,\n/* 31 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! ./CalendarMonthGrid */ 515);\n\n/***/ },\n/* 32 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! ./DayPickerNavigation */ 1313);\n\n/***/ }\n/******/ ]);\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dates/lib/components/DayPicker.js\n// module id = 241\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dates/lib/components/DayPicker.js?", + ); + + /***/ + }, + /* 242 */ + /* unknown exports provided */ + /* all exports used */ + /*!*************************************************************!*\ + !*** ./~/react-dates/lib/components/OutsideClickHandler.js ***! + \*************************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "module.exports =\n/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n\n\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ({\n\n/***/ 0:\n/***/ function(module, exports, __webpack_require__) {\n\n\tvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\n\tvar _createClass = function () {\n\t function defineProperties(target, props) {\n\t for (var i = 0; i < props.length; i++) {\n\t 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);\n\t }\n\t }return function (Constructor, protoProps, staticProps) {\n\t if (protoProps) defineProperties(Constructor.prototype, protoProps);if (staticProps) defineProperties(Constructor, staticProps);return Constructor;\n\t };\n\t}();\n\n\tvar _react = __webpack_require__(1);\n\n\tvar _react2 = _interopRequireDefault(_react);\n\n\tvar _reactDom = __webpack_require__(10);\n\n\tvar _reactDom2 = _interopRequireDefault(_reactDom);\n\n\tfunction _interopRequireDefault(obj) {\n\t return obj && obj.__esModule ? obj : { 'default': 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 _possibleConstructorReturn(self, call) {\n\t if (!self) {\n\t throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n\t }return call && ((typeof call === \"undefined\" ? \"undefined\" : _typeof(call)) === \"object\" || typeof call === \"function\") ? call : self;\n\t}\n\n\tfunction _inherits(subClass, superClass) {\n\t if (typeof superClass !== \"function\" && superClass !== null) {\n\t throw new TypeError(\"Super expression must either be null or a function, not \" + (typeof superClass === \"undefined\" ? \"undefined\" : _typeof(superClass)));\n\t }subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n\t}\n\n\tvar propTypes = {\n\t children: _react.PropTypes.node,\n\t onOutsideClick: _react.PropTypes.func\n\t};\n\n\tvar defaultProps = {\n\t children: _react2['default'].createElement('span', null),\n\t onOutsideClick: function () {\n\t function onOutsideClick() {}\n\n\t return onOutsideClick;\n\t }()\n\t};\n\n\tvar OutsideClickHandler = function (_React$Component) {\n\t _inherits(OutsideClickHandler, _React$Component);\n\n\t function OutsideClickHandler(props) {\n\t _classCallCheck(this, OutsideClickHandler);\n\n\t var _this = _possibleConstructorReturn(this, (OutsideClickHandler.__proto__ || Object.getPrototypeOf(OutsideClickHandler)).call(this, props));\n\n\t _this.onOutsideClick = _this.onOutsideClick.bind(_this);\n\t return _this;\n\t }\n\n\t _createClass(OutsideClickHandler, [{\n\t key: 'componentDidMount',\n\t value: function () {\n\t function componentDidMount() {\n\t if (document.addEventListener) {\n\t // `useCapture` flag is set to true so that a `stopPropagation` in the children will\n\t // not prevent all outside click handlers from firing - maja\n\t document.addEventListener('click', this.onOutsideClick, true);\n\t } else {\n\t document.attachEvent('onclick', this.onOutsideClick);\n\t }\n\t }\n\n\t return componentDidMount;\n\t }()\n\t }, {\n\t key: 'componentWillUnmount',\n\t value: function () {\n\t function componentWillUnmount() {\n\t if (document.removeEventListener) {\n\t document.removeEventListener('click', this.onOutsideClick, true);\n\t } else {\n\t document.detachEvent('onclick', this.onOutsideClick);\n\t }\n\t }\n\n\t return componentWillUnmount;\n\t }()\n\t }, {\n\t key: 'onOutsideClick',\n\t value: function () {\n\t function onOutsideClick(e) {\n\t var isDescendantOfRoot = _reactDom2['default'].findDOMNode(this.refs.childNode).contains(e.target);\n\t if (!isDescendantOfRoot) {\n\t this.props.onOutsideClick(e);\n\t }\n\t }\n\n\t return onOutsideClick;\n\t }()\n\t }, {\n\t key: 'render',\n\t value: function () {\n\t function render() {\n\t return _react2['default'].createElement('div', { ref: 'childNode' }, this.props.children);\n\t }\n\n\t return render;\n\t }()\n\t }]);\n\n\t return OutsideClickHandler;\n\t}(_react2['default'].Component);\n\n\texports['default'] = OutsideClickHandler;\n\n\tOutsideClickHandler.propTypes = propTypes;\n\tOutsideClickHandler.defaultProps = defaultProps;\n\n/***/ },\n\n/***/ 1:\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! react */ 1);\n\n/***/ },\n\n/***/ 10:\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! react-dom */ 16);\n\n/***/ }\n\n/******/ });\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dates/lib/components/OutsideClickHandler.js\n// module id = 242\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dates/lib/components/OutsideClickHandler.js?", + ); + + /***/ + }, + /* 243 */ + /* unknown exports provided */ + /* all exports used */ + /*!****************************************************!*\ + !*** ./~/react-dates/lib/utils/toISODateString.js ***! + \****************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "Object.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports['default'] = toLocalizedDateString;\n\nvar _moment = __webpack_require__(/*! moment */ 3);\n\nvar _moment2 = _interopRequireDefault(_moment);\n\nvar _toMomentObject = __webpack_require__(/*! ./toMomentObject */ 122);\n\nvar _toMomentObject2 = _interopRequireDefault(_toMomentObject);\n\nvar _constants = __webpack_require__(/*! ../../constants */ 29);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nfunction toLocalizedDateString(date, currentFormat) {\n var dateObj = _moment2['default'].isMoment(date) ? date : (0, _toMomentObject2['default'])(date, currentFormat);\n if (!dateObj) return null;\n\n return dateObj.format(_constants.ISO_FORMAT);\n}\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dates/lib/utils/toISODateString.js\n// module id = 243\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dates/lib/utils/toISODateString.js?", + ); + + /***/ + }, + /* 244 */ + /* unknown exports provided */ + /* all exports used */ + /*!**********************************************************!*\ + !*** ./~/react-dates/lib/utils/toLocalizedDateString.js ***! + \**********************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "Object.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports['default'] = toLocalizedDateString;\n\nvar _moment = __webpack_require__(/*! moment */ 3);\n\nvar _moment2 = _interopRequireDefault(_moment);\n\nvar _toMomentObject = __webpack_require__(/*! ./toMomentObject */ 122);\n\nvar _toMomentObject2 = _interopRequireDefault(_toMomentObject);\n\nvar _constants = __webpack_require__(/*! ../../constants */ 29);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nfunction toLocalizedDateString(date, currentFormat) {\n var dateObj = _moment2['default'].isMoment(date) ? date : (0, _toMomentObject2['default'])(date, currentFormat);\n if (!dateObj) return null;\n\n return dateObj.format(_constants.DISPLAY_FORMAT);\n}\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dates/lib/utils/toLocalizedDateString.js\n// module id = 244\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dates/lib/utils/toLocalizedDateString.js?", + ); + + /***/ + }, + /* 245 */ + /* unknown exports provided */ + /* all exports used */ + /*!**************************************************!*\ + !*** ./~/react-dom/lib/DOMChildrenOperations.js ***! + \**************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar DOMLazyTree = __webpack_require__(/*! ./DOMLazyTree */ 100);\nvar Danger = __webpack_require__(/*! ./Danger */ 1322);\nvar ReactDOMComponentTree = __webpack_require__(/*! ./ReactDOMComponentTree */ 24);\nvar ReactInstrumentation = __webpack_require__(/*! ./ReactInstrumentation */ 35);\n\nvar createMicrosoftUnsafeLocalFunction = __webpack_require__(/*! ./createMicrosoftUnsafeLocalFunction */ 253);\nvar setInnerHTML = __webpack_require__(/*! ./setInnerHTML */ 173);\nvar setTextContent = __webpack_require__(/*! ./setTextContent */ 555);\n\nfunction getNodeAfter(parentNode, node) {\n // Special case for text components, which return [open, close] comments\n // from getHostNode.\n if (Array.isArray(node)) {\n node = node[1];\n }\n return node ? node.nextSibling : parentNode.firstChild;\n}\n\n/**\n * Inserts `childNode` as a child of `parentNode` at the `index`.\n *\n * @param {DOMElement} parentNode Parent node in which to insert.\n * @param {DOMElement} childNode Child node to insert.\n * @param {number} index Index at which to insert the child.\n * @internal\n */\nvar insertChildAt = createMicrosoftUnsafeLocalFunction(function (parentNode, childNode, referenceNode) {\n // We rely exclusively on `insertBefore(node, null)` instead of also using\n // `appendChild(node)`. (Using `undefined` is not allowed by all browsers so\n // we are careful to use `null`.)\n parentNode.insertBefore(childNode, referenceNode);\n});\n\nfunction insertLazyTreeChildAt(parentNode, childTree, referenceNode) {\n DOMLazyTree.insertTreeBefore(parentNode, childTree, referenceNode);\n}\n\nfunction moveChild(parentNode, childNode, referenceNode) {\n if (Array.isArray(childNode)) {\n moveDelimitedText(parentNode, childNode[0], childNode[1], referenceNode);\n } else {\n insertChildAt(parentNode, childNode, referenceNode);\n }\n}\n\nfunction removeChild(parentNode, childNode) {\n if (Array.isArray(childNode)) {\n var closingComment = childNode[1];\n childNode = childNode[0];\n removeDelimitedText(parentNode, childNode, closingComment);\n parentNode.removeChild(closingComment);\n }\n parentNode.removeChild(childNode);\n}\n\nfunction moveDelimitedText(parentNode, openingComment, closingComment, referenceNode) {\n var node = openingComment;\n while (true) {\n var nextNode = node.nextSibling;\n insertChildAt(parentNode, node, referenceNode);\n if (node === closingComment) {\n break;\n }\n node = nextNode;\n }\n}\n\nfunction removeDelimitedText(parentNode, startNode, closingComment) {\n while (true) {\n var node = startNode.nextSibling;\n if (node === closingComment) {\n // The closing comment is removed by ReactMultiChild.\n break;\n } else {\n parentNode.removeChild(node);\n }\n }\n}\n\nfunction replaceDelimitedText(openingComment, closingComment, stringText) {\n var parentNode = openingComment.parentNode;\n var nodeAfterComment = openingComment.nextSibling;\n if (nodeAfterComment === closingComment) {\n // There are no text nodes between the opening and closing comments; insert\n // a new one if stringText isn't empty.\n if (stringText) {\n insertChildAt(parentNode, document.createTextNode(stringText), nodeAfterComment);\n }\n } else {\n if (stringText) {\n // Set the text content of the first node after the opening comment, and\n // remove all following nodes up until the closing comment.\n setTextContent(nodeAfterComment, stringText);\n removeDelimitedText(parentNode, nodeAfterComment, closingComment);\n } else {\n removeDelimitedText(parentNode, openingComment, closingComment);\n }\n }\n\n if (true) {\n ReactInstrumentation.debugTool.onHostOperation({\n instanceID: ReactDOMComponentTree.getInstanceFromNode(openingComment)._debugID,\n type: 'replace text',\n payload: stringText\n });\n }\n}\n\nvar dangerouslyReplaceNodeWithMarkup = Danger.dangerouslyReplaceNodeWithMarkup;\nif (true) {\n dangerouslyReplaceNodeWithMarkup = function (oldChild, markup, prevInstance) {\n Danger.dangerouslyReplaceNodeWithMarkup(oldChild, markup);\n if (prevInstance._debugID !== 0) {\n ReactInstrumentation.debugTool.onHostOperation({\n instanceID: prevInstance._debugID,\n type: 'replace with',\n payload: markup.toString()\n });\n } else {\n var nextInstance = ReactDOMComponentTree.getInstanceFromNode(markup.node);\n if (nextInstance._debugID !== 0) {\n ReactInstrumentation.debugTool.onHostOperation({\n instanceID: nextInstance._debugID,\n type: 'mount',\n payload: markup.toString()\n });\n }\n }\n };\n}\n\n/**\n * Operations for updating with DOM children.\n */\nvar DOMChildrenOperations = {\n\n dangerouslyReplaceNodeWithMarkup: dangerouslyReplaceNodeWithMarkup,\n\n replaceDelimitedText: replaceDelimitedText,\n\n /**\n * Updates a component's children by processing a series of updates. The\n * update configurations are each expected to have a `parentNode` property.\n *\n * @param {array<object>} updates List of update configurations.\n * @internal\n */\n processUpdates: function (parentNode, updates) {\n if (true) {\n var parentNodeDebugID = ReactDOMComponentTree.getInstanceFromNode(parentNode)._debugID;\n }\n\n for (var k = 0; k < updates.length; k++) {\n var update = updates[k];\n switch (update.type) {\n case 'INSERT_MARKUP':\n insertLazyTreeChildAt(parentNode, update.content, getNodeAfter(parentNode, update.afterNode));\n if (true) {\n ReactInstrumentation.debugTool.onHostOperation({\n instanceID: parentNodeDebugID,\n type: 'insert child',\n payload: { toIndex: update.toIndex, content: update.content.toString() }\n });\n }\n break;\n case 'MOVE_EXISTING':\n moveChild(parentNode, update.fromNode, getNodeAfter(parentNode, update.afterNode));\n if (true) {\n ReactInstrumentation.debugTool.onHostOperation({\n instanceID: parentNodeDebugID,\n type: 'move child',\n payload: { fromIndex: update.fromIndex, toIndex: update.toIndex }\n });\n }\n break;\n case 'SET_MARKUP':\n setInnerHTML(parentNode, update.content);\n if (true) {\n ReactInstrumentation.debugTool.onHostOperation({\n instanceID: parentNodeDebugID,\n type: 'replace children',\n payload: update.content.toString()\n });\n }\n break;\n case 'TEXT_CONTENT':\n setTextContent(parentNode, update.content);\n if (true) {\n ReactInstrumentation.debugTool.onHostOperation({\n instanceID: parentNodeDebugID,\n type: 'replace text',\n payload: update.content.toString()\n });\n }\n break;\n case 'REMOVE_NODE':\n removeChild(parentNode, update.fromNode);\n if (true) {\n ReactInstrumentation.debugTool.onHostOperation({\n instanceID: parentNodeDebugID,\n type: 'remove child',\n payload: { fromIndex: update.fromIndex }\n });\n }\n break;\n }\n }\n }\n\n};\n\nmodule.exports = DOMChildrenOperations;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/DOMChildrenOperations.js\n// module id = 245\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/DOMChildrenOperations.js?", + ); + + /***/ + }, + /* 246 */ + /* unknown exports provided */ + /* all exports used */ + /*!******************************************!*\ + !*** ./~/react-dom/lib/DOMNamespaces.js ***! + \******************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar DOMNamespaces = {\n html: 'http://www.w3.org/1999/xhtml',\n mathml: 'http://www.w3.org/1998/Math/MathML',\n svg: 'http://www.w3.org/2000/svg'\n};\n\nmodule.exports = DOMNamespaces;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/DOMNamespaces.js\n// module id = 246\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/DOMNamespaces.js?", + ); + + /***/ + }, + /* 247 */ + /* unknown exports provided */ + /* all exports used */ + /*!*********************************************!*\ + !*** ./~/react-dom/lib/EventPluginUtils.js ***! + \*********************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar _prodInvariant = __webpack_require__(/*! ./reactProdInvariant */ 17);\n\nvar ReactErrorUtils = __webpack_require__(/*! ./ReactErrorUtils */ 251);\n\nvar invariant = __webpack_require__(/*! fbjs/lib/invariant */ 12);\nvar warning = __webpack_require__(/*! fbjs/lib/warning */ 13);\n\n/**\n * Injected dependencies:\n */\n\n/**\n * - `ComponentTree`: [required] Module that can convert between React instances\n * and actual node references.\n */\nvar ComponentTree;\nvar TreeTraversal;\nvar injection = {\n injectComponentTree: function (Injected) {\n ComponentTree = Injected;\n if (true) {\n true ? warning(Injected && Injected.getNodeFromInstance && Injected.getInstanceFromNode, 'EventPluginUtils.injection.injectComponentTree(...): Injected ' + 'module is missing getNodeFromInstance or getInstanceFromNode.') : void 0;\n }\n },\n injectTreeTraversal: function (Injected) {\n TreeTraversal = Injected;\n if (true) {\n true ? warning(Injected && Injected.isAncestor && Injected.getLowestCommonAncestor, 'EventPluginUtils.injection.injectTreeTraversal(...): Injected ' + 'module is missing isAncestor or getLowestCommonAncestor.') : void 0;\n }\n }\n};\n\nfunction isEndish(topLevelType) {\n return topLevelType === 'topMouseUp' || topLevelType === 'topTouchEnd' || topLevelType === 'topTouchCancel';\n}\n\nfunction isMoveish(topLevelType) {\n return topLevelType === 'topMouseMove' || topLevelType === 'topTouchMove';\n}\nfunction isStartish(topLevelType) {\n return topLevelType === 'topMouseDown' || topLevelType === 'topTouchStart';\n}\n\nvar validateEventDispatches;\nif (true) {\n validateEventDispatches = function (event) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchInstances = event._dispatchInstances;\n\n var listenersIsArr = Array.isArray(dispatchListeners);\n var listenersLen = listenersIsArr ? dispatchListeners.length : dispatchListeners ? 1 : 0;\n\n var instancesIsArr = Array.isArray(dispatchInstances);\n var instancesLen = instancesIsArr ? dispatchInstances.length : dispatchInstances ? 1 : 0;\n\n true ? warning(instancesIsArr === listenersIsArr && instancesLen === listenersLen, 'EventPluginUtils: Invalid `event`.') : void 0;\n };\n}\n\n/**\n * Dispatch the event to the listener.\n * @param {SyntheticEvent} event SyntheticEvent to handle\n * @param {boolean} simulated If the event is simulated (changes exn behavior)\n * @param {function} listener Application-level callback\n * @param {*} inst Internal component instance\n */\nfunction executeDispatch(event, simulated, listener, inst) {\n var type = event.type || 'unknown-event';\n event.currentTarget = EventPluginUtils.getNodeFromInstance(inst);\n if (simulated) {\n ReactErrorUtils.invokeGuardedCallbackWithCatch(type, listener, event);\n } else {\n ReactErrorUtils.invokeGuardedCallback(type, listener, event);\n }\n event.currentTarget = null;\n}\n\n/**\n * Standard/simple iteration through an event's collected dispatches.\n */\nfunction executeDispatchesInOrder(event, simulated) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchInstances = event._dispatchInstances;\n if (true) {\n validateEventDispatches(event);\n }\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n }\n // Listeners and Instances are two parallel arrays that are always in sync.\n executeDispatch(event, simulated, dispatchListeners[i], dispatchInstances[i]);\n }\n } else if (dispatchListeners) {\n executeDispatch(event, simulated, dispatchListeners, dispatchInstances);\n }\n event._dispatchListeners = null;\n event._dispatchInstances = null;\n}\n\n/**\n * Standard/simple iteration through an event's collected dispatches, but stops\n * at the first dispatch execution returning true, and returns that id.\n *\n * @return {?string} id of the first dispatch execution who's listener returns\n * true, or null if no listener returned true.\n */\nfunction executeDispatchesInOrderStopAtTrueImpl(event) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchInstances = event._dispatchInstances;\n if (true) {\n validateEventDispatches(event);\n }\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n }\n // Listeners and Instances are two parallel arrays that are always in sync.\n if (dispatchListeners[i](event, dispatchInstances[i])) {\n return dispatchInstances[i];\n }\n }\n } else if (dispatchListeners) {\n if (dispatchListeners(event, dispatchInstances)) {\n return dispatchInstances;\n }\n }\n return null;\n}\n\n/**\n * @see executeDispatchesInOrderStopAtTrueImpl\n */\nfunction executeDispatchesInOrderStopAtTrue(event) {\n var ret = executeDispatchesInOrderStopAtTrueImpl(event);\n event._dispatchInstances = null;\n event._dispatchListeners = null;\n return ret;\n}\n\n/**\n * Execution of a \"direct\" dispatch - there must be at most one dispatch\n * accumulated on the event or it is considered an error. It doesn't really make\n * sense for an event with multiple dispatches (bubbled) to keep track of the\n * return values at each dispatch execution, but it does tend to make sense when\n * dealing with \"direct\" dispatches.\n *\n * @return {*} The return value of executing the single dispatch.\n */\nfunction executeDirectDispatch(event) {\n if (true) {\n validateEventDispatches(event);\n }\n var dispatchListener = event._dispatchListeners;\n var dispatchInstance = event._dispatchInstances;\n !!Array.isArray(dispatchListener) ? true ? invariant(false, 'executeDirectDispatch(...): Invalid `event`.') : _prodInvariant('103') : void 0;\n event.currentTarget = dispatchListener ? EventPluginUtils.getNodeFromInstance(dispatchInstance) : null;\n var res = dispatchListener ? dispatchListener(event) : null;\n event.currentTarget = null;\n event._dispatchListeners = null;\n event._dispatchInstances = null;\n return res;\n}\n\n/**\n * @param {SyntheticEvent} event\n * @return {boolean} True iff number of dispatches accumulated is greater than 0.\n */\nfunction hasDispatches(event) {\n return !!event._dispatchListeners;\n}\n\n/**\n * General utilities that are useful in creating custom Event Plugins.\n */\nvar EventPluginUtils = {\n isEndish: isEndish,\n isMoveish: isMoveish,\n isStartish: isStartish,\n\n executeDirectDispatch: executeDirectDispatch,\n executeDispatchesInOrder: executeDispatchesInOrder,\n executeDispatchesInOrderStopAtTrue: executeDispatchesInOrderStopAtTrue,\n hasDispatches: hasDispatches,\n\n getInstanceFromNode: function (node) {\n return ComponentTree.getInstanceFromNode(node);\n },\n getNodeFromInstance: function (node) {\n return ComponentTree.getNodeFromInstance(node);\n },\n isAncestor: function (a, b) {\n return TreeTraversal.isAncestor(a, b);\n },\n getLowestCommonAncestor: function (a, b) {\n return TreeTraversal.getLowestCommonAncestor(a, b);\n },\n getParentInstance: function (inst) {\n return TreeTraversal.getParentInstance(inst);\n },\n traverseTwoPhase: function (target, fn, arg) {\n return TreeTraversal.traverseTwoPhase(target, fn, arg);\n },\n traverseEnterLeave: function (from, to, fn, argFrom, argTo) {\n return TreeTraversal.traverseEnterLeave(from, to, fn, argFrom, argTo);\n },\n\n injection: injection\n};\n\nmodule.exports = EventPluginUtils;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/EventPluginUtils.js\n// module id = 247\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/EventPluginUtils.js?", + ); + + /***/ + }, + /* 248 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************************!*\ + !*** ./~/react-dom/lib/KeyEscapeUtils.js ***! + \*******************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * \n */\n\n\n\n/**\n * Escape and wrap key so it is safe to use as a reactid\n *\n * @param {string} key to be escaped.\n * @return {string} the escaped key.\n */\n\nfunction escape(key) {\n var escapeRegex = /[=:]/g;\n var escaperLookup = {\n '=': '=0',\n ':': '=2'\n };\n var escapedString = ('' + key).replace(escapeRegex, function (match) {\n return escaperLookup[match];\n });\n\n return '$' + escapedString;\n}\n\n/**\n * Unescape and unwrap key for human-readable display\n *\n * @param {string} key to unescape.\n * @return {string} the unescaped key.\n */\nfunction unescape(key) {\n var unescapeRegex = /(=0|=2)/g;\n var unescaperLookup = {\n '=0': '=',\n '=2': ':'\n };\n var keySubstring = key[0] === '.' && key[1] === '$' ? key.substring(2) : key.substring(1);\n\n return ('' + keySubstring).replace(unescapeRegex, function (match) {\n return unescaperLookup[match];\n });\n}\n\nvar KeyEscapeUtils = {\n escape: escape,\n unescape: unescape\n};\n\nmodule.exports = KeyEscapeUtils;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/KeyEscapeUtils.js\n// module id = 248\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/KeyEscapeUtils.js?", + ); + + /***/ + }, + /* 249 */ + /* unknown exports provided */ + /* all exports used */ + /*!*********************************************!*\ + !*** ./~/react-dom/lib/LinkedValueUtils.js ***! + \*********************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar _prodInvariant = __webpack_require__(/*! ./reactProdInvariant */ 17);\n\nvar React = __webpack_require__(/*! react/lib/React */ 83);\nvar ReactPropTypesSecret = __webpack_require__(/*! ./ReactPropTypesSecret */ 546);\n\nvar invariant = __webpack_require__(/*! fbjs/lib/invariant */ 12);\nvar warning = __webpack_require__(/*! fbjs/lib/warning */ 13);\n\nvar hasReadOnlyValue = {\n 'button': true,\n 'checkbox': true,\n 'image': true,\n 'hidden': true,\n 'radio': true,\n 'reset': true,\n 'submit': true\n};\n\nfunction _assertSingleLink(inputProps) {\n !(inputProps.checkedLink == null || inputProps.valueLink == null) ? true ? invariant(false, 'Cannot provide a checkedLink and a valueLink. If you want to use checkedLink, you probably don\\'t want to use valueLink and vice versa.') : _prodInvariant('87') : void 0;\n}\nfunction _assertValueLink(inputProps) {\n _assertSingleLink(inputProps);\n !(inputProps.value == null && inputProps.onChange == null) ? true ? invariant(false, 'Cannot provide a valueLink and a value or onChange event. If you want to use value or onChange, you probably don\\'t want to use valueLink.') : _prodInvariant('88') : void 0;\n}\n\nfunction _assertCheckedLink(inputProps) {\n _assertSingleLink(inputProps);\n !(inputProps.checked == null && inputProps.onChange == null) ? true ? invariant(false, 'Cannot provide a checkedLink and a checked property or onChange event. If you want to use checked or onChange, you probably don\\'t want to use checkedLink') : _prodInvariant('89') : void 0;\n}\n\nvar propTypes = {\n value: function (props, propName, componentName) {\n if (!props[propName] || hasReadOnlyValue[props.type] || props.onChange || props.readOnly || props.disabled) {\n return null;\n }\n return new Error('You provided a `value` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultValue`. Otherwise, ' + 'set either `onChange` or `readOnly`.');\n },\n checked: function (props, propName, componentName) {\n if (!props[propName] || props.onChange || props.readOnly || props.disabled) {\n return null;\n }\n return new Error('You provided a `checked` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultChecked`. Otherwise, ' + 'set either `onChange` or `readOnly`.');\n },\n onChange: React.PropTypes.func\n};\n\nvar loggedTypeFailures = {};\nfunction getDeclarationErrorAddendum(owner) {\n if (owner) {\n var name = owner.getName();\n if (name) {\n return ' Check the render method of `' + name + '`.';\n }\n }\n return '';\n}\n\n/**\n * Provide a linked `value` attribute for controlled forms. You should not use\n * this outside of the ReactDOM controlled form components.\n */\nvar LinkedValueUtils = {\n checkPropTypes: function (tagName, props, owner) {\n for (var propName in propTypes) {\n if (propTypes.hasOwnProperty(propName)) {\n var error = propTypes[propName](props, propName, tagName, 'prop', null, ReactPropTypesSecret);\n }\n if (error instanceof Error && !(error.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error.message] = true;\n\n var addendum = getDeclarationErrorAddendum(owner);\n true ? warning(false, 'Failed form propType: %s%s', error.message, addendum) : void 0;\n }\n }\n },\n\n /**\n * @param {object} inputProps Props for form component\n * @return {*} current value of the input either from value prop or link.\n */\n getValue: function (inputProps) {\n if (inputProps.valueLink) {\n _assertValueLink(inputProps);\n return inputProps.valueLink.value;\n }\n return inputProps.value;\n },\n\n /**\n * @param {object} inputProps Props for form component\n * @return {*} current checked status of the input either from checked prop\n * or link.\n */\n getChecked: function (inputProps) {\n if (inputProps.checkedLink) {\n _assertCheckedLink(inputProps);\n return inputProps.checkedLink.value;\n }\n return inputProps.checked;\n },\n\n /**\n * @param {object} inputProps Props for form component\n * @param {SyntheticEvent} event change event to handle\n */\n executeOnChange: function (inputProps, event) {\n if (inputProps.valueLink) {\n _assertValueLink(inputProps);\n return inputProps.valueLink.requestChange(event.target.value);\n } else if (inputProps.checkedLink) {\n _assertCheckedLink(inputProps);\n return inputProps.checkedLink.requestChange(event.target.checked);\n } else if (inputProps.onChange) {\n return inputProps.onChange.call(undefined, event);\n }\n }\n};\n\nmodule.exports = LinkedValueUtils;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/LinkedValueUtils.js\n// module id = 249\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/LinkedValueUtils.js?", + ); + + /***/ + }, + /* 250 */ + /* unknown exports provided */ + /* all exports used */ + /*!******************************************************!*\ + !*** ./~/react-dom/lib/ReactComponentEnvironment.js ***! + \******************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2014-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * \n */\n\n\n\nvar _prodInvariant = __webpack_require__(/*! ./reactProdInvariant */ 17);\n\nvar invariant = __webpack_require__(/*! fbjs/lib/invariant */ 12);\n\nvar injected = false;\n\nvar ReactComponentEnvironment = {\n\n /**\n * Optionally injectable hook for swapping out mount images in the middle of\n * the tree.\n */\n replaceNodeWithMarkup: null,\n\n /**\n * Optionally injectable hook for processing a queue of child updates. Will\n * later move into MultiChildComponents.\n */\n processChildrenUpdates: null,\n\n injection: {\n injectEnvironment: function (environment) {\n !!injected ? true ? invariant(false, 'ReactCompositeComponent: injectEnvironment() can only be called once.') : _prodInvariant('104') : void 0;\n ReactComponentEnvironment.replaceNodeWithMarkup = environment.replaceNodeWithMarkup;\n ReactComponentEnvironment.processChildrenUpdates = environment.processChildrenUpdates;\n injected = true;\n }\n }\n\n};\n\nmodule.exports = ReactComponentEnvironment;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/ReactComponentEnvironment.js\n// module id = 250\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/ReactComponentEnvironment.js?", + ); + + /***/ + }, + /* 251 */ + /* unknown exports provided */ + /* all exports used */ + /*!********************************************!*\ + !*** ./~/react-dom/lib/ReactErrorUtils.js ***! + \********************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * \n */\n\n\n\nvar caughtError = null;\n\n/**\n * Call a function while guarding against errors that happens within it.\n *\n * @param {String} name of the guard to use for logging or debugging\n * @param {Function} func The function to invoke\n * @param {*} a First argument\n * @param {*} b Second argument\n */\nfunction invokeGuardedCallback(name, func, a) {\n try {\n func(a);\n } catch (x) {\n if (caughtError === null) {\n caughtError = x;\n }\n }\n}\n\nvar ReactErrorUtils = {\n invokeGuardedCallback: invokeGuardedCallback,\n\n /**\n * Invoked by ReactTestUtils.Simulate so that any errors thrown by the event\n * handler are sure to be rethrown by rethrowCaughtError.\n */\n invokeGuardedCallbackWithCatch: invokeGuardedCallback,\n\n /**\n * During execution of guarded functions we will capture the first error which\n * we will rethrow to be handled by the top level error handler.\n */\n rethrowCaughtError: function () {\n if (caughtError) {\n var error = caughtError;\n caughtError = null;\n throw error;\n }\n }\n};\n\nif (true) {\n /**\n * To help development we can get better devtools integration by simulating a\n * real browser event.\n */\n if (typeof window !== 'undefined' && typeof window.dispatchEvent === 'function' && typeof document !== 'undefined' && typeof document.createEvent === 'function') {\n var fakeNode = document.createElement('react');\n ReactErrorUtils.invokeGuardedCallback = function (name, func, a) {\n var boundFunc = func.bind(null, a);\n var evtType = 'react-' + name;\n fakeNode.addEventListener(evtType, boundFunc, false);\n var evt = document.createEvent('Event');\n // $FlowFixMe https://github.com/facebook/flow/issues/2336\n evt.initEvent(evtType, false, false);\n fakeNode.dispatchEvent(evt);\n fakeNode.removeEventListener(evtType, boundFunc, false);\n };\n }\n}\n\nmodule.exports = ReactErrorUtils;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/ReactErrorUtils.js\n// module id = 251\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/ReactErrorUtils.js?", + ); + + /***/ + }, + /* 252 */ + /* unknown exports provided */ + /* all exports used */ + /*!*********************************************!*\ + !*** ./~/react-dom/lib/ReactUpdateQueue.js ***! + \*********************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2015-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar _prodInvariant = __webpack_require__(/*! ./reactProdInvariant */ 17);\n\nvar ReactCurrentOwner = __webpack_require__(/*! react/lib/ReactCurrentOwner */ 55);\nvar ReactInstanceMap = __webpack_require__(/*! ./ReactInstanceMap */ 125);\nvar ReactInstrumentation = __webpack_require__(/*! ./ReactInstrumentation */ 35);\nvar ReactUpdates = __webpack_require__(/*! ./ReactUpdates */ 47);\n\nvar invariant = __webpack_require__(/*! fbjs/lib/invariant */ 12);\nvar warning = __webpack_require__(/*! fbjs/lib/warning */ 13);\n\nfunction enqueueUpdate(internalInstance) {\n ReactUpdates.enqueueUpdate(internalInstance);\n}\n\nfunction formatUnexpectedArgument(arg) {\n var type = typeof arg;\n if (type !== 'object') {\n return type;\n }\n var displayName = arg.constructor && arg.constructor.name || type;\n var keys = Object.keys(arg);\n if (keys.length > 0 && keys.length < 20) {\n return displayName + ' (keys: ' + keys.join(', ') + ')';\n }\n return displayName;\n}\n\nfunction getInternalInstanceReadyForUpdate(publicInstance, callerName) {\n var internalInstance = ReactInstanceMap.get(publicInstance);\n if (!internalInstance) {\n if (true) {\n var ctor = publicInstance.constructor;\n // Only warn when we have a callerName. Otherwise we should be silent.\n // We're probably calling from enqueueCallback. We don't want to warn\n // there because we already warned for the corresponding lifecycle method.\n true ? warning(!callerName, '%s(...): Can only update a mounted or mounting component. ' + 'This usually means you called %s() on an unmounted component. ' + 'This is a no-op. Please check the code for the %s component.', callerName, callerName, ctor && (ctor.displayName || ctor.name) || 'ReactClass') : void 0;\n }\n return null;\n }\n\n if (true) {\n true ? warning(ReactCurrentOwner.current == null, '%s(...): Cannot update during an existing state transition (such as ' + 'within `render` or another component\\'s constructor). Render methods ' + 'should be a pure function of props and state; constructor ' + 'side-effects are an anti-pattern, but can be moved to ' + '`componentWillMount`.', callerName) : void 0;\n }\n\n return internalInstance;\n}\n\n/**\n * ReactUpdateQueue allows for state updates to be scheduled into a later\n * reconciliation step.\n */\nvar ReactUpdateQueue = {\n\n /**\n * Checks whether or not this composite component is mounted.\n * @param {ReactClass} publicInstance The instance we want to test.\n * @return {boolean} True if mounted, false otherwise.\n * @protected\n * @final\n */\n isMounted: function (publicInstance) {\n if (true) {\n var owner = ReactCurrentOwner.current;\n if (owner !== null) {\n true ? warning(owner._warnedAboutRefsInRender, '%s is accessing isMounted inside its render() function. ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', owner.getName() || 'A component') : void 0;\n owner._warnedAboutRefsInRender = true;\n }\n }\n var internalInstance = ReactInstanceMap.get(publicInstance);\n if (internalInstance) {\n // During componentWillMount and render this will still be null but after\n // that will always render to something. At least for now. So we can use\n // this hack.\n return !!internalInstance._renderedComponent;\n } else {\n return false;\n }\n },\n\n /**\n * Enqueue a callback that will be executed after all the pending updates\n * have processed.\n *\n * @param {ReactClass} publicInstance The instance to use as `this` context.\n * @param {?function} callback Called after state is updated.\n * @param {string} callerName Name of the calling function in the public API.\n * @internal\n */\n enqueueCallback: function (publicInstance, callback, callerName) {\n ReactUpdateQueue.validateCallback(callback, callerName);\n var internalInstance = getInternalInstanceReadyForUpdate(publicInstance);\n\n // Previously we would throw an error if we didn't have an internal\n // instance. Since we want to make it a no-op instead, we mirror the same\n // behavior we have in other enqueue* methods.\n // We also need to ignore callbacks in componentWillMount. See\n // enqueueUpdates.\n if (!internalInstance) {\n return null;\n }\n\n if (internalInstance._pendingCallbacks) {\n internalInstance._pendingCallbacks.push(callback);\n } else {\n internalInstance._pendingCallbacks = [callback];\n }\n // TODO: The callback here is ignored when setState is called from\n // componentWillMount. Either fix it or disallow doing so completely in\n // favor of getInitialState. Alternatively, we can disallow\n // componentWillMount during server-side rendering.\n enqueueUpdate(internalInstance);\n },\n\n enqueueCallbackInternal: function (internalInstance, callback) {\n if (internalInstance._pendingCallbacks) {\n internalInstance._pendingCallbacks.push(callback);\n } else {\n internalInstance._pendingCallbacks = [callback];\n }\n enqueueUpdate(internalInstance);\n },\n\n /**\n * Forces an update. This should only be invoked when it is known with\n * certainty that we are **not** in a DOM transaction.\n *\n * You may want to call this when you know that some deeper aspect of the\n * component's state has changed but `setState` was not called.\n *\n * This will not invoke `shouldComponentUpdate`, but it will invoke\n * `componentWillUpdate` and `componentDidUpdate`.\n *\n * @param {ReactClass} publicInstance The instance that should rerender.\n * @internal\n */\n enqueueForceUpdate: function (publicInstance) {\n var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, 'forceUpdate');\n\n if (!internalInstance) {\n return;\n }\n\n internalInstance._pendingForceUpdate = true;\n\n enqueueUpdate(internalInstance);\n },\n\n /**\n * Replaces all of the state. Always use this or `setState` to mutate state.\n * You should treat `this.state` as immutable.\n *\n * There is no guarantee that `this.state` will be immediately updated, so\n * accessing `this.state` after calling this method may return the old value.\n *\n * @param {ReactClass} publicInstance The instance that should rerender.\n * @param {object} completeState Next state.\n * @internal\n */\n enqueueReplaceState: function (publicInstance, completeState) {\n var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, 'replaceState');\n\n if (!internalInstance) {\n return;\n }\n\n internalInstance._pendingStateQueue = [completeState];\n internalInstance._pendingReplaceState = true;\n\n enqueueUpdate(internalInstance);\n },\n\n /**\n * Sets a subset of the state. This only exists because _pendingState is\n * internal. This provides a merging strategy that is not available to deep\n * properties which is confusing. TODO: Expose pendingState or don't use it\n * during the merge.\n *\n * @param {ReactClass} publicInstance The instance that should rerender.\n * @param {object} partialState Next partial state to be merged with state.\n * @internal\n */\n enqueueSetState: function (publicInstance, partialState) {\n if (true) {\n ReactInstrumentation.debugTool.onSetState();\n true ? warning(partialState != null, 'setState(...): You passed an undefined or null state object; ' + 'instead, use forceUpdate().') : void 0;\n }\n\n var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, 'setState');\n\n if (!internalInstance) {\n return;\n }\n\n var queue = internalInstance._pendingStateQueue || (internalInstance._pendingStateQueue = []);\n queue.push(partialState);\n\n enqueueUpdate(internalInstance);\n },\n\n enqueueElementInternal: function (internalInstance, nextElement, nextContext) {\n internalInstance._pendingElement = nextElement;\n // TODO: introduce _pendingContext instead of setting it directly.\n internalInstance._context = nextContext;\n enqueueUpdate(internalInstance);\n },\n\n validateCallback: function (callback, callerName) {\n !(!callback || typeof callback === 'function') ? true ? invariant(false, '%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.', callerName, formatUnexpectedArgument(callback)) : _prodInvariant('122', callerName, formatUnexpectedArgument(callback)) : void 0;\n }\n\n};\n\nmodule.exports = ReactUpdateQueue;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/ReactUpdateQueue.js\n// module id = 252\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/ReactUpdateQueue.js?", + ); + + /***/ + }, + /* 253 */ + /* unknown exports provided */ + /* all exports used */ + /*!***************************************************************!*\ + !*** ./~/react-dom/lib/createMicrosoftUnsafeLocalFunction.js ***! + \***************************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n/* globals MSApp */\n\n\n\n/**\n * Create a function which has 'unsafe' privileges (required by windows8 apps)\n */\n\nvar createMicrosoftUnsafeLocalFunction = function (func) {\n if (typeof MSApp !== 'undefined' && MSApp.execUnsafeLocalFunction) {\n return function (arg0, arg1, arg2, arg3) {\n MSApp.execUnsafeLocalFunction(function () {\n return func(arg0, arg1, arg2, arg3);\n });\n };\n } else {\n return func;\n }\n};\n\nmodule.exports = createMicrosoftUnsafeLocalFunction;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/createMicrosoftUnsafeLocalFunction.js\n// module id = 253\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/createMicrosoftUnsafeLocalFunction.js?", + ); + + /***/ + }, + /* 254 */ + /* unknown exports provided */ + /* all exports used */ + /*!*********************************************!*\ + !*** ./~/react-dom/lib/getEventCharCode.js ***! + \*********************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\n/**\n * `charCode` represents the actual "character code" and is safe to use with\n * `String.fromCharCode`. As such, only keys that correspond to printable\n * characters produce a valid `charCode`, the only exception to this is Enter.\n * The Tab-key is considered non-printable and does not have a `charCode`,\n * presumably because it does not produce a tab-character in browsers.\n *\n * @param {object} nativeEvent Native browser event.\n * @return {number} Normalized `charCode` property.\n */\n\nfunction getEventCharCode(nativeEvent) {\n var charCode;\n var keyCode = nativeEvent.keyCode;\n\n if (\'charCode\' in nativeEvent) {\n charCode = nativeEvent.charCode;\n\n // FF does not set `charCode` for the Enter-key, check against `keyCode`.\n if (charCode === 0 && keyCode === 13) {\n charCode = 13;\n }\n } else {\n // IE8 does not implement `charCode`, but `keyCode` has the correct value.\n charCode = keyCode;\n }\n\n // Some non-printable keys are reported in `charCode`/`keyCode`, discard them.\n // Must not discard the (non-)printable Enter-key.\n if (charCode >= 32 || charCode === 13) {\n return charCode;\n }\n\n return 0;\n}\n\nmodule.exports = getEventCharCode;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/getEventCharCode.js\n// module id = 254\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/getEventCharCode.js?', + ); + + /***/ + }, + /* 255 */ + /* unknown exports provided */ + /* all exports used */ + /*!**************************************************!*\ + !*** ./~/react-dom/lib/getEventModifierState.js ***! + \**************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\n/**\n * Translation from modifier key to the associated property in the event.\n * @see http://www.w3.org/TR/DOM-Level-3-Events/#keys-Modifiers\n */\n\nvar modifierKeyToProp = {\n 'Alt': 'altKey',\n 'Control': 'ctrlKey',\n 'Meta': 'metaKey',\n 'Shift': 'shiftKey'\n};\n\n// IE8 does not implement getModifierState so we simply map it to the only\n// modifier keys exposed by the event itself, does not support Lock-keys.\n// Currently, all major browsers except Chrome seems to support Lock-keys.\nfunction modifierStateGetter(keyArg) {\n var syntheticEvent = this;\n var nativeEvent = syntheticEvent.nativeEvent;\n if (nativeEvent.getModifierState) {\n return nativeEvent.getModifierState(keyArg);\n }\n var keyProp = modifierKeyToProp[keyArg];\n return keyProp ? !!nativeEvent[keyProp] : false;\n}\n\nfunction getEventModifierState(nativeEvent) {\n return modifierStateGetter;\n}\n\nmodule.exports = getEventModifierState;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/getEventModifierState.js\n// module id = 255\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/getEventModifierState.js?", + ); + + /***/ + }, + /* 256 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************************!*\ + !*** ./~/react-dom/lib/getEventTarget.js ***! + \*******************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\n/**\n * Gets the target node from a native browser event by accounting for\n * inconsistencies in browser DOM APIs.\n *\n * @param {object} nativeEvent Native browser event.\n * @return {DOMEventTarget} Target node.\n */\n\nfunction getEventTarget(nativeEvent) {\n var target = nativeEvent.target || nativeEvent.srcElement || window;\n\n // Normalize SVG <use> element events #4963\n if (target.correspondingUseElement) {\n target = target.correspondingUseElement;\n }\n\n // Safari may fire events on text nodes (Node.TEXT_NODE is 3).\n // @see http://www.quirksmode.org/js/events_properties.html\n return target.nodeType === 3 ? target.parentNode : target;\n}\n\nmodule.exports = getEventTarget;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/getEventTarget.js\n// module id = 256\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/getEventTarget.js?', + ); + + /***/ + }, + /* 257 */ + /* unknown exports provided */ + /* all exports used */ + /*!******************************************************!*\ + !*** ./~/react-dom/lib/instantiateReactComponent.js ***! + \******************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar _prodInvariant = __webpack_require__(/*! ./reactProdInvariant */ 17),\n _assign = __webpack_require__(/*! object-assign */ 21);\n\nvar ReactCompositeComponent = __webpack_require__(/*! ./ReactCompositeComponent */ 1329);\nvar ReactEmptyComponent = __webpack_require__(/*! ./ReactEmptyComponent */ 539);\nvar ReactHostComponent = __webpack_require__(/*! ./ReactHostComponent */ 541);\n\nvar getNextDebugID = __webpack_require__(/*! ./getNextDebugID */ 1380);\nvar invariant = __webpack_require__(/*! fbjs/lib/invariant */ 12);\nvar warning = __webpack_require__(/*! fbjs/lib/warning */ 13);\n\n// To avoid a cyclic dependency, we create the final class in this module\nvar ReactCompositeComponentWrapper = function (element) {\n this.construct(element);\n};\n_assign(ReactCompositeComponentWrapper.prototype, ReactCompositeComponent, {\n _instantiateReactComponent: instantiateReactComponent\n});\n\nfunction getDeclarationErrorAddendum(owner) {\n if (owner) {\n var name = owner.getName();\n if (name) {\n return ' Check the render method of `' + name + '`.';\n }\n }\n return '';\n}\n\n/**\n * Check if the type reference is a known internal type. I.e. not a user\n * provided composite type.\n *\n * @param {function} type\n * @return {boolean} Returns true if this is a valid internal type.\n */\nfunction isInternalComponentType(type) {\n return typeof type === 'function' && typeof type.prototype !== 'undefined' && typeof type.prototype.mountComponent === 'function' && typeof type.prototype.receiveComponent === 'function';\n}\n\n/**\n * Given a ReactNode, create an instance that will actually be mounted.\n *\n * @param {ReactNode} node\n * @param {boolean} shouldHaveDebugID\n * @return {object} A new instance of the element's constructor.\n * @protected\n */\nfunction instantiateReactComponent(node, shouldHaveDebugID) {\n var instance;\n\n if (node === null || node === false) {\n instance = ReactEmptyComponent.create(instantiateReactComponent);\n } else if (typeof node === 'object') {\n var element = node;\n var type = element.type;\n if (typeof type !== 'function' && typeof type !== 'string') {\n var info = '';\n if (true) {\n if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {\n info += ' You likely forgot to export your component from the file ' + 'it\\'s defined in.';\n }\n }\n info += getDeclarationErrorAddendum(element._owner);\n true ? true ? invariant(false, 'Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s', type == null ? type : typeof type, info) : _prodInvariant('130', type == null ? type : typeof type, info) : void 0;\n }\n\n // Special case string values\n if (typeof element.type === 'string') {\n instance = ReactHostComponent.createInternalComponent(element);\n } else if (isInternalComponentType(element.type)) {\n // This is temporarily available for custom components that are not string\n // representations. I.e. ART. Once those are updated to use the string\n // representation, we can drop this code path.\n instance = new element.type(element);\n\n // We renamed this. Allow the old name for compat. :(\n if (!instance.getHostNode) {\n instance.getHostNode = instance.getNativeNode;\n }\n } else {\n instance = new ReactCompositeComponentWrapper(element);\n }\n } else if (typeof node === 'string' || typeof node === 'number') {\n instance = ReactHostComponent.createInstanceForText(node);\n } else {\n true ? true ? invariant(false, 'Encountered invalid React node of type %s', typeof node) : _prodInvariant('131', typeof node) : void 0;\n }\n\n if (true) {\n true ? warning(typeof instance.mountComponent === 'function' && typeof instance.receiveComponent === 'function' && typeof instance.getHostNode === 'function' && typeof instance.unmountComponent === 'function', 'Only React Components can be mounted.') : void 0;\n }\n\n // These two fields are used by the DOM and ART diffing algorithms\n // respectively. Instead of using expandos on components, we should be\n // storing the state needed by the diffing algorithms elsewhere.\n instance._mountIndex = 0;\n instance._mountImage = null;\n\n if (true) {\n instance._debugID = shouldHaveDebugID ? getNextDebugID() : 0;\n }\n\n // Internal instances should fully constructed at this point, so they should\n // not get any new fields added to them at this point.\n if (true) {\n if (Object.preventExtensions) {\n Object.preventExtensions(instance);\n }\n }\n\n return instance;\n}\n\nmodule.exports = instantiateReactComponent;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/instantiateReactComponent.js\n// module id = 257\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/instantiateReactComponent.js?", + ); + + /***/ + }, + /* 258 */ + /* unknown exports provided */ + /* all exports used */ + /*!*********************************************!*\ + !*** ./~/react-dom/lib/isEventSupported.js ***! + \*********************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar ExecutionEnvironment = __webpack_require__(/*! fbjs/lib/ExecutionEnvironment */ 27);\n\nvar useHasFeature;\nif (ExecutionEnvironment.canUseDOM) {\n useHasFeature = document.implementation && document.implementation.hasFeature &&\n // always returns true in newer browsers as per the standard.\n // @see http://dom.spec.whatwg.org/#dom-domimplementation-hasfeature\n document.implementation.hasFeature('', '') !== true;\n}\n\n/**\n * Checks if an event is supported in the current execution environment.\n *\n * NOTE: This will not work correctly for non-generic events such as `change`,\n * `reset`, `load`, `error`, and `select`.\n *\n * Borrows from Modernizr.\n *\n * @param {string} eventNameSuffix Event name, e.g. \"click\".\n * @param {?boolean} capture Check if the capture phase is supported.\n * @return {boolean} True if the event is supported.\n * @internal\n * @license Modernizr 3.0.0pre (Custom Build) | MIT\n */\nfunction isEventSupported(eventNameSuffix, capture) {\n if (!ExecutionEnvironment.canUseDOM || capture && !('addEventListener' in document)) {\n return false;\n }\n\n var eventName = 'on' + eventNameSuffix;\n var isSupported = eventName in document;\n\n if (!isSupported) {\n var element = document.createElement('div');\n element.setAttribute(eventName, 'return;');\n isSupported = typeof element[eventName] === 'function';\n }\n\n if (!isSupported && useHasFeature && eventNameSuffix === 'wheel') {\n // This is the only way to test support for the `wheel` event in IE9+.\n isSupported = document.implementation.hasFeature('Events.wheel', '3.0');\n }\n\n return isSupported;\n}\n\nmodule.exports = isEventSupported;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/isEventSupported.js\n// module id = 258\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/isEventSupported.js?", + ); + + /***/ + }, + /* 259 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************************************!*\ + !*** ./~/react-dom/lib/shouldUpdateReactComponent.js ***! + \*******************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\n/**\n * Given a `prevElement` and `nextElement`, determines if the existing\n * instance should be updated as opposed to being destroyed or replaced by a new\n * instance. Both arguments are elements. This ensures that this logic can\n * operate on stateless trees without any backing instance.\n *\n * @param {?object} prevElement\n * @param {?object} nextElement\n * @return {boolean} True if the existing instance should be updated.\n * @protected\n */\n\nfunction shouldUpdateReactComponent(prevElement, nextElement) {\n var prevEmpty = prevElement === null || prevElement === false;\n var nextEmpty = nextElement === null || nextElement === false;\n if (prevEmpty || nextEmpty) {\n return prevEmpty === nextEmpty;\n }\n\n var prevType = typeof prevElement;\n var nextType = typeof nextElement;\n if (prevType === 'string' || prevType === 'number') {\n return nextType === 'string' || nextType === 'number';\n } else {\n return nextType === 'object' && prevElement.type === nextElement.type && prevElement.key === nextElement.key;\n }\n}\n\nmodule.exports = shouldUpdateReactComponent;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/shouldUpdateReactComponent.js\n// module id = 259\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/shouldUpdateReactComponent.js?", + ); + + /***/ + }, + /* 260 */ + /* unknown exports provided */ + /* all exports used */ + /*!***********************************************!*\ + !*** ./~/react-dom/lib/validateDOMNesting.js ***! + \***********************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2015-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar _assign = __webpack_require__(/*! object-assign */ 21);\n\nvar emptyFunction = __webpack_require__(/*! fbjs/lib/emptyFunction */ 40);\nvar warning = __webpack_require__(/*! fbjs/lib/warning */ 13);\n\nvar validateDOMNesting = emptyFunction;\n\nif (true) {\n // This validation code was written based on the HTML5 parsing spec:\n // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope\n //\n // Note: this does not catch all invalid nesting, nor does it try to (as it's\n // not clear what practical benefit doing so provides); instead, we warn only\n // for cases where the parser will give a parse tree differing from what React\n // intended. For example, <b><div></div></b> is invalid but we don't warn\n // because it still parses correctly; we do warn for other cases like nested\n // <p> tags where the beginning of the second element implicitly closes the\n // first, causing a confusing mess.\n\n // https://html.spec.whatwg.org/multipage/syntax.html#special\n var specialTags = ['address', 'applet', 'area', 'article', 'aside', 'base', 'basefont', 'bgsound', 'blockquote', 'body', 'br', 'button', 'caption', 'center', 'col', 'colgroup', 'dd', 'details', 'dir', 'div', 'dl', 'dt', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'frame', 'frameset', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'iframe', 'img', 'input', 'isindex', 'li', 'link', 'listing', 'main', 'marquee', 'menu', 'menuitem', 'meta', 'nav', 'noembed', 'noframes', 'noscript', 'object', 'ol', 'p', 'param', 'plaintext', 'pre', 'script', 'section', 'select', 'source', 'style', 'summary', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'title', 'tr', 'track', 'ul', 'wbr', 'xmp'];\n\n // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope\n var inScopeTags = ['applet', 'caption', 'html', 'table', 'td', 'th', 'marquee', 'object', 'template',\n\n // https://html.spec.whatwg.org/multipage/syntax.html#html-integration-point\n // TODO: Distinguish by namespace here -- for <title>, including it here\n // errs on the side of fewer warnings\n 'foreignObject', 'desc', 'title'];\n\n // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-button-scope\n var buttonScopeTags = inScopeTags.concat(['button']);\n\n // https://html.spec.whatwg.org/multipage/syntax.html#generate-implied-end-tags\n var impliedEndTags = ['dd', 'dt', 'li', 'option', 'optgroup', 'p', 'rp', 'rt'];\n\n var emptyAncestorInfo = {\n current: null,\n\n formTag: null,\n aTagInScope: null,\n buttonTagInScope: null,\n nobrTagInScope: null,\n pTagInButtonScope: null,\n\n listItemTagAutoclosing: null,\n dlItemTagAutoclosing: null\n };\n\n var updatedAncestorInfo = function (oldInfo, tag, instance) {\n var ancestorInfo = _assign({}, oldInfo || emptyAncestorInfo);\n var info = { tag: tag, instance: instance };\n\n if (inScopeTags.indexOf(tag) !== -1) {\n ancestorInfo.aTagInScope = null;\n ancestorInfo.buttonTagInScope = null;\n ancestorInfo.nobrTagInScope = null;\n }\n if (buttonScopeTags.indexOf(tag) !== -1) {\n ancestorInfo.pTagInButtonScope = null;\n }\n\n // See rules for 'li', 'dd', 'dt' start tags in\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody\n if (specialTags.indexOf(tag) !== -1 && tag !== 'address' && tag !== 'div' && tag !== 'p') {\n ancestorInfo.listItemTagAutoclosing = null;\n ancestorInfo.dlItemTagAutoclosing = null;\n }\n\n ancestorInfo.current = info;\n\n if (tag === 'form') {\n ancestorInfo.formTag = info;\n }\n if (tag === 'a') {\n ancestorInfo.aTagInScope = info;\n }\n if (tag === 'button') {\n ancestorInfo.buttonTagInScope = info;\n }\n if (tag === 'nobr') {\n ancestorInfo.nobrTagInScope = info;\n }\n if (tag === 'p') {\n ancestorInfo.pTagInButtonScope = info;\n }\n if (tag === 'li') {\n ancestorInfo.listItemTagAutoclosing = info;\n }\n if (tag === 'dd' || tag === 'dt') {\n ancestorInfo.dlItemTagAutoclosing = info;\n }\n\n return ancestorInfo;\n };\n\n /**\n * Returns whether\n */\n var isTagValidWithParent = function (tag, parentTag) {\n // First, let's check if we're in an unusual parsing mode...\n switch (parentTag) {\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inselect\n case 'select':\n return tag === 'option' || tag === 'optgroup' || tag === '#text';\n case 'optgroup':\n return tag === 'option' || tag === '#text';\n // Strictly speaking, seeing an <option> doesn't mean we're in a <select>\n // but\n case 'option':\n return tag === '#text';\n\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intd\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incaption\n // No special behavior since these rules fall back to \"in body\" mode for\n // all except special table nodes which cause bad parsing behavior anyway.\n\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intr\n case 'tr':\n return tag === 'th' || tag === 'td' || tag === 'style' || tag === 'script' || tag === 'template';\n\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intbody\n case 'tbody':\n case 'thead':\n case 'tfoot':\n return tag === 'tr' || tag === 'style' || tag === 'script' || tag === 'template';\n\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incolgroup\n case 'colgroup':\n return tag === 'col' || tag === 'template';\n\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intable\n case 'table':\n return tag === 'caption' || tag === 'colgroup' || tag === 'tbody' || tag === 'tfoot' || tag === 'thead' || tag === 'style' || tag === 'script' || tag === 'template';\n\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inhead\n case 'head':\n return tag === 'base' || tag === 'basefont' || tag === 'bgsound' || tag === 'link' || tag === 'meta' || tag === 'title' || tag === 'noscript' || tag === 'noframes' || tag === 'style' || tag === 'script' || tag === 'template';\n\n // https://html.spec.whatwg.org/multipage/semantics.html#the-html-element\n case 'html':\n return tag === 'head' || tag === 'body';\n case '#document':\n return tag === 'html';\n }\n\n // Probably in the \"in body\" parsing mode, so we outlaw only tag combos\n // where the parsing rules cause implicit opens or closes to be added.\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody\n switch (tag) {\n case 'h1':\n case 'h2':\n case 'h3':\n case 'h4':\n case 'h5':\n case 'h6':\n return parentTag !== 'h1' && parentTag !== 'h2' && parentTag !== 'h3' && parentTag !== 'h4' && parentTag !== 'h5' && parentTag !== 'h6';\n\n case 'rp':\n case 'rt':\n return impliedEndTags.indexOf(parentTag) === -1;\n\n case 'body':\n case 'caption':\n case 'col':\n case 'colgroup':\n case 'frame':\n case 'head':\n case 'html':\n case 'tbody':\n case 'td':\n case 'tfoot':\n case 'th':\n case 'thead':\n case 'tr':\n // These tags are only valid with a few parents that have special child\n // parsing rules -- if we're down here, then none of those matched and\n // so we allow it only if we don't know what the parent is, as all other\n // cases are invalid.\n return parentTag == null;\n }\n\n return true;\n };\n\n /**\n * Returns whether\n */\n var findInvalidAncestorForTag = function (tag, ancestorInfo) {\n switch (tag) {\n case 'address':\n case 'article':\n case 'aside':\n case 'blockquote':\n case 'center':\n case 'details':\n case 'dialog':\n case 'dir':\n case 'div':\n case 'dl':\n case 'fieldset':\n case 'figcaption':\n case 'figure':\n case 'footer':\n case 'header':\n case 'hgroup':\n case 'main':\n case 'menu':\n case 'nav':\n case 'ol':\n case 'p':\n case 'section':\n case 'summary':\n case 'ul':\n\n case 'pre':\n case 'listing':\n\n case 'table':\n\n case 'hr':\n\n case 'xmp':\n\n case 'h1':\n case 'h2':\n case 'h3':\n case 'h4':\n case 'h5':\n case 'h6':\n return ancestorInfo.pTagInButtonScope;\n\n case 'form':\n return ancestorInfo.formTag || ancestorInfo.pTagInButtonScope;\n\n case 'li':\n return ancestorInfo.listItemTagAutoclosing;\n\n case 'dd':\n case 'dt':\n return ancestorInfo.dlItemTagAutoclosing;\n\n case 'button':\n return ancestorInfo.buttonTagInScope;\n\n case 'a':\n // Spec says something about storing a list of markers, but it sounds\n // equivalent to this check.\n return ancestorInfo.aTagInScope;\n\n case 'nobr':\n return ancestorInfo.nobrTagInScope;\n }\n\n return null;\n };\n\n /**\n * Given a ReactCompositeComponent instance, return a list of its recursive\n * owners, starting at the root and ending with the instance itself.\n */\n var findOwnerStack = function (instance) {\n if (!instance) {\n return [];\n }\n\n var stack = [];\n do {\n stack.push(instance);\n } while (instance = instance._currentElement._owner);\n stack.reverse();\n return stack;\n };\n\n var didWarn = {};\n\n validateDOMNesting = function (childTag, childText, childInstance, ancestorInfo) {\n ancestorInfo = ancestorInfo || emptyAncestorInfo;\n var parentInfo = ancestorInfo.current;\n var parentTag = parentInfo && parentInfo.tag;\n\n if (childText != null) {\n true ? warning(childTag == null, 'validateDOMNesting: when childText is passed, childTag should be null') : void 0;\n childTag = '#text';\n }\n\n var invalidParent = isTagValidWithParent(childTag, parentTag) ? null : parentInfo;\n var invalidAncestor = invalidParent ? null : findInvalidAncestorForTag(childTag, ancestorInfo);\n var problematic = invalidParent || invalidAncestor;\n\n if (problematic) {\n var ancestorTag = problematic.tag;\n var ancestorInstance = problematic.instance;\n\n var childOwner = childInstance && childInstance._currentElement._owner;\n var ancestorOwner = ancestorInstance && ancestorInstance._currentElement._owner;\n\n var childOwners = findOwnerStack(childOwner);\n var ancestorOwners = findOwnerStack(ancestorOwner);\n\n var minStackLen = Math.min(childOwners.length, ancestorOwners.length);\n var i;\n\n var deepestCommon = -1;\n for (i = 0; i < minStackLen; i++) {\n if (childOwners[i] === ancestorOwners[i]) {\n deepestCommon = i;\n } else {\n break;\n }\n }\n\n var UNKNOWN = '(unknown)';\n var childOwnerNames = childOwners.slice(deepestCommon + 1).map(function (inst) {\n return inst.getName() || UNKNOWN;\n });\n var ancestorOwnerNames = ancestorOwners.slice(deepestCommon + 1).map(function (inst) {\n return inst.getName() || UNKNOWN;\n });\n var ownerInfo = [].concat(\n // If the parent and child instances have a common owner ancestor, start\n // with that -- otherwise we just start with the parent's owners.\n deepestCommon !== -1 ? childOwners[deepestCommon].getName() || UNKNOWN : [], ancestorOwnerNames, ancestorTag,\n // If we're warning about an invalid (non-parent) ancestry, add '...'\n invalidAncestor ? ['...'] : [], childOwnerNames, childTag).join(' > ');\n\n var warnKey = !!invalidParent + '|' + childTag + '|' + ancestorTag + '|' + ownerInfo;\n if (didWarn[warnKey]) {\n return;\n }\n didWarn[warnKey] = true;\n\n var tagDisplayName = childTag;\n var whitespaceInfo = '';\n if (childTag === '#text') {\n if (/\\S/.test(childText)) {\n tagDisplayName = 'Text nodes';\n } else {\n tagDisplayName = 'Whitespace text nodes';\n whitespaceInfo = ' Make sure you don\\'t have any extra whitespace between tags on ' + 'each line of your source code.';\n }\n } else {\n tagDisplayName = '<' + childTag + '>';\n }\n\n if (invalidParent) {\n var info = '';\n if (ancestorTag === 'table' && childTag === 'tr') {\n info += ' Add a <tbody> to your code to match the DOM tree generated by ' + 'the browser.';\n }\n true ? warning(false, 'validateDOMNesting(...): %s cannot appear as a child of <%s>.%s ' + 'See %s.%s', tagDisplayName, ancestorTag, whitespaceInfo, ownerInfo, info) : void 0;\n } else {\n true ? warning(false, 'validateDOMNesting(...): %s cannot appear as a descendant of ' + '<%s>. See %s.', tagDisplayName, ancestorTag, ownerInfo) : void 0;\n }\n }\n };\n\n validateDOMNesting.updatedAncestorInfo = updatedAncestorInfo;\n\n // For testing\n validateDOMNesting.isTagValidInContext = function (tag, ancestorInfo) {\n ancestorInfo = ancestorInfo || emptyAncestorInfo;\n var parentInfo = ancestorInfo.current;\n var parentTag = parentInfo && parentInfo.tag;\n return isTagValidWithParent(tag, parentTag) && !findInvalidAncestorForTag(tag, ancestorInfo);\n };\n}\n\nmodule.exports = validateDOMNesting;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/validateDOMNesting.js\n// module id = 260\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/validateDOMNesting.js?", + ); + + /***/ + }, + /* 261 */ + /* unknown exports provided */ + /* exports used: OverlayView, Circle, Marker, GoogleMapLoader, GoogleMap */ + /*!******************************************!*\ + !*** ./~/react-google-maps/lib/index.js ***! + \******************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\n\nfunction _interopRequire(obj) { return obj && obj.__esModule ? obj["default"] : obj; }\n\nvar _GoogleMapLoader = __webpack_require__(/*! ./GoogleMapLoader */ 558);\n\nexports.GoogleMapLoader = _interopRequire(_GoogleMapLoader);\n\nvar _GoogleMap = __webpack_require__(/*! ./GoogleMap */ 1388);\n\nexports.GoogleMap = _interopRequire(_GoogleMap);\n\nvar _Circle = __webpack_require__(/*! ./Circle */ 1385);\n\nexports.Circle = _interopRequire(_Circle);\n\nvar _DirectionsRenderer = __webpack_require__(/*! ./DirectionsRenderer */ 1386);\n\nexports.DirectionsRenderer = _interopRequire(_DirectionsRenderer);\n\nvar _DrawingManager = __webpack_require__(/*! ./DrawingManager */ 1387);\n\nexports.DrawingManager = _interopRequire(_DrawingManager);\n\nvar _InfoWindow = __webpack_require__(/*! ./InfoWindow */ 1389);\n\nexports.InfoWindow = _interopRequire(_InfoWindow);\n\nvar _KmlLayer = __webpack_require__(/*! ./KmlLayer */ 1390);\n\nexports.KmlLayer = _interopRequire(_KmlLayer);\n\nvar _Marker = __webpack_require__(/*! ./Marker */ 1391);\n\nexports.Marker = _interopRequire(_Marker);\n\nvar _OverlayView = __webpack_require__(/*! ./OverlayView */ 1392);\n\nexports.OverlayView = _interopRequire(_OverlayView);\n\nvar _Polygon = __webpack_require__(/*! ./Polygon */ 1393);\n\nexports.Polygon = _interopRequire(_Polygon);\n\nvar _Polyline = __webpack_require__(/*! ./Polyline */ 1394);\n\nexports.Polyline = _interopRequire(_Polyline);\n\nvar _Rectangle = __webpack_require__(/*! ./Rectangle */ 1395);\n\nexports.Rectangle = _interopRequire(_Rectangle);\n\nvar _SearchBox = __webpack_require__(/*! ./SearchBox */ 1396);\n\nexports.SearchBox = _interopRequire(_SearchBox);\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-google-maps/lib/index.js\n// module id = 261\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-google-maps/lib/index.js?', + ); + + /***/ + }, + /* 262 */ + /* unknown exports provided */ + /* all exports used */ + /*!*****************************************************************!*\ + !*** ./~/react-on-rails/node_package/lib/createReactElement.js ***! + \*****************************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = createReactElement;\n\nvar _react = __webpack_require__(/*! react */ 1);\n\nvar _react2 = _interopRequireDefault(_react);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Logic to either call the generatorFunction or call React.createElement to get the\n * React.Component\n * @param options\n * @param options.componentObj\n * @param options.props\n * @param options.domNodeId\n * @param options.trace\n * @param options.location\n * @returns {Element}\n */\nfunction createReactElement(_ref) {\n var componentObj = _ref.componentObj,\n props = _ref.props,\n railsContext = _ref.railsContext,\n domNodeId = _ref.domNodeId,\n trace = _ref.trace;\n var name = componentObj.name,\n component = componentObj.component,\n generatorFunction = componentObj.generatorFunction;\n\n\n if (trace) {\n if (railsContext && railsContext.serverSide) {\n console.log('RENDERED ' + name + ' to dom node with id: ' + domNodeId + ' with railsContext:', railsContext);\n } else {\n console.log('RENDERED ' + name + ' to dom node with id: ' + domNodeId + ' with props, railsContext:', props, railsContext);\n }\n }\n\n if (generatorFunction) {\n return component(props, railsContext);\n }\n\n return _react2.default.createElement(component, props);\n} /* eslint-disable react/prop-types */\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-on-rails/node_package/lib/createReactElement.js\n// module id = 262\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-on-rails/node_package/lib/createReactElement.js?", + ); + + /***/ + }, + /* 263 */ + /* unknown exports provided */ + /* all exports used */ + /*!****************************************************!*\ + !*** ./~/react-overlays/lib/utils/getContainer.js ***! + \****************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = getContainer;\n\nvar _reactDom = __webpack_require__(/*! react-dom */ 16);\n\nvar _reactDom2 = _interopRequireDefault(_reactDom);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction getContainer(container, defaultContainer) {\n container = typeof container === 'function' ? container() : container;\n return _reactDom2.default.findDOMNode(container) || defaultContainer;\n}\nmodule.exports = exports['default'];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-overlays/lib/utils/getContainer.js\n// module id = 263\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-overlays/lib/utils/getContainer.js?", + ); + + /***/ + }, + /* 264 */ + /* unknown exports provided */ + /* all exports used */ + /*!******************************************************!*\ + !*** ./~/react-prop-types/lib/componentOrElement.js ***! + \******************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nexports.__esModule = true;\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol ? \"symbol\" : typeof obj; };\n\nvar _react = __webpack_require__(/*! react */ 1);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _createChainableTypeChecker = __webpack_require__(/*! ./utils/createChainableTypeChecker */ 176);\n\nvar _createChainableTypeChecker2 = _interopRequireDefault(_createChainableTypeChecker);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = typeof propValue === 'undefined' ? 'undefined' : _typeof(propValue);\n\n if (_react2.default.isValidElement(propValue)) {\n return new Error('Invalid ' + location + ' `' + propFullName + '` of type ReactElement ' + ('supplied to `' + componentName + '`, expected a ReactComponent or a ') + 'DOMElement. You can usually obtain a ReactComponent or DOMElement ' + 'from a ReactElement by attaching a ref to it.');\n }\n\n if ((propType !== 'object' || typeof propValue.render !== 'function') && propValue.nodeType !== 1) {\n return new Error('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected a ReactComponent or a ') + 'DOMElement.');\n }\n\n return null;\n}\n\nexports.default = (0, _createChainableTypeChecker2.default)(validate);\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-prop-types/lib/componentOrElement.js\n// module id = 264\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-prop-types/lib/componentOrElement.js?", + ); + + /***/ + }, + /* 265 */ + /* exports provided: default */ + /* exports used: default */ + /*!*******************************************!*\ + !*** ./~/react-redux/es/utils/warning.js ***! + \*******************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony export (immutable) */ __webpack_exports__["a"] = warning;\n/**\n * Prints a warning in the console if it exists.\n *\n * @param {String} message The warning message.\n * @returns {void}\n */\nfunction warning(message) {\n /* eslint-disable no-console */\n if (typeof console !== \'undefined\' && typeof console.error === \'function\') {\n console.error(message);\n }\n /* eslint-enable no-console */\n try {\n // This error was thrown as a convenience so that if you enable\n // "break on all exceptions" in your console,\n // it would pause the execution at this line.\n throw new Error(message);\n /* eslint-disable no-empty */\n } catch (e) {}\n /* eslint-enable no-empty */\n}\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-redux/es/utils/warning.js\n// module id = 265\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-redux/es/utils/warning.js?', + ); + + /***/ + }, + /* 266 */ + /* exports provided: loopAsync, mapAsync */ + /* exports used: mapAsync, loopAsync */ + /*!*****************************************!*\ + !*** ./~/react-router/es/AsyncUtils.js ***! + \*****************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony export (immutable) */ __webpack_exports__["b"] = loopAsync;\n/* harmony export (immutable) */ __webpack_exports__["a"] = mapAsync;\nfunction loopAsync(turns, work, callback) {\n var currentTurn = 0,\n isDone = false;\n var sync = false,\n hasNext = false,\n doneArgs = void 0;\n\n function done() {\n isDone = true;\n if (sync) {\n // Iterate instead of recursing if possible.\n doneArgs = [].concat(Array.prototype.slice.call(arguments));\n return;\n }\n\n callback.apply(this, arguments);\n }\n\n function next() {\n if (isDone) {\n return;\n }\n\n hasNext = true;\n if (sync) {\n // Iterate instead of recursing if possible.\n return;\n }\n\n sync = true;\n\n while (!isDone && currentTurn < turns && hasNext) {\n hasNext = false;\n work.call(this, currentTurn++, next, done);\n }\n\n sync = false;\n\n if (isDone) {\n // This means the loop finished synchronously.\n callback.apply(this, doneArgs);\n return;\n }\n\n if (currentTurn >= turns && hasNext) {\n isDone = true;\n callback();\n }\n }\n\n next();\n}\n\nfunction mapAsync(array, work, callback) {\n var length = array.length;\n var values = [];\n\n if (length === 0) return callback(null, values);\n\n var isDone = false,\n doneCount = 0;\n\n function done(index, error, value) {\n if (isDone) return;\n\n if (error) {\n isDone = true;\n callback(error);\n } else {\n values[index] = value;\n\n isDone = ++doneCount === length;\n\n if (isDone) callback(null, values);\n }\n }\n\n array.forEach(function (item, index) {\n work(item, index, function (error, value) {\n done(index, error, value);\n });\n });\n}\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-router/es/AsyncUtils.js\n// module id = 266\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-router/es/AsyncUtils.js?', + ); + + /***/ + }, + /* 267 */ + /* exports provided: ContextProvider, ContextSubscriber */ + /* exports used: ContextProvider, ContextSubscriber */ + /*!*******************************************!*\ + !*** ./~/react-router/es/ContextUtils.js ***! + \*******************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = ContextProvider;\n/* harmony export (immutable) */ __webpack_exports__[\"b\"] = ContextSubscriber;\n\n\n// Works around issues with context updates failing to propagate.\n// Caveat: the context value is expected to never change its identity.\n// https://github.com/facebook/react/issues/2517\n// https://github.com/reactjs/react-router/issues/470\n\nvar contextProviderShape = __WEBPACK_IMPORTED_MODULE_0_react__[\"PropTypes\"].shape({\n subscribe: __WEBPACK_IMPORTED_MODULE_0_react__[\"PropTypes\"].func.isRequired,\n eventIndex: __WEBPACK_IMPORTED_MODULE_0_react__[\"PropTypes\"].number.isRequired\n});\n\nfunction makeContextName(name) {\n return '@@contextSubscriber/' + name;\n}\n\nfunction ContextProvider(name) {\n var _childContextTypes, _ref2;\n\n var contextName = makeContextName(name);\n var listenersKey = contextName + '/listeners';\n var eventIndexKey = contextName + '/eventIndex';\n var subscribeKey = contextName + '/subscribe';\n\n return _ref2 = {\n childContextTypes: (_childContextTypes = {}, _childContextTypes[contextName] = contextProviderShape.isRequired, _childContextTypes),\n\n getChildContext: function getChildContext() {\n var _ref;\n\n return _ref = {}, _ref[contextName] = {\n eventIndex: this[eventIndexKey],\n subscribe: this[subscribeKey]\n }, _ref;\n },\n componentWillMount: function componentWillMount() {\n this[listenersKey] = [];\n this[eventIndexKey] = 0;\n },\n componentWillReceiveProps: function componentWillReceiveProps() {\n this[eventIndexKey]++;\n },\n componentDidUpdate: function componentDidUpdate() {\n var _this = this;\n\n this[listenersKey].forEach(function (listener) {\n return listener(_this[eventIndexKey]);\n });\n }\n }, _ref2[subscribeKey] = function (listener) {\n var _this2 = this;\n\n // No need to immediately call listener here.\n this[listenersKey].push(listener);\n\n return function () {\n _this2[listenersKey] = _this2[listenersKey].filter(function (item) {\n return item !== listener;\n });\n };\n }, _ref2;\n}\n\nfunction ContextSubscriber(name) {\n var _contextTypes, _ref4;\n\n var contextName = makeContextName(name);\n var lastRenderedEventIndexKey = contextName + '/lastRenderedEventIndex';\n var handleContextUpdateKey = contextName + '/handleContextUpdate';\n var unsubscribeKey = contextName + '/unsubscribe';\n\n return _ref4 = {\n contextTypes: (_contextTypes = {}, _contextTypes[contextName] = contextProviderShape, _contextTypes),\n\n getInitialState: function getInitialState() {\n var _ref3;\n\n if (!this.context[contextName]) {\n return {};\n }\n\n return _ref3 = {}, _ref3[lastRenderedEventIndexKey] = this.context[contextName].eventIndex, _ref3;\n },\n componentDidMount: function componentDidMount() {\n if (!this.context[contextName]) {\n return;\n }\n\n this[unsubscribeKey] = this.context[contextName].subscribe(this[handleContextUpdateKey]);\n },\n componentWillReceiveProps: function componentWillReceiveProps() {\n var _setState;\n\n if (!this.context[contextName]) {\n return;\n }\n\n this.setState((_setState = {}, _setState[lastRenderedEventIndexKey] = this.context[contextName].eventIndex, _setState));\n },\n componentWillUnmount: function componentWillUnmount() {\n if (!this[unsubscribeKey]) {\n return;\n }\n\n this[unsubscribeKey]();\n this[unsubscribeKey] = null;\n }\n }, _ref4[handleContextUpdateKey] = function (eventIndex) {\n if (eventIndex !== this.state[lastRenderedEventIndexKey]) {\n var _setState2;\n\n this.setState((_setState2 = {}, _setState2[lastRenderedEventIndexKey] = eventIndex, _setState2));\n }\n }, _ref4;\n}\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-router/es/ContextUtils.js\n// module id = 267\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-router/es/ContextUtils.js?", + ); + + /***/ + }, + /* 268 */ + /* exports provided: routerShape, locationShape */ + /* exports used: routerShape */ + /*!****************************************!*\ + !*** ./~/react-router/es/PropTypes.js ***! + \****************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return routerShape; });\n/* unused harmony export locationShape */\n\n\nvar func = __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func,\n object = __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].object,\n shape = __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].shape,\n string = __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].string;\n\n\nvar routerShape = shape({\n push: func.isRequired,\n replace: func.isRequired,\n go: func.isRequired,\n goBack: func.isRequired,\n goForward: func.isRequired,\n setRouteLeaveHook: func.isRequired,\n isActive: func.isRequired\n});\n\nvar locationShape = shape({\n pathname: string.isRequired,\n search: string.isRequired,\n state: object,\n action: string.isRequired,\n key: string\n});\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-router/es/PropTypes.js\n// module id = 268\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-router/es/PropTypes.js?', + ); + + /***/ + }, + /* 269 */ + /* exports provided: default */ + /* exports used: default */ + /*!********************************************!*\ + !*** ./~/react-router/es/RouterContext.js ***! + \********************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant__ = __webpack_require__(/*! invariant */ 25);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_invariant__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__getRouteParams__ = __webpack_require__(/*! ./getRouteParams */ 1458);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__ContextUtils__ = __webpack_require__(/*! ./ContextUtils */ 267);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__RouteUtils__ = __webpack_require__(/*! ./RouteUtils */ 68);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };\n\n\n\n\n\n\n\n\nvar _React$PropTypes = __WEBPACK_IMPORTED_MODULE_1_react___default.a.PropTypes,\n array = _React$PropTypes.array,\n func = _React$PropTypes.func,\n object = _React$PropTypes.object;\n\n/**\n * A <RouterContext> renders the component tree for a given router state\n * and sets the history object and the current location in context.\n */\n\nvar RouterContext = __WEBPACK_IMPORTED_MODULE_1_react___default.a.createClass({\n displayName: \'RouterContext\',\n\n\n mixins: [__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__ContextUtils__["a" /* ContextProvider */])(\'router\')],\n\n propTypes: {\n router: object.isRequired,\n location: object.isRequired,\n routes: array.isRequired,\n params: object.isRequired,\n components: array.isRequired,\n createElement: func.isRequired\n },\n\n getDefaultProps: function getDefaultProps() {\n return {\n createElement: __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement\n };\n },\n\n\n childContextTypes: {\n router: object.isRequired\n },\n\n getChildContext: function getChildContext() {\n return {\n router: this.props.router\n };\n },\n createElement: function createElement(component, props) {\n return component == null ? null : this.props.createElement(component, props);\n },\n render: function render() {\n var _this = this;\n\n var _props = this.props,\n location = _props.location,\n routes = _props.routes,\n params = _props.params,\n components = _props.components,\n router = _props.router;\n\n var element = null;\n\n if (components) {\n element = components.reduceRight(function (element, components, index) {\n if (components == null) return element; // Don\'t create new children; use the grandchildren.\n\n var route = routes[index];\n var routeParams = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__getRouteParams__["a" /* default */])(route, params);\n var props = {\n location: location,\n params: params,\n route: route,\n router: router,\n routeParams: routeParams,\n routes: routes\n };\n\n if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__RouteUtils__["a" /* isReactChildren */])(element)) {\n props.children = element;\n } else if (element) {\n for (var prop in element) {\n if (Object.prototype.hasOwnProperty.call(element, prop)) props[prop] = element[prop];\n }\n }\n\n if ((typeof components === \'undefined\' ? \'undefined\' : _typeof(components)) === \'object\') {\n var elements = {};\n\n for (var key in components) {\n if (Object.prototype.hasOwnProperty.call(components, key)) {\n // Pass through the key as a prop to createElement to allow\n // custom createElement functions to know which named component\n // they\'re rendering, for e.g. matching up to fetched data.\n elements[key] = _this.createElement(components[key], _extends({\n key: key }, props));\n }\n }\n\n return elements;\n }\n\n return _this.createElement(components, props);\n }, element);\n }\n\n !(element === null || element === false || __WEBPACK_IMPORTED_MODULE_1_react___default.a.isValidElement(element)) ? true ? __WEBPACK_IMPORTED_MODULE_0_invariant___default()(false, \'The root route must render a single element\') : invariant(false) : void 0;\n\n return element;\n }\n});\n\n/* harmony default export */ __webpack_exports__["a"] = (RouterContext);\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-router/es/RouterContext.js\n// module id = 269\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-router/es/RouterContext.js?', + ); + + /***/ + }, + /* 270 */ + /* unknown exports provided */ + /* all exports used */ + /*!***************************************!*\ + !*** ./~/react/lib/ReactComponent.js ***! + \***************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar _prodInvariant = __webpack_require__(/*! ./reactProdInvariant */ 85);\n\nvar ReactNoopUpdateQueue = __webpack_require__(/*! ./ReactNoopUpdateQueue */ 271);\n\nvar canDefineProperty = __webpack_require__(/*! ./canDefineProperty */ 273);\nvar emptyObject = __webpack_require__(/*! fbjs/lib/emptyObject */ 96);\nvar invariant = __webpack_require__(/*! fbjs/lib/invariant */ 12);\nvar warning = __webpack_require__(/*! fbjs/lib/warning */ 13);\n\n/**\n * Base class helpers for the updating state of a component.\n */\nfunction ReactComponent(props, context, updater) {\n this.props = props;\n this.context = context;\n this.refs = emptyObject;\n // We initialize the default updater but the real one gets injected by the\n // renderer.\n this.updater = updater || ReactNoopUpdateQueue;\n}\n\nReactComponent.prototype.isReactComponent = {};\n\n/**\n * Sets a subset of the state. Always use this to mutate\n * state. You should treat `this.state` as immutable.\n *\n * There is no guarantee that `this.state` will be immediately updated, so\n * accessing `this.state` after calling this method may return the old value.\n *\n * There is no guarantee that calls to `setState` will run synchronously,\n * as they may eventually be batched together. You can provide an optional\n * callback that will be executed when the call to setState is actually\n * completed.\n *\n * When a function is provided to setState, it will be called at some point in\n * the future (not synchronously). It will be called with the up to date\n * component arguments (state, props, context). These values can be different\n * from this.* because your function may be called after receiveProps but before\n * shouldComponentUpdate, and this new state, props, and context will not yet be\n * assigned to this.\n *\n * @param {object|function} partialState Next partial state or function to\n * produce next partial state to be merged with current state.\n * @param {?function} callback Called after state is updated.\n * @final\n * @protected\n */\nReactComponent.prototype.setState = function (partialState, callback) {\n !(typeof partialState === 'object' || typeof partialState === 'function' || partialState == null) ? true ? invariant(false, 'setState(...): takes an object of state variables to update or a function which returns an object of state variables.') : _prodInvariant('85') : void 0;\n this.updater.enqueueSetState(this, partialState);\n if (callback) {\n this.updater.enqueueCallback(this, callback, 'setState');\n }\n};\n\n/**\n * Forces an update. This should only be invoked when it is known with\n * certainty that we are **not** in a DOM transaction.\n *\n * You may want to call this when you know that some deeper aspect of the\n * component's state has changed but `setState` was not called.\n *\n * This will not invoke `shouldComponentUpdate`, but it will invoke\n * `componentWillUpdate` and `componentDidUpdate`.\n *\n * @param {?function} callback Called after update is complete.\n * @final\n * @protected\n */\nReactComponent.prototype.forceUpdate = function (callback) {\n this.updater.enqueueForceUpdate(this);\n if (callback) {\n this.updater.enqueueCallback(this, callback, 'forceUpdate');\n }\n};\n\n/**\n * Deprecated APIs. These APIs used to exist on classic React classes but since\n * we would like to deprecate them, we're not going to move them over to this\n * modern base class. Instead, we define a getter that warns if it's accessed.\n */\nif (true) {\n var deprecatedAPIs = {\n isMounted: ['isMounted', 'Instead, make sure to clean up subscriptions and pending requests in ' + 'componentWillUnmount to prevent memory leaks.'],\n replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).']\n };\n var defineDeprecationWarning = function (methodName, info) {\n if (canDefineProperty) {\n Object.defineProperty(ReactComponent.prototype, methodName, {\n get: function () {\n true ? warning(false, '%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]) : void 0;\n return undefined;\n }\n });\n }\n };\n for (var fnName in deprecatedAPIs) {\n if (deprecatedAPIs.hasOwnProperty(fnName)) {\n defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);\n }\n }\n}\n\nmodule.exports = ReactComponent;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react/lib/ReactComponent.js\n// module id = 270\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react/lib/ReactComponent.js?", + ); + + /***/ + }, + /* 271 */ + /* unknown exports provided */ + /* all exports used */ + /*!*********************************************!*\ + !*** ./~/react/lib/ReactNoopUpdateQueue.js ***! + \*********************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2015-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar warning = __webpack_require__(/*! fbjs/lib/warning */ 13);\n\nfunction warnNoop(publicInstance, callerName) {\n if (true) {\n var constructor = publicInstance.constructor;\n true ? warning(false, '%s(...): Can only update a mounted or mounting component. ' + 'This usually means you called %s() on an unmounted component. ' + 'This is a no-op. Please check the code for the %s component.', callerName, callerName, constructor && (constructor.displayName || constructor.name) || 'ReactClass') : void 0;\n }\n}\n\n/**\n * This is the abstract API for an update queue.\n */\nvar ReactNoopUpdateQueue = {\n\n /**\n * Checks whether or not this composite component is mounted.\n * @param {ReactClass} publicInstance The instance we want to test.\n * @return {boolean} True if mounted, false otherwise.\n * @protected\n * @final\n */\n isMounted: function (publicInstance) {\n return false;\n },\n\n /**\n * Enqueue a callback that will be executed after all the pending updates\n * have processed.\n *\n * @param {ReactClass} publicInstance The instance to use as `this` context.\n * @param {?function} callback Called after state is updated.\n * @internal\n */\n enqueueCallback: function (publicInstance, callback) {},\n\n /**\n * Forces an update. This should only be invoked when it is known with\n * certainty that we are **not** in a DOM transaction.\n *\n * You may want to call this when you know that some deeper aspect of the\n * component's state has changed but `setState` was not called.\n *\n * This will not invoke `shouldComponentUpdate`, but it will invoke\n * `componentWillUpdate` and `componentDidUpdate`.\n *\n * @param {ReactClass} publicInstance The instance that should rerender.\n * @internal\n */\n enqueueForceUpdate: function (publicInstance) {\n warnNoop(publicInstance, 'forceUpdate');\n },\n\n /**\n * Replaces all of the state. Always use this or `setState` to mutate state.\n * You should treat `this.state` as immutable.\n *\n * There is no guarantee that `this.state` will be immediately updated, so\n * accessing `this.state` after calling this method may return the old value.\n *\n * @param {ReactClass} publicInstance The instance that should rerender.\n * @param {object} completeState Next state.\n * @internal\n */\n enqueueReplaceState: function (publicInstance, completeState) {\n warnNoop(publicInstance, 'replaceState');\n },\n\n /**\n * Sets a subset of the state. This only exists because _pendingState is\n * internal. This provides a merging strategy that is not available to deep\n * properties which is confusing. TODO: Expose pendingState or don't use it\n * during the merge.\n *\n * @param {ReactClass} publicInstance The instance that should rerender.\n * @param {object} partialState Next partial state to be merged with state.\n * @internal\n */\n enqueueSetState: function (publicInstance, partialState) {\n warnNoop(publicInstance, 'setState');\n }\n};\n\nmodule.exports = ReactNoopUpdateQueue;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react/lib/ReactNoopUpdateQueue.js\n// module id = 271\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react/lib/ReactNoopUpdateQueue.js?", + ); + + /***/ + }, + /* 272 */ + /* unknown exports provided */ + /* all exports used */ + /*!***************************************************!*\ + !*** ./~/react/lib/ReactPropTypeLocationNames.js ***! + \***************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * \n */\n\n\n\nvar ReactPropTypeLocationNames = {};\n\nif (true) {\n ReactPropTypeLocationNames = {\n prop: 'prop',\n context: 'context',\n childContext: 'child context'\n };\n}\n\nmodule.exports = ReactPropTypeLocationNames;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react/lib/ReactPropTypeLocationNames.js\n// module id = 272\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react/lib/ReactPropTypeLocationNames.js?", + ); + + /***/ + }, + /* 273 */ + /* unknown exports provided */ + /* all exports used */ + /*!******************************************!*\ + !*** ./~/react/lib/canDefineProperty.js ***! + \******************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * \n */\n\n\n\nvar canDefineProperty = false;\nif (true) {\n try {\n // $FlowFixMe https://github.com/facebook/flow/issues/285\n Object.defineProperty({}, 'x', { get: function () {} });\n canDefineProperty = true;\n } catch (x) {\n // IE will fail on defineProperty\n }\n}\n\nmodule.exports = canDefineProperty;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react/lib/canDefineProperty.js\n// module id = 273\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react/lib/canDefineProperty.js?", + ); + + /***/ + }, + /* 274 */ + /* unknown exports provided */ + /* all exports used */ + /*!**************************************!*\ + !*** ./~/react/lib/getIteratorFn.js ***! + \**************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * \n */\n\n\n\n/* global Symbol */\n\nvar ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\nvar FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.\n\n/**\n * Returns the iterator method function contained on the iterable object.\n *\n * Be sure to invoke the function with the iterable as context:\n *\n * var iteratorFn = getIteratorFn(myIterable);\n * if (iteratorFn) {\n * var iterator = iteratorFn.call(myIterable);\n * ...\n * }\n *\n * @param {?object} maybeIterable\n * @return {?function}\n */\nfunction getIteratorFn(maybeIterable) {\n var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);\n if (typeof iteratorFn === 'function') {\n return iteratorFn;\n }\n}\n\nmodule.exports = getIteratorFn;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react/lib/getIteratorFn.js\n// module id = 274\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react/lib/getIteratorFn.js?", + ); + + /***/ + }, + /* 275 */ + /* unknown exports provided */ + /* all exports used */ + /*!***********************************!*\ + !*** (webpack)/buildin/module.js ***! + \***********************************/ + /***/ function (module, exports) { + eval( + 'module.exports = function(module) {\r\n\tif(!module.webpackPolyfill) {\r\n\t\tmodule.deprecate = function() {};\r\n\t\tmodule.paths = [];\r\n\t\t// module.parent = undefined by default\r\n\t\tif(!module.children) module.children = [];\r\n\t\tObject.defineProperty(module, "loaded", {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function() {\r\n\t\t\t\treturn module.l;\r\n\t\t\t}\r\n\t\t});\r\n\t\tObject.defineProperty(module, "id", {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function() {\r\n\t\t\t\treturn module.i;\r\n\t\t\t}\r\n\t\t});\r\n\t\tmodule.webpackPolyfill = 1;\r\n\t}\r\n\treturn module;\r\n};\r\n\n\n//////////////////\n// WEBPACK FOOTER\n// (webpack)/buildin/module.js\n// module id = 275\n// module chunks = 0\n\n//# sourceURL=webpack:///(webpack)/buildin/module.js?', + ); + + /***/ + }, + /* 276 */ + /* unknown exports provided */ + /* exports used: default */ + /*!********************************************************!*\ + !*** ./app/libs/components/GoogleMaps/Map/styles.json ***! + \********************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = [\n\t{\n\t\t"featureType": "poi.medical",\n\t\t"elementType": "geometry.fill",\n\t\t"stylers": [\n\t\t\t{\n\t\t\t\t"color": "#ded3c7"\n\t\t\t}\n\t\t]\n\t},\n\t{\n\t\t"featureType": "poi.park",\n\t\t"elementType": "geometry.fill",\n\t\t"stylers": [\n\t\t\t{\n\t\t\t\t"color": "#d2e5c7"\n\t\t\t}\n\t\t]\n\t},\n\t{\n\t\t"featureType": "poi.school",\n\t\t"elementType": "geometry.fill",\n\t\t"stylers": [\n\t\t\t{\n\t\t\t\t"color": "#e6dfd8"\n\t\t\t}\n\t\t]\n\t},\n\t{\n\t\t"featureType": "poi.sports_complex",\n\t\t"elementType": "geometry.fill",\n\t\t"stylers": [\n\t\t\t{\n\t\t\t\t"color": "#cbbcac"\n\t\t\t}\n\t\t]\n\t},\n\t{\n\t\t"featureType": "road.highway",\n\t\t"elementType": "geometry.fill",\n\t\t"stylers": [\n\t\t\t{\n\t\t\t\t"saturation": "16"\n\t\t\t},\n\t\t\t{\n\t\t\t\t"lightness": "25"\n\t\t\t}\n\t\t]\n\t},\n\t{\n\t\t"featureType": "transit.station.airport",\n\t\t"elementType": "geometry.fill",\n\t\t"stylers": [\n\t\t\t{\n\t\t\t\t"hue": "#9d00ff"\n\t\t\t},\n\t\t\t{\n\t\t\t\t"saturation": "25"\n\t\t\t},\n\t\t\t{\n\t\t\t\t"lightness": "5"\n\t\t\t}\n\t\t]\n\t},\n\t{\n\t\t"featureType": "water",\n\t\t"elementType": "geometry.fill",\n\t\t"stylers": [\n\t\t\t{\n\t\t\t\t"color": "#9fdbf4"\n\t\t\t},\n\t\t\t{\n\t\t\t\t"lightness": "5"\n\t\t\t}\n\t\t]\n\t}\n];\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/GoogleMaps/Map/styles.json\n// module id = 276\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/GoogleMaps/Map/styles.json?', + ); + + /***/ + }, + /* 277 */ + /* unknown exports provided */ + /* all exports used */ + /*!***********************************************!*\ + !*** ./~/add-dom-event-listener/lib/index.js ***! + \***********************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\nexports['default'] = addEventListener;\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _EventObject = __webpack_require__(/*! ./EventObject */ 602);\n\nvar _EventObject2 = _interopRequireDefault(_EventObject);\n\nfunction addEventListener(target, eventType, callback) {\n function wrapCallback(e) {\n var ne = new _EventObject2['default'](e);\n callback.call(target, ne);\n }\n\n if (target.addEventListener) {\n target.addEventListener(eventType, wrapCallback, false);\n return {\n remove: function remove() {\n target.removeEventListener(eventType, wrapCallback, false);\n }\n };\n } else if (target.attachEvent) {\n target.attachEvent('on' + eventType, wrapCallback);\n return {\n remove: function remove() {\n target.detachEvent('on' + eventType, wrapCallback);\n }\n };\n }\n}\n\nmodule.exports = exports['default'];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/add-dom-event-listener/lib/index.js\n// module id = 277\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/add-dom-event-listener/lib/index.js?", + ); + + /***/ + }, + /* 278 */ + /* unknown exports provided */ + /* all exports used */ + /*!**************************************************!*\ + !*** ./~/airbnb-prop-types/build/uniqueArray.js ***! + \**************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "Object.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _react = __webpack_require__(/*! react */ 1);\n\nfunction requiredUniqueArray(props, propName, componentName) {\n var _PropTypes$array;\n\n for (var _len = arguments.length, rest = Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {\n rest[_key - 3] = arguments[_key];\n }\n\n var result = (_PropTypes$array = _react.PropTypes.array).isRequired.apply(_PropTypes$array, [props, propName, componentName].concat(rest));\n if (result != null) {\n return result;\n }\n\n var array = props[propName];\n var uniqueCount = new Set(array).size;\n if (uniqueCount !== array.length) {\n return new RangeError(String(componentName) + ': values must be unique. ' + (array.length - uniqueCount) + ' duplicate values found.');\n }\n return null;\n}\n\nfunction uniqueArray(props, propName) {\n var array = props[propName];\n if (array == null) {\n return null;\n }\n\n for (var _len2 = arguments.length, rest = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {\n rest[_key2 - 2] = arguments[_key2];\n }\n\n return requiredUniqueArray.apply(undefined, [props, propName].concat(rest));\n}\nuniqueArray.isRequired = requiredUniqueArray;\n\nexports['default'] = function () {\n return uniqueArray;\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/airbnb-prop-types/build/uniqueArray.js\n// module id = 278\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/airbnb-prop-types/build/uniqueArray.js?", + ); + + /***/ + }, + /* 279 */ + /* exports provided: getContextualListing */ + /* all exports used */ + /*!***************************************!*\ + !*** ./app/api/contextualListings.js ***! + \***************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "Object.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__libs_utils_api_apiCall__ = __webpack_require__(/*! ../libs/utils/api/apiCall */ 62);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getContextualListing\", function() { return getContextualListing; });\n\n\nvar babelPluginFlowReactPropTypes_proptype_ContextualListingDisplayMode = __webpack_require__(/*! ../types */ 4).babelPluginFlowReactPropTypes_proptype_ContextualListingDisplayMode || __webpack_require__(/*! react */ 1).PropTypes.any;\n\nvar babelPluginFlowReactPropTypes_proptype_ContextualListing = __webpack_require__(/*! ../types */ 4).babelPluginFlowReactPropTypes_proptype_ContextualListing || __webpack_require__(/*! react */ 1).PropTypes.any;\n\nvar contextualListingPath = function contextualListingPath(listingId, displayMode) {\n return '/contextual_listings/' + listingId + '?display_mode=' + displayMode;\n};\n\nif (typeof exports !== 'undefined') Object.defineProperty(exports, 'babelPluginFlowReactPropTypes_proptype_Response', {\n value: __webpack_require__(/*! react */ 1).PropTypes.shape({\n listing: babelPluginFlowReactPropTypes_proptype_ContextualListing\n })\n});\n\n\nvar getContextualListing = function getContextualListing(listingId, displayMode) {\n return __WEBPACK_IMPORTED_MODULE_0__libs_utils_api_apiCall__[\"a\" /* default */].get(contextualListingPath(listingId, displayMode));\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/api/contextualListings.js\n// module id = 279\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/api/contextualListings.js?", + ); + + /***/ + }, + /* 280 */ + /* exports provided: default */ + /* exports used: default */ + /*!*********************************************************************!*\ + !*** ./app/bundles/layout-navbar/components/HelpDropdown/index.jsx ***! + \*********************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__libs_components_icons_IconHelp__ = __webpack_require__(/*! ../../../../libs/components/icons/IconHelp */ 864);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Dropdown__ = __webpack_require__(/*! ../Dropdown */ 132);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__DropdownItem__ = __webpack_require__(/*! ../DropdownItem */ 133);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__DropdownTitle__ = __webpack_require__(/*! ../DropdownTitle */ 134);\n\n\n\n\n\n\n\n\nvar HelpDropdown = function HelpDropdown(props) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_2__Dropdown__["a" /* default */],\n {\n id: \'help-menu\',\n title: __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_4__DropdownTitle__["a" /* default */], { Icon: __WEBPACK_IMPORTED_MODULE_1__libs_components_icons_IconHelp__["a" /* default */], name: \'Help\', hideIconSm: true, hideIconMd: true, addMarginRightToIcon: true })\n },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3__DropdownItem__["a" /* default */], { href: props.aboutPath, name: \'About\' }),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3__DropdownItem__["a" /* default */], { href: props.faqPath, name: \'FAQ\' }),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3__DropdownItem__["a" /* default */], { href: props.hostsPath, name: \'How to Host\' }),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3__DropdownItem__["a" /* default */], { href: props.communityUrl, name: \'Community\', external: true })\n );\n};\n\nHelpDropdown.propTypes = {\n aboutPath: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n faqPath: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n hostsPath: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n communityUrl: __webpack_require__(/*! prop-types */ 0).string.isRequired\n};\n/* harmony default export */ __webpack_exports__["a"] = (HelpDropdown);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/layout-navbar/components/HelpDropdown/index.jsx\n// module id = 280\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/layout-navbar/components/HelpDropdown/index.jsx?', + ); + + /***/ + }, + /* 281 */ + /* exports provided: default */ + /* exports used: default */ + /*!***************************************************************!*\ + !*** ./app/bundles/listings-show/ui/Listing/Listing.live.jsx ***! + \***************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__enums_PrivacyMode__ = __webpack_require__(/*! ../../../../enums/PrivacyMode */ 69);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__libs_utils_vendor_photoswipe__ = __webpack_require__(/*! ../../../../libs/utils/vendor/photoswipe */ 896);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__libs_utils_dom__ = __webpack_require__(/*! ../../../../libs/utils/dom */ 44);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__utils__ = __webpack_require__(/*! ../../utils */ 86);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__Hero_live__ = __webpack_require__(/*! ./Hero/live */ 663);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__PrivacyBar_live__ = __webpack_require__(/*! ./PrivacyBar/live */ 674);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__Header_live__ = __webpack_require__(/*! ./Header/live */ 660);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__Summary_live__ = __webpack_require__(/*! ./Summary/live */ 675);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__MembershipRequest_live__ = __webpack_require__(/*! ./MembershipRequest/live */ 670);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__Details_live__ = __webpack_require__(/*! ./Details/live */ 659);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__Amenities_live__ = __webpack_require__(/*! ./Amenities/live */ 657);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__Prices_live__ = __webpack_require__(/*! ./Prices/live */ 672);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__Photos_live__ = __webpack_require__(/*! ./Photos/live */ 671);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__HouseRules_live__ = __webpack_require__(/*! ./HouseRules/live */ 666);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__Description_live__ = __webpack_require__(/*! ./Description/live */ 658);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__Urls_live__ = __webpack_require__(/*! ./Urls/live */ 676);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__Host_live__ = __webpack_require__(/*! ./Host/live */ 665);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__Location_live__ = __webpack_require__(/*! ./Location/live */ 668);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_19__Widgets_common_StickyWidgets__ = __webpack_require__(/*! ./Widgets/common/StickyWidgets */ 678);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_20__Widgets_live_Price__ = __webpack_require__(/*! ./Widgets/live/Price */ 683);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_21__Widgets_live_Host__ = __webpack_require__(/*! ./Widgets/live/Host */ 182);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_22__Widgets_live_GetOnTheGuestList__ = __webpack_require__(/*! ./Widgets/live/GetOnTheGuestList */ 679);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_23__index_scss__ = __webpack_require__(/*! ./index.scss */ 1000);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_23__index_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_23__index_scss__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_24__assets_styles_vendor_photoswipe_photoswipe_scss__ = __webpack_require__(/*! ../../../../assets/styles/vendor/photoswipe/photoswipe.scss */ 334);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_24__assets_styles_vendor_photoswipe_photoswipe_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_24__assets_styles_vendor_photoswipe_photoswipe_scss__);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n/* eslint-disable import/first, react/jsx-indent */\n\n\n\nvar babelPluginFlowReactPropTypes_proptype_Amenity = __webpack_require__(/*! ../../../../types */ 4).babelPluginFlowReactPropTypes_proptype_Amenity || __webpack_require__(/*! react */ 1).PropTypes.any;\n\nvar babelPluginFlowReactPropTypes_proptype_LimitedContextualListing = __webpack_require__(/*! ../../../../types */ 4).babelPluginFlowReactPropTypes_proptype_LimitedContextualListing || __webpack_require__(/*! react */ 1).PropTypes.any;\n\nvar babelPluginFlowReactPropTypes_proptype_ContextualListing = __webpack_require__(/*! ../../../../types */ 4).babelPluginFlowReactPropTypes_proptype_ContextualListing || __webpack_require__(/*! react */ 1).PropTypes.any;\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar ListingLive = function (_React$Component) {\n _inherits(ListingLive, _React$Component);\n\n function ListingLive() {\n var _ref;\n\n var _temp, _this, _ret;\n\n _classCallCheck(this, ListingLive);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = ListingLive.__proto__ || Object.getPrototypeOf(ListingLive)).call.apply(_ref, [this].concat(args))), _this), _this.componentDidMount = function () {\n _this.updatePageTitle();\n __WEBPACK_IMPORTED_MODULE_2__libs_utils_vendor_photoswipe__["a" /* galleries */].initAll();\n }, _this.updatePageTitle = function () {\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__libs_utils_dom__["f" /* setPageTitle */])(_this.props.listing.title);\n }, _this.render = function () {\n var _this$props = _this.props,\n listing = _this$props.listing,\n allAmenities = _this$props.allAmenities,\n cloudinaryUrl = _this$props.cloudinaryUrl,\n isLoggedIn = _this$props.isLoggedIn;\n\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n \'div\',\n { className: __WEBPACK_IMPORTED_MODULE_23__index_scss___default.a.layout },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5__Hero_live__["a" /* default */], { photos: listing.photos }),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n \'div\',\n { className: __WEBPACK_IMPORTED_MODULE_23__index_scss___default.a.container },\n listing.displayMode === \'limited_preview\' ? __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n \'div\',\n { className: __WEBPACK_IMPORTED_MODULE_23__index_scss___default.a.units },\n listing.privacyMode === __WEBPACK_IMPORTED_MODULE_1__enums_PrivacyMode__["a" /* default */].PRIVATE.value && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_6__PrivacyBar_live__["a" /* default */], null),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7__Header_live__["a" /* default */], { listing: listing }),\n listing.summary && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_8__Summary_live__["a" /* default */], { listing: listing }),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_9__MembershipRequest_live__["a" /* default */], _extends({ listing: listing, isLoggedIn: isLoggedIn }, { isLimitedPreview: true }))\n ) : __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n \'div\',\n { className: __WEBPACK_IMPORTED_MODULE_23__index_scss___default.a.units },\n listing.privacyMode === __WEBPACK_IMPORTED_MODULE_1__enums_PrivacyMode__["a" /* default */].PRIVATE.value && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_6__PrivacyBar_live__["a" /* default */], null),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7__Header_live__["a" /* default */], { listing: listing }),\n listing.summary && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_8__Summary_live__["a" /* default */], { listing: listing }),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_9__MembershipRequest_live__["a" /* default */], { listing: listing, isLoggedIn: isLoggedIn }),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_10__Details_live__["a" /* default */], { listing: listing }),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_11__Amenities_live__["a" /* default */], { listing: listing, allAmenities: allAmenities }),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_12__Prices_live__["a" /* default */], { listing: listing }),\n listing.photos.length > 0 && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_13__Photos_live__["a" /* default */], { photos: listing.photos }),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_14__HouseRules_live__["a" /* default */], { listing: listing }),\n listing.description && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_15__Description_live__["a" /* default */], { listing: listing }),\n listing.urls && listing.urls.length > 0 && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_16__Urls_live__["a" /* default */], { listing: listing }),\n listing.owner && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_17__Host_live__["a" /* default */], { owner: listing.owner })\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n \'div\',\n { id: __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__utils__["a" /* getWidgetsRailDomId */])(), className: __WEBPACK_IMPORTED_MODULE_23__index_scss___default.a.widgets },\n listing.displayMode === \'limited_preview\' ? __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_19__Widgets_common_StickyWidgets__["a" /* default */],\n null,\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_22__Widgets_live_GetOnTheGuestList__["a" /* default */], { listing: listing, isLoggedIn: isLoggedIn })\n ) : __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_19__Widgets_common_StickyWidgets__["a" /* default */],\n null,\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_20__Widgets_live_Price__["a" /* default */], { listing: listing }),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_21__Widgets_live_Host__["a" /* default */], {\n owner: listing.owner ? listing.owner : null,\n newConversationPath: listing.newConversationPath,\n cloudinaryUrl: cloudinaryUrl,\n isLimitedPreview: false,\n isManagedByCurrentUser: listing.userContext.isManagedByCurrentUser\n })\n )\n )\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_18__Location_live__["a" /* default */], { listing: listing })\n );\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n return ListingLive;\n}(__WEBPACK_IMPORTED_MODULE_0_react___default.a.Component);\n\nListingLive.propTypes = {\n listing: __webpack_require__(/*! prop-types */ 0).oneOfType([babelPluginFlowReactPropTypes_proptype_ContextualListing, babelPluginFlowReactPropTypes_proptype_LimitedContextualListing]).isRequired,\n allAmenities: __webpack_require__(/*! prop-types */ 0).arrayOf(babelPluginFlowReactPropTypes_proptype_Amenity).isRequired,\n cloudinaryUrl: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n isLoggedIn: __webpack_require__(/*! prop-types */ 0).bool.isRequired\n};\n/* harmony default export */ __webpack_exports__["a"] = (ListingLive);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-show/ui/Listing/Listing.live.jsx\n// module id = 281\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-show/ui/Listing/Listing.live.jsx?', + ); + + /***/ + }, + /* 282 */ + /* exports provided: default */ + /* exports used: default */ + /*!***************************************************************************************!*\ + !*** ./app/bundles/listings-show/ui/Listing/MembershipRequest/live/Invitee/index.jsx ***! + \***************************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__api_listingInvitations__ = __webpack_require__(/*! ../../../../../../../api/listingInvitations */ 621);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__enums_ListingRelationshipType__ = __webpack_require__(/*! ../../../../../../../enums/ListingRelationshipType */ 136);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__enums_PrivacyMode__ = __webpack_require__(/*! ../../../../../../../enums/PrivacyMode */ 69);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__libs_redirectToSignIn__ = __webpack_require__(/*! ../../../../../../../libs/redirectToSignIn */ 88);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__libs_components__ = __webpack_require__(/*! ../../../../../../../libs/components */ 11);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__libs_components_icons_IconFngKey__ = __webpack_require__(/*! ../../../../../../../libs/components/icons/IconFngKey */ 140);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__AcceptedModal__ = __webpack_require__(/*! ../AcceptedModal */ 669);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__index_scss__ = __webpack_require__(/*! ../index.scss */ 114);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__index_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9__index_scss__);\nfunction _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\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\n\n\nvar babelPluginFlowReactPropTypes_proptype_ListingRelationshipType = __webpack_require__(/*! ../../../../../../../types */ 4).babelPluginFlowReactPropTypes_proptype_ListingRelationshipType || __webpack_require__(/*! react */ 1).PropTypes.any;\n\nvar babelPluginFlowReactPropTypes_proptype_LimitedContextualListing = __webpack_require__(/*! ../../../../../../../types */ 4).babelPluginFlowReactPropTypes_proptype_LimitedContextualListing || __webpack_require__(/*! react */ 1).PropTypes.any;\n\nvar babelPluginFlowReactPropTypes_proptype_ContextualListing = __webpack_require__(/*! ../../../../../../../types */ 4).babelPluginFlowReactPropTypes_proptype_ContextualListing || __webpack_require__(/*! react */ 1).PropTypes.any;\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar PublicGuest = function (_React$Component) {\n _inherits(PublicGuest, _React$Component);\n\n function PublicGuest() {\n var _ref;\n\n var _temp, _this, _ret;\n\n _classCallCheck(this, PublicGuest);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = PublicGuest.__proto__ || Object.getPrototypeOf(PublicGuest)).call.apply(_ref, [this].concat(args))), _this), _this.state = {\n isProcessing: false,\n isError: false,\n isModalShown: false\n }, _this.acceptInvitation = function () {\n if (_this.state.isProcessing) return;\n if (!_this.props.isLoggedIn) {\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__libs_redirectToSignIn__[\"a\" /* default */])();\n return;\n }\n _this.setState({ isProcessing: true }, _this.startRequest);\n }, _this.startRequest = function () {\n var guestListMembershipId = _this.props.listing.userContext.guestListMembershipId;\n\n\n if (!guestListMembershipId) {\n throw new Error('No `guestListMembershipId` is provided for listing: ' + _this.props.listing.id);\n }\n\n __WEBPACK_IMPORTED_MODULE_2__api_listingInvitations__[\"a\" /* patchListingInvitationsJoin */](guestListMembershipId).then(_this.handleSuccess, _this.handleFailure);\n }, _this.handleSuccess = function () {\n _this.setState({\n isProcessing: false,\n isError: false,\n isModalShown: true\n });\n }, _this.setRelationship = function () {\n _this.props.setRelationship(__WEBPACK_IMPORTED_MODULE_3__enums_ListingRelationshipType__[\"a\" /* default */].MEMBERSHIP);\n }, _this.hideModal = function () {\n _this.setState({ isModalShown: false });\n }, _this.handleFailure = function () {\n _this.setState({ isError: true, isProcessing: false });\n }, _this.render = function () {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_9__index_scss___default.a.unit },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()(__WEBPACK_IMPORTED_MODULE_9__index_scss___default.a.iconCircle, __WEBPACK_IMPORTED_MODULE_9__index_scss___default.a.marginRight) },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7__libs_components_icons_IconFngKey__[\"a\" /* default */], { color: 'teal', className: __WEBPACK_IMPORTED_MODULE_9__index_scss___default.a.iconKey })\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_9__index_scss___default.a.content },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_9__index_scss___default.a.text },\n 'The host invited you to get on the Guest List. Accept the invitation to keep in touch with the host.'\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_9__index_scss___default.a.buttonRow },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_9__index_scss___default.a.buttonWrapper },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_6__libs_components__[\"c\" /* Button */],\n {\n teal: true,\n size: 'lg',\n disabled: _this.state.isProcessing,\n className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()(__WEBPACK_IMPORTED_MODULE_9__index_scss___default.a.button, _defineProperty({}, __WEBPACK_IMPORTED_MODULE_9__index_scss___default.a.processing, _this.state.isProcessing)),\n onClick: _this.acceptInvitation\n },\n 'Accept Invitation'\n ),\n _this.state.isProcessing && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_6__libs_components__[\"i\" /* Spinner */], { color: '#fff', size: '20' })\n ),\n _this.state.isError && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_9__index_scss___default.a.error },\n 'Oops, something went wrong. Please, try again.'\n )\n )\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_8__AcceptedModal__[\"a\" /* default */], {\n show: _this.state.isModalShown,\n isPrivate: _this.props.listing.privacyMode === __WEBPACK_IMPORTED_MODULE_4__enums_PrivacyMode__[\"a\" /* default */].PRIVATE.value,\n hideModal: _this.hideModal,\n updateRelationship: _this.setRelationship\n })\n );\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n return PublicGuest;\n}(__WEBPACK_IMPORTED_MODULE_0_react___default.a.Component);\n\nPublicGuest.propTypes = {\n listing: __webpack_require__(/*! prop-types */ 0).oneOfType([babelPluginFlowReactPropTypes_proptype_ContextualListing, babelPluginFlowReactPropTypes_proptype_LimitedContextualListing]).isRequired,\n isLoggedIn: __webpack_require__(/*! prop-types */ 0).bool.isRequired,\n setRelationship: __webpack_require__(/*! prop-types */ 0).func.isRequired\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (PublicGuest);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-show/ui/Listing/MembershipRequest/live/Invitee/index.jsx\n// module id = 282\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-show/ui/Listing/MembershipRequest/live/Invitee/index.jsx?", + ); + + /***/ + }, + /* 283 */ + /* exports provided: default */ + /* exports used: default */ + /*!*************************************************************************************************!*\ + !*** ./app/bundles/listings-show/ui/Listing/MembershipRequest/live/PublicGuest/PublicGuest.jsx ***! + \*************************************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__enums_PrivacyMode__ = __webpack_require__(/*! ../../../../../../../enums/PrivacyMode */ 69);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__libs_components__ = __webpack_require__(/*! ../../../../../../../libs/components */ 11);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__libs_components_icons_IconFngKey__ = __webpack_require__(/*! ../../../../../../../libs/components/icons/IconFngKey */ 140);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__index_scss__ = __webpack_require__(/*! ../index.scss */ 114);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__index_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5__index_scss__);\nfunction _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\n\n\nvar babelPluginFlowReactPropTypes_proptype_PrivacyMode = __webpack_require__(/*! ../../../../../../../types */ 4).babelPluginFlowReactPropTypes_proptype_PrivacyMode || __webpack_require__(/*! react */ 1).PropTypes.any;\n\n\n\n\n\n\n\n\nvar PublicGuest = function PublicGuest(_ref) {\n var privacyMode = _ref.privacyMode,\n isProcessing = _ref.isProcessing,\n isError = _ref.isError,\n isOwnerMessageShown = _ref.isOwnerMessageShown,\n onButtonClick = _ref.onButtonClick,\n hideOwnerMessage = _ref.hideOwnerMessage;\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_5__index_scss___default.a.unit },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()(__WEBPACK_IMPORTED_MODULE_5__index_scss___default.a.iconCircle, __WEBPACK_IMPORTED_MODULE_5__index_scss___default.a.marginRight) },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_4__libs_components_icons_IconFngKey__[\"a\" /* default */], { color: 'teal', className: __WEBPACK_IMPORTED_MODULE_5__index_scss___default.a.iconKey })\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_5__index_scss___default.a.content },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_5__index_scss___default.a.text },\n privacyMode === __WEBPACK_IMPORTED_MODULE_2__enums_PrivacyMode__[\"a\" /* default */].PRIVATE.value ? __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'span',\n null,\n 'This is a private listing. Request an invitation to get on the Guest List and see full details including more photos and the host\\u2019s contact information'\n ) : __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'span',\n null,\n 'Request an invitation to get on the Guest List and keep in touch with the host.'\n )\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_5__index_scss___default.a.buttonRow },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_5__index_scss___default.a.buttonWrapper },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_3__libs_components__[\"c\" /* Button */],\n {\n teal: true,\n size: 'lg',\n disabled: isProcessing,\n className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()(__WEBPACK_IMPORTED_MODULE_5__index_scss___default.a.button, _defineProperty({}, __WEBPACK_IMPORTED_MODULE_5__index_scss___default.a.processing, isProcessing)),\n onClick: onButtonClick\n },\n 'Get on the Guest List\\u2122'\n ),\n isProcessing && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3__libs_components__[\"i\" /* Spinner */], { color: '#fff', size: '20' })\n ),\n isError && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_5__index_scss___default.a.error },\n 'Oops, something went wrong. Please, try again.'\n )\n )\n ),\n isOwnerMessageShown && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_3__libs_components__[\"s\" /* ConfirmModal */],\n { okHandler: hideOwnerMessage },\n 'You are a manager of this listing. You can\\u2019t get on your own Guest List.'\n )\n );\n};\n\nPublicGuest.propTypes = {\n privacyMode: __webpack_require__(/*! prop-types */ 0).any.isRequired,\n isProcessing: __webpack_require__(/*! prop-types */ 0).bool,\n isError: __webpack_require__(/*! prop-types */ 0).bool,\n isOwnerMessageShown: __webpack_require__(/*! prop-types */ 0).bool,\n onButtonClick: __webpack_require__(/*! prop-types */ 0).func.isRequired,\n hideOwnerMessage: __webpack_require__(/*! prop-types */ 0).func\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (PublicGuest);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-show/ui/Listing/MembershipRequest/live/PublicGuest/PublicGuest.jsx\n// module id = 283\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-show/ui/Listing/MembershipRequest/live/PublicGuest/PublicGuest.jsx?", + ); + + /***/ + }, + /* 284 */ + /* exports provided: default */ + /* exports used: default */ + /*!*********************************************************************************************************!*\ + !*** ./app/bundles/listings-show/ui/Listing/MembershipRequest/live/PublicGuest/PublicGuestForGuest.jsx ***! + \*********************************************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__api_guestListMembershipRequests__ = __webpack_require__(/*! ../../../../../../../api/guestListMembershipRequests */ 619);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__enums_ListingRelationshipType__ = __webpack_require__(/*! ../../../../../../../enums/ListingRelationshipType */ 136);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__libs_redirectToSignIn__ = __webpack_require__(/*! ../../../../../../../libs/redirectToSignIn */ 88);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__PublicGuest__ = __webpack_require__(/*! ./PublicGuest */ 283);\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\n\nvar babelPluginFlowReactPropTypes_proptype_ListingRelationshipType = __webpack_require__(/*! ../../../../../../../types */ 4).babelPluginFlowReactPropTypes_proptype_ListingRelationshipType || __webpack_require__(/*! react */ 1).PropTypes.any;\n\nvar babelPluginFlowReactPropTypes_proptype_LimitedContextualListing = __webpack_require__(/*! ../../../../../../../types */ 4).babelPluginFlowReactPropTypes_proptype_LimitedContextualListing || __webpack_require__(/*! react */ 1).PropTypes.any;\n\nvar babelPluginFlowReactPropTypes_proptype_ContextualListing = __webpack_require__(/*! ../../../../../../../types */ 4).babelPluginFlowReactPropTypes_proptype_ContextualListing || __webpack_require__(/*! react */ 1).PropTypes.any;\n\n\n\n\n\n\n\n\n\nvar PublicGuestForGuest = function (_React$Component) {\n _inherits(PublicGuestForGuest, _React$Component);\n\n function PublicGuestForGuest() {\n var _ref;\n\n var _temp, _this, _ret;\n\n _classCallCheck(this, PublicGuestForGuest);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = PublicGuestForGuest.__proto__ || Object.getPrototypeOf(PublicGuestForGuest)).call.apply(_ref, [this].concat(args))), _this), _this.state = {\n isProcessing: false,\n isError: false\n }, _this.requestInvitation = function () {\n if (_this.state.isProcessing) return;\n if (!_this.props.isLoggedIn) {\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__libs_redirectToSignIn__["a" /* default */])();\n return;\n }\n _this.setState({ isProcessing: true }, _this.startRequest);\n }, _this.startRequest = function () {\n __WEBPACK_IMPORTED_MODULE_1__api_guestListMembershipRequests__["a" /* createGuestListMembershipRequest */](_this.props.listing.id).then(_this.handleSuccess, _this.handleFailure);\n }, _this.handleSuccess = function () {\n _this.props.setRelationship(__WEBPACK_IMPORTED_MODULE_2__enums_ListingRelationshipType__["a" /* default */].REQUESTED_MEMBERSHIP);\n }, _this.handleFailure = function () {\n _this.setState({ isError: true, isProcessing: false });\n }, _this.render = function () {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_4__PublicGuest__["a" /* default */], {\n privacyMode: _this.props.listing.privacyMode,\n isProcessing: _this.state.isProcessing,\n isError: _this.state.isError,\n onButtonClick: _this.requestInvitation\n });\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n return PublicGuestForGuest;\n}(__WEBPACK_IMPORTED_MODULE_0_react___default.a.Component);\n\nPublicGuestForGuest.propTypes = {\n listing: __webpack_require__(/*! prop-types */ 0).oneOfType([babelPluginFlowReactPropTypes_proptype_ContextualListing, babelPluginFlowReactPropTypes_proptype_LimitedContextualListing]).isRequired,\n isLoggedIn: __webpack_require__(/*! prop-types */ 0).bool.isRequired,\n setRelationship: __webpack_require__(/*! prop-types */ 0).func.isRequired\n};\n/* harmony default export */ __webpack_exports__["a"] = (PublicGuestForGuest);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-show/ui/Listing/MembershipRequest/live/PublicGuest/PublicGuestForGuest.jsx\n// module id = 284\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-show/ui/Listing/MembershipRequest/live/PublicGuest/PublicGuestForGuest.jsx?', + ); + + /***/ + }, + /* 285 */ + /* exports provided: default */ + /* exports used: default */ + /*!*********************************************************************************************************!*\ + !*** ./app/bundles/listings-show/ui/Listing/MembershipRequest/live/PublicGuest/PublicGuestForOwner.jsx ***! + \*********************************************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__PublicGuest__ = __webpack_require__(/*! ./PublicGuest */ 283);\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\n\nvar babelPluginFlowReactPropTypes_proptype_LimitedContextualListing = __webpack_require__(/*! ../../../../../../../types */ 4).babelPluginFlowReactPropTypes_proptype_LimitedContextualListing || __webpack_require__(/*! react */ 1).PropTypes.any;\n\nvar babelPluginFlowReactPropTypes_proptype_ContextualListing = __webpack_require__(/*! ../../../../../../../types */ 4).babelPluginFlowReactPropTypes_proptype_ContextualListing || __webpack_require__(/*! react */ 1).PropTypes.any;\n\n\n\nvar PublicGuestForOwner = function (_React$Component) {\n _inherits(PublicGuestForOwner, _React$Component);\n\n function PublicGuestForOwner() {\n var _ref;\n\n var _temp, _this, _ret;\n\n _classCallCheck(this, PublicGuestForOwner);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = PublicGuestForOwner.__proto__ || Object.getPrototypeOf(PublicGuestForOwner)).call.apply(_ref, [this].concat(args))), _this), _this.state = { isMessageShown: false }, _this.showMessage = function () {\n _this.setState({ isMessageShown: true });\n }, _this.hideMessage = function () {\n _this.setState({ isMessageShown: false });\n }, _this.render = function () {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1__PublicGuest__["a" /* default */], {\n privacyMode: _this.props.listing.privacyMode,\n isOwnerMessageShown: _this.state.isMessageShown,\n onButtonClick: _this.showMessage,\n hideOwnerMessage: _this.hideMessage\n });\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n return PublicGuestForOwner;\n}(__WEBPACK_IMPORTED_MODULE_0_react___default.a.Component);\n\nPublicGuestForOwner.propTypes = {\n listing: __webpack_require__(/*! prop-types */ 0).oneOfType([babelPluginFlowReactPropTypes_proptype_ContextualListing, babelPluginFlowReactPropTypes_proptype_LimitedContextualListing]).isRequired\n};\n/* harmony default export */ __webpack_exports__["a"] = (PublicGuestForOwner);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-show/ui/Listing/MembershipRequest/live/PublicGuest/PublicGuestForOwner.jsx\n// module id = 285\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-show/ui/Listing/MembershipRequest/live/PublicGuest/PublicGuestForOwner.jsx?', + ); + + /***/ + }, + /* 286 */ + /* exports provided: default */ + /* exports used: default */ + /*!***************************************************************************************************!*\ + !*** ./app/bundles/listings-show/ui/Listing/MembershipRequest/live/RequestedMembership/index.jsx ***! + \***************************************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__libs_components_icons_IconFngKey__ = __webpack_require__(/*! ../../../../../../../libs/components/icons/IconFngKey */ 140);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__libs_components_icons_IconCircleFullOk__ = __webpack_require__(/*! ../../../../../../../libs/components/icons/IconCircleFullOk */ 302);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__index_scss__ = __webpack_require__(/*! ../index.scss */ 114);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__index_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__index_scss__);\n\n\n\n\n\n\n\n\nvar RequestedMembership = function RequestedMembership(_ref) {\n var isReturningUser = _ref.isReturningUser;\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_4__index_scss___default.a.unit },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()(__WEBPACK_IMPORTED_MODULE_4__index_scss___default.a.iconCircle, __WEBPACK_IMPORTED_MODULE_4__index_scss___default.a.marginRight) },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2__libs_components_icons_IconFngKey__[\"a\" /* default */], { color: 'teal', className: __WEBPACK_IMPORTED_MODULE_4__index_scss___default.a.iconKey }),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3__libs_components_icons_IconCircleFullOk__[\"a\" /* default */], { color: 'teal', className: __WEBPACK_IMPORTED_MODULE_4__index_scss___default.a.iconOk })\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_4__index_scss___default.a.content },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_4__index_scss___default.a.text },\n isReturningUser ? __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'span',\n null,\n 'You\\u2019ve requested an invitation to this listing\\u2019s Guest List. You will be notified when the host has approved your request.'\n ) : __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'span',\n null,\n 'Thank you! Your request has been sent to the host. You will be notified when the host adds you to the Guest List.'\n )\n )\n )\n );\n};\n\nRequestedMembership.propTypes = {\n isReturningUser: __webpack_require__(/*! prop-types */ 0).bool.isRequired\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (RequestedMembership);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-show/ui/Listing/MembershipRequest/live/RequestedMembership/index.jsx\n// module id = 286\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-show/ui/Listing/MembershipRequest/live/RequestedMembership/index.jsx?", + ); + + /***/ + }, + /* 287 */ + /* exports provided: getThumbWidth, getThumbHeight, default */ + /* exports used: default, getThumbWidth, getThumbHeight */ + /*!***************************************************************************!*\ + !*** ./app/bundles/listings-show/ui/Listing/Photos/common/Grid/index.jsx ***! + \***************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__libs_utils__ = __webpack_require__(/*! ../../../../../../../libs/utils */ 20);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__common_Gallery__ = __webpack_require__(/*! ../../../../common/Gallery */ 292);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__common_Gallery_Photo__ = __webpack_require__(/*! ../../../../common/Gallery/Photo */ 291);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__index_scss__ = __webpack_require__(/*! ./index.scss */ 990);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__index_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__index_scss__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return getThumbWidth; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return getThumbHeight; });\n\n/* eslint-disable no-mixed-operators */\n\n\n\nvar babelPluginFlowReactPropTypes_proptype_Photo = __webpack_require__(/*! ../../../../../../../types */ 4).babelPluginFlowReactPropTypes_proptype_Photo || __webpack_require__(/*! react */ 1).PropTypes.any;\n\n\n\n\n\n\n\n\nvar VISIBLE_PHOTOS = 5;\nvar CONTAINER_WIDTH = 700;\nvar THUMBS_MARGIN = 12; // KEEP IN SYNC with ./index.scss\nvar MAIN_THUMB_SIZE = 270; // KEEP IN SYNC with ./index.scss\nvar THUMB_WIDTH = (CONTAINER_WIDTH - MAIN_THUMB_SIZE - THUMBS_MARGIN * 2) / 2;\nvar THUMB_HEIGHT = (MAIN_THUMB_SIZE - THUMBS_MARGIN) / 2;\n\nif (THUMB_WIDTH !== __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__libs_utils__["a" /* toInt */])(THUMB_WIDTH) || THUMB_HEIGHT !== __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__libs_utils__["a" /* toInt */])(THUMB_HEIGHT)) {\n throw new Error(\'Rethink input dimensions for photo grid\');\n}\n\nvar getThumbWidth = function getThumbWidth(index) {\n return index === 0 ? MAIN_THUMB_SIZE : THUMB_WIDTH;\n};\nvar getThumbHeight = function getThumbHeight(index) {\n return index === 0 ? MAIN_THUMB_SIZE : THUMB_HEIGHT;\n};\n\nvar ListingPhotoGrid = function ListingPhotoGrid(_ref) {\n var photos = _ref.photos;\n\n var totalPhotos = photos.length;\n var hiddenPhotos = totalPhotos > VISIBLE_PHOTOS ? totalPhotos - VISIBLE_PHOTOS : 0;\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_2__common_Gallery__["a" /* default */],\n { id: \'listing--gallery--grid\', className: __WEBPACK_IMPORTED_MODULE_4__index_scss___default.a.grid },\n photos.map(function (photo, index) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_3__common_Gallery_Photo__["a" /* default */],\n {\n key: photo.id,\n photo: photo,\n hidden: index >= VISIBLE_PHOTOS,\n width: getThumbWidth(index),\n height: getThumbHeight(index)\n },\n hiddenPhotos > 0 && index === VISIBLE_PHOTOS - 1 && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n \'div\',\n { className: __WEBPACK_IMPORTED_MODULE_4__index_scss___default.a.moreToGo, style: { width: THUMB_WIDTH, height: THUMB_HEIGHT } },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n \'span\',\n { className: __WEBPACK_IMPORTED_MODULE_4__index_scss___default.a.moreToGoAmount },\n \'+\',\n hiddenPhotos\n )\n )\n );\n })\n );\n};\n\nListingPhotoGrid.propTypes = {\n photos: __webpack_require__(/*! prop-types */ 0).oneOfType([__webpack_require__(/*! prop-types */ 0).arrayOf(__webpack_require__(/*! prop-types */ 0).any), __webpack_require__(/*! prop-types */ 0).arrayOf(__webpack_require__(/*! prop-types */ 0).any)]).isRequired\n};\n/* harmony default export */ __webpack_exports__["a"] = (ListingPhotoGrid);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-show/ui/Listing/Photos/common/Grid/index.jsx\n// module id = 287\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-show/ui/Listing/Photos/common/Grid/index.jsx?', + ); + + /***/ + }, + /* 288 */ + /* exports provided: default */ + /* exports used: default */ + /*!***************************************************************************!*\ + !*** ./app/bundles/listings-show/ui/Topbar/common/StickyNavbar/index.jsx ***! + \***************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__libs_components__ = __webpack_require__(/*! ../../../../../../libs/components */ 11);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__index_scss__ = __webpack_require__(/*! ./index.scss */ 1001);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__index_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__index_scss__);\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\n\n\n\n\n\n\nvar StickyNavbar = function (_React$Component) {\n _inherits(StickyNavbar, _React$Component);\n\n function StickyNavbar() {\n var _ref;\n\n var _temp, _this, _ret;\n\n _classCallCheck(this, StickyNavbar);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = StickyNavbar.__proto__ || Object.getPrototypeOf(StickyNavbar)).call.apply(_ref, [this].concat(args))), _this), _this.state = { isSticky: false }, _this.componentDidMount = function () {\n window.addEventListener(\'scroll\', _this.setStickyState);\n }, _this.componentWillUnmount = function () {\n window.removeEventListener(\'scroll\', _this.setStickyState);\n }, _this.setNavbarRef = function (ref) {\n _this.navbar = ref;\n }, _this.setStickyState = function () {\n var isSticky = _this.state.isSticky;\n\n var navbarHeight = _this.navbar.offsetHeight;\n var scrolled = window.pageYOffset;\n\n if (scrolled >= navbarHeight && !isSticky) {\n _this.setState({ isSticky: true });\n } else if (scrolled < navbarHeight && isSticky) {\n _this.setState({ isSticky: false });\n }\n }, _this.render = function () {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_2__libs_components__["y" /* Navbar */],\n {\n setRef: _this.setNavbarRef,\n className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()(__WEBPACK_IMPORTED_MODULE_3__index_scss___default.a.navbar, _this.state.isSticky ? __WEBPACK_IMPORTED_MODULE_3__index_scss___default.a.sticky : __WEBPACK_IMPORTED_MODULE_3__index_scss___default.a.common)\n },\n _this.props.children\n );\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n return StickyNavbar;\n}(__WEBPACK_IMPORTED_MODULE_0_react___default.a.Component);\n\nStickyNavbar.propTypes = {\n children: __webpack_require__(/*! prop-types */ 0).any\n};\n/* harmony default export */ __webpack_exports__["a"] = (StickyNavbar);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-show/ui/Topbar/common/StickyNavbar/index.jsx\n// module id = 288\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-show/ui/Topbar/common/StickyNavbar/index.jsx?', + ); + + /***/ + }, + /* 289 */ + /* exports provided: SCROLL_PADDING, default */ + /* exports used: SCROLL_PADDING, default */ + /*!****************************************************************************!*\ + !*** ./app/bundles/listings-show/ui/Topbar/common/UnitsProvider/index.jsx ***! + \****************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_fp__ = __webpack_require__(/*! lodash/fp */ 14);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_fp___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_lodash_fp__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__libs_utils_dom__ = __webpack_require__(/*! ../../../../../../libs/utils/dom */ 44);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__utils__ = __webpack_require__(/*! ../../../../utils */ 86);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__assets_styles_resources_variables__ = __webpack_require__(/*! ../../../../../../assets/styles/resources/variables */ 131);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return SCROLL_PADDING; });\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n/* eslint no-mixed-operators: ["error", {"allowSamePrecedence": true}] */\n\n\n\n\nvar babelPluginFlowReactPropTypes_proptype_ListingUnitType = __webpack_require__(/*! ../../../../enums/ListingUnit */ 33).babelPluginFlowReactPropTypes_proptype_ListingUnitType || __webpack_require__(/*! react */ 1).PropTypes.any;\n\n\n\n\n\nvar SCROLL_PADDING = __WEBPACK_IMPORTED_MODULE_4__assets_styles_resources_variables__["e" /* NAVBAR_HEIGHT */] + 3;\n\nvar UnitsProvider = function (_React$Component) {\n _inherits(UnitsProvider, _React$Component);\n\n function UnitsProvider() {\n var _ref;\n\n _classCallCheck(this, UnitsProvider);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n var _this = _possibleConstructorReturn(this, (_ref = UnitsProvider.__proto__ || Object.getPrototypeOf(UnitsProvider)).call.apply(_ref, [this].concat(args)));\n\n _this.state = {\n units: [],\n activeUnit: null\n };\n\n _this.componentDidMount = function () {\n _this.setUnits();\n if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__libs_utils_dom__["h" /* isSmallScreen */])()) return;\n window.addEventListener(\'scroll\', _this.setActiveUnit);\n };\n\n _this.componentDidUpdate = function (prevProps) {\n if (prevProps.units === _this.props.units) return;\n _this.setUnits();\n };\n\n _this.componentWillUnmount = function () {\n if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__libs_utils_dom__["h" /* isSmallScreen */])()) return;\n window.removeEventListener(\'scroll\', _this.setActiveUnit);\n };\n\n _this.setUnits = function () {\n var nextUnits = _this.props.units.filter(function (unit) {\n return !!document.getElementById(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__utils__["b" /* getListingUnitDomId */])(unit.value));\n });\n _this.setState({ units: nextUnits });\n };\n\n _this.setActiveUnit = function () {\n var activeUnit = _this.state.activeUnit;\n\n var scrolled = window.pageYOffset;\n\n var nextActiveUnit = _this.props.units.map(function (unit) {\n return unit.value;\n }).find(function (unit, index, units) {\n var element = document.getElementById(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__utils__["b" /* getListingUnitDomId */])(unit));\n var nextElement = units[index + 1] ? document.getElementById(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__utils__["b" /* getListingUnitDomId */])(units[index + 1])) : null;\n\n if (!element) return false;\n\n var elementClientRect = element.getBoundingClientRect();\n\n var isOutOfSight = elementClientRect.top > window.innerHeight && elementClientRect.bottom > window.innerHeight;\n\n if (isOutOfSight) return false;\n\n var VISIBLE_BOTTOM_DOES_NOT_MEAN_ACTIVE_FACTOR = SCROLL_PADDING + 100;\n var isNotReallyVisible = elementClientRect.top < VISIBLE_BOTTOM_DOES_NOT_MEAN_ACTIVE_FACTOR && elementClientRect.bottom < VISIBLE_BOTTOM_DOES_NOT_MEAN_ACTIVE_FACTOR;\n\n if (isNotReallyVisible) return false;\n\n var elementTopPosition = scrolled + Math.floor(elementClientRect.top) - SCROLL_PADDING;\n\n var nextElementClientRect = nextElement && nextElement.getBoundingClientRect();\n var nextBreakpointPosition = nextElementClientRect ? scrolled + Math.floor(nextElementClientRect.top) - SCROLL_PADDING : scrolled + Math.floor(elementClientRect.top + elementClientRect.height);\n return scrolled < elementTopPosition || scrolled < nextBreakpointPosition;\n });\n\n if (nextActiveUnit !== activeUnit) {\n _this.setState({ activeUnit: nextActiveUnit || null });\n }\n };\n\n _this.render = function () {\n return (\n // $FlowFixMe: children\n _this.props.children({\n units: _this.state.units,\n activeUnit: _this.state.activeUnit\n })\n );\n };\n\n _this.setActiveUnit = __WEBPACK_IMPORTED_MODULE_1_lodash_fp___default.a.debounce(20, _this.setActiveUnit);\n return _this;\n }\n\n return UnitsProvider;\n}(__WEBPACK_IMPORTED_MODULE_0_react___default.a.Component);\n\nUnitsProvider.propTypes = {\n units: __webpack_require__(/*! prop-types */ 0).arrayOf(babelPluginFlowReactPropTypes_proptype_ListingUnitType).isRequired,\n children: __webpack_require__(/*! prop-types */ 0).func\n};\n/* harmony default export */ __webpack_exports__["b"] = (UnitsProvider);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-show/ui/Topbar/common/UnitsProvider/index.jsx\n// module id = 289\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-show/ui/Topbar/common/UnitsProvider/index.jsx?', + ); + + /***/ + }, + /* 290 */ + /* exports provided: default */ + /* exports used: default */ + /*!***********************************************************************!*\ + !*** ./app/bundles/listings-show/ui/Topbar/live/Navigation/index.jsx ***! + \***********************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__utils__ = __webpack_require__(/*! ../../../../utils */ 86);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__libs_utils_dom__ = __webpack_require__(/*! ../../../../../../libs/utils/dom */ 44);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__libs_components__ = __webpack_require__(/*! ../../../../../../libs/components */ 11);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__common_UnitsProvider__ = __webpack_require__(/*! ../../common/UnitsProvider */ 289);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__common_navigation__ = __webpack_require__(/*! ../../common/navigation */ 685);\n\n\nvar babelPluginFlowReactPropTypes_proptype_ContextualListingDisplayMode = __webpack_require__(/*! ../../../../../../types */ 4).babelPluginFlowReactPropTypes_proptype_ContextualListingDisplayMode || __webpack_require__(/*! react */ 1).PropTypes.any;\n\n\n\n\n\n\n\n\nvar Navigation = function Navigation(_ref) {\n var displayMode = _ref.displayMode;\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_4__common_UnitsProvider__["b" /* default */],\n {\n units: __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__utils__["c" /* isLimitedPreview */])(displayMode) ? __WEBPACK_IMPORTED_MODULE_5__common_navigation__["a" /* limited */] : __WEBPACK_IMPORTED_MODULE_5__common_navigation__["b" /* full */]\n },\n function (_ref2) {\n var units = _ref2.units,\n activeUnit = _ref2.activeUnit;\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_3__libs_components__["y" /* Navbar */].Unit,\n null,\n units.map(function (unit) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_3__libs_components__["y" /* Navbar */].NavControl,\n {\n key: unit.value,\n active: unit.value === activeUnit,\n onClick: function onClick() {\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__libs_utils_dom__["g" /* scrollTo */])(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__utils__["b" /* getListingUnitDomId */])(unit.value), {\n padding: __WEBPACK_IMPORTED_MODULE_4__common_UnitsProvider__["a" /* SCROLL_PADDING */]\n });\n }\n },\n unit.label\n );\n })\n );\n }\n );\n};\n\nNavigation.propTypes = {\n displayMode: babelPluginFlowReactPropTypes_proptype_ContextualListingDisplayMode\n};\n/* harmony default export */ __webpack_exports__["a"] = (Navigation);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-show/ui/Topbar/live/Navigation/index.jsx\n// module id = 290\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-show/ui/Topbar/live/Navigation/index.jsx?', + ); + + /***/ + }, + /* 291 */ + /* exports provided: default */ + /* exports used: default */ + /*!*********************************************************************!*\ + !*** ./app/bundles/listings-show/ui/common/Gallery/Photo/index.jsx ***! + \*********************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__libs_utils_fng_photos__ = __webpack_require__(/*! ../../../../../../libs/utils/fng/photos */ 51);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__libs_components__ = __webpack_require__(/*! ../../../../../../libs/components */ 11);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__index_scss__ = __webpack_require__(/*! ./index.scss */ 1004);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__index_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__index_scss__);\nfunction _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\n\n\nvar babelPluginFlowReactPropTypes_proptype_Photo = __webpack_require__(/*! ../../../../../../types */ 4).babelPluginFlowReactPropTypes_proptype_Photo || __webpack_require__(/*! react */ 1).PropTypes.any;\n\n\n\n\n\n\n\nvar ListingPhoto = function ListingPhoto(_ref) {\n var photo = _ref.photo,\n width = _ref.width,\n height = _ref.height,\n className = _ref.className,\n hidden = _ref.hidden,\n children = _ref.children;\n\n var calculated = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__libs_utils_fng_photos__[\"b\" /* calculatePhotoDimensions */])(photo.width, photo.height);\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'figure',\n {\n className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()(className, _defineProperty({}, __WEBPACK_IMPORTED_MODULE_4__index_scss___default.a.hidden, hidden)),\n itemProp: 'associatedMedia',\n itemScope: true,\n itemType: 'http://schema.org/ImageObject'\n },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'a',\n {\n href: __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__libs_utils_fng_photos__[\"a\" /* buildPhotoUrl */])({\n width: calculated.width,\n height: calculated.height,\n url: photo.cloudUrl,\n format: 'jpg'\n }),\n 'data-size': calculated.width + 'x' + calculated.height,\n itemProp: 'contentUrl'\n },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3__libs_components__[\"g\" /* Image */], {\n alt: photo.description || 'Listing photo',\n url: photo.cloudUrl,\n width: width,\n height: height,\n dpr: '2.0',\n crop: 'fill',\n itemProp: 'thumbnail'\n }),\n children\n ),\n photo.description && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'figcaption',\n { className: __WEBPACK_IMPORTED_MODULE_4__index_scss___default.a.hidden, itemProp: 'caption description' },\n photo.description\n )\n );\n};\n\nListingPhoto.propTypes = {\n photo: babelPluginFlowReactPropTypes_proptype_Photo,\n width: __webpack_require__(/*! prop-types */ 0).number.isRequired,\n height: __webpack_require__(/*! prop-types */ 0).number.isRequired,\n className: __webpack_require__(/*! prop-types */ 0).string,\n hidden: __webpack_require__(/*! prop-types */ 0).bool,\n children: __webpack_require__(/*! prop-types */ 0).any\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (ListingPhoto);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-show/ui/common/Gallery/Photo/index.jsx\n// module id = 291\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-show/ui/common/Gallery/Photo/index.jsx?", + ); + + /***/ + }, + /* 292 */ + /* exports provided: default */ + /* exports used: default */ + /*!***************************************************************!*\ + !*** ./app/bundles/listings-show/ui/common/Gallery/index.jsx ***! + \***************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_classnames__);\n\n\n\nvar ListingGallery = function ListingGallery(_ref) {\n var id = _ref.id,\n className = _ref.className,\n children = _ref.children;\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { id: id, className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()('fng-gallery', className) },\n children\n );\n};\n\nListingGallery.propTypes = {\n id: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n className: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n children: __webpack_require__(/*! prop-types */ 0).any\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (ListingGallery);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-show/ui/common/Gallery/index.jsx\n// module id = 292\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-show/ui/common/Gallery/index.jsx?", + ); + + /***/ + }, + /* 293 */ + /* exports provided: clearStorePartsCreators, mergeWithErrorIfNameCollision, registerStorePartsCreator, sharedStoreCreator, registerSharedStore, getSharedStore */ + /* exports used: registerStorePartsCreator, getSharedStore, registerSharedStore */ + /*!*******************************************!*\ + !*** ./app/bundles/shared-store/index.js ***! + \*******************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_redux__ = __webpack_require__(/*! redux */ 129);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_redux_devtools_extension__ = __webpack_require__(/*! redux-devtools-extension */ 1482);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_redux_devtools_extension___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_redux_devtools_extension__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_on_rails__ = __webpack_require__(/*! react-on-rails */ 50);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_on_rails___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react_on_rails__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_lodash_fp__ = __webpack_require__(/*! lodash/fp */ 14);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_lodash_fp___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_lodash_fp__);\n/* unused harmony export clearStorePartsCreators */\n/* unused harmony export mergeWithErrorIfNameCollision */\n/* harmony export (immutable) */ __webpack_exports__["a"] = registerStorePartsCreator;\n/* unused harmony export sharedStoreCreator */\n/* harmony export (immutable) */ __webpack_exports__["c"] = registerSharedStore;\n/* harmony export (immutable) */ __webpack_exports__["b"] = getSharedStore;\nfunction _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\nfunction _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }\n\n\n\n\n\n\n/**\n * Holds the store part creator functions that were inserted by `sharedStoreCreator`. These will\n * then be used by `sharedStoreCreator`.\n */\nvar babelPluginFlowReactPropTypes_proptype_StorePartsCreator = __webpack_require__(/*! ../../types */ 4).babelPluginFlowReactPropTypes_proptype_StorePartsCreator || __webpack_require__(/*! react */ 1).PropTypes.any;\n\nvar storePartsCreators = [];\n\n/**\n * clearStorePartsCreators - removes any addded storePartsCreators. Mostly useful for resetting to\n * a pristine state in between tests.\n */\nfunction clearStorePartsCreators() {\n storePartsCreators.length = 0;\n}\n\n/**\n * Merges objects, throws if objects contain same keys\n *\n */\nvar mergeWithErrorIfNameCollision = __WEBPACK_IMPORTED_MODULE_3_lodash_fp___default.a.curry(function (obj1, obj2) {\n var getAllKeys = __WEBPACK_IMPORTED_MODULE_3_lodash_fp___default.a.flatMap(__WEBPACK_IMPORTED_MODULE_3_lodash_fp___default.a.keys);\n\n var allKeys = getAllKeys([obj1, obj2]);\n var uniqueKeys = __WEBPACK_IMPORTED_MODULE_3_lodash_fp___default.a.uniq(allKeys);\n\n var duplicateKeysExist = allKeys.length !== uniqueKeys.length;\n\n if (duplicateKeysExist) throw new Error(\'Name collision when merging objects\');\n\n return __WEBPACK_IMPORTED_MODULE_3_lodash_fp___default.a.merge(obj1, obj2);\n});\n\n/**\n * registerStorePartsCreator - Adds a store creator function to a collection of store creators for\n * use with the `sharedStoreCreator` function.\n *\n * A store creator function is a function that, when passed props from Rails, returns reducers,\n * initialState, middlewares, other (non-middleware) enhancers, and a store callback needed.\n *\n * Note:\n * - Do not combine your reducers; leave them in an object.\n * - Do not apply your middlewares; provide them in an array. Middlewares are de-duplicated, so\n * if two different storePartsCreator functions provide the same middleware, that middleware\n * will only be called once (equality determined by lodash\'s `uniq` function).\n *\n * If for some reason you need a reference to the store once it\'s created, such as for applying\n * redux devTools, you can provide a `storeCallback` function that allows you to reference the\n * store on creation.\n *\n * @param {\n * (props, railsContext) =>\n * {\n * reducers: {},\n * initialState: {},\n * middlewares: ?Array<Function>,\n * otherEnhancers: ?Array<Function>,\n * storeCallback: ?Function,\n * }\n * } storePartsCreator - function that creates store parts when given props\n */\nfunction registerStorePartsCreator(storePartsCreator) {\n storePartsCreators.push(storePartsCreator);\n}\n\n/**\n * sharedStoreCreator - This is what should get registered with\n * ReactOnRails.registerStore(). When given props and railsContext from ReactOnRails, it calls\n * each storePartsCreator function and returns hydrated initialStates.\n *\n * @param {Object} props props from your Rails view\n * @param {Object} railsContext React on Rails context\n * @return {Object} the hydrated store\n */\nfunction sharedStoreCreator(props, railsContext) {\n var storeParts = __WEBPACK_IMPORTED_MODULE_3_lodash_fp___default.a.flow(__WEBPACK_IMPORTED_MODULE_3_lodash_fp___default.a.map(function (creator) {\n return creator(props, railsContext);\n }), __WEBPACK_IMPORTED_MODULE_3_lodash_fp___default.a.filter(__WEBPACK_IMPORTED_MODULE_3_lodash_fp___default.a.identity))(storePartsCreators);\n\n var initialState = __WEBPACK_IMPORTED_MODULE_3_lodash_fp___default.a.flow(__WEBPACK_IMPORTED_MODULE_3_lodash_fp___default.a.map(__WEBPACK_IMPORTED_MODULE_3_lodash_fp___default.a.get(\'initialState\')), __WEBPACK_IMPORTED_MODULE_3_lodash_fp___default.a.reduce(mergeWithErrorIfNameCollision, {}))(storeParts);\n\n var rootReducer = __WEBPACK_IMPORTED_MODULE_3_lodash_fp___default.a.flow(__WEBPACK_IMPORTED_MODULE_3_lodash_fp___default.a.map(__WEBPACK_IMPORTED_MODULE_3_lodash_fp___default.a.get(\'reducers\')), __WEBPACK_IMPORTED_MODULE_3_lodash_fp___default.a.reduce(mergeWithErrorIfNameCollision, {}), __WEBPACK_IMPORTED_MODULE_0_redux__["combineReducers"])(storeParts);\n\n // middlewares are a special type of enhancer that needs to be applied with `applyMiddleware`\n var middlewares = __WEBPACK_IMPORTED_MODULE_3_lodash_fp___default.a.flow(__WEBPACK_IMPORTED_MODULE_3_lodash_fp___default.a.flatMap(__WEBPACK_IMPORTED_MODULE_3_lodash_fp___default.a.get(\'middlewares\')), __WEBPACK_IMPORTED_MODULE_3_lodash_fp___default.a.compact, __WEBPACK_IMPORTED_MODULE_3_lodash_fp___default.a.uniq)(storeParts);\n var appliedMiddlewares = __WEBPACK_IMPORTED_MODULE_3_lodash_fp___default.a.isEmpty(middlewares) ? null : __WEBPACK_IMPORTED_MODULE_0_redux__["applyMiddleware"].apply(undefined, _toConsumableArray(middlewares));\n\n // non-middleware enhancers\n var otherEnhancers = __WEBPACK_IMPORTED_MODULE_3_lodash_fp___default.a.flow(__WEBPACK_IMPORTED_MODULE_3_lodash_fp___default.a.flatMap(__WEBPACK_IMPORTED_MODULE_3_lodash_fp___default.a.get(\'otherEnhancers\')), __WEBPACK_IMPORTED_MODULE_3_lodash_fp___default.a.compact, __WEBPACK_IMPORTED_MODULE_3_lodash_fp___default.a.uniq)(storeParts);\n\n var storeCallbacks = __WEBPACK_IMPORTED_MODULE_3_lodash_fp___default.a.flow(__WEBPACK_IMPORTED_MODULE_3_lodash_fp___default.a.map(__WEBPACK_IMPORTED_MODULE_3_lodash_fp___default.a.get(\'storeCallback\')), __WEBPACK_IMPORTED_MODULE_3_lodash_fp___default.a.compact)(storeParts);\n\n var enhancers = __WEBPACK_IMPORTED_MODULE_3_lodash_fp___default.a.compact([appliedMiddlewares].concat(_toConsumableArray(otherEnhancers)));\n var enhancer = __WEBPACK_IMPORTED_MODULE_3_lodash_fp___default.a.isEmpty(enhancers) ? __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_redux_devtools_extension__["devToolsEnhancer"])() : __WEBPACK_IMPORTED_MODULE_1_redux_devtools_extension__["composeWithDevTools"].apply(undefined, _toConsumableArray(enhancers));\n\n var store = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0_redux__["createStore"])(rootReducer, initialState, enhancer);\n\n if (storeCallbacks) __WEBPACK_IMPORTED_MODULE_3_lodash_fp___default.a.forEach(function (callback) {\n return callback(store);\n }, storeCallbacks);\n\n return store;\n}\n\nvar SHARED_STORE_NAME = \'appStore\';\n\n/**\n * registerSharedStore - Simple helper function for registering the shared store creator function.\n * This helps encapsulate the naming of the store instead of having to ensure this is in sync\n * across all bundles.\n */\nfunction registerSharedStore() {\n __WEBPACK_IMPORTED_MODULE_2_react_on_rails___default.a.registerStore(_defineProperty({}, SHARED_STORE_NAME, sharedStoreCreator));\n}\n\n/**\n * getSharedStore - Retrieves the created shared store from ReactOnRails. This method\n * encapsulates the name of the shared store to eliminate the need to keep this in sync across\n * bundles.\n *\n * @return {Object} the redux store\n */\nfunction getSharedStore() {\n return __WEBPACK_IMPORTED_MODULE_2_react_on_rails___default.a.getStore(SHARED_STORE_NAME);\n}\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/shared-store/index.js\n// module id = 293\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/shared-store/index.js?', + ); + + /***/ + }, + /* 294 */ + /* exports provided: default */ + /* exports used: default */ + /*!***************************************************************************!*\ + !*** ./app/bundles/users-show/components/SectionHeader/SectionHeader.jsx ***! + \***************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__SectionHeader_scss__ = __webpack_require__(/*! ./SectionHeader.scss */ 1034);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__SectionHeader_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__SectionHeader_scss__);\n\n\n\n\n\n\nvar SectionHeader = function SectionHeader(_ref) {\n var title = _ref.title,\n counter = _ref.counter;\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_3__SectionHeader_scss___default.a.sectionTitleWrapper },\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_2_classnames___default()('container', __WEBPACK_IMPORTED_MODULE_3__SectionHeader_scss___default.a.container) },\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_3__SectionHeader_scss___default.a.sectionTitle },\n title,\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'span',\n { className: __WEBPACK_IMPORTED_MODULE_2_classnames___default()(__WEBPACK_IMPORTED_MODULE_3__SectionHeader_scss___default.a.badge) },\n counter\n )\n )\n )\n );\n};\n\nSectionHeader.propTypes = {\n title: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string.isRequired,\n counter: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number.isRequired\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (SectionHeader);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/users-show/components/SectionHeader/SectionHeader.jsx\n// module id = 294\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/users-show/components/SectionHeader/SectionHeader.jsx?", + ); + + /***/ + }, + /* 295 */ + /* exports provided: default */ + /* exports used: default */ + /*!***************************************************************!*\ + !*** ./app/bundles/users-show/constants/listingsConstants.js ***! + \***************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_mirror_creator__ = __webpack_require__(/*! mirror-creator */ 1209);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_mirror_creator___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_mirror_creator__);\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (__WEBPACK_IMPORTED_MODULE_0_mirror_creator___default()(['LISTINGS__FAVORITE_REQUESTED', 'LISTINGS__FAVORITE_SUCCEEDED', 'LISTINGS__FAVORITE_FAILED', 'LISTINGS__UNFAVORITE_REQUESTED', 'LISTINGS__UNFAVORITE_SUCCEEDED', 'LISTINGS__UNFAVORITE_FAILED']));\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/users-show/constants/listingsConstants.js\n// module id = 295\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/users-show/constants/listingsConstants.js?", + ); + + /***/ + }, + /* 296 */ + /* exports provided: default */ + /* exports used: default */ + /*!*************************************!*\ + !*** ./app/enums/ListingDetails.js ***! + \*************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash__ = __webpack_require__(/*! lodash */ 19);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_lodash__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__libs_utils_Enum__ = __webpack_require__(/*! ../libs/utils/Enum */ 22);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__RoomType__ = __webpack_require__(/*! ./RoomType */ 70);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__PropertyType__ = __webpack_require__(/*! ./PropertyType */ 297);\n\n\n\n\n\n\nvar getValues = function getValues(values) {\n return values.map(function (value) {\n return { label: value, value: value };\n });\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (new __WEBPACK_IMPORTED_MODULE_1__libs_utils_Enum__[\"a\" /* default */]({\n PROPERTY_TYPE: {\n label: 'Property Type',\n attr: 'propertyType',\n values: __WEBPACK_IMPORTED_MODULE_3__PropertyType__[\"a\" /* default */].items()\n },\n BEDS: {\n label: 'Beds',\n attr: 'beds',\n values: getValues(__WEBPACK_IMPORTED_MODULE_0_lodash___default.a.range(1, 16)).concat([{ label: '16+', value: 16 }])\n },\n BEDROOMS: {\n label: 'Bedrooms',\n attr: 'bedrooms',\n values: [{ label: 'Studio', value: 0 }].concat(getValues(__WEBPACK_IMPORTED_MODULE_0_lodash___default.a.range(1, 11)))\n },\n BATHROOMS: {\n label: 'Bathrooms',\n attr: 'bathrooms',\n values: getValues(__WEBPACK_IMPORTED_MODULE_0_lodash___default.a.range(0, 8, 0.5)).concat([{ label: '8+', value: 8 }])\n },\n ACCOMMODATES: {\n label: 'Accommodates',\n attr: 'maxGuests',\n values: getValues(__WEBPACK_IMPORTED_MODULE_0_lodash___default.a.range(1, 25))\n },\n ROOM_TYPE: {\n label: 'Room Type',\n attr: 'roomType',\n values: __WEBPACK_IMPORTED_MODULE_2__RoomType__[\"a\" /* default */].items()\n },\n GUESTS: {\n label: 'Guests',\n attr: 'guests',\n values: getValues(__WEBPACK_IMPORTED_MODULE_0_lodash___default.a.range(1, 8)).concat([{ label: '8+', value: 8 }])\n }\n\n}));\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/enums/ListingDetails.js\n// module id = 296\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/enums/ListingDetails.js?", + ); + + /***/ + }, + /* 297 */ + /* exports provided: default */ + /* exports used: default */ + /*!***********************************!*\ + !*** ./app/enums/PropertyType.js ***! + \***********************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__libs_utils_Enum__ = __webpack_require__(/*! ../libs/utils/Enum */ 22);\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (new __WEBPACK_IMPORTED_MODULE_0__libs_utils_Enum__[\"a\" /* default */]({\n APARTMENT: {\n label: 'Apartment',\n value: 'apartment'\n },\n HOUSE: {\n label: 'House',\n value: 'house'\n },\n BNB: {\n label: 'Bed & Breakfast',\n value: 'bnb'\n },\n LOFT: {\n label: 'Loft',\n value: 'loft'\n },\n TOWNHOUSE: {\n label: 'Townhouse',\n value: 'townhouse'\n },\n CONDOMINIUM: {\n label: 'Condominium',\n value: 'condominium'\n },\n BUNGALOW: {\n label: 'Bungalow',\n value: 'bungalow'\n },\n VILLA: {\n label: 'Villa',\n value: 'villa'\n },\n BOAT: {\n label: 'Boat',\n value: 'boat'\n },\n CAMPER: {\n label: 'Camper/RV',\n value: 'camper'\n },\n OTHER: {\n label: 'Other',\n value: 'other'\n }\n}));\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/enums/PropertyType.js\n// module id = 297\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/enums/PropertyType.js?", + ); + + /***/ + }, + /* 298 */ + /* exports provided: default */ + /* exports used: default */ + /*!********************************!*\ + !*** ./app/enums/SortOrder.js ***! + \********************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__libs_utils_Enum__ = __webpack_require__(/*! ../libs/utils/Enum */ 22);\n\n\n/* harmony default export */ __webpack_exports__["a"] = (new __WEBPACK_IMPORTED_MODULE_0__libs_utils_Enum__["a" /* default */]({\n ASC: \'asc\',\n DESC: \'desc\'\n}));\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/enums/SortOrder.js\n// module id = 298\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/enums/SortOrder.js?', + ); + + /***/ + }, + /* 299 */ + /* exports provided: default */ + /* exports used: default */ + /*!***********************************************!*\ + !*** ./app/libs/components/Button/Button.jsx ***! + \***********************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_router__ = __webpack_require__(/*! react-router */ 82);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_lodash_fp__ = __webpack_require__(/*! lodash/fp */ 14);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_lodash_fp___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_lodash_fp__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Button_scss__ = __webpack_require__(/*! ./Button.scss */ 1036);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Button_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__Button_scss__);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _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\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\n/* eslint-disable jsx-a11y/anchor-has-content, jsx-a11y/no-static-element-interactions */\n\n\n\n// import { Link } from 'react-router/es'; FIXME: this seems to be unusable with Storyshots\n\n\n\nvar babelPluginFlowReactPropTypes_proptype_OnClick = __webpack_require__(/*! ../../../types */ 4).babelPluginFlowReactPropTypes_proptype_OnClick || __webpack_require__(/*! react */ 1).PropTypes.any;\n\n\n\nvar Button = function Button(_ref) {\n var className = _ref.className,\n onClick = _ref.onClick,\n primary = _ref.primary,\n success = _ref.success,\n warning = _ref.warning,\n danger = _ref.danger,\n inverted = _ref.inverted,\n faded = _ref.faded,\n ghostPrimary = _ref.ghostPrimary,\n ghostSuccess = _ref.ghostSuccess,\n ghostWarning = _ref.ghostWarning,\n ghostDanger = _ref.ghostDanger,\n orange = _ref.orange,\n teal = _ref.teal,\n gray = _ref.gray,\n size = _ref.size,\n margin = _ref.margin,\n asLink = _ref.asLink,\n asNativeLink = _ref.asNativeLink,\n targetBlank = _ref.targetBlank,\n setRef = _ref.setRef,\n expanded = _ref.expanded,\n visuallyDisabled = _ref.visuallyDisabled,\n otherProps = _objectWithoutProperties(_ref, ['className', 'onClick', 'primary', 'success', 'warning', 'danger', 'inverted', 'faded', 'ghostPrimary', 'ghostSuccess', 'ghostWarning', 'ghostDanger', 'orange', 'teal', 'gray', 'size', 'margin', 'asLink', 'asNativeLink', 'targetBlank', 'setRef', 'expanded', 'visuallyDisabled']);\n\n // TODO: Refactor style API to enum instead of boolean\n var computeStyleClassName = __WEBPACK_IMPORTED_MODULE_3_lodash_fp___default.a.cond([[__WEBPACK_IMPORTED_MODULE_3_lodash_fp___default.a.constant(primary), __WEBPACK_IMPORTED_MODULE_3_lodash_fp___default.a.constant(__WEBPACK_IMPORTED_MODULE_4__Button_scss___default.a.btnPrimary)], [__WEBPACK_IMPORTED_MODULE_3_lodash_fp___default.a.constant(success), __WEBPACK_IMPORTED_MODULE_3_lodash_fp___default.a.constant(__WEBPACK_IMPORTED_MODULE_4__Button_scss___default.a.btnSuccess)], [__WEBPACK_IMPORTED_MODULE_3_lodash_fp___default.a.constant(warning), __WEBPACK_IMPORTED_MODULE_3_lodash_fp___default.a.constant(__WEBPACK_IMPORTED_MODULE_4__Button_scss___default.a.btnWarning)], [__WEBPACK_IMPORTED_MODULE_3_lodash_fp___default.a.constant(danger), __WEBPACK_IMPORTED_MODULE_3_lodash_fp___default.a.constant(__WEBPACK_IMPORTED_MODULE_4__Button_scss___default.a.btnDanger)], [__WEBPACK_IMPORTED_MODULE_3_lodash_fp___default.a.constant(inverted), __WEBPACK_IMPORTED_MODULE_3_lodash_fp___default.a.constant(__WEBPACK_IMPORTED_MODULE_4__Button_scss___default.a.btnInverted)], [__WEBPACK_IMPORTED_MODULE_3_lodash_fp___default.a.constant(faded), __WEBPACK_IMPORTED_MODULE_3_lodash_fp___default.a.constant(__WEBPACK_IMPORTED_MODULE_4__Button_scss___default.a.btnFaded)], [__WEBPACK_IMPORTED_MODULE_3_lodash_fp___default.a.constant(ghostPrimary), __WEBPACK_IMPORTED_MODULE_3_lodash_fp___default.a.constant(__WEBPACK_IMPORTED_MODULE_4__Button_scss___default.a.btnGhostPrimary)], [__WEBPACK_IMPORTED_MODULE_3_lodash_fp___default.a.constant(ghostSuccess), __WEBPACK_IMPORTED_MODULE_3_lodash_fp___default.a.constant(__WEBPACK_IMPORTED_MODULE_4__Button_scss___default.a.btnGhostSuccess)], [__WEBPACK_IMPORTED_MODULE_3_lodash_fp___default.a.constant(ghostWarning), __WEBPACK_IMPORTED_MODULE_3_lodash_fp___default.a.constant(__WEBPACK_IMPORTED_MODULE_4__Button_scss___default.a.btnGhostWarning)], [__WEBPACK_IMPORTED_MODULE_3_lodash_fp___default.a.constant(ghostDanger), __WEBPACK_IMPORTED_MODULE_3_lodash_fp___default.a.constant(__WEBPACK_IMPORTED_MODULE_4__Button_scss___default.a.btnGhostDanger)], [__WEBPACK_IMPORTED_MODULE_3_lodash_fp___default.a.constant(orange), __WEBPACK_IMPORTED_MODULE_3_lodash_fp___default.a.constant(__WEBPACK_IMPORTED_MODULE_4__Button_scss___default.a.btnOrange)], [__WEBPACK_IMPORTED_MODULE_3_lodash_fp___default.a.constant(teal), __WEBPACK_IMPORTED_MODULE_3_lodash_fp___default.a.constant(__WEBPACK_IMPORTED_MODULE_4__Button_scss___default.a.btnTeal)], [__WEBPACK_IMPORTED_MODULE_3_lodash_fp___default.a.constant(gray), __WEBPACK_IMPORTED_MODULE_3_lodash_fp___default.a.constant(__WEBPACK_IMPORTED_MODULE_4__Button_scss___default.a.btnGray)], [__WEBPACK_IMPORTED_MODULE_3_lodash_fp___default.a.constant(true), __WEBPACK_IMPORTED_MODULE_3_lodash_fp___default.a.constant(__WEBPACK_IMPORTED_MODULE_4__Button_scss___default.a.btnDefault)]]);\n\n var sizeClass = __WEBPACK_IMPORTED_MODULE_3_lodash_fp___default.a.cond([[__WEBPACK_IMPORTED_MODULE_3_lodash_fp___default.a.isEqual('sm'), __WEBPACK_IMPORTED_MODULE_3_lodash_fp___default.a.constant('btn-sm')], [__WEBPACK_IMPORTED_MODULE_3_lodash_fp___default.a.isEqual('md'), __WEBPACK_IMPORTED_MODULE_3_lodash_fp___default.a.constant('btn-md')], [__WEBPACK_IMPORTED_MODULE_3_lodash_fp___default.a.isEqual('lg'), __WEBPACK_IMPORTED_MODULE_3_lodash_fp___default.a.constant('btn-lg')], [__WEBPACK_IMPORTED_MODULE_3_lodash_fp___default.a.isEqual('xl'), __WEBPACK_IMPORTED_MODULE_3_lodash_fp___default.a.constant(__WEBPACK_IMPORTED_MODULE_4__Button_scss___default.a.btnSizeXL)], [__WEBPACK_IMPORTED_MODULE_3_lodash_fp___default.a.constant(true), __WEBPACK_IMPORTED_MODULE_3_lodash_fp___default.a.constant(__WEBPACK_IMPORTED_MODULE_4__Button_scss___default.a.btnDefaultSize)]])(size);\n var marginClassName = margin && __WEBPACK_IMPORTED_MODULE_4__Button_scss___default.a[margin + 'Margin'];\n // TODO: Sizes API\n var resultClassName = __WEBPACK_IMPORTED_MODULE_2_classnames___default()('btn', sizeClass, computeStyleClassName(), marginClassName, _defineProperty({}, __WEBPACK_IMPORTED_MODULE_4__Button_scss___default.a.expanded, expanded), _defineProperty({}, __WEBPACK_IMPORTED_MODULE_4__Button_scss___default.a.visuallyDisabled, visuallyDisabled), className);\n\n // Getting rid of focus outline after the click\n var domNode = void 0;\n var wrappedOnClick = function wrappedOnClick(event) {\n if (onClick) onClick(event);\n domNode.blur();\n };\n\n switch (true) {\n case asLink:\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1_react_router__[\"a\" /* Link */], _extends({}, otherProps, {\n className: resultClassName,\n onClick: function (_onClick) {\n function onClick(_x) {\n return _onClick.apply(this, arguments);\n }\n\n onClick.toString = function () {\n return _onClick.toString();\n };\n\n return onClick;\n }(function (event) {\n if (onClick) onClick(event);\n event.target.blur();\n })\n }));\n case asNativeLink:\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('a', _extends({}, otherProps, {\n className: resultClassName,\n target: targetBlank && '_blank',\n rel: targetBlank && 'noopener noreferrer',\n onClick: wrappedOnClick,\n ref: function (_ref2) {\n function ref(_x2) {\n return _ref2.apply(this, arguments);\n }\n\n ref.toString = function () {\n return _ref2.toString();\n };\n\n return ref;\n }(function (ref) {\n domNode = ref;\n if (setRef) setRef(ref);\n })\n }));\n default:\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('button', _extends({}, otherProps, {\n className: resultClassName,\n onClick: wrappedOnClick,\n ref: function (_ref3) {\n function ref(_x3) {\n return _ref3.apply(this, arguments);\n }\n\n ref.toString = function () {\n return _ref3.toString();\n };\n\n return ref;\n }(function (ref) {\n domNode = ref;\n if (setRef) setRef(ref);\n })\n }));\n }\n};\n\nButton.propTypes = {\n className: __webpack_require__(/*! prop-types */ 0).string,\n onClick: babelPluginFlowReactPropTypes_proptype_OnClick,\n setRef: __webpack_require__(/*! prop-types */ 0).func,\n primary: __webpack_require__(/*! prop-types */ 0).bool,\n success: __webpack_require__(/*! prop-types */ 0).bool,\n warning: __webpack_require__(/*! prop-types */ 0).bool,\n danger: __webpack_require__(/*! prop-types */ 0).bool,\n ghostPrimary: __webpack_require__(/*! prop-types */ 0).bool,\n ghostSuccess: __webpack_require__(/*! prop-types */ 0).bool,\n ghostWarning: __webpack_require__(/*! prop-types */ 0).bool,\n ghostDanger: __webpack_require__(/*! prop-types */ 0).bool,\n orange: __webpack_require__(/*! prop-types */ 0).bool,\n teal: __webpack_require__(/*! prop-types */ 0).bool,\n gray: __webpack_require__(/*! prop-types */ 0).bool,\n inverted: __webpack_require__(/*! prop-types */ 0).bool,\n faded: __webpack_require__(/*! prop-types */ 0).bool,\n expanded: __webpack_require__(/*! prop-types */ 0).bool,\n visuallyDisabled: __webpack_require__(/*! prop-types */ 0).bool,\n size: __webpack_require__(/*! prop-types */ 0).oneOf(['xl', 'lg', 'sm', 'xs']),\n margin: __webpack_require__(/*! prop-types */ 0).oneOf(['right', 'left']),\n asLink: __webpack_require__(/*! prop-types */ 0).bool,\n asNativeLink: __webpack_require__(/*! prop-types */ 0).bool,\n targetBlank: __webpack_require__(/*! prop-types */ 0).bool\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (Button);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/Button/Button.jsx\n// module id = 299\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/Button/Button.jsx?", + ); + + /***/ + }, + /* 300 */ + /* exports provided: default */ + /* exports used: default */ + /*!************************************************************!*\ + !*** ./app/libs/components/GoogleMaps/SearchBox/index.jsx ***! + \************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_fp__ = __webpack_require__(/*! lodash/fp */ 14);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_fp___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_lodash_fp__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils__ = __webpack_require__(/*! ../../../utils */ 20);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__utils_geo__ = __webpack_require__(/*! ../../../utils/geo */ 107);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__utils_dom__ = __webpack_require__(/*! ../../../utils/dom */ 44);\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\n\n\n\n\n\n\nvar babelPluginFlowReactPropTypes_proptype_GeoLocation = __webpack_require__(/*! ../../../../types */ 4).babelPluginFlowReactPropTypes_proptype_GeoLocation || __webpack_require__(/*! react */ 1).PropTypes.any;\n\nvar babelPluginFlowReactPropTypes_proptype_GoogleMapsPlace = __webpack_require__(/*! ../../../../types */ 4).babelPluginFlowReactPropTypes_proptype_GoogleMapsPlace || __webpack_require__(/*! react */ 1).PropTypes.any;\n\nvar SearchBox = function (_React$Component) {\n _inherits(SearchBox, _React$Component);\n\n function SearchBox() {\n var _ref;\n\n var _temp, _this, _ret;\n\n _classCallCheck(this, SearchBox);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = SearchBox.__proto__ || Object.getPrototypeOf(SearchBox)).call.apply(_ref, [this].concat(args))), _this), _this.setInputRef = function (ref) {\n _this.input = ref;\n }, _this.searchBoxDropdownIsVisible = function () {\n var googleDOMNodes = document.getElementsByClassName(\'pac-container\');\n return __WEBPACK_IMPORTED_MODULE_1_lodash_fp___default.a.some(function (node) {\n return node && node.offsetParent !== null;\n }, googleDOMNodes);\n }, _this.initGoogleMapsAutocomplete = function () {\n // TODO: Handle case when google maps lib not loaded\n if (!__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__utils__["c" /* isGoogleDefined */])()) return;\n\n var _this2 = _this,\n props = _this2.props,\n input = _this2.input;\n\n\n google.maps.event.addDomListener(input, \'keydown\', function (event) {\n if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__utils_dom__["a" /* isEnterKey */])(event) && _this.searchBoxDropdownIsVisible()) {\n event.preventDefault();\n }\n });\n\n _this.searchBox = new google.maps.places.SearchBox(input);\n\n google.maps.event.addListener(_this.searchBox, \'places_changed\', function () {\n // TODO: Add ga events tracker of first (and most likely next) place change\n var places = _this.searchBox.getPlaces();\n var place = places && places.length > 0 ? places[0] : null;\n\n if (!place || !place.geometry) return;\n\n props.onPlaceChange(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__utils_geo__["a" /* getGeoData */])(place));\n });\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n _createClass(SearchBox, [{\n key: \'componentDidMount\',\n value: function componentDidMount() {\n var props = this.props,\n input = this.input;\n\n this.initGoogleMapsAutocomplete();\n if (props.focusOnMount) input.focus();\n }\n }, {\n key: \'componentWillUnmount\',\n value: function componentWillUnmount() {\n google.maps.event.clearInstanceListeners(this.input);\n google.maps.event.clearInstanceListeners(this.searchBox);\n }\n }, {\n key: \'render\',\n value: function render() {\n // $FlowIssue: Flow, please, fix children\n return this.props.children(this.setInputRef);\n }\n }]);\n\n return SearchBox;\n}(__WEBPACK_IMPORTED_MODULE_0_react___default.a.Component);\n\nSearchBox.propTypes = {\n focusOnMount: __webpack_require__(/*! prop-types */ 0).bool,\n onPlaceChange: __webpack_require__(/*! prop-types */ 0).func.isRequired,\n children: __webpack_require__(/*! prop-types */ 0).func\n};\n/* harmony default export */ __webpack_exports__["a"] = (SearchBox);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/GoogleMaps/SearchBox/index.jsx\n// module id = 300\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/GoogleMaps/SearchBox/index.jsx?', + ); + + /***/ + }, + /* 301 */ + /* exports provided: default */ + /* exports used: default */ + /*!********************************************************!*\ + !*** ./app/libs/components/Navbar/NavItem/NavItem.jsx ***! + \********************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__NavItem_scss__ = __webpack_require__(/*! ./NavItem.scss */ 210);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__NavItem_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__NavItem_scss__);\n\n\n\n\nvar NavItem = function NavItem(_ref) {\n var children = _ref.children;\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_1__NavItem_scss___default.a.wrapper },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'span',\n { className: __WEBPACK_IMPORTED_MODULE_1__NavItem_scss___default.a.label },\n children\n )\n );\n};\n\nNavItem.propTypes = {\n children: __webpack_require__(/*! prop-types */ 0).any\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (NavItem);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/Navbar/NavItem/NavItem.jsx\n// module id = 301\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/Navbar/NavItem/NavItem.jsx?", + ); + + /***/ + }, + /* 302 */ + /* exports provided: default */ + /* exports used: default */ + /*!********************************************************!*\ + !*** ./app/libs/components/icons/IconCircleFullOk.jsx ***! + \********************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Svg__ = __webpack_require__(/*! ../Svg */ 138);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__assets_styles_resources_colors__ = __webpack_require__(/*! ../../../assets/styles/resources/colors */ 130);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__utils_createIcon__ = __webpack_require__(/*! ./utils/createIcon */ 190);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\n\n\n\n\n\n\n\nvar TITLE = 'Ok';\nvar VIEWBOX_WIDTH = 32;\nvar VIEWBOX_HEIGHT = 32;\n\nvar IconCircleFullOk = function IconCircleFullOk(_ref) {\n var color = _ref.color,\n otherProps = _objectWithoutProperties(_ref, ['color']);\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_1__Svg__[\"default\"],\n _extends({ title: TITLE, viewBoxWidth: VIEWBOX_WIDTH, viewBoxHeight: VIEWBOX_HEIGHT }, otherProps),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('circle', { fill: __WEBPACK_IMPORTED_MODULE_2__assets_styles_resources_colors__[\"default\"][color], cx: '16', cy: '16', r: '16' }),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('polygon', { fill: '#FFFFFF', points: '10.5 15 14 18.5 21.5 11 24 13.5 14 23.5 8 17.5' })\n );\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__utils_createIcon__[\"a\" /* default */])({\n Icon: IconCircleFullOk,\n viewBoxWidth: VIEWBOX_WIDTH,\n viewBoxHeight: VIEWBOX_HEIGHT\n}));\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/icons/IconCircleFullOk.jsx\n// module id = 302\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/icons/IconCircleFullOk.jsx?", + ); + + /***/ + }, + /* 303 */ + /* exports provided: default */ + /* exports used: default */ + /*!******************************************************!*\ + !*** ./app/libs/components/icons/IconCloseModal.jsx ***! + \******************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Svg__ = __webpack_require__(/*! ../Svg */ 138);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__assets_styles_resources_colors__ = __webpack_require__(/*! ../../../assets/styles/resources/colors */ 130);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__utils_createIcon__ = __webpack_require__(/*! ./utils/createIcon */ 190);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\n\n\n\n\n\n\n\nvar TITLE = 'Close';\nvar VIEWBOX_WIDTH = 14;\nvar VIEWBOX_HEIGHT = 14;\n\nvar IconCloseModal = function IconCloseModal(_ref) {\n var color = _ref.color,\n otherProps = _objectWithoutProperties(_ref, ['color']);\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_1__Svg__[\"default\"],\n _extends({\n title: TITLE,\n viewBoxWidth: VIEWBOX_WIDTH,\n viewBoxHeight: VIEWBOX_HEIGHT\n }, otherProps),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('polygon', {\n fill: __WEBPACK_IMPORTED_MODULE_2__assets_styles_resources_colors__[\"default\"][color],\n fillRule: 'evenodd',\n points: '7 6 1 0 0 1 6 7 0 13 1 14 7 8 13 14 14 13 8 7 14 1 13 0 7 6'\n })\n );\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__utils_createIcon__[\"a\" /* default */])({\n Icon: IconCloseModal,\n viewBoxWidth: VIEWBOX_WIDTH,\n viewBoxHeight: VIEWBOX_HEIGHT\n}));\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/icons/IconCloseModal.jsx\n// module id = 303\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/icons/IconCloseModal.jsx?", + ); + + /***/ + }, + /* 304 */ + /* exports provided: default */ + /* exports used: default */ + /*!***************************************************!*\ + !*** ./app/libs/components/icons/IconContact.jsx ***! + \***************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__templates_SvgIconTemplate__ = __webpack_require__(/*! ../../templates/SvgIconTemplate */ 15);\n\n/* eslint max-len: 0 */\n\n\n\n\n\nvar IconContact = function IconContact(props) {\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_2__templates_SvgIconTemplate__[\"a\" /* default */],\n props,\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'g',\n { fillRule: 'evenodd' },\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('path', { d: 'M9.5,9 C13.0087876,9 14,9.8585406 14,12 C14,11.6256719 14.1327717,11.3458593 14.2864613,11.1852787 C14.2924857,11.1789841 14.2233022,11.2258091 14.0854193,11.2922436 C13.5986349,11.5267852 12.7965238,11.7376696 11.7880363,11.8655968 L12.0397204,13.8496973 C14.5295414,13.5338624 16,12.7669312 16,12 C16,9 14.418278,7 9.5,7 C9.0061352,7 8.5335035,7.0317728 8.0845981,7.0933161 L9.2035105,9.0047105 C9.3011511,9.0015762 9.3999951,9 9.5,9 L9.5,9 Z' }),\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('path', { d: 'M8.0471872 3.2571897C8.1890827 2.2501084 8.5096705 2 9.5 2 10.6454305 2 11 2.3545695 11 4 11 5.9620932 10.258638 7 9.5 7 9.3380151 7 9.1958758 6.9608266 9.0581331 6.8793943L8.0403142 8.6010344C8.4798721 8.8608973 8.9725482 9 9.5 9 11.5 9 13 7 13 4 13 1 11.5 0 9.5 0 7.7469946 0 6.3781177.768257 6.0667486 2.9781503L8.0471872 3.2571897 8.0471872 3.2571897zM10.6175445 13.4776334C10.9711023 13.3597808 11.2108277 13.240998 11.3075864 13.1646095 11.168998 13.2740214 11 13.5470181 11 14 11 11.8585406 10.0087876 11 6.5 11 3.5958174 11 2 12.2300224 2 14 2 13.5470181 1.831002 13.2740214 1.6924136 13.1646095 1.7891723 13.240998 2.0288977 13.3597808 2.3824555 13.4776334 3.3545353 13.80166 4.799584 14 6.5 14 8.200416 14 9.6454647 13.80166 10.6175445 13.4776334L10.6175445 13.4776334zM0 14C0 11 2.581722 9 6.5 9 11.418278 9 13 11 13 14 13 15 10.5 16 6.5 16 2.5 16 0 15 0 14L0 14z' }),\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('path', { d: 'M8,6 C8,4.3545695 7.6454305,4 6.5,4 C5.3545695,4 5,4.3545695 5,6 C5,7.9620932 5.741362,9 6.5,9 C7.258638,9 8,7.9620932 8,6 L8,6 Z M3,6 C3,3 4.5,2 6.5,2 C8.5,2 10,3 10,6 C10,9 8.5,11 6.5,11 C4.5,11 3,9 3,6 L3,6 Z' })\n )\n );\n};\n\nIconContact.propTypes = {\n title: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string\n};\n\nIconContact.defaultProps = {\n title: 'Contact',\n viewBoxWidth: 16,\n viewBoxHeight: 16\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (IconContact);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/icons/IconContact.jsx\n// module id = 304\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/icons/IconContact.jsx?", + ); + + /***/ + }, + /* 305 */ + /* exports provided: default */ + /* exports used: default */ + /*!*************************************************!*\ + !*** ./app/libs/components/icons/IconHeart.jsx ***! + \*************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__templates_SvgIconTemplate__ = __webpack_require__(/*! ../../templates/SvgIconTemplate */ 15);\n\n// jscs:disable maximumLineLength\n/* eslint max-len: 0 */\n\n\n\n\n\nvar IconHeart = function IconHeart(props) {\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_2__templates_SvgIconTemplate__[\"a\" /* default */],\n props,\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('path', {\n d: 'M8.5,15 C8.5,15 15.7032768,9.5 16.7323164,6.5 C17.7613559,3.5 15.7032768,0 12.6161582,8.67361738e-19 C9.52903955,3.22337146e-16 8.5,2 8.5,2 C8.5,2 7.47096045,-1.17495346e-10 4.38384182,0 C1.29672318,1.17495346e-10 -0.761355912,3.5 0.267683634,6.5 C1.29672318,9.5 8.5,15 8.5,15 Z',\n fillRule: 'evenodd'\n })\n );\n};\n\nIconHeart.propTypes = {\n title: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string\n};\n\nIconHeart.defaultProps = {\n title: 'Save to Favorites',\n viewBoxWidth: 17,\n viewBoxHeight: 15\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (IconHeart);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/icons/IconHeart.jsx\n// module id = 305\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/icons/IconHeart.jsx?", + ); + + /***/ + }, + /* 306 */ + /* exports provided: default */ + /* exports used: default */ + /*!************************************************!*\ + !*** ./app/libs/components/icons/IconHome.jsx ***! + \************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__templates_SvgIconTemplate__ = __webpack_require__(/*! ../../templates/SvgIconTemplate */ 15);\n\n// jscs:disable maximumLineLength\n/* eslint max-len: 0 */\n\n\n\n\n\nvar IconHome = function IconHome(props) {\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_2__templates_SvgIconTemplate__[\"a\" /* default */],\n props,\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'g',\n { id: 'IconHome-1', stroke: 'none', strokeWidth: '1', fill: 'none', fillRule: 'evenodd' },\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('path', { d: 'M35.3186162,13.2574246 L38.8289149,16.1835475 L37.8279056,17.4327517 L35.323747,15.3463007 L35.323747,38 L3.5051695,38 L3.5051695,15.3463007 L1.00100927,17.4327517 L0,16.1835475 L19.4144582,0 L30.5458296,9.27891428 L30.5458296,4.24306193 L35.3186162,4.24306193 L35.3186162,13.2574246 L35.3186162,13.2574246 Z M33.7276874,11.9312545 L32.1367585,10.6050844 L32.1367585,5.85028272 L33.7276874,5.85028272 L33.7276874,11.9312545 L33.7276874,11.9312545 Z M5.09609837,14.0207481 L5.09609837,36.3927792 L21.0053871,36.3927792 L21.0053871,20.3205713 L30.5509603,20.3205713 L30.5509603,36.3927792 L33.7446642,36.3927792 L33.7333701,14.0212082 L19.4144582,2.09077374 L5.09609837,14.0207481 L5.09609837,14.0207481 Z M22.596316,36.3927792 L28.9600315,36.3927792 L28.9600315,21.9224907 L22.596316,21.9224907 L22.596316,36.3927792 L22.596316,36.3927792 Z M8.27282537,20.3152699 L17.8183986,20.3152699 L17.8183986,28.3513738 L8.27282537,28.3513738 L8.27282537,20.3152699 L8.27282537,20.3152699 Z M9.86375424,21.9224907 L16.2274697,21.9224907 L16.2274697,26.744153 L9.86375424,26.744153 L9.86375424,21.9224907 L9.86375424,21.9224907 Z' })\n )\n );\n};\n\nIconHome.propTypes = {\n title: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string\n};\n\nIconHome.defaultProps = {\n title: 'Home',\n viewBoxWidth: 39,\n viewBoxHeight: 38\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (IconHome);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/icons/IconHome.jsx\n// module id = 306\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/icons/IconHome.jsx?", + ); + + /***/ + }, + /* 307 */ + /* exports provided: default */ + /* exports used: default */ + /*!***************************************************!*\ + !*** ./app/libs/components/icons/IconNoPhoto.jsx ***! + \***************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__templates_SvgIconTemplate__ = __webpack_require__(/*! ../../templates/SvgIconTemplate */ 15);\n\n// jscs:disable maximumLineLength\n/* eslint max-len: 0 */\n\n\n\n\n\nvar IconNoPhoto = function IconNoPhoto(props) {\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_2__templates_SvgIconTemplate__[\"a\" /* default */],\n props,\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'g',\n { id: 'IconNoPhoto', stroke: 'none', strokeWidth: '1', fill: 'none', fillRule: 'evenodd' },\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('path', { d: 'M36.9970301,6 C36.4463856,6 35.6774139,5.67741394 35.2881596,5.28815961 L30.7118404,0.711840391 C30.3187018,0.318701799 29.544239,0 28.9975267,0 L19.0024733,0 C18.4488226,0 17.6774139,0.32258606 17.2881596,0.711840391 L12.7118404,5.28815961 C12.3187018,5.6812982 11.5469637,6 11.0029699,6 L4,6 C1.71934721,5.68423541 0,7.38108985 0,9 L0,32 C0,34.3032401 1.71934721,36 4,36 L44,36 C46.2806528,36 48,34.3032401 48,32 L48,9 C48,7.38099528 46.2806528,5.68414085 44,6 L36.9970301,6 Z M44,34 L4,34 C2.85851423,34 2,33.154488 2,32 L2,10 C2,8.49080799 2.85841875,7.64698698 4,8 L12.0024554,8 C12.553384,8 13.3166774,7.67741394 13.6992401,7.28815961 C13.6992401,7.28815961 18.8841068,2 19,2 L29,2 C29.3677189,2 34.3281392,7.28815961 34.3281392,7.28815961 C34.6991977,7.6812982 35.4463114,8 35.9975446,8 L44,8 C45.140531,7.64708093 46,8.49080799 46,10 L46,32 C46,33.154394 45.1406265,34 44,34 Z' }),\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('path', { d: 'M24.5,7 C17.5964849,7 12,12.5945653 12,19.4981764 C12,26.4017875 17.5964849,32 24.5,32 C31.4035151,32 37,26.4016915 37,19.4981764 C37,12.5946613 31.4036111,7 24.5,7 L24.5,7 Z M24.5,30 C18.7102839,30 14,25.2888585 14,19.4981897 C14,13.7093311 18.7102839,9 24.5,9 C30.2897161,9 35,13.7093311 35,19.4981897 C35.0000953,25.2888585 30.2897161,30 24.5,30 L24.5,30 Z' }),\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('path', { d: 'M24.5,11 C19.8045195,11 16,14.803671 16,19.4982088 C16,24.1927466 19.8045195,28 24.5,28 C29.1954805,28 33,24.1927466 33,19.4982088 C33,14.803671 29.1954805,11 24.5,11 L24.5,11 Z M24.5,26 C20.9162317,26 18,23.0820072 18,19.4982389 C18,15.9144707 20.9162317,13 24.5,13 C28.0837683,13 31,15.9144707 31,19.4982389 C31,23.0820072 28.0837683,26 24.5,26 L24.5,26 Z' })\n )\n );\n};\n\nIconNoPhoto.propTypes = {\n title: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string\n};\n\nIconNoPhoto.defaultProps = {\n title: 'No Photo Yet',\n viewBoxWidth: 48,\n viewBoxHeight: 36\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (IconNoPhoto);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/icons/IconNoPhoto.jsx\n// module id = 307\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/icons/IconNoPhoto.jsx?", + ); + + /***/ + }, + /* 308 */ + /* exports provided: memberSince, formatDate */ + /* exports used: memberSince */ + /*!*********************************!*\ + !*** ./app/libs/momentUtils.js ***! + \*********************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_moment__ = __webpack_require__(/*! moment */ 3);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_moment___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_moment__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return memberSince; });\n/* unused harmony export formatDate */\n // eslint-disable-line import/no-extraneous-dependencies\n\nvar memberSince = function memberSince(date) {\n return 'Member since ' + __WEBPACK_IMPORTED_MODULE_0_moment___default()(date).format('MMMM YYYY');\n};\nvar formatDate = function formatDate(date) {\n return __WEBPACK_IMPORTED_MODULE_0_moment___default()(date).format('MM/DD/YY');\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/momentUtils.js\n// module id = 308\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/momentUtils.js?", + ); + + /***/ + }, + /* 309 */ + /* exports provided: favoriteUnfavoriteAction */ + /* exports used: favoriteUnfavoriteAction */ + /*!**************************************************!*\ + !*** ./app/libs/utils/api/favoriteUnfavorite.js ***! + \**************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__apiCall__ = __webpack_require__(/*! ./apiCall */ 62);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__index__ = __webpack_require__(/*! ./index */ 106);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return favoriteUnfavoriteAction; });\n\n\n\nvar favoriteUnfavoriteAction = function favoriteUnfavoriteAction(listingId, favorited) {\n var apiPath = \'/listings/\' + listingId + \'/favorites\';\n var apiFavoriteUrl = __WEBPACK_IMPORTED_MODULE_1__index__["b" /* buildUrl */](apiPath);\n\n return favorited ? __WEBPACK_IMPORTED_MODULE_0__apiCall__["a" /* default */].post(apiFavoriteUrl) : __WEBPACK_IMPORTED_MODULE_0__apiCall__["a" /* default */].delete(apiFavoriteUrl);\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/utils/api/favoriteUnfavorite.js\n// module id = 309\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/utils/api/favoriteUnfavorite.js?', + ); + + /***/ + }, + /* 310 */ + /* exports provided: get, isDev, isTest, isProduction, isStaging, isProductionLike, isServerRendering */ + /* exports used: isProductionLike, isServerRendering, get */ + /*!*************************************!*\ + !*** ./app/libs/utils/env/index.js ***! + \*************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__enums_Environment__ = __webpack_require__(/*! ../../../enums/Environment */ 183);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return get; });\n/* unused harmony export isDev */\n/* unused harmony export isTest */\n/* unused harmony export isProduction */\n/* unused harmony export isStaging */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return isProductionLike; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return isServerRendering; });\n\n\nvar _process$env = __webpack_require__.i({"NODE_ENV":"dev","RAILS_ENV":undefined,"SERVER_RENDERING":true,"HONEYBADGER_API_KEY":undefined}),\n NODE_ENV = _process$env.NODE_ENV,\n RAILS_ENV = _process$env.RAILS_ENV,\n SERVER_RENDERING = _process$env.SERVER_RENDERING;\n\n\nvar get = function get(ENV_VAR) {\n return __webpack_require__.i({"NODE_ENV":"dev","RAILS_ENV":undefined,"SERVER_RENDERING":true,"HONEYBADGER_API_KEY":undefined})[ENV_VAR];\n};\n\nvar isDev = NODE_ENV === __WEBPACK_IMPORTED_MODULE_0__enums_Environment__["a" /* default */].DEV;\nvar isTest = NODE_ENV === __WEBPACK_IMPORTED_MODULE_0__enums_Environment__["a" /* default */].TEST;\nvar isProduction = !!RAILS_ENV && RAILS_ENV === __WEBPACK_IMPORTED_MODULE_0__enums_Environment__["a" /* default */].PRODUCTION;\nvar isStaging = !!RAILS_ENV && RAILS_ENV === __WEBPACK_IMPORTED_MODULE_0__enums_Environment__["a" /* default */].STAGING;\nvar isProductionLike = !isDev && !isTest;\nvar isServerRendering = SERVER_RENDERING;\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/utils/env/index.js\n// module id = 310\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/utils/env/index.js?', + ); + + /***/ + }, + /* 311 */ + /* exports provided: default */ + /* exports used: default */ + /*!****************************************************!*\ + !*** ./app/libs/utils/errorTracker/Honeybadger.js ***! + \****************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__env__ = __webpack_require__(/*! ../env */ 310);\n\n\nvar shouldUseHoneybadger = __WEBPACK_IMPORTED_MODULE_0__env__["a" /* isProductionLike */] && !__WEBPACK_IMPORTED_MODULE_0__env__["b" /* isServerRendering */];\nvar Honeybadger = shouldUseHoneybadger ? __webpack_require__(/*! honeybadger-js */ 1151) : undefined;\n\nif (Honeybadger) {\n Honeybadger.configure({\n api_key: __WEBPACK_IMPORTED_MODULE_0__env__["c" /* get */](\'HONEYBADGER_API_KEY\')\n });\n}\n\n/* harmony default export */ __webpack_exports__["a"] = (Honeybadger);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/utils/errorTracker/Honeybadger.js\n// module id = 311\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/utils/errorTracker/Honeybadger.js?', + ); + + /***/ + }, + /* 312 */ + /* exports provided: notify */ + /* exports used: notify */ + /*!**********************************************!*\ + !*** ./app/libs/utils/errorTracker/index.js ***! + \**********************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Honeybadger__ = __webpack_require__(/*! ./Honeybadger */ 311);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return notify; });\n\n\nvar notify = function notify() {\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n if (__WEBPACK_IMPORTED_MODULE_0__Honeybadger__["a" /* default */]) {\n // TODO: Add GA notifier here\n __WEBPACK_IMPORTED_MODULE_0__Honeybadger__["a" /* default */].notify.apply(__WEBPACK_IMPORTED_MODULE_0__Honeybadger__["a" /* default */], args);\n } else {\n var _console;\n\n // eslint-disable-next-line no-console\n (_console = console).error.apply(_console, [\'[Error Notifier]: In `production` environment tracker will be notified w/ this payload:\\n\'].concat(args));\n }\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/utils/errorTracker/index.js\n// module id = 312\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/utils/errorTracker/index.js?', + ); + + /***/ + }, + /* 313 */ + /* unknown exports provided */ + /* all exports used */ + /*!****************************************!*\ + !*** ./~/babel-runtime/core-js/map.js ***! + \****************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + 'module.exports = { "default": __webpack_require__(/*! core-js/library/fn/map */ 909), __esModule: true };\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/babel-runtime/core-js/map.js\n// module id = 313\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/babel-runtime/core-js/map.js?', + ); + + /***/ + }, + /* 314 */ + /* unknown exports provided */ + /* exports used: default */ + /*!***************************************************!*\ + !*** ./~/babel-runtime/core-js/object/entries.js ***! + \***************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + 'module.exports = { "default": __webpack_require__(/*! core-js/library/fn/object/entries */ 913), __esModule: true };\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/babel-runtime/core-js/object/entries.js\n// module id = 314\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/babel-runtime/core-js/object/entries.js?', + ); + + /***/ + }, + /* 315 */ + /* unknown exports provided */ + /* all exports used */ + /*!******************************************************!*\ + !*** ./~/babel-runtime/helpers/toConsumableArray.js ***! + \******************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nexports.__esModule = true;\n\nvar _from = __webpack_require__(/*! ../core-js/array/from */ 145);\n\nvar _from2 = _interopRequireDefault(_from);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = function (arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n } else {\n return (0, _from2.default)(arr);\n }\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/babel-runtime/helpers/toConsumableArray.js\n// module id = 315\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/babel-runtime/helpers/toConsumableArray.js?', + ); + + /***/ + }, + /* 316 */ + /* unknown exports provided */ + /* all exports used */ + /*!**************************************!*\ + !*** ./~/component-indexof/index.js ***! + \**************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = function(arr, obj){\n if (arr.indexOf) return arr.indexOf(obj);\n for (var i = 0; i < arr.length; ++i) {\n if (arr[i] === obj) return i;\n }\n return -1;\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/component-indexof/index.js\n// module id = 316\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/component-indexof/index.js?', + ); + + /***/ + }, + /* 317 */ + /* unknown exports provided */ + /* all exports used */ + /*!***************************************************!*\ + !*** ./~/core-js/library/modules/_an-instance.js ***! + \***************************************************/ + /***/ function (module, exports) { + eval( + "module.exports = function(it, Constructor, name, forbiddenField){\n if(!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)){\n throw TypeError(name + ': incorrect invocation!');\n } return it;\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_an-instance.js\n// module id = 317\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/_an-instance.js?", + ); + + /***/ + }, + /* 318 */ + /* unknown exports provided */ + /* all exports used */ + /*!***********************************************!*\ + !*** ./~/core-js/library/modules/_classof.js ***! + \***********************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "// getting tag from 19.1.3.6 Object.prototype.toString()\nvar cof = __webpack_require__(/*! ./_cof */ 195)\n , TAG = __webpack_require__(/*! ./_wks */ 39)('toStringTag')\n // ES3 wrong here\n , ARG = cof(function(){ return arguments; }()) == 'Arguments';\n\n// fallback for IE11 Script Access Denied error\nvar tryGet = function(it, key){\n try {\n return it[key];\n } catch(e){ /* empty */ }\n};\n\nmodule.exports = function(it){\n var O, T, B;\n return it === undefined ? 'Undefined' : it === null ? 'Null'\n // @@toStringTag case\n : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T\n // builtinTag case\n : ARG ? cof(O)\n // ES3 arguments fallback\n : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_classof.js\n// module id = 318\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/_classof.js?", + ); + + /***/ + }, + /* 319 */ + /* unknown exports provided */ + /* all exports used */ + /*!**************************************************!*\ + !*** ./~/core-js/library/modules/_dom-create.js ***! + \**************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "var isObject = __webpack_require__(/*! ./_is-object */ 75)\n , document = __webpack_require__(/*! ./_global */ 53).document\n // in old IE typeof document.createElement is 'object'\n , is = isObject(document) && isObject(document.createElement);\nmodule.exports = function(it){\n return is ? document.createElement(it) : {};\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_dom-create.js\n// module id = 319\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/_dom-create.js?", + ); + + /***/ + }, + /* 320 */ + /* unknown exports provided */ + /* all exports used */ + /*!******************************************************!*\ + !*** ./~/core-js/library/modules/_ie8-dom-define.js ***! + \******************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "module.exports = !__webpack_require__(/*! ./_descriptors */ 52) && !__webpack_require__(/*! ./_fails */ 73)(function(){\n return Object.defineProperty(__webpack_require__(/*! ./_dom-create */ 319)('div'), 'a', {get: function(){ return 7; }}).a != 7;\n});\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_ie8-dom-define.js\n// module id = 320\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/_ie8-dom-define.js?", + ); + + /***/ + }, + /* 321 */ + /* unknown exports provided */ + /* all exports used */ + /*!*****************************************************!*\ + !*** ./~/core-js/library/modules/_is-array-iter.js ***! + \*****************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "// check on default Array iterator\nvar Iterators = __webpack_require__(/*! ./_iterators */ 110)\n , ITERATOR = __webpack_require__(/*! ./_wks */ 39)('iterator')\n , ArrayProto = Array.prototype;\n\nmodule.exports = function(it){\n return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it);\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_is-array-iter.js\n// module id = 321\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/_is-array-iter.js?", + ); + + /***/ + }, + /* 322 */ + /* unknown exports provided */ + /* all exports used */ + /*!************************************************!*\ + !*** ./~/core-js/library/modules/_is-array.js ***! + \************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "// 7.2.2 IsArray(argument)\nvar cof = __webpack_require__(/*! ./_cof */ 195);\nmodule.exports = Array.isArray || function isArray(arg){\n return cof(arg) == 'Array';\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_is-array.js\n// module id = 322\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/_is-array.js?", + ); + + /***/ + }, + /* 323 */ + /* unknown exports provided */ + /* all exports used */ + /*!*************************************************!*\ + !*** ./~/core-js/library/modules/_iter-call.js ***! + \*************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "// call something on iterator step with safe closing on error\nvar anObject = __webpack_require__(/*! ./_an-object */ 72);\nmodule.exports = function(iterator, fn, value, entries){\n try {\n return entries ? fn(anObject(value)[0], value[1]) : fn(value);\n // 7.4.6 IteratorClose(iterator, completion)\n } catch(e){\n var ret = iterator['return'];\n if(ret !== undefined)anObject(ret.call(iterator));\n throw e;\n }\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_iter-call.js\n// module id = 323\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/_iter-call.js?", + ); + + /***/ + }, + /* 324 */ + /* unknown exports provided */ + /* all exports used */ + /*!*************************************************!*\ + !*** ./~/core-js/library/modules/_iter-step.js ***! + \*************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = function(done, value){\n return {value: value, done: !!done};\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_iter-step.js\n// module id = 324\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/_iter-step.js?', + ); + + /***/ + }, + /* 325 */ + /* unknown exports provided */ + /* all exports used */ + /*!***************************************************!*\ + !*** ./~/core-js/library/modules/_object-gopd.js ***! + \***************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + 'var pIE = __webpack_require__(/*! ./_object-pie */ 111)\n , createDesc = __webpack_require__(/*! ./_property-desc */ 112)\n , toIObject = __webpack_require__(/*! ./_to-iobject */ 64)\n , toPrimitive = __webpack_require__(/*! ./_to-primitive */ 206)\n , has = __webpack_require__(/*! ./_has */ 74)\n , IE8_DOM_DEFINE = __webpack_require__(/*! ./_ie8-dom-define */ 320)\n , gOPD = Object.getOwnPropertyDescriptor;\n\nexports.f = __webpack_require__(/*! ./_descriptors */ 52) ? gOPD : function getOwnPropertyDescriptor(O, P){\n O = toIObject(O);\n P = toPrimitive(P, true);\n if(IE8_DOM_DEFINE)try {\n return gOPD(O, P);\n } catch(e){ /* empty */ }\n if(has(O, P))return createDesc(!pIE.f.call(O, P), O[P]);\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_object-gopd.js\n// module id = 325\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/_object-gopd.js?', + ); + + /***/ + }, + /* 326 */ + /* unknown exports provided */ + /* all exports used */ + /*!***************************************************!*\ + !*** ./~/core-js/library/modules/_object-gopn.js ***! + \***************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)\nvar $keys = __webpack_require__(/*! ./_object-keys-internal */ 327)\n , hiddenKeys = __webpack_require__(/*! ./_enum-bug-keys */ 196).concat('length', 'prototype');\n\nexports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O){\n return $keys(O, hiddenKeys);\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_object-gopn.js\n// module id = 326\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/_object-gopn.js?", + ); + + /***/ + }, + /* 327 */ + /* unknown exports provided */ + /* all exports used */ + /*!************************************************************!*\ + !*** ./~/core-js/library/modules/_object-keys-internal.js ***! + \************************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "var has = __webpack_require__(/*! ./_has */ 74)\n , toIObject = __webpack_require__(/*! ./_to-iobject */ 64)\n , arrayIndexOf = __webpack_require__(/*! ./_array-includes */ 922)(false)\n , IE_PROTO = __webpack_require__(/*! ./_shared-key */ 203)('IE_PROTO');\n\nmodule.exports = function(object, names){\n var O = toIObject(object)\n , i = 0\n , result = []\n , key;\n for(key in O)if(key != IE_PROTO)has(O, key) && result.push(key);\n // Don't enum bug & hidden keys\n while(names.length > i)if(has(O, key = names[i++])){\n ~arrayIndexOf(result, key) || result.push(key);\n }\n return result;\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_object-keys-internal.js\n// module id = 327\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/_object-keys-internal.js?", + ); + + /***/ + }, + /* 328 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************************************!*\ + !*** ./~/core-js/library/modules/_object-to-array.js ***! + \*******************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + 'var getKeys = __webpack_require__(/*! ./_object-keys */ 76)\n , toIObject = __webpack_require__(/*! ./_to-iobject */ 64)\n , isEnum = __webpack_require__(/*! ./_object-pie */ 111).f;\nmodule.exports = function(isEntries){\n return function(it){\n var O = toIObject(it)\n , keys = getKeys(O)\n , length = keys.length\n , i = 0\n , result = []\n , key;\n while(length > i)if(isEnum.call(O, key = keys[i++])){\n result.push(isEntries ? [key, O[key]] : O[key]);\n } return result;\n };\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_object-to-array.js\n// module id = 328\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/_object-to-array.js?', + ); + + /***/ + }, + /* 329 */ + /* unknown exports provided */ + /* all exports used */ + /*!****************************************************!*\ + !*** ./~/core-js/library/modules/_redefine-all.js ***! + \****************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + 'var hide = __webpack_require__(/*! ./_hide */ 63);\nmodule.exports = function(target, src, safe){\n for(var key in src){\n if(safe && target[key])target[key] = src[key];\n else hide(target, key, src[key]);\n } return target;\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_redefine-all.js\n// module id = 329\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/_redefine-all.js?', + ); + + /***/ + }, + /* 330 */ + /* unknown exports provided */ + /* all exports used */ + /*!************************************************!*\ + !*** ./~/core-js/library/modules/_redefine.js ***! + \************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + 'module.exports = __webpack_require__(/*! ./_hide */ 63);\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_redefine.js\n// module id = 330\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/_redefine.js?', + ); + + /***/ + }, + /* 331 */ + /* unknown exports provided */ + /* all exports used */ + /*!***************************************************************!*\ + !*** ./~/core-js/library/modules/core.get-iterator-method.js ***! + \***************************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "var classof = __webpack_require__(/*! ./_classof */ 318)\n , ITERATOR = __webpack_require__(/*! ./_wks */ 39)('iterator')\n , Iterators = __webpack_require__(/*! ./_iterators */ 110);\nmodule.exports = __webpack_require__(/*! ./_core */ 30).getIteratorMethod = function(it){\n if(it != undefined)return it[ITERATOR]\n || it['@@iterator']\n || Iterators[classof(it)];\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/core.get-iterator-method.js\n// module id = 331\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/core.get-iterator-method.js?", + ); + + /***/ + }, + /* 332 */ + /* unknown exports provided */ + /* all exports used */ + /*!***********************************************************!*\ + !*** ./~/core-js/library/modules/es6.object.to-string.js ***! + \***********************************************************/ + /***/ function (module, exports) { + eval( + '\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/es6.object.to-string.js\n// module id = 332\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/es6.object.to-string.js?', + ); + + /***/ + }, + /* 333 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************************************!*\ + !*** ./~/core-js/library/modules/web.dom.iterable.js ***! + \*******************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "__webpack_require__(/*! ./es6.array.iterator */ 945);\nvar global = __webpack_require__(/*! ./_global */ 53)\n , hide = __webpack_require__(/*! ./_hide */ 63)\n , Iterators = __webpack_require__(/*! ./_iterators */ 110)\n , TO_STRING_TAG = __webpack_require__(/*! ./_wks */ 39)('toStringTag');\n\nfor(var collections = ['NodeList', 'DOMTokenList', 'MediaList', 'StyleSheetList', 'CSSRuleList'], i = 0; i < 5; i++){\n var NAME = collections[i]\n , Collection = global[NAME]\n , proto = Collection && Collection.prototype;\n if(proto && !proto[TO_STRING_TAG])hide(proto, TO_STRING_TAG, NAME);\n Iterators[NAME] = Iterators.Array;\n}\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/web.dom.iterable.js\n// module id = 333\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/web.dom.iterable.js?", + ); + + /***/ + }, + /* 334 */ + /* unknown exports provided */ + /*!*************************************************************!*\ + !*** ./app/assets/styles/vendor/photoswipe/photoswipe.scss ***! + \*************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"clockwise": "photoswipe__clockwise__15BM1",\n\t"donut-rotate": "photoswipe__donut-rotate__2Wrro"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/assets/styles/vendor/photoswipe/photoswipe.scss\n// module id = 334\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/assets/styles/vendor/photoswipe/photoswipe.scss?', + ); + + /***/ + }, + /* 335 */ + /* unknown exports provided */ + /* exports used: default */ + /*!**************************************************************!*\ + !*** ./app/bundles/listings-show/ui/common/Table/index.scss ***! + \**************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"td": "index__td__1JX_s",\n\t"tr": "index__tr__2yLfw"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-show/ui/common/Table/index.scss\n// module id = 335\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-show/ui/common/Table/index.scss?', + ); + + /***/ + }, + /* 336 */ + /* unknown exports provided */ + /* exports used: default */ + /*!*************************************************!*\ + !*** ./app/bundles/listings-show/ui/index.scss ***! + \*************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"container": "index__container__31I_0",\n\t"loading": "index__loading__uRZLr"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-show/ui/index.scss\n// module id = 336\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-show/ui/index.scss?', + ); + + /***/ + }, + /* 337 */ + /* unknown exports provided */ + /* exports used: default */ + /*!****************************************************!*\ + !*** ./app/libs/components/forms/Label/index.scss ***! + \****************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"label": "index__label__2pEjI",\n\t"top": "index__top__1voSn",\n\t"bottom": "index__bottom__2vjXi",\n\t"right": "index__right__1p9ZQ",\n\t"left": "index__left__3xf6t",\n\t"note": "index__note__1nKRE",\n\t"indent": "index__indent__rFZ0r",\n\t"expandedIndent": "index__expandedIndent__1wkub"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/forms/Label/index.scss\n// module id = 337\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/forms/Label/index.scss?', + ); + + /***/ + }, + /* 338 */ + /* unknown exports provided */ + /* all exports used */ + /*!********************************************!*\ + !*** ./~/dom-align/lib/getOffsetParent.js ***! + \********************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\n\nvar _utils = __webpack_require__(/*! ./utils */ 115);\n\nvar _utils2 = _interopRequireDefault(_utils);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }\n\n/**\n * 得到会导致元素显示不全的祖先元素\n */\n\nfunction getOffsetParent(element) {\n // ie 这个也不是完全可行\n /*\n <div style="width: 50px;height: 100px;overflow: hidden">\n <div style="width: 50px;height: 100px;position: relative;" id="d6">\n 元素 6 高 100px 宽 50px<br/>\n </div>\n </div>\n */\n // element.offsetParent does the right thing in ie7 and below. Return parent with layout!\n // In other browsers it only includes elements with position absolute, relative or\n // fixed, not elements with overflow set to auto or scroll.\n // if (UA.ie && ieMode < 8) {\n // return element.offsetParent;\n // }\n // 统一的 offsetParent 方法\n var doc = element.ownerDocument;\n var body = doc.body;\n var parent = void 0;\n var positionStyle = _utils2["default"].css(element, \'position\');\n var skipStatic = positionStyle === \'fixed\' || positionStyle === \'absolute\';\n\n if (!skipStatic) {\n return element.nodeName.toLowerCase() === \'html\' ? null : element.parentNode;\n }\n\n for (parent = element.parentNode; parent && parent !== body; parent = parent.parentNode) {\n positionStyle = _utils2["default"].css(parent, \'position\');\n if (positionStyle !== \'static\') {\n return parent;\n }\n }\n return null;\n}\n\nexports["default"] = getOffsetParent;\nmodule.exports = exports[\'default\'];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/dom-align/lib/getOffsetParent.js\n// module id = 338\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/dom-align/lib/getOffsetParent.js?', + ); + + /***/ + }, + /* 339 */ + /* unknown exports provided */ + /* all exports used */ + /*!****************************************!*\ + !*** ./~/dom-helpers/activeElement.js ***! + \****************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = activeElement;\n\nvar _ownerDocument = __webpack_require__(/*! ./ownerDocument */ 94);\n\nvar _ownerDocument2 = _interopRequireDefault(_ownerDocument);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction activeElement() {\n var doc = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : (0, _ownerDocument2.default)();\n\n try {\n return doc.activeElement;\n } catch (e) {/* ie throws if no active element */}\n}\nmodule.exports = exports[\'default\'];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/dom-helpers/activeElement.js\n// module id = 339\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/dom-helpers/activeElement.js?', + ); + + /***/ + }, + /* 340 */ + /* unknown exports provided */ + /* all exports used */ + /*!*****************************************!*\ + !*** ./~/dom-helpers/class/hasClass.js ***! + \*****************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = hasClass;\nfunction hasClass(element, className) {\n if (element.classList) return !!className && element.classList.contains(className);else return (" " + element.className + " ").indexOf(" " + className + " ") !== -1;\n}\nmodule.exports = exports["default"];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/dom-helpers/class/hasClass.js\n// module id = 340\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/dom-helpers/class/hasClass.js?', + ); + + /***/ + }, + /* 341 */ + /* unknown exports provided */ + /* all exports used */ + /*!***************************************!*\ + !*** ./~/dom-helpers/query/offset.js ***! + \***************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = offset;\n\nvar _contains = __webpack_require__(/*! ./contains */ 95);\n\nvar _contains2 = _interopRequireDefault(_contains);\n\nvar _isWindow = __webpack_require__(/*! ./isWindow */ 157);\n\nvar _isWindow2 = _interopRequireDefault(_isWindow);\n\nvar _ownerDocument = __webpack_require__(/*! ../ownerDocument */ 94);\n\nvar _ownerDocument2 = _interopRequireDefault(_ownerDocument);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction offset(node) {\n var doc = (0, _ownerDocument2.default)(node),\n win = (0, _isWindow2.default)(doc),\n docElem = doc && doc.documentElement,\n box = { top: 0, left: 0, height: 0, width: 0 };\n\n if (!doc) return;\n\n // Make sure it's not a disconnected DOM node\n if (!(0, _contains2.default)(docElem, node)) return box;\n\n if (node.getBoundingClientRect !== undefined) box = node.getBoundingClientRect();\n\n // IE8 getBoundingClientRect doesn't support width & height\n box = {\n top: box.top + (win.pageYOffset || docElem.scrollTop) - (docElem.clientTop || 0),\n left: box.left + (win.pageXOffset || docElem.scrollLeft) - (docElem.clientLeft || 0),\n width: (box.width == null ? node.offsetWidth : box.width) || 0,\n height: (box.height == null ? node.offsetHeight : box.height) || 0\n };\n\n return box;\n}\nmodule.exports = exports['default'];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/dom-helpers/query/offset.js\n// module id = 341\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/dom-helpers/query/offset.js?", + ); + + /***/ + }, + /* 342 */ + /* unknown exports provided */ + /* all exports used */ + /*!******************************************!*\ + !*** ./~/dom-helpers/query/scrollTop.js ***! + \******************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = scrollTop;\n\nvar _isWindow = __webpack_require__(/*! ./isWindow */ 157);\n\nvar _isWindow2 = _interopRequireDefault(_isWindow);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction scrollTop(node, val) {\n var win = (0, _isWindow2.default)(node);\n\n if (val === undefined) return win ? 'pageYOffset' in win ? win.pageYOffset : win.document.documentElement.scrollTop : node.scrollTop;\n\n if (win) win.scrollTo('pageXOffset' in win ? win.pageXOffset : win.document.documentElement.scrollLeft, val);else node.scrollTop = val;\n}\nmodule.exports = exports['default'];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/dom-helpers/query/scrollTop.js\n// module id = 342\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/dom-helpers/query/scrollTop.js?", + ); + + /***/ + }, + /* 343 */ + /* unknown exports provided */ + /* all exports used */ + /*!************************************************!*\ + !*** ./~/dom-helpers/transition/properties.js ***! + \************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.animationEnd = exports.animationDelay = exports.animationTiming = exports.animationDuration = exports.animationName = exports.transitionEnd = exports.transitionDuration = exports.transitionDelay = exports.transitionTiming = exports.transitionProperty = exports.transform = undefined;\n\nvar _inDOM = __webpack_require__(/*! ../util/inDOM */ 65);\n\nvar _inDOM2 = _interopRequireDefault(_inDOM);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar transform = 'transform';\nvar prefix = void 0,\n transitionEnd = void 0,\n animationEnd = void 0;\nvar transitionProperty = void 0,\n transitionDuration = void 0,\n transitionTiming = void 0,\n transitionDelay = void 0;\nvar animationName = void 0,\n animationDuration = void 0,\n animationTiming = void 0,\n animationDelay = void 0;\n\nif (_inDOM2.default) {\n var _getTransitionPropert = getTransitionProperties();\n\n prefix = _getTransitionPropert.prefix;\n exports.transitionEnd = transitionEnd = _getTransitionPropert.transitionEnd;\n exports.animationEnd = animationEnd = _getTransitionPropert.animationEnd;\n\n\n exports.transform = transform = prefix + '-' + transform;\n exports.transitionProperty = transitionProperty = prefix + '-transition-property';\n exports.transitionDuration = transitionDuration = prefix + '-transition-duration';\n exports.transitionDelay = transitionDelay = prefix + '-transition-delay';\n exports.transitionTiming = transitionTiming = prefix + '-transition-timing-function';\n\n exports.animationName = animationName = prefix + '-animation-name';\n exports.animationDuration = animationDuration = prefix + '-animation-duration';\n exports.animationTiming = animationTiming = prefix + '-animation-delay';\n exports.animationDelay = animationDelay = prefix + '-animation-timing-function';\n}\n\nexports.transform = transform;\nexports.transitionProperty = transitionProperty;\nexports.transitionTiming = transitionTiming;\nexports.transitionDelay = transitionDelay;\nexports.transitionDuration = transitionDuration;\nexports.transitionEnd = transitionEnd;\nexports.animationName = animationName;\nexports.animationDuration = animationDuration;\nexports.animationTiming = animationTiming;\nexports.animationDelay = animationDelay;\nexports.animationEnd = animationEnd;\nexports.default = {\n transform: transform,\n end: transitionEnd,\n property: transitionProperty,\n timing: transitionTiming,\n delay: transitionDelay,\n duration: transitionDuration\n};\n\n\nfunction getTransitionProperties() {\n var style = document.createElement('div').style;\n\n var vendorMap = {\n O: function O(e) {\n return 'o' + e.toLowerCase();\n },\n Moz: function Moz(e) {\n return e.toLowerCase();\n },\n Webkit: function Webkit(e) {\n return 'webkit' + e;\n },\n ms: function ms(e) {\n return 'MS' + e;\n }\n };\n\n var vendors = Object.keys(vendorMap);\n\n var transitionEnd = void 0,\n animationEnd = void 0;\n var prefix = '';\n\n for (var i = 0; i < vendors.length; i++) {\n var vendor = vendors[i];\n\n if (vendor + 'TransitionProperty' in style) {\n prefix = '-' + vendor.toLowerCase();\n transitionEnd = vendorMap[vendor]('TransitionEnd');\n animationEnd = vendorMap[vendor]('AnimationEnd');\n break;\n }\n }\n\n if (!transitionEnd && 'transitionProperty' in style) transitionEnd = 'transitionend';\n\n if (!animationEnd && 'animationName' in style) animationEnd = 'animationend';\n\n style = null;\n\n return { animationEnd: animationEnd, transitionEnd: transitionEnd, prefix: prefix };\n}\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/dom-helpers/transition/properties.js\n// module id = 343\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/dom-helpers/transition/properties.js?", + ); + + /***/ + }, + /* 344 */ + /* unknown exports provided */ + /* all exports used */ + /*!*********************************************!*\ + !*** ./~/dom-helpers/util/camelizeStyle.js ***! + \*********************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = camelizeStyleName;\n\nvar _camelize = __webpack_require__(/*! ./camelize */ 1122);\n\nvar _camelize2 = _interopRequireDefault(_camelize);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar msPattern = /^-ms-/; /**\n * Copyright 2014-2015, Facebook, Inc.\n * All rights reserved.\n * https://github.com/facebook/react/blob/2aeb8a2a6beb00617a4217f7f8284924fa2ad819/src/vendor/core/camelizeStyleName.js\n */\nfunction camelizeStyleName(string) {\n return (0, _camelize2.default)(string.replace(msPattern, 'ms-'));\n}\nmodule.exports = exports['default'];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/dom-helpers/util/camelizeStyle.js\n// module id = 344\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/dom-helpers/util/camelizeStyle.js?", + ); + + /***/ + }, + /* 345 */ + /* unknown exports provided */ + /* all exports used */ + /*!*********************************************!*\ + !*** ./~/dom-helpers/util/scrollbarSize.js ***! + \*********************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nexports.default = function (recalc) {\n if (!size || recalc) {\n if (_inDOM2.default) {\n var scrollDiv = document.createElement('div');\n\n scrollDiv.style.position = 'absolute';\n scrollDiv.style.top = '-9999px';\n scrollDiv.style.width = '50px';\n scrollDiv.style.height = '50px';\n scrollDiv.style.overflow = 'scroll';\n\n document.body.appendChild(scrollDiv);\n size = scrollDiv.offsetWidth - scrollDiv.clientWidth;\n document.body.removeChild(scrollDiv);\n }\n }\n\n return size;\n};\n\nvar _inDOM = __webpack_require__(/*! ./inDOM */ 65);\n\nvar _inDOM2 = _interopRequireDefault(_inDOM);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar size = void 0;\n\nmodule.exports = exports['default'];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/dom-helpers/util/scrollbarSize.js\n// module id = 345\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/dom-helpers/util/scrollbarSize.js?", + ); + + /***/ + }, + /* 346 */ + /* unknown exports provided */ + /* all exports used */ + /*!*************************************!*\ + !*** ./~/fbjs/lib/EventListener.js ***! + \*************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * @typechecks\n */\n\nvar emptyFunction = __webpack_require__(/*! ./emptyFunction */ 40);\n\n/**\n * Upstream version of event listener. Does not take into account specific\n * nature of platform.\n */\nvar EventListener = {\n /**\n * Listen to DOM events during the bubble phase.\n *\n * @param {DOMEventTarget} target DOM element to register listener on.\n * @param {string} eventType Event type, e.g. 'click' or 'mouseover'.\n * @param {function} callback Callback function.\n * @return {object} Object with a `remove` method.\n */\n listen: function listen(target, eventType, callback) {\n if (target.addEventListener) {\n target.addEventListener(eventType, callback, false);\n return {\n remove: function remove() {\n target.removeEventListener(eventType, callback, false);\n }\n };\n } else if (target.attachEvent) {\n target.attachEvent('on' + eventType, callback);\n return {\n remove: function remove() {\n target.detachEvent('on' + eventType, callback);\n }\n };\n }\n },\n\n /**\n * Listen to DOM events during the capture phase.\n *\n * @param {DOMEventTarget} target DOM element to register listener on.\n * @param {string} eventType Event type, e.g. 'click' or 'mouseover'.\n * @param {function} callback Callback function.\n * @return {object} Object with a `remove` method.\n */\n capture: function capture(target, eventType, callback) {\n if (target.addEventListener) {\n target.addEventListener(eventType, callback, true);\n return {\n remove: function remove() {\n target.removeEventListener(eventType, callback, true);\n }\n };\n } else {\n if (true) {\n console.error('Attempted to listen to events during the capture phase on a ' + 'browser that does not support the capture phase. Your application ' + 'will not receive some events.');\n }\n return {\n remove: emptyFunction\n };\n }\n },\n\n registerDefault: function registerDefault() {}\n};\n\nmodule.exports = EventListener;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/fbjs/lib/EventListener.js\n// module id = 346\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/fbjs/lib/EventListener.js?", + ); + + /***/ + }, + /* 347 */ + /* unknown exports provided */ + /* all exports used */ + /*!*********************************!*\ + !*** ./~/fbjs/lib/focusNode.js ***! + \*********************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '/**\n * Copyright (c) 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\n/**\n * @param {DOMElement} node input/textarea to focus\n */\n\nfunction focusNode(node) {\n // IE8 can throw "Can\'t move focus to the control because it is invisible,\n // not enabled, or of a type that does not accept the focus." for all kinds of\n // reasons that are too expensive and fragile to test.\n try {\n node.focus();\n } catch (e) {}\n}\n\nmodule.exports = focusNode;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/fbjs/lib/focusNode.js\n// module id = 347\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/fbjs/lib/focusNode.js?', + ); + + /***/ + }, + /* 348 */ + /* unknown exports provided */ + /* all exports used */ + /*!****************************************!*\ + !*** ./~/fbjs/lib/getActiveElement.js ***! + \****************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * @typechecks\n */\n\n/* eslint-disable fb-www/typeof-undefined */\n\n/**\n * Same as document.activeElement but wraps in a try-catch block. In IE it is\n * not safe to call document.activeElement if there is nothing focused.\n *\n * The activeElement will be null only if the document or document body is not\n * yet defined.\n *\n * @param {?DOMDocument} doc Defaults to current document.\n * @return {?DOMElement}\n */\nfunction getActiveElement(doc) /*?DOMElement*/{\n doc = doc || (typeof document !== 'undefined' ? document : undefined);\n if (typeof doc === 'undefined') {\n return null;\n }\n try {\n return doc.activeElement || doc.body;\n } catch (e) {\n return doc.body;\n }\n}\n\nmodule.exports = getActiveElement;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/fbjs/lib/getActiveElement.js\n// module id = 348\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/fbjs/lib/getActiveElement.js?", + ); + + /***/ + }, + /* 349 */ + /* unknown exports provided */ + /* all exports used */ + /*!*************************************************!*\ + !*** ./~/get-node-dimensions/lib/get-margin.js ***! + \*************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports["default"] = getMargin;\nvar toNumber = function toNumber(n) {\n return parseInt(n) || 0;\n};\n\nfunction getMargin(style) {\n return {\n top: toNumber(style.marginTop),\n right: toNumber(style.marginRight),\n bottom: toNumber(style.marginBottom),\n left: toNumber(style.marginLeft)\n };\n}\n\nmodule.exports = exports["default"];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/get-node-dimensions/lib/get-margin.js\n// module id = 349\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/get-node-dimensions/lib/get-margin.js?', + ); + + /***/ + }, + /* 350 */ + /* unknown exports provided */ + /* all exports used */ + /*!******************************************!*\ + !*** ./~/history/lib/DOMStateStorage.js ***! + \******************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nexports.__esModule = true;\nexports.readState = exports.saveState = undefined;\n\nvar _warning = __webpack_require__(/*! warning */ 23);\n\nvar _warning2 = _interopRequireDefault(_warning);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar QuotaExceededErrors = {\n QuotaExceededError: true,\n QUOTA_EXCEEDED_ERR: true\n};\n\nvar SecurityErrors = {\n SecurityError: true\n};\n\nvar KeyPrefix = '@@History/';\n\nvar createKey = function createKey(key) {\n return KeyPrefix + key;\n};\n\nvar saveState = exports.saveState = function saveState(key, state) {\n if (!window.sessionStorage) {\n // Session storage is not available or hidden.\n // sessionStorage is undefined in Internet Explorer when served via file protocol.\n true ? (0, _warning2.default)(false, '[history] Unable to save state; sessionStorage is not available') : void 0;\n\n return;\n }\n\n try {\n if (state == null) {\n window.sessionStorage.removeItem(createKey(key));\n } else {\n window.sessionStorage.setItem(createKey(key), JSON.stringify(state));\n }\n } catch (error) {\n if (SecurityErrors[error.name]) {\n // Blocking cookies in Chrome/Firefox/Safari throws SecurityError on any\n // attempt to access window.sessionStorage.\n true ? (0, _warning2.default)(false, '[history] Unable to save state; sessionStorage is not available due to security settings') : void 0;\n\n return;\n }\n\n if (QuotaExceededErrors[error.name] && window.sessionStorage.length === 0) {\n // Safari \"private mode\" throws QuotaExceededError.\n true ? (0, _warning2.default)(false, '[history] Unable to save state; sessionStorage is not available in Safari private mode') : void 0;\n\n return;\n }\n\n throw error;\n }\n};\n\nvar readState = exports.readState = function readState(key) {\n var json = void 0;\n try {\n json = window.sessionStorage.getItem(createKey(key));\n } catch (error) {\n if (SecurityErrors[error.name]) {\n // Blocking cookies in Chrome/Firefox/Safari throws SecurityError on any\n // attempt to access window.sessionStorage.\n true ? (0, _warning2.default)(false, '[history] Unable to read state; sessionStorage is not available due to security settings') : void 0;\n\n return undefined;\n }\n }\n\n if (json) {\n try {\n return JSON.parse(json);\n } catch (error) {\n // Ignore invalid JSON.\n }\n }\n\n return undefined;\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/history/lib/DOMStateStorage.js\n// module id = 350\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/history/lib/DOMStateStorage.js?", + ); + + /***/ + }, + /* 351 */ + /* unknown exports provided */ + /* exports used: default */ + /*!**************************************!*\ + !*** ./~/history/lib/useBasename.js ***! + \**************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nexports.__esModule = true;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _runTransitionHook = __webpack_require__(/*! ./runTransitionHook */ 216);\n\nvar _runTransitionHook2 = _interopRequireDefault(_runTransitionHook);\n\nvar _PathUtils = __webpack_require__(/*! ./PathUtils */ 66);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar useBasename = function useBasename(createHistory) {\n return function () {\n var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\n var history = createHistory(options);\n var basename = options.basename;\n\n\n var addBasename = function addBasename(location) {\n if (!location) return location;\n\n if (basename && location.basename == null) {\n if (location.pathname.indexOf(basename) === 0) {\n location.pathname = location.pathname.substring(basename.length);\n location.basename = basename;\n\n if (location.pathname === '') location.pathname = '/';\n } else {\n location.basename = '';\n }\n }\n\n return location;\n };\n\n var prependBasename = function prependBasename(location) {\n if (!basename) return location;\n\n var object = typeof location === 'string' ? (0, _PathUtils.parsePath)(location) : location;\n var pname = object.pathname;\n var normalizedBasename = basename.slice(-1) === '/' ? basename : basename + '/';\n var normalizedPathname = pname.charAt(0) === '/' ? pname.slice(1) : pname;\n var pathname = normalizedBasename + normalizedPathname;\n\n return _extends({}, object, {\n pathname: pathname\n });\n };\n\n // Override all read methods with basename-aware versions.\n var getCurrentLocation = function getCurrentLocation() {\n return addBasename(history.getCurrentLocation());\n };\n\n var listenBefore = function listenBefore(hook) {\n return history.listenBefore(function (location, callback) {\n return (0, _runTransitionHook2.default)(hook, addBasename(location), callback);\n });\n };\n\n var listen = function listen(listener) {\n return history.listen(function (location) {\n return listener(addBasename(location));\n });\n };\n\n // Override all write methods with basename-aware versions.\n var push = function push(location) {\n return history.push(prependBasename(location));\n };\n\n var replace = function replace(location) {\n return history.replace(prependBasename(location));\n };\n\n var createPath = function createPath(location) {\n return history.createPath(prependBasename(location));\n };\n\n var createHref = function createHref(location) {\n return history.createHref(prependBasename(location));\n };\n\n var createLocation = function createLocation(location) {\n for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n return addBasename(history.createLocation.apply(history, [prependBasename(location)].concat(args)));\n };\n\n return _extends({}, history, {\n getCurrentLocation: getCurrentLocation,\n listenBefore: listenBefore,\n listen: listen,\n push: push,\n replace: replace,\n createPath: createPath,\n createHref: createHref,\n createLocation: createLocation\n });\n };\n};\n\nexports.default = useBasename;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/history/lib/useBasename.js\n// module id = 351\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/history/lib/useBasename.js?", + ); + + /***/ + }, + /* 352 */ + /* unknown exports provided */ + /* exports used: default */ + /*!*************************************!*\ + !*** ./~/history/lib/useQueries.js ***! + \*************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nexports.__esModule = true;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _queryString = __webpack_require__(/*! query-string */ 1222);\n\nvar _runTransitionHook = __webpack_require__(/*! ./runTransitionHook */ 216);\n\nvar _runTransitionHook2 = _interopRequireDefault(_runTransitionHook);\n\nvar _LocationUtils = __webpack_require__(/*! ./LocationUtils */ 98);\n\nvar _PathUtils = __webpack_require__(/*! ./PathUtils */ 66);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar defaultStringifyQuery = function defaultStringifyQuery(query) {\n return (0, _queryString.stringify)(query).replace(/%20/g, '+');\n};\n\nvar defaultParseQueryString = _queryString.parse;\n\n/**\n * Returns a new createHistory function that may be used to create\n * history objects that know how to handle URL queries.\n */\nvar useQueries = function useQueries(createHistory) {\n return function () {\n var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\n var history = createHistory(options);\n var stringifyQuery = options.stringifyQuery;\n var parseQueryString = options.parseQueryString;\n\n\n if (typeof stringifyQuery !== 'function') stringifyQuery = defaultStringifyQuery;\n\n if (typeof parseQueryString !== 'function') parseQueryString = defaultParseQueryString;\n\n var decodeQuery = function decodeQuery(location) {\n if (!location) return location;\n\n if (location.query == null) location.query = parseQueryString(location.search.substring(1));\n\n return location;\n };\n\n var encodeQuery = function encodeQuery(location, query) {\n if (query == null) return location;\n\n var object = typeof location === 'string' ? (0, _PathUtils.parsePath)(location) : location;\n var queryString = stringifyQuery(query);\n var search = queryString ? '?' + queryString : '';\n\n return _extends({}, object, {\n search: search\n });\n };\n\n // Override all read methods with query-aware versions.\n var getCurrentLocation = function getCurrentLocation() {\n return decodeQuery(history.getCurrentLocation());\n };\n\n var listenBefore = function listenBefore(hook) {\n return history.listenBefore(function (location, callback) {\n return (0, _runTransitionHook2.default)(hook, decodeQuery(location), callback);\n });\n };\n\n var listen = function listen(listener) {\n return history.listen(function (location) {\n return listener(decodeQuery(location));\n });\n };\n\n // Override all write methods with query-aware versions.\n var push = function push(location) {\n return history.push(encodeQuery(location, location.query));\n };\n\n var replace = function replace(location) {\n return history.replace(encodeQuery(location, location.query));\n };\n\n var createPath = function createPath(location) {\n return history.createPath(encodeQuery(location, location.query));\n };\n\n var createHref = function createHref(location) {\n return history.createHref(encodeQuery(location, location.query));\n };\n\n var createLocation = function createLocation(location) {\n for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n var newLocation = history.createLocation.apply(history, [encodeQuery(location, location.query)].concat(args));\n\n if (location.query) newLocation.query = (0, _LocationUtils.createQuery)(location.query);\n\n return decodeQuery(newLocation);\n };\n\n return _extends({}, history, {\n getCurrentLocation: getCurrentLocation,\n listenBefore: listenBefore,\n listen: listen,\n push: push,\n replace: replace,\n createPath: createPath,\n createHref: createHref,\n createLocation: createLocation\n });\n };\n};\n\nexports.default = useQueries;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/history/lib/useQueries.js\n// module id = 352\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/history/lib/useQueries.js?", + ); + + /***/ + }, + /* 353 */ + /* unknown exports provided */ + /* all exports used */ + /*!************************************!*\ + !*** ./~/lodash/_LodashWrapper.js ***! + \************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + 'var baseCreate = __webpack_require__(/*! ./_baseCreate */ 224),\n baseLodash = __webpack_require__(/*! ./_baseLodash */ 226);\n\n/**\n * The base constructor for creating `lodash` wrapper objects.\n *\n * @private\n * @param {*} value The value to wrap.\n * @param {boolean} [chainAll] Enable explicit method chain sequences.\n */\nfunction LodashWrapper(value, chainAll) {\n this.__wrapped__ = value;\n this.__actions__ = [];\n this.__chain__ = !!chainAll;\n this.__index__ = 0;\n this.__values__ = undefined;\n}\n\nLodashWrapper.prototype = baseCreate(baseLodash.prototype);\nLodashWrapper.prototype.constructor = LodashWrapper;\n\nmodule.exports = LodashWrapper;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/_LodashWrapper.js\n// module id = 353\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/lodash/_LodashWrapper.js?', + ); + + /***/ + }, + /* 354 */ + /* unknown exports provided */ + /* all exports used */ + /*!********************************!*\ + !*** ./~/lodash/_arrayEach.js ***! + \********************************/ + /***/ function (module, exports) { + eval( + '/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\n\nmodule.exports = arrayEach;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/_arrayEach.js\n// module id = 354\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/lodash/_arrayEach.js?', + ); + + /***/ + }, + /* 355 */ + /* unknown exports provided */ + /* all exports used */ + /*!**********************************!*\ + !*** ./~/lodash/_baseSetData.js ***! + \**********************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + 'var identity = __webpack_require__(/*! ./identity */ 229),\n metaMap = __webpack_require__(/*! ./_metaMap */ 364);\n\n/**\n * The base implementation of `setData` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to associate metadata with.\n * @param {*} data The metadata.\n * @returns {Function} Returns `func`.\n */\nvar baseSetData = !metaMap ? identity : function(func, data) {\n metaMap.set(func, data);\n return func;\n};\n\nmodule.exports = baseSetData;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/_baseSetData.js\n// module id = 355\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/lodash/_baseSetData.js?', + ); + + /***/ + }, + /* 356 */ + /* unknown exports provided */ + /* all exports used */ + /*!**********************************!*\ + !*** ./~/lodash/_composeArgs.js ***! + \**********************************/ + /***/ function (module, exports) { + eval( + '/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * Creates an array that is the composition of partially applied arguments,\n * placeholders, and provided arguments into a single array of arguments.\n *\n * @private\n * @param {Array} args The provided arguments.\n * @param {Array} partials The arguments to prepend to those provided.\n * @param {Array} holders The `partials` placeholder indexes.\n * @params {boolean} [isCurried] Specify composing for a curried function.\n * @returns {Array} Returns the new array of composed arguments.\n */\nfunction composeArgs(args, partials, holders, isCurried) {\n var argsIndex = -1,\n argsLength = args.length,\n holdersLength = holders.length,\n leftIndex = -1,\n leftLength = partials.length,\n rangeLength = nativeMax(argsLength - holdersLength, 0),\n result = Array(leftLength + rangeLength),\n isUncurried = !isCurried;\n\n while (++leftIndex < leftLength) {\n result[leftIndex] = partials[leftIndex];\n }\n while (++argsIndex < holdersLength) {\n if (isUncurried || argsIndex < argsLength) {\n result[holders[argsIndex]] = args[argsIndex];\n }\n }\n while (rangeLength--) {\n result[leftIndex++] = args[argsIndex++];\n }\n return result;\n}\n\nmodule.exports = composeArgs;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/_composeArgs.js\n// module id = 356\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/lodash/_composeArgs.js?', + ); + + /***/ + }, + /* 357 */ + /* unknown exports provided */ + /* all exports used */ + /*!***************************************!*\ + !*** ./~/lodash/_composeArgsRight.js ***! + \***************************************/ + /***/ function (module, exports) { + eval( + '/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * This function is like `composeArgs` except that the arguments composition\n * is tailored for `_.partialRight`.\n *\n * @private\n * @param {Array} args The provided arguments.\n * @param {Array} partials The arguments to append to those provided.\n * @param {Array} holders The `partials` placeholder indexes.\n * @params {boolean} [isCurried] Specify composing for a curried function.\n * @returns {Array} Returns the new array of composed arguments.\n */\nfunction composeArgsRight(args, partials, holders, isCurried) {\n var argsIndex = -1,\n argsLength = args.length,\n holdersIndex = -1,\n holdersLength = holders.length,\n rightIndex = -1,\n rightLength = partials.length,\n rangeLength = nativeMax(argsLength - holdersLength, 0),\n result = Array(rangeLength + rightLength),\n isUncurried = !isCurried;\n\n while (++argsIndex < rangeLength) {\n result[argsIndex] = args[argsIndex];\n }\n var offset = argsIndex;\n while (++rightIndex < rightLength) {\n result[offset + rightIndex] = partials[rightIndex];\n }\n while (++holdersIndex < holdersLength) {\n if (isUncurried || argsIndex < argsLength) {\n result[offset + holders[holdersIndex]] = args[argsIndex++];\n }\n }\n return result;\n}\n\nmodule.exports = composeArgsRight;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/_composeArgsRight.js\n// module id = 357\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/lodash/_composeArgsRight.js?', + ); + + /***/ + }, + /* 358 */ + /* unknown exports provided */ + /* all exports used */ + /*!********************************!*\ + !*** ./~/lodash/_copyArray.js ***! + \********************************/ + /***/ function (module, exports) { + eval( + '/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\nmodule.exports = copyArray;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/_copyArray.js\n// module id = 358\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/lodash/_copyArray.js?', + ); + + /***/ + }, + /* 359 */ + /* unknown exports provided */ + /* all exports used */ + /*!***********************************!*\ + !*** ./~/lodash/_createHybrid.js ***! + \***********************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + 'var composeArgs = __webpack_require__(/*! ./_composeArgs */ 356),\n composeArgsRight = __webpack_require__(/*! ./_composeArgsRight */ 357),\n countHolders = __webpack_require__(/*! ./_countHolders */ 1168),\n createCtor = __webpack_require__(/*! ./_createCtor */ 161),\n createRecurry = __webpack_require__(/*! ./_createRecurry */ 360),\n getHolder = __webpack_require__(/*! ./_getHolder */ 227),\n reorder = __webpack_require__(/*! ./_reorder */ 1187),\n replaceHolders = __webpack_require__(/*! ./_replaceHolders */ 162),\n root = __webpack_require__(/*! ./_root */ 77);\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_BIND_FLAG = 1,\n WRAP_BIND_KEY_FLAG = 2,\n WRAP_CURRY_FLAG = 8,\n WRAP_CURRY_RIGHT_FLAG = 16,\n WRAP_ARY_FLAG = 128,\n WRAP_FLIP_FLAG = 512;\n\n/**\n * Creates a function that wraps `func` to invoke it with optional `this`\n * binding of `thisArg`, partial application, and currying.\n *\n * @private\n * @param {Function|string} func The function or method name to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {*} [thisArg] The `this` binding of `func`.\n * @param {Array} [partials] The arguments to prepend to those provided to\n * the new function.\n * @param {Array} [holders] The `partials` placeholder indexes.\n * @param {Array} [partialsRight] The arguments to append to those provided\n * to the new function.\n * @param {Array} [holdersRight] The `partialsRight` placeholder indexes.\n * @param {Array} [argPos] The argument positions of the new function.\n * @param {number} [ary] The arity cap of `func`.\n * @param {number} [arity] The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\nfunction createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {\n var isAry = bitmask & WRAP_ARY_FLAG,\n isBind = bitmask & WRAP_BIND_FLAG,\n isBindKey = bitmask & WRAP_BIND_KEY_FLAG,\n isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG),\n isFlip = bitmask & WRAP_FLIP_FLAG,\n Ctor = isBindKey ? undefined : createCtor(func);\n\n function wrapper() {\n var length = arguments.length,\n args = Array(length),\n index = length;\n\n while (index--) {\n args[index] = arguments[index];\n }\n if (isCurried) {\n var placeholder = getHolder(wrapper),\n holdersCount = countHolders(args, placeholder);\n }\n if (partials) {\n args = composeArgs(args, partials, holders, isCurried);\n }\n if (partialsRight) {\n args = composeArgsRight(args, partialsRight, holdersRight, isCurried);\n }\n length -= holdersCount;\n if (isCurried && length < arity) {\n var newHolders = replaceHolders(args, placeholder);\n return createRecurry(\n func, bitmask, createHybrid, wrapper.placeholder, thisArg,\n args, newHolders, argPos, ary, arity - length\n );\n }\n var thisBinding = isBind ? thisArg : this,\n fn = isBindKey ? thisBinding[func] : func;\n\n length = args.length;\n if (argPos) {\n args = reorder(args, argPos);\n } else if (isFlip && length > 1) {\n args.reverse();\n }\n if (isAry && ary < length) {\n args.length = ary;\n }\n if (this && this !== root && this instanceof wrapper) {\n fn = Ctor || createCtor(fn);\n }\n return fn.apply(thisBinding, args);\n }\n return wrapper;\n}\n\nmodule.exports = createHybrid;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/_createHybrid.js\n// module id = 359\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/lodash/_createHybrid.js?', + ); + + /***/ + }, + /* 360 */ + /* unknown exports provided */ + /* all exports used */ + /*!************************************!*\ + !*** ./~/lodash/_createRecurry.js ***! + \************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + 'var isLaziable = __webpack_require__(/*! ./_isLaziable */ 1182),\n setData = __webpack_require__(/*! ./_setData */ 366),\n setWrapToString = __webpack_require__(/*! ./_setWrapToString */ 367);\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_BIND_FLAG = 1,\n WRAP_BIND_KEY_FLAG = 2,\n WRAP_CURRY_BOUND_FLAG = 4,\n WRAP_CURRY_FLAG = 8,\n WRAP_PARTIAL_FLAG = 32,\n WRAP_PARTIAL_RIGHT_FLAG = 64;\n\n/**\n * Creates a function that wraps `func` to continue currying.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {Function} wrapFunc The function to create the `func` wrapper.\n * @param {*} placeholder The placeholder value.\n * @param {*} [thisArg] The `this` binding of `func`.\n * @param {Array} [partials] The arguments to prepend to those provided to\n * the new function.\n * @param {Array} [holders] The `partials` placeholder indexes.\n * @param {Array} [argPos] The argument positions of the new function.\n * @param {number} [ary] The arity cap of `func`.\n * @param {number} [arity] The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\nfunction createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {\n var isCurry = bitmask & WRAP_CURRY_FLAG,\n newHolders = isCurry ? holders : undefined,\n newHoldersRight = isCurry ? undefined : holders,\n newPartials = isCurry ? partials : undefined,\n newPartialsRight = isCurry ? undefined : partials;\n\n bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG);\n bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);\n\n if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {\n bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG);\n }\n var newData = [\n func, bitmask, thisArg, newPartials, newHolders, newPartialsRight,\n newHoldersRight, argPos, ary, arity\n ];\n\n var result = wrapFunc.apply(undefined, newData);\n if (isLaziable(func)) {\n setData(result, newData);\n }\n result.placeholder = placeholder;\n return setWrapToString(result, func, bitmask);\n}\n\nmodule.exports = createRecurry;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/_createRecurry.js\n// module id = 360\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/lodash/_createRecurry.js?', + ); + + /***/ + }, + /* 361 */ + /* unknown exports provided */ + /* all exports used */ + /*!*************************************!*\ + !*** ./~/lodash/_defineProperty.js ***! + \*************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "var getNative = __webpack_require__(/*! ./_getNative */ 363);\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/_defineProperty.js\n// module id = 361\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/lodash/_defineProperty.js?", + ); + + /***/ + }, + /* 362 */ + /* unknown exports provided */ + /* all exports used */ + /*!******************************!*\ + !*** ./~/lodash/_getData.js ***! + \******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + 'var metaMap = __webpack_require__(/*! ./_metaMap */ 364),\n noop = __webpack_require__(/*! ./noop */ 1204);\n\n/**\n * Gets metadata for `func`.\n *\n * @private\n * @param {Function} func The function to query.\n * @returns {*} Returns the metadata for `func`.\n */\nvar getData = !metaMap ? noop : function(func) {\n return metaMap.get(func);\n};\n\nmodule.exports = getData;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/_getData.js\n// module id = 362\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/lodash/_getData.js?', + ); + + /***/ + }, + /* 363 */ + /* unknown exports provided */ + /* all exports used */ + /*!********************************!*\ + !*** ./~/lodash/_getNative.js ***! + \********************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "var baseIsNative = __webpack_require__(/*! ./_baseIsNative */ 1164),\n getValue = __webpack_require__(/*! ./_getValue */ 1177);\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/_getNative.js\n// module id = 363\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/lodash/_getNative.js?", + ); + + /***/ + }, + /* 364 */ + /* unknown exports provided */ + /* all exports used */ + /*!******************************!*\ + !*** ./~/lodash/_metaMap.js ***! + \******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + 'var WeakMap = __webpack_require__(/*! ./_WeakMap */ 1155);\n\n/** Used to store function metadata. */\nvar metaMap = WeakMap && new WeakMap;\n\nmodule.exports = metaMap;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/_metaMap.js\n// module id = 364\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/lodash/_metaMap.js?', + ); + + /***/ + }, + /* 365 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/lodash/_overRest.js ***! + \*******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + 'var apply = __webpack_require__(/*! ./_apply */ 223);\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * A specialized version of `baseRest` which transforms the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @param {Function} transform The rest array transform.\n * @returns {Function} Returns the new function.\n */\nfunction overRest(func, start, transform) {\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n index = -1;\n var otherArgs = Array(start + 1);\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = transform(array);\n return apply(func, this, otherArgs);\n };\n}\n\nmodule.exports = overRest;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/_overRest.js\n// module id = 365\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/lodash/_overRest.js?', + ); + + /***/ + }, + /* 366 */ + /* unknown exports provided */ + /* all exports used */ + /*!******************************!*\ + !*** ./~/lodash/_setData.js ***! + \******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + 'var baseSetData = __webpack_require__(/*! ./_baseSetData */ 355),\n shortOut = __webpack_require__(/*! ./_shortOut */ 368);\n\n/**\n * Sets metadata for `func`.\n *\n * **Note:** If this function becomes hot, i.e. is invoked a lot in a short\n * period of time, it will trip its breaker and transition to an identity\n * function to avoid garbage collection pauses in V8. See\n * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070)\n * for more details.\n *\n * @private\n * @param {Function} func The function to associate metadata with.\n * @param {*} data The metadata.\n * @returns {Function} Returns `func`.\n */\nvar setData = shortOut(baseSetData);\n\nmodule.exports = setData;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/_setData.js\n// module id = 366\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/lodash/_setData.js?', + ); + + /***/ + }, + /* 367 */ + /* unknown exports provided */ + /* all exports used */ + /*!**************************************!*\ + !*** ./~/lodash/_setWrapToString.js ***! + \**************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "var getWrapDetails = __webpack_require__(/*! ./_getWrapDetails */ 1178),\n insertWrapDetails = __webpack_require__(/*! ./_insertWrapDetails */ 1179),\n setToString = __webpack_require__(/*! ./_setToString */ 228),\n updateWrapDetails = __webpack_require__(/*! ./_updateWrapDetails */ 1191);\n\n/**\n * Sets the `toString` method of `wrapper` to mimic the source of `reference`\n * with wrapper details in a comment at the top of the source body.\n *\n * @private\n * @param {Function} wrapper The function to modify.\n * @param {Function} reference The reference function.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @returns {Function} Returns `wrapper`.\n */\nfunction setWrapToString(wrapper, reference, bitmask) {\n var source = (reference + '');\n return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));\n}\n\nmodule.exports = setWrapToString;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/_setWrapToString.js\n// module id = 367\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/lodash/_setWrapToString.js?", + ); + + /***/ + }, + /* 368 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/lodash/_shortOut.js ***! + \*******************************/ + /***/ function (module, exports) { + eval( + "/** Used to detect hot functions by number of calls within a span of milliseconds. */\nvar HOT_COUNT = 800,\n HOT_SPAN = 16;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeNow = Date.now;\n\n/**\n * Creates a function that'll short out and invoke `identity` instead\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n * milliseconds.\n *\n * @private\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new shortable function.\n */\nfunction shortOut(func) {\n var count = 0,\n lastCalled = 0;\n\n return function() {\n var stamp = nativeNow(),\n remaining = HOT_SPAN - (stamp - lastCalled);\n\n lastCalled = stamp;\n if (remaining > 0) {\n if (++count >= HOT_COUNT) {\n return arguments[0];\n }\n } else {\n count = 0;\n }\n return func.apply(undefined, arguments);\n };\n}\n\nmodule.exports = shortOut;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/_shortOut.js\n// module id = 368\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/lodash/_shortOut.js?", + ); + + /***/ + }, + /* 369 */ + /* unknown exports provided */ + /* all exports used */ + /*!*****************************!*\ + !*** ./~/lodash/isArray.js ***! + \*****************************/ + /***/ function (module, exports) { + eval( + "/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/isArray.js\n// module id = 369\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/lodash/isArray.js?", + ); + + /***/ + }, + /* 370 */ + /* unknown exports provided */ + /* all exports used */ + /*!******************************!*\ + !*** ./~/lodash/isSymbol.js ***! + \******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ 225),\n isObjectLike = __webpack_require__(/*! ./isObjectLike */ 163);\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nmodule.exports = isSymbol;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/isSymbol.js\n// module id = 370\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/lodash/isSymbol.js?", + ); + + /***/ + }, + /* 371 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/moment/locale/af.js ***! + \*******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Afrikaans [af]\n//! author : Werner Mollentze : https://github.com/wernerm\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar af = moment.defineLocale('af', {\n months : 'Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember'.split('_'),\n monthsShort : 'Jan_Feb_Mrt_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des'.split('_'),\n weekdays : 'Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag'.split('_'),\n weekdaysShort : 'Son_Maa_Din_Woe_Don_Vry_Sat'.split('_'),\n weekdaysMin : 'So_Ma_Di_Wo_Do_Vr_Sa'.split('_'),\n meridiemParse: /vm|nm/i,\n isPM : function (input) {\n return /^nm$/i.test(input);\n },\n meridiem : function (hours, minutes, isLower) {\n if (hours < 12) {\n return isLower ? 'vm' : 'VM';\n } else {\n return isLower ? 'nm' : 'NM';\n }\n },\n longDateFormat : {\n LT : 'HH:mm',\n LTS : 'HH:mm:ss',\n L : 'DD/MM/YYYY',\n LL : 'D MMMM YYYY',\n LLL : 'D MMMM YYYY HH:mm',\n LLLL : 'dddd, D MMMM YYYY HH:mm'\n },\n calendar : {\n sameDay : '[Vandag om] LT',\n nextDay : '[Môre om] LT',\n nextWeek : 'dddd [om] LT',\n lastDay : '[Gister om] LT',\n lastWeek : '[Laas] dddd [om] LT',\n sameElse : 'L'\n },\n relativeTime : {\n future : 'oor %s',\n past : '%s gelede',\n s : '\\'n paar sekondes',\n m : '\\'n minuut',\n mm : '%d minute',\n h : '\\'n uur',\n hh : '%d ure',\n d : '\\'n dag',\n dd : '%d dae',\n M : '\\'n maand',\n MM : '%d maande',\n y : '\\'n jaar',\n yy : '%d jaar'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(ste|de)/,\n ordinal : function (number) {\n return number + ((number === 1 || number === 8 || number >= 20) ? 'ste' : 'de'); // Thanks to Joris Röling : https://github.com/jjupiter\n },\n week : {\n dow : 1, // Maandag is die eerste dag van die week.\n doy : 4 // Die week wat die 4de Januarie bevat is die eerste week van die jaar.\n }\n});\n\nreturn af;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/af.js\n// module id = 371\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/af.js?", + ); + + /***/ + }, + /* 372 */ + /* unknown exports provided */ + /* all exports used */ + /*!**********************************!*\ + !*** ./~/moment/locale/ar-dz.js ***! + \**********************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Arabic (Algeria) [ar-dz]\n//! author : Noureddine LOUAHEDJ : https://github.com/noureddineme\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar arDz = moment.defineLocale('ar-dz', {\n months : 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'),\n monthsShort : 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'),\n weekdays : 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n weekdaysShort : 'احد_اثنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'),\n weekdaysMin : 'أح_إث_ثلا_أر_خم_جم_سب'.split('_'),\n weekdaysParseExact : true,\n longDateFormat : {\n LT : 'HH:mm',\n LTS : 'HH:mm:ss',\n L : 'DD/MM/YYYY',\n LL : 'D MMMM YYYY',\n LLL : 'D MMMM YYYY HH:mm',\n LLLL : 'dddd D MMMM YYYY HH:mm'\n },\n calendar : {\n sameDay: '[اليوم على الساعة] LT',\n nextDay: '[غدا على الساعة] LT',\n nextWeek: 'dddd [على الساعة] LT',\n lastDay: '[أمس على الساعة] LT',\n lastWeek: 'dddd [على الساعة] LT',\n sameElse: 'L'\n },\n relativeTime : {\n future : 'في %s',\n past : 'منذ %s',\n s : 'ثوان',\n m : 'دقيقة',\n mm : '%d دقائق',\n h : 'ساعة',\n hh : '%d ساعات',\n d : 'يوم',\n dd : '%d أيام',\n M : 'شهر',\n MM : '%d أشهر',\n y : 'سنة',\n yy : '%d سنوات'\n },\n week : {\n dow : 0, // Sunday is the first day of the week.\n doy : 4 // The week that contains Jan 1st is the first week of the year.\n }\n});\n\nreturn arDz;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/ar-dz.js\n// module id = 372\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/ar-dz.js?", + ); + + /***/ + }, + /* 373 */ + /* unknown exports provided */ + /* all exports used */ + /*!**********************************!*\ + !*** ./~/moment/locale/ar-kw.js ***! + \**********************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Arabic (Kuwait) [ar-kw]\n//! author : Nusret Parlak: https://github.com/nusretparlak\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar arKw = moment.defineLocale('ar-kw', {\n months : 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'),\n monthsShort : 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'),\n weekdays : 'الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n weekdaysShort : 'احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'),\n weekdaysMin : 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n weekdaysParseExact : true,\n longDateFormat : {\n LT : 'HH:mm',\n LTS : 'HH:mm:ss',\n L : 'DD/MM/YYYY',\n LL : 'D MMMM YYYY',\n LLL : 'D MMMM YYYY HH:mm',\n LLLL : 'dddd D MMMM YYYY HH:mm'\n },\n calendar : {\n sameDay: '[اليوم على الساعة] LT',\n nextDay: '[غدا على الساعة] LT',\n nextWeek: 'dddd [على الساعة] LT',\n lastDay: '[أمس على الساعة] LT',\n lastWeek: 'dddd [على الساعة] LT',\n sameElse: 'L'\n },\n relativeTime : {\n future : 'في %s',\n past : 'منذ %s',\n s : 'ثوان',\n m : 'دقيقة',\n mm : '%d دقائق',\n h : 'ساعة',\n hh : '%d ساعات',\n d : 'يوم',\n dd : '%d أيام',\n M : 'شهر',\n MM : '%d أشهر',\n y : 'سنة',\n yy : '%d سنوات'\n },\n week : {\n dow : 0, // Sunday is the first day of the week.\n doy : 12 // The week that contains Jan 1st is the first week of the year.\n }\n});\n\nreturn arKw;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/ar-kw.js\n// module id = 373\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/ar-kw.js?", + ); + + /***/ + }, + /* 374 */ + /* unknown exports provided */ + /* all exports used */ + /*!**********************************!*\ + !*** ./~/moment/locale/ar-ly.js ***! + \**********************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Arabic (Lybia) [ar-ly]\n//! author : Ali Hmer: https://github.com/kikoanis\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar symbolMap = {\n '1': '1',\n '2': '2',\n '3': '3',\n '4': '4',\n '5': '5',\n '6': '6',\n '7': '7',\n '8': '8',\n '9': '9',\n '0': '0'\n};\nvar pluralForm = function (n) {\n return n === 0 ? 0 : n === 1 ? 1 : n === 2 ? 2 : n % 100 >= 3 && n % 100 <= 10 ? 3 : n % 100 >= 11 ? 4 : 5;\n};\nvar plurals = {\n s : ['أقل من ثانية', 'ثانية واحدة', ['ثانيتان', 'ثانيتين'], '%d ثوان', '%d ثانية', '%d ثانية'],\n m : ['أقل من دقيقة', 'دقيقة واحدة', ['دقيقتان', 'دقيقتين'], '%d دقائق', '%d دقيقة', '%d دقيقة'],\n h : ['أقل من ساعة', 'ساعة واحدة', ['ساعتان', 'ساعتين'], '%d ساعات', '%d ساعة', '%d ساعة'],\n d : ['أقل من يوم', 'يوم واحد', ['يومان', 'يومين'], '%d أيام', '%d يومًا', '%d يوم'],\n M : ['أقل من شهر', 'شهر واحد', ['شهران', 'شهرين'], '%d أشهر', '%d شهرا', '%d شهر'],\n y : ['أقل من عام', 'عام واحد', ['عامان', 'عامين'], '%d أعوام', '%d عامًا', '%d عام']\n};\nvar pluralize = function (u) {\n return function (number, withoutSuffix, string, isFuture) {\n var f = pluralForm(number),\n str = plurals[u][pluralForm(number)];\n if (f === 2) {\n str = str[withoutSuffix ? 0 : 1];\n }\n return str.replace(/%d/i, number);\n };\n};\nvar months = [\n 'يناير',\n 'فبراير',\n 'مارس',\n 'أبريل',\n 'مايو',\n 'يونيو',\n 'يوليو',\n 'أغسطس',\n 'سبتمبر',\n 'أكتوبر',\n 'نوفمبر',\n 'ديسمبر'\n];\n\nvar arLy = moment.defineLocale('ar-ly', {\n months : months,\n monthsShort : months,\n weekdays : 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n weekdaysShort : 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),\n weekdaysMin : 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n weekdaysParseExact : true,\n longDateFormat : {\n LT : 'HH:mm',\n LTS : 'HH:mm:ss',\n L : 'D/\\u200FM/\\u200FYYYY',\n LL : 'D MMMM YYYY',\n LLL : 'D MMMM YYYY HH:mm',\n LLLL : 'dddd D MMMM YYYY HH:mm'\n },\n meridiemParse: /ص|م/,\n isPM : function (input) {\n return 'م' === input;\n },\n meridiem : function (hour, minute, isLower) {\n if (hour < 12) {\n return 'ص';\n } else {\n return 'م';\n }\n },\n calendar : {\n sameDay: '[اليوم عند الساعة] LT',\n nextDay: '[غدًا عند الساعة] LT',\n nextWeek: 'dddd [عند الساعة] LT',\n lastDay: '[أمس عند الساعة] LT',\n lastWeek: 'dddd [عند الساعة] LT',\n sameElse: 'L'\n },\n relativeTime : {\n future : 'بعد %s',\n past : 'منذ %s',\n s : pluralize('s'),\n m : pluralize('m'),\n mm : pluralize('m'),\n h : pluralize('h'),\n hh : pluralize('h'),\n d : pluralize('d'),\n dd : pluralize('d'),\n M : pluralize('M'),\n MM : pluralize('M'),\n y : pluralize('y'),\n yy : pluralize('y')\n },\n preparse: function (string) {\n return string.replace(/\\u200f/g, '').replace(/،/g, ',');\n },\n postformat: function (string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n }).replace(/,/g, '،');\n },\n week : {\n dow : 6, // Saturday is the first day of the week.\n doy : 12 // The week that contains Jan 1st is the first week of the year.\n }\n});\n\nreturn arLy;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/ar-ly.js\n// module id = 374\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/ar-ly.js?", + ); + + /***/ + }, + /* 375 */ + /* unknown exports provided */ + /* all exports used */ + /*!**********************************!*\ + !*** ./~/moment/locale/ar-ma.js ***! + \**********************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Arabic (Morocco) [ar-ma]\n//! author : ElFadili Yassine : https://github.com/ElFadiliY\n//! author : Abdel Said : https://github.com/abdelsaid\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar arMa = moment.defineLocale('ar-ma', {\n months : 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'),\n monthsShort : 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'),\n weekdays : 'الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n weekdaysShort : 'احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'),\n weekdaysMin : 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n weekdaysParseExact : true,\n longDateFormat : {\n LT : 'HH:mm',\n LTS : 'HH:mm:ss',\n L : 'DD/MM/YYYY',\n LL : 'D MMMM YYYY',\n LLL : 'D MMMM YYYY HH:mm',\n LLLL : 'dddd D MMMM YYYY HH:mm'\n },\n calendar : {\n sameDay: '[اليوم على الساعة] LT',\n nextDay: '[غدا على الساعة] LT',\n nextWeek: 'dddd [على الساعة] LT',\n lastDay: '[أمس على الساعة] LT',\n lastWeek: 'dddd [على الساعة] LT',\n sameElse: 'L'\n },\n relativeTime : {\n future : 'في %s',\n past : 'منذ %s',\n s : 'ثوان',\n m : 'دقيقة',\n mm : '%d دقائق',\n h : 'ساعة',\n hh : '%d ساعات',\n d : 'يوم',\n dd : '%d أيام',\n M : 'شهر',\n MM : '%d أشهر',\n y : 'سنة',\n yy : '%d سنوات'\n },\n week : {\n dow : 6, // Saturday is the first day of the week.\n doy : 12 // The week that contains Jan 1st is the first week of the year.\n }\n});\n\nreturn arMa;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/ar-ma.js\n// module id = 375\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/ar-ma.js?", + ); + + /***/ + }, + /* 376 */ + /* unknown exports provided */ + /* all exports used */ + /*!**********************************!*\ + !*** ./~/moment/locale/ar-sa.js ***! + \**********************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Arabic (Saudi Arabia) [ar-sa]\n//! author : Suhail Alkowaileet : https://github.com/xsoh\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar symbolMap = {\n '1': '١',\n '2': '٢',\n '3': '٣',\n '4': '٤',\n '5': '٥',\n '6': '٦',\n '7': '٧',\n '8': '٨',\n '9': '٩',\n '0': '٠'\n};\nvar numberMap = {\n '١': '1',\n '٢': '2',\n '٣': '3',\n '٤': '4',\n '٥': '5',\n '٦': '6',\n '٧': '7',\n '٨': '8',\n '٩': '9',\n '٠': '0'\n};\n\nvar arSa = moment.defineLocale('ar-sa', {\n months : 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'),\n monthsShort : 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'),\n weekdays : 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n weekdaysShort : 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),\n weekdaysMin : 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n weekdaysParseExact : true,\n longDateFormat : {\n LT : 'HH:mm',\n LTS : 'HH:mm:ss',\n L : 'DD/MM/YYYY',\n LL : 'D MMMM YYYY',\n LLL : 'D MMMM YYYY HH:mm',\n LLLL : 'dddd D MMMM YYYY HH:mm'\n },\n meridiemParse: /ص|م/,\n isPM : function (input) {\n return 'م' === input;\n },\n meridiem : function (hour, minute, isLower) {\n if (hour < 12) {\n return 'ص';\n } else {\n return 'م';\n }\n },\n calendar : {\n sameDay: '[اليوم على الساعة] LT',\n nextDay: '[غدا على الساعة] LT',\n nextWeek: 'dddd [على الساعة] LT',\n lastDay: '[أمس على الساعة] LT',\n lastWeek: 'dddd [على الساعة] LT',\n sameElse: 'L'\n },\n relativeTime : {\n future : 'في %s',\n past : 'منذ %s',\n s : 'ثوان',\n m : 'دقيقة',\n mm : '%d دقائق',\n h : 'ساعة',\n hh : '%d ساعات',\n d : 'يوم',\n dd : '%d أيام',\n M : 'شهر',\n MM : '%d أشهر',\n y : 'سنة',\n yy : '%d سنوات'\n },\n preparse: function (string) {\n return string.replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {\n return numberMap[match];\n }).replace(/،/g, ',');\n },\n postformat: function (string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n }).replace(/,/g, '،');\n },\n week : {\n dow : 0, // Sunday is the first day of the week.\n doy : 6 // The week that contains Jan 1st is the first week of the year.\n }\n});\n\nreturn arSa;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/ar-sa.js\n// module id = 376\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/ar-sa.js?", + ); + + /***/ + }, + /* 377 */ + /* unknown exports provided */ + /* all exports used */ + /*!**********************************!*\ + !*** ./~/moment/locale/ar-tn.js ***! + \**********************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Arabic (Tunisia) [ar-tn]\n//! author : Nader Toukabri : https://github.com/naderio\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar arTn = moment.defineLocale('ar-tn', {\n months: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'),\n monthsShort: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'),\n weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),\n weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n weekdaysParseExact : true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[اليوم على الساعة] LT',\n nextDay: '[غدا على الساعة] LT',\n nextWeek: 'dddd [على الساعة] LT',\n lastDay: '[أمس على الساعة] LT',\n lastWeek: 'dddd [على الساعة] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'في %s',\n past: 'منذ %s',\n s: 'ثوان',\n m: 'دقيقة',\n mm: '%d دقائق',\n h: 'ساعة',\n hh: '%d ساعات',\n d: 'يوم',\n dd: '%d أيام',\n M: 'شهر',\n MM: '%d أشهر',\n y: 'سنة',\n yy: '%d سنوات'\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n }\n});\n\nreturn arTn;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/ar-tn.js\n// module id = 377\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/ar-tn.js?", + ); + + /***/ + }, + /* 378 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/moment/locale/ar.js ***! + \*******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Arabic [ar]\n//! author : Abdel Said: https://github.com/abdelsaid\n//! author : Ahmed Elkhatib\n//! author : forabi https://github.com/forabi\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar symbolMap = {\n '1': '١',\n '2': '٢',\n '3': '٣',\n '4': '٤',\n '5': '٥',\n '6': '٦',\n '7': '٧',\n '8': '٨',\n '9': '٩',\n '0': '٠'\n};\nvar numberMap = {\n '١': '1',\n '٢': '2',\n '٣': '3',\n '٤': '4',\n '٥': '5',\n '٦': '6',\n '٧': '7',\n '٨': '8',\n '٩': '9',\n '٠': '0'\n};\nvar pluralForm = function (n) {\n return n === 0 ? 0 : n === 1 ? 1 : n === 2 ? 2 : n % 100 >= 3 && n % 100 <= 10 ? 3 : n % 100 >= 11 ? 4 : 5;\n};\nvar plurals = {\n s : ['أقل من ثانية', 'ثانية واحدة', ['ثانيتان', 'ثانيتين'], '%d ثوان', '%d ثانية', '%d ثانية'],\n m : ['أقل من دقيقة', 'دقيقة واحدة', ['دقيقتان', 'دقيقتين'], '%d دقائق', '%d دقيقة', '%d دقيقة'],\n h : ['أقل من ساعة', 'ساعة واحدة', ['ساعتان', 'ساعتين'], '%d ساعات', '%d ساعة', '%d ساعة'],\n d : ['أقل من يوم', 'يوم واحد', ['يومان', 'يومين'], '%d أيام', '%d يومًا', '%d يوم'],\n M : ['أقل من شهر', 'شهر واحد', ['شهران', 'شهرين'], '%d أشهر', '%d شهرا', '%d شهر'],\n y : ['أقل من عام', 'عام واحد', ['عامان', 'عامين'], '%d أعوام', '%d عامًا', '%d عام']\n};\nvar pluralize = function (u) {\n return function (number, withoutSuffix, string, isFuture) {\n var f = pluralForm(number),\n str = plurals[u][pluralForm(number)];\n if (f === 2) {\n str = str[withoutSuffix ? 0 : 1];\n }\n return str.replace(/%d/i, number);\n };\n};\nvar months = [\n 'كانون الثاني يناير',\n 'شباط فبراير',\n 'آذار مارس',\n 'نيسان أبريل',\n 'أيار مايو',\n 'حزيران يونيو',\n 'تموز يوليو',\n 'آب أغسطس',\n 'أيلول سبتمبر',\n 'تشرين الأول أكتوبر',\n 'تشرين الثاني نوفمبر',\n 'كانون الأول ديسمبر'\n];\n\nvar ar = moment.defineLocale('ar', {\n months : months,\n monthsShort : months,\n weekdays : 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n weekdaysShort : 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),\n weekdaysMin : 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n weekdaysParseExact : true,\n longDateFormat : {\n LT : 'HH:mm',\n LTS : 'HH:mm:ss',\n L : 'D/\\u200FM/\\u200FYYYY',\n LL : 'D MMMM YYYY',\n LLL : 'D MMMM YYYY HH:mm',\n LLLL : 'dddd D MMMM YYYY HH:mm'\n },\n meridiemParse: /ص|م/,\n isPM : function (input) {\n return 'م' === input;\n },\n meridiem : function (hour, minute, isLower) {\n if (hour < 12) {\n return 'ص';\n } else {\n return 'م';\n }\n },\n calendar : {\n sameDay: '[اليوم عند الساعة] LT',\n nextDay: '[غدًا عند الساعة] LT',\n nextWeek: 'dddd [عند الساعة] LT',\n lastDay: '[أمس عند الساعة] LT',\n lastWeek: 'dddd [عند الساعة] LT',\n sameElse: 'L'\n },\n relativeTime : {\n future : 'بعد %s',\n past : 'منذ %s',\n s : pluralize('s'),\n m : pluralize('m'),\n mm : pluralize('m'),\n h : pluralize('h'),\n hh : pluralize('h'),\n d : pluralize('d'),\n dd : pluralize('d'),\n M : pluralize('M'),\n MM : pluralize('M'),\n y : pluralize('y'),\n yy : pluralize('y')\n },\n preparse: function (string) {\n return string.replace(/\\u200f/g, '').replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {\n return numberMap[match];\n }).replace(/،/g, ',');\n },\n postformat: function (string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n }).replace(/,/g, '،');\n },\n week : {\n dow : 6, // Saturday is the first day of the week.\n doy : 12 // The week that contains Jan 1st is the first week of the year.\n }\n});\n\nreturn ar;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/ar.js\n// module id = 378\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/ar.js?", + ); + + /***/ + }, + /* 379 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/moment/locale/az.js ***! + \*******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Azerbaijani [az]\n//! author : topchiyev : https://github.com/topchiyev\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar suffixes = {\n 1: '-inci',\n 5: '-inci',\n 8: '-inci',\n 70: '-inci',\n 80: '-inci',\n 2: '-nci',\n 7: '-nci',\n 20: '-nci',\n 50: '-nci',\n 3: '-üncü',\n 4: '-üncü',\n 100: '-üncü',\n 6: '-ncı',\n 9: '-uncu',\n 10: '-uncu',\n 30: '-uncu',\n 60: '-ıncı',\n 90: '-ıncı'\n};\n\nvar az = moment.defineLocale('az', {\n months : 'yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr'.split('_'),\n monthsShort : 'yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek'.split('_'),\n weekdays : 'Bazar_Bazar ertəsi_Çərşənbə axşamı_Çərşənbə_Cümə axşamı_Cümə_Şənbə'.split('_'),\n weekdaysShort : 'Baz_BzE_ÇAx_Çər_CAx_Cüm_Şən'.split('_'),\n weekdaysMin : 'Bz_BE_ÇA_Çə_CA_Cü_Şə'.split('_'),\n weekdaysParseExact : true,\n longDateFormat : {\n LT : 'HH:mm',\n LTS : 'HH:mm:ss',\n L : 'DD.MM.YYYY',\n LL : 'D MMMM YYYY',\n LLL : 'D MMMM YYYY HH:mm',\n LLLL : 'dddd, D MMMM YYYY HH:mm'\n },\n calendar : {\n sameDay : '[bugün saat] LT',\n nextDay : '[sabah saat] LT',\n nextWeek : '[gələn həftə] dddd [saat] LT',\n lastDay : '[dünən] LT',\n lastWeek : '[keçən həftə] dddd [saat] LT',\n sameElse : 'L'\n },\n relativeTime : {\n future : '%s sonra',\n past : '%s əvvəl',\n s : 'birneçə saniyyə',\n m : 'bir dəqiqə',\n mm : '%d dəqiqə',\n h : 'bir saat',\n hh : '%d saat',\n d : 'bir gün',\n dd : '%d gün',\n M : 'bir ay',\n MM : '%d ay',\n y : 'bir il',\n yy : '%d il'\n },\n meridiemParse: /gecə|səhər|gündüz|axşam/,\n isPM : function (input) {\n return /^(gündüz|axşam)$/.test(input);\n },\n meridiem : function (hour, minute, isLower) {\n if (hour < 4) {\n return 'gecə';\n } else if (hour < 12) {\n return 'səhər';\n } else if (hour < 17) {\n return 'gündüz';\n } else {\n return 'axşam';\n }\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-(ıncı|inci|nci|üncü|ncı|uncu)/,\n ordinal : function (number) {\n if (number === 0) { // special case for zero\n return number + '-ıncı';\n }\n var a = number % 10,\n b = number % 100 - a,\n c = number >= 100 ? 100 : null;\n return number + (suffixes[a] || suffixes[b] || suffixes[c]);\n },\n week : {\n dow : 1, // Monday is the first day of the week.\n doy : 7 // The week that contains Jan 1st is the first week of the year.\n }\n});\n\nreturn az;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/az.js\n// module id = 379\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/az.js?", + ); + + /***/ + }, + /* 380 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/moment/locale/be.js ***! + \*******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Belarusian [be]\n//! author : Dmitry Demidov : https://github.com/demidov91\n//! author: Praleska: http://praleska.pro/\n//! Author : Menelion Elensúle : https://github.com/Oire\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nfunction plural(word, num) {\n var forms = word.split('_');\n return num % 10 === 1 && num % 100 !== 11 ? forms[0] : (num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) ? forms[1] : forms[2]);\n}\nfunction relativeTimeWithPlural(number, withoutSuffix, key) {\n var format = {\n 'mm': withoutSuffix ? 'хвіліна_хвіліны_хвілін' : 'хвіліну_хвіліны_хвілін',\n 'hh': withoutSuffix ? 'гадзіна_гадзіны_гадзін' : 'гадзіну_гадзіны_гадзін',\n 'dd': 'дзень_дні_дзён',\n 'MM': 'месяц_месяцы_месяцаў',\n 'yy': 'год_гады_гадоў'\n };\n if (key === 'm') {\n return withoutSuffix ? 'хвіліна' : 'хвіліну';\n }\n else if (key === 'h') {\n return withoutSuffix ? 'гадзіна' : 'гадзіну';\n }\n else {\n return number + ' ' + plural(format[key], +number);\n }\n}\n\nvar be = moment.defineLocale('be', {\n months : {\n format: 'студзеня_лютага_сакавіка_красавіка_траўня_чэрвеня_ліпеня_жніўня_верасня_кастрычніка_лістапада_снежня'.split('_'),\n standalone: 'студзень_люты_сакавік_красавік_травень_чэрвень_ліпень_жнівень_верасень_кастрычнік_лістапад_снежань'.split('_')\n },\n monthsShort : 'студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж'.split('_'),\n weekdays : {\n format: 'нядзелю_панядзелак_аўторак_сераду_чацвер_пятніцу_суботу'.split('_'),\n standalone: 'нядзеля_панядзелак_аўторак_серада_чацвер_пятніца_субота'.split('_'),\n isFormat: /\\[ ?[Вв] ?(?:мінулую|наступную)? ?\\] ?dddd/\n },\n weekdaysShort : 'нд_пн_ат_ср_чц_пт_сб'.split('_'),\n weekdaysMin : 'нд_пн_ат_ср_чц_пт_сб'.split('_'),\n longDateFormat : {\n LT : 'HH:mm',\n LTS : 'HH:mm:ss',\n L : 'DD.MM.YYYY',\n LL : 'D MMMM YYYY г.',\n LLL : 'D MMMM YYYY г., HH:mm',\n LLLL : 'dddd, D MMMM YYYY г., HH:mm'\n },\n calendar : {\n sameDay: '[Сёння ў] LT',\n nextDay: '[Заўтра ў] LT',\n lastDay: '[Учора ў] LT',\n nextWeek: function () {\n return '[У] dddd [ў] LT';\n },\n lastWeek: function () {\n switch (this.day()) {\n case 0:\n case 3:\n case 5:\n case 6:\n return '[У мінулую] dddd [ў] LT';\n case 1:\n case 2:\n case 4:\n return '[У мінулы] dddd [ў] LT';\n }\n },\n sameElse: 'L'\n },\n relativeTime : {\n future : 'праз %s',\n past : '%s таму',\n s : 'некалькі секунд',\n m : relativeTimeWithPlural,\n mm : relativeTimeWithPlural,\n h : relativeTimeWithPlural,\n hh : relativeTimeWithPlural,\n d : 'дзень',\n dd : relativeTimeWithPlural,\n M : 'месяц',\n MM : relativeTimeWithPlural,\n y : 'год',\n yy : relativeTimeWithPlural\n },\n meridiemParse: /ночы|раніцы|дня|вечара/,\n isPM : function (input) {\n return /^(дня|вечара)$/.test(input);\n },\n meridiem : function (hour, minute, isLower) {\n if (hour < 4) {\n return 'ночы';\n } else if (hour < 12) {\n return 'раніцы';\n } else if (hour < 17) {\n return 'дня';\n } else {\n return 'вечара';\n }\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-(і|ы|га)/,\n ordinal: function (number, period) {\n switch (period) {\n case 'M':\n case 'd':\n case 'DDD':\n case 'w':\n case 'W':\n return (number % 10 === 2 || number % 10 === 3) && (number % 100 !== 12 && number % 100 !== 13) ? number + '-і' : number + '-ы';\n case 'D':\n return number + '-га';\n default:\n return number;\n }\n },\n week : {\n dow : 1, // Monday is the first day of the week.\n doy : 7 // The week that contains Jan 1st is the first week of the year.\n }\n});\n\nreturn be;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/be.js\n// module id = 380\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/be.js?", + ); + + /***/ + }, + /* 381 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/moment/locale/bg.js ***! + \*******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Bulgarian [bg]\n//! author : Krasen Borisov : https://github.com/kraz\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar bg = moment.defineLocale('bg', {\n months : 'януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември'.split('_'),\n monthsShort : 'янр_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек'.split('_'),\n weekdays : 'неделя_понеделник_вторник_сряда_четвъртък_петък_събота'.split('_'),\n weekdaysShort : 'нед_пон_вто_сря_чет_пет_съб'.split('_'),\n weekdaysMin : 'нд_пн_вт_ср_чт_пт_сб'.split('_'),\n longDateFormat : {\n LT : 'H:mm',\n LTS : 'H:mm:ss',\n L : 'D.MM.YYYY',\n LL : 'D MMMM YYYY',\n LLL : 'D MMMM YYYY H:mm',\n LLLL : 'dddd, D MMMM YYYY H:mm'\n },\n calendar : {\n sameDay : '[Днес в] LT',\n nextDay : '[Утре в] LT',\n nextWeek : 'dddd [в] LT',\n lastDay : '[Вчера в] LT',\n lastWeek : function () {\n switch (this.day()) {\n case 0:\n case 3:\n case 6:\n return '[В изминалата] dddd [в] LT';\n case 1:\n case 2:\n case 4:\n case 5:\n return '[В изминалия] dddd [в] LT';\n }\n },\n sameElse : 'L'\n },\n relativeTime : {\n future : 'след %s',\n past : 'преди %s',\n s : 'няколко секунди',\n m : 'минута',\n mm : '%d минути',\n h : 'час',\n hh : '%d часа',\n d : 'ден',\n dd : '%d дни',\n M : 'месец',\n MM : '%d месеца',\n y : 'година',\n yy : '%d години'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-(ев|ен|ти|ви|ри|ми)/,\n ordinal : function (number) {\n var lastDigit = number % 10,\n last2Digits = number % 100;\n if (number === 0) {\n return number + '-ев';\n } else if (last2Digits === 0) {\n return number + '-ен';\n } else if (last2Digits > 10 && last2Digits < 20) {\n return number + '-ти';\n } else if (lastDigit === 1) {\n return number + '-ви';\n } else if (lastDigit === 2) {\n return number + '-ри';\n } else if (lastDigit === 7 || lastDigit === 8) {\n return number + '-ми';\n } else {\n return number + '-ти';\n }\n },\n week : {\n dow : 1, // Monday is the first day of the week.\n doy : 7 // The week that contains Jan 1st is the first week of the year.\n }\n});\n\nreturn bg;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/bg.js\n// module id = 381\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/bg.js?", + ); + + /***/ + }, + /* 382 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/moment/locale/bn.js ***! + \*******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Bengali [bn]\n//! author : Kaushik Gandhi : https://github.com/kaushikgandhi\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar symbolMap = {\n '1': '১',\n '2': '২',\n '3': '৩',\n '4': '৪',\n '5': '৫',\n '6': '৬',\n '7': '৭',\n '8': '৮',\n '9': '৯',\n '0': '০'\n};\nvar numberMap = {\n '১': '1',\n '২': '2',\n '৩': '3',\n '৪': '4',\n '৫': '5',\n '৬': '6',\n '৭': '7',\n '৮': '8',\n '৯': '9',\n '০': '0'\n};\n\nvar bn = moment.defineLocale('bn', {\n months : 'জানুয়ারী_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর'.split('_'),\n monthsShort : 'জানু_ফেব_মার্চ_এপ্র_মে_জুন_জুল_আগ_সেপ্ট_অক্টো_নভে_ডিসে'.split('_'),\n weekdays : 'রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার'.split('_'),\n weekdaysShort : 'রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি'.split('_'),\n weekdaysMin : 'রবি_সোম_মঙ্গ_বুধ_বৃহঃ_শুক্র_শনি'.split('_'),\n longDateFormat : {\n LT : 'A h:mm সময়',\n LTS : 'A h:mm:ss সময়',\n L : 'DD/MM/YYYY',\n LL : 'D MMMM YYYY',\n LLL : 'D MMMM YYYY, A h:mm সময়',\n LLLL : 'dddd, D MMMM YYYY, A h:mm সময়'\n },\n calendar : {\n sameDay : '[আজ] LT',\n nextDay : '[আগামীকাল] LT',\n nextWeek : 'dddd, LT',\n lastDay : '[গতকাল] LT',\n lastWeek : '[গত] dddd, LT',\n sameElse : 'L'\n },\n relativeTime : {\n future : '%s পরে',\n past : '%s আগে',\n s : 'কয়েক সেকেন্ড',\n m : 'এক মিনিট',\n mm : '%d মিনিট',\n h : 'এক ঘন্টা',\n hh : '%d ঘন্টা',\n d : 'এক দিন',\n dd : '%d দিন',\n M : 'এক মাস',\n MM : '%d মাস',\n y : 'এক বছর',\n yy : '%d বছর'\n },\n preparse: function (string) {\n return string.replace(/[১২৩৪৫৬৭৮৯০]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function (string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n meridiemParse: /রাত|সকাল|দুপুর|বিকাল|রাত/,\n meridiemHour : function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if ((meridiem === 'রাত' && hour >= 4) ||\n (meridiem === 'দুপুর' && hour < 5) ||\n meridiem === 'বিকাল') {\n return hour + 12;\n } else {\n return hour;\n }\n },\n meridiem : function (hour, minute, isLower) {\n if (hour < 4) {\n return 'রাত';\n } else if (hour < 10) {\n return 'সকাল';\n } else if (hour < 17) {\n return 'দুপুর';\n } else if (hour < 20) {\n return 'বিকাল';\n } else {\n return 'রাত';\n }\n },\n week : {\n dow : 0, // Sunday is the first day of the week.\n doy : 6 // The week that contains Jan 1st is the first week of the year.\n }\n});\n\nreturn bn;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/bn.js\n// module id = 382\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/bn.js?", + ); + + /***/ + }, + /* 383 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/moment/locale/bo.js ***! + \*******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Tibetan [bo]\n//! author : Thupten N. Chakrishar : https://github.com/vajradog\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar symbolMap = {\n '1': '༡',\n '2': '༢',\n '3': '༣',\n '4': '༤',\n '5': '༥',\n '6': '༦',\n '7': '༧',\n '8': '༨',\n '9': '༩',\n '0': '༠'\n};\nvar numberMap = {\n '༡': '1',\n '༢': '2',\n '༣': '3',\n '༤': '4',\n '༥': '5',\n '༦': '6',\n '༧': '7',\n '༨': '8',\n '༩': '9',\n '༠': '0'\n};\n\nvar bo = moment.defineLocale('bo', {\n months : 'ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ'.split('_'),\n monthsShort : 'ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ'.split('_'),\n weekdays : 'གཟའ་ཉི་མ་_གཟའ་ཟླ་བ་_གཟའ་མིག་དམར་_གཟའ་ལྷག་པ་_གཟའ་ཕུར་བུ_གཟའ་པ་སངས་_གཟའ་སྤེན་པ་'.split('_'),\n weekdaysShort : 'ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་'.split('_'),\n weekdaysMin : 'ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་'.split('_'),\n longDateFormat : {\n LT : 'A h:mm',\n LTS : 'A h:mm:ss',\n L : 'DD/MM/YYYY',\n LL : 'D MMMM YYYY',\n LLL : 'D MMMM YYYY, A h:mm',\n LLLL : 'dddd, D MMMM YYYY, A h:mm'\n },\n calendar : {\n sameDay : '[དི་རིང] LT',\n nextDay : '[སང་ཉིན] LT',\n nextWeek : '[བདུན་ཕྲག་རྗེས་མ], LT',\n lastDay : '[ཁ་སང] LT',\n lastWeek : '[བདུན་ཕྲག་མཐའ་མ] dddd, LT',\n sameElse : 'L'\n },\n relativeTime : {\n future : '%s ལ་',\n past : '%s སྔན་ལ',\n s : 'ལམ་སང',\n m : 'སྐར་མ་གཅིག',\n mm : '%d སྐར་མ',\n h : 'ཆུ་ཚོད་གཅིག',\n hh : '%d ཆུ་ཚོད',\n d : 'ཉིན་གཅིག',\n dd : '%d ཉིན་',\n M : 'ཟླ་བ་གཅིག',\n MM : '%d ཟླ་བ',\n y : 'ལོ་གཅིག',\n yy : '%d ལོ'\n },\n preparse: function (string) {\n return string.replace(/[༡༢༣༤༥༦༧༨༩༠]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function (string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n meridiemParse: /མཚན་མོ|ཞོགས་ཀས|ཉིན་གུང|དགོང་དག|མཚན་མོ/,\n meridiemHour : function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if ((meridiem === 'མཚན་མོ' && hour >= 4) ||\n (meridiem === 'ཉིན་གུང' && hour < 5) ||\n meridiem === 'དགོང་དག') {\n return hour + 12;\n } else {\n return hour;\n }\n },\n meridiem : function (hour, minute, isLower) {\n if (hour < 4) {\n return 'མཚན་མོ';\n } else if (hour < 10) {\n return 'ཞོགས་ཀས';\n } else if (hour < 17) {\n return 'ཉིན་གུང';\n } else if (hour < 20) {\n return 'དགོང་དག';\n } else {\n return 'མཚན་མོ';\n }\n },\n week : {\n dow : 0, // Sunday is the first day of the week.\n doy : 6 // The week that contains Jan 1st is the first week of the year.\n }\n});\n\nreturn bo;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/bo.js\n// module id = 383\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/bo.js?", + ); + + /***/ + }, + /* 384 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/moment/locale/br.js ***! + \*******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Breton [br]\n//! author : Jean-Baptiste Le Duigou : https://github.com/jbleduigou\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nfunction relativeTimeWithMutation(number, withoutSuffix, key) {\n var format = {\n 'mm': 'munutenn',\n 'MM': 'miz',\n 'dd': 'devezh'\n };\n return number + ' ' + mutation(format[key], number);\n}\nfunction specialMutationForYears(number) {\n switch (lastNumber(number)) {\n case 1:\n case 3:\n case 4:\n case 5:\n case 9:\n return number + ' bloaz';\n default:\n return number + ' vloaz';\n }\n}\nfunction lastNumber(number) {\n if (number > 9) {\n return lastNumber(number % 10);\n }\n return number;\n}\nfunction mutation(text, number) {\n if (number === 2) {\n return softMutation(text);\n }\n return text;\n}\nfunction softMutation(text) {\n var mutationTable = {\n 'm': 'v',\n 'b': 'v',\n 'd': 'z'\n };\n if (mutationTable[text.charAt(0)] === undefined) {\n return text;\n }\n return mutationTable[text.charAt(0)] + text.substring(1);\n}\n\nvar br = moment.defineLocale('br', {\n months : 'Genver_C\\'hwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu'.split('_'),\n monthsShort : 'Gen_C\\'hwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker'.split('_'),\n weekdays : 'Sul_Lun_Meurzh_Merc\\'her_Yaou_Gwener_Sadorn'.split('_'),\n weekdaysShort : 'Sul_Lun_Meu_Mer_Yao_Gwe_Sad'.split('_'),\n weekdaysMin : 'Su_Lu_Me_Mer_Ya_Gw_Sa'.split('_'),\n weekdaysParseExact : true,\n longDateFormat : {\n LT : 'h[e]mm A',\n LTS : 'h[e]mm:ss A',\n L : 'DD/MM/YYYY',\n LL : 'D [a viz] MMMM YYYY',\n LLL : 'D [a viz] MMMM YYYY h[e]mm A',\n LLLL : 'dddd, D [a viz] MMMM YYYY h[e]mm A'\n },\n calendar : {\n sameDay : '[Hiziv da] LT',\n nextDay : '[Warc\\'hoazh da] LT',\n nextWeek : 'dddd [da] LT',\n lastDay : '[Dec\\'h da] LT',\n lastWeek : 'dddd [paset da] LT',\n sameElse : 'L'\n },\n relativeTime : {\n future : 'a-benn %s',\n past : '%s \\'zo',\n s : 'un nebeud segondennoù',\n m : 'ur vunutenn',\n mm : relativeTimeWithMutation,\n h : 'un eur',\n hh : '%d eur',\n d : 'un devezh',\n dd : relativeTimeWithMutation,\n M : 'ur miz',\n MM : relativeTimeWithMutation,\n y : 'ur bloaz',\n yy : specialMutationForYears\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(añ|vet)/,\n ordinal : function (number) {\n var output = (number === 1) ? 'añ' : 'vet';\n return number + output;\n },\n week : {\n dow : 1, // Monday is the first day of the week.\n doy : 4 // The week that contains Jan 4th is the first week of the year.\n }\n});\n\nreturn br;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/br.js\n// module id = 384\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/br.js?", + ); + + /***/ + }, + /* 385 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/moment/locale/bs.js ***! + \*******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Bosnian [bs]\n//! author : Nedim Cholich : https://github.com/frontyard\n//! based on (hr) translation by Bojan Marković\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nfunction translate(number, withoutSuffix, key) {\n var result = number + ' ';\n switch (key) {\n case 'm':\n return withoutSuffix ? 'jedna minuta' : 'jedne minute';\n case 'mm':\n if (number === 1) {\n result += 'minuta';\n } else if (number === 2 || number === 3 || number === 4) {\n result += 'minute';\n } else {\n result += 'minuta';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'jedan sat' : 'jednog sata';\n case 'hh':\n if (number === 1) {\n result += 'sat';\n } else if (number === 2 || number === 3 || number === 4) {\n result += 'sata';\n } else {\n result += 'sati';\n }\n return result;\n case 'dd':\n if (number === 1) {\n result += 'dan';\n } else {\n result += 'dana';\n }\n return result;\n case 'MM':\n if (number === 1) {\n result += 'mjesec';\n } else if (number === 2 || number === 3 || number === 4) {\n result += 'mjeseca';\n } else {\n result += 'mjeseci';\n }\n return result;\n case 'yy':\n if (number === 1) {\n result += 'godina';\n } else if (number === 2 || number === 3 || number === 4) {\n result += 'godine';\n } else {\n result += 'godina';\n }\n return result;\n }\n}\n\nvar bs = moment.defineLocale('bs', {\n months : 'januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar'.split('_'),\n monthsShort : 'jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.'.split('_'),\n monthsParseExact: true,\n weekdays : 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split('_'),\n weekdaysShort : 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),\n weekdaysMin : 'ne_po_ut_sr_če_pe_su'.split('_'),\n weekdaysParseExact : true,\n longDateFormat : {\n LT : 'H:mm',\n LTS : 'H:mm:ss',\n L : 'DD.MM.YYYY',\n LL : 'D. MMMM YYYY',\n LLL : 'D. MMMM YYYY H:mm',\n LLLL : 'dddd, D. MMMM YYYY H:mm'\n },\n calendar : {\n sameDay : '[danas u] LT',\n nextDay : '[sutra u] LT',\n nextWeek : function () {\n switch (this.day()) {\n case 0:\n return '[u] [nedjelju] [u] LT';\n case 3:\n return '[u] [srijedu] [u] LT';\n case 6:\n return '[u] [subotu] [u] LT';\n case 1:\n case 2:\n case 4:\n case 5:\n return '[u] dddd [u] LT';\n }\n },\n lastDay : '[jučer u] LT',\n lastWeek : function () {\n switch (this.day()) {\n case 0:\n case 3:\n return '[prošlu] dddd [u] LT';\n case 6:\n return '[prošle] [subote] [u] LT';\n case 1:\n case 2:\n case 4:\n case 5:\n return '[prošli] dddd [u] LT';\n }\n },\n sameElse : 'L'\n },\n relativeTime : {\n future : 'za %s',\n past : 'prije %s',\n s : 'par sekundi',\n m : translate,\n mm : translate,\n h : translate,\n hh : translate,\n d : 'dan',\n dd : translate,\n M : 'mjesec',\n MM : translate,\n y : 'godinu',\n yy : translate\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal : '%d.',\n week : {\n dow : 1, // Monday is the first day of the week.\n doy : 7 // The week that contains Jan 1st is the first week of the year.\n }\n});\n\nreturn bs;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/bs.js\n// module id = 385\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/bs.js?", + ); + + /***/ + }, + /* 386 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/moment/locale/ca.js ***! + \*******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Catalan [ca]\n//! author : Juan G. Hurtado : https://github.com/juanghurtado\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar ca = moment.defineLocale('ca', {\n months : {\n standalone: 'gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre'.split('_'),\n format: 'de gener_de febrer_de març_d\\'abril_de maig_de juny_de juliol_d\\'agost_de setembre_d\\'octubre_de novembre_de desembre'.split('_'),\n isFormat: /D[oD]?(\\s)+MMMM/\n },\n monthsShort : 'gen._febr._març_abr._maig_juny_jul._ag._set._oct._nov._des.'.split('_'),\n monthsParseExact : true,\n weekdays : 'diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte'.split('_'),\n weekdaysShort : 'dg._dl._dt._dc._dj._dv._ds.'.split('_'),\n weekdaysMin : 'Dg_Dl_Dt_Dc_Dj_Dv_Ds'.split('_'),\n weekdaysParseExact : true,\n longDateFormat : {\n LT : 'H:mm',\n LTS : 'H:mm:ss',\n L : 'DD/MM/YYYY',\n LL : '[el] D MMMM [de] YYYY',\n ll : 'D MMM YYYY',\n LLL : '[el] D MMMM [de] YYYY [a les] H:mm',\n lll : 'D MMM YYYY, H:mm',\n LLLL : '[el] dddd D MMMM [de] YYYY [a les] H:mm',\n llll : 'ddd D MMM YYYY, H:mm'\n },\n calendar : {\n sameDay : function () {\n return '[avui a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT';\n },\n nextDay : function () {\n return '[demà a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT';\n },\n nextWeek : function () {\n return 'dddd [a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT';\n },\n lastDay : function () {\n return '[ahir a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT';\n },\n lastWeek : function () {\n return '[el] dddd [passat a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT';\n },\n sameElse : 'L'\n },\n relativeTime : {\n future : 'd\\'aquí %s',\n past : 'fa %s',\n s : 'uns segons',\n m : 'un minut',\n mm : '%d minuts',\n h : 'una hora',\n hh : '%d hores',\n d : 'un dia',\n dd : '%d dies',\n M : 'un mes',\n MM : '%d mesos',\n y : 'un any',\n yy : '%d anys'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(r|n|t|è|a)/,\n ordinal : function (number, period) {\n var output = (number === 1) ? 'r' :\n (number === 2) ? 'n' :\n (number === 3) ? 'r' :\n (number === 4) ? 't' : 'è';\n if (period === 'w' || period === 'W') {\n output = 'a';\n }\n return number + output;\n },\n week : {\n dow : 1, // Monday is the first day of the week.\n doy : 4 // The week that contains Jan 4th is the first week of the year.\n }\n});\n\nreturn ca;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/ca.js\n// module id = 386\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/ca.js?", + ); + + /***/ + }, + /* 387 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/moment/locale/cs.js ***! + \*******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Czech [cs]\n//! author : petrbela : https://github.com/petrbela\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar months = 'leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec'.split('_');\nvar monthsShort = 'led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro'.split('_');\nfunction plural(n) {\n return (n > 1) && (n < 5) && (~~(n / 10) !== 1);\n}\nfunction translate(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's': // a few seconds / in a few seconds / a few seconds ago\n return (withoutSuffix || isFuture) ? 'pár sekund' : 'pár sekundami';\n case 'm': // a minute / in a minute / a minute ago\n return withoutSuffix ? 'minuta' : (isFuture ? 'minutu' : 'minutou');\n case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'minuty' : 'minut');\n } else {\n return result + 'minutami';\n }\n break;\n case 'h': // an hour / in an hour / an hour ago\n return withoutSuffix ? 'hodina' : (isFuture ? 'hodinu' : 'hodinou');\n case 'hh': // 9 hours / in 9 hours / 9 hours ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'hodiny' : 'hodin');\n } else {\n return result + 'hodinami';\n }\n break;\n case 'd': // a day / in a day / a day ago\n return (withoutSuffix || isFuture) ? 'den' : 'dnem';\n case 'dd': // 9 days / in 9 days / 9 days ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'dny' : 'dní');\n } else {\n return result + 'dny';\n }\n break;\n case 'M': // a month / in a month / a month ago\n return (withoutSuffix || isFuture) ? 'měsíc' : 'měsícem';\n case 'MM': // 9 months / in 9 months / 9 months ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'měsíce' : 'měsíců');\n } else {\n return result + 'měsíci';\n }\n break;\n case 'y': // a year / in a year / a year ago\n return (withoutSuffix || isFuture) ? 'rok' : 'rokem';\n case 'yy': // 9 years / in 9 years / 9 years ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'roky' : 'let');\n } else {\n return result + 'lety';\n }\n break;\n }\n}\n\nvar cs = moment.defineLocale('cs', {\n months : months,\n monthsShort : monthsShort,\n monthsParse : (function (months, monthsShort) {\n var i, _monthsParse = [];\n for (i = 0; i < 12; i++) {\n // use custom parser to solve problem with July (červenec)\n _monthsParse[i] = new RegExp('^' + months[i] + '$|^' + monthsShort[i] + '$', 'i');\n }\n return _monthsParse;\n }(months, monthsShort)),\n shortMonthsParse : (function (monthsShort) {\n var i, _shortMonthsParse = [];\n for (i = 0; i < 12; i++) {\n _shortMonthsParse[i] = new RegExp('^' + monthsShort[i] + '$', 'i');\n }\n return _shortMonthsParse;\n }(monthsShort)),\n longMonthsParse : (function (months) {\n var i, _longMonthsParse = [];\n for (i = 0; i < 12; i++) {\n _longMonthsParse[i] = new RegExp('^' + months[i] + '$', 'i');\n }\n return _longMonthsParse;\n }(months)),\n weekdays : 'neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota'.split('_'),\n weekdaysShort : 'ne_po_út_st_čt_pá_so'.split('_'),\n weekdaysMin : 'ne_po_út_st_čt_pá_so'.split('_'),\n longDateFormat : {\n LT: 'H:mm',\n LTS : 'H:mm:ss',\n L : 'DD.MM.YYYY',\n LL : 'D. MMMM YYYY',\n LLL : 'D. MMMM YYYY H:mm',\n LLLL : 'dddd D. MMMM YYYY H:mm',\n l : 'D. M. YYYY'\n },\n calendar : {\n sameDay: '[dnes v] LT',\n nextDay: '[zítra v] LT',\n nextWeek: function () {\n switch (this.day()) {\n case 0:\n return '[v neděli v] LT';\n case 1:\n case 2:\n return '[v] dddd [v] LT';\n case 3:\n return '[ve středu v] LT';\n case 4:\n return '[ve čtvrtek v] LT';\n case 5:\n return '[v pátek v] LT';\n case 6:\n return '[v sobotu v] LT';\n }\n },\n lastDay: '[včera v] LT',\n lastWeek: function () {\n switch (this.day()) {\n case 0:\n return '[minulou neděli v] LT';\n case 1:\n case 2:\n return '[minulé] dddd [v] LT';\n case 3:\n return '[minulou středu v] LT';\n case 4:\n case 5:\n return '[minulý] dddd [v] LT';\n case 6:\n return '[minulou sobotu v] LT';\n }\n },\n sameElse: 'L'\n },\n relativeTime : {\n future : 'za %s',\n past : 'před %s',\n s : translate,\n m : translate,\n mm : translate,\n h : translate,\n hh : translate,\n d : translate,\n dd : translate,\n M : translate,\n MM : translate,\n y : translate,\n yy : translate\n },\n dayOfMonthOrdinalParse : /\\d{1,2}\\./,\n ordinal : '%d.',\n week : {\n dow : 1, // Monday is the first day of the week.\n doy : 4 // The week that contains Jan 4th is the first week of the year.\n }\n});\n\nreturn cs;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/cs.js\n// module id = 387\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/cs.js?", + ); + + /***/ + }, + /* 388 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/moment/locale/cv.js ***! + \*******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Chuvash [cv]\n//! author : Anatoly Mironov : https://github.com/mirontoli\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar cv = moment.defineLocale('cv', {\n months : 'кӑрлач_нарӑс_пуш_ака_май_ҫӗртме_утӑ_ҫурла_авӑн_юпа_чӳк_раштав'.split('_'),\n monthsShort : 'кӑр_нар_пуш_ака_май_ҫӗр_утӑ_ҫур_авн_юпа_чӳк_раш'.split('_'),\n weekdays : 'вырсарникун_тунтикун_ытларикун_юнкун_кӗҫнерникун_эрнекун_шӑматкун'.split('_'),\n weekdaysShort : 'выр_тун_ытл_юн_кӗҫ_эрн_шӑм'.split('_'),\n weekdaysMin : 'вр_тн_ыт_юн_кҫ_эр_шм'.split('_'),\n longDateFormat : {\n LT : 'HH:mm',\n LTS : 'HH:mm:ss',\n L : 'DD-MM-YYYY',\n LL : 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ]',\n LLL : 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm',\n LLLL : 'dddd, YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm'\n },\n calendar : {\n sameDay: '[Паян] LT [сехетре]',\n nextDay: '[Ыран] LT [сехетре]',\n lastDay: '[Ӗнер] LT [сехетре]',\n nextWeek: '[Ҫитес] dddd LT [сехетре]',\n lastWeek: '[Иртнӗ] dddd LT [сехетре]',\n sameElse: 'L'\n },\n relativeTime : {\n future : function (output) {\n var affix = /сехет$/i.exec(output) ? 'рен' : /ҫул$/i.exec(output) ? 'тан' : 'ран';\n return output + affix;\n },\n past : '%s каялла',\n s : 'пӗр-ик ҫеккунт',\n m : 'пӗр минут',\n mm : '%d минут',\n h : 'пӗр сехет',\n hh : '%d сехет',\n d : 'пӗр кун',\n dd : '%d кун',\n M : 'пӗр уйӑх',\n MM : '%d уйӑх',\n y : 'пӗр ҫул',\n yy : '%d ҫул'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-мӗш/,\n ordinal : '%d-мӗш',\n week : {\n dow : 1, // Monday is the first day of the week.\n doy : 7 // The week that contains Jan 1st is the first week of the year.\n }\n});\n\nreturn cv;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/cv.js\n// module id = 388\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/cv.js?", + ); + + /***/ + }, + /* 389 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/moment/locale/cy.js ***! + \*******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Welsh [cy]\n//! author : Robert Allen : https://github.com/robgallen\n//! author : https://github.com/ryangreaves\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar cy = moment.defineLocale('cy', {\n months: 'Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr'.split('_'),\n monthsShort: 'Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag'.split('_'),\n weekdays: 'Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn'.split('_'),\n weekdaysShort: 'Sul_Llun_Maw_Mer_Iau_Gwe_Sad'.split('_'),\n weekdaysMin: 'Su_Ll_Ma_Me_Ia_Gw_Sa'.split('_'),\n weekdaysParseExact : true,\n // time formats are the same as en-gb\n longDateFormat: {\n LT: 'HH:mm',\n LTS : 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[Heddiw am] LT',\n nextDay: '[Yfory am] LT',\n nextWeek: 'dddd [am] LT',\n lastDay: '[Ddoe am] LT',\n lastWeek: 'dddd [diwethaf am] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'mewn %s',\n past: '%s yn ôl',\n s: 'ychydig eiliadau',\n m: 'munud',\n mm: '%d munud',\n h: 'awr',\n hh: '%d awr',\n d: 'diwrnod',\n dd: '%d diwrnod',\n M: 'mis',\n MM: '%d mis',\n y: 'blwyddyn',\n yy: '%d flynedd'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(fed|ain|af|il|ydd|ed|eg)/,\n // traditional ordinal numbers above 31 are not commonly used in colloquial Welsh\n ordinal: function (number) {\n var b = number,\n output = '',\n lookup = [\n '', 'af', 'il', 'ydd', 'ydd', 'ed', 'ed', 'ed', 'fed', 'fed', 'fed', // 1af to 10fed\n 'eg', 'fed', 'eg', 'eg', 'fed', 'eg', 'eg', 'fed', 'eg', 'fed' // 11eg to 20fed\n ];\n if (b > 20) {\n if (b === 40 || b === 50 || b === 60 || b === 80 || b === 100) {\n output = 'fed'; // not 30ain, 70ain or 90ain\n } else {\n output = 'ain';\n }\n } else if (b > 0) {\n output = lookup[b];\n }\n return number + output;\n },\n week : {\n dow : 1, // Monday is the first day of the week.\n doy : 4 // The week that contains Jan 4th is the first week of the year.\n }\n});\n\nreturn cy;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/cy.js\n// module id = 389\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/cy.js?", + ); + + /***/ + }, + /* 390 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/moment/locale/da.js ***! + \*******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Danish [da]\n//! author : Ulrik Nielsen : https://github.com/mrbase\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar da = moment.defineLocale('da', {\n months : 'januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december'.split('_'),\n monthsShort : 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'),\n weekdays : 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'),\n weekdaysShort : 'søn_man_tir_ons_tor_fre_lør'.split('_'),\n weekdaysMin : 'sø_ma_ti_on_to_fr_lø'.split('_'),\n longDateFormat : {\n LT : 'HH:mm',\n LTS : 'HH:mm:ss',\n L : 'DD/MM/YYYY',\n LL : 'D. MMMM YYYY',\n LLL : 'D. MMMM YYYY HH:mm',\n LLLL : 'dddd [d.] D. MMMM YYYY [kl.] HH:mm'\n },\n calendar : {\n sameDay : '[i dag kl.] LT',\n nextDay : '[i morgen kl.] LT',\n nextWeek : 'på dddd [kl.] LT',\n lastDay : '[i går kl.] LT',\n lastWeek : '[i] dddd[s kl.] LT',\n sameElse : 'L'\n },\n relativeTime : {\n future : 'om %s',\n past : '%s siden',\n s : 'få sekunder',\n m : 'et minut',\n mm : '%d minutter',\n h : 'en time',\n hh : '%d timer',\n d : 'en dag',\n dd : '%d dage',\n M : 'en måned',\n MM : '%d måneder',\n y : 'et år',\n yy : '%d år'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal : '%d.',\n week : {\n dow : 1, // Monday is the first day of the week.\n doy : 4 // The week that contains Jan 4th is the first week of the year.\n }\n});\n\nreturn da;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/da.js\n// module id = 390\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/da.js?", + ); + + /***/ + }, + /* 391 */ + /* unknown exports provided */ + /* all exports used */ + /*!**********************************!*\ + !*** ./~/moment/locale/de-at.js ***! + \**********************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : German (Austria) [de-at]\n//! author : lluchs : https://github.com/lluchs\n//! author: Menelion Elensúle: https://github.com/Oire\n//! author : Martin Groller : https://github.com/MadMG\n//! author : Mikolaj Dadela : https://github.com/mik01aj\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nfunction processRelativeTime(number, withoutSuffix, key, isFuture) {\n var format = {\n 'm': ['eine Minute', 'einer Minute'],\n 'h': ['eine Stunde', 'einer Stunde'],\n 'd': ['ein Tag', 'einem Tag'],\n 'dd': [number + ' Tage', number + ' Tagen'],\n 'M': ['ein Monat', 'einem Monat'],\n 'MM': [number + ' Monate', number + ' Monaten'],\n 'y': ['ein Jahr', 'einem Jahr'],\n 'yy': [number + ' Jahre', number + ' Jahren']\n };\n return withoutSuffix ? format[key][0] : format[key][1];\n}\n\nvar deAt = moment.defineLocale('de-at', {\n months : 'Jänner_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'),\n monthsShort : 'Jän._Febr._Mrz._Apr._Mai_Jun._Jul._Aug._Sept._Okt._Nov._Dez.'.split('_'),\n monthsParseExact : true,\n weekdays : 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split('_'),\n weekdaysShort : 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'),\n weekdaysMin : 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),\n weekdaysParseExact : true,\n longDateFormat : {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L : 'DD.MM.YYYY',\n LL : 'D. MMMM YYYY',\n LLL : 'D. MMMM YYYY HH:mm',\n LLLL : 'dddd, D. MMMM YYYY HH:mm'\n },\n calendar : {\n sameDay: '[heute um] LT [Uhr]',\n sameElse: 'L',\n nextDay: '[morgen um] LT [Uhr]',\n nextWeek: 'dddd [um] LT [Uhr]',\n lastDay: '[gestern um] LT [Uhr]',\n lastWeek: '[letzten] dddd [um] LT [Uhr]'\n },\n relativeTime : {\n future : 'in %s',\n past : 'vor %s',\n s : 'ein paar Sekunden',\n m : processRelativeTime,\n mm : '%d Minuten',\n h : processRelativeTime,\n hh : '%d Stunden',\n d : processRelativeTime,\n dd : processRelativeTime,\n M : processRelativeTime,\n MM : processRelativeTime,\n y : processRelativeTime,\n yy : processRelativeTime\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal : '%d.',\n week : {\n dow : 1, // Monday is the first day of the week.\n doy : 4 // The week that contains Jan 4th is the first week of the year.\n }\n});\n\nreturn deAt;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/de-at.js\n// module id = 391\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/de-at.js?", + ); + + /***/ + }, + /* 392 */ + /* unknown exports provided */ + /* all exports used */ + /*!**********************************!*\ + !*** ./~/moment/locale/de-ch.js ***! + \**********************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : German (Switzerland) [de-ch]\n//! author : sschueller : https://github.com/sschueller\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\n// based on: https://www.bk.admin.ch/dokumentation/sprachen/04915/05016/index.html?lang=de#\n\nfunction processRelativeTime(number, withoutSuffix, key, isFuture) {\n var format = {\n 'm': ['eine Minute', 'einer Minute'],\n 'h': ['eine Stunde', 'einer Stunde'],\n 'd': ['ein Tag', 'einem Tag'],\n 'dd': [number + ' Tage', number + ' Tagen'],\n 'M': ['ein Monat', 'einem Monat'],\n 'MM': [number + ' Monate', number + ' Monaten'],\n 'y': ['ein Jahr', 'einem Jahr'],\n 'yy': [number + ' Jahre', number + ' Jahren']\n };\n return withoutSuffix ? format[key][0] : format[key][1];\n}\n\nvar deCh = moment.defineLocale('de-ch', {\n months : 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'),\n monthsShort : 'Jan._Febr._März_April_Mai_Juni_Juli_Aug._Sept._Okt._Nov._Dez.'.split('_'),\n monthsParseExact : true,\n weekdays : 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split('_'),\n weekdaysShort : 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),\n weekdaysMin : 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),\n weekdaysParseExact : true,\n longDateFormat : {\n LT: 'HH.mm',\n LTS: 'HH.mm.ss',\n L : 'DD.MM.YYYY',\n LL : 'D. MMMM YYYY',\n LLL : 'D. MMMM YYYY HH.mm',\n LLLL : 'dddd, D. MMMM YYYY HH.mm'\n },\n calendar : {\n sameDay: '[heute um] LT [Uhr]',\n sameElse: 'L',\n nextDay: '[morgen um] LT [Uhr]',\n nextWeek: 'dddd [um] LT [Uhr]',\n lastDay: '[gestern um] LT [Uhr]',\n lastWeek: '[letzten] dddd [um] LT [Uhr]'\n },\n relativeTime : {\n future : 'in %s',\n past : 'vor %s',\n s : 'ein paar Sekunden',\n m : processRelativeTime,\n mm : '%d Minuten',\n h : processRelativeTime,\n hh : '%d Stunden',\n d : processRelativeTime,\n dd : processRelativeTime,\n M : processRelativeTime,\n MM : processRelativeTime,\n y : processRelativeTime,\n yy : processRelativeTime\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal : '%d.',\n week : {\n dow : 1, // Monday is the first day of the week.\n doy : 4 // The week that contains Jan 4th is the first week of the year.\n }\n});\n\nreturn deCh;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/de-ch.js\n// module id = 392\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/de-ch.js?", + ); + + /***/ + }, + /* 393 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/moment/locale/de.js ***! + \*******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : German [de]\n//! author : lluchs : https://github.com/lluchs\n//! author: Menelion Elensúle: https://github.com/Oire\n//! author : Mikolaj Dadela : https://github.com/mik01aj\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nfunction processRelativeTime(number, withoutSuffix, key, isFuture) {\n var format = {\n 'm': ['eine Minute', 'einer Minute'],\n 'h': ['eine Stunde', 'einer Stunde'],\n 'd': ['ein Tag', 'einem Tag'],\n 'dd': [number + ' Tage', number + ' Tagen'],\n 'M': ['ein Monat', 'einem Monat'],\n 'MM': [number + ' Monate', number + ' Monaten'],\n 'y': ['ein Jahr', 'einem Jahr'],\n 'yy': [number + ' Jahre', number + ' Jahren']\n };\n return withoutSuffix ? format[key][0] : format[key][1];\n}\n\nvar de = moment.defineLocale('de', {\n months : 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'),\n monthsShort : 'Jan._Febr._Mrz._Apr._Mai_Jun._Jul._Aug._Sept._Okt._Nov._Dez.'.split('_'),\n monthsParseExact : true,\n weekdays : 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split('_'),\n weekdaysShort : 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'),\n weekdaysMin : 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),\n weekdaysParseExact : true,\n longDateFormat : {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L : 'DD.MM.YYYY',\n LL : 'D. MMMM YYYY',\n LLL : 'D. MMMM YYYY HH:mm',\n LLLL : 'dddd, D. MMMM YYYY HH:mm'\n },\n calendar : {\n sameDay: '[heute um] LT [Uhr]',\n sameElse: 'L',\n nextDay: '[morgen um] LT [Uhr]',\n nextWeek: 'dddd [um] LT [Uhr]',\n lastDay: '[gestern um] LT [Uhr]',\n lastWeek: '[letzten] dddd [um] LT [Uhr]'\n },\n relativeTime : {\n future : 'in %s',\n past : 'vor %s',\n s : 'ein paar Sekunden',\n m : processRelativeTime,\n mm : '%d Minuten',\n h : processRelativeTime,\n hh : '%d Stunden',\n d : processRelativeTime,\n dd : processRelativeTime,\n M : processRelativeTime,\n MM : processRelativeTime,\n y : processRelativeTime,\n yy : processRelativeTime\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal : '%d.',\n week : {\n dow : 1, // Monday is the first day of the week.\n doy : 4 // The week that contains Jan 4th is the first week of the year.\n }\n});\n\nreturn de;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/de.js\n// module id = 393\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/de.js?", + ); + + /***/ + }, + /* 394 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/moment/locale/dv.js ***! + \*******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Maldivian [dv]\n//! author : Jawish Hameed : https://github.com/jawish\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar months = [\n 'ޖެނުއަރީ',\n 'ފެބްރުއަރީ',\n 'މާރިޗު',\n 'އޭޕްރީލު',\n 'މޭ',\n 'ޖޫން',\n 'ޖުލައި',\n 'އޯގަސްޓު',\n 'ސެޕްޓެމްބަރު',\n 'އޮކްޓޯބަރު',\n 'ނޮވެމްބަރު',\n 'ޑިސެމްބަރު'\n];\nvar weekdays = [\n 'އާދިއްތަ',\n 'ހޯމަ',\n 'އަންގާރަ',\n 'ބުދަ',\n 'ބުރާސްފަތި',\n 'ހުކުރު',\n 'ހޮނިހިރު'\n];\n\nvar dv = moment.defineLocale('dv', {\n months : months,\n monthsShort : months,\n weekdays : weekdays,\n weekdaysShort : weekdays,\n weekdaysMin : 'އާދި_ހޯމަ_އަން_ބުދަ_ބުރާ_ހުކު_ހޮނި'.split('_'),\n longDateFormat : {\n\n LT : 'HH:mm',\n LTS : 'HH:mm:ss',\n L : 'D/M/YYYY',\n LL : 'D MMMM YYYY',\n LLL : 'D MMMM YYYY HH:mm',\n LLLL : 'dddd D MMMM YYYY HH:mm'\n },\n meridiemParse: /މކ|މފ/,\n isPM : function (input) {\n return 'މފ' === input;\n },\n meridiem : function (hour, minute, isLower) {\n if (hour < 12) {\n return 'މކ';\n } else {\n return 'މފ';\n }\n },\n calendar : {\n sameDay : '[މިއަދު] LT',\n nextDay : '[މާދަމާ] LT',\n nextWeek : 'dddd LT',\n lastDay : '[އިއްޔެ] LT',\n lastWeek : '[ފާއިތުވި] dddd LT',\n sameElse : 'L'\n },\n relativeTime : {\n future : 'ތެރޭގައި %s',\n past : 'ކުރިން %s',\n s : 'ސިކުންތުކޮޅެއް',\n m : 'މިނިޓެއް',\n mm : 'މިނިޓު %d',\n h : 'ގަޑިއިރެއް',\n hh : 'ގަޑިއިރު %d',\n d : 'ދުވަހެއް',\n dd : 'ދުވަސް %d',\n M : 'މަހެއް',\n MM : 'މަސް %d',\n y : 'އަހަރެއް',\n yy : 'އަހަރު %d'\n },\n preparse: function (string) {\n return string.replace(/،/g, ',');\n },\n postformat: function (string) {\n return string.replace(/,/g, '،');\n },\n week : {\n dow : 7, // Sunday is the first day of the week.\n doy : 12 // The week that contains Jan 1st is the first week of the year.\n }\n});\n\nreturn dv;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/dv.js\n// module id = 394\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/dv.js?", + ); + + /***/ + }, + /* 395 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/moment/locale/el.js ***! + \*******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Greek [el]\n//! author : Aggelos Karalias : https://github.com/mehiel\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\nfunction isFunction(input) {\n return input instanceof Function || Object.prototype.toString.call(input) === '[object Function]';\n}\n\n\nvar el = moment.defineLocale('el', {\n monthsNominativeEl : 'Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος'.split('_'),\n monthsGenitiveEl : 'Ιανουαρίου_Φεβρουαρίου_Μαρτίου_Απριλίου_Μαΐου_Ιουνίου_Ιουλίου_Αυγούστου_Σεπτεμβρίου_Οκτωβρίου_Νοεμβρίου_Δεκεμβρίου'.split('_'),\n months : function (momentToFormat, format) {\n if (!momentToFormat) {\n return this._monthsNominativeEl;\n } else if (/D/.test(format.substring(0, format.indexOf('MMMM')))) { // if there is a day number before 'MMMM'\n return this._monthsGenitiveEl[momentToFormat.month()];\n } else {\n return this._monthsNominativeEl[momentToFormat.month()];\n }\n },\n monthsShort : 'Ιαν_Φεβ_Μαρ_Απρ_Μαϊ_Ιουν_Ιουλ_Αυγ_Σεπ_Οκτ_Νοε_Δεκ'.split('_'),\n weekdays : 'Κυριακή_Δευτέρα_Τρίτη_Τετάρτη_Πέμπτη_Παρασκευή_Σάββατο'.split('_'),\n weekdaysShort : 'Κυρ_Δευ_Τρι_Τετ_Πεμ_Παρ_Σαβ'.split('_'),\n weekdaysMin : 'Κυ_Δε_Τρ_Τε_Πε_Πα_Σα'.split('_'),\n meridiem : function (hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'μμ' : 'ΜΜ';\n } else {\n return isLower ? 'πμ' : 'ΠΜ';\n }\n },\n isPM : function (input) {\n return ((input + '').toLowerCase()[0] === 'μ');\n },\n meridiemParse : /[ΠΜ]\\.?Μ?\\.?/i,\n longDateFormat : {\n LT : 'h:mm A',\n LTS : 'h:mm:ss A',\n L : 'DD/MM/YYYY',\n LL : 'D MMMM YYYY',\n LLL : 'D MMMM YYYY h:mm A',\n LLLL : 'dddd, D MMMM YYYY h:mm A'\n },\n calendarEl : {\n sameDay : '[Σήμερα {}] LT',\n nextDay : '[Αύριο {}] LT',\n nextWeek : 'dddd [{}] LT',\n lastDay : '[Χθες {}] LT',\n lastWeek : function () {\n switch (this.day()) {\n case 6:\n return '[το προηγούμενο] dddd [{}] LT';\n default:\n return '[την προηγούμενη] dddd [{}] LT';\n }\n },\n sameElse : 'L'\n },\n calendar : function (key, mom) {\n var output = this._calendarEl[key],\n hours = mom && mom.hours();\n if (isFunction(output)) {\n output = output.apply(mom);\n }\n return output.replace('{}', (hours % 12 === 1 ? 'στη' : 'στις'));\n },\n relativeTime : {\n future : 'σε %s',\n past : '%s πριν',\n s : 'λίγα δευτερόλεπτα',\n m : 'ένα λεπτό',\n mm : '%d λεπτά',\n h : 'μία ώρα',\n hh : '%d ώρες',\n d : 'μία μέρα',\n dd : '%d μέρες',\n M : 'ένας μήνας',\n MM : '%d μήνες',\n y : 'ένας χρόνος',\n yy : '%d χρόνια'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}η/,\n ordinal: '%dη',\n week : {\n dow : 1, // Monday is the first day of the week.\n doy : 4 // The week that contains Jan 4st is the first week of the year.\n }\n});\n\nreturn el;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/el.js\n// module id = 395\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/el.js?", + ); + + /***/ + }, + /* 396 */ + /* unknown exports provided */ + /* all exports used */ + /*!**********************************!*\ + !*** ./~/moment/locale/en-au.js ***! + \**********************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : English (Australia) [en-au]\n//! author : Jared Morse : https://github.com/jarcoal\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar enAu = moment.defineLocale('en-au', {\n months : 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'),\n monthsShort : 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n weekdays : 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n weekdaysShort : 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n longDateFormat : {\n LT : 'h:mm A',\n LTS : 'h:mm:ss A',\n L : 'DD/MM/YYYY',\n LL : 'D MMMM YYYY',\n LLL : 'D MMMM YYYY h:mm A',\n LLLL : 'dddd, D MMMM YYYY h:mm A'\n },\n calendar : {\n sameDay : '[Today at] LT',\n nextDay : '[Tomorrow at] LT',\n nextWeek : 'dddd [at] LT',\n lastDay : '[Yesterday at] LT',\n lastWeek : '[Last] dddd [at] LT',\n sameElse : 'L'\n },\n relativeTime : {\n future : 'in %s',\n past : '%s ago',\n s : 'a few seconds',\n m : 'a minute',\n mm : '%d minutes',\n h : 'an hour',\n hh : '%d hours',\n d : 'a day',\n dd : '%d days',\n M : 'a month',\n MM : '%d months',\n y : 'a year',\n yy : '%d years'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n ordinal : function (number) {\n var b = number % 10,\n output = (~~(number % 100 / 10) === 1) ? 'th' :\n (b === 1) ? 'st' :\n (b === 2) ? 'nd' :\n (b === 3) ? 'rd' : 'th';\n return number + output;\n },\n week : {\n dow : 1, // Monday is the first day of the week.\n doy : 4 // The week that contains Jan 4th is the first week of the year.\n }\n});\n\nreturn enAu;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/en-au.js\n// module id = 396\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/en-au.js?", + ); + + /***/ + }, + /* 397 */ + /* unknown exports provided */ + /* all exports used */ + /*!**********************************!*\ + !*** ./~/moment/locale/en-ca.js ***! + \**********************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : English (Canada) [en-ca]\n//! author : Jonathan Abourbih : https://github.com/jonbca\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar enCa = moment.defineLocale('en-ca', {\n months : 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'),\n monthsShort : 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n weekdays : 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n weekdaysShort : 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n longDateFormat : {\n LT : 'h:mm A',\n LTS : 'h:mm:ss A',\n L : 'YYYY-MM-DD',\n LL : 'MMMM D, YYYY',\n LLL : 'MMMM D, YYYY h:mm A',\n LLLL : 'dddd, MMMM D, YYYY h:mm A'\n },\n calendar : {\n sameDay : '[Today at] LT',\n nextDay : '[Tomorrow at] LT',\n nextWeek : 'dddd [at] LT',\n lastDay : '[Yesterday at] LT',\n lastWeek : '[Last] dddd [at] LT',\n sameElse : 'L'\n },\n relativeTime : {\n future : 'in %s',\n past : '%s ago',\n s : 'a few seconds',\n m : 'a minute',\n mm : '%d minutes',\n h : 'an hour',\n hh : '%d hours',\n d : 'a day',\n dd : '%d days',\n M : 'a month',\n MM : '%d months',\n y : 'a year',\n yy : '%d years'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n ordinal : function (number) {\n var b = number % 10,\n output = (~~(number % 100 / 10) === 1) ? 'th' :\n (b === 1) ? 'st' :\n (b === 2) ? 'nd' :\n (b === 3) ? 'rd' : 'th';\n return number + output;\n }\n});\n\nreturn enCa;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/en-ca.js\n// module id = 397\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/en-ca.js?", + ); + + /***/ + }, + /* 398 */ + /* unknown exports provided */ + /* all exports used */ + /*!**********************************!*\ + !*** ./~/moment/locale/en-gb.js ***! + \**********************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : English (United Kingdom) [en-gb]\n//! author : Chris Gedrim : https://github.com/chrisgedrim\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar enGb = moment.defineLocale('en-gb', {\n months : 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'),\n monthsShort : 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n weekdays : 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n weekdaysShort : 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n longDateFormat : {\n LT : 'HH:mm',\n LTS : 'HH:mm:ss',\n L : 'DD/MM/YYYY',\n LL : 'D MMMM YYYY',\n LLL : 'D MMMM YYYY HH:mm',\n LLLL : 'dddd, D MMMM YYYY HH:mm'\n },\n calendar : {\n sameDay : '[Today at] LT',\n nextDay : '[Tomorrow at] LT',\n nextWeek : 'dddd [at] LT',\n lastDay : '[Yesterday at] LT',\n lastWeek : '[Last] dddd [at] LT',\n sameElse : 'L'\n },\n relativeTime : {\n future : 'in %s',\n past : '%s ago',\n s : 'a few seconds',\n m : 'a minute',\n mm : '%d minutes',\n h : 'an hour',\n hh : '%d hours',\n d : 'a day',\n dd : '%d days',\n M : 'a month',\n MM : '%d months',\n y : 'a year',\n yy : '%d years'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n ordinal : function (number) {\n var b = number % 10,\n output = (~~(number % 100 / 10) === 1) ? 'th' :\n (b === 1) ? 'st' :\n (b === 2) ? 'nd' :\n (b === 3) ? 'rd' : 'th';\n return number + output;\n },\n week : {\n dow : 1, // Monday is the first day of the week.\n doy : 4 // The week that contains Jan 4th is the first week of the year.\n }\n});\n\nreturn enGb;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/en-gb.js\n// module id = 398\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/en-gb.js?", + ); + + /***/ + }, + /* 399 */ + /* unknown exports provided */ + /* all exports used */ + /*!**********************************!*\ + !*** ./~/moment/locale/en-ie.js ***! + \**********************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : English (Ireland) [en-ie]\n//! author : Chris Cartlidge : https://github.com/chriscartlidge\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar enIe = moment.defineLocale('en-ie', {\n months : 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'),\n monthsShort : 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n weekdays : 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n weekdaysShort : 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n longDateFormat : {\n LT : 'HH:mm',\n LTS : 'HH:mm:ss',\n L : 'DD-MM-YYYY',\n LL : 'D MMMM YYYY',\n LLL : 'D MMMM YYYY HH:mm',\n LLLL : 'dddd D MMMM YYYY HH:mm'\n },\n calendar : {\n sameDay : '[Today at] LT',\n nextDay : '[Tomorrow at] LT',\n nextWeek : 'dddd [at] LT',\n lastDay : '[Yesterday at] LT',\n lastWeek : '[Last] dddd [at] LT',\n sameElse : 'L'\n },\n relativeTime : {\n future : 'in %s',\n past : '%s ago',\n s : 'a few seconds',\n m : 'a minute',\n mm : '%d minutes',\n h : 'an hour',\n hh : '%d hours',\n d : 'a day',\n dd : '%d days',\n M : 'a month',\n MM : '%d months',\n y : 'a year',\n yy : '%d years'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n ordinal : function (number) {\n var b = number % 10,\n output = (~~(number % 100 / 10) === 1) ? 'th' :\n (b === 1) ? 'st' :\n (b === 2) ? 'nd' :\n (b === 3) ? 'rd' : 'th';\n return number + output;\n },\n week : {\n dow : 1, // Monday is the first day of the week.\n doy : 4 // The week that contains Jan 4th is the first week of the year.\n }\n});\n\nreturn enIe;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/en-ie.js\n// module id = 399\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/en-ie.js?", + ); + + /***/ + }, + /* 400 */ + /* unknown exports provided */ + /* all exports used */ + /*!**********************************!*\ + !*** ./~/moment/locale/en-nz.js ***! + \**********************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : English (New Zealand) [en-nz]\n//! author : Luke McGregor : https://github.com/lukemcgregor\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar enNz = moment.defineLocale('en-nz', {\n months : 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'),\n monthsShort : 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n weekdays : 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n weekdaysShort : 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n longDateFormat : {\n LT : 'h:mm A',\n LTS : 'h:mm:ss A',\n L : 'DD/MM/YYYY',\n LL : 'D MMMM YYYY',\n LLL : 'D MMMM YYYY h:mm A',\n LLLL : 'dddd, D MMMM YYYY h:mm A'\n },\n calendar : {\n sameDay : '[Today at] LT',\n nextDay : '[Tomorrow at] LT',\n nextWeek : 'dddd [at] LT',\n lastDay : '[Yesterday at] LT',\n lastWeek : '[Last] dddd [at] LT',\n sameElse : 'L'\n },\n relativeTime : {\n future : 'in %s',\n past : '%s ago',\n s : 'a few seconds',\n m : 'a minute',\n mm : '%d minutes',\n h : 'an hour',\n hh : '%d hours',\n d : 'a day',\n dd : '%d days',\n M : 'a month',\n MM : '%d months',\n y : 'a year',\n yy : '%d years'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n ordinal : function (number) {\n var b = number % 10,\n output = (~~(number % 100 / 10) === 1) ? 'th' :\n (b === 1) ? 'st' :\n (b === 2) ? 'nd' :\n (b === 3) ? 'rd' : 'th';\n return number + output;\n },\n week : {\n dow : 1, // Monday is the first day of the week.\n doy : 4 // The week that contains Jan 4th is the first week of the year.\n }\n});\n\nreturn enNz;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/en-nz.js\n// module id = 400\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/en-nz.js?", + ); + + /***/ + }, + /* 401 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/moment/locale/eo.js ***! + \*******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Esperanto [eo]\n//! author : Colin Dean : https://github.com/colindean\n//! author : Mia Nordentoft Imperatori : https://github.com/miestasmia\n//! comment : miestasmia corrected the translation by colindean\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar eo = moment.defineLocale('eo', {\n months : 'januaro_februaro_marto_aprilo_majo_junio_julio_aŭgusto_septembro_oktobro_novembro_decembro'.split('_'),\n monthsShort : 'jan_feb_mar_apr_maj_jun_jul_aŭg_sep_okt_nov_dec'.split('_'),\n weekdays : 'dimanĉo_lundo_mardo_merkredo_ĵaŭdo_vendredo_sabato'.split('_'),\n weekdaysShort : 'dim_lun_mard_merk_ĵaŭ_ven_sab'.split('_'),\n weekdaysMin : 'di_lu_ma_me_ĵa_ve_sa'.split('_'),\n longDateFormat : {\n LT : 'HH:mm',\n LTS : 'HH:mm:ss',\n L : 'YYYY-MM-DD',\n LL : 'D[-a de] MMMM, YYYY',\n LLL : 'D[-a de] MMMM, YYYY HH:mm',\n LLLL : 'dddd, [la] D[-a de] MMMM, YYYY HH:mm'\n },\n meridiemParse: /[ap]\\.t\\.m/i,\n isPM: function (input) {\n return input.charAt(0).toLowerCase() === 'p';\n },\n meridiem : function (hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'p.t.m.' : 'P.T.M.';\n } else {\n return isLower ? 'a.t.m.' : 'A.T.M.';\n }\n },\n calendar : {\n sameDay : '[Hodiaŭ je] LT',\n nextDay : '[Morgaŭ je] LT',\n nextWeek : 'dddd [je] LT',\n lastDay : '[Hieraŭ je] LT',\n lastWeek : '[pasinta] dddd [je] LT',\n sameElse : 'L'\n },\n relativeTime : {\n future : 'post %s',\n past : 'antaŭ %s',\n s : 'sekundoj',\n m : 'minuto',\n mm : '%d minutoj',\n h : 'horo',\n hh : '%d horoj',\n d : 'tago',//ne 'diurno', ĉar estas uzita por proksimumo\n dd : '%d tagoj',\n M : 'monato',\n MM : '%d monatoj',\n y : 'jaro',\n yy : '%d jaroj'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}a/,\n ordinal : '%da',\n week : {\n dow : 1, // Monday is the first day of the week.\n doy : 7 // The week that contains Jan 1st is the first week of the year.\n }\n});\n\nreturn eo;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/eo.js\n// module id = 401\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/eo.js?", + ); + + /***/ + }, + /* 402 */ + /* unknown exports provided */ + /* all exports used */ + /*!**********************************!*\ + !*** ./~/moment/locale/es-do.js ***! + \**********************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Spanish (Dominican Republic) [es-do]\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar monthsShortDot = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split('_');\nvar monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_');\n\nvar esDo = moment.defineLocale('es-do', {\n months : 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'),\n monthsShort : function (m, format) {\n if (!m) {\n return monthsShortDot;\n } else if (/-MMM-/.test(format)) {\n return monthsShort[m.month()];\n } else {\n return monthsShortDot[m.month()];\n }\n },\n monthsParseExact : true,\n weekdays : 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),\n weekdaysShort : 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),\n weekdaysMin : 'do_lu_ma_mi_ju_vi_sá'.split('_'),\n weekdaysParseExact : true,\n longDateFormat : {\n LT : 'h:mm A',\n LTS : 'h:mm:ss A',\n L : 'DD/MM/YYYY',\n LL : 'D [de] MMMM [de] YYYY',\n LLL : 'D [de] MMMM [de] YYYY h:mm A',\n LLLL : 'dddd, D [de] MMMM [de] YYYY h:mm A'\n },\n calendar : {\n sameDay : function () {\n return '[hoy a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';\n },\n nextDay : function () {\n return '[mañana a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';\n },\n nextWeek : function () {\n return 'dddd [a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';\n },\n lastDay : function () {\n return '[ayer a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';\n },\n lastWeek : function () {\n return '[el] dddd [pasado a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';\n },\n sameElse : 'L'\n },\n relativeTime : {\n future : 'en %s',\n past : 'hace %s',\n s : 'unos segundos',\n m : 'un minuto',\n mm : '%d minutos',\n h : 'una hora',\n hh : '%d horas',\n d : 'un día',\n dd : '%d días',\n M : 'un mes',\n MM : '%d meses',\n y : 'un año',\n yy : '%d años'\n },\n dayOfMonthOrdinalParse : /\\d{1,2}º/,\n ordinal : '%dº',\n week : {\n dow : 1, // Monday is the first day of the week.\n doy : 4 // The week that contains Jan 4th is the first week of the year.\n }\n});\n\nreturn esDo;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/es-do.js\n// module id = 402\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/es-do.js?", + ); + + /***/ + }, + /* 403 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/moment/locale/es.js ***! + \*******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Spanish [es]\n//! author : Julio Napurí : https://github.com/julionc\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar monthsShortDot = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split('_');\nvar monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_');\n\nvar es = moment.defineLocale('es', {\n months : 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'),\n monthsShort : function (m, format) {\n if (!m) {\n return monthsShortDot;\n } else if (/-MMM-/.test(format)) {\n return monthsShort[m.month()];\n } else {\n return monthsShortDot[m.month()];\n }\n },\n monthsParseExact : true,\n weekdays : 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),\n weekdaysShort : 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),\n weekdaysMin : 'do_lu_ma_mi_ju_vi_sá'.split('_'),\n weekdaysParseExact : true,\n longDateFormat : {\n LT : 'H:mm',\n LTS : 'H:mm:ss',\n L : 'DD/MM/YYYY',\n LL : 'D [de] MMMM [de] YYYY',\n LLL : 'D [de] MMMM [de] YYYY H:mm',\n LLLL : 'dddd, D [de] MMMM [de] YYYY H:mm'\n },\n calendar : {\n sameDay : function () {\n return '[hoy a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';\n },\n nextDay : function () {\n return '[mañana a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';\n },\n nextWeek : function () {\n return 'dddd [a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';\n },\n lastDay : function () {\n return '[ayer a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';\n },\n lastWeek : function () {\n return '[el] dddd [pasado a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';\n },\n sameElse : 'L'\n },\n relativeTime : {\n future : 'en %s',\n past : 'hace %s',\n s : 'unos segundos',\n m : 'un minuto',\n mm : '%d minutos',\n h : 'una hora',\n hh : '%d horas',\n d : 'un día',\n dd : '%d días',\n M : 'un mes',\n MM : '%d meses',\n y : 'un año',\n yy : '%d años'\n },\n dayOfMonthOrdinalParse : /\\d{1,2}º/,\n ordinal : '%dº',\n week : {\n dow : 1, // Monday is the first day of the week.\n doy : 4 // The week that contains Jan 4th is the first week of the year.\n }\n});\n\nreturn es;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/es.js\n// module id = 403\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/es.js?", + ); + + /***/ + }, + /* 404 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/moment/locale/et.js ***! + \*******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Estonian [et]\n//! author : Henry Kehlmann : https://github.com/madhenry\n//! improvements : Illimar Tambek : https://github.com/ragulka\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nfunction processRelativeTime(number, withoutSuffix, key, isFuture) {\n var format = {\n 's' : ['mõne sekundi', 'mõni sekund', 'paar sekundit'],\n 'm' : ['ühe minuti', 'üks minut'],\n 'mm': [number + ' minuti', number + ' minutit'],\n 'h' : ['ühe tunni', 'tund aega', 'üks tund'],\n 'hh': [number + ' tunni', number + ' tundi'],\n 'd' : ['ühe päeva', 'üks päev'],\n 'M' : ['kuu aja', 'kuu aega', 'üks kuu'],\n 'MM': [number + ' kuu', number + ' kuud'],\n 'y' : ['ühe aasta', 'aasta', 'üks aasta'],\n 'yy': [number + ' aasta', number + ' aastat']\n };\n if (withoutSuffix) {\n return format[key][2] ? format[key][2] : format[key][1];\n }\n return isFuture ? format[key][0] : format[key][1];\n}\n\nvar et = moment.defineLocale('et', {\n months : 'jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember'.split('_'),\n monthsShort : 'jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets'.split('_'),\n weekdays : 'pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev'.split('_'),\n weekdaysShort : 'P_E_T_K_N_R_L'.split('_'),\n weekdaysMin : 'P_E_T_K_N_R_L'.split('_'),\n longDateFormat : {\n LT : 'H:mm',\n LTS : 'H:mm:ss',\n L : 'DD.MM.YYYY',\n LL : 'D. MMMM YYYY',\n LLL : 'D. MMMM YYYY H:mm',\n LLLL : 'dddd, D. MMMM YYYY H:mm'\n },\n calendar : {\n sameDay : '[Täna,] LT',\n nextDay : '[Homme,] LT',\n nextWeek : '[Järgmine] dddd LT',\n lastDay : '[Eile,] LT',\n lastWeek : '[Eelmine] dddd LT',\n sameElse : 'L'\n },\n relativeTime : {\n future : '%s pärast',\n past : '%s tagasi',\n s : processRelativeTime,\n m : processRelativeTime,\n mm : processRelativeTime,\n h : processRelativeTime,\n hh : processRelativeTime,\n d : processRelativeTime,\n dd : '%d päeva',\n M : processRelativeTime,\n MM : processRelativeTime,\n y : processRelativeTime,\n yy : processRelativeTime\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal : '%d.',\n week : {\n dow : 1, // Monday is the first day of the week.\n doy : 4 // The week that contains Jan 4th is the first week of the year.\n }\n});\n\nreturn et;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/et.js\n// module id = 404\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/et.js?", + ); + + /***/ + }, + /* 405 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/moment/locale/eu.js ***! + \*******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Basque [eu]\n//! author : Eneko Illarramendi : https://github.com/eillarra\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar eu = moment.defineLocale('eu', {\n months : 'urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua'.split('_'),\n monthsShort : 'urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.'.split('_'),\n monthsParseExact : true,\n weekdays : 'igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata'.split('_'),\n weekdaysShort : 'ig._al._ar._az._og._ol._lr.'.split('_'),\n weekdaysMin : 'ig_al_ar_az_og_ol_lr'.split('_'),\n weekdaysParseExact : true,\n longDateFormat : {\n LT : 'HH:mm',\n LTS : 'HH:mm:ss',\n L : 'YYYY-MM-DD',\n LL : 'YYYY[ko] MMMM[ren] D[a]',\n LLL : 'YYYY[ko] MMMM[ren] D[a] HH:mm',\n LLLL : 'dddd, YYYY[ko] MMMM[ren] D[a] HH:mm',\n l : 'YYYY-M-D',\n ll : 'YYYY[ko] MMM D[a]',\n lll : 'YYYY[ko] MMM D[a] HH:mm',\n llll : 'ddd, YYYY[ko] MMM D[a] HH:mm'\n },\n calendar : {\n sameDay : '[gaur] LT[etan]',\n nextDay : '[bihar] LT[etan]',\n nextWeek : 'dddd LT[etan]',\n lastDay : '[atzo] LT[etan]',\n lastWeek : '[aurreko] dddd LT[etan]',\n sameElse : 'L'\n },\n relativeTime : {\n future : '%s barru',\n past : 'duela %s',\n s : 'segundo batzuk',\n m : 'minutu bat',\n mm : '%d minutu',\n h : 'ordu bat',\n hh : '%d ordu',\n d : 'egun bat',\n dd : '%d egun',\n M : 'hilabete bat',\n MM : '%d hilabete',\n y : 'urte bat',\n yy : '%d urte'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal : '%d.',\n week : {\n dow : 1, // Monday is the first day of the week.\n doy : 7 // The week that contains Jan 1st is the first week of the year.\n }\n});\n\nreturn eu;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/eu.js\n// module id = 405\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/eu.js?", + ); + + /***/ + }, + /* 406 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/moment/locale/fa.js ***! + \*******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Persian [fa]\n//! author : Ebrahim Byagowi : https://github.com/ebraminio\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar symbolMap = {\n '1': '۱',\n '2': '۲',\n '3': '۳',\n '4': '۴',\n '5': '۵',\n '6': '۶',\n '7': '۷',\n '8': '۸',\n '9': '۹',\n '0': '۰'\n};\nvar numberMap = {\n '۱': '1',\n '۲': '2',\n '۳': '3',\n '۴': '4',\n '۵': '5',\n '۶': '6',\n '۷': '7',\n '۸': '8',\n '۹': '9',\n '۰': '0'\n};\n\nvar fa = moment.defineLocale('fa', {\n months : 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split('_'),\n monthsShort : 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split('_'),\n weekdays : 'یک\\u200cشنبه_دوشنبه_سه\\u200cشنبه_چهارشنبه_پنج\\u200cشنبه_جمعه_شنبه'.split('_'),\n weekdaysShort : 'یک\\u200cشنبه_دوشنبه_سه\\u200cشنبه_چهارشنبه_پنج\\u200cشنبه_جمعه_شنبه'.split('_'),\n weekdaysMin : 'ی_د_س_چ_پ_ج_ش'.split('_'),\n weekdaysParseExact : true,\n longDateFormat : {\n LT : 'HH:mm',\n LTS : 'HH:mm:ss',\n L : 'DD/MM/YYYY',\n LL : 'D MMMM YYYY',\n LLL : 'D MMMM YYYY HH:mm',\n LLLL : 'dddd, D MMMM YYYY HH:mm'\n },\n meridiemParse: /قبل از ظهر|بعد از ظهر/,\n isPM: function (input) {\n return /بعد از ظهر/.test(input);\n },\n meridiem : function (hour, minute, isLower) {\n if (hour < 12) {\n return 'قبل از ظهر';\n } else {\n return 'بعد از ظهر';\n }\n },\n calendar : {\n sameDay : '[امروز ساعت] LT',\n nextDay : '[فردا ساعت] LT',\n nextWeek : 'dddd [ساعت] LT',\n lastDay : '[دیروز ساعت] LT',\n lastWeek : 'dddd [پیش] [ساعت] LT',\n sameElse : 'L'\n },\n relativeTime : {\n future : 'در %s',\n past : '%s پیش',\n s : 'چند ثانیه',\n m : 'یک دقیقه',\n mm : '%d دقیقه',\n h : 'یک ساعت',\n hh : '%d ساعت',\n d : 'یک روز',\n dd : '%d روز',\n M : 'یک ماه',\n MM : '%d ماه',\n y : 'یک سال',\n yy : '%d سال'\n },\n preparse: function (string) {\n return string.replace(/[۰-۹]/g, function (match) {\n return numberMap[match];\n }).replace(/،/g, ',');\n },\n postformat: function (string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n }).replace(/,/g, '،');\n },\n dayOfMonthOrdinalParse: /\\d{1,2}م/,\n ordinal : '%dم',\n week : {\n dow : 6, // Saturday is the first day of the week.\n doy : 12 // The week that contains Jan 1st is the first week of the year.\n }\n});\n\nreturn fa;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/fa.js\n// module id = 406\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/fa.js?", + ); + + /***/ + }, + /* 407 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/moment/locale/fi.js ***! + \*******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Finnish [fi]\n//! author : Tarmo Aidantausta : https://github.com/bleadof\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar numbersPast = 'nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän'.split(' ');\nvar numbersFuture = [\n 'nolla', 'yhden', 'kahden', 'kolmen', 'neljän', 'viiden', 'kuuden',\n numbersPast[7], numbersPast[8], numbersPast[9]\n ];\nfunction translate(number, withoutSuffix, key, isFuture) {\n var result = '';\n switch (key) {\n case 's':\n return isFuture ? 'muutaman sekunnin' : 'muutama sekunti';\n case 'm':\n return isFuture ? 'minuutin' : 'minuutti';\n case 'mm':\n result = isFuture ? 'minuutin' : 'minuuttia';\n break;\n case 'h':\n return isFuture ? 'tunnin' : 'tunti';\n case 'hh':\n result = isFuture ? 'tunnin' : 'tuntia';\n break;\n case 'd':\n return isFuture ? 'päivän' : 'päivä';\n case 'dd':\n result = isFuture ? 'päivän' : 'päivää';\n break;\n case 'M':\n return isFuture ? 'kuukauden' : 'kuukausi';\n case 'MM':\n result = isFuture ? 'kuukauden' : 'kuukautta';\n break;\n case 'y':\n return isFuture ? 'vuoden' : 'vuosi';\n case 'yy':\n result = isFuture ? 'vuoden' : 'vuotta';\n break;\n }\n result = verbalNumber(number, isFuture) + ' ' + result;\n return result;\n}\nfunction verbalNumber(number, isFuture) {\n return number < 10 ? (isFuture ? numbersFuture[number] : numbersPast[number]) : number;\n}\n\nvar fi = moment.defineLocale('fi', {\n months : 'tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu'.split('_'),\n monthsShort : 'tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu'.split('_'),\n weekdays : 'sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai'.split('_'),\n weekdaysShort : 'su_ma_ti_ke_to_pe_la'.split('_'),\n weekdaysMin : 'su_ma_ti_ke_to_pe_la'.split('_'),\n longDateFormat : {\n LT : 'HH.mm',\n LTS : 'HH.mm.ss',\n L : 'DD.MM.YYYY',\n LL : 'Do MMMM[ta] YYYY',\n LLL : 'Do MMMM[ta] YYYY, [klo] HH.mm',\n LLLL : 'dddd, Do MMMM[ta] YYYY, [klo] HH.mm',\n l : 'D.M.YYYY',\n ll : 'Do MMM YYYY',\n lll : 'Do MMM YYYY, [klo] HH.mm',\n llll : 'ddd, Do MMM YYYY, [klo] HH.mm'\n },\n calendar : {\n sameDay : '[tänään] [klo] LT',\n nextDay : '[huomenna] [klo] LT',\n nextWeek : 'dddd [klo] LT',\n lastDay : '[eilen] [klo] LT',\n lastWeek : '[viime] dddd[na] [klo] LT',\n sameElse : 'L'\n },\n relativeTime : {\n future : '%s päästä',\n past : '%s sitten',\n s : translate,\n m : translate,\n mm : translate,\n h : translate,\n hh : translate,\n d : translate,\n dd : translate,\n M : translate,\n MM : translate,\n y : translate,\n yy : translate\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal : '%d.',\n week : {\n dow : 1, // Monday is the first day of the week.\n doy : 4 // The week that contains Jan 4th is the first week of the year.\n }\n});\n\nreturn fi;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/fi.js\n// module id = 407\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/fi.js?", + ); + + /***/ + }, + /* 408 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/moment/locale/fo.js ***! + \*******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Faroese [fo]\n//! author : Ragnar Johannesen : https://github.com/ragnar123\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar fo = moment.defineLocale('fo', {\n months : 'januar_februar_mars_apríl_mai_juni_juli_august_september_oktober_november_desember'.split('_'),\n monthsShort : 'jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_'),\n weekdays : 'sunnudagur_mánadagur_týsdagur_mikudagur_hósdagur_fríggjadagur_leygardagur'.split('_'),\n weekdaysShort : 'sun_mán_týs_mik_hós_frí_ley'.split('_'),\n weekdaysMin : 'su_má_tý_mi_hó_fr_le'.split('_'),\n longDateFormat : {\n LT : 'HH:mm',\n LTS : 'HH:mm:ss',\n L : 'DD/MM/YYYY',\n LL : 'D MMMM YYYY',\n LLL : 'D MMMM YYYY HH:mm',\n LLLL : 'dddd D. MMMM, YYYY HH:mm'\n },\n calendar : {\n sameDay : '[Í dag kl.] LT',\n nextDay : '[Í morgin kl.] LT',\n nextWeek : 'dddd [kl.] LT',\n lastDay : '[Í gjár kl.] LT',\n lastWeek : '[síðstu] dddd [kl] LT',\n sameElse : 'L'\n },\n relativeTime : {\n future : 'um %s',\n past : '%s síðani',\n s : 'fá sekund',\n m : 'ein minutt',\n mm : '%d minuttir',\n h : 'ein tími',\n hh : '%d tímar',\n d : 'ein dagur',\n dd : '%d dagar',\n M : 'ein mánaði',\n MM : '%d mánaðir',\n y : 'eitt ár',\n yy : '%d ár'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal : '%d.',\n week : {\n dow : 1, // Monday is the first day of the week.\n doy : 4 // The week that contains Jan 4th is the first week of the year.\n }\n});\n\nreturn fo;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/fo.js\n// module id = 408\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/fo.js?", + ); + + /***/ + }, + /* 409 */ + /* unknown exports provided */ + /* all exports used */ + /*!**********************************!*\ + !*** ./~/moment/locale/fr-ca.js ***! + \**********************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : French (Canada) [fr-ca]\n//! author : Jonathan Abourbih : https://github.com/jonbca\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar frCa = moment.defineLocale('fr-ca', {\n months : 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split('_'),\n monthsShort : 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split('_'),\n monthsParseExact : true,\n weekdays : 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),\n weekdaysShort : 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),\n weekdaysMin : 'Di_Lu_Ma_Me_Je_Ve_Sa'.split('_'),\n weekdaysParseExact : true,\n longDateFormat : {\n LT : 'HH:mm',\n LTS : 'HH:mm:ss',\n L : 'YYYY-MM-DD',\n LL : 'D MMMM YYYY',\n LLL : 'D MMMM YYYY HH:mm',\n LLLL : 'dddd D MMMM YYYY HH:mm'\n },\n calendar : {\n sameDay : '[Aujourd’hui à] LT',\n nextDay : '[Demain à] LT',\n nextWeek : 'dddd [à] LT',\n lastDay : '[Hier à] LT',\n lastWeek : 'dddd [dernier à] LT',\n sameElse : 'L'\n },\n relativeTime : {\n future : 'dans %s',\n past : 'il y a %s',\n s : 'quelques secondes',\n m : 'une minute',\n mm : '%d minutes',\n h : 'une heure',\n hh : '%d heures',\n d : 'un jour',\n dd : '%d jours',\n M : 'un mois',\n MM : '%d mois',\n y : 'un an',\n yy : '%d ans'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(er|e)/,\n ordinal : function (number, period) {\n switch (period) {\n // Words with masculine grammatical gender: mois, trimestre, jour\n default:\n case 'M':\n case 'Q':\n case 'D':\n case 'DDD':\n case 'd':\n return number + (number === 1 ? 'er' : 'e');\n\n // Words with feminine grammatical gender: semaine\n case 'w':\n case 'W':\n return number + (number === 1 ? 're' : 'e');\n }\n }\n});\n\nreturn frCa;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/fr-ca.js\n// module id = 409\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/fr-ca.js?", + ); + + /***/ + }, + /* 410 */ + /* unknown exports provided */ + /* all exports used */ + /*!**********************************!*\ + !*** ./~/moment/locale/fr-ch.js ***! + \**********************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : French (Switzerland) [fr-ch]\n//! author : Gaspard Bucher : https://github.com/gaspard\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar frCh = moment.defineLocale('fr-ch', {\n months : 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split('_'),\n monthsShort : 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split('_'),\n monthsParseExact : true,\n weekdays : 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),\n weekdaysShort : 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),\n weekdaysMin : 'Di_Lu_Ma_Me_Je_Ve_Sa'.split('_'),\n weekdaysParseExact : true,\n longDateFormat : {\n LT : 'HH:mm',\n LTS : 'HH:mm:ss',\n L : 'DD.MM.YYYY',\n LL : 'D MMMM YYYY',\n LLL : 'D MMMM YYYY HH:mm',\n LLLL : 'dddd D MMMM YYYY HH:mm'\n },\n calendar : {\n sameDay : '[Aujourd’hui à] LT',\n nextDay : '[Demain à] LT',\n nextWeek : 'dddd [à] LT',\n lastDay : '[Hier à] LT',\n lastWeek : 'dddd [dernier à] LT',\n sameElse : 'L'\n },\n relativeTime : {\n future : 'dans %s',\n past : 'il y a %s',\n s : 'quelques secondes',\n m : 'une minute',\n mm : '%d minutes',\n h : 'une heure',\n hh : '%d heures',\n d : 'un jour',\n dd : '%d jours',\n M : 'un mois',\n MM : '%d mois',\n y : 'un an',\n yy : '%d ans'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(er|e)/,\n ordinal : function (number, period) {\n switch (period) {\n // Words with masculine grammatical gender: mois, trimestre, jour\n default:\n case 'M':\n case 'Q':\n case 'D':\n case 'DDD':\n case 'd':\n return number + (number === 1 ? 'er' : 'e');\n\n // Words with feminine grammatical gender: semaine\n case 'w':\n case 'W':\n return number + (number === 1 ? 're' : 'e');\n }\n },\n week : {\n dow : 1, // Monday is the first day of the week.\n doy : 4 // The week that contains Jan 4th is the first week of the year.\n }\n});\n\nreturn frCh;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/fr-ch.js\n// module id = 410\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/fr-ch.js?", + ); + + /***/ + }, + /* 411 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/moment/locale/fr.js ***! + \*******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : French [fr]\n//! author : John Fischer : https://github.com/jfroffice\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar fr = moment.defineLocale('fr', {\n months : 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split('_'),\n monthsShort : 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split('_'),\n monthsParseExact : true,\n weekdays : 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),\n weekdaysShort : 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),\n weekdaysMin : 'Di_Lu_Ma_Me_Je_Ve_Sa'.split('_'),\n weekdaysParseExact : true,\n longDateFormat : {\n LT : 'HH:mm',\n LTS : 'HH:mm:ss',\n L : 'DD/MM/YYYY',\n LL : 'D MMMM YYYY',\n LLL : 'D MMMM YYYY HH:mm',\n LLLL : 'dddd D MMMM YYYY HH:mm'\n },\n calendar : {\n sameDay : '[Aujourd’hui à] LT',\n nextDay : '[Demain à] LT',\n nextWeek : 'dddd [à] LT',\n lastDay : '[Hier à] LT',\n lastWeek : 'dddd [dernier à] LT',\n sameElse : 'L'\n },\n relativeTime : {\n future : 'dans %s',\n past : 'il y a %s',\n s : 'quelques secondes',\n m : 'une minute',\n mm : '%d minutes',\n h : 'une heure',\n hh : '%d heures',\n d : 'un jour',\n dd : '%d jours',\n M : 'un mois',\n MM : '%d mois',\n y : 'un an',\n yy : '%d ans'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(er|)/,\n ordinal : function (number, period) {\n switch (period) {\n // TODO: Return 'e' when day of month > 1. Move this case inside\n // block for masculine words below.\n // See https://github.com/moment/moment/issues/3375\n case 'D':\n return number + (number === 1 ? 'er' : '');\n\n // Words with masculine grammatical gender: mois, trimestre, jour\n default:\n case 'M':\n case 'Q':\n case 'DDD':\n case 'd':\n return number + (number === 1 ? 'er' : 'e');\n\n // Words with feminine grammatical gender: semaine\n case 'w':\n case 'W':\n return number + (number === 1 ? 're' : 'e');\n }\n },\n week : {\n dow : 1, // Monday is the first day of the week.\n doy : 4 // The week that contains Jan 4th is the first week of the year.\n }\n});\n\nreturn fr;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/fr.js\n// module id = 411\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/fr.js?", + ); + + /***/ + }, + /* 412 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/moment/locale/fy.js ***! + \*******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Frisian [fy]\n//! author : Robin van der Vliet : https://github.com/robin0van0der0v\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar monthsShortWithDots = 'jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.'.split('_');\nvar monthsShortWithoutDots = 'jan_feb_mrt_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_');\n\nvar fy = moment.defineLocale('fy', {\n months : 'jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber'.split('_'),\n monthsShort : function (m, format) {\n if (!m) {\n return monthsShortWithDots;\n } else if (/-MMM-/.test(format)) {\n return monthsShortWithoutDots[m.month()];\n } else {\n return monthsShortWithDots[m.month()];\n }\n },\n monthsParseExact : true,\n weekdays : 'snein_moandei_tiisdei_woansdei_tongersdei_freed_sneon'.split('_'),\n weekdaysShort : 'si._mo._ti._wo._to._fr._so.'.split('_'),\n weekdaysMin : 'Si_Mo_Ti_Wo_To_Fr_So'.split('_'),\n weekdaysParseExact : true,\n longDateFormat : {\n LT : 'HH:mm',\n LTS : 'HH:mm:ss',\n L : 'DD-MM-YYYY',\n LL : 'D MMMM YYYY',\n LLL : 'D MMMM YYYY HH:mm',\n LLLL : 'dddd D MMMM YYYY HH:mm'\n },\n calendar : {\n sameDay: '[hjoed om] LT',\n nextDay: '[moarn om] LT',\n nextWeek: 'dddd [om] LT',\n lastDay: '[juster om] LT',\n lastWeek: '[ôfrûne] dddd [om] LT',\n sameElse: 'L'\n },\n relativeTime : {\n future : 'oer %s',\n past : '%s lyn',\n s : 'in pear sekonden',\n m : 'ien minút',\n mm : '%d minuten',\n h : 'ien oere',\n hh : '%d oeren',\n d : 'ien dei',\n dd : '%d dagen',\n M : 'ien moanne',\n MM : '%d moannen',\n y : 'ien jier',\n yy : '%d jierren'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(ste|de)/,\n ordinal : function (number) {\n return number + ((number === 1 || number === 8 || number >= 20) ? 'ste' : 'de');\n },\n week : {\n dow : 1, // Monday is the first day of the week.\n doy : 4 // The week that contains Jan 4th is the first week of the year.\n }\n});\n\nreturn fy;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/fy.js\n// module id = 412\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/fy.js?", + ); + + /***/ + }, + /* 413 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/moment/locale/gd.js ***! + \*******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Scottish Gaelic [gd]\n//! author : Jon Ashdown : https://github.com/jonashdown\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar months = [\n 'Am Faoilleach', 'An Gearran', 'Am Màrt', 'An Giblean', 'An Cèitean', 'An t-Ògmhios', 'An t-Iuchar', 'An Lùnastal', 'An t-Sultain', 'An Dàmhair', 'An t-Samhain', 'An Dùbhlachd'\n];\n\nvar monthsShort = ['Faoi', 'Gear', 'Màrt', 'Gibl', 'Cèit', 'Ògmh', 'Iuch', 'Lùn', 'Sult', 'Dàmh', 'Samh', 'Dùbh'];\n\nvar weekdays = ['Didòmhnaich', 'Diluain', 'Dimàirt', 'Diciadain', 'Diardaoin', 'Dihaoine', 'Disathairne'];\n\nvar weekdaysShort = ['Did', 'Dil', 'Dim', 'Dic', 'Dia', 'Dih', 'Dis'];\n\nvar weekdaysMin = ['Dò', 'Lu', 'Mà', 'Ci', 'Ar', 'Ha', 'Sa'];\n\nvar gd = moment.defineLocale('gd', {\n months : months,\n monthsShort : monthsShort,\n monthsParseExact : true,\n weekdays : weekdays,\n weekdaysShort : weekdaysShort,\n weekdaysMin : weekdaysMin,\n longDateFormat : {\n LT : 'HH:mm',\n LTS : 'HH:mm:ss',\n L : 'DD/MM/YYYY',\n LL : 'D MMMM YYYY',\n LLL : 'D MMMM YYYY HH:mm',\n LLLL : 'dddd, D MMMM YYYY HH:mm'\n },\n calendar : {\n sameDay : '[An-diugh aig] LT',\n nextDay : '[A-màireach aig] LT',\n nextWeek : 'dddd [aig] LT',\n lastDay : '[An-dè aig] LT',\n lastWeek : 'dddd [seo chaidh] [aig] LT',\n sameElse : 'L'\n },\n relativeTime : {\n future : 'ann an %s',\n past : 'bho chionn %s',\n s : 'beagan diogan',\n m : 'mionaid',\n mm : '%d mionaidean',\n h : 'uair',\n hh : '%d uairean',\n d : 'latha',\n dd : '%d latha',\n M : 'mìos',\n MM : '%d mìosan',\n y : 'bliadhna',\n yy : '%d bliadhna'\n },\n dayOfMonthOrdinalParse : /\\d{1,2}(d|na|mh)/,\n ordinal : function (number) {\n var output = number === 1 ? 'd' : number % 10 === 2 ? 'na' : 'mh';\n return number + output;\n },\n week : {\n dow : 1, // Monday is the first day of the week.\n doy : 4 // The week that contains Jan 4th is the first week of the year.\n }\n});\n\nreturn gd;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/gd.js\n// module id = 413\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/gd.js?", + ); + + /***/ + }, + /* 414 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/moment/locale/gl.js ***! + \*******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Galician [gl]\n//! author : Juan G. Hurtado : https://github.com/juanghurtado\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar gl = moment.defineLocale('gl', {\n months : 'xaneiro_febreiro_marzo_abril_maio_xuño_xullo_agosto_setembro_outubro_novembro_decembro'.split('_'),\n monthsShort : 'xan._feb._mar._abr._mai._xuñ._xul._ago._set._out._nov._dec.'.split('_'),\n monthsParseExact: true,\n weekdays : 'domingo_luns_martes_mércores_xoves_venres_sábado'.split('_'),\n weekdaysShort : 'dom._lun._mar._mér._xov._ven._sáb.'.split('_'),\n weekdaysMin : 'do_lu_ma_mé_xo_ve_sá'.split('_'),\n weekdaysParseExact : true,\n longDateFormat : {\n LT : 'H:mm',\n LTS : 'H:mm:ss',\n L : 'DD/MM/YYYY',\n LL : 'D [de] MMMM [de] YYYY',\n LLL : 'D [de] MMMM [de] YYYY H:mm',\n LLLL : 'dddd, D [de] MMMM [de] YYYY H:mm'\n },\n calendar : {\n sameDay : function () {\n return '[hoxe ' + ((this.hours() !== 1) ? 'ás' : 'á') + '] LT';\n },\n nextDay : function () {\n return '[mañá ' + ((this.hours() !== 1) ? 'ás' : 'á') + '] LT';\n },\n nextWeek : function () {\n return 'dddd [' + ((this.hours() !== 1) ? 'ás' : 'a') + '] LT';\n },\n lastDay : function () {\n return '[onte ' + ((this.hours() !== 1) ? 'á' : 'a') + '] LT';\n },\n lastWeek : function () {\n return '[o] dddd [pasado ' + ((this.hours() !== 1) ? 'ás' : 'a') + '] LT';\n },\n sameElse : 'L'\n },\n relativeTime : {\n future : function (str) {\n if (str.indexOf('un') === 0) {\n return 'n' + str;\n }\n return 'en ' + str;\n },\n past : 'hai %s',\n s : 'uns segundos',\n m : 'un minuto',\n mm : '%d minutos',\n h : 'unha hora',\n hh : '%d horas',\n d : 'un día',\n dd : '%d días',\n M : 'un mes',\n MM : '%d meses',\n y : 'un ano',\n yy : '%d anos'\n },\n dayOfMonthOrdinalParse : /\\d{1,2}º/,\n ordinal : '%dº',\n week : {\n dow : 1, // Monday is the first day of the week.\n doy : 4 // The week that contains Jan 4th is the first week of the year.\n }\n});\n\nreturn gl;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/gl.js\n// module id = 414\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/gl.js?", + ); + + /***/ + }, + /* 415 */ + /* unknown exports provided */ + /* all exports used */ + /*!*************************************!*\ + !*** ./~/moment/locale/gom-latn.js ***! + \*************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Konkani Latin script [gom-latn]\n//! author : The Discoverer : https://github.com/WikiDiscoverer\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nfunction processRelativeTime(number, withoutSuffix, key, isFuture) {\n var format = {\n 's': ['thodde secondanim', 'thodde second'],\n 'm': ['eka mintan', 'ek minute'],\n 'mm': [number + ' mintanim', number + ' mintam'],\n 'h': ['eka horan', 'ek hor'],\n 'hh': [number + ' horanim', number + ' hor'],\n 'd': ['eka disan', 'ek dis'],\n 'dd': [number + ' disanim', number + ' dis'],\n 'M': ['eka mhoinean', 'ek mhoino'],\n 'MM': [number + ' mhoineanim', number + ' mhoine'],\n 'y': ['eka vorsan', 'ek voros'],\n 'yy': [number + ' vorsanim', number + ' vorsam']\n };\n return withoutSuffix ? format[key][0] : format[key][1];\n}\n\nvar gomLatn = moment.defineLocale('gom-latn', {\n months : 'Janer_Febrer_Mars_Abril_Mai_Jun_Julai_Agost_Setembr_Otubr_Novembr_Dezembr'.split('_'),\n monthsShort : 'Jan._Feb._Mars_Abr._Mai_Jun_Jul._Ago._Set._Otu._Nov._Dez.'.split('_'),\n monthsParseExact : true,\n weekdays : 'Aitar_Somar_Mongllar_Budvar_Brestar_Sukrar_Son\\'var'.split('_'),\n weekdaysShort : 'Ait._Som._Mon._Bud._Bre._Suk._Son.'.split('_'),\n weekdaysMin : 'Ai_Sm_Mo_Bu_Br_Su_Sn'.split('_'),\n weekdaysParseExact : true,\n longDateFormat : {\n LT : 'A h:mm [vazta]',\n LTS : 'A h:mm:ss [vazta]',\n L : 'DD-MM-YYYY',\n LL : 'D MMMM YYYY',\n LLL : 'D MMMM YYYY A h:mm [vazta]',\n LLLL : 'dddd, MMMM[achea] Do, YYYY, A h:mm [vazta]',\n llll: 'ddd, D MMM YYYY, A h:mm [vazta]'\n },\n calendar : {\n sameDay: '[Aiz] LT',\n nextDay: '[Faleam] LT',\n nextWeek: '[Ieta to] dddd[,] LT',\n lastDay: '[Kal] LT',\n lastWeek: '[Fatlo] dddd[,] LT',\n sameElse: 'L'\n },\n relativeTime : {\n future : '%s',\n past : '%s adim',\n s : processRelativeTime,\n m : processRelativeTime,\n mm : processRelativeTime,\n h : processRelativeTime,\n hh : processRelativeTime,\n d : processRelativeTime,\n dd : processRelativeTime,\n M : processRelativeTime,\n MM : processRelativeTime,\n y : processRelativeTime,\n yy : processRelativeTime\n },\n dayOfMonthOrdinalParse : /\\d{1,2}(er)/,\n ordinal : function (number, period) {\n switch (period) {\n // the ordinal 'er' only applies to day of the month\n case 'D':\n return number + 'er';\n default:\n case 'M':\n case 'Q':\n case 'DDD':\n case 'd':\n case 'w':\n case 'W':\n return number;\n }\n },\n week : {\n dow : 1, // Monday is the first day of the week.\n doy : 4 // The week that contains Jan 4th is the first week of the year.\n },\n meridiemParse: /rati|sokalli|donparam|sanje/,\n meridiemHour : function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'rati') {\n return hour < 4 ? hour : hour + 12;\n } else if (meridiem === 'sokalli') {\n return hour;\n } else if (meridiem === 'donparam') {\n return hour > 12 ? hour : hour + 12;\n } else if (meridiem === 'sanje') {\n return hour + 12;\n }\n },\n meridiem : function (hour, minute, isLower) {\n if (hour < 4) {\n return 'rati';\n } else if (hour < 12) {\n return 'sokalli';\n } else if (hour < 16) {\n return 'donparam';\n } else if (hour < 20) {\n return 'sanje';\n } else {\n return 'rati';\n }\n }\n});\n\nreturn gomLatn;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/gom-latn.js\n// module id = 415\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/gom-latn.js?", + ); + + /***/ + }, + /* 416 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/moment/locale/he.js ***! + \*******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Hebrew [he]\n//! author : Tomer Cohen : https://github.com/tomer\n//! author : Moshe Simantov : https://github.com/DevelopmentIL\n//! author : Tal Ater : https://github.com/TalAter\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar he = moment.defineLocale('he', {\n months : 'ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר'.split('_'),\n monthsShort : 'ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳'.split('_'),\n weekdays : 'ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת'.split('_'),\n weekdaysShort : 'א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳'.split('_'),\n weekdaysMin : 'א_ב_ג_ד_ה_ו_ש'.split('_'),\n longDateFormat : {\n LT : 'HH:mm',\n LTS : 'HH:mm:ss',\n L : 'DD/MM/YYYY',\n LL : 'D [ב]MMMM YYYY',\n LLL : 'D [ב]MMMM YYYY HH:mm',\n LLLL : 'dddd, D [ב]MMMM YYYY HH:mm',\n l : 'D/M/YYYY',\n ll : 'D MMM YYYY',\n lll : 'D MMM YYYY HH:mm',\n llll : 'ddd, D MMM YYYY HH:mm'\n },\n calendar : {\n sameDay : '[היום ב־]LT',\n nextDay : '[מחר ב־]LT',\n nextWeek : 'dddd [בשעה] LT',\n lastDay : '[אתמול ב־]LT',\n lastWeek : '[ביום] dddd [האחרון בשעה] LT',\n sameElse : 'L'\n },\n relativeTime : {\n future : 'בעוד %s',\n past : 'לפני %s',\n s : 'מספר שניות',\n m : 'דקה',\n mm : '%d דקות',\n h : 'שעה',\n hh : function (number) {\n if (number === 2) {\n return 'שעתיים';\n }\n return number + ' שעות';\n },\n d : 'יום',\n dd : function (number) {\n if (number === 2) {\n return 'יומיים';\n }\n return number + ' ימים';\n },\n M : 'חודש',\n MM : function (number) {\n if (number === 2) {\n return 'חודשיים';\n }\n return number + ' חודשים';\n },\n y : 'שנה',\n yy : function (number) {\n if (number === 2) {\n return 'שנתיים';\n } else if (number % 10 === 0 && number !== 10) {\n return number + ' שנה';\n }\n return number + ' שנים';\n }\n },\n meridiemParse: /אחה\"צ|לפנה\"צ|אחרי הצהריים|לפני הצהריים|לפנות בוקר|בבוקר|בערב/i,\n isPM : function (input) {\n return /^(אחה\"צ|אחרי הצהריים|בערב)$/.test(input);\n },\n meridiem : function (hour, minute, isLower) {\n if (hour < 5) {\n return 'לפנות בוקר';\n } else if (hour < 10) {\n return 'בבוקר';\n } else if (hour < 12) {\n return isLower ? 'לפנה\"צ' : 'לפני הצהריים';\n } else if (hour < 18) {\n return isLower ? 'אחה\"צ' : 'אחרי הצהריים';\n } else {\n return 'בערב';\n }\n }\n});\n\nreturn he;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/he.js\n// module id = 416\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/he.js?", + ); + + /***/ + }, + /* 417 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/moment/locale/hi.js ***! + \*******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Hindi [hi]\n//! author : Mayank Singhal : https://github.com/mayanksinghal\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar symbolMap = {\n '1': '१',\n '2': '२',\n '3': '३',\n '4': '४',\n '5': '५',\n '6': '६',\n '7': '७',\n '8': '८',\n '9': '९',\n '0': '०'\n};\nvar numberMap = {\n '१': '1',\n '२': '2',\n '३': '3',\n '४': '4',\n '५': '5',\n '६': '6',\n '७': '7',\n '८': '8',\n '९': '9',\n '०': '0'\n};\n\nvar hi = moment.defineLocale('hi', {\n months : 'जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर'.split('_'),\n monthsShort : 'जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.'.split('_'),\n monthsParseExact: true,\n weekdays : 'रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'),\n weekdaysShort : 'रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि'.split('_'),\n weekdaysMin : 'र_सो_मं_बु_गु_शु_श'.split('_'),\n longDateFormat : {\n LT : 'A h:mm बजे',\n LTS : 'A h:mm:ss बजे',\n L : 'DD/MM/YYYY',\n LL : 'D MMMM YYYY',\n LLL : 'D MMMM YYYY, A h:mm बजे',\n LLLL : 'dddd, D MMMM YYYY, A h:mm बजे'\n },\n calendar : {\n sameDay : '[आज] LT',\n nextDay : '[कल] LT',\n nextWeek : 'dddd, LT',\n lastDay : '[कल] LT',\n lastWeek : '[पिछले] dddd, LT',\n sameElse : 'L'\n },\n relativeTime : {\n future : '%s में',\n past : '%s पहले',\n s : 'कुछ ही क्षण',\n m : 'एक मिनट',\n mm : '%d मिनट',\n h : 'एक घंटा',\n hh : '%d घंटे',\n d : 'एक दिन',\n dd : '%d दिन',\n M : 'एक महीने',\n MM : '%d महीने',\n y : 'एक वर्ष',\n yy : '%d वर्ष'\n },\n preparse: function (string) {\n return string.replace(/[१२३४५६७८९०]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function (string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n // Hindi notation for meridiems are quite fuzzy in practice. While there exists\n // a rigid notion of a 'Pahar' it is not used as rigidly in modern Hindi.\n meridiemParse: /रात|सुबह|दोपहर|शाम/,\n meridiemHour : function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'रात') {\n return hour < 4 ? hour : hour + 12;\n } else if (meridiem === 'सुबह') {\n return hour;\n } else if (meridiem === 'दोपहर') {\n return hour >= 10 ? hour : hour + 12;\n } else if (meridiem === 'शाम') {\n return hour + 12;\n }\n },\n meridiem : function (hour, minute, isLower) {\n if (hour < 4) {\n return 'रात';\n } else if (hour < 10) {\n return 'सुबह';\n } else if (hour < 17) {\n return 'दोपहर';\n } else if (hour < 20) {\n return 'शाम';\n } else {\n return 'रात';\n }\n },\n week : {\n dow : 0, // Sunday is the first day of the week.\n doy : 6 // The week that contains Jan 1st is the first week of the year.\n }\n});\n\nreturn hi;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/hi.js\n// module id = 417\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/hi.js?", + ); + + /***/ + }, + /* 418 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/moment/locale/hr.js ***! + \*******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Croatian [hr]\n//! author : Bojan Marković : https://github.com/bmarkovic\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nfunction translate(number, withoutSuffix, key) {\n var result = number + ' ';\n switch (key) {\n case 'm':\n return withoutSuffix ? 'jedna minuta' : 'jedne minute';\n case 'mm':\n if (number === 1) {\n result += 'minuta';\n } else if (number === 2 || number === 3 || number === 4) {\n result += 'minute';\n } else {\n result += 'minuta';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'jedan sat' : 'jednog sata';\n case 'hh':\n if (number === 1) {\n result += 'sat';\n } else if (number === 2 || number === 3 || number === 4) {\n result += 'sata';\n } else {\n result += 'sati';\n }\n return result;\n case 'dd':\n if (number === 1) {\n result += 'dan';\n } else {\n result += 'dana';\n }\n return result;\n case 'MM':\n if (number === 1) {\n result += 'mjesec';\n } else if (number === 2 || number === 3 || number === 4) {\n result += 'mjeseca';\n } else {\n result += 'mjeseci';\n }\n return result;\n case 'yy':\n if (number === 1) {\n result += 'godina';\n } else if (number === 2 || number === 3 || number === 4) {\n result += 'godine';\n } else {\n result += 'godina';\n }\n return result;\n }\n}\n\nvar hr = moment.defineLocale('hr', {\n months : {\n format: 'siječnja_veljače_ožujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca'.split('_'),\n standalone: 'siječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac'.split('_')\n },\n monthsShort : 'sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.'.split('_'),\n monthsParseExact: true,\n weekdays : 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split('_'),\n weekdaysShort : 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),\n weekdaysMin : 'ne_po_ut_sr_če_pe_su'.split('_'),\n weekdaysParseExact : true,\n longDateFormat : {\n LT : 'H:mm',\n LTS : 'H:mm:ss',\n L : 'DD.MM.YYYY',\n LL : 'D. MMMM YYYY',\n LLL : 'D. MMMM YYYY H:mm',\n LLLL : 'dddd, D. MMMM YYYY H:mm'\n },\n calendar : {\n sameDay : '[danas u] LT',\n nextDay : '[sutra u] LT',\n nextWeek : function () {\n switch (this.day()) {\n case 0:\n return '[u] [nedjelju] [u] LT';\n case 3:\n return '[u] [srijedu] [u] LT';\n case 6:\n return '[u] [subotu] [u] LT';\n case 1:\n case 2:\n case 4:\n case 5:\n return '[u] dddd [u] LT';\n }\n },\n lastDay : '[jučer u] LT',\n lastWeek : function () {\n switch (this.day()) {\n case 0:\n case 3:\n return '[prošlu] dddd [u] LT';\n case 6:\n return '[prošle] [subote] [u] LT';\n case 1:\n case 2:\n case 4:\n case 5:\n return '[prošli] dddd [u] LT';\n }\n },\n sameElse : 'L'\n },\n relativeTime : {\n future : 'za %s',\n past : 'prije %s',\n s : 'par sekundi',\n m : translate,\n mm : translate,\n h : translate,\n hh : translate,\n d : 'dan',\n dd : translate,\n M : 'mjesec',\n MM : translate,\n y : 'godinu',\n yy : translate\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal : '%d.',\n week : {\n dow : 1, // Monday is the first day of the week.\n doy : 7 // The week that contains Jan 1st is the first week of the year.\n }\n});\n\nreturn hr;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/hr.js\n// module id = 418\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/hr.js?", + ); + + /***/ + }, + /* 419 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/moment/locale/hu.js ***! + \*******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Hungarian [hu]\n//! author : Adam Brunner : https://github.com/adambrunner\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar weekEndings = 'vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton'.split(' ');\nfunction translate(number, withoutSuffix, key, isFuture) {\n var num = number,\n suffix;\n switch (key) {\n case 's':\n return (isFuture || withoutSuffix) ? 'néhány másodperc' : 'néhány másodperce';\n case 'm':\n return 'egy' + (isFuture || withoutSuffix ? ' perc' : ' perce');\n case 'mm':\n return num + (isFuture || withoutSuffix ? ' perc' : ' perce');\n case 'h':\n return 'egy' + (isFuture || withoutSuffix ? ' óra' : ' órája');\n case 'hh':\n return num + (isFuture || withoutSuffix ? ' óra' : ' órája');\n case 'd':\n return 'egy' + (isFuture || withoutSuffix ? ' nap' : ' napja');\n case 'dd':\n return num + (isFuture || withoutSuffix ? ' nap' : ' napja');\n case 'M':\n return 'egy' + (isFuture || withoutSuffix ? ' hónap' : ' hónapja');\n case 'MM':\n return num + (isFuture || withoutSuffix ? ' hónap' : ' hónapja');\n case 'y':\n return 'egy' + (isFuture || withoutSuffix ? ' év' : ' éve');\n case 'yy':\n return num + (isFuture || withoutSuffix ? ' év' : ' éve');\n }\n return '';\n}\nfunction week(isFuture) {\n return (isFuture ? '' : '[múlt] ') + '[' + weekEndings[this.day()] + '] LT[-kor]';\n}\n\nvar hu = moment.defineLocale('hu', {\n months : 'január_február_március_április_május_június_július_augusztus_szeptember_október_november_december'.split('_'),\n monthsShort : 'jan_feb_márc_ápr_máj_jún_júl_aug_szept_okt_nov_dec'.split('_'),\n weekdays : 'vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat'.split('_'),\n weekdaysShort : 'vas_hét_kedd_sze_csüt_pén_szo'.split('_'),\n weekdaysMin : 'v_h_k_sze_cs_p_szo'.split('_'),\n longDateFormat : {\n LT : 'H:mm',\n LTS : 'H:mm:ss',\n L : 'YYYY.MM.DD.',\n LL : 'YYYY. MMMM D.',\n LLL : 'YYYY. MMMM D. H:mm',\n LLLL : 'YYYY. MMMM D., dddd H:mm'\n },\n meridiemParse: /de|du/i,\n isPM: function (input) {\n return input.charAt(1).toLowerCase() === 'u';\n },\n meridiem : function (hours, minutes, isLower) {\n if (hours < 12) {\n return isLower === true ? 'de' : 'DE';\n } else {\n return isLower === true ? 'du' : 'DU';\n }\n },\n calendar : {\n sameDay : '[ma] LT[-kor]',\n nextDay : '[holnap] LT[-kor]',\n nextWeek : function () {\n return week.call(this, true);\n },\n lastDay : '[tegnap] LT[-kor]',\n lastWeek : function () {\n return week.call(this, false);\n },\n sameElse : 'L'\n },\n relativeTime : {\n future : '%s múlva',\n past : '%s',\n s : translate,\n m : translate,\n mm : translate,\n h : translate,\n hh : translate,\n d : translate,\n dd : translate,\n M : translate,\n MM : translate,\n y : translate,\n yy : translate\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal : '%d.',\n week : {\n dow : 1, // Monday is the first day of the week.\n doy : 4 // The week that contains Jan 4th is the first week of the year.\n }\n});\n\nreturn hu;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/hu.js\n// module id = 419\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/hu.js?", + ); + + /***/ + }, + /* 420 */ + /* unknown exports provided */ + /* all exports used */ + /*!**********************************!*\ + !*** ./~/moment/locale/hy-am.js ***! + \**********************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Armenian [hy-am]\n//! author : Armendarabyan : https://github.com/armendarabyan\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar hyAm = moment.defineLocale('hy-am', {\n months : {\n format: 'հունվարի_փետրվարի_մարտի_ապրիլի_մայիսի_հունիսի_հուլիսի_օգոստոսի_սեպտեմբերի_հոկտեմբերի_նոյեմբերի_դեկտեմբերի'.split('_'),\n standalone: 'հունվար_փետրվար_մարտ_ապրիլ_մայիս_հունիս_հուլիս_օգոստոս_սեպտեմբեր_հոկտեմբեր_նոյեմբեր_դեկտեմբեր'.split('_')\n },\n monthsShort : 'հնվ_փտր_մրտ_ապր_մյս_հնս_հլս_օգս_սպտ_հկտ_նմբ_դկտ'.split('_'),\n weekdays : 'կիրակի_երկուշաբթի_երեքշաբթի_չորեքշաբթի_հինգշաբթի_ուրբաթ_շաբաթ'.split('_'),\n weekdaysShort : 'կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ'.split('_'),\n weekdaysMin : 'կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ'.split('_'),\n longDateFormat : {\n LT : 'HH:mm',\n LTS : 'HH:mm:ss',\n L : 'DD.MM.YYYY',\n LL : 'D MMMM YYYY թ.',\n LLL : 'D MMMM YYYY թ., HH:mm',\n LLLL : 'dddd, D MMMM YYYY թ., HH:mm'\n },\n calendar : {\n sameDay: '[այսօր] LT',\n nextDay: '[վաղը] LT',\n lastDay: '[երեկ] LT',\n nextWeek: function () {\n return 'dddd [օրը ժամը] LT';\n },\n lastWeek: function () {\n return '[անցած] dddd [օրը ժամը] LT';\n },\n sameElse: 'L'\n },\n relativeTime : {\n future : '%s հետո',\n past : '%s առաջ',\n s : 'մի քանի վայրկյան',\n m : 'րոպե',\n mm : '%d րոպե',\n h : 'ժամ',\n hh : '%d ժամ',\n d : 'օր',\n dd : '%d օր',\n M : 'ամիս',\n MM : '%d ամիս',\n y : 'տարի',\n yy : '%d տարի'\n },\n meridiemParse: /գիշերվա|առավոտվա|ցերեկվա|երեկոյան/,\n isPM: function (input) {\n return /^(ցերեկվա|երեկոյան)$/.test(input);\n },\n meridiem : function (hour) {\n if (hour < 4) {\n return 'գիշերվա';\n } else if (hour < 12) {\n return 'առավոտվա';\n } else if (hour < 17) {\n return 'ցերեկվա';\n } else {\n return 'երեկոյան';\n }\n },\n dayOfMonthOrdinalParse: /\\d{1,2}|\\d{1,2}-(ին|րդ)/,\n ordinal: function (number, period) {\n switch (period) {\n case 'DDD':\n case 'w':\n case 'W':\n case 'DDDo':\n if (number === 1) {\n return number + '-ին';\n }\n return number + '-րդ';\n default:\n return number;\n }\n },\n week : {\n dow : 1, // Monday is the first day of the week.\n doy : 7 // The week that contains Jan 1st is the first week of the year.\n }\n});\n\nreturn hyAm;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/hy-am.js\n// module id = 420\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/hy-am.js?", + ); + + /***/ + }, + /* 421 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/moment/locale/id.js ***! + \*******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Indonesian [id]\n//! author : Mohammad Satrio Utomo : https://github.com/tyok\n//! reference: http://id.wikisource.org/wiki/Pedoman_Umum_Ejaan_Bahasa_Indonesia_yang_Disempurnakan\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar id = moment.defineLocale('id', {\n months : 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember'.split('_'),\n monthsShort : 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nov_Des'.split('_'),\n weekdays : 'Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu'.split('_'),\n weekdaysShort : 'Min_Sen_Sel_Rab_Kam_Jum_Sab'.split('_'),\n weekdaysMin : 'Mg_Sn_Sl_Rb_Km_Jm_Sb'.split('_'),\n longDateFormat : {\n LT : 'HH.mm',\n LTS : 'HH.mm.ss',\n L : 'DD/MM/YYYY',\n LL : 'D MMMM YYYY',\n LLL : 'D MMMM YYYY [pukul] HH.mm',\n LLLL : 'dddd, D MMMM YYYY [pukul] HH.mm'\n },\n meridiemParse: /pagi|siang|sore|malam/,\n meridiemHour : function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'pagi') {\n return hour;\n } else if (meridiem === 'siang') {\n return hour >= 11 ? hour : hour + 12;\n } else if (meridiem === 'sore' || meridiem === 'malam') {\n return hour + 12;\n }\n },\n meridiem : function (hours, minutes, isLower) {\n if (hours < 11) {\n return 'pagi';\n } else if (hours < 15) {\n return 'siang';\n } else if (hours < 19) {\n return 'sore';\n } else {\n return 'malam';\n }\n },\n calendar : {\n sameDay : '[Hari ini pukul] LT',\n nextDay : '[Besok pukul] LT',\n nextWeek : 'dddd [pukul] LT',\n lastDay : '[Kemarin pukul] LT',\n lastWeek : 'dddd [lalu pukul] LT',\n sameElse : 'L'\n },\n relativeTime : {\n future : 'dalam %s',\n past : '%s yang lalu',\n s : 'beberapa detik',\n m : 'semenit',\n mm : '%d menit',\n h : 'sejam',\n hh : '%d jam',\n d : 'sehari',\n dd : '%d hari',\n M : 'sebulan',\n MM : '%d bulan',\n y : 'setahun',\n yy : '%d tahun'\n },\n week : {\n dow : 1, // Monday is the first day of the week.\n doy : 7 // The week that contains Jan 1st is the first week of the year.\n }\n});\n\nreturn id;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/id.js\n// module id = 421\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/id.js?", + ); + + /***/ + }, + /* 422 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/moment/locale/is.js ***! + \*******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Icelandic [is]\n//! author : Hinrik Örn Sigurðsson : https://github.com/hinrik\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nfunction plural(n) {\n if (n % 100 === 11) {\n return true;\n } else if (n % 10 === 1) {\n return false;\n }\n return true;\n}\nfunction translate(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture ? 'nokkrar sekúndur' : 'nokkrum sekúndum';\n case 'm':\n return withoutSuffix ? 'mínúta' : 'mínútu';\n case 'mm':\n if (plural(number)) {\n return result + (withoutSuffix || isFuture ? 'mínútur' : 'mínútum');\n } else if (withoutSuffix) {\n return result + 'mínúta';\n }\n return result + 'mínútu';\n case 'hh':\n if (plural(number)) {\n return result + (withoutSuffix || isFuture ? 'klukkustundir' : 'klukkustundum');\n }\n return result + 'klukkustund';\n case 'd':\n if (withoutSuffix) {\n return 'dagur';\n }\n return isFuture ? 'dag' : 'degi';\n case 'dd':\n if (plural(number)) {\n if (withoutSuffix) {\n return result + 'dagar';\n }\n return result + (isFuture ? 'daga' : 'dögum');\n } else if (withoutSuffix) {\n return result + 'dagur';\n }\n return result + (isFuture ? 'dag' : 'degi');\n case 'M':\n if (withoutSuffix) {\n return 'mánuður';\n }\n return isFuture ? 'mánuð' : 'mánuði';\n case 'MM':\n if (plural(number)) {\n if (withoutSuffix) {\n return result + 'mánuðir';\n }\n return result + (isFuture ? 'mánuði' : 'mánuðum');\n } else if (withoutSuffix) {\n return result + 'mánuður';\n }\n return result + (isFuture ? 'mánuð' : 'mánuði');\n case 'y':\n return withoutSuffix || isFuture ? 'ár' : 'ári';\n case 'yy':\n if (plural(number)) {\n return result + (withoutSuffix || isFuture ? 'ár' : 'árum');\n }\n return result + (withoutSuffix || isFuture ? 'ár' : 'ári');\n }\n}\n\nvar is = moment.defineLocale('is', {\n months : 'janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember'.split('_'),\n monthsShort : 'jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des'.split('_'),\n weekdays : 'sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur'.split('_'),\n weekdaysShort : 'sun_mán_þri_mið_fim_fös_lau'.split('_'),\n weekdaysMin : 'Su_Má_Þr_Mi_Fi_Fö_La'.split('_'),\n longDateFormat : {\n LT : 'H:mm',\n LTS : 'H:mm:ss',\n L : 'DD.MM.YYYY',\n LL : 'D. MMMM YYYY',\n LLL : 'D. MMMM YYYY [kl.] H:mm',\n LLLL : 'dddd, D. MMMM YYYY [kl.] H:mm'\n },\n calendar : {\n sameDay : '[í dag kl.] LT',\n nextDay : '[á morgun kl.] LT',\n nextWeek : 'dddd [kl.] LT',\n lastDay : '[í gær kl.] LT',\n lastWeek : '[síðasta] dddd [kl.] LT',\n sameElse : 'L'\n },\n relativeTime : {\n future : 'eftir %s',\n past : 'fyrir %s síðan',\n s : translate,\n m : translate,\n mm : translate,\n h : 'klukkustund',\n hh : translate,\n d : translate,\n dd : translate,\n M : translate,\n MM : translate,\n y : translate,\n yy : translate\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal : '%d.',\n week : {\n dow : 1, // Monday is the first day of the week.\n doy : 4 // The week that contains Jan 4th is the first week of the year.\n }\n});\n\nreturn is;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/is.js\n// module id = 422\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/is.js?", + ); + + /***/ + }, + /* 423 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/moment/locale/it.js ***! + \*******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Italian [it]\n//! author : Lorenzo : https://github.com/aliem\n//! author: Mattia Larentis: https://github.com/nostalgiaz\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar it = moment.defineLocale('it', {\n months : 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split('_'),\n monthsShort : 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'),\n weekdays : 'domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato'.split('_'),\n weekdaysShort : 'dom_lun_mar_mer_gio_ven_sab'.split('_'),\n weekdaysMin : 'do_lu_ma_me_gi_ve_sa'.split('_'),\n longDateFormat : {\n LT : 'HH:mm',\n LTS : 'HH:mm:ss',\n L : 'DD/MM/YYYY',\n LL : 'D MMMM YYYY',\n LLL : 'D MMMM YYYY HH:mm',\n LLLL : 'dddd, D MMMM YYYY HH:mm'\n },\n calendar : {\n sameDay: '[Oggi alle] LT',\n nextDay: '[Domani alle] LT',\n nextWeek: 'dddd [alle] LT',\n lastDay: '[Ieri alle] LT',\n lastWeek: function () {\n switch (this.day()) {\n case 0:\n return '[la scorsa] dddd [alle] LT';\n default:\n return '[lo scorso] dddd [alle] LT';\n }\n },\n sameElse: 'L'\n },\n relativeTime : {\n future : function (s) {\n return ((/^[0-9].+$/).test(s) ? 'tra' : 'in') + ' ' + s;\n },\n past : '%s fa',\n s : 'alcuni secondi',\n m : 'un minuto',\n mm : '%d minuti',\n h : 'un\\'ora',\n hh : '%d ore',\n d : 'un giorno',\n dd : '%d giorni',\n M : 'un mese',\n MM : '%d mesi',\n y : 'un anno',\n yy : '%d anni'\n },\n dayOfMonthOrdinalParse : /\\d{1,2}º/,\n ordinal: '%dº',\n week : {\n dow : 1, // Monday is the first day of the week.\n doy : 4 // The week that contains Jan 4th is the first week of the year.\n }\n});\n\nreturn it;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/it.js\n// module id = 423\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/it.js?", + ); + + /***/ + }, + /* 424 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/moment/locale/ja.js ***! + \*******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Japanese [ja]\n//! author : LI Long : https://github.com/baryon\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar ja = moment.defineLocale('ja', {\n months : '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),\n monthsShort : '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),\n weekdays : '日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日'.split('_'),\n weekdaysShort : '日_月_火_水_木_金_土'.split('_'),\n weekdaysMin : '日_月_火_水_木_金_土'.split('_'),\n longDateFormat : {\n LT : 'HH:mm',\n LTS : 'HH:mm:ss',\n L : 'YYYY/MM/DD',\n LL : 'YYYY年M月D日',\n LLL : 'YYYY年M月D日 HH:mm',\n LLLL : 'YYYY年M月D日 HH:mm dddd',\n l : 'YYYY/MM/DD',\n ll : 'YYYY年M月D日',\n lll : 'YYYY年M月D日 HH:mm',\n llll : 'YYYY年M月D日 HH:mm dddd'\n },\n meridiemParse: /午前|午後/i,\n isPM : function (input) {\n return input === '午後';\n },\n meridiem : function (hour, minute, isLower) {\n if (hour < 12) {\n return '午前';\n } else {\n return '午後';\n }\n },\n calendar : {\n sameDay : '[今日] LT',\n nextDay : '[明日] LT',\n nextWeek : '[来週]dddd LT',\n lastDay : '[昨日] LT',\n lastWeek : '[前週]dddd LT',\n sameElse : 'L'\n },\n dayOfMonthOrdinalParse : /\\d{1,2}日/,\n ordinal : function (number, period) {\n switch (period) {\n case 'd':\n case 'D':\n case 'DDD':\n return number + '日';\n default:\n return number;\n }\n },\n relativeTime : {\n future : '%s後',\n past : '%s前',\n s : '数秒',\n m : '1分',\n mm : '%d分',\n h : '1時間',\n hh : '%d時間',\n d : '1日',\n dd : '%d日',\n M : '1ヶ月',\n MM : '%dヶ月',\n y : '1年',\n yy : '%d年'\n }\n});\n\nreturn ja;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/ja.js\n// module id = 424\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/ja.js?", + ); + + /***/ + }, + /* 425 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/moment/locale/jv.js ***! + \*******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Javanese [jv]\n//! author : Rony Lantip : https://github.com/lantip\n//! reference: http://jv.wikipedia.org/wiki/Basa_Jawa\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar jv = moment.defineLocale('jv', {\n months : 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_Nopember_Desember'.split('_'),\n monthsShort : 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nop_Des'.split('_'),\n weekdays : 'Minggu_Senen_Seloso_Rebu_Kemis_Jemuwah_Septu'.split('_'),\n weekdaysShort : 'Min_Sen_Sel_Reb_Kem_Jem_Sep'.split('_'),\n weekdaysMin : 'Mg_Sn_Sl_Rb_Km_Jm_Sp'.split('_'),\n longDateFormat : {\n LT : 'HH.mm',\n LTS : 'HH.mm.ss',\n L : 'DD/MM/YYYY',\n LL : 'D MMMM YYYY',\n LLL : 'D MMMM YYYY [pukul] HH.mm',\n LLLL : 'dddd, D MMMM YYYY [pukul] HH.mm'\n },\n meridiemParse: /enjing|siyang|sonten|ndalu/,\n meridiemHour : function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'enjing') {\n return hour;\n } else if (meridiem === 'siyang') {\n return hour >= 11 ? hour : hour + 12;\n } else if (meridiem === 'sonten' || meridiem === 'ndalu') {\n return hour + 12;\n }\n },\n meridiem : function (hours, minutes, isLower) {\n if (hours < 11) {\n return 'enjing';\n } else if (hours < 15) {\n return 'siyang';\n } else if (hours < 19) {\n return 'sonten';\n } else {\n return 'ndalu';\n }\n },\n calendar : {\n sameDay : '[Dinten puniko pukul] LT',\n nextDay : '[Mbenjang pukul] LT',\n nextWeek : 'dddd [pukul] LT',\n lastDay : '[Kala wingi pukul] LT',\n lastWeek : 'dddd [kepengker pukul] LT',\n sameElse : 'L'\n },\n relativeTime : {\n future : 'wonten ing %s',\n past : '%s ingkang kepengker',\n s : 'sawetawis detik',\n m : 'setunggal menit',\n mm : '%d menit',\n h : 'setunggal jam',\n hh : '%d jam',\n d : 'sedinten',\n dd : '%d dinten',\n M : 'sewulan',\n MM : '%d wulan',\n y : 'setaun',\n yy : '%d taun'\n },\n week : {\n dow : 1, // Monday is the first day of the week.\n doy : 7 // The week that contains Jan 1st is the first week of the year.\n }\n});\n\nreturn jv;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/jv.js\n// module id = 425\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/jv.js?", + ); + + /***/ + }, + /* 426 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/moment/locale/ka.js ***! + \*******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Georgian [ka]\n//! author : Irakli Janiashvili : https://github.com/irakli-janiashvili\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar ka = moment.defineLocale('ka', {\n months : {\n standalone: 'იანვარი_თებერვალი_მარტი_აპრილი_მაისი_ივნისი_ივლისი_აგვისტო_სექტემბერი_ოქტომბერი_ნოემბერი_დეკემბერი'.split('_'),\n format: 'იანვარს_თებერვალს_მარტს_აპრილის_მაისს_ივნისს_ივლისს_აგვისტს_სექტემბერს_ოქტომბერს_ნოემბერს_დეკემბერს'.split('_')\n },\n monthsShort : 'იან_თებ_მარ_აპრ_მაი_ივნ_ივლ_აგვ_სექ_ოქტ_ნოე_დეკ'.split('_'),\n weekdays : {\n standalone: 'კვირა_ორშაბათი_სამშაბათი_ოთხშაბათი_ხუთშაბათი_პარასკევი_შაბათი'.split('_'),\n format: 'კვირას_ორშაბათს_სამშაბათს_ოთხშაბათს_ხუთშაბათს_პარასკევს_შაბათს'.split('_'),\n isFormat: /(წინა|შემდეგ)/\n },\n weekdaysShort : 'კვი_ორშ_სამ_ოთხ_ხუთ_პარ_შაბ'.split('_'),\n weekdaysMin : 'კვ_ორ_სა_ოთ_ხუ_პა_შა'.split('_'),\n longDateFormat : {\n LT : 'h:mm A',\n LTS : 'h:mm:ss A',\n L : 'DD/MM/YYYY',\n LL : 'D MMMM YYYY',\n LLL : 'D MMMM YYYY h:mm A',\n LLLL : 'dddd, D MMMM YYYY h:mm A'\n },\n calendar : {\n sameDay : '[დღეს] LT[-ზე]',\n nextDay : '[ხვალ] LT[-ზე]',\n lastDay : '[გუშინ] LT[-ზე]',\n nextWeek : '[შემდეგ] dddd LT[-ზე]',\n lastWeek : '[წინა] dddd LT-ზე',\n sameElse : 'L'\n },\n relativeTime : {\n future : function (s) {\n return (/(წამი|წუთი|საათი|წელი)/).test(s) ?\n s.replace(/ი$/, 'ში') :\n s + 'ში';\n },\n past : function (s) {\n if ((/(წამი|წუთი|საათი|დღე|თვე)/).test(s)) {\n return s.replace(/(ი|ე)$/, 'ის უკან');\n }\n if ((/წელი/).test(s)) {\n return s.replace(/წელი$/, 'წლის უკან');\n }\n },\n s : 'რამდენიმე წამი',\n m : 'წუთი',\n mm : '%d წუთი',\n h : 'საათი',\n hh : '%d საათი',\n d : 'დღე',\n dd : '%d დღე',\n M : 'თვე',\n MM : '%d თვე',\n y : 'წელი',\n yy : '%d წელი'\n },\n dayOfMonthOrdinalParse: /0|1-ლი|მე-\\d{1,2}|\\d{1,2}-ე/,\n ordinal : function (number) {\n if (number === 0) {\n return number;\n }\n if (number === 1) {\n return number + '-ლი';\n }\n if ((number < 20) || (number <= 100 && (number % 20 === 0)) || (number % 100 === 0)) {\n return 'მე-' + number;\n }\n return number + '-ე';\n },\n week : {\n dow : 1,\n doy : 7\n }\n});\n\nreturn ka;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/ka.js\n// module id = 426\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/ka.js?", + ); + + /***/ + }, + /* 427 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/moment/locale/kk.js ***! + \*******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Kazakh [kk]\n//! authors : Nurlan Rakhimzhanov : https://github.com/nurlan\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar suffixes = {\n 0: '-ші',\n 1: '-ші',\n 2: '-ші',\n 3: '-ші',\n 4: '-ші',\n 5: '-ші',\n 6: '-шы',\n 7: '-ші',\n 8: '-ші',\n 9: '-шы',\n 10: '-шы',\n 20: '-шы',\n 30: '-шы',\n 40: '-шы',\n 50: '-ші',\n 60: '-шы',\n 70: '-ші',\n 80: '-ші',\n 90: '-шы',\n 100: '-ші'\n};\n\nvar kk = moment.defineLocale('kk', {\n months : 'қаңтар_ақпан_наурыз_сәуір_мамыр_маусым_шілде_тамыз_қыркүйек_қазан_қараша_желтоқсан'.split('_'),\n monthsShort : 'қаң_ақп_нау_сәу_мам_мау_шіл_там_қыр_қаз_қар_жел'.split('_'),\n weekdays : 'жексенбі_дүйсенбі_сейсенбі_сәрсенбі_бейсенбі_жұма_сенбі'.split('_'),\n weekdaysShort : 'жек_дүй_сей_сәр_бей_жұм_сен'.split('_'),\n weekdaysMin : 'жк_дй_сй_ср_бй_жм_сн'.split('_'),\n longDateFormat : {\n LT : 'HH:mm',\n LTS : 'HH:mm:ss',\n L : 'DD.MM.YYYY',\n LL : 'D MMMM YYYY',\n LLL : 'D MMMM YYYY HH:mm',\n LLLL : 'dddd, D MMMM YYYY HH:mm'\n },\n calendar : {\n sameDay : '[Бүгін сағат] LT',\n nextDay : '[Ертең сағат] LT',\n nextWeek : 'dddd [сағат] LT',\n lastDay : '[Кеше сағат] LT',\n lastWeek : '[Өткен аптаның] dddd [сағат] LT',\n sameElse : 'L'\n },\n relativeTime : {\n future : '%s ішінде',\n past : '%s бұрын',\n s : 'бірнеше секунд',\n m : 'бір минут',\n mm : '%d минут',\n h : 'бір сағат',\n hh : '%d сағат',\n d : 'бір күн',\n dd : '%d күн',\n M : 'бір ай',\n MM : '%d ай',\n y : 'бір жыл',\n yy : '%d жыл'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-(ші|шы)/,\n ordinal : function (number) {\n var a = number % 10,\n b = number >= 100 ? 100 : null;\n return number + (suffixes[number] || suffixes[a] || suffixes[b]);\n },\n week : {\n dow : 1, // Monday is the first day of the week.\n doy : 7 // The week that contains Jan 1st is the first week of the year.\n }\n});\n\nreturn kk;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/kk.js\n// module id = 427\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/kk.js?", + ); + + /***/ + }, + /* 428 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/moment/locale/km.js ***! + \*******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Cambodian [km]\n//! author : Kruy Vanna : https://github.com/kruyvanna\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar km = moment.defineLocale('km', {\n months: 'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split('_'),\n monthsShort: 'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split('_'),\n weekdays: 'អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍'.split('_'),\n weekdaysShort: 'អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍'.split('_'),\n weekdaysMin: 'អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS : 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[ថ្ងៃនេះ ម៉ោង] LT',\n nextDay: '[ស្អែក ម៉ោង] LT',\n nextWeek: 'dddd [ម៉ោង] LT',\n lastDay: '[ម្សិលមិញ ម៉ោង] LT',\n lastWeek: 'dddd [សប្តាហ៍មុន] [ម៉ោង] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%sទៀត',\n past: '%sមុន',\n s: 'ប៉ុន្មានវិនាទី',\n m: 'មួយនាទី',\n mm: '%d នាទី',\n h: 'មួយម៉ោង',\n hh: '%d ម៉ោង',\n d: 'មួយថ្ងៃ',\n dd: '%d ថ្ងៃ',\n M: 'មួយខែ',\n MM: '%d ខែ',\n y: 'មួយឆ្នាំ',\n yy: '%d ឆ្នាំ'\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n }\n});\n\nreturn km;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/km.js\n// module id = 428\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/km.js?", + ); + + /***/ + }, + /* 429 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/moment/locale/kn.js ***! + \*******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Kannada [kn]\n//! author : Rajeev Naik : https://github.com/rajeevnaikte\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar symbolMap = {\n '1': '೧',\n '2': '೨',\n '3': '೩',\n '4': '೪',\n '5': '೫',\n '6': '೬',\n '7': '೭',\n '8': '೮',\n '9': '೯',\n '0': '೦'\n};\nvar numberMap = {\n '೧': '1',\n '೨': '2',\n '೩': '3',\n '೪': '4',\n '೫': '5',\n '೬': '6',\n '೭': '7',\n '೮': '8',\n '೯': '9',\n '೦': '0'\n};\n\nvar kn = moment.defineLocale('kn', {\n months : 'ಜನವರಿ_ಫೆಬ್ರವರಿ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂಬರ್_ಅಕ್ಟೋಬರ್_ನವೆಂಬರ್_ಡಿಸೆಂಬರ್'.split('_'),\n monthsShort : 'ಜನ_ಫೆಬ್ರ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂಬ_ಅಕ್ಟೋಬ_ನವೆಂಬ_ಡಿಸೆಂಬ'.split('_'),\n monthsParseExact: true,\n weekdays : 'ಭಾನುವಾರ_ಸೋಮವಾರ_ಮಂಗಳವಾರ_ಬುಧವಾರ_ಗುರುವಾರ_ಶುಕ್ರವಾರ_ಶನಿವಾರ'.split('_'),\n weekdaysShort : 'ಭಾನು_ಸೋಮ_ಮಂಗಳ_ಬುಧ_ಗುರು_ಶುಕ್ರ_ಶನಿ'.split('_'),\n weekdaysMin : 'ಭಾ_ಸೋ_ಮಂ_ಬು_ಗು_ಶು_ಶ'.split('_'),\n longDateFormat : {\n LT : 'A h:mm',\n LTS : 'A h:mm:ss',\n L : 'DD/MM/YYYY',\n LL : 'D MMMM YYYY',\n LLL : 'D MMMM YYYY, A h:mm',\n LLLL : 'dddd, D MMMM YYYY, A h:mm'\n },\n calendar : {\n sameDay : '[ಇಂದು] LT',\n nextDay : '[ನಾಳೆ] LT',\n nextWeek : 'dddd, LT',\n lastDay : '[ನಿನ್ನೆ] LT',\n lastWeek : '[ಕೊನೆಯ] dddd, LT',\n sameElse : 'L'\n },\n relativeTime : {\n future : '%s ನಂತರ',\n past : '%s ಹಿಂದೆ',\n s : 'ಕೆಲವು ಕ್ಷಣಗಳು',\n m : 'ಒಂದು ನಿಮಿಷ',\n mm : '%d ನಿಮಿಷ',\n h : 'ಒಂದು ಗಂಟೆ',\n hh : '%d ಗಂಟೆ',\n d : 'ಒಂದು ದಿನ',\n dd : '%d ದಿನ',\n M : 'ಒಂದು ತಿಂಗಳು',\n MM : '%d ತಿಂಗಳು',\n y : 'ಒಂದು ವರ್ಷ',\n yy : '%d ವರ್ಷ'\n },\n preparse: function (string) {\n return string.replace(/[೧೨೩೪೫೬೭೮೯೦]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function (string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n meridiemParse: /ರಾತ್ರಿ|ಬೆಳಿಗ್ಗೆ|ಮಧ್ಯಾಹ್ನ|ಸಂಜೆ/,\n meridiemHour : function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'ರಾತ್ರಿ') {\n return hour < 4 ? hour : hour + 12;\n } else if (meridiem === 'ಬೆಳಿಗ್ಗೆ') {\n return hour;\n } else if (meridiem === 'ಮಧ್ಯಾಹ್ನ') {\n return hour >= 10 ? hour : hour + 12;\n } else if (meridiem === 'ಸಂಜೆ') {\n return hour + 12;\n }\n },\n meridiem : function (hour, minute, isLower) {\n if (hour < 4) {\n return 'ರಾತ್ರಿ';\n } else if (hour < 10) {\n return 'ಬೆಳಿಗ್ಗೆ';\n } else if (hour < 17) {\n return 'ಮಧ್ಯಾಹ್ನ';\n } else if (hour < 20) {\n return 'ಸಂಜೆ';\n } else {\n return 'ರಾತ್ರಿ';\n }\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(ನೇ)/,\n ordinal : function (number) {\n return number + 'ನೇ';\n },\n week : {\n dow : 0, // Sunday is the first day of the week.\n doy : 6 // The week that contains Jan 1st is the first week of the year.\n }\n});\n\nreturn kn;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/kn.js\n// module id = 429\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/kn.js?", + ); + + /***/ + }, + /* 430 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/moment/locale/ko.js ***! + \*******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Korean [ko]\n//! author : Kyungwook, Park : https://github.com/kyungw00k\n//! author : Jeeeyul Lee <jeeeyul@gmail.com>\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar ko = moment.defineLocale('ko', {\n months : '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split('_'),\n monthsShort : '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split('_'),\n weekdays : '일요일_월요일_화요일_수요일_목요일_금요일_토요일'.split('_'),\n weekdaysShort : '일_월_화_수_목_금_토'.split('_'),\n weekdaysMin : '일_월_화_수_목_금_토'.split('_'),\n longDateFormat : {\n LT : 'A h:mm',\n LTS : 'A h:mm:ss',\n L : 'YYYY.MM.DD',\n LL : 'YYYY년 MMMM D일',\n LLL : 'YYYY년 MMMM D일 A h:mm',\n LLLL : 'YYYY년 MMMM D일 dddd A h:mm',\n l : 'YYYY.MM.DD',\n ll : 'YYYY년 MMMM D일',\n lll : 'YYYY년 MMMM D일 A h:mm',\n llll : 'YYYY년 MMMM D일 dddd A h:mm'\n },\n calendar : {\n sameDay : '오늘 LT',\n nextDay : '내일 LT',\n nextWeek : 'dddd LT',\n lastDay : '어제 LT',\n lastWeek : '지난주 dddd LT',\n sameElse : 'L'\n },\n relativeTime : {\n future : '%s 후',\n past : '%s 전',\n s : '몇 초',\n ss : '%d초',\n m : '1분',\n mm : '%d분',\n h : '한 시간',\n hh : '%d시간',\n d : '하루',\n dd : '%d일',\n M : '한 달',\n MM : '%d달',\n y : '일 년',\n yy : '%d년'\n },\n dayOfMonthOrdinalParse : /\\d{1,2}일/,\n ordinal : '%d일',\n meridiemParse : /오전|오후/,\n isPM : function (token) {\n return token === '오후';\n },\n meridiem : function (hour, minute, isUpper) {\n return hour < 12 ? '오전' : '오후';\n }\n});\n\nreturn ko;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/ko.js\n// module id = 430\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/ko.js?", + ); + + /***/ + }, + /* 431 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/moment/locale/ky.js ***! + \*******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Kyrgyz [ky]\n//! author : Chyngyz Arystan uulu : https://github.com/chyngyz\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\n\nvar suffixes = {\n 0: '-чү',\n 1: '-чи',\n 2: '-чи',\n 3: '-чү',\n 4: '-чү',\n 5: '-чи',\n 6: '-чы',\n 7: '-чи',\n 8: '-чи',\n 9: '-чу',\n 10: '-чу',\n 20: '-чы',\n 30: '-чу',\n 40: '-чы',\n 50: '-чү',\n 60: '-чы',\n 70: '-чи',\n 80: '-чи',\n 90: '-чу',\n 100: '-чү'\n};\n\nvar ky = moment.defineLocale('ky', {\n months : 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split('_'),\n monthsShort : 'янв_фев_март_апр_май_июнь_июль_авг_сен_окт_ноя_дек'.split('_'),\n weekdays : 'Жекшемби_Дүйшөмбү_Шейшемби_Шаршемби_Бейшемби_Жума_Ишемби'.split('_'),\n weekdaysShort : 'Жек_Дүй_Шей_Шар_Бей_Жум_Ише'.split('_'),\n weekdaysMin : 'Жк_Дй_Шй_Шр_Бй_Жм_Иш'.split('_'),\n longDateFormat : {\n LT : 'HH:mm',\n LTS : 'HH:mm:ss',\n L : 'DD.MM.YYYY',\n LL : 'D MMMM YYYY',\n LLL : 'D MMMM YYYY HH:mm',\n LLLL : 'dddd, D MMMM YYYY HH:mm'\n },\n calendar : {\n sameDay : '[Бүгүн саат] LT',\n nextDay : '[Эртең саат] LT',\n nextWeek : 'dddd [саат] LT',\n lastDay : '[Кече саат] LT',\n lastWeek : '[Өткен аптанын] dddd [күнү] [саат] LT',\n sameElse : 'L'\n },\n relativeTime : {\n future : '%s ичинде',\n past : '%s мурун',\n s : 'бирнече секунд',\n m : 'бир мүнөт',\n mm : '%d мүнөт',\n h : 'бир саат',\n hh : '%d саат',\n d : 'бир күн',\n dd : '%d күн',\n M : 'бир ай',\n MM : '%d ай',\n y : 'бир жыл',\n yy : '%d жыл'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-(чи|чы|чү|чу)/,\n ordinal : function (number) {\n var a = number % 10,\n b = number >= 100 ? 100 : null;\n return number + (suffixes[number] || suffixes[a] || suffixes[b]);\n },\n week : {\n dow : 1, // Monday is the first day of the week.\n doy : 7 // The week that contains Jan 1st is the first week of the year.\n }\n});\n\nreturn ky;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/ky.js\n// module id = 431\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/ky.js?", + ); + + /***/ + }, + /* 432 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/moment/locale/lb.js ***! + \*******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Luxembourgish [lb]\n//! author : mweimerskirch : https://github.com/mweimerskirch\n//! author : David Raison : https://github.com/kwisatz\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nfunction processRelativeTime(number, withoutSuffix, key, isFuture) {\n var format = {\n 'm': ['eng Minutt', 'enger Minutt'],\n 'h': ['eng Stonn', 'enger Stonn'],\n 'd': ['een Dag', 'engem Dag'],\n 'M': ['ee Mount', 'engem Mount'],\n 'y': ['ee Joer', 'engem Joer']\n };\n return withoutSuffix ? format[key][0] : format[key][1];\n}\nfunction processFutureTime(string) {\n var number = string.substr(0, string.indexOf(' '));\n if (eifelerRegelAppliesToNumber(number)) {\n return 'a ' + string;\n }\n return 'an ' + string;\n}\nfunction processPastTime(string) {\n var number = string.substr(0, string.indexOf(' '));\n if (eifelerRegelAppliesToNumber(number)) {\n return 'viru ' + string;\n }\n return 'virun ' + string;\n}\n/**\n * Returns true if the word before the given number loses the '-n' ending.\n * e.g. 'an 10 Deeg' but 'a 5 Deeg'\n *\n * @param number {integer}\n * @returns {boolean}\n */\nfunction eifelerRegelAppliesToNumber(number) {\n number = parseInt(number, 10);\n if (isNaN(number)) {\n return false;\n }\n if (number < 0) {\n // Negative Number --> always true\n return true;\n } else if (number < 10) {\n // Only 1 digit\n if (4 <= number && number <= 7) {\n return true;\n }\n return false;\n } else if (number < 100) {\n // 2 digits\n var lastDigit = number % 10, firstDigit = number / 10;\n if (lastDigit === 0) {\n return eifelerRegelAppliesToNumber(firstDigit);\n }\n return eifelerRegelAppliesToNumber(lastDigit);\n } else if (number < 10000) {\n // 3 or 4 digits --> recursively check first digit\n while (number >= 10) {\n number = number / 10;\n }\n return eifelerRegelAppliesToNumber(number);\n } else {\n // Anything larger than 4 digits: recursively check first n-3 digits\n number = number / 1000;\n return eifelerRegelAppliesToNumber(number);\n }\n}\n\nvar lb = moment.defineLocale('lb', {\n months: 'Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'),\n monthsShort: 'Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.'.split('_'),\n monthsParseExact : true,\n weekdays: 'Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg'.split('_'),\n weekdaysShort: 'So._Mé._Dë._Më._Do._Fr._Sa.'.split('_'),\n weekdaysMin: 'So_Mé_Dë_Më_Do_Fr_Sa'.split('_'),\n weekdaysParseExact : true,\n longDateFormat: {\n LT: 'H:mm [Auer]',\n LTS: 'H:mm:ss [Auer]',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY H:mm [Auer]',\n LLLL: 'dddd, D. MMMM YYYY H:mm [Auer]'\n },\n calendar: {\n sameDay: '[Haut um] LT',\n sameElse: 'L',\n nextDay: '[Muer um] LT',\n nextWeek: 'dddd [um] LT',\n lastDay: '[Gëschter um] LT',\n lastWeek: function () {\n // Different date string for 'Dënschdeg' (Tuesday) and 'Donneschdeg' (Thursday) due to phonological rule\n switch (this.day()) {\n case 2:\n case 4:\n return '[Leschten] dddd [um] LT';\n default:\n return '[Leschte] dddd [um] LT';\n }\n }\n },\n relativeTime : {\n future : processFutureTime,\n past : processPastTime,\n s : 'e puer Sekonnen',\n m : processRelativeTime,\n mm : '%d Minutten',\n h : processRelativeTime,\n hh : '%d Stonnen',\n d : processRelativeTime,\n dd : '%d Deeg',\n M : processRelativeTime,\n MM : '%d Méint',\n y : processRelativeTime,\n yy : '%d Joer'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n }\n});\n\nreturn lb;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/lb.js\n// module id = 432\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/lb.js?", + ); + + /***/ + }, + /* 433 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/moment/locale/lo.js ***! + \*******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Lao [lo]\n//! author : Ryan Hart : https://github.com/ryanhart2\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar lo = moment.defineLocale('lo', {\n months : 'ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ'.split('_'),\n monthsShort : 'ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ'.split('_'),\n weekdays : 'ອາທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ'.split('_'),\n weekdaysShort : 'ທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ'.split('_'),\n weekdaysMin : 'ທ_ຈ_ອຄ_ພ_ພຫ_ສກ_ສ'.split('_'),\n weekdaysParseExact : true,\n longDateFormat : {\n LT : 'HH:mm',\n LTS : 'HH:mm:ss',\n L : 'DD/MM/YYYY',\n LL : 'D MMMM YYYY',\n LLL : 'D MMMM YYYY HH:mm',\n LLLL : 'ວັນdddd D MMMM YYYY HH:mm'\n },\n meridiemParse: /ຕອນເຊົ້າ|ຕອນແລງ/,\n isPM: function (input) {\n return input === 'ຕອນແລງ';\n },\n meridiem : function (hour, minute, isLower) {\n if (hour < 12) {\n return 'ຕອນເຊົ້າ';\n } else {\n return 'ຕອນແລງ';\n }\n },\n calendar : {\n sameDay : '[ມື້ນີ້ເວລາ] LT',\n nextDay : '[ມື້ອື່ນເວລາ] LT',\n nextWeek : '[ວັນ]dddd[ໜ້າເວລາ] LT',\n lastDay : '[ມື້ວານນີ້ເວລາ] LT',\n lastWeek : '[ວັນ]dddd[ແລ້ວນີ້ເວລາ] LT',\n sameElse : 'L'\n },\n relativeTime : {\n future : 'ອີກ %s',\n past : '%sຜ່ານມາ',\n s : 'ບໍ່ເທົ່າໃດວິນາທີ',\n m : '1 ນາທີ',\n mm : '%d ນາທີ',\n h : '1 ຊົ່ວໂມງ',\n hh : '%d ຊົ່ວໂມງ',\n d : '1 ມື້',\n dd : '%d ມື້',\n M : '1 ເດືອນ',\n MM : '%d ເດືອນ',\n y : '1 ປີ',\n yy : '%d ປີ'\n },\n dayOfMonthOrdinalParse: /(ທີ່)\\d{1,2}/,\n ordinal : function (number) {\n return 'ທີ່' + number;\n }\n});\n\nreturn lo;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/lo.js\n// module id = 433\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/lo.js?", + ); + + /***/ + }, + /* 434 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/moment/locale/lt.js ***! + \*******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Lithuanian [lt]\n//! author : Mindaugas Mozūras : https://github.com/mmozuras\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar units = {\n 'm' : 'minutė_minutės_minutę',\n 'mm': 'minutės_minučių_minutes',\n 'h' : 'valanda_valandos_valandą',\n 'hh': 'valandos_valandų_valandas',\n 'd' : 'diena_dienos_dieną',\n 'dd': 'dienos_dienų_dienas',\n 'M' : 'mėnuo_mėnesio_mėnesį',\n 'MM': 'mėnesiai_mėnesių_mėnesius',\n 'y' : 'metai_metų_metus',\n 'yy': 'metai_metų_metus'\n};\nfunction translateSeconds(number, withoutSuffix, key, isFuture) {\n if (withoutSuffix) {\n return 'kelios sekundės';\n } else {\n return isFuture ? 'kelių sekundžių' : 'kelias sekundes';\n }\n}\nfunction translateSingular(number, withoutSuffix, key, isFuture) {\n return withoutSuffix ? forms(key)[0] : (isFuture ? forms(key)[1] : forms(key)[2]);\n}\nfunction special(number) {\n return number % 10 === 0 || (number > 10 && number < 20);\n}\nfunction forms(key) {\n return units[key].split('_');\n}\nfunction translate(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n if (number === 1) {\n return result + translateSingular(number, withoutSuffix, key[0], isFuture);\n } else if (withoutSuffix) {\n return result + (special(number) ? forms(key)[1] : forms(key)[0]);\n } else {\n if (isFuture) {\n return result + forms(key)[1];\n } else {\n return result + (special(number) ? forms(key)[1] : forms(key)[2]);\n }\n }\n}\nvar lt = moment.defineLocale('lt', {\n months : {\n format: 'sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio'.split('_'),\n standalone: 'sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis'.split('_'),\n isFormat: /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?|MMMM?(\\[[^\\[\\]]*\\]|\\s)+D[oD]?/\n },\n monthsShort : 'sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd'.split('_'),\n weekdays : {\n format: 'sekmadienį_pirmadienį_antradienį_trečiadienį_ketvirtadienį_penktadienį_šeštadienį'.split('_'),\n standalone: 'sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis'.split('_'),\n isFormat: /dddd HH:mm/\n },\n weekdaysShort : 'Sek_Pir_Ant_Tre_Ket_Pen_Šeš'.split('_'),\n weekdaysMin : 'S_P_A_T_K_Pn_Š'.split('_'),\n weekdaysParseExact : true,\n longDateFormat : {\n LT : 'HH:mm',\n LTS : 'HH:mm:ss',\n L : 'YYYY-MM-DD',\n LL : 'YYYY [m.] MMMM D [d.]',\n LLL : 'YYYY [m.] MMMM D [d.], HH:mm [val.]',\n LLLL : 'YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]',\n l : 'YYYY-MM-DD',\n ll : 'YYYY [m.] MMMM D [d.]',\n lll : 'YYYY [m.] MMMM D [d.], HH:mm [val.]',\n llll : 'YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]'\n },\n calendar : {\n sameDay : '[Šiandien] LT',\n nextDay : '[Rytoj] LT',\n nextWeek : 'dddd LT',\n lastDay : '[Vakar] LT',\n lastWeek : '[Praėjusį] dddd LT',\n sameElse : 'L'\n },\n relativeTime : {\n future : 'po %s',\n past : 'prieš %s',\n s : translateSeconds,\n m : translateSingular,\n mm : translate,\n h : translateSingular,\n hh : translate,\n d : translateSingular,\n dd : translate,\n M : translateSingular,\n MM : translate,\n y : translateSingular,\n yy : translate\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-oji/,\n ordinal : function (number) {\n return number + '-oji';\n },\n week : {\n dow : 1, // Monday is the first day of the week.\n doy : 4 // The week that contains Jan 4th is the first week of the year.\n }\n});\n\nreturn lt;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/lt.js\n// module id = 434\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/lt.js?", + ); + + /***/ + }, + /* 435 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/moment/locale/lv.js ***! + \*******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Latvian [lv]\n//! author : Kristaps Karlsons : https://github.com/skakri\n//! author : Jānis Elmeris : https://github.com/JanisE\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar units = {\n 'm': 'minūtes_minūtēm_minūte_minūtes'.split('_'),\n 'mm': 'minūtes_minūtēm_minūte_minūtes'.split('_'),\n 'h': 'stundas_stundām_stunda_stundas'.split('_'),\n 'hh': 'stundas_stundām_stunda_stundas'.split('_'),\n 'd': 'dienas_dienām_diena_dienas'.split('_'),\n 'dd': 'dienas_dienām_diena_dienas'.split('_'),\n 'M': 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'),\n 'MM': 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'),\n 'y': 'gada_gadiem_gads_gadi'.split('_'),\n 'yy': 'gada_gadiem_gads_gadi'.split('_')\n};\n/**\n * @param withoutSuffix boolean true = a length of time; false = before/after a period of time.\n */\nfunction format(forms, number, withoutSuffix) {\n if (withoutSuffix) {\n // E.g. \"21 minūte\", \"3 minūtes\".\n return number % 10 === 1 && number % 100 !== 11 ? forms[2] : forms[3];\n } else {\n // E.g. \"21 minūtes\" as in \"pēc 21 minūtes\".\n // E.g. \"3 minūtēm\" as in \"pēc 3 minūtēm\".\n return number % 10 === 1 && number % 100 !== 11 ? forms[0] : forms[1];\n }\n}\nfunction relativeTimeWithPlural(number, withoutSuffix, key) {\n return number + ' ' + format(units[key], number, withoutSuffix);\n}\nfunction relativeTimeWithSingular(number, withoutSuffix, key) {\n return format(units[key], number, withoutSuffix);\n}\nfunction relativeSeconds(number, withoutSuffix) {\n return withoutSuffix ? 'dažas sekundes' : 'dažām sekundēm';\n}\n\nvar lv = moment.defineLocale('lv', {\n months : 'janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris'.split('_'),\n monthsShort : 'jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec'.split('_'),\n weekdays : 'svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena'.split('_'),\n weekdaysShort : 'Sv_P_O_T_C_Pk_S'.split('_'),\n weekdaysMin : 'Sv_P_O_T_C_Pk_S'.split('_'),\n weekdaysParseExact : true,\n longDateFormat : {\n LT : 'HH:mm',\n LTS : 'HH:mm:ss',\n L : 'DD.MM.YYYY.',\n LL : 'YYYY. [gada] D. MMMM',\n LLL : 'YYYY. [gada] D. MMMM, HH:mm',\n LLLL : 'YYYY. [gada] D. MMMM, dddd, HH:mm'\n },\n calendar : {\n sameDay : '[Šodien pulksten] LT',\n nextDay : '[Rīt pulksten] LT',\n nextWeek : 'dddd [pulksten] LT',\n lastDay : '[Vakar pulksten] LT',\n lastWeek : '[Pagājušā] dddd [pulksten] LT',\n sameElse : 'L'\n },\n relativeTime : {\n future : 'pēc %s',\n past : 'pirms %s',\n s : relativeSeconds,\n m : relativeTimeWithSingular,\n mm : relativeTimeWithPlural,\n h : relativeTimeWithSingular,\n hh : relativeTimeWithPlural,\n d : relativeTimeWithSingular,\n dd : relativeTimeWithPlural,\n M : relativeTimeWithSingular,\n MM : relativeTimeWithPlural,\n y : relativeTimeWithSingular,\n yy : relativeTimeWithPlural\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal : '%d.',\n week : {\n dow : 1, // Monday is the first day of the week.\n doy : 4 // The week that contains Jan 4th is the first week of the year.\n }\n});\n\nreturn lv;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/lv.js\n// module id = 435\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/lv.js?", + ); + + /***/ + }, + /* 436 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/moment/locale/me.js ***! + \*******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Montenegrin [me]\n//! author : Miodrag Nikač <miodrag@restartit.me> : https://github.com/miodragnikac\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar translator = {\n words: { //Different grammatical cases\n m: ['jedan minut', 'jednog minuta'],\n mm: ['minut', 'minuta', 'minuta'],\n h: ['jedan sat', 'jednog sata'],\n hh: ['sat', 'sata', 'sati'],\n dd: ['dan', 'dana', 'dana'],\n MM: ['mjesec', 'mjeseca', 'mjeseci'],\n yy: ['godina', 'godine', 'godina']\n },\n correctGrammaticalCase: function (number, wordKey) {\n return number === 1 ? wordKey[0] : (number >= 2 && number <= 4 ? wordKey[1] : wordKey[2]);\n },\n translate: function (number, withoutSuffix, key) {\n var wordKey = translator.words[key];\n if (key.length === 1) {\n return withoutSuffix ? wordKey[0] : wordKey[1];\n } else {\n return number + ' ' + translator.correctGrammaticalCase(number, wordKey);\n }\n }\n};\n\nvar me = moment.defineLocale('me', {\n months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split('_'),\n monthsShort: 'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split('_'),\n monthsParseExact : true,\n weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split('_'),\n weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),\n weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),\n weekdaysParseExact : true,\n longDateFormat: {\n LT: 'H:mm',\n LTS : 'H:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY H:mm',\n LLLL: 'dddd, D. MMMM YYYY H:mm'\n },\n calendar: {\n sameDay: '[danas u] LT',\n nextDay: '[sjutra u] LT',\n\n nextWeek: function () {\n switch (this.day()) {\n case 0:\n return '[u] [nedjelju] [u] LT';\n case 3:\n return '[u] [srijedu] [u] LT';\n case 6:\n return '[u] [subotu] [u] LT';\n case 1:\n case 2:\n case 4:\n case 5:\n return '[u] dddd [u] LT';\n }\n },\n lastDay : '[juče u] LT',\n lastWeek : function () {\n var lastWeekDays = [\n '[prošle] [nedjelje] [u] LT',\n '[prošlog] [ponedjeljka] [u] LT',\n '[prošlog] [utorka] [u] LT',\n '[prošle] [srijede] [u] LT',\n '[prošlog] [četvrtka] [u] LT',\n '[prošlog] [petka] [u] LT',\n '[prošle] [subote] [u] LT'\n ];\n return lastWeekDays[this.day()];\n },\n sameElse : 'L'\n },\n relativeTime : {\n future : 'za %s',\n past : 'prije %s',\n s : 'nekoliko sekundi',\n m : translator.translate,\n mm : translator.translate,\n h : translator.translate,\n hh : translator.translate,\n d : 'dan',\n dd : translator.translate,\n M : 'mjesec',\n MM : translator.translate,\n y : 'godinu',\n yy : translator.translate\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal : '%d.',\n week : {\n dow : 1, // Monday is the first day of the week.\n doy : 7 // The week that contains Jan 1st is the first week of the year.\n }\n});\n\nreturn me;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/me.js\n// module id = 436\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/me.js?", + ); + + /***/ + }, + /* 437 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/moment/locale/mi.js ***! + \*******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Maori [mi]\n//! author : John Corrigan <robbiecloset@gmail.com> : https://github.com/johnideal\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar mi = moment.defineLocale('mi', {\n months: 'Kohi-tāte_Hui-tanguru_Poutū-te-rangi_Paenga-whāwhā_Haratua_Pipiri_Hōngoingoi_Here-turi-kōkā_Mahuru_Whiringa-ā-nuku_Whiringa-ā-rangi_Hakihea'.split('_'),\n monthsShort: 'Kohi_Hui_Pou_Pae_Hara_Pipi_Hōngoi_Here_Mahu_Whi-nu_Whi-ra_Haki'.split('_'),\n monthsRegex: /(?:['a-z\\u0101\\u014D\\u016B]+\\-?){1,3}/i,\n monthsStrictRegex: /(?:['a-z\\u0101\\u014D\\u016B]+\\-?){1,3}/i,\n monthsShortRegex: /(?:['a-z\\u0101\\u014D\\u016B]+\\-?){1,3}/i,\n monthsShortStrictRegex: /(?:['a-z\\u0101\\u014D\\u016B]+\\-?){1,2}/i,\n weekdays: 'Rātapu_Mane_Tūrei_Wenerei_Tāite_Paraire_Hātarei'.split('_'),\n weekdaysShort: 'Ta_Ma_Tū_We_Tāi_Pa_Hā'.split('_'),\n weekdaysMin: 'Ta_Ma_Tū_We_Tāi_Pa_Hā'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY [i] HH:mm',\n LLLL: 'dddd, D MMMM YYYY [i] HH:mm'\n },\n calendar: {\n sameDay: '[i teie mahana, i] LT',\n nextDay: '[apopo i] LT',\n nextWeek: 'dddd [i] LT',\n lastDay: '[inanahi i] LT',\n lastWeek: 'dddd [whakamutunga i] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'i roto i %s',\n past: '%s i mua',\n s: 'te hēkona ruarua',\n m: 'he meneti',\n mm: '%d meneti',\n h: 'te haora',\n hh: '%d haora',\n d: 'he ra',\n dd: '%d ra',\n M: 'he marama',\n MM: '%d marama',\n y: 'he tau',\n yy: '%d tau'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal: '%dº',\n week : {\n dow : 1, // Monday is the first day of the week.\n doy : 4 // The week that contains Jan 4th is the first week of the year.\n }\n});\n\nreturn mi;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/mi.js\n// module id = 437\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/mi.js?", + ); + + /***/ + }, + /* 438 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/moment/locale/mk.js ***! + \*******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Macedonian [mk]\n//! author : Borislav Mickov : https://github.com/B0k0\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar mk = moment.defineLocale('mk', {\n months : 'јануари_февруари_март_април_мај_јуни_јули_август_септември_октомври_ноември_декември'.split('_'),\n monthsShort : 'јан_фев_мар_апр_мај_јун_јул_авг_сеп_окт_ное_дек'.split('_'),\n weekdays : 'недела_понеделник_вторник_среда_четврток_петок_сабота'.split('_'),\n weekdaysShort : 'нед_пон_вто_сре_чет_пет_саб'.split('_'),\n weekdaysMin : 'нe_пo_вт_ср_че_пе_сa'.split('_'),\n longDateFormat : {\n LT : 'H:mm',\n LTS : 'H:mm:ss',\n L : 'D.MM.YYYY',\n LL : 'D MMMM YYYY',\n LLL : 'D MMMM YYYY H:mm',\n LLLL : 'dddd, D MMMM YYYY H:mm'\n },\n calendar : {\n sameDay : '[Денес во] LT',\n nextDay : '[Утре во] LT',\n nextWeek : '[Во] dddd [во] LT',\n lastDay : '[Вчера во] LT',\n lastWeek : function () {\n switch (this.day()) {\n case 0:\n case 3:\n case 6:\n return '[Изминатата] dddd [во] LT';\n case 1:\n case 2:\n case 4:\n case 5:\n return '[Изминатиот] dddd [во] LT';\n }\n },\n sameElse : 'L'\n },\n relativeTime : {\n future : 'после %s',\n past : 'пред %s',\n s : 'неколку секунди',\n m : 'минута',\n mm : '%d минути',\n h : 'час',\n hh : '%d часа',\n d : 'ден',\n dd : '%d дена',\n M : 'месец',\n MM : '%d месеци',\n y : 'година',\n yy : '%d години'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-(ев|ен|ти|ви|ри|ми)/,\n ordinal : function (number) {\n var lastDigit = number % 10,\n last2Digits = number % 100;\n if (number === 0) {\n return number + '-ев';\n } else if (last2Digits === 0) {\n return number + '-ен';\n } else if (last2Digits > 10 && last2Digits < 20) {\n return number + '-ти';\n } else if (lastDigit === 1) {\n return number + '-ви';\n } else if (lastDigit === 2) {\n return number + '-ри';\n } else if (lastDigit === 7 || lastDigit === 8) {\n return number + '-ми';\n } else {\n return number + '-ти';\n }\n },\n week : {\n dow : 1, // Monday is the first day of the week.\n doy : 7 // The week that contains Jan 1st is the first week of the year.\n }\n});\n\nreturn mk;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/mk.js\n// module id = 438\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/mk.js?", + ); + + /***/ + }, + /* 439 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/moment/locale/ml.js ***! + \*******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Malayalam [ml]\n//! author : Floyd Pink : https://github.com/floydpink\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar ml = moment.defineLocale('ml', {\n months : 'ജനുവരി_ഫെബ്രുവരി_മാർച്ച്_ഏപ്രിൽ_മേയ്_ജൂൺ_ജൂലൈ_ഓഗസ്റ്റ്_സെപ്റ്റംബർ_ഒക്ടോബർ_നവംബർ_ഡിസംബർ'.split('_'),\n monthsShort : 'ജനു._ഫെബ്രു._മാർ._ഏപ്രി._മേയ്_ജൂൺ_ജൂലൈ._ഓഗ._സെപ്റ്റ._ഒക്ടോ._നവം._ഡിസം.'.split('_'),\n monthsParseExact : true,\n weekdays : 'ഞായറാഴ്ച_തിങ്കളാഴ്ച_ചൊവ്വാഴ്ച_ബുധനാഴ്ച_വ്യാഴാഴ്ച_വെള്ളിയാഴ്ച_ശനിയാഴ്ച'.split('_'),\n weekdaysShort : 'ഞായർ_തിങ്കൾ_ചൊവ്വ_ബുധൻ_വ്യാഴം_വെള്ളി_ശനി'.split('_'),\n weekdaysMin : 'ഞാ_തി_ചൊ_ബു_വ്യാ_വെ_ശ'.split('_'),\n longDateFormat : {\n LT : 'A h:mm -നു',\n LTS : 'A h:mm:ss -നു',\n L : 'DD/MM/YYYY',\n LL : 'D MMMM YYYY',\n LLL : 'D MMMM YYYY, A h:mm -നു',\n LLLL : 'dddd, D MMMM YYYY, A h:mm -നു'\n },\n calendar : {\n sameDay : '[ഇന്ന്] LT',\n nextDay : '[നാളെ] LT',\n nextWeek : 'dddd, LT',\n lastDay : '[ഇന്നലെ] LT',\n lastWeek : '[കഴിഞ്ഞ] dddd, LT',\n sameElse : 'L'\n },\n relativeTime : {\n future : '%s കഴിഞ്ഞ്',\n past : '%s മുൻപ്',\n s : 'അൽപ നിമിഷങ്ങൾ',\n m : 'ഒരു മിനിറ്റ്',\n mm : '%d മിനിറ്റ്',\n h : 'ഒരു മണിക്കൂർ',\n hh : '%d മണിക്കൂർ',\n d : 'ഒരു ദിവസം',\n dd : '%d ദിവസം',\n M : 'ഒരു മാസം',\n MM : '%d മാസം',\n y : 'ഒരു വർഷം',\n yy : '%d വർഷം'\n },\n meridiemParse: /രാത്രി|രാവിലെ|ഉച്ച കഴിഞ്ഞ്|വൈകുന്നേരം|രാത്രി/i,\n meridiemHour : function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if ((meridiem === 'രാത്രി' && hour >= 4) ||\n meridiem === 'ഉച്ച കഴിഞ്ഞ്' ||\n meridiem === 'വൈകുന്നേരം') {\n return hour + 12;\n } else {\n return hour;\n }\n },\n meridiem : function (hour, minute, isLower) {\n if (hour < 4) {\n return 'രാത്രി';\n } else if (hour < 12) {\n return 'രാവിലെ';\n } else if (hour < 17) {\n return 'ഉച്ച കഴിഞ്ഞ്';\n } else if (hour < 20) {\n return 'വൈകുന്നേരം';\n } else {\n return 'രാത്രി';\n }\n }\n});\n\nreturn ml;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/ml.js\n// module id = 439\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/ml.js?", + ); + + /***/ + }, + /* 440 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/moment/locale/mr.js ***! + \*******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Marathi [mr]\n//! author : Harshad Kale : https://github.com/kalehv\n//! author : Vivek Athalye : https://github.com/vnathalye\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar symbolMap = {\n '1': '१',\n '2': '२',\n '3': '३',\n '4': '४',\n '5': '५',\n '6': '६',\n '7': '७',\n '8': '८',\n '9': '९',\n '0': '०'\n};\nvar numberMap = {\n '१': '1',\n '२': '2',\n '३': '3',\n '४': '4',\n '५': '5',\n '६': '6',\n '७': '7',\n '८': '8',\n '९': '9',\n '०': '0'\n};\n\nfunction relativeTimeMr(number, withoutSuffix, string, isFuture)\n{\n var output = '';\n if (withoutSuffix) {\n switch (string) {\n case 's': output = 'काही सेकंद'; break;\n case 'm': output = 'एक मिनिट'; break;\n case 'mm': output = '%d मिनिटे'; break;\n case 'h': output = 'एक तास'; break;\n case 'hh': output = '%d तास'; break;\n case 'd': output = 'एक दिवस'; break;\n case 'dd': output = '%d दिवस'; break;\n case 'M': output = 'एक महिना'; break;\n case 'MM': output = '%d महिने'; break;\n case 'y': output = 'एक वर्ष'; break;\n case 'yy': output = '%d वर्षे'; break;\n }\n }\n else {\n switch (string) {\n case 's': output = 'काही सेकंदां'; break;\n case 'm': output = 'एका मिनिटा'; break;\n case 'mm': output = '%d मिनिटां'; break;\n case 'h': output = 'एका तासा'; break;\n case 'hh': output = '%d तासां'; break;\n case 'd': output = 'एका दिवसा'; break;\n case 'dd': output = '%d दिवसां'; break;\n case 'M': output = 'एका महिन्या'; break;\n case 'MM': output = '%d महिन्यां'; break;\n case 'y': output = 'एका वर्षा'; break;\n case 'yy': output = '%d वर्षां'; break;\n }\n }\n return output.replace(/%d/i, number);\n}\n\nvar mr = moment.defineLocale('mr', {\n months : 'जानेवारी_फेब्रुवारी_मार्च_एप्रिल_मे_जून_जुलै_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर'.split('_'),\n monthsShort: 'जाने._फेब्रु._मार्च._एप्रि._मे._जून._जुलै._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.'.split('_'),\n monthsParseExact : true,\n weekdays : 'रविवार_सोमवार_मंगळवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'),\n weekdaysShort : 'रवि_सोम_मंगळ_बुध_गुरू_शुक्र_शनि'.split('_'),\n weekdaysMin : 'र_सो_मं_बु_गु_शु_श'.split('_'),\n longDateFormat : {\n LT : 'A h:mm वाजता',\n LTS : 'A h:mm:ss वाजता',\n L : 'DD/MM/YYYY',\n LL : 'D MMMM YYYY',\n LLL : 'D MMMM YYYY, A h:mm वाजता',\n LLLL : 'dddd, D MMMM YYYY, A h:mm वाजता'\n },\n calendar : {\n sameDay : '[आज] LT',\n nextDay : '[उद्या] LT',\n nextWeek : 'dddd, LT',\n lastDay : '[काल] LT',\n lastWeek: '[मागील] dddd, LT',\n sameElse : 'L'\n },\n relativeTime : {\n future: '%sमध्ये',\n past: '%sपूर्वी',\n s: relativeTimeMr,\n m: relativeTimeMr,\n mm: relativeTimeMr,\n h: relativeTimeMr,\n hh: relativeTimeMr,\n d: relativeTimeMr,\n dd: relativeTimeMr,\n M: relativeTimeMr,\n MM: relativeTimeMr,\n y: relativeTimeMr,\n yy: relativeTimeMr\n },\n preparse: function (string) {\n return string.replace(/[१२३४५६७८९०]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function (string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n meridiemParse: /रात्री|सकाळी|दुपारी|सायंकाळी/,\n meridiemHour : function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'रात्री') {\n return hour < 4 ? hour : hour + 12;\n } else if (meridiem === 'सकाळी') {\n return hour;\n } else if (meridiem === 'दुपारी') {\n return hour >= 10 ? hour : hour + 12;\n } else if (meridiem === 'सायंकाळी') {\n return hour + 12;\n }\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 4) {\n return 'रात्री';\n } else if (hour < 10) {\n return 'सकाळी';\n } else if (hour < 17) {\n return 'दुपारी';\n } else if (hour < 20) {\n return 'सायंकाळी';\n } else {\n return 'रात्री';\n }\n },\n week : {\n dow : 0, // Sunday is the first day of the week.\n doy : 6 // The week that contains Jan 1st is the first week of the year.\n }\n});\n\nreturn mr;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/mr.js\n// module id = 440\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/mr.js?", + ); + + /***/ + }, + /* 441 */ + /* unknown exports provided */ + /* all exports used */ + /*!**********************************!*\ + !*** ./~/moment/locale/ms-my.js ***! + \**********************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Malay [ms-my]\n//! note : DEPRECATED, the correct one is [ms]\n//! author : Weldan Jamili : https://github.com/weldan\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar msMy = moment.defineLocale('ms-my', {\n months : 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split('_'),\n monthsShort : 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'),\n weekdays : 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'),\n weekdaysShort : 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'),\n weekdaysMin : 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'),\n longDateFormat : {\n LT : 'HH.mm',\n LTS : 'HH.mm.ss',\n L : 'DD/MM/YYYY',\n LL : 'D MMMM YYYY',\n LLL : 'D MMMM YYYY [pukul] HH.mm',\n LLLL : 'dddd, D MMMM YYYY [pukul] HH.mm'\n },\n meridiemParse: /pagi|tengahari|petang|malam/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'pagi') {\n return hour;\n } else if (meridiem === 'tengahari') {\n return hour >= 11 ? hour : hour + 12;\n } else if (meridiem === 'petang' || meridiem === 'malam') {\n return hour + 12;\n }\n },\n meridiem : function (hours, minutes, isLower) {\n if (hours < 11) {\n return 'pagi';\n } else if (hours < 15) {\n return 'tengahari';\n } else if (hours < 19) {\n return 'petang';\n } else {\n return 'malam';\n }\n },\n calendar : {\n sameDay : '[Hari ini pukul] LT',\n nextDay : '[Esok pukul] LT',\n nextWeek : 'dddd [pukul] LT',\n lastDay : '[Kelmarin pukul] LT',\n lastWeek : 'dddd [lepas pukul] LT',\n sameElse : 'L'\n },\n relativeTime : {\n future : 'dalam %s',\n past : '%s yang lepas',\n s : 'beberapa saat',\n m : 'seminit',\n mm : '%d minit',\n h : 'sejam',\n hh : '%d jam',\n d : 'sehari',\n dd : '%d hari',\n M : 'sebulan',\n MM : '%d bulan',\n y : 'setahun',\n yy : '%d tahun'\n },\n week : {\n dow : 1, // Monday is the first day of the week.\n doy : 7 // The week that contains Jan 1st is the first week of the year.\n }\n});\n\nreturn msMy;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/ms-my.js\n// module id = 441\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/ms-my.js?", + ); + + /***/ + }, + /* 442 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/moment/locale/ms.js ***! + \*******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Malay [ms]\n//! author : Weldan Jamili : https://github.com/weldan\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar ms = moment.defineLocale('ms', {\n months : 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split('_'),\n monthsShort : 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'),\n weekdays : 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'),\n weekdaysShort : 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'),\n weekdaysMin : 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'),\n longDateFormat : {\n LT : 'HH.mm',\n LTS : 'HH.mm.ss',\n L : 'DD/MM/YYYY',\n LL : 'D MMMM YYYY',\n LLL : 'D MMMM YYYY [pukul] HH.mm',\n LLLL : 'dddd, D MMMM YYYY [pukul] HH.mm'\n },\n meridiemParse: /pagi|tengahari|petang|malam/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'pagi') {\n return hour;\n } else if (meridiem === 'tengahari') {\n return hour >= 11 ? hour : hour + 12;\n } else if (meridiem === 'petang' || meridiem === 'malam') {\n return hour + 12;\n }\n },\n meridiem : function (hours, minutes, isLower) {\n if (hours < 11) {\n return 'pagi';\n } else if (hours < 15) {\n return 'tengahari';\n } else if (hours < 19) {\n return 'petang';\n } else {\n return 'malam';\n }\n },\n calendar : {\n sameDay : '[Hari ini pukul] LT',\n nextDay : '[Esok pukul] LT',\n nextWeek : 'dddd [pukul] LT',\n lastDay : '[Kelmarin pukul] LT',\n lastWeek : 'dddd [lepas pukul] LT',\n sameElse : 'L'\n },\n relativeTime : {\n future : 'dalam %s',\n past : '%s yang lepas',\n s : 'beberapa saat',\n m : 'seminit',\n mm : '%d minit',\n h : 'sejam',\n hh : '%d jam',\n d : 'sehari',\n dd : '%d hari',\n M : 'sebulan',\n MM : '%d bulan',\n y : 'setahun',\n yy : '%d tahun'\n },\n week : {\n dow : 1, // Monday is the first day of the week.\n doy : 7 // The week that contains Jan 1st is the first week of the year.\n }\n});\n\nreturn ms;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/ms.js\n// module id = 442\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/ms.js?", + ); + + /***/ + }, + /* 443 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/moment/locale/my.js ***! + \*******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Burmese [my]\n//! author : Squar team, mysquar.com\n//! author : David Rossellat : https://github.com/gholadr\n//! author : Tin Aung Lin : https://github.com/thanyawzinmin\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar symbolMap = {\n '1': '၁',\n '2': '၂',\n '3': '၃',\n '4': '၄',\n '5': '၅',\n '6': '၆',\n '7': '၇',\n '8': '၈',\n '9': '၉',\n '0': '၀'\n};\nvar numberMap = {\n '၁': '1',\n '၂': '2',\n '၃': '3',\n '၄': '4',\n '၅': '5',\n '၆': '6',\n '၇': '7',\n '၈': '8',\n '၉': '9',\n '၀': '0'\n};\n\nvar my = moment.defineLocale('my', {\n months: 'ဇန်နဝါရီ_ဖေဖော်ဝါရီ_မတ်_ဧပြီ_မေ_ဇွန်_ဇူလိုင်_သြဂုတ်_စက်တင်ဘာ_အောက်တိုဘာ_နိုဝင်ဘာ_ဒီဇင်ဘာ'.split('_'),\n monthsShort: 'ဇန်_ဖေ_မတ်_ပြီ_မေ_ဇွန်_လိုင်_သြ_စက်_အောက်_နို_ဒီ'.split('_'),\n weekdays: 'တနင်္ဂနွေ_တနင်္လာ_အင်္ဂါ_ဗုဒ္ဓဟူး_ကြာသပတေး_သောကြာ_စနေ'.split('_'),\n weekdaysShort: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'),\n weekdaysMin: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'),\n\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[ယနေ.] LT [မှာ]',\n nextDay: '[မနက်ဖြန်] LT [မှာ]',\n nextWeek: 'dddd LT [မှာ]',\n lastDay: '[မနေ.က] LT [မှာ]',\n lastWeek: '[ပြီးခဲ့သော] dddd LT [မှာ]',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'လာမည့် %s မှာ',\n past: 'လွန်ခဲ့သော %s က',\n s: 'စက္ကန်.အနည်းငယ်',\n m: 'တစ်မိနစ်',\n mm: '%d မိနစ်',\n h: 'တစ်နာရီ',\n hh: '%d နာရီ',\n d: 'တစ်ရက်',\n dd: '%d ရက်',\n M: 'တစ်လ',\n MM: '%d လ',\n y: 'တစ်နှစ်',\n yy: '%d နှစ်'\n },\n preparse: function (string) {\n return string.replace(/[၁၂၃၄၅၆၇၈၉၀]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function (string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 1st is the first week of the year.\n }\n});\n\nreturn my;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/my.js\n// module id = 443\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/my.js?", + ); + + /***/ + }, + /* 444 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/moment/locale/nb.js ***! + \*******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Norwegian Bokmål [nb]\n//! authors : Espen Hovlandsdal : https://github.com/rexxars\n//! Sigurd Gartmann : https://github.com/sigurdga\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar nb = moment.defineLocale('nb', {\n months : 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split('_'),\n monthsShort : 'jan._feb._mars_april_mai_juni_juli_aug._sep._okt._nov._des.'.split('_'),\n monthsParseExact : true,\n weekdays : 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'),\n weekdaysShort : 'sø._ma._ti._on._to._fr._lø.'.split('_'),\n weekdaysMin : 'sø_ma_ti_on_to_fr_lø'.split('_'),\n weekdaysParseExact : true,\n longDateFormat : {\n LT : 'HH:mm',\n LTS : 'HH:mm:ss',\n L : 'DD.MM.YYYY',\n LL : 'D. MMMM YYYY',\n LLL : 'D. MMMM YYYY [kl.] HH:mm',\n LLLL : 'dddd D. MMMM YYYY [kl.] HH:mm'\n },\n calendar : {\n sameDay: '[i dag kl.] LT',\n nextDay: '[i morgen kl.] LT',\n nextWeek: 'dddd [kl.] LT',\n lastDay: '[i går kl.] LT',\n lastWeek: '[forrige] dddd [kl.] LT',\n sameElse: 'L'\n },\n relativeTime : {\n future : 'om %s',\n past : '%s siden',\n s : 'noen sekunder',\n m : 'ett minutt',\n mm : '%d minutter',\n h : 'en time',\n hh : '%d timer',\n d : 'en dag',\n dd : '%d dager',\n M : 'en måned',\n MM : '%d måneder',\n y : 'ett år',\n yy : '%d år'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal : '%d.',\n week : {\n dow : 1, // Monday is the first day of the week.\n doy : 4 // The week that contains Jan 4th is the first week of the year.\n }\n});\n\nreturn nb;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/nb.js\n// module id = 444\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/nb.js?", + ); + + /***/ + }, + /* 445 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/moment/locale/ne.js ***! + \*******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Nepalese [ne]\n//! author : suvash : https://github.com/suvash\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar symbolMap = {\n '1': '१',\n '2': '२',\n '3': '३',\n '4': '४',\n '5': '५',\n '6': '६',\n '7': '७',\n '8': '८',\n '9': '९',\n '0': '०'\n};\nvar numberMap = {\n '१': '1',\n '२': '2',\n '३': '3',\n '४': '4',\n '५': '5',\n '६': '6',\n '७': '7',\n '८': '8',\n '९': '9',\n '०': '0'\n};\n\nvar ne = moment.defineLocale('ne', {\n months : 'जनवरी_फेब्रुवरी_मार्च_अप्रिल_मई_जुन_जुलाई_अगष्ट_सेप्टेम्बर_अक्टोबर_नोभेम्बर_डिसेम्बर'.split('_'),\n monthsShort : 'जन._फेब्रु._मार्च_अप्रि._मई_जुन_जुलाई._अग._सेप्ट._अक्टो._नोभे._डिसे.'.split('_'),\n monthsParseExact : true,\n weekdays : 'आइतबार_सोमबार_मङ्गलबार_बुधबार_बिहिबार_शुक्रबार_शनिबार'.split('_'),\n weekdaysShort : 'आइत._सोम._मङ्गल._बुध._बिहि._शुक्र._शनि.'.split('_'),\n weekdaysMin : 'आ._सो._मं._बु._बि._शु._श.'.split('_'),\n weekdaysParseExact : true,\n longDateFormat : {\n LT : 'Aको h:mm बजे',\n LTS : 'Aको h:mm:ss बजे',\n L : 'DD/MM/YYYY',\n LL : 'D MMMM YYYY',\n LLL : 'D MMMM YYYY, Aको h:mm बजे',\n LLLL : 'dddd, D MMMM YYYY, Aको h:mm बजे'\n },\n preparse: function (string) {\n return string.replace(/[१२३४५६७८९०]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function (string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n meridiemParse: /राति|बिहान|दिउँसो|साँझ/,\n meridiemHour : function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'राति') {\n return hour < 4 ? hour : hour + 12;\n } else if (meridiem === 'बिहान') {\n return hour;\n } else if (meridiem === 'दिउँसो') {\n return hour >= 10 ? hour : hour + 12;\n } else if (meridiem === 'साँझ') {\n return hour + 12;\n }\n },\n meridiem : function (hour, minute, isLower) {\n if (hour < 3) {\n return 'राति';\n } else if (hour < 12) {\n return 'बिहान';\n } else if (hour < 16) {\n return 'दिउँसो';\n } else if (hour < 20) {\n return 'साँझ';\n } else {\n return 'राति';\n }\n },\n calendar : {\n sameDay : '[आज] LT',\n nextDay : '[भोलि] LT',\n nextWeek : '[आउँदो] dddd[,] LT',\n lastDay : '[हिजो] LT',\n lastWeek : '[गएको] dddd[,] LT',\n sameElse : 'L'\n },\n relativeTime : {\n future : '%sमा',\n past : '%s अगाडि',\n s : 'केही क्षण',\n m : 'एक मिनेट',\n mm : '%d मिनेट',\n h : 'एक घण्टा',\n hh : '%d घण्टा',\n d : 'एक दिन',\n dd : '%d दिन',\n M : 'एक महिना',\n MM : '%d महिना',\n y : 'एक बर्ष',\n yy : '%d बर्ष'\n },\n week : {\n dow : 0, // Sunday is the first day of the week.\n doy : 6 // The week that contains Jan 1st is the first week of the year.\n }\n});\n\nreturn ne;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/ne.js\n// module id = 445\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/ne.js?", + ); + + /***/ + }, + /* 446 */ + /* unknown exports provided */ + /* all exports used */ + /*!**********************************!*\ + !*** ./~/moment/locale/nl-be.js ***! + \**********************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Dutch (Belgium) [nl-be]\n//! author : Joris Röling : https://github.com/jorisroling\n//! author : Jacob Middag : https://github.com/middagj\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar monthsShortWithDots = 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split('_');\nvar monthsShortWithoutDots = 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split('_');\n\nvar monthsParse = [/^jan/i, /^feb/i, /^maart|mrt.?$/i, /^apr/i, /^mei$/i, /^jun[i.]?$/i, /^jul[i.]?$/i, /^aug/i, /^sep/i, /^okt/i, /^nov/i, /^dec/i];\nvar monthsRegex = /^(januari|februari|maart|april|mei|april|ju[nl]i|augustus|september|oktober|november|december|jan\\.?|feb\\.?|mrt\\.?|apr\\.?|ju[nl]\\.?|aug\\.?|sep\\.?|okt\\.?|nov\\.?|dec\\.?)/i;\n\nvar nlBe = moment.defineLocale('nl-be', {\n months : 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split('_'),\n monthsShort : function (m, format) {\n if (!m) {\n return monthsShortWithDots;\n } else if (/-MMM-/.test(format)) {\n return monthsShortWithoutDots[m.month()];\n } else {\n return monthsShortWithDots[m.month()];\n }\n },\n\n monthsRegex: monthsRegex,\n monthsShortRegex: monthsRegex,\n monthsStrictRegex: /^(januari|februari|maart|mei|ju[nl]i|april|augustus|september|oktober|november|december)/i,\n monthsShortStrictRegex: /^(jan\\.?|feb\\.?|mrt\\.?|apr\\.?|mei|ju[nl]\\.?|aug\\.?|sep\\.?|okt\\.?|nov\\.?|dec\\.?)/i,\n\n monthsParse : monthsParse,\n longMonthsParse : monthsParse,\n shortMonthsParse : monthsParse,\n\n weekdays : 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split('_'),\n weekdaysShort : 'zo._ma._di._wo._do._vr._za.'.split('_'),\n weekdaysMin : 'Zo_Ma_Di_Wo_Do_Vr_Za'.split('_'),\n weekdaysParseExact : true,\n longDateFormat : {\n LT : 'HH:mm',\n LTS : 'HH:mm:ss',\n L : 'DD/MM/YYYY',\n LL : 'D MMMM YYYY',\n LLL : 'D MMMM YYYY HH:mm',\n LLLL : 'dddd D MMMM YYYY HH:mm'\n },\n calendar : {\n sameDay: '[vandaag om] LT',\n nextDay: '[morgen om] LT',\n nextWeek: 'dddd [om] LT',\n lastDay: '[gisteren om] LT',\n lastWeek: '[afgelopen] dddd [om] LT',\n sameElse: 'L'\n },\n relativeTime : {\n future : 'over %s',\n past : '%s geleden',\n s : 'een paar seconden',\n m : 'één minuut',\n mm : '%d minuten',\n h : 'één uur',\n hh : '%d uur',\n d : 'één dag',\n dd : '%d dagen',\n M : 'één maand',\n MM : '%d maanden',\n y : 'één jaar',\n yy : '%d jaar'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(ste|de)/,\n ordinal : function (number) {\n return number + ((number === 1 || number === 8 || number >= 20) ? 'ste' : 'de');\n },\n week : {\n dow : 1, // Monday is the first day of the week.\n doy : 4 // The week that contains Jan 4th is the first week of the year.\n }\n});\n\nreturn nlBe;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/nl-be.js\n// module id = 446\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/nl-be.js?", + ); + + /***/ + }, + /* 447 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/moment/locale/nl.js ***! + \*******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Dutch [nl]\n//! author : Joris Röling : https://github.com/jorisroling\n//! author : Jacob Middag : https://github.com/middagj\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar monthsShortWithDots = 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split('_');\nvar monthsShortWithoutDots = 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split('_');\n\nvar monthsParse = [/^jan/i, /^feb/i, /^maart|mrt.?$/i, /^apr/i, /^mei$/i, /^jun[i.]?$/i, /^jul[i.]?$/i, /^aug/i, /^sep/i, /^okt/i, /^nov/i, /^dec/i];\nvar monthsRegex = /^(januari|februari|maart|april|mei|april|ju[nl]i|augustus|september|oktober|november|december|jan\\.?|feb\\.?|mrt\\.?|apr\\.?|ju[nl]\\.?|aug\\.?|sep\\.?|okt\\.?|nov\\.?|dec\\.?)/i;\n\nvar nl = moment.defineLocale('nl', {\n months : 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split('_'),\n monthsShort : function (m, format) {\n if (!m) {\n return monthsShortWithDots;\n } else if (/-MMM-/.test(format)) {\n return monthsShortWithoutDots[m.month()];\n } else {\n return monthsShortWithDots[m.month()];\n }\n },\n\n monthsRegex: monthsRegex,\n monthsShortRegex: monthsRegex,\n monthsStrictRegex: /^(januari|februari|maart|mei|ju[nl]i|april|augustus|september|oktober|november|december)/i,\n monthsShortStrictRegex: /^(jan\\.?|feb\\.?|mrt\\.?|apr\\.?|mei|ju[nl]\\.?|aug\\.?|sep\\.?|okt\\.?|nov\\.?|dec\\.?)/i,\n\n monthsParse : monthsParse,\n longMonthsParse : monthsParse,\n shortMonthsParse : monthsParse,\n\n weekdays : 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split('_'),\n weekdaysShort : 'zo._ma._di._wo._do._vr._za.'.split('_'),\n weekdaysMin : 'Zo_Ma_Di_Wo_Do_Vr_Za'.split('_'),\n weekdaysParseExact : true,\n longDateFormat : {\n LT : 'HH:mm',\n LTS : 'HH:mm:ss',\n L : 'DD-MM-YYYY',\n LL : 'D MMMM YYYY',\n LLL : 'D MMMM YYYY HH:mm',\n LLLL : 'dddd D MMMM YYYY HH:mm'\n },\n calendar : {\n sameDay: '[vandaag om] LT',\n nextDay: '[morgen om] LT',\n nextWeek: 'dddd [om] LT',\n lastDay: '[gisteren om] LT',\n lastWeek: '[afgelopen] dddd [om] LT',\n sameElse: 'L'\n },\n relativeTime : {\n future : 'over %s',\n past : '%s geleden',\n s : 'een paar seconden',\n m : 'één minuut',\n mm : '%d minuten',\n h : 'één uur',\n hh : '%d uur',\n d : 'één dag',\n dd : '%d dagen',\n M : 'één maand',\n MM : '%d maanden',\n y : 'één jaar',\n yy : '%d jaar'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(ste|de)/,\n ordinal : function (number) {\n return number + ((number === 1 || number === 8 || number >= 20) ? 'ste' : 'de');\n },\n week : {\n dow : 1, // Monday is the first day of the week.\n doy : 4 // The week that contains Jan 4th is the first week of the year.\n }\n});\n\nreturn nl;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/nl.js\n// module id = 447\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/nl.js?", + ); + + /***/ + }, + /* 448 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/moment/locale/nn.js ***! + \*******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Nynorsk [nn]\n//! author : https://github.com/mechuwind\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar nn = moment.defineLocale('nn', {\n months : 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split('_'),\n monthsShort : 'jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_'),\n weekdays : 'sundag_måndag_tysdag_onsdag_torsdag_fredag_laurdag'.split('_'),\n weekdaysShort : 'sun_mån_tys_ons_tor_fre_lau'.split('_'),\n weekdaysMin : 'su_må_ty_on_to_fr_lø'.split('_'),\n longDateFormat : {\n LT : 'HH:mm',\n LTS : 'HH:mm:ss',\n L : 'DD.MM.YYYY',\n LL : 'D. MMMM YYYY',\n LLL : 'D. MMMM YYYY [kl.] H:mm',\n LLLL : 'dddd D. MMMM YYYY [kl.] HH:mm'\n },\n calendar : {\n sameDay: '[I dag klokka] LT',\n nextDay: '[I morgon klokka] LT',\n nextWeek: 'dddd [klokka] LT',\n lastDay: '[I går klokka] LT',\n lastWeek: '[Føregåande] dddd [klokka] LT',\n sameElse: 'L'\n },\n relativeTime : {\n future : 'om %s',\n past : '%s sidan',\n s : 'nokre sekund',\n m : 'eit minutt',\n mm : '%d minutt',\n h : 'ein time',\n hh : '%d timar',\n d : 'ein dag',\n dd : '%d dagar',\n M : 'ein månad',\n MM : '%d månader',\n y : 'eit år',\n yy : '%d år'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal : '%d.',\n week : {\n dow : 1, // Monday is the first day of the week.\n doy : 4 // The week that contains Jan 4th is the first week of the year.\n }\n});\n\nreturn nn;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/nn.js\n// module id = 448\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/nn.js?", + ); + + /***/ + }, + /* 449 */ + /* unknown exports provided */ + /* all exports used */ + /*!**********************************!*\ + !*** ./~/moment/locale/pa-in.js ***! + \**********************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Punjabi (India) [pa-in]\n//! author : Harpreet Singh : https://github.com/harpreetkhalsagtbit\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar symbolMap = {\n '1': '੧',\n '2': '੨',\n '3': '੩',\n '4': '੪',\n '5': '੫',\n '6': '੬',\n '7': '੭',\n '8': '੮',\n '9': '੯',\n '0': '੦'\n};\nvar numberMap = {\n '੧': '1',\n '੨': '2',\n '੩': '3',\n '੪': '4',\n '੫': '5',\n '੬': '6',\n '੭': '7',\n '੮': '8',\n '੯': '9',\n '੦': '0'\n};\n\nvar paIn = moment.defineLocale('pa-in', {\n // There are months name as per Nanakshahi Calender but they are not used as rigidly in modern Punjabi.\n months : 'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split('_'),\n monthsShort : 'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split('_'),\n weekdays : 'ਐਤਵਾਰ_ਸੋਮਵਾਰ_ਮੰਗਲਵਾਰ_ਬੁਧਵਾਰ_ਵੀਰਵਾਰ_ਸ਼ੁੱਕਰਵਾਰ_ਸ਼ਨੀਚਰਵਾਰ'.split('_'),\n weekdaysShort : 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'),\n weekdaysMin : 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'),\n longDateFormat : {\n LT : 'A h:mm ਵਜੇ',\n LTS : 'A h:mm:ss ਵਜੇ',\n L : 'DD/MM/YYYY',\n LL : 'D MMMM YYYY',\n LLL : 'D MMMM YYYY, A h:mm ਵਜੇ',\n LLLL : 'dddd, D MMMM YYYY, A h:mm ਵਜੇ'\n },\n calendar : {\n sameDay : '[ਅਜ] LT',\n nextDay : '[ਕਲ] LT',\n nextWeek : 'dddd, LT',\n lastDay : '[ਕਲ] LT',\n lastWeek : '[ਪਿਛਲੇ] dddd, LT',\n sameElse : 'L'\n },\n relativeTime : {\n future : '%s ਵਿੱਚ',\n past : '%s ਪਿਛਲੇ',\n s : 'ਕੁਝ ਸਕਿੰਟ',\n m : 'ਇਕ ਮਿੰਟ',\n mm : '%d ਮਿੰਟ',\n h : 'ਇੱਕ ਘੰਟਾ',\n hh : '%d ਘੰਟੇ',\n d : 'ਇੱਕ ਦਿਨ',\n dd : '%d ਦਿਨ',\n M : 'ਇੱਕ ਮਹੀਨਾ',\n MM : '%d ਮਹੀਨੇ',\n y : 'ਇੱਕ ਸਾਲ',\n yy : '%d ਸਾਲ'\n },\n preparse: function (string) {\n return string.replace(/[੧੨੩੪੫੬੭੮੯੦]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function (string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n // Punjabi notation for meridiems are quite fuzzy in practice. While there exists\n // a rigid notion of a 'Pahar' it is not used as rigidly in modern Punjabi.\n meridiemParse: /ਰਾਤ|ਸਵੇਰ|ਦੁਪਹਿਰ|ਸ਼ਾਮ/,\n meridiemHour : function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'ਰਾਤ') {\n return hour < 4 ? hour : hour + 12;\n } else if (meridiem === 'ਸਵੇਰ') {\n return hour;\n } else if (meridiem === 'ਦੁਪਹਿਰ') {\n return hour >= 10 ? hour : hour + 12;\n } else if (meridiem === 'ਸ਼ਾਮ') {\n return hour + 12;\n }\n },\n meridiem : function (hour, minute, isLower) {\n if (hour < 4) {\n return 'ਰਾਤ';\n } else if (hour < 10) {\n return 'ਸਵੇਰ';\n } else if (hour < 17) {\n return 'ਦੁਪਹਿਰ';\n } else if (hour < 20) {\n return 'ਸ਼ਾਮ';\n } else {\n return 'ਰਾਤ';\n }\n },\n week : {\n dow : 0, // Sunday is the first day of the week.\n doy : 6 // The week that contains Jan 1st is the first week of the year.\n }\n});\n\nreturn paIn;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/pa-in.js\n// module id = 449\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/pa-in.js?", + ); + + /***/ + }, + /* 450 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/moment/locale/pl.js ***! + \*******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Polish [pl]\n//! author : Rafal Hirsz : https://github.com/evoL\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar monthsNominative = 'styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień'.split('_');\nvar monthsSubjective = 'stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia'.split('_');\nfunction plural(n) {\n return (n % 10 < 5) && (n % 10 > 1) && ((~~(n / 10) % 10) !== 1);\n}\nfunction translate(number, withoutSuffix, key) {\n var result = number + ' ';\n switch (key) {\n case 'm':\n return withoutSuffix ? 'minuta' : 'minutę';\n case 'mm':\n return result + (plural(number) ? 'minuty' : 'minut');\n case 'h':\n return withoutSuffix ? 'godzina' : 'godzinę';\n case 'hh':\n return result + (plural(number) ? 'godziny' : 'godzin');\n case 'MM':\n return result + (plural(number) ? 'miesiące' : 'miesięcy');\n case 'yy':\n return result + (plural(number) ? 'lata' : 'lat');\n }\n}\n\nvar pl = moment.defineLocale('pl', {\n months : function (momentToFormat, format) {\n if (!momentToFormat) {\n return monthsNominative;\n } else if (format === '') {\n // Hack: if format empty we know this is used to generate\n // RegExp by moment. Give then back both valid forms of months\n // in RegExp ready format.\n return '(' + monthsSubjective[momentToFormat.month()] + '|' + monthsNominative[momentToFormat.month()] + ')';\n } else if (/D MMMM/.test(format)) {\n return monthsSubjective[momentToFormat.month()];\n } else {\n return monthsNominative[momentToFormat.month()];\n }\n },\n monthsShort : 'sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru'.split('_'),\n weekdays : 'niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota'.split('_'),\n weekdaysShort : 'ndz_pon_wt_śr_czw_pt_sob'.split('_'),\n weekdaysMin : 'Nd_Pn_Wt_Śr_Cz_Pt_So'.split('_'),\n longDateFormat : {\n LT : 'HH:mm',\n LTS : 'HH:mm:ss',\n L : 'DD.MM.YYYY',\n LL : 'D MMMM YYYY',\n LLL : 'D MMMM YYYY HH:mm',\n LLLL : 'dddd, D MMMM YYYY HH:mm'\n },\n calendar : {\n sameDay: '[Dziś o] LT',\n nextDay: '[Jutro o] LT',\n nextWeek: '[W] dddd [o] LT',\n lastDay: '[Wczoraj o] LT',\n lastWeek: function () {\n switch (this.day()) {\n case 0:\n return '[W zeszłą niedzielę o] LT';\n case 3:\n return '[W zeszłą środę o] LT';\n case 6:\n return '[W zeszłą sobotę o] LT';\n default:\n return '[W zeszły] dddd [o] LT';\n }\n },\n sameElse: 'L'\n },\n relativeTime : {\n future : 'za %s',\n past : '%s temu',\n s : 'kilka sekund',\n m : translate,\n mm : translate,\n h : translate,\n hh : translate,\n d : '1 dzień',\n dd : '%d dni',\n M : 'miesiąc',\n MM : translate,\n y : 'rok',\n yy : translate\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal : '%d.',\n week : {\n dow : 1, // Monday is the first day of the week.\n doy : 4 // The week that contains Jan 4th is the first week of the year.\n }\n});\n\nreturn pl;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/pl.js\n// module id = 450\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/pl.js?", + ); + + /***/ + }, + /* 451 */ + /* unknown exports provided */ + /* all exports used */ + /*!**********************************!*\ + !*** ./~/moment/locale/pt-br.js ***! + \**********************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Portuguese (Brazil) [pt-br]\n//! author : Caio Ribeiro Pereira : https://github.com/caio-ribeiro-pereira\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar ptBr = moment.defineLocale('pt-br', {\n months : 'Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro'.split('_'),\n monthsShort : 'Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez'.split('_'),\n weekdays : 'Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado'.split('_'),\n weekdaysShort : 'Dom_Seg_Ter_Qua_Qui_Sex_Sáb'.split('_'),\n weekdaysMin : 'Do_2ª_3ª_4ª_5ª_6ª_Sá'.split('_'),\n weekdaysParseExact : true,\n longDateFormat : {\n LT : 'HH:mm',\n LTS : 'HH:mm:ss',\n L : 'DD/MM/YYYY',\n LL : 'D [de] MMMM [de] YYYY',\n LLL : 'D [de] MMMM [de] YYYY [às] HH:mm',\n LLLL : 'dddd, D [de] MMMM [de] YYYY [às] HH:mm'\n },\n calendar : {\n sameDay: '[Hoje às] LT',\n nextDay: '[Amanhã às] LT',\n nextWeek: 'dddd [às] LT',\n lastDay: '[Ontem às] LT',\n lastWeek: function () {\n return (this.day() === 0 || this.day() === 6) ?\n '[Último] dddd [às] LT' : // Saturday + Sunday\n '[Última] dddd [às] LT'; // Monday - Friday\n },\n sameElse: 'L'\n },\n relativeTime : {\n future : 'em %s',\n past : '%s atrás',\n s : 'poucos segundos',\n m : 'um minuto',\n mm : '%d minutos',\n h : 'uma hora',\n hh : '%d horas',\n d : 'um dia',\n dd : '%d dias',\n M : 'um mês',\n MM : '%d meses',\n y : 'um ano',\n yy : '%d anos'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal : '%dº'\n});\n\nreturn ptBr;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/pt-br.js\n// module id = 451\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/pt-br.js?", + ); + + /***/ + }, + /* 452 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/moment/locale/pt.js ***! + \*******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Portuguese [pt]\n//! author : Jefferson : https://github.com/jalex79\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar pt = moment.defineLocale('pt', {\n months : 'Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro'.split('_'),\n monthsShort : 'Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez'.split('_'),\n weekdays : 'Domingo_Segunda-Feira_Terça-Feira_Quarta-Feira_Quinta-Feira_Sexta-Feira_Sábado'.split('_'),\n weekdaysShort : 'Dom_Seg_Ter_Qua_Qui_Sex_Sáb'.split('_'),\n weekdaysMin : 'Do_2ª_3ª_4ª_5ª_6ª_Sá'.split('_'),\n weekdaysParseExact : true,\n longDateFormat : {\n LT : 'HH:mm',\n LTS : 'HH:mm:ss',\n L : 'DD/MM/YYYY',\n LL : 'D [de] MMMM [de] YYYY',\n LLL : 'D [de] MMMM [de] YYYY HH:mm',\n LLLL : 'dddd, D [de] MMMM [de] YYYY HH:mm'\n },\n calendar : {\n sameDay: '[Hoje às] LT',\n nextDay: '[Amanhã às] LT',\n nextWeek: 'dddd [às] LT',\n lastDay: '[Ontem às] LT',\n lastWeek: function () {\n return (this.day() === 0 || this.day() === 6) ?\n '[Último] dddd [às] LT' : // Saturday + Sunday\n '[Última] dddd [às] LT'; // Monday - Friday\n },\n sameElse: 'L'\n },\n relativeTime : {\n future : 'em %s',\n past : 'há %s',\n s : 'segundos',\n m : 'um minuto',\n mm : '%d minutos',\n h : 'uma hora',\n hh : '%d horas',\n d : 'um dia',\n dd : '%d dias',\n M : 'um mês',\n MM : '%d meses',\n y : 'um ano',\n yy : '%d anos'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal : '%dº',\n week : {\n dow : 1, // Monday is the first day of the week.\n doy : 4 // The week that contains Jan 4th is the first week of the year.\n }\n});\n\nreturn pt;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/pt.js\n// module id = 452\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/pt.js?", + ); + + /***/ + }, + /* 453 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/moment/locale/ro.js ***! + \*******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Romanian [ro]\n//! author : Vlad Gurdiga : https://github.com/gurdiga\n//! author : Valentin Agachi : https://github.com/avaly\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nfunction relativeTimeWithPlural(number, withoutSuffix, key) {\n var format = {\n 'mm': 'minute',\n 'hh': 'ore',\n 'dd': 'zile',\n 'MM': 'luni',\n 'yy': 'ani'\n },\n separator = ' ';\n if (number % 100 >= 20 || (number >= 100 && number % 100 === 0)) {\n separator = ' de ';\n }\n return number + separator + format[key];\n}\n\nvar ro = moment.defineLocale('ro', {\n months : 'ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie'.split('_'),\n monthsShort : 'ian._febr._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.'.split('_'),\n monthsParseExact: true,\n weekdays : 'duminică_luni_marți_miercuri_joi_vineri_sâmbătă'.split('_'),\n weekdaysShort : 'Dum_Lun_Mar_Mie_Joi_Vin_Sâm'.split('_'),\n weekdaysMin : 'Du_Lu_Ma_Mi_Jo_Vi_Sâ'.split('_'),\n longDateFormat : {\n LT : 'H:mm',\n LTS : 'H:mm:ss',\n L : 'DD.MM.YYYY',\n LL : 'D MMMM YYYY',\n LLL : 'D MMMM YYYY H:mm',\n LLLL : 'dddd, D MMMM YYYY H:mm'\n },\n calendar : {\n sameDay: '[azi la] LT',\n nextDay: '[mâine la] LT',\n nextWeek: 'dddd [la] LT',\n lastDay: '[ieri la] LT',\n lastWeek: '[fosta] dddd [la] LT',\n sameElse: 'L'\n },\n relativeTime : {\n future : 'peste %s',\n past : '%s în urmă',\n s : 'câteva secunde',\n m : 'un minut',\n mm : relativeTimeWithPlural,\n h : 'o oră',\n hh : relativeTimeWithPlural,\n d : 'o zi',\n dd : relativeTimeWithPlural,\n M : 'o lună',\n MM : relativeTimeWithPlural,\n y : 'un an',\n yy : relativeTimeWithPlural\n },\n week : {\n dow : 1, // Monday is the first day of the week.\n doy : 7 // The week that contains Jan 1st is the first week of the year.\n }\n});\n\nreturn ro;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/ro.js\n// module id = 453\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/ro.js?", + ); + + /***/ + }, + /* 454 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/moment/locale/ru.js ***! + \*******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Russian [ru]\n//! author : Viktorminator : https://github.com/Viktorminator\n//! Author : Menelion Elensúle : https://github.com/Oire\n//! author : Коренберг Марк : https://github.com/socketpair\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nfunction plural(word, num) {\n var forms = word.split('_');\n return num % 10 === 1 && num % 100 !== 11 ? forms[0] : (num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) ? forms[1] : forms[2]);\n}\nfunction relativeTimeWithPlural(number, withoutSuffix, key) {\n var format = {\n 'mm': withoutSuffix ? 'минута_минуты_минут' : 'минуту_минуты_минут',\n 'hh': 'час_часа_часов',\n 'dd': 'день_дня_дней',\n 'MM': 'месяц_месяца_месяцев',\n 'yy': 'год_года_лет'\n };\n if (key === 'm') {\n return withoutSuffix ? 'минута' : 'минуту';\n }\n else {\n return number + ' ' + plural(format[key], +number);\n }\n}\nvar monthsParse = [/^янв/i, /^фев/i, /^мар/i, /^апр/i, /^ма[йя]/i, /^июн/i, /^июл/i, /^авг/i, /^сен/i, /^окт/i, /^ноя/i, /^дек/i];\n\n// http://new.gramota.ru/spravka/rules/139-prop : § 103\n// Сокращения месяцев: http://new.gramota.ru/spravka/buro/search-answer?s=242637\n// CLDR data: http://www.unicode.org/cldr/charts/28/summary/ru.html#1753\nvar ru = moment.defineLocale('ru', {\n months : {\n format: 'января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря'.split('_'),\n standalone: 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split('_')\n },\n monthsShort : {\n // по CLDR именно \"июл.\" и \"июн.\", но какой смысл менять букву на точку ?\n format: 'янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.'.split('_'),\n standalone: 'янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.'.split('_')\n },\n weekdays : {\n standalone: 'воскресенье_понедельник_вторник_среда_четверг_пятница_суббота'.split('_'),\n format: 'воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу'.split('_'),\n isFormat: /\\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?\\] ?dddd/\n },\n weekdaysShort : 'вс_пн_вт_ср_чт_пт_сб'.split('_'),\n weekdaysMin : 'вс_пн_вт_ср_чт_пт_сб'.split('_'),\n monthsParse : monthsParse,\n longMonthsParse : monthsParse,\n shortMonthsParse : monthsParse,\n\n // полные названия с падежами, по три буквы, для некоторых, по 4 буквы, сокращения с точкой и без точки\n monthsRegex: /^(январ[ья]|янв\\.?|феврал[ья]|февр?\\.?|марта?|мар\\.?|апрел[ья]|апр\\.?|ма[йя]|июн[ья]|июн\\.?|июл[ья]|июл\\.?|августа?|авг\\.?|сентябр[ья]|сент?\\.?|октябр[ья]|окт\\.?|ноябр[ья]|нояб?\\.?|декабр[ья]|дек\\.?)/i,\n\n // копия предыдущего\n monthsShortRegex: /^(январ[ья]|янв\\.?|феврал[ья]|февр?\\.?|марта?|мар\\.?|апрел[ья]|апр\\.?|ма[йя]|июн[ья]|июн\\.?|июл[ья]|июл\\.?|августа?|авг\\.?|сентябр[ья]|сент?\\.?|октябр[ья]|окт\\.?|ноябр[ья]|нояб?\\.?|декабр[ья]|дек\\.?)/i,\n\n // полные названия с падежами\n monthsStrictRegex: /^(январ[яь]|феврал[яь]|марта?|апрел[яь]|ма[яй]|июн[яь]|июл[яь]|августа?|сентябр[яь]|октябр[яь]|ноябр[яь]|декабр[яь])/i,\n\n // Выражение, которое соотвествует только сокращённым формам\n monthsShortStrictRegex: /^(янв\\.|февр?\\.|мар[т.]|апр\\.|ма[яй]|июн[ья.]|июл[ья.]|авг\\.|сент?\\.|окт\\.|нояб?\\.|дек\\.)/i,\n longDateFormat : {\n LT : 'HH:mm',\n LTS : 'HH:mm:ss',\n L : 'DD.MM.YYYY',\n LL : 'D MMMM YYYY г.',\n LLL : 'D MMMM YYYY г., HH:mm',\n LLLL : 'dddd, D MMMM YYYY г., HH:mm'\n },\n calendar : {\n sameDay: '[Сегодня в] LT',\n nextDay: '[Завтра в] LT',\n lastDay: '[Вчера в] LT',\n nextWeek: function (now) {\n if (now.week() !== this.week()) {\n switch (this.day()) {\n case 0:\n return '[В следующее] dddd [в] LT';\n case 1:\n case 2:\n case 4:\n return '[В следующий] dddd [в] LT';\n case 3:\n case 5:\n case 6:\n return '[В следующую] dddd [в] LT';\n }\n } else {\n if (this.day() === 2) {\n return '[Во] dddd [в] LT';\n } else {\n return '[В] dddd [в] LT';\n }\n }\n },\n lastWeek: function (now) {\n if (now.week() !== this.week()) {\n switch (this.day()) {\n case 0:\n return '[В прошлое] dddd [в] LT';\n case 1:\n case 2:\n case 4:\n return '[В прошлый] dddd [в] LT';\n case 3:\n case 5:\n case 6:\n return '[В прошлую] dddd [в] LT';\n }\n } else {\n if (this.day() === 2) {\n return '[Во] dddd [в] LT';\n } else {\n return '[В] dddd [в] LT';\n }\n }\n },\n sameElse: 'L'\n },\n relativeTime : {\n future : 'через %s',\n past : '%s назад',\n s : 'несколько секунд',\n m : relativeTimeWithPlural,\n mm : relativeTimeWithPlural,\n h : 'час',\n hh : relativeTimeWithPlural,\n d : 'день',\n dd : relativeTimeWithPlural,\n M : 'месяц',\n MM : relativeTimeWithPlural,\n y : 'год',\n yy : relativeTimeWithPlural\n },\n meridiemParse: /ночи|утра|дня|вечера/i,\n isPM : function (input) {\n return /^(дня|вечера)$/.test(input);\n },\n meridiem : function (hour, minute, isLower) {\n if (hour < 4) {\n return 'ночи';\n } else if (hour < 12) {\n return 'утра';\n } else if (hour < 17) {\n return 'дня';\n } else {\n return 'вечера';\n }\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-(й|го|я)/,\n ordinal: function (number, period) {\n switch (period) {\n case 'M':\n case 'd':\n case 'DDD':\n return number + '-й';\n case 'D':\n return number + '-го';\n case 'w':\n case 'W':\n return number + '-я';\n default:\n return number;\n }\n },\n week : {\n dow : 1, // Monday is the first day of the week.\n doy : 7 // The week that contains Jan 1st is the first week of the year.\n }\n});\n\nreturn ru;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/ru.js\n// module id = 454\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/ru.js?", + ); + + /***/ + }, + /* 455 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/moment/locale/sd.js ***! + \*******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Sindhi [sd]\n//! author : Narain Sagar : https://github.com/narainsagar\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar months = [\n 'جنوري',\n 'فيبروري',\n 'مارچ',\n 'اپريل',\n 'مئي',\n 'جون',\n 'جولاءِ',\n 'آگسٽ',\n 'سيپٽمبر',\n 'آڪٽوبر',\n 'نومبر',\n 'ڊسمبر'\n];\nvar days = [\n 'آچر',\n 'سومر',\n 'اڱارو',\n 'اربع',\n 'خميس',\n 'جمع',\n 'ڇنڇر'\n];\n\nvar sd = moment.defineLocale('sd', {\n months : months,\n monthsShort : months,\n weekdays : days,\n weekdaysShort : days,\n weekdaysMin : days,\n longDateFormat : {\n LT : 'HH:mm',\n LTS : 'HH:mm:ss',\n L : 'DD/MM/YYYY',\n LL : 'D MMMM YYYY',\n LLL : 'D MMMM YYYY HH:mm',\n LLLL : 'dddd، D MMMM YYYY HH:mm'\n },\n meridiemParse: /صبح|شام/,\n isPM : function (input) {\n return 'شام' === input;\n },\n meridiem : function (hour, minute, isLower) {\n if (hour < 12) {\n return 'صبح';\n }\n return 'شام';\n },\n calendar : {\n sameDay : '[اڄ] LT',\n nextDay : '[سڀاڻي] LT',\n nextWeek : 'dddd [اڳين هفتي تي] LT',\n lastDay : '[ڪالهه] LT',\n lastWeek : '[گزريل هفتي] dddd [تي] LT',\n sameElse : 'L'\n },\n relativeTime : {\n future : '%s پوء',\n past : '%s اڳ',\n s : 'چند سيڪنڊ',\n m : 'هڪ منٽ',\n mm : '%d منٽ',\n h : 'هڪ ڪلاڪ',\n hh : '%d ڪلاڪ',\n d : 'هڪ ڏينهن',\n dd : '%d ڏينهن',\n M : 'هڪ مهينو',\n MM : '%d مهينا',\n y : 'هڪ سال',\n yy : '%d سال'\n },\n preparse: function (string) {\n return string.replace(/،/g, ',');\n },\n postformat: function (string) {\n return string.replace(/,/g, '،');\n },\n week : {\n dow : 1, // Monday is the first day of the week.\n doy : 4 // The week that contains Jan 4th is the first week of the year.\n }\n});\n\nreturn sd;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/sd.js\n// module id = 455\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/sd.js?", + ); + + /***/ + }, + /* 456 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/moment/locale/se.js ***! + \*******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Northern Sami [se]\n//! authors : Bård Rolstad Henriksen : https://github.com/karamell\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\n\nvar se = moment.defineLocale('se', {\n months : 'ođđajagemánnu_guovvamánnu_njukčamánnu_cuoŋománnu_miessemánnu_geassemánnu_suoidnemánnu_borgemánnu_čakčamánnu_golggotmánnu_skábmamánnu_juovlamánnu'.split('_'),\n monthsShort : 'ođđj_guov_njuk_cuo_mies_geas_suoi_borg_čakč_golg_skáb_juov'.split('_'),\n weekdays : 'sotnabeaivi_vuossárga_maŋŋebárga_gaskavahkku_duorastat_bearjadat_lávvardat'.split('_'),\n weekdaysShort : 'sotn_vuos_maŋ_gask_duor_bear_láv'.split('_'),\n weekdaysMin : 's_v_m_g_d_b_L'.split('_'),\n longDateFormat : {\n LT : 'HH:mm',\n LTS : 'HH:mm:ss',\n L : 'DD.MM.YYYY',\n LL : 'MMMM D. [b.] YYYY',\n LLL : 'MMMM D. [b.] YYYY [ti.] HH:mm',\n LLLL : 'dddd, MMMM D. [b.] YYYY [ti.] HH:mm'\n },\n calendar : {\n sameDay: '[otne ti] LT',\n nextDay: '[ihttin ti] LT',\n nextWeek: 'dddd [ti] LT',\n lastDay: '[ikte ti] LT',\n lastWeek: '[ovddit] dddd [ti] LT',\n sameElse: 'L'\n },\n relativeTime : {\n future : '%s geažes',\n past : 'maŋit %s',\n s : 'moadde sekunddat',\n m : 'okta minuhta',\n mm : '%d minuhtat',\n h : 'okta diimmu',\n hh : '%d diimmut',\n d : 'okta beaivi',\n dd : '%d beaivvit',\n M : 'okta mánnu',\n MM : '%d mánut',\n y : 'okta jahki',\n yy : '%d jagit'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal : '%d.',\n week : {\n dow : 1, // Monday is the first day of the week.\n doy : 4 // The week that contains Jan 4th is the first week of the year.\n }\n});\n\nreturn se;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/se.js\n// module id = 456\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/se.js?", + ); + + /***/ + }, + /* 457 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/moment/locale/si.js ***! + \*******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Sinhalese [si]\n//! author : Sampath Sitinamaluwa : https://github.com/sampathsris\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\n/*jshint -W100*/\nvar si = moment.defineLocale('si', {\n months : 'ජනවාරි_පෙබරවාරි_මාර්තු_අප්‍රේල්_මැයි_ජූනි_ජූලි_අගෝස්තු_සැප්තැම්බර්_ඔක්තෝබර්_නොවැම්බර්_දෙසැම්බර්'.split('_'),\n monthsShort : 'ජන_පෙබ_මාර්_අප්_මැයි_ජූනි_ජූලි_අගෝ_සැප්_ඔක්_නොවැ_දෙසැ'.split('_'),\n weekdays : 'ඉරිදා_සඳුදා_අඟහරුවාදා_බදාදා_බ්‍රහස්පතින්දා_සිකුරාදා_සෙනසුරාදා'.split('_'),\n weekdaysShort : 'ඉරි_සඳු_අඟ_බදා_බ්‍රහ_සිකු_සෙන'.split('_'),\n weekdaysMin : 'ඉ_ස_අ_බ_බ්‍ර_සි_සෙ'.split('_'),\n weekdaysParseExact : true,\n longDateFormat : {\n LT : 'a h:mm',\n LTS : 'a h:mm:ss',\n L : 'YYYY/MM/DD',\n LL : 'YYYY MMMM D',\n LLL : 'YYYY MMMM D, a h:mm',\n LLLL : 'YYYY MMMM D [වැනි] dddd, a h:mm:ss'\n },\n calendar : {\n sameDay : '[අද] LT[ට]',\n nextDay : '[හෙට] LT[ට]',\n nextWeek : 'dddd LT[ට]',\n lastDay : '[ඊයේ] LT[ට]',\n lastWeek : '[පසුගිය] dddd LT[ට]',\n sameElse : 'L'\n },\n relativeTime : {\n future : '%sකින්',\n past : '%sකට පෙර',\n s : 'තත්පර කිහිපය',\n m : 'මිනිත්තුව',\n mm : 'මිනිත්තු %d',\n h : 'පැය',\n hh : 'පැය %d',\n d : 'දිනය',\n dd : 'දින %d',\n M : 'මාසය',\n MM : 'මාස %d',\n y : 'වසර',\n yy : 'වසර %d'\n },\n dayOfMonthOrdinalParse: /\\d{1,2} වැනි/,\n ordinal : function (number) {\n return number + ' වැනි';\n },\n meridiemParse : /පෙර වරු|පස් වරු|පෙ.ව|ප.ව./,\n isPM : function (input) {\n return input === 'ප.ව.' || input === 'පස් වරු';\n },\n meridiem : function (hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'ප.ව.' : 'පස් වරු';\n } else {\n return isLower ? 'පෙ.ව.' : 'පෙර වරු';\n }\n }\n});\n\nreturn si;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/si.js\n// module id = 457\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/si.js?", + ); + + /***/ + }, + /* 458 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/moment/locale/sk.js ***! + \*******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Slovak [sk]\n//! author : Martin Minka : https://github.com/k2s\n//! based on work of petrbela : https://github.com/petrbela\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar months = 'január_február_marec_apríl_máj_jún_júl_august_september_október_november_december'.split('_');\nvar monthsShort = 'jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec'.split('_');\nfunction plural(n) {\n return (n > 1) && (n < 5);\n}\nfunction translate(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's': // a few seconds / in a few seconds / a few seconds ago\n return (withoutSuffix || isFuture) ? 'pár sekúnd' : 'pár sekundami';\n case 'm': // a minute / in a minute / a minute ago\n return withoutSuffix ? 'minúta' : (isFuture ? 'minútu' : 'minútou');\n case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'minúty' : 'minút');\n } else {\n return result + 'minútami';\n }\n break;\n case 'h': // an hour / in an hour / an hour ago\n return withoutSuffix ? 'hodina' : (isFuture ? 'hodinu' : 'hodinou');\n case 'hh': // 9 hours / in 9 hours / 9 hours ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'hodiny' : 'hodín');\n } else {\n return result + 'hodinami';\n }\n break;\n case 'd': // a day / in a day / a day ago\n return (withoutSuffix || isFuture) ? 'deň' : 'dňom';\n case 'dd': // 9 days / in 9 days / 9 days ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'dni' : 'dní');\n } else {\n return result + 'dňami';\n }\n break;\n case 'M': // a month / in a month / a month ago\n return (withoutSuffix || isFuture) ? 'mesiac' : 'mesiacom';\n case 'MM': // 9 months / in 9 months / 9 months ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'mesiace' : 'mesiacov');\n } else {\n return result + 'mesiacmi';\n }\n break;\n case 'y': // a year / in a year / a year ago\n return (withoutSuffix || isFuture) ? 'rok' : 'rokom';\n case 'yy': // 9 years / in 9 years / 9 years ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'roky' : 'rokov');\n } else {\n return result + 'rokmi';\n }\n break;\n }\n}\n\nvar sk = moment.defineLocale('sk', {\n months : months,\n monthsShort : monthsShort,\n weekdays : 'nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota'.split('_'),\n weekdaysShort : 'ne_po_ut_st_št_pi_so'.split('_'),\n weekdaysMin : 'ne_po_ut_st_št_pi_so'.split('_'),\n longDateFormat : {\n LT: 'H:mm',\n LTS : 'H:mm:ss',\n L : 'DD.MM.YYYY',\n LL : 'D. MMMM YYYY',\n LLL : 'D. MMMM YYYY H:mm',\n LLLL : 'dddd D. MMMM YYYY H:mm'\n },\n calendar : {\n sameDay: '[dnes o] LT',\n nextDay: '[zajtra o] LT',\n nextWeek: function () {\n switch (this.day()) {\n case 0:\n return '[v nedeľu o] LT';\n case 1:\n case 2:\n return '[v] dddd [o] LT';\n case 3:\n return '[v stredu o] LT';\n case 4:\n return '[vo štvrtok o] LT';\n case 5:\n return '[v piatok o] LT';\n case 6:\n return '[v sobotu o] LT';\n }\n },\n lastDay: '[včera o] LT',\n lastWeek: function () {\n switch (this.day()) {\n case 0:\n return '[minulú nedeľu o] LT';\n case 1:\n case 2:\n return '[minulý] dddd [o] LT';\n case 3:\n return '[minulú stredu o] LT';\n case 4:\n case 5:\n return '[minulý] dddd [o] LT';\n case 6:\n return '[minulú sobotu o] LT';\n }\n },\n sameElse: 'L'\n },\n relativeTime : {\n future : 'za %s',\n past : 'pred %s',\n s : translate,\n m : translate,\n mm : translate,\n h : translate,\n hh : translate,\n d : translate,\n dd : translate,\n M : translate,\n MM : translate,\n y : translate,\n yy : translate\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal : '%d.',\n week : {\n dow : 1, // Monday is the first day of the week.\n doy : 4 // The week that contains Jan 4th is the first week of the year.\n }\n});\n\nreturn sk;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/sk.js\n// module id = 458\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/sk.js?", + ); + + /***/ + }, + /* 459 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/moment/locale/sl.js ***! + \*******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Slovenian [sl]\n//! author : Robert Sedovšek : https://github.com/sedovsek\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nfunction processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture ? 'nekaj sekund' : 'nekaj sekundami';\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n}\n\nvar sl = moment.defineLocale('sl', {\n months : 'januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december'.split('_'),\n monthsShort : 'jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.'.split('_'),\n monthsParseExact: true,\n weekdays : 'nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota'.split('_'),\n weekdaysShort : 'ned._pon._tor._sre._čet._pet._sob.'.split('_'),\n weekdaysMin : 'ne_po_to_sr_če_pe_so'.split('_'),\n weekdaysParseExact : true,\n longDateFormat : {\n LT : 'H:mm',\n LTS : 'H:mm:ss',\n L : 'DD.MM.YYYY',\n LL : 'D. MMMM YYYY',\n LLL : 'D. MMMM YYYY H:mm',\n LLLL : 'dddd, D. MMMM YYYY H:mm'\n },\n calendar : {\n sameDay : '[danes ob] LT',\n nextDay : '[jutri ob] LT',\n\n nextWeek : function () {\n switch (this.day()) {\n case 0:\n return '[v] [nedeljo] [ob] LT';\n case 3:\n return '[v] [sredo] [ob] LT';\n case 6:\n return '[v] [soboto] [ob] LT';\n case 1:\n case 2:\n case 4:\n case 5:\n return '[v] dddd [ob] LT';\n }\n },\n lastDay : '[včeraj ob] LT',\n lastWeek : function () {\n switch (this.day()) {\n case 0:\n return '[prejšnjo] [nedeljo] [ob] LT';\n case 3:\n return '[prejšnjo] [sredo] [ob] LT';\n case 6:\n return '[prejšnjo] [soboto] [ob] LT';\n case 1:\n case 2:\n case 4:\n case 5:\n return '[prejšnji] dddd [ob] LT';\n }\n },\n sameElse : 'L'\n },\n relativeTime : {\n future : 'čez %s',\n past : 'pred %s',\n s : processRelativeTime,\n m : processRelativeTime,\n mm : processRelativeTime,\n h : processRelativeTime,\n hh : processRelativeTime,\n d : processRelativeTime,\n dd : processRelativeTime,\n M : processRelativeTime,\n MM : processRelativeTime,\n y : processRelativeTime,\n yy : processRelativeTime\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal : '%d.',\n week : {\n dow : 1, // Monday is the first day of the week.\n doy : 7 // The week that contains Jan 1st is the first week of the year.\n }\n});\n\nreturn sl;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/sl.js\n// module id = 459\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/sl.js?", + ); + + /***/ + }, + /* 460 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/moment/locale/sq.js ***! + \*******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Albanian [sq]\n//! author : Flakërim Ismani : https://github.com/flakerimi\n//! author : Menelion Elensúle : https://github.com/Oire\n//! author : Oerd Cukalla : https://github.com/oerd\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar sq = moment.defineLocale('sq', {\n months : 'Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_Nëntor_Dhjetor'.split('_'),\n monthsShort : 'Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_Nën_Dhj'.split('_'),\n weekdays : 'E Diel_E Hënë_E Martë_E Mërkurë_E Enjte_E Premte_E Shtunë'.split('_'),\n weekdaysShort : 'Die_Hën_Mar_Mër_Enj_Pre_Sht'.split('_'),\n weekdaysMin : 'D_H_Ma_Më_E_P_Sh'.split('_'),\n weekdaysParseExact : true,\n meridiemParse: /PD|MD/,\n isPM: function (input) {\n return input.charAt(0) === 'M';\n },\n meridiem : function (hours, minutes, isLower) {\n return hours < 12 ? 'PD' : 'MD';\n },\n longDateFormat : {\n LT : 'HH:mm',\n LTS : 'HH:mm:ss',\n L : 'DD/MM/YYYY',\n LL : 'D MMMM YYYY',\n LLL : 'D MMMM YYYY HH:mm',\n LLLL : 'dddd, D MMMM YYYY HH:mm'\n },\n calendar : {\n sameDay : '[Sot në] LT',\n nextDay : '[Nesër në] LT',\n nextWeek : 'dddd [në] LT',\n lastDay : '[Dje në] LT',\n lastWeek : 'dddd [e kaluar në] LT',\n sameElse : 'L'\n },\n relativeTime : {\n future : 'në %s',\n past : '%s më parë',\n s : 'disa sekonda',\n m : 'një minutë',\n mm : '%d minuta',\n h : 'një orë',\n hh : '%d orë',\n d : 'një ditë',\n dd : '%d ditë',\n M : 'një muaj',\n MM : '%d muaj',\n y : 'një vit',\n yy : '%d vite'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal : '%d.',\n week : {\n dow : 1, // Monday is the first day of the week.\n doy : 4 // The week that contains Jan 4th is the first week of the year.\n }\n});\n\nreturn sq;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/sq.js\n// module id = 460\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/sq.js?", + ); + + /***/ + }, + /* 461 */ + /* unknown exports provided */ + /* all exports used */ + /*!************************************!*\ + !*** ./~/moment/locale/sr-cyrl.js ***! + \************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Serbian Cyrillic [sr-cyrl]\n//! author : Milan Janačković<milanjanackovic@gmail.com> : https://github.com/milan-j\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar translator = {\n words: { //Different grammatical cases\n m: ['један минут', 'једне минуте'],\n mm: ['минут', 'минуте', 'минута'],\n h: ['један сат', 'једног сата'],\n hh: ['сат', 'сата', 'сати'],\n dd: ['дан', 'дана', 'дана'],\n MM: ['месец', 'месеца', 'месеци'],\n yy: ['година', 'године', 'година']\n },\n correctGrammaticalCase: function (number, wordKey) {\n return number === 1 ? wordKey[0] : (number >= 2 && number <= 4 ? wordKey[1] : wordKey[2]);\n },\n translate: function (number, withoutSuffix, key) {\n var wordKey = translator.words[key];\n if (key.length === 1) {\n return withoutSuffix ? wordKey[0] : wordKey[1];\n } else {\n return number + ' ' + translator.correctGrammaticalCase(number, wordKey);\n }\n }\n};\n\nvar srCyrl = moment.defineLocale('sr-cyrl', {\n months: 'јануар_фебруар_март_април_мај_јун_јул_август_септембар_октобар_новембар_децембар'.split('_'),\n monthsShort: 'јан._феб._мар._апр._мај_јун_јул_авг._сеп._окт._нов._дец.'.split('_'),\n monthsParseExact: true,\n weekdays: 'недеља_понедељак_уторак_среда_четвртак_петак_субота'.split('_'),\n weekdaysShort: 'нед._пон._уто._сре._чет._пет._суб.'.split('_'),\n weekdaysMin: 'не_по_ут_ср_че_пе_су'.split('_'),\n weekdaysParseExact : true,\n longDateFormat: {\n LT: 'H:mm',\n LTS : 'H:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY H:mm',\n LLLL: 'dddd, D. MMMM YYYY H:mm'\n },\n calendar: {\n sameDay: '[данас у] LT',\n nextDay: '[сутра у] LT',\n nextWeek: function () {\n switch (this.day()) {\n case 0:\n return '[у] [недељу] [у] LT';\n case 3:\n return '[у] [среду] [у] LT';\n case 6:\n return '[у] [суботу] [у] LT';\n case 1:\n case 2:\n case 4:\n case 5:\n return '[у] dddd [у] LT';\n }\n },\n lastDay : '[јуче у] LT',\n lastWeek : function () {\n var lastWeekDays = [\n '[прошле] [недеље] [у] LT',\n '[прошлог] [понедељка] [у] LT',\n '[прошлог] [уторка] [у] LT',\n '[прошле] [среде] [у] LT',\n '[прошлог] [четвртка] [у] LT',\n '[прошлог] [петка] [у] LT',\n '[прошле] [суботе] [у] LT'\n ];\n return lastWeekDays[this.day()];\n },\n sameElse : 'L'\n },\n relativeTime : {\n future : 'за %s',\n past : 'пре %s',\n s : 'неколико секунди',\n m : translator.translate,\n mm : translator.translate,\n h : translator.translate,\n hh : translator.translate,\n d : 'дан',\n dd : translator.translate,\n M : 'месец',\n MM : translator.translate,\n y : 'годину',\n yy : translator.translate\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal : '%d.',\n week : {\n dow : 1, // Monday is the first day of the week.\n doy : 7 // The week that contains Jan 1st is the first week of the year.\n }\n});\n\nreturn srCyrl;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/sr-cyrl.js\n// module id = 461\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/sr-cyrl.js?", + ); + + /***/ + }, + /* 462 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/moment/locale/sr.js ***! + \*******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Serbian [sr]\n//! author : Milan Janačković<milanjanackovic@gmail.com> : https://github.com/milan-j\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar translator = {\n words: { //Different grammatical cases\n m: ['jedan minut', 'jedne minute'],\n mm: ['minut', 'minute', 'minuta'],\n h: ['jedan sat', 'jednog sata'],\n hh: ['sat', 'sata', 'sati'],\n dd: ['dan', 'dana', 'dana'],\n MM: ['mesec', 'meseca', 'meseci'],\n yy: ['godina', 'godine', 'godina']\n },\n correctGrammaticalCase: function (number, wordKey) {\n return number === 1 ? wordKey[0] : (number >= 2 && number <= 4 ? wordKey[1] : wordKey[2]);\n },\n translate: function (number, withoutSuffix, key) {\n var wordKey = translator.words[key];\n if (key.length === 1) {\n return withoutSuffix ? wordKey[0] : wordKey[1];\n } else {\n return number + ' ' + translator.correctGrammaticalCase(number, wordKey);\n }\n }\n};\n\nvar sr = moment.defineLocale('sr', {\n months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split('_'),\n monthsShort: 'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split('_'),\n monthsParseExact: true,\n weekdays: 'nedelja_ponedeljak_utorak_sreda_četvrtak_petak_subota'.split('_'),\n weekdaysShort: 'ned._pon._uto._sre._čet._pet._sub.'.split('_'),\n weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),\n weekdaysParseExact : true,\n longDateFormat: {\n LT: 'H:mm',\n LTS : 'H:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY H:mm',\n LLLL: 'dddd, D. MMMM YYYY H:mm'\n },\n calendar: {\n sameDay: '[danas u] LT',\n nextDay: '[sutra u] LT',\n nextWeek: function () {\n switch (this.day()) {\n case 0:\n return '[u] [nedelju] [u] LT';\n case 3:\n return '[u] [sredu] [u] LT';\n case 6:\n return '[u] [subotu] [u] LT';\n case 1:\n case 2:\n case 4:\n case 5:\n return '[u] dddd [u] LT';\n }\n },\n lastDay : '[juče u] LT',\n lastWeek : function () {\n var lastWeekDays = [\n '[prošle] [nedelje] [u] LT',\n '[prošlog] [ponedeljka] [u] LT',\n '[prošlog] [utorka] [u] LT',\n '[prošle] [srede] [u] LT',\n '[prošlog] [četvrtka] [u] LT',\n '[prošlog] [petka] [u] LT',\n '[prošle] [subote] [u] LT'\n ];\n return lastWeekDays[this.day()];\n },\n sameElse : 'L'\n },\n relativeTime : {\n future : 'za %s',\n past : 'pre %s',\n s : 'nekoliko sekundi',\n m : translator.translate,\n mm : translator.translate,\n h : translator.translate,\n hh : translator.translate,\n d : 'dan',\n dd : translator.translate,\n M : 'mesec',\n MM : translator.translate,\n y : 'godinu',\n yy : translator.translate\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal : '%d.',\n week : {\n dow : 1, // Monday is the first day of the week.\n doy : 7 // The week that contains Jan 1st is the first week of the year.\n }\n});\n\nreturn sr;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/sr.js\n// module id = 462\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/sr.js?", + ); + + /***/ + }, + /* 463 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/moment/locale/ss.js ***! + \*******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : siSwati [ss]\n//! author : Nicolai Davies<mail@nicolai.io> : https://github.com/nicolaidavies\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\n\nvar ss = moment.defineLocale('ss', {\n months : \"Bhimbidvwane_Indlovana_Indlov'lenkhulu_Mabasa_Inkhwekhweti_Inhlaba_Kholwane_Ingci_Inyoni_Imphala_Lweti_Ingongoni\".split('_'),\n monthsShort : 'Bhi_Ina_Inu_Mab_Ink_Inh_Kho_Igc_Iny_Imp_Lwe_Igo'.split('_'),\n weekdays : 'Lisontfo_Umsombuluko_Lesibili_Lesitsatfu_Lesine_Lesihlanu_Umgcibelo'.split('_'),\n weekdaysShort : 'Lis_Umb_Lsb_Les_Lsi_Lsh_Umg'.split('_'),\n weekdaysMin : 'Li_Us_Lb_Lt_Ls_Lh_Ug'.split('_'),\n weekdaysParseExact : true,\n longDateFormat : {\n LT : 'h:mm A',\n LTS : 'h:mm:ss A',\n L : 'DD/MM/YYYY',\n LL : 'D MMMM YYYY',\n LLL : 'D MMMM YYYY h:mm A',\n LLLL : 'dddd, D MMMM YYYY h:mm A'\n },\n calendar : {\n sameDay : '[Namuhla nga] LT',\n nextDay : '[Kusasa nga] LT',\n nextWeek : 'dddd [nga] LT',\n lastDay : '[Itolo nga] LT',\n lastWeek : 'dddd [leliphelile] [nga] LT',\n sameElse : 'L'\n },\n relativeTime : {\n future : 'nga %s',\n past : 'wenteka nga %s',\n s : 'emizuzwana lomcane',\n m : 'umzuzu',\n mm : '%d emizuzu',\n h : 'lihora',\n hh : '%d emahora',\n d : 'lilanga',\n dd : '%d emalanga',\n M : 'inyanga',\n MM : '%d tinyanga',\n y : 'umnyaka',\n yy : '%d iminyaka'\n },\n meridiemParse: /ekuseni|emini|entsambama|ebusuku/,\n meridiem : function (hours, minutes, isLower) {\n if (hours < 11) {\n return 'ekuseni';\n } else if (hours < 15) {\n return 'emini';\n } else if (hours < 19) {\n return 'entsambama';\n } else {\n return 'ebusuku';\n }\n },\n meridiemHour : function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'ekuseni') {\n return hour;\n } else if (meridiem === 'emini') {\n return hour >= 11 ? hour : hour + 12;\n } else if (meridiem === 'entsambama' || meridiem === 'ebusuku') {\n if (hour === 0) {\n return 0;\n }\n return hour + 12;\n }\n },\n dayOfMonthOrdinalParse: /\\d{1,2}/,\n ordinal : '%d',\n week : {\n dow : 1, // Monday is the first day of the week.\n doy : 4 // The week that contains Jan 4th is the first week of the year.\n }\n});\n\nreturn ss;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/ss.js\n// module id = 463\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/ss.js?", + ); + + /***/ + }, + /* 464 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/moment/locale/sv.js ***! + \*******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Swedish [sv]\n//! author : Jens Alm : https://github.com/ulmus\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar sv = moment.defineLocale('sv', {\n months : 'januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december'.split('_'),\n monthsShort : 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'),\n weekdays : 'söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag'.split('_'),\n weekdaysShort : 'sön_mån_tis_ons_tor_fre_lör'.split('_'),\n weekdaysMin : 'sö_må_ti_on_to_fr_lö'.split('_'),\n longDateFormat : {\n LT : 'HH:mm',\n LTS : 'HH:mm:ss',\n L : 'YYYY-MM-DD',\n LL : 'D MMMM YYYY',\n LLL : 'D MMMM YYYY [kl.] HH:mm',\n LLLL : 'dddd D MMMM YYYY [kl.] HH:mm',\n lll : 'D MMM YYYY HH:mm',\n llll : 'ddd D MMM YYYY HH:mm'\n },\n calendar : {\n sameDay: '[Idag] LT',\n nextDay: '[Imorgon] LT',\n lastDay: '[Igår] LT',\n nextWeek: '[På] dddd LT',\n lastWeek: '[I] dddd[s] LT',\n sameElse: 'L'\n },\n relativeTime : {\n future : 'om %s',\n past : 'för %s sedan',\n s : 'några sekunder',\n m : 'en minut',\n mm : '%d minuter',\n h : 'en timme',\n hh : '%d timmar',\n d : 'en dag',\n dd : '%d dagar',\n M : 'en månad',\n MM : '%d månader',\n y : 'ett år',\n yy : '%d år'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(e|a)/,\n ordinal : function (number) {\n var b = number % 10,\n output = (~~(number % 100 / 10) === 1) ? 'e' :\n (b === 1) ? 'a' :\n (b === 2) ? 'a' :\n (b === 3) ? 'e' : 'e';\n return number + output;\n },\n week : {\n dow : 1, // Monday is the first day of the week.\n doy : 4 // The week that contains Jan 4th is the first week of the year.\n }\n});\n\nreturn sv;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/sv.js\n// module id = 464\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/sv.js?", + ); + + /***/ + }, + /* 465 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/moment/locale/sw.js ***! + \*******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Swahili [sw]\n//! author : Fahad Kassim : https://github.com/fadsel\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar sw = moment.defineLocale('sw', {\n months : 'Januari_Februari_Machi_Aprili_Mei_Juni_Julai_Agosti_Septemba_Oktoba_Novemba_Desemba'.split('_'),\n monthsShort : 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ago_Sep_Okt_Nov_Des'.split('_'),\n weekdays : 'Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijumaa_Jumamosi'.split('_'),\n weekdaysShort : 'Jpl_Jtat_Jnne_Jtan_Alh_Ijm_Jmos'.split('_'),\n weekdaysMin : 'J2_J3_J4_J5_Al_Ij_J1'.split('_'),\n weekdaysParseExact : true,\n longDateFormat : {\n LT : 'HH:mm',\n LTS : 'HH:mm:ss',\n L : 'DD.MM.YYYY',\n LL : 'D MMMM YYYY',\n LLL : 'D MMMM YYYY HH:mm',\n LLLL : 'dddd, D MMMM YYYY HH:mm'\n },\n calendar : {\n sameDay : '[leo saa] LT',\n nextDay : '[kesho saa] LT',\n nextWeek : '[wiki ijayo] dddd [saat] LT',\n lastDay : '[jana] LT',\n lastWeek : '[wiki iliyopita] dddd [saat] LT',\n sameElse : 'L'\n },\n relativeTime : {\n future : '%s baadaye',\n past : 'tokea %s',\n s : 'hivi punde',\n m : 'dakika moja',\n mm : 'dakika %d',\n h : 'saa limoja',\n hh : 'masaa %d',\n d : 'siku moja',\n dd : 'masiku %d',\n M : 'mwezi mmoja',\n MM : 'miezi %d',\n y : 'mwaka mmoja',\n yy : 'miaka %d'\n },\n week : {\n dow : 1, // Monday is the first day of the week.\n doy : 7 // The week that contains Jan 1st is the first week of the year.\n }\n});\n\nreturn sw;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/sw.js\n// module id = 465\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/sw.js?", + ); + + /***/ + }, + /* 466 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/moment/locale/ta.js ***! + \*******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Tamil [ta]\n//! author : Arjunkumar Krishnamoorthy : https://github.com/tk120404\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar symbolMap = {\n '1': '௧',\n '2': '௨',\n '3': '௩',\n '4': '௪',\n '5': '௫',\n '6': '௬',\n '7': '௭',\n '8': '௮',\n '9': '௯',\n '0': '௦'\n};\nvar numberMap = {\n '௧': '1',\n '௨': '2',\n '௩': '3',\n '௪': '4',\n '௫': '5',\n '௬': '6',\n '௭': '7',\n '௮': '8',\n '௯': '9',\n '௦': '0'\n};\n\nvar ta = moment.defineLocale('ta', {\n months : 'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split('_'),\n monthsShort : 'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split('_'),\n weekdays : 'ஞாயிற்றுக்கிழமை_திங்கட்கிழமை_செவ்வாய்கிழமை_புதன்கிழமை_வியாழக்கிழமை_வெள்ளிக்கிழமை_சனிக்கிழமை'.split('_'),\n weekdaysShort : 'ஞாயிறு_திங்கள்_செவ்வாய்_புதன்_வியாழன்_வெள்ளி_சனி'.split('_'),\n weekdaysMin : 'ஞா_தி_செ_பு_வி_வெ_ச'.split('_'),\n longDateFormat : {\n LT : 'HH:mm',\n LTS : 'HH:mm:ss',\n L : 'DD/MM/YYYY',\n LL : 'D MMMM YYYY',\n LLL : 'D MMMM YYYY, HH:mm',\n LLLL : 'dddd, D MMMM YYYY, HH:mm'\n },\n calendar : {\n sameDay : '[இன்று] LT',\n nextDay : '[நாளை] LT',\n nextWeek : 'dddd, LT',\n lastDay : '[நேற்று] LT',\n lastWeek : '[கடந்த வாரம்] dddd, LT',\n sameElse : 'L'\n },\n relativeTime : {\n future : '%s இல்',\n past : '%s முன்',\n s : 'ஒரு சில விநாடிகள்',\n m : 'ஒரு நிமிடம்',\n mm : '%d நிமிடங்கள்',\n h : 'ஒரு மணி நேரம்',\n hh : '%d மணி நேரம்',\n d : 'ஒரு நாள்',\n dd : '%d நாட்கள்',\n M : 'ஒரு மாதம்',\n MM : '%d மாதங்கள்',\n y : 'ஒரு வருடம்',\n yy : '%d ஆண்டுகள்'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}வது/,\n ordinal : function (number) {\n return number + 'வது';\n },\n preparse: function (string) {\n return string.replace(/[௧௨௩௪௫௬௭௮௯௦]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function (string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n // refer http://ta.wikipedia.org/s/1er1\n meridiemParse: /யாமம்|வைகறை|காலை|நண்பகல்|எற்பாடு|மாலை/,\n meridiem : function (hour, minute, isLower) {\n if (hour < 2) {\n return ' யாமம்';\n } else if (hour < 6) {\n return ' வைகறை'; // வைகறை\n } else if (hour < 10) {\n return ' காலை'; // காலை\n } else if (hour < 14) {\n return ' நண்பகல்'; // நண்பகல்\n } else if (hour < 18) {\n return ' எற்பாடு'; // எற்பாடு\n } else if (hour < 22) {\n return ' மாலை'; // மாலை\n } else {\n return ' யாமம்';\n }\n },\n meridiemHour : function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'யாமம்') {\n return hour < 2 ? hour : hour + 12;\n } else if (meridiem === 'வைகறை' || meridiem === 'காலை') {\n return hour;\n } else if (meridiem === 'நண்பகல்') {\n return hour >= 10 ? hour : hour + 12;\n } else {\n return hour + 12;\n }\n },\n week : {\n dow : 0, // Sunday is the first day of the week.\n doy : 6 // The week that contains Jan 1st is the first week of the year.\n }\n});\n\nreturn ta;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/ta.js\n// module id = 466\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/ta.js?", + ); + + /***/ + }, + /* 467 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/moment/locale/te.js ***! + \*******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Telugu [te]\n//! author : Krishna Chaitanya Thota : https://github.com/kcthota\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar te = moment.defineLocale('te', {\n months : 'జనవరి_ఫిబ్రవరి_మార్చి_ఏప్రిల్_మే_జూన్_జూలై_ఆగస్టు_సెప్టెంబర్_అక్టోబర్_నవంబర్_డిసెంబర్'.split('_'),\n monthsShort : 'జన._ఫిబ్ర._మార్చి_ఏప్రి._మే_జూన్_జూలై_ఆగ._సెప్._అక్టో._నవ._డిసె.'.split('_'),\n monthsParseExact : true,\n weekdays : 'ఆదివారం_సోమవారం_మంగళవారం_బుధవారం_గురువారం_శుక్రవారం_శనివారం'.split('_'),\n weekdaysShort : 'ఆది_సోమ_మంగళ_బుధ_గురు_శుక్ర_శని'.split('_'),\n weekdaysMin : 'ఆ_సో_మం_బు_గు_శు_శ'.split('_'),\n longDateFormat : {\n LT : 'A h:mm',\n LTS : 'A h:mm:ss',\n L : 'DD/MM/YYYY',\n LL : 'D MMMM YYYY',\n LLL : 'D MMMM YYYY, A h:mm',\n LLLL : 'dddd, D MMMM YYYY, A h:mm'\n },\n calendar : {\n sameDay : '[నేడు] LT',\n nextDay : '[రేపు] LT',\n nextWeek : 'dddd, LT',\n lastDay : '[నిన్న] LT',\n lastWeek : '[గత] dddd, LT',\n sameElse : 'L'\n },\n relativeTime : {\n future : '%s లో',\n past : '%s క్రితం',\n s : 'కొన్ని క్షణాలు',\n m : 'ఒక నిమిషం',\n mm : '%d నిమిషాలు',\n h : 'ఒక గంట',\n hh : '%d గంటలు',\n d : 'ఒక రోజు',\n dd : '%d రోజులు',\n M : 'ఒక నెల',\n MM : '%d నెలలు',\n y : 'ఒక సంవత్సరం',\n yy : '%d సంవత్సరాలు'\n },\n dayOfMonthOrdinalParse : /\\d{1,2}వ/,\n ordinal : '%dవ',\n meridiemParse: /రాత్రి|ఉదయం|మధ్యాహ్నం|సాయంత్రం/,\n meridiemHour : function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'రాత్రి') {\n return hour < 4 ? hour : hour + 12;\n } else if (meridiem === 'ఉదయం') {\n return hour;\n } else if (meridiem === 'మధ్యాహ్నం') {\n return hour >= 10 ? hour : hour + 12;\n } else if (meridiem === 'సాయంత్రం') {\n return hour + 12;\n }\n },\n meridiem : function (hour, minute, isLower) {\n if (hour < 4) {\n return 'రాత్రి';\n } else if (hour < 10) {\n return 'ఉదయం';\n } else if (hour < 17) {\n return 'మధ్యాహ్నం';\n } else if (hour < 20) {\n return 'సాయంత్రం';\n } else {\n return 'రాత్రి';\n }\n },\n week : {\n dow : 0, // Sunday is the first day of the week.\n doy : 6 // The week that contains Jan 1st is the first week of the year.\n }\n});\n\nreturn te;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/te.js\n// module id = 467\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/te.js?", + ); + + /***/ + }, + /* 468 */ + /* unknown exports provided */ + /* all exports used */ + /*!********************************!*\ + !*** ./~/moment/locale/tet.js ***! + \********************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Tetun Dili (East Timor) [tet]\n//! author : Joshua Brooks : https://github.com/joshbrooks\n//! author : Onorio De J. Afonso : https://github.com/marobo\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar tet = moment.defineLocale('tet', {\n months : 'Janeiru_Fevereiru_Marsu_Abril_Maiu_Juniu_Juliu_Augustu_Setembru_Outubru_Novembru_Dezembru'.split('_'),\n monthsShort : 'Jan_Fev_Mar_Abr_Mai_Jun_Jul_Aug_Set_Out_Nov_Dez'.split('_'),\n weekdays : 'Domingu_Segunda_Tersa_Kuarta_Kinta_Sexta_Sabadu'.split('_'),\n weekdaysShort : 'Dom_Seg_Ters_Kua_Kint_Sext_Sab'.split('_'),\n weekdaysMin : 'Do_Seg_Te_Ku_Ki_Sex_Sa'.split('_'),\n longDateFormat : {\n LT : 'HH:mm',\n LTS : 'HH:mm:ss',\n L : 'DD/MM/YYYY',\n LL : 'D MMMM YYYY',\n LLL : 'D MMMM YYYY HH:mm',\n LLLL : 'dddd, D MMMM YYYY HH:mm'\n },\n calendar : {\n sameDay: '[Ohin iha] LT',\n nextDay: '[Aban iha] LT',\n nextWeek: 'dddd [iha] LT',\n lastDay: '[Horiseik iha] LT',\n lastWeek: 'dddd [semana kotuk] [iha] LT',\n sameElse: 'L'\n },\n relativeTime : {\n future : 'iha %s',\n past : '%s liuba',\n s : 'minutu balun',\n m : 'minutu ida',\n mm : 'minutus %d',\n h : 'horas ida',\n hh : 'horas %d',\n d : 'loron ida',\n dd : 'loron %d',\n M : 'fulan ida',\n MM : 'fulan %d',\n y : 'tinan ida',\n yy : 'tinan %d'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n ordinal : function (number) {\n var b = number % 10,\n output = (~~(number % 100 / 10) === 1) ? 'th' :\n (b === 1) ? 'st' :\n (b === 2) ? 'nd' :\n (b === 3) ? 'rd' : 'th';\n return number + output;\n },\n week : {\n dow : 1, // Monday is the first day of the week.\n doy : 4 // The week that contains Jan 4th is the first week of the year.\n }\n});\n\nreturn tet;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/tet.js\n// module id = 468\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/tet.js?", + ); + + /***/ + }, + /* 469 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/moment/locale/th.js ***! + \*******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Thai [th]\n//! author : Kridsada Thanabulpong : https://github.com/sirn\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar th = moment.defineLocale('th', {\n months : 'มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม'.split('_'),\n monthsShort : 'ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.'.split('_'),\n monthsParseExact: true,\n weekdays : 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์'.split('_'),\n weekdaysShort : 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์'.split('_'), // yes, three characters difference\n weekdaysMin : 'อา._จ._อ._พ._พฤ._ศ._ส.'.split('_'),\n weekdaysParseExact : true,\n longDateFormat : {\n LT : 'H:mm',\n LTS : 'H:mm:ss',\n L : 'DD/MM/YYYY',\n LL : 'D MMMM YYYY',\n LLL : 'D MMMM YYYY เวลา H:mm',\n LLLL : 'วันddddที่ D MMMM YYYY เวลา H:mm'\n },\n meridiemParse: /ก่อนเที่ยง|หลังเที่ยง/,\n isPM: function (input) {\n return input === 'หลังเที่ยง';\n },\n meridiem : function (hour, minute, isLower) {\n if (hour < 12) {\n return 'ก่อนเที่ยง';\n } else {\n return 'หลังเที่ยง';\n }\n },\n calendar : {\n sameDay : '[วันนี้ เวลา] LT',\n nextDay : '[พรุ่งนี้ เวลา] LT',\n nextWeek : 'dddd[หน้า เวลา] LT',\n lastDay : '[เมื่อวานนี้ เวลา] LT',\n lastWeek : '[วัน]dddd[ที่แล้ว เวลา] LT',\n sameElse : 'L'\n },\n relativeTime : {\n future : 'อีก %s',\n past : '%sที่แล้ว',\n s : 'ไม่กี่วินาที',\n m : '1 นาที',\n mm : '%d นาที',\n h : '1 ชั่วโมง',\n hh : '%d ชั่วโมง',\n d : '1 วัน',\n dd : '%d วัน',\n M : '1 เดือน',\n MM : '%d เดือน',\n y : '1 ปี',\n yy : '%d ปี'\n }\n});\n\nreturn th;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/th.js\n// module id = 469\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/th.js?", + ); + + /***/ + }, + /* 470 */ + /* unknown exports provided */ + /* all exports used */ + /*!**********************************!*\ + !*** ./~/moment/locale/tl-ph.js ***! + \**********************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Tagalog (Philippines) [tl-ph]\n//! author : Dan Hagman : https://github.com/hagmandan\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar tlPh = moment.defineLocale('tl-ph', {\n months : 'Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre'.split('_'),\n monthsShort : 'Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis'.split('_'),\n weekdays : 'Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado'.split('_'),\n weekdaysShort : 'Lin_Lun_Mar_Miy_Huw_Biy_Sab'.split('_'),\n weekdaysMin : 'Li_Lu_Ma_Mi_Hu_Bi_Sab'.split('_'),\n longDateFormat : {\n LT : 'HH:mm',\n LTS : 'HH:mm:ss',\n L : 'MM/D/YYYY',\n LL : 'MMMM D, YYYY',\n LLL : 'MMMM D, YYYY HH:mm',\n LLLL : 'dddd, MMMM DD, YYYY HH:mm'\n },\n calendar : {\n sameDay: 'LT [ngayong araw]',\n nextDay: '[Bukas ng] LT',\n nextWeek: 'LT [sa susunod na] dddd',\n lastDay: 'LT [kahapon]',\n lastWeek: 'LT [noong nakaraang] dddd',\n sameElse: 'L'\n },\n relativeTime : {\n future : 'sa loob ng %s',\n past : '%s ang nakalipas',\n s : 'ilang segundo',\n m : 'isang minuto',\n mm : '%d minuto',\n h : 'isang oras',\n hh : '%d oras',\n d : 'isang araw',\n dd : '%d araw',\n M : 'isang buwan',\n MM : '%d buwan',\n y : 'isang taon',\n yy : '%d taon'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}/,\n ordinal : function (number) {\n return number;\n },\n week : {\n dow : 1, // Monday is the first day of the week.\n doy : 4 // The week that contains Jan 4th is the first week of the year.\n }\n});\n\nreturn tlPh;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/tl-ph.js\n// module id = 470\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/tl-ph.js?", + ); + + /***/ + }, + /* 471 */ + /* unknown exports provided */ + /* all exports used */ + /*!********************************!*\ + !*** ./~/moment/locale/tlh.js ***! + \********************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Klingon [tlh]\n//! author : Dominika Kruk : https://github.com/amaranthrose\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar numbersNouns = 'pagh_wa’_cha’_wej_loS_vagh_jav_Soch_chorgh_Hut'.split('_');\n\nfunction translateFuture(output) {\n var time = output;\n time = (output.indexOf('jaj') !== -1) ?\n time.slice(0, -3) + 'leS' :\n (output.indexOf('jar') !== -1) ?\n time.slice(0, -3) + 'waQ' :\n (output.indexOf('DIS') !== -1) ?\n time.slice(0, -3) + 'nem' :\n time + ' pIq';\n return time;\n}\n\nfunction translatePast(output) {\n var time = output;\n time = (output.indexOf('jaj') !== -1) ?\n time.slice(0, -3) + 'Hu’' :\n (output.indexOf('jar') !== -1) ?\n time.slice(0, -3) + 'wen' :\n (output.indexOf('DIS') !== -1) ?\n time.slice(0, -3) + 'ben' :\n time + ' ret';\n return time;\n}\n\nfunction translate(number, withoutSuffix, string, isFuture) {\n var numberNoun = numberAsNoun(number);\n switch (string) {\n case 'mm':\n return numberNoun + ' tup';\n case 'hh':\n return numberNoun + ' rep';\n case 'dd':\n return numberNoun + ' jaj';\n case 'MM':\n return numberNoun + ' jar';\n case 'yy':\n return numberNoun + ' DIS';\n }\n}\n\nfunction numberAsNoun(number) {\n var hundred = Math.floor((number % 1000) / 100),\n ten = Math.floor((number % 100) / 10),\n one = number % 10,\n word = '';\n if (hundred > 0) {\n word += numbersNouns[hundred] + 'vatlh';\n }\n if (ten > 0) {\n word += ((word !== '') ? ' ' : '') + numbersNouns[ten] + 'maH';\n }\n if (one > 0) {\n word += ((word !== '') ? ' ' : '') + numbersNouns[one];\n }\n return (word === '') ? 'pagh' : word;\n}\n\nvar tlh = moment.defineLocale('tlh', {\n months : 'tera’ jar wa’_tera’ jar cha’_tera’ jar wej_tera’ jar loS_tera’ jar vagh_tera’ jar jav_tera’ jar Soch_tera’ jar chorgh_tera’ jar Hut_tera’ jar wa’maH_tera’ jar wa’maH wa’_tera’ jar wa’maH cha’'.split('_'),\n monthsShort : 'jar wa’_jar cha’_jar wej_jar loS_jar vagh_jar jav_jar Soch_jar chorgh_jar Hut_jar wa’maH_jar wa’maH wa’_jar wa’maH cha’'.split('_'),\n monthsParseExact : true,\n weekdays : 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'),\n weekdaysShort : 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'),\n weekdaysMin : 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'),\n longDateFormat : {\n LT : 'HH:mm',\n LTS : 'HH:mm:ss',\n L : 'DD.MM.YYYY',\n LL : 'D MMMM YYYY',\n LLL : 'D MMMM YYYY HH:mm',\n LLLL : 'dddd, D MMMM YYYY HH:mm'\n },\n calendar : {\n sameDay: '[DaHjaj] LT',\n nextDay: '[wa’leS] LT',\n nextWeek: 'LLL',\n lastDay: '[wa’Hu’] LT',\n lastWeek: 'LLL',\n sameElse: 'L'\n },\n relativeTime : {\n future : translateFuture,\n past : translatePast,\n s : 'puS lup',\n m : 'wa’ tup',\n mm : translate,\n h : 'wa’ rep',\n hh : translate,\n d : 'wa’ jaj',\n dd : translate,\n M : 'wa’ jar',\n MM : translate,\n y : 'wa’ DIS',\n yy : translate\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal : '%d.',\n week : {\n dow : 1, // Monday is the first day of the week.\n doy : 4 // The week that contains Jan 4th is the first week of the year.\n }\n});\n\nreturn tlh;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/tlh.js\n// module id = 471\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/tlh.js?", + ); + + /***/ + }, + /* 472 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/moment/locale/tr.js ***! + \*******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Turkish [tr]\n//! authors : Erhan Gundogan : https://github.com/erhangundogan,\n//! Burak Yiğit Kaya: https://github.com/BYK\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar suffixes = {\n 1: '\\'inci',\n 5: '\\'inci',\n 8: '\\'inci',\n 70: '\\'inci',\n 80: '\\'inci',\n 2: '\\'nci',\n 7: '\\'nci',\n 20: '\\'nci',\n 50: '\\'nci',\n 3: '\\'üncü',\n 4: '\\'üncü',\n 100: '\\'üncü',\n 6: '\\'ncı',\n 9: '\\'uncu',\n 10: '\\'uncu',\n 30: '\\'uncu',\n 60: '\\'ıncı',\n 90: '\\'ıncı'\n};\n\nvar tr = moment.defineLocale('tr', {\n months : 'Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık'.split('_'),\n monthsShort : 'Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara'.split('_'),\n weekdays : 'Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi'.split('_'),\n weekdaysShort : 'Paz_Pts_Sal_Çar_Per_Cum_Cts'.split('_'),\n weekdaysMin : 'Pz_Pt_Sa_Ça_Pe_Cu_Ct'.split('_'),\n longDateFormat : {\n LT : 'HH:mm',\n LTS : 'HH:mm:ss',\n L : 'DD.MM.YYYY',\n LL : 'D MMMM YYYY',\n LLL : 'D MMMM YYYY HH:mm',\n LLLL : 'dddd, D MMMM YYYY HH:mm'\n },\n calendar : {\n sameDay : '[bugün saat] LT',\n nextDay : '[yarın saat] LT',\n nextWeek : '[haftaya] dddd [saat] LT',\n lastDay : '[dün] LT',\n lastWeek : '[geçen hafta] dddd [saat] LT',\n sameElse : 'L'\n },\n relativeTime : {\n future : '%s sonra',\n past : '%s önce',\n s : 'birkaç saniye',\n m : 'bir dakika',\n mm : '%d dakika',\n h : 'bir saat',\n hh : '%d saat',\n d : 'bir gün',\n dd : '%d gün',\n M : 'bir ay',\n MM : '%d ay',\n y : 'bir yıl',\n yy : '%d yıl'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}'(inci|nci|üncü|ncı|uncu|ıncı)/,\n ordinal : function (number) {\n if (number === 0) { // special case for zero\n return number + '\\'ıncı';\n }\n var a = number % 10,\n b = number % 100 - a,\n c = number >= 100 ? 100 : null;\n return number + (suffixes[a] || suffixes[b] || suffixes[c]);\n },\n week : {\n dow : 1, // Monday is the first day of the week.\n doy : 7 // The week that contains Jan 1st is the first week of the year.\n }\n});\n\nreturn tr;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/tr.js\n// module id = 472\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/tr.js?", + ); + + /***/ + }, + /* 473 */ + /* unknown exports provided */ + /* all exports used */ + /*!********************************!*\ + !*** ./~/moment/locale/tzl.js ***! + \********************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Talossan [tzl]\n//! author : Robin van der Vliet : https://github.com/robin0van0der0v\n//! author : Iustì Canun\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\n// After the year there should be a slash and the amount of years since December 26, 1979 in Roman numerals.\n// This is currently too difficult (maybe even impossible) to add.\nvar tzl = moment.defineLocale('tzl', {\n months : 'Januar_Fevraglh_Març_Avrïu_Mai_Gün_Julia_Guscht_Setemvar_Listopäts_Noemvar_Zecemvar'.split('_'),\n monthsShort : 'Jan_Fev_Mar_Avr_Mai_Gün_Jul_Gus_Set_Lis_Noe_Zec'.split('_'),\n weekdays : 'Súladi_Lúneçi_Maitzi_Márcuri_Xhúadi_Viénerçi_Sáturi'.split('_'),\n weekdaysShort : 'Súl_Lún_Mai_Már_Xhú_Vié_Sát'.split('_'),\n weekdaysMin : 'Sú_Lú_Ma_Má_Xh_Vi_Sá'.split('_'),\n longDateFormat : {\n LT : 'HH.mm',\n LTS : 'HH.mm.ss',\n L : 'DD.MM.YYYY',\n LL : 'D. MMMM [dallas] YYYY',\n LLL : 'D. MMMM [dallas] YYYY HH.mm',\n LLLL : 'dddd, [li] D. MMMM [dallas] YYYY HH.mm'\n },\n meridiemParse: /d\\'o|d\\'a/i,\n isPM : function (input) {\n return 'd\\'o' === input.toLowerCase();\n },\n meridiem : function (hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'd\\'o' : 'D\\'O';\n } else {\n return isLower ? 'd\\'a' : 'D\\'A';\n }\n },\n calendar : {\n sameDay : '[oxhi à] LT',\n nextDay : '[demà à] LT',\n nextWeek : 'dddd [à] LT',\n lastDay : '[ieiri à] LT',\n lastWeek : '[sür el] dddd [lasteu à] LT',\n sameElse : 'L'\n },\n relativeTime : {\n future : 'osprei %s',\n past : 'ja%s',\n s : processRelativeTime,\n m : processRelativeTime,\n mm : processRelativeTime,\n h : processRelativeTime,\n hh : processRelativeTime,\n d : processRelativeTime,\n dd : processRelativeTime,\n M : processRelativeTime,\n MM : processRelativeTime,\n y : processRelativeTime,\n yy : processRelativeTime\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal : '%d.',\n week : {\n dow : 1, // Monday is the first day of the week.\n doy : 4 // The week that contains Jan 4th is the first week of the year.\n }\n});\n\nfunction processRelativeTime(number, withoutSuffix, key, isFuture) {\n var format = {\n 's': ['viensas secunds', '\\'iensas secunds'],\n 'm': ['\\'n míut', '\\'iens míut'],\n 'mm': [number + ' míuts', '' + number + ' míuts'],\n 'h': ['\\'n þora', '\\'iensa þora'],\n 'hh': [number + ' þoras', '' + number + ' þoras'],\n 'd': ['\\'n ziua', '\\'iensa ziua'],\n 'dd': [number + ' ziuas', '' + number + ' ziuas'],\n 'M': ['\\'n mes', '\\'iens mes'],\n 'MM': [number + ' mesen', '' + number + ' mesen'],\n 'y': ['\\'n ar', '\\'iens ar'],\n 'yy': [number + ' ars', '' + number + ' ars']\n };\n return isFuture ? format[key][0] : (withoutSuffix ? format[key][0] : format[key][1]);\n}\n\nreturn tzl;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/tzl.js\n// module id = 473\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/tzl.js?", + ); + + /***/ + }, + /* 474 */ + /* unknown exports provided */ + /* all exports used */ + /*!*************************************!*\ + !*** ./~/moment/locale/tzm-latn.js ***! + \*************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Central Atlas Tamazight Latin [tzm-latn]\n//! author : Abdel Said : https://github.com/abdelsaid\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar tzmLatn = moment.defineLocale('tzm-latn', {\n months : 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split('_'),\n monthsShort : 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split('_'),\n weekdays : 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),\n weekdaysShort : 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),\n weekdaysMin : 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),\n longDateFormat : {\n LT : 'HH:mm',\n LTS : 'HH:mm:ss',\n L : 'DD/MM/YYYY',\n LL : 'D MMMM YYYY',\n LLL : 'D MMMM YYYY HH:mm',\n LLLL : 'dddd D MMMM YYYY HH:mm'\n },\n calendar : {\n sameDay: '[asdkh g] LT',\n nextDay: '[aska g] LT',\n nextWeek: 'dddd [g] LT',\n lastDay: '[assant g] LT',\n lastWeek: 'dddd [g] LT',\n sameElse: 'L'\n },\n relativeTime : {\n future : 'dadkh s yan %s',\n past : 'yan %s',\n s : 'imik',\n m : 'minuḍ',\n mm : '%d minuḍ',\n h : 'saɛa',\n hh : '%d tassaɛin',\n d : 'ass',\n dd : '%d ossan',\n M : 'ayowr',\n MM : '%d iyyirn',\n y : 'asgas',\n yy : '%d isgasn'\n },\n week : {\n dow : 6, // Saturday is the first day of the week.\n doy : 12 // The week that contains Jan 1st is the first week of the year.\n }\n});\n\nreturn tzmLatn;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/tzm-latn.js\n// module id = 474\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/tzm-latn.js?", + ); + + /***/ + }, + /* 475 */ + /* unknown exports provided */ + /* all exports used */ + /*!********************************!*\ + !*** ./~/moment/locale/tzm.js ***! + \********************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Central Atlas Tamazight [tzm]\n//! author : Abdel Said : https://github.com/abdelsaid\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar tzm = moment.defineLocale('tzm', {\n months : 'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split('_'),\n monthsShort : 'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split('_'),\n weekdays : 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),\n weekdaysShort : 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),\n weekdaysMin : 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),\n longDateFormat : {\n LT : 'HH:mm',\n LTS: 'HH:mm:ss',\n L : 'DD/MM/YYYY',\n LL : 'D MMMM YYYY',\n LLL : 'D MMMM YYYY HH:mm',\n LLLL : 'dddd D MMMM YYYY HH:mm'\n },\n calendar : {\n sameDay: '[ⴰⵙⴷⵅ ⴴ] LT',\n nextDay: '[ⴰⵙⴽⴰ ⴴ] LT',\n nextWeek: 'dddd [ⴴ] LT',\n lastDay: '[ⴰⵚⴰⵏⵜ ⴴ] LT',\n lastWeek: 'dddd [ⴴ] LT',\n sameElse: 'L'\n },\n relativeTime : {\n future : 'ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ %s',\n past : 'ⵢⴰⵏ %s',\n s : 'ⵉⵎⵉⴽ',\n m : 'ⵎⵉⵏⵓⴺ',\n mm : '%d ⵎⵉⵏⵓⴺ',\n h : 'ⵙⴰⵄⴰ',\n hh : '%d ⵜⴰⵙⵙⴰⵄⵉⵏ',\n d : 'ⴰⵙⵙ',\n dd : '%d oⵙⵙⴰⵏ',\n M : 'ⴰⵢoⵓⵔ',\n MM : '%d ⵉⵢⵢⵉⵔⵏ',\n y : 'ⴰⵙⴳⴰⵙ',\n yy : '%d ⵉⵙⴳⴰⵙⵏ'\n },\n week : {\n dow : 6, // Saturday is the first day of the week.\n doy : 12 // The week that contains Jan 1st is the first week of the year.\n }\n});\n\nreturn tzm;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/tzm.js\n// module id = 475\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/tzm.js?", + ); + + /***/ + }, + /* 476 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/moment/locale/uk.js ***! + \*******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Ukrainian [uk]\n//! author : zemlanin : https://github.com/zemlanin\n//! Author : Menelion Elensúle : https://github.com/Oire\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nfunction plural(word, num) {\n var forms = word.split('_');\n return num % 10 === 1 && num % 100 !== 11 ? forms[0] : (num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) ? forms[1] : forms[2]);\n}\nfunction relativeTimeWithPlural(number, withoutSuffix, key) {\n var format = {\n 'mm': withoutSuffix ? 'хвилина_хвилини_хвилин' : 'хвилину_хвилини_хвилин',\n 'hh': withoutSuffix ? 'година_години_годин' : 'годину_години_годин',\n 'dd': 'день_дні_днів',\n 'MM': 'місяць_місяці_місяців',\n 'yy': 'рік_роки_років'\n };\n if (key === 'm') {\n return withoutSuffix ? 'хвилина' : 'хвилину';\n }\n else if (key === 'h') {\n return withoutSuffix ? 'година' : 'годину';\n }\n else {\n return number + ' ' + plural(format[key], +number);\n }\n}\nfunction weekdaysCaseReplace(m, format) {\n var weekdays = {\n 'nominative': 'неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота'.split('_'),\n 'accusative': 'неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу'.split('_'),\n 'genitive': 'неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи'.split('_')\n };\n\n if (!m) {\n return weekdays['nominative'];\n }\n\n var nounCase = (/(\\[[ВвУу]\\]) ?dddd/).test(format) ?\n 'accusative' :\n ((/\\[?(?:минулої|наступної)? ?\\] ?dddd/).test(format) ?\n 'genitive' :\n 'nominative');\n return weekdays[nounCase][m.day()];\n}\nfunction processHoursFunction(str) {\n return function () {\n return str + 'о' + (this.hours() === 11 ? 'б' : '') + '] LT';\n };\n}\n\nvar uk = moment.defineLocale('uk', {\n months : {\n 'format': 'січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня'.split('_'),\n 'standalone': 'січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень'.split('_')\n },\n monthsShort : 'січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд'.split('_'),\n weekdays : weekdaysCaseReplace,\n weekdaysShort : 'нд_пн_вт_ср_чт_пт_сб'.split('_'),\n weekdaysMin : 'нд_пн_вт_ср_чт_пт_сб'.split('_'),\n longDateFormat : {\n LT : 'HH:mm',\n LTS : 'HH:mm:ss',\n L : 'DD.MM.YYYY',\n LL : 'D MMMM YYYY р.',\n LLL : 'D MMMM YYYY р., HH:mm',\n LLLL : 'dddd, D MMMM YYYY р., HH:mm'\n },\n calendar : {\n sameDay: processHoursFunction('[Сьогодні '),\n nextDay: processHoursFunction('[Завтра '),\n lastDay: processHoursFunction('[Вчора '),\n nextWeek: processHoursFunction('[У] dddd ['),\n lastWeek: function () {\n switch (this.day()) {\n case 0:\n case 3:\n case 5:\n case 6:\n return processHoursFunction('[Минулої] dddd [').call(this);\n case 1:\n case 2:\n case 4:\n return processHoursFunction('[Минулого] dddd [').call(this);\n }\n },\n sameElse: 'L'\n },\n relativeTime : {\n future : 'за %s',\n past : '%s тому',\n s : 'декілька секунд',\n m : relativeTimeWithPlural,\n mm : relativeTimeWithPlural,\n h : 'годину',\n hh : relativeTimeWithPlural,\n d : 'день',\n dd : relativeTimeWithPlural,\n M : 'місяць',\n MM : relativeTimeWithPlural,\n y : 'рік',\n yy : relativeTimeWithPlural\n },\n // M. E.: those two are virtually unused but a user might want to implement them for his/her website for some reason\n meridiemParse: /ночі|ранку|дня|вечора/,\n isPM: function (input) {\n return /^(дня|вечора)$/.test(input);\n },\n meridiem : function (hour, minute, isLower) {\n if (hour < 4) {\n return 'ночі';\n } else if (hour < 12) {\n return 'ранку';\n } else if (hour < 17) {\n return 'дня';\n } else {\n return 'вечора';\n }\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-(й|го)/,\n ordinal: function (number, period) {\n switch (period) {\n case 'M':\n case 'd':\n case 'DDD':\n case 'w':\n case 'W':\n return number + '-й';\n case 'D':\n return number + '-го';\n default:\n return number;\n }\n },\n week : {\n dow : 1, // Monday is the first day of the week.\n doy : 7 // The week that contains Jan 1st is the first week of the year.\n }\n});\n\nreturn uk;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/uk.js\n// module id = 476\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/uk.js?", + ); + + /***/ + }, + /* 477 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/moment/locale/ur.js ***! + \*******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Urdu [ur]\n//! author : Sawood Alam : https://github.com/ibnesayeed\n//! author : Zack : https://github.com/ZackVision\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar months = [\n 'جنوری',\n 'فروری',\n 'مارچ',\n 'اپریل',\n 'مئی',\n 'جون',\n 'جولائی',\n 'اگست',\n 'ستمبر',\n 'اکتوبر',\n 'نومبر',\n 'دسمبر'\n];\nvar days = [\n 'اتوار',\n 'پیر',\n 'منگل',\n 'بدھ',\n 'جمعرات',\n 'جمعہ',\n 'ہفتہ'\n];\n\nvar ur = moment.defineLocale('ur', {\n months : months,\n monthsShort : months,\n weekdays : days,\n weekdaysShort : days,\n weekdaysMin : days,\n longDateFormat : {\n LT : 'HH:mm',\n LTS : 'HH:mm:ss',\n L : 'DD/MM/YYYY',\n LL : 'D MMMM YYYY',\n LLL : 'D MMMM YYYY HH:mm',\n LLLL : 'dddd، D MMMM YYYY HH:mm'\n },\n meridiemParse: /صبح|شام/,\n isPM : function (input) {\n return 'شام' === input;\n },\n meridiem : function (hour, minute, isLower) {\n if (hour < 12) {\n return 'صبح';\n }\n return 'شام';\n },\n calendar : {\n sameDay : '[آج بوقت] LT',\n nextDay : '[کل بوقت] LT',\n nextWeek : 'dddd [بوقت] LT',\n lastDay : '[گذشتہ روز بوقت] LT',\n lastWeek : '[گذشتہ] dddd [بوقت] LT',\n sameElse : 'L'\n },\n relativeTime : {\n future : '%s بعد',\n past : '%s قبل',\n s : 'چند سیکنڈ',\n m : 'ایک منٹ',\n mm : '%d منٹ',\n h : 'ایک گھنٹہ',\n hh : '%d گھنٹے',\n d : 'ایک دن',\n dd : '%d دن',\n M : 'ایک ماہ',\n MM : '%d ماہ',\n y : 'ایک سال',\n yy : '%d سال'\n },\n preparse: function (string) {\n return string.replace(/،/g, ',');\n },\n postformat: function (string) {\n return string.replace(/,/g, '،');\n },\n week : {\n dow : 1, // Monday is the first day of the week.\n doy : 4 // The week that contains Jan 4th is the first week of the year.\n }\n});\n\nreturn ur;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/ur.js\n// module id = 477\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/ur.js?", + ); + + /***/ + }, + /* 478 */ + /* unknown exports provided */ + /* all exports used */ + /*!************************************!*\ + !*** ./~/moment/locale/uz-latn.js ***! + \************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Uzbek Latin [uz-latn]\n//! author : Rasulbek Mirzayev : github.com/Rasulbeeek\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar uzLatn = moment.defineLocale('uz-latn', {\n months : 'Yanvar_Fevral_Mart_Aprel_May_Iyun_Iyul_Avgust_Sentabr_Oktabr_Noyabr_Dekabr'.split('_'),\n monthsShort : 'Yan_Fev_Mar_Apr_May_Iyun_Iyul_Avg_Sen_Okt_Noy_Dek'.split('_'),\n weekdays : 'Yakshanba_Dushanba_Seshanba_Chorshanba_Payshanba_Juma_Shanba'.split('_'),\n weekdaysShort : 'Yak_Dush_Sesh_Chor_Pay_Jum_Shan'.split('_'),\n weekdaysMin : 'Ya_Du_Se_Cho_Pa_Ju_Sha'.split('_'),\n longDateFormat : {\n LT : 'HH:mm',\n LTS : 'HH:mm:ss',\n L : 'DD/MM/YYYY',\n LL : 'D MMMM YYYY',\n LLL : 'D MMMM YYYY HH:mm',\n LLLL : 'D MMMM YYYY, dddd HH:mm'\n },\n calendar : {\n sameDay : '[Bugun soat] LT [da]',\n nextDay : '[Ertaga] LT [da]',\n nextWeek : 'dddd [kuni soat] LT [da]',\n lastDay : '[Kecha soat] LT [da]',\n lastWeek : '[O\\'tgan] dddd [kuni soat] LT [da]',\n sameElse : 'L'\n },\n relativeTime : {\n future : 'Yaqin %s ichida',\n past : 'Bir necha %s oldin',\n s : 'soniya',\n m : 'bir daqiqa',\n mm : '%d daqiqa',\n h : 'bir soat',\n hh : '%d soat',\n d : 'bir kun',\n dd : '%d kun',\n M : 'bir oy',\n MM : '%d oy',\n y : 'bir yil',\n yy : '%d yil'\n },\n week : {\n dow : 1, // Monday is the first day of the week.\n doy : 7 // The week that contains Jan 1st is the first week of the year.\n }\n});\n\nreturn uzLatn;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/uz-latn.js\n// module id = 478\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/uz-latn.js?", + ); + + /***/ + }, + /* 479 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/moment/locale/uz.js ***! + \*******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Uzbek [uz]\n//! author : Sardor Muminov : https://github.com/muminoff\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar uz = moment.defineLocale('uz', {\n months : 'январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр'.split('_'),\n monthsShort : 'янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек'.split('_'),\n weekdays : 'Якшанба_Душанба_Сешанба_Чоршанба_Пайшанба_Жума_Шанба'.split('_'),\n weekdaysShort : 'Якш_Душ_Сеш_Чор_Пай_Жум_Шан'.split('_'),\n weekdaysMin : 'Як_Ду_Се_Чо_Па_Жу_Ша'.split('_'),\n longDateFormat : {\n LT : 'HH:mm',\n LTS : 'HH:mm:ss',\n L : 'DD/MM/YYYY',\n LL : 'D MMMM YYYY',\n LLL : 'D MMMM YYYY HH:mm',\n LLLL : 'D MMMM YYYY, dddd HH:mm'\n },\n calendar : {\n sameDay : '[Бугун соат] LT [да]',\n nextDay : '[Эртага] LT [да]',\n nextWeek : 'dddd [куни соат] LT [да]',\n lastDay : '[Кеча соат] LT [да]',\n lastWeek : '[Утган] dddd [куни соат] LT [да]',\n sameElse : 'L'\n },\n relativeTime : {\n future : 'Якин %s ичида',\n past : 'Бир неча %s олдин',\n s : 'фурсат',\n m : 'бир дакика',\n mm : '%d дакика',\n h : 'бир соат',\n hh : '%d соат',\n d : 'бир кун',\n dd : '%d кун',\n M : 'бир ой',\n MM : '%d ой',\n y : 'бир йил',\n yy : '%d йил'\n },\n week : {\n dow : 1, // Monday is the first day of the week.\n doy : 7 // The week that contains Jan 4th is the first week of the year.\n }\n});\n\nreturn uz;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/uz.js\n// module id = 479\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/uz.js?", + ); + + /***/ + }, + /* 480 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/moment/locale/vi.js ***! + \*******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Vietnamese [vi]\n//! author : Bang Nguyen : https://github.com/bangnk\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar vi = moment.defineLocale('vi', {\n months : 'tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12'.split('_'),\n monthsShort : 'Th01_Th02_Th03_Th04_Th05_Th06_Th07_Th08_Th09_Th10_Th11_Th12'.split('_'),\n monthsParseExact : true,\n weekdays : 'chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy'.split('_'),\n weekdaysShort : 'CN_T2_T3_T4_T5_T6_T7'.split('_'),\n weekdaysMin : 'CN_T2_T3_T4_T5_T6_T7'.split('_'),\n weekdaysParseExact : true,\n meridiemParse: /sa|ch/i,\n isPM : function (input) {\n return /^ch$/i.test(input);\n },\n meridiem : function (hours, minutes, isLower) {\n if (hours < 12) {\n return isLower ? 'sa' : 'SA';\n } else {\n return isLower ? 'ch' : 'CH';\n }\n },\n longDateFormat : {\n LT : 'HH:mm',\n LTS : 'HH:mm:ss',\n L : 'DD/MM/YYYY',\n LL : 'D MMMM [năm] YYYY',\n LLL : 'D MMMM [năm] YYYY HH:mm',\n LLLL : 'dddd, D MMMM [năm] YYYY HH:mm',\n l : 'DD/M/YYYY',\n ll : 'D MMM YYYY',\n lll : 'D MMM YYYY HH:mm',\n llll : 'ddd, D MMM YYYY HH:mm'\n },\n calendar : {\n sameDay: '[Hôm nay lúc] LT',\n nextDay: '[Ngày mai lúc] LT',\n nextWeek: 'dddd [tuần tới lúc] LT',\n lastDay: '[Hôm qua lúc] LT',\n lastWeek: 'dddd [tuần rồi lúc] LT',\n sameElse: 'L'\n },\n relativeTime : {\n future : '%s tới',\n past : '%s trước',\n s : 'vài giây',\n m : 'một phút',\n mm : '%d phút',\n h : 'một giờ',\n hh : '%d giờ',\n d : 'một ngày',\n dd : '%d ngày',\n M : 'một tháng',\n MM : '%d tháng',\n y : 'một năm',\n yy : '%d năm'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}/,\n ordinal : function (number) {\n return number;\n },\n week : {\n dow : 1, // Monday is the first day of the week.\n doy : 4 // The week that contains Jan 4th is the first week of the year.\n }\n});\n\nreturn vi;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/vi.js\n// module id = 480\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/vi.js?", + ); + + /***/ + }, + /* 481 */ + /* unknown exports provided */ + /* all exports used */ + /*!*************************************!*\ + !*** ./~/moment/locale/x-pseudo.js ***! + \*************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Pseudo [x-pseudo]\n//! author : Andrew Hood : https://github.com/andrewhood125\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar xPseudo = moment.defineLocale('x-pseudo', {\n months : 'J~áñúá~rý_F~ébrú~árý_~Márc~h_Áp~ríl_~Máý_~Júñé~_Júl~ý_Áú~gúst~_Sép~témb~ér_Ó~ctób~ér_Ñ~óvém~bér_~Décé~mbér'.split('_'),\n monthsShort : 'J~áñ_~Féb_~Már_~Ápr_~Máý_~Júñ_~Júl_~Áúg_~Sép_~Óct_~Ñóv_~Déc'.split('_'),\n monthsParseExact : true,\n weekdays : 'S~úñdá~ý_Mó~ñdáý~_Túé~sdáý~_Wéd~ñésd~áý_T~húrs~dáý_~Fríd~áý_S~átúr~dáý'.split('_'),\n weekdaysShort : 'S~úñ_~Móñ_~Túé_~Wéd_~Thú_~Frí_~Sát'.split('_'),\n weekdaysMin : 'S~ú_Mó~_Tú_~Wé_T~h_Fr~_Sá'.split('_'),\n weekdaysParseExact : true,\n longDateFormat : {\n LT : 'HH:mm',\n L : 'DD/MM/YYYY',\n LL : 'D MMMM YYYY',\n LLL : 'D MMMM YYYY HH:mm',\n LLLL : 'dddd, D MMMM YYYY HH:mm'\n },\n calendar : {\n sameDay : '[T~ódá~ý át] LT',\n nextDay : '[T~ómó~rró~w át] LT',\n nextWeek : 'dddd [át] LT',\n lastDay : '[Ý~ést~érdá~ý át] LT',\n lastWeek : '[L~ást] dddd [át] LT',\n sameElse : 'L'\n },\n relativeTime : {\n future : 'í~ñ %s',\n past : '%s á~gó',\n s : 'á ~féw ~sécó~ñds',\n m : 'á ~míñ~úté',\n mm : '%d m~íñú~tés',\n h : 'á~ñ hó~úr',\n hh : '%d h~óúrs',\n d : 'á ~dáý',\n dd : '%d d~áýs',\n M : 'á ~móñ~th',\n MM : '%d m~óñt~hs',\n y : 'á ~ýéár',\n yy : '%d ý~éárs'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\n ordinal : function (number) {\n var b = number % 10,\n output = (~~(number % 100 / 10) === 1) ? 'th' :\n (b === 1) ? 'st' :\n (b === 2) ? 'nd' :\n (b === 3) ? 'rd' : 'th';\n return number + output;\n },\n week : {\n dow : 1, // Monday is the first day of the week.\n doy : 4 // The week that contains Jan 4th is the first week of the year.\n }\n});\n\nreturn xPseudo;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/x-pseudo.js\n// module id = 481\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/x-pseudo.js?", + ); + + /***/ + }, + /* 482 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/moment/locale/yo.js ***! + \*******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Yoruba Nigeria [yo]\n//! author : Atolagbe Abisoye : https://github.com/andela-batolagbe\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar yo = moment.defineLocale('yo', {\n months : 'Sẹ́rẹ́_Èrèlè_Ẹrẹ̀nà_Ìgbé_Èbibi_Òkùdu_Agẹmo_Ògún_Owewe_Ọ̀wàrà_Bélú_Ọ̀pẹ̀̀'.split('_'),\n monthsShort : 'Sẹ́r_Èrl_Ẹrn_Ìgb_Èbi_Òkù_Agẹ_Ògú_Owe_Ọ̀wà_Bél_Ọ̀pẹ̀̀'.split('_'),\n weekdays : 'Àìkú_Ajé_Ìsẹ́gun_Ọjọ́rú_Ọjọ́bọ_Ẹtì_Àbámẹ́ta'.split('_'),\n weekdaysShort : 'Àìk_Ajé_Ìsẹ́_Ọjr_Ọjb_Ẹtì_Àbá'.split('_'),\n weekdaysMin : 'Àì_Aj_Ìs_Ọr_Ọb_Ẹt_Àb'.split('_'),\n longDateFormat : {\n LT : 'h:mm A',\n LTS : 'h:mm:ss A',\n L : 'DD/MM/YYYY',\n LL : 'D MMMM YYYY',\n LLL : 'D MMMM YYYY h:mm A',\n LLLL : 'dddd, D MMMM YYYY h:mm A'\n },\n calendar : {\n sameDay : '[Ònì ni] LT',\n nextDay : '[Ọ̀la ni] LT',\n nextWeek : 'dddd [Ọsẹ̀ tón\\'bọ] [ni] LT',\n lastDay : '[Àna ni] LT',\n lastWeek : 'dddd [Ọsẹ̀ tólọ́] [ni] LT',\n sameElse : 'L'\n },\n relativeTime : {\n future : 'ní %s',\n past : '%s kọjá',\n s : 'ìsẹjú aayá die',\n m : 'ìsẹjú kan',\n mm : 'ìsẹjú %d',\n h : 'wákati kan',\n hh : 'wákati %d',\n d : 'ọjọ́ kan',\n dd : 'ọjọ́ %d',\n M : 'osù kan',\n MM : 'osù %d',\n y : 'ọdún kan',\n yy : 'ọdún %d'\n },\n dayOfMonthOrdinalParse : /ọjọ́\\s\\d{1,2}/,\n ordinal : 'ọjọ́ %d',\n week : {\n dow : 1, // Monday is the first day of the week.\n doy : 4 // The week that contains Jan 4th is the first week of the year.\n }\n});\n\nreturn yo;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/yo.js\n// module id = 482\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/yo.js?", + ); + + /***/ + }, + /* 483 */ + /* unknown exports provided */ + /* all exports used */ + /*!**********************************!*\ + !*** ./~/moment/locale/zh-cn.js ***! + \**********************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Chinese (China) [zh-cn]\n//! author : suupic : https://github.com/suupic\n//! author : Zeno Zeng : https://github.com/zenozeng\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar zhCn = moment.defineLocale('zh-cn', {\n months : '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split('_'),\n monthsShort : '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),\n weekdays : '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),\n weekdaysShort : '周日_周一_周二_周三_周四_周五_周六'.split('_'),\n weekdaysMin : '日_一_二_三_四_五_六'.split('_'),\n longDateFormat : {\n LT : 'HH:mm',\n LTS : 'HH:mm:ss',\n L : 'YYYY年MMMD日',\n LL : 'YYYY年MMMD日',\n LLL : 'YYYY年MMMD日Ah点mm分',\n LLLL : 'YYYY年MMMD日ddddAh点mm分',\n l : 'YYYY年MMMD日',\n ll : 'YYYY年MMMD日',\n lll : 'YYYY年MMMD日 HH:mm',\n llll : 'YYYY年MMMD日dddd HH:mm'\n },\n meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === '凌晨' || meridiem === '早上' ||\n meridiem === '上午') {\n return hour;\n } else if (meridiem === '下午' || meridiem === '晚上') {\n return hour + 12;\n } else {\n // '中午'\n return hour >= 11 ? hour : hour + 12;\n }\n },\n meridiem : function (hour, minute, isLower) {\n var hm = hour * 100 + minute;\n if (hm < 600) {\n return '凌晨';\n } else if (hm < 900) {\n return '早上';\n } else if (hm < 1130) {\n return '上午';\n } else if (hm < 1230) {\n return '中午';\n } else if (hm < 1800) {\n return '下午';\n } else {\n return '晚上';\n }\n },\n calendar : {\n sameDay : '[今天]LT',\n nextDay : '[明天]LT',\n nextWeek : '[下]ddddLT',\n lastDay : '[昨天]LT',\n lastWeek : '[上]ddddLT',\n sameElse : 'L'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(日|月|周)/,\n ordinal : function (number, period) {\n switch (period) {\n case 'd':\n case 'D':\n case 'DDD':\n return number + '日';\n case 'M':\n return number + '月';\n case 'w':\n case 'W':\n return number + '周';\n default:\n return number;\n }\n },\n relativeTime : {\n future : '%s内',\n past : '%s前',\n s : '几秒',\n m : '1 分钟',\n mm : '%d 分钟',\n h : '1 小时',\n hh : '%d 小时',\n d : '1 天',\n dd : '%d 天',\n M : '1 个月',\n MM : '%d 个月',\n y : '1 年',\n yy : '%d 年'\n },\n week : {\n // GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效\n dow : 1, // Monday is the first day of the week.\n doy : 4 // The week that contains Jan 4th is the first week of the year.\n }\n});\n\nreturn zhCn;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/zh-cn.js\n// module id = 483\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/zh-cn.js?", + ); + + /***/ + }, + /* 484 */ + /* unknown exports provided */ + /* all exports used */ + /*!**********************************!*\ + !*** ./~/moment/locale/zh-hk.js ***! + \**********************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Chinese (Hong Kong) [zh-hk]\n//! author : Ben : https://github.com/ben-lin\n//! author : Chris Lam : https://github.com/hehachris\n//! author : Konstantin : https://github.com/skfd\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar zhHk = moment.defineLocale('zh-hk', {\n months : '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split('_'),\n monthsShort : '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),\n weekdays : '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),\n weekdaysShort : '週日_週一_週二_週三_週四_週五_週六'.split('_'),\n weekdaysMin : '日_一_二_三_四_五_六'.split('_'),\n longDateFormat : {\n LT : 'HH:mm',\n LTS : 'HH:mm:ss',\n L : 'YYYY年MMMD日',\n LL : 'YYYY年MMMD日',\n LLL : 'YYYY年MMMD日 HH:mm',\n LLLL : 'YYYY年MMMD日dddd HH:mm',\n l : 'YYYY年MMMD日',\n ll : 'YYYY年MMMD日',\n lll : 'YYYY年MMMD日 HH:mm',\n llll : 'YYYY年MMMD日dddd HH:mm'\n },\n meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,\n meridiemHour : function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {\n return hour;\n } else if (meridiem === '中午') {\n return hour >= 11 ? hour : hour + 12;\n } else if (meridiem === '下午' || meridiem === '晚上') {\n return hour + 12;\n }\n },\n meridiem : function (hour, minute, isLower) {\n var hm = hour * 100 + minute;\n if (hm < 600) {\n return '凌晨';\n } else if (hm < 900) {\n return '早上';\n } else if (hm < 1130) {\n return '上午';\n } else if (hm < 1230) {\n return '中午';\n } else if (hm < 1800) {\n return '下午';\n } else {\n return '晚上';\n }\n },\n calendar : {\n sameDay : '[今天]LT',\n nextDay : '[明天]LT',\n nextWeek : '[下]ddddLT',\n lastDay : '[昨天]LT',\n lastWeek : '[上]ddddLT',\n sameElse : 'L'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(日|月|週)/,\n ordinal : function (number, period) {\n switch (period) {\n case 'd' :\n case 'D' :\n case 'DDD' :\n return number + '日';\n case 'M' :\n return number + '月';\n case 'w' :\n case 'W' :\n return number + '週';\n default :\n return number;\n }\n },\n relativeTime : {\n future : '%s內',\n past : '%s前',\n s : '幾秒',\n m : '1 分鐘',\n mm : '%d 分鐘',\n h : '1 小時',\n hh : '%d 小時',\n d : '1 天',\n dd : '%d 天',\n M : '1 個月',\n MM : '%d 個月',\n y : '1 年',\n yy : '%d 年'\n }\n});\n\nreturn zhHk;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/zh-hk.js\n// module id = 484\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/zh-hk.js?", + ); + + /***/ + }, + /* 485 */ + /* unknown exports provided */ + /* all exports used */ + /*!**********************************!*\ + !*** ./~/moment/locale/zh-tw.js ***! + \**********************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Chinese (Taiwan) [zh-tw]\n//! author : Ben : https://github.com/ben-lin\n//! author : Chris Lam : https://github.com/hehachris\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(/*! ../moment */ 3)) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar zhTw = moment.defineLocale('zh-tw', {\n months : '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split('_'),\n monthsShort : '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),\n weekdays : '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),\n weekdaysShort : '週日_週一_週二_週三_週四_週五_週六'.split('_'),\n weekdaysMin : '日_一_二_三_四_五_六'.split('_'),\n longDateFormat : {\n LT : 'HH:mm',\n LTS : 'HH:mm:ss',\n L : 'YYYY年MMMD日',\n LL : 'YYYY年MMMD日',\n LLL : 'YYYY年MMMD日 HH:mm',\n LLLL : 'YYYY年MMMD日dddd HH:mm',\n l : 'YYYY年MMMD日',\n ll : 'YYYY年MMMD日',\n lll : 'YYYY年MMMD日 HH:mm',\n llll : 'YYYY年MMMD日dddd HH:mm'\n },\n meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,\n meridiemHour : function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {\n return hour;\n } else if (meridiem === '中午') {\n return hour >= 11 ? hour : hour + 12;\n } else if (meridiem === '下午' || meridiem === '晚上') {\n return hour + 12;\n }\n },\n meridiem : function (hour, minute, isLower) {\n var hm = hour * 100 + minute;\n if (hm < 600) {\n return '凌晨';\n } else if (hm < 900) {\n return '早上';\n } else if (hm < 1130) {\n return '上午';\n } else if (hm < 1230) {\n return '中午';\n } else if (hm < 1800) {\n return '下午';\n } else {\n return '晚上';\n }\n },\n calendar : {\n sameDay : '[今天]LT',\n nextDay : '[明天]LT',\n nextWeek : '[下]ddddLT',\n lastDay : '[昨天]LT',\n lastWeek : '[上]ddddLT',\n sameElse : 'L'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(日|月|週)/,\n ordinal : function (number, period) {\n switch (period) {\n case 'd' :\n case 'D' :\n case 'DDD' :\n return number + '日';\n case 'M' :\n return number + '月';\n case 'w' :\n case 'W' :\n return number + '週';\n default :\n return number;\n }\n },\n relativeTime : {\n future : '%s內',\n past : '%s前',\n s : '幾秒',\n m : '1 分鐘',\n mm : '%d 分鐘',\n h : '1 小時',\n hh : '%d 小時',\n d : '1 天',\n dd : '%d 天',\n M : '1 個月',\n MM : '%d 個月',\n y : '1 年',\n yy : '%d 年'\n }\n});\n\nreturn zhTw;\n\n})));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/zh-tw.js\n// module id = 485\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale/zh-tw.js?", + ); + + /***/ + }, + /* 486 */ + /* unknown exports provided */ + /* all exports used */ + /*!**************************************************!*\ + !*** ./~/prop-types/lib/ReactPropTypesSecret.js ***! + \**************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/prop-types/lib/ReactPropTypesSecret.js\n// module id = 486\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/prop-types/lib/ReactPropTypesSecret.js?", + ); + + /***/ + }, + /* 487 */ + /* unknown exports provided */ + /* all exports used */ + /*!*****************************!*\ + !*** ./~/qs/lib/formats.js ***! + \*****************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nvar replace = String.prototype.replace;\nvar percentTwenties = /%20/g;\n\nmodule.exports = {\n 'default': 'RFC3986',\n formatters: {\n RFC1738: function (value) {\n return replace.call(value, percentTwenties, '+');\n },\n RFC3986: function (value) {\n return value;\n }\n },\n RFC1738: 'RFC1738',\n RFC3986: 'RFC3986'\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/qs/lib/formats.js\n// module id = 487\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/qs/lib/formats.js?", + ); + + /***/ + }, + /* 488 */ + /* unknown exports provided */ + /* all exports used */ + /*!***************************!*\ + !*** ./~/qs/lib/utils.js ***! + \***************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nvar has = Object.prototype.hasOwnProperty;\n\nvar hexTable = (function () {\n var array = [];\n for (var i = 0; i < 256; ++i) {\n array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase());\n }\n\n return array;\n}());\n\nexports.arrayToObject = function (source, options) {\n var obj = options && options.plainObjects ? Object.create(null) : {};\n for (var i = 0; i < source.length; ++i) {\n if (typeof source[i] !== 'undefined') {\n obj[i] = source[i];\n }\n }\n\n return obj;\n};\n\nexports.merge = function (target, source, options) {\n if (!source) {\n return target;\n }\n\n if (typeof source !== 'object') {\n if (Array.isArray(target)) {\n target.push(source);\n } else if (typeof target === 'object') {\n if (options.plainObjects || options.allowPrototypes || !has.call(Object.prototype, source)) {\n target[source] = true;\n }\n } else {\n return [target, source];\n }\n\n return target;\n }\n\n if (typeof target !== 'object') {\n return [target].concat(source);\n }\n\n var mergeTarget = target;\n if (Array.isArray(target) && !Array.isArray(source)) {\n mergeTarget = exports.arrayToObject(target, options);\n }\n\n if (Array.isArray(target) && Array.isArray(source)) {\n source.forEach(function (item, i) {\n if (has.call(target, i)) {\n if (target[i] && typeof target[i] === 'object') {\n target[i] = exports.merge(target[i], item, options);\n } else {\n target.push(item);\n }\n } else {\n target[i] = item;\n }\n });\n return target;\n }\n\n return Object.keys(source).reduce(function (acc, key) {\n var value = source[key];\n\n if (Object.prototype.hasOwnProperty.call(acc, key)) {\n acc[key] = exports.merge(acc[key], value, options);\n } else {\n acc[key] = value;\n }\n return acc;\n }, mergeTarget);\n};\n\nexports.decode = function (str) {\n try {\n return decodeURIComponent(str.replace(/\\+/g, ' '));\n } catch (e) {\n return str;\n }\n};\n\nexports.encode = function (str) {\n // This code was originally written by Brian White (mscdex) for the io.js core querystring library.\n // It has been adapted here for stricter adherence to RFC 3986\n if (str.length === 0) {\n return str;\n }\n\n var string = typeof str === 'string' ? str : String(str);\n\n var out = '';\n for (var i = 0; i < string.length; ++i) {\n var c = string.charCodeAt(i);\n\n if (\n c === 0x2D || // -\n c === 0x2E || // .\n c === 0x5F || // _\n c === 0x7E || // ~\n (c >= 0x30 && c <= 0x39) || // 0-9\n (c >= 0x41 && c <= 0x5A) || // a-z\n (c >= 0x61 && c <= 0x7A) // A-Z\n ) {\n out += string.charAt(i);\n continue;\n }\n\n if (c < 0x80) {\n out = out + hexTable[c];\n continue;\n }\n\n if (c < 0x800) {\n out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]);\n continue;\n }\n\n if (c < 0xD800 || c >= 0xE000) {\n out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]);\n continue;\n }\n\n i += 1;\n c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF));\n out += hexTable[0xF0 | (c >> 18)] + hexTable[0x80 | ((c >> 12) & 0x3F)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]; // eslint-disable-line max-len\n }\n\n return out;\n};\n\nexports.compact = function (obj, references) {\n if (typeof obj !== 'object' || obj === null) {\n return obj;\n }\n\n var refs = references || [];\n var lookup = refs.indexOf(obj);\n if (lookup !== -1) {\n return refs[lookup];\n }\n\n refs.push(obj);\n\n if (Array.isArray(obj)) {\n var compacted = [];\n\n for (var i = 0; i < obj.length; ++i) {\n if (obj[i] && typeof obj[i] === 'object') {\n compacted.push(exports.compact(obj[i], refs));\n } else if (typeof obj[i] !== 'undefined') {\n compacted.push(obj[i]);\n }\n }\n\n return compacted;\n }\n\n var keys = Object.keys(obj);\n keys.forEach(function (key) {\n obj[key] = exports.compact(obj[key], refs);\n });\n\n return obj;\n};\n\nexports.isRegExp = function (obj) {\n return Object.prototype.toString.call(obj) === '[object RegExp]';\n};\n\nexports.isBuffer = function (obj) {\n if (obj === null || typeof obj === 'undefined') {\n return false;\n }\n\n return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/qs/lib/utils.js\n// module id = 488\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/qs/lib/utils.js?", + ); + + /***/ + }, + /* 489 */ + /* unknown exports provided */ + /* all exports used */ + /*!**********************************!*\ + !*** ./~/rc-animate/lib/util.js ***! + \**********************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nvar util = {\n isAppearSupported: function isAppearSupported(props) {\n return props.transitionName && props.transitionAppear || props.animation.appear;\n },\n isEnterSupported: function isEnterSupported(props) {\n return props.transitionName && props.transitionEnter || props.animation.enter;\n },\n isLeaveSupported: function isLeaveSupported(props) {\n return props.transitionName && props.transitionLeave || props.animation.leave;\n },\n allowAppearCallback: function allowAppearCallback(props) {\n return props.transitionAppear || props.animation.appear;\n },\n allowEnterCallback: function allowEnterCallback(props) {\n return props.transitionEnter || props.animation.enter;\n },\n allowLeaveCallback: function allowLeaveCallback(props) {\n return props.transitionLeave || props.animation.leave;\n }\n};\nexports["default"] = util;\nmodule.exports = exports[\'default\'];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/rc-animate/lib/util.js\n// module id = 489\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/rc-animate/lib/util.js?', + ); + + /***/ + }, + /* 490 */ + /* unknown exports provided */ + /* all exports used */ + /*!*****************************************!*\ + !*** ./~/rc-slider/lib/common/Track.js ***! + \*****************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends2 = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n\nvar _extends3 = _interopRequireDefault(_extends2);\n\nvar _react = __webpack_require__(/*! react */ 1);\n\nvar _react2 = _interopRequireDefault(_react);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nvar Track = function Track(_ref) {\n var className = _ref.className,\n included = _ref.included,\n vertical = _ref.vertical,\n offset = _ref.offset,\n length = _ref.length,\n minimumTrackStyle = _ref.minimumTrackStyle;\n\n var style = {\n visibility: included ? 'visible' : 'hidden'\n };\n if (vertical) {\n style.bottom = offset + '%';\n style.height = length + '%';\n } else {\n style.left = offset + '%';\n style.width = length + '%';\n }\n var elStyle = (0, _extends3[\"default\"])({}, style, minimumTrackStyle);\n return _react2[\"default\"].createElement('div', { className: className, style: elStyle });\n};\n\nexports[\"default\"] = Track;\nmodule.exports = exports['default'];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/rc-slider/lib/common/Track.js\n// module id = 490\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/rc-slider/lib/common/Track.js?", + ); + + /***/ + }, + /* 491 */ + /* unknown exports provided */ + /* all exports used */ + /*!************************************************!*\ + !*** ./~/rc-slider/lib/common/createSlider.js ***! + \************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\n\nvar _objectWithoutProperties2 = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ 9);\n\nvar _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);\n\nvar _extends2 = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n\nvar _extends3 = _interopRequireDefault(_extends2);\n\nvar _defineProperty2 = __webpack_require__(/*! babel-runtime/helpers/defineProperty */ 109);\n\nvar _defineProperty3 = _interopRequireDefault(_defineProperty2);\n\nvar _classCallCheck2 = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 6);\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _possibleConstructorReturn2 = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 8);\n\nvar _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\nvar _inherits2 = __webpack_require__(/*! babel-runtime/helpers/inherits */ 7);\n\nvar _inherits3 = _interopRequireDefault(_inherits2);\n\nexports["default"] = createSlider;\n\nvar _react = __webpack_require__(/*! react */ 1);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _propTypes = __webpack_require__(/*! prop-types */ 0);\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nvar _addEventListener = __webpack_require__(/*! rc-util/lib/Dom/addEventListener */ 1236);\n\nvar _addEventListener2 = _interopRequireDefault(_addEventListener);\n\nvar _classnames = __webpack_require__(/*! classnames */ 2);\n\nvar _classnames2 = _interopRequireDefault(_classnames);\n\nvar _warning = __webpack_require__(/*! warning */ 23);\n\nvar _warning2 = _interopRequireDefault(_warning);\n\nvar _Steps = __webpack_require__(/*! ./Steps */ 1233);\n\nvar _Steps2 = _interopRequireDefault(_Steps);\n\nvar _Marks = __webpack_require__(/*! ./Marks */ 1232);\n\nvar _Marks2 = _interopRequireDefault(_Marks);\n\nvar _Handle = __webpack_require__(/*! ../Handle */ 234);\n\nvar _Handle2 = _interopRequireDefault(_Handle);\n\nvar _utils = __webpack_require__(/*! ../utils */ 235);\n\nvar utils = _interopRequireWildcard(_utils);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj["default"] = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }\n\nfunction noop() {}\n\nfunction createSlider(Component) {\n var _class, _temp;\n\n return _temp = _class = function (_Component) {\n (0, _inherits3["default"])(ComponentEnhancer, _Component);\n\n function ComponentEnhancer(props) {\n (0, _classCallCheck3["default"])(this, ComponentEnhancer);\n\n var _this = (0, _possibleConstructorReturn3["default"])(this, _Component.call(this, props));\n\n _this.onMouseDown = function (e) {\n if (e.button !== 0) {\n return;\n }\n\n var isVertical = _this.props.vertical;\n var position = utils.getMousePosition(isVertical, e);\n if (!utils.isEventFromHandle(e, _this.handlesRefs)) {\n _this.dragOffset = 0;\n } else {\n var handlePosition = utils.getHandleCenterPosition(isVertical, e.target);\n _this.dragOffset = position - handlePosition;\n position = handlePosition;\n }\n _this.onStart(position);\n _this.addDocumentMouseEvents();\n utils.pauseEvent(e);\n };\n\n _this.onTouchStart = function (e) {\n if (utils.isNotTouchEvent(e)) return;\n\n var isVertical = _this.props.vertical;\n var position = utils.getTouchPosition(isVertical, e);\n if (!utils.isEventFromHandle(e, _this.handlesRefs)) {\n _this.dragOffset = 0;\n } else {\n var handlePosition = utils.getHandleCenterPosition(isVertical, e.target);\n _this.dragOffset = position - handlePosition;\n position = handlePosition;\n }\n _this.onStart(position);\n _this.addDocumentTouchEvents();\n utils.pauseEvent(e);\n };\n\n _this.onMouseMove = function (e) {\n if (!_this.sliderRef) {\n _this.onEnd();\n return;\n }\n var position = utils.getMousePosition(_this.props.vertical, e);\n _this.onMove(e, position - _this.dragOffset);\n };\n\n _this.onTouchMove = function (e) {\n if (utils.isNotTouchEvent(e) || !_this.sliderRef) {\n _this.onEnd();\n return;\n }\n\n var position = utils.getTouchPosition(_this.props.vertical, e);\n _this.onMove(e, position - _this.dragOffset);\n };\n\n _this.saveSlider = function (slider) {\n _this.sliderRef = slider;\n };\n\n if (true) {\n var step = props.step,\n max = props.max,\n min = props.min;\n\n (0, _warning2["default"])(step && Math.floor(step) === step ? (max - min) % step === 0 : true, \'Slider[max] - Slider[min] (%s) should be a multiple of Slider[step] (%s)\', max - min, step);\n }\n\n _this.handlesRefs = {};\n return _this;\n }\n\n ComponentEnhancer.prototype.componentWillUnmount = function componentWillUnmount() {\n if (_Component.prototype.componentWillUnmount) _Component.prototype.componentWillUnmount.call(this);\n this.removeDocumentEvents();\n };\n\n ComponentEnhancer.prototype.addDocumentTouchEvents = function addDocumentTouchEvents() {\n // just work for Chrome iOS Safari and Android Browser\n this.onTouchMoveListener = (0, _addEventListener2["default"])(document, \'touchmove\', this.onTouchMove);\n this.onTouchUpListener = (0, _addEventListener2["default"])(document, \'touchend\', this.onEnd);\n };\n\n ComponentEnhancer.prototype.addDocumentMouseEvents = function addDocumentMouseEvents() {\n this.onMouseMoveListener = (0, _addEventListener2["default"])(document, \'mousemove\', this.onMouseMove);\n this.onMouseUpListener = (0, _addEventListener2["default"])(document, \'mouseup\', this.onEnd);\n };\n\n ComponentEnhancer.prototype.removeDocumentEvents = function removeDocumentEvents() {\n /* eslint-disable no-unused-expressions */\n this.onTouchMoveListener && this.onTouchMoveListener.remove();\n this.onTouchUpListener && this.onTouchUpListener.remove();\n\n this.onMouseMoveListener && this.onMouseMoveListener.remove();\n this.onMouseUpListener && this.onMouseUpListener.remove();\n /* eslint-enable no-unused-expressions */\n };\n\n ComponentEnhancer.prototype.getSliderStart = function getSliderStart() {\n var slider = this.sliderRef;\n var rect = slider.getBoundingClientRect();\n\n return this.props.vertical ? rect.top : rect.left;\n };\n\n ComponentEnhancer.prototype.getSliderLength = function getSliderLength() {\n var slider = this.sliderRef;\n if (!slider) {\n return 0;\n }\n\n return this.props.vertical ? slider.clientHeight : slider.clientWidth;\n };\n\n ComponentEnhancer.prototype.calcValue = function calcValue(offset) {\n var _props = this.props,\n vertical = _props.vertical,\n min = _props.min,\n max = _props.max;\n\n var ratio = Math.abs(Math.max(offset, 0) / this.getSliderLength());\n var value = vertical ? (1 - ratio) * (max - min) + min : ratio * (max - min) + min;\n return value;\n };\n\n ComponentEnhancer.prototype.calcValueByPos = function calcValueByPos(position) {\n var pixelOffset = position - this.getSliderStart();\n var nextValue = this.trimAlignValue(this.calcValue(pixelOffset));\n return nextValue;\n };\n\n ComponentEnhancer.prototype.calcOffset = function calcOffset(value) {\n var _props2 = this.props,\n min = _props2.min,\n max = _props2.max;\n\n var ratio = (value - min) / (max - min);\n return ratio * 100;\n };\n\n ComponentEnhancer.prototype.saveHandle = function saveHandle(index, handle) {\n this.handlesRefs[index] = handle;\n };\n\n ComponentEnhancer.prototype.render = function render() {\n var _classNames;\n\n var _props3 = this.props,\n prefixCls = _props3.prefixCls,\n className = _props3.className,\n marks = _props3.marks,\n dots = _props3.dots,\n step = _props3.step,\n included = _props3.included,\n disabled = _props3.disabled,\n vertical = _props3.vertical,\n min = _props3.min,\n max = _props3.max,\n children = _props3.children,\n maximumTrackStyle = _props3.maximumTrackStyle,\n style = _props3.style;\n\n var _Component$prototype$ = _Component.prototype.render.call(this),\n tracks = _Component$prototype$.tracks,\n handles = _Component$prototype$.handles;\n\n var sliderClassName = (0, _classnames2["default"])((_classNames = {}, (0, _defineProperty3["default"])(_classNames, prefixCls, true), (0, _defineProperty3["default"])(_classNames, prefixCls + \'-with-marks\', Object.keys(marks).length), (0, _defineProperty3["default"])(_classNames, prefixCls + \'-disabled\', disabled), (0, _defineProperty3["default"])(_classNames, prefixCls + \'-vertical\', vertical), (0, _defineProperty3["default"])(_classNames, className, className), _classNames));\n\n return _react2["default"].createElement(\n \'div\',\n {\n ref: this.saveSlider,\n className: sliderClassName,\n onTouchStart: disabled ? noop : this.onTouchStart,\n onMouseDown: disabled ? noop : this.onMouseDown,\n style: style\n },\n _react2["default"].createElement(\'div\', { className: prefixCls + \'-rail\', style: maximumTrackStyle }),\n tracks,\n _react2["default"].createElement(_Steps2["default"], {\n prefixCls: prefixCls,\n vertical: vertical,\n marks: marks,\n dots: dots,\n step: step,\n included: included,\n lowerBound: this.getLowerBound(),\n upperBound: this.getUpperBound(),\n max: max,\n min: min\n }),\n handles,\n _react2["default"].createElement(_Marks2["default"], {\n className: prefixCls + \'-mark\',\n vertical: vertical,\n marks: marks,\n included: included,\n lowerBound: this.getLowerBound(),\n upperBound: this.getUpperBound(),\n max: max,\n min: min\n }),\n children\n );\n };\n\n return ComponentEnhancer;\n }(Component), _class.displayName = \'ComponentEnhancer(\' + Component.displayName + \')\', _class.propTypes = (0, _extends3["default"])({}, Component.propTypes, {\n min: _propTypes2["default"].number,\n max: _propTypes2["default"].number,\n step: _propTypes2["default"].number,\n marks: _propTypes2["default"].object,\n included: _propTypes2["default"].bool,\n className: _propTypes2["default"].string,\n prefixCls: _propTypes2["default"].string,\n disabled: _propTypes2["default"].bool,\n children: _propTypes2["default"].any,\n onBeforeChange: _propTypes2["default"].func,\n onChange: _propTypes2["default"].func,\n onAfterChange: _propTypes2["default"].func,\n handle: _propTypes2["default"].func,\n dots: _propTypes2["default"].bool,\n vertical: _propTypes2["default"].bool,\n style: _propTypes2["default"].object,\n minimumTrackStyle: _propTypes2["default"].object,\n maximumTrackStyle: _propTypes2["default"].object,\n handleStyle: _propTypes2["default"].object\n }), _class.defaultProps = (0, _extends3["default"])({}, Component.defaultProps, {\n prefixCls: \'rc-slider\',\n className: \'\',\n min: 0,\n max: 100,\n step: 1,\n marks: {},\n handle: function handle(_ref) {\n var index = _ref.index,\n restProps = (0, _objectWithoutProperties3["default"])(_ref, [\'index\']);\n\n delete restProps.dragging;\n delete restProps.value;\n return _react2["default"].createElement(_Handle2["default"], (0, _extends3["default"])({}, restProps, { key: index }));\n },\n\n onBeforeChange: noop,\n onChange: noop,\n onAfterChange: noop,\n included: true,\n disabled: false,\n dots: false,\n vertical: false,\n minimumTrackStyle: {},\n maximumTrackStyle: {},\n handleStyle: {}\n }), _temp;\n}\nmodule.exports = exports[\'default\'];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/rc-slider/lib/common/createSlider.js\n// module id = 491\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/rc-slider/lib/common/createSlider.js?', + ); + + /***/ + }, + /* 492 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************************!*\ + !*** ./~/rc-trigger/lib/LazyRenderBox.js ***! + \*******************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\n\nvar _objectWithoutProperties2 = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ 9);\n\nvar _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);\n\nvar _react = __webpack_require__(/*! react */ 1);\n\nvar _react2 = _interopRequireDefault(_react);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }\n\nvar LazyRenderBox = _react2["default"].createClass({\n displayName: \'LazyRenderBox\',\n\n propTypes: {\n children: _react.PropTypes.any,\n className: _react.PropTypes.string,\n visible: _react.PropTypes.bool,\n hiddenClassName: _react.PropTypes.string\n },\n shouldComponentUpdate: function shouldComponentUpdate(nextProps) {\n return nextProps.hiddenClassName || nextProps.visible;\n },\n render: function render() {\n var _props = this.props;\n var hiddenClassName = _props.hiddenClassName;\n var visible = _props.visible;\n var props = (0, _objectWithoutProperties3["default"])(_props, [\'hiddenClassName\', \'visible\']);\n\n\n if (hiddenClassName || _react2["default"].Children.count(props.children) > 1) {\n if (!visible && hiddenClassName) {\n props.className += \' \' + hiddenClassName;\n }\n return _react2["default"].createElement(\'div\', props);\n }\n\n return _react2["default"].Children.only(props.children);\n }\n});\n\nexports["default"] = LazyRenderBox;\nmodule.exports = exports[\'default\'];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/rc-trigger/lib/LazyRenderBox.js\n// module id = 492\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/rc-trigger/lib/LazyRenderBox.js?', + ); + + /***/ + }, + /* 493 */ + /* unknown exports provided */ + /* all exports used */ + /*!***********************************************!*\ + !*** ./~/rc-util/lib/Dom/addEventListener.js ***! + \***********************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports["default"] = addEventListenerWrap;\n\nvar _addDomEventListener = __webpack_require__(/*! add-dom-event-listener */ 277);\n\nvar _addDomEventListener2 = _interopRequireDefault(_addDomEventListener);\n\nvar _reactDom = __webpack_require__(/*! react-dom */ 16);\n\nvar _reactDom2 = _interopRequireDefault(_reactDom);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }\n\nfunction addEventListenerWrap(target, eventType, cb) {\n /* eslint camelcase: 2 */\n var callback = _reactDom2["default"].unstable_batchedUpdates ? function run(e) {\n _reactDom2["default"].unstable_batchedUpdates(cb, e);\n } : cb;\n return (0, _addDomEventListener2["default"])(target, eventType, callback);\n}\nmodule.exports = exports[\'default\'];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/rc-util/lib/Dom/addEventListener.js\n// module id = 493\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/rc-util/lib/Dom/addEventListener.js?', + ); + + /***/ + }, + /* 494 */ + /* exports provided: default */ + /* exports used: default */ + /*!************************************************!*\ + !*** ./~/react-bootstrap/es/BreadcrumbItem.js ***! + \************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ 9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ 7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__SafeAnchor__ = __webpack_require__(/*! ./SafeAnchor */ 54);\n\n\n\n\n\n\n\n\n\n\n\nvar propTypes = {\n /**\n * If set to true, renders `span` instead of `a`\n */\n active: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,\n /**\n * `href` attribute for the inner `a` element\n */\n href: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string,\n /**\n * `title` attribute for the inner `a` element\n */\n title: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.node,\n /**\n * `target` attribute for the inner `a` element\n */\n target: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string\n};\n\nvar defaultProps = {\n active: false\n};\n\nvar BreadcrumbItem = function (_React$Component) {\n __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default()(BreadcrumbItem, _React$Component);\n\n function BreadcrumbItem() {\n __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default()(this, BreadcrumbItem);\n\n return __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.apply(this, arguments));\n }\n\n BreadcrumbItem.prototype.render = function render() {\n var _props = this.props,\n active = _props.active,\n href = _props.href,\n title = _props.title,\n target = _props.target,\n className = _props.className,\n props = __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default()(_props, ['active', 'href', 'title', 'target', 'className']);\n\n // Don't try to render these props on non-active <span>.\n\n\n var linkProps = { href: href, title: title, target: target };\n\n return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(\n 'li',\n { className: __WEBPACK_IMPORTED_MODULE_5_classnames___default()(className, { active: active }) },\n active ? __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('span', props) : __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_8__SafeAnchor__[\"a\" /* default */], __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, props, linkProps))\n );\n };\n\n return BreadcrumbItem;\n}(__WEBPACK_IMPORTED_MODULE_6_react___default.a.Component);\n\nBreadcrumbItem.propTypes = propTypes;\nBreadcrumbItem.defaultProps = defaultProps;\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (BreadcrumbItem);\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/BreadcrumbItem.js\n// module id = 494\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/BreadcrumbItem.js?", + ); + + /***/ + }, + /* 495 */ + /* exports provided: default */ + /* exports used: default */ + /*!*********************************************!*\ + !*** ./~/react-bootstrap/es/ButtonGroup.js ***! + \*********************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ 9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ 7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_react_prop_types_lib_all__ = __webpack_require__(/*! react-prop-types/lib/all */ 174);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_react_prop_types_lib_all___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_react_prop_types_lib_all__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__Button__ = __webpack_require__(/*! ./Button */ 119);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__utils_bootstrapUtils__ = __webpack_require__(/*! ./utils/bootstrapUtils */ 10);\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar propTypes = {\n vertical: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,\n justified: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,\n\n /**\n * Display block buttons; only useful when used with the "vertical" prop.\n * @type {bool}\n */\n block: __WEBPACK_IMPORTED_MODULE_8_react_prop_types_lib_all___default()(__WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool, function (_ref) {\n var block = _ref.block,\n vertical = _ref.vertical;\n return block && !vertical ? new Error(\'`block` requires `vertical` to be set to have any effect\') : null;\n })\n};\n\nvar defaultProps = {\n block: false,\n justified: false,\n vertical: false\n};\n\nvar ButtonGroup = function (_React$Component) {\n __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default()(ButtonGroup, _React$Component);\n\n function ButtonGroup() {\n __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default()(this, ButtonGroup);\n\n return __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.apply(this, arguments));\n }\n\n ButtonGroup.prototype.render = function render() {\n var _extends2;\n\n var _props = this.props,\n block = _props.block,\n justified = _props.justified,\n vertical = _props.vertical,\n className = _props.className,\n props = __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default()(_props, [\'block\', \'justified\', \'vertical\', \'className\']);\n\n var _splitBsProps = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_10__utils_bootstrapUtils__["a" /* splitBsProps */])(props),\n bsProps = _splitBsProps[0],\n elementProps = _splitBsProps[1];\n\n var classes = __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_10__utils_bootstrapUtils__["b" /* getClassSet */])(bsProps), (_extends2 = {}, _extends2[__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_10__utils_bootstrapUtils__["e" /* prefix */])(bsProps)] = !vertical, _extends2[__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_10__utils_bootstrapUtils__["e" /* prefix */])(bsProps, \'vertical\')] = vertical, _extends2[__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_10__utils_bootstrapUtils__["e" /* prefix */])(bsProps, \'justified\')] = justified, _extends2[__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_10__utils_bootstrapUtils__["e" /* prefix */])(__WEBPACK_IMPORTED_MODULE_9__Button__["a" /* default */].defaultProps, \'block\')] = block, _extends2));\n\n return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(\'div\', __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, elementProps, {\n className: __WEBPACK_IMPORTED_MODULE_5_classnames___default()(className, classes)\n }));\n };\n\n return ButtonGroup;\n}(__WEBPACK_IMPORTED_MODULE_6_react___default.a.Component);\n\nButtonGroup.propTypes = propTypes;\nButtonGroup.defaultProps = defaultProps;\n\n/* harmony default export */ __webpack_exports__["a"] = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_10__utils_bootstrapUtils__["c" /* bsClass */])(\'btn-group\', ButtonGroup));\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/ButtonGroup.js\n// module id = 495\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/ButtonGroup.js?', + ); + + /***/ + }, + /* 496 */ + /* exports provided: default */ + /* exports used: default */ + /*!**********************************************!*\ + !*** ./~/react-bootstrap/es/CarouselItem.js ***! + \**********************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ 9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ 7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_react_dom__ = __webpack_require__(/*! react-dom */ 16);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_react_dom___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_react_dom__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__utils_TransitionEvents__ = __webpack_require__(/*! ./utils/TransitionEvents */ 1308);\n\n\n\n\n\n\n\n\n\n\n\n\n// TODO: This should use a timeout instead of TransitionEvents, or else just\n// not wait until transition end to trigger continuing animations.\n\nvar propTypes = {\n direction: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.oneOf(['prev', 'next']),\n onAnimateOutEnd: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func,\n active: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,\n animateIn: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,\n animateOut: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,\n index: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.number\n};\n\nvar defaultProps = {\n active: false,\n animateIn: false,\n animateOut: false\n};\n\nvar CarouselItem = function (_React$Component) {\n __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default()(CarouselItem, _React$Component);\n\n function CarouselItem(props, context) {\n __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default()(this, CarouselItem);\n\n var _this = __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.call(this, props, context));\n\n _this.handleAnimateOutEnd = _this.handleAnimateOutEnd.bind(_this);\n\n _this.state = {\n direction: null\n };\n\n _this.isUnmounted = false;\n return _this;\n }\n\n CarouselItem.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {\n if (this.props.active !== nextProps.active) {\n this.setState({ direction: null });\n }\n };\n\n CarouselItem.prototype.componentDidUpdate = function componentDidUpdate(prevProps) {\n var _this2 = this;\n\n var active = this.props.active;\n\n var prevActive = prevProps.active;\n\n if (!active && prevActive) {\n __WEBPACK_IMPORTED_MODULE_9__utils_TransitionEvents__[\"a\" /* default */].addEndEventListener(__WEBPACK_IMPORTED_MODULE_8_react_dom___default.a.findDOMNode(this), this.handleAnimateOutEnd);\n }\n\n if (active !== prevActive) {\n setTimeout(function () {\n return _this2.startAnimation();\n }, 20);\n }\n };\n\n CarouselItem.prototype.componentWillUnmount = function componentWillUnmount() {\n this.isUnmounted = true;\n };\n\n CarouselItem.prototype.handleAnimateOutEnd = function handleAnimateOutEnd() {\n if (this.isUnmounted) {\n return;\n }\n\n if (this.props.onAnimateOutEnd) {\n this.props.onAnimateOutEnd(this.props.index);\n }\n };\n\n CarouselItem.prototype.startAnimation = function startAnimation() {\n if (this.isUnmounted) {\n return;\n }\n\n this.setState({\n direction: this.props.direction === 'prev' ? 'right' : 'left'\n });\n };\n\n CarouselItem.prototype.render = function render() {\n var _props = this.props,\n direction = _props.direction,\n active = _props.active,\n animateIn = _props.animateIn,\n animateOut = _props.animateOut,\n className = _props.className,\n props = __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default()(_props, ['direction', 'active', 'animateIn', 'animateOut', 'className']);\n\n delete props.onAnimateOutEnd;\n delete props.index;\n\n var classes = {\n item: true,\n active: active && !animateIn || animateOut\n };\n if (direction && active && animateIn) {\n classes[direction] = true;\n }\n if (this.state.direction && (animateIn || animateOut)) {\n classes[this.state.direction] = true;\n }\n\n return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('div', __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, props, {\n className: __WEBPACK_IMPORTED_MODULE_5_classnames___default()(className, classes)\n }));\n };\n\n return CarouselItem;\n}(__WEBPACK_IMPORTED_MODULE_6_react___default.a.Component);\n\nCarouselItem.propTypes = propTypes;\nCarouselItem.defaultProps = defaultProps;\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (CarouselItem);\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/CarouselItem.js\n// module id = 496\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/CarouselItem.js?", + ); + + /***/ + }, + /* 497 */ + /* exports provided: default */ + /* exports used: default */ + /*!************************************************!*\ + !*** ./~/react-bootstrap/es/DropdownToggle.js ***! + \************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ 9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ 7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__Button__ = __webpack_require__(/*! ./Button */ 119);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__SafeAnchor__ = __webpack_require__(/*! ./SafeAnchor */ 54);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__utils_bootstrapUtils__ = __webpack_require__(/*! ./utils/bootstrapUtils */ 10);\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar propTypes = {\n noCaret: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool,\n open: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool,\n title: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,\n useAnchor: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool\n};\n\nvar defaultProps = {\n open: false,\n useAnchor: false,\n bsRole: 'toggle'\n};\n\nvar DropdownToggle = function (_React$Component) {\n __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default()(DropdownToggle, _React$Component);\n\n function DropdownToggle() {\n __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default()(this, DropdownToggle);\n\n return __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.apply(this, arguments));\n }\n\n DropdownToggle.prototype.render = function render() {\n var _props = this.props,\n noCaret = _props.noCaret,\n open = _props.open,\n useAnchor = _props.useAnchor,\n bsClass = _props.bsClass,\n className = _props.className,\n children = _props.children,\n props = __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default()(_props, ['noCaret', 'open', 'useAnchor', 'bsClass', 'className', 'children']);\n\n delete props.bsRole;\n\n var Component = useAnchor ? __WEBPACK_IMPORTED_MODULE_9__SafeAnchor__[\"a\" /* default */] : __WEBPACK_IMPORTED_MODULE_8__Button__[\"a\" /* default */];\n var useCaret = !noCaret;\n\n // This intentionally forwards bsSize and bsStyle (if set) to the\n // underlying component, to allow it to render size and style variants.\n\n // FIXME: Should this really fall back to `title` as children?\n\n return __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(\n Component,\n __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, props, {\n role: 'button',\n className: __WEBPACK_IMPORTED_MODULE_7_classnames___default()(className, bsClass),\n 'aria-haspopup': true,\n 'aria-expanded': open\n }),\n children || props.title,\n useCaret && ' ',\n useCaret && __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement('span', { className: 'caret' })\n );\n };\n\n return DropdownToggle;\n}(__WEBPACK_IMPORTED_MODULE_5_react___default.a.Component);\n\nDropdownToggle.propTypes = propTypes;\nDropdownToggle.defaultProps = defaultProps;\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_10__utils_bootstrapUtils__[\"c\" /* bsClass */])('dropdown-toggle', DropdownToggle));\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/DropdownToggle.js\n// module id = 497\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/DropdownToggle.js?", + ); + + /***/ + }, + /* 498 */ + /* exports provided: default */ + /* exports used: default */ + /*!**************************************!*\ + !*** ./~/react-bootstrap/es/Grid.js ***! + \**************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ 9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ 7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_react_prop_types_lib_elementType__ = __webpack_require__(/*! react-prop-types/lib/elementType */ 18);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_react_prop_types_lib_elementType___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_react_prop_types_lib_elementType__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__ = __webpack_require__(/*! ./utils/bootstrapUtils */ 10);\n\n\n\n\n\n\n\n\n\n\n\n\nvar propTypes = {\n /**\n * Turn any fixed-width grid layout into a full-width layout by this property.\n *\n * Adds `container-fluid` class.\n */\n fluid: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,\n /**\n * You can use a custom element for this component\n */\n componentClass: __WEBPACK_IMPORTED_MODULE_8_react_prop_types_lib_elementType___default.a\n};\n\nvar defaultProps = {\n componentClass: 'div',\n fluid: false\n};\n\nvar Grid = function (_React$Component) {\n __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default()(Grid, _React$Component);\n\n function Grid() {\n __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default()(this, Grid);\n\n return __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.apply(this, arguments));\n }\n\n Grid.prototype.render = function render() {\n var _props = this.props,\n fluid = _props.fluid,\n Component = _props.componentClass,\n className = _props.className,\n props = __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default()(_props, ['fluid', 'componentClass', 'className']);\n\n var _splitBsProps = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__[\"a\" /* splitBsProps */])(props),\n bsProps = _splitBsProps[0],\n elementProps = _splitBsProps[1];\n\n var classes = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__[\"e\" /* prefix */])(bsProps, fluid && 'fluid');\n\n return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(Component, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, elementProps, {\n className: __WEBPACK_IMPORTED_MODULE_5_classnames___default()(className, classes)\n }));\n };\n\n return Grid;\n}(__WEBPACK_IMPORTED_MODULE_6_react___default.a.Component);\n\nGrid.propTypes = propTypes;\nGrid.defaultProps = defaultProps;\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__[\"c\" /* bsClass */])('container', Grid));\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/Grid.js\n// module id = 498\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/Grid.js?", + ); + + /***/ + }, + /* 499 */ + /* exports provided: default */ + /* exports used: default */ + /*!***********************************************!*\ + !*** ./~/react-bootstrap/es/ListGroupItem.js ***! + \***********************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_object_values__ = __webpack_require__(/*! babel-runtime/core-js/object/values */ 92);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_object_values___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_object_values__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends__ = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ 9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_objectWithoutProperties__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_classCallCheck__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_classCallCheck__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ 7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__ = __webpack_require__(/*! ./utils/bootstrapUtils */ 10);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__utils_StyleConfig__ = __webpack_require__(/*! ./utils/StyleConfig */ 32);\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar propTypes = {\n active: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.any,\n disabled: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.any,\n header: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.node,\n listItem: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.bool,\n onClick: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.func,\n href: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.string,\n type: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.string\n};\n\nvar defaultProps = {\n listItem: false\n};\n\nvar ListGroupItem = function (_React$Component) {\n __WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits___default()(ListGroupItem, _React$Component);\n\n function ListGroupItem() {\n __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_classCallCheck___default()(this, ListGroupItem);\n\n return __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.apply(this, arguments));\n }\n\n ListGroupItem.prototype.renderHeader = function renderHeader(header, headingClassName) {\n if (__WEBPACK_IMPORTED_MODULE_7_react___default.a.isValidElement(header)) {\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_7_react__[\"cloneElement\"])(header, {\n className: __WEBPACK_IMPORTED_MODULE_6_classnames___default()(header.props.className, headingClassName)\n });\n }\n\n return __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement(\n 'h4',\n { className: headingClassName },\n header\n );\n };\n\n ListGroupItem.prototype.render = function render() {\n var _props = this.props,\n active = _props.active,\n disabled = _props.disabled,\n className = _props.className,\n header = _props.header,\n listItem = _props.listItem,\n children = _props.children,\n props = __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_objectWithoutProperties___default()(_props, ['active', 'disabled', 'className', 'header', 'listItem', 'children']);\n\n var _splitBsProps = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__[\"a\" /* splitBsProps */])(props),\n bsProps = _splitBsProps[0],\n elementProps = _splitBsProps[1];\n\n var classes = __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends___default()({}, __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__[\"b\" /* getClassSet */])(bsProps), {\n active: active,\n disabled: disabled\n });\n\n var Component = void 0;\n\n if (elementProps.href) {\n Component = 'a';\n } else if (elementProps.onClick) {\n Component = 'button';\n elementProps.type = elementProps.type || 'button';\n } else if (listItem) {\n Component = 'li';\n } else {\n Component = 'span';\n }\n\n elementProps.className = __WEBPACK_IMPORTED_MODULE_6_classnames___default()(className, classes);\n\n // TODO: Deprecate `header` prop.\n if (header) {\n return __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement(\n Component,\n elementProps,\n this.renderHeader(header, __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__[\"e\" /* prefix */])(bsProps, 'heading')),\n __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement(\n 'p',\n { className: __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__[\"e\" /* prefix */])(bsProps, 'text') },\n children\n )\n );\n }\n\n return __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement(\n Component,\n elementProps,\n children\n );\n };\n\n return ListGroupItem;\n}(__WEBPACK_IMPORTED_MODULE_7_react___default.a.Component);\n\nListGroupItem.propTypes = propTypes;\nListGroupItem.defaultProps = defaultProps;\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__[\"c\" /* bsClass */])('list-group-item', __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__[\"g\" /* bsStyles */])(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_object_values___default()(__WEBPACK_IMPORTED_MODULE_10__utils_StyleConfig__[\"c\" /* State */]), ListGroupItem)));\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/ListGroupItem.js\n// module id = 499\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/ListGroupItem.js?", + ); + + /***/ + }, + /* 500 */ + /* exports provided: default */ + /* exports used: default */ + /*!*******************************************!*\ + !*** ./~/react-bootstrap/es/ModalBody.js ***! + \*******************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ 9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ 7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react_prop_types_lib_elementType__ = __webpack_require__(/*! react-prop-types/lib/elementType */ 18);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react_prop_types_lib_elementType___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_react_prop_types_lib_elementType__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__ = __webpack_require__(/*! ./utils/bootstrapUtils */ 10);\n\n\n\n\n\n\n\n\n\n\n\nvar propTypes = {\n componentClass: __WEBPACK_IMPORTED_MODULE_7_react_prop_types_lib_elementType___default.a\n};\n\nvar defaultProps = {\n componentClass: \'div\'\n};\n\nvar ModalBody = function (_React$Component) {\n __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default()(ModalBody, _React$Component);\n\n function ModalBody() {\n __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default()(this, ModalBody);\n\n return __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.apply(this, arguments));\n }\n\n ModalBody.prototype.render = function render() {\n var _props = this.props,\n Component = _props.componentClass,\n className = _props.className,\n props = __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default()(_props, [\'componentClass\', \'className\']);\n\n var _splitBsProps = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__["a" /* splitBsProps */])(props),\n bsProps = _splitBsProps[0],\n elementProps = _splitBsProps[1];\n\n var classes = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__["b" /* getClassSet */])(bsProps);\n\n return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(Component, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, elementProps, {\n className: __WEBPACK_IMPORTED_MODULE_5_classnames___default()(className, classes)\n }));\n };\n\n return ModalBody;\n}(__WEBPACK_IMPORTED_MODULE_6_react___default.a.Component);\n\nModalBody.propTypes = propTypes;\nModalBody.defaultProps = defaultProps;\n\n/* harmony default export */ __webpack_exports__["a"] = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__["c" /* bsClass */])(\'modal-body\', ModalBody));\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/ModalBody.js\n// module id = 500\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/ModalBody.js?', + ); + + /***/ + }, + /* 501 */ + /* exports provided: default */ + /* exports used: default */ + /*!*********************************************!*\ + !*** ./~/react-bootstrap/es/ModalFooter.js ***! + \*********************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ 9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ 7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react_prop_types_lib_elementType__ = __webpack_require__(/*! react-prop-types/lib/elementType */ 18);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react_prop_types_lib_elementType___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_react_prop_types_lib_elementType__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__ = __webpack_require__(/*! ./utils/bootstrapUtils */ 10);\n\n\n\n\n\n\n\n\n\n\n\nvar propTypes = {\n componentClass: __WEBPACK_IMPORTED_MODULE_7_react_prop_types_lib_elementType___default.a\n};\n\nvar defaultProps = {\n componentClass: \'div\'\n};\n\nvar ModalFooter = function (_React$Component) {\n __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default()(ModalFooter, _React$Component);\n\n function ModalFooter() {\n __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default()(this, ModalFooter);\n\n return __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.apply(this, arguments));\n }\n\n ModalFooter.prototype.render = function render() {\n var _props = this.props,\n Component = _props.componentClass,\n className = _props.className,\n props = __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default()(_props, [\'componentClass\', \'className\']);\n\n var _splitBsProps = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__["a" /* splitBsProps */])(props),\n bsProps = _splitBsProps[0],\n elementProps = _splitBsProps[1];\n\n var classes = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__["b" /* getClassSet */])(bsProps);\n\n return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(Component, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, elementProps, {\n className: __WEBPACK_IMPORTED_MODULE_5_classnames___default()(className, classes)\n }));\n };\n\n return ModalFooter;\n}(__WEBPACK_IMPORTED_MODULE_6_react___default.a.Component);\n\nModalFooter.propTypes = propTypes;\nModalFooter.defaultProps = defaultProps;\n\n/* harmony default export */ __webpack_exports__["a"] = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__["c" /* bsClass */])(\'modal-footer\', ModalFooter));\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/ModalFooter.js\n// module id = 501\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/ModalFooter.js?', + ); + + /***/ + }, + /* 502 */ + /* exports provided: default */ + /* exports used: default */ + /*!*********************************************!*\ + !*** ./~/react-bootstrap/es/ModalHeader.js ***! + \*********************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ 9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ 7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__ = __webpack_require__(/*! ./utils/bootstrapUtils */ 10);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__utils_createChainedFunction__ = __webpack_require__(/*! ./utils/createChainedFunction */ 28);\n\n\n\n\n\n\n\n\n\n\n\n\n// TODO: `aria-label` should be `closeLabel`.\n\nvar propTypes = {\n /**\n * The 'aria-label' attribute provides an accessible label for the close\n * button. It is used for Assistive Technology when the label text is not\n * readable.\n */\n 'aria-label': __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string,\n\n /**\n * Specify whether the Component should contain a close button\n */\n closeButton: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,\n\n /**\n * A Callback fired when the close button is clicked. If used directly inside\n * a Modal component, the onHide will automatically be propagated up to the\n * parent Modal `onHide`.\n */\n onHide: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func\n};\n\nvar defaultProps = {\n 'aria-label': 'Close',\n closeButton: false\n};\n\nvar contextTypes = {\n $bs_modal: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.shape({\n onHide: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func\n })\n};\n\nvar ModalHeader = function (_React$Component) {\n __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default()(ModalHeader, _React$Component);\n\n function ModalHeader() {\n __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default()(this, ModalHeader);\n\n return __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.apply(this, arguments));\n }\n\n ModalHeader.prototype.render = function render() {\n var _props = this.props,\n label = _props['aria-label'],\n closeButton = _props.closeButton,\n onHide = _props.onHide,\n className = _props.className,\n children = _props.children,\n props = __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default()(_props, ['aria-label', 'closeButton', 'onHide', 'className', 'children']);\n\n var modal = this.context.$bs_modal;\n\n var _splitBsProps = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__[\"a\" /* splitBsProps */])(props),\n bsProps = _splitBsProps[0],\n elementProps = _splitBsProps[1];\n\n var classes = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__[\"b\" /* getClassSet */])(bsProps);\n\n return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(\n 'div',\n __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, elementProps, {\n className: __WEBPACK_IMPORTED_MODULE_5_classnames___default()(className, classes)\n }),\n closeButton && __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(\n 'button',\n {\n type: 'button',\n className: 'close',\n 'aria-label': label,\n onClick: __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__utils_createChainedFunction__[\"a\" /* default */])(modal && modal.onHide, onHide)\n },\n __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(\n 'span',\n { 'aria-hidden': 'true' },\n '\\xD7'\n )\n ),\n children\n );\n };\n\n return ModalHeader;\n}(__WEBPACK_IMPORTED_MODULE_6_react___default.a.Component);\n\nModalHeader.propTypes = propTypes;\nModalHeader.defaultProps = defaultProps;\nModalHeader.contextTypes = contextTypes;\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__[\"c\" /* bsClass */])('modal-header', ModalHeader));\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/ModalHeader.js\n// module id = 502\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/ModalHeader.js?", + ); + + /***/ + }, + /* 503 */ + /* exports provided: default */ + /* exports used: default */ + /*!********************************************!*\ + !*** ./~/react-bootstrap/es/ModalTitle.js ***! + \********************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ 9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ 7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react_prop_types_lib_elementType__ = __webpack_require__(/*! react-prop-types/lib/elementType */ 18);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react_prop_types_lib_elementType___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_react_prop_types_lib_elementType__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__ = __webpack_require__(/*! ./utils/bootstrapUtils */ 10);\n\n\n\n\n\n\n\n\n\n\n\nvar propTypes = {\n componentClass: __WEBPACK_IMPORTED_MODULE_7_react_prop_types_lib_elementType___default.a\n};\n\nvar defaultProps = {\n componentClass: \'h4\'\n};\n\nvar ModalTitle = function (_React$Component) {\n __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default()(ModalTitle, _React$Component);\n\n function ModalTitle() {\n __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default()(this, ModalTitle);\n\n return __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.apply(this, arguments));\n }\n\n ModalTitle.prototype.render = function render() {\n var _props = this.props,\n Component = _props.componentClass,\n className = _props.className,\n props = __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default()(_props, [\'componentClass\', \'className\']);\n\n var _splitBsProps = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__["a" /* splitBsProps */])(props),\n bsProps = _splitBsProps[0],\n elementProps = _splitBsProps[1];\n\n var classes = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__["b" /* getClassSet */])(bsProps);\n\n return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(Component, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, elementProps, {\n className: __WEBPACK_IMPORTED_MODULE_5_classnames___default()(className, classes)\n }));\n };\n\n return ModalTitle;\n}(__WEBPACK_IMPORTED_MODULE_6_react___default.a.Component);\n\nModalTitle.propTypes = propTypes;\nModalTitle.defaultProps = defaultProps;\n\n/* harmony default export */ __webpack_exports__["a"] = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__["c" /* bsClass */])(\'modal-title\', ModalTitle));\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/ModalTitle.js\n// module id = 503\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/ModalTitle.js?', + ); + + /***/ + }, + /* 504 */ + /* exports provided: default */ + /* exports used: default */ + /*!*************************************!*\ + !*** ./~/react-bootstrap/es/Nav.js ***! + \*************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ 9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ 7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_keycode__ = __webpack_require__(/*! keycode */ 219);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_keycode___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_keycode__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_react_dom__ = __webpack_require__(/*! react-dom */ 16);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_react_dom___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_react_dom__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_react_prop_types_lib_all__ = __webpack_require__(/*! react-prop-types/lib/all */ 174);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_react_prop_types_lib_all___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_10_react_prop_types_lib_all__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11_warning__ = __webpack_require__(/*! warning */ 23);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_11_warning__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__utils_bootstrapUtils__ = __webpack_require__(/*! ./utils/bootstrapUtils */ 10);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__utils_createChainedFunction__ = __webpack_require__(/*! ./utils/createChainedFunction */ 28);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__utils_ValidComponentChildren__ = __webpack_require__(/*! ./utils/ValidComponentChildren */ 34);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n// TODO: Should we expose `<NavItem>` as `<Nav.Item>`?\n\n// TODO: This `bsStyle` is very unlike the others. Should we rename it?\n\n// TODO: `pullRight` and `pullLeft` don't render right outside of `navbar`.\n// Consider renaming or replacing them.\n\nvar propTypes = {\n /**\n * Marks the NavItem with a matching `eventKey` as active. Has a\n * higher precedence over `activeHref`.\n */\n activeKey: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.any,\n\n /**\n * Marks the child NavItem with a matching `href` prop as active.\n */\n activeHref: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.string,\n\n /**\n * NavItems are be positioned vertically.\n */\n stacked: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.bool,\n\n justified: __WEBPACK_IMPORTED_MODULE_10_react_prop_types_lib_all___default()(__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.bool, function (_ref) {\n var justified = _ref.justified,\n navbar = _ref.navbar;\n return justified && navbar ? Error('justified navbar `Nav`s are not supported') : null;\n }),\n\n /**\n * A callback fired when a NavItem is selected.\n *\n * ```js\n * function (\n * \tAny eventKey,\n * \tSyntheticEvent event?\n * )\n * ```\n */\n onSelect: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.func,\n\n /**\n * ARIA role for the Nav, in the context of a TabContainer, the default will\n * be set to \"tablist\", but can be overridden by the Nav when set explicitly.\n *\n * When the role is set to \"tablist\" NavItem focus is managed according to\n * the ARIA authoring practices for tabs:\n * https://www.w3.org/TR/2013/WD-wai-aria-practices-20130307/#tabpanel\n */\n role: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.string,\n\n /**\n * Apply styling an alignment for use in a Navbar. This prop will be set\n * automatically when the Nav is used inside a Navbar.\n */\n navbar: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.bool,\n\n /**\n * Float the Nav to the right. When `navbar` is `true` the appropriate\n * contextual classes are added as well.\n */\n pullRight: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.bool,\n\n /**\n * Float the Nav to the left. When `navbar` is `true` the appropriate\n * contextual classes are added as well.\n */\n pullLeft: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.bool\n};\n\nvar defaultProps = {\n justified: false,\n pullRight: false,\n pullLeft: false,\n stacked: false\n};\n\nvar contextTypes = {\n $bs_navbar: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.shape({\n bsClass: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.string,\n onSelect: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.func\n }),\n\n $bs_tabContainer: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.shape({\n activeKey: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.any,\n onSelect: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.func.isRequired,\n getTabId: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.func.isRequired,\n getPaneId: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.func.isRequired\n })\n};\n\nvar Nav = function (_React$Component) {\n __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default()(Nav, _React$Component);\n\n function Nav() {\n __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default()(this, Nav);\n\n return __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.apply(this, arguments));\n }\n\n Nav.prototype.componentDidUpdate = function componentDidUpdate() {\n var _this2 = this;\n\n if (!this._needsRefocus) {\n return;\n }\n\n this._needsRefocus = false;\n\n var children = this.props.children;\n\n var _getActiveProps = this.getActiveProps(),\n activeKey = _getActiveProps.activeKey,\n activeHref = _getActiveProps.activeHref;\n\n var activeChild = __WEBPACK_IMPORTED_MODULE_14__utils_ValidComponentChildren__[\"a\" /* default */].find(children, function (child) {\n return _this2.isActive(child, activeKey, activeHref);\n });\n\n var childrenArray = __WEBPACK_IMPORTED_MODULE_14__utils_ValidComponentChildren__[\"a\" /* default */].toArray(children);\n var activeChildIndex = childrenArray.indexOf(activeChild);\n\n var childNodes = __WEBPACK_IMPORTED_MODULE_9_react_dom___default.a.findDOMNode(this).children;\n var activeNode = childNodes && childNodes[activeChildIndex];\n\n if (!activeNode || !activeNode.firstChild) {\n return;\n }\n\n activeNode.firstChild.focus();\n };\n\n Nav.prototype.handleTabKeyDown = function handleTabKeyDown(onSelect, event) {\n var nextActiveChild = void 0;\n\n switch (event.keyCode) {\n case __WEBPACK_IMPORTED_MODULE_6_keycode___default.a.codes.left:\n case __WEBPACK_IMPORTED_MODULE_6_keycode___default.a.codes.up:\n nextActiveChild = this.getNextActiveChild(-1);\n break;\n case __WEBPACK_IMPORTED_MODULE_6_keycode___default.a.codes.right:\n case __WEBPACK_IMPORTED_MODULE_6_keycode___default.a.codes.down:\n nextActiveChild = this.getNextActiveChild(1);\n break;\n default:\n // It was a different key; don't handle this keypress.\n return;\n }\n\n event.preventDefault();\n\n if (onSelect && nextActiveChild && nextActiveChild.props.eventKey != null) {\n onSelect(nextActiveChild.props.eventKey);\n }\n\n this._needsRefocus = true;\n };\n\n Nav.prototype.getNextActiveChild = function getNextActiveChild(offset) {\n var _this3 = this;\n\n var children = this.props.children;\n\n var validChildren = children.filter(function (child) {\n return child.props.eventKey != null && !child.props.disabled;\n });\n\n var _getActiveProps2 = this.getActiveProps(),\n activeKey = _getActiveProps2.activeKey,\n activeHref = _getActiveProps2.activeHref;\n\n var activeChild = __WEBPACK_IMPORTED_MODULE_14__utils_ValidComponentChildren__[\"a\" /* default */].find(children, function (child) {\n return _this3.isActive(child, activeKey, activeHref);\n });\n\n // This assumes the active child is not disabled.\n var activeChildIndex = validChildren.indexOf(activeChild);\n if (activeChildIndex === -1) {\n // Something has gone wrong. Select the first valid child we can find.\n return validChildren[0];\n }\n\n var nextIndex = activeChildIndex + offset;\n var numValidChildren = validChildren.length;\n\n if (nextIndex >= numValidChildren) {\n nextIndex = 0;\n } else if (nextIndex < 0) {\n nextIndex = numValidChildren - 1;\n }\n\n return validChildren[nextIndex];\n };\n\n Nav.prototype.getActiveProps = function getActiveProps() {\n var tabContainer = this.context.$bs_tabContainer;\n\n if (tabContainer) {\n true ? __WEBPACK_IMPORTED_MODULE_11_warning___default()(this.props.activeKey == null && !this.props.activeHref, 'Specifying a `<Nav>` `activeKey` or `activeHref` in the context of ' + 'a `<TabContainer>` is not supported. Instead use `<TabContainer ' + ('activeKey={' + this.props.activeKey + '} />`.')) : void 0;\n\n return tabContainer;\n }\n\n return this.props;\n };\n\n Nav.prototype.isActive = function isActive(_ref2, activeKey, activeHref) {\n var props = _ref2.props;\n\n if (props.active || activeKey != null && props.eventKey === activeKey || activeHref && props.href === activeHref) {\n return true;\n }\n\n return props.active;\n };\n\n Nav.prototype.getTabProps = function getTabProps(child, tabContainer, navRole, active, onSelect) {\n var _this4 = this;\n\n if (!tabContainer && navRole !== 'tablist') {\n // No tab props here.\n return null;\n }\n\n var _child$props = child.props,\n id = _child$props.id,\n controls = _child$props['aria-controls'],\n eventKey = _child$props.eventKey,\n role = _child$props.role,\n onKeyDown = _child$props.onKeyDown,\n tabIndex = _child$props.tabIndex;\n\n\n if (tabContainer) {\n true ? __WEBPACK_IMPORTED_MODULE_11_warning___default()(!id && !controls, 'In the context of a `<TabContainer>`, `<NavItem>`s are given ' + 'generated `id` and `aria-controls` attributes for the sake of ' + 'proper component accessibility. Any provided ones will be ignored. ' + 'To control these attributes directly, provide a `generateChildId` ' + 'prop to the parent `<TabContainer>`.') : void 0;\n\n id = tabContainer.getTabId(eventKey);\n controls = tabContainer.getPaneId(eventKey);\n }\n\n if (navRole === 'tablist') {\n role = role || 'tab';\n onKeyDown = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_13__utils_createChainedFunction__[\"a\" /* default */])(function (event) {\n return _this4.handleTabKeyDown(onSelect, event);\n }, onKeyDown);\n tabIndex = active ? tabIndex : -1;\n }\n\n return {\n id: id,\n role: role,\n onKeyDown: onKeyDown,\n 'aria-controls': controls,\n tabIndex: tabIndex\n };\n };\n\n Nav.prototype.render = function render() {\n var _extends2,\n _this5 = this;\n\n var _props = this.props,\n stacked = _props.stacked,\n justified = _props.justified,\n onSelect = _props.onSelect,\n propsRole = _props.role,\n propsNavbar = _props.navbar,\n pullRight = _props.pullRight,\n pullLeft = _props.pullLeft,\n className = _props.className,\n children = _props.children,\n props = __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default()(_props, ['stacked', 'justified', 'onSelect', 'role', 'navbar', 'pullRight', 'pullLeft', 'className', 'children']);\n\n var tabContainer = this.context.$bs_tabContainer;\n var role = propsRole || (tabContainer ? 'tablist' : null);\n\n var _getActiveProps3 = this.getActiveProps(),\n activeKey = _getActiveProps3.activeKey,\n activeHref = _getActiveProps3.activeHref;\n\n delete props.activeKey; // Accessed via this.getActiveProps().\n delete props.activeHref; // Accessed via this.getActiveProps().\n\n var _splitBsProps = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_12__utils_bootstrapUtils__[\"a\" /* splitBsProps */])(props),\n bsProps = _splitBsProps[0],\n elementProps = _splitBsProps[1];\n\n var classes = __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_12__utils_bootstrapUtils__[\"b\" /* getClassSet */])(bsProps), (_extends2 = {}, _extends2[__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_12__utils_bootstrapUtils__[\"e\" /* prefix */])(bsProps, 'stacked')] = stacked, _extends2[__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_12__utils_bootstrapUtils__[\"e\" /* prefix */])(bsProps, 'justified')] = justified, _extends2));\n\n var navbar = propsNavbar != null ? propsNavbar : this.context.$bs_navbar;\n var pullLeftClassName = void 0;\n var pullRightClassName = void 0;\n\n if (navbar) {\n var navbarProps = this.context.$bs_navbar || { bsClass: 'navbar' };\n\n classes[__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_12__utils_bootstrapUtils__[\"e\" /* prefix */])(navbarProps, 'nav')] = true;\n\n pullRightClassName = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_12__utils_bootstrapUtils__[\"e\" /* prefix */])(navbarProps, 'right');\n pullLeftClassName = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_12__utils_bootstrapUtils__[\"e\" /* prefix */])(navbarProps, 'left');\n } else {\n pullRightClassName = 'pull-right';\n pullLeftClassName = 'pull-left';\n }\n\n classes[pullRightClassName] = pullRight;\n classes[pullLeftClassName] = pullLeft;\n\n return __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement(\n 'ul',\n __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, elementProps, {\n role: role,\n className: __WEBPACK_IMPORTED_MODULE_5_classnames___default()(className, classes)\n }),\n __WEBPACK_IMPORTED_MODULE_14__utils_ValidComponentChildren__[\"a\" /* default */].map(children, function (child) {\n var active = _this5.isActive(child, activeKey, activeHref);\n var childOnSelect = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_13__utils_createChainedFunction__[\"a\" /* default */])(child.props.onSelect, onSelect, navbar && navbar.onSelect, tabContainer && tabContainer.onSelect);\n\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_7_react__[\"cloneElement\"])(child, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, _this5.getTabProps(child, tabContainer, role, active, childOnSelect), {\n active: active,\n activeKey: activeKey,\n activeHref: activeHref,\n onSelect: childOnSelect\n }));\n })\n );\n };\n\n return Nav;\n}(__WEBPACK_IMPORTED_MODULE_7_react___default.a.Component);\n\nNav.propTypes = propTypes;\nNav.defaultProps = defaultProps;\nNav.contextTypes = contextTypes;\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_12__utils_bootstrapUtils__[\"c\" /* bsClass */])('nav', __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_12__utils_bootstrapUtils__[\"g\" /* bsStyles */])(['tabs', 'pills'], Nav)));\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/Nav.js\n// module id = 504\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/Nav.js?", + ); + + /***/ + }, + /* 505 */ + /* exports provided: default */ + /* exports used: default */ + /*!*****************************************!*\ + !*** ./~/react-bootstrap/es/NavItem.js ***! + \*****************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ 9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ 7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__SafeAnchor__ = __webpack_require__(/*! ./SafeAnchor */ 54);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__utils_createChainedFunction__ = __webpack_require__(/*! ./utils/createChainedFunction */ 28);\n\n\n\n\n\n\n\n\n\n\n\n\nvar propTypes = {\n active: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,\n disabled: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,\n role: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string,\n href: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string,\n onClick: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func,\n onSelect: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func,\n eventKey: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.any\n};\n\nvar defaultProps = {\n active: false,\n disabled: false\n};\n\nvar NavItem = function (_React$Component) {\n __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default()(NavItem, _React$Component);\n\n function NavItem(props, context) {\n __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default()(this, NavItem);\n\n var _this = __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.call(this, props, context));\n\n _this.handleClick = _this.handleClick.bind(_this);\n return _this;\n }\n\n NavItem.prototype.handleClick = function handleClick(e) {\n if (this.props.onSelect) {\n e.preventDefault();\n\n if (!this.props.disabled) {\n this.props.onSelect(this.props.eventKey, e);\n }\n }\n };\n\n NavItem.prototype.render = function render() {\n var _props = this.props,\n active = _props.active,\n disabled = _props.disabled,\n onClick = _props.onClick,\n className = _props.className,\n style = _props.style,\n props = __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default()(_props, ['active', 'disabled', 'onClick', 'className', 'style']);\n\n delete props.onSelect;\n delete props.eventKey;\n\n // These are injected down by `<Nav>` for building `<SubNav>`s.\n delete props.activeKey;\n delete props.activeHref;\n\n if (!props.role) {\n if (props.href === '#') {\n props.role = 'button';\n }\n } else if (props.role === 'tab') {\n props['aria-selected'] = active;\n }\n\n return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(\n 'li',\n {\n role: 'presentation',\n className: __WEBPACK_IMPORTED_MODULE_5_classnames___default()(className, { active: active, disabled: disabled }),\n style: style\n },\n __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_8__SafeAnchor__[\"a\" /* default */], __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, props, {\n disabled: disabled,\n onClick: __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__utils_createChainedFunction__[\"a\" /* default */])(onClick, this.handleClick)\n }))\n );\n };\n\n return NavItem;\n}(__WEBPACK_IMPORTED_MODULE_6_react___default.a.Component);\n\nNavItem.propTypes = propTypes;\nNavItem.defaultProps = defaultProps;\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (NavItem);\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/NavItem.js\n// module id = 505\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/NavItem.js?", + ); + + /***/ + }, + /* 506 */ + /* exports provided: default */ + /* exports used: default */ + /*!*********************************************!*\ + !*** ./~/react-bootstrap/es/NavbarBrand.js ***! + \*********************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ 9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ 7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__ = __webpack_require__(/*! ./utils/bootstrapUtils */ 10);\n\n\n\n\n\n\n\n\n\n\n\nvar contextTypes = {\n $bs_navbar: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.shape({\n bsClass: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string\n })\n};\n\nvar NavbarBrand = function (_React$Component) {\n __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default()(NavbarBrand, _React$Component);\n\n function NavbarBrand() {\n __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default()(this, NavbarBrand);\n\n return __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.apply(this, arguments));\n }\n\n NavbarBrand.prototype.render = function render() {\n var _props = this.props,\n className = _props.className,\n children = _props.children,\n props = __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default()(_props, ['className', 'children']);\n\n var navbarProps = this.context.$bs_navbar || { bsClass: 'navbar' };\n\n var bsClassName = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__[\"e\" /* prefix */])(navbarProps, 'brand');\n\n if (__WEBPACK_IMPORTED_MODULE_6_react___default.a.isValidElement(children)) {\n return __WEBPACK_IMPORTED_MODULE_6_react___default.a.cloneElement(children, {\n className: __WEBPACK_IMPORTED_MODULE_5_classnames___default()(children.props.className, className, bsClassName)\n });\n }\n\n return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(\n 'span',\n __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, props, { className: __WEBPACK_IMPORTED_MODULE_5_classnames___default()(className, bsClassName) }),\n children\n );\n };\n\n return NavbarBrand;\n}(__WEBPACK_IMPORTED_MODULE_6_react___default.a.Component);\n\nNavbarBrand.contextTypes = contextTypes;\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (NavbarBrand);\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/NavbarBrand.js\n// module id = 506\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/NavbarBrand.js?", + ); + + /***/ + }, + /* 507 */ + /* exports provided: default */ + /* exports used: default */ + /*!*****************************************!*\ + !*** ./~/react-bootstrap/es/Overlay.js ***! + \*****************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ 9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_objectWithoutProperties__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ 7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_extends__ = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_extends__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_react_overlays_lib_Overlay__ = __webpack_require__(/*! react-overlays/lib/Overlay */ 1434);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_react_overlays_lib_Overlay___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_react_overlays_lib_Overlay__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_react_prop_types_lib_elementType__ = __webpack_require__(/*! react-prop-types/lib/elementType */ 18);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_react_prop_types_lib_elementType___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_react_prop_types_lib_elementType__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__Fade__ = __webpack_require__(/*! ./Fade */ 166);\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar propTypes = __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_extends___default()({}, __WEBPACK_IMPORTED_MODULE_8_react_overlays_lib_Overlay___default.a.propTypes, {\n\n /**\n * Set the visibility of the Overlay\n */\n show: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,\n /**\n * Specify whether the overlay should trigger onHide when the user clicks outside the overlay\n */\n rootClose: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,\n /**\n * A callback invoked by the overlay when it wishes to be hidden. Required if\n * `rootClose` is specified.\n */\n onHide: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func,\n\n /**\n * Use animation\n */\n animation: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool, __WEBPACK_IMPORTED_MODULE_9_react_prop_types_lib_elementType___default.a]),\n\n /**\n * Callback fired before the Overlay transitions in\n */\n onEnter: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func,\n\n /**\n * Callback fired as the Overlay begins to transition in\n */\n onEntering: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func,\n\n /**\n * Callback fired after the Overlay finishes transitioning in\n */\n onEntered: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func,\n\n /**\n * Callback fired right before the Overlay transitions out\n */\n onExit: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func,\n\n /**\n * Callback fired as the Overlay begins to transition out\n */\n onExiting: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func,\n\n /**\n * Callback fired after the Overlay finishes transitioning out\n */\n onExited: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func,\n\n /**\n * Sets the direction of the Overlay.\n */\n placement: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.oneOf(['top', 'right', 'bottom', 'left'])\n});\n\nvar defaultProps = {\n animation: __WEBPACK_IMPORTED_MODULE_10__Fade__[\"a\" /* default */],\n rootClose: false,\n show: false,\n placement: 'right'\n};\n\nvar Overlay = function (_React$Component) {\n __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits___default()(Overlay, _React$Component);\n\n function Overlay() {\n __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck___default()(this, Overlay);\n\n return __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.apply(this, arguments));\n }\n\n Overlay.prototype.render = function render() {\n var _props = this.props,\n animation = _props.animation,\n children = _props.children,\n props = __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_objectWithoutProperties___default()(_props, ['animation', 'children']);\n\n var transition = animation === true ? __WEBPACK_IMPORTED_MODULE_10__Fade__[\"a\" /* default */] : animation || null;\n\n var child = void 0;\n\n if (!transition) {\n child = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6_react__[\"cloneElement\"])(children, {\n className: __WEBPACK_IMPORTED_MODULE_5_classnames___default()(children.props.className, 'in')\n });\n } else {\n child = children;\n }\n\n return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_8_react_overlays_lib_Overlay___default.a,\n __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_extends___default()({}, props, {\n transition: transition\n }),\n child\n );\n };\n\n return Overlay;\n}(__WEBPACK_IMPORTED_MODULE_6_react___default.a.Component);\n\nOverlay.propTypes = propTypes;\nOverlay.defaultProps = defaultProps;\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Overlay);\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/Overlay.js\n// module id = 507\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/Overlay.js?", + ); + + /***/ + }, + /* 508 */ + /* exports provided: default */ + /* exports used: default */ + /*!*******************************************!*\ + !*** ./~/react-bootstrap/es/PagerItem.js ***! + \*******************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ 9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ 7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__SafeAnchor__ = __webpack_require__(/*! ./SafeAnchor */ 54);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__utils_createChainedFunction__ = __webpack_require__(/*! ./utils/createChainedFunction */ 28);\n\n\n\n\n\n\n\n\n\n\n\n\nvar propTypes = {\n disabled: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,\n previous: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,\n next: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,\n onClick: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func,\n onSelect: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func,\n eventKey: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.any\n};\n\nvar defaultProps = {\n disabled: false,\n previous: false,\n next: false\n};\n\nvar PagerItem = function (_React$Component) {\n __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default()(PagerItem, _React$Component);\n\n function PagerItem(props, context) {\n __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default()(this, PagerItem);\n\n var _this = __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.call(this, props, context));\n\n _this.handleSelect = _this.handleSelect.bind(_this);\n return _this;\n }\n\n PagerItem.prototype.handleSelect = function handleSelect(e) {\n var _props = this.props,\n disabled = _props.disabled,\n onSelect = _props.onSelect,\n eventKey = _props.eventKey;\n\n\n if (onSelect || disabled) {\n e.preventDefault();\n }\n\n if (disabled) {\n return;\n }\n\n if (onSelect) {\n onSelect(eventKey, e);\n }\n };\n\n PagerItem.prototype.render = function render() {\n var _props2 = this.props,\n disabled = _props2.disabled,\n previous = _props2.previous,\n next = _props2.next,\n onClick = _props2.onClick,\n className = _props2.className,\n style = _props2.style,\n props = __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default()(_props2, ['disabled', 'previous', 'next', 'onClick', 'className', 'style']);\n\n delete props.onSelect;\n delete props.eventKey;\n\n return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(\n 'li',\n {\n className: __WEBPACK_IMPORTED_MODULE_5_classnames___default()(className, { disabled: disabled, previous: previous, next: next }),\n style: style\n },\n __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_8__SafeAnchor__[\"a\" /* default */], __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, props, {\n disabled: disabled,\n onClick: __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__utils_createChainedFunction__[\"a\" /* default */])(onClick, this.handleSelect)\n }))\n );\n };\n\n return PagerItem;\n}(__WEBPACK_IMPORTED_MODULE_6_react___default.a.Component);\n\nPagerItem.propTypes = propTypes;\nPagerItem.defaultProps = defaultProps;\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (PagerItem);\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/PagerItem.js\n// module id = 508\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/PagerItem.js?", + ); + + /***/ + }, + /* 509 */ + /* exports provided: default */ + /* exports used: default */ + /*!**************************************************!*\ + !*** ./~/react-bootstrap/es/PaginationButton.js ***! + \**************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ 9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ 7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_react_prop_types_lib_elementType__ = __webpack_require__(/*! react-prop-types/lib/elementType */ 18);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_react_prop_types_lib_elementType___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_react_prop_types_lib_elementType__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__SafeAnchor__ = __webpack_require__(/*! ./SafeAnchor */ 54);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__utils_createChainedFunction__ = __webpack_require__(/*! ./utils/createChainedFunction */ 28);\n\n\n\n\n\n\n\n\n\n\n\n\n\n// TODO: This should be `<Pagination.Item>`.\n\n// TODO: This should use `componentClass` like other components.\n\nvar propTypes = {\n componentClass: __WEBPACK_IMPORTED_MODULE_8_react_prop_types_lib_elementType___default.a,\n className: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string,\n eventKey: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.any,\n onSelect: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func,\n disabled: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,\n active: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,\n onClick: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func\n};\n\nvar defaultProps = {\n componentClass: __WEBPACK_IMPORTED_MODULE_9__SafeAnchor__[\"a\" /* default */],\n active: false,\n disabled: false\n};\n\nvar PaginationButton = function (_React$Component) {\n __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default()(PaginationButton, _React$Component);\n\n function PaginationButton(props, context) {\n __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default()(this, PaginationButton);\n\n var _this = __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.call(this, props, context));\n\n _this.handleClick = _this.handleClick.bind(_this);\n return _this;\n }\n\n PaginationButton.prototype.handleClick = function handleClick(event) {\n var _props = this.props,\n disabled = _props.disabled,\n onSelect = _props.onSelect,\n eventKey = _props.eventKey;\n\n\n if (disabled) {\n return;\n }\n\n if (onSelect) {\n onSelect(eventKey, event);\n }\n };\n\n PaginationButton.prototype.render = function render() {\n var _props2 = this.props,\n Component = _props2.componentClass,\n active = _props2.active,\n disabled = _props2.disabled,\n onClick = _props2.onClick,\n className = _props2.className,\n style = _props2.style,\n props = __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default()(_props2, ['componentClass', 'active', 'disabled', 'onClick', 'className', 'style']);\n\n if (Component === __WEBPACK_IMPORTED_MODULE_9__SafeAnchor__[\"a\" /* default */]) {\n // Assume that custom components want `eventKey`.\n delete props.eventKey;\n }\n\n delete props.onSelect;\n\n return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(\n 'li',\n {\n className: __WEBPACK_IMPORTED_MODULE_5_classnames___default()(className, { active: active, disabled: disabled }),\n style: style\n },\n __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(Component, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, props, {\n disabled: disabled,\n onClick: __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_10__utils_createChainedFunction__[\"a\" /* default */])(onClick, this.handleClick)\n }))\n );\n };\n\n return PaginationButton;\n}(__WEBPACK_IMPORTED_MODULE_6_react___default.a.Component);\n\nPaginationButton.propTypes = propTypes;\nPaginationButton.defaultProps = defaultProps;\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (PaginationButton);\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/PaginationButton.js\n// module id = 509\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/PaginationButton.js?", + ); + + /***/ + }, + /* 510 */ + /* exports provided: default */ + /* exports used: default */ + /*!********************************************!*\ + !*** ./~/react-bootstrap/es/PanelGroup.js ***! + \********************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_core_js_object_assign__ = __webpack_require__(/*! babel-runtime/core-js/object/assign */ 147);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_core_js_object_assign___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_core_js_object_assign__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ 9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_objectWithoutProperties__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_classCallCheck__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_classCallCheck__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ 7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__ = __webpack_require__(/*! ./utils/bootstrapUtils */ 10);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__utils_createChainedFunction__ = __webpack_require__(/*! ./utils/createChainedFunction */ 28);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__utils_ValidComponentChildren__ = __webpack_require__(/*! ./utils/ValidComponentChildren */ 34);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar propTypes = {\n accordion: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.bool,\n activeKey: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.any,\n defaultActiveKey: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.any,\n onSelect: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.func,\n role: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.string\n};\n\nvar defaultProps = {\n accordion: false\n};\n\n// TODO: Use uncontrollable.\n\nvar PanelGroup = function (_React$Component) {\n __WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits___default()(PanelGroup, _React$Component);\n\n function PanelGroup(props, context) {\n __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_classCallCheck___default()(this, PanelGroup);\n\n var _this = __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.call(this, props, context));\n\n _this.handleSelect = _this.handleSelect.bind(_this);\n\n _this.state = {\n activeKey: props.defaultActiveKey\n };\n return _this;\n }\n\n PanelGroup.prototype.handleSelect = function handleSelect(key, e) {\n e.preventDefault();\n\n if (this.props.onSelect) {\n this.props.onSelect(key, e);\n }\n\n if (this.state.activeKey === key) {\n key = null;\n }\n\n this.setState({ activeKey: key });\n };\n\n PanelGroup.prototype.render = function render() {\n var _this2 = this;\n\n var _props = this.props,\n accordion = _props.accordion,\n propsActiveKey = _props.activeKey,\n className = _props.className,\n children = _props.children,\n props = __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_objectWithoutProperties___default()(_props, ['accordion', 'activeKey', 'className', 'children']);\n\n var _splitBsPropsAndOmit = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__[\"f\" /* splitBsPropsAndOmit */])(props, ['defaultActiveKey', 'onSelect']),\n bsProps = _splitBsPropsAndOmit[0],\n elementProps = _splitBsPropsAndOmit[1];\n\n var activeKey = void 0;\n if (accordion) {\n activeKey = propsActiveKey != null ? propsActiveKey : this.state.activeKey;\n elementProps.role = elementProps.role || 'tablist';\n }\n\n var classes = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__[\"b\" /* getClassSet */])(bsProps);\n\n return __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement(\n 'div',\n __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, elementProps, {\n className: __WEBPACK_IMPORTED_MODULE_6_classnames___default()(className, classes)\n }),\n __WEBPACK_IMPORTED_MODULE_11__utils_ValidComponentChildren__[\"a\" /* default */].map(children, function (child) {\n var childProps = {\n bsStyle: child.props.bsStyle || bsProps.bsStyle\n };\n\n if (accordion) {\n __WEBPACK_IMPORTED_MODULE_1_babel_runtime_core_js_object_assign___default()(childProps, {\n headerRole: 'tab',\n panelRole: 'tabpanel',\n collapsible: true,\n expanded: child.props.eventKey === activeKey,\n onSelect: __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_10__utils_createChainedFunction__[\"a\" /* default */])(_this2.handleSelect, child.props.onSelect)\n });\n }\n\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_7_react__[\"cloneElement\"])(child, childProps);\n })\n );\n };\n\n return PanelGroup;\n}(__WEBPACK_IMPORTED_MODULE_7_react___default.a.Component);\n\nPanelGroup.propTypes = propTypes;\nPanelGroup.defaultProps = defaultProps;\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__[\"c\" /* bsClass */])('panel-group', PanelGroup));\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/PanelGroup.js\n// module id = 510\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/PanelGroup.js?", + ); + + /***/ + }, + /* 511 */ + /* exports provided: default */ + /* exports used: default */ + /*!*****************************************!*\ + !*** ./~/react-bootstrap/es/TabPane.js ***! + \*****************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ 9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ 7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_react_prop_types_lib_elementType__ = __webpack_require__(/*! react-prop-types/lib/elementType */ 18);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_react_prop_types_lib_elementType___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_react_prop_types_lib_elementType__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_warning__ = __webpack_require__(/*! warning */ 23);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_warning__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__utils_bootstrapUtils__ = __webpack_require__(/*! ./utils/bootstrapUtils */ 10);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__utils_createChainedFunction__ = __webpack_require__(/*! ./utils/createChainedFunction */ 28);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__Fade__ = __webpack_require__(/*! ./Fade */ 166);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar propTypes = {\n /**\n * Uniquely identify the `<TabPane>` among its siblings.\n */\n eventKey: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.any,\n\n /**\n * Use animation when showing or hiding `<TabPane>`s. Use `false` to disable,\n * `true` to enable the default `<Fade>` animation or any `<Transition>`\n * component.\n */\n animation: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool, __WEBPACK_IMPORTED_MODULE_8_react_prop_types_lib_elementType___default.a]),\n\n /** @private **/\n id: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string,\n\n /** @private **/\n 'aria-labelledby': __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string,\n\n /**\n * If not explicitly specified and rendered in the context of a\n * `<TabContent>`, the `bsClass` of the `<TabContent>` suffixed by `-pane`.\n * If otherwise not explicitly specified, `tab-pane`.\n */\n bsClass: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string,\n\n /**\n * Transition onEnter callback when animation is not `false`\n */\n onEnter: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func,\n\n /**\n * Transition onEntering callback when animation is not `false`\n */\n onEntering: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func,\n\n /**\n * Transition onEntered callback when animation is not `false`\n */\n onEntered: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func,\n\n /**\n * Transition onExit callback when animation is not `false`\n */\n onExit: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func,\n\n /**\n * Transition onExiting callback when animation is not `false`\n */\n onExiting: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func,\n\n /**\n * Transition onExited callback when animation is not `false`\n */\n onExited: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func,\n\n /**\n * Wait until the first \"enter\" transition to mount the tab (add it to the DOM)\n */\n mountOnEnter: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,\n\n /**\n * Unmount the tab (remove it from the DOM) when it is no longer visible\n */\n unmountOnExit: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool\n};\n\nvar contextTypes = {\n $bs_tabContainer: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.shape({\n getTabId: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func,\n getPaneId: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func\n }),\n $bs_tabContent: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.shape({\n bsClass: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string,\n animation: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool, __WEBPACK_IMPORTED_MODULE_8_react_prop_types_lib_elementType___default.a]),\n activeKey: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.any,\n mountOnEnter: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,\n unmountOnExit: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,\n onPaneEnter: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func.isRequired,\n onPaneExited: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func.isRequired,\n exiting: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool.isRequired\n })\n};\n\n/**\n * We override the `<TabContainer>` context so `<Nav>`s in `<TabPane>`s don't\n * conflict with the top level one.\n */\nvar childContextTypes = {\n $bs_tabContainer: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.oneOf([null])\n};\n\nvar TabPane = function (_React$Component) {\n __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default()(TabPane, _React$Component);\n\n function TabPane(props, context) {\n __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default()(this, TabPane);\n\n var _this = __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.call(this, props, context));\n\n _this.handleEnter = _this.handleEnter.bind(_this);\n _this.handleExited = _this.handleExited.bind(_this);\n\n _this['in'] = false;\n return _this;\n }\n\n TabPane.prototype.getChildContext = function getChildContext() {\n return {\n $bs_tabContainer: null\n };\n };\n\n TabPane.prototype.componentDidMount = function componentDidMount() {\n if (this.shouldBeIn()) {\n // In lieu of the action event firing.\n this.handleEnter();\n }\n };\n\n TabPane.prototype.componentDidUpdate = function componentDidUpdate() {\n if (this['in']) {\n if (!this.shouldBeIn()) {\n // We shouldn't be active any more. Notify the parent.\n this.handleExited();\n }\n } else if (this.shouldBeIn()) {\n // We are the active child. Notify the parent.\n this.handleEnter();\n }\n };\n\n TabPane.prototype.componentWillUnmount = function componentWillUnmount() {\n if (this['in']) {\n // In lieu of the action event firing.\n this.handleExited();\n }\n };\n\n TabPane.prototype.handleEnter = function handleEnter() {\n var tabContent = this.context.$bs_tabContent;\n if (!tabContent) {\n return;\n }\n\n this['in'] = tabContent.onPaneEnter(this, this.props.eventKey);\n };\n\n TabPane.prototype.handleExited = function handleExited() {\n var tabContent = this.context.$bs_tabContent;\n if (!tabContent) {\n return;\n }\n\n tabContent.onPaneExited(this);\n this['in'] = false;\n };\n\n TabPane.prototype.getAnimation = function getAnimation() {\n if (this.props.animation != null) {\n return this.props.animation;\n }\n\n var tabContent = this.context.$bs_tabContent;\n return tabContent && tabContent.animation;\n };\n\n TabPane.prototype.isActive = function isActive() {\n var tabContent = this.context.$bs_tabContent;\n var activeKey = tabContent && tabContent.activeKey;\n\n return this.props.eventKey === activeKey;\n };\n\n TabPane.prototype.shouldBeIn = function shouldBeIn() {\n return this.getAnimation() && this.isActive();\n };\n\n TabPane.prototype.render = function render() {\n var _props = this.props,\n eventKey = _props.eventKey,\n className = _props.className,\n onEnter = _props.onEnter,\n onEntering = _props.onEntering,\n onEntered = _props.onEntered,\n onExit = _props.onExit,\n onExiting = _props.onExiting,\n onExited = _props.onExited,\n propsMountOnEnter = _props.mountOnEnter,\n propsUnmountOnExit = _props.unmountOnExit,\n props = __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default()(_props, ['eventKey', 'className', 'onEnter', 'onEntering', 'onEntered', 'onExit', 'onExiting', 'onExited', 'mountOnEnter', 'unmountOnExit']);\n\n var _context = this.context,\n tabContent = _context.$bs_tabContent,\n tabContainer = _context.$bs_tabContainer;\n\n var _splitBsPropsAndOmit = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_10__utils_bootstrapUtils__[\"f\" /* splitBsPropsAndOmit */])(props, ['animation']),\n bsProps = _splitBsPropsAndOmit[0],\n elementProps = _splitBsPropsAndOmit[1];\n\n var active = this.isActive();\n var animation = this.getAnimation();\n\n var mountOnEnter = propsMountOnEnter != null ? propsMountOnEnter : tabContent && tabContent.mountOnEnter;\n var unmountOnExit = propsUnmountOnExit != null ? propsUnmountOnExit : tabContent && tabContent.unmountOnExit;\n\n if (!active && !animation && unmountOnExit) {\n return null;\n }\n\n var Transition = animation === true ? __WEBPACK_IMPORTED_MODULE_12__Fade__[\"a\" /* default */] : animation || null;\n\n if (tabContent) {\n bsProps.bsClass = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_10__utils_bootstrapUtils__[\"e\" /* prefix */])(tabContent, 'pane');\n }\n\n var classes = __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_10__utils_bootstrapUtils__[\"b\" /* getClassSet */])(bsProps), {\n active: active\n });\n\n if (tabContainer) {\n true ? __WEBPACK_IMPORTED_MODULE_9_warning___default()(!elementProps.id && !elementProps['aria-labelledby'], 'In the context of a `<TabContainer>`, `<TabPanes>` are given ' + 'generated `id` and `aria-labelledby` attributes for the sake of ' + 'proper component accessibility. Any provided ones will be ignored. ' + 'To control these attributes directly provide a `generateChildId` ' + 'prop to the parent `<TabContainer>`.') : void 0;\n\n elementProps.id = tabContainer.getPaneId(eventKey);\n elementProps['aria-labelledby'] = tabContainer.getTabId(eventKey);\n }\n\n var pane = __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('div', __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, elementProps, {\n role: 'tabpanel',\n 'aria-hidden': !active,\n className: __WEBPACK_IMPORTED_MODULE_5_classnames___default()(className, classes)\n }));\n\n if (Transition) {\n var exiting = tabContent && tabContent.exiting;\n\n return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(\n Transition,\n {\n 'in': active && !exiting,\n onEnter: __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_11__utils_createChainedFunction__[\"a\" /* default */])(this.handleEnter, onEnter),\n onEntering: onEntering,\n onEntered: onEntered,\n onExit: onExit,\n onExiting: onExiting,\n onExited: __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_11__utils_createChainedFunction__[\"a\" /* default */])(this.handleExited, onExited),\n mountOnEnter: mountOnEnter,\n unmountOnExit: unmountOnExit\n },\n pane\n );\n }\n\n return pane;\n };\n\n return TabPane;\n}(__WEBPACK_IMPORTED_MODULE_6_react___default.a.Component);\n\nTabPane.propTypes = propTypes;\nTabPane.contextTypes = contextTypes;\nTabPane.childContextTypes = childContextTypes;\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_10__utils_bootstrapUtils__[\"c\" /* bsClass */])('tab-pane', TabPane));\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/TabPane.js\n// module id = 511\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/TabPane.js?", + ); + + /***/ + }, + /* 512 */ + /* exports provided: default */ + /* exports used: default */ + /*!**************************************************!*\ + !*** ./~/react-bootstrap/es/utils/capitalize.js ***! + \**************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony export (immutable) */ __webpack_exports__["a"] = capitalize;\nfunction capitalize(string) {\n return "" + string.charAt(0).toUpperCase() + string.slice(1);\n}\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/utils/capitalize.js\n// module id = 512\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/utils/capitalize.js?', + ); + + /***/ + }, + /* 513 */ + /* unknown exports provided */ + /* all exports used */ + /*!*****************************************************!*\ + !*** ./~/react-dates/lib/components/CalendarDay.js ***! + \*****************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "module.exports =\n/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n\n\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ function(module, exports, __webpack_require__) {\n\n\tvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\n\tvar _createClass = function () {\n\t function defineProperties(target, props) {\n\t for (var i = 0; i < props.length; i++) {\n\t 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);\n\t }\n\t }return function (Constructor, protoProps, staticProps) {\n\t if (protoProps) defineProperties(Constructor.prototype, protoProps);if (staticProps) defineProperties(Constructor, staticProps);return Constructor;\n\t };\n\t}();\n\n\texports.getModifiersForDay = getModifiersForDay;\n\n\tvar _react = __webpack_require__(1);\n\n\tvar _react2 = _interopRequireDefault(_react);\n\n\tvar _reactAddonsShallowCompare = __webpack_require__(2);\n\n\tvar _reactAddonsShallowCompare2 = _interopRequireDefault(_reactAddonsShallowCompare);\n\n\tvar _reactMomentProptypes = __webpack_require__(3);\n\n\tvar _reactMomentProptypes2 = _interopRequireDefault(_reactMomentProptypes);\n\n\tvar _moment = __webpack_require__(4);\n\n\tvar _moment2 = _interopRequireDefault(_moment);\n\n\tvar _classnames = __webpack_require__(5);\n\n\tvar _classnames2 = _interopRequireDefault(_classnames);\n\n\tfunction _interopRequireDefault(obj) {\n\t return obj && obj.__esModule ? obj : { 'default': 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 _possibleConstructorReturn(self, call) {\n\t if (!self) {\n\t throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n\t }return call && ((typeof call === \"undefined\" ? \"undefined\" : _typeof(call)) === \"object\" || typeof call === \"function\") ? call : self;\n\t}\n\n\tfunction _inherits(subClass, superClass) {\n\t if (typeof superClass !== \"function\" && superClass !== null) {\n\t throw new TypeError(\"Super expression must either be null or a function, not \" + (typeof superClass === \"undefined\" ? \"undefined\" : _typeof(superClass)));\n\t }subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n\t}\n\n\tvar propTypes = {\n\t day: _reactMomentProptypes2['default'].momentObj,\n\t isOutsideDay: _react.PropTypes.bool,\n\t modifiers: _react.PropTypes.object,\n\t onDayClick: _react.PropTypes.func,\n\t onDayMouseEnter: _react.PropTypes.func,\n\t onDayMouseLeave: _react.PropTypes.func,\n\t renderDay: _react.PropTypes.func\n\t};\n\n\tvar defaultProps = {\n\t day: (0, _moment2['default'])(),\n\t isOutsideDay: false,\n\t modifiers: {},\n\t onDayClick: function () {\n\t function onDayClick() {}\n\n\t return onDayClick;\n\t }(),\n\t onDayMouseEnter: function () {\n\t function onDayMouseEnter() {}\n\n\t return onDayMouseEnter;\n\t }(),\n\t onDayMouseLeave: function () {\n\t function onDayMouseLeave() {}\n\n\t return onDayMouseLeave;\n\t }(),\n\n\t renderDay: null\n\t};\n\n\tfunction getModifiersForDay(modifiers, day) {\n\t return day ? Object.keys(modifiers).filter(function (key) {\n\t return modifiers[key](day);\n\t }) : [];\n\t}\n\n\tvar CalendarDay = function (_React$Component) {\n\t _inherits(CalendarDay, _React$Component);\n\n\t function CalendarDay() {\n\t _classCallCheck(this, CalendarDay);\n\n\t return _possibleConstructorReturn(this, (CalendarDay.__proto__ || Object.getPrototypeOf(CalendarDay)).apply(this, arguments));\n\t }\n\n\t _createClass(CalendarDay, [{\n\t key: 'shouldComponentUpdate',\n\t value: function () {\n\t function shouldComponentUpdate(nextProps, nextState) {\n\t return (0, _reactAddonsShallowCompare2['default'])(this, nextProps, nextState);\n\t }\n\n\t return shouldComponentUpdate;\n\t }()\n\t }, {\n\t key: 'onDayClick',\n\t value: function () {\n\t function onDayClick(day, e) {\n\t var onDayClick = this.props.onDayClick;\n\n\t onDayClick(day, e);\n\t }\n\n\t return onDayClick;\n\t }()\n\t }, {\n\t key: 'onDayMouseEnter',\n\t value: function () {\n\t function onDayMouseEnter(day, e) {\n\t var onDayMouseEnter = this.props.onDayMouseEnter;\n\n\t onDayMouseEnter(day, e);\n\t }\n\n\t return onDayMouseEnter;\n\t }()\n\t }, {\n\t key: 'onDayMouseLeave',\n\t value: function () {\n\t function onDayMouseLeave(day, e) {\n\t var onDayMouseLeave = this.props.onDayMouseLeave;\n\n\t onDayMouseLeave(day, e);\n\t }\n\n\t return onDayMouseLeave;\n\t }()\n\t }, {\n\t key: 'render',\n\t value: function () {\n\t function render() {\n\t var _this2 = this;\n\n\t var _props = this.props;\n\t var day = _props.day;\n\t var isOutsideDay = _props.isOutsideDay;\n\t var modifiers = _props.modifiers;\n\t var renderDay = _props.renderDay;\n\n\t var className = (0, _classnames2['default'])('CalendarDay', {\n\t 'CalendarDay--outside': !day || isOutsideDay\n\t }, getModifiersForDay(modifiers, day).map(function (mod) {\n\t return 'CalendarDay--' + String(mod);\n\t }));\n\n\t return day ? _react2['default'].createElement('td', {\n\t className: className,\n\t onMouseEnter: function () {\n\t function onMouseEnter(e) {\n\t return _this2.onDayMouseEnter(day, e);\n\t }\n\n\t return onMouseEnter;\n\t }(),\n\t onMouseLeave: function () {\n\t function onMouseLeave(e) {\n\t return _this2.onDayMouseLeave(day, e);\n\t }\n\n\t return onMouseLeave;\n\t }(),\n\t onClick: function () {\n\t function onClick(e) {\n\t return _this2.onDayClick(day, e);\n\t }\n\n\t return onClick;\n\t }()\n\t }, renderDay ? renderDay(day) : day.format('D')) : _react2['default'].createElement('td', null);\n\t }\n\n\t return render;\n\t }()\n\t }]);\n\n\t return CalendarDay;\n\t}(_react2['default'].Component);\n\n\texports['default'] = CalendarDay;\n\n\tCalendarDay.propTypes = propTypes;\n\tCalendarDay.defaultProps = defaultProps;\n\n/***/ },\n/* 1 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! react */ 1);\n\n/***/ },\n/* 2 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! react-addons-shallow-compare */ 118);\n\n/***/ },\n/* 3 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! react-moment-proptypes */ 80);\n\n/***/ },\n/* 4 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! moment */ 3);\n\n/***/ },\n/* 5 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! classnames */ 2);\n\n/***/ }\n/******/ ]);\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dates/lib/components/CalendarDay.js\n// module id = 513\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dates/lib/components/CalendarDay.js?", + ); + + /***/ + }, + /* 514 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************************************!*\ + !*** ./~/react-dates/lib/components/CalendarMonth.js ***! + \*******************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "module.exports =\n/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n\n\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ function(module, exports, __webpack_require__) {\n\n\tvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\n\tvar _createClass = function () {\n\t function defineProperties(target, props) {\n\t for (var i = 0; i < props.length; i++) {\n\t 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);\n\t }\n\t }return function (Constructor, protoProps, staticProps) {\n\t if (protoProps) defineProperties(Constructor.prototype, protoProps);if (staticProps) defineProperties(Constructor, staticProps);return Constructor;\n\t };\n\t}();\n\n\tvar _react = __webpack_require__(1);\n\n\tvar _react2 = _interopRequireDefault(_react);\n\n\tvar _reactAddonsShallowCompare = __webpack_require__(2);\n\n\tvar _reactAddonsShallowCompare2 = _interopRequireDefault(_reactAddonsShallowCompare);\n\n\tvar _reactMomentProptypes = __webpack_require__(3);\n\n\tvar _reactMomentProptypes2 = _interopRequireDefault(_reactMomentProptypes);\n\n\tvar _moment = __webpack_require__(4);\n\n\tvar _moment2 = _interopRequireDefault(_moment);\n\n\tvar _classnames = __webpack_require__(5);\n\n\tvar _classnames2 = _interopRequireDefault(_classnames);\n\n\tvar _CalendarDay = __webpack_require__(6);\n\n\tvar _CalendarDay2 = _interopRequireDefault(_CalendarDay);\n\n\tvar _getCalendarMonthWeeks = __webpack_require__(7);\n\n\tvar _getCalendarMonthWeeks2 = _interopRequireDefault(_getCalendarMonthWeeks);\n\n\tvar _ScrollableOrientationShape = __webpack_require__(8);\n\n\tvar _ScrollableOrientationShape2 = _interopRequireDefault(_ScrollableOrientationShape);\n\n\tvar _constants = __webpack_require__(9);\n\n\tfunction _interopRequireDefault(obj) {\n\t return obj && obj.__esModule ? obj : { 'default': 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 _possibleConstructorReturn(self, call) {\n\t if (!self) {\n\t throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n\t }return call && ((typeof call === \"undefined\" ? \"undefined\" : _typeof(call)) === \"object\" || typeof call === \"function\") ? call : self;\n\t}\n\n\tfunction _inherits(subClass, superClass) {\n\t if (typeof superClass !== \"function\" && superClass !== null) {\n\t throw new TypeError(\"Super expression must either be null or a function, not \" + (typeof superClass === \"undefined\" ? \"undefined\" : _typeof(superClass)));\n\t }subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n\t} /* eslint react/no-array-index-key: 0 */\n\n\tvar propTypes = {\n\t month: _reactMomentProptypes2['default'].momentObj,\n\t isVisible: _react.PropTypes.bool,\n\t enableOutsideDays: _react.PropTypes.bool,\n\t modifiers: _react.PropTypes.object,\n\t orientation: _ScrollableOrientationShape2['default'],\n\t onDayClick: _react.PropTypes.func,\n\t onDayMouseEnter: _react.PropTypes.func,\n\t onDayMouseLeave: _react.PropTypes.func,\n\t renderDay: _react.PropTypes.func,\n\n\t // i18n\n\t monthFormat: _react.PropTypes.string\n\t};\n\n\tvar defaultProps = {\n\t month: (0, _moment2['default'])(),\n\t isVisible: true,\n\t enableOutsideDays: false,\n\t modifiers: {},\n\t orientation: _constants.HORIZONTAL_ORIENTATION,\n\t onDayClick: function () {\n\t function onDayClick() {}\n\n\t return onDayClick;\n\t }(),\n\t onDayMouseEnter: function () {\n\t function onDayMouseEnter() {}\n\n\t return onDayMouseEnter;\n\t }(),\n\t onDayMouseLeave: function () {\n\t function onDayMouseLeave() {}\n\n\t return onDayMouseLeave;\n\t }(),\n\n\t renderDay: null,\n\n\t // i18n\n\t monthFormat: 'MMMM YYYY' };\n\n\tvar CalendarMonth = function (_React$Component) {\n\t _inherits(CalendarMonth, _React$Component);\n\n\t function CalendarMonth(props) {\n\t _classCallCheck(this, CalendarMonth);\n\n\t var _this = _possibleConstructorReturn(this, (CalendarMonth.__proto__ || Object.getPrototypeOf(CalendarMonth)).call(this, props));\n\n\t _this.state = {\n\t weeks: (0, _getCalendarMonthWeeks2['default'])(props.month, props.enableOutsideDays)\n\t };\n\t return _this;\n\t }\n\n\t _createClass(CalendarMonth, [{\n\t key: 'componentWillReceiveProps',\n\t value: function () {\n\t function componentWillReceiveProps(nextProps) {\n\t var month = nextProps.month;\n\t var enableOutsideDays = nextProps.enableOutsideDays;\n\n\t if (!month.isSame(this.props.month)) {\n\t this.setState({\n\t weeks: (0, _getCalendarMonthWeeks2['default'])(month, enableOutsideDays)\n\t });\n\t }\n\t }\n\n\t return componentWillReceiveProps;\n\t }()\n\t }, {\n\t key: 'shouldComponentUpdate',\n\t value: function () {\n\t function shouldComponentUpdate(nextProps, nextState) {\n\t return (0, _reactAddonsShallowCompare2['default'])(this, nextProps, nextState);\n\t }\n\n\t return shouldComponentUpdate;\n\t }()\n\t }, {\n\t key: 'render',\n\t value: function () {\n\t function render() {\n\t var _props = this.props;\n\t var month = _props.month;\n\t var monthFormat = _props.monthFormat;\n\t var orientation = _props.orientation;\n\t var isVisible = _props.isVisible;\n\t var modifiers = _props.modifiers;\n\t var onDayClick = _props.onDayClick;\n\t var onDayMouseEnter = _props.onDayMouseEnter;\n\t var onDayMouseLeave = _props.onDayMouseLeave;\n\t var renderDay = _props.renderDay;\n\t var weeks = this.state.weeks;\n\n\t var monthTitle = month.format(monthFormat);\n\n\t var calendarMonthClasses = (0, _classnames2['default'])('CalendarMonth', {\n\t 'CalendarMonth--horizontal': orientation === _constants.HORIZONTAL_ORIENTATION,\n\t 'CalendarMonth--vertical': orientation === _constants.VERTICAL_ORIENTATION,\n\t 'CalendarMonth--vertical-scrollable': orientation === _constants.VERTICAL_SCROLLABLE\n\t });\n\n\t return _react2['default'].createElement('div', { className: calendarMonthClasses, 'data-visible': isVisible }, _react2['default'].createElement('table', null, _react2['default'].createElement('caption', { className: 'CalendarMonth__caption js-CalendarMonth__caption' }, _react2['default'].createElement('strong', null, monthTitle)), _react2['default'].createElement('tbody', { className: 'js-CalendarMonth__grid' }, weeks.map(function (week, i) {\n\t return _react2['default'].createElement('tr', { key: i }, week.map(function (day, dayOfWeek) {\n\t return _react2['default'].createElement(_CalendarDay2['default'], {\n\t day: day,\n\t isOutsideDay: !day || day.month() !== month.month(),\n\t modifiers: modifiers,\n\t key: dayOfWeek,\n\t onDayMouseEnter: onDayMouseEnter,\n\t onDayMouseLeave: onDayMouseLeave,\n\t onDayClick: onDayClick,\n\t renderDay: renderDay\n\t });\n\t }));\n\t }))));\n\t }\n\n\t return render;\n\t }()\n\t }]);\n\n\t return CalendarMonth;\n\t}(_react2['default'].Component);\n\n\texports['default'] = CalendarMonth;\n\n\tCalendarMonth.propTypes = propTypes;\n\tCalendarMonth.defaultProps = defaultProps;\n\n/***/ },\n/* 1 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! react */ 1);\n\n/***/ },\n/* 2 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! react-addons-shallow-compare */ 118);\n\n/***/ },\n/* 3 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! react-moment-proptypes */ 80);\n\n/***/ },\n/* 4 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! moment */ 3);\n\n/***/ },\n/* 5 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! classnames */ 2);\n\n/***/ },\n/* 6 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! ./CalendarDay */ 513);\n\n/***/ },\n/* 7 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! ../utils/getCalendarMonthWeeks */ 1315);\n\n/***/ },\n/* 8 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! ../shapes/ScrollableOrientationShape */ 120);\n\n/***/ },\n/* 9 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! ../../constants */ 29);\n\n/***/ }\n/******/ ]);\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dates/lib/components/CalendarMonth.js\n// module id = 514\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dates/lib/components/CalendarMonth.js?", + ); + + /***/ + }, + /* 515 */ + /* unknown exports provided */ + /* all exports used */ + /*!***********************************************************!*\ + !*** ./~/react-dates/lib/components/CalendarMonthGrid.js ***! + \***********************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "module.exports =\n/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n\n\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ function(module, exports, __webpack_require__) {\n\n\tvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\n\tvar _createClass = function () {\n\t function defineProperties(target, props) {\n\t for (var i = 0; i < props.length; i++) {\n\t 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);\n\t }\n\t }return function (Constructor, protoProps, staticProps) {\n\t if (protoProps) defineProperties(Constructor.prototype, protoProps);if (staticProps) defineProperties(Constructor, staticProps);return Constructor;\n\t };\n\t}();\n\n\tvar _react = __webpack_require__(1);\n\n\tvar _react2 = _interopRequireDefault(_react);\n\n\tvar _reactDom = __webpack_require__(10);\n\n\tvar _reactDom2 = _interopRequireDefault(_reactDom);\n\n\tvar _reactAddonsShallowCompare = __webpack_require__(2);\n\n\tvar _reactAddonsShallowCompare2 = _interopRequireDefault(_reactAddonsShallowCompare);\n\n\tvar _reactMomentProptypes = __webpack_require__(3);\n\n\tvar _reactMomentProptypes2 = _interopRequireDefault(_reactMomentProptypes);\n\n\tvar _moment = __webpack_require__(4);\n\n\tvar _moment2 = _interopRequireDefault(_moment);\n\n\tvar _classnames = __webpack_require__(5);\n\n\tvar _classnames2 = _interopRequireDefault(_classnames);\n\n\tvar _CalendarMonth = __webpack_require__(11);\n\n\tvar _CalendarMonth2 = _interopRequireDefault(_CalendarMonth);\n\n\tvar _isTransitionEndSupported = __webpack_require__(12);\n\n\tvar _isTransitionEndSupported2 = _interopRequireDefault(_isTransitionEndSupported);\n\n\tvar _getTransformStyles = __webpack_require__(13);\n\n\tvar _getTransformStyles2 = _interopRequireDefault(_getTransformStyles);\n\n\tvar _ScrollableOrientationShape = __webpack_require__(8);\n\n\tvar _ScrollableOrientationShape2 = _interopRequireDefault(_ScrollableOrientationShape);\n\n\tvar _constants = __webpack_require__(9);\n\n\tfunction _interopRequireDefault(obj) {\n\t return obj && obj.__esModule ? obj : { 'default': 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 _possibleConstructorReturn(self, call) {\n\t if (!self) {\n\t throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n\t }return call && ((typeof call === \"undefined\" ? \"undefined\" : _typeof(call)) === \"object\" || typeof call === \"function\") ? call : self;\n\t}\n\n\tfunction _inherits(subClass, superClass) {\n\t if (typeof superClass !== \"function\" && superClass !== null) {\n\t throw new TypeError(\"Super expression must either be null or a function, not \" + (typeof superClass === \"undefined\" ? \"undefined\" : _typeof(superClass)));\n\t }subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n\t}\n\n\tvar propTypes = {\n\t enableOutsideDays: _react.PropTypes.bool,\n\t firstVisibleMonthIndex: _react.PropTypes.number,\n\t initialMonth: _reactMomentProptypes2['default'].momentObj,\n\t isAnimating: _react.PropTypes.bool,\n\t numberOfMonths: _react.PropTypes.number,\n\t modifiers: _react.PropTypes.object,\n\t orientation: _ScrollableOrientationShape2['default'],\n\t onDayClick: _react.PropTypes.func,\n\t onDayMouseEnter: _react.PropTypes.func,\n\t onDayMouseLeave: _react.PropTypes.func,\n\t onMonthTransitionEnd: _react.PropTypes.func,\n\t renderDay: _react.PropTypes.func,\n\t transformValue: _react.PropTypes.string,\n\n\t // i18n\n\t monthFormat: _react.PropTypes.string\n\t};\n\n\tvar defaultProps = {\n\t enableOutsideDays: false,\n\t firstVisibleMonthIndex: 0,\n\t initialMonth: (0, _moment2['default'])(),\n\t isAnimating: false,\n\t numberOfMonths: 1,\n\t modifiers: {},\n\t orientation: _constants.HORIZONTAL_ORIENTATION,\n\t onDayClick: function () {\n\t function onDayClick() {}\n\n\t return onDayClick;\n\t }(),\n\t onDayMouseEnter: function () {\n\t function onDayMouseEnter() {}\n\n\t return onDayMouseEnter;\n\t }(),\n\t onDayMouseLeave: function () {\n\t function onDayMouseLeave() {}\n\n\t return onDayMouseLeave;\n\t }(),\n\t onMonthTransitionEnd: function () {\n\t function onMonthTransitionEnd() {}\n\n\t return onMonthTransitionEnd;\n\t }(),\n\n\t renderDay: null,\n\t transformValue: 'none',\n\n\t // i18n\n\t monthFormat: 'MMMM YYYY' };\n\n\tfunction getMonths(initialMonth, numberOfMonths) {\n\t var month = initialMonth.clone().subtract(1, 'month');\n\n\t var months = [];\n\t for (var i = 0; i < numberOfMonths + 2; i++) {\n\t months.push(month);\n\t month = month.clone().add(1, 'month');\n\t }\n\n\t return months;\n\t}\n\n\tvar CalendarMonthGrid = function (_React$Component) {\n\t _inherits(CalendarMonthGrid, _React$Component);\n\n\t function CalendarMonthGrid(props) {\n\t _classCallCheck(this, CalendarMonthGrid);\n\n\t var _this = _possibleConstructorReturn(this, (CalendarMonthGrid.__proto__ || Object.getPrototypeOf(CalendarMonthGrid)).call(this, props));\n\n\t _this.state = {\n\t months: getMonths(props.initialMonth, props.numberOfMonths)\n\t };\n\n\t _this.isTransitionEndSupported = (0, _isTransitionEndSupported2['default'])();\n\t _this.onTransitionEnd = _this.onTransitionEnd.bind(_this);\n\t return _this;\n\t }\n\n\t _createClass(CalendarMonthGrid, [{\n\t key: 'componentDidMount',\n\t value: function () {\n\t function componentDidMount() {\n\t this.container = _reactDom2['default'].findDOMNode(this.containerRef);\n\t this.container.addEventListener('transitionend', this.onTransitionEnd);\n\t }\n\n\t return componentDidMount;\n\t }()\n\t }, {\n\t key: 'componentWillReceiveProps',\n\t value: function () {\n\t function componentWillReceiveProps(nextProps) {\n\t var initialMonth = nextProps.initialMonth;\n\t var numberOfMonths = nextProps.numberOfMonths;\n\t var months = this.state.months;\n\n\t var hasMonthChanged = !this.props.initialMonth.isSame(initialMonth, 'month');\n\t var hasNumberOfMonthsChanged = this.props.numberOfMonths !== numberOfMonths;\n\t var newMonths = months;\n\n\t if (hasMonthChanged && !hasNumberOfMonthsChanged) {\n\t if (initialMonth.isAfter(this.props.initialMonth)) {\n\t newMonths = months.slice(1);\n\t newMonths.push(months[months.length - 1].clone().add(1, 'month'));\n\t } else {\n\t newMonths = months.slice(0, months.length - 1);\n\t newMonths.unshift(months[0].clone().subtract(1, 'month'));\n\t }\n\t }\n\n\t if (hasNumberOfMonthsChanged) {\n\t newMonths = getMonths(initialMonth, numberOfMonths);\n\t }\n\n\t this.setState({\n\t months: newMonths\n\t });\n\t }\n\n\t return componentWillReceiveProps;\n\t }()\n\t }, {\n\t key: 'shouldComponentUpdate',\n\t value: function () {\n\t function shouldComponentUpdate(nextProps, nextState) {\n\t return (0, _reactAddonsShallowCompare2['default'])(this, nextProps, nextState);\n\t }\n\n\t return shouldComponentUpdate;\n\t }()\n\t }, {\n\t key: 'componentDidUpdate',\n\t value: function () {\n\t function componentDidUpdate() {\n\t var _props = this.props;\n\t var isAnimating = _props.isAnimating;\n\t var onMonthTransitionEnd = _props.onMonthTransitionEnd;\n\n\t // For IE9, immediately call onMonthTransitionEnd instead of\n\t // waiting for the animation to complete\n\n\t if (!this.isTransitionEndSupported && isAnimating) {\n\t onMonthTransitionEnd();\n\t }\n\t }\n\n\t return componentDidUpdate;\n\t }()\n\t }, {\n\t key: 'componentWillUnmount',\n\t value: function () {\n\t function componentWillUnmount() {\n\t this.container.removeEventListener('transitionend', this.onTransitionEnd);\n\t }\n\n\t return componentWillUnmount;\n\t }()\n\t }, {\n\t key: 'onTransitionEnd',\n\t value: function () {\n\t function onTransitionEnd() {\n\t this.props.onMonthTransitionEnd();\n\t }\n\n\t return onTransitionEnd;\n\t }()\n\t }, {\n\t key: 'render',\n\t value: function () {\n\t function render() {\n\t var _this2 = this;\n\n\t var _props2 = this.props;\n\t var enableOutsideDays = _props2.enableOutsideDays;\n\t var firstVisibleMonthIndex = _props2.firstVisibleMonthIndex;\n\t var isAnimating = _props2.isAnimating;\n\t var modifiers = _props2.modifiers;\n\t var numberOfMonths = _props2.numberOfMonths;\n\t var monthFormat = _props2.monthFormat;\n\t var orientation = _props2.orientation;\n\t var transformValue = _props2.transformValue;\n\t var onDayMouseEnter = _props2.onDayMouseEnter;\n\t var onDayMouseLeave = _props2.onDayMouseLeave;\n\t var onDayClick = _props2.onDayClick;\n\t var renderDay = _props2.renderDay;\n\t var onMonthTransitionEnd = _props2.onMonthTransitionEnd;\n\t var months = this.state.months;\n\n\t var className = (0, _classnames2['default'])('CalendarMonthGrid', {\n\t 'CalendarMonthGrid--horizontal': orientation === _constants.HORIZONTAL_ORIENTATION,\n\t 'CalendarMonthGrid--vertical': orientation === _constants.VERTICAL_ORIENTATION,\n\t 'CalendarMonthGrid--vertical-scrollable': orientation === _constants.VERTICAL_SCROLLABLE,\n\t 'CalendarMonthGrid--animating': isAnimating\n\t });\n\n\t return _react2['default'].createElement('div', {\n\t ref: function () {\n\t function ref(_ref) {\n\t _this2.containerRef = _ref;\n\t }\n\n\t return ref;\n\t }(),\n\t className: className,\n\t style: (0, _getTransformStyles2['default'])(transformValue),\n\t onTransitionEnd: onMonthTransitionEnd\n\t }, months.map(function (month, i) {\n\t var isVisible = i >= firstVisibleMonthIndex && i < firstVisibleMonthIndex + numberOfMonths;\n\t return _react2['default'].createElement(_CalendarMonth2['default'], {\n\t key: month.format('YYYY-MM'),\n\t month: month,\n\t isVisible: isVisible,\n\t enableOutsideDays: enableOutsideDays,\n\t modifiers: modifiers,\n\t monthFormat: monthFormat,\n\t orientation: orientation,\n\t onDayMouseEnter: onDayMouseEnter,\n\t onDayMouseLeave: onDayMouseLeave,\n\t onDayClick: onDayClick,\n\t renderDay: renderDay\n\t });\n\t }));\n\t }\n\n\t return render;\n\t }()\n\t }]);\n\n\t return CalendarMonthGrid;\n\t}(_react2['default'].Component);\n\n\texports['default'] = CalendarMonthGrid;\n\n\tCalendarMonthGrid.propTypes = propTypes;\n\tCalendarMonthGrid.defaultProps = defaultProps;\n\n/***/ },\n/* 1 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! react */ 1);\n\n/***/ },\n/* 2 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! react-addons-shallow-compare */ 118);\n\n/***/ },\n/* 3 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! react-moment-proptypes */ 80);\n\n/***/ },\n/* 4 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! moment */ 3);\n\n/***/ },\n/* 5 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! classnames */ 2);\n\n/***/ },\n/* 6 */,\n/* 7 */,\n/* 8 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! ../shapes/ScrollableOrientationShape */ 120);\n\n/***/ },\n/* 9 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! ../../constants */ 29);\n\n/***/ },\n/* 10 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! react-dom */ 16);\n\n/***/ },\n/* 11 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! ./CalendarMonth */ 514);\n\n/***/ },\n/* 12 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! ../utils/isTransitionEndSupported */ 1316);\n\n/***/ },\n/* 13 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! ../utils/getTransformStyles */ 527);\n\n/***/ }\n/******/ ]);\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dates/lib/components/CalendarMonthGrid.js\n// module id = 515\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dates/lib/components/CalendarMonthGrid.js?", + ); + + /***/ + }, + /* 516 */ + /* unknown exports provided */ + /* all exports used */ + /*!***************************************************!*\ + !*** ./~/react-dates/lib/components/DateInput.js ***! + \***************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "module.exports =\n/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n\n\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ({\n\n/***/ 0:\n/***/ function(module, exports, __webpack_require__) {\n\n\tvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\n\tvar _createClass = function () {\n\t function defineProperties(target, props) {\n\t for (var i = 0; i < props.length; i++) {\n\t 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);\n\t }\n\t }return function (Constructor, protoProps, staticProps) {\n\t if (protoProps) defineProperties(Constructor.prototype, protoProps);if (staticProps) defineProperties(Constructor, staticProps);return Constructor;\n\t };\n\t}();\n\n\tvar _react = __webpack_require__(1);\n\n\tvar _react2 = _interopRequireDefault(_react);\n\n\tvar _classnames = __webpack_require__(5);\n\n\tvar _classnames2 = _interopRequireDefault(_classnames);\n\n\tvar _isTouchDevice = __webpack_require__(14);\n\n\tvar _isTouchDevice2 = _interopRequireDefault(_isTouchDevice);\n\n\tfunction _interopRequireDefault(obj) {\n\t return obj && obj.__esModule ? obj : { 'default': 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 _possibleConstructorReturn(self, call) {\n\t if (!self) {\n\t throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n\t }return call && ((typeof call === \"undefined\" ? \"undefined\" : _typeof(call)) === \"object\" || typeof call === \"function\") ? call : self;\n\t}\n\n\tfunction _inherits(subClass, superClass) {\n\t if (typeof superClass !== \"function\" && superClass !== null) {\n\t throw new TypeError(\"Super expression must either be null or a function, not \" + (typeof superClass === \"undefined\" ? \"undefined\" : _typeof(superClass)));\n\t }subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n\t}\n\n\tvar propTypes = {\n\t id: _react.PropTypes.string.isRequired,\n\t placeholder: _react.PropTypes.string, // also used as label\n\t displayValue: _react.PropTypes.string,\n\t inputValue: _react.PropTypes.string,\n\t screenReaderMessage: _react.PropTypes.string,\n\t focused: _react.PropTypes.bool,\n\t disabled: _react.PropTypes.bool,\n\t required: _react.PropTypes.bool,\n\t showCaret: _react.PropTypes.bool,\n\n\t onChange: _react.PropTypes.func,\n\t onFocus: _react.PropTypes.func,\n\t onKeyDownShiftTab: _react.PropTypes.func,\n\t onKeyDownTab: _react.PropTypes.func\n\t};\n\n\tvar defaultProps = {\n\t placeholder: 'Select Date',\n\t displayValue: '',\n\t inputValue: '',\n\t screenReaderMessage: '',\n\t focused: false,\n\t disabled: false,\n\t required: false,\n\t showCaret: false,\n\n\t onChange: function () {\n\t function onChange() {}\n\n\t return onChange;\n\t }(),\n\t onFocus: function () {\n\t function onFocus() {}\n\n\t return onFocus;\n\t }(),\n\t onKeyDownShiftTab: function () {\n\t function onKeyDownShiftTab() {}\n\n\t return onKeyDownShiftTab;\n\t }(),\n\t onKeyDownTab: function () {\n\t function onKeyDownTab() {}\n\n\t return onKeyDownTab;\n\t }()\n\t};\n\n\tvar DateInput = function (_React$Component) {\n\t _inherits(DateInput, _React$Component);\n\n\t function DateInput(props) {\n\t _classCallCheck(this, DateInput);\n\n\t var _this = _possibleConstructorReturn(this, (DateInput.__proto__ || Object.getPrototypeOf(DateInput)).call(this, props));\n\n\t _this.state = {\n\t dateString: ''\n\t };\n\n\t _this.onChange = _this.onChange.bind(_this);\n\t _this.onKeyDown = _this.onKeyDown.bind(_this);\n\n\t _this.isTouchDevice = (0, _isTouchDevice2['default'])();\n\t return _this;\n\t }\n\n\t _createClass(DateInput, [{\n\t key: 'componentWillReceiveProps',\n\t value: function () {\n\t function componentWillReceiveProps(nextProps) {\n\t if (!this.props.displayValue && nextProps.displayValue) {\n\t this.setState({\n\t dateString: ''\n\t });\n\t }\n\t }\n\n\t return componentWillReceiveProps;\n\t }()\n\t }, {\n\t key: 'componentDidUpdate',\n\t value: function () {\n\t function componentDidUpdate(prevProps) {\n\t var focused = this.props.focused;\n\n\t if (prevProps.focused === focused) return;\n\n\t if (focused) {\n\t this.inputRef.focus();\n\t this.inputRef.select();\n\t } else {\n\t this.inputRef.blur();\n\t }\n\t }\n\n\t return componentDidUpdate;\n\t }()\n\t }, {\n\t key: 'onChange',\n\t value: function () {\n\t function onChange(e) {\n\t var dateString = e.target.value;\n\n\t this.setState({ dateString: dateString });\n\t this.props.onChange(dateString);\n\t }\n\n\t return onChange;\n\t }()\n\t }, {\n\t key: 'onKeyDown',\n\t value: function () {\n\t function onKeyDown(e) {\n\t var _props = this.props;\n\t var onKeyDownShiftTab = _props.onKeyDownShiftTab;\n\t var onKeyDownTab = _props.onKeyDownTab;\n\n\t if (e.key === 'Tab') {\n\t if (e.shiftKey) {\n\t onKeyDownShiftTab(e);\n\t } else {\n\t onKeyDownTab(e);\n\t }\n\t }\n\t }\n\n\t return onKeyDown;\n\t }()\n\t }, {\n\t key: 'render',\n\t value: function () {\n\t function render() {\n\t var _this2 = this;\n\n\t var dateString = this.state.dateString;\n\t var _props2 = this.props;\n\t var id = _props2.id;\n\t var placeholder = _props2.placeholder;\n\t var displayValue = _props2.displayValue;\n\t var inputValue = _props2.inputValue;\n\t var screenReaderMessage = _props2.screenReaderMessage;\n\t var focused = _props2.focused;\n\t var showCaret = _props2.showCaret;\n\t var onFocus = _props2.onFocus;\n\t var disabled = _props2.disabled;\n\t var required = _props2.required;\n\n\t var displayText = displayValue || inputValue || dateString || placeholder || '';\n\t var value = inputValue || displayValue || dateString || '';\n\t var screenReaderMessageId = 'DateInput__screen-reader-message-' + String(id);\n\n\t return _react2['default'].createElement('div', {\n\t className: (0, _classnames2['default'])('DateInput', {\n\t 'DateInput--with-caret': showCaret && focused,\n\t 'DateInput--disabled': disabled\n\t })\n\t }, _react2['default'].createElement('input', {\n\t 'aria-label': placeholder,\n\t className: 'DateInput__input',\n\t type: 'text',\n\t id: id,\n\t name: id,\n\t ref: function () {\n\t function ref(_ref) {\n\t _this2.inputRef = _ref;\n\t }\n\n\t return ref;\n\t }(),\n\t value: value,\n\t onChange: this.onChange,\n\t onKeyDown: this.onKeyDown,\n\t onFocus: onFocus,\n\t placeholder: placeholder,\n\t autoComplete: 'off',\n\t disabled: disabled,\n\t readOnly: this.isTouchDevice,\n\t required: required,\n\t 'aria-describedby': screenReaderMessage && screenReaderMessageId\n\t }), screenReaderMessage && _react2['default'].createElement('p', { id: screenReaderMessageId, className: 'screen-reader-only' }, screenReaderMessage), _react2['default'].createElement('div', {\n\t className: (0, _classnames2['default'])('DateInput__display-text', {\n\t 'DateInput__display-text--has-input': !!value,\n\t 'DateInput__display-text--focused': focused,\n\t 'DateInput__display-text--disabled': disabled\n\t })\n\t }, displayText));\n\t }\n\n\t return render;\n\t }()\n\t }]);\n\n\t return DateInput;\n\t}(_react2['default'].Component);\n\n\texports['default'] = DateInput;\n\n\tDateInput.propTypes = propTypes;\n\tDateInput.defaultProps = defaultProps;\n\n/***/ },\n\n/***/ 1:\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! react */ 1);\n\n/***/ },\n\n/***/ 5:\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! classnames */ 2);\n\n/***/ },\n\n/***/ 14:\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! ../utils/isTouchDevice */ 530);\n\n/***/ }\n\n/******/ });\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dates/lib/components/DateInput.js\n// module id = 516\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dates/lib/components/DateInput.js?", + ); + + /***/ + }, + /* 517 */ + /* unknown exports provided */ + /* all exports used */ + /*!**************************************************************!*\ + !*** ./~/react-dates/lib/components/DateRangePickerInput.js ***! + \**************************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + 'module.exports =\n/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n\n\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = "";\n\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ function(module, exports, __webpack_require__) {\n\n\tvar _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };\n\n\tObject.defineProperty(exports, "__esModule", {\n\t value: true\n\t});\n\n\tvar _createClass = function () {\n\t function defineProperties(target, props) {\n\t for (var i = 0; i < props.length; i++) {\n\t 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);\n\t }\n\t }return function (Constructor, protoProps, staticProps) {\n\t if (protoProps) defineProperties(Constructor.prototype, protoProps);if (staticProps) defineProperties(Constructor, staticProps);return Constructor;\n\t };\n\t}();\n\n\tvar _react = __webpack_require__(1);\n\n\tvar _react2 = _interopRequireDefault(_react);\n\n\tvar _classnames = __webpack_require__(5);\n\n\tvar _classnames2 = _interopRequireDefault(_classnames);\n\n\tvar _DateInput = __webpack_require__(23);\n\n\tvar _DateInput2 = _interopRequireDefault(_DateInput);\n\n\tvar _arrowRight = __webpack_require__(24);\n\n\tvar _arrowRight2 = _interopRequireDefault(_arrowRight);\n\n\tvar _close = __webpack_require__(21);\n\n\tvar _close2 = _interopRequireDefault(_close);\n\n\tvar _calendar = __webpack_require__(25);\n\n\tvar _calendar2 = _interopRequireDefault(_calendar);\n\n\tvar _constants = __webpack_require__(9);\n\n\tfunction _interopRequireDefault(obj) {\n\t return obj && obj.__esModule ? obj : { \'default\': 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 _possibleConstructorReturn(self, call) {\n\t if (!self) {\n\t throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");\n\t }return call && ((typeof call === "undefined" ? "undefined" : _typeof(call)) === "object" || typeof call === "function") ? call : self;\n\t}\n\n\tfunction _inherits(subClass, superClass) {\n\t if (typeof superClass !== "function" && superClass !== null) {\n\t throw new TypeError("Super expression must either be null or a function, not " + (typeof superClass === "undefined" ? "undefined" : _typeof(superClass)));\n\t }subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n\t}\n\n\tvar propTypes = {\n\t startDateId: _react.PropTypes.string,\n\t startDatePlaceholderText: _react.PropTypes.string,\n\t screenReaderMessage: _react.PropTypes.string,\n\n\t endDateId: _react.PropTypes.string,\n\t endDatePlaceholderText: _react.PropTypes.string,\n\n\t onStartDateFocus: _react.PropTypes.func,\n\t onEndDateFocus: _react.PropTypes.func,\n\t onStartDateChange: _react.PropTypes.func,\n\t onEndDateChange: _react.PropTypes.func,\n\t onStartDateShiftTab: _react.PropTypes.func,\n\t onEndDateTab: _react.PropTypes.func,\n\t onClearDates: _react.PropTypes.func,\n\n\t startDate: _react.PropTypes.string,\n\t startDateValue: _react.PropTypes.string,\n\t endDate: _react.PropTypes.string,\n\t endDateValue: _react.PropTypes.string,\n\n\t isStartDateFocused: _react.PropTypes.bool,\n\t isEndDateFocused: _react.PropTypes.bool,\n\t showClearDates: _react.PropTypes.bool,\n\t disabled: _react.PropTypes.bool,\n\t required: _react.PropTypes.bool,\n\t showCaret: _react.PropTypes.bool,\n\t showDefaultInputIcon: _react.PropTypes.bool,\n\t customInputIcon: _react.PropTypes.node,\n\t customArrowIcon: _react.PropTypes.node,\n\n\t // i18n\n\t phrases: _react.PropTypes.shape({\n\t clearDates: _react.PropTypes.node\n\t })\n\t};\n\n\tvar defaultProps = {\n\t startDateId: _constants.START_DATE,\n\t endDateId: _constants.END_DATE,\n\t startDatePlaceholderText: \'Start Date\',\n\t endDatePlaceholderText: \'End Date\',\n\t screenReaderMessage: \'\',\n\t onStartDateFocus: function () {\n\t function onStartDateFocus() {}\n\n\t return onStartDateFocus;\n\t }(),\n\t onEndDateFocus: function () {\n\t function onEndDateFocus() {}\n\n\t return onEndDateFocus;\n\t }(),\n\t onStartDateChange: function () {\n\t function onStartDateChange() {}\n\n\t return onStartDateChange;\n\t }(),\n\t onEndDateChange: function () {\n\t function onEndDateChange() {}\n\n\t return onEndDateChange;\n\t }(),\n\t onStartDateShiftTab: function () {\n\t function onStartDateShiftTab() {}\n\n\t return onStartDateShiftTab;\n\t }(),\n\t onEndDateTab: function () {\n\t function onEndDateTab() {}\n\n\t return onEndDateTab;\n\t }(),\n\t onClearDates: function () {\n\t function onClearDates() {}\n\n\t return onClearDates;\n\t }(),\n\n\t startDate: \'\',\n\t startDateValue: \'\',\n\t endDate: \'\',\n\t endDateValue: \'\',\n\n\t isStartDateFocused: false,\n\t isEndDateFocused: false,\n\t showClearDates: false,\n\t disabled: false,\n\t required: false,\n\t showCaret: false,\n\t showDefaultInputIcon: false,\n\t customInputIcon: null,\n\t customArrowIcon: null,\n\n\t // i18n\n\t phrases: {\n\t clearDates: \'Clear Dates\'\n\t }\n\t};\n\n\tvar DateRangePickerInput = function (_React$Component) {\n\t _inherits(DateRangePickerInput, _React$Component);\n\n\t function DateRangePickerInput(props) {\n\t _classCallCheck(this, DateRangePickerInput);\n\n\t var _this = _possibleConstructorReturn(this, (DateRangePickerInput.__proto__ || Object.getPrototypeOf(DateRangePickerInput)).call(this, props));\n\n\t _this.state = {\n\t isClearDatesHovered: false\n\t };\n\n\t _this.onClearDatesMouseEnter = _this.onClearDatesMouseEnter.bind(_this);\n\t _this.onClearDatesMouseLeave = _this.onClearDatesMouseLeave.bind(_this);\n\t return _this;\n\t }\n\n\t _createClass(DateRangePickerInput, [{\n\t key: \'onClearDatesMouseEnter\',\n\t value: function () {\n\t function onClearDatesMouseEnter() {\n\t this.setState({\n\t isClearDatesHovered: true\n\t });\n\t }\n\n\t return onClearDatesMouseEnter;\n\t }()\n\t }, {\n\t key: \'onClearDatesMouseLeave\',\n\t value: function () {\n\t function onClearDatesMouseLeave() {\n\t this.setState({\n\t isClearDatesHovered: false\n\t });\n\t }\n\n\t return onClearDatesMouseLeave;\n\t }()\n\t }, {\n\t key: \'render\',\n\t value: function () {\n\t function render() {\n\t var isClearDatesHovered = this.state.isClearDatesHovered;\n\t var _props = this.props;\n\t var startDate = _props.startDate;\n\t var startDateValue = _props.startDateValue;\n\t var startDateId = _props.startDateId;\n\t var startDatePlaceholderText = _props.startDatePlaceholderText;\n\t var screenReaderMessage = _props.screenReaderMessage;\n\t var isStartDateFocused = _props.isStartDateFocused;\n\t var onStartDateChange = _props.onStartDateChange;\n\t var onStartDateFocus = _props.onStartDateFocus;\n\t var onStartDateShiftTab = _props.onStartDateShiftTab;\n\t var endDate = _props.endDate;\n\t var endDateValue = _props.endDateValue;\n\t var endDateId = _props.endDateId;\n\t var endDatePlaceholderText = _props.endDatePlaceholderText;\n\t var isEndDateFocused = _props.isEndDateFocused;\n\t var onEndDateChange = _props.onEndDateChange;\n\t var onEndDateFocus = _props.onEndDateFocus;\n\t var onEndDateTab = _props.onEndDateTab;\n\t var onClearDates = _props.onClearDates;\n\t var showClearDates = _props.showClearDates;\n\t var disabled = _props.disabled;\n\t var required = _props.required;\n\t var showCaret = _props.showCaret;\n\t var showDefaultInputIcon = _props.showDefaultInputIcon;\n\t var customInputIcon = _props.customInputIcon;\n\t var customArrowIcon = _props.customArrowIcon;\n\t var phrases = _props.phrases;\n\n\t var inputIcon = customInputIcon || _react2[\'default\'].createElement(_calendar2[\'default\'], null);\n\t var arrowIcon = customArrowIcon || _react2[\'default\'].createElement(_arrowRight2[\'default\'], null);\n\n\t return _react2[\'default\'].createElement(\'div\', {\n\t className: (0, _classnames2[\'default\'])(\'DateRangePickerInput\', {\n\t \'DateRangePickerInput--disabled\': disabled\n\t })\n\t }, (showDefaultInputIcon || customInputIcon !== null) && _react2[\'default\'].createElement(\'span\', {\n\t className: \'DateRangePickerInput__calendar-icon\',\n\t onClick: onStartDateFocus\n\t }, inputIcon), _react2[\'default\'].createElement(_DateInput2[\'default\'], {\n\t id: startDateId,\n\t placeholder: startDatePlaceholderText,\n\t displayValue: startDate,\n\t inputValue: startDateValue,\n\t screenReaderMessage: screenReaderMessage,\n\t focused: isStartDateFocused,\n\t disabled: disabled,\n\t required: required,\n\t showCaret: showCaret,\n\n\t onChange: onStartDateChange,\n\t onFocus: onStartDateFocus,\n\t onKeyDownShiftTab: onStartDateShiftTab\n\t }), _react2[\'default\'].createElement(\'div\', { className: \'DateRangePickerInput__arrow\' }, arrowIcon), _react2[\'default\'].createElement(_DateInput2[\'default\'], {\n\t id: endDateId,\n\t placeholder: endDatePlaceholderText,\n\t displayValue: endDate,\n\t inputValue: endDateValue,\n\t screenReaderMessage: screenReaderMessage,\n\t focused: isEndDateFocused,\n\t disabled: disabled,\n\t required: required,\n\t showCaret: showCaret,\n\n\t onChange: onEndDateChange,\n\t onFocus: onEndDateFocus,\n\t onKeyDownTab: onEndDateTab\n\t }), showClearDates && _react2[\'default\'].createElement(\'button\', {\n\t type: \'button\',\n\t className: (0, _classnames2[\'default\'])(\'DateRangePickerInput__clear-dates\', {\n\t \'DateRangePickerInput__clear-dates--hide\': !(startDate || endDate),\n\t \'DateRangePickerInput__clear-dates--hover\': isClearDatesHovered\n\t }),\n\t onMouseEnter: this.onClearDatesMouseEnter,\n\t onMouseLeave: this.onClearDatesMouseLeave,\n\t onClick: onClearDates\n\t }, _react2[\'default\'].createElement(\'span\', { className: \'screen-reader-only\' }, phrases.clearDates), _react2[\'default\'].createElement(_close2[\'default\'], null)));\n\t }\n\n\t return render;\n\t }()\n\t }]);\n\n\t return DateRangePickerInput;\n\t}(_react2[\'default\'].Component);\n\n\texports[\'default\'] = DateRangePickerInput;\n\n\tDateRangePickerInput.propTypes = propTypes;\n\tDateRangePickerInput.defaultProps = defaultProps;\n\n/***/ },\n/* 1 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! react */ 1);\n\n/***/ },\n/* 2 */,\n/* 3 */,\n/* 4 */,\n/* 5 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! classnames */ 2);\n\n/***/ },\n/* 6 */,\n/* 7 */,\n/* 8 */,\n/* 9 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! ../../constants */ 29);\n\n/***/ },\n/* 10 */,\n/* 11 */,\n/* 12 */,\n/* 13 */,\n/* 14 */,\n/* 15 */,\n/* 16 */,\n/* 17 */,\n/* 18 */,\n/* 19 */,\n/* 20 */,\n/* 21 */\n/***/ function(module, exports, __webpack_require__) {\n\n\tObject.defineProperty(exports, "__esModule", {\n\t value: true\n\t});\n\n\tvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\n\tvar _react = __webpack_require__(1);\n\n\tvar _react2 = _interopRequireDefault(_react);\n\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }\n\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }\n\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\tvar SVG = function (_React$Component) {\n\t _inherits(SVG, _React$Component);\n\n\t function SVG() {\n\t _classCallCheck(this, SVG);\n\n\t return _possibleConstructorReturn(this, (SVG.__proto__ || Object.getPrototypeOf(SVG)).apply(this, arguments));\n\t }\n\n\t _createClass(SVG, [{\n\t key: "render",\n\t value: function () {\n\t function render() {\n\t return _react2["default"].createElement(\n\t "svg",\n\t _extends({ viewBox: "0 0 12 12" }, this.props),\n\t _react2["default"].createElement("path", { fillRule: "evenodd", d: "M11.53.47a.75.75 0 0 0-1.061 0l-4.47 4.47L1.529.47A.75.75 0 1 0 .468 1.531l4.47 4.47-4.47 4.47a.75.75 0 1 0 1.061 1.061l4.47-4.47 4.47 4.47a.75.75 0 1 0 1.061-1.061l-4.47-4.47 4.47-4.47a.75.75 0 0 0 0-1.061z" })\n\t );\n\t }\n\n\t return render;\n\t }()\n\t }]);\n\n\t return SVG;\n\t}(_react2["default"].Component);\n\n\texports["default"] = SVG;\n\n/***/ },\n/* 22 */,\n/* 23 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! ./DateInput */ 516);\n\n/***/ },\n/* 24 */\n/***/ function(module, exports, __webpack_require__) {\n\n\tObject.defineProperty(exports, "__esModule", {\n\t value: true\n\t});\n\n\tvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\n\tvar _react = __webpack_require__(1);\n\n\tvar _react2 = _interopRequireDefault(_react);\n\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }\n\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }\n\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\tvar SVG = function (_React$Component) {\n\t _inherits(SVG, _React$Component);\n\n\t function SVG() {\n\t _classCallCheck(this, SVG);\n\n\t return _possibleConstructorReturn(this, (SVG.__proto__ || Object.getPrototypeOf(SVG)).apply(this, arguments));\n\t }\n\n\t _createClass(SVG, [{\n\t key: "render",\n\t value: function () {\n\t function render() {\n\t return _react2["default"].createElement(\n\t "svg",\n\t _extends({ viewBox: "0 0 1000 1000" }, this.props),\n\t _react2["default"].createElement("path", { d: "M694.4 242.4l249.1 249.1c11 11 11 21 0 32L694.4 772.7c-5 5-10 7-16 7s-11-2-16-7c-11-11-11-21 0-32l210.1-210.1H67.1c-13 0-23-10-23-23s10-23 23-23h805.4L662.4 274.5c-21-21.1 11-53.1 32-32.1z" })\n\t );\n\t }\n\n\t return render;\n\t }()\n\t }]);\n\n\t return SVG;\n\t}(_react2["default"].Component);\n\n\texports["default"] = SVG;\n\n/***/ },\n/* 25 */\n/***/ function(module, exports, __webpack_require__) {\n\n\tObject.defineProperty(exports, "__esModule", {\n\t value: true\n\t});\n\n\tvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\n\tvar _react = __webpack_require__(1);\n\n\tvar _react2 = _interopRequireDefault(_react);\n\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }\n\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }\n\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\tvar SVG = function (_React$Component) {\n\t _inherits(SVG, _React$Component);\n\n\t function SVG() {\n\t _classCallCheck(this, SVG);\n\n\t return _possibleConstructorReturn(this, (SVG.__proto__ || Object.getPrototypeOf(SVG)).apply(this, arguments));\n\t }\n\n\t _createClass(SVG, [{\n\t key: "render",\n\t value: function () {\n\t function render() {\n\t return _react2["default"].createElement(\n\t "svg",\n\t _extends({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1393.1 1500" }, this.props),\n\t _react2["default"].createElement("path", { d: "M107.2 1392.9h241.1v-241.1H107.2v241.1zm294.7 0h267.9v-241.1H401.9v241.1zm-294.7-294.7h241.1V830.4H107.2v267.8zm294.7 0h267.9V830.4H401.9v267.8zM107.2 776.8h241.1V535.7H107.2v241.1zm616.2 616.1h267.9v-241.1H723.4v241.1zM401.9 776.8h267.9V535.7H401.9v241.1zm642.9 616.1H1286v-241.1h-241.1v241.1zm-321.4-294.7h267.9V830.4H723.4v267.8zM428.7 375V133.9c0-7.3-2.7-13.5-8-18.8-5.3-5.3-11.6-8-18.8-8h-53.6c-7.3 0-13.5 2.7-18.8 8-5.3 5.3-8 11.6-8 18.8V375c0 7.3 2.7 13.5 8 18.8 5.3 5.3 11.6 8 18.8 8h53.6c7.3 0 13.5-2.7 18.8-8 5.3-5.3 8-11.5 8-18.8zm616.1 723.2H1286V830.4h-241.1v267.8zM723.4 776.8h267.9V535.7H723.4v241.1zm321.4 0H1286V535.7h-241.1v241.1zm26.8-401.8V133.9c0-7.3-2.7-13.5-8-18.8-5.3-5.3-11.6-8-18.8-8h-53.6c-7.3 0-13.5 2.7-18.8 8-5.3 5.3-8 11.6-8 18.8V375c0 7.3 2.7 13.5 8 18.8 5.3 5.3 11.6 8 18.8 8h53.6c7.3 0 13.5-2.7 18.8-8 5.4-5.3 8-11.5 8-18.8zm321.5-53.6v1071.4c0 29-10.6 54.1-31.8 75.3-21.2 21.2-46.3 31.8-75.3 31.8H107.2c-29 0-54.1-10.6-75.3-31.8C10.6 1447 0 1421.9 0 1392.9V321.4c0-29 10.6-54.1 31.8-75.3s46.3-31.8 75.3-31.8h107.2v-80.4c0-36.8 13.1-68.4 39.3-94.6S311.4 0 348.3 0h53.6c36.8 0 68.4 13.1 94.6 39.3 26.2 26.2 39.3 57.8 39.3 94.6v80.4h321.5v-80.4c0-36.8 13.1-68.4 39.3-94.6C922.9 13.1 954.4 0 991.3 0h53.6c36.8 0 68.4 13.1 94.6 39.3s39.3 57.8 39.3 94.6v80.4H1286c29 0 54.1 10.6 75.3 31.8 21.2 21.2 31.8 46.3 31.8 75.3z" })\n\t );\n\t }\n\n\t return render;\n\t }()\n\t }]);\n\n\t return SVG;\n\t}(_react2["default"].Component);\n\n\texports["default"] = SVG;\n\n/***/ }\n/******/ ]);\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dates/lib/components/DateRangePickerInput.js\n// module id = 517\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dates/lib/components/DateRangePickerInput.js?', + ); + + /***/ + }, + /* 518 */ + /* unknown exports provided */ + /* all exports used */ + /*!************************************************************************!*\ + !*** ./~/react-dates/lib/components/DateRangePickerInputController.js ***! + \************************************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "module.exports =\n/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n\n\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ function(module, exports, __webpack_require__) {\n\n\tvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\n\tvar _createClass = function () {\n\t function defineProperties(target, props) {\n\t for (var i = 0; i < props.length; i++) {\n\t 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);\n\t }\n\t }return function (Constructor, protoProps, staticProps) {\n\t if (protoProps) defineProperties(Constructor.prototype, protoProps);if (staticProps) defineProperties(Constructor, staticProps);return Constructor;\n\t };\n\t}();\n\n\tvar _react = __webpack_require__(1);\n\n\tvar _react2 = _interopRequireDefault(_react);\n\n\tvar _moment = __webpack_require__(4);\n\n\tvar _moment2 = _interopRequireDefault(_moment);\n\n\tvar _reactMomentProptypes = __webpack_require__(3);\n\n\tvar _reactMomentProptypes2 = _interopRequireDefault(_reactMomentProptypes);\n\n\tvar _DateRangePickerInput = __webpack_require__(26);\n\n\tvar _DateRangePickerInput2 = _interopRequireDefault(_DateRangePickerInput);\n\n\tvar _toMomentObject = __webpack_require__(27);\n\n\tvar _toMomentObject2 = _interopRequireDefault(_toMomentObject);\n\n\tvar _toLocalizedDateString = __webpack_require__(28);\n\n\tvar _toLocalizedDateString2 = _interopRequireDefault(_toLocalizedDateString);\n\n\tvar _toISODateString = __webpack_require__(29);\n\n\tvar _toISODateString2 = _interopRequireDefault(_toISODateString);\n\n\tvar _isInclusivelyAfterDay = __webpack_require__(18);\n\n\tvar _isInclusivelyAfterDay2 = _interopRequireDefault(_isInclusivelyAfterDay);\n\n\tvar _isInclusivelyBeforeDay = __webpack_require__(30);\n\n\tvar _isInclusivelyBeforeDay2 = _interopRequireDefault(_isInclusivelyBeforeDay);\n\n\tvar _constants = __webpack_require__(9);\n\n\tfunction _interopRequireDefault(obj) {\n\t return obj && obj.__esModule ? obj : { 'default': 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 _possibleConstructorReturn(self, call) {\n\t if (!self) {\n\t throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n\t }return call && ((typeof call === \"undefined\" ? \"undefined\" : _typeof(call)) === \"object\" || typeof call === \"function\") ? call : self;\n\t}\n\n\tfunction _inherits(subClass, superClass) {\n\t if (typeof superClass !== \"function\" && superClass !== null) {\n\t throw new TypeError(\"Super expression must either be null or a function, not \" + (typeof superClass === \"undefined\" ? \"undefined\" : _typeof(superClass)));\n\t }subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n\t}\n\n\tvar propTypes = {\n\t startDate: _reactMomentProptypes2['default'].momentObj,\n\t startDateId: _react.PropTypes.string,\n\t startDatePlaceholderText: _react.PropTypes.string,\n\t isStartDateFocused: _react.PropTypes.bool,\n\n\t endDate: _reactMomentProptypes2['default'].momentObj,\n\t endDateId: _react.PropTypes.string,\n\t endDatePlaceholderText: _react.PropTypes.string,\n\t isEndDateFocused: _react.PropTypes.bool,\n\n\t screenReaderMessage: _react.PropTypes.string,\n\t showClearDates: _react.PropTypes.bool,\n\t showCaret: _react.PropTypes.bool,\n\t showDefaultInputIcon: _react.PropTypes.bool,\n\t disabled: _react.PropTypes.bool,\n\t required: _react.PropTypes.bool,\n\n\t keepOpenOnDateSelect: _react.PropTypes.bool,\n\t reopenPickerOnClearDates: _react.PropTypes.bool,\n\t withFullScreenPortal: _react.PropTypes.bool,\n\t isOutsideRange: _react.PropTypes.func,\n\t displayFormat: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.func]),\n\n\t onFocusChange: _react.PropTypes.func,\n\t onDatesChange: _react.PropTypes.func,\n\n\t customInputIcon: _react.PropTypes.node,\n\t customArrowIcon: _react.PropTypes.node,\n\n\t // i18n\n\t phrases: _react.PropTypes.shape({\n\t clearDates: _react.PropTypes.node\n\t })\n\t};\n\n\tvar defaultProps = {\n\t startDate: null,\n\t startDateId: _constants.START_DATE,\n\t startDatePlaceholderText: 'Start Date',\n\t isStartDateFocused: false,\n\n\t endDate: null,\n\t endDateId: _constants.END_DATE,\n\t endDatePlaceholderText: 'End Date',\n\t isEndDateFocused: false,\n\n\t screenReaderMessage: '',\n\t showClearDates: false,\n\t showCaret: false,\n\t showDefaultInputIcon: false,\n\t disabled: false,\n\t required: false,\n\n\t keepOpenOnDateSelect: false,\n\t reopenPickerOnClearDates: false,\n\t withFullScreenPortal: false,\n\t isOutsideRange: function () {\n\t function isOutsideRange(day) {\n\t return !(0, _isInclusivelyAfterDay2['default'])(day, (0, _moment2['default'])());\n\t }\n\n\t return isOutsideRange;\n\t }(),\n\t displayFormat: function () {\n\t function displayFormat() {\n\t return _moment2['default'].localeData().longDateFormat('L');\n\t }\n\n\t return displayFormat;\n\t }(),\n\n\t onFocusChange: function () {\n\t function onFocusChange() {}\n\n\t return onFocusChange;\n\t }(),\n\t onDatesChange: function () {\n\t function onDatesChange() {}\n\n\t return onDatesChange;\n\t }(),\n\n\t customInputIcon: null,\n\t customArrowIcon: null,\n\n\t // i18n\n\t phrases: {\n\t clearDates: 'Clear Dates'\n\t }\n\t};\n\n\tvar DateRangePickerInputWithHandlers = function (_React$Component) {\n\t _inherits(DateRangePickerInputWithHandlers, _React$Component);\n\n\t function DateRangePickerInputWithHandlers(props) {\n\t _classCallCheck(this, DateRangePickerInputWithHandlers);\n\n\t var _this = _possibleConstructorReturn(this, (DateRangePickerInputWithHandlers.__proto__ || Object.getPrototypeOf(DateRangePickerInputWithHandlers)).call(this, props));\n\n\t _this.onClearFocus = _this.onClearFocus.bind(_this);\n\t _this.onStartDateChange = _this.onStartDateChange.bind(_this);\n\t _this.onStartDateFocus = _this.onStartDateFocus.bind(_this);\n\t _this.onEndDateChange = _this.onEndDateChange.bind(_this);\n\t _this.onEndDateFocus = _this.onEndDateFocus.bind(_this);\n\t _this.clearDates = _this.clearDates.bind(_this);\n\t return _this;\n\t }\n\n\t _createClass(DateRangePickerInputWithHandlers, [{\n\t key: 'onClearFocus',\n\t value: function () {\n\t function onClearFocus() {\n\t this.props.onFocusChange(null);\n\t }\n\n\t return onClearFocus;\n\t }()\n\t }, {\n\t key: 'onEndDateChange',\n\t value: function () {\n\t function onEndDateChange(endDateString) {\n\t var _props = this.props;\n\t var startDate = _props.startDate;\n\t var isOutsideRange = _props.isOutsideRange;\n\t var keepOpenOnDateSelect = _props.keepOpenOnDateSelect;\n\t var onDatesChange = _props.onDatesChange;\n\t var onFocusChange = _props.onFocusChange;\n\n\t var endDate = (0, _toMomentObject2['default'])(endDateString, this.getDisplayFormat());\n\n\t var isEndDateValid = endDate && !isOutsideRange(endDate) && !(0, _isInclusivelyBeforeDay2['default'])(endDate, startDate);\n\t if (isEndDateValid) {\n\t onDatesChange({ startDate: startDate, endDate: endDate });\n\t if (!keepOpenOnDateSelect) onFocusChange(null);\n\t } else {\n\t onDatesChange({\n\t startDate: startDate,\n\t endDate: null\n\t });\n\t }\n\t }\n\n\t return onEndDateChange;\n\t }()\n\t }, {\n\t key: 'onEndDateFocus',\n\t value: function () {\n\t function onEndDateFocus() {\n\t var _props2 = this.props;\n\t var startDate = _props2.startDate;\n\t var onFocusChange = _props2.onFocusChange;\n\t var withFullScreenPortal = _props2.withFullScreenPortal;\n\t var disabled = _props2.disabled;\n\n\t if (!startDate && withFullScreenPortal && !disabled) {\n\t // When the datepicker is full screen, we never want to focus the end date first\n\t // because there's no indication that that is the case once the datepicker is open and it\n\t // might confuse the user\n\t onFocusChange(_constants.START_DATE);\n\t } else if (!disabled) {\n\t onFocusChange(_constants.END_DATE);\n\t }\n\t }\n\n\t return onEndDateFocus;\n\t }()\n\t }, {\n\t key: 'onStartDateChange',\n\t value: function () {\n\t function onStartDateChange(startDateString) {\n\t var startDate = (0, _toMomentObject2['default'])(startDateString, this.getDisplayFormat());\n\n\t var endDate = this.props.endDate;\n\t var _props3 = this.props;\n\t var isOutsideRange = _props3.isOutsideRange;\n\t var onDatesChange = _props3.onDatesChange;\n\t var onFocusChange = _props3.onFocusChange;\n\n\t var isStartDateValid = startDate && !isOutsideRange(startDate);\n\t if (isStartDateValid) {\n\t if ((0, _isInclusivelyBeforeDay2['default'])(endDate, startDate)) {\n\t endDate = null;\n\t }\n\n\t onDatesChange({ startDate: startDate, endDate: endDate });\n\t onFocusChange(_constants.END_DATE);\n\t } else {\n\t onDatesChange({\n\t startDate: null,\n\t endDate: endDate\n\t });\n\t }\n\t }\n\n\t return onStartDateChange;\n\t }()\n\t }, {\n\t key: 'onStartDateFocus',\n\t value: function () {\n\t function onStartDateFocus() {\n\t if (!this.props.disabled) {\n\t this.props.onFocusChange(_constants.START_DATE);\n\t }\n\t }\n\n\t return onStartDateFocus;\n\t }()\n\t }, {\n\t key: 'getDisplayFormat',\n\t value: function () {\n\t function getDisplayFormat() {\n\t var displayFormat = this.props.displayFormat;\n\n\t return typeof displayFormat === 'string' ? displayFormat : displayFormat();\n\t }\n\n\t return getDisplayFormat;\n\t }()\n\t }, {\n\t key: 'getDateString',\n\t value: function () {\n\t function getDateString(date) {\n\t var displayFormat = this.getDisplayFormat();\n\t if (date && displayFormat) {\n\t return date && date.format(displayFormat);\n\t }\n\t return (0, _toLocalizedDateString2['default'])(date);\n\t }\n\n\t return getDateString;\n\t }()\n\t }, {\n\t key: 'clearDates',\n\t value: function () {\n\t function clearDates() {\n\t var _props4 = this.props;\n\t var onDatesChange = _props4.onDatesChange;\n\t var reopenPickerOnClearDates = _props4.reopenPickerOnClearDates;\n\t var onFocusChange = _props4.onFocusChange;\n\n\t onDatesChange({ startDate: null, endDate: null });\n\t if (reopenPickerOnClearDates) {\n\t onFocusChange(_constants.START_DATE);\n\t }\n\t }\n\n\t return clearDates;\n\t }()\n\t }, {\n\t key: 'render',\n\t value: function () {\n\t function render() {\n\t var _props5 = this.props;\n\t var startDate = _props5.startDate;\n\t var startDateId = _props5.startDateId;\n\t var startDatePlaceholderText = _props5.startDatePlaceholderText;\n\t var isStartDateFocused = _props5.isStartDateFocused;\n\t var endDate = _props5.endDate;\n\t var endDateId = _props5.endDateId;\n\t var endDatePlaceholderText = _props5.endDatePlaceholderText;\n\t var isEndDateFocused = _props5.isEndDateFocused;\n\t var screenReaderMessage = _props5.screenReaderMessage;\n\t var showClearDates = _props5.showClearDates;\n\t var showCaret = _props5.showCaret;\n\t var showDefaultInputIcon = _props5.showDefaultInputIcon;\n\t var customInputIcon = _props5.customInputIcon;\n\t var customArrowIcon = _props5.customArrowIcon;\n\t var disabled = _props5.disabled;\n\t var required = _props5.required;\n\t var phrases = _props5.phrases;\n\n\t var startDateString = this.getDateString(startDate);\n\t var startDateValue = (0, _toISODateString2['default'])(startDate);\n\t var endDateString = this.getDateString(endDate);\n\t var endDateValue = (0, _toISODateString2['default'])(endDate);\n\n\t return _react2['default'].createElement(_DateRangePickerInput2['default'], {\n\t startDate: startDateString,\n\t startDateValue: startDateValue,\n\t startDateId: startDateId,\n\t startDatePlaceholderText: startDatePlaceholderText,\n\t isStartDateFocused: isStartDateFocused,\n\t endDate: endDateString,\n\t endDateValue: endDateValue,\n\t endDateId: endDateId,\n\t endDatePlaceholderText: endDatePlaceholderText,\n\t isEndDateFocused: isEndDateFocused,\n\t disabled: disabled,\n\t required: required,\n\t showCaret: showCaret,\n\t showDefaultInputIcon: showDefaultInputIcon,\n\t customInputIcon: customInputIcon,\n\t customArrowIcon: customArrowIcon,\n\t phrases: phrases,\n\t onStartDateChange: this.onStartDateChange,\n\t onStartDateFocus: this.onStartDateFocus,\n\t onStartDateShiftTab: this.onClearFocus,\n\t onEndDateChange: this.onEndDateChange,\n\t onEndDateFocus: this.onEndDateFocus,\n\t onEndDateTab: this.onClearFocus,\n\t showClearDates: showClearDates,\n\t onClearDates: this.clearDates,\n\t screenReaderMessage: screenReaderMessage\n\t });\n\t }\n\n\t return render;\n\t }()\n\t }]);\n\n\t return DateRangePickerInputWithHandlers;\n\t}(_react2['default'].Component);\n\n\texports['default'] = DateRangePickerInputWithHandlers;\n\n\tDateRangePickerInputWithHandlers.propTypes = propTypes;\n\tDateRangePickerInputWithHandlers.defaultProps = defaultProps;\n\n/***/ },\n/* 1 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! react */ 1);\n\n/***/ },\n/* 2 */,\n/* 3 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! react-moment-proptypes */ 80);\n\n/***/ },\n/* 4 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! moment */ 3);\n\n/***/ },\n/* 5 */,\n/* 6 */,\n/* 7 */,\n/* 8 */,\n/* 9 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! ../../constants */ 29);\n\n/***/ },\n/* 10 */,\n/* 11 */,\n/* 12 */,\n/* 13 */,\n/* 14 */,\n/* 15 */,\n/* 16 */,\n/* 17 */,\n/* 18 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! ../utils/isInclusivelyAfterDay */ 121);\n\n/***/ },\n/* 19 */,\n/* 20 */,\n/* 21 */,\n/* 22 */,\n/* 23 */,\n/* 24 */,\n/* 25 */,\n/* 26 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! ./DateRangePickerInput */ 517);\n\n/***/ },\n/* 27 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! ../utils/toMomentObject */ 122);\n\n/***/ },\n/* 28 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! ../utils/toLocalizedDateString */ 244);\n\n/***/ },\n/* 29 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! ../utils/toISODateString */ 243);\n\n/***/ },\n/* 30 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! ../utils/isInclusivelyBeforeDay */ 528);\n\n/***/ }\n/******/ ]);\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dates/lib/components/DateRangePickerInputController.js\n// module id = 518\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dates/lib/components/DateRangePickerInputController.js?", + ); + + /***/ + }, + /* 519 */ + /* unknown exports provided */ + /* all exports used */ + /*!******************************************************************!*\ + !*** ./~/react-dates/lib/components/DayPickerRangeController.js ***! + \******************************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "module.exports =\n/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n\n\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ function(module, exports, __webpack_require__) {\n\n\tvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\n\tvar _createClass = function () {\n\t function defineProperties(target, props) {\n\t for (var i = 0; i < props.length; i++) {\n\t 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);\n\t }\n\t }return function (Constructor, protoProps, staticProps) {\n\t if (protoProps) defineProperties(Constructor.prototype, protoProps);if (staticProps) defineProperties(Constructor, staticProps);return Constructor;\n\t };\n\t}();\n\n\tvar _react = __webpack_require__(1);\n\n\tvar _react2 = _interopRequireDefault(_react);\n\n\tvar _reactMomentProptypes = __webpack_require__(3);\n\n\tvar _reactMomentProptypes2 = _interopRequireDefault(_reactMomentProptypes);\n\n\tvar _moment = __webpack_require__(4);\n\n\tvar _moment2 = _interopRequireDefault(_moment);\n\n\tvar _isTouchDevice = __webpack_require__(14);\n\n\tvar _isTouchDevice2 = _interopRequireDefault(_isTouchDevice);\n\n\tvar _isInclusivelyAfterDay = __webpack_require__(18);\n\n\tvar _isInclusivelyAfterDay2 = _interopRequireDefault(_isInclusivelyAfterDay);\n\n\tvar _isNextDay = __webpack_require__(36);\n\n\tvar _isNextDay2 = _interopRequireDefault(_isNextDay);\n\n\tvar _isSameDay = __webpack_require__(37);\n\n\tvar _isSameDay2 = _interopRequireDefault(_isSameDay);\n\n\tvar _FocusedInputShape = __webpack_require__(38);\n\n\tvar _FocusedInputShape2 = _interopRequireDefault(_FocusedInputShape);\n\n\tvar _ScrollableOrientationShape = __webpack_require__(8);\n\n\tvar _ScrollableOrientationShape2 = _interopRequireDefault(_ScrollableOrientationShape);\n\n\tvar _constants = __webpack_require__(9);\n\n\tvar _DayPicker = __webpack_require__(39);\n\n\tvar _DayPicker2 = _interopRequireDefault(_DayPicker);\n\n\tfunction _interopRequireDefault(obj) {\n\t return obj && obj.__esModule ? obj : { 'default': 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 _possibleConstructorReturn(self, call) {\n\t if (!self) {\n\t throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n\t }return call && ((typeof call === \"undefined\" ? \"undefined\" : _typeof(call)) === \"object\" || typeof call === \"function\") ? call : self;\n\t}\n\n\tfunction _inherits(subClass, superClass) {\n\t if (typeof superClass !== \"function\" && superClass !== null) {\n\t throw new TypeError(\"Super expression must either be null or a function, not \" + (typeof superClass === \"undefined\" ? \"undefined\" : _typeof(superClass)));\n\t }subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n\t}\n\n\tvar propTypes = {\n\t startDate: _reactMomentProptypes2['default'].momentObj,\n\t endDate: _reactMomentProptypes2['default'].momentObj,\n\t onDatesChange: _react.PropTypes.func,\n\n\t focusedInput: _FocusedInputShape2['default'],\n\t onFocusChange: _react.PropTypes.func,\n\n\t keepOpenOnDateSelect: _react.PropTypes.bool,\n\t minimumNights: _react.PropTypes.number,\n\t isOutsideRange: _react.PropTypes.func,\n\t isDayBlocked: _react.PropTypes.func,\n\t isDayHighlighted: _react.PropTypes.func,\n\n\t // DayPicker props\n\t enableOutsideDays: _react.PropTypes.bool,\n\t numberOfMonths: _react.PropTypes.number,\n\t orientation: _ScrollableOrientationShape2['default'],\n\t withPortal: _react.PropTypes.bool,\n\t hidden: _react.PropTypes.bool,\n\t initialVisibleMonth: _react.PropTypes.func,\n\n\t navPrev: _react.PropTypes.node,\n\t navNext: _react.PropTypes.node,\n\n\t onPrevMonthClick: _react.PropTypes.func,\n\t onNextMonthClick: _react.PropTypes.func,\n\t onOutsideClick: _react.PropTypes.func,\n\t renderDay: _react.PropTypes.func,\n\n\t // i18n\n\t monthFormat: _react.PropTypes.string\n\t};\n\n\tvar defaultProps = {\n\t startDate: undefined, // TODO: use null\n\t endDate: undefined, // TODO: use null\n\t onDatesChange: function () {\n\t function onDatesChange() {}\n\n\t return onDatesChange;\n\t }(),\n\n\t focusedInput: null,\n\t onFocusChange: function () {\n\t function onFocusChange() {}\n\n\t return onFocusChange;\n\t }(),\n\n\t keepOpenOnDateSelect: false,\n\t minimumNights: 1,\n\t isOutsideRange: function () {\n\t function isOutsideRange() {}\n\n\t return isOutsideRange;\n\t }(),\n\t isDayBlocked: function () {\n\t function isDayBlocked() {}\n\n\t return isDayBlocked;\n\t }(),\n\t isDayHighlighted: function () {\n\t function isDayHighlighted() {}\n\n\t return isDayHighlighted;\n\t }(),\n\n\t // DayPicker props\n\t enableOutsideDays: false,\n\t numberOfMonths: 1,\n\t orientation: _constants.HORIZONTAL_ORIENTATION,\n\t withPortal: false,\n\t hidden: false,\n\n\t initialVisibleMonth: function () {\n\t function initialVisibleMonth() {\n\t return (0, _moment2['default'])();\n\t }\n\n\t return initialVisibleMonth;\n\t }(),\n\n\t navPrev: null,\n\t navNext: null,\n\n\t onPrevMonthClick: function () {\n\t function onPrevMonthClick() {}\n\n\t return onPrevMonthClick;\n\t }(),\n\t onNextMonthClick: function () {\n\t function onNextMonthClick() {}\n\n\t return onNextMonthClick;\n\t }(),\n\t onOutsideClick: function () {\n\t function onOutsideClick() {}\n\n\t return onOutsideClick;\n\t }(),\n\n\t renderDay: null,\n\n\t // i18n\n\t monthFormat: 'MMMM YYYY'\n\t};\n\n\tvar DayPickerRangeController = function (_React$Component) {\n\t _inherits(DayPickerRangeController, _React$Component);\n\n\t function DayPickerRangeController(props) {\n\t _classCallCheck(this, DayPickerRangeController);\n\n\t var _this = _possibleConstructorReturn(this, (DayPickerRangeController.__proto__ || Object.getPrototypeOf(DayPickerRangeController)).call(this, props));\n\n\t _this.state = {\n\t hoverDate: null\n\t };\n\n\t _this.isTouchDevice = (0, _isTouchDevice2['default'])();\n\t _this.today = (0, _moment2['default'])();\n\n\t _this.onDayClick = _this.onDayClick.bind(_this);\n\t _this.onDayMouseEnter = _this.onDayMouseEnter.bind(_this);\n\t _this.onDayMouseLeave = _this.onDayMouseLeave.bind(_this);\n\t return _this;\n\t }\n\n\t _createClass(DayPickerRangeController, [{\n\t key: 'componentWillUpdate',\n\t value: function () {\n\t function componentWillUpdate() {\n\t this.today = (0, _moment2['default'])();\n\t }\n\n\t return componentWillUpdate;\n\t }()\n\t }, {\n\t key: 'onDayClick',\n\t value: function () {\n\t function onDayClick(day, e) {\n\t var _props = this.props;\n\t var keepOpenOnDateSelect = _props.keepOpenOnDateSelect;\n\t var minimumNights = _props.minimumNights;\n\n\t if (e) e.preventDefault();\n\t if (this.isBlocked(day)) return;\n\n\t var focusedInput = this.props.focusedInput;\n\t var _props2 = this.props;\n\t var startDate = _props2.startDate;\n\t var endDate = _props2.endDate;\n\n\t if (focusedInput === _constants.START_DATE) {\n\t this.props.onFocusChange(_constants.END_DATE);\n\n\t startDate = day;\n\n\t if ((0, _isInclusivelyAfterDay2['default'])(day, endDate)) {\n\t endDate = null;\n\t }\n\t } else if (focusedInput === _constants.END_DATE) {\n\t var firstAllowedEndDate = startDate && startDate.clone().add(minimumNights, 'days');\n\n\t if (!startDate) {\n\t endDate = day;\n\t this.props.onFocusChange(_constants.START_DATE);\n\t } else if ((0, _isInclusivelyAfterDay2['default'])(day, firstAllowedEndDate)) {\n\t endDate = day;\n\t if (!keepOpenOnDateSelect) this.props.onFocusChange(null);\n\t } else {\n\t startDate = day;\n\t endDate = null;\n\t }\n\t }\n\n\t this.props.onDatesChange({ startDate: startDate, endDate: endDate });\n\t }\n\n\t return onDayClick;\n\t }()\n\t }, {\n\t key: 'onDayMouseEnter',\n\t value: function () {\n\t function onDayMouseEnter(day) {\n\t if (this.isTouchDevice) return;\n\n\t this.setState({\n\t hoverDate: day\n\t });\n\t }\n\n\t return onDayMouseEnter;\n\t }()\n\t }, {\n\t key: 'onDayMouseLeave',\n\t value: function () {\n\t function onDayMouseLeave() {\n\t if (this.isTouchDevice) return;\n\n\t this.setState({\n\t hoverDate: null\n\t });\n\t }\n\n\t return onDayMouseLeave;\n\t }()\n\t }, {\n\t key: 'doesNotMeetMinimumNights',\n\t value: function () {\n\t function doesNotMeetMinimumNights(day) {\n\t var _props3 = this.props;\n\t var startDate = _props3.startDate;\n\t var isOutsideRange = _props3.isOutsideRange;\n\t var focusedInput = _props3.focusedInput;\n\t var minimumNights = _props3.minimumNights;\n\n\t if (focusedInput !== _constants.END_DATE) return false;\n\n\t if (startDate) {\n\t var dayDiff = day.diff(startDate.clone().startOf('day').hour(12), 'days');\n\t return dayDiff < minimumNights && dayDiff >= 0;\n\t }\n\t return isOutsideRange((0, _moment2['default'])(day).subtract(minimumNights, 'days'));\n\t }\n\n\t return doesNotMeetMinimumNights;\n\t }()\n\t }, {\n\t key: 'isDayAfterHoveredStartDate',\n\t value: function () {\n\t function isDayAfterHoveredStartDate(day) {\n\t var _props4 = this.props;\n\t var startDate = _props4.startDate;\n\t var endDate = _props4.endDate;\n\t var minimumNights = _props4.minimumNights;\n\t var hoverDate = this.state.hoverDate;\n\n\t return !!startDate && !endDate && !this.isBlocked(day) && (0, _isNextDay2['default'])(hoverDate, day) && minimumNights > 0 && (0, _isSameDay2['default'])(hoverDate, startDate);\n\t }\n\n\t return isDayAfterHoveredStartDate;\n\t }()\n\t }, {\n\t key: 'isEndDate',\n\t value: function () {\n\t function isEndDate(day) {\n\t return (0, _isSameDay2['default'])(day, this.props.endDate);\n\t }\n\n\t return isEndDate;\n\t }()\n\t }, {\n\t key: 'isHovered',\n\t value: function () {\n\t function isHovered(day) {\n\t return (0, _isSameDay2['default'])(day, this.state.hoverDate);\n\t }\n\n\t return isHovered;\n\t }()\n\t }, {\n\t key: 'isInHoveredSpan',\n\t value: function () {\n\t function isInHoveredSpan(day) {\n\t var _props5 = this.props;\n\t var startDate = _props5.startDate;\n\t var endDate = _props5.endDate;\n\t var hoverDate = this.state.hoverDate;\n\n\t var isForwardRange = !!startDate && !endDate && (day.isBetween(startDate, hoverDate) || (0, _isSameDay2['default'])(hoverDate, day));\n\t var isBackwardRange = !!endDate && !startDate && (day.isBetween(hoverDate, endDate) || (0, _isSameDay2['default'])(hoverDate, day));\n\n\t var isValidDayHovered = hoverDate && !this.isBlocked(hoverDate);\n\n\t return (isForwardRange || isBackwardRange) && isValidDayHovered;\n\t }\n\n\t return isInHoveredSpan;\n\t }()\n\t }, {\n\t key: 'isInSelectedSpan',\n\t value: function () {\n\t function isInSelectedSpan(day) {\n\t var _props6 = this.props;\n\t var startDate = _props6.startDate;\n\t var endDate = _props6.endDate;\n\n\t return day.isBetween(startDate, endDate);\n\t }\n\n\t return isInSelectedSpan;\n\t }()\n\t }, {\n\t key: 'isLastInRange',\n\t value: function () {\n\t function isLastInRange(day) {\n\t return this.isInSelectedSpan(day) && (0, _isNextDay2['default'])(day, this.props.endDate);\n\t }\n\n\t return isLastInRange;\n\t }()\n\t }, {\n\t key: 'isStartDate',\n\t value: function () {\n\t function isStartDate(day) {\n\t return (0, _isSameDay2['default'])(day, this.props.startDate);\n\t }\n\n\t return isStartDate;\n\t }()\n\t }, {\n\t key: 'isBlocked',\n\t value: function () {\n\t function isBlocked(day) {\n\t var _props7 = this.props;\n\t var isDayBlocked = _props7.isDayBlocked;\n\t var isOutsideRange = _props7.isOutsideRange;\n\n\t return isDayBlocked(day) || isOutsideRange(day) || this.doesNotMeetMinimumNights(day);\n\t }\n\n\t return isBlocked;\n\t }()\n\t }, {\n\t key: 'isToday',\n\t value: function () {\n\t function isToday(day) {\n\t return (0, _isSameDay2['default'])(day, this.today);\n\t }\n\n\t return isToday;\n\t }()\n\t }, {\n\t key: 'render',\n\t value: function () {\n\t function render() {\n\t var _this2 = this;\n\n\t var _props8 = this.props;\n\t var isDayBlocked = _props8.isDayBlocked;\n\t var isDayHighlighted = _props8.isDayHighlighted;\n\t var isOutsideRange = _props8.isOutsideRange;\n\t var numberOfMonths = _props8.numberOfMonths;\n\t var orientation = _props8.orientation;\n\t var monthFormat = _props8.monthFormat;\n\t var navPrev = _props8.navPrev;\n\t var navNext = _props8.navNext;\n\t var onOutsideClick = _props8.onOutsideClick;\n\t var onPrevMonthClick = _props8.onPrevMonthClick;\n\t var onNextMonthClick = _props8.onNextMonthClick;\n\t var withPortal = _props8.withPortal;\n\t var enableOutsideDays = _props8.enableOutsideDays;\n\t var initialVisibleMonth = _props8.initialVisibleMonth;\n\t var focusedInput = _props8.focusedInput;\n\t var renderDay = _props8.renderDay;\n\n\t var modifiers = {\n\t today: function () {\n\t function today(day) {\n\t return _this2.isToday(day);\n\t }\n\n\t return today;\n\t }(),\n\t blocked: function () {\n\t function blocked(day) {\n\t return _this2.isBlocked(day);\n\t }\n\n\t return blocked;\n\t }(),\n\t 'blocked-calendar': function () {\n\t function blockedCalendar(day) {\n\t return isDayBlocked(day);\n\t }\n\n\t return blockedCalendar;\n\t }(),\n\t 'blocked-out-of-range': function () {\n\t function blockedOutOfRange(day) {\n\t return isOutsideRange(day);\n\t }\n\n\t return blockedOutOfRange;\n\t }(),\n\t 'blocked-minimum-nights': function () {\n\t function blockedMinimumNights(day) {\n\t return _this2.doesNotMeetMinimumNights(day);\n\t }\n\n\t return blockedMinimumNights;\n\t }(),\n\t 'highlighted-calendar': function () {\n\t function highlightedCalendar(day) {\n\t return isDayHighlighted(day);\n\t }\n\n\t return highlightedCalendar;\n\t }(),\n\t valid: function () {\n\t function valid(day) {\n\t return !_this2.isBlocked(day);\n\t }\n\n\t return valid;\n\t }(),\n\t // before anything has been set or after both are set\n\t hovered: function () {\n\t function hovered(day) {\n\t return _this2.isHovered(day);\n\t }\n\n\t return hovered;\n\t }(),\n\n\t // while start date has been set, but end date has not been\n\t 'hovered-span': function () {\n\t function hoveredSpan(day) {\n\t return _this2.isInHoveredSpan(day);\n\t }\n\n\t return hoveredSpan;\n\t }(),\n\t 'after-hovered-start': function () {\n\t function afterHoveredStart(day) {\n\t return _this2.isDayAfterHoveredStartDate(day);\n\t }\n\n\t return afterHoveredStart;\n\t }(),\n\t 'last-in-range': function () {\n\t function lastInRange(day) {\n\t return _this2.isLastInRange(day);\n\t }\n\n\t return lastInRange;\n\t }(),\n\n\t // once a start date and end date have been set\n\t 'selected-start': function () {\n\t function selectedStart(day) {\n\t return _this2.isStartDate(day);\n\t }\n\n\t return selectedStart;\n\t }(),\n\t 'selected-end': function () {\n\t function selectedEnd(day) {\n\t return _this2.isEndDate(day);\n\t }\n\n\t return selectedEnd;\n\t }(),\n\t 'selected-span': function () {\n\t function selectedSpan(day) {\n\t return _this2.isInSelectedSpan(day);\n\t }\n\n\t return selectedSpan;\n\t }()\n\t };\n\n\t return _react2['default'].createElement(_DayPicker2['default'], {\n\t ref: function () {\n\t function ref(_ref) {\n\t _this2.dayPicker = _ref;\n\t }\n\n\t return ref;\n\t }(),\n\t orientation: orientation,\n\t enableOutsideDays: enableOutsideDays,\n\t modifiers: modifiers,\n\t numberOfMonths: numberOfMonths,\n\t onDayClick: this.onDayClick,\n\t onDayMouseEnter: this.onDayMouseEnter,\n\t onDayMouseLeave: this.onDayMouseLeave,\n\t onPrevMonthClick: onPrevMonthClick,\n\t onNextMonthClick: onNextMonthClick,\n\t monthFormat: monthFormat,\n\t withPortal: withPortal,\n\t hidden: !focusedInput,\n\t initialVisibleMonth: initialVisibleMonth,\n\t onOutsideClick: onOutsideClick,\n\t navPrev: navPrev,\n\t navNext: navNext,\n\t renderDay: renderDay\n\t });\n\t }\n\n\t return render;\n\t }()\n\t }]);\n\n\t return DayPickerRangeController;\n\t}(_react2['default'].Component);\n\n\texports['default'] = DayPickerRangeController;\n\n\tDayPickerRangeController.propTypes = propTypes;\n\tDayPickerRangeController.defaultProps = defaultProps;\n\n/***/ },\n/* 1 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! react */ 1);\n\n/***/ },\n/* 2 */,\n/* 3 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! react-moment-proptypes */ 80);\n\n/***/ },\n/* 4 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! moment */ 3);\n\n/***/ },\n/* 5 */,\n/* 6 */,\n/* 7 */,\n/* 8 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! ../shapes/ScrollableOrientationShape */ 120);\n\n/***/ },\n/* 9 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! ../../constants */ 29);\n\n/***/ },\n/* 10 */,\n/* 11 */,\n/* 12 */,\n/* 13 */,\n/* 14 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! ../utils/isTouchDevice */ 530);\n\n/***/ },\n/* 15 */,\n/* 16 */,\n/* 17 */,\n/* 18 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! ../utils/isInclusivelyAfterDay */ 121);\n\n/***/ },\n/* 19 */,\n/* 20 */,\n/* 21 */,\n/* 22 */,\n/* 23 */,\n/* 24 */,\n/* 25 */,\n/* 26 */,\n/* 27 */,\n/* 28 */,\n/* 29 */,\n/* 30 */,\n/* 31 */,\n/* 32 */,\n/* 33 */,\n/* 34 */,\n/* 35 */,\n/* 36 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! ../utils/isNextDay */ 529);\n\n/***/ },\n/* 37 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! ../utils/isSameDay */ 99);\n\n/***/ },\n/* 38 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! ../shapes/FocusedInputShape */ 523);\n\n/***/ },\n/* 39 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! ./DayPicker */ 241);\n\n/***/ }\n/******/ ]);\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dates/lib/components/DayPickerRangeController.js\n// module id = 519\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dates/lib/components/DayPickerRangeController.js?", + ); + + /***/ + }, + /* 520 */ + /* unknown exports provided */ + /* all exports used */ + /*!***************************************************************!*\ + !*** ./~/react-dates/lib/components/SingleDatePickerInput.js ***! + \***************************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + 'module.exports =\n/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n\n\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = "";\n\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ({\n\n/***/ 0:\n/***/ function(module, exports, __webpack_require__) {\n\n\tvar _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };\n\n\tObject.defineProperty(exports, "__esModule", {\n\t value: true\n\t});\n\n\tvar _createClass = function () {\n\t function defineProperties(target, props) {\n\t for (var i = 0; i < props.length; i++) {\n\t 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);\n\t }\n\t }return function (Constructor, protoProps, staticProps) {\n\t if (protoProps) defineProperties(Constructor.prototype, protoProps);if (staticProps) defineProperties(Constructor, staticProps);return Constructor;\n\t };\n\t}();\n\n\tvar _react = __webpack_require__(1);\n\n\tvar _react2 = _interopRequireDefault(_react);\n\n\tvar _airbnbPropTypes = __webpack_require__(42);\n\n\tvar _classnames = __webpack_require__(5);\n\n\tvar _classnames2 = _interopRequireDefault(_classnames);\n\n\tvar _DateInput = __webpack_require__(23);\n\n\tvar _DateInput2 = _interopRequireDefault(_DateInput);\n\n\tvar _close = __webpack_require__(21);\n\n\tvar _close2 = _interopRequireDefault(_close);\n\n\tfunction _interopRequireDefault(obj) {\n\t return obj && obj.__esModule ? obj : { \'default\': 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 _possibleConstructorReturn(self, call) {\n\t if (!self) {\n\t throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");\n\t }return call && ((typeof call === "undefined" ? "undefined" : _typeof(call)) === "object" || typeof call === "function") ? call : self;\n\t}\n\n\tfunction _inherits(subClass, superClass) {\n\t if (typeof superClass !== "function" && superClass !== null) {\n\t throw new TypeError("Super expression must either be null or a function, not " + (typeof superClass === "undefined" ? "undefined" : _typeof(superClass)));\n\t }subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n\t}\n\n\tvar propTypes = (0, _airbnbPropTypes.forbidExtraProps)({\n\t id: _react.PropTypes.string.isRequired,\n\t placeholder: _react.PropTypes.string, // also used as label\n\t displayValue: _react.PropTypes.string,\n\t inputValue: _react.PropTypes.string,\n\t screenReaderMessage: _react.PropTypes.string,\n\t focused: _react.PropTypes.bool,\n\t disabled: _react.PropTypes.bool,\n\t required: _react.PropTypes.bool,\n\t showCaret: _react.PropTypes.bool,\n\t showClearDate: _react.PropTypes.bool,\n\n\t onChange: _react.PropTypes.func,\n\t onClearDate: _react.PropTypes.func,\n\t onFocus: _react.PropTypes.func,\n\t onKeyDownShiftTab: _react.PropTypes.func,\n\t onKeyDownTab: _react.PropTypes.func,\n\n\t // i18n\n\t phrases: _react.PropTypes.shape({\n\t clearDate: _react.PropTypes.node\n\t })\n\t});\n\n\tvar defaultProps = {\n\t placeholder: \'Select Date\',\n\t displayValue: \'\',\n\t inputValue: \'\',\n\t screenReaderMessage: \'\',\n\t focused: false,\n\t disabled: false,\n\t required: false,\n\t showCaret: false,\n\t showClearDate: false,\n\n\t onChange: function () {\n\t function onChange() {}\n\n\t return onChange;\n\t }(),\n\t onClearDate: function () {\n\t function onClearDate() {}\n\n\t return onClearDate;\n\t }(),\n\t onFocus: function () {\n\t function onFocus() {}\n\n\t return onFocus;\n\t }(),\n\t onKeyDownShiftTab: function () {\n\t function onKeyDownShiftTab() {}\n\n\t return onKeyDownShiftTab;\n\t }(),\n\t onKeyDownTab: function () {\n\t function onKeyDownTab() {}\n\n\t return onKeyDownTab;\n\t }(),\n\n\t // i18n\n\t phrases: {\n\t clearDate: \'Clear Date\'\n\t }\n\t};\n\n\tvar SingleDatePickerInput = function (_React$Component) {\n\t _inherits(SingleDatePickerInput, _React$Component);\n\n\t function SingleDatePickerInput(props) {\n\t _classCallCheck(this, SingleDatePickerInput);\n\n\t var _this = _possibleConstructorReturn(this, (SingleDatePickerInput.__proto__ || Object.getPrototypeOf(SingleDatePickerInput)).call(this, props));\n\n\t _this.state = {\n\t isClearDateHovered: false\n\t };\n\n\t _this.onClearDateMouseEnter = _this.onClearDateMouseEnter.bind(_this);\n\t _this.onClearDateMouseLeave = _this.onClearDateMouseLeave.bind(_this);\n\t return _this;\n\t }\n\n\t _createClass(SingleDatePickerInput, [{\n\t key: \'onClearDateMouseEnter\',\n\t value: function () {\n\t function onClearDateMouseEnter() {\n\t this.setState({\n\t isClearDateHovered: true\n\t });\n\t }\n\n\t return onClearDateMouseEnter;\n\t }()\n\t }, {\n\t key: \'onClearDateMouseLeave\',\n\t value: function () {\n\t function onClearDateMouseLeave() {\n\t this.setState({\n\t isClearDateHovered: false\n\t });\n\t }\n\n\t return onClearDateMouseLeave;\n\t }()\n\t }, {\n\t key: \'render\',\n\t value: function () {\n\t function render() {\n\t var isClearDateHovered = this.state.isClearDateHovered;\n\t var _props = this.props;\n\t var id = _props.id;\n\t var placeholder = _props.placeholder;\n\t var displayValue = _props.displayValue;\n\t var inputValue = _props.inputValue;\n\t var focused = _props.focused;\n\t var disabled = _props.disabled;\n\t var required = _props.required;\n\t var showCaret = _props.showCaret;\n\t var showClearDate = _props.showClearDate;\n\t var phrases = _props.phrases;\n\t var onClearDate = _props.onClearDate;\n\t var onChange = _props.onChange;\n\t var onFocus = _props.onFocus;\n\t var onKeyDownShiftTab = _props.onKeyDownShiftTab;\n\t var onKeyDownTab = _props.onKeyDownTab;\n\t var screenReaderMessage = _props.screenReaderMessage;\n\n\t return _react2[\'default\'].createElement(\'div\', { className: \'SingleDatePickerInput\' }, _react2[\'default\'].createElement(_DateInput2[\'default\'], {\n\t id: id,\n\t placeholder: placeholder // also used as label\n\t , displayValue: displayValue,\n\t inputValue: inputValue,\n\t screenReaderMessage: screenReaderMessage,\n\t focused: focused,\n\t disabled: disabled,\n\t required: required,\n\t showCaret: showCaret,\n\n\t onChange: onChange,\n\t onFocus: onFocus,\n\t onKeyDownShiftTab: onKeyDownShiftTab,\n\t onKeyDownTab: onKeyDownTab\n\t }), showClearDate && _react2[\'default\'].createElement(\'button\', {\n\t type: \'button\',\n\t className: (0, _classnames2[\'default\'])(\'SingleDatePickerInput__clear-date\', {\n\t \'SingleDatePickerInput__clear-date--hide\': !displayValue,\n\t \'SingleDatePickerInput__clear-date--hover\': isClearDateHovered\n\t }),\n\t onMouseEnter: this.onClearDateMouseEnter,\n\t onMouseLeave: this.onClearDateMouseLeave,\n\t onClick: onClearDate\n\t }, _react2[\'default\'].createElement(\'span\', { className: \'screen-reader-only\' }, phrases.clearDate), _react2[\'default\'].createElement(_close2[\'default\'], null)));\n\t }\n\n\t return render;\n\t }()\n\t }]);\n\n\t return SingleDatePickerInput;\n\t}(_react2[\'default\'].Component);\n\n\texports[\'default\'] = SingleDatePickerInput;\n\n\tSingleDatePickerInput.propTypes = propTypes;\n\tSingleDatePickerInput.defaultProps = defaultProps;\n\n/***/ },\n\n/***/ 1:\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! react */ 1);\n\n/***/ },\n\n/***/ 5:\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! classnames */ 2);\n\n/***/ },\n\n/***/ 21:\n/***/ function(module, exports, __webpack_require__) {\n\n\tObject.defineProperty(exports, "__esModule", {\n\t value: true\n\t});\n\n\tvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\n\tvar _react = __webpack_require__(1);\n\n\tvar _react2 = _interopRequireDefault(_react);\n\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }\n\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }\n\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\tvar SVG = function (_React$Component) {\n\t _inherits(SVG, _React$Component);\n\n\t function SVG() {\n\t _classCallCheck(this, SVG);\n\n\t return _possibleConstructorReturn(this, (SVG.__proto__ || Object.getPrototypeOf(SVG)).apply(this, arguments));\n\t }\n\n\t _createClass(SVG, [{\n\t key: "render",\n\t value: function () {\n\t function render() {\n\t return _react2["default"].createElement(\n\t "svg",\n\t _extends({ viewBox: "0 0 12 12" }, this.props),\n\t _react2["default"].createElement("path", { fillRule: "evenodd", d: "M11.53.47a.75.75 0 0 0-1.061 0l-4.47 4.47L1.529.47A.75.75 0 1 0 .468 1.531l4.47 4.47-4.47 4.47a.75.75 0 1 0 1.061 1.061l4.47-4.47 4.47 4.47a.75.75 0 1 0 1.061-1.061l-4.47-4.47 4.47-4.47a.75.75 0 0 0 0-1.061z" })\n\t );\n\t }\n\n\t return render;\n\t }()\n\t }]);\n\n\t return SVG;\n\t}(_react2["default"].Component);\n\n\texports["default"] = SVG;\n\n/***/ },\n\n/***/ 23:\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! ./DateInput */ 516);\n\n/***/ },\n\n/***/ 42:\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! airbnb-prop-types */ 617);\n\n/***/ }\n\n/******/ });\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dates/lib/components/SingleDatePickerInput.js\n// module id = 520\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dates/lib/components/SingleDatePickerInput.js?', + ); + + /***/ + }, + /* 521 */ + /* unknown exports provided */ + /* all exports used */ + /*!**********************************************************!*\ + !*** ./~/react-dates/lib/shapes/AnchorDirectionShape.js ***! + \**********************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + 'Object.defineProperty(exports, "__esModule", {\n value: true\n});\n\nvar _react = __webpack_require__(/*! react */ 1);\n\nvar _constants = __webpack_require__(/*! ../../constants */ 29);\n\nexports[\'default\'] = _react.PropTypes.oneOf([_constants.ANCHOR_LEFT, _constants.ANCHOR_RIGHT]);\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dates/lib/shapes/AnchorDirectionShape.js\n// module id = 521\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dates/lib/shapes/AnchorDirectionShape.js?', + ); + + /***/ + }, + /* 522 */ + /* unknown exports provided */ + /* all exports used */ + /*!**********************************************************!*\ + !*** ./~/react-dates/lib/shapes/DateRangePickerShape.js ***! + \**********************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "Object.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _react = __webpack_require__(/*! react */ 1);\n\nvar _reactMomentProptypes = __webpack_require__(/*! react-moment-proptypes */ 80);\n\nvar _reactMomentProptypes2 = _interopRequireDefault(_reactMomentProptypes);\n\nvar _FocusedInputShape = __webpack_require__(/*! ../shapes/FocusedInputShape */ 523);\n\nvar _FocusedInputShape2 = _interopRequireDefault(_FocusedInputShape);\n\nvar _OrientationShape = __webpack_require__(/*! ../shapes/OrientationShape */ 524);\n\nvar _OrientationShape2 = _interopRequireDefault(_OrientationShape);\n\nvar _AnchorDirectionShape = __webpack_require__(/*! ../shapes/AnchorDirectionShape */ 521);\n\nvar _AnchorDirectionShape2 = _interopRequireDefault(_AnchorDirectionShape);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nexports['default'] = {\n startDate: _reactMomentProptypes2['default'].momentObj,\n endDate: _reactMomentProptypes2['default'].momentObj,\n focusedInput: _FocusedInputShape2['default'],\n screenReaderInputMessage: _react.PropTypes.string,\n minimumNights: _react.PropTypes.number,\n isDayBlocked: _react.PropTypes.func,\n isOutsideRange: _react.PropTypes.func,\n enableOutsideDays: _react.PropTypes.bool,\n reopenPickerOnClearDates: _react.PropTypes.bool,\n keepOpenOnDateSelect: _react.PropTypes.bool,\n numberOfMonths: _react.PropTypes.number,\n showClearDates: _react.PropTypes.bool,\n disabled: _react.PropTypes.bool,\n required: _react.PropTypes.bool,\n showDefaultInputIcon: _react.PropTypes.bool,\n\n orientation: _OrientationShape2['default'],\n anchorDirection: _AnchorDirectionShape2['default'],\n horizontalMargin: _react.PropTypes.number,\n // portal options\n withPortal: _react.PropTypes.bool,\n withFullScreenPortal: _react.PropTypes.bool,\n\n startDateId: _react.PropTypes.string,\n startDatePlaceholderText: _react.PropTypes.string,\n endDateId: _react.PropTypes.string,\n endDatePlaceholderText: _react.PropTypes.string,\n\n initialVisibleMonth: _react.PropTypes.func,\n onDatesChange: _react.PropTypes.func,\n onFocusChange: _react.PropTypes.func,\n onPrevMonthClick: _react.PropTypes.func,\n onNextMonthClick: _react.PropTypes.func,\n\n renderDay: _react.PropTypes.func,\n\n // i18n\n displayFormat: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.func]),\n monthFormat: _react.PropTypes.string,\n phrases: _react.PropTypes.shape({\n closeDatePicker: _react.PropTypes.node,\n clearDates: _react.PropTypes.node\n })\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dates/lib/shapes/DateRangePickerShape.js\n// module id = 522\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dates/lib/shapes/DateRangePickerShape.js?", + ); + + /***/ + }, + /* 523 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************************************!*\ + !*** ./~/react-dates/lib/shapes/FocusedInputShape.js ***! + \*******************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + 'Object.defineProperty(exports, "__esModule", {\n value: true\n});\n\nvar _react = __webpack_require__(/*! react */ 1);\n\nvar _constants = __webpack_require__(/*! ../../constants */ 29);\n\nexports[\'default\'] = _react.PropTypes.oneOf([_constants.START_DATE, _constants.END_DATE]);\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dates/lib/shapes/FocusedInputShape.js\n// module id = 523\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dates/lib/shapes/FocusedInputShape.js?', + ); + + /***/ + }, + /* 524 */ + /* unknown exports provided */ + /* all exports used */ + /*!******************************************************!*\ + !*** ./~/react-dates/lib/shapes/OrientationShape.js ***! + \******************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + 'Object.defineProperty(exports, "__esModule", {\n value: true\n});\n\nvar _react = __webpack_require__(/*! react */ 1);\n\nvar _constants = __webpack_require__(/*! ../../constants */ 29);\n\nexports[\'default\'] = _react.PropTypes.oneOf([_constants.HORIZONTAL_ORIENTATION, _constants.VERTICAL_ORIENTATION]);\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dates/lib/shapes/OrientationShape.js\n// module id = 524\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dates/lib/shapes/OrientationShape.js?', + ); + + /***/ + }, + /* 525 */ + /* unknown exports provided */ + /* all exports used */ + /*!***********************************************************!*\ + !*** ./~/react-dates/lib/shapes/SingleDatePickerShape.js ***! + \***********************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "Object.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _react = __webpack_require__(/*! react */ 1);\n\nvar _reactMomentProptypes = __webpack_require__(/*! react-moment-proptypes */ 80);\n\nvar _reactMomentProptypes2 = _interopRequireDefault(_reactMomentProptypes);\n\nvar _OrientationShape = __webpack_require__(/*! ../shapes/OrientationShape */ 524);\n\nvar _OrientationShape2 = _interopRequireDefault(_OrientationShape);\n\nvar _AnchorDirectionShape = __webpack_require__(/*! ../shapes/AnchorDirectionShape */ 521);\n\nvar _AnchorDirectionShape2 = _interopRequireDefault(_AnchorDirectionShape);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nexports['default'] = {\n id: _react.PropTypes.string.isRequired,\n placeholder: _react.PropTypes.string,\n date: _reactMomentProptypes2['default'].momentObj,\n focused: _react.PropTypes.bool,\n showClearDate: _react.PropTypes.bool,\n reopenPickerOnClearDates: _react.PropTypes.bool,\n keepOpenOnDateSelect: _react.PropTypes.bool,\n disabled: _react.PropTypes.bool,\n required: _react.PropTypes.bool,\n screenReaderInputMessage: _react.PropTypes.string,\n\n onDateChange: _react.PropTypes.func,\n onFocusChange: _react.PropTypes.func,\n\n isDayBlocked: _react.PropTypes.func,\n isOutsideRange: _react.PropTypes.func,\n enableOutsideDays: _react.PropTypes.bool,\n numberOfMonths: _react.PropTypes.number,\n orientation: _OrientationShape2['default'],\n initialVisibleMonth: _react.PropTypes.func,\n anchorDirection: _AnchorDirectionShape2['default'],\n horizontalMargin: _react.PropTypes.number,\n\n navPrev: _react.PropTypes.node,\n navNext: _react.PropTypes.node,\n\n // portal options\n withPortal: _react.PropTypes.bool,\n withFullScreenPortal: _react.PropTypes.bool,\n\n onPrevMonthClick: _react.PropTypes.func,\n onNextMonthClick: _react.PropTypes.func,\n\n renderDay: _react.PropTypes.func,\n\n // i18n\n displayFormat: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.func]),\n monthFormat: _react.PropTypes.string,\n phrases: _react.PropTypes.shape({\n closeDatePicker: _react.PropTypes.node\n })\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dates/lib/shapes/SingleDatePickerShape.js\n// module id = 525\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dates/lib/shapes/SingleDatePickerShape.js?", + ); + + /***/ + }, + /* 526 */ + /* unknown exports provided */ + /* all exports used */ + /*!*****************************************************************!*\ + !*** ./~/react-dates/lib/utils/getResponsiveContainerStyles.js ***! + \*****************************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "Object.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports['default'] = getResponsiveContainerStyles;\n\nvar _constants = __webpack_require__(/*! ../../constants */ 29);\n\nfunction _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\nfunction getResponsiveContainerStyles(anchorDirection, currentOffset, containerEdge, margin) {\n var windowWidth = typeof window !== 'undefined' && window.innerWidth;\n var calculatedOffset = anchorDirection === _constants.ANCHOR_LEFT ? windowWidth - containerEdge : containerEdge;\n var calculatedMargin = margin || 0;\n\n return _defineProperty({}, anchorDirection, Math.min(currentOffset + calculatedOffset - calculatedMargin, 0));\n}\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dates/lib/utils/getResponsiveContainerStyles.js\n// module id = 526\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dates/lib/utils/getResponsiveContainerStyles.js?", + ); + + /***/ + }, + /* 527 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************************************!*\ + !*** ./~/react-dates/lib/utils/getTransformStyles.js ***! + \*******************************************************/ + /***/ function (module, exports) { + eval( + 'Object.defineProperty(exports, "__esModule", {\n value: true\n});\nexports["default"] = getTransformStyles;\nfunction getTransformStyles(transformValue) {\n return {\n transform: transformValue,\n msTransform: transformValue,\n MozTransform: transformValue,\n WebkitTransform: transformValue\n };\n}\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dates/lib/utils/getTransformStyles.js\n// module id = 527\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dates/lib/utils/getTransformStyles.js?', + ); + + /***/ + }, + /* 528 */ + /* unknown exports provided */ + /* all exports used */ + /*!***********************************************************!*\ + !*** ./~/react-dates/lib/utils/isInclusivelyBeforeDay.js ***! + \***********************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "Object.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports['default'] = isInclusivelyBeforeDay;\n\nvar _moment = __webpack_require__(/*! moment */ 3);\n\nvar _moment2 = _interopRequireDefault(_moment);\n\nvar _isSameDay = __webpack_require__(/*! ./isSameDay */ 99);\n\nvar _isSameDay2 = _interopRequireDefault(_isSameDay);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nfunction isInclusivelyBeforeDay(a, b) {\n if (!_moment2['default'].isMoment(a) || !_moment2['default'].isMoment(b)) return false;\n return a.isBefore(b) || (0, _isSameDay2['default'])(a, b);\n}\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dates/lib/utils/isInclusivelyBeforeDay.js\n// module id = 528\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dates/lib/utils/isInclusivelyBeforeDay.js?", + ); + + /***/ + }, + /* 529 */ + /* unknown exports provided */ + /* all exports used */ + /*!**********************************************!*\ + !*** ./~/react-dates/lib/utils/isNextDay.js ***! + \**********************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "Object.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports['default'] = isNextDay;\n\nvar _moment = __webpack_require__(/*! moment */ 3);\n\nvar _moment2 = _interopRequireDefault(_moment);\n\nvar _isSameDay = __webpack_require__(/*! ./isSameDay */ 99);\n\nvar _isSameDay2 = _interopRequireDefault(_isSameDay);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nfunction isNextDay(a, b) {\n if (!_moment2['default'].isMoment(a) || !_moment2['default'].isMoment(b)) return false;\n var nextDay = (0, _moment2['default'])(a).add(1, 'day');\n return (0, _isSameDay2['default'])(nextDay, b);\n}\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dates/lib/utils/isNextDay.js\n// module id = 529\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dates/lib/utils/isNextDay.js?", + ); + + /***/ + }, + /* 530 */ + /* unknown exports provided */ + /* all exports used */ + /*!**************************************************!*\ + !*** ./~/react-dates/lib/utils/isTouchDevice.js ***! + \**************************************************/ + /***/ function (module, exports) { + eval( + "Object.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports['default'] = isTouchDevice;\nfunction isTouchDevice() {\n return !!(typeof window !== 'undefined' && 'ontouchstart' in window) || !!(typeof navigator !== 'undefined' && navigator.maxTouchPoints);\n}\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dates/lib/utils/isTouchDevice.js\n// module id = 530\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dates/lib/utils/isTouchDevice.js?", + ); + + /***/ + }, + /* 531 */ + /* unknown exports provided */ + /* all exports used */ + /*!****************************************!*\ + !*** ./~/react-dom/lib/CSSProperty.js ***! + \****************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\n/**\n * CSS properties which accept numbers but are not in units of \"px\".\n */\n\nvar isUnitlessNumber = {\n animationIterationCount: true,\n borderImageOutset: true,\n borderImageSlice: true,\n borderImageWidth: true,\n boxFlex: true,\n boxFlexGroup: true,\n boxOrdinalGroup: true,\n columnCount: true,\n flex: true,\n flexGrow: true,\n flexPositive: true,\n flexShrink: true,\n flexNegative: true,\n flexOrder: true,\n gridRow: true,\n gridColumn: true,\n fontWeight: true,\n lineClamp: true,\n lineHeight: true,\n opacity: true,\n order: true,\n orphans: true,\n tabSize: true,\n widows: true,\n zIndex: true,\n zoom: true,\n\n // SVG-related properties\n fillOpacity: true,\n floodOpacity: true,\n stopOpacity: true,\n strokeDasharray: true,\n strokeDashoffset: true,\n strokeMiterlimit: true,\n strokeOpacity: true,\n strokeWidth: true\n};\n\n/**\n * @param {string} prefix vendor-specific prefix, eg: Webkit\n * @param {string} key style name, eg: transitionDuration\n * @return {string} style name prefixed with `prefix`, properly camelCased, eg:\n * WebkitTransitionDuration\n */\nfunction prefixKey(prefix, key) {\n return prefix + key.charAt(0).toUpperCase() + key.substring(1);\n}\n\n/**\n * Support style names that may come passed in prefixed by adding permutations\n * of vendor prefixes.\n */\nvar prefixes = ['Webkit', 'ms', 'Moz', 'O'];\n\n// Using Object.keys here, or else the vanilla for-in loop makes IE8 go into an\n// infinite loop, because it iterates over the newly added props too.\nObject.keys(isUnitlessNumber).forEach(function (prop) {\n prefixes.forEach(function (prefix) {\n isUnitlessNumber[prefixKey(prefix, prop)] = isUnitlessNumber[prop];\n });\n});\n\n/**\n * Most style properties can be unset by doing .style[prop] = '' but IE8\n * doesn't like doing that with shorthand properties so for the properties that\n * IE8 breaks on, which are listed here, we instead unset each of the\n * individual properties. See http://bugs.jquery.com/ticket/12385.\n * The 4-value 'clock' properties like margin, padding, border-width seem to\n * behave without any problems. Curiously, list-style works too without any\n * special prodding.\n */\nvar shorthandPropertyExpansions = {\n background: {\n backgroundAttachment: true,\n backgroundColor: true,\n backgroundImage: true,\n backgroundPositionX: true,\n backgroundPositionY: true,\n backgroundRepeat: true\n },\n backgroundPosition: {\n backgroundPositionX: true,\n backgroundPositionY: true\n },\n border: {\n borderWidth: true,\n borderStyle: true,\n borderColor: true\n },\n borderBottom: {\n borderBottomWidth: true,\n borderBottomStyle: true,\n borderBottomColor: true\n },\n borderLeft: {\n borderLeftWidth: true,\n borderLeftStyle: true,\n borderLeftColor: true\n },\n borderRight: {\n borderRightWidth: true,\n borderRightStyle: true,\n borderRightColor: true\n },\n borderTop: {\n borderTopWidth: true,\n borderTopStyle: true,\n borderTopColor: true\n },\n font: {\n fontStyle: true,\n fontVariant: true,\n fontWeight: true,\n fontSize: true,\n lineHeight: true,\n fontFamily: true\n },\n outline: {\n outlineWidth: true,\n outlineStyle: true,\n outlineColor: true\n }\n};\n\nvar CSSProperty = {\n isUnitlessNumber: isUnitlessNumber,\n shorthandPropertyExpansions: shorthandPropertyExpansions\n};\n\nmodule.exports = CSSProperty;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/CSSProperty.js\n// module id = 531\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/CSSProperty.js?", + ); + + /***/ + }, + /* 532 */ + /* unknown exports provided */ + /* all exports used */ + /*!******************************************!*\ + !*** ./~/react-dom/lib/CallbackQueue.js ***! + \******************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * \n */\n\n\n\nvar _prodInvariant = __webpack_require__(/*! ./reactProdInvariant */ 17);\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar PooledClass = __webpack_require__(/*! ./PooledClass */ 78);\n\nvar invariant = __webpack_require__(/*! fbjs/lib/invariant */ 12);\n\n/**\n * A specialized pseudo-event module to help keep track of components waiting to\n * be notified when their DOM representations are available for use.\n *\n * This implements `PooledClass`, so you should never need to instantiate this.\n * Instead, use `CallbackQueue.getPooled()`.\n *\n * @class ReactMountReady\n * @implements PooledClass\n * @internal\n */\n\nvar CallbackQueue = function () {\n function CallbackQueue(arg) {\n _classCallCheck(this, CallbackQueue);\n\n this._callbacks = null;\n this._contexts = null;\n this._arg = arg;\n }\n\n /**\n * Enqueues a callback to be invoked when `notifyAll` is invoked.\n *\n * @param {function} callback Invoked when `notifyAll` is invoked.\n * @param {?object} context Context to call `callback` with.\n * @internal\n */\n\n\n CallbackQueue.prototype.enqueue = function enqueue(callback, context) {\n this._callbacks = this._callbacks || [];\n this._callbacks.push(callback);\n this._contexts = this._contexts || [];\n this._contexts.push(context);\n };\n\n /**\n * Invokes all enqueued callbacks and clears the queue. This is invoked after\n * the DOM representation of a component has been created or updated.\n *\n * @internal\n */\n\n\n CallbackQueue.prototype.notifyAll = function notifyAll() {\n var callbacks = this._callbacks;\n var contexts = this._contexts;\n var arg = this._arg;\n if (callbacks && contexts) {\n !(callbacks.length === contexts.length) ? true ? invariant(false, 'Mismatched list of contexts in callback queue') : _prodInvariant('24') : void 0;\n this._callbacks = null;\n this._contexts = null;\n for (var i = 0; i < callbacks.length; i++) {\n callbacks[i].call(contexts[i], arg);\n }\n callbacks.length = 0;\n contexts.length = 0;\n }\n };\n\n CallbackQueue.prototype.checkpoint = function checkpoint() {\n return this._callbacks ? this._callbacks.length : 0;\n };\n\n CallbackQueue.prototype.rollback = function rollback(len) {\n if (this._callbacks && this._contexts) {\n this._callbacks.length = len;\n this._contexts.length = len;\n }\n };\n\n /**\n * Resets the internal queue.\n *\n * @internal\n */\n\n\n CallbackQueue.prototype.reset = function reset() {\n this._callbacks = null;\n this._contexts = null;\n };\n\n /**\n * `PooledClass` looks for this.\n */\n\n\n CallbackQueue.prototype.destructor = function destructor() {\n this.reset();\n };\n\n return CallbackQueue;\n}();\n\nmodule.exports = PooledClass.addPoolingTo(CallbackQueue);\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/CallbackQueue.js\n// module id = 532\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/CallbackQueue.js?", + ); + + /***/ + }, + /* 533 */ + /* unknown exports provided */ + /* all exports used */ + /*!**************************************************!*\ + !*** ./~/react-dom/lib/DOMPropertyOperations.js ***! + \**************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar DOMProperty = __webpack_require__(/*! ./DOMProperty */ 67);\nvar ReactDOMComponentTree = __webpack_require__(/*! ./ReactDOMComponentTree */ 24);\nvar ReactInstrumentation = __webpack_require__(/*! ./ReactInstrumentation */ 35);\n\nvar quoteAttributeValueForBrowser = __webpack_require__(/*! ./quoteAttributeValueForBrowser */ 1383);\nvar warning = __webpack_require__(/*! fbjs/lib/warning */ 13);\n\nvar VALID_ATTRIBUTE_NAME_REGEX = new RegExp('^[' + DOMProperty.ATTRIBUTE_NAME_START_CHAR + '][' + DOMProperty.ATTRIBUTE_NAME_CHAR + ']*$');\nvar illegalAttributeNameCache = {};\nvar validatedAttributeNameCache = {};\n\nfunction isAttributeNameSafe(attributeName) {\n if (validatedAttributeNameCache.hasOwnProperty(attributeName)) {\n return true;\n }\n if (illegalAttributeNameCache.hasOwnProperty(attributeName)) {\n return false;\n }\n if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) {\n validatedAttributeNameCache[attributeName] = true;\n return true;\n }\n illegalAttributeNameCache[attributeName] = true;\n true ? warning(false, 'Invalid attribute name: `%s`', attributeName) : void 0;\n return false;\n}\n\nfunction shouldIgnoreValue(propertyInfo, value) {\n return value == null || propertyInfo.hasBooleanValue && !value || propertyInfo.hasNumericValue && isNaN(value) || propertyInfo.hasPositiveNumericValue && value < 1 || propertyInfo.hasOverloadedBooleanValue && value === false;\n}\n\n/**\n * Operations for dealing with DOM properties.\n */\nvar DOMPropertyOperations = {\n\n /**\n * Creates markup for the ID property.\n *\n * @param {string} id Unescaped ID.\n * @return {string} Markup string.\n */\n createMarkupForID: function (id) {\n return DOMProperty.ID_ATTRIBUTE_NAME + '=' + quoteAttributeValueForBrowser(id);\n },\n\n setAttributeForID: function (node, id) {\n node.setAttribute(DOMProperty.ID_ATTRIBUTE_NAME, id);\n },\n\n createMarkupForRoot: function () {\n return DOMProperty.ROOT_ATTRIBUTE_NAME + '=\"\"';\n },\n\n setAttributeForRoot: function (node) {\n node.setAttribute(DOMProperty.ROOT_ATTRIBUTE_NAME, '');\n },\n\n /**\n * Creates markup for a property.\n *\n * @param {string} name\n * @param {*} value\n * @return {?string} Markup string, or null if the property was invalid.\n */\n createMarkupForProperty: function (name, value) {\n var propertyInfo = DOMProperty.properties.hasOwnProperty(name) ? DOMProperty.properties[name] : null;\n if (propertyInfo) {\n if (shouldIgnoreValue(propertyInfo, value)) {\n return '';\n }\n var attributeName = propertyInfo.attributeName;\n if (propertyInfo.hasBooleanValue || propertyInfo.hasOverloadedBooleanValue && value === true) {\n return attributeName + '=\"\"';\n }\n return attributeName + '=' + quoteAttributeValueForBrowser(value);\n } else if (DOMProperty.isCustomAttribute(name)) {\n if (value == null) {\n return '';\n }\n return name + '=' + quoteAttributeValueForBrowser(value);\n }\n return null;\n },\n\n /**\n * Creates markup for a custom property.\n *\n * @param {string} name\n * @param {*} value\n * @return {string} Markup string, or empty string if the property was invalid.\n */\n createMarkupForCustomAttribute: function (name, value) {\n if (!isAttributeNameSafe(name) || value == null) {\n return '';\n }\n return name + '=' + quoteAttributeValueForBrowser(value);\n },\n\n /**\n * Sets the value for a property on a node.\n *\n * @param {DOMElement} node\n * @param {string} name\n * @param {*} value\n */\n setValueForProperty: function (node, name, value) {\n var propertyInfo = DOMProperty.properties.hasOwnProperty(name) ? DOMProperty.properties[name] : null;\n if (propertyInfo) {\n var mutationMethod = propertyInfo.mutationMethod;\n if (mutationMethod) {\n mutationMethod(node, value);\n } else if (shouldIgnoreValue(propertyInfo, value)) {\n this.deleteValueForProperty(node, name);\n return;\n } else if (propertyInfo.mustUseProperty) {\n // Contrary to `setAttribute`, object properties are properly\n // `toString`ed by IE8/9.\n node[propertyInfo.propertyName] = value;\n } else {\n var attributeName = propertyInfo.attributeName;\n var namespace = propertyInfo.attributeNamespace;\n // `setAttribute` with objects becomes only `[object]` in IE8/9,\n // ('' + value) makes it output the correct toString()-value.\n if (namespace) {\n node.setAttributeNS(namespace, attributeName, '' + value);\n } else if (propertyInfo.hasBooleanValue || propertyInfo.hasOverloadedBooleanValue && value === true) {\n node.setAttribute(attributeName, '');\n } else {\n node.setAttribute(attributeName, '' + value);\n }\n }\n } else if (DOMProperty.isCustomAttribute(name)) {\n DOMPropertyOperations.setValueForAttribute(node, name, value);\n return;\n }\n\n if (true) {\n var payload = {};\n payload[name] = value;\n ReactInstrumentation.debugTool.onHostOperation({\n instanceID: ReactDOMComponentTree.getInstanceFromNode(node)._debugID,\n type: 'update attribute',\n payload: payload\n });\n }\n },\n\n setValueForAttribute: function (node, name, value) {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (value == null) {\n node.removeAttribute(name);\n } else {\n node.setAttribute(name, '' + value);\n }\n\n if (true) {\n var payload = {};\n payload[name] = value;\n ReactInstrumentation.debugTool.onHostOperation({\n instanceID: ReactDOMComponentTree.getInstanceFromNode(node)._debugID,\n type: 'update attribute',\n payload: payload\n });\n }\n },\n\n /**\n * Deletes an attributes from a node.\n *\n * @param {DOMElement} node\n * @param {string} name\n */\n deleteValueForAttribute: function (node, name) {\n node.removeAttribute(name);\n if (true) {\n ReactInstrumentation.debugTool.onHostOperation({\n instanceID: ReactDOMComponentTree.getInstanceFromNode(node)._debugID,\n type: 'remove attribute',\n payload: name\n });\n }\n },\n\n /**\n * Deletes the value for a property on a node.\n *\n * @param {DOMElement} node\n * @param {string} name\n */\n deleteValueForProperty: function (node, name) {\n var propertyInfo = DOMProperty.properties.hasOwnProperty(name) ? DOMProperty.properties[name] : null;\n if (propertyInfo) {\n var mutationMethod = propertyInfo.mutationMethod;\n if (mutationMethod) {\n mutationMethod(node, undefined);\n } else if (propertyInfo.mustUseProperty) {\n var propName = propertyInfo.propertyName;\n if (propertyInfo.hasBooleanValue) {\n node[propName] = false;\n } else {\n node[propName] = '';\n }\n } else {\n node.removeAttribute(propertyInfo.attributeName);\n }\n } else if (DOMProperty.isCustomAttribute(name)) {\n node.removeAttribute(name);\n }\n\n if (true) {\n ReactInstrumentation.debugTool.onHostOperation({\n instanceID: ReactDOMComponentTree.getInstanceFromNode(node)._debugID,\n type: 'remove attribute',\n payload: name\n });\n }\n }\n\n};\n\nmodule.exports = DOMPropertyOperations;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/DOMPropertyOperations.js\n// module id = 533\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/DOMPropertyOperations.js?", + ); + + /***/ + }, + /* 534 */ + /* unknown exports provided */ + /* all exports used */ + /*!***************************************************!*\ + !*** ./~/react-dom/lib/ReactDOMComponentFlags.js ***! + \***************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '/**\n * Copyright 2015-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar ReactDOMComponentFlags = {\n hasCachedChildNodes: 1 << 0\n};\n\nmodule.exports = ReactDOMComponentFlags;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/ReactDOMComponentFlags.js\n// module id = 534\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/ReactDOMComponentFlags.js?', + ); + + /***/ + }, + /* 535 */ + /* unknown exports provided */ + /* all exports used */ + /*!**************************************************!*\ + !*** ./~/react-dom/lib/ReactDOMContainerInfo.js ***! + \**************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar validateDOMNesting = __webpack_require__(/*! ./validateDOMNesting */ 260);\n\nvar DOC_NODE_TYPE = 9;\n\nfunction ReactDOMContainerInfo(topLevelWrapper, node) {\n var info = {\n _topLevelWrapper: topLevelWrapper,\n _idCounter: 1,\n _ownerDocument: node ? node.nodeType === DOC_NODE_TYPE ? node : node.ownerDocument : null,\n _node: node,\n _tag: node ? node.nodeName.toLowerCase() : null,\n _namespaceURI: node ? node.namespaceURI : null\n };\n if (true) {\n info._ancestorInfo = node ? validateDOMNesting.updatedAncestorInfo(null, info._tag, null) : null;\n }\n return info;\n}\n\nmodule.exports = ReactDOMContainerInfo;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/ReactDOMContainerInfo.js\n// module id = 535\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/ReactDOMContainerInfo.js?', + ); + + /***/ + }, + /* 536 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************************!*\ + !*** ./~/react-dom/lib/ReactDOMSelect.js ***! + \*******************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar _assign = __webpack_require__(/*! object-assign */ 21);\n\nvar LinkedValueUtils = __webpack_require__(/*! ./LinkedValueUtils */ 249);\nvar ReactDOMComponentTree = __webpack_require__(/*! ./ReactDOMComponentTree */ 24);\nvar ReactUpdates = __webpack_require__(/*! ./ReactUpdates */ 47);\n\nvar warning = __webpack_require__(/*! fbjs/lib/warning */ 13);\n\nvar didWarnValueLink = false;\nvar didWarnValueDefaultValue = false;\n\nfunction updateOptionsIfPendingUpdateAndMounted() {\n if (this._rootNodeID && this._wrapperState.pendingUpdate) {\n this._wrapperState.pendingUpdate = false;\n\n var props = this._currentElement.props;\n var value = LinkedValueUtils.getValue(props);\n\n if (value != null) {\n updateOptions(this, Boolean(props.multiple), value);\n }\n }\n}\n\nfunction getDeclarationErrorAddendum(owner) {\n if (owner) {\n var name = owner.getName();\n if (name) {\n return ' Check the render method of `' + name + '`.';\n }\n }\n return '';\n}\n\nvar valuePropNames = ['value', 'defaultValue'];\n\n/**\n * Validation function for `value` and `defaultValue`.\n * @private\n */\nfunction checkSelectPropTypes(inst, props) {\n var owner = inst._currentElement._owner;\n LinkedValueUtils.checkPropTypes('select', props, owner);\n\n if (props.valueLink !== undefined && !didWarnValueLink) {\n true ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0;\n didWarnValueLink = true;\n }\n\n for (var i = 0; i < valuePropNames.length; i++) {\n var propName = valuePropNames[i];\n if (props[propName] == null) {\n continue;\n }\n var isArray = Array.isArray(props[propName]);\n if (props.multiple && !isArray) {\n true ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n } else if (!props.multiple && isArray) {\n true ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n }\n }\n}\n\n/**\n * @param {ReactDOMComponent} inst\n * @param {boolean} multiple\n * @param {*} propValue A stringable (with `multiple`, a list of stringables).\n * @private\n */\nfunction updateOptions(inst, multiple, propValue) {\n var selectedValue, i;\n var options = ReactDOMComponentTree.getNodeFromInstance(inst).options;\n\n if (multiple) {\n selectedValue = {};\n for (i = 0; i < propValue.length; i++) {\n selectedValue['' + propValue[i]] = true;\n }\n for (i = 0; i < options.length; i++) {\n var selected = selectedValue.hasOwnProperty(options[i].value);\n if (options[i].selected !== selected) {\n options[i].selected = selected;\n }\n }\n } else {\n // Do not set `select.value` as exact behavior isn't consistent across all\n // browsers for all cases.\n selectedValue = '' + propValue;\n for (i = 0; i < options.length; i++) {\n if (options[i].value === selectedValue) {\n options[i].selected = true;\n return;\n }\n }\n if (options.length) {\n options[0].selected = true;\n }\n }\n}\n\n/**\n * Implements a <select> host component that allows optionally setting the\n * props `value` and `defaultValue`. If `multiple` is false, the prop must be a\n * stringable. If `multiple` is true, the prop must be an array of stringables.\n *\n * If `value` is not supplied (or null/undefined), user actions that change the\n * selected option will trigger updates to the rendered options.\n *\n * If it is supplied (and not null/undefined), the rendered options will not\n * update in response to user actions. Instead, the `value` prop must change in\n * order for the rendered options to update.\n *\n * If `defaultValue` is provided, any options with the supplied values will be\n * selected.\n */\nvar ReactDOMSelect = {\n getHostProps: function (inst, props) {\n return _assign({}, props, {\n onChange: inst._wrapperState.onChange,\n value: undefined\n });\n },\n\n mountWrapper: function (inst, props) {\n if (true) {\n checkSelectPropTypes(inst, props);\n }\n\n var value = LinkedValueUtils.getValue(props);\n inst._wrapperState = {\n pendingUpdate: false,\n initialValue: value != null ? value : props.defaultValue,\n listeners: null,\n onChange: _handleChange.bind(inst),\n wasMultiple: Boolean(props.multiple)\n };\n\n if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue) {\n true ? warning(false, 'Select elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled select ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components') : void 0;\n didWarnValueDefaultValue = true;\n }\n },\n\n getSelectValueContext: function (inst) {\n // ReactDOMOption looks at this initial value so the initial generated\n // markup has correct `selected` attributes\n return inst._wrapperState.initialValue;\n },\n\n postUpdateWrapper: function (inst) {\n var props = inst._currentElement.props;\n\n // After the initial mount, we control selected-ness manually so don't pass\n // this value down\n inst._wrapperState.initialValue = undefined;\n\n var wasMultiple = inst._wrapperState.wasMultiple;\n inst._wrapperState.wasMultiple = Boolean(props.multiple);\n\n var value = LinkedValueUtils.getValue(props);\n if (value != null) {\n inst._wrapperState.pendingUpdate = false;\n updateOptions(inst, Boolean(props.multiple), value);\n } else if (wasMultiple !== Boolean(props.multiple)) {\n // For simplicity, reapply `defaultValue` if `multiple` is toggled.\n if (props.defaultValue != null) {\n updateOptions(inst, Boolean(props.multiple), props.defaultValue);\n } else {\n // Revert the select back to its default unselected state.\n updateOptions(inst, Boolean(props.multiple), props.multiple ? [] : '');\n }\n }\n }\n};\n\nfunction _handleChange(event) {\n var props = this._currentElement.props;\n var returnValue = LinkedValueUtils.executeOnChange(props, event);\n\n if (this._rootNodeID) {\n this._wrapperState.pendingUpdate = true;\n }\n ReactUpdates.asap(updateOptionsIfPendingUpdateAndMounted, this);\n return returnValue;\n}\n\nmodule.exports = ReactDOMSelect;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/ReactDOMSelect.js\n// module id = 536\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/ReactDOMSelect.js?", + ); + + /***/ + }, + /* 537 */ + /* unknown exports provided */ + /* all exports used */ + /*!*********************************************************!*\ + !*** ./~/react-dom/lib/ReactDefaultBatchingStrategy.js ***! + \*********************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar _assign = __webpack_require__(/*! object-assign */ 21);\n\nvar ReactUpdates = __webpack_require__(/*! ./ReactUpdates */ 47);\nvar Transaction = __webpack_require__(/*! ./Transaction */ 171);\n\nvar emptyFunction = __webpack_require__(/*! fbjs/lib/emptyFunction */ 40);\n\nvar RESET_BATCHED_UPDATES = {\n initialize: emptyFunction,\n close: function () {\n ReactDefaultBatchingStrategy.isBatchingUpdates = false;\n }\n};\n\nvar FLUSH_BATCHED_UPDATES = {\n initialize: emptyFunction,\n close: ReactUpdates.flushBatchedUpdates.bind(ReactUpdates)\n};\n\nvar TRANSACTION_WRAPPERS = [FLUSH_BATCHED_UPDATES, RESET_BATCHED_UPDATES];\n\nfunction ReactDefaultBatchingStrategyTransaction() {\n this.reinitializeTransaction();\n}\n\n_assign(ReactDefaultBatchingStrategyTransaction.prototype, Transaction, {\n getTransactionWrappers: function () {\n return TRANSACTION_WRAPPERS;\n }\n});\n\nvar transaction = new ReactDefaultBatchingStrategyTransaction();\n\nvar ReactDefaultBatchingStrategy = {\n isBatchingUpdates: false,\n\n /**\n * Call the provided function in a context within which calls to `setState`\n * and friends are batched such that components aren't updated unnecessarily.\n */\n batchedUpdates: function (callback, a, b, c, d, e) {\n var alreadyBatchingUpdates = ReactDefaultBatchingStrategy.isBatchingUpdates;\n\n ReactDefaultBatchingStrategy.isBatchingUpdates = true;\n\n // The code is written this way to avoid extra allocations\n if (alreadyBatchingUpdates) {\n return callback(a, b, c, d, e);\n } else {\n return transaction.perform(callback, null, a, b, c, d, e);\n }\n }\n};\n\nmodule.exports = ReactDefaultBatchingStrategy;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/ReactDefaultBatchingStrategy.js\n// module id = 537\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/ReactDefaultBatchingStrategy.js?", + ); + + /***/ + }, + /* 538 */ + /* unknown exports provided */ + /* all exports used */ + /*!**************************************************!*\ + !*** ./~/react-dom/lib/ReactDefaultInjection.js ***! + \**************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar ARIADOMPropertyConfig = __webpack_require__(/*! ./ARIADOMPropertyConfig */ 1317);\nvar BeforeInputEventPlugin = __webpack_require__(/*! ./BeforeInputEventPlugin */ 1319);\nvar ChangeEventPlugin = __webpack_require__(/*! ./ChangeEventPlugin */ 1321);\nvar DefaultEventPluginOrder = __webpack_require__(/*! ./DefaultEventPluginOrder */ 1323);\nvar EnterLeaveEventPlugin = __webpack_require__(/*! ./EnterLeaveEventPlugin */ 1324);\nvar HTMLDOMPropertyConfig = __webpack_require__(/*! ./HTMLDOMPropertyConfig */ 1326);\nvar ReactComponentBrowserEnvironment = __webpack_require__(/*! ./ReactComponentBrowserEnvironment */ 1328);\nvar ReactDOMComponent = __webpack_require__(/*! ./ReactDOMComponent */ 1331);\nvar ReactDOMComponentTree = __webpack_require__(/*! ./ReactDOMComponentTree */ 24);\nvar ReactDOMEmptyComponent = __webpack_require__(/*! ./ReactDOMEmptyComponent */ 1332);\nvar ReactDOMTreeTraversal = __webpack_require__(/*! ./ReactDOMTreeTraversal */ 1343);\nvar ReactDOMTextComponent = __webpack_require__(/*! ./ReactDOMTextComponent */ 1341);\nvar ReactDefaultBatchingStrategy = __webpack_require__(/*! ./ReactDefaultBatchingStrategy */ 537);\nvar ReactEventListener = __webpack_require__(/*! ./ReactEventListener */ 1348);\nvar ReactInjection = __webpack_require__(/*! ./ReactInjection */ 1350);\nvar ReactReconcileTransaction = __webpack_require__(/*! ./ReactReconcileTransaction */ 1355);\nvar SVGDOMPropertyConfig = __webpack_require__(/*! ./SVGDOMPropertyConfig */ 1360);\nvar SelectEventPlugin = __webpack_require__(/*! ./SelectEventPlugin */ 1361);\nvar SimpleEventPlugin = __webpack_require__(/*! ./SimpleEventPlugin */ 1362);\n\nvar alreadyInjected = false;\n\nfunction inject() {\n if (alreadyInjected) {\n // TODO: This is currently true because these injections are shared between\n // the client and the server package. They should be built independently\n // and not share any injection state. Then this problem will be solved.\n return;\n }\n alreadyInjected = true;\n\n ReactInjection.EventEmitter.injectReactEventListener(ReactEventListener);\n\n /**\n * Inject modules for resolving DOM hierarchy and plugin ordering.\n */\n ReactInjection.EventPluginHub.injectEventPluginOrder(DefaultEventPluginOrder);\n ReactInjection.EventPluginUtils.injectComponentTree(ReactDOMComponentTree);\n ReactInjection.EventPluginUtils.injectTreeTraversal(ReactDOMTreeTraversal);\n\n /**\n * Some important event plugins included by default (without having to require\n * them).\n */\n ReactInjection.EventPluginHub.injectEventPluginsByName({\n SimpleEventPlugin: SimpleEventPlugin,\n EnterLeaveEventPlugin: EnterLeaveEventPlugin,\n ChangeEventPlugin: ChangeEventPlugin,\n SelectEventPlugin: SelectEventPlugin,\n BeforeInputEventPlugin: BeforeInputEventPlugin\n });\n\n ReactInjection.HostComponent.injectGenericComponentClass(ReactDOMComponent);\n\n ReactInjection.HostComponent.injectTextComponentClass(ReactDOMTextComponent);\n\n ReactInjection.DOMProperty.injectDOMPropertyConfig(ARIADOMPropertyConfig);\n ReactInjection.DOMProperty.injectDOMPropertyConfig(HTMLDOMPropertyConfig);\n ReactInjection.DOMProperty.injectDOMPropertyConfig(SVGDOMPropertyConfig);\n\n ReactInjection.EmptyComponent.injectEmptyComponentFactory(function (instantiate) {\n return new ReactDOMEmptyComponent(instantiate);\n });\n\n ReactInjection.Updates.injectReconcileTransaction(ReactReconcileTransaction);\n ReactInjection.Updates.injectBatchingStrategy(ReactDefaultBatchingStrategy);\n\n ReactInjection.Component.injectEnvironment(ReactComponentBrowserEnvironment);\n}\n\nmodule.exports = {\n inject: inject\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/ReactDefaultInjection.js\n// module id = 538\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/ReactDefaultInjection.js?', + ); + + /***/ + }, + /* 539 */ + /* unknown exports provided */ + /* all exports used */ + /*!************************************************!*\ + !*** ./~/react-dom/lib/ReactEmptyComponent.js ***! + \************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '/**\n * Copyright 2014-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar emptyComponentFactory;\n\nvar ReactEmptyComponentInjection = {\n injectEmptyComponentFactory: function (factory) {\n emptyComponentFactory = factory;\n }\n};\n\nvar ReactEmptyComponent = {\n create: function (instantiate) {\n return emptyComponentFactory(instantiate);\n }\n};\n\nReactEmptyComponent.injection = ReactEmptyComponentInjection;\n\nmodule.exports = ReactEmptyComponent;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/ReactEmptyComponent.js\n// module id = 539\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/ReactEmptyComponent.js?', + ); + + /***/ + }, + /* 540 */ + /* unknown exports provided */ + /* all exports used */ + /*!**********************************************!*\ + !*** ./~/react-dom/lib/ReactFeatureFlags.js ***! + \**********************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * \n */\n\n\n\nvar ReactFeatureFlags = {\n // When true, call console.time() before and .timeEnd() after each top-level\n // render (both initial renders and updates). Useful when looking at prod-mode\n // timeline profiles in Chrome, for example.\n logTopLevelRenders: false\n};\n\nmodule.exports = ReactFeatureFlags;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/ReactFeatureFlags.js\n// module id = 540\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/ReactFeatureFlags.js?', + ); + + /***/ + }, + /* 541 */ + /* unknown exports provided */ + /* all exports used */ + /*!***********************************************!*\ + !*** ./~/react-dom/lib/ReactHostComponent.js ***! + \***********************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2014-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar _prodInvariant = __webpack_require__(/*! ./reactProdInvariant */ 17);\n\nvar invariant = __webpack_require__(/*! fbjs/lib/invariant */ 12);\n\nvar genericComponentClass = null;\nvar textComponentClass = null;\n\nvar ReactHostComponentInjection = {\n // This accepts a class that receives the tag string. This is a catch all\n // that can render any kind of tag.\n injectGenericComponentClass: function (componentClass) {\n genericComponentClass = componentClass;\n },\n // This accepts a text component class that takes the text string to be\n // rendered as props.\n injectTextComponentClass: function (componentClass) {\n textComponentClass = componentClass;\n }\n};\n\n/**\n * Get a host internal component class for a specific tag.\n *\n * @param {ReactElement} element The element to create.\n * @return {function} The internal class constructor function.\n */\nfunction createInternalComponent(element) {\n !genericComponentClass ? true ? invariant(false, 'There is no registered component for the tag %s', element.type) : _prodInvariant('111', element.type) : void 0;\n return new genericComponentClass(element);\n}\n\n/**\n * @param {ReactText} text\n * @return {ReactComponent}\n */\nfunction createInstanceForText(text) {\n return new textComponentClass(text);\n}\n\n/**\n * @param {ReactComponent} component\n * @return {boolean}\n */\nfunction isTextComponent(component) {\n return component instanceof textComponentClass;\n}\n\nvar ReactHostComponent = {\n createInternalComponent: createInternalComponent,\n createInstanceForText: createInstanceForText,\n isTextComponent: isTextComponent,\n injection: ReactHostComponentInjection\n};\n\nmodule.exports = ReactHostComponent;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/ReactHostComponent.js\n// module id = 541\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/ReactHostComponent.js?", + ); + + /***/ + }, + /* 542 */ + /* unknown exports provided */ + /* all exports used */ + /*!************************************************!*\ + !*** ./~/react-dom/lib/ReactInputSelection.js ***! + \************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar ReactDOMSelection = __webpack_require__(/*! ./ReactDOMSelection */ 1339);\n\nvar containsNode = __webpack_require__(/*! fbjs/lib/containsNode */ 1127);\nvar focusNode = __webpack_require__(/*! fbjs/lib/focusNode */ 347);\nvar getActiveElement = __webpack_require__(/*! fbjs/lib/getActiveElement */ 348);\n\nfunction isInDocument(node) {\n return containsNode(document.documentElement, node);\n}\n\n/**\n * @ReactInputSelection: React input selection module. Based on Selection.js,\n * but modified to be suitable for react and has a couple of bug fixes (doesn't\n * assume buttons have range selections allowed).\n * Input selection module for React.\n */\nvar ReactInputSelection = {\n\n hasSelectionCapabilities: function (elem) {\n var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();\n return nodeName && (nodeName === 'input' && elem.type === 'text' || nodeName === 'textarea' || elem.contentEditable === 'true');\n },\n\n getSelectionInformation: function () {\n var focusedElem = getActiveElement();\n return {\n focusedElem: focusedElem,\n selectionRange: ReactInputSelection.hasSelectionCapabilities(focusedElem) ? ReactInputSelection.getSelection(focusedElem) : null\n };\n },\n\n /**\n * @restoreSelection: If any selection information was potentially lost,\n * restore it. This is useful when performing operations that could remove dom\n * nodes and place them back in, resulting in focus being lost.\n */\n restoreSelection: function (priorSelectionInformation) {\n var curFocusedElem = getActiveElement();\n var priorFocusedElem = priorSelectionInformation.focusedElem;\n var priorSelectionRange = priorSelectionInformation.selectionRange;\n if (curFocusedElem !== priorFocusedElem && isInDocument(priorFocusedElem)) {\n if (ReactInputSelection.hasSelectionCapabilities(priorFocusedElem)) {\n ReactInputSelection.setSelection(priorFocusedElem, priorSelectionRange);\n }\n focusNode(priorFocusedElem);\n }\n },\n\n /**\n * @getSelection: Gets the selection bounds of a focused textarea, input or\n * contentEditable node.\n * -@input: Look up selection bounds of this input\n * -@return {start: selectionStart, end: selectionEnd}\n */\n getSelection: function (input) {\n var selection;\n\n if ('selectionStart' in input) {\n // Modern browser with input or textarea.\n selection = {\n start: input.selectionStart,\n end: input.selectionEnd\n };\n } else if (document.selection && input.nodeName && input.nodeName.toLowerCase() === 'input') {\n // IE8 input.\n var range = document.selection.createRange();\n // There can only be one selection per document in IE, so it must\n // be in our element.\n if (range.parentElement() === input) {\n selection = {\n start: -range.moveStart('character', -input.value.length),\n end: -range.moveEnd('character', -input.value.length)\n };\n }\n } else {\n // Content editable or old IE textarea.\n selection = ReactDOMSelection.getOffsets(input);\n }\n\n return selection || { start: 0, end: 0 };\n },\n\n /**\n * @setSelection: Sets the selection bounds of a textarea or input and focuses\n * the input.\n * -@input Set selection bounds of this input or textarea\n * -@offsets Object of same form that is returned from get*\n */\n setSelection: function (input, offsets) {\n var start = offsets.start;\n var end = offsets.end;\n if (end === undefined) {\n end = start;\n }\n\n if ('selectionStart' in input) {\n input.selectionStart = start;\n input.selectionEnd = Math.min(end, input.value.length);\n } else if (document.selection && input.nodeName && input.nodeName.toLowerCase() === 'input') {\n var range = input.createTextRange();\n range.collapse(true);\n range.moveStart('character', start);\n range.moveEnd('character', end - start);\n range.select();\n } else {\n ReactDOMSelection.setOffsets(input, offsets);\n }\n }\n};\n\nmodule.exports = ReactInputSelection;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/ReactInputSelection.js\n// module id = 542\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/ReactInputSelection.js?", + ); + + /***/ + }, + /* 543 */ + /* unknown exports provided */ + /* all exports used */ + /*!************************************************!*\ + !*** ./~/react-dom/lib/ReactMarkupChecksum.js ***! + \************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar adler32 = __webpack_require__(/*! ./adler32 */ 1373);\n\nvar TAG_END = /\\/?>/;\nvar COMMENT_START = /^<\\!\\-\\-/;\n\nvar ReactMarkupChecksum = {\n CHECKSUM_ATTR_NAME: 'data-react-checksum',\n\n /**\n * @param {string} markup Markup string\n * @return {string} Markup string with checksum attribute attached\n */\n addChecksumToMarkup: function (markup) {\n var checksum = adler32(markup);\n\n // Add checksum (handle both parent tags, comments and self-closing tags)\n if (COMMENT_START.test(markup)) {\n return markup;\n } else {\n return markup.replace(TAG_END, ' ' + ReactMarkupChecksum.CHECKSUM_ATTR_NAME + '=\"' + checksum + '\"$&');\n }\n },\n\n /**\n * @param {string} markup to use\n * @param {DOMElement} element root React element\n * @returns {boolean} whether or not the markup is the same\n */\n canReuseMarkup: function (markup, element) {\n var existingChecksum = element.getAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME);\n existingChecksum = existingChecksum && parseInt(existingChecksum, 10);\n var markupChecksum = adler32(markup);\n return markupChecksum === existingChecksum;\n }\n};\n\nmodule.exports = ReactMarkupChecksum;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/ReactMarkupChecksum.js\n// module id = 543\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/ReactMarkupChecksum.js?", + ); + + /***/ + }, + /* 544 */ + /* unknown exports provided */ + /* all exports used */ + /*!***************************************!*\ + !*** ./~/react-dom/lib/ReactMount.js ***! + \***************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar _prodInvariant = __webpack_require__(/*! ./reactProdInvariant */ 17);\n\nvar DOMLazyTree = __webpack_require__(/*! ./DOMLazyTree */ 100);\nvar DOMProperty = __webpack_require__(/*! ./DOMProperty */ 67);\nvar React = __webpack_require__(/*! react/lib/React */ 83);\nvar ReactBrowserEventEmitter = __webpack_require__(/*! ./ReactBrowserEventEmitter */ 169);\nvar ReactCurrentOwner = __webpack_require__(/*! react/lib/ReactCurrentOwner */ 55);\nvar ReactDOMComponentTree = __webpack_require__(/*! ./ReactDOMComponentTree */ 24);\nvar ReactDOMContainerInfo = __webpack_require__(/*! ./ReactDOMContainerInfo */ 535);\nvar ReactDOMFeatureFlags = __webpack_require__(/*! ./ReactDOMFeatureFlags */ 1333);\nvar ReactFeatureFlags = __webpack_require__(/*! ./ReactFeatureFlags */ 540);\nvar ReactInstanceMap = __webpack_require__(/*! ./ReactInstanceMap */ 125);\nvar ReactInstrumentation = __webpack_require__(/*! ./ReactInstrumentation */ 35);\nvar ReactMarkupChecksum = __webpack_require__(/*! ./ReactMarkupChecksum */ 543);\nvar ReactReconciler = __webpack_require__(/*! ./ReactReconciler */ 79);\nvar ReactUpdateQueue = __webpack_require__(/*! ./ReactUpdateQueue */ 252);\nvar ReactUpdates = __webpack_require__(/*! ./ReactUpdates */ 47);\n\nvar emptyObject = __webpack_require__(/*! fbjs/lib/emptyObject */ 96);\nvar instantiateReactComponent = __webpack_require__(/*! ./instantiateReactComponent */ 257);\nvar invariant = __webpack_require__(/*! fbjs/lib/invariant */ 12);\nvar setInnerHTML = __webpack_require__(/*! ./setInnerHTML */ 173);\nvar shouldUpdateReactComponent = __webpack_require__(/*! ./shouldUpdateReactComponent */ 259);\nvar warning = __webpack_require__(/*! fbjs/lib/warning */ 13);\n\nvar ATTR_NAME = DOMProperty.ID_ATTRIBUTE_NAME;\nvar ROOT_ATTR_NAME = DOMProperty.ROOT_ATTRIBUTE_NAME;\n\nvar ELEMENT_NODE_TYPE = 1;\nvar DOC_NODE_TYPE = 9;\nvar DOCUMENT_FRAGMENT_NODE_TYPE = 11;\n\nvar instancesByReactRootID = {};\n\n/**\n * Finds the index of the first character\n * that's not common between the two given strings.\n *\n * @return {number} the index of the character where the strings diverge\n */\nfunction firstDifferenceIndex(string1, string2) {\n var minLen = Math.min(string1.length, string2.length);\n for (var i = 0; i < minLen; i++) {\n if (string1.charAt(i) !== string2.charAt(i)) {\n return i;\n }\n }\n return string1.length === string2.length ? -1 : minLen;\n}\n\n/**\n * @param {DOMElement|DOMDocument} container DOM element that may contain\n * a React component\n * @return {?*} DOM element that may have the reactRoot ID, or null.\n */\nfunction getReactRootElementInContainer(container) {\n if (!container) {\n return null;\n }\n\n if (container.nodeType === DOC_NODE_TYPE) {\n return container.documentElement;\n } else {\n return container.firstChild;\n }\n}\n\nfunction internalGetID(node) {\n // If node is something like a window, document, or text node, none of\n // which support attributes or a .getAttribute method, gracefully return\n // the empty string, as if the attribute were missing.\n return node.getAttribute && node.getAttribute(ATTR_NAME) || '';\n}\n\n/**\n * Mounts this component and inserts it into the DOM.\n *\n * @param {ReactComponent} componentInstance The instance to mount.\n * @param {DOMElement} container DOM element to mount into.\n * @param {ReactReconcileTransaction} transaction\n * @param {boolean} shouldReuseMarkup If true, do not insert markup\n */\nfunction mountComponentIntoNode(wrapperInstance, container, transaction, shouldReuseMarkup, context) {\n var markerName;\n if (ReactFeatureFlags.logTopLevelRenders) {\n var wrappedElement = wrapperInstance._currentElement.props.child;\n var type = wrappedElement.type;\n markerName = 'React mount: ' + (typeof type === 'string' ? type : type.displayName || type.name);\n console.time(markerName);\n }\n\n var markup = ReactReconciler.mountComponent(wrapperInstance, transaction, null, ReactDOMContainerInfo(wrapperInstance, container), context, 0 /* parentDebugID */\n );\n\n if (markerName) {\n console.timeEnd(markerName);\n }\n\n wrapperInstance._renderedComponent._topLevelWrapper = wrapperInstance;\n ReactMount._mountImageIntoNode(markup, container, wrapperInstance, shouldReuseMarkup, transaction);\n}\n\n/**\n * Batched mount.\n *\n * @param {ReactComponent} componentInstance The instance to mount.\n * @param {DOMElement} container DOM element to mount into.\n * @param {boolean} shouldReuseMarkup If true, do not insert markup\n */\nfunction batchedMountComponentIntoNode(componentInstance, container, shouldReuseMarkup, context) {\n var transaction = ReactUpdates.ReactReconcileTransaction.getPooled(\n /* useCreateElement */\n !shouldReuseMarkup && ReactDOMFeatureFlags.useCreateElement);\n transaction.perform(mountComponentIntoNode, null, componentInstance, container, transaction, shouldReuseMarkup, context);\n ReactUpdates.ReactReconcileTransaction.release(transaction);\n}\n\n/**\n * Unmounts a component and removes it from the DOM.\n *\n * @param {ReactComponent} instance React component instance.\n * @param {DOMElement} container DOM element to unmount from.\n * @final\n * @internal\n * @see {ReactMount.unmountComponentAtNode}\n */\nfunction unmountComponentFromNode(instance, container, safely) {\n if (true) {\n ReactInstrumentation.debugTool.onBeginFlush();\n }\n ReactReconciler.unmountComponent(instance, safely);\n if (true) {\n ReactInstrumentation.debugTool.onEndFlush();\n }\n\n if (container.nodeType === DOC_NODE_TYPE) {\n container = container.documentElement;\n }\n\n // http://jsperf.com/emptying-a-node\n while (container.lastChild) {\n container.removeChild(container.lastChild);\n }\n}\n\n/**\n * True if the supplied DOM node has a direct React-rendered child that is\n * not a React root element. Useful for warning in `render`,\n * `unmountComponentAtNode`, etc.\n *\n * @param {?DOMElement} node The candidate DOM node.\n * @return {boolean} True if the DOM element contains a direct child that was\n * rendered by React but is not a root element.\n * @internal\n */\nfunction hasNonRootReactChild(container) {\n var rootEl = getReactRootElementInContainer(container);\n if (rootEl) {\n var inst = ReactDOMComponentTree.getInstanceFromNode(rootEl);\n return !!(inst && inst._hostParent);\n }\n}\n\n/**\n * True if the supplied DOM node is a React DOM element and\n * it has been rendered by another copy of React.\n *\n * @param {?DOMElement} node The candidate DOM node.\n * @return {boolean} True if the DOM has been rendered by another copy of React\n * @internal\n */\nfunction nodeIsRenderedByOtherInstance(container) {\n var rootEl = getReactRootElementInContainer(container);\n return !!(rootEl && isReactNode(rootEl) && !ReactDOMComponentTree.getInstanceFromNode(rootEl));\n}\n\n/**\n * True if the supplied DOM node is a valid node element.\n *\n * @param {?DOMElement} node The candidate DOM node.\n * @return {boolean} True if the DOM is a valid DOM node.\n * @internal\n */\nfunction isValidContainer(node) {\n return !!(node && (node.nodeType === ELEMENT_NODE_TYPE || node.nodeType === DOC_NODE_TYPE || node.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE));\n}\n\n/**\n * True if the supplied DOM node is a valid React node element.\n *\n * @param {?DOMElement} node The candidate DOM node.\n * @return {boolean} True if the DOM is a valid React DOM node.\n * @internal\n */\nfunction isReactNode(node) {\n return isValidContainer(node) && (node.hasAttribute(ROOT_ATTR_NAME) || node.hasAttribute(ATTR_NAME));\n}\n\nfunction getHostRootInstanceInContainer(container) {\n var rootEl = getReactRootElementInContainer(container);\n var prevHostInstance = rootEl && ReactDOMComponentTree.getInstanceFromNode(rootEl);\n return prevHostInstance && !prevHostInstance._hostParent ? prevHostInstance : null;\n}\n\nfunction getTopLevelWrapperInContainer(container) {\n var root = getHostRootInstanceInContainer(container);\n return root ? root._hostContainerInfo._topLevelWrapper : null;\n}\n\n/**\n * Temporary (?) hack so that we can store all top-level pending updates on\n * composites instead of having to worry about different types of components\n * here.\n */\nvar topLevelRootCounter = 1;\nvar TopLevelWrapper = function () {\n this.rootID = topLevelRootCounter++;\n};\nTopLevelWrapper.prototype.isReactComponent = {};\nif (true) {\n TopLevelWrapper.displayName = 'TopLevelWrapper';\n}\nTopLevelWrapper.prototype.render = function () {\n return this.props.child;\n};\nTopLevelWrapper.isReactTopLevelWrapper = true;\n\n/**\n * Mounting is the process of initializing a React component by creating its\n * representative DOM elements and inserting them into a supplied `container`.\n * Any prior content inside `container` is destroyed in the process.\n *\n * ReactMount.render(\n * component,\n * document.getElementById('container')\n * );\n *\n * <div id=\"container\"> <-- Supplied `container`.\n * <div data-reactid=\".3\"> <-- Rendered reactRoot of React\n * // ... component.\n * </div>\n * </div>\n *\n * Inside of `container`, the first element rendered is the \"reactRoot\".\n */\nvar ReactMount = {\n\n TopLevelWrapper: TopLevelWrapper,\n\n /**\n * Used by devtools. The keys are not important.\n */\n _instancesByReactRootID: instancesByReactRootID,\n\n /**\n * This is a hook provided to support rendering React components while\n * ensuring that the apparent scroll position of its `container` does not\n * change.\n *\n * @param {DOMElement} container The `container` being rendered into.\n * @param {function} renderCallback This must be called once to do the render.\n */\n scrollMonitor: function (container, renderCallback) {\n renderCallback();\n },\n\n /**\n * Take a component that's already mounted into the DOM and replace its props\n * @param {ReactComponent} prevComponent component instance already in the DOM\n * @param {ReactElement} nextElement component instance to render\n * @param {DOMElement} container container to render into\n * @param {?function} callback function triggered on completion\n */\n _updateRootComponent: function (prevComponent, nextElement, nextContext, container, callback) {\n ReactMount.scrollMonitor(container, function () {\n ReactUpdateQueue.enqueueElementInternal(prevComponent, nextElement, nextContext);\n if (callback) {\n ReactUpdateQueue.enqueueCallbackInternal(prevComponent, callback);\n }\n });\n\n return prevComponent;\n },\n\n /**\n * Render a new component into the DOM. Hooked by hooks!\n *\n * @param {ReactElement} nextElement element to render\n * @param {DOMElement} container container to render into\n * @param {boolean} shouldReuseMarkup if we should skip the markup insertion\n * @return {ReactComponent} nextComponent\n */\n _renderNewRootComponent: function (nextElement, container, shouldReuseMarkup, context) {\n // Various parts of our code (such as ReactCompositeComponent's\n // _renderValidatedComponent) assume that calls to render aren't nested;\n // verify that that's the case.\n true ? warning(ReactCurrentOwner.current == null, '_renderNewRootComponent(): Render methods should be a pure function ' + 'of props and state; triggering nested component updates from ' + 'render is not allowed. If necessary, trigger nested updates in ' + 'componentDidUpdate. Check the render method of %s.', ReactCurrentOwner.current && ReactCurrentOwner.current.getName() || 'ReactCompositeComponent') : void 0;\n\n !isValidContainer(container) ? true ? invariant(false, '_registerComponent(...): Target container is not a DOM element.') : _prodInvariant('37') : void 0;\n\n ReactBrowserEventEmitter.ensureScrollValueMonitoring();\n var componentInstance = instantiateReactComponent(nextElement, false);\n\n // The initial render is synchronous but any updates that happen during\n // rendering, in componentWillMount or componentDidMount, will be batched\n // according to the current batching strategy.\n\n ReactUpdates.batchedUpdates(batchedMountComponentIntoNode, componentInstance, container, shouldReuseMarkup, context);\n\n var wrapperID = componentInstance._instance.rootID;\n instancesByReactRootID[wrapperID] = componentInstance;\n\n return componentInstance;\n },\n\n /**\n * Renders a React component into the DOM in the supplied `container`.\n *\n * If the React component was previously rendered into `container`, this will\n * perform an update on it and only mutate the DOM as necessary to reflect the\n * latest React component.\n *\n * @param {ReactComponent} parentComponent The conceptual parent of this render tree.\n * @param {ReactElement} nextElement Component element to render.\n * @param {DOMElement} container DOM element to render into.\n * @param {?function} callback function triggered on completion\n * @return {ReactComponent} Component instance rendered in `container`.\n */\n renderSubtreeIntoContainer: function (parentComponent, nextElement, container, callback) {\n !(parentComponent != null && ReactInstanceMap.has(parentComponent)) ? true ? invariant(false, 'parentComponent must be a valid React Component') : _prodInvariant('38') : void 0;\n return ReactMount._renderSubtreeIntoContainer(parentComponent, nextElement, container, callback);\n },\n\n _renderSubtreeIntoContainer: function (parentComponent, nextElement, container, callback) {\n ReactUpdateQueue.validateCallback(callback, 'ReactDOM.render');\n !React.isValidElement(nextElement) ? true ? invariant(false, 'ReactDOM.render(): Invalid component element.%s', typeof nextElement === 'string' ? ' Instead of passing a string like \\'div\\', pass ' + 'React.createElement(\\'div\\') or <div />.' : typeof nextElement === 'function' ? ' Instead of passing a class like Foo, pass ' + 'React.createElement(Foo) or <Foo />.' :\n // Check if it quacks like an element\n nextElement != null && nextElement.props !== undefined ? ' This may be caused by unintentionally loading two independent ' + 'copies of React.' : '') : _prodInvariant('39', typeof nextElement === 'string' ? ' Instead of passing a string like \\'div\\', pass ' + 'React.createElement(\\'div\\') or <div />.' : typeof nextElement === 'function' ? ' Instead of passing a class like Foo, pass ' + 'React.createElement(Foo) or <Foo />.' : nextElement != null && nextElement.props !== undefined ? ' This may be caused by unintentionally loading two independent ' + 'copies of React.' : '') : void 0;\n\n true ? warning(!container || !container.tagName || container.tagName.toUpperCase() !== 'BODY', 'render(): Rendering components directly into document.body is ' + 'discouraged, since its children are often manipulated by third-party ' + 'scripts and browser extensions. This may lead to subtle ' + 'reconciliation issues. Try rendering into a container element created ' + 'for your app.') : void 0;\n\n var nextWrappedElement = React.createElement(TopLevelWrapper, { child: nextElement });\n\n var nextContext;\n if (parentComponent) {\n var parentInst = ReactInstanceMap.get(parentComponent);\n nextContext = parentInst._processChildContext(parentInst._context);\n } else {\n nextContext = emptyObject;\n }\n\n var prevComponent = getTopLevelWrapperInContainer(container);\n\n if (prevComponent) {\n var prevWrappedElement = prevComponent._currentElement;\n var prevElement = prevWrappedElement.props.child;\n if (shouldUpdateReactComponent(prevElement, nextElement)) {\n var publicInst = prevComponent._renderedComponent.getPublicInstance();\n var updatedCallback = callback && function () {\n callback.call(publicInst);\n };\n ReactMount._updateRootComponent(prevComponent, nextWrappedElement, nextContext, container, updatedCallback);\n return publicInst;\n } else {\n ReactMount.unmountComponentAtNode(container);\n }\n }\n\n var reactRootElement = getReactRootElementInContainer(container);\n var containerHasReactMarkup = reactRootElement && !!internalGetID(reactRootElement);\n var containerHasNonRootReactChild = hasNonRootReactChild(container);\n\n if (true) {\n true ? warning(!containerHasNonRootReactChild, 'render(...): Replacing React-rendered children with a new root ' + 'component. If you intended to update the children of this node, ' + 'you should instead have the existing children update their state ' + 'and render the new components instead of calling ReactDOM.render.') : void 0;\n\n if (!containerHasReactMarkup || reactRootElement.nextSibling) {\n var rootElementSibling = reactRootElement;\n while (rootElementSibling) {\n if (internalGetID(rootElementSibling)) {\n true ? warning(false, 'render(): Target node has markup rendered by React, but there ' + 'are unrelated nodes as well. This is most commonly caused by ' + 'white-space inserted around server-rendered markup.') : void 0;\n break;\n }\n rootElementSibling = rootElementSibling.nextSibling;\n }\n }\n }\n\n var shouldReuseMarkup = containerHasReactMarkup && !prevComponent && !containerHasNonRootReactChild;\n var component = ReactMount._renderNewRootComponent(nextWrappedElement, container, shouldReuseMarkup, nextContext)._renderedComponent.getPublicInstance();\n if (callback) {\n callback.call(component);\n }\n return component;\n },\n\n /**\n * Renders a React component into the DOM in the supplied `container`.\n * See https://facebook.github.io/react/docs/top-level-api.html#reactdom.render\n *\n * If the React component was previously rendered into `container`, this will\n * perform an update on it and only mutate the DOM as necessary to reflect the\n * latest React component.\n *\n * @param {ReactElement} nextElement Component element to render.\n * @param {DOMElement} container DOM element to render into.\n * @param {?function} callback function triggered on completion\n * @return {ReactComponent} Component instance rendered in `container`.\n */\n render: function (nextElement, container, callback) {\n return ReactMount._renderSubtreeIntoContainer(null, nextElement, container, callback);\n },\n\n /**\n * Unmounts and destroys the React component rendered in the `container`.\n * See https://facebook.github.io/react/docs/top-level-api.html#reactdom.unmountcomponentatnode\n *\n * @param {DOMElement} container DOM element containing a React component.\n * @return {boolean} True if a component was found in and unmounted from\n * `container`\n */\n unmountComponentAtNode: function (container) {\n // Various parts of our code (such as ReactCompositeComponent's\n // _renderValidatedComponent) assume that calls to render aren't nested;\n // verify that that's the case. (Strictly speaking, unmounting won't cause a\n // render but we still don't expect to be in a render call here.)\n true ? warning(ReactCurrentOwner.current == null, 'unmountComponentAtNode(): Render methods should be a pure function ' + 'of props and state; triggering nested component updates from render ' + 'is not allowed. If necessary, trigger nested updates in ' + 'componentDidUpdate. Check the render method of %s.', ReactCurrentOwner.current && ReactCurrentOwner.current.getName() || 'ReactCompositeComponent') : void 0;\n\n !isValidContainer(container) ? true ? invariant(false, 'unmountComponentAtNode(...): Target container is not a DOM element.') : _prodInvariant('40') : void 0;\n\n if (true) {\n true ? warning(!nodeIsRenderedByOtherInstance(container), 'unmountComponentAtNode(): The node you\\'re attempting to unmount ' + 'was rendered by another copy of React.') : void 0;\n }\n\n var prevComponent = getTopLevelWrapperInContainer(container);\n if (!prevComponent) {\n // Check if the node being unmounted was rendered by React, but isn't a\n // root node.\n var containerHasNonRootReactChild = hasNonRootReactChild(container);\n\n // Check if the container itself is a React root node.\n var isContainerReactRoot = container.nodeType === 1 && container.hasAttribute(ROOT_ATTR_NAME);\n\n if (true) {\n true ? warning(!containerHasNonRootReactChild, 'unmountComponentAtNode(): The node you\\'re attempting to unmount ' + 'was rendered by React and is not a top-level container. %s', isContainerReactRoot ? 'You may have accidentally passed in a React root node instead ' + 'of its container.' : 'Instead, have the parent component update its state and ' + 'rerender in order to remove this component.') : void 0;\n }\n\n return false;\n }\n delete instancesByReactRootID[prevComponent._instance.rootID];\n ReactUpdates.batchedUpdates(unmountComponentFromNode, prevComponent, container, false);\n return true;\n },\n\n _mountImageIntoNode: function (markup, container, instance, shouldReuseMarkup, transaction) {\n !isValidContainer(container) ? true ? invariant(false, 'mountComponentIntoNode(...): Target container is not valid.') : _prodInvariant('41') : void 0;\n\n if (shouldReuseMarkup) {\n var rootElement = getReactRootElementInContainer(container);\n if (ReactMarkupChecksum.canReuseMarkup(markup, rootElement)) {\n ReactDOMComponentTree.precacheNode(instance, rootElement);\n return;\n } else {\n var checksum = rootElement.getAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME);\n rootElement.removeAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME);\n\n var rootMarkup = rootElement.outerHTML;\n rootElement.setAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME, checksum);\n\n var normalizedMarkup = markup;\n if (true) {\n // because rootMarkup is retrieved from the DOM, various normalizations\n // will have occurred which will not be present in `markup`. Here,\n // insert markup into a <div> or <iframe> depending on the container\n // type to perform the same normalizations before comparing.\n var normalizer;\n if (container.nodeType === ELEMENT_NODE_TYPE) {\n normalizer = document.createElement('div');\n normalizer.innerHTML = markup;\n normalizedMarkup = normalizer.innerHTML;\n } else {\n normalizer = document.createElement('iframe');\n document.body.appendChild(normalizer);\n normalizer.contentDocument.write(markup);\n normalizedMarkup = normalizer.contentDocument.documentElement.outerHTML;\n document.body.removeChild(normalizer);\n }\n }\n\n var diffIndex = firstDifferenceIndex(normalizedMarkup, rootMarkup);\n var difference = ' (client) ' + normalizedMarkup.substring(diffIndex - 20, diffIndex + 20) + '\\n (server) ' + rootMarkup.substring(diffIndex - 20, diffIndex + 20);\n\n !(container.nodeType !== DOC_NODE_TYPE) ? true ? invariant(false, 'You\\'re trying to render a component to the document using server rendering but the checksum was invalid. This usually means you rendered a different component type or props on the client from the one on the server, or your render() methods are impure. React cannot handle this case due to cross-browser quirks by rendering at the document root. You should look for environment dependent code in your components and ensure the props are the same client and server side:\\n%s', difference) : _prodInvariant('42', difference) : void 0;\n\n if (true) {\n true ? warning(false, 'React attempted to reuse markup in a container but the ' + 'checksum was invalid. This generally means that you are ' + 'using server rendering and the markup generated on the ' + 'server was not what the client was expecting. React injected ' + 'new markup to compensate which works but you have lost many ' + 'of the benefits of server rendering. Instead, figure out ' + 'why the markup being generated is different on the client ' + 'or server:\\n%s', difference) : void 0;\n }\n }\n }\n\n !(container.nodeType !== DOC_NODE_TYPE) ? true ? invariant(false, 'You\\'re trying to render a component to the document but you didn\\'t use server rendering. We can\\'t do this without using server rendering due to cross-browser quirks. See ReactDOMServer.renderToString() for server rendering.') : _prodInvariant('43') : void 0;\n\n if (transaction.useCreateElement) {\n while (container.lastChild) {\n container.removeChild(container.lastChild);\n }\n DOMLazyTree.insertTreeBefore(container, markup, null);\n } else {\n setInnerHTML(container, markup);\n ReactDOMComponentTree.precacheNode(instance, container.firstChild);\n }\n\n if (true) {\n var hostNode = ReactDOMComponentTree.getInstanceFromNode(container.firstChild);\n if (hostNode._debugID !== 0) {\n ReactInstrumentation.debugTool.onHostOperation({\n instanceID: hostNode._debugID,\n type: 'mount',\n payload: markup.toString()\n });\n }\n }\n }\n};\n\nmodule.exports = ReactMount;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/ReactMount.js\n// module id = 544\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/ReactMount.js?", + ); + + /***/ + }, + /* 545 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************************!*\ + !*** ./~/react-dom/lib/ReactNodeTypes.js ***! + \*******************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * \n */\n\n\n\nvar _prodInvariant = __webpack_require__(/*! ./reactProdInvariant */ 17);\n\nvar React = __webpack_require__(/*! react/lib/React */ 83);\n\nvar invariant = __webpack_require__(/*! fbjs/lib/invariant */ 12);\n\nvar ReactNodeTypes = {\n HOST: 0,\n COMPOSITE: 1,\n EMPTY: 2,\n\n getType: function (node) {\n if (node === null || node === false) {\n return ReactNodeTypes.EMPTY;\n } else if (React.isValidElement(node)) {\n if (typeof node.type === 'function') {\n return ReactNodeTypes.COMPOSITE;\n } else {\n return ReactNodeTypes.HOST;\n }\n }\n true ? true ? invariant(false, 'Unexpected node: %s', node) : _prodInvariant('26', node) : void 0;\n }\n};\n\nmodule.exports = ReactNodeTypes;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/ReactNodeTypes.js\n// module id = 545\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/ReactNodeTypes.js?", + ); + + /***/ + }, + /* 546 */ + /* unknown exports provided */ + /* all exports used */ + /*!*************************************************!*\ + !*** ./~/react-dom/lib/ReactPropTypesSecret.js ***! + \*************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * \n */\n\n\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/ReactPropTypesSecret.js\n// module id = 546\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/ReactPropTypesSecret.js?", + ); + + /***/ + }, + /* 547 */ + /* unknown exports provided */ + /* all exports used */ + /*!************************************************************!*\ + !*** ./~/react-dom/lib/ReactServerRenderingTransaction.js ***! + \************************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '/**\n * Copyright 2014-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar _assign = __webpack_require__(/*! object-assign */ 21);\n\nvar PooledClass = __webpack_require__(/*! ./PooledClass */ 78);\nvar Transaction = __webpack_require__(/*! ./Transaction */ 171);\nvar ReactInstrumentation = __webpack_require__(/*! ./ReactInstrumentation */ 35);\nvar ReactServerUpdateQueue = __webpack_require__(/*! ./ReactServerUpdateQueue */ 1359);\n\n/**\n * Executed within the scope of the `Transaction` instance. Consider these as\n * being member methods, but with an implied ordering while being isolated from\n * each other.\n */\nvar TRANSACTION_WRAPPERS = [];\n\nif (true) {\n TRANSACTION_WRAPPERS.push({\n initialize: ReactInstrumentation.debugTool.onBeginFlush,\n close: ReactInstrumentation.debugTool.onEndFlush\n });\n}\n\nvar noopCallbackQueue = {\n enqueue: function () {}\n};\n\n/**\n * @class ReactServerRenderingTransaction\n * @param {boolean} renderToStaticMarkup\n */\nfunction ReactServerRenderingTransaction(renderToStaticMarkup) {\n this.reinitializeTransaction();\n this.renderToStaticMarkup = renderToStaticMarkup;\n this.useCreateElement = false;\n this.updateQueue = new ReactServerUpdateQueue(this);\n}\n\nvar Mixin = {\n /**\n * @see Transaction\n * @abstract\n * @final\n * @return {array} Empty list of operation wrap procedures.\n */\n getTransactionWrappers: function () {\n return TRANSACTION_WRAPPERS;\n },\n\n /**\n * @return {object} The queue to collect `onDOMReady` callbacks with.\n */\n getReactMountReady: function () {\n return noopCallbackQueue;\n },\n\n /**\n * @return {object} The queue to collect React async events.\n */\n getUpdateQueue: function () {\n return this.updateQueue;\n },\n\n /**\n * `PooledClass` looks for this, and will invoke this before allowing this\n * instance to be reused.\n */\n destructor: function () {},\n\n checkpoint: function () {},\n\n rollback: function () {}\n};\n\n_assign(ReactServerRenderingTransaction.prototype, Transaction, Mixin);\n\nPooledClass.addPoolingTo(ReactServerRenderingTransaction);\n\nmodule.exports = ReactServerRenderingTransaction;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/ReactServerRenderingTransaction.js\n// module id = 547\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/ReactServerRenderingTransaction.js?', + ); + + /***/ + }, + /* 548 */ + /* unknown exports provided */ + /* all exports used */ + /*!*****************************************!*\ + !*** ./~/react-dom/lib/ReactVersion.js ***! + \*****************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nmodule.exports = '15.4.2';\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/ReactVersion.js\n// module id = 548\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/ReactVersion.js?", + ); + + /***/ + }, + /* 549 */ + /* unknown exports provided */ + /* all exports used */ + /*!********************************************!*\ + !*** ./~/react-dom/lib/ViewportMetrics.js ***! + \********************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar ViewportMetrics = {\n\n currentScrollLeft: 0,\n\n currentScrollTop: 0,\n\n refreshScrollValues: function (scrollPosition) {\n ViewportMetrics.currentScrollLeft = scrollPosition.x;\n ViewportMetrics.currentScrollTop = scrollPosition.y;\n }\n\n};\n\nmodule.exports = ViewportMetrics;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/ViewportMetrics.js\n// module id = 549\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/ViewportMetrics.js?', + ); + + /***/ + }, + /* 550 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************************!*\ + !*** ./~/react-dom/lib/accumulateInto.js ***! + \*******************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2014-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * \n */\n\n\n\nvar _prodInvariant = __webpack_require__(/*! ./reactProdInvariant */ 17);\n\nvar invariant = __webpack_require__(/*! fbjs/lib/invariant */ 12);\n\n/**\n * Accumulates items that must not be null or undefined into the first one. This\n * is used to conserve memory by avoiding array allocations, and thus sacrifices\n * API cleanness. Since `current` can be null before being passed in and not\n * null after this function, make sure to assign it back to `current`:\n *\n * `a = accumulateInto(a, b);`\n *\n * This API should be sparingly used. Try `accumulate` for something cleaner.\n *\n * @return {*|array<*>} An accumulation of items.\n */\n\nfunction accumulateInto(current, next) {\n !(next != null) ? true ? invariant(false, 'accumulateInto(...): Accumulated items must not be null or undefined.') : _prodInvariant('30') : void 0;\n\n if (current == null) {\n return next;\n }\n\n // Both are not empty. Warning: Never call x.concat(y) when you are not\n // certain that x is an Array (x could be a string with concat method).\n if (Array.isArray(current)) {\n if (Array.isArray(next)) {\n current.push.apply(current, next);\n return current;\n }\n current.push(next);\n return current;\n }\n\n if (Array.isArray(next)) {\n // A bit too dangerous to mutate `next`.\n return [current].concat(next);\n }\n\n return [current, next];\n}\n\nmodule.exports = accumulateInto;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/accumulateInto.js\n// module id = 550\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/accumulateInto.js?", + ); + + /***/ + }, + /* 551 */ + /* unknown exports provided */ + /* all exports used */ + /*!***********************************************!*\ + !*** ./~/react-dom/lib/forEachAccumulated.js ***! + \***********************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * \n */\n\n\n\n/**\n * @param {array} arr an "accumulation" of items which is either an Array or\n * a single item. Useful when paired with the `accumulate` module. This is a\n * simple utility that allows us to reason about a collection of items, but\n * handling the case when there is exactly one item (and we do not need to\n * allocate an array).\n */\n\nfunction forEachAccumulated(arr, cb, scope) {\n if (Array.isArray(arr)) {\n arr.forEach(cb, scope);\n } else if (arr) {\n cb.call(scope, arr);\n }\n}\n\nmodule.exports = forEachAccumulated;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/forEachAccumulated.js\n// module id = 551\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/forEachAccumulated.js?', + ); + + /***/ + }, + /* 552 */ + /* unknown exports provided */ + /* all exports used */ + /*!**********************************************************!*\ + !*** ./~/react-dom/lib/getHostComponentFromComposite.js ***! + \**********************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar ReactNodeTypes = __webpack_require__(/*! ./ReactNodeTypes */ 545);\n\nfunction getHostComponentFromComposite(inst) {\n var type;\n\n while ((type = inst._renderedNodeType) === ReactNodeTypes.COMPOSITE) {\n inst = inst._renderedComponent;\n }\n\n if (type === ReactNodeTypes.HOST) {\n return inst._renderedComponent;\n } else if (type === ReactNodeTypes.EMPTY) {\n return null;\n }\n}\n\nmodule.exports = getHostComponentFromComposite;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/getHostComponentFromComposite.js\n// module id = 552\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/getHostComponentFromComposite.js?', + ); + + /***/ + }, + /* 553 */ + /* unknown exports provided */ + /* all exports used */ + /*!***************************************************!*\ + !*** ./~/react-dom/lib/getTextContentAccessor.js ***! + \***************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar ExecutionEnvironment = __webpack_require__(/*! fbjs/lib/ExecutionEnvironment */ 27);\n\nvar contentKey = null;\n\n/**\n * Gets the key used to access text content on a DOM node.\n *\n * @return {?string} Key used to access text content.\n * @internal\n */\nfunction getTextContentAccessor() {\n if (!contentKey && ExecutionEnvironment.canUseDOM) {\n // Prefer textContent to innerText because many browsers support both but\n // SVG <text> elements don't support innerText even when <div> does.\n contentKey = 'textContent' in document.documentElement ? 'textContent' : 'innerText';\n }\n return contentKey;\n}\n\nmodule.exports = getTextContentAccessor;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/getTextContentAccessor.js\n// module id = 553\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/getTextContentAccessor.js?", + ); + + /***/ + }, + /* 554 */ + /* unknown exports provided */ + /* all exports used */ + /*!***********************************************!*\ + !*** ./~/react-dom/lib/isTextInputElement.js ***! + \***********************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * \n */\n\n\n\n/**\n * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary\n */\n\nvar supportedInputTypes = {\n 'color': true,\n 'date': true,\n 'datetime': true,\n 'datetime-local': true,\n 'email': true,\n 'month': true,\n 'number': true,\n 'password': true,\n 'range': true,\n 'search': true,\n 'tel': true,\n 'text': true,\n 'time': true,\n 'url': true,\n 'week': true\n};\n\nfunction isTextInputElement(elem) {\n var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();\n\n if (nodeName === 'input') {\n return !!supportedInputTypes[elem.type];\n }\n\n if (nodeName === 'textarea') {\n return true;\n }\n\n return false;\n}\n\nmodule.exports = isTextInputElement;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/isTextInputElement.js\n// module id = 554\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/isTextInputElement.js?", + ); + + /***/ + }, + /* 555 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************************!*\ + !*** ./~/react-dom/lib/setTextContent.js ***! + \*******************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar ExecutionEnvironment = __webpack_require__(/*! fbjs/lib/ExecutionEnvironment */ 27);\nvar escapeTextContentForBrowser = __webpack_require__(/*! ./escapeTextContentForBrowser */ 172);\nvar setInnerHTML = __webpack_require__(/*! ./setInnerHTML */ 173);\n\n/**\n * Set the textContent property of a node, ensuring that whitespace is preserved\n * even in IE8. innerText is a poor substitute for textContent and, among many\n * issues, inserts <br> instead of the literal newline chars. innerHTML behaves\n * as it should.\n *\n * @param {DOMElement} node\n * @param {string} text\n * @internal\n */\nvar setTextContent = function (node, text) {\n if (text) {\n var firstChild = node.firstChild;\n\n if (firstChild && firstChild === node.lastChild && firstChild.nodeType === 3) {\n firstChild.nodeValue = text;\n return;\n }\n }\n node.textContent = text;\n};\n\nif (ExecutionEnvironment.canUseDOM) {\n if (!('textContent' in document.documentElement)) {\n setTextContent = function (node, text) {\n if (node.nodeType === 3) {\n node.nodeValue = text;\n return;\n }\n setInnerHTML(node, escapeTextContentForBrowser(text));\n };\n }\n}\n\nmodule.exports = setTextContent;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/setTextContent.js\n// module id = 555\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/setTextContent.js?", + ); + + /***/ + }, + /* 556 */ + /* unknown exports provided */ + /* all exports used */ + /*!************************************************!*\ + !*** ./~/react-dom/lib/traverseAllChildren.js ***! + \************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar _prodInvariant = __webpack_require__(/*! ./reactProdInvariant */ 17);\n\nvar ReactCurrentOwner = __webpack_require__(/*! react/lib/ReactCurrentOwner */ 55);\nvar REACT_ELEMENT_TYPE = __webpack_require__(/*! ./ReactElementSymbol */ 1346);\n\nvar getIteratorFn = __webpack_require__(/*! ./getIteratorFn */ 1379);\nvar invariant = __webpack_require__(/*! fbjs/lib/invariant */ 12);\nvar KeyEscapeUtils = __webpack_require__(/*! ./KeyEscapeUtils */ 248);\nvar warning = __webpack_require__(/*! fbjs/lib/warning */ 13);\n\nvar SEPARATOR = '.';\nvar SUBSEPARATOR = ':';\n\n/**\n * This is inlined from ReactElement since this file is shared between\n * isomorphic and renderers. We could extract this to a\n *\n */\n\n/**\n * TODO: Test that a single child and an array with one item have the same key\n * pattern.\n */\n\nvar didWarnAboutMaps = false;\n\n/**\n * Generate a key string that identifies a component within a set.\n *\n * @param {*} component A component that could contain a manual key.\n * @param {number} index Index that is used if a manual key is not provided.\n * @return {string}\n */\nfunction getComponentKey(component, index) {\n // Do some typechecking here since we call this blindly. We want to ensure\n // that we don't block potential future ES APIs.\n if (component && typeof component === 'object' && component.key != null) {\n // Explicit key\n return KeyEscapeUtils.escape(component.key);\n }\n // Implicit key determined by the index in the set\n return index.toString(36);\n}\n\n/**\n * @param {?*} children Children tree container.\n * @param {!string} nameSoFar Name of the key path so far.\n * @param {!function} callback Callback to invoke with each child found.\n * @param {?*} traverseContext Used to pass information throughout the traversal\n * process.\n * @return {!number} The number of children in this subtree.\n */\nfunction traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) {\n var type = typeof children;\n\n if (type === 'undefined' || type === 'boolean') {\n // All of the above are perceived as null.\n children = null;\n }\n\n if (children === null || type === 'string' || type === 'number' ||\n // The following is inlined from ReactElement. This means we can optimize\n // some checks. React Fiber also inlines this logic for similar purposes.\n type === 'object' && children.$$typeof === REACT_ELEMENT_TYPE) {\n callback(traverseContext, children,\n // If it's the only child, treat the name as if it was wrapped in an array\n // so that it's consistent if the number of children grows.\n nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar);\n return 1;\n }\n\n var child;\n var nextName;\n var subtreeCount = 0; // Count of children found in the current subtree.\n var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;\n\n if (Array.isArray(children)) {\n for (var i = 0; i < children.length; i++) {\n child = children[i];\n nextName = nextNamePrefix + getComponentKey(child, i);\n subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);\n }\n } else {\n var iteratorFn = getIteratorFn(children);\n if (iteratorFn) {\n var iterator = iteratorFn.call(children);\n var step;\n if (iteratorFn !== children.entries) {\n var ii = 0;\n while (!(step = iterator.next()).done) {\n child = step.value;\n nextName = nextNamePrefix + getComponentKey(child, ii++);\n subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);\n }\n } else {\n if (true) {\n var mapsAsChildrenAddendum = '';\n if (ReactCurrentOwner.current) {\n var mapsAsChildrenOwnerName = ReactCurrentOwner.current.getName();\n if (mapsAsChildrenOwnerName) {\n mapsAsChildrenAddendum = ' Check the render method of `' + mapsAsChildrenOwnerName + '`.';\n }\n }\n true ? warning(didWarnAboutMaps, 'Using Maps as children is not yet fully supported. It is an ' + 'experimental feature that might be removed. Convert it to a ' + 'sequence / iterable of keyed ReactElements instead.%s', mapsAsChildrenAddendum) : void 0;\n didWarnAboutMaps = true;\n }\n // Iterator will provide entry [k,v] tuples rather than values.\n while (!(step = iterator.next()).done) {\n var entry = step.value;\n if (entry) {\n child = entry[1];\n nextName = nextNamePrefix + KeyEscapeUtils.escape(entry[0]) + SUBSEPARATOR + getComponentKey(child, 0);\n subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);\n }\n }\n }\n } else if (type === 'object') {\n var addendum = '';\n if (true) {\n addendum = ' If you meant to render a collection of children, use an array ' + 'instead or wrap the object using createFragment(object) from the ' + 'React add-ons.';\n if (children._isReactElement) {\n addendum = ' It looks like you\\'re using an element created by a different ' + 'version of React. Make sure to use only one copy of React.';\n }\n if (ReactCurrentOwner.current) {\n var name = ReactCurrentOwner.current.getName();\n if (name) {\n addendum += ' Check the render method of `' + name + '`.';\n }\n }\n }\n var childrenString = String(children);\n true ? true ? invariant(false, 'Objects are not valid as a React child (found: %s).%s', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum) : _prodInvariant('31', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum) : void 0;\n }\n }\n\n return subtreeCount;\n}\n\n/**\n * Traverses children that are typically specified as `props.children`, but\n * might also be specified through attributes:\n *\n * - `traverseAllChildren(this.props.children, ...)`\n * - `traverseAllChildren(this.props.leftPanelChildren, ...)`\n *\n * The `traverseContext` is an optional argument that is passed through the\n * entire traversal. It can be used to store accumulations or anything else that\n * the callback might find relevant.\n *\n * @param {?*} children Children tree object.\n * @param {!function} callback To invoke upon traversing each child.\n * @param {?*} traverseContext Context for traversal.\n * @return {!number} The number of children in this subtree.\n */\nfunction traverseAllChildren(children, callback, traverseContext) {\n if (children == null) {\n return 0;\n }\n\n return traverseAllChildrenImpl(children, '', callback, traverseContext);\n}\n\nmodule.exports = traverseAllChildren;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/traverseAllChildren.js\n// module id = 556\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/traverseAllChildren.js?", + ); + + /***/ + }, + /* 557 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/react-dom/server.js ***! + \*******************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nmodule.exports = __webpack_require__(/*! ./lib/ReactDOMServer */ 1340);\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/server.js\n// module id = 557\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/server.js?', + ); + + /***/ + }, + /* 558 */ + /* unknown exports provided */ + /* all exports used */ + /*!****************************************************!*\ + !*** ./~/react-google-maps/lib/GoogleMapLoader.js ***! + \****************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\n\nvar _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();\n\nvar _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar _react = __webpack_require__(/*! react */ 1);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _creatorsGoogleMapHolder = __webpack_require__(/*! ./creators/GoogleMapHolder */ 36);\n\nvar _creatorsGoogleMapHolder2 = _interopRequireDefault(_creatorsGoogleMapHolder);\n\nvar USE_NEW_BEHAVIOR_TAG_NAME = "__new_behavior__"; /* CIRCULAR_DEPENDENCY */\n\nvar GoogleMapLoader = (function (_Component) {\n _inherits(GoogleMapLoader, _Component);\n\n function GoogleMapLoader() {\n _classCallCheck(this, GoogleMapLoader);\n\n _get(Object.getPrototypeOf(GoogleMapLoader.prototype), "constructor", this).apply(this, arguments);\n\n this.state = {\n map: null\n };\n }\n\n _createClass(GoogleMapLoader, [{\n key: "mountGoogleMap",\n value: function mountGoogleMap(domEl) {\n if (this.state.map || domEl === null) {\n return;\n }\n var _props$googleMapElement$props = this.props.googleMapElement.props;\n var children = _props$googleMapElement$props.children;\n\n var mapProps = _objectWithoutProperties(_props$googleMapElement$props, ["children"]);\n\n //\n // Create google.maps.Map instance so that dom is initialized before\n // React\'s children creators.\n //\n var map = _creatorsGoogleMapHolder2["default"]._createMap(domEl, mapProps);\n this.setState({ map: map });\n }\n }, {\n key: "renderChild",\n value: function renderChild() {\n if (this.state.map) {\n // Notice: implementation details\n //\n // In this state, the DOM of google.maps.Map is already initialized in\n // my innerHTML. Adding extra React components will not clean it\n // in current version*. It will use prepend to add DOM of\n // GoogleMapHolder and become a sibling of the DOM of google.maps.Map\n // Not sure this is subject to change\n //\n // *current version: 0.13.3, 0.14.2\n //\n return _react2["default"].cloneElement(this.props.googleMapElement, {\n map: this.state.map,\n // ------------ Deprecated ------------\n containerTagName: USE_NEW_BEHAVIOR_TAG_NAME\n });\n }\n }\n }, {\n key: "render",\n value: function render() {\n return _react2["default"].cloneElement(this.props.containerElement, {\n ref: this.mountGoogleMap.bind(this)\n }, this.renderChild());\n }\n }], [{\n key: "propTypes",\n value: {\n containerElement: _react.PropTypes.node.isRequired,\n googleMapElement: _react.PropTypes.element.isRequired },\n enumerable: true\n }, {\n key: "defaultProps",\n /* CIRCULAR_DEPENDENCY. Uncomment when 5.0.0 comes: propTypesElementOfType(GoogleMap).isRequired, */\n value: {\n containerElement: _react2["default"].createElement("div", null)\n },\n enumerable: true\n }]);\n\n return GoogleMapLoader;\n})(_react.Component);\n\nexports["default"] = GoogleMapLoader;\nmodule.exports = exports["default"];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-google-maps/lib/GoogleMapLoader.js\n// module id = 558\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-google-maps/lib/GoogleMapLoader.js?', + ); + + /***/ + }, + /* 559 */ + /* unknown exports provided */ + /* all exports used */ + /*!***********************************************************!*\ + !*** ./~/react-google-maps/lib/utils/addDefaultPrefix.js ***! + \***********************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports["default"] = addDefaultPrefix;\n\nfunction addDefaultPrefix(name) {\n return "default" + (name[0].toUpperCase() + name.slice(1));\n}\n\nmodule.exports = exports["default"];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-google-maps/lib/utils/addDefaultPrefix.js\n// module id = 559\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-google-maps/lib/utils/addDefaultPrefix.js?', + ); + + /***/ + }, + /* 560 */ + /* unknown exports provided */ + /* all exports used */ + /*!**************************************************!*\ + !*** ./~/react-google-maps/~/warning/browser.js ***! + \**************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2014-2015, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n\n\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\nvar warning = function() {};\n\nif (true) {\n warning = function(condition, format, args) {\n var len = arguments.length;\n args = new Array(len > 2 ? len - 2 : 0);\n for (var key = 2; key < len; key++) {\n args[key - 2] = arguments[key];\n }\n if (format === undefined) {\n throw new Error(\n '`warning(condition, format, ...args)` requires a warning ' +\n 'message argument'\n );\n }\n\n if (format.length < 10 || (/^[s\\W]*$/).test(format)) {\n throw new Error(\n 'The warning format should be able to uniquely identify this ' +\n 'warning. Please, use a more descriptive format than: ' + format\n );\n }\n\n if (!condition) {\n var argIndex = 0;\n var message = 'Warning: ' +\n format.replace(/%s/g, function() {\n return args[argIndex++];\n });\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch(x) {}\n }\n };\n}\n\nmodule.exports = warning;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-google-maps/~/warning/browser.js\n// module id = 560\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-google-maps/~/warning/browser.js?", + ); + + /***/ + }, + /* 561 */ + /* unknown exports provided */ + /* all exports used */ + /*!****************************************************************!*\ + !*** ./~/react-on-rails/node_package/lib/ComponentRegistry.js ***! + \****************************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _from = __webpack_require__(/*! babel-runtime/core-js/array/from */ 145);\n\nvar _from2 = _interopRequireDefault(_from);\n\nvar _keys = __webpack_require__(/*! babel-runtime/core-js/object/keys */ 194);\n\nvar _keys2 = _interopRequireDefault(_keys);\n\nvar _map = __webpack_require__(/*! babel-runtime/core-js/map */ 313);\n\nvar _map2 = _interopRequireDefault(_map);\n\nvar _generatorFunction = __webpack_require__(/*! ./generatorFunction */ 1429);\n\nvar _generatorFunction2 = _interopRequireDefault(_generatorFunction);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar registeredComponents = new _map2.default(); // key = name used by react_on_rails\n// value = { name, component, generatorFunction: boolean, isRenderer: boolean }\nexports.default = {\n /**\n * @param components { component1: component1, component2: component2, etc. }\n */\n register: function register(components) {\n (0, _keys2.default)(components).forEach(function (name) {\n if (registeredComponents.has(name)) {\n console.warn('Called register for component that is already registered', name);\n }\n\n var component = components[name];\n if (!component) {\n throw new Error('Called register with null component named ' + name);\n }\n\n var isGeneratorFunction = (0, _generatorFunction2.default)(component);\n var isRenderer = isGeneratorFunction && component.length === 3;\n\n registeredComponents.set(name, {\n name: name,\n component: component,\n generatorFunction: isGeneratorFunction,\n isRenderer: isRenderer\n });\n });\n },\n\n\n /**\n * @param name\n * @returns { name, component, generatorFunction }\n */\n get: function get(name) {\n if (registeredComponents.has(name)) {\n return registeredComponents.get(name);\n }\n\n var keys = (0, _from2.default)(registeredComponents.keys()).join(', ');\n throw new Error('Could not find component registered with name ' + name + '. Registered component names include [ ' + keys + ' ]. Maybe you forgot to register the component?');\n },\n\n\n /**\n * Get a Map containing all registered components. Useful for debugging.\n * @returns Map where key is the component name and values are the\n * { name, component, generatorFunction}\n */\n components: function components() {\n return registeredComponents;\n }\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-on-rails/node_package/lib/ComponentRegistry.js\n// module id = 561\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-on-rails/node_package/lib/ComponentRegistry.js?", + ); + + /***/ + }, + /* 562 */ + /* unknown exports provided */ + /* all exports used */ + /*!*****************************************************************!*\ + !*** ./~/react-on-rails/node_package/lib/buildConsoleReplay.js ***! + \*****************************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _stringify = __webpack_require__(/*! babel-runtime/core-js/json/stringify */ 146);\n\nvar _stringify2 = _interopRequireDefault(_stringify);\n\nexports.consoleReplay = consoleReplay;\nexports.default = buildConsoleReplay;\n\nvar _RenderUtils = __webpack_require__(/*! ./RenderUtils */ 1425);\n\nvar _RenderUtils2 = _interopRequireDefault(_RenderUtils);\n\nvar _scriptSanitizedVal = __webpack_require__(/*! ./scriptSanitizedVal */ 1430);\n\nvar _scriptSanitizedVal2 = _interopRequireDefault(_scriptSanitizedVal);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction consoleReplay() {\n // console.history is a global polyfill used in server rendering.\n if (!(console.history instanceof Array)) {\n return '';\n }\n\n var lines = console.history.map(function (msg) {\n var stringifiedList = msg.arguments.map(function (arg) {\n var val = void 0;\n try {\n val = typeof arg === 'string' || arg instanceof String ? arg : (0, _stringify2.default)(arg);\n } catch (e) {\n val = e.message + ': ' + arg;\n }\n\n return (0, _scriptSanitizedVal2.default)(val);\n });\n\n return 'console.' + msg.level + '.apply(console, ' + (0, _stringify2.default)(stringifiedList) + ');';\n });\n\n return lines.join('\\n');\n}\n\nfunction buildConsoleReplay() {\n return _RenderUtils2.default.wrapInScriptTags('consoleReplayLog', consoleReplay());\n}\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-on-rails/node_package/lib/buildConsoleReplay.js\n// module id = 562\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-on-rails/node_package/lib/buildConsoleReplay.js?", + ); + + /***/ + }, + /* 563 */ + /* unknown exports provided */ + /* all exports used */ + /*!**********************************************************!*\ + !*** ./~/react-on-rails/node_package/lib/handleError.js ***! + \**********************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _react = __webpack_require__(/*! react */ 1);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _server = __webpack_require__(/*! react-dom/server */ 557);\n\nvar _server2 = _interopRequireDefault(_server);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction handleGeneratorFunctionIssue(options) {\n var e = options.e,\n name = options.name;\n\n\n var msg = '';\n\n if (name) {\n var lastLine = 'A generator function takes a single arg of props (and the location for react-router) ' + 'and returns a ReactElement.';\n\n var shouldBeGeneratorError = 'ERROR: ReactOnRails is incorrectly detecting generator function to be false. The React\\ncomponent \\'' + name + '\\' seems to be a generator function.\\n' + lastLine;\n var reMatchShouldBeGeneratorError = /Can't add property context, object is not extensible/;\n if (reMatchShouldBeGeneratorError.test(e.message)) {\n msg += shouldBeGeneratorError + '\\n\\n';\n console.error(shouldBeGeneratorError);\n }\n\n shouldBeGeneratorError = 'ERROR: ReactOnRails is incorrectly detecting generatorFunction to be true, but the React\\ncomponent \\'' + name + '\\' is not a generator function.\\n' + lastLine;\n\n var reMatchShouldNotBeGeneratorError = /Cannot call a class as a function/;\n\n if (reMatchShouldNotBeGeneratorError.test(e.message)) {\n msg += shouldBeGeneratorError + '\\n\\n';\n console.error(shouldBeGeneratorError);\n }\n }\n\n return msg;\n}\n\nvar handleError = function handleError(options) {\n var e = options.e,\n jsCode = options.jsCode,\n serverSide = options.serverSide;\n\n\n console.error('Exception in rendering!');\n\n var msg = handleGeneratorFunctionIssue(options);\n\n if (jsCode) {\n console.error('JS code was: ' + jsCode);\n }\n\n if (e.fileName) {\n console.error('location: ' + e.fileName + ':' + e.lineNumber);\n }\n\n console.error('message: ' + e.message);\n console.error('stack: ' + e.stack);\n\n if (serverSide) {\n msg += 'Exception in rendering!\\n' + (e.fileName ? '\\nlocation: ' + e.fileName + ':' + e.lineNumber : '') + '\\nMessage: ' + e.message + '\\n\\n' + e.stack;\n\n var reactElement = _react2.default.createElement('pre', null, msg);\n return _server2.default.renderToString(reactElement);\n }\n\n return undefined;\n};\n\nexports.default = handleError;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-on-rails/node_package/lib/handleError.js\n// module id = 563\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-on-rails/node_package/lib/handleError.js?", + ); + + /***/ + }, + /* 564 */ + /* unknown exports provided */ + /* all exports used */ + /*!******************************************************************************************!*\ + !*** ./~/react-on-rails/node_package/lib/isCreateReactElementResultNonReactComponent.js ***! + \******************************************************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = isResultNonReactComponent;\nfunction isResultNonReactComponent(reactElementOrRouterResult) {\n return !!(reactElementOrRouterResult.renderedHtml || reactElementOrRouterResult.redirectLocation || reactElementOrRouterResult.error);\n}\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-on-rails/node_package/lib/isCreateReactElementResultNonReactComponent.js\n// module id = 564\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-on-rails/node_package/lib/isCreateReactElementResultNonReactComponent.js?', + ); + + /***/ + }, + /* 565 */ + /* unknown exports provided */ + /* all exports used */ + /*!****************************************!*\ + !*** ./~/react-overlays/lib/Portal.js ***! + \****************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _react = __webpack_require__(/*! react */ 1);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactDom = __webpack_require__(/*! react-dom */ 16);\n\nvar _reactDom2 = _interopRequireDefault(_reactDom);\n\nvar _componentOrElement = __webpack_require__(/*! react-prop-types/lib/componentOrElement */ 264);\n\nvar _componentOrElement2 = _interopRequireDefault(_componentOrElement);\n\nvar _ownerDocument = __webpack_require__(/*! ./utils/ownerDocument */ 127);\n\nvar _ownerDocument2 = _interopRequireDefault(_ownerDocument);\n\nvar _getContainer = __webpack_require__(/*! ./utils/getContainer */ 263);\n\nvar _getContainer2 = _interopRequireDefault(_getContainer);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * The `<Portal/>` component renders its children into a new \"subtree\" outside of current component hierarchy.\n * You can think of it as a declarative `appendChild()`, or jQuery's `$.fn.appendTo()`.\n * The children of `<Portal/>` component will be appended to the `container` specified.\n */\nvar Portal = _react2.default.createClass({\n\n displayName: 'Portal',\n\n propTypes: {\n /**\n * A Node, Component instance, or function that returns either. The `container` will have the Portal children\n * appended to it.\n */\n container: _react2.default.PropTypes.oneOfType([_componentOrElement2.default, _react2.default.PropTypes.func])\n },\n\n componentDidMount: function componentDidMount() {\n this._renderOverlay();\n },\n componentDidUpdate: function componentDidUpdate() {\n this._renderOverlay();\n },\n componentWillReceiveProps: function componentWillReceiveProps(nextProps) {\n if (this._overlayTarget && nextProps.container !== this.props.container) {\n this._portalContainerNode.removeChild(this._overlayTarget);\n this._portalContainerNode = (0, _getContainer2.default)(nextProps.container, (0, _ownerDocument2.default)(this).body);\n this._portalContainerNode.appendChild(this._overlayTarget);\n }\n },\n componentWillUnmount: function componentWillUnmount() {\n this._unrenderOverlay();\n this._unmountOverlayTarget();\n },\n _mountOverlayTarget: function _mountOverlayTarget() {\n if (!this._overlayTarget) {\n this._overlayTarget = document.createElement('div');\n this._portalContainerNode = (0, _getContainer2.default)(this.props.container, (0, _ownerDocument2.default)(this).body);\n this._portalContainerNode.appendChild(this._overlayTarget);\n }\n },\n _unmountOverlayTarget: function _unmountOverlayTarget() {\n if (this._overlayTarget) {\n this._portalContainerNode.removeChild(this._overlayTarget);\n this._overlayTarget = null;\n }\n this._portalContainerNode = null;\n },\n _renderOverlay: function _renderOverlay() {\n\n var overlay = !this.props.children ? null : _react2.default.Children.only(this.props.children);\n\n // Save reference for future access.\n if (overlay !== null) {\n this._mountOverlayTarget();\n this._overlayInstance = _reactDom2.default.unstable_renderSubtreeIntoContainer(this, overlay, this._overlayTarget);\n } else {\n // Unrender if the component is null for transitions to null\n this._unrenderOverlay();\n this._unmountOverlayTarget();\n }\n },\n _unrenderOverlay: function _unrenderOverlay() {\n if (this._overlayTarget) {\n _reactDom2.default.unmountComponentAtNode(this._overlayTarget);\n this._overlayInstance = null;\n }\n },\n render: function render() {\n return null;\n },\n getMountNode: function getMountNode() {\n return this._overlayTarget;\n },\n getOverlayDOMNode: function getOverlayDOMNode() {\n if (!this.isMounted()) {\n throw new Error('getOverlayDOMNode(): A component must be mounted to have a DOM node.');\n }\n\n if (this._overlayInstance) {\n return _reactDom2.default.findDOMNode(this._overlayInstance);\n }\n\n return null;\n }\n});\n\nexports.default = Portal;\nmodule.exports = exports['default'];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-overlays/lib/Portal.js\n// module id = 565\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-overlays/lib/Portal.js?", + ); + + /***/ + }, + /* 566 */ + /* unknown exports provided */ + /* all exports used */ + /*!**************************************************!*\ + !*** ./~/react-overlays/lib/RootCloseWrapper.js ***! + \**************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _contains = __webpack_require__(/*! dom-helpers/query/contains */ 95);\n\nvar _contains2 = _interopRequireDefault(_contains);\n\nvar _react = __webpack_require__(/*! react */ 1);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactDom = __webpack_require__(/*! react-dom */ 16);\n\nvar _reactDom2 = _interopRequireDefault(_reactDom);\n\nvar _addEventListener = __webpack_require__(/*! ./utils/addEventListener */ 568);\n\nvar _addEventListener2 = _interopRequireDefault(_addEventListener);\n\nvar _ownerDocument = __webpack_require__(/*! ./utils/ownerDocument */ 127);\n\nvar _ownerDocument2 = _interopRequireDefault(_ownerDocument);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar escapeKeyCode = 27;\n\nfunction isLeftClickEvent(event) {\n return event.button === 0;\n}\n\nfunction isModifiedEvent(event) {\n return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);\n}\n\n/**\n * The `<RootCloseWrapper/>` component registers your callback on the document\n * when rendered. Powers the `<Overlay/>` component. This is used achieve modal\n * style behavior where your callback is triggered when the user tries to\n * interact with the rest of the document or hits the `esc` key.\n */\n\nvar RootCloseWrapper = function (_React$Component) {\n _inherits(RootCloseWrapper, _React$Component);\n\n function RootCloseWrapper(props, context) {\n _classCallCheck(this, RootCloseWrapper);\n\n var _this = _possibleConstructorReturn(this, (RootCloseWrapper.__proto__ || Object.getPrototypeOf(RootCloseWrapper)).call(this, props, context));\n\n _this.handleMouseCapture = function (e) {\n _this.preventMouseRootClose = isModifiedEvent(e) || !isLeftClickEvent(e) || (0, _contains2.default)(_reactDom2.default.findDOMNode(_this), e.target);\n };\n\n _this.handleMouse = function (e) {\n if (!_this.preventMouseRootClose && _this.props.onRootClose) {\n _this.props.onRootClose(e);\n }\n };\n\n _this.handleKeyUp = function (e) {\n if (e.keyCode === escapeKeyCode && _this.props.onRootClose) {\n _this.props.onRootClose(e);\n }\n };\n\n _this.preventMouseRootClose = false;\n return _this;\n }\n\n _createClass(RootCloseWrapper, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n if (!this.props.disabled) {\n this.addEventListeners();\n }\n }\n }, {\n key: 'componentDidUpdate',\n value: function componentDidUpdate(prevProps) {\n if (!this.props.disabled && prevProps.disabled) {\n this.addEventListeners();\n } else if (this.props.disabled && !prevProps.disabled) {\n this.removeEventListeners();\n }\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n if (!this.props.disabled) {\n this.removeEventListeners();\n }\n }\n }, {\n key: 'addEventListeners',\n value: function addEventListeners() {\n var event = this.props.event;\n\n var doc = (0, _ownerDocument2.default)(this);\n\n // Use capture for this listener so it fires before React's listener, to\n // avoid false positives in the contains() check below if the target DOM\n // element is removed in the React mouse callback.\n this.documentMouseCaptureListener = (0, _addEventListener2.default)(doc, event, this.handleMouseCapture, true);\n\n this.documentMouseListener = (0, _addEventListener2.default)(doc, event, this.handleMouse);\n\n this.documentKeyupListener = (0, _addEventListener2.default)(doc, 'keyup', this.handleKeyUp);\n }\n }, {\n key: 'removeEventListeners',\n value: function removeEventListeners() {\n if (this.documentMouseCaptureListener) {\n this.documentMouseCaptureListener.remove();\n }\n\n if (this.documentMouseListener) {\n this.documentMouseListener.remove();\n }\n\n if (this.documentKeyupListener) {\n this.documentKeyupListener.remove();\n }\n }\n }, {\n key: 'render',\n value: function render() {\n return this.props.children;\n }\n }]);\n\n return RootCloseWrapper;\n}(_react2.default.Component);\n\nRootCloseWrapper.displayName = 'RootCloseWrapper';\n\nRootCloseWrapper.propTypes = {\n /**\n * Callback fired after click or mousedown. Also triggers when user hits `esc`.\n */\n onRootClose: _react2.default.PropTypes.func,\n /**\n * Children to render.\n */\n children: _react2.default.PropTypes.element,\n /**\n * Disable the the RootCloseWrapper, preventing it from triggering `onRootClose`.\n */\n disabled: _react2.default.PropTypes.bool,\n /**\n * Choose which document mouse event to bind to.\n */\n event: _react2.default.PropTypes.oneOf(['click', 'mousedown'])\n};\n\nRootCloseWrapper.defaultProps = {\n event: 'click'\n};\n\nexports.default = RootCloseWrapper;\nmodule.exports = exports['default'];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-overlays/lib/RootCloseWrapper.js\n// module id = 566\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-overlays/lib/RootCloseWrapper.js?", + ); + + /***/ + }, + /* 567 */ + /* unknown exports provided */ + /* exports used: default */ + /*!********************************************!*\ + !*** ./~/react-overlays/lib/Transition.js ***! + \********************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.EXITING = exports.ENTERED = exports.ENTERING = exports.EXITED = exports.UNMOUNTED = undefined;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _classnames = __webpack_require__(/*! classnames */ 2);\n\nvar _classnames2 = _interopRequireDefault(_classnames);\n\nvar _on = __webpack_require__(/*! dom-helpers/events/on */ 156);\n\nvar _on2 = _interopRequireDefault(_on);\n\nvar _properties = __webpack_require__(/*! dom-helpers/transition/properties */ 343);\n\nvar _properties2 = _interopRequireDefault(_properties);\n\nvar _react = __webpack_require__(/*! react */ 1);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactDom = __webpack_require__(/*! react-dom */ 16);\n\nvar _reactDom2 = _interopRequireDefault(_reactDom);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar transitionEndEvent = _properties2.default.end;\n\nvar UNMOUNTED = exports.UNMOUNTED = 0;\nvar EXITED = exports.EXITED = 1;\nvar ENTERING = exports.ENTERING = 2;\nvar ENTERED = exports.ENTERED = 3;\nvar EXITING = exports.EXITING = 4;\n\n/**\n * The Transition component lets you define and run css transitions with a simple declarative api.\n * It works similar to React\'s own [CSSTransitionGroup](http://facebook.github.io/react/docs/animation.html#high-level-api-reactcsstransitiongroup)\n * but is specifically optimized for transitioning a single child "in" or "out".\n *\n * You don\'t even need to use class based css transitions if you don\'t want to (but it is easiest).\n * The extensive set of lifecycle callbacks means you have control over\n * the transitioning now at each step of the way.\n */\n\nvar Transition = function (_React$Component) {\n _inherits(Transition, _React$Component);\n\n function Transition(props, context) {\n _classCallCheck(this, Transition);\n\n var _this = _possibleConstructorReturn(this, (Transition.__proto__ || Object.getPrototypeOf(Transition)).call(this, props, context));\n\n var initialStatus = void 0;\n _this.nextStatus = null;\n\n if (props.in) {\n if (props.transitionAppear) {\n initialStatus = EXITED;\n _this.nextStatus = ENTERING;\n } else {\n initialStatus = ENTERED;\n }\n } else {\n if (props.unmountOnExit || props.mountOnEnter) {\n initialStatus = UNMOUNTED;\n } else {\n initialStatus = EXITED;\n }\n }\n\n _this.state = { status: initialStatus };\n\n _this.nextCallback = null;\n return _this;\n }\n\n _createClass(Transition, [{\n key: \'componentDidMount\',\n value: function componentDidMount() {\n this.updateStatus();\n }\n }, {\n key: \'componentWillReceiveProps\',\n value: function componentWillReceiveProps(nextProps) {\n var status = this.state.status;\n\n\n if (nextProps.in) {\n if (status === UNMOUNTED) {\n this.setState({ status: EXITED });\n }\n if (status !== ENTERING && status !== ENTERED) {\n this.nextStatus = ENTERING;\n }\n } else {\n if (status === ENTERING || status === ENTERED) {\n this.nextStatus = EXITING;\n }\n }\n }\n }, {\n key: \'componentDidUpdate\',\n value: function componentDidUpdate() {\n this.updateStatus();\n }\n }, {\n key: \'componentWillUnmount\',\n value: function componentWillUnmount() {\n this.cancelNextCallback();\n }\n }, {\n key: \'updateStatus\',\n value: function updateStatus() {\n var _this2 = this;\n\n if (this.nextStatus !== null) {\n // nextStatus will always be ENTERING or EXITING.\n this.cancelNextCallback();\n var node = _reactDom2.default.findDOMNode(this);\n\n if (this.nextStatus === ENTERING) {\n this.props.onEnter(node);\n\n this.safeSetState({ status: ENTERING }, function () {\n _this2.props.onEntering(node);\n\n _this2.onTransitionEnd(node, function () {\n _this2.safeSetState({ status: ENTERED }, function () {\n _this2.props.onEntered(node);\n });\n });\n });\n } else {\n this.props.onExit(node);\n\n this.safeSetState({ status: EXITING }, function () {\n _this2.props.onExiting(node);\n\n _this2.onTransitionEnd(node, function () {\n _this2.safeSetState({ status: EXITED }, function () {\n _this2.props.onExited(node);\n });\n });\n });\n }\n\n this.nextStatus = null;\n } else if (this.props.unmountOnExit && this.state.status === EXITED) {\n this.setState({ status: UNMOUNTED });\n }\n }\n }, {\n key: \'cancelNextCallback\',\n value: function cancelNextCallback() {\n if (this.nextCallback !== null) {\n this.nextCallback.cancel();\n this.nextCallback = null;\n }\n }\n }, {\n key: \'safeSetState\',\n value: function safeSetState(nextState, callback) {\n // This shouldn\'t be necessary, but there are weird race conditions with\n // setState callbacks and unmounting in testing, so always make sure that\n // we can cancel any pending setState callbacks after we unmount.\n this.setState(nextState, this.setNextCallback(callback));\n }\n }, {\n key: \'setNextCallback\',\n value: function setNextCallback(callback) {\n var _this3 = this;\n\n var active = true;\n\n this.nextCallback = function (event) {\n if (active) {\n active = false;\n _this3.nextCallback = null;\n\n callback(event);\n }\n };\n\n this.nextCallback.cancel = function () {\n active = false;\n };\n\n return this.nextCallback;\n }\n }, {\n key: \'onTransitionEnd\',\n value: function onTransitionEnd(node, handler) {\n this.setNextCallback(handler);\n\n if (node) {\n (0, _on2.default)(node, transitionEndEvent, this.nextCallback);\n setTimeout(this.nextCallback, this.props.timeout);\n } else {\n setTimeout(this.nextCallback, 0);\n }\n }\n }, {\n key: \'render\',\n value: function render() {\n var status = this.state.status;\n if (status === UNMOUNTED) {\n return null;\n }\n\n var _props = this.props,\n children = _props.children,\n className = _props.className,\n childProps = _objectWithoutProperties(_props, [\'children\', \'className\']);\n\n Object.keys(Transition.propTypes).forEach(function (key) {\n return delete childProps[key];\n });\n\n var transitionClassName = void 0;\n if (status === EXITED) {\n transitionClassName = this.props.exitedClassName;\n } else if (status === ENTERING) {\n transitionClassName = this.props.enteringClassName;\n } else if (status === ENTERED) {\n transitionClassName = this.props.enteredClassName;\n } else if (status === EXITING) {\n transitionClassName = this.props.exitingClassName;\n }\n\n var child = _react2.default.Children.only(children);\n return _react2.default.cloneElement(child, _extends({}, childProps, {\n className: (0, _classnames2.default)(child.props.className, className, transitionClassName)\n }));\n }\n }]);\n\n return Transition;\n}(_react2.default.Component);\n\nTransition.propTypes = {\n /**\n * Show the component; triggers the enter or exit animation\n */\n in: _react2.default.PropTypes.bool,\n\n /**\n * Wait until the first "enter" transition to mount the component (add it to the DOM)\n */\n mountOnEnter: _react2.default.PropTypes.bool,\n\n /**\n * Unmount the component (remove it from the DOM) when it is not shown\n */\n unmountOnExit: _react2.default.PropTypes.bool,\n\n /**\n * Run the enter animation when the component mounts, if it is initially\n * shown\n */\n transitionAppear: _react2.default.PropTypes.bool,\n\n /**\n * A Timeout for the animation, in milliseconds, to ensure that a node doesn\'t\n * transition indefinately if the browser transitionEnd events are\n * canceled or interrupted.\n *\n * By default this is set to a high number (5 seconds) as a failsafe. You should consider\n * setting this to the duration of your animation (or a bit above it).\n */\n timeout: _react2.default.PropTypes.number,\n\n /**\n * CSS class or classes applied when the component is exited\n */\n exitedClassName: _react2.default.PropTypes.string,\n /**\n * CSS class or classes applied while the component is exiting\n */\n exitingClassName: _react2.default.PropTypes.string,\n /**\n * CSS class or classes applied when the component is entered\n */\n enteredClassName: _react2.default.PropTypes.string,\n /**\n * CSS class or classes applied while the component is entering\n */\n enteringClassName: _react2.default.PropTypes.string,\n\n /**\n * Callback fired before the "entering" classes are applied\n */\n onEnter: _react2.default.PropTypes.func,\n /**\n * Callback fired after the "entering" classes are applied\n */\n onEntering: _react2.default.PropTypes.func,\n /**\n * Callback fired after the "enter" classes are applied\n */\n onEntered: _react2.default.PropTypes.func,\n /**\n * Callback fired before the "exiting" classes are applied\n */\n onExit: _react2.default.PropTypes.func,\n /**\n * Callback fired after the "exiting" classes are applied\n */\n onExiting: _react2.default.PropTypes.func,\n /**\n * Callback fired after the "exited" classes are applied\n */\n onExited: _react2.default.PropTypes.func\n};\n\n// Name the function so it is clearer in the documentation\nfunction noop() {}\n\nTransition.displayName = \'Transition\';\n\nTransition.defaultProps = {\n in: false,\n unmountOnExit: false,\n transitionAppear: false,\n\n timeout: 5000,\n\n onEnter: noop,\n onEntering: noop,\n onEntered: noop,\n\n onExit: noop,\n onExiting: noop,\n onExited: noop\n};\n\nexports.default = Transition;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-overlays/lib/Transition.js\n// module id = 567\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-overlays/lib/Transition.js?', + ); + + /***/ + }, + /* 568 */ + /* unknown exports provided */ + /* all exports used */ + /*!********************************************************!*\ + !*** ./~/react-overlays/lib/utils/addEventListener.js ***! + \********************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\n\nexports.default = function (node, event, handler, capture) {\n (0, _on2.default)(node, event, handler, capture);\n\n return {\n remove: function remove() {\n (0, _off2.default)(node, event, handler, capture);\n }\n };\n};\n\nvar _on = __webpack_require__(/*! dom-helpers/events/on */ 156);\n\nvar _on2 = _interopRequireDefault(_on);\n\nvar _off = __webpack_require__(/*! dom-helpers/events/off */ 211);\n\nvar _off2 = _interopRequireDefault(_off);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nmodule.exports = exports[\'default\'];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-overlays/lib/utils/addEventListener.js\n// module id = 568\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-overlays/lib/utils/addEventListener.js?', + ); + + /***/ + }, + /* 569 */ + /* unknown exports provided */ + /* all exports used */ + /*!*****************************************************!*\ + !*** ./~/react-overlays/lib/utils/isOverflowing.js ***! + \*****************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isOverflowing;\n\nvar _isWindow = __webpack_require__(/*! dom-helpers/query/isWindow */ 157);\n\nvar _isWindow2 = _interopRequireDefault(_isWindow);\n\nvar _ownerDocument = __webpack_require__(/*! dom-helpers/ownerDocument */ 94);\n\nvar _ownerDocument2 = _interopRequireDefault(_ownerDocument);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction isBody(node) {\n return node && node.tagName.toLowerCase() === 'body';\n}\n\nfunction bodyIsOverflowing(node) {\n var doc = (0, _ownerDocument2.default)(node);\n var win = (0, _isWindow2.default)(doc);\n var fullWidth = win.innerWidth;\n\n // Support: ie8, no innerWidth\n if (!fullWidth) {\n var documentElementRect = doc.documentElement.getBoundingClientRect();\n fullWidth = documentElementRect.right - Math.abs(documentElementRect.left);\n }\n\n return doc.body.clientWidth < fullWidth;\n}\n\nfunction isOverflowing(container) {\n var win = (0, _isWindow2.default)(container);\n\n return win || isBody(container) ? bodyIsOverflowing(container) : container.scrollHeight > container.clientHeight;\n}\nmodule.exports = exports['default'];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-overlays/lib/utils/isOverflowing.js\n// module id = 569\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-overlays/lib/utils/isOverflowing.js?", + ); + + /***/ + }, + /* 570 */ + /* unknown exports provided */ + /* all exports used */ + /*!****************************************!*\ + !*** ./~/react-portal/build/portal.js ***! + \****************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(/*! react */ 1);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactDom = __webpack_require__(/*! react-dom */ 16);\n\nvar _reactDom2 = _interopRequireDefault(_reactDom);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar KEYCODES = {\n ESCAPE: 27\n};\n\nvar Portal = function (_React$Component) {\n _inherits(Portal, _React$Component);\n\n function Portal() {\n _classCallCheck(this, Portal);\n\n var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(Portal).call(this));\n\n _this.state = { active: false };\n _this.handleWrapperClick = _this.handleWrapperClick.bind(_this);\n _this.closePortal = _this.closePortal.bind(_this);\n _this.handleOutsideMouseClick = _this.handleOutsideMouseClick.bind(_this);\n _this.handleKeydown = _this.handleKeydown.bind(_this);\n _this.portal = null;\n _this.node = null;\n return _this;\n }\n\n _createClass(Portal, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n if (this.props.closeOnEsc) {\n document.addEventListener('keydown', this.handleKeydown);\n }\n\n if (this.props.closeOnOutsideClick) {\n document.addEventListener('mouseup', this.handleOutsideMouseClick);\n document.addEventListener('touchstart', this.handleOutsideMouseClick);\n }\n\n if (this.props.isOpened) {\n this.openPortal();\n }\n }\n }, {\n key: 'componentWillReceiveProps',\n value: function componentWillReceiveProps(newProps) {\n // portal's 'is open' state is handled through the prop isOpened\n if (typeof newProps.isOpened !== 'undefined') {\n if (newProps.isOpened) {\n if (this.state.active) {\n this.renderPortal(newProps);\n } else {\n this.openPortal(newProps);\n }\n }\n if (!newProps.isOpened && this.state.active) {\n this.closePortal();\n }\n }\n\n // portal handles its own 'is open' state\n if (typeof newProps.isOpened === 'undefined' && this.state.active) {\n this.renderPortal(newProps);\n }\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n if (this.props.closeOnEsc) {\n document.removeEventListener('keydown', this.handleKeydown);\n }\n\n if (this.props.closeOnOutsideClick) {\n document.removeEventListener('mouseup', this.handleOutsideMouseClick);\n document.removeEventListener('touchstart', this.handleOutsideMouseClick);\n }\n\n this.closePortal(true);\n }\n }, {\n key: 'handleWrapperClick',\n value: function handleWrapperClick(e) {\n e.preventDefault();\n e.stopPropagation();\n if (this.state.active) {\n return;\n }\n this.openPortal();\n }\n }, {\n key: 'openPortal',\n value: function openPortal() {\n var props = arguments.length <= 0 || arguments[0] === undefined ? this.props : arguments[0];\n\n this.setState({ active: true });\n this.renderPortal(props);\n this.props.onOpen(this.node);\n }\n }, {\n key: 'closePortal',\n value: function closePortal() {\n var _this2 = this;\n\n var isUnmounted = arguments.length <= 0 || arguments[0] === undefined ? false : arguments[0];\n\n var resetPortalState = function resetPortalState() {\n if (_this2.node) {\n _reactDom2.default.unmountComponentAtNode(_this2.node);\n document.body.removeChild(_this2.node);\n }\n _this2.portal = null;\n _this2.node = null;\n if (isUnmounted !== true) {\n _this2.setState({ active: false });\n }\n };\n\n if (this.state.active) {\n if (this.props.beforeClose) {\n this.props.beforeClose(this.node, resetPortalState);\n } else {\n resetPortalState();\n }\n\n this.props.onClose();\n }\n }\n }, {\n key: 'handleOutsideMouseClick',\n value: function handleOutsideMouseClick(e) {\n if (!this.state.active) {\n return;\n }\n\n var root = (0, _reactDom.findDOMNode)(this.portal);\n if (root.contains(e.target) || e.button && e.button !== 0) {\n return;\n }\n\n e.stopPropagation();\n this.closePortal();\n }\n }, {\n key: 'handleKeydown',\n value: function handleKeydown(e) {\n if (e.keyCode === KEYCODES.ESCAPE && this.state.active) {\n this.closePortal();\n }\n }\n }, {\n key: 'renderPortal',\n value: function renderPortal(props) {\n if (!this.node) {\n this.node = document.createElement('div');\n document.body.appendChild(this.node);\n }\n\n var children = props.children;\n // https://gist.github.com/jimfb/d99e0678e9da715ccf6454961ef04d1b\n if (typeof props.children.type === 'function') {\n children = _react2.default.cloneElement(props.children, { closePortal: this.closePortal });\n }\n\n this.portal = _reactDom2.default.unstable_renderSubtreeIntoContainer(this, children, this.node, this.props.onUpdate);\n }\n }, {\n key: 'render',\n value: function render() {\n if (this.props.openByClickOn) {\n return _react2.default.cloneElement(this.props.openByClickOn, { onClick: this.handleWrapperClick });\n }\n return null;\n }\n }]);\n\n return Portal;\n}(_react2.default.Component);\n\nexports.default = Portal;\n\n\nPortal.propTypes = {\n children: _react2.default.PropTypes.element.isRequired,\n openByClickOn: _react2.default.PropTypes.element,\n closeOnEsc: _react2.default.PropTypes.bool,\n closeOnOutsideClick: _react2.default.PropTypes.bool,\n isOpened: _react2.default.PropTypes.bool,\n onOpen: _react2.default.PropTypes.func,\n onClose: _react2.default.PropTypes.func,\n beforeClose: _react2.default.PropTypes.func,\n onUpdate: _react2.default.PropTypes.func\n};\n\nPortal.defaultProps = {\n onOpen: function onOpen() {},\n onClose: function onClose() {},\n onUpdate: function onUpdate() {}\n};\nmodule.exports = exports['default'];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-portal/build/portal.js\n// module id = 570\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-portal/build/portal.js?", + ); + + /***/ + }, + /* 571 */ + /* exports provided: default */ + /* exports used: default */ + /*!********************************************************!*\ + !*** ./~/react-redux/es/components/connectAdvanced.js ***! + \********************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_hoist_non_react_statics__ = __webpack_require__(/*! hoist-non-react-statics */ 217);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_hoist_non_react_statics___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_hoist_non_react_statics__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(/*! invariant */ 25);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_invariant__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__utils_Subscription__ = __webpack_require__(/*! ../utils/Subscription */ 1446);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__utils_PropTypes__ = __webpack_require__(/*! ../utils/PropTypes */ 573);\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = connectAdvanced;\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\n\n\n\n\n\n\n\nvar hotReloadingVersion = 0;\nvar dummyState = {};\nfunction noop() {}\nfunction makeSelectorStateful(sourceSelector, store) {\n // wrap the selector in an object that tracks its results between runs.\n var selector = {\n run: function runComponentSelector(props) {\n try {\n var nextProps = sourceSelector(store.getState(), props);\n if (nextProps !== selector.props || selector.error) {\n selector.shouldComponentUpdate = true;\n selector.props = nextProps;\n selector.error = null;\n }\n } catch (error) {\n selector.shouldComponentUpdate = true;\n selector.error = error;\n }\n }\n };\n\n return selector;\n}\n\nfunction connectAdvanced(\n/*\n selectorFactory is a func that is responsible for returning the selector function used to\n compute new props from state, props, and dispatch. For example:\n export default connectAdvanced((dispatch, options) => (state, props) => ({\n thing: state.things[props.thingId],\n saveThing: fields => dispatch(actionCreators.saveThing(props.thingId, fields)),\n }))(YourComponent)\n Access to dispatch is provided to the factory so selectorFactories can bind actionCreators\n outside of their selector as an optimization. Options passed to connectAdvanced are passed to\n the selectorFactory, along with displayName and WrappedComponent, as the second argument.\n Note that selectorFactory is responsible for all caching/memoization of inbound and outbound\n props. Do not use connectAdvanced directly without memoizing results between calls to your\n selector, otherwise the Connect component will re-render on every state or props change.\n*/\nselectorFactory) {\n var _contextTypes, _childContextTypes;\n\n var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n _ref$getDisplayName = _ref.getDisplayName,\n getDisplayName = _ref$getDisplayName === undefined ? function (name) {\n return 'ConnectAdvanced(' + name + ')';\n } : _ref$getDisplayName,\n _ref$methodName = _ref.methodName,\n methodName = _ref$methodName === undefined ? 'connectAdvanced' : _ref$methodName,\n _ref$renderCountProp = _ref.renderCountProp,\n renderCountProp = _ref$renderCountProp === undefined ? undefined : _ref$renderCountProp,\n _ref$shouldHandleStat = _ref.shouldHandleStateChanges,\n shouldHandleStateChanges = _ref$shouldHandleStat === undefined ? true : _ref$shouldHandleStat,\n _ref$storeKey = _ref.storeKey,\n storeKey = _ref$storeKey === undefined ? 'store' : _ref$storeKey,\n _ref$withRef = _ref.withRef,\n withRef = _ref$withRef === undefined ? false : _ref$withRef,\n connectOptions = _objectWithoutProperties(_ref, ['getDisplayName', 'methodName', 'renderCountProp', 'shouldHandleStateChanges', 'storeKey', 'withRef']);\n\n var subscriptionKey = storeKey + 'Subscription';\n var version = hotReloadingVersion++;\n\n var contextTypes = (_contextTypes = {}, _contextTypes[storeKey] = __WEBPACK_IMPORTED_MODULE_4__utils_PropTypes__[\"a\" /* storeShape */], _contextTypes[subscriptionKey] = __WEBPACK_IMPORTED_MODULE_4__utils_PropTypes__[\"b\" /* subscriptionShape */], _contextTypes);\n var childContextTypes = (_childContextTypes = {}, _childContextTypes[subscriptionKey] = __WEBPACK_IMPORTED_MODULE_4__utils_PropTypes__[\"b\" /* subscriptionShape */], _childContextTypes);\n\n return function wrapWithConnect(WrappedComponent) {\n __WEBPACK_IMPORTED_MODULE_1_invariant___default()(typeof WrappedComponent == 'function', 'You must pass a component to the function returned by ' + ('connect. Instead received ' + JSON.stringify(WrappedComponent)));\n\n var wrappedComponentName = WrappedComponent.displayName || WrappedComponent.name || 'Component';\n\n var displayName = getDisplayName(wrappedComponentName);\n\n var selectorFactoryOptions = _extends({}, connectOptions, {\n getDisplayName: getDisplayName,\n methodName: methodName,\n renderCountProp: renderCountProp,\n shouldHandleStateChanges: shouldHandleStateChanges,\n storeKey: storeKey,\n withRef: withRef,\n displayName: displayName,\n wrappedComponentName: wrappedComponentName,\n WrappedComponent: WrappedComponent\n });\n\n var Connect = function (_Component) {\n _inherits(Connect, _Component);\n\n function Connect(props, context) {\n _classCallCheck(this, Connect);\n\n var _this = _possibleConstructorReturn(this, _Component.call(this, props, context));\n\n _this.version = version;\n _this.state = {};\n _this.renderCount = 0;\n _this.store = props[storeKey] || context[storeKey];\n _this.propsMode = Boolean(props[storeKey]);\n _this.setWrappedInstance = _this.setWrappedInstance.bind(_this);\n\n __WEBPACK_IMPORTED_MODULE_1_invariant___default()(_this.store, 'Could not find \"' + storeKey + '\" in either the context or props of ' + ('\"' + displayName + '\". Either wrap the root component in a <Provider>, ') + ('or explicitly pass \"' + storeKey + '\" as a prop to \"' + displayName + '\".'));\n\n _this.initSelector();\n _this.initSubscription();\n return _this;\n }\n\n Connect.prototype.getChildContext = function getChildContext() {\n var _ref2;\n\n // If this component received store from props, its subscription should be transparent\n // to any descendants receiving store+subscription from context; it passes along\n // subscription passed to it. Otherwise, it shadows the parent subscription, which allows\n // Connect to control ordering of notifications to flow top-down.\n var subscription = this.propsMode ? null : this.subscription;\n return _ref2 = {}, _ref2[subscriptionKey] = subscription || this.context[subscriptionKey], _ref2;\n };\n\n Connect.prototype.componentDidMount = function componentDidMount() {\n if (!shouldHandleStateChanges) return;\n\n // componentWillMount fires during server side rendering, but componentDidMount and\n // componentWillUnmount do not. Because of this, trySubscribe happens during ...didMount.\n // Otherwise, unsubscription would never take place during SSR, causing a memory leak.\n // To handle the case where a child component may have triggered a state change by\n // dispatching an action in its componentWillMount, we have to re-run the select and maybe\n // re-render.\n this.subscription.trySubscribe();\n this.selector.run(this.props);\n if (this.selector.shouldComponentUpdate) this.forceUpdate();\n };\n\n Connect.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {\n this.selector.run(nextProps);\n };\n\n Connect.prototype.shouldComponentUpdate = function shouldComponentUpdate() {\n return this.selector.shouldComponentUpdate;\n };\n\n Connect.prototype.componentWillUnmount = function componentWillUnmount() {\n if (this.subscription) this.subscription.tryUnsubscribe();\n this.subscription = null;\n this.notifyNestedSubs = noop;\n this.store = null;\n this.selector.run = noop;\n this.selector.shouldComponentUpdate = false;\n };\n\n Connect.prototype.getWrappedInstance = function getWrappedInstance() {\n __WEBPACK_IMPORTED_MODULE_1_invariant___default()(withRef, 'To access the wrapped instance, you need to specify ' + ('{ withRef: true } in the options argument of the ' + methodName + '() call.'));\n return this.wrappedInstance;\n };\n\n Connect.prototype.setWrappedInstance = function setWrappedInstance(ref) {\n this.wrappedInstance = ref;\n };\n\n Connect.prototype.initSelector = function initSelector() {\n var sourceSelector = selectorFactory(this.store.dispatch, selectorFactoryOptions);\n this.selector = makeSelectorStateful(sourceSelector, this.store);\n this.selector.run(this.props);\n };\n\n Connect.prototype.initSubscription = function initSubscription() {\n if (!shouldHandleStateChanges) return;\n\n // parentSub's source should match where store came from: props vs. context. A component\n // connected to the store via props shouldn't use subscription from context, or vice versa.\n var parentSub = (this.propsMode ? this.props : this.context)[subscriptionKey];\n this.subscription = new __WEBPACK_IMPORTED_MODULE_3__utils_Subscription__[\"a\" /* default */](this.store, parentSub, this.onStateChange.bind(this));\n\n // `notifyNestedSubs` is duplicated to handle the case where the component is unmounted in\n // the middle of the notification loop, where `this.subscription` will then be null. An\n // extra null check every change can be avoided by copying the method onto `this` and then\n // replacing it with a no-op on unmount. This can probably be avoided if Subscription's\n // listeners logic is changed to not call listeners that have been unsubscribed in the\n // middle of the notification loop.\n this.notifyNestedSubs = this.subscription.notifyNestedSubs.bind(this.subscription);\n };\n\n Connect.prototype.onStateChange = function onStateChange() {\n this.selector.run(this.props);\n\n if (!this.selector.shouldComponentUpdate) {\n this.notifyNestedSubs();\n } else {\n this.componentDidUpdate = this.notifyNestedSubsOnComponentDidUpdate;\n this.setState(dummyState);\n }\n };\n\n Connect.prototype.notifyNestedSubsOnComponentDidUpdate = function notifyNestedSubsOnComponentDidUpdate() {\n // `componentDidUpdate` is conditionally implemented when `onStateChange` determines it\n // needs to notify nested subs. Once called, it unimplements itself until further state\n // changes occur. Doing it this way vs having a permanent `componentDidMount` that does\n // a boolean check every time avoids an extra method call most of the time, resulting\n // in some perf boost.\n this.componentDidUpdate = undefined;\n this.notifyNestedSubs();\n };\n\n Connect.prototype.isSubscribed = function isSubscribed() {\n return Boolean(this.subscription) && this.subscription.isSubscribed();\n };\n\n Connect.prototype.addExtraProps = function addExtraProps(props) {\n if (!withRef && !renderCountProp && !(this.propsMode && this.subscription)) return props;\n // make a shallow copy so that fields added don't leak to the original selector.\n // this is especially important for 'ref' since that's a reference back to the component\n // instance. a singleton memoized selector would then be holding a reference to the\n // instance, preventing the instance from being garbage collected, and that would be bad\n var withExtras = _extends({}, props);\n if (withRef) withExtras.ref = this.setWrappedInstance;\n if (renderCountProp) withExtras[renderCountProp] = this.renderCount++;\n if (this.propsMode && this.subscription) withExtras[subscriptionKey] = this.subscription;\n return withExtras;\n };\n\n Connect.prototype.render = function render() {\n var selector = this.selector;\n selector.shouldComponentUpdate = false;\n\n if (selector.error) {\n throw selector.error;\n } else {\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2_react__[\"createElement\"])(WrappedComponent, this.addExtraProps(selector.props));\n }\n };\n\n return Connect;\n }(__WEBPACK_IMPORTED_MODULE_2_react__[\"Component\"]);\n\n Connect.WrappedComponent = WrappedComponent;\n Connect.displayName = displayName;\n Connect.childContextTypes = childContextTypes;\n Connect.contextTypes = contextTypes;\n Connect.propTypes = contextTypes;\n\n if (true) {\n Connect.prototype.componentWillUpdate = function componentWillUpdate() {\n // We are hot reloading!\n if (this.version !== version) {\n this.version = version;\n this.initSelector();\n\n if (this.subscription) this.subscription.tryUnsubscribe();\n this.initSubscription();\n if (shouldHandleStateChanges) this.subscription.trySubscribe();\n }\n };\n }\n\n return __WEBPACK_IMPORTED_MODULE_0_hoist_non_react_statics___default()(Connect, WrappedComponent);\n };\n}\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-redux/es/components/connectAdvanced.js\n// module id = 571\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-redux/es/components/connectAdvanced.js?", + ); + + /***/ + }, + /* 572 */ + /* exports provided: wrapMapToPropsConstant, getDependsOnOwnProps, wrapMapToPropsFunc */ + /* exports used: wrapMapToPropsFunc, wrapMapToPropsConstant */ + /*!****************************************************!*\ + !*** ./~/react-redux/es/connect/wrapMapToProps.js ***! + \****************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils_verifyPlainObject__ = __webpack_require__(/*! ../utils/verifyPlainObject */ 574);\n/* harmony export (immutable) */ __webpack_exports__["b"] = wrapMapToPropsConstant;\n/* unused harmony export getDependsOnOwnProps */\n/* harmony export (immutable) */ __webpack_exports__["a"] = wrapMapToPropsFunc;\n\n\nfunction wrapMapToPropsConstant(getConstant) {\n return function initConstantSelector(dispatch, options) {\n var constant = getConstant(dispatch, options);\n\n function constantSelector() {\n return constant;\n }\n constantSelector.dependsOnOwnProps = false;\n return constantSelector;\n };\n}\n\n// dependsOnOwnProps is used by createMapToPropsProxy to determine whether to pass props as args\n// to the mapToProps function being wrapped. It is also used by makePurePropsSelector to determine\n// whether mapToProps needs to be invoked when props have changed.\n// \n// A length of one signals that mapToProps does not depend on props from the parent component.\n// A length of zero is assumed to mean mapToProps is getting args via arguments or ...args and\n// therefore not reporting its length accurately..\nfunction getDependsOnOwnProps(mapToProps) {\n return mapToProps.dependsOnOwnProps !== null && mapToProps.dependsOnOwnProps !== undefined ? Boolean(mapToProps.dependsOnOwnProps) : mapToProps.length !== 1;\n}\n\n// Used by whenMapStateToPropsIsFunction and whenMapDispatchToPropsIsFunction,\n// this function wraps mapToProps in a proxy function which does several things:\n// \n// * Detects whether the mapToProps function being called depends on props, which\n// is used by selectorFactory to decide if it should reinvoke on props changes.\n// \n// * On first call, handles mapToProps if returns another function, and treats that\n// new function as the true mapToProps for subsequent calls.\n// \n// * On first call, verifies the first result is a plain object, in order to warn\n// the developer that their mapToProps function is not returning a valid result.\n// \nfunction wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === \'function\') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__utils_verifyPlainObject__["a" /* default */])(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-redux/es/connect/wrapMapToProps.js\n// module id = 572\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-redux/es/connect/wrapMapToProps.js?', + ); + + /***/ + }, + /* 573 */ + /* exports provided: subscriptionShape, storeShape */ + /* exports used: storeShape, subscriptionShape */ + /*!*********************************************!*\ + !*** ./~/react-redux/es/utils/PropTypes.js ***! + \*********************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return subscriptionShape; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return storeShape; });\n\n\nvar subscriptionShape = __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.shape({\n trySubscribe: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired,\n tryUnsubscribe: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired,\n notifyNestedSubs: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired,\n isSubscribed: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired\n});\n\nvar storeShape = __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.shape({\n subscribe: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired,\n dispatch: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired,\n getState: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired\n});\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-redux/es/utils/PropTypes.js\n// module id = 573\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-redux/es/utils/PropTypes.js?', + ); + + /***/ + }, + /* 574 */ + /* exports provided: default */ + /* exports used: default */ + /*!*****************************************************!*\ + !*** ./~/react-redux/es/utils/verifyPlainObject.js ***! + \*****************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_isPlainObject__ = __webpack_require__(/*! lodash-es/isPlainObject */ 220);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__warning__ = __webpack_require__(/*! ./warning */ 265);\n/* harmony export (immutable) */ __webpack_exports__["a"] = verifyPlainObject;\n\n\n\nfunction verifyPlainObject(value, displayName, methodName) {\n if (!__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0_lodash_es_isPlainObject__["a" /* default */])(value)) {\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__warning__["a" /* default */])(methodName + \'() in \' + displayName + \' must return a plain object. Instead received \' + value + \'.\');\n }\n}\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-redux/es/utils/verifyPlainObject.js\n// module id = 574\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-redux/es/utils/verifyPlainObject.js?', + ); + + /***/ + }, + /* 575 */ + /* exports provided: default */ + /* exports used: default */ + /*!***********************************!*\ + !*** ./~/react-router/es/Link.js ***! + \***********************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(/*! invariant */ 25);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_invariant__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__PropTypes__ = __webpack_require__(/*! ./PropTypes */ 268);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__ContextUtils__ = __webpack_require__(/*! ./ContextUtils */ 267);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\n\n\n\n\n\nvar _React$PropTypes = __WEBPACK_IMPORTED_MODULE_0_react___default.a.PropTypes,\n bool = _React$PropTypes.bool,\n object = _React$PropTypes.object,\n string = _React$PropTypes.string,\n func = _React$PropTypes.func,\n oneOfType = _React$PropTypes.oneOfType;\n\n\nfunction isLeftClickEvent(event) {\n return event.button === 0;\n}\n\nfunction isModifiedEvent(event) {\n return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);\n}\n\n// TODO: De-duplicate against hasAnyProperties in createTransitionManager.\nfunction isEmptyObject(object) {\n for (var p in object) {\n if (Object.prototype.hasOwnProperty.call(object, p)) return false;\n }return true;\n}\n\nfunction resolveToLocation(to, router) {\n return typeof to === 'function' ? to(router.location) : to;\n}\n\n/**\n * A <Link> is used to create an <a> element that links to a route.\n * When that route is active, the link gets the value of its\n * activeClassName prop.\n *\n * For example, assuming you have the following route:\n *\n * <Route path=\"/posts/:postID\" component={Post} />\n *\n * You could use the following component to link to that route:\n *\n * <Link to={`/posts/${post.id}`} />\n *\n * Links may pass along location state and/or query string parameters\n * in the state/query props, respectively.\n *\n * <Link ... query={{ show: true }} state={{ the: 'state' }} />\n */\nvar Link = __WEBPACK_IMPORTED_MODULE_0_react___default.a.createClass({\n displayName: 'Link',\n\n\n mixins: [__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__ContextUtils__[\"b\" /* ContextSubscriber */])('router')],\n\n contextTypes: {\n router: __WEBPACK_IMPORTED_MODULE_2__PropTypes__[\"a\" /* routerShape */]\n },\n\n propTypes: {\n to: oneOfType([string, object, func]),\n query: object,\n hash: string,\n state: object,\n activeStyle: object,\n activeClassName: string,\n onlyActiveOnIndex: bool.isRequired,\n onClick: func,\n target: string\n },\n\n getDefaultProps: function getDefaultProps() {\n return {\n onlyActiveOnIndex: false,\n style: {}\n };\n },\n handleClick: function handleClick(event) {\n if (this.props.onClick) this.props.onClick(event);\n\n if (event.defaultPrevented) return;\n\n var router = this.context.router;\n\n !router ? true ? __WEBPACK_IMPORTED_MODULE_1_invariant___default()(false, '<Link>s rendered outside of a router context cannot navigate.') : invariant(false) : void 0;\n\n if (isModifiedEvent(event) || !isLeftClickEvent(event)) return;\n\n // If target prop is set (e.g. to \"_blank\"), let browser handle link.\n /* istanbul ignore if: untestable with Karma */\n if (this.props.target) return;\n\n event.preventDefault();\n\n router.push(resolveToLocation(this.props.to, router));\n },\n render: function render() {\n var _props = this.props,\n to = _props.to,\n activeClassName = _props.activeClassName,\n activeStyle = _props.activeStyle,\n onlyActiveOnIndex = _props.onlyActiveOnIndex,\n props = _objectWithoutProperties(_props, ['to', 'activeClassName', 'activeStyle', 'onlyActiveOnIndex']);\n\n // Ignore if rendered outside the context of router to simplify unit testing.\n\n\n var router = this.context.router;\n\n\n if (router) {\n // If user does not specify a `to` prop, return an empty anchor tag.\n if (!to) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('a', props);\n }\n\n var toLocation = resolveToLocation(to, router);\n props.href = router.createHref(toLocation);\n\n if (activeClassName || activeStyle != null && !isEmptyObject(activeStyle)) {\n if (router.isActive(toLocation, onlyActiveOnIndex)) {\n if (activeClassName) {\n if (props.className) {\n props.className += ' ' + activeClassName;\n } else {\n props.className = activeClassName;\n }\n }\n\n if (activeStyle) props.style = _extends({}, props.style, activeStyle);\n }\n }\n }\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('a', _extends({}, props, { onClick: this.handleClick }));\n }\n});\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Link);\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-router/es/Link.js\n// module id = 575\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-router/es/Link.js?", + ); + + /***/ + }, + /* 576 */ + /* exports provided: isPromise */ + /* exports used: isPromise */ + /*!*******************************************!*\ + !*** ./~/react-router/es/PromiseUtils.js ***! + \*******************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony export (immutable) */ __webpack_exports__["a"] = isPromise;\nfunction isPromise(obj) {\n return obj && typeof obj.then === \'function\';\n}\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-router/es/PromiseUtils.js\n// module id = 576\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-router/es/PromiseUtils.js?', + ); + + /***/ + }, + /* 577 */ + /* exports provided: default */ + /* exports used: default */ + /*!***************************************!*\ + !*** ./~/react-router/es/Redirect.js ***! + \***************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(/*! invariant */ 25);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_invariant__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__RouteUtils__ = __webpack_require__(/*! ./RouteUtils */ 68);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__PatternUtils__ = __webpack_require__(/*! ./PatternUtils */ 101);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__InternalPropTypes__ = __webpack_require__(/*! ./InternalPropTypes */ 128);\n\n\n\n\n\n\nvar _React$PropTypes = __WEBPACK_IMPORTED_MODULE_0_react___default.a.PropTypes,\n string = _React$PropTypes.string,\n object = _React$PropTypes.object;\n\n/**\n * A <Redirect> is used to declare another URL path a client should\n * be sent to when they request a given URL.\n *\n * Redirects are placed alongside routes in the route configuration\n * and are traversed in the same manner.\n */\n/* eslint-disable react/require-render-return */\n\nvar Redirect = __WEBPACK_IMPORTED_MODULE_0_react___default.a.createClass({\n displayName: 'Redirect',\n\n\n statics: {\n createRouteFromReactElement: function createRouteFromReactElement(element) {\n var route = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__RouteUtils__[\"c\" /* createRouteFromReactElement */])(element);\n\n if (route.from) route.path = route.from;\n\n route.onEnter = function (nextState, replace) {\n var location = nextState.location,\n params = nextState.params;\n\n\n var pathname = void 0;\n if (route.to.charAt(0) === '/') {\n pathname = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__PatternUtils__[\"c\" /* formatPattern */])(route.to, params);\n } else if (!route.to) {\n pathname = location.pathname;\n } else {\n var routeIndex = nextState.routes.indexOf(route);\n var parentPattern = Redirect.getRoutePattern(nextState.routes, routeIndex - 1);\n var pattern = parentPattern.replace(/\\/*$/, '/') + route.to;\n pathname = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__PatternUtils__[\"c\" /* formatPattern */])(pattern, params);\n }\n\n replace({\n pathname: pathname,\n query: route.query || location.query,\n state: route.state || location.state\n });\n };\n\n return route;\n },\n getRoutePattern: function getRoutePattern(routes, routeIndex) {\n var parentPattern = '';\n\n for (var i = routeIndex; i >= 0; i--) {\n var route = routes[i];\n var pattern = route.path || '';\n\n parentPattern = pattern.replace(/\\/*$/, '/') + parentPattern;\n\n if (pattern.indexOf('/') === 0) break;\n }\n\n return '/' + parentPattern;\n }\n },\n\n propTypes: {\n path: string,\n from: string, // Alias for path\n to: string.isRequired,\n query: object,\n state: object,\n onEnter: __WEBPACK_IMPORTED_MODULE_4__InternalPropTypes__[\"c\" /* falsy */],\n children: __WEBPACK_IMPORTED_MODULE_4__InternalPropTypes__[\"c\" /* falsy */]\n },\n\n /* istanbul ignore next: sanity check */\n render: function render() {\n true ? true ? __WEBPACK_IMPORTED_MODULE_1_invariant___default()(false, '<Redirect> elements are for router configuration only and should not be rendered') : invariant(false) : void 0;\n }\n});\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Redirect);\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-router/es/Redirect.js\n// module id = 577\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-router/es/Redirect.js?", + ); + + /***/ + }, + /* 578 */ + /* exports provided: createRouterObject, assignRouterState */ + /* exports used: createRouterObject, assignRouterState */ + /*!******************************************!*\ + !*** ./~/react-router/es/RouterUtils.js ***! + \******************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony export (immutable) */ __webpack_exports__["a"] = createRouterObject;\n/* harmony export (immutable) */ __webpack_exports__["b"] = assignRouterState;\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction createRouterObject(history, transitionManager, state) {\n var router = _extends({}, history, {\n setRouteLeaveHook: transitionManager.listenBeforeLeavingRoute,\n isActive: transitionManager.isActive\n });\n\n return assignRouterState(router, state);\n}\n\nfunction assignRouterState(router, _ref) {\n var location = _ref.location,\n params = _ref.params,\n routes = _ref.routes;\n\n router.location = location;\n router.params = params;\n router.routes = routes;\n\n return router;\n}\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-router/es/RouterUtils.js\n// module id = 578\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-router/es/RouterUtils.js?', + ); + + /***/ + }, + /* 579 */ + /* exports provided: default */ + /* exports used: default */ + /*!**************************************************!*\ + !*** ./~/react-router/es/createMemoryHistory.js ***! + \**************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries__ = __webpack_require__(/*! history/lib/useQueries */ 352);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename__ = __webpack_require__(/*! history/lib/useBasename */ 351);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_history_lib_createMemoryHistory__ = __webpack_require__(/*! history/lib/createMemoryHistory */ 1150);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_history_lib_createMemoryHistory___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_history_lib_createMemoryHistory__);\n/* harmony export (immutable) */ __webpack_exports__["a"] = createMemoryHistory;\n\n\n\n\nfunction createMemoryHistory(options) {\n // signatures and type checking differ between `useQueries` and\n // `createMemoryHistory`, have to create `memoryHistory` first because\n // `useQueries` doesn\'t understand the signature\n var memoryHistory = __WEBPACK_IMPORTED_MODULE_2_history_lib_createMemoryHistory___default()(options);\n var createHistory = function createHistory() {\n return memoryHistory;\n };\n var history = __WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries___default()(__WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename___default()(createHistory))(options);\n return history;\n}\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-router/es/createMemoryHistory.js\n// module id = 579\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-router/es/createMemoryHistory.js?', + ); + + /***/ + }, + /* 580 */ + /* exports provided: default */ + /* exports used: default */ + /*!**************************************************!*\ + !*** ./~/react-router/es/createRouterHistory.js ***! + \**************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__useRouterHistory__ = __webpack_require__(/*! ./useRouterHistory */ 582);\n\n\nvar canUseDOM = !!(typeof window !== \'undefined\' && window.document && window.document.createElement);\n\n/* harmony default export */ __webpack_exports__["a"] = (function (createHistory) {\n var history = void 0;\n if (canUseDOM) history = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__useRouterHistory__["a" /* default */])(createHistory)();\n return history;\n});\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-router/es/createRouterHistory.js\n// module id = 580\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-router/es/createRouterHistory.js?', + ); + + /***/ + }, + /* 581 */ + /* exports provided: default */ + /* exports used: default */ + /*!******************************************************!*\ + !*** ./~/react-router/es/createTransitionManager.js ***! + \******************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__routerWarning__ = __webpack_require__(/*! ./routerWarning */ 102);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__computeChangedRoutes__ = __webpack_require__(/*! ./computeChangedRoutes */ 1456);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__TransitionUtils__ = __webpack_require__(/*! ./TransitionUtils */ 1453);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isActive__ = __webpack_require__(/*! ./isActive */ 1460);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__getComponents__ = __webpack_require__(/*! ./getComponents */ 1457);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__matchRoutes__ = __webpack_require__(/*! ./matchRoutes */ 1462);\n/* harmony export (immutable) */ __webpack_exports__["a"] = createTransitionManager;\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\n\n\n\n\n\n\n\nfunction hasAnyProperties(object) {\n for (var p in object) {\n if (Object.prototype.hasOwnProperty.call(object, p)) return true;\n }return false;\n}\n\nfunction createTransitionManager(history, routes) {\n var state = {};\n\n // Signature should be (location, indexOnly), but needs to support (path,\n // query, indexOnly)\n function isActive(location, indexOnly) {\n location = history.createLocation(location);\n\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__isActive__["a" /* default */])(location, indexOnly, state.location, state.routes, state.params);\n }\n\n var partialNextState = void 0;\n\n function match(location, callback) {\n if (partialNextState && partialNextState.location === location) {\n // Continue from where we left off.\n finishMatch(partialNextState, callback);\n } else {\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__matchRoutes__["a" /* default */])(routes, location, function (error, nextState) {\n if (error) {\n callback(error);\n } else if (nextState) {\n finishMatch(_extends({}, nextState, { location: location }), callback);\n } else {\n callback();\n }\n });\n }\n }\n\n function finishMatch(nextState, callback) {\n var _computeChangedRoutes = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__computeChangedRoutes__["a" /* default */])(state, nextState),\n leaveRoutes = _computeChangedRoutes.leaveRoutes,\n changeRoutes = _computeChangedRoutes.changeRoutes,\n enterRoutes = _computeChangedRoutes.enterRoutes;\n\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__TransitionUtils__["a" /* runLeaveHooks */])(leaveRoutes, state);\n\n // Tear down confirmation hooks for left routes\n leaveRoutes.filter(function (route) {\n return enterRoutes.indexOf(route) === -1;\n }).forEach(removeListenBeforeHooksForRoute);\n\n // change and enter hooks are run in series\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__TransitionUtils__["b" /* runChangeHooks */])(changeRoutes, state, nextState, function (error, redirectInfo) {\n if (error || redirectInfo) return handleErrorOrRedirect(error, redirectInfo);\n\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__TransitionUtils__["c" /* runEnterHooks */])(enterRoutes, nextState, finishEnterHooks);\n });\n\n function finishEnterHooks(error, redirectInfo) {\n if (error || redirectInfo) return handleErrorOrRedirect(error, redirectInfo);\n\n // TODO: Fetch components after state is updated.\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__getComponents__["a" /* default */])(nextState, function (error, components) {\n if (error) {\n callback(error);\n } else {\n // TODO: Make match a pure function and have some other API\n // for "match and update state".\n callback(null, null, state = _extends({}, nextState, { components: components }));\n }\n });\n }\n\n function handleErrorOrRedirect(error, redirectInfo) {\n if (error) callback(error);else callback(null, redirectInfo);\n }\n }\n\n var RouteGuid = 1;\n\n function getRouteID(route) {\n var create = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n return route.__id__ || create && (route.__id__ = RouteGuid++);\n }\n\n var RouteHooks = Object.create(null);\n\n function getRouteHooksForRoutes(routes) {\n return routes.map(function (route) {\n return RouteHooks[getRouteID(route)];\n }).filter(function (hook) {\n return hook;\n });\n }\n\n function transitionHook(location, callback) {\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__matchRoutes__["a" /* default */])(routes, location, function (error, nextState) {\n if (nextState == null) {\n // TODO: We didn\'t actually match anything, but hang\n // onto error/nextState so we don\'t have to matchRoutes\n // again in the listen callback.\n callback();\n return;\n }\n\n // Cache some state here so we don\'t have to\n // matchRoutes() again in the listen callback.\n partialNextState = _extends({}, nextState, { location: location });\n\n var hooks = getRouteHooksForRoutes(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__computeChangedRoutes__["a" /* default */])(state, partialNextState).leaveRoutes);\n\n var result = void 0;\n for (var i = 0, len = hooks.length; result == null && i < len; ++i) {\n // Passing the location arg here indicates to\n // the user that this is a transition hook.\n result = hooks[i](location);\n }\n\n callback(result);\n });\n }\n\n /* istanbul ignore next: untestable with Karma */\n function beforeUnloadHook() {\n // Synchronously check to see if any route hooks want\n // to prevent the current window/tab from closing.\n if (state.routes) {\n var hooks = getRouteHooksForRoutes(state.routes);\n\n var message = void 0;\n for (var i = 0, len = hooks.length; typeof message !== \'string\' && i < len; ++i) {\n // Passing no args indicates to the user that this is a\n // beforeunload hook. We don\'t know the next location.\n message = hooks[i]();\n }\n\n return message;\n }\n }\n\n var unlistenBefore = void 0,\n unlistenBeforeUnload = void 0;\n\n function removeListenBeforeHooksForRoute(route) {\n var routeID = getRouteID(route);\n if (!routeID) {\n return;\n }\n\n delete RouteHooks[routeID];\n\n if (!hasAnyProperties(RouteHooks)) {\n // teardown transition & beforeunload hooks\n if (unlistenBefore) {\n unlistenBefore();\n unlistenBefore = null;\n }\n\n if (unlistenBeforeUnload) {\n unlistenBeforeUnload();\n unlistenBeforeUnload = null;\n }\n }\n }\n\n /**\n * Registers the given hook function to run before leaving the given route.\n *\n * During a normal transition, the hook function receives the next location\n * as its only argument and can return either a prompt message (string) to show the user,\n * to make sure they want to leave the page; or `false`, to prevent the transition.\n * Any other return value will have no effect.\n *\n * During the beforeunload event (in browsers) the hook receives no arguments.\n * In this case it must return a prompt message to prevent the transition.\n *\n * Returns a function that may be used to unbind the listener.\n */\n function listenBeforeLeavingRoute(route, hook) {\n var thereWereNoRouteHooks = !hasAnyProperties(RouteHooks);\n var routeID = getRouteID(route, true);\n\n RouteHooks[routeID] = hook;\n\n if (thereWereNoRouteHooks) {\n // setup transition & beforeunload hooks\n unlistenBefore = history.listenBefore(transitionHook);\n\n if (history.listenBeforeUnload) unlistenBeforeUnload = history.listenBeforeUnload(beforeUnloadHook);\n }\n\n return function () {\n removeListenBeforeHooksForRoute(route);\n };\n }\n\n /**\n * This is the API for stateful environments. As the location\n * changes, we update state and call the listener. We can also\n * gracefully handle errors and redirects.\n */\n function listen(listener) {\n function historyListener(location) {\n if (state.location === location) {\n listener(null, state);\n } else {\n match(location, function (error, redirectLocation, nextState) {\n if (error) {\n listener(error);\n } else if (redirectLocation) {\n history.replace(redirectLocation);\n } else if (nextState) {\n listener(null, nextState);\n } else {\n true ? __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__routerWarning__["a" /* default */])(false, \'Location "%s" did not match any routes\', location.pathname + location.search + location.hash) : void 0;\n }\n });\n }\n }\n\n // TODO: Only use a single history listener. Otherwise we\'ll end up with\n // multiple concurrent calls to match.\n\n // Set up the history listener first in case the initial match redirects.\n var unsubscribe = history.listen(historyListener);\n\n if (state.location) {\n // Picking up on a matchContext.\n listener(null, state);\n } else {\n historyListener(history.getCurrentLocation());\n }\n\n return unsubscribe;\n }\n\n return {\n isActive: isActive,\n match: match,\n listenBeforeLeavingRoute: listenBeforeLeavingRoute,\n listen: listen\n };\n}\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-router/es/createTransitionManager.js\n// module id = 581\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-router/es/createTransitionManager.js?', + ); + + /***/ + }, + /* 582 */ + /* exports provided: default */ + /* exports used: default */ + /*!***********************************************!*\ + !*** ./~/react-router/es/useRouterHistory.js ***! + \***********************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries__ = __webpack_require__(/*! history/lib/useQueries */ 352);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename__ = __webpack_require__(/*! history/lib/useBasename */ 351);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename__);\n/* harmony export (immutable) */ __webpack_exports__["a"] = useRouterHistory;\n\n\n\nfunction useRouterHistory(createHistory) {\n return function (options) {\n var history = __WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries___default()(__WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename___default()(createHistory))(options);\n return history;\n };\n}\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-router/es/useRouterHistory.js\n// module id = 582\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-router/es/useRouterHistory.js?', + ); + + /***/ + }, + /* 583 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************************!*\ + !*** ./~/react/lib/ReactElementSymbol.js ***! + \*******************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2014-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * \n */\n\n\n\n// The Symbol used to tag the ReactElement type. If there is no native Symbol\n// nor polyfill, then a plain number is used for performance.\n\nvar REACT_ELEMENT_TYPE = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.element') || 0xeac7;\n\nmodule.exports = REACT_ELEMENT_TYPE;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react/lib/ReactElementSymbol.js\n// module id = 583\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react/lib/ReactElementSymbol.js?", + ); + + /***/ + }, + /* 584 */ + /* unknown exports provided */ + /* all exports used */ + /*!**********************************************!*\ + !*** ./~/react/lib/ReactElementValidator.js ***! + \**********************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2014-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n/**\n * ReactElementValidator provides a wrapper around a element factory\n * which validates the props passed to the element. This is intended to be\n * used only in DEV and could be replaced by a static type checker for languages\n * that support it.\n */\n\n\n\nvar ReactCurrentOwner = __webpack_require__(/*! ./ReactCurrentOwner */ 55);\nvar ReactComponentTreeHook = __webpack_require__(/*! ./ReactComponentTreeHook */ 37);\nvar ReactElement = __webpack_require__(/*! ./ReactElement */ 84);\n\nvar checkReactTypeSpec = __webpack_require__(/*! ./checkReactTypeSpec */ 1478);\n\nvar canDefineProperty = __webpack_require__(/*! ./canDefineProperty */ 273);\nvar getIteratorFn = __webpack_require__(/*! ./getIteratorFn */ 274);\nvar warning = __webpack_require__(/*! fbjs/lib/warning */ 13);\n\nfunction getDeclarationErrorAddendum() {\n if (ReactCurrentOwner.current) {\n var name = ReactCurrentOwner.current.getName();\n if (name) {\n return ' Check the render method of `' + name + '`.';\n }\n }\n return '';\n}\n\n/**\n * Warn if there's no key explicitly set on dynamic arrays of children or\n * object keys are not valid. This allows us to keep track of children between\n * updates.\n */\nvar ownerHasKeyUseWarning = {};\n\nfunction getCurrentComponentErrorInfo(parentType) {\n var info = getDeclarationErrorAddendum();\n\n if (!info) {\n var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;\n if (parentName) {\n info = ' Check the top-level render call using <' + parentName + '>.';\n }\n }\n return info;\n}\n\n/**\n * Warn if the element doesn't have an explicit key assigned to it.\n * This element is in an array. The array could grow and shrink or be\n * reordered. All children that haven't already been validated are required to\n * have a \"key\" property assigned to it. Error statuses are cached so a warning\n * will only be shown once.\n *\n * @internal\n * @param {ReactElement} element Element that requires a key.\n * @param {*} parentType element's parent's type.\n */\nfunction validateExplicitKey(element, parentType) {\n if (!element._store || element._store.validated || element.key != null) {\n return;\n }\n element._store.validated = true;\n\n var memoizer = ownerHasKeyUseWarning.uniqueKey || (ownerHasKeyUseWarning.uniqueKey = {});\n\n var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);\n if (memoizer[currentComponentErrorInfo]) {\n return;\n }\n memoizer[currentComponentErrorInfo] = true;\n\n // Usually the current owner is the offender, but if it accepts children as a\n // property, it may be the creator of the child that's responsible for\n // assigning it a key.\n var childOwner = '';\n if (element && element._owner && element._owner !== ReactCurrentOwner.current) {\n // Give the component that originally created this child.\n childOwner = ' It was passed a child from ' + element._owner.getName() + '.';\n }\n\n true ? warning(false, 'Each child in an array or iterator should have a unique \"key\" prop.' + '%s%s See https://fb.me/react-warning-keys for more information.%s', currentComponentErrorInfo, childOwner, ReactComponentTreeHook.getCurrentStackAddendum(element)) : void 0;\n}\n\n/**\n * Ensure that every element either is passed in a static location, in an\n * array with an explicit keys property defined, or in an object literal\n * with valid key property.\n *\n * @internal\n * @param {ReactNode} node Statically passed child of any type.\n * @param {*} parentType node's parent's type.\n */\nfunction validateChildKeys(node, parentType) {\n if (typeof node !== 'object') {\n return;\n }\n if (Array.isArray(node)) {\n for (var i = 0; i < node.length; i++) {\n var child = node[i];\n if (ReactElement.isValidElement(child)) {\n validateExplicitKey(child, parentType);\n }\n }\n } else if (ReactElement.isValidElement(node)) {\n // This element was passed in a valid location.\n if (node._store) {\n node._store.validated = true;\n }\n } else if (node) {\n var iteratorFn = getIteratorFn(node);\n // Entry iterators provide implicit keys.\n if (iteratorFn) {\n if (iteratorFn !== node.entries) {\n var iterator = iteratorFn.call(node);\n var step;\n while (!(step = iterator.next()).done) {\n if (ReactElement.isValidElement(step.value)) {\n validateExplicitKey(step.value, parentType);\n }\n }\n }\n }\n }\n}\n\n/**\n * Given an element, validate that its props follow the propTypes definition,\n * provided by the type.\n *\n * @param {ReactElement} element\n */\nfunction validatePropTypes(element) {\n var componentClass = element.type;\n if (typeof componentClass !== 'function') {\n return;\n }\n var name = componentClass.displayName || componentClass.name;\n if (componentClass.propTypes) {\n checkReactTypeSpec(componentClass.propTypes, element.props, 'prop', name, element, null);\n }\n if (typeof componentClass.getDefaultProps === 'function') {\n true ? warning(componentClass.getDefaultProps.isReactClassApproved, 'getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.') : void 0;\n }\n}\n\nvar ReactElementValidator = {\n\n createElement: function (type, props, children) {\n var validType = typeof type === 'string' || typeof type === 'function';\n // We warn in this case but don't throw. We expect the element creation to\n // succeed and there will likely be errors in render.\n if (!validType) {\n if (typeof type !== 'function' && typeof type !== 'string') {\n var info = '';\n if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {\n info += ' You likely forgot to export your component from the file ' + 'it\\'s defined in.';\n }\n info += getDeclarationErrorAddendum();\n true ? warning(false, 'React.createElement: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', type == null ? type : typeof type, info) : void 0;\n }\n }\n\n var element = ReactElement.createElement.apply(this, arguments);\n\n // The result can be nullish if a mock or a custom function is used.\n // TODO: Drop this when these are no longer allowed as the type argument.\n if (element == null) {\n return element;\n }\n\n // Skip key warning if the type isn't valid since our key validation logic\n // doesn't expect a non-string/function type and can throw confusing errors.\n // We don't want exception behavior to differ between dev and prod.\n // (Rendering will throw with a helpful message and as soon as the type is\n // fixed, the key warnings will appear.)\n if (validType) {\n for (var i = 2; i < arguments.length; i++) {\n validateChildKeys(arguments[i], type);\n }\n }\n\n validatePropTypes(element);\n\n return element;\n },\n\n createFactory: function (type) {\n var validatedFactory = ReactElementValidator.createElement.bind(null, type);\n // Legacy hook TODO: Warn if this is accessed\n validatedFactory.type = type;\n\n if (true) {\n if (canDefineProperty) {\n Object.defineProperty(validatedFactory, 'type', {\n enumerable: false,\n get: function () {\n true ? warning(false, 'Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.') : void 0;\n Object.defineProperty(this, 'type', {\n value: type\n });\n return type;\n }\n });\n }\n }\n\n return validatedFactory;\n },\n\n cloneElement: function (element, props, children) {\n var newElement = ReactElement.cloneElement.apply(this, arguments);\n for (var i = 2; i < arguments.length; i++) {\n validateChildKeys(arguments[i], newElement.type);\n }\n validatePropTypes(newElement);\n return newElement;\n }\n\n};\n\nmodule.exports = ReactElementValidator;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react/lib/ReactElementValidator.js\n// module id = 584\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react/lib/ReactElementValidator.js?", + ); + + /***/ + }, + /* 585 */ + /* unknown exports provided */ + /* all exports used */ + /*!*********************************************!*\ + !*** ./~/react/lib/ReactPropTypesSecret.js ***! + \*********************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * \n */\n\n\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react/lib/ReactPropTypesSecret.js\n// module id = 585\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react/lib/ReactPropTypesSecret.js?", + ); + + /***/ + }, + /* 586 */ + /* exports provided: default */ + /* exports used: default */ + /*!*******************************!*\ + !*** ./~/redux/es/compose.js ***! + \*******************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony export (immutable) */ __webpack_exports__["a"] = compose;\n/**\n * Composes single-argument functions from right to left. The rightmost\n * function can take multiple arguments as it provides the signature for\n * the resulting composite function.\n *\n * @param {...Function} funcs The functions to compose.\n * @returns {Function} A function obtained by composing the argument functions\n * from right to left. For example, compose(f, g, h) is identical to doing\n * (...args) => f(g(h(...args))).\n */\n\nfunction compose() {\n for (var _len = arguments.length, funcs = Array(_len), _key = 0; _key < _len; _key++) {\n funcs[_key] = arguments[_key];\n }\n\n if (funcs.length === 0) {\n return function (arg) {\n return arg;\n };\n }\n\n if (funcs.length === 1) {\n return funcs[0];\n }\n\n var last = funcs[funcs.length - 1];\n var rest = funcs.slice(0, -1);\n return function () {\n return rest.reduceRight(function (composed, f) {\n return f(composed);\n }, last.apply(undefined, arguments));\n };\n}\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/redux/es/compose.js\n// module id = 586\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/redux/es/compose.js?', + ); + + /***/ + }, + /* 587 */ + /* exports provided: ActionTypes, default */ + /* exports used: default, ActionTypes */ + /*!***********************************!*\ + !*** ./~/redux/es/createStore.js ***! + \***********************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_isPlainObject__ = __webpack_require__(/*! lodash-es/isPlainObject */ 220);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_symbol_observable__ = __webpack_require__(/*! symbol-observable */ 589);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_symbol_observable___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_symbol_observable__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return ActionTypes; });\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = createStore;\n\n\n\n/**\n * These are private action types reserved by Redux.\n * For any unknown actions, you must return the current state.\n * If the current state is undefined, you must return the initial state.\n * Do not reference these action types directly in your code.\n */\nvar ActionTypes = {\n INIT: '@@redux/INIT'\n};\n\n/**\n * Creates a Redux store that holds the state tree.\n * The only way to change the data in the store is to call `dispatch()` on it.\n *\n * There should only be a single store in your app. To specify how different\n * parts of the state tree respond to actions, you may combine several reducers\n * into a single reducer function by using `combineReducers`.\n *\n * @param {Function} reducer A function that returns the next state tree, given\n * the current state tree and the action to handle.\n *\n * @param {any} [preloadedState] The initial state. You may optionally specify it\n * to hydrate the state from the server in universal apps, or to restore a\n * previously serialized user session.\n * If you use `combineReducers` to produce the root reducer function, this must be\n * an object with the same shape as `combineReducers` keys.\n *\n * @param {Function} enhancer The store enhancer. You may optionally specify it\n * to enhance the store with third-party capabilities such as middleware,\n * time travel, persistence, etc. The only store enhancer that ships with Redux\n * is `applyMiddleware()`.\n *\n * @returns {Store} A Redux store that lets you read the state, dispatch actions\n * and subscribe to changes.\n */\nfunction createStore(reducer, preloadedState, enhancer) {\n var _ref2;\n\n if (typeof preloadedState === 'function' && typeof enhancer === 'undefined') {\n enhancer = preloadedState;\n preloadedState = undefined;\n }\n\n if (typeof enhancer !== 'undefined') {\n if (typeof enhancer !== 'function') {\n throw new Error('Expected the enhancer to be a function.');\n }\n\n return enhancer(createStore)(reducer, preloadedState);\n }\n\n if (typeof reducer !== 'function') {\n throw new Error('Expected the reducer to be a function.');\n }\n\n var currentReducer = reducer;\n var currentState = preloadedState;\n var currentListeners = [];\n var nextListeners = currentListeners;\n var isDispatching = false;\n\n function ensureCanMutateNextListeners() {\n if (nextListeners === currentListeners) {\n nextListeners = currentListeners.slice();\n }\n }\n\n /**\n * Reads the state tree managed by the store.\n *\n * @returns {any} The current state tree of your application.\n */\n function getState() {\n return currentState;\n }\n\n /**\n * Adds a change listener. It will be called any time an action is dispatched,\n * and some part of the state tree may potentially have changed. You may then\n * call `getState()` to read the current state tree inside the callback.\n *\n * You may call `dispatch()` from a change listener, with the following\n * caveats:\n *\n * 1. The subscriptions are snapshotted just before every `dispatch()` call.\n * If you subscribe or unsubscribe while the listeners are being invoked, this\n * will not have any effect on the `dispatch()` that is currently in progress.\n * However, the next `dispatch()` call, whether nested or not, will use a more\n * recent snapshot of the subscription list.\n *\n * 2. The listener should not expect to see all state changes, as the state\n * might have been updated multiple times during a nested `dispatch()` before\n * the listener is called. It is, however, guaranteed that all subscribers\n * registered before the `dispatch()` started will be called with the latest\n * state by the time it exits.\n *\n * @param {Function} listener A callback to be invoked on every dispatch.\n * @returns {Function} A function to remove this change listener.\n */\n function subscribe(listener) {\n if (typeof listener !== 'function') {\n throw new Error('Expected listener to be a function.');\n }\n\n var isSubscribed = true;\n\n ensureCanMutateNextListeners();\n nextListeners.push(listener);\n\n return function unsubscribe() {\n if (!isSubscribed) {\n return;\n }\n\n isSubscribed = false;\n\n ensureCanMutateNextListeners();\n var index = nextListeners.indexOf(listener);\n nextListeners.splice(index, 1);\n };\n }\n\n /**\n * Dispatches an action. It is the only way to trigger a state change.\n *\n * The `reducer` function, used to create the store, will be called with the\n * current state tree and the given `action`. Its return value will\n * be considered the **next** state of the tree, and the change listeners\n * will be notified.\n *\n * The base implementation only supports plain object actions. If you want to\n * dispatch a Promise, an Observable, a thunk, or something else, you need to\n * wrap your store creating function into the corresponding middleware. For\n * example, see the documentation for the `redux-thunk` package. Even the\n * middleware will eventually dispatch plain object actions using this method.\n *\n * @param {Object} action A plain object representing “what changed”. It is\n * a good idea to keep actions serializable so you can record and replay user\n * sessions, or use the time travelling `redux-devtools`. An action must have\n * a `type` property which may not be `undefined`. It is a good idea to use\n * string constants for action types.\n *\n * @returns {Object} For convenience, the same action object you dispatched.\n *\n * Note that, if you use a custom middleware, it may wrap `dispatch()` to\n * return something else (for example, a Promise you can await).\n */\n function dispatch(action) {\n if (!__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0_lodash_es_isPlainObject__[\"a\" /* default */])(action)) {\n throw new Error('Actions must be plain objects. ' + 'Use custom middleware for async actions.');\n }\n\n if (typeof action.type === 'undefined') {\n throw new Error('Actions may not have an undefined \"type\" property. ' + 'Have you misspelled a constant?');\n }\n\n if (isDispatching) {\n throw new Error('Reducers may not dispatch actions.');\n }\n\n try {\n isDispatching = true;\n currentState = currentReducer(currentState, action);\n } finally {\n isDispatching = false;\n }\n\n var listeners = currentListeners = nextListeners;\n for (var i = 0; i < listeners.length; i++) {\n listeners[i]();\n }\n\n return action;\n }\n\n /**\n * Replaces the reducer currently used by the store to calculate the state.\n *\n * You might need this if your app implements code splitting and you want to\n * load some of the reducers dynamically. You might also need this if you\n * implement a hot reloading mechanism for Redux.\n *\n * @param {Function} nextReducer The reducer for the store to use instead.\n * @returns {void}\n */\n function replaceReducer(nextReducer) {\n if (typeof nextReducer !== 'function') {\n throw new Error('Expected the nextReducer to be a function.');\n }\n\n currentReducer = nextReducer;\n dispatch({ type: ActionTypes.INIT });\n }\n\n /**\n * Interoperability point for observable/reactive libraries.\n * @returns {observable} A minimal observable of state changes.\n * For more information, see the observable proposal:\n * https://github.com/zenparsing/es-observable\n */\n function observable() {\n var _ref;\n\n var outerSubscribe = subscribe;\n return _ref = {\n /**\n * The minimal observable subscription method.\n * @param {Object} observer Any object that can be used as an observer.\n * The observer object should have a `next` method.\n * @returns {subscription} An object with an `unsubscribe` method that can\n * be used to unsubscribe the observable from the store, and prevent further\n * emission of values from the observable.\n */\n subscribe: function subscribe(observer) {\n if (typeof observer !== 'object') {\n throw new TypeError('Expected the observer to be an object.');\n }\n\n function observeState() {\n if (observer.next) {\n observer.next(getState());\n }\n }\n\n observeState();\n var unsubscribe = outerSubscribe(observeState);\n return { unsubscribe: unsubscribe };\n }\n }, _ref[__WEBPACK_IMPORTED_MODULE_1_symbol_observable___default.a] = function () {\n return this;\n }, _ref;\n }\n\n // When a store is created, an \"INIT\" action is dispatched so that every\n // reducer returns their initial state. This effectively populates\n // the initial state tree.\n dispatch({ type: ActionTypes.INIT });\n\n return _ref2 = {\n dispatch: dispatch,\n subscribe: subscribe,\n getState: getState,\n replaceReducer: replaceReducer\n }, _ref2[__WEBPACK_IMPORTED_MODULE_1_symbol_observable___default.a] = observable, _ref2;\n}\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/redux/es/createStore.js\n// module id = 587\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/redux/es/createStore.js?", + ); + + /***/ + }, + /* 588 */ + /* exports provided: default */ + /* exports used: default */ + /*!*************************************!*\ + !*** ./~/redux/es/utils/warning.js ***! + \*************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony export (immutable) */ __webpack_exports__["a"] = warning;\n/**\n * Prints a warning in the console if it exists.\n *\n * @param {String} message The warning message.\n * @returns {void}\n */\nfunction warning(message) {\n /* eslint-disable no-console */\n if (typeof console !== \'undefined\' && typeof console.error === \'function\') {\n console.error(message);\n }\n /* eslint-enable no-console */\n try {\n // This error was thrown as a convenience so that if you enable\n // "break on all exceptions" in your console,\n // it would pause the execution at this line.\n throw new Error(message);\n /* eslint-disable no-empty */\n } catch (e) {}\n /* eslint-enable no-empty */\n}\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/redux/es/utils/warning.js\n// module id = 588\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/redux/es/utils/warning.js?', + ); + + /***/ + }, + /* 589 */ + /* unknown exports provided */ + /* exports used: default */ + /*!**************************************!*\ + !*** ./~/symbol-observable/index.js ***! + \**************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + 'module.exports = __webpack_require__(/*! ./lib/index */ 1490);\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/symbol-observable/index.js\n// module id = 589\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/symbol-observable/index.js?', + ); + + /***/ + }, + /* 590 */ + /* unknown exports provided */ + /*!**************************************************!*\ + !*** ./app/bundles/blv-redux/startup/client.jsx ***! + \**************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_on_rails__ = __webpack_require__(/*! react-on-rails */ 50);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_on_rails___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react_on_rails__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_router__ = __webpack_require__(/*! react-router */ 82);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_qs__ = __webpack_require__(/*! qs */ 233);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_qs___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_qs__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_history_lib_createBrowserHistory__ = __webpack_require__(/*! history/lib/createBrowserHistory */ 214);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_history_lib_createBrowserHistory___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_history_lib_createBrowserHistory__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__routes__ = __webpack_require__(/*! ../routes */ 622);\n\n\n\n\n // eslint-disable-line import/no-extraneous-dependencies\n\n\n\nvar stringifyQuery = function stringifyQuery(query) {\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3_qs__["stringify"])(query, { arrayFormat: \'brackets\' });\n};\n\nvar getClientListingsIndex = function getClientListingsIndex(props, railsContext) {\n var history = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2_react_router__["b" /* useRouterHistory */])(__WEBPACK_IMPORTED_MODULE_4_history_lib_createBrowserHistory___default.a)({ parseQueryString: __WEBPACK_IMPORTED_MODULE_3_qs__["parse"], stringifyQuery: stringifyQuery });\n var routes = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__routes__["a" /* default */])(props, railsContext);\n\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_2_react_router__["c" /* Router */],\n { history: history },\n routes\n );\n};\n\n// See https://github.com/reactjs/react-router/blob/master/docs/guides/ServerRendering.md\ngetClientListingsIndex.propTypes = {\n children: __webpack_require__(/*! prop-types */ 0).any.isRequired,\n params: __webpack_require__(/*! prop-types */ 0).shape({}).isRequired\n};\nvar getServerListingsIndex = function getServerListingsIndex(props, railsContext) {\n var location = railsContext.location;\n\n var routes = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__routes__["a" /* default */])(props, railsContext);\n var retVal = void 0;\n\n var matchCallback = function matchCallback(error, redirectLocation, renderProps) {\n retVal = error || redirectLocation ? { error: error, redirectLocation: redirectLocation } : retVal = __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2_react_router__["d" /* RouterContext */], renderProps);\n };\n\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2_react_router__["e" /* match */])({ routes: routes, location: location, parseQueryString: __WEBPACK_IMPORTED_MODULE_3_qs__["parse"], stringifyQuery: stringifyQuery }, matchCallback);\n\n return retVal;\n};\n\ngetServerListingsIndex.propTypes = {\n children: __webpack_require__(/*! prop-types */ 0).any.isRequired,\n params: __webpack_require__(/*! prop-types */ 0).shape({}).isRequired\n};\nvar ListingsIndexRedux = function ListingsIndexRedux(props, railsContext) {\n return railsContext.serverSide ? getServerListingsIndex(props, railsContext) : getClientListingsIndex(props, railsContext);\n};\n\n__WEBPACK_IMPORTED_MODULE_0_react_on_rails___default.a.register({ ListingsIndexRedux: ListingsIndexRedux });\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/blv-redux/startup/client.jsx\n// module id = 590\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/blv-redux/startup/client.jsx?', + ); + + /***/ + }, + /* 591 */ + /* exports provided: default */ + /*!******************************************************!*\ + !*** ./app/bundles/layout-navbar/startup/client.jsx ***! + \******************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_on_rails__ = __webpack_require__(/*! react-on-rails */ 50);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_on_rails___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react_on_rails__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_redux__ = __webpack_require__(/*! react-redux */ 81);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__shared_store__ = __webpack_require__(/*! ../../shared-store */ 293);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__libs_utils_trackUserSessionStatus__ = __webpack_require__(/*! ../../../libs/utils/trackUserSessionStatus */ 893);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__libs_utils_errorTracker_Honeybadger__ = __webpack_require__(/*! ../../../libs/utils/errorTracker/Honeybadger */ 311);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__containers_NavbarContainer__ = __webpack_require__(/*! ../containers/NavbarContainer */ 633);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__store_configureStoreParts__ = __webpack_require__(/*! ../store/configureStoreParts */ 637);\n\n\n\n\n\n\n\n\n\n\n\n__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__libs_utils_trackUserSessionStatus__["a" /* default */])();\n\n__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__shared_store__["a" /* registerStorePartsCreator */])(__WEBPACK_IMPORTED_MODULE_7__store_configureStoreParts__["a" /* default */]);\n\n// Since this Navbar is on every page, it\'s a good place to register the shared store.\n__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__shared_store__["c" /* registerSharedStore */])();\n\nvar Navbar = function Navbar(_railsProps, railsContext) {\n // Set up honeybadger with the proper environment and user context\n if (__WEBPACK_IMPORTED_MODULE_5__libs_utils_errorTracker_Honeybadger__["a" /* default */]) {\n __WEBPACK_IMPORTED_MODULE_5__libs_utils_errorTracker_Honeybadger__["a" /* default */].configure({ environment: railsContext.honeybadgerEnv });\n __WEBPACK_IMPORTED_MODULE_5__libs_utils_errorTracker_Honeybadger__["a" /* default */].setContext({\n user_id: railsContext.userId,\n user_email: railsContext.userEmail\n });\n }\n\n var store = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__shared_store__["b" /* getSharedStore */])();\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_2_react_redux__["b" /* Provider */],\n { store: store },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_6__containers_NavbarContainer__["a" /* default */], null)\n );\n};\n\nNavbar.propTypes = {};\n__WEBPACK_IMPORTED_MODULE_1_react_on_rails___default.a.register({ LayoutNavbar: Navbar });\n\n/* unused harmony default export */ var _unused_webpack_default_export = (Navbar);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/layout-navbar/startup/client.jsx\n// module id = 591\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/layout-navbar/startup/client.jsx?', + ); + + /***/ + }, + /* 592 */ + /* unknown exports provided */ + /*!*******************************************************!*\ + !*** ./app/bundles/listings-index/startup/client.jsx ***! + \*******************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_on_rails__ = __webpack_require__(/*! react-on-rails */ 50);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_on_rails___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react_on_rails__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_router__ = __webpack_require__(/*! react-router */ 82);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_qs__ = __webpack_require__(/*! qs */ 233);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_qs___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_qs__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_history_lib_createBrowserHistory__ = __webpack_require__(/*! history/lib/createBrowserHistory */ 214);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_history_lib_createBrowserHistory___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_history_lib_createBrowserHistory__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__containers_ListingsIndexContainer__ = __webpack_require__(/*! ../containers/ListingsIndexContainer */ 650);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\n\n\n\n\n // eslint-disable-line import/no-extraneous-dependencies\n\n\n\nvar getRoutes = function getRoutes(props, railsContext) {\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2_react_router__["f" /* Route */], {\n path: \'/s(*)\',\n component: function component(componentProps) {\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5__containers_ListingsIndexContainer__["a" /* default */], _extends({}, props, componentProps, {\n tablet: railsContext.tablet,\n mobile: railsContext.mobile\n }));\n }\n });\n};\n\nvar stringifyQuery = function stringifyQuery(query) {\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3_qs__["stringify"])(query, { arrayFormat: \'brackets\' });\n};\n\nvar getClientListingsIndex = function getClientListingsIndex(props, railsContext) {\n var history = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2_react_router__["b" /* useRouterHistory */])(__WEBPACK_IMPORTED_MODULE_4_history_lib_createBrowserHistory___default.a)({ parseQueryString: __WEBPACK_IMPORTED_MODULE_3_qs__["parse"], stringifyQuery: stringifyQuery });\n var routes = getRoutes(props, railsContext);\n\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_2_react_router__["c" /* Router */],\n { history: history },\n routes\n );\n};\n\n// See https://github.com/reactjs/react-router/blob/master/docs/guides/ServerRendering.md\nvar getServerListingsIndex = function getServerListingsIndex(props, railsContext) {\n var location = railsContext.location;\n\n var routes = getRoutes(props, railsContext);\n var retVal = void 0;\n\n var matchCallback = function matchCallback(error, redirectLocation, renderProps) {\n retVal = error || redirectLocation ? { error: error, redirectLocation: redirectLocation } : retVal = __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2_react_router__["d" /* RouterContext */], renderProps);\n };\n\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2_react_router__["e" /* match */])({ routes: routes, location: location, parseQueryString: __WEBPACK_IMPORTED_MODULE_3_qs__["parse"], stringifyQuery: stringifyQuery }, matchCallback);\n\n return retVal;\n};\n\nvar ListingsIndex = function ListingsIndex(props, railsContext) {\n return railsContext.serverSide ? getServerListingsIndex(props, railsContext) : getClientListingsIndex(props, railsContext);\n};\n\n__WEBPACK_IMPORTED_MODULE_0_react_on_rails___default.a.register({ ListingsIndex: ListingsIndex });\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-index/startup/client.jsx\n// module id = 592\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-index/startup/client.jsx?', + ); + + /***/ + }, + /* 593 */ + /* exports provided: default */ + /*!******************************************************!*\ + !*** ./app/bundles/listings-show/startup/client.jsx ***! + \******************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_on_rails__ = __webpack_require__(/*! react-on-rails */ 50);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_on_rails___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react_on_rails__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__ui_Container_live__ = __webpack_require__(/*! ../ui/Container.live */ 654);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__ui_Container_preview__ = __webpack_require__(/*! ../ui/Container.preview */ 655);\n\n/* eslint-disable react/jsx-indent-props, react/jsx-closing-bracket-location */\n\n\n\n\nvar babelPluginFlowReactPropTypes_proptype_ContextualListing = __webpack_require__(/*! ../../../types */ 4).babelPluginFlowReactPropTypes_proptype_ContextualListing || __webpack_require__(/*! react */ 1).PropTypes.any;\n\nvar babelPluginFlowReactPropTypes_proptype_User = __webpack_require__(/*! ../../../types */ 4).babelPluginFlowReactPropTypes_proptype_User || __webpack_require__(/*! react */ 1).PropTypes.any;\n\n\n\n\nvar ListingsShow = function ListingsShow(_ref, _ref2) {\n var user = _ref.user,\n listing = _ref.listing;\n var cloudinaryUrl = _ref2.cloudinaryUrl;\n return listing.userContext.isManagedByCurrentUser ? __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3__ui_Container_preview__["a" /* default */], {\n isLive: true,\n listingId: listing.id,\n listing: listing,\n allAmenities: [{"id":1,"name":"Couples","category":"good_for"},{"id":2,"name":"Solo adventurers","category":"good_for"},{"id":3,"name":"Business travelers","category":"good_for"},{"id":4,"name":"Families (with kids)","category":"good_for"},{"id":5,"name":"Big groups","category":"good_for"},{"id":6,"name":"Furry friends (pets)","category":"good_for"},{"id":7,"name":"Essentials (towels, bed sheets, soap, and toilet paper)","category":"common"},{"id":8,"name":"Wifi","category":"common"},{"id":9,"name":"Shampoo","category":"common"},{"id":10,"name":"Closet/drawers","category":"common"},{"id":11,"name":"TV","category":"common"},{"id":12,"name":"Heat","category":"common"},{"id":13,"name":"Air conditioning","category":"common"},{"id":14,"name":"Breakfast, coffee, tea","category":"common"},{"id":15,"name":"Desk/workspace","category":"common"},{"id":16,"name":"Fireplace","category":"common"},{"id":17,"name":"Iron","category":"common"},{"id":18,"name":"Hairdryer","category":"common"},{"id":19,"name":"Pets in the house","category":"common"},{"id":20,"name":"Wheelchair Accessible","category":"common"},{"id":21,"name":"Kitchen","category":"spaces"},{"id":22,"name":"Laundry - washer","category":"spaces"},{"id":23,"name":"Laundry - dryer","category":"spaces"},{"id":24,"name":"Parking space","category":"spaces"},{"id":25,"name":"Elevator","category":"spaces"},{"id":26,"name":"Pool","category":"spaces"},{"id":27,"name":"Hot Tub","category":"spaces"},{"id":28,"name":"Gym","category":"spaces"},{"id":29,"name":"Smoke detector","category":"safety"},{"id":30,"name":"Carbon monoxide detector","category":"safety"},{"id":31,"name":"First aid kit","category":"safety"},{"id":32,"name":"Safety card","category":"safety"},{"id":33,"name":"Fire extinguisher","category":"safety"},{"id":34,"name":"Lock on bedroom door","category":"safety"}],\n cloudinaryUrl: cloudinaryUrl\n }) : __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2__ui_Container_live__["a" /* default */], {\n listing: listing,\n allAmenities: [{"id":1,"name":"Couples","category":"good_for"},{"id":2,"name":"Solo adventurers","category":"good_for"},{"id":3,"name":"Business travelers","category":"good_for"},{"id":4,"name":"Families (with kids)","category":"good_for"},{"id":5,"name":"Big groups","category":"good_for"},{"id":6,"name":"Furry friends (pets)","category":"good_for"},{"id":7,"name":"Essentials (towels, bed sheets, soap, and toilet paper)","category":"common"},{"id":8,"name":"Wifi","category":"common"},{"id":9,"name":"Shampoo","category":"common"},{"id":10,"name":"Closet/drawers","category":"common"},{"id":11,"name":"TV","category":"common"},{"id":12,"name":"Heat","category":"common"},{"id":13,"name":"Air conditioning","category":"common"},{"id":14,"name":"Breakfast, coffee, tea","category":"common"},{"id":15,"name":"Desk/workspace","category":"common"},{"id":16,"name":"Fireplace","category":"common"},{"id":17,"name":"Iron","category":"common"},{"id":18,"name":"Hairdryer","category":"common"},{"id":19,"name":"Pets in the house","category":"common"},{"id":20,"name":"Wheelchair Accessible","category":"common"},{"id":21,"name":"Kitchen","category":"spaces"},{"id":22,"name":"Laundry - washer","category":"spaces"},{"id":23,"name":"Laundry - dryer","category":"spaces"},{"id":24,"name":"Parking space","category":"spaces"},{"id":25,"name":"Elevator","category":"spaces"},{"id":26,"name":"Pool","category":"spaces"},{"id":27,"name":"Hot Tub","category":"spaces"},{"id":28,"name":"Gym","category":"spaces"},{"id":29,"name":"Smoke detector","category":"safety"},{"id":30,"name":"Carbon monoxide detector","category":"safety"},{"id":31,"name":"First aid kit","category":"safety"},{"id":32,"name":"Safety card","category":"safety"},{"id":33,"name":"Fire extinguisher","category":"safety"},{"id":34,"name":"Lock on bedroom door","category":"safety"}],\n cloudinaryUrl: cloudinaryUrl,\n isLoggedIn: !!user\n });\n};\n\nListingsShow.propTypes = {\n user: babelPluginFlowReactPropTypes_proptype_User,\n listing: babelPluginFlowReactPropTypes_proptype_ContextualListing\n};\n__WEBPACK_IMPORTED_MODULE_1_react_on_rails___default.a.register({ ListingsShow: ListingsShow });\n\n/* unused harmony default export */ var _unused_webpack_default_export = (ListingsShow);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-show/startup/client.jsx\n// module id = 593\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-show/startup/client.jsx?', + ); + + /***/ + }, + /* 594 */ + /* unknown exports provided */ + /*!*********************************************!*\ + !*** ./app/bundles/pages-hosts/startup.jsx ***! + \*********************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_on_rails__ = __webpack_require__(/*! react-on-rails */ 50);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_on_rails___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react_on_rails__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__components_HostsPage__ = __webpack_require__(/*! ./components/HostsPage */ 695);\n\n\n\n\n__WEBPACK_IMPORTED_MODULE_0_react_on_rails___default.a.register({ HostsPage: __WEBPACK_IMPORTED_MODULE_1__components_HostsPage__["a" /* default */] });\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/pages-hosts/startup.jsx\n// module id = 594\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/pages-hosts/startup.jsx?', + ); + + /***/ + }, + /* 595 */ + /* unknown exports provided */ + /*!***********************************************!*\ + !*** ./app/bundles/pages-pricing/startup.jsx ***! + \***********************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_on_rails__ = __webpack_require__(/*! react-on-rails */ 50);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_on_rails___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react_on_rails__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__components_PricingPage__ = __webpack_require__(/*! ./components/PricingPage */ 700);\n\n\n\n\n__WEBPACK_IMPORTED_MODULE_0_react_on_rails___default.a.register({ PricingPage: __WEBPACK_IMPORTED_MODULE_1__components_PricingPage__["a" /* default */] });\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/pages-pricing/startup.jsx\n// module id = 595\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/pages-pricing/startup.jsx?', + ); + + /***/ + }, + /* 596 */ + /* unknown exports provided */ + /*!*****************************************************!*\ + !*** ./app/bundles/pages-private-hosts/startup.jsx ***! + \*****************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_on_rails__ = __webpack_require__(/*! react-on-rails */ 50);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_on_rails___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react_on_rails__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__components_PrivateHostsPage__ = __webpack_require__(/*! ./components/PrivateHostsPage */ 709);\n\n\n\n\n__WEBPACK_IMPORTED_MODULE_0_react_on_rails___default.a.register({ PrivateHostsPage: __WEBPACK_IMPORTED_MODULE_1__components_PrivateHostsPage__["a" /* default */] });\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/pages-private-hosts/startup.jsx\n// module id = 596\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/pages-private-hosts/startup.jsx?', + ); + + /***/ + }, + /* 597 */ + /* unknown exports provided */ + /*!****************************************************!*\ + !*** ./app/bundles/pages-public-hosts/startup.jsx ***! + \****************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_on_rails__ = __webpack_require__(/*! react-on-rails */ 50);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_on_rails___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react_on_rails__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__components_PublicHostsPage__ = __webpack_require__(/*! ./components/PublicHostsPage */ 713);\n\n\n\n\n__WEBPACK_IMPORTED_MODULE_0_react_on_rails___default.a.register({ PublicHostsPage: __WEBPACK_IMPORTED_MODULE_1__components_PublicHostsPage__["a" /* default */] });\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/pages-public-hosts/startup.jsx\n// module id = 597\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/pages-public-hosts/startup.jsx?', + ); + + /***/ + }, + /* 598 */ + /* unknown exports provided */ + /*!***********************************************!*\ + !*** ./app/bundles/pages-welcome/startup.jsx ***! + \***********************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_on_rails__ = __webpack_require__(/*! react-on-rails */ 50);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_on_rails___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react_on_rails__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__components_WelcomePage__ = __webpack_require__(/*! ./components/WelcomePage */ 721);\n\n\n\n\n__WEBPACK_IMPORTED_MODULE_0_react_on_rails___default.a.register({ WelcomePage: __WEBPACK_IMPORTED_MODULE_1__components_WelcomePage__["a" /* default */] });\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/pages-welcome/startup.jsx\n// module id = 598\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/pages-welcome/startup.jsx?', + ); + + /***/ + }, + /* 599 */ + /* unknown exports provided */ + /*!*****************************************!*\ + !*** ./app/bundles/slim-styles/base.js ***! + \*****************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__base_scss__ = __webpack_require__(/*! ./base.scss */ 1030);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__base_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__base_scss__);\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/slim-styles/base.js\n// module id = 599\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/slim-styles/base.js?', + ); + + /***/ + }, + /* 600 */ + /* exports provided: default */ + /*!***************************************************!*\ + !*** ./app/bundles/users-show/startup/client.jsx ***! + \***************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_on_rails__ = __webpack_require__(/*! react-on-rails */ 50);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_on_rails___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react_on_rails__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_redux__ = __webpack_require__(/*! react-redux */ 81);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__shared_store__ = __webpack_require__(/*! ../../shared-store */ 293);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__containers_UserProfileContainer__ = __webpack_require__(/*! ../containers/UserProfileContainer */ 729);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__store_createStoreParts__ = __webpack_require__(/*! ../store/createStoreParts */ 738);\n\n\n\n\n\n\n\n\n\n__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__shared_store__["a" /* registerStorePartsCreator */])(__WEBPACK_IMPORTED_MODULE_5__store_createStoreParts__["a" /* default */]);\n\nvar UsersShow = function UsersShow() {\n var store = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__shared_store__["b" /* getSharedStore */])();\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_2_react_redux__["b" /* Provider */],\n { store: store },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_4__containers_UserProfileContainer__["a" /* default */], null)\n );\n};\n\n__WEBPACK_IMPORTED_MODULE_1_react_on_rails___default.a.register({ UsersShow: UsersShow });\n\n/* unused harmony default export */ var _unused_webpack_default_export = (UsersShow);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/users-show/startup/client.jsx\n// module id = 600\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/users-show/startup/client.jsx?', + ); + + /***/ + }, + /* 601 */ + /* unknown exports provided */ + /* all exports used */ + /*!*********************************************************!*\ + !*** ./~/add-dom-event-listener/lib/EventBaseObject.js ***! + \*********************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '/**\n * @ignore\n * base event object for custom and dom event.\n * @author yiminghe@gmail.com\n */\n\n\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nfunction returnFalse() {\n return false;\n}\n\nfunction returnTrue() {\n return true;\n}\n\nfunction EventBaseObject() {\n this.timeStamp = Date.now();\n this.target = undefined;\n this.currentTarget = undefined;\n}\n\nEventBaseObject.prototype = {\n isEventObject: 1,\n\n constructor: EventBaseObject,\n\n isDefaultPrevented: returnFalse,\n\n isPropagationStopped: returnFalse,\n\n isImmediatePropagationStopped: returnFalse,\n\n preventDefault: function preventDefault() {\n this.isDefaultPrevented = returnTrue;\n },\n\n stopPropagation: function stopPropagation() {\n this.isPropagationStopped = returnTrue;\n },\n\n stopImmediatePropagation: function stopImmediatePropagation() {\n this.isImmediatePropagationStopped = returnTrue;\n // fixed 1.2\n // call stopPropagation implicitly\n this.stopPropagation();\n },\n\n halt: function halt(immediate) {\n if (immediate) {\n this.stopImmediatePropagation();\n } else {\n this.stopPropagation();\n }\n this.preventDefault();\n }\n};\n\nexports["default"] = EventBaseObject;\nmodule.exports = exports["default"];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/add-dom-event-listener/lib/EventBaseObject.js\n// module id = 601\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/add-dom-event-listener/lib/EventBaseObject.js?', + ); + + /***/ + }, + /* 602 */ + /* unknown exports provided */ + /* all exports used */ + /*!*****************************************************!*\ + !*** ./~/add-dom-event-listener/lib/EventObject.js ***! + \*****************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * @ignore\n * event object for dom\n * @author yiminghe@gmail.com\n */\n\n\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _EventBaseObject = __webpack_require__(/*! ./EventBaseObject */ 601);\n\nvar _EventBaseObject2 = _interopRequireDefault(_EventBaseObject);\n\nvar _objectAssign = __webpack_require__(/*! object-assign */ 21);\n\nvar _objectAssign2 = _interopRequireDefault(_objectAssign);\n\nvar TRUE = true;\nvar FALSE = false;\nvar commonProps = ['altKey', 'bubbles', 'cancelable', 'ctrlKey', 'currentTarget', 'eventPhase', 'metaKey', 'shiftKey', 'target', 'timeStamp', 'view', 'type'];\n\nfunction isNullOrUndefined(w) {\n return w === null || w === undefined;\n}\n\nvar eventNormalizers = [{\n reg: /^key/,\n props: ['char', 'charCode', 'key', 'keyCode', 'which'],\n fix: function fix(event, nativeEvent) {\n if (isNullOrUndefined(event.which)) {\n event.which = !isNullOrUndefined(nativeEvent.charCode) ? nativeEvent.charCode : nativeEvent.keyCode;\n }\n\n // add metaKey to non-Mac browsers (use ctrl for PC 's and Meta for Macs)\n if (event.metaKey === undefined) {\n event.metaKey = event.ctrlKey;\n }\n }\n}, {\n reg: /^touch/,\n props: ['touches', 'changedTouches', 'targetTouches']\n}, {\n reg: /^hashchange$/,\n props: ['newURL', 'oldURL']\n}, {\n reg: /^gesturechange$/i,\n props: ['rotation', 'scale']\n}, {\n reg: /^(mousewheel|DOMMouseScroll)$/,\n props: [],\n fix: function fix(event, nativeEvent) {\n var deltaX = undefined;\n var deltaY = undefined;\n var delta = undefined;\n var wheelDelta = nativeEvent.wheelDelta;\n var axis = nativeEvent.axis;\n var wheelDeltaY = nativeEvent.wheelDeltaY;\n var wheelDeltaX = nativeEvent.wheelDeltaX;\n var detail = nativeEvent.detail;\n\n // ie/webkit\n if (wheelDelta) {\n delta = wheelDelta / 120;\n }\n\n // gecko\n if (detail) {\n // press control e.detail == 1 else e.detail == 3\n delta = 0 - (detail % 3 === 0 ? detail / 3 : detail);\n }\n\n // Gecko\n if (axis !== undefined) {\n if (axis === event.HORIZONTAL_AXIS) {\n deltaY = 0;\n deltaX = 0 - delta;\n } else if (axis === event.VERTICAL_AXIS) {\n deltaX = 0;\n deltaY = delta;\n }\n }\n\n // Webkit\n if (wheelDeltaY !== undefined) {\n deltaY = wheelDeltaY / 120;\n }\n if (wheelDeltaX !== undefined) {\n deltaX = -1 * wheelDeltaX / 120;\n }\n\n // 默认 deltaY (ie)\n if (!deltaX && !deltaY) {\n deltaY = delta;\n }\n\n if (deltaX !== undefined) {\n /**\n * deltaX of mousewheel event\n * @property deltaX\n * @member Event.DomEvent.Object\n */\n event.deltaX = deltaX;\n }\n\n if (deltaY !== undefined) {\n /**\n * deltaY of mousewheel event\n * @property deltaY\n * @member Event.DomEvent.Object\n */\n event.deltaY = deltaY;\n }\n\n if (delta !== undefined) {\n /**\n * delta of mousewheel event\n * @property delta\n * @member Event.DomEvent.Object\n */\n event.delta = delta;\n }\n }\n}, {\n reg: /^mouse|contextmenu|click|mspointer|(^DOMMouseScroll$)/i,\n props: ['buttons', 'clientX', 'clientY', 'button', 'offsetX', 'relatedTarget', 'which', 'fromElement', 'toElement', 'offsetY', 'pageX', 'pageY', 'screenX', 'screenY'],\n fix: function fix(event, nativeEvent) {\n var eventDoc = undefined;\n var doc = undefined;\n var body = undefined;\n var target = event.target;\n var button = nativeEvent.button;\n\n // Calculate pageX/Y if missing and clientX/Y available\n if (target && isNullOrUndefined(event.pageX) && !isNullOrUndefined(nativeEvent.clientX)) {\n eventDoc = target.ownerDocument || document;\n doc = eventDoc.documentElement;\n body = eventDoc.body;\n event.pageX = nativeEvent.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc && doc.clientLeft || body && body.clientLeft || 0);\n event.pageY = nativeEvent.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc && doc.clientTop || body && body.clientTop || 0);\n }\n\n // which for click: 1 === left; 2 === middle; 3 === right\n // do not use button\n if (!event.which && button !== undefined) {\n if (button & 1) {\n event.which = 1;\n } else if (button & 2) {\n event.which = 3;\n } else if (button & 4) {\n event.which = 2;\n } else {\n event.which = 0;\n }\n }\n\n // add relatedTarget, if necessary\n if (!event.relatedTarget && event.fromElement) {\n event.relatedTarget = event.fromElement === target ? event.toElement : event.fromElement;\n }\n\n return event;\n }\n}];\n\nfunction retTrue() {\n return TRUE;\n}\n\nfunction retFalse() {\n return FALSE;\n}\n\nfunction DomEventObject(nativeEvent) {\n var type = nativeEvent.type;\n\n var isNative = typeof nativeEvent.stopPropagation === 'function' || typeof nativeEvent.cancelBubble === 'boolean';\n\n _EventBaseObject2['default'].call(this);\n\n this.nativeEvent = nativeEvent;\n\n // in case dom event has been mark as default prevented by lower dom node\n var isDefaultPrevented = retFalse;\n if ('defaultPrevented' in nativeEvent) {\n isDefaultPrevented = nativeEvent.defaultPrevented ? retTrue : retFalse;\n } else if ('getPreventDefault' in nativeEvent) {\n // https://bugzilla.mozilla.org/show_bug.cgi?id=691151\n isDefaultPrevented = nativeEvent.getPreventDefault() ? retTrue : retFalse;\n } else if ('returnValue' in nativeEvent) {\n isDefaultPrevented = nativeEvent.returnValue === FALSE ? retTrue : retFalse;\n }\n\n this.isDefaultPrevented = isDefaultPrevented;\n\n var fixFns = [];\n var fixFn = undefined;\n var l = undefined;\n var prop = undefined;\n var props = commonProps.concat();\n\n eventNormalizers.forEach(function (normalizer) {\n if (type.match(normalizer.reg)) {\n props = props.concat(normalizer.props);\n if (normalizer.fix) {\n fixFns.push(normalizer.fix);\n }\n }\n });\n\n l = props.length;\n\n // clone properties of the original event object\n while (l) {\n prop = props[--l];\n this[prop] = nativeEvent[prop];\n }\n\n // fix target property, if necessary\n if (!this.target && isNative) {\n this.target = nativeEvent.srcElement || document; // srcElement might not be defined either\n }\n\n // check if target is a text node (safari)\n if (this.target && this.target.nodeType === 3) {\n this.target = this.target.parentNode;\n }\n\n l = fixFns.length;\n\n while (l) {\n fixFn = fixFns[--l];\n fixFn(this, nativeEvent);\n }\n\n this.timeStamp = nativeEvent.timeStamp || Date.now();\n}\n\nvar EventBaseObjectProto = _EventBaseObject2['default'].prototype;\n\n(0, _objectAssign2['default'])(DomEventObject.prototype, EventBaseObjectProto, {\n constructor: DomEventObject,\n\n preventDefault: function preventDefault() {\n var e = this.nativeEvent;\n\n // if preventDefault exists run it on the original event\n if (e.preventDefault) {\n e.preventDefault();\n } else {\n // otherwise set the returnValue property of the original event to FALSE (IE)\n e.returnValue = FALSE;\n }\n\n EventBaseObjectProto.preventDefault.call(this);\n },\n\n stopPropagation: function stopPropagation() {\n var e = this.nativeEvent;\n\n // if stopPropagation exists run it on the original event\n if (e.stopPropagation) {\n e.stopPropagation();\n } else {\n // otherwise set the cancelBubble property of the original event to TRUE (IE)\n e.cancelBubble = TRUE;\n }\n\n EventBaseObjectProto.stopPropagation.call(this);\n }\n});\n\nexports['default'] = DomEventObject;\nmodule.exports = exports['default'];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/add-dom-event-listener/lib/EventObject.js\n// module id = 602\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/add-dom-event-listener/lib/EventObject.js?", + ); + + /***/ + }, + /* 603 */ + /* unknown exports provided */ + /* all exports used */ + /*!******************************************************************!*\ + !*** ./~/airbnb-prop-types/build/childrenHavePropXorChildren.js ***! + \******************************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "Object.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nexports['default'] = childrenHavePropXorChildren;\n\nvar _react = __webpack_require__(/*! react */ 1);\n\nvar _react2 = _interopRequireDefault(_react);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nfunction childrenHavePropXorChildren(prop) {\n if (typeof prop !== 'string' && (typeof prop === 'undefined' ? 'undefined' : _typeof(prop)) !== 'symbol') {\n throw new TypeError('invalid prop: must be string or symbol');\n }\n\n var validator = function () {\n function childrenHavePropXorChildrenWithProp(_ref, _, componentName) {\n var children = _ref.children;\n\n var childrenCount = _react2['default'].Children.count(children);\n var propCount = 0;\n var grandchildrenCount = 0;\n\n _react2['default'].Children.forEach(children, function (child) {\n if (child.props[prop]) {\n propCount += 1;\n }\n if (_react2['default'].Children.count(child.props.children)) {\n grandchildrenCount += 1;\n }\n });\n\n if (propCount === childrenCount && grandchildrenCount === 0 || propCount === 0 && grandchildrenCount === childrenCount || propCount === 0 && grandchildrenCount === 0) {\n return null;\n }\n\n return new TypeError('`' + String(componentName) + '` requires children to all have prop \\u201C' + String(prop) + '\\u201D, all have children, or all have neither.');\n }\n\n return childrenHavePropXorChildrenWithProp;\n }();\n validator.typeName = 'childrenHavePropXorChildrenWithProp:' + String(prop);\n return validator;\n}\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/airbnb-prop-types/build/childrenHavePropXorChildren.js\n// module id = 603\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/airbnb-prop-types/build/childrenHavePropXorChildren.js?", + ); + + /***/ + }, + /* 604 */ + /* unknown exports provided */ + /* all exports used */ + /*!*****************************************************!*\ + !*** ./~/airbnb-prop-types/build/childrenOfType.js ***! + \*****************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "Object.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _react = __webpack_require__(/*! react */ 1);\n\nvar _react2 = _interopRequireDefault(_react);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nfunction onlyTypes(types, children, componentName) {\n if (!children.every(function (child) {\n return child && types.find(function (Type) {\n return child.type === Type;\n });\n })) {\n var typeNames = types.map(function (_ref) {\n var displayName = _ref.displayName,\n name = _ref.name;\n return displayName || name;\n }).join(', or ');\n return new TypeError('`' + String(componentName) + '` only accepts children of type ' + String(typeNames));\n }\n return null;\n}\n\nfunction isRequired(types, children, componentName) {\n if (children.length === 0) {\n var typeNames = types.map(function (_ref2) {\n var displayName = _ref2.displayName,\n name = _ref2.name;\n return displayName || name;\n }).join(', or ');\n return new TypeError('`' + String(componentName) + '` requires at least one node of type ' + String(typeNames));\n }\n return null;\n}\n\nfunction childrenOfType() {\n for (var _len = arguments.length, types = Array(_len), _key = 0; _key < _len; _key++) {\n types[_key] = arguments[_key];\n }\n\n function validator(props, propName, componentName) {\n var prop = props[propName];\n var children = _react2['default'].Children.toArray(prop).filter(function (child) {\n return child === 0 || child;\n });\n return onlyTypes(types, children, componentName);\n }\n validator.typeName = 'childrenOfType';\n\n validator.isRequired = function (props, propName, componentName) {\n var prop = props[propName];\n var children = _react2['default'].Children.toArray(prop).filter(function (child) {\n return child === 0 || child;\n });\n return isRequired(types, children, componentName) || onlyTypes(types, children, componentName);\n };\n validator.isRequired.typeName = 'childrenOfType';\n\n return validator;\n}\n\nexports['default'] = childrenOfType;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/airbnb-prop-types/build/childrenOfType.js\n// module id = 604\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/airbnb-prop-types/build/childrenOfType.js?", + ); + + /***/ + }, + /* 605 */ + /* unknown exports provided */ + /* all exports used */ + /*!********************************************************!*\ + !*** ./~/airbnb-prop-types/build/componentWithName.js ***! + \********************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "Object.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _react = __webpack_require__(/*! react */ 1);\n\nvar _react2 = _interopRequireDefault(_react);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nfunction hasName(name, prop, propName, componentName) {\n if (Array.isArray(prop)) {\n return prop.map(function (item) {\n return hasName(name, item, propName, componentName);\n }).find(Boolean) || null;\n }\n\n if (!_react2['default'].isValidElement(prop)) {\n return new TypeError(String(componentName) + '.' + String(propName) + ' is not a valid React element');\n }\n\n var type = prop.type;\n\n if (type.name !== name && type.displayName !== name) {\n return new TypeError('`' + String(componentName) + '.' + String(propName) + '` only accepts components named ' + String(name));\n }\n\n return null;\n}\n\nfunction componentWithName(name) {\n function componentWithNameValidator(props, propName, componentName) {\n var prop = props[propName];\n if (props[propName] == null) {\n return null;\n }\n return hasName(name, prop, propName, componentName);\n }\n componentWithNameValidator.typeName = 'componentWithName:' + String(name);\n\n componentWithNameValidator.isRequired = function () {\n function componentWithNameRequired(props, propName, componentName) {\n var prop = props[propName];\n if (prop == null) {\n return new TypeError('`' + String(componentName) + '.' + String(propName) + '` requires at least one component named ' + String(name));\n }\n return hasName(name, prop, propName, componentName);\n }\n\n return componentWithNameRequired;\n }();\n componentWithNameValidator.isRequired.typeName = 'componentWithName:' + String(name);\n\n return componentWithNameValidator;\n}\n\nexports['default'] = componentWithName;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/airbnb-prop-types/build/componentWithName.js\n// module id = 605\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/airbnb-prop-types/build/componentWithName.js?", + ); + + /***/ + }, + /* 606 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************************************!*\ + !*** ./~/airbnb-prop-types/build/forbidExtraProps.js ***! + \*******************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "Object.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nexports['default'] = forbidExtraProps;\n\nvar _has = __webpack_require__(/*! has */ 1145);\n\nvar _has2 = _interopRequireDefault(_has);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nfunction _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\nvar zeroWidthSpace = '\\u200B';\nvar semaphore = {};\n\nfunction brand(fn) {\n return Object.assign(fn, _defineProperty({}, zeroWidthSpace, semaphore));\n}\n\nfunction isBranded(value) {\n return value && value[zeroWidthSpace] === semaphore;\n}\n\nfunction forbidExtraProps(propTypes) {\n if (!propTypes || (typeof propTypes === 'undefined' ? 'undefined' : _typeof(propTypes)) !== 'object') {\n throw new TypeError('given propTypes must be an object');\n }\n if ((0, _has2['default'])(propTypes, zeroWidthSpace) && !isBranded(propTypes[zeroWidthSpace])) {\n throw new TypeError('Against all odds, you created a propType for a prop named after the zero-width space - which, sadly, conflicts with `forbidExtraProps`');\n }\n\n return Object.assign({}, propTypes, _defineProperty({}, zeroWidthSpace, brand(function () {\n function forbidUnknownProps(props, _, componentName) {\n var unknownProps = Object.keys(props).filter(function (prop) {\n return !(0, _has2['default'])(propTypes, prop);\n });\n if (unknownProps.length > 0) {\n return new TypeError(String(componentName) + ': unknown props found: ' + String(unknownProps.join(', ')));\n }\n return null;\n }\n\n return forbidUnknownProps;\n }())));\n}\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/airbnb-prop-types/build/forbidExtraProps.js\n// module id = 606\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/airbnb-prop-types/build/forbidExtraProps.js?", + ); + + /***/ + }, + /* 607 */ + /* unknown exports provided */ + /* all exports used */ + /*!********************************************!*\ + !*** ./~/airbnb-prop-types/build/index.js ***! + \********************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "var _and = __webpack_require__(/*! ./and */ 179);\n\nvar _and2 = _interopRequireDefault(_and);\n\nvar _childrenHavePropXorChildren = __webpack_require__(/*! ./childrenHavePropXorChildren */ 603);\n\nvar _childrenHavePropXorChildren2 = _interopRequireDefault(_childrenHavePropXorChildren);\n\nvar _childrenOfType = __webpack_require__(/*! ./childrenOfType */ 604);\n\nvar _childrenOfType2 = _interopRequireDefault(_childrenOfType);\n\nvar _componentWithName = __webpack_require__(/*! ./componentWithName */ 605);\n\nvar _componentWithName2 = _interopRequireDefault(_componentWithName);\n\nvar _forbidExtraProps = __webpack_require__(/*! ./forbidExtraProps */ 606);\n\nvar _forbidExtraProps2 = _interopRequireDefault(_forbidExtraProps);\n\nvar _mutuallyExclusiveProps = __webpack_require__(/*! ./mutuallyExclusiveProps */ 608);\n\nvar _mutuallyExclusiveProps2 = _interopRequireDefault(_mutuallyExclusiveProps);\n\nvar _mutuallyExclusiveTrueProps = __webpack_require__(/*! ./mutuallyExclusiveTrueProps */ 609);\n\nvar _mutuallyExclusiveTrueProps2 = _interopRequireDefault(_mutuallyExclusiveTrueProps);\n\nvar _nChildren = __webpack_require__(/*! ./nChildren */ 610);\n\nvar _nChildren2 = _interopRequireDefault(_nChildren);\n\nvar _nonNegativeInteger = __webpack_require__(/*! ./nonNegativeInteger */ 611);\n\nvar _nonNegativeInteger2 = _interopRequireDefault(_nonNegativeInteger);\n\nvar _or = __webpack_require__(/*! ./or */ 612);\n\nvar _or2 = _interopRequireDefault(_or);\n\nvar _range = __webpack_require__(/*! ./range */ 613);\n\nvar _range2 = _interopRequireDefault(_range);\n\nvar _restrictedProp = __webpack_require__(/*! ./restrictedProp */ 614);\n\nvar _restrictedProp2 = _interopRequireDefault(_restrictedProp);\n\nvar _uniqueArray = __webpack_require__(/*! ./uniqueArray */ 278);\n\nvar _uniqueArray2 = _interopRequireDefault(_uniqueArray);\n\nvar _uniqueArrayOf = __webpack_require__(/*! ./uniqueArrayOf */ 615);\n\nvar _uniqueArrayOf2 = _interopRequireDefault(_uniqueArrayOf);\n\nvar _withShape = __webpack_require__(/*! ./withShape */ 616);\n\nvar _withShape2 = _interopRequireDefault(_withShape);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nmodule.exports = {\n and: _and2['default'],\n childrenHavePropXorChildren: _childrenHavePropXorChildren2['default'],\n childrenOfType: _childrenOfType2['default'],\n componentWithName: _componentWithName2['default'],\n forbidExtraProps: _forbidExtraProps2['default'],\n mutuallyExclusiveProps: _mutuallyExclusiveProps2['default'],\n mutuallyExclusiveTrueProps: _mutuallyExclusiveTrueProps2['default'],\n nChildren: _nChildren2['default'],\n nonNegativeInteger: _nonNegativeInteger2['default'],\n or: _or2['default'],\n range: _range2['default'],\n restrictedProp: _restrictedProp2['default'],\n uniqueArray: _uniqueArray2['default'],\n uniqueArrayOf: _uniqueArrayOf2['default'],\n withShape: _withShape2['default']\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/airbnb-prop-types/build/index.js\n// module id = 607\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/airbnb-prop-types/build/index.js?", + ); + + /***/ + }, + /* 608 */ + /* unknown exports provided */ + /* all exports used */ + /*!*************************************************************!*\ + !*** ./~/airbnb-prop-types/build/mutuallyExclusiveProps.js ***! + \*************************************************************/ + /***/ function (module, exports) { + eval( + "Object.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports['default'] = mutuallyExclusiveOfType;\n\nfunction _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\nfunction mutuallyExclusiveOfType(propType) {\n for (var _len = arguments.length, exclusiveProps = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n exclusiveProps[_key - 1] = arguments[_key];\n }\n\n if (typeof propType !== 'function') {\n throw new TypeError('a propType is required');\n }\n\n if (exclusiveProps.length < 1) {\n throw new TypeError('at least one prop that is mutually exclusive with this propType is required');\n }\n\n var map = exclusiveProps.reduce(function (acc, prop) {\n return Object.assign({}, acc, _defineProperty({}, prop, true));\n }, {});\n var countProps = function countProps(count, prop) {\n return count + (map[prop] ? 1 : 0);\n };\n\n var validator = function () {\n function mutuallyExclusiveProps(props, propName, componentName) {\n var exclusivePropCount = Object.keys(props).filter(function (prop) {\n return props[prop] != null;\n }).reduce(countProps, 0);\n if (exclusivePropCount > 1) {\n return new Error('A ' + String(componentName) + ' cannot have more than one of these props: ' + String(exclusiveProps.join(', or ')));\n }\n\n for (var _len2 = arguments.length, rest = Array(_len2 > 3 ? _len2 - 3 : 0), _key2 = 3; _key2 < _len2; _key2++) {\n rest[_key2 - 3] = arguments[_key2];\n }\n\n return propType.apply(undefined, [props, propName, componentName].concat(rest));\n }\n\n return mutuallyExclusiveProps;\n }();\n validator.typeName = 'mutuallyExclusiveProps:' + String(exclusiveProps.join(', or '));\n\n validator.isRequired = function () {\n function mutuallyExclusivePropsRequired(props, propName, componentName) {\n var exclusivePropCount = Object.keys(props).filter(function (prop) {\n return prop === propName || props[prop] != null;\n }).reduce(countProps, 0);\n if (exclusivePropCount > 1) {\n return new Error('A ' + String(componentName) + ' cannot have more than one of these props: ' + String(exclusiveProps.join(', or ')));\n }\n\n for (var _len3 = arguments.length, rest = Array(_len3 > 3 ? _len3 - 3 : 0), _key3 = 3; _key3 < _len3; _key3++) {\n rest[_key3 - 3] = arguments[_key3];\n }\n\n return propType.apply(undefined, [props, propName, componentName].concat(rest));\n }\n\n return mutuallyExclusivePropsRequired;\n }();\n return validator;\n}\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/airbnb-prop-types/build/mutuallyExclusiveProps.js\n// module id = 608\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/airbnb-prop-types/build/mutuallyExclusiveProps.js?", + ); + + /***/ + }, + /* 609 */ + /* unknown exports provided */ + /* all exports used */ + /*!*****************************************************************!*\ + !*** ./~/airbnb-prop-types/build/mutuallyExclusiveTrueProps.js ***! + \*****************************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "Object.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports['default'] = mutuallyExclusiveTrue;\n\nvar _react = __webpack_require__(/*! react */ 1);\n\nvar bool = _react.PropTypes.bool;\nfunction mutuallyExclusiveTrue() {\n for (var _len = arguments.length, exclusiveProps = Array(_len), _key = 0; _key < _len; _key++) {\n exclusiveProps[_key] = arguments[_key];\n }\n\n if (exclusiveProps.length < 1) {\n throw new TypeError('at least one prop that is mutually exclusive is required');\n }\n if (!exclusiveProps.every(function (x) {\n return typeof x === 'string';\n })) {\n throw new TypeError('all exclusive true props must be strings');\n }\n\n var validator = function () {\n function mutuallyExclusiveTrueProps(props, propName, componentName) {\n var countProps = function () {\n function countProps(count, prop) {\n return count + (props[prop] ? 1 : 0);\n }\n\n return countProps;\n }();\n\n var exclusivePropCount = exclusiveProps.reduce(countProps, 0);\n if (exclusivePropCount > 1) {\n return new Error('A ' + String(componentName) + ' cannot have more than one of these boolean props be true: ' + String(exclusiveProps.join(', or ')));\n }\n\n for (var _len2 = arguments.length, rest = Array(_len2 > 3 ? _len2 - 3 : 0), _key2 = 3; _key2 < _len2; _key2++) {\n rest[_key2 - 3] = arguments[_key2];\n }\n\n return bool.apply(undefined, [props, propName, componentName].concat(rest));\n }\n\n return mutuallyExclusiveTrueProps;\n }();\n validator.typeName = 'mutuallyExclusiveTrueProps: ' + String(exclusiveProps.join(', or '));\n\n validator.isRequired = function () {\n function mutuallyExclusiveTruePropsRequired(props, propName, componentName) {\n var countProps = function () {\n function countProps(count, prop) {\n return count + (props[prop] ? 1 : 0);\n }\n\n return countProps;\n }();\n\n var exclusivePropCount = exclusiveProps.reduce(countProps, 0);\n if (exclusivePropCount > 1) {\n return new Error('A ' + String(componentName) + ' cannot have more than one of these boolean props be true: ' + String(exclusiveProps.join(', or ')));\n }\n\n for (var _len3 = arguments.length, rest = Array(_len3 > 3 ? _len3 - 3 : 0), _key3 = 3; _key3 < _len3; _key3++) {\n rest[_key3 - 3] = arguments[_key3];\n }\n\n return bool.isRequired.apply(bool, [props, propName, componentName].concat(rest));\n }\n\n return mutuallyExclusiveTruePropsRequired;\n }();\n\n return validator;\n}\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/airbnb-prop-types/build/mutuallyExclusiveTrueProps.js\n// module id = 609\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/airbnb-prop-types/build/mutuallyExclusiveTrueProps.js?", + ); + + /***/ + }, + /* 610 */ + /* unknown exports provided */ + /* all exports used */ + /*!************************************************!*\ + !*** ./~/airbnb-prop-types/build/nChildren.js ***! + \************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "Object.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports['default'] = nChildren;\n\nvar _react = __webpack_require__(/*! react */ 1);\n\nvar _react2 = _interopRequireDefault(_react);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nfunction nChildren(n) {\n var propType = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _react.PropTypes.node;\n\n if (typeof n !== 'number' || isNaN(n) || n < 0) {\n throw new TypeError('a non-negative number is required');\n }\n\n var validator = function () {\n function nChildrenValidator(props, propName, componentName) {\n if (propName !== 'children') {\n return new TypeError(String(componentName) + ' is using the nChildren validator on a non-children prop');\n }\n\n var children = props.children;\n\n var childrenCount = _react2['default'].Children.count(children);\n\n if (childrenCount !== n) {\n return new RangeError(String(componentName) + ' expects to receive ' + String(n) + ' children, but received ' + String(childrenCount) + ' children.');\n }\n\n for (var _len = arguments.length, rest = Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {\n rest[_key - 3] = arguments[_key];\n }\n\n return propType.apply(undefined, [props, propName, componentName].concat(rest));\n }\n\n return nChildrenValidator;\n }();\n validator.typeName = 'nChildren:' + String(n);\n return validator;\n}\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/airbnb-prop-types/build/nChildren.js\n// module id = 610\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/airbnb-prop-types/build/nChildren.js?", + ); + + /***/ + }, + /* 611 */ + /* unknown exports provided */ + /* all exports used */ + /*!*********************************************************!*\ + !*** ./~/airbnb-prop-types/build/nonNegativeInteger.js ***! + \*********************************************************/ + /***/ function (module, exports) { + eval( + 'Object.defineProperty(exports, "__esModule", {\n value: true\n});\nvar validator = function () {\n function nonNegativeInteger(props, propName, componentName) {\n var value = props[propName];\n\n if (value == null || Number.isInteger(value) && value >= 0 && !Object.is(value, -0)) {\n return null;\n }\n\n return new RangeError(String(propName) + " in " + String(componentName) + " must be a non-negative integer");\n }\n\n return nonNegativeInteger;\n}();\n\nfunction requiredNonNegativeInteger(props, propName, componentName) {\n var value = props[propName];\n if (value == null) {\n return new RangeError(String(propName) + " in " + String(componentName) + " must be a non-negative integer");\n }\n\n for (var _len = arguments.length, rest = Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {\n rest[_key - 3] = arguments[_key];\n }\n\n return validator.apply(undefined, [props, propName, componentName].concat(rest));\n}\n\nvalidator.isRequired = requiredNonNegativeInteger;\n\nexports["default"] = validator;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/airbnb-prop-types/build/nonNegativeInteger.js\n// module id = 611\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/airbnb-prop-types/build/nonNegativeInteger.js?', + ); + + /***/ + }, + /* 612 */ + /* unknown exports provided */ + /* all exports used */ + /*!*****************************************!*\ + !*** ./~/airbnb-prop-types/build/or.js ***! + \*****************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "Object.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports['default'] = or;\n\nvar _react = __webpack_require__(/*! react */ 1);\n\nfunction _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }\n\nfunction or(validators) {\n var name = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'or';\n\n if (!Array.isArray(validators)) {\n throw new TypeError('or: 2 or more validators are required');\n }\n if (validators.length <= 1) {\n throw new RangeError('or: 2 or more validators are required');\n }\n\n var validator = _react.PropTypes.oneOfType([_react.PropTypes.oneOfType([_react.PropTypes.arrayOf(_react.PropTypes.oneOfType(validators))].concat(_toConsumableArray(validators)))]);\n validator.typeName = name;\n validator.isRequired.typeName = name;\n\n // NOTE: We null out the typechecker because we provide our own name:\n validator.typeChecker = null;\n validator.isRequired.typeChecker = null;\n\n return validator;\n}\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/airbnb-prop-types/build/or.js\n// module id = 612\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/airbnb-prop-types/build/or.js?", + ); + + /***/ + }, + /* 613 */ + /* unknown exports provided */ + /* all exports used */ + /*!********************************************!*\ + !*** ./~/airbnb-prop-types/build/range.js ***! + \********************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "Object.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports['default'] = range;\n\nvar _react = __webpack_require__(/*! react */ 1);\n\nfunction isValidLength(x) {\n return Number.isInteger(x) && isFinite(x) && Math.abs(x) < Number.MAX_SAFE_INTEGER;\n}\n\nfunction range(min, max) {\n if (!isValidLength(min) || !isValidLength(max)) {\n throw new RangeError('\"range\" requires two integers');\n }\n if (min === max) {\n throw new RangeError('min and max must not be the same');\n }\n var possibleSizes = Array.from({ length: max - min }, function (_, i) {\n return min + i;\n });\n if (possibleSizes.indexOf(0) > -1) {\n possibleSizes.push(-0); // React 15 differentiates properly between -0 and 0. We don't need to.\n }\n return _react.PropTypes.oneOf(possibleSizes);\n}\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/airbnb-prop-types/build/range.js\n// module id = 613\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/airbnb-prop-types/build/range.js?", + ); + + /***/ + }, + /* 614 */ + /* unknown exports provided */ + /* all exports used */ + /*!*****************************************************!*\ + !*** ./~/airbnb-prop-types/build/restrictedProp.js ***! + \*****************************************************/ + /***/ function (module, exports) { + eval( + 'Object.defineProperty(exports, "__esModule", {\n value: true\n});\nfunction restrictedProp(props, propName, componentName) {\n if (props[propName] != null) {\n return new TypeError("The " + String(propName) + " prop on " + String(componentName) + " is not allowed.");\n }\n\n return null;\n}\n\nexports["default"] = function () {\n return restrictedProp;\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/airbnb-prop-types/build/restrictedProp.js\n// module id = 614\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/airbnb-prop-types/build/restrictedProp.js?', + ); + + /***/ + }, + /* 615 */ + /* unknown exports provided */ + /* all exports used */ + /*!****************************************************!*\ + !*** ./~/airbnb-prop-types/build/uniqueArrayOf.js ***! + \****************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "Object.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports['default'] = uniqueArrayOfTypeValidator;\n\nvar _react = __webpack_require__(/*! react */ 1);\n\nvar _and = __webpack_require__(/*! ./and */ 179);\n\nvar _and2 = _interopRequireDefault(_and);\n\nvar _uniqueArray = __webpack_require__(/*! ./uniqueArray */ 278);\n\nvar _uniqueArray2 = _interopRequireDefault(_uniqueArray);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar unique = (0, _uniqueArray2['default'])();\n\nfunction uniqueArrayOfTypeValidator(type) {\n var name = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'uniqueArrayOfType';\n\n if (typeof type !== 'function') {\n throw new TypeError('type must be a validator function');\n }\n\n var arrayValidator = _react.PropTypes.arrayOf(type);\n\n var validator = (0, _and2['default'])([arrayValidator, unique], name);\n validator.isRequired = (0, _and2['default'])([arrayValidator.isRequired, unique.isRequired], 'required: ' + String(name));\n\n return validator;\n}\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/airbnb-prop-types/build/uniqueArrayOf.js\n// module id = 615\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/airbnb-prop-types/build/uniqueArrayOf.js?", + ); + + /***/ + }, + /* 616 */ + /* unknown exports provided */ + /* all exports used */ + /*!************************************************!*\ + !*** ./~/airbnb-prop-types/build/withShape.js ***! + \************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "Object.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nexports['default'] = withShape;\n\nvar _and = __webpack_require__(/*! ./and */ 179);\n\nvar _and2 = _interopRequireDefault(_and);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nfunction withShape(type, shapeTypes) {\n if (typeof type !== 'function') {\n throw new TypeError('type must be a valid PropType');\n }\n if (!shapeTypes || Array.isArray(shapeTypes) || (typeof shapeTypes === 'undefined' ? 'undefined' : _typeof(shapeTypes)) !== 'object') {\n throw new TypeError('shape must be a normal object');\n }\n return (0, _and2['default'])([type, function () {\n function universalShape(props, propName, componentName, location) {\n var propValue = props[propName];\n if (propValue == null) {\n return null;\n }\n // code adapted from PropTypes.shape: https://github.com/facebook/react/blob/14156e56b9cf18ac86963185c5af4abddf3ff811/src/isomorphic/classic/types/ReactPropTypes.js#L381\n // eslint-disable-next-line guard-for-in, no-restricted-syntax\n\n for (var _len = arguments.length, rest = Array(_len > 4 ? _len - 4 : 0), _key = 4; _key < _len; _key++) {\n rest[_key - 4] = arguments[_key];\n }\n\n for (var key in shapeTypes) {\n var checker = shapeTypes[key];\n if (checker) {\n var error = checker.apply(undefined, [propValue, key, componentName, location].concat(rest));\n if (error) {\n return error;\n }\n }\n }\n return null;\n }\n\n return universalShape;\n }()], 'withShape');\n}\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/airbnb-prop-types/build/withShape.js\n// module id = 616\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/airbnb-prop-types/build/withShape.js?", + ); + + /***/ + }, + /* 617 */ + /* unknown exports provided */ + /* all exports used */ + /*!**************************************!*\ + !*** ./~/airbnb-prop-types/index.js ***! + \**************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "module.exports = false ? require('./build/mocks') : __webpack_require__(/*! ./build */ 607);\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/airbnb-prop-types/index.js\n// module id = 617\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/airbnb-prop-types/index.js?", + ); + + /***/ + }, + /* 618 */ + /* exports provided: postFavorite, deleteFavorite */ + /* exports used: deleteFavorite, postFavorite */ + /*!******************************!*\ + !*** ./app/api/favorites.js ***! + \******************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__libs_utils_api_apiCall__ = __webpack_require__(/*! ../libs/utils/api/apiCall */ 62);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return postFavorite; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return deleteFavorite; });\n\n\nvar favoritesScope = function favoritesScope(listingId) {\n return \'/listings/\' + listingId + \'/favorites\';\n};\n\n// /api/v1/listings/:liisting_id/favorites\nvar postFavorite = function postFavorite(listingId) {\n var url = favoritesScope(listingId);\n return __WEBPACK_IMPORTED_MODULE_0__libs_utils_api_apiCall__["a" /* default */].post(url);\n};\n\n// /api/v1/listings/:liisting_id/favorites\nvar deleteFavorite = function deleteFavorite(listingId) {\n var url = favoritesScope(listingId);\n return __WEBPACK_IMPORTED_MODULE_0__libs_utils_api_apiCall__["a" /* default */].delete(url);\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/api/favorites.js\n// module id = 618\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/api/favorites.js?', + ); + + /***/ + }, + /* 619 */ + /* exports provided: guestListMembershipRequestsScope, getPendingGuestListMembershipRequests, updateGuestListMembershipRequests, createGuestListMembershipRequest */ + /* exports used: createGuestListMembershipRequest */ + /*!************************************************!*\ + !*** ./app/api/guestListMembershipRequests.js ***! + \************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__libs_utils_api_apiCall__ = __webpack_require__(/*! ../libs/utils/api/apiCall */ 62);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__libs_utils_api__ = __webpack_require__(/*! ../libs/utils/api */ 106);\n/* unused harmony export guestListMembershipRequestsScope */\n/* unused harmony export getPendingGuestListMembershipRequests */\n/* unused harmony export updateGuestListMembershipRequests */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return createGuestListMembershipRequest; });\n\n\n\nvar babelPluginFlowReactPropTypes_proptype_GuestListMembershipRequestStatus = __webpack_require__(/*! ../types */ 4).babelPluginFlowReactPropTypes_proptype_GuestListMembershipRequestStatus || __webpack_require__(/*! react */ 1).PropTypes.any;\n\n// /api/v1/guest_lists\nvar guestListMembershipRequestsScope = function guestListMembershipRequestsScope(path) {\n return \'/guest_list_membership_requests\' + (path || \'\');\n};\n\n// /api/v1/guest_list_membership_requests/pending\nvar getPendingGuestListMembershipRequests = function getPendingGuestListMembershipRequests(query) {\n return __WEBPACK_IMPORTED_MODULE_0__libs_utils_api_apiCall__["a" /* default */].get({\n url: __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__libs_utils_api__["b" /* buildUrl */])(guestListMembershipRequestsScope(\'/pending\'), query)\n });\n};\n\n// /api/v1/guest_list_membership_requests\nvar updateGuestListMembershipRequests = function updateGuestListMembershipRequests(items) {\n return __WEBPACK_IMPORTED_MODULE_0__libs_utils_api_apiCall__["a" /* default */].patch({\n url: guestListMembershipRequestsScope(),\n data: { items: items }\n });\n};\n\n// POST /api/v1/guest_list_membership_requests\nvar createGuestListMembershipRequest = function createGuestListMembershipRequest(listingId) {\n return __WEBPACK_IMPORTED_MODULE_0__libs_utils_api_apiCall__["a" /* default */].post({\n url: guestListMembershipRequestsScope(),\n data: { listingId: listingId }\n });\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/api/guestListMembershipRequests.js\n// module id = 619\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/api/guestListMembershipRequests.js?', + ); + + /***/ + }, + /* 620 */ + /* exports provided: patchListingDraft, getListingDraftPreview */ + /* exports used: getListingDraftPreview */ + /*!*********************************!*\ + !*** ./app/api/listingDraft.js ***! + \*********************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__libs_utils_api_apiCall__ = __webpack_require__(/*! ../libs/utils/api/apiCall */ 62);\n/* unused harmony export patchListingDraft */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getListingDraftPreview; });\n\n\n// --- PATCH\nvar babelPluginFlowReactPropTypes_proptype_ContextualListingDisplayMode = __webpack_require__(/*! ../types */ 4).babelPluginFlowReactPropTypes_proptype_ContextualListingDisplayMode || __webpack_require__(/*! react */ 1).PropTypes.any;\n\nvar babelPluginFlowReactPropTypes_proptype_ContextualListing = __webpack_require__(/*! ../types */ 4).babelPluginFlowReactPropTypes_proptype_ContextualListing || __webpack_require__(/*! react */ 1).PropTypes.any;\n\nvar babelPluginFlowReactPropTypes_proptype_Listing = __webpack_require__(/*! ../types */ 4).babelPluginFlowReactPropTypes_proptype_Listing || __webpack_require__(/*! react */ 1).PropTypes.any;\n\nvar listingDraftPath = function listingDraftPath(listingId) {\n return \'/draft/listings/\' + listingId;\n};\n\nvar patchListingDraft = function patchListingDraft(listingId, data) {\n return __WEBPACK_IMPORTED_MODULE_0__libs_utils_api_apiCall__["a" /* default */].patch({\n url: listingDraftPath(listingId),\n data: data\n });\n};\n\n// --- GET (preview)\nvar listingDraftPreviewPath = function listingDraftPreviewPath(listingId, displayMode) {\n return \'/draft/listings/\' + listingId + \'/preview?displayMode=\' + displayMode;\n};\n\nvar getListingDraftPreview = function getListingDraftPreview(listingId, displayMode) {\n return __WEBPACK_IMPORTED_MODULE_0__libs_utils_api_apiCall__["a" /* default */].get(listingDraftPreviewPath(listingId, displayMode));\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/api/listingDraft.js\n// module id = 620\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/api/listingDraft.js?', + ); + + /***/ + }, + /* 621 */ + /* exports provided: patchListingInvitationsJoin, patchListingInvitationsLeave */ + /* exports used: patchListingInvitationsJoin */ + /*!***************************************!*\ + !*** ./app/api/listingInvitations.js ***! + \***************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__libs_utils_api_apiCall__ = __webpack_require__(/*! ../libs/utils/api/apiCall */ 62);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return patchListingInvitationsJoin; });\n/* unused harmony export patchListingInvitationsLeave */\n\n\nvar listingInvitationsScope = function listingInvitationsScope(path) {\n return '/listing_invitations' + (path || '');\n};\n\nvar patchListingInvitationsJoin = function patchListingInvitationsJoin(membershipId) {\n var url = listingInvitationsScope('/' + membershipId + '/join');\n return __WEBPACK_IMPORTED_MODULE_0__libs_utils_api_apiCall__[\"a\" /* default */].patch(url);\n};\n\nvar patchListingInvitationsLeave = function patchListingInvitationsLeave(membershipId) {\n var url = listingInvitationsScope('/' + membershipId + '/leave');\n return __WEBPACK_IMPORTED_MODULE_0__libs_utils_api_apiCall__[\"a\" /* default */].patch(url);\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/api/listingInvitations.js\n// module id = 621\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/api/listingInvitations.js?", + ); + + /***/ + }, + /* 622 */ + /* exports provided: default */ + /* exports used: default */ + /*!************************************************!*\ + !*** ./app/bundles/blv-redux/routes/index.jsx ***! + \************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_router__ = __webpack_require__(/*! react-router */ 82);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\n\n\n\nvar ListingsIndexContainer = function ListingsIndexContainer() {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n null,\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'h1',\n null,\n 'BLV REDUX REFACTORING'\n )\n );\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function (props, railsContext) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1_react_router__[\"f\" /* Route */], {\n path: '/s(*)',\n component: function component(componentProps) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(ListingsIndexContainer, _extends({}, props, componentProps, {\n tablet: railsContext.tablet,\n mobile: railsContext.mobile\n }));\n }\n });\n});\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/blv-redux/routes/index.jsx\n// module id = 622\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/blv-redux/routes/index.jsx?", + ); + + /***/ + }, + /* 623 */ + /* unknown exports provided */ + /* all exports used */ + /*!****************************************************!*\ + !*** ./app/bundles/favorites-index/types/state.js ***! + \****************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "Object.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_immutable__ = __webpack_require__(/*! immutable */ 26);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_immutable___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_immutable__);\n\n\nif (typeof exports !== 'undefined') Object.defineProperty(exports, 'babelPluginFlowReactPropTypes_proptype_State', {\n value: __webpack_require__(/*! react */ 1).PropTypes.shape({\n listingsStore: __webpack_require__(/*! prop-types */ 0).any.isRequired,\n favoritesPageStore: __webpack_require__(/*! prop-types */ 0).any.isRequired\n })\n});\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/favorites-index/types/state.js\n// module id = 623\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/favorites-index/types/state.js?", + ); + + /***/ + }, + /* 624 */ + /* exports provided: fetchPendingMembershipRequestsRequested, fetchPendingMembershipRequestsSucceeded, fetchPendingMembershipRequestsFailed, updateMembershipRequestsRequested, updateMembershipRequestsSucceeded, updateMembershipRequestsFailed, updateMembershipRequestsClear, changeMembershipRequestsSort, selectMembershipRequest, deselectMembershipRequest, selectAllMembershipRequests, deselectAllMembershipRequests */ + /* exports used: updateMembershipRequestsSucceeded */ + /*!******************************************************************************!*\ + !*** ./app/bundles/guest-lists/constants/membershipRequestsPageConstants.js ***! + \******************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__libs_utils_redux__ = __webpack_require__(/*! ../../../libs/utils/redux */ 108);\n/* unused harmony export fetchPendingMembershipRequestsRequested */\n/* unused harmony export fetchPendingMembershipRequestsSucceeded */\n/* unused harmony export fetchPendingMembershipRequestsFailed */\n/* unused harmony export updateMembershipRequestsRequested */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return updateMembershipRequestsSucceeded; });\n/* unused harmony export updateMembershipRequestsFailed */\n/* unused harmony export updateMembershipRequestsClear */\n/* unused harmony export changeMembershipRequestsSort */\n/* unused harmony export selectMembershipRequest */\n/* unused harmony export deselectMembershipRequest */\n/* unused harmony export selectAllMembershipRequests */\n/* unused harmony export deselectAllMembershipRequests */\n\n\nvar bx = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__libs_utils_redux__[\"e\" /* buildActionType */])('membershipRequestsPage');\n\nvar fetchPendingMembershipRequestsRequested = bx('fetchPendingMembershipRequestsRequested');\nvar fetchPendingMembershipRequestsSucceeded = bx('fetchPendingMembershipRequestsSucceeded');\nvar fetchPendingMembershipRequestsFailed = bx('fetchPendingMembershipRequestsFailed');\nvar updateMembershipRequestsRequested = bx('updateMembershipRequestsRequested');\nvar updateMembershipRequestsSucceeded = bx('updateMembershipRequestsSucceeded');\nvar updateMembershipRequestsFailed = bx('updateMembershipRequestsFailed');\nvar updateMembershipRequestsClear = bx('updateMembershipRequestsClear');\nvar changeMembershipRequestsSort = bx('changeMembershipRequestsSort');\nvar selectMembershipRequest = bx('selectMembershipRequest');\nvar deselectMembershipRequest = bx('deselectMembershipRequest');\nvar selectAllMembershipRequests = bx('selectAllMembershipRequests');\nvar deselectAllMembershipRequests = bx('deselectAllMembershipRequests');\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/guest-lists/constants/membershipRequestsPageConstants.js\n// module id = 624\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/guest-lists/constants/membershipRequestsPageConstants.js?", + ); + + /***/ + }, + /* 625 */ + /* exports provided: default */ + /* exports used: default */ + /*!***************************************************************!*\ + !*** ./app/bundles/layout-navbar/components/Navbar/index.jsx ***! + \***************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_bootstrap__ = __webpack_require__(/*! react-bootstrap */ 31);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__libs_components_icons_IconSearch__ = __webpack_require__(/*! ../../../../libs/components/icons/IconSearch */ 871);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__libs_components_icons_IconLogoFull__ = __webpack_require__(/*! ../../../../libs/components/icons/IconLogoFull */ 866);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__RightSideSignedIn__ = __webpack_require__(/*! ../RightSideSignedIn */ 631);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__RightSideSignedOut__ = __webpack_require__(/*! ../RightSideSignedOut */ 632);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__Navbar_scss__ = __webpack_require__(/*! ./Navbar.scss */ 966);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__Navbar_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7__Navbar_scss__);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _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\n\n\n\n\n\n\nvar babelPluginFlowReactPropTypes_proptype_User = __webpack_require__(/*! ../../types */ 56).babelPluginFlowReactPropTypes_proptype_User || __webpack_require__(/*! react */ 1).PropTypes.any;\n\nvar babelPluginFlowReactPropTypes_proptype_SignedOutPaths = __webpack_require__(/*! ../../types */ 56).babelPluginFlowReactPropTypes_proptype_SignedOutPaths || __webpack_require__(/*! react */ 1).PropTypes.any;\n\nvar babelPluginFlowReactPropTypes_proptype_SignedInPaths = __webpack_require__(/*! ../../types */ 56).babelPluginFlowReactPropTypes_proptype_SignedInPaths || __webpack_require__(/*! react */ 1).PropTypes.any;\n\nvar babelPluginFlowReactPropTypes_proptype_PublicPaths = __webpack_require__(/*! ../../types */ 56).babelPluginFlowReactPropTypes_proptype_PublicPaths || __webpack_require__(/*! react */ 1).PropTypes.any;\n\n\n\n\n\nvar Navbar = function Navbar(props) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_1_react_bootstrap__["i" /* Navbar */],\n { className: __WEBPACK_IMPORTED_MODULE_2_classnames___default()(__WEBPACK_IMPORTED_MODULE_7__Navbar_scss___default.a.navbar, _defineProperty({}, __WEBPACK_IMPORTED_MODULE_7__Navbar_scss___default.a.fixed, props.fixed)), inverse: true, fluid: true },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_1_react_bootstrap__["i" /* Navbar */].Header,\n null,\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_1_react_bootstrap__["i" /* Navbar */].Brand,\n null,\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n \'a\',\n { href: \'/\', alt: \'Friends and Guests Home\' },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_4__libs_components_icons_IconLogoFull__["a" /* default */], {\n className: __WEBPACK_IMPORTED_MODULE_7__Navbar_scss___default.a.iconLogoFull,\n logoClassName: __WEBPACK_IMPORTED_MODULE_7__Navbar_scss___default.a.logoClassName,\n textClassName: __WEBPACK_IMPORTED_MODULE_7__Navbar_scss___default.a.textClassName\n })\n )\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1_react_bootstrap__["i" /* Navbar */].Toggle, null)\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_1_react_bootstrap__["i" /* Navbar */].Collapse,\n null,\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_1_react_bootstrap__["j" /* Nav */],\n null,\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_1_react_bootstrap__["k" /* NavItem */],\n { href: props.publicPaths.listingsIndexPath },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n \'div\',\n { className: __WEBPACK_IMPORTED_MODULE_7__Navbar_scss___default.a.iconSearchWrapper },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3__libs_components_icons_IconSearch__["a" /* default */], { id: \'searchIcon\', className: __WEBPACK_IMPORTED_MODULE_2_classnames___default()(__WEBPACK_IMPORTED_MODULE_7__Navbar_scss___default.a.icon) })\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n \'div\',\n { className: __WEBPACK_IMPORTED_MODULE_7__Navbar_scss___default.a.fieldSearch },\n \'Find a Place to Stay\'\n )\n )\n ),\n props.signedInPaths ? __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5__RightSideSignedIn__["a" /* default */], _extends({}, props.signedInPaths, props.publicPaths, props.user)) : __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_6__RightSideSignedOut__["a" /* default */], _extends({}, props.signedOutPaths, props.publicPaths))\n )\n );\n};\n\n/* harmony default export */ __webpack_exports__["a"] = (Navbar);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/layout-navbar/components/Navbar/index.jsx\n// module id = 625\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/layout-navbar/components/Navbar/index.jsx?', + ); + + /***/ + }, + /* 626 */ + /* exports provided: default */ + /* exports used: default */ + /*!********************************************************************************!*\ + !*** ./app/bundles/layout-navbar/components/RightSideSignedIn/BecomeAHost.jsx ***! + \********************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__libs_components_icons_IconHost__ = __webpack_require__(/*! ../../../../libs/components/icons/IconHost */ 188);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__NavItem__ = __webpack_require__(/*! ../NavItem */ 180);\n\n\n\n\n\n\nvar BecomeAHost = function BecomeAHost(props) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2__NavItem__["a" /* default */], {\n href: props.hostsPath,\n \'data-test-id\': \'navbar-become-a-host-item\',\n name: \'Become a Host\',\n Icon: __WEBPACK_IMPORTED_MODULE_1__libs_components_icons_IconHost__["a" /* default */],\n hideIconSm: true,\n hideIconMd: true,\n addMarginRightToIcon: true\n });\n};\n\nBecomeAHost.propTypes = {\n hostsPath: __webpack_require__(/*! prop-types */ 0).string.isRequired\n};\n/* harmony default export */ __webpack_exports__["a"] = (BecomeAHost);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/layout-navbar/components/RightSideSignedIn/BecomeAHost.jsx\n// module id = 626\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/layout-navbar/components/RightSideSignedIn/BecomeAHost.jsx?', + ); + + /***/ + }, + /* 627 */ + /* exports provided: default */ + /* exports used: default */ + /*!******************************************************************************!*\ + !*** ./app/bundles/layout-navbar/components/RightSideSignedIn/GuestMenu.jsx ***! + \******************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__libs_components_icons_IconGuest__ = __webpack_require__(/*! ../../../../libs/components/icons/IconGuest */ 862);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Dropdown__ = __webpack_require__(/*! ../Dropdown */ 132);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__DropdownTitle__ = __webpack_require__(/*! ../DropdownTitle */ 134);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__DropdownItem__ = __webpack_require__(/*! ../DropdownItem */ 133);\n\n\n\n\n\n\n\n\nvar GuestMenu = function GuestMenu(props) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_2__Dropdown__["a" /* default */],\n {\n id: \'guestMenu\',\n title: __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3__DropdownTitle__["a" /* default */], {\n notificationsCount: props.guestNotificationsCount,\n name: \'Guest\',\n Icon: __WEBPACK_IMPORTED_MODULE_1__libs_components_icons_IconGuest__["a" /* default */],\n hideIconSm: true,\n hideIconMd: true,\n addMarginRightToIcon: true\n })\n },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_4__DropdownItem__["a" /* default */], { href: props.joinedListingInvitationsPath, name: \'Memberships\' }),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_4__DropdownItem__["a" /* default */], {\n href: props.listingInvitationsPath,\n name: \'Invitations\',\n notificationsCount: props.invitationsCount\n }),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_4__DropdownItem__["a" /* default */], { href: props.favoritesPath, name: \'Favorites\' })\n );\n};\n\nGuestMenu.propTypes = {\n joinedListingInvitationsPath: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n listingInvitationsPath: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n favoritesPath: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n invitationsCount: __webpack_require__(/*! prop-types */ 0).number.isRequired,\n guestNotificationsCount: __webpack_require__(/*! prop-types */ 0).number.isRequired\n};\n/* harmony default export */ __webpack_exports__["a"] = (GuestMenu);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/layout-navbar/components/RightSideSignedIn/GuestMenu.jsx\n// module id = 627\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/layout-navbar/components/RightSideSignedIn/GuestMenu.jsx?', + ); + + /***/ + }, + /* 628 */ + /* exports provided: default */ + /* exports used: default */ + /*!*****************************************************************************!*\ + !*** ./app/bundles/layout-navbar/components/RightSideSignedIn/HostMenu.jsx ***! + \*****************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__libs_components_icons_IconHost__ = __webpack_require__(/*! ../../../../libs/components/icons/IconHost */ 188);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Dropdown__ = __webpack_require__(/*! ../Dropdown */ 132);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__DropdownTitle__ = __webpack_require__(/*! ../DropdownTitle */ 134);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__DropdownItem__ = __webpack_require__(/*! ../DropdownItem */ 133);\n\n\n\n\n\n\n\n\nvar HostMenu = function HostMenu(props) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_2__Dropdown__["a" /* default */],\n {\n id: \'hostMenu\',\n title: __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3__DropdownTitle__["a" /* default */], {\n dataTestId: \'navbar-host-item\',\n notificationsCount: props.guestListMembershipRequestsCount,\n name: \'Host\',\n Icon: __WEBPACK_IMPORTED_MODULE_1__libs_components_icons_IconHost__["a" /* default */],\n addMarginRightToIcon: true,\n hideIconSm: true,\n hideIconMd: true\n })\n },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_4__DropdownItem__["a" /* default */], { href: props.managePropertiesPath, name: \'Listings\' }),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_4__DropdownItem__["a" /* default */], {\n href: props.manageGuestListsPath,\n name: \'Guest Lists\',\n notificationsCount: props.guestListMembershipRequestsCount\n }),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_4__DropdownItem__["a" /* default */], { href: props.newListingPath, name: \'Add Listing\' })\n );\n};\n\nHostMenu.propTypes = {\n guestListMembershipRequestsCount: __webpack_require__(/*! prop-types */ 0).number.isRequired,\n managePropertiesPath: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n manageGuestListsPath: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n newListingPath: __webpack_require__(/*! prop-types */ 0).string.isRequired\n};\n/* harmony default export */ __webpack_exports__["a"] = (HostMenu);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/layout-navbar/components/RightSideSignedIn/HostMenu.jsx\n// module id = 628\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/layout-navbar/components/RightSideSignedIn/HostMenu.jsx?', + ); + + /***/ + }, + /* 629 */ + /* exports provided: default */ + /* exports used: default */ + /*!*****************************************************************************!*\ + !*** ./app/bundles/layout-navbar/components/RightSideSignedIn/Messages.jsx ***! + \*****************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__libs_components_icons_IconMessages__ = __webpack_require__(/*! ../../../../libs/components/icons/IconMessages */ 868);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__NavItem__ = __webpack_require__(/*! ../NavItem */ 180);\n\n\n\n\n\n\nvar Messages = function Messages(props) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2__NavItem__["a" /* default */], {\n href: props.messagesPath,\n notificationsCount: props.conversationsCount,\n Icon: __WEBPACK_IMPORTED_MODULE_1__libs_components_icons_IconMessages__["a" /* default */],\n name: \'Messages\',\n hideNameSm: true,\n hideNameMd: true,\n hideNameLg: true,\n addMarginLeftToName: true\n });\n};\n\nMessages.propTypes = {\n messagesPath: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n conversationsCount: __webpack_require__(/*! prop-types */ 0).number.isRequired\n};\n/* harmony default export */ __webpack_exports__["a"] = (Messages);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/layout-navbar/components/RightSideSignedIn/Messages.jsx\n// module id = 629\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/layout-navbar/components/RightSideSignedIn/Messages.jsx?', + ); + + /***/ + }, + /* 630 */ + /* exports provided: default */ + /* exports used: default */ + /*!*****************************************************************************!*\ + !*** ./app/bundles/layout-navbar/components/RightSideSignedIn/UserMenu.jsx ***! + \*****************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__libs_components__ = __webpack_require__(/*! ../../../../libs/components */ 11);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Dropdown__ = __webpack_require__(/*! ../Dropdown */ 132);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__DropdownTitle__ = __webpack_require__(/*! ../DropdownTitle */ 134);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__DropdownItem__ = __webpack_require__(/*! ../DropdownItem */ 133);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__UserMenu_scss__ = __webpack_require__(/*! ./UserMenu.scss */ 967);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__UserMenu_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6__UserMenu_scss__);\n\n\n\n\n\n\n\n\n\n\nvar AVATAR_SIZE = 21;\n\nvar UserMenu = function UserMenu(props) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_3__Dropdown__[\"a\" /* default */],\n {\n id: 'userMenu',\n title: __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_4__DropdownTitle__[\"a\" /* default */],\n null,\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2__libs_components__[\"g\" /* Image */], {\n alt: props.firstName + '\\'s avatar\\'',\n url: props.avatarUrl,\n width: AVATAR_SIZE,\n height: AVATAR_SIZE,\n crop: 'fill',\n radius: 'max',\n gravity: 'faces',\n className: __WEBPACK_IMPORTED_MODULE_6__UserMenu_scss___default.a.userAvatar\n }),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'span',\n { className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()('hidden-lg', 'hidden-md', 'hidden-sm', __WEBPACK_IMPORTED_MODULE_6__UserMenu_scss___default.a.name) },\n props.firstName\n )\n )\n },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5__DropdownItem__[\"a\" /* default */], { href: props.profilePath, name: 'Profile' }),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5__DropdownItem__[\"a\" /* default */], { href: props.accountPath, name: 'Account Settings' }),\n props.adminPath && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5__DropdownItem__[\"a\" /* default */], { href: props.adminPath, name: 'Admin' }),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5__DropdownItem__[\"a\" /* default */], { href: props.signOutPath, name: 'Sign Out' })\n );\n};\n\nUserMenu.propTypes = {\n avatarUrl: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n firstName: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n profilePath: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n accountPath: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n signOutPath: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n adminPath: __webpack_require__(/*! prop-types */ 0).string\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (UserMenu);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/layout-navbar/components/RightSideSignedIn/UserMenu.jsx\n// module id = 630\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/layout-navbar/components/RightSideSignedIn/UserMenu.jsx?", + ); + + /***/ + }, + /* 631 */ + /* exports provided: default */ + /* exports used: default */ + /*!**************************************************************************!*\ + !*** ./app/bundles/layout-navbar/components/RightSideSignedIn/index.jsx ***! + \**************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_bootstrap__ = __webpack_require__(/*! react-bootstrap */ 31);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__HelpDropdown__ = __webpack_require__(/*! ../HelpDropdown */ 280);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__UserMenu__ = __webpack_require__(/*! ./UserMenu */ 630);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__GuestMenu__ = __webpack_require__(/*! ./GuestMenu */ 627);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__HostMenu__ = __webpack_require__(/*! ./HostMenu */ 628);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__BecomeAHost__ = __webpack_require__(/*! ./BecomeAHost */ 626);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__Messages__ = __webpack_require__(/*! ./Messages */ 629);\n\n\n\nvar babelPluginFlowReactPropTypes_proptype_User = __webpack_require__(/*! ../../types */ 56).babelPluginFlowReactPropTypes_proptype_User || __webpack_require__(/*! react */ 1).PropTypes.any;\n\nvar babelPluginFlowReactPropTypes_proptype_SignedInPaths = __webpack_require__(/*! ../../types */ 56).babelPluginFlowReactPropTypes_proptype_SignedInPaths || __webpack_require__(/*! react */ 1).PropTypes.any;\n\nvar babelPluginFlowReactPropTypes_proptype_PublicPaths = __webpack_require__(/*! ../../types */ 56).babelPluginFlowReactPropTypes_proptype_PublicPaths || __webpack_require__(/*! react */ 1).PropTypes.any;\n\n\n\n\n\n\n\n\nvar SignedIn = function SignedIn(props) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_1_react_bootstrap__["j" /* Nav */],\n { pullRight: true },\n props.listingsCount > 0 ? __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5__HostMenu__["a" /* default */], {\n guestListMembershipRequestsCount: props.guestListMembershipRequestsCount,\n managePropertiesPath: props.managePropertiesPath,\n manageGuestListsPath: props.manageGuestListsPath,\n newListingPath: props.newListingPath\n }) : __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_6__BecomeAHost__["a" /* default */], { hostsPath: props.hostsPath }),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_4__GuestMenu__["a" /* default */], {\n joinedListingInvitationsPath: props.joinedListingInvitationsPath,\n listingInvitationsPath: props.listingInvitationsPath,\n favoritesPath: props.favoritesPath,\n invitationsCount: props.invitationsCount,\n guestNotificationsCount: props.guestNotificationsCount\n }),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2__HelpDropdown__["a" /* default */], {\n aboutPath: props.aboutPath,\n faqPath: props.faqPath,\n hostsPath: props.hostsPath,\n communityUrl: props.communityUrl\n }),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7__Messages__["a" /* default */], { messagesPath: props.messagesPath, conversationsCount: props.conversationsCount }),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3__UserMenu__["a" /* default */], {\n avatarUrl: props.avatarUrl,\n firstName: props.firstName,\n profilePath: props.profilePath,\n accountPath: props.accountPath,\n signOutPath: props.signOutPath,\n adminPath: props.adminPath\n })\n );\n};\n\n/* harmony default export */ __webpack_exports__["a"] = (SignedIn);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/layout-navbar/components/RightSideSignedIn/index.jsx\n// module id = 631\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/layout-navbar/components/RightSideSignedIn/index.jsx?', + ); + + /***/ + }, + /* 632 */ + /* exports provided: default */ + /* exports used: default */ + /*!***************************************************************************!*\ + !*** ./app/bundles/layout-navbar/components/RightSideSignedOut/index.jsx ***! + \***************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_bootstrap__ = __webpack_require__(/*! react-bootstrap */ 31);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__libs_components_icons_IconHost__ = __webpack_require__(/*! ../../../../libs/components/icons/IconHost */ 188);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__NavItem__ = __webpack_require__(/*! ../NavItem */ 180);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__HelpDropdown__ = __webpack_require__(/*! ../HelpDropdown */ 280);\n\n\n\n\n\nvar babelPluginFlowReactPropTypes_proptype_PublicPaths = __webpack_require__(/*! ../../types */ 56).babelPluginFlowReactPropTypes_proptype_PublicPaths || __webpack_require__(/*! react */ 1).PropTypes.any;\n\nvar babelPluginFlowReactPropTypes_proptype_SignedOutPaths = __webpack_require__(/*! ../../types */ 56).babelPluginFlowReactPropTypes_proptype_SignedOutPaths || __webpack_require__(/*! react */ 1).PropTypes.any;\n\n\n\n\nvar SignedOut = function SignedOut(props) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_1_react_bootstrap__["j" /* Nav */],\n { pullRight: true },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3__NavItem__["a" /* default */], {\n href: props.hostsPath,\n Icon: __WEBPACK_IMPORTED_MODULE_2__libs_components_icons_IconHost__["a" /* default */],\n name: \'Become a Host\',\n addMarginRightToIcon: true,\n hideIconMd: true,\n hideIconSm: true\n }),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_4__HelpDropdown__["a" /* default */], {\n aboutPath: props.aboutPath,\n faqPath: props.faqPath,\n hostsPath: props.hostsPath,\n communityUrl: props.communityUrl\n }),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3__NavItem__["a" /* default */], { href: props.signUpPath, name: \'Sign Up\' }),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3__NavItem__["a" /* default */], { href: props.signInPath, name: \'Log In\' })\n );\n};\n\n/* harmony default export */ __webpack_exports__["a"] = (SignedOut);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/layout-navbar/components/RightSideSignedOut/index.jsx\n// module id = 632\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/layout-navbar/components/RightSideSignedOut/index.jsx?', + ); + + /***/ + }, + /* 633 */ + /* exports provided: default */ + /* exports used: default */ + /*!******************************************************************!*\ + !*** ./app/bundles/layout-navbar/containers/NavbarContainer.jsx ***! + \******************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_redux__ = __webpack_require__(/*! react-redux */ 81);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__components_Navbar__ = __webpack_require__(/*! ../components/Navbar */ 625);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__selectors_navbarSelector__ = __webpack_require__(/*! ../selectors/navbarSelector */ 635);\n\n\n\n\n\n/* harmony default export */ __webpack_exports__["a"] = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0_react_redux__["a" /* connect */])(__WEBPACK_IMPORTED_MODULE_2__selectors_navbarSelector__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__components_Navbar__["a" /* default */]));\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/layout-navbar/containers/NavbarContainer.jsx\n// module id = 633\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/layout-navbar/containers/NavbarContainer.jsx?', + ); + + /***/ + }, + /* 634 */ + /* exports provided: $$navbarInitialState, default */ + /* exports used: default, $$navbarInitialState */ + /*!*************************************************************!*\ + !*** ./app/bundles/layout-navbar/reducers/navbarReducer.js ***! + \*************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_immutable__ = __webpack_require__(/*! immutable */ 26);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_immutable___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_immutable__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__libs_utils_redux_reducers_common__ = __webpack_require__(/*! ../../../libs/utils/redux/reducers/common */ 142);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__guest_lists_constants_membershipRequestsPageConstants__ = __webpack_require__(/*! ../../guest-lists/constants/membershipRequestsPageConstants */ 624);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return $$navbarInitialState; });\nfunction _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\n\n\n\n\n// initial state\nvar $$navbarInitialState = new __WEBPACK_IMPORTED_MODULE_0_immutable__["Map"]();\n\n// helpers\nvar decrementGuestListMembershipRequestCount = function decrementGuestListMembershipRequestCount(state, action) {\n return state.updateIn([\'user\', \'guestListMembershipRequestsCount\'], function (count) {\n return count - action.membershipRequestIds.length;\n });\n};\n\n// handlers\nvar handlers = _defineProperty({}, __WEBPACK_IMPORTED_MODULE_2__guest_lists_constants_membershipRequestsPageConstants__["a" /* updateMembershipRequestsSucceeded */], decrementGuestListMembershipRequestCount);\n\n// reducer\n/* harmony default export */ __webpack_exports__["a"] = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__libs_utils_redux_reducers_common__["a" /* createReducer */])($$navbarInitialState, handlers));\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/layout-navbar/reducers/navbarReducer.js\n// module id = 634\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/layout-navbar/reducers/navbarReducer.js?', + ); + + /***/ + }, + /* 635 */ + /* exports provided: default */ + /* exports used: default */ + /*!***************************************************************!*\ + !*** ./app/bundles/layout-navbar/selectors/navbarSelector.js ***! + \***************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_immutable__ = __webpack_require__(/*! immutable */ 26);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_immutable___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_immutable__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_reselect__ = __webpack_require__(/*! reselect */ 103);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_reselect___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_reselect__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__libs_utils_selectors__ = __webpack_require__(/*! ../../../libs/utils/selectors */ 892);\n\n\n\n\n\nvar MANAGE_GUEST_LIST_PATH = '/manage/guest_lists';\n\nvar navbarStoreSelector = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__libs_utils_selectors__[\"a\" /* createStoreSelector */])('$$navbarStore');\nvar listingsStoreSelector = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__libs_utils_selectors__[\"a\" /* createStoreSelector */])(['section', 'entities', 'listings']);\n\nvar setManageGuestListsPath = function setManageGuestListsPath(listingsStore, $$signedInPaths) {\n var hasListings = listingsStore.get('entities').count() > 0;\n var hasNoGuestListsPath = !$$signedInPaths.has('manageGuestListsPath');\n var hostIsAddingFirstListing = hasListings && hasNoGuestListsPath;\n\n if (hostIsAddingFirstListing) {\n return $$signedInPaths.set('manageGuestListsPath', MANAGE_GUEST_LIST_PATH);\n }\n\n return $$signedInPaths;\n};\n\nfunction selectNavbarData($$navbarStore, listingsStore) {\n if (!$$navbarStore.has('user')) return $$navbarStore.toJS();\n\n var guestNotificationsCount = $$navbarStore.getIn(['user', 'invitationsCount']);\n\n if (!listingsStore) {\n return $$navbarStore.update('user', function ($$user) {\n return $$user.set('guestNotificationsCount', guestNotificationsCount);\n }).toJS();\n }\n\n /*\n if the navbar should listen to the listings store,\n just add \"shouldUpdateNavbar: true\" to the reducer state\n */\n if (!listingsStore.get('shouldUpdateNavbar')) return $$navbarStore.toJS();\n\n var listingsCount = listingsStore.get('entities').count();\n\n return $$navbarStore.update('user', function ($$user) {\n return $$user.merge({ guestNotificationsCount: guestNotificationsCount, listingsCount: listingsCount });\n }).update('signedInPaths', function ($$signedInPaths) {\n return (\n // $FlowFixMe\n setManageGuestListsPath(listingsStore, $$signedInPaths)\n );\n }).toJS();\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_reselect__[\"createSelector\"])(navbarStoreSelector, listingsStoreSelector, selectNavbarData));\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/layout-navbar/selectors/navbarSelector.js\n// module id = 635\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/layout-navbar/selectors/navbarSelector.js?", + ); + + /***/ + }, + /* 636 */ + /* exports provided: reducers, default */ + /* exports used: default, reducers */ + /*!****************************************************************!*\ + !*** ./app/bundles/layout-navbar/store/composeInitialState.js ***! + \****************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__reducers_navbarReducer__ = __webpack_require__(/*! ../reducers/navbarReducer */ 634);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return reducers; });\n/* harmony export (immutable) */ __webpack_exports__["a"] = composeInitialState;\n\n\nvar reducers = {\n $$navbarStore: __WEBPACK_IMPORTED_MODULE_0__reducers_navbarReducer__["a" /* default */]\n};\n\nfunction composeInitialState(props) {\n return {\n $$navbarStore: __WEBPACK_IMPORTED_MODULE_0__reducers_navbarReducer__["b" /* $$navbarInitialState */].merge(props.navbar)\n };\n}\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/layout-navbar/store/composeInitialState.js\n// module id = 636\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/layout-navbar/store/composeInitialState.js?', + ); + + /***/ + }, + /* 637 */ + /* exports provided: default */ + /* exports used: default */ + /*!****************************************************************!*\ + !*** ./app/bundles/layout-navbar/store/configureStoreParts.js ***! + \****************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_fp__ = __webpack_require__(/*! lodash/fp */ 14);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_fp___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_lodash_fp__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__composeInitialState__ = __webpack_require__(/*! ./composeInitialState */ 636);\n\n\nvar babelPluginFlowReactPropTypes_proptype_StorePartsCreator = __webpack_require__(/*! ../../../types */ 4).babelPluginFlowReactPropTypes_proptype_StorePartsCreator || __webpack_require__(/*! react */ 1).PropTypes.any;\n\n\n\nvar storePartsCreator = __WEBPACK_IMPORTED_MODULE_0_lodash_fp___default.a.flow(__WEBPACK_IMPORTED_MODULE_1__composeInitialState__["a" /* default */], __WEBPACK_IMPORTED_MODULE_0_lodash_fp___default.a.set(\'initialState\', __WEBPACK_IMPORTED_MODULE_0_lodash_fp___default.a, { reducers: __WEBPACK_IMPORTED_MODULE_1__composeInitialState__["b" /* reducers */] }));\n\n/* harmony default export */ __webpack_exports__["a"] = (storePartsCreator);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/layout-navbar/store/configureStoreParts.js\n// module id = 637\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/layout-navbar/store/configureStoreParts.js?', + ); + + /***/ + }, + /* 638 */ + /* exports provided: default */ + /* exports used: default */ + /*!********************************************************************!*\ + !*** ./app/bundles/listings-index/actions/ListingSearchActions.js ***! + \********************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash__ = __webpack_require__(/*! lodash */ 19);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_lodash__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__libs_utils_api_apiCall__ = __webpack_require__(/*! ../../../libs/utils/api/apiCall */ 62);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__libs_utils_api__ = __webpack_require__(/*! ../../../libs/utils/api */ 106);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\n\n\n\n\n\nvar lastRequestId = 0;\n\nvar LISTING_API_PATH = \'/contextual_listings\';\n\nvar ListingSearchActions = function () {\n function ListingSearchActions(reactStore) {\n _classCallCheck(this, ListingSearchActions);\n\n this.reactStore = reactStore;\n\n __WEBPACK_IMPORTED_MODULE_0_lodash___default.a.bindAll(this, [\'search\']);\n }\n\n // call the search api\n\n\n _createClass(ListingSearchActions, [{\n key: \'search\',\n value: function search(_ref) {\n var _this = this;\n\n var bounds = _ref.bounds,\n location = _ref.location,\n page = _ref.page,\n pageSize = _ref.pageSize,\n filters = _ref.filters;\n\n // when we have concurrent search request only return results for the last one\n var requestId = ++lastRequestId;\n\n // flatten everything\n var searchParams = Object.assign(__WEBPACK_IMPORTED_MODULE_0_lodash___default.a.cloneDeep(bounds), { page: page, pageSize: pageSize }, filters);\n\n var apiSearchUrl = __WEBPACK_IMPORTED_MODULE_2__libs_utils_api__["b" /* buildUrl */](LISTING_API_PATH, searchParams);\n\n return __WEBPACK_IMPORTED_MODULE_1__libs_utils_api_apiCall__["a" /* default */].get(apiSearchUrl).then(function (results) {\n if (requestId === lastRequestId) {\n // because the server always returns Maui\n var next = _extends({}, results);\n next.meta.location = location;\n next.meta.filters = filters || {};\n _this.reactStore.onSearch(next);\n }\n }).catch(function () {\n return _this.reactStore.onSearchFailed();\n });\n }\n }]);\n\n return ListingSearchActions;\n}();\n\n/* harmony default export */ __webpack_exports__["a"] = (ListingSearchActions);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-index/actions/ListingSearchActions.js\n// module id = 638\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-index/actions/ListingSearchActions.js?', + ); + + /***/ + }, + /* 639 */ + /* exports provided: default */ + /* exports used: default */ + /*!***************************************************************************************!*\ + !*** ./app/bundles/listings-index/components/ListingResultsMap/ListingResultsMap.jsx ***! + \***************************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_dom__ = __webpack_require__(/*! react-dom */ 16);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_dom___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react_dom__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_react_addons_pure_render_mixin__ = __webpack_require__(/*! react-addons-pure-render-mixin */ 117);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_react_addons_pure_render_mixin___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_react_addons_pure_render_mixin__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react_google_maps__ = __webpack_require__(/*! react-google-maps */ 261);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react_google_maps___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react_google_maps__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_lodash__ = __webpack_require__(/*! lodash */ 19);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_lodash___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_lodash__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__libs_utils_geo__ = __webpack_require__(/*! ../../../../libs/utils/geo */ 107);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__libs_propTypeShapes__ = __webpack_require__(/*! ../../../../libs/propTypeShapes */ 57);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__libs_hocs_withIsMountedProp__ = __webpack_require__(/*! ../../../../libs/hocs/withIsMountedProp */ 191);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__libs_utils_fng_listings__ = __webpack_require__(/*! ../../../../libs/utils/fng/listings */ 192);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__ListingResultsMapMarker_ListingResultsMapMarker__ = __webpack_require__(/*! ./ListingResultsMapMarker/ListingResultsMapMarker */ 640);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__ListingResultsMapOverlay_ListingResultsMapOverlay__ = __webpack_require__(/*! ./ListingResultsMapOverlay/ListingResultsMapOverlay */ 641);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__ListingResultsMapSearchControl_ListingResultsMapSearchControl__ = __webpack_require__(/*! ./ListingResultsMapSearchControl/ListingResultsMapSearchControl */ 642);\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar ListingResultsMap = function (_React$Component) {\n _inherits(ListingResultsMap, _React$Component);\n\n function ListingResultsMap(props, context) {\n _classCallCheck(this, ListingResultsMap);\n\n var _this = _possibleConstructorReturn(this, (ListingResultsMap.__proto__ || Object.getPrototypeOf(ListingResultsMap)).call(this, props, context));\n\n _this.shouldComponentUpdate = __WEBPACK_IMPORTED_MODULE_3_react_addons_pure_render_mixin___default.a.shouldComponentUpdate.bind(_this);\n\n __WEBPACK_IMPORTED_MODULE_5_lodash___default.a.bindAll(_this, ['onClickMarker', 'onClickMap', 'panMap', 'setKeepOverlayOpen', 'doSearch', 'renderMarker']);\n\n _this.state = {\n selectedMarkerKey: null\n };\n\n // will be set to true when component is full initialized\n _this.initialized = false;\n\n _this.googleMapRef = null;\n _this.googleMapOverlayRef = null;\n\n _this.keepOverlayOpen = true;\n\n // don't process handleBoundsChange events while we are fitting the bounds\n _this.handleBoundsChangedDisabled = false;\n\n // the bounds of the map as per the last user interaction with the map\n _this.lastUserInteractionBounds = null;\n\n // the React search control for toggling auto search\n _this.searchControl = null;\n return _this;\n }\n\n _createClass(ListingResultsMap, [{\n key: 'componentWillReceiveProps',\n value: function componentWillReceiveProps(nextProps) {\n var bounds = nextProps.bounds,\n timeOfSearch = nextProps.timeOfSearch;\n\n // clear redo search once new search results come in\n\n if (!__WEBPACK_IMPORTED_MODULE_5_lodash___default.a.isEqual(this.props.timeOfSearch, timeOfSearch)) {\n this.clearRedoSearch();\n }\n\n // don't update the map if the bounds change was caused by user interactions with the map\n if (__WEBPACK_IMPORTED_MODULE_5_lodash___default.a.isEqual(this.props.bounds, bounds) || __WEBPACK_IMPORTED_MODULE_5_lodash___default.a.isEqual(this.lastUserInteractionBounds, bounds)) {\n return;\n }\n\n this.fitBounds(nextProps);\n }\n }, {\n key: 'setKeepOverlayOpen',\n value: function setKeepOverlayOpen(keepOverlayOpen) {\n this.keepOverlayOpen = keepOverlayOpen;\n }\n\n // pan the map by deltaX and deltaY pixels\n\n }, {\n key: 'panMap',\n value: function panMap(deltaX, deltaY) {\n var googleMapRef = this.googleMapRef,\n googleMapOverlayRef = this.googleMapOverlayRef;\n\n var projection = googleMapOverlayRef.getProjection();\n var point = googleMapRef.getCenter();\n var pixelpoint = projection.fromLatLngToDivPixel(point);\n pixelpoint.x += deltaX;\n pixelpoint.y += deltaY;\n point = projection.fromDivPixelToLatLng(pixelpoint);\n googleMapRef.panTo(point);\n googleMapRef.forceUpdate();\n }\n }, {\n key: 'getCenter',\n value: function getCenter(bounds) {\n var neLat = bounds.neLat,\n neLng = bounds.neLng,\n swLat = bounds.swLat,\n swLng = bounds.swLng;\n\n return { lat: (neLat + swLat) / 2, lng: (neLng + swLng) / 2 };\n }\n\n // fit the map so that all markers are shown\n\n }, {\n key: 'fitBounds',\n value: function fitBounds(_ref) {\n var bounds = _ref.bounds;\n\n this.handleBoundsChangedDisabled = true;\n this.lastUserInteractionBounds = bounds;\n\n var swLat = bounds.swLat,\n swLng = bounds.swLng,\n neLat = bounds.neLat,\n neLng = bounds.neLng;\n\n\n this.googleMapRef.fitBounds(new google.maps.LatLngBounds(new google.maps.LatLng(swLat, swLng), new google.maps.LatLng(neLat, neLng)));\n\n this.handleBoundsChangedDisabled = false;\n }\n\n // the google map is the source of truth for the map bounds\n\n }, {\n key: 'getMapBounds',\n value: function getMapBounds() {\n var mapBounds = this.googleMapRef.getBounds();\n\n if (this.initialized && mapBounds) {\n var bounds = JSON.parse(JSON.stringify(mapBounds));\n var searchBounds = {\n neLat: bounds.north,\n neLng: bounds.east,\n swLat: bounds.south,\n swLng: bounds.west\n };\n\n return searchBounds;\n }\n\n return null;\n }\n }, {\n key: 'doSearch',\n value: function doSearch() {\n var bounds = this.getMapBounds();\n if (bounds !== null && bounds !== undefined) {\n this.lastUserInteractionBounds = bounds;\n var zoom = this.googleMapRef.getZoom();\n this.props.onBoundsChanged({ bounds: bounds, zoom: zoom });\n }\n }\n }, {\n key: 'clearRedoSearch',\n value: function clearRedoSearch() {\n if (this.searchControl) {\n this.searchControl.clearRedoSearch();\n }\n }\n }, {\n key: 'handleBoundsChanged',\n value: function handleBoundsChanged() {\n if (!this.handleBoundsChangedDisabled) {\n if (this.searchControl && this.searchControl.isAutoSearch()) {\n this.doSearch();\n } else {\n this.searchControl.boundsChanged();\n }\n }\n }\n }, {\n key: 'onClickMarker',\n value: function onClickMarker(key) {\n var _this2 = this;\n\n /* HACK: When onClickMarker fires, the onClickMap fires too, first\n onClickMap and then the onClickMarker, but somehow on supported mobile\n devices onClickMarker is called first, and this makes us set the Overlay ref to null when\n the onClickMap gets called, firing the error. */\n setTimeout(function () {\n return _this2.setState({ selectedMarkerKey: key });\n }, 100);\n }\n\n // close the overlay if we clicked somewhere else on the map\n\n }, {\n key: 'onClickMap',\n value: function onClickMap() {\n if (!this.keepOverlayOpen) {\n this.setState({ selectedMarkerKey: null });\n } else {\n this.setKeepOverlayOpen(false);\n }\n }\n }, {\n key: 'getPriceForListings',\n value: function getPriceForListings(listings) {\n var price = Math.min.apply(Math, _toConsumableArray(listings.map(function (listing) {\n return listing.price || Number.MAX_VALUE;\n })));\n if (price === Number.MAX_VALUE) {\n return undefined;\n }\n return price;\n }\n }, {\n key: 'getFavoritedForListings',\n value: function getFavoritedForListings(listings) {\n var listing = listings.find(function (_listing) {\n return _listing.userContext.favorited;\n });\n return listing !== undefined;\n }\n }, {\n key: 'renderOverlayView',\n value: function renderOverlayView(listings, key) {\n var displayMode = listings[0].displayMode;\n var selectedMarkerKey = this.state.selectedMarkerKey;\n var _props = this.props,\n hoverMarkerKey = _props.hoverMarkerKey,\n onFavoriteUnfavorite = _props.onFavoriteUnfavorite;\n\n var relationshipType = listings[0].userContext.listingRelationshipType;\n\n if (selectedMarkerKey === key) {\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_11__ListingResultsMapOverlay_ListingResultsMapOverlay__[\"a\" /* default */], {\n listings: listings,\n panMap: this.panMap,\n setKeepOverlayOpen: this.setKeepOverlayOpen,\n onFavoriteUnfavorite: onFavoriteUnfavorite\n });\n }\n\n var isHover = hoverMarkerKey === key;\n var price = this.getPriceForListings(listings);\n var favorited = this.getFavoritedForListings(listings);\n var hasMultipleListings = listings.length > 1;\n\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_10__ListingResultsMapMarker_ListingResultsMapMarker__[\"a\" /* default */], {\n isHover: isHover,\n price: price,\n markerKey: key,\n displayMode: displayMode,\n favorited: favorited,\n onClickMarker: this.onClickMarker,\n hasMultipleListings: hasMultipleListings,\n relationshipType: relationshipType\n });\n }\n }, {\n key: 'renderMarker',\n value: function renderMarker(listings, key) {\n var _this3 = this;\n\n // we always have at least one listing\n var _listings$ = listings[0],\n lat = _listings$.lat,\n lng = _listings$.lng;\n\n var position = { lat: lat, lng: lng };\n\n var ref = this.state.selectedMarkerKey === key ? function (overlay) {\n _this3.googleMapOverlayRef = overlay;\n } : null;\n\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_4_react_google_maps__[\"OverlayView\"],\n {\n key: key,\n position: position,\n mapPaneName: __WEBPACK_IMPORTED_MODULE_4_react_google_maps__[\"OverlayView\"].OVERLAY_MOUSE_TARGET,\n getPixelPositionOffset: this.getPixelPositionOffset,\n ref: ref\n },\n this.renderOverlayView(listings, key)\n );\n }\n }, {\n key: 'getPixelPositionOffset',\n value: function getPixelPositionOffset(width, height) {\n return { x: -(width / 2), y: -(height / 2) };\n }\n }, {\n key: 'setSearchControlRef',\n value: function setSearchControlRef(searchControl) {\n this.searchControl = searchControl;\n }\n }, {\n key: 'getGoogleMap',\n value: function getGoogleMap() {\n return this.googleMapRef.props.map;\n }\n // This gets called after componentDidMount so\n // doing the initialization stuff here\n\n }, {\n key: 'setGoogleMapRef',\n value: function setGoogleMapRef(map) {\n this.googleMapRef = map;\n if (!this.initialized) {\n this.initialized = true;\n this.fitBounds(this.props);\n\n this.createSearchControl();\n }\n }\n\n // creates the toggle search control for the map\n\n }, {\n key: 'createSearchControl',\n value: function createSearchControl() {\n var _this4 = this;\n\n var searchControlDiv = document.createElement('div');\n\n var searchControl = __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_12__ListingResultsMapSearchControl_ListingResultsMapSearchControl__[\"a\" /* default */], {\n ref: function ref(_searchControl) {\n return _this4.setSearchControlRef(_searchControl);\n },\n onRedoSearch: this.doSearch\n });\n\n __WEBPACK_IMPORTED_MODULE_2_react_dom___default.a.render(searchControl, searchControlDiv);\n\n this.getGoogleMap().controls[google.maps.ControlPosition.TOP_LEFT].push(searchControlDiv);\n }\n\n // New way of rendering the GoogleMap component\n // https://github.com/tomchentw/react-google-maps/pull/157\n\n }, {\n key: 'render',\n value: function render() {\n var _this5 = this;\n\n var _props2 = this.props,\n className = _props2.className,\n isMounted = _props2.isMounted,\n listings = _props2.listings;\n\n var listingsByMarker = __WEBPACK_IMPORTED_MODULE_5_lodash___default.a.groupBy(listings || [], __WEBPACK_IMPORTED_MODULE_9__libs_utils_fng_listings__[\"a\" /* buildListingMarkerKey */]);\n var markers = __WEBPACK_IMPORTED_MODULE_5_lodash___default.a.map(listingsByMarker, this.renderMarker);\n\n if (!isMounted) return null; // prevents issues when server rendering\n\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_4_react_google_maps__[\"GoogleMapLoader\"], {\n containerElement: __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('div', { className: className }),\n googleMapElement: __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_4_react_google_maps__[\"GoogleMap\"],\n {\n ref: function ref(map) {\n return _this5.setGoogleMapRef(map);\n },\n onZoomChanged: function onZoomChanged() {\n return _this5.handleBoundsChanged(true);\n },\n onDragend: function onDragend() {\n return _this5.handleBoundsChanged(true);\n },\n options: __WEBPACK_IMPORTED_MODULE_6__libs_utils_geo__[\"d\" /* getGoogleMapOptions */](),\n onClick: this.onClickMap\n },\n markers\n )\n });\n }\n }]);\n\n return ListingResultsMap;\n}(__WEBPACK_IMPORTED_MODULE_1_react___default.a.Component);\n\nListingResultsMap.propTypes = {\n className: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string,\n hoverMarkerKey: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string,\n listings: __WEBPACK_IMPORTED_MODULE_7__libs_propTypeShapes__[\"c\" /* listingInfosShape */],\n onBoundsChanged: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired,\n onFavoriteUnfavorite: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired,\n bounds: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object.isRequired,\n zoom: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number,\n timeOfSearch: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number.isRequired,\n isMounted: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.bool.isRequired\n};\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__libs_hocs_withIsMountedProp__[\"a\" /* default */])(ListingResultsMap));\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-index/components/ListingResultsMap/ListingResultsMap.jsx\n// module id = 639\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-index/components/ListingResultsMap/ListingResultsMap.jsx?", + ); + + /***/ + }, + /* 640 */ + /* exports provided: default */ + /* exports used: default */ + /*!*********************************************************************************************************************!*\ + !*** ./app/bundles/listings-index/components/ListingResultsMap/ListingResultsMapMarker/ListingResultsMapMarker.jsx ***! + \*********************************************************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash__ = __webpack_require__(/*! lodash */ 19);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_lodash__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__libs_components_icons_IconPrivate__ = __webpack_require__(/*! ../../../../../libs/components/icons/IconPrivate */ 141);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__enums_RelationshipType__ = __webpack_require__(/*! ../../../../../enums/RelationshipType */ 87);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__enums_DisplayMode__ = __webpack_require__(/*! ../../../../../enums/DisplayMode */ 60);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__ListingResultsMapMarker_scss__ = __webpack_require__(/*! ./ListingResultsMapMarker.scss */ 968);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__ListingResultsMapMarker_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6__ListingResultsMapMarker_scss__);\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\n\n\n\n\n\n\n\n\n\nvar ListingResultsMapMarker = function (_React$Component) {\n _inherits(ListingResultsMapMarker, _React$Component);\n\n function ListingResultsMapMarker(props, context) {\n _classCallCheck(this, ListingResultsMapMarker);\n\n var _this = _possibleConstructorReturn(this, (ListingResultsMapMarker.__proto__ || Object.getPrototypeOf(ListingResultsMapMarker)).call(this, props, context));\n\n __WEBPACK_IMPORTED_MODULE_2_lodash___default.a.bindAll(_this, ['onClickMarker']);\n return _this;\n }\n\n _createClass(ListingResultsMapMarker, [{\n key: 'onClickMarker',\n value: function onClickMarker(e) {\n e.stopPropagation();\n this.props.onClickMarker(this.props.markerKey);\n }\n }, {\n key: 'renderPrice',\n value: function renderPrice() {\n var _props = this.props,\n price = _props.price,\n hasMultipleListings = _props.hasMultipleListings,\n relationshipType = _props.relationshipType,\n displayMode = _props.displayMode;\n\n var suffix = hasMultipleListings ? '+' : '';\n\n if (relationshipType === __WEBPACK_IMPORTED_MODULE_4__enums_RelationshipType__[\"a\" /* default */].OWNER.value) {\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'span',\n null,\n 'Yours'\n );\n }\n\n if (price) {\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'span',\n null,\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'sup',\n null,\n '$'\n ),\n price,\n suffix\n );\n }\n\n if (displayMode === __WEBPACK_IMPORTED_MODULE_5__enums_DisplayMode__[\"a\" /* default */].LIMITED_PREVIEW) {\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3__libs_components_icons_IconPrivate__[\"a\" /* default */], { small: true, className: __WEBPACK_IMPORTED_MODULE_6__ListingResultsMapMarker_scss___default.a.privatePrice });\n }\n\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'span',\n null,\n 'Ask'\n );\n }\n }, {\n key: 'render',\n value: function render() {\n var _props2 = this.props,\n isHover = _props2.isHover,\n favorited = _props2.favorited,\n relationshipType = _props2.relationshipType,\n displayMode = _props2.displayMode;\n\n\n var className = isHover ? __WEBPACK_IMPORTED_MODULE_6__ListingResultsMapMarker_scss___default.a.listingResultsMapMarkerHover : __WEBPACK_IMPORTED_MODULE_6__ListingResultsMapMarker_scss___default.a['listingResultsMapMarker_' + relationshipType];\n\n return (\n // FIXME: Replace w/ button\n // eslint-disable-next-line jsx-a11y/no-static-element-interactions\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n { className: className, onClick: this.onClickMarker, onDoubleClick: this.onClickMarker },\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'span',\n null,\n this.renderPrice(),\n favorited && __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('i', { className: 'glyphicon glyphicon-heart' })\n ),\n displayMode !== __WEBPACK_IMPORTED_MODULE_5__enums_DisplayMode__[\"a\" /* default */].LIMITED_PREVIEW && __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('div', { className: __WEBPACK_IMPORTED_MODULE_6__ListingResultsMapMarker_scss___default.a.arrow })\n )\n );\n }\n }]);\n\n return ListingResultsMapMarker;\n}(__WEBPACK_IMPORTED_MODULE_1_react___default.a.Component);\n\nListingResultsMapMarker.propTypes = {\n markerKey: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string.isRequired,\n onClickMarker: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired,\n price: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number,\n isHover: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.bool.isRequired,\n favorited: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.bool.isRequired,\n hasMultipleListings: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.bool.isRequired,\n relationshipType: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string.isRequired,\n displayMode: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string.isRequired\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (ListingResultsMapMarker);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-index/components/ListingResultsMap/ListingResultsMapMarker/ListingResultsMapMarker.jsx\n// module id = 640\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-index/components/ListingResultsMap/ListingResultsMapMarker/ListingResultsMapMarker.jsx?", + ); + + /***/ + }, + /* 641 */ + /* exports provided: default */ + /* exports used: default */ + /*!***********************************************************************************************************************!*\ + !*** ./app/bundles/listings-index/components/ListingResultsMap/ListingResultsMapOverlay/ListingResultsMapOverlay.jsx ***! + \***********************************************************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash__ = __webpack_require__(/*! lodash */ 19);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_lodash__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__enums_RelationshipType__ = __webpack_require__(/*! ../../../../../enums/RelationshipType */ 87);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__enums_DisplayMode__ = __webpack_require__(/*! ../../../../../enums/DisplayMode */ 60);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__libs_components_ListingTile_ListingTile__ = __webpack_require__(/*! ../../../../../libs/components/ListingTile/ListingTile */ 137);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__libs_propTypeShapes__ = __webpack_require__(/*! ../../../../../libs/propTypeShapes */ 57);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__ListingResultsMapOverlay_scss__ = __webpack_require__(/*! ./ListingResultsMapOverlay.scss */ 969);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__ListingResultsMapOverlay_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7__ListingResultsMapOverlay_scss__);\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\n\n\n\n\n\n\n\n\n\n\nvar ListingResultsMapOverlay = function (_React$Component) {\n _inherits(ListingResultsMapOverlay, _React$Component);\n\n function ListingResultsMapOverlay(props, context) {\n _classCallCheck(this, ListingResultsMapOverlay);\n\n var _this = _possibleConstructorReturn(this, (ListingResultsMapOverlay.__proto__ || Object.getPrototypeOf(ListingResultsMapOverlay)).call(this, props, context));\n\n _this.onClickListener = null;\n _this.onDblClickListener = null;\n return _this;\n }\n\n _createClass(ListingResultsMapOverlay, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n var _this2 = this;\n\n this.onClickListener = google.maps.event.addDomListener(this.node, 'click', function () {\n return _this2.props.setKeepOverlayOpen(true);\n });\n\n this.onDblClickListener = google.maps.event.addDomListener(this.node, 'dblclick', function (event) {\n event.cancelBubble = true; // eslint-disable-line no-param-reassign\n });\n\n this.panMap();\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n if (this.onClickListener !== null) {\n google.maps.event.removeListener(this.onClickListener);\n }\n\n if (this.onDblClickListener !== null) {\n google.maps.event.removeListener(this.onDblClickListener);\n }\n }\n }, {\n key: 'componentDidUpdate',\n value: function componentDidUpdate() {\n this.panMap();\n }\n\n // if the overlay is too close to the edges of the map, or\n // partially hidden, we need to pan the map\n\n }, {\n key: 'panMap',\n value: function panMap() {\n var _this3 = this;\n\n // the overlay dom node\n var overlayDiv = this.node;\n\n // the dom node used to position the overlay\n var anchorDiv = overlayDiv.offsetParent;\n\n // the map dom node\n var mapDiv = anchorDiv.offsetParent;\n\n // In Capybara + PhantomJs, transform property is not set\n if (!mapDiv.offsetParent.style.transform) return;\n\n var transform = this.parseTransform(mapDiv.offsetParent.style.transform);\n var arrowHeight = 8;\n\n // adjust anchor offset for the previous paned amounts\n var anchorOffsetLeft = anchorDiv.offsetLeft + transform[0];\n var anchorOffsetTop = anchorDiv.offsetTop + transform[1];\n\n // offset top of the overlay relative to the map\n var overlayOffsetTop = anchorOffsetTop - overlayDiv.clientHeight - arrowHeight;\n\n // offset left of the overlay relative to the map\n var overlayOffsetLeft = (anchorOffsetLeft - overlayDiv.clientWidth) / 2;\n\n // the delta pixels to pan the map\n var deltaX = 0;\n var deltaY = 0;\n\n // minimal offset of the overlay relative to the map that we require\n var minOverlayOffset = 15;\n var minOverlayOffsetTop = 95;\n\n // calculate the deltaX if the overlay is too far to the left or right:\n // first do left\n if (overlayOffsetLeft < minOverlayOffset) {\n deltaX = minOverlayOffset - overlayOffsetLeft;\n }\n\n // now do right\n var mapWidth = mapDiv.clientWidth;\n var overlayOffsetRight = mapWidth - (overlayOffsetLeft + overlayDiv.clientWidth);\n if (overlayOffsetRight < minOverlayOffset) {\n deltaX = -(minOverlayOffset - overlayOffsetRight);\n }\n\n // calculate deltaY if overlay if overlay is too far up\n if (overlayOffsetTop < minOverlayOffsetTop) {\n deltaY = minOverlayOffsetTop - overlayOffsetTop;\n }\n\n if (deltaX !== 0 || deltaY !== 0) {\n __WEBPACK_IMPORTED_MODULE_2_lodash___default.a.defer(function () {\n return _this3.props.panMap(-deltaX, -deltaY);\n });\n }\n }\n\n // parse matrix values, eg:\n // \"matrix(1, 0, 0, 1, 210px, 430px)\" => [210, 430]\n\n }, {\n key: 'parseTransform',\n value: function parseTransform(transformStr) {\n var matrixValues = /matrix\\((.*)\\)/.exec(transformStr)[1].split(' ');\n var transform = matrixValues.map(function (pixelStr) {\n return parseInt(pixelStr.replace('px', ''), 10);\n }).splice(4, 2);\n\n return transform;\n }\n }, {\n key: 'renderMultiListing',\n value: function renderMultiListing() {\n var _props = this.props,\n listings = _props.listings,\n onFavoriteUnfavorite = _props.onFavoriteUnfavorite;\n\n\n listings.sort(function (listingA, listingB) {\n var listingAPrice = listingA.price || Number.MAX_VALUE;\n var listingBPrice = listingB.price || Number.MAX_VALUE;\n return listingAPrice > listingBPrice;\n });\n\n var relationshipType = __WEBPACK_IMPORTED_MODULE_3__enums_RelationshipType__[\"a\" /* default */].fromValue(listings[0].owner.relationshipType);\n\n var multiListingTitleClassName = __WEBPACK_IMPORTED_MODULE_7__ListingResultsMapOverlay_scss___default.a['multiListingTitle_' + relationshipType.value];\n var multiContainerInnerClassName = __WEBPACK_IMPORTED_MODULE_7__ListingResultsMapOverlay_scss___default.a['multiContainerInner_' + relationshipType.value];\n\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_7__ListingResultsMapOverlay_scss___default.a.multiContainer },\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n { className: multiListingTitleClassName },\n listings.length,\n ' listings at this location'\n ),\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n { className: multiContainerInnerClassName },\n listings.map(function (listing, i) {\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5__libs_components_ListingTile_ListingTile__[\"a\" /* default */], {\n key: i,\n listing: listing,\n className: i === 0 ? __WEBPACK_IMPORTED_MODULE_7__ListingResultsMapOverlay_scss___default.a.tileFirst : __WEBPACK_IMPORTED_MODULE_7__ListingResultsMapOverlay_scss___default.a.tile,\n isMini: true,\n onFavoriteUnfavorite: onFavoriteUnfavorite,\n hideApproximateLocation: listing.displayMode === __WEBPACK_IMPORTED_MODULE_4__enums_DisplayMode__[\"a\" /* default */].FULL_DETAILS\n });\n })\n )\n );\n }\n }, {\n key: 'renderSingleListing',\n value: function renderSingleListing() {\n var _props2 = this.props,\n listings = _props2.listings,\n onFavoriteUnfavorite = _props2.onFavoriteUnfavorite;\n\n\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_7__ListingResultsMapOverlay_scss___default.a.singleContainer },\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5__libs_components_ListingTile_ListingTile__[\"a\" /* default */], {\n listing: listings[0],\n className: __WEBPACK_IMPORTED_MODULE_7__ListingResultsMapOverlay_scss___default.a.tileFirst,\n isMini: true,\n onFavoriteUnfavorite: onFavoriteUnfavorite,\n hideApproximateLocation: listings[0].displayMode === __WEBPACK_IMPORTED_MODULE_4__enums_DisplayMode__[\"a\" /* default */].FULL_DETAILS\n })\n );\n }\n }, {\n key: 'render',\n value: function render() {\n var _this4 = this;\n\n var listings = this.props.listings;\n\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n {\n className: __WEBPACK_IMPORTED_MODULE_7__ListingResultsMapOverlay_scss___default.a.listingResultsMapOverlay,\n ref: function ref(node) {\n _this4.node = node;\n }\n },\n listings.length === 1 ? this.renderSingleListing() : this.renderMultiListing(),\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('div', { className: __WEBPACK_IMPORTED_MODULE_7__ListingResultsMapOverlay_scss___default.a.arrow })\n );\n }\n }]);\n\n return ListingResultsMapOverlay;\n}(__WEBPACK_IMPORTED_MODULE_1_react___default.a.Component);\n\nListingResultsMapOverlay.propTypes = {\n listings: __WEBPACK_IMPORTED_MODULE_6__libs_propTypeShapes__[\"c\" /* listingInfosShape */].isRequired,\n panMap: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired,\n setKeepOverlayOpen: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired,\n onFavoriteUnfavorite: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (ListingResultsMapOverlay);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-index/components/ListingResultsMap/ListingResultsMapOverlay/ListingResultsMapOverlay.jsx\n// module id = 641\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-index/components/ListingResultsMap/ListingResultsMapOverlay/ListingResultsMapOverlay.jsx?", + ); + + /***/ + }, + /* 642 */ + /* exports provided: default */ + /* exports used: default */ + /*!***********************************************************************************************************************************!*\ + !*** ./app/bundles/listings-index/components/ListingResultsMap/ListingResultsMapSearchControl/ListingResultsMapSearchControl.jsx ***! + \***********************************************************************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash__ = __webpack_require__(/*! lodash */ 19);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_lodash__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__ListingResultsMapSearchControl_scss__ = __webpack_require__(/*! ./ListingResultsMapSearchControl.scss */ 970);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__ListingResultsMapSearchControl_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__ListingResultsMapSearchControl_scss__);\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\n\n\n\n\n\nvar ListingResultsMapSearchControl = function (_React$Component) {\n _inherits(ListingResultsMapSearchControl, _React$Component);\n\n function ListingResultsMapSearchControl(props, context) {\n _classCallCheck(this, ListingResultsMapSearchControl);\n\n var _this = _possibleConstructorReturn(this, (ListingResultsMapSearchControl.__proto__ || Object.getPrototypeOf(ListingResultsMapSearchControl)).call(this, props, context));\n\n __WEBPACK_IMPORTED_MODULE_2_lodash___default.a.bindAll(_this, ['onToggleAutoSearch']);\n\n _this.state = {\n autoSearch: true,\n redoSearch: false\n };\n return _this;\n }\n\n _createClass(ListingResultsMapSearchControl, [{\n key: 'isAutoSearch',\n value: function isAutoSearch() {\n return this.state.autoSearch;\n }\n }, {\n key: 'clearRedoSearch',\n value: function clearRedoSearch() {\n this.setState({ redoSearch: false });\n }\n }, {\n key: 'boundsChanged',\n value: function boundsChanged() {\n if (!this.state.autoSearch) {\n this.setState({ redoSearch: true });\n }\n }\n }, {\n key: 'onToggleAutoSearch',\n value: function onToggleAutoSearch() {\n var autoSearch = this.state.autoSearch;\n this.setState({ autoSearch: !autoSearch });\n }\n }, {\n key: 'renderToggleSearch',\n value: function renderToggleSearch() {\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_3__ListingResultsMapSearchControl_scss___default.a.toggleSearch },\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'label',\n { htmlFor: 'toggle-auto-search', className: __WEBPACK_IMPORTED_MODULE_3__ListingResultsMapSearchControl_scss___default.a.toggleSearchLabel },\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('input', {\n id: 'toggle-auto-search',\n type: 'checkbox',\n checked: this.state.autoSearch,\n onChange: this.onToggleAutoSearch\n }),\n ' Search as I move the map'\n )\n );\n }\n }, {\n key: 'renderRedoSearch',\n value: function renderRedoSearch() {\n return (\n // FIXME: Replace w/ button\n // eslint-disable-next-line jsx-a11y/no-static-element-interactions\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_3__ListingResultsMapSearchControl_scss___default.a.redoSearch, onClick: this.props.onRedoSearch },\n 'Redo Search Here',\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('i', { className: 'glyphicon glyphicon-repeat' })\n )\n );\n }\n }, {\n key: 'render',\n value: function render() {\n var redoSearch = this.state.redoSearch;\n var searchControlClassName = redoSearch ? __WEBPACK_IMPORTED_MODULE_3__ListingResultsMapSearchControl_scss___default.a.searchControlRedoSearch : __WEBPACK_IMPORTED_MODULE_3__ListingResultsMapSearchControl_scss___default.a.searchControl;\n\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n { className: searchControlClassName },\n this.state.redoSearch ? this.renderRedoSearch() : this.renderToggleSearch()\n );\n }\n }]);\n\n return ListingResultsMapSearchControl;\n}(__WEBPACK_IMPORTED_MODULE_1_react___default.a.Component);\n\nListingResultsMapSearchControl.propTypes = {\n onRedoSearch: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (ListingResultsMapSearchControl);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-index/components/ListingResultsMap/ListingResultsMapSearchControl/ListingResultsMapSearchControl.jsx\n// module id = 642\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-index/components/ListingResultsMap/ListingResultsMapSearchControl/ListingResultsMapSearchControl.jsx?", + ); + + /***/ + }, + /* 643 */ + /* exports provided: default */ + /* exports used: default */ + /*!*****************************************************************************************!*\ + !*** ./app/bundles/listings-index/components/ListingResultsPage/ListingResultsPage.jsx ***! + \*****************************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_addons_pure_render_mixin__ = __webpack_require__(/*! react-addons-pure-render-mixin */ 117);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_addons_pure_render_mixin___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react_addons_pure_render_mixin__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_react_bootstrap__ = __webpack_require__(/*! react-bootstrap */ 31);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_lodash__ = __webpack_require__(/*! lodash */ 19);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_lodash___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_lodash__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__libs_propTypeShapes__ = __webpack_require__(/*! ../../../../libs/propTypeShapes */ 57);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__libs_components_ListingTile_ListingTile__ = __webpack_require__(/*! ../../../../libs/components/ListingTile/ListingTile */ 137);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__ListingResultsPage_scss__ = __webpack_require__(/*! ./ListingResultsPage.scss */ 971);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__ListingResultsPage_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8__ListingResultsPage_scss__);\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar ListingResultsPage = function (_React$Component) {\n _inherits(ListingResultsPage, _React$Component);\n\n function ListingResultsPage(props, context) {\n _classCallCheck(this, ListingResultsPage);\n\n var _this = _possibleConstructorReturn(this, (ListingResultsPage.__proto__ || Object.getPrototypeOf(ListingResultsPage)).call(this, props, context));\n\n _this.shouldComponentUpdate = __WEBPACK_IMPORTED_MODULE_2_react_addons_pure_render_mixin___default.a.shouldComponentUpdate.bind(_this);\n\n __WEBPACK_IMPORTED_MODULE_4_lodash___default.a.bindAll(_this, ['onSelectPage']);\n\n _this.tileComponents = {};\n return _this;\n }\n\n _createClass(ListingResultsPage, [{\n key: 'onSelectPage',\n value: function onSelectPage(page) {\n if (page === this.props.page) return;\n this.props.onSelectPage(page);\n }\n }, {\n key: 'onScrollResultsPage',\n value: function onScrollResultsPage() {\n __WEBPACK_IMPORTED_MODULE_4_lodash___default.a.values(this.tileComponents).map(function (tile) {\n return tile.onScrollResultsPage();\n });\n }\n }, {\n key: 'tileComponentRef',\n value: function tileComponentRef(listingId, tile) {\n if (tile) {\n this.tileComponents[listingId] = tile;\n } else {\n delete this.tileComponents[listingId];\n }\n }\n }, {\n key: 'renderPagination',\n value: function renderPagination() {\n var _props = this.props,\n page = _props.page,\n pageSize = _props.pageSize,\n totalCount = _props.totalCount;\n\n var pageCount = Math.ceil(totalCount / pageSize);\n\n return pageCount > 1 ? __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3_react_bootstrap__[\"h\" /* Pagination */], {\n className: __WEBPACK_IMPORTED_MODULE_8__ListingResultsPage_scss___default.a.pagination,\n ellipsis: true,\n next: true,\n prev: true,\n items: pageCount,\n maxButtons: 5,\n activePage: page,\n onSelect: this.onSelectPage\n }) : null;\n }\n }, {\n key: 'renderListingResultsTiles',\n value: function renderListingResultsTiles() {\n var _this2 = this;\n\n var _props2 = this.props,\n listings = _props2.listings,\n onHoverListing = _props2.onHoverListing;\n\n\n return listings.map(function (result) {\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n { key: result.id, className: 'col-sm-6 col-xs-12' },\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7__libs_components_ListingTile_ListingTile__[\"a\" /* default */], {\n ref: _this2.tileComponentRef.bind(_this2, result.id),\n className: __WEBPACK_IMPORTED_MODULE_8__ListingResultsPage_scss___default.a.resultsTile,\n listing: result,\n onHoverListing: onHoverListing,\n onFavoriteUnfavorite: _this2.props.onFavoriteUnfavorite,\n showHostInfo: true,\n hideApproximateLocation: true\n })\n );\n });\n }\n }, {\n key: 'renderNoListings',\n value: function renderNoListings() {\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_8__ListingResultsPage_scss___default.a.noListings },\n 'We couldn\\u2019t find any results that matched your criteria, but tweaking your search may help. Here are some ideas:',\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'ul',\n null,\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'li',\n null,\n 'Remove some filters.'\n ),\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'li',\n null,\n 'Expand the area of your search.'\n ),\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'li',\n null,\n 'Search for a city, address, or landmark.'\n )\n )\n );\n }\n }, {\n key: 'renderListings',\n value: function renderListings() {\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_5_classnames___default()('container-fluid', __WEBPACK_IMPORTED_MODULE_8__ListingResultsPage_scss___default.a.tilesContainer) },\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n { className: 'row' },\n this.renderListingResultsTiles()\n ),\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n null,\n this.renderPagination()\n )\n );\n }\n }, {\n key: 'render',\n value: function render() {\n var listings = this.props.listings;\n\n var noListings = __WEBPACK_IMPORTED_MODULE_4_lodash___default.a.isEmpty(listings);\n\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n null,\n noListings ? this.renderNoListings() : this.renderListings()\n );\n }\n }]);\n\n return ListingResultsPage;\n}(__WEBPACK_IMPORTED_MODULE_1_react___default.a.Component);\n\nListingResultsPage.propTypes = {\n listings: __WEBPACK_IMPORTED_MODULE_6__libs_propTypeShapes__[\"c\" /* listingInfosShape */].isRequired,\n onHoverListing: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired,\n onSelectPage: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired,\n page: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number.isRequired,\n pageSize: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number.isRequired,\n onFavoriteUnfavorite: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired,\n totalCount: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number.isRequired\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (ListingResultsPage);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-index/components/ListingResultsPage/ListingResultsPage.jsx\n// module id = 643\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-index/components/ListingResultsPage/ListingResultsPage.jsx?", + ); + + /***/ + }, + /* 644 */ + /* exports provided: default */ + /* exports used: default */ + /*!*******************************************************************************!*\ + !*** ./app/bundles/listings-index/components/ListingSearch/ListingSearch.jsx ***! + \*******************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_addons_pure_render_mixin__ = __webpack_require__(/*! react-addons-pure-render-mixin */ 117);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_addons_pure_render_mixin___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react_addons_pure_render_mixin__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_lodash__ = __webpack_require__(/*! lodash */ 19);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_lodash___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_lodash__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__libs_components__ = __webpack_require__(/*! ../../../../libs/components */ 11);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__libs_propTypeShapes__ = __webpack_require__(/*! ../../../../libs/propTypeShapes */ 57);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__ListingSearchFilters_ListingSearchFilters__ = __webpack_require__(/*! ../ListingSearchFilters/ListingSearchFilters */ 645);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__ListingResultsMap_ListingResultsMap__ = __webpack_require__(/*! ../ListingResultsMap/ListingResultsMap */ 639);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__ListingResultsPage_ListingResultsPage__ = __webpack_require__(/*! ../ListingResultsPage/ListingResultsPage */ 643);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__common_ListingSearchBox_ListingSearchBox__ = __webpack_require__(/*! ../common/ListingSearchBox/ListingSearchBox */ 649);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__ListingSearchFooter_ListingSearchFooter__ = __webpack_require__(/*! ../ListingSearchFooter/ListingSearchFooter */ 648);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__ListingSearch_scss__ = __webpack_require__(/*! ./ListingSearch.scss */ 972);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__ListingSearch_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_12__ListingSearch_scss__);\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar ListingSearch = function (_React$Component) {\n _inherits(ListingSearch, _React$Component);\n\n function ListingSearch(props, context) {\n _classCallCheck(this, ListingSearch);\n\n var _this = _possibleConstructorReturn(this, (ListingSearch.__proto__ || Object.getPrototypeOf(ListingSearch)).call(this, props, context));\n\n _this.shouldComponentUpdate = __WEBPACK_IMPORTED_MODULE_2_react_addons_pure_render_mixin___default.a.shouldComponentUpdate.bind(_this);\n\n _this.delayedShowSpinnerCallback = null;\n\n __WEBPACK_IMPORTED_MODULE_4_lodash___default.a.bindAll(_this, ['onBoundsChanged', 'onFiltersChanged', 'onHoverListing', 'onScrollResultsPage', 'onSelectPage', 'setListingResultsPageRef', 'onShowAllFilters', 'onShowMap', 'onSearch']);\n\n _this.listingResultsPageRef = null;\n _this.resultsPageContainerRef = null;\n _this.resultsPageRef = null;\n\n _this.state = {\n hoverMarkerKey: null,\n showSpinner: false,\n showMap: !props.mobile\n };\n return _this;\n }\n\n _createClass(ListingSearch, [{\n key: 'componentWillReceiveProps',\n value: function componentWillReceiveProps(nextProps) {\n this.showSpinner(nextProps.searching);\n if (this.props.mobile !== nextProps.mobile) {\n this.setState({ showMap: !nextProps.mobile });\n }\n }\n }, {\n key: 'componentDidMount',\n value: function componentDidMount() {\n this.showSpinner(this.props.searching);\n }\n\n // show the spinner after some delay to avoid a quick spinner \"flash\" if the search is\n // really quick\n\n }, {\n key: 'showSpinner',\n value: function showSpinner(searching) {\n var _this2 = this;\n\n clearTimeout(this.delayedShowSpinnerCallback);\n\n if (searching) {\n this.delayedShowSpinnerCallback = __WEBPACK_IMPORTED_MODULE_4_lodash___default.a.delay(function () {\n return _this2.setState({ showSpinner: true });\n }, 250);\n } else {\n this.setState({ showSpinner: false });\n }\n }\n }, {\n key: 'onScrollResultsPage',\n value: function onScrollResultsPage() {\n if (this.listingResultsPageRef) {\n this.listingResultsPageRef.onScrollResultsPage();\n }\n }\n }, {\n key: 'onHoverListing',\n value: function onHoverListing(markerKey) {\n this.setState({ hoverMarkerKey: markerKey });\n }\n\n // search on pagination handler\n\n }, {\n key: 'onSelectPage',\n value: function onSelectPage(page) {\n this.search({ page: page });\n this.props.onSelectPage(this.resultsPageContainerRef, this.resultsPageRef);\n }\n\n // search from input box handler\n\n }, {\n key: 'onSearch',\n value: function onSearch(bounds, location) {\n this.search({ bounds: bounds, location: location });\n }\n\n // Handle bounds changes from interacting with the map.\n // Optionally do a search if specified by the interaction\n\n }, {\n key: 'onBoundsChanged',\n value: function onBoundsChanged(_ref) {\n var bounds = _ref.bounds,\n zoom = _ref.zoom;\n\n this.search({ bounds: bounds, zoom: zoom });\n }\n\n // search from changing the filters handler\n\n }, {\n key: 'onFiltersChanged',\n value: function onFiltersChanged(filters) {\n this.search({ filters: filters });\n }\n }, {\n key: 'onShowAllFilters',\n value: function onShowAllFilters(showAllFilters) {\n this.setState({ showAllFilters: showAllFilters });\n }\n }, {\n key: 'onShowMap',\n value: function onShowMap(showMap) {\n this.setState({ showMap: showMap });\n }\n }, {\n key: 'setListingResultsPageRef',\n value: function setListingResultsPageRef(ref) {\n this.listingResultsPageRef = ref;\n }\n\n // Search the listings\n\n }, {\n key: 'search',\n value: function search(_ref2) {\n var _ref2$bounds = _ref2.bounds,\n bounds = _ref2$bounds === undefined ? this.props.meta.bounds : _ref2$bounds,\n _ref2$page = _ref2.page,\n page = _ref2$page === undefined ? 1 : _ref2$page,\n _ref2$filters = _ref2.filters,\n filters = _ref2$filters === undefined ? this.props.meta.filters : _ref2$filters,\n _ref2$location = _ref2.location,\n location = _ref2$location === undefined ? this.props.meta.location : _ref2$location,\n zoom = _ref2.zoom;\n\n this.props.onSearch({\n bounds: bounds,\n location: location,\n page: page,\n pageSize: this.props.meta.pageSize,\n filters: filters,\n zoom: zoom\n });\n\n this.setState({ searching: true });\n }\n }, {\n key: 'renderHeader',\n value: function renderHeader() {\n var _this3 = this;\n\n var _props = this.props,\n mobile = _props.mobile,\n meta = _props.meta;\n var _state = this.state,\n showMap = _state.showMap,\n showSpinner = _state.showSpinner,\n showAllFilters = _state.showAllFilters;\n\n\n var showOnMapButton = mobile && !showSpinner && !showAllFilters;\n\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_12__ListingSearch_scss___default.a.searchBox },\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_10__common_ListingSearchBox_ListingSearchBox__[\"a\" /* default */], { onSearch: this.onSearch, location: meta.location }),\n showSpinner && __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_12__ListingSearch_scss___default.a.spinnerContainer },\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5__libs_components__[\"i\" /* Spinner */], null)\n ),\n showOnMapButton && __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_5__libs_components__[\"k\" /* ButtonLike */],\n {\n className: __WEBPACK_IMPORTED_MODULE_3_classnames___default()(__WEBPACK_IMPORTED_MODULE_12__ListingSearch_scss___default.a.showOnMap, 'visible-xs'),\n onClick: function onClick() {\n return _this3.onShowMap(!showMap);\n }\n },\n showMap ? 'Back to List View' : 'Show on map'\n )\n );\n }\n }, {\n key: 'renderResultsMap',\n value: function renderResultsMap() {\n var _state2 = this.state,\n hoverMarkerKey = _state2.hoverMarkerKey,\n showMap = _state2.showMap,\n showAllFilters = _state2.showAllFilters;\n var _props2 = this.props,\n listings = _props2.listings,\n meta = _props2.meta,\n mobile = _props2.mobile;\n var location = meta.location,\n bounds = meta.bounds,\n zoom = meta.zoom,\n timeOfSearch = meta.timeOfSearch;\n\n var skipResultsMapRender = !showMap || showAllFilters && mobile;\n\n if (skipResultsMapRender) return null;\n\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_8__ListingResultsMap_ListingResultsMap__[\"a\" /* default */], {\n className: __WEBPACK_IMPORTED_MODULE_3_classnames___default()(__WEBPACK_IMPORTED_MODULE_12__ListingSearch_scss___default.a.resultsMap, 'listing-results-map'),\n location: location,\n listings: listings,\n onBoundsChanged: this.onBoundsChanged,\n hoverMarkerKey: hoverMarkerKey,\n bounds: bounds,\n zoom: zoom,\n onFavoriteUnfavorite: this.props.onFavoriteUnfavorite,\n timeOfSearch: timeOfSearch\n });\n }\n }, {\n key: 'renderListingResults',\n value: function renderListingResults() {\n var _state3 = this.state,\n showAllFilters = _state3.showAllFilters,\n showMap = _state3.showMap;\n var _props3 = this.props,\n listings = _props3.listings,\n meta = _props3.meta,\n mobile = _props3.mobile;\n var page = meta.page,\n location = meta.location,\n totalCount = meta.totalCount,\n pageSize = meta.pageSize;\n\n var skipResutsPageRender = showAllFilters || showMap && mobile;\n\n if (skipResutsPageRender) return null;\n\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_9__ListingResultsPage_ListingResultsPage__[\"a\" /* default */], {\n ref: this.setListingResultsPageRef,\n listings: listings,\n page: page,\n pageSize: pageSize,\n onSelectPage: this.onSelectPage,\n onHoverListing: this.onHoverListing,\n onFavoriteUnfavorite: this.props.onFavoriteUnfavorite,\n location: location,\n totalCount: totalCount\n });\n }\n }, {\n key: 'renderResultsPage',\n value: function renderResultsPage() {\n var _this4 = this;\n\n var _props4 = this.props,\n searching = _props4.searching,\n user = _props4.user,\n meta = _props4.meta;\n var _meta$filters = meta.filters,\n filters = _meta$filters === undefined ? {} : _meta$filters;\n var showAllFilters = this.state.showAllFilters;\n\n\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_12__ListingSearch_scss___default.a.resultsPageContainer, ref: function ref(e) {\n _this4.resultsPageContainerRef = e;\n } },\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_12__ListingSearch_scss___default.a.filters },\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7__ListingSearchFilters_ListingSearchFilters__[\"a\" /* default */], {\n filters: filters,\n onFiltersChanged: this.onFiltersChanged,\n onShowAllFilters: this.onShowAllFilters,\n totalCount: meta.totalCount,\n meta: meta,\n onSearch: this.onSearch,\n user: user\n })\n ),\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_12__ListingSearch_scss___default.a.resultsPageInner },\n searching && __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('div', { className: __WEBPACK_IMPORTED_MODULE_12__ListingSearch_scss___default.a.resultsOverlay }),\n this.renderListingResults()\n ),\n !showAllFilters && __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_11__ListingSearchFooter_ListingSearchFooter__[\"a\" /* default */], { location: meta.location })\n );\n }\n }, {\n key: 'render',\n value: function render() {\n var _this5 = this;\n\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_3_classnames___default()(__WEBPACK_IMPORTED_MODULE_12__ListingSearch_scss___default.a.listingSearch, 'listing-search') },\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_12__ListingSearch_scss___default.a.results },\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n {\n className: __WEBPACK_IMPORTED_MODULE_12__ListingSearch_scss___default.a.resultsPage,\n onScroll: this.onScrollResultsPage,\n ref: function ref(e) {\n _this5.resultsPageRef = e;\n }\n },\n this.renderHeader(),\n this.renderResultsPage()\n ),\n this.renderResultsMap()\n )\n );\n }\n }]);\n\n return ListingSearch;\n}(__WEBPACK_IMPORTED_MODULE_1_react___default.a.Component);\n\nListingSearch.propTypes = {\n user: __WEBPACK_IMPORTED_MODULE_6__libs_propTypeShapes__[\"b\" /* userInfoShape */],\n listings: __WEBPACK_IMPORTED_MODULE_6__libs_propTypeShapes__[\"c\" /* listingInfosShape */].isRequired,\n meta: __WEBPACK_IMPORTED_MODULE_6__libs_propTypeShapes__[\"d\" /* searchMetaShape */].isRequired,\n onSearch: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired,\n onFavoriteUnfavorite: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired,\n searching: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.bool.isRequired,\n onSelectPage: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired,\n mobile: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.bool.isRequired\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (ListingSearch);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-index/components/ListingSearch/ListingSearch.jsx\n// module id = 644\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-index/components/ListingSearch/ListingSearch.jsx?", + ); + + /***/ + }, + /* 645 */ + /* exports provided: default */ + /* exports used: default */ + /*!*********************************************************************************************!*\ + !*** ./app/bundles/listings-index/components/ListingSearchFilters/ListingSearchFilters.jsx ***! + \*********************************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_addons_pure_render_mixin__ = __webpack_require__(/*! react-addons-pure-render-mixin */ 117);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_addons_pure_render_mixin___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react_addons_pure_render_mixin__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_lodash__ = __webpack_require__(/*! lodash */ 19);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_lodash___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_lodash__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react_bootstrap__ = __webpack_require__(/*! react-bootstrap */ 31);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_inflection__ = __webpack_require__(/*! inflection */ 218);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_inflection___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_inflection__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__enums_RoomType__ = __webpack_require__(/*! ../../../../enums/RoomType */ 70);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__enums_ListingDetails__ = __webpack_require__(/*! ../../../../enums/ListingDetails */ 296);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__enums_ListingsFilterCategoryType__ = __webpack_require__(/*! ../../../../enums/ListingsFilterCategoryType */ 742);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__enums_ListingFilters__ = __webpack_require__(/*! ../../../../enums/ListingFilters */ 184);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__enums_Amenity__ = __webpack_require__(/*! ../../../../enums/Amenity */ 135);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__libs_amenitiesUtils__ = __webpack_require__(/*! ../../../../libs/amenitiesUtils */ 746);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__libs_utils__ = __webpack_require__(/*! ../../../../libs/utils */ 20);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__libs_propTypeShapes__ = __webpack_require__(/*! ../../../../libs/propTypeShapes */ 57);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__libs_components_icons_IconClose__ = __webpack_require__(/*! ../../../../libs/components/icons/IconClose */ 139);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__libs_redirectToSignIn__ = __webpack_require__(/*! ../../../../libs/redirectToSignIn */ 88);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__RelationshipTypeFilter_RelationshipTypeFilter__ = __webpack_require__(/*! ./RelationshipTypeFilter/RelationshipTypeFilter */ 647);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__PriceSlider_PriceSlider__ = __webpack_require__(/*! ./PriceSlider/PriceSlider */ 646);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_19__ListingSearchFilters_scss__ = __webpack_require__(/*! ./ListingSearchFilters.scss */ 973);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_19__ListingSearchFilters_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_19__ListingSearchFilters_scss__);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar ListingSearchFilters = function (_React$Component) {\n _inherits(ListingSearchFilters, _React$Component);\n\n function ListingSearchFilters(props, context) {\n _classCallCheck(this, ListingSearchFilters);\n\n var _this = _possibleConstructorReturn(this, (ListingSearchFilters.__proto__ || Object.getPrototypeOf(ListingSearchFilters)).call(this, props, context));\n\n _this.shouldComponentUpdate = __WEBPACK_IMPORTED_MODULE_2_react_addons_pure_render_mixin___default.a.shouldComponentUpdate.bind(_this);\n\n __WEBPACK_IMPORTED_MODULE_4_lodash___default.a.bindAll(_this, ['onShowAllFilters', 'onApplyFilters', 'onCancelFilters', 'onRelationshipChange', 'onPriceChange']);\n\n _this.state = {\n showAllFilters: false\n };\n\n __WEBPACK_IMPORTED_MODULE_4_lodash___default.a.extend(_this.state, _this.getStateFromProps(_this.props));\n return _this;\n }\n\n _createClass(ListingSearchFilters, [{\n key: 'componentWillReceiveProps',\n value: function componentWillReceiveProps(nextProps) {\n this.setState(this.getStateFromProps(nextProps));\n }\n }, {\n key: 'getStateFromProps',\n value: function getStateFromProps(props) {\n return {\n filters: props.filters\n };\n }\n }, {\n key: 'toggleShowAllFilters',\n value: function toggleShowAllFilters() {\n var showAllFilters = this.state.showAllFilters;\n\n this.setState({\n showAllFilters: !showAllFilters\n });\n\n this.props.onShowAllFilters(!showAllFilters);\n }\n }, {\n key: 'onRelationshipChange',\n value: function onRelationshipChange(relationshipType) {\n if (__WEBPACK_IMPORTED_MODULE_4_lodash___default.a.isNil(this.props.user)) {\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_16__libs_redirectToSignIn__[\"a\" /* default */])();\n } else {\n this.updateFilters(__WEBPACK_IMPORTED_MODULE_9__enums_ListingsFilterCategoryType__[\"a\" /* default */].RELATIONSHIP_TYPE, relationshipType);\n }\n }\n }, {\n key: 'onShowAllFilters',\n value: function onShowAllFilters() {\n this.toggleShowAllFilters();\n this.originalFilters = __WEBPACK_IMPORTED_MODULE_4_lodash___default.a.cloneDeep(this.state.filters);\n }\n }, {\n key: 'onApplyFilters',\n value: function onApplyFilters() {\n this.toggleShowAllFilters();\n this.props.onFiltersChanged(this.state.filters);\n }\n }, {\n key: 'onCancelFilters',\n value: function onCancelFilters() {\n this.toggleShowAllFilters();\n this.setState({ filters: this.originalFilters });\n }\n }, {\n key: 'onClearFilterTag',\n value: function onClearFilterTag(_ref) {\n var key = _ref.key,\n value = _ref.value,\n selectedValue = _ref.selectedValue;\n\n var filters = Object.assign({}, this.state.filters);\n\n switch (key) {\n case __WEBPACK_IMPORTED_MODULE_10__enums_ListingFilters__[\"a\" /* default */].AMENITY_IDS.key:\n {\n filters.amenityIds = __WEBPACK_IMPORTED_MODULE_4_lodash___default.a.without(filters.amenityIds, selectedValue);\n break;\n }\n case __WEBPACK_IMPORTED_MODULE_10__enums_ListingFilters__[\"a\" /* default */].ROOM_TYPES.key:\n {\n filters.roomTypes = __WEBPACK_IMPORTED_MODULE_4_lodash___default.a.without(filters.roomTypes, selectedValue);\n break;\n }\n default:\n {\n delete filters[value];\n }\n }\n\n this.props.onFiltersChanged(filters);\n }\n }, {\n key: 'onCategoryEntryChange',\n value: function onCategoryEntryChange(categoryEnum, categoryEntryEnum, event) {\n var isAdd = event.target.checked;\n\n // clone so we don't modify the state\n var categoryValues = __WEBPACK_IMPORTED_MODULE_4_lodash___default.a.clone(this.getCategoryValue(categoryEnum));\n var value = categoryEntryEnum.value;\n\n if (isAdd) {\n if (!categoryValues) {\n categoryValues = [];\n }\n categoryValues.push(value);\n } else {\n categoryValues.splice(categoryValues.indexOf(value), 1);\n }\n\n this.updateFilters(categoryEnum, categoryValues);\n }\n }, {\n key: 'updateFilters',\n value: function updateFilters(categoryEnum, newValues) {\n var filters = Object.assign({}, this.state.filters);\n filters[categoryEnum.value] = newValues;\n\n if (!this.state.showAllFilters) {\n this.props.onFiltersChanged(filters);\n } else {\n this.setState({ filters: filters });\n }\n }\n }, {\n key: 'getCategoryValue',\n value: function getCategoryValue(categoryEnum) {\n var filterKey = categoryEnum.value;\n return this.state.filters[filterKey];\n }\n }, {\n key: 'hasCategoryEntryValue',\n value: function hasCategoryEntryValue(categoryEnum, categoryEntryEnum) {\n var categoryEntryValue = this.getCategoryValue(categoryEnum);\n return categoryEntryValue !== undefined && categoryEntryValue.indexOf(categoryEntryEnum.value) !== -1;\n }\n }, {\n key: 'isInitialFilter',\n value: function isInitialFilter(listingsFilterCategoryType) {\n return ListingSearchFilters.INITIAL_FILTERS.indexOf(listingsFilterCategoryType.value) !== -1;\n }\n }, {\n key: 'shouldRenderCategory',\n value: function shouldRenderCategory(filterCategoryType) {\n return this.state.showAllFilters || this.isInitialFilter(filterCategoryType);\n }\n }, {\n key: 'renderRoomTypeEntryValue',\n value: function renderRoomTypeEntryValue(categoryEntry) {\n var _this2 = this;\n\n var category = __WEBPACK_IMPORTED_MODULE_9__enums_ListingsFilterCategoryType__[\"a\" /* default */].ROOM_TYPES;\n var label = categoryEntry.label,\n value = categoryEntry.value;\n\n var checked = this.hasCategoryEntryValue(category, categoryEntry);\n\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n { className: 'col-xs-4' },\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'label',\n { htmlFor: 'room-type-checkbox-' + __WEBPACK_IMPORTED_MODULE_4_lodash___default.a.kebabCase(value), className: __WEBPACK_IMPORTED_MODULE_19__ListingSearchFilters_scss___default.a.roomType },\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_19__ListingSearchFilters_scss___default.a.checkBoxInputCol },\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('input', {\n id: 'room-type-checkbox-' + __WEBPACK_IMPORTED_MODULE_4_lodash___default.a.kebabCase(value),\n className: __WEBPACK_IMPORTED_MODULE_19__ListingSearchFilters_scss___default.a.roomTypeCheckbox,\n value: value,\n type: 'checkbox',\n onChange: function onChange(event) {\n return _this2.onCategoryEntryChange(category, categoryEntry, event);\n },\n checked: checked\n })\n ),\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_19__ListingSearchFilters_scss___default.a.checkBoxLabelCol },\n label\n )\n )\n );\n }\n }, {\n key: 'renderCategoryEntryValue',\n value: function renderCategoryEntryValue(category, categoryEntry) {\n var _this3 = this;\n\n var label = categoryEntry.label,\n value = categoryEntry.value;\n\n var checked = this.hasCategoryEntryValue(category, categoryEntry);\n var checkboxId = 'toggle-filter-' + __WEBPACK_IMPORTED_MODULE_4_lodash___default.a.kebabCase(categoryEntry.key);\n\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n { className: 'col-sm-4', key: value },\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'label',\n { htmlFor: checkboxId, className: __WEBPACK_IMPORTED_MODULE_19__ListingSearchFilters_scss___default.a.checkboxFilter },\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_19__ListingSearchFilters_scss___default.a.checkBoxInputCol },\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('input', {\n id: checkboxId,\n value: value,\n type: 'checkbox',\n onChange: function onChange(event) {\n return _this3.onCategoryEntryChange(category, categoryEntry, event);\n },\n checked: checked\n })\n ),\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_19__ListingSearchFilters_scss___default.a.checkBoxLabelCol },\n label\n )\n )\n );\n }\n\n /*\n * Room Type filters\n */\n\n }, {\n key: 'renderRoomType',\n value: function renderRoomType() {\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n { className: 'row' },\n this.renderRoomTypeEntryValue(__WEBPACK_IMPORTED_MODULE_7__enums_RoomType__[\"a\" /* default */].ENTIRE_HOME),\n this.renderRoomTypeEntryValue(__WEBPACK_IMPORTED_MODULE_7__enums_RoomType__[\"a\" /* default */].PRIVATE_ROOM),\n this.renderRoomTypeEntryValue(__WEBPACK_IMPORTED_MODULE_7__enums_RoomType__[\"a\" /* default */].SHARED_ROOM)\n );\n }\n\n /*\n * Relationship Type filter\n */\n\n }, {\n key: 'renderRelationshipType',\n value: function renderRelationshipType() {\n var value = this.getCategoryValue(__WEBPACK_IMPORTED_MODULE_9__enums_ListingsFilterCategoryType__[\"a\" /* default */].RELATIONSHIP_TYPE);\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n { className: 'row' },\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_17__RelationshipTypeFilter_RelationshipTypeFilter__[\"a\" /* default */], { onRelationshipChange: this.onRelationshipChange, value: value })\n );\n }\n\n /*\n * Price Filter\n */\n\n }, {\n key: 'onPriceChange',\n value: function onPriceChange(priceRange) {\n this.updateFilters(__WEBPACK_IMPORTED_MODULE_9__enums_ListingsFilterCategoryType__[\"a\" /* default */].PRICE, priceRange);\n }\n }, {\n key: 'renderPriceSlider',\n value: function renderPriceSlider() {\n var value = this.getCategoryValue(__WEBPACK_IMPORTED_MODULE_9__enums_ListingsFilterCategoryType__[\"a\" /* default */].PRICE);\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n null,\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_18__PriceSlider_PriceSlider__[\"a\" /* default */], { onPriceChange: this.onPriceChange, value: value })\n );\n }\n\n /*\n * Amenities Filters\n */\n\n }, {\n key: 'renderAmenities',\n value: function renderAmenities() {\n var amenitiesPerRow = 3;\n\n // Sort the amenities\n var amenities = __WEBPACK_IMPORTED_MODULE_12__libs_amenitiesUtils__[\"a\" /* default */].getSortedAmenities();\n\n var amenitiesRowsContent = this.renderAmenitiesRows(amenities, amenitiesPerRow);\n\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n null,\n amenitiesRowsContent\n );\n }\n }, {\n key: 'renderAmenitiesRow',\n value: function renderAmenitiesRow(amenities, i) {\n var _this4 = this;\n\n var content = amenities.map(function (amenity) {\n return _this4.renderCategoryEntryValue(__WEBPACK_IMPORTED_MODULE_9__enums_ListingsFilterCategoryType__[\"a\" /* default */].AMENITY_IDS, amenity);\n });\n\n var className = i !== 0 ? __WEBPACK_IMPORTED_MODULE_19__ListingSearchFilters_scss___default.a.amenitiesExtraRow : __WEBPACK_IMPORTED_MODULE_19__ListingSearchFilters_scss___default.a.amenitiesFirstRow;\n\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n { key: i, className: __WEBPACK_IMPORTED_MODULE_3_classnames___default()('row', className) },\n content\n );\n }\n }, {\n key: 'renderAmenitiesRows',\n value: function renderAmenitiesRows(amenities, amenitiesPerRow) {\n var _this5 = this;\n\n var amenityRows = __WEBPACK_IMPORTED_MODULE_4_lodash___default.a.chunk(amenities, amenitiesPerRow);\n var content = amenityRows.map(function (row, i) {\n return _this5.renderAmenitiesRow(row, i + 1);\n });\n\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n null,\n content\n );\n }\n\n // return true if the amenity is not in the first row\n\n }, {\n key: 'isOtherAmenity',\n value: function isOtherAmenity(amenity) {\n var firstRowAmenity = ListingSearchFilters.FIRST_ROW_AMENITIES.find(function (_firstRowAmenity) {\n return _firstRowAmenity.value === amenity.value;\n });\n\n return firstRowAmenity === undefined;\n }\n\n /*\n * Size Filters\n */\n\n }, {\n key: 'renderListingDetailCategory',\n value: function renderListingDetailCategory(listingDetailEnum) {\n var label = listingDetailEnum.label,\n attr = listingDetailEnum.attr,\n values = listingDetailEnum.values;\n\n\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_3_classnames___default()('col-sm-4', __WEBPACK_IMPORTED_MODULE_19__ListingSearchFilters_scss___default.a.rowSpaceSm) },\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_19__ListingSearchFilters_scss___default.a.sizeCategory },\n this.renderDropDownItems(label, attr, values)\n )\n );\n }\n }, {\n key: 'renderListingDetailCategories',\n value: function renderListingDetailCategories() {\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n { className: 'row' },\n this.renderListingDetailCategory(__WEBPACK_IMPORTED_MODULE_8__enums_ListingDetails__[\"a\" /* default */].BEDROOMS),\n this.renderListingDetailCategory(__WEBPACK_IMPORTED_MODULE_8__enums_ListingDetails__[\"a\" /* default */].BATHROOMS),\n this.renderListingDetailCategory(__WEBPACK_IMPORTED_MODULE_8__enums_ListingDetails__[\"a\" /* default */].BEDS)\n );\n }\n }, {\n key: 'onListingDetailChange',\n value: function onListingDetailChange(listingDetailKey, value) {\n var filters = Object.assign({}, this.state.filters);\n if (value === -1) {\n delete filters[listingDetailKey];\n } else {\n filters[listingDetailKey] = value;\n }\n this.setState({ filters: filters });\n\n if (listingDetailKey === __WEBPACK_IMPORTED_MODULE_8__enums_ListingDetails__[\"a\" /* default */].GUESTS.attr) {\n this.props.onFiltersChanged(filters);\n }\n }\n }, {\n key: 'renderDropDownItems',\n value: function renderDropDownItems(label, name, values) {\n var _this6 = this;\n\n var filters = this.state.filters;\n\n var filterValue = filters[name];\n\n var title = this.renderListingDetailCategoryValueMenuLabel(label, filterValue, false);\n\n var titleMenuItem = __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_5_react_bootstrap__[\"d\" /* MenuItem */],\n { eventKey: -1, key: -1 },\n label\n );\n\n var menuItems = values.map(function (value, i) {\n var isLast = i === values.length - 1;\n var menuLabel = _this6.renderListingDetailCategoryValueMenuLabel(label, value.value, isLast);\n\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_5_react_bootstrap__[\"d\" /* MenuItem */],\n { eventKey: value.value, key: value.value },\n menuLabel\n );\n });\n\n menuItems.unshift(titleMenuItem);\n\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_5_react_bootstrap__[\"e\" /* ButtonGroup */],\n { justified: true, className: __WEBPACK_IMPORTED_MODULE_19__ListingSearchFilters_scss___default.a.buttonGroupFullWidth },\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_5_react_bootstrap__[\"f\" /* DropdownButton */],\n {\n title: title,\n id: label,\n onSelect: function onSelect(eventKey, _event) {\n return _this6.onListingDetailChange(name, eventKey);\n }\n },\n menuItems\n )\n );\n }\n }, {\n key: 'renderListingDetailCategoryValueMenuLabel',\n value: function renderListingDetailCategoryValueMenuLabel(label, value, isLast) {\n var inflectedLabel = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6_inflection__[\"inflect\"])(label, value);\n var modifier = isLast ? '+' : '';\n if (__WEBPACK_IMPORTED_MODULE_4_lodash___default.a.isNumber(value)) {\n return '' + value + modifier + ' ' + inflectedLabel;\n }\n\n return label;\n }\n }, {\n key: 'renderCategory',\n value: function renderCategory(listingsFilterCategoryType) {\n if (!this.shouldRenderCategory(listingsFilterCategoryType)) {\n return null;\n }\n\n var label = listingsFilterCategoryType.label;\n\n\n var content = void 0;\n var extraContent = void 0;\n\n switch (listingsFilterCategoryType) {\n case __WEBPACK_IMPORTED_MODULE_9__enums_ListingsFilterCategoryType__[\"a\" /* default */].ROOM_TYPES:\n content = this.renderRoomType();\n break;\n case __WEBPACK_IMPORTED_MODULE_9__enums_ListingsFilterCategoryType__[\"a\" /* default */].RELATIONSHIP_TYPE:\n content = this.renderRelationshipType();\n break;\n case __WEBPACK_IMPORTED_MODULE_9__enums_ListingsFilterCategoryType__[\"a\" /* default */].PRICE:\n content = this.renderPriceSlider();\n break;\n case __WEBPACK_IMPORTED_MODULE_9__enums_ListingsFilterCategoryType__[\"a\" /* default */].SIZE:\n content = this.renderListingDetailCategories();\n break;\n case __WEBPACK_IMPORTED_MODULE_9__enums_ListingsFilterCategoryType__[\"a\" /* default */].AMENITY_IDS:\n content = this.renderAmenities();\n break;\n case __WEBPACK_IMPORTED_MODULE_9__enums_ListingsFilterCategoryType__[\"a\" /* default */].GUESTS:\n content = this.renderGuests();\n break;\n default:\n content = null;\n }\n\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_3_classnames___default()('row', __WEBPACK_IMPORTED_MODULE_19__ListingSearchFilters_scss___default.a.filterCategory) },\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('div', { className: __WEBPACK_IMPORTED_MODULE_19__ListingSearchFilters_scss___default.a.filterCategoryDivider }),\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_3_classnames___default()('col-md-2', __WEBPACK_IMPORTED_MODULE_19__ListingSearchFilters_scss___default.a.rowSpaceSm, __WEBPACK_IMPORTED_MODULE_19__ListingSearchFilters_scss___default.a.centerSm, __WEBPACK_IMPORTED_MODULE_19__ListingSearchFilters_scss___default.a.categoryLabel) },\n label,\n listingsFilterCategoryType === __WEBPACK_IMPORTED_MODULE_9__enums_ListingsFilterCategoryType__[\"a\" /* default */].RELATIONSHIP_TYPE && __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_5_react_bootstrap__[\"a\" /* OverlayTrigger */],\n {\n trigger: ['hover', 'focus'],\n placement: 'bottom',\n overlay: __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_5_react_bootstrap__[\"b\" /* Tooltip */],\n { id: 'relationship-type-tooltip' },\n 'All listings show if neither option is picked'\n )\n },\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'span',\n { className: __WEBPACK_IMPORTED_MODULE_3_classnames___default()(__WEBPACK_IMPORTED_MODULE_19__ListingSearchFilters_scss___default.a.relationshipTypeHelp) },\n '?'\n )\n )\n ),\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n { className: 'col-md-9 col-xs-12' },\n content\n ),\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n { className: 'col-md-1 col-xs-12' },\n extraContent\n )\n );\n }\n\n /**\n * Action Bar\n */\n\n }, {\n key: 'renderActionBarButtons',\n value: function renderActionBarButtons() {\n var totalCount = this.props.totalCount;\n var showAllFilters = this.state.showAllFilters;\n\n var filtersEqual = __WEBPACK_IMPORTED_MODULE_4_lodash___default.a.isEqual(this.state.filters, this.originalFilters);\n var applyClassName = filtersEqual ? 'disabled' : '';\n\n var onApplyFilters = filtersEqual ? null : this.onApplyFilters;\n\n if (showAllFilters) {\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n { className: 'container-fluid' },\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n { className: 'row' },\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n { className: 'col-xs-6' },\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_5_react_bootstrap__[\"g\" /* Button */],\n { onClick: this.onCancelFilters },\n 'Cancel'\n )\n ),\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n { className: 'col-xs-6' },\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_5_react_bootstrap__[\"g\" /* Button */],\n { className: applyClassName, bsStyle: 'primary', onClick: onApplyFilters },\n 'Apply Filters'\n )\n )\n )\n );\n }\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n { className: 'row' },\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n { className: 'col-xs-9 col-sm-8' },\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_5_react_bootstrap__[\"g\" /* Button */],\n {\n bsStyle: 'primary',\n className: __WEBPACK_IMPORTED_MODULE_3_classnames___default()(__WEBPACK_IMPORTED_MODULE_19__ListingSearchFilters_scss___default.a.moreFiltersButton, __WEBPACK_IMPORTED_MODULE_19__ListingSearchFilters_scss___default.a.actionBarButton),\n onClick: this.onShowAllFilters\n },\n 'More Filters'\n ),\n this.renderAppliedFilterTags()\n ),\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_3_classnames___default()('col-xs-3', 'col-sm-4', __WEBPACK_IMPORTED_MODULE_19__ListingSearchFilters_scss___default.a.listingsCount) },\n totalCount + ' ' + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6_inflection__[\"inflect\"])('listing', totalCount) + ' found'\n )\n );\n }\n }, {\n key: 'getFilterSelectedValues',\n value: function getFilterSelectedValues(filter) {\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_13__libs_utils__[\"g\" /* toArray */])(this.state.filters[filter.value]);\n }\n }, {\n key: 'getFilterTagLabel',\n value: function getFilterTagLabel(value, filter, category) {\n switch (category) {\n case __WEBPACK_IMPORTED_MODULE_9__enums_ListingsFilterCategoryType__[\"a\" /* default */].SIZE:\n return value + ' ' + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6_inflection__[\"inflect\"])(filter.label, value);\n case __WEBPACK_IMPORTED_MODULE_9__enums_ListingsFilterCategoryType__[\"a\" /* default */].ROOM_TYPES:\n return __WEBPACK_IMPORTED_MODULE_4_lodash___default.a.find(__WEBPACK_IMPORTED_MODULE_7__enums_RoomType__[\"a\" /* default */].items(), function (item) {\n return item.value === value;\n }).label;\n case __WEBPACK_IMPORTED_MODULE_9__enums_ListingsFilterCategoryType__[\"a\" /* default */].AMENITY_IDS:\n return __WEBPACK_IMPORTED_MODULE_4_lodash___default.a.find(__WEBPACK_IMPORTED_MODULE_11__enums_Amenity__[\"a\" /* default */].items(), function (item) {\n return item.value === value;\n }).label;\n default:\n return null;\n }\n }\n }, {\n key: 'getFilterTags',\n value: function getFilterTags(filters, category) {\n var _this7 = this;\n\n return __WEBPACK_IMPORTED_MODULE_4_lodash___default.a.flatMap(filters, function (filter) {\n var selectedValues = _this7.getFilterSelectedValues(filter);\n\n var addTagLabel = function addTagLabel(value) {\n var label = _this7.getFilterTagLabel(value, filter, category);\n return _extends({}, filter, { label: label, selectedValue: value });\n };\n\n return __WEBPACK_IMPORTED_MODULE_4_lodash___default.a.map(selectedValues, addTagLabel);\n });\n }\n }, {\n key: 'renderFilterTagsByCategory',\n value: function renderFilterTagsByCategory(category) {\n var _this8 = this;\n\n if (this.isInitialFilter(category)) {\n return null;\n }\n\n var isActive = function isActive(filter) {\n return _this8.state.filters[filter.value] !== undefined;\n };\n var activeFilters = __WEBPACK_IMPORTED_MODULE_4_lodash___default.a.filter(category.filters, isActive);\n var filterTags = this.getFilterTags(activeFilters, category);\n\n return __WEBPACK_IMPORTED_MODULE_4_lodash___default.a.map(filterTags, function (filterTag) {\n return _this8.renderFilterTag(filterTag);\n });\n }\n }, {\n key: 'renderFilterTag',\n value: function renderFilterTag(filterTag) {\n var _this9 = this;\n\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'span',\n { className: __WEBPACK_IMPORTED_MODULE_19__ListingSearchFilters_scss___default.a.actionBarTag, key: filterTag.label },\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_5_react_bootstrap__[\"g\" /* Button */],\n {\n className: __WEBPACK_IMPORTED_MODULE_3_classnames___default()(__WEBPACK_IMPORTED_MODULE_19__ListingSearchFilters_scss___default.a.actionBarButton, __WEBPACK_IMPORTED_MODULE_19__ListingSearchFilters_scss___default.a.actionFilterBarButton),\n onClick: function onClick() {\n return _this9.onClearFilterTag(filterTag);\n }\n },\n filterTag.label,\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'span',\n { className: __WEBPACK_IMPORTED_MODULE_19__ListingSearchFilters_scss___default.a.actionBarRemoveTag },\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_15__libs_components_icons_IconClose__[\"a\" /* default */], null)\n )\n )\n );\n }\n }, {\n key: 'renderAppliedFilterTags',\n value: function renderAppliedFilterTags() {\n var _this10 = this;\n\n var categories = __WEBPACK_IMPORTED_MODULE_9__enums_ListingsFilterCategoryType__[\"a\" /* default */].items();\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'span',\n null,\n categories.map(function (category) {\n return _this10.renderFilterTagsByCategory(category);\n })\n );\n }\n }, {\n key: 'renderGuests',\n value: function renderGuests() {\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n { className: 'row' },\n this.renderListingDetailCategory(__WEBPACK_IMPORTED_MODULE_8__enums_ListingDetails__[\"a\" /* default */].GUESTS)\n );\n }\n }, {\n key: 'render',\n value: function render() {\n var showAllFilters = this.state.showAllFilters;\n\n var actionBarClassName = showAllFilters ? __WEBPACK_IMPORTED_MODULE_19__ListingSearchFilters_scss___default.a.actionBarExpanded : __WEBPACK_IMPORTED_MODULE_19__ListingSearchFilters_scss___default.a.actionBar;\n var filterCategoriesClassName = showAllFilters ? __WEBPACK_IMPORTED_MODULE_19__ListingSearchFilters_scss___default.a.filtersExpanded : __WEBPACK_IMPORTED_MODULE_19__ListingSearchFilters_scss___default.a.filters;\n\n var hideXs = showAllFilters ? '' : 'hidden-xs';\n\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n null,\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_3_classnames___default()(hideXs, __WEBPACK_IMPORTED_MODULE_19__ListingSearchFilters_scss___default.a.filters) },\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n { className: filterCategoriesClassName },\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n { className: 'container-fluid' },\n this.renderCategory(__WEBPACK_IMPORTED_MODULE_9__enums_ListingsFilterCategoryType__[\"a\" /* default */].GUESTS),\n this.renderCategory(__WEBPACK_IMPORTED_MODULE_9__enums_ListingsFilterCategoryType__[\"a\" /* default */].RELATIONSHIP_TYPE),\n this.renderCategory(__WEBPACK_IMPORTED_MODULE_9__enums_ListingsFilterCategoryType__[\"a\" /* default */].PRICE),\n this.renderCategory(__WEBPACK_IMPORTED_MODULE_9__enums_ListingsFilterCategoryType__[\"a\" /* default */].ROOM_TYPES),\n this.renderCategory(__WEBPACK_IMPORTED_MODULE_9__enums_ListingsFilterCategoryType__[\"a\" /* default */].SIZE),\n this.renderCategory(__WEBPACK_IMPORTED_MODULE_9__enums_ListingsFilterCategoryType__[\"a\" /* default */].AMENITY_IDS)\n )\n ),\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n { className: actionBarClassName },\n this.renderActionBarButtons()\n )\n ),\n !showAllFilters && __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_5_react_bootstrap__[\"g\" /* Button */],\n {\n bsStyle: 'primary',\n className: __WEBPACK_IMPORTED_MODULE_3_classnames___default()(__WEBPACK_IMPORTED_MODULE_19__ListingSearchFilters_scss___default.a.filterButtomSm, 'visible-xs-inline'),\n onClick: this.onShowAllFilters\n },\n 'More Filters'\n )\n );\n }\n }]);\n\n return ListingSearchFilters;\n}(__WEBPACK_IMPORTED_MODULE_1_react___default.a.Component);\n\nListingSearchFilters.propTypes = {\n className: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string,\n onFiltersChanged: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired,\n onShowAllFilters: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired,\n filters: __WEBPACK_IMPORTED_MODULE_14__libs_propTypeShapes__[\"e\" /* listingFiltersShape */].isRequired,\n totalCount: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number.isRequired,\n meta: __WEBPACK_IMPORTED_MODULE_14__libs_propTypeShapes__[\"d\" /* searchMetaShape */].isRequired,\n onSearch: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired,\n user: __WEBPACK_IMPORTED_MODULE_14__libs_propTypeShapes__[\"b\" /* userInfoShape */]\n};\nListingSearchFilters.INITIAL_FILTERS = [__WEBPACK_IMPORTED_MODULE_9__enums_ListingsFilterCategoryType__[\"a\" /* default */].GUESTS.value, __WEBPACK_IMPORTED_MODULE_9__enums_ListingsFilterCategoryType__[\"a\" /* default */].RELATIONSHIP_TYPE.value, __WEBPACK_IMPORTED_MODULE_9__enums_ListingsFilterCategoryType__[\"a\" /* default */].PRICE.value];\nListingSearchFilters.FIRST_ROW_AMENITIES = [__WEBPACK_IMPORTED_MODULE_11__enums_Amenity__[\"a\" /* default */].WIFI, __WEBPACK_IMPORTED_MODULE_11__enums_Amenity__[\"a\" /* default */].KITCHEN, __WEBPACK_IMPORTED_MODULE_11__enums_Amenity__[\"a\" /* default */].PARKING_SPACE];\n/* harmony default export */ __webpack_exports__[\"a\"] = (ListingSearchFilters);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-index/components/ListingSearchFilters/ListingSearchFilters.jsx\n// module id = 645\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-index/components/ListingSearchFilters/ListingSearchFilters.jsx?", + ); + + /***/ + }, + /* 646 */ + /* exports provided: default */ + /* exports used: default */ + /*!************************************************************************************************!*\ + !*** ./app/bundles/listings-index/components/ListingSearchFilters/PriceSlider/PriceSlider.jsx ***! + \************************************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_rc_slider__ = __webpack_require__(/*! rc-slider */ 1235);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_rc_slider___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_rc_slider__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_lodash__ = __webpack_require__(/*! lodash */ 19);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_lodash___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_lodash__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__assets_styles_vendor_rc_slider_rc_slider_scss__ = __webpack_require__(/*! ../../../../../assets/styles/vendor/rc-slider/rc-slider.scss */ 961);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__assets_styles_vendor_rc_slider_rc_slider_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__assets_styles_vendor_rc_slider_rc_slider_scss__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__PriceSlider_scss__ = __webpack_require__(/*! ./PriceSlider.scss */ 974);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__PriceSlider_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5__PriceSlider_scss__);\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\n\n\n\n\n\n\n\nvar PriceSlider = function (_React$Component) {\n _inherits(PriceSlider, _React$Component);\n\n function PriceSlider(props, context) {\n _classCallCheck(this, PriceSlider);\n\n var _this = _possibleConstructorReturn(this, (PriceSlider.__proto__ || Object.getPrototypeOf(PriceSlider)).call(this, props, context));\n\n __WEBPACK_IMPORTED_MODULE_3_lodash___default.a.bindAll(_this, ['onSelectionDone', 'updateSelectedPriceRange']);\n\n _this.state = _this.getStateFromProps(_this.props);\n return _this;\n }\n\n _createClass(PriceSlider, [{\n key: 'componentWillReceiveProps',\n value: function componentWillReceiveProps(nextProps) {\n this.setState(this.getStateFromProps(nextProps));\n }\n }, {\n key: 'getStateFromProps',\n value: function getStateFromProps(props) {\n var value = props.value || [PriceSlider.MIN, PriceSlider.MAX];\n\n // jscs:disable disallowArrayDestructuringReturn\n\n var _ensureOrder = this.ensureOrder(value),\n _ensureOrder2 = _slicedToArray(_ensureOrder, 2),\n defaultMin = _ensureOrder2[0],\n defaultMax = _ensureOrder2[1];\n\n // jscs:enable disallowArrayDestructuringReturn\n\n return {\n selectedPriceRange: [defaultMin, defaultMax]\n };\n }\n }, {\n key: 'rangeToLogScale',\n value: function rangeToLogScale(selectedPriceRange) {\n var _this2 = this;\n\n return selectedPriceRange.map(function (value) {\n return _this2.toLogScale(value);\n });\n }\n }, {\n key: 'getLogFactors',\n value: function getLogFactors() {\n var minp = PriceSlider.MIN;\n var maxp = PriceSlider.MAX;\n\n var minv = Math.log(PriceSlider.MIN);\n var maxv = Math.log(PriceSlider.MAX);\n\n var scale = (maxv - minv) / (maxp - minp);\n return { minp: minp, maxp: maxp, minv: minv, maxv: maxv, scale: scale };\n }\n }, {\n key: 'toLogScale',\n value: function toLogScale(value) {\n var _getLogFactors = this.getLogFactors(),\n minp = _getLogFactors.minp,\n minv = _getLogFactors.minv,\n scale = _getLogFactors.scale;\n\n return Math.floor(Math.exp(minv + scale * (value - minp)));\n }\n }, {\n key: 'invToLogScale',\n value: function invToLogScale(value) {\n var _getLogFactors2 = this.getLogFactors(),\n minp = _getLogFactors2.minp,\n minv = _getLogFactors2.minv,\n scale = _getLogFactors2.scale;\n\n return (Math.log(value) - minv) / scale + minp;\n }\n }, {\n key: 'ensureOrder',\n value: function ensureOrder(priceRange) {\n var _priceRange = _slicedToArray(priceRange, 2),\n min = _priceRange[0],\n max = _priceRange[1];\n\n if (min > max) {\n return [max, min];\n }\n return priceRange;\n }\n }, {\n key: 'updateSelectedPriceRange',\n value: function updateSelectedPriceRange(selectedPriceRange) {\n this.setState({ selectedPriceRange: this.rangeToLogScale(selectedPriceRange) });\n }\n }, {\n key: 'onSelectionDone',\n value: function onSelectionDone(selectedPriceRange) {\n var priceRange = this.ensureOrder(this.rangeToLogScale(selectedPriceRange));\n\n if (this.fullRangeSelected(priceRange)) {\n this.props.onPriceChange([]);\n } else {\n this.props.onPriceChange(priceRange);\n }\n }\n }, {\n key: 'fullRangeSelected',\n value: function fullRangeSelected(priceRange) {\n return __WEBPACK_IMPORTED_MODULE_3_lodash___default.a.isEqual(priceRange, [PriceSlider.MIN, PriceSlider.MAX - 1]);\n }\n }, {\n key: 'render',\n value: function render() {\n var onChange = __WEBPACK_IMPORTED_MODULE_3_lodash___default.a.debounce(this.updateSelectedPriceRange, 10);\n var selectedPriceRange = this.state.selectedPriceRange;\n\n\n var minPriceLabel = '$' + selectedPriceRange[0];\n var maxPriceLabel = '$' + selectedPriceRange[1] + ' ' + (selectedPriceRange[1] === PriceSlider.MAX ? '+' : '');\n\n var value = [this.invToLogScale(selectedPriceRange[0]), this.invToLogScale(selectedPriceRange[1])];\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { id: 'price-slider', className: __WEBPACK_IMPORTED_MODULE_5__PriceSlider_scss___default.a.sliderContainer },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2_rc_slider__[\"Range\"], {\n min: PriceSlider.MIN,\n max: PriceSlider.MAX,\n allowCross: false,\n defaultValue: value,\n onChange: onChange,\n onAfterChange: this.onSelectionDone\n }),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { id: 'min-price', value: selectedPriceRange[0], className: __WEBPACK_IMPORTED_MODULE_5__PriceSlider_scss___default.a.minPriceDiv },\n minPriceLabel\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { id: 'max-price', value: selectedPriceRange[1], className: __WEBPACK_IMPORTED_MODULE_5__PriceSlider_scss___default.a.maxPriceDiv },\n maxPriceLabel\n )\n );\n }\n }]);\n\n return PriceSlider;\n}(__WEBPACK_IMPORTED_MODULE_0_react___default.a.Component);\n\nPriceSlider.propTypes = {\n onPriceChange: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func.isRequired,\n value: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.arrayOf(__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number)\n};\nPriceSlider.MIN = 10;\nPriceSlider.MAX = 1000;\n/* harmony default export */ __webpack_exports__[\"a\"] = (PriceSlider);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-index/components/ListingSearchFilters/PriceSlider/PriceSlider.jsx\n// module id = 646\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-index/components/ListingSearchFilters/PriceSlider/PriceSlider.jsx?", + ); + + /***/ + }, + /* 647 */ + /* exports provided: default */ + /* exports used: default */ + /*!**********************************************************************************************************************!*\ + !*** ./app/bundles/listings-index/components/ListingSearchFilters/RelationshipTypeFilter/RelationshipTypeFilter.jsx ***! + \**********************************************************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_bootstrap__ = __webpack_require__(/*! react-bootstrap */ 31);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_lodash__ = __webpack_require__(/*! lodash */ 19);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_lodash___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_lodash__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__libs_components_icons_IconContact__ = __webpack_require__(/*! ../../../../../libs/components/icons/IconContact */ 304);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__libs_components_icons_IconMembership__ = __webpack_require__(/*! ../../../../../libs/components/icons/IconMembership */ 189);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__libs_utils_Enum__ = __webpack_require__(/*! ../../../../../libs/utils/Enum */ 22);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__enums_RelationshipType__ = __webpack_require__(/*! ../../../../../enums/RelationshipType */ 87);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__RelationshipTypeFilter_scss__ = __webpack_require__(/*! ./RelationshipTypeFilter.scss */ 975);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__RelationshipTypeFilter_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9__RelationshipTypeFilter_scss__);\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _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\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar RelationshipTypeEnum = new __WEBPACK_IMPORTED_MODULE_7__libs_utils_Enum__[\"a\" /* default */]({\n CONTACTS: {\n relationshipType: __WEBPACK_IMPORTED_MODULE_8__enums_RelationshipType__[\"a\" /* default */].FRIEND,\n id: 'contacts',\n tooltipText: 'Facebook friends',\n label: 'Contacts',\n stateKey: 'contactsValue',\n Icon: __WEBPACK_IMPORTED_MODULE_5__libs_components_icons_IconContact__[\"a\" /* default */]\n },\n MEMBERSHIP: {\n relationshipType: __WEBPACK_IMPORTED_MODULE_8__enums_RelationshipType__[\"a\" /* default */].MEMBERSHIP,\n id: 'membership',\n tooltipText: 'Listings where you\\'re on the guest list',\n label: 'On Guest List',\n stateKey: 'membershipValue',\n Icon: __WEBPACK_IMPORTED_MODULE_6__libs_components_icons_IconMembership__[\"a\" /* default */]\n }\n});\n\nvar RelationshipTypeFilter = function (_React$Component) {\n _inherits(RelationshipTypeFilter, _React$Component);\n\n _createClass(RelationshipTypeFilter, null, [{\n key: 'getStateFromProps',\n value: function getStateFromProps(props) {\n var value = props.value || '';\n\n var contactsChecked = value === __WEBPACK_IMPORTED_MODULE_8__enums_RelationshipType__[\"a\" /* default */].FRIEND.value;\n var membershipChecked = contactsChecked || value === __WEBPACK_IMPORTED_MODULE_8__enums_RelationshipType__[\"a\" /* default */].MEMBERSHIP.value;\n\n return {\n contactsValue: contactsChecked,\n membershipValue: membershipChecked\n };\n }\n }]);\n\n function RelationshipTypeFilter(props, context) {\n _classCallCheck(this, RelationshipTypeFilter);\n\n var _this = _possibleConstructorReturn(this, (RelationshipTypeFilter.__proto__ || Object.getPrototypeOf(RelationshipTypeFilter)).call(this, props, context));\n\n _this.state = RelationshipTypeFilter.getStateFromProps(props);\n __WEBPACK_IMPORTED_MODULE_4_lodash___default.a.bindAll(_this, ['handleRelationshipTypeChange']);\n return _this;\n }\n\n _createClass(RelationshipTypeFilter, [{\n key: 'componentWillReceiveProps',\n value: function componentWillReceiveProps(nextProps) {\n this.setState(RelationshipTypeFilter.getStateFromProps(nextProps));\n }\n }, {\n key: 'handleRelationshipTypeChange',\n value: function handleRelationshipTypeChange(input) {\n var inputId = input.target.id;\n var isChecking = input.target.checked;\n var contactsState = this.state.contactsValue;\n\n if (inputId === 'contacts') {\n this.setState({\n contactsValue: isChecking,\n membershipValue: isChecking\n });\n\n this.props.onRelationshipChange(isChecking ? 'fb_friend' : null);\n\n return;\n }\n\n if (inputId === 'membership') {\n this.setState({\n contactsValue: isChecking && contactsState,\n membershipValue: isChecking\n });\n\n this.props.onRelationshipChange(isChecking ? 'membership' : null);\n }\n }\n }, {\n key: 'renderRelationshipType',\n value: function renderRelationshipType(relationshipType) {\n var checked = this.state[relationshipType.stateKey];\n var labelClasses = __WEBPACK_IMPORTED_MODULE_3_classnames___default()('relationship-filter', __WEBPACK_IMPORTED_MODULE_9__RelationshipTypeFilter_scss___default.a.relationshipFilter, __WEBPACK_IMPORTED_MODULE_9__RelationshipTypeFilter_scss___default.a[relationshipType.id], _defineProperty({}, __WEBPACK_IMPORTED_MODULE_9__RelationshipTypeFilter_scss___default.a.checked, checked));\n\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n { className: 'col-md-6' },\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'label',\n {\n htmlFor: relationshipType.id,\n className: labelClasses\n },\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_2_react_bootstrap__[\"a\" /* OverlayTrigger */],\n {\n trigger: ['hover', 'focus'],\n placement: 'bottom',\n overlay: __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_2_react_bootstrap__[\"b\" /* Tooltip */],\n { id: 'tooltip-relationship-filter-contacts' },\n relationshipType.tooltipText\n )\n },\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'span',\n { className: __WEBPACK_IMPORTED_MODULE_9__RelationshipTypeFilter_scss___default.a.icon },\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(relationshipType.Icon, null)\n )\n ),\n relationshipType.label,\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('input', {\n type: 'checkbox',\n className: __WEBPACK_IMPORTED_MODULE_9__RelationshipTypeFilter_scss___default.a.relationshipFilterCheckbox,\n id: relationshipType.id,\n onChange: this.handleRelationshipTypeChange,\n checked: checked\n })\n )\n );\n }\n }, {\n key: 'render',\n value: function render() {\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_9__RelationshipTypeFilter_scss___default.a.relationshipType },\n this.renderRelationshipType(RelationshipTypeEnum.CONTACTS),\n this.renderRelationshipType(RelationshipTypeEnum.MEMBERSHIP)\n );\n }\n }]);\n\n return RelationshipTypeFilter;\n}(__WEBPACK_IMPORTED_MODULE_1_react___default.a.Component);\n\nRelationshipTypeFilter.propTypes = {\n onRelationshipChange: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (RelationshipTypeFilter);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-index/components/ListingSearchFilters/RelationshipTypeFilter/RelationshipTypeFilter.jsx\n// module id = 647\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-index/components/ListingSearchFilters/RelationshipTypeFilter/RelationshipTypeFilter.jsx?", + ); + + /***/ + }, + /* 648 */ + /* exports provided: default */ + /* exports used: default */ + /*!*******************************************************************************************!*\ + !*** ./app/bundles/listings-index/components/ListingSearchFooter/ListingSearchFooter.jsx ***! + \*******************************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__libs_components_icons_IconFacebook__ = __webpack_require__(/*! ../../../../libs/components/icons/IconFacebook */ 860);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__libs_components_icons_IconTwitter__ = __webpack_require__(/*! ../../../../libs/components/icons/IconTwitter */ 875);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__libs_components_icons_IconInstagram__ = __webpack_require__(/*! ../../../../libs/components/icons/IconInstagram */ 865);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__ListingSearchFooter_scss__ = __webpack_require__(/*! ./ListingSearchFooter.scss */ 976);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__ListingSearchFooter_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5__ListingSearchFooter_scss__);\n\n\n\n\n\n\n\n\nvar ListingSearchFooter = function ListingSearchFooter(_ref) {\n var location = _ref.location;\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_5__ListingSearchFooter_scss___default.a.footer },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: 'container-fluid' },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: 'row' },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()('col-sm-12', __WEBPACK_IMPORTED_MODULE_5__ListingSearchFooter_scss___default.a.footerContent) },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: 'pull-left' },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'h1',\n { className: __WEBPACK_IMPORTED_MODULE_5__ListingSearchFooter_scss___default.a.footerHeading },\n 'Vacation rentals in ',\n location\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'p',\n { className: __WEBPACK_IMPORTED_MODULE_5__ListingSearchFooter_scss___default.a.copyrights },\n '\\xA9 2016 Friends and Guests, LLC. All Rights Reserved.'\n )\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'ul',\n { className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()('pull-right', __WEBPACK_IMPORTED_MODULE_5__ListingSearchFooter_scss___default.a.socialIcons) },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'li',\n null,\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'a',\n { href: 'https://www.facebook.com/friendsandguests', target: '_blank', rel: 'noopener noreferrer' },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2__libs_components_icons_IconFacebook__[\"a\" /* default */], null)\n )\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'li',\n null,\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'a',\n { href: 'https://twitter.com/friendsandguest', target: '_blank', rel: 'noopener noreferrer' },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3__libs_components_icons_IconTwitter__[\"a\" /* default */], null)\n )\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'li',\n null,\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'a',\n { href: 'https://www.instagram.com/friendsandguests', target: '_blank', rel: 'noopener noreferrer' },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_4__libs_components_icons_IconInstagram__[\"a\" /* default */], null)\n )\n )\n )\n )\n )\n )\n );\n};\n\nListingSearchFooter.propTypes = {\n location: __webpack_require__(/*! prop-types */ 0).string.isRequired\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (ListingSearchFooter);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-index/components/ListingSearchFooter/ListingSearchFooter.jsx\n// module id = 648\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-index/components/ListingSearchFooter/ListingSearchFooter.jsx?", + ); + + /***/ + }, + /* 649 */ + /* exports provided: default */ + /* exports used: default */ + /*!********************************************************************************************!*\ + !*** ./app/bundles/listings-index/components/common/ListingSearchBox/ListingSearchBox.jsx ***! + \********************************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_addons_pure_render_mixin__ = __webpack_require__(/*! react-addons-pure-render-mixin */ 117);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_addons_pure_render_mixin___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react_addons_pure_render_mixin__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_lodash__ = __webpack_require__(/*! lodash */ 19);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_lodash___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_lodash__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__libs_utils_geo__ = __webpack_require__(/*! ../../../../../libs/utils/geo */ 107);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__libs_components__ = __webpack_require__(/*! ../../../../../libs/components */ 11);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__assets_styles_globals_places_scss__ = __webpack_require__(/*! ../../../../../assets/styles/globals/places.scss */ 960);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__assets_styles_globals_places_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7__assets_styles_globals_places_scss__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__ListingSearchBox_scss__ = __webpack_require__(/*! ./ListingSearchBox.scss */ 977);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__ListingSearchBox_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8__ListingSearchBox_scss__);\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar ListingSearchBox = function (_React$Component) {\n _inherits(ListingSearchBox, _React$Component);\n\n function ListingSearchBox(props, context) {\n _classCallCheck(this, ListingSearchBox);\n\n var _this = _possibleConstructorReturn(this, (ListingSearchBox.__proto__ || Object.getPrototypeOf(ListingSearchBox)).call(this, props, context));\n\n _this.shouldComponentUpdate = __WEBPACK_IMPORTED_MODULE_2_react_addons_pure_render_mixin___default.a.shouldComponentUpdate.bind(_this);\n\n __WEBPACK_IMPORTED_MODULE_4_lodash___default.a.bindAll(_this, ['onChangeLocation', 'onSearchBoxPlaceChanged', 'setSearchInputRef', 'pressListingSearchInput']);\n\n _this.state = _this.getStateFromProps(_this.props);\n\n _this.searchInputRef = null;\n return _this;\n }\n\n _createClass(ListingSearchBox, [{\n key: 'componentWillReceiveProps',\n value: function componentWillReceiveProps(nextProps) {\n this.setState(this.getStateFromProps(nextProps));\n }\n }, {\n key: 'getStateFromProps',\n value: function getStateFromProps(props) {\n return { location: props.location };\n }\n }, {\n key: 'componentDidMount',\n value: function componentDidMount() {\n this.initGoogleMapsAutocomplete();\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n document.body.removeChild(this.getPacContainerEl());\n }\n }, {\n key: 'setSearchInputRef',\n value: function setSearchInputRef(ref) {\n this.searchInputRef = ref;\n }\n }, {\n key: 'getPacContainerEl',\n value: function getPacContainerEl() {\n return document.getElementsByClassName('pac-container')[0];\n }\n }, {\n key: 'initGoogleMapsAutocomplete',\n value: function initGoogleMapsAutocomplete() {\n var input = this.searchInputRef;\n var options = {};\n options.types = ['geocode'];\n\n this.searchBox = new google.maps.places.SearchBox(input);\n\n google.maps.event.addListener(this.searchBox, 'places_changed', this.onSearchBoxPlaceChanged);\n }\n }, {\n key: 'onSearchBoxPlaceChanged',\n value: function onSearchBoxPlaceChanged() {\n var places = this.searchBox.getPlaces();\n var place = void 0;\n\n if (places && places.length > 0) {\n place = places[0];\n }\n\n if (!place || !place.geometry) {\n return;\n }\n this.onPlaceChanged(place);\n }\n }, {\n key: 'pressListingSearchInput',\n value: function pressListingSearchInput() {\n var listingsSearchBoxInput = document.getElementById('listingsSearchBoxInput');\n google.maps.event.trigger(listingsSearchBoxInput, 'focus');\n google.maps.event.trigger(listingsSearchBoxInput, 'keydown', {\n keyCode: 13\n });\n }\n }, {\n key: 'getGeoBounds',\n value: function getGeoBounds(place) {\n var _place$geometry$locat = place.geometry.location,\n lat = _place$geometry$locat.lat,\n lng = _place$geometry$locat.lng;\n\n\n if (!place.geometry.viewport) return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__libs_utils_geo__[\"b\" /* generateBounds */])(lat(), lng());\n\n var viewport = place.geometry.viewport;\n\n var neLat = viewport.getNorthEast().lat();\n var swLat = viewport.getSouthWest().lat();\n\n if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__libs_utils_geo__[\"c\" /* isViewportInvalid */])(neLat, swLat)) return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__libs_utils_geo__[\"b\" /* generateBounds */])(lat(), lng());\n\n return viewport;\n }\n }, {\n key: 'onPlaceChanged',\n value: function onPlaceChanged(place) {\n var geoBounds = this.getGeoBounds(place);\n\n var swBound = geoBounds.getSouthWest();\n var neBound = geoBounds.getNorthEast();\n var bounds = {\n neLat: neBound.lat(),\n neLng: neBound.lng(),\n swLat: swBound.lat(),\n swLng: swBound.lng()\n };\n\n // jscs:disable requireCamelCaseOrUpperCaseIdentifiers\n var location = place.formatted_address;\n // jscs:enable requireCamelCaseOrUpperCaseIdentifiers\n\n this.setState({ location: location });\n this.props.onSearch(bounds, location);\n }\n }, {\n key: 'onChangeLocation',\n value: function onChangeLocation(event) {\n this.setState({ location: event.target.value });\n }\n }, {\n key: 'render',\n value: function render() {\n var _this2 = this;\n\n var location = this.state.location;\n\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_3_classnames___default()('row', __WEBPACK_IMPORTED_MODULE_8__ListingSearchBox_scss___default.a.searchBox) },\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_3_classnames___default()('col-md-2', 'visible-lg', __WEBPACK_IMPORTED_MODULE_8__ListingSearchBox_scss___default.a.searchLabel) },\n 'Location'\n ),\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_3_classnames___default()('col-md-9', 'col-xs-12', __WEBPACK_IMPORTED_MODULE_8__ListingSearchBox_scss___default.a.searchInputContainer) },\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('i', { className: __WEBPACK_IMPORTED_MODULE_3_classnames___default()('glyphicon', 'glyphicon-search', 'hidden-lg', __WEBPACK_IMPORTED_MODULE_8__ListingSearchBox_scss___default.a.searchIcon) }),\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('input', {\n id: 'listingsSearchBoxInput',\n ref: function ref(input) {\n return _this2.setSearchInputRef(input);\n },\n className: __WEBPACK_IMPORTED_MODULE_8__ListingSearchBox_scss___default.a.searchInput,\n placeholder: 'Where do you want to go?',\n value: location,\n onChange: this.onChangeLocation\n }),\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_6__libs_components__[\"c\" /* Button */],\n {\n primary: true,\n type: 'button',\n className: __WEBPACK_IMPORTED_MODULE_3_classnames___default()('hidden-xs', __WEBPACK_IMPORTED_MODULE_8__ListingSearchBox_scss___default.a.searchButton),\n onClick: this.pressListingSearchInput\n },\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('i', { className: __WEBPACK_IMPORTED_MODULE_3_classnames___default()('glyphicon', 'glyphicon-search', __WEBPACK_IMPORTED_MODULE_8__ListingSearchBox_scss___default.a.searchIcon) }),\n ' Search'\n )\n ),\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('div', { className: __WEBPACK_IMPORTED_MODULE_3_classnames___default()('col-md-1', 'col-xs-12', 'hidden-sm') })\n );\n }\n }]);\n\n return ListingSearchBox;\n}(__WEBPACK_IMPORTED_MODULE_1_react___default.a.Component);\n\nListingSearchBox.propTypes = {\n onSearch: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (ListingSearchBox);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-index/components/common/ListingSearchBox/ListingSearchBox.jsx\n// module id = 649\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-index/components/common/ListingSearchBox/ListingSearchBox.jsx?", + ); + + /***/ + }, + /* 650 */ + /* exports provided: default */ + /* exports used: default */ + /*!**************************************************************************!*\ + !*** ./app/bundles/listings-index/containers/ListingsIndexContainer.jsx ***! + \**************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_addons_update__ = __webpack_require__(/*! react-addons-update */ 1247);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_addons_update___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react_addons_update__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_lodash__ = __webpack_require__(/*! lodash */ 19);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_lodash___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_lodash__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_deep_freeze__ = __webpack_require__(/*! deep-freeze */ 1099);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_deep_freeze___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_deep_freeze__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react_responsive__ = __webpack_require__(/*! react-responsive */ 177);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react_responsive___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_react_responsive__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__libs_utils_dom__ = __webpack_require__(/*! ../../../libs/utils/dom */ 44);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__libs_utils_api_favoriteUnfavorite__ = __webpack_require__(/*! ../../../libs/utils/api/favoriteUnfavorite */ 309);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__libs_propTypeShapes__ = __webpack_require__(/*! ../../../libs/propTypeShapes */ 57);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__libs_redirectToSignIn__ = __webpack_require__(/*! ../../../libs/redirectToSignIn */ 88);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__assets_styles_resources_screenSizes__ = __webpack_require__(/*! ../../../assets/styles/resources/screenSizes */ 105);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__components_ListingSearch_ListingSearch__ = __webpack_require__(/*! ../components/ListingSearch/ListingSearch */ 644);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__utils_searchUtils__ = __webpack_require__(/*! ../utils/searchUtils */ 651);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__actions_ListingSearchActions__ = __webpack_require__(/*! ../actions/ListingSearchActions */ 638);\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _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\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar SCROLL_TOP_PADDING = 110;\nvar DEFAULT_SEARCH_PARAMS = {\n location: \'North America\',\n pageSize: 17,\n page: 1,\n bounds: {\n neLat: 70,\n neLng: -60,\n swLat: 20,\n swLng: -160\n },\n filters: {}\n};\n\nvar ListingsIndexContainer = function (_React$Component) {\n _inherits(ListingsIndexContainer, _React$Component);\n\n function ListingsIndexContainer(props, context) {\n _classCallCheck(this, ListingsIndexContainer);\n\n var _this = _possibleConstructorReturn(this, (ListingsIndexContainer.__proto__ || Object.getPrototypeOf(ListingsIndexContainer)).call(this, props, context));\n\n _this.state = {\n searching: false\n };\n\n __WEBPACK_IMPORTED_MODULE_3_lodash___default.a.bindAll(_this, [\'updateRoute\', \'onFavoriteUnfavorite\', \'onSelectPage\', \'getMediaQueryValues\']);\n\n _this.resultsPageContainerRef = null;\n _this.resultsPageRef = null;\n\n // process the initial rails-embedded search results\n _this.onSearch(_this.props, true);\n _this.actions = new __WEBPACK_IMPORTED_MODULE_13__actions_ListingSearchActions__["a" /* default */](_this);\n return _this;\n }\n\n _createClass(ListingsIndexContainer, [{\n key: \'componentWillReceiveProps\',\n value: function componentWillReceiveProps(nextProps) {\n if (nextProps.location.search === this.props.location.search) return;\n\n // do a search whenever the search query params in the url change from a route update\n var nextMeta = __WEBPACK_IMPORTED_MODULE_12__utils_searchUtils__["a" /* default */].parseQuery(nextProps.location.query, DEFAULT_SEARCH_PARAMS);\n\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__libs_utils_dom__["f" /* setPageTitle */])(\'Listings in \' + nextMeta.location);\n\n // Only update the filter state of the ui here. We only want to update the\n // results + map when we actually get the search results\n var meta = __WEBPACK_IMPORTED_MODULE_2_react_addons_update___default()(this.state.meta, {\n $merge: {\n filters: nextMeta.filters,\n location: nextMeta.location\n }\n });\n\n this.setState({ meta: meta, searching: true });\n\n this.actions.search(nextMeta);\n }\n\n // update the route with the search params\n\n }, {\n key: \'updateRoute\',\n value: function updateRoute(_ref) {\n var bounds = _ref.bounds,\n _ref$page = _ref.page,\n page = _ref$page === undefined ? 1 : _ref$page,\n _ref$filters = _ref.filters,\n filters = _ref$filters === undefined ? {} : _ref$filters,\n location = _ref.location,\n zoom = _ref.zoom;\n\n var searchParams = {\n router: this.context.router,\n bounds: bounds,\n location: location,\n page: page,\n pageSize: DEFAULT_SEARCH_PARAMS.pageSize,\n filters: filters,\n zoom: zoom\n };\n\n __WEBPACK_IMPORTED_MODULE_12__utils_searchUtils__["a" /* default */].pushRoute(searchParams, DEFAULT_SEARCH_PARAMS);\n }\n\n // process the search results and update the ui state\n\n }, {\n key: \'onSearch\',\n value: function onSearch(results, initial) {\n if (results !== null) {\n var listings = results.listings;\n var location = this.props.location;\n\n // get all the meta, except totalCount, from the url\n\n var meta = __WEBPACK_IMPORTED_MODULE_12__utils_searchUtils__["a" /* default */].parseQuery(location.query, DEFAULT_SEARCH_PARAMS);\n meta.totalCount = results.meta.totalCount;\n meta.timeOfSearch = new Date().getTime();\n\n if (this.state.meta && this.state.meta.page !== meta.page) {\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__libs_utils_dom__["g" /* scrollTo */])(this.resultsPageContainerRef, {\n root: this.resultsPageRef,\n padding: SCROLL_TOP_PADDING\n });\n }\n\n // update the ui state\n var state = { listings: listings, meta: meta, searching: false };\n if (initial) {\n // can\'t do a setState before component is mounted\n __WEBPACK_IMPORTED_MODULE_3_lodash___default.a.extend(this.state, state);\n } else {\n this.setState(state);\n }\n }\n }\n }, {\n key: \'onSelectPage\',\n value: function onSelectPage(resultsPageContainerRef, resultsPageRef) {\n this.resultsPageContainerRef = resultsPageContainerRef;\n this.resultsPageRef = resultsPageRef;\n }\n\n // process like unlike request and update the ui state\n\n }, {\n key: \'onFavoriteUnfavorite\',\n value: function onFavoriteUnfavorite(listingId, favorited) {\n if (__WEBPACK_IMPORTED_MODULE_3_lodash___default.a.isNil(this.props.user)) {\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__libs_redirectToSignIn__["a" /* default */])();\n return;\n }\n\n var listingIndex = this.state.listings.findIndex(function (_listing) {\n return _listing.id === listingId;\n });\n var favoritesCount = this.state.listings[listingIndex].favoritesCount;\n\n favoritesCount = favorited ? ++favoritesCount : --favoritesCount;\n\n // update listings without changing this.state\n var listings = __WEBPACK_IMPORTED_MODULE_2_react_addons_update___default()(this.state.listings, _defineProperty({}, listingIndex, {\n userContext: {\n favorited: { $set: favorited }\n },\n favoritesCount: { $set: favoritesCount }\n }));\n\n this.setState({ listings: listings });\n\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_7__libs_utils_api_favoriteUnfavorite__["a" /* favoriteUnfavoriteAction */])(listingId, favorited).catch(this.onFavoriteUnfavoriteFailed);\n }\n\n // TODO\n\n }, {\n key: \'onSearchFailed\',\n value: function onSearchFailed() {}\n }, {\n key: \'onFavoriteUnfavoriteFailed\',\n value: function onFavoriteUnfavoriteFailed() {}\n\n // MediaQuery values are preloaded widths to use when server rendering\n\n }, {\n key: \'getMediaQueryValues\',\n value: function getMediaQueryValues() {\n __WEBPACK_IMPORTED_MODULE_3_lodash___default.a.cond([[__WEBPACK_IMPORTED_MODULE_3_lodash___default.a.constant(this.props.mobile), __WEBPACK_IMPORTED_MODULE_3_lodash___default.a.constant({ width: __WEBPACK_IMPORTED_MODULE_10__assets_styles_resources_screenSizes__["b" /* SCREEN_SM */] })], [__WEBPACK_IMPORTED_MODULE_3_lodash___default.a.constant(this.props.tablet), __WEBPACK_IMPORTED_MODULE_3_lodash___default.a.constant({ width: __WEBPACK_IMPORTED_MODULE_10__assets_styles_resources_screenSizes__["a" /* SCREEN_MD */] })], [__WEBPACK_IMPORTED_MODULE_3_lodash___default.a.constant(true), __WEBPACK_IMPORTED_MODULE_3_lodash___default.a.constant({ width: __WEBPACK_IMPORTED_MODULE_10__assets_styles_resources_screenSizes__["e" /* SCREEN_LG */] })]]);\n }\n }, {\n key: \'render\',\n value: function render() {\n var _this2 = this;\n\n // make everything immutable\n var _deepFreeze = __WEBPACK_IMPORTED_MODULE_4_deep_freeze___default()(this.state),\n meta = _deepFreeze.meta,\n searching = _deepFreeze.searching,\n listings = _deepFreeze.listings;\n\n var user = this.props.user;\n\n\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_5_react_responsive___default.a,\n { maxWidth: __WEBPACK_IMPORTED_MODULE_10__assets_styles_resources_screenSizes__["b" /* SCREEN_SM */] - 1, values: this.getMediaQueryValues() },\n function (isMobile) {\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_11__components_ListingSearch_ListingSearch__["a" /* default */], {\n listings: listings,\n meta: meta,\n onSearch: _this2.updateRoute,\n onFavoriteUnfavorite: _this2.onFavoriteUnfavorite,\n searching: searching,\n user: user,\n onSelectPage: _this2.onSelectPage,\n mobile: isMobile\n });\n }\n );\n }\n }]);\n\n return ListingsIndexContainer;\n}(__WEBPACK_IMPORTED_MODULE_1_react___default.a.Component);\n\nListingsIndexContainer.contextTypes = {\n router: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object.isRequired\n};\nListingsIndexContainer.propTypes = {\n // context\n user: __WEBPACK_IMPORTED_MODULE_8__libs_propTypeShapes__["b" /* userInfoShape */],\n\n // search api params\n listings: __WEBPACK_IMPORTED_MODULE_8__libs_propTypeShapes__["c" /* listingInfosShape */],\n meta: __WEBPACK_IMPORTED_MODULE_8__libs_propTypeShapes__["d" /* searchMetaShape */],\n\n // route params\n location: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.shape({\n query: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object.isRequired,\n search: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string.isRequired\n }).isRequired,\n tablet: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.bool.isRequired,\n mobile: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.bool.isRequired\n};\n/* harmony default export */ __webpack_exports__["a"] = (ListingsIndexContainer);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-index/containers/ListingsIndexContainer.jsx\n// module id = 650\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-index/containers/ListingsIndexContainer.jsx?', + ); + + /***/ + }, + /* 651 */ + /* exports provided: default */ + /* exports used: default */ + /*!*********************************************************!*\ + !*** ./app/bundles/listings-index/utils/searchUtils.js ***! + \*********************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash__ = __webpack_require__(/*! lodash */ 19);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_lodash__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__enums_ListingFilters__ = __webpack_require__(/*! ../../../enums/ListingFilters */ 184);\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\n\n\n\n\nvar LISTINGS_SEARCH_PATH = \'/s\';\n\n/* harmony default export */ __webpack_exports__["a"] = ({\n pushRoute: function pushRoute(_ref, defaultParams) {\n var router = _ref.router,\n bounds = _ref.bounds,\n location = _ref.location,\n page = _ref.page,\n pageSize = _ref.pageSize,\n filters = _ref.filters,\n zoom = _ref.zoom;\n\n var query = __WEBPACK_IMPORTED_MODULE_0_lodash___default.a.cloneDeep(_extends({\n page: page,\n pageSize: pageSize,\n location: location\n }, filters, bounds, {\n zoom: zoom\n }));\n\n var flattenedDefaultParams = __WEBPACK_IMPORTED_MODULE_0_lodash___default.a.cloneDeep(defaultParams);\n __WEBPACK_IMPORTED_MODULE_0_lodash___default.a.extend(flattenedDefaultParams, flattenedDefaultParams.filters);\n delete flattenedDefaultParams.filters;\n\n query = __WEBPACK_IMPORTED_MODULE_0_lodash___default.a.omitBy(query, function (value, key) {\n // omit if same scalar value or array values\n var defaultValue = flattenedDefaultParams[key];\n return defaultValue === value || __WEBPACK_IMPORTED_MODULE_0_lodash___default.a.isArray(defaultValue) && __WEBPACK_IMPORTED_MODULE_0_lodash___default.a.isEqual(__WEBPACK_IMPORTED_MODULE_0_lodash___default.a.intersection(defaultValue, value), value);\n });\n\n router.push({ pathname: LISTINGS_SEARCH_PATH, query: query });\n },\n parseQuery: function parseQuery(query, defaultParams) {\n var params = __WEBPACK_IMPORTED_MODULE_0_lodash___default.a.cloneDeep(defaultParams);\n\n var parseIntArray = function parseIntArray(value) {\n if (__WEBPACK_IMPORTED_MODULE_0_lodash___default.a.isString(value)) {\n return [parseInt(value, 10)];\n }\n return value.map(function (v) {\n return parseInt(v, 10);\n });\n };\n\n var parseArray = function parseArray(value) {\n if (__WEBPACK_IMPORTED_MODULE_0_lodash___default.a.isString(value)) {\n return [value];\n }\n return value;\n };\n\n if (query) {\n this.setQueryValues(params, query, [[\'location\'], [\'page\', parseInt], [\'pageSize\', parseInt], [\'zoom\', parseInt]]);\n\n // parse bounds\n this.setQueryValues(params.bounds, query, [[\'neLat\', parseFloat], [\'neLng\', parseFloat], [\'swLat\', parseFloat], [\'swLng\', parseFloat]]);\n\n // parse filters\n this.setQueryValues(params.filters, query, [[__WEBPACK_IMPORTED_MODULE_1__enums_ListingFilters__["a" /* default */].RELATIONSHIP_TYPE.value], [__WEBPACK_IMPORTED_MODULE_1__enums_ListingFilters__["a" /* default */].BEDROOMS.value, parseInt], [__WEBPACK_IMPORTED_MODULE_1__enums_ListingFilters__["a" /* default */].BATHROOMS.value, parseFloat], [__WEBPACK_IMPORTED_MODULE_1__enums_ListingFilters__["a" /* default */].BEDS.value, parseInt], [__WEBPACK_IMPORTED_MODULE_1__enums_ListingFilters__["a" /* default */].ROOM_TYPES.value, parseArray], [__WEBPACK_IMPORTED_MODULE_1__enums_ListingFilters__["a" /* default */].PRICE.value, parseIntArray], [__WEBPACK_IMPORTED_MODULE_1__enums_ListingFilters__["a" /* default */].AMENITY_IDS.value, parseIntArray], [__WEBPACK_IMPORTED_MODULE_1__enums_ListingFilters__["a" /* default */].GUESTS.value, parseInt]]);\n }\n\n return params;\n },\n\n\n // parses and sets fields from source into target\n setQueryValues: function setQueryValues(target, source, fields) {\n var _this = this;\n\n fields.map(function (_ref2) {\n var _ref3 = _slicedToArray(_ref2, 2),\n fieldName = _ref3[0],\n parseFct = _ref3[1];\n\n return _this.setQueryValue(target, source, fieldName, parseFct);\n });\n },\n\n\n // parse and sets fieldName from source into target\n setQueryValue: function setQueryValue(target, source, fieldName, transform) {\n if (source[fieldName]) {\n // eslint-disable-next-line no-param-reassign\n target[fieldName] = transform ? transform(source[fieldName]) : source[fieldName];\n }\n }\n});\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-index/utils/searchUtils.js\n// module id = 651\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-index/utils/searchUtils.js?', + ); + + /***/ + }, + /* 652 */ + /* exports provided: paths */ + /* exports used: paths */ + /*!********************************************************!*\ + !*** ./app/bundles/listings-manage/routes/lemPaths.js ***! + \********************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__libs_routes_app__ = __webpack_require__(/*! ../../../libs/routes/app */ 885);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return paths; });\n\n\nvar paths = {\n lemEditPath: function lemEditPath(listingId) {\n return __WEBPACK_IMPORTED_MODULE_0__libs_routes_app__["a" /* listingsRoutes */].manageListingsScope(listingId);\n },\n\n lemPreviewPath: function lemPreviewPath(listingId) {\n return __WEBPACK_IMPORTED_MODULE_0__libs_routes_app__["a" /* listingsRoutes */].manageListingsScope(\'/\' + listingId + \'/preview\');\n }\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-manage/routes/lemPaths.js\n// module id = 652\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-manage/routes/lemPaths.js?', + ); + + /***/ + }, + /* 653 */ + /* exports provided: default */ + /* exports used: default */ + /*!********************************************************!*\ + !*** ./app/bundles/listings-show/enums/StickyState.js ***! + \********************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__libs_utils_Enum__ = __webpack_require__(/*! ../../../libs/utils/Enum */ 22);\n\n\nvar StickyState = {\n AT_THE_TOP: 'AT_THE_TOP',\n AT_THE_BOTTOM: 'AT_THE_BOTTOM',\n STICKY: 'STICKY'\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (new __WEBPACK_IMPORTED_MODULE_0__libs_utils_Enum__[\"a\" /* default */](StickyState));\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-show/enums/StickyState.js\n// module id = 653\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-show/enums/StickyState.js?", + ); + + /***/ + }, + /* 654 */ + /* exports provided: default */ + /* exports used: default */ + /*!*********************************************************!*\ + !*** ./app/bundles/listings-show/ui/Container.live.jsx ***! + \*********************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Topbar_live__ = __webpack_require__(/*! ./Topbar/live */ 688);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Listing_Listing_live__ = __webpack_require__(/*! ./Listing/Listing.live */ 281);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__index_scss__ = __webpack_require__(/*! ./index.scss */ 336);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__index_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__index_scss__);\n\n\nvar babelPluginFlowReactPropTypes_proptype_LimitedContextualListing = __webpack_require__(/*! ../../../types */ 4).babelPluginFlowReactPropTypes_proptype_LimitedContextualListing || __webpack_require__(/*! react */ 1).PropTypes.any;\n\nvar babelPluginFlowReactPropTypes_proptype_ContextualListing = __webpack_require__(/*! ../../../types */ 4).babelPluginFlowReactPropTypes_proptype_ContextualListing || __webpack_require__(/*! react */ 1).PropTypes.any;\n\nvar babelPluginFlowReactPropTypes_proptype_Amenity = __webpack_require__(/*! ../../../types */ 4).babelPluginFlowReactPropTypes_proptype_Amenity || __webpack_require__(/*! react */ 1).PropTypes.any;\n\n\n\n\n\n\nvar ContainerLive = function ContainerLive(props) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n \'section\',\n { className: __WEBPACK_IMPORTED_MODULE_3__index_scss___default.a.container },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1__Topbar_live__["a" /* default */], { listing: props.listing, isLoggedIn: props.isLoggedIn }),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2__Listing_Listing_live__["a" /* default */], {\n listing: props.listing,\n allAmenities: props.allAmenities,\n cloudinaryUrl: props.cloudinaryUrl,\n isLoggedIn: props.isLoggedIn\n })\n );\n};\n\nContainerLive.propTypes = {\n listing: __webpack_require__(/*! prop-types */ 0).oneOfType([babelPluginFlowReactPropTypes_proptype_ContextualListing, babelPluginFlowReactPropTypes_proptype_LimitedContextualListing]).isRequired,\n allAmenities: __webpack_require__(/*! prop-types */ 0).arrayOf(babelPluginFlowReactPropTypes_proptype_Amenity).isRequired,\n cloudinaryUrl: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n isLoggedIn: __webpack_require__(/*! prop-types */ 0).bool.isRequired\n};\n/* harmony default export */ __webpack_exports__["a"] = (ContainerLive);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-show/ui/Container.live.jsx\n// module id = 654\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-show/ui/Container.live.jsx?', + ); + + /***/ + }, + /* 655 */ + /* exports provided: default */ + /* exports used: default */ + /*!************************************************************!*\ + !*** ./app/bundles/listings-show/ui/Container.preview.jsx ***! + \************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__api_contextualListings__ = __webpack_require__(/*! ../../../api/contextualListings */ 279);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__api_listingDraft__ = __webpack_require__(/*! ../../../api/listingDraft */ 620);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__enums_DisplayMode__ = __webpack_require__(/*! ../../../enums/DisplayMode */ 60);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__libs_components__ = __webpack_require__(/*! ../../../libs/components */ 11);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__assets_styles_vendor_photoswipe_photoswipe_scss__ = __webpack_require__(/*! ../../../assets/styles/vendor/photoswipe/photoswipe.scss */ 334);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__assets_styles_vendor_photoswipe_photoswipe_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5__assets_styles_vendor_photoswipe_photoswipe_scss__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__Topbar_preview__ = __webpack_require__(/*! ./Topbar/preview */ 690);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__Listing_Listing_live__ = __webpack_require__(/*! ./Listing/Listing.live */ 281);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__index_scss__ = __webpack_require__(/*! ./index.scss */ 336);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__index_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8__index_scss__);\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\n\nvar babelPluginFlowReactPropTypes_proptype_ContextualListingDisplayMode = __webpack_require__(/*! ../../../types */ 4).babelPluginFlowReactPropTypes_proptype_ContextualListingDisplayMode || __webpack_require__(/*! react */ 1).PropTypes.any;\n\nvar babelPluginFlowReactPropTypes_proptype_LimitedContextualListing = __webpack_require__(/*! ../../../types */ 4).babelPluginFlowReactPropTypes_proptype_LimitedContextualListing || __webpack_require__(/*! react */ 1).PropTypes.any;\n\nvar babelPluginFlowReactPropTypes_proptype_ContextualListing = __webpack_require__(/*! ../../../types */ 4).babelPluginFlowReactPropTypes_proptype_ContextualListing || __webpack_require__(/*! react */ 1).PropTypes.any;\n\nvar babelPluginFlowReactPropTypes_proptype_Amenity = __webpack_require__(/*! ../../../types */ 4).babelPluginFlowReactPropTypes_proptype_Amenity || __webpack_require__(/*! react */ 1).PropTypes.any;\n\nvar babelPluginFlowReactPropTypes_proptype_Response = __webpack_require__(/*! ../../../api/contextualListings */ 279).babelPluginFlowReactPropTypes_proptype_Response || __webpack_require__(/*! react */ 1).PropTypes.any;\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar ContainerPreview = function (_React$Component) {\n _inherits(ContainerPreview, _React$Component);\n\n function ContainerPreview() {\n var _ref;\n\n var _temp, _this, _ret;\n\n _classCallCheck(this, ContainerPreview);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = ContainerPreview.__proto__ || Object.getPrototypeOf(ContainerPreview)).call.apply(_ref, [this].concat(args))), _this), _this.state = {\n listing: _this.props.listing,\n isLoading: !_this.props.listing,\n isFailure: false\n }, _this.componentDidMount = function () {\n if (_this.state.isLoading) {\n _this.fetchContextualListing(__WEBPACK_IMPORTED_MODULE_3__enums_DisplayMode__["a" /* default */].FULL_DETAILS);\n }\n }, _this.fetchContextualListing = function (displayMode) {\n var listing = _this.state.listing;\n\n\n if (listing && listing.displayMode === displayMode) return;\n\n _this.setState({\n isLoading: true,\n isFailure: false\n }, function () {\n return _this.startFetching(displayMode);\n });\n }, _this.startFetching = function (displayMode) {\n var _this$props = _this.props,\n listingId = _this$props.listingId,\n isLive = _this$props.isLive;\n\n var getListing = isLive ? __WEBPACK_IMPORTED_MODULE_1__api_contextualListings__["getContextualListing"] : __WEBPACK_IMPORTED_MODULE_2__api_listingDraft__["a" /* getListingDraftPreview */];\n\n getListing(listingId, displayMode).then(\n // success\n function (response) {\n return _this.handleSuccess(response);\n },\n // failure\n _this.handleFailure);\n }, _this.handleSuccess = function (response) {\n _this.setState({\n listing: response.listing,\n isLoading: false,\n isFailure: false\n }, function () {\n return window.scrollTo(0, 0);\n });\n }, _this.handleFailure = function () {\n _this.setState({\n isLoading: false,\n isFailure: true\n });\n }, _this.renderSpinner = function () {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n \'div\',\n { className: __WEBPACK_IMPORTED_MODULE_8__index_scss___default.a.loading },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_4__libs_components__["i" /* Spinner */], { size: \'40\' })\n );\n }, _this.render = function () {\n var _this$state = _this.state,\n listing = _this$state.listing,\n isLoading = _this$state.isLoading;\n\n\n if (!listing) return _this.renderSpinner();\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n \'section\',\n { className: __WEBPACK_IMPORTED_MODULE_8__index_scss___default.a.container },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_6__Topbar_preview__["a" /* default */], {\n listing: listing,\n isLive: _this.props.isLive,\n setDisplayMode: _this.fetchContextualListing\n }),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7__Listing_Listing_live__["a" /* default */], {\n key: listing.displayMode,\n listing: listing,\n allAmenities: _this.props.allAmenities,\n cloudinaryUrl: _this.props.cloudinaryUrl,\n isLoggedIn: true\n }),\n isLoading && _this.renderSpinner()\n );\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n return ContainerPreview;\n}(__WEBPACK_IMPORTED_MODULE_0_react___default.a.Component);\n\nContainerPreview.propTypes = {\n listingId: __webpack_require__(/*! prop-types */ 0).number.isRequired,\n listing: __webpack_require__(/*! prop-types */ 0).oneOfType([babelPluginFlowReactPropTypes_proptype_ContextualListing, babelPluginFlowReactPropTypes_proptype_LimitedContextualListing]),\n allAmenities: __webpack_require__(/*! prop-types */ 0).arrayOf(babelPluginFlowReactPropTypes_proptype_Amenity).isRequired,\n cloudinaryUrl: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n isLive: __webpack_require__(/*! prop-types */ 0).bool\n};\n/* harmony default export */ __webpack_exports__["a"] = (ContainerPreview);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-show/ui/Container.preview.jsx\n// module id = 655\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-show/ui/Container.preview.jsx?', + ); + + /***/ + }, + /* 656 */ + /* exports provided: default */ + /* exports used: default */ + /*!*******************************************************************************************!*\ + !*** ./app/bundles/listings-show/ui/Listing/Amenities/common/AmenityCategories/index.jsx ***! + \*******************************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_fp__ = __webpack_require__(/*! lodash/fp */ 14);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_fp___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_lodash_fp__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__index_scss__ = __webpack_require__(/*! ./index.scss */ 978);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__index_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__index_scss__);\n\n\n\nvar babelPluginFlowReactPropTypes_proptype_GroupedContextualAmenities = __webpack_require__(/*! ../types */ 181).babelPluginFlowReactPropTypes_proptype_GroupedContextualAmenities || __webpack_require__(/*! react */ 1).PropTypes.any;\n\nvar babelPluginFlowReactPropTypes_proptype_ContextualAmenity = __webpack_require__(/*! ../types */ 181).babelPluginFlowReactPropTypes_proptype_ContextualAmenity || __webpack_require__(/*! react */ 1).PropTypes.any;\n\n\n\nvar AmenityCategories = function AmenityCategories(_ref) {\n var amenities = _ref.amenities,\n children = _ref.children;\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n null,\n amenities.map(function (_ref2) {\n var category = _ref2.category,\n items = _ref2.items;\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { key: category.value, className: __WEBPACK_IMPORTED_MODULE_2__index_scss___default.a.category },\n category.label && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_2__index_scss___default.a.subTitle },\n category.label\n ),\n __WEBPACK_IMPORTED_MODULE_1_lodash_fp___default.a.chunk(2, items).map(function (group, index) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { key: index, className: __WEBPACK_IMPORTED_MODULE_2__index_scss___default.a.row },\n group.map(function (amenity) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { key: amenity.id, className: __WEBPACK_IMPORTED_MODULE_2__index_scss___default.a.amenity },\n children && children(amenity)\n );\n })\n );\n })\n );\n })\n );\n};\n\nAmenityCategories.propTypes = {\n amenities: __webpack_require__(/*! prop-types */ 0).arrayOf(babelPluginFlowReactPropTypes_proptype_GroupedContextualAmenities).isRequired,\n children: __webpack_require__(/*! prop-types */ 0).func\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (AmenityCategories);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-show/ui/Listing/Amenities/common/AmenityCategories/index.jsx\n// module id = 656\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-show/ui/Listing/Amenities/common/AmenityCategories/index.jsx?", + ); + + /***/ + }, + /* 657 */ + /* exports provided: default */ + /* exports used: default */ + /*!***********************************************************************!*\ + !*** ./app/bundles/listings-show/ui/Listing/Amenities/live/index.jsx ***! + \***********************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_fp__ = __webpack_require__(/*! lodash/fp */ 14);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_fp___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_lodash_fp__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__enums_Amenity__ = __webpack_require__(/*! ../../../../../../enums/Amenity */ 135);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__enums_AmenityCategory__ = __webpack_require__(/*! ../../../../../../enums/AmenityCategory */ 739);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__enums_ListingUnit__ = __webpack_require__(/*! ../../../../enums/ListingUnit */ 33);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__libs_components__ = __webpack_require__(/*! ../../../../../../libs/components */ 11);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__common__ = __webpack_require__(/*! ../../../common */ 43);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__common_AmenityCategories__ = __webpack_require__(/*! ../common/AmenityCategories */ 656);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__index_scss__ = __webpack_require__(/*! ./index.scss */ 979);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__index_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9__index_scss__);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _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\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\n\n\n\nvar babelPluginFlowReactPropTypes_proptype_Amenity = __webpack_require__(/*! ../../../../../../types */ 4).babelPluginFlowReactPropTypes_proptype_Amenity || __webpack_require__(/*! react */ 1).PropTypes.any;\n\nvar babelPluginFlowReactPropTypes_proptype_ContextualListing = __webpack_require__(/*! ../../../../../../types */ 4).babelPluginFlowReactPropTypes_proptype_ContextualListing || __webpack_require__(/*! react */ 1).PropTypes.any;\n\n\n\n\n\n\n\n\n\nvar babelPluginFlowReactPropTypes_proptype_GroupedContextualAmenities = __webpack_require__(/*! ../common/types */ 181).babelPluginFlowReactPropTypes_proptype_GroupedContextualAmenities || __webpack_require__(/*! react */ 1).PropTypes.any;\n\n\n\nvar AmenitiesLive = function (_React$Component) {\n _inherits(AmenitiesLive, _React$Component);\n\n function AmenitiesLive() {\n var _ref;\n\n var _temp, _this, _ret;\n\n _classCallCheck(this, AmenitiesLive);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = AmenitiesLive.__proto__ || Object.getPrototypeOf(AmenitiesLive)).call.apply(_ref, [this].concat(args))), _this), _this.state = { allAmenitiesAreShown: false }, _this.showAllAmenities = function () {\n _this.setState({ allAmenitiesAreShown: true });\n }, _this.getAmenities = function () {\n return _this.state.allAmenitiesAreShown ? _this.getAllAmenities() : _this.getAmenitiesExcerpt();\n }, _this.getAllAmenities = function () {\n var allAmenities = _this.props.allAmenities;\n var amenityIds = _this.props.listing.amenityIds;\n\n var sortedAmenities = __WEBPACK_IMPORTED_MODULE_2_lodash_fp___default.a.sortBy(\'id\', allAmenities);\n var groupedAmenities = __WEBPACK_IMPORTED_MODULE_2_lodash_fp___default.a.groupBy(\'category\', sortedAmenities);\n\n return __WEBPACK_IMPORTED_MODULE_4__enums_AmenityCategory__["a" /* default */].orderedItems().map(function (category) {\n return {\n category: category,\n items: groupedAmenities[category.value].map(function (amenity) {\n return _extends({}, __WEBPACK_IMPORTED_MODULE_3__enums_Amenity__["a" /* default */].fromValue(amenity.id), {\n id: amenity.id,\n isUnavailable: !amenityIds.includes(amenity.id)\n });\n })\n };\n });\n }, _this.getAmenitiesExcerpt = function () {\n var EXCERPT_SIZE = 4;\n var allAmenities = _this.props.allAmenities;\n var amenityIds = _this.props.listing.amenityIds;\n\n var sortedAmenities = amenityIds.sort(function (prev, next) {\n return prev - next;\n }).map(function (amenityId) {\n return allAmenities.find(function (amenity) {\n return amenity.id === amenityId;\n });\n });\n var groupedAmenities = __WEBPACK_IMPORTED_MODULE_2_lodash_fp___default.a.groupBy(\'category\', sortedAmenities);\n\n return __WEBPACK_IMPORTED_MODULE_4__enums_AmenityCategory__["a" /* default */].orderedItems().map(function (category) {\n return { category: category, items: groupedAmenities[category.value] || [] };\n }).reduce(function (reduction, _ref2) {\n var category = _ref2.category,\n items = _ref2.items;\n return reduction.length === 0 && items.length > 0 ? reduction.concat({\n category: category,\n items: items.slice(0, EXCERPT_SIZE).map(function (amenity) {\n return _extends({}, __WEBPACK_IMPORTED_MODULE_3__enums_Amenity__["a" /* default */].fromValue(amenity.id), {\n id: amenity.id,\n isUnavailable: false\n });\n })\n }) : reduction;\n }, []);\n }, _this.render = function () {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_7__common__["a" /* Unit */],\n {\n unit: __WEBPACK_IMPORTED_MODULE_5__enums_ListingUnit__["default"].AMENITIES,\n className: __WEBPACK_IMPORTED_MODULE_9__index_scss___default.a.unit\n },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_8__common_AmenityCategories__["a" /* default */],\n { amenities: _this.getAmenities() },\n function (amenity) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n \'div\',\n { className: __WEBPACK_IMPORTED_MODULE_9__index_scss___default.a.amenity },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n \'div\',\n {\n className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()(__WEBPACK_IMPORTED_MODULE_9__index_scss___default.a.label, _defineProperty({}, __WEBPACK_IMPORTED_MODULE_9__index_scss___default.a.unavailable, amenity.isUnavailable))\n },\n amenity.label\n ),\n amenity.note && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n \'div\',\n { className: __WEBPACK_IMPORTED_MODULE_9__index_scss___default.a.note },\n amenity.note\n )\n );\n }\n ),\n !_this.state.allAmenitiesAreShown && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_6__libs_components__["k" /* ButtonLike */],\n {\n className: __WEBPACK_IMPORTED_MODULE_9__index_scss___default.a.showMore,\n onClick: _this.showAllAmenities\n },\n \'+ More\'\n )\n );\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n return AmenitiesLive;\n}(__WEBPACK_IMPORTED_MODULE_0_react___default.a.Component);\n\nAmenitiesLive.propTypes = {\n listing: babelPluginFlowReactPropTypes_proptype_ContextualListing,\n allAmenities: __webpack_require__(/*! prop-types */ 0).arrayOf(__webpack_require__(/*! prop-types */ 0).any).isRequired\n};\n/* harmony default export */ __webpack_exports__["a"] = (AmenitiesLive);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-show/ui/Listing/Amenities/live/index.jsx\n// module id = 657\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-show/ui/Listing/Amenities/live/index.jsx?', + ); + + /***/ + }, + /* 658 */ + /* exports provided: default */ + /* exports used: default */ + /*!*************************************************************************!*\ + !*** ./app/bundles/listings-show/ui/Listing/Description/live/index.jsx ***! + \*************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__libs_utils_i18n__ = __webpack_require__(/*! ../../../../../../libs/utils/i18n */ 89);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__enums_ListingUnit__ = __webpack_require__(/*! ../../../../enums/ListingUnit */ 33);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__common__ = __webpack_require__(/*! ../../../common */ 43);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__index_scss__ = __webpack_require__(/*! ./index.scss */ 980);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__index_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__index_scss__);\n\n\nvar babelPluginFlowReactPropTypes_proptype_ContextualListing = __webpack_require__(/*! ../../../../../../types */ 4).babelPluginFlowReactPropTypes_proptype_ContextualListing || __webpack_require__(/*! react */ 1).PropTypes.any;\n\n\n\n\n\n\n\n\nvar DescriptionLive = function DescriptionLive(_ref) {\n var listing = _ref.listing;\n\n if (!listing.description) return null;\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_3__common__["a" /* Unit */],\n { unit: __WEBPACK_IMPORTED_MODULE_2__enums_ListingUnit__["default"].DESCRIPTION, className: __WEBPACK_IMPORTED_MODULE_4__index_scss___default.a.unit },\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__libs_utils_i18n__["b" /* getParagraphs */])(listing.description).map(function (paragraph, index) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n \'p\',\n { key: index, className: __WEBPACK_IMPORTED_MODULE_4__index_scss___default.a.paragraph },\n paragraph\n );\n })\n );\n};\n\nDescriptionLive.propTypes = {\n listing: babelPluginFlowReactPropTypes_proptype_ContextualListing\n};\n/* harmony default export */ __webpack_exports__["a"] = (DescriptionLive);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-show/ui/Listing/Description/live/index.jsx\n// module id = 658\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-show/ui/Listing/Description/live/index.jsx?', + ); + + /***/ + }, + /* 659 */ + /* exports provided: default */ + /* exports used: default */ + /*!*********************************************************************!*\ + !*** ./app/bundles/listings-show/ui/Listing/Details/live/index.jsx ***! + \*********************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_fp__ = __webpack_require__(/*! lodash/fp */ 14);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_fp___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_lodash_fp__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__enums_ListingUnit__ = __webpack_require__(/*! ../../../../enums/ListingUnit */ 33);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__enums_ListingDetails__ = __webpack_require__(/*! ../../../../../../enums/ListingDetails */ 296);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__enums_RoomType__ = __webpack_require__(/*! ../../../../../../enums/RoomType */ 70);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__enums_PropertyType__ = __webpack_require__(/*! ../../../../../../enums/PropertyType */ 297);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__libs_components__ = __webpack_require__(/*! ../../../../../../libs/components */ 11);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__common__ = __webpack_require__(/*! ../../../common */ 43);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__index_scss__ = __webpack_require__(/*! ./index.scss */ 981);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__index_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8__index_scss__);\n\n\n\nvar babelPluginFlowReactPropTypes_proptype_ContextualListing = __webpack_require__(/*! ../../../../../../types */ 4).babelPluginFlowReactPropTypes_proptype_ContextualListing || __webpack_require__(/*! react */ 1).PropTypes.any;\n\n\n\n\n\n\n\n\n\n\n\nvar DetailsLive = function DetailsLive(_ref) {\n var listing = _ref.listing;\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_7__common__["a" /* Unit */],\n { unit: __WEBPACK_IMPORTED_MODULE_2__enums_ListingUnit__["default"].DETAILS, className: __WEBPACK_IMPORTED_MODULE_8__index_scss___default.a.unit },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_7__common__["b" /* Table */],\n { className: __WEBPACK_IMPORTED_MODULE_8__index_scss___default.a.table },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_7__common__["b" /* Table */].Tr,\n null,\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_7__common__["b" /* Table */].Td,\n null,\n __WEBPACK_IMPORTED_MODULE_3__enums_ListingDetails__["a" /* default */].ROOM_TYPE.label,\n \':\'\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_7__common__["b" /* Table */].Td,\n null,\n listing.roomType ? __WEBPACK_IMPORTED_MODULE_4__enums_RoomType__["a" /* default */].fromValue(listing.roomType).label : __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_6__libs_components__["x" /* Ellipsis */], { faded: true })\n )\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_7__common__["b" /* Table */].Tr,\n null,\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_7__common__["b" /* Table */].Td,\n null,\n __WEBPACK_IMPORTED_MODULE_3__enums_ListingDetails__["a" /* default */].PROPERTY_TYPE.label,\n \':\'\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_7__common__["b" /* Table */].Td,\n null,\n listing.propertyType ? __WEBPACK_IMPORTED_MODULE_5__enums_PropertyType__["a" /* default */].fromValue(listing.propertyType).label : __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_6__libs_components__["x" /* Ellipsis */], { faded: true })\n )\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_7__common__["b" /* Table */].Tr,\n null,\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_7__common__["b" /* Table */].Td,\n null,\n __WEBPACK_IMPORTED_MODULE_3__enums_ListingDetails__["a" /* default */].ACCOMMODATES.label,\n \':\'\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_7__common__["b" /* Table */].Td,\n null,\n listing.maxGuests || __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_6__libs_components__["x" /* Ellipsis */], { faded: true })\n )\n )\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_7__common__["b" /* Table */],\n { className: __WEBPACK_IMPORTED_MODULE_8__index_scss___default.a.table },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_7__common__["b" /* Table */].Tr,\n null,\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_7__common__["b" /* Table */].Td,\n null,\n __WEBPACK_IMPORTED_MODULE_3__enums_ListingDetails__["a" /* default */].BEDROOMS.label,\n \':\'\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_7__common__["b" /* Table */].Td,\n null,\n listing.bedrooms || __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_6__libs_components__["x" /* Ellipsis */], { faded: true })\n )\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_7__common__["b" /* Table */].Tr,\n null,\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_7__common__["b" /* Table */].Td,\n null,\n __WEBPACK_IMPORTED_MODULE_3__enums_ListingDetails__["a" /* default */].BEDS.label,\n \':\'\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_7__common__["b" /* Table */].Td,\n null,\n listing.beds || __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_6__libs_components__["x" /* Ellipsis */], { faded: true })\n )\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_7__common__["b" /* Table */].Tr,\n null,\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_7__common__["b" /* Table */].Td,\n null,\n __WEBPACK_IMPORTED_MODULE_3__enums_ListingDetails__["a" /* default */].BATHROOMS.label,\n \':\'\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_7__common__["b" /* Table */].Td,\n null,\n !__WEBPACK_IMPORTED_MODULE_1_lodash_fp___default.a.isNil(listing.bathrooms) ? listing.bathrooms : __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_6__libs_components__["x" /* Ellipsis */], { faded: true })\n )\n )\n )\n );\n};\n\nDetailsLive.propTypes = {\n listing: babelPluginFlowReactPropTypes_proptype_ContextualListing\n};\n/* harmony default export */ __webpack_exports__["a"] = (DetailsLive);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-show/ui/Listing/Details/live/index.jsx\n// module id = 659\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-show/ui/Listing/Details/live/index.jsx?', + ); + + /***/ + }, + /* 660 */ + /* exports provided: default */ + /* exports used: default */ + /*!********************************************************************!*\ + !*** ./app/bundles/listings-show/ui/Listing/Header/live/index.jsx ***! + \********************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_fp__ = __webpack_require__(/*! lodash/fp */ 14);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_fp___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_lodash_fp__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__libs_utils_fng_listings__ = __webpack_require__(/*! ../../../../../../libs/utils/fng/listings */ 192);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__enums_ListingUnit__ = __webpack_require__(/*! ../../../../enums/ListingUnit */ 33);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__enums_RoomType__ = __webpack_require__(/*! ../../../../../../enums/RoomType */ 70);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__libs_components__ = __webpack_require__(/*! ../../../../../../libs/components */ 11);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__common__ = __webpack_require__(/*! ../../../common */ 43);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__libs_components_icons_IconHome__ = __webpack_require__(/*! ../../../../../../libs/components/icons/IconHome */ 306);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__libs_components_icons_IconMan__ = __webpack_require__(/*! ../../../../../../libs/components/icons/IconMan */ 867);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__libs_components_icons_IconBedrooms__ = __webpack_require__(/*! ../../../../../../libs/components/icons/IconBedrooms */ 857);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__libs_components_icons_IconBeds__ = __webpack_require__(/*! ../../../../../../libs/components/icons/IconBeds */ 858);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__index_scss__ = __webpack_require__(/*! ./index.scss */ 983);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__index_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_12__index_scss__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__common_index_scss__ = __webpack_require__(/*! ../common/index.scss */ 982);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__common_index_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_13__common_index_scss__);\n\n\n\n\nvar babelPluginFlowReactPropTypes_proptype_LimitedContextualListing = __webpack_require__(/*! ../../../../../../types */ 4).babelPluginFlowReactPropTypes_proptype_LimitedContextualListing || __webpack_require__(/*! react */ 1).PropTypes.any;\n\nvar babelPluginFlowReactPropTypes_proptype_ContextualListing = __webpack_require__(/*! ../../../../../../types */ 4).babelPluginFlowReactPropTypes_proptype_ContextualListing || __webpack_require__(/*! react */ 1).PropTypes.any;\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar HeaderLive = function HeaderLive(_ref) {\n var listing = _ref.listing;\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_7__common__["a" /* Unit */],\n { unit: __WEBPACK_IMPORTED_MODULE_4__enums_ListingUnit__["default"].HEADER, className: __WEBPACK_IMPORTED_MODULE_13__common_index_scss___default.a.unit },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n \'div\',\n { className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()(__WEBPACK_IMPORTED_MODULE_13__common_index_scss___default.a.subtitle, __WEBPACK_IMPORTED_MODULE_12__index_scss___default.a.subtitle) },\n __WEBPACK_IMPORTED_MODULE_2_lodash_fp___default.a.compact([listing.city, listing.state, listing.country]).join(\', \')\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n \'h1\',\n { className: __WEBPACK_IMPORTED_MODULE_12__index_scss___default.a.title },\n listing.title\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n \'div\',\n { className: __WEBPACK_IMPORTED_MODULE_12__index_scss___default.a.icons },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n \'div\',\n { className: __WEBPACK_IMPORTED_MODULE_12__index_scss___default.a.iconWrapper },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_8__libs_components_icons_IconHome__["a" /* default */], { className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()(__WEBPACK_IMPORTED_MODULE_12__index_scss___default.a.icon, __WEBPACK_IMPORTED_MODULE_12__index_scss___default.a.iconRoomType) }),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n \'div\',\n { className: __WEBPACK_IMPORTED_MODULE_12__index_scss___default.a.iconLabel },\n listing.roomType ? __WEBPACK_IMPORTED_MODULE_5__enums_RoomType__["a" /* default */].fromValue(listing.roomType).label : __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_6__libs_components__["x" /* Ellipsis */], { faded: true })\n )\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n \'div\',\n { className: __WEBPACK_IMPORTED_MODULE_12__index_scss___default.a.iconWrapper },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_9__libs_components_icons_IconMan__["a" /* default */], { className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()(__WEBPACK_IMPORTED_MODULE_12__index_scss___default.a.icon, __WEBPACK_IMPORTED_MODULE_12__index_scss___default.a.iconMaxGuests) }),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n \'div\',\n { className: __WEBPACK_IMPORTED_MODULE_12__index_scss___default.a.iconLabel },\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__libs_utils_fng_listings__["b" /* fetchNumericalLabel */])(\'guest\', listing.maxGuests) || __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_6__libs_components__["x" /* Ellipsis */], { faded: true })\n )\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n \'div\',\n { className: __WEBPACK_IMPORTED_MODULE_12__index_scss___default.a.iconWrapper },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_10__libs_components_icons_IconBedrooms__["a" /* default */], { className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()(__WEBPACK_IMPORTED_MODULE_12__index_scss___default.a.icon, __WEBPACK_IMPORTED_MODULE_12__index_scss___default.a.iconBedrooms) }),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n \'div\',\n { className: __WEBPACK_IMPORTED_MODULE_12__index_scss___default.a.iconLabel },\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__libs_utils_fng_listings__["c" /* fetchBedroomsLabel */])(listing.bedrooms) || __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_6__libs_components__["x" /* Ellipsis */], { faded: true })\n )\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n \'div\',\n { className: __WEBPACK_IMPORTED_MODULE_12__index_scss___default.a.iconWrapper },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_11__libs_components_icons_IconBeds__["a" /* default */], { className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()(__WEBPACK_IMPORTED_MODULE_12__index_scss___default.a.icon, __WEBPACK_IMPORTED_MODULE_12__index_scss___default.a.iconBeds) }),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n \'div\',\n { className: __WEBPACK_IMPORTED_MODULE_12__index_scss___default.a.iconLabel },\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__libs_utils_fng_listings__["b" /* fetchNumericalLabel */])(\'bed\', listing.beds) || __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_6__libs_components__["x" /* Ellipsis */], { faded: true })\n )\n )\n )\n );\n};\n\nHeaderLive.propTypes = {\n listing: __webpack_require__(/*! prop-types */ 0).oneOfType([babelPluginFlowReactPropTypes_proptype_ContextualListing, babelPluginFlowReactPropTypes_proptype_LimitedContextualListing]).isRequired\n};\n/* harmony default export */ __webpack_exports__["a"] = (HeaderLive);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-show/ui/Listing/Header/live/index.jsx\n// module id = 660\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-show/ui/Listing/Header/live/index.jsx?', + ); + + /***/ + }, + /* 661 */ + /* exports provided: default */ + /* exports used: default */ + /*!******************************************************************************!*\ + !*** ./app/bundles/listings-show/ui/Listing/Hero/common/HeroPhoto/index.jsx ***! + \******************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__libs_utils_fng_photos__ = __webpack_require__(/*! ../../../../../../../libs/utils/fng/photos */ 51);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__libs_components__ = __webpack_require__(/*! ../../../../../../../libs/components */ 11);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__index_scss__ = __webpack_require__(/*! ./index.scss */ 984);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__index_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__index_scss__);\n\n\nvar babelPluginFlowReactPropTypes_proptype_Photo = __webpack_require__(/*! ../../../../../../../types */ 4).babelPluginFlowReactPropTypes_proptype_Photo || __webpack_require__(/*! react */ 1).PropTypes.any;\n\n\n\n\n\n\nvar HeroPhoto = function HeroPhoto(_ref) {\n var photo = _ref.photo,\n children = _ref.children;\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_2__libs_components__[\"e\" /* CalculatedBreakpoint */],\n null,\n function (width) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n {\n className: __WEBPACK_IMPORTED_MODULE_3__index_scss___default.a.hero,\n style: {\n backgroundImage: 'url(' + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__libs_utils_fng_photos__[\"a\" /* buildPhotoUrl */])({ width: width, url: photo.cloudUrl }) + ')',\n backgroundPosition: 'center center',\n backgroundRepeat: 'no-repeat',\n backgroundSize: 'cover'\n }\n },\n children\n );\n }\n );\n};\n\nHeroPhoto.propTypes = {\n photo: babelPluginFlowReactPropTypes_proptype_Photo,\n children: __webpack_require__(/*! prop-types */ 0).any\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (HeroPhoto);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-show/ui/Listing/Hero/common/HeroPhoto/index.jsx\n// module id = 661\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-show/ui/Listing/Hero/common/HeroPhoto/index.jsx?", + ); + + /***/ + }, + /* 662 */ + /* exports provided: default */ + /* exports used: default */ + /*!********************************************************************************!*\ + !*** ./app/bundles/listings-show/ui/Listing/Hero/common/NoPhotosYet/index.jsx ***! + \********************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__libs_components_icons_IconNoPhoto__ = __webpack_require__(/*! ../../../../../../../libs/components/icons/IconNoPhoto */ 307);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__index_scss__ = __webpack_require__(/*! ./index.scss */ 985);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__index_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__index_scss__);\n\n\n\n\n\n\nvar NoPhotosYet = function NoPhotosYet() {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_2__index_scss___default.a.wrapper },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_2__index_scss___default.a.content },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1__libs_components_icons_IconNoPhoto__[\"a\" /* default */], { className: __WEBPACK_IMPORTED_MODULE_2__index_scss___default.a.icon }),\n 'No photos yet :('\n )\n );\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (NoPhotosYet);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-show/ui/Listing/Hero/common/NoPhotosYet/index.jsx\n// module id = 662\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-show/ui/Listing/Hero/common/NoPhotosYet/index.jsx?", + ); + + /***/ + }, + /* 663 */ + /* exports provided: default */ + /* exports used: default */ + /*!******************************************************************!*\ + !*** ./app/bundles/listings-show/ui/Listing/Hero/live/index.jsx ***! + \******************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Photos_common_Grid__ = __webpack_require__(/*! ../../Photos/common/Grid */ 287);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__common_Gallery__ = __webpack_require__(/*! ../../../common/Gallery */ 292);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__common_Gallery_Photo__ = __webpack_require__(/*! ../../../common/Gallery/Photo */ 291);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__common_HeroPhoto__ = __webpack_require__(/*! ../common/HeroPhoto */ 661);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__common_NoPhotosYet__ = __webpack_require__(/*! ../common/NoPhotosYet */ 662);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__index_scss__ = __webpack_require__(/*! ./index.scss */ 986);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__index_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6__index_scss__);\n\n/* eslint-disable react/jsx-indent */\n\n\n\nvar babelPluginFlowReactPropTypes_proptype_Photo = __webpack_require__(/*! ../../../../../../types */ 4).babelPluginFlowReactPropTypes_proptype_Photo || __webpack_require__(/*! react */ 1).PropTypes.any;\n\n\n\n\n\n\n\n\n\n\nvar HeroLive = function HeroLive(_ref) {\n var photos = _ref.photos;\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n \'div\',\n { className: __WEBPACK_IMPORTED_MODULE_6__index_scss___default.a.container },\n photos.length > 0 ? __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_4__common_HeroPhoto__["a" /* default */],\n { photo: photos[0] },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_2__common_Gallery__["a" /* default */],\n { id: \'listing--gallery--hero\', className: __WEBPACK_IMPORTED_MODULE_6__index_scss___default.a.gallery },\n photos.map(function (photo, index) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3__common_Gallery_Photo__["a" /* default */], {\n key: photo.id,\n photo: photo\n // we want to preload images with exactly the same sizes\n // as in grid unit to download only one image thumb per photo\n , width: __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__Photos_common_Grid__["b" /* getThumbWidth */])(index),\n height: __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__Photos_common_Grid__["c" /* getThumbHeight */])(index),\n className: __WEBPACK_IMPORTED_MODULE_6__index_scss___default.a.photo,\n hidden: index > 0\n });\n })\n )\n ) : __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5__common_NoPhotosYet__["a" /* default */], null)\n );\n};\n\nHeroLive.propTypes = {\n photos: __webpack_require__(/*! prop-types */ 0).oneOfType([__webpack_require__(/*! prop-types */ 0).arrayOf(__webpack_require__(/*! prop-types */ 0).any), __webpack_require__(/*! prop-types */ 0).arrayOf(__webpack_require__(/*! prop-types */ 0).any)]).isRequired\n};\n/* harmony default export */ __webpack_exports__["a"] = (HeroLive);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-show/ui/Listing/Hero/live/index.jsx\n// module id = 663\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-show/ui/Listing/Hero/live/index.jsx?', + ); + + /***/ + }, + /* 664 */ + /* exports provided: default */ + /* exports used: default */ + /*!*************************************************************************!*\ + !*** ./app/bundles/listings-show/ui/Listing/Host/common/Host/index.jsx ***! + \*************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__enums_ListingUnit__ = __webpack_require__(/*! ../../../../../enums/ListingUnit */ 33);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__libs_components__ = __webpack_require__(/*! ../../../../../../../libs/components */ 11);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__common__ = __webpack_require__(/*! ../../../../common */ 43);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__index_scss__ = __webpack_require__(/*! ./index.scss */ 987);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__index_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__index_scss__);\n\n\nvar babelPluginFlowReactPropTypes_proptype_User = __webpack_require__(/*! ../../../../../../../types */ 4).babelPluginFlowReactPropTypes_proptype_User || __webpack_require__(/*! react */ 1).PropTypes.any;\n\n\n\n\n\n\n\n\nvar AVATAR_SIZE = 150;\n\nvar Host = function Host(_ref) {\n var owner = _ref.owner,\n children = _ref.children;\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_3__common__[\"a\" /* Unit */],\n { unit: __WEBPACK_IMPORTED_MODULE_1__enums_ListingUnit__[\"default\"].HOST, className: __WEBPACK_IMPORTED_MODULE_4__index_scss___default.a.unit },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_4__index_scss___default.a.avatar },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_2__libs_components__[\"f\" /* A */],\n { href: owner.url, color: 'none', underline: 'none' },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2__libs_components__[\"g\" /* Image */], {\n alt: owner.firstName,\n url: owner.avatarUrl,\n width: AVATAR_SIZE,\n height: AVATAR_SIZE,\n dpr: '2.0',\n crop: 'fill',\n radius: 'max',\n gravity: 'faces',\n className: __WEBPACK_IMPORTED_MODULE_4__index_scss___default.a.avatar\n })\n )\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_4__index_scss___default.a.details },\n owner.aboutMeDetails,\n children\n )\n );\n};\n\nHost.propTypes = {\n owner: babelPluginFlowReactPropTypes_proptype_User,\n children: __webpack_require__(/*! prop-types */ 0).any\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (Host);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-show/ui/Listing/Host/common/Host/index.jsx\n// module id = 664\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-show/ui/Listing/Host/common/Host/index.jsx?", + ); + + /***/ + }, + /* 665 */ + /* exports provided: default */ + /* exports used: default */ + /*!******************************************************************!*\ + !*** ./app/bundles/listings-show/ui/Listing/Host/live/index.jsx ***! + \******************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common_Host__ = __webpack_require__(/*! ../common/Host */ 664);\n\n\nvar babelPluginFlowReactPropTypes_proptype_User = __webpack_require__(/*! ../../../../../../types */ 4).babelPluginFlowReactPropTypes_proptype_User || __webpack_require__(/*! react */ 1).PropTypes.any;\n\n\n\nvar HostLive = function HostLive(_ref) {\n var owner = _ref.owner;\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1__common_Host__["a" /* default */], { owner: owner });\n};\n\nHostLive.propTypes = {\n owner: babelPluginFlowReactPropTypes_proptype_User\n};\n/* harmony default export */ __webpack_exports__["a"] = (HostLive);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-show/ui/Listing/Host/live/index.jsx\n// module id = 665\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-show/ui/Listing/Host/live/index.jsx?', + ); + + /***/ + }, + /* 666 */ + /* exports provided: default */ + /* exports used: default */ + /*!************************************************************************!*\ + !*** ./app/bundles/listings-show/ui/Listing/HouseRules/live/index.jsx ***! + \************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__enums_SystemHouseRule__ = __webpack_require__(/*! ../../../../../../enums/SystemHouseRule */ 744);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__enums_SystemHouseRuleStatus__ = __webpack_require__(/*! ../../../../../../enums/SystemHouseRuleStatus */ 745);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__enums_ListingUnit__ = __webpack_require__(/*! ../../../../enums/ListingUnit */ 33);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__libs_components_icons_IconBullet__ = __webpack_require__(/*! ../../../../../../libs/components/icons/IconBullet */ 859);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__common__ = __webpack_require__(/*! ../../../common */ 43);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__index_scss__ = __webpack_require__(/*! ./index.scss */ 988);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__index_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6__index_scss__);\n\n\nvar babelPluginFlowReactPropTypes_proptype_ContextualListing = __webpack_require__(/*! ../../../../../../types */ 4).babelPluginFlowReactPropTypes_proptype_ContextualListing || __webpack_require__(/*! react */ 1).PropTypes.any;\n\n\n\n\n\n\n\n\n\n\nvar HouseRulesLive = function HouseRulesLive(_ref) {\n var listing = _ref.listing;\n\n var activeSystemRules = listing.systemHouseRules.filter(function (rule) {\n return rule.status !== __WEBPACK_IMPORTED_MODULE_2__enums_SystemHouseRuleStatus__[\"a\" /* default */].UNSPECIFIED;\n });\n var anyActiveSystemRules = activeSystemRules.length > 0;\n var anyCustomRules = listing.customHouseRules.length > 0;\n\n if (!anyActiveSystemRules && !anyCustomRules) return null;\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_5__common__[\"a\" /* Unit */],\n { unit: __WEBPACK_IMPORTED_MODULE_3__enums_ListingUnit__[\"default\"].HOUSE_RULES, className: __WEBPACK_IMPORTED_MODULE_6__index_scss___default.a.unit },\n anyActiveSystemRules && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'ul',\n { className: __WEBPACK_IMPORTED_MODULE_6__index_scss___default.a.rules },\n activeSystemRules.map(function (rule) {\n var wordings = __WEBPACK_IMPORTED_MODULE_1__enums_SystemHouseRule__[\"a\" /* default */].fromValue(rule.name);\n var isYes = rule.status === __WEBPACK_IMPORTED_MODULE_2__enums_SystemHouseRuleStatus__[\"a\" /* default */].YES;\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'li',\n { key: rule.id, className: __WEBPACK_IMPORTED_MODULE_6__index_scss___default.a.rule },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'span',\n { className: __WEBPACK_IMPORTED_MODULE_6__index_scss___default.a.iconWrapper },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_4__libs_components_icons_IconBullet__[\"a\" /* default */], { className: __WEBPACK_IMPORTED_MODULE_6__index_scss___default.a.icon })\n ),\n isYes ? wordings.allowedPhrase : wordings.forbiddenPhrase\n );\n })\n ),\n anyCustomRules && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n null,\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_6__index_scss___default.a.additionalRulesTitle },\n 'Additional rules'\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'ul',\n { className: __WEBPACK_IMPORTED_MODULE_6__index_scss___default.a.rules },\n listing.customHouseRules.map(function (rule) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'li',\n { key: rule.id, className: __WEBPACK_IMPORTED_MODULE_6__index_scss___default.a.rule },\n rule.name\n );\n })\n )\n )\n );\n};\n\nHouseRulesLive.propTypes = {\n listing: babelPluginFlowReactPropTypes_proptype_ContextualListing\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (HouseRulesLive);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-show/ui/Listing/HouseRules/live/index.jsx\n// module id = 666\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-show/ui/Listing/HouseRules/live/index.jsx?", + ); + + /***/ + }, + /* 667 */ + /* exports provided: default */ + /* exports used: default */ + /*!**********************************************************************************!*\ + !*** ./app/bundles/listings-show/ui/Listing/Location/common/GoogleMap/index.jsx ***! + \**********************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__libs_utils__ = __webpack_require__(/*! ../../../../../../../libs/utils */ 20);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__libs_utils_geo__ = __webpack_require__(/*! ../../../../../../../libs/utils/geo */ 107);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__libs_hocs_withIsMountedProp__ = __webpack_require__(/*! ../../../../../../../libs/hocs/withIsMountedProp */ 191);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__libs_components__ = __webpack_require__(/*! ../../../../../../../libs/components */ 11);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__index_scss__ = __webpack_require__(/*! ./index.scss */ 989);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__index_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5__index_scss__);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\n\n\n\n\n\n\n\n\n\nvar GoogleMap = function (_React$Component) {\n _inherits(GoogleMap, _React$Component);\n\n function GoogleMap() {\n var _ref;\n\n var _temp, _this, _ret;\n\n _classCallCheck(this, GoogleMap);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = GoogleMap.__proto__ || Object.getPrototypeOf(GoogleMap)).call.apply(_ref, [this].concat(args))), _this), _this.state = { zoomLevel: 14 }, _this.handleZoomChange = function (nextZoomLevel) {\n _this.setState({ zoomLevel: nextZoomLevel });\n }, _this.render = function () {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n \'div\',\n {\n // ref={ref => setSectionRef(ListingSection.LOCATION.value, ref)}\n className: __WEBPACK_IMPORTED_MODULE_5__index_scss___default.a.location\n },\n _this.props.isMounted && __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__libs_utils__["c" /* isGoogleDefined */])() && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_4__libs_components__["r" /* GoogleMaps */].Map,\n _extends({}, _this.state, {\n center: _this.props.center,\n className: __WEBPACK_IMPORTED_MODULE_5__index_scss___default.a.map,\n options: __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__libs_utils_geo__["d" /* getGoogleMapOptions */])(),\n onZoomChange: _this.handleZoomChange\n }),\n _this.props.children\n )\n );\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n return GoogleMap;\n}(__WEBPACK_IMPORTED_MODULE_0_react___default.a.Component);\n\nGoogleMap.propTypes = {\n center: __webpack_require__(/*! prop-types */ 0).shape({\n lat: __webpack_require__(/*! prop-types */ 0).number.isRequired,\n lng: __webpack_require__(/*! prop-types */ 0).number.isRequired,\n __exact__: function __exact__(values, prop, displayName) {\n var props = {\n lat: true,\n lng: true\n };\n var extra = [];\n\n for (var k in values) {\n if (values.hasOwnProperty(k) && !props.hasOwnProperty(k)) {\n extra.push(k);\n }\n }\n\n if (extra.length > 0) {\n return new Error(\'Invalid additional prop(s) \' + JSON.stringify(extra));\n }\n }\n }).isRequired,\n isMounted: __webpack_require__(/*! prop-types */ 0).bool.isRequired,\n children: __webpack_require__(/*! prop-types */ 0).any\n};\n\n\n/* harmony default export */ __webpack_exports__["a"] = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__libs_hocs_withIsMountedProp__["a" /* default */])(GoogleMap));\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-show/ui/Listing/Location/common/GoogleMap/index.jsx\n// module id = 667\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-show/ui/Listing/Location/common/GoogleMap/index.jsx?', + ); + + /***/ + }, + /* 668 */ + /* exports provided: default */ + /* exports used: default */ + /*!**********************************************************************!*\ + !*** ./app/bundles/listings-show/ui/Listing/Location/live/index.jsx ***! + \**********************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__enums_DisplayMode__ = __webpack_require__(/*! ../../../../../../enums/DisplayMode */ 60);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__assets_styles_resources_variables__ = __webpack_require__(/*! ../../../../../../assets/styles/resources/variables */ 131);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__libs_components__ = __webpack_require__(/*! ../../../../../../libs/components */ 11);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__common_GoogleMap__ = __webpack_require__(/*! ../common/GoogleMap */ 667);\n\n\nvar babelPluginFlowReactPropTypes_proptype_LimitedContextualListing = __webpack_require__(/*! ../../../../../../types */ 4).babelPluginFlowReactPropTypes_proptype_LimitedContextualListing || __webpack_require__(/*! react */ 1).PropTypes.any;\n\nvar babelPluginFlowReactPropTypes_proptype_ContextualListing = __webpack_require__(/*! ../../../../../../types */ 4).babelPluginFlowReactPropTypes_proptype_ContextualListing || __webpack_require__(/*! react */ 1).PropTypes.any;\n\n\n\n\n\n\n\n\nvar DEFAULT_APPROXIMATE_LOCATION_RADIUS_METERS = 1000;\n\nvar Location = function Location(_ref) {\n var listing = _ref.listing;\n\n var center = {\n lat: listing.lat,\n lng: listing.lng\n };\n var isApproximateLocation = listing.displayMode === __WEBPACK_IMPORTED_MODULE_1__enums_DisplayMode__["a" /* default */].LIMITED_PREVIEW;\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_4__common_GoogleMap__["a" /* default */],\n { center: center },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3__libs_components__["r" /* GoogleMaps */].Marker, {\n center: center,\n radius: isApproximateLocation ? DEFAULT_APPROXIMATE_LOCATION_RADIUS_METERS : 0,\n color: __WEBPACK_IMPORTED_MODULE_2__assets_styles_resources_variables__["d" /* RELATIONSHIP_PUBLIC_GUEST_COLOR */]\n })\n );\n};\n\nLocation.propTypes = {\n listing: __webpack_require__(/*! prop-types */ 0).oneOfType([babelPluginFlowReactPropTypes_proptype_ContextualListing, babelPluginFlowReactPropTypes_proptype_LimitedContextualListing]).isRequired\n};\n/* harmony default export */ __webpack_exports__["a"] = (Location);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-show/ui/Listing/Location/live/index.jsx\n// module id = 668\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-show/ui/Listing/Location/live/index.jsx?', + ); + + /***/ + }, + /* 669 */ + /* exports provided: default */ + /* exports used: default */ + /*!*********************************************************************************************!*\ + !*** ./app/bundles/listings-show/ui/Listing/MembershipRequest/live/AcceptedModal/index.jsx ***! + \*********************************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__libs_components__ = __webpack_require__(/*! ../../../../../../../libs/components */ 11);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__libs_components_icons_IconFngKey__ = __webpack_require__(/*! ../../../../../../../libs/components/icons/IconFngKey */ 140);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__libs_components_icons_IconCircleFullOk__ = __webpack_require__(/*! ../../../../../../../libs/components/icons/IconCircleFullOk */ 302);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__index_scss__ = __webpack_require__(/*! ../index.scss */ 114);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__index_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__index_scss__);\n\n\n\n\n\n\n\n\nvar AcceptedModal = function AcceptedModal(_ref) {\n var show = _ref.show,\n isPrivate = _ref.isPrivate,\n hideModal = _ref.hideModal,\n updateRelationship = _ref.updateRelationship;\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_1__libs_components__[\"w\" /* Modal */],\n { show: show, className: __WEBPACK_IMPORTED_MODULE_4__index_scss___default.a.modal, onHide: hideModal, onExited: updateRelationship },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'h2',\n { className: __WEBPACK_IMPORTED_MODULE_4__index_scss___default.a.modalTitle },\n 'Congratulations, you got on the Guest List!'\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_4__index_scss___default.a.iconCircle },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2__libs_components_icons_IconFngKey__[\"a\" /* default */], { color: 'teal', className: __WEBPACK_IMPORTED_MODULE_4__index_scss___default.a.iconKey }),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3__libs_components_icons_IconCircleFullOk__[\"a\" /* default */], { color: 'teal', className: __WEBPACK_IMPORTED_MODULE_4__index_scss___default.a.iconOk })\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_4__index_scss___default.a.modalMessage },\n isPrivate && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'span',\n null,\n 'You now have full access to this listing. The host has requested that you keep the listing\\u2019s details confidential.',\n ' '\n ),\n 'Feel free to message the host with any questions or to book this listing.'\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_1__libs_components__[\"c\" /* Button */],\n { orange: true, onClick: hideModal },\n 'Ok, I Got It'\n )\n );\n};\n\nAcceptedModal.propTypes = {\n show: __webpack_require__(/*! prop-types */ 0).bool.isRequired,\n isPrivate: __webpack_require__(/*! prop-types */ 0).bool.isRequired,\n hideModal: __webpack_require__(/*! prop-types */ 0).func.isRequired,\n updateRelationship: __webpack_require__(/*! prop-types */ 0).func.isRequired\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (AcceptedModal);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-show/ui/Listing/MembershipRequest/live/AcceptedModal/index.jsx\n// module id = 669\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-show/ui/Listing/MembershipRequest/live/AcceptedModal/index.jsx?", + ); + + /***/ + }, + /* 670 */ + /* exports provided: default */ + /* exports used: default */ + /*!*******************************************************************************!*\ + !*** ./app/bundles/listings-show/ui/Listing/MembershipRequest/live/index.jsx ***! + \*******************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__enums_ListingRelationshipType__ = __webpack_require__(/*! ../../../../../../enums/ListingRelationshipType */ 136);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__enums_PrivacyMode__ = __webpack_require__(/*! ../../../../../../enums/PrivacyMode */ 69);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__enums_DisplayMode__ = __webpack_require__(/*! ../../../../../../enums/DisplayMode */ 60);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__enums_ListingUnit__ = __webpack_require__(/*! ../../../../enums/ListingUnit */ 33);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__common__ = __webpack_require__(/*! ../../../common */ 43);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__PublicGuest_PublicGuestForGuest__ = __webpack_require__(/*! ./PublicGuest/PublicGuestForGuest */ 284);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__PublicGuest_PublicGuestForOwner__ = __webpack_require__(/*! ./PublicGuest/PublicGuestForOwner */ 285);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__RequestedMembership__ = __webpack_require__(/*! ./RequestedMembership */ 286);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__Invitee__ = __webpack_require__(/*! ./Invitee */ 282);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__index_scss__ = __webpack_require__(/*! ./index.scss */ 114);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__index_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_10__index_scss__);\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\n\nvar babelPluginFlowReactPropTypes_proptype_ListingRelationshipType = __webpack_require__(/*! ../../../../../../types */ 4).babelPluginFlowReactPropTypes_proptype_ListingRelationshipType || __webpack_require__(/*! react */ 1).PropTypes.any;\n\nvar babelPluginFlowReactPropTypes_proptype_LimitedContextualListing = __webpack_require__(/*! ../../../../../../types */ 4).babelPluginFlowReactPropTypes_proptype_LimitedContextualListing || __webpack_require__(/*! react */ 1).PropTypes.any;\n\nvar babelPluginFlowReactPropTypes_proptype_ContextualListing = __webpack_require__(/*! ../../../../../../types */ 4).babelPluginFlowReactPropTypes_proptype_ContextualListing || __webpack_require__(/*! react */ 1).PropTypes.any;\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar OWNER = __WEBPACK_IMPORTED_MODULE_1__enums_ListingRelationshipType__["a" /* default */].OWNER,\n PUBLIC_GUEST = __WEBPACK_IMPORTED_MODULE_1__enums_ListingRelationshipType__["a" /* default */].PUBLIC_GUEST,\n REQUESTED_MEMBERSHIP = __WEBPACK_IMPORTED_MODULE_1__enums_ListingRelationshipType__["a" /* default */].REQUESTED_MEMBERSHIP,\n INVITEE = __WEBPACK_IMPORTED_MODULE_1__enums_ListingRelationshipType__["a" /* default */].INVITEE,\n MEMBERSHIP = __WEBPACK_IMPORTED_MODULE_1__enums_ListingRelationshipType__["a" /* default */].MEMBERSHIP;\n\nvar MembershipRequest = function (_React$Component) {\n _inherits(MembershipRequest, _React$Component);\n\n function MembershipRequest() {\n var _ref;\n\n var _temp, _this, _ret;\n\n _classCallCheck(this, MembershipRequest);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = MembershipRequest.__proto__ || Object.getPrototypeOf(MembershipRequest)).call.apply(_ref, [this].concat(args))), _this), _this.state = { relationship: _this.props.listing.userContext.listingRelationshipType }, _this.setRelationship = function (relationship) {\n _this.setState({ relationship: relationship });\n }, _this.render = function () {\n var _this2 = _this,\n props = _this2.props,\n state = _this2.state;\n\n\n if (props.isLimitedPreview) return null;\n\n var isAlreadyMember = state.relationship === MEMBERSHIP;\n var isOwnerPreviewingFullDetailsOfPrivateListing = props.listing.userContext.isManagedByCurrentUser && props.listing.privacyMode === __WEBPACK_IMPORTED_MODULE_2__enums_PrivacyMode__["a" /* default */].PRIVATE.value && props.listing.displayMode === __WEBPACK_IMPORTED_MODULE_3__enums_DisplayMode__["a" /* default */].FULL_DETAILS;\n\n if (isAlreadyMember || isOwnerPreviewingFullDetailsOfPrivateListing) {\n return null;\n }\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_5__common__["a" /* Unit */],\n { unit: __WEBPACK_IMPORTED_MODULE_4__enums_ListingUnit__["default"].MEMBERSHIP, className: __WEBPACK_IMPORTED_MODULE_10__index_scss___default.a.unit, wrapperClassName: __WEBPACK_IMPORTED_MODULE_10__index_scss___default.a.wrapper },\n state.relationship === OWNER && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7__PublicGuest_PublicGuestForOwner__["a" /* default */], { listing: props.listing }),\n state.relationship === PUBLIC_GUEST && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_6__PublicGuest_PublicGuestForGuest__["a" /* default */], {\n listing: props.listing,\n isLoggedIn: props.isLoggedIn,\n setRelationship: _this.setRelationship\n }),\n state.relationship === REQUESTED_MEMBERSHIP && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_8__RequestedMembership__["a" /* default */], {\n isReturningUser: props.listing.userContext.listingRelationshipType === REQUESTED_MEMBERSHIP\n }),\n state.relationship === INVITEE && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_9__Invitee__["a" /* default */], {\n listing: props.listing,\n isLoggedIn: props.isLoggedIn,\n setRelationship: _this.setRelationship\n })\n );\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n return MembershipRequest;\n}(__WEBPACK_IMPORTED_MODULE_0_react___default.a.Component);\n\nMembershipRequest.propTypes = {\n listing: __webpack_require__(/*! prop-types */ 0).oneOfType([babelPluginFlowReactPropTypes_proptype_ContextualListing, babelPluginFlowReactPropTypes_proptype_LimitedContextualListing]).isRequired,\n isLoggedIn: __webpack_require__(/*! prop-types */ 0).bool.isRequired,\n isLimitedPreview: __webpack_require__(/*! prop-types */ 0).bool\n};\n/* harmony default export */ __webpack_exports__["a"] = (MembershipRequest);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-show/ui/Listing/MembershipRequest/live/index.jsx\n// module id = 670\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-show/ui/Listing/MembershipRequest/live/index.jsx?', + ); + + /***/ + }, + /* 671 */ + /* exports provided: default */ + /* exports used: default */ + /*!********************************************************************!*\ + !*** ./app/bundles/listings-show/ui/Listing/Photos/live/index.jsx ***! + \********************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__enums_ListingUnit__ = __webpack_require__(/*! ../../../../enums/ListingUnit */ 33);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__common__ = __webpack_require__(/*! ../../../common */ 43);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__common_Grid__ = __webpack_require__(/*! ../common/Grid */ 287);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__index_scss__ = __webpack_require__(/*! ./index.scss */ 991);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__index_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__index_scss__);\n\n\nvar babelPluginFlowReactPropTypes_proptype_Photo = __webpack_require__(/*! ../../../../../../types */ 4).babelPluginFlowReactPropTypes_proptype_Photo || __webpack_require__(/*! react */ 1).PropTypes.any;\n\n\n\n\n\n\n\n\nvar PhotoGridLive = function PhotoGridLive(_ref) {\n var photos = _ref.photos;\n\n if (photos.length === 0) return null;\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_2__common__["a" /* Unit */],\n { unit: __WEBPACK_IMPORTED_MODULE_1__enums_ListingUnit__["default"].PHOTOS, className: __WEBPACK_IMPORTED_MODULE_4__index_scss___default.a.unit },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3__common_Grid__["a" /* default */], { photos: photos })\n );\n};\n\nPhotoGridLive.propTypes = {\n photos: __webpack_require__(/*! prop-types */ 0).oneOfType([__webpack_require__(/*! prop-types */ 0).arrayOf(babelPluginFlowReactPropTypes_proptype_Photo), __webpack_require__(/*! prop-types */ 0).arrayOf(__webpack_require__(/*! prop-types */ 0).any)]).isRequired\n};\n/* harmony default export */ __webpack_exports__["a"] = (PhotoGridLive);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-show/ui/Listing/Photos/live/index.jsx\n// module id = 671\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-show/ui/Listing/Photos/live/index.jsx?', + ); + + /***/ + }, + /* 672 */ + /* exports provided: default */ + /* exports used: default */ + /*!********************************************************************!*\ + !*** ./app/bundles/listings-show/ui/Listing/Prices/live/index.jsx ***! + \********************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__libs_utils_i18n__ = __webpack_require__(/*! ../../../../../../libs/utils/i18n */ 89);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__enums_ListingUnit__ = __webpack_require__(/*! ../../../../enums/ListingUnit */ 33);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__libs_components__ = __webpack_require__(/*! ../../../../../../libs/components */ 11);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__common__ = __webpack_require__(/*! ../../../common */ 43);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__index_scss__ = __webpack_require__(/*! ./index.scss */ 992);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__index_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5__index_scss__);\n\n\nvar babelPluginFlowReactPropTypes_proptype_ContextualListing = __webpack_require__(/*! ../../../../../../types */ 4).babelPluginFlowReactPropTypes_proptype_ContextualListing || __webpack_require__(/*! react */ 1).PropTypes.any;\n\n\n\n\n\n\n\n\n\n\nvar PricesLive = function PricesLive(_ref) {\n var listing = _ref.listing;\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_4__common__["a" /* Unit */],\n {\n unit: __WEBPACK_IMPORTED_MODULE_2__enums_ListingUnit__["default"].PRICES,\n className: __WEBPACK_IMPORTED_MODULE_5__index_scss___default.a.unit\n },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_4__common__["b" /* Table */],\n { className: __WEBPACK_IMPORTED_MODULE_5__index_scss___default.a.table },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_4__common__["b" /* Table */].Tr,\n null,\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_4__common__["b" /* Table */].Td,\n null,\n \'Per night:\'\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_4__common__["b" /* Table */].Td,\n null,\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__libs_utils_i18n__["c" /* formatPrice */])(listing.price) || __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3__libs_components__["x" /* Ellipsis */], { faded: true })\n )\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_4__common__["b" /* Table */].Tr,\n null,\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_4__common__["b" /* Table */].Td,\n null,\n \'Weekly discount:\'\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_4__common__["b" /* Table */].Td,\n null,\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__libs_utils_i18n__["d" /* formatPercentage */])(listing.weeklyDiscount) || __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3__libs_components__["x" /* Ellipsis */], { faded: true })\n )\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_4__common__["b" /* Table */].Tr,\n null,\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_4__common__["b" /* Table */].Td,\n null,\n \'Monthly discount:\'\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_4__common__["b" /* Table */].Td,\n null,\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__libs_utils_i18n__["d" /* formatPercentage */])(listing.monthlyDiscount) || __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3__libs_components__["x" /* Ellipsis */], { faded: true })\n )\n )\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_4__common__["b" /* Table */],\n { className: __WEBPACK_IMPORTED_MODULE_5__index_scss___default.a.table },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_4__common__["b" /* Table */].Tr,\n null,\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_4__common__["b" /* Table */].Td,\n null,\n \'Minimum stay:\'\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_4__common__["b" /* Table */].Td,\n null,\n listing.minimumStay ? __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__libs_utils_i18n__["a" /* formatInflection */])(\'night\', listing.minimumStay) : __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3__libs_components__["x" /* Ellipsis */], { faded: true })\n )\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_4__common__["b" /* Table */].Tr,\n null,\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_4__common__["b" /* Table */].Td,\n null,\n \'Refundable Damage Deposit:\'\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_4__common__["b" /* Table */].Td,\n null,\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__libs_utils_i18n__["c" /* formatPrice */])(listing.deposit) || __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3__libs_components__["x" /* Ellipsis */], { faded: true })\n )\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_4__common__["b" /* Table */].Tr,\n null,\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_4__common__["b" /* Table */].Td,\n null,\n \'Cleaning fee:\'\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_4__common__["b" /* Table */].Td,\n null,\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__libs_utils_i18n__["c" /* formatPrice */])(listing.cleaningFee) || __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3__libs_components__["x" /* Ellipsis */], { faded: true })\n )\n )\n )\n );\n};\n\nPricesLive.propTypes = {\n listing: babelPluginFlowReactPropTypes_proptype_ContextualListing\n};\n/* harmony default export */ __webpack_exports__["a"] = (PricesLive);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-show/ui/Listing/Prices/live/index.jsx\n// module id = 672\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-show/ui/Listing/Prices/live/index.jsx?', + ); + + /***/ + }, + /* 673 */ + /* exports provided: default */ + /* exports used: default */ + /*!*************************************************************************************!*\ + !*** ./app/bundles/listings-show/ui/Listing/PrivacyBar/common/PrivacyBar/index.jsx ***! + \*************************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__libs_components_icons_IconPrivate__ = __webpack_require__(/*! ../../../../../../../libs/components/icons/IconPrivate */ 141);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__index_scss__ = __webpack_require__(/*! ./index.scss */ 993);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__index_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__index_scss__);\n\n\n\n\n\n\nvar PrivacyBar = function PrivacyBar(_ref) {\n var children = _ref.children;\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_2__index_scss___default.a.bar },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1__libs_components_icons_IconPrivate__[\"a\" /* default */], { small: true, className: __WEBPACK_IMPORTED_MODULE_2__index_scss___default.a.icon }),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'span',\n null,\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'b',\n null,\n 'Private Listing'\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'span',\n { className: __WEBPACK_IMPORTED_MODULE_2__index_scss___default.a.msg },\n children\n )\n )\n );\n};\n\nPrivacyBar.propTypes = {\n children: __webpack_require__(/*! prop-types */ 0).any\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (PrivacyBar);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-show/ui/Listing/PrivacyBar/common/PrivacyBar/index.jsx\n// module id = 673\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-show/ui/Listing/PrivacyBar/common/PrivacyBar/index.jsx?", + ); + + /***/ + }, + /* 674 */ + /* exports provided: default */ + /* exports used: default */ + /*!************************************************************************!*\ + !*** ./app/bundles/listings-show/ui/Listing/PrivacyBar/live/index.jsx ***! + \************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common_PrivacyBar__ = __webpack_require__(/*! ../common/PrivacyBar */ 673);\n\n\n\n\nvar PrivacyBarLive = function PrivacyBarLive() {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_1__common_PrivacyBar__["a" /* default */],\n null,\n \'The host requests that guest list members keep this information confidential.\'\n );\n};\n\n/* harmony default export */ __webpack_exports__["a"] = (PrivacyBarLive);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-show/ui/Listing/PrivacyBar/live/index.jsx\n// module id = 674\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-show/ui/Listing/PrivacyBar/live/index.jsx?', + ); + + /***/ + }, + /* 675 */ + /* exports provided: default */ + /* exports used: default */ + /*!*********************************************************************!*\ + !*** ./app/bundles/listings-show/ui/Listing/Summary/live/index.jsx ***! + \*********************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__libs_utils_i18n__ = __webpack_require__(/*! ../../../../../../libs/utils/i18n */ 89);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__enums_ListingUnit__ = __webpack_require__(/*! ../../../../enums/ListingUnit */ 33);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__common__ = __webpack_require__(/*! ../../../common */ 43);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__index_scss__ = __webpack_require__(/*! ./index.scss */ 994);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__index_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__index_scss__);\n\n\nvar babelPluginFlowReactPropTypes_proptype_LimitedContextualListing = __webpack_require__(/*! ../../../../../../types */ 4).babelPluginFlowReactPropTypes_proptype_LimitedContextualListing || __webpack_require__(/*! react */ 1).PropTypes.any;\n\nvar babelPluginFlowReactPropTypes_proptype_ContextualListing = __webpack_require__(/*! ../../../../../../types */ 4).babelPluginFlowReactPropTypes_proptype_ContextualListing || __webpack_require__(/*! react */ 1).PropTypes.any;\n\n\n\n\n\n\n\n\nvar SummaryLive = function SummaryLive(_ref) {\n var listing = _ref.listing;\n\n if (!listing.summary) return null;\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_3__common__["a" /* Unit */],\n { unit: __WEBPACK_IMPORTED_MODULE_2__enums_ListingUnit__["default"].SUMMARY, className: __WEBPACK_IMPORTED_MODULE_4__index_scss___default.a.unit },\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__libs_utils_i18n__["b" /* getParagraphs */])(listing.summary).map(function (paragraph, index) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n \'p\',\n { key: index, className: __WEBPACK_IMPORTED_MODULE_4__index_scss___default.a.paragraph },\n paragraph\n );\n })\n );\n};\n\nSummaryLive.propTypes = {\n listing: __webpack_require__(/*! prop-types */ 0).oneOfType([babelPluginFlowReactPropTypes_proptype_ContextualListing, babelPluginFlowReactPropTypes_proptype_LimitedContextualListing]).isRequired\n};\n/* harmony default export */ __webpack_exports__["a"] = (SummaryLive);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-show/ui/Listing/Summary/live/index.jsx\n// module id = 675\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-show/ui/Listing/Summary/live/index.jsx?', + ); + + /***/ + }, + /* 676 */ + /* exports provided: default */ + /* exports used: default */ + /*!******************************************************************!*\ + !*** ./app/bundles/listings-show/ui/Listing/Urls/live/index.jsx ***! + \******************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__enums_ListingUnit__ = __webpack_require__(/*! ../../../../enums/ListingUnit */ 33);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__libs_utils__ = __webpack_require__(/*! ../../../../../../libs/utils */ 20);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__common__ = __webpack_require__(/*! ../../../common */ 43);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__utils__ = __webpack_require__(/*! ./utils */ 677);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__index_scss__ = __webpack_require__(/*! ./index.scss */ 995);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__index_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6__index_scss__);\n\n\n\nvar babelPluginFlowReactPropTypes_proptype_ContextualListing = __webpack_require__(/*! ../../../../../../types */ 4).babelPluginFlowReactPropTypes_proptype_ContextualListing || __webpack_require__(/*! react */ 1).PropTypes.any;\n\n\n\n\n\n\n\n\n\n\nvar UrlsLive = function UrlsLive(_ref) {\n var listing = _ref.listing;\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_4__common__["a" /* Unit */],\n { unit: __WEBPACK_IMPORTED_MODULE_2__enums_ListingUnit__["default"].URLS, className: __WEBPACK_IMPORTED_MODULE_6__index_scss___default.a.unit },\n listing.urls.map(function (url) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n \'div\',\n { key: url, className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()(__WEBPACK_IMPORTED_MODULE_6__index_scss___default.a.urlLink, __WEBPACK_IMPORTED_MODULE_6__index_scss___default.a[__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__utils__["a" /* getDomainType */])(url)]) },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n \'a\',\n { href: url },\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__libs_utils__["h" /* removeProtocol */])(url) || url\n )\n );\n })\n );\n};\n\nUrlsLive.propTypes = {\n listing: babelPluginFlowReactPropTypes_proptype_ContextualListing\n};\n/* harmony default export */ __webpack_exports__["a"] = (UrlsLive);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-show/ui/Listing/Urls/live/index.jsx\n// module id = 676\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-show/ui/Listing/Urls/live/index.jsx?', + ); + + /***/ + }, + /* 677 */ + /* exports provided: getDomainType */ + /* exports used: getDomainType */ + /*!*****************************************************************!*\ + !*** ./app/bundles/listings-show/ui/Listing/Urls/live/utils.js ***! + \*****************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__libs_utils__ = __webpack_require__(/*! ../../../../../../libs/utils */ 20);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return getDomainType; });\n\n\nvar getDomainType = function getDomainType(url) {\n var domain = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__libs_utils__[\"i\" /* domainName */])(url);\n\n if (domain && ['vrbo', 'homeaway', 'airbnb'].includes(domain)) {\n return domain;\n }\n\n return 'default';\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-show/ui/Listing/Urls/live/utils.js\n// module id = 677\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-show/ui/Listing/Urls/live/utils.js?", + ); + + /***/ + }, + /* 678 */ + /* exports provided: default */ + /* exports used: default */ + /*!*************************************************************************************!*\ + !*** ./app/bundles/listings-show/ui/Listing/Widgets/common/StickyWidgets/index.jsx ***! + \*************************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__libs_utils_errorTracker__ = __webpack_require__(/*! ../../../../../../../libs/utils/errorTracker */ 312);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__libs_utils_dom__ = __webpack_require__(/*! ../../../../../../../libs/utils/dom */ 44);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__utils__ = __webpack_require__(/*! ../../../../../utils */ 86);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__enums_StickyState__ = __webpack_require__(/*! ../../../../../enums/StickyState */ 653);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__assets_styles_resources_variables__ = __webpack_require__(/*! ../../../../../../../assets/styles/resources/variables */ 131);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__index_scss__ = __webpack_require__(/*! ./index.scss */ 996);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__index_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7__index_scss__);\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n/* eslint-disable no-mixed-operators, consistent-return */\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar WIDGETS_MARGIN = 2; // KEEP IN SYNC: `../index.scss`\nvar WIDGETS_RAIL_DOM_ID = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__utils__["a" /* getWidgetsRailDomId */])();\n\nvar StickyWidgets = function (_React$Component) {\n _inherits(StickyWidgets, _React$Component);\n\n function StickyWidgets() {\n var _ref;\n\n var _temp, _this, _ret;\n\n _classCallCheck(this, StickyWidgets);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = StickyWidgets.__proto__ || Object.getPrototypeOf(StickyWidgets)).call.apply(_ref, [this].concat(args))), _this), _this.state = { stickyState: __WEBPACK_IMPORTED_MODULE_5__enums_StickyState__["a" /* default */].AT_THE_TOP }, _this.componentDidMount = function () {\n if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__libs_utils_dom__["h" /* isSmallScreen */])()) return;\n window.addEventListener(\'scroll\', _this.updateState);\n }, _this.componentWillUnmount = function () {\n if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__libs_utils_dom__["h" /* isSmallScreen */])()) return;\n window.removeEventListener(\'scroll\', _this.updateState);\n }, _this.setContainerRef = function (ref) {\n _this.container = ref;\n }, _this.updateState = function () {\n // Even we don\'t add scroll event listener on small screens (^ see componentDidMount)\n // But user might load a page on a bigger screen & resize window later on\n // So handling it inside listener as well\n if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__libs_utils_dom__["h" /* isSmallScreen */])()) return;\n\n var rail = document.getElementById(WIDGETS_RAIL_DOM_ID);\n\n if (!rail) {\n __WEBPACK_IMPORTED_MODULE_2__libs_utils_errorTracker__["a" /* notify */]("[SLV]: Can\'t find widgets rail dom node. Page works, but widgets are not sticky.");\n return false;\n }\n\n var containerRect = _this.container.getBoundingClientRect();\n var railRect = rail.getBoundingClientRect();\n\n // Ignoring if widgets column is heigher than units column\n if (containerRect.height >= railRect.height) return;\n\n var stickyState = _this.state.stickyState;\n\n var scrolled = window.pageYOffset;\n\n var topBreakpoint = railRect.top + scrolled + WIDGETS_MARGIN - __WEBPACK_IMPORTED_MODULE_6__assets_styles_resources_variables__["e" /* NAVBAR_HEIGHT */];\n var bottomBreakpoint = railRect.bottom + scrolled;\n var containerTopPosition = containerRect.top + scrolled + WIDGETS_MARGIN - __WEBPACK_IMPORTED_MODULE_6__assets_styles_resources_variables__["e" /* NAVBAR_HEIGHT */];\n var containerBottomPosition = containerRect.bottom + scrolled;\n\n if (containerBottomPosition >= bottomBreakpoint && stickyState !== __WEBPACK_IMPORTED_MODULE_5__enums_StickyState__["a" /* default */].AT_THE_BOTTOM) {\n return _this.setState({ stickyState: __WEBPACK_IMPORTED_MODULE_5__enums_StickyState__["a" /* default */].AT_THE_BOTTOM });\n } else if (stickyState !== __WEBPACK_IMPORTED_MODULE_5__enums_StickyState__["a" /* default */].STICKY && (stickyState === __WEBPACK_IMPORTED_MODULE_5__enums_StickyState__["a" /* default */].AT_THE_TOP && scrolled >= topBreakpoint || stickyState === __WEBPACK_IMPORTED_MODULE_5__enums_StickyState__["a" /* default */].AT_THE_BOTTOM && scrolled <= containerTopPosition)) {\n return _this.setState({ stickyState: __WEBPACK_IMPORTED_MODULE_5__enums_StickyState__["a" /* default */].STICKY });\n } else if (scrolled < topBreakpoint && stickyState !== __WEBPACK_IMPORTED_MODULE_5__enums_StickyState__["a" /* default */].AT_THE_TOP) {\n return _this.setState({ stickyState: __WEBPACK_IMPORTED_MODULE_5__enums_StickyState__["a" /* default */].AT_THE_TOP });\n }\n }, _this.render = function () {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n \'div\',\n {\n ref: _this.setContainerRef,\n className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()(__WEBPACK_IMPORTED_MODULE_7__index_scss___default.a.container, __WEBPACK_IMPORTED_MODULE_7__index_scss___default.a[\'position--\' + _this.state.stickyState])\n },\n _this.props.children\n );\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n return StickyWidgets;\n}(__WEBPACK_IMPORTED_MODULE_0_react___default.a.Component);\n\nStickyWidgets.propTypes = {\n children: __webpack_require__(/*! prop-types */ 0).any\n};\n/* harmony default export */ __webpack_exports__["a"] = (StickyWidgets);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-show/ui/Listing/Widgets/common/StickyWidgets/index.jsx\n// module id = 678\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-show/ui/Listing/Widgets/common/StickyWidgets/index.jsx?', + ); + + /***/ + }, + /* 679 */ + /* exports provided: default */ + /* exports used: default */ + /*!***************************************************************************************!*\ + !*** ./app/bundles/listings-show/ui/Listing/Widgets/live/GetOnTheGuestList/index.jsx ***! + \***************************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__enums_ListingRelationshipType__ = __webpack_require__(/*! ../../../../../../../enums/ListingRelationshipType */ 136);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__MembershipRequest_live_PublicGuest_PublicGuestForGuest__ = __webpack_require__(/*! ../../../MembershipRequest/live/PublicGuest/PublicGuestForGuest */ 284);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__MembershipRequest_live_PublicGuest_PublicGuestForOwner__ = __webpack_require__(/*! ../../../MembershipRequest/live/PublicGuest/PublicGuestForOwner */ 285);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__MembershipRequest_live_RequestedMembership__ = __webpack_require__(/*! ../../../MembershipRequest/live/RequestedMembership */ 286);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__MembershipRequest_live_Invitee__ = __webpack_require__(/*! ../../../MembershipRequest/live/Invitee */ 282);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__index_scss__ = __webpack_require__(/*! ./index.scss */ 997);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__index_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6__index_scss__);\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\n\nvar babelPluginFlowReactPropTypes_proptype_ListingRelationshipType = __webpack_require__(/*! ../../../../../../../types */ 4).babelPluginFlowReactPropTypes_proptype_ListingRelationshipType || __webpack_require__(/*! react */ 1).PropTypes.any;\n\nvar babelPluginFlowReactPropTypes_proptype_LimitedContextualListing = __webpack_require__(/*! ../../../../../../../types */ 4).babelPluginFlowReactPropTypes_proptype_LimitedContextualListing || __webpack_require__(/*! react */ 1).PropTypes.any;\n\n\n\n\n\n\n\n\n\n\nvar OWNER = __WEBPACK_IMPORTED_MODULE_1__enums_ListingRelationshipType__["a" /* default */].OWNER,\n PUBLIC_GUEST = __WEBPACK_IMPORTED_MODULE_1__enums_ListingRelationshipType__["a" /* default */].PUBLIC_GUEST,\n REQUESTED_MEMBERSHIP = __WEBPACK_IMPORTED_MODULE_1__enums_ListingRelationshipType__["a" /* default */].REQUESTED_MEMBERSHIP,\n INVITEE = __WEBPACK_IMPORTED_MODULE_1__enums_ListingRelationshipType__["a" /* default */].INVITEE;\n\nvar GetOnTheGuestListWidget = function (_React$Component) {\n _inherits(GetOnTheGuestListWidget, _React$Component);\n\n function GetOnTheGuestListWidget() {\n var _ref;\n\n var _temp, _this, _ret;\n\n _classCallCheck(this, GetOnTheGuestListWidget);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = GetOnTheGuestListWidget.__proto__ || Object.getPrototypeOf(GetOnTheGuestListWidget)).call.apply(_ref, [this].concat(args))), _this), _this.state = { relationship: _this.props.listing.userContext.listingRelationshipType }, _this.setRelationship = function (relationship) {\n _this.setState({ relationship: relationship });\n }, _this.render = function () {\n var _this2 = _this,\n props = _this2.props,\n state = _this2.state;\n\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n \'div\',\n { className: __WEBPACK_IMPORTED_MODULE_6__index_scss___default.a.unit },\n state.relationship === OWNER && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3__MembershipRequest_live_PublicGuest_PublicGuestForOwner__["a" /* default */], { listing: props.listing }),\n state.relationship === PUBLIC_GUEST && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2__MembershipRequest_live_PublicGuest_PublicGuestForGuest__["a" /* default */], {\n listing: props.listing,\n isLoggedIn: props.isLoggedIn,\n setRelationship: _this.setRelationship\n }),\n state.relationship === REQUESTED_MEMBERSHIP && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_4__MembershipRequest_live_RequestedMembership__["a" /* default */], {\n isReturningUser: props.listing.userContext.listingRelationshipType === REQUESTED_MEMBERSHIP\n }),\n state.relationship === INVITEE && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5__MembershipRequest_live_Invitee__["a" /* default */], {\n listing: props.listing,\n isLoggedIn: props.isLoggedIn,\n setRelationship: _this.setRelationship\n })\n );\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n return GetOnTheGuestListWidget;\n}(__WEBPACK_IMPORTED_MODULE_0_react___default.a.Component);\n\nGetOnTheGuestListWidget.propTypes = {\n listing: babelPluginFlowReactPropTypes_proptype_LimitedContextualListing,\n isLoggedIn: __webpack_require__(/*! prop-types */ 0).bool.isRequired\n};\n/* harmony default export */ __webpack_exports__["a"] = (GetOnTheGuestListWidget);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-show/ui/Listing/Widgets/live/GetOnTheGuestList/index.jsx\n// module id = 679\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-show/ui/Listing/Widgets/live/GetOnTheGuestList/index.jsx?', + ); + + /***/ + }, + /* 680 */ + /* exports provided: default */ + /* exports used: default */ + /*!**********************************************************************************!*\ + !*** ./app/bundles/listings-show/ui/Listing/Widgets/live/Host/Details/index.jsx ***! + \**********************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__libs_components__ = __webpack_require__(/*! ../../../../../../../../libs/components */ 11);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__libs_components_icons_IconFbFriends__ = __webpack_require__(/*! ../../../../../../../../libs/components/icons/IconFbFriends */ 861);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__index__ = __webpack_require__(/*! ../index */ 182);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__index_scss__ = __webpack_require__(/*! ../index.scss */ 154);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__index_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__index_scss__);\n\n\nvar babelPluginFlowReactPropTypes_proptype_User = __webpack_require__(/*! ../../../../../../../../types */ 4).babelPluginFlowReactPropTypes_proptype_User || __webpack_require__(/*! react */ 1).PropTypes.any;\n\n\n\n\n\n\n\n\nvar Details = function Details(_ref) {\n var owner = _ref.owner;\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_4__index_scss___default.a.hostData },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_4__index_scss___default.a.avatar },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_1__libs_components__[\"f\" /* A */],\n { href: owner.url, color: 'none', underline: 'none' },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1__libs_components__[\"g\" /* Image */], {\n url: owner.avatarUrl,\n width: __WEBPACK_IMPORTED_MODULE_3__index__[\"b\" /* AVATAR_SIZE */],\n height: __WEBPACK_IMPORTED_MODULE_3__index__[\"b\" /* AVATAR_SIZE */],\n dpr: '2.0',\n crop: 'fill',\n radius: 'max',\n gravity: 'faces',\n alt: owner.firstName + ' ' + owner.lastName\n })\n ),\n owner.fbFriend && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2__libs_components_icons_IconFbFriends__[\"a\" /* default */], { className: __WEBPACK_IMPORTED_MODULE_4__index_scss___default.a.fbFriendIcon })\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_4__index_scss___default.a.info },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_4__index_scss___default.a.name },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_1__libs_components__[\"f\" /* A */],\n { href: owner.url, color: 'none', underline: 'none', className: __WEBPACK_IMPORTED_MODULE_4__index_scss___default.a.nameLink },\n owner.firstName,\n ' ',\n owner.lastName\n )\n ),\n owner.phone && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_1__libs_components__[\"f\" /* A */],\n { href: 'tel:' + owner.phone, color: 'none', underline: 'none', className: __WEBPACK_IMPORTED_MODULE_4__index_scss___default.a.phoneLink },\n owner.phone\n ),\n owner.email && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_1__libs_components__[\"f\" /* A */],\n { href: 'mailto:' + owner.email, color: 'none', underline: 'none', className: __WEBPACK_IMPORTED_MODULE_4__index_scss___default.a.emailLink },\n 'Send Email'\n )\n )\n );\n};\n\nDetails.propTypes = {\n owner: babelPluginFlowReactPropTypes_proptype_User\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (Details);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-show/ui/Listing/Widgets/live/Host/Details/index.jsx\n// module id = 680\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-show/ui/Listing/Widgets/live/Host/Details/index.jsx?", + ); + + /***/ + }, + /* 681 */ + /* exports provided: default */ + /* exports used: default */ + /*!************************************************************************************!*\ + !*** ./app/bundles/listings-show/ui/Listing/Widgets/live/Host/Incognito/index.jsx ***! + \************************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils__ = __webpack_require__(/*! ../../../../../../utils */ 86);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__libs_utils_dom__ = __webpack_require__(/*! ../../../../../../../../libs/utils/dom */ 44);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Topbar_common_UnitsProvider__ = __webpack_require__(/*! ../../../../../Topbar/common/UnitsProvider */ 289);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__enums_ListingUnit__ = __webpack_require__(/*! ../../../../../../enums/ListingUnit */ 33);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__libs_components__ = __webpack_require__(/*! ../../../../../../../../libs/components */ 11);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__index__ = __webpack_require__(/*! ../index */ 182);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__index_scss__ = __webpack_require__(/*! ../index.scss */ 154);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__index_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8__index_scss__);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar Incognito = function Incognito(_ref) {\n var cloudinaryUrl = _ref.cloudinaryUrl;\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_8__index_scss___default.a.hostData },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()(__WEBPACK_IMPORTED_MODULE_8__index_scss___default.a.avatar, __WEBPACK_IMPORTED_MODULE_8__index_scss___default.a.incognito) },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_6__libs_components__[\"g\" /* Image */], {\n url: cloudinaryUrl + 'default_avatar.png',\n width: __WEBPACK_IMPORTED_MODULE_7__index__[\"b\" /* AVATAR_SIZE */],\n height: __WEBPACK_IMPORTED_MODULE_7__index__[\"b\" /* AVATAR_SIZE */],\n dpr: '2.0',\n crop: 'fill',\n radius: 'max',\n alt: 'Host'\n })\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()(__WEBPACK_IMPORTED_MODULE_8__index_scss___default.a.info, __WEBPACK_IMPORTED_MODULE_8__index_scss___default.a.incognito) },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_6__libs_components__[\"t\" /* LinkLike */],\n {\n color: 'primary',\n underline: 'always',\n onClick: function onClick() {\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__libs_utils_dom__[\"g\" /* scrollTo */])(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__utils__[\"b\" /* getListingUnitDomId */])(__WEBPACK_IMPORTED_MODULE_5__enums_ListingUnit__[\"default\"].MEMBERSHIP.value), {\n padding: __WEBPACK_IMPORTED_MODULE_4__Topbar_common_UnitsProvider__[\"a\" /* SCROLL_PADDING */]\n });\n }\n },\n 'Get on the Guest List'\n ),\n ' ',\n 'to see host\\u2019s contact information and book the place'\n )\n );\n};\n\nIncognito.propTypes = {\n cloudinaryUrl: __webpack_require__(/*! prop-types */ 0).string.isRequired\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (Incognito);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-show/ui/Listing/Widgets/live/Host/Incognito/index.jsx\n// module id = 681\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-show/ui/Listing/Widgets/live/Host/Incognito/index.jsx?", + ); + + /***/ + }, + /* 682 */ + /* exports provided: default */ + /* exports used: default */ + /*!****************************************************************************************!*\ + !*** ./app/bundles/listings-show/ui/Listing/Widgets/live/Host/MessageButton/index.jsx ***! + \****************************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__libs_components__ = __webpack_require__(/*! ../../../../../../../../libs/components */ 11);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__index_scss__ = __webpack_require__(/*! ../index.scss */ 154);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__index_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__index_scss__);\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\n\n\n\n\n\nvar MessageHost = function (_React$Component) {\n _inherits(MessageHost, _React$Component);\n\n function MessageHost() {\n var _ref;\n\n var _temp, _this, _ret;\n\n _classCallCheck(this, MessageHost);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = MessageHost.__proto__ || Object.getPrototypeOf(MessageHost)).call.apply(_ref, [this].concat(args))), _this), _this.state = { modalIsShown: false }, _this.showModal = function (event) {\n event.preventDefault();\n _this.setState({ modalIsShown: true });\n }, _this.hideModal = function () {\n return _this.setState({ modalIsShown: false });\n }, _this.render = function () {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n \'div\',\n { className: __WEBPACK_IMPORTED_MODULE_2__index_scss___default.a.messageButton },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_1__libs_components__["c" /* Button */],\n {\n orange: true,\n expanded: true,\n asNativeLink: true,\n size: \'lg\',\n href: _this.props.newConversationPath,\n onClick: _this.props.isManagedByCurrentUser ? _this.showModal : undefined\n },\n \'Book Listing\'\n ),\n _this.state.modalIsShown && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_1__libs_components__["s" /* ConfirmModal */],\n { okHandler: _this.hideModal },\n \'You are a manager of this listing. You can\\u2019t book your own place.\'\n )\n );\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n return MessageHost;\n}(__WEBPACK_IMPORTED_MODULE_0_react___default.a.Component);\n\nMessageHost.propTypes = {\n newConversationPath: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n isManagedByCurrentUser: __webpack_require__(/*! prop-types */ 0).bool.isRequired\n};\n/* harmony default export */ __webpack_exports__["a"] = (MessageHost);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-show/ui/Listing/Widgets/live/Host/MessageButton/index.jsx\n// module id = 682\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-show/ui/Listing/Widgets/live/Host/MessageButton/index.jsx?', + ); + + /***/ + }, + /* 683 */ + /* exports provided: default */ + /* exports used: default */ + /*!***************************************************************************!*\ + !*** ./app/bundles/listings-show/ui/Listing/Widgets/live/Price/index.jsx ***! + \***************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__enums_DisplayMode__ = __webpack_require__(/*! ../../../../../../../enums/DisplayMode */ 60);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__libs_hocs_withIsMountedProp__ = __webpack_require__(/*! ../../../../../../../libs/hocs/withIsMountedProp */ 191);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__libs_components__ = __webpack_require__(/*! ../../../../../../../libs/components */ 11);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__PrivacyBadge__ = __webpack_require__(/*! ../PrivacyBadge */ 684);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__index_scss__ = __webpack_require__(/*! ./index.scss */ 998);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__index_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5__index_scss__);\n\n/* eslint-disable react/jsx-indent */\n\n\n\nvar babelPluginFlowReactPropTypes_proptype_ContextualListing = __webpack_require__(/*! ../../../../../../../types */ 4).babelPluginFlowReactPropTypes_proptype_ContextualListing || __webpack_require__(/*! react */ 1).PropTypes.any;\n\n\n\n\n\n\n\n\n\nvar Price = function Price(_ref) {\n var listing = _ref.listing,\n isMounted = _ref.isMounted;\n\n if (listing.displayMode !== __WEBPACK_IMPORTED_MODULE_1__enums_DisplayMode__[\"a\" /* default */].FULL_DETAILS) return null;\n\n var prettyPrice = isMounted ? listing.price && parseInt(listing.price, 10).toLocaleString() : listing.price;\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_5__index_scss___default.a.unit },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_4__PrivacyBadge__[\"a\" /* default */], { privacyMode: listing.privacyMode }),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_5__index_scss___default.a.priceWrapper },\n prettyPrice || listing.cleaningFee ? __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'span',\n { className: __WEBPACK_IMPORTED_MODULE_5__index_scss___default.a.price },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'sup',\n null,\n '$'\n ),\n ' ',\n prettyPrice || 0,\n listing.cleaningFee && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_3__libs_components__[\"u\" /* IconTooltip */],\n {\n type: 'warning',\n placement: 'right',\n className: __WEBPACK_IMPORTED_MODULE_5__index_scss___default.a.cleaningFeeIcon,\n domId: 'listing-price-widget-cleaning-fee'\n },\n 'Cleaning fee: ',\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'sup',\n null,\n '$'\n ),\n ' ',\n listing.cleaningFee,\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('br', null),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'span',\n { className: __WEBPACK_IMPORTED_MODULE_5__index_scss___default.a.cleaningFeeNote },\n '(for whole period of stay)'\n )\n )\n ) : __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'span',\n { className: __WEBPACK_IMPORTED_MODULE_5__index_scss___default.a.ask },\n 'Ask Host for Price'\n )\n ),\n (prettyPrice || listing.cleaningFee) && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_5__index_scss___default.a.periodWrapper },\n 'per night'\n )\n );\n};\n\nPrice.propTypes = {\n listing: babelPluginFlowReactPropTypes_proptype_ContextualListing,\n isMounted: __webpack_require__(/*! prop-types */ 0).bool.isRequired\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__libs_hocs_withIsMountedProp__[\"a\" /* default */])(Price));\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-show/ui/Listing/Widgets/live/Price/index.jsx\n// module id = 683\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-show/ui/Listing/Widgets/live/Price/index.jsx?", + ); + + /***/ + }, + /* 684 */ + /* exports provided: default */ + /* exports used: default */ + /*!**********************************************************************************!*\ + !*** ./app/bundles/listings-show/ui/Listing/Widgets/live/PrivacyBadge/index.jsx ***! + \**********************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__enums_PrivacyMode__ = __webpack_require__(/*! ../../../../../../../enums/PrivacyMode */ 69);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__libs_components_icons_IconMembership__ = __webpack_require__(/*! ../../../../../../../libs/components/icons/IconMembership */ 189);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__libs_components__ = __webpack_require__(/*! ../../../../../../../libs/components */ 11);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__index_scss__ = __webpack_require__(/*! ./index.scss */ 999);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__index_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__index_scss__);\n\n\nvar babelPluginFlowReactPropTypes_proptype_PrivacyMode = __webpack_require__(/*! ../../../../../../../types */ 4).babelPluginFlowReactPropTypes_proptype_PrivacyMode || __webpack_require__(/*! react */ 1).PropTypes.any;\n\n\n\n\n\n\n\nvar PrivacyBadge = function PrivacyBadge(_ref) {\n var privacyMode = _ref.privacyMode;\n\n if (privacyMode !== __WEBPACK_IMPORTED_MODULE_1__enums_PrivacyMode__["a" /* default */].PRIVATE.value) return null;\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_3__libs_components__["v" /* Tooltip */],\n {\n tooltip: \'You are on the guest list of this listing. The host requests that guest list members keep this information confidential.\',\n placement: \'bottom\',\n domId: \'listing-widget-privacy-badge\'\n },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n \'div\',\n { className: __WEBPACK_IMPORTED_MODULE_4__index_scss___default.a.wrapper },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2__libs_components_icons_IconMembership__["a" /* default */], { className: __WEBPACK_IMPORTED_MODULE_4__index_scss___default.a.icon })\n )\n );\n};\n\nPrivacyBadge.propTypes = {\n privacyMode: __webpack_require__(/*! prop-types */ 0).any.isRequired\n};\n/* harmony default export */ __webpack_exports__["a"] = (PrivacyBadge);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-show/ui/Listing/Widgets/live/PrivacyBadge/index.jsx\n// module id = 684\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-show/ui/Listing/Widgets/live/PrivacyBadge/index.jsx?', + ); + + /***/ + }, + /* 685 */ + /* exports provided: full, limited */ + /* exports used: limited, full */ + /*!******************************************************************!*\ + !*** ./app/bundles/listings-show/ui/Topbar/common/navigation.js ***! + \******************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__enums_ListingUnit__ = __webpack_require__(/*! ../../../enums/ListingUnit */ 33);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return full; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return limited; });\n\n\nvar full = [__WEBPACK_IMPORTED_MODULE_0__enums_ListingUnit__["default"].SUMMARY, __WEBPACK_IMPORTED_MODULE_0__enums_ListingUnit__["default"].DETAILS, __WEBPACK_IMPORTED_MODULE_0__enums_ListingUnit__["default"].AMENITIES, __WEBPACK_IMPORTED_MODULE_0__enums_ListingUnit__["default"].PRICES, __WEBPACK_IMPORTED_MODULE_0__enums_ListingUnit__["default"].HOUSE_RULES, __WEBPACK_IMPORTED_MODULE_0__enums_ListingUnit__["default"].DESCRIPTION, __WEBPACK_IMPORTED_MODULE_0__enums_ListingUnit__["default"].URLS];\n\nvar limited = [__WEBPACK_IMPORTED_MODULE_0__enums_ListingUnit__["default"].SUMMARY, __WEBPACK_IMPORTED_MODULE_0__enums_ListingUnit__["default"].MEMBERSHIP];\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-show/ui/Topbar/common/navigation.js\n// module id = 685\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-show/ui/Topbar/common/navigation.js?', + ); + + /***/ + }, + /* 686 */ + /* exports provided: default */ + /* exports used: default */ + /*!*************************************************************************************************!*\ + !*** ./app/bundles/listings-show/ui/Topbar/live/FavoriteButton/FavoriteButtonStateProvider.jsx ***! + \*************************************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__libs_utils_api_favoriteUnfavorite__ = __webpack_require__(/*! ../../../../../../libs/utils/api/favoriteUnfavorite */ 309);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__libs_redirectToSignIn__ = __webpack_require__(/*! ../../../../../../libs/redirectToSignIn */ 88);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\n\n\n\n\nvar FavoriteButtonStateProvider = function (_React$Component) {\n _inherits(FavoriteButtonStateProvider, _React$Component);\n\n function FavoriteButtonStateProvider() {\n var _ref;\n\n var _temp, _this, _ret;\n\n _classCallCheck(this, FavoriteButtonStateProvider);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = FavoriteButtonStateProvider.__proto__ || Object.getPrototypeOf(FavoriteButtonStateProvider)).call.apply(_ref, [this].concat(args))), _this), _this.state = {\n favorited: _this.props.isFavorited,\n hovered: false\n }, _this.setHoveredStateOn = function () {\n if (_this.state.hovered) return;\n _this.setState({ hovered: true });\n }, _this.setHoveredStateOff = function () {\n if (!_this.state.hovered) return;\n _this.setState({ hovered: false });\n }, _this.toggleFavoritedState = function () {\n if (_this.props.isLoggedIn) {\n _this.setState({ favorited: !_this.state.favorited }, _this.toggleServerState);\n } else {\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__libs_redirectToSignIn__["a" /* default */])();\n }\n }, _this.toggleServerState = function () {\n var listingId = _this.props.listingId;\n var favorited = _this.state.favorited;\n\n\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__libs_utils_api_favoriteUnfavorite__["a" /* favoriteUnfavoriteAction */])(listingId, favorited).catch(function (error) {\n return _this.handleServerFailure(error);\n });\n }, _this.handleServerFailure = function () {\n _this.setState(function (prevState) {\n return { favorited: !prevState.favorited };\n }, function () {\n return undefined;\n });\n }, _this.render = function () {\n return _this.props.children(_extends({}, _this.state, {\n setHoveredStateOn: _this.setHoveredStateOn,\n setHoveredStateOff: _this.setHoveredStateOff,\n toggleFavoritedState: _this.toggleFavoritedState\n }));\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n // $FlowIgnoreMe: children\n\n\n return FavoriteButtonStateProvider;\n}(__WEBPACK_IMPORTED_MODULE_0_react___default.a.Component);\n\nFavoriteButtonStateProvider.propTypes = {\n listingId: __webpack_require__(/*! prop-types */ 0).number.isRequired,\n isFavorited: __webpack_require__(/*! prop-types */ 0).bool.isRequired,\n isLoggedIn: __webpack_require__(/*! prop-types */ 0).bool.isRequired,\n children: __webpack_require__(/*! prop-types */ 0).func\n};\n/* harmony default export */ __webpack_exports__["a"] = (FavoriteButtonStateProvider);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-show/ui/Topbar/live/FavoriteButton/FavoriteButtonStateProvider.jsx\n// module id = 686\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-show/ui/Topbar/live/FavoriteButton/FavoriteButtonStateProvider.jsx?', + ); + + /***/ + }, + /* 687 */ + /* exports provided: default */ + /* exports used: default */ + /*!***************************************************************************!*\ + !*** ./app/bundles/listings-show/ui/Topbar/live/FavoriteButton/index.jsx ***! + \***************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__libs_components__ = __webpack_require__(/*! ../../../../../../libs/components */ 11);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__libs_components_icons_IconHeart__ = __webpack_require__(/*! ../../../../../../libs/components/icons/IconHeart */ 305);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__libs_components_icons_IconHeartEmpty__ = __webpack_require__(/*! ../../../../../../libs/components/icons/IconHeartEmpty */ 863);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__FavoriteButtonStateProvider__ = __webpack_require__(/*! ./FavoriteButtonStateProvider */ 686);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__index_scss__ = __webpack_require__(/*! ./index.scss */ 1002);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__index_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5__index_scss__);\n\n\n\n\n\n\n\n\n\nvar HeartButton = function HeartButton(props) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_4__FavoriteButtonStateProvider__[\"a\" /* default */],\n props,\n function (state) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_1__libs_components__[\"c\" /* Button */],\n {\n faded: true,\n id: 'listing-favorite-button',\n className: __WEBPACK_IMPORTED_MODULE_5__index_scss___default.a.button,\n onClick: state.toggleFavoritedState,\n onMouseOver: state.setHoveredStateOn,\n onFocus: state.setHoveredStateOn,\n onMouseOut: state.setHoveredStateOff,\n onBlur: state.setHoveredStateOff\n },\n state.favorited ? __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2__libs_components_icons_IconHeart__[\"a\" /* default */], { className: __WEBPACK_IMPORTED_MODULE_5__index_scss___default.a.heart }) : __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3__libs_components_icons_IconHeartEmpty__[\"a\" /* default */], { className: __WEBPACK_IMPORTED_MODULE_5__index_scss___default.a.heart }),\n state.favorited ? __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'span',\n null,\n state.hovered ? 'Remove from Favorites' : 'Added to Favorites'\n ) : __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'span',\n null,\n 'Add to Favorites'\n )\n );\n }\n );\n};\n\nHeartButton.propTypes = {\n listingId: __webpack_require__(/*! prop-types */ 0).number.isRequired,\n isFavorited: __webpack_require__(/*! prop-types */ 0).bool.isRequired,\n isLoggedIn: __webpack_require__(/*! prop-types */ 0).bool.isRequired\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (HeartButton);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-show/ui/Topbar/live/FavoriteButton/index.jsx\n// module id = 687\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-show/ui/Topbar/live/FavoriteButton/index.jsx?", + ); + + /***/ + }, + /* 688 */ + /* exports provided: default */ + /* exports used: default */ + /*!************************************************************!*\ + !*** ./app/bundles/listings-show/ui/Topbar/live/index.jsx ***! + \************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common_StickyNavbar__ = __webpack_require__(/*! ../common/StickyNavbar */ 288);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Navigation__ = __webpack_require__(/*! ./Navigation */ 290);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__FavoriteButton__ = __webpack_require__(/*! ./FavoriteButton */ 687);\n\n\nvar babelPluginFlowReactPropTypes_proptype_LimitedContextualListing = __webpack_require__(/*! ../../../../../types */ 4).babelPluginFlowReactPropTypes_proptype_LimitedContextualListing || __webpack_require__(/*! react */ 1).PropTypes.any;\n\nvar babelPluginFlowReactPropTypes_proptype_ContextualListing = __webpack_require__(/*! ../../../../../types */ 4).babelPluginFlowReactPropTypes_proptype_ContextualListing || __webpack_require__(/*! react */ 1).PropTypes.any;\n\n\n\n\n\nvar Topbar = function Topbar(_ref) {\n var listing = _ref.listing,\n isLoggedIn = _ref.isLoggedIn;\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_1__common_StickyNavbar__["a" /* default */],\n null,\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2__Navigation__["a" /* default */], { displayMode: listing.displayMode }),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3__FavoriteButton__["a" /* default */], {\n listingId: listing.id,\n isFavorited: listing.userContext.favorited,\n isLoggedIn: isLoggedIn\n })\n );\n};\n\nTopbar.propTypes = {\n listing: __webpack_require__(/*! prop-types */ 0).oneOfType([babelPluginFlowReactPropTypes_proptype_ContextualListing, babelPluginFlowReactPropTypes_proptype_LimitedContextualListing]).isRequired,\n isLoggedIn: __webpack_require__(/*! prop-types */ 0).bool.isRequired\n};\n/* harmony default export */ __webpack_exports__["a"] = (Topbar);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-show/ui/Topbar/live/index.jsx\n// module id = 688\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-show/ui/Topbar/live/index.jsx?', + ); + + /***/ + }, + /* 689 */ + /* exports provided: default */ + /* exports used: default */ + /*!***********************************************************************!*\ + !*** ./app/bundles/listings-show/ui/Topbar/preview/Buttons/index.jsx ***! + \***********************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__enums_PrivacyMode__ = __webpack_require__(/*! ../../../../../../enums/PrivacyMode */ 69);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__enums_DisplayMode__ = __webpack_require__(/*! ../../../../../../enums/DisplayMode */ 60);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__listings_manage_routes_lemPaths__ = __webpack_require__(/*! ../../../../../listings-manage/routes/lemPaths */ 652);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__libs_components__ = __webpack_require__(/*! ../../../../../../libs/components */ 11);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__index_scss__ = __webpack_require__(/*! ./index.scss */ 1003);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__index_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5__index_scss__);\n\n\nvar babelPluginFlowReactPropTypes_proptype_ContextualListingDisplayMode = __webpack_require__(/*! ../../../../../../types */ 4).babelPluginFlowReactPropTypes_proptype_ContextualListingDisplayMode || __webpack_require__(/*! react */ 1).PropTypes.any;\n\nvar babelPluginFlowReactPropTypes_proptype_LimitedContextualListing = __webpack_require__(/*! ../../../../../../types */ 4).babelPluginFlowReactPropTypes_proptype_LimitedContextualListing || __webpack_require__(/*! react */ 1).PropTypes.any;\n\nvar babelPluginFlowReactPropTypes_proptype_ContextualListing = __webpack_require__(/*! ../../../../../../types */ 4).babelPluginFlowReactPropTypes_proptype_ContextualListing || __webpack_require__(/*! react */ 1).PropTypes.any;\n\n\n\n\n\n\n\n\n\nvar Buttons = function Buttons(_ref) {\n var listing = _ref.listing,\n isLive = _ref.isLive,\n setDisplayMode = _ref.setDisplayMode;\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n \'div\',\n { className: __WEBPACK_IMPORTED_MODULE_5__index_scss___default.a.wrapper },\n listing.privacyMode === __WEBPACK_IMPORTED_MODULE_1__enums_PrivacyMode__["a" /* default */].PRIVATE.value && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n \'div\',\n { className: __WEBPACK_IMPORTED_MODULE_5__index_scss___default.a.viewModeWrapper },\n \'View:\',\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n \'div\',\n { className: __WEBPACK_IMPORTED_MODULE_5__index_scss___default.a.viewModeButtons },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_4__libs_components__["c" /* Button */],\n {\n primary: listing.displayMode === __WEBPACK_IMPORTED_MODULE_2__enums_DisplayMode__["a" /* default */].LIMITED_PREVIEW,\n className: __WEBPACK_IMPORTED_MODULE_5__index_scss___default.a.viewModeButton,\n onClick: function onClick() {\n return setDisplayMode(__WEBPACK_IMPORTED_MODULE_2__enums_DisplayMode__["a" /* default */].LIMITED_PREVIEW);\n }\n },\n \'Limited\'\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_4__libs_components__["c" /* Button */],\n {\n primary: listing.displayMode === __WEBPACK_IMPORTED_MODULE_2__enums_DisplayMode__["a" /* default */].FULL_DETAILS,\n className: __WEBPACK_IMPORTED_MODULE_5__index_scss___default.a.viewModeButton,\n onClick: function onClick() {\n return setDisplayMode(__WEBPACK_IMPORTED_MODULE_2__enums_DisplayMode__["a" /* default */].FULL_DETAILS);\n }\n },\n \'Full\'\n )\n )\n ),\n isLive ? __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_4__libs_components__["c" /* Button */],\n { orange: true, asNativeLink: true, href: __WEBPACK_IMPORTED_MODULE_3__listings_manage_routes_lemPaths__["a" /* paths */].lemEditPath(listing.id), margin: \'left\' },\n \'Edit Listing\'\n ) : __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_4__libs_components__["c" /* Button */],\n { orange: true, asLink: true, to: __WEBPACK_IMPORTED_MODULE_3__listings_manage_routes_lemPaths__["a" /* paths */].lemEditPath(listing.id), margin: \'left\' },\n \'Back to Editing\'\n )\n );\n};\n\nButtons.propTypes = {\n listing: __webpack_require__(/*! prop-types */ 0).oneOfType([babelPluginFlowReactPropTypes_proptype_ContextualListing, babelPluginFlowReactPropTypes_proptype_LimitedContextualListing]).isRequired,\n isLive: __webpack_require__(/*! prop-types */ 0).bool,\n setDisplayMode: __webpack_require__(/*! prop-types */ 0).func.isRequired\n};\n/* harmony default export */ __webpack_exports__["a"] = (Buttons);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-show/ui/Topbar/preview/Buttons/index.jsx\n// module id = 689\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-show/ui/Topbar/preview/Buttons/index.jsx?', + ); + + /***/ + }, + /* 690 */ + /* exports provided: default */ + /* exports used: default */ + /*!***************************************************************!*\ + !*** ./app/bundles/listings-show/ui/Topbar/preview/index.jsx ***! + \***************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common_StickyNavbar__ = __webpack_require__(/*! ../common/StickyNavbar */ 288);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__live_Navigation__ = __webpack_require__(/*! ../live/Navigation */ 290);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Buttons__ = __webpack_require__(/*! ./Buttons */ 689);\n\n\nvar babelPluginFlowReactPropTypes_proptype_ContextualListingDisplayMode = __webpack_require__(/*! ../../../../../types */ 4).babelPluginFlowReactPropTypes_proptype_ContextualListingDisplayMode || __webpack_require__(/*! react */ 1).PropTypes.any;\n\nvar babelPluginFlowReactPropTypes_proptype_LimitedContextualListing = __webpack_require__(/*! ../../../../../types */ 4).babelPluginFlowReactPropTypes_proptype_LimitedContextualListing || __webpack_require__(/*! react */ 1).PropTypes.any;\n\nvar babelPluginFlowReactPropTypes_proptype_ContextualListing = __webpack_require__(/*! ../../../../../types */ 4).babelPluginFlowReactPropTypes_proptype_ContextualListing || __webpack_require__(/*! react */ 1).PropTypes.any;\n\n\n\n\n\nvar Topbar = function Topbar(props) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_1__common_StickyNavbar__["a" /* default */],\n null,\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2__live_Navigation__["a" /* default */], { displayMode: props.listing.displayMode }),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3__Buttons__["a" /* default */], props)\n );\n};\n\nTopbar.propTypes = {\n listing: __webpack_require__(/*! prop-types */ 0).oneOfType([babelPluginFlowReactPropTypes_proptype_ContextualListing, babelPluginFlowReactPropTypes_proptype_LimitedContextualListing]).isRequired,\n isLive: __webpack_require__(/*! prop-types */ 0).bool,\n setDisplayMode: __webpack_require__(/*! prop-types */ 0).func.isRequired\n};\n/* harmony default export */ __webpack_exports__["a"] = (Topbar);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-show/ui/Topbar/preview/index.jsx\n// module id = 690\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-show/ui/Topbar/preview/index.jsx?', + ); + + /***/ + }, + /* 691 */ + /* exports provided: Td */ + /* exports used: Td */ + /*!****************************************************************!*\ + !*** ./app/bundles/listings-show/ui/common/Table/Td/index.jsx ***! + \****************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__index_scss__ = __webpack_require__(/*! ../index.scss */ 335);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__index_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__index_scss__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Td; });\n\n\n\n\nvar Td = function Td(_ref) {\n var children = _ref.children;\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n \'td\',\n { className: __WEBPACK_IMPORTED_MODULE_1__index_scss___default.a.td },\n children\n );\n};\nTd.propTypes = {\n children: __webpack_require__(/*! prop-types */ 0).any\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-show/ui/common/Table/Td/index.jsx\n// module id = 691\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-show/ui/common/Table/Td/index.jsx?', + ); + + /***/ + }, + /* 692 */ + /* exports provided: Tr */ + /* exports used: Tr */ + /*!****************************************************************!*\ + !*** ./app/bundles/listings-show/ui/common/Table/Tr/index.jsx ***! + \****************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__index_scss__ = __webpack_require__(/*! ../index.scss */ 335);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__index_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__index_scss__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Tr; });\n\n\n\n\nvar Tr = function Tr(_ref) {\n var children = _ref.children;\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n \'tr\',\n { className: __WEBPACK_IMPORTED_MODULE_1__index_scss___default.a.tr },\n children\n );\n};\nTr.propTypes = {\n children: __webpack_require__(/*! prop-types */ 0).any\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-show/ui/common/Table/Tr/index.jsx\n// module id = 692\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-show/ui/common/Table/Tr/index.jsx?', + ); + + /***/ + }, + /* 693 */ + /* exports provided: Table */ + /* exports used: Table */ + /*!*************************************************************!*\ + !*** ./app/bundles/listings-show/ui/common/Table/index.jsx ***! + \*************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Tr__ = __webpack_require__(/*! ./Tr */ 692);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Td__ = __webpack_require__(/*! ./Td */ 691);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Table; });\n\n\n\n\n\nvar Table = function Table(_ref) {\n var className = _ref.className,\n children = _ref.children;\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n \'table\',\n { className: className },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n \'tbody\',\n null,\n children\n )\n );\n};\n\nTable.propTypes = {\n className: __webpack_require__(/*! prop-types */ 0).string,\n children: __webpack_require__(/*! prop-types */ 0).any\n};\nTable.Tr = __WEBPACK_IMPORTED_MODULE_1__Tr__["a" /* Tr */];\nTable.Td = __WEBPACK_IMPORTED_MODULE_2__Td__["a" /* Td */];\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-show/ui/common/Table/index.jsx\n// module id = 693\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-show/ui/common/Table/index.jsx?', + ); + + /***/ + }, + /* 694 */ + /* exports provided: Unit */ + /* exports used: Unit */ + /*!************************************************************!*\ + !*** ./app/bundles/listings-show/ui/common/Unit/index.jsx ***! + \************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils__ = __webpack_require__(/*! ../../../utils */ 86);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__index_scss__ = __webpack_require__(/*! ./index.scss */ 1005);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__index_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__index_scss__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Unit; });\n\n\n\nvar babelPluginFlowReactPropTypes_proptype_ListingUnitType = __webpack_require__(/*! ../../../enums/ListingUnit */ 33).babelPluginFlowReactPropTypes_proptype_ListingUnitType || __webpack_require__(/*! react */ 1).PropTypes.any;\n\n\n\n\n\nvar Unit = function Unit(_ref) {\n var unit = _ref.unit,\n className = _ref.className,\n wrapperClassName = _ref.wrapperClassName,\n children = _ref.children,\n titleAddition = _ref.titleAddition;\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { id: __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__utils__[\"b\" /* getListingUnitDomId */])(unit.value), className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()(__WEBPACK_IMPORTED_MODULE_3__index_scss___default.a.wrapper, wrapperClassName) },\n unit.label && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_3__index_scss___default.a.headline },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'h3',\n { className: __WEBPACK_IMPORTED_MODULE_3__index_scss___default.a.title },\n unit.label,\n titleAddition\n )\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()(__WEBPACK_IMPORTED_MODULE_3__index_scss___default.a.content, __WEBPACK_IMPORTED_MODULE_3__index_scss___default.a.marginTopSm, className) },\n children\n )\n );\n};\nUnit.propTypes = {\n unit: babelPluginFlowReactPropTypes_proptype_ListingUnitType,\n className: __webpack_require__(/*! prop-types */ 0).string,\n wrapperClassName: __webpack_require__(/*! prop-types */ 0).string,\n children: __webpack_require__(/*! prop-types */ 0).any,\n titleAddition: __webpack_require__(/*! prop-types */ 0).any\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-show/ui/common/Unit/index.jsx\n// module id = 694\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-show/ui/common/Unit/index.jsx?", + ); + + /***/ + }, + /* 695 */ + /* exports provided: default */ + /* exports used: default */ + /*!**********************************************************!*\ + !*** ./app/bundles/pages-hosts/components/HostsPage.jsx ***! + \**********************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__libs_components__ = __webpack_require__(/*! ../../../libs/components */ 11);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__HowToHost_HowToHost__ = __webpack_require__(/*! ./HowToHost/HowToHost */ 697);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__YouWillLove_YouWillLove__ = __webpack_require__(/*! ./YouWillLove/YouWillLove */ 698);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__HostsPage_scss__ = __webpack_require__(/*! ./HostsPage.scss */ 1006);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__HostsPage_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__HostsPage_scss__);\n\n\n\n\n\n\n\n\nvar HostsPage = function HostsPage(props, railsContext) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'main',\n { className: __WEBPACK_IMPORTED_MODULE_4__HostsPage_scss___default.a.HostsPage },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1__libs_components__[\"l\" /* HostHeroImage */], {\n cloudinaryUrl: railsContext.cloudinaryUrl,\n newListingPath: props.newListingPath,\n imageName: 'hosts-hero',\n transformations: {\n background: 'black',\n opacity: 60,\n crop: 'fill',\n gravity: 'faces:auto'\n },\n hasTrademark: true,\n headline: 'Connecting Hosts and Guests',\n subHeadline: 'Creating exceptional travel experiences using social connections'\n }),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2__HowToHost_HowToHost__[\"a\" /* default */], {\n privateHostPath: props.privateHostsPath,\n publicHostPath: props.publicHostsPath,\n cloudinaryUrl: railsContext.cloudinaryUrl\n }),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3__YouWillLove_YouWillLove__[\"a\" /* default */], { cloudinaryUrl: railsContext.cloudinaryUrl }),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1__libs_components__[\"o\" /* HostStories */], {\n hostStories: props.hostStories,\n cloudinaryUrl: railsContext.cloudinaryUrl,\n storyPath: props.storyPath,\n buttonUrl: props.storiesPath,\n title: 'Stories of Our Hosts',\n description: 'We’re focused on relationships and privacy because we believe that vacation rentals' + ' are just as much about people as places to go. So, here are stories that inspired' + ' us to create Friends and Guests.'\n }),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1__libs_components__[\"b\" /* HostDoor */], {\n buttonUrl: props.newListingPath,\n cloudinaryUrl: railsContext.cloudinaryUrl,\n title: 'Putting Hosts in Control of Their Vacation Rental Business',\n buttonText: 'Add a Listing Now',\n tablet: railsContext.tablet,\n desktop: railsContext.desktop\n })\n );\n};\n\nHostsPage.propTypes = {\n hostStories: __webpack_require__(/*! prop-types */ 0).arrayOf(__webpack_require__(/*! prop-types */ 0).shape({\n type: __webpack_require__(/*! prop-types */ 0).oneOf(['Private Host', 'Public Host']).isRequired,\n story: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n position: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n name: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n id: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n avatar: __webpack_require__(/*! prop-types */ 0).string.isRequired\n })).isRequired,\n storyPath: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n storiesPath: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n newListingPath: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n privateHostsPath: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n publicHostsPath: __webpack_require__(/*! prop-types */ 0).string.isRequired\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (HostsPage);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/pages-hosts/components/HostsPage.jsx\n// module id = 695\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/pages-hosts/components/HostsPage.jsx?", + ); + + /***/ + }, + /* 696 */ + /* exports provided: default */ + /* exports used: default */ + /*!****************************************************************************!*\ + !*** ./app/bundles/pages-hosts/components/HowToHost/HostTile/HostTile.jsx ***! + \****************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__libs_components__ = __webpack_require__(/*! ../../../../../libs/components */ 11);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__libs_utils_fng_photos__ = __webpack_require__(/*! ../../../../../libs/utils/fng/photos */ 51);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__HostTile_scss__ = __webpack_require__(/*! ./HostTile.scss */ 1007);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__HostTile_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__HostTile_scss__);\n\n\n\n\n\n\n\nvar HostTile = function HostTile(props) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_3__HostTile_scss___default.a.HostTile },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_1__libs_components__[\"e\" /* CalculatedBreakpoint */],\n null,\n function (width) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div', {\n className: __WEBPACK_IMPORTED_MODULE_3__HostTile_scss___default.a.heroImage,\n style: {\n backgroundImage: 'url(' + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__libs_utils_fng_photos__[\"a\" /* buildPhotoUrl */])({\n url: '' + props.cloudinaryUrl + props.imageName,\n width: width\n }) + ')'\n }\n });\n }\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_3__HostTile_scss___default.a.tileInner },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'h3',\n { className: __WEBPACK_IMPORTED_MODULE_3__HostTile_scss___default.a.title },\n props.title\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'p',\n { className: __WEBPACK_IMPORTED_MODULE_3__HostTile_scss___default.a.description },\n props.description\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_1__libs_components__[\"c\" /* Button */],\n { size: 'lg', orange: true, asNativeLink: true, href: props.buttonUrl, className: __WEBPACK_IMPORTED_MODULE_3__HostTile_scss___default.a.button },\n 'Learn More'\n )\n )\n );\n};\n\nHostTile.propTypes = {\n cloudinaryUrl: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n imageName: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n title: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n description: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n buttonUrl: __webpack_require__(/*! prop-types */ 0).string.isRequired\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (HostTile);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/pages-hosts/components/HowToHost/HostTile/HostTile.jsx\n// module id = 696\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/pages-hosts/components/HowToHost/HostTile/HostTile.jsx?", + ); + + /***/ + }, + /* 697 */ + /* exports provided: default */ + /* exports used: default */ + /*!********************************************************************!*\ + !*** ./app/bundles/pages-hosts/components/HowToHost/HowToHost.jsx ***! + \********************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__libs_components__ = __webpack_require__(/*! ../../../../libs/components */ 11);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__HostTile_HostTile__ = __webpack_require__(/*! ./HostTile/HostTile */ 696);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__HowToHost_scss__ = __webpack_require__(/*! ./HowToHost.scss */ 1008);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__HowToHost_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__HowToHost_scss__);\n\n\n\n\n\n\n\nvar HowToHost = function HowToHost(props) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_1__libs_components__[\"p\" /* HostSection */],\n { className: __WEBPACK_IMPORTED_MODULE_3__HowToHost_scss___default.a.HowToHost },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'h2',\n { className: __WEBPACK_IMPORTED_MODULE_3__HowToHost_scss___default.a.title },\n 'How to Host on Friends and Guests'\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_3__HowToHost_scss___default.a.hostTiles },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2__HostTile_HostTile__[\"a\" /* default */], {\n cloudinaryUrl: props.cloudinaryUrl,\n imageName: 'public-vacation-rentals.jpg',\n buttonUrl: props.publicHostPath,\n title: 'Public Vacation Rentals',\n description: 'Share your home with the public.' + ' Leverage social networks to discover new guests for your vacation rental home.'\n }),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2__HostTile_HostTile__[\"a\" /* default */], {\n cloudinaryUrl: props.cloudinaryUrl,\n imageName: 'private-sharing-tmp.jpg',\n buttonUrl: props.privateHostPath,\n title: 'Private Vacation Rentals',\n description: 'Share your home privately with a select audience by inviting trusted individuals.' + ' Earn extra income on your vacation home.'\n })\n )\n );\n};\n\nHowToHost.propTypes = {\n cloudinaryUrl: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n privateHostPath: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n publicHostPath: __webpack_require__(/*! prop-types */ 0).string.isRequired\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (HowToHost);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/pages-hosts/components/HowToHost/HowToHost.jsx\n// module id = 697\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/pages-hosts/components/HowToHost/HowToHost.jsx?", + ); + + /***/ + }, + /* 698 */ + /* exports provided: default */ + /* exports used: default */ + /*!************************************************************************!*\ + !*** ./app/bundles/pages-hosts/components/YouWillLove/YouWillLove.jsx ***! + \************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__libs_components__ = __webpack_require__(/*! ../../../../libs/components */ 11);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__YouWillLove_scss__ = __webpack_require__(/*! ./YouWillLove.scss */ 1009);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__YouWillLove_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__YouWillLove_scss__);\n\n\n\n\n\n\nvar YouWillLove = function YouWillLove(props) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_1__libs_components__[\"p\" /* HostSection */],\n { className: __WEBPACK_IMPORTED_MODULE_2__YouWillLove_scss___default.a.YouWillLove },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'h2',\n null,\n 'Why You\\u2019ll Love Friends and Guests'\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'p',\n null,\n 'We\\u2019re focused on building relationships because we believe that vacation rentals are just as much about people as places to go.'\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'article',\n null,\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1__libs_components__[\"g\" /* Image */], {\n alt: 'Discovery',\n url: props.cloudinaryUrl + 'love-1.png',\n width: '160',\n height: '160',\n format: 'png',\n ariaHidden: true\n }),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'h4',\n null,\n 'Discovery'\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'p',\n null,\n 'We\\u2019re here to inspire hosts and guests to make mutually beneficial connections. Discover prospective guests based on social connections and contacts. Add them to your listing\\u2019s guest list and build relationships!'\n )\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'article',\n null,\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1__libs_components__[\"g\" /* Image */], {\n alt: 'Flexibility',\n url: props.cloudinaryUrl + 'love-2.png',\n width: '160',\n height: '160',\n format: 'png',\n ariaHidden: true\n }),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'h4',\n null,\n 'Flexibility'\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'p',\n null,\n 'Guest contact details are shared with hosts prior to bookings. You are in charge of policies and payment preferences.'\n )\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'article',\n null,\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1__libs_components__[\"g\" /* Image */], {\n alt: 'More Bookings',\n url: props.cloudinaryUrl + 'love-3.jpg',\n width: '160',\n height: '160',\n format: 'png',\n ariaHidden: true\n }),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'h4',\n null,\n 'More Bookings'\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'p',\n null,\n 'Use your Guest List to increase engagement with former and potential guests to boost referrals, increase repeat business, or fill calendar gaps.'\n )\n )\n );\n};\n\nYouWillLove.propTypes = {\n cloudinaryUrl: __webpack_require__(/*! prop-types */ 0).string.isRequired\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (YouWillLove);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/pages-hosts/components/YouWillLove/YouWillLove.jsx\n// module id = 698\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/pages-hosts/components/YouWillLove/YouWillLove.jsx?", + ); + + /***/ + }, + /* 699 */ + /* exports provided: default */ + /* exports used: default */ + /*!******************************************************************************!*\ + !*** ./app/bundles/pages-pricing/components/PricingHeader/PricingHeader.jsx ***! + \******************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__PricingHeader_scss__ = __webpack_require__(/*! ./PricingHeader.scss */ 1010);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__PricingHeader_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__PricingHeader_scss__);\n\n\n\n\n\nvar PricingHeader = function PricingHeader(_ref) {\n var headline = _ref.headline,\n subHeadline = _ref.subHeadline;\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()('container', __WEBPACK_IMPORTED_MODULE_2__PricingHeader_scss___default.a.PricingHeader) },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'h1',\n { className: __WEBPACK_IMPORTED_MODULE_2__PricingHeader_scss___default.a.headline },\n headline\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'p',\n { className: __WEBPACK_IMPORTED_MODULE_2__PricingHeader_scss___default.a.subHeadline },\n subHeadline\n )\n );\n};\n\nPricingHeader.propTypes = {\n headline: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n subHeadline: __webpack_require__(/*! prop-types */ 0).any.isRequired\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (PricingHeader);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/pages-pricing/components/PricingHeader/PricingHeader.jsx\n// module id = 699\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/pages-pricing/components/PricingHeader/PricingHeader.jsx?", + ); + + /***/ + }, + /* 700 */ + /* exports provided: default */ + /* exports used: default */ + /*!**************************************************************!*\ + !*** ./app/bundles/pages-pricing/components/PricingPage.jsx ***! + \**************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__libs_components__ = __webpack_require__(/*! ../../../libs/components */ 11);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__PricingHeader_PricingHeader__ = __webpack_require__(/*! ./PricingHeader/PricingHeader */ 699);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__PricingPanels_PricingPanels__ = __webpack_require__(/*! ./PricingPanels/PricingPanels */ 705);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__PricingPage_scss__ = __webpack_require__(/*! ./PricingPage.scss */ 1011);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__PricingPage_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__PricingPage_scss__);\n\n\n\n\n\n\n\n\nvar PricingPage = function PricingPage(props, railsContext) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'main',\n { className: __WEBPACK_IMPORTED_MODULE_4__PricingPage_scss___default.a.PricingPage },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2__PricingHeader_PricingHeader__[\"a\" /* default */], {\n headline: 'Pricing and Promotions',\n subHeadline: __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'span',\n null,\n 'Try Friends and Guests to explore how your connections can benefit your vacation rental business. Sign up for our free basic public listing plan or try a premium private subscription for ',\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'strong',\n null,\n '6 months free.'\n )\n )\n }),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3__PricingPanels_PricingPanels__[\"a\" /* default */], { demoUrl: props.requestDemoPath, ctaUrl: props.newUserRegistrationPath }),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1__libs_components__[\"a\" /* CallToActionSection */], {\n title: 'Sign up Bonus for Public Hosts',\n description: __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'span',\n null,\n 'Publish a new qualified public listing before June 30, 2017 and get a credit good for',\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'strong',\n null,\n ' one year of public premium subscription '\n ),\n 'when the service is available.'\n ),\n buttonUrl: props.newListingPath,\n buttonText: 'Add a Listing Now'\n }),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1__libs_components__[\"b\" /* HostDoor */], {\n buttonUrl: props.newListingPath,\n cloudinaryUrl: railsContext.cloudinaryUrl,\n title: 'Create a Private Listing Only Available to Individuals You Select',\n buttonText: 'Add a Listing Now',\n tablet: railsContext.tablet,\n desktop: railsContext.desktop\n })\n );\n};\n\nPricingPage.propTypes = {\n newListingPath: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n requestDemoPath: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n newUserRegistrationPath: __webpack_require__(/*! prop-types */ 0).string.isRequired\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (PricingPage);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/pages-pricing/components/PricingPage.jsx\n// module id = 700\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/pages-pricing/components/PricingPage.jsx?", + ); + + /***/ + }, + /* 701 */ + /* exports provided: default */ + /* exports used: default */ + /*!******************************************************************************************!*\ + !*** ./app/bundles/pages-pricing/components/PricingPanels/PricingPanel/PricingPanel.jsx ***! + \******************************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__PricingPanelHeader_PricingPanelHeader__ = __webpack_require__(/*! ./PricingPanelHeader/PricingPanelHeader */ 704);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__PricingPanelContent_PricingPanelContent__ = __webpack_require__(/*! ./PricingPanelContent/PricingPanelContent */ 702);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__PricingPanelFooter_PricingPanelFooter__ = __webpack_require__(/*! ./PricingPanelFooter/PricingPanelFooter */ 703);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__PricingPanel_scss__ = __webpack_require__(/*! ./PricingPanel.scss */ 1012);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__PricingPanel_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__PricingPanel_scss__);\n\n\nvar babelPluginFlowReactPropTypes_proptype_PricingPanelColor = __webpack_require__(/*! ../../../../../types/pricingPanel */ 144).babelPluginFlowReactPropTypes_proptype_PricingPanelColor || __webpack_require__(/*! react */ 1).PropTypes.any;\n\n\n\n\n\n\nvar PricingPanel = function PricingPanel(_ref) {\n var pricingPanelColor = _ref.pricingPanelColor,\n title = _ref.title,\n subtitle = _ref.subtitle,\n ribbon = _ref.ribbon,\n preBullets = _ref.preBullets,\n bullets = _ref.bullets,\n ctaText = _ref.ctaText,\n ctaUrl = _ref.ctaUrl,\n creditText = _ref.creditText,\n demoUrl = _ref.demoUrl,\n soonBullets = _ref.soonBullets;\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n \'div\',\n { className: __WEBPACK_IMPORTED_MODULE_4__PricingPanel_scss___default.a.PricingPanel },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1__PricingPanelHeader_PricingPanelHeader__["a" /* default */], {\n pricingPanelColor: pricingPanelColor,\n title: title,\n subtitle: subtitle,\n ribbon: ribbon\n }),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2__PricingPanelContent_PricingPanelContent__["a" /* default */], { preBullets: preBullets, bullets: bullets, soonBullets: soonBullets }),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3__PricingPanelFooter_PricingPanelFooter__["a" /* default */], {\n pricingPanelColor: pricingPanelColor,\n ctaText: ctaText,\n ctaUrl: ctaUrl,\n creditText: creditText,\n demoUrl: demoUrl\n })\n );\n};\n\nPricingPanel.propTypes = {\n pricingPanelColor: babelPluginFlowReactPropTypes_proptype_PricingPanelColor,\n title: __webpack_require__(/*! prop-types */ 0).shape({\n first: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n second: __webpack_require__(/*! prop-types */ 0).string.isRequired\n }).isRequired,\n subtitle: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n ribbon: __webpack_require__(/*! prop-types */ 0).bool,\n preBullets: __webpack_require__(/*! prop-types */ 0).string,\n bullets: __webpack_require__(/*! prop-types */ 0).arrayOf(__webpack_require__(/*! prop-types */ 0).oneOfType([__webpack_require__(/*! prop-types */ 0).string, __webpack_require__(/*! prop-types */ 0).arrayOf(__webpack_require__(/*! prop-types */ 0).string)])).isRequired,\n ctaText: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n ctaUrl: __webpack_require__(/*! prop-types */ 0).string,\n creditText: __webpack_require__(/*! prop-types */ 0).string,\n demoUrl: __webpack_require__(/*! prop-types */ 0).string,\n soonBullets: __webpack_require__(/*! prop-types */ 0).arrayOf(__webpack_require__(/*! prop-types */ 0).string)\n};\n/* harmony default export */ __webpack_exports__["a"] = (PricingPanel);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/pages-pricing/components/PricingPanels/PricingPanel/PricingPanel.jsx\n// module id = 701\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/pages-pricing/components/PricingPanels/PricingPanel/PricingPanel.jsx?', + ); + + /***/ + }, + /* 702 */ + /* exports provided: default */ + /* exports used: default */ + /*!*********************************************************************************************************************!*\ + !*** ./app/bundles/pages-pricing/components/PricingPanels/PricingPanel/PricingPanelContent/PricingPanelContent.jsx ***! + \*********************************************************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_fp__ = __webpack_require__(/*! lodash/fp */ 14);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_fp___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_lodash_fp__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__libs_components__ = __webpack_require__(/*! ../../../../../../libs/components */ 11);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__PricingPanelContent_scss__ = __webpack_require__(/*! ./PricingPanelContent.scss */ 1013);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__PricingPanelContent_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__PricingPanelContent_scss__);\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\n\n\n\n\n\n\nvar PricingPanelContent = function (_React$Component) {\n _inherits(PricingPanelContent, _React$Component);\n\n function PricingPanelContent(props) {\n _classCallCheck(this, PricingPanelContent);\n\n var _this = _possibleConstructorReturn(this, (PricingPanelContent.__proto__ || Object.getPrototypeOf(PricingPanelContent)).call(this, props));\n\n _this.state = {\n isToggleOpen: false\n };\n\n __WEBPACK_IMPORTED_MODULE_1_lodash_fp___default.a.bindAll(['handleSoonFeatures'], _this);\n return _this;\n }\n\n _createClass(PricingPanelContent, [{\n key: 'handleSoonFeatures',\n value: function handleSoonFeatures() {\n var isToggleOpen = this.state.isToggleOpen;\n this.setState({ isToggleOpen: !isToggleOpen });\n }\n }, {\n key: 'render',\n value: function render() {\n var _props = this.props,\n preBullets = _props.preBullets,\n bullets = _props.bullets,\n soonBullets = _props.soonBullets;\n\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_3__PricingPanelContent_scss___default.a.PricingPanelContent },\n preBullets && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'p',\n null,\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'strong',\n null,\n preBullets\n )\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'ul',\n { className: __WEBPACK_IMPORTED_MODULE_3__PricingPanelContent_scss___default.a.list },\n bullets.map(function (bullet, bulletIndex) {\n return bullet instanceof Array ? __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'ul',\n { key: bulletIndex, className: __WEBPACK_IMPORTED_MODULE_3__PricingPanelContent_scss___default.a.list },\n bullet.map(function (innerBullet, innerBulletIndex) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'li',\n { key: innerBulletIndex, className: __WEBPACK_IMPORTED_MODULE_3__PricingPanelContent_scss___default.a.listItem },\n innerBullet\n );\n })\n ) : __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'li',\n { key: bulletIndex, className: __WEBPACK_IMPORTED_MODULE_3__PricingPanelContent_scss___default.a.listItem },\n bullet\n );\n })\n ),\n soonBullets && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n null,\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_2__libs_components__[\"k\" /* ButtonLike */],\n { onClick: this.handleSoonFeatures, className: __WEBPACK_IMPORTED_MODULE_3__PricingPanelContent_scss___default.a.soonLabel },\n 'More features coming soon'\n ),\n this.state.isToggleOpen && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'ul',\n { className: __WEBPACK_IMPORTED_MODULE_3__PricingPanelContent_scss___default.a.soonBullets },\n soonBullets.map(function (bullet, index) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'li',\n { className: __WEBPACK_IMPORTED_MODULE_3__PricingPanelContent_scss___default.a.listItem, key: index },\n bullet\n );\n })\n )\n )\n );\n }\n }]);\n\n return PricingPanelContent;\n}(__WEBPACK_IMPORTED_MODULE_0_react___default.a.Component);\n\nPricingPanelContent.propTypes = {\n preBullets: __webpack_require__(/*! prop-types */ 0).string,\n bullets: __webpack_require__(/*! prop-types */ 0).arrayOf(__webpack_require__(/*! prop-types */ 0).oneOfType([__webpack_require__(/*! prop-types */ 0).string, __webpack_require__(/*! prop-types */ 0).arrayOf(__webpack_require__(/*! prop-types */ 0).string)])).isRequired,\n soonBullets: __webpack_require__(/*! prop-types */ 0).arrayOf(__webpack_require__(/*! prop-types */ 0).string)\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (PricingPanelContent);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/pages-pricing/components/PricingPanels/PricingPanel/PricingPanelContent/PricingPanelContent.jsx\n// module id = 702\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/pages-pricing/components/PricingPanels/PricingPanel/PricingPanelContent/PricingPanelContent.jsx?", + ); + + /***/ + }, + /* 703 */ + /* exports provided: default */ + /* exports used: default */ + /*!*******************************************************************************************************************!*\ + !*** ./app/bundles/pages-pricing/components/PricingPanels/PricingPanel/PricingPanelFooter/PricingPanelFooter.jsx ***! + \*******************************************************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__libs_components__ = __webpack_require__(/*! ../../../../../../libs/components */ 11);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__PricingPanelFooter_scss__ = __webpack_require__(/*! ./PricingPanelFooter.scss */ 1014);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__PricingPanelFooter_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__PricingPanelFooter_scss__);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _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\n\nvar babelPluginFlowReactPropTypes_proptype_PricingPanelColor = __webpack_require__(/*! ../../../../../../types/pricingPanel */ 144).babelPluginFlowReactPropTypes_proptype_PricingPanelColor || __webpack_require__(/*! react */ 1).PropTypes.any;\n\n\n\n\n\nvar PricingPanelFooter = function PricingPanelFooter(_ref) {\n var pricingPanelColor = _ref.pricingPanelColor,\n ctaUrl = _ref.ctaUrl,\n ctaText = _ref.ctaText,\n creditText = _ref.creditText,\n demoUrl = _ref.demoUrl;\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_2__PricingPanelFooter_scss___default.a.PricingPanelFooter },\n ctaUrl ? __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_1__libs_components__[\"c\" /* Button */],\n _extends({}, _defineProperty({}, pricingPanelColor, true), { className: __WEBPACK_IMPORTED_MODULE_2__PricingPanelFooter_scss___default.a.cta, asNativeLink: true, href: ctaUrl }),\n ctaText\n ) : __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_1__libs_components__[\"c\" /* Button */],\n { gray: true, className: __WEBPACK_IMPORTED_MODULE_2__PricingPanelFooter_scss___default.a.cta, asNativeLink: true, disabled: true },\n ctaText\n ),\n creditText && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'p',\n { className: __WEBPACK_IMPORTED_MODULE_2__PricingPanelFooter_scss___default.a.creditCard },\n creditText\n ),\n demoUrl && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'a',\n { className: __WEBPACK_IMPORTED_MODULE_2__PricingPanelFooter_scss___default.a.demoUrl, href: demoUrl },\n 'Request a Demo'\n )\n );\n};\nPricingPanelFooter.propTypes = {\n pricingPanelColor: babelPluginFlowReactPropTypes_proptype_PricingPanelColor,\n ctaUrl: __webpack_require__(/*! prop-types */ 0).string,\n ctaText: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n creditText: __webpack_require__(/*! prop-types */ 0).string,\n demoUrl: __webpack_require__(/*! prop-types */ 0).string\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (PricingPanelFooter);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/pages-pricing/components/PricingPanels/PricingPanel/PricingPanelFooter/PricingPanelFooter.jsx\n// module id = 703\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/pages-pricing/components/PricingPanels/PricingPanel/PricingPanelFooter/PricingPanelFooter.jsx?", + ); + + /***/ + }, + /* 704 */ + /* exports provided: default */ + /* exports used: default */ + /*!*******************************************************************************************************************!*\ + !*** ./app/bundles/pages-pricing/components/PricingPanels/PricingPanel/PricingPanelHeader/PricingPanelHeader.jsx ***! + \*******************************************************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__libs_components_icons_IconSoonRibbon_IconSoonRibbon__ = __webpack_require__(/*! ../../../../../../libs/components/icons/IconSoonRibbon/IconSoonRibbon */ 873);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__PricingPanelHeader_scss__ = __webpack_require__(/*! ./PricingPanelHeader.scss */ 1015);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__PricingPanelHeader_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__PricingPanelHeader_scss__);\n\n\n\nvar babelPluginFlowReactPropTypes_proptype_PricingPanelColor = __webpack_require__(/*! ../../../../../../types/pricingPanel */ 144).babelPluginFlowReactPropTypes_proptype_PricingPanelColor || __webpack_require__(/*! react */ 1).PropTypes.any;\n\n\n\n\n\nvar PricingPanelHeader = function PricingPanelHeader(_ref) {\n var pricingPanelColor = _ref.pricingPanelColor,\n title = _ref.title,\n subtitle = _ref.subtitle,\n ribbon = _ref.ribbon;\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()(__WEBPACK_IMPORTED_MODULE_3__PricingPanelHeader_scss___default.a.PricingPanelHeader, __WEBPACK_IMPORTED_MODULE_3__PricingPanelHeader_scss___default.a[pricingPanelColor]) },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'p',\n { className: __WEBPACK_IMPORTED_MODULE_3__PricingPanelHeader_scss___default.a.title },\n title.first,\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('br', null),\n title.second\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'p',\n { className: __WEBPACK_IMPORTED_MODULE_3__PricingPanelHeader_scss___default.a.subtitle },\n subtitle\n ),\n ribbon && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'span',\n { className: __WEBPACK_IMPORTED_MODULE_3__PricingPanelHeader_scss___default.a.ribbon },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2__libs_components_icons_IconSoonRibbon_IconSoonRibbon__[\"a\" /* default */], null)\n )\n );\n};\n\nPricingPanelHeader.propTypes = {\n pricingPanelColor: babelPluginFlowReactPropTypes_proptype_PricingPanelColor,\n title: __webpack_require__(/*! prop-types */ 0).shape({\n first: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n second: __webpack_require__(/*! prop-types */ 0).string.isRequired\n }).isRequired,\n subtitle: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n ribbon: __webpack_require__(/*! prop-types */ 0).bool\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (PricingPanelHeader);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/pages-pricing/components/PricingPanels/PricingPanel/PricingPanelHeader/PricingPanelHeader.jsx\n// module id = 704\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/pages-pricing/components/PricingPanels/PricingPanel/PricingPanelHeader/PricingPanelHeader.jsx?", + ); + + /***/ + }, + /* 705 */ + /* exports provided: default */ + /* exports used: default */ + /*!******************************************************************************!*\ + !*** ./app/bundles/pages-pricing/components/PricingPanels/PricingPanels.jsx ***! + \******************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__constants_pricingPanelData__ = __webpack_require__(/*! ../../constants/pricingPanelData */ 706);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__PricingPanel_PricingPanel__ = __webpack_require__(/*! ./PricingPanel/PricingPanel */ 701);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__PricingPanels_scss__ = __webpack_require__(/*! ./PricingPanels.scss */ 1016);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__PricingPanels_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__PricingPanels_scss__);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\n\n\n\n\n\n\n\n\n\nvar PricingPanels = function PricingPanels(props) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n \'div\',\n { className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()(\'container\', __WEBPACK_IMPORTED_MODULE_4__PricingPanels_scss___default.a.PricingPanels) },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3__PricingPanel_PricingPanel__["a" /* default */], _extends({}, __WEBPACK_IMPORTED_MODULE_2__constants_pricingPanelData__["a" /* default */].basic, { ctaUrl: props.ctaUrl })),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3__PricingPanel_PricingPanel__["a" /* default */], __WEBPACK_IMPORTED_MODULE_2__constants_pricingPanelData__["a" /* default */].public),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3__PricingPanel_PricingPanel__["a" /* default */], _extends({}, __WEBPACK_IMPORTED_MODULE_2__constants_pricingPanelData__["a" /* default */].private, { ctaUrl: props.ctaUrl, demoUrl: props.demoUrl }))\n );\n};\n\nPricingPanels.propTypes = {\n demoUrl: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n ctaUrl: __webpack_require__(/*! prop-types */ 0).string.isRequired\n};\n/* harmony default export */ __webpack_exports__["a"] = (PricingPanels);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/pages-pricing/components/PricingPanels/PricingPanels.jsx\n// module id = 705\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/pages-pricing/components/PricingPanels/PricingPanels.jsx?', + ); + + /***/ + }, + /* 706 */ + /* exports provided: default */ + /* exports used: default */ + /*!*****************************************************************!*\ + !*** ./app/bundles/pages-pricing/constants/pricingPanelData.js ***! + \*****************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "var babelPluginFlowReactPropTypes_proptype_PricingPanelColor = __webpack_require__(/*! ../../../types/pricingPanel */ 144).babelPluginFlowReactPropTypes_proptype_PricingPanelColor || __webpack_require__(/*! react */ 1).PropTypes.any;\n\nvar pricingPanelData = {\n basic: {\n pricingPanelColor: 'teal',\n title: {\n first: 'Basic',\n second: 'Public Listing'\n },\n subtitle: 'Free',\n bullets: ['Build a guest list of former & future guests', 'Access to guest contact details', 'Open host-guest communication', 'Unrestricted cancellation policies', 'Set guest policies & house rules', 'Leverage social connections & contacts', 'Link to your website, other listing sites & Facebook'],\n ctaText: 'Sign Up Now',\n soonBullets: ['Optional online booking and alternative payments', 'Calendar, seasonal rates & online quotes', 'Calendar sync with your VRBO, HomeAway, AirBnB or other rental calendars']\n },\n\n public: {\n pricingPanelColor: 'gray',\n title: {\n first: 'Premium',\n second: 'Public Subscription'\n },\n subtitle: '$20 per listing / month',\n ribbon: true,\n preBullets: 'Includes all free basic public listing features plus...',\n bullets: ['Custom URL', 'Priority Ranking', 'Promotional tools to:', 'Unrestricted cancellation policies', ['Boost referrals', 'Increase repeat business', 'Fill calendar gaps']],\n ctaText: 'Coming Soon',\n creditText: 'First 3 months free. No credit card required.'\n },\n\n private: {\n pricingPanelColor: 'primary',\n title: {\n first: 'Premium',\n second: 'Private Subscription'\n },\n subtitle: '$20 per listing / month',\n bullets: ['Control who sees your listing: completely hide it from public or allow limited preview to Facebook friends', 'Full listing details visible to guest list members only', 'Priority ranking view to your guest list members and contacts'],\n ctaText: 'Start Your Free Trial',\n creditText: 'First 6 months free. No credit card required.'\n }\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (pricingPanelData);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/pages-pricing/constants/pricingPanelData.js\n// module id = 706\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/pages-pricing/constants/pricingPanelData.js?", + ); + + /***/ + }, + /* 707 */ + /* exports provided: default */ + /* exports used: default */ + /*!********************************************************************************************************!*\ + !*** ./app/bundles/pages-private-hosts/components/HowFriendsAndGuestsWork/FeatureList/FeatureList.jsx ***! + \********************************************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__FeatureList_scss__ = __webpack_require__(/*! ./FeatureList.scss */ 1017);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__FeatureList_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__FeatureList_scss__);\n\n\n\n\n\nvar FeatureList = function FeatureList() {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()('container', __WEBPACK_IMPORTED_MODULE_2__FeatureList_scss___default.a.FeatureList) },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'section',\n { className: 'container' },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'h3',\n null,\n 'Be Private!'\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'ul',\n null,\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'li',\n null,\n 'Only guest list members can see full listing details'\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'li',\n null,\n 'Control who sees your listing with privacy options'\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'li',\n null,\n 'Learn more about potential guests through their Facebook profiles.'\n )\n )\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'section',\n { className: 'container' },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'h3',\n null,\n 'Build a Guest List!'\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'ul',\n null,\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'li',\n null,\n 'Send an email invite to all your past guests.'\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'li',\n null,\n 'Invite Facebook Friends to your Guest List.'\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'li',\n null,\n 'Get Guest List suggestions when someone favorites or views your listing.'\n )\n )\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'section',\n { className: 'container' },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'h3',\n null,\n ' Promote Your Home!'\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'ul',\n null,\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'li',\n null,\n 'Send promotions or newsletters to your guest list.',\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'span',\n { className: __WEBPACK_IMPORTED_MODULE_2__FeatureList_scss___default.a.listAsterisk },\n '*'\n )\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'li',\n null,\n 'Organize your Guest List into groups.',\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'span',\n { className: __WEBPACK_IMPORTED_MODULE_2__FeatureList_scss___default.a.listAsterisk },\n '*'\n )\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'li',\n { className: __WEBPACK_IMPORTED_MODULE_2__FeatureList_scss___default.a.futureFeature },\n 'Future feature'\n )\n )\n )\n );\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (FeatureList);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/pages-private-hosts/components/HowFriendsAndGuestsWork/FeatureList/FeatureList.jsx\n// module id = 707\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/pages-private-hosts/components/HowFriendsAndGuestsWork/FeatureList/FeatureList.jsx?", + ); + + /***/ + }, + /* 708 */ + /* exports provided: default */ + /* exports used: default */ + /*!********************************************************************************************************!*\ + !*** ./app/bundles/pages-private-hosts/components/HowFriendsAndGuestsWork/HowFriendsAndGuestsWork.jsx ***! + \********************************************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__libs_components__ = __webpack_require__(/*! ../../../../libs/components */ 11);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__FeatureList_FeatureList__ = __webpack_require__(/*! ./FeatureList/FeatureList */ 707);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__HowFriendsAndGuestsWork_scss__ = __webpack_require__(/*! ./HowFriendsAndGuestsWork.scss */ 1018);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__HowFriendsAndGuestsWork_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__HowFriendsAndGuestsWork_scss__);\n\n\n\n\n\n\n\nvar HowFriendsAndGuestsWork = function HowFriendsAndGuestsWork() {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_1__libs_components__["p" /* HostSection */],\n { className: __WEBPACK_IMPORTED_MODULE_3__HowFriendsAndGuestsWork_scss___default.a.HowFriendsAndGuestsWork },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1__libs_components__["d" /* HostSectionHeader */], {\n title: \'How to Host on Friends and Guests\',\n description: \'We use social and personal connections to promote your vacation rental and\' + \' increase your bookings.\'\n }),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2__FeatureList_FeatureList__["a" /* default */], null)\n );\n};\n\n/* harmony default export */ __webpack_exports__["a"] = (HowFriendsAndGuestsWork);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/pages-private-hosts/components/HowFriendsAndGuestsWork/HowFriendsAndGuestsWork.jsx\n// module id = 708\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/pages-private-hosts/components/HowFriendsAndGuestsWork/HowFriendsAndGuestsWork.jsx?', + ); + + /***/ + }, + /* 709 */ + /* exports provided: default */ + /* exports used: default */ + /*!*************************************************************************!*\ + !*** ./app/bundles/pages-private-hosts/components/PrivateHostsPage.jsx ***! + \*************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__libs_components__ = __webpack_require__(/*! ../../../libs/components */ 11);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__HowFriendsAndGuestsWork_HowFriendsAndGuestsWork__ = __webpack_require__(/*! ./HowFriendsAndGuestsWork/HowFriendsAndGuestsWork */ 708);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__privateHostsStepsData__ = __webpack_require__(/*! ./privateHostsStepsData */ 710);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__PrivateHostsPage_scss__ = __webpack_require__(/*! ./PrivateHostsPage.scss */ 1019);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__PrivateHostsPage_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__PrivateHostsPage_scss__);\n\n\n\n\n\n\n\n\nvar PrivateHostsPage = function PrivateHostsPage(props, railsContext) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'main',\n { className: __WEBPACK_IMPORTED_MODULE_4__PrivateHostsPage_scss___default.a.PrivateHostsPage },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1__libs_components__[\"l\" /* HostHeroImage */], {\n cloudinaryUrl: railsContext.cloudinaryUrl,\n newListingPath: props.newListingPath,\n imageName: 'private-sharing-tmp',\n transformations: {\n background: 'black',\n opacity: 60,\n crop: 'fill',\n gravity: 'auto'\n },\n label: 'For Private Hosts',\n headline: 'Create a Private Listing Only Available to Individuals You Select'\n }),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2__HowFriendsAndGuestsWork_HowFriendsAndGuestsWork__[\"a\" /* default */], null),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1__libs_components__[\"m\" /* CallToActionStrip */], {\n buttonUrl: props.publicHostsPath,\n textStrong: 'Hosting a public rental?',\n textMedium: 'Become a host and be in control of your vacation\\xA0rental business.'\n }),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1__libs_components__[\"n\" /* HostSteps */], {\n hostStepsData: __WEBPACK_IMPORTED_MODULE_3__privateHostsStepsData__[\"a\" /* default */],\n title: 'Steps to Private Hosting With Friends\\xA0and\\xA0Guests'\n }),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1__libs_components__[\"o\" /* HostStories */], {\n className: __WEBPACK_IMPORTED_MODULE_4__PrivateHostsPage_scss___default.a.hostStoriesBackground,\n hostStories: props.hostStories,\n cloudinaryUrl: railsContext.cloudinaryUrl,\n storyPath: props.storyPath,\n buttonUrl: props.storiesPath,\n title: 'Stories of Our Hosts',\n description: 'We’re focused on relationships and privacy because we believe that vacation rentals' + ' are just as much about people as places to go. So, here are stories that inspired' + ' us to create Friends and Guests.'\n }),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1__libs_components__[\"b\" /* HostDoor */], {\n buttonUrl: props.newListingPath,\n cloudinaryUrl: railsContext.cloudinaryUrl,\n title: 'Create a Private Listing Only Available to Individuals You Select',\n buttonText: 'Add a Listing Now',\n tablet: railsContext.tablet,\n desktop: railsContext.desktop\n })\n );\n};\n\nPrivateHostsPage.propTypes = {\n hostStories: __webpack_require__(/*! prop-types */ 0).arrayOf(__webpack_require__(/*! prop-types */ 0).shape({\n type: __webpack_require__(/*! prop-types */ 0).oneOf(['Private Host', 'Public Host']).isRequired,\n story: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n position: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n name: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n id: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n avatar: __webpack_require__(/*! prop-types */ 0).string.isRequired\n })).isRequired,\n storyPath: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n storiesPath: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n newListingPath: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n privateHostsPath: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n publicHostsPath: __webpack_require__(/*! prop-types */ 0).string.isRequired\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (PrivateHostsPage);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/pages-private-hosts/components/PrivateHostsPage.jsx\n// module id = 709\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/pages-private-hosts/components/PrivateHostsPage.jsx?", + ); + + /***/ + }, + /* 710 */ + /* exports provided: default */ + /* exports used: default */ + /*!*****************************************************************************!*\ + !*** ./app/bundles/pages-private-hosts/components/privateHostsStepsData.js ***! + \*****************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "var babelPluginFlowReactPropTypes_proptype_HostStepData = __webpack_require__(/*! ../../../types/hostPages */ 143).babelPluginFlowReactPropTypes_proptype_HostStepData || __webpack_require__(/*! react */ 1).PropTypes.any;\n\nvar privateHostsStepsData = [{\n number: 1,\n createListingType: true,\n title: 'Sign Up to Host and ',\n typeTitle: 'Create a Private Listing',\n QA: [{\n question: 'What Is a Listing?',\n answers: ['A listing helps guests know what your place is like.\\n Fill out a description, upload lots of photos, set your price and house rules.\\n Tip: professional photos get the best results!']\n }, {\n question: 'What Information Do I Include?',\n answers: ['Include full listing details with a description, photos, rates and house rules.\\n A limited preview will be created for your private listing.']\n }, {\n question: 'What Is a Guest List?',\n answers: ['Guest Lists are a great way to control who sees your listing details and promote your property.\\n Guest list members must be invited by the private host.\\n Only Guest List members can see full listing details.']\n }, {\n question: 'Who Can Book?',\n answers: ['Your listing is public so anyone can request to book your home.\\n You still have the opportunity to learn more about a guest prior to accepting any booking.']\n }, {\n question: 'What Is a Limited Preview?',\n answers: ['A limited preview includes only a title, photo and brief description.\\n You can invite individuals to see your limited preview.\\n A limited preview allows you to discover individuals to add to your guest list.\\n Guest list members have full access to your listing.']\n }, {\n question: 'Who Can See My Information?',\n answers: ['Your private listing will be hidden from the public.\\n You control which groups of individuals can see your limited preview.\\n Full access to your listing details is only available to Guest List members.']\n }]\n}, {\n number: 2,\n title: 'Build a Private Guest List',\n QA: [{\n question: 'What Do Guest List Members See?',\n answers: ['Guest List members see full listing details and can book your home.']\n }, {\n question: 'How Do People Get on My Guest List?',\n answers: ['You can send an email or URL link to friends,\\n family and contacts inviting them to your guest list.', 'The Friends and Guests site will also make suggestions of individuals you might\\n like to invite to your Guest List.\\'', 'Individuals must sign up and/or login to Friends and Guests\\n to accept or skip your Guest List invitation']\n }]\n}, {\n number: 3,\n title: 'Build Relationships!',\n QA: [{\n question: 'Screen Potential Guests',\n answers: ['Private hosts can screen potential guests before sharing any details about the property.']\n }, {\n question: 'Chat With Your Guests',\n answers: ['Guest contact details are shared with hosts so you can get to know each other\\n prior to booking.']\n }]\n}, {\n number: 4,\n title: 'Get Set Up',\n QA: [{\n question: 'What to Charge',\n answers: ['What you charge is up to you. Check your local area for comparable properties.']\n }, {\n question: 'How You Get Paid',\n answers: ['You determine your preferred forms of payment.']\n }, {\n question: 'Set Up Your Space',\n answers: ['Keep your home well-maintained for guest use and provide the essentials.']\n }, {\n question: 'How Guests Pay',\n answers: ['Guests pay you directly.']\n }, {\n question: 'House Rules',\n answers: ['Clearly outline house rules, expectations and costs for all guests.']\n }, {\n question: 'Cancellation Policies',\n answers: ['You have the flexibility to establish your cancellation policies.']\n }]\n}];\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (privateHostsStepsData);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/pages-private-hosts/components/privateHostsStepsData.js\n// module id = 710\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/pages-private-hosts/components/privateHostsStepsData.js?", + ); + + /***/ + }, + /* 711 */ + /* exports provided: default */ + /* exports used: default */ + /*!*******************************************************************************************************!*\ + !*** ./app/bundles/pages-public-hosts/components/HowFriendsAndGuestsWork/FeatureList/FeatureList.jsx ***! + \*******************************************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__FeatureList_scss__ = __webpack_require__(/*! ./FeatureList.scss */ 1020);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__FeatureList_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__FeatureList_scss__);\n\n\n\n\n\nvar FeatureList = function FeatureList() {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()('container', __WEBPACK_IMPORTED_MODULE_2__FeatureList_scss___default.a.FeatureList) },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'section',\n { className: 'container' },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'h3',\n null,\n 'Get Bookings!'\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'ul',\n null,\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'li',\n null,\n 'Travellers search for a desired location, find your property and book your home.'\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'li',\n null,\n 'Learn more about potential guests through their Facebook profiles.'\n )\n )\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'section',\n { className: 'container' },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'h3',\n null,\n 'Build a Guest List!'\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'ul',\n null,\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'li',\n null,\n 'Send an email invite to all your past guests.'\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'li',\n null,\n 'Invite Facebook Friends to your Guest List.'\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'li',\n null,\n 'Accept the site\\u2019s suggestions based on visitors to your listing and your Facebook connections. Invite those individuals to your guest list.'\n )\n )\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'section',\n { className: 'container' },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'h3',\n null,\n ' Promote Your Listing!'\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'ul',\n null,\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'li',\n null,\n 'Send promotions or newsletters to your guest list.',\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'span',\n { className: __WEBPACK_IMPORTED_MODULE_2__FeatureList_scss___default.a.listAsterisk },\n '*'\n )\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'li',\n null,\n 'Organize your Guest List into groups.',\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'span',\n { className: __WEBPACK_IMPORTED_MODULE_2__FeatureList_scss___default.a.listAsterisk },\n '*'\n )\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'li',\n { className: __WEBPACK_IMPORTED_MODULE_2__FeatureList_scss___default.a.futureFeature },\n 'Future feature'\n )\n )\n )\n );\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (FeatureList);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/pages-public-hosts/components/HowFriendsAndGuestsWork/FeatureList/FeatureList.jsx\n// module id = 711\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/pages-public-hosts/components/HowFriendsAndGuestsWork/FeatureList/FeatureList.jsx?", + ); + + /***/ + }, + /* 712 */ + /* exports provided: default */ + /* exports used: default */ + /*!*******************************************************************************************************!*\ + !*** ./app/bundles/pages-public-hosts/components/HowFriendsAndGuestsWork/HowFriendsAndGuestsWork.jsx ***! + \*******************************************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__libs_components__ = __webpack_require__(/*! ../../../../libs/components */ 11);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__FeatureList_FeatureList__ = __webpack_require__(/*! ./FeatureList/FeatureList */ 711);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__HowFriendsAndGuestsWork_scss__ = __webpack_require__(/*! ./HowFriendsAndGuestsWork.scss */ 1021);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__HowFriendsAndGuestsWork_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__HowFriendsAndGuestsWork_scss__);\n\n\n\n\n\n\n\nvar HowFriendsAndGuestsWork = function HowFriendsAndGuestsWork() {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_1__libs_components__["p" /* HostSection */],\n { className: __WEBPACK_IMPORTED_MODULE_3__HowFriendsAndGuestsWork_scss___default.a.HowFriendsAndGuestsWork },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1__libs_components__["d" /* HostSectionHeader */], {\n title: \'How to Host on Friends and Guests\',\n description: \'We use social and personal connections to promote your vacation rental and\' + \' increase your bookings.\'\n }),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2__FeatureList_FeatureList__["a" /* default */], null)\n );\n};\n\n/* harmony default export */ __webpack_exports__["a"] = (HowFriendsAndGuestsWork);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/pages-public-hosts/components/HowFriendsAndGuestsWork/HowFriendsAndGuestsWork.jsx\n// module id = 712\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/pages-public-hosts/components/HowFriendsAndGuestsWork/HowFriendsAndGuestsWork.jsx?', + ); + + /***/ + }, + /* 713 */ + /* exports provided: default */ + /* exports used: default */ + /*!***********************************************************************!*\ + !*** ./app/bundles/pages-public-hosts/components/PublicHostsPage.jsx ***! + \***********************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__libs_components__ = __webpack_require__(/*! ../../../libs/components */ 11);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__HowFriendsAndGuestsWork_HowFriendsAndGuestsWork__ = __webpack_require__(/*! ./HowFriendsAndGuestsWork/HowFriendsAndGuestsWork */ 712);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__publicHostsStepsData__ = __webpack_require__(/*! ./publicHostsStepsData */ 714);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__PublicHostsPage_scss__ = __webpack_require__(/*! ./PublicHostsPage.scss */ 1022);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__PublicHostsPage_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__PublicHostsPage_scss__);\n\n\n\n\n\n\n\n\nvar PublicHostsPage = function PublicHostsPage(props, railsContext) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'main',\n { className: __WEBPACK_IMPORTED_MODULE_4__PublicHostsPage_scss___default.a.PublicHostsPage },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1__libs_components__[\"l\" /* HostHeroImage */], {\n cloudinaryUrl: railsContext.cloudinaryUrl,\n newListingPath: props.newListingPath,\n imageName: 'public-vacation-rentals',\n transformations: {\n background: 'black',\n opacity: 60,\n crop: 'fill',\n gravity: 'face:auto'\n },\n label: 'For Public Hosts',\n headline: 'Putting Hosts in Control of Their Vacation Rental Business'\n }),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2__HowFriendsAndGuestsWork_HowFriendsAndGuestsWork__[\"a\" /* default */], null),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1__libs_components__[\"m\" /* CallToActionStrip */], {\n buttonUrl: props.privateHostsPath,\n textStrong: 'Need more privacy?',\n textMedium: 'You can create a private listing only available to individuals you select.'\n }),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1__libs_components__[\"n\" /* HostSteps */], {\n hostStepsData: __WEBPACK_IMPORTED_MODULE_3__publicHostsStepsData__[\"a\" /* default */],\n title: 'Steps to Hosting with Friends and Guests'\n }),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1__libs_components__[\"o\" /* HostStories */], {\n className: __WEBPACK_IMPORTED_MODULE_4__PublicHostsPage_scss___default.a.hostStoriesBackground,\n hostStories: props.hostStories,\n cloudinaryUrl: railsContext.cloudinaryUrl,\n storyPath: props.storyPath,\n buttonUrl: props.storiesPath,\n title: 'Stories of Our Hosts',\n description: 'We’re focused on relationships and privacy because we believe that vacation rentals' + ' are just as much about people as places to go. So, here are stories that inspired' + ' us to create Friends and Guests.'\n }),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1__libs_components__[\"b\" /* HostDoor */], {\n buttonUrl: props.newListingPath,\n cloudinaryUrl: railsContext.cloudinaryUrl,\n title: 'Putting Hosts in Control of Their Vacation Rental Business',\n buttonText: 'Add a Listing Now',\n tablet: railsContext.tablet,\n desktop: railsContext.desktop\n })\n );\n};\n\nPublicHostsPage.propTypes = {\n hostStories: __webpack_require__(/*! prop-types */ 0).arrayOf(__webpack_require__(/*! prop-types */ 0).shape({\n type: __webpack_require__(/*! prop-types */ 0).oneOf(['Private Host', 'Public Host']).isRequired,\n story: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n position: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n name: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n id: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n avatar: __webpack_require__(/*! prop-types */ 0).string.isRequired\n })).isRequired,\n storyPath: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n storiesPath: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n newListingPath: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n privateHostsPath: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n publicHostsPath: __webpack_require__(/*! prop-types */ 0).string.isRequired\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (PublicHostsPage);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/pages-public-hosts/components/PublicHostsPage.jsx\n// module id = 713\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/pages-public-hosts/components/PublicHostsPage.jsx?", + ); + + /***/ + }, + /* 714 */ + /* exports provided: default */ + /* exports used: default */ + /*!***************************************************************************!*\ + !*** ./app/bundles/pages-public-hosts/components/publicHostsStepsData.js ***! + \***************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "var babelPluginFlowReactPropTypes_proptype_HostStepData = __webpack_require__(/*! ../../../types/hostPages */ 143).babelPluginFlowReactPropTypes_proptype_HostStepData || __webpack_require__(/*! react */ 1).PropTypes.any;\n\nvar publicHostsStepsData = [{\n number: 1,\n createListingType: true,\n title: 'Sign Up to Host and ',\n typeTitle: 'Create a Public Listing',\n QA: [{\n question: 'What Is a Listing?',\n answers: ['A listing helps guests know what your place is like.\\n Fill out a description, upload lots of photos, set your price and house rules.\\n Tip: professional photos get the best results!']\n }, {\n question: 'Who Can Book?',\n answers: ['Your listing is public so anyone can request to book your home.\\n You still have the opportunity to learn more about a guest prior to accepting any booking.']\n }]\n}, {\n number: 2,\n title: 'Build Your Guest List',\n QA: [{\n question: 'What Is a Guest List?',\n answers: ['A Guest List is a great way to organize your guests,\\n promote your property and build relationships with guests on your list.']\n }, {\n question: 'Chat With Your Guests',\n answers: ['Guest contact details are shared with hosts so you can get to know each other\\n prior to booking. Ensuring that guests are a good fit for your property is important.']\n }, {\n question: 'How to Build a Guest List?',\n answers: ['Import a list of email addresses and invite guests to your list.\\n Guests need to accept your invite to get on the list.']\n }]\n}, {\n number: 3,\n title: 'Get Set Up',\n QA: [{\n question: 'What to Charge',\n answers: ['What you charge is up to you. Check your local area for comparable properties.']\n }, {\n question: 'How You Get Paid',\n answers: ['You determine your preferred forms of payment.']\n }, {\n question: 'Set Up Your Space',\n answers: ['Keep your home well-maintained for guest use and provide the essentials.']\n }, {\n question: 'How Guests Pay',\n answers: ['Guests pay you directly.']\n }, {\n question: 'House Rules',\n answers: ['Clearly outline house rules, expectations and costs for all guests.']\n }, {\n question: 'Cancellation Policies',\n answers: ['You have the flexibility to establish your cancellation policies.']\n }]\n}];\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (publicHostsStepsData);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/pages-public-hosts/components/publicHostsStepsData.js\n// module id = 714\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/pages-public-hosts/components/publicHostsStepsData.js?", + ); + + /***/ + }, + /* 715 */ + /* exports provided: default */ + /* exports used: default */ + /*!************************************************************************************!*\ + !*** ./app/bundles/pages-welcome/components/FeaturedListings/FeaturedListings.jsx ***! + \************************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__libs_components__ = __webpack_require__(/*! ../../../../libs/components */ 11);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__FeaturedListings_scss__ = __webpack_require__(/*! ./FeaturedListings.scss */ 1023);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__FeaturedListings_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__FeaturedListings_scss__);\n\n\n\n\n\nvar babelPluginFlowReactPropTypes_proptype_ListingInfoPublic = __webpack_require__(/*! ../../../../types */ 4).babelPluginFlowReactPropTypes_proptype_ListingInfoPublic || __webpack_require__(/*! react */ 1).PropTypes.any;\n\n\n\nvar FeaturedListings = function FeaturedListings(props) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n \'div\',\n { className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()(\'container\', __WEBPACK_IMPORTED_MODULE_3__FeaturedListings_scss___default.a.FeaturedListings) },\n props.featuredListings.map(function (listingInfo) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2__libs_components__["j" /* ListingTile */], {\n key: listingInfo.id,\n hideApproximateLocation: true,\n showHostInfo: true,\n listing: listingInfo\n });\n })\n );\n};\n\nFeaturedListings.propTypes = {\n featuredListings: __webpack_require__(/*! prop-types */ 0).arrayOf(babelPluginFlowReactPropTypes_proptype_ListingInfoPublic).isRequired\n};\n/* harmony default export */ __webpack_exports__["a"] = (FeaturedListings);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/pages-welcome/components/FeaturedListings/FeaturedListings.jsx\n// module id = 715\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/pages-welcome/components/FeaturedListings/FeaturedListings.jsx?', + ); + + /***/ + }, + /* 716 */ + /* exports provided: default */ + /* exports used: default */ + /*!******************************************************************************************************!*\ + !*** ./app/bundles/pages-welcome/components/FeaturedLocations/FeaturedLocation/FeaturedLocation.jsx ***! + \******************************************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__libs_components__ = __webpack_require__(/*! ../../../../../libs/components */ 11);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__FeaturedLocation_scss__ = __webpack_require__(/*! ./FeaturedLocation.scss */ 1024);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__FeaturedLocation_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__FeaturedLocation_scss__);\n\n\n\nvar babelPluginFlowReactPropTypes_proptype_CloudinaryTransformations = __webpack_require__(/*! ../../../../../types */ 4).babelPluginFlowReactPropTypes_proptype_CloudinaryTransformations || __webpack_require__(/*! react */ 1).PropTypes.any;\n\n\n\n\n\nvar FeaturedLocation = function FeaturedLocation(props) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_2__libs_components__["f" /* A */],\n {\n className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()(__WEBPACK_IMPORTED_MODULE_3__FeaturedLocation_scss___default.a.FeaturedLocation, props.className),\n href: props.href,\n underline: \'none\',\n color: \'none\'\n },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2__libs_components__["g" /* Image */], {\n url: props.imgUrl,\n alt: props.title,\n finalWidth: props.finalWidth,\n finalHeight: props.finalHeight,\n transforms: props.transforms\n }),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n \'h3\',\n { className: __WEBPACK_IMPORTED_MODULE_3__FeaturedLocation_scss___default.a.title },\n props.title\n )\n );\n};\n\nFeaturedLocation.propTypes = {\n className: __webpack_require__(/*! prop-types */ 0).string,\n title: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n href: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n imgUrl: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n finalWidth: __webpack_require__(/*! prop-types */ 0).oneOfType([__webpack_require__(/*! prop-types */ 0).string, __webpack_require__(/*! prop-types */ 0).number]).isRequired,\n finalHeight: __webpack_require__(/*! prop-types */ 0).oneOfType([__webpack_require__(/*! prop-types */ 0).string, __webpack_require__(/*! prop-types */ 0).number]).isRequired,\n transforms: __webpack_require__(/*! prop-types */ 0).arrayOf(babelPluginFlowReactPropTypes_proptype_CloudinaryTransformations).isRequired\n};\n/* harmony default export */ __webpack_exports__["a"] = (FeaturedLocation);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/pages-welcome/components/FeaturedLocations/FeaturedLocation/FeaturedLocation.jsx\n// module id = 716\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/pages-welcome/components/FeaturedLocations/FeaturedLocation/FeaturedLocation.jsx?', + ); + + /***/ + }, + /* 717 */ + /* exports provided: default */ + /* exports used: default */ + /*!**************************************************************************************!*\ + !*** ./app/bundles/pages-welcome/components/FeaturedLocations/FeaturedLocations.jsx ***! + \**************************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_responsive__ = __webpack_require__(/*! react-responsive */ 177);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_responsive___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react_responsive__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__assets_styles_resources_screenSizes__ = __webpack_require__(/*! ../../../../assets/styles/resources/screenSizes */ 105);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__utils_getFeaturedLocationProps__ = __webpack_require__(/*! ../../utils/getFeaturedLocationProps */ 722);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__FeaturedLocation_FeaturedLocation__ = __webpack_require__(/*! ./FeaturedLocation/FeaturedLocation */ 716);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__FeaturedLocations_scss__ = __webpack_require__(/*! ./FeaturedLocations.scss */ 1025);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__FeaturedLocations_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6__FeaturedLocations_scss__);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\n\n\n\n\n\n\n\n\n\n\nvar FeaturedLocations = function FeaturedLocations(props) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_1_react_responsive___default.a,\n { minWidth: __WEBPACK_IMPORTED_MODULE_3__assets_styles_resources_screenSizes__["c" /* SCREEN_EUGENE_MD */], maxWidth: __WEBPACK_IMPORTED_MODULE_3__assets_styles_resources_screenSizes__["d" /* SCREEN_EUGENE_LG */] - 1 },\n function (isTablet) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n \'section\',\n { className: __WEBPACK_IMPORTED_MODULE_2_classnames___default()(\'container\', __WEBPACK_IMPORTED_MODULE_6__FeaturedLocations_scss___default.a.FeaturedLocations) },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5__FeaturedLocation_FeaturedLocation__["a" /* default */], _extends({\n className: __WEBPACK_IMPORTED_MODULE_6__FeaturedLocations_scss___default.a.primaryLocation\n }, __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__utils_getFeaturedLocationProps__["a" /* getHawaiianIslandsProps */])(props, isTablet))),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n \'div\',\n { className: __WEBPACK_IMPORTED_MODULE_6__FeaturedLocations_scss___default.a.secondaryLocations },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5__FeaturedLocation_FeaturedLocation__["a" /* default */], __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__utils_getFeaturedLocationProps__["b" /* getWesternUsProps */])(props, isTablet)),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5__FeaturedLocation_FeaturedLocation__["a" /* default */], __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__utils_getFeaturedLocationProps__["c" /* getCentralUsProps */])(props, isTablet)),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5__FeaturedLocation_FeaturedLocation__["a" /* default */], __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__utils_getFeaturedLocationProps__["d" /* getEasternUsProps */])(props, isTablet)),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5__FeaturedLocation_FeaturedLocation__["a" /* default */], __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__utils_getFeaturedLocationProps__["e" /* getCanadaProps */])(props, isTablet))\n )\n );\n }\n );\n};\n\nFeaturedLocations.propTypes = {\n contextualListingsPath: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n cloudinaryUrl: __webpack_require__(/*! prop-types */ 0).string.isRequired\n};\n/* harmony default export */ __webpack_exports__["a"] = (FeaturedLocations);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/pages-welcome/components/FeaturedLocations/FeaturedLocations.jsx\n// module id = 717\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/pages-welcome/components/FeaturedLocations/FeaturedLocations.jsx?', + ); + + /***/ + }, + /* 718 */ + /* exports provided: default */ + /* exports used: default */ + /*!************************************************************!*\ + !*** ./app/bundles/pages-welcome/components/Hero/Hero.jsx ***! + \************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__libs_utils_fng_photos__ = __webpack_require__(/*! ../../../../libs/utils/fng/photos */ 51);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__libs_components__ = __webpack_require__(/*! ../../../../libs/components */ 11);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Search_Search__ = __webpack_require__(/*! ./Search/Search */ 719);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__Hero_scss__ = __webpack_require__(/*! ./Hero.scss */ 1026);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__Hero_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5__Hero_scss__);\n\n\n\n\n\n\n\n\n\nvar makeHeroImageUrl = function makeHeroImageUrl(cloudinaryUrl, width) {\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__libs_utils_fng_photos__[\"a\" /* buildPhotoUrl */])({\n url: cloudinaryUrl + 'welcome-hero-image.jpg',\n transforms: [{\n saturation: -40\n }, {\n contrast: -25,\n background: 'black',\n opacity: 75,\n fetchFormat: 'auto',\n gravity: 'south',\n dpr: 'auto',\n quality: 'auto',\n width: width\n }]\n });\n};\n\nvar Hero = function Hero(props) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_3__libs_components__[\"e\" /* CalculatedBreakpoint */],\n null,\n function (width) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n {\n className: __WEBPACK_IMPORTED_MODULE_5__Hero_scss___default.a.Hero,\n style: { backgroundImage: 'url(' + makeHeroImageUrl(props.cloudinaryUrl, width) + ')' }\n },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()('container', __WEBPACK_IMPORTED_MODULE_5__Hero_scss___default.a.heroInner) },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'h1',\n { className: __WEBPACK_IMPORTED_MODULE_5__Hero_scss___default.a.headline },\n 'Discover Vacation Rental Homes That Your Friends Love and Trust'\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_4__Search_Search__[\"a\" /* default */], {\n contextualListingsPath: props.contextualListingsPath,\n areDatesEnabled: props.areDatesEnabled,\n desktop: props.desktop,\n tablet: props.tablet,\n mobile: props.mobile\n })\n )\n );\n }\n );\n};\n\nHero.propTypes = {\n contextualListingsPath: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n areDatesEnabled: __webpack_require__(/*! prop-types */ 0).bool.isRequired,\n cloudinaryUrl: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n desktop: __webpack_require__(/*! prop-types */ 0).bool.isRequired,\n tablet: __webpack_require__(/*! prop-types */ 0).bool.isRequired,\n mobile: __webpack_require__(/*! prop-types */ 0).bool.isRequired\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (Hero);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/pages-welcome/components/Hero/Hero.jsx\n// module id = 718\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/pages-welcome/components/Hero/Hero.jsx?", + ); + + /***/ + }, + /* 719 */ + /* exports provided: default */ + /* exports used: default */ + /*!*********************************************************************!*\ + !*** ./app/bundles/pages-welcome/components/Hero/Search/Search.jsx ***! + \*********************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_dates__ = __webpack_require__(/*! react-dates */ 1311);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_dates___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react_dates__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_moment__ = __webpack_require__(/*! moment */ 3);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_moment___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_moment__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react_responsive__ = __webpack_require__(/*! react-responsive */ 177);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react_responsive___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react_responsive__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_lodash_fp__ = __webpack_require__(/*! lodash/fp */ 14);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_lodash_fp___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_lodash_fp__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__libs_components__ = __webpack_require__(/*! ../../../../../libs/components */ 11);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__libs_components_forms__ = __webpack_require__(/*! ../../../../../libs/components/forms */ 856);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__libs_components_GoogleMaps_SearchBox__ = __webpack_require__(/*! ../../../../../libs/components/GoogleMaps/SearchBox */ 300);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__libs_utils_geo__ = __webpack_require__(/*! ../../../../../libs/utils/geo */ 107);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__libs_utils_api__ = __webpack_require__(/*! ../../../../../libs/utils/api */ 106);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__assets_styles_resources_screenSizes__ = __webpack_require__(/*! ../../../../../assets/styles/resources/screenSizes */ 105);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__Search_scss__ = __webpack_require__(/*! ./Search.scss */ 1027);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__Search_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_12__Search_scss__);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _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\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar babelPluginFlowReactPropTypes_proptype_GeoLocation = __webpack_require__(/*! ../../../../../types */ 4).babelPluginFlowReactPropTypes_proptype_GeoLocation || __webpack_require__(/*! react */ 1).PropTypes.any;\n\n\n\n\n\n\nvar guestDropdownOptions = [{ label: '1 Guest', value: '1' }, { label: '2 Guests', value: '2' }, { label: '3 Guests', value: '3' }, { label: '4 Guests', value: '4' }, { label: '5 Guests', value: '5' }, { label: '6 Guests', value: '6' }, { label: '7 Guests', value: '7' }, { label: '8+ Guests', value: '8' }];\n\nvar Search = function (_React$Component) {\n _inherits(Search, _React$Component);\n\n function Search() {\n var _ref;\n\n var _temp, _this, _ret;\n\n _classCallCheck(this, Search);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Search.__proto__ || Object.getPrototypeOf(Search)).call.apply(_ref, [this].concat(args))), _this), _this.state = {\n location: '',\n geoLocation: null,\n startDate: null,\n endDate: null,\n focusedDatePickerInput: null,\n guests: guestDropdownOptions[0].value,\n datePickerIsMounted: false\n }, _this.setLocationToEventTargetValue = function (event) {\n return _this.setState({ location: event.target.value });\n }, _this.setGeoLocation = function (geoLocation) {\n return _this.setState({\n geoLocation: geoLocation,\n location: geoLocation.rawGeoData ? JSON.parse(geoLocation.rawGeoData).formatted_address : _this.state.location\n });\n }, _this.setFocusedDatePickerInput = function (input) {\n return _this.setState({ focusedDatePickerInput: input });\n }, _this.setDates = function (dates) {\n return _this.setState(dates);\n }, _this.setGuests = function (event) {\n return _this.setState({ guests: event.target.value });\n }, _this.getMediaQueryValues = function () {\n return __WEBPACK_IMPORTED_MODULE_5_lodash_fp___default.a.cond([[__WEBPACK_IMPORTED_MODULE_5_lodash_fp___default.a.constant(_this.props.mobile), __WEBPACK_IMPORTED_MODULE_5_lodash_fp___default.a.constant({ width: __WEBPACK_IMPORTED_MODULE_11__assets_styles_resources_screenSizes__[\"b\" /* SCREEN_SM */] })], [__WEBPACK_IMPORTED_MODULE_5_lodash_fp___default.a.constant(_this.props.tablet), __WEBPACK_IMPORTED_MODULE_5_lodash_fp___default.a.constant({ width: __WEBPACK_IMPORTED_MODULE_11__assets_styles_resources_screenSizes__[\"a\" /* SCREEN_MD */] })], [__WEBPACK_IMPORTED_MODULE_5_lodash_fp___default.a.constant(true), __WEBPACK_IMPORTED_MODULE_5_lodash_fp___default.a.constant({ width: __WEBPACK_IMPORTED_MODULE_11__assets_styles_resources_screenSizes__[\"e\" /* SCREEN_LG */] })]])();\n }, _this.getBounds = function () {\n if (!_this.state.geoLocation || !_this.state.geoLocation.rawGeoData) return {};\n\n var _JSON$parse = JSON.parse(_this.state.geoLocation.rawGeoData),\n geometry = _JSON$parse.geometry;\n\n var location = geometry.location;\n\n var generatedBounds = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__libs_utils_geo__[\"b\" /* generateBounds */])(location.lat, location.lng);\n var viewport = geometry.viewport || generatedBounds;\n\n // $FlowFixMe\n var swLat = viewport.south,\n swLng = viewport.west,\n neLat = viewport.north,\n neLng = viewport.east;\n\n\n if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__libs_utils_geo__[\"c\" /* isViewportInvalid */])(neLat, swLat)) {\n var swBound = generatedBounds.getSouthWest();\n var neBound = generatedBounds.getNorthEast();\n\n return {\n swLat: swBound.lat(),\n swLng: swBound.lng(),\n neLat: neBound.lat(),\n neLng: neBound.lng()\n };\n }\n\n return { swLat: swLat, swLng: swLng, neLat: neLat, neLng: neLng };\n }, _this.handleSubmit = function () {\n var _this$state = _this.state,\n location = _this$state.location,\n guests = _this$state.guests,\n startDate = _this$state.startDate,\n endDate = _this$state.endDate;\n\n var path = _this.props.contextualListingsPath;\n var query = _extends({\n location: location,\n guests: guests,\n startDate: startDate ? startDate.toDate() : null,\n endDate: endDate ? endDate.toDate() : null\n }, _this.getBounds());\n\n window.location = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_10__libs_utils_api__[\"b\" /* buildUrl */])(path, query);\n }, _this.render = function () {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_7__libs_components_forms__[\"a\" /* Form */],\n { className: __WEBPACK_IMPORTED_MODULE_12__Search_scss___default.a.searchListing, onSubmit: _this.handleSubmit, preventDefault: true },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n {\n className: __WEBPACK_IMPORTED_MODULE_3_classnames___default()(__WEBPACK_IMPORTED_MODULE_12__Search_scss___default.a.locationSection, _defineProperty({}, __WEBPACK_IMPORTED_MODULE_12__Search_scss___default.a.datesEnabled, _this.props.areDatesEnabled))\n },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_4_react_responsive___default.a,\n { minWidth: __WEBPACK_IMPORTED_MODULE_11__assets_styles_resources_screenSizes__[\"a\" /* SCREEN_MD */], values: _this.getMediaQueryValues() },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'span',\n { className: __WEBPACK_IMPORTED_MODULE_12__Search_scss___default.a.label },\n 'Where do you want to go'\n )\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_8__libs_components_GoogleMaps_SearchBox__[\"a\" /* default */],\n { focusOnMount: true, onPlaceChange: _this.setGeoLocation },\n function (setDomRef) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('input', {\n ref: setDomRef,\n type: 'text',\n className: __WEBPACK_IMPORTED_MODULE_12__Search_scss___default.a.location,\n placeholder: 'Destination, city, address',\n onChange: _this.setLocationToEventTargetValue,\n value: _this.state.location\n });\n }\n )\n ),\n _this.props.areDatesEnabled && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_4_react_responsive___default.a,\n { minWidth: __WEBPACK_IMPORTED_MODULE_11__assets_styles_resources_screenSizes__[\"a\" /* SCREEN_MD */], values: _this.getMediaQueryValues() },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_12__Search_scss___default.a.datesSection },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'span',\n { className: __WEBPACK_IMPORTED_MODULE_12__Search_scss___default.a.label },\n 'When'\n ),\n _this.state.datePickerIsMounted && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1_react_dates__[\"DateRangePicker\"], {\n startDatePlaceholderText: 'Check in',\n endDatePlaceholderText: 'Check out',\n showClearDates: true,\n startDate: _this.state.startDate,\n endDate: _this.state.endDate,\n focusedInput: _this.state.focusedDatePickerInput,\n onFocusChange: _this.setFocusedDatePickerInput,\n numberOfMonths: 2,\n onDatesChange: _this.setDates\n })\n )\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_4_react_responsive___default.a,\n { minWidth: __WEBPACK_IMPORTED_MODULE_11__assets_styles_resources_screenSizes__[\"a\" /* SCREEN_MD */], values: _this.getMediaQueryValues() },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_12__Search_scss___default.a.guestsSection },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'span',\n { className: __WEBPACK_IMPORTED_MODULE_12__Search_scss___default.a.label },\n 'Number of guests'\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'select',\n { className: __WEBPACK_IMPORTED_MODULE_12__Search_scss___default.a.guestsInput, value: _this.state.guests, onChange: _this.setGuests },\n guestDropdownOptions.map(function (option) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'option',\n { key: option.value, value: option.value },\n option.label\n );\n })\n )\n )\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_4_react_responsive___default.a,\n { maxWidth: __WEBPACK_IMPORTED_MODULE_11__assets_styles_resources_screenSizes__[\"a\" /* SCREEN_MD */] - 1, values: _this.getMediaQueryValues() },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_6__libs_components__[\"k\" /* ButtonLike */],\n { className: __WEBPACK_IMPORTED_MODULE_12__Search_scss___default.a.searchButtonSm, onClick: _this.handleSubmit },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_6__libs_components__[\"q\" /* Glyphicon */], { name: 'search', srOnlyLabel: 'Search' })\n )\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_4_react_responsive___default.a,\n { minWidth: __WEBPACK_IMPORTED_MODULE_11__assets_styles_resources_screenSizes__[\"a\" /* SCREEN_MD */], maxWidth: __WEBPACK_IMPORTED_MODULE_11__assets_styles_resources_screenSizes__[\"e\" /* SCREEN_LG */] - 1, values: _this.getMediaQueryValues() },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_6__libs_components__[\"c\" /* Button */],\n { type: 'submit', primary: true, size: 'lg', className: __WEBPACK_IMPORTED_MODULE_12__Search_scss___default.a.searchButtonMd },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_6__libs_components__[\"q\" /* Glyphicon */], { name: 'search', srOnlyLabel: 'Search' })\n )\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_4_react_responsive___default.a,\n { minWidth: __WEBPACK_IMPORTED_MODULE_11__assets_styles_resources_screenSizes__[\"e\" /* SCREEN_LG */], values: _this.getMediaQueryValues() },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_6__libs_components__[\"c\" /* Button */],\n { type: 'submit', primary: true, size: 'lg', className: __WEBPACK_IMPORTED_MODULE_12__Search_scss___default.a.searchButtonLg },\n 'Search'\n )\n )\n );\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n _createClass(Search, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n // HACK: workaround for https://github.com/airbnb/react-dates/issues/335#issue-208803135\n this.setState({ datePickerIsMounted: true }); // eslint-disable-line react/no-did-mount-set-state,max-len\n }\n\n // MediaQuery values are preloaded widths to use when server rendering\n\n }]);\n\n return Search;\n}(__WEBPACK_IMPORTED_MODULE_0_react___default.a.Component);\n\nSearch.propTypes = {\n contextualListingsPath: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n areDatesEnabled: __webpack_require__(/*! prop-types */ 0).bool.isRequired,\n desktop: __webpack_require__(/*! prop-types */ 0).bool.isRequired,\n tablet: __webpack_require__(/*! prop-types */ 0).bool.isRequired,\n mobile: __webpack_require__(/*! prop-types */ 0).bool.isRequired\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (Search);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/pages-welcome/components/Hero/Search/Search.jsx\n// module id = 719\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/pages-welcome/components/Hero/Search/Search.jsx?", + ); + + /***/ + }, + /* 720 */ + /* exports provided: default */ + /* exports used: default */ + /*!******************************************************************************!*\ + !*** ./app/bundles/pages-welcome/components/OurUniqueness/OurUniqueness.jsx ***! + \******************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__libs_components__ = __webpack_require__(/*! ../../../../libs/components */ 11);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__OurUniqueness_scss__ = __webpack_require__(/*! ./OurUniqueness.scss */ 1028);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__OurUniqueness_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__OurUniqueness_scss__);\n\n\n\n\n\n\nvar OurUniqueness = function OurUniqueness(props) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: 'container' },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'section',\n { className: __WEBPACK_IMPORTED_MODULE_2__OurUniqueness_scss___default.a.OurUniqueness },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'h2',\n null,\n 'What Makes Us Different'\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'p',\n null,\n 'We\\u2019re focused on building relationships between hosts and guests. We believe that vacation rentals are just as much about people as they are places to go.'\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'article',\n null,\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1__libs_components__[\"g\" /* Image */], {\n alt: 'Leverage Personal Networks',\n url: props.cloudinaryUrl + 'uniqueness-1.png',\n width: '160',\n height: '160',\n format: 'png',\n ariaHidden: true\n }),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'h4',\n null,\n 'Leverage Personal Networks'\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'p',\n null,\n 'Personal connections and Guest List memberships allow access to public and private listings.'\n )\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'article',\n null,\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1__libs_components__[\"g\" /* Image */], {\n alt: 'Guest List',\n url: props.cloudinaryUrl + 'uniqueness-2.png',\n width: '160',\n height: '160',\n format: 'png',\n ariaHidden: true\n }),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'h4',\n null,\n 'Get on the Guest List!\\u2122'\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'p',\n null,\n 'Favorite a listing and hosts will be notified that you\\u2019d like to get on their guest list. Guest List members get access to private listings not available on public sites.'\n )\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'article',\n null,\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1__libs_components__[\"g\" /* Image */], {\n alt: 'Communicate Openly',\n url: props.cloudinaryUrl + 'uniqueness-3.png',\n width: '160',\n height: '160',\n format: 'png',\n ariaHidden: true\n }),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'h4',\n null,\n 'Communicate Openly'\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'p',\n null,\n 'Contact hosts directly for availability and rates. Book direct with hosts and save on your accomodation.'\n )\n )\n )\n );\n};\n\nOurUniqueness.propTypes = {\n cloudinaryUrl: __webpack_require__(/*! prop-types */ 0).string.isRequired\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (OurUniqueness);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/pages-welcome/components/OurUniqueness/OurUniqueness.jsx\n// module id = 720\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/pages-welcome/components/OurUniqueness/OurUniqueness.jsx?", + ); + + /***/ + }, + /* 721 */ + /* exports provided: default */ + /* exports used: default */ + /*!**************************************************************!*\ + !*** ./app/bundles/pages-welcome/components/WelcomePage.jsx ***! + \**************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__libs_components__ = __webpack_require__(/*! ../../../libs/components */ 11);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Hero_Hero__ = __webpack_require__(/*! ./Hero/Hero */ 718);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__OurUniqueness_OurUniqueness__ = __webpack_require__(/*! ./OurUniqueness/OurUniqueness */ 720);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__FeaturedLocations_FeaturedLocations__ = __webpack_require__(/*! ./FeaturedLocations/FeaturedLocations */ 717);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__FeaturedListings_FeaturedListings__ = __webpack_require__(/*! ./FeaturedListings/FeaturedListings */ 715);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__WelcomePage_scss__ = __webpack_require__(/*! ./WelcomePage.scss */ 1029);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__WelcomePage_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6__WelcomePage_scss__);\n\n\nvar babelPluginFlowReactPropTypes_proptype_ListingInfoPublic = __webpack_require__(/*! ../../../types */ 4).babelPluginFlowReactPropTypes_proptype_ListingInfoPublic || __webpack_require__(/*! react */ 1).PropTypes.any;\n\n\n\n\n\n\n\n\n\nvar WelcomePage = function WelcomePage(props, railsContext) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'main',\n { className: __WEBPACK_IMPORTED_MODULE_6__WelcomePage_scss___default.a.WelcomePage },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2__Hero_Hero__[\"a\" /* default */], {\n areDatesEnabled: railsContext.launchdarklyAllFlags['temp-calendar'],\n cloudinaryUrl: railsContext.cloudinaryUrl,\n contextualListingsPath: props.contextualListingsPath,\n desktop: railsContext.desktop,\n tablet: railsContext.tablet,\n mobile: railsContext.mobile\n }),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3__OurUniqueness_OurUniqueness__[\"a\" /* default */], { cloudinaryUrl: railsContext.cloudinaryUrl }),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'h2',\n { className: __WEBPACK_IMPORTED_MODULE_6__WelcomePage_scss___default.a.featuredLocationsTitle },\n 'Featured Locations'\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_4__FeaturedLocations_FeaturedLocations__[\"a\" /* default */], {\n cloudinaryUrl: railsContext.cloudinaryUrl,\n contextualListingsPath: props.contextualListingsPath\n }),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'h2',\n { className: __WEBPACK_IMPORTED_MODULE_6__WelcomePage_scss___default.a.featuredListingsTitle },\n 'Featured Listings'\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5__FeaturedListings_FeaturedListings__[\"a\" /* default */], { featuredListings: props.featuredListings }),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1__libs_components__[\"b\" /* HostDoor */], {\n buttonUrl: props.hostsPath,\n cloudinaryUrl: railsContext.cloudinaryUrl,\n title: 'Are You a Host?',\n description: 'Friends and Guests is a vacation rental listing site which puts the' + ' relationships between hosts and guests first. At Friends and Guests, hosts are in' + ' control of their vacation rental business and have privacy options.',\n buttonText: 'Learn More',\n tablet: railsContext.tablet,\n desktop: railsContext.desktop\n })\n );\n};\n\nWelcomePage.propTypes = {\n contextualListingsPath: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n featuredListings: __webpack_require__(/*! prop-types */ 0).arrayOf(babelPluginFlowReactPropTypes_proptype_ListingInfoPublic).isRequired,\n hostsPath: __webpack_require__(/*! prop-types */ 0).string.isRequired\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (WelcomePage);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/pages-welcome/components/WelcomePage.jsx\n// module id = 721\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/pages-welcome/components/WelcomePage.jsx?", + ); + + /***/ + }, + /* 722 */ + /* exports provided: getHawaiianIslandsProps, getWesternUsProps, getCentralUsProps, getEasternUsProps, getCanadaProps */ + /* exports used: getHawaiianIslandsProps, getWesternUsProps, getCentralUsProps, getEasternUsProps, getCanadaProps */ + /*!*********************************************************************!*\ + !*** ./app/bundles/pages-welcome/utils/getFeaturedLocationProps.js ***! + \*********************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_fp__ = __webpack_require__(/*! lodash/fp */ 14);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_fp___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_lodash_fp__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return getHawaiianIslandsProps; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return getWesternUsProps; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return getCentralUsProps; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return getEasternUsProps; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"e\", function() { return getCanadaProps; });\n\n\nvar QUERY_STRING_HAWAII_ISLANDS = '?location=Hawaii%2C%20USA&neLat=22.5937&neLng=-154.4019&swLat=18.6671&swLng=-161.0815';\nvar QUERY_STRING_CANADA = '?location=Canada&neLat=70&neLng=-50&swLat=42&swLng=-142';\nvar QUERY_STRING_WESTERN_US = '?location=Western%20USA&neLat=49.0378679453&neLng=-109.3359375&swLat=31.952162238&swLng=-125.859375';\nvar QUERY_STRING_EASTERN_US = '?location=Eastern%20USA&neLat=47.46&neLng=-67.76&swLat=24.21&swLng=-87.45';\nvar QUERY_STRING_CENTRAL_US = '?location=Central%20USA&neLat=49.04&neLng=-85.17&swLat=26.04&swLng=-114.79';\nvar COMMON_TRANSFORMS = [{\n contrast: -10\n}, {\n dpr: 'auto',\n background: 'black',\n fetchFormat: 'auto',\n quality: 'auto',\n saturation: -10\n}, {\n gradient_fade: 0.1,\n y: -0.4 }];\n\nvar buildImgUrl = function buildImgUrl(cloudinaryUrl, image) {\n return cloudinaryUrl + image;\n};\n\nvar secondaryWidth = __WEBPACK_IMPORTED_MODULE_0_lodash_fp___default.a.memoize(function (isTablet) {\n return isTablet ? 540 : 360;\n});\n\nvar secondaryHeight = __WEBPACK_IMPORTED_MODULE_0_lodash_fp___default.a.memoize(function (isTablet) {\n return isTablet ? 330 : 240;\n});\n\nvar getHawaiianIslandsProps = function getHawaiianIslandsProps(_ref, isTablet) {\n var cloudinaryUrl = _ref.cloudinaryUrl,\n contextualListingsPath = _ref.contextualListingsPath;\n return {\n title: 'Hawaiian Islands',\n href: contextualListingsPath + '/' + QUERY_STRING_HAWAII_ISLANDS,\n transforms: [isTablet ? {\n width: 2309,\n height: 1411,\n x: 495,\n y: 726,\n crop: 'crop'\n } : {\n width: 1085,\n height: 1387,\n x: 1003,\n y: 753,\n crop: 'crop'\n }, {\n width: isTablet ? 540 : 360,\n height: isTablet ? 330 : 500,\n crop: 'scale'\n }].concat(COMMON_TRANSFORMS),\n finalWidth: isTablet ? 540 : 360,\n finalHeight: isTablet ? 330 : 500,\n imgUrl: buildImgUrl(cloudinaryUrl, 'hawaii-featured.jpg')\n };\n};\n\nvar getWesternUsProps = function getWesternUsProps(_ref2, isTablet) {\n var cloudinaryUrl = _ref2.cloudinaryUrl,\n contextualListingsPath = _ref2.contextualListingsPath;\n return {\n title: 'Western US',\n href: contextualListingsPath + '/' + QUERY_STRING_WESTERN_US,\n transforms: [{\n width: secondaryWidth(isTablet),\n height: secondaryHeight(isTablet)\n }].concat(COMMON_TRANSFORMS),\n finalWidth: secondaryWidth(isTablet),\n finalHeight: secondaryHeight(isTablet),\n imgUrl: buildImgUrl(cloudinaryUrl, 'western-us-featured.jpg')\n };\n};\n\nvar getCentralUsProps = function getCentralUsProps(_ref3, isTablet) {\n var cloudinaryUrl = _ref3.cloudinaryUrl,\n contextualListingsPath = _ref3.contextualListingsPath;\n return {\n title: 'Central US',\n href: contextualListingsPath + '/' + QUERY_STRING_CENTRAL_US,\n transforms: [{\n width: 2000,\n height: 1600,\n x: 220,\n y: 2000,\n crop: 'crop'\n }, {\n width: secondaryWidth(isTablet),\n height: secondaryHeight(isTablet),\n crop: 'scale'\n }].concat(COMMON_TRANSFORMS),\n finalWidth: secondaryWidth(isTablet),\n finalHeight: secondaryHeight(isTablet),\n imgUrl: buildImgUrl(cloudinaryUrl, 'central-us-featured.jpg')\n };\n};\n\nvar getEasternUsProps = function getEasternUsProps(_ref4, isTablet) {\n var cloudinaryUrl = _ref4.cloudinaryUrl,\n contextualListingsPath = _ref4.contextualListingsPath;\n return {\n title: 'Eastern US',\n href: contextualListingsPath + '/' + QUERY_STRING_EASTERN_US,\n transforms: [{\n width: 2500,\n height: 1700,\n x: 1500,\n y: 800,\n crop: 'crop'\n }, {\n width: secondaryWidth(isTablet),\n height: secondaryHeight(isTablet),\n crop: 'scale'\n }].concat(COMMON_TRANSFORMS),\n finalWidth: secondaryWidth(isTablet),\n finalHeight: secondaryHeight(isTablet),\n imgUrl: buildImgUrl(cloudinaryUrl, 'eastern-us-featured.jpg')\n };\n};\n\nvar getCanadaProps = function getCanadaProps(_ref5, isTablet) {\n var cloudinaryUrl = _ref5.cloudinaryUrl,\n contextualListingsPath = _ref5.contextualListingsPath;\n return {\n title: 'Canada',\n href: contextualListingsPath + '/' + QUERY_STRING_CANADA,\n transforms: [{\n width: 6000,\n height: 3000,\n x: 0,\n y: 0,\n crop: 'crop'\n }, {\n width: secondaryWidth(isTablet),\n height: secondaryHeight(isTablet),\n crop: 'scale'\n }].concat(COMMON_TRANSFORMS),\n finalWidth: secondaryWidth(isTablet),\n finalHeight: secondaryHeight(isTablet),\n imgUrl: buildImgUrl(cloudinaryUrl, 'canada-featured.jpg')\n };\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/pages-welcome/utils/getFeaturedLocationProps.js\n// module id = 722\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/pages-welcome/utils/getFeaturedLocationProps.js?", + ); + + /***/ + }, + /* 723 */ + /* exports provided: favorite, unfavorite */ + /* all exports used */ + /*!***********************************************************!*\ + !*** ./app/bundles/users-show/actions/listingsActions.js ***! + \***********************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + 'Object.defineProperty(__webpack_exports__, "__esModule", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__libs_utils_api_apiCall__ = __webpack_require__(/*! ../../../libs/utils/api/apiCall */ 62);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__libs_utils_redux_middlewares_apiErrors__ = __webpack_require__(/*! ../../../libs/utils/redux/middlewares/apiErrors */ 193);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__routes_listingsPaths__ = __webpack_require__(/*! ../routes/listingsPaths */ 733);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__constants_listingsConstants__ = __webpack_require__(/*! ../constants/listingsConstants */ 295);\n/* harmony export (immutable) */ __webpack_exports__["favorite"] = favorite;\n/* harmony export (immutable) */ __webpack_exports__["unfavorite"] = unfavorite;\nfunction _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\n\n\n\n\n\nfunction favorite(listingId) {\n return function (dispatch) {\n dispatch({\n type: __WEBPACK_IMPORTED_MODULE_3__constants_listingsConstants__["a" /* default */].LISTINGS__FAVORITE_REQUESTED,\n listingId: listingId\n });\n\n return __WEBPACK_IMPORTED_MODULE_0__libs_utils_api_apiCall__["a" /* default */].post(__WEBPACK_IMPORTED_MODULE_2__routes_listingsPaths__["a" /* apiPaths */].favoriteListingPath(listingId)).then(function () {\n return dispatch({\n type: __WEBPACK_IMPORTED_MODULE_3__constants_listingsConstants__["a" /* default */].LISTINGS__FAVORITE_SUCCEEDED\n });\n }).catch(function (error) {\n var _dispatch;\n\n return dispatch((_dispatch = {}, _defineProperty(_dispatch, __WEBPACK_IMPORTED_MODULE_1__libs_utils_redux_middlewares_apiErrors__["a" /* API_ERROR */], {\n type: __WEBPACK_IMPORTED_MODULE_3__constants_listingsConstants__["a" /* default */].LISTINGS__FAVORITE_FAILED,\n error: error\n }), _defineProperty(_dispatch, \'listingId\', listingId), _dispatch));\n });\n };\n}\n\nfunction unfavorite(listingId) {\n return function (dispatch) {\n dispatch({\n type: __WEBPACK_IMPORTED_MODULE_3__constants_listingsConstants__["a" /* default */].LISTINGS__UNFAVORITE_REQUESTED,\n listingId: listingId\n });\n\n return __WEBPACK_IMPORTED_MODULE_0__libs_utils_api_apiCall__["a" /* default */].delete(__WEBPACK_IMPORTED_MODULE_2__routes_listingsPaths__["a" /* apiPaths */].favoriteListingPath(listingId)).then(function () {\n return dispatch({\n type: __WEBPACK_IMPORTED_MODULE_3__constants_listingsConstants__["a" /* default */].LISTINGS__UNFAVORITE_SUCCEEDED\n });\n }).catch(function (error) {\n var _dispatch2;\n\n return dispatch((_dispatch2 = {}, _defineProperty(_dispatch2, __WEBPACK_IMPORTED_MODULE_1__libs_utils_redux_middlewares_apiErrors__["a" /* API_ERROR */], {\n type: __WEBPACK_IMPORTED_MODULE_3__constants_listingsConstants__["a" /* default */].LISTINGS__UNFAVORITE_FAILED,\n error: error\n }), _defineProperty(_dispatch2, \'listingId\', listingId), _dispatch2));\n });\n };\n}\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/users-show/actions/listingsActions.js\n// module id = 723\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/users-show/actions/listingsActions.js?', + ); + + /***/ + }, + /* 724 */ + /* exports provided: default */ + /* exports used: default */ + /*!*********************************************************!*\ + !*** ./app/bundles/users-show/components/Hero/Hero.jsx ***! + \*********************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_lodash_compact__ = __webpack_require__(/*! lodash/compact */ 1195);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_lodash_compact___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_lodash_compact__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__libs_utils__ = __webpack_require__(/*! ../../../../libs/utils */ 20);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__libs_utils_fng_photos__ = __webpack_require__(/*! ../../../../libs/utils/fng/photos */ 51);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__libs_momentUtils__ = __webpack_require__(/*! ../../../../libs/momentUtils */ 308);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__libs_components__ = __webpack_require__(/*! ../../../../libs/components */ 11);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__routes_usersPaths__ = __webpack_require__(/*! ../../routes/usersPaths */ 734);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__SocialIcon_SocialIcon__ = __webpack_require__(/*! ./SocialIcon/SocialIcon */ 725);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__Hero_scss__ = __webpack_require__(/*! ./Hero.scss */ 1031);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__Hero_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_10__Hero_scss__);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar AVATAR_SIZE = 220; // Keep in sync with users-show/components/Hero/Hero.scss\n\nvar getLocation = function getLocation() {\n for (var _len = arguments.length, places = Array(_len), _key = 0; _key < _len; _key++) {\n places[_key] = arguments[_key];\n }\n\n return __WEBPACK_IMPORTED_MODULE_3_lodash_compact___default()(places).join(', ');\n};\n\nvar Hero = function Hero(_ref) {\n var firstName = _ref.firstName,\n lastName = _ref.lastName,\n username = _ref.username,\n createdAt = _ref.createdAt,\n aboutMeDetails = _ref.aboutMeDetails,\n avatarUrl = _ref.avatarUrl,\n coverImageUrl = _ref.coverImageUrl,\n city = _ref.city,\n state = _ref.state,\n country = _ref.country,\n facebookUrl = _ref.facebookUrl,\n personalWebsiteUrl = _ref.personalWebsiteUrl,\n twitterProfile = _ref.twitterProfile,\n linkedinUrl = _ref.linkedinUrl,\n ownProfile = _ref.ownProfile,\n fbFriend = _ref.fbFriend,\n vrboUrl = _ref.vrboUrl,\n airbnbUrl = _ref.airbnbUrl;\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_10__Hero_scss___default.a.hero },\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_2_classnames___default()('container', __WEBPACK_IMPORTED_MODULE_10__Hero_scss___default.a.container) },\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_2_classnames___default()('col-md-9', __WEBPACK_IMPORTED_MODULE_10__Hero_scss___default.a.userImage) },\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7__libs_components__[\"g\" /* Image */], {\n alt: firstName + '\\'s avatar',\n url: avatarUrl,\n width: AVATAR_SIZE,\n height: AVATAR_SIZE,\n dpr: '2.0',\n crop: 'fill',\n radius: 'max',\n gravity: 'faces',\n className: __WEBPACK_IMPORTED_MODULE_10__Hero_scss___default.a.avatar\n }),\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_10__Hero_scss___default.a.socialIcons },\n facebookUrl && __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_10__Hero_scss___default.a.bubble },\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_9__SocialIcon_SocialIcon__[\"a\" /* default */],\n { iconName: 'facebook', url: __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__libs_utils__[\"b\" /* externalUrlFor */])(facebookUrl), noTransparency: true },\n fbFriend ? __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'span',\n { className: __WEBPACK_IMPORTED_MODULE_10__Hero_scss___default.a.bubbleInfo },\n 'Your friend on Facebook'\n ) : null\n )\n ),\n twitterProfile && __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_9__SocialIcon_SocialIcon__[\"a\" /* default */], { iconName: 'twitter', url: __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__libs_utils__[\"b\" /* externalUrlFor */])(twitterProfile) }),\n linkedinUrl && __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_9__SocialIcon_SocialIcon__[\"a\" /* default */], { iconName: 'linkedin', url: __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__libs_utils__[\"b\" /* externalUrlFor */])(linkedinUrl) }),\n vrboUrl && __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_9__SocialIcon_SocialIcon__[\"a\" /* default */], { iconName: 'vrbo', url: __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__libs_utils__[\"b\" /* externalUrlFor */])(vrboUrl) }),\n airbnbUrl && __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_9__SocialIcon_SocialIcon__[\"a\" /* default */], { iconName: 'airbnb', url: __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__libs_utils__[\"b\" /* externalUrlFor */])(airbnbUrl) }),\n personalWebsiteUrl && __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_10__Hero_scss___default.a.bubble },\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_9__SocialIcon_SocialIcon__[\"a\" /* default */],\n { iconName: 'link', url: __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__libs_utils__[\"b\" /* externalUrlFor */])(personalWebsiteUrl), noTransparency: true },\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'span',\n { className: __WEBPACK_IMPORTED_MODULE_10__Hero_scss___default.a.bubbleInfo },\n personalWebsiteUrl\n )\n )\n ),\n getLocation(city, state, country) && __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_10__Hero_scss___default.a.bubble },\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7__libs_components__[\"q\" /* Glyphicon */], { name: 'map-marker' }),\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'span',\n { className: __WEBPACK_IMPORTED_MODULE_10__Hero_scss___default.a.bubbleInfo },\n getLocation(city, state, country)\n )\n )\n )\n ),\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n { className: 'col-md-3' },\n ownProfile && __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'a',\n {\n href: __WEBPACK_IMPORTED_MODULE_8__routes_usersPaths__[\"a\" /* paths */].editUserPath(username),\n className: __WEBPACK_IMPORTED_MODULE_2_classnames___default()('btn', 'btn-lg', 'btn-block', 'btn-info', __WEBPACK_IMPORTED_MODULE_10__Hero_scss___default.a.editProfileButton)\n },\n 'Edit profile'\n )\n ),\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n { className: 'col-sm-12' },\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'h1',\n { className: __WEBPACK_IMPORTED_MODULE_10__Hero_scss___default.a.name },\n firstName,\n ' ',\n lastName\n ),\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'span',\n { className: __WEBPACK_IMPORTED_MODULE_10__Hero_scss___default.a.memberSince },\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__libs_momentUtils__[\"a\" /* memberSince */])(createdAt)\n )\n ),\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_2_classnames___default()('col-sm-9', __WEBPACK_IMPORTED_MODULE_10__Hero_scss___default.a.aboutMe) },\n aboutMeDetails\n )\n ),\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('div', {\n className: __WEBPACK_IMPORTED_MODULE_10__Hero_scss___default.a.heroOverlay,\n style: {\n backgroundImage: coverImageUrl ? 'url(' + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__libs_utils_fng_photos__[\"a\" /* buildPhotoUrl */])({ url: coverImageUrl, format: 'jpg' }) + ')' : 'none'\n }\n })\n );\n};\n\nHero.propTypes = {\n firstName: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string,\n lastName: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string,\n username: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string,\n createdAt: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string,\n aboutMeDetails: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string,\n avatarUrl: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string.isRequired,\n coverImageUrl: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string,\n city: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string,\n state: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string,\n country: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string,\n facebookUrl: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string,\n personalWebsiteUrl: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string,\n twitterProfile: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string,\n linkedinUrl: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string,\n ownProfile: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.bool,\n fbFriend: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.bool,\n airbnbUrl: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string,\n vrboUrl: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Hero);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/users-show/components/Hero/Hero.jsx\n// module id = 724\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/users-show/components/Hero/Hero.jsx?", + ); + + /***/ + }, + /* 725 */ + /* exports provided: default */ + /* exports used: default */ + /*!**************************************************************************!*\ + !*** ./app/bundles/users-show/components/Hero/SocialIcon/SocialIcon.jsx ***! + \**************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__SocialIcon_scss__ = __webpack_require__(/*! ./SocialIcon.scss */ 1032);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__SocialIcon_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__SocialIcon_scss__);\nfunction _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\n\n\n\n\n\nvar SocialIcon = function SocialIcon(_ref) {\n var url = _ref.url,\n iconName = _ref.iconName,\n noTransparency = _ref.noTransparency,\n children = _ref.children;\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'a',\n {\n href: url,\n title: url,\n target: 'blank',\n className: __WEBPACK_IMPORTED_MODULE_2_classnames___default()(__WEBPACK_IMPORTED_MODULE_3__SocialIcon_scss___default.a.socialIcon, _defineProperty({}, __WEBPACK_IMPORTED_MODULE_3__SocialIcon_scss___default.a.noTransparency, noTransparency))\n },\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('i', { className: __WEBPACK_IMPORTED_MODULE_3__SocialIcon_scss___default.a[iconName] }),\n children\n );\n};\n\nSocialIcon.propTypes = {\n iconName: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string,\n url: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string,\n noTransparency: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.bool,\n children: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (SocialIcon);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/users-show/components/Hero/SocialIcon/SocialIcon.jsx\n// module id = 725\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/users-show/components/Hero/SocialIcon/SocialIcon.jsx?", + ); + + /***/ + }, + /* 726 */ + /* exports provided: default */ + /* exports used: default */ + /*!***************************************************************************!*\ + !*** ./app/bundles/users-show/components/MutualFriends/MutualFriends.jsx ***! + \***************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_lodash__ = __webpack_require__(/*! lodash */ 19);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_lodash___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_lodash__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__libs_utils_i18n__ = __webpack_require__(/*! ../../../../libs/utils/i18n */ 89);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__SectionHeader_SectionHeader__ = __webpack_require__(/*! ../SectionHeader/SectionHeader */ 294);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__MutualFriends_scss__ = __webpack_require__(/*! ./MutualFriends.scss */ 1033);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__MutualFriends_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6__MutualFriends_scss__);\n\n\n\n\n\n\n\n\n\nvar MutualFriends = function MutualFriends(_ref) {\n var mutualFriends = _ref.mutualFriends,\n mutualFriendsCount = _ref.mutualFriendsCount;\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'section',\n { id: 'mutual-friends' },\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5__SectionHeader_SectionHeader__[\"a\" /* default */], {\n title: 'Mutual Friends',\n counter: mutualFriendsCount\n }),\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_2_classnames___default()('container', __WEBPACK_IMPORTED_MODULE_6__MutualFriends_scss___default.a.container) },\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_2_classnames___default()('row', __WEBPACK_IMPORTED_MODULE_6__MutualFriends_scss___default.a.row) },\n __WEBPACK_IMPORTED_MODULE_3_lodash___default.a.map(mutualFriends, function (mutualFriend, i) {\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n { key: 'mutual-friend-' + i, className: __WEBPACK_IMPORTED_MODULE_2_classnames___default()('col-sm-3', __WEBPACK_IMPORTED_MODULE_6__MutualFriends_scss___default.a.mutualFriend) },\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('img', {\n src: mutualFriend.avatarUrl,\n className: __WEBPACK_IMPORTED_MODULE_6__MutualFriends_scss___default.a.userAvatar,\n alt: mutualFriend.name\n }),\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_6__MutualFriends_scss___default.a.info },\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'a',\n {\n className: __WEBPACK_IMPORTED_MODULE_6__MutualFriends_scss___default.a.name,\n href: mutualFriend.url\n },\n mutualFriend.name\n ),\n mutualFriend.listingsCount > 0 && __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'span',\n { className: __WEBPACK_IMPORTED_MODULE_6__MutualFriends_scss___default.a.listings },\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__libs_utils_i18n__[\"a\" /* formatInflection */])('listings', mutualFriend.listingsCount)\n )\n )\n );\n })\n )\n )\n );\n};\n\nMutualFriends.propTypes = {\n mutualFriends: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.arrayOf(__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.shape({\n avatarUrl: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string.isRequired,\n id: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string,\n listingsCount: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number.isRequired,\n name: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string.isRequired,\n url: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string\n })),\n mutualFriendsCount: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (MutualFriends);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/users-show/components/MutualFriends/MutualFriends.jsx\n// module id = 726\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/users-show/components/MutualFriends/MutualFriends.jsx?", + ); + + /***/ + }, + /* 727 */ + /* exports provided: default */ + /* exports used: default */ + /*!*************************************************************************!*\ + !*** ./app/bundles/users-show/components/UserListings/UserListings.jsx ***! + \*************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__libs_components_ListingTile_ListingTile__ = __webpack_require__(/*! ../../../../libs/components/ListingTile/ListingTile */ 137);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__SectionHeader_SectionHeader__ = __webpack_require__(/*! ../SectionHeader/SectionHeader */ 294);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__UserListings_scss__ = __webpack_require__(/*! ./UserListings.scss */ 1035);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__UserListings_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5__UserListings_scss__);\n\n\n\n\n\n\n\n\nvar UserListings = function UserListings(_ref) {\n var listings = _ref.listings,\n onFavoriteUnfavoriteListing = _ref.onFavoriteUnfavoriteListing;\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n null,\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_4__SectionHeader_SectionHeader__[\"a\" /* default */], {\n title: 'Listings',\n counter: listings.length\n }),\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_2_classnames___default()('container', __WEBPACK_IMPORTED_MODULE_5__UserListings_scss___default.a.container) },\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n { className: 'row' },\n listings.map(function (listing) {\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n { key: listing.id, className: __WEBPACK_IMPORTED_MODULE_2_classnames___default()('col-sm-4') },\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3__libs_components_ListingTile_ListingTile__[\"a\" /* default */], {\n listing: listing,\n onFavoriteUnfavorite: onFavoriteUnfavoriteListing,\n className: __WEBPACK_IMPORTED_MODULE_5__UserListings_scss___default.a.tile,\n infoClassName: __WEBPACK_IMPORTED_MODULE_5__UserListings_scss___default.a.info,\n hideApproximateLocation: true\n })\n );\n })\n )\n )\n );\n};\n\nUserListings.propTypes = {\n listings: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.array.isRequired,\n onFavoriteUnfavoriteListing: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (UserListings);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/users-show/components/UserListings/UserListings.jsx\n// module id = 727\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/users-show/components/UserListings/UserListings.jsx?", + ); + + /***/ + }, + /* 728 */ + /* exports provided: default */ + /* exports used: default */ + /*!***********************************************************!*\ + !*** ./app/bundles/users-show/components/UserProfile.jsx ***! + \***********************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_bindAll__ = __webpack_require__(/*! lodash/bindAll */ 1194);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_bindAll___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_lodash_bindAll__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__libs_redirectToSignIn__ = __webpack_require__(/*! ../../../libs/redirectToSignIn */ 88);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Hero_Hero__ = __webpack_require__(/*! ./Hero/Hero */ 724);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__UserListings_UserListings__ = __webpack_require__(/*! ./UserListings/UserListings */ 727);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__MutualFriends_MutualFriends__ = __webpack_require__(/*! ./MutualFriends/MutualFriends */ 726);\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\n\n\n\n\n\n\n\n\n\nvar UserProfile = function (_Component) {\n _inherits(UserProfile, _Component);\n\n function UserProfile(props) {\n _classCallCheck(this, UserProfile);\n\n var _this = _possibleConstructorReturn(this, (UserProfile.__proto__ || Object.getPrototypeOf(UserProfile)).call(this, props));\n\n __WEBPACK_IMPORTED_MODULE_2_lodash_bindAll___default()(_this, \'onFavoriteUnfavoriteListing\');\n return _this;\n }\n\n _createClass(UserProfile, [{\n key: \'onFavoriteUnfavoriteListing\',\n value: function onFavoriteUnfavoriteListing(listingId, shouldFavorite) {\n if (!this.props.isCurrentUserSignedIn) {\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__libs_redirectToSignIn__["a" /* default */])();\n } else if (shouldFavorite) {\n this.props.listingsActions.favorite(listingId);\n } else {\n this.props.listingsActions.unfavorite(listingId);\n }\n }\n }, {\n key: \'render\',\n value: function render() {\n var _props = this.props,\n user = _props.user,\n listings = _props.listings;\n\n\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n \'div\',\n null,\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_4__Hero_Hero__["a" /* default */], user),\n listings.length > 0 && __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5__UserListings_UserListings__["a" /* default */], {\n listings: listings,\n onFavoriteUnfavoriteListing: this.onFavoriteUnfavoriteListing\n }),\n user.allMutualFriendsCount > 0 && __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_6__MutualFriends_MutualFriends__["a" /* default */], {\n mutualFriends: user.allMutualFriendsList,\n mutualFriendsCount: user.allMutualFriendsCount\n })\n );\n }\n }]);\n\n return UserProfile;\n}(__WEBPACK_IMPORTED_MODULE_1_react__["Component"]);\n\nUserProfile.propTypes = {\n user: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object.isRequired,\n isCurrentUserSignedIn: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.bool.isRequired,\n listings: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.array.isRequired,\n listingsActions: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.shape({\n favorite: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired,\n unfavorite: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired\n }).isRequired\n};\n/* harmony default export */ __webpack_exports__["a"] = (UserProfile);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/users-show/components/UserProfile.jsx\n// module id = 728\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/users-show/components/UserProfile.jsx?', + ); + + /***/ + }, + /* 729 */ + /* exports provided: default */ + /* exports used: default */ + /*!********************************************************************!*\ + !*** ./app/bundles/users-show/containers/UserProfileContainer.jsx ***! + \********************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__libs_utils_redux__ = __webpack_require__(/*! ../../../libs/utils/redux */ 108);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_redux__ = __webpack_require__(/*! react-redux */ 81);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__components_UserProfile__ = __webpack_require__(/*! ../components/UserProfile */ 728);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__selectors_userProfileSelector__ = __webpack_require__(/*! ../selectors/userProfileSelector */ 736);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__actions_listingsActions__ = __webpack_require__(/*! ../actions/listingsActions */ 723);\n\n\n\n\n\n\n\n\nvar UserProfileContainer = function UserProfileContainer(props) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3__components_UserProfile__["a" /* default */], props);\n};\n\nvar actionsMap = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__libs_utils_redux__["d" /* createActionsMap */])({ listingsActions: __WEBPACK_IMPORTED_MODULE_5__actions_listingsActions__ });\n\n/* harmony default export */ __webpack_exports__["a"] = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2_react_redux__["a" /* connect */])(__WEBPACK_IMPORTED_MODULE_4__selectors_userProfileSelector__["a" /* default */], actionsMap)(UserProfileContainer));\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/users-show/containers/UserProfileContainer.jsx\n// module id = 729\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/users-show/containers/UserProfileContainer.jsx?', + ); + + /***/ + }, + /* 730 */ + /* exports provided: $$currentUserInitialState, default */ + /* exports used: default, $$currentUserInitialState */ + /*!***************************************************************!*\ + !*** ./app/bundles/users-show/reducers/currentUserReducer.js ***! + \***************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_immutable__ = __webpack_require__(/*! immutable */ 26);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_immutable___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_immutable__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__libs_utils_redux_reducers_common__ = __webpack_require__(/*! ../../../libs/utils/redux/reducers/common */ 142);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return $$currentUserInitialState; });\n\n\n\nvar $$currentUserInitialState = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0_immutable__["Map"])();\n\nvar handlers = {};\n\n/* harmony default export */ __webpack_exports__["a"] = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__libs_utils_redux_reducers_common__["a" /* createReducer */])($$currentUserInitialState, handlers));\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/users-show/reducers/currentUserReducer.js\n// module id = 730\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/users-show/reducers/currentUserReducer.js?', + ); + + /***/ + }, + /* 731 */ + /* exports provided: $$listingsInitialState, default */ + /* exports used: default, $$listingsInitialState */ + /*!************************************************************!*\ + !*** ./app/bundles/users-show/reducers/listingsReducer.js ***! + \************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_immutable__ = __webpack_require__(/*! immutable */ 26);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_immutable___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_immutable__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_fp__ = __webpack_require__(/*! lodash/fp */ 14);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_fp___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_lodash_fp__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__libs_utils_redux_reducers_common__ = __webpack_require__(/*! ../../../libs/utils/redux/reducers/common */ 142);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__constants_listingsConstants__ = __webpack_require__(/*! ../constants/listingsConstants */ 295);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return $$listingsInitialState; });\nvar _handlers;\n\nfunction _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\n\n\n\n\n\n\nvar $$listingsInitialState = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0_immutable__["fromJS"])({\n entities: {}\n});\n\nvar updateFavorite = function updateFavorite(listing, favorited) {\n return {\n favorited: favorited,\n favoritesCount: favorited ? listing.get(\'favoritesCount\') + 1 : listing.get(\'favoritesCount\') - 1\n };\n};\n\nvar setListingFavorited = __WEBPACK_IMPORTED_MODULE_1_lodash_fp___default.a.curry(function (value, $$state, action) {\n return $$state.updateIn([\'entities\', action.listingId], function (listing) {\n return listing.merge(updateFavorite(listing, value));\n });\n});\n\nvar handlers = (_handlers = {}, _defineProperty(_handlers, __WEBPACK_IMPORTED_MODULE_3__constants_listingsConstants__["a" /* default */].LISTINGS__FAVORITE_REQUESTED, setListingFavorited(true)), _defineProperty(_handlers, __WEBPACK_IMPORTED_MODULE_3__constants_listingsConstants__["a" /* default */].LISTINGS__FAVORITE_FAILED, setListingFavorited(false)), _defineProperty(_handlers, __WEBPACK_IMPORTED_MODULE_3__constants_listingsConstants__["a" /* default */].LISTINGS__UNFAVORITE_REQUESTED, setListingFavorited(false)), _defineProperty(_handlers, __WEBPACK_IMPORTED_MODULE_3__constants_listingsConstants__["a" /* default */].LISTINGS__UNFAVORITE_FAILED, setListingFavorited(true)), _handlers);\n\n/* harmony default export */ __webpack_exports__["a"] = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__libs_utils_redux_reducers_common__["a" /* createReducer */])($$listingsInitialState, handlers));\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/users-show/reducers/listingsReducer.js\n// module id = 731\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/users-show/reducers/listingsReducer.js?', + ); + + /***/ + }, + /* 732 */ + /* exports provided: $$userInitialState, default */ + /* exports used: default, $$userInitialState */ + /*!********************************************************!*\ + !*** ./app/bundles/users-show/reducers/userReducer.js ***! + \********************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_immutable__ = __webpack_require__(/*! immutable */ 26);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_immutable___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_immutable__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__libs_utils_redux_reducers_common__ = __webpack_require__(/*! ../../../libs/utils/redux/reducers/common */ 142);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return $$userInitialState; });\n\n\n\nvar $$userInitialState = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0_immutable__["Map"])();\n\nvar handlers = {};\n\n/* harmony default export */ __webpack_exports__["a"] = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__libs_utils_redux_reducers_common__["a" /* createReducer */])($$userInitialState, handlers));\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/users-show/reducers/userReducer.js\n// module id = 732\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/users-show/reducers/userReducer.js?', + ); + + /***/ + }, + /* 733 */ + /* exports provided: apiPaths, default */ + /* exports used: apiPaths */ + /*!********************************************************!*\ + !*** ./app/bundles/users-show/routes/listingsPaths.js ***! + \********************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return apiPaths; });\nvar apiPaths = {\n favoriteListingPath: function favoriteListingPath(listingId) {\n return "/listings/" + listingId + "/favorites";\n }\n};\n\n/* unused harmony default export */ var _unused_webpack_default_export = ({ apiPaths: apiPaths });\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/users-show/routes/listingsPaths.js\n// module id = 733\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/users-show/routes/listingsPaths.js?', + ); + + /***/ + }, + /* 734 */ + /* exports provided: paths, default */ + /* exports used: paths */ + /*!*****************************************************!*\ + !*** ./app/bundles/users-show/routes/usersPaths.js ***! + \*****************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return paths; });\nvar paths = {\n editUserPath: function editUserPath(userId) {\n return "/users/" + userId + "/edit";\n }\n};\n\n/* unused harmony default export */ var _unused_webpack_default_export = ({ paths: paths });\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/users-show/routes/usersPaths.js\n// module id = 734\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/users-show/routes/usersPaths.js?', + ); + + /***/ + }, + /* 735 */ + /* exports provided: default */ + /* exports used: default */ + /*!*************************************************!*\ + !*** ./app/bundles/users-show/schemas/index.js ***! + \*************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_normalizr__ = __webpack_require__(/*! normalizr */ 230);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_normalizr___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_normalizr__);\n\n\nvar listing = new __WEBPACK_IMPORTED_MODULE_0_normalizr__["schema"].Entity(\'listings\');\n\n/* harmony default export */ __webpack_exports__["a"] = ({\n listing: listing\n});\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/users-show/schemas/index.js\n// module id = 735\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/users-show/schemas/index.js?', + ); + + /***/ + }, + /* 736 */ + /* exports provided: default */ + /* exports used: default */ + /*!*****************************************************************!*\ + !*** ./app/bundles/users-show/selectors/userProfileSelector.js ***! + \*****************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_reselect__ = __webpack_require__(/*! reselect */ 103);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_reselect___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_reselect__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_immutable__ = __webpack_require__(/*! immutable */ 26);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_immutable___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_immutable__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_fp__ = __webpack_require__(/*! lodash/fp */ 14);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_fp___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_lodash_fp__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__libs_utils_selectors_creators__ = __webpack_require__(/*! ../../../libs/utils/selectors/creators */ 90);\n\n\n\n\n\n\nvar listingsStoreSelector = function listingsStoreSelector(state) {\n return state.$$listingsStore;\n};\nvar userStoreSelector = function userStoreSelector(state) {\n return state.$$userStore;\n};\nvar currentUserStoreSelector = function currentUserStoreSelector(state) {\n return state.$$currentUserStore;\n};\n\nfunction selectListings($$listingsStore) {\n return $$listingsStore.get(\'index\').map(function (listingId) {\n return $$listingsStore.getIn([\'entities\', listingId]);\n }).sortBy(function ($$listing) {\n return $$listing.get(\'title\');\n }).toJS();\n}\n\nfunction selectUser($$userStore) {\n return $$userStore.toJS();\n}\n\nfunction selectCurrentUser($$currentUserStore) {\n return $$currentUserStore.toJS();\n}\n\nvar listingsSelector = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__libs_utils_selectors_creators__["a" /* createCommonSelector */])(listingsStoreSelector, selectListings);\nvar userSelector = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__libs_utils_selectors_creators__["a" /* createCommonSelector */])(userStoreSelector, selectUser);\nvar isCurrentUserSignedInSelector = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__libs_utils_selectors_creators__["a" /* createCommonSelector */])(currentUserStoreSelector, __WEBPACK_IMPORTED_MODULE_2_lodash_fp___default.a.flow(selectCurrentUser, __WEBPACK_IMPORTED_MODULE_2_lodash_fp___default.a.has(\'id\')));\n\n/* harmony default export */ __webpack_exports__["a"] = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0_reselect__["createStructuredSelector"])({\n listings: listingsSelector,\n user: userSelector,\n isCurrentUserSignedIn: isCurrentUserSignedInSelector\n}));\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/users-show/selectors/userProfileSelector.js\n// module id = 736\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/users-show/selectors/userProfileSelector.js?', + ); + + /***/ + }, + /* 737 */ + /* exports provided: reducers, default */ + /* exports used: default, reducers */ + /*!*************************************************************!*\ + !*** ./app/bundles/users-show/store/composeInitialState.js ***! + \*************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__libs_utils_normalizr__ = __webpack_require__(/*! ../../../libs/utils/normalizr */ 891);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__reducers_listingsReducer__ = __webpack_require__(/*! ../reducers/listingsReducer */ 731);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__reducers_userReducer__ = __webpack_require__(/*! ../reducers/userReducer */ 732);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__reducers_currentUserReducer__ = __webpack_require__(/*! ../reducers/currentUserReducer */ 730);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__schemas__ = __webpack_require__(/*! ../schemas */ 735);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return reducers; });\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\n\n\n\n\n\n\n\nvar reducers = {\n $$listingsStore: __WEBPACK_IMPORTED_MODULE_1__reducers_listingsReducer__["a" /* default */],\n $$userStore: __WEBPACK_IMPORTED_MODULE_2__reducers_userReducer__["a" /* default */],\n $$currentUserStore: __WEBPACK_IMPORTED_MODULE_3__reducers_currentUserReducer__["a" /* default */]\n};\n\nfunction composeInitialState(props) {\n var _normalize = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__libs_utils_normalizr__["a" /* normalize */])(props.profileUser.listings, new __WEBPACK_IMPORTED_MODULE_0__libs_utils_normalizr__["b" /* schema */].Array(__WEBPACK_IMPORTED_MODULE_4__schemas__["a" /* default */].listing)),\n entities = _normalize.entities,\n result = _normalize.result;\n\n var _entities$listings = entities.listings,\n listings = _entities$listings === undefined ? {} : _entities$listings;\n\n\n return {\n $$listingsStore: __WEBPACK_IMPORTED_MODULE_1__reducers_listingsReducer__["b" /* $$listingsInitialState */].mergeDeep({ index: result, entities: listings }),\n $$userStore: __WEBPACK_IMPORTED_MODULE_2__reducers_userReducer__["b" /* $$userInitialState */].mergeDeep(_extends({}, props.profileUser)),\n $$currentUserStore: __WEBPACK_IMPORTED_MODULE_3__reducers_currentUserReducer__["b" /* $$currentUserInitialState */].mergeDeep(_extends({}, props.user))\n };\n}\n\n/* harmony default export */ __webpack_exports__["a"] = (composeInitialState);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/users-show/store/composeInitialState.js\n// module id = 737\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/users-show/store/composeInitialState.js?', + ); + + /***/ + }, + /* 738 */ + /* exports provided: default */ + /* exports used: default */ + /*!**********************************************************!*\ + !*** ./app/bundles/users-show/store/createStoreParts.js ***! + \**********************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_redux_thunk__ = __webpack_require__(/*! redux-thunk */ 1483);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_redux_thunk___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_redux_thunk__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__libs_utils_redux_middlewares_apiErrors__ = __webpack_require__(/*! ../../../libs/utils/redux/middlewares/apiErrors */ 193);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__libs_utils_createStoreParts__ = __webpack_require__(/*! ../../../libs/utils/createStoreParts */ 888);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__composeInitialState__ = __webpack_require__(/*! ./composeInitialState */ 737);\n\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__["a"] = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__libs_utils_createStoreParts__["a" /* default */])({\n composeInitialState: __WEBPACK_IMPORTED_MODULE_3__composeInitialState__["a" /* default */],\n reducers: __WEBPACK_IMPORTED_MODULE_3__composeInitialState__["b" /* reducers */],\n bundle: \'users-show-client-bundle\',\n middlewares: [__WEBPACK_IMPORTED_MODULE_0_redux_thunk___default.a, __WEBPACK_IMPORTED_MODULE_1__libs_utils_redux_middlewares_apiErrors__["b" /* default */]]\n}));\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/users-show/store/createStoreParts.js\n// module id = 738\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/users-show/store/createStoreParts.js?', + ); + + /***/ + }, + /* 739 */ + /* exports provided: default */ + /* exports used: default */ + /*!**************************************!*\ + !*** ./app/enums/AmenityCategory.js ***! + \**************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__libs_utils_Enum__ = __webpack_require__(/*! ../libs/utils/Enum */ 22);\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (new __WEBPACK_IMPORTED_MODULE_0__libs_utils_Enum__[\"a\" /* default */]({\n COMMON: {\n value: 'common',\n label: '',\n position: 1\n },\n SPACES: {\n value: 'spaces',\n label: 'Spaces Guests Can Use',\n position: 2\n },\n SAFETY: {\n value: 'safety',\n label: 'Safety Amenities',\n position: 3\n },\n GOOD_FOR: {\n value: 'good_for',\n label: 'Place is Good For',\n position: 4\n }\n}));\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/enums/AmenityCategory.js\n// module id = 739\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/enums/AmenityCategory.js?", + ); + + /***/ + }, + /* 740 */ + /* exports provided: default */ + /* exports used: default */ + /*!*************************************!*\ + !*** ./app/enums/CommonConstant.js ***! + \*************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__libs_utils_Enum__ = __webpack_require__(/*! ../libs/utils/Enum */ 22);\n\n\n/* harmony default export */ __webpack_exports__["a"] = (new __WEBPACK_IMPORTED_MODULE_0__libs_utils_Enum__["a" /* default */]({\n NEW_ENTITY_ID: \'new\',\n NEW_ENTITY_ID_DELIMITER: \'_\'\n}));\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/enums/CommonConstant.js\n// module id = 740\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/enums/CommonConstant.js?', + ); + + /***/ + }, + /* 741 */ + /* exports provided: default */ + /* exports used: default */ + /*!**************************************!*\ + !*** ./app/enums/ListingViewMode.js ***! + \**************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__libs_utils_Enum__ = __webpack_require__(/*! ../libs/utils/Enum */ 22);\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (new __WEBPACK_IMPORTED_MODULE_0__libs_utils_Enum__[\"a\" /* default */]({\n EDIT: 'edit',\n PREVIEW: 'preview',\n LIVE: 'live'\n}));\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/enums/ListingViewMode.js\n// module id = 741\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/enums/ListingViewMode.js?", + ); + + /***/ + }, + /* 742 */ + /* exports provided: default */ + /* exports used: default */ + /*!*************************************************!*\ + !*** ./app/enums/ListingsFilterCategoryType.js ***! + \*************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__libs_utils_Enum__ = __webpack_require__(/*! ../libs/utils/Enum */ 22);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__RoomType__ = __webpack_require__(/*! ./RoomType */ 70);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__RelationshipType__ = __webpack_require__(/*! ./RelationshipType */ 87);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Amenity__ = __webpack_require__(/*! ./Amenity */ 135);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__ListingFilters__ = __webpack_require__(/*! ./ListingFilters */ 184);\n\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__["a"] = (new __WEBPACK_IMPORTED_MODULE_0__libs_utils_Enum__["a" /* default */]({\n ROOM_TYPES: {\n label: \'Room Type\',\n value: __WEBPACK_IMPORTED_MODULE_4__ListingFilters__["a" /* default */].ROOM_TYPES.value,\n enum: __WEBPACK_IMPORTED_MODULE_1__RoomType__["a" /* default */],\n filters: [__WEBPACK_IMPORTED_MODULE_4__ListingFilters__["a" /* default */].ROOM_TYPES]\n },\n RELATIONSHIP_TYPE: {\n label: \'Relationship\',\n value: __WEBPACK_IMPORTED_MODULE_4__ListingFilters__["a" /* default */].RELATIONSHIP_TYPE.value,\n enum: __WEBPACK_IMPORTED_MODULE_2__RelationshipType__["a" /* default */],\n filters: [__WEBPACK_IMPORTED_MODULE_4__ListingFilters__["a" /* default */].RELATIONSHIP_TYPE]\n },\n PRICE: {\n label: \'Price\',\n value: __WEBPACK_IMPORTED_MODULE_4__ListingFilters__["a" /* default */].PRICE.value,\n enum: __WEBPACK_IMPORTED_MODULE_2__RelationshipType__["a" /* default */],\n filters: [__WEBPACK_IMPORTED_MODULE_4__ListingFilters__["a" /* default */].PRICE]\n },\n AMENITY_IDS: {\n label: \'Amenities\',\n value: __WEBPACK_IMPORTED_MODULE_4__ListingFilters__["a" /* default */].AMENITY_IDS.value,\n enum: __WEBPACK_IMPORTED_MODULE_3__Amenity__["a" /* default */],\n filters: [__WEBPACK_IMPORTED_MODULE_4__ListingFilters__["a" /* default */].AMENITY_IDS]\n },\n SIZE: {\n label: \'Size\',\n value: \'size\',\n filters: [__WEBPACK_IMPORTED_MODULE_4__ListingFilters__["a" /* default */].BEDROOMS, __WEBPACK_IMPORTED_MODULE_4__ListingFilters__["a" /* default */].BATHROOMS, __WEBPACK_IMPORTED_MODULE_4__ListingFilters__["a" /* default */].BEDS]\n },\n GUESTS: {\n label: \'Guests\',\n value: \'guests\',\n filters: [__WEBPACK_IMPORTED_MODULE_4__ListingFilters__["a" /* default */].GUESTS]\n }\n\n}));\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/enums/ListingsFilterCategoryType.js\n// module id = 742\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/enums/ListingsFilterCategoryType.js?', + ); + + /***/ + }, + /* 743 */ + /* exports provided: default */ + /* exports used: default */ + /*!*********************************!*\ + !*** ./app/enums/PhotoRatio.js ***! + \*********************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__libs_utils_Enum__ = __webpack_require__(/*! ../libs/utils/Enum */ 22);\n\n\n/* harmony default export */ __webpack_exports__["a"] = (new __WEBPACK_IMPORTED_MODULE_0__libs_utils_Enum__["a" /* default */]({\n LISTING_RESULTS_TILE: 1.5\n}));\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/enums/PhotoRatio.js\n// module id = 743\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/enums/PhotoRatio.js?', + ); + + /***/ + }, + /* 744 */ + /* exports provided: default */ + /* exports used: default */ + /*!**************************************!*\ + !*** ./app/enums/SystemHouseRule.js ***! + \**************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__libs_utils_Enum__ = __webpack_require__(/*! ../libs/utils/Enum */ 22);\n/* eslint max-len: 0 */\n\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (new __WEBPACK_IMPORTED_MODULE_0__libs_utils_Enum__[\"a\" /* default */]({\n CHILD_FRIENDLY: {\n value: 'Child-friendly (3-12) years',\n allowedPhrase: 'Child-friendly (3-12 years)',\n forbiddenPhrase: 'No children (3-12 years)',\n disclaimer: 'Saying “Yes” to child-friendly means that your place can accommodate these younger travelers. You don’t have to provide special amenities or gear for children.'\n },\n INFANT_FRIENDLY: {\n value: 'Infant-friendly (0-2) years',\n allowedPhrase: 'Infant-friendly (0-2 years)',\n forbiddenPhrase: 'No infants (0-2 years)',\n disclaimer: 'Saying “Yes” to infant-friendly means that your place can accommodate these younger travelers. You don’t have to provide special amenities or gear for children.'\n },\n PETS_FRIENDLY: {\n value: 'Suitable for pets',\n allowedPhrase: 'Suitable for pets',\n forbiddenPhrase: 'Not suitable for pets'\n },\n SMOKERS_FRIENDLY: {\n value: 'Smoking allowed',\n allowedPhrase: 'Smoking allowed',\n forbiddenPhrase: 'No smoking'\n },\n EVENTS_FRIENDLY: {\n value: 'Events or parties allowed',\n allowedPhrase: 'Events or parties allowed',\n forbiddenPhrase: 'No events or parties'\n }\n}));\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/enums/SystemHouseRule.js\n// module id = 744\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/enums/SystemHouseRule.js?", + ); + + /***/ + }, + /* 745 */ + /* exports provided: default */ + /* exports used: default */ + /*!********************************************!*\ + !*** ./app/enums/SystemHouseRuleStatus.js ***! + \********************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__libs_utils_Enum__ = __webpack_require__(/*! ../libs/utils/Enum */ 22);\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (new __WEBPACK_IMPORTED_MODULE_0__libs_utils_Enum__[\"a\" /* default */]({\n YES: 'yes',\n NO: 'no',\n UNSPECIFIED: 'unspecified'\n}));\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/enums/SystemHouseRuleStatus.js\n// module id = 745\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/enums/SystemHouseRuleStatus.js?", + ); + + /***/ + }, + /* 746 */ + /* exports provided: default */ + /* exports used: default */ + /*!************************************!*\ + !*** ./app/libs/amenitiesUtils.js ***! + \************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash__ = __webpack_require__(/*! lodash */ 19);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_lodash__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__enums_Amenity__ = __webpack_require__(/*! ../enums/Amenity */ 135);\n\n\n\n\n/* harmony default export */ __webpack_exports__["a"] = ({\n getCategoryAmenities: function getCategoryAmenities($$listingAmenities, category) {\n return $$listingAmenities.filter(function (v) {\n return v && v.get(\'category\') === category;\n });\n },\n getSortedAmenities: function getSortedAmenities() {\n return __WEBPACK_IMPORTED_MODULE_0_lodash___default.a.sortBy(__WEBPACK_IMPORTED_MODULE_1__enums_Amenity__["a" /* default */].items(), function (amenity) {\n return amenity.label;\n });\n }\n});\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/amenitiesUtils.js\n// module id = 746\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/amenitiesUtils.js?', + ); + + /***/ + }, + /* 747 */ + /* exports provided: default */ + /*!*********************************************!*\ + !*** ./app/libs/components/Alert/Alert.jsx ***! + \*********************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_classnames__);\n\n\n\nvar Alert = function Alert(props) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()('alert', 'alert-' + props.type, props.className) },\n props.children\n );\n};\n\nAlert.propTypes = {\n children: __webpack_require__(/*! prop-types */ 0).any,\n className: __webpack_require__(/*! prop-types */ 0).string,\n type: __webpack_require__(/*! prop-types */ 0).oneOf(['info', 'warning', 'danger', 'success']).isRequired\n};\n/* unused harmony default export */ var _unused_webpack_default_export = (Alert);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/Alert/Alert.jsx\n// module id = 747\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/Alert/Alert.jsx?", + ); + + /***/ + }, + /* 748 */ + /* exports provided: default */ + /* exports used: default */ + /*!*******************************************************!*\ + !*** ./app/libs/components/ButtonLike/ButtonLike.jsx ***! + \*******************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__ButtonLike_scss__ = __webpack_require__(/*! ./ButtonLike.scss */ 1037);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__ButtonLike_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__ButtonLike_scss__);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _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\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\n\n\n\nvar babelPluginFlowReactPropTypes_proptype_OnClick = __webpack_require__(/*! ../../../types */ 4).babelPluginFlowReactPropTypes_proptype_OnClick || __webpack_require__(/*! react */ 1).PropTypes.any;\n\n\n\n/**\n * @desc This component is intended to render custom UI element,\n * which needs functionality of <button />\n * (focus on Tab, fire onClick handler on Enter/Space key press etc),\n * but has its own custom look.\n *\n */\n\n\nvar ButtonLike = function ButtonLike(_ref) {\n var className = _ref.className,\n inverted = _ref.inverted,\n onClick = _ref.onClick,\n setRef = _ref.setRef,\n otherProps = _objectWithoutProperties(_ref, ['className', 'inverted', 'onClick', 'setRef']);\n\n var domNode = void 0;\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('button', _extends({}, otherProps, {\n type: 'button',\n className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()(__WEBPACK_IMPORTED_MODULE_2__ButtonLike_scss___default.a.button, className, _defineProperty({}, __WEBPACK_IMPORTED_MODULE_2__ButtonLike_scss___default.a.inverted, inverted)),\n ref: function (_ref2) {\n function ref(_x) {\n return _ref2.apply(this, arguments);\n }\n\n ref.toString = function () {\n return _ref2.toString();\n };\n\n return ref;\n }(function (ref) {\n domNode = ref;\n if (setRef) setRef(ref);\n }),\n onClick: function (_onClick) {\n function onClick(_x2) {\n return _onClick.apply(this, arguments);\n }\n\n onClick.toString = function () {\n return _onClick.toString();\n };\n\n return onClick;\n }(function (event) {\n if (onClick) onClick(event);\n domNode.blur(); // Getting rid of focus outline after the click\n })\n }));\n};\n\nButtonLike.propTypes = {\n className: __webpack_require__(/*! prop-types */ 0).string,\n inverted: __webpack_require__(/*! prop-types */ 0).bool,\n onClick: babelPluginFlowReactPropTypes_proptype_OnClick,\n setRef: __webpack_require__(/*! prop-types */ 0).func\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (ButtonLike);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/ButtonLike/ButtonLike.jsx\n// module id = 748\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/ButtonLike/ButtonLike.jsx?", + ); + + /***/ + }, + /* 749 */ + /* exports provided: calculateBreakpoint, default */ + /* exports used: default */ + /*!***************************************************************************!*\ + !*** ./app/libs/components/CalculatedBreakpoint/CalculatedBreakpoint.jsx ***! + \***************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_measure__ = __webpack_require__(/*! react-measure */ 1422);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_measure___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react_measure__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_fp__ = __webpack_require__(/*! lodash/fp */ 14);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_fp___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_lodash_fp__);\n/* unused harmony export calculateBreakpoint */\nfunction _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }\n\n\n\n\n\nvar BREAKPOINTS = [150, 320, 360, 480, 600, 800, 900, 1000, 1140, 1300, 1440, 1800, 2200, 2500];\n\nvar calculateBreakpoint = function calculateBreakpoint(dimension) {\n return BREAKPOINTS.find(function (breakpoint) {\n return breakpoint >= dimension;\n }) || __WEBPACK_IMPORTED_MODULE_2_lodash_fp___default.a.last(BREAKPOINTS);\n};\n\nvar getBreakpoints = function getBreakpoints(dimensions) {\n return [calculateBreakpoint(dimensions.width), calculateBreakpoint(dimensions.height)];\n};\n\nvar CalculatedBreakpoint = function CalculatedBreakpoint(props) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_1_react_measure___default.a,\n { whitelist: ['width', 'height'] },\n function (dimensions\n // $FlowFixMe\n ) {\n return props.children.apply(props, _toConsumableArray(getBreakpoints(dimensions)));\n }\n );\n};\n\nCalculatedBreakpoint.propTypes = {\n children: __webpack_require__(/*! prop-types */ 0).func\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (CalculatedBreakpoint);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/CalculatedBreakpoint/CalculatedBreakpoint.jsx\n// module id = 749\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/CalculatedBreakpoint/CalculatedBreakpoint.jsx?", + ); + + /***/ + }, + /* 750 */ + /* exports provided: default */ + /* exports used: default */ + /*!*************************************************************************!*\ + !*** ./app/libs/components/CallToActionSection/CallToActionSection.jsx ***! + \*************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2____ = __webpack_require__(/*! .. */ 11);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__CallToActionSection_scss__ = __webpack_require__(/*! ./CallToActionSection.scss */ 1038);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__CallToActionSection_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__CallToActionSection_scss__);\n\n\n\n\n\n\n\nvar CallToActionSection = function CallToActionSection(_ref) {\n var title = _ref.title,\n description = _ref.description,\n buttonUrl = _ref.buttonUrl,\n buttonText = _ref.buttonText;\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'section',\n { className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()('container', __WEBPACK_IMPORTED_MODULE_3__CallToActionSection_scss___default.a.CallToActionSection) },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'h2',\n { className: __WEBPACK_IMPORTED_MODULE_3__CallToActionSection_scss___default.a.title },\n title\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'p',\n { className: __WEBPACK_IMPORTED_MODULE_3__CallToActionSection_scss___default.a.description },\n description\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_2____[\"c\" /* Button */],\n { size: 'xl', asNativeLink: true, href: buttonUrl, orange: true },\n buttonText\n )\n );\n};\n\nCallToActionSection.propTypes = {\n title: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n description: __webpack_require__(/*! prop-types */ 0).any.isRequired,\n buttonUrl: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n buttonText: __webpack_require__(/*! prop-types */ 0).string.isRequired\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (CallToActionSection);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/CallToActionSection/CallToActionSection.jsx\n// module id = 750\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/CallToActionSection/CallToActionSection.jsx?", + ); + + /***/ + }, + /* 751 */ + /* exports provided: default */ + /* exports used: default */ + /*!*********************************************************************!*\ + !*** ./app/libs/components/CallToActionStrip/CallToActionStrip.jsx ***! + \*********************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Button_Button__ = __webpack_require__(/*! ../Button/Button */ 299);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__CallToActionStrip_scss__ = __webpack_require__(/*! ./CallToActionStrip.scss */ 1039);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__CallToActionStrip_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__CallToActionStrip_scss__);\n\n\n\n\n\n\nvar CallToActionStrip = function CallToActionStrip(props) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'section',\n { className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()(__WEBPACK_IMPORTED_MODULE_3__CallToActionStrip_scss___default.a.CallToActionStrip, props.className) },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()('container', __WEBPACK_IMPORTED_MODULE_3__CallToActionStrip_scss___default.a.innerCta) },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'h2',\n { className: __WEBPACK_IMPORTED_MODULE_3__CallToActionStrip_scss___default.a.text },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'span',\n { className: __WEBPACK_IMPORTED_MODULE_3__CallToActionStrip_scss___default.a.textStrong },\n props.textStrong\n ),\n '\\xA0',\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'span',\n { className: __WEBPACK_IMPORTED_MODULE_3__CallToActionStrip_scss___default.a.textMedium },\n props.textMedium\n )\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_2__Button_Button__[\"a\" /* default */],\n { size: 'lg', asNativeLink: true, href: props.buttonUrl, className: __WEBPACK_IMPORTED_MODULE_3__CallToActionStrip_scss___default.a.button },\n 'Learn More'\n )\n )\n );\n};\n\nCallToActionStrip.propTypes = {\n className: __webpack_require__(/*! prop-types */ 0).string,\n textStrong: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n textMedium: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n buttonUrl: __webpack_require__(/*! prop-types */ 0).string.isRequired\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (CallToActionStrip);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/CallToActionStrip/CallToActionStrip.jsx\n// module id = 751\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/CallToActionStrip/CallToActionStrip.jsx?", + ); + + /***/ + }, + /* 752 */ + /* exports provided: default */ + /*!*********************************************************!*\ + !*** ./app/libs/components/CloseButton/CloseButton.jsx ***! + \*********************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_classnames__);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\n\n\n\n\nvar CloseButton = function CloseButton(_ref) {\n var ariaLabel = _ref.ariaLabel,\n className = _ref.className,\n handleClick = _ref.handleClick,\n otherProps = _objectWithoutProperties(_ref, ['ariaLabel', 'className', 'handleClick']);\n\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'button',\n _extends({\n 'aria-label': ariaLabel,\n className: __WEBPACK_IMPORTED_MODULE_2_classnames___default()(className, 'close'),\n onClick: handleClick,\n type: 'button'\n }, otherProps),\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'span',\n { 'aria-hidden': true },\n '\\xD7'\n )\n );\n};\n\nCloseButton.propTypes = {\n ariaLabel: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string,\n className: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string,\n handleClick: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func\n};\n\nCloseButton.defaultProps = {\n ariaLabel: 'Close'\n};\n\n/* unused harmony default export */ var _unused_webpack_default_export = (CloseButton);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/CloseButton/CloseButton.jsx\n// module id = 752\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/CloseButton/CloseButton.jsx?", + ); + + /***/ + }, + /* 753 */ + /* exports provided: default */ + /*!***************************************************************!*\ + !*** ./app/libs/components/CloseModalIcon/CloseModalIcon.jsx ***! + \***************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__icons_IconClose__ = __webpack_require__(/*! ../icons/IconClose */ 139);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__CloseModalIcon_scss__ = __webpack_require__(/*! ./CloseModalIcon.scss */ 1040);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__CloseModalIcon_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__CloseModalIcon_scss__);\n\n\n\n\n\n\n\nvar CloseModalIcon = function CloseModalIcon(_ref) {\n var handleClose = _ref.handleClose,\n id = _ref.id;\n return (\n // FIXME: Remove this component as this is handled inside `<Modal />`\n // eslint-disable-next-line jsx-a11y/no-static-element-interactions\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_3__CloseModalIcon_scss___default.a.wrapper, onClick: handleClose, id: id },\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2__icons_IconClose__[\"a\" /* default */], { id: 'close-modal-icon', className: __WEBPACK_IMPORTED_MODULE_3__CloseModalIcon_scss___default.a.icon }),\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_3__CloseModalIcon_scss___default.a.text },\n 'Close'\n )\n )\n );\n};\n\nCloseModalIcon.propTypes = {\n handleClose: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired,\n id: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string\n};\n\n/* unused harmony default export */ var _unused_webpack_default_export = (CloseModalIcon);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/CloseModalIcon/CloseModalIcon.jsx\n// module id = 753\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/CloseModalIcon/CloseModalIcon.jsx?", + ); + + /***/ + }, + /* 754 */ + /* exports provided: default */ + /* exports used: default */ + /*!***********************************************************!*\ + !*** ./app/libs/components/ConfirmModal/ConfirmModal.jsx ***! + \***********************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__ConfirmModal_scss__ = __webpack_require__(/*! ./ConfirmModal.scss */ 1041);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__ConfirmModal_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__ConfirmModal_scss__);\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _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\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\n\n\n\n\n\nvar ConfirmModal = function (_React$Component) {\n _inherits(ConfirmModal, _React$Component);\n\n function ConfirmModal() {\n _classCallCheck(this, ConfirmModal);\n\n return _possibleConstructorReturn(this, (ConfirmModal.__proto__ || Object.getPrototypeOf(ConfirmModal)).apply(this, arguments));\n }\n\n _createClass(ConfirmModal, [{\n key: 'renderButtons',\n value: function renderButtons() {\n var isForm = this.props.isForm;\n\n\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_2_classnames___default()('modal-footer', __WEBPACK_IMPORTED_MODULE_3__ConfirmModal_scss___default.a.modalFooter) },\n isForm ? this.renderOkButton() : this.renderCancelButton(),\n isForm ? this.renderCancelButton() : this.renderOkButton()\n );\n }\n }, {\n key: 'renderOkButton',\n value: function renderOkButton() {\n var _props = this.props,\n okLabel = _props.okLabel,\n okHandler = _props.okHandler,\n danger = _props.danger;\n\n var buttonType = danger ? 'btn-danger' : 'btn-primary';\n\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'button',\n { type: 'button', className: __WEBPACK_IMPORTED_MODULE_2_classnames___default()('btn', buttonType), onClick: okHandler },\n okLabel || 'Ok'\n );\n }\n }, {\n key: 'renderCancelButton',\n value: function renderCancelButton() {\n var _props2 = this.props,\n cancelLabel = _props2.cancelLabel,\n cancelHandler = _props2.cancelHandler;\n\n\n return cancelHandler && __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'button',\n { type: 'button', className: 'btn btn-default', onClick: cancelHandler },\n cancelLabel || 'Cancel'\n );\n }\n }, {\n key: 'render',\n value: function render() {\n var _props3 = this.props,\n title = _props3.title,\n isForm = _props3.isForm,\n okHandler = _props3.okHandler,\n cancelHandler = _props3.cancelHandler;\n\n\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n { role: 'dialog', tabIndex: '-1', className: __WEBPACK_IMPORTED_MODULE_2_classnames___default()('modal', __WEBPACK_IMPORTED_MODULE_3__ConfirmModal_scss___default.a.modal) },\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n { role: 'document', className: __WEBPACK_IMPORTED_MODULE_2_classnames___default()('modal-dialog', _defineProperty({}, __WEBPACK_IMPORTED_MODULE_3__ConfirmModal_scss___default.a.isForm, isForm)) },\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n { className: 'modal-content' },\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n { className: 'modal-header' },\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'button',\n { type: 'button', className: 'close', onClick: cancelHandler || okHandler },\n '\\xD7'\n ),\n title && __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'h4',\n { className: 'modal-title' },\n title\n )\n ),\n this.props.children && __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n { className: 'modal-body' },\n this.props.children\n ),\n this.renderButtons()\n )\n )\n );\n }\n }]);\n\n return ConfirmModal;\n}(__WEBPACK_IMPORTED_MODULE_1_react___default.a.Component);\n\nConfirmModal.propTypes = {\n isForm: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.bool,\n danger: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.bool,\n okHandler: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired,\n cancelHandler: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func,\n okLabel: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string,\n cancelLabel: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string,\n title: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string,\n children: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.any\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (ConfirmModal);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/ConfirmModal/ConfirmModal.jsx\n// module id = 754\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/ConfirmModal/ConfirmModal.jsx?", + ); + + /***/ + }, + /* 755 */ + /* exports provided: default */ + /*!*****************************************************************!*\ + !*** ./app/libs/components/CopyToClipboard/CopyToClipboard.jsx ***! + \*****************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_clipboard__ = __webpack_require__(/*! clipboard */ 905);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_clipboard___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_clipboard__);\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\n\n\nvar CopyToClipboard = function (_Component) {\n _inherits(CopyToClipboard, _Component);\n\n function CopyToClipboard() {\n var _ref;\n\n var _temp, _this, _ret;\n\n _classCallCheck(this, CopyToClipboard);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = CopyToClipboard.__proto__ || Object.getPrototypeOf(CopyToClipboard)).call.apply(_ref, [this].concat(args))), _this), _this.setButtonRef = function (ref) {\n _this.button = ref;\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n _createClass(CopyToClipboard, [{\n key: \'componentDidMount\',\n value: function componentDidMount() {\n this.clipboard = new __WEBPACK_IMPORTED_MODULE_1_clipboard___default.a(this.button);\n\n this.clipboard.on(\'success\', this.props.onSuccess);\n this.clipboard.on(\'error\', this.props.onFailure);\n }\n }, {\n key: \'componentWillUnmount\',\n value: function componentWillUnmount() {\n this.clipboard.destroy();\n }\n }, {\n key: \'render\',\n value: function render() {\n var _props = this.props,\n value = _props.value,\n children = _props.children;\n\n\n return children && children({\n \'data-clipboard-text\': value,\n setButtonRef: this.setButtonRef,\n // To pass required by Flow handler\n onClick: function onClick(noop) {\n return noop;\n }\n });\n }\n }]);\n\n return CopyToClipboard;\n}(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]);\n\nCopyToClipboard.propTypes = {\n value: __webpack_require__(/*! prop-types */ 0).string,\n children: __webpack_require__(/*! prop-types */ 0).func,\n onSuccess: __webpack_require__(/*! prop-types */ 0).func.isRequired,\n onFailure: __webpack_require__(/*! prop-types */ 0).func.isRequired\n};\n/* unused harmony default export */ var _unused_webpack_default_export = (CopyToClipboard);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/CopyToClipboard/CopyToClipboard.jsx\n// module id = 755\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/CopyToClipboard/CopyToClipboard.jsx?', + ); + + /***/ + }, + /* 756 */ + /* exports provided: default */ + /* exports used: default */ + /*!***************************************************************!*\ + !*** ./app/libs/components/DataTable/ActionBar/ActionBar.jsx ***! + \***************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2____ = __webpack_require__(/*! ../.. */ 11);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__icons_IconClose__ = __webpack_require__(/*! ../../icons/IconClose */ 139);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__ActionBar_scss__ = __webpack_require__(/*! ./ActionBar.scss */ 1042);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__ActionBar_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__ActionBar_scss__);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\n\n\n\n\n\n\n\n\nvar ActionBar = function ActionBar(_ref) {\n var className = _ref.className,\n isVisible = _ref.isVisible,\n handleClose = _ref.handleClose,\n children = _ref.children,\n otherProps = _objectWithoutProperties(_ref, ['className', 'isVisible', 'handleClose', 'children']);\n\n return !isVisible ? __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div', { className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()(__WEBPACK_IMPORTED_MODULE_4__ActionBar_scss___default.a.wrapper, __WEBPACK_IMPORTED_MODULE_4__ActionBar_scss___default.a.hidden) }) : __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()(__WEBPACK_IMPORTED_MODULE_4__ActionBar_scss___default.a.wrapper, __WEBPACK_IMPORTED_MODULE_4__ActionBar_scss___default.a.visible) },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()('container', __WEBPACK_IMPORTED_MODULE_4__ActionBar_scss___default.a.container) },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n _extends({ className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()(__WEBPACK_IMPORTED_MODULE_4__ActionBar_scss___default.a.children, className) }, otherProps),\n children\n ),\n handleClose && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_2____[\"k\" /* ButtonLike */],\n { className: __WEBPACK_IMPORTED_MODULE_4__ActionBar_scss___default.a.closeButton, onClick: handleClose },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3__icons_IconClose__[\"a\" /* default */], { className: __WEBPACK_IMPORTED_MODULE_4__ActionBar_scss___default.a.closeIcon })\n )\n )\n );\n};\n\nActionBar.propTypes = {\n className: __webpack_require__(/*! prop-types */ 0).string,\n isVisible: __webpack_require__(/*! prop-types */ 0).bool.isRequired,\n children: __webpack_require__(/*! prop-types */ 0).any,\n handleClose: __webpack_require__(/*! prop-types */ 0).func\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (ActionBar);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/DataTable/ActionBar/ActionBar.jsx\n// module id = 756\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/DataTable/ActionBar/ActionBar.jsx?", + ); + + /***/ + }, + /* 757 */ + /* exports provided: default */ + /* exports used: default */ + /*!*****************************************************************************************!*\ + !*** ./app/libs/components/DataTable/ClickableHeaderControl/ClickableHeaderControl.jsx ***! + \*****************************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1____ = __webpack_require__(/*! ../.. */ 11);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__DataTable_scss__ = __webpack_require__(/*! ../DataTable.scss */ 58);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__DataTable_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__DataTable_scss__);\n\n\n\n\n\n\nvar ClickableHeaderControl = function ClickableHeaderControl(_ref) {\n var className = _ref.className,\n children = _ref.children,\n onClick = _ref.onClick;\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_1____["k" /* ButtonLike */],\n { className: className, onClick: onClick },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n \'span\',\n { className: __WEBPACK_IMPORTED_MODULE_2__DataTable_scss___default.a.clickableControl },\n children\n )\n );\n};\n\nClickableHeaderControl.propTypes = {\n className: __webpack_require__(/*! prop-types */ 0).string,\n children: __webpack_require__(/*! prop-types */ 0).any,\n onClick: __webpack_require__(/*! prop-types */ 0).func.isRequired\n};\n/* harmony default export */ __webpack_exports__["a"] = (ClickableHeaderControl);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/DataTable/ClickableHeaderControl/ClickableHeaderControl.jsx\n// module id = 757\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/DataTable/ClickableHeaderControl/ClickableHeaderControl.jsx?', + ); + + /***/ + }, + /* 758 */ + /* exports provided: default */ + /* exports used: default */ + /*!*********************************************************!*\ + !*** ./app/libs/components/DataTable/Column/Column.jsx ***! + \*********************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__DataTable_scss__ = __webpack_require__(/*! ../DataTable.scss */ 58);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__DataTable_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__DataTable_scss__);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _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\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\n\n\n\n\n\nvar Column = function Column(_ref) {\n var _classNames;\n\n var sm = _ref.sm,\n md = _ref.md,\n lg = _ref.lg,\n className = _ref.className,\n otherProps = _objectWithoutProperties(_ref, ['sm', 'md', 'lg', 'className']);\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div', _extends({}, otherProps, {\n className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()(__WEBPACK_IMPORTED_MODULE_2__DataTable_scss___default.a.col, className, (_classNames = {}, _defineProperty(_classNames, __WEBPACK_IMPORTED_MODULE_2__DataTable_scss___default.a['col-sm-' + String(sm)], sm), _defineProperty(_classNames, __WEBPACK_IMPORTED_MODULE_2__DataTable_scss___default.a['col-md-' + String(md)], md), _defineProperty(_classNames, __WEBPACK_IMPORTED_MODULE_2__DataTable_scss___default.a['col-lg-' + String(lg)], lg), _classNames)),\n 'data-table-column': true\n }));\n};\n\nColumn.propTypes = {\n sm: __webpack_require__(/*! prop-types */ 0).oneOfType([__webpack_require__(/*! prop-types */ 0).string, __webpack_require__(/*! prop-types */ 0).number]),\n md: __webpack_require__(/*! prop-types */ 0).oneOfType([__webpack_require__(/*! prop-types */ 0).string, __webpack_require__(/*! prop-types */ 0).number]),\n lg: __webpack_require__(/*! prop-types */ 0).oneOfType([__webpack_require__(/*! prop-types */ 0).string, __webpack_require__(/*! prop-types */ 0).number]),\n className: __webpack_require__(/*! prop-types */ 0).string\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (Column);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/DataTable/Column/Column.jsx\n// module id = 758\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/DataTable/Column/Column.jsx?", + ); + + /***/ + }, + /* 759 */ + /* exports provided: default */ + /*!*****************************************************!*\ + !*** ./app/libs/components/DataTable/DataTable.jsx ***! + \*****************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Header_Header__ = __webpack_require__(/*! ./Header/Header */ 761);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Row_Row__ = __webpack_require__(/*! ./Row/Row */ 762);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Column_Column__ = __webpack_require__(/*! ./Column/Column */ 758);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__SortableColumnHeader_SortableColumnHeader__ = __webpack_require__(/*! ./SortableColumnHeader/SortableColumnHeader */ 764);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__SelectRowCheckbox_SelectRowCheckbox__ = __webpack_require__(/*! ./SelectRowCheckbox/SelectRowCheckbox */ 763);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__ActionBar_ActionBar__ = __webpack_require__(/*! ./ActionBar/ActionBar */ 756);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__EmptyList_EmptyList__ = __webpack_require__(/*! ./EmptyList/EmptyList */ 760);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__users_UserAvatar_UserAvatar__ = __webpack_require__(/*! ./users/UserAvatar/UserAvatar */ 777);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__users_UserData_UserData__ = __webpack_require__(/*! ./users/UserData/UserData */ 778);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__users_UserLinks_UserLinks__ = __webpack_require__(/*! ./users/UserLinks/UserLinks */ 779);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__users_SelectAllUsers_SelectAllUsers__ = __webpack_require__(/*! ./users/SelectAllUsers/SelectAllUsers */ 776);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__listings_ListingTitle__ = __webpack_require__(/*! ./listings/ListingTitle */ 774);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__listings_ListingThumbnail__ = __webpack_require__(/*! ./listings/ListingThumbnail */ 770);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__listings_ListingHost__ = __webpack_require__(/*! ./listings/ListingHost */ 766);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__DataTable_scss__ = __webpack_require__(/*! ./DataTable.scss */ 58);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__DataTable_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_15__DataTable_scss__);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar DataTable = function DataTable(props) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\'div\', _extends({}, props, { className: __WEBPACK_IMPORTED_MODULE_15__DataTable_scss___default.a.wrapper }));\n};\n\nDataTable.propTypes = {\n children: __webpack_require__(/*! prop-types */ 0).any\n};\nDataTable.Header = __WEBPACK_IMPORTED_MODULE_1__Header_Header__["a" /* default */];\nDataTable.Row = __WEBPACK_IMPORTED_MODULE_2__Row_Row__["a" /* default */];\nDataTable.Column = __WEBPACK_IMPORTED_MODULE_3__Column_Column__["a" /* default */];\nDataTable.SortableColumnHeader = __WEBPACK_IMPORTED_MODULE_4__SortableColumnHeader_SortableColumnHeader__["a" /* default */];\nDataTable.SelectRowCheckbox = __WEBPACK_IMPORTED_MODULE_5__SelectRowCheckbox_SelectRowCheckbox__["a" /* default */];\nDataTable.ActionBar = __WEBPACK_IMPORTED_MODULE_6__ActionBar_ActionBar__["a" /* default */];\nDataTable.EmptyList = __WEBPACK_IMPORTED_MODULE_7__EmptyList_EmptyList__["a" /* default */];\nDataTable.SelectAllUsers = __WEBPACK_IMPORTED_MODULE_11__users_SelectAllUsers_SelectAllUsers__["a" /* default */];\nDataTable.UserAvatar = __WEBPACK_IMPORTED_MODULE_8__users_UserAvatar_UserAvatar__["a" /* default */];\nDataTable.UserData = __WEBPACK_IMPORTED_MODULE_9__users_UserData_UserData__["a" /* default */];\nDataTable.UserLinks = __WEBPACK_IMPORTED_MODULE_10__users_UserLinks_UserLinks__["a" /* default */];\nDataTable.ListingTitle = __WEBPACK_IMPORTED_MODULE_12__listings_ListingTitle__["a" /* default */];\nDataTable.ListingHost = __WEBPACK_IMPORTED_MODULE_14__listings_ListingHost__["a" /* default */];\nDataTable.ListingThumbnail = __WEBPACK_IMPORTED_MODULE_13__listings_ListingThumbnail__["a" /* default */];\n\n/* unused harmony default export */ var _unused_webpack_default_export = (DataTable);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/DataTable/DataTable.jsx\n// module id = 759\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/DataTable/DataTable.jsx?', + ); + + /***/ + }, + /* 760 */ + /* exports provided: default */ + /* exports used: default */ + /*!***************************************************************!*\ + !*** ./app/libs/components/DataTable/EmptyList/EmptyList.jsx ***! + \***************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__EmptyList_scss__ = __webpack_require__(/*! ./EmptyList.scss */ 1043);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__EmptyList_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__EmptyList_scss__);\n\n\n\n\nvar EmptyList = function EmptyList(_ref) {\n var children = _ref.children;\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_1__EmptyList_scss___default.a.wrapper },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_1__EmptyList_scss___default.a.paper },\n Array(4).fill().map(function (_, i) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { key: i, className: __WEBPACK_IMPORTED_MODULE_1__EmptyList_scss___default.a.row },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div', { className: __WEBPACK_IMPORTED_MODULE_1__EmptyList_scss___default.a.image }),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_1__EmptyList_scss___default.a.text },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div', { className: __WEBPACK_IMPORTED_MODULE_1__EmptyList_scss___default.a.lineOne }),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div', { className: __WEBPACK_IMPORTED_MODULE_1__EmptyList_scss___default.a.lineTwo })\n )\n );\n })\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_1__EmptyList_scss___default.a.message },\n children\n )\n );\n};\n\nEmptyList.propTypes = {\n children: __webpack_require__(/*! prop-types */ 0).any\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (EmptyList);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/DataTable/EmptyList/EmptyList.jsx\n// module id = 760\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/DataTable/EmptyList/EmptyList.jsx?", + ); + + /***/ + }, + /* 761 */ + /* exports provided: default */ + /* exports used: default */ + /*!*********************************************************!*\ + !*** ./app/libs/components/DataTable/Header/Header.jsx ***! + \*********************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__DataTable_scss__ = __webpack_require__(/*! ../DataTable.scss */ 58);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__DataTable_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__DataTable_scss__);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\n\n\n\n\n\n\nvar Header = function Header(_ref) {\n var className = _ref.className,\n children = _ref.children,\n otherProps = _objectWithoutProperties(_ref, ['className', 'children']);\n\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n _extends({ className: __WEBPACK_IMPORTED_MODULE_2_classnames___default()(__WEBPACK_IMPORTED_MODULE_3__DataTable_scss___default.a.header, className) }, otherProps),\n children\n );\n};\n\nHeader.propTypes = {\n className: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string,\n children: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.node.isRequired\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Header);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/DataTable/Header/Header.jsx\n// module id = 761\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/DataTable/Header/Header.jsx?", + ); + + /***/ + }, + /* 762 */ + /* exports provided: default */ + /* exports used: default */ + /*!***************************************************!*\ + !*** ./app/libs/components/DataTable/Row/Row.jsx ***! + \***************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__DataTable_scss__ = __webpack_require__(/*! ../DataTable.scss */ 58);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__DataTable_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__DataTable_scss__);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _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\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\n\n\n\n\n\nvar targetIsDataColumnOrRow = function targetIsDataColumnOrRow(event) {\n return event.target.getAttribute('data-table-column') || event.target.getAttribute('data-table-row');\n};\n\nvar Row = function Row(_ref) {\n var _classNames;\n\n var className = _ref.className,\n selected = _ref.selected,\n children = _ref.children,\n onClick = _ref.onClick,\n hoverable = _ref.hoverable,\n otherProps = _objectWithoutProperties(_ref, ['className', 'selected', 'children', 'onClick', 'hoverable']);\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n _extends({ // eslint-disable-line jsx-a11y/no-static-element-interactions\n className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()(__WEBPACK_IMPORTED_MODULE_2__DataTable_scss___default.a.row, (_classNames = {}, _defineProperty(_classNames, __WEBPACK_IMPORTED_MODULE_2__DataTable_scss___default.a.selectedRow, selected), _defineProperty(_classNames, __WEBPACK_IMPORTED_MODULE_2__DataTable_scss___default.a.hoverable, hoverable), _classNames), className)\n }, otherProps, {\n 'data-table-row': true,\n onClick: function (_onClick) {\n function onClick(_x) {\n return _onClick.apply(this, arguments);\n }\n\n onClick.toString = function () {\n return _onClick.toString();\n };\n\n return onClick;\n }(function (event) {\n return onClick && targetIsDataColumnOrRow(event) && onClick();\n })\n }),\n children\n );\n};\n\nRow.propTypes = {\n className: __webpack_require__(/*! prop-types */ 0).string,\n selected: __webpack_require__(/*! prop-types */ 0).bool,\n children: __webpack_require__(/*! prop-types */ 0).any,\n onClick: __webpack_require__(/*! prop-types */ 0).func,\n hoverable: __webpack_require__(/*! prop-types */ 0).bool\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (Row);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/DataTable/Row/Row.jsx\n// module id = 762\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/DataTable/Row/Row.jsx?", + ); + + /***/ + }, + /* 763 */ + /* exports provided: default */ + /* exports used: default */ + /*!*******************************************************************************!*\ + !*** ./app/libs/components/DataTable/SelectRowCheckbox/SelectRowCheckbox.jsx ***! + \*******************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__DataTable_scss__ = __webpack_require__(/*! ../DataTable.scss */ 58);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__DataTable_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__DataTable_scss__);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\n\n\n\n\nvar SelectRowCheckbox = function SelectRowCheckbox(props) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\'div\', _extends({}, props, { className: __WEBPACK_IMPORTED_MODULE_1__DataTable_scss___default.a.selectRowCheckbox }));\n};\n\nSelectRowCheckbox.propTypes = {\n children: __webpack_require__(/*! prop-types */ 0).any\n};\n/* harmony default export */ __webpack_exports__["a"] = (SelectRowCheckbox);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/DataTable/SelectRowCheckbox/SelectRowCheckbox.jsx\n// module id = 763\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/DataTable/SelectRowCheckbox/SelectRowCheckbox.jsx?', + ); + + /***/ + }, + /* 764 */ + /* exports provided: default */ + /* exports used: default */ + /*!*************************************************************************************!*\ + !*** ./app/libs/components/DataTable/SortableColumnHeader/SortableColumnHeader.jsx ***! + \*************************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1____ = __webpack_require__(/*! ../.. */ 11);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__icons_IconSorting__ = __webpack_require__(/*! ../../icons/IconSorting */ 874);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__enums_SortOrder__ = __webpack_require__(/*! ../../../../enums/SortOrder */ 298);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__SortableColumnHeader_scss__ = __webpack_require__(/*! ./SortableColumnHeader.scss */ 1044);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__SortableColumnHeader_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__SortableColumnHeader_scss__);\n\n\n\n\n\n\n\n\nvar clickHandler = function clickHandler(active, order, onChangeSort) {\n return function () {\n return onChangeSort(active && order === __WEBPACK_IMPORTED_MODULE_3__enums_SortOrder__["a" /* default */].get(\'ASC\') ? __WEBPACK_IMPORTED_MODULE_3__enums_SortOrder__["a" /* default */].get(\'DESC\') : __WEBPACK_IMPORTED_MODULE_3__enums_SortOrder__["a" /* default */].get(\'ASC\'));\n };\n};\n\nvar SortableColumnHeader = function SortableColumnHeader(_ref) {\n var active = _ref.active,\n children = _ref.children,\n order = _ref.order,\n onChangeSort = _ref.onChangeSort;\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_1____["k" /* ButtonLike */],\n {\n className: __WEBPACK_IMPORTED_MODULE_4__SortableColumnHeader_scss___default.a.clickable,\n onClick: clickHandler(active, order, onChangeSort)\n },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n \'div\',\n { className: __WEBPACK_IMPORTED_MODULE_4__SortableColumnHeader_scss___default.a.label },\n children\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2__icons_IconSorting__["a" /* default */], { order: active ? order : null, className: __WEBPACK_IMPORTED_MODULE_4__SortableColumnHeader_scss___default.a.icon })\n );\n};\n\nSortableColumnHeader.propTypes = {\n active: __webpack_require__(/*! prop-types */ 0).bool.isRequired,\n children: __webpack_require__(/*! prop-types */ 0).any,\n order: __webpack_require__(/*! prop-types */ 0).oneOf([\'asc\', \'desc\']).isRequired,\n onChangeSort: __webpack_require__(/*! prop-types */ 0).func.isRequired\n};\n/* harmony default export */ __webpack_exports__["a"] = (SortableColumnHeader);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/DataTable/SortableColumnHeader/SortableColumnHeader.jsx\n// module id = 764\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/DataTable/SortableColumnHeader/SortableColumnHeader.jsx?', + ); + + /***/ + }, + /* 765 */ + /* exports provided: default */ + /* exports used: default */ + /*!*********************************************************************************!*\ + !*** ./app/libs/components/DataTable/listings/ListingHost/components/index.jsx ***! + \*********************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1____ = __webpack_require__(/*! ../../../.. */ 11);\n\n\n\n\nvar ListingHost = function ListingHost(_ref) {\n var name = _ref.name,\n profileUrl = _ref.profileUrl;\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_1____["f" /* A */],\n {\n href: profileUrl,\n color: \'none\',\n underline: \'none\'\n },\n name\n );\n};\n\nListingHost.propTypes = {\n name: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n profileUrl: __webpack_require__(/*! prop-types */ 0).string.isRequired\n};\n/* harmony default export */ __webpack_exports__["a"] = (ListingHost);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/DataTable/listings/ListingHost/components/index.jsx\n// module id = 765\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/DataTable/listings/ListingHost/components/index.jsx?', + ); + + /***/ + }, + /* 766 */ + /* exports provided: default */ + /* exports used: default */ + /*!*********************************************************************!*\ + !*** ./app/libs/components/DataTable/listings/ListingHost/index.js ***! + \*********************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_redux__ = __webpack_require__(/*! react-redux */ 81);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__selectors__ = __webpack_require__(/*! ./selectors */ 767);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__components__ = __webpack_require__(/*! ./components */ 765);\n\n\n\n\n\n/* harmony default export */ __webpack_exports__["a"] = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0_react_redux__["a" /* connect */])(__WEBPACK_IMPORTED_MODULE_1__selectors__["a" /* default */], {})(__WEBPACK_IMPORTED_MODULE_2__components__["a" /* default */]));\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/DataTable/listings/ListingHost/index.js\n// module id = 766\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/DataTable/listings/ListingHost/index.js?', + ); + + /***/ + }, + /* 767 */ + /* exports provided: default */ + /* exports used: default */ + /*!*************************************************************************!*\ + !*** ./app/libs/components/DataTable/listings/ListingHost/selectors.js ***! + \*************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_immutable__ = __webpack_require__(/*! immutable */ 26);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_immutable___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_immutable__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_reselect__ = __webpack_require__(/*! reselect */ 103);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_reselect___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_reselect__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_selectors_creators__ = __webpack_require__(/*! ../../../../utils/selectors/creators */ 90);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__selectors_listingSelector__ = __webpack_require__(/*! ../selectors/listingSelector */ 185);\n\n\n\n\n\n\n\nvar nameSelector = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__utils_selectors_creators__["a" /* createCommonSelector */])(__WEBPACK_IMPORTED_MODULE_3__selectors_listingSelector__["a" /* default */],\n// $FlowIgnoreMe: flow doesn\'t recognize the returning value as a string\nfunction (listing) {\n return listing.getIn([\'owner\', \'fullName\']);\n});\n\nvar profileUrlSelector = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__utils_selectors_creators__["a" /* createCommonSelector */])(__WEBPACK_IMPORTED_MODULE_3__selectors_listingSelector__["a" /* default */],\n// $FlowIgnoreMe: flow doesn\'t recognize the returning value as a string\nfunction (listing) {\n return listing.getIn([\'owner\', \'url\']);\n});\n\n/* harmony default export */ __webpack_exports__["a"] = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_reselect__["createStructuredSelector"])({\n name: nameSelector,\n profileUrl: profileUrlSelector\n}));\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/DataTable/listings/ListingHost/selectors.js\n// module id = 767\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/DataTable/listings/ListingHost/selectors.js?', + ); + + /***/ + }, + /* 768 */ + /* exports provided: default */ + /* exports used: default */ + /*!****************************************************************************!*\ + !*** ./app/libs/components/DataTable/listings/ListingThumbnail/actions.js ***! + \****************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__interactions_favoriteToggle__ = __webpack_require__(/*! ./interactions/favoriteToggle */ 771);\n\n\n/* harmony default export */ __webpack_exports__["a"] = ({ toggleFavorite: __WEBPACK_IMPORTED_MODULE_0__interactions_favoriteToggle__["a" /* toggleFavorite */] });\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/DataTable/listings/ListingThumbnail/actions.js\n// module id = 768\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/DataTable/listings/ListingThumbnail/actions.js?', + ); + + /***/ + }, + /* 769 */ + /* exports provided: default */ + /* exports used: default */ + /*!**************************************************************************************!*\ + !*** ./app/libs/components/DataTable/listings/ListingThumbnail/components/index.jsx ***! + \**************************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1____ = __webpack_require__(/*! ../../../.. */ 11);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__propTypeShapes__ = __webpack_require__(/*! ../../../../../propTypeShapes */ 57);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__index_scss__ = __webpack_require__(/*! ./index.scss */ 1045);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__index_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__index_scss__);\n\n\n\n\n\n\n\nvar ListingThumbnail = function ListingThumbnail(_ref) {\n var listing = _ref.listing,\n toggleFavorite = _ref.toggleFavorite;\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1____["j" /* ListingTile */], {\n listing: listing,\n onFavoriteUnfavorite: function onFavoriteUnfavorite() {\n return toggleFavorite(listing.id, listing.userContext.favorited);\n },\n className: __WEBPACK_IMPORTED_MODULE_3__index_scss___default.a.listingTile,\n hideInfo: true,\n isMini: true\n });\n};\n\nListingThumbnail.propTypes = {\n listing: __webpack_require__(/*! prop-types */ 0).any.isRequired,\n toggleFavorite: __webpack_require__(/*! prop-types */ 0).func.isRequired\n};\n/* harmony default export */ __webpack_exports__["a"] = (ListingThumbnail);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/DataTable/listings/ListingThumbnail/components/index.jsx\n// module id = 769\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/DataTable/listings/ListingThumbnail/components/index.jsx?', + ); + + /***/ + }, + /* 770 */ + /* exports provided: default */ + /* exports used: default */ + /*!**************************************************************************!*\ + !*** ./app/libs/components/DataTable/listings/ListingThumbnail/index.js ***! + \**************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_redux__ = __webpack_require__(/*! react-redux */ 81);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__selectors__ = __webpack_require__(/*! ./selectors */ 772);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__actions__ = __webpack_require__(/*! ./actions */ 768);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__components__ = __webpack_require__(/*! ./components */ 769);\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__["a"] = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0_react_redux__["a" /* connect */])(__WEBPACK_IMPORTED_MODULE_1__selectors__["a" /* default */], __WEBPACK_IMPORTED_MODULE_2__actions__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_3__components__["a" /* default */]));\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/DataTable/listings/ListingThumbnail/index.js\n// module id = 770\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/DataTable/listings/ListingThumbnail/index.js?', + ); + + /***/ + }, + /* 771 */ + /* exports provided: toggleFavorite, onToggleFavorite */ + /* exports used: toggleFavorite */ + /*!************************************************************************************************!*\ + !*** ./app/libs/components/DataTable/listings/ListingThumbnail/interactions/favoriteToggle.js ***! + \************************************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_fp__ = __webpack_require__(/*! lodash/fp */ 14);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_fp___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_lodash_fp__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__api_favorites__ = __webpack_require__(/*! ../../../../../../api/favorites */ 618);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_redux__ = __webpack_require__(/*! ../../../../../utils/redux */ 108);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return toggleFavorite; });\n/* unused harmony export onToggleFavorite */\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _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\n\n\n\n\nvar babelPluginFlowReactPropTypes_proptype_ResponseError = __webpack_require__(/*! ../../../../../../types */ 4).babelPluginFlowReactPropTypes_proptype_ResponseError || __webpack_require__(/*! react */ 1).PropTypes.any;\n\nvar babelPluginFlowReactPropTypes_proptype_ActionHandler = __webpack_require__(/*! ../../../../../../types/redux */ 91).babelPluginFlowReactPropTypes_proptype_ActionHandler || __webpack_require__(/*! react */ 1).PropTypes.any;\n\nvar babelPluginFlowReactPropTypes_proptype_DataStoreState = __webpack_require__(/*! ../../../../../../bundles/favorites-index/types/state */ 623).babelPluginFlowReactPropTypes_proptype_DataStoreState || __webpack_require__(/*! react */ 1).PropTypes.any;\n\nvar FAVORITE_REQUESTED = 'FAVORITES_INDEX__FAVORITE_REQUESTED';\nvar FAVORITE_SUCCEEDED = 'FAVORITES_INDEX__FAVORITE_SUCCEEDED';\nvar FAVORITE_FAILED = 'FAVORITES_INDEX__FAVORITE_FAILED';\nvar UNFAVORITE_REQUESTED = 'FAVORITES_INDEX__UNFAVORITE_REQUESTED';\nvar UNFAVORITE_SUCCEEDED = 'FAVORITES_INDEX__UNFAVORITE_SUCCEEDED';\nvar UNFAVORITE_FAILED = 'FAVORITES_INDEX__UNFAVORITE_FAILED';\n\nvar updateFavorite = function updateFavorite(listing, favorited) {\n return {\n userContext: {\n favorited: favorited\n },\n favoritesCount: favorited ? listing.get('favoritesCount') + 1 : listing.get('favoritesCount') - 1\n };\n};\n\nvar setListingFavorited = __WEBPACK_IMPORTED_MODULE_0_lodash_fp___default.a.curry(function (value, state, action) {\n return state.updateIn(['entities', action.listingId], function (listing) {\n return listing.merge(updateFavorite(listing, value));\n });\n});\n\n// --- Request\n\n// Action\n\n\nvar favoriteRequestAction = function favoriteRequestAction(listingId) {\n return {\n type: FAVORITE_REQUESTED,\n listingId: listingId\n };\n};\nvar unfavoriteRequestAction = function unfavoriteRequestAction(listingId) {\n return {\n type: UNFAVORITE_REQUESTED,\n listingId: listingId\n };\n};\n\n// Reducer\n\n\nvar onFavoriteRequest = _defineProperty({}, FAVORITE_REQUESTED, setListingFavorited(true));\nvar onUnfavoriteRequest = _defineProperty({}, UNFAVORITE_REQUESTED, setListingFavorited(false));\n\n// --- Success\n\n// Action\n\n\nvar favoriteSuccessAction = function favoriteSuccessAction() {\n return { type: FAVORITE_SUCCEEDED };\n};\nvar unfavoriteSuccessAction = function unfavoriteSuccessAction() {\n return { type: UNFAVORITE_SUCCEEDED };\n};\n\n// --- Failure\n\n// Action\n\n\nvar favoriteFailureAction = function favoriteFailureAction(listingId, error) {\n return {\n type: FAVORITE_FAILED,\n listingId: listingId,\n error: error\n };\n};\nvar unfavoriteFailureAction = function unfavoriteFailureAction(listingId, error) {\n return {\n type: UNFAVORITE_FAILED,\n listingId: listingId,\n error: error\n };\n};\n\n// Reducer\n\n\nvar onFavoriteFailure = _defineProperty({}, FAVORITE_FAILED, setListingFavorited(false));\nvar onUnfavoriteFailure = _defineProperty({}, UNFAVORITE_FAILED, setListingFavorited(true));\n\n// --- Exports\n\n// Action\nvar toggleFavorite = function toggleFavorite(listingId, favorited) {\n return function (dispatch) {\n var requestAction = favorited ? unfavoriteRequestAction : favoriteRequestAction;\n dispatch(requestAction(listingId));\n\n var successAction = favorited ? unfavoriteSuccessAction : favoriteSuccessAction;\n var failureAction = favorited ? unfavoriteFailureAction : favoriteFailureAction;\n var apiAction = favorited ? __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__api_favorites__[\"a\" /* deleteFavorite */])(listingId) : __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__api_favorites__[\"b\" /* postFavorite */])(listingId);\n\n apiAction.then(function () {\n return dispatch(successAction());\n }, function (error) {\n return dispatch(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__utils_redux__[\"a\" /* withApiErrorMiddleware */])(failureAction(listingId, error)));\n });\n };\n};\n\n// Reducers\nvar onToggleFavorite = _extends({}, onFavoriteRequest, onUnfavoriteRequest, onFavoriteFailure, onUnfavoriteFailure);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/DataTable/listings/ListingThumbnail/interactions/favoriteToggle.js\n// module id = 771\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/DataTable/listings/ListingThumbnail/interactions/favoriteToggle.js?", + ); + + /***/ + }, + /* 772 */ + /* exports provided: default */ + /* exports used: default */ + /*!******************************************************************************!*\ + !*** ./app/libs/components/DataTable/listings/ListingThumbnail/selectors.js ***! + \******************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_reselect__ = __webpack_require__(/*! reselect */ 103);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_reselect___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_reselect__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_immutable__ = __webpack_require__(/*! immutable */ 26);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_immutable___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_immutable__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_selectors_creators__ = __webpack_require__(/*! ../../../../utils/selectors/creators */ 90);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__selectors_listingSelector__ = __webpack_require__(/*! ../selectors/listingSelector */ 185);\n\n\n\nvar babelPluginFlowReactPropTypes_proptype_ContextualListing = __webpack_require__(/*! ../../../../../types */ 4).babelPluginFlowReactPropTypes_proptype_ContextualListing || __webpack_require__(/*! react */ 1).PropTypes.any;\n\n\n\n\n\nvar contextualListingSelector = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__utils_selectors_creators__["a" /* createCommonSelector */])(__WEBPACK_IMPORTED_MODULE_3__selectors_listingSelector__["a" /* default */], function (listing) {\n return listing.toJS();\n});\n\n/* harmony default export */ __webpack_exports__["a"] = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0_reselect__["createStructuredSelector"])({\n listing: contextualListingSelector\n}));\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/DataTable/listings/ListingThumbnail/selectors.js\n// module id = 772\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/DataTable/listings/ListingThumbnail/selectors.js?', + ); + + /***/ + }, + /* 773 */ + /* exports provided: default */ + /* exports used: default */ + /*!**********************************************************************************!*\ + !*** ./app/libs/components/DataTable/listings/ListingTitle/components/index.jsx ***! + \**********************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1____ = __webpack_require__(/*! ../../../.. */ 11);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__index_scss__ = __webpack_require__(/*! ./index.scss */ 1046);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__index_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__index_scss__);\n\n\n\n\n\n\nvar ListingTitle = function ListingTitle(_ref) {\n var title = _ref.title,\n listingUrl = _ref.listingUrl,\n roomType = _ref.roomType,\n displayAddress = _ref.displayAddress;\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_2__index_scss___default.a.listingData },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_2__index_scss___default.a.title },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_1____[\"f\" /* A */],\n {\n href: listingUrl,\n color: 'black',\n underline: 'active'\n },\n title\n )\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_2__index_scss___default.a.listingMeta },\n roomType ? __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'span',\n null,\n roomType,\n ' \\u2022 ',\n displayAddress\n ) : __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'span',\n null,\n displayAddress\n )\n )\n );\n};\n\nListingTitle.propTypes = {\n title: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n listingUrl: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n roomType: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n displayAddress: __webpack_require__(/*! prop-types */ 0).string.isRequired\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (ListingTitle);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/DataTable/listings/ListingTitle/components/index.jsx\n// module id = 773\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/DataTable/listings/ListingTitle/components/index.jsx?", + ); + + /***/ + }, + /* 774 */ + /* exports provided: default */ + /* exports used: default */ + /*!**********************************************************************!*\ + !*** ./app/libs/components/DataTable/listings/ListingTitle/index.js ***! + \**********************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_redux__ = __webpack_require__(/*! react-redux */ 81);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__selectors__ = __webpack_require__(/*! ./selectors */ 775);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__components__ = __webpack_require__(/*! ./components */ 773);\n\n\n\n\n\n/* harmony default export */ __webpack_exports__["a"] = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0_react_redux__["a" /* connect */])(__WEBPACK_IMPORTED_MODULE_1__selectors__["a" /* default */], {})(__WEBPACK_IMPORTED_MODULE_2__components__["a" /* default */]));\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/DataTable/listings/ListingTitle/index.js\n// module id = 774\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/DataTable/listings/ListingTitle/index.js?', + ); + + /***/ + }, + /* 775 */ + /* exports provided: default */ + /* exports used: default */ + /*!**************************************************************************!*\ + !*** ./app/libs/components/DataTable/listings/ListingTitle/selectors.js ***! + \**************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_immutable__ = __webpack_require__(/*! immutable */ 26);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_immutable___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_immutable__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_reselect__ = __webpack_require__(/*! reselect */ 103);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_reselect___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_reselect__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__enums_RoomType__ = __webpack_require__(/*! ../../../../../enums/RoomType */ 70);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__utils_selectors_creators__ = __webpack_require__(/*! ../../../../utils/selectors/creators */ 90);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__selectors_listingSelector__ = __webpack_require__(/*! ../selectors/listingSelector */ 185);\n\n\n\n\n\n\n\n\nvar titleSelector = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__utils_selectors_creators__["a" /* createCommonSelector */])(__WEBPACK_IMPORTED_MODULE_4__selectors_listingSelector__["a" /* default */], function (listing) {\n return listing.get(\'title\');\n});\n\nvar listingUrlSelector = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__utils_selectors_creators__["a" /* createCommonSelector */])(__WEBPACK_IMPORTED_MODULE_4__selectors_listingSelector__["a" /* default */], function (listing) {\n return listing.get(\'htmlUrl\');\n});\n\nvar roomTypeSelector = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__utils_selectors_creators__["a" /* createCommonSelector */])(__WEBPACK_IMPORTED_MODULE_4__selectors_listingSelector__["a" /* default */], function (listing) {\n return listing.get(\'roomType\') ? __WEBPACK_IMPORTED_MODULE_2__enums_RoomType__["a" /* default */].fromValue(listing.get(\'roomType\')).label : null;\n});\n\nvar displayAddressSelector = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__utils_selectors_creators__["a" /* createCommonSelector */])(__WEBPACK_IMPORTED_MODULE_4__selectors_listingSelector__["a" /* default */], function (listing) {\n return listing.get(\'displayAddress\');\n});\n\n/* harmony default export */ __webpack_exports__["a"] = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_reselect__["createStructuredSelector"])({\n title: titleSelector,\n listingUrl: listingUrlSelector,\n roomType: roomTypeSelector,\n displayAddress: displayAddressSelector\n}));\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/DataTable/listings/ListingTitle/selectors.js\n// module id = 775\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/DataTable/listings/ListingTitle/selectors.js?', + ); + + /***/ + }, + /* 776 */ + /* exports provided: default */ + /* exports used: default */ + /*!*******************************************************************************!*\ + !*** ./app/libs/components/DataTable/users/SelectAllUsers/SelectAllUsers.jsx ***! + \*******************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ClickableHeaderControl_ClickableHeaderControl__ = __webpack_require__(/*! ../../ClickableHeaderControl/ClickableHeaderControl */ 757);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__DataTable_scss__ = __webpack_require__(/*! ../../DataTable.scss */ 58);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__DataTable_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__DataTable_scss__);\n\n\n\n\n\n\nvar SelectAllUsers = function SelectAllUsers(_ref) {\n var onClick = _ref.onClick,\n children = _ref.children;\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n \'div\',\n { className: __WEBPACK_IMPORTED_MODULE_2__DataTable_scss___default.a.selectAllUsers },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_1__ClickableHeaderControl_ClickableHeaderControl__["a" /* default */],\n { onClick: onClick },\n children\n )\n );\n};\n\nSelectAllUsers.propTypes = {\n children: __webpack_require__(/*! prop-types */ 0).any,\n onClick: __webpack_require__(/*! prop-types */ 0).func.isRequired\n};\n/* harmony default export */ __webpack_exports__["a"] = (SelectAllUsers);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/DataTable/users/SelectAllUsers/SelectAllUsers.jsx\n// module id = 776\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/DataTable/users/SelectAllUsers/SelectAllUsers.jsx?', + ); + + /***/ + }, + /* 777 */ + /* exports provided: default */ + /* exports used: default */ + /*!***********************************************************************!*\ + !*** ./app/libs/components/DataTable/users/UserAvatar/UserAvatar.jsx ***! + \***********************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2____ = __webpack_require__(/*! ../../.. */ 11);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__DataTable_scss__ = __webpack_require__(/*! ../../DataTable.scss */ 58);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__DataTable_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__DataTable_scss__);\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nfunction _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\n\n\nvar babelPluginFlowReactPropTypes_proptype_User = __webpack_require__(/*! ../../../../../types */ 4).babelPluginFlowReactPropTypes_proptype_User || __webpack_require__(/*! react */ 1).PropTypes.any;\n\n\n\n\n\nvar computeClassNames = function computeClassNames(_ref) {\n var _classNames;\n\n var className = _ref.className,\n border = _ref.border;\n return __WEBPACK_IMPORTED_MODULE_1_classnames___default()(__WEBPACK_IMPORTED_MODULE_3__DataTable_scss___default.a.userAvatar, (_classNames = {}, _defineProperty(_classNames, __WEBPACK_IMPORTED_MODULE_3__DataTable_scss___default.a.white, border === 'white'), _defineProperty(_classNames, __WEBPACK_IMPORTED_MODULE_3__DataTable_scss___default.a.primary, border === 'primary'), _classNames), className);\n};\n\nvar UserAvatar = function UserAvatar(_ref2) {\n var user = _ref2.user,\n children = _ref2.children,\n otherProps = _objectWithoutProperties(_ref2, ['user', 'children']);\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_2____[\"f\" /* A */],\n { className: computeClassNames(otherProps), href: user.url, color: 'none', underline: 'none' },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2____[\"g\" /* Image */], {\n alt: user.firstName + ' ' + user.lastName + '\\'s avatar',\n url: user.avatarUrl,\n width: '48',\n height: '48',\n dpr: '2.0',\n crop: 'fill',\n radius: 'max',\n gravity: 'faces'\n }),\n children\n );\n};\n\nUserAvatar.propTypes = {\n user: __webpack_require__(/*! prop-types */ 0).any.isRequired,\n children: __webpack_require__(/*! prop-types */ 0).any,\n className: __webpack_require__(/*! prop-types */ 0).string,\n border: __webpack_require__(/*! prop-types */ 0).oneOf(['primary', 'white'])\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (UserAvatar);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/DataTable/users/UserAvatar/UserAvatar.jsx\n// module id = 777\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/DataTable/users/UserAvatar/UserAvatar.jsx?", + ); + + /***/ + }, + /* 778 */ + /* exports provided: default */ + /* exports used: default */ + /*!*******************************************************************!*\ + !*** ./app/libs/components/DataTable/users/UserData/UserData.jsx ***! + \*******************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1____ = __webpack_require__(/*! ../../.. */ 11);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__DataTable_scss__ = __webpack_require__(/*! ../../DataTable.scss */ 58);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__DataTable_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__DataTable_scss__);\n\n\nvar babelPluginFlowReactPropTypes_proptype_User = __webpack_require__(/*! ../../../../../types */ 4).babelPluginFlowReactPropTypes_proptype_User || __webpack_require__(/*! react */ 1).PropTypes.any;\n\n\n\n\n\nvar UserData = function UserData(_ref) {\n var user = _ref.user,\n meta = _ref.meta;\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_2__DataTable_scss___default.a.userData },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_1____[\"f\" /* A */],\n {\n href: user.url,\n color: 'primary',\n underline: 'active'\n },\n user.firstName,\n ' ',\n user.lastName\n ),\n meta && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_2__DataTable_scss___default.a.userMeta },\n meta\n )\n );\n};\n\nUserData.propTypes = {\n user: __webpack_require__(/*! prop-types */ 0).any.isRequired,\n meta: __webpack_require__(/*! prop-types */ 0).string\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (UserData);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/DataTable/users/UserData/UserData.jsx\n// module id = 778\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/DataTable/users/UserData/UserData.jsx?", + ); + + /***/ + }, + /* 779 */ + /* exports provided: default */ + /* exports used: default */ + /*!*********************************************************************!*\ + !*** ./app/libs/components/DataTable/users/UserLinks/UserLinks.jsx ***! + \*********************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1____ = __webpack_require__(/*! ../../.. */ 11);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__icons_socials_IconFacebook__ = __webpack_require__(/*! ../../../icons/socials/IconFacebook */ 877);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__icons_socials_IconTwitter__ = __webpack_require__(/*! ../../../icons/socials/IconTwitter */ 879);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__icons_socials_IconLinkedIn__ = __webpack_require__(/*! ../../../icons/socials/IconLinkedIn */ 878);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__icons_socials_IconAirbnb__ = __webpack_require__(/*! ../../../icons/socials/IconAirbnb */ 876);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__icons_socials_IconVrbo__ = __webpack_require__(/*! ../../../icons/socials/IconVrbo */ 880);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__icons_socials_IconWebsite__ = __webpack_require__(/*! ../../../icons/socials/IconWebsite */ 881);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__UserLinks_scss__ = __webpack_require__(/*! ./UserLinks.scss */ 1047);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__UserLinks_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8__UserLinks_scss__);\n\n\nvar babelPluginFlowReactPropTypes_proptype_User = __webpack_require__(/*! ../../../../../types */ 4).babelPluginFlowReactPropTypes_proptype_User || __webpack_require__(/*! react */ 1).PropTypes.any;\n\n\n\n\n\n\n\n\n\n\n\nvar UserLinks = function UserLinks(_ref) {\n var user = _ref.user;\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n \'div\',\n { className: __WEBPACK_IMPORTED_MODULE_8__UserLinks_scss___default.a.userLinks },\n user.facebookUrl && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_1____["f" /* A */],\n {\n href: user.facebookUrl,\n color: \'none\',\n underline: \'none\',\n className: __WEBPACK_IMPORTED_MODULE_8__UserLinks_scss___default.a.userLink,\n targetBlank: true,\n external: true\n },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2__icons_socials_IconFacebook__["a" /* default */], { className: __WEBPACK_IMPORTED_MODULE_8__UserLinks_scss___default.a.icon })\n ),\n user.twitterUrl && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_1____["f" /* A */],\n {\n href: user.twitterUrl,\n color: \'none\',\n underline: \'none\',\n className: __WEBPACK_IMPORTED_MODULE_8__UserLinks_scss___default.a.userLink,\n targetBlank: true,\n external: true\n },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3__icons_socials_IconTwitter__["a" /* default */], { className: __WEBPACK_IMPORTED_MODULE_8__UserLinks_scss___default.a.icon })\n ),\n user.linkedinUrl && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_1____["f" /* A */],\n {\n href: user.linkedinUrl,\n color: \'none\',\n underline: \'none\',\n className: __WEBPACK_IMPORTED_MODULE_8__UserLinks_scss___default.a.userLink,\n targetBlank: true,\n external: true\n },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_4__icons_socials_IconLinkedIn__["a" /* default */], { className: __WEBPACK_IMPORTED_MODULE_8__UserLinks_scss___default.a.icon })\n ),\n user.airbnbUrl && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_1____["f" /* A */],\n {\n href: user.airbnbUrl,\n color: \'none\',\n underline: \'none\',\n className: __WEBPACK_IMPORTED_MODULE_8__UserLinks_scss___default.a.userLink,\n targetBlank: true,\n external: true\n },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5__icons_socials_IconAirbnb__["a" /* default */], { className: __WEBPACK_IMPORTED_MODULE_8__UserLinks_scss___default.a.icon })\n ),\n user.vrboUrl && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_1____["f" /* A */],\n {\n href: user.vrboUrl,\n color: \'none\',\n underline: \'none\',\n className: __WEBPACK_IMPORTED_MODULE_8__UserLinks_scss___default.a.userLink,\n targetBlank: true,\n external: true\n },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_6__icons_socials_IconVrbo__["a" /* default */], { className: __WEBPACK_IMPORTED_MODULE_8__UserLinks_scss___default.a.icon })\n ),\n user.personalWebsiteUrl && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_1____["f" /* A */],\n {\n href: user.personalWebsiteUrl,\n color: \'none\',\n underline: \'none\',\n className: __WEBPACK_IMPORTED_MODULE_8__UserLinks_scss___default.a.userLink,\n targetBlank: true,\n external: true\n },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7__icons_socials_IconWebsite__["a" /* default */], { className: __WEBPACK_IMPORTED_MODULE_8__UserLinks_scss___default.a.icon })\n )\n );\n};\n\nUserLinks.propTypes = {\n user: babelPluginFlowReactPropTypes_proptype_User\n};\n/* harmony default export */ __webpack_exports__["a"] = (UserLinks);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/DataTable/users/UserLinks/UserLinks.jsx\n// module id = 779\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/DataTable/users/UserLinks/UserLinks.jsx?', + ); + + /***/ + }, + /* 780 */ + /* exports provided: default */ + /*!***************************************************!*\ + !*** ./app/libs/components/Dropdown/Dropdown.jsx ***! + \***************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__EventHandlers__ = __webpack_require__(/*! ./EventHandlers */ 781);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__MenuHeader_MenuHeader__ = __webpack_require__(/*! ./MenuHeader/MenuHeader */ 782);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__MenuItem_MenuItem__ = __webpack_require__(/*! ./MenuItem/MenuItem */ 783);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__MenuItem_MenuItemLink__ = __webpack_require__(/*! ./MenuItem/MenuItemLink */ 784);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__MenuItem_MenuItemNativeLink__ = __webpack_require__(/*! ./MenuItem/MenuItemNativeLink */ 785);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__Message_Message__ = __webpack_require__(/*! ./Message/Message */ 786);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__Dropdown_scss__ = __webpack_require__(/*! ./Dropdown.scss */ 155);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__Dropdown_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8__Dropdown_scss__);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _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\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\n\n\n\nvar babelPluginFlowReactPropTypes_proptype_DomEvent = __webpack_require__(/*! ../../../types */ 4).babelPluginFlowReactPropTypes_proptype_DomEvent || __webpack_require__(/*! react */ 1).PropTypes.any;\n\n\n\n\n\n\n\n\n\n\n/*\n * Use `useStopPropagation` prop if dropdown dialog contains:\n * - controlled radio buttons or checkboxes (details: https://github.com/facebook/react/issues/4930)\n * - links or other elements, that fire event, that should not be prevented\n *\n */\n\n\nvar Dropdown = function Dropdown(_ref) {\n var _classNames;\n\n var children = _ref.children,\n type = _ref.type,\n className = _ref.className,\n isVisible = _ref.isVisible,\n useStopPropagation = _ref.useStopPropagation,\n hideDropdown = _ref.hideDropdown,\n otherProps = _objectWithoutProperties(_ref, ['children', 'type', 'className', 'isVisible', 'useStopPropagation', 'hideDropdown']);\n\n return isVisible ? __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_2__EventHandlers__[\"a\" /* default */],\n { hideDropdown: hideDropdown },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n _extends({}, otherProps, {\n className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()(className, (_classNames = {}, _defineProperty(_classNames, __WEBPACK_IMPORTED_MODULE_8__Dropdown_scss___default.a.menu, type === 'menu'), _defineProperty(_classNames, __WEBPACK_IMPORTED_MODULE_8__Dropdown_scss___default.a.triangle, type === 'withTriangle'), _classNames)),\n onClick: function onClick(event) {\n return useStopPropagation ? event.stopPropagation() : event.preventDefault();\n }\n }),\n children\n )\n ) : null;\n};\n\nDropdown.propTypes = {\n children: __webpack_require__(/*! prop-types */ 0).any,\n type: __webpack_require__(/*! prop-types */ 0).oneOf(['menu', 'withTriangle']),\n className: __webpack_require__(/*! prop-types */ 0).string,\n isVisible: __webpack_require__(/*! prop-types */ 0).bool.isRequired,\n useStopPropagation: __webpack_require__(/*! prop-types */ 0).bool,\n hideDropdown: __webpack_require__(/*! prop-types */ 0).func.isRequired\n};\nDropdown.MenuHeader = __WEBPACK_IMPORTED_MODULE_3__MenuHeader_MenuHeader__[\"a\" /* default */];\nDropdown.MenuItem = __WEBPACK_IMPORTED_MODULE_4__MenuItem_MenuItem__[\"a\" /* default */];\nDropdown.MenuItemLink = __WEBPACK_IMPORTED_MODULE_5__MenuItem_MenuItemLink__[\"a\" /* default */];\nDropdown.MenuItemNativeLink = __WEBPACK_IMPORTED_MODULE_6__MenuItem_MenuItemNativeLink__[\"a\" /* default */];\nDropdown.Message = __WEBPACK_IMPORTED_MODULE_7__Message_Message__[\"a\" /* default */];\n\n/* unused harmony default export */ var _unused_webpack_default_export = (Dropdown);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/Dropdown/Dropdown.jsx\n// module id = 780\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/Dropdown/Dropdown.jsx?", + ); + + /***/ + }, + /* 781 */ + /* exports provided: default */ + /* exports used: default */ + /*!********************************************************!*\ + !*** ./app/libs/components/Dropdown/EventHandlers.jsx ***! + \********************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__utils_dom__ = __webpack_require__(/*! ../../utils/dom */ 44);\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\n\n\n\nvar babelPluginFlowReactPropTypes_proptype_DomEvent = __webpack_require__(/*! ../../../types */ 4).babelPluginFlowReactPropTypes_proptype_DomEvent || __webpack_require__(/*! react */ 1).PropTypes.any;\n\nvar DropdownEventHandlers = function (_React$Component) {\n _inherits(DropdownEventHandlers, _React$Component);\n\n function DropdownEventHandlers() {\n var _ref;\n\n var _temp, _this, _ret;\n\n _classCallCheck(this, DropdownEventHandlers);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = DropdownEventHandlers.__proto__ || Object.getPrototypeOf(DropdownEventHandlers)).call.apply(_ref, [this].concat(args))), _this), _this.hideDropdownOnClickOutside = function (event) {\n if (event.defaultPrevented) return;\n _this.props.hideDropdown();\n }, _this.hideDropdownOnEscKey = function (event) {\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__utils_dom__["e" /* onEscKey */])(event, _this.props.hideDropdown);\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n _createClass(DropdownEventHandlers, [{\n key: \'componentDidMount\',\n value: function componentDidMount() {\n var _this2 = this;\n\n // `click` event listner must be added on the next tick,\n // otherwise callback will be triggered on the same `click` event\n // that caused the render of this dropdown.\n // It means dropdown will be shown and immediately hidden.\n setTimeout(function () {\n window.addEventListener(\'click\', _this2.hideDropdownOnClickOutside, false);\n window.addEventListener(\'keydown\', _this2.hideDropdownOnEscKey, false);\n }, 1);\n }\n }, {\n key: \'componentWillUnmount\',\n value: function componentWillUnmount() {\n window.removeEventListener(\'click\', this.hideDropdownOnClickOutside, false);\n window.removeEventListener(\'keydown\', this.hideDropdownOnEscKey, false);\n }\n }, {\n key: \'render\',\n value: function render() {\n return this.props.children;\n }\n }]);\n\n return DropdownEventHandlers;\n}(__WEBPACK_IMPORTED_MODULE_0_react___default.a.Component);\n\nDropdownEventHandlers.propTypes = {\n children: __webpack_require__(/*! prop-types */ 0).any,\n hideDropdown: __webpack_require__(/*! prop-types */ 0).func.isRequired\n};\nDropdownEventHandlers.propTypes = {\n children: __webpack_require__(/*! prop-types */ 0).any,\n hideDropdown: __webpack_require__(/*! prop-types */ 0).func.isRequired\n};\n/* harmony default export */ __webpack_exports__["a"] = (DropdownEventHandlers);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/Dropdown/EventHandlers.jsx\n// module id = 781\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/Dropdown/EventHandlers.jsx?', + ); + + /***/ + }, + /* 782 */ + /* exports provided: default */ + /* exports used: default */ + /*!****************************************************************!*\ + !*** ./app/libs/components/Dropdown/MenuHeader/MenuHeader.jsx ***! + \****************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2____ = __webpack_require__(/*! ../.. */ 11);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__icons_IconClose__ = __webpack_require__(/*! ../../icons/IconClose */ 139);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__MenuHeader_scss__ = __webpack_require__(/*! ./MenuHeader.scss */ 1048);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__MenuHeader_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__MenuHeader_scss__);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\n\n\n\n\n\n\n\n\nvar MenuHeader = function MenuHeader(_ref) {\n var className = _ref.className,\n children = _ref.children,\n hideDropdown = _ref.hideDropdown,\n otherProps = _objectWithoutProperties(_ref, ['className', 'children', 'hideDropdown']);\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n _extends({ className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()(__WEBPACK_IMPORTED_MODULE_4__MenuHeader_scss___default.a.wrapper, className) }, otherProps),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_4__MenuHeader_scss___default.a.header },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_4__MenuHeader_scss___default.a.title },\n children\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_2____[\"k\" /* ButtonLike */],\n { onClick: hideDropdown },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3__icons_IconClose__[\"a\" /* default */], { className: __WEBPACK_IMPORTED_MODULE_4__MenuHeader_scss___default.a.icon })\n )\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div', { className: __WEBPACK_IMPORTED_MODULE_4__MenuHeader_scss___default.a.separator })\n );\n};\n\nMenuHeader.propTypes = {\n className: __webpack_require__(/*! prop-types */ 0).string,\n children: __webpack_require__(/*! prop-types */ 0).any,\n hideDropdown: __webpack_require__(/*! prop-types */ 0).func.isRequired\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (MenuHeader);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/Dropdown/MenuHeader/MenuHeader.jsx\n// module id = 782\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/Dropdown/MenuHeader/MenuHeader.jsx?", + ); + + /***/ + }, + /* 783 */ + /* exports provided: default */ + /* exports used: default */ + /*!************************************************************!*\ + !*** ./app/libs/components/Dropdown/MenuItem/MenuItem.jsx ***! + \************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils__ = __webpack_require__(/*! ../../../utils */ 20);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3____ = __webpack_require__(/*! ../.. */ 11);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Dropdown_scss__ = __webpack_require__(/*! ../Dropdown.scss */ 155);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Dropdown_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__Dropdown_scss__);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\n\n\n\n\n\n\n\n\nvar MenuItem = function MenuItem(_ref) {\n var className = _ref.className,\n onClick = _ref.onClick,\n hideDropdown = _ref.hideDropdown,\n otherProps = _objectWithoutProperties(_ref, [\'className\', \'onClick\', \'hideDropdown\']);\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3____["k" /* ButtonLike */], _extends({}, otherProps, {\n className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()(__WEBPACK_IMPORTED_MODULE_4__Dropdown_scss___default.a.menuItem, className),\n onClick: __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__utils__["f" /* createFunctionsChain */])(onClick, hideDropdown)\n }));\n};\n\nMenuItem.propTypes = {\n className: __webpack_require__(/*! prop-types */ 0).string,\n onClick: __webpack_require__(/*! prop-types */ 0).func.isRequired,\n hideDropdown: __webpack_require__(/*! prop-types */ 0).func.isRequired,\n children: __webpack_require__(/*! prop-types */ 0).any\n};\n/* harmony default export */ __webpack_exports__["a"] = (MenuItem);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/Dropdown/MenuItem/MenuItem.jsx\n// module id = 783\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/Dropdown/MenuItem/MenuItem.jsx?', + ); + + /***/ + }, + /* 784 */ + /* exports provided: default */ + /* exports used: default */ + /*!****************************************************************!*\ + !*** ./app/libs/components/Dropdown/MenuItem/MenuItemLink.jsx ***! + \****************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_router__ = __webpack_require__(/*! react-router */ 82);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__utils__ = __webpack_require__(/*! ../../../utils */ 20);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Dropdown_scss__ = __webpack_require__(/*! ../Dropdown.scss */ 155);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Dropdown_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__Dropdown_scss__);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\n\n\n\n\n\n\n\n\nvar MenuItemLink = function MenuItemLink(_ref) {\n var to = _ref.to,\n className = _ref.className,\n onClick = _ref.onClick,\n hideDropdown = _ref.hideDropdown,\n children = _ref.children,\n otherProps = _objectWithoutProperties(_ref, ['to', 'className', 'onClick', 'hideDropdown', 'children']);\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_1_react_router__[\"a\" /* Link */],\n _extends({}, _extends({ to: to }, otherProps), {\n className: __WEBPACK_IMPORTED_MODULE_2_classnames___default()(__WEBPACK_IMPORTED_MODULE_4__Dropdown_scss___default.a.menuItem, className),\n onClick: __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__utils__[\"f\" /* createFunctionsChain */])(onClick, hideDropdown)\n }),\n children\n );\n};\n\nMenuItemLink.propTypes = {\n to: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n className: __webpack_require__(/*! prop-types */ 0).string,\n onClick: __webpack_require__(/*! prop-types */ 0).func,\n hideDropdown: __webpack_require__(/*! prop-types */ 0).func.isRequired,\n children: __webpack_require__(/*! prop-types */ 0).any\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (MenuItemLink);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/Dropdown/MenuItem/MenuItemLink.jsx\n// module id = 784\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/Dropdown/MenuItem/MenuItemLink.jsx?", + ); + + /***/ + }, + /* 785 */ + /* exports provided: default */ + /* exports used: default */ + /*!**********************************************************************!*\ + !*** ./app/libs/components/Dropdown/MenuItem/MenuItemNativeLink.jsx ***! + \**********************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils__ = __webpack_require__(/*! ../../../utils */ 20);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Dropdown_scss__ = __webpack_require__(/*! ../Dropdown.scss */ 155);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Dropdown_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__Dropdown_scss__);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\n\n\n\n\n\n\n\nvar MenuItemNativeLink = function MenuItemNativeLink(_ref) {\n var href = _ref.href,\n targetBlank = _ref.targetBlank,\n className = _ref.className,\n onClick = _ref.onClick,\n hideDropdown = _ref.hideDropdown,\n children = _ref.children,\n otherProps = _objectWithoutProperties(_ref, ['href', 'targetBlank', 'className', 'onClick', 'hideDropdown', 'children']);\n\n return (\n /* eslint-disable jsx-a11y/no-static-element-interactions */\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'a',\n _extends({}, _extends({ href: href }, otherProps), {\n target: targetBlank && '_blank',\n rel: targetBlank && 'noopener noreferrer',\n className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()(__WEBPACK_IMPORTED_MODULE_3__Dropdown_scss___default.a.menuItem, className),\n onClick: __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__utils__[\"f\" /* createFunctionsChain */])(onClick, hideDropdown)\n }),\n children\n )\n /* eslint-enable jsx-a11y/no-static-element-interactions */\n\n );\n};\n\nMenuItemNativeLink.propTypes = {\n href: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n targetBlank: __webpack_require__(/*! prop-types */ 0).bool,\n className: __webpack_require__(/*! prop-types */ 0).string,\n onClick: __webpack_require__(/*! prop-types */ 0).func,\n hideDropdown: __webpack_require__(/*! prop-types */ 0).func.isRequired,\n children: __webpack_require__(/*! prop-types */ 0).any\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (MenuItemNativeLink);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/Dropdown/MenuItem/MenuItemNativeLink.jsx\n// module id = 785\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/Dropdown/MenuItem/MenuItemNativeLink.jsx?", + ); + + /***/ + }, + /* 786 */ + /* exports provided: default */ + /* exports used: default */ + /*!**********************************************************!*\ + !*** ./app/libs/components/Dropdown/Message/Message.jsx ***! + \**********************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Message_scss__ = __webpack_require__(/*! ./Message.scss */ 1049);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Message_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__Message_scss__);\n\n\n\n\n\nvar Message = function Message(_ref) {\n var type = _ref.type,\n className = _ref.className,\n children = _ref.children;\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()(__WEBPACK_IMPORTED_MODULE_2__Message_scss___default.a.message, __WEBPACK_IMPORTED_MODULE_2__Message_scss___default.a[type], className) },\n children\n );\n};\n\nMessage.propTypes = {\n type: __webpack_require__(/*! prop-types */ 0).oneOf(['warning', 'error', 'info', 'success']).isRequired,\n className: __webpack_require__(/*! prop-types */ 0).string,\n children: __webpack_require__(/*! prop-types */ 0).any\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (Message);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/Dropdown/Message/Message.jsx\n// module id = 786\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/Dropdown/Message/Message.jsx?", + ); + + /***/ + }, + /* 787 */ + /* exports provided: default */ + /* exports used: default */ + /*!*******************************************************!*\ + !*** ./app/libs/components/DropdownLEGACY/Dialog.jsx ***! + \*******************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils__ = __webpack_require__(/*! ../../utils */ 20);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\n\n\n\n\n\nvar babelPluginFlowReactPropTypes_proptype_HideDropdown = __webpack_require__(/*! ./withDropdownState */ 71).babelPluginFlowReactPropTypes_proptype_HideDropdown || __webpack_require__(/*! react */ 1).PropTypes.any;\n\nvar babelPluginFlowReactPropTypes_proptype_HandleInternalClick = __webpack_require__(/*! ./withDropdownState */ 71).babelPluginFlowReactPropTypes_proptype_HandleInternalClick || __webpack_require__(/*! react */ 1).PropTypes.any;\n\nvar Dialog = function Dialog(_ref) {\n var children = _ref.children,\n isVisible = _ref.isVisible,\n handleInternalClick = _ref.handleInternalClick,\n hideDropdown = _ref.hideDropdown,\n otherProps = _objectWithoutProperties(_ref, ['children', 'isVisible', 'handleInternalClick', 'hideDropdown']);\n\n return isVisible &&\n // eslint-disable-next-line jsx-a11y/no-static-element-interactions\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n _extends({}, otherProps, { onClick: __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__utils__[\"f\" /* createFunctionsChain */])(handleInternalClick, otherProps.onClick) }),\n typeof children === 'function' ? children(hideDropdown) : children\n );\n};\n\nDialog.propTypes = {\n children: __webpack_require__(/*! prop-types */ 0).oneOfType([__webpack_require__(/*! prop-types */ 0).func, __webpack_require__(/*! prop-types */ 0).any]).isRequired,\n isVisible: __webpack_require__(/*! prop-types */ 0).bool.isRequired,\n handleInternalClick: babelPluginFlowReactPropTypes_proptype_HandleInternalClick,\n hideDropdown: babelPluginFlowReactPropTypes_proptype_HideDropdown\n};\nDialog.defaultProps = {\n role: 'dialog'\n};\n\nDialog.propTypes = {\n children: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.element]).isRequired\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Dialog);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/DropdownLEGACY/Dialog.jsx\n// module id = 787\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/DropdownLEGACY/Dialog.jsx?", + ); + + /***/ + }, + /* 788 */ + /* exports provided: default */ + /*!*********************************************************!*\ + !*** ./app/libs/components/DropdownLEGACY/Dropdown.jsx ***! + \*********************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Toggler__ = __webpack_require__(/*! ./Toggler */ 789);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Dialog__ = __webpack_require__(/*! ./Dialog */ 787);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__withDropdownState__ = __webpack_require__(/*! ./withDropdownState */ 71);\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\n\n\n\n\n\n\n\n\nvar babelPluginFlowReactPropTypes_proptype_HideDropdown = __webpack_require__(/*! ./withDropdownState */ 71).babelPluginFlowReactPropTypes_proptype_HideDropdown || __webpack_require__(/*! react */ 1).PropTypes.any;\n\nvar babelPluginFlowReactPropTypes_proptype_HandleInternalClick = __webpack_require__(/*! ./withDropdownState */ 71).babelPluginFlowReactPropTypes_proptype_HandleInternalClick || __webpack_require__(/*! react */ 1).PropTypes.any;\n\nvar babelPluginFlowReactPropTypes_proptype_ToggleVisibility = __webpack_require__(/*! ./withDropdownState */ 71).babelPluginFlowReactPropTypes_proptype_ToggleVisibility || __webpack_require__(/*! react */ 1).PropTypes.any;\n\nvar Dropdown = function Dropdown(_ref) {\n var children = _ref.children,\n isVisible = _ref.isVisible,\n toggleVisibility = _ref.toggleVisibility,\n hideDropdown = _ref.hideDropdown,\n handleInternalClick = _ref.handleInternalClick,\n otherProps = _objectWithoutProperties(_ref, ['children', 'isVisible', 'toggleVisibility', 'hideDropdown', 'handleInternalClick']);\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n otherProps,\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.Children.map(children, function (child) {\n switch (child.props.role) {\n case 'link':\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.cloneElement(child, { toggleVisibility: toggleVisibility });\n case 'dialog':\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.cloneElement(child, { isVisible: isVisible, handleInternalClick: handleInternalClick, hideDropdown: hideDropdown });\n default:\n return child;\n }\n })\n );\n};\n\nDropdown.propTypes = {\n children: __webpack_require__(/*! prop-types */ 0).any.isRequired,\n isVisible: __webpack_require__(/*! prop-types */ 0).bool.isRequired,\n toggleVisibility: babelPluginFlowReactPropTypes_proptype_ToggleVisibility,\n hideDropdown: babelPluginFlowReactPropTypes_proptype_HandleInternalClick,\n handleInternalClick: babelPluginFlowReactPropTypes_proptype_HideDropdown\n};\nDropdown.propTypes = {\n children: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.array.isRequired,\n isVisible: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool.isRequired,\n toggleVisibility: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func.isRequired,\n hideDropdown: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func.isRequired,\n handleInternalClick: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func.isRequired\n};\n\nvar WrappedDropdown = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__withDropdownState__[\"default\"])(Dropdown);\n\nWrappedDropdown.Toggler = __WEBPACK_IMPORTED_MODULE_2__Toggler__[\"a\" /* default */];\nWrappedDropdown.Dialog = __WEBPACK_IMPORTED_MODULE_3__Dialog__[\"a\" /* default */];\n\n/* unused harmony default export */ var _unused_webpack_default_export = (WrappedDropdown);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/DropdownLEGACY/Dropdown.jsx\n// module id = 788\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/DropdownLEGACY/Dropdown.jsx?", + ); + + /***/ + }, + /* 789 */ + /* exports provided: default */ + /* exports used: default */ + /*!********************************************************!*\ + !*** ./app/libs/components/DropdownLEGACY/Toggler.jsx ***! + \********************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils__ = __webpack_require__(/*! ../../utils */ 20);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3____ = __webpack_require__(/*! .. */ 11);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\n\n\n\n\n\n\n\nvar babelPluginFlowReactPropTypes_proptype_ToggleVisibility = __webpack_require__(/*! ./withDropdownState */ 71).babelPluginFlowReactPropTypes_proptype_ToggleVisibility || __webpack_require__(/*! react */ 1).PropTypes.any;\n\nvar Toggler = function Toggler(_ref) {\n var children = _ref.children,\n toggleVisibility = _ref.toggleVisibility,\n otherProps = _objectWithoutProperties(_ref, [\'children\', \'toggleVisibility\']);\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_3____["k" /* ButtonLike */],\n _extends({}, otherProps, { onClick: __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__utils__["f" /* createFunctionsChain */])(toggleVisibility, otherProps.onClick) }),\n children\n );\n};\n\nToggler.propTypes = {\n children: __webpack_require__(/*! prop-types */ 0).any.isRequired,\n toggleVisibility: babelPluginFlowReactPropTypes_proptype_ToggleVisibility\n};\nToggler.defaultProps = {\n role: \'link\'\n};\n\nToggler.propTypes = {\n children: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.node.isRequired,\n toggleVisibility: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func\n};\n\n/* harmony default export */ __webpack_exports__["a"] = (Toggler);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/DropdownLEGACY/Toggler.jsx\n// module id = 789\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/DropdownLEGACY/Toggler.jsx?', + ); + + /***/ + }, + /* 790 */ + /* exports provided: default */ + /* exports used: default */ + /*!***************************************************!*\ + !*** ./app/libs/components/Ellipsis/Ellipsis.jsx ***! + \***************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Ellipsis_scss__ = __webpack_require__(/*! ./Ellipsis.scss */ 1050);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Ellipsis_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__Ellipsis_scss__);\nfunction _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\n\n\n\n\n\nvar Ellipsis = function Ellipsis(_ref) {\n var faded = _ref.faded;\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'span',\n { className: __WEBPACK_IMPORTED_MODULE_2_classnames___default()(_defineProperty({}, __WEBPACK_IMPORTED_MODULE_3__Ellipsis_scss___default.a.faded, faded)) },\n '...'\n );\n};\n\nEllipsis.propTypes = {\n faded: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.bool\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Ellipsis);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/Ellipsis/Ellipsis.jsx\n// module id = 790\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/Ellipsis/Ellipsis.jsx?", + ); + + /***/ + }, + /* 791 */ + /* exports provided: default */ + /*!*******************************************************!*\ + !*** ./app/libs/components/FullScreen/FullScreen.jsx ***! + \*******************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_dom__ = __webpack_require__(/*! react-dom */ 16);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_dom___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react_dom__);\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\n/* eslint new-cap: 0 */\n\n\n\n\nvar FullScreen = function (_React$Component) {\n _inherits(FullScreen, _React$Component);\n\n function FullScreen() {\n _classCallCheck(this, FullScreen);\n\n return _possibleConstructorReturn(this, (FullScreen.__proto__ || Object.getPrototypeOf(FullScreen)).apply(this, arguments));\n }\n\n _createClass(FullScreen, [{\n key: \'componentDidMount\',\n value: function componentDidMount() {\n this.domContainer = document.createElement(\'div\');\n document.body.appendChild(this.domContainer);\n __WEBPACK_IMPORTED_MODULE_2_react_dom___default.a.unstable_renderSubtreeIntoContainer(this, this.props.children, this.domContainer);\n }\n }, {\n key: \'componentWillReceiveProps\',\n value: function componentWillReceiveProps() {\n __WEBPACK_IMPORTED_MODULE_2_react_dom___default.a.unstable_renderSubtreeIntoContainer(this, this.props.children, this.domContainer);\n }\n }, {\n key: \'componentWillUnmount\',\n value: function componentWillUnmount() {\n __WEBPACK_IMPORTED_MODULE_2_react_dom___default.a.unmountComponentAtNode(this.domContainer);\n document.body.removeChild(this.domContainer);\n }\n }, {\n key: \'render\',\n value: function render() {\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.DOM.noscript();\n }\n }]);\n\n return FullScreen;\n}(__WEBPACK_IMPORTED_MODULE_1_react___default.a.Component);\n\nFullScreen.propTypes = {\n children: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.any.isRequired\n};\n/* unused harmony default export */ var _unused_webpack_default_export = (FullScreen);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/FullScreen/FullScreen.jsx\n// module id = 791\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/FullScreen/FullScreen.jsx?', + ); + + /***/ + }, + /* 792 */ + /* exports provided: default */ + /* exports used: default */ + /*!*****************************************************!*\ + !*** ./app/libs/components/Glyphicon/Glyphicon.jsx ***! + \*****************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_classnames__);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\n\n\n\nvar Glyphicon = function Glyphicon(_ref) {\n var className = _ref.className,\n name = _ref.name,\n _ref$ariaHidden = _ref.ariaHidden,\n ariaHidden = _ref$ariaHidden === undefined ? true : _ref$ariaHidden,\n srOnlyLabel = _ref.srOnlyLabel,\n otherProps = _objectWithoutProperties(_ref, ['className', 'name', 'ariaHidden', 'srOnlyLabel']);\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'span',\n _extends({\n className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()('glyphicon', 'glyphicon-' + name, className),\n 'aria-hidden': ariaHidden\n }, otherProps),\n srOnlyLabel && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'span',\n { className: 'sr-only' },\n srOnlyLabel\n )\n );\n};\n\nGlyphicon.propTypes = {\n className: __webpack_require__(/*! prop-types */ 0).string,\n name: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n ariaHidden: __webpack_require__(/*! prop-types */ 0).bool,\n srOnlyLabel: __webpack_require__(/*! prop-types */ 0).string\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (Glyphicon);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/Glyphicon/Glyphicon.jsx\n// module id = 792\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/Glyphicon/Glyphicon.jsx?", + ); + + /***/ + }, + /* 793 */ + /* exports provided: default */ + /* exports used: default */ + /*!******************************************************!*\ + !*** ./app/libs/components/GoogleMaps/Map/index.jsx ***! + \******************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_google_maps__ = __webpack_require__(/*! react-google-maps */ 261);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_google_maps___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react_google_maps__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils__ = __webpack_require__(/*! ../../../utils */ 20);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__styles_json__ = __webpack_require__(/*! ./styles.json */ 276);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__styles_json___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__styles_json__);\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\n\n\n\n\nvar babelPluginFlowReactPropTypes_proptype_GoogleMapsCenter = __webpack_require__(/*! ../../../../types */ 4).babelPluginFlowReactPropTypes_proptype_GoogleMapsCenter || __webpack_require__(/*! react */ 1).PropTypes.any;\n\nvar babelPluginFlowReactPropTypes_proptype_GoogleMapRef = __webpack_require__(/*! ../../../../types */ 4).babelPluginFlowReactPropTypes_proptype_GoogleMapRef || __webpack_require__(/*! react */ 1).PropTypes.any;\n\nvar babelPluginFlowReactPropTypes_proptype_GoogleMap = __webpack_require__(/*! ../../../../types */ 4).babelPluginFlowReactPropTypes_proptype_GoogleMap || __webpack_require__(/*! react */ 1).PropTypes.any;\n\n\n\nvar Map = function (_React$Component) {\n _inherits(Map, _React$Component);\n\n function Map() {\n var _ref;\n\n var _temp, _this, _ret;\n\n _classCallCheck(this, Map);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Map.__proto__ || Object.getPrototypeOf(Map)).call.apply(_ref, [this].concat(args))), _this), _this.setGoogleMapRef = function (googleMap) {\n _this.googleMap = googleMap;\n if (googleMap && _this.props.setGoogleMapRef) {\n _this.props.setGoogleMapRef(googleMap.props.map);\n }\n }, _this.handleZoomChange = function () {\n var _this2 = _this,\n props = _this2.props,\n googleMap = _this2.googleMap;\n\n var nextZoomLevel = googleMap.getZoom();\n if (nextZoomLevel !== props.zoomLevel) {\n props.onZoomChange(nextZoomLevel);\n }\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n _createClass(Map, [{\n key: \'render\',\n value: function render() {\n if (!__WEBPACK_IMPORTED_MODULE_2__utils__["c" /* isGoogleDefined */]()) return null;\n\n var _props = this.props,\n center = _props.center,\n zoomLevel = _props.zoomLevel,\n className = _props.className,\n children = _props.children;\n\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1_react_google_maps__["GoogleMapLoader"], {\n containerElement: __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\'div\', { className: className }),\n googleMapElement: __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_1_react_google_maps__["GoogleMap"],\n {\n ref: this.setGoogleMapRef,\n center: center,\n zoom: zoomLevel,\n options: {\n draggable: true,\n disableDefaultUI: true,\n zoomControl: true,\n zoomControlOptions: {\n position: google.maps.ControlPosition.TOP_LEFT\n },\n scrollwheel: false,\n styles: __WEBPACK_IMPORTED_MODULE_3__styles_json___default.a\n },\n onZoomChanged: this.handleZoomChange\n },\n children\n )\n });\n }\n }]);\n\n return Map;\n}(__WEBPACK_IMPORTED_MODULE_0_react___default.a.Component);\n\nMap.propTypes = {\n center: babelPluginFlowReactPropTypes_proptype_GoogleMapsCenter,\n zoomLevel: __webpack_require__(/*! prop-types */ 0).number.isRequired,\n className: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n children: __webpack_require__(/*! prop-types */ 0).any,\n onZoomChange: __webpack_require__(/*! prop-types */ 0).func.isRequired,\n setGoogleMapRef: __webpack_require__(/*! prop-types */ 0).func\n};\n/* harmony default export */ __webpack_exports__["a"] = (Map);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/GoogleMaps/Map/index.jsx\n// module id = 793\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/GoogleMaps/Map/index.jsx?', + ); + + /***/ + }, + /* 794 */ + /* exports provided: default */ + /* exports used: default */ + /*!*********************************************************!*\ + !*** ./app/libs/components/GoogleMaps/Marker/index.jsx ***! + \*********************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_google_maps__ = __webpack_require__(/*! react-google-maps */ 261);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_google_maps___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react_google_maps__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__index_scss__ = __webpack_require__(/*! ./index.scss */ 1051);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__index_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__index_scss__);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\n\n\n\nvar babelPluginFlowReactPropTypes_proptype_GoogleMapsCenter = __webpack_require__(/*! ../../../../types */ 4).babelPluginFlowReactPropTypes_proptype_GoogleMapsCenter || __webpack_require__(/*! react */ 1).PropTypes.any;\n\n\n\nvar Marker = function Marker(_ref) {\n var center = _ref.center,\n radius = _ref.radius,\n color = _ref.color,\n children = _ref.children,\n otherProps = _objectWithoutProperties(_ref, ['center', 'radius', 'color', 'children']);\n\n if (children) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_1_react_google_maps__[\"OverlayView\"],\n _extends({\n position: center,\n mapPaneName: __WEBPACK_IMPORTED_MODULE_1_react_google_maps__[\"OverlayView\"].OVERLAY_MOUSE_TARGET,\n getPixelPositionOffset: function getPixelPositionOffset(width, height) {\n return { x: -(width / 2), y: -(height + 15) };\n }\n }, otherProps),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_2__index_scss___default.a.overlayView },\n children\n )\n );\n }\n\n if (radius && radius > 0) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1_react_google_maps__[\"Circle\"], _extends({\n center: center,\n radius: radius,\n options: {\n fillColor: '#000',\n fillOpacity: 0.1,\n strokeColor: color || '#000',\n strokeWeight: 1\n }\n }, otherProps));\n }\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1_react_google_maps__[\"Marker\"], _extends({\n position: center,\n draggable: false,\n icon: {\n path: 'M16 40s16-11.163 16-24S24.837 0 16 0 0 3.163 0 16s16 24 16 24z',\n strokeColor: '#e54d50',\n strokeOpacity: 1,\n strokeWeight: 8,\n fillColor: '#fff',\n fillOpacity: 1,\n scale: 0.7,\n anchor: new google.maps.Point(32 / 2, 40 + 8) }\n }, otherProps));\n};\n\nMarker.propTypes = {\n radius: __webpack_require__(/*! prop-types */ 0).number,\n center: babelPluginFlowReactPropTypes_proptype_GoogleMapsCenter,\n color: __webpack_require__(/*! prop-types */ 0).string,\n children: __webpack_require__(/*! prop-types */ 0).any\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (Marker);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/GoogleMaps/Marker/index.jsx\n// module id = 794\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/GoogleMaps/Marker/index.jsx?", + ); + + /***/ + }, + /* 795 */ + /* exports provided: default */ + /* exports used: default */ + /*!*************************************************!*\ + !*** ./app/libs/components/GoogleMaps/index.js ***! + \*************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Map__ = __webpack_require__(/*! ./Map */ 793);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Marker__ = __webpack_require__(/*! ./Marker */ 794);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__SearchBox__ = __webpack_require__(/*! ./SearchBox */ 300);\n\n\n\n\n/* harmony default export */ __webpack_exports__["a"] = ({\n Map: __WEBPACK_IMPORTED_MODULE_0__Map__["a" /* default */],\n Marker: __WEBPACK_IMPORTED_MODULE_1__Marker__["a" /* default */],\n SearchBox: __WEBPACK_IMPORTED_MODULE_2__SearchBox__["a" /* default */]\n});\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/GoogleMaps/index.js\n// module id = 795\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/GoogleMaps/index.js?', + ); + + /***/ + }, + /* 796 */ + /* exports provided: default */ + /*!***************************************!*\ + !*** ./app/libs/components/H1/H1.jsx ***! + \***************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__H1_scss__ = __webpack_require__(/*! ./H1.scss */ 1052);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__H1_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__H1_scss__);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\n\n\n\n\n\nvar H1 = function H1(_ref) {\n var children = _ref.children,\n className = _ref.className,\n otherProps = _objectWithoutProperties(_ref, ['children', 'className']);\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'h1',\n _extends({ className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()(__WEBPACK_IMPORTED_MODULE_2__H1_scss___default.a.h1, className) }, otherProps),\n children\n );\n};\n\nH1.propTypes = {\n children: __webpack_require__(/*! prop-types */ 0).any,\n className: __webpack_require__(/*! prop-types */ 0).string\n};\n/* unused harmony default export */ var _unused_webpack_default_export = (H1);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/H1/H1.jsx\n// module id = 796\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/H1/H1.jsx?", + ); + + /***/ + }, + /* 797 */ + /* exports provided: default */ + /* exports used: default */ + /*!***************************************************!*\ + !*** ./app/libs/components/HostDoor/HostDoor.jsx ***! + \***************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_responsive__ = __webpack_require__(/*! react-responsive */ 177);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_responsive___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react_responsive__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3____ = __webpack_require__(/*! .. */ 11);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__utils_fng_photos__ = __webpack_require__(/*! ../../utils/fng/photos */ 51);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__assets_styles_resources_screenSizes__ = __webpack_require__(/*! ../../../assets/styles/resources/screenSizes */ 105);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__HostDoor_scss__ = __webpack_require__(/*! ./HostDoor.scss */ 1053);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__HostDoor_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6__HostDoor_scss__);\n\n\n\n\n\n\n\n\n\n\nvar widthAtWhichImageVisible = __WEBPACK_IMPORTED_MODULE_5__assets_styles_resources_screenSizes__[\"a\" /* SCREEN_MD */];\nvar widthAtWhichImageHidden = __WEBPACK_IMPORTED_MODULE_5__assets_styles_resources_screenSizes__[\"a\" /* SCREEN_MD */] - 1;\n\nvar HostDoor = function HostDoor(props) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'section',\n { className: __WEBPACK_IMPORTED_MODULE_6__HostDoor_scss___default.a.HostDoor },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_2_react_responsive___default.a,\n {\n minWidth: widthAtWhichImageVisible\n // MediaQuery values are preloaded widths to use when server rendering\n , values: {\n width: props.tablet || props.desktop ? widthAtWhichImageVisible : widthAtWhichImageHidden\n }\n },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_3____[\"e\" /* CalculatedBreakpoint */],\n null,\n function (width, height) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n {\n className: __WEBPACK_IMPORTED_MODULE_6__HostDoor_scss___default.a.hostDoorContainer,\n style: {\n backgroundImage: 'url(' + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__utils_fng_photos__[\"a\" /* buildPhotoUrl */])({\n url: props.cloudinaryUrl + 'host-door.jpg',\n crop: 'fill',\n gravity: 'north',\n width: width,\n height: height\n }) + ')'\n }\n },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()('container', __WEBPACK_IMPORTED_MODULE_6__HostDoor_scss___default.a.innerDoor) },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'h2',\n { className: __WEBPACK_IMPORTED_MODULE_6__HostDoor_scss___default.a.title },\n props.title\n ),\n props.description && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'p',\n { className: __WEBPACK_IMPORTED_MODULE_6__HostDoor_scss___default.a.description },\n props.description\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_3____[\"c\" /* Button */],\n { size: 'xl', asNativeLink: true, href: props.buttonUrl, orange: true, className: __WEBPACK_IMPORTED_MODULE_6__HostDoor_scss___default.a.button },\n props.buttonText\n )\n )\n );\n }\n )\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_2_react_responsive___default.a,\n {\n maxWidth: widthAtWhichImageHidden,\n values: {\n width: props.tablet || props.desktop ? widthAtWhichImageVisible : widthAtWhichImageHidden\n }\n },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()('container', __WEBPACK_IMPORTED_MODULE_6__HostDoor_scss___default.a.innerDoor) },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'h2',\n { className: __WEBPACK_IMPORTED_MODULE_6__HostDoor_scss___default.a.title },\n props.title\n ),\n props.description && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'p',\n { className: __WEBPACK_IMPORTED_MODULE_6__HostDoor_scss___default.a.description },\n props.description\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_3____[\"c\" /* Button */],\n { size: 'xl', asNativeLink: true, href: props.buttonUrl, orange: true, className: __WEBPACK_IMPORTED_MODULE_6__HostDoor_scss___default.a.button },\n props.buttonText\n )\n )\n )\n );\n};\n\nHostDoor.propTypes = {\n className: __webpack_require__(/*! prop-types */ 0).string,\n cloudinaryUrl: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n title: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n description: __webpack_require__(/*! prop-types */ 0).string,\n buttonUrl: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n buttonText: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n tablet: __webpack_require__(/*! prop-types */ 0).bool.isRequired,\n desktop: __webpack_require__(/*! prop-types */ 0).bool.isRequired\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (HostDoor);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/HostDoor/HostDoor.jsx\n// module id = 797\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/HostDoor/HostDoor.jsx?", + ); + + /***/ + }, + /* 798 */ + /* exports provided: default */ + /* exports used: default */ + /*!*************************************************************!*\ + !*** ./app/libs/components/HostHeroImage/HostHeroImage.jsx ***! + \*************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_fng_photos__ = __webpack_require__(/*! ../../utils/fng/photos */ 51);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3____ = __webpack_require__(/*! .. */ 11);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__HostHeroImage_scss__ = __webpack_require__(/*! ./HostHeroImage.scss */ 1054);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__HostHeroImage_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__HostHeroImage_scss__);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\n\n\n\n\n\n\nvar babelPluginFlowReactPropTypes_proptype_CloudinaryTransformations = __webpack_require__(/*! ../../../types */ 4).babelPluginFlowReactPropTypes_proptype_CloudinaryTransformations || __webpack_require__(/*! react */ 1).PropTypes.any;\n\n\n\nvar HostHeroImage = function HostHeroImage(props) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_3____[\"e\" /* CalculatedBreakpoint */],\n null,\n function (width, height) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n {\n className: __WEBPACK_IMPORTED_MODULE_4__HostHeroImage_scss___default.a.HostHeroImage,\n style: {\n backgroundImage: 'url(' + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__utils_fng_photos__[\"a\" /* buildPhotoUrl */])(_extends({\n url: '' + props.cloudinaryUrl + props.imageName\n }, props.transformations, {\n width: width,\n height: height\n })) + ')'\n }\n },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()('container', __WEBPACK_IMPORTED_MODULE_4__HostHeroImage_scss___default.a.heroInner) },\n props.label && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'p',\n { className: __WEBPACK_IMPORTED_MODULE_4__HostHeroImage_scss___default.a.label },\n props.label\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'h1',\n { className: __WEBPACK_IMPORTED_MODULE_4__HostHeroImage_scss___default.a.headline },\n props.headline,\n props.hasTrademark && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'sup',\n { className: __WEBPACK_IMPORTED_MODULE_4__HostHeroImage_scss___default.a.trademark },\n '\\u2122'\n )\n ),\n props.subHeadline && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'h2',\n { className: __WEBPACK_IMPORTED_MODULE_4__HostHeroImage_scss___default.a.subHeadline },\n props.subHeadline\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_3____[\"c\" /* Button */],\n { size: 'xl', orange: true, asNativeLink: true, href: props.newListingPath },\n 'Add a Listing Now'\n )\n )\n );\n }\n );\n};\n\nHostHeroImage.propTypes = {\n newListingPath: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n cloudinaryUrl: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n imageName: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n transformations: babelPluginFlowReactPropTypes_proptype_CloudinaryTransformations,\n hasTrademark: __webpack_require__(/*! prop-types */ 0).bool,\n label: __webpack_require__(/*! prop-types */ 0).string,\n headline: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n subHeadline: __webpack_require__(/*! prop-types */ 0).string\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (HostHeroImage);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/HostHeroImage/HostHeroImage.jsx\n// module id = 798\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/HostHeroImage/HostHeroImage.jsx?", + ); + + /***/ + }, + /* 799 */ + /* exports provided: default */ + /* exports used: default */ + /*!*********************************************************!*\ + !*** ./app/libs/components/HostSection/HostSection.jsx ***! + \*********************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__HostSection_scss__ = __webpack_require__(/*! ./HostSection.scss */ 1055);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__HostSection_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__HostSection_scss__);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\n\n\n\n\n\nvar HostSection = function HostSection(props) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('section', _extends({}, props, { className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()('container', __WEBPACK_IMPORTED_MODULE_2__HostSection_scss___default.a.HostSection, props.className) }));\n};\n\nHostSection.propTypes = {\n children: __webpack_require__(/*! prop-types */ 0).any,\n className: __webpack_require__(/*! prop-types */ 0).string\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (HostSection);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/HostSection/HostSection.jsx\n// module id = 799\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/HostSection/HostSection.jsx?", + ); + + /***/ + }, + /* 800 */ + /* exports provided: default */ + /* exports used: default */ + /*!*********************************************************************!*\ + !*** ./app/libs/components/HostSectionHeader/HostSectionHeader.jsx ***! + \*********************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__HostSectionHeader_scss__ = __webpack_require__(/*! ./HostSectionHeader.scss */ 1056);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__HostSectionHeader_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__HostSectionHeader_scss__);\n\n\n\n\n\nvar HostSectionHeader = function HostSectionHeader(props) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()('container', __WEBPACK_IMPORTED_MODULE_2__HostSectionHeader_scss___default.a.HostSectionHeader) },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'h2',\n { className: __WEBPACK_IMPORTED_MODULE_2__HostSectionHeader_scss___default.a.title },\n props.title\n ),\n props.description && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'p',\n { className: __WEBPACK_IMPORTED_MODULE_2__HostSectionHeader_scss___default.a.description },\n props.description\n )\n );\n};\n\nHostSectionHeader.propTypes = {\n title: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n description: __webpack_require__(/*! prop-types */ 0).string\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (HostSectionHeader);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/HostSectionHeader/HostSectionHeader.jsx\n// module id = 800\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/HostSectionHeader/HostSectionHeader.jsx?", + ); + + /***/ + }, + /* 801 */ + /* exports provided: default */ + /* exports used: default */ + /*!*************************************************************!*\ + !*** ./app/libs/components/HostSteps/HostStep/HostStep.jsx ***! + \*************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__HostStep_scss__ = __webpack_require__(/*! ./HostStep.scss */ 1057);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__HostStep_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__HostStep_scss__);\n\n\n\nvar babelPluginFlowReactPropTypes_proptype_HostStepData = __webpack_require__(/*! ../../../../types/hostPages */ 143).babelPluginFlowReactPropTypes_proptype_HostStepData || __webpack_require__(/*! react */ 1).PropTypes.any;\n\n\n\nvar HostStep = function HostStep(props) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()('container', __WEBPACK_IMPORTED_MODULE_2__HostStep_scss___default.a.HostStep) },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_2__HostStep_scss___default.a.title },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'span',\n { className: __WEBPACK_IMPORTED_MODULE_2__HostStep_scss___default.a.number },\n props.number\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'h3',\n { className: __WEBPACK_IMPORTED_MODULE_2__HostStep_scss___default.a.text },\n props.title,\n props.createListingType && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'span',\n { className: __WEBPACK_IMPORTED_MODULE_2__HostStep_scss___default.a.textHighlight },\n props.typeTitle\n )\n )\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'section',\n { className: __WEBPACK_IMPORTED_MODULE_2__HostStep_scss___default.a.qa },\n props.QA.map(function (qaData, index) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { key: index, className: __WEBPACK_IMPORTED_MODULE_2__HostStep_scss___default.a.qaData },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'h3',\n { className: __WEBPACK_IMPORTED_MODULE_2__HostStep_scss___default.a.question },\n qaData.question\n ),\n qaData.answers.length > 1 ? __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'ul',\n null,\n qaData.answers.map(function (answer, answersIndex) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'li',\n { key: answersIndex },\n answer\n );\n })\n ) : __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'p',\n { className: __WEBPACK_IMPORTED_MODULE_2__HostStep_scss___default.a.answer },\n qaData.answers[0]\n )\n );\n })\n )\n );\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (HostStep);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/HostSteps/HostStep/HostStep.jsx\n// module id = 801\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/HostSteps/HostStep/HostStep.jsx?", + ); + + /***/ + }, + /* 802 */ + /* exports provided: default */ + /* exports used: default */ + /*!*****************************************************!*\ + !*** ./app/libs/components/HostSteps/HostSteps.jsx ***! + \*****************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1____ = __webpack_require__(/*! .. */ 11);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__HostStep_HostStep__ = __webpack_require__(/*! ./HostStep/HostStep */ 801);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__HostSteps_scss__ = __webpack_require__(/*! ./HostSteps.scss */ 1058);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__HostSteps_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__HostSteps_scss__);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\n\n\n\n\nvar babelPluginFlowReactPropTypes_proptype_HostStepData = __webpack_require__(/*! ../../../types/hostPages */ 143).babelPluginFlowReactPropTypes_proptype_HostStepData || __webpack_require__(/*! react */ 1).PropTypes.any;\n\n\n\n\nvar HostSteps = function HostSteps(props) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n \'div\',\n { className: __WEBPACK_IMPORTED_MODULE_3__HostSteps_scss___default.a.HostSteps },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n \'section\',\n null,\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1____["d" /* HostSectionHeader */], { title: props.title }),\n props.hostStepsData.map(function (step) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2__HostStep_HostStep__["a" /* default */], _extends({ key: step.number }, step));\n })\n )\n );\n};\n\nHostSteps.propTypes = {\n hostStepsData: __webpack_require__(/*! prop-types */ 0).arrayOf(babelPluginFlowReactPropTypes_proptype_HostStepData).isRequired,\n title: __webpack_require__(/*! prop-types */ 0).string.isRequired\n};\n/* harmony default export */ __webpack_exports__["a"] = (HostSteps);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/HostSteps/HostSteps.jsx\n// module id = 802\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/HostSteps/HostSteps.jsx?', + ); + + /***/ + }, + /* 803 */ + /* exports provided: default */ + /* exports used: default */ + /*!*********************************************************!*\ + !*** ./app/libs/components/HostStories/HostStories.jsx ***! + \*********************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2____ = __webpack_require__(/*! .. */ 11);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__HostStory_HostStory__ = __webpack_require__(/*! ./HostStory/HostStory */ 804);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__HostStories_scss__ = __webpack_require__(/*! ./HostStories.scss */ 1059);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__HostStories_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__HostStories_scss__);\n\n\n\n\n\n\n\n\nvar HostStories = function HostStories(props) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()(__WEBPACK_IMPORTED_MODULE_4__HostStories_scss___default.a.HostStories, props.className) },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'section',\n { className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()('container', __WEBPACK_IMPORTED_MODULE_4__HostStories_scss___default.a.hostStoriesContainer) },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'h2',\n { className: __WEBPACK_IMPORTED_MODULE_4__HostStories_scss___default.a.title },\n props.title\n ),\n props.description && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'p',\n { className: __WEBPACK_IMPORTED_MODULE_4__HostStories_scss___default.a.description },\n props.description\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_4__HostStories_scss___default.a.stories },\n props.hostStories.map(function (story) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3__HostStory_HostStory__[\"a\" /* default */], {\n key: story.id,\n cloudinaryUrl: props.cloudinaryUrl,\n storyPath: props.storyPath,\n hostName: story.name,\n type: story.type,\n profile: story.position,\n story: story.story,\n avatar: story.avatar\n });\n })\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_2____[\"c\" /* Button */],\n { size: 'xl', asNativeLink: true, href: props.buttonUrl, className: __WEBPACK_IMPORTED_MODULE_4__HostStories_scss___default.a.button },\n 'Show More Stories'\n )\n )\n );\n};\n\nHostStories.propTypes = {\n className: __webpack_require__(/*! prop-types */ 0).string,\n cloudinaryUrl: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n storyPath: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n hostStories: __webpack_require__(/*! prop-types */ 0).arrayOf(__webpack_require__(/*! prop-types */ 0).shape({\n type: __webpack_require__(/*! prop-types */ 0).oneOf(['Private Host', 'Public Host']).isRequired,\n story: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n position: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n name: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n id: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n avatar: __webpack_require__(/*! prop-types */ 0).string.isRequired\n })).isRequired,\n title: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n description: __webpack_require__(/*! prop-types */ 0).string,\n buttonUrl: __webpack_require__(/*! prop-types */ 0).string.isRequired\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (HostStories);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/HostStories/HostStories.jsx\n// module id = 803\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/HostStories/HostStories.jsx?", + ); + + /***/ + }, + /* 804 */ + /* exports provided: default */ + /* exports used: default */ + /*!*****************************************************************!*\ + !*** ./app/libs/components/HostStories/HostStory/HostStory.jsx ***! + \*****************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1____ = __webpack_require__(/*! ../.. */ 11);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_fng_photos__ = __webpack_require__(/*! ../../../utils/fng/photos */ 51);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__HostStory_scss__ = __webpack_require__(/*! ./HostStory.scss */ 1060);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__HostStory_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__HostStory_scss__);\n\n\n\n\n\n\n\nvar HostStory = function HostStory(props) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_1____[\"e\" /* CalculatedBreakpoint */],\n null,\n function (width) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_1____[\"f\" /* A */],\n {\n className: __WEBPACK_IMPORTED_MODULE_3__HostStory_scss___default.a.HostStory,\n href: props.storyPath + props.avatar,\n underline: 'none',\n color: 'none',\n style: {\n backgroundImage: 'url(' + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__utils_fng_photos__[\"a\" /* buildPhotoUrl */])({\n url: '' + props.cloudinaryUrl + props.avatar + '-back.jpg',\n width: width\n }) + ')'\n }\n },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'span',\n { className: __WEBPACK_IMPORTED_MODULE_3__HostStory_scss___default.a.type },\n props.type\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_3__HostStory_scss___default.a.innerWrapper },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_1____[\"e\" /* CalculatedBreakpoint */],\n null,\n function (avatarWidth) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1____[\"g\" /* Image */], {\n className: __WEBPACK_IMPORTED_MODULE_3__HostStory_scss___default.a.avatar,\n url: props.cloudinaryUrl + props.avatar,\n alt: props.hostName,\n width: avatarWidth\n });\n }\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_3__HostStory_scss___default.a.title },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'h3',\n null,\n props.hostName\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'h4',\n null,\n props.profile\n )\n )\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'p',\n { className: __WEBPACK_IMPORTED_MODULE_3__HostStory_scss___default.a.review },\n props.story\n )\n );\n }\n );\n};\n\nHostStory.propTypes = {\n cloudinaryUrl: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n hostName: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n type: __webpack_require__(/*! prop-types */ 0).oneOf(['Private Host', 'Public Host']).isRequired,\n profile: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n avatar: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n story: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n storyPath: __webpack_require__(/*! prop-types */ 0).string.isRequired\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (HostStory);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/HostStories/HostStory/HostStory.jsx\n// module id = 804\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/HostStories/HostStory/HostStory.jsx?", + ); + + /***/ + }, + /* 805 */ + /* exports provided: default */ + /* exports used: default */ + /*!*********************************************************!*\ + !*** ./app/libs/components/IconTooltip/IconTooltip.jsx ***! + \*********************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_react_bootstrap__ = __webpack_require__(/*! react-bootstrap */ 31);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__IconTooltip_scss__ = __webpack_require__(/*! ./IconTooltip.scss */ 1061);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__IconTooltip_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__IconTooltip_scss__);\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\n\n\n\n\n\n\nvar IconTooltip = function (_React$Component) {\n _inherits(IconTooltip, _React$Component);\n\n function IconTooltip() {\n _classCallCheck(this, IconTooltip);\n\n return _possibleConstructorReturn(this, (IconTooltip.__proto__ || Object.getPrototypeOf(IconTooltip)).apply(this, arguments));\n }\n\n _createClass(IconTooltip, [{\n key: 'renderTooltipPopover',\n value: function renderTooltipPopover() {\n var popoverStyle = this.props.popoverStyle;\n\n var domId = 'tooltip-' + Math.random().toString(36).substr(2, 5);\n\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_3_react_bootstrap__[\"b\" /* Tooltip */],\n { id: domId, style: popoverStyle },\n this.props.children\n );\n }\n }, {\n key: 'render',\n value: function render() {\n var _props = this.props,\n type = _props.type,\n placement = _props.placement,\n className = _props.className,\n superScript = _props.superScript;\n\n\n var tootltipPlacement = placement || 'right';\n var iconClassNames = __WEBPACK_IMPORTED_MODULE_2_classnames___default()(__WEBPACK_IMPORTED_MODULE_4__IconTooltip_scss___default.a.tooltip, className, superScript && __WEBPACK_IMPORTED_MODULE_4__IconTooltip_scss___default.a.super, type && __WEBPACK_IMPORTED_MODULE_4__IconTooltip_scss___default.a[type]);\n\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_3_react_bootstrap__[\"a\" /* OverlayTrigger */],\n {\n trigger: ['hover', 'focus'],\n placement: tootltipPlacement,\n overlay: this.renderTooltipPopover()\n },\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('span', { className: iconClassNames })\n );\n }\n }]);\n\n return IconTooltip;\n}(__WEBPACK_IMPORTED_MODULE_1_react___default.a.Component);\n\nIconTooltip.propTypes = {\n children: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.any.isRequired,\n type: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.oneOf(['ok', 'info', 'question', 'warning', 'error']),\n placement: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.oneOf(['top', 'right', 'bottom', 'left']),\n className: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string,\n popoverStyle: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object,\n superScript: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.bool\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (IconTooltip);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/IconTooltip/IconTooltip.jsx\n// module id = 805\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/IconTooltip/IconTooltip.jsx?", + ); + + /***/ + }, + /* 806 */ + /* exports provided: default */ + /* exports used: default */ + /*!*********************************************!*\ + !*** ./app/libs/components/Image/Image.jsx ***! + \*********************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__utils_fng_photos__ = __webpack_require__(/*! ../../utils/fng/photos */ 51);\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\n\n\nvar babelPluginFlowReactPropTypes_proptype_CloudinaryTransformations = __webpack_require__(/*! ../../../types */ 4).babelPluginFlowReactPropTypes_proptype_CloudinaryTransformations || __webpack_require__(/*! react */ 1).PropTypes.any;\n\n\n\nvar Image = function Image(_ref) {\n var id = _ref.id,\n className = _ref.className,\n style = _ref.style,\n alt = _ref.alt,\n finalWidth = _ref.finalWidth,\n finalHeight = _ref.finalHeight,\n onLoad = _ref.onLoad,\n itemProp = _ref.itemProp,\n ariaHidden = _ref.ariaHidden,\n buildPhotoUrlArgs = _objectWithoutProperties(_ref, ['id', 'className', 'style', 'alt', 'finalWidth', 'finalHeight', 'onLoad', 'itemProp', 'ariaHidden']);\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('img', {\n id: id,\n className: className,\n style: style,\n alt: alt,\n onLoad: onLoad,\n height: finalHeight || buildPhotoUrlArgs.height || undefined,\n width: finalWidth || buildPhotoUrlArgs.width || undefined,\n src: buildPhotoUrlArgs.url ? __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__utils_fng_photos__[\"a\" /* buildPhotoUrl */])(buildPhotoUrlArgs) : undefined,\n itemProp: itemProp,\n 'aria-hidden': ariaHidden\n });\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Image);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/Image/Image.jsx\n// module id = 806\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/Image/Image.jsx?", + ); + + /***/ + }, + /* 807 */ + /* exports provided: default */ + /* exports used: default */ + /*!*****************************************!*\ + !*** ./app/libs/components/Links/A.jsx ***! + \*****************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils__ = __webpack_require__(/*! ../../utils */ 20);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__utils__ = __webpack_require__(/*! ./utils */ 186);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\n/* eslint-disable jsx-a11y/anchor-has-content */\n\n\n\n\n\nvar babelPluginFlowReactPropTypes_proptype_Underline = __webpack_require__(/*! ./types */ 61).babelPluginFlowReactPropTypes_proptype_Underline || __webpack_require__(/*! react */ 1).PropTypes.any;\n\nvar babelPluginFlowReactPropTypes_proptype_Color = __webpack_require__(/*! ./types */ 61).babelPluginFlowReactPropTypes_proptype_Color || __webpack_require__(/*! react */ 1).PropTypes.any;\n\n\n\nvar A = function A(_ref) {\n var href = _ref.href,\n targetBlank = _ref.targetBlank,\n color = _ref.color,\n underline = _ref.underline,\n disabled = _ref.disabled,\n className = _ref.className,\n external = _ref.external,\n otherProps = _objectWithoutProperties(_ref, ['href', 'targetBlank', 'color', 'underline', 'disabled', 'className', 'external']);\n\n return disabled ? __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('span', _extends({}, otherProps, {\n className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__utils__[\"a\" /* computeLinkClassName */])({ color: color, underline: underline, disabled: disabled }), className)\n })) : __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('a', _extends({}, _extends({}, otherProps), {\n href: external ? __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__utils__[\"b\" /* externalUrlFor */])(href) : href,\n target: targetBlank && '_blank',\n rel: targetBlank && 'noopener noreferrer',\n className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__utils__[\"a\" /* computeLinkClassName */])({ color: color, underline: underline, disabled: disabled }), className)\n }));\n};\n\nA.propTypes = {\n href: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n targetBlank: __webpack_require__(/*! prop-types */ 0).bool,\n color: babelPluginFlowReactPropTypes_proptype_Color,\n underline: babelPluginFlowReactPropTypes_proptype_Underline,\n disabled: __webpack_require__(/*! prop-types */ 0).bool,\n className: __webpack_require__(/*! prop-types */ 0).string,\n external: __webpack_require__(/*! prop-types */ 0).bool\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (A);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/Links/A.jsx\n// module id = 807\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/Links/A.jsx?", + ); + + /***/ + }, + /* 808 */ + /* exports provided: default */ + /*!********************************************!*\ + !*** ./app/libs/components/Links/Link.jsx ***! + \********************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_router__ = __webpack_require__(/*! react-router */ 82);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__utils__ = __webpack_require__(/*! ./utils */ 186);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\n\n\n\n\nvar babelPluginFlowReactPropTypes_proptype_Underline = __webpack_require__(/*! ./types */ 61).babelPluginFlowReactPropTypes_proptype_Underline || __webpack_require__(/*! react */ 1).PropTypes.any;\n\nvar babelPluginFlowReactPropTypes_proptype_Color = __webpack_require__(/*! ./types */ 61).babelPluginFlowReactPropTypes_proptype_Color || __webpack_require__(/*! react */ 1).PropTypes.any;\n\n\n\nvar Link = function Link(_ref) {\n var to = _ref.to,\n color = _ref.color,\n underline = _ref.underline,\n disabled = _ref.disabled,\n className = _ref.className,\n otherProps = _objectWithoutProperties(_ref, ['to', 'color', 'underline', 'disabled', 'className']);\n\n return disabled ? __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('span', _extends({}, otherProps, {\n className: __WEBPACK_IMPORTED_MODULE_2_classnames___default()(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__utils__[\"a\" /* computeLinkClassName */])({ color: color, underline: underline, disabled: disabled }), className)\n })) : __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1_react_router__[\"a\" /* Link */], _extends({}, _extends({}, otherProps, { to: to }), {\n className: __WEBPACK_IMPORTED_MODULE_2_classnames___default()(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__utils__[\"a\" /* computeLinkClassName */])({ color: color, underline: underline, disabled: disabled }), className)\n }));\n};\n\nLink.propTypes = {\n to: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n color: babelPluginFlowReactPropTypes_proptype_Color,\n underline: babelPluginFlowReactPropTypes_proptype_Underline,\n disabled: __webpack_require__(/*! prop-types */ 0).bool,\n className: __webpack_require__(/*! prop-types */ 0).string\n};\n/* unused harmony default export */ var _unused_webpack_default_export = (Link);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/Links/Link.jsx\n// module id = 808\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/Links/Link.jsx?", + ); + + /***/ + }, + /* 809 */ + /* exports provided: default */ + /* exports used: default */ + /*!************************************************!*\ + !*** ./app/libs/components/Links/LinkLike.jsx ***! + \************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2____ = __webpack_require__(/*! .. */ 11);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__utils__ = __webpack_require__(/*! ./utils */ 186);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\n\n\n\n\n\nvar babelPluginFlowReactPropTypes_proptype_Underline = __webpack_require__(/*! ./types */ 61).babelPluginFlowReactPropTypes_proptype_Underline || __webpack_require__(/*! react */ 1).PropTypes.any;\n\nvar babelPluginFlowReactPropTypes_proptype_Color = __webpack_require__(/*! ./types */ 61).babelPluginFlowReactPropTypes_proptype_Color || __webpack_require__(/*! react */ 1).PropTypes.any;\n\n\n\nvar LinkLike = function LinkLike(_ref) {\n var color = _ref.color,\n underline = _ref.underline,\n disabled = _ref.disabled,\n className = _ref.className,\n setRef = _ref.setRef,\n onClick = _ref.onClick,\n otherProps = _objectWithoutProperties(_ref, ['color', 'underline', 'disabled', 'className', 'setRef', 'onClick']);\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_2____[\"k\" /* ButtonLike */],\n _extends({ inverted: color === 'white' }, { disabled: disabled, setRef: setRef, onClick: onClick }),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('span', _extends({}, otherProps, {\n className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__utils__[\"b\" /* computeLinkLikeClassName */])({ color: color, underline: underline, disabled: disabled }), className)\n }))\n );\n};\n\nLinkLike.propTypes = {\n color: babelPluginFlowReactPropTypes_proptype_Color,\n underline: babelPluginFlowReactPropTypes_proptype_Underline,\n disabled: __webpack_require__(/*! prop-types */ 0).bool,\n className: __webpack_require__(/*! prop-types */ 0).string,\n setRef: __webpack_require__(/*! prop-types */ 0).func,\n onClick: __webpack_require__(/*! prop-types */ 0).func.isRequired\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (LinkLike);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/Links/LinkLike.jsx\n// module id = 809\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/Links/LinkLike.jsx?", + ); + + /***/ + }, + /* 810 */ + /* exports provided: default */ + /* exports used: default */ + /*!***********************************************************************!*\ + !*** ./app/libs/components/ListingTile/HostInfoCard/HostInfoCard.jsx ***! + \***********************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash__ = __webpack_require__(/*! lodash */ 19);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_lodash__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__propTypeShapes__ = __webpack_require__(/*! ../../../propTypeShapes */ 57);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__momentUtils__ = __webpack_require__(/*! ../../../momentUtils */ 308);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__HostInfoCard_scss__ = __webpack_require__(/*! ./HostInfoCard.scss */ 1063);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__HostInfoCard_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6__HostInfoCard_scss__);\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\n\n\n\n\n\n\n\n\n\nvar HostInfoCard = function (_React$Component) {\n _inherits(HostInfoCard, _React$Component);\n\n function HostInfoCard() {\n _classCallCheck(this, HostInfoCard);\n\n return _possibleConstructorReturn(this, (HostInfoCard.__proto__ || Object.getPrototypeOf(HostInfoCard)).apply(this, arguments));\n }\n\n _createClass(HostInfoCard, [{\n key: 'renderBottomArrow',\n value: function renderBottomArrow() {\n var displayedAboveTarget = this.props.displayedAboveTarget;\n\n return displayedAboveTarget ? __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('div', { className: __WEBPACK_IMPORTED_MODULE_6__HostInfoCard_scss___default.a.bottomArrow }) : null;\n }\n }, {\n key: 'renderTopArrow',\n value: function renderTopArrow() {\n var displayedAboveTarget = this.props.displayedAboveTarget;\n\n return displayedAboveTarget ? null : __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('div', { className: __WEBPACK_IMPORTED_MODULE_6__HostInfoCard_scss___default.a.topArrow });\n }\n }, {\n key: 'render',\n value: function render() {\n var _props = this.props,\n listing = _props.listing,\n displayedAboveTarget = _props.displayedAboveTarget;\n var _listing$owner = listing.owner,\n createdAt = _listing$owner.createdAt,\n firstName = _listing$owner.firstName,\n lastName = _listing$owner.lastName;\n\n var hostInfoCardClass = displayedAboveTarget ? __WEBPACK_IMPORTED_MODULE_6__HostInfoCard_scss___default.a.hostInfoCardAbove : __WEBPACK_IMPORTED_MODULE_6__HostInfoCard_scss___default.a.hostInfoCardBelow;\n var hostFullName = __WEBPACK_IMPORTED_MODULE_2_lodash___default.a.compact([firstName, lastName]).join(' ');\n\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n {\n className: __WEBPACK_IMPORTED_MODULE_3_classnames___default()('hidden-xs', hostInfoCardClass),\n onMouseOver: this.props.onHover,\n onMouseOut: this.props.onUnhover\n },\n this.renderTopArrow(),\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_6__HostInfoCard_scss___default.a.hostInfoCardInner },\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_6__HostInfoCard_scss___default.a.hostName },\n hostFullName\n ),\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_6__HostInfoCard_scss___default.a.info },\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__momentUtils__[\"a\" /* memberSince */])(createdAt)\n )\n ),\n this.renderBottomArrow()\n );\n }\n }]);\n\n return HostInfoCard;\n}(__WEBPACK_IMPORTED_MODULE_1_react___default.a.Component);\n\nHostInfoCard.propTypes = {\n listing: __WEBPACK_IMPORTED_MODULE_4__propTypeShapes__[\"a\" /* listingInfoShape */].isRequired,\n onHover: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired,\n onUnhover: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired,\n displayedAboveTarget: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.bool.isRequired\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (HostInfoCard);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/ListingTile/HostInfoCard/HostInfoCard.jsx\n// module id = 810\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/ListingTile/HostInfoCard/HostInfoCard.jsx?", + ); + + /***/ + }, + /* 811 */ + /* exports provided: default */ + /* exports used: default */ + /*!*****************************************************************************!*\ + !*** ./app/libs/components/ListingTile/ListingFavorite/ListingFavorite.jsx ***! + \*****************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_lodash__ = __webpack_require__(/*! lodash */ 19);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_lodash___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_lodash__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__icons_IconHeart__ = __webpack_require__(/*! ../../icons/IconHeart */ 305);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__ListingFavorite_scss__ = __webpack_require__(/*! ./ListingFavorite.scss */ 1064);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__ListingFavorite_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5__ListingFavorite_scss__);\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _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\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\n\n\n\n\n\n\n\nvar ListingFavorite = function (_React$Component) {\n _inherits(ListingFavorite, _React$Component);\n\n function ListingFavorite(props, context) {\n _classCallCheck(this, ListingFavorite);\n\n var _this = _possibleConstructorReturn(this, (ListingFavorite.__proto__ || Object.getPrototypeOf(ListingFavorite)).call(this, props, context));\n\n __WEBPACK_IMPORTED_MODULE_3_lodash___default.a.bindAll(_this, [\'onToggleFavorite\']);\n\n _this.state = {\n favorited: _this.props.favorited\n };\n return _this;\n }\n\n _createClass(ListingFavorite, [{\n key: \'componentWillReceiveProps\',\n value: function componentWillReceiveProps(nextProps) {\n if (this.state.favorited === nextProps.favorited) return;\n\n this.setState({ favorited: nextProps.favorited });\n }\n }, {\n key: \'onToggleFavorite\',\n value: function onToggleFavorite() {\n if (this.props.disabled) return;\n var favorited = !this.state.favorited;\n\n this.setState({ favorited: favorited }, this.props.onFavoriteUnfavorite(this.props.listingId, favorited));\n }\n }, {\n key: \'render\',\n value: function render() {\n var listingId = this.props.listingId;\n var favorited = this.state.favorited;\n\n var heartFullClass = favorited ? __WEBPACK_IMPORTED_MODULE_5__ListingFavorite_scss___default.a.heartFullOn : __WEBPACK_IMPORTED_MODULE_5__ListingFavorite_scss___default.a.heartFullOff;\n\n return (\n // FIXME: Use <ButtonLike />\n /* eslint-disable jsx-a11y/no-static-element-interactions */\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n \'div\',\n { className: __WEBPACK_IMPORTED_MODULE_5__ListingFavorite_scss___default.a.heartContainer, onClick: this.onToggleFavorite },\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_4__icons_IconHeart__["a" /* default */], {\n id: \'listing-favorite-\' + listingId,\n className: __WEBPACK_IMPORTED_MODULE_2_classnames___default()(heartFullClass, _defineProperty({}, __WEBPACK_IMPORTED_MODULE_5__ListingFavorite_scss___default.a.disabled, this.props.disabled))\n })\n )\n );\n }\n }]);\n\n return ListingFavorite;\n}(__WEBPACK_IMPORTED_MODULE_1_react___default.a.Component);\n\nListingFavorite.propTypes = {\n listingId: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number.isRequired,\n favorited: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.bool.isRequired,\n onFavoriteUnfavorite: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired,\n disabled: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.bool\n};\n/* harmony default export */ __webpack_exports__["a"] = (ListingFavorite);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/ListingTile/ListingFavorite/ListingFavorite.jsx\n// module id = 811\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/ListingTile/ListingFavorite/ListingFavorite.jsx?', + ); + + /***/ + }, + /* 812 */ + /* exports provided: default */ + /* exports used: default */ + /*!*****************************************************************************************!*\ + !*** ./app/libs/components/ListingTile/ListingFavoritesCount/ListingFavoritesCount.jsx ***! + \*****************************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_bootstrap__ = __webpack_require__(/*! react-bootstrap */ 31);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_inflection__ = __webpack_require__(/*! inflection */ 218);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_inflection___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_inflection__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__ListingFavoritesCount_scss__ = __webpack_require__(/*! ./ListingFavoritesCount.scss */ 1065);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__ListingFavoritesCount_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__ListingFavoritesCount_scss__);\n\n\n\n\n\n\n\n\nvar ListingFavoritesCount = function ListingFavoritesCount(_ref) {\n var favoritesCount = _ref.favoritesCount,\n tooltipId = _ref.tooltipId;\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_2_react_bootstrap__[\"a\" /* OverlayTrigger */],\n {\n trigger: ['hover', 'focus'],\n placement: 'bottom',\n overlay: __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_2_react_bootstrap__[\"b\" /* Tooltip */],\n { id: tooltipId },\n favoritesCount + ' ' + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3_inflection__[\"inflect\"])('people', favoritesCount) + ' ' + 'have already favorited this listing'\n )\n },\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'span',\n { className: __WEBPACK_IMPORTED_MODULE_4__ListingFavoritesCount_scss___default.a.favoritesCount },\n favoritesCount\n )\n );\n};\n\nListingFavoritesCount.propTypes = {\n favoritesCount: __webpack_require__(/*! prop-types */ 0).number.isRequired,\n tooltipId: __webpack_require__(/*! prop-types */ 0).string.isRequired\n};\nListingFavoritesCount.propTypes = {\n favoritesCount: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number.isRequired,\n tooltipId: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string.isRequired\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (ListingFavoritesCount);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/ListingTile/ListingFavoritesCount/ListingFavoritesCount.jsx\n// module id = 812\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/ListingTile/ListingFavoritesCount/ListingFavoritesCount.jsx?", + ); + + /***/ + }, + /* 813 */ + /* exports provided: default */ + /* exports used: default */ + /*!***********************************************************************!*\ + !*** ./app/libs/components/ListingTile/ListingPhoto/ListingPhoto.jsx ***! + \***********************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash__ = __webpack_require__(/*! lodash */ 19);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_lodash__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3____ = __webpack_require__(/*! ../.. */ 11);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\n\n\n\n\n\nvar ListingPhoto = function (_React$Component) {\n _inherits(ListingPhoto, _React$Component);\n\n function ListingPhoto(props) {\n _classCallCheck(this, ListingPhoto);\n\n var _this = _possibleConstructorReturn(this, (ListingPhoto.__proto__ || Object.getPrototypeOf(ListingPhoto)).call(this, props));\n\n __WEBPACK_IMPORTED_MODULE_2_lodash___default.a.bindAll(_this, 'onImageLoad');\n\n _this.state = {\n imageLoadStatus: ListingPhoto.LOADING,\n showSpinner: true,\n isMounted: false\n };\n return _this;\n }\n\n _createClass(ListingPhoto, [{\n key: 'componentWillReceiveProps',\n value: function componentWillReceiveProps(nextProps) {\n if (!__WEBPACK_IMPORTED_MODULE_2_lodash___default.a.isEqual(nextProps.imageParams, this.props.imageParams)) {\n this.setState({ imageLoadStatus: ListingPhoto.LOADING });\n }\n }\n }, {\n key: 'onImageLoad',\n value: function onImageLoad() {\n this.setState({ imageLoadStatus: ListingPhoto.READY });\n }\n }, {\n key: 'componentDidMount',\n value: function componentDidMount() {\n var _this2 = this;\n\n // Delay setting `src` until component is mounted to ensure we are there to listen for the\n // `onLoad` event callback (which we miss if image is cached and we're server rendering).\n this.setState({ isMounted: true }); // eslint-disable-line react/no-did-mount-set-state\n\n // delay showing the spinner to avoid a flash when the image is immediately available\n setTimeout(function () {\n return _this2.setState({ showSpinner: true });\n }, 100);\n }\n }, {\n key: 'render',\n value: function render() {\n var _props = this.props,\n imageParams = _props.imageParams,\n imageClassName = _props.imageClassName;\n var _state = this.state,\n imageLoadStatus = _state.imageLoadStatus,\n showSpinner = _state.showSpinner;\n\n var description = imageParams.description,\n url = imageParams.url,\n otherImageParams = _objectWithoutProperties(imageParams, ['description', 'url']);\n\n var hideImage = imageLoadStatus === ListingPhoto.LOADING;\n\n var spinner = imageLoadStatus === ListingPhoto.LOADING && showSpinner ? __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3____[\"i\" /* Spinner */], { bgColor: '#dddddd' }) : null;\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: this.props.className },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3____[\"g\" /* Image */], _extends({\n alt: description || 'listing photo'\n }, otherImageParams, {\n url: this.state.isMounted ? url : undefined,\n className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()({ hide: hideImage }, imageClassName),\n onLoad: this.onImageLoad\n })),\n spinner\n );\n }\n }]);\n\n return ListingPhoto;\n}(__WEBPACK_IMPORTED_MODULE_0_react___default.a.Component);\n\nListingPhoto.LOADING = 'loading';\nListingPhoto.READY = 'ready';\nListingPhoto.propTypes = {\n className: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n imageClassName: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n imageParams: __webpack_require__(/*! prop-types */ 0).shape({\n url: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n description: __webpack_require__(/*! prop-types */ 0).string\n }).isRequired\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (ListingPhoto);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/ListingTile/ListingPhoto/ListingPhoto.jsx\n// module id = 813\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/ListingTile/ListingPhoto/ListingPhoto.jsx?", + ); + + /***/ + }, + /* 814 */ + /* exports provided: default */ + /* exports used: default */ + /*!*********************************************************************************************!*\ + !*** ./app/libs/components/ListingTile/ListingPhotoPlaceholder/ListingPhotoPlaceholder.jsx ***! + \*********************************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__icons_IconNoPhoto__ = __webpack_require__(/*! ../../icons/IconNoPhoto */ 307);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__ListingPhotoPlaceholder_scss__ = __webpack_require__(/*! ./ListingPhotoPlaceholder.scss */ 1066);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__ListingPhotoPlaceholder_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__ListingPhotoPlaceholder_scss__);\n\n\n\n\n\n\nvar ListingPhotoPlaceholder = function ListingPhotoPlaceholder() {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n \'div\',\n { className: __WEBPACK_IMPORTED_MODULE_2__ListingPhotoPlaceholder_scss___default.a.wrapper },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1__icons_IconNoPhoto__["a" /* default */], { className: __WEBPACK_IMPORTED_MODULE_2__ListingPhotoPlaceholder_scss___default.a.icon })\n );\n};\n\n/* harmony default export */ __webpack_exports__["a"] = (ListingPhotoPlaceholder);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/ListingTile/ListingPhotoPlaceholder/ListingPhotoPlaceholder.jsx\n// module id = 814\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/ListingTile/ListingPhotoPlaceholder/ListingPhotoPlaceholder.jsx?', + ); + + /***/ + }, + /* 815 */ + /* exports provided: default */ + /* exports used: default */ + /*!***********************************************************!*\ + !*** ./app/libs/components/Modal/CloseIcon/CloseIcon.jsx ***! + \***********************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1____ = __webpack_require__(/*! ../.. */ 11);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__icons_IconCloseModal__ = __webpack_require__(/*! ../../icons/IconCloseModal */ 303);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__CloseIcon_scss__ = __webpack_require__(/*! ./CloseIcon.scss */ 1068);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__CloseIcon_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__CloseIcon_scss__);\n\n\n\n\n\n\n\nvar ModalCloseIcon = function ModalCloseIcon(_ref) {\n var handleClose = _ref.handleClose;\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_1____["k" /* ButtonLike */],\n { className: __WEBPACK_IMPORTED_MODULE_3__CloseIcon_scss___default.a.wrapper, onClick: handleClose },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2__icons_IconCloseModal__["a" /* default */], { color: \'grayLighter\', className: __WEBPACK_IMPORTED_MODULE_3__CloseIcon_scss___default.a.icon })\n );\n};\n\nModalCloseIcon.propTypes = {\n handleClose: __webpack_require__(/*! prop-types */ 0).func.isRequired\n};\n/* harmony default export */ __webpack_exports__["a"] = (ModalCloseIcon);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/Modal/CloseIcon/CloseIcon.jsx\n// module id = 815\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/Modal/CloseIcon/CloseIcon.jsx?', + ); + + /***/ + }, + /* 816 */ + /* exports provided: default */ + /* exports used: default */ + /*!*****************************************************!*\ + !*** ./app/libs/components/Modal/Footer/Footer.jsx ***! + \*****************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Footer_scss__ = __webpack_require__(/*! ./Footer.scss */ 1069);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Footer_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__Footer_scss__);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\n\n\n\n\n\nvar ModalFooter = function ModalFooter(_ref) {\n var className = _ref.className,\n otherProps = _objectWithoutProperties(_ref, ['className']);\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div', _extends({ className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()(__WEBPACK_IMPORTED_MODULE_2__Footer_scss___default.a.footer, className) }, otherProps));\n};\n\nModalFooter.propTypes = {\n className: __webpack_require__(/*! prop-types */ 0).string\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (ModalFooter);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/Modal/Footer/Footer.jsx\n// module id = 816\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/Modal/Footer/Footer.jsx?", + ); + + /***/ + }, + /* 817 */ + /* exports provided: default */ + /* exports used: default */ + /*!*************************************************!*\ + !*** ./app/libs/components/Modal/Item/Item.jsx ***! + \*************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Item_scss__ = __webpack_require__(/*! ./Item.scss */ 1070);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Item_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__Item_scss__);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\n\n\n\n\n\nvar ModalItem = function ModalItem(_ref) {\n var className = _ref.className,\n otherProps = _objectWithoutProperties(_ref, ['className']);\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div', _extends({ className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()(__WEBPACK_IMPORTED_MODULE_2__Item_scss___default.a.item, className) }, otherProps));\n};\n\nModalItem.propTypes = {\n className: __webpack_require__(/*! prop-types */ 0).string\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (ModalItem);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/Modal/Item/Item.jsx\n// module id = 817\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/Modal/Item/Item.jsx?", + ); + + /***/ + }, + /* 818 */ + /* exports provided: default */ + /* exports used: default */ + /*!*******************************************************!*\ + !*** ./app/libs/components/Modal/Message/Message.jsx ***! + \*******************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2____ = __webpack_require__(/*! ../.. */ 11);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__icons_IconCloseModal__ = __webpack_require__(/*! ../../icons/IconCloseModal */ 303);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Message_scss__ = __webpack_require__(/*! ./Message.scss */ 1071);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Message_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__Message_scss__);\nfunction _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\n\n\n\n\n\n\n\nvar Message = function Message(_ref) {\n var type = _ref.type,\n className = _ref.className,\n dismiss = _ref.dismiss,\n children = _ref.children;\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n {\n className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()(__WEBPACK_IMPORTED_MODULE_4__Message_scss___default.a.message, __WEBPACK_IMPORTED_MODULE_4__Message_scss___default.a['type--' + type], _defineProperty({}, __WEBPACK_IMPORTED_MODULE_4__Message_scss___default.a.dismissable, !!dismiss), className)\n },\n children,\n dismiss && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_2____[\"k\" /* ButtonLike */],\n { className: __WEBPACK_IMPORTED_MODULE_4__Message_scss___default.a.closeIconControl, onClick: dismiss },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3__icons_IconCloseModal__[\"a\" /* default */]\n // $FlowIgnoreMe: Flow doesn't infer concatenated strings\n , { color: type + 'Text',\n className: __WEBPACK_IMPORTED_MODULE_4__Message_scss___default.a.closeIcon\n })\n )\n );\n};\n\nMessage.propTypes = {\n type: __webpack_require__(/*! prop-types */ 0).oneOf(['info', 'success', 'warning', 'danger']).isRequired,\n className: __webpack_require__(/*! prop-types */ 0).string,\n dismiss: __webpack_require__(/*! prop-types */ 0).func,\n children: __webpack_require__(/*! prop-types */ 0).any\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (Message);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/Modal/Message/Message.jsx\n// module id = 818\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/Modal/Message/Message.jsx?", + ); + + /***/ + }, + /* 819 */ + /* exports provided: default */ + /* exports used: default */ + /*!***********************************************************!*\ + !*** ./app/libs/components/Modal/Message/Title/Title.jsx ***! + \***********************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Title_scss__ = __webpack_require__(/*! ./Title.scss */ 1072);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Title_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__Title_scss__);\n\n\n\n\nvar MessageTitle = function MessageTitle(_ref) {\n var children = _ref.children;\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n \'h3\',\n { className: __WEBPACK_IMPORTED_MODULE_1__Title_scss___default.a.title },\n children\n );\n};\n\nMessageTitle.propTypes = {\n children: __webpack_require__(/*! prop-types */ 0).any\n};\n/* harmony default export */ __webpack_exports__["a"] = (MessageTitle);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/Modal/Message/Title/Title.jsx\n// module id = 819\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/Modal/Message/Title/Title.jsx?', + ); + + /***/ + }, + /* 820 */ + /* exports provided: default */ + /* exports used: default */ + /*!*********************************************!*\ + !*** ./app/libs/components/Modal/Modal.jsx ***! + \*********************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_bootstrap__ = __webpack_require__(/*! react-bootstrap */ 31);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3____ = __webpack_require__(/*! .. */ 11);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Title_Title__ = __webpack_require__(/*! ./Title/Title */ 823);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__Tabs_Tabs__ = __webpack_require__(/*! ./Tabs/Tabs */ 822);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__Tab_Tab__ = __webpack_require__(/*! ./Tab/Tab */ 821);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__Item_Item__ = __webpack_require__(/*! ./Item/Item */ 817);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__Message_Message__ = __webpack_require__(/*! ./Message/Message */ 818);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__Message_Title_Title__ = __webpack_require__(/*! ./Message/Title/Title */ 819);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__Footer_Footer__ = __webpack_require__(/*! ./Footer/Footer */ 816);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__CloseIcon_CloseIcon__ = __webpack_require__(/*! ./CloseIcon/CloseIcon */ 815);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__Modal_scss__ = __webpack_require__(/*! ./Modal.scss */ 1073);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__Modal_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_12__Modal_scss__);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar Modal = function Modal(_ref) {\n var show = _ref.show,\n children = _ref.children,\n _ref$keyboard = _ref.keyboard,\n keyboard = _ref$keyboard === undefined ? true : _ref$keyboard,\n _ref$backdrop = _ref.backdrop,\n backdrop = _ref$backdrop === undefined ? true : _ref$backdrop,\n className = _ref.className,\n dialogClassName = _ref.dialogClassName,\n showSpinner = _ref.showSpinner,\n onHide = _ref.onHide,\n otherProps = _objectWithoutProperties(_ref, [\'show\', \'children\', \'keyboard\', \'backdrop\', \'className\', \'dialogClassName\', \'showSpinner\', \'onHide\']);\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_1_react_bootstrap__["c" /* Modal */],\n _extends({\n dialogClassName: __WEBPACK_IMPORTED_MODULE_2_classnames___default()(__WEBPACK_IMPORTED_MODULE_12__Modal_scss___default.a.modal, dialogClassName)\n }, _extends({ show: show, keyboard: keyboard, backdrop: backdrop, onHide: onHide }, otherProps)),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_1_react_bootstrap__["c" /* Modal */].Body,\n null,\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n \'div\',\n { className: __WEBPACK_IMPORTED_MODULE_2_classnames___default()(__WEBPACK_IMPORTED_MODULE_12__Modal_scss___default.a.wrapper, className) },\n children,\n showSpinner && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n \'div\',\n { className: __WEBPACK_IMPORTED_MODULE_12__Modal_scss___default.a.spinner },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3____["i" /* Spinner */], null)\n )\n )\n ),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_11__CloseIcon_CloseIcon__["a" /* default */], { handleClose: onHide })\n );\n};\n\nModal.propTypes = {\n show: __webpack_require__(/*! prop-types */ 0).bool.isRequired,\n children: __webpack_require__(/*! prop-types */ 0).any,\n keyboard: __webpack_require__(/*! prop-types */ 0).bool,\n backdrop: __webpack_require__(/*! prop-types */ 0).oneOfType([__webpack_require__(/*! prop-types */ 0).bool, __webpack_require__(/*! prop-types */ 0).oneOf([\'static\'])]),\n className: __webpack_require__(/*! prop-types */ 0).string,\n dialogClassName: __webpack_require__(/*! prop-types */ 0).string,\n showSpinner: __webpack_require__(/*! prop-types */ 0).bool,\n onHide: __webpack_require__(/*! prop-types */ 0).func.isRequired\n};\nModal.Title = __WEBPACK_IMPORTED_MODULE_4__Title_Title__["a" /* default */];\nModal.Tabs = __WEBPACK_IMPORTED_MODULE_5__Tabs_Tabs__["a" /* default */];\nModal.Tab = __WEBPACK_IMPORTED_MODULE_6__Tab_Tab__["a" /* default */];\nModal.Item = __WEBPACK_IMPORTED_MODULE_7__Item_Item__["a" /* default */];\nModal.Message = __WEBPACK_IMPORTED_MODULE_8__Message_Message__["a" /* default */];\nModal.MessageTitle = __WEBPACK_IMPORTED_MODULE_9__Message_Title_Title__["a" /* default */];\nModal.Footer = __WEBPACK_IMPORTED_MODULE_10__Footer_Footer__["a" /* default */];\n\n/* harmony default export */ __webpack_exports__["a"] = (Modal);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/Modal/Modal.jsx\n// module id = 820\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/Modal/Modal.jsx?', + ); + + /***/ + }, + /* 821 */ + /* exports provided: default */ + /* exports used: default */ + /*!***********************************************!*\ + !*** ./app/libs/components/Modal/Tab/Tab.jsx ***! + \***********************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2____ = __webpack_require__(/*! ../.. */ 11);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Tab_scss__ = __webpack_require__(/*! ./Tab.scss */ 1074);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Tab_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__Tab_scss__);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _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\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\n\n\n\nvar babelPluginFlowReactPropTypes_proptype_OnClick = __webpack_require__(/*! ../../../../types */ 4).babelPluginFlowReactPropTypes_proptype_OnClick || __webpack_require__(/*! react */ 1).PropTypes.any;\n\n\n\n\n\nvar ModalTab = function ModalTab(_ref) {\n var className = _ref.className,\n isActive = _ref.isActive,\n onClick = _ref.onClick,\n otherProps = _objectWithoutProperties(_ref, ['className', 'isActive', 'onClick']);\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2____[\"k\" /* ButtonLike */], _extends({}, _extends({ onClick: onClick }, otherProps), {\n className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()(__WEBPACK_IMPORTED_MODULE_3__Tab_scss___default.a.tab, className, _defineProperty({}, __WEBPACK_IMPORTED_MODULE_3__Tab_scss___default.a.active, isActive))\n }));\n};\n\nModalTab.propTypes = {\n className: __webpack_require__(/*! prop-types */ 0).string,\n isActive: __webpack_require__(/*! prop-types */ 0).bool.isRequired,\n onClick: babelPluginFlowReactPropTypes_proptype_OnClick\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (ModalTab);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/Modal/Tab/Tab.jsx\n// module id = 821\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/Modal/Tab/Tab.jsx?", + ); + + /***/ + }, + /* 822 */ + /* exports provided: default */ + /* exports used: default */ + /*!*************************************************!*\ + !*** ./app/libs/components/Modal/Tabs/Tabs.jsx ***! + \*************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Tabs_scss__ = __webpack_require__(/*! ./Tabs.scss */ 1075);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Tabs_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__Tabs_scss__);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\n\n\n\n\n\nvar ModalTabs = function ModalTabs(_ref) {\n var className = _ref.className,\n otherProps = _objectWithoutProperties(_ref, ['className']);\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div', _extends({ className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()(__WEBPACK_IMPORTED_MODULE_2__Tabs_scss___default.a.wrapper, className) }, otherProps));\n};\n\nModalTabs.propTypes = {\n className: __webpack_require__(/*! prop-types */ 0).string\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (ModalTabs);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/Modal/Tabs/Tabs.jsx\n// module id = 822\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/Modal/Tabs/Tabs.jsx?", + ); + + /***/ + }, + /* 823 */ + /* exports provided: default */ + /* exports used: default */ + /*!***************************************************!*\ + !*** ./app/libs/components/Modal/Title/Title.jsx ***! + \***************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Title_scss__ = __webpack_require__(/*! ./Title.scss */ 1076);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Title_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__Title_scss__);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\n\n\n\n\nvar ModalTitle = function ModalTitle(_ref) {\n var children = _ref.children,\n otherProps = _objectWithoutProperties(_ref, ['children']);\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'h2',\n _extends({ className: __WEBPACK_IMPORTED_MODULE_1__Title_scss___default.a.title }, otherProps),\n children\n );\n};\n\nModalTitle.propTypes = {\n children: __webpack_require__(/*! prop-types */ 0).any.isRequired\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (ModalTitle);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/Modal/Title/Title.jsx\n// module id = 823\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/Modal/Title/Title.jsx?", + ); + + /***/ + }, + /* 824 */ + /* exports provided: default */ + /*!***************************************************************************!*\ + !*** ./app/libs/components/MutualFriendsTooltip/MutualFriendsTooltip.jsx ***! + \***************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_bootstrap__ = __webpack_require__(/*! react-bootstrap */ 31);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_lodash_fp__ = __webpack_require__(/*! lodash/fp */ 14);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_lodash_fp___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_lodash_fp__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__utils_i18n__ = __webpack_require__(/*! ../../utils/i18n */ 89);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__MutualFriendsTooltip_scss__ = __webpack_require__(/*! ./MutualFriendsTooltip.scss */ 1077);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__MutualFriendsTooltip_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5__MutualFriendsTooltip_scss__);\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\n\n\n\n\n\n\n\n\nvar MutualFriendsTooltip = function (_React$Component) {\n _inherits(MutualFriendsTooltip, _React$Component);\n\n function MutualFriendsTooltip() {\n _classCallCheck(this, MutualFriendsTooltip);\n\n return _possibleConstructorReturn(this, (MutualFriendsTooltip.__proto__ || Object.getPrototypeOf(MutualFriendsTooltip)).apply(this, arguments));\n }\n\n _createClass(MutualFriendsTooltip, [{\n key: \'renderMutualFriends\',\n value: function renderMutualFriends() {\n var _props$user = this.props.user,\n allMutualFriendsList = _props$user.allMutualFriendsList,\n id = _props$user.id;\n\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_2_react_bootstrap__["b" /* Tooltip */],\n { id: id + \'-mutual-friends\' },\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n \'ul\',\n { className: __WEBPACK_IMPORTED_MODULE_5__MutualFriendsTooltip_scss___default.a.mutualFriends },\n __WEBPACK_IMPORTED_MODULE_3_lodash_fp___default.a.map(function (mutualFriend) {\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n \'li\',\n { key: mutualFriend.name },\n mutualFriend.name\n );\n }, allMutualFriendsList)\n )\n );\n }\n }, {\n key: \'render\',\n value: function render() {\n var _props = this.props,\n className = _props.className,\n user = _props.user;\n\n\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_2_react_bootstrap__["a" /* OverlayTrigger */],\n { overlay: this.renderMutualFriends() },\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n \'span\',\n { className: className },\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__utils_i18n__["a" /* formatInflection */])(\'Mutual Friends\', user.allMutualFriendsCount)\n )\n );\n }\n }]);\n\n return MutualFriendsTooltip;\n}(__WEBPACK_IMPORTED_MODULE_1_react___default.a.Component);\n\nMutualFriendsTooltip.propTypes = {\n className: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string,\n user: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.shape({\n allMutualFriendsCount: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number.isRequired,\n allMutualFriendsList: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.arrayOf(__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.shape({\n name: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string.isRequired\n }).isRequired).isRequired,\n id: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number.isRequired\n }).isRequired\n};\n/* unused harmony default export */ var _unused_webpack_default_export = (MutualFriendsTooltip);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/MutualFriendsTooltip/MutualFriendsTooltip.jsx\n// module id = 824\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/MutualFriendsTooltip/MutualFriendsTooltip.jsx?', + ); + + /***/ + }, + /* 825 */ + /* exports provided: default */ + /* exports used: default */ + /*!**************************************************!*\ + !*** ./app/libs/components/Navbar/Item/Item.jsx ***! + \**************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Item_scss__ = __webpack_require__(/*! ./Item.scss */ 1078);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Item_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__Item_scss__);\n\n\n\n\n\nvar NavItem = function NavItem(_ref) {\n var children = _ref.children,\n className = _ref.className;\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n \'div\',\n { className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()(__WEBPACK_IMPORTED_MODULE_2__Item_scss___default.a.item, className) },\n children\n );\n};\n\nNavItem.propTypes = {\n children: __webpack_require__(/*! prop-types */ 0).any,\n className: __webpack_require__(/*! prop-types */ 0).string\n};\n/* harmony default export */ __webpack_exports__["a"] = (NavItem);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/Navbar/Item/Item.jsx\n// module id = 825\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/Navbar/Item/Item.jsx?', + ); + + /***/ + }, + /* 826 */ + /* exports provided: default */ + /* exports used: default */ + /*!**********************************************************************!*\ + !*** ./app/libs/components/Navbar/NavItem/NavControl/NavControl.jsx ***! + \**********************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2____ = __webpack_require__(/*! ../../.. */ 11);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__NavItem__ = __webpack_require__(/*! ../NavItem */ 301);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__NavItem_scss__ = __webpack_require__(/*! ../NavItem.scss */ 210);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__NavItem_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__NavItem_scss__);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _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\n\n\nvar babelPluginFlowReactPropTypes_proptype_OnClick = __webpack_require__(/*! ../../../../../types */ 4).babelPluginFlowReactPropTypes_proptype_OnClick || __webpack_require__(/*! react */ 1).PropTypes.any;\n\n\n\n\n\n\nvar NavControl = function NavControl(_ref) {\n var _classNames;\n\n var children = _ref.children,\n active = _ref.active,\n uppercase = _ref.uppercase,\n onClick = _ref.onClick;\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_2____["k" /* ButtonLike */],\n _extends({ onClick: onClick }, {\n className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()(__WEBPACK_IMPORTED_MODULE_4__NavItem_scss___default.a.link, (_classNames = {}, _defineProperty(_classNames, __WEBPACK_IMPORTED_MODULE_4__NavItem_scss___default.a.active, active), _defineProperty(_classNames, __WEBPACK_IMPORTED_MODULE_4__NavItem_scss___default.a.uppercase, uppercase), _classNames))\n }),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_3__NavItem__["a" /* default */],\n { uppercase: uppercase },\n children\n )\n );\n};\n\nNavControl.propTypes = {\n children: __webpack_require__(/*! prop-types */ 0).any,\n active: __webpack_require__(/*! prop-types */ 0).bool,\n uppercase: __webpack_require__(/*! prop-types */ 0).bool,\n onClick: babelPluginFlowReactPropTypes_proptype_OnClick\n};\n/* harmony default export */ __webpack_exports__["a"] = (NavControl);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/Navbar/NavItem/NavControl/NavControl.jsx\n// module id = 826\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/Navbar/NavItem/NavControl/NavControl.jsx?', + ); + + /***/ + }, + /* 827 */ + /* exports provided: default */ + /* exports used: default */ + /*!****************************************************************!*\ + !*** ./app/libs/components/Navbar/NavItem/NavLink/NavLink.jsx ***! + \****************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_router__ = __webpack_require__(/*! react-router */ 82);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__NavItem__ = __webpack_require__(/*! ../NavItem */ 301);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__NavItem_scss__ = __webpack_require__(/*! ../NavItem.scss */ 210);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__NavItem_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__NavItem_scss__);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _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\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\n\n\n\n\n\n\n\n\nvar NavLink = function NavLink(_ref) {\n var children = _ref.children,\n to = _ref.to,\n uppercase = _ref.uppercase,\n otherProps = _objectWithoutProperties(_ref, [\'children\', \'to\', \'uppercase\']);\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_1_react_router__["a" /* Link */],\n _extends({}, _extends({ to: to }, otherProps), {\n className: __WEBPACK_IMPORTED_MODULE_2_classnames___default()(__WEBPACK_IMPORTED_MODULE_4__NavItem_scss___default.a.link, _defineProperty({}, __WEBPACK_IMPORTED_MODULE_4__NavItem_scss___default.a.uppercase, uppercase)),\n activeClassName: __WEBPACK_IMPORTED_MODULE_4__NavItem_scss___default.a.active\n }),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_3__NavItem__["a" /* default */],\n null,\n children\n )\n );\n};\n\nNavLink.propTypes = {\n children: __webpack_require__(/*! prop-types */ 0).any,\n to: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n uppercase: __webpack_require__(/*! prop-types */ 0).bool\n};\n/* harmony default export */ __webpack_exports__["a"] = (NavLink);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/Navbar/NavItem/NavLink/NavLink.jsx\n// module id = 827\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/Navbar/NavItem/NavLink/NavLink.jsx?', + ); + + /***/ + }, + /* 828 */ + /* exports provided: default */ + /* exports used: default */ + /*!***********************************************!*\ + !*** ./app/libs/components/Navbar/Navbar.jsx ***! + \***********************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Unit_Unit__ = __webpack_require__(/*! ./Unit/Unit */ 829);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Item_Item__ = __webpack_require__(/*! ./Item/Item */ 825);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__NavItem_NavLink_NavLink__ = __webpack_require__(/*! ./NavItem/NavLink/NavLink */ 827);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__NavItem_NavControl_NavControl__ = __webpack_require__(/*! ./NavItem/NavControl/NavControl */ 826);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__Navbar_scss__ = __webpack_require__(/*! ./Navbar.scss */ 1079);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__Navbar_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6__Navbar_scss__);\n\n\n\n\n\n\n\n\n\n\nvar Navbar = function Navbar(_ref) {\n var setRef = _ref.setRef,\n className = _ref.className,\n children = _ref.children;\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n \'div\',\n { ref: setRef, className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()(__WEBPACK_IMPORTED_MODULE_6__Navbar_scss___default.a.wrapper, className) },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n \'div\',\n { className: \'container\' },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n \'div\',\n { className: __WEBPACK_IMPORTED_MODULE_6__Navbar_scss___default.a.navbar },\n children\n )\n )\n );\n};\n\nNavbar.propTypes = {\n setRef: __webpack_require__(/*! prop-types */ 0).func,\n className: __webpack_require__(/*! prop-types */ 0).string,\n children: __webpack_require__(/*! prop-types */ 0).any\n};\nNavbar.Unit = __WEBPACK_IMPORTED_MODULE_2__Unit_Unit__["a" /* default */];\nNavbar.Item = __WEBPACK_IMPORTED_MODULE_3__Item_Item__["a" /* default */];\nNavbar.NavLink = __WEBPACK_IMPORTED_MODULE_4__NavItem_NavLink_NavLink__["a" /* default */];\nNavbar.NavControl = __WEBPACK_IMPORTED_MODULE_5__NavItem_NavControl_NavControl__["a" /* default */];\n\n/* harmony default export */ __webpack_exports__["a"] = (Navbar);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/Navbar/Navbar.jsx\n// module id = 828\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/Navbar/Navbar.jsx?', + ); + + /***/ + }, + /* 829 */ + /* exports provided: default */ + /* exports used: default */ + /*!**************************************************!*\ + !*** ./app/libs/components/Navbar/Unit/Unit.jsx ***! + \**************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Unit_scss__ = __webpack_require__(/*! ./Unit.scss */ 1080);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Unit_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__Unit_scss__);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\n\n\n\n\n\nvar Unit = function Unit(_ref) {\n var className = _ref.className,\n otherProps = _objectWithoutProperties(_ref, ['className']);\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div', _extends({ className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()(__WEBPACK_IMPORTED_MODULE_2__Unit_scss___default.a.unit, className) }, otherProps));\n};\n\nUnit.propTypes = {\n className: __webpack_require__(/*! prop-types */ 0).string\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (Unit);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/Navbar/Unit/Unit.jsx\n// module id = 829\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/Navbar/Unit/Unit.jsx?", + ); + + /***/ + }, + /* 830 */ + /* exports provided: default */ + /*!*********************************************************************!*\ + !*** ./app/libs/components/NotificationBadge/NotificationBadge.jsx ***! + \*********************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__NotificationBadge_scss__ = __webpack_require__(/*! ./NotificationBadge.scss */ 1081);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__NotificationBadge_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__NotificationBadge_scss__);\n\n\n\n\nvar NotificationBadge = function NotificationBadge(_ref) {\n var count = _ref.count,\n children = _ref.children;\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_2__NotificationBadge_scss___default.a.container },\n children,\n count > 0 && __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'span',\n { className: __WEBPACK_IMPORTED_MODULE_2__NotificationBadge_scss___default.a.badge },\n count\n )\n );\n};\n\nNotificationBadge.propTypes = {\n children: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.element.isRequired,\n count: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number\n};\n\n/* unused harmony default export */ var _unused_webpack_default_export = (NotificationBadge);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/NotificationBadge/NotificationBadge.jsx\n// module id = 830\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/NotificationBadge/NotificationBadge.jsx?", + ); + + /***/ + }, + /* 831 */ + /* exports provided: default */ + /* exports used: default */ + /*!*****************************************************************************!*\ + !*** ./app/libs/components/RelationshipIndicator/RelationshipIndicator.jsx ***! + \*****************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__enums_RelationshipType__ = __webpack_require__(/*! ../../../enums/RelationshipType */ 87);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_react_bootstrap__ = __webpack_require__(/*! react-bootstrap */ 31);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__icons_IconMembership__ = __webpack_require__(/*! ../icons/IconMembership */ 189);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__icons_IconContact__ = __webpack_require__(/*! ../icons/IconContact */ 304);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__RelationshipIndicator_scss__ = __webpack_require__(/*! ./RelationshipIndicator.scss */ 1082);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__RelationshipIndicator_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7__RelationshipIndicator_scss__);\n\n\n\n\n\n\n\n\n\n\nvar RelationshipIndicator = function RelationshipIndicator(_ref) {\n var type = _ref.type,\n tooltipId = _ref.tooltipId,\n tooltipLabel = _ref.tooltipLabel,\n className = _ref.className,\n hideIcon = _ref.hideIcon,\n children = _ref.children;\n\n var relationshipType = __WEBPACK_IMPORTED_MODULE_2__enums_RelationshipType__["a" /* default */].fromValue(type);\n if (relationshipType === __WEBPACK_IMPORTED_MODULE_2__enums_RelationshipType__["a" /* default */].NONE) return null;\n\n var containerClassName = \'relationshipContainerCommon_\' + relationshipType.value;\n var typeClassName = \'relationshipIndicator_\' + relationshipType.value;\n\n var tooltip = tooltipLabel;\n\n if (!tooltip) {\n switch (relationshipType) {\n case __WEBPACK_IMPORTED_MODULE_2__enums_RelationshipType__["a" /* default */].MEMBERSHIP:\n tooltip = \'You are on the guest list of this listing\';\n break;\n case __WEBPACK_IMPORTED_MODULE_2__enums_RelationshipType__["a" /* default */].FRIEND:\n tooltip = "Facebook Friend\'s Listing";\n break;\n case __WEBPACK_IMPORTED_MODULE_2__enums_RelationshipType__["a" /* default */].OWNER:\n tooltip = \'You Own This Listing\';\n break;\n default:\n tooltip = \'\';\n }\n }\n\n var RelationshipTypeIcon = relationshipType === __WEBPACK_IMPORTED_MODULE_2__enums_RelationshipType__["a" /* default */].MEMBERSHIP ? __WEBPACK_IMPORTED_MODULE_5__icons_IconMembership__["a" /* default */] : __WEBPACK_IMPORTED_MODULE_6__icons_IconContact__["a" /* default */];\n\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_3_react_bootstrap__["a" /* OverlayTrigger */],\n {\n trigger: [\'hover\', \'focus\'],\n placement: \'bottom\',\n overlay: __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_3_react_bootstrap__["b" /* Tooltip */],\n { id: tooltipId },\n tooltip\n )\n },\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n \'div\',\n {\n className: __WEBPACK_IMPORTED_MODULE_4_classnames___default()(\'relationshipIndicator\', __WEBPACK_IMPORTED_MODULE_7__RelationshipIndicator_scss___default.a[containerClassName], typeClassName, className)\n },\n !hideIcon && __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(RelationshipTypeIcon, null),\n children\n )\n );\n};\n\nRelationshipIndicator.propTypes = {\n type: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string.isRequired,\n tooltipId: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number]).isRequired,\n tooltipLabel: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string,\n className: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string,\n children: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.any,\n hideIcon: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.bool\n};\n\n/* harmony default export */ __webpack_exports__["a"] = (RelationshipIndicator);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/RelationshipIndicator/RelationshipIndicator.jsx\n// module id = 831\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/RelationshipIndicator/RelationshipIndicator.jsx?', + ); + + /***/ + }, + /* 832 */ + /* exports provided: default */ + /* exports used: default */ + /*!*************************************************************!*\ + !*** ./app/libs/components/Section/Container/Container.jsx ***! + \*************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Container_scss__ = __webpack_require__(/*! ./Container.scss */ 1083);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Container_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__Container_scss__);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\n\n\n\n\n\nvar Container = function Container(props) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('section', _extends({}, props, { className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()('container', __WEBPACK_IMPORTED_MODULE_2__Container_scss___default.a.container) }));\n};\n\nContainer.propTypes = {\n children: __webpack_require__(/*! prop-types */ 0).any\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (Container);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/Section/Container/Container.jsx\n// module id = 832\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/Section/Container/Container.jsx?", + ); + + /***/ + }, + /* 833 */ + /* exports provided: default */ + /* exports used: default */ + /*!*******************************************************!*\ + !*** ./app/libs/components/Section/Header/Header.jsx ***! + \*******************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Header_scss__ = __webpack_require__(/*! ./Header.scss */ 1084);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Header_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__Header_scss__);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\n\n\n\n\nvar Header = function Header(props) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\'header\', _extends({}, props, { className: __WEBPACK_IMPORTED_MODULE_1__Header_scss___default.a.header }));\n};\n\nHeader.propTypes = {\n children: __webpack_require__(/*! prop-types */ 0).any\n};\n/* harmony default export */ __webpack_exports__["a"] = (Header);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/Section/Header/Header.jsx\n// module id = 833\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/Section/Header/Header.jsx?', + ); + + /***/ + }, + /* 834 */ + /* exports provided: default */ + /*!*************************************************!*\ + !*** ./app/libs/components/Section/Section.jsx ***! + \*************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Container_Container__ = __webpack_require__(/*! ./Container/Container */ 832);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Header_Header__ = __webpack_require__(/*! ./Header/Header */ 833);\n\n\n\n/* unused harmony default export */ var _unused_webpack_default_export = ({ Container: __WEBPACK_IMPORTED_MODULE_0__Container_Container__["a" /* default */], Header: __WEBPACK_IMPORTED_MODULE_1__Header_Header__["a" /* default */] });\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/Section/Section.jsx\n// module id = 834\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/Section/Section.jsx?', + ); + + /***/ + }, + /* 835 */ + /* exports provided: default */ + /*!*******************************************************************************!*\ + !*** ./app/libs/components/SelectInputTextOnMount/SelectInputTextOnMount.jsx ***! + \*******************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\n\nvar SelectInputTextOnMount = function (_Component) {\n _inherits(SelectInputTextOnMount, _Component);\n\n function SelectInputTextOnMount() {\n var _ref;\n\n var _temp, _this, _ret;\n\n _classCallCheck(this, SelectInputTextOnMount);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = SelectInputTextOnMount.__proto__ || Object.getPrototypeOf(SelectInputTextOnMount)).call.apply(_ref, [this].concat(args))), _this), _this.setInputRef = function (ref) {\n _this.input = ref;\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n _createClass(SelectInputTextOnMount, [{\n key: \'componentDidMount\',\n value: function componentDidMount() {\n this.input.select();\n }\n }, {\n key: \'render\',\n value: function render() {\n var children = this.props.children;\n\n return children && children(this.setInputRef);\n }\n }]);\n\n return SelectInputTextOnMount;\n}(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]);\n\nSelectInputTextOnMount.propTypes = {\n children: __webpack_require__(/*! prop-types */ 0).func\n};\n/* unused harmony default export */ var _unused_webpack_default_export = (SelectInputTextOnMount);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/SelectInputTextOnMount/SelectInputTextOnMount.jsx\n// module id = 835\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/SelectInputTextOnMount/SelectInputTextOnMount.jsx?', + ); + + /***/ + }, + /* 836 */ + /* exports provided: default */ + /* exports used: default */ + /*!*************************************************!*\ + !*** ./app/libs/components/Spinner/Spinner.jsx ***! + \*************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils__ = __webpack_require__(/*! ../../utils */ 20);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Spinner_scss__ = __webpack_require__(/*! ./Spinner.scss */ 1085);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Spinner_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__Spinner_scss__);\n\n\n\n\n\n\n\nvar Spinner = function Spinner(_ref) {\n var _ref$color = _ref.color,\n color = _ref$color === undefined ? '#29d' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === undefined ? 30 : _ref$size,\n _ref$width = _ref.width,\n width = _ref$width === undefined ? 2 : _ref$width,\n _ref$bgColor = _ref.bgColor,\n bgColor = _ref$bgColor === undefined ? 'transparent' : _ref$bgColor;\n\n var sizePx = size + 'px';\n var widthPx = width + 'px';\n\n var wrapperStyle = bgColor ? { backgroundColor: bgColor } : null;\n\n var sizeStyle = {\n width: sizePx,\n height: sizePx\n };\n\n var cutStyle = {\n width: __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__utils__[\"a\" /* toInt */])(size) / 2 + 'px',\n height: sizePx\n };\n\n var donutStyle = {\n width: sizePx,\n height: sizePx,\n border: widthPx + ' solid ' + color,\n borderRadius: '50%',\n borderLeftColor: 'transparent',\n borderBottomColor: 'transparent'\n };\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()(__WEBPACK_IMPORTED_MODULE_3__Spinner_scss___default.a.wrapper, 'fng-spinner'), style: wrapperStyle },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_3__Spinner_scss___default.a.hoopWrapper, style: sizeStyle },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_3__Spinner_scss___default.a.hoopIcon, style: sizeStyle },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_3__Spinner_scss___default.a.hoopCut, style: cutStyle },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div', { className: __WEBPACK_IMPORTED_MODULE_3__Spinner_scss___default.a.hoopDonut, style: donutStyle })\n )\n )\n )\n );\n};\n\nSpinner.propTypes = {\n color: __webpack_require__(/*! prop-types */ 0).string,\n size: __webpack_require__(/*! prop-types */ 0).oneOfType([__webpack_require__(/*! prop-types */ 0).string, __webpack_require__(/*! prop-types */ 0).number]),\n width: __webpack_require__(/*! prop-types */ 0).oneOfType([__webpack_require__(/*! prop-types */ 0).string, __webpack_require__(/*! prop-types */ 0).number]),\n bgColor: __webpack_require__(/*! prop-types */ 0).string\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (Spinner);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/Spinner/Spinner.jsx\n// module id = 836\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/Spinner/Spinner.jsx?", + ); + + /***/ + }, + /* 837 */ + /* exports provided: default */ + /* exports used: default */ + /*!*************************************************!*\ + !*** ./app/libs/components/Tooltip/Tooltip.jsx ***! + \*************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_bootstrap__ = __webpack_require__(/*! react-bootstrap */ 31);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\n\n\n\nvar Tooltip = function Tooltip(_ref) {\n var tooltip = _ref.tooltip,\n placement = _ref.placement,\n hide = _ref.hide,\n domId = _ref.domId,\n children = _ref.children,\n otherProps = _objectWithoutProperties(_ref, ['tooltip', 'placement', 'hide', 'domId', 'children']);\n\n return hide ? __WEBPACK_IMPORTED_MODULE_0_react___default.a.Children.only(children) : __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_1_react_bootstrap__[\"a\" /* OverlayTrigger */],\n _extends({ placement: placement }, {\n trigger: ['hover', 'focus'],\n overlay: __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_1_react_bootstrap__[\"b\" /* Tooltip */],\n _extends({ id: 'tooltip-' + domId }, otherProps),\n tooltip\n )\n }),\n children\n );\n};\n\nTooltip.propTypes = {\n tooltip: __webpack_require__(/*! prop-types */ 0).oneOfType([__webpack_require__(/*! prop-types */ 0).string, __webpack_require__(/*! prop-types */ 0).any]).isRequired,\n placement: __webpack_require__(/*! prop-types */ 0).oneOf(['top', 'right', 'bottom', 'left']).isRequired,\n hide: __webpack_require__(/*! prop-types */ 0).bool,\n domId: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n children: __webpack_require__(/*! prop-types */ 0).any\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (Tooltip);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/Tooltip/Tooltip.jsx\n// module id = 837\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/Tooltip/Tooltip.jsx?", + ); + + /***/ + }, + /* 838 */ + /* exports provided: default */ + /*!***************************************************!*\ + !*** ./app/libs/components/Uploader/Uploader.jsx ***! + \***************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_lodash__ = __webpack_require__(/*! lodash */ 19);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_lodash___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_lodash__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__utils_dom__ = __webpack_require__(/*! ../../utils/dom */ 44);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__UploaderOverlay_UploaderOverlay__ = __webpack_require__(/*! ./UploaderOverlay/UploaderOverlay */ 842);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__Uploader_scss__ = __webpack_require__(/*! ./Uploader.scss */ 1086);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__Uploader_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6__Uploader_scss__);\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\n\n\n\n\n\n\n\n\n\n\nvar Uploader = function (_React$Component) {\n _inherits(Uploader, _React$Component);\n\n function Uploader(props, context) {\n _classCallCheck(this, Uploader);\n\n var _this = _possibleConstructorReturn(this, (Uploader.__proto__ || Object.getPrototypeOf(Uploader)).call(this, props, context));\n\n _this.dragCounter = 0;\n\n _this.state = {\n isValid: true,\n isDragging: false\n };\n\n __WEBPACK_IMPORTED_MODULE_3_lodash___default.a.bindAll(_this, ['setInputRef', 'selectFiles', 'validateFiles', 'validateFile', 'validate', 'resetDragCounter', 'resetDropScreen', 'handleDragEnter', 'handleDragOver', 'handleDragLeave', 'handleDrop', 'handleUpload', 'handleInvalid']);\n return _this;\n }\n\n _createClass(Uploader, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n __WEBPACK_IMPORTED_MODULE_4__utils_dom__[\"c\" /* mountDragAndDropEventListeners */](this);\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n __WEBPACK_IMPORTED_MODULE_4__utils_dom__[\"d\" /* unmountDragAndDropEventListeners */](this);\n }\n }, {\n key: 'setInputRef',\n value: function setInputRef(input) {\n this.input = input;\n\n var setInputRef = this.props.setInputRef;\n\n\n if (setInputRef) {\n setInputRef(input);\n }\n }\n }, {\n key: 'isFiles',\n value: function isFiles(e) {\n return e.dataTransfer.types && e.dataTransfer.types.includes('Files');\n }\n }, {\n key: 'selectFiles',\n value: function selectFiles() {\n this.input.click();\n }\n }, {\n key: 'getFiles',\n value: function getFiles(e) {\n var multiple = this.props.multiple;\n\n var fileContainer = e.target.files || e.dataTransfer.files;\n\n return multiple ? Array.from(fileContainer) : fileContainer[0];\n }\n }, {\n key: 'validateFiles',\n value: function validateFiles(e) {\n var _this2 = this;\n\n var files = this.getFiles(e);\n return files.every(function (file) {\n return _this2.validate(file);\n });\n }\n }, {\n key: 'validateFile',\n value: function validateFile(e) {\n var file = this.getFiles(e);\n return this.validate(file);\n }\n }, {\n key: 'validate',\n value: function validate(file) {\n return this.props.fileTypes.mimeTypes.includes(file.type);\n }\n }, {\n key: 'resetDragCounter',\n value: function resetDragCounter() {\n this.dragCounter = 0;\n }\n }, {\n key: 'resetDropScreen',\n value: function resetDropScreen() {\n this.setState({\n isDragging: false,\n isValid: true\n }, this.resetDragCounter);\n }\n }, {\n key: 'handleDragEnter',\n value: function handleDragEnter(e) {\n if (!this.isFiles(e)) return;\n\n e.preventDefault();\n\n this.dragCounter++;\n if (this.dragCounter === 1) {\n this.setState({\n isDragging: true,\n isValid: true\n });\n }\n }\n }, {\n key: 'handleDragOver',\n value: function handleDragOver(e) {\n if (!this.isFiles(e)) return;\n e.preventDefault();\n e.dataTransfer.dropEffect = 'copy'; // eslint-disable-line no-param-reassign\n }\n }, {\n key: 'handleDragLeave',\n value: function handleDragLeave(e) {\n if (!this.isFiles(e)) return;\n\n e.preventDefault();\n\n this.dragCounter--;\n if (this.dragCounter === 0) {\n this.setState({\n isDragging: false,\n isValid: true\n });\n }\n }\n }, {\n key: 'handleDrop',\n value: function handleDrop(e) {\n if (!this.isFiles(e)) return;\n\n e.preventDefault();\n\n var multiple = this.props.multiple;\n\n\n var isValid = multiple ? this.validateFiles(e) : this.validateFile(e);\n\n if (isValid) {\n this.handleUpload(e);\n } else {\n this.handleInvalid();\n }\n }\n }, {\n key: 'handleInvalid',\n value: function handleInvalid() {\n this.setState({ isValid: false });\n }\n }, {\n key: 'handleUpload',\n value: function handleUpload(e) {\n var files = this.getFiles(e);\n this.props.handleUpload(files);\n this.resetDropScreen();\n }\n }, {\n key: 'render',\n value: function render() {\n var props = this.props,\n state = this.state;\n\n\n return (\n // FIXME: Use <ButtonLike /> or just ignore the rule if not possible\n // eslint-disable-next-line jsx-a11y/no-static-element-interactions\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n {\n tabIndex: '0',\n className: __WEBPACK_IMPORTED_MODULE_2_classnames___default()(__WEBPACK_IMPORTED_MODULE_6__Uploader_scss___default.a.wrapper, props.className),\n onClick: !state.isDragging && this.selectFiles\n },\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('input', {\n type: 'file',\n value: '',\n className: 'hide',\n ref: this.setInputRef,\n multiple: props.multiple,\n accept: props.fileTypes.extensions.join(','),\n onChange: this.handleUpload\n }),\n props.children,\n state.isDragging && __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5__UploaderOverlay_UploaderOverlay__[\"a\" /* default */], {\n isValid: state.isValid,\n selectFiles: this.selectFiles,\n cancelUpload: this.resetDropScreen\n })\n )\n );\n }\n }]);\n\n return Uploader;\n}(__WEBPACK_IMPORTED_MODULE_1_react___default.a.Component);\n\nUploader.propTypes = {\n children: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.any.isRequired,\n className: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string,\n multiple: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.bool,\n fileTypes: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.shape({\n extensions: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.arrayOf(__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string).isRequired,\n mimeTypes: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.arrayOf(__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string).isRequired\n }).isRequired,\n handleUpload: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired,\n setInputRef: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func\n};\n/* unused harmony default export */ var _unused_webpack_default_export = (Uploader);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/Uploader/Uploader.jsx\n// module id = 838\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/Uploader/Uploader.jsx?", + ); + + /***/ + }, + /* 839 */ + /* exports provided: default */ + /* exports used: default */ + /*!************************************************************************************************!*\ + !*** ./app/libs/components/Uploader/UploaderOverlay/Overlay/InvalidOverlay/InvalidOverlay.jsx ***! + \************************************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__InvalidOverlay_scss__ = __webpack_require__(/*! ./InvalidOverlay.scss */ 1087);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__InvalidOverlay_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__InvalidOverlay_scss__);\n\n\n\n\n\nvar InvalidOverlay = function InvalidOverlay(props) {\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n null,\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('span', { className: __WEBPACK_IMPORTED_MODULE_2__InvalidOverlay_scss___default.a.invalidIcon }),\n 'Oops! Looks like it\\u2019s not an image!',\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_2__InvalidOverlay_scss___default.a.buttons },\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'span',\n {\n className: 'btn btn-lg btn-info',\n onClick: props.selectFiles\n },\n 'Select Image'\n ),\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'span',\n {\n className: 'btn btn-lg btn-default',\n onClick: props.cancelUpload\n },\n 'Cancel'\n )\n )\n );\n};\n\nInvalidOverlay.propTypes = {\n selectFiles: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired,\n cancelUpload: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (InvalidOverlay);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/Uploader/UploaderOverlay/Overlay/InvalidOverlay/InvalidOverlay.jsx\n// module id = 839\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/Uploader/UploaderOverlay/Overlay/InvalidOverlay/InvalidOverlay.jsx?", + ); + + /***/ + }, + /* 840 */ + /* exports provided: default */ + /* exports used: default */ + /*!**************************************************************************!*\ + !*** ./app/libs/components/Uploader/UploaderOverlay/Overlay/Overlay.jsx ***! + \**************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__ValidOverlay_ValidOverlay__ = __webpack_require__(/*! ./ValidOverlay/ValidOverlay */ 841);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__InvalidOverlay_InvalidOverlay__ = __webpack_require__(/*! ./InvalidOverlay/InvalidOverlay */ 839);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Overlay_scss__ = __webpack_require__(/*! ./Overlay.scss */ 1088);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Overlay_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__Overlay_scss__);\n\n\n\n\n\n\n\n\nvar Overlay = function Overlay(props) {\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n \'div\',\n { className: __WEBPACK_IMPORTED_MODULE_4__Overlay_scss___default.a.overlay },\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n \'div\',\n { className: __WEBPACK_IMPORTED_MODULE_4__Overlay_scss___default.a.contentWrapper },\n props.isValid ? __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2__ValidOverlay_ValidOverlay__["a" /* default */], null) : __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3__InvalidOverlay_InvalidOverlay__["a" /* default */], props)\n )\n );\n};\n\nOverlay.propTypes = {\n isValid: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.bool.isRequired\n};\n\n/* harmony default export */ __webpack_exports__["a"] = (Overlay);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/Uploader/UploaderOverlay/Overlay/Overlay.jsx\n// module id = 840\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/Uploader/UploaderOverlay/Overlay/Overlay.jsx?', + ); + + /***/ + }, + /* 841 */ + /* exports provided: default */ + /* exports used: default */ + /*!********************************************************************************************!*\ + !*** ./app/libs/components/Uploader/UploaderOverlay/Overlay/ValidOverlay/ValidOverlay.jsx ***! + \********************************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ValidOverlay_scss__ = __webpack_require__(/*! ./ValidOverlay.scss */ 1089);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ValidOverlay_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__ValidOverlay_scss__);\n\n\n\n\nvar ValidOverlay = function ValidOverlay() {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n null,\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('span', { className: __WEBPACK_IMPORTED_MODULE_1__ValidOverlay_scss___default.a.validIcon }),\n 'C\\u2019mon, drop it right here!'\n );\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (ValidOverlay);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/Uploader/UploaderOverlay/Overlay/ValidOverlay/ValidOverlay.jsx\n// module id = 841\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/Uploader/UploaderOverlay/Overlay/ValidOverlay/ValidOverlay.jsx?", + ); + + /***/ + }, + /* 842 */ + /* exports provided: default */ + /* exports used: default */ + /*!**************************************************************************!*\ + !*** ./app/libs/components/Uploader/UploaderOverlay/UploaderOverlay.jsx ***! + \**************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_dom__ = __webpack_require__(/*! react-dom */ 16);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_dom___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react_dom__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Overlay_Overlay__ = __webpack_require__(/*! ./Overlay/Overlay */ 840);\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n/* eslint new-cap: 0 */\n\n\n\n\n\n\nvar UploaderOverlay = function (_React$Component) {\n _inherits(UploaderOverlay, _React$Component);\n\n function UploaderOverlay() {\n _classCallCheck(this, UploaderOverlay);\n\n return _possibleConstructorReturn(this, (UploaderOverlay.__proto__ || Object.getPrototypeOf(UploaderOverlay)).apply(this, arguments));\n }\n\n _createClass(UploaderOverlay, [{\n key: \'componentDidMount\',\n value: function componentDidMount() {\n this.overlayNode = document.createElement(\'div\');\n document.body.appendChild(this.overlayNode);\n __WEBPACK_IMPORTED_MODULE_1_react_dom___default.a.unstable_renderSubtreeIntoContainer(this, __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__Overlay_Overlay__["a" /* default */])(this.props), this.overlayNode);\n }\n }, {\n key: \'componentWillReceiveProps\',\n value: function componentWillReceiveProps(nextProps) {\n __WEBPACK_IMPORTED_MODULE_1_react_dom___default.a.unstable_renderSubtreeIntoContainer(this, __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__Overlay_Overlay__["a" /* default */])(nextProps), this.overlayNode);\n }\n }, {\n key: \'componentWillUnmount\',\n value: function componentWillUnmount() {\n __WEBPACK_IMPORTED_MODULE_1_react_dom___default.a.unmountComponentAtNode(this.overlayNode);\n document.body.removeChild(this.overlayNode);\n }\n }, {\n key: \'render\',\n value: function render() {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.DOM.noscript();\n }\n }]);\n\n return UploaderOverlay;\n}(__WEBPACK_IMPORTED_MODULE_0_react___default.a.Component);\n\n/* harmony default export */ __webpack_exports__["a"] = (UploaderOverlay);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/Uploader/UploaderOverlay/UploaderOverlay.jsx\n// module id = 842\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/Uploader/UploaderOverlay/UploaderOverlay.jsx?', + ); + + /***/ + }, + /* 843 */ + /* exports provided: default */ + /*!*****************************************************!*\ + !*** ./app/libs/components/ZebraList/ZebraList.jsx ***! + \*****************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__ZebraList_scss__ = __webpack_require__(/*! ./ZebraList.scss */ 1090);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__ZebraList_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__ZebraList_scss__);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\n\n\n\n\n\nvar ZebraList = function ZebraList(_ref) {\n var className = _ref.className,\n otherProps = _objectWithoutProperties(_ref, ['className']);\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div', _extends({ className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()(__WEBPACK_IMPORTED_MODULE_2__ZebraList_scss___default.a.wrapper, className) }, otherProps));\n};\n\nZebraList.propTypes = {\n className: __webpack_require__(/*! prop-types */ 0).string\n};\n/* unused harmony default export */ var _unused_webpack_default_export = (ZebraList);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/ZebraList/ZebraList.jsx\n// module id = 843\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/ZebraList/ZebraList.jsx?", + ); + + /***/ + }, + /* 844 */ + /* exports provided: default */ + /*!*********************************************************!*\ + !*** ./app/libs/components/forms/Checkbox/Checkbox.jsx ***! + \*********************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Checkbox_scss__ = __webpack_require__(/*! ./Checkbox.scss */ 1091);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Checkbox_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__Checkbox_scss__);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\n\n\n\n\n\nvar Checkbox = function Checkbox(_ref) {\n var className = _ref.className,\n onClick = _ref.onClick,\n otherProps = _objectWithoutProperties(_ref, ['className', 'onClick']);\n\n var domNode = void 0;\n var wrappedOnClick = function wrappedOnClick(event) {\n if (onClick) onClick(event);\n domNode.blur();\n };\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()(__WEBPACK_IMPORTED_MODULE_2__Checkbox_scss___default.a.wrapper, className) },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('input', _extends({\n type: 'checkbox',\n className: __WEBPACK_IMPORTED_MODULE_2__Checkbox_scss___default.a.checkbox,\n onClick: wrappedOnClick,\n ref: function ref(_ref2) {\n domNode = _ref2;\n }\n }, otherProps))\n );\n};\n\nCheckbox.propTypes = {\n className: __webpack_require__(/*! prop-types */ 0).string,\n onClick: __webpack_require__(/*! prop-types */ 0).func\n};\n/* unused harmony default export */ var _unused_webpack_default_export = (Checkbox);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/forms/Checkbox/Checkbox.jsx\n// module id = 844\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/forms/Checkbox/Checkbox.jsx?", + ); + + /***/ + }, + /* 845 */ + /* exports provided: default */ + /* exports used: default */ + /*!*************************************************!*\ + !*** ./app/libs/components/forms/Form/Form.jsx ***! + \*************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\n\n\nvar babelPluginFlowReactPropTypes_proptype_DomEvent = __webpack_require__(/*! ../../../../types */ 4).babelPluginFlowReactPropTypes_proptype_DomEvent || __webpack_require__(/*! react */ 1).PropTypes.any;\n\nvar Form = function Form(_ref) {\n var preventDefault = _ref.preventDefault,\n onSubmit = _ref.onSubmit,\n otherProps = _objectWithoutProperties(_ref, ['preventDefault', 'onSubmit']);\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('form', _extends({}, otherProps, {\n onSubmit: function (_onSubmit) {\n function onSubmit(_x) {\n return _onSubmit.apply(this, arguments);\n }\n\n onSubmit.toString = function () {\n return _onSubmit.toString();\n };\n\n return onSubmit;\n }(function (event) {\n if (preventDefault) event.preventDefault();\n if (onSubmit) onSubmit(event);\n })\n }));\n};\n\nForm.propTypes = {\n preventDefault: __webpack_require__(/*! prop-types */ 0).bool,\n onSubmit: __webpack_require__(/*! prop-types */ 0).func\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (Form);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/forms/Form/Form.jsx\n// module id = 845\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/forms/Form/Form.jsx?", + ); + + /***/ + }, + /* 846 */ + /* exports provided: default */ + /*!***************************************************!*\ + !*** ./app/libs/components/forms/Input/Input.jsx ***! + \***************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Base__ = __webpack_require__(/*! ./Base */ 187);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__WithIcon__ = __webpack_require__(/*! ./WithIcon */ 847);\n\n\nvar babelPluginFlowReactPropTypes_proptype_Props = __webpack_require__(/*! ./Base */ 187).babelPluginFlowReactPropTypes_proptype_Props || __webpack_require__(/*! react */ 1).PropTypes.any;\n\n\n\n\nvar Input = function Input(props) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1__Base__["default"], props);\n};\n\nInput.WithIcon = __WEBPACK_IMPORTED_MODULE_2__WithIcon__["a" /* default */];\n\n/* unused harmony default export */ var _unused_webpack_default_export = (Input);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/forms/Input/Input.jsx\n// module id = 846\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/forms/Input/Input.jsx?', + ); + + /***/ + }, + /* 847 */ + /* exports provided: default */ + /* exports used: default */ + /*!************************************************************!*\ + !*** ./app/libs/components/forms/Input/WithIcon/index.jsx ***! + \************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Base__ = __webpack_require__(/*! ../Base */ 187);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__index_scss__ = __webpack_require__(/*! ./index.scss */ 1093);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__index_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__index_scss__);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\n\n\nvar babelPluginFlowReactPropTypes_proptype_SvgProps = __webpack_require__(/*! ../../../../../types */ 4).babelPluginFlowReactPropTypes_proptype_SvgProps || __webpack_require__(/*! react */ 1).PropTypes.any;\n\n\n\n\n\nvar WithIcon = function WithIcon(_ref) {\n var Icon = _ref.Icon,\n otherProps = _objectWithoutProperties(_ref, ['Icon']);\n\n if (!Icon.aspectRatio) {\n throw new Error('Make sure icon ' + Icon.name + ' was created using `createIcon` util.');\n }\n\n var inputPadding = 10; // FIXME: Calculate once size api is implemented\n var iconHeight = 16; // FIXME: Calculate once size api is implemented\n var iconWidth = iconHeight * Icon.aspectRatio;\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_2__index_scss___default.a.wrapper },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1__Base__[\"default\"], _extends({}, otherProps, { style: { paddingRight: iconWidth + inputPadding * 2 } })),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_2__index_scss___default.a.iconWrapper },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(Icon, {\n height: iconHeight,\n width: iconWidth,\n color: 'grayLighter'\n })\n )\n );\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (WithIcon);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/forms/Input/WithIcon/index.jsx\n// module id = 847\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/forms/Input/WithIcon/index.jsx?", + ); + + /***/ + }, + /* 848 */ + /* exports provided: default */ + /*!***************************************************!*\ + !*** ./app/libs/components/forms/Label/Label.jsx ***! + \***************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Note__ = __webpack_require__(/*! ./Note */ 849);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__index_scss__ = __webpack_require__(/*! ./index.scss */ 337);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__index_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__index_scss__);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\n\n\n\n\n\n\n\nvar Label = function Label(_ref) {\n var placement = _ref.placement,\n className = _ref.className,\n asSpan = _ref.asSpan,\n otherProps = _objectWithoutProperties(_ref, ['placement', 'className', 'asSpan']);\n\n return (\n // This component is intended to be visual label for form elements\n // Sometimes visual label is different from actual clickable <label /> element\n // In such cases text label should be placed as <span /> inside actual <label />\n asSpan ? __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('span', _extends({ className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()(__WEBPACK_IMPORTED_MODULE_3__index_scss___default.a.label, __WEBPACK_IMPORTED_MODULE_3__index_scss___default.a[placement], className) }, otherProps))\n // eslint-disable-next-line jsx-a11y/label-has-for\n : __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('label', _extends({ className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()(__WEBPACK_IMPORTED_MODULE_3__index_scss___default.a.label, __WEBPACK_IMPORTED_MODULE_3__index_scss___default.a[placement], className) }, otherProps))\n );\n};\n\nLabel.propTypes = {\n placement: __webpack_require__(/*! prop-types */ 0).oneOf(['top', 'right', 'bottom', 'left']).isRequired,\n className: __webpack_require__(/*! prop-types */ 0).string,\n asSpan: __webpack_require__(/*! prop-types */ 0).bool\n};\nLabel.Note = __WEBPACK_IMPORTED_MODULE_2__Note__[\"a\" /* default */];\n\n/* unused harmony default export */ var _unused_webpack_default_export = (Label);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/forms/Label/Label.jsx\n// module id = 848\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/forms/Label/Label.jsx?", + ); + + /***/ + }, + /* 849 */ + /* exports provided: default */ + /* exports used: default */ + /*!**************************************************!*\ + !*** ./app/libs/components/forms/Label/Note.jsx ***! + \**************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__index_scss__ = __webpack_require__(/*! ./index.scss */ 337);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__index_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__index_scss__);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _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\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\n\n\n\n\n\nvar Note = function Note(_ref) {\n var indent = _ref.indent,\n expandedIndent = _ref.expandedIndent,\n className = _ref.className,\n asSpan = _ref.asSpan,\n otherProps = _objectWithoutProperties(_ref, ['indent', 'expandedIndent', 'className', 'asSpan']);\n\n var computedClassName = __WEBPACK_IMPORTED_MODULE_1_classnames___default()(__WEBPACK_IMPORTED_MODULE_2__index_scss___default.a.note, _defineProperty({}, __WEBPACK_IMPORTED_MODULE_2__index_scss___default.a.indent, indent), _defineProperty({}, __WEBPACK_IMPORTED_MODULE_2__index_scss___default.a.expandedIndent, expandedIndent), className);\n\n return asSpan ? __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('span', _extends({ className: computedClassName }, otherProps))\n // eslint-disable-next-line jsx-a11y/label-has-for\n : __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('label', _extends({ className: computedClassName }, otherProps));\n};\n\nNote.propTypes = {\n indent: __webpack_require__(/*! prop-types */ 0).bool,\n expandedIndent: __webpack_require__(/*! prop-types */ 0).bool,\n className: __webpack_require__(/*! prop-types */ 0).string,\n asSpan: __webpack_require__(/*! prop-types */ 0).bool\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (Note);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/forms/Label/Note.jsx\n// module id = 849\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/forms/Label/Note.jsx?", + ); + + /***/ + }, + /* 850 */ + /* exports provided: default */ + /*!***************************************************************!*\ + !*** ./app/libs/components/forms/RadioButton/RadioButton.jsx ***! + \***************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__RadioButton_scss__ = __webpack_require__(/*! ./RadioButton.scss */ 1094);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__RadioButton_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__RadioButton_scss__);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\n\n\n\n\n\nvar RadioButton = function RadioButton(_ref) {\n var className = _ref.className,\n otherProps = _objectWithoutProperties(_ref, ['className']);\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()(__WEBPACK_IMPORTED_MODULE_2__RadioButton_scss___default.a.wrapper, className) },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('input', _extends({\n type: 'radio',\n className: __WEBPACK_IMPORTED_MODULE_2__RadioButton_scss___default.a.radioButton\n }, otherProps))\n );\n};\n\nRadioButton.propTypes = {\n className: __webpack_require__(/*! prop-types */ 0).string\n};\n/* unused harmony default export */ var _unused_webpack_default_export = (RadioButton);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/forms/RadioButton/RadioButton.jsx\n// module id = 850\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/forms/RadioButton/RadioButton.jsx?", + ); + + /***/ + }, + /* 851 */ + /* exports provided: default */ + /* exports used: default */ + /*!**************************************************************************!*\ + !*** ./app/libs/components/forms/Select/DefaultOption/DefaultOption.jsx ***! + \**************************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);\n\n\n\nvar DefaultOption = function DefaultOption(_ref) {\n var _ref$placeholder = _ref.placeholder,\n placeholder = _ref$placeholder === undefined ? '...' : _ref$placeholder;\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'option',\n { value: '', 'default': true, disabled: true, hidden: true },\n placeholder\n );\n};\n\nDefaultOption.propTypes = {\n placeholder: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (DefaultOption);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/forms/Select/DefaultOption/DefaultOption.jsx\n// module id = 851\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/forms/Select/DefaultOption/DefaultOption.jsx?", + ); + + /***/ + }, + /* 852 */ + /* exports provided: default */ + /*!*****************************************************!*\ + !*** ./app/libs/components/forms/Select/Select.jsx ***! + \*****************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_fp__ = __webpack_require__(/*! lodash/fp */ 14);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_fp___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_lodash_fp__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__DefaultOption_DefaultOption__ = __webpack_require__(/*! ./DefaultOption/DefaultOption */ 851);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Select_scss__ = __webpack_require__(/*! ./Select.scss */ 1095);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Select_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__Select_scss__);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\n\n\n\n\n\n\n\n\nvar Select = function Select(_ref) {\n var value = _ref.value,\n className = _ref.className,\n children = _ref.children,\n otherProps = _objectWithoutProperties(_ref, ['value', 'className', 'children']);\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()(__WEBPACK_IMPORTED_MODULE_4__Select_scss___default.a.wrapper, className) },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'select',\n _extends({ value: __WEBPACK_IMPORTED_MODULE_2_lodash_fp___default.a.isNil(value) ? '' : value, className: __WEBPACK_IMPORTED_MODULE_4__Select_scss___default.a.select }, otherProps),\n children\n )\n );\n};\n\nSelect.propTypes = {\n value: __webpack_require__(/*! prop-types */ 0).oneOfType([__webpack_require__(/*! prop-types */ 0).string, __webpack_require__(/*! prop-types */ 0).number]),\n className: __webpack_require__(/*! prop-types */ 0).string,\n children: __webpack_require__(/*! prop-types */ 0).any\n};\nSelect.DefaultOption = __WEBPACK_IMPORTED_MODULE_3__DefaultOption_DefaultOption__[\"a\" /* default */];\n\n/* unused harmony default export */ var _unused_webpack_default_export = (Select);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/forms/Select/Select.jsx\n// module id = 852\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/forms/Select/Select.jsx?", + ); + + /***/ + }, + /* 853 */ + /* exports provided: default */ + /*!*********************************************************!*\ + !*** ./app/libs/components/forms/Textarea/Textarea.jsx ***! + \*********************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_react_textarea_autosize__ = __webpack_require__(/*! react-textarea-autosize */ 1464);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_react_textarea_autosize___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_react_textarea_autosize__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_lodash_fp__ = __webpack_require__(/*! lodash/fp */ 14);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_lodash_fp___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_lodash_fp__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__withDynamicRowsState__ = __webpack_require__(/*! ./withDynamicRowsState */ 854);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__Textarea_scss__ = __webpack_require__(/*! ./Textarea.scss */ 1096);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__Textarea_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6__Textarea_scss__);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\n\n\n\n\n\n\n\n\n\n\n// FIXME: Warn: Dynamic sized textarea doesn't work in some cases\n// (not always, but in some, no idea why)\n// It does update component's value,\n// but if cursor position is not at the end of the input\n// it jumps to the end of the input\n// Issue: https://github.com/andreypopp/react-textarea-autosize/issues/68\nvar Textarea = function Textarea(_ref) {\n var autoSize = _ref.autoSize,\n className = _ref.className,\n value = _ref.value,\n defaultMinRows = _ref.defaultMinRows,\n focusedMinRows = _ref.focusedMinRows,\n withDynamicRows = _ref.withDynamicRows,\n otherProps = _objectWithoutProperties(_ref, ['autoSize', 'className', 'value', 'defaultMinRows', 'focusedMinRows', 'withDynamicRows']);\n\n var textareaValue = __WEBPACK_IMPORTED_MODULE_4_lodash_fp___default.a.isNil(value) ? '' : value;\n var textareaClassNames = __WEBPACK_IMPORTED_MODULE_2_classnames___default()(__WEBPACK_IMPORTED_MODULE_6__Textarea_scss___default.a.textarea, className);\n\n return autoSize ? __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3_react_textarea_autosize___default.a, _extends({\n value: textareaValue,\n className: textareaClassNames\n }, otherProps)) : __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('textarea', _extends({ value: textareaValue, className: textareaClassNames }, otherProps));\n};\n\nTextarea.propTypes = {\n autoSize: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.bool,\n value: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string,\n className: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string,\n defaultMinRows: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number,\n focusedMinRows: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number,\n withDynamicRows: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.bool,\n wrapperClassName: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string\n};\n\n/* unused harmony default export */ var _unused_webpack_default_export = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__withDynamicRowsState__[\"a\" /* default */])(Textarea));\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/forms/Textarea/Textarea.jsx\n// module id = 853\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/forms/Textarea/Textarea.jsx?", + ); + + /***/ + }, + /* 854 */ + /* exports provided: default */ + /* exports used: default */ + /*!*********************************************************************!*\ + !*** ./app/libs/components/forms/Textarea/withDynamicRowsState.jsx ***! + \*********************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash__ = __webpack_require__(/*! lodash */ 19);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_lodash__);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\n/* eslint react/jsx-indent-props: 0, react/jsx-closing-bracket-location: 0 */\n\n\n\n\n// TODO: Split this in separate components:\n// - common textarea\n// - magic stuff\nvar withDynamicRowsState = function withDynamicRowsState(Textarea) {\n var _class, _temp;\n\n return _temp = _class = function (_React$Component) {\n _inherits(_class, _React$Component);\n\n function _class(props, context) {\n _classCallCheck(this, _class);\n\n var _this = _possibleConstructorReturn(this, (_class.__proto__ || Object.getPrototypeOf(_class)).call(this, props, context));\n\n _this.state = { rows: props.defaultMinRows };\n\n __WEBPACK_IMPORTED_MODULE_2_lodash___default.a.bindAll(_this, [\'handleFocus\', \'handleBlur\']);\n return _this;\n }\n\n _createClass(_class, [{\n key: \'handleFocus\',\n value: function handleFocus() {\n var _props = this.props,\n focusedMinRows = _props.focusedMinRows,\n onFocusCallback = _props.onFocusCallback;\n\n this.setState({ rows: focusedMinRows }, onFocusCallback);\n }\n }, {\n key: \'handleBlur\',\n value: function handleBlur() {\n var _props2 = this.props,\n defaultMinRows = _props2.defaultMinRows,\n onBlurCallback = _props2.onBlurCallback;\n\n this.setState({ rows: defaultMinRows }, onBlurCallback);\n }\n }, {\n key: \'render\',\n value: function render() {\n var withDynamicRows = this.props.withDynamicRows;\n\n\n return withDynamicRows ? __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(Textarea, _extends({}, this.props, {\n autoSize: true,\n minRows: this.state.rows,\n onFocus: this.handleFocus,\n onBlur: this.handleBlur\n })) : __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(Textarea, this.props);\n }\n }]);\n\n return _class;\n }(__WEBPACK_IMPORTED_MODULE_1_react___default.a.Component), _class.propTypes = {\n withDynamicRows: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.bool,\n defaultMinRows: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number]),\n focusedMinRows: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number]),\n onFocusCallback: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func,\n onBlurCallback: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func\n }, _temp;\n};\n\n/* harmony default export */ __webpack_exports__["a"] = (withDynamicRowsState);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/forms/Textarea/withDynamicRowsState.jsx\n// module id = 854\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/forms/Textarea/withDynamicRowsState.jsx?', + ); + + /***/ + }, + /* 855 */ + /* exports provided: default */ + /*!*****************************************************!*\ + !*** ./app/libs/components/forms/Toggle/Toggle.jsx ***! + \*****************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_toggle__ = __webpack_require__(/*! react-toggle */ 1467);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_toggle___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react_toggle__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Toggle_scss__ = __webpack_require__(/*! ./Toggle.scss */ 1097);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Toggle_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__Toggle_scss__);\n\n\n\nvar babelPluginFlowReactPropTypes_proptype_DomEvent = __webpack_require__(/*! ../../../../types */ 4).babelPluginFlowReactPropTypes_proptype_DomEvent || __webpack_require__(/*! react */ 1).PropTypes.any;\n\n\n\nvar Toggle = function Toggle(props) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1_react_toggle___default.a, props);\n};\n\nToggle.propTypes = {\n id: __webpack_require__(/*! prop-types */ 0).string.isRequired,\n checked: __webpack_require__(/*! prop-types */ 0).bool.isRequired,\n disabled: __webpack_require__(/*! prop-types */ 0).bool,\n onChange: __webpack_require__(/*! prop-types */ 0).func.isRequired\n};\n/* unused harmony default export */ var _unused_webpack_default_export = (Toggle);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/forms/Toggle/Toggle.jsx\n// module id = 855\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/forms/Toggle/Toggle.jsx?', + ); + + /***/ + }, + /* 856 */ + /* exports provided: Form, Input, Textarea, Checkbox, RadioButton, Select, Toggle, Label */ + /* exports used: Form */ + /*!********************************************!*\ + !*** ./app/libs/components/forms/index.js ***! + \********************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Form_Form__ = __webpack_require__(/*! ./Form/Form */ 845);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_0__Form_Form__["a"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Input_Input__ = __webpack_require__(/*! ./Input/Input */ 846);\n/* unused harmony reexport Input */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Textarea_Textarea__ = __webpack_require__(/*! ./Textarea/Textarea */ 853);\n/* unused harmony reexport Textarea */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Checkbox_Checkbox__ = __webpack_require__(/*! ./Checkbox/Checkbox */ 844);\n/* unused harmony reexport Checkbox */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__RadioButton_RadioButton__ = __webpack_require__(/*! ./RadioButton/RadioButton */ 850);\n/* unused harmony reexport RadioButton */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__Select_Select__ = __webpack_require__(/*! ./Select/Select */ 852);\n/* unused harmony reexport Select */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__Toggle_Toggle__ = __webpack_require__(/*! ./Toggle/Toggle */ 855);\n/* unused harmony reexport Toggle */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__Label_Label__ = __webpack_require__(/*! ./Label/Label */ 848);\n/* unused harmony reexport Label */\n\n\n\n\n\n\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/forms/index.js\n// module id = 856\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/forms/index.js?', + ); + + /***/ + }, + /* 857 */ + /* exports provided: default */ + /* exports used: default */ + /*!****************************************************!*\ + !*** ./app/libs/components/icons/IconBedrooms.jsx ***! + \****************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__templates_SvgIconTemplate__ = __webpack_require__(/*! ../../templates/SvgIconTemplate */ 15);\n\n// jscs:disable maximumLineLength\n/* eslint max-len: 0 */\n\n\n\n\n\nvar IconBedrooms = function IconBedrooms(props) {\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_2__templates_SvgIconTemplate__[\"a\" /* default */],\n props,\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'g',\n { stroke: 'none', fill: 'none', fillRule: 'evenodd' },\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'g',\n null,\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('path', { d: 'M21.0511729,31.7960184 L13.5538661,31.7960184 L13.5538661,29.8800182 L21.0511729,29.8800182 C21.1392414,29.8800182 21.2119936,29.8072102 21.2119936,29.7190742 L21.2119936,24.1320174 L23.1265255,24.1320174 L23.1265255,29.7190742 C23.1265255,30.8638843 22.1951057,31.7960184 21.0511729,31.7960184 L21.0511729,31.7960184 L21.0511729,31.7960184 Z', id: 'Shape' }),\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('path', { d: 'M0.248732048,30.9622035 L0.248732048,0.306199556 L21.1477619,0.306199556 C22.2916947,0.306199556 23.2231145,1.23833368 23.2231145,2.38314382 L23.0622945,25.2116301 L21.1477626,25.2116301 L21.3085826,2.38314382 C21.3085826,2.29500781 21.2358304,2.2221998 21.1477619,2.2221998 L2.16326392,2.2221998 L2.16326392,30.9622035 L0.248732048,30.9622035 L0.248732048,30.9622035 Z', id: 'Shape' }),\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('path', { d: 'M10,19.5 L10,23.3809163 C10,23.6570587 10.2238577,23.8809163 10.5,23.8809163 C10.7761424,23.8809163 11,23.6570587 11,23.3809163 L11,19.5 C11,19.2238576 10.7761424,19 10.5,19 C10.2238577,19 10,19.2238576 10,19.5 L10,19.5 L10,19.5 Z', id: 'Shape' }),\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('path', { d: 'M13.2742496,39.4546262 C13.0406767,39.4546262 12.8118902,39.3894822 12.6118216,39.2649422 L0.845108725,31.9755193 C0.470817745,31.7436832 0.248732048,31.3432392 0.248732048,30.9035171 L0.248732048,1.91730739 C0.248732048,1.2217993 0.813518949,0.65657923 1.50849402,0.65657923 C1.74206691,0.65657923 1.97085346,0.721723239 2.17092204,0.846263255 L13.9376349,8.13472819 C14.3119259,8.36656422 14.5340116,8.76700828 14.5340116,9.20673033 L14.5340116,38.1929401 C14.5340116,38.8884482 13.9692247,39.4546262 13.2742496,39.4546262 L13.2742496,39.4546262 L13.2742496,39.4546262 Z M2.16326392,30.5385191 L12.6194797,37.0165159 L12.6194797,9.57172838 L2.16326392,3.09373154 L2.16326392,30.5385191 L2.16326392,30.5385191 L2.16326392,30.5385191 Z', id: 'Shape' })\n )\n )\n );\n};\n\nIconBedrooms.propTypes = {\n title: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string\n};\n\nIconBedrooms.defaultProps = {\n title: 'Bedrooms',\n viewBoxWidth: 24,\n viewBoxHeight: 40\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (IconBedrooms);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/icons/IconBedrooms.jsx\n// module id = 857\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/icons/IconBedrooms.jsx?", + ); + + /***/ + }, + /* 858 */ + /* exports provided: default */ + /* exports used: default */ + /*!************************************************!*\ + !*** ./app/libs/components/icons/IconBeds.jsx ***! + \************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__templates_SvgIconTemplate__ = __webpack_require__(/*! ../../templates/SvgIconTemplate */ 15);\n\n// jscs:disable maximumLineLength\n/* eslint max-len: 0 */\n\n\n\n\n\nvar IconBeds = function IconBeds(props) {\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_2__templates_SvgIconTemplate__[\"a\" /* default */],\n props,\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'g',\n { id: 'IconBeds-1', stroke: 'none', fill: 'none', fillRule: 'evenodd' },\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'g',\n { id: 'IconBeds-2' },\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('path', { d: 'M43.9681545,36.2520211 C43.4359723,36.2520211 43.0040563,35.8459985 43.0040563,35.3457206 L43.0040563,29.0016169 L2.51193555,29.0016169 L2.51193555,35.3457206 C2.51193555,35.8459985 2.0800196,36.2520211 1.54783744,36.2520211 C1.01565528,36.2520211 0.583739325,35.8459985 0.583739325,35.3457206 L0.583739325,28.0953164 C0.583739325,27.5950385 1.01565528,27.1890159 1.54783744,27.1890159 L43.9681545,27.1890159 C44.5003366,27.1890159 44.9322526,27.5950385 44.9322526,28.0953164 L44.9322526,35.3457206 C44.9322526,35.8459985 44.5003366,36.2520211 43.9681545,36.2520211 L43.9681545,36.2520211 Z' }),\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('path', { d: 'M43.9681545,34.4394201 L1.54783744,34.4394201 C1.01565528,34.4394201 0.583739325,34.0333974 0.583739325,33.5331196 C0.583739325,33.0328417 1.01565528,32.626819 1.54783744,32.626819 L43.9681545,32.626819 C44.5003366,32.626819 44.9322526,33.0328417 44.9322526,33.5331196 C44.9322526,34.0333974 44.5003366,34.4394201 43.9681545,34.4394201 L43.9681545,34.4394201 Z' }),\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('path', { d: 'M43.9681545,29.0016169 C43.5940844,29.0016169 43.2450809,28.7949804 43.0869688,28.4632744 L35.3741839,12.1498649 C35.1582259,11.6930894 35.3761121,11.1565595 35.8639457,10.9535482 C36.3517794,10.7469117 36.918669,10.9553608 37.1365552,11.4139489 L43.0040563,23.8248283 L43.0040563,20.8449122 C43.0040563,20.3446343 43.4359723,19.9386116 43.9681545,19.9386116 C44.5003366,19.9386116 44.9322526,20.3446343 44.9322526,20.8449122 L44.9322526,28.0953164 C44.9322526,28.5230902 44.6141002,28.8928608 44.1686869,28.9816783 C44.1012,28.9961791 44.0337131,29.0016169 43.9681545,29.0016169 L43.9681545,29.0016169 Z' }),\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('path', { d: 'M1.54783744,29.0016169 C1.48227877,29.0016169 1.4147919,28.9961791 1.34730503,28.9816783 C0.901891703,28.8928608 0.583739325,28.5230902 0.583739325,28.0953164 L0.583739325,20.8449122 C0.583739325,20.3446343 1.01565528,19.9386116 1.54783744,19.9386116 C2.0800196,19.9386116 2.51193555,20.3446343 2.51193555,20.8449122 L2.51193555,23.8248283 L8.37943667,11.4139489 C8.53562057,11.0858681 8.8788395,10.8756063 9.26062235,10.8756063 L12.1529167,10.8756063 C12.6850989,10.8756063 13.1170148,11.281629 13.1170148,11.7819069 C13.1170148,12.2821848 12.6850989,12.6882074 12.1529167,12.6882074 L9.88728612,12.6882074 L2.42902312,28.4632744 C2.27091102,28.7949804 1.92190751,29.0016169 1.54783744,29.0016169 L1.54783744,29.0016169 Z' }),\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('path', { d: 'M36.2553695,12.6882074 L33.3630752,12.6882074 C32.830893,12.6882074 32.3989771,12.2821848 32.3989771,11.7819069 C32.3989771,11.281629 32.830893,10.8756063 33.3630752,10.8756063 L35.2912714,10.8756063 L35.2912714,4.53150264 C35.2912714,3.03248157 33.9935954,1.81260106 32.3989771,1.81260106 L13.1170148,1.81260106 C11.5223965,1.81260106 10.2247205,3.03248157 10.2247205,4.53150264 L10.2247205,11.7819069 C10.2247205,12.2821848 9.79280451,12.6882074 9.26062235,12.6882074 C8.72844019,12.6882074 8.29652424,12.2821848 8.29652424,11.7819069 L8.29652424,4.53150264 C8.29652424,2.03373839 10.4599604,0 13.1170148,0 L32.3989771,0 C35.0560315,0 37.2194677,2.03373839 37.2194677,4.53150264 L37.2194677,11.7819069 C37.2194677,12.2821848 36.7875517,12.6882074 36.2553695,12.6882074 L36.2553695,12.6882074 Z' }),\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('path', { d: 'M18.9016035,16.3134095 L14.337563,16.3134095 C13.5084386,16.3134095 12.7178782,15.9780783 12.1683423,15.3944208 C11.6207345,14.8089506 11.3642844,14.0313448 11.468407,13.2573641 L11.9504561,9.63216202 C12.1297783,8.27452383 13.3638239,7.25040423 14.8196121,7.25040423 L18.9016035,7.25040423 C20.4962218,7.25040423 21.7938978,8.47028474 21.7938978,9.96930581 L21.7938978,13.5945079 C21.7938978,15.093529 20.4962218,16.3134095 18.9016035,16.3134095 L18.9016035,16.3134095 L18.9016035,16.3134095 Z M14.8196121,9.06300529 C14.3337066,9.06300529 13.9230008,9.40377428 13.8632267,9.85692455 L13.8632267,9.85692455 L13.3811777,13.4821267 C13.3464702,13.7449538 13.4293826,13.9969054 13.6144894,14.1944789 C13.7995963,14.3920524 14.0560464,14.5008085 14.337563,14.5008085 L18.9016035,14.5008085 C19.4337856,14.5008085 19.8657016,14.0947858 19.8657016,13.5945079 L19.8657016,9.96930581 C19.8657016,9.46902792 19.4337856,9.06300529 18.9016035,9.06300529 L14.8196121,9.06300529 L14.8196121,9.06300529 L14.8196121,9.06300529 Z' }),\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('path', { d: 'M31.1784289,16.3134095 L26.6143884,16.3134095 C25.0197701,16.3134095 23.7220941,15.093529 23.7220941,13.5945079 L23.7220941,9.96930581 C23.7220941,8.47028474 25.0197701,7.25040423 26.6143884,7.25040423 L30.6963798,7.25040423 C32.152168,7.25040423 33.3862136,8.27452383 33.5655358,9.63216202 L34.0475849,13.2573641 C34.1497793,14.0313448 33.8952574,14.8089506 33.3457214,15.3944208 C32.7981137,15.9780783 32.0075532,16.3134095 31.1784289,16.3134095 L31.1784289,16.3134095 L31.1784289,16.3134095 Z M26.6143884,9.06300529 C26.0822062,9.06300529 25.6502903,9.46902792 25.6502903,9.96930581 L25.6502903,13.5945079 C25.6502903,14.0947858 26.0822062,14.5008085 26.6143884,14.5008085 L31.1784289,14.5008085 C31.4599455,14.5008085 31.7163956,14.3920524 31.9015025,14.1944789 C32.0866093,13.9969054 32.1695217,13.7431412 32.1348142,13.4821267 L31.6527651,9.85692455 L31.6527651,9.85692455 C31.5929911,9.40377428 31.1822853,9.06300529 30.6963798,9.06300529 L26.6143884,9.06300529 L26.6143884,9.06300529 L26.6143884,9.06300529 Z' }),\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('path', { d: 'M24.6861922,12.6882074 L20.8297997,12.6882074 C20.2976176,12.6882074 19.8657016,12.2821848 19.8657016,11.7819069 C19.8657016,11.281629 20.2976176,10.8756063 20.8297997,10.8756063 L24.6861922,10.8756063 C25.2183743,10.8756063 25.6502903,11.281629 25.6502903,11.7819069 C25.6502903,12.2821848 25.2183743,12.6882074 24.6861922,12.6882074 L24.6861922,12.6882074 Z' })\n )\n )\n );\n};\n\nIconBeds.propTypes = {\n title: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string\n};\n\nIconBeds.defaultProps = {\n title: 'Beds',\n viewBoxWidth: 45,\n viewBoxHeight: 37\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (IconBeds);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/icons/IconBeds.jsx\n// module id = 858\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/icons/IconBeds.jsx?", + ); + + /***/ + }, + /* 859 */ + /* exports provided: default */ + /* exports used: default */ + /*!**************************************************!*\ + !*** ./app/libs/components/icons/IconBullet.jsx ***! + \**************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__templates_SvgIconTemplate__ = __webpack_require__(/*! ../../templates/SvgIconTemplate */ 15);\n\n// jscs:disable maximumLineLength\n/* eslint max-len: 0 */\n\n\n\n\n\nvar IconBullet = function IconBullet(props) {\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_2__templates_SvgIconTemplate__[\"a\" /* default */],\n props,\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('path', {\n d: 'M2.5,5 C3.88071187,5 5,3.88071187 5,2.5 C5,1.11928813 3.88071187,0 2.5,0 C1.11928813,0 0,1.11928813 0,2.5 C0,3.88071187 1.11928813,5 2.5,5 Z',\n fillRule: 'evenodd'\n })\n );\n};\n\nIconBullet.propTypes = {\n title: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string\n};\n\nIconBullet.defaultProps = {\n title: 'Bullet',\n viewBoxWidth: 5,\n viewBoxHeight: 5\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (IconBullet);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/icons/IconBullet.jsx\n// module id = 859\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/icons/IconBullet.jsx?", + ); + + /***/ + }, + /* 860 */ + /* exports provided: default */ + /* exports used: default */ + /*!****************************************************!*\ + !*** ./app/libs/components/icons/IconFacebook.jsx ***! + \****************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__templates_SvgIconTemplate__ = __webpack_require__(/*! ../../templates/SvgIconTemplate */ 15);\n\n/* eslint max-len: 0 */\n\n\n\n\n\nvar IconFacebook = function IconFacebook(props) {\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_2__templates_SvgIconTemplate__[\"a\" /* default */],\n props,\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('path', { d: 'M0 20C0 8.954 8.952 0 20 0c11.046 0 20 8.952 20 20 0 11.046-8.952 20-20 20C8.954 40 0 31.048 0 20zm25-3.543h-3.39V14.41c0-.788.593-.945.932-.945h2.373V10H21.61c-3.73 0-4.49 2.598-4.49 4.173v2.284H15V20h2.12v10h4.49V20h3.05l.34-3.543z', fillRule: 'evenodd' })\n );\n};\n\nIconFacebook.propTypes = {\n title: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string\n};\n\nIconFacebook.defaultProps = {\n title: 'Facebook',\n viewBoxWidth: 40,\n viewBoxHeight: 40\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (IconFacebook);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/icons/IconFacebook.jsx\n// module id = 860\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/icons/IconFacebook.jsx?", + ); + + /***/ + }, + /* 861 */ + /* exports provided: default */ + /* exports used: default */ + /*!*****************************************************!*\ + !*** ./app/libs/components/icons/IconFbFriends.jsx ***! + \*****************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__templates_SvgIconTemplate__ = __webpack_require__(/*! ../../templates/SvgIconTemplate */ 15);\n\n// jscs:disable maximumLineLength\n/* eslint max-len: 0 */\n\n\n\n\n\nvar IconFbFriends = function IconFbFriends(props) {\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_2__templates_SvgIconTemplate__[\"a\" /* default */],\n props,\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'g',\n { stroke: 'none', fillRule: 'evenodd' },\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('path', {\n fill: '#fff',\n d: 'M0,18 C0,8.0588745 8.0588745,0 18,0 C27.9411255,0 36,8.0588745 36,18 C36,27.9411255 27.9411255,36 18,36 C8.0588745,36 0,27.9411255 0,18 Z'\n }),\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('path', {\n d: 'M34,18 C34,9.163444 26.836556,2 18,2 C9.163444,2 2,9.163444 2,18 C2,26.836556 9.163444,34 18,34 C26.836556,34 34,26.836556 34,18 Z',\n fill: '#5473B4'\n }),\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('path', {\n fill: '#fff',\n d: 'M19.5,19 C23.0087876,19 24,19.8585406 24,22 C24,21.6256719 24.1327717,21.3458593 24.2864613,21.1852787 C24.2924857,21.1789841 24.2233022,21.2258091 24.0854193,21.2922436 C23.5986349,21.5267852 22.7965238,21.7376696 21.7880363,21.8655968 L22.0397204,23.8496973 C24.5295414,23.5338624 26,22.7669312 26,22 C26,19 24.418278,17 19.5,17 C19.0061352,17 18.5335035,17.0317728 18.0845981,17.0933161 L19.2035105,19.0047105 C19.3011511,19.0015762 19.3999951,19 19.5,19 Z'\n }),\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('path', {\n fill: '#fff',\n d: 'M18.0471872,13.2571897 C18.1890827,12.2501084 18.5096705,12 19.5,12 C20.6454305,12 21,12.3545695 21,14 C21,15.9620932 20.258638,17 19.5,17 C19.3380151,17 19.1958758,16.9608266 19.0581331,16.8793943 L18.0403142,18.6010344 C18.4798721,18.8608973 18.9725482,19 19.5,19 C21.5,19 23,17 23,14 C23,11 21.5,10 19.5,10 C17.7469946,10 16.3781177,10.768257 16.0667486,12.9781503 L18.0471872,13.2571897 Z'\n }),\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('path', {\n fill: '#fff',\n d: 'M20.6175445,23.4776334 C20.9711023,23.3597808 21.2108277,23.240998 21.3075864,23.1646095 C21.168998,23.2740214 21,23.5470181 21,24 C21,21.8585406 20.0087876,21 16.5,21 C13.5958174,21 12,22.2300224 12,24 C12,23.5470181 11.831002,23.2740214 11.6924136,23.1646095 C11.7891723,23.240998 12.0288977,23.3597808 12.3824555,23.4776334 C13.3545353,23.80166 14.799584,24 16.5,24 C18.200416,24 19.6454647,23.80166 20.6175445,23.4776334 Z M10,24 C10,21 12.581722,19 16.5,19 C21.418278,19 23,21 23,24 C23,25 20.5,26 16.5,26 C12.5,26 10,25 10,24 Z'\n }),\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('path', {\n fill: '#fff',\n d: 'M18,16 C18,14.3545695 17.6454305,14 16.5,14 C15.3545695,14 15,14.3545695 15,16 C15,17.9620932 15.741362,19 16.5,19 C17.258638,19 18,17.9620932 18,16 Z M13,16 C13,13 14.5,12 16.5,12 C18.5,12 20,13 20,16 C20,19 18.5,21 16.5,21 C14.5,21 13,19 13,16 Z'\n })\n )\n );\n};\n\nIconFbFriends.propTypes = {\n title: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string\n};\n\nIconFbFriends.defaultProps = {\n title: 'Facebook Friends',\n viewBoxWidth: 36,\n viewBoxHeight: 36\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (IconFbFriends);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/icons/IconFbFriends.jsx\n// module id = 861\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/icons/IconFbFriends.jsx?", + ); + + /***/ + }, + /* 862 */ + /* exports provided: default */ + /* exports used: default */ + /*!*************************************************!*\ + !*** ./app/libs/components/icons/IconGuest.jsx ***! + \*************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__templates_SvgIconTemplate__ = __webpack_require__(/*! ../../templates/SvgIconTemplate */ 15);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\n\n\nvar babelPluginFlowReactPropTypes_proptype_SvgProps = __webpack_require__(/*! ../../../types */ 4).babelPluginFlowReactPropTypes_proptype_SvgProps || __webpack_require__(/*! react */ 1).PropTypes.any;\n\n\n\nvar IconGuest = function IconGuest(_ref) {\n var _ref$title = _ref.title,\n title = _ref$title === undefined ? 'Guest' : _ref$title,\n _ref$viewBoxWidth = _ref.viewBoxWidth,\n viewBoxWidth = _ref$viewBoxWidth === undefined ? 18 : _ref$viewBoxWidth,\n _ref$viewBoxHeight = _ref.viewBoxHeight,\n viewBoxHeight = _ref$viewBoxHeight === undefined ? 18 : _ref$viewBoxHeight,\n otherProps = _objectWithoutProperties(_ref, ['title', 'viewBoxWidth', 'viewBoxHeight']);\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_1__templates_SvgIconTemplate__[\"a\" /* default */],\n _extends({ title: title, viewBoxWidth: viewBoxWidth, viewBoxHeight: viewBoxHeight }, otherProps),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'g',\n { stroke: 'none', strokeWidth: '1', fill: 'none', fillRule: 'evenodd' },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('path', { d: 'M0,9 L1,8 L4,9 L15.1751914,1.5498724 C15.6307206,1.24618626 16.4047298,1.20236492 16.8947051,1.44735253 L17.1052949,1.55264747 C17.5994269,1.79971345 18,2.44386482 18,3 L18,3 C18,3.55228475 17.5987862,4.21398067 17.1176822,4.47056951 L3,12 L0,9 Z' }),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('polygon', { points: '1 0 12 5 7 8 0 1' }),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('rect', { x: '0', y: '16', width: '18', height: '2' })\n )\n );\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (IconGuest);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/icons/IconGuest.jsx\n// module id = 862\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/icons/IconGuest.jsx?", + ); + + /***/ + }, + /* 863 */ + /* exports provided: default */ + /* exports used: default */ + /*!******************************************************!*\ + !*** ./app/libs/components/icons/IconHeartEmpty.jsx ***! + \******************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__templates_SvgIconTemplate__ = __webpack_require__(/*! ../../templates/SvgIconTemplate */ 15);\n\n// jscs:disable maximumLineLength\n/* eslint max-len: 0 */\n\n\n\n\n\nvar IconHeart = function IconHeart(props) {\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_2__templates_SvgIconTemplate__[\"a\" /* default */],\n props,\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('path', {\n d: 'M7.89313408,14.2051958 C7.95459939,14.1582645 8.07309653,14.0664794 8.24042803,13.9347581 C8.52110844,13.71381 8.83432046,13.4626957 9.17184232,13.1863613 C10.1358007,12.3971534 11.0994853,11.5656331 11.9964031,10.7323388 C12.5997391,10.1718008 13.1518063,9.62953975 13.6409631,9.11310712 C14.7953636,7.89433618 15.5491167,6.8673508 15.7864157,6.17554361 C16.6215953,3.74071133 14.9294151,1 12.6161582,1 C11.4911908,1 10.6451125,1.29898251 10.0141762,1.78948757 C9.65750666,2.06677098 9.45572896,2.32821567 9.38920314,2.4575126 L8.5,4.18573217 L7.61079686,2.4575126 C7.54427103,2.32821567 7.34249334,2.06677098 6.98582384,1.78948757 C6.35488747,1.29898251 5.50880919,1 4.38384182,1 C2.07058493,1 0.378404722,3.74071133 1.21358429,6.17554361 C1.45088327,6.8673508 2.20463645,7.89433618 3.35903694,9.11310712 C3.84819373,9.62953975 4.40026086,10.1718008 5.00359689,10.7323388 C5.90051467,11.5656331 6.86419934,12.3971534 7.82815768,13.1863613 C8.16567954,13.4626957 8.47889156,13.71381 8.75957197,13.9347581 C8.92690347,14.0664794 9.04540061,14.1582645 9.10686592,14.2051958 L7.89313408,14.2051958 Z M7.61079686,1.5424874 L8.17260581,1.5424874 C8.40109026,1.807763 8.5,2 8.5,2 C8.5,2 8.59890974,1.807763 8.82739419,1.5424874 L9.38920314,1.5424874 C9.3334116,1.43405321 9.26167793,1.31553537 9.17288401,1.19027985 C9.78943197,0.635678696 10.8757258,1.82103162e-16 12.6161582,8.67361738e-19 C15.7032768,0 17.7613559,3.5 16.7323164,6.5 C15.7032768,9.5 8.5,15 8.5,15 C8.5,15 1.29672318,9.5 0.267683634,6.5 C-0.761355912,3.5 1.29672318,1.17495346e-10 4.38384182,0 C6.12427418,-6.62406362e-11 7.21056803,0.635678696 7.82711598,1.19027985 C7.73832206,1.31553537 7.66658839,1.43405321 7.61079686,1.5424874 Z',\n stroke: 'none',\n fillRule: 'evenodd'\n })\n );\n};\n\nIconHeart.propTypes = {\n title: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string\n};\n\nIconHeart.defaultProps = {\n title: 'Save to Favorites',\n viewBoxWidth: 17,\n viewBoxHeight: 15\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (IconHeart);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/icons/IconHeartEmpty.jsx\n// module id = 863\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/icons/IconHeartEmpty.jsx?", + ); + + /***/ + }, + /* 864 */ + /* exports provided: default */ + /* exports used: default */ + /*!************************************************!*\ + !*** ./app/libs/components/icons/IconHelp.jsx ***! + \************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__templates_SvgIconTemplate__ = __webpack_require__(/*! ../../templates/SvgIconTemplate */ 15);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\n\n\nvar babelPluginFlowReactPropTypes_proptype_SvgProps = __webpack_require__(/*! ../../../types */ 4).babelPluginFlowReactPropTypes_proptype_SvgProps || __webpack_require__(/*! react */ 1).PropTypes.any;\n\n\n\nvar IconHelp = function IconHelp(_ref) {\n var _ref$title = _ref.title,\n title = _ref$title === undefined ? 'Help' : _ref$title,\n _ref$viewBoxWidth = _ref.viewBoxWidth,\n viewBoxWidth = _ref$viewBoxWidth === undefined ? 18 : _ref$viewBoxWidth,\n _ref$viewBoxHeight = _ref.viewBoxHeight,\n viewBoxHeight = _ref$viewBoxHeight === undefined ? 18 : _ref$viewBoxHeight,\n otherProps = _objectWithoutProperties(_ref, ['title', 'viewBoxWidth', 'viewBoxHeight']);\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_1__templates_SvgIconTemplate__[\"a\" /* default */],\n _extends({ title: title, viewBoxWidth: viewBoxWidth, viewBoxHeight: viewBoxHeight }, otherProps),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'g',\n { stroke: 'none', strokeWidth: '1', fill: 'none', fillRule: 'evenodd' },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('path', { d: 'M16,9 C16,5.13400675 12.8659932,2 9,2 C5.13400675,2 2,5.13400675 2,9 C2,12.8659932 5.13400675,16 9,16 C12.8659932,16 16,12.8659932 16,9 Z M0,9 C0,4.02943725 4.02943725,0 9,0 C13.9705627,0 18,4.02943725 18,9 C18,13.9705627 13.9705627,18 9,18 C4.02943725,18 0,13.9705627 0,9 Z' }),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('path', { d: 'M8.123,11.306 L8.123,13 L9.85,13 L9.85,11.306 L8.123,11.306 Z M6.352,7.676 L7.969,7.676 C7.969,7.47799901 7.99099978,7.29283419 8.035,7.1205 C8.07900022,6.9481658 8.14683287,6.79783397 8.2385,6.6695 C8.33016712,6.54116602 8.44749928,6.43850038 8.5905,6.3615 C8.73350071,6.28449961 8.90399901,6.246 9.102,6.246 C9.3953348,6.246 9.62449917,6.32666586 9.7895,6.488 C9.95450082,6.64933414 10.037,6.89866498 10.037,7.236 C10.0443334,7.43400099 10.0095004,7.59899934 9.9325,7.731 C9.85549961,7.86300066 9.75466729,7.98399945 9.63,8.094 C9.50533271,8.20400055 9.3696674,8.31399945 9.223,8.424 C9.0763326,8.53400055 8.93700066,8.66416591 8.805,8.8145 C8.67299934,8.96483408 8.55750049,9.14633227 8.4585,9.359 C8.3594995,9.57166773 8.29900011,9.83566509 8.277,10.151 L8.277,10.646 L9.762,10.646 L9.762,10.228 C9.79133348,10.0079989 9.86283276,9.8246674 9.9765,9.678 C10.0901672,9.5313326 10.2203326,9.40116723 10.367,9.2875 C10.5136674,9.17383276 10.6694992,9.06016723 10.8345,8.9465 C10.9995008,8.83283276 11.1498327,8.69533414 11.2855,8.534 C11.4211673,8.37266586 11.5348329,8.17833447 11.6265,7.951 C11.7181671,7.72366553 11.764,7.43400176 11.764,7.082 C11.764,6.86933227 11.7181671,6.64016789 11.6265,6.3945 C11.5348329,6.1488321 11.3826677,5.91966773 11.17,5.707 C10.9573323,5.49433227 10.6768351,5.31650071 10.3285,5.1735 C9.98016492,5.03049928 9.54566927,4.959 9.025,4.959 C8.62166465,4.959 8.25683496,5.02683265 7.9305,5.1625 C7.60416503,5.29816734 7.32550115,5.48699879 7.0945,5.729 C6.86349884,5.97100121 6.68383397,6.25699835 6.5555,6.587 C6.42716602,6.91700165 6.35933337,7.27999802 6.352,7.676 L6.352,7.676 Z' })\n )\n );\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (IconHelp);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/icons/IconHelp.jsx\n// module id = 864\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/icons/IconHelp.jsx?", + ); + + /***/ + }, + /* 865 */ + /* exports provided: default */ + /* exports used: default */ + /*!*****************************************************!*\ + !*** ./app/libs/components/icons/IconInstagram.jsx ***! + \*****************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__templates_SvgIconTemplate__ = __webpack_require__(/*! ../../templates/SvgIconTemplate */ 15);\n\n/* eslint max-len: 0 */\n\n\n\n\n\nvar IconInstagram = function IconInstagram(props) {\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_2__templates_SvgIconTemplate__[\"a\" /* default */],\n props,\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('path', { d: 'M0 20C0 8.954 8.952 0 20 0c11.046 0 20 8.952 20 20 0 11.046-8.952 20-20 20C8.954 40 0 31.048 0 20zm26.154-10H13.846C11.71 10 10 11.71 10 13.846v12.307C10 28.29 11.71 30 13.846 30h12.308C28.29 30 30 28.29 30 26.154V13.845C30 11.71 28.29 10 26.154 10zm1.11 2.308h.428V15.725h-3.418V12.31h2.99zm-10.085 5.64c.598-.854 1.71-1.452 2.82-1.452 1.11 0 2.222.598 2.82 1.453.428.597.684 1.28.684 2.05 0 1.966-1.624 3.504-3.504 3.504S16.496 21.966 16.496 20c0-.77.256-1.453.683-2.05zm10.854 8.206c0 1.025-.855 1.88-1.88 1.88H13.846c-1.025 0-1.88-.855-1.88-1.88V17.95h2.99c-.255.597-.426 1.366-.426 2.05 0 2.99 2.48 5.47 5.47 5.47 2.99 0 5.47-2.48 5.47-5.47 0-.684-.17-1.453-.427-2.05h2.99v8.204z', fillRule: 'evenodd' })\n );\n};\n\nIconInstagram.propTypes = {\n title: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string\n};\n\nIconInstagram.defaultProps = {\n title: 'Instagram',\n viewBoxWidth: 40,\n viewBoxHeight: 40\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (IconInstagram);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/icons/IconInstagram.jsx\n// module id = 865\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/icons/IconInstagram.jsx?", + ); + + /***/ + }, + /* 866 */ + /* exports provided: default */ + /* exports used: default */ + /*!****************************************************!*\ + !*** ./app/libs/components/icons/IconLogoFull.jsx ***! + \****************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__templates_SvgIconTemplate__ = __webpack_require__(/*! ../../templates/SvgIconTemplate */ 15);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\n\n\nvar babelPluginFlowReactPropTypes_proptype_SvgProps = __webpack_require__(/*! ../../../types */ 4).babelPluginFlowReactPropTypes_proptype_SvgProps || __webpack_require__(/*! react */ 1).PropTypes.any;\n\n\n\nvar IconLogoFull = function IconLogoFull(_ref) {\n var _ref$title = _ref.title,\n title = _ref$title === undefined ? 'LogoFull' : _ref$title,\n _ref$viewBoxWidth = _ref.viewBoxWidth,\n viewBoxWidth = _ref$viewBoxWidth === undefined ? 166 : _ref$viewBoxWidth,\n _ref$viewBoxHeight = _ref.viewBoxHeight,\n viewBoxHeight = _ref$viewBoxHeight === undefined ? 25 : _ref$viewBoxHeight,\n logoClassName = _ref.logoClassName,\n textClassName = _ref.textClassName,\n otherProps = _objectWithoutProperties(_ref, ['title', 'viewBoxWidth', 'viewBoxHeight', 'logoClassName', 'textClassName']);\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_1__templates_SvgIconTemplate__[\"a\" /* default */],\n _extends({ title: title, viewBoxWidth: viewBoxWidth, viewBoxHeight: viewBoxHeight }, otherProps),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('path', {\n className: logoClassName,\n d: 'M36.6415991,15.0964596 L36.6415991,14.8430237 L39.8570734,14.8430237 L39.8570734,16.0216783 C39.8570734,17.2320123 40.0998256,18.390238 40.5381988,19.448244 C40.9937103,20.5466636 41.6613911,21.5368696 42.487459,22.3645332 L42.5453771,22.4225629 L42.5487752,22.4225629 C43.362875,23.2235802 44.3303396,23.8719734 45.4009326,24.3175587 C46.0445303,24.585354 46.7250647,24.7801681 47.4318984,24.8914904 L47.4323416,24.8914904 L47.4864184,24.8999284 L47.4867138,24.8999284 L47.5409375,24.9079223 L47.5410852,24.9079223 L47.5956052,24.9157682 L47.5957529,24.9157682 L47.650272,24.9231699 L47.7050875,24.9301275 L47.7050875,24.9301275 L47.7597552,24.9369372 L47.7600507,24.9369372 L47.8147175,24.9433027 L47.8151607,24.9433027 L47.8696807,24.949372 L47.8701239,24.949372 L47.9247908,24.9551454 L47.9253817,24.9551454 L47.9800494,24.9604747 L47.9806404,24.9604747 C48.1468588,24.9761664 48.3141114,24.987269 48.482546,24.9936345 L48.5366219,24.995559 L48.5386903,24.995559 L48.592767,24.9971874 L48.5949832,24.9971874 L48.6490591,24.9983717 L48.6512761,24.9983717 L48.7052042,24.9992599 L48.7077158,24.9992599 L48.7616448,24.999852 L48.7643042,24.999852 L48.8180846,25 L48.8208926,25 L58.0389879,25 L58.0417951,25 L58.0954286,24.999852 L58.0983834,24.999852 L58.1518692,24.9992599 L58.1548241,24.9992599 L58.2081612,24.9983717 L58.2112638,24.9983717 C59.3578013,24.9767585 60.4552845,24.7362017 61.4616073,24.3175587 C62.5580563,23.8613149 63.5463536,23.1921968 64.3724215,22.3645332 L64.4303396,22.3065035 L64.4303396,22.2962891 C64.8978192,21.8190243 65.3138814,21.2884669 65.6674464,20.7160157 C65.824948,20.4608034 65.9704806,20.1965609 66.1024216,19.9244726 L66.1005009,19.9244726 C66.1777734,19.765779 66.2504667,19.6044209 66.3184313,19.4408422 C66.7566569,18.3850567 67,17.2287555 67,16.0216783 L67,10.6394223 L67,10.443424 L66.9527203,10.443424 L66.9527203,10.2150061 L46.971215,10.2123414 L46.7445677,10.2117493 L46.7445677,10.447569 L46.6269587,10.4481611 L46.6566569,14.7886949 L61.8995365,14.7547949 L61.8995365,16.0216783 C61.8995365,16.5443898 61.7958171,17.0434157 61.607584,17.4980312 L61.607584,17.4989193 C61.4125539,17.9714471 61.124886,18.398676 60.7691048,18.7564765 L60.7685138,18.7569206 C60.4112552,19.1135369 59.9849978,19.401761 59.5133813,19.5971672 L59.5124949,19.5971672 C59.0589032,19.7857638 58.560692,19.8896844 58.0389879,19.8896844 L55.3521625,19.8896844 L48.8208926,19.8896844 L48.8180846,19.8896844 L48.7965132,19.8895363 L48.7935583,19.8895363 L48.7721346,19.8893883 L48.7691797,19.8893883 L48.7477561,19.8890922 L48.7448012,19.8890922 C48.2522043,19.8793219 47.7816221,19.7755494 47.3510792,19.5958349 C46.879906,19.3995405 46.4532053,19.1098361 46.0959467,18.7518875 C45.7386881,18.3939389 45.4495428,17.9664138 45.2536262,17.4943303 C45.0649499,17.0407511 44.960344,16.5430574 44.960344,16.0216783 L44.960344,8.97832173 C44.960344,8.45694256 45.0649499,7.959397 45.2536262,7.50581776 C45.4495428,7.03373422 45.7386881,6.60606118 46.0959467,6.24811254 L46.1828234,6.161216 C46.5210222,5.84323691 46.9159572,5.58432372 47.3484198,5.40416513 C47.6663769,5.27152573 48.0066442,5.18018815 48.3613911,5.13755408 L48.3627208,5.13725802 L48.3851787,5.13474144 L48.3863606,5.13459341 L48.4088185,5.13207683 L48.410296,5.1319288 L48.4326061,5.12956025 L48.4340835,5.12941222 L48.4563937,5.12733973 L48.4578711,5.1271917 L48.4801821,5.12511921 L48.4818073,5.1249711 L48.5058904,5.12304672 L48.5280528,5.12127029 L48.5298257,5.12112226 L48.5519881,5.11949385 L48.5539087,5.11949385 L48.5759234,5.11786545 L48.5779918,5.11786545 L48.6000065,5.11653319 L48.6020749,5.11638507 C48.6342847,5.11460872 48.6664937,5.11327638 48.6988512,5.11224009 L48.7207181,5.11149994 L48.7232298,5.11149994 L48.7450967,5.11090783 L48.7476083,5.11090783 L48.7693275,5.11061177 L48.7719869,5.11061177 L48.793706,5.11031571 L48.7963654,5.11031571 L48.8180846,5.11031571 L48.8208926,5.11031571 L55.3493554,5.11031571 L58.0417951,5.11031571 C58.5634992,5.11031571 59.0615634,5.21438431 59.5151543,5.40283278 L59.5161885,5.40283278 C59.9878049,5.59823896 60.4140623,5.8864631 60.7713209,6.24307939 L60.7717642,6.24352347 C61.1275453,6.60147211 61.4153619,7.02855303 61.6103912,7.50122869 L61.6103912,7.50196884 C61.7522302,7.8442258 61.8457561,8.21135249 61.883728,8.59535525 L66.9943857,8.59535525 C66.9485835,7.52669071 66.7132177,6.5025847 66.3212385,5.55915776 C65.8763645,4.4872364 65.2278912,3.51731124 64.4275324,2.70104627 L64.4275324,2.69349654 L64.3696144,2.63546685 C63.5433987,1.80780322 62.5551015,1.13883312 61.458948,0.682441254 C60.7332014,0.38059793 59.9598805,0.171276508 59.1547931,0.0698725217 L59.1547931,0.0698725217 L59.1001253,0.0632109591 L59.0998299,0.0630629301 L59.045163,0.0566974255 L59.0447198,0.0566974255 L58.9901998,0.0506279789 L58.9896088,0.0506279789 L58.9350897,0.0450026192 L58.9344988,0.0448545902 L58.8798311,0.0395253746 L58.8790923,0.0395253746 L58.8245724,0.0344921309 L58.8236859,0.0344921309 L58.7693146,0.0297550312 L58.7682804,0.0297550312 L58.7137604,0.0254620184 L58.7127262,0.0253139894 C58.6205308,0.0183563689 58.528039,0.0128790382 58.4352526,0.00873405446 L58.4334796,0.00858602547 L58.4331842,0.00858602547 L58.3773345,0.00636550461 L58.3231109,0.00444104172 L58.3211902,0.00444104172 L58.2669657,0.00281263681 L58.2648973,0.00281263681 L58.2108206,0.00162840491 L58.2086044,0.00162840491 L58.1545286,0.000740144932 L58.1521647,0.000740144932 L58.0982357,0.000148028986 L58.0955763,0.000148028986 L58.0417951,0 L58.0389879,0 L48.8208926,0 L48.8180846,0 L48.7644519,0.000148028986 L48.7614971,0.000148028986 L48.7080113,0.000740144932 L48.7050564,0.000740144932 L48.6517193,0.00162840491 L48.6486158,0.00162840491 C47.5019314,0.0232414976 46.404596,0.263798326 45.3981254,0.682441254 C44.3018233,1.13883312 43.3135269,1.80780322 42.487459,2.63546685 C41.6613911,3.46327842 40.9937103,4.45348442 40.5381988,5.55175596 C40.0998256,6.60976199 39.8570734,7.7681358 39.8570734,8.97832173 L39.8570734,10.1657103 L36.6415991,10.1722239 L36.6415991,9.94321383 C36.6415991,7.35748669 32.9252542,7.36533257 32.9252542,9.94321383 L32.9252542,10.1797737 L21.2620506,10.2034593 L1.10634867,10.159789 C0.803314538,10.1593448 0.539285577,10.2749602 0.324014577,10.5042664 C0.108743577,10.7335726 0,11.014839 0,11.3384435 L0,13.6643692 C0,14.3118742 0.496290474,14.8430237 1.10413251,14.8430237 L3.32687727,14.8430237 L3.33588963,15.8394472 L0.873495321,15.834118 C0.407345397,15.8332297 0.0246740385,16.2116071 0.0203894744,16.6791016 L0.000443230769,18.614511 C-0.00132969231,18.8488504 0.0806714359,19.0526946 0.245116923,19.219826 C0.409709295,19.3869575 0.611092397,19.473262 0.845570923,19.4747423 L6.17593201,19.5136755 C6.6883274,19.4667484 7.00805827,19.4908781 7.20500821,19.5595663 L7.2782916,24.9558856 L7.90327276,24.9582542 L11.0030587,24.970245 L10.9692237,19.5178205 L14.9247757,19.5755541 L14.9527001,24.9856407 L18.6406773,25 L18.6170375,22.9165557 L18.6985954,16.7343186 C18.7022889,16.4980548 18.6198446,16.2933225 18.4534784,16.1251547 C18.2875564,15.957135 18.0846958,15.8712747 17.8493308,15.8708306 L10.9405606,15.8558791 L10.9330256,14.8430237 L32.9252542,14.8430237 L32.9252542,15.0964596 C32.9252542,17.6283019 36.6415991,17.6204561 36.6415991,15.0964596',\n stroke: 'none',\n fillRule: 'evenodd'\n }),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('path', {\n className: textClassName,\n d: 'M84.0253906,3.765625 L83.5859375,3.765625 C83.5039058,3.45702971 83.3330091,3.12695488 83.0732422,2.77539062 C82.8134753,2.42382637 82.5644543,2.23046893 82.3261719,2.1953125 C82.2050775,2.17968742 82.0615243,2.16796879 81.8955078,2.16015625 C81.7294914,2.15234371 81.5410167,2.1484375 81.3300781,2.1484375 L79.9355469,2.1484375 L79.9355469,5.48828125 L80.890625,5.48828125 C81.1796889,5.48828125 81.4042961,5.45800812 81.5644531,5.39746094 C81.7246102,5.33691376 81.8613276,5.24414125 81.9746094,5.11914062 C82.0527348,5.0332027 82.1240231,4.89941497 82.1884766,4.71777344 C82.25293,4.5361319 82.2949218,4.34179791 82.3144531,4.13476562 L82.7597656,4.13476562 L82.7597656,7.3984375 L82.3144531,7.3984375 C82.3027343,7.22656164 82.2626957,7.03125109 82.1943359,6.8125 C82.1259762,6.59374891 82.0527348,6.43554736 81.9746094,6.33789062 C81.8574213,6.19335865 81.7099618,6.09472683 81.5322266,6.04199219 C81.3544913,5.98925755 81.1406262,5.96289062 80.890625,5.96289062 L79.9355469,5.96289062 L79.9355469,8.828125 C79.9355469,8.95703189 79.9609372,9.07226512 80.0117188,9.17382812 C80.0625003,9.27539113 80.1523431,9.35742156 80.28125,9.41992188 C80.339844,9.44726576 80.4667959,9.48046855 80.6621094,9.51953125 C80.8574229,9.55859395 81.0058589,9.58007811 81.1074219,9.58398438 L81.1074219,10 L77.5039062,10 L77.5039062,9.58398438 C77.6210943,9.57617184 77.7773428,9.56347665 77.9726562,9.54589844 C78.1679697,9.52832022 78.2949216,9.50585951 78.3535156,9.47851562 C78.4707037,9.42773412 78.5556638,9.35253956 78.6083984,9.25292969 C78.6611331,9.15331981 78.6875,9.03320383 78.6875,8.89257812 L78.6875,2.89257812 C78.6875,2.76367123 78.6660158,2.64941456 78.6230469,2.54980469 C78.5800779,2.45019481 78.4902351,2.36914094 78.3535156,2.30664062 C78.2480463,2.25585912 78.1064462,2.2109377 77.9287109,2.171875 C77.7509757,2.1328123 77.6093755,2.10937504 77.5039062,2.1015625 L77.5039062,1.68554688 L84.0253906,1.68554688 L84.0253906,3.765625 Z M94.3613281,10 L92.1230469,10 C91.6269506,9.22265236 91.1787129,8.55078408 90.7783203,7.984375 C90.3779277,7.41796592 89.9433617,6.83398738 89.4746094,6.23242188 L88.625,6.23242188 L88.625,8.86914062 C88.625,9.00586006 88.6464842,9.12597604 88.6894531,9.22949219 C88.7324221,9.33300833 88.824218,9.4121091 88.9648438,9.46679688 C89.0351566,9.49414076 89.1582022,9.51953113 89.3339844,9.54296875 C89.5097665,9.56640637 89.6582025,9.58007811 89.7792969,9.58398438 L89.7792969,10 L86.2636719,10 L86.2636719,9.58398438 C86.3574223,9.57617184 86.4931632,9.5625001 86.6708984,9.54296875 C86.8486337,9.5234374 86.9726559,9.49804703 87.0429688,9.46679688 C87.1601568,9.41601537 87.2451169,9.34179736 87.2978516,9.24414062 C87.3505862,9.14648389 87.3769531,9.02148514 87.3769531,8.86914062 L87.3769531,2.85742188 C87.3769531,2.72070244 87.3574221,2.5996099 87.3183594,2.49414062 C87.2792967,2.38867135 87.1875007,2.30859402 87.0429688,2.25390625 C86.945312,2.21874982 86.8183602,2.18652358 86.6621094,2.15722656 C86.5058586,2.12792954 86.3730474,2.10937504 86.2636719,2.1015625 L86.2636719,1.68554688 L90.1015625,1.68554688 C90.4531268,1.68554688 90.7832016,1.72167933 91.0917969,1.79394531 C91.4003922,1.8662113 91.6796863,1.98242107 91.9296875,2.14257812 C92.1718762,2.29882891 92.3652337,2.50292843 92.5097656,2.75488281 C92.6542976,3.0068372 92.7265625,3.3105451 92.7265625,3.66601562 C92.7265625,3.98632973 92.6777349,4.26953002 92.5800781,4.515625 C92.4824214,4.76171998 92.3378916,4.97460848 92.1464844,5.15429688 C91.9707022,5.32226646 91.7597669,5.46777282 91.5136719,5.59082031 C91.2675769,5.7138678 90.9960952,5.81835895 90.6992188,5.90429688 C91.1093771,6.44726834 91.450194,6.90429502 91.7216797,7.27539062 C91.9931654,7.64648623 92.3261699,8.09765359 92.7207031,8.62890625 C92.892579,8.86328242 93.0478509,9.03613226 93.1865234,9.14746094 C93.325196,9.25878962 93.4628899,9.34960902 93.5996094,9.41992188 C93.7011724,9.47070338 93.8281242,9.50976549 93.9804688,9.53710938 C94.1328133,9.56445326 94.2597651,9.58007811 94.3613281,9.58398438 L94.3613281,10 Z M91.2792969,3.80078125 C91.2792969,3.29687248 91.1347671,2.89746241 90.8457031,2.60253906 C90.5566392,2.30761571 90.1484401,2.16015625 89.6210938,2.16015625 L88.625,2.16015625 L88.625,5.72851562 L89.3925781,5.72851562 C89.9316433,5.72851562 90.3808576,5.55566579 90.7402344,5.20996094 C91.0996112,4.86425608 91.2792969,4.39453422 91.2792969,3.80078125 Z M99.8164062,10 L96.0722656,10 L96.0722656,9.58398438 C96.1777349,9.57617184 96.3300771,9.5644532 96.5292969,9.54882812 C96.7285166,9.53320305 96.8691402,9.50976578 96.9511719,9.47851562 C97.0800788,9.42773412 97.1738278,9.35839888 97.2324219,9.27050781 C97.2910159,9.18261675 97.3203125,9.06054766 97.3203125,8.90429688 L97.3203125,2.88085938 C97.3203125,2.74413994 97.2988283,2.62988327 97.2558594,2.53808594 C97.2128904,2.4462886 97.1113289,2.36914094 96.9511719,2.30664062 C96.8339838,2.25976539 96.6865243,2.21582052 96.5087891,2.17480469 C96.3310538,2.13378886 96.1855474,2.10937504 96.0722656,2.1015625 L96.0722656,1.68554688 L99.8164062,1.68554688 L99.8164062,2.1015625 C99.6953119,2.10546877 99.5507821,2.12011706 99.3828125,2.14550781 C99.2148429,2.17089856 99.06836,2.2031248 98.9433594,2.2421875 C98.7949211,2.28906273 98.6953128,2.36523385 98.6445312,2.47070312 C98.5937497,2.5761724 98.5683594,2.69335873 98.5683594,2.82226562 L98.5683594,8.83984375 C98.5683594,8.96875064 98.5966794,9.08300731 98.6533203,9.18261719 C98.7099612,9.28222706 98.8066399,9.36132783 98.9433594,9.41992188 C99.025391,9.45117203 99.1591788,9.48535138 99.3447266,9.52246094 C99.5302744,9.5595705 99.6874994,9.58007811 99.8164062,9.58398438 L99.8164062,10 Z M109.349609,7.55078125 L109.191406,10 L102.289062,10 L102.289062,9.58398438 C102.406251,9.57617184 102.562499,9.55957044 102.757812,9.53417969 C102.953126,9.50878894 103.080078,9.48242201 103.138672,9.45507812 C103.263672,9.39648408 103.350586,9.32031297 103.399414,9.2265625 C103.448242,9.13281203 103.472656,9.0136726 103.472656,8.86914062 L103.472656,2.89257812 C103.472656,2.76367123 103.451172,2.64941456 103.408203,2.54980469 C103.365234,2.45019481 103.275391,2.36914094 103.138672,2.30664062 C103.033203,2.25585912 102.891602,2.2109377 102.713867,2.171875 C102.536132,2.1328123 102.394532,2.10937504 102.289062,2.1015625 L102.289062,1.68554688 L108.722656,1.68554688 L108.722656,3.68945312 L108.283203,3.68945312 C108.205078,3.39257664 108.036134,3.07715011 107.776367,2.74316406 C107.5166,2.40917802 107.269532,2.22656266 107.035156,2.1953125 C106.914062,2.17968742 106.769532,2.16796879 106.601562,2.16015625 C106.433593,2.15234371 106.242189,2.1484375 106.027344,2.1484375 L104.720703,2.1484375 L104.720703,5.453125 L105.658203,5.453125 C105.958986,5.453125 106.17871,5.42480497 106.317383,5.36816406 C106.456055,5.31152315 106.578124,5.21679754 106.683594,5.08398438 C106.769532,4.97070256 106.842773,4.81933688 106.90332,4.62988281 C106.963867,4.44042874 107.003906,4.26171959 107.023438,4.09375 L107.462891,4.09375 L107.462891,7.34570312 L107.023438,7.34570312 C107.007812,7.15820219 106.965821,6.95996198 106.897461,6.75097656 C106.829101,6.54199114 106.757813,6.39062547 106.683594,6.296875 C106.562499,6.14453049 106.424805,6.04492211 106.270508,5.99804688 C106.11621,5.95117164 105.912111,5.92773438 105.658203,5.92773438 L104.720703,5.92773438 L104.720703,8.42382812 C104.720703,8.67382938 104.738281,8.87109303 104.773438,9.015625 C104.808594,9.16015697 104.876953,9.26953088 104.978516,9.34375 C105.080079,9.41796912 105.218749,9.46582021 105.394531,9.48730469 C105.570313,9.50878917 105.820311,9.51953125 106.144531,9.51953125 L106.654297,9.51953125 C106.865235,9.51953125 107.042968,9.51171883 107.1875,9.49609375 C107.335938,9.48046867 107.489257,9.45214864 107.647461,9.41113281 C107.805665,9.37011698 107.917968,9.31445348 107.984375,9.24414062 C108.164063,9.05663969 108.352538,8.77246284 108.549805,8.39160156 C108.747071,8.01074028 108.873047,7.73046965 108.927734,7.55078125 L109.349609,7.55078125 Z M120.230469,2.1015625 C120.121093,2.10546877 119.953126,2.13671846 119.726562,2.1953125 C119.499999,2.25390654 119.337891,2.31445281 119.240234,2.37695312 C119.099609,2.47460986 119.004883,2.66210799 118.956055,2.93945312 C118.907226,3.21679826 118.882812,3.56835725 118.882812,3.99414062 L118.882812,10.0820312 L118.373047,10.0820312 L113.333984,3.27929688 L113.333984,7.56835938 C113.333984,8.04883053 113.364258,8.41796746 113.424805,8.67578125 C113.485352,8.93359504 113.578124,9.11718695 113.703125,9.2265625 C113.792969,9.31250043 113.978514,9.39257775 114.259766,9.46679688 C114.541017,9.541016 114.726562,9.58007811 114.816406,9.58398438 L114.816406,10 L111.40625,10 L111.40625,9.58398438 C111.511719,9.57617184 111.689452,9.53808628 111.939453,9.46972656 C112.189454,9.40136685 112.345703,9.33984402 112.408203,9.28515625 C112.544923,9.1757807 112.638672,9.00879019 112.689453,8.78417969 C112.740235,8.55956919 112.765625,8.17578396 112.765625,7.6328125 L112.765625,3.53710938 C112.765625,3.35742098 112.734375,3.17773527 112.671875,2.99804688 C112.609375,2.81835848 112.525391,2.67968799 112.419922,2.58203125 C112.279296,2.45312436 112.088868,2.3427739 111.848633,2.25097656 C111.608397,2.15917923 111.414063,2.10937504 111.265625,2.1015625 L111.265625,1.68554688 L113.638672,1.68554688 L118.314453,8.02539062 L118.314453,4.0703125 C118.314453,3.58593508 118.283203,3.21386849 118.220703,2.95410156 C118.158203,2.69433464 118.06836,2.5214848 117.951172,2.43554688 C117.841796,2.36132775 117.663087,2.28906285 117.415039,2.21875 C117.166991,2.14843715 116.978516,2.10937504 116.849609,2.1015625 L116.849609,1.68554688 L120.230469,1.68554688 L120.230469,2.1015625 Z M130.367188,5.89257812 C130.367188,6.59961291 130.234376,7.21288803 129.96875,7.73242188 C129.703124,8.25195572 129.357424,8.67773271 128.931641,9.00976562 C128.501951,9.34179854 128.019534,9.58984293 127.484375,9.75390625 C126.949216,9.91796957 126.396487,10 125.826172,10 L122.380859,10 L122.380859,9.58398438 C122.494141,9.58398438 122.641601,9.57324229 122.823242,9.55175781 C123.004884,9.53027333 123.125,9.50585951 123.183594,9.47851562 C123.300782,9.42773412 123.385742,9.35253956 123.438477,9.25292969 C123.491211,9.15331981 123.517578,9.03320383 123.517578,8.89257812 L123.517578,2.89257812 C123.517578,2.75976496 123.495117,2.64062553 123.450195,2.53515625 C123.405273,2.42968697 123.316407,2.34570344 123.183594,2.28320312 C123.062499,2.22460908 122.931641,2.18164076 122.791016,2.15429688 C122.65039,2.12695299 122.529297,2.10937504 122.427734,2.1015625 L122.427734,1.68554688 L126.060547,1.68554688 C126.560549,1.68554688 127.052732,1.76269454 127.537109,1.91699219 C128.021487,2.07128983 128.443358,2.27929557 128.802734,2.54101562 C129.291018,2.88867361 129.673827,3.34374719 129.951172,3.90625 C130.228517,4.46875281 130.367188,5.13085557 130.367188,5.89257812 Z M128.931641,5.88671875 C128.931641,5.32812221 128.857423,4.82324444 128.708984,4.37207031 C128.560546,3.92089618 128.343751,3.52734543 128.058594,3.19140625 C127.789061,2.87109215 127.45801,2.61914154 127.06543,2.43554688 C126.67285,2.25195221 126.236331,2.16015625 125.755859,2.16015625 C125.595702,2.16015625 125.41504,2.16308591 125.213867,2.16894531 C125.012694,2.17480472 124.863282,2.17968748 124.765625,2.18359375 L124.765625,8.57617188 C124.765625,8.9316424 124.86914,9.17773369 125.076172,9.31445312 C125.283204,9.45117256 125.60156,9.51953125 126.03125,9.51953125 C126.527346,9.51953125 126.960936,9.4316415 127.332031,9.25585938 C127.703127,9.08007725 128.003905,8.83593906 128.234375,8.5234375 C128.476564,8.19531086 128.65332,7.81543185 128.764648,7.38378906 C128.875977,6.95214628 128.931641,6.45312783 128.931641,5.88671875 Z M138.066406,6.18554688 C138.242188,6.38086035 138.37207,6.5947254 138.456055,6.82714844 C138.540039,7.05957147 138.582031,7.33007658 138.582031,7.63867188 C138.582031,8.37305055 138.31055,8.97851324 137.767578,9.45507812 C137.224607,9.93164301 136.550785,10.1699219 135.746094,10.1699219 C135.374998,10.1699219 135.003908,10.1123053 134.632812,9.99707031 C134.261717,9.88183536 133.941408,9.74218832 133.671875,9.578125 L133.419922,10.0058594 L132.951172,10.0058594 L132.869141,7.15820312 L133.34375,7.15820312 C133.441407,7.50976738 133.555663,7.82714702 133.686523,8.11035156 C133.817383,8.3935561 133.990233,8.65820189 134.205078,8.90429688 C134.408204,9.13476678 134.645506,9.31835869 134.916992,9.45507812 C135.188478,9.59179756 135.503904,9.66015625 135.863281,9.66015625 C136.132814,9.66015625 136.368163,9.62500035 136.569336,9.5546875 C136.770509,9.48437465 136.933593,9.38476627 137.058594,9.25585938 C137.183594,9.12695248 137.276367,8.97558681 137.336914,8.80175781 C137.397461,8.62792882 137.427734,8.42773551 137.427734,8.20117188 C137.427734,7.86913896 137.333985,7.55957175 137.146484,7.27246094 C136.958983,6.98535013 136.679689,6.76757887 136.308594,6.61914063 C136.054686,6.51757762 135.763674,6.40527405 135.435547,6.28222656 C135.10742,6.15917907 134.82422,6.0429693 134.585938,5.93359375 C134.117185,5.7226552 133.752931,5.44629077 133.493164,5.10449219 C133.233397,4.7626936 133.103516,4.316409 133.103516,3.765625 C133.103516,3.44921717 133.167968,3.15429824 133.296875,2.88085938 C133.425782,2.60742051 133.609374,2.36328232 133.847656,2.1484375 C134.07422,1.94531148 134.341795,1.78613339 134.650391,1.67089844 C134.958986,1.55566349 135.281248,1.49804688 135.617188,1.49804688 C136.000002,1.49804688 136.342772,1.55664004 136.645508,1.67382812 C136.948244,1.79101621 137.224608,1.92773359 137.474609,2.08398438 L137.714844,1.68554688 L138.183594,1.68554688 L138.230469,4.4453125 L137.755859,4.4453125 C137.669921,4.12890467 137.573243,3.82617332 137.46582,3.53710938 C137.358398,3.24804543 137.218751,2.9863293 137.046875,2.75195312 C136.878905,2.52538949 136.673829,2.34472724 136.431641,2.20996094 C136.189452,2.07519464 135.89258,2.0078125 135.541016,2.0078125 C135.16992,2.0078125 134.853517,2.12695193 134.591797,2.36523438 C134.330077,2.60351682 134.199219,2.89452953 134.199219,3.23828125 C134.199219,3.59765805 134.283202,3.89550663 134.451172,4.13183594 C134.619141,4.36816524 134.86328,4.56249924 135.183594,4.71484375 C135.468751,4.85156318 135.749022,4.96972606 136.024414,5.06933594 C136.299806,5.16894581 136.566405,5.27539006 136.824219,5.38867188 C137.058595,5.49023488 137.284179,5.60546811 137.500977,5.734375 C137.717775,5.86328189 137.906249,6.01367102 138.066406,6.18554688 Z M85.3261719,24 L81.8632812,24 L81.8632812,23.5839844 C82.1679703,23.564453 82.4208974,23.5253909 82.6220703,23.4667969 C82.8232432,23.4082028 82.9238281,23.3359379 82.9238281,23.25 C82.9238281,23.2148436 82.9199219,23.1718753 82.9121094,23.1210938 C82.9042968,23.0703122 82.8925782,23.0253908 82.8769531,22.9863281 L82.1855469,21.1230469 L79.2734375,21.1230469 C79.164062,21.3964857 79.0751957,21.6347646 79.0068359,21.8378906 C78.9384762,22.0410166 78.8769534,22.2285148 78.8222656,22.4003906 C78.7714841,22.5683602 78.7363282,22.7050776 78.7167969,22.8105469 C78.6972655,22.9160162 78.6875,23.0019528 78.6875,23.0683594 C78.6875,23.2246102 78.8105456,23.3457027 79.0566406,23.4316406 C79.3027356,23.5175786 79.5800766,23.5683593 79.8886719,23.5839844 L79.8886719,24 L76.7597656,24 L76.7597656,23.5839844 C76.8613286,23.5761718 76.9882805,23.5537111 77.140625,23.5166016 C77.2929695,23.479492 77.4179683,23.4296878 77.515625,23.3671875 C77.6718758,23.2617182 77.7929683,23.1513678 77.8789062,23.0361328 C77.9648442,22.9208979 78.0488277,22.7617198 78.1308594,22.5585938 C78.5488302,21.5156198 79.0097631,20.3437565 79.5136719,19.0429688 C80.0175806,17.742181 80.4667949,16.5839895 80.8613281,15.5683594 L81.3300781,15.5683594 L84.1015625,22.7402344 C84.1601565,22.8925789 84.2265621,23.0156245 84.3007812,23.109375 C84.3750004,23.2031255 84.478515,23.2949214 84.6113281,23.3847656 C84.7011723,23.4394534 84.8183587,23.4853514 84.9628906,23.5224609 C85.1074226,23.5595705 85.2285151,23.5800781 85.3261719,23.5839844 L85.3261719,24 Z M81.9746094,20.6015625 L80.7148438,17.3789062 L79.4785156,20.6015625 L81.9746094,20.6015625 Z M95.65625,16.1015625 C95.5468745,16.1054688 95.3789074,16.1367185 95.1523438,16.1953125 C94.9257801,16.2539065 94.7636724,16.3144528 94.6660156,16.3769531 C94.5253899,16.4746099 94.4306643,16.662108 94.3818359,16.9394531 C94.3330076,17.2167983 94.3085938,17.5683572 94.3085938,17.9941406 L94.3085938,24.0820312 L93.7988281,24.0820312 L88.7597656,17.2792969 L88.7597656,21.5683594 C88.7597656,22.0488305 88.7900388,22.4179675 88.8505859,22.6757812 C88.9111331,22.933595 89.0039056,23.117187 89.1289062,23.2265625 C89.2187504,23.3125004 89.4042955,23.3925778 89.6855469,23.4667969 C89.9667983,23.541016 90.1523433,23.5800781 90.2421875,23.5839844 L90.2421875,24 L86.8320312,24 L86.8320312,23.5839844 C86.9375005,23.5761718 87.1152331,23.5380863 87.3652344,23.4697266 C87.6152356,23.4013668 87.7714841,23.339844 87.8339844,23.2851562 C87.9707038,23.1757807 88.0644529,23.0087902 88.1152344,22.7841797 C88.1660159,22.5595692 88.1914062,22.175784 88.1914062,21.6328125 L88.1914062,17.5371094 C88.1914062,17.357421 88.1601566,17.1777353 88.0976562,16.9980469 C88.0351559,16.8183585 87.9511724,16.679688 87.8457031,16.5820312 C87.7050774,16.4531244 87.5146496,16.3427739 87.2744141,16.2509766 C87.0341785,16.1591792 86.8398445,16.109375 86.6914062,16.1015625 L86.6914062,15.6855469 L89.0644531,15.6855469 L93.7402344,22.0253906 L93.7402344,18.0703125 C93.7402344,17.5859351 93.7089847,17.2138685 93.6464844,16.9541016 C93.5839841,16.6943346 93.4941412,16.5214848 93.3769531,16.4355469 C93.2675776,16.3613278 93.0888684,16.2890629 92.8408203,16.21875 C92.5927722,16.1484371 92.4042975,16.109375 92.2753906,16.1015625 L92.2753906,15.6855469 L95.65625,15.6855469 L95.65625,16.1015625 Z M105.792969,19.8925781 C105.792969,20.5996129 105.660158,21.212888 105.394531,21.7324219 C105.128905,22.2519557 104.783205,22.6777327 104.357422,23.0097656 C103.927732,23.3417985 103.445315,23.5898429 102.910156,23.7539062 C102.374997,23.9179696 101.822268,24 101.251953,24 L97.8066406,24 L97.8066406,23.5839844 C97.9199224,23.5839844 98.0673819,23.5732423 98.2490234,23.5517578 C98.430665,23.5302733 98.550781,23.5058595 98.609375,23.4785156 C98.7265631,23.4277341 98.8115232,23.3525396 98.8642578,23.2529297 C98.9169925,23.1533198 98.9433594,23.0332038 98.9433594,22.8925781 L98.9433594,16.8925781 C98.9433594,16.759765 98.9208987,16.6406255 98.8759766,16.5351562 C98.8310545,16.429687 98.7421882,16.3457034 98.609375,16.2832031 C98.4882806,16.2246091 98.3574226,16.1816408 98.2167969,16.1542969 C98.0761712,16.126953 97.9550786,16.109375 97.8535156,16.1015625 L97.8535156,15.6855469 L101.486328,15.6855469 C101.986331,15.6855469 102.478513,15.7626945 102.962891,15.9169922 C103.447268,16.0712898 103.869139,16.2792956 104.228516,16.5410156 C104.716799,16.8886736 105.099608,17.3437472 105.376953,17.90625 C105.654298,18.4687528 105.792969,19.1308556 105.792969,19.8925781 Z M104.357422,19.8867188 C104.357422,19.3281222 104.283204,18.8232444 104.134766,18.3720703 C103.986327,17.9208962 103.769533,17.5273454 103.484375,17.1914062 C103.214842,16.8710921 102.883791,16.6191415 102.491211,16.4355469 C102.098631,16.2519522 101.662112,16.1601562 101.181641,16.1601562 C101.021484,16.1601562 100.840821,16.1630859 100.639648,16.1689453 C100.438476,16.1748047 100.289063,16.1796875 100.191406,16.1835938 L100.191406,22.5761719 C100.191406,22.9316424 100.294921,23.1777337 100.501953,23.3144531 C100.708985,23.4511726 101.027342,23.5195312 101.457031,23.5195312 C101.953127,23.5195312 102.386717,23.4316415 102.757812,23.2558594 C103.128908,23.0800772 103.429686,22.8359391 103.660156,22.5234375 C103.902345,22.1953109 104.079101,21.8154318 104.19043,21.3837891 C104.301758,20.9521463 104.357422,20.4531278 104.357422,19.8867188 Z M120.757812,20.6777344 C120.664062,20.6894532 120.538087,20.7080077 120.379883,20.7333984 C120.221679,20.7587892 120.09375,20.7949216 119.996094,20.8417969 C119.878906,20.9003909 119.795899,20.9833979 119.74707,21.0908203 C119.698242,21.1982427 119.673828,21.324218 119.673828,21.46875 L119.673828,22.1132812 C119.673828,22.5820336 119.676758,22.8984367 119.682617,23.0625 C119.688477,23.2265633 119.695312,23.3613276 119.703125,23.4667969 C119.183591,23.701173 118.666018,23.8808588 118.150391,24.0058594 C117.634763,24.13086 117.128909,24.1933594 116.632812,24.1933594 C116.10156,24.1933594 115.589846,24.093751 115.097656,23.8945312 C114.605466,23.6953115 114.175783,23.4121112 113.808594,23.0449219 C113.437498,22.6738263 113.142579,22.2226589 112.923828,21.6914062 C112.705077,21.1601536 112.595703,20.5664095 112.595703,19.9101562 C112.595703,19.2773406 112.700194,18.6904324 112.90918,18.1494141 C113.118165,17.6083957 113.414061,17.1386739 113.796875,16.7402344 C114.167971,16.3496074 114.610349,16.0458995 115.124023,15.8291016 C115.637698,15.6123036 116.187497,15.5039062 116.773438,15.5039062 C117.24219,15.5039062 117.650389,15.5605463 117.998047,15.6738281 C118.345705,15.7871099 118.652342,15.9238273 118.917969,16.0839844 L119.158203,15.6855469 L119.626953,15.6855469 L119.679688,18.5917969 L119.199219,18.5917969 C119.117187,18.2714828 119.015626,17.9560562 118.894531,17.6455078 C118.773437,17.3349594 118.617188,17.0566419 118.425781,16.8105469 C118.234374,16.5644519 118.000978,16.3681648 117.725586,16.2216797 C117.450194,16.0751946 117.121096,16.0019531 116.738281,16.0019531 C116.32031,16.0019531 115.947267,16.0869132 115.619141,16.2568359 C115.291014,16.4267587 115.005861,16.6796858 114.763672,17.015625 C114.525389,17.3398454 114.341798,17.7441382 114.212891,18.2285156 C114.083984,18.712893 114.019531,19.2539033 114.019531,19.8515625 C114.019531,20.3789089 114.083007,20.8759742 114.209961,21.3427734 C114.336915,21.8095726 114.521483,22.2128889 114.763672,22.5527344 C115.005861,22.9003924 115.308592,23.1738271 115.671875,23.3730469 C116.035158,23.5722666 116.447263,23.671875 116.908203,23.671875 C117.251955,23.671875 117.565428,23.6191412 117.848633,23.5136719 C118.131837,23.4082026 118.332031,23.2968756 118.449219,23.1796875 C118.480469,22.9765615 118.49707,22.7714854 118.499023,22.5644531 C118.500977,22.3574208 118.501953,22.1816413 118.501953,22.0371094 L118.501953,21.5800781 C118.501953,21.4160148 118.479492,21.2705084 118.43457,21.1435547 C118.389648,21.0166009 118.296876,20.9238284 118.15625,20.8652344 C118.027343,20.8066403 117.85254,20.7626955 117.631836,20.7333984 C117.411132,20.7041014 117.238282,20.6855469 117.113281,20.6777344 L117.113281,20.25 L120.757812,20.25 L120.757812,20.6777344 Z M131.322266,16.1015625 C131.21289,16.1054688 131.052735,16.128906 130.841797,16.171875 C130.630858,16.214844 130.458985,16.2792964 130.326172,16.3652344 C130.193359,16.4550786 130.101563,16.6406236 130.050781,16.921875 C130,17.2031264 129.974609,17.546873 129.974609,17.953125 L129.974609,21.5683594 C129.974609,22.0292992 129.878907,22.4296858 129.6875,22.7695312 C129.496093,23.1093767 129.244142,23.3886708 128.931641,23.6074219 C128.623045,23.8183604 128.297853,23.9697261 127.956055,24.0615234 C127.614256,24.1533208 127.287111,24.1992188 126.974609,24.1992188 C126.474607,24.1992188 126.029299,24.1337897 125.638672,24.0029297 C125.248045,23.8720697 124.919923,23.6953136 124.654297,23.4726562 C124.392577,23.2499989 124.195313,22.9951186 124.0625,22.7080078 C123.929687,22.420897 123.863281,22.1210953 123.863281,21.8085938 L123.863281,16.8925781 C123.863281,16.7558587 123.840821,16.641602 123.795898,16.5498047 C123.750976,16.4580074 123.660157,16.3730473 123.523438,16.2949219 C123.425781,16.2402341 123.300782,16.1962892 123.148438,16.1630859 C122.996093,16.1298826 122.871094,16.109375 122.773438,16.1015625 L122.773438,15.6855469 L126.236328,15.6855469 L126.236328,16.1015625 C126.126953,16.1054688 125.989259,16.1230467 125.823242,16.1542969 C125.657226,16.185547 125.535157,16.2148436 125.457031,16.2421875 C125.324218,16.2890627 125.235352,16.367187 125.19043,16.4765625 C125.145508,16.585938 125.123047,16.7050775 125.123047,16.8339844 L125.123047,21.4277344 C125.123047,21.6503917 125.147461,21.8837878 125.196289,22.1279297 C125.245117,22.3720715 125.341796,22.5996083 125.486328,22.8105469 C125.638673,23.0253917 125.845702,23.2011712 126.107422,23.3378906 C126.369142,23.4746101 126.728513,23.5429688 127.185547,23.5429688 C127.615237,23.5429688 127.975584,23.4746101 128.266602,23.3378906 C128.557619,23.2011712 128.787109,23.0214855 128.955078,22.7988281 C129.115235,22.5878896 129.228515,22.3671887 129.294922,22.1367188 C129.361328,21.9062488 129.394531,21.6738293 129.394531,21.4394531 L129.394531,18.0292969 C129.394531,17.595701 129.363282,17.2412123 129.300781,16.9658203 C129.238281,16.6904283 129.146485,16.5097661 129.025391,16.4238281 C128.888671,16.3261714 128.70215,16.2500003 128.46582,16.1953125 C128.229491,16.1406247 128.048829,16.109375 127.923828,16.1015625 L127.923828,15.6855469 L131.322266,15.6855469 L131.322266,16.1015625 Z M140.480469,21.5507812 L140.322266,24 L133.419922,24 L133.419922,23.5839844 C133.53711,23.5761718 133.693358,23.5595704 133.888672,23.5341797 C134.083985,23.5087889 134.210937,23.482422 134.269531,23.4550781 C134.394532,23.3964841 134.481445,23.320313 134.530273,23.2265625 C134.579102,23.132812 134.603516,23.0136726 134.603516,22.8691406 L134.603516,16.8925781 C134.603516,16.7636712 134.582031,16.6494146 134.539062,16.5498047 C134.496094,16.4501948 134.406251,16.3691409 134.269531,16.3066406 C134.164062,16.2558591 134.022462,16.2109377 133.844727,16.171875 C133.666991,16.1328123 133.525391,16.109375 133.419922,16.1015625 L133.419922,15.6855469 L139.853516,15.6855469 L139.853516,17.6894531 L139.414062,17.6894531 C139.335937,17.3925766 139.166993,17.0771501 138.907227,16.7431641 C138.64746,16.409178 138.400392,16.2265627 138.166016,16.1953125 C138.044921,16.1796874 137.900391,16.1679688 137.732422,16.1601562 C137.564452,16.1523437 137.373048,16.1484375 137.158203,16.1484375 L135.851562,16.1484375 L135.851562,19.453125 L136.789062,19.453125 C137.089845,19.453125 137.30957,19.424805 137.448242,19.3681641 C137.586915,19.3115232 137.708984,19.2167975 137.814453,19.0839844 C137.900391,18.9707026 137.973633,18.8193369 138.03418,18.6298828 C138.094727,18.4404287 138.134766,18.2617196 138.154297,18.09375 L138.59375,18.09375 L138.59375,21.3457031 L138.154297,21.3457031 C138.138672,21.1582022 138.09668,20.959962 138.02832,20.7509766 C137.959961,20.5419911 137.888672,20.3906255 137.814453,20.296875 C137.693359,20.1445305 137.555665,20.0449221 137.401367,19.9980469 C137.24707,19.9511716 137.04297,19.9277344 136.789062,19.9277344 L135.851562,19.9277344 L135.851562,22.4238281 C135.851562,22.6738294 135.86914,22.871093 135.904297,23.015625 C135.939453,23.160157 136.007812,23.2695309 136.109375,23.34375 C136.210938,23.4179691 136.349608,23.4658202 136.525391,23.4873047 C136.701173,23.5087892 136.95117,23.5195312 137.275391,23.5195312 L137.785156,23.5195312 C137.996095,23.5195312 138.173827,23.5117188 138.318359,23.4960938 C138.466798,23.4804687 138.620116,23.4521486 138.77832,23.4111328 C138.936524,23.370117 139.048828,23.3144535 139.115234,23.2441406 C139.294923,23.0566397 139.483397,22.7724628 139.680664,22.3916016 C139.877931,22.0107403 140.003906,21.7304696 140.058594,21.5507812 L140.480469,21.5507812 Z M148.003906,20.1855469 C148.179688,20.3808604 148.30957,20.5947254 148.393555,20.8271484 C148.477539,21.0595715 148.519531,21.3300766 148.519531,21.6386719 C148.519531,22.3730505 148.24805,22.9785132 147.705078,23.4550781 C147.162107,23.931643 146.488285,24.1699219 145.683594,24.1699219 C145.312498,24.1699219 144.941408,24.1123053 144.570312,23.9970703 C144.199217,23.8818354 143.878908,23.7421883 143.609375,23.578125 L143.357422,24.0058594 L142.888672,24.0058594 L142.806641,21.1582031 L143.28125,21.1582031 C143.378907,21.5097674 143.493163,21.827147 143.624023,22.1103516 C143.754883,22.3935561 143.927733,22.6582019 144.142578,22.9042969 C144.345704,23.1347668 144.583006,23.3183587 144.854492,23.4550781 C145.125978,23.5917976 145.441404,23.6601562 145.800781,23.6601562 C146.070314,23.6601562 146.305663,23.6250004 146.506836,23.5546875 C146.708009,23.4843746 146.871093,23.3847663 146.996094,23.2558594 C147.121094,23.1269525 147.213867,22.9755868 147.274414,22.8017578 C147.334961,22.6279288 147.365234,22.4277355 147.365234,22.2011719 C147.365234,21.869139 147.271485,21.5595717 147.083984,21.2724609 C146.896483,20.9853501 146.617189,20.7675789 146.246094,20.6191406 C145.992186,20.5175776 145.701174,20.4052741 145.373047,20.2822266 C145.04492,20.1591791 144.76172,20.0429693 144.523438,19.9335938 C144.054685,19.7226552 143.690431,19.4462908 143.430664,19.1044922 C143.170897,18.7626936 143.041016,18.316409 143.041016,17.765625 C143.041016,17.4492172 143.105468,17.1542982 143.234375,16.8808594 C143.363282,16.6074205 143.546874,16.3632823 143.785156,16.1484375 C144.01172,15.9453115 144.279295,15.7861334 144.587891,15.6708984 C144.896486,15.5556635 145.218748,15.4980469 145.554688,15.4980469 C145.937502,15.4980469 146.280272,15.55664 146.583008,15.6738281 C146.885744,15.7910162 147.162108,15.9277336 147.412109,16.0839844 L147.652344,15.6855469 L148.121094,15.6855469 L148.167969,18.4453125 L147.693359,18.4453125 C147.607421,18.1289047 147.510743,17.8261733 147.40332,17.5371094 C147.295898,17.2480454 147.156251,16.9863293 146.984375,16.7519531 C146.816405,16.5253895 146.611329,16.3447272 146.369141,16.2099609 C146.126952,16.0751946 145.83008,16.0078125 145.478516,16.0078125 C145.10742,16.0078125 144.791017,16.1269519 144.529297,16.3652344 C144.267577,16.6035168 144.136719,16.8945295 144.136719,17.2382812 C144.136719,17.597658 144.220702,17.8955066 144.388672,18.1318359 C144.556641,18.3681652 144.80078,18.5624992 145.121094,18.7148438 C145.406251,18.8515632 145.686522,18.9697261 145.961914,19.0693359 C146.237306,19.1689458 146.503905,19.2753901 146.761719,19.3886719 C146.996095,19.4902349 147.221679,19.6054681 147.438477,19.734375 C147.655275,19.8632819 147.843749,20.013671 148.003906,20.1855469 Z M157.818359,17.9414062 L157.414062,17.9414062 C157.378906,17.8007805 157.31543,17.63379 157.223633,17.4404297 C157.131835,17.2470693 157.029297,17.064454 156.916016,16.8925781 C156.798828,16.7128897 156.670899,16.5556647 156.532227,16.4208984 C156.393554,16.2861321 156.259766,16.2089845 156.130859,16.1894531 C156.009765,16.173828 155.857423,16.1621094 155.673828,16.1542969 C155.490233,16.1464843 155.320313,16.1425781 155.164062,16.1425781 L154.824219,16.1425781 L154.824219,22.7929688 C154.824219,22.9218756 154.851562,23.0400385 154.90625,23.1474609 C154.960938,23.2548833 155.05664,23.3378903 155.193359,23.3964844 C155.263672,23.4238283 155.411132,23.4609373 155.635742,23.5078125 C155.860353,23.5546877 156.035156,23.5800781 156.160156,23.5839844 L156.160156,24 L152.234375,24 L152.234375,23.5839844 C152.343751,23.5761718 152.510741,23.560547 152.735352,23.5371094 C152.959962,23.5136718 153.115234,23.4843752 153.201172,23.4492188 C153.330079,23.3984372 153.424804,23.3251958 153.485352,23.2294922 C153.545899,23.1337886 153.576172,23.0058602 153.576172,22.8457031 L153.576172,16.1425781 L153.236328,16.1425781 C153.115234,16.1425781 152.964845,16.1455078 152.785156,16.1513672 C152.605468,16.1572266 152.433595,16.1699218 152.269531,16.1894531 C152.140624,16.2050782 152.006837,16.2822259 151.868164,16.4208984 C151.729491,16.559571 151.601563,16.716796 151.484375,16.8925781 C151.367187,17.0683603 151.263672,17.2548818 151.173828,17.4521484 C151.083984,17.649415 151.021485,17.8124994 150.986328,17.9414062 L150.576172,17.9414062 L150.576172,15.6855469 L157.818359,15.6855469 L157.818359,17.9414062 Z M165.160156,20.1855469 C165.335938,20.3808604 165.46582,20.5947254 165.549805,20.8271484 C165.633789,21.0595715 165.675781,21.3300766 165.675781,21.6386719 C165.675781,22.3730505 165.4043,22.9785132 164.861328,23.4550781 C164.318357,23.931643 163.644535,24.1699219 162.839844,24.1699219 C162.468748,24.1699219 162.097658,24.1123053 161.726562,23.9970703 C161.355467,23.8818354 161.035158,23.7421883 160.765625,23.578125 L160.513672,24.0058594 L160.044922,24.0058594 L159.962891,21.1582031 L160.4375,21.1582031 C160.535157,21.5097674 160.649413,21.827147 160.780273,22.1103516 C160.911133,22.3935561 161.083983,22.6582019 161.298828,22.9042969 C161.501954,23.1347668 161.739256,23.3183587 162.010742,23.4550781 C162.282228,23.5917976 162.597654,23.6601562 162.957031,23.6601562 C163.226564,23.6601562 163.461913,23.6250004 163.663086,23.5546875 C163.864259,23.4843746 164.027343,23.3847663 164.152344,23.2558594 C164.277344,23.1269525 164.370117,22.9755868 164.430664,22.8017578 C164.491211,22.6279288 164.521484,22.4277355 164.521484,22.2011719 C164.521484,21.869139 164.427735,21.5595717 164.240234,21.2724609 C164.052733,20.9853501 163.773439,20.7675789 163.402344,20.6191406 C163.148436,20.5175776 162.857424,20.4052741 162.529297,20.2822266 C162.20117,20.1591791 161.91797,20.0429693 161.679688,19.9335938 C161.210935,19.7226552 160.846681,19.4462908 160.586914,19.1044922 C160.327147,18.7626936 160.197266,18.316409 160.197266,17.765625 C160.197266,17.4492172 160.261718,17.1542982 160.390625,16.8808594 C160.519532,16.6074205 160.703124,16.3632823 160.941406,16.1484375 C161.16797,15.9453115 161.435545,15.7861334 161.744141,15.6708984 C162.052736,15.5556635 162.374998,15.4980469 162.710938,15.4980469 C163.093752,15.4980469 163.436522,15.55664 163.739258,15.6738281 C164.041994,15.7910162 164.318358,15.9277336 164.568359,16.0839844 L164.808594,15.6855469 L165.277344,15.6855469 L165.324219,18.4453125 L164.849609,18.4453125 C164.763671,18.1289047 164.666993,17.8261733 164.55957,17.5371094 C164.452148,17.2480454 164.312501,16.9863293 164.140625,16.7519531 C163.972655,16.5253895 163.767579,16.3447272 163.525391,16.2099609 C163.283202,16.0751946 162.98633,16.0078125 162.634766,16.0078125 C162.26367,16.0078125 161.947267,16.1269519 161.685547,16.3652344 C161.423827,16.6035168 161.292969,16.8945295 161.292969,17.2382812 C161.292969,17.597658 161.376952,17.8955066 161.544922,18.1318359 C161.712891,18.3681652 161.95703,18.5624992 162.277344,18.7148438 C162.562501,18.8515632 162.842772,18.9697261 163.118164,19.0693359 C163.393556,19.1689458 163.660155,19.2753901 163.917969,19.3886719 C164.152345,19.4902349 164.377929,19.6054681 164.594727,19.734375 C164.811525,19.8632819 164.999999,20.013671 165.160156,20.1855469 Z',\n stroke: 'none',\n fillRule: 'evenodd'\n })\n );\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (IconLogoFull);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/icons/IconLogoFull.jsx\n// module id = 866\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/icons/IconLogoFull.jsx?", + ); + + /***/ + }, + /* 867 */ + /* exports provided: default */ + /* exports used: default */ + /*!***********************************************!*\ + !*** ./app/libs/components/icons/IconMan.jsx ***! + \***********************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__templates_SvgIconTemplate__ = __webpack_require__(/*! ../../templates/SvgIconTemplate */ 15);\n\n// jscs:disable maximumLineLength\n/* eslint max-len: 0 */\n\n\n\n\n\nvar IconMan = function IconMan(props) {\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_2__templates_SvgIconTemplate__[\"a\" /* default */],\n props,\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('path', {\n d: 'M22.0810615,25.7684257 C22.0161008,25.0506868 21.9938111,24.4281829 21.9949362,23.6263947 C21.9952066,23.4336592 21.9962266,23.2913237 21.999554,22.9184172 C22.0030115,22.5309425 22.0042785,22.3352066 22.0042785,22.0938454 L21.2042785,22.0938454 L21.576159,22.8021568 C22.5800356,22.2750974 23.8016949,19.7628975 24.0087285,17.8289215 L23.2132734,17.7437674 L23.2786055,18.5410953 C24.4434224,18.4456517 25.3194312,17.3277866 25.5585867,15.3310243 C25.7021969,14.1381272 25.2214988,13.1563008 24.493882,12.7143752 L24.0785908,13.3981392 L24.8377792,13.6503951 C25.4882497,11.6927421 25.9096718,9.26132171 25.7472603,7.18173165 C25.505009,4.07983739 23.9945307,1.98977391 20.9978676,1.57304795 L21.5830124,1.96981068 C20.8325499,0.6507843 19.0935397,0 16.8136598,0 C9.09600673,0.142043634 6.8067082,5.37725981 8.94160016,13.5991982 L9.71592262,13.3981392 L9.2997531,12.7149094 C8.57363068,13.1572057 8.09333167,14.138217 8.23590565,15.3308474 C8.47602652,17.328135 9.35145506,18.4456815 10.515908,18.5410953 L10.58124,17.7437674 L9.78574859,17.8285812 C9.99050344,19.749033 11.2534827,22.2722815 12.2662861,22.8025747 L12.6373694,22.0938454 L11.8373694,22.0938454 C11.8373694,22.3326937 11.8385884,22.5264904 11.8419149,22.9101788 C11.8451818,23.2869959 11.8461745,23.4312033 11.8463767,23.626102 C11.8472074,24.426894 11.8247073,25.0501405 11.7596971,25.7684257 L11.8065703,25.5617991 C11.4255473,26.5868403 10.3712693,27.2673504 7.86551877,28.2661393 C7.66079813,28.3477406 6.76937994,28.6989188 6.97816882,28.616503 C6.60821109,28.7625374 6.33271268,28.8729461 6.0609254,28.9849258 C1.62733113,30.8116206 -0.557345056,32.8760374 -0.798560832,36.8920348 L-0.849492743,37.7399994 L0,37.7399994 L33.7945135,37.7399994 L34.6439129,37.7399994 L34.5930795,36.8921224 C34.3522975,32.8759925 32.175507,30.8114204 27.7572319,28.9842012 C27.4868894,28.8723985 27.2128417,28.7621502 26.8449168,28.6163561 C27.0498557,28.6975653 26.1658808,28.347973 25.9623306,28.2665285 C23.4656662,27.2675634 22.4154451,26.587469 22.0341883,25.5617991 L22.0810615,25.7684257 L22.0810615,25.7684257 Z M20.4875748,25.9126482 L20.534448,26.1192749 C21.1342433,27.7328645 22.4483299,28.5838309 25.3679519,29.7520298 C25.5749894,29.8348696 26.4639584,30.186437 26.25549,30.1038292 C26.6166776,30.2469536 26.884096,30.3545349 27.1457641,30.4627502 C31.0587945,32.0810207 32.8008198,33.7332407 32.9959474,36.9878764 L33.7945135,36.1399994 L1.11022302e-15,36.1399994 L0.798560832,36.9879639 C0.993933826,33.7352022 2.74296691,32.0824477 6.67043807,30.4642818 C6.93354588,30.3558782 7.20241256,30.2481272 7.56562981,30.1047535 C7.35328922,30.1885712 8.24973323,29.8354132 8.45794796,29.7524191 C11.3880852,28.5844702 12.7062257,27.7336433 13.3063105,26.1192749 L13.3531838,25.9126482 C13.4230587,25.1406133 13.4472534,24.4704278 13.4463758,23.6244422 C13.4461679,23.4240139 13.4451582,23.2773441 13.4418547,22.8963079 C13.4385668,22.5170574 13.4373694,22.3267027 13.4373694,22.0938454 L13.4373694,21.6096925 L13.0084526,21.3851162 C12.5549714,21.1476781 11.5304652,19.100864 11.3767315,17.6589537 L11.3065301,17.0005157 L10.6465721,16.9464396 C10.5673967,16.939952 10.4593828,16.8802719 10.3328051,16.7186865 C10.1022946,16.4244234 9.91698647,15.9094321 9.82453016,15.1403957 C9.75661222,14.572261 9.93952212,14.1986674 10.1320921,14.081369 L10.6395903,13.7722413 L10.4902451,13.1970802 C8.58085917,5.84361515 10.3846911,1.71857418 16.8283954,1.59986428 C18.5790195,1.6 19.7895012,2.05299477 20.1923422,2.76103518 L20.3872015,3.10352351 L20.777487,3.1577979 C22.9314782,3.45733909 23.9629914,4.88465408 24.1521175,7.3063089 C24.2953653,9.14051733 23.9083629,11.3733507 23.3194025,13.1458832 L23.1183631,13.7509303 L23.6632997,14.0819032 C23.8557797,14.198808 24.0384273,14.5718658 23.9699988,15.1402672 C23.8778599,15.9095536 23.6926807,16.4243707 23.4621323,16.718571 C23.3354984,16.8801671 23.2272673,16.9399397 23.1479414,16.9464396 L22.4882707,17.0004921 L22.4178184,17.6586133 C22.2618047,19.1159928 21.269831,21.1558713 20.8323981,21.3855341 L20.4042785,21.6103072 L20.4042785,22.0938454 C20.4042785,22.3290413 20.4030344,22.5212332 20.3996177,22.9041411 C20.3962532,23.2812073 20.3952159,23.4259642 20.3949378,23.6241496 C20.3937491,24.4712924 20.417725,25.1408908 20.4875748,25.9126482 L20.4875748,25.9126482 Z',\n fillRule: 'evenodd'\n })\n );\n};\n\nIconMan.propTypes = {\n title: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string\n};\n\nIconMan.defaultProps = {\n title: 'Man',\n viewBoxWidth: 36,\n viewBoxHeight: 38\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (IconMan);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/icons/IconMan.jsx\n// module id = 867\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/icons/IconMan.jsx?", + ); + + /***/ + }, + /* 868 */ + /* exports provided: default */ + /* exports used: default */ + /*!****************************************************!*\ + !*** ./app/libs/components/icons/IconMessages.jsx ***! + \****************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__templates_SvgIconTemplate__ = __webpack_require__(/*! ../../templates/SvgIconTemplate */ 15);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\n\n\nvar babelPluginFlowReactPropTypes_proptype_SvgProps = __webpack_require__(/*! ../../../types */ 4).babelPluginFlowReactPropTypes_proptype_SvgProps || __webpack_require__(/*! react */ 1).PropTypes.any;\n\n\n\nvar IconMessages = function IconMessages(_ref) {\n var _ref$title = _ref.title,\n title = _ref$title === undefined ? 'Messages' : _ref$title,\n _ref$viewBoxWidth = _ref.viewBoxWidth,\n viewBoxWidth = _ref$viewBoxWidth === undefined ? 18 : _ref$viewBoxWidth,\n _ref$viewBoxHeight = _ref.viewBoxHeight,\n viewBoxHeight = _ref$viewBoxHeight === undefined ? 18 : _ref$viewBoxHeight,\n otherProps = _objectWithoutProperties(_ref, ['title', 'viewBoxWidth', 'viewBoxHeight']);\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_1__templates_SvgIconTemplate__[\"a\" /* default */],\n _extends({ title: title, viewBoxWidth: viewBoxWidth, viewBoxHeight: viewBoxHeight }, otherProps),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('path', { d: 'M3.68042055,15.2366246 C3.795107,15.1542416 3.91007004,15.0643825 4.04875637,14.9498809 C4.10923754,14.8999468 4.37609633,14.6752345 4.44987078,14.6145756 C4.95318617,14.2007391 5.32002901,13.9643293 5.86312423,13.816627 C6.28550436,13.7017548 6.72706264,13.6890733 7.1644874,13.79105 C7.75694387,13.9291693 8.37219578,14 9,14 C12.9150312,14 16,11.2578055 16,8 C16,4.74219447 12.9150312,2 9,2 C5.08496878,2 2,4.74219447 2,8 C2,9.19090364 2.40610429,10.3312648 3.16656745,11.3111238 C3.23976032,11.407988 3.23976032,11.407988 3.31011931,11.5126912 C3.77970506,12.2343073 3.8463746,12.9723963 3.67138278,13.7766694 C3.62020059,14.0119059 3.37126362,14.8582582 3.31906504,15.0666761 C3.12835064,15.8281586 3.01643532,16.6592994 3.00167411,17.748932 C2.93615271,17.767056 2.86923405,17.784391 2.80087181,17.8008718 L1.10296949,16.1029695 C1.10705891,16.0679862 1.11124201,16.0333961 1.11551351,15.9991932 C2.2651518,15.98295 3.00516343,15.7216835 3.68042055,15.2366246 Z M9,0 C13.9705627,0 18,3.581722 18,8 C18,12.418278 13.9705627,16 9,16 C8.20880424,16 7.44145387,15.9092496 6.71040425,15.7388202 C5.65927221,15.49377 5,18 1,18 C1,14 2.1917293,13.3170904 1.58657498,12.5373472 C0.585942511,11.2480293 0,9.68483875 0,8 C0,3.581722 4.02943725,0 9,0 Z' })\n );\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (IconMessages);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/icons/IconMessages.jsx\n// module id = 868\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/icons/IconMessages.jsx?", + ); + + /***/ + }, + /* 869 */ + /* exports provided: default */ + /* exports used: default */ + /*!*******************************************************!*\ + !*** ./app/libs/components/icons/IconPrivateRoom.jsx ***! + \*******************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__templates_SvgIconTemplate__ = __webpack_require__(/*! ../../templates/SvgIconTemplate */ 15);\n\n// jscs:disable maximumLineLength\n/* eslint max-len: 0 */\n\n\n\n\n\nvar IconPrivateRoom = function IconPrivateRoom(props) {\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_2__templates_SvgIconTemplate__[\"a\" /* default */],\n props,\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'g',\n { id: 'IconPrivateRoom-1', stroke: 'none', fill: 'none', fillRule: 'evenodd' },\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'g',\n { id: 'IconPrivateRoom-2' },\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('path', { d: 'M16.9176697,25.2978281 L11.1181035,25.2978281 L11.1181035,23.8167344 L16.9176697,23.8167344 C16.9857953,23.8167344 17.042073,23.7604529 17.042073,23.6923225 L17.042073,19.3734532 L18.5230654,19.3734532 L18.5230654,23.6923225 C18.5230654,24.577276 17.8025626,25.2978281 16.9176697,25.2978281 L16.9176697,25.2978281 Z' }),\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('path', { d: 'M2.30686584,24.6532781 L0.825873449,24.6532781 L0.825873449,0.955778501 L16.9923864,0.955778501 C17.8772793,0.955778501 18.5977821,1.6763306 18.5977821,2.5612841 L18.5977821,6.13960654 L17.1167897,6.13960654 L17.1167897,2.5612841 C17.1167897,2.49315379 17.060512,2.43687223 16.9923864,2.43687223 L2.30686584,2.43687223 L2.30686584,24.6532781 L2.30686584,24.6532781 Z' }),\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('path', { d: 'M22.2428913,17.9849279 L14.0974332,17.9849279 L14.0974332,12.060553 L22.2428913,12.060553 L22.2428913,17.9849279 L22.2428913,17.9849279 L22.2428913,17.9849279 Z M15.5784256,16.5038342 L20.7618989,16.5038342 L20.7618989,13.5416467 L15.5784256,13.5416467 L15.5784256,16.5038342 L15.5784256,16.5038342 L15.5784256,16.5038342 Z' }),\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('path', { d: 'M20.6351473,11.8994155 L19.154155,11.8994155 L19.154155,10.0480483 C19.154155,9.43561606 18.655801,8.93722802 18.0434107,8.93722802 C17.4310203,8.93722802 16.9326664,9.43561606 16.9326664,10.0480483 L16.9326664,11.8994155 L15.451674,11.8994155 L15.451674,10.0480483 C15.451674,8.61879287 16.614253,7.45613429 18.0434107,7.45613429 C19.4725683,7.45613429 20.6351473,8.61879287 20.6351473,10.0480483 L20.6351473,11.8994155 L20.6351473,11.8994155 Z' }),\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('path', { d: 'M10.9018052,31.218034 C10.7211241,31.218034 10.5441455,31.1676768 10.3893818,31.0714058 L1.28720258,25.4365847 C0.997668566,25.2573723 0.825873449,24.9478238 0.825873449,24.6079127 L0.825873449,2.20118633 C0.825873449,1.66354931 1.2627662,1.22662666 1.80036644,1.22662666 C1.98104751,1.22662666 2.1580261,1.27698385 2.31278981,1.37325494 L11.414969,7.00733547 C11.7045031,7.18654781 11.8762982,7.4960964 11.8762982,7.83600741 L11.8762982,30.2427338 C11.8762982,30.7803708 11.4394054,31.218034 10.9018052,31.218034 L10.9018052,31.218034 L10.9018052,31.218034 Z M2.30686584,24.3257644 L10.3953058,29.3333423 L10.3953058,8.11815576 L2.30686584,3.11057788 L2.30686584,24.3257644 L2.30686584,24.3257644 L2.30686584,24.3257644 Z' })\n )\n )\n );\n};\n\nIconPrivateRoom.propTypes = {\n title: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string\n};\n\nIconPrivateRoom.defaultProps = {\n title: 'Private Room',\n viewBoxWidth: 23,\n viewBoxHeight: 32\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (IconPrivateRoom);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/icons/IconPrivateRoom.jsx\n// module id = 869\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/icons/IconPrivateRoom.jsx?", + ); + + /***/ + }, + /* 870 */ + /* exports provided: default */ + /* exports used: default */ + /*!**************************************************!*\ + !*** ./app/libs/components/icons/IconPublic.jsx ***! + \**************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__templates_SvgIconTemplate__ = __webpack_require__(/*! ../../templates/SvgIconTemplate */ 15);\n\n// jscs:disable maximumLineLength\n/* eslint max-len: 0 */\n\n\n\n\n\nvar IconPublic = function IconPublic(props) {\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_2__templates_SvgIconTemplate__[\"a\" /* default */],\n props,\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'g',\n { id: 'IconPublic-1', fillRule: 'evenodd' },\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'g',\n { id: 'IconPublic-2', transform: 'translate(1, 1)', strokeWidth: '0.3' },\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('path', { d: 'M9.5,19 C14.7467054,19 19,14.7467054 19,9.5 C19,4.25329462 14.7467054,0 9.5,0 C4.25329462,0 0,4.25329462 0,9.5 C0,14.7467054 4.25329462,19 9.5,19 L9.5,19 L9.5,19 Z M9.5,18.1363636 C14.2697321,18.1363636 18.1363636,14.2697321 18.1363636,9.5 C18.1363636,4.73026785 14.2697321,0.863636364 9.5,0.863636364 C4.73026785,0.863636364 0.863636364,4.73026785 0.863636364,9.5 C0.863636364,14.2697321 4.73026785,18.1363636 9.5,18.1363636 L9.5,18.1363636 L9.5,18.1363636 Z M11.4420028,4.50944078 C10.9768644,4.63720417 11.5121865,5.86800983 11.0213596,5.76526444 C10.5354065,5.66353922 9.95180515,5.18450621 9.63474653,4.9108632 C9.26041311,4.58778815 10.2705516,4.61415488 10.4588099,4.34842904 C10.6844479,4.02994189 10.4886022,3.7253087 10.3032612,3.66609158 C9.59894928,3.44106139 8.62172284,3.96855175 8.15963999,3.85235882 C7.3431523,3.64704912 7.72094929,3.44758968 6.84199902,3.32509055 C6.40342452,3.26396651 5.9247592,3.58029133 5.19672001,3.43688349 C4.30855868,3.26193517 4.31659607,4.92779773 3.98451635,5.31772618 C4.81579294,4.59229439 6.49683392,5.1229586 6.33216783,5.76526457 C6.11691307,6.6048997 7.65301475,7.92328042 7.89718733,8.52655802 C8.0251136,8.84262565 8.55311518,8.18425328 8.98101655,9.3791828 C9.05857486,9.75123804 9.52458755,9.50400965 9.92494156,9.57689823 C10.4152503,9.66616394 10.6948318,10.0668469 10.8564954,10.1581116 C11.3471027,10.4350764 8.85280507,11.0174951 11.3075642,12.8087894 C11.2451606,13.7004817 11.2819623,14.5309611 11.187175,14.6813209 C10.9709225,15.024359 11.0858672,15.244269 11.187175,15.3530563 C10.6016473,15.5029826 11.3043864,16.7498482 11.7727026,16.4651189 C12.0603398,16.2902397 11.7727026,15.9264024 12.0231367,15.5803496 C11.7727026,14.9755514 13.8569619,13.3210358 14.2406967,13.0335544 C14.2406967,13.0335544 14.2276453,12.3061573 14.8086303,11.8489754 C15.0972948,11.6218228 14.3735993,11.1619215 13.879046,11.3208109 C13.879046,11.3208109 13.8495904,10.3850747 12.4945493,10.501838 C11.975878,10.5465317 11.6297838,10.2211335 11.6297838,10.2211335 C11.6297838,10.2211335 11.187175,9.37918293 10.701055,9.37918293 C10.6225834,9.37918293 10.7611927,9.06736296 10.4588099,8.90903337 C10.2216062,8.78483197 9.56172612,8.77699982 9.56172612,8.52655806 C9.56172612,8.2761163 10.2016423,8.37593945 10.6002621,8.05958638 C10.7200338,7.96453305 10.8966351,8.43194536 11.0213597,8.32676494 C11.1638876,8.20657094 10.8649555,7.9863343 11.3075643,7.60997021 C11.3876021,7.54191147 11.8219445,7.07467267 12.1909891,6.77176768 C12.3241996,6.66243101 12.5859898,6.74676104 12.6265497,6.63650801 C12.7801069,6.21909688 12.0669739,6.57026339 12.3070191,6.04079514 C12.3930101,5.85112458 13.7142398,6.37456857 13.7900273,6.29844032 C13.9729844,6.11466045 12.8128169,6.05220257 13.2937221,5.76526453 C13.4978277,5.64348234 11.9071412,4.38167744 11.4420028,4.50944078 L11.4420028,4.50944078 L11.4420028,4.50944078 Z' })\n )\n )\n );\n};\n\nIconPublic.propTypes = {\n title: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string\n};\n\nIconPublic.defaultProps = {\n title: 'Public',\n viewBoxWidth: 21,\n viewBoxHeight: 21\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (IconPublic);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/icons/IconPublic.jsx\n// module id = 870\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/icons/IconPublic.jsx?", + ); + + /***/ + }, + /* 871 */ + /* exports provided: default */ + /* exports used: default */ + /*!**************************************************!*\ + !*** ./app/libs/components/icons/IconSearch.jsx ***! + \**************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__templates_SvgIconTemplate__ = __webpack_require__(/*! ../../templates/SvgIconTemplate */ 15);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\n\n\nvar babelPluginFlowReactPropTypes_proptype_SvgProps = __webpack_require__(/*! ../../../types */ 4).babelPluginFlowReactPropTypes_proptype_SvgProps || __webpack_require__(/*! react */ 1).PropTypes.any;\n\n\n\nvar IconSearch = function IconSearch(_ref) {\n var _ref$title = _ref.title,\n title = _ref$title === undefined ? 'LogoFull' : _ref$title,\n _ref$viewBoxWidth = _ref.viewBoxWidth,\n viewBoxWidth = _ref$viewBoxWidth === undefined ? 18 : _ref$viewBoxWidth,\n _ref$viewBoxHeight = _ref.viewBoxHeight,\n viewBoxHeight = _ref$viewBoxHeight === undefined ? 18 : _ref$viewBoxHeight,\n otherProps = _objectWithoutProperties(_ref, ['title', 'viewBoxWidth', 'viewBoxHeight']);\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_1__templates_SvgIconTemplate__[\"a\" /* default */],\n _extends({ title: title, viewBoxWidth: viewBoxWidth, viewBoxHeight: viewBoxHeight }, otherProps),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('path', {\n d: 'M12.8482429,10.8482429 L18,16 L16,18 L10.8482429,12.8482429 C9.74406953,13.5762768 8.4215177,14 7,14 C3.13400675,14 0,10.8659932 0,7 C0,3.13400675 3.13400675,0 7,0 C10.8659932,0 14,3.13400675 14,7 C14,8.4215177 13.5762768,9.74406953 12.8482429,10.8482429 Z M7,12 C9.76142375,12 12,9.76142375 12,7 C12,4.23857625 9.76142375,2 7,2 C4.23857625,2 2,4.23857625 2,7 C2,9.76142375 4.23857625,12 7,12 Z',\n stroke: 'none',\n fillRule: 'nonzero'\n })\n );\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (IconSearch);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/icons/IconSearch.jsx\n// module id = 871\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/icons/IconSearch.jsx?", + ); + + /***/ + }, + /* 872 */ + /* exports provided: default */ + /* exports used: default */ + /*!******************************************************!*\ + !*** ./app/libs/components/icons/IconSharedRoom.jsx ***! + \******************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__templates_SvgIconTemplate__ = __webpack_require__(/*! ../../templates/SvgIconTemplate */ 15);\n\n// jscs:disable maximumLineLength\n/* eslint max-len: 0 */\n\n\n\n\n\nvar IconSharedRoom = function IconSharedRoom(props) {\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_2__templates_SvgIconTemplate__[\"a\" /* default */],\n props,\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'g',\n { id: 'IconSharedRoom-1', stroke: 'none', fill: 'none', fillRule: 'evenodd' },\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n 'g',\n { id: 'IconSharedRoom-2' },\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('path', { d: 'M32.8074997,16.1668614 L8.3382173,16.1668614 L8.3382173,5.46855719 C8.3382173,2.46921119 10.7943215,0.119405087 13.930213,0.119405087 L27.215504,0.119405087 C30.3513954,0.119405087 32.8074997,2.46921119 32.8074997,5.46855719 L32.8074997,16.1668614 L32.8074997,16.1668614 L32.8074997,16.1668614 Z M9.86754744,14.6385322 L31.2781695,14.6385322 L31.2781695,5.46855719 C31.2781695,3.28992396 29.5316745,1.64773426 27.215504,1.64773426 L13.930213,1.64773426 C11.6140425,1.64773426 9.86754744,3.28992396 9.86754744,5.46855719 L9.86754744,14.6385322 L9.86754744,14.6385322 L9.86754744,14.6385322 Z' }),\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('path', { d: 'M34.8111701,19.8921638 L6.52467974,19.8921638 L6.29528022,19.5903187 C5.77071998,18.9002781 4.18556928,16.9577717 3.16397674,16.2646745 C1.63082327,15.2238823 0.786633028,13.7987153 0.786633028,12.2505179 C0.786633028,9.72189728 2.84434674,7.66553038 5.37462347,7.66553038 C7.9049002,7.66553038 9.96261391,9.72189728 9.96261391,12.2505179 L8.43328376,12.2505179 C8.43328376,10.5647708 7.06147462,9.19385955 5.37462347,9.19385955 C3.68777232,9.19385955 2.31596318,10.5647708 2.31596318,12.2505179 C2.31596318,13.5656452 3.24426658,14.4719443 4.02269562,14.9999821 C5.18804519,15.7901283 6.70055271,17.6332932 7.27787484,18.3638346 L34.0572104,18.3638346 C34.6345325,17.6332932 36.14704,15.7901283 37.3131543,14.9999821 C38.0915833,14.4719443 39.0198867,13.5656452 39.0198867,12.2505179 C39.0198867,10.5647708 37.6480776,9.19385955 35.9612264,9.19385955 C34.2743753,9.19385955 32.9025661,10.5647708 32.9025661,12.2505179 L31.373236,12.2505179 C31.373236,9.72189728 33.4309497,7.66553038 35.9612264,7.66553038 C38.4915031,7.66553038 40.5492169,9.72189728 40.5492169,12.2505179 C40.5492169,13.7987153 39.7050266,15.2238823 38.1726378,16.2639103 C37.1487513,16.9585359 35.5643652,18.9002781 35.0405697,19.5895546 L34.8111701,19.8921638 L34.8111701,19.8921638 Z' }),\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('path', { d: 'M10.7973802,23.1504767 L10.407401,23.1504767 C9.18776019,23.1504767 8.3382173,21.9423324 8.3382173,20.8579829 L8.3382173,18.5654891 L12.9262077,18.5654891 L12.9262077,20.8579829 C12.9262077,21.9400399 12.0154916,23.1504767 10.7973802,23.1504767 L10.7973802,23.1504767 L10.7973802,23.1504767 Z M9.86754744,20.0938183 L9.86754744,20.8579829 C9.86754744,21.2270744 10.1848834,21.6221475 10.407401,21.6221475 L10.7973802,21.6221475 C11.0336617,21.6221475 11.3968776,21.2125553 11.3968776,20.8579829 L11.3968776,20.0938183 L9.86754744,20.0938183 L9.86754744,20.0938183 L9.86754744,20.0938183 Z' }),\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('path', { d: 'M30.6552499,23.1504767 L30.2652707,23.1504767 C29.0456299,23.1504767 28.196087,21.9423324 28.196087,20.8579829 L28.196087,18.5654891 L32.7840775,18.5654891 L32.7840775,20.8579829 C32.7840775,21.9400399 31.8733614,23.1504767 30.6552499,23.1504767 L30.6552499,23.1504767 L30.6552499,23.1504767 Z M29.7254172,20.0938183 L29.7254172,20.8579829 C29.7254172,21.2270744 30.0427532,21.6221475 30.2652707,21.6221475 L30.6552499,21.6221475 C30.8915314,21.6221475 31.2547473,21.2125553 31.2547473,20.8579829 L31.2547473,20.0938183 L29.7254172,20.0938183 L29.7254172,20.0938183 L29.7254172,20.0938183 Z' })\n )\n )\n );\n};\n\nIconSharedRoom.propTypes = {\n title: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string\n};\n\nIconSharedRoom.defaultProps = {\n title: 'Shared Room',\n viewBoxWidth: 41,\n viewBoxHeight: 24\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (IconSharedRoom);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/icons/IconSharedRoom.jsx\n// module id = 872\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/icons/IconSharedRoom.jsx?", + ); + + /***/ + }, + /* 873 */ + /* exports provided: default */ + /* exports used: default */ + /*!*********************************************************************!*\ + !*** ./app/libs/components/icons/IconSoonRibbon/IconSoonRibbon.jsx ***! + \*********************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__templates_SvgIconTemplate__ = __webpack_require__(/*! ../../../templates/SvgIconTemplate */ 15);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__IconSoonRibbon_scss__ = __webpack_require__(/*! ./IconSoonRibbon.scss */ 1098);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__IconSoonRibbon_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__IconSoonRibbon_scss__);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\n\n\n\n\n\n\nvar IconSoonRibbon = function IconSoonRibbon(_ref) {\n var _ref$title = _ref.title,\n title = _ref$title === undefined ? 'Coming Soon' : _ref$title,\n _ref$viewBoxWidth = _ref.viewBoxWidth,\n viewBoxWidth = _ref$viewBoxWidth === undefined ? 120 : _ref$viewBoxWidth,\n _ref$viewBoxHeight = _ref.viewBoxHeight,\n viewBoxHeight = _ref$viewBoxHeight === undefined ? 120 : _ref$viewBoxHeight,\n _ref$height = _ref.height,\n height = _ref$height === undefined ? 120 : _ref$height,\n _ref$width = _ref.width,\n width = _ref$width === undefined ? 120 : _ref$width,\n otherProps = _objectWithoutProperties(_ref, ['title', 'viewBoxWidth', 'viewBoxHeight', 'height', 'width']);\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_1__templates_SvgIconTemplate__[\"a\" /* default */],\n _extends({ title: title, viewBoxWidth: viewBoxWidth, viewBoxHeight: viewBoxHeight, height: height, width: width }, otherProps),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'g',\n { className: __WEBPACK_IMPORTED_MODULE_2__IconSoonRibbon_scss___default.a.g },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('path', { className: __WEBPACK_IMPORTED_MODULE_2__IconSoonRibbon_scss___default.a.pathBehind, d: 'M115 80h5v40h-5zM0 0h40v5H0z' }),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('path', { className: __WEBPACK_IMPORTED_MODULE_2__IconSoonRibbon_scss___default.a.pathFront, d: 'M0 0h50l70 70v50' }),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'text',\n { className: __WEBPACK_IMPORTED_MODULE_2__IconSoonRibbon_scss___default.a.text },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'tspan',\n { x: '22.866', y: '52.366' },\n 'COMING SOON'\n )\n )\n )\n );\n};\n\nIconSoonRibbon.propTypes = {\n title: __webpack_require__(/*! prop-types */ 0).string,\n viewBoxWidth: __webpack_require__(/*! prop-types */ 0).number,\n viewBoxHeight: __webpack_require__(/*! prop-types */ 0).number,\n height: __webpack_require__(/*! prop-types */ 0).number,\n width: __webpack_require__(/*! prop-types */ 0).number\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (IconSoonRibbon);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/icons/IconSoonRibbon/IconSoonRibbon.jsx\n// module id = 873\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/icons/IconSoonRibbon/IconSoonRibbon.jsx?", + ); + + /***/ + }, + /* 874 */ + /* exports provided: default */ + /* exports used: default */ + /*!***************************************************!*\ + !*** ./app/libs/components/icons/IconSorting.jsx ***! + \***************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__enums_SortOrder__ = __webpack_require__(/*! ../../../enums/SortOrder */ 298);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__templates_SvgIconTemplate__ = __webpack_require__(/*! ../../templates/SvgIconTemplate */ 15);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\n\n\n\n\n\n\nvar IconSorting = function IconSorting(_ref) {\n var order = _ref.order,\n _ref$title = _ref.title,\n title = _ref$title === undefined ? 'Sorting' : _ref$title,\n _ref$viewBoxWidth = _ref.viewBoxWidth,\n viewBoxWidth = _ref$viewBoxWidth === undefined ? 6 : _ref$viewBoxWidth,\n _ref$viewBoxHeight = _ref.viewBoxHeight,\n viewBoxHeight = _ref$viewBoxHeight === undefined ? 10 : _ref$viewBoxHeight,\n otherProps = _objectWithoutProperties(_ref, ['order', 'title', 'viewBoxWidth', 'viewBoxHeight']);\n\n var activeColor = '#333';\n var inactiveColor = '#888';\n\n var topRectangleColor = void 0;\n var bottomRectangleColor = void 0;\n\n switch (order) {\n case __WEBPACK_IMPORTED_MODULE_1__enums_SortOrder__[\"a\" /* default */].get('ASC'):\n topRectangleColor = activeColor;\n bottomRectangleColor = inactiveColor;\n break;\n case __WEBPACK_IMPORTED_MODULE_1__enums_SortOrder__[\"a\" /* default */].get('DESC'):\n topRectangleColor = inactiveColor;\n bottomRectangleColor = activeColor;\n break;\n default:\n topRectangleColor = inactiveColor;\n bottomRectangleColor = inactiveColor;\n }\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_2__templates_SvgIconTemplate__[\"a\" /* default */],\n _extends({ title: title, viewBoxWidth: viewBoxWidth, viewBoxHeight: viewBoxHeight }, otherProps),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n 'g',\n { id: 'IconSorting-1', stroke: 'none', fill: 'none', fillRule: 'evenodd' },\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('polygon', { fill: topRectangleColor, points: '0 6 6 6 3 10' }),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('polygon', { fill: bottomRectangleColor, points: '0 4 6 4 3 0' })\n )\n );\n};\n\nIconSorting.propTypes = {\n order: __webpack_require__(/*! prop-types */ 0).oneOf(['asc', 'desc']),\n title: __webpack_require__(/*! prop-types */ 0).string,\n viewBoxWidth: __webpack_require__(/*! prop-types */ 0).number,\n viewBoxHeight: __webpack_require__(/*! prop-types */ 0).number\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (IconSorting);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/icons/IconSorting.jsx\n// module id = 874\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/icons/IconSorting.jsx?", + ); + + /***/ + }, + /* 875 */ + /* exports provided: default */ + /* exports used: default */ + /*!***************************************************!*\ + !*** ./app/libs/components/icons/IconTwitter.jsx ***! + \***************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__templates_SvgIconTemplate__ = __webpack_require__(/*! ../../templates/SvgIconTemplate */ 15);\n\n/* eslint max-len: 0 */\n\n\n\n\n\nvar IconTwitter = function IconTwitter(props) {\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_2__templates_SvgIconTemplate__[\"a\" /* default */],\n props,\n __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('path', { d: 'M0 20C0 8.954 8.952 0 20 0c11.046 0 20 8.952 20 20 0 11.046-8.952 20-20 20C8.954 40 0 31.048 0 20zm30-5.93c-.695.4-1.544.638-2.317.718.85-.558 1.468-1.434 1.776-2.47-.773.478-1.622.877-2.626 1.116C26.062 12.558 25.058 12 23.9 12c-2.24 0-4.093 1.99-4.093 4.54 0 .318 0 .717.077 1.035-3.398-.16-6.41-1.99-8.417-4.7-.386.638-.54 1.435-.54 2.31 0 1.594.695 2.948 1.776 3.744-.695 0-1.313-.24-1.854-.558v.08c0 2.15 1.39 3.982 3.243 4.46-.31.08-.695.16-1.08.16-.233 0-.542 0-.774-.08.54 1.83 2.007 3.105 3.783 3.105-1.39 1.195-3.166 1.912-5.02 1.912-.308 0-.617 0-1.003-.08 1.776 1.274 3.938 2.07 6.255 2.07 7.49 0 11.583-6.85 11.583-12.823v-.558c.926-.797 1.62-1.593 2.162-2.55z', fillRule: 'evenodd' })\n );\n};\n\nIconTwitter.propTypes = {\n title: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string\n};\n\nIconTwitter.defaultProps = {\n title: 'Twitter',\n viewBoxWidth: 40,\n viewBoxHeight: 40\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (IconTwitter);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/icons/IconTwitter.jsx\n// module id = 875\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/icons/IconTwitter.jsx?", + ); + + /***/ + }, + /* 876 */ + /* exports provided: default */ + /* exports used: default */ + /*!**********************************************************!*\ + !*** ./app/libs/components/icons/socials/IconAirbnb.jsx ***! + \**********************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__templates_SvgIconTemplate__ = __webpack_require__(/*! ../../../templates/SvgIconTemplate */ 15);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\n/* eslint-disable max-len */\n\n\n\nvar babelPluginFlowReactPropTypes_proptype_SvgProps = __webpack_require__(/*! ../../../../types */ 4).babelPluginFlowReactPropTypes_proptype_SvgProps || __webpack_require__(/*! react */ 1).PropTypes.any;\n\n\n\nvar IconAirbnb = function IconAirbnb(_ref) {\n var _ref$title = _ref.title,\n title = _ref$title === undefined ? 'Airbnb' : _ref$title,\n _ref$viewBoxWidth = _ref.viewBoxWidth,\n viewBoxWidth = _ref$viewBoxWidth === undefined ? 24 : _ref$viewBoxWidth,\n _ref$viewBoxHeight = _ref.viewBoxHeight,\n viewBoxHeight = _ref$viewBoxHeight === undefined ? 24 : _ref$viewBoxHeight,\n otherProps = _objectWithoutProperties(_ref, ['title', 'viewBoxWidth', 'viewBoxHeight']);\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_1__templates_SvgIconTemplate__[\"a\" /* default */],\n _extends({ title: title, viewBoxWidth: viewBoxWidth, viewBoxHeight: viewBoxHeight }, otherProps),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('path', {\n d: 'M0,12 C0,5.372583 5.37112582,0 12,0 C18.627417,0 24,5.37112582 24,12 C24,18.627417 18.6288742,24 12,24 C5.372583,24 0,18.6288742 0,12 Z M12.2050067,14.6457736 C12.0951538,14.5156808 12.0062008,14.3945318 11.834472,14.1478636 C11.823147,14.131602 11.823147,14.131602 11.8118219,14.1153404 C11.8052328,14.1058884 11.8052328,14.1058884 11.7986437,14.0963347 C11.5634947,13.749556 11.3728223,13.4173111 11.2237436,13.0852695 C11.0817688,12.7651191 10.9925069,12.4760691 10.9567816,12.1964712 C10.9264099,11.9375051 10.9431915,11.7147211 11.0147452,11.5286274 C11.0825924,11.3438549 11.211492,11.184288 11.375808,11.0790957 C11.786495,10.8126087 12.3722054,10.8469613 12.73368,11.1609119 C12.9064384,11.3088925 13.0198946,11.5358435 13.0485161,11.7837313 C13.0845503,12.100731 13.0244247,12.4462901 12.879773,12.8345358 C12.6575964,13.4207667 12.3129034,13.9833165 11.7949373,14.6548191 L12.0036269,14.81276 L12.2050067,14.6457736 Z M16.680044,15.586609 C16.5647345,15.9868478 16.2863445,16.3376919 15.9249728,16.5387259 C15.6065333,16.7178069 15.2218939,16.7824467 14.8546538,16.7207543 C14.4173014,16.6523539 13.9873618,16.429265 13.5399198,16.0668345 C13.277076,15.8544173 13.0251453,15.6064279 12.7208107,15.270829 L12.7325475,15.6045984 C13.233629,14.9674485 13.5948977,14.4274616 13.8740084,13.8632856 C14.1867854,13.229083 14.3631471,12.6369574 14.3817819,12.0487955 C14.3942395,11.6070897 14.306316,11.1815438 14.1156436,10.8161659 C13.8581534,10.3127676 13.395577,9.91639103 12.8509457,9.72369102 C12.3578947,9.54664281 11.8081156,9.52966976 11.3010627,9.67500785 C10.8135713,9.81373965 10.3777633,10.1078714 10.0799148,10.506484 C9.82057138,10.8503153 9.66490359,11.2776905 9.62917824,11.7235634 C9.58161308,12.280625 9.69856984,12.8601479 9.95029455,13.4737185 C10.248143,14.1873997 10.6814802,14.8693707 11.2705881,15.6004314 L11.2756329,15.2696094 C11.0604571,15.5205463 10.8208811,15.7593886 10.5591698,15.9853232 C10.1130662,16.3648284 9.69012754,16.6059067 9.25555494,16.7004273 C8.87338638,16.7866138 8.47093571,16.7406747 8.1361264,16.5704361 C7.7371762,16.37052 7.42964994,15.9925393 7.3142375,15.5603872 C7.22744653,15.2479611 7.24216908,14.9016906 7.35171308,14.5769667 C7.41616285,14.3869092 7.48112738,14.2336436 7.63422131,13.8965202 C7.64060451,13.8823929 7.64060451,13.8823929 7.64709067,13.868164 C7.67499144,13.8065732 7.6931115,13.7666307 7.71154043,13.7253668 C8.598085,11.7819019 9.5368277,9.84219746 10.5259153,7.90838785 C10.5469181,7.86742894 10.5636998,7.83460083 10.6014842,7.7608138 C10.6034404,7.7570533 10.6034404,7.7570533 10.6052936,7.75339444 C10.7819642,7.40773373 10.8640192,7.25040271 10.9684155,7.06105666 C11.1085371,6.81052632 11.231877,6.64770701 11.3807498,6.53407906 C11.5591706,6.39382272 11.7829946,6.3186128 12.0036269,6.32369456 C12.2395995,6.32105205 12.4702185,6.40551075 12.6486393,6.55623549 C12.8079105,6.6891741 12.9297062,6.86459616 13.0925808,7.17021267 C13.3267002,7.61232503 13.530448,8.0112425 13.9036594,8.7523651 C13.9370168,8.8185295 13.9370168,8.8185295 13.9703742,8.88479553 C13.9740806,8.89211325 13.9740806,8.89211325 13.977787,8.89943098 C14.8140895,10.564111 15.6134313,12.2353974 16.3751946,13.9129851 C16.3854901,13.9364628 16.3936235,13.9544522 16.412979,13.9980536 C16.4200829,14.0140103 16.4200829,14.0140103 16.4272897,14.029967 C16.5705,14.3504222 16.6291843,14.4959636 16.680044,14.6763658 C16.7637463,14.9761891 16.7643641,15.2961361 16.680147,15.5861009 L16.680044,15.586609 Z M18.0396663,15.0467238 C18.0355481,14.6727069 17.9533901,14.2908641 17.8043114,13.9097328 C17.7304928,13.7204884 17.6653223,13.5714914 17.517685,13.246361 C17.5133609,13.2369089 17.5133609,13.2369089 17.5090368,13.2273552 C17.4885488,13.1821276 17.4885488,13.1821276 17.4680607,13.1371033 C16.5622636,11.1522729 15.609622,9.18451722 14.6104448,7.2338362 C14.5851179,7.18484812 14.5650417,7.145617 14.5204622,7.05871905 C14.5195356,7.05699126 14.5195356,7.05699126 14.518609,7.05516183 C14.3551166,6.73633275 14.2798566,6.59221429 14.1817406,6.41506444 C14.0021873,6.09288142 13.8192364,5.84113146 13.5981923,5.63511727 C13.2092287,5.26232 12.6829233,5.03475918 12.1360269,5.00060981 L11.8980981,5 C11.3236098,5.0281529 10.7798021,5.26475924 10.3798224,5.65676553 C10.1703092,5.85627508 9.99466811,6.10060568 9.81933593,6.41475954 C9.72091105,6.59201102 9.6399885,6.74669953 9.48565912,7.04804737 C9.47649614,7.0658335 9.47649614,7.0658335 9.46743611,7.08361963 C9.43222553,7.15242654 9.41688525,7.18240888 9.39701496,7.22103019 C8.73202932,8.51829964 8.08310463,9.83345685 7.44962318,11.1669084 C6.98632617,12.1462635 6.65913553,12.8515089 6.34429947,13.5560429 C6.15002359,13.9929719 6.03996481,14.3197285 5.99178192,14.6668121 C5.88985658,15.336282 6.03543479,16.0425438 6.39474737,16.6231846 C6.70412681,17.1270911 7.16824747,17.5313952 7.70834883,17.7654607 C8.12922842,17.9484037 8.59304021,18.031033 9.04974811,18.0039981 C9.62681028,17.9732027 10.2063434,17.7731849 10.7432531,17.4386024 C11.2345539,17.1354252 11.6763333,16.7428091 12.1945053,16.1838164 L11.8072919,16.1834099 C12.2820169,16.6977848 12.6941454,17.0708869 13.1463232,17.3675596 C13.6773646,17.7188102 14.2468081,17.9391549 14.8212964,17.9936313 C15.4891648,18.0637595 16.1788596,17.8957568 16.7369781,17.5235693 C17.2282788,17.1982356 17.6163158,16.7186199 17.8343742,16.1679614 C17.9759372,15.811629 18.0462554,15.4274486 18.0395633,15.044996 L18.0396663,15.0467238 Z',\n stroke: 'none',\n fillRule: 'evenodd'\n })\n );\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (IconAirbnb);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/icons/socials/IconAirbnb.jsx\n// module id = 876\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/icons/socials/IconAirbnb.jsx?", + ); + + /***/ + }, + /* 877 */ + /* exports provided: default */ + /* exports used: default */ + /*!************************************************************!*\ + !*** ./app/libs/components/icons/socials/IconFacebook.jsx ***! + \************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__templates_SvgIconTemplate__ = __webpack_require__(/*! ../../../templates/SvgIconTemplate */ 15);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\n/* eslint-disable max-len */\n\n\n\nvar babelPluginFlowReactPropTypes_proptype_SvgProps = __webpack_require__(/*! ../../../../types */ 4).babelPluginFlowReactPropTypes_proptype_SvgProps || __webpack_require__(/*! react */ 1).PropTypes.any;\n\n\n\nvar IconFacebook = function IconFacebook(_ref) {\n var _ref$title = _ref.title,\n title = _ref$title === undefined ? 'Facebook' : _ref$title,\n _ref$viewBoxWidth = _ref.viewBoxWidth,\n viewBoxWidth = _ref$viewBoxWidth === undefined ? 24 : _ref$viewBoxWidth,\n _ref$viewBoxHeight = _ref.viewBoxHeight,\n viewBoxHeight = _ref$viewBoxHeight === undefined ? 24 : _ref$viewBoxHeight,\n otherProps = _objectWithoutProperties(_ref, ['title', 'viewBoxWidth', 'viewBoxHeight']);\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_1__templates_SvgIconTemplate__[\"a\" /* default */],\n _extends({ title: title, viewBoxWidth: viewBoxWidth, viewBoxHeight: viewBoxHeight }, otherProps),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('path', {\n d: 'M0,12 C0,5.372583 5.37112582,0 12,0 C18.627417,0 24,5.37112582 24,12 C24,18.627417 18.6288742,24 12,24 C5.372583,24 0,18.6288742 0,12 Z M15,9.87401575 L12.9661017,9.87401575 L12.9661017,8.64566929 C12.9661017,8.17322835 13.3220339,8.07874016 13.5254237,8.07874016 L14.9491525,8.07874016 L14.9491525,6 L12.9661017,6 C10.7288136,6 10.2711864,7.55905512 10.2711864,8.50393701 L10.2711864,9.87401575 L9,9.87401575 L9,12 L10.2711864,12 L10.2711864,18 L12.9661017,18 L12.9661017,12 L14.7966102,12 L15,9.87401575 Z',\n stroke: 'none',\n fillRule: 'evenodd'\n })\n );\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (IconFacebook);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/icons/socials/IconFacebook.jsx\n// module id = 877\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/icons/socials/IconFacebook.jsx?", + ); + + /***/ + }, + /* 878 */ + /* exports provided: default */ + /* exports used: default */ + /*!************************************************************!*\ + !*** ./app/libs/components/icons/socials/IconLinkedIn.jsx ***! + \************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__templates_SvgIconTemplate__ = __webpack_require__(/*! ../../../templates/SvgIconTemplate */ 15);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\n/* eslint-disable max-len */\n\n\n\nvar babelPluginFlowReactPropTypes_proptype_SvgProps = __webpack_require__(/*! ../../../../types */ 4).babelPluginFlowReactPropTypes_proptype_SvgProps || __webpack_require__(/*! react */ 1).PropTypes.any;\n\n\n\nvar IconLinkedIn = function IconLinkedIn(_ref) {\n var _ref$title = _ref.title,\n title = _ref$title === undefined ? 'LinkedIn' : _ref$title,\n _ref$viewBoxWidth = _ref.viewBoxWidth,\n viewBoxWidth = _ref$viewBoxWidth === undefined ? 24 : _ref$viewBoxWidth,\n _ref$viewBoxHeight = _ref.viewBoxHeight,\n viewBoxHeight = _ref$viewBoxHeight === undefined ? 24 : _ref$viewBoxHeight,\n otherProps = _objectWithoutProperties(_ref, ['title', 'viewBoxWidth', 'viewBoxHeight']);\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_1__templates_SvgIconTemplate__[\"a\" /* default */],\n _extends({ title: title, viewBoxWidth: viewBoxWidth, viewBoxHeight: viewBoxHeight }, otherProps),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('path', {\n d: 'M0,12 C0,5.372583 5.37112582,0 12,0 C18.627417,0 24,5.37112582 24,12 C24,18.627417 18.6288742,24 12,24 C5.372583,24 0,18.6288742 0,12 Z M15.285069,9.09405546 C14.0337143,9.09405546 13.4731071,9.74869222 13.1603667,10.2077849 L13.1603667,9.25255826 L10.8022286,9.25255826 C10.8334476,9.88554817 10.8022286,16 10.8022286,16 L13.1603667,16 L13.1603667,12.2317534 C13.1603667,12.0299319 13.1757929,11.8288578 13.2378381,11.6842798 C13.4085738,11.2813842 13.7965595,10.8641654 14.4473667,10.8641654 C15.3012286,10.8641654 15.6422286,11.4832056 15.6422286,12.3898576 L15.6422286,15.9999751 L18,15.9999751 L18,12.1308676 C18,10.0583743 16.8370905,9.09405546 15.285069,9.09405546 Z M8.33398571,6 C7.52713571,6 7,6.50380626 7,7.1650691 C7,7.81273104 7.51170952,8.33118442 8.30313333,8.33118442 L8.31816667,8.33118442 C9.14044286,8.33118442 9.65251905,7.81270613 9.65251905,7.1650691 C9.63709286,6.50380626 9.14046905,6 8.33398571,6 Z M7.13949048,9.25255826 L9.49692143,9.25255826 L9.49692143,16 L7.13949048,16 L7.13949048,9.25255826 Z',\n stroke: 'none',\n fillRule: 'evenodd'\n })\n );\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (IconLinkedIn);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/icons/socials/IconLinkedIn.jsx\n// module id = 878\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/icons/socials/IconLinkedIn.jsx?", + ); + + /***/ + }, + /* 879 */ + /* exports provided: default */ + /* exports used: default */ + /*!***********************************************************!*\ + !*** ./app/libs/components/icons/socials/IconTwitter.jsx ***! + \***********************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__templates_SvgIconTemplate__ = __webpack_require__(/*! ../../../templates/SvgIconTemplate */ 15);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\n/* eslint-disable max-len */\n\n\n\nvar babelPluginFlowReactPropTypes_proptype_SvgProps = __webpack_require__(/*! ../../../../types */ 4).babelPluginFlowReactPropTypes_proptype_SvgProps || __webpack_require__(/*! react */ 1).PropTypes.any;\n\n\n\nvar IconTwitter = function IconTwitter(_ref) {\n var _ref$title = _ref.title,\n title = _ref$title === undefined ? 'Twitter' : _ref$title,\n _ref$viewBoxWidth = _ref.viewBoxWidth,\n viewBoxWidth = _ref$viewBoxWidth === undefined ? 24 : _ref$viewBoxWidth,\n _ref$viewBoxHeight = _ref.viewBoxHeight,\n viewBoxHeight = _ref$viewBoxHeight === undefined ? 24 : _ref$viewBoxHeight,\n otherProps = _objectWithoutProperties(_ref, ['title', 'viewBoxWidth', 'viewBoxHeight']);\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_1__templates_SvgIconTemplate__[\"a\" /* default */],\n _extends({ title: title, viewBoxWidth: viewBoxWidth, viewBoxHeight: viewBoxHeight }, otherProps),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('path', {\n d: 'M0,12 C0,5.372583 5.37112582,0 12,0 C18.627417,0 24,5.37112582 24,12 C24,18.627417 18.6288742,24 12,24 C5.372583,24 0,18.6288742 0,12 Z M18,8.44247788 C17.5830116,8.68141593 17.0733591,8.82477876 16.6100386,8.87256637 C17.1196911,8.5380531 17.4903475,8.01238938 17.6756757,7.39115044 C17.2123552,7.67787611 16.7027027,7.91681416 16.1003861,8.06017699 C15.6370656,7.53451327 15.034749,7.2 14.3397683,7.2 C12.996139,7.2 11.8841699,8.39469027 11.8841699,9.92389381 C11.8841699,10.1150442 11.8841699,10.3539823 11.9305019,10.5451327 C9.89189189,10.4495575 8.08494208,9.35044248 6.88030888,7.72566372 C6.64864865,8.1079646 6.55598456,8.58584071 6.55598456,9.11150442 C6.55598456,10.0672566 6.97297297,10.879646 7.62162162,11.3575221 C7.2046332,11.3575221 6.83397683,11.2141593 6.50965251,11.0230088 L6.50965251,11.0707965 C6.50965251,12.3610619 7.34362934,13.460177 8.45559846,13.7469027 C8.27027027,13.7946903 8.03861004,13.8424779 7.80694981,13.8424779 C7.66795367,13.8424779 7.48262548,13.8424779 7.34362934,13.7946903 C7.66795367,14.8938053 8.54826255,15.6584071 9.61389961,15.6584071 C8.77992278,16.3752212 7.71428571,16.8053097 6.6023166,16.8053097 C6.41698842,16.8053097 6.23166023,16.8053097 6,16.7575221 C7.06563707,17.5221239 8.36293436,18 9.75289575,18 C14.2471042,18 16.7027027,13.8902655 16.7027027,10.3061947 L16.7027027,9.97168142 C17.2586873,9.49380531 17.6756757,9.0159292 18,8.44247788 Z',\n stroke: 'none',\n fillRule: 'evenodd'\n })\n );\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (IconTwitter);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/icons/socials/IconTwitter.jsx\n// module id = 879\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/icons/socials/IconTwitter.jsx?", + ); + + /***/ + }, + /* 880 */ + /* exports provided: default */ + /* exports used: default */ + /*!********************************************************!*\ + !*** ./app/libs/components/icons/socials/IconVrbo.jsx ***! + \********************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__templates_SvgIconTemplate__ = __webpack_require__(/*! ../../../templates/SvgIconTemplate */ 15);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\n/* eslint-disable max-len */\n\n\n\nvar babelPluginFlowReactPropTypes_proptype_SvgProps = __webpack_require__(/*! ../../../../types */ 4).babelPluginFlowReactPropTypes_proptype_SvgProps || __webpack_require__(/*! react */ 1).PropTypes.any;\n\n\n\nvar IconVrbo = function IconVrbo(_ref) {\n var _ref$title = _ref.title,\n title = _ref$title === undefined ? 'VRBO' : _ref$title,\n _ref$viewBoxWidth = _ref.viewBoxWidth,\n viewBoxWidth = _ref$viewBoxWidth === undefined ? 24 : _ref$viewBoxWidth,\n _ref$viewBoxHeight = _ref.viewBoxHeight,\n viewBoxHeight = _ref$viewBoxHeight === undefined ? 24 : _ref$viewBoxHeight,\n otherProps = _objectWithoutProperties(_ref, ['title', 'viewBoxWidth', 'viewBoxHeight']);\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_1__templates_SvgIconTemplate__[\"a\" /* default */],\n _extends({ title: title, viewBoxWidth: viewBoxWidth, viewBoxHeight: viewBoxHeight }, otherProps),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('path', {\n d: 'M0,12 C0,5.372583 5.37112582,0 12,0 C18.627417,0 24,5.37112582 24,12 C24,18.627417 18.6288742,24 12,24 C5.372583,24 0,18.6288742 0,12 Z M18.8063265,17.0754545 C18.8063265,17.34 18.6046939,17.5472727 18.3393878,17.5472727 C18.0793878,17.5472727 17.8697959,17.34 17.8697959,17.0754545 C17.8697959,16.8163636 18.0767347,16.6090909 18.3393878,16.6090909 C18.6046939,16.6090909 18.8063265,16.8163636 18.8063265,17.0754545 Z M17.9891837,17.0754545 C17.9891837,17.2827273 18.1377551,17.4490909 18.3446939,17.4490909 C18.5436735,17.4490909 18.6922449,17.2854545 18.6922449,17.0781818 C18.6922449,16.8709091 18.5463265,16.7018182 18.3420408,16.7018182 C18.1377551,16.7018182 17.9891837,16.8709091 17.9891837,17.0754545 L17.9891837,17.0754545 Z M18.2704082,17.3209091 L18.1642857,17.3209091 L18.1642857,16.8545455 C18.2067347,16.8463636 18.265102,16.8409091 18.3393878,16.8409091 C18.4242857,16.8409091 18.4640816,16.8545455 18.4985714,16.8736364 C18.522449,16.8927273 18.5436735,16.9309091 18.5436735,16.9772727 C18.5436735,17.0290909 18.5065306,17.0672727 18.4508163,17.0863636 L18.4508163,17.0918182 C18.4959184,17.1081818 18.5197959,17.1436364 18.5330612,17.2063636 C18.5463265,17.2772727 18.5542857,17.3045455 18.567551,17.3236364 L18.4534694,17.3236364 C18.4402041,17.3072727 18.4322449,17.2636364 18.4163265,17.2090909 C18.4083673,17.1572727 18.3791837,17.1354545 18.3208163,17.1354545 L18.2704082,17.1354545 L18.2704082,17.3209091 L18.2704082,17.3209091 Z M18.2730612,17.0563636 L18.3208163,17.0563636 C18.3791837,17.0563636 18.4269388,17.0372727 18.4269388,16.9881818 C18.4269388,16.9445455 18.395102,16.9172727 18.3287755,16.9172727 L18.2704082,16.9227273 L18.2704082,17.0563636 L18.2730612,17.0563636 Z M15.3308163,6.13636364 L9.50469388,6.13636364 L6.06367347,10.3090909 L7.27612245,10.2218182 L7.27612245,14.7381818 L6.35020408,14.8772727 C6.35020408,14.8772727 5.9044898,14.9618182 6.01591837,15.45 C6.11408163,15.8045455 6.46428571,15.8045455 6.46428571,15.8045455 L7.27346939,15.6681818 L7.27346939,16.8681818 L13.0704082,17.9454545 L17.6257143,16.8763636 L17.6204082,10.3172727 L18.8673469,10.2 L15.3308163,6.13636364 L15.3308163,6.13636364 Z M14.1528571,11.1027273 L15.4157143,10.98 L15.4157143,12.6981818 L14.1422449,12.87 L14.1528571,11.1027273 Z M7.70061224,16.5409091 L7.70061224,15.5972727 L10.2104082,15.1718182 C10.2104082,15.1718182 10.6428571,15.1745455 10.6083673,14.6754545 C10.5765306,14.2281818 10.117551,14.3072727 10.117551,14.3072727 L7.70061224,14.6781818 L7.70061224,10.0990909 L10.2555102,6.99818182 L13.0730612,10.2381818 L13.0730612,17.5418182 L7.70061224,16.5409091 L7.70061224,16.5409091 Z M14.1422449,15.1963636 L14.147551,13.4236364 L15.4157143,13.2490909 L15.4236735,14.9672727 L14.1422449,15.1963636 L14.1422449,15.1963636 Z M16.9836735,14.6781818 L15.9330612,14.8663636 L15.9330612,13.1672727 L16.9836735,13.0118182 L16.9836735,14.6781818 Z M15.9357143,12.63 L15.9357143,10.9254545 L16.9863265,10.8218182 L16.9889796,12.4881818 L15.9357143,12.63 Z M11.4334694,10.3663636 C11.1389796,10.0118182 10.7330612,9.78818182 10.2873469,9.78818182 L10.2157143,9.79090909 C9.77265306,9.81545455 9.38530612,10.0581818 9.11734694,10.4181818 C8.84673469,10.7809091 8.69020408,11.2609091 8.69020408,11.7872727 L8.69285714,11.9209091 C8.71938776,12.4609091 8.91306122,12.9436364 9.20755102,13.2981818 C9.50204082,13.65 9.90795918,13.8763636 10.3536735,13.8763636 L10.4253061,13.8736364 C10.8683673,13.8518182 11.2557143,13.6063636 11.5236735,13.2463636 C11.7942857,12.8836364 11.9534694,12.4036364 11.9534694,11.8772727 L11.9508163,11.7436364 C11.9189796,11.2063636 11.7279592,10.7209091 11.4334694,10.3663636 L11.4334694,10.3663636 Z M11.2636735,13.0418182 C11.0408163,13.3390909 10.7410204,13.5218182 10.4067347,13.5381818 L10.3536735,13.5381818 C10.0167347,13.5381818 9.70102041,13.3690909 9.45428571,13.0772727 C9.21020408,12.7854545 9.04040816,12.3709091 9.01918367,11.9018182 L9.01653061,11.7872727 C9.01653061,11.3318182 9.1544898,10.92 9.37734694,10.6227273 C9.60020408,10.3254545 9.9,10.1427273 10.2342857,10.1263636 L10.2873469,10.1263636 C10.6242857,10.1263636 10.94,10.2954545 11.1867347,10.59 C11.4334694,10.8818182 11.6006122,11.2963636 11.6218367,11.7654545 L11.6244898,11.88 C11.6244898,12.3327273 11.4838776,12.7445455 11.2636735,13.0418182 L11.2636735,13.0418182 Z M9.75673469,11.8663636 C9.72755102,11.28 9.91061224,10.7754545 10.1918367,10.5818182 C9.71428571,10.6172727 9.35612245,11.1981818 9.39061224,11.8909091 C9.4277551,12.5890909 9.84693878,13.1345455 10.3297959,13.11 L10.3297959,13.1018182 C10.0273469,12.9463636 9.78591837,12.4581818 9.75673469,11.8663636 Z',\n stroke: 'none',\n fillRule: 'evenodd'\n })\n );\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (IconVrbo);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/icons/socials/IconVrbo.jsx\n// module id = 880\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/icons/socials/IconVrbo.jsx?", + ); + + /***/ + }, + /* 881 */ + /* exports provided: default */ + /* exports used: default */ + /*!***********************************************************!*\ + !*** ./app/libs/components/icons/socials/IconWebsite.jsx ***! + \***********************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__templates_SvgIconTemplate__ = __webpack_require__(/*! ../../../templates/SvgIconTemplate */ 15);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\n/* eslint-disable max-len */\n\n\n\nvar babelPluginFlowReactPropTypes_proptype_SvgProps = __webpack_require__(/*! ../../../../types */ 4).babelPluginFlowReactPropTypes_proptype_SvgProps || __webpack_require__(/*! react */ 1).PropTypes.any;\n\n\n\nvar IconWebsite = function IconWebsite(_ref) {\n var _ref$title = _ref.title,\n title = _ref$title === undefined ? 'Website' : _ref$title,\n _ref$viewBoxWidth = _ref.viewBoxWidth,\n viewBoxWidth = _ref$viewBoxWidth === undefined ? 24 : _ref$viewBoxWidth,\n _ref$viewBoxHeight = _ref.viewBoxHeight,\n viewBoxHeight = _ref$viewBoxHeight === undefined ? 24 : _ref$viewBoxHeight,\n otherProps = _objectWithoutProperties(_ref, ['title', 'viewBoxWidth', 'viewBoxHeight']);\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_1__templates_SvgIconTemplate__[\"a\" /* default */],\n _extends({ title: title, viewBoxWidth: viewBoxWidth, viewBoxHeight: viewBoxHeight }, otherProps),\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('path', {\n d: 'M0,12 C0,5.372583 5.37112582,0 12,0 C18.627417,0 24,5.37112582 24,12 C24,18.627417 18.6288742,24 12,24 C5.372583,24 0,18.6288742 0,12 Z M12,6 C8.7,6 6,8.7 6,12 C6,15.3 8.7,18 12,18 C15.3,18 18,15.3 18,12 C18,8.7 15.3,6 12,6 Z M16.14,9.6 L14.4,9.6 C14.22,8.82 13.92,8.16 13.56,7.44 C14.64,7.86 15.6,8.58 16.14,9.6 Z M12,7.2 C12.48,7.92 12.9,8.7 13.14,9.6 L10.86,9.6 C11.1,8.76 11.52,7.92 12,7.2 Z M7.38,13.2 C7.26,12.84 7.2,12.42 7.2,12 C7.2,11.58 7.26,11.16 7.38,10.8 L9.42,10.8 C9.36,11.22 9.36,11.58 9.36,12 C9.36,12.42 9.42,12.78 9.42,13.2 L7.38,13.2 Z M7.86,14.4 L9.6,14.4 C9.78,15.18 10.08,15.84 10.44,16.56 C9.36,16.14 8.4,15.42 7.86,14.4 Z M9.6,9.6 L7.86,9.6 C8.46,8.58 9.36,7.86 10.44,7.44 C10.08,8.16 9.78,8.82 9.6,9.6 Z M12,16.8 C11.52,16.08 11.1,15.3 10.86,14.4 L13.14,14.4 C12.9,15.24 12.48,16.08 12,16.8 Z M13.38,13.2 L10.62,13.2 C10.56,12.78 10.5,12.42 10.5,12 C10.5,11.58 10.56,11.22 10.62,10.8 L13.44,10.8 C13.5,11.22 13.56,11.58 13.56,12 C13.56,12.42 13.44,12.78 13.38,13.2 Z M13.56,16.56 C13.92,15.9 14.22,15.18 14.4,14.4 L16.14,14.4 C15.6,15.42 14.64,16.14 13.56,16.56 Z M14.64,13.2 C14.7,12.78 14.7,12.42 14.7,12 C14.7,11.58 14.64,11.22 14.64,10.8 L16.68,10.8 C16.8,11.16 16.86,11.58 16.86,12 C16.86,12.42 16.8,12.84 16.68,13.2 L14.64,13.2 Z',\n stroke: 'none',\n fillRule: 'evenodd'\n })\n );\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (IconWebsite);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/icons/socials/IconWebsite.jsx\n// module id = 881\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/icons/socials/IconWebsite.jsx?", + ); + + /***/ + }, + /* 882 */ + /* exports provided: apiRoutes */ + /* exports used: apiRoutes */ + /*!***************************************!*\ + !*** ./app/libs/routes/api/common.js ***! + \***************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return apiRoutes; });\nvar apiRoutes = {\n apiScope: function apiScope(path) {\n var scope = \'/api/v1\';\n return scope + path;\n }\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/routes/api/common.js\n// module id = 882\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/routes/api/common.js?', + ); + + /***/ + }, + /* 883 */ + /* exports provided: apiRoutes, listingsApiRoutes */ + /* exports used: apiRoutes */ + /*!**************************************!*\ + !*** ./app/libs/routes/api/index.js ***! + \**************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__common__ = __webpack_require__(/*! ./common */ 882);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_0__common__["a"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__listings__ = __webpack_require__(/*! ./listings */ 884);\n/* unused harmony reexport listingsApiRoutes */\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/routes/api/index.js\n// module id = 883\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/routes/api/index.js?', + ); + + /***/ + }, + /* 884 */ + /* exports provided: listingsApiRoutes */ + /*!*****************************************!*\ + !*** ./app/libs/routes/api/listings.js ***! + \*****************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils__ = __webpack_require__(/*! ../../utils */ 20);\n/* unused harmony export listingsApiRoutes */\n\n\nvar listingsApiRoutes = {\n listingsScope: function listingsScope(path) {\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__utils__["e" /* scopePath */])(\'/listings\', path);\n },\n listingsDraftScope: function listingsDraftScope(path) {\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__utils__["e" /* scopePath */])(\'/draft\' + this.listingsScope(), path);\n }\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/routes/api/listings.js\n// module id = 884\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/routes/api/listings.js?', + ); + + /***/ + }, + /* 885 */ + /* exports provided: listingsRoutes, rootScope */ + /* exports used: listingsRoutes */ + /*!**************************************!*\ + !*** ./app/libs/routes/app/index.js ***! + \**************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils__ = __webpack_require__(/*! ../../utils */ 20);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__listings__ = __webpack_require__(/*! ./listings */ 886);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_1__listings__["a"]; });\n/* unused harmony export rootScope */\n\n\n\n\nvar rootScope = function rootScope(path) {\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__utils__["e" /* scopePath */])(\'https://www.friendsandguests.com\', path);\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/routes/app/index.js\n// module id = 885\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/routes/app/index.js?', + ); + + /***/ + }, + /* 886 */ + /* exports provided: listingsRoutes */ + /* exports used: listingsRoutes */ + /*!*****************************************!*\ + !*** ./app/libs/routes/app/listings.js ***! + \*****************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils__ = __webpack_require__(/*! ../../utils */ 20);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return listingsRoutes; });\n\n\nvar listingsRoutes = {\n listingsScope: function listingsScope(path) {\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__utils__["e" /* scopePath */])(\'/listings\', path);\n },\n manageListingsScope: function manageListingsScope(path) {\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__utils__["e" /* scopePath */])(\'/manage/listings\', path);\n }\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/routes/app/listings.js\n// module id = 886\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/routes/app/listings.js?', + ); + + /***/ + }, + /* 887 */ + /* exports provided: default */ + /* exports used: default */ + /*!**************************************************!*\ + !*** ./app/libs/utils/api/ajaxRequestTracker.js ***! + \**************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_fp__ = __webpack_require__(/*! lodash/fp */ 14);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_fp___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_lodash_fp__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_immutable__ = __webpack_require__(/*! immutable */ 26);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_immutable___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_immutable__);\n/* harmony export (immutable) */ __webpack_exports__["a"] = createAjaxRequestTracker;\n\n\n\nvar ATTRIBUTE_NAME = \'data-are_ajax_requests_pending\';\n\nvar $$pendingAjaxRequestUuids = new __WEBPACK_IMPORTED_MODULE_1_immutable__["Set"]();\n\nfunction createAjaxRequestTracker() {\n var uuid = __WEBPACK_IMPORTED_MODULE_0_lodash_fp___default.a.uniqueId();\n var bodyEl = document.body;\n\n var hasPendingAjaxRequests = function hasPendingAjaxRequests() {\n return !$$pendingAjaxRequestUuids.isEmpty();\n };\n var updateBodyAttribute = function updateBodyAttribute() {\n return bodyEl.setAttribute(ATTRIBUTE_NAME, hasPendingAjaxRequests());\n };\n\n return {\n start: function start() {\n $$pendingAjaxRequestUuids = $$pendingAjaxRequestUuids.add(uuid);\n updateBodyAttribute();\n },\n end: function end() {\n $$pendingAjaxRequestUuids = $$pendingAjaxRequestUuids.subtract(uuid);\n updateBodyAttribute();\n }\n };\n}\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/utils/api/ajaxRequestTracker.js\n// module id = 887\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/utils/api/ajaxRequestTracker.js?', + ); + + /***/ + }, + /* 888 */ + /* exports provided: default */ + /* exports used: default */ + /*!********************************************!*\ + !*** ./app/libs/utils/createStoreParts.js ***! + \********************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_fp__ = __webpack_require__(/*! lodash/fp */ 14);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_fp___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_lodash_fp__);\n\n\nvar babelPluginFlowReactPropTypes_proptype_StorePartsCreator = __webpack_require__(/*! ../../types */ 4).babelPluginFlowReactPropTypes_proptype_StorePartsCreator || __webpack_require__(/*! react */ 1).PropTypes.any;\n\nvar isActiveBundle = function isActiveBundle(bundle) {\n return __WEBPACK_IMPORTED_MODULE_0_lodash_fp___default.a.flow(__WEBPACK_IMPORTED_MODULE_0_lodash_fp___default.a.get('bundle'), __WEBPACK_IMPORTED_MODULE_0_lodash_fp___default.a.isEqual(bundle));\n};\n\nvar setInitialStateOnParts = function setInitialStateOnParts(_ref) {\n var reducers = _ref.reducers,\n middlewares = _ref.middlewares,\n enhancers = _ref.enhancers;\n return __WEBPACK_IMPORTED_MODULE_0_lodash_fp___default.a.set('initialState', __WEBPACK_IMPORTED_MODULE_0_lodash_fp___default.a, {\n reducers: reducers,\n middlewares: __WEBPACK_IMPORTED_MODULE_0_lodash_fp___default.a.castArray(middlewares),\n enhancers: __WEBPACK_IMPORTED_MODULE_0_lodash_fp___default.a.castArray(enhancers)\n });\n};\n\nvar createStoreParts = function createStoreParts(args) {\n return __WEBPACK_IMPORTED_MODULE_0_lodash_fp___default.a.cond([[isActiveBundle(args.bundle), __WEBPACK_IMPORTED_MODULE_0_lodash_fp___default.a.flow(args.composeInitialState, setInitialStateOnParts(args))]]);\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (createStoreParts);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/utils/createStoreParts.js\n// module id = 888\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/utils/createStoreParts.js?", + ); + + /***/ + }, + /* 889 */ + /* exports provided: default */ + /* exports used: default */ + /*!****************************************!*\ + !*** ./app/libs/utils/dom/scrollTo.js ***! + \****************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__dom__ = __webpack_require__(/*! ../dom */ 44);\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = scrollTo;\n/* eslint-disable consistent-return */\n\n\n\n// Saving sessions in the variable to prevent infinite scrolling loop\n// when next scrolling session is requested but current session is still ongoing\nvar session = void 0;\n\nfunction scrollTo(element) {\n var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var prevSession = arguments[2];\n\n if (!prevSession && session) {\n clearTimeout(session);\n session = undefined;\n return scrollTo(element, params);\n }\n\n if (prevSession && prevSession !== session) {\n return clearTimeout(prevSession);\n }\n\n var domNode = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__dom__[\"b\" /* getDomNode */])(element);\n\n if (element && !domNode) {\n throw new Error('[scrollTo]: Can\\'t recognize target element. ' + 'It must be valid DOM node, `id:string` of DOM node or `null` to scroll to top.');\n }\n\n var domRoot = params.root ? __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__dom__[\"b\" /* getDomNode */])(params.root) : document.body;\n\n if (!domRoot) {\n throw new Error('[scrollTo]: Can\\'t recognize DOM container. ' + 'It must be valid DOM node, `id:string` of DOM node or falsy value to use `document.body`.');\n }\n\n var isInsideContainer = domRoot !== document.body;\n\n var tick = 10;\n var duration = params.duration || 200;\n var padding = params.padding || 0;\n var toBottom = params.toBottom || false;\n var cb = params.cb || false;\n var side = toBottom ? 'bottom' : 'top';\n var paddingCorrection = toBottom ? padding : -padding;\n var targetLocation = Math.floor(domNode.getBoundingClientRect()[side]) + domRoot.scrollTop;\n var dest = domNode ? targetLocation + paddingCorrection : 0;\n var diff = dest - domRoot.scrollTop;\n var perTick = diff / duration * tick;\n\n session = setTimeout(function () {\n domRoot.scrollTop += perTick;\n\n var isArrived =\n // when we're arrived!\n Math.abs(domRoot.scrollTop - dest) < 1 ||\n\n // when we can't get to the destination\n // b/c we are at the bottom of the page already\n // and `document.body` is smaller than window's viewport\n !isInsideContainer && window.pageYOffset < dest && window.innerHeight + window.pageYOffset >= domRoot.offsetHeight ||\n\n // or when we're inside overflowed container and can't get to the destination\n // b/c we're at the bottom of the scrollable container already\n isInsideContainer && domRoot.scrollTop < dest && domRoot.offsetHeight + domRoot.scrollTop === domRoot.scrollHeight;\n\n if (isArrived) {\n session = undefined;\n return cb && typeof cb === 'function' && cb();\n }\n\n var nextParams = {\n padding: padding,\n toBottom: toBottom,\n cb: cb,\n root: params.root,\n duration: duration - tick\n };\n\n return scrollTo(element, nextParams, session);\n }, tick);\n}\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/utils/dom/scrollTo.js\n// module id = 889\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/utils/dom/scrollTo.js?", + ); + + /***/ + }, + /* 890 */ + /* exports provided: default */ + /* exports used: default */ + /*!****************************************************!*\ + !*** ./app/libs/utils/fng/photos/buildPhotoUrl.js ***! + \****************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_fp__ = __webpack_require__(/*! lodash/fp */ 14);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_fp___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_lodash_fp__);\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\n\n\nvar babelPluginFlowReactPropTypes_proptype_PhotoExtension = __webpack_require__(/*! ../../../../types */ 4).babelPluginFlowReactPropTypes_proptype_PhotoExtension || __webpack_require__(/*! react */ 1).PropTypes.any;\n\nvar babelPluginFlowReactPropTypes_proptype_CloudinaryTransformations = __webpack_require__(/*! ../../../../types */ 4).babelPluginFlowReactPropTypes_proptype_CloudinaryTransformations || __webpack_require__(/*! react */ 1).PropTypes.any;\n\nvar DEFAULT_TRANSFORMATIONS = {\n quality: 'auto',\n dpr: 'auto',\n fetchFormat: 'auto',\n crop: 'fit'\n};\n\n// pretty keys for FNG devs => cloudinary url keys\nvar TRANSFORMATION_KEY_MAP = {\n width: 'w_',\n height: 'h_',\n fetchFormat: 'f_',\n crop: 'c_',\n radius: 'r_',\n dpr: 'dpr_',\n quality: 'q_',\n gravity: 'g_',\n x: 'x_',\n y: 'y_',\n effect: 'e_',\n saturation: 'e_saturation:',\n contrast: 'e_contrast:',\n background: 'b_',\n opacity: 'o_',\n art: 'e_art:',\n blur: 'e_blur:',\n gradient_fade: 'e_gradient_fade:'\n};\n\nvar getCloudinaryTransformPrefix = __WEBPACK_IMPORTED_MODULE_0_lodash_fp___default.a.cond([[__WEBPACK_IMPORTED_MODULE_0_lodash_fp___default.a.has(__WEBPACK_IMPORTED_MODULE_0_lodash_fp___default.a, TRANSFORMATION_KEY_MAP), __WEBPACK_IMPORTED_MODULE_0_lodash_fp___default.a.get(__WEBPACK_IMPORTED_MODULE_0_lodash_fp___default.a, TRANSFORMATION_KEY_MAP)], [__WEBPACK_IMPORTED_MODULE_0_lodash_fp___default.a.constant(true), function (transform) {\n throw new Error('Unknown cloudinary transformation: \\'' + transform + '\\'');\n}]]);\n\nvar buildTransform = function buildTransform(transformations, _ref) {\n var _ref$assignDefaults = _ref.assignDefaults,\n assignDefaults = _ref$assignDefaults === undefined ? false : _ref$assignDefaults;\n return __WEBPACK_IMPORTED_MODULE_0_lodash_fp___default.a.flow(assignDefaults ? __WEBPACK_IMPORTED_MODULE_0_lodash_fp___default.a.merge(DEFAULT_TRANSFORMATIONS) : __WEBPACK_IMPORTED_MODULE_0_lodash_fp___default.a.identity, __WEBPACK_IMPORTED_MODULE_0_lodash_fp___default.a.omitBy(__WEBPACK_IMPORTED_MODULE_0_lodash_fp___default.a.isNil), __WEBPACK_IMPORTED_MODULE_0_lodash_fp___default.a.entries, __WEBPACK_IMPORTED_MODULE_0_lodash_fp___default.a.map(function (_ref2) {\n var _ref3 = _slicedToArray(_ref2, 2),\n key = _ref3[0],\n value = _ref3[1];\n\n return getCloudinaryTransformPrefix(key) + value;\n }), __WEBPACK_IMPORTED_MODULE_0_lodash_fp___default.a.join(','))(transformations);\n};\n\nvar buildFinalTransform = function buildFinalTransform(_ref4) {\n var transforms = _ref4.transforms,\n transformations = _objectWithoutProperties(_ref4, ['transforms']);\n\n return transforms ? transforms.map(function (transform) {\n return buildTransform(transform, { assignDefaults: false });\n }).join('/') : buildTransform(transformations, { assignDefaults: true });\n};\n\nvar changeImageExtension = __WEBPACK_IMPORTED_MODULE_0_lodash_fp___default.a.curry(function (imageUrl, nextExtension) {\n return __WEBPACK_IMPORTED_MODULE_0_lodash_fp___default.a.isNil(nextExtension) ? imageUrl // $FlowFixMe\n : imageUrl.substr(0, imageUrl.lastIndexOf('.')) + '.' + nextExtension;\n});\n\n/**\n * Takes an object with a url to a photo on cloudinary plus optional transforms\n * and returns a ready-to-use url for your image tags and background-images.\n * `transforms` is a special key that indicates we want to chain transformations, while\n * `transformations` refers to an object containing cloudinary transformation key/values\n *\n * NOTE: no defaults are applied when using `transforms` and all other keys are ignored\n */\nvar buildPhotoUrl = function buildPhotoUrl(_ref5) {\n var url = _ref5.url,\n format = _ref5.format,\n transformations = _objectWithoutProperties(_ref5, ['url', 'format']);\n\n return __WEBPACK_IMPORTED_MODULE_0_lodash_fp___default.a.flow(buildFinalTransform, function (finalTransform) {\n return url.replace('upload', 'upload/' + finalTransform).replace('facebook', 'facebook/' + finalTransform);\n }, changeImageExtension(__WEBPACK_IMPORTED_MODULE_0_lodash_fp___default.a, format))(transformations);\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (buildPhotoUrl);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/utils/fng/photos/buildPhotoUrl.js\n// module id = 890\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/utils/fng/photos/buildPhotoUrl.js?", + ); + + /***/ + }, + /* 891 */ + /* exports provided: normalizeMapIdKeys, schema, normalize, normalizeArray, normalizeArrayToMap */ + /* exports used: normalize, schema */ + /*!*******************************************!*\ + !*** ./app/libs/utils/normalizr/index.js ***! + \*******************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_normalizr__ = __webpack_require__(/*! normalizr */ 230);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_normalizr___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_normalizr__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_fp__ = __webpack_require__(/*! lodash/fp */ 14);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_fp___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_lodash_fp__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_immutable__ = __webpack_require__(/*! immutable */ 26);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_immutable___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_immutable__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3____ = __webpack_require__(/*! .. */ 20);\n/* harmony reexport (binding) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0_normalizr__, "schema")) __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_0_normalizr__["schema"]; });\n/* unused harmony export normalizeMapIdKeys */\n/* harmony export (immutable) */ __webpack_exports__["a"] = normalize;\n/* unused harmony export normalizeArray */\n/* unused harmony export normalizeArrayToMap */\n\n\n\n\n\n\nfunction normalizeMapIdKeys(entities) {\n return entities ? __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2_immutable__["fromJS"])(entities).mapKeys(function (id) {\n return parseInt(id, 10);\n }) : new __WEBPACK_IMPORTED_MODULE_2_immutable__["Map"]();\n}\n\n// for convenience\n\n\n// same thing as normal `normalize` except its keys are integers instead of strings\n\n\nfunction normalize() {\n var _normalize = __WEBPACK_IMPORTED_MODULE_0_normalizr__["normalize"].apply(undefined, arguments),\n entities = _normalize.entities,\n result = _normalize.result;\n\n return {\n entities: __WEBPACK_IMPORTED_MODULE_1_lodash_fp___default.a.mapValues(normalizeMapIdKeys, entities),\n result: new __WEBPACK_IMPORTED_MODULE_2_immutable__["OrderedSet"](__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3____["g" /* toArray */])(result))\n };\n}\n\nvar normalizeArray = __WEBPACK_IMPORTED_MODULE_1_lodash_fp___default.a.reduce(function (acc, item) {\n return __WEBPACK_IMPORTED_MODULE_1_lodash_fp___default.a.set(parseInt(item.id, 10), item, acc);\n}, {});\n\nvar normalizeArrayToMap = __WEBPACK_IMPORTED_MODULE_1_lodash_fp___default.a.flow(normalizeArray, normalizeMapIdKeys);\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/utils/normalizr/index.js\n// module id = 891\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/utils/normalizr/index.js?', + ); + + /***/ + }, + /* 892 */ + /* exports provided: mapToJsArray, mapEntitiesToJsArray, listOfMapsToJsArray, selectAssociation, createStoreSelector, createEntitiesSelector, createEntityIdsSelector, createReactRouterNumericParamsSelector */ + /* exports used: createStoreSelector */ + /*!*******************************************!*\ + !*** ./app/libs/utils/selectors/index.js ***! + \*******************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_immutable__ = __webpack_require__(/*! immutable */ 26);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_immutable___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_immutable__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_fp__ = __webpack_require__(/*! lodash/fp */ 14);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_fp___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_lodash_fp__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__creators__ = __webpack_require__(/*! ./creators */ 90);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3____ = __webpack_require__(/*! .. */ 20);\n/* unused harmony export mapToJsArray */\n/* unused harmony export mapEntitiesToJsArray */\n/* unused harmony export listOfMapsToJsArray */\n/* unused harmony export selectAssociation */\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = createStoreSelector;\n/* unused harmony export createEntitiesSelector */\n/* unused harmony export createEntityIdsSelector */\n/* unused harmony export createReactRouterNumericParamsSelector */\n\n\n\n\n\n\nfunction mapToJsArray(entities) {\n return entities.map(function ($$entity) {\n return $$entity.toJS ? $$entity.toJS() : $$entity;\n }).toArray();\n}\n\nfunction mapEntitiesToJsArray($$store) {\n var hasIndex = $$store.has('index');\n var $$entities = hasIndex ? $$store.get('index').map(function (id) {\n return $$store.getIn(['entities', id]);\n }) : $$store.get('entities');\n return mapToJsArray($$entities);\n}\n\nfunction listOfMapsToJsArray($$list) {\n return $$list.map(function (map) {\n return map.toJS();\n }).toArray();\n}\n\nfunction selectAssociation($$entity, associationName, $$associationStore) {\n return $$entity.get(associationName).map(function (associationId) {\n return $$associationStore.getIn(['entities', associationId]);\n });\n}\n\nfunction createStoreSelector(storePath) {\n return function (state) {\n return __WEBPACK_IMPORTED_MODULE_1_lodash_fp___default.a.get(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3____[\"g\" /* toArray */])(storePath), state);\n };\n}\n\nfunction createEntitiesSelector(storeSelector) {\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__creators__[\"a\" /* createCommonSelector */])(storeSelector, mapEntitiesToJsArray);\n}\n\nfunction createEntityIdsSelector(entitiesSelector) {\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__creators__[\"a\" /* createCommonSelector */])(entitiesSelector, __WEBPACK_IMPORTED_MODULE_1_lodash_fp___default.a.map(__WEBPACK_IMPORTED_MODULE_1_lodash_fp___default.a.get(['id'])));\n}\n\nvar createReactRouterNumericParamsSelector = __WEBPACK_IMPORTED_MODULE_1_lodash_fp___default.a.curry(function (paramName, _state, props) {\n return __WEBPACK_IMPORTED_MODULE_1_lodash_fp___default.a.flow(__WEBPACK_IMPORTED_MODULE_1_lodash_fp___default.a.get('params.' + paramName), function (param) {\n return __WEBPACK_IMPORTED_MODULE_1_lodash_fp___default.a.isNil(param) ? undefined : parseInt(param, 10);\n })(props);\n});\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/utils/selectors/index.js\n// module id = 892\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/utils/selectors/index.js?", + ); + + /***/ + }, + /* 893 */ + /* exports provided: getSignedInCookieValue, default */ + /* exports used: default */ + /*!********************************************************!*\ + !*** ./app/libs/utils/trackUserSessionStatus/index.js ***! + \********************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_fp__ = __webpack_require__(/*! lodash/fp */ 14);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_fp___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_lodash_fp__);\n/* unused harmony export getSignedInCookieValue */\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = trackUserSessionStatus;\n\n\nvar SIGNED_IN_COOKIE_NAME = 'signed_in=';\n\nfunction getCookies() {\n return document.cookie.split('; ');\n}\n\nfunction getSignedInCookieValue(cookies) {\n var signedInCookie = __WEBPACK_IMPORTED_MODULE_0_lodash_fp___default.a.find(__WEBPACK_IMPORTED_MODULE_0_lodash_fp___default.a.startsWith(SIGNED_IN_COOKIE_NAME), cookies);\n\n if (!signedInCookie) return null;\n\n return signedInCookie.slice(SIGNED_IN_COOKIE_NAME.length);\n}\n\nvar prevValue = null;\nvar cookieChanged = false;\n\nfunction getUserSessionStatus() {\n var cookies = getCookies();\n var value = getSignedInCookieValue(cookies);\n\n var didUserSignOut = prevValue === '1' && value === '0';\n var didUserSignBackIn = prevValue === '0' && value === '1';\n\n if (didUserSignOut || didUserSignBackIn) cookieChanged = true;\n\n if (document.hidden) {\n setTimeout(getUserSessionStatus, 3000);\n } else if (cookieChanged) {\n window.location.reload();\n }\n\n prevValue = value;\n}\n\nfunction trackUserSessionStatus() {\n var isServerSide = typeof window === 'undefined';\n if (isServerSide) return;\n\n document.addEventListener('visibilitychange', function () {\n getUserSessionStatus();\n });\n}\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/utils/trackUserSessionStatus/index.js\n// module id = 893\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/utils/trackUserSessionStatus/index.js?", + ); + + /***/ + }, + /* 894 */ + /* exports provided: emailRegex, contactRegex, protocolRegex, urlRegex */ + /* exports used: urlRegex, protocolRegex */ + /*!***********************************************!*\ + !*** ./app/libs/utils/validations/regexes.js ***! + \***********************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* unused harmony export emailRegex */\n/* unused harmony export contactRegex */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return protocolRegex; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return urlRegex; });\n/* eslint-disable max-len */\nvar emailRegex = /[\\w.+]+@\\S+\\.\\S+[\\w]/;\nvar contactRegex = /(.*)[?<]/;\nvar protocolRegex = /https?:\\/\\/(.*)/;\nvar urlRegex = /^https?:\\/\\/([\\da-z.-]+)\\.([a-z.]{2,6})([/\\w.-]*)*\\/?((?:\\/[~%/.\\w-_]*)?\\??(?:[-+=&;%@.\\w_]*)#?(?:[\\w]*))?$/;\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/utils/validations/regexes.js\n// module id = 894\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/utils/validations/regexes.js?', + ); + + /***/ + }, + /* 895 */ + /* exports provided: galleries */ + /* exports used: galleries */ + /*!*******************************************************!*\ + !*** ./app/libs/utils/vendor/photoswipe/galleries.js ***! + \*******************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_photoswipe_dist_photoswipe__ = __webpack_require__(/*! photoswipe/dist/photoswipe */ 1217);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_photoswipe_dist_photoswipe___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_photoswipe_dist_photoswipe__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_photoswipe_dist_photoswipe_ui_default__ = __webpack_require__(/*! photoswipe/dist/photoswipe-ui-default */ 1216);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_photoswipe_dist_photoswipe_ui_default___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_photoswipe_dist_photoswipe_ui_default__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return galleries; });\n/* eslint id-length: 0 */\n\n\n\n\nvar galleries = {\n initAll: function initAll() {\n var domGalleries = document.querySelectorAll('.fng-gallery');\n for (var i = 0; i < domGalleries.length; i++) {\n this.galleryInitter('#' + domGalleries[i].id);\n }\n },\n galleryInitter: function galleryInitter(gallerySelector) {\n // Loop through all gallery elements and bind events\n var galleryElements = document.querySelectorAll(gallerySelector);\n\n for (var i = 0, len = galleryElements.length; i < len; i++) {\n galleryElements[i].setAttribute('data-pswp-uid', i + 1);\n galleryElements[i].onclick = this.onThumbnailsClick.bind(this);\n }\n\n // Parse URL and open gallery if it contains #&pid=3&gid=1\n var hashData = this.photoswipeParseHash();\n if (hashData.pid && hashData.gid) {\n this.openPhotoSwipe(hashData.pid, galleryElements[hashData.gid - 1], true, true);\n }\n },\n\n\n // Parse slide data (url, title, size ...) from DOM elements\n // (children of gallerySelector)\n parseThumbnailElements: function parseThumbnailElements(el) {\n var thumbElements = el.childNodes;\n var numNodes = thumbElements.length;\n var items = [];\n\n for (var i = 0; i < numNodes; i++) {\n var figureEl = thumbElements[i];\n\n // Include only element nodes\n if (figureEl.nodeType !== 1 || figureEl.nodeName === 'DIV') {\n continue;\n }\n\n var linkEl = figureEl.children[0]; // <a> element\n\n var size = linkEl.getAttribute('data-size').split('x');\n\n // Create slide object\n var item = {\n src: linkEl.getAttribute('href'),\n w: parseInt(size[0], 10),\n h: parseInt(size[1], 10)\n };\n\n if (figureEl.children.length > 1) {\n // <figcaption> content\n item.title = figureEl.children[1].innerHTML;\n }\n\n if (linkEl.children.length > 0) {\n // <img> thumbnail element, retrieving thumbnail url\n item.msrc = linkEl.children[0].getAttribute('src');\n }\n\n item.el = figureEl; // save link to element for getThumbBoundsFn\n items.push(item);\n }\n\n return items;\n },\n onThumbnailsClick: function onThumbnailsClick() {\n var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : window.event;\n\n if (e.preventDefault) {\n e.preventDefault();\n } else {\n e.returnValue = false; // eslint-disable-line no-param-reassign\n }\n\n var eTarget = e.target || e.srcElement;\n\n // find root element of slide\n var clickedListItem = this.closest(eTarget, function (el) {\n return el.tagName && el.tagName.toUpperCase() === 'FIGURE';\n });\n\n if (!clickedListItem) return;\n\n // find index of clicked item by looping through all child nodes\n // alternatively, you may define index via data- attribute\n var clickedGallery = clickedListItem.parentNode;\n var childNodes = clickedListItem.parentNode.childNodes;\n var numChildNodes = childNodes.length;\n\n var nodeIndex = 0;\n var index = void 0;\n\n for (var i = 0; i < numChildNodes; i++) {\n if (childNodes[i].nodeType !== 1) continue;\n\n if (childNodes[i] === clickedListItem) {\n index = nodeIndex;\n break;\n }\n\n nodeIndex++;\n }\n\n if (index >= 0) {\n // Open PhotoSwipe if valid index found\n this.openPhotoSwipe(index, clickedGallery);\n }\n },\n\n\n // Find nearest parent element\n closest: function closest(el, cb) {\n return el && (cb(el) ? el : this.closest(el.parentNode, cb));\n },\n\n\n // Parse picture index and gallery index from URL (#&pid=1&gid=2)\n photoswipeParseHash: function photoswipeParseHash() {\n var hash = window.location.hash.substring(1);\n var params = {};\n\n if (hash.length < 5) return params;\n\n var vars = hash.split('&');\n for (var i = 0; i < vars.length; i++) {\n if (!vars[i]) continue;\n var pair = vars[i].split('=');\n if (pair.length < 2) continue;\n params[pair[0]] = pair[1];\n }\n\n if (params.gid) {\n params.gid = parseInt(params.gid, 10);\n }\n\n return params;\n },\n openPhotoSwipe: function openPhotoSwipe(index, galleryElement, disableAnimation, fromURL) {\n var pswpElement = document.querySelectorAll('.pswp')[0];\n var items = this.parseThumbnailElements(galleryElement);\n\n var options = {\n\n // define gallery index (for URL)\n galleryUID: galleryElement.getAttribute('data-pswp-uid'),\n\n getThumbBoundsFn: function getThumbBoundsFn(idx) {\n var thumbnail = items[idx].el.getElementsByTagName('img')[0];\n var rect = thumbnail.getBoundingClientRect();\n var pageYScroll = window.pageYOffset || document.documentElement.scrollTop;\n\n return {\n x: rect.left,\n y: rect.top + pageYScroll,\n w: rect.width\n };\n },\n\n\n bgOpacity: 0.95,\n showAnimationDuration: 0,\n hideAnimationDuration: 0,\n loop: false,\n history: false,\n\n clickToCloseNonZoomable: false,\n closeOnScroll: false,\n shareEl: false\n };\n\n // PhotoSwipe opened from URL\n if (fromURL) {\n if (options.galleryPIDs) {\n // Parse real index when custom PIDs are used\n // http://photoswipe.com/documentation/faq.html#custom-pid-in-url\n for (var j = 0; j < items.length; j++) {\n if (parseInt(items[j].pid, 10) === parseInt(index, 10)) {\n options.index = j;\n break;\n }\n }\n } else {\n // In URL indexes start from 1\n options.index = parseInt(index, 10) - 1;\n }\n } else {\n options.index = parseInt(index, 10);\n }\n\n // Exit if index not found\n if (isNaN(options.index)) return;\n\n if (disableAnimation) {\n options.showAnimationDuration = 0;\n }\n\n // Pass data to PhotoSwipe and initialize it\n var gallery = new __WEBPACK_IMPORTED_MODULE_0_photoswipe_dist_photoswipe___default.a(pswpElement, __WEBPACK_IMPORTED_MODULE_1_photoswipe_dist_photoswipe_ui_default___default.a, items, options);\n\n gallery.init();\n }\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/utils/vendor/photoswipe/galleries.js\n// module id = 895\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/utils/vendor/photoswipe/galleries.js?", + ); + + /***/ + }, + /* 896 */ + /* exports provided: galleries */ + /* exports used: galleries */ + /*!***************************************************!*\ + !*** ./app/libs/utils/vendor/photoswipe/index.js ***! + \***************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__galleries__ = __webpack_require__(/*! ./galleries */ 895);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_0__galleries__["a"]; });\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/utils/vendor/photoswipe/index.js\n// module id = 896\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/utils/vendor/photoswipe/index.js?', + ); + + /***/ + }, + /* 897 */ + /* unknown exports provided */ + /* all exports used */ + /*!***********************************!*\ + !*** ./server-rendering-entry.js ***! + \***********************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + 'Object.defineProperty(__webpack_exports__, "__esModule", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__app_bundles_layout_navbar_startup_client__ = __webpack_require__(/*! ./app/bundles/layout-navbar/startup/client */ 591);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__app_bundles_listings_index_startup_client__ = __webpack_require__(/*! ./app/bundles/listings-index/startup/client */ 592);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__app_bundles_blv_redux_startup_client__ = __webpack_require__(/*! ./app/bundles/blv-redux/startup/client */ 590);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__app_bundles_listings_show_startup_client__ = __webpack_require__(/*! ./app/bundles/listings-show/startup/client */ 593);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__app_bundles_slim_styles_base__ = __webpack_require__(/*! ./app/bundles/slim-styles/base */ 599);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__app_bundles_users_show_startup_client__ = __webpack_require__(/*! ./app/bundles/users-show/startup/client */ 600);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__app_bundles_pages_welcome_startup__ = __webpack_require__(/*! ./app/bundles/pages-welcome/startup */ 598);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__app_bundles_pages_hosts_startup__ = __webpack_require__(/*! ./app/bundles/pages-hosts/startup */ 594);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__app_bundles_pages_public_hosts_startup__ = __webpack_require__(/*! ./app/bundles/pages-public-hosts/startup */ 597);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__app_bundles_pages_private_hosts_startup__ = __webpack_require__(/*! ./app/bundles/pages-private-hosts/startup */ 596);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__app_bundles_pages_pricing_startup__ = __webpack_require__(/*! ./app/bundles/pages-pricing/startup */ 595);\n// This file is used as the single entry point for our server rendering bundle\n\n\n\n\n\n\n\n\n\n\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./server-rendering-entry.js\n// module id = 897\n// module chunks = 0\n\n//# sourceURL=webpack:///./server-rendering-entry.js?', + ); + + /***/ + }, + /* 898 */ + /* unknown exports provided */ + /* all exports used */ + /*!**************************************************!*\ + !*** ./~/babel-runtime/core-js/object/create.js ***! + \**************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + 'module.exports = { "default": __webpack_require__(/*! core-js/library/fn/object/create */ 911), __esModule: true };\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/babel-runtime/core-js/object/create.js\n// module id = 898\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/babel-runtime/core-js/object/create.js?', + ); + + /***/ + }, + /* 899 */ + /* unknown exports provided */ + /* all exports used */ + /*!***********************************************************!*\ + !*** ./~/babel-runtime/core-js/object/define-property.js ***! + \***********************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + 'module.exports = { "default": __webpack_require__(/*! core-js/library/fn/object/define-property */ 912), __esModule: true };\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/babel-runtime/core-js/object/define-property.js\n// module id = 899\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/babel-runtime/core-js/object/define-property.js?', + ); + + /***/ + }, + /* 900 */ + /* unknown exports provided */ + /* all exports used */ + /*!************************************************************!*\ + !*** ./~/babel-runtime/core-js/object/set-prototype-of.js ***! + \************************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + 'module.exports = { "default": __webpack_require__(/*! core-js/library/fn/object/set-prototype-of */ 915), __esModule: true };\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/babel-runtime/core-js/object/set-prototype-of.js\n// module id = 900\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/babel-runtime/core-js/object/set-prototype-of.js?', + ); + + /***/ + }, + /* 901 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************************!*\ + !*** ./~/babel-runtime/core-js/symbol.js ***! + \*******************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + 'module.exports = { "default": __webpack_require__(/*! core-js/library/fn/symbol */ 917), __esModule: true };\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/babel-runtime/core-js/symbol.js\n// module id = 901\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/babel-runtime/core-js/symbol.js?', + ); + + /***/ + }, + /* 902 */ + /* unknown exports provided */ + /* all exports used */ + /*!****************************************************!*\ + !*** ./~/babel-runtime/core-js/symbol/iterator.js ***! + \****************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + 'module.exports = { "default": __webpack_require__(/*! core-js/library/fn/symbol/iterator */ 918), __esModule: true };\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/babel-runtime/core-js/symbol/iterator.js\n// module id = 902\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/babel-runtime/core-js/symbol/iterator.js?', + ); + + /***/ + }, + /* 903 */ + /* unknown exports provided */ + /* exports used: createChangeEmitter */ + /*!***************************************!*\ + !*** ./~/change-emitter/lib/index.js ***! + \***************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar createChangeEmitter = exports.createChangeEmitter = function createChangeEmitter() {\n var currentListeners = [];\n var nextListeners = currentListeners;\n\n function ensureCanMutateNextListeners() {\n if (nextListeners === currentListeners) {\n nextListeners = currentListeners.slice();\n }\n }\n\n function listen(listener) {\n if (typeof listener !== 'function') {\n throw new Error('Expected listener to be a function.');\n }\n\n var isSubscribed = true;\n\n ensureCanMutateNextListeners();\n nextListeners.push(listener);\n\n return function () {\n if (!isSubscribed) {\n return;\n }\n\n isSubscribed = false;\n\n ensureCanMutateNextListeners();\n var index = nextListeners.indexOf(listener);\n nextListeners.splice(index, 1);\n };\n }\n\n function emit() {\n currentListeners = nextListeners;\n var listeners = currentListeners;\n for (var i = 0; i < listeners.length; i++) {\n listeners[i].apply(listeners, arguments);\n }\n }\n\n return {\n listen: listen,\n emit: emit\n };\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/change-emitter/lib/index.js\n// module id = 903\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/change-emitter/lib/index.js?", + ); + + /***/ + }, + /* 904 */ + /* unknown exports provided */ + /* all exports used */ + /*!*********************************************!*\ + !*** ./~/clipboard/lib/clipboard-action.js ***! + \*********************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) {\n if (true) {\n !(__WEBPACK_AMD_DEFINE_ARRAY__ = [module, __webpack_require__(/*! select */ 1488)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?\n\t\t\t\t(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n } else if (typeof exports !== \"undefined\") {\n factory(module, require('select'));\n } else {\n var mod = {\n exports: {}\n };\n factory(mod, global.select);\n global.clipboardAction = mod.exports;\n }\n})(this, function (module, _select) {\n 'use strict';\n\n var _select2 = _interopRequireDefault(_select);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n }\n\n var _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n\n function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n\n var _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n }();\n\n var ClipboardAction = function () {\n /**\n * @param {Object} options\n */\n function ClipboardAction(options) {\n _classCallCheck(this, ClipboardAction);\n\n this.resolveOptions(options);\n this.initSelection();\n }\n\n /**\n * Defines base properties passed from constructor.\n * @param {Object} options\n */\n\n\n _createClass(ClipboardAction, [{\n key: 'resolveOptions',\n value: function resolveOptions() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n this.action = options.action;\n this.emitter = options.emitter;\n this.target = options.target;\n this.text = options.text;\n this.trigger = options.trigger;\n\n this.selectedText = '';\n }\n }, {\n key: 'initSelection',\n value: function initSelection() {\n if (this.text) {\n this.selectFake();\n } else if (this.target) {\n this.selectTarget();\n }\n }\n }, {\n key: 'selectFake',\n value: function selectFake() {\n var _this = this;\n\n var isRTL = document.documentElement.getAttribute('dir') == 'rtl';\n\n this.removeFake();\n\n this.fakeHandlerCallback = function () {\n return _this.removeFake();\n };\n this.fakeHandler = document.body.addEventListener('click', this.fakeHandlerCallback) || true;\n\n this.fakeElem = document.createElement('textarea');\n // Prevent zooming on iOS\n this.fakeElem.style.fontSize = '12pt';\n // Reset box model\n this.fakeElem.style.border = '0';\n this.fakeElem.style.padding = '0';\n this.fakeElem.style.margin = '0';\n // Move element out of screen horizontally\n this.fakeElem.style.position = 'absolute';\n this.fakeElem.style[isRTL ? 'right' : 'left'] = '-9999px';\n // Move element to the same position vertically\n var yPosition = window.pageYOffset || document.documentElement.scrollTop;\n this.fakeElem.style.top = yPosition + 'px';\n\n this.fakeElem.setAttribute('readonly', '');\n this.fakeElem.value = this.text;\n\n document.body.appendChild(this.fakeElem);\n\n this.selectedText = (0, _select2.default)(this.fakeElem);\n this.copyText();\n }\n }, {\n key: 'removeFake',\n value: function removeFake() {\n if (this.fakeHandler) {\n document.body.removeEventListener('click', this.fakeHandlerCallback);\n this.fakeHandler = null;\n this.fakeHandlerCallback = null;\n }\n\n if (this.fakeElem) {\n document.body.removeChild(this.fakeElem);\n this.fakeElem = null;\n }\n }\n }, {\n key: 'selectTarget',\n value: function selectTarget() {\n this.selectedText = (0, _select2.default)(this.target);\n this.copyText();\n }\n }, {\n key: 'copyText',\n value: function copyText() {\n var succeeded = void 0;\n\n try {\n succeeded = document.execCommand(this.action);\n } catch (err) {\n succeeded = false;\n }\n\n this.handleResult(succeeded);\n }\n }, {\n key: 'handleResult',\n value: function handleResult(succeeded) {\n this.emitter.emit(succeeded ? 'success' : 'error', {\n action: this.action,\n text: this.selectedText,\n trigger: this.trigger,\n clearSelection: this.clearSelection.bind(this)\n });\n }\n }, {\n key: 'clearSelection',\n value: function clearSelection() {\n if (this.target) {\n this.target.blur();\n }\n\n window.getSelection().removeAllRanges();\n }\n }, {\n key: 'destroy',\n value: function destroy() {\n this.removeFake();\n }\n }, {\n key: 'action',\n set: function set() {\n var action = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'copy';\n\n this._action = action;\n\n if (this._action !== 'copy' && this._action !== 'cut') {\n throw new Error('Invalid \"action\" value, use either \"copy\" or \"cut\"');\n }\n },\n get: function get() {\n return this._action;\n }\n }, {\n key: 'target',\n set: function set(target) {\n if (target !== undefined) {\n if (target && (typeof target === 'undefined' ? 'undefined' : _typeof(target)) === 'object' && target.nodeType === 1) {\n if (this.action === 'copy' && target.hasAttribute('disabled')) {\n throw new Error('Invalid \"target\" attribute. Please use \"readonly\" instead of \"disabled\" attribute');\n }\n\n if (this.action === 'cut' && (target.hasAttribute('readonly') || target.hasAttribute('disabled'))) {\n throw new Error('Invalid \"target\" attribute. You can\\'t cut text from elements with \"readonly\" or \"disabled\" attributes');\n }\n\n this._target = target;\n } else {\n throw new Error('Invalid \"target\" value, use a valid Element');\n }\n }\n },\n get: function get() {\n return this._target;\n }\n }]);\n\n return ClipboardAction;\n }();\n\n module.exports = ClipboardAction;\n});\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/clipboard/lib/clipboard-action.js\n// module id = 904\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/clipboard/lib/clipboard-action.js?", + ); + + /***/ + }, + /* 905 */ + /* unknown exports provided */ + /* exports used: default */ + /*!**************************************!*\ + !*** ./~/clipboard/lib/clipboard.js ***! + \**************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) {\n if (true) {\n !(__WEBPACK_AMD_DEFINE_ARRAY__ = [module, __webpack_require__(/*! ./clipboard-action */ 904), __webpack_require__(/*! tiny-emitter */ 1492), __webpack_require__(/*! good-listener */ 1144)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?\n\t\t\t\t(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n } else if (typeof exports !== \"undefined\") {\n factory(module, require('./clipboard-action'), require('tiny-emitter'), require('good-listener'));\n } else {\n var mod = {\n exports: {}\n };\n factory(mod, global.clipboardAction, global.tinyEmitter, global.goodListener);\n global.clipboard = mod.exports;\n }\n})(this, function (module, _clipboardAction, _tinyEmitter, _goodListener) {\n 'use strict';\n\n var _clipboardAction2 = _interopRequireDefault(_clipboardAction);\n\n var _tinyEmitter2 = _interopRequireDefault(_tinyEmitter);\n\n var _goodListener2 = _interopRequireDefault(_goodListener);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n }\n\n function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n\n var _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n }();\n\n function _possibleConstructorReturn(self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\n }\n\n function _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass);\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n }\n\n var Clipboard = function (_Emitter) {\n _inherits(Clipboard, _Emitter);\n\n /**\n * @param {String|HTMLElement|HTMLCollection|NodeList} trigger\n * @param {Object} options\n */\n function Clipboard(trigger, options) {\n _classCallCheck(this, Clipboard);\n\n var _this = _possibleConstructorReturn(this, (Clipboard.__proto__ || Object.getPrototypeOf(Clipboard)).call(this));\n\n _this.resolveOptions(options);\n _this.listenClick(trigger);\n return _this;\n }\n\n /**\n * Defines if attributes would be resolved using internal setter functions\n * or custom functions that were passed in the constructor.\n * @param {Object} options\n */\n\n\n _createClass(Clipboard, [{\n key: 'resolveOptions',\n value: function resolveOptions() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n this.action = typeof options.action === 'function' ? options.action : this.defaultAction;\n this.target = typeof options.target === 'function' ? options.target : this.defaultTarget;\n this.text = typeof options.text === 'function' ? options.text : this.defaultText;\n }\n }, {\n key: 'listenClick',\n value: function listenClick(trigger) {\n var _this2 = this;\n\n this.listener = (0, _goodListener2.default)(trigger, 'click', function (e) {\n return _this2.onClick(e);\n });\n }\n }, {\n key: 'onClick',\n value: function onClick(e) {\n var trigger = e.delegateTarget || e.currentTarget;\n\n if (this.clipboardAction) {\n this.clipboardAction = null;\n }\n\n this.clipboardAction = new _clipboardAction2.default({\n action: this.action(trigger),\n target: this.target(trigger),\n text: this.text(trigger),\n trigger: trigger,\n emitter: this\n });\n }\n }, {\n key: 'defaultAction',\n value: function defaultAction(trigger) {\n return getAttributeValue('action', trigger);\n }\n }, {\n key: 'defaultTarget',\n value: function defaultTarget(trigger) {\n var selector = getAttributeValue('target', trigger);\n\n if (selector) {\n return document.querySelector(selector);\n }\n }\n }, {\n key: 'defaultText',\n value: function defaultText(trigger) {\n return getAttributeValue('text', trigger);\n }\n }, {\n key: 'destroy',\n value: function destroy() {\n this.listener.destroy();\n\n if (this.clipboardAction) {\n this.clipboardAction.destroy();\n this.clipboardAction = null;\n }\n }\n }], [{\n key: 'isSupported',\n value: function isSupported() {\n var action = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ['copy', 'cut'];\n\n var actions = typeof action === 'string' ? [action] : action;\n var support = !!document.queryCommandSupported;\n\n actions.forEach(function (action) {\n support = support && !!document.queryCommandSupported(action);\n });\n\n return support;\n }\n }]);\n\n return Clipboard;\n }(_tinyEmitter2.default);\n\n /**\n * Helper function to retrieve attribute value.\n * @param {String} suffix\n * @param {Element} element\n */\n function getAttributeValue(suffix, element) {\n var attribute = 'data-clipboard-' + suffix;\n\n if (!element.hasAttribute(attribute)) {\n return;\n }\n\n return element.getAttribute(attribute);\n }\n\n module.exports = Clipboard;\n});\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/clipboard/lib/clipboard.js\n// module id = 905\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/clipboard/lib/clipboard.js?", + ); + + /***/ + }, + /* 906 */ + /* unknown exports provided */ + /* all exports used */ + /*!**************************************!*\ + !*** ./~/component-classes/index.js ***! + \**************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "/**\n * Module dependencies.\n */\n\ntry {\n var index = __webpack_require__(/*! indexof */ 316);\n} catch (err) {\n var index = __webpack_require__(/*! component-indexof */ 316);\n}\n\n/**\n * Whitespace regexp.\n */\n\nvar re = /\\s+/;\n\n/**\n * toString reference.\n */\n\nvar toString = Object.prototype.toString;\n\n/**\n * Wrap `el` in a `ClassList`.\n *\n * @param {Element} el\n * @return {ClassList}\n * @api public\n */\n\nmodule.exports = function(el){\n return new ClassList(el);\n};\n\n/**\n * Initialize a new ClassList for `el`.\n *\n * @param {Element} el\n * @api private\n */\n\nfunction ClassList(el) {\n if (!el || !el.nodeType) {\n throw new Error('A DOM element reference is required');\n }\n this.el = el;\n this.list = el.classList;\n}\n\n/**\n * Add class `name` if not already present.\n *\n * @param {String} name\n * @return {ClassList}\n * @api public\n */\n\nClassList.prototype.add = function(name){\n // classList\n if (this.list) {\n this.list.add(name);\n return this;\n }\n\n // fallback\n var arr = this.array();\n var i = index(arr, name);\n if (!~i) arr.push(name);\n this.el.className = arr.join(' ');\n return this;\n};\n\n/**\n * Remove class `name` when present, or\n * pass a regular expression to remove\n * any which match.\n *\n * @param {String|RegExp} name\n * @return {ClassList}\n * @api public\n */\n\nClassList.prototype.remove = function(name){\n if ('[object RegExp]' == toString.call(name)) {\n return this.removeMatching(name);\n }\n\n // classList\n if (this.list) {\n this.list.remove(name);\n return this;\n }\n\n // fallback\n var arr = this.array();\n var i = index(arr, name);\n if (~i) arr.splice(i, 1);\n this.el.className = arr.join(' ');\n return this;\n};\n\n/**\n * Remove all classes matching `re`.\n *\n * @param {RegExp} re\n * @return {ClassList}\n * @api private\n */\n\nClassList.prototype.removeMatching = function(re){\n var arr = this.array();\n for (var i = 0; i < arr.length; i++) {\n if (re.test(arr[i])) {\n this.remove(arr[i]);\n }\n }\n return this;\n};\n\n/**\n * Toggle class `name`, can force state via `force`.\n *\n * For browsers that support classList, but do not support `force` yet,\n * the mistake will be detected and corrected.\n *\n * @param {String} name\n * @param {Boolean} force\n * @return {ClassList}\n * @api public\n */\n\nClassList.prototype.toggle = function(name, force){\n // classList\n if (this.list) {\n if (\"undefined\" !== typeof force) {\n if (force !== this.list.toggle(name, force)) {\n this.list.toggle(name); // toggle again to correct\n }\n } else {\n this.list.toggle(name);\n }\n return this;\n }\n\n // fallback\n if (\"undefined\" !== typeof force) {\n if (!force) {\n this.remove(name);\n } else {\n this.add(name);\n }\n } else {\n if (this.has(name)) {\n this.remove(name);\n } else {\n this.add(name);\n }\n }\n\n return this;\n};\n\n/**\n * Return an array of classes.\n *\n * @return {Array}\n * @api public\n */\n\nClassList.prototype.array = function(){\n var className = this.el.getAttribute('class') || '';\n var str = className.replace(/^\\s+|\\s+$/g, '');\n var arr = str.split(re);\n if ('' === arr[0]) arr.shift();\n return arr;\n};\n\n/**\n * Check if class `name` is present.\n *\n * @param {String} name\n * @return {ClassList}\n * @api public\n */\n\nClassList.prototype.has =\nClassList.prototype.contains = function(name){\n return this.list\n ? this.list.contains(name)\n : !! ~index(this.array(), name);\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/component-classes/index.js\n// module id = 906\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/component-classes/index.js?", + ); + + /***/ + }, + /* 907 */ + /* unknown exports provided */ + /* all exports used */ + /*!********************************************!*\ + !*** ./~/core-js/library/fn/array/from.js ***! + \********************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + '__webpack_require__(/*! ../../modules/es6.string.iterator */ 209);\n__webpack_require__(/*! ../../modules/es6.array.from */ 944);\nmodule.exports = __webpack_require__(/*! ../../modules/_core */ 30).Array.from;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/fn/array/from.js\n// module id = 907\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/fn/array/from.js?', + ); + + /***/ + }, + /* 908 */ + /* unknown exports provided */ + /* all exports used */ + /*!************************************************!*\ + !*** ./~/core-js/library/fn/json/stringify.js ***! + \************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + 'var core = __webpack_require__(/*! ../../modules/_core */ 30)\n , $JSON = core.JSON || (core.JSON = {stringify: JSON.stringify});\nmodule.exports = function stringify(it){ // eslint-disable-line no-unused-vars\n return $JSON.stringify.apply($JSON, arguments);\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/fn/json/stringify.js\n// module id = 908\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/fn/json/stringify.js?', + ); + + /***/ + }, + /* 909 */ + /* unknown exports provided */ + /* all exports used */ + /*!*************************************!*\ + !*** ./~/core-js/library/fn/map.js ***! + \*************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + '__webpack_require__(/*! ../modules/es6.object.to-string */ 332);\n__webpack_require__(/*! ../modules/es6.string.iterator */ 209);\n__webpack_require__(/*! ../modules/web.dom.iterable */ 333);\n__webpack_require__(/*! ../modules/es6.map */ 946);\n__webpack_require__(/*! ../modules/es7.map.to-json */ 953);\nmodule.exports = __webpack_require__(/*! ../modules/_core */ 30).Map;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/fn/map.js\n// module id = 909\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/fn/map.js?', + ); + + /***/ + }, + /* 910 */ + /* unknown exports provided */ + /* all exports used */ + /*!***********************************************!*\ + !*** ./~/core-js/library/fn/object/assign.js ***! + \***********************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + '__webpack_require__(/*! ../../modules/es6.object.assign */ 947);\nmodule.exports = __webpack_require__(/*! ../../modules/_core */ 30).Object.assign;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/fn/object/assign.js\n// module id = 910\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/fn/object/assign.js?', + ); + + /***/ + }, + /* 911 */ + /* unknown exports provided */ + /* all exports used */ + /*!***********************************************!*\ + !*** ./~/core-js/library/fn/object/create.js ***! + \***********************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + '__webpack_require__(/*! ../../modules/es6.object.create */ 948);\nvar $Object = __webpack_require__(/*! ../../modules/_core */ 30).Object;\nmodule.exports = function create(P, D){\n return $Object.create(P, D);\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/fn/object/create.js\n// module id = 911\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/fn/object/create.js?', + ); + + /***/ + }, + /* 912 */ + /* unknown exports provided */ + /* all exports used */ + /*!********************************************************!*\ + !*** ./~/core-js/library/fn/object/define-property.js ***! + \********************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + '__webpack_require__(/*! ../../modules/es6.object.define-property */ 949);\nvar $Object = __webpack_require__(/*! ../../modules/_core */ 30).Object;\nmodule.exports = function defineProperty(it, key, desc){\n return $Object.defineProperty(it, key, desc);\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/fn/object/define-property.js\n// module id = 912\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/fn/object/define-property.js?', + ); + + /***/ + }, + /* 913 */ + /* unknown exports provided */ + /* all exports used */ + /*!************************************************!*\ + !*** ./~/core-js/library/fn/object/entries.js ***! + \************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + '__webpack_require__(/*! ../../modules/es7.object.entries */ 954);\nmodule.exports = __webpack_require__(/*! ../../modules/_core */ 30).Object.entries;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/fn/object/entries.js\n// module id = 913\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/fn/object/entries.js?', + ); + + /***/ + }, + /* 914 */ + /* unknown exports provided */ + /* all exports used */ + /*!*********************************************!*\ + !*** ./~/core-js/library/fn/object/keys.js ***! + \*********************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + '__webpack_require__(/*! ../../modules/es6.object.keys */ 950);\nmodule.exports = __webpack_require__(/*! ../../modules/_core */ 30).Object.keys;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/fn/object/keys.js\n// module id = 914\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/fn/object/keys.js?', + ); + + /***/ + }, + /* 915 */ + /* unknown exports provided */ + /* all exports used */ + /*!*********************************************************!*\ + !*** ./~/core-js/library/fn/object/set-prototype-of.js ***! + \*********************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + '__webpack_require__(/*! ../../modules/es6.object.set-prototype-of */ 951);\nmodule.exports = __webpack_require__(/*! ../../modules/_core */ 30).Object.setPrototypeOf;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/fn/object/set-prototype-of.js\n// module id = 915\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/fn/object/set-prototype-of.js?', + ); + + /***/ + }, + /* 916 */ + /* unknown exports provided */ + /* all exports used */ + /*!***********************************************!*\ + !*** ./~/core-js/library/fn/object/values.js ***! + \***********************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + '__webpack_require__(/*! ../../modules/es7.object.values */ 955);\nmodule.exports = __webpack_require__(/*! ../../modules/_core */ 30).Object.values;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/fn/object/values.js\n// module id = 916\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/fn/object/values.js?', + ); + + /***/ + }, + /* 917 */ + /* unknown exports provided */ + /* all exports used */ + /*!**********************************************!*\ + !*** ./~/core-js/library/fn/symbol/index.js ***! + \**********************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + '__webpack_require__(/*! ../../modules/es6.symbol */ 952);\n__webpack_require__(/*! ../../modules/es6.object.to-string */ 332);\n__webpack_require__(/*! ../../modules/es7.symbol.async-iterator */ 956);\n__webpack_require__(/*! ../../modules/es7.symbol.observable */ 957);\nmodule.exports = __webpack_require__(/*! ../../modules/_core */ 30).Symbol;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/fn/symbol/index.js\n// module id = 917\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/fn/symbol/index.js?', + ); + + /***/ + }, + /* 918 */ + /* unknown exports provided */ + /* all exports used */ + /*!*************************************************!*\ + !*** ./~/core-js/library/fn/symbol/iterator.js ***! + \*************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "__webpack_require__(/*! ../../modules/es6.string.iterator */ 209);\n__webpack_require__(/*! ../../modules/web.dom.iterable */ 333);\nmodule.exports = __webpack_require__(/*! ../../modules/_wks-ext */ 208).f('iterator');\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/fn/symbol/iterator.js\n// module id = 918\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/fn/symbol/iterator.js?", + ); + + /***/ + }, + /* 919 */ + /* unknown exports provided */ + /* all exports used */ + /*!**************************************************!*\ + !*** ./~/core-js/library/modules/_a-function.js ***! + \**************************************************/ + /***/ function (module, exports) { + eval( + "module.exports = function(it){\n if(typeof it != 'function')throw TypeError(it + ' is not a function!');\n return it;\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_a-function.js\n// module id = 919\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/_a-function.js?", + ); + + /***/ + }, + /* 920 */ + /* unknown exports provided */ + /* all exports used */ + /*!**********************************************************!*\ + !*** ./~/core-js/library/modules/_add-to-unscopables.js ***! + \**********************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = function(){ /* empty */ };\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_add-to-unscopables.js\n// module id = 920\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/_add-to-unscopables.js?', + ); + + /***/ + }, + /* 921 */ + /* unknown exports provided */ + /* all exports used */ + /*!***********************************************************!*\ + !*** ./~/core-js/library/modules/_array-from-iterable.js ***! + \***********************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + 'var forOf = __webpack_require__(/*! ./_for-of */ 197);\n\nmodule.exports = function(iter, ITERATOR){\n var result = [];\n forOf(iter, false, result.push, result, ITERATOR);\n return result;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_array-from-iterable.js\n// module id = 921\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/_array-from-iterable.js?', + ); + + /***/ + }, + /* 922 */ + /* unknown exports provided */ + /* all exports used */ + /*!******************************************************!*\ + !*** ./~/core-js/library/modules/_array-includes.js ***! + \******************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + '// false -> Array#indexOf\n// true -> Array#includes\nvar toIObject = __webpack_require__(/*! ./_to-iobject */ 64)\n , toLength = __webpack_require__(/*! ./_to-length */ 152)\n , toIndex = __webpack_require__(/*! ./_to-index */ 943);\nmodule.exports = function(IS_INCLUDES){\n return function($this, el, fromIndex){\n var O = toIObject($this)\n , length = toLength(O.length)\n , index = toIndex(fromIndex, length)\n , value;\n // Array#includes uses SameValueZero equality algorithm\n if(IS_INCLUDES && el != el)while(length > index){\n value = O[index++];\n if(value != value)return true;\n // Array#toIndex ignores holes, Array#includes - not\n } else for(;length > index; index++)if(IS_INCLUDES || index in O){\n if(O[index] === el)return IS_INCLUDES || index || 0;\n } return !IS_INCLUDES && -1;\n };\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_array-includes.js\n// module id = 922\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/_array-includes.js?', + ); + + /***/ + }, + /* 923 */ + /* unknown exports provided */ + /* all exports used */ + /*!*****************************************************!*\ + !*** ./~/core-js/library/modules/_array-methods.js ***! + \*****************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + '// 0 -> Array#forEach\n// 1 -> Array#map\n// 2 -> Array#filter\n// 3 -> Array#some\n// 4 -> Array#every\n// 5 -> Array#find\n// 6 -> Array#findIndex\nvar ctx = __webpack_require__(/*! ./_ctx */ 93)\n , IObject = __webpack_require__(/*! ./_iobject */ 198)\n , toObject = __webpack_require__(/*! ./_to-object */ 113)\n , toLength = __webpack_require__(/*! ./_to-length */ 152)\n , asc = __webpack_require__(/*! ./_array-species-create */ 925);\nmodule.exports = function(TYPE, $create){\n var IS_MAP = TYPE == 1\n , IS_FILTER = TYPE == 2\n , IS_SOME = TYPE == 3\n , IS_EVERY = TYPE == 4\n , IS_FIND_INDEX = TYPE == 6\n , NO_HOLES = TYPE == 5 || IS_FIND_INDEX\n , create = $create || asc;\n return function($this, callbackfn, that){\n var O = toObject($this)\n , self = IObject(O)\n , f = ctx(callbackfn, that, 3)\n , length = toLength(self.length)\n , index = 0\n , result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined\n , val, res;\n for(;length > index; index++)if(NO_HOLES || index in self){\n val = self[index];\n res = f(val, index, O);\n if(TYPE){\n if(IS_MAP)result[index] = res; // map\n else if(res)switch(TYPE){\n case 3: return true; // some\n case 5: return val; // find\n case 6: return index; // findIndex\n case 2: result.push(val); // filter\n } else if(IS_EVERY)return false; // every\n }\n }\n return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result;\n };\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_array-methods.js\n// module id = 923\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/_array-methods.js?', + ); + + /***/ + }, + /* 924 */ + /* unknown exports provided */ + /* all exports used */ + /*!*****************************************************************!*\ + !*** ./~/core-js/library/modules/_array-species-constructor.js ***! + \*****************************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "var isObject = __webpack_require__(/*! ./_is-object */ 75)\n , isArray = __webpack_require__(/*! ./_is-array */ 322)\n , SPECIES = __webpack_require__(/*! ./_wks */ 39)('species');\n\nmodule.exports = function(original){\n var C;\n if(isArray(original)){\n C = original.constructor;\n // cross-realm fallback\n if(typeof C == 'function' && (C === Array || isArray(C.prototype)))C = undefined;\n if(isObject(C)){\n C = C[SPECIES];\n if(C === null)C = undefined;\n }\n } return C === undefined ? Array : C;\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_array-species-constructor.js\n// module id = 924\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/_array-species-constructor.js?", + ); + + /***/ + }, + /* 925 */ + /* unknown exports provided */ + /* all exports used */ + /*!************************************************************!*\ + !*** ./~/core-js/library/modules/_array-species-create.js ***! + \************************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + '// 9.4.2.3 ArraySpeciesCreate(originalArray, length)\nvar speciesConstructor = __webpack_require__(/*! ./_array-species-constructor */ 924);\n\nmodule.exports = function(original, length){\n return new (speciesConstructor(original))(length);\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_array-species-create.js\n// module id = 925\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/_array-species-create.js?', + ); + + /***/ + }, + /* 926 */ + /* unknown exports provided */ + /* all exports used */ + /*!*********************************************************!*\ + !*** ./~/core-js/library/modules/_collection-strong.js ***! + \*********************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\nvar dP = __webpack_require__(/*! ./_object-dp */ 46).f\n , create = __webpack_require__(/*! ./_object-create */ 150)\n , redefineAll = __webpack_require__(/*! ./_redefine-all */ 329)\n , ctx = __webpack_require__(/*! ./_ctx */ 93)\n , anInstance = __webpack_require__(/*! ./_an-instance */ 317)\n , defined = __webpack_require__(/*! ./_defined */ 149)\n , forOf = __webpack_require__(/*! ./_for-of */ 197)\n , $iterDefine = __webpack_require__(/*! ./_iter-define */ 199)\n , step = __webpack_require__(/*! ./_iter-step */ 324)\n , setSpecies = __webpack_require__(/*! ./_set-species */ 941)\n , DESCRIPTORS = __webpack_require__(/*! ./_descriptors */ 52)\n , fastKey = __webpack_require__(/*! ./_meta */ 201).fastKey\n , SIZE = DESCRIPTORS ? '_s' : 'size';\n\nvar getEntry = function(that, key){\n // fast case\n var index = fastKey(key), entry;\n if(index !== 'F')return that._i[index];\n // frozen object case\n for(entry = that._f; entry; entry = entry.n){\n if(entry.k == key)return entry;\n }\n};\n\nmodule.exports = {\n getConstructor: function(wrapper, NAME, IS_MAP, ADDER){\n var C = wrapper(function(that, iterable){\n anInstance(that, C, NAME, '_i');\n that._i = create(null); // index\n that._f = undefined; // first entry\n that._l = undefined; // last entry\n that[SIZE] = 0; // size\n if(iterable != undefined)forOf(iterable, IS_MAP, that[ADDER], that);\n });\n redefineAll(C.prototype, {\n // 23.1.3.1 Map.prototype.clear()\n // 23.2.3.2 Set.prototype.clear()\n clear: function clear(){\n for(var that = this, data = that._i, entry = that._f; entry; entry = entry.n){\n entry.r = true;\n if(entry.p)entry.p = entry.p.n = undefined;\n delete data[entry.i];\n }\n that._f = that._l = undefined;\n that[SIZE] = 0;\n },\n // 23.1.3.3 Map.prototype.delete(key)\n // 23.2.3.4 Set.prototype.delete(value)\n 'delete': function(key){\n var that = this\n , entry = getEntry(that, key);\n if(entry){\n var next = entry.n\n , prev = entry.p;\n delete that._i[entry.i];\n entry.r = true;\n if(prev)prev.n = next;\n if(next)next.p = prev;\n if(that._f == entry)that._f = next;\n if(that._l == entry)that._l = prev;\n that[SIZE]--;\n } return !!entry;\n },\n // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined)\n // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined)\n forEach: function forEach(callbackfn /*, that = undefined */){\n anInstance(this, C, 'forEach');\n var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3)\n , entry;\n while(entry = entry ? entry.n : this._f){\n f(entry.v, entry.k, this);\n // revert to the last existing entry\n while(entry && entry.r)entry = entry.p;\n }\n },\n // 23.1.3.7 Map.prototype.has(key)\n // 23.2.3.7 Set.prototype.has(value)\n has: function has(key){\n return !!getEntry(this, key);\n }\n });\n if(DESCRIPTORS)dP(C.prototype, 'size', {\n get: function(){\n return defined(this[SIZE]);\n }\n });\n return C;\n },\n def: function(that, key, value){\n var entry = getEntry(that, key)\n , prev, index;\n // change existing entry\n if(entry){\n entry.v = value;\n // create new entry\n } else {\n that._l = entry = {\n i: index = fastKey(key, true), // <- index\n k: key, // <- key\n v: value, // <- value\n p: prev = that._l, // <- previous entry\n n: undefined, // <- next entry\n r: false // <- removed\n };\n if(!that._f)that._f = entry;\n if(prev)prev.n = entry;\n that[SIZE]++;\n // add to index\n if(index !== 'F')that._i[index] = entry;\n } return that;\n },\n getEntry: getEntry,\n setStrong: function(C, NAME, IS_MAP){\n // add .keys, .values, .entries, [@@iterator]\n // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11\n $iterDefine(C, NAME, function(iterated, kind){\n this._t = iterated; // target\n this._k = kind; // kind\n this._l = undefined; // previous\n }, function(){\n var that = this\n , kind = that._k\n , entry = that._l;\n // revert to the last existing entry\n while(entry && entry.r)entry = entry.p;\n // get next entry\n if(!that._t || !(that._l = entry = entry ? entry.n : that._t._f)){\n // or finish the iteration\n that._t = undefined;\n return step(1);\n }\n // return step by kind\n if(kind == 'keys' )return step(0, entry.k);\n if(kind == 'values')return step(0, entry.v);\n return step(0, [entry.k, entry.v]);\n }, IS_MAP ? 'entries' : 'values' , !IS_MAP, true);\n\n // add [@@species], 23.1.2.2, 23.2.2.2\n setSpecies(NAME);\n }\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_collection-strong.js\n// module id = 926\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/_collection-strong.js?", + ); + + /***/ + }, + /* 927 */ + /* unknown exports provided */ + /* all exports used */ + /*!**********************************************************!*\ + !*** ./~/core-js/library/modules/_collection-to-json.js ***! + \**********************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + '// https://github.com/DavidBruant/Map-Set.prototype.toJSON\nvar classof = __webpack_require__(/*! ./_classof */ 318)\n , from = __webpack_require__(/*! ./_array-from-iterable */ 921);\nmodule.exports = function(NAME){\n return function toJSON(){\n if(classof(this) != NAME)throw TypeError(NAME + "#toJSON isn\'t generic");\n return from(this);\n };\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_collection-to-json.js\n// module id = 927\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/_collection-to-json.js?', + ); + + /***/ + }, + /* 928 */ + /* unknown exports provided */ + /* all exports used */ + /*!**************************************************!*\ + !*** ./~/core-js/library/modules/_collection.js ***! + \**************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\nvar global = __webpack_require__(/*! ./_global */ 53)\n , $export = __webpack_require__(/*! ./_export */ 38)\n , meta = __webpack_require__(/*! ./_meta */ 201)\n , fails = __webpack_require__(/*! ./_fails */ 73)\n , hide = __webpack_require__(/*! ./_hide */ 63)\n , redefineAll = __webpack_require__(/*! ./_redefine-all */ 329)\n , forOf = __webpack_require__(/*! ./_for-of */ 197)\n , anInstance = __webpack_require__(/*! ./_an-instance */ 317)\n , isObject = __webpack_require__(/*! ./_is-object */ 75)\n , setToStringTag = __webpack_require__(/*! ./_set-to-string-tag */ 151)\n , dP = __webpack_require__(/*! ./_object-dp */ 46).f\n , each = __webpack_require__(/*! ./_array-methods */ 923)(0)\n , DESCRIPTORS = __webpack_require__(/*! ./_descriptors */ 52);\n\nmodule.exports = function(NAME, wrapper, methods, common, IS_MAP, IS_WEAK){\n var Base = global[NAME]\n , C = Base\n , ADDER = IS_MAP ? 'set' : 'add'\n , proto = C && C.prototype\n , O = {};\n if(!DESCRIPTORS || typeof C != 'function' || !(IS_WEAK || proto.forEach && !fails(function(){\n new C().entries().next();\n }))){\n // create collection constructor\n C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER);\n redefineAll(C.prototype, methods);\n meta.NEED = true;\n } else {\n C = wrapper(function(target, iterable){\n anInstance(target, C, NAME, '_c');\n target._c = new Base;\n if(iterable != undefined)forOf(iterable, IS_MAP, target[ADDER], target);\n });\n each('add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON'.split(','),function(KEY){\n var IS_ADDER = KEY == 'add' || KEY == 'set';\n if(KEY in proto && !(IS_WEAK && KEY == 'clear'))hide(C.prototype, KEY, function(a, b){\n anInstance(this, C, KEY);\n if(!IS_ADDER && IS_WEAK && !isObject(a))return KEY == 'get' ? undefined : false;\n var result = this._c[KEY](a === 0 ? 0 : a, b);\n return IS_ADDER ? this : result;\n });\n });\n if('size' in proto)dP(C.prototype, 'size', {\n get: function(){\n return this._c.size;\n }\n });\n }\n\n setToStringTag(C, NAME);\n\n O[NAME] = C;\n $export($export.G + $export.W + $export.F, O);\n\n if(!IS_WEAK)common.setStrong(C, NAME, IS_MAP);\n\n return C;\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_collection.js\n// module id = 928\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/_collection.js?", + ); + + /***/ + }, + /* 929 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************************************!*\ + !*** ./~/core-js/library/modules/_create-property.js ***! + \*******************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\nvar $defineProperty = __webpack_require__(/*! ./_object-dp */ 46)\n , createDesc = __webpack_require__(/*! ./_property-desc */ 112);\n\nmodule.exports = function(object, index, value){\n if(index in object)$defineProperty.f(object, index, createDesc(0, value));\n else object[index] = value;\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_create-property.js\n// module id = 929\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/_create-property.js?', + ); + + /***/ + }, + /* 930 */ + /* unknown exports provided */ + /* all exports used */ + /*!*************************************************!*\ + !*** ./~/core-js/library/modules/_enum-keys.js ***! + \*************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + '// all enumerable object keys, includes symbols\nvar getKeys = __webpack_require__(/*! ./_object-keys */ 76)\n , gOPS = __webpack_require__(/*! ./_object-gops */ 202)\n , pIE = __webpack_require__(/*! ./_object-pie */ 111);\nmodule.exports = function(it){\n var result = getKeys(it)\n , getSymbols = gOPS.f;\n if(getSymbols){\n var symbols = getSymbols(it)\n , isEnum = pIE.f\n , i = 0\n , key;\n while(symbols.length > i)if(isEnum.call(it, key = symbols[i++]))result.push(key);\n } return result;\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_enum-keys.js\n// module id = 930\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/_enum-keys.js?', + ); + + /***/ + }, + /* 931 */ + /* unknown exports provided */ + /* all exports used */ + /*!********************************************!*\ + !*** ./~/core-js/library/modules/_html.js ***! + \********************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + 'module.exports = __webpack_require__(/*! ./_global */ 53).document && document.documentElement;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_html.js\n// module id = 931\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/_html.js?', + ); + + /***/ + }, + /* 932 */ + /* unknown exports provided */ + /* all exports used */ + /*!***************************************************!*\ + !*** ./~/core-js/library/modules/_iter-create.js ***! + \***************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\nvar create = __webpack_require__(/*! ./_object-create */ 150)\n , descriptor = __webpack_require__(/*! ./_property-desc */ 112)\n , setToStringTag = __webpack_require__(/*! ./_set-to-string-tag */ 151)\n , IteratorPrototype = {};\n\n// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()\n__webpack_require__(/*! ./_hide */ 63)(IteratorPrototype, __webpack_require__(/*! ./_wks */ 39)('iterator'), function(){ return this; });\n\nmodule.exports = function(Constructor, NAME, next){\n Constructor.prototype = create(IteratorPrototype, {next: descriptor(1, next)});\n setToStringTag(Constructor, NAME + ' Iterator');\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_iter-create.js\n// module id = 932\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/_iter-create.js?", + ); + + /***/ + }, + /* 933 */ + /* unknown exports provided */ + /* all exports used */ + /*!***************************************************!*\ + !*** ./~/core-js/library/modules/_iter-detect.js ***! + \***************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "var ITERATOR = __webpack_require__(/*! ./_wks */ 39)('iterator')\n , SAFE_CLOSING = false;\n\ntry {\n var riter = [7][ITERATOR]();\n riter['return'] = function(){ SAFE_CLOSING = true; };\n Array.from(riter, function(){ throw 2; });\n} catch(e){ /* empty */ }\n\nmodule.exports = function(exec, skipClosing){\n if(!skipClosing && !SAFE_CLOSING)return false;\n var safe = false;\n try {\n var arr = [7]\n , iter = arr[ITERATOR]();\n iter.next = function(){ return {done: safe = true}; };\n arr[ITERATOR] = function(){ return iter; };\n exec(arr);\n } catch(e){ /* empty */ }\n return safe;\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_iter-detect.js\n// module id = 933\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/_iter-detect.js?", + ); + + /***/ + }, + /* 934 */ + /* unknown exports provided */ + /* all exports used */ + /*!*********************************************!*\ + !*** ./~/core-js/library/modules/_keyof.js ***! + \*********************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + 'var getKeys = __webpack_require__(/*! ./_object-keys */ 76)\n , toIObject = __webpack_require__(/*! ./_to-iobject */ 64);\nmodule.exports = function(object, el){\n var O = toIObject(object)\n , keys = getKeys(O)\n , length = keys.length\n , index = 0\n , key;\n while(length > index)if(O[key = keys[index++]] === el)return key;\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_keyof.js\n// module id = 934\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/_keyof.js?', + ); + + /***/ + }, + /* 935 */ + /* unknown exports provided */ + /* all exports used */ + /*!*****************************************************!*\ + !*** ./~/core-js/library/modules/_object-assign.js ***! + \*****************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n// 19.1.2.1 Object.assign(target, source, ...)\nvar getKeys = __webpack_require__(/*! ./_object-keys */ 76)\n , gOPS = __webpack_require__(/*! ./_object-gops */ 202)\n , pIE = __webpack_require__(/*! ./_object-pie */ 111)\n , toObject = __webpack_require__(/*! ./_to-object */ 113)\n , IObject = __webpack_require__(/*! ./_iobject */ 198)\n , $assign = Object.assign;\n\n// should work with symbols and should have deterministic property order (V8 bug)\nmodule.exports = !$assign || __webpack_require__(/*! ./_fails */ 73)(function(){\n var A = {}\n , B = {}\n , S = Symbol()\n , K = 'abcdefghijklmnopqrst';\n A[S] = 7;\n K.split('').forEach(function(k){ B[k] = k; });\n return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;\n}) ? function assign(target, source){ // eslint-disable-line no-unused-vars\n var T = toObject(target)\n , aLen = arguments.length\n , index = 1\n , getSymbols = gOPS.f\n , isEnum = pIE.f;\n while(aLen > index){\n var S = IObject(arguments[index++])\n , keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S)\n , length = keys.length\n , j = 0\n , key;\n while(length > j)if(isEnum.call(S, key = keys[j++]))T[key] = S[key];\n } return T;\n} : $assign;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_object-assign.js\n// module id = 935\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/_object-assign.js?", + ); + + /***/ + }, + /* 936 */ + /* unknown exports provided */ + /* all exports used */ + /*!**************************************************!*\ + !*** ./~/core-js/library/modules/_object-dps.js ***! + \**************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + 'var dP = __webpack_require__(/*! ./_object-dp */ 46)\n , anObject = __webpack_require__(/*! ./_an-object */ 72)\n , getKeys = __webpack_require__(/*! ./_object-keys */ 76);\n\nmodule.exports = __webpack_require__(/*! ./_descriptors */ 52) ? Object.defineProperties : function defineProperties(O, Properties){\n anObject(O);\n var keys = getKeys(Properties)\n , length = keys.length\n , i = 0\n , P;\n while(length > i)dP.f(O, P = keys[i++], Properties[P]);\n return O;\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_object-dps.js\n// module id = 936\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/_object-dps.js?', + ); + + /***/ + }, + /* 937 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************************************!*\ + !*** ./~/core-js/library/modules/_object-gopn-ext.js ***! + \*******************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window\nvar toIObject = __webpack_require__(/*! ./_to-iobject */ 64)\n , gOPN = __webpack_require__(/*! ./_object-gopn */ 326).f\n , toString = {}.toString;\n\nvar windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames\n ? Object.getOwnPropertyNames(window) : [];\n\nvar getWindowNames = function(it){\n try {\n return gOPN(it);\n } catch(e){\n return windowNames.slice();\n }\n};\n\nmodule.exports.f = function getOwnPropertyNames(it){\n return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it));\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_object-gopn-ext.js\n// module id = 937\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/_object-gopn-ext.js?", + ); + + /***/ + }, + /* 938 */ + /* unknown exports provided */ + /* all exports used */ + /*!**************************************************!*\ + !*** ./~/core-js/library/modules/_object-gpo.js ***! + \**************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)\nvar has = __webpack_require__(/*! ./_has */ 74)\n , toObject = __webpack_require__(/*! ./_to-object */ 113)\n , IE_PROTO = __webpack_require__(/*! ./_shared-key */ 203)('IE_PROTO')\n , ObjectProto = Object.prototype;\n\nmodule.exports = Object.getPrototypeOf || function(O){\n O = toObject(O);\n if(has(O, IE_PROTO))return O[IE_PROTO];\n if(typeof O.constructor == 'function' && O instanceof O.constructor){\n return O.constructor.prototype;\n } return O instanceof Object ? ObjectProto : null;\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_object-gpo.js\n// module id = 938\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/_object-gpo.js?", + ); + + /***/ + }, + /* 939 */ + /* unknown exports provided */ + /* all exports used */ + /*!**************************************************!*\ + !*** ./~/core-js/library/modules/_object-sap.js ***! + \**************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "// most Object methods by ES6 should accept primitives\nvar $export = __webpack_require__(/*! ./_export */ 38)\n , core = __webpack_require__(/*! ./_core */ 30)\n , fails = __webpack_require__(/*! ./_fails */ 73);\nmodule.exports = function(KEY, exec){\n var fn = (core.Object || {})[KEY] || Object[KEY]\n , exp = {};\n exp[KEY] = exec(fn);\n $export($export.S + $export.F * fails(function(){ fn(1); }), 'Object', exp);\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_object-sap.js\n// module id = 939\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/_object-sap.js?", + ); + + /***/ + }, + /* 940 */ + /* unknown exports provided */ + /* all exports used */ + /*!*************************************************!*\ + !*** ./~/core-js/library/modules/_set-proto.js ***! + \*************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "// Works with __proto__ only. Old v8 can't work with null proto objects.\n/* eslint-disable no-proto */\nvar isObject = __webpack_require__(/*! ./_is-object */ 75)\n , anObject = __webpack_require__(/*! ./_an-object */ 72);\nvar check = function(O, proto){\n anObject(O);\n if(!isObject(proto) && proto !== null)throw TypeError(proto + \": can't set as prototype!\");\n};\nmodule.exports = {\n set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line\n function(test, buggy, set){\n try {\n set = __webpack_require__(/*! ./_ctx */ 93)(Function.call, __webpack_require__(/*! ./_object-gopd */ 325).f(Object.prototype, '__proto__').set, 2);\n set(test, []);\n buggy = !(test instanceof Array);\n } catch(e){ buggy = true; }\n return function setPrototypeOf(O, proto){\n check(O, proto);\n if(buggy)O.__proto__ = proto;\n else set(O, proto);\n return O;\n };\n }({}, false) : undefined),\n check: check\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_set-proto.js\n// module id = 940\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/_set-proto.js?", + ); + + /***/ + }, + /* 941 */ + /* unknown exports provided */ + /* all exports used */ + /*!***************************************************!*\ + !*** ./~/core-js/library/modules/_set-species.js ***! + \***************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\nvar global = __webpack_require__(/*! ./_global */ 53)\n , core = __webpack_require__(/*! ./_core */ 30)\n , dP = __webpack_require__(/*! ./_object-dp */ 46)\n , DESCRIPTORS = __webpack_require__(/*! ./_descriptors */ 52)\n , SPECIES = __webpack_require__(/*! ./_wks */ 39)('species');\n\nmodule.exports = function(KEY){\n var C = typeof core[KEY] == 'function' ? core[KEY] : global[KEY];\n if(DESCRIPTORS && C && !C[SPECIES])dP.f(C, SPECIES, {\n configurable: true,\n get: function(){ return this; }\n });\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_set-species.js\n// module id = 941\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/_set-species.js?", + ); + + /***/ + }, + /* 942 */ + /* unknown exports provided */ + /* all exports used */ + /*!*************************************************!*\ + !*** ./~/core-js/library/modules/_string-at.js ***! + \*************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "var toInteger = __webpack_require__(/*! ./_to-integer */ 205)\n , defined = __webpack_require__(/*! ./_defined */ 149);\n// true -> String#at\n// false -> String#codePointAt\nmodule.exports = function(TO_STRING){\n return function(that, pos){\n var s = String(defined(that))\n , i = toInteger(pos)\n , l = s.length\n , a, b;\n if(i < 0 || i >= l)return TO_STRING ? '' : undefined;\n a = s.charCodeAt(i);\n return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff\n ? TO_STRING ? s.charAt(i) : a\n : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;\n };\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_string-at.js\n// module id = 942\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/_string-at.js?", + ); + + /***/ + }, + /* 943 */ + /* unknown exports provided */ + /* all exports used */ + /*!************************************************!*\ + !*** ./~/core-js/library/modules/_to-index.js ***! + \************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + 'var toInteger = __webpack_require__(/*! ./_to-integer */ 205)\n , max = Math.max\n , min = Math.min;\nmodule.exports = function(index, length){\n index = toInteger(index);\n return index < 0 ? max(index + length, 0) : min(index, length);\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_to-index.js\n// module id = 943\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/_to-index.js?', + ); + + /***/ + }, + /* 944 */ + /* unknown exports provided */ + /* all exports used */ + /*!*****************************************************!*\ + !*** ./~/core-js/library/modules/es6.array.from.js ***! + \*****************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\nvar ctx = __webpack_require__(/*! ./_ctx */ 93)\n , $export = __webpack_require__(/*! ./_export */ 38)\n , toObject = __webpack_require__(/*! ./_to-object */ 113)\n , call = __webpack_require__(/*! ./_iter-call */ 323)\n , isArrayIter = __webpack_require__(/*! ./_is-array-iter */ 321)\n , toLength = __webpack_require__(/*! ./_to-length */ 152)\n , createProperty = __webpack_require__(/*! ./_create-property */ 929)\n , getIterFn = __webpack_require__(/*! ./core.get-iterator-method */ 331);\n\n$export($export.S + $export.F * !__webpack_require__(/*! ./_iter-detect */ 933)(function(iter){ Array.from(iter); }), 'Array', {\n // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined)\n from: function from(arrayLike/*, mapfn = undefined, thisArg = undefined*/){\n var O = toObject(arrayLike)\n , C = typeof this == 'function' ? this : Array\n , aLen = arguments.length\n , mapfn = aLen > 1 ? arguments[1] : undefined\n , mapping = mapfn !== undefined\n , index = 0\n , iterFn = getIterFn(O)\n , length, result, step, iterator;\n if(mapping)mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2);\n // if object isn't iterable or it's array with default iterator - use simple case\n if(iterFn != undefined && !(C == Array && isArrayIter(iterFn))){\n for(iterator = iterFn.call(O), result = new C; !(step = iterator.next()).done; index++){\n createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value);\n }\n } else {\n length = toLength(O.length);\n for(result = new C(length); length > index; index++){\n createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]);\n }\n }\n result.length = index;\n return result;\n }\n});\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/es6.array.from.js\n// module id = 944\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/es6.array.from.js?", + ); + + /***/ + }, + /* 945 */ + /* unknown exports provided */ + /* all exports used */ + /*!*********************************************************!*\ + !*** ./~/core-js/library/modules/es6.array.iterator.js ***! + \*********************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\nvar addToUnscopables = __webpack_require__(/*! ./_add-to-unscopables */ 920)\n , step = __webpack_require__(/*! ./_iter-step */ 324)\n , Iterators = __webpack_require__(/*! ./_iterators */ 110)\n , toIObject = __webpack_require__(/*! ./_to-iobject */ 64);\n\n// 22.1.3.4 Array.prototype.entries()\n// 22.1.3.13 Array.prototype.keys()\n// 22.1.3.29 Array.prototype.values()\n// 22.1.3.30 Array.prototype[@@iterator]()\nmodule.exports = __webpack_require__(/*! ./_iter-define */ 199)(Array, 'Array', function(iterated, kind){\n this._t = toIObject(iterated); // target\n this._i = 0; // next index\n this._k = kind; // kind\n// 22.1.5.2.1 %ArrayIteratorPrototype%.next()\n}, function(){\n var O = this._t\n , kind = this._k\n , index = this._i++;\n if(!O || index >= O.length){\n this._t = undefined;\n return step(1);\n }\n if(kind == 'keys' )return step(0, index);\n if(kind == 'values')return step(0, O[index]);\n return step(0, [index, O[index]]);\n}, 'values');\n\n// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)\nIterators.Arguments = Iterators.Array;\n\naddToUnscopables('keys');\naddToUnscopables('values');\naddToUnscopables('entries');\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/es6.array.iterator.js\n// module id = 945\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/es6.array.iterator.js?", + ); + + /***/ + }, + /* 946 */ + /* unknown exports provided */ + /* all exports used */ + /*!**********************************************!*\ + !*** ./~/core-js/library/modules/es6.map.js ***! + \**********************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\nvar strong = __webpack_require__(/*! ./_collection-strong */ 926);\n\n// 23.1 Map Objects\nmodule.exports = __webpack_require__(/*! ./_collection */ 928)('Map', function(get){\n return function Map(){ return get(this, arguments.length > 0 ? arguments[0] : undefined); };\n}, {\n // 23.1.3.6 Map.prototype.get(key)\n get: function get(key){\n var entry = strong.getEntry(this, key);\n return entry && entry.v;\n },\n // 23.1.3.9 Map.prototype.set(key, value)\n set: function set(key, value){\n return strong.def(this, key === 0 ? 0 : key, value);\n }\n}, strong, true);\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/es6.map.js\n// module id = 946\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/es6.map.js?", + ); + + /***/ + }, + /* 947 */ + /* unknown exports provided */ + /* all exports used */ + /*!********************************************************!*\ + !*** ./~/core-js/library/modules/es6.object.assign.js ***! + \********************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "// 19.1.3.1 Object.assign(target, source)\nvar $export = __webpack_require__(/*! ./_export */ 38);\n\n$export($export.S + $export.F, 'Object', {assign: __webpack_require__(/*! ./_object-assign */ 935)});\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/es6.object.assign.js\n// module id = 947\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/es6.object.assign.js?", + ); + + /***/ + }, + /* 948 */ + /* unknown exports provided */ + /* all exports used */ + /*!********************************************************!*\ + !*** ./~/core-js/library/modules/es6.object.create.js ***! + \********************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "var $export = __webpack_require__(/*! ./_export */ 38)\n// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])\n$export($export.S, 'Object', {create: __webpack_require__(/*! ./_object-create */ 150)});\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/es6.object.create.js\n// module id = 948\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/es6.object.create.js?", + ); + + /***/ + }, + /* 949 */ + /* unknown exports provided */ + /* all exports used */ + /*!*****************************************************************!*\ + !*** ./~/core-js/library/modules/es6.object.define-property.js ***! + \*****************************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "var $export = __webpack_require__(/*! ./_export */ 38);\n// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes)\n$export($export.S + $export.F * !__webpack_require__(/*! ./_descriptors */ 52), 'Object', {defineProperty: __webpack_require__(/*! ./_object-dp */ 46).f});\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/es6.object.define-property.js\n// module id = 949\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/es6.object.define-property.js?", + ); + + /***/ + }, + /* 950 */ + /* unknown exports provided */ + /* all exports used */ + /*!******************************************************!*\ + !*** ./~/core-js/library/modules/es6.object.keys.js ***! + \******************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "// 19.1.2.14 Object.keys(O)\nvar toObject = __webpack_require__(/*! ./_to-object */ 113)\n , $keys = __webpack_require__(/*! ./_object-keys */ 76);\n\n__webpack_require__(/*! ./_object-sap */ 939)('keys', function(){\n return function keys(it){\n return $keys(toObject(it));\n };\n});\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/es6.object.keys.js\n// module id = 950\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/es6.object.keys.js?", + ); + + /***/ + }, + /* 951 */ + /* unknown exports provided */ + /* all exports used */ + /*!******************************************************************!*\ + !*** ./~/core-js/library/modules/es6.object.set-prototype-of.js ***! + \******************************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "// 19.1.3.19 Object.setPrototypeOf(O, proto)\nvar $export = __webpack_require__(/*! ./_export */ 38);\n$export($export.S, 'Object', {setPrototypeOf: __webpack_require__(/*! ./_set-proto */ 940).set});\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/es6.object.set-prototype-of.js\n// module id = 951\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/es6.object.set-prototype-of.js?", + ); + + /***/ + }, + /* 952 */ + /* unknown exports provided */ + /* all exports used */ + /*!*************************************************!*\ + !*** ./~/core-js/library/modules/es6.symbol.js ***! + \*************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n// ECMAScript 6 symbols shim\nvar global = __webpack_require__(/*! ./_global */ 53)\n , has = __webpack_require__(/*! ./_has */ 74)\n , DESCRIPTORS = __webpack_require__(/*! ./_descriptors */ 52)\n , $export = __webpack_require__(/*! ./_export */ 38)\n , redefine = __webpack_require__(/*! ./_redefine */ 330)\n , META = __webpack_require__(/*! ./_meta */ 201).KEY\n , $fails = __webpack_require__(/*! ./_fails */ 73)\n , shared = __webpack_require__(/*! ./_shared */ 204)\n , setToStringTag = __webpack_require__(/*! ./_set-to-string-tag */ 151)\n , uid = __webpack_require__(/*! ./_uid */ 153)\n , wks = __webpack_require__(/*! ./_wks */ 39)\n , wksExt = __webpack_require__(/*! ./_wks-ext */ 208)\n , wksDefine = __webpack_require__(/*! ./_wks-define */ 207)\n , keyOf = __webpack_require__(/*! ./_keyof */ 934)\n , enumKeys = __webpack_require__(/*! ./_enum-keys */ 930)\n , isArray = __webpack_require__(/*! ./_is-array */ 322)\n , anObject = __webpack_require__(/*! ./_an-object */ 72)\n , toIObject = __webpack_require__(/*! ./_to-iobject */ 64)\n , toPrimitive = __webpack_require__(/*! ./_to-primitive */ 206)\n , createDesc = __webpack_require__(/*! ./_property-desc */ 112)\n , _create = __webpack_require__(/*! ./_object-create */ 150)\n , gOPNExt = __webpack_require__(/*! ./_object-gopn-ext */ 937)\n , $GOPD = __webpack_require__(/*! ./_object-gopd */ 325)\n , $DP = __webpack_require__(/*! ./_object-dp */ 46)\n , $keys = __webpack_require__(/*! ./_object-keys */ 76)\n , gOPD = $GOPD.f\n , dP = $DP.f\n , gOPN = gOPNExt.f\n , $Symbol = global.Symbol\n , $JSON = global.JSON\n , _stringify = $JSON && $JSON.stringify\n , PROTOTYPE = 'prototype'\n , HIDDEN = wks('_hidden')\n , TO_PRIMITIVE = wks('toPrimitive')\n , isEnum = {}.propertyIsEnumerable\n , SymbolRegistry = shared('symbol-registry')\n , AllSymbols = shared('symbols')\n , OPSymbols = shared('op-symbols')\n , ObjectProto = Object[PROTOTYPE]\n , USE_NATIVE = typeof $Symbol == 'function'\n , QObject = global.QObject;\n// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173\nvar setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;\n\n// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687\nvar setSymbolDesc = DESCRIPTORS && $fails(function(){\n return _create(dP({}, 'a', {\n get: function(){ return dP(this, 'a', {value: 7}).a; }\n })).a != 7;\n}) ? function(it, key, D){\n var protoDesc = gOPD(ObjectProto, key);\n if(protoDesc)delete ObjectProto[key];\n dP(it, key, D);\n if(protoDesc && it !== ObjectProto)dP(ObjectProto, key, protoDesc);\n} : dP;\n\nvar wrap = function(tag){\n var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]);\n sym._k = tag;\n return sym;\n};\n\nvar isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function(it){\n return typeof it == 'symbol';\n} : function(it){\n return it instanceof $Symbol;\n};\n\nvar $defineProperty = function defineProperty(it, key, D){\n if(it === ObjectProto)$defineProperty(OPSymbols, key, D);\n anObject(it);\n key = toPrimitive(key, true);\n anObject(D);\n if(has(AllSymbols, key)){\n if(!D.enumerable){\n if(!has(it, HIDDEN))dP(it, HIDDEN, createDesc(1, {}));\n it[HIDDEN][key] = true;\n } else {\n if(has(it, HIDDEN) && it[HIDDEN][key])it[HIDDEN][key] = false;\n D = _create(D, {enumerable: createDesc(0, false)});\n } return setSymbolDesc(it, key, D);\n } return dP(it, key, D);\n};\nvar $defineProperties = function defineProperties(it, P){\n anObject(it);\n var keys = enumKeys(P = toIObject(P))\n , i = 0\n , l = keys.length\n , key;\n while(l > i)$defineProperty(it, key = keys[i++], P[key]);\n return it;\n};\nvar $create = function create(it, P){\n return P === undefined ? _create(it) : $defineProperties(_create(it), P);\n};\nvar $propertyIsEnumerable = function propertyIsEnumerable(key){\n var E = isEnum.call(this, key = toPrimitive(key, true));\n if(this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key))return false;\n return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true;\n};\nvar $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key){\n it = toIObject(it);\n key = toPrimitive(key, true);\n if(it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key))return;\n var D = gOPD(it, key);\n if(D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key]))D.enumerable = true;\n return D;\n};\nvar $getOwnPropertyNames = function getOwnPropertyNames(it){\n var names = gOPN(toIObject(it))\n , result = []\n , i = 0\n , key;\n while(names.length > i){\n if(!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META)result.push(key);\n } return result;\n};\nvar $getOwnPropertySymbols = function getOwnPropertySymbols(it){\n var IS_OP = it === ObjectProto\n , names = gOPN(IS_OP ? OPSymbols : toIObject(it))\n , result = []\n , i = 0\n , key;\n while(names.length > i){\n if(has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true))result.push(AllSymbols[key]);\n } return result;\n};\n\n// 19.4.1.1 Symbol([description])\nif(!USE_NATIVE){\n $Symbol = function Symbol(){\n if(this instanceof $Symbol)throw TypeError('Symbol is not a constructor!');\n var tag = uid(arguments.length > 0 ? arguments[0] : undefined);\n var $set = function(value){\n if(this === ObjectProto)$set.call(OPSymbols, value);\n if(has(this, HIDDEN) && has(this[HIDDEN], tag))this[HIDDEN][tag] = false;\n setSymbolDesc(this, tag, createDesc(1, value));\n };\n if(DESCRIPTORS && setter)setSymbolDesc(ObjectProto, tag, {configurable: true, set: $set});\n return wrap(tag);\n };\n redefine($Symbol[PROTOTYPE], 'toString', function toString(){\n return this._k;\n });\n\n $GOPD.f = $getOwnPropertyDescriptor;\n $DP.f = $defineProperty;\n __webpack_require__(/*! ./_object-gopn */ 326).f = gOPNExt.f = $getOwnPropertyNames;\n __webpack_require__(/*! ./_object-pie */ 111).f = $propertyIsEnumerable;\n __webpack_require__(/*! ./_object-gops */ 202).f = $getOwnPropertySymbols;\n\n if(DESCRIPTORS && !__webpack_require__(/*! ./_library */ 200)){\n redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);\n }\n\n wksExt.f = function(name){\n return wrap(wks(name));\n }\n}\n\n$export($export.G + $export.W + $export.F * !USE_NATIVE, {Symbol: $Symbol});\n\nfor(var symbols = (\n // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14\n 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'\n).split(','), i = 0; symbols.length > i; )wks(symbols[i++]);\n\nfor(var symbols = $keys(wks.store), i = 0; symbols.length > i; )wksDefine(symbols[i++]);\n\n$export($export.S + $export.F * !USE_NATIVE, 'Symbol', {\n // 19.4.2.1 Symbol.for(key)\n 'for': function(key){\n return has(SymbolRegistry, key += '')\n ? SymbolRegistry[key]\n : SymbolRegistry[key] = $Symbol(key);\n },\n // 19.4.2.5 Symbol.keyFor(sym)\n keyFor: function keyFor(key){\n if(isSymbol(key))return keyOf(SymbolRegistry, key);\n throw TypeError(key + ' is not a symbol!');\n },\n useSetter: function(){ setter = true; },\n useSimple: function(){ setter = false; }\n});\n\n$export($export.S + $export.F * !USE_NATIVE, 'Object', {\n // 19.1.2.2 Object.create(O [, Properties])\n create: $create,\n // 19.1.2.4 Object.defineProperty(O, P, Attributes)\n defineProperty: $defineProperty,\n // 19.1.2.3 Object.defineProperties(O, Properties)\n defineProperties: $defineProperties,\n // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)\n getOwnPropertyDescriptor: $getOwnPropertyDescriptor,\n // 19.1.2.7 Object.getOwnPropertyNames(O)\n getOwnPropertyNames: $getOwnPropertyNames,\n // 19.1.2.8 Object.getOwnPropertySymbols(O)\n getOwnPropertySymbols: $getOwnPropertySymbols\n});\n\n// 24.3.2 JSON.stringify(value [, replacer [, space]])\n$JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function(){\n var S = $Symbol();\n // MS Edge converts symbol values to JSON as {}\n // WebKit converts symbol values to JSON as null\n // V8 throws on boxed symbols\n return _stringify([S]) != '[null]' || _stringify({a: S}) != '{}' || _stringify(Object(S)) != '{}';\n})), 'JSON', {\n stringify: function stringify(it){\n if(it === undefined || isSymbol(it))return; // IE8 returns string on undefined\n var args = [it]\n , i = 1\n , replacer, $replacer;\n while(arguments.length > i)args.push(arguments[i++]);\n replacer = args[1];\n if(typeof replacer == 'function')$replacer = replacer;\n if($replacer || !isArray(replacer))replacer = function(key, value){\n if($replacer)value = $replacer.call(this, key, value);\n if(!isSymbol(value))return value;\n };\n args[1] = replacer;\n return _stringify.apply($JSON, args);\n }\n});\n\n// 19.4.3.4 Symbol.prototype[@@toPrimitive](hint)\n$Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(/*! ./_hide */ 63)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);\n// 19.4.3.5 Symbol.prototype[@@toStringTag]\nsetToStringTag($Symbol, 'Symbol');\n// 20.2.1.9 Math[@@toStringTag]\nsetToStringTag(Math, 'Math', true);\n// 24.3.3 JSON[@@toStringTag]\nsetToStringTag(global.JSON, 'JSON', true);\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/es6.symbol.js\n// module id = 952\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/es6.symbol.js?", + ); + + /***/ + }, + /* 953 */ + /* unknown exports provided */ + /* all exports used */ + /*!******************************************************!*\ + !*** ./~/core-js/library/modules/es7.map.to-json.js ***! + \******************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "// https://github.com/DavidBruant/Map-Set.prototype.toJSON\nvar $export = __webpack_require__(/*! ./_export */ 38);\n\n$export($export.P + $export.R, 'Map', {toJSON: __webpack_require__(/*! ./_collection-to-json */ 927)('Map')});\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/es7.map.to-json.js\n// module id = 953\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/es7.map.to-json.js?", + ); + + /***/ + }, + /* 954 */ + /* unknown exports provided */ + /* all exports used */ + /*!*********************************************************!*\ + !*** ./~/core-js/library/modules/es7.object.entries.js ***! + \*********************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "// https://github.com/tc39/proposal-object-values-entries\nvar $export = __webpack_require__(/*! ./_export */ 38)\n , $entries = __webpack_require__(/*! ./_object-to-array */ 328)(true);\n\n$export($export.S, 'Object', {\n entries: function entries(it){\n return $entries(it);\n }\n});\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/es7.object.entries.js\n// module id = 954\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/es7.object.entries.js?", + ); + + /***/ + }, + /* 955 */ + /* unknown exports provided */ + /* all exports used */ + /*!********************************************************!*\ + !*** ./~/core-js/library/modules/es7.object.values.js ***! + \********************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "// https://github.com/tc39/proposal-object-values-entries\nvar $export = __webpack_require__(/*! ./_export */ 38)\n , $values = __webpack_require__(/*! ./_object-to-array */ 328)(false);\n\n$export($export.S, 'Object', {\n values: function values(it){\n return $values(it);\n }\n});\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/es7.object.values.js\n// module id = 955\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/es7.object.values.js?", + ); + + /***/ + }, + /* 956 */ + /* unknown exports provided */ + /* all exports used */ + /*!****************************************************************!*\ + !*** ./~/core-js/library/modules/es7.symbol.async-iterator.js ***! + \****************************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "__webpack_require__(/*! ./_wks-define */ 207)('asyncIterator');\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/es7.symbol.async-iterator.js\n// module id = 956\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/es7.symbol.async-iterator.js?", + ); + + /***/ + }, + /* 957 */ + /* unknown exports provided */ + /* all exports used */ + /*!************************************************************!*\ + !*** ./~/core-js/library/modules/es7.symbol.observable.js ***! + \************************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "__webpack_require__(/*! ./_wks-define */ 207)('observable');\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/es7.symbol.observable.js\n// module id = 957\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/core-js/library/modules/es7.symbol.observable.js?", + ); + + /***/ + }, + /* 958 */ + /* unknown exports provided */ + /* all exports used */ + /*!**************************************!*\ + !*** ./~/css-animation/lib/Event.js ***! + \**************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar EVENT_NAME_MAP = {\n transitionend: {\n transition: 'transitionend',\n WebkitTransition: 'webkitTransitionEnd',\n MozTransition: 'mozTransitionEnd',\n OTransition: 'oTransitionEnd',\n msTransition: 'MSTransitionEnd'\n },\n\n animationend: {\n animation: 'animationend',\n WebkitAnimation: 'webkitAnimationEnd',\n MozAnimation: 'mozAnimationEnd',\n OAnimation: 'oAnimationEnd',\n msAnimation: 'MSAnimationEnd'\n }\n};\n\nvar endEvents = [];\n\nfunction detectEvents() {\n var testEl = document.createElement('div');\n var style = testEl.style;\n\n if (!('AnimationEvent' in window)) {\n delete EVENT_NAME_MAP.animationend.animation;\n }\n\n if (!('TransitionEvent' in window)) {\n delete EVENT_NAME_MAP.transitionend.transition;\n }\n\n for (var baseEventName in EVENT_NAME_MAP) {\n if (EVENT_NAME_MAP.hasOwnProperty(baseEventName)) {\n var baseEvents = EVENT_NAME_MAP[baseEventName];\n for (var styleName in baseEvents) {\n if (styleName in style) {\n endEvents.push(baseEvents[styleName]);\n break;\n }\n }\n }\n }\n}\n\nif (typeof window !== 'undefined' && typeof document !== 'undefined') {\n detectEvents();\n}\n\nfunction addEventListener(node, eventName, eventListener) {\n node.addEventListener(eventName, eventListener, false);\n}\n\nfunction removeEventListener(node, eventName, eventListener) {\n node.removeEventListener(eventName, eventListener, false);\n}\n\nvar TransitionEvents = {\n addEndEventListener: function addEndEventListener(node, eventListener) {\n if (endEvents.length === 0) {\n window.setTimeout(eventListener, 0);\n return;\n }\n endEvents.forEach(function (endEvent) {\n addEventListener(node, endEvent, eventListener);\n });\n },\n\n\n endEvents: endEvents,\n\n removeEndEventListener: function removeEndEventListener(node, eventListener) {\n if (endEvents.length === 0) {\n return;\n }\n endEvents.forEach(function (endEvent) {\n removeEventListener(node, endEvent, eventListener);\n });\n }\n};\n\nexports[\"default\"] = TransitionEvents;\nmodule.exports = exports['default'];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/css-animation/lib/Event.js\n// module id = 958\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/css-animation/lib/Event.js?", + ); + + /***/ + }, + /* 959 */ + /* unknown exports provided */ + /* all exports used */ + /*!**************************************!*\ + !*** ./~/css-animation/lib/index.js ***! + \**************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol ? \"symbol\" : typeof obj; };\n\nvar _Event = __webpack_require__(/*! ./Event */ 958);\n\nvar _Event2 = _interopRequireDefault(_Event);\n\nvar _componentClasses = __webpack_require__(/*! component-classes */ 906);\n\nvar _componentClasses2 = _interopRequireDefault(_componentClasses);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nvar isCssAnimationSupported = _Event2[\"default\"].endEvents.length !== 0;\n\n\nvar capitalPrefixes = ['Webkit', 'Moz', 'O',\n// ms is special .... !\n'ms'];\nvar prefixes = ['-webkit-', '-moz-', '-o-', 'ms-', ''];\n\nfunction getStyleProperty(node, name) {\n var style = window.getComputedStyle(node);\n\n var ret = '';\n for (var i = 0; i < prefixes.length; i++) {\n ret = style.getPropertyValue(prefixes[i] + name);\n if (ret) {\n break;\n }\n }\n return ret;\n}\n\nfunction fixBrowserByTimeout(node) {\n if (isCssAnimationSupported) {\n var transitionDelay = parseFloat(getStyleProperty(node, 'transition-delay')) || 0;\n var transitionDuration = parseFloat(getStyleProperty(node, 'transition-duration')) || 0;\n var animationDelay = parseFloat(getStyleProperty(node, 'animation-delay')) || 0;\n var animationDuration = parseFloat(getStyleProperty(node, 'animation-duration')) || 0;\n var time = Math.max(transitionDuration + transitionDelay, animationDuration + animationDelay);\n // sometimes, browser bug\n node.rcEndAnimTimeout = setTimeout(function () {\n node.rcEndAnimTimeout = null;\n if (node.rcEndListener) {\n node.rcEndListener();\n }\n }, time * 1000 + 200);\n }\n}\n\nfunction clearBrowserBugTimeout(node) {\n if (node.rcEndAnimTimeout) {\n clearTimeout(node.rcEndAnimTimeout);\n node.rcEndAnimTimeout = null;\n }\n}\n\nvar cssAnimation = function cssAnimation(node, transitionName, endCallback) {\n var nameIsObj = (typeof transitionName === 'undefined' ? 'undefined' : _typeof(transitionName)) === 'object';\n var className = nameIsObj ? transitionName.name : transitionName;\n var activeClassName = nameIsObj ? transitionName.active : transitionName + '-active';\n var end = endCallback;\n var start = void 0;\n var active = void 0;\n var nodeClasses = (0, _componentClasses2[\"default\"])(node);\n\n if (endCallback && Object.prototype.toString.call(endCallback) === '[object Object]') {\n end = endCallback.end;\n start = endCallback.start;\n active = endCallback.active;\n }\n\n if (node.rcEndListener) {\n node.rcEndListener();\n }\n\n node.rcEndListener = function (e) {\n if (e && e.target !== node) {\n return;\n }\n\n if (node.rcAnimTimeout) {\n clearTimeout(node.rcAnimTimeout);\n node.rcAnimTimeout = null;\n }\n\n clearBrowserBugTimeout(node);\n\n nodeClasses.remove(className);\n nodeClasses.remove(activeClassName);\n\n _Event2[\"default\"].removeEndEventListener(node, node.rcEndListener);\n node.rcEndListener = null;\n\n // Usually this optional end is used for informing an owner of\n // a leave animation and telling it to remove the child.\n if (end) {\n end();\n }\n };\n\n _Event2[\"default\"].addEndEventListener(node, node.rcEndListener);\n\n if (start) {\n start();\n }\n nodeClasses.add(className);\n\n node.rcAnimTimeout = setTimeout(function () {\n node.rcAnimTimeout = null;\n nodeClasses.add(activeClassName);\n if (active) {\n setTimeout(active, 0);\n }\n fixBrowserByTimeout(node);\n // 30ms for firefox\n }, 30);\n\n return {\n stop: function stop() {\n if (node.rcEndListener) {\n node.rcEndListener();\n }\n }\n };\n};\n\ncssAnimation.style = function (node, style, callback) {\n if (node.rcEndListener) {\n node.rcEndListener();\n }\n\n node.rcEndListener = function (e) {\n if (e && e.target !== node) {\n return;\n }\n\n if (node.rcAnimTimeout) {\n clearTimeout(node.rcAnimTimeout);\n node.rcAnimTimeout = null;\n }\n\n clearBrowserBugTimeout(node);\n\n _Event2[\"default\"].removeEndEventListener(node, node.rcEndListener);\n node.rcEndListener = null;\n\n // Usually this optional callback is used for informing an owner of\n // a leave animation and telling it to remove the child.\n if (callback) {\n callback();\n }\n };\n\n _Event2[\"default\"].addEndEventListener(node, node.rcEndListener);\n\n node.rcAnimTimeout = setTimeout(function () {\n for (var s in style) {\n if (style.hasOwnProperty(s)) {\n node.style[s] = style[s];\n }\n }\n node.rcAnimTimeout = null;\n fixBrowserByTimeout(node);\n }, 0);\n};\n\ncssAnimation.setTransition = function (node, p, value) {\n var property = p;\n var v = value;\n if (value === undefined) {\n v = property;\n property = '';\n }\n property = property || '';\n capitalPrefixes.forEach(function (prefix) {\n node.style[prefix + 'Transition' + property] = v;\n });\n};\n\ncssAnimation.isCssAnimationSupported = isCssAnimationSupported;\n\nexports[\"default\"] = cssAnimation;\nmodule.exports = exports['default'];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/css-animation/lib/index.js\n// module id = 959\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/css-animation/lib/index.js?", + ); + + /***/ + }, + /* 960 */ + /* unknown exports provided */ + /*!***********************************************!*\ + !*** ./app/assets/styles/globals/places.scss ***! + \***********************************************/ + /***/ function (module, exports) { + eval( + '\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/assets/styles/globals/places.scss\n// module id = 960\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/assets/styles/globals/places.scss?', + ); + + /***/ + }, + /* 961 */ + /* unknown exports provided */ + /*!***********************************************************!*\ + !*** ./app/assets/styles/vendor/rc-slider/rc-slider.scss ***! + \***********************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"rcSliderTooltipZoomDownIn": "rc-slider__rcSliderTooltipZoomDownIn__1Q3dk",\n\t"rcSliderTooltipZoomDownOut": "rc-slider__rcSliderTooltipZoomDownOut__1ZZgC"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/assets/styles/vendor/rc-slider/rc-slider.scss\n// module id = 961\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/assets/styles/vendor/rc-slider/rc-slider.scss?', + ); + + /***/ + }, + /* 962 */ + /* unknown exports provided */ + /* exports used: default */ + /*!*********************************************************************!*\ + !*** ./app/bundles/layout-navbar/components/Dropdown/Dropdown.scss ***! + \*********************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"Dropdown": "Dropdown__Dropdown__uWB6y"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/layout-navbar/components/Dropdown/Dropdown.scss\n// module id = 962\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/layout-navbar/components/Dropdown/Dropdown.scss?', + ); + + /***/ + }, + /* 963 */ + /* unknown exports provided */ + /* exports used: default */ + /*!*****************************************************************************!*\ + !*** ./app/bundles/layout-navbar/components/DropdownItem/DropdownItem.scss ***! + \*****************************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"DropdownItem": "DropdownItem__DropdownItem__3gkBv",\n\t"label": "DropdownItem__label__2CZuR",\n\t"count": "DropdownItem__count__NQpmz"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/layout-navbar/components/DropdownItem/DropdownItem.scss\n// module id = 963\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/layout-navbar/components/DropdownItem/DropdownItem.scss?', + ); + + /***/ + }, + /* 964 */ + /* unknown exports provided */ + /* exports used: default */ + /*!*******************************************************************************!*\ + !*** ./app/bundles/layout-navbar/components/DropdownTitle/DropdownTitle.scss ***! + \*******************************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"DropdownTitle": "DropdownTitle__DropdownTitle__335Yd",\n\t"iconWrapper": "DropdownTitle__iconWrapper__VPBLY",\n\t"icon": "DropdownTitle__icon__1SAEs",\n\t"icon__marginRight": "DropdownTitle__icon__marginRight__2hdvX",\n\t"badge": "DropdownTitle__badge__16qaa",\n\t"mobileMenuCount": "DropdownTitle__mobileMenuCount__20i2L"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/layout-navbar/components/DropdownTitle/DropdownTitle.scss\n// module id = 964\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/layout-navbar/components/DropdownTitle/DropdownTitle.scss?', + ); + + /***/ + }, + /* 965 */ + /* unknown exports provided */ + /* exports used: default */ + /*!*******************************************************************!*\ + !*** ./app/bundles/layout-navbar/components/NavItem/NavItem.scss ***! + \*******************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"NavItem": "NavItem__NavItem__34yz0",\n\t"badge": "NavItem__badge__AcySK",\n\t"iconWrapper": "NavItem__iconWrapper__ZQEkT",\n\t"icon": "NavItem__icon__3iWud",\n\t"icon__marginRight": "NavItem__icon__marginRight__1kyNA",\n\t"name__marginLeft": "NavItem__name__marginLeft__2l46j",\n\t"mobileMenuCount": "NavItem__mobileMenuCount__2ICKe"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/layout-navbar/components/NavItem/NavItem.scss\n// module id = 965\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/layout-navbar/components/NavItem/NavItem.scss?', + ); + + /***/ + }, + /* 966 */ + /* unknown exports provided */ + /* exports used: default */ + /*!*****************************************************************!*\ + !*** ./app/bundles/layout-navbar/components/Navbar/Navbar.scss ***! + \*****************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"icon": "Navbar__icon__2eHkm",\n\t"iconSearchWrapper": "Navbar__iconSearchWrapper__2KXMJ",\n\t"fieldSearch": "Navbar__fieldSearch__1I0yr",\n\t"navbar": "Navbar__navbar__TPlmh",\n\t"fixed": "Navbar__fixed__2RWSh",\n\t"iconLogoFull": "Navbar__iconLogoFull__2eNfV",\n\t"logoClassName": "Navbar__logoClassName__2H5KJ",\n\t"textClassName": "Navbar__textClassName__19c_N"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/layout-navbar/components/Navbar/Navbar.scss\n// module id = 966\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/layout-navbar/components/Navbar/Navbar.scss?', + ); + + /***/ + }, + /* 967 */ + /* unknown exports provided */ + /* exports used: default */ + /*!******************************************************************************!*\ + !*** ./app/bundles/layout-navbar/components/RightSideSignedIn/UserMenu.scss ***! + \******************************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"userAvatar": "UserMenu__userAvatar__2qljl",\n\t"name": "UserMenu__name__hFPEK"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/layout-navbar/components/RightSideSignedIn/UserMenu.scss\n// module id = 967\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/layout-navbar/components/RightSideSignedIn/UserMenu.scss?', + ); + + /***/ + }, + /* 968 */ + /* unknown exports provided */ + /* exports used: default */ + /*!**********************************************************************************************************************!*\ + !*** ./app/bundles/listings-index/components/ListingResultsMap/ListingResultsMapMarker/ListingResultsMapMarker.scss ***! + \**********************************************************************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"listingResultsMapMarkerHover": "ListingResultsMapMarker__listingResultsMapMarkerHover__14O2Q",\n\t"arrow": "ListingResultsMapMarker__arrow__2tOQ1",\n\t"listingResultsMapMarker_public_guest": "ListingResultsMapMarker__listingResultsMapMarker_public_guest__3pjmZ",\n\t"listingResultsMapMarker_membership": "ListingResultsMapMarker__listingResultsMapMarker_membership__kOqRJ",\n\t"listingResultsMapMarker_fb_friend": "ListingResultsMapMarker__listingResultsMapMarker_fb_friend__fV9bg",\n\t"listingResultsMapMarker_owner": "ListingResultsMapMarker__listingResultsMapMarker_owner__2Zz3H",\n\t"privatePrice": "ListingResultsMapMarker__privatePrice__39XwY"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-index/components/ListingResultsMap/ListingResultsMapMarker/ListingResultsMapMarker.scss\n// module id = 968\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-index/components/ListingResultsMap/ListingResultsMapMarker/ListingResultsMapMarker.scss?', + ); + + /***/ + }, + /* 969 */ + /* unknown exports provided */ + /* exports used: default */ + /*!************************************************************************************************************************!*\ + !*** ./app/bundles/listings-index/components/ListingResultsMap/ListingResultsMapOverlay/ListingResultsMapOverlay.scss ***! + \************************************************************************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"listingResultsMapOverlay": "ListingResultsMapOverlay__listingResultsMapOverlay__go8Lf",\n\t"arrow": "ListingResultsMapOverlay__arrow__3gmx4",\n\t"tileCommon": "ListingResultsMapOverlay__tileCommon__1HLJ0",\n\t"tileFirst": "ListingResultsMapOverlay__tileFirst__3RNEv ListingResultsMapOverlay__tileCommon__1HLJ0",\n\t"tile": "ListingResultsMapOverlay__tile__2qWj_ ListingResultsMapOverlay__tileCommon__1HLJ0",\n\t"singleContainer": "ListingResultsMapOverlay__singleContainer__Ug2SA",\n\t"multiListingTitleCommon": "ListingResultsMapOverlay__multiListingTitleCommon__3Vly7",\n\t"multiListingTitle_public_guest": "ListingResultsMapOverlay__multiListingTitle_public_guest__1fVM4 ListingResultsMapOverlay__multiListingTitleCommon__3Vly7",\n\t"multiListingTitle_fb_friend": "ListingResultsMapOverlay__multiListingTitle_fb_friend__CW_Oe ListingResultsMapOverlay__multiListingTitleCommon__3Vly7",\n\t"multiListingTitle_membership": "ListingResultsMapOverlay__multiListingTitle_membership__1nL2F ListingResultsMapOverlay__multiListingTitleCommon__3Vly7",\n\t"multiContainer": "ListingResultsMapOverlay__multiContainer__2alMD",\n\t"multiContainerInnerCommon": "ListingResultsMapOverlay__multiContainerInnerCommon__1WBHS",\n\t"multiContainerInner_public_guest": "ListingResultsMapOverlay__multiContainerInner_public_guest__36CjJ ListingResultsMapOverlay__multiContainerInnerCommon__1WBHS",\n\t"multiContainerInner_fb_friend": "ListingResultsMapOverlay__multiContainerInner_fb_friend__2gs2n ListingResultsMapOverlay__multiContainerInnerCommon__1WBHS",\n\t"multiContainerInner_membership": "ListingResultsMapOverlay__multiContainerInner_membership__26drz ListingResultsMapOverlay__multiContainerInnerCommon__1WBHS"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-index/components/ListingResultsMap/ListingResultsMapOverlay/ListingResultsMapOverlay.scss\n// module id = 969\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-index/components/ListingResultsMap/ListingResultsMapOverlay/ListingResultsMapOverlay.scss?', + ); + + /***/ + }, + /* 970 */ + /* unknown exports provided */ + /* exports used: default */ + /*!************************************************************************************************************************************!*\ + !*** ./app/bundles/listings-index/components/ListingResultsMap/ListingResultsMapSearchControl/ListingResultsMapSearchControl.scss ***! + \************************************************************************************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"searchControlCommon": "ListingResultsMapSearchControl__searchControlCommon__NPHRS",\n\t"searchControlRedoSearch": "ListingResultsMapSearchControl__searchControlRedoSearch__2rHj5 ListingResultsMapSearchControl__searchControlCommon__NPHRS",\n\t"searchControl": "ListingResultsMapSearchControl__searchControl__1NMFu ListingResultsMapSearchControl__searchControlCommon__NPHRS",\n\t"toggleSearchLabel": "ListingResultsMapSearchControl__toggleSearchLabel__17CW7"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-index/components/ListingResultsMap/ListingResultsMapSearchControl/ListingResultsMapSearchControl.scss\n// module id = 970\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-index/components/ListingResultsMap/ListingResultsMapSearchControl/ListingResultsMapSearchControl.scss?', + ); + + /***/ + }, + /* 971 */ + /* unknown exports provided */ + /* exports used: default */ + /*!******************************************************************************************!*\ + !*** ./app/bundles/listings-index/components/ListingResultsPage/ListingResultsPage.scss ***! + \******************************************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"resultsTile": "ListingResultsPage__resultsTile__31NAg",\n\t"noListings": "ListingResultsPage__noListings__2friY"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-index/components/ListingResultsPage/ListingResultsPage.scss\n// module id = 971\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-index/components/ListingResultsPage/ListingResultsPage.scss?', + ); + + /***/ + }, + /* 972 */ + /* unknown exports provided */ + /* exports used: default */ + /*!********************************************************************************!*\ + !*** ./app/bundles/listings-index/components/ListingSearch/ListingSearch.scss ***! + \********************************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"resultsPage": "ListingSearch__resultsPage__245wr",\n\t"resultsMap": "ListingSearch__resultsMap__2_0GK",\n\t"listingSearch": "ListingSearch__listingSearch__2HLIA",\n\t"filters": "ListingSearch__filters__1xvSh",\n\t"results": "ListingSearch__results__2cX8n",\n\t"searchBox": "ListingSearch__searchBox__IH_ah",\n\t"searchIcon": "ListingSearch__searchIcon__16nvA",\n\t"resultsPageContainer": "ListingSearch__resultsPageContainer__XH4Sa",\n\t"resultsPageInner": "ListingSearch__resultsPageInner__2Uv2M",\n\t"resultsOverlay": "ListingSearch__resultsOverlay__NGvnk",\n\t"spinnerContainer": "ListingSearch__spinnerContainer__tJov8",\n\t"showOnMap": "ListingSearch__showOnMap__rBrjS"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-index/components/ListingSearch/ListingSearch.scss\n// module id = 972\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-index/components/ListingSearch/ListingSearch.scss?', + ); + + /***/ + }, + /* 973 */ + /* unknown exports provided */ + /* exports used: default */ + /*!**********************************************************************************************!*\ + !*** ./app/bundles/listings-index/components/ListingSearchFilters/ListingSearchFilters.scss ***! + \**********************************************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"rowSpaceSm": "ListingSearchFilters__rowSpaceSm__3RLgd",\n\t"centerSm": "ListingSearchFilters__centerSm__18DS1",\n\t"filtersCommon": "ListingSearchFilters__filtersCommon__21DLF",\n\t"filters": "ListingSearchFilters__filters__2J_l6 ListingSearchFilters__filtersCommon__21DLF",\n\t"filtersExpanded": "ListingSearchFilters__filtersExpanded__1fCGc ListingSearchFilters__filtersCommon__21DLF",\n\t"filterCategory": "ListingSearchFilters__filterCategory__3sFb_",\n\t"relationshipTypeHelp": "ListingSearchFilters__relationshipTypeHelp__3Iuth",\n\t"filterCategoryDivider": "ListingSearchFilters__filterCategoryDivider__3b245",\n\t"checkboxFilter": "ListingSearchFilters__checkboxFilter__3zorw",\n\t"amenitiesFirstRow": "ListingSearchFilters__amenitiesFirstRow__1uuFK",\n\t"actionBarCommon": "ListingSearchFilters__actionBarCommon__1n98k",\n\t"actionBar": "ListingSearchFilters__actionBar__2buHm ListingSearchFilters__actionBarCommon__1n98k",\n\t"listingsCount": "ListingSearchFilters__listingsCount__kcm5D",\n\t"actionBarExpanded": "ListingSearchFilters__actionBarExpanded__3jZ-7 ListingSearchFilters__actionBarCommon__1n98k",\n\t"actionBarTag": "ListingSearchFilters__actionBarTag__1euLt",\n\t"actionBarButton": "ListingSearchFilters__actionBarButton__2IXXZ",\n\t"actionFilterBarButton": "ListingSearchFilters__actionFilterBarButton__1WBFs",\n\t"moreFiltersButton": "ListingSearchFilters__moreFiltersButton__Cjvg9",\n\t"actionBarRemoveTag": "ListingSearchFilters__actionBarRemoveTag__Ifjg1",\n\t"actionBarApplyCancelFilters": "ListingSearchFilters__actionBarApplyCancelFilters__2uLZH",\n\t"roomType": "ListingSearchFilters__roomType__3iqA5 ListingSearchFilters__checkboxFilter__3zorw",\n\t"roomTypeCheckbox": "ListingSearchFilters__roomTypeCheckbox__HWWzW",\n\t"sizeCategory": "ListingSearchFilters__sizeCategory__3p1-Z",\n\t"buttonGroupFullWidth": "ListingSearchFilters__buttonGroupFullWidth__2EZwl",\n\t"filterButtomSm": "ListingSearchFilters__filterButtomSm__2S5pA",\n\t"checkBoxLabelCol": "ListingSearchFilters__checkBoxLabelCol__j5oYp",\n\t"checkBoxInputCol": "ListingSearchFilters__checkBoxInputCol__LfON9",\n\t"searchBox": "ListingSearchFilters__searchBox__z1qb-",\n\t"categoryLabel": "ListingSearchFilters__categoryLabel__1m0X3"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-index/components/ListingSearchFilters/ListingSearchFilters.scss\n// module id = 973\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-index/components/ListingSearchFilters/ListingSearchFilters.scss?', + ); + + /***/ + }, + /* 974 */ + /* unknown exports provided */ + /* exports used: default */ + /*!*************************************************************************************************!*\ + !*** ./app/bundles/listings-index/components/ListingSearchFilters/PriceSlider/PriceSlider.scss ***! + \*************************************************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"sliderContainer": "PriceSlider__sliderContainer__3kq5X",\n\t"minPriceDiv": "PriceSlider__minPriceDiv__3dKH8",\n\t"maxPriceDiv": "PriceSlider__maxPriceDiv__2DXsf"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-index/components/ListingSearchFilters/PriceSlider/PriceSlider.scss\n// module id = 974\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-index/components/ListingSearchFilters/PriceSlider/PriceSlider.scss?', + ); + + /***/ + }, + /* 975 */ + /* unknown exports provided */ + /* exports used: default */ + /*!***********************************************************************************************************************!*\ + !*** ./app/bundles/listings-index/components/ListingSearchFilters/RelationshipTypeFilter/RelationshipTypeFilter.scss ***! + \***********************************************************************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"relationshipFilter": "RelationshipTypeFilter__relationshipFilter__3NJEz",\n\t"contacts": "RelationshipTypeFilter__contacts__vU_eZ",\n\t"membership": "RelationshipTypeFilter__membership__3Z9Jm",\n\t"icon": "RelationshipTypeFilter__icon__k2OgD",\n\t"checked": "RelationshipTypeFilter__checked__7FEx1",\n\t"relationshipFilterCheckbox": "RelationshipTypeFilter__relationshipFilterCheckbox__1On-6"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-index/components/ListingSearchFilters/RelationshipTypeFilter/RelationshipTypeFilter.scss\n// module id = 975\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-index/components/ListingSearchFilters/RelationshipTypeFilter/RelationshipTypeFilter.scss?', + ); + + /***/ + }, + /* 976 */ + /* unknown exports provided */ + /* exports used: default */ + /*!********************************************************************************************!*\ + !*** ./app/bundles/listings-index/components/ListingSearchFooter/ListingSearchFooter.scss ***! + \********************************************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"footer": "ListingSearchFooter__footer__1EP9S",\n\t"copyrights": "ListingSearchFooter__copyrights__367rB",\n\t"footerContent": "ListingSearchFooter__footerContent__1bvPi",\n\t"socialIcons": "ListingSearchFooter__socialIcons__1EktL",\n\t"footerHeading": "ListingSearchFooter__footerHeading__oAiFw"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-index/components/ListingSearchFooter/ListingSearchFooter.scss\n// module id = 976\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-index/components/ListingSearchFooter/ListingSearchFooter.scss?', + ); + + /***/ + }, + /* 977 */ + /* unknown exports provided */ + /* exports used: default */ + /*!*********************************************************************************************!*\ + !*** ./app/bundles/listings-index/components/common/ListingSearchBox/ListingSearchBox.scss ***! + \*********************************************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"searchBox": "ListingSearchBox__searchBox__1Zxvi",\n\t"searchLabel": "ListingSearchBox__searchLabel__1ZBhD",\n\t"searchInputContainer": "ListingSearchBox__searchInputContainer__Nes_v",\n\t"searchIcon": "ListingSearchBox__searchIcon__3Tgmv",\n\t"searchInput": "ListingSearchBox__searchInput__dJRSX",\n\t"searchButton": "ListingSearchBox__searchButton__1Ohhc"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-index/components/common/ListingSearchBox/ListingSearchBox.scss\n// module id = 977\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-index/components/common/ListingSearchBox/ListingSearchBox.scss?', + ); + + /***/ + }, + /* 978 */ + /* unknown exports provided */ + /* exports used: default */ + /*!********************************************************************************************!*\ + !*** ./app/bundles/listings-show/ui/Listing/Amenities/common/AmenityCategories/index.scss ***! + \********************************************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"container": "index__container__22w5J",\n\t"subTitle": "index__subTitle__p4Ovi",\n\t"category": "index__category__1OIy9",\n\t"row": "index__row__5zK7I",\n\t"amenity": "index__amenity__3199R"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-show/ui/Listing/Amenities/common/AmenityCategories/index.scss\n// module id = 978\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-show/ui/Listing/Amenities/common/AmenityCategories/index.scss?', + ); + + /***/ + }, + /* 979 */ + /* unknown exports provided */ + /* exports used: default */ + /*!************************************************************************!*\ + !*** ./app/bundles/listings-show/ui/Listing/Amenities/live/index.scss ***! + \************************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"amenity": "index__amenity__1hsMZ",\n\t"label": "index__label__2A_oa",\n\t"unavailable": "index__unavailable__13K_0",\n\t"note": "index__note__2hCBx",\n\t"showMore": "index__showMore__2LX3Z"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-show/ui/Listing/Amenities/live/index.scss\n// module id = 979\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-show/ui/Listing/Amenities/live/index.scss?', + ); + + /***/ + }, + /* 980 */ + /* unknown exports provided */ + /* exports used: default */ + /*!**************************************************************************!*\ + !*** ./app/bundles/listings-show/ui/Listing/Description/live/index.scss ***! + \**************************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"unit": "index__unit__bpR50",\n\t"paragraph": "index__paragraph__3pBGq"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-show/ui/Listing/Description/live/index.scss\n// module id = 980\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-show/ui/Listing/Description/live/index.scss?', + ); + + /***/ + }, + /* 981 */ + /* unknown exports provided */ + /* exports used: default */ + /*!**********************************************************************!*\ + !*** ./app/bundles/listings-show/ui/Listing/Details/live/index.scss ***! + \**********************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"unit": "index__unit__3e8xv",\n\t"table": "index__table__1UjPT"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-show/ui/Listing/Details/live/index.scss\n// module id = 981\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-show/ui/Listing/Details/live/index.scss?', + ); + + /***/ + }, + /* 982 */ + /* unknown exports provided */ + /* exports used: default */ + /*!***********************************************************************!*\ + !*** ./app/bundles/listings-show/ui/Listing/Header/common/index.scss ***! + \***********************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"unit": "index__unit__z83RH",\n\t"subtitle": "index__subtitle__3R_t3"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-show/ui/Listing/Header/common/index.scss\n// module id = 982\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-show/ui/Listing/Header/common/index.scss?', + ); + + /***/ + }, + /* 983 */ + /* unknown exports provided */ + /* exports used: default */ + /*!*********************************************************************!*\ + !*** ./app/bundles/listings-show/ui/Listing/Header/live/index.scss ***! + \*********************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"subtitle": "index__subtitle__1tWba",\n\t"title": "index__title__Ohh65",\n\t"icons": "index__icons__2QjRp",\n\t"iconWrapper": "index__iconWrapper__1d48e",\n\t"icon": "index__icon__1LUeQ",\n\t"iconRoomType": "index__iconRoomType__1ARCC",\n\t"iconMaxGuests": "index__iconMaxGuests__XrBVn",\n\t"iconBedrooms": "index__iconBedrooms__35Q7n",\n\t"iconBeds": "index__iconBeds__1rbgw",\n\t"iconLabel": "index__iconLabel__3RziO"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-show/ui/Listing/Header/live/index.scss\n// module id = 983\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-show/ui/Listing/Header/live/index.scss?', + ); + + /***/ + }, + /* 984 */ + /* unknown exports provided */ + /* exports used: default */ + /*!*******************************************************************************!*\ + !*** ./app/bundles/listings-show/ui/Listing/Hero/common/HeroPhoto/index.scss ***! + \*******************************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"hero": "index__hero__10Nx-"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-show/ui/Listing/Hero/common/HeroPhoto/index.scss\n// module id = 984\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-show/ui/Listing/Hero/common/HeroPhoto/index.scss?', + ); + + /***/ + }, + /* 985 */ + /* unknown exports provided */ + /* exports used: default */ + /*!*********************************************************************************!*\ + !*** ./app/bundles/listings-show/ui/Listing/Hero/common/NoPhotosYet/index.scss ***! + \*********************************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"wrapper": "index__wrapper__1-5jH",\n\t"content": "index__content___NzAp",\n\t"icon": "index__icon__1Urs_",\n\t"edit": "index__edit__22Xyz"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-show/ui/Listing/Hero/common/NoPhotosYet/index.scss\n// module id = 985\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-show/ui/Listing/Hero/common/NoPhotosYet/index.scss?', + ); + + /***/ + }, + /* 986 */ + /* unknown exports provided */ + /* exports used: default */ + /*!*******************************************************************!*\ + !*** ./app/bundles/listings-show/ui/Listing/Hero/live/index.scss ***! + \*******************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"container": "index__container__NF2zy",\n\t"photo": "index__photo__24F8C",\n\t"gallery": "index__gallery__yuLLD"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-show/ui/Listing/Hero/live/index.scss\n// module id = 986\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-show/ui/Listing/Hero/live/index.scss?', + ); + + /***/ + }, + /* 987 */ + /* unknown exports provided */ + /* exports used: default */ + /*!**************************************************************************!*\ + !*** ./app/bundles/listings-show/ui/Listing/Host/common/Host/index.scss ***! + \**************************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"unit": "index__unit__1c_k5",\n\t"avatar": "index__avatar__1IuNh",\n\t"details": "index__details__11gF-"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-show/ui/Listing/Host/common/Host/index.scss\n// module id = 987\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-show/ui/Listing/Host/common/Host/index.scss?', + ); + + /***/ + }, + /* 988 */ + /* unknown exports provided */ + /* exports used: default */ + /*!*************************************************************************!*\ + !*** ./app/bundles/listings-show/ui/Listing/HouseRules/live/index.scss ***! + \*************************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"unit": "index__unit__2p4hG",\n\t"rules": "index__rules__2UlWF",\n\t"rule": "index__rule__2kdiK",\n\t"iconWrapper": "index__iconWrapper__2f8Z0",\n\t"icon": "index__icon__2bLQQ",\n\t"additionalRulesTitle": "index__additionalRulesTitle__1sXhs"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-show/ui/Listing/HouseRules/live/index.scss\n// module id = 988\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-show/ui/Listing/HouseRules/live/index.scss?', + ); + + /***/ + }, + /* 989 */ + /* unknown exports provided */ + /* exports used: default */ + /*!***********************************************************************************!*\ + !*** ./app/bundles/listings-show/ui/Listing/Location/common/GoogleMap/index.scss ***! + \***********************************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"location": "index__location__1Zasf",\n\t"map": "index__map__2EdDI"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-show/ui/Listing/Location/common/GoogleMap/index.scss\n// module id = 989\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-show/ui/Listing/Location/common/GoogleMap/index.scss?', + ); + + /***/ + }, + /* 990 */ + /* unknown exports provided */ + /* exports used: default */ + /*!****************************************************************************!*\ + !*** ./app/bundles/listings-show/ui/Listing/Photos/common/Grid/index.scss ***! + \****************************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"grid": "index__grid__d4YA9",\n\t"moreToGo": "index__moreToGo__UQUc3",\n\t"moreToGoAmount": "index__moreToGoAmount__1DmVT"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-show/ui/Listing/Photos/common/Grid/index.scss\n// module id = 990\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-show/ui/Listing/Photos/common/Grid/index.scss?', + ); + + /***/ + }, + /* 991 */ + /* unknown exports provided */ + /* exports used: default */ + /*!*********************************************************************!*\ + !*** ./app/bundles/listings-show/ui/Listing/Photos/live/index.scss ***! + \*********************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"unit": "index__unit__1LCe0"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-show/ui/Listing/Photos/live/index.scss\n// module id = 991\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-show/ui/Listing/Photos/live/index.scss?', + ); + + /***/ + }, + /* 992 */ + /* unknown exports provided */ + /* exports used: default */ + /*!*********************************************************************!*\ + !*** ./app/bundles/listings-show/ui/Listing/Prices/live/index.scss ***! + \*********************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"unit": "index__unit__3B1Q1",\n\t"table": "index__table__89ORS"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-show/ui/Listing/Prices/live/index.scss\n// module id = 992\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-show/ui/Listing/Prices/live/index.scss?', + ); + + /***/ + }, + /* 993 */ + /* unknown exports provided */ + /* exports used: default */ + /*!**************************************************************************************!*\ + !*** ./app/bundles/listings-show/ui/Listing/PrivacyBar/common/PrivacyBar/index.scss ***! + \**************************************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"bar": "index__bar__3Ge1j",\n\t"msg": "index__msg__3FBFy",\n\t"icon": "index__icon__3bZn-"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-show/ui/Listing/PrivacyBar/common/PrivacyBar/index.scss\n// module id = 993\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-show/ui/Listing/PrivacyBar/common/PrivacyBar/index.scss?', + ); + + /***/ + }, + /* 994 */ + /* unknown exports provided */ + /* exports used: default */ + /*!**********************************************************************!*\ + !*** ./app/bundles/listings-show/ui/Listing/Summary/live/index.scss ***! + \**********************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"unit": "index__unit__SDKvS",\n\t"paragraph": "index__paragraph__GxtIn"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-show/ui/Listing/Summary/live/index.scss\n// module id = 994\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-show/ui/Listing/Summary/live/index.scss?', + ); + + /***/ + }, + /* 995 */ + /* unknown exports provided */ + /* exports used: default */ + /*!*******************************************************************!*\ + !*** ./app/bundles/listings-show/ui/Listing/Urls/live/index.scss ***! + \*******************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"unit": "index__unit__30TR9",\n\t"urlLink": "index__urlLink__1LyGe",\n\t"airbnb": "index__airbnb__hf5h4",\n\t"vrbo": "index__vrbo__1ThcK",\n\t"homeaway": "index__homeaway__2gt3z",\n\t"default": "index__default__ghrLD"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-show/ui/Listing/Urls/live/index.scss\n// module id = 995\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-show/ui/Listing/Urls/live/index.scss?', + ); + + /***/ + }, + /* 996 */ + /* unknown exports provided */ + /* exports used: default */ + /*!**************************************************************************************!*\ + !*** ./app/bundles/listings-show/ui/Listing/Widgets/common/StickyWidgets/index.scss ***! + \**************************************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"container": "index__container__hGnwI",\n\t"position--AT_THE_TOP": "index__position--AT_THE_TOP__VJklD",\n\t"position--AT_THE_BOTTOM": "index__position--AT_THE_BOTTOM__2stTA",\n\t"position--STICKY": "index__position--STICKY__3vDsD"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-show/ui/Listing/Widgets/common/StickyWidgets/index.scss\n// module id = 996\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-show/ui/Listing/Widgets/common/StickyWidgets/index.scss?', + ); + + /***/ + }, + /* 997 */ + /* unknown exports provided */ + /* exports used: default */ + /*!****************************************************************************************!*\ + !*** ./app/bundles/listings-show/ui/Listing/Widgets/live/GetOnTheGuestList/index.scss ***! + \****************************************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"unit": "index__unit__3vTvu"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-show/ui/Listing/Widgets/live/GetOnTheGuestList/index.scss\n// module id = 997\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-show/ui/Listing/Widgets/live/GetOnTheGuestList/index.scss?', + ); + + /***/ + }, + /* 998 */ + /* unknown exports provided */ + /* exports used: default */ + /*!****************************************************************************!*\ + !*** ./app/bundles/listings-show/ui/Listing/Widgets/live/Price/index.scss ***! + \****************************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"unit": "index__unit__2CQGm",\n\t"priceWrapper": "index__priceWrapper__3MmiY",\n\t"price": "index__price__grJEn",\n\t"cleaningFeeIcon": "index__cleaningFeeIcon__3EUtA",\n\t"cleaningFeeNote": "index__cleaningFeeNote__TaD8u",\n\t"ask": "index__ask__3JySf",\n\t"periodWrapper": "index__periodWrapper__2r4XJ"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-show/ui/Listing/Widgets/live/Price/index.scss\n// module id = 998\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-show/ui/Listing/Widgets/live/Price/index.scss?', + ); + + /***/ + }, + /* 999 */ + /* unknown exports provided */ + /* exports used: default */ + /*!***********************************************************************************!*\ + !*** ./app/bundles/listings-show/ui/Listing/Widgets/live/PrivacyBadge/index.scss ***! + \***********************************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"wrapper": "index__wrapper__1myRa",\n\t"icon": "index__icon__3fYD1"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-show/ui/Listing/Widgets/live/PrivacyBadge/index.scss\n// module id = 999\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-show/ui/Listing/Widgets/live/PrivacyBadge/index.scss?', + ); + + /***/ + }, + /* 1000 */ + /* unknown exports provided */ + /* exports used: default */ + /*!*********************************************************!*\ + !*** ./app/bundles/listings-show/ui/Listing/index.scss ***! + \*********************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"layout": "index__layout__33vzp",\n\t"container": "index__container__1Axxb",\n\t"units": "index__units___awMQ",\n\t"widgets": "index__widgets__28_jp"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-show/ui/Listing/index.scss\n// module id = 1000\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-show/ui/Listing/index.scss?', + ); + + /***/ + }, + /* 1001 */ + /* unknown exports provided */ + /* exports used: default */ + /*!****************************************************************************!*\ + !*** ./app/bundles/listings-show/ui/Topbar/common/StickyNavbar/index.scss ***! + \****************************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"navbar": "index__navbar__2zITl",\n\t"common": "index__common__3GDuI",\n\t"sticky": "index__sticky__1kuQp"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-show/ui/Topbar/common/StickyNavbar/index.scss\n// module id = 1001\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-show/ui/Topbar/common/StickyNavbar/index.scss?', + ); + + /***/ + }, + /* 1002 */ + /* unknown exports provided */ + /* exports used: default */ + /*!****************************************************************************!*\ + !*** ./app/bundles/listings-show/ui/Topbar/live/FavoriteButton/index.scss ***! + \****************************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"wrapper": "index__wrapper__2F6om",\n\t"buttonWrapper": "index__buttonWrapper__QBLxP",\n\t"button": "index__button__d1cNz",\n\t"heart": "index__heart__iL-oh"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-show/ui/Topbar/live/FavoriteButton/index.scss\n// module id = 1002\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-show/ui/Topbar/live/FavoriteButton/index.scss?', + ); + + /***/ + }, + /* 1003 */ + /* unknown exports provided */ + /* exports used: default */ + /*!************************************************************************!*\ + !*** ./app/bundles/listings-show/ui/Topbar/preview/Buttons/index.scss ***! + \************************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"wrapper": "index__wrapper__2nhhm",\n\t"viewModeWrapper": "index__viewModeWrapper__HHqZH",\n\t"viewModeButtons": "index__viewModeButtons__q_P4G",\n\t"viewModeButton": "index__viewModeButton__3ep-x"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-show/ui/Topbar/preview/Buttons/index.scss\n// module id = 1003\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-show/ui/Topbar/preview/Buttons/index.scss?', + ); + + /***/ + }, + /* 1004 */ + /* unknown exports provided */ + /* exports used: default */ + /*!**********************************************************************!*\ + !*** ./app/bundles/listings-show/ui/common/Gallery/Photo/index.scss ***! + \**********************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"hidden": "index__hidden__3Ae-t"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-show/ui/common/Gallery/Photo/index.scss\n// module id = 1004\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-show/ui/common/Gallery/Photo/index.scss?', + ); + + /***/ + }, + /* 1005 */ + /* unknown exports provided */ + /* exports used: default */ + /*!*************************************************************!*\ + !*** ./app/bundles/listings-show/ui/common/Unit/index.scss ***! + \*************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"wrapper": "index__wrapper__sRLD3",\n\t"headline": "index__headline__2FbcA",\n\t"title": "index__title__cfnx5",\n\t"content": "index__content__1k6Fx",\n\t"marginTopSm": "index__marginTopSm__3g1zb"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/listings-show/ui/common/Unit/index.scss\n// module id = 1005\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/listings-show/ui/common/Unit/index.scss?', + ); + + /***/ + }, + /* 1006 */ + /* unknown exports provided */ + /* exports used: default */ + /*!***********************************************************!*\ + !*** ./app/bundles/pages-hosts/components/HostsPage.scss ***! + \***********************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"HostsPage": "HostsPage__HostsPage__1UjtR"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/pages-hosts/components/HostsPage.scss\n// module id = 1006\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/pages-hosts/components/HostsPage.scss?', + ); + + /***/ + }, + /* 1007 */ + /* unknown exports provided */ + /* exports used: default */ + /*!*****************************************************************************!*\ + !*** ./app/bundles/pages-hosts/components/HowToHost/HostTile/HostTile.scss ***! + \*****************************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"HostTile": "HostTile__HostTile__1y7Vg",\n\t"heroImage": "HostTile__heroImage__dIkUt",\n\t"tileInner": "HostTile__tileInner__IgNOy",\n\t"title": "HostTile__title__28orV",\n\t"description": "HostTile__description__14O_9",\n\t"button": "HostTile__button__31C3d"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/pages-hosts/components/HowToHost/HostTile/HostTile.scss\n// module id = 1007\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/pages-hosts/components/HowToHost/HostTile/HostTile.scss?', + ); + + /***/ + }, + /* 1008 */ + /* unknown exports provided */ + /* exports used: default */ + /*!*********************************************************************!*\ + !*** ./app/bundles/pages-hosts/components/HowToHost/HowToHost.scss ***! + \*********************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"HowToHost": "HowToHost__HowToHost__1MV1m",\n\t"title": "HowToHost__title__2naej",\n\t"hostTiles": "HowToHost__hostTiles__mDATm"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/pages-hosts/components/HowToHost/HowToHost.scss\n// module id = 1008\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/pages-hosts/components/HowToHost/HowToHost.scss?', + ); + + /***/ + }, + /* 1009 */ + /* unknown exports provided */ + /* exports used: default */ + /*!*************************************************************************!*\ + !*** ./app/bundles/pages-hosts/components/YouWillLove/YouWillLove.scss ***! + \*************************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"YouWillLove": "YouWillLove__YouWillLove__2Diwb"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/pages-hosts/components/YouWillLove/YouWillLove.scss\n// module id = 1009\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/pages-hosts/components/YouWillLove/YouWillLove.scss?', + ); + + /***/ + }, + /* 1010 */ + /* unknown exports provided */ + /* exports used: default */ + /*!*******************************************************************************!*\ + !*** ./app/bundles/pages-pricing/components/PricingHeader/PricingHeader.scss ***! + \*******************************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"PricingHeader": "PricingHeader__PricingHeader__3N39l",\n\t"headline": "PricingHeader__headline__Ov03U",\n\t"subHeadline": "PricingHeader__subHeadline__lW4RF"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/pages-pricing/components/PricingHeader/PricingHeader.scss\n// module id = 1010\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/pages-pricing/components/PricingHeader/PricingHeader.scss?', + ); + + /***/ + }, + /* 1011 */ + /* unknown exports provided */ + /* exports used: default */ + /*!***************************************************************!*\ + !*** ./app/bundles/pages-pricing/components/PricingPage.scss ***! + \***************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"PricingPage": "PricingPage__PricingPage__6E8Xg",\n\t"pricing-page-top": "PricingPage__pricing-page-top__3RFCY",\n\t"pricing-page-bottom": "PricingPage__pricing-page-bottom__2_nlb"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/pages-pricing/components/PricingPage.scss\n// module id = 1011\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/pages-pricing/components/PricingPage.scss?', + ); + + /***/ + }, + /* 1012 */ + /* unknown exports provided */ + /* exports used: default */ + /*!*******************************************************************************************!*\ + !*** ./app/bundles/pages-pricing/components/PricingPanels/PricingPanel/PricingPanel.scss ***! + \*******************************************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"PricingPanel": "PricingPanel__PricingPanel__3lM_k"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/pages-pricing/components/PricingPanels/PricingPanel/PricingPanel.scss\n// module id = 1012\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/pages-pricing/components/PricingPanels/PricingPanel/PricingPanel.scss?', + ); + + /***/ + }, + /* 1013 */ + /* unknown exports provided */ + /* exports used: default */ + /*!**********************************************************************************************************************!*\ + !*** ./app/bundles/pages-pricing/components/PricingPanels/PricingPanel/PricingPanelContent/PricingPanelContent.scss ***! + \**********************************************************************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"PricingPanelContent": "PricingPanelContent__PricingPanelContent__1buJS",\n\t"list": "PricingPanelContent__list__2wrNQ",\n\t"listItem": "PricingPanelContent__listItem__SPViW",\n\t"soonLabel": "PricingPanelContent__soonLabel__2IqCx",\n\t"soonBullets": "PricingPanelContent__soonBullets__3FtZu"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/pages-pricing/components/PricingPanels/PricingPanel/PricingPanelContent/PricingPanelContent.scss\n// module id = 1013\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/pages-pricing/components/PricingPanels/PricingPanel/PricingPanelContent/PricingPanelContent.scss?', + ); + + /***/ + }, + /* 1014 */ + /* unknown exports provided */ + /* exports used: default */ + /*!********************************************************************************************************************!*\ + !*** ./app/bundles/pages-pricing/components/PricingPanels/PricingPanel/PricingPanelFooter/PricingPanelFooter.scss ***! + \********************************************************************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"PricingPanelFooter": "PricingPanelFooter__PricingPanelFooter__3PTyQ",\n\t"cta": "PricingPanelFooter__cta__Wkm6m",\n\t"creditCard": "PricingPanelFooter__creditCard__1m26e",\n\t"demoUrl": "PricingPanelFooter__demoUrl__31KYD"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/pages-pricing/components/PricingPanels/PricingPanel/PricingPanelFooter/PricingPanelFooter.scss\n// module id = 1014\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/pages-pricing/components/PricingPanels/PricingPanel/PricingPanelFooter/PricingPanelFooter.scss?', + ); + + /***/ + }, + /* 1015 */ + /* unknown exports provided */ + /* exports used: default */ + /*!********************************************************************************************************************!*\ + !*** ./app/bundles/pages-pricing/components/PricingPanels/PricingPanel/PricingPanelHeader/PricingPanelHeader.scss ***! + \********************************************************************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"PricingPanelHeader": "PricingPanelHeader__PricingPanelHeader__2pNzq",\n\t"teal": "PricingPanelHeader__teal__mBfsa",\n\t"gray": "PricingPanelHeader__gray__Hn4LE",\n\t"primary": "PricingPanelHeader__primary__2gGDV",\n\t"title": "PricingPanelHeader__title__2n_E-",\n\t"subtitle": "PricingPanelHeader__subtitle__2woIj",\n\t"ribbon": "PricingPanelHeader__ribbon__fgBTa"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/pages-pricing/components/PricingPanels/PricingPanel/PricingPanelHeader/PricingPanelHeader.scss\n// module id = 1015\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/pages-pricing/components/PricingPanels/PricingPanel/PricingPanelHeader/PricingPanelHeader.scss?', + ); + + /***/ + }, + /* 1016 */ + /* unknown exports provided */ + /* exports used: default */ + /*!*******************************************************************************!*\ + !*** ./app/bundles/pages-pricing/components/PricingPanels/PricingPanels.scss ***! + \*******************************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"PricingPanels": "PricingPanels__PricingPanels__1owfP"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/pages-pricing/components/PricingPanels/PricingPanels.scss\n// module id = 1016\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/pages-pricing/components/PricingPanels/PricingPanels.scss?', + ); + + /***/ + }, + /* 1017 */ + /* unknown exports provided */ + /* exports used: default */ + /*!*********************************************************************************************************!*\ + !*** ./app/bundles/pages-private-hosts/components/HowFriendsAndGuestsWork/FeatureList/FeatureList.scss ***! + \*********************************************************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"FeatureList": "FeatureList__FeatureList__1Ra74",\n\t"futureFeature": "FeatureList__futureFeature__1GnHE",\n\t"listAsterisk": "FeatureList__listAsterisk__2TCZL"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/pages-private-hosts/components/HowFriendsAndGuestsWork/FeatureList/FeatureList.scss\n// module id = 1017\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/pages-private-hosts/components/HowFriendsAndGuestsWork/FeatureList/FeatureList.scss?', + ); + + /***/ + }, + /* 1018 */ + /* unknown exports provided */ + /* exports used: default */ + /*!*********************************************************************************************************!*\ + !*** ./app/bundles/pages-private-hosts/components/HowFriendsAndGuestsWork/HowFriendsAndGuestsWork.scss ***! + \*********************************************************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"HowFriendsAndGuestsWork": "HowFriendsAndGuestsWork__HowFriendsAndGuestsWork__1XHFM",\n\t"title": "HowFriendsAndGuestsWork__title__3D8JN",\n\t"description": "HowFriendsAndGuestsWork__description__1sAO5"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/pages-private-hosts/components/HowFriendsAndGuestsWork/HowFriendsAndGuestsWork.scss\n// module id = 1018\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/pages-private-hosts/components/HowFriendsAndGuestsWork/HowFriendsAndGuestsWork.scss?', + ); + + /***/ + }, + /* 1019 */ + /* unknown exports provided */ + /* exports used: default */ + /*!**************************************************************************!*\ + !*** ./app/bundles/pages-private-hosts/components/PrivateHostsPage.scss ***! + \**************************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"PrivateHostsPage": "PrivateHostsPage__PrivateHostsPage__3B_yJ",\n\t"hostStoriesBackground": "PrivateHostsPage__hostStoriesBackground__29uLC"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/pages-private-hosts/components/PrivateHostsPage.scss\n// module id = 1019\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/pages-private-hosts/components/PrivateHostsPage.scss?', + ); + + /***/ + }, + /* 1020 */ + /* unknown exports provided */ + /* exports used: default */ + /*!********************************************************************************************************!*\ + !*** ./app/bundles/pages-public-hosts/components/HowFriendsAndGuestsWork/FeatureList/FeatureList.scss ***! + \********************************************************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"FeatureList": "FeatureList__FeatureList__3JePn",\n\t"futureFeature": "FeatureList__futureFeature__2IcOb",\n\t"listAsterisk": "FeatureList__listAsterisk__1IjYA"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/pages-public-hosts/components/HowFriendsAndGuestsWork/FeatureList/FeatureList.scss\n// module id = 1020\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/pages-public-hosts/components/HowFriendsAndGuestsWork/FeatureList/FeatureList.scss?', + ); + + /***/ + }, + /* 1021 */ + /* unknown exports provided */ + /* exports used: default */ + /*!********************************************************************************************************!*\ + !*** ./app/bundles/pages-public-hosts/components/HowFriendsAndGuestsWork/HowFriendsAndGuestsWork.scss ***! + \********************************************************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"HowFriendsAndGuestsWork": "HowFriendsAndGuestsWork__HowFriendsAndGuestsWork__37K7U",\n\t"title": "HowFriendsAndGuestsWork__title__3tedD",\n\t"description": "HowFriendsAndGuestsWork__description__neUgB"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/pages-public-hosts/components/HowFriendsAndGuestsWork/HowFriendsAndGuestsWork.scss\n// module id = 1021\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/pages-public-hosts/components/HowFriendsAndGuestsWork/HowFriendsAndGuestsWork.scss?', + ); + + /***/ + }, + /* 1022 */ + /* unknown exports provided */ + /* exports used: default */ + /*!************************************************************************!*\ + !*** ./app/bundles/pages-public-hosts/components/PublicHostsPage.scss ***! + \************************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"PublicHostsPage": "PublicHostsPage__PublicHostsPage__38y4X",\n\t"hostStoriesBackground": "PublicHostsPage__hostStoriesBackground__3bI1j"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/pages-public-hosts/components/PublicHostsPage.scss\n// module id = 1022\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/pages-public-hosts/components/PublicHostsPage.scss?', + ); + + /***/ + }, + /* 1023 */ + /* unknown exports provided */ + /* exports used: default */ + /*!*************************************************************************************!*\ + !*** ./app/bundles/pages-welcome/components/FeaturedListings/FeaturedListings.scss ***! + \*************************************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"FeaturedListings": "FeaturedListings__FeaturedListings__3jXvE"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/pages-welcome/components/FeaturedListings/FeaturedListings.scss\n// module id = 1023\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/pages-welcome/components/FeaturedListings/FeaturedListings.scss?', + ); + + /***/ + }, + /* 1024 */ + /* unknown exports provided */ + /* exports used: default */ + /*!*******************************************************************************************************!*\ + !*** ./app/bundles/pages-welcome/components/FeaturedLocations/FeaturedLocation/FeaturedLocation.scss ***! + \*******************************************************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"FeaturedLocation": "FeaturedLocation__FeaturedLocation__2Me-y",\n\t"title": "FeaturedLocation__title__368qS"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/pages-welcome/components/FeaturedLocations/FeaturedLocation/FeaturedLocation.scss\n// module id = 1024\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/pages-welcome/components/FeaturedLocations/FeaturedLocation/FeaturedLocation.scss?', + ); + + /***/ + }, + /* 1025 */ + /* unknown exports provided */ + /* exports used: default */ + /*!***************************************************************************************!*\ + !*** ./app/bundles/pages-welcome/components/FeaturedLocations/FeaturedLocations.scss ***! + \***************************************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"FeaturedLocations": "FeaturedLocations__FeaturedLocations__3NdqI",\n\t"primaryLocation": "FeaturedLocations__primaryLocation__2859k",\n\t"secondaryLocations": "FeaturedLocations__secondaryLocations__3XgkD"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/pages-welcome/components/FeaturedLocations/FeaturedLocations.scss\n// module id = 1025\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/pages-welcome/components/FeaturedLocations/FeaturedLocations.scss?', + ); + + /***/ + }, + /* 1026 */ + /* unknown exports provided */ + /* exports used: default */ + /*!*************************************************************!*\ + !*** ./app/bundles/pages-welcome/components/Hero/Hero.scss ***! + \*************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"Hero": "Hero__Hero__gLJan",\n\t"heroInner": "Hero__heroInner__7P4Yl",\n\t"headline": "Hero__headline__vGr9k"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/pages-welcome/components/Hero/Hero.scss\n// module id = 1026\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/pages-welcome/components/Hero/Hero.scss?', + ); + + /***/ + }, + /* 1027 */ + /* unknown exports provided */ + /* exports used: default */ + /*!**********************************************************************!*\ + !*** ./app/bundles/pages-welcome/components/Hero/Search/Search.scss ***! + \**********************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"searchListing": "Search__searchListing__btY_X",\n\t"location": "Search__location__2pSOY",\n\t"locationSection": "Search__locationSection__bkUFA",\n\t"datesSection": "Search__datesSection__1ARHS",\n\t"guestsSection": "Search__guestsSection__23Chk",\n\t"guestsInput": "Search__guestsInput__3jNfn",\n\t"searchButtonSm": "Search__searchButtonSm__1o9TC",\n\t"searchButtonMd": "Search__searchButtonMd__36x0q",\n\t"searchButtonLg": "Search__searchButtonLg__j4jpy",\n\t"label": "Search__label__Kn-0f"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/pages-welcome/components/Hero/Search/Search.scss\n// module id = 1027\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/pages-welcome/components/Hero/Search/Search.scss?', + ); + + /***/ + }, + /* 1028 */ + /* unknown exports provided */ + /* exports used: default */ + /*!*******************************************************************************!*\ + !*** ./app/bundles/pages-welcome/components/OurUniqueness/OurUniqueness.scss ***! + \*******************************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"OurUniqueness": "OurUniqueness__OurUniqueness__1PBgs"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/pages-welcome/components/OurUniqueness/OurUniqueness.scss\n// module id = 1028\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/pages-welcome/components/OurUniqueness/OurUniqueness.scss?', + ); + + /***/ + }, + /* 1029 */ + /* unknown exports provided */ + /* exports used: default */ + /*!***************************************************************!*\ + !*** ./app/bundles/pages-welcome/components/WelcomePage.scss ***! + \***************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"WelcomePage": "WelcomePage__WelcomePage__2WMXu",\n\t"featuredLocationsTitle": "WelcomePage__featuredLocationsTitle__1RVLu",\n\t"featuredListingsTitle": "WelcomePage__featuredListingsTitle__3sOpR"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/pages-welcome/components/WelcomePage.scss\n// module id = 1029\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/pages-welcome/components/WelcomePage.scss?', + ); + + /***/ + }, + /* 1030 */ + /* unknown exports provided */ + /*!*******************************************!*\ + !*** ./app/bundles/slim-styles/base.scss ***! + \*******************************************/ + /***/ function (module, exports) { + eval( + '\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/slim-styles/base.scss\n// module id = 1030\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/slim-styles/base.scss?', + ); + + /***/ + }, + /* 1031 */ + /* unknown exports provided */ + /* exports used: default */ + /*!**********************************************************!*\ + !*** ./app/bundles/users-show/components/Hero/Hero.scss ***! + \**********************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"container": "Hero__container__DvMAz",\n\t"hero": "Hero__hero__K4L3L",\n\t"heroOverlay": "Hero__heroOverlay__13CQo",\n\t"userImage": "Hero__userImage__1ZVg1",\n\t"avatar": "Hero__avatar__11Vyc",\n\t"socialIcons": "Hero__socialIcons__1EE_W",\n\t"editProfileButton": "Hero__editProfileButton__3Sf_O",\n\t"name": "Hero__name__1K0Hf",\n\t"memberSince": "Hero__memberSince__1OZlp",\n\t"aboutMe": "Hero__aboutMe__3sEQj",\n\t"bubble": "Hero__bubble__1ShVC",\n\t"bubbleInfo": "Hero__bubbleInfo__2BFo3"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/users-show/components/Hero/Hero.scss\n// module id = 1031\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/users-show/components/Hero/Hero.scss?', + ); + + /***/ + }, + /* 1032 */ + /* unknown exports provided */ + /* exports used: default */ + /*!***************************************************************************!*\ + !*** ./app/bundles/users-show/components/Hero/SocialIcon/SocialIcon.scss ***! + \***************************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"socialIcon": "SocialIcon__socialIcon__2686I",\n\t"noTransparency": "SocialIcon__noTransparency__2bps0",\n\t"facebook": "SocialIcon__facebook__2Lh8B",\n\t"link": "SocialIcon__link__1w-jX",\n\t"twitter": "SocialIcon__twitter__3P0P8",\n\t"linkedin": "SocialIcon__linkedin__4LYLP",\n\t"vrbo": "SocialIcon__vrbo__1fOpl",\n\t"airbnb": "SocialIcon__airbnb__3EITl"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/users-show/components/Hero/SocialIcon/SocialIcon.scss\n// module id = 1032\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/users-show/components/Hero/SocialIcon/SocialIcon.scss?', + ); + + /***/ + }, + /* 1033 */ + /* unknown exports provided */ + /* exports used: default */ + /*!****************************************************************************!*\ + !*** ./app/bundles/users-show/components/MutualFriends/MutualFriends.scss ***! + \****************************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"container": "MutualFriends__container__1qtBS",\n\t"row": "MutualFriends__row__3YL2I",\n\t"mutualFriend": "MutualFriends__mutualFriend__3L_Gv",\n\t"userAvatar": "MutualFriends__userAvatar__SUnf0",\n\t"info": "MutualFriends__info__14cai",\n\t"name": "MutualFriends__name__DO6we",\n\t"listings": "MutualFriends__listings__3BUou"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/users-show/components/MutualFriends/MutualFriends.scss\n// module id = 1033\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/users-show/components/MutualFriends/MutualFriends.scss?', + ); + + /***/ + }, + /* 1034 */ + /* unknown exports provided */ + /* exports used: default */ + /*!****************************************************************************!*\ + !*** ./app/bundles/users-show/components/SectionHeader/SectionHeader.scss ***! + \****************************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"container": "SectionHeader__container__2qJpk",\n\t"sectionTitleWrapper": "SectionHeader__sectionTitleWrapper__h4UDZ",\n\t"sectionTitle": "SectionHeader__sectionTitle__h1IvO",\n\t"badge": "SectionHeader__badge__cWqkB"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/users-show/components/SectionHeader/SectionHeader.scss\n// module id = 1034\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/users-show/components/SectionHeader/SectionHeader.scss?', + ); + + /***/ + }, + /* 1035 */ + /* unknown exports provided */ + /* exports used: default */ + /*!**************************************************************************!*\ + !*** ./app/bundles/users-show/components/UserListings/UserListings.scss ***! + \**************************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"container": "UserListings__container__2R0Hm",\n\t"tile": "UserListings__tile__A_dyG",\n\t"info": "UserListings__info__oUTo4"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/bundles/users-show/components/UserListings/UserListings.scss\n// module id = 1035\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/bundles/users-show/components/UserListings/UserListings.scss?', + ); + + /***/ + }, + /* 1036 */ + /* unknown exports provided */ + /* exports used: default */ + /*!************************************************!*\ + !*** ./app/libs/components/Button/Button.scss ***! + \************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"btnDefault": "Button__btnDefault__MHvvi",\n\t"visuallyDisabled": "Button__visuallyDisabled__3wwX8",\n\t"btnPrimary": "Button__btnPrimary__1m2XG",\n\t"btnSuccess": "Button__btnSuccess__1_tmp",\n\t"btnWarning": "Button__btnWarning__C5v6L",\n\t"btnDanger": "Button__btnDanger__1UdrA",\n\t"btnOrange": "Button__btnOrange__-6sOo",\n\t"btnInverted": "Button__btnInverted__2Ma6B",\n\t"btnFaded": "Button__btnFaded__3FU4v",\n\t"btnGhostPrimary": "Button__btnGhostPrimary__ub9Uc",\n\t"btnGhostSuccess": "Button__btnGhostSuccess__3rNJi",\n\t"btnGhostWarning": "Button__btnGhostWarning__3wpkw",\n\t"btnGhostDanger": "Button__btnGhostDanger__2TZzD",\n\t"btnTeal": "Button__btnTeal__wbbWW",\n\t"btnGray": "Button__btnGray__3OsYI",\n\t"btnDefaultSize": "Button__btnDefaultSize__24waE",\n\t"btnSizeXL": "Button__btnSizeXL__dAIKu",\n\t"expanded": "Button__expanded__3mpsI",\n\t"leftMargin": "Button__leftMargin__3U3Q-",\n\t"rightMargin": "Button__rightMargin__2U9LZ"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/Button/Button.scss\n// module id = 1036\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/Button/Button.scss?', + ); + + /***/ + }, + /* 1037 */ + /* unknown exports provided */ + /* exports used: default */ + /*!********************************************************!*\ + !*** ./app/libs/components/ButtonLike/ButtonLike.scss ***! + \********************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"button": "ButtonLike__button__2aMz1",\n\t"inverted": "ButtonLike__inverted__2uv8k"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/ButtonLike/ButtonLike.scss\n// module id = 1037\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/ButtonLike/ButtonLike.scss?', + ); + + /***/ + }, + /* 1038 */ + /* unknown exports provided */ + /* exports used: default */ + /*!**************************************************************************!*\ + !*** ./app/libs/components/CallToActionSection/CallToActionSection.scss ***! + \**************************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"CallToActionSection": "CallToActionSection__CallToActionSection__1OEfV",\n\t"title": "CallToActionSection__title__24F8r",\n\t"description": "CallToActionSection__description__uYve-"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/CallToActionSection/CallToActionSection.scss\n// module id = 1038\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/CallToActionSection/CallToActionSection.scss?', + ); + + /***/ + }, + /* 1039 */ + /* unknown exports provided */ + /* exports used: default */ + /*!**********************************************************************!*\ + !*** ./app/libs/components/CallToActionStrip/CallToActionStrip.scss ***! + \**********************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"CallToActionStrip": "CallToActionStrip__CallToActionStrip__3FXh7",\n\t"innerCta": "CallToActionStrip__innerCta__2DK43",\n\t"text": "CallToActionStrip__text__xDBoA",\n\t"textStrong": "CallToActionStrip__textStrong__b8sZo",\n\t"textMedium": "CallToActionStrip__textMedium__1Vht2",\n\t"button": "CallToActionStrip__button__1nhYu"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/CallToActionStrip/CallToActionStrip.scss\n// module id = 1039\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/CallToActionStrip/CallToActionStrip.scss?', + ); + + /***/ + }, + /* 1040 */ + /* unknown exports provided */ + /* exports used: default */ + /*!****************************************************************!*\ + !*** ./app/libs/components/CloseModalIcon/CloseModalIcon.scss ***! + \****************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"wrapper": "CloseModalIcon__wrapper__hblDm",\n\t"icon": "CloseModalIcon__icon__1gAP_",\n\t"text": "CloseModalIcon__text__1oCZJ"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/CloseModalIcon/CloseModalIcon.scss\n// module id = 1040\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/CloseModalIcon/CloseModalIcon.scss?', + ); + + /***/ + }, + /* 1041 */ + /* unknown exports provided */ + /* exports used: default */ + /*!************************************************************!*\ + !*** ./app/libs/components/ConfirmModal/ConfirmModal.scss ***! + \************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"modal": "ConfirmModal__modal__2ALa5",\n\t"isForm": "ConfirmModal__isForm__3ULgR",\n\t"modalFooter": "ConfirmModal__modalFooter__wUXYm"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/ConfirmModal/ConfirmModal.scss\n// module id = 1041\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/ConfirmModal/ConfirmModal.scss?', + ); + + /***/ + }, + /* 1042 */ + /* unknown exports provided */ + /* exports used: default */ + /*!****************************************************************!*\ + !*** ./app/libs/components/DataTable/ActionBar/ActionBar.scss ***! + \****************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"wrapper": "ActionBar__wrapper__2cpXc",\n\t"visible": "ActionBar__visible__2utSX",\n\t"hidden": "ActionBar__hidden__3hgRt",\n\t"container": "ActionBar__container__1pM3B",\n\t"children": "ActionBar__children__1hjla",\n\t"closeButton": "ActionBar__closeButton__2VWOg",\n\t"closeIcon": "ActionBar__closeIcon__3TLg5"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/DataTable/ActionBar/ActionBar.scss\n// module id = 1042\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/DataTable/ActionBar/ActionBar.scss?', + ); + + /***/ + }, + /* 1043 */ + /* unknown exports provided */ + /* exports used: default */ + /*!****************************************************************!*\ + !*** ./app/libs/components/DataTable/EmptyList/EmptyList.scss ***! + \****************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"wrapper": "EmptyList__wrapper__1qXp0",\n\t"paper": "EmptyList__paper__jPHfY",\n\t"row": "EmptyList__row__2s53r",\n\t"image": "EmptyList__image__36EUL",\n\t"text": "EmptyList__text__3w5YA",\n\t"lineOne": "EmptyList__lineOne__1LOdU",\n\t"lineTwo": "EmptyList__lineTwo__2CHEM",\n\t"message": "EmptyList__message__2b9HP"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/DataTable/EmptyList/EmptyList.scss\n// module id = 1043\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/DataTable/EmptyList/EmptyList.scss?', + ); + + /***/ + }, + /* 1044 */ + /* unknown exports provided */ + /* exports used: default */ + /*!**************************************************************************************!*\ + !*** ./app/libs/components/DataTable/SortableColumnHeader/SortableColumnHeader.scss ***! + \**************************************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"clickable": "SortableColumnHeader__clickable__2OwqT",\n\t"label": "SortableColumnHeader__label__3qXvj",\n\t"icon": "SortableColumnHeader__icon__n6HQZ"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/DataTable/SortableColumnHeader/SortableColumnHeader.scss\n// module id = 1044\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/DataTable/SortableColumnHeader/SortableColumnHeader.scss?', + ); + + /***/ + }, + /* 1045 */ + /* unknown exports provided */ + /* exports used: default */ + /*!***************************************************************************************!*\ + !*** ./app/libs/components/DataTable/listings/ListingThumbnail/components/index.scss ***! + \***************************************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"listingTile": "index__listingTile__-zn-r"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/DataTable/listings/ListingThumbnail/components/index.scss\n// module id = 1045\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/DataTable/listings/ListingThumbnail/components/index.scss?', + ); + + /***/ + }, + /* 1046 */ + /* unknown exports provided */ + /* exports used: default */ + /*!***********************************************************************************!*\ + !*** ./app/libs/components/DataTable/listings/ListingTitle/components/index.scss ***! + \***********************************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"title": "index__title__VP8zs",\n\t"listingData": "index__listingData__31lrx",\n\t"listingMeta": "index__listingMeta__mIaGu"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/DataTable/listings/ListingTitle/components/index.scss\n// module id = 1046\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/DataTable/listings/ListingTitle/components/index.scss?', + ); + + /***/ + }, + /* 1047 */ + /* unknown exports provided */ + /* exports used: default */ + /*!**********************************************************************!*\ + !*** ./app/libs/components/DataTable/users/UserLinks/UserLinks.scss ***! + \**********************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"userLinks": "UserLinks__userLinks__2VOuq",\n\t"userLink": "UserLinks__userLink__1lC6c",\n\t"socialIcon": "UserLinks__socialIcon__1eH4X",\n\t"icon": "UserLinks__icon__3BmE0"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/DataTable/users/UserLinks/UserLinks.scss\n// module id = 1047\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/DataTable/users/UserLinks/UserLinks.scss?', + ); + + /***/ + }, + /* 1048 */ + /* unknown exports provided */ + /* exports used: default */ + /*!*****************************************************************!*\ + !*** ./app/libs/components/Dropdown/MenuHeader/MenuHeader.scss ***! + \*****************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"wrapper": "MenuHeader__wrapper__2Xbui",\n\t"header": "MenuHeader__header__33XGv",\n\t"title": "MenuHeader__title__2zHt2",\n\t"icon": "MenuHeader__icon__1U3vO",\n\t"separator": "MenuHeader__separator__3-kxZ"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/Dropdown/MenuHeader/MenuHeader.scss\n// module id = 1048\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/Dropdown/MenuHeader/MenuHeader.scss?', + ); + + /***/ + }, + /* 1049 */ + /* unknown exports provided */ + /* exports used: default */ + /*!***********************************************************!*\ + !*** ./app/libs/components/Dropdown/Message/Message.scss ***! + \***********************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"message": "Message__message__2IZan",\n\t"warning": "Message__warning__1yt27",\n\t"error": "Message__error__1fNez",\n\t"info": "Message__info__15wRE",\n\t"success": "Message__success__2re_U"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/Dropdown/Message/Message.scss\n// module id = 1049\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/Dropdown/Message/Message.scss?', + ); + + /***/ + }, + /* 1050 */ + /* unknown exports provided */ + /* exports used: default */ + /*!****************************************************!*\ + !*** ./app/libs/components/Ellipsis/Ellipsis.scss ***! + \****************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"faded": "Ellipsis__faded__19ZoP"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/Ellipsis/Ellipsis.scss\n// module id = 1050\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/Ellipsis/Ellipsis.scss?', + ); + + /***/ + }, + /* 1051 */ + /* unknown exports provided */ + /* exports used: default */ + /*!**********************************************************!*\ + !*** ./app/libs/components/GoogleMaps/Marker/index.scss ***! + \**********************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"overlayView": "index__overlayView__v039V"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/GoogleMaps/Marker/index.scss\n// module id = 1051\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/GoogleMaps/Marker/index.scss?', + ); + + /***/ + }, + /* 1052 */ + /* unknown exports provided */ + /* exports used: default */ + /*!****************************************!*\ + !*** ./app/libs/components/H1/H1.scss ***! + \****************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"h1": "H1__h1__24L81"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/H1/H1.scss\n// module id = 1052\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/H1/H1.scss?', + ); + + /***/ + }, + /* 1053 */ + /* unknown exports provided */ + /* exports used: default */ + /*!****************************************************!*\ + !*** ./app/libs/components/HostDoor/HostDoor.scss ***! + \****************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"HostDoor": "HostDoor__HostDoor__3Izu7",\n\t"hostDoorContainer": "HostDoor__hostDoorContainer__17SFq",\n\t"innerDoor": "HostDoor__innerDoor__Ix556",\n\t"title": "HostDoor__title__WhfTU",\n\t"description": "HostDoor__description__2ZzPu",\n\t"button": "HostDoor__button__3tNnH"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/HostDoor/HostDoor.scss\n// module id = 1053\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/HostDoor/HostDoor.scss?', + ); + + /***/ + }, + /* 1054 */ + /* unknown exports provided */ + /* exports used: default */ + /*!**************************************************************!*\ + !*** ./app/libs/components/HostHeroImage/HostHeroImage.scss ***! + \**************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"HostHeroImage": "HostHeroImage__HostHeroImage__30Zs8",\n\t"heroInner": "HostHeroImage__heroInner__3nLmv",\n\t"label": "HostHeroImage__label__5-oAz",\n\t"trademark": "HostHeroImage__trademark__3uOqx",\n\t"headline": "HostHeroImage__headline__2HgMe",\n\t"subHeadline": "HostHeroImage__subHeadline__wsb2s"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/HostHeroImage/HostHeroImage.scss\n// module id = 1054\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/HostHeroImage/HostHeroImage.scss?', + ); + + /***/ + }, + /* 1055 */ + /* unknown exports provided */ + /* exports used: default */ + /*!**********************************************************!*\ + !*** ./app/libs/components/HostSection/HostSection.scss ***! + \**********************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"HostSection": "HostSection__HostSection__1g8bw"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/HostSection/HostSection.scss\n// module id = 1055\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/HostSection/HostSection.scss?', + ); + + /***/ + }, + /* 1056 */ + /* unknown exports provided */ + /* exports used: default */ + /*!**********************************************************************!*\ + !*** ./app/libs/components/HostSectionHeader/HostSectionHeader.scss ***! + \**********************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"HostSectionHeader": "HostSectionHeader__HostSectionHeader__12UDo",\n\t"title": "HostSectionHeader__title__eWbdM",\n\t"description": "HostSectionHeader__description__1PQXU"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/HostSectionHeader/HostSectionHeader.scss\n// module id = 1056\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/HostSectionHeader/HostSectionHeader.scss?', + ); + + /***/ + }, + /* 1057 */ + /* unknown exports provided */ + /* exports used: default */ + /*!**************************************************************!*\ + !*** ./app/libs/components/HostSteps/HostStep/HostStep.scss ***! + \**************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"qaData": "HostStep__qaData__3ZC3n",\n\t"HostStep": "HostStep__HostStep__1chlc",\n\t"title": "HostStep__title__1Mo0A",\n\t"number": "HostStep__number__2oHhp",\n\t"text": "HostStep__text__1fODp",\n\t"textHighlight": "HostStep__textHighlight__3ngFK",\n\t"qa": "HostStep__qa__2XzM4",\n\t"question": "HostStep__question__1PpWb",\n\t"answer": "HostStep__answer__FtLVq"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/HostSteps/HostStep/HostStep.scss\n// module id = 1057\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/HostSteps/HostStep/HostStep.scss?', + ); + + /***/ + }, + /* 1058 */ + /* unknown exports provided */ + /* exports used: default */ + /*!******************************************************!*\ + !*** ./app/libs/components/HostSteps/HostSteps.scss ***! + \******************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"HostSteps": "HostSteps__HostSteps__BG2SL"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/HostSteps/HostSteps.scss\n// module id = 1058\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/HostSteps/HostSteps.scss?', + ); + + /***/ + }, + /* 1059 */ + /* unknown exports provided */ + /* exports used: default */ + /*!**********************************************************!*\ + !*** ./app/libs/components/HostStories/HostStories.scss ***! + \**********************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"HostStories": "HostStories__HostStories__2TamG",\n\t"hostStoriesContainer": "HostStories__hostStoriesContainer__Qrlmz",\n\t"title": "HostStories__title__33qzq",\n\t"description": "HostStories__description__3Sek_",\n\t"button": "HostStories__button__p6f-3",\n\t"stories": "HostStories__stories__3lgEP"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/HostStories/HostStories.scss\n// module id = 1059\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/HostStories/HostStories.scss?', + ); + + /***/ + }, + /* 1060 */ + /* unknown exports provided */ + /* exports used: default */ + /*!******************************************************************!*\ + !*** ./app/libs/components/HostStories/HostStory/HostStory.scss ***! + \******************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"HostStory": "HostStory__HostStory__1yOmP",\n\t"type": "HostStory__type__1D9dT",\n\t"innerWrapper": "HostStory__innerWrapper__1Wdr7",\n\t"avatar": "HostStory__avatar__1cq84",\n\t"title": "HostStory__title__2HV05",\n\t"review": "HostStory__review__1Je-y"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/HostStories/HostStory/HostStory.scss\n// module id = 1060\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/HostStories/HostStory/HostStory.scss?', + ); + + /***/ + }, + /* 1061 */ + /* unknown exports provided */ + /* exports used: default */ + /*!**********************************************************!*\ + !*** ./app/libs/components/IconTooltip/IconTooltip.scss ***! + \**********************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"tooltip": "IconTooltip__tooltip__2wukL",\n\t"super": "IconTooltip__super__2US0Y",\n\t"ok": "IconTooltip__ok__3S8F1",\n\t"info": "IconTooltip__info__183uP",\n\t"question": "IconTooltip__question__bpSsm",\n\t"warning": "IconTooltip__warning__2Lf6f",\n\t"error": "IconTooltip__error__2pKAz"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/IconTooltip/IconTooltip.scss\n// module id = 1061\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/IconTooltip/IconTooltip.scss?', + ); + + /***/ + }, + /* 1062 */ + /* unknown exports provided */ + /* exports used: default */ + /*!**********************************************!*\ + !*** ./app/libs/components/Links/index.scss ***! + \**********************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"link": "index__link__2aBkn",\n\t"disabled": "index__disabled__14QHs",\n\t"color--black": "index__color--black__1_7HL",\n\t"color--primary": "index__color--primary__2_Uh3",\n\t"color--white": "index__color--white__2IuE5",\n\t"underline": "index__underline__q9oo3",\n\t"underlineSolidAlways--black": "index__underlineSolidAlways--black__3YhTC",\n\t"underlineSolidAlways--white": "index__underlineSolidAlways--white__2xIac",\n\t"underlineSolidAlways--primary": "index__underlineSolidAlways--primary__2PVKI",\n\t"underlineSolidAlways--warning": "index__underlineSolidAlways--warning__10kq_",\n\t"underlineSolidAlways--danger": "index__underlineSolidAlways--danger__1Brs6",\n\t"underlineSolidActive--black": "index__underlineSolidActive--black__67JPI",\n\t"underlineSolidActive--white": "index__underlineSolidActive--white__D_C_a",\n\t"underlineSolidActive--primary": "index__underlineSolidActive--primary__RuKMS",\n\t"underlineSolidActive--warning": "index__underlineSolidActive--warning__tJUGr",\n\t"underlineSolidActive--danger": "index__underlineSolidActive--danger__5YxMr",\n\t"underlineDottedAlways--black": "index__underlineDottedAlways--black__s7-PH",\n\t"underlineDottedAlways--white": "index__underlineDottedAlways--white__J0J7z",\n\t"underlineDottedAlways--primary": "index__underlineDottedAlways--primary__11wBm",\n\t"underlineDottedAlways--warning": "index__underlineDottedAlways--warning__2EYbZ",\n\t"underlineDottedAlways--danger": "index__underlineDottedAlways--danger__3V4k9",\n\t"underlineDottedActive--black": "index__underlineDottedActive--black__2U7Lp",\n\t"underlineDottedActive--white": "index__underlineDottedActive--white__NQOZR",\n\t"underlineDottedActive--primary": "index__underlineDottedActive--primary__NpFqH",\n\t"underlineDottedActive--warning": "index__underlineDottedActive--warning__2Al3J",\n\t"underlineDottedActive--danger": "index__underlineDottedActive--danger__1fS7C"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/Links/index.scss\n// module id = 1062\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/Links/index.scss?', + ); + + /***/ + }, + /* 1063 */ + /* unknown exports provided */ + /* exports used: default */ + /*!************************************************************************!*\ + !*** ./app/libs/components/ListingTile/HostInfoCard/HostInfoCard.scss ***! + \************************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"hostInfoCardCommon": "HostInfoCard__hostInfoCardCommon__3fvVP",\n\t"hostInfoCardBelow": "HostInfoCard__hostInfoCardBelow__CqzAl HostInfoCard__hostInfoCardCommon__3fvVP",\n\t"hostInfoCardAbove": "HostInfoCard__hostInfoCardAbove__7Ayyw HostInfoCard__hostInfoCardCommon__3fvVP",\n\t"hostInfoCardInner": "HostInfoCard__hostInfoCardInner__33TD3",\n\t"infoMutual": "HostInfoCard__infoMutual__2PpvO",\n\t"hostName": "HostInfoCard__hostName__FPHpz",\n\t"info": "HostInfoCard__info__1KlPW",\n\t"arrow": "HostInfoCard__arrow__2FCGn",\n\t"bottomArrow": "HostInfoCard__bottomArrow__mUTnh HostInfoCard__arrow__2FCGn",\n\t"topArrow": "HostInfoCard__topArrow__1fxHA HostInfoCard__arrow__2FCGn"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/ListingTile/HostInfoCard/HostInfoCard.scss\n// module id = 1063\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/ListingTile/HostInfoCard/HostInfoCard.scss?', + ); + + /***/ + }, + /* 1064 */ + /* unknown exports provided */ + /* exports used: default */ + /*!******************************************************************************!*\ + !*** ./app/libs/components/ListingTile/ListingFavorite/ListingFavorite.scss ***! + \******************************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"heartContainer": "ListingFavorite__heartContainer__3zDCs",\n\t"heartEmpty": "ListingFavorite__heartEmpty__16fY5",\n\t"disabled": "ListingFavorite__disabled__3QrGu",\n\t"heartFullOff": "ListingFavorite__heartFullOff__28TQ_ ListingFavorite__heartFullCommon__3k3H0",\n\t"heartFullCommon": "ListingFavorite__heartFullCommon__3k3H0",\n\t"heartFullOn": "ListingFavorite__heartFullOn__2qtNm ListingFavorite__heartFullCommon__3k3H0"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/ListingTile/ListingFavorite/ListingFavorite.scss\n// module id = 1064\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/ListingTile/ListingFavorite/ListingFavorite.scss?', + ); + + /***/ + }, + /* 1065 */ + /* unknown exports provided */ + /* exports used: default */ + /*!******************************************************************************************!*\ + !*** ./app/libs/components/ListingTile/ListingFavoritesCount/ListingFavoritesCount.scss ***! + \******************************************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"favoritesCount": "ListingFavoritesCount__favoritesCount__2fQfh"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/ListingTile/ListingFavoritesCount/ListingFavoritesCount.scss\n// module id = 1065\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/ListingTile/ListingFavoritesCount/ListingFavoritesCount.scss?', + ); + + /***/ + }, + /* 1066 */ + /* unknown exports provided */ + /* exports used: default */ + /*!**********************************************************************************************!*\ + !*** ./app/libs/components/ListingTile/ListingPhotoPlaceholder/ListingPhotoPlaceholder.scss ***! + \**********************************************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"wrapper": "ListingPhotoPlaceholder__wrapper__IWqJ_",\n\t"icon": "ListingPhotoPlaceholder__icon__WGcLJ"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/ListingTile/ListingPhotoPlaceholder/ListingPhotoPlaceholder.scss\n// module id = 1066\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/ListingTile/ListingPhotoPlaceholder/ListingPhotoPlaceholder.scss?', + ); + + /***/ + }, + /* 1067 */ + /* unknown exports provided */ + /* exports used: default */ + /*!**********************************************************!*\ + !*** ./app/libs/components/ListingTile/ListingTile.scss ***! + \**********************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"image": "ListingTile__image__3t-8F",\n\t"imageContainerOuter": "ListingTile__imageContainerOuter__2-sI4",\n\t"next": "ListingTile__next__15auv ListingTile__prevNextCommon__3FEYZ",\n\t"prev": "ListingTile__prev__3AH_C ListingTile__prevNextCommon__3FEYZ",\n\t"imageContainerInner": "ListingTile__imageContainerInner__2MNC6",\n\t"title": "ListingTile__title__1rCaa",\n\t"titleTruncated": "ListingTile__titleTruncated__i2tV4 ListingTile__title__1rCaa",\n\t"subtitle": "ListingTile__subtitle__Frt2I",\n\t"info": "ListingTile__info__eaTMJ",\n\t"price": "ListingTile__price__3qVAO",\n\t"prevNextCommon": "ListingTile__prevNextCommon__3FEYZ",\n\t"nextPrevIcon": "ListingTile__nextPrevIcon__2BHBg",\n\t"link": "ListingTile__link__1pQIX",\n\t"hostInfo": "ListingTile__hostInfo__2w67c",\n\t"host": "ListingTile__host__arkvN",\n\t"hostImage": "ListingTile__hostImage__1aSD7",\n\t"hostInfoCard": "ListingTile__hostInfoCard__INNhH",\n\t"favoriteContainer": "ListingTile__favoriteContainer__TF-WS",\n\t"backgroundLoadPhotosContainer": "ListingTile__backgroundLoadPhotosContainer__3TYfV",\n\t"h100": "ListingTile__h100__2ajKb",\n\t"approximateLocation": "ListingTile__approximateLocation__VTH9g",\n\t"pin": "ListingTile__pin__wDZKP",\n\t"relationshipIndicator": "ListingTile__relationshipIndicator__2bvDN",\n\t"propertyOwnerIndicator": "ListingTile__propertyOwnerIndicator__1T8it ListingTile__relationshipIndicator__2bvDN",\n\t"membershipIndicator": "ListingTile__membershipIndicator__3Seq5 ListingTile__relationshipIndicator__2bvDN",\n\t"contactIndicator": "ListingTile__contactIndicator__3UC8l ListingTile__relationshipIndicator__2bvDN",\n\t"sidebar": "ListingTile__sidebar__2IzUG",\n\t"privacyPropertyOwnerContainerOuter": "ListingTile__privacyPropertyOwnerContainerOuter__2R8ql",\n\t"privacyIndicatorContainer": "ListingTile__privacyIndicatorContainer__1p27Q",\n\t"isMini": "ListingTile__isMini__RuEvs"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/ListingTile/ListingTile.scss\n// module id = 1067\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/ListingTile/ListingTile.scss?', + ); + + /***/ + }, + /* 1068 */ + /* unknown exports provided */ + /* exports used: default */ + /*!************************************************************!*\ + !*** ./app/libs/components/Modal/CloseIcon/CloseIcon.scss ***! + \************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"wrapper": "CloseIcon__wrapper__3Xapt",\n\t"icon": "CloseIcon__icon__A6STX"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/Modal/CloseIcon/CloseIcon.scss\n// module id = 1068\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/Modal/CloseIcon/CloseIcon.scss?', + ); + + /***/ + }, + /* 1069 */ + /* unknown exports provided */ + /* exports used: default */ + /*!******************************************************!*\ + !*** ./app/libs/components/Modal/Footer/Footer.scss ***! + \******************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"footer": "Footer__footer__1ILoa"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/Modal/Footer/Footer.scss\n// module id = 1069\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/Modal/Footer/Footer.scss?', + ); + + /***/ + }, + /* 1070 */ + /* unknown exports provided */ + /* exports used: default */ + /*!**************************************************!*\ + !*** ./app/libs/components/Modal/Item/Item.scss ***! + \**************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"item": "Item__item__23nAj"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/Modal/Item/Item.scss\n// module id = 1070\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/Modal/Item/Item.scss?', + ); + + /***/ + }, + /* 1071 */ + /* unknown exports provided */ + /* exports used: default */ + /*!********************************************************!*\ + !*** ./app/libs/components/Modal/Message/Message.scss ***! + \********************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"message": "Message__message__rNNDD",\n\t"dismissable": "Message__dismissable__5_XHu",\n\t"type--warning": "Message__type--warning__IgmsE",\n\t"type--danger": "Message__type--danger__em-96",\n\t"type--info": "Message__type--info__1pHo5",\n\t"type--success": "Message__type--success__5AyBC",\n\t"closeIcon": "Message__closeIcon__ELbnR",\n\t"closeIconControl": "Message__closeIconControl__1BlGN"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/Modal/Message/Message.scss\n// module id = 1071\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/Modal/Message/Message.scss?', + ); + + /***/ + }, + /* 1072 */ + /* unknown exports provided */ + /* exports used: default */ + /*!************************************************************!*\ + !*** ./app/libs/components/Modal/Message/Title/Title.scss ***! + \************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"title": "Title__title__1iXJO"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/Modal/Message/Title/Title.scss\n// module id = 1072\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/Modal/Message/Title/Title.scss?', + ); + + /***/ + }, + /* 1073 */ + /* unknown exports provided */ + /* exports used: default */ + /*!**********************************************!*\ + !*** ./app/libs/components/Modal/Modal.scss ***! + \**********************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"modal": "Modal__modal__2Dy4e",\n\t"wrapper": "Modal__wrapper__3niCC",\n\t"spinner": "Modal__spinner__38Xqv"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/Modal/Modal.scss\n// module id = 1073\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/Modal/Modal.scss?', + ); + + /***/ + }, + /* 1074 */ + /* unknown exports provided */ + /* exports used: default */ + /*!************************************************!*\ + !*** ./app/libs/components/Modal/Tab/Tab.scss ***! + \************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"tab": "Tab__tab__3ry97",\n\t"active": "Tab__active__4s_54"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/Modal/Tab/Tab.scss\n// module id = 1074\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/Modal/Tab/Tab.scss?', + ); + + /***/ + }, + /* 1075 */ + /* unknown exports provided */ + /* exports used: default */ + /*!**************************************************!*\ + !*** ./app/libs/components/Modal/Tabs/Tabs.scss ***! + \**************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"wrapper": "Tabs__wrapper__2ccUj"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/Modal/Tabs/Tabs.scss\n// module id = 1075\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/Modal/Tabs/Tabs.scss?', + ); + + /***/ + }, + /* 1076 */ + /* unknown exports provided */ + /* exports used: default */ + /*!****************************************************!*\ + !*** ./app/libs/components/Modal/Title/Title.scss ***! + \****************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"title": "Title__title__29Z2a"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/Modal/Title/Title.scss\n// module id = 1076\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/Modal/Title/Title.scss?', + ); + + /***/ + }, + /* 1077 */ + /* unknown exports provided */ + /* exports used: default */ + /*!****************************************************************************!*\ + !*** ./app/libs/components/MutualFriendsTooltip/MutualFriendsTooltip.scss ***! + \****************************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"mutualFriends": "MutualFriendsTooltip__mutualFriends__2eXU0"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/MutualFriendsTooltip/MutualFriendsTooltip.scss\n// module id = 1077\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/MutualFriendsTooltip/MutualFriendsTooltip.scss?', + ); + + /***/ + }, + /* 1078 */ + /* unknown exports provided */ + /* exports used: default */ + /*!***************************************************!*\ + !*** ./app/libs/components/Navbar/Item/Item.scss ***! + \***************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"item": "Item__item__2ug-4"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/Navbar/Item/Item.scss\n// module id = 1078\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/Navbar/Item/Item.scss?', + ); + + /***/ + }, + /* 1079 */ + /* unknown exports provided */ + /* exports used: default */ + /*!************************************************!*\ + !*** ./app/libs/components/Navbar/Navbar.scss ***! + \************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"wrapper": "Navbar__wrapper__14KxT",\n\t"navbar": "Navbar__navbar__saEIT"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/Navbar/Navbar.scss\n// module id = 1079\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/Navbar/Navbar.scss?', + ); + + /***/ + }, + /* 1080 */ + /* unknown exports provided */ + /* exports used: default */ + /*!***************************************************!*\ + !*** ./app/libs/components/Navbar/Unit/Unit.scss ***! + \***************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"unit": "Unit__unit__3YZQa"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/Navbar/Unit/Unit.scss\n// module id = 1080\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/Navbar/Unit/Unit.scss?', + ); + + /***/ + }, + /* 1081 */ + /* unknown exports provided */ + /* exports used: default */ + /*!**********************************************************************!*\ + !*** ./app/libs/components/NotificationBadge/NotificationBadge.scss ***! + \**********************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"container": "NotificationBadge__container__CwKen",\n\t"badge": "NotificationBadge__badge__2gl-T"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/NotificationBadge/NotificationBadge.scss\n// module id = 1081\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/NotificationBadge/NotificationBadge.scss?', + ); + + /***/ + }, + /* 1082 */ + /* unknown exports provided */ + /* exports used: default */ + /*!******************************************************************************!*\ + !*** ./app/libs/components/RelationshipIndicator/RelationshipIndicator.scss ***! + \******************************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"relationshipContainerCommon": "RelationshipIndicator__relationshipContainerCommon__3QYq0",\n\t"relationshipContainerCommon_public_guest": "RelationshipIndicator__relationshipContainerCommon_public_guest__fYVQx RelationshipIndicator__relationshipContainerCommon__3QYq0",\n\t"relationshipContainerCommon_fb_friend": "RelationshipIndicator__relationshipContainerCommon_fb_friend__2sprl RelationshipIndicator__relationshipContainerCommon__3QYq0",\n\t"relationshipContainerCommon_membership": "RelationshipIndicator__relationshipContainerCommon_membership__NBrOd RelationshipIndicator__relationshipContainerCommon__3QYq0",\n\t"relationshipContainerCommon_owner": "RelationshipIndicator__relationshipContainerCommon_owner__34LhC RelationshipIndicator__relationshipContainerCommon__3QYq0"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/RelationshipIndicator/RelationshipIndicator.scss\n// module id = 1082\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/RelationshipIndicator/RelationshipIndicator.scss?', + ); + + /***/ + }, + /* 1083 */ + /* unknown exports provided */ + /* exports used: default */ + /*!**************************************************************!*\ + !*** ./app/libs/components/Section/Container/Container.scss ***! + \**************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"container": "Container__container__3XIDk"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/Section/Container/Container.scss\n// module id = 1083\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/Section/Container/Container.scss?', + ); + + /***/ + }, + /* 1084 */ + /* unknown exports provided */ + /* exports used: default */ + /*!********************************************************!*\ + !*** ./app/libs/components/Section/Header/Header.scss ***! + \********************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"header": "Header__header__8LzuA"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/Section/Header/Header.scss\n// module id = 1084\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/Section/Header/Header.scss?', + ); + + /***/ + }, + /* 1085 */ + /* unknown exports provided */ + /* exports used: default */ + /*!**************************************************!*\ + !*** ./app/libs/components/Spinner/Spinner.scss ***! + \**************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"wrapper": "Spinner__wrapper__tio6b",\n\t"hoopWrapper": "Spinner__hoopWrapper__3VF8o",\n\t"hoopIcon": "Spinner__hoopIcon__3EqH-",\n\t"clockwise": "Spinner__clockwise__xv_wY",\n\t"hoopCut": "Spinner__hoopCut__2hlG1",\n\t"hoopDonut": "Spinner__hoopDonut__CGIKb",\n\t"donut-rotate": "Spinner__donut-rotate__2-PFS"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/Spinner/Spinner.scss\n// module id = 1085\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/Spinner/Spinner.scss?', + ); + + /***/ + }, + /* 1086 */ + /* unknown exports provided */ + /* exports used: default */ + /*!****************************************************!*\ + !*** ./app/libs/components/Uploader/Uploader.scss ***! + \****************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"wrapper": "Uploader__wrapper__CWjsP"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/Uploader/Uploader.scss\n// module id = 1086\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/Uploader/Uploader.scss?', + ); + + /***/ + }, + /* 1087 */ + /* unknown exports provided */ + /* exports used: default */ + /*!*************************************************************************************************!*\ + !*** ./app/libs/components/Uploader/UploaderOverlay/Overlay/InvalidOverlay/InvalidOverlay.scss ***! + \*************************************************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"invalidIcon": "InvalidOverlay__invalidIcon__2zd-V",\n\t"buttons": "InvalidOverlay__buttons__1bfjc"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/Uploader/UploaderOverlay/Overlay/InvalidOverlay/InvalidOverlay.scss\n// module id = 1087\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/Uploader/UploaderOverlay/Overlay/InvalidOverlay/InvalidOverlay.scss?', + ); + + /***/ + }, + /* 1088 */ + /* unknown exports provided */ + /* exports used: default */ + /*!***************************************************************************!*\ + !*** ./app/libs/components/Uploader/UploaderOverlay/Overlay/Overlay.scss ***! + \***************************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"overlay": "Overlay__overlay__DgF-E",\n\t"contentWrapper": "Overlay__contentWrapper__29ToP"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/Uploader/UploaderOverlay/Overlay/Overlay.scss\n// module id = 1088\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/Uploader/UploaderOverlay/Overlay/Overlay.scss?', + ); + + /***/ + }, + /* 1089 */ + /* unknown exports provided */ + /* exports used: default */ + /*!*********************************************************************************************!*\ + !*** ./app/libs/components/Uploader/UploaderOverlay/Overlay/ValidOverlay/ValidOverlay.scss ***! + \*********************************************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"validIcon": "ValidOverlay__validIcon__itwTy"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/Uploader/UploaderOverlay/Overlay/ValidOverlay/ValidOverlay.scss\n// module id = 1089\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/Uploader/UploaderOverlay/Overlay/ValidOverlay/ValidOverlay.scss?', + ); + + /***/ + }, + /* 1090 */ + /* unknown exports provided */ + /* exports used: default */ + /*!******************************************************!*\ + !*** ./app/libs/components/ZebraList/ZebraList.scss ***! + \******************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"wrapper": "ZebraList__wrapper__2x2Kl"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/ZebraList/ZebraList.scss\n// module id = 1090\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/ZebraList/ZebraList.scss?', + ); + + /***/ + }, + /* 1091 */ + /* unknown exports provided */ + /* exports used: default */ + /*!**********************************************************!*\ + !*** ./app/libs/components/forms/Checkbox/Checkbox.scss ***! + \**********************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"wrapper": "Checkbox__wrapper__20KHg",\n\t"checkbox": "Checkbox__checkbox__2TONY"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/forms/Checkbox/Checkbox.scss\n// module id = 1091\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/forms/Checkbox/Checkbox.scss?', + ); + + /***/ + }, + /* 1092 */ + /* unknown exports provided */ + /* exports used: default */ + /*!*********************************************************!*\ + !*** ./app/libs/components/forms/Input/Base/index.scss ***! + \*********************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"input": "index__input__O9Si5"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/forms/Input/Base/index.scss\n// module id = 1092\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/forms/Input/Base/index.scss?', + ); + + /***/ + }, + /* 1093 */ + /* unknown exports provided */ + /* exports used: default */ + /*!*************************************************************!*\ + !*** ./app/libs/components/forms/Input/WithIcon/index.scss ***! + \*************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"wrapper": "index__wrapper__3BcOh",\n\t"iconWrapper": "index__iconWrapper__1LqmZ",\n\t"icon": "index__icon__qpqrU"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/forms/Input/WithIcon/index.scss\n// module id = 1093\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/forms/Input/WithIcon/index.scss?', + ); + + /***/ + }, + /* 1094 */ + /* unknown exports provided */ + /* exports used: default */ + /*!****************************************************************!*\ + !*** ./app/libs/components/forms/RadioButton/RadioButton.scss ***! + \****************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"wrapper": "RadioButton__wrapper__1m3VM",\n\t"radioButton": "RadioButton__radioButton__34FZI"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/forms/RadioButton/RadioButton.scss\n// module id = 1094\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/forms/RadioButton/RadioButton.scss?', + ); + + /***/ + }, + /* 1095 */ + /* unknown exports provided */ + /* exports used: default */ + /*!******************************************************!*\ + !*** ./app/libs/components/forms/Select/Select.scss ***! + \******************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"wrapper": "Select__wrapper__3CR1K",\n\t"select": "Select__select__3Xixs"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/forms/Select/Select.scss\n// module id = 1095\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/forms/Select/Select.scss?', + ); + + /***/ + }, + /* 1096 */ + /* unknown exports provided */ + /* exports used: default */ + /*!**********************************************************!*\ + !*** ./app/libs/components/forms/Textarea/Textarea.scss ***! + \**********************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"textarea": "Textarea__textarea__2J4Bm"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/forms/Textarea/Textarea.scss\n// module id = 1096\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/forms/Textarea/Textarea.scss?', + ); + + /***/ + }, + /* 1097 */ + /* unknown exports provided */ + /*!******************************************************!*\ + !*** ./app/libs/components/forms/Toggle/Toggle.scss ***! + \******************************************************/ + /***/ function (module, exports) { + eval( + '\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/forms/Toggle/Toggle.scss\n// module id = 1097\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/forms/Toggle/Toggle.scss?', + ); + + /***/ + }, + /* 1098 */ + /* unknown exports provided */ + /* exports used: default */ + /*!**********************************************************************!*\ + !*** ./app/libs/components/icons/IconSoonRibbon/IconSoonRibbon.scss ***! + \**********************************************************************/ + /***/ function (module, exports) { + eval( + 'module.exports = {\n\t"pathFront": "IconSoonRibbon__pathFront__1kk5D",\n\t"pathBehind": "IconSoonRibbon__pathBehind__2vPat",\n\t"g": "IconSoonRibbon__g__3qeHJ",\n\t"text": "IconSoonRibbon__text__2ZE2P"\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/libs/components/icons/IconSoonRibbon/IconSoonRibbon.scss\n// module id = 1098\n// module chunks = 0\n\n//# sourceURL=webpack:///./app/libs/components/icons/IconSoonRibbon/IconSoonRibbon.scss?', + ); + + /***/ + }, + /* 1099 */ + /* unknown exports provided */ + /* exports used: default */ + /*!********************************!*\ + !*** ./~/deep-freeze/index.js ***! + \********************************/ + /***/ function (module, exports) { + eval( + 'module.exports = function deepFreeze (o) {\n Object.freeze(o);\n\n Object.getOwnPropertyNames(o).forEach(function (prop) {\n if (o.hasOwnProperty(prop)\n && o[prop] !== null\n && (typeof o[prop] === "object" || typeof o[prop] === "function")\n && !Object.isFrozen(o[prop])) {\n deepFreeze(o[prop]);\n }\n });\n \n return o;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/deep-freeze/index.js\n// module id = 1099\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/deep-freeze/index.js?', + ); + + /***/ + }, + /* 1100 */ + /* unknown exports provided */ + /* all exports used */ + /*!***********************************!*\ + !*** ./~/delegate/src/closest.js ***! + \***********************************/ + /***/ function (module, exports) { + eval( + "var DOCUMENT_NODE_TYPE = 9;\n\n/**\n * A polyfill for Element.matches()\n */\nif (typeof Element !== 'undefined' && !Element.prototype.matches) {\n var proto = Element.prototype;\n\n proto.matches = proto.matchesSelector ||\n proto.mozMatchesSelector ||\n proto.msMatchesSelector ||\n proto.oMatchesSelector ||\n proto.webkitMatchesSelector;\n}\n\n/**\n * Finds the closest parent that matches a selector.\n *\n * @param {Element} element\n * @param {String} selector\n * @return {Function}\n */\nfunction closest (element, selector) {\n while (element && element.nodeType !== DOCUMENT_NODE_TYPE) {\n if (element.matches(selector)) return element;\n element = element.parentNode;\n }\n}\n\nmodule.exports = closest;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/delegate/src/closest.js\n// module id = 1100\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/delegate/src/closest.js?", + ); + + /***/ + }, + /* 1101 */ + /* unknown exports provided */ + /* all exports used */ + /*!************************************!*\ + !*** ./~/delegate/src/delegate.js ***! + \************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + 'var closest = __webpack_require__(/*! ./closest */ 1100);\n\n/**\n * Delegates event to a selector.\n *\n * @param {Element} element\n * @param {String} selector\n * @param {String} type\n * @param {Function} callback\n * @param {Boolean} useCapture\n * @return {Object}\n */\nfunction delegate(element, selector, type, callback, useCapture) {\n var listenerFn = listener.apply(this, arguments);\n\n element.addEventListener(type, listenerFn, useCapture);\n\n return {\n destroy: function() {\n element.removeEventListener(type, listenerFn, useCapture);\n }\n }\n}\n\n/**\n * Finds closest match and invokes callback.\n *\n * @param {Element} element\n * @param {String} selector\n * @param {String} type\n * @param {Function} callback\n * @return {Function}\n */\nfunction listener(element, selector, type, callback) {\n return function(e) {\n e.delegateTarget = closest(e.target, selector);\n\n if (e.delegateTarget) {\n callback.call(element, e);\n }\n }\n}\n\nmodule.exports = delegate;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/delegate/src/delegate.js\n// module id = 1101\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/delegate/src/delegate.js?', + ); + + /***/ + }, + /* 1102 */ + /* unknown exports provided */ + /* all exports used */ + /*!**********************************************!*\ + !*** ./~/dom-align/lib/adjustForViewport.js ***! + \**********************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\n\nvar _utils = __webpack_require__(/*! ./utils */ 115);\n\nvar _utils2 = _interopRequireDefault(_utils);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }\n\nfunction adjustForViewport(elFuturePos, elRegion, visibleRect, overflow) {\n var pos = _utils2["default"].clone(elFuturePos);\n var size = {\n width: elRegion.width,\n height: elRegion.height\n };\n\n if (overflow.adjustX && pos.left < visibleRect.left) {\n pos.left = visibleRect.left;\n }\n\n // Left edge inside and right edge outside viewport, try to resize it.\n if (overflow.resizeWidth && pos.left >= visibleRect.left && pos.left + size.width > visibleRect.right) {\n size.width -= pos.left + size.width - visibleRect.right;\n }\n\n // Right edge outside viewport, try to move it.\n if (overflow.adjustX && pos.left + size.width > visibleRect.right) {\n // 保证左边界和可视区域左边界对齐\n pos.left = Math.max(visibleRect.right - size.width, visibleRect.left);\n }\n\n // Top edge outside viewport, try to move it.\n if (overflow.adjustY && pos.top < visibleRect.top) {\n pos.top = visibleRect.top;\n }\n\n // Top edge inside and bottom edge outside viewport, try to resize it.\n if (overflow.resizeHeight && pos.top >= visibleRect.top && pos.top + size.height > visibleRect.bottom) {\n size.height -= pos.top + size.height - visibleRect.bottom;\n }\n\n // Bottom edge outside viewport, try to move it.\n if (overflow.adjustY && pos.top + size.height > visibleRect.bottom) {\n // 保证上边界和可视区域上边界对齐\n pos.top = Math.max(visibleRect.bottom - size.height, visibleRect.top);\n }\n\n return _utils2["default"].mix(pos, size);\n}\n\nexports["default"] = adjustForViewport;\nmodule.exports = exports[\'default\'];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/dom-align/lib/adjustForViewport.js\n// module id = 1102\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/dom-align/lib/adjustForViewport.js?', + ); + + /***/ + }, + /* 1103 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************************!*\ + !*** ./~/dom-align/lib/getAlignOffset.js ***! + \*******************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n/**\n * 获取 node 上的 align 对齐点 相对于页面的坐标\n */\n\nfunction getAlignOffset(region, align) {\n var V = align.charAt(0);\n var H = align.charAt(1);\n var w = region.width;\n var h = region.height;\n var x = void 0;\n var y = void 0;\n\n x = region.left;\n y = region.top;\n\n if (V === 'c') {\n y += h / 2;\n } else if (V === 'b') {\n y += h;\n }\n\n if (H === 'c') {\n x += w / 2;\n } else if (H === 'r') {\n x += w;\n }\n\n return {\n left: x,\n top: y\n };\n}\n\nexports[\"default\"] = getAlignOffset;\nmodule.exports = exports['default'];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/dom-align/lib/getAlignOffset.js\n// module id = 1103\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/dom-align/lib/getAlignOffset.js?", + ); + + /***/ + }, + /* 1104 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************************!*\ + !*** ./~/dom-align/lib/getElFuturePos.js ***! + \*******************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\n\nvar _getAlignOffset = __webpack_require__(/*! ./getAlignOffset */ 1103);\n\nvar _getAlignOffset2 = _interopRequireDefault(_getAlignOffset);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }\n\nfunction getElFuturePos(elRegion, refNodeRegion, points, offset, targetOffset) {\n var xy = void 0;\n var diff = void 0;\n var p1 = void 0;\n var p2 = void 0;\n\n xy = {\n left: elRegion.left,\n top: elRegion.top\n };\n\n p1 = (0, _getAlignOffset2["default"])(refNodeRegion, points[1]);\n p2 = (0, _getAlignOffset2["default"])(elRegion, points[0]);\n\n diff = [p2.left - p1.left, p2.top - p1.top];\n\n return {\n left: xy.left - diff[0] + offset[0] - targetOffset[0],\n top: xy.top - diff[1] + offset[1] - targetOffset[1]\n };\n}\n\nexports["default"] = getElFuturePos;\nmodule.exports = exports[\'default\'];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/dom-align/lib/getElFuturePos.js\n// module id = 1104\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/dom-align/lib/getElFuturePos.js?', + ); + + /***/ + }, + /* 1105 */ + /* unknown exports provided */ + /* all exports used */ + /*!**************************************!*\ + !*** ./~/dom-align/lib/getRegion.js ***! + \**************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\n\nvar _utils = __webpack_require__(/*! ./utils */ 115);\n\nvar _utils2 = _interopRequireDefault(_utils);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }\n\nfunction getRegion(node) {\n var offset = void 0;\n var w = void 0;\n var h = void 0;\n if (!_utils2["default"].isWindow(node) && node.nodeType !== 9) {\n offset = _utils2["default"].offset(node);\n w = _utils2["default"].outerWidth(node);\n h = _utils2["default"].outerHeight(node);\n } else {\n var win = _utils2["default"].getWindow(node);\n offset = {\n left: _utils2["default"].getWindowScrollLeft(win),\n top: _utils2["default"].getWindowScrollTop(win)\n };\n w = _utils2["default"].viewportWidth(win);\n h = _utils2["default"].viewportHeight(win);\n }\n offset.width = w;\n offset.height = h;\n return offset;\n}\n\nexports["default"] = getRegion;\nmodule.exports = exports[\'default\'];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/dom-align/lib/getRegion.js\n// module id = 1105\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/dom-align/lib/getRegion.js?', + ); + + /***/ + }, + /* 1106 */ + /* unknown exports provided */ + /* all exports used */ + /*!*****************************************************!*\ + !*** ./~/dom-align/lib/getVisibleRectForElement.js ***! + \*****************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\n\nvar _utils = __webpack_require__(/*! ./utils */ 115);\n\nvar _utils2 = _interopRequireDefault(_utils);\n\nvar _getOffsetParent = __webpack_require__(/*! ./getOffsetParent */ 338);\n\nvar _getOffsetParent2 = _interopRequireDefault(_getOffsetParent);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }\n\n/**\n * 获得元素的显示部分的区域\n */\nfunction getVisibleRectForElement(element) {\n var visibleRect = {\n left: 0,\n right: Infinity,\n top: 0,\n bottom: Infinity\n };\n var el = (0, _getOffsetParent2["default"])(element);\n var scrollX = void 0;\n var scrollY = void 0;\n var winSize = void 0;\n var doc = element.ownerDocument;\n var win = doc.defaultView || doc.parentWindow;\n var body = doc.body;\n var documentElement = doc.documentElement;\n\n // Determine the size of the visible rect by climbing the dom accounting for\n // all scrollable containers.\n while (el) {\n // clientWidth is zero for inline block elements in ie.\n if ((navigator.userAgent.indexOf(\'MSIE\') === -1 || el.clientWidth !== 0) &&\n // body may have overflow set on it, yet we still get the entire\n // viewport. In some browsers, el.offsetParent may be\n // document.documentElement, so check for that too.\n el !== body && el !== documentElement && _utils2["default"].css(el, \'overflow\') !== \'visible\') {\n var pos = _utils2["default"].offset(el);\n // add border\n pos.left += el.clientLeft;\n pos.top += el.clientTop;\n visibleRect.top = Math.max(visibleRect.top, pos.top);\n visibleRect.right = Math.min(visibleRect.right,\n // consider area without scrollBar\n pos.left + el.clientWidth);\n visibleRect.bottom = Math.min(visibleRect.bottom, pos.top + el.clientHeight);\n visibleRect.left = Math.max(visibleRect.left, pos.left);\n } else if (el === body || el === documentElement) {\n break;\n }\n el = (0, _getOffsetParent2["default"])(el);\n }\n\n // Clip by window\'s viewport.\n scrollX = _utils2["default"].getWindowScrollLeft(win);\n scrollY = _utils2["default"].getWindowScrollTop(win);\n visibleRect.left = Math.max(visibleRect.left, scrollX);\n visibleRect.top = Math.max(visibleRect.top, scrollY);\n winSize = {\n width: _utils2["default"].viewportWidth(win),\n height: _utils2["default"].viewportHeight(win)\n };\n visibleRect.right = Math.min(visibleRect.right, scrollX + winSize.width);\n visibleRect.bottom = Math.min(visibleRect.bottom, scrollY + winSize.height);\n return visibleRect.top >= 0 && visibleRect.left >= 0 && visibleRect.bottom > visibleRect.top && visibleRect.right > visibleRect.left ? visibleRect : null;\n}\n\nexports["default"] = getVisibleRectForElement;\nmodule.exports = exports[\'default\'];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/dom-align/lib/getVisibleRectForElement.js\n// module id = 1106\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/dom-align/lib/getVisibleRectForElement.js?', + ); + + /***/ + }, + /* 1107 */ + /* unknown exports provided */ + /* all exports used */ + /*!**********************************!*\ + !*** ./~/dom-align/lib/index.js ***! + \**********************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\n\nvar _utils = __webpack_require__(/*! ./utils */ 115);\n\nvar _utils2 = _interopRequireDefault(_utils);\n\nvar _getOffsetParent = __webpack_require__(/*! ./getOffsetParent */ 338);\n\nvar _getOffsetParent2 = _interopRequireDefault(_getOffsetParent);\n\nvar _getVisibleRectForElement = __webpack_require__(/*! ./getVisibleRectForElement */ 1106);\n\nvar _getVisibleRectForElement2 = _interopRequireDefault(_getVisibleRectForElement);\n\nvar _adjustForViewport = __webpack_require__(/*! ./adjustForViewport */ 1102);\n\nvar _adjustForViewport2 = _interopRequireDefault(_adjustForViewport);\n\nvar _getRegion = __webpack_require__(/*! ./getRegion */ 1105);\n\nvar _getRegion2 = _interopRequireDefault(_getRegion);\n\nvar _getElFuturePos = __webpack_require__(/*! ./getElFuturePos */ 1104);\n\nvar _getElFuturePos2 = _interopRequireDefault(_getElFuturePos);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }\n\n// http://yiminghe.iteye.com/blog/1124720\n\n/**\n * align dom node flexibly\n * @author yiminghe@gmail.com\n */\n\nfunction isFailX(elFuturePos, elRegion, visibleRect) {\n return elFuturePos.left < visibleRect.left || elFuturePos.left + elRegion.width > visibleRect.right;\n}\n\nfunction isFailY(elFuturePos, elRegion, visibleRect) {\n return elFuturePos.top < visibleRect.top || elFuturePos.top + elRegion.height > visibleRect.bottom;\n}\n\nfunction isCompleteFailX(elFuturePos, elRegion, visibleRect) {\n return elFuturePos.left > visibleRect.right || elFuturePos.left + elRegion.width < visibleRect.left;\n}\n\nfunction isCompleteFailY(elFuturePos, elRegion, visibleRect) {\n return elFuturePos.top > visibleRect.bottom || elFuturePos.top + elRegion.height < visibleRect.top;\n}\n\nfunction flip(points, reg, map) {\n var ret = [];\n _utils2["default"].each(points, function (p) {\n ret.push(p.replace(reg, function (m) {\n return map[m];\n }));\n });\n return ret;\n}\n\nfunction flipOffset(offset, index) {\n offset[index] = -offset[index];\n return offset;\n}\n\nfunction convertOffset(str, offsetLen) {\n var n = void 0;\n if (/%$/.test(str)) {\n n = parseInt(str.substring(0, str.length - 1), 10) / 100 * offsetLen;\n } else {\n n = parseInt(str, 10);\n }\n return n || 0;\n}\n\nfunction normalizeOffset(offset, el) {\n offset[0] = convertOffset(offset[0], el.width);\n offset[1] = convertOffset(offset[1], el.height);\n}\n\nfunction domAlign(el, refNode, align) {\n var points = align.points;\n var offset = align.offset || [0, 0];\n var targetOffset = align.targetOffset || [0, 0];\n var overflow = align.overflow;\n var target = align.target || refNode;\n var source = align.source || el;\n offset = [].concat(offset);\n targetOffset = [].concat(targetOffset);\n overflow = overflow || {};\n var newOverflowCfg = {};\n\n var fail = 0;\n // 当前节点可以被放置的显示区域\n var visibleRect = (0, _getVisibleRectForElement2["default"])(source);\n // 当前节点所占的区域, left/top/width/height\n var elRegion = (0, _getRegion2["default"])(source);\n // 参照节点所占的区域, left/top/width/height\n var refNodeRegion = (0, _getRegion2["default"])(target);\n // 将 offset 转换成数值,支持百分比\n normalizeOffset(offset, elRegion);\n normalizeOffset(targetOffset, refNodeRegion);\n // 当前节点将要被放置的位置\n var elFuturePos = (0, _getElFuturePos2["default"])(elRegion, refNodeRegion, points, offset, targetOffset);\n // 当前节点将要所处的区域\n var newElRegion = _utils2["default"].merge(elRegion, elFuturePos);\n\n // 如果可视区域不能完全放置当前节点时允许调整\n if (visibleRect && (overflow.adjustX || overflow.adjustY)) {\n if (overflow.adjustX) {\n // 如果横向不能放下\n if (isFailX(elFuturePos, elRegion, visibleRect)) {\n // 对齐位置反下\n var newPoints = flip(points, /[lr]/ig, {\n l: \'r\',\n r: \'l\'\n });\n // 偏移量也反下\n var newOffset = flipOffset(offset, 0);\n var newTargetOffset = flipOffset(targetOffset, 0);\n var newElFuturePos = (0, _getElFuturePos2["default"])(elRegion, refNodeRegion, newPoints, newOffset, newTargetOffset);\n if (!isCompleteFailX(newElFuturePos, elRegion, visibleRect)) {\n fail = 1;\n points = newPoints;\n offset = newOffset;\n targetOffset = newTargetOffset;\n }\n }\n }\n\n if (overflow.adjustY) {\n // 如果纵向不能放下\n if (isFailY(elFuturePos, elRegion, visibleRect)) {\n // 对齐位置反下\n var _newPoints = flip(points, /[tb]/ig, {\n t: \'b\',\n b: \'t\'\n });\n // 偏移量也反下\n var _newOffset = flipOffset(offset, 1);\n var _newTargetOffset = flipOffset(targetOffset, 1);\n var _newElFuturePos = (0, _getElFuturePos2["default"])(elRegion, refNodeRegion, _newPoints, _newOffset, _newTargetOffset);\n if (!isCompleteFailY(_newElFuturePos, elRegion, visibleRect)) {\n fail = 1;\n points = _newPoints;\n offset = _newOffset;\n targetOffset = _newTargetOffset;\n }\n }\n }\n\n // 如果失败,重新计算当前节点将要被放置的位置\n if (fail) {\n elFuturePos = (0, _getElFuturePos2["default"])(elRegion, refNodeRegion, points, offset, targetOffset);\n _utils2["default"].mix(newElRegion, elFuturePos);\n }\n\n // 检查反下后的位置是否可以放下了\n // 如果仍然放不下只有指定了可以调整当前方向才调整\n newOverflowCfg.adjustX = overflow.adjustX && isFailX(elFuturePos, elRegion, visibleRect);\n\n newOverflowCfg.adjustY = overflow.adjustY && isFailY(elFuturePos, elRegion, visibleRect);\n\n // 确实要调整,甚至可能会调整高度宽度\n if (newOverflowCfg.adjustX || newOverflowCfg.adjustY) {\n newElRegion = (0, _adjustForViewport2["default"])(elFuturePos, elRegion, visibleRect, newOverflowCfg);\n }\n }\n\n // need judge to in case set fixed with in css on height auto element\n if (newElRegion.width !== elRegion.width) {\n _utils2["default"].css(source, \'width\', _utils2["default"].width(source) + newElRegion.width - elRegion.width);\n }\n\n if (newElRegion.height !== elRegion.height) {\n _utils2["default"].css(source, \'height\', _utils2["default"].height(source) + newElRegion.height - elRegion.height);\n }\n\n // https://github.com/kissyteam/kissy/issues/190\n // 相对于屏幕位置没变,而 left/top 变了\n // 例如 <div \'relative\'><el absolute></div>\n _utils2["default"].offset(source, {\n left: newElRegion.left,\n top: newElRegion.top\n }, {\n useCssRight: align.useCssRight,\n useCssBottom: align.useCssBottom,\n useCssTransform: align.useCssTransform\n });\n\n return {\n points: points,\n offset: offset,\n targetOffset: targetOffset,\n overflow: newOverflowCfg\n };\n}\n\ndomAlign.__getOffsetParent = _getOffsetParent2["default"];\n\ndomAlign.__getVisibleRectForElement = _getVisibleRectForElement2["default"];\n\nexports["default"] = domAlign;\n/**\n * 2012-04-26 yiminghe@gmail.com\n * - 优化智能对齐算法\n * - 慎用 resizeXX\n *\n * 2011-07-13 yiminghe@gmail.com note:\n * - 增加智能对齐,以及大小调整选项\n **/\n\nmodule.exports = exports[\'default\'];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/dom-align/lib/index.js\n// module id = 1107\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/dom-align/lib/index.js?', + ); + + /***/ + }, + /* 1108 */ + /* unknown exports provided */ + /* all exports used */ + /*!******************************************!*\ + !*** ./~/dom-align/lib/propertyUtils.js ***! + \******************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getTransformName = getTransformName;\nexports.setTransitionProperty = setTransitionProperty;\nexports.getTransitionProperty = getTransitionProperty;\nexports.getTransformXY = getTransformXY;\nexports.setTransformXY = setTransformXY;\nvar vendorPrefix = void 0;\n\nvar jsCssMap = {\n Webkit: '-webkit-',\n Moz: '-moz-',\n // IE did it wrong again ...\n ms: '-ms-',\n O: '-o-'\n};\n\nfunction getVendorPrefix() {\n if (vendorPrefix !== undefined) {\n return vendorPrefix;\n }\n vendorPrefix = '';\n var style = document.createElement('p').style;\n var testProp = 'Transform';\n for (var key in jsCssMap) {\n if (key + testProp in style) {\n vendorPrefix = key;\n }\n }\n return vendorPrefix;\n}\n\nfunction getTransitionName() {\n return getVendorPrefix() ? getVendorPrefix() + 'TransitionProperty' : 'transitionProperty';\n}\n\nfunction getTransformName() {\n return getVendorPrefix() ? getVendorPrefix() + 'Transform' : 'transform';\n}\n\nfunction setTransitionProperty(node, value) {\n var name = getTransitionName();\n if (name) {\n node.style[name] = value;\n if (name !== 'transitionProperty') {\n node.style.transitionProperty = value;\n }\n }\n}\n\nfunction setTransform(node, value) {\n var name = getTransformName();\n if (name) {\n node.style[name] = value;\n if (name !== 'transform') {\n node.style.transform = value;\n }\n }\n}\n\nfunction getTransitionProperty(node) {\n return node.style.transitionProperty || node.style[getTransitionName()];\n}\n\nfunction getTransformXY(node) {\n var style = window.getComputedStyle(node, null);\n var transform = style.getPropertyValue('transform') || style.getPropertyValue(getTransformName());\n if (transform && transform !== 'none') {\n var matrix = transform.replace(/[^0-9\\-.,]/g, '').split(',');\n return { x: parseFloat(matrix[12] || matrix[4], 0), y: parseFloat(matrix[13] || matrix[5], 0) };\n }\n return {\n x: 0,\n y: 0\n };\n}\n\nvar matrix2d = /matrix\\((.*)\\)/;\nvar matrix3d = /matrix3d\\((.*)\\)/;\n\nfunction setTransformXY(node, xy) {\n var style = window.getComputedStyle(node, null);\n var transform = style.getPropertyValue('transform') || style.getPropertyValue(getTransformName());\n if (transform && transform !== 'none') {\n var arr = void 0;\n var match2d = transform.match(matrix2d);\n if (match2d) {\n match2d = match2d[1];\n arr = match2d.split(',').map(function (item) {\n return parseFloat(item, 10);\n });\n arr[4] = xy.x;\n arr[5] = xy.y;\n setTransform(node, 'matrix(' + arr.join(',') + ')');\n } else {\n var match3d = transform.match(matrix3d)[1];\n arr = match3d.split(',').map(function (item) {\n return parseFloat(item, 10);\n });\n arr[12] = xy.x;\n arr[13] = xy.y;\n setTransform(node, 'matrix3d(' + arr.join(',') + ')');\n }\n } else {\n setTransform(node, 'translateX(' + xy.x + 'px) translateY(' + xy.y + 'px) translateZ(0)');\n }\n}\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/dom-align/lib/propertyUtils.js\n// module id = 1108\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/dom-align/lib/propertyUtils.js?", + ); + + /***/ + }, + /* 1109 */ + /* unknown exports provided */ + /* all exports used */ + /*!*****************************************!*\ + !*** ./~/dom-helpers/class/addClass.js ***! + \*****************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = addClass;\n\nvar _hasClass = __webpack_require__(/*! ./hasClass */ 340);\n\nvar _hasClass2 = _interopRequireDefault(_hasClass);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction addClass(element, className) {\n if (element.classList) element.classList.add(className);else if (!(0, _hasClass2.default)(element)) element.className = element.className + ' ' + className;\n}\nmodule.exports = exports['default'];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/dom-helpers/class/addClass.js\n// module id = 1109\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/dom-helpers/class/addClass.js?", + ); + + /***/ + }, + /* 1110 */ + /* unknown exports provided */ + /* all exports used */ + /*!**************************************!*\ + !*** ./~/dom-helpers/class/index.js ***! + \**************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.hasClass = exports.removeClass = exports.addClass = undefined;\n\nvar _addClass = __webpack_require__(/*! ./addClass */ 1109);\n\nvar _addClass2 = _interopRequireDefault(_addClass);\n\nvar _removeClass = __webpack_require__(/*! ./removeClass */ 1111);\n\nvar _removeClass2 = _interopRequireDefault(_removeClass);\n\nvar _hasClass = __webpack_require__(/*! ./hasClass */ 340);\n\nvar _hasClass2 = _interopRequireDefault(_hasClass);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.addClass = _addClass2.default;\nexports.removeClass = _removeClass2.default;\nexports.hasClass = _hasClass2.default;\nexports.default = { addClass: _addClass2.default, removeClass: _removeClass2.default, hasClass: _hasClass2.default };\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/dom-helpers/class/index.js\n// module id = 1110\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/dom-helpers/class/index.js?', + ); + + /***/ + }, + /* 1111 */ + /* unknown exports provided */ + /* all exports used */ + /*!********************************************!*\ + !*** ./~/dom-helpers/class/removeClass.js ***! + \********************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nmodule.exports = function removeClass(element, className) {\n if (element.classList) element.classList.remove(className);else element.className = element.className.replace(new RegExp('(^|\\\\s)' + className + '(?:\\\\s|$)', 'g'), '$1').replace(/\\s+/g, ' ').replace(/^\\s*|\\s*$/g, '');\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/dom-helpers/class/removeClass.js\n// module id = 1111\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/dom-helpers/class/removeClass.js?", + ); + + /***/ + }, + /* 1112 */ + /* unknown exports provided */ + /* all exports used */ + /*!****************************************!*\ + !*** ./~/dom-helpers/events/filter.js ***! + \****************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = filterEvents;\n\nvar _contains = __webpack_require__(/*! ../query/contains */ 95);\n\nvar _contains2 = _interopRequireDefault(_contains);\n\nvar _querySelectorAll = __webpack_require__(/*! ../query/querySelectorAll */ 1117);\n\nvar _querySelectorAll2 = _interopRequireDefault(_querySelectorAll);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction filterEvents(selector, handler) {\n return function filterHandler(e) {\n var top = e.currentTarget,\n target = e.target,\n matches = (0, _querySelectorAll2.default)(top, selector);\n\n if (matches.some(function (match) {\n return (0, _contains2.default)(match, target);\n })) handler.call(this, e);\n };\n}\nmodule.exports = exports[\'default\'];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/dom-helpers/events/filter.js\n// module id = 1112\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/dom-helpers/events/filter.js?', + ); + + /***/ + }, + /* 1113 */ + /* unknown exports provided */ + /* exports used: default */ + /*!***************************************!*\ + !*** ./~/dom-helpers/events/index.js ***! + \***************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.listen = exports.filter = exports.off = exports.on = undefined;\n\nvar _on = __webpack_require__(/*! ./on */ 156);\n\nvar _on2 = _interopRequireDefault(_on);\n\nvar _off = __webpack_require__(/*! ./off */ 211);\n\nvar _off2 = _interopRequireDefault(_off);\n\nvar _filter = __webpack_require__(/*! ./filter */ 1112);\n\nvar _filter2 = _interopRequireDefault(_filter);\n\nvar _listen = __webpack_require__(/*! ./listen */ 1114);\n\nvar _listen2 = _interopRequireDefault(_listen);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.on = _on2.default;\nexports.off = _off2.default;\nexports.filter = _filter2.default;\nexports.listen = _listen2.default;\nexports.default = { on: _on2.default, off: _off2.default, filter: _filter2.default, listen: _listen2.default };\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/dom-helpers/events/index.js\n// module id = 1113\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/dom-helpers/events/index.js?', + ); + + /***/ + }, + /* 1114 */ + /* unknown exports provided */ + /* all exports used */ + /*!****************************************!*\ + !*** ./~/dom-helpers/events/listen.js ***! + \****************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\n\nvar _inDOM = __webpack_require__(/*! ../util/inDOM */ 65);\n\nvar _inDOM2 = _interopRequireDefault(_inDOM);\n\nvar _on = __webpack_require__(/*! ./on */ 156);\n\nvar _on2 = _interopRequireDefault(_on);\n\nvar _off = __webpack_require__(/*! ./off */ 211);\n\nvar _off2 = _interopRequireDefault(_off);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar listen = function listen() {};\n\nif (_inDOM2.default) {\n listen = function listen(node, eventName, handler, capture) {\n (0, _on2.default)(node, eventName, handler, capture);\n return function () {\n (0, _off2.default)(node, eventName, handler, capture);\n };\n };\n}\n\nexports.default = listen;\nmodule.exports = exports[\'default\'];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/dom-helpers/events/listen.js\n// module id = 1114\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/dom-helpers/events/listen.js?', + ); + + /***/ + }, + /* 1115 */ + /* unknown exports provided */ + /* all exports used */ + /*!*********************************************!*\ + !*** ./~/dom-helpers/query/offsetParent.js ***! + \*********************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = offsetParent;\n\nvar _ownerDocument = __webpack_require__(/*! ../ownerDocument */ 94);\n\nvar _ownerDocument2 = _interopRequireDefault(_ownerDocument);\n\nvar _style = __webpack_require__(/*! ../style */ 158);\n\nvar _style2 = _interopRequireDefault(_style);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction nodeName(node) {\n return node.nodeName && node.nodeName.toLowerCase();\n}\n\nfunction offsetParent(node) {\n var doc = (0, _ownerDocument2.default)(node),\n offsetParent = node && node.offsetParent;\n\n while (offsetParent && nodeName(node) !== 'html' && (0, _style2.default)(offsetParent, 'position') === 'static') {\n offsetParent = offsetParent.offsetParent;\n }\n\n return offsetParent || doc.documentElement;\n}\nmodule.exports = exports['default'];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/dom-helpers/query/offsetParent.js\n// module id = 1115\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/dom-helpers/query/offsetParent.js?", + ); + + /***/ + }, + /* 1116 */ + /* unknown exports provided */ + /* all exports used */ + /*!*****************************************!*\ + !*** ./~/dom-helpers/query/position.js ***! + \*****************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nexports.default = position;\n\nvar _offset = __webpack_require__(/*! ./offset */ 341);\n\nvar _offset2 = _interopRequireDefault(_offset);\n\nvar _offsetParent = __webpack_require__(/*! ./offsetParent */ 1115);\n\nvar _offsetParent2 = _interopRequireDefault(_offsetParent);\n\nvar _scrollTop = __webpack_require__(/*! ./scrollTop */ 342);\n\nvar _scrollTop2 = _interopRequireDefault(_scrollTop);\n\nvar _scrollLeft = __webpack_require__(/*! ./scrollLeft */ 1118);\n\nvar _scrollLeft2 = _interopRequireDefault(_scrollLeft);\n\nvar _style = __webpack_require__(/*! ../style */ 158);\n\nvar _style2 = _interopRequireDefault(_style);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction nodeName(node) {\n return node.nodeName && node.nodeName.toLowerCase();\n}\n\nfunction position(node, offsetParent) {\n var parentOffset = { top: 0, left: 0 },\n offset;\n\n // Fixed elements are offset from window (parentOffset = {top:0, left: 0},\n // because it is its only offset parent\n if ((0, _style2.default)(node, 'position') === 'fixed') {\n offset = node.getBoundingClientRect();\n } else {\n offsetParent = offsetParent || (0, _offsetParent2.default)(node);\n offset = (0, _offset2.default)(node);\n\n if (nodeName(offsetParent) !== 'html') parentOffset = (0, _offset2.default)(offsetParent);\n\n parentOffset.top += parseInt((0, _style2.default)(offsetParent, 'borderTopWidth'), 10) - (0, _scrollTop2.default)(offsetParent) || 0;\n parentOffset.left += parseInt((0, _style2.default)(offsetParent, 'borderLeftWidth'), 10) - (0, _scrollLeft2.default)(offsetParent) || 0;\n }\n\n // Subtract parent offsets and node margins\n return _extends({}, offset, {\n top: offset.top - parentOffset.top - (parseInt((0, _style2.default)(node, 'marginTop'), 10) || 0),\n left: offset.left - parentOffset.left - (parseInt((0, _style2.default)(node, 'marginLeft'), 10) || 0)\n });\n}\nmodule.exports = exports['default'];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/dom-helpers/query/position.js\n// module id = 1116\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/dom-helpers/query/position.js?", + ); + + /***/ + }, + /* 1117 */ + /* unknown exports provided */ + /* all exports used */ + /*!*************************************************!*\ + !*** ./~/dom-helpers/query/querySelectorAll.js ***! + \*************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = qsa;\n// Zepto.js\n// (c) 2010-2015 Thomas Fuchs\n// Zepto.js may be freely distributed under the MIT license.\nvar simpleSelectorRE = /^[\\w-]*$/;\nvar toArray = Function.prototype.bind.call(Function.prototype.call, [].slice);\n\nfunction qsa(element, selector) {\n var maybeID = selector[0] === '#',\n maybeClass = selector[0] === '.',\n nameOnly = maybeID || maybeClass ? selector.slice(1) : selector,\n isSimple = simpleSelectorRE.test(nameOnly),\n found;\n\n if (isSimple) {\n if (maybeID) {\n element = element.getElementById ? element : document;\n return (found = element.getElementById(nameOnly)) ? [found] : [];\n }\n\n if (element.getElementsByClassName && maybeClass) return toArray(element.getElementsByClassName(nameOnly));\n\n return toArray(element.getElementsByTagName(selector));\n }\n\n return toArray(element.querySelectorAll(selector));\n}\nmodule.exports = exports['default'];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/dom-helpers/query/querySelectorAll.js\n// module id = 1117\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/dom-helpers/query/querySelectorAll.js?", + ); + + /***/ + }, + /* 1118 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************************!*\ + !*** ./~/dom-helpers/query/scrollLeft.js ***! + \*******************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = scrollTop;\n\nvar _isWindow = __webpack_require__(/*! ./isWindow */ 157);\n\nvar _isWindow2 = _interopRequireDefault(_isWindow);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction scrollTop(node, val) {\n var win = (0, _isWindow2.default)(node);\n\n if (val === undefined) return win ? 'pageXOffset' in win ? win.pageXOffset : win.document.documentElement.scrollLeft : node.scrollLeft;\n\n if (win) win.scrollTo(val, 'pageYOffset' in win ? win.pageYOffset : win.document.documentElement.scrollTop);else node.scrollLeft = val;\n}\nmodule.exports = exports['default'];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/dom-helpers/query/scrollLeft.js\n// module id = 1118\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/dom-helpers/query/scrollLeft.js?", + ); + + /***/ + }, + /* 1119 */ + /* unknown exports provided */ + /* all exports used */ + /*!*************************************************!*\ + !*** ./~/dom-helpers/style/getComputedStyle.js ***! + \*************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = _getComputedStyle;\n\nvar _camelizeStyle = __webpack_require__(/*! ../util/camelizeStyle */ 344);\n\nvar _camelizeStyle2 = _interopRequireDefault(_camelizeStyle);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar rposition = /^(top|right|bottom|left)$/;\nvar rnumnonpx = /^([+-]?(?:\\d*\\.|)\\d+(?:[eE][+-]?\\d+|))(?!px)[a-z%]+$/i;\n\nfunction _getComputedStyle(node) {\n if (!node) throw new TypeError('No Element passed to `getComputedStyle()`');\n var doc = node.ownerDocument;\n\n return 'defaultView' in doc ? doc.defaultView.opener ? node.ownerDocument.defaultView.getComputedStyle(node, null) : window.getComputedStyle(node, null) : {\n //ie 8 \"magic\" from: https://github.com/jquery/jquery/blob/1.11-stable/src/css/curCSS.js#L72\n getPropertyValue: function getPropertyValue(prop) {\n var style = node.style;\n\n prop = (0, _camelizeStyle2.default)(prop);\n\n if (prop == 'float') prop = 'styleFloat';\n\n var current = node.currentStyle[prop] || null;\n\n if (current == null && style && style[prop]) current = style[prop];\n\n if (rnumnonpx.test(current) && !rposition.test(prop)) {\n // Remember the original values\n var left = style.left;\n var runStyle = node.runtimeStyle;\n var rsLeft = runStyle && runStyle.left;\n\n // Put in the new values to get a computed value out\n if (rsLeft) runStyle.left = node.currentStyle.left;\n\n style.left = prop === 'fontSize' ? '1em' : current;\n current = style.pixelLeft + 'px';\n\n // Revert the changed values\n style.left = left;\n if (rsLeft) runStyle.left = rsLeft;\n }\n\n return current;\n }\n };\n}\nmodule.exports = exports['default'];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/dom-helpers/style/getComputedStyle.js\n// module id = 1119\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/dom-helpers/style/getComputedStyle.js?", + ); + + /***/ + }, + /* 1120 */ + /* unknown exports provided */ + /* all exports used */ + /*!********************************************!*\ + !*** ./~/dom-helpers/style/removeStyle.js ***! + \********************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = removeStyle;\nfunction removeStyle(node, key) {\n return 'removeProperty' in node.style ? node.style.removeProperty(key) : node.style.removeAttribute(key);\n}\nmodule.exports = exports['default'];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/dom-helpers/style/removeStyle.js\n// module id = 1120\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/dom-helpers/style/removeStyle.js?", + ); + + /***/ + }, + /* 1121 */ + /* unknown exports provided */ + /* all exports used */ + /*!*************************************************!*\ + !*** ./~/dom-helpers/transition/isTransform.js ***! + \*************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = isTransform;\nvar supportedTransforms = /^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i;\n\nfunction isTransform(property) {\n return !!(property && supportedTransforms.test(property));\n}\nmodule.exports = exports["default"];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/dom-helpers/transition/isTransform.js\n// module id = 1121\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/dom-helpers/transition/isTransform.js?', + ); + + /***/ + }, + /* 1122 */ + /* unknown exports provided */ + /* all exports used */ + /*!****************************************!*\ + !*** ./~/dom-helpers/util/camelize.js ***! + \****************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = camelize;\nvar rHyphen = /-(.)/g;\n\nfunction camelize(string) {\n return string.replace(rHyphen, function (_, chr) {\n return chr.toUpperCase();\n });\n}\nmodule.exports = exports["default"];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/dom-helpers/util/camelize.js\n// module id = 1122\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/dom-helpers/util/camelize.js?', + ); + + /***/ + }, + /* 1123 */ + /* unknown exports provided */ + /* all exports used */ + /*!*****************************************!*\ + !*** ./~/dom-helpers/util/hyphenate.js ***! + \*****************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = hyphenate;\n\nvar rUpper = /([A-Z])/g;\n\nfunction hyphenate(string) {\n return string.replace(rUpper, '-$1').toLowerCase();\n}\nmodule.exports = exports['default'];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/dom-helpers/util/hyphenate.js\n// module id = 1123\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/dom-helpers/util/hyphenate.js?", + ); + + /***/ + }, + /* 1124 */ + /* unknown exports provided */ + /* all exports used */ + /*!**********************************************!*\ + !*** ./~/dom-helpers/util/hyphenateStyle.js ***! + \**********************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = hyphenateStyleName;\n\nvar _hyphenate = __webpack_require__(/*! ./hyphenate */ 1123);\n\nvar _hyphenate2 = _interopRequireDefault(_hyphenate);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar msPattern = /^ms-/; /**\n * Copyright 2013-2014, Facebook, Inc.\n * All rights reserved.\n * https://github.com/facebook/react/blob/2aeb8a2a6beb00617a4217f7f8284924fa2ad819/src/vendor/core/hyphenateStyleName.js\n */\n\nfunction hyphenateStyleName(string) {\n return (0, _hyphenate2.default)(string).replace(msPattern, '-ms-');\n}\nmodule.exports = exports['default'];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/dom-helpers/util/hyphenateStyle.js\n// module id = 1124\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/dom-helpers/util/hyphenateStyle.js?", + ); + + /***/ + }, + /* 1125 */ + /* unknown exports provided */ + /* all exports used */ + /*!********************************!*\ + !*** ./~/fbjs/lib/camelize.js ***! + \********************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * @typechecks\n */\n\nvar _hyphenPattern = /-(.)/g;\n\n/**\n * Camelcases a hyphenated string, for example:\n *\n * > camelize(\'background-color\')\n * < "backgroundColor"\n *\n * @param {string} string\n * @return {string}\n */\nfunction camelize(string) {\n return string.replace(_hyphenPattern, function (_, character) {\n return character.toUpperCase();\n });\n}\n\nmodule.exports = camelize;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/fbjs/lib/camelize.js\n// module id = 1125\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/fbjs/lib/camelize.js?', + ); + + /***/ + }, + /* 1126 */ + /* unknown exports provided */ + /* all exports used */ + /*!*****************************************!*\ + !*** ./~/fbjs/lib/camelizeStyleName.js ***! + \*****************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright (c) 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * @typechecks\n */\n\n\n\nvar camelize = __webpack_require__(/*! ./camelize */ 1125);\n\nvar msPattern = /^-ms-/;\n\n/**\n * Camelcases a hyphenated CSS property name, for example:\n *\n * > camelizeStyleName('background-color')\n * < \"backgroundColor\"\n * > camelizeStyleName('-moz-transition')\n * < \"MozTransition\"\n * > camelizeStyleName('-ms-transition')\n * < \"msTransition\"\n *\n * As Andi Smith suggests\n * (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix\n * is converted to lowercase `ms`.\n *\n * @param {string} string\n * @return {string}\n */\nfunction camelizeStyleName(string) {\n return camelize(string.replace(msPattern, 'ms-'));\n}\n\nmodule.exports = camelizeStyleName;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/fbjs/lib/camelizeStyleName.js\n// module id = 1126\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/fbjs/lib/camelizeStyleName.js?", + ); + + /***/ + }, + /* 1127 */ + /* unknown exports provided */ + /* all exports used */ + /*!************************************!*\ + !*** ./~/fbjs/lib/containsNode.js ***! + \************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * \n */\n\nvar isTextNode = __webpack_require__(/*! ./isTextNode */ 1135);\n\n/*eslint-disable no-bitwise */\n\n/**\n * Checks if a given DOM node contains or is another DOM node.\n */\nfunction containsNode(outerNode, innerNode) {\n if (!outerNode || !innerNode) {\n return false;\n } else if (outerNode === innerNode) {\n return true;\n } else if (isTextNode(outerNode)) {\n return false;\n } else if (isTextNode(innerNode)) {\n return containsNode(outerNode, innerNode.parentNode);\n } else if ('contains' in outerNode) {\n return outerNode.contains(innerNode);\n } else if (outerNode.compareDocumentPosition) {\n return !!(outerNode.compareDocumentPosition(innerNode) & 16);\n } else {\n return false;\n }\n}\n\nmodule.exports = containsNode;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/fbjs/lib/containsNode.js\n// module id = 1127\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/fbjs/lib/containsNode.js?", + ); + + /***/ + }, + /* 1128 */ + /* unknown exports provided */ + /* all exports used */ + /*!********************************************!*\ + !*** ./~/fbjs/lib/createArrayFromMixed.js ***! + \********************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * @typechecks\n */\n\nvar invariant = __webpack_require__(/*! ./invariant */ 12);\n\n/**\n * Convert array-like objects to arrays.\n *\n * This API assumes the caller knows the contents of the data type. For less\n * well defined inputs use createArrayFromMixed.\n *\n * @param {object|function|filelist} obj\n * @return {array}\n */\nfunction toArray(obj) {\n var length = obj.length;\n\n // Some browsers builtin objects can report typeof 'function' (e.g. NodeList\n // in old versions of Safari).\n !(!Array.isArray(obj) && (typeof obj === 'object' || typeof obj === 'function')) ? true ? invariant(false, 'toArray: Array-like object expected') : invariant(false) : void 0;\n\n !(typeof length === 'number') ? true ? invariant(false, 'toArray: Object needs a length property') : invariant(false) : void 0;\n\n !(length === 0 || length - 1 in obj) ? true ? invariant(false, 'toArray: Object should have keys for indices') : invariant(false) : void 0;\n\n !(typeof obj.callee !== 'function') ? true ? invariant(false, 'toArray: Object can\\'t be `arguments`. Use rest params ' + '(function(...args) {}) or Array.from() instead.') : invariant(false) : void 0;\n\n // Old IE doesn't give collections access to hasOwnProperty. Assume inputs\n // without method will throw during the slice call and skip straight to the\n // fallback.\n if (obj.hasOwnProperty) {\n try {\n return Array.prototype.slice.call(obj);\n } catch (e) {\n // IE < 9 does not support Array#slice on collections objects\n }\n }\n\n // Fall back to copying key by key. This assumes all keys have a value,\n // so will not preserve sparsely populated inputs.\n var ret = Array(length);\n for (var ii = 0; ii < length; ii++) {\n ret[ii] = obj[ii];\n }\n return ret;\n}\n\n/**\n * Perform a heuristic test to determine if an object is \"array-like\".\n *\n * A monk asked Joshu, a Zen master, \"Has a dog Buddha nature?\"\n * Joshu replied: \"Mu.\"\n *\n * This function determines if its argument has \"array nature\": it returns\n * true if the argument is an actual array, an `arguments' object, or an\n * HTMLCollection (e.g. node.childNodes or node.getElementsByTagName()).\n *\n * It will return false for other array-like objects like Filelist.\n *\n * @param {*} obj\n * @return {boolean}\n */\nfunction hasArrayNature(obj) {\n return (\n // not null/false\n !!obj && (\n // arrays are objects, NodeLists are functions in Safari\n typeof obj == 'object' || typeof obj == 'function') &&\n // quacks like an array\n 'length' in obj &&\n // not window\n !('setInterval' in obj) &&\n // no DOM node should be considered an array-like\n // a 'select' element has 'length' and 'item' properties on IE8\n typeof obj.nodeType != 'number' && (\n // a real array\n Array.isArray(obj) ||\n // arguments\n 'callee' in obj ||\n // HTMLCollection/NodeList\n 'item' in obj)\n );\n}\n\n/**\n * Ensure that the argument is an array by wrapping it in an array if it is not.\n * Creates a copy of the argument if it is already an array.\n *\n * This is mostly useful idiomatically:\n *\n * var createArrayFromMixed = require('createArrayFromMixed');\n *\n * function takesOneOrMoreThings(things) {\n * things = createArrayFromMixed(things);\n * ...\n * }\n *\n * This allows you to treat `things' as an array, but accept scalars in the API.\n *\n * If you need to convert an array-like object, like `arguments`, into an array\n * use toArray instead.\n *\n * @param {*} obj\n * @return {array}\n */\nfunction createArrayFromMixed(obj) {\n if (!hasArrayNature(obj)) {\n return [obj];\n } else if (Array.isArray(obj)) {\n return obj.slice();\n } else {\n return toArray(obj);\n }\n}\n\nmodule.exports = createArrayFromMixed;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/fbjs/lib/createArrayFromMixed.js\n// module id = 1128\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/fbjs/lib/createArrayFromMixed.js?", + ); + + /***/ + }, + /* 1129 */ + /* unknown exports provided */ + /* all exports used */ + /*!*********************************************!*\ + !*** ./~/fbjs/lib/createNodesFromMarkup.js ***! + \*********************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * @typechecks\n */\n\n/*eslint-disable fb-www/unsafe-html*/\n\nvar ExecutionEnvironment = __webpack_require__(/*! ./ExecutionEnvironment */ 27);\n\nvar createArrayFromMixed = __webpack_require__(/*! ./createArrayFromMixed */ 1128);\nvar getMarkupWrap = __webpack_require__(/*! ./getMarkupWrap */ 1130);\nvar invariant = __webpack_require__(/*! ./invariant */ 12);\n\n/**\n * Dummy container used to render all markup.\n */\nvar dummyNode = ExecutionEnvironment.canUseDOM ? document.createElement('div') : null;\n\n/**\n * Pattern used by `getNodeName`.\n */\nvar nodeNamePattern = /^\\s*<(\\w+)/;\n\n/**\n * Extracts the `nodeName` of the first element in a string of markup.\n *\n * @param {string} markup String of markup.\n * @return {?string} Node name of the supplied markup.\n */\nfunction getNodeName(markup) {\n var nodeNameMatch = markup.match(nodeNamePattern);\n return nodeNameMatch && nodeNameMatch[1].toLowerCase();\n}\n\n/**\n * Creates an array containing the nodes rendered from the supplied markup. The\n * optionally supplied `handleScript` function will be invoked once for each\n * <script> element that is rendered. If no `handleScript` function is supplied,\n * an exception is thrown if any <script> elements are rendered.\n *\n * @param {string} markup A string of valid HTML markup.\n * @param {?function} handleScript Invoked once for each rendered <script>.\n * @return {array<DOMElement|DOMTextNode>} An array of rendered nodes.\n */\nfunction createNodesFromMarkup(markup, handleScript) {\n var node = dummyNode;\n !!!dummyNode ? true ? invariant(false, 'createNodesFromMarkup dummy not initialized') : invariant(false) : void 0;\n var nodeName = getNodeName(markup);\n\n var wrap = nodeName && getMarkupWrap(nodeName);\n if (wrap) {\n node.innerHTML = wrap[1] + markup + wrap[2];\n\n var wrapDepth = wrap[0];\n while (wrapDepth--) {\n node = node.lastChild;\n }\n } else {\n node.innerHTML = markup;\n }\n\n var scripts = node.getElementsByTagName('script');\n if (scripts.length) {\n !handleScript ? true ? invariant(false, 'createNodesFromMarkup(...): Unexpected <script> element rendered.') : invariant(false) : void 0;\n createArrayFromMixed(scripts).forEach(handleScript);\n }\n\n var nodes = Array.from(node.childNodes);\n while (node.lastChild) {\n node.removeChild(node.lastChild);\n }\n return nodes;\n}\n\nmodule.exports = createNodesFromMarkup;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/fbjs/lib/createNodesFromMarkup.js\n// module id = 1129\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/fbjs/lib/createNodesFromMarkup.js?", + ); + + /***/ + }, + /* 1130 */ + /* unknown exports provided */ + /* all exports used */ + /*!*************************************!*\ + !*** ./~/fbjs/lib/getMarkupWrap.js ***! + \*************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n/*eslint-disable fb-www/unsafe-html */\n\nvar ExecutionEnvironment = __webpack_require__(/*! ./ExecutionEnvironment */ 27);\n\nvar invariant = __webpack_require__(/*! ./invariant */ 12);\n\n/**\n * Dummy container used to detect which wraps are necessary.\n */\nvar dummyNode = ExecutionEnvironment.canUseDOM ? document.createElement('div') : null;\n\n/**\n * Some browsers cannot use `innerHTML` to render certain elements standalone,\n * so we wrap them, render the wrapped nodes, then extract the desired node.\n *\n * In IE8, certain elements cannot render alone, so wrap all elements ('*').\n */\n\nvar shouldWrap = {};\n\nvar selectWrap = [1, '<select multiple=\"true\">', '</select>'];\nvar tableWrap = [1, '<table>', '</table>'];\nvar trWrap = [3, '<table><tbody><tr>', '</tr></tbody></table>'];\n\nvar svgWrap = [1, '<svg xmlns=\"http://www.w3.org/2000/svg\">', '</svg>'];\n\nvar markupWrap = {\n '*': [1, '?<div>', '</div>'],\n\n 'area': [1, '<map>', '</map>'],\n 'col': [2, '<table><tbody></tbody><colgroup>', '</colgroup></table>'],\n 'legend': [1, '<fieldset>', '</fieldset>'],\n 'param': [1, '<object>', '</object>'],\n 'tr': [2, '<table><tbody>', '</tbody></table>'],\n\n 'optgroup': selectWrap,\n 'option': selectWrap,\n\n 'caption': tableWrap,\n 'colgroup': tableWrap,\n 'tbody': tableWrap,\n 'tfoot': tableWrap,\n 'thead': tableWrap,\n\n 'td': trWrap,\n 'th': trWrap\n};\n\n// Initialize the SVG elements since we know they'll always need to be wrapped\n// consistently. If they are created inside a <div> they will be initialized in\n// the wrong namespace (and will not display).\nvar svgElements = ['circle', 'clipPath', 'defs', 'ellipse', 'g', 'image', 'line', 'linearGradient', 'mask', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'stop', 'text', 'tspan'];\nsvgElements.forEach(function (nodeName) {\n markupWrap[nodeName] = svgWrap;\n shouldWrap[nodeName] = true;\n});\n\n/**\n * Gets the markup wrap configuration for the supplied `nodeName`.\n *\n * NOTE: This lazily detects which wraps are necessary for the current browser.\n *\n * @param {string} nodeName Lowercase `nodeName`.\n * @return {?array} Markup wrap configuration, if applicable.\n */\nfunction getMarkupWrap(nodeName) {\n !!!dummyNode ? true ? invariant(false, 'Markup wrapping node not initialized') : invariant(false) : void 0;\n if (!markupWrap.hasOwnProperty(nodeName)) {\n nodeName = '*';\n }\n if (!shouldWrap.hasOwnProperty(nodeName)) {\n if (nodeName === '*') {\n dummyNode.innerHTML = '<link />';\n } else {\n dummyNode.innerHTML = '<' + nodeName + '></' + nodeName + '>';\n }\n shouldWrap[nodeName] = !dummyNode.firstChild;\n }\n return shouldWrap[nodeName] ? markupWrap[nodeName] : null;\n}\n\nmodule.exports = getMarkupWrap;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/fbjs/lib/getMarkupWrap.js\n// module id = 1130\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/fbjs/lib/getMarkupWrap.js?", + ); + + /***/ + }, + /* 1131 */ + /* unknown exports provided */ + /* all exports used */ + /*!**************************************************!*\ + !*** ./~/fbjs/lib/getUnboundedScrollPosition.js ***! + \**************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '/**\n * Copyright (c) 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * @typechecks\n */\n\n\n\n/**\n * Gets the scroll position of the supplied element or window.\n *\n * The return values are unbounded, unlike `getScrollPosition`. This means they\n * may be negative or exceed the element boundaries (which is possible using\n * inertial scrolling).\n *\n * @param {DOMWindow|DOMElement} scrollable\n * @return {object} Map with `x` and `y` keys.\n */\n\nfunction getUnboundedScrollPosition(scrollable) {\n if (scrollable.Window && scrollable instanceof scrollable.Window) {\n return {\n x: scrollable.pageXOffset || scrollable.document.documentElement.scrollLeft,\n y: scrollable.pageYOffset || scrollable.document.documentElement.scrollTop\n };\n }\n return {\n x: scrollable.scrollLeft,\n y: scrollable.scrollTop\n };\n}\n\nmodule.exports = getUnboundedScrollPosition;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/fbjs/lib/getUnboundedScrollPosition.js\n// module id = 1131\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/fbjs/lib/getUnboundedScrollPosition.js?', + ); + + /***/ + }, + /* 1132 */ + /* unknown exports provided */ + /* all exports used */ + /*!*********************************!*\ + !*** ./~/fbjs/lib/hyphenate.js ***! + \*********************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * @typechecks\n */\n\nvar _uppercasePattern = /([A-Z])/g;\n\n/**\n * Hyphenates a camelcased string, for example:\n *\n * > hyphenate('backgroundColor')\n * < \"background-color\"\n *\n * For CSS style names, use `hyphenateStyleName` instead which works properly\n * with all vendor prefixes, including `ms`.\n *\n * @param {string} string\n * @return {string}\n */\nfunction hyphenate(string) {\n return string.replace(_uppercasePattern, '-$1').toLowerCase();\n}\n\nmodule.exports = hyphenate;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/fbjs/lib/hyphenate.js\n// module id = 1132\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/fbjs/lib/hyphenate.js?", + ); + + /***/ + }, + /* 1133 */ + /* unknown exports provided */ + /* all exports used */ + /*!******************************************!*\ + !*** ./~/fbjs/lib/hyphenateStyleName.js ***! + \******************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright (c) 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * @typechecks\n */\n\n\n\nvar hyphenate = __webpack_require__(/*! ./hyphenate */ 1132);\n\nvar msPattern = /^ms-/;\n\n/**\n * Hyphenates a camelcased CSS property name, for example:\n *\n * > hyphenateStyleName('backgroundColor')\n * < \"background-color\"\n * > hyphenateStyleName('MozTransition')\n * < \"-moz-transition\"\n * > hyphenateStyleName('msTransition')\n * < \"-ms-transition\"\n *\n * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix\n * is converted to `-ms-`.\n *\n * @param {string} string\n * @return {string}\n */\nfunction hyphenateStyleName(string) {\n return hyphenate(string).replace(msPattern, '-ms-');\n}\n\nmodule.exports = hyphenateStyleName;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/fbjs/lib/hyphenateStyleName.js\n// module id = 1133\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/fbjs/lib/hyphenateStyleName.js?", + ); + + /***/ + }, + /* 1134 */ + /* unknown exports provided */ + /* all exports used */ + /*!******************************!*\ + !*** ./~/fbjs/lib/isNode.js ***! + \******************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * @typechecks\n */\n\n/**\n * @param {*} object The object to check.\n * @return {boolean} Whether or not the object is a DOM node.\n */\nfunction isNode(object) {\n var doc = object ? object.ownerDocument || object : document;\n var defaultView = doc.defaultView || window;\n return !!(object && (typeof defaultView.Node === 'function' ? object instanceof defaultView.Node : typeof object === 'object' && typeof object.nodeType === 'number' && typeof object.nodeName === 'string'));\n}\n\nmodule.exports = isNode;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/fbjs/lib/isNode.js\n// module id = 1134\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/fbjs/lib/isNode.js?", + ); + + /***/ + }, + /* 1135 */ + /* unknown exports provided */ + /* all exports used */ + /*!**********************************!*\ + !*** ./~/fbjs/lib/isTextNode.js ***! + \**********************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * @typechecks\n */\n\nvar isNode = __webpack_require__(/*! ./isNode */ 1134);\n\n/**\n * @param {*} object The object to check.\n * @return {boolean} Whether or not the object is a DOM text node.\n */\nfunction isTextNode(object) {\n return isNode(object) && object.nodeType == 3;\n}\n\nmodule.exports = isTextNode;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/fbjs/lib/isTextNode.js\n// module id = 1135\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/fbjs/lib/isTextNode.js?', + ); + + /***/ + }, + /* 1136 */ + /* unknown exports provided */ + /* all exports used */ + /*!*****************************************!*\ + !*** ./~/fbjs/lib/memoizeStringOnly.js ***! + \*****************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '/**\n * Copyright (c) 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * \n * @typechecks static-only\n */\n\n\n\n/**\n * Memoizes the return value of a function that accepts one string argument.\n */\n\nfunction memoizeStringOnly(callback) {\n var cache = {};\n return function (string) {\n if (!cache.hasOwnProperty(string)) {\n cache[string] = callback.call(this, string);\n }\n return cache[string];\n };\n}\n\nmodule.exports = memoizeStringOnly;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/fbjs/lib/memoizeStringOnly.js\n// module id = 1136\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/fbjs/lib/memoizeStringOnly.js?', + ); + + /***/ + }, + /* 1137 */ + /* unknown exports provided */ + /* all exports used */ + /*!***********************************!*\ + !*** ./~/fbjs/lib/performance.js ***! + \***********************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '/**\n * Copyright (c) 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * @typechecks\n */\n\n\n\nvar ExecutionEnvironment = __webpack_require__(/*! ./ExecutionEnvironment */ 27);\n\nvar performance;\n\nif (ExecutionEnvironment.canUseDOM) {\n performance = window.performance || window.msPerformance || window.webkitPerformance;\n}\n\nmodule.exports = performance || {};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/fbjs/lib/performance.js\n// module id = 1137\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/fbjs/lib/performance.js?', + ); + + /***/ + }, + /* 1138 */ + /* unknown exports provided */ + /* all exports used */ + /*!**************************************!*\ + !*** ./~/fbjs/lib/performanceNow.js ***! + \**************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * @typechecks\n */\n\nvar performance = __webpack_require__(/*! ./performance */ 1137);\n\nvar performanceNow;\n\n/**\n * Detect if we can use `window.performance.now()` and gracefully fallback to\n * `Date.now()` if it doesn't exist. We need to support Firefox < 15 for now\n * because of Facebook's testing infrastructure.\n */\nif (performance.now) {\n performanceNow = function performanceNow() {\n return performance.now();\n };\n} else {\n performanceNow = function performanceNow() {\n return Date.now();\n };\n}\n\nmodule.exports = performanceNow;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/fbjs/lib/performanceNow.js\n// module id = 1138\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/fbjs/lib/performanceNow.js?", + ); + + /***/ + }, + /* 1139 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************************!*\ + !*** ./~/function-bind/implementation.js ***! + \*******************************************/ + /***/ function (module, exports) { + eval( + "var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';\nvar slice = Array.prototype.slice;\nvar toStr = Object.prototype.toString;\nvar funcType = '[object Function]';\n\nmodule.exports = function bind(that) {\n var target = this;\n if (typeof target !== 'function' || toStr.call(target) !== funcType) {\n throw new TypeError(ERROR_MESSAGE + target);\n }\n var args = slice.call(arguments, 1);\n\n var bound;\n var binder = function () {\n if (this instanceof bound) {\n var result = target.apply(\n this,\n args.concat(slice.call(arguments))\n );\n if (Object(result) === result) {\n return result;\n }\n return this;\n } else {\n return target.apply(\n that,\n args.concat(slice.call(arguments))\n );\n }\n };\n\n var boundLength = Math.max(0, target.length - args.length);\n var boundArgs = [];\n for (var i = 0; i < boundLength; i++) {\n boundArgs.push('$' + i);\n }\n\n bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);\n\n if (target.prototype) {\n var Empty = function Empty() {};\n Empty.prototype = target.prototype;\n bound.prototype = new Empty();\n Empty.prototype = null;\n }\n\n return bound;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/function-bind/implementation.js\n// module id = 1139\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/function-bind/implementation.js?", + ); + + /***/ + }, + /* 1140 */ + /* unknown exports provided */ + /* all exports used */ + /*!**********************************!*\ + !*** ./~/function-bind/index.js ***! + \**********************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + 'var implementation = __webpack_require__(/*! ./implementation */ 1139);\n\nmodule.exports = Function.prototype.bind || implementation;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/function-bind/index.js\n// module id = 1140\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/function-bind/index.js?', + ); + + /***/ + }, + /* 1141 */ + /* unknown exports provided */ + /* all exports used */ + /*!***********************************************************!*\ + !*** ./~/get-node-dimensions/lib/get-clone-dimensions.js ***! + \***********************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\nexports['default'] = getCloneDimensions;\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _getMargin = __webpack_require__(/*! ./get-margin */ 349);\n\nvar _getMargin2 = _interopRequireDefault(_getMargin);\n\nfunction getCloneDimensions(node, options) {\n var parentNode = node.parentNode;\n\n var context = document.createElement('div');\n var clone = node.cloneNode(true);\n var style = getComputedStyle(node);\n var rect = undefined,\n width = undefined,\n height = undefined,\n margin = undefined;\n\n // give the node some context to measure off of\n // no height and hidden overflow hide node copy\n context.style.height = 0;\n context.style.overflow = 'hidden';\n\n // clean up any attributes that might cause a conflict with the original node\n // i.e. inputs that should focus or submit data\n clone.setAttribute('id', '');\n clone.setAttribute('name', '');\n\n // set props to get a true dimension calculation\n if (options.display || style.getPropertyValue('display') === 'none') {\n clone.style.display = options.display || 'block';\n }\n if (options.width || !parseInt(style.getPropertyValue('width'))) {\n clone.style.width = options.width || 'auto';\n }\n if (options.height || !parseInt(style.getPropertyValue('height'))) {\n clone.style.height = options.height || 'auto';\n }\n\n // append copy to context\n context.appendChild(clone);\n\n // append context to DOM so we can measure\n parentNode.appendChild(context);\n\n // get accurate dimensions\n rect = clone.getBoundingClientRect();\n width = clone.offsetWidth;\n height = clone.offsetHeight;\n\n // destroy clone\n parentNode.removeChild(context);\n\n return {\n rect: {\n width: width,\n height: height,\n top: rect.top,\n right: rect.right,\n bottom: rect.bottom,\n left: rect.left\n },\n margin: (0, _getMargin2['default'])(style)\n };\n}\n\nmodule.exports = exports['default'];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/get-node-dimensions/lib/get-clone-dimensions.js\n// module id = 1141\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/get-node-dimensions/lib/get-clone-dimensions.js?", + ); + + /***/ + }, + /* 1142 */ + /* unknown exports provided */ + /* all exports used */ + /*!**********************************************************!*\ + !*** ./~/get-node-dimensions/lib/get-node-dimensions.js ***! + \**********************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\nexports['default'] = getNodeDimensions;\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _getCloneDimensions = __webpack_require__(/*! ./get-clone-dimensions */ 1141);\n\nvar _getCloneDimensions2 = _interopRequireDefault(_getCloneDimensions);\n\nvar _getMargin = __webpack_require__(/*! ./get-margin */ 349);\n\nvar _getMargin2 = _interopRequireDefault(_getMargin);\n\nfunction getNodeDimensions(node) {\n var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];\n\n var rect = node.getBoundingClientRect();\n var width = undefined,\n height = undefined,\n margin = undefined;\n\n // determine if we need to clone the element to get proper dimensions or not\n if (!rect.width || !rect.height || options.clone) {\n var cloneDimensions = (0, _getCloneDimensions2['default'])(node, options);\n rect = cloneDimensions.rect;\n margin = cloneDimensions.margin;\n }\n // if no cloning needed, we need to determine if margin should be accounted for\n else if (options.margin) {\n margin = (0, _getMargin2['default'])(getComputedStyle(node));\n }\n\n // include margin in width/height calculation if desired\n if (options.margin) {\n width = margin.left + rect.width + margin.right;\n height = margin.top + rect.height + margin.bottom;\n } else {\n width = rect.width;\n height = rect.height;\n }\n\n return {\n width: width,\n height: height,\n top: rect.top,\n right: rect.right,\n bottom: rect.bottom,\n left: rect.left\n };\n}\n\nmodule.exports = exports['default'];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/get-node-dimensions/lib/get-node-dimensions.js\n// module id = 1142\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/get-node-dimensions/lib/get-node-dimensions.js?", + ); + + /***/ + }, + /* 1143 */ + /* unknown exports provided */ + /* all exports used */ + /*!***********************************!*\ + !*** ./~/good-listener/src/is.js ***! + \***********************************/ + /***/ function (module, exports) { + eval( + "/**\n * Check if argument is a HTML element.\n *\n * @param {Object} value\n * @return {Boolean}\n */\nexports.node = function(value) {\n return value !== undefined\n && value instanceof HTMLElement\n && value.nodeType === 1;\n};\n\n/**\n * Check if argument is a list of HTML elements.\n *\n * @param {Object} value\n * @return {Boolean}\n */\nexports.nodeList = function(value) {\n var type = Object.prototype.toString.call(value);\n\n return value !== undefined\n && (type === '[object NodeList]' || type === '[object HTMLCollection]')\n && ('length' in value)\n && (value.length === 0 || exports.node(value[0]));\n};\n\n/**\n * Check if argument is a string.\n *\n * @param {Object} value\n * @return {Boolean}\n */\nexports.string = function(value) {\n return typeof value === 'string'\n || value instanceof String;\n};\n\n/**\n * Check if argument is a function.\n *\n * @param {Object} value\n * @return {Boolean}\n */\nexports.fn = function(value) {\n var type = Object.prototype.toString.call(value);\n\n return type === '[object Function]';\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/good-listener/src/is.js\n// module id = 1143\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/good-listener/src/is.js?", + ); + + /***/ + }, + /* 1144 */ + /* unknown exports provided */ + /* all exports used */ + /*!***************************************!*\ + !*** ./~/good-listener/src/listen.js ***! + \***************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "var is = __webpack_require__(/*! ./is */ 1143);\nvar delegate = __webpack_require__(/*! delegate */ 1101);\n\n/**\n * Validates all params and calls the right\n * listener function based on its target type.\n *\n * @param {String|HTMLElement|HTMLCollection|NodeList} target\n * @param {String} type\n * @param {Function} callback\n * @return {Object}\n */\nfunction listen(target, type, callback) {\n if (!target && !type && !callback) {\n throw new Error('Missing required arguments');\n }\n\n if (!is.string(type)) {\n throw new TypeError('Second argument must be a String');\n }\n\n if (!is.fn(callback)) {\n throw new TypeError('Third argument must be a Function');\n }\n\n if (is.node(target)) {\n return listenNode(target, type, callback);\n }\n else if (is.nodeList(target)) {\n return listenNodeList(target, type, callback);\n }\n else if (is.string(target)) {\n return listenSelector(target, type, callback);\n }\n else {\n throw new TypeError('First argument must be a String, HTMLElement, HTMLCollection, or NodeList');\n }\n}\n\n/**\n * Adds an event listener to a HTML element\n * and returns a remove listener function.\n *\n * @param {HTMLElement} node\n * @param {String} type\n * @param {Function} callback\n * @return {Object}\n */\nfunction listenNode(node, type, callback) {\n node.addEventListener(type, callback);\n\n return {\n destroy: function() {\n node.removeEventListener(type, callback);\n }\n }\n}\n\n/**\n * Add an event listener to a list of HTML elements\n * and returns a remove listener function.\n *\n * @param {NodeList|HTMLCollection} nodeList\n * @param {String} type\n * @param {Function} callback\n * @return {Object}\n */\nfunction listenNodeList(nodeList, type, callback) {\n Array.prototype.forEach.call(nodeList, function(node) {\n node.addEventListener(type, callback);\n });\n\n return {\n destroy: function() {\n Array.prototype.forEach.call(nodeList, function(node) {\n node.removeEventListener(type, callback);\n });\n }\n }\n}\n\n/**\n * Add an event listener to a selector\n * and returns a remove listener function.\n *\n * @param {String} selector\n * @param {String} type\n * @param {Function} callback\n * @return {Object}\n */\nfunction listenSelector(selector, type, callback) {\n return delegate(document.body, selector, type, callback);\n}\n\nmodule.exports = listen;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/good-listener/src/listen.js\n// module id = 1144\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/good-listener/src/listen.js?", + ); + + /***/ + }, + /* 1145 */ + /* unknown exports provided */ + /* all exports used */ + /*!****************************!*\ + !*** ./~/has/src/index.js ***! + \****************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + 'var bind = __webpack_require__(/*! function-bind */ 1140);\n\nmodule.exports = bind.call(Function.call, Object.prototype.hasOwnProperty);\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/has/src/index.js\n// module id = 1145\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/has/src/index.js?', + ); + + /***/ + }, + /* 1146 */ + /* unknown exports provided */ + /* all exports used */ + /*!*************************************!*\ + !*** ./~/history/lib/AsyncUtils.js ***! + \*************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nexports.__esModule = true;\nvar loopAsync = exports.loopAsync = function loopAsync(turns, work, callback) {\n var currentTurn = 0,\n isDone = false;\n var isSync = false,\n hasNext = false,\n doneArgs = void 0;\n\n var done = function done() {\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n isDone = true;\n\n if (isSync) {\n // Iterate instead of recursing if possible.\n doneArgs = args;\n return;\n }\n\n callback.apply(undefined, args);\n };\n\n var next = function next() {\n if (isDone) return;\n\n hasNext = true;\n\n if (isSync) return; // Iterate instead of recursing if possible.\n\n isSync = true;\n\n while (!isDone && currentTurn < turns && hasNext) {\n hasNext = false;\n work(currentTurn++, next, done);\n }\n\n isSync = false;\n\n if (isDone) {\n // This means the loop finished synchronously.\n callback.apply(undefined, doneArgs);\n return;\n }\n\n if (currentTurn >= turns && hasNext) {\n isDone = true;\n callback();\n }\n };\n\n next();\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/history/lib/AsyncUtils.js\n// module id = 1146\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/history/lib/AsyncUtils.js?', + ); + + /***/ + }, + /* 1147 */ + /* unknown exports provided */ + /* all exports used */ + /*!***************************************!*\ + !*** ./~/history/lib/HashProtocol.js ***! + \***************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nexports.__esModule = true;\nexports.replaceLocation = exports.pushLocation = exports.startListener = exports.getCurrentLocation = exports.go = exports.getUserConfirmation = undefined;\n\nvar _BrowserProtocol = __webpack_require__(/*! ./BrowserProtocol */ 212);\n\nObject.defineProperty(exports, 'getUserConfirmation', {\n enumerable: true,\n get: function get() {\n return _BrowserProtocol.getUserConfirmation;\n }\n});\nObject.defineProperty(exports, 'go', {\n enumerable: true,\n get: function get() {\n return _BrowserProtocol.go;\n }\n});\n\nvar _warning = __webpack_require__(/*! warning */ 23);\n\nvar _warning2 = _interopRequireDefault(_warning);\n\nvar _LocationUtils = __webpack_require__(/*! ./LocationUtils */ 98);\n\nvar _DOMUtils = __webpack_require__(/*! ./DOMUtils */ 160);\n\nvar _DOMStateStorage = __webpack_require__(/*! ./DOMStateStorage */ 350);\n\nvar _PathUtils = __webpack_require__(/*! ./PathUtils */ 66);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar HashChangeEvent = 'hashchange';\n\nvar getHashPath = function getHashPath() {\n // We can't use window.location.hash here because it's not\n // consistent across browsers - Firefox will pre-decode it!\n var href = window.location.href;\n var hashIndex = href.indexOf('#');\n return hashIndex === -1 ? '' : href.substring(hashIndex + 1);\n};\n\nvar pushHashPath = function pushHashPath(path) {\n return window.location.hash = path;\n};\n\nvar replaceHashPath = function replaceHashPath(path) {\n var hashIndex = window.location.href.indexOf('#');\n\n window.location.replace(window.location.href.slice(0, hashIndex >= 0 ? hashIndex : 0) + '#' + path);\n};\n\nvar getCurrentLocation = exports.getCurrentLocation = function getCurrentLocation(pathCoder, queryKey) {\n var path = pathCoder.decodePath(getHashPath());\n var key = (0, _PathUtils.getQueryStringValueFromPath)(path, queryKey);\n\n var state = void 0;\n if (key) {\n path = (0, _PathUtils.stripQueryStringValueFromPath)(path, queryKey);\n state = (0, _DOMStateStorage.readState)(key);\n }\n\n var init = (0, _PathUtils.parsePath)(path);\n init.state = state;\n\n return (0, _LocationUtils.createLocation)(init, undefined, key);\n};\n\nvar prevLocation = void 0;\n\nvar startListener = exports.startListener = function startListener(listener, pathCoder, queryKey) {\n var handleHashChange = function handleHashChange() {\n var path = getHashPath();\n var encodedPath = pathCoder.encodePath(path);\n\n if (path !== encodedPath) {\n // Always be sure we have a properly-encoded hash.\n replaceHashPath(encodedPath);\n } else {\n var currentLocation = getCurrentLocation(pathCoder, queryKey);\n\n if (prevLocation && currentLocation.key && prevLocation.key === currentLocation.key) return; // Ignore extraneous hashchange events\n\n prevLocation = currentLocation;\n\n listener(currentLocation);\n }\n };\n\n // Ensure the hash is encoded properly.\n var path = getHashPath();\n var encodedPath = pathCoder.encodePath(path);\n\n if (path !== encodedPath) replaceHashPath(encodedPath);\n\n (0, _DOMUtils.addEventListener)(window, HashChangeEvent, handleHashChange);\n\n return function () {\n return (0, _DOMUtils.removeEventListener)(window, HashChangeEvent, handleHashChange);\n };\n};\n\nvar updateLocation = function updateLocation(location, pathCoder, queryKey, updateHash) {\n var state = location.state;\n var key = location.key;\n\n\n var path = pathCoder.encodePath((0, _PathUtils.createPath)(location));\n\n if (state !== undefined) {\n path = (0, _PathUtils.addQueryStringValueToPath)(path, queryKey, key);\n (0, _DOMStateStorage.saveState)(key, state);\n }\n\n prevLocation = location;\n\n updateHash(path);\n};\n\nvar pushLocation = exports.pushLocation = function pushLocation(location, pathCoder, queryKey) {\n return updateLocation(location, pathCoder, queryKey, function (path) {\n if (getHashPath() !== path) {\n pushHashPath(path);\n } else {\n true ? (0, _warning2.default)(false, 'You cannot PUSH the same path using hash history') : void 0;\n }\n });\n};\n\nvar replaceLocation = exports.replaceLocation = function replaceLocation(location, pathCoder, queryKey) {\n return updateLocation(location, pathCoder, queryKey, function (path) {\n if (getHashPath() !== path) replaceHashPath(path);\n });\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/history/lib/HashProtocol.js\n// module id = 1147\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/history/lib/HashProtocol.js?", + ); + + /***/ + }, + /* 1148 */ + /* unknown exports provided */ + /* all exports used */ + /*!******************************************!*\ + !*** ./~/history/lib/RefreshProtocol.js ***! + \******************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nexports.__esModule = true;\nexports.replaceLocation = exports.pushLocation = exports.getCurrentLocation = exports.go = exports.getUserConfirmation = undefined;\n\nvar _BrowserProtocol = __webpack_require__(/*! ./BrowserProtocol */ 212);\n\nObject.defineProperty(exports, 'getUserConfirmation', {\n enumerable: true,\n get: function get() {\n return _BrowserProtocol.getUserConfirmation;\n }\n});\nObject.defineProperty(exports, 'go', {\n enumerable: true,\n get: function get() {\n return _BrowserProtocol.go;\n }\n});\n\nvar _LocationUtils = __webpack_require__(/*! ./LocationUtils */ 98);\n\nvar _PathUtils = __webpack_require__(/*! ./PathUtils */ 66);\n\nvar getCurrentLocation = exports.getCurrentLocation = function getCurrentLocation() {\n return (0, _LocationUtils.createLocation)(window.location);\n};\n\nvar pushLocation = exports.pushLocation = function pushLocation(location) {\n window.location.href = (0, _PathUtils.createPath)(location);\n return false; // Don't update location\n};\n\nvar replaceLocation = exports.replaceLocation = function replaceLocation(location) {\n window.location.replace((0, _PathUtils.createPath)(location));\n return false; // Don't update location\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/history/lib/RefreshProtocol.js\n// module id = 1148\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/history/lib/RefreshProtocol.js?", + ); + + /***/ + }, + /* 1149 */ + /* unknown exports provided */ + /* exports used: default */ + /*!********************************************!*\ + !*** ./~/history/lib/createHashHistory.js ***! + \********************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nexports.__esModule = true;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _warning = __webpack_require__(/*! warning */ 23);\n\nvar _warning2 = _interopRequireDefault(_warning);\n\nvar _invariant = __webpack_require__(/*! invariant */ 25);\n\nvar _invariant2 = _interopRequireDefault(_invariant);\n\nvar _ExecutionEnvironment = __webpack_require__(/*! ./ExecutionEnvironment */ 213);\n\nvar _DOMUtils = __webpack_require__(/*! ./DOMUtils */ 160);\n\nvar _HashProtocol = __webpack_require__(/*! ./HashProtocol */ 1147);\n\nvar HashProtocol = _interopRequireWildcard(_HashProtocol);\n\nvar _createHistory = __webpack_require__(/*! ./createHistory */ 215);\n\nvar _createHistory2 = _interopRequireDefault(_createHistory);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar DefaultQueryKey = '_k';\n\nvar addLeadingSlash = function addLeadingSlash(path) {\n return path.charAt(0) === '/' ? path : '/' + path;\n};\n\nvar HashPathCoders = {\n hashbang: {\n encodePath: function encodePath(path) {\n return path.charAt(0) === '!' ? path : '!' + path;\n },\n decodePath: function decodePath(path) {\n return path.charAt(0) === '!' ? path.substring(1) : path;\n }\n },\n noslash: {\n encodePath: function encodePath(path) {\n return path.charAt(0) === '/' ? path.substring(1) : path;\n },\n decodePath: addLeadingSlash\n },\n slash: {\n encodePath: addLeadingSlash,\n decodePath: addLeadingSlash\n }\n};\n\nvar createHashHistory = function createHashHistory() {\n var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\n !_ExecutionEnvironment.canUseDOM ? true ? (0, _invariant2.default)(false, 'Hash history needs a DOM') : (0, _invariant2.default)(false) : void 0;\n\n var queryKey = options.queryKey;\n var hashType = options.hashType;\n\n\n true ? (0, _warning2.default)(queryKey !== false, 'Using { queryKey: false } no longer works. Instead, just don\\'t ' + 'use location state if you don\\'t want a key in your URL query string') : void 0;\n\n if (typeof queryKey !== 'string') queryKey = DefaultQueryKey;\n\n if (hashType == null) hashType = 'slash';\n\n if (!(hashType in HashPathCoders)) {\n true ? (0, _warning2.default)(false, 'Invalid hash type: %s', hashType) : void 0;\n\n hashType = 'slash';\n }\n\n var pathCoder = HashPathCoders[hashType];\n\n var getUserConfirmation = HashProtocol.getUserConfirmation;\n\n\n var getCurrentLocation = function getCurrentLocation() {\n return HashProtocol.getCurrentLocation(pathCoder, queryKey);\n };\n\n var pushLocation = function pushLocation(location) {\n return HashProtocol.pushLocation(location, pathCoder, queryKey);\n };\n\n var replaceLocation = function replaceLocation(location) {\n return HashProtocol.replaceLocation(location, pathCoder, queryKey);\n };\n\n var history = (0, _createHistory2.default)(_extends({\n getUserConfirmation: getUserConfirmation }, options, {\n getCurrentLocation: getCurrentLocation,\n pushLocation: pushLocation,\n replaceLocation: replaceLocation,\n go: HashProtocol.go\n }));\n\n var listenerCount = 0,\n stopListener = void 0;\n\n var startListener = function startListener(listener, before) {\n if (++listenerCount === 1) stopListener = HashProtocol.startListener(history.transitionTo, pathCoder, queryKey);\n\n var unlisten = before ? history.listenBefore(listener) : history.listen(listener);\n\n return function () {\n unlisten();\n\n if (--listenerCount === 0) stopListener();\n };\n };\n\n var listenBefore = function listenBefore(listener) {\n return startListener(listener, true);\n };\n\n var listen = function listen(listener) {\n return startListener(listener, false);\n };\n\n var goIsSupportedWithoutReload = (0, _DOMUtils.supportsGoWithoutReloadUsingHash)();\n\n var go = function go(n) {\n true ? (0, _warning2.default)(goIsSupportedWithoutReload, 'Hash history go(n) causes a full page reload in this browser') : void 0;\n\n history.go(n);\n };\n\n var createHref = function createHref(path) {\n return '#' + pathCoder.encodePath(history.createHref(path));\n };\n\n return _extends({}, history, {\n listenBefore: listenBefore,\n listen: listen,\n go: go,\n createHref: createHref\n });\n};\n\nexports.default = createHashHistory;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/history/lib/createHashHistory.js\n// module id = 1149\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/history/lib/createHashHistory.js?", + ); + + /***/ + }, + /* 1150 */ + /* unknown exports provided */ + /* exports used: default */ + /*!**********************************************!*\ + !*** ./~/history/lib/createMemoryHistory.js ***! + \**********************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nexports.__esModule = true;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _warning = __webpack_require__(/*! warning */ 23);\n\nvar _warning2 = _interopRequireDefault(_warning);\n\nvar _invariant = __webpack_require__(/*! invariant */ 25);\n\nvar _invariant2 = _interopRequireDefault(_invariant);\n\nvar _LocationUtils = __webpack_require__(/*! ./LocationUtils */ 98);\n\nvar _PathUtils = __webpack_require__(/*! ./PathUtils */ 66);\n\nvar _createHistory = __webpack_require__(/*! ./createHistory */ 215);\n\nvar _createHistory2 = _interopRequireDefault(_createHistory);\n\nvar _Actions = __webpack_require__(/*! ./Actions */ 159);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar createStateStorage = function createStateStorage(entries) {\n return entries.filter(function (entry) {\n return entry.state;\n }).reduce(function (memo, entry) {\n memo[entry.key] = entry.state;\n return memo;\n }, {});\n};\n\nvar createMemoryHistory = function createMemoryHistory() {\n var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\n if (Array.isArray(options)) {\n options = { entries: options };\n } else if (typeof options === 'string') {\n options = { entries: [options] };\n }\n\n var getCurrentLocation = function getCurrentLocation() {\n var entry = entries[current];\n var path = (0, _PathUtils.createPath)(entry);\n\n var key = void 0,\n state = void 0;\n if (entry.key) {\n key = entry.key;\n state = readState(key);\n }\n\n var init = (0, _PathUtils.parsePath)(path);\n\n return (0, _LocationUtils.createLocation)(_extends({}, init, { state: state }), undefined, key);\n };\n\n var canGo = function canGo(n) {\n var index = current + n;\n return index >= 0 && index < entries.length;\n };\n\n var go = function go(n) {\n if (!n) return;\n\n if (!canGo(n)) {\n true ? (0, _warning2.default)(false, 'Cannot go(%s) there is not enough history', n) : void 0;\n\n return;\n }\n\n current += n;\n var currentLocation = getCurrentLocation();\n\n // Change action to POP\n history.transitionTo(_extends({}, currentLocation, { action: _Actions.POP }));\n };\n\n var pushLocation = function pushLocation(location) {\n current += 1;\n\n if (current < entries.length) entries.splice(current);\n\n entries.push(location);\n\n saveState(location.key, location.state);\n };\n\n var replaceLocation = function replaceLocation(location) {\n entries[current] = location;\n saveState(location.key, location.state);\n };\n\n var history = (0, _createHistory2.default)(_extends({}, options, {\n getCurrentLocation: getCurrentLocation,\n pushLocation: pushLocation,\n replaceLocation: replaceLocation,\n go: go\n }));\n\n var _options = options;\n var entries = _options.entries;\n var current = _options.current;\n\n\n if (typeof entries === 'string') {\n entries = [entries];\n } else if (!Array.isArray(entries)) {\n entries = ['/'];\n }\n\n entries = entries.map(function (entry) {\n return (0, _LocationUtils.createLocation)(entry);\n });\n\n if (current == null) {\n current = entries.length - 1;\n } else {\n !(current >= 0 && current < entries.length) ? true ? (0, _invariant2.default)(false, 'Current index must be >= 0 and < %s, was %s', entries.length, current) : (0, _invariant2.default)(false) : void 0;\n }\n\n var storage = createStateStorage(entries);\n\n var saveState = function saveState(key, state) {\n return storage[key] = state;\n };\n\n var readState = function readState(key) {\n return storage[key];\n };\n\n return _extends({}, history, {\n canGo: canGo\n });\n};\n\nexports.default = createMemoryHistory;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/history/lib/createMemoryHistory.js\n// module id = 1150\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/history/lib/createMemoryHistory.js?", + ); + + /***/ + }, + /* 1151 */ + /* unknown exports provided */ + /* all exports used */ + /*!*****************************************!*\ + !*** ./~/honeybadger-js/honeybadger.js ***! + \*****************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*\n honeybadger.js v0.4.7\n A JavaScript Notifier for Honeybadger\n https://github.com/honeybadger-io/honeybadger-js\n https://www.honeybadger.io/\n MIT license\n*/\n\n(function (root, builder) {\n 'use strict';\n // Read default configuration from script tag if available.\n var scriptConfig = {};\n (function() {\n var tags = document.getElementsByTagName(\"script\");\n var tag = tags[tags.length - 1];\n if (!tag) { return; }\n var attrs = tag.attributes;\n var value;\n for (var i = 0, len = attrs.length; i < len; i++) {\n if (/data-(\\w+)$/.test(attrs[i].nodeName)) {\n value = attrs[i].nodeValue;\n if (value === 'false') { value = false; }\n scriptConfig[RegExp.$1] = value;\n }\n }\n })();\n\n // Build the singleton factory. The factory can be accessed through\n // singleton.factory() to instantiate a new instance.\n var factory = function(){\n var f = builder();\n var singleton = f(scriptConfig);\n singleton.factory = f;\n return singleton;\n };\n\n // UMD (Universal Module Definition)\n // See https://github.com/umdjs/umd\n if (true) {\n // AMD. Register as an anonymous module.\n !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?\n\t\t\t\t(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n } else if (typeof module === 'object' && module.exports) {\n // Browserfy. Does not work with strict CommonJS, but\n // only CommonJS-like environments that support module.exports,\n // like Browserfy/Node.\n module.exports = factory();\n } else {\n // Browser globals (root is window).\n root.Honeybadger = factory();\n }\n}(this, function () {\n var VERSION = '0.4.7',\n NOTIFIER = {\n name: 'honeybadger.js',\n url: 'https://github.com/honeybadger-io/honeybadger-js',\n version: VERSION,\n language: 'javascript'\n };\n\n // Used to control initial setup across clients.\n var loaded = false,\n installed = false;\n\n // Used to prevent reporting duplicate errors across instances.\n var currentErr,\n currentPayload;\n\n // Utilities.\n function merge(obj1, obj2) {\n var obj3 = {};\n for (k in obj1) { obj3[k] = obj1[k]; }\n for (k in obj2) { obj3[k] = obj2[k]; }\n return obj3;\n }\n\n function currentErrIs(err) {\n if (!currentErr) { return false; }\n if (currentErr.name !== err.name) { return false; }\n if (currentErr.message !== err.message) { return false; }\n if (currentErr.stack !== err.stack) { return false; }\n return true;\n }\n\n function cgiData() {\n var data = {};\n data['HTTP_USER_AGENT'] = navigator.userAgent;\n if (document.referrer.match(/\\S/)) {\n data['HTTP_REFERER'] = document.referrer;\n }\n return data;\n }\n\n function encodeCookie(object) {\n if (typeof object !== 'object') {\n return undefined;\n }\n\n var cookies = [];\n for (k in object) {\n cookies.push(k + '=' + object[k]);\n }\n\n return cookies.join(';');\n }\n\n function stackTrace(err) {\n // From TraceKit: Opera 10 *destroys* its stacktrace property if you try to\n // access the stack property first.\n return err.stacktrace || err.stack || undefined\n }\n\n function generateStackTrace(err) {\n var stack;\n var maxStackSize = 10;\n\n if (err && (stack = stackTrace(err))) {\n return {stack: stack, generator: undefined};\n }\n\n try {\n throw new Error('');\n } catch(e) {\n if (stack = stackTrace(e)) {\n return {stack: stack, generator: 'throw'};\n }\n }\n\n stack = ['<call-stack>'];\n var curr = arguments.callee;\n while (curr && stack.length < maxStackSize) {\n if (/function(?:\\s+([\\w$]+))+\\s*\\(/.test(curr.toString())) {\n stack.push(RegExp.$1 || '<anonymous>');\n } else {\n stack.push('<anonymous>');\n }\n try {\n curr = curr.caller;\n } catch (e) {\n break;\n }\n }\n\n return {stack: stack.join('\\n'), generator: 'walk'};\n }\n\n function checkHandlers(handlers, err) {\n var handler, i, len;\n for (i = 0, len = handlers.length; i < len; i++) {\n handler = handlers[i];\n if (handler(err) === false) {\n return true;\n }\n }\n return false;\n }\n\n // Client factory.\n var factory = (function(opts) {\n var defaultProps = [];\n var queue = [];\n var self = {\n context: {},\n beforeNotifyHandlers: []\n }\n if (typeof opts === 'object') {\n for (k in opts) { self[k] = opts[k]; }\n }\n\n function log(msg){\n if (config('debug') && this.console) {\n console.log( msg );\n }\n }\n\n function config(key, fallback) {\n var value = self[key];\n if (value === undefined) { value = self[key.toLowerCase()] }\n if (value === 'false') { value = false; }\n if (value !== undefined) { return value; }\n return fallback;\n }\n\n function baseURL() {\n return 'http' + ((config('ssl', true) && 's') || '') + '://' + config('host', 'api.honeybadger.io');\n }\n\n function canSerialize(obj) {\n // Functions are TMI and Symbols can't convert to strings.\n if (/function|symbol/.test(typeof(obj))) { return false; }\n\n // No prototype, likely created with `Object.create(null)`.\n if (typeof obj === 'object' && typeof obj.hasOwnProperty === 'undefined') { return false; }\n\n return true;\n }\n\n function serialize(obj, prefix, depth) {\n var k, pk, ret, v;\n ret = [];\n if (!depth) { depth = 0; }\n if (depth >= config('max_depth', 8)) {\n return encodeURIComponent(prefix) + '=[MAX DEPTH REACHED]';\n }\n for (k in obj) {\n v = obj[k];\n if (obj.hasOwnProperty(k) && (k != null) && (v != null)) {\n if (!canSerialize(v)) { v = Object.prototype.toString.call(v); }\n pk = (prefix ? prefix + '[' + k + ']' : k);\n ret.push(typeof v === 'object' ? serialize(v, pk, depth+1) : encodeURIComponent(pk) + '=' + encodeURIComponent(v));\n }\n }\n return ret.join('&');\n }\n\n function request(url) {\n // Use XHR when available.\n try {\n // Inspired by https://gist.github.com/Xeoncross/7663273\n x = new(this.XMLHttpRequest || ActiveXObject)('MSXML2.XMLHTTP.3.0');\n x.open('GET', url, config('async', true));\n x.send();\n return;\n } catch(e) {\n log('Error encountered during XHR request (will retry): ' + e);\n }\n\n // Fall back to Image transport.\n img = new Image();\n img.src = url;\n }\n\n function send(payload) {\n currentErr = currentPayload = null;\n\n var apiKey = config('apiKey', config('api_key'));\n if (!apiKey) {\n log('Unable to send error report: no API key has been configured.');\n return false;\n }\n\n var url = baseURL() + '/v1/notices/js.gif?' + serialize({notice: payload}) +\n '&api_key=' + apiKey + '&t=' + new Date().getTime();\n\n request(url);\n\n return true;\n }\n\n function notify(err, generated) {\n if (config('disabled', false)) { return false; }\n if (!(typeof err === 'object')) { return false; }\n\n if (Object.prototype.toString.call(err) === '[object Error]') {\n var e = err;\n err = merge(err, {name: e.name, message: e.message, stack: stackTrace(e)})\n }\n\n if (currentErrIs(err)) {\n // Skip the duplicate error.\n return false;\n } else if (currentPayload && loaded) {\n // This is a different error, send the old one now.\n send(currentPayload);\n }\n\n // Halt if err is empty.\n if (((function() {\n var k, results;\n results = [];\n for (k in err) {\n if (!{}.hasOwnProperty.call(err, k)) continue;\n results.push(k);\n }\n return results;\n })()).length === 0) {\n return false;\n }\n\n if (generated) {\n err = merge(err, generated);\n }\n\n if (checkHandlers(self.beforeNotifyHandlers, err)) {\n return false;\n }\n\n var data = cgiData();\n if (typeof err.cookies === 'string') {\n data['HTTP_COOKIE'] = err.cookies;\n } else if (typeof err.cookies === 'object') {\n data['HTTP_COOKIE'] = encodeCookie(err.cookies);\n }\n\n var payload = {\n notifier: NOTIFIER,\n error: {\n 'class': err.name || 'Error',\n message: err.message,\n backtrace: err.stack,\n generator: err.generator,\n fingerprint: err.fingerprint\n },\n request: {\n url: err.url || document.URL,\n component: err.component || config('component'),\n action: err.action || config('action'),\n context: merge(self.context, err.context),\n cgi_data: data,\n params: err.params\n },\n server: {\n project_root: err.projectRoot || err.project_root || config('projectRoot', config('project_root', window.location.protocol + '//' + window.location.host)),\n environment_name: err.environment || config('environment')\n }\n };\n\n currentPayload = payload;\n currentErr = err;\n\n if (loaded) {\n log('Deferring notice.', err, payload);\n window.setTimeout(function(){\n if (currentErrIs(err)) {\n send(payload);\n }\n });\n } else {\n log('Queuing notice.', err, payload);\n queue.push(payload);\n }\n\n return err;\n }\n\n var preferCatch = true;\n // IE < 10\n if (!window.atob) { preferCatch = false; }\n // See https://developer.mozilla.org/en-US/docs/Web/API/ErrorEvent\n if (window.ErrorEvent) {\n try {\n if ((new window.ErrorEvent('')).colno === 0) {\n preferCatch = false;\n }\n } catch(_e) {}\n }\n\n // wrap always returns the same function so that callbacks can be removed via\n // removeEventListener.\n function wrap(fn, force) {\n try {\n if (typeof fn !== 'function') {\n return fn;\n }\n if (!fn.___hb) {\n fn.___hb = function() {\n var onerror = config('onerror', true);\n // Don't catch if the browser is old or supports the new error\n // object and there is a window.onerror handler available instead.\n if ((preferCatch && (onerror || force)) || (force && !onerror)) {\n try {\n return fn.apply(this, arguments);\n } catch (e) {\n notify(e);\n throw(e);\n }\n } else {\n return fn.apply(this, arguments);\n }\n };\n }\n return fn.___hb;\n } catch(_e) {\n return fn;\n }\n }\n\n // Public API.\n self.notify = function(err, name, extra) {\n if (!err) { err = {}; }\n\n if (Object.prototype.toString.call(err) === '[object Error]') {\n var e = err;\n err = merge(err, {name: e.name, message: e.message, stack: stackTrace(e)})\n }\n\n if (!(typeof err === 'object')) {\n var m = String(err);\n err = {message: m};\n }\n\n if (name && !(typeof name === 'object')) {\n var n = String(name);\n name = {name: n};\n }\n\n if (name) {\n err = merge(err, name);\n }\n if (typeof extra === 'object') {\n err = merge(err, extra);\n }\n\n return notify(err, generateStackTrace(err));\n };\n\n self.wrap = function(func) {\n return wrap(func, true);\n };\n\n self.setContext = function(context) {\n if (typeof context === 'object') {\n self.context = merge(self.context, context);\n }\n return self;\n };\n\n self.resetContext = function(context) {\n if (typeof context === 'object') {\n self.context = merge({}, context);\n } else {\n self.context = {};\n }\n return self;\n };\n\n self.configure = function(opts) {\n for (k in opts) {\n self[k] = opts[k];\n }\n return self;\n };\n\n self.beforeNotify = function(handler) {\n self.beforeNotifyHandlers.push(handler);\n return self;\n };\n\n var indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };\n self.reset = function() {\n self.context = {};\n self.beforeNotifyHandlers = [];\n for (k in self) {\n if (indexOf.call(defaultProps, k) == -1) {\n self[k] = undefined;\n }\n }\n return self;\n };\n\n self.getVersion = function() {\n return VERSION;\n }\n\n // Install instrumentation.\n // This should happen once for the first factory call.\n function instrument(object, name, replacement) {\n if (installed) { return; }\n if (!object || !name || !replacement) { return; }\n var original = object[name];\n object[name] = replacement(original);\n }\n\n var instrumentTimer = function(original) {\n // See https://developer.mozilla.org/en-US/docs/Web/API/WindowTimers/setTimeout\n return function(func, delay) {\n if (typeof func === 'function') {\n var args = Array.prototype.slice.call(arguments, 2);\n func = wrap(func);\n return original(function() {\n func.apply(null, args);\n }, delay);\n } else {\n return original(func, delay);\n }\n }\n };\n instrument(window, 'setTimeout', instrumentTimer);\n instrument(window, 'setInterval', instrumentTimer);\n\n // Event targets borrowed from bugsnag-js:\n // See https://github.com/bugsnag/bugsnag-js/blob/d55af916a4d3c7757f979d887f9533fe1a04cc93/src/bugsnag.js#L542\n 'EventTarget Window Node ApplicationCache AudioTrackList ChannelMergerNode CryptoOperation EventSource FileReader HTMLUnknownElement IDBDatabase IDBRequest IDBTransaction KeyOperation MediaController MessagePort ModalWindow Notification SVGElementInstance Screen TextTrack TextTrackCue TextTrackList WebSocket WebSocketWorker Worker XMLHttpRequest XMLHttpRequestEventTarget XMLHttpRequestUpload'.replace(/\\w+/g, function (prop) {\n prototype = window[prop] && window[prop].prototype;\n if (prototype && prototype.hasOwnProperty && prototype.hasOwnProperty('addEventListener')) {\n instrument(prototype, 'addEventListener', function(original) {\n // See https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener\n return function(type, listener, useCapture, wantsUntrusted) {\n try {\n if (listener && listener.handleEvent != null) {\n listener.handleEvent = wrap(listener.handleEvent);\n }\n } catch(e) {\n // Ignore 'Permission denied to access property \"handleEvent\"' errors.\n log(e);\n }\n return original.call(this, type, wrap(listener), useCapture, wantsUntrusted);\n };\n });\n instrument(prototype, 'removeEventListener', function(original) {\n return function(type, listener, useCapture, wantsUntrusted) {\n original.call(this, type, listener, useCapture, wantsUntrusted);\n return original.call(this, type, wrap(listener), useCapture, wantsUntrusted);\n };\n });\n }\n });\n\n instrument(window, 'onerror', function(original) {\n function onerror(msg, url, line, col, err) {\n if (currentErr) { return; }\n if (!config('onerror', true)) { return; }\n if (line === 0 && /Script error\\.?/.test(msg)) {\n // See https://developer.mozilla.org/en/docs/Web/API/GlobalEventHandlers/onerror#Notes\n log('Ignoring cross-domain script error. Use CORS to enable tracking of these types of errors.');\n return;\n }\n log('Error caught by window.onerror');\n if (err) {\n notify(err);\n return;\n }\n // simulate v8 stack\n stack = [msg, '\\n at ? (', url || 'unknown', ':', line || 0, ':', col || 0, ')'].join('');\n notify({\n name: 'window.onerror',\n message: msg,\n stack: stack\n });\n }\n // See https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onerror\n return function(msg, url, line, col, err) {\n onerror(msg, url, line, col, err);\n if (typeof original === 'function') {\n return original.apply(this, arguments);\n }\n return false;\n };\n });\n\n // End of instrumentation.\n installed = true;\n\n // Save original state for reset()\n for (k in self) {\n defaultProps.push(k);\n }\n\n // Initialization.\n log('Initializing honeybadger.js ' + VERSION);\n\n // See https://developer.mozilla.org/en-US/docs/Web/API/Document/readyState\n // https://www.w3.org/TR/html5/dom.html#dom-document-readystate\n // The 'loaded' state is for older versions of Safari.\n if (/complete|interactive|loaded/.test(document.readyState)) {\n loaded = true;\n log('honeybadger.js ' + VERSION + ' ready');\n } else {\n log('Installing ready handler');\n var domReady = function() {\n loaded = true;\n log('honeybadger.js ' + VERSION + ' ready');\n while (notice = queue.pop()) {\n send(notice);\n }\n };\n if (document.addEventListener) {\n document.addEventListener('DOMContentLoaded', domReady, true);\n } else {\n window.attachEvent('onload', domReady);\n }\n }\n\n return self;\n });\n\n return factory;\n}));\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/honeybadger-js/honeybadger.js\n// module id = 1151\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/honeybadger-js/honeybadger.js?", + ); + + /***/ + }, + /* 1152 */ + /* exports provided: default */ + /* exports used: default */ + /*!**************************************!*\ + !*** ./~/lodash-es/_getPrototype.js ***! + \**************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__overArg_js__ = __webpack_require__(/*! ./_overArg.js */ 1153);\n\n\n/** Built-in value references. */\nvar getPrototype = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__overArg_js__["a" /* default */])(Object.getPrototypeOf, Object);\n\n/* harmony default export */ __webpack_exports__["a"] = (getPrototype);\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash-es/_getPrototype.js\n// module id = 1152\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/lodash-es/_getPrototype.js?', + ); + + /***/ + }, + /* 1153 */ + /* exports provided: default */ + /* exports used: default */ + /*!*********************************!*\ + !*** ./~/lodash-es/_overArg.js ***! + \*********************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\n/* harmony default export */ __webpack_exports__["a"] = (overArg);\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash-es/_overArg.js\n// module id = 1153\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/lodash-es/_overArg.js?', + ); + + /***/ + }, + /* 1154 */ + /* exports provided: default */ + /* exports used: default */ + /*!*************************************!*\ + !*** ./~/lodash-es/isObjectLike.js ***! + \*************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/**\n * Checks if `value` is object-like. A value is object-like if it\'s not `null`\n * and has a `typeof` result of "object".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == \'object\';\n}\n\n/* harmony default export */ __webpack_exports__["a"] = (isObjectLike);\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash-es/isObjectLike.js\n// module id = 1154\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/lodash-es/isObjectLike.js?', + ); + + /***/ + }, + /* 1155 */ + /* unknown exports provided */ + /* all exports used */ + /*!******************************!*\ + !*** ./~/lodash/_WeakMap.js ***! + \******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "var getNative = __webpack_require__(/*! ./_getNative */ 363),\n root = __webpack_require__(/*! ./_root */ 77);\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nmodule.exports = WeakMap;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/_WeakMap.js\n// module id = 1155\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/lodash/_WeakMap.js?", + ); + + /***/ + }, + /* 1156 */ + /* unknown exports provided */ + /* all exports used */ + /*!************************************!*\ + !*** ./~/lodash/_arrayIncludes.js ***! + \************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + 'var baseIndexOf = __webpack_require__(/*! ./_baseIndexOf */ 1161);\n\n/**\n * A specialized version of `_.includes` for arrays without support for\n * specifying an index to search from.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\nfunction arrayIncludes(array, value) {\n var length = array == null ? 0 : array.length;\n return !!length && baseIndexOf(array, value, 0) > -1;\n}\n\nmodule.exports = arrayIncludes;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/_arrayIncludes.js\n// module id = 1156\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/lodash/_arrayIncludes.js?', + ); + + /***/ + }, + /* 1157 */ + /* unknown exports provided */ + /* all exports used */ + /*!********************************!*\ + !*** ./~/lodash/_arrayPush.js ***! + \********************************/ + /***/ function (module, exports) { + eval( + '/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nmodule.exports = arrayPush;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/_arrayPush.js\n// module id = 1157\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/lodash/_arrayPush.js?', + ); + + /***/ + }, + /* 1158 */ + /* unknown exports provided */ + /* all exports used */ + /*!**************************************!*\ + !*** ./~/lodash/_baseAssignValue.js ***! + \**************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "var defineProperty = __webpack_require__(/*! ./_defineProperty */ 361);\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nmodule.exports = baseAssignValue;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/_baseAssignValue.js\n// module id = 1158\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/lodash/_baseAssignValue.js?", + ); + + /***/ + }, + /* 1159 */ + /* unknown exports provided */ + /* all exports used */ + /*!************************************!*\ + !*** ./~/lodash/_baseFindIndex.js ***! + \************************************/ + /***/ function (module, exports) { + eval( + '/**\n * The base implementation of `_.findIndex` and `_.findLastIndex` without\n * support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} predicate The function invoked per iteration.\n * @param {number} fromIndex The index to search from.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseFindIndex(array, predicate, fromIndex, fromRight) {\n var length = array.length,\n index = fromIndex + (fromRight ? 1 : -1);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (predicate(array[index], index, array)) {\n return index;\n }\n }\n return -1;\n}\n\nmodule.exports = baseFindIndex;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/_baseFindIndex.js\n// module id = 1159\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/lodash/_baseFindIndex.js?', + ); + + /***/ + }, + /* 1160 */ + /* unknown exports provided */ + /* all exports used */ + /*!**********************************!*\ + !*** ./~/lodash/_baseFlatten.js ***! + \**********************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + 'var arrayPush = __webpack_require__(/*! ./_arrayPush */ 1157),\n isFlattenable = __webpack_require__(/*! ./_isFlattenable */ 1180);\n\n/**\n * The base implementation of `_.flatten` with support for restricting flattening.\n *\n * @private\n * @param {Array} array The array to flatten.\n * @param {number} depth The maximum recursion depth.\n * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.\n * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.\n * @param {Array} [result=[]] The initial result value.\n * @returns {Array} Returns the new flattened array.\n */\nfunction baseFlatten(array, depth, predicate, isStrict, result) {\n var index = -1,\n length = array.length;\n\n predicate || (predicate = isFlattenable);\n result || (result = []);\n\n while (++index < length) {\n var value = array[index];\n if (depth > 0 && predicate(value)) {\n if (depth > 1) {\n // Recursively flatten arrays (susceptible to call stack limits).\n baseFlatten(value, depth - 1, predicate, isStrict, result);\n } else {\n arrayPush(result, value);\n }\n } else if (!isStrict) {\n result[result.length] = value;\n }\n }\n return result;\n}\n\nmodule.exports = baseFlatten;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/_baseFlatten.js\n// module id = 1160\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/lodash/_baseFlatten.js?', + ); + + /***/ + }, + /* 1161 */ + /* unknown exports provided */ + /* all exports used */ + /*!**********************************!*\ + !*** ./~/lodash/_baseIndexOf.js ***! + \**********************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + 'var baseFindIndex = __webpack_require__(/*! ./_baseFindIndex */ 1159),\n baseIsNaN = __webpack_require__(/*! ./_baseIsNaN */ 1163),\n strictIndexOf = __webpack_require__(/*! ./_strictIndexOf */ 1188);\n\n/**\n * The base implementation of `_.indexOf` without `fromIndex` bounds checks.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseIndexOf(array, value, fromIndex) {\n return value === value\n ? strictIndexOf(array, value, fromIndex)\n : baseFindIndex(array, baseIsNaN, fromIndex);\n}\n\nmodule.exports = baseIndexOf;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/_baseIndexOf.js\n// module id = 1161\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/lodash/_baseIndexOf.js?', + ); + + /***/ + }, + /* 1162 */ + /* unknown exports provided */ + /* all exports used */ + /*!**************************************!*\ + !*** ./~/lodash/_baseIsArguments.js ***! + \**************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ 225),\n isObjectLike = __webpack_require__(/*! ./isObjectLike */ 163);\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/_baseIsArguments.js\n// module id = 1162\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/lodash/_baseIsArguments.js?", + ); + + /***/ + }, + /* 1163 */ + /* unknown exports provided */ + /* all exports used */ + /*!********************************!*\ + !*** ./~/lodash/_baseIsNaN.js ***! + \********************************/ + /***/ function (module, exports) { + eval( + '/**\n * The base implementation of `_.isNaN` without support for number objects.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n */\nfunction baseIsNaN(value) {\n return value !== value;\n}\n\nmodule.exports = baseIsNaN;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/_baseIsNaN.js\n// module id = 1163\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/lodash/_baseIsNaN.js?', + ); + + /***/ + }, + /* 1164 */ + /* unknown exports provided */ + /* all exports used */ + /*!***********************************!*\ + !*** ./~/lodash/_baseIsNative.js ***! + \***********************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "var isFunction = __webpack_require__(/*! ./isFunction */ 1202),\n isMasked = __webpack_require__(/*! ./_isMasked */ 1183),\n isObject = __webpack_require__(/*! ./isObject */ 116),\n toSource = __webpack_require__(/*! ./_toSource */ 1190);\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/_baseIsNative.js\n// module id = 1164\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/lodash/_baseIsNative.js?", + ); + + /***/ + }, + /* 1165 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/lodash/_baseRest.js ***! + \*******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "var identity = __webpack_require__(/*! ./identity */ 229),\n overRest = __webpack_require__(/*! ./_overRest */ 365),\n setToString = __webpack_require__(/*! ./_setToString */ 228);\n\n/**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\nfunction baseRest(func, start) {\n return setToString(overRest(func, start, identity), func + '');\n}\n\nmodule.exports = baseRest;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/_baseRest.js\n// module id = 1165\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/lodash/_baseRest.js?", + ); + + /***/ + }, + /* 1166 */ + /* unknown exports provided */ + /* all exports used */ + /*!**************************************!*\ + !*** ./~/lodash/_baseSetToString.js ***! + \**************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "var constant = __webpack_require__(/*! ./constant */ 1196),\n defineProperty = __webpack_require__(/*! ./_defineProperty */ 361),\n identity = __webpack_require__(/*! ./identity */ 229);\n\n/**\n * The base implementation of `setToString` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar baseSetToString = !defineProperty ? identity : function(func, string) {\n return defineProperty(func, 'toString', {\n 'configurable': true,\n 'enumerable': false,\n 'value': constant(string),\n 'writable': true\n });\n};\n\nmodule.exports = baseSetToString;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/_baseSetToString.js\n// module id = 1166\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/lodash/_baseSetToString.js?", + ); + + /***/ + }, + /* 1167 */ + /* unknown exports provided */ + /* all exports used */ + /*!*********************************!*\ + !*** ./~/lodash/_coreJsData.js ***! + \*********************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "var root = __webpack_require__(/*! ./_root */ 77);\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/_coreJsData.js\n// module id = 1167\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/lodash/_coreJsData.js?", + ); + + /***/ + }, + /* 1168 */ + /* unknown exports provided */ + /* all exports used */ + /*!***********************************!*\ + !*** ./~/lodash/_countHolders.js ***! + \***********************************/ + /***/ function (module, exports) { + eval( + '/**\n * Gets the number of `placeholder` occurrences in `array`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} placeholder The placeholder to search for.\n * @returns {number} Returns the placeholder count.\n */\nfunction countHolders(array, placeholder) {\n var length = array.length,\n result = 0;\n\n while (length--) {\n if (array[length] === placeholder) {\n ++result;\n }\n }\n return result;\n}\n\nmodule.exports = countHolders;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/_countHolders.js\n// module id = 1168\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/lodash/_countHolders.js?', + ); + + /***/ + }, + /* 1169 */ + /* unknown exports provided */ + /* all exports used */ + /*!*********************************!*\ + !*** ./~/lodash/_createBind.js ***! + \*********************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + 'var createCtor = __webpack_require__(/*! ./_createCtor */ 161),\n root = __webpack_require__(/*! ./_root */ 77);\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_BIND_FLAG = 1;\n\n/**\n * Creates a function that wraps `func` to invoke it with the optional `this`\n * binding of `thisArg`.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {*} [thisArg] The `this` binding of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\nfunction createBind(func, bitmask, thisArg) {\n var isBind = bitmask & WRAP_BIND_FLAG,\n Ctor = createCtor(func);\n\n function wrapper() {\n var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n return fn.apply(isBind ? thisArg : this, arguments);\n }\n return wrapper;\n}\n\nmodule.exports = createBind;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/_createBind.js\n// module id = 1169\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/lodash/_createBind.js?', + ); + + /***/ + }, + /* 1170 */ + /* unknown exports provided */ + /* all exports used */ + /*!**********************************!*\ + !*** ./~/lodash/_createCurry.js ***! + \**********************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + 'var apply = __webpack_require__(/*! ./_apply */ 223),\n createCtor = __webpack_require__(/*! ./_createCtor */ 161),\n createHybrid = __webpack_require__(/*! ./_createHybrid */ 359),\n createRecurry = __webpack_require__(/*! ./_createRecurry */ 360),\n getHolder = __webpack_require__(/*! ./_getHolder */ 227),\n replaceHolders = __webpack_require__(/*! ./_replaceHolders */ 162),\n root = __webpack_require__(/*! ./_root */ 77);\n\n/**\n * Creates a function that wraps `func` to enable currying.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {number} arity The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\nfunction createCurry(func, bitmask, arity) {\n var Ctor = createCtor(func);\n\n function wrapper() {\n var length = arguments.length,\n args = Array(length),\n index = length,\n placeholder = getHolder(wrapper);\n\n while (index--) {\n args[index] = arguments[index];\n }\n var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder)\n ? []\n : replaceHolders(args, placeholder);\n\n length -= holders.length;\n if (length < arity) {\n return createRecurry(\n func, bitmask, createHybrid, wrapper.placeholder, undefined,\n args, holders, undefined, undefined, arity - length);\n }\n var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n return apply(fn, this, args);\n }\n return wrapper;\n}\n\nmodule.exports = createCurry;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/_createCurry.js\n// module id = 1170\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/lodash/_createCurry.js?', + ); + + /***/ + }, + /* 1171 */ + /* unknown exports provided */ + /* all exports used */ + /*!************************************!*\ + !*** ./~/lodash/_createPartial.js ***! + \************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + 'var apply = __webpack_require__(/*! ./_apply */ 223),\n createCtor = __webpack_require__(/*! ./_createCtor */ 161),\n root = __webpack_require__(/*! ./_root */ 77);\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_BIND_FLAG = 1;\n\n/**\n * Creates a function that wraps `func` to invoke it with the `this` binding\n * of `thisArg` and `partials` prepended to the arguments it receives.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} partials The arguments to prepend to those provided to\n * the new function.\n * @returns {Function} Returns the new wrapped function.\n */\nfunction createPartial(func, bitmask, thisArg, partials) {\n var isBind = bitmask & WRAP_BIND_FLAG,\n Ctor = createCtor(func);\n\n function wrapper() {\n var argsIndex = -1,\n argsLength = arguments.length,\n leftIndex = -1,\n leftLength = partials.length,\n args = Array(leftLength + argsLength),\n fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n\n while (++leftIndex < leftLength) {\n args[leftIndex] = partials[leftIndex];\n }\n while (argsLength--) {\n args[leftIndex++] = arguments[++argsIndex];\n }\n return apply(fn, isBind ? thisArg : this, args);\n }\n return wrapper;\n}\n\nmodule.exports = createPartial;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/_createPartial.js\n// module id = 1171\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/lodash/_createPartial.js?', + ); + + /***/ + }, + /* 1172 */ + /* unknown exports provided */ + /* all exports used */ + /*!*********************************!*\ + !*** ./~/lodash/_createWrap.js ***! + \*********************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "var baseSetData = __webpack_require__(/*! ./_baseSetData */ 355),\n createBind = __webpack_require__(/*! ./_createBind */ 1169),\n createCurry = __webpack_require__(/*! ./_createCurry */ 1170),\n createHybrid = __webpack_require__(/*! ./_createHybrid */ 359),\n createPartial = __webpack_require__(/*! ./_createPartial */ 1171),\n getData = __webpack_require__(/*! ./_getData */ 362),\n mergeData = __webpack_require__(/*! ./_mergeData */ 1184),\n setData = __webpack_require__(/*! ./_setData */ 366),\n setWrapToString = __webpack_require__(/*! ./_setWrapToString */ 367),\n toInteger = __webpack_require__(/*! ./toInteger */ 1206);\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_BIND_FLAG = 1,\n WRAP_BIND_KEY_FLAG = 2,\n WRAP_CURRY_FLAG = 8,\n WRAP_CURRY_RIGHT_FLAG = 16,\n WRAP_PARTIAL_FLAG = 32,\n WRAP_PARTIAL_RIGHT_FLAG = 64;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * Creates a function that either curries or invokes `func` with optional\n * `this` binding and partially applied arguments.\n *\n * @private\n * @param {Function|string} func The function or method name to wrap.\n * @param {number} bitmask The bitmask flags.\n * 1 - `_.bind`\n * 2 - `_.bindKey`\n * 4 - `_.curry` or `_.curryRight` of a bound function\n * 8 - `_.curry`\n * 16 - `_.curryRight`\n * 32 - `_.partial`\n * 64 - `_.partialRight`\n * 128 - `_.rearg`\n * 256 - `_.ary`\n * 512 - `_.flip`\n * @param {*} [thisArg] The `this` binding of `func`.\n * @param {Array} [partials] The arguments to be partially applied.\n * @param {Array} [holders] The `partials` placeholder indexes.\n * @param {Array} [argPos] The argument positions of the new function.\n * @param {number} [ary] The arity cap of `func`.\n * @param {number} [arity] The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\nfunction createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {\n var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;\n if (!isBindKey && typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var length = partials ? partials.length : 0;\n if (!length) {\n bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG);\n partials = holders = undefined;\n }\n ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0);\n arity = arity === undefined ? arity : toInteger(arity);\n length -= holders ? holders.length : 0;\n\n if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) {\n var partialsRight = partials,\n holdersRight = holders;\n\n partials = holders = undefined;\n }\n var data = isBindKey ? undefined : getData(func);\n\n var newData = [\n func, bitmask, thisArg, partials, holders, partialsRight, holdersRight,\n argPos, ary, arity\n ];\n\n if (data) {\n mergeData(newData, data);\n }\n func = newData[0];\n bitmask = newData[1];\n thisArg = newData[2];\n partials = newData[3];\n holders = newData[4];\n arity = newData[9] = newData[9] === undefined\n ? (isBindKey ? 0 : func.length)\n : nativeMax(newData[9] - length, 0);\n\n if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {\n bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);\n }\n if (!bitmask || bitmask == WRAP_BIND_FLAG) {\n var result = createBind(func, bitmask, thisArg);\n } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) {\n result = createCurry(func, bitmask, arity);\n } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) {\n result = createPartial(func, bitmask, thisArg, partials);\n } else {\n result = createHybrid.apply(undefined, newData);\n }\n var setter = data ? baseSetData : setData;\n return setWrapToString(setter(result, newData), func, bitmask);\n}\n\nmodule.exports = createWrap;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/_createWrap.js\n// module id = 1172\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/lodash/_createWrap.js?", + ); + + /***/ + }, + /* 1173 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/lodash/_flatRest.js ***! + \*******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "var flatten = __webpack_require__(/*! ./flatten */ 1197),\n overRest = __webpack_require__(/*! ./_overRest */ 365),\n setToString = __webpack_require__(/*! ./_setToString */ 228);\n\n/**\n * A specialized version of `baseRest` which flattens the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @returns {Function} Returns the new function.\n */\nfunction flatRest(func) {\n return setToString(overRest(func, undefined, flatten), func + '');\n}\n\nmodule.exports = flatRest;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/_flatRest.js\n// module id = 1173\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/lodash/_flatRest.js?", + ); + + /***/ + }, + /* 1174 */ + /* unknown exports provided */ + /* all exports used */ + /*!*********************************!*\ + !*** ./~/lodash/_freeGlobal.js ***! + \*********************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "/* WEBPACK VAR INJECTION */(function(global) {/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(/*! ./../webpack/buildin/global.js */ 104)))\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/_freeGlobal.js\n// module id = 1174\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/lodash/_freeGlobal.js?", + ); + + /***/ + }, + /* 1175 */ + /* unknown exports provided */ + /* all exports used */ + /*!**********************************!*\ + !*** ./~/lodash/_getFuncName.js ***! + \**********************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "var realNames = __webpack_require__(/*! ./_realNames */ 1186);\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the name of `func`.\n *\n * @private\n * @param {Function} func The function to query.\n * @returns {string} Returns the function name.\n */\nfunction getFuncName(func) {\n var result = (func.name + ''),\n array = realNames[result],\n length = hasOwnProperty.call(realNames, result) ? array.length : 0;\n\n while (length--) {\n var data = array[length],\n otherFunc = data.func;\n if (otherFunc == null || otherFunc == func) {\n return data.name;\n }\n }\n return result;\n}\n\nmodule.exports = getFuncName;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/_getFuncName.js\n// module id = 1175\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/lodash/_getFuncName.js?", + ); + + /***/ + }, + /* 1176 */ + /* unknown exports provided */ + /* all exports used */ + /*!********************************!*\ + !*** ./~/lodash/_getRawTag.js ***! + \********************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + 'var Symbol = __webpack_require__(/*! ./_Symbol */ 222);\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/_getRawTag.js\n// module id = 1176\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/lodash/_getRawTag.js?', + ); + + /***/ + }, + /* 1177 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/lodash/_getValue.js ***! + \*******************************/ + /***/ function (module, exports) { + eval( + '/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/_getValue.js\n// module id = 1177\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/lodash/_getValue.js?', + ); + + /***/ + }, + /* 1178 */ + /* unknown exports provided */ + /* all exports used */ + /*!*************************************!*\ + !*** ./~/lodash/_getWrapDetails.js ***! + \*************************************/ + /***/ function (module, exports) { + eval( + '/** Used to match wrap detail comments. */\nvar reWrapDetails = /\\{\\n\\/\\* \\[wrapped with (.+)\\] \\*/,\n reSplitDetails = /,? & /;\n\n/**\n * Extracts wrapper details from the `source` body comment.\n *\n * @private\n * @param {string} source The source to inspect.\n * @returns {Array} Returns the wrapper details.\n */\nfunction getWrapDetails(source) {\n var match = source.match(reWrapDetails);\n return match ? match[1].split(reSplitDetails) : [];\n}\n\nmodule.exports = getWrapDetails;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/_getWrapDetails.js\n// module id = 1178\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/lodash/_getWrapDetails.js?', + ); + + /***/ + }, + /* 1179 */ + /* unknown exports provided */ + /* all exports used */ + /*!****************************************!*\ + !*** ./~/lodash/_insertWrapDetails.js ***! + \****************************************/ + /***/ function (module, exports) { + eval( + "/** Used to match wrap detail comments. */\nvar reWrapComment = /\\{(?:\\n\\/\\* \\[wrapped with .+\\] \\*\\/)?\\n?/;\n\n/**\n * Inserts wrapper `details` in a comment at the top of the `source` body.\n *\n * @private\n * @param {string} source The source to modify.\n * @returns {Array} details The details to insert.\n * @returns {string} Returns the modified source.\n */\nfunction insertWrapDetails(source, details) {\n var length = details.length;\n if (!length) {\n return source;\n }\n var lastIndex = length - 1;\n details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex];\n details = details.join(length > 2 ? ', ' : ' ');\n return source.replace(reWrapComment, '{\\n/* [wrapped with ' + details + '] */\\n');\n}\n\nmodule.exports = insertWrapDetails;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/_insertWrapDetails.js\n// module id = 1179\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/lodash/_insertWrapDetails.js?", + ); + + /***/ + }, + /* 1180 */ + /* unknown exports provided */ + /* all exports used */ + /*!************************************!*\ + !*** ./~/lodash/_isFlattenable.js ***! + \************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + 'var Symbol = __webpack_require__(/*! ./_Symbol */ 222),\n isArguments = __webpack_require__(/*! ./isArguments */ 1201),\n isArray = __webpack_require__(/*! ./isArray */ 369);\n\n/** Built-in value references. */\nvar spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined;\n\n/**\n * Checks if `value` is a flattenable `arguments` object or array.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.\n */\nfunction isFlattenable(value) {\n return isArray(value) || isArguments(value) ||\n !!(spreadableSymbol && value && value[spreadableSymbol]);\n}\n\nmodule.exports = isFlattenable;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/_isFlattenable.js\n// module id = 1180\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/lodash/_isFlattenable.js?', + ); + + /***/ + }, + /* 1181 */ + /* unknown exports provided */ + /* all exports used */ + /*!******************************!*\ + !*** ./~/lodash/_isIndex.js ***! + \******************************/ + /***/ function (module, exports) { + eval( + "/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n length = length == null ? MAX_SAFE_INTEGER : length;\n return !!length &&\n (typeof value == 'number' || reIsUint.test(value)) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/_isIndex.js\n// module id = 1181\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/lodash/_isIndex.js?", + ); + + /***/ + }, + /* 1182 */ + /* unknown exports provided */ + /* all exports used */ + /*!*********************************!*\ + !*** ./~/lodash/_isLaziable.js ***! + \*********************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "var LazyWrapper = __webpack_require__(/*! ./_LazyWrapper */ 221),\n getData = __webpack_require__(/*! ./_getData */ 362),\n getFuncName = __webpack_require__(/*! ./_getFuncName */ 1175),\n lodash = __webpack_require__(/*! ./wrapperLodash */ 1208);\n\n/**\n * Checks if `func` has a lazy counterpart.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` has a lazy counterpart,\n * else `false`.\n */\nfunction isLaziable(func) {\n var funcName = getFuncName(func),\n other = lodash[funcName];\n\n if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {\n return false;\n }\n if (func === other) {\n return true;\n }\n var data = getData(other);\n return !!data && func === data[0];\n}\n\nmodule.exports = isLaziable;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/_isLaziable.js\n// module id = 1182\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/lodash/_isLaziable.js?", + ); + + /***/ + }, + /* 1183 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/lodash/_isMasked.js ***! + \*******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "var coreJsData = __webpack_require__(/*! ./_coreJsData */ 1167);\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/_isMasked.js\n// module id = 1183\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/lodash/_isMasked.js?", + ); + + /***/ + }, + /* 1184 */ + /* unknown exports provided */ + /* all exports used */ + /*!********************************!*\ + !*** ./~/lodash/_mergeData.js ***! + \********************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "var composeArgs = __webpack_require__(/*! ./_composeArgs */ 356),\n composeArgsRight = __webpack_require__(/*! ./_composeArgsRight */ 357),\n replaceHolders = __webpack_require__(/*! ./_replaceHolders */ 162);\n\n/** Used as the internal argument placeholder. */\nvar PLACEHOLDER = '__lodash_placeholder__';\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_BIND_FLAG = 1,\n WRAP_BIND_KEY_FLAG = 2,\n WRAP_CURRY_BOUND_FLAG = 4,\n WRAP_CURRY_FLAG = 8,\n WRAP_ARY_FLAG = 128,\n WRAP_REARG_FLAG = 256;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMin = Math.min;\n\n/**\n * Merges the function metadata of `source` into `data`.\n *\n * Merging metadata reduces the number of wrappers used to invoke a function.\n * This is possible because methods like `_.bind`, `_.curry`, and `_.partial`\n * may be applied regardless of execution order. Methods like `_.ary` and\n * `_.rearg` modify function arguments, making the order in which they are\n * executed important, preventing the merging of metadata. However, we make\n * an exception for a safe combined case where curried functions have `_.ary`\n * and or `_.rearg` applied.\n *\n * @private\n * @param {Array} data The destination metadata.\n * @param {Array} source The source metadata.\n * @returns {Array} Returns `data`.\n */\nfunction mergeData(data, source) {\n var bitmask = data[1],\n srcBitmask = source[1],\n newBitmask = bitmask | srcBitmask,\n isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);\n\n var isCombo =\n ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) ||\n ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) ||\n ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG));\n\n // Exit early if metadata can't be merged.\n if (!(isCommon || isCombo)) {\n return data;\n }\n // Use source `thisArg` if available.\n if (srcBitmask & WRAP_BIND_FLAG) {\n data[2] = source[2];\n // Set when currying a bound function.\n newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;\n }\n // Compose partial arguments.\n var value = source[3];\n if (value) {\n var partials = data[3];\n data[3] = partials ? composeArgs(partials, value, source[4]) : value;\n data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];\n }\n // Compose partial right arguments.\n value = source[5];\n if (value) {\n partials = data[5];\n data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;\n data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];\n }\n // Use source `argPos` if available.\n value = source[7];\n if (value) {\n data[7] = value;\n }\n // Use source `ary` if it's smaller.\n if (srcBitmask & WRAP_ARY_FLAG) {\n data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);\n }\n // Use source `arity` if one is not provided.\n if (data[9] == null) {\n data[9] = source[9];\n }\n // Use source `func` and merge bitmasks.\n data[0] = source[0];\n data[1] = newBitmask;\n\n return data;\n}\n\nmodule.exports = mergeData;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/_mergeData.js\n// module id = 1184\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/lodash/_mergeData.js?", + ); + + /***/ + }, + /* 1185 */ + /* unknown exports provided */ + /* all exports used */ + /*!*************************************!*\ + !*** ./~/lodash/_objectToString.js ***! + \*************************************/ + /***/ function (module, exports) { + eval( + '/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/_objectToString.js\n// module id = 1185\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/lodash/_objectToString.js?', + ); + + /***/ + }, + /* 1186 */ + /* unknown exports provided */ + /* all exports used */ + /*!********************************!*\ + !*** ./~/lodash/_realNames.js ***! + \********************************/ + /***/ function (module, exports) { + eval( + '/** Used to lookup unminified function names. */\nvar realNames = {};\n\nmodule.exports = realNames;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/_realNames.js\n// module id = 1186\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/lodash/_realNames.js?', + ); + + /***/ + }, + /* 1187 */ + /* unknown exports provided */ + /* all exports used */ + /*!******************************!*\ + !*** ./~/lodash/_reorder.js ***! + \******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + 'var copyArray = __webpack_require__(/*! ./_copyArray */ 358),\n isIndex = __webpack_require__(/*! ./_isIndex */ 1181);\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMin = Math.min;\n\n/**\n * Reorder `array` according to the specified indexes where the element at\n * the first index is assigned as the first element, the element at\n * the second index is assigned as the second element, and so on.\n *\n * @private\n * @param {Array} array The array to reorder.\n * @param {Array} indexes The arranged array indexes.\n * @returns {Array} Returns `array`.\n */\nfunction reorder(array, indexes) {\n var arrLength = array.length,\n length = nativeMin(indexes.length, arrLength),\n oldArray = copyArray(array);\n\n while (length--) {\n var index = indexes[length];\n array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;\n }\n return array;\n}\n\nmodule.exports = reorder;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/_reorder.js\n// module id = 1187\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/lodash/_reorder.js?', + ); + + /***/ + }, + /* 1188 */ + /* unknown exports provided */ + /* all exports used */ + /*!************************************!*\ + !*** ./~/lodash/_strictIndexOf.js ***! + \************************************/ + /***/ function (module, exports) { + eval( + '/**\n * A specialized version of `_.indexOf` which performs strict equality\n * comparisons of values, i.e. `===`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction strictIndexOf(array, value, fromIndex) {\n var index = fromIndex - 1,\n length = array.length;\n\n while (++index < length) {\n if (array[index] === value) {\n return index;\n }\n }\n return -1;\n}\n\nmodule.exports = strictIndexOf;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/_strictIndexOf.js\n// module id = 1188\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/lodash/_strictIndexOf.js?', + ); + + /***/ + }, + /* 1189 */ + /* unknown exports provided */ + /* all exports used */ + /*!****************************!*\ + !*** ./~/lodash/_toKey.js ***! + \****************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "var isSymbol = __webpack_require__(/*! ./isSymbol */ 370);\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\nfunction toKey(value) {\n if (typeof value == 'string' || isSymbol(value)) {\n return value;\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nmodule.exports = toKey;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/_toKey.js\n// module id = 1189\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/lodash/_toKey.js?", + ); + + /***/ + }, + /* 1190 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/lodash/_toSource.js ***! + \*******************************/ + /***/ function (module, exports) { + eval( + "/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nmodule.exports = toSource;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/_toSource.js\n// module id = 1190\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/lodash/_toSource.js?", + ); + + /***/ + }, + /* 1191 */ + /* unknown exports provided */ + /* all exports used */ + /*!****************************************!*\ + !*** ./~/lodash/_updateWrapDetails.js ***! + \****************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "var arrayEach = __webpack_require__(/*! ./_arrayEach */ 354),\n arrayIncludes = __webpack_require__(/*! ./_arrayIncludes */ 1156);\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_BIND_FLAG = 1,\n WRAP_BIND_KEY_FLAG = 2,\n WRAP_CURRY_FLAG = 8,\n WRAP_CURRY_RIGHT_FLAG = 16,\n WRAP_PARTIAL_FLAG = 32,\n WRAP_PARTIAL_RIGHT_FLAG = 64,\n WRAP_ARY_FLAG = 128,\n WRAP_REARG_FLAG = 256,\n WRAP_FLIP_FLAG = 512;\n\n/** Used to associate wrap methods with their bit flags. */\nvar wrapFlags = [\n ['ary', WRAP_ARY_FLAG],\n ['bind', WRAP_BIND_FLAG],\n ['bindKey', WRAP_BIND_KEY_FLAG],\n ['curry', WRAP_CURRY_FLAG],\n ['curryRight', WRAP_CURRY_RIGHT_FLAG],\n ['flip', WRAP_FLIP_FLAG],\n ['partial', WRAP_PARTIAL_FLAG],\n ['partialRight', WRAP_PARTIAL_RIGHT_FLAG],\n ['rearg', WRAP_REARG_FLAG]\n];\n\n/**\n * Updates wrapper `details` based on `bitmask` flags.\n *\n * @private\n * @returns {Array} details The details to modify.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @returns {Array} Returns `details`.\n */\nfunction updateWrapDetails(details, bitmask) {\n arrayEach(wrapFlags, function(pair) {\n var value = '_.' + pair[0];\n if ((bitmask & pair[1]) && !arrayIncludes(details, value)) {\n details.push(value);\n }\n });\n return details.sort();\n}\n\nmodule.exports = updateWrapDetails;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/_updateWrapDetails.js\n// module id = 1191\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/lodash/_updateWrapDetails.js?", + ); + + /***/ + }, + /* 1192 */ + /* unknown exports provided */ + /* all exports used */ + /*!***********************************!*\ + !*** ./~/lodash/_wrapperClone.js ***! + \***********************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + 'var LazyWrapper = __webpack_require__(/*! ./_LazyWrapper */ 221),\n LodashWrapper = __webpack_require__(/*! ./_LodashWrapper */ 353),\n copyArray = __webpack_require__(/*! ./_copyArray */ 358);\n\n/**\n * Creates a clone of `wrapper`.\n *\n * @private\n * @param {Object} wrapper The wrapper to clone.\n * @returns {Object} Returns the cloned wrapper.\n */\nfunction wrapperClone(wrapper) {\n if (wrapper instanceof LazyWrapper) {\n return wrapper.clone();\n }\n var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);\n result.__actions__ = copyArray(wrapper.__actions__);\n result.__index__ = wrapper.__index__;\n result.__values__ = wrapper.__values__;\n return result;\n}\n\nmodule.exports = wrapperClone;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/_wrapperClone.js\n// module id = 1192\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/lodash/_wrapperClone.js?', + ); + + /***/ + }, + /* 1193 */ + /* unknown exports provided */ + /* all exports used */ + /*!**************************!*\ + !*** ./~/lodash/bind.js ***! + \**************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "var baseRest = __webpack_require__(/*! ./_baseRest */ 1165),\n createWrap = __webpack_require__(/*! ./_createWrap */ 1172),\n getHolder = __webpack_require__(/*! ./_getHolder */ 227),\n replaceHolders = __webpack_require__(/*! ./_replaceHolders */ 162);\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_BIND_FLAG = 1,\n WRAP_PARTIAL_FLAG = 32;\n\n/**\n * Creates a function that invokes `func` with the `this` binding of `thisArg`\n * and `partials` prepended to the arguments it receives.\n *\n * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,\n * may be used as a placeholder for partially applied arguments.\n *\n * **Note:** Unlike native `Function#bind`, this method doesn't set the \"length\"\n * property of bound functions.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to bind.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {...*} [partials] The arguments to be partially applied.\n * @returns {Function} Returns the new bound function.\n * @example\n *\n * function greet(greeting, punctuation) {\n * return greeting + ' ' + this.user + punctuation;\n * }\n *\n * var object = { 'user': 'fred' };\n *\n * var bound = _.bind(greet, object, 'hi');\n * bound('!');\n * // => 'hi fred!'\n *\n * // Bound with placeholders.\n * var bound = _.bind(greet, object, _, '!');\n * bound('hi');\n * // => 'hi fred!'\n */\nvar bind = baseRest(function(func, thisArg, partials) {\n var bitmask = WRAP_BIND_FLAG;\n if (partials.length) {\n var holders = replaceHolders(partials, getHolder(bind));\n bitmask |= WRAP_PARTIAL_FLAG;\n }\n return createWrap(func, bitmask, thisArg, partials, holders);\n});\n\n// Assign default placeholders.\nbind.placeholder = {};\n\nmodule.exports = bind;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/bind.js\n// module id = 1193\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/lodash/bind.js?", + ); + + /***/ + }, + /* 1194 */ + /* unknown exports provided */ + /* exports used: default */ + /*!*****************************!*\ + !*** ./~/lodash/bindAll.js ***! + \*****************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "var arrayEach = __webpack_require__(/*! ./_arrayEach */ 354),\n baseAssignValue = __webpack_require__(/*! ./_baseAssignValue */ 1158),\n bind = __webpack_require__(/*! ./bind */ 1193),\n flatRest = __webpack_require__(/*! ./_flatRest */ 1173),\n toKey = __webpack_require__(/*! ./_toKey */ 1189);\n\n/**\n * Binds methods of an object to the object itself, overwriting the existing\n * method.\n *\n * **Note:** This method doesn't set the \"length\" property of bound functions.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {Object} object The object to bind and assign the bound methods to.\n * @param {...(string|string[])} methodNames The object method names to bind.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var view = {\n * 'label': 'docs',\n * 'click': function() {\n * console.log('clicked ' + this.label);\n * }\n * };\n *\n * _.bindAll(view, ['click']);\n * jQuery(element).on('click', view.click);\n * // => Logs 'clicked docs' when clicked.\n */\nvar bindAll = flatRest(function(object, methodNames) {\n arrayEach(methodNames, function(key) {\n key = toKey(key);\n baseAssignValue(object, key, bind(object[key], object));\n });\n return object;\n});\n\nmodule.exports = bindAll;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/bindAll.js\n// module id = 1194\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/lodash/bindAll.js?", + ); + + /***/ + }, + /* 1195 */ + /* unknown exports provided */ + /* exports used: default */ + /*!*****************************!*\ + !*** ./~/lodash/compact.js ***! + \*****************************/ + /***/ function (module, exports) { + eval( + '/**\n * Creates an array with all falsey values removed. The values `false`, `null`,\n * `0`, `""`, `undefined`, and `NaN` are falsey.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to compact.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * _.compact([0, 1, false, 2, \'\', 3]);\n * // => [1, 2, 3]\n */\nfunction compact(array) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (value) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nmodule.exports = compact;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/compact.js\n// module id = 1195\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/lodash/compact.js?', + ); + + /***/ + }, + /* 1196 */ + /* unknown exports provided */ + /* all exports used */ + /*!******************************!*\ + !*** ./~/lodash/constant.js ***! + \******************************/ + /***/ function (module, exports) { + eval( + "/**\n * Creates a function that returns `value`.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {*} value The value to return from the new function.\n * @returns {Function} Returns the new constant function.\n * @example\n *\n * var objects = _.times(2, _.constant({ 'a': 1 }));\n *\n * console.log(objects);\n * // => [{ 'a': 1 }, { 'a': 1 }]\n *\n * console.log(objects[0] === objects[1]);\n * // => true\n */\nfunction constant(value) {\n return function() {\n return value;\n };\n}\n\nmodule.exports = constant;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/constant.js\n// module id = 1196\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/lodash/constant.js?", + ); + + /***/ + }, + /* 1197 */ + /* unknown exports provided */ + /* all exports used */ + /*!*****************************!*\ + !*** ./~/lodash/flatten.js ***! + \*****************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + 'var baseFlatten = __webpack_require__(/*! ./_baseFlatten */ 1160);\n\n/**\n * Flattens `array` a single level deep.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * _.flatten([1, [2, [3, [4]], 5]]);\n * // => [1, 2, [3, [4]], 5]\n */\nfunction flatten(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseFlatten(array, 1) : [];\n}\n\nmodule.exports = flatten;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/flatten.js\n// module id = 1197\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/lodash/flatten.js?', + ); + + /***/ + }, + /* 1198 */ + /* unknown exports provided */ + /* all exports used */ + /*!*************************************!*\ + !*** ./~/lodash/fp/_baseConvert.js ***! + \*************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "var mapping = __webpack_require__(/*! ./_mapping */ 1199),\n fallbackHolder = __webpack_require__(/*! ./placeholder */ 1200);\n\n/** Built-in value reference. */\nvar push = Array.prototype.push;\n\n/**\n * Creates a function, with an arity of `n`, that invokes `func` with the\n * arguments it receives.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} n The arity of the new function.\n * @returns {Function} Returns the new function.\n */\nfunction baseArity(func, n) {\n return n == 2\n ? function(a, b) { return func.apply(undefined, arguments); }\n : function(a) { return func.apply(undefined, arguments); };\n}\n\n/**\n * Creates a function that invokes `func`, with up to `n` arguments, ignoring\n * any additional arguments.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @param {number} n The arity cap.\n * @returns {Function} Returns the new function.\n */\nfunction baseAry(func, n) {\n return n == 2\n ? function(a, b) { return func(a, b); }\n : function(a) { return func(a); };\n}\n\n/**\n * Creates a clone of `array`.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the cloned array.\n */\nfunction cloneArray(array) {\n var length = array ? array.length : 0,\n result = Array(length);\n\n while (length--) {\n result[length] = array[length];\n }\n return result;\n}\n\n/**\n * Creates a function that clones a given object using the assignment `func`.\n *\n * @private\n * @param {Function} func The assignment function.\n * @returns {Function} Returns the new cloner function.\n */\nfunction createCloner(func) {\n return function(object) {\n return func({}, object);\n };\n}\n\n/**\n * A specialized version of `_.spread` which flattens the spread array into\n * the arguments of the invoked `func`.\n *\n * @private\n * @param {Function} func The function to spread arguments over.\n * @param {number} start The start position of the spread.\n * @returns {Function} Returns the new function.\n */\nfunction flatSpread(func, start) {\n return function() {\n var length = arguments.length,\n lastIndex = length - 1,\n args = Array(length);\n\n while (length--) {\n args[length] = arguments[length];\n }\n var array = args[start],\n otherArgs = args.slice(0, start);\n\n if (array) {\n push.apply(otherArgs, array);\n }\n if (start != lastIndex) {\n push.apply(otherArgs, args.slice(start + 1));\n }\n return func.apply(this, otherArgs);\n };\n}\n\n/**\n * Creates a function that wraps `func` and uses `cloner` to clone the first\n * argument it receives.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} cloner The function to clone arguments.\n * @returns {Function} Returns the new immutable function.\n */\nfunction wrapImmutable(func, cloner) {\n return function() {\n var length = arguments.length;\n if (!length) {\n return;\n }\n var args = Array(length);\n while (length--) {\n args[length] = arguments[length];\n }\n var result = args[0] = cloner.apply(undefined, args);\n func.apply(undefined, args);\n return result;\n };\n}\n\n/**\n * The base implementation of `convert` which accepts a `util` object of methods\n * required to perform conversions.\n *\n * @param {Object} util The util object.\n * @param {string} name The name of the function to convert.\n * @param {Function} func The function to convert.\n * @param {Object} [options] The options object.\n * @param {boolean} [options.cap=true] Specify capping iteratee arguments.\n * @param {boolean} [options.curry=true] Specify currying.\n * @param {boolean} [options.fixed=true] Specify fixed arity.\n * @param {boolean} [options.immutable=true] Specify immutable operations.\n * @param {boolean} [options.rearg=true] Specify rearranging arguments.\n * @returns {Function|Object} Returns the converted function or object.\n */\nfunction baseConvert(util, name, func, options) {\n var setPlaceholder,\n isLib = typeof name == 'function',\n isObj = name === Object(name);\n\n if (isObj) {\n options = func;\n func = name;\n name = undefined;\n }\n if (func == null) {\n throw new TypeError;\n }\n options || (options = {});\n\n var config = {\n 'cap': 'cap' in options ? options.cap : true,\n 'curry': 'curry' in options ? options.curry : true,\n 'fixed': 'fixed' in options ? options.fixed : true,\n 'immutable': 'immutable' in options ? options.immutable : true,\n 'rearg': 'rearg' in options ? options.rearg : true\n };\n\n var forceCurry = ('curry' in options) && options.curry,\n forceFixed = ('fixed' in options) && options.fixed,\n forceRearg = ('rearg' in options) && options.rearg,\n placeholder = isLib ? func : fallbackHolder,\n pristine = isLib ? func.runInContext() : undefined;\n\n var helpers = isLib ? func : {\n 'ary': util.ary,\n 'assign': util.assign,\n 'clone': util.clone,\n 'curry': util.curry,\n 'forEach': util.forEach,\n 'isArray': util.isArray,\n 'isFunction': util.isFunction,\n 'iteratee': util.iteratee,\n 'keys': util.keys,\n 'rearg': util.rearg,\n 'toInteger': util.toInteger,\n 'toPath': util.toPath\n };\n\n var ary = helpers.ary,\n assign = helpers.assign,\n clone = helpers.clone,\n curry = helpers.curry,\n each = helpers.forEach,\n isArray = helpers.isArray,\n isFunction = helpers.isFunction,\n keys = helpers.keys,\n rearg = helpers.rearg,\n toInteger = helpers.toInteger,\n toPath = helpers.toPath;\n\n var aryMethodKeys = keys(mapping.aryMethod);\n\n var wrappers = {\n 'castArray': function(castArray) {\n return function() {\n var value = arguments[0];\n return isArray(value)\n ? castArray(cloneArray(value))\n : castArray.apply(undefined, arguments);\n };\n },\n 'iteratee': function(iteratee) {\n return function() {\n var func = arguments[0],\n arity = arguments[1],\n result = iteratee(func, arity),\n length = result.length;\n\n if (config.cap && typeof arity == 'number') {\n arity = arity > 2 ? (arity - 2) : 1;\n return (length && length <= arity) ? result : baseAry(result, arity);\n }\n return result;\n };\n },\n 'mixin': function(mixin) {\n return function(source) {\n var func = this;\n if (!isFunction(func)) {\n return mixin(func, Object(source));\n }\n var pairs = [];\n each(keys(source), function(key) {\n if (isFunction(source[key])) {\n pairs.push([key, func.prototype[key]]);\n }\n });\n\n mixin(func, Object(source));\n\n each(pairs, function(pair) {\n var value = pair[1];\n if (isFunction(value)) {\n func.prototype[pair[0]] = value;\n } else {\n delete func.prototype[pair[0]];\n }\n });\n return func;\n };\n },\n 'nthArg': function(nthArg) {\n return function(n) {\n var arity = n < 0 ? 1 : (toInteger(n) + 1);\n return curry(nthArg(n), arity);\n };\n },\n 'rearg': function(rearg) {\n return function(func, indexes) {\n var arity = indexes ? indexes.length : 0;\n return curry(rearg(func, indexes), arity);\n };\n },\n 'runInContext': function(runInContext) {\n return function(context) {\n return baseConvert(util, runInContext(context), options);\n };\n }\n };\n\n /*--------------------------------------------------------------------------*/\n\n /**\n * Casts `func` to a function with an arity capped iteratee if needed.\n *\n * @private\n * @param {string} name The name of the function to inspect.\n * @param {Function} func The function to inspect.\n * @returns {Function} Returns the cast function.\n */\n function castCap(name, func) {\n if (config.cap) {\n var indexes = mapping.iterateeRearg[name];\n if (indexes) {\n return iterateeRearg(func, indexes);\n }\n var n = !isLib && mapping.iterateeAry[name];\n if (n) {\n return iterateeAry(func, n);\n }\n }\n return func;\n }\n\n /**\n * Casts `func` to a curried function if needed.\n *\n * @private\n * @param {string} name The name of the function to inspect.\n * @param {Function} func The function to inspect.\n * @param {number} n The arity of `func`.\n * @returns {Function} Returns the cast function.\n */\n function castCurry(name, func, n) {\n return (forceCurry || (config.curry && n > 1))\n ? curry(func, n)\n : func;\n }\n\n /**\n * Casts `func` to a fixed arity function if needed.\n *\n * @private\n * @param {string} name The name of the function to inspect.\n * @param {Function} func The function to inspect.\n * @param {number} n The arity cap.\n * @returns {Function} Returns the cast function.\n */\n function castFixed(name, func, n) {\n if (config.fixed && (forceFixed || !mapping.skipFixed[name])) {\n var data = mapping.methodSpread[name],\n start = data && data.start;\n\n return start === undefined ? ary(func, n) : flatSpread(func, start);\n }\n return func;\n }\n\n /**\n * Casts `func` to an rearged function if needed.\n *\n * @private\n * @param {string} name The name of the function to inspect.\n * @param {Function} func The function to inspect.\n * @param {number} n The arity of `func`.\n * @returns {Function} Returns the cast function.\n */\n function castRearg(name, func, n) {\n return (config.rearg && n > 1 && (forceRearg || !mapping.skipRearg[name]))\n ? rearg(func, mapping.methodRearg[name] || mapping.aryRearg[n])\n : func;\n }\n\n /**\n * Creates a clone of `object` by `path`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {Array|string} path The path to clone by.\n * @returns {Object} Returns the cloned object.\n */\n function cloneByPath(object, path) {\n path = toPath(path);\n\n var index = -1,\n length = path.length,\n lastIndex = length - 1,\n result = clone(Object(object)),\n nested = result;\n\n while (nested != null && ++index < length) {\n var key = path[index],\n value = nested[key];\n\n if (value != null) {\n nested[path[index]] = clone(index == lastIndex ? value : Object(value));\n }\n nested = nested[key];\n }\n return result;\n }\n\n /**\n * Converts `lodash` to an immutable auto-curried iteratee-first data-last\n * version with conversion `options` applied.\n *\n * @param {Object} [options] The options object. See `baseConvert` for more details.\n * @returns {Function} Returns the converted `lodash`.\n */\n function convertLib(options) {\n return _.runInContext.convert(options)(undefined);\n }\n\n /**\n * Create a converter function for `func` of `name`.\n *\n * @param {string} name The name of the function to convert.\n * @param {Function} func The function to convert.\n * @returns {Function} Returns the new converter function.\n */\n function createConverter(name, func) {\n var realName = mapping.aliasToReal[name] || name,\n methodName = mapping.remap[realName] || realName,\n oldOptions = options;\n\n return function(options) {\n var newUtil = isLib ? pristine : helpers,\n newFunc = isLib ? pristine[methodName] : func,\n newOptions = assign(assign({}, oldOptions), options);\n\n return baseConvert(newUtil, realName, newFunc, newOptions);\n };\n }\n\n /**\n * Creates a function that wraps `func` to invoke its iteratee, with up to `n`\n * arguments, ignoring any additional arguments.\n *\n * @private\n * @param {Function} func The function to cap iteratee arguments for.\n * @param {number} n The arity cap.\n * @returns {Function} Returns the new function.\n */\n function iterateeAry(func, n) {\n return overArg(func, function(func) {\n return typeof func == 'function' ? baseAry(func, n) : func;\n });\n }\n\n /**\n * Creates a function that wraps `func` to invoke its iteratee with arguments\n * arranged according to the specified `indexes` where the argument value at\n * the first index is provided as the first argument, the argument value at\n * the second index is provided as the second argument, and so on.\n *\n * @private\n * @param {Function} func The function to rearrange iteratee arguments for.\n * @param {number[]} indexes The arranged argument indexes.\n * @returns {Function} Returns the new function.\n */\n function iterateeRearg(func, indexes) {\n return overArg(func, function(func) {\n var n = indexes.length;\n return baseArity(rearg(baseAry(func, n), indexes), n);\n });\n }\n\n /**\n * Creates a function that invokes `func` with its first argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\n function overArg(func, transform) {\n return function() {\n var length = arguments.length;\n if (!length) {\n return func();\n }\n var args = Array(length);\n while (length--) {\n args[length] = arguments[length];\n }\n var index = config.rearg ? 0 : (length - 1);\n args[index] = transform(args[index]);\n return func.apply(undefined, args);\n };\n }\n\n /**\n * Creates a function that wraps `func` and applys the conversions\n * rules by `name`.\n *\n * @private\n * @param {string} name The name of the function to wrap.\n * @param {Function} func The function to wrap.\n * @returns {Function} Returns the converted function.\n */\n function wrap(name, func) {\n var result,\n realName = mapping.aliasToReal[name] || name,\n wrapped = func,\n wrapper = wrappers[realName];\n\n if (wrapper) {\n wrapped = wrapper(func);\n }\n else if (config.immutable) {\n if (mapping.mutate.array[realName]) {\n wrapped = wrapImmutable(func, cloneArray);\n }\n else if (mapping.mutate.object[realName]) {\n wrapped = wrapImmutable(func, createCloner(func));\n }\n else if (mapping.mutate.set[realName]) {\n wrapped = wrapImmutable(func, cloneByPath);\n }\n }\n each(aryMethodKeys, function(aryKey) {\n each(mapping.aryMethod[aryKey], function(otherName) {\n if (realName == otherName) {\n var data = mapping.methodSpread[realName],\n afterRearg = data && data.afterRearg;\n\n result = afterRearg\n ? castFixed(realName, castRearg(realName, wrapped, aryKey), aryKey)\n : castRearg(realName, castFixed(realName, wrapped, aryKey), aryKey);\n\n result = castCap(realName, result);\n result = castCurry(realName, result, aryKey);\n return false;\n }\n });\n return !result;\n });\n\n result || (result = wrapped);\n if (result == func) {\n result = forceCurry ? curry(result, 1) : function() {\n return func.apply(this, arguments);\n };\n }\n result.convert = createConverter(realName, func);\n if (mapping.placeholder[realName]) {\n setPlaceholder = true;\n result.placeholder = func.placeholder = placeholder;\n }\n return result;\n }\n\n /*--------------------------------------------------------------------------*/\n\n if (!isObj) {\n return wrap(name, func);\n }\n var _ = func;\n\n // Convert methods by ary cap.\n var pairs = [];\n each(aryMethodKeys, function(aryKey) {\n each(mapping.aryMethod[aryKey], function(key) {\n var func = _[mapping.remap[key] || key];\n if (func) {\n pairs.push([key, wrap(key, func)]);\n }\n });\n });\n\n // Convert remaining methods.\n each(keys(_), function(key) {\n var func = _[key];\n if (typeof func == 'function') {\n var length = pairs.length;\n while (length--) {\n if (pairs[length][0] == key) {\n return;\n }\n }\n func.convert = createConverter(key, func);\n pairs.push([key, func]);\n }\n });\n\n // Assign to `_` leaving `_.prototype` unchanged to allow chaining.\n each(pairs, function(pair) {\n _[pair[0]] = pair[1];\n });\n\n _.convert = convertLib;\n if (setPlaceholder) {\n _.placeholder = placeholder;\n }\n // Assign aliases.\n each(keys(_), function(key) {\n each(mapping.realToAlias[key] || [], function(alias) {\n _[alias] = _[key];\n });\n });\n\n return _;\n}\n\nmodule.exports = baseConvert;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/fp/_baseConvert.js\n// module id = 1198\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/lodash/fp/_baseConvert.js?", + ); + + /***/ + }, + /* 1199 */ + /* unknown exports provided */ + /* all exports used */ + /*!*********************************!*\ + !*** ./~/lodash/fp/_mapping.js ***! + \*********************************/ + /***/ function (module, exports) { + eval( + "/** Used to map aliases to their real names. */\nexports.aliasToReal = {\n\n // Lodash aliases.\n 'each': 'forEach',\n 'eachRight': 'forEachRight',\n 'entries': 'toPairs',\n 'entriesIn': 'toPairsIn',\n 'extend': 'assignIn',\n 'extendAll': 'assignInAll',\n 'extendAllWith': 'assignInAllWith',\n 'extendWith': 'assignInWith',\n 'first': 'head',\n\n // Methods that are curried variants of others.\n 'conforms': 'conformsTo',\n 'matches': 'isMatch',\n 'property': 'get',\n\n // Ramda aliases.\n '__': 'placeholder',\n 'F': 'stubFalse',\n 'T': 'stubTrue',\n 'all': 'every',\n 'allPass': 'overEvery',\n 'always': 'constant',\n 'any': 'some',\n 'anyPass': 'overSome',\n 'apply': 'spread',\n 'assoc': 'set',\n 'assocPath': 'set',\n 'complement': 'negate',\n 'compose': 'flowRight',\n 'contains': 'includes',\n 'dissoc': 'unset',\n 'dissocPath': 'unset',\n 'dropLast': 'dropRight',\n 'dropLastWhile': 'dropRightWhile',\n 'equals': 'isEqual',\n 'identical': 'eq',\n 'indexBy': 'keyBy',\n 'init': 'initial',\n 'invertObj': 'invert',\n 'juxt': 'over',\n 'omitAll': 'omit',\n 'nAry': 'ary',\n 'path': 'get',\n 'pathEq': 'matchesProperty',\n 'pathOr': 'getOr',\n 'paths': 'at',\n 'pickAll': 'pick',\n 'pipe': 'flow',\n 'pluck': 'map',\n 'prop': 'get',\n 'propEq': 'matchesProperty',\n 'propOr': 'getOr',\n 'props': 'at',\n 'symmetricDifference': 'xor',\n 'symmetricDifferenceBy': 'xorBy',\n 'symmetricDifferenceWith': 'xorWith',\n 'takeLast': 'takeRight',\n 'takeLastWhile': 'takeRightWhile',\n 'unapply': 'rest',\n 'unnest': 'flatten',\n 'useWith': 'overArgs',\n 'where': 'conformsTo',\n 'whereEq': 'isMatch',\n 'zipObj': 'zipObject'\n};\n\n/** Used to map ary to method names. */\nexports.aryMethod = {\n '1': [\n 'assignAll', 'assignInAll', 'attempt', 'castArray', 'ceil', 'create',\n 'curry', 'curryRight', 'defaultsAll', 'defaultsDeepAll', 'floor', 'flow',\n 'flowRight', 'fromPairs', 'invert', 'iteratee', 'memoize', 'method', 'mergeAll',\n 'methodOf', 'mixin', 'nthArg', 'over', 'overEvery', 'overSome','rest', 'reverse',\n 'round', 'runInContext', 'spread', 'template', 'trim', 'trimEnd', 'trimStart',\n 'uniqueId', 'words', 'zipAll'\n ],\n '2': [\n 'add', 'after', 'ary', 'assign', 'assignAllWith', 'assignIn', 'assignInAllWith',\n 'at', 'before', 'bind', 'bindAll', 'bindKey', 'chunk', 'cloneDeepWith',\n 'cloneWith', 'concat', 'conformsTo', 'countBy', 'curryN', 'curryRightN',\n 'debounce', 'defaults', 'defaultsDeep', 'defaultTo', 'delay', 'difference',\n 'divide', 'drop', 'dropRight', 'dropRightWhile', 'dropWhile', 'endsWith', 'eq',\n 'every', 'filter', 'find', 'findIndex', 'findKey', 'findLast', 'findLastIndex',\n 'findLastKey', 'flatMap', 'flatMapDeep', 'flattenDepth', 'forEach',\n 'forEachRight', 'forIn', 'forInRight', 'forOwn', 'forOwnRight', 'get',\n 'groupBy', 'gt', 'gte', 'has', 'hasIn', 'includes', 'indexOf', 'intersection',\n 'invertBy', 'invoke', 'invokeMap', 'isEqual', 'isMatch', 'join', 'keyBy',\n 'lastIndexOf', 'lt', 'lte', 'map', 'mapKeys', 'mapValues', 'matchesProperty',\n 'maxBy', 'meanBy', 'merge', 'mergeAllWith', 'minBy', 'multiply', 'nth', 'omit',\n 'omitBy', 'overArgs', 'pad', 'padEnd', 'padStart', 'parseInt', 'partial',\n 'partialRight', 'partition', 'pick', 'pickBy', 'propertyOf', 'pull', 'pullAll',\n 'pullAt', 'random', 'range', 'rangeRight', 'rearg', 'reject', 'remove',\n 'repeat', 'restFrom', 'result', 'sampleSize', 'some', 'sortBy', 'sortedIndex',\n 'sortedIndexOf', 'sortedLastIndex', 'sortedLastIndexOf', 'sortedUniqBy',\n 'split', 'spreadFrom', 'startsWith', 'subtract', 'sumBy', 'take', 'takeRight',\n 'takeRightWhile', 'takeWhile', 'tap', 'throttle', 'thru', 'times', 'trimChars',\n 'trimCharsEnd', 'trimCharsStart', 'truncate', 'union', 'uniqBy', 'uniqWith',\n 'unset', 'unzipWith', 'without', 'wrap', 'xor', 'zip', 'zipObject',\n 'zipObjectDeep'\n ],\n '3': [\n 'assignInWith', 'assignWith', 'clamp', 'differenceBy', 'differenceWith',\n 'findFrom', 'findIndexFrom', 'findLastFrom', 'findLastIndexFrom', 'getOr',\n 'includesFrom', 'indexOfFrom', 'inRange', 'intersectionBy', 'intersectionWith',\n 'invokeArgs', 'invokeArgsMap', 'isEqualWith', 'isMatchWith', 'flatMapDepth',\n 'lastIndexOfFrom', 'mergeWith', 'orderBy', 'padChars', 'padCharsEnd',\n 'padCharsStart', 'pullAllBy', 'pullAllWith', 'rangeStep', 'rangeStepRight',\n 'reduce', 'reduceRight', 'replace', 'set', 'slice', 'sortedIndexBy',\n 'sortedLastIndexBy', 'transform', 'unionBy', 'unionWith', 'update', 'xorBy',\n 'xorWith', 'zipWith'\n ],\n '4': [\n 'fill', 'setWith', 'updateWith'\n ]\n};\n\n/** Used to map ary to rearg configs. */\nexports.aryRearg = {\n '2': [1, 0],\n '3': [2, 0, 1],\n '4': [3, 2, 0, 1]\n};\n\n/** Used to map method names to their iteratee ary. */\nexports.iterateeAry = {\n 'dropRightWhile': 1,\n 'dropWhile': 1,\n 'every': 1,\n 'filter': 1,\n 'find': 1,\n 'findFrom': 1,\n 'findIndex': 1,\n 'findIndexFrom': 1,\n 'findKey': 1,\n 'findLast': 1,\n 'findLastFrom': 1,\n 'findLastIndex': 1,\n 'findLastIndexFrom': 1,\n 'findLastKey': 1,\n 'flatMap': 1,\n 'flatMapDeep': 1,\n 'flatMapDepth': 1,\n 'forEach': 1,\n 'forEachRight': 1,\n 'forIn': 1,\n 'forInRight': 1,\n 'forOwn': 1,\n 'forOwnRight': 1,\n 'map': 1,\n 'mapKeys': 1,\n 'mapValues': 1,\n 'partition': 1,\n 'reduce': 2,\n 'reduceRight': 2,\n 'reject': 1,\n 'remove': 1,\n 'some': 1,\n 'takeRightWhile': 1,\n 'takeWhile': 1,\n 'times': 1,\n 'transform': 2\n};\n\n/** Used to map method names to iteratee rearg configs. */\nexports.iterateeRearg = {\n 'mapKeys': [1],\n 'reduceRight': [1, 0]\n};\n\n/** Used to map method names to rearg configs. */\nexports.methodRearg = {\n 'assignInAllWith': [1, 0],\n 'assignInWith': [1, 2, 0],\n 'assignAllWith': [1, 0],\n 'assignWith': [1, 2, 0],\n 'differenceBy': [1, 2, 0],\n 'differenceWith': [1, 2, 0],\n 'getOr': [2, 1, 0],\n 'intersectionBy': [1, 2, 0],\n 'intersectionWith': [1, 2, 0],\n 'isEqualWith': [1, 2, 0],\n 'isMatchWith': [2, 1, 0],\n 'mergeAllWith': [1, 0],\n 'mergeWith': [1, 2, 0],\n 'padChars': [2, 1, 0],\n 'padCharsEnd': [2, 1, 0],\n 'padCharsStart': [2, 1, 0],\n 'pullAllBy': [2, 1, 0],\n 'pullAllWith': [2, 1, 0],\n 'rangeStep': [1, 2, 0],\n 'rangeStepRight': [1, 2, 0],\n 'setWith': [3, 1, 2, 0],\n 'sortedIndexBy': [2, 1, 0],\n 'sortedLastIndexBy': [2, 1, 0],\n 'unionBy': [1, 2, 0],\n 'unionWith': [1, 2, 0],\n 'updateWith': [3, 1, 2, 0],\n 'xorBy': [1, 2, 0],\n 'xorWith': [1, 2, 0],\n 'zipWith': [1, 2, 0]\n};\n\n/** Used to map method names to spread configs. */\nexports.methodSpread = {\n 'assignAll': { 'start': 0 },\n 'assignAllWith': { 'start': 0 },\n 'assignInAll': { 'start': 0 },\n 'assignInAllWith': { 'start': 0 },\n 'defaultsAll': { 'start': 0 },\n 'defaultsDeepAll': { 'start': 0 },\n 'invokeArgs': { 'start': 2 },\n 'invokeArgsMap': { 'start': 2 },\n 'mergeAll': { 'start': 0 },\n 'mergeAllWith': { 'start': 0 },\n 'partial': { 'start': 1 },\n 'partialRight': { 'start': 1 },\n 'without': { 'start': 1 },\n 'zipAll': { 'start': 0 }\n};\n\n/** Used to identify methods which mutate arrays or objects. */\nexports.mutate = {\n 'array': {\n 'fill': true,\n 'pull': true,\n 'pullAll': true,\n 'pullAllBy': true,\n 'pullAllWith': true,\n 'pullAt': true,\n 'remove': true,\n 'reverse': true\n },\n 'object': {\n 'assign': true,\n 'assignAll': true,\n 'assignAllWith': true,\n 'assignIn': true,\n 'assignInAll': true,\n 'assignInAllWith': true,\n 'assignInWith': true,\n 'assignWith': true,\n 'defaults': true,\n 'defaultsAll': true,\n 'defaultsDeep': true,\n 'defaultsDeepAll': true,\n 'merge': true,\n 'mergeAll': true,\n 'mergeAllWith': true,\n 'mergeWith': true,\n },\n 'set': {\n 'set': true,\n 'setWith': true,\n 'unset': true,\n 'update': true,\n 'updateWith': true\n }\n};\n\n/** Used to track methods with placeholder support */\nexports.placeholder = {\n 'bind': true,\n 'bindKey': true,\n 'curry': true,\n 'curryRight': true,\n 'partial': true,\n 'partialRight': true\n};\n\n/** Used to map real names to their aliases. */\nexports.realToAlias = (function() {\n var hasOwnProperty = Object.prototype.hasOwnProperty,\n object = exports.aliasToReal,\n result = {};\n\n for (var key in object) {\n var value = object[key];\n if (hasOwnProperty.call(result, value)) {\n result[value].push(key);\n } else {\n result[value] = [key];\n }\n }\n return result;\n}());\n\n/** Used to map method names to other names. */\nexports.remap = {\n 'assignAll': 'assign',\n 'assignAllWith': 'assignWith',\n 'assignInAll': 'assignIn',\n 'assignInAllWith': 'assignInWith',\n 'curryN': 'curry',\n 'curryRightN': 'curryRight',\n 'defaultsAll': 'defaults',\n 'defaultsDeepAll': 'defaultsDeep',\n 'findFrom': 'find',\n 'findIndexFrom': 'findIndex',\n 'findLastFrom': 'findLast',\n 'findLastIndexFrom': 'findLastIndex',\n 'getOr': 'get',\n 'includesFrom': 'includes',\n 'indexOfFrom': 'indexOf',\n 'invokeArgs': 'invoke',\n 'invokeArgsMap': 'invokeMap',\n 'lastIndexOfFrom': 'lastIndexOf',\n 'mergeAll': 'merge',\n 'mergeAllWith': 'mergeWith',\n 'padChars': 'pad',\n 'padCharsEnd': 'padEnd',\n 'padCharsStart': 'padStart',\n 'propertyOf': 'get',\n 'rangeStep': 'range',\n 'rangeStepRight': 'rangeRight',\n 'restFrom': 'rest',\n 'spreadFrom': 'spread',\n 'trimChars': 'trim',\n 'trimCharsEnd': 'trimEnd',\n 'trimCharsStart': 'trimStart',\n 'zipAll': 'zip'\n};\n\n/** Used to track methods that skip fixing their arity. */\nexports.skipFixed = {\n 'castArray': true,\n 'flow': true,\n 'flowRight': true,\n 'iteratee': true,\n 'mixin': true,\n 'rearg': true,\n 'runInContext': true\n};\n\n/** Used to track methods that skip rearranging arguments. */\nexports.skipRearg = {\n 'add': true,\n 'assign': true,\n 'assignIn': true,\n 'bind': true,\n 'bindKey': true,\n 'concat': true,\n 'difference': true,\n 'divide': true,\n 'eq': true,\n 'gt': true,\n 'gte': true,\n 'isEqual': true,\n 'lt': true,\n 'lte': true,\n 'matchesProperty': true,\n 'merge': true,\n 'multiply': true,\n 'overArgs': true,\n 'partial': true,\n 'partialRight': true,\n 'propertyOf': true,\n 'random': true,\n 'range': true,\n 'rangeRight': true,\n 'subtract': true,\n 'zip': true,\n 'zipObject': true,\n 'zipObjectDeep': true\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/fp/_mapping.js\n// module id = 1199\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/lodash/fp/_mapping.js?", + ); + + /***/ + }, + /* 1200 */ + /* unknown exports provided */ + /* all exports used */ + /*!************************************!*\ + !*** ./~/lodash/fp/placeholder.js ***! + \************************************/ + /***/ function (module, exports) { + eval( + '/**\n * The default argument placeholder value for methods.\n *\n * @type {Object}\n */\nmodule.exports = {};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/fp/placeholder.js\n// module id = 1200\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/lodash/fp/placeholder.js?', + ); + + /***/ + }, + /* 1201 */ + /* unknown exports provided */ + /* all exports used */ + /*!*********************************!*\ + !*** ./~/lodash/isArguments.js ***! + \*********************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "var baseIsArguments = __webpack_require__(/*! ./_baseIsArguments */ 1162),\n isObjectLike = __webpack_require__(/*! ./isObjectLike */ 163);\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/isArguments.js\n// module id = 1201\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/lodash/isArguments.js?", + ); + + /***/ + }, + /* 1202 */ + /* unknown exports provided */ + /* all exports used */ + /*!********************************!*\ + !*** ./~/lodash/isFunction.js ***! + \********************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ 225),\n isObject = __webpack_require__(/*! ./isObject */ 116);\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/isFunction.js\n// module id = 1202\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/lodash/isFunction.js?", + ); + + /***/ + }, + /* 1203 */ + /* unknown exports provided */ + /* all exports used */ + /*!********************************!*\ + !*** ./~/lodash/lodash.min.js ***! + \********************************/ + /***/ function (module, exports) { + eval( + '/**\n * @license\n * Lodash lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE\n */\n;(function(){function n(n,t){return n.set(t[0],t[1]),n}function t(n,t){return n.add(t),n}function r(n,t,r){switch(r.length){case 0:return n.call(t);case 1:return n.call(t,r[0]);case 2:return n.call(t,r[0],r[1]);case 3:return n.call(t,r[0],r[1],r[2])}return n.apply(t,r)}function e(n,t,r,e){for(var u=-1,i=null==n?0:n.length;++u<i;){var o=n[u];t(e,o,r(o),n)}return e}function u(n,t){for(var r=-1,e=null==n?0:n.length;++r<e&&false!==t(n[r],r,n););return n}function i(n,t){for(var r=null==n?0:n.length;r--&&false!==t(n[r],r,n););\nreturn n}function o(n,t){for(var r=-1,e=null==n?0:n.length;++r<e;)if(!t(n[r],r,n))return false;return true}function f(n,t){for(var r=-1,e=null==n?0:n.length,u=0,i=[];++r<e;){var o=n[r];t(o,r,n)&&(i[u++]=o)}return i}function c(n,t){return!(null==n||!n.length)&&-1<d(n,t,0)}function a(n,t,r){for(var e=-1,u=null==n?0:n.length;++e<u;)if(r(t,n[e]))return true;return false}function l(n,t){for(var r=-1,e=null==n?0:n.length,u=Array(e);++r<e;)u[r]=t(n[r],r,n);return u}function s(n,t){for(var r=-1,e=t.length,u=n.length;++r<e;)n[u+r]=t[r];\nreturn n}function h(n,t,r,e){var u=-1,i=null==n?0:n.length;for(e&&i&&(r=n[++u]);++u<i;)r=t(r,n[u],u,n);return r}function p(n,t,r,e){var u=null==n?0:n.length;for(e&&u&&(r=n[--u]);u--;)r=t(r,n[u],u,n);return r}function _(n,t){for(var r=-1,e=null==n?0:n.length;++r<e;)if(t(n[r],r,n))return true;return false}function v(n,t,r){var e;return r(n,function(n,r,u){if(t(n,r,u))return e=r,false}),e}function g(n,t,r,e){var u=n.length;for(r+=e?1:-1;e?r--:++r<u;)if(t(n[r],r,n))return r;return-1}function d(n,t,r){if(t===t)n:{\n--r;for(var e=n.length;++r<e;)if(n[r]===t){n=r;break n}n=-1}else n=g(n,b,r);return n}function y(n,t,r,e){--r;for(var u=n.length;++r<u;)if(e(n[r],t))return r;return-1}function b(n){return n!==n}function x(n,t){var r=null==n?0:n.length;return r?k(n,t)/r:P}function j(n){return function(t){return null==t?F:t[n]}}function w(n){return function(t){return null==n?F:n[t]}}function m(n,t,r,e,u){return u(n,function(n,u,i){r=e?(e=false,n):t(r,n,u,i)}),r}function A(n,t){var r=n.length;for(n.sort(t);r--;)n[r]=n[r].c;\nreturn n}function k(n,t){for(var r,e=-1,u=n.length;++e<u;){var i=t(n[e]);i!==F&&(r=r===F?i:r+i)}return r}function E(n,t){for(var r=-1,e=Array(n);++r<n;)e[r]=t(r);return e}function O(n,t){return l(t,function(t){return[t,n[t]]})}function S(n){return function(t){return n(t)}}function I(n,t){return l(t,function(t){return n[t]})}function R(n,t){return n.has(t)}function z(n,t){for(var r=-1,e=n.length;++r<e&&-1<d(t,n[r],0););return r}function W(n,t){for(var r=n.length;r--&&-1<d(t,n[r],0););return r}function B(n){\nreturn"\\\\"+Tn[n]}function L(n){var t=-1,r=Array(n.size);return n.forEach(function(n,e){r[++t]=[e,n]}),r}function U(n,t){return function(r){return n(t(r))}}function C(n,t){for(var r=-1,e=n.length,u=0,i=[];++r<e;){var o=n[r];o!==t&&"__lodash_placeholder__"!==o||(n[r]="__lodash_placeholder__",i[u++]=r)}return i}function D(n){var t=-1,r=Array(n.size);return n.forEach(function(n){r[++t]=n}),r}function M(n){var t=-1,r=Array(n.size);return n.forEach(function(n){r[++t]=[n,n]}),r}function T(n){if(Bn.test(n)){\nfor(var t=zn.lastIndex=0;zn.test(n);)++t;n=t}else n=tt(n);return n}function $(n){return Bn.test(n)?n.match(zn)||[]:n.split("")}var F,N=1/0,P=NaN,Z=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],q=/\\b__p\\+=\'\';/g,V=/\\b(__p\\+=)\'\'\\+/g,K=/(__e\\(.*?\\)|\\b__t\\))\\+\'\';/g,G=/&(?:amp|lt|gt|quot|#39);/g,H=/[&<>"\']/g,J=RegExp(G.source),Y=RegExp(H.source),Q=/<%-([\\s\\S]+?)%>/g,X=/<%([\\s\\S]+?)%>/g,nn=/<%=([\\s\\S]+?)%>/g,tn=/\\.|\\[(?:[^[\\]]*|(["\'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,rn=/^\\w*$/,en=/^\\./,un=/[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|(["\'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g,on=/[\\\\^$.*+?()[\\]{}|]/g,fn=RegExp(on.source),cn=/^\\s+|\\s+$/g,an=/^\\s+/,ln=/\\s+$/,sn=/\\{(?:\\n\\/\\* \\[wrapped with .+\\] \\*\\/)?\\n?/,hn=/\\{\\n\\/\\* \\[wrapped with (.+)\\] \\*/,pn=/,? & /,_n=/[^\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\x7f]+/g,vn=/\\\\(\\\\)?/g,gn=/\\$\\{([^\\\\}]*(?:\\\\.[^\\\\}]*)*)\\}/g,dn=/\\w*$/,yn=/^[-+]0x[0-9a-f]+$/i,bn=/^0b[01]+$/i,xn=/^\\[object .+?Constructor\\]$/,jn=/^0o[0-7]+$/i,wn=/^(?:0|[1-9]\\d*)$/,mn=/[\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\xff\\u0100-\\u017f]/g,An=/($^)/,kn=/[\'\\n\\r\\u2028\\u2029\\\\]/g,En="[\\\\ufe0e\\\\ufe0f]?(?:[\\\\u0300-\\\\u036f\\\\ufe20-\\\\ufe2f\\\\u20d0-\\\\u20ff]|\\\\ud83c[\\\\udffb-\\\\udfff])?(?:\\\\u200d(?:[^\\\\ud800-\\\\udfff]|(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}|[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff])[\\\\ufe0e\\\\ufe0f]?(?:[\\\\u0300-\\\\u036f\\\\ufe20-\\\\ufe2f\\\\u20d0-\\\\u20ff]|\\\\ud83c[\\\\udffb-\\\\udfff])?)*",On="(?:[\\\\u2700-\\\\u27bf]|(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}|[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff])"+En,Sn="(?:[^\\\\ud800-\\\\udfff][\\\\u0300-\\\\u036f\\\\ufe20-\\\\ufe2f\\\\u20d0-\\\\u20ff]?|[\\\\u0300-\\\\u036f\\\\ufe20-\\\\ufe2f\\\\u20d0-\\\\u20ff]|(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}|[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]|[\\\\ud800-\\\\udfff])",In=RegExp("[\'\\u2019]","g"),Rn=RegExp("[\\\\u0300-\\\\u036f\\\\ufe20-\\\\ufe2f\\\\u20d0-\\\\u20ff]","g"),zn=RegExp("\\\\ud83c[\\\\udffb-\\\\udfff](?=\\\\ud83c[\\\\udffb-\\\\udfff])|"+Sn+En,"g"),Wn=RegExp(["[A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde]?[a-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xff]+(?:[\'\\u2019](?:d|ll|m|re|s|t|ve))?(?=[\\\\xac\\\\xb1\\\\xd7\\\\xf7\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf\\\\u2000-\\\\u206f \\\\t\\\\x0b\\\\f\\\\xa0\\\\ufeff\\\\n\\\\r\\\\u2028\\\\u2029\\\\u1680\\\\u180e\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200a\\\\u202f\\\\u205f\\\\u3000]|[A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde]|$)|(?:[A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde]|[^\\\\ud800-\\\\udfff\\\\xac\\\\xb1\\\\xd7\\\\xf7\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf\\\\u2000-\\\\u206f \\\\t\\\\x0b\\\\f\\\\xa0\\\\ufeff\\\\n\\\\r\\\\u2028\\\\u2029\\\\u1680\\\\u180e\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200a\\\\u202f\\\\u205f\\\\u3000\\\\d+\\\\u2700-\\\\u27bfa-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xffA-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde])+(?:[\'\\u2019](?:D|LL|M|RE|S|T|VE))?(?=[\\\\xac\\\\xb1\\\\xd7\\\\xf7\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf\\\\u2000-\\\\u206f \\\\t\\\\x0b\\\\f\\\\xa0\\\\ufeff\\\\n\\\\r\\\\u2028\\\\u2029\\\\u1680\\\\u180e\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200a\\\\u202f\\\\u205f\\\\u3000]|[A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde](?:[a-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xff]|[^\\\\ud800-\\\\udfff\\\\xac\\\\xb1\\\\xd7\\\\xf7\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf\\\\u2000-\\\\u206f \\\\t\\\\x0b\\\\f\\\\xa0\\\\ufeff\\\\n\\\\r\\\\u2028\\\\u2029\\\\u1680\\\\u180e\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200a\\\\u202f\\\\u205f\\\\u3000\\\\d+\\\\u2700-\\\\u27bfa-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xffA-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde])|$)|[A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde]?(?:[a-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xff]|[^\\\\ud800-\\\\udfff\\\\xac\\\\xb1\\\\xd7\\\\xf7\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf\\\\u2000-\\\\u206f \\\\t\\\\x0b\\\\f\\\\xa0\\\\ufeff\\\\n\\\\r\\\\u2028\\\\u2029\\\\u1680\\\\u180e\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200a\\\\u202f\\\\u205f\\\\u3000\\\\d+\\\\u2700-\\\\u27bfa-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xffA-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde])+(?:[\'\\u2019](?:d|ll|m|re|s|t|ve))?|[A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde]+(?:[\'\\u2019](?:D|LL|M|RE|S|T|VE))?|\\\\d*(?:(?:1ST|2ND|3RD|(?![123])\\\\dTH)\\\\b)|\\\\d*(?:(?:1st|2nd|3rd|(?![123])\\\\dth)\\\\b)|\\\\d+",On].join("|"),"g"),Bn=RegExp("[\\\\u200d\\\\ud800-\\\\udfff\\\\u0300-\\\\u036f\\\\ufe20-\\\\ufe2f\\\\u20d0-\\\\u20ff\\\\ufe0e\\\\ufe0f]"),Ln=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Un="Array Buffer DataView Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Map Math Object Promise RegExp Set String Symbol TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array WeakMap _ clearTimeout isFinite parseInt setTimeout".split(" "),Cn={};\nCn["[object Float32Array]"]=Cn["[object Float64Array]"]=Cn["[object Int8Array]"]=Cn["[object Int16Array]"]=Cn["[object Int32Array]"]=Cn["[object Uint8Array]"]=Cn["[object Uint8ClampedArray]"]=Cn["[object Uint16Array]"]=Cn["[object Uint32Array]"]=true,Cn["[object Arguments]"]=Cn["[object Array]"]=Cn["[object ArrayBuffer]"]=Cn["[object Boolean]"]=Cn["[object DataView]"]=Cn["[object Date]"]=Cn["[object Error]"]=Cn["[object Function]"]=Cn["[object Map]"]=Cn["[object Number]"]=Cn["[object Object]"]=Cn["[object RegExp]"]=Cn["[object Set]"]=Cn["[object String]"]=Cn["[object WeakMap]"]=false;\nvar Dn={};Dn["[object Arguments]"]=Dn["[object Array]"]=Dn["[object ArrayBuffer]"]=Dn["[object DataView]"]=Dn["[object Boolean]"]=Dn["[object Date]"]=Dn["[object Float32Array]"]=Dn["[object Float64Array]"]=Dn["[object Int8Array]"]=Dn["[object Int16Array]"]=Dn["[object Int32Array]"]=Dn["[object Map]"]=Dn["[object Number]"]=Dn["[object Object]"]=Dn["[object RegExp]"]=Dn["[object Set]"]=Dn["[object String]"]=Dn["[object Symbol]"]=Dn["[object Uint8Array]"]=Dn["[object Uint8ClampedArray]"]=Dn["[object Uint16Array]"]=Dn["[object Uint32Array]"]=true,\nDn["[object Error]"]=Dn["[object Function]"]=Dn["[object WeakMap]"]=false;var Mn,Tn={"\\\\":"\\\\","\'":"\'","\\n":"n","\\r":"r","\\u2028":"u2028","\\u2029":"u2029"},$n=parseFloat,Fn=parseInt,Nn=typeof global=="object"&&global&&global.Object===Object&&global,Pn=typeof self=="object"&&self&&self.Object===Object&&self,Zn=Nn||Pn||Function("return this")(),qn=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Vn=qn&&typeof module=="object"&&module&&!module.nodeType&&module,Kn=Vn&&Vn.exports===qn,Gn=Kn&&Nn.process;\nn:{try{Mn=Gn&&Gn.binding&&Gn.binding("util");break n}catch(n){}Mn=void 0}var Hn=Mn&&Mn.isArrayBuffer,Jn=Mn&&Mn.isDate,Yn=Mn&&Mn.isMap,Qn=Mn&&Mn.isRegExp,Xn=Mn&&Mn.isSet,nt=Mn&&Mn.isTypedArray,tt=j("length"),rt=w({"\\xc0":"A","\\xc1":"A","\\xc2":"A","\\xc3":"A","\\xc4":"A","\\xc5":"A","\\xe0":"a","\\xe1":"a","\\xe2":"a","\\xe3":"a","\\xe4":"a","\\xe5":"a","\\xc7":"C","\\xe7":"c","\\xd0":"D","\\xf0":"d","\\xc8":"E","\\xc9":"E","\\xca":"E","\\xcb":"E","\\xe8":"e","\\xe9":"e","\\xea":"e","\\xeb":"e","\\xcc":"I","\\xcd":"I","\\xce":"I",\n"\\xcf":"I","\\xec":"i","\\xed":"i","\\xee":"i","\\xef":"i","\\xd1":"N","\\xf1":"n","\\xd2":"O","\\xd3":"O","\\xd4":"O","\\xd5":"O","\\xd6":"O","\\xd8":"O","\\xf2":"o","\\xf3":"o","\\xf4":"o","\\xf5":"o","\\xf6":"o","\\xf8":"o","\\xd9":"U","\\xda":"U","\\xdb":"U","\\xdc":"U","\\xf9":"u","\\xfa":"u","\\xfb":"u","\\xfc":"u","\\xdd":"Y","\\xfd":"y","\\xff":"y","\\xc6":"Ae","\\xe6":"ae","\\xde":"Th","\\xfe":"th","\\xdf":"ss","\\u0100":"A","\\u0102":"A","\\u0104":"A","\\u0101":"a","\\u0103":"a","\\u0105":"a","\\u0106":"C","\\u0108":"C","\\u010a":"C",\n"\\u010c":"C","\\u0107":"c","\\u0109":"c","\\u010b":"c","\\u010d":"c","\\u010e":"D","\\u0110":"D","\\u010f":"d","\\u0111":"d","\\u0112":"E","\\u0114":"E","\\u0116":"E","\\u0118":"E","\\u011a":"E","\\u0113":"e","\\u0115":"e","\\u0117":"e","\\u0119":"e","\\u011b":"e","\\u011c":"G","\\u011e":"G","\\u0120":"G","\\u0122":"G","\\u011d":"g","\\u011f":"g","\\u0121":"g","\\u0123":"g","\\u0124":"H","\\u0126":"H","\\u0125":"h","\\u0127":"h","\\u0128":"I","\\u012a":"I","\\u012c":"I","\\u012e":"I","\\u0130":"I","\\u0129":"i","\\u012b":"i","\\u012d":"i",\n"\\u012f":"i","\\u0131":"i","\\u0134":"J","\\u0135":"j","\\u0136":"K","\\u0137":"k","\\u0138":"k","\\u0139":"L","\\u013b":"L","\\u013d":"L","\\u013f":"L","\\u0141":"L","\\u013a":"l","\\u013c":"l","\\u013e":"l","\\u0140":"l","\\u0142":"l","\\u0143":"N","\\u0145":"N","\\u0147":"N","\\u014a":"N","\\u0144":"n","\\u0146":"n","\\u0148":"n","\\u014b":"n","\\u014c":"O","\\u014e":"O","\\u0150":"O","\\u014d":"o","\\u014f":"o","\\u0151":"o","\\u0154":"R","\\u0156":"R","\\u0158":"R","\\u0155":"r","\\u0157":"r","\\u0159":"r","\\u015a":"S","\\u015c":"S",\n"\\u015e":"S","\\u0160":"S","\\u015b":"s","\\u015d":"s","\\u015f":"s","\\u0161":"s","\\u0162":"T","\\u0164":"T","\\u0166":"T","\\u0163":"t","\\u0165":"t","\\u0167":"t","\\u0168":"U","\\u016a":"U","\\u016c":"U","\\u016e":"U","\\u0170":"U","\\u0172":"U","\\u0169":"u","\\u016b":"u","\\u016d":"u","\\u016f":"u","\\u0171":"u","\\u0173":"u","\\u0174":"W","\\u0175":"w","\\u0176":"Y","\\u0177":"y","\\u0178":"Y","\\u0179":"Z","\\u017b":"Z","\\u017d":"Z","\\u017a":"z","\\u017c":"z","\\u017e":"z","\\u0132":"IJ","\\u0133":"ij","\\u0152":"Oe","\\u0153":"oe",\n"\\u0149":"\'n","\\u017f":"s"}),et=w({"&":"&","<":"<",">":">",\'"\':""","\'":"'"}),ut=w({"&":"&","<":"<",">":">",""":\'"\',"'":"\'"}),it=function w(En){function On(n){if(xu(n)&&!af(n)&&!(n instanceof Mn)){if(n instanceof zn)return n;if(ci.call(n,"__wrapped__"))return Pe(n)}return new zn(n)}function Sn(){}function zn(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=F}function Mn(n){this.__wrapped__=n,this.__actions__=[],this.__dir__=1,\nthis.__filtered__=false,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Tn(n){var t=-1,r=null==n?0:n.length;for(this.clear();++t<r;){var e=n[t];this.set(e[0],e[1])}}function Nn(n){var t=-1,r=null==n?0:n.length;for(this.clear();++t<r;){var e=n[t];this.set(e[0],e[1])}}function Pn(n){var t=-1,r=null==n?0:n.length;for(this.clear();++t<r;){var e=n[t];this.set(e[0],e[1])}}function qn(n){var t=-1,r=null==n?0:n.length;for(this.__data__=new Pn;++t<r;)this.add(n[t])}function Vn(n){\nthis.size=(this.__data__=new Nn(n)).size}function Gn(n,t){var r,e=af(n),u=!e&&cf(n),i=!e&&!u&&sf(n),o=!e&&!u&&!i&&gf(n),u=(e=e||u||i||o)?E(n.length,ri):[],f=u.length;for(r in n)!t&&!ci.call(n,r)||e&&("length"==r||i&&("offset"==r||"parent"==r)||o&&("buffer"==r||"byteLength"==r||"byteOffset"==r)||Re(r,f))||u.push(r);return u}function tt(n){var t=n.length;return t?n[cr(0,t-1)]:F}function ot(n,t){return Te(Mr(n),gt(t,0,n.length))}function ft(n){return Te(Mr(n))}function ct(n,t,r){(r===F||hu(n[t],r))&&(r!==F||t in n)||_t(n,t,r);\n}function at(n,t,r){var e=n[t];ci.call(n,t)&&hu(e,r)&&(r!==F||t in n)||_t(n,t,r)}function lt(n,t){for(var r=n.length;r--;)if(hu(n[r][0],t))return r;return-1}function st(n,t,r,e){return oo(n,function(n,u,i){t(e,n,r(n),i)}),e}function ht(n,t){return n&&Tr(t,Lu(t),n)}function pt(n,t){return n&&Tr(t,Uu(t),n)}function _t(n,t,r){"__proto__"==t&&Ei?Ei(n,t,{configurable:true,enumerable:true,value:r,writable:true}):n[t]=r}function vt(n,t){for(var r=-1,e=t.length,u=Hu(e),i=null==n;++r<e;)u[r]=i?F:Wu(n,t[r]);return u;\n}function gt(n,t,r){return n===n&&(r!==F&&(n=n<=r?n:r),t!==F&&(n=n>=t?n:t)),n}function dt(n,t,r,e,i,o){var f,c=1&t,a=2&t,l=4&t;if(r&&(f=i?r(n,e,i,o):r(n)),f!==F)return f;if(!bu(n))return n;if(e=af(n)){if(f=Ee(n),!c)return Mr(n,f)}else{var s=yo(n),h="[object Function]"==s||"[object GeneratorFunction]"==s;if(sf(n))return Wr(n,c);if("[object Object]"==s||"[object Arguments]"==s||h&&!i){if(f=a||h?{}:Oe(n),!c)return a?Fr(n,pt(f,n)):$r(n,ht(f,n))}else{if(!Dn[s])return i?n:{};f=Se(n,s,dt,c)}}if(o||(o=new Vn),\ni=o.get(n))return i;o.set(n,f);var a=l?a?ye:de:a?Uu:Lu,p=e?F:a(n);return u(p||n,function(e,u){p&&(u=e,e=n[u]),at(f,u,dt(e,t,r,u,n,o))}),f}function yt(n){var t=Lu(n);return function(r){return bt(r,n,t)}}function bt(n,t,r){var e=r.length;if(null==n)return!e;for(n=ni(n);e--;){var u=r[e],i=t[u],o=n[u];if(o===F&&!(u in n)||!i(o))return false}return true}function xt(n,t,r){if(typeof n!="function")throw new ei("Expected a function");return jo(function(){n.apply(F,r)},t)}function jt(n,t,r,e){var u=-1,i=c,o=true,f=n.length,s=[],h=t.length;\nif(!f)return s;r&&(t=l(t,S(r))),e?(i=a,o=false):200<=t.length&&(i=R,o=false,t=new qn(t));n:for(;++u<f;){var p=n[u],_=null==r?p:r(p),p=e||0!==p?p:0;if(o&&_===_){for(var v=h;v--;)if(t[v]===_)continue n;s.push(p)}else i(t,_,e)||s.push(p)}return s}function wt(n,t){var r=true;return oo(n,function(n,e,u){return r=!!t(n,e,u)}),r}function mt(n,t,r){for(var e=-1,u=n.length;++e<u;){var i=n[e],o=t(i);if(null!=o&&(f===F?o===o&&!Au(o):r(o,f)))var f=o,c=i}return c}function At(n,t){var r=[];return oo(n,function(n,e,u){\nt(n,e,u)&&r.push(n)}),r}function kt(n,t,r,e,u){var i=-1,o=n.length;for(r||(r=Ie),u||(u=[]);++i<o;){var f=n[i];0<t&&r(f)?1<t?kt(f,t-1,r,e,u):s(u,f):e||(u[u.length]=f)}return u}function Et(n,t){return n&&co(n,t,Lu)}function Ot(n,t){return n&&ao(n,t,Lu)}function St(n,t){return f(t,function(t){return gu(n[t])})}function It(n,t){t=Rr(t,n);for(var r=0,e=t.length;null!=n&&r<e;)n=n[$e(t[r++])];return r&&r==e?n:F}function Rt(n,t,r){return t=t(n),af(n)?t:s(t,r(n))}function zt(n){if(null==n)n=n===F?"[object Undefined]":"[object Null]";else if(ki&&ki in ni(n)){\nvar t=ci.call(n,ki),r=n[ki];try{n[ki]=F;var e=true}catch(n){}var u=si.call(n);e&&(t?n[ki]=r:delete n[ki]),n=u}else n=si.call(n);return n}function Wt(n,t){return n>t}function Bt(n,t){return null!=n&&ci.call(n,t)}function Lt(n,t){return null!=n&&t in ni(n)}function Ut(n,t,r){for(var e=r?a:c,u=n[0].length,i=n.length,o=i,f=Hu(i),s=1/0,h=[];o--;){var p=n[o];o&&t&&(p=l(p,S(t))),s=Mi(p.length,s),f[o]=!r&&(t||120<=u&&120<=p.length)?new qn(o&&p):F}var p=n[0],_=-1,v=f[0];n:for(;++_<u&&h.length<s;){var g=p[_],d=t?t(g):g,g=r||0!==g?g:0;\nif(v?!R(v,d):!e(h,d,r)){for(o=i;--o;){var y=f[o];if(y?!R(y,d):!e(n[o],d,r))continue n}v&&v.push(d),h.push(g)}}return h}function Ct(n,t,r){var e={};return Et(n,function(n,u,i){t(e,r(n),u,i)}),e}function Dt(n,t,e){return t=Rr(t,n),n=2>t.length?n:It(n,vr(t,0,-1)),t=null==n?n:n[$e(Ge(t))],null==t?F:r(t,n,e)}function Mt(n){return xu(n)&&"[object Arguments]"==zt(n)}function Tt(n){return xu(n)&&"[object ArrayBuffer]"==zt(n)}function $t(n){return xu(n)&&"[object Date]"==zt(n)}function Ft(n,t,r,e,u){if(n===t)t=true;else if(null==n||null==t||!xu(n)&&!xu(t))t=n!==n&&t!==t;else n:{\nvar i=af(n),o=af(t),f=i?"[object Array]":yo(n),c=o?"[object Array]":yo(t),f="[object Arguments]"==f?"[object Object]":f,c="[object Arguments]"==c?"[object Object]":c,a="[object Object]"==f,o="[object Object]"==c;if((c=f==c)&&sf(n)){if(!sf(t)){t=false;break n}i=true,a=false}if(c&&!a)u||(u=new Vn),t=i||gf(n)?_e(n,t,r,e,Ft,u):ve(n,t,f,r,e,Ft,u);else{if(!(1&r)&&(i=a&&ci.call(n,"__wrapped__"),f=o&&ci.call(t,"__wrapped__"),i||f)){n=i?n.value():n,t=f?t.value():t,u||(u=new Vn),t=Ft(n,t,r,e,u);break n}if(c)t:if(u||(u=new Vn),\ni=1&r,f=de(n),o=f.length,c=de(t).length,o==c||i){for(a=o;a--;){var l=f[a];if(!(i?l in t:ci.call(t,l))){t=false;break t}}if((c=u.get(n))&&u.get(t))t=c==t;else{c=true,u.set(n,t),u.set(t,n);for(var s=i;++a<o;){var l=f[a],h=n[l],p=t[l];if(e)var _=i?e(p,h,l,t,n,u):e(h,p,l,n,t,u);if(_===F?h!==p&&!Ft(h,p,r,e,u):!_){c=false;break}s||(s="constructor"==l)}c&&!s&&(r=n.constructor,e=t.constructor,r!=e&&"constructor"in n&&"constructor"in t&&!(typeof r=="function"&&r instanceof r&&typeof e=="function"&&e instanceof e)&&(c=false)),\nu.delete(n),u.delete(t),t=c}}else t=false;else t=false}}return t}function Nt(n){return xu(n)&&"[object Map]"==yo(n)}function Pt(n,t,r,e){var u=r.length,i=u,o=!e;if(null==n)return!i;for(n=ni(n);u--;){var f=r[u];if(o&&f[2]?f[1]!==n[f[0]]:!(f[0]in n))return false}for(;++u<i;){var f=r[u],c=f[0],a=n[c],l=f[1];if(o&&f[2]){if(a===F&&!(c in n))return false}else{if(f=new Vn,e)var s=e(a,l,c,n,t,f);if(s===F?!Ft(l,a,3,e,f):!s)return false}}return true}function Zt(n){return!(!bu(n)||li&&li in n)&&(gu(n)?_i:xn).test(Fe(n))}function qt(n){\nreturn xu(n)&&"[object RegExp]"==zt(n)}function Vt(n){return xu(n)&&"[object Set]"==yo(n)}function Kt(n){return xu(n)&&yu(n.length)&&!!Cn[zt(n)]}function Gt(n){return typeof n=="function"?n:null==n?Nu:typeof n=="object"?af(n)?Xt(n[0],n[1]):Qt(n):Vu(n)}function Ht(n){if(!Le(n))return Ci(n);var t,r=[];for(t in ni(n))ci.call(n,t)&&"constructor"!=t&&r.push(t);return r}function Jt(n,t){return n<t}function Yt(n,t){var r=-1,e=pu(n)?Hu(n.length):[];return oo(n,function(n,u,i){e[++r]=t(n,u,i)}),e}function Qt(n){\nvar t=me(n);return 1==t.length&&t[0][2]?Ue(t[0][0],t[0][1]):function(r){return r===n||Pt(r,n,t)}}function Xt(n,t){return We(n)&&t===t&&!bu(t)?Ue($e(n),t):function(r){var e=Wu(r,n);return e===F&&e===t?Bu(r,n):Ft(t,e,3)}}function nr(n,t,r,e,u){n!==t&&co(t,function(i,o){if(bu(i)){u||(u=new Vn);var f=u,c=n[o],a=t[o],l=f.get(a);if(l)ct(n,o,l);else{var l=e?e(c,a,o+"",n,t,f):F,s=l===F;if(s){var h=af(a),p=!h&&sf(a),_=!h&&!p&&gf(a),l=a;h||p||_?af(c)?l=c:_u(c)?l=Mr(c):p?(s=false,l=Wr(a,true)):_?(s=false,l=Lr(a,true)):l=[]:wu(a)||cf(a)?(l=c,\ncf(c)?l=Ru(c):(!bu(c)||r&&gu(c))&&(l=Oe(a))):s=false}s&&(f.set(a,l),nr(l,a,r,e,f),f.delete(a)),ct(n,o,l)}}else f=e?e(n[o],i,o+"",n,t,u):F,f===F&&(f=i),ct(n,o,f)},Uu)}function tr(n,t){var r=n.length;if(r)return t+=0>t?r:0,Re(t,r)?n[t]:F}function rr(n,t,r){var e=-1;return t=l(t.length?t:[Nu],S(je())),n=Yt(n,function(n){return{a:l(t,function(t){return t(n)}),b:++e,c:n}}),A(n,function(n,t){var e;n:{e=-1;for(var u=n.a,i=t.a,o=u.length,f=r.length;++e<o;){var c=Ur(u[e],i[e]);if(c){e=e>=f?c:c*("desc"==r[e]?-1:1);\nbreak n}}e=n.b-t.b}return e})}function er(n,t){return ur(n,t,function(t,r){return Bu(n,r)})}function ur(n,t,r){for(var e=-1,u=t.length,i={};++e<u;){var o=t[e],f=It(n,o);r(f,o)&&pr(i,Rr(o,n),f)}return i}function ir(n){return function(t){return It(t,n)}}function or(n,t,r,e){var u=e?y:d,i=-1,o=t.length,f=n;for(n===t&&(t=Mr(t)),r&&(f=l(n,S(r)));++i<o;)for(var c=0,a=t[i],a=r?r(a):a;-1<(c=u(f,a,c,e));)f!==n&&wi.call(f,c,1),wi.call(n,c,1);return n}function fr(n,t){for(var r=n?t.length:0,e=r-1;r--;){var u=t[r];\nif(r==e||u!==i){var i=u;Re(u)?wi.call(n,u,1):mr(n,u)}}}function cr(n,t){return n+zi(Fi()*(t-n+1))}function ar(n,t){var r="";if(!n||1>t||9007199254740991<t)return r;do t%2&&(r+=n),(t=zi(t/2))&&(n+=n);while(t);return r}function lr(n,t){return wo(Ce(n,t,Nu),n+"")}function sr(n){return tt(Du(n))}function hr(n,t){var r=Du(n);return Te(r,gt(t,0,r.length))}function pr(n,t,r,e){if(!bu(n))return n;t=Rr(t,n);for(var u=-1,i=t.length,o=i-1,f=n;null!=f&&++u<i;){var c=$e(t[u]),a=r;if(u!=o){var l=f[c],a=e?e(l,c,f):F;\na===F&&(a=bu(l)?l:Re(t[u+1])?[]:{})}at(f,c,a),f=f[c]}return n}function _r(n){return Te(Du(n))}function vr(n,t,r){var e=-1,u=n.length;for(0>t&&(t=-t>u?0:u+t),r=r>u?u:r,0>r&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0,r=Hu(u);++e<u;)r[e]=n[e+t];return r}function gr(n,t){var r;return oo(n,function(n,e,u){return r=t(n,e,u),!r}),!!r}function dr(n,t,r){var e=0,u=null==n?e:n.length;if(typeof t=="number"&&t===t&&2147483647>=u){for(;e<u;){var i=e+u>>>1,o=n[i];null!==o&&!Au(o)&&(r?o<=t:o<t)?e=i+1:u=i}return u}return yr(n,t,Nu,r);\n}function yr(n,t,r,e){t=r(t);for(var u=0,i=null==n?0:n.length,o=t!==t,f=null===t,c=Au(t),a=t===F;u<i;){var l=zi((u+i)/2),s=r(n[l]),h=s!==F,p=null===s,_=s===s,v=Au(s);(o?e||_:a?_&&(e||h):f?_&&h&&(e||!p):c?_&&h&&!p&&(e||!v):p||v?0:e?s<=t:s<t)?u=l+1:i=l}return Mi(i,4294967294)}function br(n,t){for(var r=-1,e=n.length,u=0,i=[];++r<e;){var o=n[r],f=t?t(o):o;if(!r||!hu(f,c)){var c=f;i[u++]=0===o?0:o}}return i}function xr(n){return typeof n=="number"?n:Au(n)?P:+n}function jr(n){if(typeof n=="string")return n;\nif(af(n))return l(n,jr)+"";if(Au(n))return uo?uo.call(n):"";var t=n+"";return"0"==t&&1/n==-N?"-0":t}function wr(n,t,r){var e=-1,u=c,i=n.length,o=true,f=[],l=f;if(r)o=false,u=a;else if(200<=i){if(u=t?null:po(n))return D(u);o=false,u=R,l=new qn}else l=t?[]:f;n:for(;++e<i;){var s=n[e],h=t?t(s):s,s=r||0!==s?s:0;if(o&&h===h){for(var p=l.length;p--;)if(l[p]===h)continue n;t&&l.push(h),f.push(s)}else u(l,h,r)||(l!==f&&l.push(h),f.push(s))}return f}function mr(n,t){return t=Rr(t,n),n=2>t.length?n:It(n,vr(t,0,-1)),\nnull==n||delete n[$e(Ge(t))]}function Ar(n,t,r,e){for(var u=n.length,i=e?u:-1;(e?i--:++i<u)&&t(n[i],i,n););return r?vr(n,e?0:i,e?i+1:u):vr(n,e?i+1:0,e?u:i)}function kr(n,t){var r=n;return r instanceof Mn&&(r=r.value()),h(t,function(n,t){return t.func.apply(t.thisArg,s([n],t.args))},r)}function Er(n,t,r){var e=n.length;if(2>e)return e?wr(n[0]):[];for(var u=-1,i=Hu(e);++u<e;)for(var o=n[u],f=-1;++f<e;)f!=u&&(i[u]=jt(i[u]||o,n[f],t,r));return wr(kt(i,1),t,r)}function Or(n,t,r){for(var e=-1,u=n.length,i=t.length,o={};++e<u;)r(o,n[e],e<i?t[e]:F);\nreturn o}function Sr(n){return _u(n)?n:[]}function Ir(n){return typeof n=="function"?n:Nu}function Rr(n,t){return af(n)?n:We(n,t)?[n]:mo(zu(n))}function zr(n,t,r){var e=n.length;return r=r===F?e:r,!t&&r>=e?n:vr(n,t,r)}function Wr(n,t){if(t)return n.slice();var r=n.length,r=yi?yi(r):new n.constructor(r);return n.copy(r),r}function Br(n){var t=new n.constructor(n.byteLength);return new di(t).set(new di(n)),t}function Lr(n,t){return new n.constructor(t?Br(n.buffer):n.buffer,n.byteOffset,n.length)}function Ur(n,t){\nif(n!==t){var r=n!==F,e=null===n,u=n===n,i=Au(n),o=t!==F,f=null===t,c=t===t,a=Au(t);if(!f&&!a&&!i&&n>t||i&&o&&c&&!f&&!a||e&&o&&c||!r&&c||!u)return 1;if(!e&&!i&&!a&&n<t||a&&r&&u&&!e&&!i||f&&r&&u||!o&&u||!c)return-1}return 0}function Cr(n,t,r,e){var u=-1,i=n.length,o=r.length,f=-1,c=t.length,a=Di(i-o,0),l=Hu(c+a);for(e=!e;++f<c;)l[f]=t[f];for(;++u<o;)(e||u<i)&&(l[r[u]]=n[u]);for(;a--;)l[f++]=n[u++];return l}function Dr(n,t,r,e){var u=-1,i=n.length,o=-1,f=r.length,c=-1,a=t.length,l=Di(i-f,0),s=Hu(l+a);\nfor(e=!e;++u<l;)s[u]=n[u];for(l=u;++c<a;)s[l+c]=t[c];for(;++o<f;)(e||u<i)&&(s[l+r[o]]=n[u++]);return s}function Mr(n,t){var r=-1,e=n.length;for(t||(t=Hu(e));++r<e;)t[r]=n[r];return t}function Tr(n,t,r,e){var u=!r;r||(r={});for(var i=-1,o=t.length;++i<o;){var f=t[i],c=e?e(r[f],n[f],f,r,n):F;c===F&&(c=n[f]),u?_t(r,f,c):at(r,f,c)}return r}function $r(n,t){return Tr(n,vo(n),t)}function Fr(n,t){return Tr(n,go(n),t)}function Nr(n,t){return function(r,u){var i=af(r)?e:st,o=t?t():{};return i(r,n,je(u,2),o);\n}}function Pr(n){return lr(function(t,r){var e=-1,u=r.length,i=1<u?r[u-1]:F,o=2<u?r[2]:F,i=3<n.length&&typeof i=="function"?(u--,i):F;for(o&&ze(r[0],r[1],o)&&(i=3>u?F:i,u=1),t=ni(t);++e<u;)(o=r[e])&&n(t,o,e,i);return t})}function Zr(n,t){return function(r,e){if(null==r)return r;if(!pu(r))return n(r,e);for(var u=r.length,i=t?u:-1,o=ni(r);(t?i--:++i<u)&&false!==e(o[i],i,o););return r}}function qr(n){return function(t,r,e){var u=-1,i=ni(t);e=e(t);for(var o=e.length;o--;){var f=e[n?o:++u];if(false===r(i[f],f,i))break;\n}return t}}function Vr(n,t,r){function e(){return(this&&this!==Zn&&this instanceof e?i:n).apply(u?r:this,arguments)}var u=1&t,i=Hr(n);return e}function Kr(n){return function(t){t=zu(t);var r=Bn.test(t)?$(t):F,e=r?r[0]:t.charAt(0);return t=r?zr(r,1).join(""):t.slice(1),e[n]()+t}}function Gr(n){return function(t){return h($u(Tu(t).replace(In,"")),n,"")}}function Hr(n){return function(){var t=arguments;switch(t.length){case 0:return new n;case 1:return new n(t[0]);case 2:return new n(t[0],t[1]);case 3:\nreturn new n(t[0],t[1],t[2]);case 4:return new n(t[0],t[1],t[2],t[3]);case 5:return new n(t[0],t[1],t[2],t[3],t[4]);case 6:return new n(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new n(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=io(n.prototype),t=n.apply(r,t);return bu(t)?t:r}}function Jr(n,t,e){function u(){for(var o=arguments.length,f=Hu(o),c=o,a=xe(u);c--;)f[c]=arguments[c];return c=3>o&&f[0]!==a&&f[o-1]!==a?[]:C(f,a),o-=c.length,o<e?fe(n,t,Xr,u.placeholder,F,f,c,F,F,e-o):r(this&&this!==Zn&&this instanceof u?i:n,this,f);\n}var i=Hr(n);return u}function Yr(n){return function(t,r,e){var u=ni(t);if(!pu(t)){var i=je(r,3);t=Lu(t),r=function(n){return i(u[n],n,u)}}return r=n(t,r,e),-1<r?u[i?t[r]:r]:F}}function Qr(n){return ge(function(t){var r=t.length,e=r,u=zn.prototype.thru;for(n&&t.reverse();e--;){var i=t[e];if(typeof i!="function")throw new ei("Expected a function");if(u&&!o&&"wrapper"==be(i))var o=new zn([],true)}for(e=o?e:r;++e<r;)var i=t[e],u=be(i),f="wrapper"==u?_o(i):F,o=f&&Be(f[0])&&424==f[1]&&!f[4].length&&1==f[9]?o[be(f[0])].apply(o,f[3]):1==i.length&&Be(i)?o[u]():o.thru(i);\nreturn function(){var n=arguments,e=n[0];if(o&&1==n.length&&af(e))return o.plant(e).value();for(var u=0,n=r?t[u].apply(this,n):e;++u<r;)n=t[u].call(this,n);return n}})}function Xr(n,t,r,e,u,i,o,f,c,a){function l(){for(var d=arguments.length,y=Hu(d),b=d;b--;)y[b]=arguments[b];if(_){var x,j=xe(l),b=y.length;for(x=0;b--;)y[b]===j&&++x}if(e&&(y=Cr(y,e,u,_)),i&&(y=Dr(y,i,o,_)),d-=x,_&&d<a)return j=C(y,j),fe(n,t,Xr,l.placeholder,r,y,j,f,c,a-d);if(j=h?r:this,b=p?j[n]:n,d=y.length,f){x=y.length;for(var w=Mi(f.length,x),m=Mr(y);w--;){\nvar A=f[w];y[w]=Re(A,x)?m[A]:F}}else v&&1<d&&y.reverse();return s&&c<d&&(y.length=c),this&&this!==Zn&&this instanceof l&&(b=g||Hr(b)),b.apply(j,y)}var s=128&t,h=1&t,p=2&t,_=24&t,v=512&t,g=p?F:Hr(n);return l}function ne(n,t){return function(r,e){return Ct(r,n,t(e))}}function te(n,t){return function(r,e){var u;if(r===F&&e===F)return t;if(r!==F&&(u=r),e!==F){if(u===F)return e;typeof r=="string"||typeof e=="string"?(r=jr(r),e=jr(e)):(r=xr(r),e=xr(e)),u=n(r,e)}return u}}function re(n){return ge(function(t){\nreturn t=l(t,S(je())),lr(function(e){var u=this;return n(t,function(n){return r(n,u,e)})})})}function ee(n,t){t=t===F?" ":jr(t);var r=t.length;return 2>r?r?ar(t,n):t:(r=ar(t,Ri(n/T(t))),Bn.test(t)?zr($(r),0,n).join(""):r.slice(0,n))}function ue(n,t,e,u){function i(){for(var t=-1,c=arguments.length,a=-1,l=u.length,s=Hu(l+c),h=this&&this!==Zn&&this instanceof i?f:n;++a<l;)s[a]=u[a];for(;c--;)s[a++]=arguments[++t];return r(h,o?e:this,s)}var o=1&t,f=Hr(n);return i}function ie(n){return function(t,r,e){\ne&&typeof e!="number"&&ze(t,r,e)&&(r=e=F),t=Eu(t),r===F?(r=t,t=0):r=Eu(r),e=e===F?t<r?1:-1:Eu(e);var u=-1;r=Di(Ri((r-t)/(e||1)),0);for(var i=Hu(r);r--;)i[n?r:++u]=t,t+=e;return i}}function oe(n){return function(t,r){return typeof t=="string"&&typeof r=="string"||(t=Iu(t),r=Iu(r)),n(t,r)}}function fe(n,t,r,e,u,i,o,f,c,a){var l=8&t,s=l?o:F;o=l?F:o;var h=l?i:F;return i=l?F:i,t=(t|(l?32:64))&~(l?64:32),4&t||(t&=-4),u=[n,t,u,h,s,i,o,f,c,a],r=r.apply(F,u),Be(n)&&xo(r,u),r.placeholder=e,De(r,n,t)}function ce(n){\nvar t=Xu[n];return function(n,r){if(n=Iu(n),r=null==r?0:Mi(Ou(r),292)){var e=(zu(n)+"e").split("e"),e=t(e[0]+"e"+(+e[1]+r)),e=(zu(e)+"e").split("e");return+(e[0]+"e"+(+e[1]-r))}return t(n)}}function ae(n){return function(t){var r=yo(t);return"[object Map]"==r?L(t):"[object Set]"==r?M(t):O(t,n(t))}}function le(n,t,r,e,u,i,o,f){var c=2&t;if(!c&&typeof n!="function")throw new ei("Expected a function");var a=e?e.length:0;if(a||(t&=-97,e=u=F),o=o===F?o:Di(Ou(o),0),f=f===F?f:Ou(f),a-=u?u.length:0,64&t){\nvar l=e,s=u;e=u=F}var h=c?F:_o(n);return i=[n,t,r,e,u,l,s,i,o,f],h&&(r=i[1],n=h[1],t=r|n,e=128==n&&8==r||128==n&&256==r&&i[7].length<=h[8]||384==n&&h[7].length<=h[8]&&8==r,131>t||e)&&(1&n&&(i[2]=h[2],t|=1&r?0:4),(r=h[3])&&(e=i[3],i[3]=e?Cr(e,r,h[4]):r,i[4]=e?C(i[3],"__lodash_placeholder__"):h[4]),(r=h[5])&&(e=i[5],i[5]=e?Dr(e,r,h[6]):r,i[6]=e?C(i[5],"__lodash_placeholder__"):h[6]),(r=h[7])&&(i[7]=r),128&n&&(i[8]=null==i[8]?h[8]:Mi(i[8],h[8])),null==i[9]&&(i[9]=h[9]),i[0]=h[0],i[1]=t),n=i[0],t=i[1],\nr=i[2],e=i[3],u=i[4],f=i[9]=i[9]===F?c?0:n.length:Di(i[9]-a,0),!f&&24&t&&(t&=-25),De((h?lo:xo)(t&&1!=t?8==t||16==t?Jr(n,t,f):32!=t&&33!=t||u.length?Xr.apply(F,i):ue(n,t,r,e):Vr(n,t,r),i),n,t)}function se(n,t,r,e){return n===F||hu(n,ii[r])&&!ci.call(e,r)?t:n}function he(n,t,r,e,u,i){return bu(n)&&bu(t)&&(i.set(t,n),nr(n,t,F,he,i),i.delete(t)),n}function pe(n){return wu(n)?F:n}function _e(n,t,r,e,u,i){var o=1&r,f=n.length,c=t.length;if(f!=c&&!(o&&c>f))return false;if((c=i.get(n))&&i.get(t))return c==t;var c=-1,a=true,l=2&r?new qn:F;\nfor(i.set(n,t),i.set(t,n);++c<f;){var s=n[c],h=t[c];if(e)var p=o?e(h,s,c,t,n,i):e(s,h,c,n,t,i);if(p!==F){if(p)continue;a=false;break}if(l){if(!_(t,function(n,t){if(!R(l,t)&&(s===n||u(s,n,r,e,i)))return l.push(t)})){a=false;break}}else if(s!==h&&!u(s,h,r,e,i)){a=false;break}}return i.delete(n),i.delete(t),a}function ve(n,t,r,e,u,i,o){switch(r){case"[object DataView]":if(n.byteLength!=t.byteLength||n.byteOffset!=t.byteOffset)break;n=n.buffer,t=t.buffer;case"[object ArrayBuffer]":if(n.byteLength!=t.byteLength||!i(new di(n),new di(t)))break;\nreturn true;case"[object Boolean]":case"[object Date]":case"[object Number]":return hu(+n,+t);case"[object Error]":return n.name==t.name&&n.message==t.message;case"[object RegExp]":case"[object String]":return n==t+"";case"[object Map]":var f=L;case"[object Set]":if(f||(f=D),n.size!=t.size&&!(1&e))break;return(r=o.get(n))?r==t:(e|=2,o.set(n,t),t=_e(f(n),f(t),e,u,i,o),o.delete(n),t);case"[object Symbol]":if(eo)return eo.call(n)==eo.call(t)}return false}function ge(n){return wo(Ce(n,F,Ve),n+"")}function de(n){\nreturn Rt(n,Lu,vo)}function ye(n){return Rt(n,Uu,go)}function be(n){for(var t=n.name+"",r=Ji[t],e=ci.call(Ji,t)?r.length:0;e--;){var u=r[e],i=u.func;if(null==i||i==n)return u.name}return t}function xe(n){return(ci.call(On,"placeholder")?On:n).placeholder}function je(){var n=On.iteratee||Pu,n=n===Pu?Gt:n;return arguments.length?n(arguments[0],arguments[1]):n}function we(n,t){var r=n.__data__,e=typeof t;return("string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t)?r[typeof t=="string"?"string":"hash"]:r.map;\n}function me(n){for(var t=Lu(n),r=t.length;r--;){var e=t[r],u=n[e];t[r]=[e,u,u===u&&!bu(u)]}return t}function Ae(n,t){var r=null==n?F:n[t];return Zt(r)?r:F}function ke(n,t,r){t=Rr(t,n);for(var e=-1,u=t.length,i=false;++e<u;){var o=$e(t[e]);if(!(i=null!=n&&r(n,o)))break;n=n[o]}return i||++e!=u?i:(u=null==n?0:n.length,!!u&&yu(u)&&Re(o,u)&&(af(n)||cf(n)))}function Ee(n){var t=n.length,r=n.constructor(t);return t&&"string"==typeof n[0]&&ci.call(n,"index")&&(r.index=n.index,r.input=n.input),r}function Oe(n){\nreturn typeof n.constructor!="function"||Le(n)?{}:io(bi(n))}function Se(r,e,u,i){var o=r.constructor;switch(e){case"[object ArrayBuffer]":return Br(r);case"[object Boolean]":case"[object Date]":return new o(+r);case"[object DataView]":return e=i?Br(r.buffer):r.buffer,new r.constructor(e,r.byteOffset,r.byteLength);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":\ncase"[object Uint16Array]":case"[object Uint32Array]":return Lr(r,i);case"[object Map]":return e=i?u(L(r),1):L(r),h(e,n,new r.constructor);case"[object Number]":case"[object String]":return new o(r);case"[object RegExp]":return e=new r.constructor(r.source,dn.exec(r)),e.lastIndex=r.lastIndex,e;case"[object Set]":return e=i?u(D(r),1):D(r),h(e,t,new r.constructor);case"[object Symbol]":return eo?ni(eo.call(r)):{}}}function Ie(n){return af(n)||cf(n)||!!(mi&&n&&n[mi])}function Re(n,t){return t=null==t?9007199254740991:t,\n!!t&&(typeof n=="number"||wn.test(n))&&-1<n&&0==n%1&&n<t}function ze(n,t,r){if(!bu(r))return false;var e=typeof t;return!!("number"==e?pu(r)&&Re(t,r.length):"string"==e&&t in r)&&hu(r[t],n)}function We(n,t){if(af(n))return false;var r=typeof n;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=n&&!Au(n))||(rn.test(n)||!tn.test(n)||null!=t&&n in ni(t))}function Be(n){var t=be(n),r=On[t];return typeof r=="function"&&t in Mn.prototype&&(n===r||(t=_o(r),!!t&&n===t[0]))}function Le(n){var t=n&&n.constructor;\nreturn n===(typeof t=="function"&&t.prototype||ii)}function Ue(n,t){return function(r){return null!=r&&(r[n]===t&&(t!==F||n in ni(r)))}}function Ce(n,t,e){return t=Di(t===F?n.length-1:t,0),function(){for(var u=arguments,i=-1,o=Di(u.length-t,0),f=Hu(o);++i<o;)f[i]=u[t+i];for(i=-1,o=Hu(t+1);++i<t;)o[i]=u[i];return o[t]=e(f),r(n,this,o)}}function De(n,t,r){var e=t+"";t=wo;var u,i=Ne;return u=(u=e.match(hn))?u[1].split(pn):[],r=i(u,r),(i=r.length)&&(u=i-1,r[u]=(1<i?"& ":"")+r[u],r=r.join(2<i?", ":" "),\ne=e.replace(sn,"{\\n/* [wrapped with "+r+"] */\\n")),t(n,e)}function Me(n){var t=0,r=0;return function(){var e=Ti(),u=16-(e-r);if(r=e,0<u){if(800<=++t)return arguments[0]}else t=0;return n.apply(F,arguments)}}function Te(n,t){var r=-1,e=n.length,u=e-1;for(t=t===F?e:t;++r<t;){var e=cr(r,u),i=n[e];n[e]=n[r],n[r]=i}return n.length=t,n}function $e(n){if(typeof n=="string"||Au(n))return n;var t=n+"";return"0"==t&&1/n==-N?"-0":t}function Fe(n){if(null!=n){try{return fi.call(n)}catch(n){}return n+""}return"";\n}function Ne(n,t){return u(Z,function(r){var e="_."+r[0];t&r[1]&&!c(n,e)&&n.push(e)}),n.sort()}function Pe(n){if(n instanceof Mn)return n.clone();var t=new zn(n.__wrapped__,n.__chain__);return t.__actions__=Mr(n.__actions__),t.__index__=n.__index__,t.__values__=n.__values__,t}function Ze(n,t,r){var e=null==n?0:n.length;return e?(r=null==r?0:Ou(r),0>r&&(r=Di(e+r,0)),g(n,je(t,3),r)):-1}function qe(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=e-1;return r!==F&&(u=Ou(r),u=0>r?Di(e+u,0):Mi(u,e-1)),\ng(n,je(t,3),u,true)}function Ve(n){return(null==n?0:n.length)?kt(n,1):[]}function Ke(n){return n&&n.length?n[0]:F}function Ge(n){var t=null==n?0:n.length;return t?n[t-1]:F}function He(n,t){return n&&n.length&&t&&t.length?or(n,t):n}function Je(n){return null==n?n:Ni.call(n)}function Ye(n){if(!n||!n.length)return[];var t=0;return n=f(n,function(n){if(_u(n))return t=Di(n.length,t),true}),E(t,function(t){return l(n,j(t))})}function Qe(n,t){if(!n||!n.length)return[];var e=Ye(n);return null==t?e:l(e,function(n){\nreturn r(t,F,n)})}function Xe(n){return n=On(n),n.__chain__=true,n}function nu(n,t){return t(n)}function tu(){return this}function ru(n,t){return(af(n)?u:oo)(n,je(t,3))}function eu(n,t){return(af(n)?i:fo)(n,je(t,3))}function uu(n,t){return(af(n)?l:Yt)(n,je(t,3))}function iu(n,t,r){return t=r?F:t,t=n&&null==t?n.length:t,le(n,128,F,F,F,F,t)}function ou(n,t){var r;if(typeof t!="function")throw new ei("Expected a function");return n=Ou(n),function(){return 0<--n&&(r=t.apply(this,arguments)),1>=n&&(t=F),\nr}}function fu(n,t,r){return t=r?F:t,n=le(n,8,F,F,F,F,F,t),n.placeholder=fu.placeholder,n}function cu(n,t,r){return t=r?F:t,n=le(n,16,F,F,F,F,F,t),n.placeholder=cu.placeholder,n}function au(n,t,r){function e(t){var r=c,e=a;return c=a=F,_=t,s=n.apply(e,r)}function u(n){var r=n-p;return n-=_,p===F||r>=t||0>r||g&&n>=l}function i(){var n=Jo();if(u(n))return o(n);var r,e=jo;r=n-_,n=t-(n-p),r=g?Mi(n,l-r):n,h=e(i,r)}function o(n){return h=F,d&&c?e(n):(c=a=F,s)}function f(){var n=Jo(),r=u(n);if(c=arguments,\na=this,p=n,r){if(h===F)return _=n=p,h=jo(i,t),v?e(n):s;if(g)return h=jo(i,t),e(p)}return h===F&&(h=jo(i,t)),s}var c,a,l,s,h,p,_=0,v=false,g=false,d=true;if(typeof n!="function")throw new ei("Expected a function");return t=Iu(t)||0,bu(r)&&(v=!!r.leading,l=(g="maxWait"in r)?Di(Iu(r.maxWait)||0,t):l,d="trailing"in r?!!r.trailing:d),f.cancel=function(){h!==F&&ho(h),_=0,c=p=a=h=F},f.flush=function(){return h===F?s:o(Jo())},f}function lu(n,t){function r(){var e=arguments,u=t?t.apply(this,e):e[0],i=r.cache;return i.has(u)?i.get(u):(e=n.apply(this,e),\nr.cache=i.set(u,e)||i,e)}if(typeof n!="function"||null!=t&&typeof t!="function")throw new ei("Expected a function");return r.cache=new(lu.Cache||Pn),r}function su(n){if(typeof n!="function")throw new ei("Expected a function");return function(){var t=arguments;switch(t.length){case 0:return!n.call(this);case 1:return!n.call(this,t[0]);case 2:return!n.call(this,t[0],t[1]);case 3:return!n.call(this,t[0],t[1],t[2])}return!n.apply(this,t)}}function hu(n,t){return n===t||n!==n&&t!==t}function pu(n){return null!=n&&yu(n.length)&&!gu(n);\n}function _u(n){return xu(n)&&pu(n)}function vu(n){if(!xu(n))return false;var t=zt(n);return"[object Error]"==t||"[object DOMException]"==t||typeof n.message=="string"&&typeof n.name=="string"&&!wu(n)}function gu(n){return!!bu(n)&&(n=zt(n),"[object Function]"==n||"[object GeneratorFunction]"==n||"[object AsyncFunction]"==n||"[object Proxy]"==n)}function du(n){return typeof n=="number"&&n==Ou(n)}function yu(n){return typeof n=="number"&&-1<n&&0==n%1&&9007199254740991>=n}function bu(n){var t=typeof n;return null!=n&&("object"==t||"function"==t);\n}function xu(n){return null!=n&&typeof n=="object"}function ju(n){return typeof n=="number"||xu(n)&&"[object Number]"==zt(n)}function wu(n){return!(!xu(n)||"[object Object]"!=zt(n))&&(n=bi(n),null===n||(n=ci.call(n,"constructor")&&n.constructor,typeof n=="function"&&n instanceof n&&fi.call(n)==hi))}function mu(n){return typeof n=="string"||!af(n)&&xu(n)&&"[object String]"==zt(n)}function Au(n){return typeof n=="symbol"||xu(n)&&"[object Symbol]"==zt(n)}function ku(n){if(!n)return[];if(pu(n))return mu(n)?$(n):Mr(n);\nif(Ai&&n[Ai]){n=n[Ai]();for(var t,r=[];!(t=n.next()).done;)r.push(t.value);return r}return t=yo(n),("[object Map]"==t?L:"[object Set]"==t?D:Du)(n)}function Eu(n){return n?(n=Iu(n),n===N||n===-N?1.7976931348623157e308*(0>n?-1:1):n===n?n:0):0===n?n:0}function Ou(n){n=Eu(n);var t=n%1;return n===n?t?n-t:n:0}function Su(n){return n?gt(Ou(n),0,4294967295):0}function Iu(n){if(typeof n=="number")return n;if(Au(n))return P;if(bu(n)&&(n=typeof n.valueOf=="function"?n.valueOf():n,n=bu(n)?n+"":n),typeof n!="string")return 0===n?n:+n;\nn=n.replace(cn,"");var t=bn.test(n);return t||jn.test(n)?Fn(n.slice(2),t?2:8):yn.test(n)?P:+n}function Ru(n){return Tr(n,Uu(n))}function zu(n){return null==n?"":jr(n)}function Wu(n,t,r){return n=null==n?F:It(n,t),n===F?r:n}function Bu(n,t){return null!=n&&ke(n,t,Lt)}function Lu(n){return pu(n)?Gn(n):Ht(n)}function Uu(n){if(pu(n))n=Gn(n,true);else if(bu(n)){var t,r=Le(n),e=[];for(t in n)("constructor"!=t||!r&&ci.call(n,t))&&e.push(t);n=e}else{if(t=[],null!=n)for(r in ni(n))t.push(r);n=t}return n}function Cu(n,t){\nif(null==n)return{};var r=l(ye(n),function(n){return[n]});return t=je(t),ur(n,r,function(n,r){return t(n,r[0])})}function Du(n){return null==n?[]:I(n,Lu(n))}function Mu(n){return Nf(zu(n).toLowerCase())}function Tu(n){return(n=zu(n))&&n.replace(mn,rt).replace(Rn,"")}function $u(n,t,r){return n=zu(n),t=r?F:t,t===F?Ln.test(n)?n.match(Wn)||[]:n.match(_n)||[]:n.match(t)||[]}function Fu(n){return function(){return n}}function Nu(n){return n}function Pu(n){return Gt(typeof n=="function"?n:dt(n,1))}function Zu(n,t,r){\nvar e=Lu(t),i=St(t,e);null!=r||bu(t)&&(i.length||!e.length)||(r=t,t=n,n=this,i=St(t,Lu(t)));var o=!(bu(r)&&"chain"in r&&!r.chain),f=gu(n);return u(i,function(r){var e=t[r];n[r]=e,f&&(n.prototype[r]=function(){var t=this.__chain__;if(o||t){var r=n(this.__wrapped__);return(r.__actions__=Mr(this.__actions__)).push({func:e,args:arguments,thisArg:n}),r.__chain__=t,r}return e.apply(n,s([this.value()],arguments))})}),n}function qu(){}function Vu(n){return We(n)?j($e(n)):ir(n)}function Ku(){return[]}function Gu(){\nreturn false}En=null==En?Zn:it.defaults(Zn.Object(),En,it.pick(Zn,Un));var Hu=En.Array,Ju=En.Date,Yu=En.Error,Qu=En.Function,Xu=En.Math,ni=En.Object,ti=En.RegExp,ri=En.String,ei=En.TypeError,ui=Hu.prototype,ii=ni.prototype,oi=En["__core-js_shared__"],fi=Qu.prototype.toString,ci=ii.hasOwnProperty,ai=0,li=function(){var n=/[^.]+$/.exec(oi&&oi.keys&&oi.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""}(),si=ii.toString,hi=fi.call(ni),pi=Zn._,_i=ti("^"+fi.call(ci).replace(on,"\\\\$&").replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g,"$1.*?")+"$"),vi=Kn?En.Buffer:F,gi=En.Symbol,di=En.Uint8Array,yi=vi?vi.f:F,bi=U(ni.getPrototypeOf,ni),xi=ni.create,ji=ii.propertyIsEnumerable,wi=ui.splice,mi=gi?gi.isConcatSpreadable:F,Ai=gi?gi.iterator:F,ki=gi?gi.toStringTag:F,Ei=function(){\ntry{var n=Ae(ni,"defineProperty");return n({},"",{}),n}catch(n){}}(),Oi=En.clearTimeout!==Zn.clearTimeout&&En.clearTimeout,Si=Ju&&Ju.now!==Zn.Date.now&&Ju.now,Ii=En.setTimeout!==Zn.setTimeout&&En.setTimeout,Ri=Xu.ceil,zi=Xu.floor,Wi=ni.getOwnPropertySymbols,Bi=vi?vi.isBuffer:F,Li=En.isFinite,Ui=ui.join,Ci=U(ni.keys,ni),Di=Xu.max,Mi=Xu.min,Ti=Ju.now,$i=En.parseInt,Fi=Xu.random,Ni=ui.reverse,Pi=Ae(En,"DataView"),Zi=Ae(En,"Map"),qi=Ae(En,"Promise"),Vi=Ae(En,"Set"),Ki=Ae(En,"WeakMap"),Gi=Ae(ni,"create"),Hi=Ki&&new Ki,Ji={},Yi=Fe(Pi),Qi=Fe(Zi),Xi=Fe(qi),no=Fe(Vi),to=Fe(Ki),ro=gi?gi.prototype:F,eo=ro?ro.valueOf:F,uo=ro?ro.toString:F,io=function(){\nfunction n(){}return function(t){return bu(t)?xi?xi(t):(n.prototype=t,t=new n,n.prototype=F,t):{}}}();On.templateSettings={escape:Q,evaluate:X,interpolate:nn,variable:"",imports:{_:On}},On.prototype=Sn.prototype,On.prototype.constructor=On,zn.prototype=io(Sn.prototype),zn.prototype.constructor=zn,Mn.prototype=io(Sn.prototype),Mn.prototype.constructor=Mn,Tn.prototype.clear=function(){this.__data__=Gi?Gi(null):{},this.size=0},Tn.prototype.delete=function(n){return n=this.has(n)&&delete this.__data__[n],\nthis.size-=n?1:0,n},Tn.prototype.get=function(n){var t=this.__data__;return Gi?(n=t[n],"__lodash_hash_undefined__"===n?F:n):ci.call(t,n)?t[n]:F},Tn.prototype.has=function(n){var t=this.__data__;return Gi?t[n]!==F:ci.call(t,n)},Tn.prototype.set=function(n,t){var r=this.__data__;return this.size+=this.has(n)?0:1,r[n]=Gi&&t===F?"__lodash_hash_undefined__":t,this},Nn.prototype.clear=function(){this.__data__=[],this.size=0},Nn.prototype.delete=function(n){var t=this.__data__;return n=lt(t,n),!(0>n)&&(n==t.length-1?t.pop():wi.call(t,n,1),\n--this.size,true)},Nn.prototype.get=function(n){var t=this.__data__;return n=lt(t,n),0>n?F:t[n][1]},Nn.prototype.has=function(n){return-1<lt(this.__data__,n)},Nn.prototype.set=function(n,t){var r=this.__data__,e=lt(r,n);return 0>e?(++this.size,r.push([n,t])):r[e][1]=t,this},Pn.prototype.clear=function(){this.size=0,this.__data__={hash:new Tn,map:new(Zi||Nn),string:new Tn}},Pn.prototype.delete=function(n){return n=we(this,n).delete(n),this.size-=n?1:0,n},Pn.prototype.get=function(n){return we(this,n).get(n);\n},Pn.prototype.has=function(n){return we(this,n).has(n)},Pn.prototype.set=function(n,t){var r=we(this,n),e=r.size;return r.set(n,t),this.size+=r.size==e?0:1,this},qn.prototype.add=qn.prototype.push=function(n){return this.__data__.set(n,"__lodash_hash_undefined__"),this},qn.prototype.has=function(n){return this.__data__.has(n)},Vn.prototype.clear=function(){this.__data__=new Nn,this.size=0},Vn.prototype.delete=function(n){var t=this.__data__;return n=t.delete(n),this.size=t.size,n},Vn.prototype.get=function(n){\nreturn this.__data__.get(n)},Vn.prototype.has=function(n){return this.__data__.has(n)},Vn.prototype.set=function(n,t){var r=this.__data__;if(r instanceof Nn){var e=r.__data__;if(!Zi||199>e.length)return e.push([n,t]),this.size=++r.size,this;r=this.__data__=new Pn(e)}return r.set(n,t),this.size=r.size,this};var oo=Zr(Et),fo=Zr(Ot,true),co=qr(),ao=qr(true),lo=Hi?function(n,t){return Hi.set(n,t),n}:Nu,so=Ei?function(n,t){return Ei(n,"toString",{configurable:true,enumerable:false,value:Fu(t),writable:true})}:Nu,ho=Oi||function(n){\nreturn Zn.clearTimeout(n)},po=Vi&&1/D(new Vi([,-0]))[1]==N?function(n){return new Vi(n)}:qu,_o=Hi?function(n){return Hi.get(n)}:qu,vo=Wi?function(n){return null==n?[]:(n=ni(n),f(Wi(n),function(t){return ji.call(n,t)}))}:Ku,go=Wi?function(n){for(var t=[];n;)s(t,vo(n)),n=bi(n);return t}:Ku,yo=zt;(Pi&&"[object DataView]"!=yo(new Pi(new ArrayBuffer(1)))||Zi&&"[object Map]"!=yo(new Zi)||qi&&"[object Promise]"!=yo(qi.resolve())||Vi&&"[object Set]"!=yo(new Vi)||Ki&&"[object WeakMap]"!=yo(new Ki))&&(yo=function(n){\nvar t=zt(n);if(n=(n="[object Object]"==t?n.constructor:F)?Fe(n):"")switch(n){case Yi:return"[object DataView]";case Qi:return"[object Map]";case Xi:return"[object Promise]";case no:return"[object Set]";case to:return"[object WeakMap]"}return t});var bo=oi?gu:Gu,xo=Me(lo),jo=Ii||function(n,t){return Zn.setTimeout(n,t)},wo=Me(so),mo=function(n){n=lu(n,function(n){return 500===t.size&&t.clear(),n});var t=n.cache;return n}(function(n){var t=[];return en.test(n)&&t.push(""),n.replace(un,function(n,r,e,u){\nt.push(e?u.replace(vn,"$1"):r||n)}),t}),Ao=lr(function(n,t){return _u(n)?jt(n,kt(t,1,_u,true)):[]}),ko=lr(function(n,t){var r=Ge(t);return _u(r)&&(r=F),_u(n)?jt(n,kt(t,1,_u,true),je(r,2)):[]}),Eo=lr(function(n,t){var r=Ge(t);return _u(r)&&(r=F),_u(n)?jt(n,kt(t,1,_u,true),F,r):[]}),Oo=lr(function(n){var t=l(n,Sr);return t.length&&t[0]===n[0]?Ut(t):[]}),So=lr(function(n){var t=Ge(n),r=l(n,Sr);return t===Ge(r)?t=F:r.pop(),r.length&&r[0]===n[0]?Ut(r,je(t,2)):[]}),Io=lr(function(n){var t=Ge(n),r=l(n,Sr);return(t=typeof t=="function"?t:F)&&r.pop(),\nr.length&&r[0]===n[0]?Ut(r,F,t):[]}),Ro=lr(He),zo=ge(function(n,t){var r=null==n?0:n.length,e=vt(n,t);return fr(n,l(t,function(n){return Re(n,r)?+n:n}).sort(Ur)),e}),Wo=lr(function(n){return wr(kt(n,1,_u,true))}),Bo=lr(function(n){var t=Ge(n);return _u(t)&&(t=F),wr(kt(n,1,_u,true),je(t,2))}),Lo=lr(function(n){var t=Ge(n),t=typeof t=="function"?t:F;return wr(kt(n,1,_u,true),F,t)}),Uo=lr(function(n,t){return _u(n)?jt(n,t):[]}),Co=lr(function(n){return Er(f(n,_u))}),Do=lr(function(n){var t=Ge(n);return _u(t)&&(t=F),\nEr(f(n,_u),je(t,2))}),Mo=lr(function(n){var t=Ge(n),t=typeof t=="function"?t:F;return Er(f(n,_u),F,t)}),To=lr(Ye),$o=lr(function(n){var t=n.length,t=1<t?n[t-1]:F,t=typeof t=="function"?(n.pop(),t):F;return Qe(n,t)}),Fo=ge(function(n){function t(t){return vt(t,n)}var r=n.length,e=r?n[0]:0,u=this.__wrapped__;return!(1<r||this.__actions__.length)&&u instanceof Mn&&Re(e)?(u=u.slice(e,+e+(r?1:0)),u.__actions__.push({func:nu,args:[t],thisArg:F}),new zn(u,this.__chain__).thru(function(n){return r&&!n.length&&n.push(F),\nn})):this.thru(t)}),No=Nr(function(n,t,r){ci.call(n,r)?++n[r]:_t(n,r,1)}),Po=Yr(Ze),Zo=Yr(qe),qo=Nr(function(n,t,r){ci.call(n,r)?n[r].push(t):_t(n,r,[t])}),Vo=lr(function(n,t,e){var u=-1,i=typeof t=="function",o=pu(n)?Hu(n.length):[];return oo(n,function(n){o[++u]=i?r(t,n,e):Dt(n,t,e)}),o}),Ko=Nr(function(n,t,r){_t(n,r,t)}),Go=Nr(function(n,t,r){n[r?0:1].push(t)},function(){return[[],[]]}),Ho=lr(function(n,t){if(null==n)return[];var r=t.length;return 1<r&&ze(n,t[0],t[1])?t=[]:2<r&&ze(t[0],t[1],t[2])&&(t=[t[0]]),\nrr(n,kt(t,1),[])}),Jo=Si||function(){return Zn.Date.now()},Yo=lr(function(n,t,r){var e=1;if(r.length)var u=C(r,xe(Yo)),e=32|e;return le(n,e,t,r,u)}),Qo=lr(function(n,t,r){var e=3;if(r.length)var u=C(r,xe(Qo)),e=32|e;return le(t,e,n,r,u)}),Xo=lr(function(n,t){return xt(n,1,t)}),nf=lr(function(n,t,r){return xt(n,Iu(t)||0,r)});lu.Cache=Pn;var tf=lr(function(n,t){t=1==t.length&&af(t[0])?l(t[0],S(je())):l(kt(t,1),S(je()));var e=t.length;return lr(function(u){for(var i=-1,o=Mi(u.length,e);++i<o;)u[i]=t[i].call(this,u[i]);\nreturn r(n,this,u)})}),rf=lr(function(n,t){return le(n,32,F,t,C(t,xe(rf)))}),ef=lr(function(n,t){return le(n,64,F,t,C(t,xe(ef)))}),uf=ge(function(n,t){return le(n,256,F,F,F,t)}),of=oe(Wt),ff=oe(function(n,t){return n>=t}),cf=Mt(function(){return arguments}())?Mt:function(n){return xu(n)&&ci.call(n,"callee")&&!ji.call(n,"callee")},af=Hu.isArray,lf=Hn?S(Hn):Tt,sf=Bi||Gu,hf=Jn?S(Jn):$t,pf=Yn?S(Yn):Nt,_f=Qn?S(Qn):qt,vf=Xn?S(Xn):Vt,gf=nt?S(nt):Kt,df=oe(Jt),yf=oe(function(n,t){return n<=t}),bf=Pr(function(n,t){\nif(Le(t)||pu(t))Tr(t,Lu(t),n);else for(var r in t)ci.call(t,r)&&at(n,r,t[r])}),xf=Pr(function(n,t){Tr(t,Uu(t),n)}),jf=Pr(function(n,t,r,e){Tr(t,Uu(t),n,e)}),wf=Pr(function(n,t,r,e){Tr(t,Lu(t),n,e)}),mf=ge(vt),Af=lr(function(n){return n.push(F,se),r(jf,F,n)}),kf=lr(function(n){return n.push(F,he),r(Rf,F,n)}),Ef=ne(function(n,t,r){n[t]=r},Fu(Nu)),Of=ne(function(n,t,r){ci.call(n,t)?n[t].push(r):n[t]=[r]},je),Sf=lr(Dt),If=Pr(function(n,t,r){nr(n,t,r)}),Rf=Pr(function(n,t,r,e){nr(n,t,r,e)}),zf=ge(function(n,t){\nvar r={};if(null==n)return r;var e=false;t=l(t,function(t){return t=Rr(t,n),e||(e=1<t.length),t}),Tr(n,ye(n),r),e&&(r=dt(r,7,pe));for(var u=t.length;u--;)mr(r,t[u]);return r}),Wf=ge(function(n,t){return null==n?{}:er(n,t)}),Bf=ae(Lu),Lf=ae(Uu),Uf=Gr(function(n,t,r){return t=t.toLowerCase(),n+(r?Mu(t):t)}),Cf=Gr(function(n,t,r){return n+(r?"-":"")+t.toLowerCase()}),Df=Gr(function(n,t,r){return n+(r?" ":"")+t.toLowerCase()}),Mf=Kr("toLowerCase"),Tf=Gr(function(n,t,r){return n+(r?"_":"")+t.toLowerCase();\n}),$f=Gr(function(n,t,r){return n+(r?" ":"")+Nf(t)}),Ff=Gr(function(n,t,r){return n+(r?" ":"")+t.toUpperCase()}),Nf=Kr("toUpperCase"),Pf=lr(function(n,t){try{return r(n,F,t)}catch(n){return vu(n)?n:new Yu(n)}}),Zf=ge(function(n,t){return u(t,function(t){t=$e(t),_t(n,t,Yo(n[t],n))}),n}),qf=Qr(),Vf=Qr(true),Kf=lr(function(n,t){return function(r){return Dt(r,n,t)}}),Gf=lr(function(n,t){return function(r){return Dt(n,r,t)}}),Hf=re(l),Jf=re(o),Yf=re(_),Qf=ie(),Xf=ie(true),nc=te(function(n,t){return n+t},0),tc=ce("ceil"),rc=te(function(n,t){\nreturn n/t},1),ec=ce("floor"),uc=te(function(n,t){return n*t},1),ic=ce("round"),oc=te(function(n,t){return n-t},0);return On.after=function(n,t){if(typeof t!="function")throw new ei("Expected a function");return n=Ou(n),function(){if(1>--n)return t.apply(this,arguments)}},On.ary=iu,On.assign=bf,On.assignIn=xf,On.assignInWith=jf,On.assignWith=wf,On.at=mf,On.before=ou,On.bind=Yo,On.bindAll=Zf,On.bindKey=Qo,On.castArray=function(){if(!arguments.length)return[];var n=arguments[0];return af(n)?n:[n]},\nOn.chain=Xe,On.chunk=function(n,t,r){if(t=(r?ze(n,t,r):t===F)?1:Di(Ou(t),0),r=null==n?0:n.length,!r||1>t)return[];for(var e=0,u=0,i=Hu(Ri(r/t));e<r;)i[u++]=vr(n,e,e+=t);return i},On.compact=function(n){for(var t=-1,r=null==n?0:n.length,e=0,u=[];++t<r;){var i=n[t];i&&(u[e++]=i)}return u},On.concat=function(){var n=arguments.length;if(!n)return[];for(var t=Hu(n-1),r=arguments[0];n--;)t[n-1]=arguments[n];return s(af(r)?Mr(r):[r],kt(t,1))},On.cond=function(n){var t=null==n?0:n.length,e=je();return n=t?l(n,function(n){\nif("function"!=typeof n[1])throw new ei("Expected a function");return[e(n[0]),n[1]]}):[],lr(function(e){for(var u=-1;++u<t;){var i=n[u];if(r(i[0],this,e))return r(i[1],this,e)}})},On.conforms=function(n){return yt(dt(n,1))},On.constant=Fu,On.countBy=No,On.create=function(n,t){var r=io(n);return null==t?r:ht(r,t)},On.curry=fu,On.curryRight=cu,On.debounce=au,On.defaults=Af,On.defaultsDeep=kf,On.defer=Xo,On.delay=nf,On.difference=Ao,On.differenceBy=ko,On.differenceWith=Eo,On.drop=function(n,t,r){var e=null==n?0:n.length;\nreturn e?(t=r||t===F?1:Ou(t),vr(n,0>t?0:t,e)):[]},On.dropRight=function(n,t,r){var e=null==n?0:n.length;return e?(t=r||t===F?1:Ou(t),t=e-t,vr(n,0,0>t?0:t)):[]},On.dropRightWhile=function(n,t){return n&&n.length?Ar(n,je(t,3),true,true):[]},On.dropWhile=function(n,t){return n&&n.length?Ar(n,je(t,3),true):[]},On.fill=function(n,t,r,e){var u=null==n?0:n.length;if(!u)return[];for(r&&typeof r!="number"&&ze(n,t,r)&&(r=0,e=u),u=n.length,r=Ou(r),0>r&&(r=-r>u?0:u+r),e=e===F||e>u?u:Ou(e),0>e&&(e+=u),e=r>e?0:Su(e);r<e;)n[r++]=t;\nreturn n},On.filter=function(n,t){return(af(n)?f:At)(n,je(t,3))},On.flatMap=function(n,t){return kt(uu(n,t),1)},On.flatMapDeep=function(n,t){return kt(uu(n,t),N)},On.flatMapDepth=function(n,t,r){return r=r===F?1:Ou(r),kt(uu(n,t),r)},On.flatten=Ve,On.flattenDeep=function(n){return(null==n?0:n.length)?kt(n,N):[]},On.flattenDepth=function(n,t){return null!=n&&n.length?(t=t===F?1:Ou(t),kt(n,t)):[]},On.flip=function(n){return le(n,512)},On.flow=qf,On.flowRight=Vf,On.fromPairs=function(n){for(var t=-1,r=null==n?0:n.length,e={};++t<r;){\nvar u=n[t];e[u[0]]=u[1]}return e},On.functions=function(n){return null==n?[]:St(n,Lu(n))},On.functionsIn=function(n){return null==n?[]:St(n,Uu(n))},On.groupBy=qo,On.initial=function(n){return(null==n?0:n.length)?vr(n,0,-1):[]},On.intersection=Oo,On.intersectionBy=So,On.intersectionWith=Io,On.invert=Ef,On.invertBy=Of,On.invokeMap=Vo,On.iteratee=Pu,On.keyBy=Ko,On.keys=Lu,On.keysIn=Uu,On.map=uu,On.mapKeys=function(n,t){var r={};return t=je(t,3),Et(n,function(n,e,u){_t(r,t(n,e,u),n)}),r},On.mapValues=function(n,t){\nvar r={};return t=je(t,3),Et(n,function(n,e,u){_t(r,e,t(n,e,u))}),r},On.matches=function(n){return Qt(dt(n,1))},On.matchesProperty=function(n,t){return Xt(n,dt(t,1))},On.memoize=lu,On.merge=If,On.mergeWith=Rf,On.method=Kf,On.methodOf=Gf,On.mixin=Zu,On.negate=su,On.nthArg=function(n){return n=Ou(n),lr(function(t){return tr(t,n)})},On.omit=zf,On.omitBy=function(n,t){return Cu(n,su(je(t)))},On.once=function(n){return ou(2,n)},On.orderBy=function(n,t,r,e){return null==n?[]:(af(t)||(t=null==t?[]:[t]),\nr=e?F:r,af(r)||(r=null==r?[]:[r]),rr(n,t,r))},On.over=Hf,On.overArgs=tf,On.overEvery=Jf,On.overSome=Yf,On.partial=rf,On.partialRight=ef,On.partition=Go,On.pick=Wf,On.pickBy=Cu,On.property=Vu,On.propertyOf=function(n){return function(t){return null==n?F:It(n,t)}},On.pull=Ro,On.pullAll=He,On.pullAllBy=function(n,t,r){return n&&n.length&&t&&t.length?or(n,t,je(r,2)):n},On.pullAllWith=function(n,t,r){return n&&n.length&&t&&t.length?or(n,t,F,r):n},On.pullAt=zo,On.range=Qf,On.rangeRight=Xf,On.rearg=uf,On.reject=function(n,t){\nreturn(af(n)?f:At)(n,su(je(t,3)))},On.remove=function(n,t){var r=[];if(!n||!n.length)return r;var e=-1,u=[],i=n.length;for(t=je(t,3);++e<i;){var o=n[e];t(o,e,n)&&(r.push(o),u.push(e))}return fr(n,u),r},On.rest=function(n,t){if(typeof n!="function")throw new ei("Expected a function");return t=t===F?t:Ou(t),lr(n,t)},On.reverse=Je,On.sampleSize=function(n,t,r){return t=(r?ze(n,t,r):t===F)?1:Ou(t),(af(n)?ot:hr)(n,t)},On.set=function(n,t,r){return null==n?n:pr(n,t,r)},On.setWith=function(n,t,r,e){return e=typeof e=="function"?e:F,\nnull==n?n:pr(n,t,r,e)},On.shuffle=function(n){return(af(n)?ft:_r)(n)},On.slice=function(n,t,r){var e=null==n?0:n.length;return e?(r&&typeof r!="number"&&ze(n,t,r)?(t=0,r=e):(t=null==t?0:Ou(t),r=r===F?e:Ou(r)),vr(n,t,r)):[]},On.sortBy=Ho,On.sortedUniq=function(n){return n&&n.length?br(n):[]},On.sortedUniqBy=function(n,t){return n&&n.length?br(n,je(t,2)):[]},On.split=function(n,t,r){return r&&typeof r!="number"&&ze(n,t,r)&&(t=r=F),r=r===F?4294967295:r>>>0,r?(n=zu(n))&&(typeof t=="string"||null!=t&&!_f(t))&&(t=jr(t),\n!t&&Bn.test(n))?zr($(n),0,r):n.split(t,r):[]},On.spread=function(n,t){if(typeof n!="function")throw new ei("Expected a function");return t=null==t?0:Di(Ou(t),0),lr(function(e){var u=e[t];return e=zr(e,0,t),u&&s(e,u),r(n,this,e)})},On.tail=function(n){var t=null==n?0:n.length;return t?vr(n,1,t):[]},On.take=function(n,t,r){return n&&n.length?(t=r||t===F?1:Ou(t),vr(n,0,0>t?0:t)):[]},On.takeRight=function(n,t,r){var e=null==n?0:n.length;return e?(t=r||t===F?1:Ou(t),t=e-t,vr(n,0>t?0:t,e)):[]},On.takeRightWhile=function(n,t){\nreturn n&&n.length?Ar(n,je(t,3),false,true):[]},On.takeWhile=function(n,t){return n&&n.length?Ar(n,je(t,3)):[]},On.tap=function(n,t){return t(n),n},On.throttle=function(n,t,r){var e=true,u=true;if(typeof n!="function")throw new ei("Expected a function");return bu(r)&&(e="leading"in r?!!r.leading:e,u="trailing"in r?!!r.trailing:u),au(n,t,{leading:e,maxWait:t,trailing:u})},On.thru=nu,On.toArray=ku,On.toPairs=Bf,On.toPairsIn=Lf,On.toPath=function(n){return af(n)?l(n,$e):Au(n)?[n]:Mr(mo(zu(n)))},On.toPlainObject=Ru,\nOn.transform=function(n,t,r){var e=af(n),i=e||sf(n)||gf(n);if(t=je(t,4),null==r){var o=n&&n.constructor;r=i?e?new o:[]:bu(n)&&gu(o)?io(bi(n)):{}}return(i?u:Et)(n,function(n,e,u){return t(r,n,e,u)}),r},On.unary=function(n){return iu(n,1)},On.union=Wo,On.unionBy=Bo,On.unionWith=Lo,On.uniq=function(n){return n&&n.length?wr(n):[]},On.uniqBy=function(n,t){return n&&n.length?wr(n,je(t,2)):[]},On.uniqWith=function(n,t){return t=typeof t=="function"?t:F,n&&n.length?wr(n,F,t):[]},On.unset=function(n,t){return null==n||mr(n,t);\n},On.unzip=Ye,On.unzipWith=Qe,On.update=function(n,t,r){return null==n?n:pr(n,t,Ir(r)(It(n,t)),void 0)},On.updateWith=function(n,t,r,e){return e=typeof e=="function"?e:F,null!=n&&(n=pr(n,t,Ir(r)(It(n,t)),e)),n},On.values=Du,On.valuesIn=function(n){return null==n?[]:I(n,Uu(n))},On.without=Uo,On.words=$u,On.wrap=function(n,t){return rf(Ir(t),n)},On.xor=Co,On.xorBy=Do,On.xorWith=Mo,On.zip=To,On.zipObject=function(n,t){return Or(n||[],t||[],at)},On.zipObjectDeep=function(n,t){return Or(n||[],t||[],pr);\n},On.zipWith=$o,On.entries=Bf,On.entriesIn=Lf,On.extend=xf,On.extendWith=jf,Zu(On,On),On.add=nc,On.attempt=Pf,On.camelCase=Uf,On.capitalize=Mu,On.ceil=tc,On.clamp=function(n,t,r){return r===F&&(r=t,t=F),r!==F&&(r=Iu(r),r=r===r?r:0),t!==F&&(t=Iu(t),t=t===t?t:0),gt(Iu(n),t,r)},On.clone=function(n){return dt(n,4)},On.cloneDeep=function(n){return dt(n,5)},On.cloneDeepWith=function(n,t){return t=typeof t=="function"?t:F,dt(n,5,t)},On.cloneWith=function(n,t){return t=typeof t=="function"?t:F,dt(n,4,t)},\nOn.conformsTo=function(n,t){return null==t||bt(n,t,Lu(t))},On.deburr=Tu,On.defaultTo=function(n,t){return null==n||n!==n?t:n},On.divide=rc,On.endsWith=function(n,t,r){n=zu(n),t=jr(t);var e=n.length,e=r=r===F?e:gt(Ou(r),0,e);return r-=t.length,0<=r&&n.slice(r,e)==t},On.eq=hu,On.escape=function(n){return(n=zu(n))&&Y.test(n)?n.replace(H,et):n},On.escapeRegExp=function(n){return(n=zu(n))&&fn.test(n)?n.replace(on,"\\\\$&"):n},On.every=function(n,t,r){var e=af(n)?o:wt;return r&&ze(n,t,r)&&(t=F),e(n,je(t,3));\n},On.find=Po,On.findIndex=Ze,On.findKey=function(n,t){return v(n,je(t,3),Et)},On.findLast=Zo,On.findLastIndex=qe,On.findLastKey=function(n,t){return v(n,je(t,3),Ot)},On.floor=ec,On.forEach=ru,On.forEachRight=eu,On.forIn=function(n,t){return null==n?n:co(n,je(t,3),Uu)},On.forInRight=function(n,t){return null==n?n:ao(n,je(t,3),Uu)},On.forOwn=function(n,t){return n&&Et(n,je(t,3))},On.forOwnRight=function(n,t){return n&&Ot(n,je(t,3))},On.get=Wu,On.gt=of,On.gte=ff,On.has=function(n,t){return null!=n&&ke(n,t,Bt);\n},On.hasIn=Bu,On.head=Ke,On.identity=Nu,On.includes=function(n,t,r,e){return n=pu(n)?n:Du(n),r=r&&!e?Ou(r):0,e=n.length,0>r&&(r=Di(e+r,0)),mu(n)?r<=e&&-1<n.indexOf(t,r):!!e&&-1<d(n,t,r)},On.indexOf=function(n,t,r){var e=null==n?0:n.length;return e?(r=null==r?0:Ou(r),0>r&&(r=Di(e+r,0)),d(n,t,r)):-1},On.inRange=function(n,t,r){return t=Eu(t),r===F?(r=t,t=0):r=Eu(r),n=Iu(n),n>=Mi(t,r)&&n<Di(t,r)},On.invoke=Sf,On.isArguments=cf,On.isArray=af,On.isArrayBuffer=lf,On.isArrayLike=pu,On.isArrayLikeObject=_u,\nOn.isBoolean=function(n){return true===n||false===n||xu(n)&&"[object Boolean]"==zt(n)},On.isBuffer=sf,On.isDate=hf,On.isElement=function(n){return xu(n)&&1===n.nodeType&&!wu(n)},On.isEmpty=function(n){if(null==n)return true;if(pu(n)&&(af(n)||typeof n=="string"||typeof n.splice=="function"||sf(n)||gf(n)||cf(n)))return!n.length;var t=yo(n);if("[object Map]"==t||"[object Set]"==t)return!n.size;if(Le(n))return!Ht(n).length;for(var r in n)if(ci.call(n,r))return false;return true},On.isEqual=function(n,t){return Ft(n,t);\n},On.isEqualWith=function(n,t,r){var e=(r=typeof r=="function"?r:F)?r(n,t):F;return e===F?Ft(n,t,F,r):!!e},On.isError=vu,On.isFinite=function(n){return typeof n=="number"&&Li(n)},On.isFunction=gu,On.isInteger=du,On.isLength=yu,On.isMap=pf,On.isMatch=function(n,t){return n===t||Pt(n,t,me(t))},On.isMatchWith=function(n,t,r){return r=typeof r=="function"?r:F,Pt(n,t,me(t),r)},On.isNaN=function(n){return ju(n)&&n!=+n},On.isNative=function(n){if(bo(n))throw new Yu("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");\nreturn Zt(n)},On.isNil=function(n){return null==n},On.isNull=function(n){return null===n},On.isNumber=ju,On.isObject=bu,On.isObjectLike=xu,On.isPlainObject=wu,On.isRegExp=_f,On.isSafeInteger=function(n){return du(n)&&-9007199254740991<=n&&9007199254740991>=n},On.isSet=vf,On.isString=mu,On.isSymbol=Au,On.isTypedArray=gf,On.isUndefined=function(n){return n===F},On.isWeakMap=function(n){return xu(n)&&"[object WeakMap]"==yo(n)},On.isWeakSet=function(n){return xu(n)&&"[object WeakSet]"==zt(n)},On.join=function(n,t){\nreturn null==n?"":Ui.call(n,t)},On.kebabCase=Cf,On.last=Ge,On.lastIndexOf=function(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=e;if(r!==F&&(u=Ou(r),u=0>u?Di(e+u,0):Mi(u,e-1)),t===t){for(r=u+1;r--&&n[r]!==t;);n=r}else n=g(n,b,u,true);return n},On.lowerCase=Df,On.lowerFirst=Mf,On.lt=df,On.lte=yf,On.max=function(n){return n&&n.length?mt(n,Nu,Wt):F},On.maxBy=function(n,t){return n&&n.length?mt(n,je(t,2),Wt):F},On.mean=function(n){return x(n,Nu)},On.meanBy=function(n,t){return x(n,je(t,2))},On.min=function(n){\nreturn n&&n.length?mt(n,Nu,Jt):F},On.minBy=function(n,t){return n&&n.length?mt(n,je(t,2),Jt):F},On.stubArray=Ku,On.stubFalse=Gu,On.stubObject=function(){return{}},On.stubString=function(){return""},On.stubTrue=function(){return true},On.multiply=uc,On.nth=function(n,t){return n&&n.length?tr(n,Ou(t)):F},On.noConflict=function(){return Zn._===this&&(Zn._=pi),this},On.noop=qu,On.now=Jo,On.pad=function(n,t,r){n=zu(n);var e=(t=Ou(t))?T(n):0;return!t||e>=t?n:(t=(t-e)/2,ee(zi(t),r)+n+ee(Ri(t),r))},On.padEnd=function(n,t,r){\nn=zu(n);var e=(t=Ou(t))?T(n):0;return t&&e<t?n+ee(t-e,r):n},On.padStart=function(n,t,r){n=zu(n);var e=(t=Ou(t))?T(n):0;return t&&e<t?ee(t-e,r)+n:n},On.parseInt=function(n,t,r){return r||null==t?t=0:t&&(t=+t),$i(zu(n).replace(an,""),t||0)},On.random=function(n,t,r){if(r&&typeof r!="boolean"&&ze(n,t,r)&&(t=r=F),r===F&&(typeof t=="boolean"?(r=t,t=F):typeof n=="boolean"&&(r=n,n=F)),n===F&&t===F?(n=0,t=1):(n=Eu(n),t===F?(t=n,n=0):t=Eu(t)),n>t){var e=n;n=t,t=e}return r||n%1||t%1?(r=Fi(),Mi(n+r*(t-n+$n("1e-"+((r+"").length-1))),t)):cr(n,t);\n},On.reduce=function(n,t,r){var e=af(n)?h:m,u=3>arguments.length;return e(n,je(t,4),r,u,oo)},On.reduceRight=function(n,t,r){var e=af(n)?p:m,u=3>arguments.length;return e(n,je(t,4),r,u,fo)},On.repeat=function(n,t,r){return t=(r?ze(n,t,r):t===F)?1:Ou(t),ar(zu(n),t)},On.replace=function(){var n=arguments,t=zu(n[0]);return 3>n.length?t:t.replace(n[1],n[2])},On.result=function(n,t,r){t=Rr(t,n);var e=-1,u=t.length;for(u||(u=1,n=F);++e<u;){var i=null==n?F:n[$e(t[e])];i===F&&(e=u,i=r),n=gu(i)?i.call(n):i;\n}return n},On.round=ic,On.runInContext=w,On.sample=function(n){return(af(n)?tt:sr)(n)},On.size=function(n){if(null==n)return 0;if(pu(n))return mu(n)?T(n):n.length;var t=yo(n);return"[object Map]"==t||"[object Set]"==t?n.size:Ht(n).length},On.snakeCase=Tf,On.some=function(n,t,r){var e=af(n)?_:gr;return r&&ze(n,t,r)&&(t=F),e(n,je(t,3))},On.sortedIndex=function(n,t){return dr(n,t)},On.sortedIndexBy=function(n,t,r){return yr(n,t,je(r,2))},On.sortedIndexOf=function(n,t){var r=null==n?0:n.length;if(r){\nvar e=dr(n,t);if(e<r&&hu(n[e],t))return e}return-1},On.sortedLastIndex=function(n,t){return dr(n,t,true)},On.sortedLastIndexBy=function(n,t,r){return yr(n,t,je(r,2),true)},On.sortedLastIndexOf=function(n,t){if(null==n?0:n.length){var r=dr(n,t,true)-1;if(hu(n[r],t))return r}return-1},On.startCase=$f,On.startsWith=function(n,t,r){return n=zu(n),r=null==r?0:gt(Ou(r),0,n.length),t=jr(t),n.slice(r,r+t.length)==t},On.subtract=oc,On.sum=function(n){return n&&n.length?k(n,Nu):0},On.sumBy=function(n,t){return n&&n.length?k(n,je(t,2)):0;\n},On.template=function(n,t,r){var e=On.templateSettings;r&&ze(n,t,r)&&(t=F),n=zu(n),t=jf({},t,e,se),r=jf({},t.imports,e.imports,se);var u,i,o=Lu(r),f=I(r,o),c=0;r=t.interpolate||An;var a="__p+=\'";r=ti((t.escape||An).source+"|"+r.source+"|"+(r===nn?gn:An).source+"|"+(t.evaluate||An).source+"|$","g");var l="sourceURL"in t?"//# sourceURL="+t.sourceURL+"\\n":"";if(n.replace(r,function(t,r,e,o,f,l){return e||(e=o),a+=n.slice(c,l).replace(kn,B),r&&(u=true,a+="\'+__e("+r+")+\'"),f&&(i=true,a+="\';"+f+";\\n__p+=\'"),\ne&&(a+="\'+((__t=("+e+"))==null?\'\':__t)+\'"),c=l+t.length,t}),a+="\';",(t=t.variable)||(a="with(obj){"+a+"}"),a=(i?a.replace(q,""):a).replace(V,"$1").replace(K,"$1;"),a="function("+(t||"obj")+"){"+(t?"":"obj||(obj={});")+"var __t,__p=\'\'"+(u?",__e=_.escape":"")+(i?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,\'\')}":";")+a+"return __p}",t=Pf(function(){return Qu(o,l+"return "+a).apply(F,f)}),t.source=a,vu(t))throw t;return t},On.times=function(n,t){if(n=Ou(n),1>n||9007199254740991<n)return[];\nvar r=4294967295,e=Mi(n,4294967295);for(t=je(t),n-=4294967295,e=E(e,t);++r<n;)t(r);return e},On.toFinite=Eu,On.toInteger=Ou,On.toLength=Su,On.toLower=function(n){return zu(n).toLowerCase()},On.toNumber=Iu,On.toSafeInteger=function(n){return n?gt(Ou(n),-9007199254740991,9007199254740991):0===n?n:0},On.toString=zu,On.toUpper=function(n){return zu(n).toUpperCase()},On.trim=function(n,t,r){return(n=zu(n))&&(r||t===F)?n.replace(cn,""):n&&(t=jr(t))?(n=$(n),r=$(t),t=z(n,r),r=W(n,r)+1,zr(n,t,r).join("")):n;\n},On.trimEnd=function(n,t,r){return(n=zu(n))&&(r||t===F)?n.replace(ln,""):n&&(t=jr(t))?(n=$(n),t=W(n,$(t))+1,zr(n,0,t).join("")):n},On.trimStart=function(n,t,r){return(n=zu(n))&&(r||t===F)?n.replace(an,""):n&&(t=jr(t))?(n=$(n),t=z(n,$(t)),zr(n,t).join("")):n},On.truncate=function(n,t){var r=30,e="...";if(bu(t))var u="separator"in t?t.separator:u,r="length"in t?Ou(t.length):r,e="omission"in t?jr(t.omission):e;n=zu(n);var i=n.length;if(Bn.test(n))var o=$(n),i=o.length;if(r>=i)return n;if(i=r-T(e),1>i)return e;\nif(r=o?zr(o,0,i).join(""):n.slice(0,i),u===F)return r+e;if(o&&(i+=r.length-i),_f(u)){if(n.slice(i).search(u)){var f=r;for(u.global||(u=ti(u.source,zu(dn.exec(u))+"g")),u.lastIndex=0;o=u.exec(f);)var c=o.index;r=r.slice(0,c===F?i:c)}}else n.indexOf(jr(u),i)!=i&&(u=r.lastIndexOf(u),-1<u&&(r=r.slice(0,u)));return r+e},On.unescape=function(n){return(n=zu(n))&&J.test(n)?n.replace(G,ut):n},On.uniqueId=function(n){var t=++ai;return zu(n)+t},On.upperCase=Ff,On.upperFirst=Nf,On.each=ru,On.eachRight=eu,On.first=Ke,\nZu(On,function(){var n={};return Et(On,function(t,r){ci.call(On.prototype,r)||(n[r]=t)}),n}(),{chain:false}),On.VERSION="4.17.4",u("bind bindKey curry curryRight partial partialRight".split(" "),function(n){On[n].placeholder=On}),u(["drop","take"],function(n,t){Mn.prototype[n]=function(r){r=r===F?1:Di(Ou(r),0);var e=this.__filtered__&&!t?new Mn(this):this.clone();return e.__filtered__?e.__takeCount__=Mi(r,e.__takeCount__):e.__views__.push({size:Mi(r,4294967295),type:n+(0>e.__dir__?"Right":"")}),e},Mn.prototype[n+"Right"]=function(t){\nreturn this.reverse()[n](t).reverse()}}),u(["filter","map","takeWhile"],function(n,t){var r=t+1,e=1==r||3==r;Mn.prototype[n]=function(n){var t=this.clone();return t.__iteratees__.push({iteratee:je(n,3),type:r}),t.__filtered__=t.__filtered__||e,t}}),u(["head","last"],function(n,t){var r="take"+(t?"Right":"");Mn.prototype[n]=function(){return this[r](1).value()[0]}}),u(["initial","tail"],function(n,t){var r="drop"+(t?"":"Right");Mn.prototype[n]=function(){return this.__filtered__?new Mn(this):this[r](1);\n}}),Mn.prototype.compact=function(){return this.filter(Nu)},Mn.prototype.find=function(n){return this.filter(n).head()},Mn.prototype.findLast=function(n){return this.reverse().find(n)},Mn.prototype.invokeMap=lr(function(n,t){return typeof n=="function"?new Mn(this):this.map(function(r){return Dt(r,n,t)})}),Mn.prototype.reject=function(n){return this.filter(su(je(n)))},Mn.prototype.slice=function(n,t){n=Ou(n);var r=this;return r.__filtered__&&(0<n||0>t)?new Mn(r):(0>n?r=r.takeRight(-n):n&&(r=r.drop(n)),\nt!==F&&(t=Ou(t),r=0>t?r.dropRight(-t):r.take(t-n)),r)},Mn.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},Mn.prototype.toArray=function(){return this.take(4294967295)},Et(Mn.prototype,function(n,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),e=/^(?:head|last)$/.test(t),u=On[e?"take"+("last"==t?"Right":""):t],i=e||/^find/.test(t);u&&(On.prototype[t]=function(){function t(n){return n=u.apply(On,s([n],f)),e&&h?n[0]:n}var o=this.__wrapped__,f=e?[1]:arguments,c=o instanceof Mn,a=f[0],l=c||af(o);\nl&&r&&typeof a=="function"&&1!=a.length&&(c=l=false);var h=this.__chain__,p=!!this.__actions__.length,a=i&&!h,c=c&&!p;return!i&&l?(o=c?o:new Mn(this),o=n.apply(o,f),o.__actions__.push({func:nu,args:[t],thisArg:F}),new zn(o,h)):a&&c?n.apply(this,f):(o=this.thru(t),a?e?o.value()[0]:o.value():o)})}),u("pop push shift sort splice unshift".split(" "),function(n){var t=ui[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|shift)$/.test(n);On.prototype[n]=function(){var n=arguments;if(e&&!this.__chain__){\nvar u=this.value();return t.apply(af(u)?u:[],n)}return this[r](function(r){return t.apply(af(r)?r:[],n)})}}),Et(Mn.prototype,function(n,t){var r=On[t];if(r){var e=r.name+"";(Ji[e]||(Ji[e]=[])).push({name:t,func:r})}}),Ji[Xr(F,2).name]=[{name:"wrapper",func:F}],Mn.prototype.clone=function(){var n=new Mn(this.__wrapped__);return n.__actions__=Mr(this.__actions__),n.__dir__=this.__dir__,n.__filtered__=this.__filtered__,n.__iteratees__=Mr(this.__iteratees__),n.__takeCount__=this.__takeCount__,n.__views__=Mr(this.__views__),\nn},Mn.prototype.reverse=function(){if(this.__filtered__){var n=new Mn(this);n.__dir__=-1,n.__filtered__=true}else n=this.clone(),n.__dir__*=-1;return n},Mn.prototype.value=function(){var n,t=this.__wrapped__.value(),r=this.__dir__,e=af(t),u=0>r,i=e?t.length:0;n=i;for(var o=this.__views__,f=0,c=-1,a=o.length;++c<a;){var l=o[c],s=l.size;switch(l.type){case"drop":f+=s;break;case"dropRight":n-=s;break;case"take":n=Mi(n,f+s);break;case"takeRight":f=Di(f,n-s)}}if(n={start:f,end:n},o=n.start,f=n.end,n=f-o,\no=u?f:o-1,f=this.__iteratees__,c=f.length,a=0,l=Mi(n,this.__takeCount__),!e||!u&&i==n&&l==n)return kr(t,this.__actions__);e=[];n:for(;n--&&a<l;){for(o+=r,u=-1,i=t[o];++u<c;){var h=f[u],s=h.type,h=(0,h.iteratee)(i);if(2==s)i=h;else if(!h){if(1==s)continue n;break n}}e[a++]=i}return e},On.prototype.at=Fo,On.prototype.chain=function(){return Xe(this)},On.prototype.commit=function(){return new zn(this.value(),this.__chain__)},On.prototype.next=function(){this.__values__===F&&(this.__values__=ku(this.value()));\nvar n=this.__index__>=this.__values__.length;return{done:n,value:n?F:this.__values__[this.__index__++]}},On.prototype.plant=function(n){for(var t,r=this;r instanceof Sn;){var e=Pe(r);e.__index__=0,e.__values__=F,t?u.__wrapped__=e:t=e;var u=e,r=r.__wrapped__}return u.__wrapped__=n,t},On.prototype.reverse=function(){var n=this.__wrapped__;return n instanceof Mn?(this.__actions__.length&&(n=new Mn(this)),n=n.reverse(),n.__actions__.push({func:nu,args:[Je],thisArg:F}),new zn(n,this.__chain__)):this.thru(Je);\n},On.prototype.toJSON=On.prototype.valueOf=On.prototype.value=function(){return kr(this.__wrapped__,this.__actions__)},On.prototype.first=On.prototype.head,Ai&&(On.prototype[Ai]=tu),On}();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Zn._=it, define(function(){return it})):Vn?((Vn.exports=it)._=it,qn._=it):Zn._=it}).call(this);\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/lodash.min.js\n// module id = 1203\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/lodash/lodash.min.js?', + ); + + /***/ + }, + /* 1204 */ + /* unknown exports provided */ + /* all exports used */ + /*!**************************!*\ + !*** ./~/lodash/noop.js ***! + \**************************/ + /***/ function (module, exports) { + eval( + '/**\n * This method returns `undefined`.\n *\n * @static\n * @memberOf _\n * @since 2.3.0\n * @category Util\n * @example\n *\n * _.times(2, _.noop);\n * // => [undefined, undefined]\n */\nfunction noop() {\n // No operation performed.\n}\n\nmodule.exports = noop;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/noop.js\n// module id = 1204\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/lodash/noop.js?', + ); + + /***/ + }, + /* 1205 */ + /* unknown exports provided */ + /* all exports used */ + /*!******************************!*\ + !*** ./~/lodash/toFinite.js ***! + \******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "var toNumber = __webpack_require__(/*! ./toNumber */ 1207);\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0,\n MAX_INTEGER = 1.7976931348623157e+308;\n\n/**\n * Converts `value` to a finite number.\n *\n * @static\n * @memberOf _\n * @since 4.12.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted number.\n * @example\n *\n * _.toFinite(3.2);\n * // => 3.2\n *\n * _.toFinite(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toFinite(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toFinite('3.2');\n * // => 3.2\n */\nfunction toFinite(value) {\n if (!value) {\n return value === 0 ? value : 0;\n }\n value = toNumber(value);\n if (value === INFINITY || value === -INFINITY) {\n var sign = (value < 0 ? -1 : 1);\n return sign * MAX_INTEGER;\n }\n return value === value ? value : 0;\n}\n\nmodule.exports = toFinite;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/toFinite.js\n// module id = 1205\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/lodash/toFinite.js?", + ); + + /***/ + }, + /* 1206 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/lodash/toInteger.js ***! + \*******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "var toFinite = __webpack_require__(/*! ./toFinite */ 1205);\n\n/**\n * Converts `value` to an integer.\n *\n * **Note:** This method is loosely based on\n * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toInteger(3.2);\n * // => 3\n *\n * _.toInteger(Number.MIN_VALUE);\n * // => 0\n *\n * _.toInteger(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toInteger('3.2');\n * // => 3\n */\nfunction toInteger(value) {\n var result = toFinite(value),\n remainder = result % 1;\n\n return result === result ? (remainder ? result - remainder : result) : 0;\n}\n\nmodule.exports = toInteger;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/toInteger.js\n// module id = 1206\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/lodash/toInteger.js?", + ); + + /***/ + }, + /* 1207 */ + /* unknown exports provided */ + /* all exports used */ + /*!******************************!*\ + !*** ./~/lodash/toNumber.js ***! + \******************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "var isObject = __webpack_require__(/*! ./isObject */ 116),\n isSymbol = __webpack_require__(/*! ./isSymbol */ 370);\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to match leading and trailing whitespace. */\nvar reTrim = /^\\s+|\\s+$/g;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = value.replace(reTrim, '');\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = toNumber;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/toNumber.js\n// module id = 1207\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/lodash/toNumber.js?", + ); + + /***/ + }, + /* 1208 */ + /* unknown exports provided */ + /* all exports used */ + /*!***********************************!*\ + !*** ./~/lodash/wrapperLodash.js ***! + \***********************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "var LazyWrapper = __webpack_require__(/*! ./_LazyWrapper */ 221),\n LodashWrapper = __webpack_require__(/*! ./_LodashWrapper */ 353),\n baseLodash = __webpack_require__(/*! ./_baseLodash */ 226),\n isArray = __webpack_require__(/*! ./isArray */ 369),\n isObjectLike = __webpack_require__(/*! ./isObjectLike */ 163),\n wrapperClone = __webpack_require__(/*! ./_wrapperClone */ 1192);\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates a `lodash` object which wraps `value` to enable implicit method\n * chain sequences. Methods that operate on and return arrays, collections,\n * and functions can be chained together. Methods that retrieve a single value\n * or may return a primitive value will automatically end the chain sequence\n * and return the unwrapped value. Otherwise, the value must be unwrapped\n * with `_#value`.\n *\n * Explicit chain sequences, which must be unwrapped with `_#value`, may be\n * enabled using `_.chain`.\n *\n * The execution of chained methods is lazy, that is, it's deferred until\n * `_#value` is implicitly or explicitly called.\n *\n * Lazy evaluation allows several methods to support shortcut fusion.\n * Shortcut fusion is an optimization to merge iteratee calls; this avoids\n * the creation of intermediate arrays and can greatly reduce the number of\n * iteratee executions. Sections of a chain sequence qualify for shortcut\n * fusion if the section is applied to an array and iteratees accept only\n * one argument. The heuristic for whether a section qualifies for shortcut\n * fusion is subject to change.\n *\n * Chaining is supported in custom builds as long as the `_#value` method is\n * directly or indirectly included in the build.\n *\n * In addition to lodash methods, wrappers have `Array` and `String` methods.\n *\n * The wrapper `Array` methods are:\n * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`\n *\n * The wrapper `String` methods are:\n * `replace` and `split`\n *\n * The wrapper methods that support shortcut fusion are:\n * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,\n * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,\n * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`\n *\n * The chainable wrapper methods are:\n * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,\n * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,\n * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,\n * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,\n * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,\n * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,\n * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,\n * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,\n * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,\n * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,\n * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,\n * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,\n * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,\n * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,\n * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,\n * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,\n * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,\n * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,\n * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,\n * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,\n * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,\n * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,\n * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,\n * `zipObject`, `zipObjectDeep`, and `zipWith`\n *\n * The wrapper methods that are **not** chainable by default are:\n * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,\n * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`,\n * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`,\n * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,\n * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`,\n * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,\n * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,\n * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`,\n * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`,\n * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`,\n * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,\n * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,\n * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`,\n * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`,\n * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,\n * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`,\n * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,\n * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,\n * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,\n * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`,\n * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`,\n * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,\n * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`,\n * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`,\n * `upperFirst`, `value`, and `words`\n *\n * @name _\n * @constructor\n * @category Seq\n * @param {*} value The value to wrap in a `lodash` instance.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * var wrapped = _([1, 2, 3]);\n *\n * // Returns an unwrapped value.\n * wrapped.reduce(_.add);\n * // => 6\n *\n * // Returns a wrapped value.\n * var squares = wrapped.map(square);\n *\n * _.isArray(squares);\n * // => false\n *\n * _.isArray(squares.value());\n * // => true\n */\nfunction lodash(value) {\n if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {\n if (value instanceof LodashWrapper) {\n return value;\n }\n if (hasOwnProperty.call(value, '__wrapped__')) {\n return wrapperClone(value);\n }\n }\n return new LodashWrapper(value);\n}\n\n// Ensure wrappers are instances of `baseLodash`.\nlodash.prototype = baseLodash.prototype;\nlodash.prototype.constructor = lodash;\n\nmodule.exports = lodash;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/wrapperLodash.js\n// module id = 1208\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/lodash/wrapperLodash.js?", + ); + + /***/ + }, + /* 1209 */ + /* unknown exports provided */ + /* exports used: default */ + /*!***********************************************!*\ + !*** ./~/mirror-creator/lib/mirrorCreator.js ***! + \***********************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nexports.__esModule = true;\n\nexports['default'] = function (items) {\n var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];\n\n if (!Array.isArray(items)) {\n throw new Error('mirrorCreator(...): argument must be an array.');\n }\n\n var prefix = options.prefix;\n\n var container = {};\n items.forEach(function (item) {\n return container[item] = '' + (prefix || '') + item;\n });\n return container;\n};\n\nmodule.exports = exports['default'];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/mirror-creator/lib/mirrorCreator.js\n// module id = 1209\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/mirror-creator/lib/mirrorCreator.js?", + ); + + /***/ + }, + /* 1210 */ + /* unknown exports provided */ + /* all exports used */ + /*!**********************************!*\ + !*** ./~/moment/locale ^\.\/.*$ ***! + \**********************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + 'var map = {\n\t"./af": 371,\n\t"./af.js": 371,\n\t"./ar": 378,\n\t"./ar-dz": 372,\n\t"./ar-dz.js": 372,\n\t"./ar-kw": 373,\n\t"./ar-kw.js": 373,\n\t"./ar-ly": 374,\n\t"./ar-ly.js": 374,\n\t"./ar-ma": 375,\n\t"./ar-ma.js": 375,\n\t"./ar-sa": 376,\n\t"./ar-sa.js": 376,\n\t"./ar-tn": 377,\n\t"./ar-tn.js": 377,\n\t"./ar.js": 378,\n\t"./az": 379,\n\t"./az.js": 379,\n\t"./be": 380,\n\t"./be.js": 380,\n\t"./bg": 381,\n\t"./bg.js": 381,\n\t"./bn": 382,\n\t"./bn.js": 382,\n\t"./bo": 383,\n\t"./bo.js": 383,\n\t"./br": 384,\n\t"./br.js": 384,\n\t"./bs": 385,\n\t"./bs.js": 385,\n\t"./ca": 386,\n\t"./ca.js": 386,\n\t"./cs": 387,\n\t"./cs.js": 387,\n\t"./cv": 388,\n\t"./cv.js": 388,\n\t"./cy": 389,\n\t"./cy.js": 389,\n\t"./da": 390,\n\t"./da.js": 390,\n\t"./de": 393,\n\t"./de-at": 391,\n\t"./de-at.js": 391,\n\t"./de-ch": 392,\n\t"./de-ch.js": 392,\n\t"./de.js": 393,\n\t"./dv": 394,\n\t"./dv.js": 394,\n\t"./el": 395,\n\t"./el.js": 395,\n\t"./en-au": 396,\n\t"./en-au.js": 396,\n\t"./en-ca": 397,\n\t"./en-ca.js": 397,\n\t"./en-gb": 398,\n\t"./en-gb.js": 398,\n\t"./en-ie": 399,\n\t"./en-ie.js": 399,\n\t"./en-nz": 400,\n\t"./en-nz.js": 400,\n\t"./eo": 401,\n\t"./eo.js": 401,\n\t"./es": 403,\n\t"./es-do": 402,\n\t"./es-do.js": 402,\n\t"./es.js": 403,\n\t"./et": 404,\n\t"./et.js": 404,\n\t"./eu": 405,\n\t"./eu.js": 405,\n\t"./fa": 406,\n\t"./fa.js": 406,\n\t"./fi": 407,\n\t"./fi.js": 407,\n\t"./fo": 408,\n\t"./fo.js": 408,\n\t"./fr": 411,\n\t"./fr-ca": 409,\n\t"./fr-ca.js": 409,\n\t"./fr-ch": 410,\n\t"./fr-ch.js": 410,\n\t"./fr.js": 411,\n\t"./fy": 412,\n\t"./fy.js": 412,\n\t"./gd": 413,\n\t"./gd.js": 413,\n\t"./gl": 414,\n\t"./gl.js": 414,\n\t"./gom-latn": 415,\n\t"./gom-latn.js": 415,\n\t"./he": 416,\n\t"./he.js": 416,\n\t"./hi": 417,\n\t"./hi.js": 417,\n\t"./hr": 418,\n\t"./hr.js": 418,\n\t"./hu": 419,\n\t"./hu.js": 419,\n\t"./hy-am": 420,\n\t"./hy-am.js": 420,\n\t"./id": 421,\n\t"./id.js": 421,\n\t"./is": 422,\n\t"./is.js": 422,\n\t"./it": 423,\n\t"./it.js": 423,\n\t"./ja": 424,\n\t"./ja.js": 424,\n\t"./jv": 425,\n\t"./jv.js": 425,\n\t"./ka": 426,\n\t"./ka.js": 426,\n\t"./kk": 427,\n\t"./kk.js": 427,\n\t"./km": 428,\n\t"./km.js": 428,\n\t"./kn": 429,\n\t"./kn.js": 429,\n\t"./ko": 430,\n\t"./ko.js": 430,\n\t"./ky": 431,\n\t"./ky.js": 431,\n\t"./lb": 432,\n\t"./lb.js": 432,\n\t"./lo": 433,\n\t"./lo.js": 433,\n\t"./lt": 434,\n\t"./lt.js": 434,\n\t"./lv": 435,\n\t"./lv.js": 435,\n\t"./me": 436,\n\t"./me.js": 436,\n\t"./mi": 437,\n\t"./mi.js": 437,\n\t"./mk": 438,\n\t"./mk.js": 438,\n\t"./ml": 439,\n\t"./ml.js": 439,\n\t"./mr": 440,\n\t"./mr.js": 440,\n\t"./ms": 442,\n\t"./ms-my": 441,\n\t"./ms-my.js": 441,\n\t"./ms.js": 442,\n\t"./my": 443,\n\t"./my.js": 443,\n\t"./nb": 444,\n\t"./nb.js": 444,\n\t"./ne": 445,\n\t"./ne.js": 445,\n\t"./nl": 447,\n\t"./nl-be": 446,\n\t"./nl-be.js": 446,\n\t"./nl.js": 447,\n\t"./nn": 448,\n\t"./nn.js": 448,\n\t"./pa-in": 449,\n\t"./pa-in.js": 449,\n\t"./pl": 450,\n\t"./pl.js": 450,\n\t"./pt": 452,\n\t"./pt-br": 451,\n\t"./pt-br.js": 451,\n\t"./pt.js": 452,\n\t"./ro": 453,\n\t"./ro.js": 453,\n\t"./ru": 454,\n\t"./ru.js": 454,\n\t"./sd": 455,\n\t"./sd.js": 455,\n\t"./se": 456,\n\t"./se.js": 456,\n\t"./si": 457,\n\t"./si.js": 457,\n\t"./sk": 458,\n\t"./sk.js": 458,\n\t"./sl": 459,\n\t"./sl.js": 459,\n\t"./sq": 460,\n\t"./sq.js": 460,\n\t"./sr": 462,\n\t"./sr-cyrl": 461,\n\t"./sr-cyrl.js": 461,\n\t"./sr.js": 462,\n\t"./ss": 463,\n\t"./ss.js": 463,\n\t"./sv": 464,\n\t"./sv.js": 464,\n\t"./sw": 465,\n\t"./sw.js": 465,\n\t"./ta": 466,\n\t"./ta.js": 466,\n\t"./te": 467,\n\t"./te.js": 467,\n\t"./tet": 468,\n\t"./tet.js": 468,\n\t"./th": 469,\n\t"./th.js": 469,\n\t"./tl-ph": 470,\n\t"./tl-ph.js": 470,\n\t"./tlh": 471,\n\t"./tlh.js": 471,\n\t"./tr": 472,\n\t"./tr.js": 472,\n\t"./tzl": 473,\n\t"./tzl.js": 473,\n\t"./tzm": 475,\n\t"./tzm-latn": 474,\n\t"./tzm-latn.js": 474,\n\t"./tzm.js": 475,\n\t"./uk": 476,\n\t"./uk.js": 476,\n\t"./ur": 477,\n\t"./ur.js": 477,\n\t"./uz": 479,\n\t"./uz-latn": 478,\n\t"./uz-latn.js": 478,\n\t"./uz.js": 479,\n\t"./vi": 480,\n\t"./vi.js": 480,\n\t"./x-pseudo": 481,\n\t"./x-pseudo.js": 481,\n\t"./yo": 482,\n\t"./yo.js": 482,\n\t"./zh-cn": 483,\n\t"./zh-cn.js": 483,\n\t"./zh-hk": 484,\n\t"./zh-hk.js": 484,\n\t"./zh-tw": 485,\n\t"./zh-tw.js": 485\n};\nfunction webpackContext(req) {\n\treturn __webpack_require__(webpackContextResolve(req));\n};\nfunction webpackContextResolve(req) {\n\tvar id = map[req];\n\tif(!(id + 1)) // check for number or string\n\t\tthrow new Error("Cannot find module \'" + req + "\'.");\n\treturn id;\n};\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 1210;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale ^\\.\\/.*$\n// module id = 1210\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/moment/locale_^\\.\\/.*$?', + ); + + /***/ + }, + /* 1211 */ + /* unknown exports provided */ + /* all exports used */ + /*!***********************************************!*\ + !*** ./~/normalizr/dist/src/schemas/Array.js ***! + \***********************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.denormalize = exports.normalize = undefined;\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _Polymorphic = __webpack_require__(/*! ./Polymorphic */ 232);\n\nvar _Polymorphic2 = _interopRequireDefault(_Polymorphic);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar validateSchema = function validateSchema(definition) {\n var isArray = Array.isArray(definition);\n if (isArray && definition.length > 1) {\n throw new Error(\'Expected schema definition to be a single schema, but found \' + definition.length + \'.\');\n }\n\n return definition[0];\n};\n\nvar getValues = function getValues(input) {\n return Array.isArray(input) ? input : Object.keys(input).map(function (key) {\n return input[key];\n });\n};\n\nvar normalize = exports.normalize = function normalize(schema, input, parent, key, visit, addEntity) {\n schema = validateSchema(schema);\n\n var values = getValues(input);\n\n // Special case: Arrays pass *their* parent on to their children, since there\n // is not any special information that can be gathered from themselves directly\n return values.map(function (value, index) {\n return visit(value, parent, key, schema, addEntity);\n });\n};\n\nvar denormalize = exports.denormalize = function denormalize(schema, input, unvisit) {\n schema = validateSchema(schema);\n return input && input.map ? input.map(function (entityOrId) {\n return unvisit(entityOrId, schema);\n }) : input;\n};\n\nvar ArraySchema = function (_PolymorphicSchema) {\n _inherits(ArraySchema, _PolymorphicSchema);\n\n function ArraySchema() {\n _classCallCheck(this, ArraySchema);\n\n return _possibleConstructorReturn(this, (ArraySchema.__proto__ || Object.getPrototypeOf(ArraySchema)).apply(this, arguments));\n }\n\n _createClass(ArraySchema, [{\n key: \'normalize\',\n value: function normalize(input, parent, key, visit, addEntity) {\n var _this2 = this;\n\n var values = getValues(input);\n\n return values.map(function (value, index) {\n return _this2.normalizeValue(value, parent, key, visit, addEntity);\n }).filter(function (value) {\n return value !== undefined && value !== null;\n });\n }\n }, {\n key: \'denormalize\',\n value: function denormalize(input, unvisit) {\n var _this3 = this;\n\n return input && input.map ? input.map(function (value) {\n return _this3.denormalizeValue(value, unvisit);\n }) : input;\n }\n }]);\n\n return ArraySchema;\n}(_Polymorphic2.default);\n\nexports.default = ArraySchema;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/normalizr/dist/src/schemas/Array.js\n// module id = 1211\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/normalizr/dist/src/schemas/Array.js?', + ); + + /***/ + }, + /* 1212 */ + /* unknown exports provided */ + /* all exports used */ + /*!************************************************!*\ + !*** ./~/normalizr/dist/src/schemas/Entity.js ***! + \************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _ImmutableUtils = __webpack_require__(/*! ./ImmutableUtils */ 231);\n\nvar ImmutableUtils = _interopRequireWildcard(_ImmutableUtils);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _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\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar getDefaultGetId = function getDefaultGetId(idAttribute) {\n return function (input) {\n return ImmutableUtils.isImmutable(input) ? input.get(idAttribute) : input[idAttribute];\n };\n};\n\nvar EntitySchema = function () {\n function EntitySchema(key) {\n var definition = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\n _classCallCheck(this, EntitySchema);\n\n if (!key || typeof key !== 'string') {\n throw new Error('Expected a string key for Entity, but found ' + key + '.');\n }\n\n var _options$idAttribute = options.idAttribute,\n idAttribute = _options$idAttribute === undefined ? 'id' : _options$idAttribute,\n _options$mergeStrateg = options.mergeStrategy,\n mergeStrategy = _options$mergeStrateg === undefined ? function (entityA, entityB) {\n return _extends({}, entityA, entityB);\n } : _options$mergeStrateg,\n _options$processStrat = options.processStrategy,\n processStrategy = _options$processStrat === undefined ? function (input) {\n return _extends({}, input);\n } : _options$processStrat;\n\n\n this._key = key;\n this._getId = typeof idAttribute === 'function' ? idAttribute : getDefaultGetId(idAttribute);\n this._idAttribute = idAttribute;\n this._mergeStrategy = mergeStrategy;\n this._processStrategy = processStrategy;\n this.define(definition);\n }\n\n _createClass(EntitySchema, [{\n key: 'define',\n value: function define(definition) {\n this.schema = Object.keys(definition).reduce(function (entitySchema, key) {\n var schema = definition[key];\n return _extends({}, entitySchema, _defineProperty({}, key, schema));\n }, this.schema || {});\n }\n }, {\n key: 'getId',\n value: function getId(input, parent, key) {\n return this._getId(input, parent, key);\n }\n }, {\n key: 'merge',\n value: function merge(entityA, entityB) {\n return this._mergeStrategy(entityA, entityB);\n }\n }, {\n key: 'normalize',\n value: function normalize(input, parent, key, visit, addEntity) {\n var _this = this;\n\n var processedEntity = this._processStrategy(input, parent, key);\n Object.keys(this.schema).forEach(function (key) {\n if (processedEntity.hasOwnProperty(key) && _typeof(processedEntity[key]) === 'object') {\n var schema = _this.schema[key];\n processedEntity[key] = visit(processedEntity[key], processedEntity, key, schema, addEntity);\n }\n });\n\n addEntity(this, processedEntity, input, parent, key);\n return this.getId(input, parent, key);\n }\n }, {\n key: 'denormalize',\n value: function denormalize(entity, unvisit) {\n var _this2 = this;\n\n if (ImmutableUtils.isImmutable(entity)) {\n return ImmutableUtils.denormalizeImmutable(this.schema, entity, unvisit);\n }\n\n Object.keys(this.schema).forEach(function (key) {\n if (entity.hasOwnProperty(key)) {\n var schema = _this2.schema[key];\n entity[key] = unvisit(entity[key], schema);\n }\n });\n return entity;\n }\n }, {\n key: 'key',\n get: function get() {\n return this._key;\n }\n }, {\n key: 'idAttribute',\n get: function get() {\n return this._idAttribute;\n }\n }]);\n\n return EntitySchema;\n}();\n\nexports.default = EntitySchema;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/normalizr/dist/src/schemas/Entity.js\n// module id = 1212\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/normalizr/dist/src/schemas/Entity.js?", + ); + + /***/ + }, + /* 1213 */ + /* unknown exports provided */ + /* all exports used */ + /*!************************************************!*\ + !*** ./~/normalizr/dist/src/schemas/Object.js ***! + \************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.denormalize = exports.normalize = undefined;\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _ImmutableUtils = __webpack_require__(/*! ./ImmutableUtils */ 231);\n\nvar ImmutableUtils = _interopRequireWildcard(_ImmutableUtils);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _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\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nvar _normalize = function _normalize(schema, input, parent, key, visit, addEntity) {\n var object = _extends({}, input);\n Object.keys(schema).forEach(function (key) {\n var localSchema = schema[key];\n var value = visit(input[key], input, key, localSchema, addEntity);\n if (value === undefined || value === null) {\n delete object[key];\n } else {\n object[key] = value;\n }\n });\n return object;\n};\n\nexports.normalize = _normalize;\nvar _denormalize = function _denormalize(schema, input, unvisit) {\n if (ImmutableUtils.isImmutable(input)) {\n return ImmutableUtils.denormalizeImmutable(schema, input, unvisit);\n }\n\n var object = _extends({}, input);\n Object.keys(schema).forEach(function (key) {\n if (object[key]) {\n object[key] = unvisit(object[key], schema[key]);\n }\n });\n return object;\n};\n\nexports.denormalize = _denormalize;\n\nvar ObjectSchema = function () {\n function ObjectSchema(definition) {\n _classCallCheck(this, ObjectSchema);\n\n this.define(definition);\n }\n\n _createClass(ObjectSchema, [{\n key: \'define\',\n value: function define(definition) {\n this.schema = Object.keys(definition).reduce(function (entitySchema, key) {\n var schema = definition[key];\n return _extends({}, entitySchema, _defineProperty({}, key, schema));\n }, this.schema || {});\n }\n }, {\n key: \'normalize\',\n value: function normalize() {\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _normalize.apply(undefined, [this.schema].concat(args));\n }\n }, {\n key: \'denormalize\',\n value: function denormalize() {\n for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n return _denormalize.apply(undefined, [this.schema].concat(args));\n }\n }]);\n\n return ObjectSchema;\n}();\n\nexports.default = ObjectSchema;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/normalizr/dist/src/schemas/Object.js\n// module id = 1213\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/normalizr/dist/src/schemas/Object.js?', + ); + + /***/ + }, + /* 1214 */ + /* unknown exports provided */ + /* all exports used */ + /*!***********************************************!*\ + !*** ./~/normalizr/dist/src/schemas/Union.js ***! + \***********************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _Polymorphic = __webpack_require__(/*! ./Polymorphic */ 232);\n\nvar _Polymorphic2 = _interopRequireDefault(_Polymorphic);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar UnionSchema = function (_PolymorphicSchema) {\n _inherits(UnionSchema, _PolymorphicSchema);\n\n function UnionSchema(definition, schemaAttribute) {\n _classCallCheck(this, UnionSchema);\n\n if (!schemaAttribute) {\n throw new Error(\'Expected option "schemaAttribute" not found on UnionSchema.\');\n }\n return _possibleConstructorReturn(this, (UnionSchema.__proto__ || Object.getPrototypeOf(UnionSchema)).call(this, definition, schemaAttribute));\n }\n\n _createClass(UnionSchema, [{\n key: \'normalize\',\n value: function normalize(input, parent, key, visit, addEntity) {\n return this.normalizeValue(input, parent, key, visit, addEntity);\n }\n }, {\n key: \'denormalize\',\n value: function denormalize(input, unvisit) {\n return this.denormalizeValue(input, unvisit);\n }\n }]);\n\n return UnionSchema;\n}(_Polymorphic2.default);\n\nexports.default = UnionSchema;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/normalizr/dist/src/schemas/Union.js\n// module id = 1214\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/normalizr/dist/src/schemas/Union.js?', + ); + + /***/ + }, + /* 1215 */ + /* unknown exports provided */ + /* all exports used */ + /*!************************************************!*\ + !*** ./~/normalizr/dist/src/schemas/Values.js ***! + \************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _Polymorphic = __webpack_require__(/*! ./Polymorphic */ 232);\n\nvar _Polymorphic2 = _interopRequireDefault(_Polymorphic);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _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\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar ValuesSchema = function (_PolymorphicSchema) {\n _inherits(ValuesSchema, _PolymorphicSchema);\n\n function ValuesSchema() {\n _classCallCheck(this, ValuesSchema);\n\n return _possibleConstructorReturn(this, (ValuesSchema.__proto__ || Object.getPrototypeOf(ValuesSchema)).apply(this, arguments));\n }\n\n _createClass(ValuesSchema, [{\n key: \'normalize\',\n value: function normalize(input, parent, key, visit, addEntity) {\n var _this2 = this;\n\n return Object.keys(input).reduce(function (output, key, index) {\n var value = input[key];\n return value !== undefined && value !== null ? _extends({}, output, _defineProperty({}, key, _this2.normalizeValue(value, input, key, visit, addEntity))) : output;\n }, {});\n }\n }, {\n key: \'denormalize\',\n value: function denormalize(input, unvisit) {\n var _this3 = this;\n\n return Object.keys(input).reduce(function (output, key) {\n var entityOrId = input[key];\n return _extends({}, output, _defineProperty({}, key, _this3.denormalizeValue(entityOrId, unvisit)));\n }, {});\n }\n }]);\n\n return ValuesSchema;\n}(_Polymorphic2.default);\n\nexports.default = ValuesSchema;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/normalizr/dist/src/schemas/Values.js\n// module id = 1215\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/normalizr/dist/src/schemas/Values.js?', + ); + + /***/ + }, + /* 1216 */ + /* unknown exports provided */ + /* exports used: default */ + /*!****************************************************!*\ + !*** ./~/photoswipe/dist/photoswipe-ui-default.js ***! + \****************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! PhotoSwipe Default UI - 4.1.2 - 2017-04-05\n* http://photoswipe.com\n* Copyright (c) 2017 Dmitry Semenov; */\n/**\n*\n* UI on top of main sliding area (caption, arrows, close button, etc.).\n* Built just using public methods/properties of PhotoSwipe.\n* \n*/\n(function (root, factory) { \n\tif (true) {\n\t\t!(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?\n\t\t\t\t(__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) :\n\t\t\t\t__WEBPACK_AMD_DEFINE_FACTORY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n\t} else if (typeof exports === 'object') {\n\t\tmodule.exports = factory();\n\t} else {\n\t\troot.PhotoSwipeUI_Default = factory();\n\t}\n})(this, function () {\n\n\t'use strict';\n\n\n\nvar PhotoSwipeUI_Default =\n function(pswp, framework) {\n\n\tvar ui = this;\n\tvar _overlayUIUpdated = false,\n\t\t_controlsVisible = true,\n\t\t_fullscrenAPI,\n\t\t_controls,\n\t\t_captionContainer,\n\t\t_fakeCaptionContainer,\n\t\t_indexIndicator,\n\t\t_shareButton,\n\t\t_shareModal,\n\t\t_shareModalHidden = true,\n\t\t_initalCloseOnScrollValue,\n\t\t_isIdle,\n\t\t_listen,\n\n\t\t_loadingIndicator,\n\t\t_loadingIndicatorHidden,\n\t\t_loadingIndicatorTimeout,\n\n\t\t_galleryHasOneSlide,\n\n\t\t_options,\n\t\t_defaultUIOptions = {\n\t\t\tbarsSize: {top:44, bottom:'auto'},\n\t\t\tcloseElClasses: ['item', 'caption', 'zoom-wrap', 'ui', 'top-bar'], \n\t\t\ttimeToIdle: 4000, \n\t\t\ttimeToIdleOutside: 1000,\n\t\t\tloadingIndicatorDelay: 1000, // 2s\n\t\t\t\n\t\t\taddCaptionHTMLFn: function(item, captionEl /*, isFake */) {\n\t\t\t\tif(!item.title) {\n\t\t\t\t\tcaptionEl.children[0].innerHTML = '';\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tcaptionEl.children[0].innerHTML = item.title;\n\t\t\t\treturn true;\n\t\t\t},\n\n\t\t\tcloseEl:true,\n\t\t\tcaptionEl: true,\n\t\t\tfullscreenEl: true,\n\t\t\tzoomEl: true,\n\t\t\tshareEl: true,\n\t\t\tcounterEl: true,\n\t\t\tarrowEl: true,\n\t\t\tpreloaderEl: true,\n\n\t\t\ttapToClose: false,\n\t\t\ttapToToggleControls: true,\n\n\t\t\tclickToCloseNonZoomable: true,\n\n\t\t\tshareButtons: [\n\t\t\t\t{id:'facebook', label:'Share on Facebook', url:'https://www.facebook.com/sharer/sharer.php?u={{url}}'},\n\t\t\t\t{id:'twitter', label:'Tweet', url:'https://twitter.com/intent/tweet?text={{text}}&url={{url}}'},\n\t\t\t\t{id:'pinterest', label:'Pin it', url:'http://www.pinterest.com/pin/create/button/'+\n\t\t\t\t\t\t\t\t\t\t\t\t\t'?url={{url}}&media={{image_url}}&description={{text}}'},\n\t\t\t\t{id:'download', label:'Download image', url:'{{raw_image_url}}', download:true}\n\t\t\t],\n\t\t\tgetImageURLForShare: function( /* shareButtonData */ ) {\n\t\t\t\treturn pswp.currItem.src || '';\n\t\t\t},\n\t\t\tgetPageURLForShare: function( /* shareButtonData */ ) {\n\t\t\t\treturn window.location.href;\n\t\t\t},\n\t\t\tgetTextForShare: function( /* shareButtonData */ ) {\n\t\t\t\treturn pswp.currItem.title || '';\n\t\t\t},\n\t\t\t\t\n\t\t\tindexIndicatorSep: ' / ',\n\t\t\tfitControlsWidth: 1200\n\n\t\t},\n\t\t_blockControlsTap,\n\t\t_blockControlsTapTimeout;\n\n\n\n\tvar _onControlsTap = function(e) {\n\t\t\tif(_blockControlsTap) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\n\t\t\te = e || window.event;\n\n\t\t\tif(_options.timeToIdle && _options.mouseUsed && !_isIdle) {\n\t\t\t\t// reset idle timer\n\t\t\t\t_onIdleMouseMove();\n\t\t\t}\n\n\n\t\t\tvar target = e.target || e.srcElement,\n\t\t\t\tuiElement,\n\t\t\t\tclickedClass = target.getAttribute('class') || '',\n\t\t\t\tfound;\n\n\t\t\tfor(var i = 0; i < _uiElements.length; i++) {\n\t\t\t\tuiElement = _uiElements[i];\n\t\t\t\tif(uiElement.onTap && clickedClass.indexOf('pswp__' + uiElement.name ) > -1 ) {\n\t\t\t\t\tuiElement.onTap();\n\t\t\t\t\tfound = true;\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(found) {\n\t\t\t\tif(e.stopPropagation) {\n\t\t\t\t\te.stopPropagation();\n\t\t\t\t}\n\t\t\t\t_blockControlsTap = true;\n\n\t\t\t\t// Some versions of Android don't prevent ghost click event \n\t\t\t\t// when preventDefault() was called on touchstart and/or touchend.\n\t\t\t\t// \n\t\t\t\t// This happens on v4.3, 4.2, 4.1, \n\t\t\t\t// older versions strangely work correctly, \n\t\t\t\t// but just in case we add delay on all of them)\t\n\t\t\t\tvar tapDelay = framework.features.isOldAndroid ? 600 : 30;\n\t\t\t\t_blockControlsTapTimeout = setTimeout(function() {\n\t\t\t\t\t_blockControlsTap = false;\n\t\t\t\t}, tapDelay);\n\t\t\t}\n\n\t\t},\n\t\t_fitControlsInViewport = function() {\n\t\t\treturn !pswp.likelyTouchDevice || _options.mouseUsed || screen.width > _options.fitControlsWidth;\n\t\t},\n\t\t_togglePswpClass = function(el, cName, add) {\n\t\t\tframework[ (add ? 'add' : 'remove') + 'Class' ](el, 'pswp__' + cName);\n\t\t},\n\n\t\t// add class when there is just one item in the gallery\n\t\t// (by default it hides left/right arrows and 1ofX counter)\n\t\t_countNumItems = function() {\n\t\t\tvar hasOneSlide = (_options.getNumItemsFn() === 1);\n\n\t\t\tif(hasOneSlide !== _galleryHasOneSlide) {\n\t\t\t\t_togglePswpClass(_controls, 'ui--one-slide', hasOneSlide);\n\t\t\t\t_galleryHasOneSlide = hasOneSlide;\n\t\t\t}\n\t\t},\n\t\t_toggleShareModalClass = function() {\n\t\t\t_togglePswpClass(_shareModal, 'share-modal--hidden', _shareModalHidden);\n\t\t},\n\t\t_toggleShareModal = function() {\n\n\t\t\t_shareModalHidden = !_shareModalHidden;\n\t\t\t\n\t\t\t\n\t\t\tif(!_shareModalHidden) {\n\t\t\t\t_toggleShareModalClass();\n\t\t\t\tsetTimeout(function() {\n\t\t\t\t\tif(!_shareModalHidden) {\n\t\t\t\t\t\tframework.addClass(_shareModal, 'pswp__share-modal--fade-in');\n\t\t\t\t\t}\n\t\t\t\t}, 30);\n\t\t\t} else {\n\t\t\t\tframework.removeClass(_shareModal, 'pswp__share-modal--fade-in');\n\t\t\t\tsetTimeout(function() {\n\t\t\t\t\tif(_shareModalHidden) {\n\t\t\t\t\t\t_toggleShareModalClass();\n\t\t\t\t\t}\n\t\t\t\t}, 300);\n\t\t\t}\n\t\t\t\n\t\t\tif(!_shareModalHidden) {\n\t\t\t\t_updateShareURLs();\n\t\t\t}\n\t\t\treturn false;\n\t\t},\n\n\t\t_openWindowPopup = function(e) {\n\t\t\te = e || window.event;\n\t\t\tvar target = e.target || e.srcElement;\n\n\t\t\tpswp.shout('shareLinkClick', e, target);\n\n\t\t\tif(!target.href) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif( target.hasAttribute('download') ) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\twindow.open(target.href, 'pswp_share', 'scrollbars=yes,resizable=yes,toolbar=no,'+\n\t\t\t\t\t\t\t\t\t\t'location=yes,width=550,height=420,top=100,left=' + \n\t\t\t\t\t\t\t\t\t\t(window.screen ? Math.round(screen.width / 2 - 275) : 100) );\n\n\t\t\tif(!_shareModalHidden) {\n\t\t\t\t_toggleShareModal();\n\t\t\t}\n\t\t\t\n\t\t\treturn false;\n\t\t},\n\t\t_updateShareURLs = function() {\n\t\t\tvar shareButtonOut = '',\n\t\t\t\tshareButtonData,\n\t\t\t\tshareURL,\n\t\t\t\timage_url,\n\t\t\t\tpage_url,\n\t\t\t\tshare_text;\n\n\t\t\tfor(var i = 0; i < _options.shareButtons.length; i++) {\n\t\t\t\tshareButtonData = _options.shareButtons[i];\n\n\t\t\t\timage_url = _options.getImageURLForShare(shareButtonData);\n\t\t\t\tpage_url = _options.getPageURLForShare(shareButtonData);\n\t\t\t\tshare_text = _options.getTextForShare(shareButtonData);\n\n\t\t\t\tshareURL = shareButtonData.url.replace('{{url}}', encodeURIComponent(page_url) )\n\t\t\t\t\t\t\t\t\t.replace('{{image_url}}', encodeURIComponent(image_url) )\n\t\t\t\t\t\t\t\t\t.replace('{{raw_image_url}}', image_url )\n\t\t\t\t\t\t\t\t\t.replace('{{text}}', encodeURIComponent(share_text) );\n\n\t\t\t\tshareButtonOut += '<a href=\"' + shareURL + '\" target=\"_blank\" '+\n\t\t\t\t\t\t\t\t\t'class=\"pswp__share--' + shareButtonData.id + '\"' +\n\t\t\t\t\t\t\t\t\t(shareButtonData.download ? 'download' : '') + '>' + \n\t\t\t\t\t\t\t\t\tshareButtonData.label + '</a>';\n\n\t\t\t\tif(_options.parseShareButtonOut) {\n\t\t\t\t\tshareButtonOut = _options.parseShareButtonOut(shareButtonData, shareButtonOut);\n\t\t\t\t}\n\t\t\t}\n\t\t\t_shareModal.children[0].innerHTML = shareButtonOut;\n\t\t\t_shareModal.children[0].onclick = _openWindowPopup;\n\n\t\t},\n\t\t_hasCloseClass = function(target) {\n\t\t\tfor(var i = 0; i < _options.closeElClasses.length; i++) {\n\t\t\t\tif( framework.hasClass(target, 'pswp__' + _options.closeElClasses[i]) ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t_idleInterval,\n\t\t_idleTimer,\n\t\t_idleIncrement = 0,\n\t\t_onIdleMouseMove = function() {\n\t\t\tclearTimeout(_idleTimer);\n\t\t\t_idleIncrement = 0;\n\t\t\tif(_isIdle) {\n\t\t\t\tui.setIdle(false);\n\t\t\t}\n\t\t},\n\t\t_onMouseLeaveWindow = function(e) {\n\t\t\te = e ? e : window.event;\n\t\t\tvar from = e.relatedTarget || e.toElement;\n\t\t\tif (!from || from.nodeName === 'HTML') {\n\t\t\t\tclearTimeout(_idleTimer);\n\t\t\t\t_idleTimer = setTimeout(function() {\n\t\t\t\t\tui.setIdle(true);\n\t\t\t\t}, _options.timeToIdleOutside);\n\t\t\t}\n\t\t},\n\t\t_setupFullscreenAPI = function() {\n\t\t\tif(_options.fullscreenEl && !framework.features.isOldAndroid) {\n\t\t\t\tif(!_fullscrenAPI) {\n\t\t\t\t\t_fullscrenAPI = ui.getFullscreenAPI();\n\t\t\t\t}\n\t\t\t\tif(_fullscrenAPI) {\n\t\t\t\t\tframework.bind(document, _fullscrenAPI.eventK, ui.updateFullscreen);\n\t\t\t\t\tui.updateFullscreen();\n\t\t\t\t\tframework.addClass(pswp.template, 'pswp--supports-fs');\n\t\t\t\t} else {\n\t\t\t\t\tframework.removeClass(pswp.template, 'pswp--supports-fs');\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t_setupLoadingIndicator = function() {\n\t\t\t// Setup loading indicator\n\t\t\tif(_options.preloaderEl) {\n\t\t\t\n\t\t\t\t_toggleLoadingIndicator(true);\n\n\t\t\t\t_listen('beforeChange', function() {\n\n\t\t\t\t\tclearTimeout(_loadingIndicatorTimeout);\n\n\t\t\t\t\t// display loading indicator with delay\n\t\t\t\t\t_loadingIndicatorTimeout = setTimeout(function() {\n\n\t\t\t\t\t\tif(pswp.currItem && pswp.currItem.loading) {\n\n\t\t\t\t\t\t\tif( !pswp.allowProgressiveImg() || (pswp.currItem.img && !pswp.currItem.img.naturalWidth) ) {\n\t\t\t\t\t\t\t\t// show preloader if progressive loading is not enabled, \n\t\t\t\t\t\t\t\t// or image width is not defined yet (because of slow connection)\n\t\t\t\t\t\t\t\t_toggleLoadingIndicator(false); \n\t\t\t\t\t\t\t\t// items-controller.js function allowProgressiveImg\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t_toggleLoadingIndicator(true); // hide preloader\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}, _options.loadingIndicatorDelay);\n\t\t\t\t\t\n\t\t\t\t});\n\t\t\t\t_listen('imageLoadComplete', function(index, item) {\n\t\t\t\t\tif(pswp.currItem === item) {\n\t\t\t\t\t\t_toggleLoadingIndicator(true);\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t}\n\t\t},\n\t\t_toggleLoadingIndicator = function(hide) {\n\t\t\tif( _loadingIndicatorHidden !== hide ) {\n\t\t\t\t_togglePswpClass(_loadingIndicator, 'preloader--active', !hide);\n\t\t\t\t_loadingIndicatorHidden = hide;\n\t\t\t}\n\t\t},\n\t\t_applyNavBarGaps = function(item) {\n\t\t\tvar gap = item.vGap;\n\n\t\t\tif( _fitControlsInViewport() ) {\n\t\t\t\t\n\t\t\t\tvar bars = _options.barsSize; \n\t\t\t\tif(_options.captionEl && bars.bottom === 'auto') {\n\t\t\t\t\tif(!_fakeCaptionContainer) {\n\t\t\t\t\t\t_fakeCaptionContainer = framework.createEl('pswp__caption pswp__caption--fake');\n\t\t\t\t\t\t_fakeCaptionContainer.appendChild( framework.createEl('pswp__caption__center') );\n\t\t\t\t\t\t_controls.insertBefore(_fakeCaptionContainer, _captionContainer);\n\t\t\t\t\t\tframework.addClass(_controls, 'pswp__ui--fit');\n\t\t\t\t\t}\n\t\t\t\t\tif( _options.addCaptionHTMLFn(item, _fakeCaptionContainer, true) ) {\n\n\t\t\t\t\t\tvar captionSize = _fakeCaptionContainer.clientHeight;\n\t\t\t\t\t\tgap.bottom = parseInt(captionSize,10) || 44;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tgap.bottom = bars.top; // if no caption, set size of bottom gap to size of top\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tgap.bottom = bars.bottom === 'auto' ? 0 : bars.bottom;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// height of top bar is static, no need to calculate it\n\t\t\t\tgap.top = bars.top;\n\t\t\t} else {\n\t\t\t\tgap.top = gap.bottom = 0;\n\t\t\t}\n\t\t},\n\t\t_setupIdle = function() {\n\t\t\t// Hide controls when mouse is used\n\t\t\tif(_options.timeToIdle) {\n\t\t\t\t_listen('mouseUsed', function() {\n\t\t\t\t\t\n\t\t\t\t\tframework.bind(document, 'mousemove', _onIdleMouseMove);\n\t\t\t\t\tframework.bind(document, 'mouseout', _onMouseLeaveWindow);\n\n\t\t\t\t\t_idleInterval = setInterval(function() {\n\t\t\t\t\t\t_idleIncrement++;\n\t\t\t\t\t\tif(_idleIncrement === 2) {\n\t\t\t\t\t\t\tui.setIdle(true);\n\t\t\t\t\t\t}\n\t\t\t\t\t}, _options.timeToIdle / 2);\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\t_setupHidingControlsDuringGestures = function() {\n\n\t\t\t// Hide controls on vertical drag\n\t\t\t_listen('onVerticalDrag', function(now) {\n\t\t\t\tif(_controlsVisible && now < 0.95) {\n\t\t\t\t\tui.hideControls();\n\t\t\t\t} else if(!_controlsVisible && now >= 0.95) {\n\t\t\t\t\tui.showControls();\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t// Hide controls when pinching to close\n\t\t\tvar pinchControlsHidden;\n\t\t\t_listen('onPinchClose' , function(now) {\n\t\t\t\tif(_controlsVisible && now < 0.9) {\n\t\t\t\t\tui.hideControls();\n\t\t\t\t\tpinchControlsHidden = true;\n\t\t\t\t} else if(pinchControlsHidden && !_controlsVisible && now > 0.9) {\n\t\t\t\t\tui.showControls();\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t_listen('zoomGestureEnded', function() {\n\t\t\t\tpinchControlsHidden = false;\n\t\t\t\tif(pinchControlsHidden && !_controlsVisible) {\n\t\t\t\t\tui.showControls();\n\t\t\t\t}\n\t\t\t});\n\n\t\t};\n\n\n\n\tvar _uiElements = [\n\t\t{ \n\t\t\tname: 'caption', \n\t\t\toption: 'captionEl',\n\t\t\tonInit: function(el) { \n\t\t\t\t_captionContainer = el; \n\t\t\t} \n\t\t},\n\t\t{ \n\t\t\tname: 'share-modal', \n\t\t\toption: 'shareEl',\n\t\t\tonInit: function(el) { \n\t\t\t\t_shareModal = el;\n\t\t\t},\n\t\t\tonTap: function() {\n\t\t\t\t_toggleShareModal();\n\t\t\t} \n\t\t},\n\t\t{ \n\t\t\tname: 'button--share', \n\t\t\toption: 'shareEl',\n\t\t\tonInit: function(el) { \n\t\t\t\t_shareButton = el;\n\t\t\t},\n\t\t\tonTap: function() {\n\t\t\t\t_toggleShareModal();\n\t\t\t} \n\t\t},\n\t\t{ \n\t\t\tname: 'button--zoom', \n\t\t\toption: 'zoomEl',\n\t\t\tonTap: pswp.toggleDesktopZoom\n\t\t},\n\t\t{ \n\t\t\tname: 'counter', \n\t\t\toption: 'counterEl',\n\t\t\tonInit: function(el) { \n\t\t\t\t_indexIndicator = el;\n\t\t\t} \n\t\t},\n\t\t{ \n\t\t\tname: 'button--close', \n\t\t\toption: 'closeEl',\n\t\t\tonTap: pswp.close\n\t\t},\n\t\t{ \n\t\t\tname: 'button--arrow--left', \n\t\t\toption: 'arrowEl',\n\t\t\tonTap: pswp.prev\n\t\t},\n\t\t{ \n\t\t\tname: 'button--arrow--right', \n\t\t\toption: 'arrowEl',\n\t\t\tonTap: pswp.next\n\t\t},\n\t\t{ \n\t\t\tname: 'button--fs', \n\t\t\toption: 'fullscreenEl',\n\t\t\tonTap: function() { \n\t\t\t\tif(_fullscrenAPI.isFullscreen()) {\n\t\t\t\t\t_fullscrenAPI.exit();\n\t\t\t\t} else {\n\t\t\t\t\t_fullscrenAPI.enter();\n\t\t\t\t}\n\t\t\t} \n\t\t},\n\t\t{ \n\t\t\tname: 'preloader', \n\t\t\toption: 'preloaderEl',\n\t\t\tonInit: function(el) { \n\t\t\t\t_loadingIndicator = el;\n\t\t\t} \n\t\t}\n\n\t];\n\n\tvar _setupUIElements = function() {\n\t\tvar item,\n\t\t\tclassAttr,\n\t\t\tuiElement;\n\n\t\tvar loopThroughChildElements = function(sChildren) {\n\t\t\tif(!sChildren) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar l = sChildren.length;\n\t\t\tfor(var i = 0; i < l; i++) {\n\t\t\t\titem = sChildren[i];\n\t\t\t\tclassAttr = item.className;\n\n\t\t\t\tfor(var a = 0; a < _uiElements.length; a++) {\n\t\t\t\t\tuiElement = _uiElements[a];\n\n\t\t\t\t\tif(classAttr.indexOf('pswp__' + uiElement.name) > -1 ) {\n\n\t\t\t\t\t\tif( _options[uiElement.option] ) { // if element is not disabled from options\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tframework.removeClass(item, 'pswp__element--disabled');\n\t\t\t\t\t\t\tif(uiElement.onInit) {\n\t\t\t\t\t\t\t\tuiElement.onInit(item);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//item.style.display = 'block';\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tframework.addClass(item, 'pswp__element--disabled');\n\t\t\t\t\t\t\t//item.style.display = 'none';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tloopThroughChildElements(_controls.children);\n\n\t\tvar topBar = framework.getChildByClass(_controls, 'pswp__top-bar');\n\t\tif(topBar) {\n\t\t\tloopThroughChildElements( topBar.children );\n\t\t}\n\t};\n\n\n\t\n\n\tui.init = function() {\n\n\t\t// extend options\n\t\tframework.extend(pswp.options, _defaultUIOptions, true);\n\n\t\t// create local link for fast access\n\t\t_options = pswp.options;\n\n\t\t// find pswp__ui element\n\t\t_controls = framework.getChildByClass(pswp.scrollWrap, 'pswp__ui');\n\n\t\t// create local link\n\t\t_listen = pswp.listen;\n\n\n\t\t_setupHidingControlsDuringGestures();\n\n\t\t// update controls when slides change\n\t\t_listen('beforeChange', ui.update);\n\n\t\t// toggle zoom on double-tap\n\t\t_listen('doubleTap', function(point) {\n\t\t\tvar initialZoomLevel = pswp.currItem.initialZoomLevel;\n\t\t\tif(pswp.getZoomLevel() !== initialZoomLevel) {\n\t\t\t\tpswp.zoomTo(initialZoomLevel, point, 333);\n\t\t\t} else {\n\t\t\t\tpswp.zoomTo(_options.getDoubleTapZoom(false, pswp.currItem), point, 333);\n\t\t\t}\n\t\t});\n\n\t\t// Allow text selection in caption\n\t\t_listen('preventDragEvent', function(e, isDown, preventObj) {\n\t\t\tvar t = e.target || e.srcElement;\n\t\t\tif(\n\t\t\t\tt && \n\t\t\t\tt.getAttribute('class') && e.type.indexOf('mouse') > -1 && \n\t\t\t\t( t.getAttribute('class').indexOf('__caption') > 0 || (/(SMALL|STRONG|EM)/i).test(t.tagName) ) \n\t\t\t) {\n\t\t\t\tpreventObj.prevent = false;\n\t\t\t}\n\t\t});\n\n\t\t// bind events for UI\n\t\t_listen('bindEvents', function() {\n\t\t\tframework.bind(_controls, 'pswpTap click', _onControlsTap);\n\t\t\tframework.bind(pswp.scrollWrap, 'pswpTap', ui.onGlobalTap);\n\n\t\t\tif(!pswp.likelyTouchDevice) {\n\t\t\t\tframework.bind(pswp.scrollWrap, 'mouseover', ui.onMouseOver);\n\t\t\t}\n\t\t});\n\n\t\t// unbind events for UI\n\t\t_listen('unbindEvents', function() {\n\t\t\tif(!_shareModalHidden) {\n\t\t\t\t_toggleShareModal();\n\t\t\t}\n\n\t\t\tif(_idleInterval) {\n\t\t\t\tclearInterval(_idleInterval);\n\t\t\t}\n\t\t\tframework.unbind(document, 'mouseout', _onMouseLeaveWindow);\n\t\t\tframework.unbind(document, 'mousemove', _onIdleMouseMove);\n\t\t\tframework.unbind(_controls, 'pswpTap click', _onControlsTap);\n\t\t\tframework.unbind(pswp.scrollWrap, 'pswpTap', ui.onGlobalTap);\n\t\t\tframework.unbind(pswp.scrollWrap, 'mouseover', ui.onMouseOver);\n\n\t\t\tif(_fullscrenAPI) {\n\t\t\t\tframework.unbind(document, _fullscrenAPI.eventK, ui.updateFullscreen);\n\t\t\t\tif(_fullscrenAPI.isFullscreen()) {\n\t\t\t\t\t_options.hideAnimationDuration = 0;\n\t\t\t\t\t_fullscrenAPI.exit();\n\t\t\t\t}\n\t\t\t\t_fullscrenAPI = null;\n\t\t\t}\n\t\t});\n\n\n\t\t// clean up things when gallery is destroyed\n\t\t_listen('destroy', function() {\n\t\t\tif(_options.captionEl) {\n\t\t\t\tif(_fakeCaptionContainer) {\n\t\t\t\t\t_controls.removeChild(_fakeCaptionContainer);\n\t\t\t\t}\n\t\t\t\tframework.removeClass(_captionContainer, 'pswp__caption--empty');\n\t\t\t}\n\n\t\t\tif(_shareModal) {\n\t\t\t\t_shareModal.children[0].onclick = null;\n\t\t\t}\n\t\t\tframework.removeClass(_controls, 'pswp__ui--over-close');\n\t\t\tframework.addClass( _controls, 'pswp__ui--hidden');\n\t\t\tui.setIdle(false);\n\t\t});\n\t\t\n\n\t\tif(!_options.showAnimationDuration) {\n\t\t\tframework.removeClass( _controls, 'pswp__ui--hidden');\n\t\t}\n\t\t_listen('initialZoomIn', function() {\n\t\t\tif(_options.showAnimationDuration) {\n\t\t\t\tframework.removeClass( _controls, 'pswp__ui--hidden');\n\t\t\t}\n\t\t});\n\t\t_listen('initialZoomOut', function() {\n\t\t\tframework.addClass( _controls, 'pswp__ui--hidden');\n\t\t});\n\n\t\t_listen('parseVerticalMargin', _applyNavBarGaps);\n\t\t\n\t\t_setupUIElements();\n\n\t\tif(_options.shareEl && _shareButton && _shareModal) {\n\t\t\t_shareModalHidden = true;\n\t\t}\n\n\t\t_countNumItems();\n\n\t\t_setupIdle();\n\n\t\t_setupFullscreenAPI();\n\n\t\t_setupLoadingIndicator();\n\t};\n\n\tui.setIdle = function(isIdle) {\n\t\t_isIdle = isIdle;\n\t\t_togglePswpClass(_controls, 'ui--idle', isIdle);\n\t};\n\n\tui.update = function() {\n\t\t// Don't update UI if it's hidden\n\t\tif(_controlsVisible && pswp.currItem) {\n\t\t\t\n\t\t\tui.updateIndexIndicator();\n\n\t\t\tif(_options.captionEl) {\n\t\t\t\t_options.addCaptionHTMLFn(pswp.currItem, _captionContainer);\n\n\t\t\t\t_togglePswpClass(_captionContainer, 'caption--empty', !pswp.currItem.title);\n\t\t\t}\n\n\t\t\t_overlayUIUpdated = true;\n\n\t\t} else {\n\t\t\t_overlayUIUpdated = false;\n\t\t}\n\n\t\tif(!_shareModalHidden) {\n\t\t\t_toggleShareModal();\n\t\t}\n\n\t\t_countNumItems();\n\t};\n\n\tui.updateFullscreen = function(e) {\n\n\t\tif(e) {\n\t\t\t// some browsers change window scroll position during the fullscreen\n\t\t\t// so PhotoSwipe updates it just in case\n\t\t\tsetTimeout(function() {\n\t\t\t\tpswp.setScrollOffset( 0, framework.getScrollY() );\n\t\t\t}, 50);\n\t\t}\n\t\t\n\t\t// toogle pswp--fs class on root element\n\t\tframework[ (_fullscrenAPI.isFullscreen() ? 'add' : 'remove') + 'Class' ](pswp.template, 'pswp--fs');\n\t};\n\n\tui.updateIndexIndicator = function() {\n\t\tif(_options.counterEl) {\n\t\t\t_indexIndicator.innerHTML = (pswp.getCurrentIndex()+1) + \n\t\t\t\t\t\t\t\t\t\t_options.indexIndicatorSep + \n\t\t\t\t\t\t\t\t\t\t_options.getNumItemsFn();\n\t\t}\n\t};\n\t\n\tui.onGlobalTap = function(e) {\n\t\te = e || window.event;\n\t\tvar target = e.target || e.srcElement;\n\n\t\tif(_blockControlsTap) {\n\t\t\treturn;\n\t\t}\n\n\t\tif(e.detail && e.detail.pointerType === 'mouse') {\n\n\t\t\t// close gallery if clicked outside of the image\n\t\t\tif(_hasCloseClass(target)) {\n\t\t\t\tpswp.close();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif(framework.hasClass(target, 'pswp__img')) {\n\t\t\t\tif(pswp.getZoomLevel() === 1 && pswp.getZoomLevel() <= pswp.currItem.fitRatio) {\n\t\t\t\t\tif(_options.clickToCloseNonZoomable) {\n\t\t\t\t\t\tpswp.close();\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tpswp.toggleDesktopZoom(e.detail.releasePoint);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t} else {\n\n\t\t\t// tap anywhere (except buttons) to toggle visibility of controls\n\t\t\tif(_options.tapToToggleControls) {\n\t\t\t\tif(_controlsVisible) {\n\t\t\t\t\tui.hideControls();\n\t\t\t\t} else {\n\t\t\t\t\tui.showControls();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// tap to close gallery\n\t\t\tif(_options.tapToClose && (framework.hasClass(target, 'pswp__img') || _hasCloseClass(target)) ) {\n\t\t\t\tpswp.close();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t}\n\t};\n\tui.onMouseOver = function(e) {\n\t\te = e || window.event;\n\t\tvar target = e.target || e.srcElement;\n\n\t\t// add class when mouse is over an element that should close the gallery\n\t\t_togglePswpClass(_controls, 'ui--over-close', _hasCloseClass(target));\n\t};\n\n\tui.hideControls = function() {\n\t\tframework.addClass(_controls,'pswp__ui--hidden');\n\t\t_controlsVisible = false;\n\t};\n\n\tui.showControls = function() {\n\t\t_controlsVisible = true;\n\t\tif(!_overlayUIUpdated) {\n\t\t\tui.update();\n\t\t}\n\t\tframework.removeClass(_controls,'pswp__ui--hidden');\n\t};\n\n\tui.supportsFullscreen = function() {\n\t\tvar d = document;\n\t\treturn !!(d.exitFullscreen || d.mozCancelFullScreen || d.webkitExitFullscreen || d.msExitFullscreen);\n\t};\n\n\tui.getFullscreenAPI = function() {\n\t\tvar dE = document.documentElement,\n\t\t\tapi,\n\t\t\ttF = 'fullscreenchange';\n\n\t\tif (dE.requestFullscreen) {\n\t\t\tapi = {\n\t\t\t\tenterK: 'requestFullscreen',\n\t\t\t\texitK: 'exitFullscreen',\n\t\t\t\telementK: 'fullscreenElement',\n\t\t\t\teventK: tF\n\t\t\t};\n\n\t\t} else if(dE.mozRequestFullScreen ) {\n\t\t\tapi = {\n\t\t\t\tenterK: 'mozRequestFullScreen',\n\t\t\t\texitK: 'mozCancelFullScreen',\n\t\t\t\telementK: 'mozFullScreenElement',\n\t\t\t\teventK: 'moz' + tF\n\t\t\t};\n\n\t\t\t\n\n\t\t} else if(dE.webkitRequestFullscreen) {\n\t\t\tapi = {\n\t\t\t\tenterK: 'webkitRequestFullscreen',\n\t\t\t\texitK: 'webkitExitFullscreen',\n\t\t\t\telementK: 'webkitFullscreenElement',\n\t\t\t\teventK: 'webkit' + tF\n\t\t\t};\n\n\t\t} else if(dE.msRequestFullscreen) {\n\t\t\tapi = {\n\t\t\t\tenterK: 'msRequestFullscreen',\n\t\t\t\texitK: 'msExitFullscreen',\n\t\t\t\telementK: 'msFullscreenElement',\n\t\t\t\teventK: 'MSFullscreenChange'\n\t\t\t};\n\t\t}\n\n\t\tif(api) {\n\t\t\tapi.enter = function() { \n\t\t\t\t// disable close-on-scroll in fullscreen\n\t\t\t\t_initalCloseOnScrollValue = _options.closeOnScroll; \n\t\t\t\t_options.closeOnScroll = false; \n\n\t\t\t\tif(this.enterK === 'webkitRequestFullscreen') {\n\t\t\t\t\tpswp.template[this.enterK]( Element.ALLOW_KEYBOARD_INPUT );\n\t\t\t\t} else {\n\t\t\t\t\treturn pswp.template[this.enterK](); \n\t\t\t\t}\n\t\t\t};\n\t\t\tapi.exit = function() { \n\t\t\t\t_options.closeOnScroll = _initalCloseOnScrollValue;\n\n\t\t\t\treturn document[this.exitK](); \n\n\t\t\t};\n\t\t\tapi.isFullscreen = function() { return document[this.elementK]; };\n\t\t}\n\n\t\treturn api;\n\t};\n\n\n\n};\nreturn PhotoSwipeUI_Default;\n\n\n});\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/photoswipe/dist/photoswipe-ui-default.js\n// module id = 1216\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/photoswipe/dist/photoswipe-ui-default.js?", + ); + + /***/ + }, + /* 1217 */ + /* unknown exports provided */ + /* exports used: default */ + /*!*****************************************!*\ + !*** ./~/photoswipe/dist/photoswipe.js ***! + \*****************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! PhotoSwipe - v4.1.2 - 2017-04-05\n* http://photoswipe.com\n* Copyright (c) 2017 Dmitry Semenov; */\n(function (root, factory) { \n\tif (true) {\n\t\t!(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?\n\t\t\t\t(__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) :\n\t\t\t\t__WEBPACK_AMD_DEFINE_FACTORY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n\t} else if (typeof exports === 'object') {\n\t\tmodule.exports = factory();\n\t} else {\n\t\troot.PhotoSwipe = factory();\n\t}\n})(this, function () {\n\n\t'use strict';\n\tvar PhotoSwipe = function(template, UiClass, items, options){\n\n/*>>framework-bridge*/\n/**\n *\n * Set of generic functions used by gallery.\n * \n * You're free to modify anything here as long as functionality is kept.\n * \n */\nvar framework = {\n\tfeatures: null,\n\tbind: function(target, type, listener, unbind) {\n\t\tvar methodName = (unbind ? 'remove' : 'add') + 'EventListener';\n\t\ttype = type.split(' ');\n\t\tfor(var i = 0; i < type.length; i++) {\n\t\t\tif(type[i]) {\n\t\t\t\ttarget[methodName]( type[i], listener, false);\n\t\t\t}\n\t\t}\n\t},\n\tisArray: function(obj) {\n\t\treturn (obj instanceof Array);\n\t},\n\tcreateEl: function(classes, tag) {\n\t\tvar el = document.createElement(tag || 'div');\n\t\tif(classes) {\n\t\t\tel.className = classes;\n\t\t}\n\t\treturn el;\n\t},\n\tgetScrollY: function() {\n\t\tvar yOffset = window.pageYOffset;\n\t\treturn yOffset !== undefined ? yOffset : document.documentElement.scrollTop;\n\t},\n\tunbind: function(target, type, listener) {\n\t\tframework.bind(target,type,listener,true);\n\t},\n\tremoveClass: function(el, className) {\n\t\tvar reg = new RegExp('(\\\\s|^)' + className + '(\\\\s|$)');\n\t\tel.className = el.className.replace(reg, ' ').replace(/^\\s\\s*/, '').replace(/\\s\\s*$/, ''); \n\t},\n\taddClass: function(el, className) {\n\t\tif( !framework.hasClass(el,className) ) {\n\t\t\tel.className += (el.className ? ' ' : '') + className;\n\t\t}\n\t},\n\thasClass: function(el, className) {\n\t\treturn el.className && new RegExp('(^|\\\\s)' + className + '(\\\\s|$)').test(el.className);\n\t},\n\tgetChildByClass: function(parentEl, childClassName) {\n\t\tvar node = parentEl.firstChild;\n\t\twhile(node) {\n\t\t\tif( framework.hasClass(node, childClassName) ) {\n\t\t\t\treturn node;\n\t\t\t}\n\t\t\tnode = node.nextSibling;\n\t\t}\n\t},\n\tarraySearch: function(array, value, key) {\n\t\tvar i = array.length;\n\t\twhile(i--) {\n\t\t\tif(array[i][key] === value) {\n\t\t\t\treturn i;\n\t\t\t} \n\t\t}\n\t\treturn -1;\n\t},\n\textend: function(o1, o2, preventOverwrite) {\n\t\tfor (var prop in o2) {\n\t\t\tif (o2.hasOwnProperty(prop)) {\n\t\t\t\tif(preventOverwrite && o1.hasOwnProperty(prop)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\to1[prop] = o2[prop];\n\t\t\t}\n\t\t}\n\t},\n\teasing: {\n\t\tsine: {\n\t\t\tout: function(k) {\n\t\t\t\treturn Math.sin(k * (Math.PI / 2));\n\t\t\t},\n\t\t\tinOut: function(k) {\n\t\t\t\treturn - (Math.cos(Math.PI * k) - 1) / 2;\n\t\t\t}\n\t\t},\n\t\tcubic: {\n\t\t\tout: function(k) {\n\t\t\t\treturn --k * k * k + 1;\n\t\t\t}\n\t\t}\n\t\t/*\n\t\t\telastic: {\n\t\t\t\tout: function ( k ) {\n\n\t\t\t\t\tvar s, a = 0.1, p = 0.4;\n\t\t\t\t\tif ( k === 0 ) return 0;\n\t\t\t\t\tif ( k === 1 ) return 1;\n\t\t\t\t\tif ( !a || a < 1 ) { a = 1; s = p / 4; }\n\t\t\t\t\telse s = p * Math.asin( 1 / a ) / ( 2 * Math.PI );\n\t\t\t\t\treturn ( a * Math.pow( 2, - 10 * k) * Math.sin( ( k - s ) * ( 2 * Math.PI ) / p ) + 1 );\n\n\t\t\t\t},\n\t\t\t},\n\t\t\tback: {\n\t\t\t\tout: function ( k ) {\n\t\t\t\t\tvar s = 1.70158;\n\t\t\t\t\treturn --k * k * ( ( s + 1 ) * k + s ) + 1;\n\t\t\t\t}\n\t\t\t}\n\t\t*/\n\t},\n\n\t/**\n\t * \n\t * @return {object}\n\t * \n\t * {\n\t * raf : request animation frame function\n\t * caf : cancel animation frame function\n\t * transfrom : transform property key (with vendor), or null if not supported\n\t * oldIE : IE8 or below\n\t * }\n\t * \n\t */\n\tdetectFeatures: function() {\n\t\tif(framework.features) {\n\t\t\treturn framework.features;\n\t\t}\n\t\tvar helperEl = framework.createEl(),\n\t\t\thelperStyle = helperEl.style,\n\t\t\tvendor = '',\n\t\t\tfeatures = {};\n\n\t\t// IE8 and below\n\t\tfeatures.oldIE = document.all && !document.addEventListener;\n\n\t\tfeatures.touch = 'ontouchstart' in window;\n\n\t\tif(window.requestAnimationFrame) {\n\t\t\tfeatures.raf = window.requestAnimationFrame;\n\t\t\tfeatures.caf = window.cancelAnimationFrame;\n\t\t}\n\n\t\tfeatures.pointerEvent = navigator.pointerEnabled || navigator.msPointerEnabled;\n\n\t\t// fix false-positive detection of old Android in new IE\n\t\t// (IE11 ua string contains \"Android 4.0\")\n\t\t\n\t\tif(!features.pointerEvent) { \n\n\t\t\tvar ua = navigator.userAgent;\n\n\t\t\t// Detect if device is iPhone or iPod and if it's older than iOS 8\n\t\t\t// http://stackoverflow.com/a/14223920\n\t\t\t// \n\t\t\t// This detection is made because of buggy top/bottom toolbars\n\t\t\t// that don't trigger window.resize event.\n\t\t\t// For more info refer to _isFixedPosition variable in core.js\n\n\t\t\tif (/iP(hone|od)/.test(navigator.platform)) {\n\t\t\t\tvar v = (navigator.appVersion).match(/OS (\\d+)_(\\d+)_?(\\d+)?/);\n\t\t\t\tif(v && v.length > 0) {\n\t\t\t\t\tv = parseInt(v[1], 10);\n\t\t\t\t\tif(v >= 1 && v < 8 ) {\n\t\t\t\t\t\tfeatures.isOldIOSPhone = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Detect old Android (before KitKat)\n\t\t\t// due to bugs related to position:fixed\n\t\t\t// http://stackoverflow.com/questions/7184573/pick-up-the-android-version-in-the-browser-by-javascript\n\t\t\t\n\t\t\tvar match = ua.match(/Android\\s([0-9\\.]*)/);\n\t\t\tvar androidversion = match ? match[1] : 0;\n\t\t\tandroidversion = parseFloat(androidversion);\n\t\t\tif(androidversion >= 1 ) {\n\t\t\t\tif(androidversion < 4.4) {\n\t\t\t\t\tfeatures.isOldAndroid = true; // for fixed position bug & performance\n\t\t\t\t}\n\t\t\t\tfeatures.androidVersion = androidversion; // for touchend bug\n\t\t\t}\t\n\t\t\tfeatures.isMobileOpera = /opera mini|opera mobi/i.test(ua);\n\n\t\t\t// p.s. yes, yes, UA sniffing is bad, propose your solution for above bugs.\n\t\t}\n\t\t\n\t\tvar styleChecks = ['transform', 'perspective', 'animationName'],\n\t\t\tvendors = ['', 'webkit','Moz','ms','O'],\n\t\t\tstyleCheckItem,\n\t\t\tstyleName;\n\n\t\tfor(var i = 0; i < 4; i++) {\n\t\t\tvendor = vendors[i];\n\n\t\t\tfor(var a = 0; a < 3; a++) {\n\t\t\t\tstyleCheckItem = styleChecks[a];\n\n\t\t\t\t// uppercase first letter of property name, if vendor is present\n\t\t\t\tstyleName = vendor + (vendor ? \n\t\t\t\t\t\t\t\t\t\tstyleCheckItem.charAt(0).toUpperCase() + styleCheckItem.slice(1) : \n\t\t\t\t\t\t\t\t\t\tstyleCheckItem);\n\t\t\t\n\t\t\t\tif(!features[styleCheckItem] && styleName in helperStyle ) {\n\t\t\t\t\tfeatures[styleCheckItem] = styleName;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(vendor && !features.raf) {\n\t\t\t\tvendor = vendor.toLowerCase();\n\t\t\t\tfeatures.raf = window[vendor+'RequestAnimationFrame'];\n\t\t\t\tif(features.raf) {\n\t\t\t\t\tfeatures.caf = window[vendor+'CancelAnimationFrame'] || \n\t\t\t\t\t\t\t\t\twindow[vendor+'CancelRequestAnimationFrame'];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\t\n\t\tif(!features.raf) {\n\t\t\tvar lastTime = 0;\n\t\t\tfeatures.raf = function(fn) {\n\t\t\t\tvar currTime = new Date().getTime();\n\t\t\t\tvar timeToCall = Math.max(0, 16 - (currTime - lastTime));\n\t\t\t\tvar id = window.setTimeout(function() { fn(currTime + timeToCall); }, timeToCall);\n\t\t\t\tlastTime = currTime + timeToCall;\n\t\t\t\treturn id;\n\t\t\t};\n\t\t\tfeatures.caf = function(id) { clearTimeout(id); };\n\t\t}\n\n\t\t// Detect SVG support\n\t\tfeatures.svg = !!document.createElementNS && \n\t\t\t\t\t\t!!document.createElementNS('http://www.w3.org/2000/svg', 'svg').createSVGRect;\n\n\t\tframework.features = features;\n\n\t\treturn features;\n\t}\n};\n\nframework.detectFeatures();\n\n// Override addEventListener for old versions of IE\nif(framework.features.oldIE) {\n\n\tframework.bind = function(target, type, listener, unbind) {\n\t\t\n\t\ttype = type.split(' ');\n\n\t\tvar methodName = (unbind ? 'detach' : 'attach') + 'Event',\n\t\t\tevName,\n\t\t\t_handleEv = function() {\n\t\t\t\tlistener.handleEvent.call(listener);\n\t\t\t};\n\n\t\tfor(var i = 0; i < type.length; i++) {\n\t\t\tevName = type[i];\n\t\t\tif(evName) {\n\n\t\t\t\tif(typeof listener === 'object' && listener.handleEvent) {\n\t\t\t\t\tif(!unbind) {\n\t\t\t\t\t\tlistener['oldIE' + evName] = _handleEv;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif(!listener['oldIE' + evName]) {\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\ttarget[methodName]( 'on' + evName, listener['oldIE' + evName]);\n\t\t\t\t} else {\n\t\t\t\t\ttarget[methodName]( 'on' + evName, listener);\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t};\n\t\n}\n\n/*>>framework-bridge*/\n\n/*>>core*/\n//function(template, UiClass, items, options)\n\nvar self = this;\n\n/**\n * Static vars, don't change unless you know what you're doing.\n */\nvar DOUBLE_TAP_RADIUS = 25, \n\tNUM_HOLDERS = 3;\n\n/**\n * Options\n */\nvar _options = {\n\tallowPanToNext:true,\n\tspacing: 0.12,\n\tbgOpacity: 1,\n\tmouseUsed: false,\n\tloop: true,\n\tpinchToClose: true,\n\tcloseOnScroll: true,\n\tcloseOnVerticalDrag: true,\n\tverticalDragRange: 0.75,\n\thideAnimationDuration: 333,\n\tshowAnimationDuration: 333,\n\tshowHideOpacity: false,\n\tfocus: true,\n\tescKey: true,\n\tarrowKeys: true,\n\tmainScrollEndFriction: 0.35,\n\tpanEndFriction: 0.35,\n\tisClickableElement: function(el) {\n return el.tagName === 'A';\n },\n getDoubleTapZoom: function(isMouseClick, item) {\n \tif(isMouseClick) {\n \t\treturn 1;\n \t} else {\n \t\treturn item.initialZoomLevel < 0.7 ? 1 : 1.33;\n \t}\n },\n maxSpreadZoom: 1.33,\n\tmodal: true,\n\n\t// not fully implemented yet\n\tscaleMode: 'fit' // TODO\n};\nframework.extend(_options, options);\n\n\n/**\n * Private helper variables & functions\n */\n\nvar _getEmptyPoint = function() { \n\t\treturn {x:0,y:0}; \n\t};\n\nvar _isOpen,\n\t_isDestroying,\n\t_closedByScroll,\n\t_currentItemIndex,\n\t_containerStyle,\n\t_containerShiftIndex,\n\t_currPanDist = _getEmptyPoint(),\n\t_startPanOffset = _getEmptyPoint(),\n\t_panOffset = _getEmptyPoint(),\n\t_upMoveEvents, // drag move, drag end & drag cancel events array\n\t_downEvents, // drag start events array\n\t_globalEventHandlers,\n\t_viewportSize = {},\n\t_currZoomLevel,\n\t_startZoomLevel,\n\t_translatePrefix,\n\t_translateSufix,\n\t_updateSizeInterval,\n\t_itemsNeedUpdate,\n\t_currPositionIndex = 0,\n\t_offset = {},\n\t_slideSize = _getEmptyPoint(), // size of slide area, including spacing\n\t_itemHolders,\n\t_prevItemIndex,\n\t_indexDiff = 0, // difference of indexes since last content update\n\t_dragStartEvent,\n\t_dragMoveEvent,\n\t_dragEndEvent,\n\t_dragCancelEvent,\n\t_transformKey,\n\t_pointerEventEnabled,\n\t_isFixedPosition = true,\n\t_likelyTouchDevice,\n\t_modules = [],\n\t_requestAF,\n\t_cancelAF,\n\t_initalClassName,\n\t_initalWindowScrollY,\n\t_oldIE,\n\t_currentWindowScrollY,\n\t_features,\n\t_windowVisibleSize = {},\n\t_renderMaxResolution = false,\n\t_orientationChangeTimeout,\n\n\n\t// Registers PhotoSWipe module (History, Controller ...)\n\t_registerModule = function(name, module) {\n\t\tframework.extend(self, module.publicMethods);\n\t\t_modules.push(name);\n\t},\n\n\t_getLoopedId = function(index) {\n\t\tvar numSlides = _getNumItems();\n\t\tif(index > numSlides - 1) {\n\t\t\treturn index - numSlides;\n\t\t} else if(index < 0) {\n\t\t\treturn numSlides + index;\n\t\t}\n\t\treturn index;\n\t},\n\t\n\t// Micro bind/trigger\n\t_listeners = {},\n\t_listen = function(name, fn) {\n\t\tif(!_listeners[name]) {\n\t\t\t_listeners[name] = [];\n\t\t}\n\t\treturn _listeners[name].push(fn);\n\t},\n\t_shout = function(name) {\n\t\tvar listeners = _listeners[name];\n\n\t\tif(listeners) {\n\t\t\tvar args = Array.prototype.slice.call(arguments);\n\t\t\targs.shift();\n\n\t\t\tfor(var i = 0; i < listeners.length; i++) {\n\t\t\t\tlisteners[i].apply(self, args);\n\t\t\t}\n\t\t}\n\t},\n\n\t_getCurrentTime = function() {\n\t\treturn new Date().getTime();\n\t},\n\t_applyBgOpacity = function(opacity) {\n\t\t_bgOpacity = opacity;\n\t\tself.bg.style.opacity = opacity * _options.bgOpacity;\n\t},\n\n\t_applyZoomTransform = function(styleObj,x,y,zoom,item) {\n\t\tif(!_renderMaxResolution || (item && item !== self.currItem) ) {\n\t\t\tzoom = zoom / (item ? item.fitRatio : self.currItem.fitRatio);\t\n\t\t}\n\t\t\t\n\t\tstyleObj[_transformKey] = _translatePrefix + x + 'px, ' + y + 'px' + _translateSufix + ' scale(' + zoom + ')';\n\t},\n\t_applyCurrentZoomPan = function( allowRenderResolution ) {\n\t\tif(_currZoomElementStyle) {\n\n\t\t\tif(allowRenderResolution) {\n\t\t\t\tif(_currZoomLevel > self.currItem.fitRatio) {\n\t\t\t\t\tif(!_renderMaxResolution) {\n\t\t\t\t\t\t_setImageSize(self.currItem, false, true);\n\t\t\t\t\t\t_renderMaxResolution = true;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif(_renderMaxResolution) {\n\t\t\t\t\t\t_setImageSize(self.currItem);\n\t\t\t\t\t\t_renderMaxResolution = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\n\t\t\t_applyZoomTransform(_currZoomElementStyle, _panOffset.x, _panOffset.y, _currZoomLevel);\n\t\t}\n\t},\n\t_applyZoomPanToItem = function(item) {\n\t\tif(item.container) {\n\n\t\t\t_applyZoomTransform(item.container.style, \n\t\t\t\t\t\t\t\titem.initialPosition.x, \n\t\t\t\t\t\t\t\titem.initialPosition.y, \n\t\t\t\t\t\t\t\titem.initialZoomLevel,\n\t\t\t\t\t\t\t\titem);\n\t\t}\n\t},\n\t_setTranslateX = function(x, elStyle) {\n\t\telStyle[_transformKey] = _translatePrefix + x + 'px, 0px' + _translateSufix;\n\t},\n\t_moveMainScroll = function(x, dragging) {\n\n\t\tif(!_options.loop && dragging) {\n\t\t\tvar newSlideIndexOffset = _currentItemIndex + (_slideSize.x * _currPositionIndex - x) / _slideSize.x,\n\t\t\t\tdelta = Math.round(x - _mainScrollPos.x);\n\n\t\t\tif( (newSlideIndexOffset < 0 && delta > 0) || \n\t\t\t\t(newSlideIndexOffset >= _getNumItems() - 1 && delta < 0) ) {\n\t\t\t\tx = _mainScrollPos.x + delta * _options.mainScrollEndFriction;\n\t\t\t} \n\t\t}\n\t\t\n\t\t_mainScrollPos.x = x;\n\t\t_setTranslateX(x, _containerStyle);\n\t},\n\t_calculatePanOffset = function(axis, zoomLevel) {\n\t\tvar m = _midZoomPoint[axis] - _offset[axis];\n\t\treturn _startPanOffset[axis] + _currPanDist[axis] + m - m * ( zoomLevel / _startZoomLevel );\n\t},\n\t\n\t_equalizePoints = function(p1, p2) {\n\t\tp1.x = p2.x;\n\t\tp1.y = p2.y;\n\t\tif(p2.id) {\n\t\t\tp1.id = p2.id;\n\t\t}\n\t},\n\t_roundPoint = function(p) {\n\t\tp.x = Math.round(p.x);\n\t\tp.y = Math.round(p.y);\n\t},\n\n\t_mouseMoveTimeout = null,\n\t_onFirstMouseMove = function() {\n\t\t// Wait until mouse move event is fired at least twice during 100ms\n\t\t// We do this, because some mobile browsers trigger it on touchstart\n\t\tif(_mouseMoveTimeout ) { \n\t\t\tframework.unbind(document, 'mousemove', _onFirstMouseMove);\n\t\t\tframework.addClass(template, 'pswp--has_mouse');\n\t\t\t_options.mouseUsed = true;\n\t\t\t_shout('mouseUsed');\n\t\t}\n\t\t_mouseMoveTimeout = setTimeout(function() {\n\t\t\t_mouseMoveTimeout = null;\n\t\t}, 100);\n\t},\n\n\t_bindEvents = function() {\n\t\tframework.bind(document, 'keydown', self);\n\n\t\tif(_features.transform) {\n\t\t\t// don't bind click event in browsers that don't support transform (mostly IE8)\n\t\t\tframework.bind(self.scrollWrap, 'click', self);\n\t\t}\n\t\t\n\n\t\tif(!_options.mouseUsed) {\n\t\t\tframework.bind(document, 'mousemove', _onFirstMouseMove);\n\t\t}\n\n\t\tframework.bind(window, 'resize scroll orientationchange', self);\n\n\t\t_shout('bindEvents');\n\t},\n\n\t_unbindEvents = function() {\n\t\tframework.unbind(window, 'resize scroll orientationchange', self);\n\t\tframework.unbind(window, 'scroll', _globalEventHandlers.scroll);\n\t\tframework.unbind(document, 'keydown', self);\n\t\tframework.unbind(document, 'mousemove', _onFirstMouseMove);\n\n\t\tif(_features.transform) {\n\t\t\tframework.unbind(self.scrollWrap, 'click', self);\n\t\t}\n\n\t\tif(_isDragging) {\n\t\t\tframework.unbind(window, _upMoveEvents, self);\n\t\t}\n\n\t\tclearTimeout(_orientationChangeTimeout);\n\n\t\t_shout('unbindEvents');\n\t},\n\t\n\t_calculatePanBounds = function(zoomLevel, update) {\n\t\tvar bounds = _calculateItemSize( self.currItem, _viewportSize, zoomLevel );\n\t\tif(update) {\n\t\t\t_currPanBounds = bounds;\n\t\t}\n\t\treturn bounds;\n\t},\n\t\n\t_getMinZoomLevel = function(item) {\n\t\tif(!item) {\n\t\t\titem = self.currItem;\n\t\t}\n\t\treturn item.initialZoomLevel;\n\t},\n\t_getMaxZoomLevel = function(item) {\n\t\tif(!item) {\n\t\t\titem = self.currItem;\n\t\t}\n\t\treturn item.w > 0 ? _options.maxSpreadZoom : 1;\n\t},\n\n\t// Return true if offset is out of the bounds\n\t_modifyDestPanOffset = function(axis, destPanBounds, destPanOffset, destZoomLevel) {\n\t\tif(destZoomLevel === self.currItem.initialZoomLevel) {\n\t\t\tdestPanOffset[axis] = self.currItem.initialPosition[axis];\n\t\t\treturn true;\n\t\t} else {\n\t\t\tdestPanOffset[axis] = _calculatePanOffset(axis, destZoomLevel); \n\n\t\t\tif(destPanOffset[axis] > destPanBounds.min[axis]) {\n\t\t\t\tdestPanOffset[axis] = destPanBounds.min[axis];\n\t\t\t\treturn true;\n\t\t\t} else if(destPanOffset[axis] < destPanBounds.max[axis] ) {\n\t\t\t\tdestPanOffset[axis] = destPanBounds.max[axis];\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t},\n\n\t_setupTransforms = function() {\n\n\t\tif(_transformKey) {\n\t\t\t// setup 3d transforms\n\t\t\tvar allow3dTransform = _features.perspective && !_likelyTouchDevice;\n\t\t\t_translatePrefix = 'translate' + (allow3dTransform ? '3d(' : '(');\n\t\t\t_translateSufix = _features.perspective ? ', 0px)' : ')';\t\n\t\t\treturn;\n\t\t}\n\n\t\t// Override zoom/pan/move functions in case old browser is used (most likely IE)\n\t\t// (so they use left/top/width/height, instead of CSS transform)\n\t\n\t\t_transformKey = 'left';\n\t\tframework.addClass(template, 'pswp--ie');\n\n\t\t_setTranslateX = function(x, elStyle) {\n\t\t\telStyle.left = x + 'px';\n\t\t};\n\t\t_applyZoomPanToItem = function(item) {\n\n\t\t\tvar zoomRatio = item.fitRatio > 1 ? 1 : item.fitRatio,\n\t\t\t\ts = item.container.style,\n\t\t\t\tw = zoomRatio * item.w,\n\t\t\t\th = zoomRatio * item.h;\n\n\t\t\ts.width = w + 'px';\n\t\t\ts.height = h + 'px';\n\t\t\ts.left = item.initialPosition.x + 'px';\n\t\t\ts.top = item.initialPosition.y + 'px';\n\n\t\t};\n\t\t_applyCurrentZoomPan = function() {\n\t\t\tif(_currZoomElementStyle) {\n\n\t\t\t\tvar s = _currZoomElementStyle,\n\t\t\t\t\titem = self.currItem,\n\t\t\t\t\tzoomRatio = item.fitRatio > 1 ? 1 : item.fitRatio,\n\t\t\t\t\tw = zoomRatio * item.w,\n\t\t\t\t\th = zoomRatio * item.h;\n\n\t\t\t\ts.width = w + 'px';\n\t\t\t\ts.height = h + 'px';\n\n\n\t\t\t\ts.left = _panOffset.x + 'px';\n\t\t\t\ts.top = _panOffset.y + 'px';\n\t\t\t}\n\t\t\t\n\t\t};\n\t},\n\n\t_onKeyDown = function(e) {\n\t\tvar keydownAction = '';\n\t\tif(_options.escKey && e.keyCode === 27) { \n\t\t\tkeydownAction = 'close';\n\t\t} else if(_options.arrowKeys) {\n\t\t\tif(e.keyCode === 37) {\n\t\t\t\tkeydownAction = 'prev';\n\t\t\t} else if(e.keyCode === 39) { \n\t\t\t\tkeydownAction = 'next';\n\t\t\t}\n\t\t}\n\n\t\tif(keydownAction) {\n\t\t\t// don't do anything if special key pressed to prevent from overriding default browser actions\n\t\t\t// e.g. in Chrome on Mac cmd+arrow-left returns to previous page\n\t\t\tif( !e.ctrlKey && !e.altKey && !e.shiftKey && !e.metaKey ) {\n\t\t\t\tif(e.preventDefault) {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t} else {\n\t\t\t\t\te.returnValue = false;\n\t\t\t\t} \n\t\t\t\tself[keydownAction]();\n\t\t\t}\n\t\t}\n\t},\n\n\t_onGlobalClick = function(e) {\n\t\tif(!e) {\n\t\t\treturn;\n\t\t}\n\n\t\t// don't allow click event to pass through when triggering after drag or some other gesture\n\t\tif(_moved || _zoomStarted || _mainScrollAnimating || _verticalDragInitiated) {\n\t\t\te.preventDefault();\n\t\t\te.stopPropagation();\n\t\t}\n\t},\n\n\t_updatePageScrollOffset = function() {\n\t\tself.setScrollOffset(0, framework.getScrollY());\t\t\n\t};\n\t\n\n\n\t\n\n\n\n// Micro animation engine\nvar _animations = {},\n\t_numAnimations = 0,\n\t_stopAnimation = function(name) {\n\t\tif(_animations[name]) {\n\t\t\tif(_animations[name].raf) {\n\t\t\t\t_cancelAF( _animations[name].raf );\n\t\t\t}\n\t\t\t_numAnimations--;\n\t\t\tdelete _animations[name];\n\t\t}\n\t},\n\t_registerStartAnimation = function(name) {\n\t\tif(_animations[name]) {\n\t\t\t_stopAnimation(name);\n\t\t}\n\t\tif(!_animations[name]) {\n\t\t\t_numAnimations++;\n\t\t\t_animations[name] = {};\n\t\t}\n\t},\n\t_stopAllAnimations = function() {\n\t\tfor (var prop in _animations) {\n\n\t\t\tif( _animations.hasOwnProperty( prop ) ) {\n\t\t\t\t_stopAnimation(prop);\n\t\t\t} \n\t\t\t\n\t\t}\n\t},\n\t_animateProp = function(name, b, endProp, d, easingFn, onUpdate, onComplete) {\n\t\tvar startAnimTime = _getCurrentTime(), t;\n\t\t_registerStartAnimation(name);\n\n\t\tvar animloop = function(){\n\t\t\tif ( _animations[name] ) {\n\t\t\t\t\n\t\t\t\tt = _getCurrentTime() - startAnimTime; // time diff\n\t\t\t\t//b - beginning (start prop)\n\t\t\t\t//d - anim duration\n\n\t\t\t\tif ( t >= d ) {\n\t\t\t\t\t_stopAnimation(name);\n\t\t\t\t\tonUpdate(endProp);\n\t\t\t\t\tif(onComplete) {\n\t\t\t\t\t\tonComplete();\n\t\t\t\t\t}\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tonUpdate( (endProp - b) * easingFn(t/d) + b );\n\n\t\t\t\t_animations[name].raf = _requestAF(animloop);\n\t\t\t}\n\t\t};\n\t\tanimloop();\n\t};\n\t\n\n\nvar publicMethods = {\n\n\t// make a few local variables and functions public\n\tshout: _shout,\n\tlisten: _listen,\n\tviewportSize: _viewportSize,\n\toptions: _options,\n\n\tisMainScrollAnimating: function() {\n\t\treturn _mainScrollAnimating;\n\t},\n\tgetZoomLevel: function() {\n\t\treturn _currZoomLevel;\n\t},\n\tgetCurrentIndex: function() {\n\t\treturn _currentItemIndex;\n\t},\n\tisDragging: function() {\n\t\treturn _isDragging;\n\t},\t\n\tisZooming: function() {\n\t\treturn _isZooming;\n\t},\n\tsetScrollOffset: function(x,y) {\n\t\t_offset.x = x;\n\t\t_currentWindowScrollY = _offset.y = y;\n\t\t_shout('updateScrollOffset', _offset);\n\t},\n\tapplyZoomPan: function(zoomLevel,panX,panY,allowRenderResolution) {\n\t\t_panOffset.x = panX;\n\t\t_panOffset.y = panY;\n\t\t_currZoomLevel = zoomLevel;\n\t\t_applyCurrentZoomPan( allowRenderResolution );\n\t},\n\n\tinit: function() {\n\n\t\tif(_isOpen || _isDestroying) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar i;\n\n\t\tself.framework = framework; // basic functionality\n\t\tself.template = template; // root DOM element of PhotoSwipe\n\t\tself.bg = framework.getChildByClass(template, 'pswp__bg');\n\n\t\t_initalClassName = template.className;\n\t\t_isOpen = true;\n\t\t\t\t\n\t\t_features = framework.detectFeatures();\n\t\t_requestAF = _features.raf;\n\t\t_cancelAF = _features.caf;\n\t\t_transformKey = _features.transform;\n\t\t_oldIE = _features.oldIE;\n\t\t\n\t\tself.scrollWrap = framework.getChildByClass(template, 'pswp__scroll-wrap');\n\t\tself.container = framework.getChildByClass(self.scrollWrap, 'pswp__container');\n\n\t\t_containerStyle = self.container.style; // for fast access\n\n\t\t// Objects that hold slides (there are only 3 in DOM)\n\t\tself.itemHolders = _itemHolders = [\n\t\t\t{el:self.container.children[0] , wrap:0, index: -1},\n\t\t\t{el:self.container.children[1] , wrap:0, index: -1},\n\t\t\t{el:self.container.children[2] , wrap:0, index: -1}\n\t\t];\n\n\t\t// hide nearby item holders until initial zoom animation finishes (to avoid extra Paints)\n\t\t_itemHolders[0].el.style.display = _itemHolders[2].el.style.display = 'none';\n\n\t\t_setupTransforms();\n\n\t\t// Setup global events\n\t\t_globalEventHandlers = {\n\t\t\tresize: self.updateSize,\n\n\t\t\t// Fixes: iOS 10.3 resize event\n\t\t\t// does not update scrollWrap.clientWidth instantly after resize\n\t\t\t// https://github.com/dimsemenov/PhotoSwipe/issues/1315\n\t\t\torientationchange: function() {\n\t\t\t\tclearTimeout(_orientationChangeTimeout);\n\t\t\t\t_orientationChangeTimeout = setTimeout(function() {\n\t\t\t\t\tif(_viewportSize.x !== self.scrollWrap.clientWidth) {\n\t\t\t\t\t\tself.updateSize();\n\t\t\t\t\t}\n\t\t\t\t}, 500);\n\t\t\t},\n\t\t\tscroll: _updatePageScrollOffset,\n\t\t\tkeydown: _onKeyDown,\n\t\t\tclick: _onGlobalClick\n\t\t};\n\n\t\t// disable show/hide effects on old browsers that don't support CSS animations or transforms, \n\t\t// old IOS, Android and Opera mobile. Blackberry seems to work fine, even older models.\n\t\tvar oldPhone = _features.isOldIOSPhone || _features.isOldAndroid || _features.isMobileOpera;\n\t\tif(!_features.animationName || !_features.transform || oldPhone) {\n\t\t\t_options.showAnimationDuration = _options.hideAnimationDuration = 0;\n\t\t}\n\n\t\t// init modules\n\t\tfor(i = 0; i < _modules.length; i++) {\n\t\t\tself['init' + _modules[i]]();\n\t\t}\n\t\t\n\t\t// init\n\t\tif(UiClass) {\n\t\t\tvar ui = self.ui = new UiClass(self, framework);\n\t\t\tui.init();\n\t\t}\n\n\t\t_shout('firstUpdate');\n\t\t_currentItemIndex = _currentItemIndex || _options.index || 0;\n\t\t// validate index\n\t\tif( isNaN(_currentItemIndex) || _currentItemIndex < 0 || _currentItemIndex >= _getNumItems() ) {\n\t\t\t_currentItemIndex = 0;\n\t\t}\n\t\tself.currItem = _getItemAt( _currentItemIndex );\n\n\t\t\n\t\tif(_features.isOldIOSPhone || _features.isOldAndroid) {\n\t\t\t_isFixedPosition = false;\n\t\t}\n\t\t\n\t\ttemplate.setAttribute('aria-hidden', 'false');\n\t\tif(_options.modal) {\n\t\t\tif(!_isFixedPosition) {\n\t\t\t\ttemplate.style.position = 'absolute';\n\t\t\t\ttemplate.style.top = framework.getScrollY() + 'px';\n\t\t\t} else {\n\t\t\t\ttemplate.style.position = 'fixed';\n\t\t\t}\n\t\t}\n\n\t\tif(_currentWindowScrollY === undefined) {\n\t\t\t_shout('initialLayout');\n\t\t\t_currentWindowScrollY = _initalWindowScrollY = framework.getScrollY();\n\t\t}\n\t\t\n\t\t// add classes to root element of PhotoSwipe\n\t\tvar rootClasses = 'pswp--open ';\n\t\tif(_options.mainClass) {\n\t\t\trootClasses += _options.mainClass + ' ';\n\t\t}\n\t\tif(_options.showHideOpacity) {\n\t\t\trootClasses += 'pswp--animate_opacity ';\n\t\t}\n\t\trootClasses += _likelyTouchDevice ? 'pswp--touch' : 'pswp--notouch';\n\t\trootClasses += _features.animationName ? ' pswp--css_animation' : '';\n\t\trootClasses += _features.svg ? ' pswp--svg' : '';\n\t\tframework.addClass(template, rootClasses);\n\n\t\tself.updateSize();\n\n\t\t// initial update\n\t\t_containerShiftIndex = -1;\n\t\t_indexDiff = null;\n\t\tfor(i = 0; i < NUM_HOLDERS; i++) {\n\t\t\t_setTranslateX( (i+_containerShiftIndex) * _slideSize.x, _itemHolders[i].el.style);\n\t\t}\n\n\t\tif(!_oldIE) {\n\t\t\tframework.bind(self.scrollWrap, _downEvents, self); // no dragging for old IE\n\t\t}\t\n\n\t\t_listen('initialZoomInEnd', function() {\n\t\t\tself.setContent(_itemHolders[0], _currentItemIndex-1);\n\t\t\tself.setContent(_itemHolders[2], _currentItemIndex+1);\n\n\t\t\t_itemHolders[0].el.style.display = _itemHolders[2].el.style.display = 'block';\n\n\t\t\tif(_options.focus) {\n\t\t\t\t// focus causes layout, \n\t\t\t\t// which causes lag during the animation, \n\t\t\t\t// that's why we delay it untill the initial zoom transition ends\n\t\t\t\ttemplate.focus();\n\t\t\t}\n\t\t\t \n\n\t\t\t_bindEvents();\n\t\t});\n\n\t\t// set content for center slide (first time)\n\t\tself.setContent(_itemHolders[1], _currentItemIndex);\n\t\t\n\t\tself.updateCurrItem();\n\n\t\t_shout('afterInit');\n\n\t\tif(!_isFixedPosition) {\n\n\t\t\t// On all versions of iOS lower than 8.0, we check size of viewport every second.\n\t\t\t// \n\t\t\t// This is done to detect when Safari top & bottom bars appear, \n\t\t\t// as this action doesn't trigger any events (like resize). \n\t\t\t// \n\t\t\t// On iOS8 they fixed this.\n\t\t\t// \n\t\t\t// 10 Nov 2014: iOS 7 usage ~40%. iOS 8 usage 56%.\n\t\t\t\n\t\t\t_updateSizeInterval = setInterval(function() {\n\t\t\t\tif(!_numAnimations && !_isDragging && !_isZooming && (_currZoomLevel === self.currItem.initialZoomLevel) ) {\n\t\t\t\t\tself.updateSize();\n\t\t\t\t}\n\t\t\t}, 1000);\n\t\t}\n\n\t\tframework.addClass(template, 'pswp--visible');\n\t},\n\n\t// Close the gallery, then destroy it\n\tclose: function() {\n\t\tif(!_isOpen) {\n\t\t\treturn;\n\t\t}\n\n\t\t_isOpen = false;\n\t\t_isDestroying = true;\n\t\t_shout('close');\n\t\t_unbindEvents();\n\n\t\t_showOrHide(self.currItem, null, true, self.destroy);\n\t},\n\n\t// destroys the gallery (unbinds events, cleans up intervals and timeouts to avoid memory leaks)\n\tdestroy: function() {\n\t\t_shout('destroy');\n\n\t\tif(_showOrHideTimeout) {\n\t\t\tclearTimeout(_showOrHideTimeout);\n\t\t}\n\t\t\n\t\ttemplate.setAttribute('aria-hidden', 'true');\n\t\ttemplate.className = _initalClassName;\n\n\t\tif(_updateSizeInterval) {\n\t\t\tclearInterval(_updateSizeInterval);\n\t\t}\n\n\t\tframework.unbind(self.scrollWrap, _downEvents, self);\n\n\t\t// we unbind scroll event at the end, as closing animation may depend on it\n\t\tframework.unbind(window, 'scroll', self);\n\n\t\t_stopDragUpdateLoop();\n\n\t\t_stopAllAnimations();\n\n\t\t_listeners = null;\n\t},\n\n\t/**\n\t * Pan image to position\n\t * @param {Number} x \n\t * @param {Number} y \n\t * @param {Boolean} force Will ignore bounds if set to true.\n\t */\n\tpanTo: function(x,y,force) {\n\t\tif(!force) {\n\t\t\tif(x > _currPanBounds.min.x) {\n\t\t\t\tx = _currPanBounds.min.x;\n\t\t\t} else if(x < _currPanBounds.max.x) {\n\t\t\t\tx = _currPanBounds.max.x;\n\t\t\t}\n\n\t\t\tif(y > _currPanBounds.min.y) {\n\t\t\t\ty = _currPanBounds.min.y;\n\t\t\t} else if(y < _currPanBounds.max.y) {\n\t\t\t\ty = _currPanBounds.max.y;\n\t\t\t}\n\t\t}\n\t\t\n\t\t_panOffset.x = x;\n\t\t_panOffset.y = y;\n\t\t_applyCurrentZoomPan();\n\t},\n\t\n\thandleEvent: function (e) {\n\t\te = e || window.event;\n\t\tif(_globalEventHandlers[e.type]) {\n\t\t\t_globalEventHandlers[e.type](e);\n\t\t}\n\t},\n\n\n\tgoTo: function(index) {\n\n\t\tindex = _getLoopedId(index);\n\n\t\tvar diff = index - _currentItemIndex;\n\t\t_indexDiff = diff;\n\n\t\t_currentItemIndex = index;\n\t\tself.currItem = _getItemAt( _currentItemIndex );\n\t\t_currPositionIndex -= diff;\n\t\t\n\t\t_moveMainScroll(_slideSize.x * _currPositionIndex);\n\t\t\n\n\t\t_stopAllAnimations();\n\t\t_mainScrollAnimating = false;\n\n\t\tself.updateCurrItem();\n\t},\n\tnext: function() {\n\t\tself.goTo( _currentItemIndex + 1);\n\t},\n\tprev: function() {\n\t\tself.goTo( _currentItemIndex - 1);\n\t},\n\n\t// update current zoom/pan objects\n\tupdateCurrZoomItem: function(emulateSetContent) {\n\t\tif(emulateSetContent) {\n\t\t\t_shout('beforeChange', 0);\n\t\t}\n\n\t\t// itemHolder[1] is middle (current) item\n\t\tif(_itemHolders[1].el.children.length) {\n\t\t\tvar zoomElement = _itemHolders[1].el.children[0];\n\t\t\tif( framework.hasClass(zoomElement, 'pswp__zoom-wrap') ) {\n\t\t\t\t_currZoomElementStyle = zoomElement.style;\n\t\t\t} else {\n\t\t\t\t_currZoomElementStyle = null;\n\t\t\t}\n\t\t} else {\n\t\t\t_currZoomElementStyle = null;\n\t\t}\n\t\t\n\t\t_currPanBounds = self.currItem.bounds;\t\n\t\t_startZoomLevel = _currZoomLevel = self.currItem.initialZoomLevel;\n\n\t\t_panOffset.x = _currPanBounds.center.x;\n\t\t_panOffset.y = _currPanBounds.center.y;\n\n\t\tif(emulateSetContent) {\n\t\t\t_shout('afterChange');\n\t\t}\n\t},\n\n\n\tinvalidateCurrItems: function() {\n\t\t_itemsNeedUpdate = true;\n\t\tfor(var i = 0; i < NUM_HOLDERS; i++) {\n\t\t\tif( _itemHolders[i].item ) {\n\t\t\t\t_itemHolders[i].item.needsUpdate = true;\n\t\t\t}\n\t\t}\n\t},\n\n\tupdateCurrItem: function(beforeAnimation) {\n\n\t\tif(_indexDiff === 0) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar diffAbs = Math.abs(_indexDiff),\n\t\t\ttempHolder;\n\n\t\tif(beforeAnimation && diffAbs < 2) {\n\t\t\treturn;\n\t\t}\n\n\n\t\tself.currItem = _getItemAt( _currentItemIndex );\n\t\t_renderMaxResolution = false;\n\t\t\n\t\t_shout('beforeChange', _indexDiff);\n\n\t\tif(diffAbs >= NUM_HOLDERS) {\n\t\t\t_containerShiftIndex += _indexDiff + (_indexDiff > 0 ? -NUM_HOLDERS : NUM_HOLDERS);\n\t\t\tdiffAbs = NUM_HOLDERS;\n\t\t}\n\t\tfor(var i = 0; i < diffAbs; i++) {\n\t\t\tif(_indexDiff > 0) {\n\t\t\t\ttempHolder = _itemHolders.shift();\n\t\t\t\t_itemHolders[NUM_HOLDERS-1] = tempHolder; // move first to last\n\n\t\t\t\t_containerShiftIndex++;\n\t\t\t\t_setTranslateX( (_containerShiftIndex+2) * _slideSize.x, tempHolder.el.style);\n\t\t\t\tself.setContent(tempHolder, _currentItemIndex - diffAbs + i + 1 + 1);\n\t\t\t} else {\n\t\t\t\ttempHolder = _itemHolders.pop();\n\t\t\t\t_itemHolders.unshift( tempHolder ); // move last to first\n\n\t\t\t\t_containerShiftIndex--;\n\t\t\t\t_setTranslateX( _containerShiftIndex * _slideSize.x, tempHolder.el.style);\n\t\t\t\tself.setContent(tempHolder, _currentItemIndex + diffAbs - i - 1 - 1);\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t\t// reset zoom/pan on previous item\n\t\tif(_currZoomElementStyle && Math.abs(_indexDiff) === 1) {\n\n\t\t\tvar prevItem = _getItemAt(_prevItemIndex);\n\t\t\tif(prevItem.initialZoomLevel !== _currZoomLevel) {\n\t\t\t\t_calculateItemSize(prevItem , _viewportSize );\n\t\t\t\t_setImageSize(prevItem);\n\t\t\t\t_applyZoomPanToItem( prevItem ); \t\t\t\t\n\t\t\t}\n\n\t\t}\n\n\t\t// reset diff after update\n\t\t_indexDiff = 0;\n\n\t\tself.updateCurrZoomItem();\n\n\t\t_prevItemIndex = _currentItemIndex;\n\n\t\t_shout('afterChange');\n\t\t\n\t},\n\n\n\n\tupdateSize: function(force) {\n\t\t\n\t\tif(!_isFixedPosition && _options.modal) {\n\t\t\tvar windowScrollY = framework.getScrollY();\n\t\t\tif(_currentWindowScrollY !== windowScrollY) {\n\t\t\t\ttemplate.style.top = windowScrollY + 'px';\n\t\t\t\t_currentWindowScrollY = windowScrollY;\n\t\t\t}\n\t\t\tif(!force && _windowVisibleSize.x === window.innerWidth && _windowVisibleSize.y === window.innerHeight) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t_windowVisibleSize.x = window.innerWidth;\n\t\t\t_windowVisibleSize.y = window.innerHeight;\n\n\t\t\t//template.style.width = _windowVisibleSize.x + 'px';\n\t\t\ttemplate.style.height = _windowVisibleSize.y + 'px';\n\t\t}\n\n\n\n\t\t_viewportSize.x = self.scrollWrap.clientWidth;\n\t\t_viewportSize.y = self.scrollWrap.clientHeight;\n\n\t\t_updatePageScrollOffset();\n\n\t\t_slideSize.x = _viewportSize.x + Math.round(_viewportSize.x * _options.spacing);\n\t\t_slideSize.y = _viewportSize.y;\n\n\t\t_moveMainScroll(_slideSize.x * _currPositionIndex);\n\n\t\t_shout('beforeResize'); // even may be used for example to switch image sources\n\n\n\t\t// don't re-calculate size on inital size update\n\t\tif(_containerShiftIndex !== undefined) {\n\n\t\t\tvar holder,\n\t\t\t\titem,\n\t\t\t\thIndex;\n\n\t\t\tfor(var i = 0; i < NUM_HOLDERS; i++) {\n\t\t\t\tholder = _itemHolders[i];\n\t\t\t\t_setTranslateX( (i+_containerShiftIndex) * _slideSize.x, holder.el.style);\n\n\t\t\t\thIndex = _currentItemIndex+i-1;\n\n\t\t\t\tif(_options.loop && _getNumItems() > 2) {\n\t\t\t\t\thIndex = _getLoopedId(hIndex);\n\t\t\t\t}\n\n\t\t\t\t// update zoom level on items and refresh source (if needsUpdate)\n\t\t\t\titem = _getItemAt( hIndex );\n\n\t\t\t\t// re-render gallery item if `needsUpdate`,\n\t\t\t\t// or doesn't have `bounds` (entirely new slide object)\n\t\t\t\tif( item && (_itemsNeedUpdate || item.needsUpdate || !item.bounds) ) {\n\n\t\t\t\t\tself.cleanSlide( item );\n\t\t\t\t\t\n\t\t\t\t\tself.setContent( holder, hIndex );\n\n\t\t\t\t\t// if \"center\" slide\n\t\t\t\t\tif(i === 1) {\n\t\t\t\t\t\tself.currItem = item;\n\t\t\t\t\t\tself.updateCurrZoomItem(true);\n\t\t\t\t\t}\n\n\t\t\t\t\titem.needsUpdate = false;\n\n\t\t\t\t} else if(holder.index === -1 && hIndex >= 0) {\n\t\t\t\t\t// add content first time\n\t\t\t\t\tself.setContent( holder, hIndex );\n\t\t\t\t}\n\t\t\t\tif(item && item.container) {\n\t\t\t\t\t_calculateItemSize(item, _viewportSize);\n\t\t\t\t\t_setImageSize(item);\n\t\t\t\t\t_applyZoomPanToItem( item );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t_itemsNeedUpdate = false;\n\t\t}\t\n\n\t\t_startZoomLevel = _currZoomLevel = self.currItem.initialZoomLevel;\n\t\t_currPanBounds = self.currItem.bounds;\n\n\t\tif(_currPanBounds) {\n\t\t\t_panOffset.x = _currPanBounds.center.x;\n\t\t\t_panOffset.y = _currPanBounds.center.y;\n\t\t\t_applyCurrentZoomPan( true );\n\t\t}\n\t\t\n\t\t_shout('resize');\n\t},\n\t\n\t// Zoom current item to\n\tzoomTo: function(destZoomLevel, centerPoint, speed, easingFn, updateFn) {\n\t\t/*\n\t\t\tif(destZoomLevel === 'fit') {\n\t\t\t\tdestZoomLevel = self.currItem.fitRatio;\n\t\t\t} else if(destZoomLevel === 'fill') {\n\t\t\t\tdestZoomLevel = self.currItem.fillRatio;\n\t\t\t}\n\t\t*/\n\n\t\tif(centerPoint) {\n\t\t\t_startZoomLevel = _currZoomLevel;\n\t\t\t_midZoomPoint.x = Math.abs(centerPoint.x) - _panOffset.x ;\n\t\t\t_midZoomPoint.y = Math.abs(centerPoint.y) - _panOffset.y ;\n\t\t\t_equalizePoints(_startPanOffset, _panOffset);\n\t\t}\n\n\t\tvar destPanBounds = _calculatePanBounds(destZoomLevel, false),\n\t\t\tdestPanOffset = {};\n\n\t\t_modifyDestPanOffset('x', destPanBounds, destPanOffset, destZoomLevel);\n\t\t_modifyDestPanOffset('y', destPanBounds, destPanOffset, destZoomLevel);\n\n\t\tvar initialZoomLevel = _currZoomLevel;\n\t\tvar initialPanOffset = {\n\t\t\tx: _panOffset.x,\n\t\t\ty: _panOffset.y\n\t\t};\n\n\t\t_roundPoint(destPanOffset);\n\n\t\tvar onUpdate = function(now) {\n\t\t\tif(now === 1) {\n\t\t\t\t_currZoomLevel = destZoomLevel;\n\t\t\t\t_panOffset.x = destPanOffset.x;\n\t\t\t\t_panOffset.y = destPanOffset.y;\n\t\t\t} else {\n\t\t\t\t_currZoomLevel = (destZoomLevel - initialZoomLevel) * now + initialZoomLevel;\n\t\t\t\t_panOffset.x = (destPanOffset.x - initialPanOffset.x) * now + initialPanOffset.x;\n\t\t\t\t_panOffset.y = (destPanOffset.y - initialPanOffset.y) * now + initialPanOffset.y;\n\t\t\t}\n\n\t\t\tif(updateFn) {\n\t\t\t\tupdateFn(now);\n\t\t\t}\n\n\t\t\t_applyCurrentZoomPan( now === 1 );\n\t\t};\n\n\t\tif(speed) {\n\t\t\t_animateProp('customZoomTo', 0, 1, speed, easingFn || framework.easing.sine.inOut, onUpdate);\n\t\t} else {\n\t\t\tonUpdate(1);\n\t\t}\n\t}\n\n\n};\n\n\n/*>>core*/\n\n/*>>gestures*/\n/**\n * Mouse/touch/pointer event handlers.\n * \n * separated from @core.js for readability\n */\n\nvar MIN_SWIPE_DISTANCE = 30,\n\tDIRECTION_CHECK_OFFSET = 10; // amount of pixels to drag to determine direction of swipe\n\nvar _gestureStartTime,\n\t_gestureCheckSpeedTime,\n\n\t// pool of objects that are used during dragging of zooming\n\tp = {}, // first point\n\tp2 = {}, // second point (for zoom gesture)\n\tdelta = {},\n\t_currPoint = {},\n\t_startPoint = {},\n\t_currPointers = [],\n\t_startMainScrollPos = {},\n\t_releaseAnimData,\n\t_posPoints = [], // array of points during dragging, used to determine type of gesture\n\t_tempPoint = {},\n\n\t_isZoomingIn,\n\t_verticalDragInitiated,\n\t_oldAndroidTouchEndTimeout,\n\t_currZoomedItemIndex = 0,\n\t_centerPoint = _getEmptyPoint(),\n\t_lastReleaseTime = 0,\n\t_isDragging, // at least one pointer is down\n\t_isMultitouch, // at least two _pointers are down\n\t_zoomStarted, // zoom level changed during zoom gesture\n\t_moved,\n\t_dragAnimFrame,\n\t_mainScrollShifted,\n\t_currentPoints, // array of current touch points\n\t_isZooming,\n\t_currPointsDistance,\n\t_startPointsDistance,\n\t_currPanBounds,\n\t_mainScrollPos = _getEmptyPoint(),\n\t_currZoomElementStyle,\n\t_mainScrollAnimating, // true, if animation after swipe gesture is running\n\t_midZoomPoint = _getEmptyPoint(),\n\t_currCenterPoint = _getEmptyPoint(),\n\t_direction,\n\t_isFirstMove,\n\t_opacityChanged,\n\t_bgOpacity,\n\t_wasOverInitialZoom,\n\n\t_isEqualPoints = function(p1, p2) {\n\t\treturn p1.x === p2.x && p1.y === p2.y;\n\t},\n\t_isNearbyPoints = function(touch0, touch1) {\n\t\treturn Math.abs(touch0.x - touch1.x) < DOUBLE_TAP_RADIUS && Math.abs(touch0.y - touch1.y) < DOUBLE_TAP_RADIUS;\n\t},\n\t_calculatePointsDistance = function(p1, p2) {\n\t\t_tempPoint.x = Math.abs( p1.x - p2.x );\n\t\t_tempPoint.y = Math.abs( p1.y - p2.y );\n\t\treturn Math.sqrt(_tempPoint.x * _tempPoint.x + _tempPoint.y * _tempPoint.y);\n\t},\n\t_stopDragUpdateLoop = function() {\n\t\tif(_dragAnimFrame) {\n\t\t\t_cancelAF(_dragAnimFrame);\n\t\t\t_dragAnimFrame = null;\n\t\t}\n\t},\n\t_dragUpdateLoop = function() {\n\t\tif(_isDragging) {\n\t\t\t_dragAnimFrame = _requestAF(_dragUpdateLoop);\n\t\t\t_renderMovement();\n\t\t}\n\t},\n\t_canPan = function() {\n\t\treturn !(_options.scaleMode === 'fit' && _currZoomLevel === self.currItem.initialZoomLevel);\n\t},\n\t\n\t// find the closest parent DOM element\n\t_closestElement = function(el, fn) {\n\t \tif(!el || el === document) {\n\t \t\treturn false;\n\t \t}\n\n\t \t// don't search elements above pswp__scroll-wrap\n\t \tif(el.getAttribute('class') && el.getAttribute('class').indexOf('pswp__scroll-wrap') > -1 ) {\n\t \t\treturn false;\n\t \t}\n\n\t \tif( fn(el) ) {\n\t \t\treturn el;\n\t \t}\n\n\t \treturn _closestElement(el.parentNode, fn);\n\t},\n\n\t_preventObj = {},\n\t_preventDefaultEventBehaviour = function(e, isDown) {\n\t _preventObj.prevent = !_closestElement(e.target, _options.isClickableElement);\n\n\t\t_shout('preventDragEvent', e, isDown, _preventObj);\n\t\treturn _preventObj.prevent;\n\n\t},\n\t_convertTouchToPoint = function(touch, p) {\n\t\tp.x = touch.pageX;\n\t\tp.y = touch.pageY;\n\t\tp.id = touch.identifier;\n\t\treturn p;\n\t},\n\t_findCenterOfPoints = function(p1, p2, pCenter) {\n\t\tpCenter.x = (p1.x + p2.x) * 0.5;\n\t\tpCenter.y = (p1.y + p2.y) * 0.5;\n\t},\n\t_pushPosPoint = function(time, x, y) {\n\t\tif(time - _gestureCheckSpeedTime > 50) {\n\t\t\tvar o = _posPoints.length > 2 ? _posPoints.shift() : {};\n\t\t\to.x = x;\n\t\t\to.y = y; \n\t\t\t_posPoints.push(o);\n\t\t\t_gestureCheckSpeedTime = time;\n\t\t}\n\t},\n\n\t_calculateVerticalDragOpacityRatio = function() {\n\t\tvar yOffset = _panOffset.y - self.currItem.initialPosition.y; // difference between initial and current position\n\t\treturn 1 - Math.abs( yOffset / (_viewportSize.y / 2) );\n\t},\n\n\t\n\t// points pool, reused during touch events\n\t_ePoint1 = {},\n\t_ePoint2 = {},\n\t_tempPointsArr = [],\n\t_tempCounter,\n\t_getTouchPoints = function(e) {\n\t\t// clean up previous points, without recreating array\n\t\twhile(_tempPointsArr.length > 0) {\n\t\t\t_tempPointsArr.pop();\n\t\t}\n\n\t\tif(!_pointerEventEnabled) {\n\t\t\tif(e.type.indexOf('touch') > -1) {\n\n\t\t\t\tif(e.touches && e.touches.length > 0) {\n\t\t\t\t\t_tempPointsArr[0] = _convertTouchToPoint(e.touches[0], _ePoint1);\n\t\t\t\t\tif(e.touches.length > 1) {\n\t\t\t\t\t\t_tempPointsArr[1] = _convertTouchToPoint(e.touches[1], _ePoint2);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t_ePoint1.x = e.pageX;\n\t\t\t\t_ePoint1.y = e.pageY;\n\t\t\t\t_ePoint1.id = '';\n\t\t\t\t_tempPointsArr[0] = _ePoint1;//_ePoint1;\n\t\t\t}\n\t\t} else {\n\t\t\t_tempCounter = 0;\n\t\t\t// we can use forEach, as pointer events are supported only in modern browsers\n\t\t\t_currPointers.forEach(function(p) {\n\t\t\t\tif(_tempCounter === 0) {\n\t\t\t\t\t_tempPointsArr[0] = p;\n\t\t\t\t} else if(_tempCounter === 1) {\n\t\t\t\t\t_tempPointsArr[1] = p;\n\t\t\t\t}\n\t\t\t\t_tempCounter++;\n\n\t\t\t});\n\t\t}\n\t\treturn _tempPointsArr;\n\t},\n\n\t_panOrMoveMainScroll = function(axis, delta) {\n\n\t\tvar panFriction,\n\t\t\toverDiff = 0,\n\t\t\tnewOffset = _panOffset[axis] + delta[axis],\n\t\t\tstartOverDiff,\n\t\t\tdir = delta[axis] > 0,\n\t\t\tnewMainScrollPosition = _mainScrollPos.x + delta.x,\n\t\t\tmainScrollDiff = _mainScrollPos.x - _startMainScrollPos.x,\n\t\t\tnewPanPos,\n\t\t\tnewMainScrollPos;\n\n\t\t// calculate fdistance over the bounds and friction\n\t\tif(newOffset > _currPanBounds.min[axis] || newOffset < _currPanBounds.max[axis]) {\n\t\t\tpanFriction = _options.panEndFriction;\n\t\t\t// Linear increasing of friction, so at 1/4 of viewport it's at max value. \n\t\t\t// Looks not as nice as was expected. Left for history.\n\t\t\t// panFriction = (1 - (_panOffset[axis] + delta[axis] + panBounds.min[axis]) / (_viewportSize[axis] / 4) );\n\t\t} else {\n\t\t\tpanFriction = 1;\n\t\t}\n\t\t\n\t\tnewOffset = _panOffset[axis] + delta[axis] * panFriction;\n\n\t\t// move main scroll or start panning\n\t\tif(_options.allowPanToNext || _currZoomLevel === self.currItem.initialZoomLevel) {\n\n\n\t\t\tif(!_currZoomElementStyle) {\n\t\t\t\t\n\t\t\t\tnewMainScrollPos = newMainScrollPosition;\n\n\t\t\t} else if(_direction === 'h' && axis === 'x' && !_zoomStarted ) {\n\t\t\t\t\n\t\t\t\tif(dir) {\n\t\t\t\t\tif(newOffset > _currPanBounds.min[axis]) {\n\t\t\t\t\t\tpanFriction = _options.panEndFriction;\n\t\t\t\t\t\toverDiff = _currPanBounds.min[axis] - newOffset;\n\t\t\t\t\t\tstartOverDiff = _currPanBounds.min[axis] - _startPanOffset[axis];\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// drag right\n\t\t\t\t\tif( (startOverDiff <= 0 || mainScrollDiff < 0) && _getNumItems() > 1 ) {\n\t\t\t\t\t\tnewMainScrollPos = newMainScrollPosition;\n\t\t\t\t\t\tif(mainScrollDiff < 0 && newMainScrollPosition > _startMainScrollPos.x) {\n\t\t\t\t\t\t\tnewMainScrollPos = _startMainScrollPos.x;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif(_currPanBounds.min.x !== _currPanBounds.max.x) {\n\t\t\t\t\t\t\tnewPanPos = newOffset;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\tif(newOffset < _currPanBounds.max[axis] ) {\n\t\t\t\t\t\tpanFriction =_options.panEndFriction;\n\t\t\t\t\t\toverDiff = newOffset - _currPanBounds.max[axis];\n\t\t\t\t\t\tstartOverDiff = _startPanOffset[axis] - _currPanBounds.max[axis];\n\t\t\t\t\t}\n\n\t\t\t\t\tif( (startOverDiff <= 0 || mainScrollDiff > 0) && _getNumItems() > 1 ) {\n\t\t\t\t\t\tnewMainScrollPos = newMainScrollPosition;\n\n\t\t\t\t\t\tif(mainScrollDiff > 0 && newMainScrollPosition < _startMainScrollPos.x) {\n\t\t\t\t\t\t\tnewMainScrollPos = _startMainScrollPos.x;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif(_currPanBounds.min.x !== _currPanBounds.max.x) {\n\t\t\t\t\t\t\tnewPanPos = newOffset;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\n\t\t\t\t//\n\t\t\t}\n\n\t\t\tif(axis === 'x') {\n\n\t\t\t\tif(newMainScrollPos !== undefined) {\n\t\t\t\t\t_moveMainScroll(newMainScrollPos, true);\n\t\t\t\t\tif(newMainScrollPos === _startMainScrollPos.x) {\n\t\t\t\t\t\t_mainScrollShifted = false;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t_mainScrollShifted = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif(_currPanBounds.min.x !== _currPanBounds.max.x) {\n\t\t\t\t\tif(newPanPos !== undefined) {\n\t\t\t\t\t\t_panOffset.x = newPanPos;\n\t\t\t\t\t} else if(!_mainScrollShifted) {\n\t\t\t\t\t\t_panOffset.x += delta.x * panFriction;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn newMainScrollPos !== undefined;\n\t\t\t}\n\n\t\t}\n\n\t\tif(!_mainScrollAnimating) {\n\t\t\t\n\t\t\tif(!_mainScrollShifted) {\n\t\t\t\tif(_currZoomLevel > self.currItem.fitRatio) {\n\t\t\t\t\t_panOffset[axis] += delta[axis] * panFriction;\n\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t\n\t\t}\n\t\t\n\t},\n\n\t// Pointerdown/touchstart/mousedown handler\n\t_onDragStart = function(e) {\n\n\t\t// Allow dragging only via left mouse button.\n\t\t// As this handler is not added in IE8 - we ignore e.which\n\t\t// \n\t\t// http://www.quirksmode.org/js/events_properties.html\n\t\t// https://developer.mozilla.org/en-US/docs/Web/API/event.button\n\t\tif(e.type === 'mousedown' && e.button > 0 ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif(_initialZoomRunning) {\n\t\t\te.preventDefault();\n\t\t\treturn;\n\t\t}\n\n\t\tif(_oldAndroidTouchEndTimeout && e.type === 'mousedown') {\n\t\t\treturn;\n\t\t}\n\n\t\tif(_preventDefaultEventBehaviour(e, true)) {\n\t\t\te.preventDefault();\n\t\t}\n\n\n\n\t\t_shout('pointerDown');\n\n\t\tif(_pointerEventEnabled) {\n\t\t\tvar pointerIndex = framework.arraySearch(_currPointers, e.pointerId, 'id');\n\t\t\tif(pointerIndex < 0) {\n\t\t\t\tpointerIndex = _currPointers.length;\n\t\t\t}\n\t\t\t_currPointers[pointerIndex] = {x:e.pageX, y:e.pageY, id: e.pointerId};\n\t\t}\n\t\t\n\n\n\t\tvar startPointsList = _getTouchPoints(e),\n\t\t\tnumPoints = startPointsList.length;\n\n\t\t_currentPoints = null;\n\n\t\t_stopAllAnimations();\n\n\t\t// init drag\n\t\tif(!_isDragging || numPoints === 1) {\n\n\t\t\t\n\n\t\t\t_isDragging = _isFirstMove = true;\n\t\t\tframework.bind(window, _upMoveEvents, self);\n\n\t\t\t_isZoomingIn = \n\t\t\t\t_wasOverInitialZoom = \n\t\t\t\t_opacityChanged = \n\t\t\t\t_verticalDragInitiated = \n\t\t\t\t_mainScrollShifted = \n\t\t\t\t_moved = \n\t\t\t\t_isMultitouch = \n\t\t\t\t_zoomStarted = false;\n\n\t\t\t_direction = null;\n\n\t\t\t_shout('firstTouchStart', startPointsList);\n\n\t\t\t_equalizePoints(_startPanOffset, _panOffset);\n\n\t\t\t_currPanDist.x = _currPanDist.y = 0;\n\t\t\t_equalizePoints(_currPoint, startPointsList[0]);\n\t\t\t_equalizePoints(_startPoint, _currPoint);\n\n\t\t\t//_equalizePoints(_startMainScrollPos, _mainScrollPos);\n\t\t\t_startMainScrollPos.x = _slideSize.x * _currPositionIndex;\n\n\t\t\t_posPoints = [{\n\t\t\t\tx: _currPoint.x,\n\t\t\t\ty: _currPoint.y\n\t\t\t}];\n\n\t\t\t_gestureCheckSpeedTime = _gestureStartTime = _getCurrentTime();\n\n\t\t\t//_mainScrollAnimationEnd(true);\n\t\t\t_calculatePanBounds( _currZoomLevel, true );\n\t\t\t\n\t\t\t// Start rendering\n\t\t\t_stopDragUpdateLoop();\n\t\t\t_dragUpdateLoop();\n\t\t\t\n\t\t}\n\n\t\t// init zoom\n\t\tif(!_isZooming && numPoints > 1 && !_mainScrollAnimating && !_mainScrollShifted) {\n\t\t\t_startZoomLevel = _currZoomLevel;\n\t\t\t_zoomStarted = false; // true if zoom changed at least once\n\n\t\t\t_isZooming = _isMultitouch = true;\n\t\t\t_currPanDist.y = _currPanDist.x = 0;\n\n\t\t\t_equalizePoints(_startPanOffset, _panOffset);\n\n\t\t\t_equalizePoints(p, startPointsList[0]);\n\t\t\t_equalizePoints(p2, startPointsList[1]);\n\n\t\t\t_findCenterOfPoints(p, p2, _currCenterPoint);\n\n\t\t\t_midZoomPoint.x = Math.abs(_currCenterPoint.x) - _panOffset.x;\n\t\t\t_midZoomPoint.y = Math.abs(_currCenterPoint.y) - _panOffset.y;\n\t\t\t_currPointsDistance = _startPointsDistance = _calculatePointsDistance(p, p2);\n\t\t}\n\n\n\t},\n\n\t// Pointermove/touchmove/mousemove handler\n\t_onDragMove = function(e) {\n\n\t\te.preventDefault();\n\n\t\tif(_pointerEventEnabled) {\n\t\t\tvar pointerIndex = framework.arraySearch(_currPointers, e.pointerId, 'id');\n\t\t\tif(pointerIndex > -1) {\n\t\t\t\tvar p = _currPointers[pointerIndex];\n\t\t\t\tp.x = e.pageX;\n\t\t\t\tp.y = e.pageY; \n\t\t\t}\n\t\t}\n\n\t\tif(_isDragging) {\n\t\t\tvar touchesList = _getTouchPoints(e);\n\t\t\tif(!_direction && !_moved && !_isZooming) {\n\n\t\t\t\tif(_mainScrollPos.x !== _slideSize.x * _currPositionIndex) {\n\t\t\t\t\t// if main scroll position is shifted – direction is always horizontal\n\t\t\t\t\t_direction = 'h';\n\t\t\t\t} else {\n\t\t\t\t\tvar diff = Math.abs(touchesList[0].x - _currPoint.x) - Math.abs(touchesList[0].y - _currPoint.y);\n\t\t\t\t\t// check the direction of movement\n\t\t\t\t\tif(Math.abs(diff) >= DIRECTION_CHECK_OFFSET) {\n\t\t\t\t\t\t_direction = diff > 0 ? 'h' : 'v';\n\t\t\t\t\t\t_currentPoints = touchesList;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t_currentPoints = touchesList;\n\t\t\t}\n\t\t}\t\n\t},\n\t// \n\t_renderMovement = function() {\n\n\t\tif(!_currentPoints) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar numPoints = _currentPoints.length;\n\n\t\tif(numPoints === 0) {\n\t\t\treturn;\n\t\t}\n\n\t\t_equalizePoints(p, _currentPoints[0]);\n\n\t\tdelta.x = p.x - _currPoint.x;\n\t\tdelta.y = p.y - _currPoint.y;\n\n\t\tif(_isZooming && numPoints > 1) {\n\t\t\t// Handle behaviour for more than 1 point\n\n\t\t\t_currPoint.x = p.x;\n\t\t\t_currPoint.y = p.y;\n\t\t\n\t\t\t// check if one of two points changed\n\t\t\tif( !delta.x && !delta.y && _isEqualPoints(_currentPoints[1], p2) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t_equalizePoints(p2, _currentPoints[1]);\n\n\n\t\t\tif(!_zoomStarted) {\n\t\t\t\t_zoomStarted = true;\n\t\t\t\t_shout('zoomGestureStarted');\n\t\t\t}\n\t\t\t\n\t\t\t// Distance between two points\n\t\t\tvar pointsDistance = _calculatePointsDistance(p,p2);\n\n\t\t\tvar zoomLevel = _calculateZoomLevel(pointsDistance);\n\n\t\t\t// slightly over the of initial zoom level\n\t\t\tif(zoomLevel > self.currItem.initialZoomLevel + self.currItem.initialZoomLevel / 15) {\n\t\t\t\t_wasOverInitialZoom = true;\n\t\t\t}\n\n\t\t\t// Apply the friction if zoom level is out of the bounds\n\t\t\tvar zoomFriction = 1,\n\t\t\t\tminZoomLevel = _getMinZoomLevel(),\n\t\t\t\tmaxZoomLevel = _getMaxZoomLevel();\n\n\t\t\tif ( zoomLevel < minZoomLevel ) {\n\t\t\t\t\n\t\t\t\tif(_options.pinchToClose && !_wasOverInitialZoom && _startZoomLevel <= self.currItem.initialZoomLevel) {\n\t\t\t\t\t// fade out background if zooming out\n\t\t\t\t\tvar minusDiff = minZoomLevel - zoomLevel;\n\t\t\t\t\tvar percent = 1 - minusDiff / (minZoomLevel / 1.2);\n\n\t\t\t\t\t_applyBgOpacity(percent);\n\t\t\t\t\t_shout('onPinchClose', percent);\n\t\t\t\t\t_opacityChanged = true;\n\t\t\t\t} else {\n\t\t\t\t\tzoomFriction = (minZoomLevel - zoomLevel) / minZoomLevel;\n\t\t\t\t\tif(zoomFriction > 1) {\n\t\t\t\t\t\tzoomFriction = 1;\n\t\t\t\t\t}\n\t\t\t\t\tzoomLevel = minZoomLevel - zoomFriction * (minZoomLevel / 3);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} else if ( zoomLevel > maxZoomLevel ) {\n\t\t\t\t// 1.5 - extra zoom level above the max. E.g. if max is x6, real max 6 + 1.5 = 7.5\n\t\t\t\tzoomFriction = (zoomLevel - maxZoomLevel) / ( minZoomLevel * 6 );\n\t\t\t\tif(zoomFriction > 1) {\n\t\t\t\t\tzoomFriction = 1;\n\t\t\t\t}\n\t\t\t\tzoomLevel = maxZoomLevel + zoomFriction * minZoomLevel;\n\t\t\t}\n\n\t\t\tif(zoomFriction < 0) {\n\t\t\t\tzoomFriction = 0;\n\t\t\t}\n\n\t\t\t// distance between touch points after friction is applied\n\t\t\t_currPointsDistance = pointsDistance;\n\n\t\t\t// _centerPoint - The point in the middle of two pointers\n\t\t\t_findCenterOfPoints(p, p2, _centerPoint);\n\t\t\n\t\t\t// paning with two pointers pressed\n\t\t\t_currPanDist.x += _centerPoint.x - _currCenterPoint.x;\n\t\t\t_currPanDist.y += _centerPoint.y - _currCenterPoint.y;\n\t\t\t_equalizePoints(_currCenterPoint, _centerPoint);\n\n\t\t\t_panOffset.x = _calculatePanOffset('x', zoomLevel);\n\t\t\t_panOffset.y = _calculatePanOffset('y', zoomLevel);\n\n\t\t\t_isZoomingIn = zoomLevel > _currZoomLevel;\n\t\t\t_currZoomLevel = zoomLevel;\n\t\t\t_applyCurrentZoomPan();\n\n\t\t} else {\n\n\t\t\t// handle behaviour for one point (dragging or panning)\n\n\t\t\tif(!_direction) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif(_isFirstMove) {\n\t\t\t\t_isFirstMove = false;\n\n\t\t\t\t// subtract drag distance that was used during the detection direction \n\n\t\t\t\tif( Math.abs(delta.x) >= DIRECTION_CHECK_OFFSET) {\n\t\t\t\t\tdelta.x -= _currentPoints[0].x - _startPoint.x;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif( Math.abs(delta.y) >= DIRECTION_CHECK_OFFSET) {\n\t\t\t\t\tdelta.y -= _currentPoints[0].y - _startPoint.y;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t_currPoint.x = p.x;\n\t\t\t_currPoint.y = p.y;\n\n\t\t\t// do nothing if pointers position hasn't changed\n\t\t\tif(delta.x === 0 && delta.y === 0) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif(_direction === 'v' && _options.closeOnVerticalDrag) {\n\t\t\t\tif(!_canPan()) {\n\t\t\t\t\t_currPanDist.y += delta.y;\n\t\t\t\t\t_panOffset.y += delta.y;\n\n\t\t\t\t\tvar opacityRatio = _calculateVerticalDragOpacityRatio();\n\n\t\t\t\t\t_verticalDragInitiated = true;\n\t\t\t\t\t_shout('onVerticalDrag', opacityRatio);\n\n\t\t\t\t\t_applyBgOpacity(opacityRatio);\n\t\t\t\t\t_applyCurrentZoomPan();\n\t\t\t\t\treturn ;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t_pushPosPoint(_getCurrentTime(), p.x, p.y);\n\n\t\t\t_moved = true;\n\t\t\t_currPanBounds = self.currItem.bounds;\n\t\t\t\n\t\t\tvar mainScrollChanged = _panOrMoveMainScroll('x', delta);\n\t\t\tif(!mainScrollChanged) {\n\t\t\t\t_panOrMoveMainScroll('y', delta);\n\n\t\t\t\t_roundPoint(_panOffset);\n\t\t\t\t_applyCurrentZoomPan();\n\t\t\t}\n\n\t\t}\n\n\t},\n\t\n\t// Pointerup/pointercancel/touchend/touchcancel/mouseup event handler\n\t_onDragRelease = function(e) {\n\n\t\tif(_features.isOldAndroid ) {\n\n\t\t\tif(_oldAndroidTouchEndTimeout && e.type === 'mouseup') {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// on Android (v4.1, 4.2, 4.3 & possibly older) \n\t\t\t// ghost mousedown/up event isn't preventable via e.preventDefault,\n\t\t\t// which causes fake mousedown event\n\t\t\t// so we block mousedown/up for 600ms\n\t\t\tif( e.type.indexOf('touch') > -1 ) {\n\t\t\t\tclearTimeout(_oldAndroidTouchEndTimeout);\n\t\t\t\t_oldAndroidTouchEndTimeout = setTimeout(function() {\n\t\t\t\t\t_oldAndroidTouchEndTimeout = 0;\n\t\t\t\t}, 600);\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t\t_shout('pointerUp');\n\n\t\tif(_preventDefaultEventBehaviour(e, false)) {\n\t\t\te.preventDefault();\n\t\t}\n\n\t\tvar releasePoint;\n\n\t\tif(_pointerEventEnabled) {\n\t\t\tvar pointerIndex = framework.arraySearch(_currPointers, e.pointerId, 'id');\n\t\t\t\n\t\t\tif(pointerIndex > -1) {\n\t\t\t\treleasePoint = _currPointers.splice(pointerIndex, 1)[0];\n\n\t\t\t\tif(navigator.pointerEnabled) {\n\t\t\t\t\treleasePoint.type = e.pointerType || 'mouse';\n\t\t\t\t} else {\n\t\t\t\t\tvar MSPOINTER_TYPES = {\n\t\t\t\t\t\t4: 'mouse', // event.MSPOINTER_TYPE_MOUSE\n\t\t\t\t\t\t2: 'touch', // event.MSPOINTER_TYPE_TOUCH \n\t\t\t\t\t\t3: 'pen' // event.MSPOINTER_TYPE_PEN\n\t\t\t\t\t};\n\t\t\t\t\treleasePoint.type = MSPOINTER_TYPES[e.pointerType];\n\n\t\t\t\t\tif(!releasePoint.type) {\n\t\t\t\t\t\treleasePoint.type = e.pointerType || 'mouse';\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\n\t\tvar touchList = _getTouchPoints(e),\n\t\t\tgestureType,\n\t\t\tnumPoints = touchList.length;\n\n\t\tif(e.type === 'mouseup') {\n\t\t\tnumPoints = 0;\n\t\t}\n\n\t\t// Do nothing if there were 3 touch points or more\n\t\tif(numPoints === 2) {\n\t\t\t_currentPoints = null;\n\t\t\treturn true;\n\t\t}\n\n\t\t// if second pointer released\n\t\tif(numPoints === 1) {\n\t\t\t_equalizePoints(_startPoint, touchList[0]);\n\t\t}\t\t\t\t\n\n\n\t\t// pointer hasn't moved, send \"tap release\" point\n\t\tif(numPoints === 0 && !_direction && !_mainScrollAnimating) {\n\t\t\tif(!releasePoint) {\n\t\t\t\tif(e.type === 'mouseup') {\n\t\t\t\t\treleasePoint = {x: e.pageX, y: e.pageY, type:'mouse'};\n\t\t\t\t} else if(e.changedTouches && e.changedTouches[0]) {\n\t\t\t\t\treleasePoint = {x: e.changedTouches[0].pageX, y: e.changedTouches[0].pageY, type:'touch'};\n\t\t\t\t}\t\t\n\t\t\t}\n\n\t\t\t_shout('touchRelease', e, releasePoint);\n\t\t}\n\n\t\t// Difference in time between releasing of two last touch points (zoom gesture)\n\t\tvar releaseTimeDiff = -1;\n\n\t\t// Gesture completed, no pointers left\n\t\tif(numPoints === 0) {\n\t\t\t_isDragging = false;\n\t\t\tframework.unbind(window, _upMoveEvents, self);\n\n\t\t\t_stopDragUpdateLoop();\n\n\t\t\tif(_isZooming) {\n\t\t\t\t// Two points released at the same time\n\t\t\t\treleaseTimeDiff = 0;\n\t\t\t} else if(_lastReleaseTime !== -1) {\n\t\t\t\treleaseTimeDiff = _getCurrentTime() - _lastReleaseTime;\n\t\t\t}\n\t\t}\n\t\t_lastReleaseTime = numPoints === 1 ? _getCurrentTime() : -1;\n\t\t\n\t\tif(releaseTimeDiff !== -1 && releaseTimeDiff < 150) {\n\t\t\tgestureType = 'zoom';\n\t\t} else {\n\t\t\tgestureType = 'swipe';\n\t\t}\n\n\t\tif(_isZooming && numPoints < 2) {\n\t\t\t_isZooming = false;\n\n\t\t\t// Only second point released\n\t\t\tif(numPoints === 1) {\n\t\t\t\tgestureType = 'zoomPointerUp';\n\t\t\t}\n\t\t\t_shout('zoomGestureEnded');\n\t\t}\n\n\t\t_currentPoints = null;\n\t\tif(!_moved && !_zoomStarted && !_mainScrollAnimating && !_verticalDragInitiated) {\n\t\t\t// nothing to animate\n\t\t\treturn;\n\t\t}\n\t\n\t\t_stopAllAnimations();\n\n\t\t\n\t\tif(!_releaseAnimData) {\n\t\t\t_releaseAnimData = _initDragReleaseAnimationData();\n\t\t}\n\t\t\n\t\t_releaseAnimData.calculateSwipeSpeed('x');\n\n\n\t\tif(_verticalDragInitiated) {\n\n\t\t\tvar opacityRatio = _calculateVerticalDragOpacityRatio();\n\n\t\t\tif(opacityRatio < _options.verticalDragRange) {\n\t\t\t\tself.close();\n\t\t\t} else {\n\t\t\t\tvar initalPanY = _panOffset.y,\n\t\t\t\t\tinitialBgOpacity = _bgOpacity;\n\n\t\t\t\t_animateProp('verticalDrag', 0, 1, 300, framework.easing.cubic.out, function(now) {\n\t\t\t\t\t\n\t\t\t\t\t_panOffset.y = (self.currItem.initialPosition.y - initalPanY) * now + initalPanY;\n\n\t\t\t\t\t_applyBgOpacity( (1 - initialBgOpacity) * now + initialBgOpacity );\n\t\t\t\t\t_applyCurrentZoomPan();\n\t\t\t\t});\n\n\t\t\t\t_shout('onVerticalDrag', 1);\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\n\t\t// main scroll \n\t\tif( (_mainScrollShifted || _mainScrollAnimating) && numPoints === 0) {\n\t\t\tvar itemChanged = _finishSwipeMainScrollGesture(gestureType, _releaseAnimData);\n\t\t\tif(itemChanged) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tgestureType = 'zoomPointerUp';\n\t\t}\n\n\t\t// prevent zoom/pan animation when main scroll animation runs\n\t\tif(_mainScrollAnimating) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// Complete simple zoom gesture (reset zoom level if it's out of the bounds) \n\t\tif(gestureType !== 'swipe') {\n\t\t\t_completeZoomGesture();\n\t\t\treturn;\n\t\t}\n\t\n\t\t// Complete pan gesture if main scroll is not shifted, and it's possible to pan current image\n\t\tif(!_mainScrollShifted && _currZoomLevel > self.currItem.fitRatio) {\n\t\t\t_completePanGesture(_releaseAnimData);\n\t\t}\n\t},\n\n\n\t// Returns object with data about gesture\n\t// It's created only once and then reused\n\t_initDragReleaseAnimationData = function() {\n\t\t// temp local vars\n\t\tvar lastFlickDuration,\n\t\t\ttempReleasePos;\n\n\t\t// s = this\n\t\tvar s = {\n\t\t\tlastFlickOffset: {},\n\t\t\tlastFlickDist: {},\n\t\t\tlastFlickSpeed: {},\n\t\t\tslowDownRatio: {},\n\t\t\tslowDownRatioReverse: {},\n\t\t\tspeedDecelerationRatio: {},\n\t\t\tspeedDecelerationRatioAbs: {},\n\t\t\tdistanceOffset: {},\n\t\t\tbackAnimDestination: {},\n\t\t\tbackAnimStarted: {},\n\t\t\tcalculateSwipeSpeed: function(axis) {\n\t\t\t\t\n\n\t\t\t\tif( _posPoints.length > 1) {\n\t\t\t\t\tlastFlickDuration = _getCurrentTime() - _gestureCheckSpeedTime + 50;\n\t\t\t\t\ttempReleasePos = _posPoints[_posPoints.length-2][axis];\n\t\t\t\t} else {\n\t\t\t\t\tlastFlickDuration = _getCurrentTime() - _gestureStartTime; // total gesture duration\n\t\t\t\t\ttempReleasePos = _startPoint[axis];\n\t\t\t\t}\n\t\t\t\ts.lastFlickOffset[axis] = _currPoint[axis] - tempReleasePos;\n\t\t\t\ts.lastFlickDist[axis] = Math.abs(s.lastFlickOffset[axis]);\n\t\t\t\tif(s.lastFlickDist[axis] > 20) {\n\t\t\t\t\ts.lastFlickSpeed[axis] = s.lastFlickOffset[axis] / lastFlickDuration;\n\t\t\t\t} else {\n\t\t\t\t\ts.lastFlickSpeed[axis] = 0;\n\t\t\t\t}\n\t\t\t\tif( Math.abs(s.lastFlickSpeed[axis]) < 0.1 ) {\n\t\t\t\t\ts.lastFlickSpeed[axis] = 0;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\ts.slowDownRatio[axis] = 0.95;\n\t\t\t\ts.slowDownRatioReverse[axis] = 1 - s.slowDownRatio[axis];\n\t\t\t\ts.speedDecelerationRatio[axis] = 1;\n\t\t\t},\n\n\t\t\tcalculateOverBoundsAnimOffset: function(axis, speed) {\n\t\t\t\tif(!s.backAnimStarted[axis]) {\n\n\t\t\t\t\tif(_panOffset[axis] > _currPanBounds.min[axis]) {\n\t\t\t\t\t\ts.backAnimDestination[axis] = _currPanBounds.min[axis];\n\t\t\t\t\t\t\n\t\t\t\t\t} else if(_panOffset[axis] < _currPanBounds.max[axis]) {\n\t\t\t\t\t\ts.backAnimDestination[axis] = _currPanBounds.max[axis];\n\t\t\t\t\t}\n\n\t\t\t\t\tif(s.backAnimDestination[axis] !== undefined) {\n\t\t\t\t\t\ts.slowDownRatio[axis] = 0.7;\n\t\t\t\t\t\ts.slowDownRatioReverse[axis] = 1 - s.slowDownRatio[axis];\n\t\t\t\t\t\tif(s.speedDecelerationRatioAbs[axis] < 0.05) {\n\n\t\t\t\t\t\t\ts.lastFlickSpeed[axis] = 0;\n\t\t\t\t\t\t\ts.backAnimStarted[axis] = true;\n\n\t\t\t\t\t\t\t_animateProp('bounceZoomPan'+axis,_panOffset[axis], \n\t\t\t\t\t\t\t\ts.backAnimDestination[axis], \n\t\t\t\t\t\t\t\tspeed || 300, \n\t\t\t\t\t\t\t\tframework.easing.sine.out, \n\t\t\t\t\t\t\t\tfunction(pos) {\n\t\t\t\t\t\t\t\t\t_panOffset[axis] = pos;\n\t\t\t\t\t\t\t\t\t_applyCurrentZoomPan();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\n\t\t\t// Reduces the speed by slowDownRatio (per 10ms)\n\t\t\tcalculateAnimOffset: function(axis) {\n\t\t\t\tif(!s.backAnimStarted[axis]) {\n\t\t\t\t\ts.speedDecelerationRatio[axis] = s.speedDecelerationRatio[axis] * (s.slowDownRatio[axis] + \n\t\t\t\t\t\t\t\t\t\t\t\ts.slowDownRatioReverse[axis] - \n\t\t\t\t\t\t\t\t\t\t\t\ts.slowDownRatioReverse[axis] * s.timeDiff / 10);\n\n\t\t\t\t\ts.speedDecelerationRatioAbs[axis] = Math.abs(s.lastFlickSpeed[axis] * s.speedDecelerationRatio[axis]);\n\t\t\t\t\ts.distanceOffset[axis] = s.lastFlickSpeed[axis] * s.speedDecelerationRatio[axis] * s.timeDiff;\n\t\t\t\t\t_panOffset[axis] += s.distanceOffset[axis];\n\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tpanAnimLoop: function() {\n\t\t\t\tif ( _animations.zoomPan ) {\n\t\t\t\t\t_animations.zoomPan.raf = _requestAF(s.panAnimLoop);\n\n\t\t\t\t\ts.now = _getCurrentTime();\n\t\t\t\t\ts.timeDiff = s.now - s.lastNow;\n\t\t\t\t\ts.lastNow = s.now;\n\t\t\t\t\t\n\t\t\t\t\ts.calculateAnimOffset('x');\n\t\t\t\t\ts.calculateAnimOffset('y');\n\n\t\t\t\t\t_applyCurrentZoomPan();\n\t\t\t\t\t\n\t\t\t\t\ts.calculateOverBoundsAnimOffset('x');\n\t\t\t\t\ts.calculateOverBoundsAnimOffset('y');\n\n\n\t\t\t\t\tif (s.speedDecelerationRatioAbs.x < 0.05 && s.speedDecelerationRatioAbs.y < 0.05) {\n\n\t\t\t\t\t\t// round pan position\n\t\t\t\t\t\t_panOffset.x = Math.round(_panOffset.x);\n\t\t\t\t\t\t_panOffset.y = Math.round(_panOffset.y);\n\t\t\t\t\t\t_applyCurrentZoomPan();\n\t\t\t\t\t\t\n\t\t\t\t\t\t_stopAnimation('zoomPan');\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t};\n\t\treturn s;\n\t},\n\n\t_completePanGesture = function(animData) {\n\t\t// calculate swipe speed for Y axis (paanning)\n\t\tanimData.calculateSwipeSpeed('y');\n\n\t\t_currPanBounds = self.currItem.bounds;\n\t\t\n\t\tanimData.backAnimDestination = {};\n\t\tanimData.backAnimStarted = {};\n\n\t\t// Avoid acceleration animation if speed is too low\n\t\tif(Math.abs(animData.lastFlickSpeed.x) <= 0.05 && Math.abs(animData.lastFlickSpeed.y) <= 0.05 ) {\n\t\t\tanimData.speedDecelerationRatioAbs.x = animData.speedDecelerationRatioAbs.y = 0;\n\n\t\t\t// Run pan drag release animation. E.g. if you drag image and release finger without momentum.\n\t\t\tanimData.calculateOverBoundsAnimOffset('x');\n\t\t\tanimData.calculateOverBoundsAnimOffset('y');\n\t\t\treturn true;\n\t\t}\n\n\t\t// Animation loop that controls the acceleration after pan gesture ends\n\t\t_registerStartAnimation('zoomPan');\n\t\tanimData.lastNow = _getCurrentTime();\n\t\tanimData.panAnimLoop();\n\t},\n\n\n\t_finishSwipeMainScrollGesture = function(gestureType, _releaseAnimData) {\n\t\tvar itemChanged;\n\t\tif(!_mainScrollAnimating) {\n\t\t\t_currZoomedItemIndex = _currentItemIndex;\n\t\t}\n\n\n\t\t\n\t\tvar itemsDiff;\n\n\t\tif(gestureType === 'swipe') {\n\t\t\tvar totalShiftDist = _currPoint.x - _startPoint.x,\n\t\t\t\tisFastLastFlick = _releaseAnimData.lastFlickDist.x < 10;\n\n\t\t\t// if container is shifted for more than MIN_SWIPE_DISTANCE, \n\t\t\t// and last flick gesture was in right direction\n\t\t\tif(totalShiftDist > MIN_SWIPE_DISTANCE && \n\t\t\t\t(isFastLastFlick || _releaseAnimData.lastFlickOffset.x > 20) ) {\n\t\t\t\t// go to prev item\n\t\t\t\titemsDiff = -1;\n\t\t\t} else if(totalShiftDist < -MIN_SWIPE_DISTANCE && \n\t\t\t\t(isFastLastFlick || _releaseAnimData.lastFlickOffset.x < -20) ) {\n\t\t\t\t// go to next item\n\t\t\t\titemsDiff = 1;\n\t\t\t}\n\t\t}\n\n\t\tvar nextCircle;\n\n\t\tif(itemsDiff) {\n\t\t\t\n\t\t\t_currentItemIndex += itemsDiff;\n\n\t\t\tif(_currentItemIndex < 0) {\n\t\t\t\t_currentItemIndex = _options.loop ? _getNumItems()-1 : 0;\n\t\t\t\tnextCircle = true;\n\t\t\t} else if(_currentItemIndex >= _getNumItems()) {\n\t\t\t\t_currentItemIndex = _options.loop ? 0 : _getNumItems()-1;\n\t\t\t\tnextCircle = true;\n\t\t\t}\n\n\t\t\tif(!nextCircle || _options.loop) {\n\t\t\t\t_indexDiff += itemsDiff;\n\t\t\t\t_currPositionIndex -= itemsDiff;\n\t\t\t\titemChanged = true;\n\t\t\t}\n\t\t\t\n\n\t\t\t\n\t\t}\n\n\t\tvar animateToX = _slideSize.x * _currPositionIndex;\n\t\tvar animateToDist = Math.abs( animateToX - _mainScrollPos.x );\n\t\tvar finishAnimDuration;\n\n\n\t\tif(!itemChanged && animateToX > _mainScrollPos.x !== _releaseAnimData.lastFlickSpeed.x > 0) {\n\t\t\t// \"return to current\" duration, e.g. when dragging from slide 0 to -1\n\t\t\tfinishAnimDuration = 333; \n\t\t} else {\n\t\t\tfinishAnimDuration = Math.abs(_releaseAnimData.lastFlickSpeed.x) > 0 ? \n\t\t\t\t\t\t\t\t\tanimateToDist / Math.abs(_releaseAnimData.lastFlickSpeed.x) : \n\t\t\t\t\t\t\t\t\t333;\n\n\t\t\tfinishAnimDuration = Math.min(finishAnimDuration, 400);\n\t\t\tfinishAnimDuration = Math.max(finishAnimDuration, 250);\n\t\t}\n\n\t\tif(_currZoomedItemIndex === _currentItemIndex) {\n\t\t\titemChanged = false;\n\t\t}\n\t\t\n\t\t_mainScrollAnimating = true;\n\t\t\n\t\t_shout('mainScrollAnimStart');\n\n\t\t_animateProp('mainScroll', _mainScrollPos.x, animateToX, finishAnimDuration, framework.easing.cubic.out, \n\t\t\t_moveMainScroll,\n\t\t\tfunction() {\n\t\t\t\t_stopAllAnimations();\n\t\t\t\t_mainScrollAnimating = false;\n\t\t\t\t_currZoomedItemIndex = -1;\n\t\t\t\t\n\t\t\t\tif(itemChanged || _currZoomedItemIndex !== _currentItemIndex) {\n\t\t\t\t\tself.updateCurrItem();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t_shout('mainScrollAnimComplete');\n\t\t\t}\n\t\t);\n\n\t\tif(itemChanged) {\n\t\t\tself.updateCurrItem(true);\n\t\t}\n\n\t\treturn itemChanged;\n\t},\n\n\t_calculateZoomLevel = function(touchesDistance) {\n\t\treturn 1 / _startPointsDistance * touchesDistance * _startZoomLevel;\n\t},\n\n\t// Resets zoom if it's out of bounds\n\t_completeZoomGesture = function() {\n\t\tvar destZoomLevel = _currZoomLevel,\n\t\t\tminZoomLevel = _getMinZoomLevel(),\n\t\t\tmaxZoomLevel = _getMaxZoomLevel();\n\n\t\tif ( _currZoomLevel < minZoomLevel ) {\n\t\t\tdestZoomLevel = minZoomLevel;\n\t\t} else if ( _currZoomLevel > maxZoomLevel ) {\n\t\t\tdestZoomLevel = maxZoomLevel;\n\t\t}\n\n\t\tvar destOpacity = 1,\n\t\t\tonUpdate,\n\t\t\tinitialOpacity = _bgOpacity;\n\n\t\tif(_opacityChanged && !_isZoomingIn && !_wasOverInitialZoom && _currZoomLevel < minZoomLevel) {\n\t\t\t//_closedByScroll = true;\n\t\t\tself.close();\n\t\t\treturn true;\n\t\t}\n\n\t\tif(_opacityChanged) {\n\t\t\tonUpdate = function(now) {\n\t\t\t\t_applyBgOpacity( (destOpacity - initialOpacity) * now + initialOpacity );\n\t\t\t};\n\t\t}\n\n\t\tself.zoomTo(destZoomLevel, 0, 200, framework.easing.cubic.out, onUpdate);\n\t\treturn true;\n\t};\n\n\n_registerModule('Gestures', {\n\tpublicMethods: {\n\n\t\tinitGestures: function() {\n\n\t\t\t// helper function that builds touch/pointer/mouse events\n\t\t\tvar addEventNames = function(pref, down, move, up, cancel) {\n\t\t\t\t_dragStartEvent = pref + down;\n\t\t\t\t_dragMoveEvent = pref + move;\n\t\t\t\t_dragEndEvent = pref + up;\n\t\t\t\tif(cancel) {\n\t\t\t\t\t_dragCancelEvent = pref + cancel;\n\t\t\t\t} else {\n\t\t\t\t\t_dragCancelEvent = '';\n\t\t\t\t}\n\t\t\t};\n\n\t\t\t_pointerEventEnabled = _features.pointerEvent;\n\t\t\tif(_pointerEventEnabled && _features.touch) {\n\t\t\t\t// we don't need touch events, if browser supports pointer events\n\t\t\t\t_features.touch = false;\n\t\t\t}\n\n\t\t\tif(_pointerEventEnabled) {\n\t\t\t\tif(navigator.pointerEnabled) {\n\t\t\t\t\taddEventNames('pointer', 'down', 'move', 'up', 'cancel');\n\t\t\t\t} else {\n\t\t\t\t\t// IE10 pointer events are case-sensitive\n\t\t\t\t\taddEventNames('MSPointer', 'Down', 'Move', 'Up', 'Cancel');\n\t\t\t\t}\n\t\t\t} else if(_features.touch) {\n\t\t\t\taddEventNames('touch', 'start', 'move', 'end', 'cancel');\n\t\t\t\t_likelyTouchDevice = true;\n\t\t\t} else {\n\t\t\t\taddEventNames('mouse', 'down', 'move', 'up');\t\n\t\t\t}\n\n\t\t\t_upMoveEvents = _dragMoveEvent + ' ' + _dragEndEvent + ' ' + _dragCancelEvent;\n\t\t\t_downEvents = _dragStartEvent;\n\n\t\t\tif(_pointerEventEnabled && !_likelyTouchDevice) {\n\t\t\t\t_likelyTouchDevice = (navigator.maxTouchPoints > 1) || (navigator.msMaxTouchPoints > 1);\n\t\t\t}\n\t\t\t// make variable public\n\t\t\tself.likelyTouchDevice = _likelyTouchDevice; \n\t\t\t\n\t\t\t_globalEventHandlers[_dragStartEvent] = _onDragStart;\n\t\t\t_globalEventHandlers[_dragMoveEvent] = _onDragMove;\n\t\t\t_globalEventHandlers[_dragEndEvent] = _onDragRelease; // the Kraken\n\n\t\t\tif(_dragCancelEvent) {\n\t\t\t\t_globalEventHandlers[_dragCancelEvent] = _globalEventHandlers[_dragEndEvent];\n\t\t\t}\n\n\t\t\t// Bind mouse events on device with detected hardware touch support, in case it supports multiple types of input.\n\t\t\tif(_features.touch) {\n\t\t\t\t_downEvents += ' mousedown';\n\t\t\t\t_upMoveEvents += ' mousemove mouseup';\n\t\t\t\t_globalEventHandlers.mousedown = _globalEventHandlers[_dragStartEvent];\n\t\t\t\t_globalEventHandlers.mousemove = _globalEventHandlers[_dragMoveEvent];\n\t\t\t\t_globalEventHandlers.mouseup = _globalEventHandlers[_dragEndEvent];\n\t\t\t}\n\n\t\t\tif(!_likelyTouchDevice) {\n\t\t\t\t// don't allow pan to next slide from zoomed state on Desktop\n\t\t\t\t_options.allowPanToNext = false;\n\t\t\t}\n\t\t}\n\n\t}\n});\n\n\n/*>>gestures*/\n\n/*>>show-hide-transition*/\n/**\n * show-hide-transition.js:\n *\n * Manages initial opening or closing transition.\n *\n * If you're not planning to use transition for gallery at all,\n * you may set options hideAnimationDuration and showAnimationDuration to 0,\n * and just delete startAnimation function.\n * \n */\n\n\nvar _showOrHideTimeout,\n\t_showOrHide = function(item, img, out, completeFn) {\n\n\t\tif(_showOrHideTimeout) {\n\t\t\tclearTimeout(_showOrHideTimeout);\n\t\t}\n\n\t\t_initialZoomRunning = true;\n\t\t_initialContentSet = true;\n\t\t\n\t\t// dimensions of small thumbnail {x:,y:,w:}.\n\t\t// Height is optional, as calculated based on large image.\n\t\tvar thumbBounds; \n\t\tif(item.initialLayout) {\n\t\t\tthumbBounds = item.initialLayout;\n\t\t\titem.initialLayout = null;\n\t\t} else {\n\t\t\tthumbBounds = _options.getThumbBoundsFn && _options.getThumbBoundsFn(_currentItemIndex);\n\t\t}\n\n\t\tvar duration = out ? _options.hideAnimationDuration : _options.showAnimationDuration;\n\n\t\tvar onComplete = function() {\n\t\t\t_stopAnimation('initialZoom');\n\t\t\tif(!out) {\n\t\t\t\t_applyBgOpacity(1);\n\t\t\t\tif(img) {\n\t\t\t\t\timg.style.display = 'block';\n\t\t\t\t}\n\t\t\t\tframework.addClass(template, 'pswp--animated-in');\n\t\t\t\t_shout('initialZoom' + (out ? 'OutEnd' : 'InEnd'));\n\t\t\t} else {\n\t\t\t\tself.template.removeAttribute('style');\n\t\t\t\tself.bg.removeAttribute('style');\n\t\t\t}\n\n\t\t\tif(completeFn) {\n\t\t\t\tcompleteFn();\n\t\t\t}\n\t\t\t_initialZoomRunning = false;\n\t\t};\n\n\t\t// if bounds aren't provided, just open gallery without animation\n\t\tif(!duration || !thumbBounds || thumbBounds.x === undefined) {\n\n\t\t\t_shout('initialZoom' + (out ? 'Out' : 'In') );\n\n\t\t\t_currZoomLevel = item.initialZoomLevel;\n\t\t\t_equalizePoints(_panOffset, item.initialPosition );\n\t\t\t_applyCurrentZoomPan();\n\n\t\t\ttemplate.style.opacity = out ? 0 : 1;\n\t\t\t_applyBgOpacity(1);\n\n\t\t\tif(duration) {\n\t\t\t\tsetTimeout(function() {\n\t\t\t\t\tonComplete();\n\t\t\t\t}, duration);\n\t\t\t} else {\n\t\t\t\tonComplete();\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\tvar startAnimation = function() {\n\t\t\tvar closeWithRaf = _closedByScroll,\n\t\t\t\tfadeEverything = !self.currItem.src || self.currItem.loadError || _options.showHideOpacity;\n\t\t\t\n\t\t\t// apply hw-acceleration to image\n\t\t\tif(item.miniImg) {\n\t\t\t\titem.miniImg.style.webkitBackfaceVisibility = 'hidden';\n\t\t\t}\n\n\t\t\tif(!out) {\n\t\t\t\t_currZoomLevel = thumbBounds.w / item.w;\n\t\t\t\t_panOffset.x = thumbBounds.x;\n\t\t\t\t_panOffset.y = thumbBounds.y - _initalWindowScrollY;\n\n\t\t\t\tself[fadeEverything ? 'template' : 'bg'].style.opacity = 0.001;\n\t\t\t\t_applyCurrentZoomPan();\n\t\t\t}\n\n\t\t\t_registerStartAnimation('initialZoom');\n\t\t\t\n\t\t\tif(out && !closeWithRaf) {\n\t\t\t\tframework.removeClass(template, 'pswp--animated-in');\n\t\t\t}\n\n\t\t\tif(fadeEverything) {\n\t\t\t\tif(out) {\n\t\t\t\t\tframework[ (closeWithRaf ? 'remove' : 'add') + 'Class' ](template, 'pswp--animate_opacity');\n\t\t\t\t} else {\n\t\t\t\t\tsetTimeout(function() {\n\t\t\t\t\t\tframework.addClass(template, 'pswp--animate_opacity');\n\t\t\t\t\t}, 30);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t_showOrHideTimeout = setTimeout(function() {\n\n\t\t\t\t_shout('initialZoom' + (out ? 'Out' : 'In') );\n\t\t\t\t\n\n\t\t\t\tif(!out) {\n\n\t\t\t\t\t// \"in\" animation always uses CSS transitions (instead of rAF).\n\t\t\t\t\t// CSS transition work faster here, \n\t\t\t\t\t// as developer may also want to animate other things, \n\t\t\t\t\t// like ui on top of sliding area, which can be animated just via CSS\n\t\t\t\t\t\n\t\t\t\t\t_currZoomLevel = item.initialZoomLevel;\n\t\t\t\t\t_equalizePoints(_panOffset, item.initialPosition );\n\t\t\t\t\t_applyCurrentZoomPan();\n\t\t\t\t\t_applyBgOpacity(1);\n\n\t\t\t\t\tif(fadeEverything) {\n\t\t\t\t\t\ttemplate.style.opacity = 1;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t_applyBgOpacity(1);\n\t\t\t\t\t}\n\n\t\t\t\t\t_showOrHideTimeout = setTimeout(onComplete, duration + 20);\n\t\t\t\t} else {\n\n\t\t\t\t\t// \"out\" animation uses rAF only when PhotoSwipe is closed by browser scroll, to recalculate position\n\t\t\t\t\tvar destZoomLevel = thumbBounds.w / item.w,\n\t\t\t\t\t\tinitialPanOffset = {\n\t\t\t\t\t\t\tx: _panOffset.x,\n\t\t\t\t\t\t\ty: _panOffset.y\n\t\t\t\t\t\t},\n\t\t\t\t\t\tinitialZoomLevel = _currZoomLevel,\n\t\t\t\t\t\tinitalBgOpacity = _bgOpacity,\n\t\t\t\t\t\tonUpdate = function(now) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(now === 1) {\n\t\t\t\t\t\t\t\t_currZoomLevel = destZoomLevel;\n\t\t\t\t\t\t\t\t_panOffset.x = thumbBounds.x;\n\t\t\t\t\t\t\t\t_panOffset.y = thumbBounds.y - _currentWindowScrollY;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t_currZoomLevel = (destZoomLevel - initialZoomLevel) * now + initialZoomLevel;\n\t\t\t\t\t\t\t\t_panOffset.x = (thumbBounds.x - initialPanOffset.x) * now + initialPanOffset.x;\n\t\t\t\t\t\t\t\t_panOffset.y = (thumbBounds.y - _currentWindowScrollY - initialPanOffset.y) * now + initialPanOffset.y;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t_applyCurrentZoomPan();\n\t\t\t\t\t\t\tif(fadeEverything) {\n\t\t\t\t\t\t\t\ttemplate.style.opacity = 1 - now;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t_applyBgOpacity( initalBgOpacity - now * initalBgOpacity );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t};\n\n\t\t\t\t\tif(closeWithRaf) {\n\t\t\t\t\t\t_animateProp('initialZoom', 0, 1, duration, framework.easing.cubic.out, onUpdate, onComplete);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tonUpdate(1);\n\t\t\t\t\t\t_showOrHideTimeout = setTimeout(onComplete, duration + 20);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\n\t\t\t}, out ? 25 : 90); // Main purpose of this delay is to give browser time to paint and\n\t\t\t\t\t// create composite layers of PhotoSwipe UI parts (background, controls, caption, arrows).\n\t\t\t\t\t// Which avoids lag at the beginning of scale transition.\n\t\t};\n\t\tstartAnimation();\n\n\t\t\n\t};\n\n/*>>show-hide-transition*/\n\n/*>>items-controller*/\n/**\n*\n* Controller manages gallery items, their dimensions, and their content.\n* \n*/\n\nvar _items,\n\t_tempPanAreaSize = {},\n\t_imagesToAppendPool = [],\n\t_initialContentSet,\n\t_initialZoomRunning,\n\t_controllerDefaultOptions = {\n\t\tindex: 0,\n\t\terrorMsg: '<div class=\"pswp__error-msg\"><a href=\"%url%\" target=\"_blank\">The image</a> could not be loaded.</div>',\n\t\tforceProgressiveLoading: false, // TODO\n\t\tpreload: [1,1],\n\t\tgetNumItemsFn: function() {\n\t\t\treturn _items.length;\n\t\t}\n\t};\n\n\nvar _getItemAt,\n\t_getNumItems,\n\t_initialIsLoop,\n\t_getZeroBounds = function() {\n\t\treturn {\n\t\t\tcenter:{x:0,y:0}, \n\t\t\tmax:{x:0,y:0}, \n\t\t\tmin:{x:0,y:0}\n\t\t};\n\t},\n\t_calculateSingleItemPanBounds = function(item, realPanElementW, realPanElementH ) {\n\t\tvar bounds = item.bounds;\n\n\t\t// position of element when it's centered\n\t\tbounds.center.x = Math.round((_tempPanAreaSize.x - realPanElementW) / 2);\n\t\tbounds.center.y = Math.round((_tempPanAreaSize.y - realPanElementH) / 2) + item.vGap.top;\n\n\t\t// maximum pan position\n\t\tbounds.max.x = (realPanElementW > _tempPanAreaSize.x) ? \n\t\t\t\t\t\t\tMath.round(_tempPanAreaSize.x - realPanElementW) : \n\t\t\t\t\t\t\tbounds.center.x;\n\t\t\n\t\tbounds.max.y = (realPanElementH > _tempPanAreaSize.y) ? \n\t\t\t\t\t\t\tMath.round(_tempPanAreaSize.y - realPanElementH) + item.vGap.top : \n\t\t\t\t\t\t\tbounds.center.y;\n\t\t\n\t\t// minimum pan position\n\t\tbounds.min.x = (realPanElementW > _tempPanAreaSize.x) ? 0 : bounds.center.x;\n\t\tbounds.min.y = (realPanElementH > _tempPanAreaSize.y) ? item.vGap.top : bounds.center.y;\n\t},\n\t_calculateItemSize = function(item, viewportSize, zoomLevel) {\n\n\t\tif (item.src && !item.loadError) {\n\t\t\tvar isInitial = !zoomLevel;\n\t\t\t\n\t\t\tif(isInitial) {\n\t\t\t\tif(!item.vGap) {\n\t\t\t\t\titem.vGap = {top:0,bottom:0};\n\t\t\t\t}\n\t\t\t\t// allows overriding vertical margin for individual items\n\t\t\t\t_shout('parseVerticalMargin', item);\n\t\t\t}\n\n\n\t\t\t_tempPanAreaSize.x = viewportSize.x;\n\t\t\t_tempPanAreaSize.y = viewportSize.y - item.vGap.top - item.vGap.bottom;\n\n\t\t\tif (isInitial) {\n\t\t\t\tvar hRatio = _tempPanAreaSize.x / item.w;\n\t\t\t\tvar vRatio = _tempPanAreaSize.y / item.h;\n\n\t\t\t\titem.fitRatio = hRatio < vRatio ? hRatio : vRatio;\n\t\t\t\t//item.fillRatio = hRatio > vRatio ? hRatio : vRatio;\n\n\t\t\t\tvar scaleMode = _options.scaleMode;\n\n\t\t\t\tif (scaleMode === 'orig') {\n\t\t\t\t\tzoomLevel = 1;\n\t\t\t\t} else if (scaleMode === 'fit') {\n\t\t\t\t\tzoomLevel = item.fitRatio;\n\t\t\t\t}\n\n\t\t\t\tif (zoomLevel > 1) {\n\t\t\t\t\tzoomLevel = 1;\n\t\t\t\t}\n\n\t\t\t\titem.initialZoomLevel = zoomLevel;\n\t\t\t\t\n\t\t\t\tif(!item.bounds) {\n\t\t\t\t\t// reuse bounds object\n\t\t\t\t\titem.bounds = _getZeroBounds(); \n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(!zoomLevel) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t_calculateSingleItemPanBounds(item, item.w * zoomLevel, item.h * zoomLevel);\n\n\t\t\tif (isInitial && zoomLevel === item.initialZoomLevel) {\n\t\t\t\titem.initialPosition = item.bounds.center;\n\t\t\t}\n\n\t\t\treturn item.bounds;\n\t\t} else {\n\t\t\titem.w = item.h = 0;\n\t\t\titem.initialZoomLevel = item.fitRatio = 1;\n\t\t\titem.bounds = _getZeroBounds();\n\t\t\titem.initialPosition = item.bounds.center;\n\n\t\t\t// if it's not image, we return zero bounds (content is not zoomable)\n\t\t\treturn item.bounds;\n\t\t}\n\t\t\n\t},\n\n\t\n\n\n\t_appendImage = function(index, item, baseDiv, img, preventAnimation, keepPlaceholder) {\n\t\t\n\n\t\tif(item.loadError) {\n\t\t\treturn;\n\t\t}\n\n\t\tif(img) {\n\n\t\t\titem.imageAppended = true;\n\t\t\t_setImageSize(item, img, (item === self.currItem && _renderMaxResolution) );\n\t\t\t\n\t\t\tbaseDiv.appendChild(img);\n\n\t\t\tif(keepPlaceholder) {\n\t\t\t\tsetTimeout(function() {\n\t\t\t\t\tif(item && item.loaded && item.placeholder) {\n\t\t\t\t\t\titem.placeholder.style.display = 'none';\n\t\t\t\t\t\titem.placeholder = null;\n\t\t\t\t\t}\n\t\t\t\t}, 500);\n\t\t\t}\n\t\t}\n\t},\n\t\n\n\n\t_preloadImage = function(item) {\n\t\titem.loading = true;\n\t\titem.loaded = false;\n\t\tvar img = item.img = framework.createEl('pswp__img', 'img');\n\t\tvar onComplete = function() {\n\t\t\titem.loading = false;\n\t\t\titem.loaded = true;\n\n\t\t\tif(item.loadComplete) {\n\t\t\t\titem.loadComplete(item);\n\t\t\t} else {\n\t\t\t\titem.img = null; // no need to store image object\n\t\t\t}\n\t\t\timg.onload = img.onerror = null;\n\t\t\timg = null;\n\t\t};\n\t\timg.onload = onComplete;\n\t\timg.onerror = function() {\n\t\t\titem.loadError = true;\n\t\t\tonComplete();\n\t\t};\t\t\n\n\t\timg.src = item.src;// + '?a=' + Math.random();\n\n\t\treturn img;\n\t},\n\t_checkForError = function(item, cleanUp) {\n\t\tif(item.src && item.loadError && item.container) {\n\n\t\t\tif(cleanUp) {\n\t\t\t\titem.container.innerHTML = '';\n\t\t\t}\n\n\t\t\titem.container.innerHTML = _options.errorMsg.replace('%url%', item.src );\n\t\t\treturn true;\n\t\t\t\n\t\t}\n\t},\n\t_setImageSize = function(item, img, maxRes) {\n\t\tif(!item.src) {\n\t\t\treturn;\n\t\t}\n\n\t\tif(!img) {\n\t\t\timg = item.container.lastChild;\n\t\t}\n\n\t\tvar w = maxRes ? item.w : Math.round(item.w * item.fitRatio),\n\t\t\th = maxRes ? item.h : Math.round(item.h * item.fitRatio);\n\t\t\n\t\tif(item.placeholder && !item.loaded) {\n\t\t\titem.placeholder.style.width = w + 'px';\n\t\t\titem.placeholder.style.height = h + 'px';\n\t\t}\n\n\t\timg.style.width = w + 'px';\n\t\timg.style.height = h + 'px';\n\t},\n\t_appendImagesPool = function() {\n\n\t\tif(_imagesToAppendPool.length) {\n\t\t\tvar poolItem;\n\n\t\t\tfor(var i = 0; i < _imagesToAppendPool.length; i++) {\n\t\t\t\tpoolItem = _imagesToAppendPool[i];\n\t\t\t\tif( poolItem.holder.index === poolItem.index ) {\n\t\t\t\t\t_appendImage(poolItem.index, poolItem.item, poolItem.baseDiv, poolItem.img, false, poolItem.clearPlaceholder);\n\t\t\t\t}\n\t\t\t}\n\t\t\t_imagesToAppendPool = [];\n\t\t}\n\t};\n\t\n\n\n_registerModule('Controller', {\n\n\tpublicMethods: {\n\n\t\tlazyLoadItem: function(index) {\n\t\t\tindex = _getLoopedId(index);\n\t\t\tvar item = _getItemAt(index);\n\n\t\t\tif(!item || ((item.loaded || item.loading) && !_itemsNeedUpdate)) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t_shout('gettingData', index, item);\n\n\t\t\tif (!item.src) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t_preloadImage(item);\n\t\t},\n\t\tinitController: function() {\n\t\t\tframework.extend(_options, _controllerDefaultOptions, true);\n\t\t\tself.items = _items = items;\n\t\t\t_getItemAt = self.getItemAt;\n\t\t\t_getNumItems = _options.getNumItemsFn; //self.getNumItems;\n\n\n\n\t\t\t_initialIsLoop = _options.loop;\n\t\t\tif(_getNumItems() < 3) {\n\t\t\t\t_options.loop = false; // disable loop if less then 3 items\n\t\t\t}\n\n\t\t\t_listen('beforeChange', function(diff) {\n\n\t\t\t\tvar p = _options.preload,\n\t\t\t\t\tisNext = diff === null ? true : (diff >= 0),\n\t\t\t\t\tpreloadBefore = Math.min(p[0], _getNumItems() ),\n\t\t\t\t\tpreloadAfter = Math.min(p[1], _getNumItems() ),\n\t\t\t\t\ti;\n\n\n\t\t\t\tfor(i = 1; i <= (isNext ? preloadAfter : preloadBefore); i++) {\n\t\t\t\t\tself.lazyLoadItem(_currentItemIndex+i);\n\t\t\t\t}\n\t\t\t\tfor(i = 1; i <= (isNext ? preloadBefore : preloadAfter); i++) {\n\t\t\t\t\tself.lazyLoadItem(_currentItemIndex-i);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t_listen('initialLayout', function() {\n\t\t\t\tself.currItem.initialLayout = _options.getThumbBoundsFn && _options.getThumbBoundsFn(_currentItemIndex);\n\t\t\t});\n\n\t\t\t_listen('mainScrollAnimComplete', _appendImagesPool);\n\t\t\t_listen('initialZoomInEnd', _appendImagesPool);\n\n\n\n\t\t\t_listen('destroy', function() {\n\t\t\t\tvar item;\n\t\t\t\tfor(var i = 0; i < _items.length; i++) {\n\t\t\t\t\titem = _items[i];\n\t\t\t\t\t// remove reference to DOM elements, for GC\n\t\t\t\t\tif(item.container) {\n\t\t\t\t\t\titem.container = null; \n\t\t\t\t\t}\n\t\t\t\t\tif(item.placeholder) {\n\t\t\t\t\t\titem.placeholder = null;\n\t\t\t\t\t}\n\t\t\t\t\tif(item.img) {\n\t\t\t\t\t\titem.img = null;\n\t\t\t\t\t}\n\t\t\t\t\tif(item.preloader) {\n\t\t\t\t\t\titem.preloader = null;\n\t\t\t\t\t}\n\t\t\t\t\tif(item.loadError) {\n\t\t\t\t\t\titem.loaded = item.loadError = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t_imagesToAppendPool = null;\n\t\t\t});\n\t\t},\n\n\n\t\tgetItemAt: function(index) {\n\t\t\tif (index >= 0) {\n\t\t\t\treturn _items[index] !== undefined ? _items[index] : false;\n\t\t\t}\n\t\t\treturn false;\n\t\t},\n\n\t\tallowProgressiveImg: function() {\n\t\t\t// 1. Progressive image loading isn't working on webkit/blink \n\t\t\t// when hw-acceleration (e.g. translateZ) is applied to IMG element.\n\t\t\t// That's why in PhotoSwipe parent element gets zoom transform, not image itself.\n\t\t\t// \n\t\t\t// 2. Progressive image loading sometimes blinks in webkit/blink when applying animation to parent element.\n\t\t\t// That's why it's disabled on touch devices (mainly because of swipe transition)\n\t\t\t// \n\t\t\t// 3. Progressive image loading sometimes doesn't work in IE (up to 11).\n\n\t\t\t// Don't allow progressive loading on non-large touch devices\n\t\t\treturn _options.forceProgressiveLoading || !_likelyTouchDevice || _options.mouseUsed || screen.width > 1200; \n\t\t\t// 1200 - to eliminate touch devices with large screen (like Chromebook Pixel)\n\t\t},\n\n\t\tsetContent: function(holder, index) {\n\n\t\t\tif(_options.loop) {\n\t\t\t\tindex = _getLoopedId(index);\n\t\t\t}\n\n\t\t\tvar prevItem = self.getItemAt(holder.index);\n\t\t\tif(prevItem) {\n\t\t\t\tprevItem.container = null;\n\t\t\t}\n\t\n\t\t\tvar item = self.getItemAt(index),\n\t\t\t\timg;\n\t\t\t\n\t\t\tif(!item) {\n\t\t\t\tholder.el.innerHTML = '';\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// allow to override data\n\t\t\t_shout('gettingData', index, item);\n\n\t\t\tholder.index = index;\n\t\t\tholder.item = item;\n\n\t\t\t// base container DIV is created only once for each of 3 holders\n\t\t\tvar baseDiv = item.container = framework.createEl('pswp__zoom-wrap'); \n\n\t\t\t\n\n\t\t\tif(!item.src && item.html) {\n\t\t\t\tif(item.html.tagName) {\n\t\t\t\t\tbaseDiv.appendChild(item.html);\n\t\t\t\t} else {\n\t\t\t\t\tbaseDiv.innerHTML = item.html;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t_checkForError(item);\n\n\t\t\t_calculateItemSize(item, _viewportSize);\n\t\t\t\n\t\t\tif(item.src && !item.loadError && !item.loaded) {\n\n\t\t\t\titem.loadComplete = function(item) {\n\n\t\t\t\t\t// gallery closed before image finished loading\n\t\t\t\t\tif(!_isOpen) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t// check if holder hasn't changed while image was loading\n\t\t\t\t\tif(holder && holder.index === index ) {\n\t\t\t\t\t\tif( _checkForError(item, true) ) {\n\t\t\t\t\t\t\titem.loadComplete = item.img = null;\n\t\t\t\t\t\t\t_calculateItemSize(item, _viewportSize);\n\t\t\t\t\t\t\t_applyZoomPanToItem(item);\n\n\t\t\t\t\t\t\tif(holder.index === _currentItemIndex) {\n\t\t\t\t\t\t\t\t// recalculate dimensions\n\t\t\t\t\t\t\t\tself.updateCurrZoomItem();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif( !item.imageAppended ) {\n\t\t\t\t\t\t\tif(_features.transform && (_mainScrollAnimating || _initialZoomRunning) ) {\n\t\t\t\t\t\t\t\t_imagesToAppendPool.push({\n\t\t\t\t\t\t\t\t\titem:item,\n\t\t\t\t\t\t\t\t\tbaseDiv:baseDiv,\n\t\t\t\t\t\t\t\t\timg:item.img,\n\t\t\t\t\t\t\t\t\tindex:index,\n\t\t\t\t\t\t\t\t\tholder:holder,\n\t\t\t\t\t\t\t\t\tclearPlaceholder:true\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t_appendImage(index, item, baseDiv, item.img, _mainScrollAnimating || _initialZoomRunning, true);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// remove preloader & mini-img\n\t\t\t\t\t\t\tif(!_initialZoomRunning && item.placeholder) {\n\t\t\t\t\t\t\t\titem.placeholder.style.display = 'none';\n\t\t\t\t\t\t\t\titem.placeholder = null;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\titem.loadComplete = null;\n\t\t\t\t\titem.img = null; // no need to store image element after it's added\n\n\t\t\t\t\t_shout('imageLoadComplete', index, item);\n\t\t\t\t};\n\n\t\t\t\tif(framework.features.transform) {\n\t\t\t\t\t\n\t\t\t\t\tvar placeholderClassName = 'pswp__img pswp__img--placeholder'; \n\t\t\t\t\tplaceholderClassName += (item.msrc ? '' : ' pswp__img--placeholder--blank');\n\n\t\t\t\t\tvar placeholder = framework.createEl(placeholderClassName, item.msrc ? 'img' : '');\n\t\t\t\t\tif(item.msrc) {\n\t\t\t\t\t\tplaceholder.src = item.msrc;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t_setImageSize(item, placeholder);\n\n\t\t\t\t\tbaseDiv.appendChild(placeholder);\n\t\t\t\t\titem.placeholder = placeholder;\n\n\t\t\t\t}\n\t\t\t\t\n\n\t\t\t\t\n\n\t\t\t\tif(!item.loading) {\n\t\t\t\t\t_preloadImage(item);\n\t\t\t\t}\n\n\n\t\t\t\tif( self.allowProgressiveImg() ) {\n\t\t\t\t\t// just append image\n\t\t\t\t\tif(!_initialContentSet && _features.transform) {\n\t\t\t\t\t\t_imagesToAppendPool.push({\n\t\t\t\t\t\t\titem:item, \n\t\t\t\t\t\t\tbaseDiv:baseDiv, \n\t\t\t\t\t\t\timg:item.img, \n\t\t\t\t\t\t\tindex:index, \n\t\t\t\t\t\t\tholder:holder\n\t\t\t\t\t\t});\n\t\t\t\t\t} else {\n\t\t\t\t\t\t_appendImage(index, item, baseDiv, item.img, true, true);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} else if(item.src && !item.loadError) {\n\t\t\t\t// image object is created every time, due to bugs of image loading & delay when switching images\n\t\t\t\timg = framework.createEl('pswp__img', 'img');\n\t\t\t\timg.style.opacity = 1;\n\t\t\t\timg.src = item.src;\n\t\t\t\t_setImageSize(item, img);\n\t\t\t\t_appendImage(index, item, baseDiv, img, true);\n\t\t\t}\n\t\t\t\n\n\t\t\tif(!_initialContentSet && index === _currentItemIndex) {\n\t\t\t\t_currZoomElementStyle = baseDiv.style;\n\t\t\t\t_showOrHide(item, (img ||item.img) );\n\t\t\t} else {\n\t\t\t\t_applyZoomPanToItem(item);\n\t\t\t}\n\n\t\t\tholder.el.innerHTML = '';\n\t\t\tholder.el.appendChild(baseDiv);\n\t\t},\n\n\t\tcleanSlide: function( item ) {\n\t\t\tif(item.img ) {\n\t\t\t\titem.img.onload = item.img.onerror = null;\n\t\t\t}\n\t\t\titem.loaded = item.loading = item.img = item.imageAppended = false;\n\t\t}\n\n\t}\n});\n\n/*>>items-controller*/\n\n/*>>tap*/\n/**\n * tap.js:\n *\n * Displatches tap and double-tap events.\n * \n */\n\nvar tapTimer,\n\ttapReleasePoint = {},\n\t_dispatchTapEvent = function(origEvent, releasePoint, pointerType) {\t\t\n\t\tvar e = document.createEvent( 'CustomEvent' ),\n\t\t\teDetail = {\n\t\t\t\torigEvent:origEvent, \n\t\t\t\ttarget:origEvent.target, \n\t\t\t\treleasePoint: releasePoint, \n\t\t\t\tpointerType:pointerType || 'touch'\n\t\t\t};\n\n\t\te.initCustomEvent( 'pswpTap', true, true, eDetail );\n\t\torigEvent.target.dispatchEvent(e);\n\t};\n\n_registerModule('Tap', {\n\tpublicMethods: {\n\t\tinitTap: function() {\n\t\t\t_listen('firstTouchStart', self.onTapStart);\n\t\t\t_listen('touchRelease', self.onTapRelease);\n\t\t\t_listen('destroy', function() {\n\t\t\t\ttapReleasePoint = {};\n\t\t\t\ttapTimer = null;\n\t\t\t});\n\t\t},\n\t\tonTapStart: function(touchList) {\n\t\t\tif(touchList.length > 1) {\n\t\t\t\tclearTimeout(tapTimer);\n\t\t\t\ttapTimer = null;\n\t\t\t}\n\t\t},\n\t\tonTapRelease: function(e, releasePoint) {\n\t\t\tif(!releasePoint) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif(!_moved && !_isMultitouch && !_numAnimations) {\n\t\t\t\tvar p0 = releasePoint;\n\t\t\t\tif(tapTimer) {\n\t\t\t\t\tclearTimeout(tapTimer);\n\t\t\t\t\ttapTimer = null;\n\n\t\t\t\t\t// Check if taped on the same place\n\t\t\t\t\tif ( _isNearbyPoints(p0, tapReleasePoint) ) {\n\t\t\t\t\t\t_shout('doubleTap', p0);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif(releasePoint.type === 'mouse') {\n\t\t\t\t\t_dispatchTapEvent(e, releasePoint, 'mouse');\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tvar clickedTagName = e.target.tagName.toUpperCase();\n\t\t\t\t// avoid double tap delay on buttons and elements that have class pswp__single-tap\n\t\t\t\tif(clickedTagName === 'BUTTON' || framework.hasClass(e.target, 'pswp__single-tap') ) {\n\t\t\t\t\t_dispatchTapEvent(e, releasePoint);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t_equalizePoints(tapReleasePoint, p0);\n\n\t\t\t\ttapTimer = setTimeout(function() {\n\t\t\t\t\t_dispatchTapEvent(e, releasePoint);\n\t\t\t\t\ttapTimer = null;\n\t\t\t\t}, 300);\n\t\t\t}\n\t\t}\n\t}\n});\n\n/*>>tap*/\n\n/*>>desktop-zoom*/\n/**\n *\n * desktop-zoom.js:\n *\n * - Binds mousewheel event for paning zoomed image.\n * - Manages \"dragging\", \"zoomed-in\", \"zoom-out\" classes.\n * (which are used for cursors and zoom icon)\n * - Adds toggleDesktopZoom function.\n * \n */\n\nvar _wheelDelta;\n\t\n_registerModule('DesktopZoom', {\n\n\tpublicMethods: {\n\n\t\tinitDesktopZoom: function() {\n\n\t\t\tif(_oldIE) {\n\t\t\t\t// no zoom for old IE (<=8)\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif(_likelyTouchDevice) {\n\t\t\t\t// if detected hardware touch support, we wait until mouse is used,\n\t\t\t\t// and only then apply desktop-zoom features\n\t\t\t\t_listen('mouseUsed', function() {\n\t\t\t\t\tself.setupDesktopZoom();\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tself.setupDesktopZoom(true);\n\t\t\t}\n\n\t\t},\n\n\t\tsetupDesktopZoom: function(onInit) {\n\n\t\t\t_wheelDelta = {};\n\n\t\t\tvar events = 'wheel mousewheel DOMMouseScroll';\n\t\t\t\n\t\t\t_listen('bindEvents', function() {\n\t\t\t\tframework.bind(template, events, self.handleMouseWheel);\n\t\t\t});\n\n\t\t\t_listen('unbindEvents', function() {\n\t\t\t\tif(_wheelDelta) {\n\t\t\t\t\tframework.unbind(template, events, self.handleMouseWheel);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tself.mouseZoomedIn = false;\n\n\t\t\tvar hasDraggingClass,\n\t\t\t\tupdateZoomable = function() {\n\t\t\t\t\tif(self.mouseZoomedIn) {\n\t\t\t\t\t\tframework.removeClass(template, 'pswp--zoomed-in');\n\t\t\t\t\t\tself.mouseZoomedIn = false;\n\t\t\t\t\t}\n\t\t\t\t\tif(_currZoomLevel < 1) {\n\t\t\t\t\t\tframework.addClass(template, 'pswp--zoom-allowed');\n\t\t\t\t\t} else {\n\t\t\t\t\t\tframework.removeClass(template, 'pswp--zoom-allowed');\n\t\t\t\t\t}\n\t\t\t\t\tremoveDraggingClass();\n\t\t\t\t},\n\t\t\t\tremoveDraggingClass = function() {\n\t\t\t\t\tif(hasDraggingClass) {\n\t\t\t\t\t\tframework.removeClass(template, 'pswp--dragging');\n\t\t\t\t\t\thasDraggingClass = false;\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t_listen('resize' , updateZoomable);\n\t\t\t_listen('afterChange' , updateZoomable);\n\t\t\t_listen('pointerDown', function() {\n\t\t\t\tif(self.mouseZoomedIn) {\n\t\t\t\t\thasDraggingClass = true;\n\t\t\t\t\tframework.addClass(template, 'pswp--dragging');\n\t\t\t\t}\n\t\t\t});\n\t\t\t_listen('pointerUp', removeDraggingClass);\n\n\t\t\tif(!onInit) {\n\t\t\t\tupdateZoomable();\n\t\t\t}\n\t\t\t\n\t\t},\n\n\t\thandleMouseWheel: function(e) {\n\n\t\t\tif(_currZoomLevel <= self.currItem.fitRatio) {\n\t\t\t\tif( _options.modal ) {\n\n\t\t\t\t\tif (!_options.closeOnScroll || _numAnimations || _isDragging) {\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t} else if(_transformKey && Math.abs(e.deltaY) > 2) {\n\t\t\t\t\t\t// close PhotoSwipe\n\t\t\t\t\t\t// if browser supports transforms & scroll changed enough\n\t\t\t\t\t\t_closedByScroll = true;\n\t\t\t\t\t\tself.close();\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\t// allow just one event to fire\n\t\t\te.stopPropagation();\n\n\t\t\t// https://developer.mozilla.org/en-US/docs/Web/Events/wheel\n\t\t\t_wheelDelta.x = 0;\n\n\t\t\tif('deltaX' in e) {\n\t\t\t\tif(e.deltaMode === 1 /* DOM_DELTA_LINE */) {\n\t\t\t\t\t// 18 - average line height\n\t\t\t\t\t_wheelDelta.x = e.deltaX * 18;\n\t\t\t\t\t_wheelDelta.y = e.deltaY * 18;\n\t\t\t\t} else {\n\t\t\t\t\t_wheelDelta.x = e.deltaX;\n\t\t\t\t\t_wheelDelta.y = e.deltaY;\n\t\t\t\t}\n\t\t\t} else if('wheelDelta' in e) {\n\t\t\t\tif(e.wheelDeltaX) {\n\t\t\t\t\t_wheelDelta.x = -0.16 * e.wheelDeltaX;\n\t\t\t\t}\n\t\t\t\tif(e.wheelDeltaY) {\n\t\t\t\t\t_wheelDelta.y = -0.16 * e.wheelDeltaY;\n\t\t\t\t} else {\n\t\t\t\t\t_wheelDelta.y = -0.16 * e.wheelDelta;\n\t\t\t\t}\n\t\t\t} else if('detail' in e) {\n\t\t\t\t_wheelDelta.y = e.detail;\n\t\t\t} else {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t_calculatePanBounds(_currZoomLevel, true);\n\n\t\t\tvar newPanX = _panOffset.x - _wheelDelta.x,\n\t\t\t\tnewPanY = _panOffset.y - _wheelDelta.y;\n\n\t\t\t// only prevent scrolling in nonmodal mode when not at edges\n\t\t\tif (_options.modal ||\n\t\t\t\t(\n\t\t\t\tnewPanX <= _currPanBounds.min.x && newPanX >= _currPanBounds.max.x &&\n\t\t\t\tnewPanY <= _currPanBounds.min.y && newPanY >= _currPanBounds.max.y\n\t\t\t\t) ) {\n\t\t\t\te.preventDefault();\n\t\t\t}\n\n\t\t\t// TODO: use rAF instead of mousewheel?\n\t\t\tself.panTo(newPanX, newPanY);\n\t\t},\n\n\t\ttoggleDesktopZoom: function(centerPoint) {\n\t\t\tcenterPoint = centerPoint || {x:_viewportSize.x/2 + _offset.x, y:_viewportSize.y/2 + _offset.y };\n\n\t\t\tvar doubleTapZoomLevel = _options.getDoubleTapZoom(true, self.currItem);\n\t\t\tvar zoomOut = _currZoomLevel === doubleTapZoomLevel;\n\t\t\t\n\t\t\tself.mouseZoomedIn = !zoomOut;\n\n\t\t\tself.zoomTo(zoomOut ? self.currItem.initialZoomLevel : doubleTapZoomLevel, centerPoint, 333);\n\t\t\tframework[ (!zoomOut ? 'add' : 'remove') + 'Class'](template, 'pswp--zoomed-in');\n\t\t}\n\n\t}\n});\n\n\n/*>>desktop-zoom*/\n\n/*>>history*/\n/**\n *\n * history.js:\n *\n * - Back button to close gallery.\n * \n * - Unique URL for each slide: example.com/&pid=1&gid=3\n * (where PID is picture index, and GID and gallery index)\n * \n * - Switch URL when slides change.\n * \n */\n\n\nvar _historyDefaultOptions = {\n\thistory: true,\n\tgalleryUID: 1\n};\n\nvar _historyUpdateTimeout,\n\t_hashChangeTimeout,\n\t_hashAnimCheckTimeout,\n\t_hashChangedByScript,\n\t_hashChangedByHistory,\n\t_hashReseted,\n\t_initialHash,\n\t_historyChanged,\n\t_closedFromURL,\n\t_urlChangedOnce,\n\t_windowLoc,\n\n\t_supportsPushState,\n\n\t_getHash = function() {\n\t\treturn _windowLoc.hash.substring(1);\n\t},\n\t_cleanHistoryTimeouts = function() {\n\n\t\tif(_historyUpdateTimeout) {\n\t\t\tclearTimeout(_historyUpdateTimeout);\n\t\t}\n\n\t\tif(_hashAnimCheckTimeout) {\n\t\t\tclearTimeout(_hashAnimCheckTimeout);\n\t\t}\n\t},\n\n\t// pid - Picture index\n\t// gid - Gallery index\n\t_parseItemIndexFromURL = function() {\n\t\tvar hash = _getHash(),\n\t\t\tparams = {};\n\n\t\tif(hash.length < 5) { // pid=1\n\t\t\treturn params;\n\t\t}\n\n\t\tvar i, vars = hash.split('&');\n\t\tfor (i = 0; i < vars.length; i++) {\n\t\t\tif(!vars[i]) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tvar pair = vars[i].split('=');\t\n\t\t\tif(pair.length < 2) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tparams[pair[0]] = pair[1];\n\t\t}\n\t\tif(_options.galleryPIDs) {\n\t\t\t// detect custom pid in hash and search for it among the items collection\n\t\t\tvar searchfor = params.pid;\n\t\t\tparams.pid = 0; // if custom pid cannot be found, fallback to the first item\n\t\t\tfor(i = 0; i < _items.length; i++) {\n\t\t\t\tif(_items[i].pid === searchfor) {\n\t\t\t\t\tparams.pid = i;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tparams.pid = parseInt(params.pid,10)-1;\n\t\t}\n\t\tif( params.pid < 0 ) {\n\t\t\tparams.pid = 0;\n\t\t}\n\t\treturn params;\n\t},\n\t_updateHash = function() {\n\n\t\tif(_hashAnimCheckTimeout) {\n\t\t\tclearTimeout(_hashAnimCheckTimeout);\n\t\t}\n\n\n\t\tif(_numAnimations || _isDragging) {\n\t\t\t// changing browser URL forces layout/paint in some browsers, which causes noticable lag during animation\n\t\t\t// that's why we update hash only when no animations running\n\t\t\t_hashAnimCheckTimeout = setTimeout(_updateHash, 500);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(_hashChangedByScript) {\n\t\t\tclearTimeout(_hashChangeTimeout);\n\t\t} else {\n\t\t\t_hashChangedByScript = true;\n\t\t}\n\n\n\t\tvar pid = (_currentItemIndex + 1);\n\t\tvar item = _getItemAt( _currentItemIndex );\n\t\tif(item.hasOwnProperty('pid')) {\n\t\t\t// carry forward any custom pid assigned to the item\n\t\t\tpid = item.pid;\n\t\t}\n\t\tvar newHash = _initialHash + '&' + 'gid=' + _options.galleryUID + '&' + 'pid=' + pid;\n\n\t\tif(!_historyChanged) {\n\t\t\tif(_windowLoc.hash.indexOf(newHash) === -1) {\n\t\t\t\t_urlChangedOnce = true;\n\t\t\t}\n\t\t\t// first time - add new hisory record, then just replace\n\t\t}\n\n\t\tvar newURL = _windowLoc.href.split('#')[0] + '#' + newHash;\n\n\t\tif( _supportsPushState ) {\n\n\t\t\tif('#' + newHash !== window.location.hash) {\n\t\t\t\thistory[_historyChanged ? 'replaceState' : 'pushState']('', document.title, newURL);\n\t\t\t}\n\n\t\t} else {\n\t\t\tif(_historyChanged) {\n\t\t\t\t_windowLoc.replace( newURL );\n\t\t\t} else {\n\t\t\t\t_windowLoc.hash = newHash;\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\n\t\t_historyChanged = true;\n\t\t_hashChangeTimeout = setTimeout(function() {\n\t\t\t_hashChangedByScript = false;\n\t\t}, 60);\n\t};\n\n\n\n\t\n\n_registerModule('History', {\n\n\t\n\n\tpublicMethods: {\n\t\tinitHistory: function() {\n\n\t\t\tframework.extend(_options, _historyDefaultOptions, true);\n\n\t\t\tif( !_options.history ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\n\t\t\t_windowLoc = window.location;\n\t\t\t_urlChangedOnce = false;\n\t\t\t_closedFromURL = false;\n\t\t\t_historyChanged = false;\n\t\t\t_initialHash = _getHash();\n\t\t\t_supportsPushState = ('pushState' in history);\n\n\n\t\t\tif(_initialHash.indexOf('gid=') > -1) {\n\t\t\t\t_initialHash = _initialHash.split('&gid=')[0];\n\t\t\t\t_initialHash = _initialHash.split('?gid=')[0];\n\t\t\t}\n\t\t\t\n\n\t\t\t_listen('afterChange', self.updateURL);\n\t\t\t_listen('unbindEvents', function() {\n\t\t\t\tframework.unbind(window, 'hashchange', self.onHashChange);\n\t\t\t});\n\n\n\t\t\tvar returnToOriginal = function() {\n\t\t\t\t_hashReseted = true;\n\t\t\t\tif(!_closedFromURL) {\n\n\t\t\t\t\tif(_urlChangedOnce) {\n\t\t\t\t\t\thistory.back();\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tif(_initialHash) {\n\t\t\t\t\t\t\t_windowLoc.hash = _initialHash;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (_supportsPushState) {\n\n\t\t\t\t\t\t\t\t// remove hash from url without refreshing it or scrolling to top\n\t\t\t\t\t\t\t\thistory.pushState('', document.title, _windowLoc.pathname + _windowLoc.search );\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t_windowLoc.hash = '';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\n\t\t\t\t_cleanHistoryTimeouts();\n\t\t\t};\n\n\n\t\t\t_listen('unbindEvents', function() {\n\t\t\t\tif(_closedByScroll) {\n\t\t\t\t\t// if PhotoSwipe is closed by scroll, we go \"back\" before the closing animation starts\n\t\t\t\t\t// this is done to keep the scroll position\n\t\t\t\t\treturnToOriginal();\n\t\t\t\t}\n\t\t\t});\n\t\t\t_listen('destroy', function() {\n\t\t\t\tif(!_hashReseted) {\n\t\t\t\t\treturnToOriginal();\n\t\t\t\t}\n\t\t\t});\n\t\t\t_listen('firstUpdate', function() {\n\t\t\t\t_currentItemIndex = _parseItemIndexFromURL().pid;\n\t\t\t});\n\n\t\t\t\n\n\t\t\t\n\t\t\tvar index = _initialHash.indexOf('pid=');\n\t\t\tif(index > -1) {\n\t\t\t\t_initialHash = _initialHash.substring(0, index);\n\t\t\t\tif(_initialHash.slice(-1) === '&') {\n\t\t\t\t\t_initialHash = _initialHash.slice(0, -1);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\n\t\t\tsetTimeout(function() {\n\t\t\t\tif(_isOpen) { // hasn't destroyed yet\n\t\t\t\t\tframework.bind(window, 'hashchange', self.onHashChange);\n\t\t\t\t}\n\t\t\t}, 40);\n\t\t\t\n\t\t},\n\t\tonHashChange: function() {\n\n\t\t\tif(_getHash() === _initialHash) {\n\n\t\t\t\t_closedFromURL = true;\n\t\t\t\tself.close();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif(!_hashChangedByScript) {\n\n\t\t\t\t_hashChangedByHistory = true;\n\t\t\t\tself.goTo( _parseItemIndexFromURL().pid );\n\t\t\t\t_hashChangedByHistory = false;\n\t\t\t}\n\t\t\t\n\t\t},\n\t\tupdateURL: function() {\n\n\t\t\t// Delay the update of URL, to avoid lag during transition, \n\t\t\t// and to not to trigger actions like \"refresh page sound\" or \"blinking favicon\" to often\n\t\t\t\n\t\t\t_cleanHistoryTimeouts();\n\t\t\t\n\n\t\t\tif(_hashChangedByHistory) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif(!_historyChanged) {\n\t\t\t\t_updateHash(); // first time\n\t\t\t} else {\n\t\t\t\t_historyUpdateTimeout = setTimeout(_updateHash, 800);\n\t\t\t}\n\t\t}\n\t\n\t}\n});\n\n\n/*>>history*/\n\tframework.extend(self, publicMethods); };\n\treturn PhotoSwipe;\n});\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/photoswipe/dist/photoswipe.js\n// module id = 1217\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/photoswipe/dist/photoswipe.js?", + ); + + /***/ + }, + /* 1218 */ + /* unknown exports provided */ + /* all exports used */ + /*!****************************************!*\ + !*** ./~/prop-types/checkPropTypes.js ***! + \****************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n\n\nif (true) {\n var invariant = __webpack_require__(/*! fbjs/lib/invariant */ 12);\n var warning = __webpack_require__(/*! fbjs/lib/warning */ 13);\n var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ 486);\n var loggedTypeFailures = {};\n}\n\n/**\n * Assert that the values match with the type specs.\n * Error messages are memorized and will only be shown once.\n *\n * @param {object} typeSpecs Map of name to a ReactPropType\n * @param {object} values Runtime values that need to be type-checked\n * @param {string} location e.g. \"prop\", \"context\", \"child context\"\n * @param {string} componentName Name of the component for error messages.\n * @param {?Function} getStack Returns the component stack.\n * @private\n */\nfunction checkPropTypes(typeSpecs, values, location, componentName, getStack) {\n if (true) {\n for (var typeSpecName in typeSpecs) {\n if (typeSpecs.hasOwnProperty(typeSpecName)) {\n var error;\n // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n invariant(typeof typeSpecs[typeSpecName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', componentName || 'React class', location, typeSpecName);\n error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);\n } catch (ex) {\n error = ex;\n }\n warning(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error);\n if (error instanceof Error && !(error.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error.message] = true;\n\n var stack = getStack ? getStack() : '';\n\n warning(false, 'Failed %s type: %s%s', location, error.message, stack != null ? stack : '');\n }\n }\n }\n }\n}\n\nmodule.exports = checkPropTypes;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/prop-types/checkPropTypes.js\n// module id = 1218\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/prop-types/checkPropTypes.js?", + ); + + /***/ + }, + /* 1219 */ + /* unknown exports provided */ + /* all exports used */ + /*!*************************************************!*\ + !*** ./~/prop-types/factoryWithTypeCheckers.js ***! + \*************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n\n\nvar emptyFunction = __webpack_require__(/*! fbjs/lib/emptyFunction */ 40);\nvar invariant = __webpack_require__(/*! fbjs/lib/invariant */ 12);\nvar warning = __webpack_require__(/*! fbjs/lib/warning */ 13);\n\nvar ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ 486);\nvar checkPropTypes = __webpack_require__(/*! ./checkPropTypes */ 1218);\n\nmodule.exports = function(isValidElement, throwOnDirectAccess) {\n /* global Symbol */\n var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\n var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.\n\n /**\n * Returns the iterator method function contained on the iterable object.\n *\n * Be sure to invoke the function with the iterable as context:\n *\n * var iteratorFn = getIteratorFn(myIterable);\n * if (iteratorFn) {\n * var iterator = iteratorFn.call(myIterable);\n * ...\n * }\n *\n * @param {?object} maybeIterable\n * @return {?function}\n */\n function getIteratorFn(maybeIterable) {\n var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);\n if (typeof iteratorFn === 'function') {\n return iteratorFn;\n }\n }\n\n /**\n * Collection of methods that allow declaration and validation of props that are\n * supplied to React components. Example usage:\n *\n * var Props = require('ReactPropTypes');\n * var MyArticle = React.createClass({\n * propTypes: {\n * // An optional string prop named \"description\".\n * description: Props.string,\n *\n * // A required enum prop named \"category\".\n * category: Props.oneOf(['News','Photos']).isRequired,\n *\n * // A prop named \"dialog\" that requires an instance of Dialog.\n * dialog: Props.instanceOf(Dialog).isRequired\n * },\n * render: function() { ... }\n * });\n *\n * A more formal specification of how these methods are used:\n *\n * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)\n * decl := ReactPropTypes.{type}(.isRequired)?\n *\n * Each and every declaration produces a function with the same signature. This\n * allows the creation of custom validation functions. For example:\n *\n * var MyLink = React.createClass({\n * propTypes: {\n * // An optional string or URI prop named \"href\".\n * href: function(props, propName, componentName) {\n * var propValue = props[propName];\n * if (propValue != null && typeof propValue !== 'string' &&\n * !(propValue instanceof URI)) {\n * return new Error(\n * 'Expected a string or an URI for ' + propName + ' in ' +\n * componentName\n * );\n * }\n * }\n * },\n * render: function() {...}\n * });\n *\n * @internal\n */\n\n var ANONYMOUS = '<<anonymous>>';\n\n // Important!\n // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.\n var ReactPropTypes = {\n array: createPrimitiveTypeChecker('array'),\n bool: createPrimitiveTypeChecker('boolean'),\n func: createPrimitiveTypeChecker('function'),\n number: createPrimitiveTypeChecker('number'),\n object: createPrimitiveTypeChecker('object'),\n string: createPrimitiveTypeChecker('string'),\n symbol: createPrimitiveTypeChecker('symbol'),\n\n any: createAnyTypeChecker(),\n arrayOf: createArrayOfTypeChecker,\n element: createElementTypeChecker(),\n instanceOf: createInstanceTypeChecker,\n node: createNodeChecker(),\n objectOf: createObjectOfTypeChecker,\n oneOf: createEnumTypeChecker,\n oneOfType: createUnionTypeChecker,\n shape: createShapeTypeChecker\n };\n\n /**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\n /*eslint-disable no-self-compare*/\n function is(x, y) {\n // SameValue algorithm\n if (x === y) {\n // Steps 1-5, 7-10\n // Steps 6.b-6.e: +0 != -0\n return x !== 0 || 1 / x === 1 / y;\n } else {\n // Step 6.a: NaN == NaN\n return x !== x && y !== y;\n }\n }\n /*eslint-enable no-self-compare*/\n\n /**\n * We use an Error-like object for backward compatibility as people may call\n * PropTypes directly and inspect their output. However, we don't use real\n * Errors anymore. We don't inspect their stack anyway, and creating them\n * is prohibitively expensive if they are created too often, such as what\n * happens in oneOfType() for any type before the one that matched.\n */\n function PropTypeError(message) {\n this.message = message;\n this.stack = '';\n }\n // Make `instanceof Error` still work for returned errors.\n PropTypeError.prototype = Error.prototype;\n\n function createChainableTypeChecker(validate) {\n if (true) {\n var manualPropTypeCallCache = {};\n var manualPropTypeWarningCount = 0;\n }\n function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {\n componentName = componentName || ANONYMOUS;\n propFullName = propFullName || propName;\n\n if (secret !== ReactPropTypesSecret) {\n if (throwOnDirectAccess) {\n // New behavior only for users of `prop-types` package\n invariant(\n false,\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use `PropTypes.checkPropTypes()` to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n } else if (\"dev\" !== 'production' && typeof console !== 'undefined') {\n // Old behavior for people using React.PropTypes\n var cacheKey = componentName + ':' + propName;\n if (\n !manualPropTypeCallCache[cacheKey] &&\n // Avoid spamming the console because they are often not actionable except for lib authors\n manualPropTypeWarningCount < 3\n ) {\n warning(\n false,\n 'You are manually calling a React.PropTypes validation ' +\n 'function for the `%s` prop on `%s`. This is deprecated ' +\n 'and will throw in the standalone `prop-types` package. ' +\n 'You may be seeing this warning due to a third-party PropTypes ' +\n 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.',\n propFullName,\n componentName\n );\n manualPropTypeCallCache[cacheKey] = true;\n manualPropTypeWarningCount++;\n }\n }\n }\n if (props[propName] == null) {\n if (isRequired) {\n if (props[propName] === null) {\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));\n }\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));\n }\n return null;\n } else {\n return validate(props, propName, componentName, location, propFullName);\n }\n }\n\n var chainedCheckType = checkType.bind(null, false);\n chainedCheckType.isRequired = checkType.bind(null, true);\n\n return chainedCheckType;\n }\n\n function createPrimitiveTypeChecker(expectedType) {\n function validate(props, propName, componentName, location, propFullName, secret) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== expectedType) {\n // `propValue` being instance of, say, date/regexp, pass the 'object'\n // check, but we can offer a more precise error message here rather than\n // 'of type `object`'.\n var preciseType = getPreciseType(propValue);\n\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createAnyTypeChecker() {\n return createChainableTypeChecker(emptyFunction.thatReturnsNull);\n }\n\n function createArrayOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');\n }\n var propValue = props[propName];\n if (!Array.isArray(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));\n }\n for (var i = 0; i < propValue.length; i++) {\n var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createElementTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (!isValidElement(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createInstanceTypeChecker(expectedClass) {\n function validate(props, propName, componentName, location, propFullName) {\n if (!(props[propName] instanceof expectedClass)) {\n var expectedClassName = expectedClass.name || ANONYMOUS;\n var actualClassName = getClassName(props[propName]);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createEnumTypeChecker(expectedValues) {\n if (!Array.isArray(expectedValues)) {\n true ? warning(false, 'Invalid argument supplied to oneOf, expected an instance of array.') : void 0;\n return emptyFunction.thatReturnsNull;\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n for (var i = 0; i < expectedValues.length; i++) {\n if (is(propValue, expectedValues[i])) {\n return null;\n }\n }\n\n var valuesString = JSON.stringify(expectedValues);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createObjectOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');\n }\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));\n }\n for (var key in propValue) {\n if (propValue.hasOwnProperty(key)) {\n var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createUnionTypeChecker(arrayOfTypeCheckers) {\n if (!Array.isArray(arrayOfTypeCheckers)) {\n true ? warning(false, 'Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;\n return emptyFunction.thatReturnsNull;\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) {\n return null;\n }\n }\n\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createNodeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n if (!isNode(props[propName])) {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n for (var key in shapeTypes) {\n var checker = shapeTypes[key];\n if (!checker) {\n continue;\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function isNode(propValue) {\n switch (typeof propValue) {\n case 'number':\n case 'string':\n case 'undefined':\n return true;\n case 'boolean':\n return !propValue;\n case 'object':\n if (Array.isArray(propValue)) {\n return propValue.every(isNode);\n }\n if (propValue === null || isValidElement(propValue)) {\n return true;\n }\n\n var iteratorFn = getIteratorFn(propValue);\n if (iteratorFn) {\n var iterator = iteratorFn.call(propValue);\n var step;\n if (iteratorFn !== propValue.entries) {\n while (!(step = iterator.next()).done) {\n if (!isNode(step.value)) {\n return false;\n }\n }\n } else {\n // Iterator will provide entry [k,v] tuples rather than values.\n while (!(step = iterator.next()).done) {\n var entry = step.value;\n if (entry) {\n if (!isNode(entry[1])) {\n return false;\n }\n }\n }\n }\n } else {\n return false;\n }\n\n return true;\n default:\n return false;\n }\n }\n\n function isSymbol(propType, propValue) {\n // Native Symbol.\n if (propType === 'symbol') {\n return true;\n }\n\n // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'\n if (propValue['@@toStringTag'] === 'Symbol') {\n return true;\n }\n\n // Fallback for non-spec compliant Symbols which are polyfilled.\n if (typeof Symbol === 'function' && propValue instanceof Symbol) {\n return true;\n }\n\n return false;\n }\n\n // Equivalent of `typeof` but with special handling for array and regexp.\n function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }\n\n // This handles more types than `getPropType`. Only used for error messages.\n // See `createPrimitiveTypeChecker`.\n function getPreciseType(propValue) {\n var propType = getPropType(propValue);\n if (propType === 'object') {\n if (propValue instanceof Date) {\n return 'date';\n } else if (propValue instanceof RegExp) {\n return 'regexp';\n }\n }\n return propType;\n }\n\n // Returns class name of the object, if any.\n function getClassName(propValue) {\n if (!propValue.constructor || !propValue.constructor.name) {\n return ANONYMOUS;\n }\n return propValue.constructor.name;\n }\n\n ReactPropTypes.checkPropTypes = checkPropTypes;\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/prop-types/factoryWithTypeCheckers.js\n// module id = 1219\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/prop-types/factoryWithTypeCheckers.js?", + ); + + /***/ + }, + /* 1220 */ + /* unknown exports provided */ + /* all exports used */ + /*!***************************!*\ + !*** ./~/qs/lib/parse.js ***! + \***************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nvar utils = __webpack_require__(/*! ./utils */ 488);\n\nvar has = Object.prototype.hasOwnProperty;\n\nvar defaults = {\n allowDots: false,\n allowPrototypes: false,\n arrayLimit: 20,\n decoder: utils.decode,\n delimiter: '&',\n depth: 5,\n parameterLimit: 1000,\n plainObjects: false,\n strictNullHandling: false\n};\n\nvar parseValues = function parseQueryStringValues(str, options) {\n var obj = {};\n var parts = str.split(options.delimiter, options.parameterLimit === Infinity ? undefined : options.parameterLimit);\n\n for (var i = 0; i < parts.length; ++i) {\n var part = parts[i];\n var pos = part.indexOf(']=') === -1 ? part.indexOf('=') : part.indexOf(']=') + 1;\n\n var key, val;\n if (pos === -1) {\n key = options.decoder(part);\n val = options.strictNullHandling ? null : '';\n } else {\n key = options.decoder(part.slice(0, pos));\n val = options.decoder(part.slice(pos + 1));\n }\n if (has.call(obj, key)) {\n obj[key] = [].concat(obj[key]).concat(val);\n } else {\n obj[key] = val;\n }\n }\n\n return obj;\n};\n\nvar parseObject = function parseObjectRecursive(chain, val, options) {\n if (!chain.length) {\n return val;\n }\n\n var root = chain.shift();\n\n var obj;\n if (root === '[]') {\n obj = [];\n obj = obj.concat(parseObject(chain, val, options));\n } else {\n obj = options.plainObjects ? Object.create(null) : {};\n var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root;\n var index = parseInt(cleanRoot, 10);\n if (\n !isNaN(index) &&\n root !== cleanRoot &&\n String(index) === cleanRoot &&\n index >= 0 &&\n (options.parseArrays && index <= options.arrayLimit)\n ) {\n obj = [];\n obj[index] = parseObject(chain, val, options);\n } else {\n obj[cleanRoot] = parseObject(chain, val, options);\n }\n }\n\n return obj;\n};\n\nvar parseKeys = function parseQueryStringKeys(givenKey, val, options) {\n if (!givenKey) {\n return;\n }\n\n // Transform dot notation to bracket notation\n var key = options.allowDots ? givenKey.replace(/\\.([^.[]+)/g, '[$1]') : givenKey;\n\n // The regex chunks\n\n var brackets = /(\\[[^[\\]]*])/;\n var child = /(\\[[^[\\]]*])/g;\n\n // Get the parent\n\n var segment = brackets.exec(key);\n var parent = segment ? key.slice(0, segment.index) : key;\n\n // Stash the parent if it exists\n\n var keys = [];\n if (parent) {\n // If we aren't using plain objects, optionally prefix keys\n // that would overwrite object prototype properties\n if (!options.plainObjects && has.call(Object.prototype, parent)) {\n if (!options.allowPrototypes) {\n return;\n }\n }\n\n keys.push(parent);\n }\n\n // Loop through children appending to the array until we hit depth\n\n var i = 0;\n while ((segment = child.exec(key)) !== null && i < options.depth) {\n i += 1;\n if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) {\n if (!options.allowPrototypes) {\n return;\n }\n }\n keys.push(segment[1]);\n }\n\n // If there's a remainder, just add whatever is left\n\n if (segment) {\n keys.push('[' + key.slice(segment.index) + ']');\n }\n\n return parseObject(keys, val, options);\n};\n\nmodule.exports = function (str, opts) {\n var options = opts || {};\n\n if (options.decoder !== null && options.decoder !== undefined && typeof options.decoder !== 'function') {\n throw new TypeError('Decoder has to be a function.');\n }\n\n options.delimiter = typeof options.delimiter === 'string' || utils.isRegExp(options.delimiter) ? options.delimiter : defaults.delimiter;\n options.depth = typeof options.depth === 'number' ? options.depth : defaults.depth;\n options.arrayLimit = typeof options.arrayLimit === 'number' ? options.arrayLimit : defaults.arrayLimit;\n options.parseArrays = options.parseArrays !== false;\n options.decoder = typeof options.decoder === 'function' ? options.decoder : defaults.decoder;\n options.allowDots = typeof options.allowDots === 'boolean' ? options.allowDots : defaults.allowDots;\n options.plainObjects = typeof options.plainObjects === 'boolean' ? options.plainObjects : defaults.plainObjects;\n options.allowPrototypes = typeof options.allowPrototypes === 'boolean' ? options.allowPrototypes : defaults.allowPrototypes;\n options.parameterLimit = typeof options.parameterLimit === 'number' ? options.parameterLimit : defaults.parameterLimit;\n options.strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : defaults.strictNullHandling;\n\n if (str === '' || str === null || typeof str === 'undefined') {\n return options.plainObjects ? Object.create(null) : {};\n }\n\n var tempObj = typeof str === 'string' ? parseValues(str, options) : str;\n var obj = options.plainObjects ? Object.create(null) : {};\n\n // Iterate over the keys and setup the new object\n\n var keys = Object.keys(tempObj);\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n var newObj = parseKeys(key, tempObj[key], options);\n obj = utils.merge(obj, newObj, options);\n }\n\n return utils.compact(obj);\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/qs/lib/parse.js\n// module id = 1220\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/qs/lib/parse.js?", + ); + + /***/ + }, + /* 1221 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************!*\ + !*** ./~/qs/lib/stringify.js ***! + \*******************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nvar utils = __webpack_require__(/*! ./utils */ 488);\nvar formats = __webpack_require__(/*! ./formats */ 487);\n\nvar arrayPrefixGenerators = {\n brackets: function brackets(prefix) { // eslint-disable-line func-name-matching\n return prefix + '[]';\n },\n indices: function indices(prefix, key) { // eslint-disable-line func-name-matching\n return prefix + '[' + key + ']';\n },\n repeat: function repeat(prefix) { // eslint-disable-line func-name-matching\n return prefix;\n }\n};\n\nvar toISO = Date.prototype.toISOString;\n\nvar defaults = {\n delimiter: '&',\n encode: true,\n encoder: utils.encode,\n encodeValuesOnly: false,\n serializeDate: function serializeDate(date) { // eslint-disable-line func-name-matching\n return toISO.call(date);\n },\n skipNulls: false,\n strictNullHandling: false\n};\n\nvar stringify = function stringify( // eslint-disable-line func-name-matching\n object,\n prefix,\n generateArrayPrefix,\n strictNullHandling,\n skipNulls,\n encoder,\n filter,\n sort,\n allowDots,\n serializeDate,\n formatter,\n encodeValuesOnly\n) {\n var obj = object;\n if (typeof filter === 'function') {\n obj = filter(prefix, obj);\n } else if (obj instanceof Date) {\n obj = serializeDate(obj);\n } else if (obj === null) {\n if (strictNullHandling) {\n return encoder && !encodeValuesOnly ? encoder(prefix) : prefix;\n }\n\n obj = '';\n }\n\n if (typeof obj === 'string' || typeof obj === 'number' || typeof obj === 'boolean' || utils.isBuffer(obj)) {\n if (encoder) {\n var keyValue = encodeValuesOnly ? prefix : encoder(prefix);\n return [formatter(keyValue) + '=' + formatter(encoder(obj))];\n }\n return [formatter(prefix) + '=' + formatter(String(obj))];\n }\n\n var values = [];\n\n if (typeof obj === 'undefined') {\n return values;\n }\n\n var objKeys;\n if (Array.isArray(filter)) {\n objKeys = filter;\n } else {\n var keys = Object.keys(obj);\n objKeys = sort ? keys.sort(sort) : keys;\n }\n\n for (var i = 0; i < objKeys.length; ++i) {\n var key = objKeys[i];\n\n if (skipNulls && obj[key] === null) {\n continue;\n }\n\n if (Array.isArray(obj)) {\n values = values.concat(stringify(\n obj[key],\n generateArrayPrefix(prefix, key),\n generateArrayPrefix,\n strictNullHandling,\n skipNulls,\n encoder,\n filter,\n sort,\n allowDots,\n serializeDate,\n formatter,\n encodeValuesOnly\n ));\n } else {\n values = values.concat(stringify(\n obj[key],\n prefix + (allowDots ? '.' + key : '[' + key + ']'),\n generateArrayPrefix,\n strictNullHandling,\n skipNulls,\n encoder,\n filter,\n sort,\n allowDots,\n serializeDate,\n formatter,\n encodeValuesOnly\n ));\n }\n }\n\n return values;\n};\n\nmodule.exports = function (object, opts) {\n var obj = object;\n var options = opts || {};\n\n if (options.encoder !== null && options.encoder !== undefined && typeof options.encoder !== 'function') {\n throw new TypeError('Encoder has to be a function.');\n }\n\n var delimiter = typeof options.delimiter === 'undefined' ? defaults.delimiter : options.delimiter;\n var strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : defaults.strictNullHandling;\n var skipNulls = typeof options.skipNulls === 'boolean' ? options.skipNulls : defaults.skipNulls;\n var encode = typeof options.encode === 'boolean' ? options.encode : defaults.encode;\n var encoder = typeof options.encoder === 'function' ? options.encoder : defaults.encoder;\n var sort = typeof options.sort === 'function' ? options.sort : null;\n var allowDots = typeof options.allowDots === 'undefined' ? false : options.allowDots;\n var serializeDate = typeof options.serializeDate === 'function' ? options.serializeDate : defaults.serializeDate;\n var encodeValuesOnly = typeof options.encodeValuesOnly === 'boolean' ? options.encodeValuesOnly : defaults.encodeValuesOnly;\n if (typeof options.format === 'undefined') {\n options.format = formats.default;\n } else if (!Object.prototype.hasOwnProperty.call(formats.formatters, options.format)) {\n throw new TypeError('Unknown format option provided.');\n }\n var formatter = formats.formatters[options.format];\n var objKeys;\n var filter;\n\n if (typeof options.filter === 'function') {\n filter = options.filter;\n obj = filter('', obj);\n } else if (Array.isArray(options.filter)) {\n filter = options.filter;\n objKeys = filter;\n }\n\n var keys = [];\n\n if (typeof obj !== 'object' || obj === null) {\n return '';\n }\n\n var arrayFormat;\n if (options.arrayFormat in arrayPrefixGenerators) {\n arrayFormat = options.arrayFormat;\n } else if ('indices' in options) {\n arrayFormat = options.indices ? 'indices' : 'repeat';\n } else {\n arrayFormat = 'indices';\n }\n\n var generateArrayPrefix = arrayPrefixGenerators[arrayFormat];\n\n if (!objKeys) {\n objKeys = Object.keys(obj);\n }\n\n if (sort) {\n objKeys.sort(sort);\n }\n\n for (var i = 0; i < objKeys.length; ++i) {\n var key = objKeys[i];\n\n if (skipNulls && obj[key] === null) {\n continue;\n }\n\n keys = keys.concat(stringify(\n obj[key],\n key,\n generateArrayPrefix,\n strictNullHandling,\n skipNulls,\n encode ? encoder : null,\n filter,\n sort,\n allowDots,\n serializeDate,\n formatter,\n encodeValuesOnly\n ));\n }\n\n return keys.join(delimiter);\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/qs/lib/stringify.js\n// module id = 1221\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/qs/lib/stringify.js?", + ); + + /***/ + }, + /* 1222 */ + /* unknown exports provided */ + /* all exports used */ + /*!*********************************!*\ + !*** ./~/query-string/index.js ***! + \*********************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\nvar strictUriEncode = __webpack_require__(/*! strict-uri-encode */ 1489);\nvar objectAssign = __webpack_require__(/*! object-assign */ 21);\n\nfunction encode(value, opts) {\n\tif (opts.encode) {\n\t\treturn opts.strict ? strictUriEncode(value) : encodeURIComponent(value);\n\t}\n\n\treturn value;\n}\n\nexports.extract = function (str) {\n\treturn str.split('?')[1] || '';\n};\n\nexports.parse = function (str) {\n\t// Create an object with no prototype\n\t// https://github.com/sindresorhus/query-string/issues/47\n\tvar ret = Object.create(null);\n\n\tif (typeof str !== 'string') {\n\t\treturn ret;\n\t}\n\n\tstr = str.trim().replace(/^(\\?|#|&)/, '');\n\n\tif (!str) {\n\t\treturn ret;\n\t}\n\n\tstr.split('&').forEach(function (param) {\n\t\tvar parts = param.replace(/\\+/g, ' ').split('=');\n\t\t// Firefox (pre 40) decodes `%3D` to `=`\n\t\t// https://github.com/sindresorhus/query-string/pull/37\n\t\tvar key = parts.shift();\n\t\tvar val = parts.length > 0 ? parts.join('=') : undefined;\n\n\t\tkey = decodeURIComponent(key);\n\n\t\t// missing `=` should be `null`:\n\t\t// http://w3.org/TR/2012/WD-url-20120524/#collect-url-parameters\n\t\tval = val === undefined ? null : decodeURIComponent(val);\n\n\t\tif (ret[key] === undefined) {\n\t\t\tret[key] = val;\n\t\t} else if (Array.isArray(ret[key])) {\n\t\t\tret[key].push(val);\n\t\t} else {\n\t\t\tret[key] = [ret[key], val];\n\t\t}\n\t});\n\n\treturn ret;\n};\n\nexports.stringify = function (obj, opts) {\n\tvar defaults = {\n\t\tencode: true,\n\t\tstrict: true\n\t};\n\n\topts = objectAssign(defaults, opts);\n\n\treturn obj ? Object.keys(obj).sort().map(function (key) {\n\t\tvar val = obj[key];\n\n\t\tif (val === undefined) {\n\t\t\treturn '';\n\t\t}\n\n\t\tif (val === null) {\n\t\t\treturn encode(key, opts);\n\t\t}\n\n\t\tif (Array.isArray(val)) {\n\t\t\tvar result = [];\n\n\t\t\tval.slice().forEach(function (val2) {\n\t\t\t\tif (val2 === undefined) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (val2 === null) {\n\t\t\t\t\tresult.push(encode(key, opts));\n\t\t\t\t} else {\n\t\t\t\t\tresult.push(encode(key, opts) + '=' + encode(val2, opts));\n\t\t\t\t}\n\t\t\t});\n\n\t\t\treturn result.join('&');\n\t\t}\n\n\t\treturn encode(key, opts) + '=' + encode(val, opts);\n\t}).filter(function (x) {\n\t\treturn x.length > 0;\n\t}).join('&') : '';\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/query-string/index.js\n// module id = 1222\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/query-string/index.js?", + ); + + /***/ + }, + /* 1223 */ + /* unknown exports provided */ + /* all exports used */ + /*!*********************************!*\ + !*** ./~/rc-align/lib/Align.js ***! + \*********************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\n\nvar _react = __webpack_require__(/*! react */ 1);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactDom = __webpack_require__(/*! react-dom */ 16);\n\nvar _reactDom2 = _interopRequireDefault(_reactDom);\n\nvar _domAlign = __webpack_require__(/*! dom-align */ 1107);\n\nvar _domAlign2 = _interopRequireDefault(_domAlign);\n\nvar _addEventListener = __webpack_require__(/*! rc-util/lib/Dom/addEventListener */ 493);\n\nvar _addEventListener2 = _interopRequireDefault(_addEventListener);\n\nvar _isWindow = __webpack_require__(/*! ./isWindow */ 1225);\n\nvar _isWindow2 = _interopRequireDefault(_isWindow);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }\n\nfunction buffer(fn, ms) {\n var timer = void 0;\n\n function clear() {\n if (timer) {\n clearTimeout(timer);\n timer = null;\n }\n }\n\n function bufferFn() {\n clear();\n timer = setTimeout(fn, ms);\n }\n\n bufferFn.clear = clear;\n\n return bufferFn;\n}\n\nvar Align = _react2["default"].createClass({\n displayName: \'Align\',\n\n propTypes: {\n childrenProps: _react.PropTypes.object,\n align: _react.PropTypes.object.isRequired,\n target: _react.PropTypes.func,\n onAlign: _react.PropTypes.func,\n monitorBufferTime: _react.PropTypes.number,\n monitorWindowResize: _react.PropTypes.bool,\n disabled: _react.PropTypes.bool,\n children: _react.PropTypes.any\n },\n\n getDefaultProps: function getDefaultProps() {\n return {\n target: function target() {\n return window;\n },\n onAlign: function onAlign() {},\n\n monitorBufferTime: 50,\n monitorWindowResize: false,\n disabled: false\n };\n },\n componentDidMount: function componentDidMount() {\n var props = this.props;\n // if parent ref not attached .... use document.getElementById\n this.forceAlign();\n if (!props.disabled && props.monitorWindowResize) {\n this.startMonitorWindowResize();\n }\n },\n componentDidUpdate: function componentDidUpdate(prevProps) {\n var reAlign = false;\n var props = this.props;\n\n if (!props.disabled) {\n if (prevProps.disabled || prevProps.align !== props.align) {\n reAlign = true;\n } else {\n var lastTarget = prevProps.target();\n var currentTarget = props.target();\n if ((0, _isWindow2["default"])(lastTarget) && (0, _isWindow2["default"])(currentTarget)) {\n reAlign = false;\n } else if (lastTarget !== currentTarget) {\n reAlign = true;\n }\n }\n }\n\n if (reAlign) {\n this.forceAlign();\n }\n\n if (props.monitorWindowResize && !props.disabled) {\n this.startMonitorWindowResize();\n } else {\n this.stopMonitorWindowResize();\n }\n },\n componentWillUnmount: function componentWillUnmount() {\n this.stopMonitorWindowResize();\n },\n startMonitorWindowResize: function startMonitorWindowResize() {\n if (!this.resizeHandler) {\n this.bufferMonitor = buffer(this.forceAlign, this.props.monitorBufferTime);\n this.resizeHandler = (0, _addEventListener2["default"])(window, \'resize\', this.bufferMonitor);\n }\n },\n stopMonitorWindowResize: function stopMonitorWindowResize() {\n if (this.resizeHandler) {\n this.bufferMonitor.clear();\n this.resizeHandler.remove();\n this.resizeHandler = null;\n }\n },\n forceAlign: function forceAlign() {\n var props = this.props;\n if (!props.disabled) {\n var source = _reactDom2["default"].findDOMNode(this);\n props.onAlign(source, (0, _domAlign2["default"])(source, props.target(), props.align));\n }\n },\n render: function render() {\n var _props = this.props;\n var childrenProps = _props.childrenProps;\n var children = _props.children;\n\n var child = _react2["default"].Children.only(children);\n if (childrenProps) {\n var newProps = {};\n for (var prop in childrenProps) {\n if (childrenProps.hasOwnProperty(prop)) {\n newProps[prop] = this.props[childrenProps[prop]];\n }\n }\n return _react2["default"].cloneElement(child, newProps);\n }\n return child;\n }\n});\n\nexports["default"] = Align;\nmodule.exports = exports[\'default\'];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/rc-align/lib/Align.js\n// module id = 1223\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/rc-align/lib/Align.js?', + ); + + /***/ + }, + /* 1224 */ + /* unknown exports provided */ + /* all exports used */ + /*!*********************************!*\ + !*** ./~/rc-align/lib/index.js ***! + \*********************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\n\nvar _Align = __webpack_require__(/*! ./Align */ 1223);\n\nvar _Align2 = _interopRequireDefault(_Align);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }\n\nexports["default"] = _Align2["default"]; // export this package\'s api\n\nmodule.exports = exports[\'default\'];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/rc-align/lib/index.js\n// module id = 1224\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/rc-align/lib/index.js?', + ); + + /***/ + }, + /* 1225 */ + /* unknown exports provided */ + /* all exports used */ + /*!************************************!*\ + !*** ./~/rc-align/lib/isWindow.js ***! + \************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports["default"] = isWindow;\nfunction isWindow(obj) {\n /* eslint no-eq-null: 0 */\n /* eslint eqeqeq: 0 */\n return obj != null && obj == obj.window;\n}\nmodule.exports = exports[\'default\'];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/rc-align/lib/isWindow.js\n// module id = 1225\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/rc-align/lib/isWindow.js?', + ); + + /***/ + }, + /* 1226 */ + /* unknown exports provided */ + /* all exports used */ + /*!*************************************!*\ + !*** ./~/rc-animate/lib/Animate.js ***! + \*************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\n\nvar _react = __webpack_require__(/*! react */ 1);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _ChildrenUtils = __webpack_require__(/*! ./ChildrenUtils */ 1228);\n\nvar _AnimateChild = __webpack_require__(/*! ./AnimateChild */ 1227);\n\nvar _AnimateChild2 = _interopRequireDefault(_AnimateChild);\n\nvar _util = __webpack_require__(/*! ./util */ 489);\n\nvar _util2 = _interopRequireDefault(_util);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }\n\nfunction _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\nvar defaultKey = \'rc_animate_\' + Date.now();\n\n\nfunction getChildrenFromProps(props) {\n var children = props.children;\n if (_react2["default"].isValidElement(children)) {\n if (!children.key) {\n return _react2["default"].cloneElement(children, {\n key: defaultKey\n });\n }\n }\n return children;\n}\n\nfunction noop() {}\n\nvar Animate = _react2["default"].createClass({\n displayName: \'Animate\',\n\n propTypes: {\n component: _react2["default"].PropTypes.any,\n animation: _react2["default"].PropTypes.object,\n transitionName: _react2["default"].PropTypes.oneOfType([_react2["default"].PropTypes.string, _react2["default"].PropTypes.object]),\n transitionEnter: _react2["default"].PropTypes.bool,\n transitionAppear: _react2["default"].PropTypes.bool,\n exclusive: _react2["default"].PropTypes.bool,\n transitionLeave: _react2["default"].PropTypes.bool,\n onEnd: _react2["default"].PropTypes.func,\n onEnter: _react2["default"].PropTypes.func,\n onLeave: _react2["default"].PropTypes.func,\n onAppear: _react2["default"].PropTypes.func,\n showProp: _react2["default"].PropTypes.string\n },\n\n getDefaultProps: function getDefaultProps() {\n return {\n animation: {},\n component: \'span\',\n transitionEnter: true,\n transitionLeave: true,\n transitionAppear: false,\n onEnd: noop,\n onEnter: noop,\n onLeave: noop,\n onAppear: noop\n };\n },\n getInitialState: function getInitialState() {\n this.currentlyAnimatingKeys = {};\n this.keysToEnter = [];\n this.keysToLeave = [];\n return {\n children: (0, _ChildrenUtils.toArrayChildren)(getChildrenFromProps(this.props))\n };\n },\n componentDidMount: function componentDidMount() {\n var _this = this;\n\n var showProp = this.props.showProp;\n var children = this.state.children;\n if (showProp) {\n children = children.filter(function (child) {\n return !!child.props[showProp];\n });\n }\n children.forEach(function (child) {\n if (child) {\n _this.performAppear(child.key);\n }\n });\n },\n componentWillReceiveProps: function componentWillReceiveProps(nextProps) {\n var _this2 = this;\n\n this.nextProps = nextProps;\n var nextChildren = (0, _ChildrenUtils.toArrayChildren)(getChildrenFromProps(nextProps));\n var props = this.props;\n // exclusive needs immediate response\n if (props.exclusive) {\n Object.keys(this.currentlyAnimatingKeys).forEach(function (key) {\n _this2.stop(key);\n });\n }\n var showProp = props.showProp;\n var currentlyAnimatingKeys = this.currentlyAnimatingKeys;\n // last props children if exclusive\n var currentChildren = props.exclusive ? (0, _ChildrenUtils.toArrayChildren)(getChildrenFromProps(props)) : this.state.children;\n // in case destroy in showProp mode\n var newChildren = [];\n if (showProp) {\n currentChildren.forEach(function (currentChild) {\n var nextChild = currentChild && (0, _ChildrenUtils.findChildInChildrenByKey)(nextChildren, currentChild.key);\n var newChild = void 0;\n if ((!nextChild || !nextChild.props[showProp]) && currentChild.props[showProp]) {\n newChild = _react2["default"].cloneElement(nextChild || currentChild, _defineProperty({}, showProp, true));\n } else {\n newChild = nextChild;\n }\n if (newChild) {\n newChildren.push(newChild);\n }\n });\n nextChildren.forEach(function (nextChild) {\n if (!nextChild || !(0, _ChildrenUtils.findChildInChildrenByKey)(currentChildren, nextChild.key)) {\n newChildren.push(nextChild);\n }\n });\n } else {\n newChildren = (0, _ChildrenUtils.mergeChildren)(currentChildren, nextChildren);\n }\n\n // need render to avoid update\n this.setState({\n children: newChildren\n });\n\n nextChildren.forEach(function (child) {\n var key = child && child.key;\n if (child && currentlyAnimatingKeys[key]) {\n return;\n }\n var hasPrev = child && (0, _ChildrenUtils.findChildInChildrenByKey)(currentChildren, key);\n if (showProp) {\n var showInNext = child.props[showProp];\n if (hasPrev) {\n var showInNow = (0, _ChildrenUtils.findShownChildInChildrenByKey)(currentChildren, key, showProp);\n if (!showInNow && showInNext) {\n _this2.keysToEnter.push(key);\n }\n } else if (showInNext) {\n _this2.keysToEnter.push(key);\n }\n } else if (!hasPrev) {\n _this2.keysToEnter.push(key);\n }\n });\n\n currentChildren.forEach(function (child) {\n var key = child && child.key;\n if (child && currentlyAnimatingKeys[key]) {\n return;\n }\n var hasNext = child && (0, _ChildrenUtils.findChildInChildrenByKey)(nextChildren, key);\n if (showProp) {\n var showInNow = child.props[showProp];\n if (hasNext) {\n var showInNext = (0, _ChildrenUtils.findShownChildInChildrenByKey)(nextChildren, key, showProp);\n if (!showInNext && showInNow) {\n _this2.keysToLeave.push(key);\n }\n } else if (showInNow) {\n _this2.keysToLeave.push(key);\n }\n } else if (!hasNext) {\n _this2.keysToLeave.push(key);\n }\n });\n },\n componentDidUpdate: function componentDidUpdate() {\n var keysToEnter = this.keysToEnter;\n this.keysToEnter = [];\n keysToEnter.forEach(this.performEnter);\n var keysToLeave = this.keysToLeave;\n this.keysToLeave = [];\n keysToLeave.forEach(this.performLeave);\n },\n performEnter: function performEnter(key) {\n // may already remove by exclusive\n if (this.refs[key]) {\n this.currentlyAnimatingKeys[key] = true;\n this.refs[key].componentWillEnter(this.handleDoneAdding.bind(this, key, \'enter\'));\n }\n },\n performAppear: function performAppear(key) {\n if (this.refs[key]) {\n this.currentlyAnimatingKeys[key] = true;\n this.refs[key].componentWillAppear(this.handleDoneAdding.bind(this, key, \'appear\'));\n }\n },\n handleDoneAdding: function handleDoneAdding(key, type) {\n var props = this.props;\n delete this.currentlyAnimatingKeys[key];\n // if update on exclusive mode, skip check\n if (props.exclusive && props !== this.nextProps) {\n return;\n }\n var currentChildren = (0, _ChildrenUtils.toArrayChildren)(getChildrenFromProps(props));\n if (!this.isValidChildByKey(currentChildren, key)) {\n // exclusive will not need this\n this.performLeave(key);\n } else {\n if (type === \'appear\') {\n if (_util2["default"].allowAppearCallback(props)) {\n props.onAppear(key);\n props.onEnd(key, true);\n }\n } else {\n if (_util2["default"].allowEnterCallback(props)) {\n props.onEnter(key);\n props.onEnd(key, true);\n }\n }\n }\n },\n performLeave: function performLeave(key) {\n // may already remove by exclusive\n if (this.refs[key]) {\n this.currentlyAnimatingKeys[key] = true;\n this.refs[key].componentWillLeave(this.handleDoneLeaving.bind(this, key));\n }\n },\n handleDoneLeaving: function handleDoneLeaving(key) {\n var props = this.props;\n delete this.currentlyAnimatingKeys[key];\n // if update on exclusive mode, skip check\n if (props.exclusive && props !== this.nextProps) {\n return;\n }\n var currentChildren = (0, _ChildrenUtils.toArrayChildren)(getChildrenFromProps(props));\n // in case state change is too fast\n if (this.isValidChildByKey(currentChildren, key)) {\n this.performEnter(key);\n } else {\n var end = function end() {\n if (_util2["default"].allowLeaveCallback(props)) {\n props.onLeave(key);\n props.onEnd(key, false);\n }\n };\n /* eslint react/no-is-mounted:0 */\n if (this.isMounted() && !(0, _ChildrenUtils.isSameChildren)(this.state.children, currentChildren, props.showProp)) {\n this.setState({\n children: currentChildren\n }, end);\n } else {\n end();\n }\n }\n },\n isValidChildByKey: function isValidChildByKey(currentChildren, key) {\n var showProp = this.props.showProp;\n if (showProp) {\n return (0, _ChildrenUtils.findShownChildInChildrenByKey)(currentChildren, key, showProp);\n }\n return (0, _ChildrenUtils.findChildInChildrenByKey)(currentChildren, key);\n },\n stop: function stop(key) {\n delete this.currentlyAnimatingKeys[key];\n var component = this.refs[key];\n if (component) {\n component.stop();\n }\n },\n render: function render() {\n var props = this.props;\n this.nextProps = props;\n var stateChildren = this.state.children;\n var children = null;\n if (stateChildren) {\n children = stateChildren.map(function (child) {\n if (child === null || child === undefined) {\n return child;\n }\n if (!child.key) {\n throw new Error(\'must set key for <rc-animate> children\');\n }\n return _react2["default"].createElement(\n _AnimateChild2["default"],\n {\n key: child.key,\n ref: child.key,\n animation: props.animation,\n transitionName: props.transitionName,\n transitionEnter: props.transitionEnter,\n transitionAppear: props.transitionAppear,\n transitionLeave: props.transitionLeave\n },\n child\n );\n });\n }\n var Component = props.component;\n if (Component) {\n var passedProps = props;\n if (typeof Component === \'string\') {\n passedProps = {\n className: props.className,\n style: props.style\n };\n }\n return _react2["default"].createElement(\n Component,\n passedProps,\n children\n );\n }\n return children[0] || null;\n }\n});\n\nexports["default"] = Animate;\nmodule.exports = exports[\'default\'];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/rc-animate/lib/Animate.js\n// module id = 1226\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/rc-animate/lib/Animate.js?', + ); + + /***/ + }, + /* 1227 */ + /* unknown exports provided */ + /* all exports used */ + /*!******************************************!*\ + !*** ./~/rc-animate/lib/AnimateChild.js ***! + \******************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol ? \"symbol\" : typeof obj; };\n\nvar _react = __webpack_require__(/*! react */ 1);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactDom = __webpack_require__(/*! react-dom */ 16);\n\nvar _reactDom2 = _interopRequireDefault(_reactDom);\n\nvar _cssAnimation = __webpack_require__(/*! css-animation */ 959);\n\nvar _cssAnimation2 = _interopRequireDefault(_cssAnimation);\n\nvar _util = __webpack_require__(/*! ./util */ 489);\n\nvar _util2 = _interopRequireDefault(_util);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nvar transitionMap = {\n enter: 'transitionEnter',\n appear: 'transitionAppear',\n leave: 'transitionLeave'\n};\n\nvar AnimateChild = _react2[\"default\"].createClass({\n displayName: 'AnimateChild',\n\n propTypes: {\n children: _react2[\"default\"].PropTypes.any\n },\n\n componentWillUnmount: function componentWillUnmount() {\n this.stop();\n },\n componentWillEnter: function componentWillEnter(done) {\n if (_util2[\"default\"].isEnterSupported(this.props)) {\n this.transition('enter', done);\n } else {\n done();\n }\n },\n componentWillAppear: function componentWillAppear(done) {\n if (_util2[\"default\"].isAppearSupported(this.props)) {\n this.transition('appear', done);\n } else {\n done();\n }\n },\n componentWillLeave: function componentWillLeave(done) {\n if (_util2[\"default\"].isLeaveSupported(this.props)) {\n this.transition('leave', done);\n } else {\n // always sync, do not interupt with react component life cycle\n // update hidden -> animate hidden ->\n // didUpdate -> animate leave -> unmount (if animate is none)\n done();\n }\n },\n transition: function transition(animationType, finishCallback) {\n var _this = this;\n\n var node = _reactDom2[\"default\"].findDOMNode(this);\n var props = this.props;\n var transitionName = props.transitionName;\n var nameIsObj = (typeof transitionName === 'undefined' ? 'undefined' : _typeof(transitionName)) === 'object';\n this.stop();\n var end = function end() {\n _this.stopper = null;\n finishCallback();\n };\n if ((_cssAnimation.isCssAnimationSupported || !props.animation[animationType]) && transitionName && props[transitionMap[animationType]]) {\n var name = nameIsObj ? transitionName[animationType] : transitionName + '-' + animationType;\n var activeName = name + '-active';\n if (nameIsObj && transitionName[animationType + 'Active']) {\n activeName = transitionName[animationType + 'Active'];\n }\n this.stopper = (0, _cssAnimation2[\"default\"])(node, {\n name: name,\n active: activeName\n }, end);\n } else {\n this.stopper = props.animation[animationType](node, end);\n }\n },\n stop: function stop() {\n var stopper = this.stopper;\n if (stopper) {\n this.stopper = null;\n stopper.stop();\n }\n },\n render: function render() {\n return this.props.children;\n }\n});\n\nexports[\"default\"] = AnimateChild;\nmodule.exports = exports['default'];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/rc-animate/lib/AnimateChild.js\n// module id = 1227\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/rc-animate/lib/AnimateChild.js?", + ); + + /***/ + }, + /* 1228 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************************!*\ + !*** ./~/rc-animate/lib/ChildrenUtils.js ***! + \*******************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.toArrayChildren = toArrayChildren;\nexports.findChildInChildrenByKey = findChildInChildrenByKey;\nexports.findShownChildInChildrenByKey = findShownChildInChildrenByKey;\nexports.findHiddenChildInChildrenByKey = findHiddenChildInChildrenByKey;\nexports.isSameChildren = isSameChildren;\nexports.mergeChildren = mergeChildren;\n\nvar _react = __webpack_require__(/*! react */ 1);\n\nvar _react2 = _interopRequireDefault(_react);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }\n\nfunction toArrayChildren(children) {\n var ret = [];\n _react2["default"].Children.forEach(children, function (child) {\n ret.push(child);\n });\n return ret;\n}\n\nfunction findChildInChildrenByKey(children, key) {\n var ret = null;\n if (children) {\n children.forEach(function (child) {\n if (ret) {\n return;\n }\n if (child && child.key === key) {\n ret = child;\n }\n });\n }\n return ret;\n}\n\nfunction findShownChildInChildrenByKey(children, key, showProp) {\n var ret = null;\n if (children) {\n children.forEach(function (child) {\n if (child && child.key === key && child.props[showProp]) {\n if (ret) {\n throw new Error(\'two child with same key for <rc-animate> children\');\n }\n ret = child;\n }\n });\n }\n return ret;\n}\n\nfunction findHiddenChildInChildrenByKey(children, key, showProp) {\n var found = 0;\n if (children) {\n children.forEach(function (child) {\n if (found) {\n return;\n }\n found = child && child.key === key && !child.props[showProp];\n });\n }\n return found;\n}\n\nfunction isSameChildren(c1, c2, showProp) {\n var same = c1.length === c2.length;\n if (same) {\n c1.forEach(function (child, index) {\n var child2 = c2[index];\n if (child && child2) {\n if (child && !child2 || !child && child2) {\n same = false;\n } else if (child.key !== child2.key) {\n same = false;\n } else if (showProp && child.props[showProp] !== child2.props[showProp]) {\n same = false;\n }\n }\n });\n }\n return same;\n}\n\nfunction mergeChildren(prev, next) {\n var ret = [];\n\n // For each key of `next`, the list of keys to insert before that key in\n // the combined list\n var nextChildrenPending = {};\n var pendingChildren = [];\n prev.forEach(function (child) {\n if (child && findChildInChildrenByKey(next, child.key)) {\n if (pendingChildren.length) {\n nextChildrenPending[child.key] = pendingChildren;\n pendingChildren = [];\n }\n } else {\n pendingChildren.push(child);\n }\n });\n\n next.forEach(function (child) {\n if (child && nextChildrenPending.hasOwnProperty(child.key)) {\n ret = ret.concat(nextChildrenPending[child.key]);\n }\n ret.push(child);\n });\n\n ret = ret.concat(pendingChildren);\n\n return ret;\n}\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/rc-animate/lib/ChildrenUtils.js\n// module id = 1228\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/rc-animate/lib/ChildrenUtils.js?', + ); + + /***/ + }, + /* 1229 */ + /* unknown exports provided */ + /* all exports used */ + /*!***********************************!*\ + !*** ./~/rc-animate/lib/index.js ***! + \***********************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\n// export this package's api\nmodule.exports = __webpack_require__(/*! ./Animate */ 1226);\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/rc-animate/lib/index.js\n// module id = 1229\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/rc-animate/lib/index.js?", + ); + + /***/ + }, + /* 1230 */ + /* unknown exports provided */ + /* all exports used */ + /*!**********************************!*\ + !*** ./~/rc-slider/lib/Range.js ***! + \**********************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\n\nvar _defineProperty2 = __webpack_require__(/*! babel-runtime/helpers/defineProperty */ 109);\n\nvar _defineProperty3 = _interopRequireDefault(_defineProperty2);\n\nvar _toConsumableArray2 = __webpack_require__(/*! babel-runtime/helpers/toConsumableArray */ 315);\n\nvar _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2);\n\nvar _extends2 = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n\nvar _extends3 = _interopRequireDefault(_extends2);\n\nvar _classCallCheck2 = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 6);\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _possibleConstructorReturn2 = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 8);\n\nvar _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\nvar _inherits2 = __webpack_require__(/*! babel-runtime/helpers/inherits */ 7);\n\nvar _inherits3 = _interopRequireDefault(_inherits2);\n\nvar _react = __webpack_require__(/*! react */ 1);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _propTypes = __webpack_require__(/*! prop-types */ 0);\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nvar _classnames = __webpack_require__(/*! classnames */ 2);\n\nvar _classnames2 = _interopRequireDefault(_classnames);\n\nvar _Track = __webpack_require__(/*! ./common/Track */ 490);\n\nvar _Track2 = _interopRequireDefault(_Track);\n\nvar _createSlider = __webpack_require__(/*! ./common/createSlider */ 491);\n\nvar _createSlider2 = _interopRequireDefault(_createSlider);\n\nvar _utils = __webpack_require__(/*! ./utils */ 235);\n\nvar utils = _interopRequireWildcard(_utils);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj["default"] = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }\n\n/* eslint-disable react/prop-types */\nvar Range = function (_React$Component) {\n (0, _inherits3["default"])(Range, _React$Component);\n\n function Range(props) {\n (0, _classCallCheck3["default"])(this, Range);\n\n var _this = (0, _possibleConstructorReturn3["default"])(this, _React$Component.call(this, props));\n\n _this.onEnd = function () {\n _this.setState({ handle: null });\n _this.removeDocumentEvents();\n _this.props.onAfterChange(_this.getValue());\n };\n\n var count = props.count,\n min = props.min,\n max = props.max;\n\n var initialValue = Array.apply(null, Array(count + 1)).map(function () {\n return min;\n });\n var defaultValue = \'defaultValue\' in props ? props.defaultValue : initialValue;\n var value = props.value !== undefined ? props.value : defaultValue;\n var bounds = value.map(function (v) {\n return _this.trimAlignValue(v);\n });\n var recent = bounds[0] === max ? 0 : bounds.length - 1;\n\n _this.state = {\n handle: null,\n recent: recent,\n bounds: bounds\n };\n return _this;\n }\n\n Range.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {\n var _this2 = this;\n\n if (!(\'value\' in nextProps || \'min\' in nextProps || \'max\' in nextProps)) return;\n var bounds = this.state.bounds;\n\n var value = nextProps.value || bounds;\n var nextBounds = value.map(function (v) {\n return _this2.trimAlignValue(v, nextProps);\n });\n if (nextBounds.length === bounds.length && nextBounds.every(function (v, i) {\n return v === bounds[i];\n })) return;\n\n this.setState({ bounds: nextBounds });\n if (bounds.some(function (v) {\n return utils.isValueOutOfRange(v, nextProps);\n })) {\n this.props.onChange(nextBounds);\n }\n };\n\n Range.prototype.onChange = function onChange(state) {\n var props = this.props;\n var isNotControlled = !(\'value\' in props);\n if (isNotControlled) {\n this.setState(state);\n } else if (state.handle !== undefined) {\n this.setState({ handle: state.handle });\n }\n\n var data = (0, _extends3["default"])({}, this.state, state);\n var changedValue = data.bounds;\n props.onChange(changedValue);\n };\n\n Range.prototype.onStart = function onStart(position) {\n var props = this.props;\n var state = this.state;\n var bounds = this.getValue();\n props.onBeforeChange(bounds);\n\n var value = this.calcValueByPos(position);\n this.startValue = value;\n this.startPosition = position;\n\n var closestBound = this.getClosestBound(value);\n var boundNeedMoving = this.getBoundNeedMoving(value, closestBound);\n\n this.setState({\n handle: boundNeedMoving,\n recent: boundNeedMoving\n });\n\n var prevValue = bounds[boundNeedMoving];\n if (value === prevValue) return;\n\n var nextBounds = [].concat((0, _toConsumableArray3["default"])(state.bounds));\n nextBounds[boundNeedMoving] = value;\n this.onChange({ bounds: nextBounds });\n };\n\n Range.prototype.onMove = function onMove(e, position) {\n utils.pauseEvent(e);\n var props = this.props;\n var state = this.state;\n\n var value = this.calcValueByPos(position);\n var oldValue = state.bounds[state.handle];\n if (value === oldValue) return;\n\n var nextBounds = [].concat((0, _toConsumableArray3["default"])(state.bounds));\n nextBounds[state.handle] = value;\n var nextHandle = state.handle;\n if (props.pushable !== false) {\n var originalValue = state.bounds[nextHandle];\n this.pushSurroundingHandles(nextBounds, nextHandle, originalValue);\n } else if (props.allowCross) {\n nextBounds.sort(function (a, b) {\n return a - b;\n });\n nextHandle = nextBounds.indexOf(value);\n }\n this.onChange({\n handle: nextHandle,\n bounds: nextBounds\n });\n };\n\n Range.prototype.getValue = function getValue() {\n return this.state.bounds;\n };\n\n Range.prototype.getClosestBound = function getClosestBound(value) {\n var bounds = this.state.bounds;\n\n var closestBound = 0;\n for (var i = 1; i < bounds.length - 1; ++i) {\n if (value > bounds[i]) {\n closestBound = i;\n }\n }\n if (Math.abs(bounds[closestBound + 1] - value) < Math.abs(bounds[closestBound] - value)) {\n closestBound = closestBound + 1;\n }\n return closestBound;\n };\n\n Range.prototype.getBoundNeedMoving = function getBoundNeedMoving(value, closestBound) {\n var _state = this.state,\n bounds = _state.bounds,\n recent = _state.recent;\n\n var boundNeedMoving = closestBound;\n var isAtTheSamePoint = bounds[closestBound + 1] === bounds[closestBound];\n if (isAtTheSamePoint) {\n boundNeedMoving = recent;\n }\n\n if (isAtTheSamePoint && value !== bounds[closestBound + 1]) {\n boundNeedMoving = value < bounds[closestBound + 1] ? closestBound : closestBound + 1;\n }\n return boundNeedMoving;\n };\n\n Range.prototype.getLowerBound = function getLowerBound() {\n return this.state.bounds[0];\n };\n\n Range.prototype.getUpperBound = function getUpperBound() {\n var bounds = this.state.bounds;\n\n return bounds[bounds.length - 1];\n };\n\n /**\n * Returns an array of possible slider points, taking into account both\n * `marks` and `step`. The result is cached.\n */\n\n\n Range.prototype.getPoints = function getPoints() {\n var _props = this.props,\n marks = _props.marks,\n step = _props.step,\n min = _props.min,\n max = _props.max;\n\n var cache = this._getPointsCache;\n if (!cache || cache.marks !== marks || cache.step !== step) {\n var pointsObject = (0, _extends3["default"])({}, marks);\n if (step !== null) {\n for (var point = min; point <= max; point += step) {\n pointsObject[point] = point;\n }\n }\n var points = Object.keys(pointsObject).map(parseFloat);\n points.sort(function (a, b) {\n return a - b;\n });\n this._getPointsCache = { marks: marks, step: step, points: points };\n }\n return this._getPointsCache.points;\n };\n\n Range.prototype.pushSurroundingHandles = function pushSurroundingHandles(bounds, handle, originalValue) {\n var threshold = this.props.pushable;\n\n var value = bounds[handle];\n\n var direction = 0;\n if (bounds[handle + 1] - value < threshold) {\n direction = +1; // push to right\n }\n if (value - bounds[handle - 1] < threshold) {\n direction = -1; // push to left\n }\n\n if (direction === 0) {\n return;\n }\n\n var nextHandle = handle + direction;\n var diffToNext = direction * (bounds[nextHandle] - value);\n if (!this.pushHandle(bounds, nextHandle, direction, threshold - diffToNext)) {\n // revert to original value if pushing is impossible\n bounds[handle] = originalValue;\n }\n };\n\n Range.prototype.pushHandle = function pushHandle(bounds, handle, direction, amount) {\n var originalValue = bounds[handle];\n var currentValue = bounds[handle];\n while (direction * (currentValue - originalValue) < amount) {\n if (!this.pushHandleOnePoint(bounds, handle, direction)) {\n // can\'t push handle enough to create the needed `amount` gap, so we\n // revert its position to the original value\n bounds[handle] = originalValue;\n return false;\n }\n currentValue = bounds[handle];\n }\n // the handle was pushed enough to create the needed `amount` gap\n return true;\n };\n\n Range.prototype.pushHandleOnePoint = function pushHandleOnePoint(bounds, handle, direction) {\n var points = this.getPoints();\n var pointIndex = points.indexOf(bounds[handle]);\n var nextPointIndex = pointIndex + direction;\n if (nextPointIndex >= points.length || nextPointIndex < 0) {\n // reached the minimum or maximum available point, can\'t push anymore\n return false;\n }\n var nextHandle = handle + direction;\n var nextValue = points[nextPointIndex];\n var threshold = this.props.pushable;\n\n var diffToNext = direction * (bounds[nextHandle] - nextValue);\n if (!this.pushHandle(bounds, nextHandle, direction, threshold - diffToNext)) {\n // couldn\'t push next handle, so we won\'t push this one either\n return false;\n }\n // push the handle\n bounds[handle] = nextValue;\n return true;\n };\n\n Range.prototype.trimAlignValue = function trimAlignValue(v) {\n var nextProps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n var mergedProps = (0, _extends3["default"])({}, this.props, nextProps);\n var valInRange = utils.ensureValueInRange(v, mergedProps);\n var valNotConflict = this.ensureValueNotConflict(valInRange, mergedProps);\n return utils.ensureValuePrecision(valNotConflict, mergedProps);\n };\n\n Range.prototype.ensureValueNotConflict = function ensureValueNotConflict(val, _ref) {\n var allowCross = _ref.allowCross;\n\n var state = this.state || {};\n var handle = state.handle,\n bounds = state.bounds;\n /* eslint-disable eqeqeq */\n\n if (!allowCross && handle != null) {\n if (handle > 0 && val <= bounds[handle - 1]) {\n return bounds[handle - 1];\n }\n if (handle < bounds.length - 1 && val >= bounds[handle + 1]) {\n return bounds[handle + 1];\n }\n }\n /* eslint-enable eqeqeq */\n return val;\n };\n\n Range.prototype.render = function render() {\n var _this3 = this;\n\n var _state2 = this.state,\n handle = _state2.handle,\n bounds = _state2.bounds;\n var _props2 = this.props,\n prefixCls = _props2.prefixCls,\n vertical = _props2.vertical,\n included = _props2.included,\n disabled = _props2.disabled,\n handleGenerator = _props2.handle;\n\n\n var offsets = bounds.map(function (v) {\n return _this3.calcOffset(v);\n });\n\n var handleClassName = prefixCls + \'-handle\';\n var handles = bounds.map(function (v, i) {\n var _classNames;\n\n return handleGenerator({\n className: (0, _classnames2["default"])((_classNames = {}, (0, _defineProperty3["default"])(_classNames, handleClassName, true), (0, _defineProperty3["default"])(_classNames, handleClassName + \'-\' + (i + 1), true), _classNames)),\n vertical: vertical,\n offset: offsets[i],\n value: v,\n dragging: handle === i,\n index: i,\n disabled: disabled,\n ref: function ref(h) {\n return _this3.saveHandle(i, h);\n }\n });\n });\n\n var tracks = bounds.slice(0, -1).map(function (_, index) {\n var _classNames2;\n\n var i = index + 1;\n var trackClassName = (0, _classnames2["default"])((_classNames2 = {}, (0, _defineProperty3["default"])(_classNames2, prefixCls + \'-track\', true), (0, _defineProperty3["default"])(_classNames2, prefixCls + \'-track-\' + i, true), _classNames2));\n return _react2["default"].createElement(_Track2["default"], {\n className: trackClassName,\n vertical: vertical,\n included: included,\n offset: offsets[i - 1],\n length: offsets[i] - offsets[i - 1],\n key: i\n });\n });\n\n return { tracks: tracks, handles: handles };\n };\n\n return Range;\n}(_react2["default"].Component);\n\nRange.displayName = \'Range\';\nRange.propTypes = {\n defaultValue: _propTypes2["default"].arrayOf(_propTypes2["default"].number),\n value: _propTypes2["default"].arrayOf(_propTypes2["default"].number),\n count: _propTypes2["default"].number,\n pushable: _propTypes2["default"].oneOfType([_propTypes2["default"].bool, _propTypes2["default"].number]),\n allowCross: _propTypes2["default"].bool,\n disabled: _propTypes2["default"].bool\n};\nRange.defaultProps = {\n count: 1,\n allowCross: true,\n pushable: false\n};\nexports["default"] = (0, _createSlider2["default"])(Range);\nmodule.exports = exports[\'default\'];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/rc-slider/lib/Range.js\n// module id = 1230\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/rc-slider/lib/Range.js?', + ); + + /***/ + }, + /* 1231 */ + /* unknown exports provided */ + /* all exports used */ + /*!***********************************!*\ + !*** ./~/rc-slider/lib/Slider.js ***! + \***********************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\n\nvar _extends2 = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n\nvar _extends3 = _interopRequireDefault(_extends2);\n\nvar _classCallCheck2 = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 6);\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _possibleConstructorReturn2 = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 8);\n\nvar _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\nvar _inherits2 = __webpack_require__(/*! babel-runtime/helpers/inherits */ 7);\n\nvar _inherits3 = _interopRequireDefault(_inherits2);\n\nvar _react = __webpack_require__(/*! react */ 1);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _propTypes = __webpack_require__(/*! prop-types */ 0);\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nvar _Track = __webpack_require__(/*! ./common/Track */ 490);\n\nvar _Track2 = _interopRequireDefault(_Track);\n\nvar _createSlider = __webpack_require__(/*! ./common/createSlider */ 491);\n\nvar _createSlider2 = _interopRequireDefault(_createSlider);\n\nvar _utils = __webpack_require__(/*! ./utils */ 235);\n\nvar utils = _interopRequireWildcard(_utils);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj["default"] = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }\n\nvar Slider = function (_React$Component) {\n (0, _inherits3["default"])(Slider, _React$Component);\n\n function Slider(props) {\n (0, _classCallCheck3["default"])(this, Slider);\n\n var _this = (0, _possibleConstructorReturn3["default"])(this, _React$Component.call(this, props));\n\n _this.onEnd = function () {\n _this.setState({ dragging: false });\n _this.removeDocumentEvents();\n _this.props.onAfterChange(_this.getValue());\n };\n\n var defaultValue = props.defaultValue !== undefined ? props.defaultValue : props.min;\n var value = props.value !== undefined ? props.value : defaultValue;\n\n _this.state = {\n value: _this.trimAlignValue(value),\n dragging: false\n };\n return _this;\n }\n\n Slider.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {\n if (!(\'value\' in nextProps || \'min\' in nextProps || \'max\' in nextProps)) return;\n\n var prevValue = this.state.value;\n var value = nextProps.value !== undefined ? nextProps.value : prevValue;\n var nextValue = this.trimAlignValue(value, nextProps);\n if (nextValue === prevValue) return;\n\n this.setState({ value: nextValue });\n if (utils.isValueOutOfRange(value, nextProps)) {\n this.props.onChange(nextValue);\n }\n };\n\n Slider.prototype.onChange = function onChange(state) {\n var props = this.props;\n var isNotControlled = !(\'value\' in props);\n if (isNotControlled) {\n this.setState(state);\n }\n\n var changedValue = state.value;\n props.onChange(changedValue);\n };\n\n Slider.prototype.onStart = function onStart(position) {\n this.setState({ dragging: true });\n var props = this.props;\n var prevValue = this.getValue();\n props.onBeforeChange(prevValue);\n\n var value = this.calcValueByPos(position);\n this.startValue = value;\n this.startPosition = position;\n\n if (value === prevValue) return;\n\n this.onChange({ value: value });\n };\n\n Slider.prototype.onMove = function onMove(e, position) {\n utils.pauseEvent(e);\n var state = this.state;\n var value = this.calcValueByPos(position);\n var oldValue = state.value;\n if (value === oldValue) return;\n\n this.onChange({ value: value });\n };\n\n Slider.prototype.getValue = function getValue() {\n return this.state.value;\n };\n\n Slider.prototype.getLowerBound = function getLowerBound() {\n return this.props.min;\n };\n\n Slider.prototype.getUpperBound = function getUpperBound() {\n return this.state.value;\n };\n\n Slider.prototype.trimAlignValue = function trimAlignValue(v) {\n var nextProps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n var mergedProps = (0, _extends3["default"])({}, this.props, nextProps);\n var val = utils.ensureValueInRange(v, mergedProps);\n return utils.ensureValuePrecision(val, mergedProps);\n };\n\n Slider.prototype.render = function render() {\n var _this2 = this;\n\n var _props = this.props,\n prefixCls = _props.prefixCls,\n vertical = _props.vertical,\n included = _props.included,\n disabled = _props.disabled,\n minimumTrackStyle = _props.minimumTrackStyle,\n handleStyle = _props.handleStyle,\n handleGenerator = _props.handle;\n var _state = this.state,\n value = _state.value,\n dragging = _state.dragging;\n\n var offset = this.calcOffset(value);\n var handle = handleGenerator({\n className: prefixCls + \'-handle\',\n vertical: vertical,\n offset: offset,\n value: value,\n dragging: dragging,\n disabled: disabled,\n handleStyle: handleStyle,\n ref: function ref(h) {\n return _this2.saveHandle(0, h);\n }\n });\n var track = _react2["default"].createElement(_Track2["default"], {\n className: prefixCls + \'-track\',\n vertical: vertical,\n included: included,\n offset: 0,\n length: offset,\n minimumTrackStyle: minimumTrackStyle\n });\n\n return { tracks: track, handles: handle };\n };\n\n return Slider;\n}(_react2["default"].Component); /* eslint-disable react/prop-types */\n\n\nSlider.displayName = \'Slider\';\nSlider.propTypes = {\n defaultValue: _propTypes2["default"].number,\n value: _propTypes2["default"].number,\n disabled: _propTypes2["default"].bool\n};\nSlider.defaultProps = {};\nexports["default"] = (0, _createSlider2["default"])(Slider);\nmodule.exports = exports[\'default\'];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/rc-slider/lib/Slider.js\n// module id = 1231\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/rc-slider/lib/Slider.js?', + ); + + /***/ + }, + /* 1232 */ + /* unknown exports provided */ + /* all exports used */ + /*!*****************************************!*\ + !*** ./~/rc-slider/lib/common/Marks.js ***! + \*****************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends2 = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n\nvar _extends3 = _interopRequireDefault(_extends2);\n\nvar _typeof2 = __webpack_require__(/*! babel-runtime/helpers/typeof */ 148);\n\nvar _typeof3 = _interopRequireDefault(_typeof2);\n\nvar _defineProperty2 = __webpack_require__(/*! babel-runtime/helpers/defineProperty */ 109);\n\nvar _defineProperty3 = _interopRequireDefault(_defineProperty2);\n\nvar _react = __webpack_require__(/*! react */ 1);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _classnames = __webpack_require__(/*! classnames */ 2);\n\nvar _classnames2 = _interopRequireDefault(_classnames);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nvar Marks = function Marks(_ref) {\n var className = _ref.className,\n vertical = _ref.vertical,\n marks = _ref.marks,\n included = _ref.included,\n upperBound = _ref.upperBound,\n lowerBound = _ref.lowerBound,\n max = _ref.max,\n min = _ref.min;\n\n var marksKeys = Object.keys(marks);\n var marksCount = marksKeys.length;\n var unit = 100 / (marksCount - 1);\n var markWidth = unit * 0.9;\n\n var range = max - min;\n var elements = marksKeys.map(parseFloat).sort(function (a, b) {\n return a - b;\n }).map(function (point) {\n var _classNames;\n\n var isActive = !included && point === upperBound || included && point <= upperBound && point >= lowerBound;\n var markClassName = (0, _classnames2[\"default\"])((_classNames = {}, (0, _defineProperty3[\"default\"])(_classNames, className + '-text', true), (0, _defineProperty3[\"default\"])(_classNames, className + '-text-active', isActive), _classNames));\n\n var bottomStyle = {\n marginBottom: '-50%',\n bottom: (point - min) / range * 100 + '%'\n };\n\n var leftStyle = {\n width: markWidth + '%',\n marginLeft: -markWidth / 2 + '%',\n left: (point - min) / range * 100 + '%'\n };\n\n var style = vertical ? bottomStyle : leftStyle;\n\n var markPoint = marks[point];\n var markPointIsObject = (typeof markPoint === 'undefined' ? 'undefined' : (0, _typeof3[\"default\"])(markPoint)) === 'object' && !_react2[\"default\"].isValidElement(markPoint);\n var markLabel = markPointIsObject ? markPoint.label : markPoint;\n var markStyle = markPointIsObject ? (0, _extends3[\"default\"])({}, style, markPoint.style) : style;\n return _react2[\"default\"].createElement(\n 'span',\n {\n className: markClassName,\n style: markStyle,\n key: point\n },\n markLabel\n );\n });\n\n return _react2[\"default\"].createElement(\n 'div',\n { className: className },\n elements\n );\n};\n\nexports[\"default\"] = Marks;\nmodule.exports = exports['default'];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/rc-slider/lib/common/Marks.js\n// module id = 1232\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/rc-slider/lib/common/Marks.js?", + ); + + /***/ + }, + /* 1233 */ + /* unknown exports provided */ + /* all exports used */ + /*!*****************************************!*\ + !*** ./~/rc-slider/lib/common/Steps.js ***! + \*****************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\n\nvar _defineProperty2 = __webpack_require__(/*! babel-runtime/helpers/defineProperty */ 109);\n\nvar _defineProperty3 = _interopRequireDefault(_defineProperty2);\n\nvar _react = __webpack_require__(/*! react */ 1);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _classnames = __webpack_require__(/*! classnames */ 2);\n\nvar _classnames2 = _interopRequireDefault(_classnames);\n\nvar _warning = __webpack_require__(/*! warning */ 23);\n\nvar _warning2 = _interopRequireDefault(_warning);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }\n\nvar calcPoints = function calcPoints(vertical, marks, dots, step, min, max) {\n (0, _warning2["default"])(dots ? step > 0 : true, \'`Slider[step]` should be a positive number in order to make Slider[dots] work.\');\n var points = Object.keys(marks).map(parseFloat);\n if (dots) {\n for (var i = min; i <= max; i = i + step) {\n if (points.indexOf(i) >= 0) continue;\n points.push(i);\n }\n }\n return points;\n};\n\nvar Steps = function Steps(_ref) {\n var prefixCls = _ref.prefixCls,\n vertical = _ref.vertical,\n marks = _ref.marks,\n dots = _ref.dots,\n step = _ref.step,\n included = _ref.included,\n lowerBound = _ref.lowerBound,\n upperBound = _ref.upperBound,\n max = _ref.max,\n min = _ref.min;\n\n var range = max - min;\n var elements = calcPoints(vertical, marks, dots, step, min, max).map(function (point) {\n var _classNames;\n\n var offset = Math.abs(point - min) / range * 100 + \'%\';\n var style = vertical ? { bottom: offset } : { left: offset };\n\n var isActived = !included && point === upperBound || included && point <= upperBound && point >= lowerBound;\n var pointClassName = (0, _classnames2["default"])((_classNames = {}, (0, _defineProperty3["default"])(_classNames, prefixCls + \'-dot\', true), (0, _defineProperty3["default"])(_classNames, prefixCls + \'-dot-active\', isActived), _classNames));\n\n return _react2["default"].createElement(\'span\', { className: pointClassName, style: style, key: point });\n });\n\n return _react2["default"].createElement(\n \'div\',\n { className: prefixCls + \'-step\' },\n elements\n );\n};\n\nexports["default"] = Steps;\nmodule.exports = exports[\'default\'];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/rc-slider/lib/common/Steps.js\n// module id = 1233\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/rc-slider/lib/common/Steps.js?', + ); + + /***/ + }, + /* 1234 */ + /* unknown exports provided */ + /* all exports used */ + /*!****************************************************!*\ + !*** ./~/rc-slider/lib/createSliderWithTooltip.js ***! + \****************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\n\nvar _objectWithoutProperties2 = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ 9);\n\nvar _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);\n\nvar _defineProperty2 = __webpack_require__(/*! babel-runtime/helpers/defineProperty */ 109);\n\nvar _defineProperty3 = _interopRequireDefault(_defineProperty2);\n\nvar _extends3 = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n\nvar _extends4 = _interopRequireDefault(_extends3);\n\nvar _classCallCheck2 = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 6);\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _possibleConstructorReturn2 = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 8);\n\nvar _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\nvar _inherits2 = __webpack_require__(/*! babel-runtime/helpers/inherits */ 7);\n\nvar _inherits3 = _interopRequireDefault(_inherits2);\n\nexports["default"] = createSliderWithTooltip;\n\nvar _react = __webpack_require__(/*! react */ 1);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _propTypes = __webpack_require__(/*! prop-types */ 0);\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nvar _rcTooltip = __webpack_require__(/*! rc-tooltip */ 1238);\n\nvar _rcTooltip2 = _interopRequireDefault(_rcTooltip);\n\nvar _Handle = __webpack_require__(/*! ./Handle */ 234);\n\nvar _Handle2 = _interopRequireDefault(_Handle);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }\n\nfunction createSliderWithTooltip(Component) {\n var _class, _temp;\n\n return _temp = _class = function (_React$Component) {\n (0, _inherits3["default"])(ComponentWrapper, _React$Component);\n\n function ComponentWrapper(props) {\n (0, _classCallCheck3["default"])(this, ComponentWrapper);\n\n var _this = (0, _possibleConstructorReturn3["default"])(this, _React$Component.call(this, props));\n\n _this.handleTooltipVisibleChange = function (index, visible) {\n _this.setState({\n visibles: (0, _extends4["default"])({}, _this.state.visibles, (0, _defineProperty3["default"])({}, index, visible))\n });\n };\n\n _this.handleWithTooltip = function (_ref) {\n var value = _ref.value,\n dragging = _ref.dragging,\n index = _ref.index,\n disabled = _ref.disabled,\n restProps = (0, _objectWithoutProperties3["default"])(_ref, [\'value\', \'dragging\', \'index\', \'disabled\']);\n var tipFormatter = _this.props.tipFormatter;\n\n return _react2["default"].createElement(\n _rcTooltip2["default"],\n {\n prefixCls: \'rc-slider-tooltip\',\n overlay: tipFormatter(value),\n visible: !disabled && (_this.state.visibles[index] || dragging),\n placement: \'top\',\n key: index\n },\n _react2["default"].createElement(_Handle2["default"], (0, _extends4["default"])({}, restProps, {\n onMouseEnter: function onMouseEnter() {\n return _this.handleTooltipVisibleChange(index, true);\n },\n onMouseLeave: function onMouseLeave() {\n return _this.handleTooltipVisibleChange(index, false);\n }\n }))\n );\n };\n\n _this.state = { visibles: {} };\n return _this;\n }\n\n ComponentWrapper.prototype.render = function render() {\n return _react2["default"].createElement(Component, (0, _extends4["default"])({}, this.props, { handle: this.handleWithTooltip }));\n };\n\n return ComponentWrapper;\n }(_react2["default"].Component), _class.propTypes = {\n tipFormatter: _propTypes2["default"].func\n }, _class.defaultProps = {\n tipFormatter: function tipFormatter(value) {\n return value;\n }\n }, _temp;\n}\nmodule.exports = exports[\'default\'];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/rc-slider/lib/createSliderWithTooltip.js\n// module id = 1234\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/rc-slider/lib/createSliderWithTooltip.js?', + ); + + /***/ + }, + /* 1235 */ + /* unknown exports provided */ + /* exports used: Range */ + /*!**********************************!*\ + !*** ./~/rc-slider/lib/index.js ***! + \**********************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\n\nvar _Slider = __webpack_require__(/*! ./Slider */ 1231);\n\nvar _Slider2 = _interopRequireDefault(_Slider);\n\nvar _Range = __webpack_require__(/*! ./Range */ 1230);\n\nvar _Range2 = _interopRequireDefault(_Range);\n\nvar _Handle = __webpack_require__(/*! ./Handle */ 234);\n\nvar _Handle2 = _interopRequireDefault(_Handle);\n\nvar _createSliderWithTooltip = __webpack_require__(/*! ./createSliderWithTooltip */ 1234);\n\nvar _createSliderWithTooltip2 = _interopRequireDefault(_createSliderWithTooltip);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }\n\n_Slider2["default"].Range = _Range2["default"];\n_Slider2["default"].Handle = _Handle2["default"];\n_Slider2["default"].createSliderWithTooltip = _createSliderWithTooltip2["default"];\nexports["default"] = _Slider2["default"];\nmodule.exports = exports[\'default\'];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/rc-slider/lib/index.js\n// module id = 1235\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/rc-slider/lib/index.js?', + ); + + /***/ + }, + /* 1236 */ + /* unknown exports provided */ + /* all exports used */ + /*!***********************************************************!*\ + !*** ./~/rc-slider/~/rc-util/lib/Dom/addEventListener.js ***! + \***********************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports["default"] = addEventListenerWrap;\n\nvar _addDomEventListener = __webpack_require__(/*! add-dom-event-listener */ 277);\n\nvar _addDomEventListener2 = _interopRequireDefault(_addDomEventListener);\n\nvar _reactDom = __webpack_require__(/*! react-dom */ 16);\n\nvar _reactDom2 = _interopRequireDefault(_reactDom);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }\n\nfunction addEventListenerWrap(target, eventType, cb) {\n /* eslint camelcase: 2 */\n var callback = _reactDom2["default"].unstable_batchedUpdates ? function run(e) {\n _reactDom2["default"].unstable_batchedUpdates(cb, e);\n } : cb;\n return (0, _addDomEventListener2["default"])(target, eventType, callback);\n}\nmodule.exports = exports[\'default\'];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/rc-slider/~/rc-util/lib/Dom/addEventListener.js\n// module id = 1236\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/rc-slider/~/rc-util/lib/Dom/addEventListener.js?', + ); + + /***/ + }, + /* 1237 */ + /* unknown exports provided */ + /* all exports used */ + /*!*************************************!*\ + !*** ./~/rc-tooltip/lib/Tooltip.js ***! + \*************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = __webpack_require__(/*! react */ 1);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _placements = __webpack_require__(/*! ./placements */ 1239);\n\nvar _rcTrigger = __webpack_require__(/*! rc-trigger */ 1243);\n\nvar _rcTrigger2 = _interopRequireDefault(_rcTrigger);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nvar Tooltip = _react2[\"default\"].createClass({\n displayName: 'Tooltip',\n\n propTypes: {\n trigger: _react.PropTypes.any,\n children: _react.PropTypes.any,\n defaultVisible: _react.PropTypes.bool,\n visible: _react.PropTypes.bool,\n placement: _react.PropTypes.string,\n transitionName: _react.PropTypes.string,\n animation: _react.PropTypes.any,\n onVisibleChange: _react.PropTypes.func,\n afterVisibleChange: _react.PropTypes.func,\n overlay: _react.PropTypes.oneOfType([_react2[\"default\"].PropTypes.node, _react2[\"default\"].PropTypes.func]).isRequired,\n overlayStyle: _react.PropTypes.object,\n overlayClassName: _react.PropTypes.string,\n prefixCls: _react.PropTypes.string,\n mouseEnterDelay: _react.PropTypes.number,\n mouseLeaveDelay: _react.PropTypes.number,\n getTooltipContainer: _react.PropTypes.func,\n destroyTooltipOnHide: _react.PropTypes.bool,\n align: _react.PropTypes.object,\n arrowContent: _react.PropTypes.any\n },\n\n getDefaultProps: function getDefaultProps() {\n return {\n prefixCls: 'rc-tooltip',\n mouseEnterDelay: 0,\n destroyTooltipOnHide: false,\n mouseLeaveDelay: 0.1,\n align: {},\n placement: 'right',\n trigger: ['hover'],\n arrowContent: null\n };\n },\n getPopupElement: function getPopupElement() {\n var _props = this.props;\n var arrowContent = _props.arrowContent;\n var overlay = _props.overlay;\n var prefixCls = _props.prefixCls;\n\n return [_react2[\"default\"].createElement(\n 'div',\n { className: prefixCls + '-arrow', key: 'arrow' },\n arrowContent\n ), _react2[\"default\"].createElement(\n 'div',\n { className: prefixCls + '-inner', key: 'content' },\n typeof overlay === 'function' ? overlay() : overlay\n )];\n },\n getPopupDomNode: function getPopupDomNode() {\n return this.refs.trigger.getPopupDomNode();\n },\n render: function render() {\n var _props2 = this.props;\n var overlayClassName = _props2.overlayClassName;\n var trigger = _props2.trigger;\n var mouseEnterDelay = _props2.mouseEnterDelay;\n var mouseLeaveDelay = _props2.mouseLeaveDelay;\n var overlayStyle = _props2.overlayStyle;\n var prefixCls = _props2.prefixCls;\n var children = _props2.children;\n var onVisibleChange = _props2.onVisibleChange;\n var transitionName = _props2.transitionName;\n var animation = _props2.animation;\n var placement = _props2.placement;\n var align = _props2.align;\n var destroyTooltipOnHide = _props2.destroyTooltipOnHide;\n var defaultVisible = _props2.defaultVisible;\n var getTooltipContainer = _props2.getTooltipContainer;\n\n var restProps = _objectWithoutProperties(_props2, ['overlayClassName', 'trigger', 'mouseEnterDelay', 'mouseLeaveDelay', 'overlayStyle', 'prefixCls', 'children', 'onVisibleChange', 'transitionName', 'animation', 'placement', 'align', 'destroyTooltipOnHide', 'defaultVisible', 'getTooltipContainer']);\n\n var extraProps = _extends({}, restProps);\n if ('visible' in this.props) {\n extraProps.popupVisible = this.props.visible;\n }\n return _react2[\"default\"].createElement(\n _rcTrigger2[\"default\"],\n _extends({\n popupClassName: overlayClassName,\n ref: 'trigger',\n prefixCls: prefixCls,\n popup: this.getPopupElement,\n action: trigger,\n builtinPlacements: _placements.placements,\n popupPlacement: placement,\n popupAlign: align,\n getPopupContainer: getTooltipContainer,\n onPopupVisibleChange: onVisibleChange,\n popupTransitionName: transitionName,\n popupAnimation: animation,\n defaultPopupVisible: defaultVisible,\n destroyPopupOnHide: destroyTooltipOnHide,\n mouseLeaveDelay: mouseLeaveDelay,\n popupStyle: overlayStyle,\n mouseEnterDelay: mouseEnterDelay\n }, extraProps),\n children\n );\n }\n});\n\nexports[\"default\"] = Tooltip;\nmodule.exports = exports['default'];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/rc-tooltip/lib/Tooltip.js\n// module id = 1237\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/rc-tooltip/lib/Tooltip.js?", + ); + + /***/ + }, + /* 1238 */ + /* unknown exports provided */ + /* all exports used */ + /*!***********************************!*\ + !*** ./~/rc-tooltip/lib/index.js ***! + \***********************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nmodule.exports = __webpack_require__(/*! ./Tooltip */ 1237);\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/rc-tooltip/lib/index.js\n// module id = 1238\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/rc-tooltip/lib/index.js?', + ); + + /***/ + }, + /* 1239 */ + /* unknown exports provided */ + /* all exports used */ + /*!****************************************!*\ + !*** ./~/rc-tooltip/lib/placements.js ***! + \****************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar autoAdjustOverflow = {\n adjustX: 1,\n adjustY: 1\n};\n\nvar targetOffset = [0, 0];\n\nvar placements = exports.placements = {\n left: {\n points: ['cr', 'cl'],\n overflow: autoAdjustOverflow,\n offset: [-4, 0],\n targetOffset: targetOffset\n },\n right: {\n points: ['cl', 'cr'],\n overflow: autoAdjustOverflow,\n offset: [4, 0],\n targetOffset: targetOffset\n },\n top: {\n points: ['bc', 'tc'],\n overflow: autoAdjustOverflow,\n offset: [0, -4],\n targetOffset: targetOffset\n },\n bottom: {\n points: ['tc', 'bc'],\n overflow: autoAdjustOverflow,\n offset: [0, 4],\n targetOffset: targetOffset\n },\n topLeft: {\n points: ['bl', 'tl'],\n overflow: autoAdjustOverflow,\n offset: [0, -4],\n targetOffset: targetOffset\n },\n leftTop: {\n points: ['tr', 'tl'],\n overflow: autoAdjustOverflow,\n offset: [-4, 0],\n targetOffset: targetOffset\n },\n topRight: {\n points: ['br', 'tr'],\n overflow: autoAdjustOverflow,\n offset: [0, -4],\n targetOffset: targetOffset\n },\n rightTop: {\n points: ['tl', 'tr'],\n overflow: autoAdjustOverflow,\n offset: [4, 0],\n targetOffset: targetOffset\n },\n bottomRight: {\n points: ['tr', 'br'],\n overflow: autoAdjustOverflow,\n offset: [0, 4],\n targetOffset: targetOffset\n },\n rightBottom: {\n points: ['bl', 'br'],\n overflow: autoAdjustOverflow,\n offset: [4, 0],\n targetOffset: targetOffset\n },\n bottomLeft: {\n points: ['tl', 'bl'],\n overflow: autoAdjustOverflow,\n offset: [0, 4],\n targetOffset: targetOffset\n },\n leftBottom: {\n points: ['br', 'bl'],\n overflow: autoAdjustOverflow,\n offset: [-4, 0],\n targetOffset: targetOffset\n }\n};\n\nexports[\"default\"] = placements;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/rc-tooltip/lib/placements.js\n// module id = 1239\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/rc-tooltip/lib/placements.js?", + ); + + /***/ + }, + /* 1240 */ + /* unknown exports provided */ + /* all exports used */ + /*!***********************************!*\ + !*** ./~/rc-trigger/lib/Popup.js ***! + \***********************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\n\nvar _extends2 = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n\nvar _extends3 = _interopRequireDefault(_extends2);\n\nvar _react = __webpack_require__(/*! react */ 1);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactDom = __webpack_require__(/*! react-dom */ 16);\n\nvar _reactDom2 = _interopRequireDefault(_reactDom);\n\nvar _rcAlign = __webpack_require__(/*! rc-align */ 1224);\n\nvar _rcAlign2 = _interopRequireDefault(_rcAlign);\n\nvar _rcAnimate = __webpack_require__(/*! rc-animate */ 1229);\n\nvar _rcAnimate2 = _interopRequireDefault(_rcAnimate);\n\nvar _PopupInner = __webpack_require__(/*! ./PopupInner */ 1241);\n\nvar _PopupInner2 = _interopRequireDefault(_PopupInner);\n\nvar _LazyRenderBox = __webpack_require__(/*! ./LazyRenderBox */ 492);\n\nvar _LazyRenderBox2 = _interopRequireDefault(_LazyRenderBox);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }\n\nvar Popup = _react2["default"].createClass({\n displayName: \'Popup\',\n\n propTypes: {\n visible: _react.PropTypes.bool,\n style: _react.PropTypes.object,\n getClassNameFromAlign: _react.PropTypes.func,\n onAlign: _react.PropTypes.func,\n getRootDomNode: _react.PropTypes.func,\n onMouseEnter: _react.PropTypes.func,\n align: _react.PropTypes.any,\n destroyPopupOnHide: _react.PropTypes.bool,\n className: _react.PropTypes.string,\n prefixCls: _react.PropTypes.string,\n onMouseLeave: _react.PropTypes.func\n },\n\n componentDidMount: function componentDidMount() {\n this.rootNode = this.getPopupDomNode();\n },\n onAlign: function onAlign(popupDomNode, align) {\n var props = this.props;\n var alignClassName = props.getClassNameFromAlign(props.align);\n var currentAlignClassName = props.getClassNameFromAlign(align);\n if (alignClassName !== currentAlignClassName) {\n this.currentAlignClassName = currentAlignClassName;\n popupDomNode.className = this.getClassName(currentAlignClassName);\n }\n props.onAlign(popupDomNode, align);\n },\n getPopupDomNode: function getPopupDomNode() {\n return _reactDom2["default"].findDOMNode(this.refs.popup);\n },\n getTarget: function getTarget() {\n return this.props.getRootDomNode();\n },\n getMaskTransitionName: function getMaskTransitionName() {\n var props = this.props;\n var transitionName = props.maskTransitionName;\n var animation = props.maskAnimation;\n if (!transitionName && animation) {\n transitionName = props.prefixCls + \'-\' + animation;\n }\n return transitionName;\n },\n getTransitionName: function getTransitionName() {\n var props = this.props;\n var transitionName = props.transitionName;\n if (!transitionName && props.animation) {\n transitionName = props.prefixCls + \'-\' + props.animation;\n }\n return transitionName;\n },\n getClassName: function getClassName(currentAlignClassName) {\n return this.props.prefixCls + \' \' + this.props.className + \' \' + currentAlignClassName;\n },\n getPopupElement: function getPopupElement() {\n var props = this.props;\n var align = props.align;\n var style = props.style;\n var visible = props.visible;\n var prefixCls = props.prefixCls;\n var destroyPopupOnHide = props.destroyPopupOnHide;\n\n var className = this.getClassName(this.currentAlignClassName || props.getClassNameFromAlign(align));\n var hiddenClassName = prefixCls + \'-hidden\';\n if (!visible) {\n this.currentAlignClassName = null;\n }\n var newStyle = (0, _extends3["default"])({}, style, this.getZIndexStyle());\n var popupInnerProps = {\n className: className,\n prefixCls: prefixCls,\n ref: \'popup\',\n onMouseEnter: props.onMouseEnter,\n onMouseLeave: props.onMouseLeave,\n style: newStyle\n };\n if (destroyPopupOnHide) {\n return _react2["default"].createElement(\n _rcAnimate2["default"],\n {\n component: \'\',\n exclusive: true,\n transitionAppear: true,\n transitionName: this.getTransitionName()\n },\n visible ? _react2["default"].createElement(\n _rcAlign2["default"],\n {\n target: this.getTarget,\n key: \'popup\',\n ref: this.saveAlign,\n monitorWindowResize: true,\n align: align,\n onAlign: this.onAlign\n },\n _react2["default"].createElement(\n _PopupInner2["default"],\n (0, _extends3["default"])({\n visible: true\n }, popupInnerProps),\n props.children\n )\n ) : null\n );\n }\n return _react2["default"].createElement(\n _rcAnimate2["default"],\n {\n component: \'\',\n exclusive: true,\n transitionAppear: true,\n transitionName: this.getTransitionName(),\n showProp: \'xVisible\'\n },\n _react2["default"].createElement(\n _rcAlign2["default"],\n {\n target: this.getTarget,\n key: \'popup\',\n ref: this.saveAlign,\n monitorWindowResize: true,\n xVisible: visible,\n childrenProps: { visible: \'xVisible\' },\n disabled: !visible,\n align: align,\n onAlign: this.onAlign\n },\n _react2["default"].createElement(\n _PopupInner2["default"],\n (0, _extends3["default"])({\n hiddenClassName: hiddenClassName\n }, popupInnerProps),\n props.children\n )\n )\n );\n },\n getZIndexStyle: function getZIndexStyle() {\n var style = {};\n var props = this.props;\n if (props.zIndex !== undefined) {\n style.zIndex = props.zIndex;\n }\n return style;\n },\n getMaskElement: function getMaskElement() {\n var props = this.props;\n var maskElement = void 0;\n if (props.mask) {\n var maskTransition = this.getMaskTransitionName();\n maskElement = _react2["default"].createElement(_LazyRenderBox2["default"], {\n style: this.getZIndexStyle(),\n key: \'mask\',\n className: props.prefixCls + \'-mask\',\n hiddenClassName: props.prefixCls + \'-mask-hidden\',\n visible: props.visible\n });\n if (maskTransition) {\n maskElement = _react2["default"].createElement(\n _rcAnimate2["default"],\n {\n key: \'mask\',\n showProp: \'visible\',\n transitionAppear: true,\n component: \'\',\n transitionName: maskTransition\n },\n maskElement\n );\n }\n }\n return maskElement;\n },\n saveAlign: function saveAlign(align) {\n this.alignInstance = align;\n },\n render: function render() {\n return _react2["default"].createElement(\n \'div\',\n null,\n this.getMaskElement(),\n this.getPopupElement()\n );\n }\n});\n\nexports["default"] = Popup;\nmodule.exports = exports[\'default\'];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/rc-trigger/lib/Popup.js\n// module id = 1240\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/rc-trigger/lib/Popup.js?', + ); + + /***/ + }, + /* 1241 */ + /* unknown exports provided */ + /* all exports used */ + /*!****************************************!*\ + !*** ./~/rc-trigger/lib/PopupInner.js ***! + \****************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\n\nvar _react = __webpack_require__(/*! react */ 1);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _LazyRenderBox = __webpack_require__(/*! ./LazyRenderBox */ 492);\n\nvar _LazyRenderBox2 = _interopRequireDefault(_LazyRenderBox);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }\n\nvar PopupInner = _react2["default"].createClass({\n displayName: \'PopupInner\',\n\n propTypes: {\n hiddenClassName: _react.PropTypes.string,\n className: _react.PropTypes.string,\n prefixCls: _react.PropTypes.string,\n onMouseEnter: _react.PropTypes.func,\n onMouseLeave: _react.PropTypes.func,\n children: _react.PropTypes.any\n },\n render: function render() {\n var props = this.props;\n var className = props.className;\n if (!props.visible) {\n className += \' \' + props.hiddenClassName;\n }\n return _react2["default"].createElement(\n \'div\',\n {\n className: className,\n onMouseEnter: props.onMouseEnter,\n onMouseLeave: props.onMouseLeave,\n style: props.style\n },\n _react2["default"].createElement(\n _LazyRenderBox2["default"],\n { className: props.prefixCls + \'-content\', visible: props.visible },\n props.children\n )\n );\n }\n});\n\nexports["default"] = PopupInner;\nmodule.exports = exports[\'default\'];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/rc-trigger/lib/PopupInner.js\n// module id = 1241\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/rc-trigger/lib/PopupInner.js?', + ); + + /***/ + }, + /* 1242 */ + /* unknown exports provided */ + /* all exports used */ + /*!*************************************!*\ + !*** ./~/rc-trigger/lib/Trigger.js ***! + \*************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends2 = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n\nvar _extends3 = _interopRequireDefault(_extends2);\n\nvar _react = __webpack_require__(/*! react */ 1);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactDom = __webpack_require__(/*! react-dom */ 16);\n\nvar _reactDom2 = _interopRequireDefault(_reactDom);\n\nvar _contains = __webpack_require__(/*! rc-util/lib/Dom/contains */ 1245);\n\nvar _contains2 = _interopRequireDefault(_contains);\n\nvar _addEventListener = __webpack_require__(/*! rc-util/lib/Dom/addEventListener */ 493);\n\nvar _addEventListener2 = _interopRequireDefault(_addEventListener);\n\nvar _Popup = __webpack_require__(/*! ./Popup */ 1240);\n\nvar _Popup2 = _interopRequireDefault(_Popup);\n\nvar _utils = __webpack_require__(/*! ./utils */ 1244);\n\nvar _getContainerRenderMixin = __webpack_require__(/*! rc-util/lib/getContainerRenderMixin */ 1246);\n\nvar _getContainerRenderMixin2 = _interopRequireDefault(_getContainerRenderMixin);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction noop() {}\n\nfunction returnEmptyString() {\n return '';\n}\n\nvar ALL_HANDLERS = ['onClick', 'onMouseDown', 'onTouchStart', 'onMouseEnter', 'onMouseLeave', 'onFocus', 'onBlur'];\n\nvar Trigger = _react2[\"default\"].createClass({\n displayName: 'Trigger',\n\n propTypes: {\n children: _react.PropTypes.any,\n action: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.arrayOf(_react.PropTypes.string)]),\n showAction: _react.PropTypes.any,\n hideAction: _react.PropTypes.any,\n getPopupClassNameFromAlign: _react.PropTypes.any,\n onPopupVisibleChange: _react.PropTypes.func,\n afterPopupVisibleChange: _react.PropTypes.func,\n popup: _react.PropTypes.oneOfType([_react.PropTypes.node, _react.PropTypes.func]).isRequired,\n popupStyle: _react.PropTypes.object,\n prefixCls: _react.PropTypes.string,\n popupClassName: _react.PropTypes.string,\n popupPlacement: _react.PropTypes.string,\n builtinPlacements: _react.PropTypes.object,\n popupTransitionName: _react.PropTypes.string,\n popupAnimation: _react.PropTypes.any,\n mouseEnterDelay: _react.PropTypes.number,\n mouseLeaveDelay: _react.PropTypes.number,\n zIndex: _react.PropTypes.number,\n focusDelay: _react.PropTypes.number,\n blurDelay: _react.PropTypes.number,\n getPopupContainer: _react.PropTypes.func,\n destroyPopupOnHide: _react.PropTypes.bool,\n mask: _react.PropTypes.bool,\n maskClosable: _react.PropTypes.bool,\n onPopupAlign: _react.PropTypes.func,\n popupAlign: _react.PropTypes.object,\n popupVisible: _react.PropTypes.bool,\n maskTransitionName: _react.PropTypes.string,\n maskAnimation: _react.PropTypes.string\n },\n\n mixins: [(0, _getContainerRenderMixin2[\"default\"])({\n autoMount: false,\n\n isVisible: function isVisible(instance) {\n return instance.state.popupVisible;\n },\n getContainer: function getContainer(instance) {\n var popupContainer = document.createElement('div');\n var mountNode = instance.props.getPopupContainer ? instance.props.getPopupContainer((0, _reactDom.findDOMNode)(instance)) : document.body;\n mountNode.appendChild(popupContainer);\n return popupContainer;\n },\n getComponent: function getComponent(instance) {\n var props = instance.props;\n var state = instance.state;\n\n var mouseProps = {};\n if (instance.isMouseEnterToShow()) {\n mouseProps.onMouseEnter = instance.onPopupMouseEnter;\n }\n if (instance.isMouseLeaveToHide()) {\n mouseProps.onMouseLeave = instance.onPopupMouseLeave;\n }\n return _react2[\"default\"].createElement(\n _Popup2[\"default\"],\n (0, _extends3[\"default\"])({\n prefixCls: props.prefixCls,\n destroyPopupOnHide: props.destroyPopupOnHide,\n visible: state.popupVisible,\n className: props.popupClassName,\n action: props.action,\n align: instance.getPopupAlign(),\n onAlign: props.onPopupAlign,\n animation: props.popupAnimation,\n getClassNameFromAlign: instance.getPopupClassNameFromAlign\n }, mouseProps, {\n getRootDomNode: instance.getRootDomNode,\n style: props.popupStyle,\n mask: props.mask,\n zIndex: props.zIndex,\n transitionName: props.popupTransitionName,\n maskAnimation: props.maskAnimation,\n maskTransitionName: props.maskTransitionName\n }),\n typeof props.popup === 'function' ? props.popup() : props.popup\n );\n }\n })],\n\n getDefaultProps: function getDefaultProps() {\n return {\n prefixCls: 'rc-trigger-popup',\n getPopupClassNameFromAlign: returnEmptyString,\n onPopupVisibleChange: noop,\n afterPopupVisibleChange: noop,\n onPopupAlign: noop,\n popupClassName: '',\n mouseEnterDelay: 0,\n mouseLeaveDelay: 0.1,\n focusDelay: 0,\n blurDelay: 0.15,\n popupStyle: {},\n destroyPopupOnHide: false,\n popupAlign: {},\n defaultPopupVisible: false,\n mask: false,\n maskClosable: true,\n action: [],\n showAction: [],\n hideAction: []\n };\n },\n getInitialState: function getInitialState() {\n var props = this.props;\n var popupVisible = void 0;\n if ('popupVisible' in props) {\n popupVisible = !!props.popupVisible;\n } else {\n popupVisible = !!props.defaultPopupVisible;\n }\n return {\n popupVisible: popupVisible\n };\n },\n componentWillMount: function componentWillMount() {\n var _this = this;\n\n ALL_HANDLERS.forEach(function (h) {\n _this['fire' + h] = function (e) {\n _this.fireEvents(h, e);\n };\n });\n },\n componentDidMount: function componentDidMount() {\n this.componentDidUpdate({}, {\n popupVisible: this.state.popupVisible\n });\n },\n componentWillReceiveProps: function componentWillReceiveProps(_ref) {\n var popupVisible = _ref.popupVisible;\n\n if (popupVisible !== undefined) {\n this.setState({\n popupVisible: popupVisible\n });\n }\n },\n componentDidUpdate: function componentDidUpdate(_, prevState) {\n var props = this.props;\n var state = this.state;\n this.renderComponent(null, function () {\n if (prevState.popupVisible !== state.popupVisible) {\n props.afterPopupVisibleChange(state.popupVisible);\n }\n });\n if (this.isClickToHide()) {\n if (state.popupVisible) {\n if (!this.clickOutsideHandler) {\n this.clickOutsideHandler = (0, _addEventListener2[\"default\"])(document, 'mousedown', this.onDocumentClick);\n this.touchOutsideHandler = (0, _addEventListener2[\"default\"])(document, 'touchstart', this.onDocumentClick);\n }\n return;\n }\n }\n if (this.clickOutsideHandler) {\n this.clickOutsideHandler.remove();\n this.touchOutsideHandler.remove();\n this.clickOutsideHandler = null;\n this.touchOutsideHandler = null;\n }\n },\n componentWillUnmount: function componentWillUnmount() {\n this.clearDelayTimer();\n if (this.clickOutsideHandler) {\n this.clickOutsideHandler.remove();\n this.touchOutsideHandler.remove();\n this.clickOutsideHandler = null;\n this.touchOutsideHandler = null;\n }\n },\n onMouseEnter: function onMouseEnter(e) {\n this.fireEvents('onMouseEnter', e);\n this.delaySetPopupVisible(true, this.props.mouseEnterDelay);\n },\n onMouseLeave: function onMouseLeave(e) {\n this.fireEvents('onMouseLeave', e);\n this.delaySetPopupVisible(false, this.props.mouseLeaveDelay);\n },\n onPopupMouseEnter: function onPopupMouseEnter() {\n this.clearDelayTimer();\n },\n onPopupMouseLeave: function onPopupMouseLeave(e) {\n // https://github.com/react-component/trigger/pull/13\n // react bug?\n if (e.relatedTarget && !e.relatedTarget.setTimeout && this._component && (0, _contains2[\"default\"])(this._component.getPopupDomNode(), e.relatedTarget)) {\n return;\n }\n this.delaySetPopupVisible(false, this.props.mouseLeaveDelay);\n },\n onFocus: function onFocus(e) {\n this.fireEvents('onFocus', e);\n // incase focusin and focusout\n this.clearDelayTimer();\n if (this.isFocusToShow()) {\n this.focusTime = Date.now();\n this.delaySetPopupVisible(true, this.props.focusDelay);\n }\n },\n onMouseDown: function onMouseDown(e) {\n this.fireEvents('onMouseDown', e);\n this.preClickTime = Date.now();\n },\n onTouchStart: function onTouchStart(e) {\n this.fireEvents('onTouchStart', e);\n this.preTouchTime = Date.now();\n },\n onBlur: function onBlur(e) {\n this.fireEvents('onBlur', e);\n this.clearDelayTimer();\n if (this.isBlurToHide()) {\n this.delaySetPopupVisible(false, this.props.blurDelay);\n }\n },\n onClick: function onClick(event) {\n this.fireEvents('onClick', event);\n // focus will trigger click\n if (this.focusTime) {\n var preTime = void 0;\n if (this.preClickTime && this.preTouchTime) {\n preTime = Math.min(this.preClickTime, this.preTouchTime);\n } else if (this.preClickTime) {\n preTime = this.preClickTime;\n } else if (this.preTouchTime) {\n preTime = this.preTouchTime;\n }\n if (Math.abs(preTime - this.focusTime) < 20) {\n return;\n }\n this.focusTime = 0;\n }\n this.preClickTime = 0;\n this.preTouchTime = 0;\n event.preventDefault();\n var nextVisible = !this.state.popupVisible;\n if (this.isClickToHide() && !nextVisible || nextVisible && this.isClickToShow()) {\n this.setPopupVisible(!this.state.popupVisible);\n }\n },\n onDocumentClick: function onDocumentClick(event) {\n if (this.props.mask && !this.props.maskClosable) {\n return;\n }\n var target = event.target;\n var root = (0, _reactDom.findDOMNode)(this);\n var popupNode = this.getPopupDomNode();\n if (!(0, _contains2[\"default\"])(root, target) && !(0, _contains2[\"default\"])(popupNode, target)) {\n this.close();\n }\n },\n getPopupDomNode: function getPopupDomNode() {\n // for test\n if (this._component) {\n return this._component.isMounted() ? this._component.getPopupDomNode() : null;\n }\n return null;\n },\n getRootDomNode: function getRootDomNode() {\n return _reactDom2[\"default\"].findDOMNode(this);\n },\n getPopupClassNameFromAlign: function getPopupClassNameFromAlign(align) {\n var className = [];\n var props = this.props;\n var popupPlacement = props.popupPlacement;\n var builtinPlacements = props.builtinPlacements;\n var prefixCls = props.prefixCls;\n\n if (popupPlacement && builtinPlacements) {\n className.push((0, _utils.getPopupClassNameFromAlign)(builtinPlacements, prefixCls, align));\n }\n if (props.getPopupClassNameFromAlign) {\n className.push(props.getPopupClassNameFromAlign(align));\n }\n return className.join(' ');\n },\n getPopupAlign: function getPopupAlign() {\n var props = this.props;\n var popupPlacement = props.popupPlacement;\n var popupAlign = props.popupAlign;\n var builtinPlacements = props.builtinPlacements;\n\n if (popupPlacement && builtinPlacements) {\n return (0, _utils.getAlignFromPlacement)(builtinPlacements, popupPlacement, popupAlign);\n }\n return popupAlign;\n },\n setPopupVisible: function setPopupVisible(popupVisible) {\n this.clearDelayTimer();\n if (this.state.popupVisible !== popupVisible) {\n if (!('popupVisible' in this.props)) {\n this.setState({\n popupVisible: popupVisible\n });\n }\n this.props.onPopupVisibleChange(popupVisible);\n }\n },\n delaySetPopupVisible: function delaySetPopupVisible(visible, delayS) {\n var _this2 = this;\n\n var delay = delayS * 1000;\n this.clearDelayTimer();\n if (delay) {\n this.delayTimer = setTimeout(function () {\n _this2.setPopupVisible(visible);\n _this2.clearDelayTimer();\n }, delay);\n } else {\n this.setPopupVisible(visible);\n }\n },\n clearDelayTimer: function clearDelayTimer() {\n if (this.delayTimer) {\n clearTimeout(this.delayTimer);\n this.delayTimer = null;\n }\n },\n createTwoChains: function createTwoChains(event) {\n var childPros = this.props.children.props;\n var props = this.props;\n if (childPros[event] && props[event]) {\n return this['fire' + event];\n }\n return childPros[event] || props[event];\n },\n isClickToShow: function isClickToShow() {\n var _props = this.props;\n var action = _props.action;\n var showAction = _props.showAction;\n\n return action.indexOf('click') !== -1 || showAction.indexOf('click') !== -1;\n },\n isClickToHide: function isClickToHide() {\n var _props2 = this.props;\n var action = _props2.action;\n var hideAction = _props2.hideAction;\n\n return action.indexOf('click') !== -1 || hideAction.indexOf('click') !== -1;\n },\n isMouseEnterToShow: function isMouseEnterToShow() {\n var _props3 = this.props;\n var action = _props3.action;\n var showAction = _props3.showAction;\n\n return action.indexOf('hover') !== -1 || showAction.indexOf('mouseEnter') !== -1;\n },\n isMouseLeaveToHide: function isMouseLeaveToHide() {\n var _props4 = this.props;\n var action = _props4.action;\n var hideAction = _props4.hideAction;\n\n return action.indexOf('hover') !== -1 || hideAction.indexOf('mouseLeave') !== -1;\n },\n isFocusToShow: function isFocusToShow() {\n var _props5 = this.props;\n var action = _props5.action;\n var showAction = _props5.showAction;\n\n return action.indexOf('focus') !== -1 || showAction.indexOf('focus') !== -1;\n },\n isBlurToHide: function isBlurToHide() {\n var _props6 = this.props;\n var action = _props6.action;\n var hideAction = _props6.hideAction;\n\n return action.indexOf('focus') !== -1 || hideAction.indexOf('blur') !== -1;\n },\n forcePopupAlign: function forcePopupAlign() {\n if (this.state.popupVisible && this.popupInstance && this.popupInstance.alignInstance) {\n this.popupInstance.alignInstance.forceAlign();\n }\n },\n fireEvents: function fireEvents(type, e) {\n var childCallback = this.props.children.props[type];\n if (childCallback) {\n childCallback(e);\n }\n var callback = this.props[type];\n if (callback) {\n callback(e);\n }\n },\n close: function close() {\n this.setPopupVisible(false);\n },\n render: function render() {\n var props = this.props;\n var children = props.children;\n var child = _react2[\"default\"].Children.only(children);\n var newChildProps = {};\n\n if (this.isClickToHide() || this.isClickToShow()) {\n newChildProps.onClick = this.onClick;\n newChildProps.onMouseDown = this.onMouseDown;\n newChildProps.onTouchStart = this.onTouchStart;\n } else {\n newChildProps.onClick = this.createTwoChains('onClick');\n newChildProps.onMouseDown = this.createTwoChains('onMouseDown');\n newChildProps.onTouchStart = this.createTwoChains('onTouchStart');\n }\n if (this.isMouseEnterToShow()) {\n newChildProps.onMouseEnter = this.onMouseEnter;\n } else {\n newChildProps.onMouseEnter = this.createTwoChains('onMouseEnter');\n }\n if (this.isMouseLeaveToHide()) {\n newChildProps.onMouseLeave = this.onMouseLeave;\n } else {\n newChildProps.onMouseLeave = this.createTwoChains('onMouseLeave');\n }\n if (this.isFocusToShow() || this.isBlurToHide()) {\n newChildProps.onFocus = this.onFocus;\n newChildProps.onBlur = this.onBlur;\n } else {\n newChildProps.onFocus = this.createTwoChains('onFocus');\n newChildProps.onBlur = this.createTwoChains('onBlur');\n }\n\n return _react2[\"default\"].cloneElement(child, newChildProps);\n }\n});\n\nexports[\"default\"] = Trigger;\nmodule.exports = exports['default'];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/rc-trigger/lib/Trigger.js\n// module id = 1242\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/rc-trigger/lib/Trigger.js?", + ); + + /***/ + }, + /* 1243 */ + /* unknown exports provided */ + /* all exports used */ + /*!***********************************!*\ + !*** ./~/rc-trigger/lib/index.js ***! + \***********************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nmodule.exports = __webpack_require__(/*! ./Trigger */ 1242);\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/rc-trigger/lib/index.js\n// module id = 1243\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/rc-trigger/lib/index.js?', + ); + + /***/ + }, + /* 1244 */ + /* unknown exports provided */ + /* all exports used */ + /*!***********************************!*\ + !*** ./~/rc-trigger/lib/utils.js ***! + \***********************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\n\nvar _extends2 = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n\nvar _extends3 = _interopRequireDefault(_extends2);\n\nexports.getAlignFromPlacement = getAlignFromPlacement;\nexports.getPopupClassNameFromAlign = getPopupClassNameFromAlign;\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }\n\nfunction isPointsEq(a1, a2) {\n return a1[0] === a2[0] && a1[1] === a2[1];\n}\n\nfunction getAlignFromPlacement(builtinPlacements, placementStr, align) {\n var baseAlign = builtinPlacements[placementStr] || {};\n return (0, _extends3["default"])({}, baseAlign, align);\n}\n\nfunction getPopupClassNameFromAlign(builtinPlacements, prefixCls, align) {\n var points = align.points;\n for (var placement in builtinPlacements) {\n if (builtinPlacements.hasOwnProperty(placement)) {\n if (isPointsEq(builtinPlacements[placement].points, points)) {\n return prefixCls + \'-placement-\' + placement;\n }\n }\n }\n return \'\';\n}\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/rc-trigger/lib/utils.js\n// module id = 1244\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/rc-trigger/lib/utils.js?', + ); + + /***/ + }, + /* 1245 */ + /* unknown exports provided */ + /* all exports used */ + /*!***************************************!*\ + !*** ./~/rc-util/lib/Dom/contains.js ***! + \***************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nmodule.exports = function contains(root, n) {\n var node = n;\n while (node) {\n if (node === root) {\n return true;\n }\n node = node.parentNode;\n }\n\n return false;\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/rc-util/lib/Dom/contains.js\n// module id = 1245\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/rc-util/lib/Dom/contains.js?', + ); + + /***/ + }, + /* 1246 */ + /* unknown exports provided */ + /* all exports used */ + /*!**************************************************!*\ + !*** ./~/rc-util/lib/getContainerRenderMixin.js ***! + \**************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nexports["default"] = getContainerRenderMixin;\n\nvar _reactDom = __webpack_require__(/*! react-dom */ 16);\n\nvar _reactDom2 = _interopRequireDefault(_reactDom);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }\n\nfunction defaultGetContainer() {\n var container = document.createElement(\'div\');\n document.body.appendChild(container);\n return container;\n}\n\nfunction getContainerRenderMixin(config) {\n var _config$autoMount = config.autoMount;\n var autoMount = _config$autoMount === undefined ? true : _config$autoMount;\n var _config$autoDestroy = config.autoDestroy;\n var autoDestroy = _config$autoDestroy === undefined ? true : _config$autoDestroy;\n var isVisible = config.isVisible;\n var getComponent = config.getComponent;\n var _config$getContainer = config.getContainer;\n var getContainer = _config$getContainer === undefined ? defaultGetContainer : _config$getContainer;\n\n\n var mixin = void 0;\n\n function _renderComponent(instance, componentArg, ready) {\n if (!isVisible || instance._component || isVisible(instance)) {\n if (!instance._container) {\n instance._container = getContainer(instance);\n }\n _reactDom2["default"].unstable_renderSubtreeIntoContainer(instance, getComponent(instance, componentArg), instance._container, function callback() {\n instance._component = this;\n if (ready) {\n ready.call(this);\n }\n });\n }\n }\n\n if (autoMount) {\n mixin = _extends({}, mixin, {\n componentDidMount: function componentDidMount() {\n _renderComponent(this);\n },\n componentDidUpdate: function componentDidUpdate() {\n _renderComponent(this);\n }\n });\n }\n\n if (!autoMount || !autoDestroy) {\n mixin = _extends({}, mixin, {\n renderComponent: function renderComponent(componentArg, ready) {\n _renderComponent(this, componentArg, ready);\n }\n });\n }\n\n function _removeContainer(instance) {\n if (instance._container) {\n var container = instance._container;\n _reactDom2["default"].unmountComponentAtNode(container);\n container.parentNode.removeChild(container);\n instance._container = null;\n }\n }\n\n if (autoDestroy) {\n mixin = _extends({}, mixin, {\n componentWillUnmount: function componentWillUnmount() {\n _removeContainer(this);\n }\n });\n } else {\n mixin = _extends({}, mixin, {\n removeContainer: function removeContainer() {\n _removeContainer(this);\n }\n });\n }\n\n return mixin;\n}\nmodule.exports = exports[\'default\'];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/rc-util/lib/getContainerRenderMixin.js\n// module id = 1246\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/rc-util/lib/getContainerRenderMixin.js?', + ); + + /***/ + }, + /* 1247 */ + /* unknown exports provided */ + /* exports used: default */ + /*!****************************************!*\ + !*** ./~/react-addons-update/index.js ***! + \****************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n\n\nvar invariant = __webpack_require__(/*! fbjs/lib/invariant */ 12);\nvar hasOwnProperty = {}.hasOwnProperty;\n\nfunction shallowCopy(x) {\n if (Array.isArray(x)) {\n return x.concat();\n } else if (x && typeof x === 'object') {\n return Object.assign(new x.constructor(), x);\n } else {\n return x;\n }\n}\n\nvar COMMAND_PUSH = '$push';\nvar COMMAND_UNSHIFT = '$unshift';\nvar COMMAND_SPLICE = '$splice';\nvar COMMAND_SET = '$set';\nvar COMMAND_MERGE = '$merge';\nvar COMMAND_APPLY = '$apply';\n\nvar ALL_COMMANDS_LIST = [\n COMMAND_PUSH,\n COMMAND_UNSHIFT,\n COMMAND_SPLICE,\n COMMAND_SET,\n COMMAND_MERGE,\n COMMAND_APPLY,\n];\n\nvar ALL_COMMANDS_SET = {};\n\nALL_COMMANDS_LIST.forEach(function(command) {\n ALL_COMMANDS_SET[command] = true;\n});\n\nfunction invariantArrayCase(value, spec, command) {\n invariant(\n Array.isArray(value),\n 'update(): expected target of %s to be an array; got %s.',\n command,\n value\n );\n var specValue = spec[command];\n invariant(\n Array.isArray(specValue),\n 'update(): expected spec of %s to be an array; got %s. ' +\n 'Did you forget to wrap your parameter in an array?',\n command,\n specValue\n );\n}\n\n/**\n * Returns a updated shallow copy of an object without mutating the original.\n * See https://facebook.github.io/react/docs/update.html for details.\n */\nfunction update(value, spec) {\n invariant(\n typeof spec === 'object',\n 'update(): You provided a key path to update() that did not contain one ' +\n 'of %s. Did you forget to include {%s: ...}?',\n ALL_COMMANDS_LIST.join(', '),\n COMMAND_SET\n );\n\n if (hasOwnProperty.call(spec, COMMAND_SET)) {\n invariant(\n Object.keys(spec).length === 1,\n 'Cannot have more than one key in an object with %s',\n COMMAND_SET\n );\n\n return spec[COMMAND_SET];\n }\n\n var nextValue = shallowCopy(value);\n\n if (hasOwnProperty.call(spec, COMMAND_MERGE)) {\n var mergeObj = spec[COMMAND_MERGE];\n invariant(\n mergeObj && typeof mergeObj === 'object',\n 'update(): %s expects a spec of type \\'object\\'; got %s',\n COMMAND_MERGE,\n mergeObj\n );\n invariant(\n nextValue && typeof nextValue === 'object',\n 'update(): %s expects a target of type \\'object\\'; got %s',\n COMMAND_MERGE,\n nextValue\n );\n Object.assign(nextValue, spec[COMMAND_MERGE]);\n }\n\n if (hasOwnProperty.call(spec, COMMAND_PUSH)) {\n invariantArrayCase(value, spec, COMMAND_PUSH);\n spec[COMMAND_PUSH].forEach(function(item) {\n nextValue.push(item);\n });\n }\n\n if (hasOwnProperty.call(spec, COMMAND_UNSHIFT)) {\n invariantArrayCase(value, spec, COMMAND_UNSHIFT);\n spec[COMMAND_UNSHIFT].forEach(function(item) {\n nextValue.unshift(item);\n });\n }\n\n if (hasOwnProperty.call(spec, COMMAND_SPLICE)) {\n invariant(\n Array.isArray(value),\n 'Expected %s target to be an array; got %s',\n COMMAND_SPLICE,\n value\n );\n invariant(\n Array.isArray(spec[COMMAND_SPLICE]),\n 'update(): expected spec of %s to be an array of arrays; got %s. ' +\n 'Did you forget to wrap your parameters in an array?',\n COMMAND_SPLICE,\n spec[COMMAND_SPLICE]\n );\n spec[COMMAND_SPLICE].forEach(function(args) {\n invariant(\n Array.isArray(args),\n 'update(): expected spec of %s to be an array of arrays; got %s. ' +\n 'Did you forget to wrap your parameters in an array?',\n COMMAND_SPLICE,\n spec[COMMAND_SPLICE]\n );\n nextValue.splice.apply(nextValue, args);\n });\n }\n\n if (hasOwnProperty.call(spec, COMMAND_APPLY)) {\n invariant(\n typeof spec[COMMAND_APPLY] === 'function',\n 'update(): expected spec of %s to be a function; got %s.',\n COMMAND_APPLY,\n spec[COMMAND_APPLY]\n );\n nextValue = spec[COMMAND_APPLY](nextValue);\n }\n\n for (var k in spec) {\n if (!(ALL_COMMANDS_SET.hasOwnProperty(k) && ALL_COMMANDS_SET[k])) {\n nextValue[k] = update(value[k], spec[k]);\n }\n }\n\n return nextValue;\n}\n\nmodule.exports = update;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-addons-update/index.js\n// module id = 1247\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-addons-update/index.js?", + ); + + /***/ + }, + /* 1248 */ + /* exports provided: default */ + /*!*******************************************!*\ + !*** ./~/react-bootstrap/es/Accordion.js ***! + \*******************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ 7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__PanelGroup__ = __webpack_require__(/*! ./PanelGroup */ 510);\n\n\n\n\n\n\n\n\nvar Accordion = function (_React$Component) {\n __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits___default()(Accordion, _React$Component);\n\n function Accordion() {\n __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck___default()(this, Accordion);\n\n return __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.apply(this, arguments));\n }\n\n Accordion.prototype.render = function render() {\n return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_5__PanelGroup__["a" /* default */],\n __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, this.props, { accordion: true }),\n this.props.children\n );\n };\n\n return Accordion;\n}(__WEBPACK_IMPORTED_MODULE_4_react___default.a.Component);\n\n/* unused harmony default export */ var _unused_webpack_default_export = (Accordion);\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/Accordion.js\n// module id = 1248\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/Accordion.js?', + ); + + /***/ + }, + /* 1249 */ + /* exports provided: default */ + /*!***************************************!*\ + !*** ./~/react-bootstrap/es/Alert.js ***! + \***************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_object_values__ = __webpack_require__(/*! babel-runtime/core-js/object/values */ 92);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_object_values___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_object_values__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends__ = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ 9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_objectWithoutProperties__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_classCallCheck__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_classCallCheck__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ 7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__ = __webpack_require__(/*! ./utils/bootstrapUtils */ 10);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__utils_StyleConfig__ = __webpack_require__(/*! ./utils/StyleConfig */ 32);\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar propTypes = {\n onDismiss: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.func,\n closeLabel: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.string\n};\n\nvar defaultProps = {\n closeLabel: 'Close alert'\n};\n\nvar Alert = function (_React$Component) {\n __WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits___default()(Alert, _React$Component);\n\n function Alert() {\n __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_classCallCheck___default()(this, Alert);\n\n return __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.apply(this, arguments));\n }\n\n Alert.prototype.renderDismissButton = function renderDismissButton(onDismiss) {\n return __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement(\n 'button',\n {\n type: 'button',\n className: 'close',\n onClick: onDismiss,\n 'aria-hidden': 'true',\n tabIndex: '-1'\n },\n __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement(\n 'span',\n null,\n '\\xD7'\n )\n );\n };\n\n Alert.prototype.renderSrOnlyDismissButton = function renderSrOnlyDismissButton(onDismiss, closeLabel) {\n return __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement(\n 'button',\n {\n type: 'button',\n className: 'close sr-only',\n onClick: onDismiss\n },\n closeLabel\n );\n };\n\n Alert.prototype.render = function render() {\n var _extends2;\n\n var _props = this.props,\n onDismiss = _props.onDismiss,\n closeLabel = _props.closeLabel,\n className = _props.className,\n children = _props.children,\n props = __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_objectWithoutProperties___default()(_props, ['onDismiss', 'closeLabel', 'className', 'children']);\n\n var _splitBsProps = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__[\"a\" /* splitBsProps */])(props),\n bsProps = _splitBsProps[0],\n elementProps = _splitBsProps[1];\n\n var dismissable = !!onDismiss;\n var classes = __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends___default()({}, __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__[\"b\" /* getClassSet */])(bsProps), (_extends2 = {}, _extends2[__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__[\"e\" /* prefix */])(bsProps, 'dismissable')] = dismissable, _extends2));\n\n return __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement(\n 'div',\n __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends___default()({}, elementProps, {\n role: 'alert',\n className: __WEBPACK_IMPORTED_MODULE_6_classnames___default()(className, classes)\n }),\n dismissable && this.renderDismissButton(onDismiss),\n children,\n dismissable && this.renderSrOnlyDismissButton(onDismiss, closeLabel)\n );\n };\n\n return Alert;\n}(__WEBPACK_IMPORTED_MODULE_7_react___default.a.Component);\n\nAlert.propTypes = propTypes;\nAlert.defaultProps = defaultProps;\n\n/* unused harmony default export */ var _unused_webpack_default_export = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__[\"g\" /* bsStyles */])(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_object_values___default()(__WEBPACK_IMPORTED_MODULE_10__utils_StyleConfig__[\"c\" /* State */]), __WEBPACK_IMPORTED_MODULE_10__utils_StyleConfig__[\"c\" /* State */].INFO, __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__[\"c\" /* bsClass */])('alert', Alert)));\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/Alert.js\n// module id = 1249\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/Alert.js?", + ); + + /***/ + }, + /* 1250 */ + /* exports provided: default */ + /*!***************************************!*\ + !*** ./~/react-bootstrap/es/Badge.js ***! + \***************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ 9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ 7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__ = __webpack_require__(/*! ./utils/bootstrapUtils */ 10);\n\n\n\n\n\n\n\n\n\n\n\n// TODO: `pullRight` doesn't belong here. There's no special handling here.\n\nvar propTypes = {\n pullRight: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool\n};\n\nvar defaultProps = {\n pullRight: false\n};\n\nvar Badge = function (_React$Component) {\n __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default()(Badge, _React$Component);\n\n function Badge() {\n __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default()(this, Badge);\n\n return __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.apply(this, arguments));\n }\n\n Badge.prototype.hasContent = function hasContent(children) {\n var result = false;\n\n __WEBPACK_IMPORTED_MODULE_6_react___default.a.Children.forEach(children, function (child) {\n if (result) {\n return;\n }\n\n if (child || child === 0) {\n result = true;\n }\n });\n\n return result;\n };\n\n Badge.prototype.render = function render() {\n var _props = this.props,\n pullRight = _props.pullRight,\n className = _props.className,\n children = _props.children,\n props = __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default()(_props, ['pullRight', 'className', 'children']);\n\n var _splitBsProps = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__[\"a\" /* splitBsProps */])(props),\n bsProps = _splitBsProps[0],\n elementProps = _splitBsProps[1];\n\n var classes = __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__[\"b\" /* getClassSet */])(bsProps), {\n 'pull-right': pullRight,\n\n // Hack for collapsing on IE8.\n hidden: !this.hasContent(children)\n });\n\n return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(\n 'span',\n __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, elementProps, {\n className: __WEBPACK_IMPORTED_MODULE_5_classnames___default()(className, classes)\n }),\n children\n );\n };\n\n return Badge;\n}(__WEBPACK_IMPORTED_MODULE_6_react___default.a.Component);\n\nBadge.propTypes = propTypes;\nBadge.defaultProps = defaultProps;\n\n/* unused harmony default export */ var _unused_webpack_default_export = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__[\"c\" /* bsClass */])('badge', Badge));\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/Badge.js\n// module id = 1250\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/Badge.js?", + ); + + /***/ + }, + /* 1251 */ + /* exports provided: default */ + /*!********************************************!*\ + !*** ./~/react-bootstrap/es/Breadcrumb.js ***! + \********************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ 9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ 7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__BreadcrumbItem__ = __webpack_require__(/*! ./BreadcrumbItem */ 494);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__ = __webpack_require__(/*! ./utils/bootstrapUtils */ 10);\n\n\n\n\n\n\n\n\n\n\n\nvar Breadcrumb = function (_React$Component) {\n __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default()(Breadcrumb, _React$Component);\n\n function Breadcrumb() {\n __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default()(this, Breadcrumb);\n\n return __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.apply(this, arguments));\n }\n\n Breadcrumb.prototype.render = function render() {\n var _props = this.props,\n className = _props.className,\n props = __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default()(_props, ['className']);\n\n var _splitBsProps = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__[\"a\" /* splitBsProps */])(props),\n bsProps = _splitBsProps[0],\n elementProps = _splitBsProps[1];\n\n var classes = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__[\"b\" /* getClassSet */])(bsProps);\n\n return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('ol', __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, elementProps, {\n role: 'navigation',\n 'aria-label': 'breadcrumbs',\n className: __WEBPACK_IMPORTED_MODULE_5_classnames___default()(className, classes)\n }));\n };\n\n return Breadcrumb;\n}(__WEBPACK_IMPORTED_MODULE_6_react___default.a.Component);\n\nBreadcrumb.Item = __WEBPACK_IMPORTED_MODULE_7__BreadcrumbItem__[\"a\" /* default */];\n\n/* unused harmony default export */ var _unused_webpack_default_export = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__[\"c\" /* bsClass */])('breadcrumb', Breadcrumb));\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/Breadcrumb.js\n// module id = 1251\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/Breadcrumb.js?", + ); + + /***/ + }, + /* 1252 */ + /* exports provided: default */ + /*!***********************************************!*\ + !*** ./~/react-bootstrap/es/ButtonToolbar.js ***! + \***********************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ 9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ 7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__Button__ = __webpack_require__(/*! ./Button */ 119);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__ = __webpack_require__(/*! ./utils/bootstrapUtils */ 10);\n\n\n\n\n\n\n\n\n\n\n\nvar ButtonToolbar = function (_React$Component) {\n __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default()(ButtonToolbar, _React$Component);\n\n function ButtonToolbar() {\n __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default()(this, ButtonToolbar);\n\n return __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.apply(this, arguments));\n }\n\n ButtonToolbar.prototype.render = function render() {\n var _props = this.props,\n className = _props.className,\n props = __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default()(_props, [\'className\']);\n\n var _splitBsProps = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__["a" /* splitBsProps */])(props),\n bsProps = _splitBsProps[0],\n elementProps = _splitBsProps[1];\n\n var classes = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__["b" /* getClassSet */])(bsProps);\n\n return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(\'div\', __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, elementProps, {\n role: \'toolbar\',\n className: __WEBPACK_IMPORTED_MODULE_5_classnames___default()(className, classes)\n }));\n };\n\n return ButtonToolbar;\n}(__WEBPACK_IMPORTED_MODULE_6_react___default.a.Component);\n\n/* unused harmony default export */ var _unused_webpack_default_export = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__["c" /* bsClass */])(\'btn-toolbar\', __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__["d" /* bsSizes */])(__WEBPACK_IMPORTED_MODULE_7__Button__["a" /* default */].SIZES, ButtonToolbar)));\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/ButtonToolbar.js\n// module id = 1252\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/ButtonToolbar.js?', + ); + + /***/ + }, + /* 1253 */ + /* exports provided: default */ + /*!******************************************!*\ + !*** ./~/react-bootstrap/es/Carousel.js ***! + \******************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ 9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ 7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__CarouselCaption__ = __webpack_require__(/*! ./CarouselCaption */ 1254);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__CarouselItem__ = __webpack_require__(/*! ./CarouselItem */ 496);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__Glyphicon__ = __webpack_require__(/*! ./Glyphicon */ 237);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__SafeAnchor__ = __webpack_require__(/*! ./SafeAnchor */ 54);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__utils_bootstrapUtils__ = __webpack_require__(/*! ./utils/bootstrapUtils */ 10);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__utils_ValidComponentChildren__ = __webpack_require__(/*! ./utils/ValidComponentChildren */ 34);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n// TODO: `slide` should be `animate`.\n\n// TODO: Use uncontrollable.\n\nvar propTypes = {\n slide: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,\n indicators: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,\n interval: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.number,\n controls: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,\n pauseOnHover: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,\n wrap: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,\n /**\n * Callback fired when the active item changes.\n *\n * ```js\n * (eventKey: any) => any | (eventKey: any, event: Object) => any\n * ```\n *\n * If this callback takes two or more arguments, the second argument will\n * be a persisted event object with `direction` set to the direction of the\n * transition.\n */\n onSelect: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func,\n onSlideEnd: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func,\n activeIndex: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.number,\n defaultActiveIndex: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.number,\n direction: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.oneOf(['prev', 'next']),\n prevIcon: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.node,\n /**\n * Label shown to screen readers only, can be used to show the previous element\n * in the carousel.\n * Set to null to deactivate.\n */\n prevLabel: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string,\n nextIcon: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.node,\n /**\n * Label shown to screen readers only, can be used to show the next element\n * in the carousel.\n * Set to null to deactivate.\n */\n nextLabel: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string\n};\n\nvar defaultProps = {\n slide: true,\n interval: 5000,\n pauseOnHover: true,\n wrap: true,\n indicators: true,\n controls: true,\n prevIcon: __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_10__Glyphicon__[\"a\" /* default */], { glyph: 'chevron-left' }),\n prevLabel: 'Previous',\n nextIcon: __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_10__Glyphicon__[\"a\" /* default */], { glyph: 'chevron-right' }),\n nextLabel: 'Next'\n};\n\nvar Carousel = function (_React$Component) {\n __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default()(Carousel, _React$Component);\n\n function Carousel(props, context) {\n __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default()(this, Carousel);\n\n var _this = __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.call(this, props, context));\n\n _this.handleMouseOver = _this.handleMouseOver.bind(_this);\n _this.handleMouseOut = _this.handleMouseOut.bind(_this);\n _this.handlePrev = _this.handlePrev.bind(_this);\n _this.handleNext = _this.handleNext.bind(_this);\n _this.handleItemAnimateOutEnd = _this.handleItemAnimateOutEnd.bind(_this);\n\n var defaultActiveIndex = props.defaultActiveIndex;\n\n\n _this.state = {\n activeIndex: defaultActiveIndex != null ? defaultActiveIndex : 0,\n previousActiveIndex: null,\n direction: null\n };\n\n _this.isUnmounted = false;\n return _this;\n }\n\n Carousel.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {\n var activeIndex = this.getActiveIndex();\n\n if (nextProps.activeIndex != null && nextProps.activeIndex !== activeIndex) {\n clearTimeout(this.timeout);\n\n this.setState({\n previousActiveIndex: activeIndex,\n direction: nextProps.direction != null ? nextProps.direction : this.getDirection(activeIndex, nextProps.activeIndex)\n });\n }\n };\n\n Carousel.prototype.componentDidMount = function componentDidMount() {\n this.waitForNext();\n };\n\n Carousel.prototype.componentWillUnmount = function componentWillUnmount() {\n clearTimeout(this.timeout);\n this.isUnmounted = true;\n };\n\n Carousel.prototype.handleMouseOver = function handleMouseOver() {\n if (this.props.pauseOnHover) {\n this.pause();\n }\n };\n\n Carousel.prototype.handleMouseOut = function handleMouseOut() {\n if (this.isPaused) {\n this.play();\n }\n };\n\n Carousel.prototype.handlePrev = function handlePrev(e) {\n var index = this.getActiveIndex() - 1;\n\n if (index < 0) {\n if (!this.props.wrap) {\n return;\n }\n index = __WEBPACK_IMPORTED_MODULE_13__utils_ValidComponentChildren__[\"a\" /* default */].count(this.props.children) - 1;\n }\n\n this.select(index, e, 'prev');\n };\n\n Carousel.prototype.handleNext = function handleNext(e) {\n var index = this.getActiveIndex() + 1;\n var count = __WEBPACK_IMPORTED_MODULE_13__utils_ValidComponentChildren__[\"a\" /* default */].count(this.props.children);\n\n if (index > count - 1) {\n if (!this.props.wrap) {\n return;\n }\n index = 0;\n }\n\n this.select(index, e, 'next');\n };\n\n Carousel.prototype.handleItemAnimateOutEnd = function handleItemAnimateOutEnd() {\n var _this2 = this;\n\n this.setState({\n previousActiveIndex: null,\n direction: null\n }, function () {\n _this2.waitForNext();\n\n if (_this2.props.onSlideEnd) {\n _this2.props.onSlideEnd();\n }\n });\n };\n\n Carousel.prototype.getActiveIndex = function getActiveIndex() {\n var activeIndexProp = this.props.activeIndex;\n return activeIndexProp != null ? activeIndexProp : this.state.activeIndex;\n };\n\n Carousel.prototype.getDirection = function getDirection(prevIndex, index) {\n if (prevIndex === index) {\n return null;\n }\n\n return prevIndex > index ? 'prev' : 'next';\n };\n\n Carousel.prototype.select = function select(index, e, direction) {\n clearTimeout(this.timeout);\n\n // TODO: Is this necessary? Seems like the only risk is if the component\n // unmounts while handleItemAnimateOutEnd fires.\n if (this.isUnmounted) {\n return;\n }\n\n var previousActiveIndex = this.props.slide ? this.getActiveIndex() : null;\n direction = direction || this.getDirection(previousActiveIndex, index);\n\n var onSelect = this.props.onSelect;\n\n\n if (onSelect) {\n if (onSelect.length > 1) {\n // React SyntheticEvents are pooled, so we need to remove this event\n // from the pool to add a custom property. To avoid unnecessarily\n // removing objects from the pool, only do this when the listener\n // actually wants the event.\n if (e) {\n e.persist();\n e.direction = direction;\n } else {\n e = { direction: direction };\n }\n\n onSelect(index, e);\n } else {\n onSelect(index);\n }\n }\n\n if (this.props.activeIndex == null && index !== previousActiveIndex) {\n if (this.state.previousActiveIndex != null) {\n // If currently animating don't activate the new index.\n // TODO: look into queueing this canceled call and\n // animating after the current animation has ended.\n return;\n }\n\n this.setState({\n activeIndex: index,\n previousActiveIndex: previousActiveIndex,\n direction: direction\n });\n }\n };\n\n Carousel.prototype.waitForNext = function waitForNext() {\n var _props = this.props,\n slide = _props.slide,\n interval = _props.interval,\n activeIndexProp = _props.activeIndex;\n\n\n if (!this.isPaused && slide && interval && activeIndexProp == null) {\n this.timeout = setTimeout(this.handleNext, interval);\n }\n };\n\n // This might be a public API.\n\n\n Carousel.prototype.pause = function pause() {\n this.isPaused = true;\n clearTimeout(this.timeout);\n };\n\n // This might be a public API.\n\n\n Carousel.prototype.play = function play() {\n this.isPaused = false;\n this.waitForNext();\n };\n\n Carousel.prototype.renderIndicators = function renderIndicators(children, activeIndex, bsProps) {\n var _this3 = this;\n\n var indicators = [];\n\n __WEBPACK_IMPORTED_MODULE_13__utils_ValidComponentChildren__[\"a\" /* default */].forEach(children, function (child, index) {\n indicators.push(__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('li', {\n key: index,\n className: index === activeIndex ? 'active' : null,\n onClick: function onClick(e) {\n return _this3.select(index, e);\n }\n }),\n\n // Force whitespace between indicator elements. Bootstrap requires\n // this for correct spacing of elements.\n ' ');\n });\n\n return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(\n 'ol',\n { className: __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_12__utils_bootstrapUtils__[\"e\" /* prefix */])(bsProps, 'indicators') },\n indicators\n );\n };\n\n Carousel.prototype.renderControls = function renderControls(properties) {\n var wrap = properties.wrap,\n children = properties.children,\n activeIndex = properties.activeIndex,\n prevIcon = properties.prevIcon,\n nextIcon = properties.nextIcon,\n bsProps = properties.bsProps,\n prevLabel = properties.prevLabel,\n nextLabel = properties.nextLabel;\n\n var controlClassName = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_12__utils_bootstrapUtils__[\"e\" /* prefix */])(bsProps, 'control');\n var count = __WEBPACK_IMPORTED_MODULE_13__utils_ValidComponentChildren__[\"a\" /* default */].count(children);\n\n return [(wrap || activeIndex !== 0) && __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_11__SafeAnchor__[\"a\" /* default */],\n {\n key: 'prev',\n className: __WEBPACK_IMPORTED_MODULE_5_classnames___default()(controlClassName, 'left'),\n onClick: this.handlePrev\n },\n prevIcon,\n prevLabel && __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(\n 'span',\n { className: 'sr-only' },\n prevLabel\n )\n ), (wrap || activeIndex !== count - 1) && __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_11__SafeAnchor__[\"a\" /* default */],\n {\n key: 'next',\n className: __WEBPACK_IMPORTED_MODULE_5_classnames___default()(controlClassName, 'right'),\n onClick: this.handleNext\n },\n nextIcon,\n nextLabel && __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(\n 'span',\n { className: 'sr-only' },\n nextLabel\n )\n )];\n };\n\n Carousel.prototype.render = function render() {\n var _this4 = this;\n\n var _props2 = this.props,\n slide = _props2.slide,\n indicators = _props2.indicators,\n controls = _props2.controls,\n wrap = _props2.wrap,\n prevIcon = _props2.prevIcon,\n prevLabel = _props2.prevLabel,\n nextIcon = _props2.nextIcon,\n nextLabel = _props2.nextLabel,\n className = _props2.className,\n children = _props2.children,\n props = __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default()(_props2, ['slide', 'indicators', 'controls', 'wrap', 'prevIcon', 'prevLabel', 'nextIcon', 'nextLabel', 'className', 'children']);\n\n var _state = this.state,\n previousActiveIndex = _state.previousActiveIndex,\n direction = _state.direction;\n\n var _splitBsPropsAndOmit = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_12__utils_bootstrapUtils__[\"f\" /* splitBsPropsAndOmit */])(props, ['interval', 'pauseOnHover', 'onSelect', 'onSlideEnd', 'activeIndex', // Accessed via this.getActiveIndex().\n 'defaultActiveIndex', 'direction']),\n bsProps = _splitBsPropsAndOmit[0],\n elementProps = _splitBsPropsAndOmit[1];\n\n var activeIndex = this.getActiveIndex();\n\n var classes = __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_12__utils_bootstrapUtils__[\"b\" /* getClassSet */])(bsProps), {\n slide: slide\n });\n\n return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(\n 'div',\n __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, elementProps, {\n className: __WEBPACK_IMPORTED_MODULE_5_classnames___default()(className, classes),\n onMouseOver: this.handleMouseOver,\n onMouseOut: this.handleMouseOut\n }),\n indicators && this.renderIndicators(children, activeIndex, bsProps),\n __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(\n 'div',\n { className: __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_12__utils_bootstrapUtils__[\"e\" /* prefix */])(bsProps, 'inner') },\n __WEBPACK_IMPORTED_MODULE_13__utils_ValidComponentChildren__[\"a\" /* default */].map(children, function (child, index) {\n var active = index === activeIndex;\n var previousActive = slide && index === previousActiveIndex;\n\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6_react__[\"cloneElement\"])(child, {\n active: active,\n index: index,\n animateOut: previousActive,\n animateIn: active && previousActiveIndex != null && slide,\n direction: direction,\n onAnimateOutEnd: previousActive ? _this4.handleItemAnimateOutEnd : null\n });\n })\n ),\n controls && this.renderControls({\n wrap: wrap,\n children: children,\n activeIndex: activeIndex,\n prevIcon: prevIcon,\n prevLabel: prevLabel,\n nextIcon: nextIcon,\n nextLabel: nextLabel,\n bsProps: bsProps\n })\n );\n };\n\n return Carousel;\n}(__WEBPACK_IMPORTED_MODULE_6_react___default.a.Component);\n\nCarousel.propTypes = propTypes;\nCarousel.defaultProps = defaultProps;\n\nCarousel.Caption = __WEBPACK_IMPORTED_MODULE_8__CarouselCaption__[\"a\" /* default */];\nCarousel.Item = __WEBPACK_IMPORTED_MODULE_9__CarouselItem__[\"a\" /* default */];\n\n/* unused harmony default export */ var _unused_webpack_default_export = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_12__utils_bootstrapUtils__[\"c\" /* bsClass */])('carousel', Carousel));\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/Carousel.js\n// module id = 1253\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/Carousel.js?", + ); + + /***/ + }, + /* 1254 */ + /* exports provided: default */ + /* exports used: default */ + /*!*************************************************!*\ + !*** ./~/react-bootstrap/es/CarouselCaption.js ***! + \*************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ 9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ 7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react_prop_types_lib_elementType__ = __webpack_require__(/*! react-prop-types/lib/elementType */ 18);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react_prop_types_lib_elementType___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_react_prop_types_lib_elementType__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__ = __webpack_require__(/*! ./utils/bootstrapUtils */ 10);\n\n\n\n\n\n\n\n\n\n\n\nvar propTypes = {\n componentClass: __WEBPACK_IMPORTED_MODULE_7_react_prop_types_lib_elementType___default.a\n};\n\nvar defaultProps = {\n componentClass: \'div\'\n};\n\nvar CarouselCaption = function (_React$Component) {\n __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default()(CarouselCaption, _React$Component);\n\n function CarouselCaption() {\n __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default()(this, CarouselCaption);\n\n return __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.apply(this, arguments));\n }\n\n CarouselCaption.prototype.render = function render() {\n var _props = this.props,\n Component = _props.componentClass,\n className = _props.className,\n props = __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default()(_props, [\'componentClass\', \'className\']);\n\n var _splitBsProps = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__["a" /* splitBsProps */])(props),\n bsProps = _splitBsProps[0],\n elementProps = _splitBsProps[1];\n\n var classes = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__["b" /* getClassSet */])(bsProps);\n\n return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(Component, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, elementProps, {\n className: __WEBPACK_IMPORTED_MODULE_5_classnames___default()(className, classes)\n }));\n };\n\n return CarouselCaption;\n}(__WEBPACK_IMPORTED_MODULE_6_react___default.a.Component);\n\nCarouselCaption.propTypes = propTypes;\nCarouselCaption.defaultProps = defaultProps;\n\n/* harmony default export */ __webpack_exports__["a"] = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__["c" /* bsClass */])(\'carousel-caption\', CarouselCaption));\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/CarouselCaption.js\n// module id = 1254\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/CarouselCaption.js?', + ); + + /***/ + }, + /* 1255 */ + /* exports provided: default */ + /*!******************************************!*\ + !*** ./~/react-bootstrap/es/Checkbox.js ***! + \******************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ 9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ 7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_warning__ = __webpack_require__(/*! warning */ 23);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_warning__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__ = __webpack_require__(/*! ./utils/bootstrapUtils */ 10);\n\n\n\n\n\n\n\n\n\n\n\n\nvar propTypes = {\n inline: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,\n disabled: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,\n /**\n * Only valid if `inline` is not set.\n */\n validationState: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.oneOf(['success', 'warning', 'error', null]),\n /**\n * Attaches a ref to the `<input>` element. Only functions can be used here.\n *\n * ```js\n * <Checkbox inputRef={ref => { this.input = ref; }} />\n * ```\n */\n inputRef: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func\n};\n\nvar defaultProps = {\n inline: false,\n disabled: false\n};\n\nvar Checkbox = function (_React$Component) {\n __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default()(Checkbox, _React$Component);\n\n function Checkbox() {\n __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default()(this, Checkbox);\n\n return __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.apply(this, arguments));\n }\n\n Checkbox.prototype.render = function render() {\n var _props = this.props,\n inline = _props.inline,\n disabled = _props.disabled,\n validationState = _props.validationState,\n inputRef = _props.inputRef,\n className = _props.className,\n style = _props.style,\n children = _props.children,\n props = __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default()(_props, ['inline', 'disabled', 'validationState', 'inputRef', 'className', 'style', 'children']);\n\n var _splitBsProps = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__[\"a\" /* splitBsProps */])(props),\n bsProps = _splitBsProps[0],\n elementProps = _splitBsProps[1];\n\n var input = __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('input', __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, elementProps, {\n ref: inputRef,\n type: 'checkbox',\n disabled: disabled\n }));\n\n if (inline) {\n var _classes2;\n\n var _classes = (_classes2 = {}, _classes2[__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__[\"e\" /* prefix */])(bsProps, 'inline')] = true, _classes2.disabled = disabled, _classes2);\n\n // Use a warning here instead of in propTypes to get better-looking\n // generated documentation.\n true ? __WEBPACK_IMPORTED_MODULE_8_warning___default()(!validationState, '`validationState` is ignored on `<Checkbox inline>`. To display ' + 'validation state on an inline checkbox, set `validationState` on a ' + 'parent `<FormGroup>` or other element instead.') : void 0;\n\n return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(\n 'label',\n { className: __WEBPACK_IMPORTED_MODULE_5_classnames___default()(className, _classes), style: style },\n input,\n children\n );\n }\n\n var classes = __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__[\"b\" /* getClassSet */])(bsProps), {\n disabled: disabled\n });\n if (validationState) {\n classes['has-' + validationState] = true;\n }\n\n return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_5_classnames___default()(className, classes), style: style },\n __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(\n 'label',\n null,\n input,\n children\n )\n );\n };\n\n return Checkbox;\n}(__WEBPACK_IMPORTED_MODULE_6_react___default.a.Component);\n\nCheckbox.propTypes = propTypes;\nCheckbox.defaultProps = defaultProps;\n\n/* unused harmony default export */ var _unused_webpack_default_export = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__[\"c\" /* bsClass */])('checkbox', Checkbox));\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/Checkbox.js\n// module id = 1255\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/Checkbox.js?", + ); + + /***/ + }, + /* 1256 */ + /* exports provided: default */ + /*!******************************************!*\ + !*** ./~/react-bootstrap/es/Clearfix.js ***! + \******************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ 9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ 7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_react_prop_types_lib_elementType__ = __webpack_require__(/*! react-prop-types/lib/elementType */ 18);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_react_prop_types_lib_elementType___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_react_prop_types_lib_elementType__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__ = __webpack_require__(/*! ./utils/bootstrapUtils */ 10);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__utils_capitalize__ = __webpack_require__(/*! ./utils/capitalize */ 512);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__utils_StyleConfig__ = __webpack_require__(/*! ./utils/StyleConfig */ 32);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar propTypes = {\n componentClass: __WEBPACK_IMPORTED_MODULE_8_react_prop_types_lib_elementType___default.a,\n\n /**\n * Apply clearfix\n *\n * on Extra small devices Phones\n *\n * adds class `visible-xs-block`\n */\n visibleXsBlock: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,\n /**\n * Apply clearfix\n *\n * on Small devices Tablets\n *\n * adds class `visible-sm-block`\n */\n visibleSmBlock: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,\n /**\n * Apply clearfix\n *\n * on Medium devices Desktops\n *\n * adds class `visible-md-block`\n */\n visibleMdBlock: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,\n /**\n * Apply clearfix\n *\n * on Large devices Desktops\n *\n * adds class `visible-lg-block`\n */\n visibleLgBlock: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool\n};\n\nvar defaultProps = {\n componentClass: 'div'\n};\n\nvar Clearfix = function (_React$Component) {\n __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default()(Clearfix, _React$Component);\n\n function Clearfix() {\n __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default()(this, Clearfix);\n\n return __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.apply(this, arguments));\n }\n\n Clearfix.prototype.render = function render() {\n var _props = this.props,\n Component = _props.componentClass,\n className = _props.className,\n props = __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default()(_props, ['componentClass', 'className']);\n\n var _splitBsProps = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__[\"a\" /* splitBsProps */])(props),\n bsProps = _splitBsProps[0],\n elementProps = _splitBsProps[1];\n\n var classes = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__[\"b\" /* getClassSet */])(bsProps);\n\n __WEBPACK_IMPORTED_MODULE_11__utils_StyleConfig__[\"e\" /* DEVICE_SIZES */].forEach(function (size) {\n var propName = 'visible' + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_10__utils_capitalize__[\"a\" /* default */])(size) + 'Block';\n if (elementProps[propName]) {\n classes['visible-' + size + '-block'] = true;\n }\n\n delete elementProps[propName];\n });\n\n return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(Component, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, elementProps, {\n className: __WEBPACK_IMPORTED_MODULE_5_classnames___default()(className, classes)\n }));\n };\n\n return Clearfix;\n}(__WEBPACK_IMPORTED_MODULE_6_react___default.a.Component);\n\nClearfix.propTypes = propTypes;\nClearfix.defaultProps = defaultProps;\n\n/* unused harmony default export */ var _unused_webpack_default_export = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__[\"c\" /* bsClass */])('clearfix', Clearfix));\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/Clearfix.js\n// module id = 1256\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/Clearfix.js?", + ); + + /***/ + }, + /* 1257 */ + /* exports provided: default */ + /*!*************************************!*\ + !*** ./~/react-bootstrap/es/Col.js ***! + \*************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ 9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ 7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_react_prop_types_lib_elementType__ = __webpack_require__(/*! react-prop-types/lib/elementType */ 18);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_react_prop_types_lib_elementType___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_react_prop_types_lib_elementType__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__ = __webpack_require__(/*! ./utils/bootstrapUtils */ 10);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__utils_StyleConfig__ = __webpack_require__(/*! ./utils/StyleConfig */ 32);\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar propTypes = {\n componentClass: __WEBPACK_IMPORTED_MODULE_8_react_prop_types_lib_elementType___default.a,\n\n /**\n * The number of columns you wish to span\n *\n * for Extra small devices Phones (<768px)\n *\n * class-prefix `col-xs-`\n */\n xs: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.number,\n /**\n * The number of columns you wish to span\n *\n * for Small devices Tablets (≥768px)\n *\n * class-prefix `col-sm-`\n */\n sm: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.number,\n /**\n * The number of columns you wish to span\n *\n * for Medium devices Desktops (≥992px)\n *\n * class-prefix `col-md-`\n */\n md: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.number,\n /**\n * The number of columns you wish to span\n *\n * for Large devices Desktops (≥1200px)\n *\n * class-prefix `col-lg-`\n */\n lg: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.number,\n /**\n * Hide column\n *\n * on Extra small devices Phones\n *\n * adds class `hidden-xs`\n */\n xsHidden: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,\n /**\n * Hide column\n *\n * on Small devices Tablets\n *\n * adds class `hidden-sm`\n */\n smHidden: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,\n /**\n * Hide column\n *\n * on Medium devices Desktops\n *\n * adds class `hidden-md`\n */\n mdHidden: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,\n /**\n * Hide column\n *\n * on Large devices Desktops\n *\n * adds class `hidden-lg`\n */\n lgHidden: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,\n /**\n * Move columns to the right\n *\n * for Extra small devices Phones\n *\n * class-prefix `col-xs-offset-`\n */\n xsOffset: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.number,\n /**\n * Move columns to the right\n *\n * for Small devices Tablets\n *\n * class-prefix `col-sm-offset-`\n */\n smOffset: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.number,\n /**\n * Move columns to the right\n *\n * for Medium devices Desktops\n *\n * class-prefix `col-md-offset-`\n */\n mdOffset: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.number,\n /**\n * Move columns to the right\n *\n * for Large devices Desktops\n *\n * class-prefix `col-lg-offset-`\n */\n lgOffset: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.number,\n /**\n * Change the order of grid columns to the right\n *\n * for Extra small devices Phones\n *\n * class-prefix `col-xs-push-`\n */\n xsPush: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.number,\n /**\n * Change the order of grid columns to the right\n *\n * for Small devices Tablets\n *\n * class-prefix `col-sm-push-`\n */\n smPush: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.number,\n /**\n * Change the order of grid columns to the right\n *\n * for Medium devices Desktops\n *\n * class-prefix `col-md-push-`\n */\n mdPush: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.number,\n /**\n * Change the order of grid columns to the right\n *\n * for Large devices Desktops\n *\n * class-prefix `col-lg-push-`\n */\n lgPush: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.number,\n /**\n * Change the order of grid columns to the left\n *\n * for Extra small devices Phones\n *\n * class-prefix `col-xs-pull-`\n */\n xsPull: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.number,\n /**\n * Change the order of grid columns to the left\n *\n * for Small devices Tablets\n *\n * class-prefix `col-sm-pull-`\n */\n smPull: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.number,\n /**\n * Change the order of grid columns to the left\n *\n * for Medium devices Desktops\n *\n * class-prefix `col-md-pull-`\n */\n mdPull: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.number,\n /**\n * Change the order of grid columns to the left\n *\n * for Large devices Desktops\n *\n * class-prefix `col-lg-pull-`\n */\n lgPull: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.number\n};\n\nvar defaultProps = {\n componentClass: 'div'\n};\n\nvar Col = function (_React$Component) {\n __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default()(Col, _React$Component);\n\n function Col() {\n __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default()(this, Col);\n\n return __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.apply(this, arguments));\n }\n\n Col.prototype.render = function render() {\n var _props = this.props,\n Component = _props.componentClass,\n className = _props.className,\n props = __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default()(_props, ['componentClass', 'className']);\n\n var _splitBsProps = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__[\"a\" /* splitBsProps */])(props),\n bsProps = _splitBsProps[0],\n elementProps = _splitBsProps[1];\n\n var classes = [];\n\n __WEBPACK_IMPORTED_MODULE_10__utils_StyleConfig__[\"e\" /* DEVICE_SIZES */].forEach(function (size) {\n function popProp(propSuffix, modifier) {\n var propName = '' + size + propSuffix;\n var propValue = elementProps[propName];\n\n if (propValue != null) {\n classes.push(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__[\"e\" /* prefix */])(bsProps, '' + size + modifier + '-' + propValue));\n }\n\n delete elementProps[propName];\n }\n\n popProp('', '');\n popProp('Offset', '-offset');\n popProp('Push', '-push');\n popProp('Pull', '-pull');\n\n var hiddenPropName = size + 'Hidden';\n if (elementProps[hiddenPropName]) {\n classes.push('hidden-' + size);\n }\n delete elementProps[hiddenPropName];\n });\n\n return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(Component, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, elementProps, {\n className: __WEBPACK_IMPORTED_MODULE_5_classnames___default()(className, classes)\n }));\n };\n\n return Col;\n}(__WEBPACK_IMPORTED_MODULE_6_react___default.a.Component);\n\nCol.propTypes = propTypes;\nCol.defaultProps = defaultProps;\n\n/* unused harmony default export */ var _unused_webpack_default_export = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__[\"c\" /* bsClass */])('col', Col));\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/Col.js\n// module id = 1257\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/Col.js?", + ); + + /***/ + }, + /* 1258 */ + /* exports provided: default */ + /*!**********************************************!*\ + !*** ./~/react-bootstrap/es/ControlLabel.js ***! + \**********************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ 9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ 7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_warning__ = __webpack_require__(/*! warning */ 23);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_warning__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__ = __webpack_require__(/*! ./utils/bootstrapUtils */ 10);\n\n\n\n\n\n\n\n\n\n\n\n\nvar propTypes = {\n /**\n * Uses `controlId` from `<FormGroup>` if not explicitly specified.\n */\n htmlFor: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string,\n srOnly: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool\n};\n\nvar defaultProps = {\n srOnly: false\n};\n\nvar contextTypes = {\n $bs_formGroup: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.object\n};\n\nvar ControlLabel = function (_React$Component) {\n __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default()(ControlLabel, _React$Component);\n\n function ControlLabel() {\n __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default()(this, ControlLabel);\n\n return __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.apply(this, arguments));\n }\n\n ControlLabel.prototype.render = function render() {\n var formGroup = this.context.$bs_formGroup;\n var controlId = formGroup && formGroup.controlId;\n\n var _props = this.props,\n _props$htmlFor = _props.htmlFor,\n htmlFor = _props$htmlFor === undefined ? controlId : _props$htmlFor,\n srOnly = _props.srOnly,\n className = _props.className,\n props = __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default()(_props, ['htmlFor', 'srOnly', 'className']);\n\n var _splitBsProps = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__[\"a\" /* splitBsProps */])(props),\n bsProps = _splitBsProps[0],\n elementProps = _splitBsProps[1];\n\n true ? __WEBPACK_IMPORTED_MODULE_8_warning___default()(controlId == null || htmlFor === controlId, '`controlId` is ignored on `<ControlLabel>` when `htmlFor` is specified.') : void 0;\n\n var classes = __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__[\"b\" /* getClassSet */])(bsProps), {\n 'sr-only': srOnly\n });\n\n return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('label', __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, elementProps, {\n htmlFor: htmlFor,\n className: __WEBPACK_IMPORTED_MODULE_5_classnames___default()(className, classes)\n }));\n };\n\n return ControlLabel;\n}(__WEBPACK_IMPORTED_MODULE_6_react___default.a.Component);\n\nControlLabel.propTypes = propTypes;\nControlLabel.defaultProps = defaultProps;\nControlLabel.contextTypes = contextTypes;\n\n/* unused harmony default export */ var _unused_webpack_default_export = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__[\"c\" /* bsClass */])('control-label', ControlLabel));\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/ControlLabel.js\n// module id = 1258\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/ControlLabel.js?", + ); + + /***/ + }, + /* 1259 */ + /* exports provided: default */ + /* exports used: default */ + /*!************************************************!*\ + !*** ./~/react-bootstrap/es/DropdownButton.js ***! + \************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ 9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_objectWithoutProperties__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ 7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_extends__ = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_extends__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__Dropdown__ = __webpack_require__(/*! ./Dropdown */ 165);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__utils_splitComponentProps__ = __webpack_require__(/*! ./utils/splitComponentProps */ 167);\n\n\n\n\n\n\n\n\n\n\n\nvar propTypes = __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_extends___default()({}, __WEBPACK_IMPORTED_MODULE_7__Dropdown__["a" /* default */].propTypes, {\n\n // Toggle props.\n bsStyle: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,\n bsSize: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,\n title: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.node.isRequired,\n noCaret: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool,\n\n // Override generated docs from <Dropdown>.\n /**\n * @private\n */\n children: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.node\n});\n\nvar DropdownButton = function (_React$Component) {\n __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits___default()(DropdownButton, _React$Component);\n\n function DropdownButton() {\n __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck___default()(this, DropdownButton);\n\n return __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.apply(this, arguments));\n }\n\n DropdownButton.prototype.render = function render() {\n var _props = this.props,\n bsSize = _props.bsSize,\n bsStyle = _props.bsStyle,\n title = _props.title,\n children = _props.children,\n props = __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_objectWithoutProperties___default()(_props, [\'bsSize\', \'bsStyle\', \'title\', \'children\']);\n\n var _splitComponentProps = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__utils_splitComponentProps__["a" /* default */])(props, __WEBPACK_IMPORTED_MODULE_7__Dropdown__["a" /* default */].ControlledComponent),\n dropdownProps = _splitComponentProps[0],\n toggleProps = _splitComponentProps[1];\n\n return __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_7__Dropdown__["a" /* default */],\n __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_extends___default()({}, dropdownProps, {\n bsSize: bsSize,\n bsStyle: bsStyle\n }),\n __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_7__Dropdown__["a" /* default */].Toggle,\n __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_extends___default()({}, toggleProps, {\n bsSize: bsSize,\n bsStyle: bsStyle\n }),\n title\n ),\n __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_7__Dropdown__["a" /* default */].Menu,\n null,\n children\n )\n );\n };\n\n return DropdownButton;\n}(__WEBPACK_IMPORTED_MODULE_5_react___default.a.Component);\n\nDropdownButton.propTypes = propTypes;\n\n/* harmony default export */ __webpack_exports__["a"] = (DropdownButton);\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/DropdownButton.js\n// module id = 1259\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/DropdownButton.js?', + ); + + /***/ + }, + /* 1260 */ + /* exports provided: default */ + /* exports used: default */ + /*!**********************************************!*\ + !*** ./~/react-bootstrap/es/DropdownMenu.js ***! + \**********************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ 9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_core_js_array_from__ = __webpack_require__(/*! babel-runtime/core-js/array/from */ 145);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_core_js_array_from___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_core_js_array_from__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_classCallCheck__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_classCallCheck__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ 7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_keycode__ = __webpack_require__(/*! keycode */ 219);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_keycode___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_keycode__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_react_dom__ = __webpack_require__(/*! react-dom */ 16);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_react_dom___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_10_react_dom__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11_react_overlays_lib_RootCloseWrapper__ = __webpack_require__(/*! react-overlays/lib/RootCloseWrapper */ 566);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11_react_overlays_lib_RootCloseWrapper___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_11_react_overlays_lib_RootCloseWrapper__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__utils_bootstrapUtils__ = __webpack_require__(/*! ./utils/bootstrapUtils */ 10);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__utils_createChainedFunction__ = __webpack_require__(/*! ./utils/createChainedFunction */ 28);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__utils_ValidComponentChildren__ = __webpack_require__(/*! ./utils/ValidComponentChildren */ 34);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar propTypes = {\n open: __WEBPACK_IMPORTED_MODULE_9_prop_types___default.a.bool,\n pullRight: __WEBPACK_IMPORTED_MODULE_9_prop_types___default.a.bool,\n onClose: __WEBPACK_IMPORTED_MODULE_9_prop_types___default.a.func,\n labelledBy: __WEBPACK_IMPORTED_MODULE_9_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_9_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_9_prop_types___default.a.number]),\n onSelect: __WEBPACK_IMPORTED_MODULE_9_prop_types___default.a.func,\n rootCloseEvent: __WEBPACK_IMPORTED_MODULE_9_prop_types___default.a.oneOf(['click', 'mousedown'])\n};\n\nvar defaultProps = {\n bsRole: 'menu',\n pullRight: false\n};\n\nvar DropdownMenu = function (_React$Component) {\n __WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits___default()(DropdownMenu, _React$Component);\n\n function DropdownMenu(props) {\n __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_classCallCheck___default()(this, DropdownMenu);\n\n var _this = __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.call(this, props));\n\n _this.handleRootClose = _this.handleRootClose.bind(_this);\n _this.handleKeyDown = _this.handleKeyDown.bind(_this);\n return _this;\n }\n\n DropdownMenu.prototype.handleRootClose = function handleRootClose(event) {\n this.props.onClose(event, { source: 'rootClose' });\n };\n\n DropdownMenu.prototype.handleKeyDown = function handleKeyDown(event) {\n switch (event.keyCode) {\n case __WEBPACK_IMPORTED_MODULE_7_keycode___default.a.codes.down:\n this.focusNext();\n event.preventDefault();\n break;\n case __WEBPACK_IMPORTED_MODULE_7_keycode___default.a.codes.up:\n this.focusPrevious();\n event.preventDefault();\n break;\n case __WEBPACK_IMPORTED_MODULE_7_keycode___default.a.codes.esc:\n case __WEBPACK_IMPORTED_MODULE_7_keycode___default.a.codes.tab:\n this.props.onClose(event, { source: 'keydown' });\n break;\n default:\n }\n };\n\n DropdownMenu.prototype.getItemsAndActiveIndex = function getItemsAndActiveIndex() {\n var items = this.getFocusableMenuItems();\n var activeIndex = items.indexOf(document.activeElement);\n\n return { items: items, activeIndex: activeIndex };\n };\n\n DropdownMenu.prototype.getFocusableMenuItems = function getFocusableMenuItems() {\n var node = __WEBPACK_IMPORTED_MODULE_10_react_dom___default.a.findDOMNode(this);\n if (!node) {\n return [];\n }\n\n return __WEBPACK_IMPORTED_MODULE_2_babel_runtime_core_js_array_from___default()(node.querySelectorAll('[tabIndex=\"-1\"]'));\n };\n\n DropdownMenu.prototype.focusNext = function focusNext() {\n var _getItemsAndActiveInd = this.getItemsAndActiveIndex(),\n items = _getItemsAndActiveInd.items,\n activeIndex = _getItemsAndActiveInd.activeIndex;\n\n if (items.length === 0) {\n return;\n }\n\n var nextIndex = activeIndex === items.length - 1 ? 0 : activeIndex + 1;\n items[nextIndex].focus();\n };\n\n DropdownMenu.prototype.focusPrevious = function focusPrevious() {\n var _getItemsAndActiveInd2 = this.getItemsAndActiveIndex(),\n items = _getItemsAndActiveInd2.items,\n activeIndex = _getItemsAndActiveInd2.activeIndex;\n\n if (items.length === 0) {\n return;\n }\n\n var prevIndex = activeIndex === 0 ? items.length - 1 : activeIndex - 1;\n items[prevIndex].focus();\n };\n\n DropdownMenu.prototype.render = function render() {\n var _extends2,\n _this2 = this;\n\n var _props = this.props,\n open = _props.open,\n pullRight = _props.pullRight,\n labelledBy = _props.labelledBy,\n onSelect = _props.onSelect,\n className = _props.className,\n rootCloseEvent = _props.rootCloseEvent,\n children = _props.children,\n props = __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default()(_props, ['open', 'pullRight', 'labelledBy', 'onSelect', 'className', 'rootCloseEvent', 'children']);\n\n var _splitBsPropsAndOmit = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_12__utils_bootstrapUtils__[\"f\" /* splitBsPropsAndOmit */])(props, ['onClose']),\n bsProps = _splitBsPropsAndOmit[0],\n elementProps = _splitBsPropsAndOmit[1];\n\n var classes = __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_12__utils_bootstrapUtils__[\"b\" /* getClassSet */])(bsProps), (_extends2 = {}, _extends2[__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_12__utils_bootstrapUtils__[\"e\" /* prefix */])(bsProps, 'right')] = pullRight, _extends2));\n\n return __WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_11_react_overlays_lib_RootCloseWrapper___default.a,\n {\n disabled: !open,\n onRootClose: this.handleRootClose,\n event: rootCloseEvent\n },\n __WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement(\n 'ul',\n __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, elementProps, {\n role: 'menu',\n className: __WEBPACK_IMPORTED_MODULE_6_classnames___default()(className, classes),\n 'aria-labelledby': labelledBy\n }),\n __WEBPACK_IMPORTED_MODULE_14__utils_ValidComponentChildren__[\"a\" /* default */].map(children, function (child) {\n return __WEBPACK_IMPORTED_MODULE_8_react___default.a.cloneElement(child, {\n onKeyDown: __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_13__utils_createChainedFunction__[\"a\" /* default */])(child.props.onKeyDown, _this2.handleKeyDown),\n onSelect: __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_13__utils_createChainedFunction__[\"a\" /* default */])(child.props.onSelect, onSelect)\n });\n })\n )\n );\n };\n\n return DropdownMenu;\n}(__WEBPACK_IMPORTED_MODULE_8_react___default.a.Component);\n\nDropdownMenu.propTypes = propTypes;\nDropdownMenu.defaultProps = defaultProps;\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_12__utils_bootstrapUtils__[\"c\" /* bsClass */])('dropdown-menu', DropdownMenu));\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/DropdownMenu.js\n// module id = 1260\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/DropdownMenu.js?", + ); + + /***/ + }, + /* 1261 */ + /* exports provided: default */ + /*!**************************************!*\ + !*** ./~/react-bootstrap/es/Form.js ***! + \**************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ 9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ 7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_react_prop_types_lib_elementType__ = __webpack_require__(/*! react-prop-types/lib/elementType */ 18);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_react_prop_types_lib_elementType___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_react_prop_types_lib_elementType__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__ = __webpack_require__(/*! ./utils/bootstrapUtils */ 10);\n\n\n\n\n\n\n\n\n\n\n\n\nvar propTypes = {\n horizontal: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,\n inline: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,\n componentClass: __WEBPACK_IMPORTED_MODULE_8_react_prop_types_lib_elementType___default.a\n};\n\nvar defaultProps = {\n horizontal: false,\n inline: false,\n componentClass: 'form'\n};\n\nvar Form = function (_React$Component) {\n __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default()(Form, _React$Component);\n\n function Form() {\n __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default()(this, Form);\n\n return __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.apply(this, arguments));\n }\n\n Form.prototype.render = function render() {\n var _props = this.props,\n horizontal = _props.horizontal,\n inline = _props.inline,\n Component = _props.componentClass,\n className = _props.className,\n props = __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default()(_props, ['horizontal', 'inline', 'componentClass', 'className']);\n\n var _splitBsProps = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__[\"a\" /* splitBsProps */])(props),\n bsProps = _splitBsProps[0],\n elementProps = _splitBsProps[1];\n\n var classes = [];\n if (horizontal) {\n classes.push(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__[\"e\" /* prefix */])(bsProps, 'horizontal'));\n }\n if (inline) {\n classes.push(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__[\"e\" /* prefix */])(bsProps, 'inline'));\n }\n\n return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(Component, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, elementProps, {\n className: __WEBPACK_IMPORTED_MODULE_5_classnames___default()(className, classes)\n }));\n };\n\n return Form;\n}(__WEBPACK_IMPORTED_MODULE_6_react___default.a.Component);\n\nForm.propTypes = propTypes;\nForm.defaultProps = defaultProps;\n\n/* unused harmony default export */ var _unused_webpack_default_export = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__[\"c\" /* bsClass */])('form', Form));\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/Form.js\n// module id = 1261\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/Form.js?", + ); + + /***/ + }, + /* 1262 */ + /* exports provided: default */ + /*!*********************************************!*\ + !*** ./~/react-bootstrap/es/FormControl.js ***! + \*********************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ 9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ 7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_react_prop_types_lib_elementType__ = __webpack_require__(/*! react-prop-types/lib/elementType */ 18);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_react_prop_types_lib_elementType___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_react_prop_types_lib_elementType__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_warning__ = __webpack_require__(/*! warning */ 23);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_warning__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__FormControlFeedback__ = __webpack_require__(/*! ./FormControlFeedback */ 1263);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__FormControlStatic__ = __webpack_require__(/*! ./FormControlStatic */ 1264);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__utils_bootstrapUtils__ = __webpack_require__(/*! ./utils/bootstrapUtils */ 10);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__utils_StyleConfig__ = __webpack_require__(/*! ./utils/StyleConfig */ 32);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar propTypes = {\n componentClass: __WEBPACK_IMPORTED_MODULE_8_react_prop_types_lib_elementType___default.a,\n /**\n * Only relevant if `componentClass` is `'input'`.\n */\n type: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string,\n /**\n * Uses `controlId` from `<FormGroup>` if not explicitly specified.\n */\n id: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string,\n /**\n * Attaches a ref to the `<input>` element. Only functions can be used here.\n *\n * ```js\n * <FormControl inputRef={ref => { this.input = ref; }} />\n * ```\n */\n inputRef: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func\n};\n\nvar defaultProps = {\n componentClass: 'input'\n};\n\nvar contextTypes = {\n $bs_formGroup: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.object\n};\n\nvar FormControl = function (_React$Component) {\n __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default()(FormControl, _React$Component);\n\n function FormControl() {\n __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default()(this, FormControl);\n\n return __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.apply(this, arguments));\n }\n\n FormControl.prototype.render = function render() {\n var formGroup = this.context.$bs_formGroup;\n var controlId = formGroup && formGroup.controlId;\n\n var _props = this.props,\n Component = _props.componentClass,\n type = _props.type,\n _props$id = _props.id,\n id = _props$id === undefined ? controlId : _props$id,\n inputRef = _props.inputRef,\n className = _props.className,\n bsSize = _props.bsSize,\n props = __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default()(_props, ['componentClass', 'type', 'id', 'inputRef', 'className', 'bsSize']);\n\n var _splitBsProps = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_12__utils_bootstrapUtils__[\"a\" /* splitBsProps */])(props),\n bsProps = _splitBsProps[0],\n elementProps = _splitBsProps[1];\n\n true ? __WEBPACK_IMPORTED_MODULE_9_warning___default()(controlId == null || id === controlId, '`controlId` is ignored on `<FormControl>` when `id` is specified.') : void 0;\n\n // input[type=\"file\"] should not have .form-control.\n var classes = void 0;\n if (type !== 'file') {\n classes = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_12__utils_bootstrapUtils__[\"b\" /* getClassSet */])(bsProps);\n }\n\n // If user provides a size, make sure to append it to classes as input-\n // e.g. if bsSize is small, it will append input-sm\n if (bsSize) {\n var size = __WEBPACK_IMPORTED_MODULE_13__utils_StyleConfig__[\"a\" /* SIZE_MAP */][bsSize] || bsSize;\n classes[__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_12__utils_bootstrapUtils__[\"e\" /* prefix */])({ bsClass: 'input' }, size)] = true;\n }\n\n return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(Component, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, elementProps, {\n type: type,\n id: id,\n ref: inputRef,\n className: __WEBPACK_IMPORTED_MODULE_5_classnames___default()(className, classes)\n }));\n };\n\n return FormControl;\n}(__WEBPACK_IMPORTED_MODULE_6_react___default.a.Component);\n\nFormControl.propTypes = propTypes;\nFormControl.defaultProps = defaultProps;\nFormControl.contextTypes = contextTypes;\n\nFormControl.Feedback = __WEBPACK_IMPORTED_MODULE_10__FormControlFeedback__[\"a\" /* default */];\nFormControl.Static = __WEBPACK_IMPORTED_MODULE_11__FormControlStatic__[\"a\" /* default */];\n\n/* unused harmony default export */ var _unused_webpack_default_export = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_12__utils_bootstrapUtils__[\"c\" /* bsClass */])('form-control', __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_12__utils_bootstrapUtils__[\"d\" /* bsSizes */])([__WEBPACK_IMPORTED_MODULE_13__utils_StyleConfig__[\"b\" /* Size */].SMALL, __WEBPACK_IMPORTED_MODULE_13__utils_StyleConfig__[\"b\" /* Size */].LARGE], FormControl)));\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/FormControl.js\n// module id = 1262\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/FormControl.js?", + ); + + /***/ + }, + /* 1263 */ + /* exports provided: default */ + /* exports used: default */ + /*!*****************************************************!*\ + !*** ./~/react-bootstrap/es/FormControlFeedback.js ***! + \*****************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ 9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_objectWithoutProperties__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends__ = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ 7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__Glyphicon__ = __webpack_require__(/*! ./Glyphicon */ 237);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__ = __webpack_require__(/*! ./utils/bootstrapUtils */ 10);\n\n\n\n\n\n\n\n\n\n\n\n\nvar defaultProps = {\n bsRole: 'feedback'\n};\n\nvar contextTypes = {\n $bs_formGroup: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.object\n};\n\nvar FormControlFeedback = function (_React$Component) {\n __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default()(FormControlFeedback, _React$Component);\n\n function FormControlFeedback() {\n __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default()(this, FormControlFeedback);\n\n return __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.apply(this, arguments));\n }\n\n FormControlFeedback.prototype.getGlyph = function getGlyph(validationState) {\n switch (validationState) {\n case 'success':\n return 'ok';\n case 'warning':\n return 'warning-sign';\n case 'error':\n return 'remove';\n default:\n return null;\n }\n };\n\n FormControlFeedback.prototype.renderDefaultFeedback = function renderDefaultFeedback(formGroup, className, classes, elementProps) {\n var glyph = this.getGlyph(formGroup && formGroup.validationState);\n if (!glyph) {\n return null;\n }\n\n return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_8__Glyphicon__[\"a\" /* default */], __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends___default()({}, elementProps, {\n glyph: glyph,\n className: __WEBPACK_IMPORTED_MODULE_5_classnames___default()(className, classes)\n }));\n };\n\n FormControlFeedback.prototype.render = function render() {\n var _props = this.props,\n className = _props.className,\n children = _props.children,\n props = __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_objectWithoutProperties___default()(_props, ['className', 'children']);\n\n var _splitBsProps = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__[\"a\" /* splitBsProps */])(props),\n bsProps = _splitBsProps[0],\n elementProps = _splitBsProps[1];\n\n var classes = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__[\"b\" /* getClassSet */])(bsProps);\n\n if (!children) {\n return this.renderDefaultFeedback(this.context.$bs_formGroup, className, classes, elementProps);\n }\n\n var child = __WEBPACK_IMPORTED_MODULE_6_react___default.a.Children.only(children);\n return __WEBPACK_IMPORTED_MODULE_6_react___default.a.cloneElement(child, __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends___default()({}, elementProps, {\n className: __WEBPACK_IMPORTED_MODULE_5_classnames___default()(child.props.className, className, classes)\n }));\n };\n\n return FormControlFeedback;\n}(__WEBPACK_IMPORTED_MODULE_6_react___default.a.Component);\n\nFormControlFeedback.defaultProps = defaultProps;\nFormControlFeedback.contextTypes = contextTypes;\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__[\"c\" /* bsClass */])('form-control-feedback', FormControlFeedback));\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/FormControlFeedback.js\n// module id = 1263\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/FormControlFeedback.js?", + ); + + /***/ + }, + /* 1264 */ + /* exports provided: default */ + /* exports used: default */ + /*!***************************************************!*\ + !*** ./~/react-bootstrap/es/FormControlStatic.js ***! + \***************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ 9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ 7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react_prop_types_lib_elementType__ = __webpack_require__(/*! react-prop-types/lib/elementType */ 18);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react_prop_types_lib_elementType___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_react_prop_types_lib_elementType__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__ = __webpack_require__(/*! ./utils/bootstrapUtils */ 10);\n\n\n\n\n\n\n\n\n\n\n\nvar propTypes = {\n componentClass: __WEBPACK_IMPORTED_MODULE_7_react_prop_types_lib_elementType___default.a\n};\n\nvar defaultProps = {\n componentClass: \'p\'\n};\n\nvar FormControlStatic = function (_React$Component) {\n __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default()(FormControlStatic, _React$Component);\n\n function FormControlStatic() {\n __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default()(this, FormControlStatic);\n\n return __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.apply(this, arguments));\n }\n\n FormControlStatic.prototype.render = function render() {\n var _props = this.props,\n Component = _props.componentClass,\n className = _props.className,\n props = __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default()(_props, [\'componentClass\', \'className\']);\n\n var _splitBsProps = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__["a" /* splitBsProps */])(props),\n bsProps = _splitBsProps[0],\n elementProps = _splitBsProps[1];\n\n var classes = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__["b" /* getClassSet */])(bsProps);\n\n return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(Component, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, elementProps, {\n className: __WEBPACK_IMPORTED_MODULE_5_classnames___default()(className, classes)\n }));\n };\n\n return FormControlStatic;\n}(__WEBPACK_IMPORTED_MODULE_6_react___default.a.Component);\n\nFormControlStatic.propTypes = propTypes;\nFormControlStatic.defaultProps = defaultProps;\n\n/* harmony default export */ __webpack_exports__["a"] = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__["c" /* bsClass */])(\'form-control-static\', FormControlStatic));\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/FormControlStatic.js\n// module id = 1264\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/FormControlStatic.js?', + ); + + /***/ + }, + /* 1265 */ + /* exports provided: default */ + /*!*******************************************!*\ + !*** ./~/react-bootstrap/es/FormGroup.js ***! + \*******************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ 9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ 7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__ = __webpack_require__(/*! ./utils/bootstrapUtils */ 10);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__utils_StyleConfig__ = __webpack_require__(/*! ./utils/StyleConfig */ 32);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__utils_ValidComponentChildren__ = __webpack_require__(/*! ./utils/ValidComponentChildren */ 34);\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar propTypes = {\n /**\n * Sets `id` on `<FormControl>` and `htmlFor` on `<FormGroup.Label>`.\n */\n controlId: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string,\n validationState: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.oneOf(['success', 'warning', 'error', null])\n};\n\nvar childContextTypes = {\n $bs_formGroup: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.object.isRequired\n};\n\nvar FormGroup = function (_React$Component) {\n __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default()(FormGroup, _React$Component);\n\n function FormGroup() {\n __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default()(this, FormGroup);\n\n return __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.apply(this, arguments));\n }\n\n FormGroup.prototype.getChildContext = function getChildContext() {\n var _props = this.props,\n controlId = _props.controlId,\n validationState = _props.validationState;\n\n\n return {\n $bs_formGroup: {\n controlId: controlId,\n validationState: validationState\n }\n };\n };\n\n FormGroup.prototype.hasFeedback = function hasFeedback(children) {\n var _this2 = this;\n\n return __WEBPACK_IMPORTED_MODULE_10__utils_ValidComponentChildren__[\"a\" /* default */].some(children, function (child) {\n return child.props.bsRole === 'feedback' || child.props.children && _this2.hasFeedback(child.props.children);\n });\n };\n\n FormGroup.prototype.render = function render() {\n var _props2 = this.props,\n validationState = _props2.validationState,\n className = _props2.className,\n children = _props2.children,\n props = __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default()(_props2, ['validationState', 'className', 'children']);\n\n var _splitBsPropsAndOmit = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__[\"f\" /* splitBsPropsAndOmit */])(props, ['controlId']),\n bsProps = _splitBsPropsAndOmit[0],\n elementProps = _splitBsPropsAndOmit[1];\n\n var classes = __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__[\"b\" /* getClassSet */])(bsProps), {\n 'has-feedback': this.hasFeedback(children)\n });\n if (validationState) {\n classes['has-' + validationState] = true;\n }\n\n return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(\n 'div',\n __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, elementProps, {\n className: __WEBPACK_IMPORTED_MODULE_5_classnames___default()(className, classes)\n }),\n children\n );\n };\n\n return FormGroup;\n}(__WEBPACK_IMPORTED_MODULE_6_react___default.a.Component);\n\nFormGroup.propTypes = propTypes;\nFormGroup.childContextTypes = childContextTypes;\n\n/* unused harmony default export */ var _unused_webpack_default_export = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__[\"c\" /* bsClass */])('form-group', __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__[\"d\" /* bsSizes */])([__WEBPACK_IMPORTED_MODULE_9__utils_StyleConfig__[\"b\" /* Size */].LARGE, __WEBPACK_IMPORTED_MODULE_9__utils_StyleConfig__[\"b\" /* Size */].SMALL], FormGroup)));\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/FormGroup.js\n// module id = 1265\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/FormGroup.js?", + ); + + /***/ + }, + /* 1266 */ + /* exports provided: default */ + /*!*******************************************!*\ + !*** ./~/react-bootstrap/es/HelpBlock.js ***! + \*******************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ 9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ 7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__ = __webpack_require__(/*! ./utils/bootstrapUtils */ 10);\n\n\n\n\n\n\n\n\n\n\nvar HelpBlock = function (_React$Component) {\n __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default()(HelpBlock, _React$Component);\n\n function HelpBlock() {\n __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default()(this, HelpBlock);\n\n return __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.apply(this, arguments));\n }\n\n HelpBlock.prototype.render = function render() {\n var _props = this.props,\n className = _props.className,\n props = __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default()(_props, [\'className\']);\n\n var _splitBsProps = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__["a" /* splitBsProps */])(props),\n bsProps = _splitBsProps[0],\n elementProps = _splitBsProps[1];\n\n var classes = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__["b" /* getClassSet */])(bsProps);\n\n return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(\'span\', __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, elementProps, {\n className: __WEBPACK_IMPORTED_MODULE_5_classnames___default()(className, classes)\n }));\n };\n\n return HelpBlock;\n}(__WEBPACK_IMPORTED_MODULE_6_react___default.a.Component);\n\n/* unused harmony default export */ var _unused_webpack_default_export = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__["c" /* bsClass */])(\'help-block\', HelpBlock));\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/HelpBlock.js\n// module id = 1266\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/HelpBlock.js?', + ); + + /***/ + }, + /* 1267 */ + /* exports provided: default */ + /*!***************************************!*\ + !*** ./~/react-bootstrap/es/Image.js ***! + \***************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ 9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ 7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__ = __webpack_require__(/*! ./utils/bootstrapUtils */ 10);\n\n\n\n\n\n\n\n\n\n\n\nvar propTypes = {\n /**\n * Sets image as responsive image\n */\n responsive: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,\n\n /**\n * Sets image shape as rounded\n */\n rounded: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,\n\n /**\n * Sets image shape as circle\n */\n circle: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,\n\n /**\n * Sets image shape as thumbnail\n */\n thumbnail: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool\n};\n\nvar defaultProps = {\n responsive: false,\n rounded: false,\n circle: false,\n thumbnail: false\n};\n\nvar Image = function (_React$Component) {\n __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default()(Image, _React$Component);\n\n function Image() {\n __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default()(this, Image);\n\n return __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.apply(this, arguments));\n }\n\n Image.prototype.render = function render() {\n var _classes;\n\n var _props = this.props,\n responsive = _props.responsive,\n rounded = _props.rounded,\n circle = _props.circle,\n thumbnail = _props.thumbnail,\n className = _props.className,\n props = __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default()(_props, ['responsive', 'rounded', 'circle', 'thumbnail', 'className']);\n\n var _splitBsProps = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__[\"a\" /* splitBsProps */])(props),\n bsProps = _splitBsProps[0],\n elementProps = _splitBsProps[1];\n\n var classes = (_classes = {}, _classes[__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__[\"e\" /* prefix */])(bsProps, 'responsive')] = responsive, _classes[__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__[\"e\" /* prefix */])(bsProps, 'rounded')] = rounded, _classes[__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__[\"e\" /* prefix */])(bsProps, 'circle')] = circle, _classes[__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__[\"e\" /* prefix */])(bsProps, 'thumbnail')] = thumbnail, _classes);\n\n return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('img', __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, elementProps, {\n className: __WEBPACK_IMPORTED_MODULE_5_classnames___default()(className, classes)\n }));\n };\n\n return Image;\n}(__WEBPACK_IMPORTED_MODULE_6_react___default.a.Component);\n\nImage.propTypes = propTypes;\nImage.defaultProps = defaultProps;\n\n/* unused harmony default export */ var _unused_webpack_default_export = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__[\"c\" /* bsClass */])('img', Image));\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/Image.js\n// module id = 1267\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/Image.js?", + ); + + /***/ + }, + /* 1268 */ + /* exports provided: default */ + /*!********************************************!*\ + !*** ./~/react-bootstrap/es/InputGroup.js ***! + \********************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ 9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ 7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__InputGroupAddon__ = __webpack_require__(/*! ./InputGroupAddon */ 1269);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__InputGroupButton__ = __webpack_require__(/*! ./InputGroupButton */ 1270);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__ = __webpack_require__(/*! ./utils/bootstrapUtils */ 10);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__utils_StyleConfig__ = __webpack_require__(/*! ./utils/StyleConfig */ 32);\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar InputGroup = function (_React$Component) {\n __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default()(InputGroup, _React$Component);\n\n function InputGroup() {\n __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default()(this, InputGroup);\n\n return __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.apply(this, arguments));\n }\n\n InputGroup.prototype.render = function render() {\n var _props = this.props,\n className = _props.className,\n props = __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default()(_props, [\'className\']);\n\n var _splitBsProps = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__["a" /* splitBsProps */])(props),\n bsProps = _splitBsProps[0],\n elementProps = _splitBsProps[1];\n\n var classes = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__["b" /* getClassSet */])(bsProps);\n\n return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(\'span\', __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, elementProps, {\n className: __WEBPACK_IMPORTED_MODULE_5_classnames___default()(className, classes)\n }));\n };\n\n return InputGroup;\n}(__WEBPACK_IMPORTED_MODULE_6_react___default.a.Component);\n\nInputGroup.Addon = __WEBPACK_IMPORTED_MODULE_7__InputGroupAddon__["a" /* default */];\nInputGroup.Button = __WEBPACK_IMPORTED_MODULE_8__InputGroupButton__["a" /* default */];\n\n/* unused harmony default export */ var _unused_webpack_default_export = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__["c" /* bsClass */])(\'input-group\', __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__["d" /* bsSizes */])([__WEBPACK_IMPORTED_MODULE_10__utils_StyleConfig__["b" /* Size */].LARGE, __WEBPACK_IMPORTED_MODULE_10__utils_StyleConfig__["b" /* Size */].SMALL], InputGroup)));\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/InputGroup.js\n// module id = 1268\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/InputGroup.js?', + ); + + /***/ + }, + /* 1269 */ + /* exports provided: default */ + /* exports used: default */ + /*!*************************************************!*\ + !*** ./~/react-bootstrap/es/InputGroupAddon.js ***! + \*************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ 9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ 7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__ = __webpack_require__(/*! ./utils/bootstrapUtils */ 10);\n\n\n\n\n\n\n\n\n\n\nvar InputGroupAddon = function (_React$Component) {\n __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default()(InputGroupAddon, _React$Component);\n\n function InputGroupAddon() {\n __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default()(this, InputGroupAddon);\n\n return __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.apply(this, arguments));\n }\n\n InputGroupAddon.prototype.render = function render() {\n var _props = this.props,\n className = _props.className,\n props = __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default()(_props, [\'className\']);\n\n var _splitBsProps = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__["a" /* splitBsProps */])(props),\n bsProps = _splitBsProps[0],\n elementProps = _splitBsProps[1];\n\n var classes = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__["b" /* getClassSet */])(bsProps);\n\n return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(\'span\', __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, elementProps, {\n className: __WEBPACK_IMPORTED_MODULE_5_classnames___default()(className, classes)\n }));\n };\n\n return InputGroupAddon;\n}(__WEBPACK_IMPORTED_MODULE_6_react___default.a.Component);\n\n/* harmony default export */ __webpack_exports__["a"] = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__["c" /* bsClass */])(\'input-group-addon\', InputGroupAddon));\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/InputGroupAddon.js\n// module id = 1269\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/InputGroupAddon.js?', + ); + + /***/ + }, + /* 1270 */ + /* exports provided: default */ + /* exports used: default */ + /*!**************************************************!*\ + !*** ./~/react-bootstrap/es/InputGroupButton.js ***! + \**************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ 9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ 7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__ = __webpack_require__(/*! ./utils/bootstrapUtils */ 10);\n\n\n\n\n\n\n\n\n\n\nvar InputGroupButton = function (_React$Component) {\n __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default()(InputGroupButton, _React$Component);\n\n function InputGroupButton() {\n __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default()(this, InputGroupButton);\n\n return __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.apply(this, arguments));\n }\n\n InputGroupButton.prototype.render = function render() {\n var _props = this.props,\n className = _props.className,\n props = __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default()(_props, [\'className\']);\n\n var _splitBsProps = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__["a" /* splitBsProps */])(props),\n bsProps = _splitBsProps[0],\n elementProps = _splitBsProps[1];\n\n var classes = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__["b" /* getClassSet */])(bsProps);\n\n return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(\'span\', __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, elementProps, {\n className: __WEBPACK_IMPORTED_MODULE_5_classnames___default()(className, classes)\n }));\n };\n\n return InputGroupButton;\n}(__WEBPACK_IMPORTED_MODULE_6_react___default.a.Component);\n\n/* harmony default export */ __webpack_exports__["a"] = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__["c" /* bsClass */])(\'input-group-btn\', InputGroupButton));\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/InputGroupButton.js\n// module id = 1270\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/InputGroupButton.js?', + ); + + /***/ + }, + /* 1271 */ + /* exports provided: default */ + /*!*******************************************!*\ + !*** ./~/react-bootstrap/es/Jumbotron.js ***! + \*******************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ 9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ 7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react_prop_types_lib_elementType__ = __webpack_require__(/*! react-prop-types/lib/elementType */ 18);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react_prop_types_lib_elementType___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_react_prop_types_lib_elementType__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__ = __webpack_require__(/*! ./utils/bootstrapUtils */ 10);\n\n\n\n\n\n\n\n\n\n\n\nvar propTypes = {\n componentClass: __WEBPACK_IMPORTED_MODULE_7_react_prop_types_lib_elementType___default.a\n};\n\nvar defaultProps = {\n componentClass: 'div'\n};\n\nvar Jumbotron = function (_React$Component) {\n __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default()(Jumbotron, _React$Component);\n\n function Jumbotron() {\n __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default()(this, Jumbotron);\n\n return __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.apply(this, arguments));\n }\n\n Jumbotron.prototype.render = function render() {\n var _props = this.props,\n Component = _props.componentClass,\n className = _props.className,\n props = __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default()(_props, ['componentClass', 'className']);\n\n var _splitBsProps = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__[\"a\" /* splitBsProps */])(props),\n bsProps = _splitBsProps[0],\n elementProps = _splitBsProps[1];\n\n var classes = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__[\"b\" /* getClassSet */])(bsProps);\n\n return __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(Component, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, elementProps, {\n className: __WEBPACK_IMPORTED_MODULE_6_classnames___default()(className, classes)\n }));\n };\n\n return Jumbotron;\n}(__WEBPACK_IMPORTED_MODULE_5_react___default.a.Component);\n\nJumbotron.propTypes = propTypes;\nJumbotron.defaultProps = defaultProps;\n\n/* unused harmony default export */ var _unused_webpack_default_export = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__[\"c\" /* bsClass */])('jumbotron', Jumbotron));\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/Jumbotron.js\n// module id = 1271\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/Jumbotron.js?", + ); + + /***/ + }, + /* 1272 */ + /* exports provided: default */ + /*!***************************************!*\ + !*** ./~/react-bootstrap/es/Label.js ***! + \***************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_object_values__ = __webpack_require__(/*! babel-runtime/core-js/object/values */ 92);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_object_values___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_object_values__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends__ = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ 9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_objectWithoutProperties__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_classCallCheck__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_classCallCheck__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ 7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__ = __webpack_require__(/*! ./utils/bootstrapUtils */ 10);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__utils_StyleConfig__ = __webpack_require__(/*! ./utils/StyleConfig */ 32);\n\n\n\n\n\n\n\n\n\n\n\n\nvar Label = function (_React$Component) {\n __WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits___default()(Label, _React$Component);\n\n function Label() {\n __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_classCallCheck___default()(this, Label);\n\n return __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.apply(this, arguments));\n }\n\n Label.prototype.hasContent = function hasContent(children) {\n var result = false;\n\n __WEBPACK_IMPORTED_MODULE_7_react___default.a.Children.forEach(children, function (child) {\n if (result) {\n return;\n }\n\n if (child || child === 0) {\n result = true;\n }\n });\n\n return result;\n };\n\n Label.prototype.render = function render() {\n var _props = this.props,\n className = _props.className,\n children = _props.children,\n props = __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_objectWithoutProperties___default()(_props, [\'className\', \'children\']);\n\n var _splitBsProps = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__["a" /* splitBsProps */])(props),\n bsProps = _splitBsProps[0],\n elementProps = _splitBsProps[1];\n\n var classes = __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends___default()({}, __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__["b" /* getClassSet */])(bsProps), {\n\n // Hack for collapsing on IE8.\n hidden: !this.hasContent(children)\n });\n\n return __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement(\n \'span\',\n __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends___default()({}, elementProps, {\n className: __WEBPACK_IMPORTED_MODULE_6_classnames___default()(className, classes)\n }),\n children\n );\n };\n\n return Label;\n}(__WEBPACK_IMPORTED_MODULE_7_react___default.a.Component);\n\n/* unused harmony default export */ var _unused_webpack_default_export = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__["c" /* bsClass */])(\'label\', __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__["g" /* bsStyles */])([].concat(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_object_values___default()(__WEBPACK_IMPORTED_MODULE_9__utils_StyleConfig__["c" /* State */]), [__WEBPACK_IMPORTED_MODULE_9__utils_StyleConfig__["d" /* Style */].DEFAULT, __WEBPACK_IMPORTED_MODULE_9__utils_StyleConfig__["d" /* Style */].PRIMARY]), __WEBPACK_IMPORTED_MODULE_9__utils_StyleConfig__["d" /* Style */].DEFAULT, Label)));\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/Label.js\n// module id = 1272\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/Label.js?', + ); + + /***/ + }, + /* 1273 */ + /* exports provided: default */ + /*!*******************************************!*\ + !*** ./~/react-bootstrap/es/ListGroup.js ***! + \*******************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ 9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ 7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react_prop_types_lib_elementType__ = __webpack_require__(/*! react-prop-types/lib/elementType */ 18);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react_prop_types_lib_elementType___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_react_prop_types_lib_elementType__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__ListGroupItem__ = __webpack_require__(/*! ./ListGroupItem */ 499);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__ = __webpack_require__(/*! ./utils/bootstrapUtils */ 10);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__utils_ValidComponentChildren__ = __webpack_require__(/*! ./utils/ValidComponentChildren */ 34);\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar propTypes = {\n /**\n * You can use a custom element type for this component.\n *\n * If not specified, it will be treated as `'li'` if every child is a\n * non-actionable `<ListGroupItem>`, and `'div'` otherwise.\n */\n componentClass: __WEBPACK_IMPORTED_MODULE_7_react_prop_types_lib_elementType___default.a\n};\n\nfunction getDefaultComponent(children) {\n if (!children) {\n // FIXME: This is the old behavior. Is this right?\n return 'div';\n }\n\n if (__WEBPACK_IMPORTED_MODULE_10__utils_ValidComponentChildren__[\"a\" /* default */].some(children, function (child) {\n return child.type !== __WEBPACK_IMPORTED_MODULE_8__ListGroupItem__[\"a\" /* default */] || child.props.href || child.props.onClick;\n })) {\n return 'div';\n }\n\n return 'ul';\n}\n\nvar ListGroup = function (_React$Component) {\n __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default()(ListGroup, _React$Component);\n\n function ListGroup() {\n __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default()(this, ListGroup);\n\n return __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.apply(this, arguments));\n }\n\n ListGroup.prototype.render = function render() {\n var _props = this.props,\n children = _props.children,\n _props$componentClass = _props.componentClass,\n Component = _props$componentClass === undefined ? getDefaultComponent(children) : _props$componentClass,\n className = _props.className,\n props = __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default()(_props, ['children', 'componentClass', 'className']);\n\n var _splitBsProps = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__[\"a\" /* splitBsProps */])(props),\n bsProps = _splitBsProps[0],\n elementProps = _splitBsProps[1];\n\n var classes = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__[\"b\" /* getClassSet */])(bsProps);\n\n var useListItem = Component === 'ul' && __WEBPACK_IMPORTED_MODULE_10__utils_ValidComponentChildren__[\"a\" /* default */].every(children, function (child) {\n return child.type === __WEBPACK_IMPORTED_MODULE_8__ListGroupItem__[\"a\" /* default */];\n });\n\n return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(\n Component,\n __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, elementProps, {\n className: __WEBPACK_IMPORTED_MODULE_5_classnames___default()(className, classes)\n }),\n useListItem ? __WEBPACK_IMPORTED_MODULE_10__utils_ValidComponentChildren__[\"a\" /* default */].map(children, function (child) {\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6_react__[\"cloneElement\"])(child, { listItem: true });\n }) : children\n );\n };\n\n return ListGroup;\n}(__WEBPACK_IMPORTED_MODULE_6_react___default.a.Component);\n\nListGroup.propTypes = propTypes;\n\n/* unused harmony default export */ var _unused_webpack_default_export = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__[\"c\" /* bsClass */])('list-group', ListGroup));\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/ListGroup.js\n// module id = 1273\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/ListGroup.js?", + ); + + /***/ + }, + /* 1274 */ + /* exports provided: default */ + /* exports used: default */ + /*!*******************************************!*\ + !*** ./~/react-bootstrap/es/MediaBody.js ***! + \*******************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ 9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ 7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react_prop_types_lib_elementType__ = __webpack_require__(/*! react-prop-types/lib/elementType */ 18);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react_prop_types_lib_elementType___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_react_prop_types_lib_elementType__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__ = __webpack_require__(/*! ./utils/bootstrapUtils */ 10);\n\n\n\n\n\n\n\n\n\n\n\nvar propTypes = {\n componentClass: __WEBPACK_IMPORTED_MODULE_7_react_prop_types_lib_elementType___default.a\n};\n\nvar defaultProps = {\n componentClass: \'div\'\n};\n\nvar MediaBody = function (_React$Component) {\n __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default()(MediaBody, _React$Component);\n\n function MediaBody() {\n __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default()(this, MediaBody);\n\n return __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.apply(this, arguments));\n }\n\n MediaBody.prototype.render = function render() {\n var _props = this.props,\n Component = _props.componentClass,\n className = _props.className,\n props = __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default()(_props, [\'componentClass\', \'className\']);\n\n var _splitBsProps = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__["a" /* splitBsProps */])(props),\n bsProps = _splitBsProps[0],\n elementProps = _splitBsProps[1];\n\n var classes = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__["b" /* getClassSet */])(bsProps);\n\n return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(Component, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, elementProps, {\n className: __WEBPACK_IMPORTED_MODULE_5_classnames___default()(className, classes)\n }));\n };\n\n return MediaBody;\n}(__WEBPACK_IMPORTED_MODULE_6_react___default.a.Component);\n\nMediaBody.propTypes = propTypes;\nMediaBody.defaultProps = defaultProps;\n\n/* harmony default export */ __webpack_exports__["a"] = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__["c" /* bsClass */])(\'media-body\', MediaBody));\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/MediaBody.js\n// module id = 1274\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/MediaBody.js?', + ); + + /***/ + }, + /* 1275 */ + /* exports provided: default */ + /* exports used: default */ + /*!**********************************************!*\ + !*** ./~/react-bootstrap/es/MediaHeading.js ***! + \**********************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ 9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ 7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react_prop_types_lib_elementType__ = __webpack_require__(/*! react-prop-types/lib/elementType */ 18);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react_prop_types_lib_elementType___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_react_prop_types_lib_elementType__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__ = __webpack_require__(/*! ./utils/bootstrapUtils */ 10);\n\n\n\n\n\n\n\n\n\n\n\nvar propTypes = {\n componentClass: __WEBPACK_IMPORTED_MODULE_7_react_prop_types_lib_elementType___default.a\n};\n\nvar defaultProps = {\n componentClass: \'h4\'\n};\n\nvar MediaHeading = function (_React$Component) {\n __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default()(MediaHeading, _React$Component);\n\n function MediaHeading() {\n __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default()(this, MediaHeading);\n\n return __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.apply(this, arguments));\n }\n\n MediaHeading.prototype.render = function render() {\n var _props = this.props,\n Component = _props.componentClass,\n className = _props.className,\n props = __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default()(_props, [\'componentClass\', \'className\']);\n\n var _splitBsProps = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__["a" /* splitBsProps */])(props),\n bsProps = _splitBsProps[0],\n elementProps = _splitBsProps[1];\n\n var classes = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__["b" /* getClassSet */])(bsProps);\n\n return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(Component, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, elementProps, {\n className: __WEBPACK_IMPORTED_MODULE_5_classnames___default()(className, classes)\n }));\n };\n\n return MediaHeading;\n}(__WEBPACK_IMPORTED_MODULE_6_react___default.a.Component);\n\nMediaHeading.propTypes = propTypes;\nMediaHeading.defaultProps = defaultProps;\n\n/* harmony default export */ __webpack_exports__["a"] = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__["c" /* bsClass */])(\'media-heading\', MediaHeading));\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/MediaHeading.js\n// module id = 1275\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/MediaHeading.js?', + ); + + /***/ + }, + /* 1276 */ + /* exports provided: default */ + /* exports used: default */ + /*!*******************************************!*\ + !*** ./~/react-bootstrap/es/MediaLeft.js ***! + \*******************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ 9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ 7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__Media__ = __webpack_require__(/*! ./Media */ 238);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__ = __webpack_require__(/*! ./utils/bootstrapUtils */ 10);\n\n\n\n\n\n\n\n\n\n\n\n\nvar propTypes = {\n /**\n * Align the media to the top, middle, or bottom of the media object.\n */\n align: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.oneOf(['top', 'middle', 'bottom'])\n};\n\nvar MediaLeft = function (_React$Component) {\n __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default()(MediaLeft, _React$Component);\n\n function MediaLeft() {\n __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default()(this, MediaLeft);\n\n return __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.apply(this, arguments));\n }\n\n MediaLeft.prototype.render = function render() {\n var _props = this.props,\n align = _props.align,\n className = _props.className,\n props = __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default()(_props, ['align', 'className']);\n\n var _splitBsProps = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__[\"a\" /* splitBsProps */])(props),\n bsProps = _splitBsProps[0],\n elementProps = _splitBsProps[1];\n\n var classes = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__[\"b\" /* getClassSet */])(bsProps);\n\n if (align) {\n // The class is e.g. `media-top`, not `media-left-top`.\n classes[__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__[\"e\" /* prefix */])(__WEBPACK_IMPORTED_MODULE_8__Media__[\"a\" /* default */].defaultProps, align)] = true;\n }\n\n return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('div', __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, elementProps, {\n className: __WEBPACK_IMPORTED_MODULE_5_classnames___default()(className, classes)\n }));\n };\n\n return MediaLeft;\n}(__WEBPACK_IMPORTED_MODULE_6_react___default.a.Component);\n\nMediaLeft.propTypes = propTypes;\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__[\"c\" /* bsClass */])('media-left', MediaLeft));\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/MediaLeft.js\n// module id = 1276\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/MediaLeft.js?", + ); + + /***/ + }, + /* 1277 */ + /* exports provided: default */ + /* exports used: default */ + /*!*******************************************!*\ + !*** ./~/react-bootstrap/es/MediaList.js ***! + \*******************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ 9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ 7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__ = __webpack_require__(/*! ./utils/bootstrapUtils */ 10);\n\n\n\n\n\n\n\n\n\n\nvar MediaList = function (_React$Component) {\n __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default()(MediaList, _React$Component);\n\n function MediaList() {\n __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default()(this, MediaList);\n\n return __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.apply(this, arguments));\n }\n\n MediaList.prototype.render = function render() {\n var _props = this.props,\n className = _props.className,\n props = __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default()(_props, [\'className\']);\n\n var _splitBsProps = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__["a" /* splitBsProps */])(props),\n bsProps = _splitBsProps[0],\n elementProps = _splitBsProps[1];\n\n var classes = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__["b" /* getClassSet */])(bsProps);\n\n return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(\'ul\', __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, elementProps, {\n className: __WEBPACK_IMPORTED_MODULE_5_classnames___default()(className, classes)\n }));\n };\n\n return MediaList;\n}(__WEBPACK_IMPORTED_MODULE_6_react___default.a.Component);\n\n/* harmony default export */ __webpack_exports__["a"] = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__["c" /* bsClass */])(\'media-list\', MediaList));\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/MediaList.js\n// module id = 1277\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/MediaList.js?', + ); + + /***/ + }, + /* 1278 */ + /* exports provided: default */ + /* exports used: default */ + /*!***********************************************!*\ + !*** ./~/react-bootstrap/es/MediaListItem.js ***! + \***********************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ 9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ 7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__ = __webpack_require__(/*! ./utils/bootstrapUtils */ 10);\n\n\n\n\n\n\n\n\n\n\nvar MediaListItem = function (_React$Component) {\n __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default()(MediaListItem, _React$Component);\n\n function MediaListItem() {\n __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default()(this, MediaListItem);\n\n return __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.apply(this, arguments));\n }\n\n MediaListItem.prototype.render = function render() {\n var _props = this.props,\n className = _props.className,\n props = __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default()(_props, [\'className\']);\n\n var _splitBsProps = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__["a" /* splitBsProps */])(props),\n bsProps = _splitBsProps[0],\n elementProps = _splitBsProps[1];\n\n var classes = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__["b" /* getClassSet */])(bsProps);\n\n return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(\'li\', __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, elementProps, {\n className: __WEBPACK_IMPORTED_MODULE_5_classnames___default()(className, classes)\n }));\n };\n\n return MediaListItem;\n}(__WEBPACK_IMPORTED_MODULE_6_react___default.a.Component);\n\n/* harmony default export */ __webpack_exports__["a"] = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__["c" /* bsClass */])(\'media\', MediaListItem));\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/MediaListItem.js\n// module id = 1278\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/MediaListItem.js?', + ); + + /***/ + }, + /* 1279 */ + /* exports provided: default */ + /* exports used: default */ + /*!********************************************!*\ + !*** ./~/react-bootstrap/es/MediaRight.js ***! + \********************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ 9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ 7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__Media__ = __webpack_require__(/*! ./Media */ 238);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__ = __webpack_require__(/*! ./utils/bootstrapUtils */ 10);\n\n\n\n\n\n\n\n\n\n\n\n\nvar propTypes = {\n /**\n * Align the media to the top, middle, or bottom of the media object.\n */\n align: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.oneOf(['top', 'middle', 'bottom'])\n};\n\nvar MediaRight = function (_React$Component) {\n __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default()(MediaRight, _React$Component);\n\n function MediaRight() {\n __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default()(this, MediaRight);\n\n return __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.apply(this, arguments));\n }\n\n MediaRight.prototype.render = function render() {\n var _props = this.props,\n align = _props.align,\n className = _props.className,\n props = __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default()(_props, ['align', 'className']);\n\n var _splitBsProps = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__[\"a\" /* splitBsProps */])(props),\n bsProps = _splitBsProps[0],\n elementProps = _splitBsProps[1];\n\n var classes = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__[\"b\" /* getClassSet */])(bsProps);\n\n if (align) {\n // The class is e.g. `media-top`, not `media-right-top`.\n classes[__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__[\"e\" /* prefix */])(__WEBPACK_IMPORTED_MODULE_8__Media__[\"a\" /* default */].defaultProps, align)] = true;\n }\n\n return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('div', __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, elementProps, {\n className: __WEBPACK_IMPORTED_MODULE_5_classnames___default()(className, classes)\n }));\n };\n\n return MediaRight;\n}(__WEBPACK_IMPORTED_MODULE_6_react___default.a.Component);\n\nMediaRight.propTypes = propTypes;\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__[\"c\" /* bsClass */])('media-right', MediaRight));\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/MediaRight.js\n// module id = 1279\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/MediaRight.js?", + ); + + /***/ + }, + /* 1280 */ + /* exports provided: default */ + /* exports used: default */ + /*!******************************************!*\ + !*** ./~/react-bootstrap/es/MenuItem.js ***! + \******************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ 9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ 7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_react_prop_types_lib_all__ = __webpack_require__(/*! react-prop-types/lib/all */ 174);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_react_prop_types_lib_all___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_react_prop_types_lib_all__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__SafeAnchor__ = __webpack_require__(/*! ./SafeAnchor */ 54);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__utils_bootstrapUtils__ = __webpack_require__(/*! ./utils/bootstrapUtils */ 10);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__utils_createChainedFunction__ = __webpack_require__(/*! ./utils/createChainedFunction */ 28);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar propTypes = {\n /**\n * Highlight the menu item as active.\n */\n active: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,\n\n /**\n * Disable the menu item, making it unselectable.\n */\n disabled: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,\n\n /**\n * Styles the menu item as a horizontal rule, providing visual separation between\n * groups of menu items.\n */\n divider: __WEBPACK_IMPORTED_MODULE_8_react_prop_types_lib_all___default()(__WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool, function (_ref) {\n var divider = _ref.divider,\n children = _ref.children;\n return divider && children ? new Error('Children will not be rendered for dividers') : null;\n }),\n\n /**\n * Value passed to the `onSelect` handler, useful for identifying the selected menu item.\n */\n eventKey: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.any,\n\n /**\n * Styles the menu item as a header label, useful for describing a group of menu items.\n */\n header: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,\n\n /**\n * HTML `href` attribute corresponding to `a.href`.\n */\n href: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string,\n\n /**\n * Callback fired when the menu item is clicked.\n */\n onClick: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func,\n\n /**\n * Callback fired when the menu item is selected.\n *\n * ```js\n * (eventKey: any, event: Object) => any\n * ```\n */\n onSelect: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func\n};\n\nvar defaultProps = {\n divider: false,\n disabled: false,\n header: false\n};\n\nvar MenuItem = function (_React$Component) {\n __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default()(MenuItem, _React$Component);\n\n function MenuItem(props, context) {\n __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default()(this, MenuItem);\n\n var _this = __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.call(this, props, context));\n\n _this.handleClick = _this.handleClick.bind(_this);\n return _this;\n }\n\n MenuItem.prototype.handleClick = function handleClick(event) {\n var _props = this.props,\n href = _props.href,\n disabled = _props.disabled,\n onSelect = _props.onSelect,\n eventKey = _props.eventKey;\n\n\n if (!href || disabled) {\n event.preventDefault();\n }\n\n if (disabled) {\n return;\n }\n\n if (onSelect) {\n onSelect(eventKey, event);\n }\n };\n\n MenuItem.prototype.render = function render() {\n var _props2 = this.props,\n active = _props2.active,\n disabled = _props2.disabled,\n divider = _props2.divider,\n header = _props2.header,\n onClick = _props2.onClick,\n className = _props2.className,\n style = _props2.style,\n props = __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default()(_props2, ['active', 'disabled', 'divider', 'header', 'onClick', 'className', 'style']);\n\n var _splitBsPropsAndOmit = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_10__utils_bootstrapUtils__[\"f\" /* splitBsPropsAndOmit */])(props, ['eventKey', 'onSelect']),\n bsProps = _splitBsPropsAndOmit[0],\n elementProps = _splitBsPropsAndOmit[1];\n\n if (divider) {\n // Forcibly blank out the children; separators shouldn't render any.\n elementProps.children = undefined;\n\n return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('li', __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, elementProps, {\n role: 'separator',\n className: __WEBPACK_IMPORTED_MODULE_5_classnames___default()(className, 'divider'),\n style: style\n }));\n }\n\n if (header) {\n return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('li', __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, elementProps, {\n role: 'heading',\n className: __WEBPACK_IMPORTED_MODULE_5_classnames___default()(className, __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_10__utils_bootstrapUtils__[\"e\" /* prefix */])(bsProps, 'header')),\n style: style\n }));\n }\n\n return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(\n 'li',\n {\n role: 'presentation',\n className: __WEBPACK_IMPORTED_MODULE_5_classnames___default()(className, { active: active, disabled: disabled }),\n style: style\n },\n __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_9__SafeAnchor__[\"a\" /* default */], __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, elementProps, {\n role: 'menuitem',\n tabIndex: '-1',\n onClick: __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_11__utils_createChainedFunction__[\"a\" /* default */])(onClick, this.handleClick)\n }))\n );\n };\n\n return MenuItem;\n}(__WEBPACK_IMPORTED_MODULE_6_react___default.a.Component);\n\nMenuItem.propTypes = propTypes;\nMenuItem.defaultProps = defaultProps;\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_10__utils_bootstrapUtils__[\"c\" /* bsClass */])('dropdown', MenuItem));\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/MenuItem.js\n// module id = 1280\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/MenuItem.js?", + ); + + /***/ + }, + /* 1281 */ + /* exports provided: default */ + /* exports used: default */ + /*!***************************************!*\ + !*** ./~/react-bootstrap/es/Modal.js ***! + \***************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ 9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_objectWithoutProperties__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ 7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_extends__ = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_extends__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_dom_helpers_events__ = __webpack_require__(/*! dom-helpers/events */ 1113);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_dom_helpers_events___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_dom_helpers_events__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_dom_helpers_ownerDocument__ = __webpack_require__(/*! dom-helpers/ownerDocument */ 94);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_dom_helpers_ownerDocument___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_dom_helpers_ownerDocument__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_dom_helpers_util_inDOM__ = __webpack_require__(/*! dom-helpers/util/inDOM */ 65);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_dom_helpers_util_inDOM___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_dom_helpers_util_inDOM__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_dom_helpers_util_scrollbarSize__ = __webpack_require__(/*! dom-helpers/util/scrollbarSize */ 345);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_dom_helpers_util_scrollbarSize___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_dom_helpers_util_scrollbarSize__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_10_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_11_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12_react_dom__ = __webpack_require__(/*! react-dom */ 16);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12_react_dom___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_12_react_dom__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13_react_overlays_lib_Modal__ = __webpack_require__(/*! react-overlays/lib/Modal */ 1432);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13_react_overlays_lib_Modal___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_13_react_overlays_lib_Modal__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14_react_overlays_lib_utils_isOverflowing__ = __webpack_require__(/*! react-overlays/lib/utils/isOverflowing */ 569);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14_react_overlays_lib_utils_isOverflowing___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_14_react_overlays_lib_utils_isOverflowing__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15_react_prop_types_lib_elementType__ = __webpack_require__(/*! react-prop-types/lib/elementType */ 18);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15_react_prop_types_lib_elementType___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_15_react_prop_types_lib_elementType__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__Fade__ = __webpack_require__(/*! ./Fade */ 166);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__ModalBody__ = __webpack_require__(/*! ./ModalBody */ 500);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__ModalDialog__ = __webpack_require__(/*! ./ModalDialog */ 1282);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_19__ModalFooter__ = __webpack_require__(/*! ./ModalFooter */ 501);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_20__ModalHeader__ = __webpack_require__(/*! ./ModalHeader */ 502);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_21__ModalTitle__ = __webpack_require__(/*! ./ModalTitle */ 503);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_22__utils_bootstrapUtils__ = __webpack_require__(/*! ./utils/bootstrapUtils */ 10);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_23__utils_createChainedFunction__ = __webpack_require__(/*! ./utils/createChainedFunction */ 28);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_24__utils_splitComponentProps__ = __webpack_require__(/*! ./utils/splitComponentProps */ 167);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_25__utils_StyleConfig__ = __webpack_require__(/*! ./utils/StyleConfig */ 32);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar propTypes = __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_extends___default()({}, __WEBPACK_IMPORTED_MODULE_13_react_overlays_lib_Modal___default.a.propTypes, __WEBPACK_IMPORTED_MODULE_18__ModalDialog__["a" /* default */].propTypes, {\n\n /**\n * Include a backdrop component. Specify \'static\' for a backdrop that doesn\'t\n * trigger an "onHide" when clicked.\n */\n backdrop: __WEBPACK_IMPORTED_MODULE_11_prop_types___default.a.oneOf([\'static\', true, false]),\n\n /**\n * Close the modal when escape key is pressed\n */\n keyboard: __WEBPACK_IMPORTED_MODULE_11_prop_types___default.a.bool,\n\n /**\n * Open and close the Modal with a slide and fade animation.\n */\n animation: __WEBPACK_IMPORTED_MODULE_11_prop_types___default.a.bool,\n\n /**\n * A Component type that provides the modal content Markup. This is a useful\n * prop when you want to use your own styles and markup to create a custom\n * modal component.\n */\n dialogComponentClass: __WEBPACK_IMPORTED_MODULE_15_react_prop_types_lib_elementType___default.a,\n\n /**\n * When `true` The modal will automatically shift focus to itself when it\n * opens, and replace it to the last focused element when it closes.\n * Generally this should never be set to false as it makes the Modal less\n * accessible to assistive technologies, like screen-readers.\n */\n autoFocus: __WEBPACK_IMPORTED_MODULE_11_prop_types___default.a.bool,\n\n /**\n * When `true` The modal will prevent focus from leaving the Modal while\n * open. Consider leaving the default value here, as it is necessary to make\n * the Modal work well with assistive technologies, such as screen readers.\n */\n enforceFocus: __WEBPACK_IMPORTED_MODULE_11_prop_types___default.a.bool,\n\n /**\n * When `true` The modal will restore focus to previously focused element once\n * modal is hidden\n */\n restoreFocus: __WEBPACK_IMPORTED_MODULE_11_prop_types___default.a.bool,\n\n /**\n * When `true` The modal will show itself.\n */\n show: __WEBPACK_IMPORTED_MODULE_11_prop_types___default.a.bool,\n\n /**\n * A callback fired when the header closeButton or non-static backdrop is\n * clicked. Required if either are specified.\n */\n onHide: __WEBPACK_IMPORTED_MODULE_11_prop_types___default.a.func,\n\n /**\n * Callback fired before the Modal transitions in\n */\n onEnter: __WEBPACK_IMPORTED_MODULE_11_prop_types___default.a.func,\n\n /**\n * Callback fired as the Modal begins to transition in\n */\n onEntering: __WEBPACK_IMPORTED_MODULE_11_prop_types___default.a.func,\n\n /**\n * Callback fired after the Modal finishes transitioning in\n */\n onEntered: __WEBPACK_IMPORTED_MODULE_11_prop_types___default.a.func,\n\n /**\n * Callback fired right before the Modal transitions out\n */\n onExit: __WEBPACK_IMPORTED_MODULE_11_prop_types___default.a.func,\n\n /**\n * Callback fired as the Modal begins to transition out\n */\n onExiting: __WEBPACK_IMPORTED_MODULE_11_prop_types___default.a.func,\n\n /**\n * Callback fired after the Modal finishes transitioning out\n */\n onExited: __WEBPACK_IMPORTED_MODULE_11_prop_types___default.a.func,\n\n /**\n * @private\n */\n container: __WEBPACK_IMPORTED_MODULE_13_react_overlays_lib_Modal___default.a.propTypes.container\n});\n\nvar defaultProps = __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_extends___default()({}, __WEBPACK_IMPORTED_MODULE_13_react_overlays_lib_Modal___default.a.defaultProps, {\n animation: true,\n dialogComponentClass: __WEBPACK_IMPORTED_MODULE_18__ModalDialog__["a" /* default */]\n});\n\nvar childContextTypes = {\n $bs_modal: __WEBPACK_IMPORTED_MODULE_11_prop_types___default.a.shape({\n onHide: __WEBPACK_IMPORTED_MODULE_11_prop_types___default.a.func\n })\n};\n\nvar Modal = function (_React$Component) {\n __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits___default()(Modal, _React$Component);\n\n function Modal(props, context) {\n __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck___default()(this, Modal);\n\n var _this = __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.call(this, props, context));\n\n _this.handleEntering = _this.handleEntering.bind(_this);\n _this.handleExited = _this.handleExited.bind(_this);\n _this.handleWindowResize = _this.handleWindowResize.bind(_this);\n _this.handleDialogClick = _this.handleDialogClick.bind(_this);\n\n _this.state = {\n style: {}\n };\n return _this;\n }\n\n Modal.prototype.getChildContext = function getChildContext() {\n return {\n $bs_modal: {\n onHide: this.props.onHide\n }\n };\n };\n\n Modal.prototype.componentWillUnmount = function componentWillUnmount() {\n // Clean up the listener if we need to.\n this.handleExited();\n };\n\n Modal.prototype.handleEntering = function handleEntering() {\n // FIXME: This should work even when animation is disabled.\n __WEBPACK_IMPORTED_MODULE_6_dom_helpers_events___default.a.on(window, \'resize\', this.handleWindowResize);\n this.updateStyle();\n };\n\n Modal.prototype.handleExited = function handleExited() {\n // FIXME: This should work even when animation is disabled.\n __WEBPACK_IMPORTED_MODULE_6_dom_helpers_events___default.a.off(window, \'resize\', this.handleWindowResize);\n };\n\n Modal.prototype.handleWindowResize = function handleWindowResize() {\n this.updateStyle();\n };\n\n Modal.prototype.handleDialogClick = function handleDialogClick(e) {\n if (e.target !== e.currentTarget) {\n return;\n }\n\n this.props.onHide();\n };\n\n Modal.prototype.updateStyle = function updateStyle() {\n if (!__WEBPACK_IMPORTED_MODULE_8_dom_helpers_util_inDOM___default.a) {\n return;\n }\n\n var dialogNode = this._modal.getDialogElement();\n var dialogHeight = dialogNode.scrollHeight;\n\n var document = __WEBPACK_IMPORTED_MODULE_7_dom_helpers_ownerDocument___default()(dialogNode);\n var bodyIsOverflowing = __WEBPACK_IMPORTED_MODULE_14_react_overlays_lib_utils_isOverflowing___default()(__WEBPACK_IMPORTED_MODULE_12_react_dom___default.a.findDOMNode(this.props.container || document.body));\n var modalIsOverflowing = dialogHeight > document.documentElement.clientHeight;\n\n this.setState({\n style: {\n paddingRight: bodyIsOverflowing && !modalIsOverflowing ? __WEBPACK_IMPORTED_MODULE_9_dom_helpers_util_scrollbarSize___default()() : undefined,\n paddingLeft: !bodyIsOverflowing && modalIsOverflowing ? __WEBPACK_IMPORTED_MODULE_9_dom_helpers_util_scrollbarSize___default()() : undefined\n }\n });\n };\n\n Modal.prototype.render = function render() {\n var _this2 = this;\n\n var _props = this.props,\n backdrop = _props.backdrop,\n animation = _props.animation,\n show = _props.show,\n Dialog = _props.dialogComponentClass,\n className = _props.className,\n style = _props.style,\n children = _props.children,\n onEntering = _props.onEntering,\n onExited = _props.onExited,\n props = __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_objectWithoutProperties___default()(_props, [\'backdrop\', \'animation\', \'show\', \'dialogComponentClass\', \'className\', \'style\', \'children\', \'onEntering\', \'onExited\']);\n\n var _splitComponentProps = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_24__utils_splitComponentProps__["a" /* default */])(props, __WEBPACK_IMPORTED_MODULE_13_react_overlays_lib_Modal___default.a),\n baseModalProps = _splitComponentProps[0],\n dialogProps = _splitComponentProps[1];\n\n var inClassName = show && !animation && \'in\';\n\n return __WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_13_react_overlays_lib_Modal___default.a,\n __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_extends___default()({}, baseModalProps, {\n ref: function ref(c) {\n _this2._modal = c;\n },\n show: show,\n onEntering: __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_23__utils_createChainedFunction__["a" /* default */])(onEntering, this.handleEntering),\n onExited: __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_23__utils_createChainedFunction__["a" /* default */])(onExited, this.handleExited),\n backdrop: backdrop,\n backdropClassName: __WEBPACK_IMPORTED_MODULE_5_classnames___default()(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_22__utils_bootstrapUtils__["e" /* prefix */])(props, \'backdrop\'), inClassName),\n containerClassName: __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_22__utils_bootstrapUtils__["e" /* prefix */])(props, \'open\'),\n transition: animation ? __WEBPACK_IMPORTED_MODULE_16__Fade__["a" /* default */] : undefined,\n dialogTransitionTimeout: Modal.TRANSITION_DURATION,\n backdropTransitionTimeout: Modal.BACKDROP_TRANSITION_DURATION\n }),\n __WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement(\n Dialog,\n __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_extends___default()({}, dialogProps, {\n style: __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_extends___default()({}, this.state.style, style),\n className: __WEBPACK_IMPORTED_MODULE_5_classnames___default()(className, inClassName),\n onClick: backdrop === true ? this.handleDialogClick : null\n }),\n children\n )\n );\n };\n\n return Modal;\n}(__WEBPACK_IMPORTED_MODULE_10_react___default.a.Component);\n\nModal.propTypes = propTypes;\nModal.defaultProps = defaultProps;\nModal.childContextTypes = childContextTypes;\n\nModal.Body = __WEBPACK_IMPORTED_MODULE_17__ModalBody__["a" /* default */];\nModal.Header = __WEBPACK_IMPORTED_MODULE_20__ModalHeader__["a" /* default */];\nModal.Title = __WEBPACK_IMPORTED_MODULE_21__ModalTitle__["a" /* default */];\nModal.Footer = __WEBPACK_IMPORTED_MODULE_19__ModalFooter__["a" /* default */];\n\nModal.Dialog = __WEBPACK_IMPORTED_MODULE_18__ModalDialog__["a" /* default */];\n\nModal.TRANSITION_DURATION = 300;\nModal.BACKDROP_TRANSITION_DURATION = 150;\n\n/* harmony default export */ __webpack_exports__["a"] = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_22__utils_bootstrapUtils__["c" /* bsClass */])(\'modal\', __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_22__utils_bootstrapUtils__["d" /* bsSizes */])([__WEBPACK_IMPORTED_MODULE_25__utils_StyleConfig__["b" /* Size */].LARGE, __WEBPACK_IMPORTED_MODULE_25__utils_StyleConfig__["b" /* Size */].SMALL], Modal)));\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/Modal.js\n// module id = 1281\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/Modal.js?', + ); + + /***/ + }, + /* 1282 */ + /* exports provided: default */ + /* exports used: default */ + /*!*********************************************!*\ + !*** ./~/react-bootstrap/es/ModalDialog.js ***! + \*********************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ 9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ 7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__ = __webpack_require__(/*! ./utils/bootstrapUtils */ 10);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__utils_StyleConfig__ = __webpack_require__(/*! ./utils/StyleConfig */ 32);\n\n\n\n\n\n\n\n\n\n\n\n\nvar propTypes = {\n /**\n * A css class to apply to the Modal dialog DOM node.\n */\n dialogClassName: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string\n};\n\nvar ModalDialog = function (_React$Component) {\n __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default()(ModalDialog, _React$Component);\n\n function ModalDialog() {\n __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default()(this, ModalDialog);\n\n return __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.apply(this, arguments));\n }\n\n ModalDialog.prototype.render = function render() {\n var _extends2;\n\n var _props = this.props,\n dialogClassName = _props.dialogClassName,\n className = _props.className,\n style = _props.style,\n children = _props.children,\n props = __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default()(_props, ['dialogClassName', 'className', 'style', 'children']);\n\n var _splitBsProps = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__[\"a\" /* splitBsProps */])(props),\n bsProps = _splitBsProps[0],\n elementProps = _splitBsProps[1];\n\n var bsClassName = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__[\"e\" /* prefix */])(bsProps);\n\n var modalStyle = __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({ display: 'block' }, style);\n\n var dialogClasses = __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__[\"b\" /* getClassSet */])(bsProps), (_extends2 = {}, _extends2[bsClassName] = false, _extends2[__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__[\"e\" /* prefix */])(bsProps, 'dialog')] = true, _extends2));\n\n return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(\n 'div',\n __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, elementProps, {\n tabIndex: '-1',\n role: 'dialog',\n style: modalStyle,\n className: __WEBPACK_IMPORTED_MODULE_5_classnames___default()(className, bsClassName)\n }),\n __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_5_classnames___default()(dialogClassName, dialogClasses) },\n __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(\n 'div',\n { className: __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__[\"e\" /* prefix */])(bsProps, 'content'), role: 'document' },\n children\n )\n )\n );\n };\n\n return ModalDialog;\n}(__WEBPACK_IMPORTED_MODULE_6_react___default.a.Component);\n\nModalDialog.propTypes = propTypes;\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__[\"c\" /* bsClass */])('modal', __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__[\"d\" /* bsSizes */])([__WEBPACK_IMPORTED_MODULE_9__utils_StyleConfig__[\"b\" /* Size */].LARGE, __WEBPACK_IMPORTED_MODULE_9__utils_StyleConfig__[\"b\" /* Size */].SMALL], ModalDialog)));\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/ModalDialog.js\n// module id = 1282\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/ModalDialog.js?", + ); + + /***/ + }, + /* 1283 */ + /* exports provided: default */ + /* exports used: default */ + /*!*********************************************!*\ + !*** ./~/react-bootstrap/es/NavDropdown.js ***! + \*********************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ 9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_objectWithoutProperties__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ 7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_extends__ = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_extends__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__Dropdown__ = __webpack_require__(/*! ./Dropdown */ 165);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__utils_splitComponentProps__ = __webpack_require__(/*! ./utils/splitComponentProps */ 167);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__utils_ValidComponentChildren__ = __webpack_require__(/*! ./utils/ValidComponentChildren */ 34);\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar propTypes = __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_extends___default()({}, __WEBPACK_IMPORTED_MODULE_8__Dropdown__["a" /* default */].propTypes, {\n\n // Toggle props.\n title: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.node.isRequired,\n noCaret: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,\n active: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,\n\n // Override generated docs from <Dropdown>.\n /**\n * @private\n */\n children: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.node\n});\n\nvar NavDropdown = function (_React$Component) {\n __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits___default()(NavDropdown, _React$Component);\n\n function NavDropdown() {\n __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck___default()(this, NavDropdown);\n\n return __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.apply(this, arguments));\n }\n\n NavDropdown.prototype.isActive = function isActive(_ref, activeKey, activeHref) {\n var props = _ref.props;\n\n var _this2 = this;\n\n if (props.active || activeKey != null && props.eventKey === activeKey || activeHref && props.href === activeHref) {\n return true;\n }\n\n if (__WEBPACK_IMPORTED_MODULE_10__utils_ValidComponentChildren__["a" /* default */].some(props.children, function (child) {\n return _this2.isActive(child, activeKey, activeHref);\n })) {\n return true;\n }\n\n return props.active;\n };\n\n NavDropdown.prototype.render = function render() {\n var _this3 = this;\n\n var _props = this.props,\n title = _props.title,\n activeKey = _props.activeKey,\n activeHref = _props.activeHref,\n className = _props.className,\n style = _props.style,\n children = _props.children,\n props = __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_objectWithoutProperties___default()(_props, [\'title\', \'activeKey\', \'activeHref\', \'className\', \'style\', \'children\']);\n\n var active = this.isActive(this, activeKey, activeHref);\n delete props.active; // Accessed via this.isActive().\n delete props.eventKey; // Accessed via this.isActive().\n\n var _splitComponentProps = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__utils_splitComponentProps__["a" /* default */])(props, __WEBPACK_IMPORTED_MODULE_8__Dropdown__["a" /* default */].ControlledComponent),\n dropdownProps = _splitComponentProps[0],\n toggleProps = _splitComponentProps[1];\n\n // Unlike for the other dropdowns, styling needs to go to the `<Dropdown>`\n // rather than the `<Dropdown.Toggle>`.\n\n return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_8__Dropdown__["a" /* default */],\n __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_extends___default()({}, dropdownProps, {\n componentClass: \'li\',\n className: __WEBPACK_IMPORTED_MODULE_5_classnames___default()(className, { active: active }),\n style: style\n }),\n __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_8__Dropdown__["a" /* default */].Toggle,\n __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_extends___default()({}, toggleProps, { useAnchor: true }),\n title\n ),\n __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_8__Dropdown__["a" /* default */].Menu,\n null,\n __WEBPACK_IMPORTED_MODULE_10__utils_ValidComponentChildren__["a" /* default */].map(children, function (child) {\n return __WEBPACK_IMPORTED_MODULE_6_react___default.a.cloneElement(child, {\n active: _this3.isActive(child, activeKey, activeHref)\n });\n })\n )\n );\n };\n\n return NavDropdown;\n}(__WEBPACK_IMPORTED_MODULE_6_react___default.a.Component);\n\nNavDropdown.propTypes = propTypes;\n\n/* harmony default export */ __webpack_exports__["a"] = (NavDropdown);\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/NavDropdown.js\n// module id = 1283\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/NavDropdown.js?', + ); + + /***/ + }, + /* 1284 */ + /* exports provided: default */ + /* exports used: default */ + /*!****************************************!*\ + !*** ./~/react-bootstrap/es/Navbar.js ***! + \****************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ 9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ 7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_react_prop_types_lib_elementType__ = __webpack_require__(/*! react-prop-types/lib/elementType */ 18);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_react_prop_types_lib_elementType___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_react_prop_types_lib_elementType__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_uncontrollable__ = __webpack_require__(/*! uncontrollable */ 178);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_uncontrollable___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_uncontrollable__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__Grid__ = __webpack_require__(/*! ./Grid */ 498);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__NavbarBrand__ = __webpack_require__(/*! ./NavbarBrand */ 506);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__NavbarCollapse__ = __webpack_require__(/*! ./NavbarCollapse */ 1285);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__NavbarHeader__ = __webpack_require__(/*! ./NavbarHeader */ 1286);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__NavbarToggle__ = __webpack_require__(/*! ./NavbarToggle */ 1287);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__utils_bootstrapUtils__ = __webpack_require__(/*! ./utils/bootstrapUtils */ 10);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__utils_StyleConfig__ = __webpack_require__(/*! ./utils/StyleConfig */ 32);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__utils_createChainedFunction__ = __webpack_require__(/*! ./utils/createChainedFunction */ 28);\n\n\n\n\n\n// TODO: Remove this pragma once we upgrade eslint-config-airbnb.\n/* eslint-disable react/no-multi-comp */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar propTypes = {\n /**\n * Create a fixed navbar along the top of the screen, that scrolls with the\n * page\n */\n fixedTop: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,\n /**\n * Create a fixed navbar along the bottom of the screen, that scrolls with\n * the page\n */\n fixedBottom: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,\n /**\n * Create a full-width navbar that scrolls away with the page\n */\n staticTop: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,\n /**\n * An alternative dark visual style for the Navbar\n */\n inverse: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,\n /**\n * Allow the Navbar to fluidly adjust to the page or container width, instead\n * of at the predefined screen breakpoints\n */\n fluid: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,\n\n /**\n * Set a custom element for this component.\n */\n componentClass: __WEBPACK_IMPORTED_MODULE_8_react_prop_types_lib_elementType___default.a,\n /**\n * A callback fired when the `<Navbar>` body collapses or expands. Fired when\n * a `<Navbar.Toggle>` is clicked and called with the new `navExpanded`\n * boolean value.\n *\n * @controllable navExpanded\n */\n onToggle: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func,\n /**\n * A callback fired when a descendant of a child `<Nav>` is selected. Should\n * be used to execute complex closing or other miscellaneous actions desired\n * after selecting a descendant of `<Nav>`. Does nothing if no `<Nav>` or `<Nav>`\n * descendants exist. The callback is called with an eventKey, which is a\n * prop from the selected `<Nav>` descendant, and an event.\n *\n * ```js\n * function (\n * \tAny eventKey,\n * \tSyntheticEvent event?\n * )\n * ```\n *\n * For basic closing behavior after all `<Nav>` descendant onSelect events in\n * mobile viewports, try using collapseOnSelect.\n *\n * Note: If you are manually closing the navbar using this `OnSelect` prop,\n * ensure that you are setting `expanded` to false and not *toggling* between\n * true and false.\n */\n onSelect: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func,\n /**\n * Sets `expanded` to `false` after the onSelect event of a descendant of a\n * child `<Nav>`. Does nothing if no `<Nav>` or `<Nav>` descendants exist.\n *\n * The onSelect callback should be used instead for more complex operations\n * that need to be executed after the `select` event of `<Nav>` descendants.\n */\n collapseOnSelect: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,\n /**\n * Explicitly set the visiblity of the navbar body\n *\n * @controllable onToggle\n */\n expanded: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,\n\n role: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string\n};\n\nvar defaultProps = {\n componentClass: 'nav',\n fixedTop: false,\n fixedBottom: false,\n staticTop: false,\n inverse: false,\n fluid: false,\n collapseOnSelect: false\n};\n\nvar childContextTypes = {\n $bs_navbar: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.shape({\n bsClass: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string,\n expanded: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,\n onToggle: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func.isRequired,\n onSelect: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func\n })\n};\n\nvar Navbar = function (_React$Component) {\n __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default()(Navbar, _React$Component);\n\n function Navbar(props, context) {\n __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default()(this, Navbar);\n\n var _this = __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.call(this, props, context));\n\n _this.handleToggle = _this.handleToggle.bind(_this);\n _this.handleCollapse = _this.handleCollapse.bind(_this);\n return _this;\n }\n\n Navbar.prototype.getChildContext = function getChildContext() {\n var _props = this.props,\n bsClass = _props.bsClass,\n expanded = _props.expanded,\n onSelect = _props.onSelect,\n collapseOnSelect = _props.collapseOnSelect;\n\n\n return {\n $bs_navbar: {\n bsClass: bsClass,\n expanded: expanded,\n onToggle: this.handleToggle,\n onSelect: __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_17__utils_createChainedFunction__[\"a\" /* default */])(onSelect, collapseOnSelect ? this.handleCollapse : null)\n }\n };\n };\n\n Navbar.prototype.handleCollapse = function handleCollapse() {\n var _props2 = this.props,\n onToggle = _props2.onToggle,\n expanded = _props2.expanded;\n\n\n if (expanded) {\n onToggle(false);\n }\n };\n\n Navbar.prototype.handleToggle = function handleToggle() {\n var _props3 = this.props,\n onToggle = _props3.onToggle,\n expanded = _props3.expanded;\n\n\n onToggle(!expanded);\n };\n\n Navbar.prototype.render = function render() {\n var _extends2;\n\n var _props4 = this.props,\n Component = _props4.componentClass,\n fixedTop = _props4.fixedTop,\n fixedBottom = _props4.fixedBottom,\n staticTop = _props4.staticTop,\n inverse = _props4.inverse,\n fluid = _props4.fluid,\n className = _props4.className,\n children = _props4.children,\n props = __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default()(_props4, ['componentClass', 'fixedTop', 'fixedBottom', 'staticTop', 'inverse', 'fluid', 'className', 'children']);\n\n var _splitBsPropsAndOmit = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_15__utils_bootstrapUtils__[\"f\" /* splitBsPropsAndOmit */])(props, ['expanded', 'onToggle', 'onSelect', 'collapseOnSelect']),\n bsProps = _splitBsPropsAndOmit[0],\n elementProps = _splitBsPropsAndOmit[1];\n\n // will result in some false positives but that seems better\n // than false negatives. strict `undefined` check allows explicit\n // \"nulling\" of the role if the user really doesn't want one\n\n\n if (elementProps.role === undefined && Component !== 'nav') {\n elementProps.role = 'navigation';\n }\n\n if (inverse) {\n bsProps.bsStyle = __WEBPACK_IMPORTED_MODULE_16__utils_StyleConfig__[\"d\" /* Style */].INVERSE;\n }\n\n var classes = __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_15__utils_bootstrapUtils__[\"b\" /* getClassSet */])(bsProps), (_extends2 = {}, _extends2[__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_15__utils_bootstrapUtils__[\"e\" /* prefix */])(bsProps, 'fixed-top')] = fixedTop, _extends2[__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_15__utils_bootstrapUtils__[\"e\" /* prefix */])(bsProps, 'fixed-bottom')] = fixedBottom, _extends2[__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_15__utils_bootstrapUtils__[\"e\" /* prefix */])(bsProps, 'static-top')] = staticTop, _extends2));\n\n return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(\n Component,\n __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, elementProps, {\n className: __WEBPACK_IMPORTED_MODULE_5_classnames___default()(className, classes)\n }),\n __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_10__Grid__[\"a\" /* default */],\n { fluid: fluid },\n children\n )\n );\n };\n\n return Navbar;\n}(__WEBPACK_IMPORTED_MODULE_6_react___default.a.Component);\n\nNavbar.propTypes = propTypes;\nNavbar.defaultProps = defaultProps;\nNavbar.childContextTypes = childContextTypes;\n\n__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_15__utils_bootstrapUtils__[\"c\" /* bsClass */])('navbar', Navbar);\n\nvar UncontrollableNavbar = __WEBPACK_IMPORTED_MODULE_9_uncontrollable___default()(Navbar, { expanded: 'onToggle' });\n\nfunction createSimpleWrapper(tag, suffix, displayName) {\n var Wrapper = function Wrapper(_ref, _ref2) {\n var _ref2$$bs_navbar = _ref2.$bs_navbar,\n navbarProps = _ref2$$bs_navbar === undefined ? { bsClass: 'navbar' } : _ref2$$bs_navbar;\n\n var Component = _ref.componentClass,\n className = _ref.className,\n pullRight = _ref.pullRight,\n pullLeft = _ref.pullLeft,\n props = __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default()(_ref, ['componentClass', 'className', 'pullRight', 'pullLeft']);\n\n return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(Component, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, props, {\n className: __WEBPACK_IMPORTED_MODULE_5_classnames___default()(className, __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_15__utils_bootstrapUtils__[\"e\" /* prefix */])(navbarProps, suffix), pullRight && __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_15__utils_bootstrapUtils__[\"e\" /* prefix */])(navbarProps, 'right'), pullLeft && __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_15__utils_bootstrapUtils__[\"e\" /* prefix */])(navbarProps, 'left'))\n }));\n };\n\n Wrapper.displayName = displayName;\n\n Wrapper.propTypes = {\n componentClass: __WEBPACK_IMPORTED_MODULE_8_react_prop_types_lib_elementType___default.a,\n pullRight: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,\n pullLeft: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool\n };\n\n Wrapper.defaultProps = {\n componentClass: tag,\n pullRight: false,\n pullLeft: false\n };\n\n Wrapper.contextTypes = {\n $bs_navbar: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.shape({\n bsClass: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string\n })\n };\n\n return Wrapper;\n}\n\nUncontrollableNavbar.Brand = __WEBPACK_IMPORTED_MODULE_11__NavbarBrand__[\"a\" /* default */];\nUncontrollableNavbar.Header = __WEBPACK_IMPORTED_MODULE_13__NavbarHeader__[\"a\" /* default */];\nUncontrollableNavbar.Toggle = __WEBPACK_IMPORTED_MODULE_14__NavbarToggle__[\"a\" /* default */];\nUncontrollableNavbar.Collapse = __WEBPACK_IMPORTED_MODULE_12__NavbarCollapse__[\"a\" /* default */];\n\nUncontrollableNavbar.Form = createSimpleWrapper('div', 'form', 'NavbarForm');\nUncontrollableNavbar.Text = createSimpleWrapper('p', 'text', 'NavbarText');\nUncontrollableNavbar.Link = createSimpleWrapper('a', 'link', 'NavbarLink');\n\n// Set bsStyles here so they can be overridden.\n/* harmony default export */ __webpack_exports__[\"a\"] = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_15__utils_bootstrapUtils__[\"g\" /* bsStyles */])([__WEBPACK_IMPORTED_MODULE_16__utils_StyleConfig__[\"d\" /* Style */].DEFAULT, __WEBPACK_IMPORTED_MODULE_16__utils_StyleConfig__[\"d\" /* Style */].INVERSE], __WEBPACK_IMPORTED_MODULE_16__utils_StyleConfig__[\"d\" /* Style */].DEFAULT, UncontrollableNavbar));\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/Navbar.js\n// module id = 1284\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/Navbar.js?", + ); + + /***/ + }, + /* 1285 */ + /* exports provided: default */ + /* exports used: default */ + /*!************************************************!*\ + !*** ./~/react-bootstrap/es/NavbarCollapse.js ***! + \************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ 9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ 7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__Collapse__ = __webpack_require__(/*! ./Collapse */ 236);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__ = __webpack_require__(/*! ./utils/bootstrapUtils */ 10);\n\n\n\n\n\n\n\n\n\n\n\nvar contextTypes = {\n $bs_navbar: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.shape({\n bsClass: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,\n expanded: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool\n })\n};\n\nvar NavbarCollapse = function (_React$Component) {\n __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default()(NavbarCollapse, _React$Component);\n\n function NavbarCollapse() {\n __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default()(this, NavbarCollapse);\n\n return __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.apply(this, arguments));\n }\n\n NavbarCollapse.prototype.render = function render() {\n var _props = this.props,\n children = _props.children,\n props = __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default()(_props, ['children']);\n\n var navbarProps = this.context.$bs_navbar || { bsClass: 'navbar' };\n\n var bsClassName = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__[\"e\" /* prefix */])(navbarProps, 'collapse');\n\n return __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_7__Collapse__[\"a\" /* default */],\n __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({ 'in': navbarProps.expanded }, props),\n __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(\n 'div',\n { className: bsClassName },\n children\n )\n );\n };\n\n return NavbarCollapse;\n}(__WEBPACK_IMPORTED_MODULE_5_react___default.a.Component);\n\nNavbarCollapse.contextTypes = contextTypes;\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (NavbarCollapse);\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/NavbarCollapse.js\n// module id = 1285\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/NavbarCollapse.js?", + ); + + /***/ + }, + /* 1286 */ + /* exports provided: default */ + /* exports used: default */ + /*!**********************************************!*\ + !*** ./~/react-bootstrap/es/NavbarHeader.js ***! + \**********************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ 9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ 7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__ = __webpack_require__(/*! ./utils/bootstrapUtils */ 10);\n\n\n\n\n\n\n\n\n\n\n\nvar contextTypes = {\n $bs_navbar: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.shape({\n bsClass: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string\n })\n};\n\nvar NavbarHeader = function (_React$Component) {\n __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default()(NavbarHeader, _React$Component);\n\n function NavbarHeader() {\n __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default()(this, NavbarHeader);\n\n return __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.apply(this, arguments));\n }\n\n NavbarHeader.prototype.render = function render() {\n var _props = this.props,\n className = _props.className,\n props = __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default()(_props, ['className']);\n\n var navbarProps = this.context.$bs_navbar || { bsClass: 'navbar' };\n\n var bsClassName = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__[\"e\" /* prefix */])(navbarProps, 'header');\n\n return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('div', __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, props, { className: __WEBPACK_IMPORTED_MODULE_5_classnames___default()(className, bsClassName) }));\n };\n\n return NavbarHeader;\n}(__WEBPACK_IMPORTED_MODULE_6_react___default.a.Component);\n\nNavbarHeader.contextTypes = contextTypes;\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (NavbarHeader);\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/NavbarHeader.js\n// module id = 1286\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/NavbarHeader.js?", + ); + + /***/ + }, + /* 1287 */ + /* exports provided: default */ + /* exports used: default */ + /*!**********************************************!*\ + !*** ./~/react-bootstrap/es/NavbarToggle.js ***! + \**********************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ 9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ 7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__ = __webpack_require__(/*! ./utils/bootstrapUtils */ 10);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__utils_createChainedFunction__ = __webpack_require__(/*! ./utils/createChainedFunction */ 28);\n\n\n\n\n\n\n\n\n\n\n\n\nvar propTypes = {\n onClick: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func,\n /**\n * The toggle content, if left empty it will render the default toggle (seen above).\n */\n children: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.node\n};\n\nvar contextTypes = {\n $bs_navbar: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.shape({\n bsClass: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string,\n expanded: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,\n onToggle: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func.isRequired\n })\n};\n\nvar NavbarToggle = function (_React$Component) {\n __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default()(NavbarToggle, _React$Component);\n\n function NavbarToggle() {\n __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default()(this, NavbarToggle);\n\n return __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.apply(this, arguments));\n }\n\n NavbarToggle.prototype.render = function render() {\n var _props = this.props,\n onClick = _props.onClick,\n className = _props.className,\n children = _props.children,\n props = __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default()(_props, ['onClick', 'className', 'children']);\n\n var navbarProps = this.context.$bs_navbar || { bsClass: 'navbar' };\n\n var buttonProps = __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({\n type: 'button'\n }, props, {\n onClick: __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__utils_createChainedFunction__[\"a\" /* default */])(onClick, navbarProps.onToggle),\n className: __WEBPACK_IMPORTED_MODULE_5_classnames___default()(className, __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__[\"e\" /* prefix */])(navbarProps, 'toggle'), !navbarProps.expanded && 'collapsed')\n });\n\n if (children) {\n return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(\n 'button',\n buttonProps,\n children\n );\n }\n\n return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(\n 'button',\n buttonProps,\n __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(\n 'span',\n { className: 'sr-only' },\n 'Toggle navigation'\n ),\n __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('span', { className: 'icon-bar' }),\n __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('span', { className: 'icon-bar' }),\n __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('span', { className: 'icon-bar' })\n );\n };\n\n return NavbarToggle;\n}(__WEBPACK_IMPORTED_MODULE_6_react___default.a.Component);\n\nNavbarToggle.propTypes = propTypes;\nNavbarToggle.contextTypes = contextTypes;\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (NavbarToggle);\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/NavbarToggle.js\n// module id = 1287\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/NavbarToggle.js?", + ); + + /***/ + }, + /* 1288 */ + /* exports provided: default */ + /* exports used: default */ + /*!************************************************!*\ + !*** ./~/react-bootstrap/es/OverlayTrigger.js ***! + \************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ 9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_objectWithoutProperties__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ 7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_extends__ = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_extends__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_dom_helpers_query_contains__ = __webpack_require__(/*! dom-helpers/query/contains */ 95);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_dom_helpers_query_contains___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_dom_helpers_query_contains__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_react_dom__ = __webpack_require__(/*! react-dom */ 16);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_react_dom___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_react_dom__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_warning__ = __webpack_require__(/*! warning */ 23);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_warning__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__Overlay__ = __webpack_require__(/*! ./Overlay */ 507);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__utils_createChainedFunction__ = __webpack_require__(/*! ./utils/createChainedFunction */ 28);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/**\n * Check if value one is inside or equal to the of value\n *\n * @param {string} one\n * @param {string|array} of\n * @returns {boolean}\n */\nfunction isOneOf(one, of) {\n if (Array.isArray(of)) {\n return of.indexOf(one) >= 0;\n }\n return one === of;\n}\n\nvar triggerType = __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.oneOf(['click', 'hover', 'focus']);\n\nvar propTypes = __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_extends___default()({}, __WEBPACK_IMPORTED_MODULE_10__Overlay__[\"a\" /* default */].propTypes, {\n\n /**\n * Specify which action or actions trigger Overlay visibility\n */\n trigger: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.oneOfType([triggerType, __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.arrayOf(triggerType)]),\n\n /**\n * A millisecond delay amount to show and hide the Overlay once triggered\n */\n delay: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.number,\n /**\n * A millisecond delay amount before showing the Overlay once triggered.\n */\n delayShow: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.number,\n /**\n * A millisecond delay amount before hiding the Overlay once triggered.\n */\n delayHide: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.number,\n\n // FIXME: This should be `defaultShow`.\n /**\n * The initial visibility state of the Overlay. For more nuanced visibility\n * control, consider using the Overlay component directly.\n */\n defaultOverlayShown: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,\n\n /**\n * An element or text to overlay next to the target.\n */\n overlay: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.node.isRequired,\n\n /**\n * @private\n */\n onBlur: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func,\n /**\n * @private\n */\n onClick: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func,\n /**\n * @private\n */\n onFocus: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func,\n /**\n * @private\n */\n onMouseOut: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func,\n /**\n * @private\n */\n onMouseOver: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func,\n\n // Overridden props from `<Overlay>`.\n /**\n * @private\n */\n target: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.oneOf([null]),\n /**\n * @private\n */\n onHide: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.oneOf([null]),\n /**\n * @private\n */\n show: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.oneOf([null])\n});\n\nvar defaultProps = {\n defaultOverlayShown: false,\n trigger: ['hover', 'focus']\n};\n\nvar OverlayTrigger = function (_React$Component) {\n __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits___default()(OverlayTrigger, _React$Component);\n\n function OverlayTrigger(props, context) {\n __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck___default()(this, OverlayTrigger);\n\n var _this = __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.call(this, props, context));\n\n _this.handleToggle = _this.handleToggle.bind(_this);\n _this.handleDelayedShow = _this.handleDelayedShow.bind(_this);\n _this.handleDelayedHide = _this.handleDelayedHide.bind(_this);\n _this.handleHide = _this.handleHide.bind(_this);\n\n _this.handleMouseOver = function (e) {\n return _this.handleMouseOverOut(_this.handleDelayedShow, e);\n };\n _this.handleMouseOut = function (e) {\n return _this.handleMouseOverOut(_this.handleDelayedHide, e);\n };\n\n _this._mountNode = null;\n\n _this.state = {\n show: props.defaultOverlayShown\n };\n return _this;\n }\n\n OverlayTrigger.prototype.componentDidMount = function componentDidMount() {\n this._mountNode = document.createElement('div');\n this.renderOverlay();\n };\n\n OverlayTrigger.prototype.componentDidUpdate = function componentDidUpdate() {\n this.renderOverlay();\n };\n\n OverlayTrigger.prototype.componentWillUnmount = function componentWillUnmount() {\n __WEBPACK_IMPORTED_MODULE_8_react_dom___default.a.unmountComponentAtNode(this._mountNode);\n this._mountNode = null;\n\n clearTimeout(this._hoverShowDelay);\n clearTimeout(this._hoverHideDelay);\n };\n\n OverlayTrigger.prototype.handleToggle = function handleToggle() {\n if (this.state.show) {\n this.hide();\n } else {\n this.show();\n }\n };\n\n OverlayTrigger.prototype.handleDelayedShow = function handleDelayedShow() {\n var _this2 = this;\n\n if (this._hoverHideDelay != null) {\n clearTimeout(this._hoverHideDelay);\n this._hoverHideDelay = null;\n return;\n }\n\n if (this.state.show || this._hoverShowDelay != null) {\n return;\n }\n\n var delay = this.props.delayShow != null ? this.props.delayShow : this.props.delay;\n\n if (!delay) {\n this.show();\n return;\n }\n\n this._hoverShowDelay = setTimeout(function () {\n _this2._hoverShowDelay = null;\n _this2.show();\n }, delay);\n };\n\n OverlayTrigger.prototype.handleDelayedHide = function handleDelayedHide() {\n var _this3 = this;\n\n if (this._hoverShowDelay != null) {\n clearTimeout(this._hoverShowDelay);\n this._hoverShowDelay = null;\n return;\n }\n\n if (!this.state.show || this._hoverHideDelay != null) {\n return;\n }\n\n var delay = this.props.delayHide != null ? this.props.delayHide : this.props.delay;\n\n if (!delay) {\n this.hide();\n return;\n }\n\n this._hoverHideDelay = setTimeout(function () {\n _this3._hoverHideDelay = null;\n _this3.hide();\n }, delay);\n };\n\n // Simple implementation of mouseEnter and mouseLeave.\n // React's built version is broken: https://github.com/facebook/react/issues/4251\n // for cases when the trigger is disabled and mouseOut/Over can cause flicker\n // moving from one child element to another.\n\n\n OverlayTrigger.prototype.handleMouseOverOut = function handleMouseOverOut(handler, e) {\n var target = e.currentTarget;\n var related = e.relatedTarget || e.nativeEvent.toElement;\n\n if (!related || related !== target && !__WEBPACK_IMPORTED_MODULE_5_dom_helpers_query_contains___default()(target, related)) {\n handler(e);\n }\n };\n\n OverlayTrigger.prototype.handleHide = function handleHide() {\n this.hide();\n };\n\n OverlayTrigger.prototype.show = function show() {\n this.setState({ show: true });\n };\n\n OverlayTrigger.prototype.hide = function hide() {\n this.setState({ show: false });\n };\n\n OverlayTrigger.prototype.makeOverlay = function makeOverlay(overlay, props) {\n return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_10__Overlay__[\"a\" /* default */],\n __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_extends___default()({}, props, {\n show: this.state.show,\n onHide: this.handleHide,\n target: this\n }),\n overlay\n );\n };\n\n OverlayTrigger.prototype.renderOverlay = function renderOverlay() {\n __WEBPACK_IMPORTED_MODULE_8_react_dom___default.a.unstable_renderSubtreeIntoContainer(this, this._overlay, this._mountNode);\n };\n\n OverlayTrigger.prototype.render = function render() {\n var _props = this.props,\n trigger = _props.trigger,\n overlay = _props.overlay,\n children = _props.children,\n onBlur = _props.onBlur,\n onClick = _props.onClick,\n onFocus = _props.onFocus,\n onMouseOut = _props.onMouseOut,\n onMouseOver = _props.onMouseOver,\n props = __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_objectWithoutProperties___default()(_props, ['trigger', 'overlay', 'children', 'onBlur', 'onClick', 'onFocus', 'onMouseOut', 'onMouseOver']);\n\n delete props.delay;\n delete props.delayShow;\n delete props.delayHide;\n delete props.defaultOverlayShown;\n\n var child = __WEBPACK_IMPORTED_MODULE_6_react___default.a.Children.only(children);\n var childProps = child.props;\n var triggerProps = {};\n\n if (this.state.show) {\n triggerProps['aria-describedby'] = overlay.props.id;\n }\n\n // FIXME: The logic here for passing through handlers on this component is\n // inconsistent. We shouldn't be passing any of these props through.\n\n triggerProps.onClick = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_11__utils_createChainedFunction__[\"a\" /* default */])(childProps.onClick, onClick);\n\n if (isOneOf('click', trigger)) {\n triggerProps.onClick = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_11__utils_createChainedFunction__[\"a\" /* default */])(triggerProps.onClick, this.handleToggle);\n }\n\n if (isOneOf('hover', trigger)) {\n true ? __WEBPACK_IMPORTED_MODULE_9_warning___default()(!(trigger === 'hover'), '[react-bootstrap] Specifying only the `\"hover\"` trigger limits the ' + 'visibility of the overlay to just mouse users. Consider also ' + 'including the `\"focus\"` trigger so that touch and keyboard only ' + 'users can see the overlay as well.') : void 0;\n\n triggerProps.onMouseOver = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_11__utils_createChainedFunction__[\"a\" /* default */])(childProps.onMouseOver, onMouseOver, this.handleMouseOver);\n triggerProps.onMouseOut = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_11__utils_createChainedFunction__[\"a\" /* default */])(childProps.onMouseOut, onMouseOut, this.handleMouseOut);\n }\n\n if (isOneOf('focus', trigger)) {\n triggerProps.onFocus = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_11__utils_createChainedFunction__[\"a\" /* default */])(childProps.onFocus, onFocus, this.handleDelayedShow);\n triggerProps.onBlur = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_11__utils_createChainedFunction__[\"a\" /* default */])(childProps.onBlur, onBlur, this.handleDelayedHide);\n }\n\n this._overlay = this.makeOverlay(overlay, props);\n\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6_react__[\"cloneElement\"])(child, triggerProps);\n };\n\n return OverlayTrigger;\n}(__WEBPACK_IMPORTED_MODULE_6_react___default.a.Component);\n\nOverlayTrigger.propTypes = propTypes;\nOverlayTrigger.defaultProps = defaultProps;\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (OverlayTrigger);\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/OverlayTrigger.js\n// module id = 1288\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/OverlayTrigger.js?", + ); + + /***/ + }, + /* 1289 */ + /* exports provided: default */ + /*!********************************************!*\ + !*** ./~/react-bootstrap/es/PageHeader.js ***! + \********************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ 9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ 7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__ = __webpack_require__(/*! ./utils/bootstrapUtils */ 10);\n\n\n\n\n\n\n\n\n\n\nvar PageHeader = function (_React$Component) {\n __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default()(PageHeader, _React$Component);\n\n function PageHeader() {\n __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default()(this, PageHeader);\n\n return __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.apply(this, arguments));\n }\n\n PageHeader.prototype.render = function render() {\n var _props = this.props,\n className = _props.className,\n children = _props.children,\n props = __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default()(_props, ['className', 'children']);\n\n var _splitBsProps = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__[\"a\" /* splitBsProps */])(props),\n bsProps = _splitBsProps[0],\n elementProps = _splitBsProps[1];\n\n var classes = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__[\"b\" /* getClassSet */])(bsProps);\n\n return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(\n 'div',\n __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, elementProps, {\n className: __WEBPACK_IMPORTED_MODULE_5_classnames___default()(className, classes)\n }),\n __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(\n 'h1',\n null,\n children\n )\n );\n };\n\n return PageHeader;\n}(__WEBPACK_IMPORTED_MODULE_6_react___default.a.Component);\n\n/* unused harmony default export */ var _unused_webpack_default_export = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__[\"c\" /* bsClass */])('page-header', PageHeader));\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/PageHeader.js\n// module id = 1289\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/PageHeader.js?", + ); + + /***/ + }, + /* 1290 */ + /* exports provided: default */ + /*!******************************************!*\ + !*** ./~/react-bootstrap/es/PageItem.js ***! + \******************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__PagerItem__ = __webpack_require__(/*! ./PagerItem */ 508);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__utils_deprecationWarning__ = __webpack_require__(/*! ./utils/deprecationWarning */ 1309);\n\n\n\n/* unused harmony default export */ var _unused_webpack_default_export = (__WEBPACK_IMPORTED_MODULE_1__utils_deprecationWarning__["a" /* default */].wrapper(__WEBPACK_IMPORTED_MODULE_0__PagerItem__["a" /* default */], \'`<PageItem>`\', \'`<Pager.Item>`\'));\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/PageItem.js\n// module id = 1290\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/PageItem.js?', + ); + + /***/ + }, + /* 1291 */ + /* exports provided: default */ + /*!***************************************!*\ + !*** ./~/react-bootstrap/es/Pager.js ***! + \***************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ 9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ 7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__PagerItem__ = __webpack_require__(/*! ./PagerItem */ 508);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__ = __webpack_require__(/*! ./utils/bootstrapUtils */ 10);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__utils_createChainedFunction__ = __webpack_require__(/*! ./utils/createChainedFunction */ 28);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__utils_ValidComponentChildren__ = __webpack_require__(/*! ./utils/ValidComponentChildren */ 34);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar propTypes = {\n onSelect: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func\n};\n\nvar Pager = function (_React$Component) {\n __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default()(Pager, _React$Component);\n\n function Pager() {\n __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default()(this, Pager);\n\n return __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.apply(this, arguments));\n }\n\n Pager.prototype.render = function render() {\n var _props = this.props,\n onSelect = _props.onSelect,\n className = _props.className,\n children = _props.children,\n props = __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default()(_props, [\'onSelect\', \'className\', \'children\']);\n\n var _splitBsProps = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__["a" /* splitBsProps */])(props),\n bsProps = _splitBsProps[0],\n elementProps = _splitBsProps[1];\n\n var classes = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__["b" /* getClassSet */])(bsProps);\n\n return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(\n \'ul\',\n __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, elementProps, {\n className: __WEBPACK_IMPORTED_MODULE_5_classnames___default()(className, classes)\n }),\n __WEBPACK_IMPORTED_MODULE_11__utils_ValidComponentChildren__["a" /* default */].map(children, function (child) {\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6_react__["cloneElement"])(child, {\n onSelect: __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_10__utils_createChainedFunction__["a" /* default */])(child.props.onSelect, onSelect)\n });\n })\n );\n };\n\n return Pager;\n}(__WEBPACK_IMPORTED_MODULE_6_react___default.a.Component);\n\nPager.propTypes = propTypes;\n\nPager.Item = __WEBPACK_IMPORTED_MODULE_8__PagerItem__["a" /* default */];\n\n/* unused harmony default export */ var _unused_webpack_default_export = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__["c" /* bsClass */])(\'pager\', Pager));\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/Pager.js\n// module id = 1291\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/Pager.js?', + ); + + /***/ + }, + /* 1292 */ + /* exports provided: default */ + /* exports used: default */ + /*!********************************************!*\ + !*** ./~/react-bootstrap/es/Pagination.js ***! + \********************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ 9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_objectWithoutProperties__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends__ = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ 7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_react_prop_types_lib_elementType__ = __webpack_require__(/*! react-prop-types/lib/elementType */ 18);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_react_prop_types_lib_elementType___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_react_prop_types_lib_elementType__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__PaginationButton__ = __webpack_require__(/*! ./PaginationButton */ 509);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__utils_bootstrapUtils__ = __webpack_require__(/*! ./utils/bootstrapUtils */ 10);\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar propTypes = {\n activePage: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.number,\n items: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.number,\n maxButtons: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.number,\n\n /**\n * When `true`, will display the first and the last button page when\n * displaying ellipsis.\n */\n boundaryLinks: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,\n\n /**\n * When `true`, will display the default node value ('…').\n * Otherwise, will display provided node (when specified).\n */\n ellipsis: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool, __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.node]),\n\n /**\n * When `true`, will display the default node value ('«').\n * Otherwise, will display provided node (when specified).\n */\n first: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool, __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.node]),\n\n /**\n * When `true`, will display the default node value ('»').\n * Otherwise, will display provided node (when specified).\n */\n last: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool, __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.node]),\n\n /**\n * When `true`, will display the default node value ('‹').\n * Otherwise, will display provided node (when specified).\n */\n prev: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool, __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.node]),\n\n /**\n * When `true`, will display the default node value ('›').\n * Otherwise, will display provided node (when specified).\n */\n next: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool, __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.node]),\n\n onSelect: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func,\n\n /**\n * You can use a custom element for the buttons\n */\n buttonComponentClass: __WEBPACK_IMPORTED_MODULE_8_react_prop_types_lib_elementType___default.a\n};\n\nvar defaultProps = {\n activePage: 1,\n items: 1,\n maxButtons: 0,\n first: false,\n last: false,\n prev: false,\n next: false,\n ellipsis: true,\n boundaryLinks: false\n};\n\nvar Pagination = function (_React$Component) {\n __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default()(Pagination, _React$Component);\n\n function Pagination() {\n __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default()(this, Pagination);\n\n return __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.apply(this, arguments));\n }\n\n Pagination.prototype.renderPageButtons = function renderPageButtons(activePage, items, maxButtons, boundaryLinks, ellipsis, buttonProps) {\n var pageButtons = [];\n\n var startPage = void 0;\n var endPage = void 0;\n\n if (maxButtons && maxButtons < items) {\n startPage = Math.max(Math.min(activePage - Math.floor(maxButtons / 2, 10), items - maxButtons + 1), 1);\n endPage = startPage + maxButtons - 1;\n } else {\n startPage = 1;\n endPage = items;\n }\n\n for (var page = startPage; page <= endPage; ++page) {\n pageButtons.push(__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_9__PaginationButton__[\"a\" /* default */],\n __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends___default()({}, buttonProps, {\n key: page,\n eventKey: page,\n active: page === activePage\n }),\n page\n ));\n }\n\n if (ellipsis && boundaryLinks && startPage > 1) {\n if (startPage > 2) {\n pageButtons.unshift(__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_9__PaginationButton__[\"a\" /* default */],\n {\n key: 'ellipsisFirst',\n disabled: true,\n componentClass: buttonProps.componentClass\n },\n __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(\n 'span',\n { 'aria-label': 'More' },\n ellipsis === true ? '\\u2026' : ellipsis\n )\n ));\n }\n\n pageButtons.unshift(__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_9__PaginationButton__[\"a\" /* default */],\n __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends___default()({}, buttonProps, {\n key: 1,\n eventKey: 1,\n active: false\n }),\n '1'\n ));\n }\n\n if (ellipsis && endPage < items) {\n if (!boundaryLinks || endPage < items - 1) {\n pageButtons.push(__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_9__PaginationButton__[\"a\" /* default */],\n {\n key: 'ellipsis',\n disabled: true,\n componentClass: buttonProps.componentClass\n },\n __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(\n 'span',\n { 'aria-label': 'More' },\n ellipsis === true ? '\\u2026' : ellipsis\n )\n ));\n }\n\n if (boundaryLinks) {\n pageButtons.push(__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_9__PaginationButton__[\"a\" /* default */],\n __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends___default()({}, buttonProps, {\n key: items,\n eventKey: items,\n active: false\n }),\n items\n ));\n }\n }\n\n return pageButtons;\n };\n\n Pagination.prototype.render = function render() {\n var _props = this.props,\n activePage = _props.activePage,\n items = _props.items,\n maxButtons = _props.maxButtons,\n boundaryLinks = _props.boundaryLinks,\n ellipsis = _props.ellipsis,\n first = _props.first,\n last = _props.last,\n prev = _props.prev,\n next = _props.next,\n onSelect = _props.onSelect,\n buttonComponentClass = _props.buttonComponentClass,\n className = _props.className,\n props = __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_objectWithoutProperties___default()(_props, ['activePage', 'items', 'maxButtons', 'boundaryLinks', 'ellipsis', 'first', 'last', 'prev', 'next', 'onSelect', 'buttonComponentClass', 'className']);\n\n var _splitBsProps = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_10__utils_bootstrapUtils__[\"a\" /* splitBsProps */])(props),\n bsProps = _splitBsProps[0],\n elementProps = _splitBsProps[1];\n\n var classes = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_10__utils_bootstrapUtils__[\"b\" /* getClassSet */])(bsProps);\n\n var buttonProps = {\n onSelect: onSelect,\n componentClass: buttonComponentClass\n };\n\n return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(\n 'ul',\n __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends___default()({}, elementProps, {\n className: __WEBPACK_IMPORTED_MODULE_5_classnames___default()(className, classes)\n }),\n first && __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_9__PaginationButton__[\"a\" /* default */],\n __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends___default()({}, buttonProps, {\n eventKey: 1,\n disabled: activePage === 1\n }),\n __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(\n 'span',\n { 'aria-label': 'First' },\n first === true ? '\\xAB' : first\n )\n ),\n prev && __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_9__PaginationButton__[\"a\" /* default */],\n __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends___default()({}, buttonProps, {\n eventKey: activePage - 1,\n disabled: activePage === 1\n }),\n __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(\n 'span',\n { 'aria-label': 'Previous' },\n prev === true ? '\\u2039' : prev\n )\n ),\n this.renderPageButtons(activePage, items, maxButtons, boundaryLinks, ellipsis, buttonProps),\n next && __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_9__PaginationButton__[\"a\" /* default */],\n __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends___default()({}, buttonProps, {\n eventKey: activePage + 1,\n disabled: activePage >= items\n }),\n __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(\n 'span',\n { 'aria-label': 'Next' },\n next === true ? '\\u203A' : next\n )\n ),\n last && __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_9__PaginationButton__[\"a\" /* default */],\n __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends___default()({}, buttonProps, {\n eventKey: items,\n disabled: activePage >= items\n }),\n __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(\n 'span',\n { 'aria-label': 'Last' },\n last === true ? '\\xBB' : last\n )\n )\n );\n };\n\n return Pagination;\n}(__WEBPACK_IMPORTED_MODULE_6_react___default.a.Component);\n\nPagination.propTypes = propTypes;\nPagination.defaultProps = defaultProps;\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_10__utils_bootstrapUtils__[\"c\" /* bsClass */])('pagination', Pagination));\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/Pagination.js\n// module id = 1292\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/Pagination.js?", + ); + + /***/ + }, + /* 1293 */ + /* exports provided: default */ + /*!***************************************!*\ + !*** ./~/react-bootstrap/es/Panel.js ***! + \***************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_object_values__ = __webpack_require__(/*! babel-runtime/core-js/object/values */ 92);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_object_values___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_object_values__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ 9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_extends__ = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_extends__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_classCallCheck__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_classCallCheck__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ 7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__Collapse__ = __webpack_require__(/*! ./Collapse */ 236);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__utils_bootstrapUtils__ = __webpack_require__(/*! ./utils/bootstrapUtils */ 10);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__utils_StyleConfig__ = __webpack_require__(/*! ./utils/StyleConfig */ 32);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n// TODO: Use uncontrollable.\n\nvar propTypes = {\n collapsible: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.bool,\n onSelect: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.func,\n header: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.node,\n id: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.number]),\n footer: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.node,\n defaultExpanded: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.bool,\n expanded: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.bool,\n eventKey: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.any,\n headerRole: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.string,\n panelRole: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.string,\n\n // From Collapse.\n onEnter: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.func,\n onEntering: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.func,\n onEntered: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.func,\n onExit: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.func,\n onExiting: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.func,\n onExited: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.func\n};\n\nvar defaultProps = {\n defaultExpanded: false\n};\n\nvar Panel = function (_React$Component) {\n __WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits___default()(Panel, _React$Component);\n\n function Panel(props, context) {\n __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_classCallCheck___default()(this, Panel);\n\n var _this = __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.call(this, props, context));\n\n _this.handleClickTitle = _this.handleClickTitle.bind(_this);\n\n _this.state = {\n expanded: _this.props.defaultExpanded\n };\n return _this;\n }\n\n Panel.prototype.handleClickTitle = function handleClickTitle(e) {\n // FIXME: What the heck? This API is horrible. This needs to go away!\n e.persist();\n e.selected = true;\n\n if (this.props.onSelect) {\n this.props.onSelect(this.props.eventKey, e);\n } else {\n e.preventDefault();\n }\n\n if (e.selected) {\n this.setState({ expanded: !this.state.expanded });\n }\n };\n\n Panel.prototype.renderHeader = function renderHeader(collapsible, header, id, role, expanded, bsProps) {\n var titleClassName = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_10__utils_bootstrapUtils__[\"e\" /* prefix */])(bsProps, 'title');\n\n if (!collapsible) {\n if (!__WEBPACK_IMPORTED_MODULE_7_react___default.a.isValidElement(header)) {\n return header;\n }\n\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_7_react__[\"cloneElement\"])(header, {\n className: __WEBPACK_IMPORTED_MODULE_6_classnames___default()(header.props.className, titleClassName)\n });\n }\n\n if (!__WEBPACK_IMPORTED_MODULE_7_react___default.a.isValidElement(header)) {\n return __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement(\n 'h4',\n { role: 'presentation', className: titleClassName },\n this.renderAnchor(header, id, role, expanded)\n );\n }\n\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_7_react__[\"cloneElement\"])(header, {\n className: __WEBPACK_IMPORTED_MODULE_6_classnames___default()(header.props.className, titleClassName),\n children: this.renderAnchor(header.props.children, id, role, expanded)\n });\n };\n\n Panel.prototype.renderAnchor = function renderAnchor(header, id, role, expanded) {\n return __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement(\n 'a',\n {\n role: role,\n href: id && '#' + id,\n onClick: this.handleClickTitle,\n 'aria-controls': id,\n 'aria-expanded': expanded,\n 'aria-selected': expanded,\n className: expanded ? null : 'collapsed'\n },\n header\n );\n };\n\n Panel.prototype.renderCollapsibleBody = function renderCollapsibleBody(id, expanded, role, children, bsProps, animationHooks) {\n return __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_9__Collapse__[\"a\" /* default */],\n __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_extends___default()({ 'in': expanded }, animationHooks),\n __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement(\n 'div',\n {\n id: id,\n role: role,\n className: __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_10__utils_bootstrapUtils__[\"e\" /* prefix */])(bsProps, 'collapse'),\n 'aria-hidden': !expanded\n },\n this.renderBody(children, bsProps)\n )\n );\n };\n\n Panel.prototype.renderBody = function renderBody(rawChildren, bsProps) {\n var children = [];\n var bodyChildren = [];\n\n var bodyClassName = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_10__utils_bootstrapUtils__[\"e\" /* prefix */])(bsProps, 'body');\n\n function maybeAddBody() {\n if (!bodyChildren.length) {\n return;\n }\n\n // Derive the key from the index here, since we need to make one up.\n children.push(__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement(\n 'div',\n { key: children.length, className: bodyClassName },\n bodyChildren\n ));\n\n bodyChildren = [];\n }\n\n // Convert to array so we can re-use keys.\n __WEBPACK_IMPORTED_MODULE_7_react___default.a.Children.toArray(rawChildren).forEach(function (child) {\n if (__WEBPACK_IMPORTED_MODULE_7_react___default.a.isValidElement(child) && child.props.fill) {\n maybeAddBody();\n\n // Remove the child's unknown `fill` prop.\n children.push(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_7_react__[\"cloneElement\"])(child, { fill: undefined }));\n\n return;\n }\n\n bodyChildren.push(child);\n });\n\n maybeAddBody();\n\n return children;\n };\n\n Panel.prototype.render = function render() {\n var _props = this.props,\n collapsible = _props.collapsible,\n header = _props.header,\n id = _props.id,\n footer = _props.footer,\n propsExpanded = _props.expanded,\n headerRole = _props.headerRole,\n panelRole = _props.panelRole,\n className = _props.className,\n children = _props.children,\n onEnter = _props.onEnter,\n onEntering = _props.onEntering,\n onEntered = _props.onEntered,\n onExit = _props.onExit,\n onExiting = _props.onExiting,\n onExited = _props.onExited,\n props = __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default()(_props, ['collapsible', 'header', 'id', 'footer', 'expanded', 'headerRole', 'panelRole', 'className', 'children', 'onEnter', 'onEntering', 'onEntered', 'onExit', 'onExiting', 'onExited']);\n\n var _splitBsPropsAndOmit = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_10__utils_bootstrapUtils__[\"f\" /* splitBsPropsAndOmit */])(props, ['defaultExpanded', 'eventKey', 'onSelect']),\n bsProps = _splitBsPropsAndOmit[0],\n elementProps = _splitBsPropsAndOmit[1];\n\n var expanded = propsExpanded != null ? propsExpanded : this.state.expanded;\n\n var classes = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_10__utils_bootstrapUtils__[\"b\" /* getClassSet */])(bsProps);\n\n return __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement(\n 'div',\n __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_extends___default()({}, elementProps, {\n className: __WEBPACK_IMPORTED_MODULE_6_classnames___default()(className, classes),\n id: collapsible ? null : id\n }),\n header && __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement(\n 'div',\n { className: __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_10__utils_bootstrapUtils__[\"e\" /* prefix */])(bsProps, 'heading') },\n this.renderHeader(collapsible, header, id, headerRole, expanded, bsProps)\n ),\n collapsible ? this.renderCollapsibleBody(id, expanded, panelRole, children, bsProps, { onEnter: onEnter, onEntering: onEntering, onEntered: onEntered, onExit: onExit, onExiting: onExiting, onExited: onExited }) : this.renderBody(children, bsProps),\n footer && __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement(\n 'div',\n { className: __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_10__utils_bootstrapUtils__[\"e\" /* prefix */])(bsProps, 'footer') },\n footer\n )\n );\n };\n\n return Panel;\n}(__WEBPACK_IMPORTED_MODULE_7_react___default.a.Component);\n\nPanel.propTypes = propTypes;\nPanel.defaultProps = defaultProps;\n\n/* unused harmony default export */ var _unused_webpack_default_export = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_10__utils_bootstrapUtils__[\"c\" /* bsClass */])('panel', __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_10__utils_bootstrapUtils__[\"g\" /* bsStyles */])([].concat(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_object_values___default()(__WEBPACK_IMPORTED_MODULE_11__utils_StyleConfig__[\"c\" /* State */]), [__WEBPACK_IMPORTED_MODULE_11__utils_StyleConfig__[\"d\" /* Style */].DEFAULT, __WEBPACK_IMPORTED_MODULE_11__utils_StyleConfig__[\"d\" /* Style */].PRIMARY]), __WEBPACK_IMPORTED_MODULE_11__utils_StyleConfig__[\"d\" /* Style */].DEFAULT, Panel)));\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/Panel.js\n// module id = 1293\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/Panel.js?", + ); + + /***/ + }, + /* 1294 */ + /* exports provided: default */ + /*!*****************************************!*\ + !*** ./~/react-bootstrap/es/Popover.js ***! + \*****************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ 9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ 7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_react_prop_types_lib_isRequiredForA11y__ = __webpack_require__(/*! react-prop-types/lib/isRequiredForA11y */ 175);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_react_prop_types_lib_isRequiredForA11y___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_react_prop_types_lib_isRequiredForA11y__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__ = __webpack_require__(/*! ./utils/bootstrapUtils */ 10);\n\n\n\n\n\n\n\n\n\n\n\n\nvar propTypes = {\n /**\n * An html id attribute, necessary for accessibility\n * @type {string}\n * @required\n */\n id: __WEBPACK_IMPORTED_MODULE_8_react_prop_types_lib_isRequiredForA11y___default()(__WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.number])),\n\n /**\n * Sets the direction the Popover is positioned towards.\n */\n placement: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.oneOf(['top', 'right', 'bottom', 'left']),\n\n /**\n * The \"top\" position value for the Popover.\n */\n positionTop: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.number, __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string]),\n /**\n * The \"left\" position value for the Popover.\n */\n positionLeft: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.number, __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string]),\n\n /**\n * The \"top\" position value for the Popover arrow.\n */\n arrowOffsetTop: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.number, __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string]),\n /**\n * The \"left\" position value for the Popover arrow.\n */\n arrowOffsetLeft: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.number, __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string]),\n\n /**\n * Title content\n */\n title: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.node\n};\n\nvar defaultProps = {\n placement: 'right'\n};\n\nvar Popover = function (_React$Component) {\n __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default()(Popover, _React$Component);\n\n function Popover() {\n __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default()(this, Popover);\n\n return __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.apply(this, arguments));\n }\n\n Popover.prototype.render = function render() {\n var _extends2;\n\n var _props = this.props,\n placement = _props.placement,\n positionTop = _props.positionTop,\n positionLeft = _props.positionLeft,\n arrowOffsetTop = _props.arrowOffsetTop,\n arrowOffsetLeft = _props.arrowOffsetLeft,\n title = _props.title,\n className = _props.className,\n style = _props.style,\n children = _props.children,\n props = __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default()(_props, ['placement', 'positionTop', 'positionLeft', 'arrowOffsetTop', 'arrowOffsetLeft', 'title', 'className', 'style', 'children']);\n\n var _splitBsProps = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__[\"a\" /* splitBsProps */])(props),\n bsProps = _splitBsProps[0],\n elementProps = _splitBsProps[1];\n\n var classes = __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__[\"b\" /* getClassSet */])(bsProps), (_extends2 = {}, _extends2[placement] = true, _extends2));\n\n var outerStyle = __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({\n display: 'block',\n top: positionTop,\n left: positionLeft\n }, style);\n\n var arrowStyle = {\n top: arrowOffsetTop,\n left: arrowOffsetLeft\n };\n\n return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(\n 'div',\n __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, elementProps, {\n role: 'tooltip',\n className: __WEBPACK_IMPORTED_MODULE_5_classnames___default()(className, classes),\n style: outerStyle\n }),\n __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('div', { className: 'arrow', style: arrowStyle }),\n title && __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(\n 'h3',\n { className: __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__[\"e\" /* prefix */])(bsProps, 'title') },\n title\n ),\n __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(\n 'div',\n { className: __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__[\"e\" /* prefix */])(bsProps, 'content') },\n children\n )\n );\n };\n\n return Popover;\n}(__WEBPACK_IMPORTED_MODULE_6_react___default.a.Component);\n\nPopover.propTypes = propTypes;\nPopover.defaultProps = defaultProps;\n\n/* unused harmony default export */ var _unused_webpack_default_export = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__[\"c\" /* bsClass */])('popover', Popover));\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/Popover.js\n// module id = 1294\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/Popover.js?", + ); + + /***/ + }, + /* 1295 */ + /* exports provided: default */ + /*!*********************************************!*\ + !*** ./~/react-bootstrap/es/ProgressBar.js ***! + \*********************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_object_values__ = __webpack_require__(/*! babel-runtime/core-js/object/values */ 92);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_object_values___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_object_values__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends__ = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ 9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_objectWithoutProperties__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_classCallCheck__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_classCallCheck__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ 7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__ = __webpack_require__(/*! ./utils/bootstrapUtils */ 10);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__utils_StyleConfig__ = __webpack_require__(/*! ./utils/StyleConfig */ 32);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__utils_ValidComponentChildren__ = __webpack_require__(/*! ./utils/ValidComponentChildren */ 34);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar ROUND_PRECISION = 1000;\n\n/**\n * Validate that children, if any, are instances of `<ProgressBar>`.\n */\nfunction onlyProgressBar(props, propName, componentName) {\n var children = props[propName];\n if (!children) {\n return null;\n }\n\n var error = null;\n\n __WEBPACK_IMPORTED_MODULE_7_react___default.a.Children.forEach(children, function (child) {\n if (error) {\n return;\n }\n\n if (child.type === ProgressBar) {\n // eslint-disable-line no-use-before-define\n return;\n }\n\n var childIdentifier = __WEBPACK_IMPORTED_MODULE_7_react___default.a.isValidElement(child) ? child.type.displayName || child.type.name || child.type : child;\n error = new Error('Children of ' + componentName + ' can contain only ProgressBar ' + ('components. Found ' + childIdentifier + '.'));\n });\n\n return error;\n}\n\nvar propTypes = {\n min: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.number,\n now: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.number,\n max: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.number,\n label: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.node,\n srOnly: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.bool,\n striped: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.bool,\n active: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.bool,\n children: onlyProgressBar,\n\n /**\n * @private\n */\n isChild: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.bool\n};\n\nvar defaultProps = {\n min: 0,\n max: 100,\n active: false,\n isChild: false,\n srOnly: false,\n striped: false\n};\n\nfunction getPercentage(now, min, max) {\n var percentage = (now - min) / (max - min) * 100;\n return Math.round(percentage * ROUND_PRECISION) / ROUND_PRECISION;\n}\n\nvar ProgressBar = function (_React$Component) {\n __WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits___default()(ProgressBar, _React$Component);\n\n function ProgressBar() {\n __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_classCallCheck___default()(this, ProgressBar);\n\n return __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.apply(this, arguments));\n }\n\n ProgressBar.prototype.renderProgressBar = function renderProgressBar(_ref) {\n var _extends2;\n\n var min = _ref.min,\n now = _ref.now,\n max = _ref.max,\n label = _ref.label,\n srOnly = _ref.srOnly,\n striped = _ref.striped,\n active = _ref.active,\n className = _ref.className,\n style = _ref.style,\n props = __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_objectWithoutProperties___default()(_ref, ['min', 'now', 'max', 'label', 'srOnly', 'striped', 'active', 'className', 'style']);\n\n var _splitBsProps = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__[\"a\" /* splitBsProps */])(props),\n bsProps = _splitBsProps[0],\n elementProps = _splitBsProps[1];\n\n var classes = __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends___default()({}, __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__[\"b\" /* getClassSet */])(bsProps), (_extends2 = {\n active: active\n }, _extends2[__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__[\"e\" /* prefix */])(bsProps, 'striped')] = active || striped, _extends2));\n\n return __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement(\n 'div',\n __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends___default()({}, elementProps, {\n role: 'progressbar',\n className: __WEBPACK_IMPORTED_MODULE_6_classnames___default()(className, classes),\n style: __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends___default()({ width: getPercentage(now, min, max) + '%' }, style),\n 'aria-valuenow': now,\n 'aria-valuemin': min,\n 'aria-valuemax': max\n }),\n srOnly ? __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement(\n 'span',\n { className: 'sr-only' },\n label\n ) : label\n );\n };\n\n ProgressBar.prototype.render = function render() {\n var _props = this.props,\n isChild = _props.isChild,\n props = __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_objectWithoutProperties___default()(_props, ['isChild']);\n\n if (isChild) {\n return this.renderProgressBar(props);\n }\n\n var min = props.min,\n now = props.now,\n max = props.max,\n label = props.label,\n srOnly = props.srOnly,\n striped = props.striped,\n active = props.active,\n bsClass = props.bsClass,\n bsStyle = props.bsStyle,\n className = props.className,\n children = props.children,\n wrapperProps = __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_objectWithoutProperties___default()(props, ['min', 'now', 'max', 'label', 'srOnly', 'striped', 'active', 'bsClass', 'bsStyle', 'className', 'children']);\n\n return __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement(\n 'div',\n __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends___default()({}, wrapperProps, {\n className: __WEBPACK_IMPORTED_MODULE_6_classnames___default()(className, 'progress')\n }),\n children ? __WEBPACK_IMPORTED_MODULE_11__utils_ValidComponentChildren__[\"a\" /* default */].map(children, function (child) {\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_7_react__[\"cloneElement\"])(child, { isChild: true });\n }) : this.renderProgressBar({\n min: min, now: now, max: max, label: label, srOnly: srOnly, striped: striped, active: active, bsClass: bsClass, bsStyle: bsStyle\n })\n );\n };\n\n return ProgressBar;\n}(__WEBPACK_IMPORTED_MODULE_7_react___default.a.Component);\n\nProgressBar.propTypes = propTypes;\nProgressBar.defaultProps = defaultProps;\n\n/* unused harmony default export */ var _unused_webpack_default_export = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__[\"c\" /* bsClass */])('progress-bar', __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__[\"g\" /* bsStyles */])(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_object_values___default()(__WEBPACK_IMPORTED_MODULE_10__utils_StyleConfig__[\"c\" /* State */]), ProgressBar)));\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/ProgressBar.js\n// module id = 1295\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/ProgressBar.js?", + ); + + /***/ + }, + /* 1296 */ + /* exports provided: default */ + /*!***************************************!*\ + !*** ./~/react-bootstrap/es/Radio.js ***! + \***************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ 9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ 7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_warning__ = __webpack_require__(/*! warning */ 23);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_warning__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__ = __webpack_require__(/*! ./utils/bootstrapUtils */ 10);\n\n\n\n\n\n\n\n\n\n\n\n\nvar propTypes = {\n inline: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,\n disabled: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,\n /**\n * Only valid if `inline` is not set.\n */\n validationState: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.oneOf(['success', 'warning', 'error', null]),\n /**\n * Attaches a ref to the `<input>` element. Only functions can be used here.\n *\n * ```js\n * <Radio inputRef={ref => { this.input = ref; }} />\n * ```\n */\n inputRef: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func\n};\n\nvar defaultProps = {\n inline: false,\n disabled: false\n};\n\nvar Radio = function (_React$Component) {\n __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default()(Radio, _React$Component);\n\n function Radio() {\n __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default()(this, Radio);\n\n return __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.apply(this, arguments));\n }\n\n Radio.prototype.render = function render() {\n var _props = this.props,\n inline = _props.inline,\n disabled = _props.disabled,\n validationState = _props.validationState,\n inputRef = _props.inputRef,\n className = _props.className,\n style = _props.style,\n children = _props.children,\n props = __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default()(_props, ['inline', 'disabled', 'validationState', 'inputRef', 'className', 'style', 'children']);\n\n var _splitBsProps = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__[\"a\" /* splitBsProps */])(props),\n bsProps = _splitBsProps[0],\n elementProps = _splitBsProps[1];\n\n var input = __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('input', __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, elementProps, {\n ref: inputRef,\n type: 'radio',\n disabled: disabled\n }));\n\n if (inline) {\n var _classes2;\n\n var _classes = (_classes2 = {}, _classes2[__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__[\"e\" /* prefix */])(bsProps, 'inline')] = true, _classes2.disabled = disabled, _classes2);\n\n // Use a warning here instead of in propTypes to get better-looking\n // generated documentation.\n true ? __WEBPACK_IMPORTED_MODULE_8_warning___default()(!validationState, '`validationState` is ignored on `<Radio inline>`. To display ' + 'validation state on an inline radio, set `validationState` on a ' + 'parent `<FormGroup>` or other element instead.') : void 0;\n\n return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(\n 'label',\n { className: __WEBPACK_IMPORTED_MODULE_5_classnames___default()(className, _classes), style: style },\n input,\n children\n );\n }\n\n var classes = __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__[\"b\" /* getClassSet */])(bsProps), {\n disabled: disabled\n });\n if (validationState) {\n classes['has-' + validationState] = true;\n }\n\n return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_5_classnames___default()(className, classes), style: style },\n __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(\n 'label',\n null,\n input,\n children\n )\n );\n };\n\n return Radio;\n}(__WEBPACK_IMPORTED_MODULE_6_react___default.a.Component);\n\nRadio.propTypes = propTypes;\nRadio.defaultProps = defaultProps;\n\n/* unused harmony default export */ var _unused_webpack_default_export = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__[\"c\" /* bsClass */])('radio', Radio));\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/Radio.js\n// module id = 1296\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/Radio.js?", + ); + + /***/ + }, + /* 1297 */ + /* exports provided: default */ + /*!*************************************************!*\ + !*** ./~/react-bootstrap/es/ResponsiveEmbed.js ***! + \*************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ 9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ 7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_warning__ = __webpack_require__(/*! warning */ 23);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_warning__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__ = __webpack_require__(/*! ./utils/bootstrapUtils */ 10);\n\n\n\n\n\n\n\n\n\n\n\n\n// TODO: This should probably take a single `aspectRatio` prop.\n\nvar propTypes = {\n /**\n * This component requires a single child element\n */\n children: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.element.isRequired,\n /**\n * 16by9 aspect ratio\n */\n a16by9: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,\n /**\n * 4by3 aspect ratio\n */\n a4by3: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool\n};\n\nvar defaultProps = {\n a16by9: false,\n a4by3: false\n};\n\nvar ResponsiveEmbed = function (_React$Component) {\n __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default()(ResponsiveEmbed, _React$Component);\n\n function ResponsiveEmbed() {\n __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default()(this, ResponsiveEmbed);\n\n return __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.apply(this, arguments));\n }\n\n ResponsiveEmbed.prototype.render = function render() {\n var _extends2;\n\n var _props = this.props,\n a16by9 = _props.a16by9,\n a4by3 = _props.a4by3,\n className = _props.className,\n children = _props.children,\n props = __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default()(_props, ['a16by9', 'a4by3', 'className', 'children']);\n\n var _splitBsProps = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__[\"a\" /* splitBsProps */])(props),\n bsProps = _splitBsProps[0],\n elementProps = _splitBsProps[1];\n\n true ? __WEBPACK_IMPORTED_MODULE_8_warning___default()(a16by9 || a4by3, 'Either `a16by9` or `a4by3` must be set.') : void 0;\n true ? __WEBPACK_IMPORTED_MODULE_8_warning___default()(!(a16by9 && a4by3), 'Only one of `a16by9` or `a4by3` can be set.') : void 0;\n\n var classes = __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__[\"b\" /* getClassSet */])(bsProps), (_extends2 = {}, _extends2[__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__[\"e\" /* prefix */])(bsProps, '16by9')] = a16by9, _extends2[__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__[\"e\" /* prefix */])(bsProps, '4by3')] = a4by3, _extends2));\n\n return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(\n 'div',\n { className: __WEBPACK_IMPORTED_MODULE_5_classnames___default()(classes) },\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6_react__[\"cloneElement\"])(children, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, elementProps, {\n className: __WEBPACK_IMPORTED_MODULE_5_classnames___default()(className, __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__[\"e\" /* prefix */])(bsProps, 'item'))\n }))\n );\n };\n\n return ResponsiveEmbed;\n}(__WEBPACK_IMPORTED_MODULE_6_react___default.a.Component);\n\nResponsiveEmbed.propTypes = propTypes;\nResponsiveEmbed.defaultProps = defaultProps;\n\n/* unused harmony default export */ var _unused_webpack_default_export = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__[\"c\" /* bsClass */])('embed-responsive', ResponsiveEmbed));\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/ResponsiveEmbed.js\n// module id = 1297\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/ResponsiveEmbed.js?", + ); + + /***/ + }, + /* 1298 */ + /* exports provided: default */ + /*!*************************************!*\ + !*** ./~/react-bootstrap/es/Row.js ***! + \*************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ 9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ 7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react_prop_types_lib_elementType__ = __webpack_require__(/*! react-prop-types/lib/elementType */ 18);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react_prop_types_lib_elementType___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_react_prop_types_lib_elementType__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__ = __webpack_require__(/*! ./utils/bootstrapUtils */ 10);\n\n\n\n\n\n\n\n\n\n\n\nvar propTypes = {\n componentClass: __WEBPACK_IMPORTED_MODULE_7_react_prop_types_lib_elementType___default.a\n};\n\nvar defaultProps = {\n componentClass: 'div'\n};\n\nvar Row = function (_React$Component) {\n __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default()(Row, _React$Component);\n\n function Row() {\n __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default()(this, Row);\n\n return __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.apply(this, arguments));\n }\n\n Row.prototype.render = function render() {\n var _props = this.props,\n Component = _props.componentClass,\n className = _props.className,\n props = __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default()(_props, ['componentClass', 'className']);\n\n var _splitBsProps = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__[\"a\" /* splitBsProps */])(props),\n bsProps = _splitBsProps[0],\n elementProps = _splitBsProps[1];\n\n var classes = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__[\"b\" /* getClassSet */])(bsProps);\n\n return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(Component, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, elementProps, {\n className: __WEBPACK_IMPORTED_MODULE_5_classnames___default()(className, classes)\n }));\n };\n\n return Row;\n}(__WEBPACK_IMPORTED_MODULE_6_react___default.a.Component);\n\nRow.propTypes = propTypes;\nRow.defaultProps = defaultProps;\n\n/* unused harmony default export */ var _unused_webpack_default_export = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__[\"c\" /* bsClass */])('row', Row));\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/Row.js\n// module id = 1298\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/Row.js?", + ); + + /***/ + }, + /* 1299 */ + /* exports provided: default */ + /*!*********************************************!*\ + !*** ./~/react-bootstrap/es/SplitButton.js ***! + \*********************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ 9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_objectWithoutProperties__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ 7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_extends__ = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_extends__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__Button__ = __webpack_require__(/*! ./Button */ 119);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__Dropdown__ = __webpack_require__(/*! ./Dropdown */ 165);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__SplitToggle__ = __webpack_require__(/*! ./SplitToggle */ 1300);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__utils_splitComponentProps__ = __webpack_require__(/*! ./utils/splitComponentProps */ 167);\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar propTypes = __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_extends___default()({}, __WEBPACK_IMPORTED_MODULE_8__Dropdown__["a" /* default */].propTypes, {\n\n // Toggle props.\n bsStyle: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,\n bsSize: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,\n href: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,\n onClick: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,\n /**\n * The content of the split button.\n */\n title: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.node.isRequired,\n /**\n * Accessible label for the toggle; the value of `title` if not specified.\n */\n toggleLabel: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,\n\n // Override generated docs from <Dropdown>.\n /**\n * @private\n */\n children: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.node\n});\n\nvar SplitButton = function (_React$Component) {\n __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits___default()(SplitButton, _React$Component);\n\n function SplitButton() {\n __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck___default()(this, SplitButton);\n\n return __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.apply(this, arguments));\n }\n\n SplitButton.prototype.render = function render() {\n var _props = this.props,\n bsSize = _props.bsSize,\n bsStyle = _props.bsStyle,\n title = _props.title,\n toggleLabel = _props.toggleLabel,\n children = _props.children,\n props = __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_objectWithoutProperties___default()(_props, [\'bsSize\', \'bsStyle\', \'title\', \'toggleLabel\', \'children\']);\n\n var _splitComponentProps = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_10__utils_splitComponentProps__["a" /* default */])(props, __WEBPACK_IMPORTED_MODULE_8__Dropdown__["a" /* default */].ControlledComponent),\n dropdownProps = _splitComponentProps[0],\n buttonProps = _splitComponentProps[1];\n\n return __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_8__Dropdown__["a" /* default */],\n __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_extends___default()({}, dropdownProps, {\n bsSize: bsSize,\n bsStyle: bsStyle\n }),\n __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_7__Button__["a" /* default */],\n __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_extends___default()({}, buttonProps, {\n disabled: props.disabled,\n bsSize: bsSize,\n bsStyle: bsStyle\n }),\n title\n ),\n __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_9__SplitToggle__["a" /* default */], {\n \'aria-label\': toggleLabel || title,\n bsSize: bsSize,\n bsStyle: bsStyle\n }),\n __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_8__Dropdown__["a" /* default */].Menu,\n null,\n children\n )\n );\n };\n\n return SplitButton;\n}(__WEBPACK_IMPORTED_MODULE_5_react___default.a.Component);\n\nSplitButton.propTypes = propTypes;\n\nSplitButton.Toggle = __WEBPACK_IMPORTED_MODULE_9__SplitToggle__["a" /* default */];\n\n/* unused harmony default export */ var _unused_webpack_default_export = (SplitButton);\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/SplitButton.js\n// module id = 1299\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/SplitButton.js?', + ); + + /***/ + }, + /* 1300 */ + /* exports provided: default */ + /* exports used: default */ + /*!*********************************************!*\ + !*** ./~/react-bootstrap/es/SplitToggle.js ***! + \*********************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ 7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__DropdownToggle__ = __webpack_require__(/*! ./DropdownToggle */ 497);\n\n\n\n\n\n\n\n\nvar SplitToggle = function (_React$Component) {\n __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits___default()(SplitToggle, _React$Component);\n\n function SplitToggle() {\n __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck___default()(this, SplitToggle);\n\n return __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.apply(this, arguments));\n }\n\n SplitToggle.prototype.render = function render() {\n return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5__DropdownToggle__["a" /* default */], __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, this.props, {\n useAnchor: false,\n noCaret: false\n }));\n };\n\n return SplitToggle;\n}(__WEBPACK_IMPORTED_MODULE_4_react___default.a.Component);\n\nSplitToggle.defaultProps = __WEBPACK_IMPORTED_MODULE_5__DropdownToggle__["a" /* default */].defaultProps;\n\n/* harmony default export */ __webpack_exports__["a"] = (SplitToggle);\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/SplitToggle.js\n// module id = 1300\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/SplitToggle.js?', + ); + + /***/ + }, + /* 1301 */ + /* exports provided: default */ + /*!*************************************!*\ + !*** ./~/react-bootstrap/es/Tab.js ***! + \*************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_possibleConstructorReturn__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_inherits__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ 7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_inherits__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_extends__ = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_extends__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__TabContainer__ = __webpack_require__(/*! ./TabContainer */ 239);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__TabContent__ = __webpack_require__(/*! ./TabContent */ 240);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__TabPane__ = __webpack_require__(/*! ./TabPane */ 511);\n\n\n\n\n\n\n\n\n\n\n\nvar propTypes = __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_extends___default()({}, __WEBPACK_IMPORTED_MODULE_8__TabPane__["a" /* default */].propTypes, {\n\n disabled: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.bool,\n\n title: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.node,\n\n /**\n * tabClassName is used as className for the associated NavItem\n */\n tabClassName: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.string\n});\n\nvar Tab = function (_React$Component) {\n __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_inherits___default()(Tab, _React$Component);\n\n function Tab() {\n __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck___default()(this, Tab);\n\n return __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.apply(this, arguments));\n }\n\n Tab.prototype.render = function render() {\n var props = __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_extends___default()({}, this.props);\n\n // These props are for the parent `<Tabs>` rather than the `<TabPane>`.\n delete props.title;\n delete props.disabled;\n delete props.tabClassName;\n\n return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_8__TabPane__["a" /* default */], props);\n };\n\n return Tab;\n}(__WEBPACK_IMPORTED_MODULE_4_react___default.a.Component);\n\nTab.propTypes = propTypes;\n\nTab.Container = __WEBPACK_IMPORTED_MODULE_6__TabContainer__["a" /* default */];\nTab.Content = __WEBPACK_IMPORTED_MODULE_7__TabContent__["a" /* default */];\nTab.Pane = __WEBPACK_IMPORTED_MODULE_8__TabPane__["a" /* default */];\n\n/* unused harmony default export */ var _unused_webpack_default_export = (Tab);\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/Tab.js\n// module id = 1301\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/Tab.js?', + ); + + /***/ + }, + /* 1302 */ + /* exports provided: default */ + /*!***************************************!*\ + !*** ./~/react-bootstrap/es/Table.js ***! + \***************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ 9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ 7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__ = __webpack_require__(/*! ./utils/bootstrapUtils */ 10);\n\n\n\n\n\n\n\n\n\n\n\nvar propTypes = {\n striped: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,\n bordered: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,\n condensed: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,\n hover: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,\n responsive: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool\n};\n\nvar defaultProps = {\n bordered: false,\n condensed: false,\n hover: false,\n responsive: false,\n striped: false\n};\n\nvar Table = function (_React$Component) {\n __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default()(Table, _React$Component);\n\n function Table() {\n __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default()(this, Table);\n\n return __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.apply(this, arguments));\n }\n\n Table.prototype.render = function render() {\n var _extends2;\n\n var _props = this.props,\n striped = _props.striped,\n bordered = _props.bordered,\n condensed = _props.condensed,\n hover = _props.hover,\n responsive = _props.responsive,\n className = _props.className,\n props = __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default()(_props, ['striped', 'bordered', 'condensed', 'hover', 'responsive', 'className']);\n\n var _splitBsProps = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__[\"a\" /* splitBsProps */])(props),\n bsProps = _splitBsProps[0],\n elementProps = _splitBsProps[1];\n\n var classes = __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__[\"b\" /* getClassSet */])(bsProps), (_extends2 = {}, _extends2[__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__[\"e\" /* prefix */])(bsProps, 'striped')] = striped, _extends2[__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__[\"e\" /* prefix */])(bsProps, 'bordered')] = bordered, _extends2[__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__[\"e\" /* prefix */])(bsProps, 'condensed')] = condensed, _extends2[__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__[\"e\" /* prefix */])(bsProps, 'hover')] = hover, _extends2));\n\n var table = __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('table', __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, elementProps, {\n className: __WEBPACK_IMPORTED_MODULE_5_classnames___default()(className, classes)\n }));\n\n if (responsive) {\n return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(\n 'div',\n { className: __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__[\"e\" /* prefix */])(bsProps, 'responsive') },\n table\n );\n }\n\n return table;\n };\n\n return Table;\n}(__WEBPACK_IMPORTED_MODULE_6_react___default.a.Component);\n\nTable.propTypes = propTypes;\nTable.defaultProps = defaultProps;\n\n/* unused harmony default export */ var _unused_webpack_default_export = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__[\"c\" /* bsClass */])('table', Table));\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/Table.js\n// module id = 1302\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/Table.js?", + ); + + /***/ + }, + /* 1303 */ + /* exports provided: default */ + /*!**************************************!*\ + !*** ./~/react-bootstrap/es/Tabs.js ***! + \**************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ 9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ 7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react_prop_types_lib_isRequiredForA11y__ = __webpack_require__(/*! react-prop-types/lib/isRequiredForA11y */ 175);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react_prop_types_lib_isRequiredForA11y___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_react_prop_types_lib_isRequiredForA11y__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_uncontrollable__ = __webpack_require__(/*! uncontrollable */ 178);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_uncontrollable___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_uncontrollable__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__Nav__ = __webpack_require__(/*! ./Nav */ 504);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__NavItem__ = __webpack_require__(/*! ./NavItem */ 505);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__TabContainer__ = __webpack_require__(/*! ./TabContainer */ 239);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__TabContent__ = __webpack_require__(/*! ./TabContent */ 240);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__utils_bootstrapUtils__ = __webpack_require__(/*! ./utils/bootstrapUtils */ 10);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__utils_ValidComponentChildren__ = __webpack_require__(/*! ./utils/ValidComponentChildren */ 34);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar TabContainer = __WEBPACK_IMPORTED_MODULE_11__TabContainer__[\"a\" /* default */].ControlledComponent;\n\nvar propTypes = {\n /**\n * Mark the Tab with a matching `eventKey` as active.\n *\n * @controllable onSelect\n */\n activeKey: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.any,\n\n /**\n * Navigation style\n */\n bsStyle: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOf(['tabs', 'pills']),\n\n animation: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool,\n\n id: __WEBPACK_IMPORTED_MODULE_7_react_prop_types_lib_isRequiredForA11y___default()(__WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.number])),\n\n /**\n * Callback fired when a Tab is selected.\n *\n * ```js\n * function (\n * \tAny eventKey,\n * \tSyntheticEvent event?\n * )\n * ```\n *\n * @controllable activeKey\n */\n onSelect: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,\n\n /**\n * Wait until the first \"enter\" transition to mount tabs (add them to the DOM)\n */\n mountOnEnter: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool,\n\n /**\n * Unmount tabs (remove it from the DOM) when it is no longer visible\n */\n unmountOnExit: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool\n};\n\nvar defaultProps = {\n bsStyle: 'tabs',\n animation: true,\n mountOnEnter: false,\n unmountOnExit: false\n};\n\nfunction getDefaultActiveKey(children) {\n var defaultActiveKey = void 0;\n __WEBPACK_IMPORTED_MODULE_14__utils_ValidComponentChildren__[\"a\" /* default */].forEach(children, function (child) {\n if (defaultActiveKey == null) {\n defaultActiveKey = child.props.eventKey;\n }\n });\n\n return defaultActiveKey;\n}\n\nvar Tabs = function (_React$Component) {\n __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default()(Tabs, _React$Component);\n\n function Tabs() {\n __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default()(this, Tabs);\n\n return __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.apply(this, arguments));\n }\n\n Tabs.prototype.renderTab = function renderTab(child) {\n var _child$props = child.props,\n title = _child$props.title,\n eventKey = _child$props.eventKey,\n disabled = _child$props.disabled,\n tabClassName = _child$props.tabClassName;\n\n if (title == null) {\n return null;\n }\n\n return __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_10__NavItem__[\"a\" /* default */],\n {\n eventKey: eventKey,\n disabled: disabled,\n className: tabClassName\n },\n title\n );\n };\n\n Tabs.prototype.render = function render() {\n var _props = this.props,\n id = _props.id,\n onSelect = _props.onSelect,\n animation = _props.animation,\n mountOnEnter = _props.mountOnEnter,\n unmountOnExit = _props.unmountOnExit,\n bsClass = _props.bsClass,\n className = _props.className,\n style = _props.style,\n children = _props.children,\n _props$activeKey = _props.activeKey,\n activeKey = _props$activeKey === undefined ? getDefaultActiveKey(children) : _props$activeKey,\n props = __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default()(_props, ['id', 'onSelect', 'animation', 'mountOnEnter', 'unmountOnExit', 'bsClass', 'className', 'style', 'children', 'activeKey']);\n\n return __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(\n TabContainer,\n {\n id: id,\n activeKey: activeKey,\n onSelect: onSelect,\n className: className,\n style: style\n },\n __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(\n 'div',\n null,\n __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_9__Nav__[\"a\" /* default */],\n __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, props, {\n role: 'tablist'\n }),\n __WEBPACK_IMPORTED_MODULE_14__utils_ValidComponentChildren__[\"a\" /* default */].map(children, this.renderTab)\n ),\n __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_12__TabContent__[\"a\" /* default */],\n {\n bsClass: bsClass,\n animation: animation,\n mountOnEnter: mountOnEnter,\n unmountOnExit: unmountOnExit\n },\n children\n )\n )\n );\n };\n\n return Tabs;\n}(__WEBPACK_IMPORTED_MODULE_5_react___default.a.Component);\n\nTabs.propTypes = propTypes;\nTabs.defaultProps = defaultProps;\n\n__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_13__utils_bootstrapUtils__[\"c\" /* bsClass */])('tab', Tabs);\n\n/* unused harmony default export */ var _unused_webpack_default_export = (__WEBPACK_IMPORTED_MODULE_8_uncontrollable___default()(Tabs, { activeKey: 'onSelect' }));\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/Tabs.js\n// module id = 1303\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/Tabs.js?", + ); + + /***/ + }, + /* 1304 */ + /* exports provided: default */ + /*!*******************************************!*\ + !*** ./~/react-bootstrap/es/Thumbnail.js ***! + \*******************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ 9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ 7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__SafeAnchor__ = __webpack_require__(/*! ./SafeAnchor */ 54);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__ = __webpack_require__(/*! ./utils/bootstrapUtils */ 10);\n\n\n\n\n\n\n\n\n\n\n\n\nvar propTypes = {\n src: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string,\n alt: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string,\n href: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string\n};\n\nvar Thumbnail = function (_React$Component) {\n __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default()(Thumbnail, _React$Component);\n\n function Thumbnail() {\n __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default()(this, Thumbnail);\n\n return __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.apply(this, arguments));\n }\n\n Thumbnail.prototype.render = function render() {\n var _props = this.props,\n src = _props.src,\n alt = _props.alt,\n className = _props.className,\n children = _props.children,\n props = __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default()(_props, ['src', 'alt', 'className', 'children']);\n\n var _splitBsProps = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__[\"a\" /* splitBsProps */])(props),\n bsProps = _splitBsProps[0],\n elementProps = _splitBsProps[1];\n\n var Component = elementProps.href ? __WEBPACK_IMPORTED_MODULE_8__SafeAnchor__[\"a\" /* default */] : 'div';\n var classes = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__[\"b\" /* getClassSet */])(bsProps);\n\n return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(\n Component,\n __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, elementProps, {\n className: __WEBPACK_IMPORTED_MODULE_5_classnames___default()(className, classes)\n }),\n __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('img', { src: src, alt: alt }),\n children && __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(\n 'div',\n { className: 'caption' },\n children\n )\n );\n };\n\n return Thumbnail;\n}(__WEBPACK_IMPORTED_MODULE_6_react___default.a.Component);\n\nThumbnail.propTypes = propTypes;\n\n/* unused harmony default export */ var _unused_webpack_default_export = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__[\"c\" /* bsClass */])('thumbnail', Thumbnail));\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/Thumbnail.js\n// module id = 1304\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/Thumbnail.js?", + ); + + /***/ + }, + /* 1305 */ + /* exports provided: default */ + /* exports used: default */ + /*!*****************************************!*\ + !*** ./~/react-bootstrap/es/Tooltip.js ***! + \*****************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ 9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ 7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_react_prop_types_lib_isRequiredForA11y__ = __webpack_require__(/*! react-prop-types/lib/isRequiredForA11y */ 175);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_react_prop_types_lib_isRequiredForA11y___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_react_prop_types_lib_isRequiredForA11y__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__ = __webpack_require__(/*! ./utils/bootstrapUtils */ 10);\n\n\n\n\n\n\n\n\n\n\n\n\nvar propTypes = {\n /**\n * An html id attribute, necessary for accessibility\n * @type {string|number}\n * @required\n */\n id: __WEBPACK_IMPORTED_MODULE_8_react_prop_types_lib_isRequiredForA11y___default()(__WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.number])),\n\n /**\n * Sets the direction the Tooltip is positioned towards.\n */\n placement: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.oneOf(['top', 'right', 'bottom', 'left']),\n\n /**\n * The \"top\" position value for the Tooltip.\n */\n positionTop: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.number, __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string]),\n /**\n * The \"left\" position value for the Tooltip.\n */\n positionLeft: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.number, __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string]),\n\n /**\n * The \"top\" position value for the Tooltip arrow.\n */\n arrowOffsetTop: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.number, __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string]),\n /**\n * The \"left\" position value for the Tooltip arrow.\n */\n arrowOffsetLeft: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.number, __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string])\n};\n\nvar defaultProps = {\n placement: 'right'\n};\n\nvar Tooltip = function (_React$Component) {\n __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default()(Tooltip, _React$Component);\n\n function Tooltip() {\n __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default()(this, Tooltip);\n\n return __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.apply(this, arguments));\n }\n\n Tooltip.prototype.render = function render() {\n var _extends2;\n\n var _props = this.props,\n placement = _props.placement,\n positionTop = _props.positionTop,\n positionLeft = _props.positionLeft,\n arrowOffsetTop = _props.arrowOffsetTop,\n arrowOffsetLeft = _props.arrowOffsetLeft,\n className = _props.className,\n style = _props.style,\n children = _props.children,\n props = __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default()(_props, ['placement', 'positionTop', 'positionLeft', 'arrowOffsetTop', 'arrowOffsetLeft', 'className', 'style', 'children']);\n\n var _splitBsProps = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__[\"a\" /* splitBsProps */])(props),\n bsProps = _splitBsProps[0],\n elementProps = _splitBsProps[1];\n\n var classes = __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__[\"b\" /* getClassSet */])(bsProps), (_extends2 = {}, _extends2[placement] = true, _extends2));\n\n var outerStyle = __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({\n top: positionTop,\n left: positionLeft\n }, style);\n\n var arrowStyle = {\n top: arrowOffsetTop,\n left: arrowOffsetLeft\n };\n\n return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(\n 'div',\n __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, elementProps, {\n role: 'tooltip',\n className: __WEBPACK_IMPORTED_MODULE_5_classnames___default()(className, classes),\n style: outerStyle\n }),\n __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('div', { className: __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__[\"e\" /* prefix */])(bsProps, 'arrow'), style: arrowStyle }),\n __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(\n 'div',\n { className: __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__[\"e\" /* prefix */])(bsProps, 'inner') },\n children\n )\n );\n };\n\n return Tooltip;\n}(__WEBPACK_IMPORTED_MODULE_6_react___default.a.Component);\n\nTooltip.propTypes = propTypes;\nTooltip.defaultProps = defaultProps;\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__[\"c\" /* bsClass */])('tooltip', Tooltip));\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/Tooltip.js\n// module id = 1305\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/Tooltip.js?", + ); + + /***/ + }, + /* 1306 */ + /* exports provided: default */ + /*!**************************************!*\ + !*** ./~/react-bootstrap/es/Well.js ***! + \**************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(/*! babel-runtime/helpers/extends */ 5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ 9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ 7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames__ = __webpack_require__(/*! classnames */ 2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_classnames__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__ = __webpack_require__(/*! ./utils/bootstrapUtils */ 10);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__utils_StyleConfig__ = __webpack_require__(/*! ./utils/StyleConfig */ 32);\n\n\n\n\n\n\n\n\n\n\n\nvar Well = function (_React$Component) {\n __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default()(Well, _React$Component);\n\n function Well() {\n __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default()(this, Well);\n\n return __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.apply(this, arguments));\n }\n\n Well.prototype.render = function render() {\n var _props = this.props,\n className = _props.className,\n props = __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_objectWithoutProperties___default()(_props, [\'className\']);\n\n var _splitBsProps = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__["a" /* splitBsProps */])(props),\n bsProps = _splitBsProps[0],\n elementProps = _splitBsProps[1];\n\n var classes = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__["b" /* getClassSet */])(bsProps);\n\n return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(\'div\', __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, elementProps, {\n className: __WEBPACK_IMPORTED_MODULE_5_classnames___default()(className, classes)\n }));\n };\n\n return Well;\n}(__WEBPACK_IMPORTED_MODULE_6_react___default.a.Component);\n\n/* unused harmony default export */ var _unused_webpack_default_export = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__["c" /* bsClass */])(\'well\', __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__["d" /* bsSizes */])([__WEBPACK_IMPORTED_MODULE_8__utils_StyleConfig__["b" /* Size */].LARGE, __WEBPACK_IMPORTED_MODULE_8__utils_StyleConfig__["b" /* Size */].SMALL], Well)));\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/Well.js\n// module id = 1306\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/Well.js?', + ); + + /***/ + }, + /* 1307 */ + /* exports provided: requiredRoles, exclusiveRoles */ + /* exports used: requiredRoles, exclusiveRoles */ + /*!*************************************************!*\ + !*** ./~/react-bootstrap/es/utils/PropTypes.js ***! + \*************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_prop_types_lib_utils_createChainableTypeChecker__ = __webpack_require__(/*! react-prop-types/lib/utils/createChainableTypeChecker */ 176);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_prop_types_lib_utils_createChainableTypeChecker___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react_prop_types_lib_utils_createChainableTypeChecker__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ValidComponentChildren__ = __webpack_require__(/*! ./ValidComponentChildren */ 34);\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = requiredRoles;\n/* harmony export (immutable) */ __webpack_exports__[\"b\"] = exclusiveRoles;\n\n\n\n\nfunction requiredRoles() {\n for (var _len = arguments.length, roles = Array(_len), _key = 0; _key < _len; _key++) {\n roles[_key] = arguments[_key];\n }\n\n return __WEBPACK_IMPORTED_MODULE_0_react_prop_types_lib_utils_createChainableTypeChecker___default()(function (props, propName, component) {\n var missing = void 0;\n\n roles.every(function (role) {\n if (!__WEBPACK_IMPORTED_MODULE_1__ValidComponentChildren__[\"a\" /* default */].some(props.children, function (child) {\n return child.props.bsRole === role;\n })) {\n missing = role;\n return false;\n }\n\n return true;\n });\n\n if (missing) {\n return new Error('(children) ' + component + ' - Missing a required child with bsRole: ' + (missing + '. ' + component + ' must have at least one child of each of ') + ('the following bsRoles: ' + roles.join(', ')));\n }\n\n return null;\n });\n}\n\nfunction exclusiveRoles() {\n for (var _len2 = arguments.length, roles = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n roles[_key2] = arguments[_key2];\n }\n\n return __WEBPACK_IMPORTED_MODULE_0_react_prop_types_lib_utils_createChainableTypeChecker___default()(function (props, propName, component) {\n var duplicate = void 0;\n\n roles.every(function (role) {\n var childrenWithRole = __WEBPACK_IMPORTED_MODULE_1__ValidComponentChildren__[\"a\" /* default */].filter(props.children, function (child) {\n return child.props.bsRole === role;\n });\n\n if (childrenWithRole.length > 1) {\n duplicate = role;\n return false;\n }\n\n return true;\n });\n\n if (duplicate) {\n return new Error('(children) ' + component + ' - Duplicate children detected of bsRole: ' + (duplicate + '. Only one child each allowed with the following ') + ('bsRoles: ' + roles.join(', ')));\n }\n\n return null;\n });\n}\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/utils/PropTypes.js\n// module id = 1307\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/utils/PropTypes.js?", + ); + + /***/ + }, + /* 1308 */ + /* exports provided: default */ + /* exports used: default */ + /*!********************************************************!*\ + !*** ./~/react-bootstrap/es/utils/TransitionEvents.js ***! + \********************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-2014, Facebook, Inc.\n * All rights reserved.\n *\n * This file contains a modified version of:\n * https://github.com/facebook/react/blob/v0.12.0/src/addons/transitions/ReactTransitionEvents.js\n *\n * This source code is licensed under the BSD-style license found here:\n * https://github.com/facebook/react/blob/v0.12.0/LICENSE\n * An additional grant of patent rights can be found here:\n * https://github.com/facebook/react/blob/v0.12.0/PATENTS\n */\n\nvar canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);\n\n/**\n * EVENT_NAME_MAP is used to determine which event fired when a\n * transition/animation ends, based on the style property used to\n * define that event.\n */\nvar EVENT_NAME_MAP = {\n transitionend: {\n 'transition': 'transitionend',\n 'WebkitTransition': 'webkitTransitionEnd',\n 'MozTransition': 'mozTransitionEnd',\n 'OTransition': 'oTransitionEnd',\n 'msTransition': 'MSTransitionEnd'\n },\n\n animationend: {\n 'animation': 'animationend',\n 'WebkitAnimation': 'webkitAnimationEnd',\n 'MozAnimation': 'mozAnimationEnd',\n 'OAnimation': 'oAnimationEnd',\n 'msAnimation': 'MSAnimationEnd'\n }\n};\n\nvar endEvents = [];\n\nfunction detectEvents() {\n var testEl = document.createElement('div');\n var style = testEl.style;\n\n // On some platforms, in particular some releases of Android 4.x,\n // the un-prefixed \"animation\" and \"transition\" properties are defined on the\n // style object but the events that fire will still be prefixed, so we need\n // to check if the un-prefixed events are useable, and if not remove them\n // from the map\n if (!('AnimationEvent' in window)) {\n delete EVENT_NAME_MAP.animationend.animation;\n }\n\n if (!('TransitionEvent' in window)) {\n delete EVENT_NAME_MAP.transitionend.transition;\n }\n\n for (var baseEventName in EVENT_NAME_MAP) {\n // eslint-disable-line guard-for-in\n var baseEvents = EVENT_NAME_MAP[baseEventName];\n for (var styleName in baseEvents) {\n if (styleName in style) {\n endEvents.push(baseEvents[styleName]);\n break;\n }\n }\n }\n}\n\nif (canUseDOM) {\n detectEvents();\n}\n\n// We use the raw {add|remove}EventListener() call because EventListener\n// does not know how to remove event listeners and we really should\n// clean up. Also, these events are not triggered in older browsers\n// so we should be A-OK here.\n\nfunction addEventListener(node, eventName, eventListener) {\n node.addEventListener(eventName, eventListener, false);\n}\n\nfunction removeEventListener(node, eventName, eventListener) {\n node.removeEventListener(eventName, eventListener, false);\n}\n\nvar ReactTransitionEvents = {\n addEndEventListener: function addEndEventListener(node, eventListener) {\n if (endEvents.length === 0) {\n // If CSS transitions are not supported, trigger an \"end animation\"\n // event immediately.\n window.setTimeout(eventListener, 0);\n return;\n }\n endEvents.forEach(function (endEvent) {\n addEventListener(node, endEvent, eventListener);\n });\n },\n removeEndEventListener: function removeEndEventListener(node, eventListener) {\n if (endEvents.length === 0) {\n return;\n }\n endEvents.forEach(function (endEvent) {\n removeEventListener(node, endEvent, eventListener);\n });\n }\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (ReactTransitionEvents);\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/utils/TransitionEvents.js\n// module id = 1308\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/utils/TransitionEvents.js?", + ); + + /***/ + }, + /* 1309 */ + /* exports provided: default, _resetWarned */ + /* exports used: default */ + /*!**********************************************************!*\ + !*** ./~/react-bootstrap/es/utils/deprecationWarning.js ***! + \**********************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_possibleConstructorReturn__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_inherits__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ 7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_inherits__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_typeof__ = __webpack_require__(/*! babel-runtime/helpers/typeof */ 148);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_typeof___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_typeof__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_warning__ = __webpack_require__(/*! warning */ 23);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_warning__);\n/* unused harmony export _resetWarned */\n\n\n\n\n\n\nvar warned = {};\n\nfunction deprecationWarning(oldname, newname, link) {\n var message = void 0;\n\n if ((typeof oldname === 'undefined' ? 'undefined' : __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_typeof___default()(oldname)) === 'object') {\n message = oldname.message;\n } else {\n message = oldname + ' is deprecated. Use ' + newname + ' instead.';\n\n if (link) {\n message += '\\nYou can read more about it at ' + link;\n }\n }\n\n if (warned[message]) {\n return;\n }\n\n true ? __WEBPACK_IMPORTED_MODULE_4_warning___default()(false, message) : void 0;\n warned[message] = true;\n}\n\ndeprecationWarning.wrapper = function (Component) {\n for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n return function (_Component) {\n __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_inherits___default()(DeprecatedComponent, _Component);\n\n function DeprecatedComponent() {\n __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck___default()(this, DeprecatedComponent);\n\n return __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_possibleConstructorReturn___default()(this, _Component.apply(this, arguments));\n }\n\n DeprecatedComponent.prototype.componentWillMount = function componentWillMount() {\n deprecationWarning.apply(undefined, args);\n\n if (_Component.prototype.componentWillMount) {\n var _Component$prototype$;\n\n for (var _len2 = arguments.length, methodArgs = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n methodArgs[_key2] = arguments[_key2];\n }\n\n (_Component$prototype$ = _Component.prototype.componentWillMount).call.apply(_Component$prototype$, [this].concat(methodArgs));\n }\n };\n\n return DeprecatedComponent;\n }(Component);\n};\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (deprecationWarning);\n\nfunction _resetWarned() {\n warned = {};\n}\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/utils/deprecationWarning.js\n// module id = 1309\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/utils/deprecationWarning.js?", + ); + + /***/ + }, + /* 1310 */ + /* exports provided: bootstrapUtils, createChainedFunction, ValidComponentChildren */ + /*!*********************************************!*\ + !*** ./~/react-bootstrap/es/utils/index.js ***! + \*********************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__bootstrapUtils__ = __webpack_require__(/*! ./bootstrapUtils */ 10);\n/* unused harmony reexport bootstrapUtils */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__createChainedFunction__ = __webpack_require__(/*! ./createChainedFunction */ 28);\n/* unused harmony reexport createChainedFunction */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__ValidComponentChildren__ = __webpack_require__(/*! ./ValidComponentChildren */ 34);\n/* unused harmony reexport ValidComponentChildren */\n\n\n\n\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-bootstrap/es/utils/index.js\n// module id = 1310\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-bootstrap/es/utils/index.js?', + ); + + /***/ + }, + /* 1311 */ + /* unknown exports provided */ + /* exports used: DateRangePicker */ + /*!********************************!*\ + !*** ./~/react-dates/index.js ***! + \********************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + 'var DateRangePicker = __webpack_require__(/*! ./lib/components/DateRangePicker */ 1312).default;\nvar DateRangePickerInput = __webpack_require__(/*! ./lib/components/DateRangePickerInput */ 517).default;\nvar DateRangePickerInputController = __webpack_require__(/*! ./lib/components/DateRangePickerInputController */ 518).default;\nvar SingleDatePicker = __webpack_require__(/*! ./lib/components/SingleDatePicker */ 1314).default;\nvar SingleDatePickerInput = __webpack_require__(/*! ./lib/components/SingleDatePickerInput */ 520).default;\nvar DayPicker = __webpack_require__(/*! ./lib/components/DayPicker */ 241).default;\nvar DayPickerRangeController = __webpack_require__(/*! ./lib/components/DayPickerRangeController */ 519).default;\nvar CalendarMonthGrid = __webpack_require__(/*! ./lib/components/CalendarMonthGrid */ 515).default;\nvar CalendarMonth = __webpack_require__(/*! ./lib/components/CalendarMonth */ 514).default;\nvar CalendarDay = __webpack_require__(/*! ./lib/components/CalendarDay */ 513).default;\n\nvar DateRangePickerShape = __webpack_require__(/*! ./lib/shapes/DateRangePickerShape */ 522).default;\nvar SingleDatePickerShape = __webpack_require__(/*! ./lib/shapes/SingleDatePickerShape */ 525).default;\n\nvar isInclusivelyAfterDay = __webpack_require__(/*! ./lib/utils/isInclusivelyAfterDay */ 121).default;\nvar isInclusivelyBeforeDay = __webpack_require__(/*! ./lib/utils/isInclusivelyBeforeDay */ 528).default;\nvar isNextDay = __webpack_require__(/*! ./lib/utils/isNextDay */ 529).default;\nvar isSameDay = __webpack_require__(/*! ./lib/utils/isSameDay */ 99).default;\n\nvar toISODateString = __webpack_require__(/*! ./lib/utils/toISODateString */ 243).default;\nvar toLocalizedDateString = __webpack_require__(/*! ./lib/utils/toLocalizedDateString */ 244).default;\nvar toMomentObject = __webpack_require__(/*! ./lib/utils/toMomentObject */ 122).default;\n\n\nmodule.exports = {\n DateRangePicker: DateRangePicker,\n SingleDatePicker: SingleDatePicker,\n\n DateRangePickerInputController: DateRangePickerInputController,\n DateRangePickerInput: DateRangePickerInput,\n SingleDatePickerInput: SingleDatePickerInput,\n DayPicker: DayPicker,\n DayPickerRangeController: DayPickerRangeController,\n CalendarMonthGrid: CalendarMonthGrid,\n CalendarMonth: CalendarMonth,\n CalendarDay: CalendarDay,\n\n DateRangePickerShape: DateRangePickerShape,\n SingleDatePickerShape: SingleDatePickerShape,\n\n isInclusivelyAfterDay: isInclusivelyAfterDay,\n isInclusivelyBeforeDay: isInclusivelyBeforeDay,\n isNextDay: isNextDay,\n isSameDay: isSameDay,\n\n toISODateString: toISODateString,\n toLocalizedDateString: toLocalizedDateString,\n toMomentObject: toMomentObject,\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dates/index.js\n// module id = 1311\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dates/index.js?', + ); + + /***/ + }, + /* 1312 */ + /* unknown exports provided */ + /* all exports used */ + /*!*********************************************************!*\ + !*** ./~/react-dates/lib/components/DateRangePicker.js ***! + \*********************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "module.exports =\n/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n\n\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ function(module, exports, __webpack_require__) {\n\n\tvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\n\tvar _createClass = function () {\n\t function defineProperties(target, props) {\n\t for (var i = 0; i < props.length; i++) {\n\t 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);\n\t }\n\t }return function (Constructor, protoProps, staticProps) {\n\t if (protoProps) defineProperties(Constructor.prototype, protoProps);if (staticProps) defineProperties(Constructor, staticProps);return Constructor;\n\t };\n\t}();\n\n\tvar _react = __webpack_require__(1);\n\n\tvar _react2 = _interopRequireDefault(_react);\n\n\tvar _reactDom = __webpack_require__(10);\n\n\tvar _reactDom2 = _interopRequireDefault(_reactDom);\n\n\tvar _reactAddonsShallowCompare = __webpack_require__(2);\n\n\tvar _reactAddonsShallowCompare2 = _interopRequireDefault(_reactAddonsShallowCompare);\n\n\tvar _moment = __webpack_require__(4);\n\n\tvar _moment2 = _interopRequireDefault(_moment);\n\n\tvar _classnames = __webpack_require__(5);\n\n\tvar _classnames2 = _interopRequireDefault(_classnames);\n\n\tvar _reactPortal = __webpack_require__(15);\n\n\tvar _reactPortal2 = _interopRequireDefault(_reactPortal);\n\n\tvar _OutsideClickHandler = __webpack_require__(16);\n\n\tvar _OutsideClickHandler2 = _interopRequireDefault(_OutsideClickHandler);\n\n\tvar _getResponsiveContainerStyles = __webpack_require__(17);\n\n\tvar _getResponsiveContainerStyles2 = _interopRequireDefault(_getResponsiveContainerStyles);\n\n\tvar _isInclusivelyAfterDay = __webpack_require__(18);\n\n\tvar _isInclusivelyAfterDay2 = _interopRequireDefault(_isInclusivelyAfterDay);\n\n\tvar _DateRangePickerInputController = __webpack_require__(19);\n\n\tvar _DateRangePickerInputController2 = _interopRequireDefault(_DateRangePickerInputController);\n\n\tvar _DayPickerRangeController = __webpack_require__(20);\n\n\tvar _DayPickerRangeController2 = _interopRequireDefault(_DayPickerRangeController);\n\n\tvar _close = __webpack_require__(21);\n\n\tvar _close2 = _interopRequireDefault(_close);\n\n\tvar _DateRangePickerShape = __webpack_require__(22);\n\n\tvar _DateRangePickerShape2 = _interopRequireDefault(_DateRangePickerShape);\n\n\tvar _constants = __webpack_require__(9);\n\n\tfunction _interopRequireDefault(obj) {\n\t return obj && obj.__esModule ? obj : { 'default': 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 _possibleConstructorReturn(self, call) {\n\t if (!self) {\n\t throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n\t }return call && ((typeof call === \"undefined\" ? \"undefined\" : _typeof(call)) === \"object\" || typeof call === \"function\") ? call : self;\n\t}\n\n\tfunction _inherits(subClass, superClass) {\n\t if (typeof superClass !== \"function\" && superClass !== null) {\n\t throw new TypeError(\"Super expression must either be null or a function, not \" + (typeof superClass === \"undefined\" ? \"undefined\" : _typeof(superClass)));\n\t }subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n\t}\n\n\tvar propTypes = _DateRangePickerShape2['default'];\n\n\tvar defaultProps = {\n\t startDateId: _constants.START_DATE,\n\t endDateId: _constants.END_DATE,\n\t focusedInput: null,\n\t screenReaderInputMessage: '',\n\t minimumNights: 1,\n\t isDayBlocked: function () {\n\t function isDayBlocked() {\n\t return false;\n\t }\n\n\t return isDayBlocked;\n\t }(),\n\t isDayHighlighted: function () {\n\t function isDayHighlighted() {\n\t return false;\n\t }\n\n\t return isDayHighlighted;\n\t }(),\n\t isOutsideRange: function () {\n\t function isOutsideRange(day) {\n\t return !(0, _isInclusivelyAfterDay2['default'])(day, (0, _moment2['default'])());\n\t }\n\n\t return isOutsideRange;\n\t }(),\n\t enableOutsideDays: false,\n\t numberOfMonths: 2,\n\t showClearDates: false,\n\t showDefaultInputIcon: false,\n\t customInputIcon: null,\n\t customArrowIcon: null,\n\t disabled: false,\n\t required: false,\n\t reopenPickerOnClearDates: false,\n\t keepOpenOnDateSelect: false,\n\t initialVisibleMonth: function () {\n\t function initialVisibleMonth() {\n\t return (0, _moment2['default'])();\n\t }\n\n\t return initialVisibleMonth;\n\t }(),\n\t navPrev: null,\n\t navNext: null,\n\n\t orientation: _constants.HORIZONTAL_ORIENTATION,\n\t anchorDirection: _constants.ANCHOR_LEFT,\n\t horizontalMargin: 0,\n\t withPortal: false,\n\t withFullScreenPortal: false,\n\n\t onDatesChange: function () {\n\t function onDatesChange() {}\n\n\t return onDatesChange;\n\t }(),\n\t onFocusChange: function () {\n\t function onFocusChange() {}\n\n\t return onFocusChange;\n\t }(),\n\t onPrevMonthClick: function () {\n\t function onPrevMonthClick() {}\n\n\t return onPrevMonthClick;\n\t }(),\n\t onNextMonthClick: function () {\n\t function onNextMonthClick() {}\n\n\t return onNextMonthClick;\n\t }(),\n\n\t renderDay: null,\n\n\t // i18n\n\t displayFormat: function () {\n\t function displayFormat() {\n\t return _moment2['default'].localeData().longDateFormat('L');\n\t }\n\n\t return displayFormat;\n\t }(),\n\t monthFormat: 'MMMM YYYY',\n\t phrases: {\n\t closeDatePicker: 'Close',\n\t clearDates: 'Clear Dates'\n\t }\n\t};\n\n\tvar DateRangePicker = function (_React$Component) {\n\t _inherits(DateRangePicker, _React$Component);\n\n\t function DateRangePicker(props) {\n\t _classCallCheck(this, DateRangePicker);\n\n\t var _this = _possibleConstructorReturn(this, (DateRangePicker.__proto__ || Object.getPrototypeOf(DateRangePicker)).call(this, props));\n\n\t _this.state = {\n\t dayPickerContainerStyles: {}\n\t };\n\n\t _this.onOutsideClick = _this.onOutsideClick.bind(_this);\n\n\t _this.responsivizePickerPosition = _this.responsivizePickerPosition.bind(_this);\n\t return _this;\n\t }\n\n\t _createClass(DateRangePicker, [{\n\t key: 'componentDidMount',\n\t value: function () {\n\t function componentDidMount() {\n\t window.addEventListener('resize', this.responsivizePickerPosition);\n\t this.responsivizePickerPosition();\n\t }\n\n\t return componentDidMount;\n\t }()\n\t }, {\n\t key: 'shouldComponentUpdate',\n\t value: function () {\n\t function shouldComponentUpdate(nextProps, nextState) {\n\t return (0, _reactAddonsShallowCompare2['default'])(this, nextProps, nextState);\n\t }\n\n\t return shouldComponentUpdate;\n\t }()\n\t }, {\n\t key: 'componentDidUpdate',\n\t value: function () {\n\t function componentDidUpdate(prevProps) {\n\t if (!prevProps.focusedInput && this.props.focusedInput && this.isOpened()) {\n\t // The date picker just changed from being closed to being open.\n\t this.responsivizePickerPosition();\n\t }\n\t }\n\n\t return componentDidUpdate;\n\t }()\n\t }, {\n\t key: 'componentWillUnmount',\n\t value: function () {\n\t function componentWillUnmount() {\n\t window.removeEventListener('resize', this.responsivizePickerPosition);\n\t }\n\n\t return componentWillUnmount;\n\t }()\n\t }, {\n\t key: 'onOutsideClick',\n\t value: function () {\n\t function onOutsideClick() {\n\t var onFocusChange = this.props.onFocusChange;\n\n\t if (!this.isOpened()) return;\n\n\t onFocusChange(null);\n\t }\n\n\t return onOutsideClick;\n\t }()\n\t }, {\n\t key: 'getDayPickerContainerClasses',\n\t value: function () {\n\t function getDayPickerContainerClasses() {\n\t var _props = this.props;\n\t var orientation = _props.orientation;\n\t var withPortal = _props.withPortal;\n\t var withFullScreenPortal = _props.withFullScreenPortal;\n\t var anchorDirection = _props.anchorDirection;\n\n\t var dayPickerClassName = (0, _classnames2['default'])('DateRangePicker__picker', {\n\t 'DateRangePicker__picker--direction-left': anchorDirection === _constants.ANCHOR_LEFT,\n\t 'DateRangePicker__picker--direction-right': anchorDirection === _constants.ANCHOR_RIGHT,\n\t 'DateRangePicker__picker--horizontal': orientation === _constants.HORIZONTAL_ORIENTATION,\n\t 'DateRangePicker__picker--vertical': orientation === _constants.VERTICAL_ORIENTATION,\n\t 'DateRangePicker__picker--portal': withPortal || withFullScreenPortal,\n\t 'DateRangePicker__picker--full-screen-portal': withFullScreenPortal\n\t });\n\n\t return dayPickerClassName;\n\t }\n\n\t return getDayPickerContainerClasses;\n\t }()\n\t }, {\n\t key: 'getDayPickerDOMNode',\n\t value: function () {\n\t function getDayPickerDOMNode() {\n\t return _reactDom2['default'].findDOMNode(this.dayPicker);\n\t }\n\n\t return getDayPickerDOMNode;\n\t }()\n\t }, {\n\t key: 'isOpened',\n\t value: function () {\n\t function isOpened() {\n\t var focusedInput = this.props.focusedInput;\n\n\t return focusedInput === _constants.START_DATE || focusedInput === _constants.END_DATE;\n\t }\n\n\t return isOpened;\n\t }()\n\t }, {\n\t key: 'responsivizePickerPosition',\n\t value: function () {\n\t function responsivizePickerPosition() {\n\t if (!this.isOpened()) {\n\t return;\n\t }\n\n\t var _props2 = this.props;\n\t var anchorDirection = _props2.anchorDirection;\n\t var horizontalMargin = _props2.horizontalMargin;\n\t var withPortal = _props2.withPortal;\n\t var withFullScreenPortal = _props2.withFullScreenPortal;\n\t var dayPickerContainerStyles = this.state.dayPickerContainerStyles;\n\n\t var isAnchoredLeft = anchorDirection === _constants.ANCHOR_LEFT;\n\t if (!withPortal && !withFullScreenPortal) {\n\t var containerRect = this.dayPickerContainer.getBoundingClientRect();\n\t var currentOffset = dayPickerContainerStyles[anchorDirection] || 0;\n\t var containerEdge = isAnchoredLeft ? containerRect[_constants.ANCHOR_RIGHT] : containerRect[_constants.ANCHOR_LEFT];\n\n\t this.setState({\n\t dayPickerContainerStyles: (0, _getResponsiveContainerStyles2['default'])(anchorDirection, currentOffset, containerEdge, horizontalMargin)\n\t });\n\t }\n\t }\n\n\t return responsivizePickerPosition;\n\t }()\n\t }, {\n\t key: 'maybeRenderDayPickerWithPortal',\n\t value: function () {\n\t function maybeRenderDayPickerWithPortal() {\n\t var _props3 = this.props;\n\t var withPortal = _props3.withPortal;\n\t var withFullScreenPortal = _props3.withFullScreenPortal;\n\n\t if (!this.isOpened()) {\n\t return null;\n\t }\n\n\t if (withPortal || withFullScreenPortal) {\n\t return _react2['default'].createElement(_reactPortal2['default'], { isOpened: true }, this.renderDayPicker());\n\t }\n\n\t return this.renderDayPicker();\n\t }\n\n\t return maybeRenderDayPickerWithPortal;\n\t }()\n\t }, {\n\t key: 'renderDayPicker',\n\t value: function () {\n\t function renderDayPicker() {\n\t var _this2 = this;\n\n\t var _props4 = this.props;\n\t var isDayBlocked = _props4.isDayBlocked;\n\t var isDayHighlighted = _props4.isDayHighlighted;\n\t var isOutsideRange = _props4.isOutsideRange;\n\t var numberOfMonths = _props4.numberOfMonths;\n\t var orientation = _props4.orientation;\n\t var monthFormat = _props4.monthFormat;\n\t var navPrev = _props4.navPrev;\n\t var navNext = _props4.navNext;\n\t var onPrevMonthClick = _props4.onPrevMonthClick;\n\t var onNextMonthClick = _props4.onNextMonthClick;\n\t var onDatesChange = _props4.onDatesChange;\n\t var onFocusChange = _props4.onFocusChange;\n\t var withPortal = _props4.withPortal;\n\t var withFullScreenPortal = _props4.withFullScreenPortal;\n\t var enableOutsideDays = _props4.enableOutsideDays;\n\t var initialVisibleMonth = _props4.initialVisibleMonth;\n\t var focusedInput = _props4.focusedInput;\n\t var startDate = _props4.startDate;\n\t var endDate = _props4.endDate;\n\t var minimumNights = _props4.minimumNights;\n\t var keepOpenOnDateSelect = _props4.keepOpenOnDateSelect;\n\t var renderDay = _props4.renderDay;\n\t var dayPickerContainerStyles = this.state.dayPickerContainerStyles;\n\n\t var onOutsideClick = !withFullScreenPortal && withPortal ? this.onOutsideClick : undefined;\n\n\t return _react2['default'].createElement('div', {\n\t ref: function () {\n\t function ref(_ref2) {\n\t _this2.dayPickerContainer = _ref2;\n\t }\n\n\t return ref;\n\t }(),\n\t className: this.getDayPickerContainerClasses(),\n\t style: dayPickerContainerStyles\n\t }, _react2['default'].createElement(_DayPickerRangeController2['default'], {\n\t ref: function () {\n\t function ref(_ref) {\n\t _this2.dayPicker = _ref;\n\t }\n\n\t return ref;\n\t }(),\n\t orientation: orientation,\n\t enableOutsideDays: enableOutsideDays,\n\t numberOfMonths: numberOfMonths,\n\t onPrevMonthClick: onPrevMonthClick,\n\t onNextMonthClick: onNextMonthClick,\n\t onDatesChange: onDatesChange,\n\t onFocusChange: onFocusChange,\n\t focusedInput: focusedInput,\n\t startDate: startDate,\n\t endDate: endDate,\n\t monthFormat: monthFormat,\n\t withPortal: withPortal || withFullScreenPortal,\n\t hidden: !this.isOpened(),\n\t initialVisibleMonth: initialVisibleMonth,\n\t onOutsideClick: onOutsideClick,\n\t navPrev: navPrev,\n\t navNext: navNext,\n\t minimumNights: minimumNights,\n\t isOutsideRange: isOutsideRange,\n\t isDayHighlighted: isDayHighlighted,\n\t isDayBlocked: isDayBlocked,\n\t keepOpenOnDateSelect: keepOpenOnDateSelect,\n\t renderDay: renderDay\n\t }), withFullScreenPortal && _react2['default'].createElement('button', {\n\t className: 'DateRangePicker__close',\n\t type: 'button',\n\t onClick: this.onOutsideClick\n\t }, _react2['default'].createElement('span', { className: 'screen-reader-only' }, this.props.phrases.closeDatePicker), _react2['default'].createElement(_close2['default'], null)));\n\t }\n\n\t return renderDayPicker;\n\t }()\n\t }, {\n\t key: 'render',\n\t value: function () {\n\t function render() {\n\t var _props5 = this.props;\n\t var startDate = _props5.startDate;\n\t var startDateId = _props5.startDateId;\n\t var startDatePlaceholderText = _props5.startDatePlaceholderText;\n\t var endDate = _props5.endDate;\n\t var endDateId = _props5.endDateId;\n\t var endDatePlaceholderText = _props5.endDatePlaceholderText;\n\t var focusedInput = _props5.focusedInput;\n\t var screenReaderInputMessage = _props5.screenReaderInputMessage;\n\t var showClearDates = _props5.showClearDates;\n\t var showDefaultInputIcon = _props5.showDefaultInputIcon;\n\t var customInputIcon = _props5.customInputIcon;\n\t var customArrowIcon = _props5.customArrowIcon;\n\t var disabled = _props5.disabled;\n\t var required = _props5.required;\n\t var phrases = _props5.phrases;\n\t var isOutsideRange = _props5.isOutsideRange;\n\t var withPortal = _props5.withPortal;\n\t var withFullScreenPortal = _props5.withFullScreenPortal;\n\t var displayFormat = _props5.displayFormat;\n\t var reopenPickerOnClearDates = _props5.reopenPickerOnClearDates;\n\t var keepOpenOnDateSelect = _props5.keepOpenOnDateSelect;\n\t var onDatesChange = _props5.onDatesChange;\n\t var onFocusChange = _props5.onFocusChange;\n\t var renderDay = _props5.renderDay;\n\n\t var onOutsideClick = !withPortal && !withFullScreenPortal ? this.onOutsideClick : undefined;\n\n\t return _react2['default'].createElement('div', { className: 'DateRangePicker' }, _react2['default'].createElement(_OutsideClickHandler2['default'], { onOutsideClick: onOutsideClick }, _react2['default'].createElement(_DateRangePickerInputController2['default'], {\n\t startDate: startDate,\n\t startDateId: startDateId,\n\t startDatePlaceholderText: startDatePlaceholderText,\n\t isStartDateFocused: focusedInput === _constants.START_DATE,\n\t endDate: endDate,\n\t endDateId: endDateId,\n\t endDatePlaceholderText: endDatePlaceholderText,\n\t isEndDateFocused: focusedInput === _constants.END_DATE,\n\t displayFormat: displayFormat,\n\t showClearDates: showClearDates,\n\t showCaret: !withPortal && !withFullScreenPortal,\n\t showDefaultInputIcon: showDefaultInputIcon,\n\t customInputIcon: customInputIcon,\n\t customArrowIcon: customArrowIcon,\n\t disabled: disabled,\n\t required: required,\n\t reopenPickerOnClearDates: reopenPickerOnClearDates,\n\t keepOpenOnDateSelect: keepOpenOnDateSelect,\n\t isOutsideRange: isOutsideRange,\n\t withFullScreenPortal: withFullScreenPortal,\n\t onDatesChange: onDatesChange,\n\t onFocusChange: onFocusChange,\n\t renderDay: renderDay,\n\t phrases: phrases,\n\t screenReaderMessage: screenReaderInputMessage\n\t }), this.maybeRenderDayPickerWithPortal()));\n\t }\n\n\t return render;\n\t }()\n\t }]);\n\n\t return DateRangePicker;\n\t}(_react2['default'].Component);\n\n\texports['default'] = DateRangePicker;\n\n\tDateRangePicker.propTypes = propTypes;\n\tDateRangePicker.defaultProps = defaultProps;\n\n/***/ },\n/* 1 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! react */ 1);\n\n/***/ },\n/* 2 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! react-addons-shallow-compare */ 118);\n\n/***/ },\n/* 3 */,\n/* 4 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! moment */ 3);\n\n/***/ },\n/* 5 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! classnames */ 2);\n\n/***/ },\n/* 6 */,\n/* 7 */,\n/* 8 */,\n/* 9 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! ../../constants */ 29);\n\n/***/ },\n/* 10 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! react-dom */ 16);\n\n/***/ },\n/* 11 */,\n/* 12 */,\n/* 13 */,\n/* 14 */,\n/* 15 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! react-portal */ 570);\n\n/***/ },\n/* 16 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! ./OutsideClickHandler */ 242);\n\n/***/ },\n/* 17 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! ../utils/getResponsiveContainerStyles */ 526);\n\n/***/ },\n/* 18 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! ../utils/isInclusivelyAfterDay */ 121);\n\n/***/ },\n/* 19 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! ./DateRangePickerInputController */ 518);\n\n/***/ },\n/* 20 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! ./DayPickerRangeController */ 519);\n\n/***/ },\n/* 21 */\n/***/ function(module, exports, __webpack_require__) {\n\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\n\tvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\n\tvar _react = __webpack_require__(1);\n\n\tvar _react2 = _interopRequireDefault(_react);\n\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\tvar SVG = function (_React$Component) {\n\t _inherits(SVG, _React$Component);\n\n\t function SVG() {\n\t _classCallCheck(this, SVG);\n\n\t return _possibleConstructorReturn(this, (SVG.__proto__ || Object.getPrototypeOf(SVG)).apply(this, arguments));\n\t }\n\n\t _createClass(SVG, [{\n\t key: \"render\",\n\t value: function () {\n\t function render() {\n\t return _react2[\"default\"].createElement(\n\t \"svg\",\n\t _extends({ viewBox: \"0 0 12 12\" }, this.props),\n\t _react2[\"default\"].createElement(\"path\", { fillRule: \"evenodd\", d: \"M11.53.47a.75.75 0 0 0-1.061 0l-4.47 4.47L1.529.47A.75.75 0 1 0 .468 1.531l4.47 4.47-4.47 4.47a.75.75 0 1 0 1.061 1.061l4.47-4.47 4.47 4.47a.75.75 0 1 0 1.061-1.061l-4.47-4.47 4.47-4.47a.75.75 0 0 0 0-1.061z\" })\n\t );\n\t }\n\n\t return render;\n\t }()\n\t }]);\n\n\t return SVG;\n\t}(_react2[\"default\"].Component);\n\n\texports[\"default\"] = SVG;\n\n/***/ },\n/* 22 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! ../shapes/DateRangePickerShape */ 522);\n\n/***/ }\n/******/ ]);\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dates/lib/components/DateRangePicker.js\n// module id = 1312\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dates/lib/components/DateRangePicker.js?", + ); + + /***/ + }, + /* 1313 */ + /* unknown exports provided */ + /* all exports used */ + /*!*************************************************************!*\ + !*** ./~/react-dates/lib/components/DayPickerNavigation.js ***! + \*************************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + 'module.exports =\n/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n\n\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = "";\n\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ({\n\n/***/ 0:\n/***/ function(module, exports, __webpack_require__) {\n\n\tObject.defineProperty(exports, "__esModule", {\n\t value: true\n\t});\n\texports[\'default\'] = DayPickerNavigation;\n\n\tvar _react = __webpack_require__(1);\n\n\tvar _react2 = _interopRequireDefault(_react);\n\n\tvar _classnames = __webpack_require__(5);\n\n\tvar _classnames2 = _interopRequireDefault(_classnames);\n\n\tvar _arrowLeft = __webpack_require__(33);\n\n\tvar _arrowLeft2 = _interopRequireDefault(_arrowLeft);\n\n\tvar _arrowRight = __webpack_require__(24);\n\n\tvar _arrowRight2 = _interopRequireDefault(_arrowRight);\n\n\tvar _chevronUp = __webpack_require__(34);\n\n\tvar _chevronUp2 = _interopRequireDefault(_chevronUp);\n\n\tvar _chevronDown = __webpack_require__(35);\n\n\tvar _chevronDown2 = _interopRequireDefault(_chevronDown);\n\n\tvar _ScrollableOrientationShape = __webpack_require__(8);\n\n\tvar _ScrollableOrientationShape2 = _interopRequireDefault(_ScrollableOrientationShape);\n\n\tvar _constants = __webpack_require__(9);\n\n\tfunction _interopRequireDefault(obj) {\n\t return obj && obj.__esModule ? obj : { \'default\': obj };\n\t}\n\n\tvar propTypes = {\n\t navPrev: _react.PropTypes.node,\n\t navNext: _react.PropTypes.node,\n\t orientation: _ScrollableOrientationShape2[\'default\'],\n\n\t onPrevMonthClick: _react.PropTypes.func,\n\t onNextMonthClick: _react.PropTypes.func\n\t};\n\tvar defaultProps = {\n\t navPrev: null,\n\t navNext: null,\n\t orientation: _constants.HORIZONTAL_ORIENTATION,\n\n\t onPrevMonthClick: function () {\n\t function onPrevMonthClick() {}\n\n\t return onPrevMonthClick;\n\t }(),\n\t onNextMonthClick: function () {\n\t function onNextMonthClick() {}\n\n\t return onNextMonthClick;\n\t }()\n\t};\n\n\tfunction DayPickerNavigation(props) {\n\t var navPrev = props.navPrev;\n\t var navNext = props.navNext;\n\t var onPrevMonthClick = props.onPrevMonthClick;\n\t var onNextMonthClick = props.onNextMonthClick;\n\t var orientation = props.orientation;\n\n\t var isVertical = orientation !== _constants.HORIZONTAL_ORIENTATION;\n\t var isVerticalScrollable = orientation === _constants.VERTICAL_SCROLLABLE;\n\n\t var navPrevIcon = navPrev;\n\t var navNextIcon = navNext;\n\t var isDefaultNavPrev = false;\n\t var isDefaultNavNext = false;\n\t if (!navPrevIcon) {\n\t isDefaultNavPrev = true;\n\t navPrevIcon = isVertical ? _react2[\'default\'].createElement(_chevronUp2[\'default\'], null) : _react2[\'default\'].createElement(_arrowLeft2[\'default\'], null);\n\t }\n\t if (!navNextIcon) {\n\t isDefaultNavNext = true;\n\t navNextIcon = isVertical ? _react2[\'default\'].createElement(_chevronDown2[\'default\'], null) : _react2[\'default\'].createElement(_arrowRight2[\'default\'], null);\n\t }\n\n\t var navClassNames = (0, _classnames2[\'default\'])(\'DayPickerNavigation\', {\n\t \'DayPickerNavigation--horizontal\': !isVertical,\n\t \'DayPickerNavigation--vertical\': isVertical,\n\t \'DayPickerNavigation--vertical-scrollable\': isVerticalScrollable\n\t });\n\t var prevClassNames = (0, _classnames2[\'default\'])(\'DayPickerNavigation__prev\', {\n\t \'DayPickerNavigation__prev--default\': isDefaultNavPrev\n\t });\n\t var nextClassNames = (0, _classnames2[\'default\'])(\'DayPickerNavigation__next\', {\n\t \'DayPickerNavigation__next--default\': isDefaultNavNext\n\t });\n\n\t return _react2[\'default\'].createElement(\'div\', { className: navClassNames }, !isVerticalScrollable && _react2[\'default\'].createElement(\'span\', {\n\t className: prevClassNames,\n\t onClick: onPrevMonthClick\n\t }, navPrevIcon), _react2[\'default\'].createElement(\'span\', {\n\t className: nextClassNames,\n\t onClick: onNextMonthClick\n\t }, navNextIcon));\n\t}\n\n\tDayPickerNavigation.propTypes = propTypes;\n\tDayPickerNavigation.defaultProps = defaultProps;\n\n/***/ },\n\n/***/ 1:\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! react */ 1);\n\n/***/ },\n\n/***/ 5:\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! classnames */ 2);\n\n/***/ },\n\n/***/ 8:\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! ../shapes/ScrollableOrientationShape */ 120);\n\n/***/ },\n\n/***/ 9:\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! ../../constants */ 29);\n\n/***/ },\n\n/***/ 24:\n/***/ function(module, exports, __webpack_require__) {\n\n\tObject.defineProperty(exports, "__esModule", {\n\t value: true\n\t});\n\n\tvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\n\tvar _react = __webpack_require__(1);\n\n\tvar _react2 = _interopRequireDefault(_react);\n\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }\n\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }\n\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\tvar SVG = function (_React$Component) {\n\t _inherits(SVG, _React$Component);\n\n\t function SVG() {\n\t _classCallCheck(this, SVG);\n\n\t return _possibleConstructorReturn(this, (SVG.__proto__ || Object.getPrototypeOf(SVG)).apply(this, arguments));\n\t }\n\n\t _createClass(SVG, [{\n\t key: "render",\n\t value: function () {\n\t function render() {\n\t return _react2["default"].createElement(\n\t "svg",\n\t _extends({ viewBox: "0 0 1000 1000" }, this.props),\n\t _react2["default"].createElement("path", { d: "M694.4 242.4l249.1 249.1c11 11 11 21 0 32L694.4 772.7c-5 5-10 7-16 7s-11-2-16-7c-11-11-11-21 0-32l210.1-210.1H67.1c-13 0-23-10-23-23s10-23 23-23h805.4L662.4 274.5c-21-21.1 11-53.1 32-32.1z" })\n\t );\n\t }\n\n\t return render;\n\t }()\n\t }]);\n\n\t return SVG;\n\t}(_react2["default"].Component);\n\n\texports["default"] = SVG;\n\n/***/ },\n\n/***/ 33:\n/***/ function(module, exports, __webpack_require__) {\n\n\tObject.defineProperty(exports, "__esModule", {\n\t value: true\n\t});\n\n\tvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\n\tvar _react = __webpack_require__(1);\n\n\tvar _react2 = _interopRequireDefault(_react);\n\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }\n\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }\n\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\tvar SVG = function (_React$Component) {\n\t _inherits(SVG, _React$Component);\n\n\t function SVG() {\n\t _classCallCheck(this, SVG);\n\n\t return _possibleConstructorReturn(this, (SVG.__proto__ || Object.getPrototypeOf(SVG)).apply(this, arguments));\n\t }\n\n\t _createClass(SVG, [{\n\t key: "render",\n\t value: function () {\n\t function render() {\n\t return _react2["default"].createElement(\n\t "svg",\n\t _extends({ viewBox: "0 0 1000 1000" }, this.props),\n\t _react2["default"].createElement("path", { d: "M336.2 274.5l-210.1 210h805.4c13 0 23 10 23 23s-10 23-23 23H126.1l210.1 210.1c11 11 11 21 0 32-5 5-10 7-16 7s-11-2-16-7l-249.1-249c-11-11-11-21 0-32l249.1-249.1c21-21.1 53 10.9 32 32z" })\n\t );\n\t }\n\n\t return render;\n\t }()\n\t }]);\n\n\t return SVG;\n\t}(_react2["default"].Component);\n\n\texports["default"] = SVG;\n\n/***/ },\n\n/***/ 34:\n/***/ function(module, exports, __webpack_require__) {\n\n\tObject.defineProperty(exports, "__esModule", {\n\t value: true\n\t});\n\n\tvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\n\tvar _react = __webpack_require__(1);\n\n\tvar _react2 = _interopRequireDefault(_react);\n\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }\n\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }\n\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\tvar SVG = function (_React$Component) {\n\t _inherits(SVG, _React$Component);\n\n\t function SVG() {\n\t _classCallCheck(this, SVG);\n\n\t return _possibleConstructorReturn(this, (SVG.__proto__ || Object.getPrototypeOf(SVG)).apply(this, arguments));\n\t }\n\n\t _createClass(SVG, [{\n\t key: "render",\n\t value: function () {\n\t function render() {\n\t return _react2["default"].createElement(\n\t "svg",\n\t _extends({ viewBox: "0 0 1000 1000" }, this.props),\n\t _react2["default"].createElement("path", { d: "M32.1 712.6l453.2-452.2c11-11 21-11 32 0l453.2 452.2c4 5 6 10 6 16 0 13-10 23-22 23-7 0-12-2-16-7L501.3 308.5 64.1 744.7c-4 5-9 7-15 7-7 0-12-2-17-7-9-11-9-21 0-32.1z" })\n\t );\n\t }\n\n\t return render;\n\t }()\n\t }]);\n\n\t return SVG;\n\t}(_react2["default"].Component);\n\n\texports["default"] = SVG;\n\n/***/ },\n\n/***/ 35:\n/***/ function(module, exports, __webpack_require__) {\n\n\tObject.defineProperty(exports, "__esModule", {\n\t value: true\n\t});\n\n\tvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\n\tvar _react = __webpack_require__(1);\n\n\tvar _react2 = _interopRequireDefault(_react);\n\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }\n\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }\n\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\tvar SVG = function (_React$Component) {\n\t _inherits(SVG, _React$Component);\n\n\t function SVG() {\n\t _classCallCheck(this, SVG);\n\n\t return _possibleConstructorReturn(this, (SVG.__proto__ || Object.getPrototypeOf(SVG)).apply(this, arguments));\n\t }\n\n\t _createClass(SVG, [{\n\t key: "render",\n\t value: function () {\n\t function render() {\n\t return _react2["default"].createElement(\n\t "svg",\n\t _extends({ viewBox: "0 0 1000 1000" }, this.props),\n\t _react2["default"].createElement("path", { d: "M967.5 288.5L514.3 740.7c-11 11-21 11-32 0L29.1 288.5c-4-5-6-11-6-16 0-13 10-23 23-23 6 0 11 2 15 7l437.2 436.2 437.2-436.2c4-5 9-7 16-7 6 0 11 2 16 7 9 10.9 9 21 0 32z" })\n\t );\n\t }\n\n\t return render;\n\t }()\n\t }]);\n\n\t return SVG;\n\t}(_react2["default"].Component);\n\n\texports["default"] = SVG;\n\n/***/ }\n\n/******/ });\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dates/lib/components/DayPickerNavigation.js\n// module id = 1313\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dates/lib/components/DayPickerNavigation.js?', + ); + + /***/ + }, + /* 1314 */ + /* unknown exports provided */ + /* all exports used */ + /*!**********************************************************!*\ + !*** ./~/react-dates/lib/components/SingleDatePicker.js ***! + \**********************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "module.exports =\n/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n\n\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ function(module, exports, __webpack_require__) {\n\n\tvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\n\tvar _createClass = function () {\n\t function defineProperties(target, props) {\n\t for (var i = 0; i < props.length; i++) {\n\t 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);\n\t }\n\t }return function (Constructor, protoProps, staticProps) {\n\t if (protoProps) defineProperties(Constructor.prototype, protoProps);if (staticProps) defineProperties(Constructor, staticProps);return Constructor;\n\t };\n\t}();\n\n\tvar _react = __webpack_require__(1);\n\n\tvar _react2 = _interopRequireDefault(_react);\n\n\tvar _moment = __webpack_require__(4);\n\n\tvar _moment2 = _interopRequireDefault(_moment);\n\n\tvar _classnames = __webpack_require__(5);\n\n\tvar _classnames2 = _interopRequireDefault(_classnames);\n\n\tvar _reactPortal = __webpack_require__(15);\n\n\tvar _reactPortal2 = _interopRequireDefault(_reactPortal);\n\n\tvar _OutsideClickHandler = __webpack_require__(16);\n\n\tvar _OutsideClickHandler2 = _interopRequireDefault(_OutsideClickHandler);\n\n\tvar _toMomentObject = __webpack_require__(27);\n\n\tvar _toMomentObject2 = _interopRequireDefault(_toMomentObject);\n\n\tvar _toLocalizedDateString = __webpack_require__(28);\n\n\tvar _toLocalizedDateString2 = _interopRequireDefault(_toLocalizedDateString);\n\n\tvar _toISODateString = __webpack_require__(29);\n\n\tvar _toISODateString2 = _interopRequireDefault(_toISODateString);\n\n\tvar _getResponsiveContainerStyles = __webpack_require__(17);\n\n\tvar _getResponsiveContainerStyles2 = _interopRequireDefault(_getResponsiveContainerStyles);\n\n\tvar _SingleDatePickerInput = __webpack_require__(40);\n\n\tvar _SingleDatePickerInput2 = _interopRequireDefault(_SingleDatePickerInput);\n\n\tvar _DayPicker = __webpack_require__(39);\n\n\tvar _DayPicker2 = _interopRequireDefault(_DayPicker);\n\n\tvar _close = __webpack_require__(21);\n\n\tvar _close2 = _interopRequireDefault(_close);\n\n\tvar _isInclusivelyAfterDay = __webpack_require__(18);\n\n\tvar _isInclusivelyAfterDay2 = _interopRequireDefault(_isInclusivelyAfterDay);\n\n\tvar _isSameDay = __webpack_require__(37);\n\n\tvar _isSameDay2 = _interopRequireDefault(_isSameDay);\n\n\tvar _SingleDatePickerShape = __webpack_require__(41);\n\n\tvar _SingleDatePickerShape2 = _interopRequireDefault(_SingleDatePickerShape);\n\n\tvar _constants = __webpack_require__(9);\n\n\tfunction _interopRequireDefault(obj) {\n\t return obj && obj.__esModule ? obj : { 'default': 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 _possibleConstructorReturn(self, call) {\n\t if (!self) {\n\t throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n\t }return call && ((typeof call === \"undefined\" ? \"undefined\" : _typeof(call)) === \"object\" || typeof call === \"function\") ? call : self;\n\t}\n\n\tfunction _inherits(subClass, superClass) {\n\t if (typeof superClass !== \"function\" && superClass !== null) {\n\t throw new TypeError(\"Super expression must either be null or a function, not \" + (typeof superClass === \"undefined\" ? \"undefined\" : _typeof(superClass)));\n\t }subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n\t}\n\n\tvar propTypes = _SingleDatePickerShape2['default'];\n\n\tvar defaultProps = {\n\t date: null,\n\t focused: false,\n\t disabled: false,\n\t required: false,\n\t showClearDate: false,\n\t reopenPickerOnClearDate: false,\n\t keepOpenOnDateSelect: false,\n\n\t navPrev: null,\n\t navNext: null,\n\n\t onDateChange: function () {\n\t function onDateChange() {}\n\n\t return onDateChange;\n\t }(),\n\t onFocusChange: function () {\n\t function onFocusChange() {}\n\n\t return onFocusChange;\n\t }(),\n\n\t isDayBlocked: function () {\n\t function isDayBlocked() {\n\t return false;\n\t }\n\n\t return isDayBlocked;\n\t }(),\n\t isDayHighlighted: function () {\n\t function isDayHighlighted() {\n\t return false;\n\t }\n\n\t return isDayHighlighted;\n\t }(),\n\t disabledDays: [],\n\t isOutsideRange: function () {\n\t function isOutsideRange(day) {\n\t return !(0, _isInclusivelyAfterDay2['default'])(day, (0, _moment2['default'])());\n\t }\n\n\t return isOutsideRange;\n\t }(),\n\t enableOutsideDays: false,\n\t numberOfMonths: 2,\n\t orientation: _constants.HORIZONTAL_ORIENTATION,\n\t anchorDirection: _constants.ANCHOR_LEFT,\n\t horizontalMargin: 0,\n\t withPortal: false,\n\t withFullScreenPortal: false,\n\t screenReaderInputMessage: '',\n\t initialVisibleMonth: function () {\n\t function initialVisibleMonth() {\n\t return (0, _moment2['default'])();\n\t }\n\n\t return initialVisibleMonth;\n\t }(),\n\n\t onPrevMonthClick: function () {\n\t function onPrevMonthClick() {}\n\n\t return onPrevMonthClick;\n\t }(),\n\t onNextMonthClick: function () {\n\t function onNextMonthClick() {}\n\n\t return onNextMonthClick;\n\t }(),\n\n\t renderDay: null,\n\n\t // i18n\n\t displayFormat: function () {\n\t function displayFormat() {\n\t return _moment2['default'].localeData().longDateFormat('L');\n\t }\n\n\t return displayFormat;\n\t }(),\n\t monthFormat: 'MMMM YYYY',\n\t phrases: {\n\t closeDatePicker: 'Close',\n\t clearDate: 'Clear Date'\n\t }\n\t};\n\n\tvar SingleDatePicker = function (_React$Component) {\n\t _inherits(SingleDatePicker, _React$Component);\n\n\t function SingleDatePicker(props) {\n\t _classCallCheck(this, SingleDatePicker);\n\n\t var _this = _possibleConstructorReturn(this, (SingleDatePicker.__proto__ || Object.getPrototypeOf(SingleDatePicker)).call(this, props));\n\n\t _this.state = {\n\t dayPickerContainerStyles: {},\n\t hoverDate: null\n\t };\n\n\t _this.today = (0, _moment2['default'])();\n\n\t _this.onDayMouseEnter = _this.onDayMouseEnter.bind(_this);\n\t _this.onDayMouseLeave = _this.onDayMouseLeave.bind(_this);\n\t _this.onDayClick = _this.onDayClick.bind(_this);\n\n\t _this.onChange = _this.onChange.bind(_this);\n\t _this.onFocus = _this.onFocus.bind(_this);\n\t _this.onClearFocus = _this.onClearFocus.bind(_this);\n\t _this.clearDate = _this.clearDate.bind(_this);\n\n\t _this.responsivizePickerPosition = _this.responsivizePickerPosition.bind(_this);\n\t return _this;\n\t }\n\n\t /* istanbul ignore next */\n\n\t _createClass(SingleDatePicker, [{\n\t key: 'componentDidMount',\n\t value: function () {\n\t function componentDidMount() {\n\t window.addEventListener('resize', this.responsivizePickerPosition);\n\t this.responsivizePickerPosition();\n\t }\n\n\t return componentDidMount;\n\t }()\n\t }, {\n\t key: 'componentWillUpdate',\n\t value: function () {\n\t function componentWillUpdate() {\n\t this.today = (0, _moment2['default'])();\n\t }\n\n\t return componentWillUpdate;\n\t }()\n\t }, {\n\t key: 'componentDidUpdate',\n\t value: function () {\n\t function componentDidUpdate(prevProps) {\n\t if (!prevProps.focused && this.props.focused) {\n\t this.responsivizePickerPosition();\n\t }\n\t }\n\n\t return componentDidUpdate;\n\t }()\n\n\t /* istanbul ignore next */\n\n\t }, {\n\t key: 'componentWillUnmount',\n\t value: function () {\n\t function componentWillUnmount() {\n\t window.removeEventListener('resize', this.responsivizePickerPosition);\n\t }\n\n\t return componentWillUnmount;\n\t }()\n\t }, {\n\t key: 'onChange',\n\t value: function () {\n\t function onChange(dateString) {\n\t var _props = this.props;\n\t var isOutsideRange = _props.isOutsideRange;\n\t var keepOpenOnDateSelect = _props.keepOpenOnDateSelect;\n\t var onDateChange = _props.onDateChange;\n\t var onFocusChange = _props.onFocusChange;\n\n\t var date = (0, _toMomentObject2['default'])(dateString, this.getDisplayFormat());\n\n\t var isValid = date && !isOutsideRange(date);\n\t if (isValid) {\n\t onDateChange(date);\n\t if (!keepOpenOnDateSelect) onFocusChange({ focused: false });\n\t } else {\n\t onDateChange(null);\n\t }\n\t }\n\n\t return onChange;\n\t }()\n\t }, {\n\t key: 'onDayClick',\n\t value: function () {\n\t function onDayClick(day, e) {\n\t if (e) e.preventDefault();\n\t if (this.isBlocked(day)) return;\n\n\t this.props.onDateChange(day);\n\t if (!this.props.keepOpenOnDateSelect) this.props.onFocusChange({ focused: null });\n\t }\n\n\t return onDayClick;\n\t }()\n\t }, {\n\t key: 'onDayMouseEnter',\n\t value: function () {\n\t function onDayMouseEnter(day) {\n\t this.setState({\n\t hoverDate: day\n\t });\n\t }\n\n\t return onDayMouseEnter;\n\t }()\n\t }, {\n\t key: 'onDayMouseLeave',\n\t value: function () {\n\t function onDayMouseLeave() {\n\t this.setState({\n\t hoverDate: null\n\t });\n\t }\n\n\t return onDayMouseLeave;\n\t }()\n\t }, {\n\t key: 'onFocus',\n\t value: function () {\n\t function onFocus() {\n\t if (!this.props.disabled) {\n\t this.props.onFocusChange({ focused: true });\n\t }\n\t }\n\n\t return onFocus;\n\t }()\n\t }, {\n\t key: 'onClearFocus',\n\t value: function () {\n\t function onClearFocus() {\n\t var _props2 = this.props;\n\t var focused = _props2.focused;\n\t var onFocusChange = _props2.onFocusChange;\n\n\t if (!focused) return;\n\n\t onFocusChange({ focused: false });\n\t }\n\n\t return onClearFocus;\n\t }()\n\t }, {\n\t key: 'getDateString',\n\t value: function () {\n\t function getDateString(date) {\n\t var displayFormat = this.getDisplayFormat();\n\t if (date && displayFormat) {\n\t return date && date.format(displayFormat);\n\t }\n\t return (0, _toLocalizedDateString2['default'])(date);\n\t }\n\n\t return getDateString;\n\t }()\n\t }, {\n\t key: 'getDayPickerContainerClasses',\n\t value: function () {\n\t function getDayPickerContainerClasses() {\n\t var _props3 = this.props;\n\t var orientation = _props3.orientation;\n\t var withPortal = _props3.withPortal;\n\t var withFullScreenPortal = _props3.withFullScreenPortal;\n\t var anchorDirection = _props3.anchorDirection;\n\t var hoverDate = this.state.hoverDate;\n\n\t var dayPickerClassName = (0, _classnames2['default'])('SingleDatePicker__picker', {\n\t 'SingleDatePicker__picker--direction-left': anchorDirection === _constants.ANCHOR_LEFT,\n\t 'SingleDatePicker__picker--direction-right': anchorDirection === _constants.ANCHOR_RIGHT,\n\t 'SingleDatePicker__picker--horizontal': orientation === _constants.HORIZONTAL_ORIENTATION,\n\t 'SingleDatePicker__picker--vertical': orientation === _constants.VERTICAL_ORIENTATION,\n\t 'SingleDatePicker__picker--portal': withPortal || withFullScreenPortal,\n\t 'SingleDatePicker__picker--full-screen-portal': withFullScreenPortal,\n\t 'SingleDatePicker__picker--valid-date-hovered': hoverDate && !this.isBlocked(hoverDate)\n\t });\n\n\t return dayPickerClassName;\n\t }\n\n\t return getDayPickerContainerClasses;\n\t }()\n\t }, {\n\t key: 'getDisplayFormat',\n\t value: function () {\n\t function getDisplayFormat() {\n\t var displayFormat = this.props.displayFormat;\n\n\t return typeof displayFormat === 'string' ? displayFormat : displayFormat();\n\t }\n\n\t return getDisplayFormat;\n\t }()\n\t }, {\n\t key: 'clearDate',\n\t value: function () {\n\t function clearDate() {\n\t var _props4 = this.props;\n\t var onDateChange = _props4.onDateChange;\n\t var reopenPickerOnClearDate = _props4.reopenPickerOnClearDate;\n\t var onFocusChange = _props4.onFocusChange;\n\n\t onDateChange(null);\n\t if (reopenPickerOnClearDate) {\n\t onFocusChange({ focused: true });\n\t }\n\t }\n\n\t return clearDate;\n\t }()\n\n\t /* istanbul ignore next */\n\n\t }, {\n\t key: 'responsivizePickerPosition',\n\t value: function () {\n\t function responsivizePickerPosition() {\n\t var _props5 = this.props;\n\t var anchorDirection = _props5.anchorDirection;\n\t var horizontalMargin = _props5.horizontalMargin;\n\t var withPortal = _props5.withPortal;\n\t var withFullScreenPortal = _props5.withFullScreenPortal;\n\t var focused = _props5.focused;\n\t var dayPickerContainerStyles = this.state.dayPickerContainerStyles;\n\n\t if (!focused) {\n\t return;\n\t }\n\n\t var isAnchoredLeft = anchorDirection === _constants.ANCHOR_LEFT;\n\n\t if (!withPortal && !withFullScreenPortal) {\n\t var containerRect = this.dayPickerContainer.getBoundingClientRect();\n\t var currentOffset = dayPickerContainerStyles[anchorDirection] || 0;\n\t var containerEdge = isAnchoredLeft ? containerRect[_constants.ANCHOR_RIGHT] : containerRect[_constants.ANCHOR_LEFT];\n\n\t this.setState({\n\t dayPickerContainerStyles: (0, _getResponsiveContainerStyles2['default'])(anchorDirection, currentOffset, containerEdge, horizontalMargin)\n\t });\n\t }\n\t }\n\n\t return responsivizePickerPosition;\n\t }()\n\t }, {\n\t key: 'isBlocked',\n\t value: function () {\n\t function isBlocked(day) {\n\t var _props6 = this.props;\n\t var isDayBlocked = _props6.isDayBlocked;\n\t var isOutsideRange = _props6.isOutsideRange;\n\n\t return isDayBlocked(day) || isOutsideRange(day);\n\t }\n\n\t return isBlocked;\n\t }()\n\t }, {\n\t key: 'isHovered',\n\t value: function () {\n\t function isHovered(day) {\n\t return (0, _isSameDay2['default'])(day, this.state.hoverDate);\n\t }\n\n\t return isHovered;\n\t }()\n\t }, {\n\t key: 'isSelected',\n\t value: function () {\n\t function isSelected(day) {\n\t return (0, _isSameDay2['default'])(day, this.props.date);\n\t }\n\n\t return isSelected;\n\t }()\n\t }, {\n\t key: 'isToday',\n\t value: function () {\n\t function isToday(day) {\n\t return (0, _isSameDay2['default'])(day, this.today);\n\t }\n\n\t return isToday;\n\t }()\n\t }, {\n\t key: 'maybeRenderDayPickerWithPortal',\n\t value: function () {\n\t function maybeRenderDayPickerWithPortal() {\n\t var _props7 = this.props;\n\t var focused = _props7.focused;\n\t var withPortal = _props7.withPortal;\n\t var withFullScreenPortal = _props7.withFullScreenPortal;\n\n\t if (!focused) {\n\t return null;\n\t }\n\n\t if (withPortal || withFullScreenPortal) {\n\t return _react2['default'].createElement(_reactPortal2['default'], { isOpened: true }, this.renderDayPicker());\n\t }\n\n\t return this.renderDayPicker();\n\t }\n\n\t return maybeRenderDayPickerWithPortal;\n\t }()\n\t }, {\n\t key: 'renderDayPicker',\n\t value: function () {\n\t function renderDayPicker() {\n\t var _this2 = this;\n\n\t var _props8 = this.props;\n\t var isDayBlocked = _props8.isDayBlocked;\n\t var isDayHighlighted = _props8.isDayHighlighted;\n\t var isOutsideRange = _props8.isOutsideRange;\n\t var enableOutsideDays = _props8.enableOutsideDays;\n\t var numberOfMonths = _props8.numberOfMonths;\n\t var orientation = _props8.orientation;\n\t var monthFormat = _props8.monthFormat;\n\t var navPrev = _props8.navPrev;\n\t var navNext = _props8.navNext;\n\t var onPrevMonthClick = _props8.onPrevMonthClick;\n\t var onNextMonthClick = _props8.onNextMonthClick;\n\t var withPortal = _props8.withPortal;\n\t var withFullScreenPortal = _props8.withFullScreenPortal;\n\t var focused = _props8.focused;\n\t var initialVisibleMonth = _props8.initialVisibleMonth;\n\t var renderDay = _props8.renderDay;\n\t var dayPickerContainerStyles = this.state.dayPickerContainerStyles;\n\n\t var modifiers = {\n\t today: function () {\n\t function today(day) {\n\t return _this2.isToday(day);\n\t }\n\n\t return today;\n\t }(),\n\t blocked: function () {\n\t function blocked(day) {\n\t return _this2.isBlocked(day);\n\t }\n\n\t return blocked;\n\t }(),\n\t 'blocked-calendar': function () {\n\t function blockedCalendar(day) {\n\t return isDayBlocked(day);\n\t }\n\n\t return blockedCalendar;\n\t }(),\n\t 'blocked-out-of-range': function () {\n\t function blockedOutOfRange(day) {\n\t return isOutsideRange(day);\n\t }\n\n\t return blockedOutOfRange;\n\t }(),\n\t 'highlighted-calendar': function () {\n\t function highlightedCalendar(day) {\n\t return isDayHighlighted(day);\n\t }\n\n\t return highlightedCalendar;\n\t }(),\n\t valid: function () {\n\t function valid(day) {\n\t return !_this2.isBlocked(day);\n\t }\n\n\t return valid;\n\t }(),\n\t hovered: function () {\n\t function hovered(day) {\n\t return _this2.isHovered(day);\n\t }\n\n\t return hovered;\n\t }(),\n\t selected: function () {\n\t function selected(day) {\n\t return _this2.isSelected(day);\n\t }\n\n\t return selected;\n\t }()\n\t };\n\n\t var onOutsideClick = !withFullScreenPortal && withPortal ? this.onClearFocus : undefined;\n\n\t return _react2['default'].createElement('div', {\n\t ref: function () {\n\t function ref(_ref) {\n\t _this2.dayPickerContainer = _ref;\n\t }\n\n\t return ref;\n\t }(),\n\t className: this.getDayPickerContainerClasses(),\n\t style: dayPickerContainerStyles\n\t }, _react2['default'].createElement(_DayPicker2['default'], {\n\t orientation: orientation,\n\t enableOutsideDays: enableOutsideDays,\n\t modifiers: modifiers,\n\t numberOfMonths: numberOfMonths,\n\t onDayClick: this.onDayClick,\n\t onDayMouseEnter: this.onDayMouseEnter,\n\t onDayMouseLeave: this.onDayMouseLeave,\n\t onPrevMonthClick: onPrevMonthClick,\n\t onNextMonthClick: onNextMonthClick,\n\t monthFormat: monthFormat,\n\t withPortal: withPortal || withFullScreenPortal,\n\t hidden: !focused,\n\t initialVisibleMonth: initialVisibleMonth,\n\t onOutsideClick: onOutsideClick,\n\t navPrev: navPrev,\n\t navNext: navNext,\n\t renderDay: renderDay\n\t }), withFullScreenPortal && _react2['default'].createElement('button', {\n\t className: 'SingleDatePicker__close',\n\t type: 'button',\n\t onClick: this.onClearFocus\n\t }, _react2['default'].createElement('span', { className: 'screen-reader-only' }, this.props.phrases.closeDatePicker), _react2['default'].createElement(_close2['default'], null)));\n\t }\n\n\t return renderDayPicker;\n\t }()\n\t }, {\n\t key: 'render',\n\t value: function () {\n\t function render() {\n\t var _props9 = this.props;\n\t var id = _props9.id;\n\t var placeholder = _props9.placeholder;\n\t var focused = _props9.focused;\n\t var disabled = _props9.disabled;\n\t var required = _props9.required;\n\t var showClearDate = _props9.showClearDate;\n\t var date = _props9.date;\n\t var phrases = _props9.phrases;\n\t var withPortal = _props9.withPortal;\n\t var withFullScreenPortal = _props9.withFullScreenPortal;\n\t var screenReaderInputMessage = _props9.screenReaderInputMessage;\n\n\t var displayValue = this.getDateString(date);\n\t var inputValue = (0, _toISODateString2['default'])(date);\n\n\t var onOutsideClick = !withPortal && !withFullScreenPortal ? this.onClearFocus : undefined;\n\n\t return _react2['default'].createElement('div', { className: 'SingleDatePicker' }, _react2['default'].createElement(_OutsideClickHandler2['default'], { onOutsideClick: onOutsideClick }, _react2['default'].createElement(_SingleDatePickerInput2['default'], {\n\t id: id,\n\t placeholder: placeholder,\n\t focused: focused,\n\t disabled: disabled,\n\t required: required,\n\t showCaret: !withPortal && !withFullScreenPortal,\n\t phrases: phrases,\n\t onClearDate: this.clearDate,\n\t showClearDate: showClearDate,\n\t displayValue: displayValue,\n\t inputValue: inputValue,\n\t onChange: this.onChange,\n\t onFocus: this.onFocus,\n\t onKeyDownShiftTab: this.onClearFocus,\n\t onKeyDownTab: this.onClearFocus,\n\t screenReaderMessage: screenReaderInputMessage\n\t }), this.maybeRenderDayPickerWithPortal()));\n\t }\n\n\t return render;\n\t }()\n\t }]);\n\n\t return SingleDatePicker;\n\t}(_react2['default'].Component);\n\n\texports['default'] = SingleDatePicker;\n\n\tSingleDatePicker.propTypes = propTypes;\n\tSingleDatePicker.defaultProps = defaultProps;\n\n/***/ },\n/* 1 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! react */ 1);\n\n/***/ },\n/* 2 */,\n/* 3 */,\n/* 4 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! moment */ 3);\n\n/***/ },\n/* 5 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! classnames */ 2);\n\n/***/ },\n/* 6 */,\n/* 7 */,\n/* 8 */,\n/* 9 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! ../../constants */ 29);\n\n/***/ },\n/* 10 */,\n/* 11 */,\n/* 12 */,\n/* 13 */,\n/* 14 */,\n/* 15 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! react-portal */ 570);\n\n/***/ },\n/* 16 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! ./OutsideClickHandler */ 242);\n\n/***/ },\n/* 17 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! ../utils/getResponsiveContainerStyles */ 526);\n\n/***/ },\n/* 18 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! ../utils/isInclusivelyAfterDay */ 121);\n\n/***/ },\n/* 19 */,\n/* 20 */,\n/* 21 */\n/***/ function(module, exports, __webpack_require__) {\n\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\n\tvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\n\tvar _react = __webpack_require__(1);\n\n\tvar _react2 = _interopRequireDefault(_react);\n\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\tvar SVG = function (_React$Component) {\n\t _inherits(SVG, _React$Component);\n\n\t function SVG() {\n\t _classCallCheck(this, SVG);\n\n\t return _possibleConstructorReturn(this, (SVG.__proto__ || Object.getPrototypeOf(SVG)).apply(this, arguments));\n\t }\n\n\t _createClass(SVG, [{\n\t key: \"render\",\n\t value: function () {\n\t function render() {\n\t return _react2[\"default\"].createElement(\n\t \"svg\",\n\t _extends({ viewBox: \"0 0 12 12\" }, this.props),\n\t _react2[\"default\"].createElement(\"path\", { fillRule: \"evenodd\", d: \"M11.53.47a.75.75 0 0 0-1.061 0l-4.47 4.47L1.529.47A.75.75 0 1 0 .468 1.531l4.47 4.47-4.47 4.47a.75.75 0 1 0 1.061 1.061l4.47-4.47 4.47 4.47a.75.75 0 1 0 1.061-1.061l-4.47-4.47 4.47-4.47a.75.75 0 0 0 0-1.061z\" })\n\t );\n\t }\n\n\t return render;\n\t }()\n\t }]);\n\n\t return SVG;\n\t}(_react2[\"default\"].Component);\n\n\texports[\"default\"] = SVG;\n\n/***/ },\n/* 22 */,\n/* 23 */,\n/* 24 */,\n/* 25 */,\n/* 26 */,\n/* 27 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! ../utils/toMomentObject */ 122);\n\n/***/ },\n/* 28 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! ../utils/toLocalizedDateString */ 244);\n\n/***/ },\n/* 29 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! ../utils/toISODateString */ 243);\n\n/***/ },\n/* 30 */,\n/* 31 */,\n/* 32 */,\n/* 33 */,\n/* 34 */,\n/* 35 */,\n/* 36 */,\n/* 37 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! ../utils/isSameDay */ 99);\n\n/***/ },\n/* 38 */,\n/* 39 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! ./DayPicker */ 241);\n\n/***/ },\n/* 40 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! ./SingleDatePickerInput */ 520);\n\n/***/ },\n/* 41 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __webpack_require__(/*! ../shapes/SingleDatePickerShape */ 525);\n\n/***/ }\n/******/ ]);\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dates/lib/components/SingleDatePicker.js\n// module id = 1314\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dates/lib/components/SingleDatePicker.js?", + ); + + /***/ + }, + /* 1315 */ + /* unknown exports provided */ + /* all exports used */ + /*!**********************************************************!*\ + !*** ./~/react-dates/lib/utils/getCalendarMonthWeeks.js ***! + \**********************************************************/ + /***/ function (module, exports) { + eval( + "Object.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports['default'] = getCalendarMonthWeeks;\nfunction getCalendarMonthWeeks(month, enableOutsideDays) {\n // set utc offset to get correct dates in future (when timezone changes)\n var baseDate = month.clone();\n var firstOfMonth = baseDate.clone().startOf('month').hour(12);\n var lastOfMonth = baseDate.clone().endOf('month').hour(12);\n\n var currentDay = firstOfMonth.clone();\n var currentWeek = [];\n var weeksInMonth = [];\n\n // days belonging to the previous month\n for (var i = 0; i < currentDay.weekday(); i++) {\n var prevDay = enableOutsideDays ? currentDay.clone().subtract(i + 1, 'day') : null;\n currentWeek.unshift(prevDay);\n }\n\n while (currentDay < lastOfMonth) {\n currentWeek.push(currentDay.clone());\n currentDay.add(1, 'd');\n\n if (currentDay.weekday() === 0) {\n weeksInMonth.push(currentWeek);\n currentWeek = [];\n }\n }\n\n // weekday() returns the index of the day of the week according to the locale\n // this means if the week starts on Monday, weekday() will return 0 for a Monday date, not 1\n if (currentDay.weekday() !== 0) {\n // days belonging to the next month\n for (var k = currentDay.weekday(), count = 0; k < 7; k++, count++) {\n var nextDay = enableOutsideDays ? currentDay.clone().add(count, 'day') : null;\n currentWeek.push(nextDay);\n }\n\n weeksInMonth.push(currentWeek);\n }\n\n return weeksInMonth;\n}\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dates/lib/utils/getCalendarMonthWeeks.js\n// module id = 1315\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dates/lib/utils/getCalendarMonthWeeks.js?", + ); + + /***/ + }, + /* 1316 */ + /* unknown exports provided */ + /* all exports used */ + /*!*************************************************************!*\ + !*** ./~/react-dates/lib/utils/isTransitionEndSupported.js ***! + \*************************************************************/ + /***/ function (module, exports) { + eval( + "Object.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports['default'] = isTransitionEndSupported;\nfunction isTransitionEndSupported() {\n return !!(typeof window !== 'undefined' && 'TransitionEvent' in window);\n}\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dates/lib/utils/isTransitionEndSupported.js\n// module id = 1316\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dates/lib/utils/isTransitionEndSupported.js?", + ); + + /***/ + }, + /* 1317 */ + /* unknown exports provided */ + /* all exports used */ + /*!**************************************************!*\ + !*** ./~/react-dom/lib/ARIADOMPropertyConfig.js ***! + \**************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar ARIADOMPropertyConfig = {\n Properties: {\n // Global States and Properties\n 'aria-current': 0, // state\n 'aria-details': 0,\n 'aria-disabled': 0, // state\n 'aria-hidden': 0, // state\n 'aria-invalid': 0, // state\n 'aria-keyshortcuts': 0,\n 'aria-label': 0,\n 'aria-roledescription': 0,\n // Widget Attributes\n 'aria-autocomplete': 0,\n 'aria-checked': 0,\n 'aria-expanded': 0,\n 'aria-haspopup': 0,\n 'aria-level': 0,\n 'aria-modal': 0,\n 'aria-multiline': 0,\n 'aria-multiselectable': 0,\n 'aria-orientation': 0,\n 'aria-placeholder': 0,\n 'aria-pressed': 0,\n 'aria-readonly': 0,\n 'aria-required': 0,\n 'aria-selected': 0,\n 'aria-sort': 0,\n 'aria-valuemax': 0,\n 'aria-valuemin': 0,\n 'aria-valuenow': 0,\n 'aria-valuetext': 0,\n // Live Region Attributes\n 'aria-atomic': 0,\n 'aria-busy': 0,\n 'aria-live': 0,\n 'aria-relevant': 0,\n // Drag-and-Drop Attributes\n 'aria-dropeffect': 0,\n 'aria-grabbed': 0,\n // Relationship Attributes\n 'aria-activedescendant': 0,\n 'aria-colcount': 0,\n 'aria-colindex': 0,\n 'aria-colspan': 0,\n 'aria-controls': 0,\n 'aria-describedby': 0,\n 'aria-errormessage': 0,\n 'aria-flowto': 0,\n 'aria-labelledby': 0,\n 'aria-owns': 0,\n 'aria-posinset': 0,\n 'aria-rowcount': 0,\n 'aria-rowindex': 0,\n 'aria-rowspan': 0,\n 'aria-setsize': 0\n },\n DOMAttributeNames: {},\n DOMPropertyNames: {}\n};\n\nmodule.exports = ARIADOMPropertyConfig;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/ARIADOMPropertyConfig.js\n// module id = 1317\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/ARIADOMPropertyConfig.js?", + ); + + /***/ + }, + /* 1318 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************************!*\ + !*** ./~/react-dom/lib/AutoFocusUtils.js ***! + \*******************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar ReactDOMComponentTree = __webpack_require__(/*! ./ReactDOMComponentTree */ 24);\n\nvar focusNode = __webpack_require__(/*! fbjs/lib/focusNode */ 347);\n\nvar AutoFocusUtils = {\n focusDOMComponent: function () {\n focusNode(ReactDOMComponentTree.getNodeFromInstance(this));\n }\n};\n\nmodule.exports = AutoFocusUtils;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/AutoFocusUtils.js\n// module id = 1318\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/AutoFocusUtils.js?', + ); + + /***/ + }, + /* 1319 */ + /* unknown exports provided */ + /* all exports used */ + /*!***************************************************!*\ + !*** ./~/react-dom/lib/BeforeInputEventPlugin.js ***! + \***************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar EventPropagators = __webpack_require__(/*! ./EventPropagators */ 124);\nvar ExecutionEnvironment = __webpack_require__(/*! fbjs/lib/ExecutionEnvironment */ 27);\nvar FallbackCompositionState = __webpack_require__(/*! ./FallbackCompositionState */ 1325);\nvar SyntheticCompositionEvent = __webpack_require__(/*! ./SyntheticCompositionEvent */ 1365);\nvar SyntheticInputEvent = __webpack_require__(/*! ./SyntheticInputEvent */ 1368);\n\nvar END_KEYCODES = [9, 13, 27, 32]; // Tab, Return, Esc, Space\nvar START_KEYCODE = 229;\n\nvar canUseCompositionEvent = ExecutionEnvironment.canUseDOM && 'CompositionEvent' in window;\n\nvar documentMode = null;\nif (ExecutionEnvironment.canUseDOM && 'documentMode' in document) {\n documentMode = document.documentMode;\n}\n\n// Webkit offers a very useful `textInput` event that can be used to\n// directly represent `beforeInput`. The IE `textinput` event is not as\n// useful, so we don't use it.\nvar canUseTextInputEvent = ExecutionEnvironment.canUseDOM && 'TextEvent' in window && !documentMode && !isPresto();\n\n// In IE9+, we have access to composition events, but the data supplied\n// by the native compositionend event may be incorrect. Japanese ideographic\n// spaces, for instance (\\u3000) are not recorded correctly.\nvar useFallbackCompositionData = ExecutionEnvironment.canUseDOM && (!canUseCompositionEvent || documentMode && documentMode > 8 && documentMode <= 11);\n\n/**\n * Opera <= 12 includes TextEvent in window, but does not fire\n * text input events. Rely on keypress instead.\n */\nfunction isPresto() {\n var opera = window.opera;\n return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12;\n}\n\nvar SPACEBAR_CODE = 32;\nvar SPACEBAR_CHAR = String.fromCharCode(SPACEBAR_CODE);\n\n// Events and their corresponding property names.\nvar eventTypes = {\n beforeInput: {\n phasedRegistrationNames: {\n bubbled: 'onBeforeInput',\n captured: 'onBeforeInputCapture'\n },\n dependencies: ['topCompositionEnd', 'topKeyPress', 'topTextInput', 'topPaste']\n },\n compositionEnd: {\n phasedRegistrationNames: {\n bubbled: 'onCompositionEnd',\n captured: 'onCompositionEndCapture'\n },\n dependencies: ['topBlur', 'topCompositionEnd', 'topKeyDown', 'topKeyPress', 'topKeyUp', 'topMouseDown']\n },\n compositionStart: {\n phasedRegistrationNames: {\n bubbled: 'onCompositionStart',\n captured: 'onCompositionStartCapture'\n },\n dependencies: ['topBlur', 'topCompositionStart', 'topKeyDown', 'topKeyPress', 'topKeyUp', 'topMouseDown']\n },\n compositionUpdate: {\n phasedRegistrationNames: {\n bubbled: 'onCompositionUpdate',\n captured: 'onCompositionUpdateCapture'\n },\n dependencies: ['topBlur', 'topCompositionUpdate', 'topKeyDown', 'topKeyPress', 'topKeyUp', 'topMouseDown']\n }\n};\n\n// Track whether we've ever handled a keypress on the space key.\nvar hasSpaceKeypress = false;\n\n/**\n * Return whether a native keypress event is assumed to be a command.\n * This is required because Firefox fires `keypress` events for key commands\n * (cut, copy, select-all, etc.) even though no character is inserted.\n */\nfunction isKeypressCommand(nativeEvent) {\n return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n !(nativeEvent.ctrlKey && nativeEvent.altKey);\n}\n\n/**\n * Translate native top level events into event types.\n *\n * @param {string} topLevelType\n * @return {object}\n */\nfunction getCompositionEventType(topLevelType) {\n switch (topLevelType) {\n case 'topCompositionStart':\n return eventTypes.compositionStart;\n case 'topCompositionEnd':\n return eventTypes.compositionEnd;\n case 'topCompositionUpdate':\n return eventTypes.compositionUpdate;\n }\n}\n\n/**\n * Does our fallback best-guess model think this event signifies that\n * composition has begun?\n *\n * @param {string} topLevelType\n * @param {object} nativeEvent\n * @return {boolean}\n */\nfunction isFallbackCompositionStart(topLevelType, nativeEvent) {\n return topLevelType === 'topKeyDown' && nativeEvent.keyCode === START_KEYCODE;\n}\n\n/**\n * Does our fallback mode think that this event is the end of composition?\n *\n * @param {string} topLevelType\n * @param {object} nativeEvent\n * @return {boolean}\n */\nfunction isFallbackCompositionEnd(topLevelType, nativeEvent) {\n switch (topLevelType) {\n case 'topKeyUp':\n // Command keys insert or clear IME input.\n return END_KEYCODES.indexOf(nativeEvent.keyCode) !== -1;\n case 'topKeyDown':\n // Expect IME keyCode on each keydown. If we get any other\n // code we must have exited earlier.\n return nativeEvent.keyCode !== START_KEYCODE;\n case 'topKeyPress':\n case 'topMouseDown':\n case 'topBlur':\n // Events are not possible without cancelling IME.\n return true;\n default:\n return false;\n }\n}\n\n/**\n * Google Input Tools provides composition data via a CustomEvent,\n * with the `data` property populated in the `detail` object. If this\n * is available on the event object, use it. If not, this is a plain\n * composition event and we have nothing special to extract.\n *\n * @param {object} nativeEvent\n * @return {?string}\n */\nfunction getDataFromCustomEvent(nativeEvent) {\n var detail = nativeEvent.detail;\n if (typeof detail === 'object' && 'data' in detail) {\n return detail.data;\n }\n return null;\n}\n\n// Track the current IME composition fallback object, if any.\nvar currentComposition = null;\n\n/**\n * @return {?object} A SyntheticCompositionEvent.\n */\nfunction extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) {\n var eventType;\n var fallbackData;\n\n if (canUseCompositionEvent) {\n eventType = getCompositionEventType(topLevelType);\n } else if (!currentComposition) {\n if (isFallbackCompositionStart(topLevelType, nativeEvent)) {\n eventType = eventTypes.compositionStart;\n }\n } else if (isFallbackCompositionEnd(topLevelType, nativeEvent)) {\n eventType = eventTypes.compositionEnd;\n }\n\n if (!eventType) {\n return null;\n }\n\n if (useFallbackCompositionData) {\n // The current composition is stored statically and must not be\n // overwritten while composition continues.\n if (!currentComposition && eventType === eventTypes.compositionStart) {\n currentComposition = FallbackCompositionState.getPooled(nativeEventTarget);\n } else if (eventType === eventTypes.compositionEnd) {\n if (currentComposition) {\n fallbackData = currentComposition.getData();\n }\n }\n }\n\n var event = SyntheticCompositionEvent.getPooled(eventType, targetInst, nativeEvent, nativeEventTarget);\n\n if (fallbackData) {\n // Inject data generated from fallback path into the synthetic event.\n // This matches the property of native CompositionEventInterface.\n event.data = fallbackData;\n } else {\n var customData = getDataFromCustomEvent(nativeEvent);\n if (customData !== null) {\n event.data = customData;\n }\n }\n\n EventPropagators.accumulateTwoPhaseDispatches(event);\n return event;\n}\n\n/**\n * @param {string} topLevelType Record from `EventConstants`.\n * @param {object} nativeEvent Native browser event.\n * @return {?string} The string corresponding to this `beforeInput` event.\n */\nfunction getNativeBeforeInputChars(topLevelType, nativeEvent) {\n switch (topLevelType) {\n case 'topCompositionEnd':\n return getDataFromCustomEvent(nativeEvent);\n case 'topKeyPress':\n /**\n * If native `textInput` events are available, our goal is to make\n * use of them. However, there is a special case: the spacebar key.\n * In Webkit, preventing default on a spacebar `textInput` event\n * cancels character insertion, but it *also* causes the browser\n * to fall back to its default spacebar behavior of scrolling the\n * page.\n *\n * Tracking at:\n * https://code.google.com/p/chromium/issues/detail?id=355103\n *\n * To avoid this issue, use the keypress event as if no `textInput`\n * event is available.\n */\n var which = nativeEvent.which;\n if (which !== SPACEBAR_CODE) {\n return null;\n }\n\n hasSpaceKeypress = true;\n return SPACEBAR_CHAR;\n\n case 'topTextInput':\n // Record the characters to be added to the DOM.\n var chars = nativeEvent.data;\n\n // If it's a spacebar character, assume that we have already handled\n // it at the keypress level and bail immediately. Android Chrome\n // doesn't give us keycodes, so we need to blacklist it.\n if (chars === SPACEBAR_CHAR && hasSpaceKeypress) {\n return null;\n }\n\n return chars;\n\n default:\n // For other native event types, do nothing.\n return null;\n }\n}\n\n/**\n * For browsers that do not provide the `textInput` event, extract the\n * appropriate string to use for SyntheticInputEvent.\n *\n * @param {string} topLevelType Record from `EventConstants`.\n * @param {object} nativeEvent Native browser event.\n * @return {?string} The fallback string for this `beforeInput` event.\n */\nfunction getFallbackBeforeInputChars(topLevelType, nativeEvent) {\n // If we are currently composing (IME) and using a fallback to do so,\n // try to extract the composed characters from the fallback object.\n // If composition event is available, we extract a string only at\n // compositionevent, otherwise extract it at fallback events.\n if (currentComposition) {\n if (topLevelType === 'topCompositionEnd' || !canUseCompositionEvent && isFallbackCompositionEnd(topLevelType, nativeEvent)) {\n var chars = currentComposition.getData();\n FallbackCompositionState.release(currentComposition);\n currentComposition = null;\n return chars;\n }\n return null;\n }\n\n switch (topLevelType) {\n case 'topPaste':\n // If a paste event occurs after a keypress, throw out the input\n // chars. Paste events should not lead to BeforeInput events.\n return null;\n case 'topKeyPress':\n /**\n * As of v27, Firefox may fire keypress events even when no character\n * will be inserted. A few possibilities:\n *\n * - `which` is `0`. Arrow keys, Esc key, etc.\n *\n * - `which` is the pressed key code, but no char is available.\n * Ex: 'AltGr + d` in Polish. There is no modified character for\n * this key combination and no character is inserted into the\n * document, but FF fires the keypress for char code `100` anyway.\n * No `input` event will occur.\n *\n * - `which` is the pressed key code, but a command combination is\n * being used. Ex: `Cmd+C`. No character is inserted, and no\n * `input` event will occur.\n */\n if (nativeEvent.which && !isKeypressCommand(nativeEvent)) {\n return String.fromCharCode(nativeEvent.which);\n }\n return null;\n case 'topCompositionEnd':\n return useFallbackCompositionData ? null : nativeEvent.data;\n default:\n return null;\n }\n}\n\n/**\n * Extract a SyntheticInputEvent for `beforeInput`, based on either native\n * `textInput` or fallback behavior.\n *\n * @return {?object} A SyntheticInputEvent.\n */\nfunction extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) {\n var chars;\n\n if (canUseTextInputEvent) {\n chars = getNativeBeforeInputChars(topLevelType, nativeEvent);\n } else {\n chars = getFallbackBeforeInputChars(topLevelType, nativeEvent);\n }\n\n // If no characters are being inserted, no BeforeInput event should\n // be fired.\n if (!chars) {\n return null;\n }\n\n var event = SyntheticInputEvent.getPooled(eventTypes.beforeInput, targetInst, nativeEvent, nativeEventTarget);\n\n event.data = chars;\n EventPropagators.accumulateTwoPhaseDispatches(event);\n return event;\n}\n\n/**\n * Create an `onBeforeInput` event to match\n * http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105/#events-inputevents.\n *\n * This event plugin is based on the native `textInput` event\n * available in Chrome, Safari, Opera, and IE. This event fires after\n * `onKeyPress` and `onCompositionEnd`, but before `onInput`.\n *\n * `beforeInput` is spec'd but not implemented in any browsers, and\n * the `input` event does not provide any useful information about what has\n * actually been added, contrary to the spec. Thus, `textInput` is the best\n * available event to identify the characters that have actually been inserted\n * into the target node.\n *\n * This plugin is also responsible for emitting `composition` events, thus\n * allowing us to share composition fallback code for both `beforeInput` and\n * `composition` event types.\n */\nvar BeforeInputEventPlugin = {\n\n eventTypes: eventTypes,\n\n extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {\n return [extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget), extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget)];\n }\n};\n\nmodule.exports = BeforeInputEventPlugin;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/BeforeInputEventPlugin.js\n// module id = 1319\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/BeforeInputEventPlugin.js?", + ); + + /***/ + }, + /* 1320 */ + /* unknown exports provided */ + /* all exports used */ + /*!**************************************************!*\ + !*** ./~/react-dom/lib/CSSPropertyOperations.js ***! + \**************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar CSSProperty = __webpack_require__(/*! ./CSSProperty */ 531);\nvar ExecutionEnvironment = __webpack_require__(/*! fbjs/lib/ExecutionEnvironment */ 27);\nvar ReactInstrumentation = __webpack_require__(/*! ./ReactInstrumentation */ 35);\n\nvar camelizeStyleName = __webpack_require__(/*! fbjs/lib/camelizeStyleName */ 1126);\nvar dangerousStyleValue = __webpack_require__(/*! ./dangerousStyleValue */ 1375);\nvar hyphenateStyleName = __webpack_require__(/*! fbjs/lib/hyphenateStyleName */ 1133);\nvar memoizeStringOnly = __webpack_require__(/*! fbjs/lib/memoizeStringOnly */ 1136);\nvar warning = __webpack_require__(/*! fbjs/lib/warning */ 13);\n\nvar processStyleName = memoizeStringOnly(function (styleName) {\n return hyphenateStyleName(styleName);\n});\n\nvar hasShorthandPropertyBug = false;\nvar styleFloatAccessor = 'cssFloat';\nif (ExecutionEnvironment.canUseDOM) {\n var tempStyle = document.createElement('div').style;\n try {\n // IE8 throws \"Invalid argument.\" if resetting shorthand style properties.\n tempStyle.font = '';\n } catch (e) {\n hasShorthandPropertyBug = true;\n }\n // IE8 only supports accessing cssFloat (standard) as styleFloat\n if (document.documentElement.style.cssFloat === undefined) {\n styleFloatAccessor = 'styleFloat';\n }\n}\n\nif (true) {\n // 'msTransform' is correct, but the other prefixes should be capitalized\n var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/;\n\n // style values shouldn't contain a semicolon\n var badStyleValueWithSemicolonPattern = /;\\s*$/;\n\n var warnedStyleNames = {};\n var warnedStyleValues = {};\n var warnedForNaNValue = false;\n\n var warnHyphenatedStyleName = function (name, owner) {\n if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {\n return;\n }\n\n warnedStyleNames[name] = true;\n true ? warning(false, 'Unsupported style property %s. Did you mean %s?%s', name, camelizeStyleName(name), checkRenderMessage(owner)) : void 0;\n };\n\n var warnBadVendoredStyleName = function (name, owner) {\n if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {\n return;\n }\n\n warnedStyleNames[name] = true;\n true ? warning(false, 'Unsupported vendor-prefixed style property %s. Did you mean %s?%s', name, name.charAt(0).toUpperCase() + name.slice(1), checkRenderMessage(owner)) : void 0;\n };\n\n var warnStyleValueWithSemicolon = function (name, value, owner) {\n if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) {\n return;\n }\n\n warnedStyleValues[value] = true;\n true ? warning(false, 'Style property values shouldn\\'t contain a semicolon.%s ' + 'Try \"%s: %s\" instead.', checkRenderMessage(owner), name, value.replace(badStyleValueWithSemicolonPattern, '')) : void 0;\n };\n\n var warnStyleValueIsNaN = function (name, value, owner) {\n if (warnedForNaNValue) {\n return;\n }\n\n warnedForNaNValue = true;\n true ? warning(false, '`NaN` is an invalid value for the `%s` css style property.%s', name, checkRenderMessage(owner)) : void 0;\n };\n\n var checkRenderMessage = function (owner) {\n if (owner) {\n var name = owner.getName();\n if (name) {\n return ' Check the render method of `' + name + '`.';\n }\n }\n return '';\n };\n\n /**\n * @param {string} name\n * @param {*} value\n * @param {ReactDOMComponent} component\n */\n var warnValidStyle = function (name, value, component) {\n var owner;\n if (component) {\n owner = component._currentElement._owner;\n }\n if (name.indexOf('-') > -1) {\n warnHyphenatedStyleName(name, owner);\n } else if (badVendoredStyleNamePattern.test(name)) {\n warnBadVendoredStyleName(name, owner);\n } else if (badStyleValueWithSemicolonPattern.test(value)) {\n warnStyleValueWithSemicolon(name, value, owner);\n }\n\n if (typeof value === 'number' && isNaN(value)) {\n warnStyleValueIsNaN(name, value, owner);\n }\n };\n}\n\n/**\n * Operations for dealing with CSS properties.\n */\nvar CSSPropertyOperations = {\n\n /**\n * Serializes a mapping of style properties for use as inline styles:\n *\n * > createMarkupForStyles({width: '200px', height: 0})\n * \"width:200px;height:0;\"\n *\n * Undefined values are ignored so that declarative programming is easier.\n * The result should be HTML-escaped before insertion into the DOM.\n *\n * @param {object} styles\n * @param {ReactDOMComponent} component\n * @return {?string}\n */\n createMarkupForStyles: function (styles, component) {\n var serialized = '';\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n var styleValue = styles[styleName];\n if (true) {\n warnValidStyle(styleName, styleValue, component);\n }\n if (styleValue != null) {\n serialized += processStyleName(styleName) + ':';\n serialized += dangerousStyleValue(styleName, styleValue, component) + ';';\n }\n }\n return serialized || null;\n },\n\n /**\n * Sets the value for multiple styles on a node. If a value is specified as\n * '' (empty string), the corresponding style property will be unset.\n *\n * @param {DOMElement} node\n * @param {object} styles\n * @param {ReactDOMComponent} component\n */\n setValueForStyles: function (node, styles, component) {\n if (true) {\n ReactInstrumentation.debugTool.onHostOperation({\n instanceID: component._debugID,\n type: 'update styles',\n payload: styles\n });\n }\n\n var style = node.style;\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n if (true) {\n warnValidStyle(styleName, styles[styleName], component);\n }\n var styleValue = dangerousStyleValue(styleName, styles[styleName], component);\n if (styleName === 'float' || styleName === 'cssFloat') {\n styleName = styleFloatAccessor;\n }\n if (styleValue) {\n style[styleName] = styleValue;\n } else {\n var expansion = hasShorthandPropertyBug && CSSProperty.shorthandPropertyExpansions[styleName];\n if (expansion) {\n // Shorthand property that IE8 won't like unsetting, so unset each\n // component to placate it\n for (var individualStyleName in expansion) {\n style[individualStyleName] = '';\n }\n } else {\n style[styleName] = '';\n }\n }\n }\n }\n\n};\n\nmodule.exports = CSSPropertyOperations;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/CSSPropertyOperations.js\n// module id = 1320\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/CSSPropertyOperations.js?", + ); + + /***/ + }, + /* 1321 */ + /* unknown exports provided */ + /* all exports used */ + /*!**********************************************!*\ + !*** ./~/react-dom/lib/ChangeEventPlugin.js ***! + \**********************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar EventPluginHub = __webpack_require__(/*! ./EventPluginHub */ 123);\nvar EventPropagators = __webpack_require__(/*! ./EventPropagators */ 124);\nvar ExecutionEnvironment = __webpack_require__(/*! fbjs/lib/ExecutionEnvironment */ 27);\nvar ReactDOMComponentTree = __webpack_require__(/*! ./ReactDOMComponentTree */ 24);\nvar ReactUpdates = __webpack_require__(/*! ./ReactUpdates */ 47);\nvar SyntheticEvent = __webpack_require__(/*! ./SyntheticEvent */ 59);\n\nvar getEventTarget = __webpack_require__(/*! ./getEventTarget */ 256);\nvar isEventSupported = __webpack_require__(/*! ./isEventSupported */ 258);\nvar isTextInputElement = __webpack_require__(/*! ./isTextInputElement */ 554);\n\nvar eventTypes = {\n change: {\n phasedRegistrationNames: {\n bubbled: 'onChange',\n captured: 'onChangeCapture'\n },\n dependencies: ['topBlur', 'topChange', 'topClick', 'topFocus', 'topInput', 'topKeyDown', 'topKeyUp', 'topSelectionChange']\n }\n};\n\n/**\n * For IE shims\n */\nvar activeElement = null;\nvar activeElementInst = null;\nvar activeElementValue = null;\nvar activeElementValueProp = null;\n\n/**\n * SECTION: handle `change` event\n */\nfunction shouldUseChangeEvent(elem) {\n var nodeName = elem.nodeName && elem.nodeName.toLowerCase();\n return nodeName === 'select' || nodeName === 'input' && elem.type === 'file';\n}\n\nvar doesChangeEventBubble = false;\nif (ExecutionEnvironment.canUseDOM) {\n // See `handleChange` comment below\n doesChangeEventBubble = isEventSupported('change') && (!document.documentMode || document.documentMode > 8);\n}\n\nfunction manualDispatchChangeEvent(nativeEvent) {\n var event = SyntheticEvent.getPooled(eventTypes.change, activeElementInst, nativeEvent, getEventTarget(nativeEvent));\n EventPropagators.accumulateTwoPhaseDispatches(event);\n\n // If change and propertychange bubbled, we'd just bind to it like all the\n // other events and have it go through ReactBrowserEventEmitter. Since it\n // doesn't, we manually listen for the events and so we have to enqueue and\n // process the abstract event manually.\n //\n // Batching is necessary here in order to ensure that all event handlers run\n // before the next rerender (including event handlers attached to ancestor\n // elements instead of directly on the input). Without this, controlled\n // components don't work properly in conjunction with event bubbling because\n // the component is rerendered and the value reverted before all the event\n // handlers can run. See https://github.com/facebook/react/issues/708.\n ReactUpdates.batchedUpdates(runEventInBatch, event);\n}\n\nfunction runEventInBatch(event) {\n EventPluginHub.enqueueEvents(event);\n EventPluginHub.processEventQueue(false);\n}\n\nfunction startWatchingForChangeEventIE8(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onchange', manualDispatchChangeEvent);\n}\n\nfunction stopWatchingForChangeEventIE8() {\n if (!activeElement) {\n return;\n }\n activeElement.detachEvent('onchange', manualDispatchChangeEvent);\n activeElement = null;\n activeElementInst = null;\n}\n\nfunction getTargetInstForChangeEvent(topLevelType, targetInst) {\n if (topLevelType === 'topChange') {\n return targetInst;\n }\n}\nfunction handleEventsForChangeEventIE8(topLevelType, target, targetInst) {\n if (topLevelType === 'topFocus') {\n // stopWatching() should be a noop here but we call it just in case we\n // missed a blur event somehow.\n stopWatchingForChangeEventIE8();\n startWatchingForChangeEventIE8(target, targetInst);\n } else if (topLevelType === 'topBlur') {\n stopWatchingForChangeEventIE8();\n }\n}\n\n/**\n * SECTION: handle `input` event\n */\nvar isInputEventSupported = false;\nif (ExecutionEnvironment.canUseDOM) {\n // IE9 claims to support the input event but fails to trigger it when\n // deleting text, so we ignore its input events.\n // IE10+ fire input events to often, such when a placeholder\n // changes or when an input with a placeholder is focused.\n isInputEventSupported = isEventSupported('input') && (!document.documentMode || document.documentMode > 11);\n}\n\n/**\n * (For IE <=11) Replacement getter/setter for the `value` property that gets\n * set on the active element.\n */\nvar newValueProp = {\n get: function () {\n return activeElementValueProp.get.call(this);\n },\n set: function (val) {\n // Cast to a string so we can do equality checks.\n activeElementValue = '' + val;\n activeElementValueProp.set.call(this, val);\n }\n};\n\n/**\n * (For IE <=11) Starts tracking propertychange events on the passed-in element\n * and override the value property so that we can distinguish user events from\n * value changes in JS.\n */\nfunction startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElementValue = target.value;\n activeElementValueProp = Object.getOwnPropertyDescriptor(target.constructor.prototype, 'value');\n\n // Not guarded in a canDefineProperty check: IE8 supports defineProperty only\n // on DOM elements\n Object.defineProperty(activeElement, 'value', newValueProp);\n if (activeElement.attachEvent) {\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n } else {\n activeElement.addEventListener('propertychange', handlePropertyChange, false);\n }\n}\n\n/**\n * (For IE <=11) Removes the event listeners from the currently-tracked element,\n * if any exists.\n */\nfunction stopWatchingForValueChange() {\n if (!activeElement) {\n return;\n }\n\n // delete restores the original property definition\n delete activeElement.value;\n\n if (activeElement.detachEvent) {\n activeElement.detachEvent('onpropertychange', handlePropertyChange);\n } else {\n activeElement.removeEventListener('propertychange', handlePropertyChange, false);\n }\n\n activeElement = null;\n activeElementInst = null;\n activeElementValue = null;\n activeElementValueProp = null;\n}\n\n/**\n * (For IE <=11) Handles a propertychange event, sending a `change` event if\n * the value of the active element has changed.\n */\nfunction handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n var value = nativeEvent.srcElement.value;\n if (value === activeElementValue) {\n return;\n }\n activeElementValue = value;\n\n manualDispatchChangeEvent(nativeEvent);\n}\n\n/**\n * If a `change` event should be fired, returns the target's ID.\n */\nfunction getTargetInstForInputEvent(topLevelType, targetInst) {\n if (topLevelType === 'topInput') {\n // In modern browsers (i.e., not IE8 or IE9), the input event is exactly\n // what we want so fall through here and trigger an abstract event\n return targetInst;\n }\n}\n\nfunction handleEventsForInputEventIE(topLevelType, target, targetInst) {\n if (topLevelType === 'topFocus') {\n // In IE8, we can capture almost all .value changes by adding a\n // propertychange handler and looking for events with propertyName\n // equal to 'value'\n // In IE9-11, propertychange fires for most input events but is buggy and\n // doesn't fire when text is deleted, but conveniently, selectionchange\n // appears to fire in all of the remaining cases so we catch those and\n // forward the event if the value has changed\n // In either case, we don't want to call the event handler if the value\n // is changed from JS so we redefine a setter for `.value` that updates\n // our activeElementValue variable, allowing us to ignore those changes\n //\n // stopWatching() should be a noop here but we call it just in case we\n // missed a blur event somehow.\n stopWatchingForValueChange();\n startWatchingForValueChange(target, targetInst);\n } else if (topLevelType === 'topBlur') {\n stopWatchingForValueChange();\n }\n}\n\n// For IE8 and IE9.\nfunction getTargetInstForInputEventIE(topLevelType, targetInst) {\n if (topLevelType === 'topSelectionChange' || topLevelType === 'topKeyUp' || topLevelType === 'topKeyDown') {\n // On the selectionchange event, the target is just document which isn't\n // helpful for us so just check activeElement instead.\n //\n // 99% of the time, keydown and keyup aren't necessary. IE8 fails to fire\n // propertychange on the first input event after setting `value` from a\n // script and fires only keydown, keypress, keyup. Catching keyup usually\n // gets it and catching keydown lets us fire an event for the first\n // keystroke if user does a key repeat (it'll be a little delayed: right\n // before the second keystroke). Other input methods (e.g., paste) seem to\n // fire selectionchange normally.\n if (activeElement && activeElement.value !== activeElementValue) {\n activeElementValue = activeElement.value;\n return activeElementInst;\n }\n }\n}\n\n/**\n * SECTION: handle `click` event\n */\nfunction shouldUseClickEvent(elem) {\n // Use the `click` event to detect changes to checkbox and radio inputs.\n // This approach works across all browsers, whereas `change` does not fire\n // until `blur` in IE8.\n return elem.nodeName && elem.nodeName.toLowerCase() === 'input' && (elem.type === 'checkbox' || elem.type === 'radio');\n}\n\nfunction getTargetInstForClickEvent(topLevelType, targetInst) {\n if (topLevelType === 'topClick') {\n return targetInst;\n }\n}\n\n/**\n * This plugin creates an `onChange` event that normalizes change events\n * across form elements. This event fires at a time when it's possible to\n * change the element's value without seeing a flicker.\n *\n * Supported elements are:\n * - input (see `isTextInputElement`)\n * - textarea\n * - select\n */\nvar ChangeEventPlugin = {\n\n eventTypes: eventTypes,\n\n extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {\n var targetNode = targetInst ? ReactDOMComponentTree.getNodeFromInstance(targetInst) : window;\n\n var getTargetInstFunc, handleEventFunc;\n if (shouldUseChangeEvent(targetNode)) {\n if (doesChangeEventBubble) {\n getTargetInstFunc = getTargetInstForChangeEvent;\n } else {\n handleEventFunc = handleEventsForChangeEventIE8;\n }\n } else if (isTextInputElement(targetNode)) {\n if (isInputEventSupported) {\n getTargetInstFunc = getTargetInstForInputEvent;\n } else {\n getTargetInstFunc = getTargetInstForInputEventIE;\n handleEventFunc = handleEventsForInputEventIE;\n }\n } else if (shouldUseClickEvent(targetNode)) {\n getTargetInstFunc = getTargetInstForClickEvent;\n }\n\n if (getTargetInstFunc) {\n var inst = getTargetInstFunc(topLevelType, targetInst);\n if (inst) {\n var event = SyntheticEvent.getPooled(eventTypes.change, inst, nativeEvent, nativeEventTarget);\n event.type = 'change';\n EventPropagators.accumulateTwoPhaseDispatches(event);\n return event;\n }\n }\n\n if (handleEventFunc) {\n handleEventFunc(topLevelType, targetNode, targetInst);\n }\n }\n\n};\n\nmodule.exports = ChangeEventPlugin;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/ChangeEventPlugin.js\n// module id = 1321\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/ChangeEventPlugin.js?", + ); + + /***/ + }, + /* 1322 */ + /* unknown exports provided */ + /* all exports used */ + /*!***********************************!*\ + !*** ./~/react-dom/lib/Danger.js ***! + \***********************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar _prodInvariant = __webpack_require__(/*! ./reactProdInvariant */ 17);\n\nvar DOMLazyTree = __webpack_require__(/*! ./DOMLazyTree */ 100);\nvar ExecutionEnvironment = __webpack_require__(/*! fbjs/lib/ExecutionEnvironment */ 27);\n\nvar createNodesFromMarkup = __webpack_require__(/*! fbjs/lib/createNodesFromMarkup */ 1129);\nvar emptyFunction = __webpack_require__(/*! fbjs/lib/emptyFunction */ 40);\nvar invariant = __webpack_require__(/*! fbjs/lib/invariant */ 12);\n\nvar Danger = {\n\n /**\n * Replaces a node with a string of markup at its current position within its\n * parent. The markup must render into a single root node.\n *\n * @param {DOMElement} oldChild Child node to replace.\n * @param {string} markup Markup to render in place of the child node.\n * @internal\n */\n dangerouslyReplaceNodeWithMarkup: function (oldChild, markup) {\n !ExecutionEnvironment.canUseDOM ? true ? invariant(false, 'dangerouslyReplaceNodeWithMarkup(...): Cannot render markup in a worker thread. Make sure `window` and `document` are available globally before requiring React when unit testing or use ReactDOMServer.renderToString() for server rendering.') : _prodInvariant('56') : void 0;\n !markup ? true ? invariant(false, 'dangerouslyReplaceNodeWithMarkup(...): Missing markup.') : _prodInvariant('57') : void 0;\n !(oldChild.nodeName !== 'HTML') ? true ? invariant(false, 'dangerouslyReplaceNodeWithMarkup(...): Cannot replace markup of the <html> node. This is because browser quirks make this unreliable and/or slow. If you want to render to the root you must use server rendering. See ReactDOMServer.renderToString().') : _prodInvariant('58') : void 0;\n\n if (typeof markup === 'string') {\n var newChild = createNodesFromMarkup(markup, emptyFunction)[0];\n oldChild.parentNode.replaceChild(newChild, oldChild);\n } else {\n DOMLazyTree.replaceChildWithTree(oldChild, markup);\n }\n }\n\n};\n\nmodule.exports = Danger;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/Danger.js\n// module id = 1322\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/Danger.js?", + ); + + /***/ + }, + /* 1323 */ + /* unknown exports provided */ + /* all exports used */ + /*!****************************************************!*\ + !*** ./~/react-dom/lib/DefaultEventPluginOrder.js ***! + \****************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\n/**\n * Module that is injectable into `EventPluginHub`, that specifies a\n * deterministic ordering of `EventPlugin`s. A convenient way to reason about\n * plugins, without having to package every one of them. This is better than\n * having plugins be ordered in the same order that they are injected because\n * that ordering would be influenced by the packaging order.\n * `ResponderEventPlugin` must occur before `SimpleEventPlugin` so that\n * preventing default on events is convenient in `SimpleEventPlugin` handlers.\n */\n\nvar DefaultEventPluginOrder = ['ResponderEventPlugin', 'SimpleEventPlugin', 'TapEventPlugin', 'EnterLeaveEventPlugin', 'ChangeEventPlugin', 'SelectEventPlugin', 'BeforeInputEventPlugin'];\n\nmodule.exports = DefaultEventPluginOrder;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/DefaultEventPluginOrder.js\n// module id = 1323\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/DefaultEventPluginOrder.js?", + ); + + /***/ + }, + /* 1324 */ + /* unknown exports provided */ + /* all exports used */ + /*!**************************************************!*\ + !*** ./~/react-dom/lib/EnterLeaveEventPlugin.js ***! + \**************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar EventPropagators = __webpack_require__(/*! ./EventPropagators */ 124);\nvar ReactDOMComponentTree = __webpack_require__(/*! ./ReactDOMComponentTree */ 24);\nvar SyntheticMouseEvent = __webpack_require__(/*! ./SyntheticMouseEvent */ 170);\n\nvar eventTypes = {\n mouseEnter: {\n registrationName: 'onMouseEnter',\n dependencies: ['topMouseOut', 'topMouseOver']\n },\n mouseLeave: {\n registrationName: 'onMouseLeave',\n dependencies: ['topMouseOut', 'topMouseOver']\n }\n};\n\nvar EnterLeaveEventPlugin = {\n\n eventTypes: eventTypes,\n\n /**\n * For almost every interaction we care about, there will be both a top-level\n * `mouseover` and `mouseout` event that occurs. Only use `mouseout` so that\n * we do not extract duplicate events. However, moving the mouse into the\n * browser from outside will not fire a `mouseout` event. In this case, we use\n * the `mouseover` top-level event.\n */\n extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {\n if (topLevelType === 'topMouseOver' && (nativeEvent.relatedTarget || nativeEvent.fromElement)) {\n return null;\n }\n if (topLevelType !== 'topMouseOut' && topLevelType !== 'topMouseOver') {\n // Must not be a mouse in or mouse out - ignoring.\n return null;\n }\n\n var win;\n if (nativeEventTarget.window === nativeEventTarget) {\n // `nativeEventTarget` is probably a window object.\n win = nativeEventTarget;\n } else {\n // TODO: Figure out why `ownerDocument` is sometimes undefined in IE8.\n var doc = nativeEventTarget.ownerDocument;\n if (doc) {\n win = doc.defaultView || doc.parentWindow;\n } else {\n win = window;\n }\n }\n\n var from;\n var to;\n if (topLevelType === 'topMouseOut') {\n from = targetInst;\n var related = nativeEvent.relatedTarget || nativeEvent.toElement;\n to = related ? ReactDOMComponentTree.getClosestInstanceFromNode(related) : null;\n } else {\n // Moving to a node from outside the window.\n from = null;\n to = targetInst;\n }\n\n if (from === to) {\n // Nothing pertains to our managed components.\n return null;\n }\n\n var fromNode = from == null ? win : ReactDOMComponentTree.getNodeFromInstance(from);\n var toNode = to == null ? win : ReactDOMComponentTree.getNodeFromInstance(to);\n\n var leave = SyntheticMouseEvent.getPooled(eventTypes.mouseLeave, from, nativeEvent, nativeEventTarget);\n leave.type = 'mouseleave';\n leave.target = fromNode;\n leave.relatedTarget = toNode;\n\n var enter = SyntheticMouseEvent.getPooled(eventTypes.mouseEnter, to, nativeEvent, nativeEventTarget);\n enter.type = 'mouseenter';\n enter.target = toNode;\n enter.relatedTarget = fromNode;\n\n EventPropagators.accumulateEnterLeaveDispatches(leave, enter, from, to);\n\n return [leave, enter];\n }\n\n};\n\nmodule.exports = EnterLeaveEventPlugin;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/EnterLeaveEventPlugin.js\n// module id = 1324\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/EnterLeaveEventPlugin.js?", + ); + + /***/ + }, + /* 1325 */ + /* unknown exports provided */ + /* all exports used */ + /*!*****************************************************!*\ + !*** ./~/react-dom/lib/FallbackCompositionState.js ***! + \*****************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar _assign = __webpack_require__(/*! object-assign */ 21);\n\nvar PooledClass = __webpack_require__(/*! ./PooledClass */ 78);\n\nvar getTextContentAccessor = __webpack_require__(/*! ./getTextContentAccessor */ 553);\n\n/**\n * This helper class stores information about text content of a target node,\n * allowing comparison of content before and after a given event.\n *\n * Identify the node where selection currently begins, then observe\n * both its text content and its current position in the DOM. Since the\n * browser may natively replace the target node during composition, we can\n * use its position to find its replacement.\n *\n * @param {DOMEventTarget} root\n */\nfunction FallbackCompositionState(root) {\n this._root = root;\n this._startText = this.getText();\n this._fallbackText = null;\n}\n\n_assign(FallbackCompositionState.prototype, {\n destructor: function () {\n this._root = null;\n this._startText = null;\n this._fallbackText = null;\n },\n\n /**\n * Get current text of input.\n *\n * @return {string}\n */\n getText: function () {\n if ('value' in this._root) {\n return this._root.value;\n }\n return this._root[getTextContentAccessor()];\n },\n\n /**\n * Determine the differing substring between the initially stored\n * text content and the current content.\n *\n * @return {string}\n */\n getData: function () {\n if (this._fallbackText) {\n return this._fallbackText;\n }\n\n var start;\n var startValue = this._startText;\n var startLength = startValue.length;\n var end;\n var endValue = this.getText();\n var endLength = endValue.length;\n\n for (start = 0; start < startLength; start++) {\n if (startValue[start] !== endValue[start]) {\n break;\n }\n }\n\n var minEnd = startLength - start;\n for (end = 1; end <= minEnd; end++) {\n if (startValue[startLength - end] !== endValue[endLength - end]) {\n break;\n }\n }\n\n var sliceTail = end > 1 ? 1 - end : undefined;\n this._fallbackText = endValue.slice(start, sliceTail);\n return this._fallbackText;\n }\n});\n\nPooledClass.addPoolingTo(FallbackCompositionState);\n\nmodule.exports = FallbackCompositionState;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/FallbackCompositionState.js\n// module id = 1325\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/FallbackCompositionState.js?", + ); + + /***/ + }, + /* 1326 */ + /* unknown exports provided */ + /* all exports used */ + /*!**************************************************!*\ + !*** ./~/react-dom/lib/HTMLDOMPropertyConfig.js ***! + \**************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar DOMProperty = __webpack_require__(/*! ./DOMProperty */ 67);\n\nvar MUST_USE_PROPERTY = DOMProperty.injection.MUST_USE_PROPERTY;\nvar HAS_BOOLEAN_VALUE = DOMProperty.injection.HAS_BOOLEAN_VALUE;\nvar HAS_NUMERIC_VALUE = DOMProperty.injection.HAS_NUMERIC_VALUE;\nvar HAS_POSITIVE_NUMERIC_VALUE = DOMProperty.injection.HAS_POSITIVE_NUMERIC_VALUE;\nvar HAS_OVERLOADED_BOOLEAN_VALUE = DOMProperty.injection.HAS_OVERLOADED_BOOLEAN_VALUE;\n\nvar HTMLDOMPropertyConfig = {\n isCustomAttribute: RegExp.prototype.test.bind(new RegExp('^(data|aria)-[' + DOMProperty.ATTRIBUTE_NAME_CHAR + ']*$')),\n Properties: {\n /**\n * Standard Properties\n */\n accept: 0,\n acceptCharset: 0,\n accessKey: 0,\n action: 0,\n allowFullScreen: HAS_BOOLEAN_VALUE,\n allowTransparency: 0,\n alt: 0,\n // specifies target context for links with `preload` type\n as: 0,\n async: HAS_BOOLEAN_VALUE,\n autoComplete: 0,\n // autoFocus is polyfilled/normalized by AutoFocusUtils\n // autoFocus: HAS_BOOLEAN_VALUE,\n autoPlay: HAS_BOOLEAN_VALUE,\n capture: HAS_BOOLEAN_VALUE,\n cellPadding: 0,\n cellSpacing: 0,\n charSet: 0,\n challenge: 0,\n checked: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,\n cite: 0,\n classID: 0,\n className: 0,\n cols: HAS_POSITIVE_NUMERIC_VALUE,\n colSpan: 0,\n content: 0,\n contentEditable: 0,\n contextMenu: 0,\n controls: HAS_BOOLEAN_VALUE,\n coords: 0,\n crossOrigin: 0,\n data: 0, // For `<object />` acts as `src`.\n dateTime: 0,\n 'default': HAS_BOOLEAN_VALUE,\n defer: HAS_BOOLEAN_VALUE,\n dir: 0,\n disabled: HAS_BOOLEAN_VALUE,\n download: HAS_OVERLOADED_BOOLEAN_VALUE,\n draggable: 0,\n encType: 0,\n form: 0,\n formAction: 0,\n formEncType: 0,\n formMethod: 0,\n formNoValidate: HAS_BOOLEAN_VALUE,\n formTarget: 0,\n frameBorder: 0,\n headers: 0,\n height: 0,\n hidden: HAS_BOOLEAN_VALUE,\n high: 0,\n href: 0,\n hrefLang: 0,\n htmlFor: 0,\n httpEquiv: 0,\n icon: 0,\n id: 0,\n inputMode: 0,\n integrity: 0,\n is: 0,\n keyParams: 0,\n keyType: 0,\n kind: 0,\n label: 0,\n lang: 0,\n list: 0,\n loop: HAS_BOOLEAN_VALUE,\n low: 0,\n manifest: 0,\n marginHeight: 0,\n marginWidth: 0,\n max: 0,\n maxLength: 0,\n media: 0,\n mediaGroup: 0,\n method: 0,\n min: 0,\n minLength: 0,\n // Caution; `option.selected` is not updated if `select.multiple` is\n // disabled with `removeAttribute`.\n multiple: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,\n muted: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,\n name: 0,\n nonce: 0,\n noValidate: HAS_BOOLEAN_VALUE,\n open: HAS_BOOLEAN_VALUE,\n optimum: 0,\n pattern: 0,\n placeholder: 0,\n playsInline: HAS_BOOLEAN_VALUE,\n poster: 0,\n preload: 0,\n profile: 0,\n radioGroup: 0,\n readOnly: HAS_BOOLEAN_VALUE,\n referrerPolicy: 0,\n rel: 0,\n required: HAS_BOOLEAN_VALUE,\n reversed: HAS_BOOLEAN_VALUE,\n role: 0,\n rows: HAS_POSITIVE_NUMERIC_VALUE,\n rowSpan: HAS_NUMERIC_VALUE,\n sandbox: 0,\n scope: 0,\n scoped: HAS_BOOLEAN_VALUE,\n scrolling: 0,\n seamless: HAS_BOOLEAN_VALUE,\n selected: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,\n shape: 0,\n size: HAS_POSITIVE_NUMERIC_VALUE,\n sizes: 0,\n span: HAS_POSITIVE_NUMERIC_VALUE,\n spellCheck: 0,\n src: 0,\n srcDoc: 0,\n srcLang: 0,\n srcSet: 0,\n start: HAS_NUMERIC_VALUE,\n step: 0,\n style: 0,\n summary: 0,\n tabIndex: 0,\n target: 0,\n title: 0,\n // Setting .type throws on non-<input> tags\n type: 0,\n useMap: 0,\n value: 0,\n width: 0,\n wmode: 0,\n wrap: 0,\n\n /**\n * RDFa Properties\n */\n about: 0,\n datatype: 0,\n inlist: 0,\n prefix: 0,\n // property is also supported for OpenGraph in meta tags.\n property: 0,\n resource: 0,\n 'typeof': 0,\n vocab: 0,\n\n /**\n * Non-standard Properties\n */\n // autoCapitalize and autoCorrect are supported in Mobile Safari for\n // keyboard hints.\n autoCapitalize: 0,\n autoCorrect: 0,\n // autoSave allows WebKit/Blink to persist values of input fields on page reloads\n autoSave: 0,\n // color is for Safari mask-icon link\n color: 0,\n // itemProp, itemScope, itemType are for\n // Microdata support. See http://schema.org/docs/gs.html\n itemProp: 0,\n itemScope: HAS_BOOLEAN_VALUE,\n itemType: 0,\n // itemID and itemRef are for Microdata support as well but\n // only specified in the WHATWG spec document. See\n // https://html.spec.whatwg.org/multipage/microdata.html#microdata-dom-api\n itemID: 0,\n itemRef: 0,\n // results show looking glass icon and recent searches on input\n // search fields in WebKit/Blink\n results: 0,\n // IE-only attribute that specifies security restrictions on an iframe\n // as an alternative to the sandbox attribute on IE<10\n security: 0,\n // IE-only attribute that controls focus behavior\n unselectable: 0\n },\n DOMAttributeNames: {\n acceptCharset: 'accept-charset',\n className: 'class',\n htmlFor: 'for',\n httpEquiv: 'http-equiv'\n },\n DOMPropertyNames: {}\n};\n\nmodule.exports = HTMLDOMPropertyConfig;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/HTMLDOMPropertyConfig.js\n// module id = 1326\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/HTMLDOMPropertyConfig.js?", + ); + + /***/ + }, + /* 1327 */ + /* unknown exports provided */ + /* all exports used */ + /*!*************************************************!*\ + !*** ./~/react-dom/lib/ReactChildReconciler.js ***! + \*************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '/* WEBPACK VAR INJECTION */(function(process) {/**\n * Copyright 2014-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar ReactReconciler = __webpack_require__(/*! ./ReactReconciler */ 79);\n\nvar instantiateReactComponent = __webpack_require__(/*! ./instantiateReactComponent */ 257);\nvar KeyEscapeUtils = __webpack_require__(/*! ./KeyEscapeUtils */ 248);\nvar shouldUpdateReactComponent = __webpack_require__(/*! ./shouldUpdateReactComponent */ 259);\nvar traverseAllChildren = __webpack_require__(/*! ./traverseAllChildren */ 556);\nvar warning = __webpack_require__(/*! fbjs/lib/warning */ 13);\n\nvar ReactComponentTreeHook;\n\nif (typeof process !== \'undefined\' && __webpack_require__.i({"NODE_ENV":"dev","RAILS_ENV":undefined,"SERVER_RENDERING":true,"HONEYBADGER_API_KEY":undefined}) && "dev" === \'test\') {\n // Temporary hack.\n // Inline requires don\'t work well with Jest:\n // https://github.com/facebook/react/issues/7240\n // Remove the inline requires when we don\'t need them anymore:\n // https://github.com/facebook/react/pull/7178\n ReactComponentTreeHook = __webpack_require__(/*! react/lib/ReactComponentTreeHook */ 37);\n}\n\nfunction instantiateChild(childInstances, child, name, selfDebugID) {\n // We found a component instance.\n var keyUnique = childInstances[name] === undefined;\n if (true) {\n if (!ReactComponentTreeHook) {\n ReactComponentTreeHook = __webpack_require__(/*! react/lib/ReactComponentTreeHook */ 37);\n }\n if (!keyUnique) {\n true ? warning(false, \'flattenChildren(...): Encountered two children with the same key, \' + \'`%s`. Child keys must be unique; when two children share a key, only \' + \'the first child will be used.%s\', KeyEscapeUtils.unescape(name), ReactComponentTreeHook.getStackAddendumByID(selfDebugID)) : void 0;\n }\n }\n if (child != null && keyUnique) {\n childInstances[name] = instantiateReactComponent(child, true);\n }\n}\n\n/**\n * ReactChildReconciler provides helpers for initializing or updating a set of\n * children. Its output is suitable for passing it onto ReactMultiChild which\n * does diffed reordering and insertion.\n */\nvar ReactChildReconciler = {\n /**\n * Generates a "mount image" for each of the supplied children. In the case\n * of `ReactDOMComponent`, a mount image is a string of markup.\n *\n * @param {?object} nestedChildNodes Nested child maps.\n * @return {?object} A set of child instances.\n * @internal\n */\n instantiateChildren: function (nestedChildNodes, transaction, context, selfDebugID // 0 in production and for roots\n ) {\n if (nestedChildNodes == null) {\n return null;\n }\n var childInstances = {};\n\n if (true) {\n traverseAllChildren(nestedChildNodes, function (childInsts, child, name) {\n return instantiateChild(childInsts, child, name, selfDebugID);\n }, childInstances);\n } else {\n traverseAllChildren(nestedChildNodes, instantiateChild, childInstances);\n }\n return childInstances;\n },\n\n /**\n * Updates the rendered children and returns a new set of children.\n *\n * @param {?object} prevChildren Previously initialized set of children.\n * @param {?object} nextChildren Flat child element maps.\n * @param {ReactReconcileTransaction} transaction\n * @param {object} context\n * @return {?object} A new set of child instances.\n * @internal\n */\n updateChildren: function (prevChildren, nextChildren, mountImages, removedNodes, transaction, hostParent, hostContainerInfo, context, selfDebugID // 0 in production and for roots\n ) {\n // We currently don\'t have a way to track moves here but if we use iterators\n // instead of for..in we can zip the iterators and check if an item has\n // moved.\n // TODO: If nothing has changed, return the prevChildren object so that we\n // can quickly bailout if nothing has changed.\n if (!nextChildren && !prevChildren) {\n return;\n }\n var name;\n var prevChild;\n for (name in nextChildren) {\n if (!nextChildren.hasOwnProperty(name)) {\n continue;\n }\n prevChild = prevChildren && prevChildren[name];\n var prevElement = prevChild && prevChild._currentElement;\n var nextElement = nextChildren[name];\n if (prevChild != null && shouldUpdateReactComponent(prevElement, nextElement)) {\n ReactReconciler.receiveComponent(prevChild, nextElement, transaction, context);\n nextChildren[name] = prevChild;\n } else {\n if (prevChild) {\n removedNodes[name] = ReactReconciler.getHostNode(prevChild);\n ReactReconciler.unmountComponent(prevChild, false);\n }\n // The child must be instantiated before it\'s mounted.\n var nextChildInstance = instantiateReactComponent(nextElement, true);\n nextChildren[name] = nextChildInstance;\n // Creating mount image now ensures refs are resolved in right order\n // (see https://github.com/facebook/react/pull/7101 for explanation).\n var nextChildMountImage = ReactReconciler.mountComponent(nextChildInstance, transaction, hostParent, hostContainerInfo, context, selfDebugID);\n mountImages.push(nextChildMountImage);\n }\n }\n // Unmount children that are no longer present.\n for (name in prevChildren) {\n if (prevChildren.hasOwnProperty(name) && !(nextChildren && nextChildren.hasOwnProperty(name))) {\n prevChild = prevChildren[name];\n removedNodes[name] = ReactReconciler.getHostNode(prevChild);\n ReactReconciler.unmountComponent(prevChild, false);\n }\n }\n },\n\n /**\n * Unmounts all rendered children. This should be used to clean up children\n * when this component is unmounted.\n *\n * @param {?object} renderedChildren Previously initialized set of children.\n * @internal\n */\n unmountChildren: function (renderedChildren, safely) {\n for (var name in renderedChildren) {\n if (renderedChildren.hasOwnProperty(name)) {\n var renderedChild = renderedChildren[name];\n ReactReconciler.unmountComponent(renderedChild, safely);\n }\n }\n }\n\n};\n\nmodule.exports = ReactChildReconciler;\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(/*! ./../../process/browser.js */ 164)))\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/ReactChildReconciler.js\n// module id = 1327\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/ReactChildReconciler.js?', + ); + + /***/ + }, + /* 1328 */ + /* unknown exports provided */ + /* all exports used */ + /*!*************************************************************!*\ + !*** ./~/react-dom/lib/ReactComponentBrowserEnvironment.js ***! + \*************************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar DOMChildrenOperations = __webpack_require__(/*! ./DOMChildrenOperations */ 245);\nvar ReactDOMIDOperations = __webpack_require__(/*! ./ReactDOMIDOperations */ 1334);\n\n/**\n * Abstracts away all functionality of the reconciler that requires knowledge of\n * the browser context. TODO: These callers should be refactored to avoid the\n * need for this injection.\n */\nvar ReactComponentBrowserEnvironment = {\n\n processChildrenUpdates: ReactDOMIDOperations.dangerouslyProcessChildrenUpdates,\n\n replaceNodeWithMarkup: DOMChildrenOperations.dangerouslyReplaceNodeWithMarkup\n\n};\n\nmodule.exports = ReactComponentBrowserEnvironment;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/ReactComponentBrowserEnvironment.js\n// module id = 1328\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/ReactComponentBrowserEnvironment.js?', + ); + + /***/ + }, + /* 1329 */ + /* unknown exports provided */ + /* all exports used */ + /*!****************************************************!*\ + !*** ./~/react-dom/lib/ReactCompositeComponent.js ***! + \****************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar _prodInvariant = __webpack_require__(/*! ./reactProdInvariant */ 17),\n _assign = __webpack_require__(/*! object-assign */ 21);\n\nvar React = __webpack_require__(/*! react/lib/React */ 83);\nvar ReactComponentEnvironment = __webpack_require__(/*! ./ReactComponentEnvironment */ 250);\nvar ReactCurrentOwner = __webpack_require__(/*! react/lib/ReactCurrentOwner */ 55);\nvar ReactErrorUtils = __webpack_require__(/*! ./ReactErrorUtils */ 251);\nvar ReactInstanceMap = __webpack_require__(/*! ./ReactInstanceMap */ 125);\nvar ReactInstrumentation = __webpack_require__(/*! ./ReactInstrumentation */ 35);\nvar ReactNodeTypes = __webpack_require__(/*! ./ReactNodeTypes */ 545);\nvar ReactReconciler = __webpack_require__(/*! ./ReactReconciler */ 79);\n\nif (true) {\n var checkReactTypeSpec = __webpack_require__(/*! ./checkReactTypeSpec */ 1374);\n}\n\nvar emptyObject = __webpack_require__(/*! fbjs/lib/emptyObject */ 96);\nvar invariant = __webpack_require__(/*! fbjs/lib/invariant */ 12);\nvar shallowEqual = __webpack_require__(/*! fbjs/lib/shallowEqual */ 97);\nvar shouldUpdateReactComponent = __webpack_require__(/*! ./shouldUpdateReactComponent */ 259);\nvar warning = __webpack_require__(/*! fbjs/lib/warning */ 13);\n\nvar CompositeTypes = {\n ImpureClass: 0,\n PureClass: 1,\n StatelessFunctional: 2\n};\n\nfunction StatelessComponent(Component) {}\nStatelessComponent.prototype.render = function () {\n var Component = ReactInstanceMap.get(this)._currentElement.type;\n var element = Component(this.props, this.context, this.updater);\n warnIfInvalidElement(Component, element);\n return element;\n};\n\nfunction warnIfInvalidElement(Component, element) {\n if (true) {\n true ? warning(element === null || element === false || React.isValidElement(element), '%s(...): A valid React element (or null) must be returned. You may have ' + 'returned undefined, an array or some other invalid object.', Component.displayName || Component.name || 'Component') : void 0;\n true ? warning(!Component.childContextTypes, '%s(...): childContextTypes cannot be defined on a functional component.', Component.displayName || Component.name || 'Component') : void 0;\n }\n}\n\nfunction shouldConstruct(Component) {\n return !!(Component.prototype && Component.prototype.isReactComponent);\n}\n\nfunction isPureComponent(Component) {\n return !!(Component.prototype && Component.prototype.isPureReactComponent);\n}\n\n// Separated into a function to contain deoptimizations caused by try/finally.\nfunction measureLifeCyclePerf(fn, debugID, timerType) {\n if (debugID === 0) {\n // Top-level wrappers (see ReactMount) and empty components (see\n // ReactDOMEmptyComponent) are invisible to hooks and devtools.\n // Both are implementation details that should go away in the future.\n return fn();\n }\n\n ReactInstrumentation.debugTool.onBeginLifeCycleTimer(debugID, timerType);\n try {\n return fn();\n } finally {\n ReactInstrumentation.debugTool.onEndLifeCycleTimer(debugID, timerType);\n }\n}\n\n/**\n * ------------------ The Life-Cycle of a Composite Component ------------------\n *\n * - constructor: Initialization of state. The instance is now retained.\n * - componentWillMount\n * - render\n * - [children's constructors]\n * - [children's componentWillMount and render]\n * - [children's componentDidMount]\n * - componentDidMount\n *\n * Update Phases:\n * - componentWillReceiveProps (only called if parent updated)\n * - shouldComponentUpdate\n * - componentWillUpdate\n * - render\n * - [children's constructors or receive props phases]\n * - componentDidUpdate\n *\n * - componentWillUnmount\n * - [children's componentWillUnmount]\n * - [children destroyed]\n * - (destroyed): The instance is now blank, released by React and ready for GC.\n *\n * -----------------------------------------------------------------------------\n */\n\n/**\n * An incrementing ID assigned to each component when it is mounted. This is\n * used to enforce the order in which `ReactUpdates` updates dirty components.\n *\n * @private\n */\nvar nextMountID = 1;\n\n/**\n * @lends {ReactCompositeComponent.prototype}\n */\nvar ReactCompositeComponent = {\n\n /**\n * Base constructor for all composite component.\n *\n * @param {ReactElement} element\n * @final\n * @internal\n */\n construct: function (element) {\n this._currentElement = element;\n this._rootNodeID = 0;\n this._compositeType = null;\n this._instance = null;\n this._hostParent = null;\n this._hostContainerInfo = null;\n\n // See ReactUpdateQueue\n this._updateBatchNumber = null;\n this._pendingElement = null;\n this._pendingStateQueue = null;\n this._pendingReplaceState = false;\n this._pendingForceUpdate = false;\n\n this._renderedNodeType = null;\n this._renderedComponent = null;\n this._context = null;\n this._mountOrder = 0;\n this._topLevelWrapper = null;\n\n // See ReactUpdates and ReactUpdateQueue.\n this._pendingCallbacks = null;\n\n // ComponentWillUnmount shall only be called once\n this._calledComponentWillUnmount = false;\n\n if (true) {\n this._warnedAboutRefsInRender = false;\n }\n },\n\n /**\n * Initializes the component, renders markup, and registers event listeners.\n *\n * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction\n * @param {?object} hostParent\n * @param {?object} hostContainerInfo\n * @param {?object} context\n * @return {?string} Rendered markup to be inserted into the DOM.\n * @final\n * @internal\n */\n mountComponent: function (transaction, hostParent, hostContainerInfo, context) {\n var _this = this;\n\n this._context = context;\n this._mountOrder = nextMountID++;\n this._hostParent = hostParent;\n this._hostContainerInfo = hostContainerInfo;\n\n var publicProps = this._currentElement.props;\n var publicContext = this._processContext(context);\n\n var Component = this._currentElement.type;\n\n var updateQueue = transaction.getUpdateQueue();\n\n // Initialize the public class\n var doConstruct = shouldConstruct(Component);\n var inst = this._constructComponent(doConstruct, publicProps, publicContext, updateQueue);\n var renderedElement;\n\n // Support functional components\n if (!doConstruct && (inst == null || inst.render == null)) {\n renderedElement = inst;\n warnIfInvalidElement(Component, renderedElement);\n !(inst === null || inst === false || React.isValidElement(inst)) ? true ? invariant(false, '%s(...): A valid React element (or null) must be returned. You may have returned undefined, an array or some other invalid object.', Component.displayName || Component.name || 'Component') : _prodInvariant('105', Component.displayName || Component.name || 'Component') : void 0;\n inst = new StatelessComponent(Component);\n this._compositeType = CompositeTypes.StatelessFunctional;\n } else {\n if (isPureComponent(Component)) {\n this._compositeType = CompositeTypes.PureClass;\n } else {\n this._compositeType = CompositeTypes.ImpureClass;\n }\n }\n\n if (true) {\n // This will throw later in _renderValidatedComponent, but add an early\n // warning now to help debugging\n if (inst.render == null) {\n true ? warning(false, '%s(...): No `render` method found on the returned component ' + 'instance: you may have forgotten to define `render`.', Component.displayName || Component.name || 'Component') : void 0;\n }\n\n var propsMutated = inst.props !== publicProps;\n var componentName = Component.displayName || Component.name || 'Component';\n\n true ? warning(inst.props === undefined || !propsMutated, '%s(...): When calling super() in `%s`, make sure to pass ' + 'up the same props that your component\\'s constructor was passed.', componentName, componentName) : void 0;\n }\n\n // These should be set up in the constructor, but as a convenience for\n // simpler class abstractions, we set them up after the fact.\n inst.props = publicProps;\n inst.context = publicContext;\n inst.refs = emptyObject;\n inst.updater = updateQueue;\n\n this._instance = inst;\n\n // Store a reference from the instance back to the internal representation\n ReactInstanceMap.set(inst, this);\n\n if (true) {\n // Since plain JS classes are defined without any special initialization\n // logic, we can not catch common errors early. Therefore, we have to\n // catch them here, at initialization time, instead.\n true ? warning(!inst.getInitialState || inst.getInitialState.isReactClassApproved || inst.state, 'getInitialState was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Did you mean to define a state property instead?', this.getName() || 'a component') : void 0;\n true ? warning(!inst.getDefaultProps || inst.getDefaultProps.isReactClassApproved, 'getDefaultProps was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Use a static property to define defaultProps instead.', this.getName() || 'a component') : void 0;\n true ? warning(!inst.propTypes, 'propTypes was defined as an instance property on %s. Use a static ' + 'property to define propTypes instead.', this.getName() || 'a component') : void 0;\n true ? warning(!inst.contextTypes, 'contextTypes was defined as an instance property on %s. Use a ' + 'static property to define contextTypes instead.', this.getName() || 'a component') : void 0;\n true ? warning(typeof inst.componentShouldUpdate !== 'function', '%s has a method called ' + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + 'The name is phrased as a question because the function is ' + 'expected to return a value.', this.getName() || 'A component') : void 0;\n true ? warning(typeof inst.componentDidUnmount !== 'function', '%s has a method called ' + 'componentDidUnmount(). But there is no such lifecycle method. ' + 'Did you mean componentWillUnmount()?', this.getName() || 'A component') : void 0;\n true ? warning(typeof inst.componentWillRecieveProps !== 'function', '%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', this.getName() || 'A component') : void 0;\n }\n\n var initialState = inst.state;\n if (initialState === undefined) {\n inst.state = initialState = null;\n }\n !(typeof initialState === 'object' && !Array.isArray(initialState)) ? true ? invariant(false, '%s.state: must be set to an object or null', this.getName() || 'ReactCompositeComponent') : _prodInvariant('106', this.getName() || 'ReactCompositeComponent') : void 0;\n\n this._pendingStateQueue = null;\n this._pendingReplaceState = false;\n this._pendingForceUpdate = false;\n\n var markup;\n if (inst.unstable_handleError) {\n markup = this.performInitialMountWithErrorHandling(renderedElement, hostParent, hostContainerInfo, transaction, context);\n } else {\n markup = this.performInitialMount(renderedElement, hostParent, hostContainerInfo, transaction, context);\n }\n\n if (inst.componentDidMount) {\n if (true) {\n transaction.getReactMountReady().enqueue(function () {\n measureLifeCyclePerf(function () {\n return inst.componentDidMount();\n }, _this._debugID, 'componentDidMount');\n });\n } else {\n transaction.getReactMountReady().enqueue(inst.componentDidMount, inst);\n }\n }\n\n return markup;\n },\n\n _constructComponent: function (doConstruct, publicProps, publicContext, updateQueue) {\n if (true) {\n ReactCurrentOwner.current = this;\n try {\n return this._constructComponentWithoutOwner(doConstruct, publicProps, publicContext, updateQueue);\n } finally {\n ReactCurrentOwner.current = null;\n }\n } else {\n return this._constructComponentWithoutOwner(doConstruct, publicProps, publicContext, updateQueue);\n }\n },\n\n _constructComponentWithoutOwner: function (doConstruct, publicProps, publicContext, updateQueue) {\n var Component = this._currentElement.type;\n\n if (doConstruct) {\n if (true) {\n return measureLifeCyclePerf(function () {\n return new Component(publicProps, publicContext, updateQueue);\n }, this._debugID, 'ctor');\n } else {\n return new Component(publicProps, publicContext, updateQueue);\n }\n }\n\n // This can still be an instance in case of factory components\n // but we'll count this as time spent rendering as the more common case.\n if (true) {\n return measureLifeCyclePerf(function () {\n return Component(publicProps, publicContext, updateQueue);\n }, this._debugID, 'render');\n } else {\n return Component(publicProps, publicContext, updateQueue);\n }\n },\n\n performInitialMountWithErrorHandling: function (renderedElement, hostParent, hostContainerInfo, transaction, context) {\n var markup;\n var checkpoint = transaction.checkpoint();\n try {\n markup = this.performInitialMount(renderedElement, hostParent, hostContainerInfo, transaction, context);\n } catch (e) {\n // Roll back to checkpoint, handle error (which may add items to the transaction), and take a new checkpoint\n transaction.rollback(checkpoint);\n this._instance.unstable_handleError(e);\n if (this._pendingStateQueue) {\n this._instance.state = this._processPendingState(this._instance.props, this._instance.context);\n }\n checkpoint = transaction.checkpoint();\n\n this._renderedComponent.unmountComponent(true);\n transaction.rollback(checkpoint);\n\n // Try again - we've informed the component about the error, so they can render an error message this time.\n // If this throws again, the error will bubble up (and can be caught by a higher error boundary).\n markup = this.performInitialMount(renderedElement, hostParent, hostContainerInfo, transaction, context);\n }\n return markup;\n },\n\n performInitialMount: function (renderedElement, hostParent, hostContainerInfo, transaction, context) {\n var inst = this._instance;\n\n var debugID = 0;\n if (true) {\n debugID = this._debugID;\n }\n\n if (inst.componentWillMount) {\n if (true) {\n measureLifeCyclePerf(function () {\n return inst.componentWillMount();\n }, debugID, 'componentWillMount');\n } else {\n inst.componentWillMount();\n }\n // When mounting, calls to `setState` by `componentWillMount` will set\n // `this._pendingStateQueue` without triggering a re-render.\n if (this._pendingStateQueue) {\n inst.state = this._processPendingState(inst.props, inst.context);\n }\n }\n\n // If not a stateless component, we now render\n if (renderedElement === undefined) {\n renderedElement = this._renderValidatedComponent();\n }\n\n var nodeType = ReactNodeTypes.getType(renderedElement);\n this._renderedNodeType = nodeType;\n var child = this._instantiateReactComponent(renderedElement, nodeType !== ReactNodeTypes.EMPTY /* shouldHaveDebugID */\n );\n this._renderedComponent = child;\n\n var markup = ReactReconciler.mountComponent(child, transaction, hostParent, hostContainerInfo, this._processChildContext(context), debugID);\n\n if (true) {\n if (debugID !== 0) {\n var childDebugIDs = child._debugID !== 0 ? [child._debugID] : [];\n ReactInstrumentation.debugTool.onSetChildren(debugID, childDebugIDs);\n }\n }\n\n return markup;\n },\n\n getHostNode: function () {\n return ReactReconciler.getHostNode(this._renderedComponent);\n },\n\n /**\n * Releases any resources allocated by `mountComponent`.\n *\n * @final\n * @internal\n */\n unmountComponent: function (safely) {\n if (!this._renderedComponent) {\n return;\n }\n\n var inst = this._instance;\n\n if (inst.componentWillUnmount && !inst._calledComponentWillUnmount) {\n inst._calledComponentWillUnmount = true;\n\n if (safely) {\n var name = this.getName() + '.componentWillUnmount()';\n ReactErrorUtils.invokeGuardedCallback(name, inst.componentWillUnmount.bind(inst));\n } else {\n if (true) {\n measureLifeCyclePerf(function () {\n return inst.componentWillUnmount();\n }, this._debugID, 'componentWillUnmount');\n } else {\n inst.componentWillUnmount();\n }\n }\n }\n\n if (this._renderedComponent) {\n ReactReconciler.unmountComponent(this._renderedComponent, safely);\n this._renderedNodeType = null;\n this._renderedComponent = null;\n this._instance = null;\n }\n\n // Reset pending fields\n // Even if this component is scheduled for another update in ReactUpdates,\n // it would still be ignored because these fields are reset.\n this._pendingStateQueue = null;\n this._pendingReplaceState = false;\n this._pendingForceUpdate = false;\n this._pendingCallbacks = null;\n this._pendingElement = null;\n\n // These fields do not really need to be reset since this object is no\n // longer accessible.\n this._context = null;\n this._rootNodeID = 0;\n this._topLevelWrapper = null;\n\n // Delete the reference from the instance to this internal representation\n // which allow the internals to be properly cleaned up even if the user\n // leaks a reference to the public instance.\n ReactInstanceMap.remove(inst);\n\n // Some existing components rely on inst.props even after they've been\n // destroyed (in event handlers).\n // TODO: inst.props = null;\n // TODO: inst.state = null;\n // TODO: inst.context = null;\n },\n\n /**\n * Filters the context object to only contain keys specified in\n * `contextTypes`\n *\n * @param {object} context\n * @return {?object}\n * @private\n */\n _maskContext: function (context) {\n var Component = this._currentElement.type;\n var contextTypes = Component.contextTypes;\n if (!contextTypes) {\n return emptyObject;\n }\n var maskedContext = {};\n for (var contextName in contextTypes) {\n maskedContext[contextName] = context[contextName];\n }\n return maskedContext;\n },\n\n /**\n * Filters the context object to only contain keys specified in\n * `contextTypes`, and asserts that they are valid.\n *\n * @param {object} context\n * @return {?object}\n * @private\n */\n _processContext: function (context) {\n var maskedContext = this._maskContext(context);\n if (true) {\n var Component = this._currentElement.type;\n if (Component.contextTypes) {\n this._checkContextTypes(Component.contextTypes, maskedContext, 'context');\n }\n }\n return maskedContext;\n },\n\n /**\n * @param {object} currentContext\n * @return {object}\n * @private\n */\n _processChildContext: function (currentContext) {\n var Component = this._currentElement.type;\n var inst = this._instance;\n var childContext;\n\n if (inst.getChildContext) {\n if (true) {\n ReactInstrumentation.debugTool.onBeginProcessingChildContext();\n try {\n childContext = inst.getChildContext();\n } finally {\n ReactInstrumentation.debugTool.onEndProcessingChildContext();\n }\n } else {\n childContext = inst.getChildContext();\n }\n }\n\n if (childContext) {\n !(typeof Component.childContextTypes === 'object') ? true ? invariant(false, '%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().', this.getName() || 'ReactCompositeComponent') : _prodInvariant('107', this.getName() || 'ReactCompositeComponent') : void 0;\n if (true) {\n this._checkContextTypes(Component.childContextTypes, childContext, 'childContext');\n }\n for (var name in childContext) {\n !(name in Component.childContextTypes) ? true ? invariant(false, '%s.getChildContext(): key \"%s\" is not defined in childContextTypes.', this.getName() || 'ReactCompositeComponent', name) : _prodInvariant('108', this.getName() || 'ReactCompositeComponent', name) : void 0;\n }\n return _assign({}, currentContext, childContext);\n }\n return currentContext;\n },\n\n /**\n * Assert that the context types are valid\n *\n * @param {object} typeSpecs Map of context field to a ReactPropType\n * @param {object} values Runtime values that need to be type-checked\n * @param {string} location e.g. \"prop\", \"context\", \"child context\"\n * @private\n */\n _checkContextTypes: function (typeSpecs, values, location) {\n if (true) {\n checkReactTypeSpec(typeSpecs, values, location, this.getName(), null, this._debugID);\n }\n },\n\n receiveComponent: function (nextElement, transaction, nextContext) {\n var prevElement = this._currentElement;\n var prevContext = this._context;\n\n this._pendingElement = null;\n\n this.updateComponent(transaction, prevElement, nextElement, prevContext, nextContext);\n },\n\n /**\n * If any of `_pendingElement`, `_pendingStateQueue`, or `_pendingForceUpdate`\n * is set, update the component.\n *\n * @param {ReactReconcileTransaction} transaction\n * @internal\n */\n performUpdateIfNecessary: function (transaction) {\n if (this._pendingElement != null) {\n ReactReconciler.receiveComponent(this, this._pendingElement, transaction, this._context);\n } else if (this._pendingStateQueue !== null || this._pendingForceUpdate) {\n this.updateComponent(transaction, this._currentElement, this._currentElement, this._context, this._context);\n } else {\n this._updateBatchNumber = null;\n }\n },\n\n /**\n * Perform an update to a mounted component. The componentWillReceiveProps and\n * shouldComponentUpdate methods are called, then (assuming the update isn't\n * skipped) the remaining update lifecycle methods are called and the DOM\n * representation is updated.\n *\n * By default, this implements React's rendering and reconciliation algorithm.\n * Sophisticated clients may wish to override this.\n *\n * @param {ReactReconcileTransaction} transaction\n * @param {ReactElement} prevParentElement\n * @param {ReactElement} nextParentElement\n * @internal\n * @overridable\n */\n updateComponent: function (transaction, prevParentElement, nextParentElement, prevUnmaskedContext, nextUnmaskedContext) {\n var inst = this._instance;\n !(inst != null) ? true ? invariant(false, 'Attempted to update component `%s` that has already been unmounted (or failed to mount).', this.getName() || 'ReactCompositeComponent') : _prodInvariant('136', this.getName() || 'ReactCompositeComponent') : void 0;\n\n var willReceive = false;\n var nextContext;\n\n // Determine if the context has changed or not\n if (this._context === nextUnmaskedContext) {\n nextContext = inst.context;\n } else {\n nextContext = this._processContext(nextUnmaskedContext);\n willReceive = true;\n }\n\n var prevProps = prevParentElement.props;\n var nextProps = nextParentElement.props;\n\n // Not a simple state update but a props update\n if (prevParentElement !== nextParentElement) {\n willReceive = true;\n }\n\n // An update here will schedule an update but immediately set\n // _pendingStateQueue which will ensure that any state updates gets\n // immediately reconciled instead of waiting for the next batch.\n if (willReceive && inst.componentWillReceiveProps) {\n if (true) {\n measureLifeCyclePerf(function () {\n return inst.componentWillReceiveProps(nextProps, nextContext);\n }, this._debugID, 'componentWillReceiveProps');\n } else {\n inst.componentWillReceiveProps(nextProps, nextContext);\n }\n }\n\n var nextState = this._processPendingState(nextProps, nextContext);\n var shouldUpdate = true;\n\n if (!this._pendingForceUpdate) {\n if (inst.shouldComponentUpdate) {\n if (true) {\n shouldUpdate = measureLifeCyclePerf(function () {\n return inst.shouldComponentUpdate(nextProps, nextState, nextContext);\n }, this._debugID, 'shouldComponentUpdate');\n } else {\n shouldUpdate = inst.shouldComponentUpdate(nextProps, nextState, nextContext);\n }\n } else {\n if (this._compositeType === CompositeTypes.PureClass) {\n shouldUpdate = !shallowEqual(prevProps, nextProps) || !shallowEqual(inst.state, nextState);\n }\n }\n }\n\n if (true) {\n true ? warning(shouldUpdate !== undefined, '%s.shouldComponentUpdate(): Returned undefined instead of a ' + 'boolean value. Make sure to return true or false.', this.getName() || 'ReactCompositeComponent') : void 0;\n }\n\n this._updateBatchNumber = null;\n if (shouldUpdate) {\n this._pendingForceUpdate = false;\n // Will set `this.props`, `this.state` and `this.context`.\n this._performComponentUpdate(nextParentElement, nextProps, nextState, nextContext, transaction, nextUnmaskedContext);\n } else {\n // If it's determined that a component should not update, we still want\n // to set props and state but we shortcut the rest of the update.\n this._currentElement = nextParentElement;\n this._context = nextUnmaskedContext;\n inst.props = nextProps;\n inst.state = nextState;\n inst.context = nextContext;\n }\n },\n\n _processPendingState: function (props, context) {\n var inst = this._instance;\n var queue = this._pendingStateQueue;\n var replace = this._pendingReplaceState;\n this._pendingReplaceState = false;\n this._pendingStateQueue = null;\n\n if (!queue) {\n return inst.state;\n }\n\n if (replace && queue.length === 1) {\n return queue[0];\n }\n\n var nextState = _assign({}, replace ? queue[0] : inst.state);\n for (var i = replace ? 1 : 0; i < queue.length; i++) {\n var partial = queue[i];\n _assign(nextState, typeof partial === 'function' ? partial.call(inst, nextState, props, context) : partial);\n }\n\n return nextState;\n },\n\n /**\n * Merges new props and state, notifies delegate methods of update and\n * performs update.\n *\n * @param {ReactElement} nextElement Next element\n * @param {object} nextProps Next public object to set as properties.\n * @param {?object} nextState Next object to set as state.\n * @param {?object} nextContext Next public object to set as context.\n * @param {ReactReconcileTransaction} transaction\n * @param {?object} unmaskedContext\n * @private\n */\n _performComponentUpdate: function (nextElement, nextProps, nextState, nextContext, transaction, unmaskedContext) {\n var _this2 = this;\n\n var inst = this._instance;\n\n var hasComponentDidUpdate = Boolean(inst.componentDidUpdate);\n var prevProps;\n var prevState;\n var prevContext;\n if (hasComponentDidUpdate) {\n prevProps = inst.props;\n prevState = inst.state;\n prevContext = inst.context;\n }\n\n if (inst.componentWillUpdate) {\n if (true) {\n measureLifeCyclePerf(function () {\n return inst.componentWillUpdate(nextProps, nextState, nextContext);\n }, this._debugID, 'componentWillUpdate');\n } else {\n inst.componentWillUpdate(nextProps, nextState, nextContext);\n }\n }\n\n this._currentElement = nextElement;\n this._context = unmaskedContext;\n inst.props = nextProps;\n inst.state = nextState;\n inst.context = nextContext;\n\n this._updateRenderedComponent(transaction, unmaskedContext);\n\n if (hasComponentDidUpdate) {\n if (true) {\n transaction.getReactMountReady().enqueue(function () {\n measureLifeCyclePerf(inst.componentDidUpdate.bind(inst, prevProps, prevState, prevContext), _this2._debugID, 'componentDidUpdate');\n });\n } else {\n transaction.getReactMountReady().enqueue(inst.componentDidUpdate.bind(inst, prevProps, prevState, prevContext), inst);\n }\n }\n },\n\n /**\n * Call the component's `render` method and update the DOM accordingly.\n *\n * @param {ReactReconcileTransaction} transaction\n * @internal\n */\n _updateRenderedComponent: function (transaction, context) {\n var prevComponentInstance = this._renderedComponent;\n var prevRenderedElement = prevComponentInstance._currentElement;\n var nextRenderedElement = this._renderValidatedComponent();\n\n var debugID = 0;\n if (true) {\n debugID = this._debugID;\n }\n\n if (shouldUpdateReactComponent(prevRenderedElement, nextRenderedElement)) {\n ReactReconciler.receiveComponent(prevComponentInstance, nextRenderedElement, transaction, this._processChildContext(context));\n } else {\n var oldHostNode = ReactReconciler.getHostNode(prevComponentInstance);\n ReactReconciler.unmountComponent(prevComponentInstance, false);\n\n var nodeType = ReactNodeTypes.getType(nextRenderedElement);\n this._renderedNodeType = nodeType;\n var child = this._instantiateReactComponent(nextRenderedElement, nodeType !== ReactNodeTypes.EMPTY /* shouldHaveDebugID */\n );\n this._renderedComponent = child;\n\n var nextMarkup = ReactReconciler.mountComponent(child, transaction, this._hostParent, this._hostContainerInfo, this._processChildContext(context), debugID);\n\n if (true) {\n if (debugID !== 0) {\n var childDebugIDs = child._debugID !== 0 ? [child._debugID] : [];\n ReactInstrumentation.debugTool.onSetChildren(debugID, childDebugIDs);\n }\n }\n\n this._replaceNodeWithMarkup(oldHostNode, nextMarkup, prevComponentInstance);\n }\n },\n\n /**\n * Overridden in shallow rendering.\n *\n * @protected\n */\n _replaceNodeWithMarkup: function (oldHostNode, nextMarkup, prevInstance) {\n ReactComponentEnvironment.replaceNodeWithMarkup(oldHostNode, nextMarkup, prevInstance);\n },\n\n /**\n * @protected\n */\n _renderValidatedComponentWithoutOwnerOrContext: function () {\n var inst = this._instance;\n var renderedElement;\n\n if (true) {\n renderedElement = measureLifeCyclePerf(function () {\n return inst.render();\n }, this._debugID, 'render');\n } else {\n renderedElement = inst.render();\n }\n\n if (true) {\n // We allow auto-mocks to proceed as if they're returning null.\n if (renderedElement === undefined && inst.render._isMockFunction) {\n // This is probably bad practice. Consider warning here and\n // deprecating this convenience.\n renderedElement = null;\n }\n }\n\n return renderedElement;\n },\n\n /**\n * @private\n */\n _renderValidatedComponent: function () {\n var renderedElement;\n if (true) {\n ReactCurrentOwner.current = this;\n try {\n renderedElement = this._renderValidatedComponentWithoutOwnerOrContext();\n } finally {\n ReactCurrentOwner.current = null;\n }\n } else {\n renderedElement = this._renderValidatedComponentWithoutOwnerOrContext();\n }\n !(\n // TODO: An `isValidNode` function would probably be more appropriate\n renderedElement === null || renderedElement === false || React.isValidElement(renderedElement)) ? true ? invariant(false, '%s.render(): A valid React element (or null) must be returned. You may have returned undefined, an array or some other invalid object.', this.getName() || 'ReactCompositeComponent') : _prodInvariant('109', this.getName() || 'ReactCompositeComponent') : void 0;\n\n return renderedElement;\n },\n\n /**\n * Lazily allocates the refs object and stores `component` as `ref`.\n *\n * @param {string} ref Reference name.\n * @param {component} component Component to store as `ref`.\n * @final\n * @private\n */\n attachRef: function (ref, component) {\n var inst = this.getPublicInstance();\n !(inst != null) ? true ? invariant(false, 'Stateless function components cannot have refs.') : _prodInvariant('110') : void 0;\n var publicComponentInstance = component.getPublicInstance();\n if (true) {\n var componentName = component && component.getName ? component.getName() : 'a component';\n true ? warning(publicComponentInstance != null || component._compositeType !== CompositeTypes.StatelessFunctional, 'Stateless function components cannot be given refs ' + '(See ref \"%s\" in %s created by %s). ' + 'Attempts to access this ref will fail.', ref, componentName, this.getName()) : void 0;\n }\n var refs = inst.refs === emptyObject ? inst.refs = {} : inst.refs;\n refs[ref] = publicComponentInstance;\n },\n\n /**\n * Detaches a reference name.\n *\n * @param {string} ref Name to dereference.\n * @final\n * @private\n */\n detachRef: function (ref) {\n var refs = this.getPublicInstance().refs;\n delete refs[ref];\n },\n\n /**\n * Get a text description of the component that can be used to identify it\n * in error messages.\n * @return {string} The name or null.\n * @internal\n */\n getName: function () {\n var type = this._currentElement.type;\n var constructor = this._instance && this._instance.constructor;\n return type.displayName || constructor && constructor.displayName || type.name || constructor && constructor.name || null;\n },\n\n /**\n * Get the publicly accessible representation of this component - i.e. what\n * is exposed by refs and returned by render. Can be null for stateless\n * components.\n *\n * @return {ReactComponent} the public component instance.\n * @internal\n */\n getPublicInstance: function () {\n var inst = this._instance;\n if (this._compositeType === CompositeTypes.StatelessFunctional) {\n return null;\n }\n return inst;\n },\n\n // Stub\n _instantiateReactComponent: null\n\n};\n\nmodule.exports = ReactCompositeComponent;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/ReactCompositeComponent.js\n// module id = 1329\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/ReactCompositeComponent.js?", + ); + + /***/ + }, + /* 1330 */ + /* unknown exports provided */ + /* all exports used */ + /*!*************************************!*\ + !*** ./~/react-dom/lib/ReactDOM.js ***! + \*************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n/* globals __REACT_DEVTOOLS_GLOBAL_HOOK__*/\n\n\n\nvar ReactDOMComponentTree = __webpack_require__(/*! ./ReactDOMComponentTree */ 24);\nvar ReactDefaultInjection = __webpack_require__(/*! ./ReactDefaultInjection */ 538);\nvar ReactMount = __webpack_require__(/*! ./ReactMount */ 544);\nvar ReactReconciler = __webpack_require__(/*! ./ReactReconciler */ 79);\nvar ReactUpdates = __webpack_require__(/*! ./ReactUpdates */ 47);\nvar ReactVersion = __webpack_require__(/*! ./ReactVersion */ 548);\n\nvar findDOMNode = __webpack_require__(/*! ./findDOMNode */ 1376);\nvar getHostComponentFromComposite = __webpack_require__(/*! ./getHostComponentFromComposite */ 552);\nvar renderSubtreeIntoContainer = __webpack_require__(/*! ./renderSubtreeIntoContainer */ 1384);\nvar warning = __webpack_require__(/*! fbjs/lib/warning */ 13);\n\nReactDefaultInjection.inject();\n\nvar ReactDOM = {\n findDOMNode: findDOMNode,\n render: ReactMount.render,\n unmountComponentAtNode: ReactMount.unmountComponentAtNode,\n version: ReactVersion,\n\n /* eslint-disable camelcase */\n unstable_batchedUpdates: ReactUpdates.batchedUpdates,\n unstable_renderSubtreeIntoContainer: renderSubtreeIntoContainer\n};\n\n// Inject the runtime into a devtools global hook regardless of browser.\n// Allows for debugging when the hook is injected on the page.\nif (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject === 'function') {\n __REACT_DEVTOOLS_GLOBAL_HOOK__.inject({\n ComponentTree: {\n getClosestInstanceFromNode: ReactDOMComponentTree.getClosestInstanceFromNode,\n getNodeFromInstance: function (inst) {\n // inst is an internal instance (but could be a composite)\n if (inst._renderedComponent) {\n inst = getHostComponentFromComposite(inst);\n }\n if (inst) {\n return ReactDOMComponentTree.getNodeFromInstance(inst);\n } else {\n return null;\n }\n }\n },\n Mount: ReactMount,\n Reconciler: ReactReconciler\n });\n}\n\nif (true) {\n var ExecutionEnvironment = __webpack_require__(/*! fbjs/lib/ExecutionEnvironment */ 27);\n if (ExecutionEnvironment.canUseDOM && window.top === window.self) {\n\n // First check if devtools is not installed\n if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined') {\n // If we're in Chrome or Firefox, provide a download link if not installed.\n if (navigator.userAgent.indexOf('Chrome') > -1 && navigator.userAgent.indexOf('Edge') === -1 || navigator.userAgent.indexOf('Firefox') > -1) {\n // Firefox does not have the issue with devtools loaded over file://\n var showFileUrlMessage = window.location.protocol.indexOf('http') === -1 && navigator.userAgent.indexOf('Firefox') === -1;\n console.debug('Download the React DevTools ' + (showFileUrlMessage ? 'and use an HTTP server (instead of a file: URL) ' : '') + 'for a better development experience: ' + 'https://fb.me/react-devtools');\n }\n }\n\n var testFunc = function testFn() {};\n true ? warning((testFunc.name || testFunc.toString()).indexOf('testFn') !== -1, 'It looks like you\\'re using a minified copy of the development build ' + 'of React. When deploying React apps to production, make sure to use ' + 'the production build which skips development warnings and is faster. ' + 'See https://fb.me/react-minification for more details.') : void 0;\n\n // If we're in IE8, check to see if we are in compatibility mode and provide\n // information on preventing compatibility mode\n var ieCompatibilityMode = document.documentMode && document.documentMode < 8;\n\n true ? warning(!ieCompatibilityMode, 'Internet Explorer is running in compatibility mode; please add the ' + 'following tag to your HTML to prevent this from happening: ' + '<meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\" />') : void 0;\n\n var expectedFeatures = [\n // shims\n Array.isArray, Array.prototype.every, Array.prototype.forEach, Array.prototype.indexOf, Array.prototype.map, Date.now, Function.prototype.bind, Object.keys, String.prototype.trim];\n\n for (var i = 0; i < expectedFeatures.length; i++) {\n if (!expectedFeatures[i]) {\n true ? warning(false, 'One or more ES5 shims expected by React are not available: ' + 'https://fb.me/react-warning-polyfills') : void 0;\n break;\n }\n }\n }\n}\n\nif (true) {\n var ReactInstrumentation = __webpack_require__(/*! ./ReactInstrumentation */ 35);\n var ReactDOMUnknownPropertyHook = __webpack_require__(/*! ./ReactDOMUnknownPropertyHook */ 1344);\n var ReactDOMNullInputValuePropHook = __webpack_require__(/*! ./ReactDOMNullInputValuePropHook */ 1337);\n var ReactDOMInvalidARIAHook = __webpack_require__(/*! ./ReactDOMInvalidARIAHook */ 1336);\n\n ReactInstrumentation.debugTool.addHook(ReactDOMUnknownPropertyHook);\n ReactInstrumentation.debugTool.addHook(ReactDOMNullInputValuePropHook);\n ReactInstrumentation.debugTool.addHook(ReactDOMInvalidARIAHook);\n}\n\nmodule.exports = ReactDOM;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/ReactDOM.js\n// module id = 1330\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/ReactDOM.js?", + ); + + /***/ + }, + /* 1331 */ + /* unknown exports provided */ + /* all exports used */ + /*!**********************************************!*\ + !*** ./~/react-dom/lib/ReactDOMComponent.js ***! + \**********************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n/* global hasOwnProperty:true */\n\n\n\nvar _prodInvariant = __webpack_require__(/*! ./reactProdInvariant */ 17),\n _assign = __webpack_require__(/*! object-assign */ 21);\n\nvar AutoFocusUtils = __webpack_require__(/*! ./AutoFocusUtils */ 1318);\nvar CSSPropertyOperations = __webpack_require__(/*! ./CSSPropertyOperations */ 1320);\nvar DOMLazyTree = __webpack_require__(/*! ./DOMLazyTree */ 100);\nvar DOMNamespaces = __webpack_require__(/*! ./DOMNamespaces */ 246);\nvar DOMProperty = __webpack_require__(/*! ./DOMProperty */ 67);\nvar DOMPropertyOperations = __webpack_require__(/*! ./DOMPropertyOperations */ 533);\nvar EventPluginHub = __webpack_require__(/*! ./EventPluginHub */ 123);\nvar EventPluginRegistry = __webpack_require__(/*! ./EventPluginRegistry */ 168);\nvar ReactBrowserEventEmitter = __webpack_require__(/*! ./ReactBrowserEventEmitter */ 169);\nvar ReactDOMComponentFlags = __webpack_require__(/*! ./ReactDOMComponentFlags */ 534);\nvar ReactDOMComponentTree = __webpack_require__(/*! ./ReactDOMComponentTree */ 24);\nvar ReactDOMInput = __webpack_require__(/*! ./ReactDOMInput */ 1335);\nvar ReactDOMOption = __webpack_require__(/*! ./ReactDOMOption */ 1338);\nvar ReactDOMSelect = __webpack_require__(/*! ./ReactDOMSelect */ 536);\nvar ReactDOMTextarea = __webpack_require__(/*! ./ReactDOMTextarea */ 1342);\nvar ReactInstrumentation = __webpack_require__(/*! ./ReactInstrumentation */ 35);\nvar ReactMultiChild = __webpack_require__(/*! ./ReactMultiChild */ 1352);\nvar ReactServerRenderingTransaction = __webpack_require__(/*! ./ReactServerRenderingTransaction */ 547);\n\nvar emptyFunction = __webpack_require__(/*! fbjs/lib/emptyFunction */ 40);\nvar escapeTextContentForBrowser = __webpack_require__(/*! ./escapeTextContentForBrowser */ 172);\nvar invariant = __webpack_require__(/*! fbjs/lib/invariant */ 12);\nvar isEventSupported = __webpack_require__(/*! ./isEventSupported */ 258);\nvar shallowEqual = __webpack_require__(/*! fbjs/lib/shallowEqual */ 97);\nvar validateDOMNesting = __webpack_require__(/*! ./validateDOMNesting */ 260);\nvar warning = __webpack_require__(/*! fbjs/lib/warning */ 13);\n\nvar Flags = ReactDOMComponentFlags;\nvar deleteListener = EventPluginHub.deleteListener;\nvar getNode = ReactDOMComponentTree.getNodeFromInstance;\nvar listenTo = ReactBrowserEventEmitter.listenTo;\nvar registrationNameModules = EventPluginRegistry.registrationNameModules;\n\n// For quickly matching children type, to test if can be treated as content.\nvar CONTENT_TYPES = { 'string': true, 'number': true };\n\nvar STYLE = 'style';\nvar HTML = '__html';\nvar RESERVED_PROPS = {\n children: null,\n dangerouslySetInnerHTML: null,\n suppressContentEditableWarning: null\n};\n\n// Node type for document fragments (Node.DOCUMENT_FRAGMENT_NODE).\nvar DOC_FRAGMENT_TYPE = 11;\n\nfunction getDeclarationErrorAddendum(internalInstance) {\n if (internalInstance) {\n var owner = internalInstance._currentElement._owner || null;\n if (owner) {\n var name = owner.getName();\n if (name) {\n return ' This DOM node was rendered by `' + name + '`.';\n }\n }\n }\n return '';\n}\n\nfunction friendlyStringify(obj) {\n if (typeof obj === 'object') {\n if (Array.isArray(obj)) {\n return '[' + obj.map(friendlyStringify).join(', ') + ']';\n } else {\n var pairs = [];\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n var keyEscaped = /^[a-z$_][\\w$_]*$/i.test(key) ? key : JSON.stringify(key);\n pairs.push(keyEscaped + ': ' + friendlyStringify(obj[key]));\n }\n }\n return '{' + pairs.join(', ') + '}';\n }\n } else if (typeof obj === 'string') {\n return JSON.stringify(obj);\n } else if (typeof obj === 'function') {\n return '[function object]';\n }\n // Differs from JSON.stringify in that undefined because undefined and that\n // inf and nan don't become null\n return String(obj);\n}\n\nvar styleMutationWarning = {};\n\nfunction checkAndWarnForMutatedStyle(style1, style2, component) {\n if (style1 == null || style2 == null) {\n return;\n }\n if (shallowEqual(style1, style2)) {\n return;\n }\n\n var componentName = component._tag;\n var owner = component._currentElement._owner;\n var ownerName;\n if (owner) {\n ownerName = owner.getName();\n }\n\n var hash = ownerName + '|' + componentName;\n\n if (styleMutationWarning.hasOwnProperty(hash)) {\n return;\n }\n\n styleMutationWarning[hash] = true;\n\n true ? warning(false, '`%s` was passed a style object that has previously been mutated. ' + 'Mutating `style` is deprecated. Consider cloning it beforehand. Check ' + 'the `render` %s. Previous style: %s. Mutated style: %s.', componentName, owner ? 'of `' + ownerName + '`' : 'using <' + componentName + '>', friendlyStringify(style1), friendlyStringify(style2)) : void 0;\n}\n\n/**\n * @param {object} component\n * @param {?object} props\n */\nfunction assertValidProps(component, props) {\n if (!props) {\n return;\n }\n // Note the use of `==` which checks for null or undefined.\n if (voidElementTags[component._tag]) {\n !(props.children == null && props.dangerouslySetInnerHTML == null) ? true ? invariant(false, '%s is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.%s', component._tag, component._currentElement._owner ? ' Check the render method of ' + component._currentElement._owner.getName() + '.' : '') : _prodInvariant('137', component._tag, component._currentElement._owner ? ' Check the render method of ' + component._currentElement._owner.getName() + '.' : '') : void 0;\n }\n if (props.dangerouslySetInnerHTML != null) {\n !(props.children == null) ? true ? invariant(false, 'Can only set one of `children` or `props.dangerouslySetInnerHTML`.') : _prodInvariant('60') : void 0;\n !(typeof props.dangerouslySetInnerHTML === 'object' && HTML in props.dangerouslySetInnerHTML) ? true ? invariant(false, '`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://fb.me/react-invariant-dangerously-set-inner-html for more information.') : _prodInvariant('61') : void 0;\n }\n if (true) {\n true ? warning(props.innerHTML == null, 'Directly setting property `innerHTML` is not permitted. ' + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.') : void 0;\n true ? warning(props.suppressContentEditableWarning || !props.contentEditable || props.children == null, 'A component is `contentEditable` and contains `children` managed by ' + 'React. It is now your responsibility to guarantee that none of ' + 'those nodes are unexpectedly modified or duplicated. This is ' + 'probably not intentional.') : void 0;\n true ? warning(props.onFocusIn == null && props.onFocusOut == null, 'React uses onFocus and onBlur instead of onFocusIn and onFocusOut. ' + 'All React events are normalized to bubble, so onFocusIn and onFocusOut ' + 'are not needed/supported by React.') : void 0;\n }\n !(props.style == null || typeof props.style === 'object') ? true ? invariant(false, 'The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + \\'em\\'}} when using JSX.%s', getDeclarationErrorAddendum(component)) : _prodInvariant('62', getDeclarationErrorAddendum(component)) : void 0;\n}\n\nfunction enqueuePutListener(inst, registrationName, listener, transaction) {\n if (transaction instanceof ReactServerRenderingTransaction) {\n return;\n }\n if (true) {\n // IE8 has no API for event capturing and the `onScroll` event doesn't\n // bubble.\n true ? warning(registrationName !== 'onScroll' || isEventSupported('scroll', true), 'This browser doesn\\'t support the `onScroll` event') : void 0;\n }\n var containerInfo = inst._hostContainerInfo;\n var isDocumentFragment = containerInfo._node && containerInfo._node.nodeType === DOC_FRAGMENT_TYPE;\n var doc = isDocumentFragment ? containerInfo._node : containerInfo._ownerDocument;\n listenTo(registrationName, doc);\n transaction.getReactMountReady().enqueue(putListener, {\n inst: inst,\n registrationName: registrationName,\n listener: listener\n });\n}\n\nfunction putListener() {\n var listenerToPut = this;\n EventPluginHub.putListener(listenerToPut.inst, listenerToPut.registrationName, listenerToPut.listener);\n}\n\nfunction inputPostMount() {\n var inst = this;\n ReactDOMInput.postMountWrapper(inst);\n}\n\nfunction textareaPostMount() {\n var inst = this;\n ReactDOMTextarea.postMountWrapper(inst);\n}\n\nfunction optionPostMount() {\n var inst = this;\n ReactDOMOption.postMountWrapper(inst);\n}\n\nvar setAndValidateContentChildDev = emptyFunction;\nif (true) {\n setAndValidateContentChildDev = function (content) {\n var hasExistingContent = this._contentDebugID != null;\n var debugID = this._debugID;\n // This ID represents the inlined child that has no backing instance:\n var contentDebugID = -debugID;\n\n if (content == null) {\n if (hasExistingContent) {\n ReactInstrumentation.debugTool.onUnmountComponent(this._contentDebugID);\n }\n this._contentDebugID = null;\n return;\n }\n\n validateDOMNesting(null, String(content), this, this._ancestorInfo);\n this._contentDebugID = contentDebugID;\n if (hasExistingContent) {\n ReactInstrumentation.debugTool.onBeforeUpdateComponent(contentDebugID, content);\n ReactInstrumentation.debugTool.onUpdateComponent(contentDebugID);\n } else {\n ReactInstrumentation.debugTool.onBeforeMountComponent(contentDebugID, content, debugID);\n ReactInstrumentation.debugTool.onMountComponent(contentDebugID);\n ReactInstrumentation.debugTool.onSetChildren(debugID, [contentDebugID]);\n }\n };\n}\n\n// There are so many media events, it makes sense to just\n// maintain a list rather than create a `trapBubbledEvent` for each\nvar mediaEvents = {\n topAbort: 'abort',\n topCanPlay: 'canplay',\n topCanPlayThrough: 'canplaythrough',\n topDurationChange: 'durationchange',\n topEmptied: 'emptied',\n topEncrypted: 'encrypted',\n topEnded: 'ended',\n topError: 'error',\n topLoadedData: 'loadeddata',\n topLoadedMetadata: 'loadedmetadata',\n topLoadStart: 'loadstart',\n topPause: 'pause',\n topPlay: 'play',\n topPlaying: 'playing',\n topProgress: 'progress',\n topRateChange: 'ratechange',\n topSeeked: 'seeked',\n topSeeking: 'seeking',\n topStalled: 'stalled',\n topSuspend: 'suspend',\n topTimeUpdate: 'timeupdate',\n topVolumeChange: 'volumechange',\n topWaiting: 'waiting'\n};\n\nfunction trapBubbledEventsLocal() {\n var inst = this;\n // If a component renders to null or if another component fatals and causes\n // the state of the tree to be corrupted, `node` here can be null.\n !inst._rootNodeID ? true ? invariant(false, 'Must be mounted to trap events') : _prodInvariant('63') : void 0;\n var node = getNode(inst);\n !node ? true ? invariant(false, 'trapBubbledEvent(...): Requires node to be rendered.') : _prodInvariant('64') : void 0;\n\n switch (inst._tag) {\n case 'iframe':\n case 'object':\n inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topLoad', 'load', node)];\n break;\n case 'video':\n case 'audio':\n\n inst._wrapperState.listeners = [];\n // Create listener for each media event\n for (var event in mediaEvents) {\n if (mediaEvents.hasOwnProperty(event)) {\n inst._wrapperState.listeners.push(ReactBrowserEventEmitter.trapBubbledEvent(event, mediaEvents[event], node));\n }\n }\n break;\n case 'source':\n inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topError', 'error', node)];\n break;\n case 'img':\n inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topError', 'error', node), ReactBrowserEventEmitter.trapBubbledEvent('topLoad', 'load', node)];\n break;\n case 'form':\n inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topReset', 'reset', node), ReactBrowserEventEmitter.trapBubbledEvent('topSubmit', 'submit', node)];\n break;\n case 'input':\n case 'select':\n case 'textarea':\n inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topInvalid', 'invalid', node)];\n break;\n }\n}\n\nfunction postUpdateSelectWrapper() {\n ReactDOMSelect.postUpdateWrapper(this);\n}\n\n// For HTML, certain tags should omit their close tag. We keep a whitelist for\n// those special-case tags.\n\nvar omittedCloseTags = {\n 'area': true,\n 'base': true,\n 'br': true,\n 'col': true,\n 'embed': true,\n 'hr': true,\n 'img': true,\n 'input': true,\n 'keygen': true,\n 'link': true,\n 'meta': true,\n 'param': true,\n 'source': true,\n 'track': true,\n 'wbr': true\n};\n\nvar newlineEatingTags = {\n 'listing': true,\n 'pre': true,\n 'textarea': true\n};\n\n// For HTML, certain tags cannot have children. This has the same purpose as\n// `omittedCloseTags` except that `menuitem` should still have its closing tag.\n\nvar voidElementTags = _assign({\n 'menuitem': true\n}, omittedCloseTags);\n\n// We accept any tag to be rendered but since this gets injected into arbitrary\n// HTML, we want to make sure that it's a safe tag.\n// http://www.w3.org/TR/REC-xml/#NT-Name\n\nvar VALID_TAG_REGEX = /^[a-zA-Z][a-zA-Z:_\\.\\-\\d]*$/; // Simplified subset\nvar validatedTagCache = {};\nvar hasOwnProperty = {}.hasOwnProperty;\n\nfunction validateDangerousTag(tag) {\n if (!hasOwnProperty.call(validatedTagCache, tag)) {\n !VALID_TAG_REGEX.test(tag) ? true ? invariant(false, 'Invalid tag: %s', tag) : _prodInvariant('65', tag) : void 0;\n validatedTagCache[tag] = true;\n }\n}\n\nfunction isCustomComponent(tagName, props) {\n return tagName.indexOf('-') >= 0 || props.is != null;\n}\n\nvar globalIdCounter = 1;\n\n/**\n * Creates a new React class that is idempotent and capable of containing other\n * React components. It accepts event listeners and DOM properties that are\n * valid according to `DOMProperty`.\n *\n * - Event listeners: `onClick`, `onMouseDown`, etc.\n * - DOM properties: `className`, `name`, `title`, etc.\n *\n * The `style` property functions differently from the DOM API. It accepts an\n * object mapping of style properties to values.\n *\n * @constructor ReactDOMComponent\n * @extends ReactMultiChild\n */\nfunction ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (true) {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}\n\nReactDOMComponent.displayName = 'ReactDOMComponent';\n\nReactDOMComponent.Mixin = {\n\n /**\n * Generates root tag markup then recurses. This method has side effects and\n * is not idempotent.\n *\n * @internal\n * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction\n * @param {?ReactDOMComponent} the parent component instance\n * @param {?object} info about the host container\n * @param {object} context\n * @return {string} The computed markup.\n */\n mountComponent: function (transaction, hostParent, hostContainerInfo, context) {\n this._rootNodeID = globalIdCounter++;\n this._domID = hostContainerInfo._idCounter++;\n this._hostParent = hostParent;\n this._hostContainerInfo = hostContainerInfo;\n\n var props = this._currentElement.props;\n\n switch (this._tag) {\n case 'audio':\n case 'form':\n case 'iframe':\n case 'img':\n case 'link':\n case 'object':\n case 'source':\n case 'video':\n this._wrapperState = {\n listeners: null\n };\n transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this);\n break;\n case 'input':\n ReactDOMInput.mountWrapper(this, props, hostParent);\n props = ReactDOMInput.getHostProps(this, props);\n transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this);\n break;\n case 'option':\n ReactDOMOption.mountWrapper(this, props, hostParent);\n props = ReactDOMOption.getHostProps(this, props);\n break;\n case 'select':\n ReactDOMSelect.mountWrapper(this, props, hostParent);\n props = ReactDOMSelect.getHostProps(this, props);\n transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this);\n break;\n case 'textarea':\n ReactDOMTextarea.mountWrapper(this, props, hostParent);\n props = ReactDOMTextarea.getHostProps(this, props);\n transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this);\n break;\n }\n\n assertValidProps(this, props);\n\n // We create tags in the namespace of their parent container, except HTML\n // tags get no namespace.\n var namespaceURI;\n var parentTag;\n if (hostParent != null) {\n namespaceURI = hostParent._namespaceURI;\n parentTag = hostParent._tag;\n } else if (hostContainerInfo._tag) {\n namespaceURI = hostContainerInfo._namespaceURI;\n parentTag = hostContainerInfo._tag;\n }\n if (namespaceURI == null || namespaceURI === DOMNamespaces.svg && parentTag === 'foreignobject') {\n namespaceURI = DOMNamespaces.html;\n }\n if (namespaceURI === DOMNamespaces.html) {\n if (this._tag === 'svg') {\n namespaceURI = DOMNamespaces.svg;\n } else if (this._tag === 'math') {\n namespaceURI = DOMNamespaces.mathml;\n }\n }\n this._namespaceURI = namespaceURI;\n\n if (true) {\n var parentInfo;\n if (hostParent != null) {\n parentInfo = hostParent._ancestorInfo;\n } else if (hostContainerInfo._tag) {\n parentInfo = hostContainerInfo._ancestorInfo;\n }\n if (parentInfo) {\n // parentInfo should always be present except for the top-level\n // component when server rendering\n validateDOMNesting(this._tag, null, this, parentInfo);\n }\n this._ancestorInfo = validateDOMNesting.updatedAncestorInfo(parentInfo, this._tag, this);\n }\n\n var mountImage;\n if (transaction.useCreateElement) {\n var ownerDocument = hostContainerInfo._ownerDocument;\n var el;\n if (namespaceURI === DOMNamespaces.html) {\n if (this._tag === 'script') {\n // Create the script via .innerHTML so its \"parser-inserted\" flag is\n // set to true and it does not execute\n var div = ownerDocument.createElement('div');\n var type = this._currentElement.type;\n div.innerHTML = '<' + type + '></' + type + '>';\n el = div.removeChild(div.firstChild);\n } else if (props.is) {\n el = ownerDocument.createElement(this._currentElement.type, props.is);\n } else {\n // Separate else branch instead of using `props.is || undefined` above becuase of a Firefox bug.\n // See discussion in https://github.com/facebook/react/pull/6896\n // and discussion in https://bugzilla.mozilla.org/show_bug.cgi?id=1276240\n el = ownerDocument.createElement(this._currentElement.type);\n }\n } else {\n el = ownerDocument.createElementNS(namespaceURI, this._currentElement.type);\n }\n ReactDOMComponentTree.precacheNode(this, el);\n this._flags |= Flags.hasCachedChildNodes;\n if (!this._hostParent) {\n DOMPropertyOperations.setAttributeForRoot(el);\n }\n this._updateDOMProperties(null, props, transaction);\n var lazyTree = DOMLazyTree(el);\n this._createInitialChildren(transaction, props, context, lazyTree);\n mountImage = lazyTree;\n } else {\n var tagOpen = this._createOpenTagMarkupAndPutListeners(transaction, props);\n var tagContent = this._createContentMarkup(transaction, props, context);\n if (!tagContent && omittedCloseTags[this._tag]) {\n mountImage = tagOpen + '/>';\n } else {\n mountImage = tagOpen + '>' + tagContent + '</' + this._currentElement.type + '>';\n }\n }\n\n switch (this._tag) {\n case 'input':\n transaction.getReactMountReady().enqueue(inputPostMount, this);\n if (props.autoFocus) {\n transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this);\n }\n break;\n case 'textarea':\n transaction.getReactMountReady().enqueue(textareaPostMount, this);\n if (props.autoFocus) {\n transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this);\n }\n break;\n case 'select':\n if (props.autoFocus) {\n transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this);\n }\n break;\n case 'button':\n if (props.autoFocus) {\n transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this);\n }\n break;\n case 'option':\n transaction.getReactMountReady().enqueue(optionPostMount, this);\n break;\n }\n\n return mountImage;\n },\n\n /**\n * Creates markup for the open tag and all attributes.\n *\n * This method has side effects because events get registered.\n *\n * Iterating over object properties is faster than iterating over arrays.\n * @see http://jsperf.com/obj-vs-arr-iteration\n *\n * @private\n * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction\n * @param {object} props\n * @return {string} Markup of opening tag.\n */\n _createOpenTagMarkupAndPutListeners: function (transaction, props) {\n var ret = '<' + this._currentElement.type;\n\n for (var propKey in props) {\n if (!props.hasOwnProperty(propKey)) {\n continue;\n }\n var propValue = props[propKey];\n if (propValue == null) {\n continue;\n }\n if (registrationNameModules.hasOwnProperty(propKey)) {\n if (propValue) {\n enqueuePutListener(this, propKey, propValue, transaction);\n }\n } else {\n if (propKey === STYLE) {\n if (propValue) {\n if (true) {\n // See `_updateDOMProperties`. style block\n this._previousStyle = propValue;\n }\n propValue = this._previousStyleCopy = _assign({}, props.style);\n }\n propValue = CSSPropertyOperations.createMarkupForStyles(propValue, this);\n }\n var markup = null;\n if (this._tag != null && isCustomComponent(this._tag, props)) {\n if (!RESERVED_PROPS.hasOwnProperty(propKey)) {\n markup = DOMPropertyOperations.createMarkupForCustomAttribute(propKey, propValue);\n }\n } else {\n markup = DOMPropertyOperations.createMarkupForProperty(propKey, propValue);\n }\n if (markup) {\n ret += ' ' + markup;\n }\n }\n }\n\n // For static pages, no need to put React ID and checksum. Saves lots of\n // bytes.\n if (transaction.renderToStaticMarkup) {\n return ret;\n }\n\n if (!this._hostParent) {\n ret += ' ' + DOMPropertyOperations.createMarkupForRoot();\n }\n ret += ' ' + DOMPropertyOperations.createMarkupForID(this._domID);\n return ret;\n },\n\n /**\n * Creates markup for the content between the tags.\n *\n * @private\n * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction\n * @param {object} props\n * @param {object} context\n * @return {string} Content markup.\n */\n _createContentMarkup: function (transaction, props, context) {\n var ret = '';\n\n // Intentional use of != to avoid catching zero/false.\n var innerHTML = props.dangerouslySetInnerHTML;\n if (innerHTML != null) {\n if (innerHTML.__html != null) {\n ret = innerHTML.__html;\n }\n } else {\n var contentToUse = CONTENT_TYPES[typeof props.children] ? props.children : null;\n var childrenToUse = contentToUse != null ? null : props.children;\n if (contentToUse != null) {\n // TODO: Validate that text is allowed as a child of this node\n ret = escapeTextContentForBrowser(contentToUse);\n if (true) {\n setAndValidateContentChildDev.call(this, contentToUse);\n }\n } else if (childrenToUse != null) {\n var mountImages = this.mountChildren(childrenToUse, transaction, context);\n ret = mountImages.join('');\n }\n }\n if (newlineEatingTags[this._tag] && ret.charAt(0) === '\\n') {\n // text/html ignores the first character in these tags if it's a newline\n // Prefer to break application/xml over text/html (for now) by adding\n // a newline specifically to get eaten by the parser. (Alternately for\n // textareas, replacing \"^\\n\" with \"\\r\\n\" doesn't get eaten, and the first\n // \\r is normalized out by HTMLTextAreaElement#value.)\n // See: <http://www.w3.org/TR/html-polyglot/#newlines-in-textarea-and-pre>\n // See: <http://www.w3.org/TR/html5/syntax.html#element-restrictions>\n // See: <http://www.w3.org/TR/html5/syntax.html#newlines>\n // See: Parsing of \"textarea\" \"listing\" and \"pre\" elements\n // from <http://www.w3.org/TR/html5/syntax.html#parsing-main-inbody>\n return '\\n' + ret;\n } else {\n return ret;\n }\n },\n\n _createInitialChildren: function (transaction, props, context, lazyTree) {\n // Intentional use of != to avoid catching zero/false.\n var innerHTML = props.dangerouslySetInnerHTML;\n if (innerHTML != null) {\n if (innerHTML.__html != null) {\n DOMLazyTree.queueHTML(lazyTree, innerHTML.__html);\n }\n } else {\n var contentToUse = CONTENT_TYPES[typeof props.children] ? props.children : null;\n var childrenToUse = contentToUse != null ? null : props.children;\n // TODO: Validate that text is allowed as a child of this node\n if (contentToUse != null) {\n // Avoid setting textContent when the text is empty. In IE11 setting\n // textContent on a text area will cause the placeholder to not\n // show within the textarea until it has been focused and blurred again.\n // https://github.com/facebook/react/issues/6731#issuecomment-254874553\n if (contentToUse !== '') {\n if (true) {\n setAndValidateContentChildDev.call(this, contentToUse);\n }\n DOMLazyTree.queueText(lazyTree, contentToUse);\n }\n } else if (childrenToUse != null) {\n var mountImages = this.mountChildren(childrenToUse, transaction, context);\n for (var i = 0; i < mountImages.length; i++) {\n DOMLazyTree.queueChild(lazyTree, mountImages[i]);\n }\n }\n }\n },\n\n /**\n * Receives a next element and updates the component.\n *\n * @internal\n * @param {ReactElement} nextElement\n * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction\n * @param {object} context\n */\n receiveComponent: function (nextElement, transaction, context) {\n var prevElement = this._currentElement;\n this._currentElement = nextElement;\n this.updateComponent(transaction, prevElement, nextElement, context);\n },\n\n /**\n * Updates a DOM component after it has already been allocated and\n * attached to the DOM. Reconciles the root DOM node, then recurses.\n *\n * @param {ReactReconcileTransaction} transaction\n * @param {ReactElement} prevElement\n * @param {ReactElement} nextElement\n * @internal\n * @overridable\n */\n updateComponent: function (transaction, prevElement, nextElement, context) {\n var lastProps = prevElement.props;\n var nextProps = this._currentElement.props;\n\n switch (this._tag) {\n case 'input':\n lastProps = ReactDOMInput.getHostProps(this, lastProps);\n nextProps = ReactDOMInput.getHostProps(this, nextProps);\n break;\n case 'option':\n lastProps = ReactDOMOption.getHostProps(this, lastProps);\n nextProps = ReactDOMOption.getHostProps(this, nextProps);\n break;\n case 'select':\n lastProps = ReactDOMSelect.getHostProps(this, lastProps);\n nextProps = ReactDOMSelect.getHostProps(this, nextProps);\n break;\n case 'textarea':\n lastProps = ReactDOMTextarea.getHostProps(this, lastProps);\n nextProps = ReactDOMTextarea.getHostProps(this, nextProps);\n break;\n }\n\n assertValidProps(this, nextProps);\n this._updateDOMProperties(lastProps, nextProps, transaction);\n this._updateDOMChildren(lastProps, nextProps, transaction, context);\n\n switch (this._tag) {\n case 'input':\n // Update the wrapper around inputs *after* updating props. This has to\n // happen after `_updateDOMProperties`. Otherwise HTML5 input validations\n // raise warnings and prevent the new value from being assigned.\n ReactDOMInput.updateWrapper(this);\n break;\n case 'textarea':\n ReactDOMTextarea.updateWrapper(this);\n break;\n case 'select':\n // <select> value update needs to occur after <option> children\n // reconciliation\n transaction.getReactMountReady().enqueue(postUpdateSelectWrapper, this);\n break;\n }\n },\n\n /**\n * Reconciles the properties by detecting differences in property values and\n * updating the DOM as necessary. This function is probably the single most\n * critical path for performance optimization.\n *\n * TODO: Benchmark whether checking for changed values in memory actually\n * improves performance (especially statically positioned elements).\n * TODO: Benchmark the effects of putting this at the top since 99% of props\n * do not change for a given reconciliation.\n * TODO: Benchmark areas that can be improved with caching.\n *\n * @private\n * @param {object} lastProps\n * @param {object} nextProps\n * @param {?DOMElement} node\n */\n _updateDOMProperties: function (lastProps, nextProps, transaction) {\n var propKey;\n var styleName;\n var styleUpdates;\n for (propKey in lastProps) {\n if (nextProps.hasOwnProperty(propKey) || !lastProps.hasOwnProperty(propKey) || lastProps[propKey] == null) {\n continue;\n }\n if (propKey === STYLE) {\n var lastStyle = this._previousStyleCopy;\n for (styleName in lastStyle) {\n if (lastStyle.hasOwnProperty(styleName)) {\n styleUpdates = styleUpdates || {};\n styleUpdates[styleName] = '';\n }\n }\n this._previousStyleCopy = null;\n } else if (registrationNameModules.hasOwnProperty(propKey)) {\n if (lastProps[propKey]) {\n // Only call deleteListener if there was a listener previously or\n // else willDeleteListener gets called when there wasn't actually a\n // listener (e.g., onClick={null})\n deleteListener(this, propKey);\n }\n } else if (isCustomComponent(this._tag, lastProps)) {\n if (!RESERVED_PROPS.hasOwnProperty(propKey)) {\n DOMPropertyOperations.deleteValueForAttribute(getNode(this), propKey);\n }\n } else if (DOMProperty.properties[propKey] || DOMProperty.isCustomAttribute(propKey)) {\n DOMPropertyOperations.deleteValueForProperty(getNode(this), propKey);\n }\n }\n for (propKey in nextProps) {\n var nextProp = nextProps[propKey];\n var lastProp = propKey === STYLE ? this._previousStyleCopy : lastProps != null ? lastProps[propKey] : undefined;\n if (!nextProps.hasOwnProperty(propKey) || nextProp === lastProp || nextProp == null && lastProp == null) {\n continue;\n }\n if (propKey === STYLE) {\n if (nextProp) {\n if (true) {\n checkAndWarnForMutatedStyle(this._previousStyleCopy, this._previousStyle, this);\n this._previousStyle = nextProp;\n }\n nextProp = this._previousStyleCopy = _assign({}, nextProp);\n } else {\n this._previousStyleCopy = null;\n }\n if (lastProp) {\n // Unset styles on `lastProp` but not on `nextProp`.\n for (styleName in lastProp) {\n if (lastProp.hasOwnProperty(styleName) && (!nextProp || !nextProp.hasOwnProperty(styleName))) {\n styleUpdates = styleUpdates || {};\n styleUpdates[styleName] = '';\n }\n }\n // Update styles that changed since `lastProp`.\n for (styleName in nextProp) {\n if (nextProp.hasOwnProperty(styleName) && lastProp[styleName] !== nextProp[styleName]) {\n styleUpdates = styleUpdates || {};\n styleUpdates[styleName] = nextProp[styleName];\n }\n }\n } else {\n // Relies on `updateStylesByID` not mutating `styleUpdates`.\n styleUpdates = nextProp;\n }\n } else if (registrationNameModules.hasOwnProperty(propKey)) {\n if (nextProp) {\n enqueuePutListener(this, propKey, nextProp, transaction);\n } else if (lastProp) {\n deleteListener(this, propKey);\n }\n } else if (isCustomComponent(this._tag, nextProps)) {\n if (!RESERVED_PROPS.hasOwnProperty(propKey)) {\n DOMPropertyOperations.setValueForAttribute(getNode(this), propKey, nextProp);\n }\n } else if (DOMProperty.properties[propKey] || DOMProperty.isCustomAttribute(propKey)) {\n var node = getNode(this);\n // If we're updating to null or undefined, we should remove the property\n // from the DOM node instead of inadvertently setting to a string. This\n // brings us in line with the same behavior we have on initial render.\n if (nextProp != null) {\n DOMPropertyOperations.setValueForProperty(node, propKey, nextProp);\n } else {\n DOMPropertyOperations.deleteValueForProperty(node, propKey);\n }\n }\n }\n if (styleUpdates) {\n CSSPropertyOperations.setValueForStyles(getNode(this), styleUpdates, this);\n }\n },\n\n /**\n * Reconciles the children with the various properties that affect the\n * children content.\n *\n * @param {object} lastProps\n * @param {object} nextProps\n * @param {ReactReconcileTransaction} transaction\n * @param {object} context\n */\n _updateDOMChildren: function (lastProps, nextProps, transaction, context) {\n var lastContent = CONTENT_TYPES[typeof lastProps.children] ? lastProps.children : null;\n var nextContent = CONTENT_TYPES[typeof nextProps.children] ? nextProps.children : null;\n\n var lastHtml = lastProps.dangerouslySetInnerHTML && lastProps.dangerouslySetInnerHTML.__html;\n var nextHtml = nextProps.dangerouslySetInnerHTML && nextProps.dangerouslySetInnerHTML.__html;\n\n // Note the use of `!=` which checks for null or undefined.\n var lastChildren = lastContent != null ? null : lastProps.children;\n var nextChildren = nextContent != null ? null : nextProps.children;\n\n // If we're switching from children to content/html or vice versa, remove\n // the old content\n var lastHasContentOrHtml = lastContent != null || lastHtml != null;\n var nextHasContentOrHtml = nextContent != null || nextHtml != null;\n if (lastChildren != null && nextChildren == null) {\n this.updateChildren(null, transaction, context);\n } else if (lastHasContentOrHtml && !nextHasContentOrHtml) {\n this.updateTextContent('');\n if (true) {\n ReactInstrumentation.debugTool.onSetChildren(this._debugID, []);\n }\n }\n\n if (nextContent != null) {\n if (lastContent !== nextContent) {\n this.updateTextContent('' + nextContent);\n if (true) {\n setAndValidateContentChildDev.call(this, nextContent);\n }\n }\n } else if (nextHtml != null) {\n if (lastHtml !== nextHtml) {\n this.updateMarkup('' + nextHtml);\n }\n if (true) {\n ReactInstrumentation.debugTool.onSetChildren(this._debugID, []);\n }\n } else if (nextChildren != null) {\n if (true) {\n setAndValidateContentChildDev.call(this, null);\n }\n\n this.updateChildren(nextChildren, transaction, context);\n }\n },\n\n getHostNode: function () {\n return getNode(this);\n },\n\n /**\n * Destroys all event registrations for this instance. Does not remove from\n * the DOM. That must be done by the parent.\n *\n * @internal\n */\n unmountComponent: function (safely) {\n switch (this._tag) {\n case 'audio':\n case 'form':\n case 'iframe':\n case 'img':\n case 'link':\n case 'object':\n case 'source':\n case 'video':\n var listeners = this._wrapperState.listeners;\n if (listeners) {\n for (var i = 0; i < listeners.length; i++) {\n listeners[i].remove();\n }\n }\n break;\n case 'html':\n case 'head':\n case 'body':\n /**\n * Components like <html> <head> and <body> can't be removed or added\n * easily in a cross-browser way, however it's valuable to be able to\n * take advantage of React's reconciliation for styling and <title>\n * management. So we just document it and throw in dangerous cases.\n */\n true ? true ? invariant(false, '<%s> tried to unmount. Because of cross-browser quirks it is impossible to unmount some top-level components (eg <html>, <head>, and <body>) reliably and efficiently. To fix this, have a single top-level component that never unmounts render these elements.', this._tag) : _prodInvariant('66', this._tag) : void 0;\n break;\n }\n\n this.unmountChildren(safely);\n ReactDOMComponentTree.uncacheNode(this);\n EventPluginHub.deleteAllListeners(this);\n this._rootNodeID = 0;\n this._domID = 0;\n this._wrapperState = null;\n\n if (true) {\n setAndValidateContentChildDev.call(this, null);\n }\n },\n\n getPublicInstance: function () {\n return getNode(this);\n }\n\n};\n\n_assign(ReactDOMComponent.prototype, ReactDOMComponent.Mixin, ReactMultiChild.Mixin);\n\nmodule.exports = ReactDOMComponent;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/ReactDOMComponent.js\n// module id = 1331\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/ReactDOMComponent.js?", + ); + + /***/ + }, + /* 1332 */ + /* unknown exports provided */ + /* all exports used */ + /*!***************************************************!*\ + !*** ./~/react-dom/lib/ReactDOMEmptyComponent.js ***! + \***************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2014-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar _assign = __webpack_require__(/*! object-assign */ 21);\n\nvar DOMLazyTree = __webpack_require__(/*! ./DOMLazyTree */ 100);\nvar ReactDOMComponentTree = __webpack_require__(/*! ./ReactDOMComponentTree */ 24);\n\nvar ReactDOMEmptyComponent = function (instantiate) {\n // ReactCompositeComponent uses this:\n this._currentElement = null;\n // ReactDOMComponentTree uses these:\n this._hostNode = null;\n this._hostParent = null;\n this._hostContainerInfo = null;\n this._domID = 0;\n};\n_assign(ReactDOMEmptyComponent.prototype, {\n mountComponent: function (transaction, hostParent, hostContainerInfo, context) {\n var domID = hostContainerInfo._idCounter++;\n this._domID = domID;\n this._hostParent = hostParent;\n this._hostContainerInfo = hostContainerInfo;\n\n var nodeValue = ' react-empty: ' + this._domID + ' ';\n if (transaction.useCreateElement) {\n var ownerDocument = hostContainerInfo._ownerDocument;\n var node = ownerDocument.createComment(nodeValue);\n ReactDOMComponentTree.precacheNode(this, node);\n return DOMLazyTree(node);\n } else {\n if (transaction.renderToStaticMarkup) {\n // Normally we'd insert a comment node, but since this is a situation\n // where React won't take over (static pages), we can simply return\n // nothing.\n return '';\n }\n return '<!--' + nodeValue + '-->';\n }\n },\n receiveComponent: function () {},\n getHostNode: function () {\n return ReactDOMComponentTree.getNodeFromInstance(this);\n },\n unmountComponent: function () {\n ReactDOMComponentTree.uncacheNode(this);\n }\n});\n\nmodule.exports = ReactDOMEmptyComponent;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/ReactDOMEmptyComponent.js\n// module id = 1332\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/ReactDOMEmptyComponent.js?", + ); + + /***/ + }, + /* 1333 */ + /* unknown exports provided */ + /* all exports used */ + /*!*************************************************!*\ + !*** ./~/react-dom/lib/ReactDOMFeatureFlags.js ***! + \*************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar ReactDOMFeatureFlags = {\n useCreateElement: true,\n useFiber: false\n};\n\nmodule.exports = ReactDOMFeatureFlags;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/ReactDOMFeatureFlags.js\n// module id = 1333\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/ReactDOMFeatureFlags.js?', + ); + + /***/ + }, + /* 1334 */ + /* unknown exports provided */ + /* all exports used */ + /*!*************************************************!*\ + !*** ./~/react-dom/lib/ReactDOMIDOperations.js ***! + \*************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar DOMChildrenOperations = __webpack_require__(/*! ./DOMChildrenOperations */ 245);\nvar ReactDOMComponentTree = __webpack_require__(/*! ./ReactDOMComponentTree */ 24);\n\n/**\n * Operations used to process updates to DOM nodes.\n */\nvar ReactDOMIDOperations = {\n\n /**\n * Updates a component's children by processing a series of updates.\n *\n * @param {array<object>} updates List of update configurations.\n * @internal\n */\n dangerouslyProcessChildrenUpdates: function (parentInst, updates) {\n var node = ReactDOMComponentTree.getNodeFromInstance(parentInst);\n DOMChildrenOperations.processUpdates(node, updates);\n }\n};\n\nmodule.exports = ReactDOMIDOperations;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/ReactDOMIDOperations.js\n// module id = 1334\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/ReactDOMIDOperations.js?", + ); + + /***/ + }, + /* 1335 */ + /* unknown exports provided */ + /* all exports used */ + /*!******************************************!*\ + !*** ./~/react-dom/lib/ReactDOMInput.js ***! + \******************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar _prodInvariant = __webpack_require__(/*! ./reactProdInvariant */ 17),\n _assign = __webpack_require__(/*! object-assign */ 21);\n\nvar DOMPropertyOperations = __webpack_require__(/*! ./DOMPropertyOperations */ 533);\nvar LinkedValueUtils = __webpack_require__(/*! ./LinkedValueUtils */ 249);\nvar ReactDOMComponentTree = __webpack_require__(/*! ./ReactDOMComponentTree */ 24);\nvar ReactUpdates = __webpack_require__(/*! ./ReactUpdates */ 47);\n\nvar invariant = __webpack_require__(/*! fbjs/lib/invariant */ 12);\nvar warning = __webpack_require__(/*! fbjs/lib/warning */ 13);\n\nvar didWarnValueLink = false;\nvar didWarnCheckedLink = false;\nvar didWarnValueDefaultValue = false;\nvar didWarnCheckedDefaultChecked = false;\nvar didWarnControlledToUncontrolled = false;\nvar didWarnUncontrolledToControlled = false;\n\nfunction forceUpdateIfMounted() {\n if (this._rootNodeID) {\n // DOM component is still mounted; update\n ReactDOMInput.updateWrapper(this);\n }\n}\n\nfunction isControlled(props) {\n var usesChecked = props.type === 'checkbox' || props.type === 'radio';\n return usesChecked ? props.checked != null : props.value != null;\n}\n\n/**\n * Implements an <input> host component that allows setting these optional\n * props: `checked`, `value`, `defaultChecked`, and `defaultValue`.\n *\n * If `checked` or `value` are not supplied (or null/undefined), user actions\n * that affect the checked state or value will trigger updates to the element.\n *\n * If they are supplied (and not null/undefined), the rendered element will not\n * trigger updates to the element. Instead, the props must change in order for\n * the rendered element to be updated.\n *\n * The rendered element will be initialized as unchecked (or `defaultChecked`)\n * with an empty value (or `defaultValue`).\n *\n * @see http://www.w3.org/TR/2012/WD-html5-20121025/the-input-element.html\n */\nvar ReactDOMInput = {\n getHostProps: function (inst, props) {\n var value = LinkedValueUtils.getValue(props);\n var checked = LinkedValueUtils.getChecked(props);\n\n var hostProps = _assign({\n // Make sure we set .type before any other properties (setting .value\n // before .type means .value is lost in IE11 and below)\n type: undefined,\n // Make sure we set .step before .value (setting .value before .step\n // means .value is rounded on mount, based upon step precision)\n step: undefined,\n // Make sure we set .min & .max before .value (to ensure proper order\n // in corner cases such as min or max deriving from value, e.g. Issue #7170)\n min: undefined,\n max: undefined\n }, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: value != null ? value : inst._wrapperState.initialValue,\n checked: checked != null ? checked : inst._wrapperState.initialChecked,\n onChange: inst._wrapperState.onChange\n });\n\n return hostProps;\n },\n\n mountWrapper: function (inst, props) {\n if (true) {\n LinkedValueUtils.checkPropTypes('input', props, inst._currentElement._owner);\n\n var owner = inst._currentElement._owner;\n\n if (props.valueLink !== undefined && !didWarnValueLink) {\n true ? warning(false, '`valueLink` prop on `input` is deprecated; set `value` and `onChange` instead.') : void 0;\n didWarnValueLink = true;\n }\n if (props.checkedLink !== undefined && !didWarnCheckedLink) {\n true ? warning(false, '`checkedLink` prop on `input` is deprecated; set `value` and `onChange` instead.') : void 0;\n didWarnCheckedLink = true;\n }\n if (props.checked !== undefined && props.defaultChecked !== undefined && !didWarnCheckedDefaultChecked) {\n true ? warning(false, '%s contains an input of type %s with both checked and defaultChecked props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the checked prop, or the defaultChecked prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components', owner && owner.getName() || 'A component', props.type) : void 0;\n didWarnCheckedDefaultChecked = true;\n }\n if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue) {\n true ? warning(false, '%s contains an input of type %s with both value and defaultValue props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components', owner && owner.getName() || 'A component', props.type) : void 0;\n didWarnValueDefaultValue = true;\n }\n }\n\n var defaultValue = props.defaultValue;\n inst._wrapperState = {\n initialChecked: props.checked != null ? props.checked : props.defaultChecked,\n initialValue: props.value != null ? props.value : defaultValue,\n listeners: null,\n onChange: _handleChange.bind(inst)\n };\n\n if (true) {\n inst._wrapperState.controlled = isControlled(props);\n }\n },\n\n updateWrapper: function (inst) {\n var props = inst._currentElement.props;\n\n if (true) {\n var controlled = isControlled(props);\n var owner = inst._currentElement._owner;\n\n if (!inst._wrapperState.controlled && controlled && !didWarnUncontrolledToControlled) {\n true ? warning(false, '%s is changing an uncontrolled input of type %s to be controlled. ' + 'Input elements should not switch from uncontrolled to controlled (or vice versa). ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components', owner && owner.getName() || 'A component', props.type) : void 0;\n didWarnUncontrolledToControlled = true;\n }\n if (inst._wrapperState.controlled && !controlled && !didWarnControlledToUncontrolled) {\n true ? warning(false, '%s is changing a controlled input of type %s to be uncontrolled. ' + 'Input elements should not switch from controlled to uncontrolled (or vice versa). ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components', owner && owner.getName() || 'A component', props.type) : void 0;\n didWarnControlledToUncontrolled = true;\n }\n }\n\n // TODO: Shouldn't this be getChecked(props)?\n var checked = props.checked;\n if (checked != null) {\n DOMPropertyOperations.setValueForProperty(ReactDOMComponentTree.getNodeFromInstance(inst), 'checked', checked || false);\n }\n\n var node = ReactDOMComponentTree.getNodeFromInstance(inst);\n var value = LinkedValueUtils.getValue(props);\n if (value != null) {\n\n // Cast `value` to a string to ensure the value is set correctly. While\n // browsers typically do this as necessary, jsdom doesn't.\n var newValue = '' + value;\n\n // To avoid side effects (such as losing text selection), only set value if changed\n if (newValue !== node.value) {\n node.value = newValue;\n }\n } else {\n if (props.value == null && props.defaultValue != null) {\n // In Chrome, assigning defaultValue to certain input types triggers input validation.\n // For number inputs, the display value loses trailing decimal points. For email inputs,\n // Chrome raises \"The specified value <x> is not a valid email address\".\n //\n // Here we check to see if the defaultValue has actually changed, avoiding these problems\n // when the user is inputting text\n //\n // https://github.com/facebook/react/issues/7253\n if (node.defaultValue !== '' + props.defaultValue) {\n node.defaultValue = '' + props.defaultValue;\n }\n }\n if (props.checked == null && props.defaultChecked != null) {\n node.defaultChecked = !!props.defaultChecked;\n }\n }\n },\n\n postMountWrapper: function (inst) {\n var props = inst._currentElement.props;\n\n // This is in postMount because we need access to the DOM node, which is not\n // available until after the component has mounted.\n var node = ReactDOMComponentTree.getNodeFromInstance(inst);\n\n // Detach value from defaultValue. We won't do anything if we're working on\n // submit or reset inputs as those values & defaultValues are linked. They\n // are not resetable nodes so this operation doesn't matter and actually\n // removes browser-default values (eg \"Submit Query\") when no value is\n // provided.\n\n switch (props.type) {\n case 'submit':\n case 'reset':\n break;\n case 'color':\n case 'date':\n case 'datetime':\n case 'datetime-local':\n case 'month':\n case 'time':\n case 'week':\n // This fixes the no-show issue on iOS Safari and Android Chrome:\n // https://github.com/facebook/react/issues/7233\n node.value = '';\n node.value = node.defaultValue;\n break;\n default:\n node.value = node.value;\n break;\n }\n\n // Normally, we'd just do `node.checked = node.checked` upon initial mount, less this bug\n // this is needed to work around a chrome bug where setting defaultChecked\n // will sometimes influence the value of checked (even after detachment).\n // Reference: https://bugs.chromium.org/p/chromium/issues/detail?id=608416\n // We need to temporarily unset name to avoid disrupting radio button groups.\n var name = node.name;\n if (name !== '') {\n node.name = '';\n }\n node.defaultChecked = !node.defaultChecked;\n node.defaultChecked = !node.defaultChecked;\n if (name !== '') {\n node.name = name;\n }\n }\n};\n\nfunction _handleChange(event) {\n var props = this._currentElement.props;\n\n var returnValue = LinkedValueUtils.executeOnChange(props, event);\n\n // Here we use asap to wait until all updates have propagated, which\n // is important when using controlled components within layers:\n // https://github.com/facebook/react/issues/1698\n ReactUpdates.asap(forceUpdateIfMounted, this);\n\n var name = props.name;\n if (props.type === 'radio' && name != null) {\n var rootNode = ReactDOMComponentTree.getNodeFromInstance(this);\n var queryRoot = rootNode;\n\n while (queryRoot.parentNode) {\n queryRoot = queryRoot.parentNode;\n }\n\n // If `rootNode.form` was non-null, then we could try `form.elements`,\n // but that sometimes behaves strangely in IE8. We could also try using\n // `form.getElementsByName`, but that will only return direct children\n // and won't include inputs that use the HTML5 `form=` attribute. Since\n // the input might not even be in a form, let's just use the global\n // `querySelectorAll` to ensure we don't miss anything.\n var group = queryRoot.querySelectorAll('input[name=' + JSON.stringify('' + name) + '][type=\"radio\"]');\n\n for (var i = 0; i < group.length; i++) {\n var otherNode = group[i];\n if (otherNode === rootNode || otherNode.form !== rootNode.form) {\n continue;\n }\n // This will throw if radio buttons rendered by different copies of React\n // and the same name are rendered into the same form (same as #1939).\n // That's probably okay; we don't support it just as we don't support\n // mixing React radio buttons with non-React ones.\n var otherInstance = ReactDOMComponentTree.getInstanceFromNode(otherNode);\n !otherInstance ? true ? invariant(false, 'ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.') : _prodInvariant('90') : void 0;\n // If this is a controlled radio button group, forcing the input that\n // was previously checked to update will cause it to be come re-checked\n // as appropriate.\n ReactUpdates.asap(forceUpdateIfMounted, otherInstance);\n }\n }\n\n return returnValue;\n}\n\nmodule.exports = ReactDOMInput;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/ReactDOMInput.js\n// module id = 1335\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/ReactDOMInput.js?", + ); + + /***/ + }, + /* 1336 */ + /* unknown exports provided */ + /* all exports used */ + /*!****************************************************!*\ + !*** ./~/react-dom/lib/ReactDOMInvalidARIAHook.js ***! + \****************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar DOMProperty = __webpack_require__(/*! ./DOMProperty */ 67);\nvar ReactComponentTreeHook = __webpack_require__(/*! react/lib/ReactComponentTreeHook */ 37);\n\nvar warning = __webpack_require__(/*! fbjs/lib/warning */ 13);\n\nvar warnedProperties = {};\nvar rARIA = new RegExp('^(aria)-[' + DOMProperty.ATTRIBUTE_NAME_CHAR + ']*$');\n\nfunction validateProperty(tagName, name, debugID) {\n if (warnedProperties.hasOwnProperty(name) && warnedProperties[name]) {\n return true;\n }\n\n if (rARIA.test(name)) {\n var lowerCasedName = name.toLowerCase();\n var standardName = DOMProperty.getPossibleStandardName.hasOwnProperty(lowerCasedName) ? DOMProperty.getPossibleStandardName[lowerCasedName] : null;\n\n // If this is an aria-* attribute, but is not listed in the known DOM\n // DOM properties, then it is an invalid aria-* attribute.\n if (standardName == null) {\n warnedProperties[name] = true;\n return false;\n }\n // aria-* attributes should be lowercase; suggest the lowercase version.\n if (name !== standardName) {\n true ? warning(false, 'Unknown ARIA attribute %s. Did you mean %s?%s', name, standardName, ReactComponentTreeHook.getStackAddendumByID(debugID)) : void 0;\n warnedProperties[name] = true;\n return true;\n }\n }\n\n return true;\n}\n\nfunction warnInvalidARIAProps(debugID, element) {\n var invalidProps = [];\n\n for (var key in element.props) {\n var isValid = validateProperty(element.type, key, debugID);\n if (!isValid) {\n invalidProps.push(key);\n }\n }\n\n var unknownPropString = invalidProps.map(function (prop) {\n return '`' + prop + '`';\n }).join(', ');\n\n if (invalidProps.length === 1) {\n true ? warning(false, 'Invalid aria prop %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop%s', unknownPropString, element.type, ReactComponentTreeHook.getStackAddendumByID(debugID)) : void 0;\n } else if (invalidProps.length > 1) {\n true ? warning(false, 'Invalid aria props %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop%s', unknownPropString, element.type, ReactComponentTreeHook.getStackAddendumByID(debugID)) : void 0;\n }\n}\n\nfunction handleElement(debugID, element) {\n if (element == null || typeof element.type !== 'string') {\n return;\n }\n if (element.type.indexOf('-') >= 0 || element.props.is) {\n return;\n }\n\n warnInvalidARIAProps(debugID, element);\n}\n\nvar ReactDOMInvalidARIAHook = {\n onBeforeMountComponent: function (debugID, element) {\n if (true) {\n handleElement(debugID, element);\n }\n },\n onBeforeUpdateComponent: function (debugID, element) {\n if (true) {\n handleElement(debugID, element);\n }\n }\n};\n\nmodule.exports = ReactDOMInvalidARIAHook;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/ReactDOMInvalidARIAHook.js\n// module id = 1336\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/ReactDOMInvalidARIAHook.js?", + ); + + /***/ + }, + /* 1337 */ + /* unknown exports provided */ + /* all exports used */ + /*!***********************************************************!*\ + !*** ./~/react-dom/lib/ReactDOMNullInputValuePropHook.js ***! + \***********************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar ReactComponentTreeHook = __webpack_require__(/*! react/lib/ReactComponentTreeHook */ 37);\n\nvar warning = __webpack_require__(/*! fbjs/lib/warning */ 13);\n\nvar didWarnValueNull = false;\n\nfunction handleElement(debugID, element) {\n if (element == null) {\n return;\n }\n if (element.type !== 'input' && element.type !== 'textarea' && element.type !== 'select') {\n return;\n }\n if (element.props != null && element.props.value === null && !didWarnValueNull) {\n true ? warning(false, '`value` prop on `%s` should not be null. ' + 'Consider using the empty string to clear the component or `undefined` ' + 'for uncontrolled components.%s', element.type, ReactComponentTreeHook.getStackAddendumByID(debugID)) : void 0;\n\n didWarnValueNull = true;\n }\n}\n\nvar ReactDOMNullInputValuePropHook = {\n onBeforeMountComponent: function (debugID, element) {\n handleElement(debugID, element);\n },\n onBeforeUpdateComponent: function (debugID, element) {\n handleElement(debugID, element);\n }\n};\n\nmodule.exports = ReactDOMNullInputValuePropHook;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/ReactDOMNullInputValuePropHook.js\n// module id = 1337\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/ReactDOMNullInputValuePropHook.js?", + ); + + /***/ + }, + /* 1338 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************************!*\ + !*** ./~/react-dom/lib/ReactDOMOption.js ***! + \*******************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar _assign = __webpack_require__(/*! object-assign */ 21);\n\nvar React = __webpack_require__(/*! react/lib/React */ 83);\nvar ReactDOMComponentTree = __webpack_require__(/*! ./ReactDOMComponentTree */ 24);\nvar ReactDOMSelect = __webpack_require__(/*! ./ReactDOMSelect */ 536);\n\nvar warning = __webpack_require__(/*! fbjs/lib/warning */ 13);\nvar didWarnInvalidOptionChildren = false;\n\nfunction flattenChildren(children) {\n var content = '';\n\n // Flatten children and warn if they aren't strings or numbers;\n // invalid types are ignored.\n React.Children.forEach(children, function (child) {\n if (child == null) {\n return;\n }\n if (typeof child === 'string' || typeof child === 'number') {\n content += child;\n } else if (!didWarnInvalidOptionChildren) {\n didWarnInvalidOptionChildren = true;\n true ? warning(false, 'Only strings and numbers are supported as <option> children.') : void 0;\n }\n });\n\n return content;\n}\n\n/**\n * Implements an <option> host component that warns when `selected` is set.\n */\nvar ReactDOMOption = {\n mountWrapper: function (inst, props, hostParent) {\n // TODO (yungsters): Remove support for `selected` in <option>.\n if (true) {\n true ? warning(props.selected == null, 'Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.') : void 0;\n }\n\n // Look up whether this option is 'selected'\n var selectValue = null;\n if (hostParent != null) {\n var selectParent = hostParent;\n\n if (selectParent._tag === 'optgroup') {\n selectParent = selectParent._hostParent;\n }\n\n if (selectParent != null && selectParent._tag === 'select') {\n selectValue = ReactDOMSelect.getSelectValueContext(selectParent);\n }\n }\n\n // If the value is null (e.g., no specified value or after initial mount)\n // or missing (e.g., for <datalist>), we don't change props.selected\n var selected = null;\n if (selectValue != null) {\n var value;\n if (props.value != null) {\n value = props.value + '';\n } else {\n value = flattenChildren(props.children);\n }\n selected = false;\n if (Array.isArray(selectValue)) {\n // multiple\n for (var i = 0; i < selectValue.length; i++) {\n if ('' + selectValue[i] === value) {\n selected = true;\n break;\n }\n }\n } else {\n selected = '' + selectValue === value;\n }\n }\n\n inst._wrapperState = { selected: selected };\n },\n\n postMountWrapper: function (inst) {\n // value=\"\" should make a value attribute (#6219)\n var props = inst._currentElement.props;\n if (props.value != null) {\n var node = ReactDOMComponentTree.getNodeFromInstance(inst);\n node.setAttribute('value', props.value);\n }\n },\n\n getHostProps: function (inst, props) {\n var hostProps = _assign({ selected: undefined, children: undefined }, props);\n\n // Read state only from initial mount because <select> updates value\n // manually; we need the initial state only for server rendering\n if (inst._wrapperState.selected != null) {\n hostProps.selected = inst._wrapperState.selected;\n }\n\n var content = flattenChildren(props.children);\n\n if (content) {\n hostProps.children = content;\n }\n\n return hostProps;\n }\n\n};\n\nmodule.exports = ReactDOMOption;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/ReactDOMOption.js\n// module id = 1338\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/ReactDOMOption.js?", + ); + + /***/ + }, + /* 1339 */ + /* unknown exports provided */ + /* all exports used */ + /*!**********************************************!*\ + !*** ./~/react-dom/lib/ReactDOMSelection.js ***! + \**********************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar ExecutionEnvironment = __webpack_require__(/*! fbjs/lib/ExecutionEnvironment */ 27);\n\nvar getNodeForCharacterOffset = __webpack_require__(/*! ./getNodeForCharacterOffset */ 1381);\nvar getTextContentAccessor = __webpack_require__(/*! ./getTextContentAccessor */ 553);\n\n/**\n * While `isCollapsed` is available on the Selection object and `collapsed`\n * is available on the Range object, IE11 sometimes gets them wrong.\n * If the anchor/focus nodes and offsets are the same, the range is collapsed.\n */\nfunction isCollapsed(anchorNode, anchorOffset, focusNode, focusOffset) {\n return anchorNode === focusNode && anchorOffset === focusOffset;\n}\n\n/**\n * Get the appropriate anchor and focus node/offset pairs for IE.\n *\n * The catch here is that IE's selection API doesn't provide information\n * about whether the selection is forward or backward, so we have to\n * behave as though it's always forward.\n *\n * IE text differs from modern selection in that it behaves as though\n * block elements end with a new line. This means character offsets will\n * differ between the two APIs.\n *\n * @param {DOMElement} node\n * @return {object}\n */\nfunction getIEOffsets(node) {\n var selection = document.selection;\n var selectedRange = selection.createRange();\n var selectedLength = selectedRange.text.length;\n\n // Duplicate selection so we can move range without breaking user selection.\n var fromStart = selectedRange.duplicate();\n fromStart.moveToElementText(node);\n fromStart.setEndPoint('EndToStart', selectedRange);\n\n var startOffset = fromStart.text.length;\n var endOffset = startOffset + selectedLength;\n\n return {\n start: startOffset,\n end: endOffset\n };\n}\n\n/**\n * @param {DOMElement} node\n * @return {?object}\n */\nfunction getModernOffsets(node) {\n var selection = window.getSelection && window.getSelection();\n\n if (!selection || selection.rangeCount === 0) {\n return null;\n }\n\n var anchorNode = selection.anchorNode;\n var anchorOffset = selection.anchorOffset;\n var focusNode = selection.focusNode;\n var focusOffset = selection.focusOffset;\n\n var currentRange = selection.getRangeAt(0);\n\n // In Firefox, range.startContainer and range.endContainer can be \"anonymous\n // divs\", e.g. the up/down buttons on an <input type=\"number\">. Anonymous\n // divs do not seem to expose properties, triggering a \"Permission denied\n // error\" if any of its properties are accessed. The only seemingly possible\n // way to avoid erroring is to access a property that typically works for\n // non-anonymous divs and catch any error that may otherwise arise. See\n // https://bugzilla.mozilla.org/show_bug.cgi?id=208427\n try {\n /* eslint-disable no-unused-expressions */\n currentRange.startContainer.nodeType;\n currentRange.endContainer.nodeType;\n /* eslint-enable no-unused-expressions */\n } catch (e) {\n return null;\n }\n\n // If the node and offset values are the same, the selection is collapsed.\n // `Selection.isCollapsed` is available natively, but IE sometimes gets\n // this value wrong.\n var isSelectionCollapsed = isCollapsed(selection.anchorNode, selection.anchorOffset, selection.focusNode, selection.focusOffset);\n\n var rangeLength = isSelectionCollapsed ? 0 : currentRange.toString().length;\n\n var tempRange = currentRange.cloneRange();\n tempRange.selectNodeContents(node);\n tempRange.setEnd(currentRange.startContainer, currentRange.startOffset);\n\n var isTempRangeCollapsed = isCollapsed(tempRange.startContainer, tempRange.startOffset, tempRange.endContainer, tempRange.endOffset);\n\n var start = isTempRangeCollapsed ? 0 : tempRange.toString().length;\n var end = start + rangeLength;\n\n // Detect whether the selection is backward.\n var detectionRange = document.createRange();\n detectionRange.setStart(anchorNode, anchorOffset);\n detectionRange.setEnd(focusNode, focusOffset);\n var isBackward = detectionRange.collapsed;\n\n return {\n start: isBackward ? end : start,\n end: isBackward ? start : end\n };\n}\n\n/**\n * @param {DOMElement|DOMTextNode} node\n * @param {object} offsets\n */\nfunction setIEOffsets(node, offsets) {\n var range = document.selection.createRange().duplicate();\n var start, end;\n\n if (offsets.end === undefined) {\n start = offsets.start;\n end = start;\n } else if (offsets.start > offsets.end) {\n start = offsets.end;\n end = offsets.start;\n } else {\n start = offsets.start;\n end = offsets.end;\n }\n\n range.moveToElementText(node);\n range.moveStart('character', start);\n range.setEndPoint('EndToStart', range);\n range.moveEnd('character', end - start);\n range.select();\n}\n\n/**\n * In modern non-IE browsers, we can support both forward and backward\n * selections.\n *\n * Note: IE10+ supports the Selection object, but it does not support\n * the `extend` method, which means that even in modern IE, it's not possible\n * to programmatically create a backward selection. Thus, for all IE\n * versions, we use the old IE API to create our selections.\n *\n * @param {DOMElement|DOMTextNode} node\n * @param {object} offsets\n */\nfunction setModernOffsets(node, offsets) {\n if (!window.getSelection) {\n return;\n }\n\n var selection = window.getSelection();\n var length = node[getTextContentAccessor()].length;\n var start = Math.min(offsets.start, length);\n var end = offsets.end === undefined ? start : Math.min(offsets.end, length);\n\n // IE 11 uses modern selection, but doesn't support the extend method.\n // Flip backward selections, so we can set with a single range.\n if (!selection.extend && start > end) {\n var temp = end;\n end = start;\n start = temp;\n }\n\n var startMarker = getNodeForCharacterOffset(node, start);\n var endMarker = getNodeForCharacterOffset(node, end);\n\n if (startMarker && endMarker) {\n var range = document.createRange();\n range.setStart(startMarker.node, startMarker.offset);\n selection.removeAllRanges();\n\n if (start > end) {\n selection.addRange(range);\n selection.extend(endMarker.node, endMarker.offset);\n } else {\n range.setEnd(endMarker.node, endMarker.offset);\n selection.addRange(range);\n }\n }\n}\n\nvar useIEOffsets = ExecutionEnvironment.canUseDOM && 'selection' in document && !('getSelection' in window);\n\nvar ReactDOMSelection = {\n /**\n * @param {DOMElement} node\n */\n getOffsets: useIEOffsets ? getIEOffsets : getModernOffsets,\n\n /**\n * @param {DOMElement|DOMTextNode} node\n * @param {object} offsets\n */\n setOffsets: useIEOffsets ? setIEOffsets : setModernOffsets\n};\n\nmodule.exports = ReactDOMSelection;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/ReactDOMSelection.js\n// module id = 1339\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/ReactDOMSelection.js?", + ); + + /***/ + }, + /* 1340 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************************!*\ + !*** ./~/react-dom/lib/ReactDOMServer.js ***! + \*******************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar ReactDefaultInjection = __webpack_require__(/*! ./ReactDefaultInjection */ 538);\nvar ReactServerRendering = __webpack_require__(/*! ./ReactServerRendering */ 1358);\nvar ReactVersion = __webpack_require__(/*! ./ReactVersion */ 548);\n\nReactDefaultInjection.inject();\n\nvar ReactDOMServer = {\n renderToString: ReactServerRendering.renderToString,\n renderToStaticMarkup: ReactServerRendering.renderToStaticMarkup,\n version: ReactVersion\n};\n\nmodule.exports = ReactDOMServer;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/ReactDOMServer.js\n// module id = 1340\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/ReactDOMServer.js?', + ); + + /***/ + }, + /* 1341 */ + /* unknown exports provided */ + /* all exports used */ + /*!**************************************************!*\ + !*** ./~/react-dom/lib/ReactDOMTextComponent.js ***! + \**************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar _prodInvariant = __webpack_require__(/*! ./reactProdInvariant */ 17),\n _assign = __webpack_require__(/*! object-assign */ 21);\n\nvar DOMChildrenOperations = __webpack_require__(/*! ./DOMChildrenOperations */ 245);\nvar DOMLazyTree = __webpack_require__(/*! ./DOMLazyTree */ 100);\nvar ReactDOMComponentTree = __webpack_require__(/*! ./ReactDOMComponentTree */ 24);\n\nvar escapeTextContentForBrowser = __webpack_require__(/*! ./escapeTextContentForBrowser */ 172);\nvar invariant = __webpack_require__(/*! fbjs/lib/invariant */ 12);\nvar validateDOMNesting = __webpack_require__(/*! ./validateDOMNesting */ 260);\n\n/**\n * Text nodes violate a couple assumptions that React makes about components:\n *\n * - When mounting text into the DOM, adjacent text nodes are merged.\n * - Text nodes cannot be assigned a React root ID.\n *\n * This component is used to wrap strings between comment nodes so that they\n * can undergo the same reconciliation that is applied to elements.\n *\n * TODO: Investigate representing React components in the DOM with text nodes.\n *\n * @class ReactDOMTextComponent\n * @extends ReactComponent\n * @internal\n */\nvar ReactDOMTextComponent = function (text) {\n // TODO: This is really a ReactText (ReactNode), not a ReactElement\n this._currentElement = text;\n this._stringText = '' + text;\n // ReactDOMComponentTree uses these:\n this._hostNode = null;\n this._hostParent = null;\n\n // Properties\n this._domID = 0;\n this._mountIndex = 0;\n this._closingComment = null;\n this._commentNodes = null;\n};\n\n_assign(ReactDOMTextComponent.prototype, {\n\n /**\n * Creates the markup for this text node. This node is not intended to have\n * any features besides containing text content.\n *\n * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction\n * @return {string} Markup for this text node.\n * @internal\n */\n mountComponent: function (transaction, hostParent, hostContainerInfo, context) {\n if (true) {\n var parentInfo;\n if (hostParent != null) {\n parentInfo = hostParent._ancestorInfo;\n } else if (hostContainerInfo != null) {\n parentInfo = hostContainerInfo._ancestorInfo;\n }\n if (parentInfo) {\n // parentInfo should always be present except for the top-level\n // component when server rendering\n validateDOMNesting(null, this._stringText, this, parentInfo);\n }\n }\n\n var domID = hostContainerInfo._idCounter++;\n var openingValue = ' react-text: ' + domID + ' ';\n var closingValue = ' /react-text ';\n this._domID = domID;\n this._hostParent = hostParent;\n if (transaction.useCreateElement) {\n var ownerDocument = hostContainerInfo._ownerDocument;\n var openingComment = ownerDocument.createComment(openingValue);\n var closingComment = ownerDocument.createComment(closingValue);\n var lazyTree = DOMLazyTree(ownerDocument.createDocumentFragment());\n DOMLazyTree.queueChild(lazyTree, DOMLazyTree(openingComment));\n if (this._stringText) {\n DOMLazyTree.queueChild(lazyTree, DOMLazyTree(ownerDocument.createTextNode(this._stringText)));\n }\n DOMLazyTree.queueChild(lazyTree, DOMLazyTree(closingComment));\n ReactDOMComponentTree.precacheNode(this, openingComment);\n this._closingComment = closingComment;\n return lazyTree;\n } else {\n var escapedText = escapeTextContentForBrowser(this._stringText);\n\n if (transaction.renderToStaticMarkup) {\n // Normally we'd wrap this between comment nodes for the reasons stated\n // above, but since this is a situation where React won't take over\n // (static pages), we can simply return the text as it is.\n return escapedText;\n }\n\n return '<!--' + openingValue + '-->' + escapedText + '<!--' + closingValue + '-->';\n }\n },\n\n /**\n * Updates this component by updating the text content.\n *\n * @param {ReactText} nextText The next text content\n * @param {ReactReconcileTransaction} transaction\n * @internal\n */\n receiveComponent: function (nextText, transaction) {\n if (nextText !== this._currentElement) {\n this._currentElement = nextText;\n var nextStringText = '' + nextText;\n if (nextStringText !== this._stringText) {\n // TODO: Save this as pending props and use performUpdateIfNecessary\n // and/or updateComponent to do the actual update for consistency with\n // other component types?\n this._stringText = nextStringText;\n var commentNodes = this.getHostNode();\n DOMChildrenOperations.replaceDelimitedText(commentNodes[0], commentNodes[1], nextStringText);\n }\n }\n },\n\n getHostNode: function () {\n var hostNode = this._commentNodes;\n if (hostNode) {\n return hostNode;\n }\n if (!this._closingComment) {\n var openingComment = ReactDOMComponentTree.getNodeFromInstance(this);\n var node = openingComment.nextSibling;\n while (true) {\n !(node != null) ? true ? invariant(false, 'Missing closing comment for text component %s', this._domID) : _prodInvariant('67', this._domID) : void 0;\n if (node.nodeType === 8 && node.nodeValue === ' /react-text ') {\n this._closingComment = node;\n break;\n }\n node = node.nextSibling;\n }\n }\n hostNode = [this._hostNode, this._closingComment];\n this._commentNodes = hostNode;\n return hostNode;\n },\n\n unmountComponent: function () {\n this._closingComment = null;\n this._commentNodes = null;\n ReactDOMComponentTree.uncacheNode(this);\n }\n\n});\n\nmodule.exports = ReactDOMTextComponent;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/ReactDOMTextComponent.js\n// module id = 1341\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/ReactDOMTextComponent.js?", + ); + + /***/ + }, + /* 1342 */ + /* unknown exports provided */ + /* all exports used */ + /*!*********************************************!*\ + !*** ./~/react-dom/lib/ReactDOMTextarea.js ***! + \*********************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar _prodInvariant = __webpack_require__(/*! ./reactProdInvariant */ 17),\n _assign = __webpack_require__(/*! object-assign */ 21);\n\nvar LinkedValueUtils = __webpack_require__(/*! ./LinkedValueUtils */ 249);\nvar ReactDOMComponentTree = __webpack_require__(/*! ./ReactDOMComponentTree */ 24);\nvar ReactUpdates = __webpack_require__(/*! ./ReactUpdates */ 47);\n\nvar invariant = __webpack_require__(/*! fbjs/lib/invariant */ 12);\nvar warning = __webpack_require__(/*! fbjs/lib/warning */ 13);\n\nvar didWarnValueLink = false;\nvar didWarnValDefaultVal = false;\n\nfunction forceUpdateIfMounted() {\n if (this._rootNodeID) {\n // DOM component is still mounted; update\n ReactDOMTextarea.updateWrapper(this);\n }\n}\n\n/**\n * Implements a <textarea> host component that allows setting `value`, and\n * `defaultValue`. This differs from the traditional DOM API because value is\n * usually set as PCDATA children.\n *\n * If `value` is not supplied (or null/undefined), user actions that affect the\n * value will trigger updates to the element.\n *\n * If `value` is supplied (and not null/undefined), the rendered element will\n * not trigger updates to the element. Instead, the `value` prop must change in\n * order for the rendered element to be updated.\n *\n * The rendered element will be initialized with an empty value, the prop\n * `defaultValue` if specified, or the children content (deprecated).\n */\nvar ReactDOMTextarea = {\n getHostProps: function (inst, props) {\n !(props.dangerouslySetInnerHTML == null) ? true ? invariant(false, '`dangerouslySetInnerHTML` does not make sense on <textarea>.') : _prodInvariant('91') : void 0;\n\n // Always set children to the same thing. In IE9, the selection range will\n // get reset if `textContent` is mutated. We could add a check in setTextContent\n // to only set the value if/when the value differs from the node value (which would\n // completely solve this IE9 bug), but Sebastian+Ben seemed to like this solution.\n // The value can be a boolean or object so that's why it's forced to be a string.\n var hostProps = _assign({}, props, {\n value: undefined,\n defaultValue: undefined,\n children: '' + inst._wrapperState.initialValue,\n onChange: inst._wrapperState.onChange\n });\n\n return hostProps;\n },\n\n mountWrapper: function (inst, props) {\n if (true) {\n LinkedValueUtils.checkPropTypes('textarea', props, inst._currentElement._owner);\n if (props.valueLink !== undefined && !didWarnValueLink) {\n true ? warning(false, '`valueLink` prop on `textarea` is deprecated; set `value` and `onChange` instead.') : void 0;\n didWarnValueLink = true;\n }\n if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValDefaultVal) {\n true ? warning(false, 'Textarea elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled textarea ' + 'and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components') : void 0;\n didWarnValDefaultVal = true;\n }\n }\n\n var value = LinkedValueUtils.getValue(props);\n var initialValue = value;\n\n // Only bother fetching default value if we're going to use it\n if (value == null) {\n var defaultValue = props.defaultValue;\n // TODO (yungsters): Remove support for children content in <textarea>.\n var children = props.children;\n if (children != null) {\n if (true) {\n true ? warning(false, 'Use the `defaultValue` or `value` props instead of setting ' + 'children on <textarea>.') : void 0;\n }\n !(defaultValue == null) ? true ? invariant(false, 'If you supply `defaultValue` on a <textarea>, do not pass children.') : _prodInvariant('92') : void 0;\n if (Array.isArray(children)) {\n !(children.length <= 1) ? true ? invariant(false, '<textarea> can only have at most one child.') : _prodInvariant('93') : void 0;\n children = children[0];\n }\n\n defaultValue = '' + children;\n }\n if (defaultValue == null) {\n defaultValue = '';\n }\n initialValue = defaultValue;\n }\n\n inst._wrapperState = {\n initialValue: '' + initialValue,\n listeners: null,\n onChange: _handleChange.bind(inst)\n };\n },\n\n updateWrapper: function (inst) {\n var props = inst._currentElement.props;\n\n var node = ReactDOMComponentTree.getNodeFromInstance(inst);\n var value = LinkedValueUtils.getValue(props);\n if (value != null) {\n // Cast `value` to a string to ensure the value is set correctly. While\n // browsers typically do this as necessary, jsdom doesn't.\n var newValue = '' + value;\n\n // To avoid side effects (such as losing text selection), only set value if changed\n if (newValue !== node.value) {\n node.value = newValue;\n }\n if (props.defaultValue == null) {\n node.defaultValue = newValue;\n }\n }\n if (props.defaultValue != null) {\n node.defaultValue = props.defaultValue;\n }\n },\n\n postMountWrapper: function (inst) {\n // This is in postMount because we need access to the DOM node, which is not\n // available until after the component has mounted.\n var node = ReactDOMComponentTree.getNodeFromInstance(inst);\n var textContent = node.textContent;\n\n // Only set node.value if textContent is equal to the expected\n // initial value. In IE10/IE11 there is a bug where the placeholder attribute\n // will populate textContent as well.\n // https://developer.microsoft.com/microsoft-edge/platform/issues/101525/\n if (textContent === inst._wrapperState.initialValue) {\n node.value = textContent;\n }\n }\n};\n\nfunction _handleChange(event) {\n var props = this._currentElement.props;\n var returnValue = LinkedValueUtils.executeOnChange(props, event);\n ReactUpdates.asap(forceUpdateIfMounted, this);\n return returnValue;\n}\n\nmodule.exports = ReactDOMTextarea;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/ReactDOMTextarea.js\n// module id = 1342\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/ReactDOMTextarea.js?", + ); + + /***/ + }, + /* 1343 */ + /* unknown exports provided */ + /* all exports used */ + /*!**************************************************!*\ + !*** ./~/react-dom/lib/ReactDOMTreeTraversal.js ***! + \**************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2015-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar _prodInvariant = __webpack_require__(/*! ./reactProdInvariant */ 17);\n\nvar invariant = __webpack_require__(/*! fbjs/lib/invariant */ 12);\n\n/**\n * Return the lowest common ancestor of A and B, or null if they are in\n * different trees.\n */\nfunction getLowestCommonAncestor(instA, instB) {\n !('_hostNode' in instA) ? true ? invariant(false, 'getNodeFromInstance: Invalid argument.') : _prodInvariant('33') : void 0;\n !('_hostNode' in instB) ? true ? invariant(false, 'getNodeFromInstance: Invalid argument.') : _prodInvariant('33') : void 0;\n\n var depthA = 0;\n for (var tempA = instA; tempA; tempA = tempA._hostParent) {\n depthA++;\n }\n var depthB = 0;\n for (var tempB = instB; tempB; tempB = tempB._hostParent) {\n depthB++;\n }\n\n // If A is deeper, crawl up.\n while (depthA - depthB > 0) {\n instA = instA._hostParent;\n depthA--;\n }\n\n // If B is deeper, crawl up.\n while (depthB - depthA > 0) {\n instB = instB._hostParent;\n depthB--;\n }\n\n // Walk in lockstep until we find a match.\n var depth = depthA;\n while (depth--) {\n if (instA === instB) {\n return instA;\n }\n instA = instA._hostParent;\n instB = instB._hostParent;\n }\n return null;\n}\n\n/**\n * Return if A is an ancestor of B.\n */\nfunction isAncestor(instA, instB) {\n !('_hostNode' in instA) ? true ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n !('_hostNode' in instB) ? true ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;\n\n while (instB) {\n if (instB === instA) {\n return true;\n }\n instB = instB._hostParent;\n }\n return false;\n}\n\n/**\n * Return the parent instance of the passed-in instance.\n */\nfunction getParentInstance(inst) {\n !('_hostNode' in inst) ? true ? invariant(false, 'getParentInstance: Invalid argument.') : _prodInvariant('36') : void 0;\n\n return inst._hostParent;\n}\n\n/**\n * Simulates the traversal of a two-phase, capture/bubble event dispatch.\n */\nfunction traverseTwoPhase(inst, fn, arg) {\n var path = [];\n while (inst) {\n path.push(inst);\n inst = inst._hostParent;\n }\n var i;\n for (i = path.length; i-- > 0;) {\n fn(path[i], 'captured', arg);\n }\n for (i = 0; i < path.length; i++) {\n fn(path[i], 'bubbled', arg);\n }\n}\n\n/**\n * Traverses the ID hierarchy and invokes the supplied `cb` on any IDs that\n * should would receive a `mouseEnter` or `mouseLeave` event.\n *\n * Does not invoke the callback on the nearest common ancestor because nothing\n * \"entered\" or \"left\" that element.\n */\nfunction traverseEnterLeave(from, to, fn, argFrom, argTo) {\n var common = from && to ? getLowestCommonAncestor(from, to) : null;\n var pathFrom = [];\n while (from && from !== common) {\n pathFrom.push(from);\n from = from._hostParent;\n }\n var pathTo = [];\n while (to && to !== common) {\n pathTo.push(to);\n to = to._hostParent;\n }\n var i;\n for (i = 0; i < pathFrom.length; i++) {\n fn(pathFrom[i], 'bubbled', argFrom);\n }\n for (i = pathTo.length; i-- > 0;) {\n fn(pathTo[i], 'captured', argTo);\n }\n}\n\nmodule.exports = {\n isAncestor: isAncestor,\n getLowestCommonAncestor: getLowestCommonAncestor,\n getParentInstance: getParentInstance,\n traverseTwoPhase: traverseTwoPhase,\n traverseEnterLeave: traverseEnterLeave\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/ReactDOMTreeTraversal.js\n// module id = 1343\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/ReactDOMTreeTraversal.js?", + ); + + /***/ + }, + /* 1344 */ + /* unknown exports provided */ + /* all exports used */ + /*!********************************************************!*\ + !*** ./~/react-dom/lib/ReactDOMUnknownPropertyHook.js ***! + \********************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar DOMProperty = __webpack_require__(/*! ./DOMProperty */ 67);\nvar EventPluginRegistry = __webpack_require__(/*! ./EventPluginRegistry */ 168);\nvar ReactComponentTreeHook = __webpack_require__(/*! react/lib/ReactComponentTreeHook */ 37);\n\nvar warning = __webpack_require__(/*! fbjs/lib/warning */ 13);\n\nif (true) {\n var reactProps = {\n children: true,\n dangerouslySetInnerHTML: true,\n key: true,\n ref: true,\n\n autoFocus: true,\n defaultValue: true,\n valueLink: true,\n defaultChecked: true,\n checkedLink: true,\n innerHTML: true,\n suppressContentEditableWarning: true,\n onFocusIn: true,\n onFocusOut: true\n };\n var warnedProperties = {};\n\n var validateProperty = function (tagName, name, debugID) {\n if (DOMProperty.properties.hasOwnProperty(name) || DOMProperty.isCustomAttribute(name)) {\n return true;\n }\n if (reactProps.hasOwnProperty(name) && reactProps[name] || warnedProperties.hasOwnProperty(name) && warnedProperties[name]) {\n return true;\n }\n if (EventPluginRegistry.registrationNameModules.hasOwnProperty(name)) {\n return true;\n }\n warnedProperties[name] = true;\n var lowerCasedName = name.toLowerCase();\n\n // data-* attributes should be lowercase; suggest the lowercase version\n var standardName = DOMProperty.isCustomAttribute(lowerCasedName) ? lowerCasedName : DOMProperty.getPossibleStandardName.hasOwnProperty(lowerCasedName) ? DOMProperty.getPossibleStandardName[lowerCasedName] : null;\n\n var registrationName = EventPluginRegistry.possibleRegistrationNames.hasOwnProperty(lowerCasedName) ? EventPluginRegistry.possibleRegistrationNames[lowerCasedName] : null;\n\n if (standardName != null) {\n true ? warning(false, 'Unknown DOM property %s. Did you mean %s?%s', name, standardName, ReactComponentTreeHook.getStackAddendumByID(debugID)) : void 0;\n return true;\n } else if (registrationName != null) {\n true ? warning(false, 'Unknown event handler property %s. Did you mean `%s`?%s', name, registrationName, ReactComponentTreeHook.getStackAddendumByID(debugID)) : void 0;\n return true;\n } else {\n // We were unable to guess which prop the user intended.\n // It is likely that the user was just blindly spreading/forwarding props\n // Components should be careful to only render valid props/attributes.\n // Warning will be invoked in warnUnknownProperties to allow grouping.\n return false;\n }\n };\n}\n\nvar warnUnknownProperties = function (debugID, element) {\n var unknownProps = [];\n for (var key in element.props) {\n var isValid = validateProperty(element.type, key, debugID);\n if (!isValid) {\n unknownProps.push(key);\n }\n }\n\n var unknownPropString = unknownProps.map(function (prop) {\n return '`' + prop + '`';\n }).join(', ');\n\n if (unknownProps.length === 1) {\n true ? warning(false, 'Unknown prop %s on <%s> tag. Remove this prop from the element. ' + 'For details, see https://fb.me/react-unknown-prop%s', unknownPropString, element.type, ReactComponentTreeHook.getStackAddendumByID(debugID)) : void 0;\n } else if (unknownProps.length > 1) {\n true ? warning(false, 'Unknown props %s on <%s> tag. Remove these props from the element. ' + 'For details, see https://fb.me/react-unknown-prop%s', unknownPropString, element.type, ReactComponentTreeHook.getStackAddendumByID(debugID)) : void 0;\n }\n};\n\nfunction handleElement(debugID, element) {\n if (element == null || typeof element.type !== 'string') {\n return;\n }\n if (element.type.indexOf('-') >= 0 || element.props.is) {\n return;\n }\n warnUnknownProperties(debugID, element);\n}\n\nvar ReactDOMUnknownPropertyHook = {\n onBeforeMountComponent: function (debugID, element) {\n handleElement(debugID, element);\n },\n onBeforeUpdateComponent: function (debugID, element) {\n handleElement(debugID, element);\n }\n};\n\nmodule.exports = ReactDOMUnknownPropertyHook;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/ReactDOMUnknownPropertyHook.js\n// module id = 1344\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/ReactDOMUnknownPropertyHook.js?", + ); + + /***/ + }, + /* 1345 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************************!*\ + !*** ./~/react-dom/lib/ReactDebugTool.js ***! + \*******************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2016-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * \n */\n\n\n\nvar ReactInvalidSetStateWarningHook = __webpack_require__(/*! ./ReactInvalidSetStateWarningHook */ 1351);\nvar ReactHostOperationHistoryHook = __webpack_require__(/*! ./ReactHostOperationHistoryHook */ 1349);\nvar ReactComponentTreeHook = __webpack_require__(/*! react/lib/ReactComponentTreeHook */ 37);\nvar ExecutionEnvironment = __webpack_require__(/*! fbjs/lib/ExecutionEnvironment */ 27);\n\nvar performanceNow = __webpack_require__(/*! fbjs/lib/performanceNow */ 1138);\nvar warning = __webpack_require__(/*! fbjs/lib/warning */ 13);\n\nvar hooks = [];\nvar didHookThrowForEvent = {};\n\nfunction callHook(event, fn, context, arg1, arg2, arg3, arg4, arg5) {\n try {\n fn.call(context, arg1, arg2, arg3, arg4, arg5);\n } catch (e) {\n true ? warning(didHookThrowForEvent[event], 'Exception thrown by hook while handling %s: %s', event, e + '\\n' + e.stack) : void 0;\n didHookThrowForEvent[event] = true;\n }\n}\n\nfunction emitEvent(event, arg1, arg2, arg3, arg4, arg5) {\n for (var i = 0; i < hooks.length; i++) {\n var hook = hooks[i];\n var fn = hook[event];\n if (fn) {\n callHook(event, fn, hook, arg1, arg2, arg3, arg4, arg5);\n }\n }\n}\n\nvar isProfiling = false;\nvar flushHistory = [];\nvar lifeCycleTimerStack = [];\nvar currentFlushNesting = 0;\nvar currentFlushMeasurements = [];\nvar currentFlushStartTime = 0;\nvar currentTimerDebugID = null;\nvar currentTimerStartTime = 0;\nvar currentTimerNestedFlushDuration = 0;\nvar currentTimerType = null;\n\nvar lifeCycleTimerHasWarned = false;\n\nfunction clearHistory() {\n ReactComponentTreeHook.purgeUnmountedComponents();\n ReactHostOperationHistoryHook.clearHistory();\n}\n\nfunction getTreeSnapshot(registeredIDs) {\n return registeredIDs.reduce(function (tree, id) {\n var ownerID = ReactComponentTreeHook.getOwnerID(id);\n var parentID = ReactComponentTreeHook.getParentID(id);\n tree[id] = {\n displayName: ReactComponentTreeHook.getDisplayName(id),\n text: ReactComponentTreeHook.getText(id),\n updateCount: ReactComponentTreeHook.getUpdateCount(id),\n childIDs: ReactComponentTreeHook.getChildIDs(id),\n // Text nodes don't have owners but this is close enough.\n ownerID: ownerID || parentID && ReactComponentTreeHook.getOwnerID(parentID) || 0,\n parentID: parentID\n };\n return tree;\n }, {});\n}\n\nfunction resetMeasurements() {\n var previousStartTime = currentFlushStartTime;\n var previousMeasurements = currentFlushMeasurements;\n var previousOperations = ReactHostOperationHistoryHook.getHistory();\n\n if (currentFlushNesting === 0) {\n currentFlushStartTime = 0;\n currentFlushMeasurements = [];\n clearHistory();\n return;\n }\n\n if (previousMeasurements.length || previousOperations.length) {\n var registeredIDs = ReactComponentTreeHook.getRegisteredIDs();\n flushHistory.push({\n duration: performanceNow() - previousStartTime,\n measurements: previousMeasurements || [],\n operations: previousOperations || [],\n treeSnapshot: getTreeSnapshot(registeredIDs)\n });\n }\n\n clearHistory();\n currentFlushStartTime = performanceNow();\n currentFlushMeasurements = [];\n}\n\nfunction checkDebugID(debugID) {\n var allowRoot = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n if (allowRoot && debugID === 0) {\n return;\n }\n if (!debugID) {\n true ? warning(false, 'ReactDebugTool: debugID may not be empty.') : void 0;\n }\n}\n\nfunction beginLifeCycleTimer(debugID, timerType) {\n if (currentFlushNesting === 0) {\n return;\n }\n if (currentTimerType && !lifeCycleTimerHasWarned) {\n true ? warning(false, 'There is an internal error in the React performance measurement code. ' + 'Did not expect %s timer to start while %s timer is still in ' + 'progress for %s instance.', timerType, currentTimerType || 'no', debugID === currentTimerDebugID ? 'the same' : 'another') : void 0;\n lifeCycleTimerHasWarned = true;\n }\n currentTimerStartTime = performanceNow();\n currentTimerNestedFlushDuration = 0;\n currentTimerDebugID = debugID;\n currentTimerType = timerType;\n}\n\nfunction endLifeCycleTimer(debugID, timerType) {\n if (currentFlushNesting === 0) {\n return;\n }\n if (currentTimerType !== timerType && !lifeCycleTimerHasWarned) {\n true ? warning(false, 'There is an internal error in the React performance measurement code. ' + 'We did not expect %s timer to stop while %s timer is still in ' + 'progress for %s instance. Please report this as a bug in React.', timerType, currentTimerType || 'no', debugID === currentTimerDebugID ? 'the same' : 'another') : void 0;\n lifeCycleTimerHasWarned = true;\n }\n if (isProfiling) {\n currentFlushMeasurements.push({\n timerType: timerType,\n instanceID: debugID,\n duration: performanceNow() - currentTimerStartTime - currentTimerNestedFlushDuration\n });\n }\n currentTimerStartTime = 0;\n currentTimerNestedFlushDuration = 0;\n currentTimerDebugID = null;\n currentTimerType = null;\n}\n\nfunction pauseCurrentLifeCycleTimer() {\n var currentTimer = {\n startTime: currentTimerStartTime,\n nestedFlushStartTime: performanceNow(),\n debugID: currentTimerDebugID,\n timerType: currentTimerType\n };\n lifeCycleTimerStack.push(currentTimer);\n currentTimerStartTime = 0;\n currentTimerNestedFlushDuration = 0;\n currentTimerDebugID = null;\n currentTimerType = null;\n}\n\nfunction resumeCurrentLifeCycleTimer() {\n var _lifeCycleTimerStack$ = lifeCycleTimerStack.pop(),\n startTime = _lifeCycleTimerStack$.startTime,\n nestedFlushStartTime = _lifeCycleTimerStack$.nestedFlushStartTime,\n debugID = _lifeCycleTimerStack$.debugID,\n timerType = _lifeCycleTimerStack$.timerType;\n\n var nestedFlushDuration = performanceNow() - nestedFlushStartTime;\n currentTimerStartTime = startTime;\n currentTimerNestedFlushDuration += nestedFlushDuration;\n currentTimerDebugID = debugID;\n currentTimerType = timerType;\n}\n\nvar lastMarkTimeStamp = 0;\nvar canUsePerformanceMeasure =\n// $FlowFixMe https://github.com/facebook/flow/issues/2345\ntypeof performance !== 'undefined' && typeof performance.mark === 'function' && typeof performance.clearMarks === 'function' && typeof performance.measure === 'function' && typeof performance.clearMeasures === 'function';\n\nfunction shouldMark(debugID) {\n if (!isProfiling || !canUsePerformanceMeasure) {\n return false;\n }\n var element = ReactComponentTreeHook.getElement(debugID);\n if (element == null || typeof element !== 'object') {\n return false;\n }\n var isHostElement = typeof element.type === 'string';\n if (isHostElement) {\n return false;\n }\n return true;\n}\n\nfunction markBegin(debugID, markType) {\n if (!shouldMark(debugID)) {\n return;\n }\n\n var markName = debugID + '::' + markType;\n lastMarkTimeStamp = performanceNow();\n performance.mark(markName);\n}\n\nfunction markEnd(debugID, markType) {\n if (!shouldMark(debugID)) {\n return;\n }\n\n var markName = debugID + '::' + markType;\n var displayName = ReactComponentTreeHook.getDisplayName(debugID) || 'Unknown';\n\n // Chrome has an issue of dropping markers recorded too fast:\n // https://bugs.chromium.org/p/chromium/issues/detail?id=640652\n // To work around this, we will not report very small measurements.\n // I determined the magic number by tweaking it back and forth.\n // 0.05ms was enough to prevent the issue, but I set it to 0.1ms to be safe.\n // When the bug is fixed, we can `measure()` unconditionally if we want to.\n var timeStamp = performanceNow();\n if (timeStamp - lastMarkTimeStamp > 0.1) {\n var measurementName = displayName + ' [' + markType + ']';\n performance.measure(measurementName, markName);\n }\n\n performance.clearMarks(markName);\n performance.clearMeasures(measurementName);\n}\n\nvar ReactDebugTool = {\n addHook: function (hook) {\n hooks.push(hook);\n },\n removeHook: function (hook) {\n for (var i = 0; i < hooks.length; i++) {\n if (hooks[i] === hook) {\n hooks.splice(i, 1);\n i--;\n }\n }\n },\n isProfiling: function () {\n return isProfiling;\n },\n beginProfiling: function () {\n if (isProfiling) {\n return;\n }\n\n isProfiling = true;\n flushHistory.length = 0;\n resetMeasurements();\n ReactDebugTool.addHook(ReactHostOperationHistoryHook);\n },\n endProfiling: function () {\n if (!isProfiling) {\n return;\n }\n\n isProfiling = false;\n resetMeasurements();\n ReactDebugTool.removeHook(ReactHostOperationHistoryHook);\n },\n getFlushHistory: function () {\n return flushHistory;\n },\n onBeginFlush: function () {\n currentFlushNesting++;\n resetMeasurements();\n pauseCurrentLifeCycleTimer();\n emitEvent('onBeginFlush');\n },\n onEndFlush: function () {\n resetMeasurements();\n currentFlushNesting--;\n resumeCurrentLifeCycleTimer();\n emitEvent('onEndFlush');\n },\n onBeginLifeCycleTimer: function (debugID, timerType) {\n checkDebugID(debugID);\n emitEvent('onBeginLifeCycleTimer', debugID, timerType);\n markBegin(debugID, timerType);\n beginLifeCycleTimer(debugID, timerType);\n },\n onEndLifeCycleTimer: function (debugID, timerType) {\n checkDebugID(debugID);\n endLifeCycleTimer(debugID, timerType);\n markEnd(debugID, timerType);\n emitEvent('onEndLifeCycleTimer', debugID, timerType);\n },\n onBeginProcessingChildContext: function () {\n emitEvent('onBeginProcessingChildContext');\n },\n onEndProcessingChildContext: function () {\n emitEvent('onEndProcessingChildContext');\n },\n onHostOperation: function (operation) {\n checkDebugID(operation.instanceID);\n emitEvent('onHostOperation', operation);\n },\n onSetState: function () {\n emitEvent('onSetState');\n },\n onSetChildren: function (debugID, childDebugIDs) {\n checkDebugID(debugID);\n childDebugIDs.forEach(checkDebugID);\n emitEvent('onSetChildren', debugID, childDebugIDs);\n },\n onBeforeMountComponent: function (debugID, element, parentDebugID) {\n checkDebugID(debugID);\n checkDebugID(parentDebugID, true);\n emitEvent('onBeforeMountComponent', debugID, element, parentDebugID);\n markBegin(debugID, 'mount');\n },\n onMountComponent: function (debugID) {\n checkDebugID(debugID);\n markEnd(debugID, 'mount');\n emitEvent('onMountComponent', debugID);\n },\n onBeforeUpdateComponent: function (debugID, element) {\n checkDebugID(debugID);\n emitEvent('onBeforeUpdateComponent', debugID, element);\n markBegin(debugID, 'update');\n },\n onUpdateComponent: function (debugID) {\n checkDebugID(debugID);\n markEnd(debugID, 'update');\n emitEvent('onUpdateComponent', debugID);\n },\n onBeforeUnmountComponent: function (debugID) {\n checkDebugID(debugID);\n emitEvent('onBeforeUnmountComponent', debugID);\n markBegin(debugID, 'unmount');\n },\n onUnmountComponent: function (debugID) {\n checkDebugID(debugID);\n markEnd(debugID, 'unmount');\n emitEvent('onUnmountComponent', debugID);\n },\n onTestEvent: function () {\n emitEvent('onTestEvent');\n }\n};\n\n// TODO remove these when RN/www gets updated\nReactDebugTool.addDevtool = ReactDebugTool.addHook;\nReactDebugTool.removeDevtool = ReactDebugTool.removeHook;\n\nReactDebugTool.addHook(ReactInvalidSetStateWarningHook);\nReactDebugTool.addHook(ReactComponentTreeHook);\nvar url = ExecutionEnvironment.canUseDOM && window.location.href || '';\nif (/[?&]react_perf\\b/.test(url)) {\n ReactDebugTool.beginProfiling();\n}\n\nmodule.exports = ReactDebugTool;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/ReactDebugTool.js\n// module id = 1345\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/ReactDebugTool.js?", + ); + + /***/ + }, + /* 1346 */ + /* unknown exports provided */ + /* all exports used */ + /*!***********************************************!*\ + !*** ./~/react-dom/lib/ReactElementSymbol.js ***! + \***********************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2014-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * \n */\n\n\n\n// The Symbol used to tag the ReactElement type. If there is no native Symbol\n// nor polyfill, then a plain number is used for performance.\n\nvar REACT_ELEMENT_TYPE = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.element') || 0xeac7;\n\nmodule.exports = REACT_ELEMENT_TYPE;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/ReactElementSymbol.js\n// module id = 1346\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/ReactElementSymbol.js?", + ); + + /***/ + }, + /* 1347 */ + /* unknown exports provided */ + /* all exports used */ + /*!***************************************************!*\ + !*** ./~/react-dom/lib/ReactEventEmitterMixin.js ***! + \***************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar EventPluginHub = __webpack_require__(/*! ./EventPluginHub */ 123);\n\nfunction runEventQueueInBatch(events) {\n EventPluginHub.enqueueEvents(events);\n EventPluginHub.processEventQueue(false);\n}\n\nvar ReactEventEmitterMixin = {\n\n /**\n * Streams a fired top-level event to `EventPluginHub` where plugins have the\n * opportunity to create `ReactEvent`s to be dispatched.\n */\n handleTopLevel: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {\n var events = EventPluginHub.extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget);\n runEventQueueInBatch(events);\n }\n};\n\nmodule.exports = ReactEventEmitterMixin;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/ReactEventEmitterMixin.js\n// module id = 1347\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/ReactEventEmitterMixin.js?', + ); + + /***/ + }, + /* 1348 */ + /* unknown exports provided */ + /* all exports used */ + /*!***********************************************!*\ + !*** ./~/react-dom/lib/ReactEventListener.js ***! + \***********************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar _assign = __webpack_require__(/*! object-assign */ 21);\n\nvar EventListener = __webpack_require__(/*! fbjs/lib/EventListener */ 346);\nvar ExecutionEnvironment = __webpack_require__(/*! fbjs/lib/ExecutionEnvironment */ 27);\nvar PooledClass = __webpack_require__(/*! ./PooledClass */ 78);\nvar ReactDOMComponentTree = __webpack_require__(/*! ./ReactDOMComponentTree */ 24);\nvar ReactUpdates = __webpack_require__(/*! ./ReactUpdates */ 47);\n\nvar getEventTarget = __webpack_require__(/*! ./getEventTarget */ 256);\nvar getUnboundedScrollPosition = __webpack_require__(/*! fbjs/lib/getUnboundedScrollPosition */ 1131);\n\n/**\n * Find the deepest React component completely containing the root of the\n * passed-in instance (for use when entire React trees are nested within each\n * other). If React trees are not nested, returns null.\n */\nfunction findParent(inst) {\n // TODO: It may be a good idea to cache this to prevent unnecessary DOM\n // traversal, but caching is difficult to do correctly without using a\n // mutation observer to listen for all DOM changes.\n while (inst._hostParent) {\n inst = inst._hostParent;\n }\n var rootNode = ReactDOMComponentTree.getNodeFromInstance(inst);\n var container = rootNode.parentNode;\n return ReactDOMComponentTree.getClosestInstanceFromNode(container);\n}\n\n// Used to store ancestor hierarchy in top level callback\nfunction TopLevelCallbackBookKeeping(topLevelType, nativeEvent) {\n this.topLevelType = topLevelType;\n this.nativeEvent = nativeEvent;\n this.ancestors = [];\n}\n_assign(TopLevelCallbackBookKeeping.prototype, {\n destructor: function () {\n this.topLevelType = null;\n this.nativeEvent = null;\n this.ancestors.length = 0;\n }\n});\nPooledClass.addPoolingTo(TopLevelCallbackBookKeeping, PooledClass.twoArgumentPooler);\n\nfunction handleTopLevelImpl(bookKeeping) {\n var nativeEventTarget = getEventTarget(bookKeeping.nativeEvent);\n var targetInst = ReactDOMComponentTree.getClosestInstanceFromNode(nativeEventTarget);\n\n // Loop through the hierarchy, in case there's any nested components.\n // It's important that we build the array of ancestors before calling any\n // event handlers, because event handlers can modify the DOM, leading to\n // inconsistencies with ReactMount's node cache. See #1105.\n var ancestor = targetInst;\n do {\n bookKeeping.ancestors.push(ancestor);\n ancestor = ancestor && findParent(ancestor);\n } while (ancestor);\n\n for (var i = 0; i < bookKeeping.ancestors.length; i++) {\n targetInst = bookKeeping.ancestors[i];\n ReactEventListener._handleTopLevel(bookKeeping.topLevelType, targetInst, bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));\n }\n}\n\nfunction scrollValueMonitor(cb) {\n var scrollPosition = getUnboundedScrollPosition(window);\n cb(scrollPosition);\n}\n\nvar ReactEventListener = {\n _enabled: true,\n _handleTopLevel: null,\n\n WINDOW_HANDLE: ExecutionEnvironment.canUseDOM ? window : null,\n\n setHandleTopLevel: function (handleTopLevel) {\n ReactEventListener._handleTopLevel = handleTopLevel;\n },\n\n setEnabled: function (enabled) {\n ReactEventListener._enabled = !!enabled;\n },\n\n isEnabled: function () {\n return ReactEventListener._enabled;\n },\n\n /**\n * Traps top-level events by using event bubbling.\n *\n * @param {string} topLevelType Record from `EventConstants`.\n * @param {string} handlerBaseName Event name (e.g. \"click\").\n * @param {object} element Element on which to attach listener.\n * @return {?object} An object with a remove function which will forcefully\n * remove the listener.\n * @internal\n */\n trapBubbledEvent: function (topLevelType, handlerBaseName, element) {\n if (!element) {\n return null;\n }\n return EventListener.listen(element, handlerBaseName, ReactEventListener.dispatchEvent.bind(null, topLevelType));\n },\n\n /**\n * Traps a top-level event by using event capturing.\n *\n * @param {string} topLevelType Record from `EventConstants`.\n * @param {string} handlerBaseName Event name (e.g. \"click\").\n * @param {object} element Element on which to attach listener.\n * @return {?object} An object with a remove function which will forcefully\n * remove the listener.\n * @internal\n */\n trapCapturedEvent: function (topLevelType, handlerBaseName, element) {\n if (!element) {\n return null;\n }\n return EventListener.capture(element, handlerBaseName, ReactEventListener.dispatchEvent.bind(null, topLevelType));\n },\n\n monitorScrollValue: function (refresh) {\n var callback = scrollValueMonitor.bind(null, refresh);\n EventListener.listen(window, 'scroll', callback);\n },\n\n dispatchEvent: function (topLevelType, nativeEvent) {\n if (!ReactEventListener._enabled) {\n return;\n }\n\n var bookKeeping = TopLevelCallbackBookKeeping.getPooled(topLevelType, nativeEvent);\n try {\n // Event queue being processed in the same cycle allows\n // `preventDefault`.\n ReactUpdates.batchedUpdates(handleTopLevelImpl, bookKeeping);\n } finally {\n TopLevelCallbackBookKeeping.release(bookKeeping);\n }\n }\n};\n\nmodule.exports = ReactEventListener;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/ReactEventListener.js\n// module id = 1348\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/ReactEventListener.js?", + ); + + /***/ + }, + /* 1349 */ + /* unknown exports provided */ + /* all exports used */ + /*!**********************************************************!*\ + !*** ./~/react-dom/lib/ReactHostOperationHistoryHook.js ***! + \**********************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '/**\n * Copyright 2016-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * \n */\n\n\n\nvar history = [];\n\nvar ReactHostOperationHistoryHook = {\n onHostOperation: function (operation) {\n history.push(operation);\n },\n clearHistory: function () {\n if (ReactHostOperationHistoryHook._preventClearing) {\n // Should only be used for tests.\n return;\n }\n\n history = [];\n },\n getHistory: function () {\n return history;\n }\n};\n\nmodule.exports = ReactHostOperationHistoryHook;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/ReactHostOperationHistoryHook.js\n// module id = 1349\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/ReactHostOperationHistoryHook.js?', + ); + + /***/ + }, + /* 1350 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************************!*\ + !*** ./~/react-dom/lib/ReactInjection.js ***! + \*******************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar DOMProperty = __webpack_require__(/*! ./DOMProperty */ 67);\nvar EventPluginHub = __webpack_require__(/*! ./EventPluginHub */ 123);\nvar EventPluginUtils = __webpack_require__(/*! ./EventPluginUtils */ 247);\nvar ReactComponentEnvironment = __webpack_require__(/*! ./ReactComponentEnvironment */ 250);\nvar ReactEmptyComponent = __webpack_require__(/*! ./ReactEmptyComponent */ 539);\nvar ReactBrowserEventEmitter = __webpack_require__(/*! ./ReactBrowserEventEmitter */ 169);\nvar ReactHostComponent = __webpack_require__(/*! ./ReactHostComponent */ 541);\nvar ReactUpdates = __webpack_require__(/*! ./ReactUpdates */ 47);\n\nvar ReactInjection = {\n Component: ReactComponentEnvironment.injection,\n DOMProperty: DOMProperty.injection,\n EmptyComponent: ReactEmptyComponent.injection,\n EventPluginHub: EventPluginHub.injection,\n EventPluginUtils: EventPluginUtils.injection,\n EventEmitter: ReactBrowserEventEmitter.injection,\n HostComponent: ReactHostComponent.injection,\n Updates: ReactUpdates.injection\n};\n\nmodule.exports = ReactInjection;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/ReactInjection.js\n// module id = 1350\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/ReactInjection.js?', + ); + + /***/ + }, + /* 1351 */ + /* unknown exports provided */ + /* all exports used */ + /*!************************************************************!*\ + !*** ./~/react-dom/lib/ReactInvalidSetStateWarningHook.js ***! + \************************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2016-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * \n */\n\n\n\nvar warning = __webpack_require__(/*! fbjs/lib/warning */ 13);\n\nif (true) {\n var processingChildContext = false;\n\n var warnInvalidSetState = function () {\n true ? warning(!processingChildContext, 'setState(...): Cannot call setState() inside getChildContext()') : void 0;\n };\n}\n\nvar ReactInvalidSetStateWarningHook = {\n onBeginProcessingChildContext: function () {\n processingChildContext = true;\n },\n onEndProcessingChildContext: function () {\n processingChildContext = false;\n },\n onSetState: function () {\n warnInvalidSetState();\n }\n};\n\nmodule.exports = ReactInvalidSetStateWarningHook;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/ReactInvalidSetStateWarningHook.js\n// module id = 1351\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/ReactInvalidSetStateWarningHook.js?", + ); + + /***/ + }, + /* 1352 */ + /* unknown exports provided */ + /* all exports used */ + /*!********************************************!*\ + !*** ./~/react-dom/lib/ReactMultiChild.js ***! + \********************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar _prodInvariant = __webpack_require__(/*! ./reactProdInvariant */ 17);\n\nvar ReactComponentEnvironment = __webpack_require__(/*! ./ReactComponentEnvironment */ 250);\nvar ReactInstanceMap = __webpack_require__(/*! ./ReactInstanceMap */ 125);\nvar ReactInstrumentation = __webpack_require__(/*! ./ReactInstrumentation */ 35);\n\nvar ReactCurrentOwner = __webpack_require__(/*! react/lib/ReactCurrentOwner */ 55);\nvar ReactReconciler = __webpack_require__(/*! ./ReactReconciler */ 79);\nvar ReactChildReconciler = __webpack_require__(/*! ./ReactChildReconciler */ 1327);\n\nvar emptyFunction = __webpack_require__(/*! fbjs/lib/emptyFunction */ 40);\nvar flattenChildren = __webpack_require__(/*! ./flattenChildren */ 1377);\nvar invariant = __webpack_require__(/*! fbjs/lib/invariant */ 12);\n\n/**\n * Make an update for markup to be rendered and inserted at a supplied index.\n *\n * @param {string} markup Markup that renders into an element.\n * @param {number} toIndex Destination index.\n * @private\n */\nfunction makeInsertMarkup(markup, afterNode, toIndex) {\n // NOTE: Null values reduce hidden classes.\n return {\n type: 'INSERT_MARKUP',\n content: markup,\n fromIndex: null,\n fromNode: null,\n toIndex: toIndex,\n afterNode: afterNode\n };\n}\n\n/**\n * Make an update for moving an existing element to another index.\n *\n * @param {number} fromIndex Source index of the existing element.\n * @param {number} toIndex Destination index of the element.\n * @private\n */\nfunction makeMove(child, afterNode, toIndex) {\n // NOTE: Null values reduce hidden classes.\n return {\n type: 'MOVE_EXISTING',\n content: null,\n fromIndex: child._mountIndex,\n fromNode: ReactReconciler.getHostNode(child),\n toIndex: toIndex,\n afterNode: afterNode\n };\n}\n\n/**\n * Make an update for removing an element at an index.\n *\n * @param {number} fromIndex Index of the element to remove.\n * @private\n */\nfunction makeRemove(child, node) {\n // NOTE: Null values reduce hidden classes.\n return {\n type: 'REMOVE_NODE',\n content: null,\n fromIndex: child._mountIndex,\n fromNode: node,\n toIndex: null,\n afterNode: null\n };\n}\n\n/**\n * Make an update for setting the markup of a node.\n *\n * @param {string} markup Markup that renders into an element.\n * @private\n */\nfunction makeSetMarkup(markup) {\n // NOTE: Null values reduce hidden classes.\n return {\n type: 'SET_MARKUP',\n content: markup,\n fromIndex: null,\n fromNode: null,\n toIndex: null,\n afterNode: null\n };\n}\n\n/**\n * Make an update for setting the text content.\n *\n * @param {string} textContent Text content to set.\n * @private\n */\nfunction makeTextContent(textContent) {\n // NOTE: Null values reduce hidden classes.\n return {\n type: 'TEXT_CONTENT',\n content: textContent,\n fromIndex: null,\n fromNode: null,\n toIndex: null,\n afterNode: null\n };\n}\n\n/**\n * Push an update, if any, onto the queue. Creates a new queue if none is\n * passed and always returns the queue. Mutative.\n */\nfunction enqueue(queue, update) {\n if (update) {\n queue = queue || [];\n queue.push(update);\n }\n return queue;\n}\n\n/**\n * Processes any enqueued updates.\n *\n * @private\n */\nfunction processQueue(inst, updateQueue) {\n ReactComponentEnvironment.processChildrenUpdates(inst, updateQueue);\n}\n\nvar setChildrenForInstrumentation = emptyFunction;\nif (true) {\n var getDebugID = function (inst) {\n if (!inst._debugID) {\n // Check for ART-like instances. TODO: This is silly/gross.\n var internal;\n if (internal = ReactInstanceMap.get(inst)) {\n inst = internal;\n }\n }\n return inst._debugID;\n };\n setChildrenForInstrumentation = function (children) {\n var debugID = getDebugID(this);\n // TODO: React Native empty components are also multichild.\n // This means they still get into this method but don't have _debugID.\n if (debugID !== 0) {\n ReactInstrumentation.debugTool.onSetChildren(debugID, children ? Object.keys(children).map(function (key) {\n return children[key]._debugID;\n }) : []);\n }\n };\n}\n\n/**\n * ReactMultiChild are capable of reconciling multiple children.\n *\n * @class ReactMultiChild\n * @internal\n */\nvar ReactMultiChild = {\n\n /**\n * Provides common functionality for components that must reconcile multiple\n * children. This is used by `ReactDOMComponent` to mount, update, and\n * unmount child components.\n *\n * @lends {ReactMultiChild.prototype}\n */\n Mixin: {\n\n _reconcilerInstantiateChildren: function (nestedChildren, transaction, context) {\n if (true) {\n var selfDebugID = getDebugID(this);\n if (this._currentElement) {\n try {\n ReactCurrentOwner.current = this._currentElement._owner;\n return ReactChildReconciler.instantiateChildren(nestedChildren, transaction, context, selfDebugID);\n } finally {\n ReactCurrentOwner.current = null;\n }\n }\n }\n return ReactChildReconciler.instantiateChildren(nestedChildren, transaction, context);\n },\n\n _reconcilerUpdateChildren: function (prevChildren, nextNestedChildrenElements, mountImages, removedNodes, transaction, context) {\n var nextChildren;\n var selfDebugID = 0;\n if (true) {\n selfDebugID = getDebugID(this);\n if (this._currentElement) {\n try {\n ReactCurrentOwner.current = this._currentElement._owner;\n nextChildren = flattenChildren(nextNestedChildrenElements, selfDebugID);\n } finally {\n ReactCurrentOwner.current = null;\n }\n ReactChildReconciler.updateChildren(prevChildren, nextChildren, mountImages, removedNodes, transaction, this, this._hostContainerInfo, context, selfDebugID);\n return nextChildren;\n }\n }\n nextChildren = flattenChildren(nextNestedChildrenElements, selfDebugID);\n ReactChildReconciler.updateChildren(prevChildren, nextChildren, mountImages, removedNodes, transaction, this, this._hostContainerInfo, context, selfDebugID);\n return nextChildren;\n },\n\n /**\n * Generates a \"mount image\" for each of the supplied children. In the case\n * of `ReactDOMComponent`, a mount image is a string of markup.\n *\n * @param {?object} nestedChildren Nested child maps.\n * @return {array} An array of mounted representations.\n * @internal\n */\n mountChildren: function (nestedChildren, transaction, context) {\n var children = this._reconcilerInstantiateChildren(nestedChildren, transaction, context);\n this._renderedChildren = children;\n\n var mountImages = [];\n var index = 0;\n for (var name in children) {\n if (children.hasOwnProperty(name)) {\n var child = children[name];\n var selfDebugID = 0;\n if (true) {\n selfDebugID = getDebugID(this);\n }\n var mountImage = ReactReconciler.mountComponent(child, transaction, this, this._hostContainerInfo, context, selfDebugID);\n child._mountIndex = index++;\n mountImages.push(mountImage);\n }\n }\n\n if (true) {\n setChildrenForInstrumentation.call(this, children);\n }\n\n return mountImages;\n },\n\n /**\n * Replaces any rendered children with a text content string.\n *\n * @param {string} nextContent String of content.\n * @internal\n */\n updateTextContent: function (nextContent) {\n var prevChildren = this._renderedChildren;\n // Remove any rendered children.\n ReactChildReconciler.unmountChildren(prevChildren, false);\n for (var name in prevChildren) {\n if (prevChildren.hasOwnProperty(name)) {\n true ? true ? invariant(false, 'updateTextContent called on non-empty component.') : _prodInvariant('118') : void 0;\n }\n }\n // Set new text content.\n var updates = [makeTextContent(nextContent)];\n processQueue(this, updates);\n },\n\n /**\n * Replaces any rendered children with a markup string.\n *\n * @param {string} nextMarkup String of markup.\n * @internal\n */\n updateMarkup: function (nextMarkup) {\n var prevChildren = this._renderedChildren;\n // Remove any rendered children.\n ReactChildReconciler.unmountChildren(prevChildren, false);\n for (var name in prevChildren) {\n if (prevChildren.hasOwnProperty(name)) {\n true ? true ? invariant(false, 'updateTextContent called on non-empty component.') : _prodInvariant('118') : void 0;\n }\n }\n var updates = [makeSetMarkup(nextMarkup)];\n processQueue(this, updates);\n },\n\n /**\n * Updates the rendered children with new children.\n *\n * @param {?object} nextNestedChildrenElements Nested child element maps.\n * @param {ReactReconcileTransaction} transaction\n * @internal\n */\n updateChildren: function (nextNestedChildrenElements, transaction, context) {\n // Hook used by React ART\n this._updateChildren(nextNestedChildrenElements, transaction, context);\n },\n\n /**\n * @param {?object} nextNestedChildrenElements Nested child element maps.\n * @param {ReactReconcileTransaction} transaction\n * @final\n * @protected\n */\n _updateChildren: function (nextNestedChildrenElements, transaction, context) {\n var prevChildren = this._renderedChildren;\n var removedNodes = {};\n var mountImages = [];\n var nextChildren = this._reconcilerUpdateChildren(prevChildren, nextNestedChildrenElements, mountImages, removedNodes, transaction, context);\n if (!nextChildren && !prevChildren) {\n return;\n }\n var updates = null;\n var name;\n // `nextIndex` will increment for each child in `nextChildren`, but\n // `lastIndex` will be the last index visited in `prevChildren`.\n var nextIndex = 0;\n var lastIndex = 0;\n // `nextMountIndex` will increment for each newly mounted child.\n var nextMountIndex = 0;\n var lastPlacedNode = null;\n for (name in nextChildren) {\n if (!nextChildren.hasOwnProperty(name)) {\n continue;\n }\n var prevChild = prevChildren && prevChildren[name];\n var nextChild = nextChildren[name];\n if (prevChild === nextChild) {\n updates = enqueue(updates, this.moveChild(prevChild, lastPlacedNode, nextIndex, lastIndex));\n lastIndex = Math.max(prevChild._mountIndex, lastIndex);\n prevChild._mountIndex = nextIndex;\n } else {\n if (prevChild) {\n // Update `lastIndex` before `_mountIndex` gets unset by unmounting.\n lastIndex = Math.max(prevChild._mountIndex, lastIndex);\n // The `removedNodes` loop below will actually remove the child.\n }\n // The child must be instantiated before it's mounted.\n updates = enqueue(updates, this._mountChildAtIndex(nextChild, mountImages[nextMountIndex], lastPlacedNode, nextIndex, transaction, context));\n nextMountIndex++;\n }\n nextIndex++;\n lastPlacedNode = ReactReconciler.getHostNode(nextChild);\n }\n // Remove children that are no longer present.\n for (name in removedNodes) {\n if (removedNodes.hasOwnProperty(name)) {\n updates = enqueue(updates, this._unmountChild(prevChildren[name], removedNodes[name]));\n }\n }\n if (updates) {\n processQueue(this, updates);\n }\n this._renderedChildren = nextChildren;\n\n if (true) {\n setChildrenForInstrumentation.call(this, nextChildren);\n }\n },\n\n /**\n * Unmounts all rendered children. This should be used to clean up children\n * when this component is unmounted. It does not actually perform any\n * backend operations.\n *\n * @internal\n */\n unmountChildren: function (safely) {\n var renderedChildren = this._renderedChildren;\n ReactChildReconciler.unmountChildren(renderedChildren, safely);\n this._renderedChildren = null;\n },\n\n /**\n * Moves a child component to the supplied index.\n *\n * @param {ReactComponent} child Component to move.\n * @param {number} toIndex Destination index of the element.\n * @param {number} lastIndex Last index visited of the siblings of `child`.\n * @protected\n */\n moveChild: function (child, afterNode, toIndex, lastIndex) {\n // If the index of `child` is less than `lastIndex`, then it needs to\n // be moved. Otherwise, we do not need to move it because a child will be\n // inserted or moved before `child`.\n if (child._mountIndex < lastIndex) {\n return makeMove(child, afterNode, toIndex);\n }\n },\n\n /**\n * Creates a child component.\n *\n * @param {ReactComponent} child Component to create.\n * @param {string} mountImage Markup to insert.\n * @protected\n */\n createChild: function (child, afterNode, mountImage) {\n return makeInsertMarkup(mountImage, afterNode, child._mountIndex);\n },\n\n /**\n * Removes a child component.\n *\n * @param {ReactComponent} child Child to remove.\n * @protected\n */\n removeChild: function (child, node) {\n return makeRemove(child, node);\n },\n\n /**\n * Mounts a child with the supplied name.\n *\n * NOTE: This is part of `updateChildren` and is here for readability.\n *\n * @param {ReactComponent} child Component to mount.\n * @param {string} name Name of the child.\n * @param {number} index Index at which to insert the child.\n * @param {ReactReconcileTransaction} transaction\n * @private\n */\n _mountChildAtIndex: function (child, mountImage, afterNode, index, transaction, context) {\n child._mountIndex = index;\n return this.createChild(child, afterNode, mountImage);\n },\n\n /**\n * Unmounts a rendered child.\n *\n * NOTE: This is part of `updateChildren` and is here for readability.\n *\n * @param {ReactComponent} child Component to unmount.\n * @private\n */\n _unmountChild: function (child, node) {\n var update = this.removeChild(child, node);\n child._mountIndex = null;\n return update;\n }\n\n }\n\n};\n\nmodule.exports = ReactMultiChild;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/ReactMultiChild.js\n// module id = 1352\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/ReactMultiChild.js?", + ); + + /***/ + }, + /* 1353 */ + /* unknown exports provided */ + /* all exports used */ + /*!***************************************!*\ + !*** ./~/react-dom/lib/ReactOwner.js ***! + \***************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * \n */\n\n\n\nvar _prodInvariant = __webpack_require__(/*! ./reactProdInvariant */ 17);\n\nvar invariant = __webpack_require__(/*! fbjs/lib/invariant */ 12);\n\n/**\n * @param {?object} object\n * @return {boolean} True if `object` is a valid owner.\n * @final\n */\nfunction isValidOwner(object) {\n return !!(object && typeof object.attachRef === 'function' && typeof object.detachRef === 'function');\n}\n\n/**\n * ReactOwners are capable of storing references to owned components.\n *\n * All components are capable of //being// referenced by owner components, but\n * only ReactOwner components are capable of //referencing// owned components.\n * The named reference is known as a \"ref\".\n *\n * Refs are available when mounted and updated during reconciliation.\n *\n * var MyComponent = React.createClass({\n * render: function() {\n * return (\n * <div onClick={this.handleClick}>\n * <CustomComponent ref=\"custom\" />\n * </div>\n * );\n * },\n * handleClick: function() {\n * this.refs.custom.handleClick();\n * },\n * componentDidMount: function() {\n * this.refs.custom.initialize();\n * }\n * });\n *\n * Refs should rarely be used. When refs are used, they should only be done to\n * control data that is not handled by React's data flow.\n *\n * @class ReactOwner\n */\nvar ReactOwner = {\n /**\n * Adds a component by ref to an owner component.\n *\n * @param {ReactComponent} component Component to reference.\n * @param {string} ref Name by which to refer to the component.\n * @param {ReactOwner} owner Component on which to record the ref.\n * @final\n * @internal\n */\n addComponentAsRefTo: function (component, ref, owner) {\n !isValidOwner(owner) ? true ? invariant(false, 'addComponentAsRefTo(...): Only a ReactOwner can have refs. You might be adding a ref to a component that was not created inside a component\\'s `render` method, or you have multiple copies of React loaded (details: https://fb.me/react-refs-must-have-owner).') : _prodInvariant('119') : void 0;\n owner.attachRef(ref, component);\n },\n\n /**\n * Removes a component by ref from an owner component.\n *\n * @param {ReactComponent} component Component to dereference.\n * @param {string} ref Name of the ref to remove.\n * @param {ReactOwner} owner Component on which the ref is recorded.\n * @final\n * @internal\n */\n removeComponentAsRefFrom: function (component, ref, owner) {\n !isValidOwner(owner) ? true ? invariant(false, 'removeComponentAsRefFrom(...): Only a ReactOwner can have refs. You might be removing a ref to a component that was not created inside a component\\'s `render` method, or you have multiple copies of React loaded (details: https://fb.me/react-refs-must-have-owner).') : _prodInvariant('120') : void 0;\n var ownerPublicInstance = owner.getPublicInstance();\n // Check that `component`'s owner is still alive and that `component` is still the current ref\n // because we do not want to detach the ref if another component stole it.\n if (ownerPublicInstance && ownerPublicInstance.refs[ref] === component.getPublicInstance()) {\n owner.detachRef(ref);\n }\n }\n\n};\n\nmodule.exports = ReactOwner;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/ReactOwner.js\n// module id = 1353\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/ReactOwner.js?", + ); + + /***/ + }, + /* 1354 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************************************!*\ + !*** ./~/react-dom/lib/ReactPropTypeLocationNames.js ***! + \*******************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * \n */\n\n\n\nvar ReactPropTypeLocationNames = {};\n\nif (true) {\n ReactPropTypeLocationNames = {\n prop: 'prop',\n context: 'context',\n childContext: 'child context'\n };\n}\n\nmodule.exports = ReactPropTypeLocationNames;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/ReactPropTypeLocationNames.js\n// module id = 1354\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/ReactPropTypeLocationNames.js?", + ); + + /***/ + }, + /* 1355 */ + /* unknown exports provided */ + /* all exports used */ + /*!******************************************************!*\ + !*** ./~/react-dom/lib/ReactReconcileTransaction.js ***! + \******************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar _assign = __webpack_require__(/*! object-assign */ 21);\n\nvar CallbackQueue = __webpack_require__(/*! ./CallbackQueue */ 532);\nvar PooledClass = __webpack_require__(/*! ./PooledClass */ 78);\nvar ReactBrowserEventEmitter = __webpack_require__(/*! ./ReactBrowserEventEmitter */ 169);\nvar ReactInputSelection = __webpack_require__(/*! ./ReactInputSelection */ 542);\nvar ReactInstrumentation = __webpack_require__(/*! ./ReactInstrumentation */ 35);\nvar Transaction = __webpack_require__(/*! ./Transaction */ 171);\nvar ReactUpdateQueue = __webpack_require__(/*! ./ReactUpdateQueue */ 252);\n\n/**\n * Ensures that, when possible, the selection range (currently selected text\n * input) is not disturbed by performing the transaction.\n */\nvar SELECTION_RESTORATION = {\n /**\n * @return {Selection} Selection information.\n */\n initialize: ReactInputSelection.getSelectionInformation,\n /**\n * @param {Selection} sel Selection information returned from `initialize`.\n */\n close: ReactInputSelection.restoreSelection\n};\n\n/**\n * Suppresses events (blur/focus) that could be inadvertently dispatched due to\n * high level DOM manipulations (like temporarily removing a text input from the\n * DOM).\n */\nvar EVENT_SUPPRESSION = {\n /**\n * @return {boolean} The enabled status of `ReactBrowserEventEmitter` before\n * the reconciliation.\n */\n initialize: function () {\n var currentlyEnabled = ReactBrowserEventEmitter.isEnabled();\n ReactBrowserEventEmitter.setEnabled(false);\n return currentlyEnabled;\n },\n\n /**\n * @param {boolean} previouslyEnabled Enabled status of\n * `ReactBrowserEventEmitter` before the reconciliation occurred. `close`\n * restores the previous value.\n */\n close: function (previouslyEnabled) {\n ReactBrowserEventEmitter.setEnabled(previouslyEnabled);\n }\n};\n\n/**\n * Provides a queue for collecting `componentDidMount` and\n * `componentDidUpdate` callbacks during the transaction.\n */\nvar ON_DOM_READY_QUEUEING = {\n /**\n * Initializes the internal `onDOMReady` queue.\n */\n initialize: function () {\n this.reactMountReady.reset();\n },\n\n /**\n * After DOM is flushed, invoke all registered `onDOMReady` callbacks.\n */\n close: function () {\n this.reactMountReady.notifyAll();\n }\n};\n\n/**\n * Executed within the scope of the `Transaction` instance. Consider these as\n * being member methods, but with an implied ordering while being isolated from\n * each other.\n */\nvar TRANSACTION_WRAPPERS = [SELECTION_RESTORATION, EVENT_SUPPRESSION, ON_DOM_READY_QUEUEING];\n\nif (true) {\n TRANSACTION_WRAPPERS.push({\n initialize: ReactInstrumentation.debugTool.onBeginFlush,\n close: ReactInstrumentation.debugTool.onEndFlush\n });\n}\n\n/**\n * Currently:\n * - The order that these are listed in the transaction is critical:\n * - Suppresses events.\n * - Restores selection range.\n *\n * Future:\n * - Restore document/overflow scroll positions that were unintentionally\n * modified via DOM insertions above the top viewport boundary.\n * - Implement/integrate with customized constraint based layout system and keep\n * track of which dimensions must be remeasured.\n *\n * @class ReactReconcileTransaction\n */\nfunction ReactReconcileTransaction(useCreateElement) {\n this.reinitializeTransaction();\n // Only server-side rendering really needs this option (see\n // `ReactServerRendering`), but server-side uses\n // `ReactServerRenderingTransaction` instead. This option is here so that it's\n // accessible and defaults to false when `ReactDOMComponent` and\n // `ReactDOMTextComponent` checks it in `mountComponent`.`\n this.renderToStaticMarkup = false;\n this.reactMountReady = CallbackQueue.getPooled(null);\n this.useCreateElement = useCreateElement;\n}\n\nvar Mixin = {\n /**\n * @see Transaction\n * @abstract\n * @final\n * @return {array<object>} List of operation wrap procedures.\n * TODO: convert to array<TransactionWrapper>\n */\n getTransactionWrappers: function () {\n return TRANSACTION_WRAPPERS;\n },\n\n /**\n * @return {object} The queue to collect `onDOMReady` callbacks with.\n */\n getReactMountReady: function () {\n return this.reactMountReady;\n },\n\n /**\n * @return {object} The queue to collect React async events.\n */\n getUpdateQueue: function () {\n return ReactUpdateQueue;\n },\n\n /**\n * Save current transaction state -- if the return value from this method is\n * passed to `rollback`, the transaction will be reset to that state.\n */\n checkpoint: function () {\n // reactMountReady is the our only stateful wrapper\n return this.reactMountReady.checkpoint();\n },\n\n rollback: function (checkpoint) {\n this.reactMountReady.rollback(checkpoint);\n },\n\n /**\n * `PooledClass` looks for this, and will invoke this before allowing this\n * instance to be reused.\n */\n destructor: function () {\n CallbackQueue.release(this.reactMountReady);\n this.reactMountReady = null;\n }\n};\n\n_assign(ReactReconcileTransaction.prototype, Transaction, Mixin);\n\nPooledClass.addPoolingTo(ReactReconcileTransaction);\n\nmodule.exports = ReactReconcileTransaction;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/ReactReconcileTransaction.js\n// module id = 1355\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/ReactReconcileTransaction.js?", + ); + + /***/ + }, + /* 1356 */ + /* unknown exports provided */ + /* all exports used */ + /*!*************************************!*\ + !*** ./~/react-dom/lib/ReactRef.js ***! + \*************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * \n */\n\n\n\nvar ReactOwner = __webpack_require__(/*! ./ReactOwner */ 1353);\n\nvar ReactRef = {};\n\nfunction attachRef(ref, component, owner) {\n if (typeof ref === 'function') {\n ref(component.getPublicInstance());\n } else {\n // Legacy ref\n ReactOwner.addComponentAsRefTo(component, ref, owner);\n }\n}\n\nfunction detachRef(ref, component, owner) {\n if (typeof ref === 'function') {\n ref(null);\n } else {\n // Legacy ref\n ReactOwner.removeComponentAsRefFrom(component, ref, owner);\n }\n}\n\nReactRef.attachRefs = function (instance, element) {\n if (element === null || typeof element !== 'object') {\n return;\n }\n var ref = element.ref;\n if (ref != null) {\n attachRef(ref, instance, element._owner);\n }\n};\n\nReactRef.shouldUpdateRefs = function (prevElement, nextElement) {\n // If either the owner or a `ref` has changed, make sure the newest owner\n // has stored a reference to `this`, and the previous owner (if different)\n // has forgotten the reference to `this`. We use the element instead\n // of the public this.props because the post processing cannot determine\n // a ref. The ref conceptually lives on the element.\n\n // TODO: Should this even be possible? The owner cannot change because\n // it's forbidden by shouldUpdateReactComponent. The ref can change\n // if you swap the keys of but not the refs. Reconsider where this check\n // is made. It probably belongs where the key checking and\n // instantiateReactComponent is done.\n\n var prevRef = null;\n var prevOwner = null;\n if (prevElement !== null && typeof prevElement === 'object') {\n prevRef = prevElement.ref;\n prevOwner = prevElement._owner;\n }\n\n var nextRef = null;\n var nextOwner = null;\n if (nextElement !== null && typeof nextElement === 'object') {\n nextRef = nextElement.ref;\n nextOwner = nextElement._owner;\n }\n\n return prevRef !== nextRef ||\n // If owner changes but we have an unchanged function ref, don't update refs\n typeof nextRef === 'string' && nextOwner !== prevOwner;\n};\n\nReactRef.detachRefs = function (instance, element) {\n if (element === null || typeof element !== 'object') {\n return;\n }\n var ref = element.ref;\n if (ref != null) {\n detachRef(ref, instance, element._owner);\n }\n};\n\nmodule.exports = ReactRef;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/ReactRef.js\n// module id = 1356\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/ReactRef.js?", + ); + + /***/ + }, + /* 1357 */ + /* unknown exports provided */ + /* all exports used */ + /*!********************************************************!*\ + !*** ./~/react-dom/lib/ReactServerBatchingStrategy.js ***! + \********************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2014-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar ReactServerBatchingStrategy = {\n isBatchingUpdates: false,\n batchedUpdates: function (callback) {\n // Don't do anything here. During the server rendering we don't want to\n // schedule any updates. We will simply ignore them.\n }\n};\n\nmodule.exports = ReactServerBatchingStrategy;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/ReactServerBatchingStrategy.js\n// module id = 1357\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/ReactServerBatchingStrategy.js?", + ); + + /***/ + }, + /* 1358 */ + /* unknown exports provided */ + /* all exports used */ + /*!*************************************************!*\ + !*** ./~/react-dom/lib/ReactServerRendering.js ***! + \*************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\nvar _prodInvariant = __webpack_require__(/*! ./reactProdInvariant */ 17);\n\nvar React = __webpack_require__(/*! react/lib/React */ 83);\nvar ReactDOMContainerInfo = __webpack_require__(/*! ./ReactDOMContainerInfo */ 535);\nvar ReactDefaultBatchingStrategy = __webpack_require__(/*! ./ReactDefaultBatchingStrategy */ 537);\nvar ReactInstrumentation = __webpack_require__(/*! ./ReactInstrumentation */ 35);\nvar ReactMarkupChecksum = __webpack_require__(/*! ./ReactMarkupChecksum */ 543);\nvar ReactReconciler = __webpack_require__(/*! ./ReactReconciler */ 79);\nvar ReactServerBatchingStrategy = __webpack_require__(/*! ./ReactServerBatchingStrategy */ 1357);\nvar ReactServerRenderingTransaction = __webpack_require__(/*! ./ReactServerRenderingTransaction */ 547);\nvar ReactUpdates = __webpack_require__(/*! ./ReactUpdates */ 47);\n\nvar emptyObject = __webpack_require__(/*! fbjs/lib/emptyObject */ 96);\nvar instantiateReactComponent = __webpack_require__(/*! ./instantiateReactComponent */ 257);\nvar invariant = __webpack_require__(/*! fbjs/lib/invariant */ 12);\n\nvar pendingTransactions = 0;\n\n/**\n * @param {ReactElement} element\n * @return {string} the HTML markup\n */\nfunction renderToStringImpl(element, makeStaticMarkup) {\n var transaction;\n try {\n ReactUpdates.injection.injectBatchingStrategy(ReactServerBatchingStrategy);\n\n transaction = ReactServerRenderingTransaction.getPooled(makeStaticMarkup);\n\n pendingTransactions++;\n\n return transaction.perform(function () {\n var componentInstance = instantiateReactComponent(element, true);\n var markup = ReactReconciler.mountComponent(componentInstance, transaction, null, ReactDOMContainerInfo(), emptyObject, 0 /* parentDebugID */\n );\n if (true) {\n ReactInstrumentation.debugTool.onUnmountComponent(componentInstance._debugID);\n }\n if (!makeStaticMarkup) {\n markup = ReactMarkupChecksum.addChecksumToMarkup(markup);\n }\n return markup;\n }, null);\n } finally {\n pendingTransactions--;\n ReactServerRenderingTransaction.release(transaction);\n // Revert to the DOM batching strategy since these two renderers\n // currently share these stateful modules.\n if (!pendingTransactions) {\n ReactUpdates.injection.injectBatchingStrategy(ReactDefaultBatchingStrategy);\n }\n }\n}\n\n/**\n * Render a ReactElement to its initial HTML. This should only be used on the\n * server.\n * See https://facebook.github.io/react/docs/top-level-api.html#reactdomserver.rendertostring\n */\nfunction renderToString(element) {\n !React.isValidElement(element) ? true ? invariant(false, 'renderToString(): You must pass a valid ReactElement.') : _prodInvariant('46') : void 0;\n return renderToStringImpl(element, false);\n}\n\n/**\n * Similar to renderToString, except this doesn't create extra DOM attributes\n * such as data-react-id that React uses internally.\n * See https://facebook.github.io/react/docs/top-level-api.html#reactdomserver.rendertostaticmarkup\n */\nfunction renderToStaticMarkup(element) {\n !React.isValidElement(element) ? true ? invariant(false, 'renderToStaticMarkup(): You must pass a valid ReactElement.') : _prodInvariant('47') : void 0;\n return renderToStringImpl(element, true);\n}\n\nmodule.exports = {\n renderToString: renderToString,\n renderToStaticMarkup: renderToStaticMarkup\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/ReactServerRendering.js\n// module id = 1358\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/ReactServerRendering.js?", + ); + + /***/ + }, + /* 1359 */ + /* unknown exports provided */ + /* all exports used */ + /*!***************************************************!*\ + !*** ./~/react-dom/lib/ReactServerUpdateQueue.js ***! + \***************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2015-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * \n */\n\n\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar ReactUpdateQueue = __webpack_require__(/*! ./ReactUpdateQueue */ 252);\n\nvar warning = __webpack_require__(/*! fbjs/lib/warning */ 13);\n\nfunction warnNoop(publicInstance, callerName) {\n if (true) {\n var constructor = publicInstance.constructor;\n true ? warning(false, '%s(...): Can only update a mounting component. ' + 'This usually means you called %s() outside componentWillMount() on the server. ' + 'This is a no-op. Please check the code for the %s component.', callerName, callerName, constructor && (constructor.displayName || constructor.name) || 'ReactClass') : void 0;\n }\n}\n\n/**\n * This is the update queue used for server rendering.\n * It delegates to ReactUpdateQueue while server rendering is in progress and\n * switches to ReactNoopUpdateQueue after the transaction has completed.\n * @class ReactServerUpdateQueue\n * @param {Transaction} transaction\n */\n\nvar ReactServerUpdateQueue = function () {\n function ReactServerUpdateQueue(transaction) {\n _classCallCheck(this, ReactServerUpdateQueue);\n\n this.transaction = transaction;\n }\n\n /**\n * Checks whether or not this composite component is mounted.\n * @param {ReactClass} publicInstance The instance we want to test.\n * @return {boolean} True if mounted, false otherwise.\n * @protected\n * @final\n */\n\n\n ReactServerUpdateQueue.prototype.isMounted = function isMounted(publicInstance) {\n return false;\n };\n\n /**\n * Enqueue a callback that will be executed after all the pending updates\n * have processed.\n *\n * @param {ReactClass} publicInstance The instance to use as `this` context.\n * @param {?function} callback Called after state is updated.\n * @internal\n */\n\n\n ReactServerUpdateQueue.prototype.enqueueCallback = function enqueueCallback(publicInstance, callback, callerName) {\n if (this.transaction.isInTransaction()) {\n ReactUpdateQueue.enqueueCallback(publicInstance, callback, callerName);\n }\n };\n\n /**\n * Forces an update. This should only be invoked when it is known with\n * certainty that we are **not** in a DOM transaction.\n *\n * You may want to call this when you know that some deeper aspect of the\n * component's state has changed but `setState` was not called.\n *\n * This will not invoke `shouldComponentUpdate`, but it will invoke\n * `componentWillUpdate` and `componentDidUpdate`.\n *\n * @param {ReactClass} publicInstance The instance that should rerender.\n * @internal\n */\n\n\n ReactServerUpdateQueue.prototype.enqueueForceUpdate = function enqueueForceUpdate(publicInstance) {\n if (this.transaction.isInTransaction()) {\n ReactUpdateQueue.enqueueForceUpdate(publicInstance);\n } else {\n warnNoop(publicInstance, 'forceUpdate');\n }\n };\n\n /**\n * Replaces all of the state. Always use this or `setState` to mutate state.\n * You should treat `this.state` as immutable.\n *\n * There is no guarantee that `this.state` will be immediately updated, so\n * accessing `this.state` after calling this method may return the old value.\n *\n * @param {ReactClass} publicInstance The instance that should rerender.\n * @param {object|function} completeState Next state.\n * @internal\n */\n\n\n ReactServerUpdateQueue.prototype.enqueueReplaceState = function enqueueReplaceState(publicInstance, completeState) {\n if (this.transaction.isInTransaction()) {\n ReactUpdateQueue.enqueueReplaceState(publicInstance, completeState);\n } else {\n warnNoop(publicInstance, 'replaceState');\n }\n };\n\n /**\n * Sets a subset of the state. This only exists because _pendingState is\n * internal. This provides a merging strategy that is not available to deep\n * properties which is confusing. TODO: Expose pendingState or don't use it\n * during the merge.\n *\n * @param {ReactClass} publicInstance The instance that should rerender.\n * @param {object|function} partialState Next partial state to be merged with state.\n * @internal\n */\n\n\n ReactServerUpdateQueue.prototype.enqueueSetState = function enqueueSetState(publicInstance, partialState) {\n if (this.transaction.isInTransaction()) {\n ReactUpdateQueue.enqueueSetState(publicInstance, partialState);\n } else {\n warnNoop(publicInstance, 'setState');\n }\n };\n\n return ReactServerUpdateQueue;\n}();\n\nmodule.exports = ReactServerUpdateQueue;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/ReactServerUpdateQueue.js\n// module id = 1359\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/ReactServerUpdateQueue.js?", + ); + + /***/ + }, + /* 1360 */ + /* unknown exports provided */ + /* all exports used */ + /*!*************************************************!*\ + !*** ./~/react-dom/lib/SVGDOMPropertyConfig.js ***! + \*************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar NS = {\n xlink: 'http://www.w3.org/1999/xlink',\n xml: 'http://www.w3.org/XML/1998/namespace'\n};\n\n// We use attributes for everything SVG so let's avoid some duplication and run\n// code instead.\n// The following are all specified in the HTML config already so we exclude here.\n// - class (as className)\n// - color\n// - height\n// - id\n// - lang\n// - max\n// - media\n// - method\n// - min\n// - name\n// - style\n// - target\n// - type\n// - width\nvar ATTRS = {\n accentHeight: 'accent-height',\n accumulate: 0,\n additive: 0,\n alignmentBaseline: 'alignment-baseline',\n allowReorder: 'allowReorder',\n alphabetic: 0,\n amplitude: 0,\n arabicForm: 'arabic-form',\n ascent: 0,\n attributeName: 'attributeName',\n attributeType: 'attributeType',\n autoReverse: 'autoReverse',\n azimuth: 0,\n baseFrequency: 'baseFrequency',\n baseProfile: 'baseProfile',\n baselineShift: 'baseline-shift',\n bbox: 0,\n begin: 0,\n bias: 0,\n by: 0,\n calcMode: 'calcMode',\n capHeight: 'cap-height',\n clip: 0,\n clipPath: 'clip-path',\n clipRule: 'clip-rule',\n clipPathUnits: 'clipPathUnits',\n colorInterpolation: 'color-interpolation',\n colorInterpolationFilters: 'color-interpolation-filters',\n colorProfile: 'color-profile',\n colorRendering: 'color-rendering',\n contentScriptType: 'contentScriptType',\n contentStyleType: 'contentStyleType',\n cursor: 0,\n cx: 0,\n cy: 0,\n d: 0,\n decelerate: 0,\n descent: 0,\n diffuseConstant: 'diffuseConstant',\n direction: 0,\n display: 0,\n divisor: 0,\n dominantBaseline: 'dominant-baseline',\n dur: 0,\n dx: 0,\n dy: 0,\n edgeMode: 'edgeMode',\n elevation: 0,\n enableBackground: 'enable-background',\n end: 0,\n exponent: 0,\n externalResourcesRequired: 'externalResourcesRequired',\n fill: 0,\n fillOpacity: 'fill-opacity',\n fillRule: 'fill-rule',\n filter: 0,\n filterRes: 'filterRes',\n filterUnits: 'filterUnits',\n floodColor: 'flood-color',\n floodOpacity: 'flood-opacity',\n focusable: 0,\n fontFamily: 'font-family',\n fontSize: 'font-size',\n fontSizeAdjust: 'font-size-adjust',\n fontStretch: 'font-stretch',\n fontStyle: 'font-style',\n fontVariant: 'font-variant',\n fontWeight: 'font-weight',\n format: 0,\n from: 0,\n fx: 0,\n fy: 0,\n g1: 0,\n g2: 0,\n glyphName: 'glyph-name',\n glyphOrientationHorizontal: 'glyph-orientation-horizontal',\n glyphOrientationVertical: 'glyph-orientation-vertical',\n glyphRef: 'glyphRef',\n gradientTransform: 'gradientTransform',\n gradientUnits: 'gradientUnits',\n hanging: 0,\n horizAdvX: 'horiz-adv-x',\n horizOriginX: 'horiz-origin-x',\n ideographic: 0,\n imageRendering: 'image-rendering',\n 'in': 0,\n in2: 0,\n intercept: 0,\n k: 0,\n k1: 0,\n k2: 0,\n k3: 0,\n k4: 0,\n kernelMatrix: 'kernelMatrix',\n kernelUnitLength: 'kernelUnitLength',\n kerning: 0,\n keyPoints: 'keyPoints',\n keySplines: 'keySplines',\n keyTimes: 'keyTimes',\n lengthAdjust: 'lengthAdjust',\n letterSpacing: 'letter-spacing',\n lightingColor: 'lighting-color',\n limitingConeAngle: 'limitingConeAngle',\n local: 0,\n markerEnd: 'marker-end',\n markerMid: 'marker-mid',\n markerStart: 'marker-start',\n markerHeight: 'markerHeight',\n markerUnits: 'markerUnits',\n markerWidth: 'markerWidth',\n mask: 0,\n maskContentUnits: 'maskContentUnits',\n maskUnits: 'maskUnits',\n mathematical: 0,\n mode: 0,\n numOctaves: 'numOctaves',\n offset: 0,\n opacity: 0,\n operator: 0,\n order: 0,\n orient: 0,\n orientation: 0,\n origin: 0,\n overflow: 0,\n overlinePosition: 'overline-position',\n overlineThickness: 'overline-thickness',\n paintOrder: 'paint-order',\n panose1: 'panose-1',\n pathLength: 'pathLength',\n patternContentUnits: 'patternContentUnits',\n patternTransform: 'patternTransform',\n patternUnits: 'patternUnits',\n pointerEvents: 'pointer-events',\n points: 0,\n pointsAtX: 'pointsAtX',\n pointsAtY: 'pointsAtY',\n pointsAtZ: 'pointsAtZ',\n preserveAlpha: 'preserveAlpha',\n preserveAspectRatio: 'preserveAspectRatio',\n primitiveUnits: 'primitiveUnits',\n r: 0,\n radius: 0,\n refX: 'refX',\n refY: 'refY',\n renderingIntent: 'rendering-intent',\n repeatCount: 'repeatCount',\n repeatDur: 'repeatDur',\n requiredExtensions: 'requiredExtensions',\n requiredFeatures: 'requiredFeatures',\n restart: 0,\n result: 0,\n rotate: 0,\n rx: 0,\n ry: 0,\n scale: 0,\n seed: 0,\n shapeRendering: 'shape-rendering',\n slope: 0,\n spacing: 0,\n specularConstant: 'specularConstant',\n specularExponent: 'specularExponent',\n speed: 0,\n spreadMethod: 'spreadMethod',\n startOffset: 'startOffset',\n stdDeviation: 'stdDeviation',\n stemh: 0,\n stemv: 0,\n stitchTiles: 'stitchTiles',\n stopColor: 'stop-color',\n stopOpacity: 'stop-opacity',\n strikethroughPosition: 'strikethrough-position',\n strikethroughThickness: 'strikethrough-thickness',\n string: 0,\n stroke: 0,\n strokeDasharray: 'stroke-dasharray',\n strokeDashoffset: 'stroke-dashoffset',\n strokeLinecap: 'stroke-linecap',\n strokeLinejoin: 'stroke-linejoin',\n strokeMiterlimit: 'stroke-miterlimit',\n strokeOpacity: 'stroke-opacity',\n strokeWidth: 'stroke-width',\n surfaceScale: 'surfaceScale',\n systemLanguage: 'systemLanguage',\n tableValues: 'tableValues',\n targetX: 'targetX',\n targetY: 'targetY',\n textAnchor: 'text-anchor',\n textDecoration: 'text-decoration',\n textRendering: 'text-rendering',\n textLength: 'textLength',\n to: 0,\n transform: 0,\n u1: 0,\n u2: 0,\n underlinePosition: 'underline-position',\n underlineThickness: 'underline-thickness',\n unicode: 0,\n unicodeBidi: 'unicode-bidi',\n unicodeRange: 'unicode-range',\n unitsPerEm: 'units-per-em',\n vAlphabetic: 'v-alphabetic',\n vHanging: 'v-hanging',\n vIdeographic: 'v-ideographic',\n vMathematical: 'v-mathematical',\n values: 0,\n vectorEffect: 'vector-effect',\n version: 0,\n vertAdvY: 'vert-adv-y',\n vertOriginX: 'vert-origin-x',\n vertOriginY: 'vert-origin-y',\n viewBox: 'viewBox',\n viewTarget: 'viewTarget',\n visibility: 0,\n widths: 0,\n wordSpacing: 'word-spacing',\n writingMode: 'writing-mode',\n x: 0,\n xHeight: 'x-height',\n x1: 0,\n x2: 0,\n xChannelSelector: 'xChannelSelector',\n xlinkActuate: 'xlink:actuate',\n xlinkArcrole: 'xlink:arcrole',\n xlinkHref: 'xlink:href',\n xlinkRole: 'xlink:role',\n xlinkShow: 'xlink:show',\n xlinkTitle: 'xlink:title',\n xlinkType: 'xlink:type',\n xmlBase: 'xml:base',\n xmlns: 0,\n xmlnsXlink: 'xmlns:xlink',\n xmlLang: 'xml:lang',\n xmlSpace: 'xml:space',\n y: 0,\n y1: 0,\n y2: 0,\n yChannelSelector: 'yChannelSelector',\n z: 0,\n zoomAndPan: 'zoomAndPan'\n};\n\nvar SVGDOMPropertyConfig = {\n Properties: {},\n DOMAttributeNamespaces: {\n xlinkActuate: NS.xlink,\n xlinkArcrole: NS.xlink,\n xlinkHref: NS.xlink,\n xlinkRole: NS.xlink,\n xlinkShow: NS.xlink,\n xlinkTitle: NS.xlink,\n xlinkType: NS.xlink,\n xmlBase: NS.xml,\n xmlLang: NS.xml,\n xmlSpace: NS.xml\n },\n DOMAttributeNames: {}\n};\n\nObject.keys(ATTRS).forEach(function (key) {\n SVGDOMPropertyConfig.Properties[key] = 0;\n if (ATTRS[key]) {\n SVGDOMPropertyConfig.DOMAttributeNames[key] = ATTRS[key];\n }\n});\n\nmodule.exports = SVGDOMPropertyConfig;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/SVGDOMPropertyConfig.js\n// module id = 1360\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/SVGDOMPropertyConfig.js?", + ); + + /***/ + }, + /* 1361 */ + /* unknown exports provided */ + /* all exports used */ + /*!**********************************************!*\ + !*** ./~/react-dom/lib/SelectEventPlugin.js ***! + \**********************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar EventPropagators = __webpack_require__(/*! ./EventPropagators */ 124);\nvar ExecutionEnvironment = __webpack_require__(/*! fbjs/lib/ExecutionEnvironment */ 27);\nvar ReactDOMComponentTree = __webpack_require__(/*! ./ReactDOMComponentTree */ 24);\nvar ReactInputSelection = __webpack_require__(/*! ./ReactInputSelection */ 542);\nvar SyntheticEvent = __webpack_require__(/*! ./SyntheticEvent */ 59);\n\nvar getActiveElement = __webpack_require__(/*! fbjs/lib/getActiveElement */ 348);\nvar isTextInputElement = __webpack_require__(/*! ./isTextInputElement */ 554);\nvar shallowEqual = __webpack_require__(/*! fbjs/lib/shallowEqual */ 97);\n\nvar skipSelectionChangeEvent = ExecutionEnvironment.canUseDOM && 'documentMode' in document && document.documentMode <= 11;\n\nvar eventTypes = {\n select: {\n phasedRegistrationNames: {\n bubbled: 'onSelect',\n captured: 'onSelectCapture'\n },\n dependencies: ['topBlur', 'topContextMenu', 'topFocus', 'topKeyDown', 'topKeyUp', 'topMouseDown', 'topMouseUp', 'topSelectionChange']\n }\n};\n\nvar activeElement = null;\nvar activeElementInst = null;\nvar lastSelection = null;\nvar mouseDown = false;\n\n// Track whether a listener exists for this plugin. If none exist, we do\n// not extract events. See #3639.\nvar hasListener = false;\n\n/**\n * Get an object which is a unique representation of the current selection.\n *\n * The return value will not be consistent across nodes or browsers, but\n * two identical selections on the same node will return identical objects.\n *\n * @param {DOMElement} node\n * @return {object}\n */\nfunction getSelection(node) {\n if ('selectionStart' in node && ReactInputSelection.hasSelectionCapabilities(node)) {\n return {\n start: node.selectionStart,\n end: node.selectionEnd\n };\n } else if (window.getSelection) {\n var selection = window.getSelection();\n return {\n anchorNode: selection.anchorNode,\n anchorOffset: selection.anchorOffset,\n focusNode: selection.focusNode,\n focusOffset: selection.focusOffset\n };\n } else if (document.selection) {\n var range = document.selection.createRange();\n return {\n parentElement: range.parentElement(),\n text: range.text,\n top: range.boundingTop,\n left: range.boundingLeft\n };\n }\n}\n\n/**\n * Poll selection to see whether it's changed.\n *\n * @param {object} nativeEvent\n * @return {?SyntheticEvent}\n */\nfunction constructSelectEvent(nativeEvent, nativeEventTarget) {\n // Ensure we have the right element, and that the user is not dragging a\n // selection (this matches native `select` event behavior). In HTML5, select\n // fires only on input and textarea thus if there's no focused element we\n // won't dispatch.\n if (mouseDown || activeElement == null || activeElement !== getActiveElement()) {\n return null;\n }\n\n // Only fire when selection has actually changed.\n var currentSelection = getSelection(activeElement);\n if (!lastSelection || !shallowEqual(lastSelection, currentSelection)) {\n lastSelection = currentSelection;\n\n var syntheticEvent = SyntheticEvent.getPooled(eventTypes.select, activeElementInst, nativeEvent, nativeEventTarget);\n\n syntheticEvent.type = 'select';\n syntheticEvent.target = activeElement;\n\n EventPropagators.accumulateTwoPhaseDispatches(syntheticEvent);\n\n return syntheticEvent;\n }\n\n return null;\n}\n\n/**\n * This plugin creates an `onSelect` event that normalizes select events\n * across form elements.\n *\n * Supported elements are:\n * - input (see `isTextInputElement`)\n * - textarea\n * - contentEditable\n *\n * This differs from native browser implementations in the following ways:\n * - Fires on contentEditable fields as well as inputs.\n * - Fires for collapsed selection.\n * - Fires after user input.\n */\nvar SelectEventPlugin = {\n\n eventTypes: eventTypes,\n\n extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {\n if (!hasListener) {\n return null;\n }\n\n var targetNode = targetInst ? ReactDOMComponentTree.getNodeFromInstance(targetInst) : window;\n\n switch (topLevelType) {\n // Track the input node that has focus.\n case 'topFocus':\n if (isTextInputElement(targetNode) || targetNode.contentEditable === 'true') {\n activeElement = targetNode;\n activeElementInst = targetInst;\n lastSelection = null;\n }\n break;\n case 'topBlur':\n activeElement = null;\n activeElementInst = null;\n lastSelection = null;\n break;\n\n // Don't fire the event while the user is dragging. This matches the\n // semantics of the native select event.\n case 'topMouseDown':\n mouseDown = true;\n break;\n case 'topContextMenu':\n case 'topMouseUp':\n mouseDown = false;\n return constructSelectEvent(nativeEvent, nativeEventTarget);\n\n // Chrome and IE fire non-standard event when selection is changed (and\n // sometimes when it hasn't). IE's event fires out of order with respect\n // to key and input events on deletion, so we discard it.\n //\n // Firefox doesn't support selectionchange, so check selection status\n // after each key entry. The selection changes after keydown and before\n // keyup, but we check on keydown as well in the case of holding down a\n // key, when multiple keydown events are fired but only one keyup is.\n // This is also our approach for IE handling, for the reason above.\n case 'topSelectionChange':\n if (skipSelectionChangeEvent) {\n break;\n }\n // falls through\n case 'topKeyDown':\n case 'topKeyUp':\n return constructSelectEvent(nativeEvent, nativeEventTarget);\n }\n\n return null;\n },\n\n didPutListener: function (inst, registrationName, listener) {\n if (registrationName === 'onSelect') {\n hasListener = true;\n }\n }\n};\n\nmodule.exports = SelectEventPlugin;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/SelectEventPlugin.js\n// module id = 1361\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/SelectEventPlugin.js?", + ); + + /***/ + }, + /* 1362 */ + /* unknown exports provided */ + /* all exports used */ + /*!**********************************************!*\ + !*** ./~/react-dom/lib/SimpleEventPlugin.js ***! + \**********************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * \n */\n\n\n\nvar _prodInvariant = __webpack_require__(/*! ./reactProdInvariant */ 17);\n\nvar EventListener = __webpack_require__(/*! fbjs/lib/EventListener */ 346);\nvar EventPropagators = __webpack_require__(/*! ./EventPropagators */ 124);\nvar ReactDOMComponentTree = __webpack_require__(/*! ./ReactDOMComponentTree */ 24);\nvar SyntheticAnimationEvent = __webpack_require__(/*! ./SyntheticAnimationEvent */ 1363);\nvar SyntheticClipboardEvent = __webpack_require__(/*! ./SyntheticClipboardEvent */ 1364);\nvar SyntheticEvent = __webpack_require__(/*! ./SyntheticEvent */ 59);\nvar SyntheticFocusEvent = __webpack_require__(/*! ./SyntheticFocusEvent */ 1367);\nvar SyntheticKeyboardEvent = __webpack_require__(/*! ./SyntheticKeyboardEvent */ 1369);\nvar SyntheticMouseEvent = __webpack_require__(/*! ./SyntheticMouseEvent */ 170);\nvar SyntheticDragEvent = __webpack_require__(/*! ./SyntheticDragEvent */ 1366);\nvar SyntheticTouchEvent = __webpack_require__(/*! ./SyntheticTouchEvent */ 1370);\nvar SyntheticTransitionEvent = __webpack_require__(/*! ./SyntheticTransitionEvent */ 1371);\nvar SyntheticUIEvent = __webpack_require__(/*! ./SyntheticUIEvent */ 126);\nvar SyntheticWheelEvent = __webpack_require__(/*! ./SyntheticWheelEvent */ 1372);\n\nvar emptyFunction = __webpack_require__(/*! fbjs/lib/emptyFunction */ 40);\nvar getEventCharCode = __webpack_require__(/*! ./getEventCharCode */ 254);\nvar invariant = __webpack_require__(/*! fbjs/lib/invariant */ 12);\n\n/**\n * Turns\n * ['abort', ...]\n * into\n * eventTypes = {\n * 'abort': {\n * phasedRegistrationNames: {\n * bubbled: 'onAbort',\n * captured: 'onAbortCapture',\n * },\n * dependencies: ['topAbort'],\n * },\n * ...\n * };\n * topLevelEventsToDispatchConfig = {\n * 'topAbort': { sameConfig }\n * };\n */\nvar eventTypes = {};\nvar topLevelEventsToDispatchConfig = {};\n['abort', 'animationEnd', 'animationIteration', 'animationStart', 'blur', 'canPlay', 'canPlayThrough', 'click', 'contextMenu', 'copy', 'cut', 'doubleClick', 'drag', 'dragEnd', 'dragEnter', 'dragExit', 'dragLeave', 'dragOver', 'dragStart', 'drop', 'durationChange', 'emptied', 'encrypted', 'ended', 'error', 'focus', 'input', 'invalid', 'keyDown', 'keyPress', 'keyUp', 'load', 'loadedData', 'loadedMetadata', 'loadStart', 'mouseDown', 'mouseMove', 'mouseOut', 'mouseOver', 'mouseUp', 'paste', 'pause', 'play', 'playing', 'progress', 'rateChange', 'reset', 'scroll', 'seeked', 'seeking', 'stalled', 'submit', 'suspend', 'timeUpdate', 'touchCancel', 'touchEnd', 'touchMove', 'touchStart', 'transitionEnd', 'volumeChange', 'waiting', 'wheel'].forEach(function (event) {\n var capitalizedEvent = event[0].toUpperCase() + event.slice(1);\n var onEvent = 'on' + capitalizedEvent;\n var topEvent = 'top' + capitalizedEvent;\n\n var type = {\n phasedRegistrationNames: {\n bubbled: onEvent,\n captured: onEvent + 'Capture'\n },\n dependencies: [topEvent]\n };\n eventTypes[event] = type;\n topLevelEventsToDispatchConfig[topEvent] = type;\n});\n\nvar onClickListeners = {};\n\nfunction getDictionaryKey(inst) {\n // Prevents V8 performance issue:\n // https://github.com/facebook/react/pull/7232\n return '.' + inst._rootNodeID;\n}\n\nfunction isInteractive(tag) {\n return tag === 'button' || tag === 'input' || tag === 'select' || tag === 'textarea';\n}\n\nvar SimpleEventPlugin = {\n\n eventTypes: eventTypes,\n\n extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {\n var dispatchConfig = topLevelEventsToDispatchConfig[topLevelType];\n if (!dispatchConfig) {\n return null;\n }\n var EventConstructor;\n switch (topLevelType) {\n case 'topAbort':\n case 'topCanPlay':\n case 'topCanPlayThrough':\n case 'topDurationChange':\n case 'topEmptied':\n case 'topEncrypted':\n case 'topEnded':\n case 'topError':\n case 'topInput':\n case 'topInvalid':\n case 'topLoad':\n case 'topLoadedData':\n case 'topLoadedMetadata':\n case 'topLoadStart':\n case 'topPause':\n case 'topPlay':\n case 'topPlaying':\n case 'topProgress':\n case 'topRateChange':\n case 'topReset':\n case 'topSeeked':\n case 'topSeeking':\n case 'topStalled':\n case 'topSubmit':\n case 'topSuspend':\n case 'topTimeUpdate':\n case 'topVolumeChange':\n case 'topWaiting':\n // HTML Events\n // @see http://www.w3.org/TR/html5/index.html#events-0\n EventConstructor = SyntheticEvent;\n break;\n case 'topKeyPress':\n // Firefox creates a keypress event for function keys too. This removes\n // the unwanted keypress events. Enter is however both printable and\n // non-printable. One would expect Tab to be as well (but it isn't).\n if (getEventCharCode(nativeEvent) === 0) {\n return null;\n }\n /* falls through */\n case 'topKeyDown':\n case 'topKeyUp':\n EventConstructor = SyntheticKeyboardEvent;\n break;\n case 'topBlur':\n case 'topFocus':\n EventConstructor = SyntheticFocusEvent;\n break;\n case 'topClick':\n // Firefox creates a click event on right mouse clicks. This removes the\n // unwanted click events.\n if (nativeEvent.button === 2) {\n return null;\n }\n /* falls through */\n case 'topDoubleClick':\n case 'topMouseDown':\n case 'topMouseMove':\n case 'topMouseUp':\n // TODO: Disabled elements should not respond to mouse events\n /* falls through */\n case 'topMouseOut':\n case 'topMouseOver':\n case 'topContextMenu':\n EventConstructor = SyntheticMouseEvent;\n break;\n case 'topDrag':\n case 'topDragEnd':\n case 'topDragEnter':\n case 'topDragExit':\n case 'topDragLeave':\n case 'topDragOver':\n case 'topDragStart':\n case 'topDrop':\n EventConstructor = SyntheticDragEvent;\n break;\n case 'topTouchCancel':\n case 'topTouchEnd':\n case 'topTouchMove':\n case 'topTouchStart':\n EventConstructor = SyntheticTouchEvent;\n break;\n case 'topAnimationEnd':\n case 'topAnimationIteration':\n case 'topAnimationStart':\n EventConstructor = SyntheticAnimationEvent;\n break;\n case 'topTransitionEnd':\n EventConstructor = SyntheticTransitionEvent;\n break;\n case 'topScroll':\n EventConstructor = SyntheticUIEvent;\n break;\n case 'topWheel':\n EventConstructor = SyntheticWheelEvent;\n break;\n case 'topCopy':\n case 'topCut':\n case 'topPaste':\n EventConstructor = SyntheticClipboardEvent;\n break;\n }\n !EventConstructor ? true ? invariant(false, 'SimpleEventPlugin: Unhandled event type, `%s`.', topLevelType) : _prodInvariant('86', topLevelType) : void 0;\n var event = EventConstructor.getPooled(dispatchConfig, targetInst, nativeEvent, nativeEventTarget);\n EventPropagators.accumulateTwoPhaseDispatches(event);\n return event;\n },\n\n didPutListener: function (inst, registrationName, listener) {\n // Mobile Safari does not fire properly bubble click events on\n // non-interactive elements, which means delegated click listeners do not\n // fire. The workaround for this bug involves attaching an empty click\n // listener on the target node.\n // http://www.quirksmode.org/blog/archives/2010/09/click_event_del.html\n if (registrationName === 'onClick' && !isInteractive(inst._tag)) {\n var key = getDictionaryKey(inst);\n var node = ReactDOMComponentTree.getNodeFromInstance(inst);\n if (!onClickListeners[key]) {\n onClickListeners[key] = EventListener.listen(node, 'click', emptyFunction);\n }\n }\n },\n\n willDeleteListener: function (inst, registrationName) {\n if (registrationName === 'onClick' && !isInteractive(inst._tag)) {\n var key = getDictionaryKey(inst);\n onClickListeners[key].remove();\n delete onClickListeners[key];\n }\n }\n\n};\n\nmodule.exports = SimpleEventPlugin;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/SimpleEventPlugin.js\n// module id = 1362\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/SimpleEventPlugin.js?", + ); + + /***/ + }, + /* 1363 */ + /* unknown exports provided */ + /* all exports used */ + /*!****************************************************!*\ + !*** ./~/react-dom/lib/SyntheticAnimationEvent.js ***! + \****************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar SyntheticEvent = __webpack_require__(/*! ./SyntheticEvent */ 59);\n\n/**\n * @interface Event\n * @see http://www.w3.org/TR/css3-animations/#AnimationEvent-interface\n * @see https://developer.mozilla.org/en-US/docs/Web/API/AnimationEvent\n */\nvar AnimationEventInterface = {\n animationName: null,\n elapsedTime: null,\n pseudoElement: null\n};\n\n/**\n * @param {object} dispatchConfig Configuration used to dispatch this event.\n * @param {string} dispatchMarker Marker identifying the event target.\n * @param {object} nativeEvent Native browser event.\n * @extends {SyntheticEvent}\n */\nfunction SyntheticAnimationEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {\n return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);\n}\n\nSyntheticEvent.augmentClass(SyntheticAnimationEvent, AnimationEventInterface);\n\nmodule.exports = SyntheticAnimationEvent;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/SyntheticAnimationEvent.js\n// module id = 1363\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/SyntheticAnimationEvent.js?', + ); + + /***/ + }, + /* 1364 */ + /* unknown exports provided */ + /* all exports used */ + /*!****************************************************!*\ + !*** ./~/react-dom/lib/SyntheticClipboardEvent.js ***! + \****************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar SyntheticEvent = __webpack_require__(/*! ./SyntheticEvent */ 59);\n\n/**\n * @interface Event\n * @see http://www.w3.org/TR/clipboard-apis/\n */\nvar ClipboardEventInterface = {\n clipboardData: function (event) {\n return 'clipboardData' in event ? event.clipboardData : window.clipboardData;\n }\n};\n\n/**\n * @param {object} dispatchConfig Configuration used to dispatch this event.\n * @param {string} dispatchMarker Marker identifying the event target.\n * @param {object} nativeEvent Native browser event.\n * @extends {SyntheticUIEvent}\n */\nfunction SyntheticClipboardEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {\n return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);\n}\n\nSyntheticEvent.augmentClass(SyntheticClipboardEvent, ClipboardEventInterface);\n\nmodule.exports = SyntheticClipboardEvent;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/SyntheticClipboardEvent.js\n// module id = 1364\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/SyntheticClipboardEvent.js?", + ); + + /***/ + }, + /* 1365 */ + /* unknown exports provided */ + /* all exports used */ + /*!******************************************************!*\ + !*** ./~/react-dom/lib/SyntheticCompositionEvent.js ***! + \******************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar SyntheticEvent = __webpack_require__(/*! ./SyntheticEvent */ 59);\n\n/**\n * @interface Event\n * @see http://www.w3.org/TR/DOM-Level-3-Events/#events-compositionevents\n */\nvar CompositionEventInterface = {\n data: null\n};\n\n/**\n * @param {object} dispatchConfig Configuration used to dispatch this event.\n * @param {string} dispatchMarker Marker identifying the event target.\n * @param {object} nativeEvent Native browser event.\n * @extends {SyntheticUIEvent}\n */\nfunction SyntheticCompositionEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {\n return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);\n}\n\nSyntheticEvent.augmentClass(SyntheticCompositionEvent, CompositionEventInterface);\n\nmodule.exports = SyntheticCompositionEvent;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/SyntheticCompositionEvent.js\n// module id = 1365\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/SyntheticCompositionEvent.js?', + ); + + /***/ + }, + /* 1366 */ + /* unknown exports provided */ + /* all exports used */ + /*!***********************************************!*\ + !*** ./~/react-dom/lib/SyntheticDragEvent.js ***! + \***********************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar SyntheticMouseEvent = __webpack_require__(/*! ./SyntheticMouseEvent */ 170);\n\n/**\n * @interface DragEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\nvar DragEventInterface = {\n dataTransfer: null\n};\n\n/**\n * @param {object} dispatchConfig Configuration used to dispatch this event.\n * @param {string} dispatchMarker Marker identifying the event target.\n * @param {object} nativeEvent Native browser event.\n * @extends {SyntheticUIEvent}\n */\nfunction SyntheticDragEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {\n return SyntheticMouseEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);\n}\n\nSyntheticMouseEvent.augmentClass(SyntheticDragEvent, DragEventInterface);\n\nmodule.exports = SyntheticDragEvent;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/SyntheticDragEvent.js\n// module id = 1366\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/SyntheticDragEvent.js?', + ); + + /***/ + }, + /* 1367 */ + /* unknown exports provided */ + /* all exports used */ + /*!************************************************!*\ + !*** ./~/react-dom/lib/SyntheticFocusEvent.js ***! + \************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar SyntheticUIEvent = __webpack_require__(/*! ./SyntheticUIEvent */ 126);\n\n/**\n * @interface FocusEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\nvar FocusEventInterface = {\n relatedTarget: null\n};\n\n/**\n * @param {object} dispatchConfig Configuration used to dispatch this event.\n * @param {string} dispatchMarker Marker identifying the event target.\n * @param {object} nativeEvent Native browser event.\n * @extends {SyntheticUIEvent}\n */\nfunction SyntheticFocusEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {\n return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);\n}\n\nSyntheticUIEvent.augmentClass(SyntheticFocusEvent, FocusEventInterface);\n\nmodule.exports = SyntheticFocusEvent;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/SyntheticFocusEvent.js\n// module id = 1367\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/SyntheticFocusEvent.js?', + ); + + /***/ + }, + /* 1368 */ + /* unknown exports provided */ + /* all exports used */ + /*!************************************************!*\ + !*** ./~/react-dom/lib/SyntheticInputEvent.js ***! + \************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar SyntheticEvent = __webpack_require__(/*! ./SyntheticEvent */ 59);\n\n/**\n * @interface Event\n * @see http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105\n * /#events-inputevents\n */\nvar InputEventInterface = {\n data: null\n};\n\n/**\n * @param {object} dispatchConfig Configuration used to dispatch this event.\n * @param {string} dispatchMarker Marker identifying the event target.\n * @param {object} nativeEvent Native browser event.\n * @extends {SyntheticUIEvent}\n */\nfunction SyntheticInputEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {\n return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);\n}\n\nSyntheticEvent.augmentClass(SyntheticInputEvent, InputEventInterface);\n\nmodule.exports = SyntheticInputEvent;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/SyntheticInputEvent.js\n// module id = 1368\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/SyntheticInputEvent.js?', + ); + + /***/ + }, + /* 1369 */ + /* unknown exports provided */ + /* all exports used */ + /*!***************************************************!*\ + !*** ./~/react-dom/lib/SyntheticKeyboardEvent.js ***! + \***************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar SyntheticUIEvent = __webpack_require__(/*! ./SyntheticUIEvent */ 126);\n\nvar getEventCharCode = __webpack_require__(/*! ./getEventCharCode */ 254);\nvar getEventKey = __webpack_require__(/*! ./getEventKey */ 1378);\nvar getEventModifierState = __webpack_require__(/*! ./getEventModifierState */ 255);\n\n/**\n * @interface KeyboardEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\nvar KeyboardEventInterface = {\n key: getEventKey,\n location: null,\n ctrlKey: null,\n shiftKey: null,\n altKey: null,\n metaKey: null,\n repeat: null,\n locale: null,\n getModifierState: getEventModifierState,\n // Legacy Interface\n charCode: function (event) {\n // `charCode` is the result of a KeyPress event and represents the value of\n // the actual printable character.\n\n // KeyPress is deprecated, but its replacement is not yet final and not\n // implemented in any major browser. Only KeyPress has charCode.\n if (event.type === 'keypress') {\n return getEventCharCode(event);\n }\n return 0;\n },\n keyCode: function (event) {\n // `keyCode` is the result of a KeyDown/Up event and represents the value of\n // physical keyboard key.\n\n // The actual meaning of the value depends on the users' keyboard layout\n // which cannot be detected. Assuming that it is a US keyboard layout\n // provides a surprisingly accurate mapping for US and European users.\n // Due to this, it is left to the user to implement at this time.\n if (event.type === 'keydown' || event.type === 'keyup') {\n return event.keyCode;\n }\n return 0;\n },\n which: function (event) {\n // `which` is an alias for either `keyCode` or `charCode` depending on the\n // type of the event.\n if (event.type === 'keypress') {\n return getEventCharCode(event);\n }\n if (event.type === 'keydown' || event.type === 'keyup') {\n return event.keyCode;\n }\n return 0;\n }\n};\n\n/**\n * @param {object} dispatchConfig Configuration used to dispatch this event.\n * @param {string} dispatchMarker Marker identifying the event target.\n * @param {object} nativeEvent Native browser event.\n * @extends {SyntheticUIEvent}\n */\nfunction SyntheticKeyboardEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {\n return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);\n}\n\nSyntheticUIEvent.augmentClass(SyntheticKeyboardEvent, KeyboardEventInterface);\n\nmodule.exports = SyntheticKeyboardEvent;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/SyntheticKeyboardEvent.js\n// module id = 1369\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/SyntheticKeyboardEvent.js?", + ); + + /***/ + }, + /* 1370 */ + /* unknown exports provided */ + /* all exports used */ + /*!************************************************!*\ + !*** ./~/react-dom/lib/SyntheticTouchEvent.js ***! + \************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar SyntheticUIEvent = __webpack_require__(/*! ./SyntheticUIEvent */ 126);\n\nvar getEventModifierState = __webpack_require__(/*! ./getEventModifierState */ 255);\n\n/**\n * @interface TouchEvent\n * @see http://www.w3.org/TR/touch-events/\n */\nvar TouchEventInterface = {\n touches: null,\n targetTouches: null,\n changedTouches: null,\n altKey: null,\n metaKey: null,\n ctrlKey: null,\n shiftKey: null,\n getModifierState: getEventModifierState\n};\n\n/**\n * @param {object} dispatchConfig Configuration used to dispatch this event.\n * @param {string} dispatchMarker Marker identifying the event target.\n * @param {object} nativeEvent Native browser event.\n * @extends {SyntheticUIEvent}\n */\nfunction SyntheticTouchEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {\n return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);\n}\n\nSyntheticUIEvent.augmentClass(SyntheticTouchEvent, TouchEventInterface);\n\nmodule.exports = SyntheticTouchEvent;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/SyntheticTouchEvent.js\n// module id = 1370\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/SyntheticTouchEvent.js?', + ); + + /***/ + }, + /* 1371 */ + /* unknown exports provided */ + /* all exports used */ + /*!*****************************************************!*\ + !*** ./~/react-dom/lib/SyntheticTransitionEvent.js ***! + \*****************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar SyntheticEvent = __webpack_require__(/*! ./SyntheticEvent */ 59);\n\n/**\n * @interface Event\n * @see http://www.w3.org/TR/2009/WD-css3-transitions-20090320/#transition-events-\n * @see https://developer.mozilla.org/en-US/docs/Web/API/TransitionEvent\n */\nvar TransitionEventInterface = {\n propertyName: null,\n elapsedTime: null,\n pseudoElement: null\n};\n\n/**\n * @param {object} dispatchConfig Configuration used to dispatch this event.\n * @param {string} dispatchMarker Marker identifying the event target.\n * @param {object} nativeEvent Native browser event.\n * @extends {SyntheticEvent}\n */\nfunction SyntheticTransitionEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {\n return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);\n}\n\nSyntheticEvent.augmentClass(SyntheticTransitionEvent, TransitionEventInterface);\n\nmodule.exports = SyntheticTransitionEvent;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/SyntheticTransitionEvent.js\n// module id = 1371\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/SyntheticTransitionEvent.js?', + ); + + /***/ + }, + /* 1372 */ + /* unknown exports provided */ + /* all exports used */ + /*!************************************************!*\ + !*** ./~/react-dom/lib/SyntheticWheelEvent.js ***! + \************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar SyntheticMouseEvent = __webpack_require__(/*! ./SyntheticMouseEvent */ 170);\n\n/**\n * @interface WheelEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\nvar WheelEventInterface = {\n deltaX: function (event) {\n return 'deltaX' in event ? event.deltaX :\n // Fallback to `wheelDeltaX` for Webkit and normalize (right is positive).\n 'wheelDeltaX' in event ? -event.wheelDeltaX : 0;\n },\n deltaY: function (event) {\n return 'deltaY' in event ? event.deltaY :\n // Fallback to `wheelDeltaY` for Webkit and normalize (down is positive).\n 'wheelDeltaY' in event ? -event.wheelDeltaY :\n // Fallback to `wheelDelta` for IE<9 and normalize (down is positive).\n 'wheelDelta' in event ? -event.wheelDelta : 0;\n },\n deltaZ: null,\n\n // Browsers without \"deltaMode\" is reporting in raw wheel delta where one\n // notch on the scroll is always +/- 120, roughly equivalent to pixels.\n // A good approximation of DOM_DELTA_LINE (1) is 5% of viewport size or\n // ~40 pixels, for DOM_DELTA_SCREEN (2) it is 87.5% of viewport size.\n deltaMode: null\n};\n\n/**\n * @param {object} dispatchConfig Configuration used to dispatch this event.\n * @param {string} dispatchMarker Marker identifying the event target.\n * @param {object} nativeEvent Native browser event.\n * @extends {SyntheticMouseEvent}\n */\nfunction SyntheticWheelEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {\n return SyntheticMouseEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);\n}\n\nSyntheticMouseEvent.augmentClass(SyntheticWheelEvent, WheelEventInterface);\n\nmodule.exports = SyntheticWheelEvent;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/SyntheticWheelEvent.js\n// module id = 1372\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/SyntheticWheelEvent.js?", + ); + + /***/ + }, + /* 1373 */ + /* unknown exports provided */ + /* all exports used */ + /*!************************************!*\ + !*** ./~/react-dom/lib/adler32.js ***! + \************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * \n */\n\n\n\nvar MOD = 65521;\n\n// adler32 is not cryptographically strong, and is only used to sanity check that\n// markup generated on the server matches the markup generated on the client.\n// This implementation (a modified version of the SheetJS version) has been optimized\n// for our use case, at the expense of conforming to the adler32 specification\n// for non-ascii inputs.\nfunction adler32(data) {\n var a = 1;\n var b = 0;\n var i = 0;\n var l = data.length;\n var m = l & ~0x3;\n while (i < m) {\n var n = Math.min(i + 4096, m);\n for (; i < n; i += 4) {\n b += (a += data.charCodeAt(i)) + (a += data.charCodeAt(i + 1)) + (a += data.charCodeAt(i + 2)) + (a += data.charCodeAt(i + 3));\n }\n a %= MOD;\n b %= MOD;\n }\n for (; i < l; i++) {\n b += a += data.charCodeAt(i);\n }\n a %= MOD;\n b %= MOD;\n return a | b << 16;\n}\n\nmodule.exports = adler32;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/adler32.js\n// module id = 1373\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/adler32.js?', + ); + + /***/ + }, + /* 1374 */ + /* unknown exports provided */ + /* all exports used */ + /*!***********************************************!*\ + !*** ./~/react-dom/lib/checkReactTypeSpec.js ***! + \***********************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/* WEBPACK VAR INJECTION */(function(process) {/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar _prodInvariant = __webpack_require__(/*! ./reactProdInvariant */ 17);\n\nvar ReactPropTypeLocationNames = __webpack_require__(/*! ./ReactPropTypeLocationNames */ 1354);\nvar ReactPropTypesSecret = __webpack_require__(/*! ./ReactPropTypesSecret */ 546);\n\nvar invariant = __webpack_require__(/*! fbjs/lib/invariant */ 12);\nvar warning = __webpack_require__(/*! fbjs/lib/warning */ 13);\n\nvar ReactComponentTreeHook;\n\nif (typeof process !== 'undefined' && __webpack_require__.i({\"NODE_ENV\":\"dev\",\"RAILS_ENV\":undefined,\"SERVER_RENDERING\":true,\"HONEYBADGER_API_KEY\":undefined}) && \"dev\" === 'test') {\n // Temporary hack.\n // Inline requires don't work well with Jest:\n // https://github.com/facebook/react/issues/7240\n // Remove the inline requires when we don't need them anymore:\n // https://github.com/facebook/react/pull/7178\n ReactComponentTreeHook = __webpack_require__(/*! react/lib/ReactComponentTreeHook */ 37);\n}\n\nvar loggedTypeFailures = {};\n\n/**\n * Assert that the values match with the type specs.\n * Error messages are memorized and will only be shown once.\n *\n * @param {object} typeSpecs Map of name to a ReactPropType\n * @param {object} values Runtime values that need to be type-checked\n * @param {string} location e.g. \"prop\", \"context\", \"child context\"\n * @param {string} componentName Name of the component for error messages.\n * @param {?object} element The React element that is being type-checked\n * @param {?number} debugID The React component instance that is being type-checked\n * @private\n */\nfunction checkReactTypeSpec(typeSpecs, values, location, componentName, element, debugID) {\n for (var typeSpecName in typeSpecs) {\n if (typeSpecs.hasOwnProperty(typeSpecName)) {\n var error;\n // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n !(typeof typeSpecs[typeSpecName] === 'function') ? true ? invariant(false, '%s: %s type `%s` is invalid; it must be a function, usually from React.PropTypes.', componentName || 'React class', ReactPropTypeLocationNames[location], typeSpecName) : _prodInvariant('84', componentName || 'React class', ReactPropTypeLocationNames[location], typeSpecName) : void 0;\n error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);\n } catch (ex) {\n error = ex;\n }\n true ? warning(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', ReactPropTypeLocationNames[location], typeSpecName, typeof error) : void 0;\n if (error instanceof Error && !(error.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error.message] = true;\n\n var componentStackInfo = '';\n\n if (true) {\n if (!ReactComponentTreeHook) {\n ReactComponentTreeHook = __webpack_require__(/*! react/lib/ReactComponentTreeHook */ 37);\n }\n if (debugID !== null) {\n componentStackInfo = ReactComponentTreeHook.getStackAddendumByID(debugID);\n } else if (element !== null) {\n componentStackInfo = ReactComponentTreeHook.getCurrentStackAddendum(element);\n }\n }\n\n true ? warning(false, 'Failed %s type: %s%s', location, error.message, componentStackInfo) : void 0;\n }\n }\n }\n}\n\nmodule.exports = checkReactTypeSpec;\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(/*! ./../../process/browser.js */ 164)))\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/checkReactTypeSpec.js\n// module id = 1374\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/checkReactTypeSpec.js?", + ); + + /***/ + }, + /* 1375 */ + /* unknown exports provided */ + /* all exports used */ + /*!************************************************!*\ + !*** ./~/react-dom/lib/dangerousStyleValue.js ***! + \************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar CSSProperty = __webpack_require__(/*! ./CSSProperty */ 531);\nvar warning = __webpack_require__(/*! fbjs/lib/warning */ 13);\n\nvar isUnitlessNumber = CSSProperty.isUnitlessNumber;\nvar styleWarnings = {};\n\n/**\n * Convert a value into the proper css writable value. The style name `name`\n * should be logical (no hyphens), as specified\n * in `CSSProperty.isUnitlessNumber`.\n *\n * @param {string} name CSS property name such as `topMargin`.\n * @param {*} value CSS property value such as `10px`.\n * @param {ReactDOMComponent} component\n * @return {string} Normalized style value with dimensions applied.\n */\nfunction dangerousStyleValue(name, value, component) {\n // Note that we've removed escapeTextForBrowser() calls here since the\n // whole string will be escaped when the attribute is injected into\n // the markup. If you provide unsafe user data here they can inject\n // arbitrary CSS which may be problematic (I couldn't repro this):\n // https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet\n // http://www.thespanner.co.uk/2007/11/26/ultimate-xss-css-injection/\n // This is not an XSS hole but instead a potential CSS injection issue\n // which has lead to a greater discussion about how we're going to\n // trust URLs moving forward. See #2115901\n\n var isEmpty = value == null || typeof value === 'boolean' || value === '';\n if (isEmpty) {\n return '';\n }\n\n var isNonNumeric = isNaN(value);\n if (isNonNumeric || value === 0 || isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name]) {\n return '' + value; // cast to string\n }\n\n if (typeof value === 'string') {\n if (true) {\n // Allow '0' to pass through without warning. 0 is already special and\n // doesn't require units, so we don't need to warn about it.\n if (component && value !== '0') {\n var owner = component._currentElement._owner;\n var ownerName = owner ? owner.getName() : null;\n if (ownerName && !styleWarnings[ownerName]) {\n styleWarnings[ownerName] = {};\n }\n var warned = false;\n if (ownerName) {\n var warnings = styleWarnings[ownerName];\n warned = warnings[name];\n if (!warned) {\n warnings[name] = true;\n }\n }\n if (!warned) {\n true ? warning(false, 'a `%s` tag (owner: `%s`) was passed a numeric string value ' + 'for CSS property `%s` (value: `%s`) which will be treated ' + 'as a unitless number in a future version of React.', component._currentElement.type, ownerName || 'unknown', name, value) : void 0;\n }\n }\n }\n value = value.trim();\n }\n return value + 'px';\n}\n\nmodule.exports = dangerousStyleValue;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/dangerousStyleValue.js\n// module id = 1375\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/dangerousStyleValue.js?", + ); + + /***/ + }, + /* 1376 */ + /* unknown exports provided */ + /* all exports used */ + /*!****************************************!*\ + !*** ./~/react-dom/lib/findDOMNode.js ***! + \****************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar _prodInvariant = __webpack_require__(/*! ./reactProdInvariant */ 17);\n\nvar ReactCurrentOwner = __webpack_require__(/*! react/lib/ReactCurrentOwner */ 55);\nvar ReactDOMComponentTree = __webpack_require__(/*! ./ReactDOMComponentTree */ 24);\nvar ReactInstanceMap = __webpack_require__(/*! ./ReactInstanceMap */ 125);\n\nvar getHostComponentFromComposite = __webpack_require__(/*! ./getHostComponentFromComposite */ 552);\nvar invariant = __webpack_require__(/*! fbjs/lib/invariant */ 12);\nvar warning = __webpack_require__(/*! fbjs/lib/warning */ 13);\n\n/**\n * Returns the DOM node rendered by this element.\n *\n * See https://facebook.github.io/react/docs/top-level-api.html#reactdom.finddomnode\n *\n * @param {ReactComponent|DOMElement} componentOrElement\n * @return {?DOMElement} The root node of this element.\n */\nfunction findDOMNode(componentOrElement) {\n if (true) {\n var owner = ReactCurrentOwner.current;\n if (owner !== null) {\n true ? warning(owner._warnedAboutRefsInRender, '%s is accessing findDOMNode inside its render(). ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', owner.getName() || 'A component') : void 0;\n owner._warnedAboutRefsInRender = true;\n }\n }\n if (componentOrElement == null) {\n return null;\n }\n if (componentOrElement.nodeType === 1) {\n return componentOrElement;\n }\n\n var inst = ReactInstanceMap.get(componentOrElement);\n if (inst) {\n inst = getHostComponentFromComposite(inst);\n return inst ? ReactDOMComponentTree.getNodeFromInstance(inst) : null;\n }\n\n if (typeof componentOrElement.render === 'function') {\n true ? true ? invariant(false, 'findDOMNode was called on an unmounted component.') : _prodInvariant('44') : void 0;\n } else {\n true ? true ? invariant(false, 'Element appears to be neither ReactComponent nor DOMNode (keys: %s)', Object.keys(componentOrElement)) : _prodInvariant('45', Object.keys(componentOrElement)) : void 0;\n }\n}\n\nmodule.exports = findDOMNode;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/findDOMNode.js\n// module id = 1376\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/findDOMNode.js?", + ); + + /***/ + }, + /* 1377 */ + /* unknown exports provided */ + /* all exports used */ + /*!********************************************!*\ + !*** ./~/react-dom/lib/flattenChildren.js ***! + \********************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/* WEBPACK VAR INJECTION */(function(process) {/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * \n */\n\n\n\nvar KeyEscapeUtils = __webpack_require__(/*! ./KeyEscapeUtils */ 248);\nvar traverseAllChildren = __webpack_require__(/*! ./traverseAllChildren */ 556);\nvar warning = __webpack_require__(/*! fbjs/lib/warning */ 13);\n\nvar ReactComponentTreeHook;\n\nif (typeof process !== 'undefined' && __webpack_require__.i({\"NODE_ENV\":\"dev\",\"RAILS_ENV\":undefined,\"SERVER_RENDERING\":true,\"HONEYBADGER_API_KEY\":undefined}) && \"dev\" === 'test') {\n // Temporary hack.\n // Inline requires don't work well with Jest:\n // https://github.com/facebook/react/issues/7240\n // Remove the inline requires when we don't need them anymore:\n // https://github.com/facebook/react/pull/7178\n ReactComponentTreeHook = __webpack_require__(/*! react/lib/ReactComponentTreeHook */ 37);\n}\n\n/**\n * @param {function} traverseContext Context passed through traversal.\n * @param {?ReactComponent} child React child component.\n * @param {!string} name String name of key path to child.\n * @param {number=} selfDebugID Optional debugID of the current internal instance.\n */\nfunction flattenSingleChildIntoContext(traverseContext, child, name, selfDebugID) {\n // We found a component instance.\n if (traverseContext && typeof traverseContext === 'object') {\n var result = traverseContext;\n var keyUnique = result[name] === undefined;\n if (true) {\n if (!ReactComponentTreeHook) {\n ReactComponentTreeHook = __webpack_require__(/*! react/lib/ReactComponentTreeHook */ 37);\n }\n if (!keyUnique) {\n true ? warning(false, 'flattenChildren(...): Encountered two children with the same key, ' + '`%s`. Child keys must be unique; when two children share a key, only ' + 'the first child will be used.%s', KeyEscapeUtils.unescape(name), ReactComponentTreeHook.getStackAddendumByID(selfDebugID)) : void 0;\n }\n }\n if (keyUnique && child != null) {\n result[name] = child;\n }\n }\n}\n\n/**\n * Flattens children that are typically specified as `props.children`. Any null\n * children will not be included in the resulting object.\n * @return {!object} flattened children keyed by name.\n */\nfunction flattenChildren(children, selfDebugID) {\n if (children == null) {\n return children;\n }\n var result = {};\n\n if (true) {\n traverseAllChildren(children, function (traverseContext, child, name) {\n return flattenSingleChildIntoContext(traverseContext, child, name, selfDebugID);\n }, result);\n } else {\n traverseAllChildren(children, flattenSingleChildIntoContext, result);\n }\n return result;\n}\n\nmodule.exports = flattenChildren;\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(/*! ./../../process/browser.js */ 164)))\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/flattenChildren.js\n// module id = 1377\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/flattenChildren.js?", + ); + + /***/ + }, + /* 1378 */ + /* unknown exports provided */ + /* all exports used */ + /*!****************************************!*\ + !*** ./~/react-dom/lib/getEventKey.js ***! + \****************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar getEventCharCode = __webpack_require__(/*! ./getEventCharCode */ 254);\n\n/**\n * Normalization of deprecated HTML5 `key` values\n * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names\n */\nvar normalizeKey = {\n 'Esc': 'Escape',\n 'Spacebar': ' ',\n 'Left': 'ArrowLeft',\n 'Up': 'ArrowUp',\n 'Right': 'ArrowRight',\n 'Down': 'ArrowDown',\n 'Del': 'Delete',\n 'Win': 'OS',\n 'Menu': 'ContextMenu',\n 'Apps': 'ContextMenu',\n 'Scroll': 'ScrollLock',\n 'MozPrintableKey': 'Unidentified'\n};\n\n/**\n * Translation from legacy `keyCode` to HTML5 `key`\n * Only special keys supported, all others depend on keyboard layout or browser\n * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names\n */\nvar translateToKey = {\n 8: 'Backspace',\n 9: 'Tab',\n 12: 'Clear',\n 13: 'Enter',\n 16: 'Shift',\n 17: 'Control',\n 18: 'Alt',\n 19: 'Pause',\n 20: 'CapsLock',\n 27: 'Escape',\n 32: ' ',\n 33: 'PageUp',\n 34: 'PageDown',\n 35: 'End',\n 36: 'Home',\n 37: 'ArrowLeft',\n 38: 'ArrowUp',\n 39: 'ArrowRight',\n 40: 'ArrowDown',\n 45: 'Insert',\n 46: 'Delete',\n 112: 'F1', 113: 'F2', 114: 'F3', 115: 'F4', 116: 'F5', 117: 'F6',\n 118: 'F7', 119: 'F8', 120: 'F9', 121: 'F10', 122: 'F11', 123: 'F12',\n 144: 'NumLock',\n 145: 'ScrollLock',\n 224: 'Meta'\n};\n\n/**\n * @param {object} nativeEvent Native browser event.\n * @return {string} Normalized `key` property.\n */\nfunction getEventKey(nativeEvent) {\n if (nativeEvent.key) {\n // Normalize inconsistent values reported by browsers due to\n // implementations of a working draft specification.\n\n // FireFox implements `key` but returns `MozPrintableKey` for all\n // printable characters (normalized to `Unidentified`), ignore it.\n var key = normalizeKey[nativeEvent.key] || nativeEvent.key;\n if (key !== 'Unidentified') {\n return key;\n }\n }\n\n // Browser does not implement `key`, polyfill as much of it as we can.\n if (nativeEvent.type === 'keypress') {\n var charCode = getEventCharCode(nativeEvent);\n\n // The enter-key is technically both printable and non-printable and can\n // thus be captured by `keypress`, no other non-printable key should.\n return charCode === 13 ? 'Enter' : String.fromCharCode(charCode);\n }\n if (nativeEvent.type === 'keydown' || nativeEvent.type === 'keyup') {\n // While user keyboard layout determines the actual meaning of each\n // `keyCode` value, almost all function keys have a universal value.\n return translateToKey[nativeEvent.keyCode] || 'Unidentified';\n }\n return '';\n}\n\nmodule.exports = getEventKey;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/getEventKey.js\n// module id = 1378\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/getEventKey.js?", + ); + + /***/ + }, + /* 1379 */ + /* unknown exports provided */ + /* all exports used */ + /*!******************************************!*\ + !*** ./~/react-dom/lib/getIteratorFn.js ***! + \******************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * \n */\n\n\n\n/* global Symbol */\n\nvar ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\nvar FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.\n\n/**\n * Returns the iterator method function contained on the iterable object.\n *\n * Be sure to invoke the function with the iterable as context:\n *\n * var iteratorFn = getIteratorFn(myIterable);\n * if (iteratorFn) {\n * var iterator = iteratorFn.call(myIterable);\n * ...\n * }\n *\n * @param {?object} maybeIterable\n * @return {?function}\n */\nfunction getIteratorFn(maybeIterable) {\n var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);\n if (typeof iteratorFn === 'function') {\n return iteratorFn;\n }\n}\n\nmodule.exports = getIteratorFn;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/getIteratorFn.js\n// module id = 1379\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/getIteratorFn.js?", + ); + + /***/ + }, + /* 1380 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************************!*\ + !*** ./~/react-dom/lib/getNextDebugID.js ***! + \*******************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * \n */\n\n\n\nvar nextDebugID = 1;\n\nfunction getNextDebugID() {\n return nextDebugID++;\n}\n\nmodule.exports = getNextDebugID;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/getNextDebugID.js\n// module id = 1380\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/getNextDebugID.js?', + ); + + /***/ + }, + /* 1381 */ + /* unknown exports provided */ + /* all exports used */ + /*!******************************************************!*\ + !*** ./~/react-dom/lib/getNodeForCharacterOffset.js ***! + \******************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\n/**\n * Given any node return the first leaf node without children.\n *\n * @param {DOMElement|DOMTextNode} node\n * @return {DOMElement|DOMTextNode}\n */\n\nfunction getLeafNode(node) {\n while (node && node.firstChild) {\n node = node.firstChild;\n }\n return node;\n}\n\n/**\n * Get the next sibling within a container. This will walk up the\n * DOM if a node's siblings have been exhausted.\n *\n * @param {DOMElement|DOMTextNode} node\n * @return {?DOMElement|DOMTextNode}\n */\nfunction getSiblingNode(node) {\n while (node) {\n if (node.nextSibling) {\n return node.nextSibling;\n }\n node = node.parentNode;\n }\n}\n\n/**\n * Get object describing the nodes which contain characters at offset.\n *\n * @param {DOMElement|DOMTextNode} root\n * @param {number} offset\n * @return {?object}\n */\nfunction getNodeForCharacterOffset(root, offset) {\n var node = getLeafNode(root);\n var nodeStart = 0;\n var nodeEnd = 0;\n\n while (node) {\n if (node.nodeType === 3) {\n nodeEnd = nodeStart + node.textContent.length;\n\n if (nodeStart <= offset && nodeEnd >= offset) {\n return {\n node: node,\n offset: offset - nodeStart\n };\n }\n\n nodeStart = nodeEnd;\n }\n\n node = getLeafNode(getSiblingNode(node));\n }\n}\n\nmodule.exports = getNodeForCharacterOffset;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/getNodeForCharacterOffset.js\n// module id = 1381\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/getNodeForCharacterOffset.js?", + ); + + /***/ + }, + /* 1382 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************************************!*\ + !*** ./~/react-dom/lib/getVendorPrefixedEventName.js ***! + \*******************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar ExecutionEnvironment = __webpack_require__(/*! fbjs/lib/ExecutionEnvironment */ 27);\n\n/**\n * Generate a mapping of standard vendor prefixes using the defined style property and event name.\n *\n * @param {string} styleProp\n * @param {string} eventName\n * @returns {object}\n */\nfunction makePrefixMap(styleProp, eventName) {\n var prefixes = {};\n\n prefixes[styleProp.toLowerCase()] = eventName.toLowerCase();\n prefixes['Webkit' + styleProp] = 'webkit' + eventName;\n prefixes['Moz' + styleProp] = 'moz' + eventName;\n prefixes['ms' + styleProp] = 'MS' + eventName;\n prefixes['O' + styleProp] = 'o' + eventName.toLowerCase();\n\n return prefixes;\n}\n\n/**\n * A list of event names to a configurable list of vendor prefixes.\n */\nvar vendorPrefixes = {\n animationend: makePrefixMap('Animation', 'AnimationEnd'),\n animationiteration: makePrefixMap('Animation', 'AnimationIteration'),\n animationstart: makePrefixMap('Animation', 'AnimationStart'),\n transitionend: makePrefixMap('Transition', 'TransitionEnd')\n};\n\n/**\n * Event names that have already been detected and prefixed (if applicable).\n */\nvar prefixedEventNames = {};\n\n/**\n * Element to check for prefixes on.\n */\nvar style = {};\n\n/**\n * Bootstrap if a DOM exists.\n */\nif (ExecutionEnvironment.canUseDOM) {\n style = document.createElement('div').style;\n\n // On some platforms, in particular some releases of Android 4.x,\n // the un-prefixed \"animation\" and \"transition\" properties are defined on the\n // style object but the events that fire will still be prefixed, so we need\n // to check if the un-prefixed events are usable, and if not remove them from the map.\n if (!('AnimationEvent' in window)) {\n delete vendorPrefixes.animationend.animation;\n delete vendorPrefixes.animationiteration.animation;\n delete vendorPrefixes.animationstart.animation;\n }\n\n // Same as above\n if (!('TransitionEvent' in window)) {\n delete vendorPrefixes.transitionend.transition;\n }\n}\n\n/**\n * Attempts to determine the correct vendor prefixed event name.\n *\n * @param {string} eventName\n * @returns {string}\n */\nfunction getVendorPrefixedEventName(eventName) {\n if (prefixedEventNames[eventName]) {\n return prefixedEventNames[eventName];\n } else if (!vendorPrefixes[eventName]) {\n return eventName;\n }\n\n var prefixMap = vendorPrefixes[eventName];\n\n for (var styleProp in prefixMap) {\n if (prefixMap.hasOwnProperty(styleProp) && styleProp in style) {\n return prefixedEventNames[eventName] = prefixMap[styleProp];\n }\n }\n\n return '';\n}\n\nmodule.exports = getVendorPrefixedEventName;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/getVendorPrefixedEventName.js\n// module id = 1382\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/getVendorPrefixedEventName.js?", + ); + + /***/ + }, + /* 1383 */ + /* unknown exports provided */ + /* all exports used */ + /*!**********************************************************!*\ + !*** ./~/react-dom/lib/quoteAttributeValueForBrowser.js ***! + \**********************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar escapeTextContentForBrowser = __webpack_require__(/*! ./escapeTextContentForBrowser */ 172);\n\n/**\n * Escapes attribute value to prevent scripting attacks.\n *\n * @param {*} value Value to escape.\n * @return {string} An escaped string.\n */\nfunction quoteAttributeValueForBrowser(value) {\n return '\"' + escapeTextContentForBrowser(value) + '\"';\n}\n\nmodule.exports = quoteAttributeValueForBrowser;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/quoteAttributeValueForBrowser.js\n// module id = 1383\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/quoteAttributeValueForBrowser.js?", + ); + + /***/ + }, + /* 1384 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************************************!*\ + !*** ./~/react-dom/lib/renderSubtreeIntoContainer.js ***! + \*******************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar ReactMount = __webpack_require__(/*! ./ReactMount */ 544);\n\nmodule.exports = ReactMount.renderSubtreeIntoContainer;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-dom/lib/renderSubtreeIntoContainer.js\n// module id = 1384\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-dom/lib/renderSubtreeIntoContainer.js?', + ); + + /***/ + }, + /* 1385 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************************!*\ + !*** ./~/react-google-maps/lib/Circle.js ***! + \*******************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();\n\nvar _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar _react = __webpack_require__(/*! react */ 1);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _canUseDom = __webpack_require__(/*! can-use-dom */ 45);\n\nvar _canUseDom2 = _interopRequireDefault(_canUseDom);\n\nvar _creatorsCircleCreator = __webpack_require__(/*! ./creators/CircleCreator */ 1397);\n\nvar _creatorsCircleCreator2 = _interopRequireDefault(_creatorsCircleCreator);\n\nvar Circle = (function (_Component) {\n _inherits(Circle, _Component);\n\n function Circle() {\n _classCallCheck(this, Circle);\n\n _get(Object.getPrototypeOf(Circle.prototype), "constructor", this).apply(this, arguments);\n\n this.state = {};\n }\n\n _createClass(Circle, [{\n key: "getBounds",\n\n // Public APIs\n //\n // https://developers.google.com/maps/documentation/javascript/3.exp/reference#Circle\n //\n // [].map.call($0.querySelectorAll("tr>td>code"), function(it){ return it.textContent; }).filter(function(it){ return it.match(/^get/) && !it.match(/^getMap/); })\n value: function getBounds() {\n return this.state.circle.getBounds();\n }\n }, {\n key: "getCenter",\n value: function getCenter() {\n return this.state.circle.getCenter();\n }\n }, {\n key: "getDraggable",\n value: function getDraggable() {\n return this.state.circle.getDraggable();\n }\n }, {\n key: "getEditable",\n value: function getEditable() {\n return this.state.circle.getEditable();\n }\n }, {\n key: "getMap",\n value: function getMap() {\n return this.state.circle.getMap();\n }\n }, {\n key: "getRadius",\n value: function getRadius() {\n return this.state.circle.getRadius();\n }\n }, {\n key: "getVisible",\n value: function getVisible() {\n return this.state.circle.getVisible();\n }\n\n // END - Public APIs\n //\n // https://developers.google.com/maps/documentation/javascript/3.exp/reference#Circle\n\n }, {\n key: "componentWillMount",\n value: function componentWillMount() {\n if (!_canUseDom2["default"]) {\n return;\n }\n var circle = _creatorsCircleCreator2["default"]._createCircle(this.props);\n\n this.setState({ circle: circle });\n }\n }, {\n key: "render",\n value: function render() {\n if (this.state.circle) {\n return _react2["default"].createElement(\n _creatorsCircleCreator2["default"],\n _extends({ circle: this.state.circle }, this.props),\n this.props.children\n );\n } else {\n return _react2["default"].createElement("noscript", null);\n }\n }\n }], [{\n key: "propTypes",\n value: _extends({}, _creatorsCircleCreator.circleDefaultPropTypes, _creatorsCircleCreator.circleControlledPropTypes, _creatorsCircleCreator.circleEventPropTypes),\n enumerable: true\n }]);\n\n return Circle;\n})(_react.Component);\n\nexports["default"] = Circle;\nmodule.exports = exports["default"];\n\n// Uncontrolled default[props] - used only in componentDidMount\n\n// Controlled [props] - used in componentDidMount/componentDidUpdate\n\n// Event [onEventName]\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-google-maps/lib/Circle.js\n// module id = 1385\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-google-maps/lib/Circle.js?', + ); + + /***/ + }, + /* 1386 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************************************!*\ + !*** ./~/react-google-maps/lib/DirectionsRenderer.js ***! + \*******************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();\n\nvar _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar _react = __webpack_require__(/*! react */ 1);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _canUseDom = __webpack_require__(/*! can-use-dom */ 45);\n\nvar _canUseDom2 = _interopRequireDefault(_canUseDom);\n\nvar _creatorsDirectionsRendererCreator = __webpack_require__(/*! ./creators/DirectionsRendererCreator */ 1398);\n\nvar _creatorsDirectionsRendererCreator2 = _interopRequireDefault(_creatorsDirectionsRendererCreator);\n\n/*\n * Original author: @alexishevia\n * Original PR: https://github.com/tomchentw/react-google-maps/pull/22\n */\n\nvar DirectionsRenderer = (function (_Component) {\n _inherits(DirectionsRenderer, _Component);\n\n function DirectionsRenderer() {\n _classCallCheck(this, DirectionsRenderer);\n\n _get(Object.getPrototypeOf(DirectionsRenderer.prototype), "constructor", this).apply(this, arguments);\n\n this.state = {};\n }\n\n _createClass(DirectionsRenderer, [{\n key: "getDirections",\n\n // Public APIs\n //\n // https://developers.google.com/maps/documentation/javascript/3.exp/reference#DirectionsRenderer\n //\n // [].map.call($0.querySelectorAll("tr>td>code"), function(it){ return it.textContent; }).filter(function(it){ return it.match(/^get/) && !it.match(/^getMap/); })\n value: function getDirections() {\n return this.state.directionsRenderer.getDirections();\n }\n }, {\n key: "getPanel",\n value: function getPanel() {\n return this.state.directionsRenderer.getPanel();\n }\n }, {\n key: "getRouteIndex",\n value: function getRouteIndex() {\n return this.state.directionsRenderer.getRouteIndex();\n }\n\n // END - Public APIs\n //\n // https://developers.google.com/maps/documentation/javascript/3.exp/reference#DirectionsRenderer\n\n }, {\n key: "componentWillMount",\n value: function componentWillMount() {\n if (!_canUseDom2["default"]) {\n return;\n }\n var directionsRenderer = _creatorsDirectionsRendererCreator2["default"]._createDirectionsRenderer(this.props);\n\n this.setState({ directionsRenderer: directionsRenderer });\n }\n }, {\n key: "render",\n value: function render() {\n if (this.state.directionsRenderer) {\n return _react2["default"].createElement(\n _creatorsDirectionsRendererCreator2["default"],\n _extends({ directionsRenderer: this.state.directionsRenderer }, this.props),\n this.props.children\n );\n } else {\n return _react2["default"].createElement("noscript", null);\n }\n }\n }], [{\n key: "propTypes",\n value: _extends({}, _creatorsDirectionsRendererCreator.directionsRendererDefaultPropTypes, _creatorsDirectionsRendererCreator.directionsRendererControlledPropTypes, _creatorsDirectionsRendererCreator.directionsRendererEventPropTypes),\n enumerable: true\n }]);\n\n return DirectionsRenderer;\n})(_react.Component);\n\nexports["default"] = DirectionsRenderer;\nmodule.exports = exports["default"];\n\n// Uncontrolled default[props] - used only in componentDidMount\n\n// Controlled [props] - used in componentDidMount/componentDidUpdate\n\n// Event [onEventName]\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-google-maps/lib/DirectionsRenderer.js\n// module id = 1386\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-google-maps/lib/DirectionsRenderer.js?', + ); + + /***/ + }, + /* 1387 */ + /* unknown exports provided */ + /* all exports used */ + /*!***************************************************!*\ + !*** ./~/react-google-maps/lib/DrawingManager.js ***! + \***************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();\n\nvar _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar _react = __webpack_require__(/*! react */ 1);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _canUseDom = __webpack_require__(/*! can-use-dom */ 45);\n\nvar _canUseDom2 = _interopRequireDefault(_canUseDom);\n\nvar _creatorsDrawingManagerCreator = __webpack_require__(/*! ./creators/DrawingManagerCreator */ 1399);\n\nvar _creatorsDrawingManagerCreator2 = _interopRequireDefault(_creatorsDrawingManagerCreator);\n\n/*\n * Original author: @idolize\n * Original PR: https://github.com/tomchentw/react-google-maps/pull/46\n */\n\nvar DrawingManager = (function (_Component) {\n _inherits(DrawingManager, _Component);\n\n function DrawingManager() {\n _classCallCheck(this, DrawingManager);\n\n _get(Object.getPrototypeOf(DrawingManager.prototype), "constructor", this).apply(this, arguments);\n\n this.state = {};\n }\n\n _createClass(DrawingManager, [{\n key: "getDrawingMode",\n\n // Public APIs\n //\n // https://developers.google.com/maps/documentation/javascript/3.exp/reference#DrawingManager\n //\n // [].map.call($0.querySelectorAll("tr>td>code"), function(it){ return it.textContent; }).filter(function(it){ return it.match(/^get/) && !it.match(/^getMap/); })\n value: function getDrawingMode() {\n return this.state.drawingManager.getDrawingMode();\n }\n\n // END - Public APIs\n //\n // https://developers.google.com/maps/documentation/javascript/3.exp/reference#DrawingManager\n\n }, {\n key: "componentWillMount",\n value: function componentWillMount() {\n if (!_canUseDom2["default"]) {\n return;\n }\n var drawingManager = _creatorsDrawingManagerCreator2["default"]._createDrawingManager(this.props);\n\n this.setState({ drawingManager: drawingManager });\n }\n }, {\n key: "render",\n value: function render() {\n if (this.state.drawingManager) {\n return _react2["default"].createElement(\n _creatorsDrawingManagerCreator2["default"],\n _extends({ drawingManager: this.state.drawingManager }, this.props),\n this.props.children\n );\n } else {\n return _react2["default"].createElement("noscript", null);\n }\n }\n }], [{\n key: "propTypes",\n value: _extends({}, _creatorsDrawingManagerCreator.drawingManagerDefaultPropTypes, _creatorsDrawingManagerCreator.drawingManagerControlledPropTypes, _creatorsDrawingManagerCreator.drawingManagerEventPropTypes),\n enumerable: true\n }]);\n\n return DrawingManager;\n})(_react.Component);\n\nexports["default"] = DrawingManager;\nmodule.exports = exports["default"];\n\n// Uncontrolled default[props] - used only in componentDidMount\n\n// Controlled [props] - used in componentDidMount/componentDidUpdate\n\n// Event [onEventName]\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-google-maps/lib/DrawingManager.js\n// module id = 1387\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-google-maps/lib/DrawingManager.js?', + ); + + /***/ + }, + /* 1388 */ + /* unknown exports provided */ + /* all exports used */ + /*!**********************************************!*\ + !*** ./~/react-google-maps/lib/GoogleMap.js ***! + \**********************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();\n\nvar _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar _react = __webpack_require__(/*! react */ 1);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _warning = __webpack_require__(/*! warning */ 560);\n\nvar _warning2 = _interopRequireDefault(_warning);\n\nvar _creatorsGoogleMapHolder = __webpack_require__(/*! ./creators/GoogleMapHolder */ 36);\n\nvar _creatorsGoogleMapHolder2 = _interopRequireDefault(_creatorsGoogleMapHolder);\n\nvar _GoogleMapLoader = __webpack_require__(/*! ./GoogleMapLoader */ 558);\n\nvar _GoogleMapLoader2 = _interopRequireDefault(_GoogleMapLoader);\n\nvar USE_NEW_BEHAVIOR_TAG_NAME = "__new_behavior__";\n\nvar GoogleMap = (function (_Component) {\n _inherits(GoogleMap, _Component);\n\n function GoogleMap() {\n _classCallCheck(this, GoogleMap);\n\n _get(Object.getPrototypeOf(GoogleMap.prototype), "constructor", this).apply(this, arguments);\n }\n\n _createClass(GoogleMap, [{\n key: "getBounds",\n\n // Public APIs\n //\n // https://developers.google.com/maps/documentation/javascript/3.exp/reference#Map\n //\n // [].map.call($0.querySelectorAll("tr>td>code"), function(it){ return it.textContent; }).filter(function(it){ return it.match(/^get/) && !it.match(/Map$/); })\n value: function getBounds() {\n return (this.props.map || this.refs.delegate).getBounds();\n }\n }, {\n key: "getCenter",\n value: function getCenter() {\n return (this.props.map || this.refs.delegate).getCenter();\n }\n }, {\n key: "getDiv",\n value: function getDiv() {\n return (this.props.map || this.refs.delegate).getDiv();\n }\n }, {\n key: "getHeading",\n value: function getHeading() {\n return (this.props.map || this.refs.delegate).getHeading();\n }\n }, {\n key: "getMapTypeId",\n value: function getMapTypeId() {\n return (this.props.map || this.refs.delegate).getMapTypeId();\n }\n }, {\n key: "getProjection",\n value: function getProjection() {\n return (this.props.map || this.refs.delegate).getProjection();\n }\n }, {\n key: "getStreetView",\n value: function getStreetView() {\n return (this.props.map || this.refs.delegate).getStreetView();\n }\n }, {\n key: "getTilt",\n value: function getTilt() {\n return (this.props.map || this.refs.delegate).getTilt();\n }\n }, {\n key: "getZoom",\n value: function getZoom() {\n return (this.props.map || this.refs.delegate).getZoom();\n }\n\n // END - Public APIs\n //\n // https://developers.google.com/maps/documentation/javascript/3.exp/reference#Map\n //\n // Public APIs - Use this carefully\n // See discussion in https://github.com/tomchentw/react-google-maps/issues/62\n //\n // https://developers.google.com/maps/documentation/javascript/3.exp/reference#Map\n //\n // [].map.call($0.querySelectorAll("tr>td>code"), function(it){ return it.textContent; }).filter(function(it){ return !it.match(/^get/) && !it.match(/^set/) && !it.match(/Map$/); })\n }, {\n key: "fitBounds",\n value: function fitBounds(bounds) {\n return (this.props.map || this.refs.delegate).fitBounds(bounds);\n }\n }, {\n key: "panBy",\n value: function panBy(x, y) {\n return (this.props.map || this.refs.delegate).panBy(x, y);\n }\n }, {\n key: "panTo",\n value: function panTo(latLng) {\n return (this.props.map || this.refs.delegate).panTo(latLng);\n }\n }, {\n key: "panToBounds",\n value: function panToBounds(latLngBounds) {\n return (this.props.map || this.refs.delegate).panToBounds(latLngBounds);\n }\n\n // END - Public APIs - Use this carefully\n //\n // https://developers.google.com/maps/documentation/javascript/3.exp/reference#Map\n\n }, {\n key: "componentWillMount",\n value: function componentWillMount() {\n var containerTagName = this.props.containerTagName;\n\n var isUsingNewBehavior = USE_NEW_BEHAVIOR_TAG_NAME === containerTagName;\n\n (0, _warning2["default"])(isUsingNewBehavior, "\\"GoogleMap\\" with containerTagName is deprecated now and will be removed in next major release (5.0.0).\\nUse \\"GoogleMapLoader\\" instead. See https://github.com/tomchentw/react-google-maps/pull/157 for more details.");\n }\n }, {\n key: "render",\n value: function render() {\n var _props = this.props;\n var containerTagName = _props.containerTagName;\n var _props$containerProps = _props.containerProps;\n var containerProps = _props$containerProps === undefined ? {} : _props$containerProps;\n var children = _props.children;\n\n var mapProps = _objectWithoutProperties(_props, ["containerTagName", "containerProps", "children"]);\n\n var isUsingNewBehavior = USE_NEW_BEHAVIOR_TAG_NAME === containerTagName;\n\n if (isUsingNewBehavior) {\n return _react2["default"].createElement(\n _creatorsGoogleMapHolder2["default"],\n mapProps,\n children\n );\n } else {\n // ------------ Deprecated ------------\n var realContainerTagName = containerTagName === undefined || containerTagName === null ? "div" : containerTagName;\n\n return _react2["default"].createElement(_GoogleMapLoader2["default"], {\n ref: "loader",\n containerElement: _react2["default"].createElement(realContainerTagName, containerProps),\n googleMapElement: _react2["default"].createElement(\n GoogleMap,\n _extends({ ref: "delegate", containerTagName: USE_NEW_BEHAVIOR_TAG_NAME }, mapProps),\n children\n )\n });\n }\n }\n }], [{\n key: "propTypes",\n value: _extends({\n containerTagName: _react.PropTypes.string,\n containerProps: _react.PropTypes.object,\n map: _react.PropTypes.object\n }, _creatorsGoogleMapHolder.mapDefaultPropTypes, _creatorsGoogleMapHolder.mapControlledPropTypes, _creatorsGoogleMapHolder.mapEventPropTypes),\n enumerable: true\n }]);\n\n return GoogleMap;\n})(_react.Component);\n\nexports["default"] = GoogleMap;\nmodule.exports = exports["default"];\n// Uncontrolled default[props] - used only in componentDidMount\n\n// Controlled [props] - used in componentDidMount/componentDidUpdate\n\n// Event [onEventName]\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-google-maps/lib/GoogleMap.js\n// module id = 1388\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-google-maps/lib/GoogleMap.js?', + ); + + /***/ + }, + /* 1389 */ + /* unknown exports provided */ + /* all exports used */ + /*!***********************************************!*\ + !*** ./~/react-google-maps/lib/InfoWindow.js ***! + \***********************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();\n\nvar _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar _react = __webpack_require__(/*! react */ 1);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _canUseDom = __webpack_require__(/*! can-use-dom */ 45);\n\nvar _canUseDom2 = _interopRequireDefault(_canUseDom);\n\nvar _creatorsInfoWindowCreator = __webpack_require__(/*! ./creators/InfoWindowCreator */ 1400);\n\nvar _creatorsInfoWindowCreator2 = _interopRequireDefault(_creatorsInfoWindowCreator);\n\nvar InfoWindow = (function (_Component) {\n _inherits(InfoWindow, _Component);\n\n function InfoWindow() {\n _classCallCheck(this, InfoWindow);\n\n _get(Object.getPrototypeOf(InfoWindow.prototype), "constructor", this).apply(this, arguments);\n\n this.state = {};\n }\n\n _createClass(InfoWindow, [{\n key: "getContent",\n\n // Public APIs\n //\n // https://developers.google.com/maps/documentation/javascript/3.exp/reference#InfoWindow\n //\n // [].map.call($0.querySelectorAll("tr>td>code"), function(it){ return it.textContent; }).filter(function(it){ return it.match(/^get/) && !it.match(/^getMap/); })\n value: function getContent() {/* TODO: children */}\n }, {\n key: "getPosition",\n value: function getPosition() {\n return this.state.infoWindow.getPosition();\n }\n }, {\n key: "getZIndex",\n value: function getZIndex() {\n return this.state.infoWindow.getZIndex();\n }\n\n // END - Public APIs\n //\n // https://developers.google.com/maps/documentation/javascript/3.exp/reference#InfoWindow\n\n }, {\n key: "componentWillMount",\n value: function componentWillMount() {\n if (!_canUseDom2["default"]) {\n return;\n }\n var infoWindow = _creatorsInfoWindowCreator2["default"]._createInfoWindow(this.props);\n\n this.setState({ infoWindow: infoWindow });\n }\n }, {\n key: "render",\n value: function render() {\n if (this.state.infoWindow) {\n return _react2["default"].createElement(\n _creatorsInfoWindowCreator2["default"],\n _extends({ infoWindow: this.state.infoWindow }, this.props),\n this.props.children\n );\n } else {\n return _react2["default"].createElement("noscript", null);\n }\n }\n }], [{\n key: "propTypes",\n value: _extends({}, _creatorsInfoWindowCreator.infoWindowDefaultPropTypes, _creatorsInfoWindowCreator.infoWindowControlledPropTypes, _creatorsInfoWindowCreator.infoWindowEventPropTypes),\n enumerable: true\n }]);\n\n return InfoWindow;\n})(_react.Component);\n\nexports["default"] = InfoWindow;\nmodule.exports = exports["default"];\n\n// Uncontrolled default[props] - used only in componentDidMount\n\n// Controlled [props] - used in componentDidMount/componentDidUpdate\n\n// Event [onEventName]\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-google-maps/lib/InfoWindow.js\n// module id = 1389\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-google-maps/lib/InfoWindow.js?', + ); + + /***/ + }, + /* 1390 */ + /* unknown exports provided */ + /* all exports used */ + /*!*********************************************!*\ + !*** ./~/react-google-maps/lib/KmlLayer.js ***! + \*********************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();\n\nvar _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar _react = __webpack_require__(/*! react */ 1);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _canUseDom = __webpack_require__(/*! can-use-dom */ 45);\n\nvar _canUseDom2 = _interopRequireDefault(_canUseDom);\n\nvar _creatorsKmlLayerCreator = __webpack_require__(/*! ./creators/KmlLayerCreator */ 1401);\n\nvar _creatorsKmlLayerCreator2 = _interopRequireDefault(_creatorsKmlLayerCreator);\n\nvar KmlLayer = (function (_Component) {\n _inherits(KmlLayer, _Component);\n\n function KmlLayer() {\n _classCallCheck(this, KmlLayer);\n\n _get(Object.getPrototypeOf(KmlLayer.prototype), "constructor", this).apply(this, arguments);\n\n this.state = {};\n }\n\n _createClass(KmlLayer, [{\n key: "getDefaultViewport",\n\n // Public APIs\n //\n // https://developers.google.com/maps/documentation/javascript/3.exp/reference#KmlLayer\n //\n // [].map.call($0.querySelectorAll("tr>td>code"), function(it){ return it.textContent; }).filter(function(it){ return it.match(/^get/) && !it.match(/Map$/); })\n value: function getDefaultViewport() {\n return this.state.kmlLayer.getDefaultViewport();\n }\n }, {\n key: "getMetadata",\n value: function getMetadata() {\n return this.state.kmlLayer.getMetadata();\n }\n }, {\n key: "getStatus",\n value: function getStatus() {\n return this.state.kmlLayer.getStatus();\n }\n }, {\n key: "getUrl",\n value: function getUrl() {\n return this.state.kmlLayer.getUrl();\n }\n }, {\n key: "getZIndex",\n value: function getZIndex() {\n return this.state.marker.getZIndex();\n }\n\n // END - Public APIs\n //\n // https://developers.google.com/maps/documentation/javascript/3.exp/reference#KmlLayer\n\n }, {\n key: "componentWillMount",\n value: function componentWillMount() {\n if (!_canUseDom2["default"]) {\n return;\n }\n var kmlLayer = _creatorsKmlLayerCreator2["default"]._createKmlLayer(this.props);\n\n this.setState({ kmlLayer: kmlLayer });\n }\n }, {\n key: "render",\n value: function render() {\n if (this.state.kmlLayer) {\n return _react2["default"].createElement(\n _creatorsKmlLayerCreator2["default"],\n _extends({ kmlLayer: this.state.kmlLayer }, this.props),\n this.props.children\n );\n } else {\n return _react2["default"].createElement("noscript", null);\n }\n }\n }], [{\n key: "propTypes",\n value: _extends({}, _creatorsKmlLayerCreator.kmlLayerDefaultPropTypes, _creatorsKmlLayerCreator.kmlLayerControlledPropTypes, _creatorsKmlLayerCreator.kmlLayerEventPropTypes),\n enumerable: true\n }]);\n\n return KmlLayer;\n})(_react.Component);\n\nexports["default"] = KmlLayer;\nmodule.exports = exports["default"];\n\n// Uncontrolled default[props] - used only in componentDidMount\n\n// Controlled [props] - used in componentDidMount/componentDidUpdate\n\n// Event [onEventName]\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-google-maps/lib/KmlLayer.js\n// module id = 1390\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-google-maps/lib/KmlLayer.js?', + ); + + /***/ + }, + /* 1391 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************************!*\ + !*** ./~/react-google-maps/lib/Marker.js ***! + \*******************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();\n\nvar _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar _react = __webpack_require__(/*! react */ 1);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _canUseDom = __webpack_require__(/*! can-use-dom */ 45);\n\nvar _canUseDom2 = _interopRequireDefault(_canUseDom);\n\nvar _creatorsMarkerCreator = __webpack_require__(/*! ./creators/MarkerCreator */ 1402);\n\nvar _creatorsMarkerCreator2 = _interopRequireDefault(_creatorsMarkerCreator);\n\nvar Marker = (function (_Component) {\n _inherits(Marker, _Component);\n\n function Marker() {\n _classCallCheck(this, Marker);\n\n _get(Object.getPrototypeOf(Marker.prototype), "constructor", this).apply(this, arguments);\n\n this.state = {};\n }\n\n _createClass(Marker, [{\n key: "getAnimation",\n\n // Public APIs\n //\n // https://developers.google.com/maps/documentation/javascript/3.exp/reference#Marker\n //\n // [].map.call($0.querySelectorAll("tr>td>code"), function(it){ return it.textContent; }).filter(function(it){ return it.match(/^get/) && !it.match(/Map$/); })\n value: function getAnimation() {\n return this.state.marker.getAnimation();\n }\n }, {\n key: "getAttribution",\n value: function getAttribution() {\n return this.state.marker.getAttribution();\n }\n }, {\n key: "getClickable",\n value: function getClickable() {\n return this.state.marker.getClickable();\n }\n }, {\n key: "getCursor",\n value: function getCursor() {\n return this.state.marker.getCursor();\n }\n }, {\n key: "getDraggable",\n value: function getDraggable() {\n return this.state.marker.getDraggable();\n }\n }, {\n key: "getIcon",\n value: function getIcon() {\n return this.state.marker.getIcon();\n }\n }, {\n key: "getLabel",\n value: function getLabel() {\n return this.state.marker.getLabel();\n }\n }, {\n key: "getOpacity",\n value: function getOpacity() {\n return this.state.marker.getOpacity();\n }\n }, {\n key: "getPlace",\n value: function getPlace() {\n return this.state.marker.getPlace();\n }\n }, {\n key: "getPosition",\n value: function getPosition() {\n return this.state.marker.getPosition();\n }\n }, {\n key: "getShape",\n value: function getShape() {\n return this.state.marker.getShape();\n }\n }, {\n key: "getTitle",\n value: function getTitle() {\n return this.state.marker.getTitle();\n }\n }, {\n key: "getVisible",\n value: function getVisible() {\n return this.state.marker.getVisible();\n }\n }, {\n key: "getZIndex",\n value: function getZIndex() {\n return this.state.marker.getZIndex();\n }\n\n // END - Public APIs\n //\n // https://developers.google.com/maps/documentation/javascript/3.exp/reference#Marker\n\n }, {\n key: "componentWillMount",\n value: function componentWillMount() {\n if (!_canUseDom2["default"]) {\n return;\n }\n var marker = _creatorsMarkerCreator2["default"]._createMarker(this.props);\n\n this.setState({ marker: marker });\n }\n }, {\n key: "componentWillUnmount",\n value: function componentWillUnmount() {\n if (!_canUseDom2["default"]) {\n return;\n }\n\n var anchorHolderRef = this.props.anchorHolderRef;\n var marker = this.state.marker;\n\n if (anchorHolderRef) {\n if ("MarkerClusterer" === anchorHolderRef.getAnchorType()) {\n anchorHolderRef.getAnchor().removeMarker(marker);\n }\n }\n }\n }, {\n key: "render",\n value: function render() {\n if (this.state.marker) {\n return _react2["default"].createElement(\n _creatorsMarkerCreator2["default"],\n _extends({ marker: this.state.marker }, this.props),\n this.props.children\n );\n } else {\n return _react2["default"].createElement("noscript", null);\n }\n }\n }], [{\n key: "propTypes",\n value: _extends({}, _creatorsMarkerCreator.markerDefaultPropTypes, _creatorsMarkerCreator.markerControlledPropTypes, _creatorsMarkerCreator.markerEventPropTypes),\n enumerable: true\n }]);\n\n return Marker;\n})(_react.Component);\n\nexports["default"] = Marker;\nmodule.exports = exports["default"];\n\n// Uncontrolled default[props] - used only in componentDidMount\n\n// Controlled [props] - used in componentDidMount/componentDidUpdate\n\n// Event [onEventName]\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-google-maps/lib/Marker.js\n// module id = 1391\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-google-maps/lib/Marker.js?', + ); + + /***/ + }, + /* 1392 */ + /* unknown exports provided */ + /* all exports used */ + /*!************************************************!*\ + !*** ./~/react-google-maps/lib/OverlayView.js ***! + \************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();\n\nvar _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar _react = __webpack_require__(/*! react */ 1);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _canUseDom = __webpack_require__(/*! can-use-dom */ 45);\n\nvar _canUseDom2 = _interopRequireDefault(_canUseDom);\n\nvar _creatorsOverlayViewCreator = __webpack_require__(/*! ./creators/OverlayViewCreator */ 1403);\n\nvar _creatorsOverlayViewCreator2 = _interopRequireDefault(_creatorsOverlayViewCreator);\n\n/*\n * Original author: @petebrowne\n * Original PR: https://github.com/tomchentw/react-google-maps/pull/63\n */\n\nvar OverlayView = (function (_Component) {\n _inherits(OverlayView, _Component);\n\n function OverlayView() {\n _classCallCheck(this, OverlayView);\n\n _get(Object.getPrototypeOf(OverlayView.prototype), "constructor", this).apply(this, arguments);\n\n this.state = {};\n }\n\n _createClass(OverlayView, [{\n key: "getPanes",\n\n // Public APIs\n //\n // https://developers.google.com/maps/documentation/javascript/3.exp/reference#OverlayView\n //\n // [].map.call($0.querySelectorAll("tr>td>code"), function(it){ return it.textContent; }).filter(function(it){ return it.match(/^get/) && !it.match(/^getMap/); })\n value: function getPanes() {\n return this.state.overlayView.getPanes();\n }\n }, {\n key: "getProjection",\n value: function getProjection() {\n return this.state.overlayView.getProjection();\n }\n\n // END - Public APIs\n //\n // https://developers.google.com/maps/documentation/javascript/3.exp/reference#OverlayView\n\n }, {\n key: "componentWillMount",\n value: function componentWillMount() {\n if (!_canUseDom2["default"]) {\n return;\n }\n var overlayView = _creatorsOverlayViewCreator2["default"]._createOverlayView(this.props);\n\n this.setState({ overlayView: overlayView });\n }\n }, {\n key: "render",\n value: function render() {\n if (this.state.overlayView) {\n return _react2["default"].createElement(\n _creatorsOverlayViewCreator2["default"],\n _extends({ overlayView: this.state.overlayView }, this.props),\n this.props.children\n );\n } else {\n return _react2["default"].createElement("noscript", null);\n }\n }\n }], [{\n key: "FLOAT_PANE",\n value: "floatPane",\n enumerable: true\n }, {\n key: "MAP_PANE",\n value: "mapPane",\n enumerable: true\n }, {\n key: "MARKER_LAYER",\n value: "markerLayer",\n enumerable: true\n }, {\n key: "OVERLAY_LAYER",\n value: "overlayLayer",\n enumerable: true\n }, {\n key: "OVERLAY_MOUSE_TARGET",\n value: "overlayMouseTarget",\n enumerable: true\n }, {\n key: "propTypes",\n value: _extends({}, _creatorsOverlayViewCreator.overlayViewDefaultPropTypes, _creatorsOverlayViewCreator.overlayViewControlledPropTypes),\n enumerable: true\n }, {\n key: "defaultProps",\n value: {\n mapPaneName: OverlayView.OVERLAY_LAYER\n },\n enumerable: true\n }]);\n\n return OverlayView;\n})(_react.Component);\n\nexports["default"] = OverlayView;\nmodule.exports = exports["default"];\n\n// Uncontrolled default[props] - used only in componentDidMount\n\n// Controlled [props] - used in componentDidMount/componentDidUpdate\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-google-maps/lib/OverlayView.js\n// module id = 1392\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-google-maps/lib/OverlayView.js?', + ); + + /***/ + }, + /* 1393 */ + /* unknown exports provided */ + /* all exports used */ + /*!********************************************!*\ + !*** ./~/react-google-maps/lib/Polygon.js ***! + \********************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();\n\nvar _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar _react = __webpack_require__(/*! react */ 1);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _canUseDom = __webpack_require__(/*! can-use-dom */ 45);\n\nvar _canUseDom2 = _interopRequireDefault(_canUseDom);\n\nvar _creatorsPolygonCreator = __webpack_require__(/*! ./creators/PolygonCreator */ 1404);\n\nvar _creatorsPolygonCreator2 = _interopRequireDefault(_creatorsPolygonCreator);\n\nvar Polygon = (function (_Component) {\n _inherits(Polygon, _Component);\n\n function Polygon() {\n _classCallCheck(this, Polygon);\n\n _get(Object.getPrototypeOf(Polygon.prototype), "constructor", this).apply(this, arguments);\n\n this.state = {};\n }\n\n _createClass(Polygon, [{\n key: "getDraggable",\n\n // Public APIs\n //\n // https://developers.google.com/maps/documentation/javascript/3.exp/reference#Polygon\n //\n // [].map.call($0.querySelectorAll("tr>td>code"), function(it){ return it.textContent; }).filter(function(it){ return it.match(/^get/) && !it.match(/^getMap/); })\n value: function getDraggable() {\n return this.state.polygon.getDraggable();\n }\n }, {\n key: "getEditable",\n value: function getEditable() {\n return this.state.polygon.getEditable();\n }\n }, {\n key: "getPath",\n value: function getPath() {\n return this.state.polygon.getPath();\n }\n }, {\n key: "getPaths",\n value: function getPaths() {\n return this.state.polygon.getPaths();\n }\n }, {\n key: "getVisible",\n value: function getVisible() {\n return this.state.polygon.getVisible();\n }\n\n // END - Public APIs\n //\n // https://developers.google.com/maps/documentation/javascript/3.exp/reference#Polygon\n\n }, {\n key: "componentWillMount",\n value: function componentWillMount() {\n if (!_canUseDom2["default"]) {\n return;\n }\n var polygon = _creatorsPolygonCreator2["default"]._createPolygon(this.props);\n\n this.setState({ polygon: polygon });\n }\n }, {\n key: "render",\n value: function render() {\n if (this.state.polygon) {\n return _react2["default"].createElement(\n _creatorsPolygonCreator2["default"],\n _extends({ polygon: this.state.polygon }, this.props),\n this.props.children\n );\n } else {\n return _react2["default"].createElement("noscript", null);\n }\n }\n }], [{\n key: "propTypes",\n value: _extends({}, _creatorsPolygonCreator.polygonDefaultPropTypes, _creatorsPolygonCreator.polygonControlledPropTypes, _creatorsPolygonCreator.polygonEventPropTypes),\n enumerable: true\n }]);\n\n return Polygon;\n})(_react.Component);\n\nexports["default"] = Polygon;\nmodule.exports = exports["default"];\n\n// Uncontrolled default[props] - used only in componentDidMount\n\n// Controlled [props] - used in componentDidMount/componentDidUpdate\n\n// Event [onEventName]\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-google-maps/lib/Polygon.js\n// module id = 1393\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-google-maps/lib/Polygon.js?', + ); + + /***/ + }, + /* 1394 */ + /* unknown exports provided */ + /* all exports used */ + /*!*********************************************!*\ + !*** ./~/react-google-maps/lib/Polyline.js ***! + \*********************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();\n\nvar _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar _react = __webpack_require__(/*! react */ 1);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _canUseDom = __webpack_require__(/*! can-use-dom */ 45);\n\nvar _canUseDom2 = _interopRequireDefault(_canUseDom);\n\nvar _creatorsPolylineCreator = __webpack_require__(/*! ./creators/PolylineCreator */ 1405);\n\nvar _creatorsPolylineCreator2 = _interopRequireDefault(_creatorsPolylineCreator);\n\nvar Polyline = (function (_Component) {\n _inherits(Polyline, _Component);\n\n function Polyline() {\n _classCallCheck(this, Polyline);\n\n _get(Object.getPrototypeOf(Polyline.prototype), "constructor", this).apply(this, arguments);\n\n this.state = {};\n }\n\n _createClass(Polyline, [{\n key: "getDraggable",\n\n // Public APIs\n //\n // https://developers.google.com/maps/documentation/javascript/3.exp/reference#Polyline\n //\n // [].map.call($0.querySelectorAll("tr>td>code"), function(it){ return it.textContent; }).filter(function(it){ return it.match(/^get/) && !it.match(/^getMap/); })\n value: function getDraggable() {\n return this.state.polyline.getDraggable();\n }\n }, {\n key: "getEditable",\n value: function getEditable() {\n return this.state.polyline.getEditable();\n }\n }, {\n key: "getPath",\n value: function getPath() {\n return this.state.polyline.getPath();\n }\n }, {\n key: "getVisible",\n value: function getVisible() {\n return this.state.polyline.getVisible();\n }\n\n // END - Public APIs\n //\n // https://developers.google.com/maps/documentation/javascript/3.exp/reference#Polyline\n\n }, {\n key: "componentWillMount",\n value: function componentWillMount() {\n if (!_canUseDom2["default"]) {\n return;\n }\n var polyline = _creatorsPolylineCreator2["default"]._createPolyline(this.props);\n\n this.setState({ polyline: polyline });\n }\n }, {\n key: "render",\n value: function render() {\n if (this.state.polyline) {\n return _react2["default"].createElement(\n _creatorsPolylineCreator2["default"],\n _extends({ polyline: this.state.polyline }, this.props),\n this.props.children\n );\n } else {\n return _react2["default"].createElement("noscript", null);\n }\n }\n }], [{\n key: "propTypes",\n value: _extends({}, _creatorsPolylineCreator.polylineDefaultPropTypes, _creatorsPolylineCreator.polylineControlledPropTypes, _creatorsPolylineCreator.polylineEventPropTypes),\n enumerable: true\n }]);\n\n return Polyline;\n})(_react.Component);\n\nexports["default"] = Polyline;\nmodule.exports = exports["default"];\n\n// Uncontrolled default[props] - used only in componentDidMount\n\n// Controlled [props] - used in componentDidMount/componentDidUpdate\n\n// Event [onEventName]\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-google-maps/lib/Polyline.js\n// module id = 1394\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-google-maps/lib/Polyline.js?', + ); + + /***/ + }, + /* 1395 */ + /* unknown exports provided */ + /* all exports used */ + /*!**********************************************!*\ + !*** ./~/react-google-maps/lib/Rectangle.js ***! + \**********************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();\n\nvar _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar _react = __webpack_require__(/*! react */ 1);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _canUseDom = __webpack_require__(/*! can-use-dom */ 45);\n\nvar _canUseDom2 = _interopRequireDefault(_canUseDom);\n\nvar _creatorsRectangleCreator = __webpack_require__(/*! ./creators/RectangleCreator */ 1406);\n\nvar _creatorsRectangleCreator2 = _interopRequireDefault(_creatorsRectangleCreator);\n\n/*\n * Original author: @alistairjcbrown\n * Original PR: https://github.com/tomchentw/react-google-maps/pull/80\n */\n\nvar Rectangle = (function (_Component) {\n _inherits(Rectangle, _Component);\n\n function Rectangle() {\n _classCallCheck(this, Rectangle);\n\n _get(Object.getPrototypeOf(Rectangle.prototype), "constructor", this).apply(this, arguments);\n\n this.state = {};\n }\n\n _createClass(Rectangle, [{\n key: "getBounds",\n\n // Public APIs\n //\n // https://developers.google.com/maps/documentation/javascript/3.exp/reference#Rectangle\n //\n // [].map.call($0.querySelectorAll("tr>td>code"), function(it){ return it.textContent; }).filter(function(it){ return it.match(/^get/) && !it.match(/^getMap/); })\n value: function getBounds() {\n return this.state.rectangle.getBounds();\n }\n }, {\n key: "getDraggable",\n value: function getDraggable() {\n return this.state.rectangle.getDraggable();\n }\n }, {\n key: "getEditable",\n value: function getEditable() {\n return this.state.rectangle.getEditable();\n }\n }, {\n key: "getVisible",\n value: function getVisible() {\n return this.state.rectangle.getVisible();\n }\n\n // END - Public APIs\n //\n // https://developers.google.com/maps/documentation/javascript/3.exp/reference#Rectangle\n\n }, {\n key: "componentWillMount",\n value: function componentWillMount() {\n if (!_canUseDom2["default"]) {\n return;\n }\n var rectangle = _creatorsRectangleCreator2["default"]._createRectangle(this.props);\n\n this.setState({ rectangle: rectangle });\n }\n }, {\n key: "render",\n value: function render() {\n if (this.state.rectangle) {\n return _react2["default"].createElement(\n _creatorsRectangleCreator2["default"],\n _extends({ rectangle: this.state.rectangle }, this.props),\n this.props.children\n );\n } else {\n return _react2["default"].createElement("noscript", null);\n }\n }\n }], [{\n key: "propTypes",\n value: _extends({}, _creatorsRectangleCreator.rectangleDefaultPropTypes, _creatorsRectangleCreator.rectangleControlledPropTypes, _creatorsRectangleCreator.rectangleEventPropTypes),\n enumerable: true\n }]);\n\n return Rectangle;\n})(_react.Component);\n\nexports["default"] = Rectangle;\nmodule.exports = exports["default"];\n\n// Uncontrolled default[props] - used only in componentDidMount\n\n// Controlled [props] - used in componentDidMount/componentDidUpdate\n\n// Event [onEventName]\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-google-maps/lib/Rectangle.js\n// module id = 1395\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-google-maps/lib/Rectangle.js?', + ); + + /***/ + }, + /* 1396 */ + /* unknown exports provided */ + /* all exports used */ + /*!**********************************************!*\ + !*** ./~/react-google-maps/lib/SearchBox.js ***! + \**********************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();\n\nvar _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar _react = __webpack_require__(/*! react */ 1);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _canUseDom = __webpack_require__(/*! can-use-dom */ 45);\n\nvar _canUseDom2 = _interopRequireDefault(_canUseDom);\n\nvar _creatorsSearchBoxCreator = __webpack_require__(/*! ./creators/SearchBoxCreator */ 1407);\n\nvar _creatorsSearchBoxCreator2 = _interopRequireDefault(_creatorsSearchBoxCreator);\n\n/*\n * Original author: @eyebraus\n * Original PR: https://github.com/tomchentw/react-google-maps/pull/110\n */\n\nvar SearchBox = (function (_Component) {\n _inherits(SearchBox, _Component);\n\n function SearchBox() {\n _classCallCheck(this, SearchBox);\n\n _get(Object.getPrototypeOf(SearchBox.prototype), "constructor", this).apply(this, arguments);\n\n this.state = {};\n }\n\n _createClass(SearchBox, [{\n key: "getBounds",\n\n // Public APIs\n //\n // https://developers.google.com/maps/documentation/javascript/3.exp/reference#SearchBox\n //\n // [].map.call($0.querySelectorAll("tr>td>code"), function(it){ return it.textContent; }).filter(function(it){ return it.match(/^get/) && !it.match(/Map$/); })\n value: function getBounds() {\n return this.state.searchBox.getBounds();\n }\n }, {\n key: "getPlaces",\n value: function getPlaces() {\n return this.state.searchBox.getPlaces();\n }\n\n // END - Public APIs\n //\n // https://developers.google.com/maps/documentation/javascript/3.exp/reference#SearchBox\n\n }, {\n key: "componentWillMount",\n value: function componentWillMount() {\n if (!_canUseDom2["default"]) {\n return;\n }\n var _props = this.props;\n var mapHolderRef = _props.mapHolderRef;\n var classes = _props.classes;\n var style = _props.style;\n var placeholder = _props.placeholder;\n\n var searchBoxProps = _objectWithoutProperties(_props, ["mapHolderRef", "classes", "style", "placeholder"]);\n\n // Cannot create input via component - Google Maps will mess with React\'s internal state by detaching/attaching.\n // Allow developers to style the "hidden element" via inputClasses.\n var domEl = document.createElement("input");\n domEl.className = classes;\n domEl.type = "text";\n domEl.placeholder = placeholder;\n\n for (var propKey in style) {\n if (style.hasOwnProperty(propKey)) {\n domEl.style[propKey] = style[propKey];\n }\n }\n\n var searchBox = _creatorsSearchBoxCreator2["default"]._createSearchBox(domEl, searchBoxProps);\n\n this.setState({\n inputElement: domEl,\n searchBox: searchBox\n });\n }\n }, {\n key: "render",\n value: function render() {\n var _props2 = this.props;\n var mapHolderRef = _props2.mapHolderRef;\n var controlPosition = _props2.controlPosition;\n\n return this.state.searchBox ? _react2["default"].createElement(\n _creatorsSearchBoxCreator2["default"],\n _extends({ controlPosition: controlPosition, inputElement: this.state.inputElement, mapHolderRef: mapHolderRef, searchBox: this.state.searchBox }, this.props),\n this.props.children\n ) : _react2["default"].createElement("noscript", null);\n }\n }], [{\n key: "propTypes",\n value: _extends({}, _creatorsSearchBoxCreator.searchBoxDefaultPropTypes, _creatorsSearchBoxCreator.searchBoxControlledPropTypes, _creatorsSearchBoxCreator.searchBoxEventPropTypes),\n enumerable: true\n }]);\n\n return SearchBox;\n})(_react.Component);\n\nexports["default"] = SearchBox;\nmodule.exports = exports["default"];\n\n// Uncontrolled default[props] - used only in componentDidMount\n\n// Controlled [props] - used in componentDidMount/componentDidUpdate\n\n// Event [onEventName]\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-google-maps/lib/SearchBox.js\n// module id = 1396\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-google-maps/lib/SearchBox.js?', + ); + + /***/ + }, + /* 1397 */ + /* unknown exports provided */ + /* all exports used */ + /*!***********************************************************!*\ + !*** ./~/react-google-maps/lib/creators/CircleCreator.js ***! + \***********************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\n\nvar _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();\n\nvar _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar _react = __webpack_require__(/*! react */ 1);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _eventListsCircleEventList = __webpack_require__(/*! ../eventLists/CircleEventList */ 1408);\n\nvar _eventListsCircleEventList2 = _interopRequireDefault(_eventListsCircleEventList);\n\nvar _utilsEventHandlerCreator = __webpack_require__(/*! ../utils/eventHandlerCreator */ 49);\n\nvar _utilsEventHandlerCreator2 = _interopRequireDefault(_utilsEventHandlerCreator);\n\nvar _utilsDefaultPropsCreator = __webpack_require__(/*! ../utils/defaultPropsCreator */ 42);\n\nvar _utilsDefaultPropsCreator2 = _interopRequireDefault(_utilsDefaultPropsCreator);\n\nvar _utilsComposeOptions = __webpack_require__(/*! ../utils/composeOptions */ 41);\n\nvar _utilsComposeOptions2 = _interopRequireDefault(_utilsComposeOptions);\n\nvar _utilsComponentLifecycleDecorator = __webpack_require__(/*! ../utils/componentLifecycleDecorator */ 48);\n\nvar _utilsComponentLifecycleDecorator2 = _interopRequireDefault(_utilsComponentLifecycleDecorator);\n\nvar _GoogleMapHolder = __webpack_require__(/*! ./GoogleMapHolder */ 36);\n\nvar _GoogleMapHolder2 = _interopRequireDefault(_GoogleMapHolder);\n\nvar circleControlledPropTypes = {\n // NOTICE!!!!!!\n //\n // Only expose those with getters & setters in the table as controlled props.\n //\n // [].map.call($0.querySelectorAll("tr>td>code"), function(it){ return it.textContent; }).filter(function(it){ return it.match(/^set/) && !it.match(/^setMap/); })\n //\n // https://developers.google.com/maps/documentation/javascript/3.exp/reference#Circle\n center: _react.PropTypes.any,\n draggable: _react.PropTypes.bool,\n editable: _react.PropTypes.bool,\n options: _react.PropTypes.object,\n radius: _react.PropTypes.number,\n visible: _react.PropTypes.bool\n};\n\nexports.circleControlledPropTypes = circleControlledPropTypes;\nvar circleDefaultPropTypes = (0, _utilsDefaultPropsCreator2["default"])(circleControlledPropTypes);\n\nexports.circleDefaultPropTypes = circleDefaultPropTypes;\nvar circleUpdaters = {\n center: function center(_center, component) {\n component.getCircle().setCenter(_center);\n },\n draggable: function draggable(_draggable, component) {\n component.getCircle().setDraggable(_draggable);\n },\n editable: function editable(_editable, component) {\n component.getCircle().setEditable(_editable);\n },\n options: function options(_options, component) {\n component.getCircle().setOptions(_options);\n },\n radius: function radius(_radius, component) {\n component.getCircle().setRadius(_radius);\n },\n visible: function visible(_visible, component) {\n component.getCircle().setVisible(_visible);\n }\n};\n\nvar _eventHandlerCreator = (0, _utilsEventHandlerCreator2["default"])(_eventListsCircleEventList2["default"]);\n\nvar eventPropTypes = _eventHandlerCreator.eventPropTypes;\nvar registerEvents = _eventHandlerCreator.registerEvents;\nvar circleEventPropTypes = eventPropTypes;\n\nexports.circleEventPropTypes = circleEventPropTypes;\n\nvar CircleCreator = (function (_Component) {\n _inherits(CircleCreator, _Component);\n\n function CircleCreator() {\n _classCallCheck(this, _CircleCreator);\n\n _get(Object.getPrototypeOf(_CircleCreator.prototype), "constructor", this).apply(this, arguments);\n }\n\n _createClass(CircleCreator, [{\n key: "getCircle",\n value: function getCircle() {\n return this.props.circle;\n }\n }, {\n key: "render",\n value: function render() {\n return _react2["default"].createElement("noscript", null);\n }\n }], [{\n key: "_createCircle",\n value: function _createCircle(circleProps) {\n var mapHolderRef = circleProps.mapHolderRef;\n\n // https://developers.google.com/maps/documentation/javascript/3.exp/reference#Circle\n var circle = new google.maps.Circle((0, _utilsComposeOptions2["default"])(circleProps, circleControlledPropTypes));\n\n circle.setMap(mapHolderRef.getMap());\n\n return circle;\n }\n }, {\n key: "propTypes",\n value: {\n mapHolderRef: _react.PropTypes.instanceOf(_GoogleMapHolder2["default"]).isRequired,\n circle: _react.PropTypes.object.isRequired\n },\n enumerable: true\n }]);\n\n var _CircleCreator = CircleCreator;\n CircleCreator = (0, _utilsComponentLifecycleDecorator2["default"])({\n registerEvents: registerEvents,\n instanceMethodName: "getCircle",\n updaters: circleUpdaters\n })(CircleCreator) || CircleCreator;\n return CircleCreator;\n})(_react.Component);\n\nexports["default"] = CircleCreator;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-google-maps/lib/creators/CircleCreator.js\n// module id = 1397\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-google-maps/lib/creators/CircleCreator.js?', + ); + + /***/ + }, + /* 1398 */ + /* unknown exports provided */ + /* all exports used */ + /*!***********************************************************************!*\ + !*** ./~/react-google-maps/lib/creators/DirectionsRendererCreator.js ***! + \***********************************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\n\nvar _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();\n\nvar _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar _react = __webpack_require__(/*! react */ 1);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _eventListsDirectionsRendererEventList = __webpack_require__(/*! ../eventLists/DirectionsRendererEventList */ 1409);\n\nvar _eventListsDirectionsRendererEventList2 = _interopRequireDefault(_eventListsDirectionsRendererEventList);\n\nvar _utilsEventHandlerCreator = __webpack_require__(/*! ../utils/eventHandlerCreator */ 49);\n\nvar _utilsEventHandlerCreator2 = _interopRequireDefault(_utilsEventHandlerCreator);\n\nvar _utilsDefaultPropsCreator = __webpack_require__(/*! ../utils/defaultPropsCreator */ 42);\n\nvar _utilsDefaultPropsCreator2 = _interopRequireDefault(_utilsDefaultPropsCreator);\n\nvar _utilsComposeOptions = __webpack_require__(/*! ../utils/composeOptions */ 41);\n\nvar _utilsComposeOptions2 = _interopRequireDefault(_utilsComposeOptions);\n\nvar _utilsComponentLifecycleDecorator = __webpack_require__(/*! ../utils/componentLifecycleDecorator */ 48);\n\nvar _utilsComponentLifecycleDecorator2 = _interopRequireDefault(_utilsComponentLifecycleDecorator);\n\nvar _GoogleMapHolder = __webpack_require__(/*! ./GoogleMapHolder */ 36);\n\nvar _GoogleMapHolder2 = _interopRequireDefault(_GoogleMapHolder);\n\nvar directionsRendererControlledPropTypes = {\n // NOTICE!!!!!!\n //\n // Only expose those with getters & setters in the table as controlled props.\n //\n // [].map.call($0.querySelectorAll("tr>td>code"), function(it){ return it.textContent; }).filter(function(it){ return it.match(/^set/) && !it.match(/^setMap/); })\n //\n // https://developers.google.com/maps/documentation/javascript/3.exp/reference#DirectionsRenderer\n directions: _react.PropTypes.any,\n options: _react.PropTypes.object,\n panel: _react.PropTypes.object,\n routeIndex: _react.PropTypes.number\n};\n\nexports.directionsRendererControlledPropTypes = directionsRendererControlledPropTypes;\nvar directionsRendererDefaultPropTypes = (0, _utilsDefaultPropsCreator2["default"])(directionsRendererControlledPropTypes);\n\nexports.directionsRendererDefaultPropTypes = directionsRendererDefaultPropTypes;\nvar directionsRendererUpdaters = {\n directions: function directions(_directions, component) {\n component.getDirectionsRenderer().setDirections(_directions);\n },\n options: function options(_options, component) {\n component.getDirectionsRenderer().setOptions(_options);\n },\n panel: function panel(_panel, component) {\n component.getDirectionsRenderer().setPanel(_panel);\n },\n routeIndex: function routeIndex(_routeIndex, component) {\n component.getDirectionsRenderer().setRouteIndex(_routeIndex);\n }\n};\n\nvar _eventHandlerCreator = (0, _utilsEventHandlerCreator2["default"])(_eventListsDirectionsRendererEventList2["default"]);\n\nvar eventPropTypes = _eventHandlerCreator.eventPropTypes;\nvar registerEvents = _eventHandlerCreator.registerEvents;\nvar directionsRendererEventPropTypes = eventPropTypes;\n\nexports.directionsRendererEventPropTypes = directionsRendererEventPropTypes;\n\nvar DirectionsRendererCreator = (function (_Component) {\n _inherits(DirectionsRendererCreator, _Component);\n\n function DirectionsRendererCreator() {\n _classCallCheck(this, _DirectionsRendererCreator);\n\n _get(Object.getPrototypeOf(_DirectionsRendererCreator.prototype), "constructor", this).apply(this, arguments);\n }\n\n _createClass(DirectionsRendererCreator, [{\n key: "getDirectionsRenderer",\n value: function getDirectionsRenderer() {\n return this.props.directionsRenderer;\n }\n }, {\n key: "render",\n value: function render() {\n var children = this.props.children;\n\n if (_react.Children.count(children) > 0) {\n // TODO: take a look at DirectionsRendererOptions#infoWindow and DirectionsRendererOptions#markerOptions ?\n return _react2["default"].createElement(\n "div",\n null,\n children\n );\n } else {\n return _react2["default"].createElement("noscript", null);\n }\n }\n }], [{\n key: "_createDirectionsRenderer",\n value: function _createDirectionsRenderer(directionsRendererProps) {\n var mapHolderRef = directionsRendererProps.mapHolderRef;\n\n // https://developers.google.com/maps/documentation/javascript/3.exp/reference#DirectionsRenderer\n var directionsRenderer = new google.maps.DirectionsRenderer((0, _utilsComposeOptions2["default"])(directionsRendererProps, directionsRendererControlledPropTypes));\n\n directionsRenderer.setMap(mapHolderRef.getMap());\n\n return directionsRenderer;\n }\n }, {\n key: "propTypes",\n value: {\n mapHolderRef: _react.PropTypes.instanceOf(_GoogleMapHolder2["default"]).isRequired,\n directionsRenderer: _react.PropTypes.object.isRequired\n },\n enumerable: true\n }]);\n\n var _DirectionsRendererCreator = DirectionsRendererCreator;\n DirectionsRendererCreator = (0, _utilsComponentLifecycleDecorator2["default"])({\n registerEvents: registerEvents,\n instanceMethodName: "getDirectionsRenderer",\n updaters: directionsRendererUpdaters\n })(DirectionsRendererCreator) || DirectionsRendererCreator;\n return DirectionsRendererCreator;\n})(_react.Component);\n\nexports["default"] = DirectionsRendererCreator;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-google-maps/lib/creators/DirectionsRendererCreator.js\n// module id = 1398\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-google-maps/lib/creators/DirectionsRendererCreator.js?', + ); + + /***/ + }, + /* 1399 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************************************************!*\ + !*** ./~/react-google-maps/lib/creators/DrawingManagerCreator.js ***! + \*******************************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\n\nvar _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();\n\nvar _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar _react = __webpack_require__(/*! react */ 1);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _eventListsDrawingManagerEventList = __webpack_require__(/*! ../eventLists/DrawingManagerEventList */ 1410);\n\nvar _eventListsDrawingManagerEventList2 = _interopRequireDefault(_eventListsDrawingManagerEventList);\n\nvar _utilsEventHandlerCreator = __webpack_require__(/*! ../utils/eventHandlerCreator */ 49);\n\nvar _utilsEventHandlerCreator2 = _interopRequireDefault(_utilsEventHandlerCreator);\n\nvar _utilsDefaultPropsCreator = __webpack_require__(/*! ../utils/defaultPropsCreator */ 42);\n\nvar _utilsDefaultPropsCreator2 = _interopRequireDefault(_utilsDefaultPropsCreator);\n\nvar _utilsComposeOptions = __webpack_require__(/*! ../utils/composeOptions */ 41);\n\nvar _utilsComposeOptions2 = _interopRequireDefault(_utilsComposeOptions);\n\nvar _utilsComponentLifecycleDecorator = __webpack_require__(/*! ../utils/componentLifecycleDecorator */ 48);\n\nvar _utilsComponentLifecycleDecorator2 = _interopRequireDefault(_utilsComponentLifecycleDecorator);\n\nvar _GoogleMapHolder = __webpack_require__(/*! ./GoogleMapHolder */ 36);\n\nvar _GoogleMapHolder2 = _interopRequireDefault(_GoogleMapHolder);\n\nvar drawingManagerControlledPropTypes = {\n // NOTICE!!!!!!\n //\n // Only expose those with getters & setters in the table as controlled props.\n //\n // [].map.call($0.querySelectorAll("tr>td>code"), function(it){ return it.textContent; }).filter(function(it){ return it.match(/^set/) && !it.match(/^setMap/); })\n //\n // https://developers.google.com/maps/documentation/javascript/3.exp/reference#DrawingManager\n drawingMode: _react.PropTypes.any,\n options: _react.PropTypes.object\n};\n\nexports.drawingManagerControlledPropTypes = drawingManagerControlledPropTypes;\nvar drawingManagerDefaultPropTypes = (0, _utilsDefaultPropsCreator2["default"])(drawingManagerControlledPropTypes);\n\nexports.drawingManagerDefaultPropTypes = drawingManagerDefaultPropTypes;\nvar drawingManagerUpdaters = {\n drawingMode: function drawingMode(_drawingMode, component) {\n component.getDrawingManager().setDrawingMode(_drawingMode);\n },\n options: function options(_options, component) {\n component.getDrawingManager().setOptions(_options);\n }\n};\n\nvar _eventHandlerCreator = (0, _utilsEventHandlerCreator2["default"])(_eventListsDrawingManagerEventList2["default"]);\n\nvar eventPropTypes = _eventHandlerCreator.eventPropTypes;\nvar registerEvents = _eventHandlerCreator.registerEvents;\nvar drawingManagerEventPropTypes = eventPropTypes;\n\nexports.drawingManagerEventPropTypes = drawingManagerEventPropTypes;\n\nvar DrawingManagerCreator = (function (_Component) {\n _inherits(DrawingManagerCreator, _Component);\n\n function DrawingManagerCreator() {\n _classCallCheck(this, _DrawingManagerCreator);\n\n _get(Object.getPrototypeOf(_DrawingManagerCreator.prototype), "constructor", this).apply(this, arguments);\n }\n\n _createClass(DrawingManagerCreator, [{\n key: "getDrawingManager",\n value: function getDrawingManager() {\n return this.props.drawingManager;\n }\n }, {\n key: "render",\n value: function render() {\n return _react2["default"].createElement("noscript", null);\n }\n }], [{\n key: "_createDrawingManager",\n value: function _createDrawingManager(drawingManagerProps) {\n var mapHolderRef = drawingManagerProps.mapHolderRef;\n\n // https://developers.google.com/maps/documentation/javascript/3.exp/reference#DrawingManager\n var drawingManager = new google.maps.drawing.DrawingManager((0, _utilsComposeOptions2["default"])(drawingManagerProps, drawingManagerControlledPropTypes));\n\n drawingManager.setMap(mapHolderRef.getMap());\n\n return drawingManager;\n }\n }, {\n key: "propTypes",\n value: {\n mapHolderRef: _react.PropTypes.instanceOf(_GoogleMapHolder2["default"]).isRequired,\n drawingManager: _react.PropTypes.object.isRequired\n },\n enumerable: true\n }]);\n\n var _DrawingManagerCreator = DrawingManagerCreator;\n DrawingManagerCreator = (0, _utilsComponentLifecycleDecorator2["default"])({\n registerEvents: registerEvents,\n instanceMethodName: "getDrawingManager",\n updaters: drawingManagerUpdaters\n })(DrawingManagerCreator) || DrawingManagerCreator;\n return DrawingManagerCreator;\n})(_react.Component);\n\nexports["default"] = DrawingManagerCreator;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-google-maps/lib/creators/DrawingManagerCreator.js\n// module id = 1399\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-google-maps/lib/creators/DrawingManagerCreator.js?', + ); + + /***/ + }, + /* 1400 */ + /* unknown exports provided */ + /* all exports used */ + /*!***************************************************************!*\ + !*** ./~/react-google-maps/lib/creators/InfoWindowCreator.js ***! + \***************************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\n\nvar _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();\n\nvar _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar _react = __webpack_require__(/*! react */ 1);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _eventListsInfoWindowEventList = __webpack_require__(/*! ../eventLists/InfoWindowEventList */ 1412);\n\nvar _eventListsInfoWindowEventList2 = _interopRequireDefault(_eventListsInfoWindowEventList);\n\nvar _utilsEventHandlerCreator = __webpack_require__(/*! ../utils/eventHandlerCreator */ 49);\n\nvar _utilsEventHandlerCreator2 = _interopRequireDefault(_utilsEventHandlerCreator);\n\nvar _utilsDefaultPropsCreator = __webpack_require__(/*! ../utils/defaultPropsCreator */ 42);\n\nvar _utilsDefaultPropsCreator2 = _interopRequireDefault(_utilsDefaultPropsCreator);\n\nvar _utilsComposeOptions = __webpack_require__(/*! ../utils/composeOptions */ 41);\n\nvar _utilsComposeOptions2 = _interopRequireDefault(_utilsComposeOptions);\n\nvar _utilsSetContentForOptionalReactElement = __webpack_require__(/*! ../utils/setContentForOptionalReactElement */ 1420);\n\nvar _utilsSetContentForOptionalReactElement2 = _interopRequireDefault(_utilsSetContentForOptionalReactElement);\n\nvar _utilsComponentLifecycleDecorator = __webpack_require__(/*! ../utils/componentLifecycleDecorator */ 48);\n\nvar _utilsComponentLifecycleDecorator2 = _interopRequireDefault(_utilsComponentLifecycleDecorator);\n\nvar _GoogleMapHolder = __webpack_require__(/*! ./GoogleMapHolder */ 36);\n\nvar _GoogleMapHolder2 = _interopRequireDefault(_GoogleMapHolder);\n\nvar infoWindowControlledPropTypes = {\n // NOTICE!!!!!!\n //\n // Only expose those with getters & setters in the table as controlled props.\n //\n // [].map.call($0.querySelectorAll("tr>td>code"), function(it){ return it.textContent; }).filter(function(it){ return it.match(/^set/) && !it.match(/^setMap/); })\n //\n // https://developers.google.com/maps/documentation/javascript/3.exp/reference#InfoWindow\n content: _react.PropTypes.any,\n options: _react.PropTypes.object,\n position: _react.PropTypes.any,\n zIndex: _react.PropTypes.number\n};\n\nexports.infoWindowControlledPropTypes = infoWindowControlledPropTypes;\nvar infoWindowDefaultPropTypes = (0, _utilsDefaultPropsCreator2["default"])(infoWindowControlledPropTypes);\n\nexports.infoWindowDefaultPropTypes = infoWindowDefaultPropTypes;\nvar infoWindowUpdaters = {\n children: function children(_children, component) {\n (0, _utilsSetContentForOptionalReactElement2["default"])(_children, component.getInfoWindow());\n },\n content: function content(_content, component) {\n component.getInfoWindow().setContent(_content);\n },\n options: function options(_options, component) {\n component.getInfoWindow().setOptions(_options);\n },\n position: function position(_position, component) {\n component.getInfoWindow().setPosition(_position);\n },\n zIndex: function zIndex(_zIndex, component) {\n component.getInfoWindow().setZIndex(_zIndex);\n }\n};\n\nvar _eventHandlerCreator = (0, _utilsEventHandlerCreator2["default"])(_eventListsInfoWindowEventList2["default"]);\n\nvar eventPropTypes = _eventHandlerCreator.eventPropTypes;\nvar registerEvents = _eventHandlerCreator.registerEvents;\nvar infoWindowEventPropTypes = eventPropTypes;\n\nexports.infoWindowEventPropTypes = infoWindowEventPropTypes;\n\nvar InfoWindowCreator = (function (_Component) {\n _inherits(InfoWindowCreator, _Component);\n\n function InfoWindowCreator() {\n _classCallCheck(this, _InfoWindowCreator);\n\n _get(Object.getPrototypeOf(_InfoWindowCreator.prototype), "constructor", this).apply(this, arguments);\n }\n\n _createClass(InfoWindowCreator, [{\n key: "getInfoWindow",\n value: function getInfoWindow() {\n return this.props.infoWindow;\n }\n }, {\n key: "render",\n value: function render() {\n return _react2["default"].createElement("noscript", null);\n }\n }], [{\n key: "_createInfoWindow",\n value: function _createInfoWindow(infoWindowProps) {\n var mapHolderRef = infoWindowProps.mapHolderRef;\n var anchorHolderRef = infoWindowProps.anchorHolderRef;\n\n // https://developers.google.com/maps/documentation/javascript/3.exp/reference#InfoWindow\n var infoWindow = new google.maps.InfoWindow((0, _utilsComposeOptions2["default"])(infoWindowProps, infoWindowControlledPropTypes));\n\n if (infoWindowProps.children) {\n (0, _utilsSetContentForOptionalReactElement2["default"])(infoWindowProps.children, infoWindow);\n }\n\n if (anchorHolderRef) {\n infoWindow.open(mapHolderRef.getMap(), anchorHolderRef.getAnchor());\n } else {\n infoWindow.setMap(mapHolderRef.getMap());\n }\n\n return infoWindow;\n }\n }, {\n key: "propTypes",\n value: {\n mapHolderRef: _react.PropTypes.instanceOf(_GoogleMapHolder2["default"]).isRequired,\n infoWindow: _react.PropTypes.object.isRequired,\n anchorHolderRef: _react.PropTypes.object\n },\n enumerable: true\n }]);\n\n var _InfoWindowCreator = InfoWindowCreator;\n InfoWindowCreator = (0, _utilsComponentLifecycleDecorator2["default"])({\n registerEvents: registerEvents,\n instanceMethodName: "getInfoWindow",\n updaters: infoWindowUpdaters\n })(InfoWindowCreator) || InfoWindowCreator;\n return InfoWindowCreator;\n})(_react.Component);\n\nexports["default"] = InfoWindowCreator;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-google-maps/lib/creators/InfoWindowCreator.js\n// module id = 1400\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-google-maps/lib/creators/InfoWindowCreator.js?', + ); + + /***/ + }, + /* 1401 */ + /* unknown exports provided */ + /* all exports used */ + /*!*************************************************************!*\ + !*** ./~/react-google-maps/lib/creators/KmlLayerCreator.js ***! + \*************************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\n\nvar _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();\n\nvar _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar _react = __webpack_require__(/*! react */ 1);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _eventListsKmlLayerEventList = __webpack_require__(/*! ../eventLists/KmlLayerEventList */ 1413);\n\nvar _eventListsKmlLayerEventList2 = _interopRequireDefault(_eventListsKmlLayerEventList);\n\nvar _utilsEventHandlerCreator = __webpack_require__(/*! ../utils/eventHandlerCreator */ 49);\n\nvar _utilsEventHandlerCreator2 = _interopRequireDefault(_utilsEventHandlerCreator);\n\nvar _utilsDefaultPropsCreator = __webpack_require__(/*! ../utils/defaultPropsCreator */ 42);\n\nvar _utilsDefaultPropsCreator2 = _interopRequireDefault(_utilsDefaultPropsCreator);\n\nvar _utilsComposeOptions = __webpack_require__(/*! ../utils/composeOptions */ 41);\n\nvar _utilsComposeOptions2 = _interopRequireDefault(_utilsComposeOptions);\n\nvar _utilsComponentLifecycleDecorator = __webpack_require__(/*! ../utils/componentLifecycleDecorator */ 48);\n\nvar _utilsComponentLifecycleDecorator2 = _interopRequireDefault(_utilsComponentLifecycleDecorator);\n\nvar _GoogleMapHolder = __webpack_require__(/*! ./GoogleMapHolder */ 36);\n\nvar _GoogleMapHolder2 = _interopRequireDefault(_GoogleMapHolder);\n\nvar kmlLayerControlledPropTypes = {\n // NOTICE!!!!!!\n //\n // Only expose those with getters & setters in the table as controlled props.\n //\n // [].map.call($0.querySelectorAll("tr>td>code", function(it){ return it.textContent; }).filter(function(it){ return it.match(/^set/) && !it.match(/^setMap/); })\n //\n // https://developers.google.com/maps/documentation/javascript/3.exp/reference#KmlLayer\n defaultViewport: _react.PropTypes.any,\n metadata: _react.PropTypes.any,\n status: _react.PropTypes.any,\n url: _react.PropTypes.string,\n zIndex: _react.PropTypes.number\n};\n\nexports.kmlLayerControlledPropTypes = kmlLayerControlledPropTypes;\nvar kmlLayerDefaultPropTypes = (0, _utilsDefaultPropsCreator2["default"])(kmlLayerControlledPropTypes);\n\nexports.kmlLayerDefaultPropTypes = kmlLayerDefaultPropTypes;\nvar kmlLayerUpdaters = {\n defaultViewport: function defaultViewport(_defaultViewport, component) {\n component.getKmlLayer().setDefaultViewport(_defaultViewport);\n },\n metadata: function metadata(_metadata, component) {\n component.getKmlLayer().setMetadata(_metadata);\n },\n status: function status(_status, component) {\n component.getKmlLayer().setStatus(_status);\n },\n url: function url(_url, component) {\n component.getKmlLayer().setUrl(_url);\n },\n zIndex: function zIndex(_zIndex, component) {\n component.getKmlLayer().setZIndex(_zIndex);\n }\n};\n\nvar _eventHandlerCreator = (0, _utilsEventHandlerCreator2["default"])(_eventListsKmlLayerEventList2["default"]);\n\nvar eventPropTypes = _eventHandlerCreator.eventPropTypes;\nvar registerEvents = _eventHandlerCreator.registerEvents;\nvar kmlLayerEventPropTypes = eventPropTypes;\n\nexports.kmlLayerEventPropTypes = kmlLayerEventPropTypes;\n\nvar KmlLayerCreator = (function (_Component) {\n _inherits(KmlLayerCreator, _Component);\n\n function KmlLayerCreator() {\n _classCallCheck(this, _KmlLayerCreator);\n\n _get(Object.getPrototypeOf(_KmlLayerCreator.prototype), "constructor", this).apply(this, arguments);\n }\n\n _createClass(KmlLayerCreator, [{\n key: "getKmlLayer",\n value: function getKmlLayer() {\n return this.props.kmlLayer;\n }\n }, {\n key: "render",\n value: function render() {\n var _props = this.props;\n var mapHolderRef = _props.mapHolderRef;\n var children = _props.children;\n\n if (_react.Children.count(children) > 0) {\n return _react2["default"].createElement(\n "div",\n null,\n _react.Children.map(children, function (childElement) {\n return childElement && _react2["default"].cloneElement(childElement, {\n mapHolderRef: mapHolderRef\n });\n })\n );\n } else {\n return _react2["default"].createElement("noscript", null);\n }\n }\n }], [{\n key: "_createKmlLayer",\n value: function _createKmlLayer(kmlLayerProps) {\n var mapHolderRef = kmlLayerProps.mapHolderRef;\n\n // https://developers.google.com/maps/documentation/javascript/3.exp/reference#KmlLayer\n var kmlLayer = new google.maps.KmlLayer((0, _utilsComposeOptions2["default"])(kmlLayerProps, kmlLayerControlledPropTypes));\n\n kmlLayer.setMap(mapHolderRef.getMap());\n\n return kmlLayer;\n }\n }, {\n key: "propTypes",\n value: {\n mapHolderRef: _react.PropTypes.instanceOf(_GoogleMapHolder2["default"]).isRequired,\n kmlLayer: _react.PropTypes.object.isRequired\n },\n enumerable: true\n }]);\n\n var _KmlLayerCreator = KmlLayerCreator;\n KmlLayerCreator = (0, _utilsComponentLifecycleDecorator2["default"])({\n registerEvents: registerEvents,\n instanceMethodName: "getKmlLayer",\n updaters: kmlLayerUpdaters\n })(KmlLayerCreator) || KmlLayerCreator;\n return KmlLayerCreator;\n})(_react.Component);\n\nexports["default"] = KmlLayerCreator;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-google-maps/lib/creators/KmlLayerCreator.js\n// module id = 1401\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-google-maps/lib/creators/KmlLayerCreator.js?', + ); + + /***/ + }, + /* 1402 */ + /* unknown exports provided */ + /* all exports used */ + /*!***********************************************************!*\ + !*** ./~/react-google-maps/lib/creators/MarkerCreator.js ***! + \***********************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\n\nvar _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();\n\nvar _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar _react = __webpack_require__(/*! react */ 1);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _eventListsMarkerEventList = __webpack_require__(/*! ../eventLists/MarkerEventList */ 1414);\n\nvar _eventListsMarkerEventList2 = _interopRequireDefault(_eventListsMarkerEventList);\n\nvar _utilsEventHandlerCreator = __webpack_require__(/*! ../utils/eventHandlerCreator */ 49);\n\nvar _utilsEventHandlerCreator2 = _interopRequireDefault(_utilsEventHandlerCreator);\n\nvar _utilsDefaultPropsCreator = __webpack_require__(/*! ../utils/defaultPropsCreator */ 42);\n\nvar _utilsDefaultPropsCreator2 = _interopRequireDefault(_utilsDefaultPropsCreator);\n\nvar _utilsComposeOptions = __webpack_require__(/*! ../utils/composeOptions */ 41);\n\nvar _utilsComposeOptions2 = _interopRequireDefault(_utilsComposeOptions);\n\nvar _utilsComponentLifecycleDecorator = __webpack_require__(/*! ../utils/componentLifecycleDecorator */ 48);\n\nvar _utilsComponentLifecycleDecorator2 = _interopRequireDefault(_utilsComponentLifecycleDecorator);\n\nvar _GoogleMapHolder = __webpack_require__(/*! ./GoogleMapHolder */ 36);\n\nvar _GoogleMapHolder2 = _interopRequireDefault(_GoogleMapHolder);\n\nvar markerControlledPropTypes = {\n // NOTICE!!!!!!\n //\n // Only expose those with getters & setters in the table as controlled props.\n //\n // [].map.call($0.querySelectorAll("tr>td>code", function(it){ return it.textContent; }).filter(function(it){ return it.match(/^set/) && !it.match(/^setMap/); })\n //\n // https://developers.google.com/maps/documentation/javascript/3.exp/reference#Marker\n animation: _react.PropTypes.any,\n attribution: _react.PropTypes.any,\n clickable: _react.PropTypes.bool,\n cursor: _react.PropTypes.string,\n draggable: _react.PropTypes.bool,\n icon: _react.PropTypes.any,\n label: _react.PropTypes.any,\n opacity: _react.PropTypes.number,\n options: _react.PropTypes.object,\n place: _react.PropTypes.any,\n position: _react.PropTypes.any,\n shape: _react.PropTypes.any,\n title: _react.PropTypes.string,\n visible: _react.PropTypes.bool,\n zIndex: _react.PropTypes.number\n};\n\nexports.markerControlledPropTypes = markerControlledPropTypes;\nvar markerDefaultPropTypes = (0, _utilsDefaultPropsCreator2["default"])(markerControlledPropTypes);\n\nexports.markerDefaultPropTypes = markerDefaultPropTypes;\nvar markerUpdaters = {\n animation: function animation(_animation, component) {\n component.getMarker().setAnimation(_animation);\n },\n attribution: function attribution(_attribution, component) {\n component.getMarker().setAttribution(_attribution);\n },\n clickable: function clickable(_clickable, component) {\n component.getMarker().setClickable(_clickable);\n },\n cursor: function cursor(_cursor, component) {\n component.getMarker().setCursor(_cursor);\n },\n draggable: function draggable(_draggable, component) {\n component.getMarker().setDraggable(_draggable);\n },\n icon: function icon(_icon, component) {\n component.getMarker().setIcon(_icon);\n },\n label: function label(_label, component) {\n component.getMarker().setLabel(_label);\n },\n opacity: function opacity(_opacity, component) {\n component.getMarker().setOpacity(_opacity);\n },\n options: function options(_options, component) {\n component.getMarker().setOptions(_options);\n },\n place: function place(_place, component) {\n component.getMarker().setPlace(_place);\n },\n position: function position(_position, component) {\n component.getMarker().setPosition(_position);\n },\n shape: function shape(_shape, component) {\n component.getMarker().setShape(_shape);\n },\n title: function title(_title, component) {\n component.getMarker().setTitle(_title);\n },\n visible: function visible(_visible, component) {\n component.getMarker().setVisible(_visible);\n },\n zIndex: function zIndex(_zIndex, component) {\n component.getMarker().setZIndex(_zIndex);\n }\n};\n\nvar _eventHandlerCreator = (0, _utilsEventHandlerCreator2["default"])(_eventListsMarkerEventList2["default"]);\n\nvar eventPropTypes = _eventHandlerCreator.eventPropTypes;\nvar registerEvents = _eventHandlerCreator.registerEvents;\nvar markerEventPropTypes = eventPropTypes;\n\nexports.markerEventPropTypes = markerEventPropTypes;\n\nvar MarkerCreator = (function (_Component) {\n _inherits(MarkerCreator, _Component);\n\n function MarkerCreator() {\n _classCallCheck(this, _MarkerCreator);\n\n _get(Object.getPrototypeOf(_MarkerCreator.prototype), "constructor", this).apply(this, arguments);\n }\n\n _createClass(MarkerCreator, [{\n key: "getMarker",\n value: function getMarker() {\n return this.props.marker;\n }\n\n // https://developers.google.com/maps/documentation/javascript/3.exp/reference#InfoWindowOptions\n // In the core API, the only anchor is the Marker class.\n }, {\n key: "getAnchor",\n value: function getAnchor() {\n return this.props.marker;\n }\n }, {\n key: "render",\n value: function render() {\n var _this = this;\n\n var _props = this.props;\n var mapHolderRef = _props.mapHolderRef;\n var children = _props.children;\n\n if (_react.Children.count(children) > 0) {\n return _react2["default"].createElement(\n "div",\n null,\n _react.Children.map(children, function (childElement) {\n return childElement && _react2["default"].cloneElement(childElement, {\n mapHolderRef: mapHolderRef,\n anchorHolderRef: _this\n });\n })\n );\n } else {\n return _react2["default"].createElement("noscript", null);\n }\n }\n }], [{\n key: "_createMarker",\n value: function _createMarker(markerProps) {\n var mapHolderRef = markerProps.mapHolderRef;\n var anchorHolderRef = markerProps.anchorHolderRef;\n\n // https://developers.google.com/maps/documentation/javascript/3.exp/reference#Marker\n var marker = new google.maps.Marker((0, _utilsComposeOptions2["default"])(markerProps, markerControlledPropTypes));\n\n if (anchorHolderRef) {\n if ("MarkerClusterer" === anchorHolderRef.getAnchorType()) {\n anchorHolderRef.getAnchor().addMarker(marker);\n }\n } else {\n marker.setMap(mapHolderRef.getMap());\n }\n\n return marker;\n }\n }, {\n key: "propTypes",\n value: {\n mapHolderRef: _react.PropTypes.instanceOf(_GoogleMapHolder2["default"]).isRequired,\n marker: _react.PropTypes.object.isRequired\n },\n enumerable: true\n }]);\n\n var _MarkerCreator = MarkerCreator;\n MarkerCreator = (0, _utilsComponentLifecycleDecorator2["default"])({\n registerEvents: registerEvents,\n instanceMethodName: "getMarker",\n updaters: markerUpdaters\n })(MarkerCreator) || MarkerCreator;\n return MarkerCreator;\n})(_react.Component);\n\nexports["default"] = MarkerCreator;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-google-maps/lib/creators/MarkerCreator.js\n// module id = 1402\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-google-maps/lib/creators/MarkerCreator.js?', + ); + + /***/ + }, + /* 1403 */ + /* unknown exports provided */ + /* all exports used */ + /*!****************************************************************!*\ + !*** ./~/react-google-maps/lib/creators/OverlayViewCreator.js ***! + \****************************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\n\nvar _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();\n\nvar _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar _react = __webpack_require__(/*! react */ 1);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactDom = __webpack_require__(/*! react-dom */ 16);\n\nvar _invariant = __webpack_require__(/*! invariant */ 25);\n\nvar _invariant2 = _interopRequireDefault(_invariant);\n\nvar _utilsDefaultPropsCreator = __webpack_require__(/*! ../utils/defaultPropsCreator */ 42);\n\nvar _utilsDefaultPropsCreator2 = _interopRequireDefault(_utilsDefaultPropsCreator);\n\nvar _utilsComposeOptions = __webpack_require__(/*! ../utils/composeOptions */ 41);\n\nvar _utilsComposeOptions2 = _interopRequireDefault(_utilsComposeOptions);\n\nvar _GoogleMapHolder = __webpack_require__(/*! ./GoogleMapHolder */ 36);\n\nvar _GoogleMapHolder2 = _interopRequireDefault(_GoogleMapHolder);\n\nvar overlayViewControlledPropTypes = {\n // CustomProps\n mapPaneName: _react.PropTypes.string,\n getPixelPositionOffset: _react.PropTypes.func,\n position: _react.PropTypes.object,\n children: _react.PropTypes.node,\n bounds: _react.PropTypes.object\n};\n\nexports.overlayViewControlledPropTypes = overlayViewControlledPropTypes;\n// NOTICE!!!!!!\n//\n// Only expose those with getters & setters in the table as controlled props.\n//\n// [].map.call($0.querySelectorAll("tr>td>code"), function(it){ return it.textContent; }).filter(function(it){ return it.match(/^set/) && !it.match(/^setMap/); })\n//\n// https://developers.google.com/maps/documentation/javascript/3.exp/reference\nvar overlayViewDefaultPropTypes = (0, _utilsDefaultPropsCreator2["default"])(overlayViewControlledPropTypes);\n\nexports.overlayViewDefaultPropTypes = overlayViewDefaultPropTypes;\n\nvar OverlayViewCreator = (function (_Component) {\n _inherits(OverlayViewCreator, _Component);\n\n function OverlayViewCreator() {\n _classCallCheck(this, OverlayViewCreator);\n\n _get(Object.getPrototypeOf(OverlayViewCreator.prototype), "constructor", this).apply(this, arguments);\n }\n\n _createClass(OverlayViewCreator, [{\n key: "getOverlayView",\n value: function getOverlayView() {\n return this.props.overlayView;\n }\n }, {\n key: "componentDidMount",\n value: function componentDidMount() {\n this.getOverlayView().setMap(this.props.mapHolderRef.getMap());\n }\n }, {\n key: "componentDidUpdate",\n value: function componentDidUpdate(prevProps) {\n this.getOverlayView().setValues(this.props);\n this.getOverlayView()._redraw(this.props.mapPaneName !== prevProps.mapPaneName);\n }\n }, {\n key: "componentWillUnmount",\n value: function componentWillUnmount() {\n this.getOverlayView().setMap(null);\n }\n }, {\n key: "render",\n value: function render() {\n return _react2["default"].createElement("noscript", null);\n }\n }], [{\n key: "_createOverlayView",\n value: function _createOverlayView(overlayViewProps) {\n // https://developers.google.com/maps/documentation/javascript/3.exp/reference#OverlayView\n var overlayView = new google.maps.OverlayView();\n overlayView.setValues((0, _utilsComposeOptions2["default"])(overlayViewProps, overlayViewControlledPropTypes));\n\n overlayView.onAdd = function onAdd() {\n this._containerElement = document.createElement("div");\n this._containerElement.style.position = "absolute";\n };\n\n overlayView.draw = function draw() {\n this._mountContainerToPane();\n this._renderContent();\n };\n\n overlayView.onRemove = function onRemove() {\n (0, _reactDom.unmountComponentAtNode)(this._containerElement);\n this._unmountContainerFromPane();\n this._containerElement = null;\n };\n\n overlayView._redraw = function _redraw(mapPaneNameChanged) {\n if (mapPaneNameChanged) {\n this._unmountContainerFromPane();\n this._mountContainerToPane();\n }\n this._renderContent();\n };\n\n overlayView._renderContent = function _renderContent() {\n if (this._containerElement) {\n (0, _reactDom.render)(_react.Children.only(this.get("children")), this._containerElement, this._positionContainerElement.bind(this));\n }\n };\n\n overlayView._mountContainerToPane = function _mountContainerToPane() {\n var mapPaneName = this.get("mapPaneName");\n (0, _invariant2["default"])(!!mapPaneName, "OverlayView requires a mapPaneName/defaultMapPaneName in your props instead of %s", mapPaneName);\n\n this.getPanes()[mapPaneName].appendChild(this._containerElement);\n };\n\n overlayView._unmountContainerFromPane = function _unmountContainerFromPane() {\n this._containerElement.parentNode.removeChild(this._containerElement);\n };\n\n overlayView._positionContainerElement = function _positionContainerElement() {\n var left = undefined;\n var top = undefined;\n var offset = this._getOffset();\n if (this.get("bounds")) {\n var bounds = this._getPixelBounds();\n if (bounds) {\n var sw = bounds.sw;\n var ne = bounds.ne;\n\n if (offset) {\n sw.x += offset.x;\n ne.y += offset.y;\n }\n left = sw.x + "px";\n top = ne.y + "px";\n this._containerElement.style.width = ne.x - sw.x + "px";\n this._containerElement.style.height = sw.y - ne.y + "px";\n }\n } else {\n var position = this._getPixelPosition();\n if (position) {\n var x = position.x;\n var y = position.y;\n\n if (offset) {\n x += offset.x;\n y += offset.y;\n }\n left = x + "px";\n top = y + "px";\n }\n }\n\n this._containerElement.style.left = left;\n this._containerElement.style.top = top;\n };\n\n overlayView._getPixelPosition = function _getPixelPosition() {\n var projection = this.getProjection();\n var position = this.get("position");\n (0, _invariant2["default"])(!!position, "OverlayView requires a position/defaultPosition in your props instead of %s", position);\n if (projection && position) {\n if (!(position instanceof google.maps.LatLng)) {\n position = new google.maps.LatLng(position.lat, position.lng);\n }\n return projection.fromLatLngToDivPixel(position);\n }\n };\n\n overlayView._getPixelBounds = function _getPixelBounds() {\n var projection = this.getProjection();\n var bounds = this.get("bounds");\n (0, _invariant2["default"])(!!bounds, "OverlayView requires a bounds in your props instead of %s", bounds);\n if (projection && bounds) {\n if (!(bounds instanceof google.maps.LatLngBounds)) {\n bounds = new google.maps.LatLngBounds(new google.maps.LatLng(bounds.ne.lat, bounds.ne.lng), new google.maps.LatLng(bounds.sw.lat, bounds.sw.lng));\n }\n return {\n sw: projection.fromLatLngToDivPixel(this.bounds.getSouthWest()),\n ne: projection.fromLatLngToDivPixel(this.bounds.getNorthEast())\n };\n }\n };\n\n overlayView._getOffset = function _getOffset() {\n // Allows the component to control the visual position of the OverlayView\n // relative to the LatLng pixel position.\n var getPixelPositionOffset = this.get("getPixelPositionOffset");\n if (getPixelPositionOffset) {\n return getPixelPositionOffset(this._containerElement.offsetWidth, this._containerElement.offsetHeight);\n }\n };\n\n // If we\'re inside a MarkerClusterer, allow ourselves to be clustered\n if (overlayViewProps.anchorHolderRef) {\n if ("MarkerClusterer" === overlayViewProps.anchorHolderRef.getAnchorType()) {\n overlayView.getDraggable = function getDraggable() {\n return !!overlayViewProps.draggable;\n };\n\n overlayView.getPosition = function getPosition() {\n return new google.maps.LatLng(this.position);\n };\n\n overlayViewProps.anchorHolderRef.getAnchor().addMarker(overlayView);\n }\n }\n\n return overlayView;\n }\n }, {\n key: "propTypes",\n value: {\n mapHolderRef: _react.PropTypes.instanceOf(_GoogleMapHolder2["default"]).isRequired,\n mapPaneName: _react.PropTypes.string,\n overlayView: _react.PropTypes.object.isRequired\n },\n enumerable: true\n }]);\n\n return OverlayViewCreator;\n})(_react.Component);\n\nexports["default"] = OverlayViewCreator;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-google-maps/lib/creators/OverlayViewCreator.js\n// module id = 1403\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-google-maps/lib/creators/OverlayViewCreator.js?', + ); + + /***/ + }, + /* 1404 */ + /* unknown exports provided */ + /* all exports used */ + /*!************************************************************!*\ + !*** ./~/react-google-maps/lib/creators/PolygonCreator.js ***! + \************************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\n\nvar _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();\n\nvar _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar _react = __webpack_require__(/*! react */ 1);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _eventListsPolygonEventList = __webpack_require__(/*! ../eventLists/PolygonEventList */ 1415);\n\nvar _eventListsPolygonEventList2 = _interopRequireDefault(_eventListsPolygonEventList);\n\nvar _utilsEventHandlerCreator = __webpack_require__(/*! ../utils/eventHandlerCreator */ 49);\n\nvar _utilsEventHandlerCreator2 = _interopRequireDefault(_utilsEventHandlerCreator);\n\nvar _utilsDefaultPropsCreator = __webpack_require__(/*! ../utils/defaultPropsCreator */ 42);\n\nvar _utilsDefaultPropsCreator2 = _interopRequireDefault(_utilsDefaultPropsCreator);\n\nvar _utilsComposeOptions = __webpack_require__(/*! ../utils/composeOptions */ 41);\n\nvar _utilsComposeOptions2 = _interopRequireDefault(_utilsComposeOptions);\n\nvar _utilsComponentLifecycleDecorator = __webpack_require__(/*! ../utils/componentLifecycleDecorator */ 48);\n\nvar _utilsComponentLifecycleDecorator2 = _interopRequireDefault(_utilsComponentLifecycleDecorator);\n\nvar _GoogleMapHolder = __webpack_require__(/*! ./GoogleMapHolder */ 36);\n\nvar _GoogleMapHolder2 = _interopRequireDefault(_GoogleMapHolder);\n\nvar polygonControlledPropTypes = {\n // NOTICE!!!!!!\n //\n // Only expose those with getters & setters in the table as controlled props.\n //\n // [].map.call($0.querySelectorAll("tr>td>code"), function(it){ return it.textContent; }).filter(function(it){ return it.match(/^set/) && !it.match(/^setMap/); })\n //\n // https://developers.google.com/maps/documentation/javascript/3.exp/reference#Polygon\n draggable: _react.PropTypes.bool,\n editable: _react.PropTypes.bool,\n options: _react.PropTypes.object,\n path: _react.PropTypes.any,\n paths: _react.PropTypes.any,\n visible: _react.PropTypes.bool\n};\n\nexports.polygonControlledPropTypes = polygonControlledPropTypes;\nvar polygonDefaultPropTypes = (0, _utilsDefaultPropsCreator2["default"])(polygonControlledPropTypes);\n\nexports.polygonDefaultPropTypes = polygonDefaultPropTypes;\nvar polygonUpdaters = {\n draggable: function draggable(_draggable, component) {\n component.getPolygon().setDraggable(_draggable);\n },\n editable: function editable(_editable, component) {\n component.getPolygon().setEditable(_editable);\n },\n options: function options(_options, component) {\n component.getPolygon().setOptions(_options);\n },\n path: function path(_path, component) {\n component.getPolygon().setPath(_path);\n },\n paths: function paths(_paths, component) {\n component.getPolygon().setPaths(_paths);\n },\n visible: function visible(_visible, component) {\n component.getPolygon().setVisible(_visible);\n }\n};\n\nvar _eventHandlerCreator = (0, _utilsEventHandlerCreator2["default"])(_eventListsPolygonEventList2["default"]);\n\nvar eventPropTypes = _eventHandlerCreator.eventPropTypes;\nvar registerEvents = _eventHandlerCreator.registerEvents;\nvar polygonEventPropTypes = eventPropTypes;\n\nexports.polygonEventPropTypes = polygonEventPropTypes;\n\nvar PolygonCreator = (function (_Component) {\n _inherits(PolygonCreator, _Component);\n\n function PolygonCreator() {\n _classCallCheck(this, _PolygonCreator);\n\n _get(Object.getPrototypeOf(_PolygonCreator.prototype), "constructor", this).apply(this, arguments);\n }\n\n _createClass(PolygonCreator, [{\n key: "getPolygon",\n value: function getPolygon() {\n return this.props.polygon;\n }\n }, {\n key: "render",\n value: function render() {\n return _react2["default"].createElement("noscript", null);\n }\n }], [{\n key: "_createPolygon",\n value: function _createPolygon(polygonProps) {\n var mapHolderRef = polygonProps.mapHolderRef;\n\n // https://developers.google.com/maps/documentation/javascript/3.exp/reference#Polygon\n var polygon = new google.maps.Polygon((0, _utilsComposeOptions2["default"])(polygonProps, polygonControlledPropTypes));\n\n polygon.setMap(mapHolderRef.getMap());\n\n return polygon;\n }\n }, {\n key: "propTypes",\n value: {\n mapHolderRef: _react.PropTypes.instanceOf(_GoogleMapHolder2["default"]).isRequired,\n polygon: _react.PropTypes.object.isRequired\n },\n enumerable: true\n }]);\n\n var _PolygonCreator = PolygonCreator;\n PolygonCreator = (0, _utilsComponentLifecycleDecorator2["default"])({\n registerEvents: registerEvents,\n instanceMethodName: "getPolygon",\n updaters: polygonUpdaters\n })(PolygonCreator) || PolygonCreator;\n return PolygonCreator;\n})(_react.Component);\n\nexports["default"] = PolygonCreator;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-google-maps/lib/creators/PolygonCreator.js\n// module id = 1404\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-google-maps/lib/creators/PolygonCreator.js?', + ); + + /***/ + }, + /* 1405 */ + /* unknown exports provided */ + /* all exports used */ + /*!*************************************************************!*\ + !*** ./~/react-google-maps/lib/creators/PolylineCreator.js ***! + \*************************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\n\nvar _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();\n\nvar _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar _react = __webpack_require__(/*! react */ 1);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _eventListsPolylineEventList = __webpack_require__(/*! ../eventLists/PolylineEventList */ 1416);\n\nvar _eventListsPolylineEventList2 = _interopRequireDefault(_eventListsPolylineEventList);\n\nvar _utilsEventHandlerCreator = __webpack_require__(/*! ../utils/eventHandlerCreator */ 49);\n\nvar _utilsEventHandlerCreator2 = _interopRequireDefault(_utilsEventHandlerCreator);\n\nvar _utilsDefaultPropsCreator = __webpack_require__(/*! ../utils/defaultPropsCreator */ 42);\n\nvar _utilsDefaultPropsCreator2 = _interopRequireDefault(_utilsDefaultPropsCreator);\n\nvar _utilsComposeOptions = __webpack_require__(/*! ../utils/composeOptions */ 41);\n\nvar _utilsComposeOptions2 = _interopRequireDefault(_utilsComposeOptions);\n\nvar _utilsComponentLifecycleDecorator = __webpack_require__(/*! ../utils/componentLifecycleDecorator */ 48);\n\nvar _utilsComponentLifecycleDecorator2 = _interopRequireDefault(_utilsComponentLifecycleDecorator);\n\nvar _GoogleMapHolder = __webpack_require__(/*! ./GoogleMapHolder */ 36);\n\nvar _GoogleMapHolder2 = _interopRequireDefault(_GoogleMapHolder);\n\nvar polylineControlledPropTypes = {\n // NOTICE!!!!!!\n //\n // Only expose those with getters & setters in the table as controlled props.\n //\n // [].map.call($0.querySelectorAll("tr>td>code"), function(it){ return it.textContent; }).filter(function(it){ return it.match(/^set/) && !it.match(/^setMap/); })\n //\n // https://developers.google.com/maps/documentation/javascript/3.exp/reference#Polyline\n draggable: _react.PropTypes.bool,\n editable: _react.PropTypes.bool,\n options: _react.PropTypes.object,\n path: _react.PropTypes.any,\n visible: _react.PropTypes.bool\n};\n\nexports.polylineControlledPropTypes = polylineControlledPropTypes;\nvar polylineDefaultPropTypes = (0, _utilsDefaultPropsCreator2["default"])(polylineControlledPropTypes);\n\nexports.polylineDefaultPropTypes = polylineDefaultPropTypes;\nvar polylineUpdaters = {\n draggable: function draggable(_draggable, component) {\n component.getPolyline().setDraggable(_draggable);\n },\n editable: function editable(_editable, component) {\n component.getPolyline().setEditable(_editable);\n },\n options: function options(_options, component) {\n component.getPolyline().setOptions(_options);\n },\n path: function path(_path, component) {\n component.getPolyline().setPath(_path);\n },\n visible: function visible(_visible, component) {\n component.getPolyline().setVisible(_visible);\n }\n};\n\nvar _eventHandlerCreator = (0, _utilsEventHandlerCreator2["default"])(_eventListsPolylineEventList2["default"]);\n\nvar eventPropTypes = _eventHandlerCreator.eventPropTypes;\nvar registerEvents = _eventHandlerCreator.registerEvents;\nvar polylineEventPropTypes = eventPropTypes;\n\nexports.polylineEventPropTypes = polylineEventPropTypes;\n\nvar PolylineCreator = (function (_Component) {\n _inherits(PolylineCreator, _Component);\n\n function PolylineCreator() {\n _classCallCheck(this, _PolylineCreator);\n\n _get(Object.getPrototypeOf(_PolylineCreator.prototype), "constructor", this).apply(this, arguments);\n }\n\n _createClass(PolylineCreator, [{\n key: "getPolyline",\n value: function getPolyline() {\n return this.props.polyline;\n }\n }, {\n key: "render",\n value: function render() {\n return _react2["default"].createElement("noscript", null);\n }\n }], [{\n key: "_createPolyline",\n value: function _createPolyline(polylineProps) {\n var mapHolderRef = polylineProps.mapHolderRef;\n\n // https://developers.google.com/maps/documentation/javascript/3.exp/reference#Polyline\n var polyline = new google.maps.Polyline((0, _utilsComposeOptions2["default"])(polylineProps, polylineControlledPropTypes));\n\n polyline.setMap(mapHolderRef.getMap());\n\n return polyline;\n }\n }, {\n key: "propTypes",\n value: {\n mapHolderRef: _react.PropTypes.instanceOf(_GoogleMapHolder2["default"]).isRequired,\n polyline: _react.PropTypes.object.isRequired\n },\n enumerable: true\n }]);\n\n var _PolylineCreator = PolylineCreator;\n PolylineCreator = (0, _utilsComponentLifecycleDecorator2["default"])({\n registerEvents: registerEvents,\n instanceMethodName: "getPolyline",\n updaters: polylineUpdaters\n })(PolylineCreator) || PolylineCreator;\n return PolylineCreator;\n})(_react.Component);\n\nexports["default"] = PolylineCreator;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-google-maps/lib/creators/PolylineCreator.js\n// module id = 1405\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-google-maps/lib/creators/PolylineCreator.js?', + ); + + /***/ + }, + /* 1406 */ + /* unknown exports provided */ + /* all exports used */ + /*!**************************************************************!*\ + !*** ./~/react-google-maps/lib/creators/RectangleCreator.js ***! + \**************************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\n\nvar _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();\n\nvar _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar _react = __webpack_require__(/*! react */ 1);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _eventListsRectangleEventList = __webpack_require__(/*! ../eventLists/RectangleEventList */ 1417);\n\nvar _eventListsRectangleEventList2 = _interopRequireDefault(_eventListsRectangleEventList);\n\nvar _utilsEventHandlerCreator = __webpack_require__(/*! ../utils/eventHandlerCreator */ 49);\n\nvar _utilsEventHandlerCreator2 = _interopRequireDefault(_utilsEventHandlerCreator);\n\nvar _utilsDefaultPropsCreator = __webpack_require__(/*! ../utils/defaultPropsCreator */ 42);\n\nvar _utilsDefaultPropsCreator2 = _interopRequireDefault(_utilsDefaultPropsCreator);\n\nvar _utilsComposeOptions = __webpack_require__(/*! ../utils/composeOptions */ 41);\n\nvar _utilsComposeOptions2 = _interopRequireDefault(_utilsComposeOptions);\n\nvar _utilsComponentLifecycleDecorator = __webpack_require__(/*! ../utils/componentLifecycleDecorator */ 48);\n\nvar _utilsComponentLifecycleDecorator2 = _interopRequireDefault(_utilsComponentLifecycleDecorator);\n\nvar _GoogleMapHolder = __webpack_require__(/*! ./GoogleMapHolder */ 36);\n\nvar _GoogleMapHolder2 = _interopRequireDefault(_GoogleMapHolder);\n\nvar rectangleControlledPropTypes = {\n // NOTICE!!!!!!\n //\n // Only expose those with getters & setters in the table as controlled props.\n //\n // [].map.call($0.querySelectorAll("tr>td>code"), function(it){ return it.textContent; }).filter(function(it){ return it.match(/^set/) && !it.match(/^setMap/); })\n //\n // https://developers.google.com/maps/documentation/javascript/3.exp/reference#Rectangle\n bounds: _react.PropTypes.any,\n draggable: _react.PropTypes.bool,\n editable: _react.PropTypes.bool,\n options: _react.PropTypes.object,\n visible: _react.PropTypes.bool\n};\n\nexports.rectangleControlledPropTypes = rectangleControlledPropTypes;\nvar rectangleDefaultPropTypes = (0, _utilsDefaultPropsCreator2["default"])(rectangleControlledPropTypes);\n\nexports.rectangleDefaultPropTypes = rectangleDefaultPropTypes;\nvar rectangleUpdaters = {\n bounds: function bounds(_bounds, component) {\n component.getRectangle().setBounds(_bounds);\n },\n draggable: function draggable(_draggable, component) {\n component.getRectangle().setDraggable(_draggable);\n },\n editable: function editable(_editable, component) {\n component.getRectangle().setEditable(_editable);\n },\n options: function options(_options, component) {\n component.getRectangle().setOptions(_options);\n },\n visible: function visible(_visible, component) {\n component.getRectangle().setVisible(_visible);\n }\n};\n\nvar _eventHandlerCreator = (0, _utilsEventHandlerCreator2["default"])(_eventListsRectangleEventList2["default"]);\n\nvar eventPropTypes = _eventHandlerCreator.eventPropTypes;\nvar registerEvents = _eventHandlerCreator.registerEvents;\nvar rectangleEventPropTypes = eventPropTypes;\n\nexports.rectangleEventPropTypes = rectangleEventPropTypes;\n\nvar RectangleCreator = (function (_Component) {\n _inherits(RectangleCreator, _Component);\n\n function RectangleCreator() {\n _classCallCheck(this, _RectangleCreator);\n\n _get(Object.getPrototypeOf(_RectangleCreator.prototype), "constructor", this).apply(this, arguments);\n }\n\n _createClass(RectangleCreator, [{\n key: "getRectangle",\n value: function getRectangle() {\n return this.props.rectangle;\n }\n }, {\n key: "render",\n value: function render() {\n return _react2["default"].createElement("noscript", null);\n }\n }], [{\n key: "_createRectangle",\n value: function _createRectangle(rectangleProps) {\n var mapHolderRef = rectangleProps.mapHolderRef;\n\n // https://developers.google.com/maps/documentation/javascript/3.exp/reference#Rectangle\n var rectangle = new google.maps.Rectangle((0, _utilsComposeOptions2["default"])(rectangleProps, rectangleControlledPropTypes));\n\n rectangle.setMap(mapHolderRef.getMap());\n\n return rectangle;\n }\n }, {\n key: "propTypes",\n value: {\n mapHolderRef: _react.PropTypes.instanceOf(_GoogleMapHolder2["default"]).isRequired,\n rectangle: _react.PropTypes.object.isRequired\n },\n enumerable: true\n }]);\n\n var _RectangleCreator = RectangleCreator;\n RectangleCreator = (0, _utilsComponentLifecycleDecorator2["default"])({\n registerEvents: registerEvents,\n instanceMethodName: "getRectangle",\n updaters: rectangleUpdaters\n })(RectangleCreator) || RectangleCreator;\n return RectangleCreator;\n})(_react.Component);\n\nexports["default"] = RectangleCreator;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-google-maps/lib/creators/RectangleCreator.js\n// module id = 1406\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-google-maps/lib/creators/RectangleCreator.js?', + ); + + /***/ + }, + /* 1407 */ + /* unknown exports provided */ + /* all exports used */ + /*!**************************************************************!*\ + !*** ./~/react-google-maps/lib/creators/SearchBoxCreator.js ***! + \**************************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\n\nvar _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();\n\nvar _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar _react = __webpack_require__(/*! react */ 1);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _eventListsSearchBoxEventList = __webpack_require__(/*! ../eventLists/SearchBoxEventList */ 1418);\n\nvar _eventListsSearchBoxEventList2 = _interopRequireDefault(_eventListsSearchBoxEventList);\n\nvar _utilsEventHandlerCreator = __webpack_require__(/*! ../utils/eventHandlerCreator */ 49);\n\nvar _utilsEventHandlerCreator2 = _interopRequireDefault(_utilsEventHandlerCreator);\n\nvar _utilsDefaultPropsCreator = __webpack_require__(/*! ../utils/defaultPropsCreator */ 42);\n\nvar _utilsDefaultPropsCreator2 = _interopRequireDefault(_utilsDefaultPropsCreator);\n\nvar _utilsComposeOptions = __webpack_require__(/*! ../utils/composeOptions */ 41);\n\nvar _utilsComposeOptions2 = _interopRequireDefault(_utilsComposeOptions);\n\nvar _utilsComponentLifecycleDecorator = __webpack_require__(/*! ../utils/componentLifecycleDecorator */ 48);\n\nvar _utilsComponentLifecycleDecorator2 = _interopRequireDefault(_utilsComponentLifecycleDecorator);\n\nvar _GoogleMapHolder = __webpack_require__(/*! ./GoogleMapHolder */ 36);\n\nvar _GoogleMapHolder2 = _interopRequireDefault(_GoogleMapHolder);\n\nvar searchBoxControlledPropTypes = {\n // NOTICE!!!!!!\n //\n // Only expose those with getters & setters in the table as controlled props.\n //\n bounds: _react.PropTypes.any\n};\n\nexports.searchBoxControlledPropTypes = searchBoxControlledPropTypes;\nvar searchBoxDefaultPropTypes = (0, _utilsDefaultPropsCreator2["default"])(searchBoxControlledPropTypes);\n\nexports.searchBoxDefaultPropTypes = searchBoxDefaultPropTypes;\nvar searchBoxUpdaters = {\n bounds: function bounds(_bounds, component) {\n component.getSearchBox().setBounds(_bounds);\n }\n};\n\nvar _eventHandlerCreator = (0, _utilsEventHandlerCreator2["default"])(_eventListsSearchBoxEventList2["default"]);\n\nvar eventPropTypes = _eventHandlerCreator.eventPropTypes;\nvar registerEvents = _eventHandlerCreator.registerEvents;\nvar searchBoxEventPropTypes = eventPropTypes;\n\nexports.searchBoxEventPropTypes = searchBoxEventPropTypes;\n\nvar SearchBoxCreator = (function (_Component) {\n _inherits(SearchBoxCreator, _Component);\n\n function SearchBoxCreator() {\n _classCallCheck(this, _SearchBoxCreator);\n\n _get(Object.getPrototypeOf(_SearchBoxCreator.prototype), "constructor", this).apply(this, arguments);\n }\n\n _createClass(SearchBoxCreator, [{\n key: "componentDidMount",\n value: function componentDidMount() {\n this._mountComponentToMap(this.props.controlPosition);\n }\n }, {\n key: "componentDidUpdate",\n value: function componentDidUpdate(prevProps) {\n if (this.props.controlPosition !== prevProps.controlPosition) {\n this._unmountComponentFromMap(prevProps.controlPosition);\n this._mountComponentToMap(this.props.controlPosition);\n }\n }\n }, {\n key: "componentWillUnmount",\n value: function componentWillUnmount() {\n this._unmountComponentFromMap(this.props.controlPosition);\n }\n }, {\n key: "_mountComponentToMap",\n value: function _mountComponentToMap(controlPosition) {\n var _props = this.props;\n var mapHolderRef = _props.mapHolderRef;\n var inputElement = _props.inputElement;\n\n mapHolderRef.getMap().controls[controlPosition].push(inputElement);\n }\n }, {\n key: "_unmountComponentFromMap",\n value: function _unmountComponentFromMap(controlPosition) {\n var _props2 = this.props;\n var mapHolderRef = _props2.mapHolderRef;\n var inputElement = _props2.inputElement;\n\n var index = mapHolderRef.getMap().controls[controlPosition].getArray().indexOf(inputElement);\n mapHolderRef.getMap().controls[controlPosition].removeAt(index);\n }\n }, {\n key: "getSearchBox",\n value: function getSearchBox() {\n return this.props.searchBox;\n }\n }, {\n key: "render",\n value: function render() {\n return _react2["default"].createElement("noscript", null);\n }\n }], [{\n key: "_createSearchBox",\n value: function _createSearchBox(inputElement, searchBoxProps) {\n var searchBox = new google.maps.places.SearchBox(inputElement, (0, _utilsComposeOptions2["default"])(searchBoxProps, searchBoxControlledPropTypes));\n\n return searchBox;\n }\n }, {\n key: "propTypes",\n value: {\n mapHolderRef: _react.PropTypes.instanceOf(_GoogleMapHolder2["default"]).isRequired,\n searchBox: _react.PropTypes.object.isRequired\n },\n enumerable: true\n }]);\n\n var _SearchBoxCreator = SearchBoxCreator;\n SearchBoxCreator = (0, _utilsComponentLifecycleDecorator2["default"])({\n registerEvents: registerEvents,\n instanceMethodName: "getSearchBox",\n updaters: searchBoxUpdaters\n })(SearchBoxCreator) || SearchBoxCreator;\n return SearchBoxCreator;\n})(_react.Component);\n\nexports["default"] = SearchBoxCreator;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-google-maps/lib/creators/SearchBoxCreator.js\n// module id = 1407\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-google-maps/lib/creators/SearchBoxCreator.js?', + ); + + /***/ + }, + /* 1408 */ + /* unknown exports provided */ + /* all exports used */ + /*!***************************************************************!*\ + !*** ./~/react-google-maps/lib/eventLists/CircleEventList.js ***! + \***************************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '// https://developers.google.com/maps/documentation/javascript/3.exp/reference#Circle\n// [].map.call($0.querySelectorAll("tr>td>code"), function(it){ return it.textContent; })\n\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports["default"] = ["center_changed", "click", "dblclick", "drag", "dragend", "dragstart", "mousedown", "mousemove", "mouseout", "mouseover", "mouseup", "radius_changed", "rightclick"];\nmodule.exports = exports["default"];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-google-maps/lib/eventLists/CircleEventList.js\n// module id = 1408\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-google-maps/lib/eventLists/CircleEventList.js?', + ); + + /***/ + }, + /* 1409 */ + /* unknown exports provided */ + /* all exports used */ + /*!***************************************************************************!*\ + !*** ./~/react-google-maps/lib/eventLists/DirectionsRendererEventList.js ***! + \***************************************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '// https://developers.google.com/maps/documentation/javascript/3.exp/reference#DirectionsRenderer\n// [].map.call($0.querySelectorAll("tr>td>code"), function(it){ return it.textContent; })\n\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports["default"] = ["directions_changed"];\nmodule.exports = exports["default"];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-google-maps/lib/eventLists/DirectionsRendererEventList.js\n// module id = 1409\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-google-maps/lib/eventLists/DirectionsRendererEventList.js?', + ); + + /***/ + }, + /* 1410 */ + /* unknown exports provided */ + /* all exports used */ + /*!***********************************************************************!*\ + !*** ./~/react-google-maps/lib/eventLists/DrawingManagerEventList.js ***! + \***********************************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '// https://developers.google.com/maps/documentation/javascript/3.exp/reference#DrawingManager\n// [].map.call($0.querySelectorAll("tr>td>code"), function(it){ return it.textContent; })\n\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports["default"] = ["circlecomplete", "markercomplete", "overlaycomplete", "polygoncomplete", "polylinecomplete", "rectanglecomplete"];\nmodule.exports = exports["default"];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-google-maps/lib/eventLists/DrawingManagerEventList.js\n// module id = 1410\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-google-maps/lib/eventLists/DrawingManagerEventList.js?', + ); + + /***/ + }, + /* 1411 */ + /* unknown exports provided */ + /* all exports used */ + /*!******************************************************************!*\ + !*** ./~/react-google-maps/lib/eventLists/GoogleMapEventList.js ***! + \******************************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '// https://developers.google.com/maps/documentation/javascript/3.exp/reference#Map\n// [].map.call($0.querySelectorAll("tr>td>code"), function(it){ return it.textContent; })\n\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports["default"] = ["bounds_changed", "center_changed", "click", "dblclick", "drag", "dragend", "dragstart", "heading_changed", "idle", "maptypeid_changed", "mousemove", "mouseout", "mouseover", "projection_changed", "resize", "rightclick", "tilesloaded", "tilt_changed", "zoom_changed"];\nmodule.exports = exports["default"];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-google-maps/lib/eventLists/GoogleMapEventList.js\n// module id = 1411\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-google-maps/lib/eventLists/GoogleMapEventList.js?', + ); + + /***/ + }, + /* 1412 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************************************************!*\ + !*** ./~/react-google-maps/lib/eventLists/InfoWindowEventList.js ***! + \*******************************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '// https://developers.google.com/maps/documentation/javascript/3.exp/reference#InfoWindow\n// [].map.call($0.querySelectorAll("tr>td>code"), function(it){ return it.textContent; })\n\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports["default"] = ["closeclick", "content_changed", "domready", "position_changed", "zindex_changed"];\nmodule.exports = exports["default"];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-google-maps/lib/eventLists/InfoWindowEventList.js\n// module id = 1412\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-google-maps/lib/eventLists/InfoWindowEventList.js?', + ); + + /***/ + }, + /* 1413 */ + /* unknown exports provided */ + /* all exports used */ + /*!*****************************************************************!*\ + !*** ./~/react-google-maps/lib/eventLists/KmlLayerEventList.js ***! + \*****************************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '// https://developers.google.com/maps/documentation/javascript/3.exp/reference#KmlLayer\n// [].map.call($0.querySelectorAll("tr>td>code"), function(it){ return it.textContent; })\n\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports["default"] = ["click", "defaultviewport_changed", "status_changed"];\nmodule.exports = exports["default"];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-google-maps/lib/eventLists/KmlLayerEventList.js\n// module id = 1413\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-google-maps/lib/eventLists/KmlLayerEventList.js?', + ); + + /***/ + }, + /* 1414 */ + /* unknown exports provided */ + /* all exports used */ + /*!***************************************************************!*\ + !*** ./~/react-google-maps/lib/eventLists/MarkerEventList.js ***! + \***************************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '// https://developers.google.com/maps/documentation/javascript/3.exp/reference#Marker\n// [].map.call($0.querySelectorAll("tr>td>code"), function(it){ return it.textContent; })\n\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports["default"] = ["animation_changed", "click", "clickable_changed", "cursor_changed", "dblclick", "drag", "dragend", "draggable_changed", "dragstart", "flat_changed", "icon_changed", "mousedown", "mouseout", "mouseover", "mouseup", "position_changed", "rightclick", "shape_changed", "title_changed", "visible_changed", "zindex_changed"];\nmodule.exports = exports["default"];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-google-maps/lib/eventLists/MarkerEventList.js\n// module id = 1414\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-google-maps/lib/eventLists/MarkerEventList.js?', + ); + + /***/ + }, + /* 1415 */ + /* unknown exports provided */ + /* all exports used */ + /*!****************************************************************!*\ + !*** ./~/react-google-maps/lib/eventLists/PolygonEventList.js ***! + \****************************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '// https://developers.google.com/maps/documentation/javascript/3.exp/reference#Polygon\n// [].map.call($0.querySelectorAll("tr>td>code"), function(it){ return it.textContent; })\n\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports["default"] = ["click", "dblclick", "drag", "dragend", "dragstart", "mousedown", "mousemove", "mouseout", "mouseover", "mouseup", "rightclick"];\nmodule.exports = exports["default"];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-google-maps/lib/eventLists/PolygonEventList.js\n// module id = 1415\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-google-maps/lib/eventLists/PolygonEventList.js?', + ); + + /***/ + }, + /* 1416 */ + /* unknown exports provided */ + /* all exports used */ + /*!*****************************************************************!*\ + !*** ./~/react-google-maps/lib/eventLists/PolylineEventList.js ***! + \*****************************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '// https://developers.google.com/maps/documentation/javascript/3.exp/reference#Polyline\n// [].map.call($0.querySelectorAll("tr>td>code"), function(it){ return it.textContent; })\n\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports["default"] = ["click", "dblclick", "drag", "dragend", "dragstart", "mousedown", "mousemove", "mouseout", "mouseover", "mouseup", "rightclick"];\nmodule.exports = exports["default"];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-google-maps/lib/eventLists/PolylineEventList.js\n// module id = 1416\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-google-maps/lib/eventLists/PolylineEventList.js?', + ); + + /***/ + }, + /* 1417 */ + /* unknown exports provided */ + /* all exports used */ + /*!******************************************************************!*\ + !*** ./~/react-google-maps/lib/eventLists/RectangleEventList.js ***! + \******************************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '// https://developers.google.com/maps/documentation/javascript/3.exp/reference#Rectangle\n// [].map.call($0.querySelectorAll("tr>td>code"), function(it){ return it.textContent; })\n\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports["default"] = ["bounds_changed", "click", "dblclick", "drag", "dragend", "dragstart", "mousedown", "mousemove", "mouseout", "mouseover", "mouseup", "rightclick"];\nmodule.exports = exports["default"];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-google-maps/lib/eventLists/RectangleEventList.js\n// module id = 1417\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-google-maps/lib/eventLists/RectangleEventList.js?', + ); + + /***/ + }, + /* 1418 */ + /* unknown exports provided */ + /* all exports used */ + /*!******************************************************************!*\ + !*** ./~/react-google-maps/lib/eventLists/SearchBoxEventList.js ***! + \******************************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '// https://developers.google.com/maps/documentation/javascript/3.exp/reference#SearchBox\n// [].map.call($0.querySelectorAll("tr>td>code"), function(it){ return it.textContent; })\n\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports["default"] = ["places_changed"];\nmodule.exports = exports["default"];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-google-maps/lib/eventLists/SearchBoxEventList.js\n// module id = 1418\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-google-maps/lib/eventLists/SearchBoxEventList.js?', + ); + + /***/ + }, + /* 1419 */ + /* unknown exports provided */ + /* all exports used */ + /*!**************************************************************!*\ + !*** ./~/react-google-maps/lib/utils/controlledOrDefault.js ***! + \**************************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports["default"] = controlledOrDefault;\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }\n\nvar _addDefaultPrefix = __webpack_require__(/*! ./addDefaultPrefix */ 559);\n\nvar _addDefaultPrefix2 = _interopRequireDefault(_addDefaultPrefix);\n\nfunction controlledOrDefault(props) {\n return function (name) {\n if (Object.prototype.hasOwnProperty.call(props, name)) {\n return props[name];\n } else {\n return props[(0, _addDefaultPrefix2["default"])(name)];\n }\n };\n}\n\nmodule.exports = exports["default"];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-google-maps/lib/utils/controlledOrDefault.js\n// module id = 1419\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-google-maps/lib/utils/controlledOrDefault.js?', + ); + + /***/ + }, + /* 1420 */ + /* unknown exports provided */ + /* all exports used */ + /*!****************************************************************************!*\ + !*** ./~/react-google-maps/lib/utils/setContentForOptionalReactElement.js ***! + \****************************************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports["default"] = setContentForOptionalReactElement;\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }\n\nvar _react = __webpack_require__(/*! react */ 1);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactDom = __webpack_require__(/*! react-dom */ 16);\n\nfunction renderElement(contentElement, possiblePrevContent) {\n var prevContent = possiblePrevContent;\n if ("[object HTMLDivElement]" !== Object.prototype.toString.call(prevContent)) {\n prevContent = document.createElement("div");\n }\n\n (0, _reactDom.render)(contentElement, prevContent);\n return prevContent;\n}\n\nfunction setContentForOptionalReactElement(contentOptionalReactElement, infoWindowLikeInstance) {\n if (_react2["default"].isValidElement(contentOptionalReactElement)) {\n var contentElement = _react.Children.only(contentOptionalReactElement);\n var prevContent = infoWindowLikeInstance.getContent();\n\n var domEl = renderElement(contentElement, prevContent);\n infoWindowLikeInstance.setContent(domEl);\n } else {\n infoWindowLikeInstance.setContent(contentOptionalReactElement);\n }\n}\n\nmodule.exports = exports["default"];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-google-maps/lib/utils/setContentForOptionalReactElement.js\n// module id = 1420\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-google-maps/lib/utils/setContentForOptionalReactElement.js?', + ); + + /***/ + }, + /* 1421 */ + /* unknown exports provided */ + /* all exports used */ + /*!****************************************!*\ + !*** ./~/react-measure/lib/Measure.js ***! + \****************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(/*! react */ 1);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _propTypes = __webpack_require__(/*! prop-types */ 0);\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nvar _reactDom = __webpack_require__(/*! react-dom */ 16);\n\nvar _reactDom2 = _interopRequireDefault(_reactDom);\n\nvar _resizeObserverPolyfill = __webpack_require__(/*! resize-observer-polyfill */ 1487);\n\nvar _resizeObserverPolyfill2 = _interopRequireDefault(_resizeObserverPolyfill);\n\nvar _getNodeDimensions = __webpack_require__(/*! get-node-dimensions */ 1142);\n\nvar _getNodeDimensions2 = _interopRequireDefault(_getNodeDimensions);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Measure = function (_Component) {\n _inherits(Measure, _Component);\n\n function Measure(props) {\n _classCallCheck(this, Measure);\n\n var _this = _possibleConstructorReturn(this, (Measure.__proto__ || Object.getPrototypeOf(Measure)).call(this, props));\n\n _this.measure = function () {\n var includeMargin = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _this.props.includeMargin;\n var useClone = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _this.props.useClone;\n\n // bail out if we shouldn't measure\n if (!_this.props.shouldMeasure) return;\n\n // if no parent available we need to requery the DOM node\n if (!_this._node.parentNode) {\n _this._setDOMNode();\n }\n\n var dimensions = _this.getDimensions(_this._node, includeMargin, useClone);\n var isChildFunction = typeof _this.props.children === 'function';\n\n // determine if we need to update our callback with new dimensions or not\n _this._propsToMeasure.some(function (prop) {\n if (dimensions[prop] !== _this._lastDimensions[prop]) {\n // update our callback if we've found a dimension that has changed\n _this.props.onMeasure(dimensions);\n\n // update state to send dimensions to child function\n if (isChildFunction && typeof _this !== 'undefined') {\n _this.setState({ dimensions: dimensions });\n }\n\n // store last dimensions to compare changes\n _this._lastDimensions = dimensions;\n\n // we don't need to look any further, bail out\n return true;\n }\n });\n };\n\n _this.state = {\n dimensions: {\n width: 0,\n height: 0,\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n }\n };\n _this._node = null;\n _this._propsToMeasure = _this._getPropsToMeasure(props);\n _this._lastDimensions = {};\n return _this;\n }\n\n _createClass(Measure, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n var _this2 = this;\n\n this._setDOMNode();\n\n // measure on first render\n this.measure();\n\n // add component to resize observer to detect changes on resize\n this.resizeObserver = new _resizeObserverPolyfill2.default(function () {\n return _this2.measure();\n });\n this.resizeObserver.observe(this._node);\n }\n }, {\n key: 'componentWillReceiveProps',\n value: function componentWillReceiveProps(_ref) {\n var config = _ref.config,\n whitelist = _ref.whitelist,\n blacklist = _ref.blacklist;\n\n // we store the properties ourselves so we need to update them if the\n // whitelist or blacklist props have changed\n if (this.props.whitelist !== whitelist || this.props.blacklist !== blacklist) {\n this._propsToMeasure = this._getPropsToMeasure({ whitelist: whitelist, blacklist: blacklist });\n }\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n this.resizeObserver.disconnect(this._node);\n this._node = null;\n }\n }, {\n key: '_setDOMNode',\n value: function _setDOMNode() {\n this._node = _reactDom2.default.findDOMNode(this);\n }\n }, {\n key: 'getDimensions',\n value: function getDimensions() {\n var node = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this._node;\n var includeMargin = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.props.includeMargin;\n var useClone = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.props.useClone;\n var cloneOptions = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : this.props.cloneOptions;\n\n return (0, _getNodeDimensions2.default)(node, _extends({\n margin: includeMargin,\n clone: useClone\n }, cloneOptions));\n }\n }, {\n key: '_getPropsToMeasure',\n value: function _getPropsToMeasure(_ref2) {\n var whitelist = _ref2.whitelist,\n blacklist = _ref2.blacklist;\n\n return whitelist.filter(function (prop) {\n return blacklist.indexOf(prop) < 0;\n });\n }\n }, {\n key: 'render',\n value: function render() {\n var children = this.props.children;\n\n return _react.Children.only(typeof children === 'function' ? children(this.state.dimensions) : children);\n }\n }]);\n\n return Measure;\n}(_react.Component);\n\nMeasure.propTypes = {\n whitelist: _propTypes2.default.array,\n blacklist: _propTypes2.default.array,\n includeMargin: _propTypes2.default.bool,\n useClone: _propTypes2.default.bool,\n cloneOptions: _propTypes2.default.object,\n shouldMeasure: _propTypes2.default.bool,\n onMeasure: _propTypes2.default.func\n};\nMeasure.defaultProps = {\n whitelist: ['width', 'height', 'top', 'right', 'bottom', 'left'],\n blacklist: [],\n includeMargin: true,\n useClone: false,\n cloneOptions: {},\n shouldMeasure: true,\n onMeasure: function onMeasure() {\n return null;\n }\n};\nexports.default = Measure;\nmodule.exports = exports['default'];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-measure/lib/Measure.js\n// module id = 1421\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-measure/lib/Measure.js?", + ); + + /***/ + }, + /* 1422 */ + /* unknown exports provided */ + /* exports used: default */ + /*!**********************************************!*\ + !*** ./~/react-measure/lib/react-measure.js ***! + \**********************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = undefined;\n\nvar _Measure = __webpack_require__(/*! ./Measure */ 1421);\n\nvar _Measure2 = _interopRequireDefault(_Measure);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = _Measure2.default;\nmodule.exports = exports[\'default\'];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-measure/lib/react-measure.js\n// module id = 1422\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-measure/lib/react-measure.js?', + ); + + /***/ + }, + /* 1423 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************************************************!*\ + !*** ./~/react-moment-proptypes/src/moment-validation-wrapper.js ***! + \*******************************************************************/ + /***/ function (module, exports, __webpack_require__) { + eval( + "var moment = __webpack_require__(/*! moment */ 3);\n\nfunction isValidMoment(testMoment) {\n if (typeof testMoment.isValid === 'function') {\n // moment 1.7.0+\n return testMoment.isValid();\n }\n\n return ! isNaN(testMoment);\n}\n\nmodule.exports = {\n isValidMoment : isValidMoment,\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-moment-proptypes/src/moment-validation-wrapper.js\n// module id = 1423\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-moment-proptypes/src/moment-validation-wrapper.js?", + ); + + /***/ + }, + /* 1424 */ + /* unknown exports provided */ + /* all exports used */ + /*!***********************************************************!*\ + !*** ./~/react-on-rails/node_package/lib/Authenticity.js ***! + \***********************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _assign = __webpack_require__(/*! babel-runtime/core-js/object/assign */ 147);\n\nvar _assign2 = _interopRequireDefault(_assign);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = {\n authenticityToken: function authenticityToken() {\n var token = document.querySelector('meta[name=\"csrf-token\"]');\n if (token && token instanceof window.HTMLMetaElement) {\n return token.content;\n }\n return null;\n },\n authenticityHeaders: function authenticityHeaders() {\n var otherHeaders = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n return (0, _assign2.default)(otherHeaders, {\n 'X-CSRF-Token': this.authenticityToken(),\n 'X-Requested-With': 'XMLHttpRequest'\n });\n }\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-on-rails/node_package/lib/Authenticity.js\n// module id = 1424\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-on-rails/node_package/lib/Authenticity.js?", + ); + + /***/ + }, + /* 1425 */ + /* unknown exports provided */ + /* all exports used */ + /*!**********************************************************!*\ + !*** ./~/react-on-rails/node_package/lib/RenderUtils.js ***! + \**********************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = {\n wrapInScriptTags: function wrapInScriptTags(scriptId, scriptBody) {\n if (!scriptBody) {\n return '';\n }\n\n return '\\n<script id=\"' + scriptId + '\">\\n' + scriptBody + '\\n</script>';\n }\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-on-rails/node_package/lib/RenderUtils.js\n// module id = 1425\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-on-rails/node_package/lib/RenderUtils.js?", + ); + + /***/ + }, + /* 1426 */ + /* unknown exports provided */ + /* all exports used */ + /*!************************************************************!*\ + !*** ./~/react-on-rails/node_package/lib/StoreRegistry.js ***! + \************************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _from = __webpack_require__(/*! babel-runtime/core-js/array/from */ 145);\n\nvar _from2 = _interopRequireDefault(_from);\n\nvar _keys = __webpack_require__(/*! babel-runtime/core-js/object/keys */ 194);\n\nvar _keys2 = _interopRequireDefault(_keys);\n\nvar _map = __webpack_require__(/*! babel-runtime/core-js/map */ 313);\n\nvar _map2 = _interopRequireDefault(_map);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// key = name used by react_on_rails to identify the store\n// value = redux store creator, which is a function that takes props and returns a store\nvar registeredStoreGenerators = new _map2.default();\nvar hydratedStores = new _map2.default();\n\nexports.default = {\n /**\n * Register a store generator, a function that takes props and returns a store.\n * @param storeGenerators { name1: storeGenerator1, name2: storeGenerator2 }\n */\n register: function register(storeGenerators) {\n (0, _keys2.default)(storeGenerators).forEach(function (name) {\n if (registeredStoreGenerators.has(name)) {\n console.warn('Called registerStore for store that is already registered', name);\n }\n\n var store = storeGenerators[name];\n if (!store) {\n throw new Error('Called ReactOnRails.registerStores with a null or undefined as a value ' + ('for the store generator with key ' + name + '.'));\n }\n\n registeredStoreGenerators.set(name, store);\n });\n },\n\n\n /**\n * Used by components to get the hydrated store which contains props.\n * @param name\n * @param throwIfMissing Defaults to true. Set to false to have this call return undefined if\n * there is no store with the given name.\n * @returns Redux Store, possibly hydrated\n */\n getStore: function getStore(name) {\n var throwIfMissing = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n\n if (hydratedStores.has(name)) {\n return hydratedStores.get(name);\n }\n\n var storeKeys = (0, _from2.default)(hydratedStores.keys()).join(', ');\n\n if (storeKeys.length === 0) {\n var msg = 'There are no stores hydrated and you are requesting the store ' + name + '.\\nThis can happen if you are server rendering and either:\\n1. You do not call redux_store near the top of your controller action\\'s view (not the layout)\\n and before any call to react_component.\\n2. You do not render redux_store_hydration_data anywhere on your page.';\n throw new Error(msg);\n }\n\n if (throwIfMissing) {\n console.log('storeKeys', storeKeys);\n throw new Error('Could not find hydrated store with name \\'' + name + '\\'. ' + ('Hydrated store names include [' + storeKeys + '].'));\n }\n\n return undefined;\n },\n\n\n /**\n * Internally used function to get the store creator that was passed to `register`.\n * @param name\n * @returns storeCreator with given name\n */\n getStoreGenerator: function getStoreGenerator(name) {\n if (registeredStoreGenerators.has(name)) {\n return registeredStoreGenerators.get(name);\n }\n\n var storeKeys = (0, _from2.default)(registeredStoreGenerators.keys()).join(', ');\n throw new Error('Could not find store registered with name \\'' + name + '\\'. Registered store ' + ('names include [ ' + storeKeys + ' ]. Maybe you forgot to register the store?'));\n },\n\n\n /**\n * Internally used function to set the hydrated store after a Rails page is loaded.\n * @param name\n * @param store (not the storeGenerator, but the hydrated store)\n */\n setStore: function setStore(name, store) {\n hydratedStores.set(name, store);\n },\n\n\n /**\n * Internally used function to completely clear hydratedStores Map.\n */\n clearHydratedStores: function clearHydratedStores() {\n hydratedStores.clear();\n },\n\n\n /**\n * Get a Map containing all registered store generators. Useful for debugging.\n * @returns Map where key is the component name and values are the store generators.\n */\n storeGenerators: function storeGenerators() {\n return registeredStoreGenerators;\n },\n\n\n /**\n * Get a Map containing all hydrated stores. Useful for debugging.\n * @returns Map where key is the component name and values are the hydrated stores.\n */\n stores: function stores() {\n return hydratedStores;\n }\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-on-rails/node_package/lib/StoreRegistry.js\n// module id = 1426\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-on-rails/node_package/lib/StoreRegistry.js?", + ); + + /***/ + }, + /* 1427 */ + /* unknown exports provided */ + /* all exports used */ + /*!************************************************************!*\ + !*** ./~/react-on-rails/node_package/lib/clientStartup.js ***! + \************************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/* WEBPACK VAR INJECTION */(function(global) {\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _stringify = __webpack_require__(/*! babel-runtime/core-js/json/stringify */ 146);\n\nvar _stringify2 = _interopRequireDefault(_stringify);\n\nexports.reactOnRailsPageLoaded = reactOnRailsPageLoaded;\nexports.clientStartup = clientStartup;\n\nvar _reactDom = __webpack_require__(/*! react-dom */ 16);\n\nvar _reactDom2 = _interopRequireDefault(_reactDom);\n\nvar _createReactElement = __webpack_require__(/*! ./createReactElement */ 262);\n\nvar _createReactElement2 = _interopRequireDefault(_createReactElement);\n\nvar _isCreateReactElementResultNonReactComponent = __webpack_require__(/*! ./isCreateReactElementResultNonReactComponent */ 564);\n\nvar _isCreateReactElementResultNonReactComponent2 = _interopRequireDefault(_isCreateReactElementResultNonReactComponent);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar REACT_ON_RAILS_STORE_ATTRIBUTE = 'data-js-react-on-rails-store'; /* global ReactOnRails Turbolinks */\n\nfunction findContext() {\n if (typeof window.ReactOnRails !== 'undefined') {\n return window;\n } else if (typeof ReactOnRails !== 'undefined') {\n return global;\n }\n\n throw new Error('ReactOnRails is undefined in both global and window namespaces.\\n ');\n}\n\nfunction debugTurbolinks() {\n if (!window) {\n return;\n }\n\n var context = findContext();\n if (context.ReactOnRails.option('traceTurbolinks')) {\n var _console;\n\n for (var _len = arguments.length, msg = Array(_len), _key = 0; _key < _len; _key++) {\n msg[_key] = arguments[_key];\n }\n\n (_console = console).log.apply(_console, ['TURBO:'].concat(msg));\n }\n}\n\nfunction turbolinksInstalled() {\n return typeof Turbolinks !== 'undefined';\n}\n\nfunction forEach(fn, className, railsContext) {\n var els = document.getElementsByClassName(className);\n for (var i = 0; i < els.length; i += 1) {\n fn(els[i], railsContext);\n }\n}\n\nfunction forEachByAttribute(fn, attributeName, railsContext) {\n var els = document.querySelectorAll('[' + attributeName + ']');\n for (var i = 0; i < els.length; i += 1) {\n fn(els[i], railsContext);\n }\n}\n\nfunction forEachComponent(fn, railsContext) {\n forEach(fn, 'js-react-on-rails-component', railsContext);\n}\n\nfunction initializeStore(el, railsContext) {\n var context = findContext();\n var name = el.getAttribute(REACT_ON_RAILS_STORE_ATTRIBUTE);\n var props = JSON.parse(el.textContent);\n var storeGenerator = context.ReactOnRails.getStoreGenerator(name);\n var store = storeGenerator(props, railsContext);\n context.ReactOnRails.setStore(name, store);\n}\n\nfunction forEachStore(railsContext) {\n forEachByAttribute(initializeStore, REACT_ON_RAILS_STORE_ATTRIBUTE, railsContext);\n}\n\nfunction turbolinksVersion5() {\n return typeof Turbolinks.controller !== 'undefined';\n}\n\nfunction turbolinksSupported() {\n return Turbolinks.supported;\n}\n\nfunction delegateToRenderer(componentObj, props, railsContext, domNodeId, trace) {\n var name = componentObj.name,\n component = componentObj.component,\n isRenderer = componentObj.isRenderer;\n\n\n if (isRenderer) {\n if (trace) {\n console.log('DELEGATING TO RENDERER ' + name + ' for dom node with id: ' + domNodeId + ' with props, railsContext:', props, railsContext);\n }\n\n component(props, railsContext, domNodeId);\n return true;\n }\n\n return false;\n}\n\nfunction domNodeIdForEl(el) {\n return el.getAttribute('data-dom-id');\n}\n\n/**\n * Used for client rendering by ReactOnRails. Either calls ReactDOM.render or delegates\n * to a renderer registered by the user.\n * @param el\n */\nfunction render(el, railsContext) {\n var context = findContext();\n // This must match app/helpers/react_on_rails_helper.rb:113\n var name = el.getAttribute('data-component-name');\n var domNodeId = domNodeIdForEl(el);\n var props = JSON.parse(el.textContent);\n var trace = el.getAttribute('data-trace');\n\n try {\n var domNode = document.getElementById(domNodeId);\n if (domNode) {\n var componentObj = context.ReactOnRails.getComponent(name);\n if (delegateToRenderer(componentObj, props, railsContext, domNodeId, trace)) {\n return;\n }\n\n var reactElementOrRouterResult = (0, _createReactElement2.default)({\n componentObj: componentObj,\n props: props,\n domNodeId: domNodeId,\n trace: trace,\n railsContext: railsContext\n });\n\n if ((0, _isCreateReactElementResultNonReactComponent2.default)(reactElementOrRouterResult)) {\n throw new Error('You returned a server side type of react-router error: ' + (0, _stringify2.default)(reactElementOrRouterResult) + '\\nYou should return a React.Component always for the client side entry point.');\n } else {\n _reactDom2.default.render(reactElementOrRouterResult, domNode);\n }\n }\n } catch (e) {\n e.message = 'ReactOnRails encountered an error while rendering component: ' + name + '.\\n' + ('Original message: ' + e.message);\n throw e;\n }\n}\n\nfunction parseRailsContext() {\n var el = document.getElementById('js-react-on-rails-context');\n if (el) {\n return JSON.parse(el.textContent);\n }\n\n return null;\n}\n\nfunction reactOnRailsPageLoaded() {\n debugTurbolinks('reactOnRailsPageLoaded');\n\n var railsContext = parseRailsContext();\n forEachStore(railsContext);\n forEachComponent(render, railsContext);\n}\n\nfunction unmount(el) {\n var domNodeId = domNodeIdForEl(el);\n var domNode = document.getElementById(domNodeId);\n try {\n _reactDom2.default.unmountComponentAtNode(domNode);\n } catch (e) {\n console.info('Caught error calling unmountComponentAtNode: ' + e.message + ' for domNode', domNode, e);\n }\n}\n\nfunction reactOnRailsPageUnloaded() {\n debugTurbolinks('reactOnRailsPageUnloaded');\n forEachComponent(unmount);\n}\n\nfunction clientStartup(context) {\n var document = context.document;\n\n // Check if server rendering\n if (!document) {\n return;\n }\n\n // Tried with a file local variable, but the install handler gets called twice.\n // eslint-disable-next-line no-underscore-dangle\n if (context.__REACT_ON_RAILS_EVENT_HANDLERS_RAN_ONCE__) {\n return;\n }\n\n // eslint-disable-next-line no-underscore-dangle, no-param-reassign\n context.__REACT_ON_RAILS_EVENT_HANDLERS_RAN_ONCE__ = true;\n\n debugTurbolinks('Adding DOMContentLoaded event to install event listeners.');\n\n document.addEventListener('DOMContentLoaded', function () {\n // Install listeners when running on the client (browser).\n // We must do this check for turbolinks AFTER the document is loaded because we load the\n // Webpack bundles first.\n\n if (turbolinksInstalled() && turbolinksSupported()) {\n if (turbolinksVersion5()) {\n debugTurbolinks('USING TURBOLINKS 5: document added event listeners ' + 'turbolinks:before-render and turbolinks:render.');\n document.addEventListener('turbolinks:before-render', reactOnRailsPageUnloaded);\n document.addEventListener('turbolinks:render', reactOnRailsPageLoaded);\n reactOnRailsPageLoaded();\n } else {\n debugTurbolinks('USING TURBOLINKS 2: document added event listeners page:before-unload and ' + 'page:change.');\n document.addEventListener('page:before-unload', reactOnRailsPageUnloaded);\n document.addEventListener('page:change', reactOnRailsPageLoaded);\n }\n } else {\n debugTurbolinks('NOT USING TURBOLINKS: DOMContentLoaded event, calling reactOnRailsPageLoaded');\n reactOnRailsPageLoaded();\n }\n });\n}\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(/*! ./../../../webpack/buildin/global.js */ 104)))\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-on-rails/node_package/lib/clientStartup.js\n// module id = 1427\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-on-rails/node_package/lib/clientStartup.js?", + ); + + /***/ + }, + /* 1428 */ + /* unknown exports provided */ + /* all exports used */ + /*!******************************************************!*\ + !*** ./~/react-on-rails/node_package/lib/context.js ***! + \******************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/* WEBPACK VAR INJECTION */(function(global) {\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = context;\n\n\n/**\n * Get the context, be it window or global\n * @returns {boolean|Window|*|context}\n */\nfunction context() {\n return typeof window !== 'undefined' && window || typeof global !== 'undefined' && global || this;\n}\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(/*! ./../../../webpack/buildin/global.js */ 104)))\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-on-rails/node_package/lib/context.js\n// module id = 1428\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-on-rails/node_package/lib/context.js?", + ); + + /***/ + }, + /* 1429 */ + /* unknown exports provided */ + /* all exports used */ + /*!****************************************************************!*\ + !*** ./~/react-on-rails/node_package/lib/generatorFunction.js ***! + \****************************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = generatorFunction;\n\n\n// See discussion:\n// https://discuss.reactjs.org/t/how-to-determine-if-js-object-is-react-component/2825/2\n\n/**\n * Used to determine we\'ll call be calling React.createElement on the component of if this is a\n * generator function used return a function that takes props to return a React element\n * @param component\n * @returns {boolean}\n */\nfunction generatorFunction(component) {\n if (!component.prototype) {\n return false;\n }\n\n // es5 or es6 React Component\n return !component.prototype.isReactComponent;\n}\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-on-rails/node_package/lib/generatorFunction.js\n// module id = 1429\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-on-rails/node_package/lib/generatorFunction.js?', + ); + + /***/ + }, + /* 1430 */ + /* unknown exports provided */ + /* all exports used */ + /*!*****************************************************************!*\ + !*** ./~/react-on-rails/node_package/lib/scriptSanitizedVal.js ***! + \*****************************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\n\nexports.default = function (val) {\n // Replace closing\n var re = /<\\/\\W*script/gi;\n return val.replace(re, \'(/script\');\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-on-rails/node_package/lib/scriptSanitizedVal.js\n// module id = 1430\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-on-rails/node_package/lib/scriptSanitizedVal.js?', + ); + + /***/ + }, + /* 1431 */ + /* unknown exports provided */ + /* all exports used */ + /*!*************************************************************************!*\ + !*** ./~/react-on-rails/node_package/lib/serverRenderReactComponent.js ***! + \*************************************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _stringify = __webpack_require__(/*! babel-runtime/core-js/json/stringify */ 146);\n\nvar _stringify2 = _interopRequireDefault(_stringify);\n\nexports.default = serverRenderReactComponent;\n\nvar _server = __webpack_require__(/*! react-dom/server */ 557);\n\nvar _server2 = _interopRequireDefault(_server);\n\nvar _ComponentRegistry = __webpack_require__(/*! ./ComponentRegistry */ 561);\n\nvar _ComponentRegistry2 = _interopRequireDefault(_ComponentRegistry);\n\nvar _createReactElement = __webpack_require__(/*! ./createReactElement */ 262);\n\nvar _createReactElement2 = _interopRequireDefault(_createReactElement);\n\nvar _isCreateReactElementResultNonReactComponent = __webpack_require__(/*! ./isCreateReactElementResultNonReactComponent */ 564);\n\nvar _isCreateReactElementResultNonReactComponent2 = _interopRequireDefault(_isCreateReactElementResultNonReactComponent);\n\nvar _buildConsoleReplay = __webpack_require__(/*! ./buildConsoleReplay */ 562);\n\nvar _buildConsoleReplay2 = _interopRequireDefault(_buildConsoleReplay);\n\nvar _handleError = __webpack_require__(/*! ./handleError */ 563);\n\nvar _handleError2 = _interopRequireDefault(_handleError);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction serverRenderReactComponent(options) {\n var name = options.name,\n domNodeId = options.domNodeId,\n trace = options.trace,\n props = options.props,\n railsContext = options.railsContext;\n\n\n var htmlResult = '';\n var hasErrors = false;\n\n try {\n var componentObj = _ComponentRegistry2.default.get(name);\n if (componentObj.isRenderer) {\n throw new Error('Detected a renderer while server rendering component \\'' + name + '\\'. See https://github.com/shakacode/react_on_rails#renderer-functions');\n }\n\n var reactElementOrRouterResult = (0, _createReactElement2.default)({\n componentObj: componentObj,\n domNodeId: domNodeId,\n trace: trace,\n props: props,\n railsContext: railsContext\n });\n\n if ((0, _isCreateReactElementResultNonReactComponent2.default)(reactElementOrRouterResult)) {\n // We let the client side handle any redirect\n // Set hasErrors in case we want to throw a Rails exception\n hasErrors = !!reactElementOrRouterResult.routeError;\n\n if (hasErrors) {\n console.error('React Router ERROR: ' + (0, _stringify2.default)(reactElementOrRouterResult.routeError));\n }\n\n if (reactElementOrRouterResult.redirectLocation) {\n if (trace) {\n var redirectLocation = reactElementOrRouterResult.redirectLocation;\n var redirectPath = redirectLocation.pathname + redirectLocation.search;\n console.log('ROUTER REDIRECT: ' + name + ' to dom node with id: ' + domNodeId + ', redirect to ' + redirectPath);\n }\n // For redirects on server rendering, we can't stop Rails from returning the same result.\n // Possibly, someday, we could have the rails server redirect.\n } else {\n htmlResult = reactElementOrRouterResult.renderedHtml;\n }\n } else {\n htmlResult = _server2.default.renderToString(reactElementOrRouterResult);\n }\n } catch (e) {\n hasErrors = true;\n htmlResult = (0, _handleError2.default)({\n e: e,\n name: name,\n serverSide: true\n });\n }\n\n var consoleReplayScript = (0, _buildConsoleReplay2.default)();\n\n return (0, _stringify2.default)({\n html: htmlResult,\n consoleReplayScript: consoleReplayScript,\n hasErrors: hasErrors\n });\n}\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-on-rails/node_package/lib/serverRenderReactComponent.js\n// module id = 1431\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-on-rails/node_package/lib/serverRenderReactComponent.js?", + ); + + /***/ + }, + /* 1432 */ + /* unknown exports provided */ + /* exports used: default */ + /*!***************************************!*\ + !*** ./~/react-overlays/lib/Modal.js ***! + \***************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; /*eslint-disable react/prop-types */\n\n\nvar _react = __webpack_require__(/*! react */ 1);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _warning = __webpack_require__(/*! warning */ 23);\n\nvar _warning2 = _interopRequireDefault(_warning);\n\nvar _componentOrElement = __webpack_require__(/*! react-prop-types/lib/componentOrElement */ 264);\n\nvar _componentOrElement2 = _interopRequireDefault(_componentOrElement);\n\nvar _elementType = __webpack_require__(/*! react-prop-types/lib/elementType */ 18);\n\nvar _elementType2 = _interopRequireDefault(_elementType);\n\nvar _Portal = __webpack_require__(/*! ./Portal */ 565);\n\nvar _Portal2 = _interopRequireDefault(_Portal);\n\nvar _ModalManager = __webpack_require__(/*! ./ModalManager */ 1433);\n\nvar _ModalManager2 = _interopRequireDefault(_ModalManager);\n\nvar _ownerDocument = __webpack_require__(/*! ./utils/ownerDocument */ 127);\n\nvar _ownerDocument2 = _interopRequireDefault(_ownerDocument);\n\nvar _addEventListener = __webpack_require__(/*! ./utils/addEventListener */ 568);\n\nvar _addEventListener2 = _interopRequireDefault(_addEventListener);\n\nvar _addFocusListener = __webpack_require__(/*! ./utils/addFocusListener */ 1436);\n\nvar _addFocusListener2 = _interopRequireDefault(_addFocusListener);\n\nvar _inDOM = __webpack_require__(/*! dom-helpers/util/inDOM */ 65);\n\nvar _inDOM2 = _interopRequireDefault(_inDOM);\n\nvar _activeElement = __webpack_require__(/*! dom-helpers/activeElement */ 339);\n\nvar _activeElement2 = _interopRequireDefault(_activeElement);\n\nvar _contains = __webpack_require__(/*! dom-helpers/query/contains */ 95);\n\nvar _contains2 = _interopRequireDefault(_contains);\n\nvar _getContainer = __webpack_require__(/*! ./utils/getContainer */ 263);\n\nvar _getContainer2 = _interopRequireDefault(_getContainer);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar modalManager = new _ModalManager2.default();\n\n/**\n * Love them or hate them, `<Modal/>` provides a solid foundation for creating dialogs, lightboxes, or whatever else.\n * The Modal component renders its `children` node in front of a backdrop component.\n *\n * The Modal offers a few helpful features over using just a `<Portal/>` component and some styles:\n *\n * - Manages dialog stacking when one-at-a-time just isn't enough.\n * - Creates a backdrop, for disabling interaction below the modal.\n * - It properly manages focus; moving to the modal content, and keeping it there until the modal is closed.\n * - It disables scrolling of the page content while open.\n * - Adds the appropriate ARIA roles are automatically.\n * - Easily pluggable animations via a `<Transition/>` component.\n *\n * Note that, in the same way the backdrop element prevents users from clicking or interacting\n * with the page content underneath the Modal, Screen readers also need to be signaled to not to\n * interact with page content while the Modal is open. To do this, we use a common technique of applying\n * the `aria-hidden='true'` attribute to the non-Modal elements in the Modal `container`. This means that for\n * a Modal to be truly modal, it should have a `container` that is _outside_ your app's\n * React hierarchy (such as the default: document.body).\n */\nvar Modal = _react2.default.createClass({\n displayName: 'Modal',\n\n\n propTypes: _extends({}, _Portal2.default.propTypes, {\n\n /**\n * Set the visibility of the Modal\n */\n show: _react2.default.PropTypes.bool,\n\n /**\n * A Node, Component instance, or function that returns either. The Modal is appended to it's container element.\n *\n * For the sake of assistive technologies, the container should usually be the document body, so that the rest of the\n * page content can be placed behind a virtual backdrop as well as a visual one.\n */\n container: _react2.default.PropTypes.oneOfType([_componentOrElement2.default, _react2.default.PropTypes.func]),\n\n /**\n * A callback fired when the Modal is opening.\n */\n onShow: _react2.default.PropTypes.func,\n\n /**\n * A callback fired when either the backdrop is clicked, or the escape key is pressed.\n *\n * The `onHide` callback only signals intent from the Modal,\n * you must actually set the `show` prop to `false` for the Modal to close.\n */\n onHide: _react2.default.PropTypes.func,\n\n /**\n * Include a backdrop component.\n */\n backdrop: _react2.default.PropTypes.oneOfType([_react2.default.PropTypes.bool, _react2.default.PropTypes.oneOf(['static'])]),\n\n /**\n * A function that returns a backdrop component. Useful for custom\n * backdrop rendering.\n *\n * ```js\n * renderBackdrop={props => <MyBackdrop {...props} />}\n * ```\n */\n renderBackdrop: _react2.default.PropTypes.func,\n\n /**\n * A callback fired when the escape key, if specified in `keyboard`, is pressed.\n */\n onEscapeKeyUp: _react2.default.PropTypes.func,\n\n /**\n * A callback fired when the backdrop, if specified, is clicked.\n */\n onBackdropClick: _react2.default.PropTypes.func,\n\n /**\n * A style object for the backdrop component.\n */\n backdropStyle: _react2.default.PropTypes.object,\n\n /**\n * A css class or classes for the backdrop component.\n */\n backdropClassName: _react2.default.PropTypes.string,\n\n /**\n * A css class or set of classes applied to the modal container when the modal is open,\n * and removed when it is closed.\n */\n containerClassName: _react2.default.PropTypes.string,\n\n /**\n * Close the modal when escape key is pressed\n */\n keyboard: _react2.default.PropTypes.bool,\n\n /**\n * A `<Transition/>` component to use for the dialog and backdrop components.\n */\n transition: _elementType2.default,\n\n /**\n * The `timeout` of the dialog transition if specified. This number is used to ensure that\n * transition callbacks are always fired, even if browser transition events are canceled.\n *\n * See the Transition `timeout` prop for more infomation.\n */\n dialogTransitionTimeout: _react2.default.PropTypes.number,\n\n /**\n * The `timeout` of the backdrop transition if specified. This number is used to\n * ensure that transition callbacks are always fired, even if browser transition events are canceled.\n *\n * See the Transition `timeout` prop for more infomation.\n */\n backdropTransitionTimeout: _react2.default.PropTypes.number,\n\n /**\n * When `true` The modal will automatically shift focus to itself when it opens, and\n * replace it to the last focused element when it closes. This also\n * works correctly with any Modal children that have the `autoFocus` prop.\n *\n * Generally this should never be set to `false` as it makes the Modal less\n * accessible to assistive technologies, like screen readers.\n */\n autoFocus: _react2.default.PropTypes.bool,\n\n /**\n * When `true` The modal will prevent focus from leaving the Modal while open.\n *\n * Generally this should never be set to `false` as it makes the Modal less\n * accessible to assistive technologies, like screen readers.\n */\n enforceFocus: _react2.default.PropTypes.bool,\n\n /**\n * When `true` The modal will restore focus to previously focused element once\n * modal is hidden\n */\n restoreFocus: _react2.default.PropTypes.bool,\n\n /**\n * Callback fired before the Modal transitions in\n */\n onEnter: _react2.default.PropTypes.func,\n\n /**\n * Callback fired as the Modal begins to transition in\n */\n onEntering: _react2.default.PropTypes.func,\n\n /**\n * Callback fired after the Modal finishes transitioning in\n */\n onEntered: _react2.default.PropTypes.func,\n\n /**\n * Callback fired right before the Modal transitions out\n */\n onExit: _react2.default.PropTypes.func,\n\n /**\n * Callback fired as the Modal begins to transition out\n */\n onExiting: _react2.default.PropTypes.func,\n\n /**\n * Callback fired after the Modal finishes transitioning out\n */\n onExited: _react2.default.PropTypes.func,\n\n /**\n * A ModalManager instance used to track and manage the state of open\n * Modals. Useful when customizing how modals interact within a container\n */\n manager: _react2.default.PropTypes.object.isRequired\n }),\n\n getDefaultProps: function getDefaultProps() {\n var noop = function noop() {};\n\n return {\n show: false,\n backdrop: true,\n keyboard: true,\n autoFocus: true,\n enforceFocus: true,\n restoreFocus: true,\n onHide: noop,\n manager: modalManager,\n renderBackdrop: function renderBackdrop(props) {\n return _react2.default.createElement('div', props);\n }\n };\n },\n omitProps: function omitProps(props, propTypes) {\n\n var keys = Object.keys(props);\n var newProps = {};\n keys.map(function (prop) {\n if (!Object.prototype.hasOwnProperty.call(propTypes, prop)) {\n newProps[prop] = props[prop];\n }\n });\n\n return newProps;\n },\n getInitialState: function getInitialState() {\n return { exited: !this.props.show };\n },\n render: function render() {\n var _props = this.props,\n show = _props.show,\n container = _props.container,\n children = _props.children,\n Transition = _props.transition,\n backdrop = _props.backdrop,\n dialogTransitionTimeout = _props.dialogTransitionTimeout,\n className = _props.className,\n style = _props.style,\n onExit = _props.onExit,\n onExiting = _props.onExiting,\n onEnter = _props.onEnter,\n onEntering = _props.onEntering,\n onEntered = _props.onEntered;\n\n\n var dialog = _react2.default.Children.only(children);\n var filteredProps = this.omitProps(this.props, Modal.propTypes);\n\n var mountModal = show || Transition && !this.state.exited;\n if (!mountModal) {\n return null;\n }\n\n var _dialog$props = dialog.props,\n role = _dialog$props.role,\n tabIndex = _dialog$props.tabIndex;\n\n\n if (role === undefined || tabIndex === undefined) {\n dialog = (0, _react.cloneElement)(dialog, {\n role: role === undefined ? 'document' : role,\n tabIndex: tabIndex == null ? '-1' : tabIndex\n });\n }\n\n if (Transition) {\n dialog = _react2.default.createElement(\n Transition,\n {\n transitionAppear: true,\n unmountOnExit: true,\n 'in': show,\n timeout: dialogTransitionTimeout,\n onExit: onExit,\n onExiting: onExiting,\n onExited: this.handleHidden,\n onEnter: onEnter,\n onEntering: onEntering,\n onEntered: onEntered\n },\n dialog\n );\n }\n\n return _react2.default.createElement(\n _Portal2.default,\n {\n ref: this.setMountNode,\n container: container\n },\n _react2.default.createElement(\n 'div',\n _extends({\n ref: 'modal',\n role: role || 'dialog'\n }, filteredProps, {\n style: style,\n className: className\n }),\n backdrop && this.renderBackdrop(),\n dialog\n )\n );\n },\n renderBackdrop: function renderBackdrop() {\n var _this = this;\n\n var _props2 = this.props,\n backdropStyle = _props2.backdropStyle,\n backdropClassName = _props2.backdropClassName,\n renderBackdrop = _props2.renderBackdrop,\n Transition = _props2.transition,\n backdropTransitionTimeout = _props2.backdropTransitionTimeout;\n\n\n var backdropRef = function backdropRef(ref) {\n return _this.backdrop = ref;\n };\n\n var backdrop = _react2.default.createElement('div', {\n ref: backdropRef,\n style: this.props.backdropStyle,\n className: this.props.backdropClassName,\n onClick: this.handleBackdropClick\n });\n\n if (Transition) {\n backdrop = _react2.default.createElement(\n Transition,\n { transitionAppear: true,\n 'in': this.props.show,\n timeout: backdropTransitionTimeout\n },\n renderBackdrop({\n ref: backdropRef,\n style: backdropStyle,\n className: backdropClassName,\n onClick: this.handleBackdropClick\n })\n );\n }\n\n return backdrop;\n },\n componentWillReceiveProps: function componentWillReceiveProps(nextProps) {\n if (nextProps.show) {\n this.setState({ exited: false });\n } else if (!nextProps.transition) {\n // Otherwise let handleHidden take care of marking exited.\n this.setState({ exited: true });\n }\n },\n componentWillUpdate: function componentWillUpdate(nextProps) {\n if (!this.props.show && nextProps.show) {\n this.checkForFocus();\n }\n },\n componentDidMount: function componentDidMount() {\n if (this.props.show) {\n this.onShow();\n }\n },\n componentDidUpdate: function componentDidUpdate(prevProps) {\n var transition = this.props.transition;\n\n\n if (prevProps.show && !this.props.show && !transition) {\n // Otherwise handleHidden will call this.\n this.onHide();\n } else if (!prevProps.show && this.props.show) {\n this.onShow();\n }\n },\n componentWillUnmount: function componentWillUnmount() {\n var _props3 = this.props,\n show = _props3.show,\n transition = _props3.transition;\n\n\n if (show || transition && !this.state.exited) {\n this.onHide();\n }\n },\n onShow: function onShow() {\n var doc = (0, _ownerDocument2.default)(this);\n var container = (0, _getContainer2.default)(this.props.container, doc.body);\n\n this.props.manager.add(this, container, this.props.containerClassName);\n\n this._onDocumentKeyupListener = (0, _addEventListener2.default)(doc, 'keyup', this.handleDocumentKeyUp);\n\n this._onFocusinListener = (0, _addFocusListener2.default)(this.enforceFocus);\n\n this.focus();\n\n if (this.props.onShow) {\n this.props.onShow();\n }\n },\n onHide: function onHide() {\n this.props.manager.remove(this);\n\n this._onDocumentKeyupListener.remove();\n\n this._onFocusinListener.remove();\n\n if (this.props.restoreFocus) {\n this.restoreLastFocus();\n }\n },\n setMountNode: function setMountNode(ref) {\n this.mountNode = ref ? ref.getMountNode() : ref;\n },\n handleHidden: function handleHidden() {\n this.setState({ exited: true });\n this.onHide();\n\n if (this.props.onExited) {\n var _props4;\n\n (_props4 = this.props).onExited.apply(_props4, arguments);\n }\n },\n handleBackdropClick: function handleBackdropClick(e) {\n if (e.target !== e.currentTarget) {\n return;\n }\n\n if (this.props.onBackdropClick) {\n this.props.onBackdropClick(e);\n }\n\n if (this.props.backdrop === true) {\n this.props.onHide();\n }\n },\n handleDocumentKeyUp: function handleDocumentKeyUp(e) {\n if (this.props.keyboard && e.keyCode === 27 && this.isTopModal()) {\n if (this.props.onEscapeKeyUp) {\n this.props.onEscapeKeyUp(e);\n }\n this.props.onHide();\n }\n },\n checkForFocus: function checkForFocus() {\n if (_inDOM2.default) {\n this.lastFocus = (0, _activeElement2.default)();\n }\n },\n focus: function focus() {\n var autoFocus = this.props.autoFocus;\n var modalContent = this.getDialogElement();\n var current = (0, _activeElement2.default)((0, _ownerDocument2.default)(this));\n var focusInModal = current && (0, _contains2.default)(modalContent, current);\n\n if (modalContent && autoFocus && !focusInModal) {\n this.lastFocus = current;\n\n if (!modalContent.hasAttribute('tabIndex')) {\n modalContent.setAttribute('tabIndex', -1);\n (0, _warning2.default)(false, 'The modal content node does not accept focus. ' + 'For the benefit of assistive technologies, the tabIndex of the node is being set to \"-1\".');\n }\n\n modalContent.focus();\n }\n },\n restoreLastFocus: function restoreLastFocus() {\n // Support: <=IE11 doesn't support `focus()` on svg elements (RB: #917)\n if (this.lastFocus && this.lastFocus.focus) {\n this.lastFocus.focus();\n this.lastFocus = null;\n }\n },\n enforceFocus: function enforceFocus() {\n var enforceFocus = this.props.enforceFocus;\n\n\n if (!enforceFocus || !this.isMounted() || !this.isTopModal()) {\n return;\n }\n\n var active = (0, _activeElement2.default)((0, _ownerDocument2.default)(this));\n var modal = this.getDialogElement();\n\n if (modal && modal !== active && !(0, _contains2.default)(modal, active)) {\n modal.focus();\n }\n },\n\n\n //instead of a ref, which might conflict with one the parent applied.\n getDialogElement: function getDialogElement() {\n var node = this.refs.modal;\n return node && node.lastChild;\n },\n isTopModal: function isTopModal() {\n return this.props.manager.isTopModal(this);\n }\n});\n\nModal.Manager = _ModalManager2.default;\n\nexports.default = Modal;\nmodule.exports = exports['default'];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-overlays/lib/Modal.js\n// module id = 1432\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-overlays/lib/Modal.js?", + ); + + /***/ + }, + /* 1433 */ + /* unknown exports provided */ + /* all exports used */ + /*!**********************************************!*\ + !*** ./~/react-overlays/lib/ModalManager.js ***! + \**********************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _style = __webpack_require__(/*! dom-helpers/style */ 158);\n\nvar _style2 = _interopRequireDefault(_style);\n\nvar _class = __webpack_require__(/*! dom-helpers/class */ 1110);\n\nvar _class2 = _interopRequireDefault(_class);\n\nvar _scrollbarSize = __webpack_require__(/*! dom-helpers/util/scrollbarSize */ 345);\n\nvar _scrollbarSize2 = _interopRequireDefault(_scrollbarSize);\n\nvar _isOverflowing = __webpack_require__(/*! ./utils/isOverflowing */ 569);\n\nvar _isOverflowing2 = _interopRequireDefault(_isOverflowing);\n\nvar _manageAriaHidden = __webpack_require__(/*! ./utils/manageAriaHidden */ 1438);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction findIndexOf(arr, cb) {\n var idx = -1;\n arr.some(function (d, i) {\n if (cb(d, i)) {\n idx = i;\n return true;\n }\n });\n return idx;\n}\n\nfunction findContainer(data, modal) {\n return findIndexOf(data, function (d) {\n return d.modals.indexOf(modal) !== -1;\n });\n}\n\nfunction setContainerStyle(state, container) {\n var style = { overflow: 'hidden' };\n\n // we are only interested in the actual `style` here\n // becasue we will override it\n state.style = {\n overflow: container.style.overflow,\n paddingRight: container.style.paddingRight\n };\n\n if (state.overflowing) {\n // use computed style, here to get the real padding\n // to add our scrollbar width\n style.paddingRight = parseInt((0, _style2.default)(container, 'paddingRight') || 0, 10) + (0, _scrollbarSize2.default)() + 'px';\n }\n\n (0, _style2.default)(container, style);\n}\n\nfunction removeContainerStyle(_ref, container) {\n var style = _ref.style;\n\n\n Object.keys(style).forEach(function (key) {\n return container.style[key] = style[key];\n });\n}\n/**\n * Proper state managment for containers and the modals in those containers.\n *\n * @internal Used by the Modal to ensure proper styling of containers.\n */\n\nvar ModalManager = function () {\n function ModalManager() {\n var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref2$hideSiblingNode = _ref2.hideSiblingNodes,\n hideSiblingNodes = _ref2$hideSiblingNode === undefined ? true : _ref2$hideSiblingNode,\n _ref2$handleContainer = _ref2.handleContainerOverflow,\n handleContainerOverflow = _ref2$handleContainer === undefined ? true : _ref2$handleContainer;\n\n _classCallCheck(this, ModalManager);\n\n this.hideSiblingNodes = hideSiblingNodes;\n this.handleContainerOverflow = handleContainerOverflow;\n this.modals = [];\n this.containers = [];\n this.data = [];\n }\n\n _createClass(ModalManager, [{\n key: 'add',\n value: function add(modal, container, className) {\n var modalIdx = this.modals.indexOf(modal);\n var containerIdx = this.containers.indexOf(container);\n\n if (modalIdx !== -1) {\n return modalIdx;\n }\n\n modalIdx = this.modals.length;\n this.modals.push(modal);\n\n if (this.hideSiblingNodes) {\n (0, _manageAriaHidden.hideSiblings)(container, modal.mountNode);\n }\n\n if (containerIdx !== -1) {\n this.data[containerIdx].modals.push(modal);\n return modalIdx;\n }\n\n var data = {\n modals: [modal],\n //right now only the first modal of a container will have its classes applied\n classes: className ? className.split(/\\s+/) : [],\n\n overflowing: (0, _isOverflowing2.default)(container)\n };\n\n if (this.handleContainerOverflow) {\n setContainerStyle(data, container);\n }\n\n data.classes.forEach(_class2.default.addClass.bind(null, container));\n\n this.containers.push(container);\n this.data.push(data);\n\n return modalIdx;\n }\n }, {\n key: 'remove',\n value: function remove(modal) {\n var modalIdx = this.modals.indexOf(modal);\n\n if (modalIdx === -1) {\n return;\n }\n\n var containerIdx = findContainer(this.data, modal);\n var data = this.data[containerIdx];\n var container = this.containers[containerIdx];\n\n data.modals.splice(data.modals.indexOf(modal), 1);\n\n this.modals.splice(modalIdx, 1);\n\n // if that was the last modal in a container,\n // clean up the container\n if (data.modals.length === 0) {\n data.classes.forEach(_class2.default.removeClass.bind(null, container));\n\n if (this.handleContainerOverflow) {\n removeContainerStyle(data, container);\n }\n\n if (this.hideSiblingNodes) {\n (0, _manageAriaHidden.showSiblings)(container, modal.mountNode);\n }\n this.containers.splice(containerIdx, 1);\n this.data.splice(containerIdx, 1);\n } else if (this.hideSiblingNodes) {\n //otherwise make sure the next top modal is visible to a SR\n (0, _manageAriaHidden.ariaHidden)(false, data.modals[data.modals.length - 1].mountNode);\n }\n }\n }, {\n key: 'isTopModal',\n value: function isTopModal(modal) {\n return !!this.modals.length && this.modals[this.modals.length - 1] === modal;\n }\n }]);\n\n return ModalManager;\n}();\n\nexports.default = ModalManager;\nmodule.exports = exports['default'];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-overlays/lib/ModalManager.js\n// module id = 1433\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-overlays/lib/ModalManager.js?", + ); + + /***/ + }, + /* 1434 */ + /* unknown exports provided */ + /* exports used: default */ + /*!*****************************************!*\ + !*** ./~/react-overlays/lib/Overlay.js ***! + \*****************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(/*! react */ 1);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _Portal = __webpack_require__(/*! ./Portal */ 565);\n\nvar _Portal2 = _interopRequireDefault(_Portal);\n\nvar _Position = __webpack_require__(/*! ./Position */ 1435);\n\nvar _Position2 = _interopRequireDefault(_Position);\n\nvar _RootCloseWrapper = __webpack_require__(/*! ./RootCloseWrapper */ 566);\n\nvar _RootCloseWrapper2 = _interopRequireDefault(_RootCloseWrapper);\n\nvar _elementType = __webpack_require__(/*! react-prop-types/lib/elementType */ 18);\n\nvar _elementType2 = _interopRequireDefault(_elementType);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n/**\n * Built on top of `<Position/>` and `<Portal/>`, the overlay component is great for custom tooltip overlays.\n */\nvar Overlay = function (_React$Component) {\n _inherits(Overlay, _React$Component);\n\n function Overlay(props, context) {\n _classCallCheck(this, Overlay);\n\n var _this = _possibleConstructorReturn(this, (Overlay.__proto__ || Object.getPrototypeOf(Overlay)).call(this, props, context));\n\n _this.state = { exited: !props.show };\n _this.onHiddenListener = _this.handleHidden.bind(_this);\n return _this;\n }\n\n _createClass(Overlay, [{\n key: 'componentWillReceiveProps',\n value: function componentWillReceiveProps(nextProps) {\n if (nextProps.show) {\n this.setState({ exited: false });\n } else if (!nextProps.transition) {\n // Otherwise let handleHidden take care of marking exited.\n this.setState({ exited: true });\n }\n }\n }, {\n key: 'render',\n value: function render() {\n var _props = this.props,\n container = _props.container,\n containerPadding = _props.containerPadding,\n target = _props.target,\n placement = _props.placement,\n shouldUpdatePosition = _props.shouldUpdatePosition,\n rootClose = _props.rootClose,\n children = _props.children,\n Transition = _props.transition,\n props = _objectWithoutProperties(_props, ['container', 'containerPadding', 'target', 'placement', 'shouldUpdatePosition', 'rootClose', 'children', 'transition']);\n\n // Don't un-render the overlay while it's transitioning out.\n\n\n var mountOverlay = props.show || Transition && !this.state.exited;\n if (!mountOverlay) {\n // Don't bother showing anything if we don't have to.\n return null;\n }\n\n var child = children;\n\n // Position is be inner-most because it adds inline styles into the child,\n // which the other wrappers don't forward correctly.\n child = _react2.default.createElement(\n _Position2.default,\n { container: container, containerPadding: containerPadding, target: target, placement: placement, shouldUpdatePosition: shouldUpdatePosition },\n child\n );\n\n if (Transition) {\n var onExit = props.onExit,\n onExiting = props.onExiting,\n onEnter = props.onEnter,\n onEntering = props.onEntering,\n onEntered = props.onEntered;\n\n // This animates the child node by injecting props, so it must precede\n // anything that adds a wrapping div.\n\n child = _react2.default.createElement(\n Transition,\n {\n 'in': props.show,\n transitionAppear: true,\n onExit: onExit,\n onExiting: onExiting,\n onExited: this.onHiddenListener,\n onEnter: onEnter,\n onEntering: onEntering,\n onEntered: onEntered\n },\n child\n );\n }\n\n // This goes after everything else because it adds a wrapping div.\n if (rootClose) {\n child = _react2.default.createElement(\n _RootCloseWrapper2.default,\n { onRootClose: props.onHide },\n child\n );\n }\n\n return _react2.default.createElement(\n _Portal2.default,\n { container: container },\n child\n );\n }\n }, {\n key: 'handleHidden',\n value: function handleHidden() {\n this.setState({ exited: true });\n\n if (this.props.onExited) {\n var _props2;\n\n (_props2 = this.props).onExited.apply(_props2, arguments);\n }\n }\n }]);\n\n return Overlay;\n}(_react2.default.Component);\n\nOverlay.propTypes = _extends({}, _Portal2.default.propTypes, _Position2.default.propTypes, {\n\n /**\n * Set the visibility of the Overlay\n */\n show: _react2.default.PropTypes.bool,\n\n /**\n * Specify whether the overlay should trigger `onHide` when the user clicks outside the overlay\n */\n rootClose: _react2.default.PropTypes.bool,\n\n /**\n * A Callback fired by the Overlay when it wishes to be hidden.\n *\n * __required__ when `rootClose` is `true`.\n *\n * @type func\n */\n onHide: function onHide(props) {\n var propType = _react2.default.PropTypes.func;\n if (props.rootClose) {\n propType = propType.isRequired;\n }\n\n for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n return propType.apply(undefined, [props].concat(args));\n },\n\n\n /**\n * A `<Transition/>` component used to animate the overlay changes visibility.\n */\n transition: _elementType2.default,\n\n /**\n * Callback fired before the Overlay transitions in\n */\n onEnter: _react2.default.PropTypes.func,\n\n /**\n * Callback fired as the Overlay begins to transition in\n */\n onEntering: _react2.default.PropTypes.func,\n\n /**\n * Callback fired after the Overlay finishes transitioning in\n */\n onEntered: _react2.default.PropTypes.func,\n\n /**\n * Callback fired right before the Overlay transitions out\n */\n onExit: _react2.default.PropTypes.func,\n\n /**\n * Callback fired as the Overlay begins to transition out\n */\n onExiting: _react2.default.PropTypes.func,\n\n /**\n * Callback fired after the Overlay finishes transitioning out\n */\n onExited: _react2.default.PropTypes.func\n});\n\nexports.default = Overlay;\nmodule.exports = exports['default'];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-overlays/lib/Overlay.js\n// module id = 1434\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-overlays/lib/Overlay.js?", + ); + + /***/ + }, + /* 1435 */ + /* unknown exports provided */ + /* all exports used */ + /*!******************************************!*\ + !*** ./~/react-overlays/lib/Position.js ***! + \******************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _classnames = __webpack_require__(/*! classnames */ 2);\n\nvar _classnames2 = _interopRequireDefault(_classnames);\n\nvar _react = __webpack_require__(/*! react */ 1);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactDom = __webpack_require__(/*! react-dom */ 16);\n\nvar _reactDom2 = _interopRequireDefault(_reactDom);\n\nvar _componentOrElement = __webpack_require__(/*! react-prop-types/lib/componentOrElement */ 264);\n\nvar _componentOrElement2 = _interopRequireDefault(_componentOrElement);\n\nvar _calculatePosition = __webpack_require__(/*! ./utils/calculatePosition */ 1437);\n\nvar _calculatePosition2 = _interopRequireDefault(_calculatePosition);\n\nvar _getContainer = __webpack_require__(/*! ./utils/getContainer */ 263);\n\nvar _getContainer2 = _interopRequireDefault(_getContainer);\n\nvar _ownerDocument = __webpack_require__(/*! ./utils/ownerDocument */ 127);\n\nvar _ownerDocument2 = _interopRequireDefault(_ownerDocument);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n/**\n * The Position component calculates the coordinates for its child, to position\n * it relative to a `target` component or node. Useful for creating callouts\n * and tooltips, the Position component injects a `style` props with `left` and\n * `top` values for positioning your component.\n *\n * It also injects \"arrow\" `left`, and `top` values for styling callout arrows\n * for giving your components a sense of directionality.\n */\nvar Position = function (_React$Component) {\n _inherits(Position, _React$Component);\n\n function Position(props, context) {\n _classCallCheck(this, Position);\n\n var _this = _possibleConstructorReturn(this, (Position.__proto__ || Object.getPrototypeOf(Position)).call(this, props, context));\n\n _this.state = {\n positionLeft: 0,\n positionTop: 0,\n arrowOffsetLeft: null,\n arrowOffsetTop: null\n };\n\n _this._needsFlush = false;\n _this._lastTarget = null;\n return _this;\n }\n\n _createClass(Position, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n this.updatePosition(this.getTarget());\n }\n }, {\n key: 'componentWillReceiveProps',\n value: function componentWillReceiveProps() {\n this._needsFlush = true;\n }\n }, {\n key: 'componentDidUpdate',\n value: function componentDidUpdate(prevProps) {\n if (this._needsFlush) {\n this._needsFlush = false;\n this.maybeUpdatePosition(this.props.placement !== prevProps.placement);\n }\n }\n }, {\n key: 'render',\n value: function render() {\n var _props = this.props,\n children = _props.children,\n className = _props.className,\n props = _objectWithoutProperties(_props, ['children', 'className']);\n\n var _state = this.state,\n positionLeft = _state.positionLeft,\n positionTop = _state.positionTop,\n arrowPosition = _objectWithoutProperties(_state, ['positionLeft', 'positionTop']);\n\n // These should not be forwarded to the child.\n\n\n delete props.target;\n delete props.container;\n delete props.containerPadding;\n delete props.shouldUpdatePosition;\n\n var child = _react2.default.Children.only(children);\n return (0, _react.cloneElement)(child, _extends({}, props, arrowPosition, {\n // FIXME: Don't forward `positionLeft` and `positionTop` via both props\n // and `props.style`.\n positionLeft: positionLeft,\n positionTop: positionTop,\n className: (0, _classnames2.default)(className, child.props.className),\n style: _extends({}, child.props.style, {\n left: positionLeft,\n top: positionTop\n })\n }));\n }\n }, {\n key: 'getTarget',\n value: function getTarget() {\n var target = this.props.target;\n\n var targetElement = typeof target === 'function' ? target() : target;\n return targetElement && _reactDom2.default.findDOMNode(targetElement) || null;\n }\n }, {\n key: 'maybeUpdatePosition',\n value: function maybeUpdatePosition(placementChanged) {\n var target = this.getTarget();\n\n if (!this.props.shouldUpdatePosition && target === this._lastTarget && !placementChanged) {\n return;\n }\n\n this.updatePosition(target);\n }\n }, {\n key: 'updatePosition',\n value: function updatePosition(target) {\n this._lastTarget = target;\n\n if (!target) {\n this.setState({\n positionLeft: 0,\n positionTop: 0,\n arrowOffsetLeft: null,\n arrowOffsetTop: null\n });\n\n return;\n }\n\n var overlay = _reactDom2.default.findDOMNode(this);\n var container = (0, _getContainer2.default)(this.props.container, (0, _ownerDocument2.default)(this).body);\n\n this.setState((0, _calculatePosition2.default)(this.props.placement, overlay, target, container, this.props.containerPadding));\n }\n }]);\n\n return Position;\n}(_react2.default.Component);\n\nPosition.propTypes = {\n /**\n * A node, element, or function that returns either. The child will be\n * be positioned next to the `target` specified.\n */\n target: _react2.default.PropTypes.oneOfType([_componentOrElement2.default, _react2.default.PropTypes.func]),\n\n /**\n * \"offsetParent\" of the component\n */\n container: _react2.default.PropTypes.oneOfType([_componentOrElement2.default, _react2.default.PropTypes.func]),\n /**\n * Minimum spacing in pixels between container border and component border\n */\n containerPadding: _react2.default.PropTypes.number,\n /**\n * How to position the component relative to the target\n */\n placement: _react2.default.PropTypes.oneOf(['top', 'right', 'bottom', 'left']),\n /**\n * Whether the position should be changed on each update\n */\n shouldUpdatePosition: _react2.default.PropTypes.bool\n};\n\nPosition.displayName = 'Position';\n\nPosition.defaultProps = {\n containerPadding: 0,\n placement: 'right',\n shouldUpdatePosition: false\n};\n\nexports.default = Position;\nmodule.exports = exports['default'];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-overlays/lib/Position.js\n// module id = 1435\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-overlays/lib/Position.js?", + ); + + /***/ + }, + /* 1436 */ + /* unknown exports provided */ + /* all exports used */ + /*!********************************************************!*\ + !*** ./~/react-overlays/lib/utils/addFocusListener.js ***! + \********************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = addFocusListener;\n/**\n * Firefox doesn't have a focusin event so using capture is easiest way to get bubbling\n * IE8 can't do addEventListener, but does have onfocusin, so we use that in ie8\n *\n * We only allow one Listener at a time to avoid stack overflows\n */\nfunction addFocusListener(handler) {\n var useFocusin = !document.addEventListener;\n var remove = void 0;\n\n if (useFocusin) {\n document.attachEvent('onfocusin', handler);\n remove = function remove() {\n return document.detachEvent('onfocusin', handler);\n };\n } else {\n document.addEventListener('focus', handler, true);\n remove = function remove() {\n return document.removeEventListener('focus', handler, true);\n };\n }\n\n return { remove: remove };\n}\nmodule.exports = exports['default'];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-overlays/lib/utils/addFocusListener.js\n// module id = 1436\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-overlays/lib/utils/addFocusListener.js?", + ); + + /***/ + }, + /* 1437 */ + /* unknown exports provided */ + /* all exports used */ + /*!*********************************************************!*\ + !*** ./~/react-overlays/lib/utils/calculatePosition.js ***! + \*********************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = calculatePosition;\n\nvar _offset = __webpack_require__(/*! dom-helpers/query/offset */ 341);\n\nvar _offset2 = _interopRequireDefault(_offset);\n\nvar _position = __webpack_require__(/*! dom-helpers/query/position */ 1116);\n\nvar _position2 = _interopRequireDefault(_position);\n\nvar _scrollTop = __webpack_require__(/*! dom-helpers/query/scrollTop */ 342);\n\nvar _scrollTop2 = _interopRequireDefault(_scrollTop);\n\nvar _ownerDocument = __webpack_require__(/*! ./ownerDocument */ 127);\n\nvar _ownerDocument2 = _interopRequireDefault(_ownerDocument);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction getContainerDimensions(containerNode) {\n var width = void 0,\n height = void 0,\n scroll = void 0;\n\n if (containerNode.tagName === 'BODY') {\n width = window.innerWidth;\n height = window.innerHeight;\n\n scroll = (0, _scrollTop2.default)((0, _ownerDocument2.default)(containerNode).documentElement) || (0, _scrollTop2.default)(containerNode);\n } else {\n var _getOffset = (0, _offset2.default)(containerNode);\n\n width = _getOffset.width;\n height = _getOffset.height;\n\n scroll = (0, _scrollTop2.default)(containerNode);\n }\n\n return { width: width, height: height, scroll: scroll };\n}\n\nfunction getTopDelta(top, overlayHeight, container, padding) {\n var containerDimensions = getContainerDimensions(container);\n var containerScroll = containerDimensions.scroll;\n var containerHeight = containerDimensions.height;\n\n var topEdgeOffset = top - padding - containerScroll;\n var bottomEdgeOffset = top + padding - containerScroll + overlayHeight;\n\n if (topEdgeOffset < 0) {\n return -topEdgeOffset;\n } else if (bottomEdgeOffset > containerHeight) {\n return containerHeight - bottomEdgeOffset;\n } else {\n return 0;\n }\n}\n\nfunction getLeftDelta(left, overlayWidth, container, padding) {\n var containerDimensions = getContainerDimensions(container);\n var containerWidth = containerDimensions.width;\n\n var leftEdgeOffset = left - padding;\n var rightEdgeOffset = left + padding + overlayWidth;\n\n if (leftEdgeOffset < 0) {\n return -leftEdgeOffset;\n } else if (rightEdgeOffset > containerWidth) {\n return containerWidth - rightEdgeOffset;\n }\n\n return 0;\n}\n\nfunction calculatePosition(placement, overlayNode, target, container, padding) {\n var childOffset = container.tagName === 'BODY' ? (0, _offset2.default)(target) : (0, _position2.default)(target, container);\n\n var _getOffset2 = (0, _offset2.default)(overlayNode),\n overlayHeight = _getOffset2.height,\n overlayWidth = _getOffset2.width;\n\n var positionLeft = void 0,\n positionTop = void 0,\n arrowOffsetLeft = void 0,\n arrowOffsetTop = void 0;\n\n if (placement === 'left' || placement === 'right') {\n positionTop = childOffset.top + (childOffset.height - overlayHeight) / 2;\n\n if (placement === 'left') {\n positionLeft = childOffset.left - overlayWidth;\n } else {\n positionLeft = childOffset.left + childOffset.width;\n }\n\n var topDelta = getTopDelta(positionTop, overlayHeight, container, padding);\n\n positionTop += topDelta;\n arrowOffsetTop = 50 * (1 - 2 * topDelta / overlayHeight) + '%';\n arrowOffsetLeft = void 0;\n } else if (placement === 'top' || placement === 'bottom') {\n positionLeft = childOffset.left + (childOffset.width - overlayWidth) / 2;\n\n if (placement === 'top') {\n positionTop = childOffset.top - overlayHeight;\n } else {\n positionTop = childOffset.top + childOffset.height;\n }\n\n var leftDelta = getLeftDelta(positionLeft, overlayWidth, container, padding);\n\n positionLeft += leftDelta;\n arrowOffsetLeft = 50 * (1 - 2 * leftDelta / overlayWidth) + '%';\n arrowOffsetTop = void 0;\n } else {\n throw new Error('calcOverlayPosition(): No such placement of \"' + placement + '\" found.');\n }\n\n return { positionLeft: positionLeft, positionTop: positionTop, arrowOffsetLeft: arrowOffsetLeft, arrowOffsetTop: arrowOffsetTop };\n}\nmodule.exports = exports['default'];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-overlays/lib/utils/calculatePosition.js\n// module id = 1437\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-overlays/lib/utils/calculatePosition.js?", + ); + + /***/ + }, + /* 1438 */ + /* unknown exports provided */ + /* all exports used */ + /*!********************************************************!*\ + !*** ./~/react-overlays/lib/utils/manageAriaHidden.js ***! + \********************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.ariaHidden = ariaHidden;\nexports.hideSiblings = hideSiblings;\nexports.showSiblings = showSiblings;\n\nvar BLACKLIST = ['template', 'script', 'style'];\n\nvar isHidable = function isHidable(_ref) {\n var nodeType = _ref.nodeType,\n tagName = _ref.tagName;\n return nodeType === 1 && BLACKLIST.indexOf(tagName.toLowerCase()) === -1;\n};\n\nvar siblings = function siblings(container, mount, cb) {\n mount = [].concat(mount);\n\n [].forEach.call(container.children, function (node) {\n if (mount.indexOf(node) === -1 && isHidable(node)) {\n cb(node);\n }\n });\n};\n\nfunction ariaHidden(show, node) {\n if (!node) {\n return;\n }\n if (show) {\n node.setAttribute('aria-hidden', 'true');\n } else {\n node.removeAttribute('aria-hidden');\n }\n}\n\nfunction hideSiblings(container, mountNode) {\n siblings(container, mountNode, function (node) {\n return ariaHidden(true, node);\n });\n}\n\nfunction showSiblings(container, mountNode) {\n siblings(container, mountNode, function (node) {\n return ariaHidden(false, node);\n });\n}\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-overlays/lib/utils/manageAriaHidden.js\n// module id = 1438\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-overlays/lib/utils/manageAriaHidden.js?", + ); + + /***/ + }, + /* 1439 */ + /* exports provided: default */ + /* exports used: default */ + /*!*************************************************!*\ + !*** ./~/react-redux/es/components/Provider.js ***! + \*************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(/*! prop-types */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_PropTypes__ = __webpack_require__(/*! ../utils/PropTypes */ 573);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__utils_warning__ = __webpack_require__(/*! ../utils/warning */ 265);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Provider; });\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\n\n\n\n\nvar didWarnAboutReceivingStore = false;\nfunction warnAboutReceivingStore() {\n if (didWarnAboutReceivingStore) {\n return;\n }\n didWarnAboutReceivingStore = true;\n\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__utils_warning__["a" /* default */])(\'<Provider> does not support changing `store` on the fly. \' + \'It is most likely that you see this error because you updated to \' + \'Redux 2.x and React Redux 2.x which no longer hot reload reducers \' + \'automatically. See https://github.com/reactjs/react-redux/releases/\' + \'tag/v2.0.0 for the migration instructions.\');\n}\n\nvar Provider = function (_Component) {\n _inherits(Provider, _Component);\n\n Provider.prototype.getChildContext = function getChildContext() {\n return { store: this.store, storeSubscription: null };\n };\n\n function Provider(props, context) {\n _classCallCheck(this, Provider);\n\n var _this = _possibleConstructorReturn(this, _Component.call(this, props, context));\n\n _this.store = props.store;\n return _this;\n }\n\n Provider.prototype.render = function render() {\n return __WEBPACK_IMPORTED_MODULE_0_react__["Children"].only(this.props.children);\n };\n\n return Provider;\n}(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]);\n\n\n\n\nif (true) {\n Provider.prototype.componentWillReceiveProps = function (nextProps) {\n var store = this.store;\n var nextStore = nextProps.store;\n\n\n if (store !== nextStore) {\n warnAboutReceivingStore();\n }\n };\n}\n\nProvider.propTypes = {\n store: __WEBPACK_IMPORTED_MODULE_2__utils_PropTypes__["a" /* storeShape */].isRequired,\n children: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.element.isRequired\n};\nProvider.childContextTypes = {\n store: __WEBPACK_IMPORTED_MODULE_2__utils_PropTypes__["a" /* storeShape */].isRequired,\n storeSubscription: __WEBPACK_IMPORTED_MODULE_2__utils_PropTypes__["b" /* subscriptionShape */]\n};\nProvider.displayName = \'Provider\';\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-redux/es/components/Provider.js\n// module id = 1439\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-redux/es/components/Provider.js?', + ); + + /***/ + }, + /* 1440 */ + /* exports provided: createConnect, default */ + /* exports used: default */ + /*!*********************************************!*\ + !*** ./~/react-redux/es/connect/connect.js ***! + \*********************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__components_connectAdvanced__ = __webpack_require__(/*! ../components/connectAdvanced */ 571);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__ = __webpack_require__(/*! ../utils/shallowEqual */ 1447);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__mapDispatchToProps__ = __webpack_require__(/*! ./mapDispatchToProps */ 1441);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__mapStateToProps__ = __webpack_require__(/*! ./mapStateToProps */ 1442);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__mergeProps__ = __webpack_require__(/*! ./mergeProps */ 1443);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__selectorFactory__ = __webpack_require__(/*! ./selectorFactory */ 1444);\n/* unused harmony export createConnect */\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\n\n\n\n\n\n\n\n/*\n connect is a facade over connectAdvanced. It turns its args into a compatible\n selectorFactory, which has the signature:\n\n (dispatch, options) => (nextState, nextOwnProps) => nextFinalProps\n \n connect passes its args to connectAdvanced as options, which will in turn pass them to\n selectorFactory each time a Connect component instance is instantiated or hot reloaded.\n\n selectorFactory returns a final props selector from its mapStateToProps,\n mapStateToPropsFactories, mapDispatchToProps, mapDispatchToPropsFactories, mergeProps,\n mergePropsFactories, and pure args.\n\n The resulting final props selector is called by the Connect component instance whenever\n it receives new props or store state.\n */\n\nfunction match(arg, factories, name) {\n for (var i = factories.length - 1; i >= 0; i--) {\n var result = factories[i](arg);\n if (result) return result;\n }\n\n return function (dispatch, options) {\n throw new Error('Invalid value of type ' + typeof arg + ' for ' + name + ' argument when connecting component ' + options.wrappedComponentName + '.');\n };\n}\n\nfunction strictEqual(a, b) {\n return a === b;\n}\n\n// createConnect with default args builds the 'official' connect behavior. Calling it with\n// different options opens up some testing and extensibility scenarios\nfunction createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? __WEBPACK_IMPORTED_MODULE_0__components_connectAdvanced__[\"a\" /* default */] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? __WEBPACK_IMPORTED_MODULE_3__mapStateToProps__[\"a\" /* default */] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? __WEBPACK_IMPORTED_MODULE_2__mapDispatchToProps__[\"a\" /* default */] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? __WEBPACK_IMPORTED_MODULE_4__mergeProps__[\"a\" /* default */] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? __WEBPACK_IMPORTED_MODULE_5__selectorFactory__[\"a\" /* default */] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (createConnect());\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-redux/es/connect/connect.js\n// module id = 1440\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-redux/es/connect/connect.js?", + ); + + /***/ + }, + /* 1441 */ + /* exports provided: whenMapDispatchToPropsIsFunction, whenMapDispatchToPropsIsMissing, whenMapDispatchToPropsIsObject, default */ + /* exports used: default */ + /*!********************************************************!*\ + !*** ./~/react-redux/es/connect/mapDispatchToProps.js ***! + \********************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_redux__ = __webpack_require__(/*! redux */ 129);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__wrapMapToProps__ = __webpack_require__(/*! ./wrapMapToProps */ 572);\n/* unused harmony export whenMapDispatchToPropsIsFunction */\n/* unused harmony export whenMapDispatchToPropsIsMissing */\n/* unused harmony export whenMapDispatchToPropsIsObject */\n\n\n\nfunction whenMapDispatchToPropsIsFunction(mapDispatchToProps) {\n return typeof mapDispatchToProps === \'function\' ? __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__wrapMapToProps__["a" /* wrapMapToPropsFunc */])(mapDispatchToProps, \'mapDispatchToProps\') : undefined;\n}\n\nfunction whenMapDispatchToPropsIsMissing(mapDispatchToProps) {\n return !mapDispatchToProps ? __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__wrapMapToProps__["b" /* wrapMapToPropsConstant */])(function (dispatch) {\n return { dispatch: dispatch };\n }) : undefined;\n}\n\nfunction whenMapDispatchToPropsIsObject(mapDispatchToProps) {\n return mapDispatchToProps && typeof mapDispatchToProps === \'object\' ? __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__wrapMapToProps__["b" /* wrapMapToPropsConstant */])(function (dispatch) {\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0_redux__["bindActionCreators"])(mapDispatchToProps, dispatch);\n }) : undefined;\n}\n\n/* harmony default export */ __webpack_exports__["a"] = ([whenMapDispatchToPropsIsFunction, whenMapDispatchToPropsIsMissing, whenMapDispatchToPropsIsObject]);\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-redux/es/connect/mapDispatchToProps.js\n// module id = 1441\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-redux/es/connect/mapDispatchToProps.js?', + ); + + /***/ + }, + /* 1442 */ + /* exports provided: whenMapStateToPropsIsFunction, whenMapStateToPropsIsMissing, default */ + /* exports used: default */ + /*!*****************************************************!*\ + !*** ./~/react-redux/es/connect/mapStateToProps.js ***! + \*****************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__wrapMapToProps__ = __webpack_require__(/*! ./wrapMapToProps */ 572);\n/* unused harmony export whenMapStateToPropsIsFunction */\n/* unused harmony export whenMapStateToPropsIsMissing */\n\n\nfunction whenMapStateToPropsIsFunction(mapStateToProps) {\n return typeof mapStateToProps === \'function\' ? __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__wrapMapToProps__["a" /* wrapMapToPropsFunc */])(mapStateToProps, \'mapStateToProps\') : undefined;\n}\n\nfunction whenMapStateToPropsIsMissing(mapStateToProps) {\n return !mapStateToProps ? __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__wrapMapToProps__["b" /* wrapMapToPropsConstant */])(function () {\n return {};\n }) : undefined;\n}\n\n/* harmony default export */ __webpack_exports__["a"] = ([whenMapStateToPropsIsFunction, whenMapStateToPropsIsMissing]);\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-redux/es/connect/mapStateToProps.js\n// module id = 1442\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-redux/es/connect/mapStateToProps.js?', + ); + + /***/ + }, + /* 1443 */ + /* exports provided: defaultMergeProps, wrapMergePropsFunc, whenMergePropsIsFunction, whenMergePropsIsOmitted, default */ + /* exports used: default */ + /*!************************************************!*\ + !*** ./~/react-redux/es/connect/mergeProps.js ***! + \************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils_verifyPlainObject__ = __webpack_require__(/*! ../utils/verifyPlainObject */ 574);\n/* unused harmony export defaultMergeProps */\n/* unused harmony export wrapMergePropsFunc */\n/* unused harmony export whenMergePropsIsFunction */\n/* unused harmony export whenMergePropsIsOmitted */\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\n\n\nfunction defaultMergeProps(stateProps, dispatchProps, ownProps) {\n return _extends({}, ownProps, stateProps, dispatchProps);\n}\n\nfunction wrapMergePropsFunc(mergeProps) {\n return function initMergePropsProxy(dispatch, _ref) {\n var displayName = _ref.displayName,\n pure = _ref.pure,\n areMergedPropsEqual = _ref.areMergedPropsEqual;\n\n var hasRunOnce = false;\n var mergedProps = void 0;\n\n return function mergePropsProxy(stateProps, dispatchProps, ownProps) {\n var nextMergedProps = mergeProps(stateProps, dispatchProps, ownProps);\n\n if (hasRunOnce) {\n if (!pure || !areMergedPropsEqual(nextMergedProps, mergedProps)) mergedProps = nextMergedProps;\n } else {\n hasRunOnce = true;\n mergedProps = nextMergedProps;\n\n if (true) __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__utils_verifyPlainObject__["a" /* default */])(mergedProps, displayName, \'mergeProps\');\n }\n\n return mergedProps;\n };\n };\n}\n\nfunction whenMergePropsIsFunction(mergeProps) {\n return typeof mergeProps === \'function\' ? wrapMergePropsFunc(mergeProps) : undefined;\n}\n\nfunction whenMergePropsIsOmitted(mergeProps) {\n return !mergeProps ? function () {\n return defaultMergeProps;\n } : undefined;\n}\n\n/* harmony default export */ __webpack_exports__["a"] = ([whenMergePropsIsFunction, whenMergePropsIsOmitted]);\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-redux/es/connect/mergeProps.js\n// module id = 1443\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-redux/es/connect/mergeProps.js?', + ); + + /***/ + }, + /* 1444 */ + /* exports provided: impureFinalPropsSelectorFactory, pureFinalPropsSelectorFactory, default */ + /* exports used: default */ + /*!*****************************************************!*\ + !*** ./~/react-redux/es/connect/selectorFactory.js ***! + \*****************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__verifySubselectors__ = __webpack_require__(/*! ./verifySubselectors */ 1445);\n/* unused harmony export impureFinalPropsSelectorFactory */\n/* unused harmony export pureFinalPropsSelectorFactory */\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = finalPropsSelectorFactory;\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\n\n\nfunction impureFinalPropsSelectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch) {\n return function impureFinalPropsSelector(state, ownProps) {\n return mergeProps(mapStateToProps(state, ownProps), mapDispatchToProps(dispatch, ownProps), ownProps);\n };\n}\n\nfunction pureFinalPropsSelectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, _ref) {\n var areStatesEqual = _ref.areStatesEqual,\n areOwnPropsEqual = _ref.areOwnPropsEqual,\n areStatePropsEqual = _ref.areStatePropsEqual;\n\n var hasRunAtLeastOnce = false;\n var state = void 0;\n var ownProps = void 0;\n var stateProps = void 0;\n var dispatchProps = void 0;\n var mergedProps = void 0;\n\n function handleFirstCall(firstState, firstOwnProps) {\n state = firstState;\n ownProps = firstOwnProps;\n stateProps = mapStateToProps(state, ownProps);\n dispatchProps = mapDispatchToProps(dispatch, ownProps);\n mergedProps = mergeProps(stateProps, dispatchProps, ownProps);\n hasRunAtLeastOnce = true;\n return mergedProps;\n }\n\n function handleNewPropsAndNewState() {\n stateProps = mapStateToProps(state, ownProps);\n\n if (mapDispatchToProps.dependsOnOwnProps) dispatchProps = mapDispatchToProps(dispatch, ownProps);\n\n mergedProps = mergeProps(stateProps, dispatchProps, ownProps);\n return mergedProps;\n }\n\n function handleNewProps() {\n if (mapStateToProps.dependsOnOwnProps) stateProps = mapStateToProps(state, ownProps);\n\n if (mapDispatchToProps.dependsOnOwnProps) dispatchProps = mapDispatchToProps(dispatch, ownProps);\n\n mergedProps = mergeProps(stateProps, dispatchProps, ownProps);\n return mergedProps;\n }\n\n function handleNewState() {\n var nextStateProps = mapStateToProps(state, ownProps);\n var statePropsChanged = !areStatePropsEqual(nextStateProps, stateProps);\n stateProps = nextStateProps;\n\n if (statePropsChanged) mergedProps = mergeProps(stateProps, dispatchProps, ownProps);\n\n return mergedProps;\n }\n\n function handleSubsequentCalls(nextState, nextOwnProps) {\n var propsChanged = !areOwnPropsEqual(nextOwnProps, ownProps);\n var stateChanged = !areStatesEqual(nextState, state);\n state = nextState;\n ownProps = nextOwnProps;\n\n if (propsChanged && stateChanged) return handleNewPropsAndNewState();\n if (propsChanged) return handleNewProps();\n if (stateChanged) return handleNewState();\n return mergedProps;\n }\n\n return function pureFinalPropsSelector(nextState, nextOwnProps) {\n return hasRunAtLeastOnce ? handleSubsequentCalls(nextState, nextOwnProps) : handleFirstCall(nextState, nextOwnProps);\n };\n}\n\n// TODO: Add more comments\n\n// If pure is true, the selector returned by selectorFactory will memoize its results,\n// allowing connectAdvanced's shouldComponentUpdate to return false if final\n// props have not changed. If false, the selector will always return a new\n// object and shouldComponentUpdate will always return true.\n\nfunction finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (true) {\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__verifySubselectors__[\"a\" /* default */])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-redux/es/connect/selectorFactory.js\n// module id = 1444\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-redux/es/connect/selectorFactory.js?", + ); + + /***/ + }, + /* 1445 */ + /* exports provided: default */ + /* exports used: default */ + /*!********************************************************!*\ + !*** ./~/react-redux/es/connect/verifySubselectors.js ***! + \********************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils_warning__ = __webpack_require__(/*! ../utils/warning */ 265);\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = verifySubselectors;\n\n\nfunction verify(selector, methodName, displayName) {\n if (!selector) {\n throw new Error('Unexpected value for ' + methodName + ' in ' + displayName + '.');\n } else if (methodName === 'mapStateToProps' || methodName === 'mapDispatchToProps') {\n if (!selector.hasOwnProperty('dependsOnOwnProps')) {\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__utils_warning__[\"a\" /* default */])('The selector for ' + methodName + ' of ' + displayName + ' did not specify a value for dependsOnOwnProps.');\n }\n }\n}\n\nfunction verifySubselectors(mapStateToProps, mapDispatchToProps, mergeProps, displayName) {\n verify(mapStateToProps, 'mapStateToProps', displayName);\n verify(mapDispatchToProps, 'mapDispatchToProps', displayName);\n verify(mergeProps, 'mergeProps', displayName);\n}\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-redux/es/connect/verifySubselectors.js\n// module id = 1445\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-redux/es/connect/verifySubselectors.js?", + ); + + /***/ + }, + /* 1446 */ + /* exports provided: default */ + /* exports used: default */ + /*!************************************************!*\ + !*** ./~/react-redux/es/utils/Subscription.js ***! + \************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Subscription; });\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\n// encapsulates the subscription logic for connecting a component to the redux store, as\n// well as nesting subscriptions of descendant components, so that we can ensure the\n// ancestor components re-render before descendants\n\nvar CLEARED = null;\nvar nullListeners = {\n notify: function notify() {}\n};\n\nfunction createListenerCollection() {\n // the current/next pattern is copied from redux\'s createStore code.\n // TODO: refactor+expose that code to be reusable here?\n var current = [];\n var next = [];\n\n return {\n clear: function clear() {\n next = CLEARED;\n current = CLEARED;\n },\n notify: function notify() {\n var listeners = current = next;\n for (var i = 0; i < listeners.length; i++) {\n listeners[i]();\n }\n },\n subscribe: function subscribe(listener) {\n var isSubscribed = true;\n if (next === current) next = current.slice();\n next.push(listener);\n\n return function unsubscribe() {\n if (!isSubscribed || current === CLEARED) return;\n isSubscribed = false;\n\n if (next === current) next = current.slice();\n next.splice(next.indexOf(listener), 1);\n };\n }\n };\n}\n\nvar Subscription = function () {\n function Subscription(store, parentSub, onStateChange) {\n _classCallCheck(this, Subscription);\n\n this.store = store;\n this.parentSub = parentSub;\n this.onStateChange = onStateChange;\n this.unsubscribe = null;\n this.listeners = nullListeners;\n }\n\n Subscription.prototype.addNestedSub = function addNestedSub(listener) {\n this.trySubscribe();\n return this.listeners.subscribe(listener);\n };\n\n Subscription.prototype.notifyNestedSubs = function notifyNestedSubs() {\n this.listeners.notify();\n };\n\n Subscription.prototype.isSubscribed = function isSubscribed() {\n return Boolean(this.unsubscribe);\n };\n\n Subscription.prototype.trySubscribe = function trySubscribe() {\n if (!this.unsubscribe) {\n this.unsubscribe = this.parentSub ? this.parentSub.addNestedSub(this.onStateChange) : this.store.subscribe(this.onStateChange);\n\n this.listeners = createListenerCollection();\n }\n };\n\n Subscription.prototype.tryUnsubscribe = function tryUnsubscribe() {\n if (this.unsubscribe) {\n this.unsubscribe();\n this.unsubscribe = null;\n this.listeners.clear();\n this.listeners = nullListeners;\n }\n };\n\n return Subscription;\n}();\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-redux/es/utils/Subscription.js\n// module id = 1446\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-redux/es/utils/Subscription.js?', + ); + + /***/ + }, + /* 1447 */ + /* exports provided: default */ + /* exports used: default */ + /*!************************************************!*\ + !*** ./~/react-redux/es/utils/shallowEqual.js ***! + \************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony export (immutable) */ __webpack_exports__[\"a\"] = shallowEqual;\nvar hasOwn = Object.prototype.hasOwnProperty;\n\nfunction is(x, y) {\n if (x === y) {\n return x !== 0 || y !== 0 || 1 / x === 1 / y;\n } else {\n return x !== x && y !== y;\n }\n}\n\nfunction shallowEqual(objA, objB) {\n if (is(objA, objB)) return true;\n\n if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n return false;\n }\n\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) return false;\n\n for (var i = 0; i < keysA.length; i++) {\n if (!hasOwn.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n return false;\n }\n }\n\n return true;\n}\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-redux/es/utils/shallowEqual.js\n// module id = 1447\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-redux/es/utils/shallowEqual.js?", + ); + + /***/ + }, + /* 1448 */ + /* exports provided: default */ + /*!****************************************!*\ + !*** ./~/react-router/es/IndexLink.js ***! + \****************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Link__ = __webpack_require__(/*! ./Link */ 575);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\n\n\n\n/**\n * An <IndexLink> is used to link to an <IndexRoute>.\n */\nvar IndexLink = __WEBPACK_IMPORTED_MODULE_0_react___default.a.createClass({\n displayName: \'IndexLink\',\n render: function render() {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1__Link__["a" /* default */], _extends({}, this.props, { onlyActiveOnIndex: true }));\n }\n});\n\n/* unused harmony default export */ var _unused_webpack_default_export = (IndexLink);\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-router/es/IndexLink.js\n// module id = 1448\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-router/es/IndexLink.js?', + ); + + /***/ + }, + /* 1449 */ + /* exports provided: default */ + /*!********************************************!*\ + !*** ./~/react-router/es/IndexRedirect.js ***! + \********************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__routerWarning__ = __webpack_require__(/*! ./routerWarning */ 102);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant__ = __webpack_require__(/*! invariant */ 25);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_invariant__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Redirect__ = __webpack_require__(/*! ./Redirect */ 577);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__InternalPropTypes__ = __webpack_require__(/*! ./InternalPropTypes */ 128);\n\n\n\n\n\n\nvar _React$PropTypes = __WEBPACK_IMPORTED_MODULE_0_react___default.a.PropTypes,\n string = _React$PropTypes.string,\n object = _React$PropTypes.object;\n\n/**\n * An <IndexRedirect> is used to redirect from an indexRoute.\n */\n/* eslint-disable react/require-render-return */\n\nvar IndexRedirect = __WEBPACK_IMPORTED_MODULE_0_react___default.a.createClass({\n displayName: \'IndexRedirect\',\n\n\n statics: {\n createRouteFromReactElement: function createRouteFromReactElement(element, parentRoute) {\n /* istanbul ignore else: sanity check */\n if (parentRoute) {\n parentRoute.indexRoute = __WEBPACK_IMPORTED_MODULE_3__Redirect__["a" /* default */].createRouteFromReactElement(element);\n } else {\n true ? __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__routerWarning__["a" /* default */])(false, \'An <IndexRedirect> does not make sense at the root of your route config\') : void 0;\n }\n }\n },\n\n propTypes: {\n to: string.isRequired,\n query: object,\n state: object,\n onEnter: __WEBPACK_IMPORTED_MODULE_4__InternalPropTypes__["c" /* falsy */],\n children: __WEBPACK_IMPORTED_MODULE_4__InternalPropTypes__["c" /* falsy */]\n },\n\n /* istanbul ignore next: sanity check */\n render: function render() {\n true ? true ? __WEBPACK_IMPORTED_MODULE_2_invariant___default()(false, \'<IndexRedirect> elements are for router configuration only and should not be rendered\') : invariant(false) : void 0;\n }\n});\n\n/* unused harmony default export */ var _unused_webpack_default_export = (IndexRedirect);\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-router/es/IndexRedirect.js\n// module id = 1449\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-router/es/IndexRedirect.js?', + ); + + /***/ + }, + /* 1450 */ + /* exports provided: default */ + /*!*****************************************!*\ + !*** ./~/react-router/es/IndexRoute.js ***! + \*****************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__routerWarning__ = __webpack_require__(/*! ./routerWarning */ 102);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant__ = __webpack_require__(/*! invariant */ 25);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_invariant__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__RouteUtils__ = __webpack_require__(/*! ./RouteUtils */ 68);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__InternalPropTypes__ = __webpack_require__(/*! ./InternalPropTypes */ 128);\n\n\n\n\n\n\nvar func = __WEBPACK_IMPORTED_MODULE_0_react___default.a.PropTypes.func;\n\n/**\n * An <IndexRoute> is used to specify its parent\'s <Route indexRoute> in\n * a JSX route config.\n */\n/* eslint-disable react/require-render-return */\n\nvar IndexRoute = __WEBPACK_IMPORTED_MODULE_0_react___default.a.createClass({\n displayName: \'IndexRoute\',\n\n\n statics: {\n createRouteFromReactElement: function createRouteFromReactElement(element, parentRoute) {\n /* istanbul ignore else: sanity check */\n if (parentRoute) {\n parentRoute.indexRoute = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__RouteUtils__["c" /* createRouteFromReactElement */])(element);\n } else {\n true ? __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__routerWarning__["a" /* default */])(false, \'An <IndexRoute> does not make sense at the root of your route config\') : void 0;\n }\n }\n },\n\n propTypes: {\n path: __WEBPACK_IMPORTED_MODULE_4__InternalPropTypes__["c" /* falsy */],\n component: __WEBPACK_IMPORTED_MODULE_4__InternalPropTypes__["a" /* component */],\n components: __WEBPACK_IMPORTED_MODULE_4__InternalPropTypes__["b" /* components */],\n getComponent: func,\n getComponents: func\n },\n\n /* istanbul ignore next: sanity check */\n render: function render() {\n true ? true ? __WEBPACK_IMPORTED_MODULE_2_invariant___default()(false, \'<IndexRoute> elements are for router configuration only and should not be rendered\') : invariant(false) : void 0;\n }\n});\n\n/* unused harmony default export */ var _unused_webpack_default_export = (IndexRoute);\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-router/es/IndexRoute.js\n// module id = 1450\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-router/es/IndexRoute.js?', + ); + + /***/ + }, + /* 1451 */ + /* exports provided: default */ + /* exports used: default */ + /*!************************************!*\ + !*** ./~/react-router/es/Route.js ***! + \************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(/*! invariant */ 25);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_invariant__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__RouteUtils__ = __webpack_require__(/*! ./RouteUtils */ 68);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__InternalPropTypes__ = __webpack_require__(/*! ./InternalPropTypes */ 128);\n\n\n\n\n\nvar _React$PropTypes = __WEBPACK_IMPORTED_MODULE_0_react___default.a.PropTypes,\n string = _React$PropTypes.string,\n func = _React$PropTypes.func;\n\n/**\n * A <Route> is used to declare which components are rendered to the\n * page when the URL matches a given pattern.\n *\n * Routes are arranged in a nested tree structure. When a new URL is\n * requested, the tree is searched depth-first to find a route whose\n * path matches the URL. When one is found, all routes in the tree\n * that lead to it are considered "active" and their components are\n * rendered into the DOM, nested in the same order as in the tree.\n */\n/* eslint-disable react/require-render-return */\n\nvar Route = __WEBPACK_IMPORTED_MODULE_0_react___default.a.createClass({\n displayName: \'Route\',\n\n\n statics: {\n createRouteFromReactElement: __WEBPACK_IMPORTED_MODULE_2__RouteUtils__["c" /* createRouteFromReactElement */]\n },\n\n propTypes: {\n path: string,\n component: __WEBPACK_IMPORTED_MODULE_3__InternalPropTypes__["a" /* component */],\n components: __WEBPACK_IMPORTED_MODULE_3__InternalPropTypes__["b" /* components */],\n getComponent: func,\n getComponents: func\n },\n\n /* istanbul ignore next: sanity check */\n render: function render() {\n true ? true ? __WEBPACK_IMPORTED_MODULE_1_invariant___default()(false, \'<Route> elements are for router configuration only and should not be rendered\') : invariant(false) : void 0;\n }\n});\n\n/* harmony default export */ __webpack_exports__["a"] = (Route);\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-router/es/Route.js\n// module id = 1451\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-router/es/Route.js?', + ); + + /***/ + }, + /* 1452 */ + /* exports provided: default */ + /* exports used: default */ + /*!*************************************!*\ + !*** ./~/react-router/es/Router.js ***! + \*************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant__ = __webpack_require__(/*! invariant */ 25);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_invariant__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__createTransitionManager__ = __webpack_require__(/*! ./createTransitionManager */ 581);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__InternalPropTypes__ = __webpack_require__(/*! ./InternalPropTypes */ 128);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__RouterContext__ = __webpack_require__(/*! ./RouterContext */ 269);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__RouteUtils__ = __webpack_require__(/*! ./RouteUtils */ 68);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__RouterUtils__ = __webpack_require__(/*! ./RouterUtils */ 578);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__routerWarning__ = __webpack_require__(/*! ./routerWarning */ 102);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\n\n\n\n\n\n\n\n\n\n\nvar _React$PropTypes = __WEBPACK_IMPORTED_MODULE_1_react___default.a.PropTypes,\n func = _React$PropTypes.func,\n object = _React$PropTypes.object;\n\n/**\n * A <Router> is a high-level API for automatically setting up\n * a router that renders a <RouterContext> with all the props\n * it needs each time the URL changes.\n */\n\nvar Router = __WEBPACK_IMPORTED_MODULE_1_react___default.a.createClass({\n displayName: \'Router\',\n\n\n propTypes: {\n history: object,\n children: __WEBPACK_IMPORTED_MODULE_3__InternalPropTypes__["d" /* routes */],\n routes: __WEBPACK_IMPORTED_MODULE_3__InternalPropTypes__["d" /* routes */], // alias for children\n render: func,\n createElement: func,\n onError: func,\n onUpdate: func,\n\n // PRIVATE: For client-side rehydration of server match.\n matchContext: object\n },\n\n getDefaultProps: function getDefaultProps() {\n return {\n render: function render(props) {\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_4__RouterContext__["a" /* default */], props);\n }\n };\n },\n getInitialState: function getInitialState() {\n return {\n location: null,\n routes: null,\n params: null,\n components: null\n };\n },\n handleError: function handleError(error) {\n if (this.props.onError) {\n this.props.onError.call(this, error);\n } else {\n // Throw errors by default so we don\'t silently swallow them!\n throw error; // This error probably occurred in getChildRoutes or getComponents.\n }\n },\n createRouterObject: function createRouterObject(state) {\n var matchContext = this.props.matchContext;\n\n if (matchContext) {\n return matchContext.router;\n }\n\n var history = this.props.history;\n\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__RouterUtils__["a" /* createRouterObject */])(history, this.transitionManager, state);\n },\n createTransitionManager: function createTransitionManager() {\n var matchContext = this.props.matchContext;\n\n if (matchContext) {\n return matchContext.transitionManager;\n }\n\n var history = this.props.history;\n var _props = this.props,\n routes = _props.routes,\n children = _props.children;\n\n\n !history.getCurrentLocation ? true ? __WEBPACK_IMPORTED_MODULE_0_invariant___default()(false, \'You have provided a history object created with history v4.x or v2.x \' + \'and earlier. This version of React Router is only compatible with v3 \' + \'history objects. Please change to history v3.x.\') : invariant(false) : void 0;\n\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__createTransitionManager__["a" /* default */])(history, __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__RouteUtils__["b" /* createRoutes */])(routes || children));\n },\n componentWillMount: function componentWillMount() {\n var _this = this;\n\n this.transitionManager = this.createTransitionManager();\n this.router = this.createRouterObject(this.state);\n\n this._unlisten = this.transitionManager.listen(function (error, state) {\n if (error) {\n _this.handleError(error);\n } else {\n // Keep the identity of this.router because of a caveat in ContextUtils:\n // they only work if the object identity is preserved.\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__RouterUtils__["b" /* assignRouterState */])(_this.router, state);\n _this.setState(state, _this.props.onUpdate);\n }\n });\n },\n\n\n /* istanbul ignore next: sanity check */\n componentWillReceiveProps: function componentWillReceiveProps(nextProps) {\n true ? __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_7__routerWarning__["a" /* default */])(nextProps.history === this.props.history, \'You cannot change <Router history>; it will be ignored\') : void 0;\n\n true ? __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_7__routerWarning__["a" /* default */])((nextProps.routes || nextProps.children) === (this.props.routes || this.props.children), \'You cannot change <Router routes>; it will be ignored\') : void 0;\n },\n componentWillUnmount: function componentWillUnmount() {\n if (this._unlisten) this._unlisten();\n },\n render: function render() {\n var _state = this.state,\n location = _state.location,\n routes = _state.routes,\n params = _state.params,\n components = _state.components;\n\n var _props2 = this.props,\n createElement = _props2.createElement,\n render = _props2.render,\n props = _objectWithoutProperties(_props2, [\'createElement\', \'render\']);\n\n if (location == null) return null; // Async match\n\n // Only forward non-Router-specific props to routing context, as those are\n // the only ones that might be custom routing context props.\n Object.keys(Router.propTypes).forEach(function (propType) {\n return delete props[propType];\n });\n\n return render(_extends({}, props, {\n router: this.router,\n location: location,\n routes: routes,\n params: params,\n components: components,\n createElement: createElement\n }));\n }\n});\n\n/* harmony default export */ __webpack_exports__["a"] = (Router);\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-router/es/Router.js\n// module id = 1452\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-router/es/Router.js?', + ); + + /***/ + }, + /* 1453 */ + /* exports provided: runEnterHooks, runChangeHooks, runLeaveHooks */ + /* exports used: runLeaveHooks, runChangeHooks, runEnterHooks */ + /*!**********************************************!*\ + !*** ./~/react-router/es/TransitionUtils.js ***! + \**********************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__AsyncUtils__ = __webpack_require__(/*! ./AsyncUtils */ 266);\n/* harmony export (immutable) */ __webpack_exports__["c"] = runEnterHooks;\n/* harmony export (immutable) */ __webpack_exports__["b"] = runChangeHooks;\n/* harmony export (immutable) */ __webpack_exports__["a"] = runLeaveHooks;\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\n\n\nvar PendingHooks = function PendingHooks() {\n var _this = this;\n\n _classCallCheck(this, PendingHooks);\n\n this.hooks = [];\n\n this.add = function (hook) {\n return _this.hooks.push(hook);\n };\n\n this.remove = function (hook) {\n return _this.hooks = _this.hooks.filter(function (h) {\n return h !== hook;\n });\n };\n\n this.has = function (hook) {\n return _this.hooks.indexOf(hook) !== -1;\n };\n\n this.clear = function () {\n return _this.hooks = [];\n };\n};\n\nvar enterHooks = new PendingHooks();\nvar changeHooks = new PendingHooks();\n\nfunction createTransitionHook(hook, route, asyncArity, pendingHooks) {\n var isSync = hook.length < asyncArity;\n\n var transitionHook = function transitionHook() {\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n hook.apply(route, args);\n\n if (isSync) {\n var callback = args[args.length - 1];\n // Assume hook executes synchronously and\n // automatically call the callback.\n callback();\n }\n };\n\n pendingHooks.add(transitionHook);\n\n return transitionHook;\n}\n\nfunction getEnterHooks(routes) {\n return routes.reduce(function (hooks, route) {\n if (route.onEnter) hooks.push(createTransitionHook(route.onEnter, route, 3, enterHooks));\n return hooks;\n }, []);\n}\n\nfunction getChangeHooks(routes) {\n return routes.reduce(function (hooks, route) {\n if (route.onChange) hooks.push(createTransitionHook(route.onChange, route, 4, changeHooks));\n return hooks;\n }, []);\n}\n\nfunction runTransitionHooks(length, iter, callback) {\n if (!length) {\n callback();\n return;\n }\n\n var redirectInfo = void 0;\n function replace(location) {\n redirectInfo = location;\n }\n\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__AsyncUtils__["b" /* loopAsync */])(length, function (index, next, done) {\n iter(index, replace, function (error) {\n if (error || redirectInfo) {\n done(error, redirectInfo); // No need to continue.\n } else {\n next();\n }\n });\n }, callback);\n}\n\n/**\n * Runs all onEnter hooks in the given array of routes in order\n * with onEnter(nextState, replace, callback) and calls\n * callback(error, redirectInfo) when finished. The first hook\n * to use replace short-circuits the loop.\n *\n * If a hook needs to run asynchronously, it may use the callback\n * function. However, doing so will cause the transition to pause,\n * which could lead to a non-responsive UI if the hook is slow.\n */\nfunction runEnterHooks(routes, nextState, callback) {\n enterHooks.clear();\n var hooks = getEnterHooks(routes);\n return runTransitionHooks(hooks.length, function (index, replace, next) {\n var wrappedNext = function wrappedNext() {\n if (enterHooks.has(hooks[index])) {\n next.apply(undefined, arguments);\n enterHooks.remove(hooks[index]);\n }\n };\n hooks[index](nextState, replace, wrappedNext);\n }, callback);\n}\n\n/**\n * Runs all onChange hooks in the given array of routes in order\n * with onChange(prevState, nextState, replace, callback) and calls\n * callback(error, redirectInfo) when finished. The first hook\n * to use replace short-circuits the loop.\n *\n * If a hook needs to run asynchronously, it may use the callback\n * function. However, doing so will cause the transition to pause,\n * which could lead to a non-responsive UI if the hook is slow.\n */\nfunction runChangeHooks(routes, state, nextState, callback) {\n changeHooks.clear();\n var hooks = getChangeHooks(routes);\n return runTransitionHooks(hooks.length, function (index, replace, next) {\n var wrappedNext = function wrappedNext() {\n if (changeHooks.has(hooks[index])) {\n next.apply(undefined, arguments);\n changeHooks.remove(hooks[index]);\n }\n };\n hooks[index](state, nextState, replace, wrappedNext);\n }, callback);\n}\n\n/**\n * Runs all onLeave hooks in the given array of routes in order.\n */\nfunction runLeaveHooks(routes, prevState) {\n for (var i = 0, len = routes.length; i < len; ++i) {\n if (routes[i].onLeave) routes[i].onLeave.call(routes[i], prevState);\n }\n}\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-router/es/TransitionUtils.js\n// module id = 1453\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-router/es/TransitionUtils.js?', + ); + + /***/ + }, + /* 1454 */ + /* exports provided: default */ + /*!****************************************************!*\ + !*** ./~/react-router/es/applyRouterMiddleware.js ***! + \****************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__RouterContext__ = __webpack_require__(/*! ./RouterContext */ 269);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__routerWarning__ = __webpack_require__(/*! ./routerWarning */ 102);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\n\n\n\n\n/* unused harmony default export */ var _unused_webpack_default_export = (function () {\n for (var _len = arguments.length, middlewares = Array(_len), _key = 0; _key < _len; _key++) {\n middlewares[_key] = arguments[_key];\n }\n\n if (true) {\n middlewares.forEach(function (middleware, index) {\n true ? __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__routerWarning__["a" /* default */])(middleware.renderRouterContext || middleware.renderRouteComponent, \'The middleware specified at index \' + index + \' does not appear to be \' + \'a valid React Router middleware.\') : void 0;\n });\n }\n\n var withContext = middlewares.map(function (middleware) {\n return middleware.renderRouterContext;\n }).filter(Boolean);\n var withComponent = middlewares.map(function (middleware) {\n return middleware.renderRouteComponent;\n }).filter(Boolean);\n\n var makeCreateElement = function makeCreateElement() {\n var baseCreateElement = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : __WEBPACK_IMPORTED_MODULE_0_react__["createElement"];\n return function (Component, props) {\n return withComponent.reduceRight(function (previous, renderRouteComponent) {\n return renderRouteComponent(previous, props);\n }, baseCreateElement(Component, props));\n };\n };\n\n return function (renderProps) {\n return withContext.reduceRight(function (previous, renderRouterContext) {\n return renderRouterContext(previous, renderProps);\n }, __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1__RouterContext__["a" /* default */], _extends({}, renderProps, {\n createElement: makeCreateElement(renderProps.createElement)\n })));\n };\n});\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-router/es/applyRouterMiddleware.js\n// module id = 1454\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-router/es/applyRouterMiddleware.js?', + ); + + /***/ + }, + /* 1455 */ + /* exports provided: default */ + /*!*********************************************!*\ + !*** ./~/react-router/es/browserHistory.js ***! + \*********************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_createBrowserHistory__ = __webpack_require__(/*! history/lib/createBrowserHistory */ 214);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_createBrowserHistory___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_history_lib_createBrowserHistory__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__createRouterHistory__ = __webpack_require__(/*! ./createRouterHistory */ 580);\n\n\n/* unused harmony default export */ var _unused_webpack_default_export = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__createRouterHistory__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_0_history_lib_createBrowserHistory___default.a));\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-router/es/browserHistory.js\n// module id = 1455\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-router/es/browserHistory.js?', + ); + + /***/ + }, + /* 1456 */ + /* exports provided: default */ + /* exports used: default */ + /*!***************************************************!*\ + !*** ./~/react-router/es/computeChangedRoutes.js ***! + \***************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__PatternUtils__ = __webpack_require__(/*! ./PatternUtils */ 101);\n\n\nfunction routeParamsChanged(route, prevState, nextState) {\n if (!route.path) return false;\n\n var paramNames = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__PatternUtils__["a" /* getParamNames */])(route.path);\n\n return paramNames.some(function (paramName) {\n return prevState.params[paramName] !== nextState.params[paramName];\n });\n}\n\n/**\n * Returns an object of { leaveRoutes, changeRoutes, enterRoutes } determined by\n * the change from prevState to nextState. We leave routes if either\n * 1) they are not in the next state or 2) they are in the next state\n * but their params have changed (i.e. /users/123 => /users/456).\n *\n * leaveRoutes are ordered starting at the leaf route of the tree\n * we\'re leaving up to the common parent route. enterRoutes are ordered\n * from the top of the tree we\'re entering down to the leaf route.\n *\n * changeRoutes are any routes that didn\'t leave or enter during\n * the transition.\n */\nfunction computeChangedRoutes(prevState, nextState) {\n var prevRoutes = prevState && prevState.routes;\n var nextRoutes = nextState.routes;\n\n var leaveRoutes = void 0,\n changeRoutes = void 0,\n enterRoutes = void 0;\n if (prevRoutes) {\n (function () {\n var parentIsLeaving = false;\n leaveRoutes = prevRoutes.filter(function (route) {\n if (parentIsLeaving) {\n return true;\n } else {\n var isLeaving = nextRoutes.indexOf(route) === -1 || routeParamsChanged(route, prevState, nextState);\n if (isLeaving) parentIsLeaving = true;\n return isLeaving;\n }\n });\n\n // onLeave hooks start at the leaf route.\n leaveRoutes.reverse();\n\n enterRoutes = [];\n changeRoutes = [];\n\n nextRoutes.forEach(function (route) {\n var isNew = prevRoutes.indexOf(route) === -1;\n var paramsChanged = leaveRoutes.indexOf(route) !== -1;\n\n if (isNew || paramsChanged) enterRoutes.push(route);else changeRoutes.push(route);\n });\n })();\n } else {\n leaveRoutes = [];\n changeRoutes = [];\n enterRoutes = nextRoutes;\n }\n\n return {\n leaveRoutes: leaveRoutes,\n changeRoutes: changeRoutes,\n enterRoutes: enterRoutes\n };\n}\n\n/* harmony default export */ __webpack_exports__["a"] = (computeChangedRoutes);\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-router/es/computeChangedRoutes.js\n// module id = 1456\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-router/es/computeChangedRoutes.js?', + ); + + /***/ + }, + /* 1457 */ + /* exports provided: default */ + /* exports used: default */ + /*!********************************************!*\ + !*** ./~/react-router/es/getComponents.js ***! + \********************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__AsyncUtils__ = __webpack_require__(/*! ./AsyncUtils */ 266);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__PromiseUtils__ = __webpack_require__(/*! ./PromiseUtils */ 576);\n\n\n\nfunction getComponentsForRoute(nextState, route, callback) {\n if (route.component || route.components) {\n callback(null, route.component || route.components);\n return;\n }\n\n var getComponent = route.getComponent || route.getComponents;\n if (getComponent) {\n var componentReturn = getComponent.call(route, nextState, callback);\n if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__PromiseUtils__["a" /* isPromise */])(componentReturn)) componentReturn.then(function (component) {\n return callback(null, component);\n }, callback);\n } else {\n callback();\n }\n}\n\n/**\n * Asynchronously fetches all components needed for the given router\n * state and calls callback(error, components) when finished.\n *\n * Note: This operation may finish synchronously if no routes have an\n * asynchronous getComponents method.\n */\nfunction getComponents(nextState, callback) {\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__AsyncUtils__["a" /* mapAsync */])(nextState.routes, function (route, index, callback) {\n getComponentsForRoute(nextState, route, callback);\n }, callback);\n}\n\n/* harmony default export */ __webpack_exports__["a"] = (getComponents);\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-router/es/getComponents.js\n// module id = 1457\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-router/es/getComponents.js?', + ); + + /***/ + }, + /* 1458 */ + /* exports provided: default */ + /* exports used: default */ + /*!*********************************************!*\ + !*** ./~/react-router/es/getRouteParams.js ***! + \*********************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__PatternUtils__ = __webpack_require__(/*! ./PatternUtils */ 101);\n\n\n/**\n * Extracts an object of params the given route cares about from\n * the given params object.\n */\nfunction getRouteParams(route, params) {\n var routeParams = {};\n\n if (!route.path) return routeParams;\n\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__PatternUtils__["a" /* getParamNames */])(route.path).forEach(function (p) {\n if (Object.prototype.hasOwnProperty.call(params, p)) {\n routeParams[p] = params[p];\n }\n });\n\n return routeParams;\n}\n\n/* harmony default export */ __webpack_exports__["a"] = (getRouteParams);\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-router/es/getRouteParams.js\n// module id = 1458\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-router/es/getRouteParams.js?', + ); + + /***/ + }, + /* 1459 */ + /* exports provided: default */ + /*!******************************************!*\ + !*** ./~/react-router/es/hashHistory.js ***! + \******************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_createHashHistory__ = __webpack_require__(/*! history/lib/createHashHistory */ 1149);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_createHashHistory___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_history_lib_createHashHistory__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__createRouterHistory__ = __webpack_require__(/*! ./createRouterHistory */ 580);\n\n\n/* unused harmony default export */ var _unused_webpack_default_export = (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__createRouterHistory__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_0_history_lib_createHashHistory___default.a));\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-router/es/hashHistory.js\n// module id = 1459\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-router/es/hashHistory.js?', + ); + + /***/ + }, + /* 1460 */ + /* exports provided: default */ + /* exports used: default */ + /*!***************************************!*\ + !*** ./~/react-router/es/isActive.js ***! + \***************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__PatternUtils__ = __webpack_require__(/*! ./PatternUtils */ 101);\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = isActive;\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\n\n\nfunction deepEqual(a, b) {\n if (a == b) return true;\n\n if (a == null || b == null) return false;\n\n if (Array.isArray(a)) {\n return Array.isArray(b) && a.length === b.length && a.every(function (item, index) {\n return deepEqual(item, b[index]);\n });\n }\n\n if ((typeof a === 'undefined' ? 'undefined' : _typeof(a)) === 'object') {\n for (var p in a) {\n if (!Object.prototype.hasOwnProperty.call(a, p)) {\n continue;\n }\n\n if (a[p] === undefined) {\n if (b[p] !== undefined) {\n return false;\n }\n } else if (!Object.prototype.hasOwnProperty.call(b, p)) {\n return false;\n } else if (!deepEqual(a[p], b[p])) {\n return false;\n }\n }\n\n return true;\n }\n\n return String(a) === String(b);\n}\n\n/**\n * Returns true if the current pathname matches the supplied one, net of\n * leading and trailing slash normalization. This is sufficient for an\n * indexOnly route match.\n */\nfunction pathIsActive(pathname, currentPathname) {\n // Normalize leading slash for consistency. Leading slash on pathname has\n // already been normalized in isActive. See caveat there.\n if (currentPathname.charAt(0) !== '/') {\n currentPathname = '/' + currentPathname;\n }\n\n // Normalize the end of both path names too. Maybe `/foo/` shouldn't show\n // `/foo` as active, but in this case, we would already have failed the\n // match.\n if (pathname.charAt(pathname.length - 1) !== '/') {\n pathname += '/';\n }\n if (currentPathname.charAt(currentPathname.length - 1) !== '/') {\n currentPathname += '/';\n }\n\n return currentPathname === pathname;\n}\n\n/**\n * Returns true if the given pathname matches the active routes and params.\n */\nfunction routeIsActive(pathname, routes, params) {\n var remainingPathname = pathname,\n paramNames = [],\n paramValues = [];\n\n // for...of would work here but it's probably slower post-transpilation.\n for (var i = 0, len = routes.length; i < len; ++i) {\n var route = routes[i];\n var pattern = route.path || '';\n\n if (pattern.charAt(0) === '/') {\n remainingPathname = pathname;\n paramNames = [];\n paramValues = [];\n }\n\n if (remainingPathname !== null && pattern) {\n var matched = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__PatternUtils__[\"b\" /* matchPattern */])(pattern, remainingPathname);\n if (matched) {\n remainingPathname = matched.remainingPathname;\n paramNames = [].concat(paramNames, matched.paramNames);\n paramValues = [].concat(paramValues, matched.paramValues);\n } else {\n remainingPathname = null;\n }\n\n if (remainingPathname === '') {\n // We have an exact match on the route. Just check that all the params\n // match.\n // FIXME: This doesn't work on repeated params.\n return paramNames.every(function (paramName, index) {\n return String(paramValues[index]) === String(params[paramName]);\n });\n }\n }\n }\n\n return false;\n}\n\n/**\n * Returns true if all key/value pairs in the given query are\n * currently active.\n */\nfunction queryIsActive(query, activeQuery) {\n if (activeQuery == null) return query == null;\n\n if (query == null) return true;\n\n return deepEqual(query, activeQuery);\n}\n\n/**\n * Returns true if a <Link> to the given pathname/query combination is\n * currently active.\n */\nfunction isActive(_ref, indexOnly, currentLocation, routes, params) {\n var pathname = _ref.pathname,\n query = _ref.query;\n\n if (currentLocation == null) return false;\n\n // TODO: This is a bit ugly. It keeps around support for treating pathnames\n // without preceding slashes as absolute paths, but possibly also works\n // around the same quirks with basenames as in matchRoutes.\n if (pathname.charAt(0) !== '/') {\n pathname = '/' + pathname;\n }\n\n if (!pathIsActive(pathname, currentLocation.pathname)) {\n // The path check is necessary and sufficient for indexOnly, but otherwise\n // we still need to check the routes.\n if (indexOnly || !routeIsActive(pathname, routes, params)) {\n return false;\n }\n }\n\n return queryIsActive(query, currentLocation.query);\n}\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-router/es/isActive.js\n// module id = 1460\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-router/es/isActive.js?", + ); + + /***/ + }, + /* 1461 */ + /* exports provided: default */ + /* exports used: default */ + /*!************************************!*\ + !*** ./~/react-router/es/match.js ***! + \************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_Actions__ = __webpack_require__(/*! history/lib/Actions */ 159);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_Actions___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_history_lib_Actions__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(/*! invariant */ 25);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_invariant__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__createMemoryHistory__ = __webpack_require__(/*! ./createMemoryHistory */ 579);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__createTransitionManager__ = __webpack_require__(/*! ./createTransitionManager */ 581);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__RouteUtils__ = __webpack_require__(/*! ./RouteUtils */ 68);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__RouterUtils__ = __webpack_require__(/*! ./RouterUtils */ 578);\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\n\n\n\n\n\n\n\n\n/**\n * A high-level API to be used for server-side rendering.\n *\n * This function matches a location to a set of routes and calls\n * callback(error, redirectLocation, renderProps) when finished.\n *\n * Note: You probably don\'t want to use this in a browser unless you\'re using\n * server-side rendering with async routes.\n */\nfunction match(_ref, callback) {\n var history = _ref.history,\n routes = _ref.routes,\n location = _ref.location,\n options = _objectWithoutProperties(_ref, [\'history\', \'routes\', \'location\']);\n\n !(history || location) ? true ? __WEBPACK_IMPORTED_MODULE_1_invariant___default()(false, \'match needs a history or a location\') : invariant(false) : void 0;\n\n history = history ? history : __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__createMemoryHistory__["a" /* default */])(options);\n var transitionManager = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__createTransitionManager__["a" /* default */])(history, __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__RouteUtils__["b" /* createRoutes */])(routes));\n\n if (location) {\n // Allow match({ location: \'/the/path\', ... })\n location = history.createLocation(location);\n } else {\n location = history.getCurrentLocation();\n }\n\n transitionManager.match(location, function (error, redirectLocation, nextState) {\n var renderProps = void 0;\n\n if (nextState) {\n var router = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__RouterUtils__["a" /* createRouterObject */])(history, transitionManager, nextState);\n renderProps = _extends({}, nextState, {\n router: router,\n matchContext: { transitionManager: transitionManager, router: router }\n });\n }\n\n callback(error, redirectLocation && history.createLocation(redirectLocation, __WEBPACK_IMPORTED_MODULE_0_history_lib_Actions__["REPLACE"]), renderProps);\n });\n}\n\n/* harmony default export */ __webpack_exports__["a"] = (match);\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-router/es/match.js\n// module id = 1461\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-router/es/match.js?', + ); + + /***/ + }, + /* 1462 */ + /* exports provided: default */ + /* exports used: default */ + /*!******************************************!*\ + !*** ./~/react-router/es/matchRoutes.js ***! + \******************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__AsyncUtils__ = __webpack_require__(/*! ./AsyncUtils */ 266);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__PromiseUtils__ = __webpack_require__(/*! ./PromiseUtils */ 576);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__PatternUtils__ = __webpack_require__(/*! ./PatternUtils */ 101);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__routerWarning__ = __webpack_require__(/*! ./routerWarning */ 102);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__RouteUtils__ = __webpack_require__(/*! ./RouteUtils */ 68);\n/* harmony export (immutable) */ __webpack_exports__["a"] = matchRoutes;\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };\n\n\n\n\n\n\n\nfunction getChildRoutes(route, location, paramNames, paramValues, callback) {\n if (route.childRoutes) {\n return [null, route.childRoutes];\n }\n if (!route.getChildRoutes) {\n return [];\n }\n\n var sync = true,\n result = void 0;\n\n var partialNextState = {\n location: location,\n params: createParams(paramNames, paramValues)\n };\n\n var childRoutesReturn = route.getChildRoutes(partialNextState, function (error, childRoutes) {\n childRoutes = !error && __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__RouteUtils__["b" /* createRoutes */])(childRoutes);\n if (sync) {\n result = [error, childRoutes];\n return;\n }\n\n callback(error, childRoutes);\n });\n\n if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__PromiseUtils__["a" /* isPromise */])(childRoutesReturn)) childRoutesReturn.then(function (childRoutes) {\n return callback(null, __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__RouteUtils__["b" /* createRoutes */])(childRoutes));\n }, callback);\n\n sync = false;\n return result; // Might be undefined.\n}\n\nfunction getIndexRoute(route, location, paramNames, paramValues, callback) {\n if (route.indexRoute) {\n callback(null, route.indexRoute);\n } else if (route.getIndexRoute) {\n var partialNextState = {\n location: location,\n params: createParams(paramNames, paramValues)\n };\n\n var indexRoutesReturn = route.getIndexRoute(partialNextState, function (error, indexRoute) {\n callback(error, !error && __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__RouteUtils__["b" /* createRoutes */])(indexRoute)[0]);\n });\n\n if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__PromiseUtils__["a" /* isPromise */])(indexRoutesReturn)) indexRoutesReturn.then(function (indexRoute) {\n return callback(null, __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__RouteUtils__["b" /* createRoutes */])(indexRoute)[0]);\n }, callback);\n } else if (route.childRoutes || route.getChildRoutes) {\n var onChildRoutes = function onChildRoutes(error, childRoutes) {\n if (error) {\n callback(error);\n return;\n }\n\n var pathless = childRoutes.filter(function (childRoute) {\n return !childRoute.path;\n });\n\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__AsyncUtils__["b" /* loopAsync */])(pathless.length, function (index, next, done) {\n getIndexRoute(pathless[index], location, paramNames, paramValues, function (error, indexRoute) {\n if (error || indexRoute) {\n var routes = [pathless[index]].concat(Array.isArray(indexRoute) ? indexRoute : [indexRoute]);\n done(error, routes);\n } else {\n next();\n }\n });\n }, function (err, routes) {\n callback(null, routes);\n });\n };\n\n var result = getChildRoutes(route, location, paramNames, paramValues, onChildRoutes);\n if (result) {\n onChildRoutes.apply(undefined, result);\n }\n } else {\n callback();\n }\n}\n\nfunction assignParams(params, paramNames, paramValues) {\n return paramNames.reduce(function (params, paramName, index) {\n var paramValue = paramValues && paramValues[index];\n\n if (Array.isArray(params[paramName])) {\n params[paramName].push(paramValue);\n } else if (paramName in params) {\n params[paramName] = [params[paramName], paramValue];\n } else {\n params[paramName] = paramValue;\n }\n\n return params;\n }, params);\n}\n\nfunction createParams(paramNames, paramValues) {\n return assignParams({}, paramNames, paramValues);\n}\n\nfunction matchRouteDeep(route, location, remainingPathname, paramNames, paramValues, callback) {\n var pattern = route.path || \'\';\n\n if (pattern.charAt(0) === \'/\') {\n remainingPathname = location.pathname;\n paramNames = [];\n paramValues = [];\n }\n\n // Only try to match the path if the route actually has a pattern, and if\n // we\'re not just searching for potential nested absolute paths.\n if (remainingPathname !== null && pattern) {\n try {\n var matched = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__PatternUtils__["b" /* matchPattern */])(pattern, remainingPathname);\n if (matched) {\n remainingPathname = matched.remainingPathname;\n paramNames = [].concat(paramNames, matched.paramNames);\n paramValues = [].concat(paramValues, matched.paramValues);\n } else {\n remainingPathname = null;\n }\n } catch (error) {\n callback(error);\n }\n\n // By assumption, pattern is non-empty here, which is the prerequisite for\n // actually terminating a match.\n if (remainingPathname === \'\') {\n var _ret = function () {\n var match = {\n routes: [route],\n params: createParams(paramNames, paramValues)\n };\n\n getIndexRoute(route, location, paramNames, paramValues, function (error, indexRoute) {\n if (error) {\n callback(error);\n } else {\n if (Array.isArray(indexRoute)) {\n var _match$routes;\n\n true ? __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__routerWarning__["a" /* default */])(indexRoute.every(function (route) {\n return !route.path;\n }), \'Index routes should not have paths\') : void 0;\n (_match$routes = match.routes).push.apply(_match$routes, indexRoute);\n } else if (indexRoute) {\n true ? __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__routerWarning__["a" /* default */])(!indexRoute.path, \'Index routes should not have paths\') : void 0;\n match.routes.push(indexRoute);\n }\n\n callback(null, match);\n }\n });\n\n return {\n v: void 0\n };\n }();\n\n if ((typeof _ret === \'undefined\' ? \'undefined\' : _typeof(_ret)) === "object") return _ret.v;\n }\n }\n\n if (remainingPathname != null || route.childRoutes) {\n // Either a) this route matched at least some of the path or b)\n // we don\'t have to load this route\'s children asynchronously. In\n // either case continue checking for matches in the subtree.\n var onChildRoutes = function onChildRoutes(error, childRoutes) {\n if (error) {\n callback(error);\n } else if (childRoutes) {\n // Check the child routes to see if any of them match.\n matchRoutes(childRoutes, location, function (error, match) {\n if (error) {\n callback(error);\n } else if (match) {\n // A child route matched! Augment the match and pass it up the stack.\n match.routes.unshift(route);\n callback(null, match);\n } else {\n callback();\n }\n }, remainingPathname, paramNames, paramValues);\n } else {\n callback();\n }\n };\n\n var result = getChildRoutes(route, location, paramNames, paramValues, onChildRoutes);\n if (result) {\n onChildRoutes.apply(undefined, result);\n }\n } else {\n callback();\n }\n}\n\n/**\n * Asynchronously matches the given location to a set of routes and calls\n * callback(error, state) when finished. The state object will have the\n * following properties:\n *\n * - routes An array of routes that matched, in hierarchical order\n * - params An object of URL parameters\n *\n * Note: This operation may finish synchronously if no routes have an\n * asynchronous getChildRoutes method.\n */\nfunction matchRoutes(routes, location, callback, remainingPathname) {\n var paramNames = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : [];\n var paramValues = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : [];\n\n if (remainingPathname === undefined) {\n // TODO: This is a little bit ugly, but it works around a quirk in history\n // that strips the leading slash from pathnames when using basenames with\n // trailing slashes.\n if (location.pathname.charAt(0) !== \'/\') {\n location = _extends({}, location, {\n pathname: \'/\' + location.pathname\n });\n }\n remainingPathname = location.pathname;\n }\n\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__AsyncUtils__["b" /* loopAsync */])(routes.length, function (index, next, done) {\n matchRouteDeep(routes[index], location, remainingPathname, paramNames, paramValues, function (error, match) {\n if (error || match) {\n done(error, match);\n } else {\n next();\n }\n });\n }, callback);\n}\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-router/es/matchRoutes.js\n// module id = 1462\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-router/es/matchRoutes.js?', + ); + + /***/ + }, + /* 1463 */ + /* exports provided: default */ + /*!*****************************************!*\ + !*** ./~/react-router/es/withRouter.js ***! + \*****************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant__ = __webpack_require__(/*! invariant */ 25);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_invariant__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_hoist_non_react_statics__ = __webpack_require__(/*! hoist-non-react-statics */ 217);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_hoist_non_react_statics___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_hoist_non_react_statics__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__ContextUtils__ = __webpack_require__(/*! ./ContextUtils */ 267);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__PropTypes__ = __webpack_require__(/*! ./PropTypes */ 268);\n/* unused harmony export default */\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\n\n\n\n\n\n\nfunction getDisplayName(WrappedComponent) {\n return WrappedComponent.displayName || WrappedComponent.name || 'Component';\n}\n\nfunction withRouter(WrappedComponent, options) {\n var withRef = options && options.withRef;\n\n var WithRouter = __WEBPACK_IMPORTED_MODULE_1_react___default.a.createClass({\n displayName: 'WithRouter',\n\n mixins: [__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__ContextUtils__[\"b\" /* ContextSubscriber */])('router')],\n\n contextTypes: { router: __WEBPACK_IMPORTED_MODULE_4__PropTypes__[\"a\" /* routerShape */] },\n propTypes: { router: __WEBPACK_IMPORTED_MODULE_4__PropTypes__[\"a\" /* routerShape */] },\n\n getWrappedInstance: function getWrappedInstance() {\n !withRef ? true ? __WEBPACK_IMPORTED_MODULE_0_invariant___default()(false, 'To access the wrapped instance, you need to specify ' + '`{ withRef: true }` as the second argument of the withRouter() call.') : invariant(false) : void 0;\n\n return this.wrappedInstance;\n },\n render: function render() {\n var _this = this;\n\n var router = this.props.router || this.context.router;\n if (!router) {\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(WrappedComponent, this.props);\n }\n\n var params = router.params,\n location = router.location,\n routes = router.routes;\n\n var props = _extends({}, this.props, { router: router, params: params, location: location, routes: routes });\n\n if (withRef) {\n props.ref = function (c) {\n _this.wrappedInstance = c;\n };\n }\n\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(WrappedComponent, props);\n }\n });\n\n WithRouter.displayName = 'withRouter(' + getDisplayName(WrappedComponent) + ')';\n WithRouter.WrappedComponent = WrappedComponent;\n\n return __WEBPACK_IMPORTED_MODULE_2_hoist_non_react_statics___default()(WithRouter, WrappedComponent);\n}\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-router/es/withRouter.js\n// module id = 1463\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-router/es/withRouter.js?", + ); + + /***/ + }, + /* 1464 */ + /* unknown exports provided */ + /* exports used: default */ + /*!***********************************************************!*\ + !*** ./~/react-textarea-autosize/lib/TextareaAutosize.js ***! + \***********************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = undefined;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol ? \"symbol\" : typeof obj; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _class, _temp; /**\n * <TextareaAutosize />\n */\n\nvar _react = __webpack_require__(/*! react */ 1);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _calculateNodeHeight = __webpack_require__(/*! ./calculateNodeHeight */ 1465);\n\nvar _calculateNodeHeight2 = _interopRequireDefault(_calculateNodeHeight);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar emptyFunction = function emptyFunction() {};\n\nvar TextareaAutosize = (_temp = _class = function (_React$Component) {\n _inherits(TextareaAutosize, _React$Component);\n\n function TextareaAutosize(props) {\n _classCallCheck(this, TextareaAutosize);\n\n var _this = _possibleConstructorReturn(this, (TextareaAutosize.__proto__ || Object.getPrototypeOf(TextareaAutosize)).call(this, props));\n\n _this.state = {\n height: null,\n minHeight: -Infinity,\n maxHeight: Infinity\n };\n _this._onNextFrameActionId = null;\n _this._rootDOMNode = null;\n _this._onChange = _this._onChange.bind(_this);\n _this._resizeComponent = _this._resizeComponent.bind(_this);\n _this._onRootDOMNode = _this._onRootDOMNode.bind(_this);\n return _this;\n }\n\n _createClass(TextareaAutosize, [{\n key: 'render',\n value: function render() {\n var _props = this.props;\n var valueLink = _props.valueLink;\n var _minRows = _props.minRows;\n var _maxRows = _props.maxRows;\n var _onHeightChange = _props.onHeightChange;\n var _useCacheForDOMMeasurements = _props.useCacheForDOMMeasurements;\n\n var props = _objectWithoutProperties(_props, ['valueLink', 'minRows', 'maxRows', 'onHeightChange', 'useCacheForDOMMeasurements']);\n\n if ((typeof valueLink === 'undefined' ? 'undefined' : _typeof(valueLink)) === 'object') {\n props.value = valueLink.value;\n }\n props.style = _extends({}, props.style, {\n height: this.state.height || 0\n });\n var maxHeight = Math.max(props.style.maxHeight ? props.style.maxHeight : Infinity, this.state.maxHeight);\n if (maxHeight < this.state.height) {\n props.style.overflow = 'hidden';\n }\n return _react2.default.createElement('textarea', _extends({}, props, {\n onChange: this._onChange,\n ref: this._onRootDOMNode\n }));\n }\n }, {\n key: 'componentDidMount',\n value: function componentDidMount() {\n this._resizeComponent();\n window.addEventListener('resize', this._resizeComponent);\n }\n }, {\n key: 'componentWillReceiveProps',\n value: function componentWillReceiveProps() {\n // Re-render with the new content then recalculate the height as required.\n this._clearNextFrame();\n this._onNextFrameActionId = onNextFrame(this._resizeComponent);\n }\n }, {\n key: 'componentDidUpdate',\n value: function componentDidUpdate(prevProps, prevState) {\n // Invoke callback when old height does not equal to new one.\n if (this.state.height !== prevState.height) {\n this.props.onHeightChange(this.state.height);\n }\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n // Remove any scheduled events to prevent manipulating the node after it's\n // been unmounted.\n this._clearNextFrame();\n window.removeEventListener('resize', this._resizeComponent);\n }\n }, {\n key: '_clearNextFrame',\n value: function _clearNextFrame() {\n if (this._onNextFrameActionId) {\n clearNextFrameAction(this._onNextFrameActionId);\n }\n }\n }, {\n key: '_onRootDOMNode',\n value: function _onRootDOMNode(node) {\n this._rootDOMNode = node;\n }\n }, {\n key: '_onChange',\n value: function _onChange(e) {\n this._resizeComponent();\n var _props2 = this.props;\n var valueLink = _props2.valueLink;\n var onChange = _props2.onChange;\n\n if (valueLink) {\n valueLink.requestChange(e.target.value);\n } else {\n onChange(e);\n }\n }\n }, {\n key: '_resizeComponent',\n value: function _resizeComponent() {\n var useCacheForDOMMeasurements = this.props.useCacheForDOMMeasurements;\n\n this.setState((0, _calculateNodeHeight2.default)(this._rootDOMNode, useCacheForDOMMeasurements, this.props.rows || this.props.minRows, this.props.maxRows));\n }\n\n /**\n * Read the current value of <textarea /> from DOM.\n */\n\n }, {\n key: 'focus',\n\n\n /**\n * Put focus on a <textarea /> DOM element.\n */\n value: function focus() {\n this._rootDOMNode.focus();\n }\n\n /**\n * Shifts focus away from a <textarea /> DOM element.\n */\n\n }, {\n key: 'blur',\n value: function blur() {\n this._rootDOMNode.blur();\n }\n }, {\n key: 'value',\n get: function get() {\n return this._rootDOMNode.value;\n }\n\n /**\n * Set the current value of <textarea /> DOM node.\n */\n ,\n set: function set(val) {\n this._rootDOMNode.value = val;\n }\n\n /**\n * Read the current selectionStart of <textarea /> from DOM.\n */\n\n }, {\n key: 'selectionStart',\n get: function get() {\n return this._rootDOMNode.selectionStart;\n }\n\n /**\n * Set the current selectionStart of <textarea /> DOM node.\n */\n ,\n set: function set(selectionStart) {\n this._rootDOMNode.selectionStart = selectionStart;\n }\n\n /**\n * Read the current selectionEnd of <textarea /> from DOM.\n */\n\n }, {\n key: 'selectionEnd',\n get: function get() {\n return this._rootDOMNode.selectionEnd;\n }\n\n /**\n * Set the current selectionEnd of <textarea /> DOM node.\n */\n ,\n set: function set(selectionEnd) {\n this._rootDOMNode.selectionEnd = selectionEnd;\n }\n }]);\n\n return TextareaAutosize;\n}(_react2.default.Component), _class.propTypes = {\n /**\n * Current textarea value.\n */\n value: _react2.default.PropTypes.string,\n\n /**\n * Callback on value change.\n */\n onChange: _react2.default.PropTypes.func,\n\n /**\n * Callback on height changes.\n */\n onHeightChange: _react2.default.PropTypes.func,\n\n /**\n * Try to cache DOM measurements performed by component so that we don't\n * touch DOM when it's not needed.\n *\n * This optimization doesn't work if we dynamically style <textarea />\n * component.\n */\n useCacheForDOMMeasurements: _react2.default.PropTypes.bool,\n\n /**\n * Minimal numbder of rows to show.\n */\n rows: _react2.default.PropTypes.number,\n\n /**\n * Alias for `rows`.\n */\n minRows: _react2.default.PropTypes.number,\n\n /**\n * Maximum number of rows to show.\n */\n maxRows: _react2.default.PropTypes.number\n}, _class.defaultProps = {\n onChange: emptyFunction,\n onHeightChange: emptyFunction,\n useCacheForDOMMeasurements: false\n}, _temp);\nexports.default = TextareaAutosize;\n\n\nfunction onNextFrame(cb) {\n if (window.requestAnimationFrame) {\n return window.requestAnimationFrame(cb);\n }\n return window.setTimeout(cb, 1);\n}\n\nfunction clearNextFrameAction(nextFrameId) {\n if (window.cancelAnimationFrame) {\n window.cancelAnimationFrame(nextFrameId);\n } else {\n window.clearTimeout(nextFrameId);\n }\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-textarea-autosize/lib/TextareaAutosize.js\n// module id = 1464\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-textarea-autosize/lib/TextareaAutosize.js?", + ); + + /***/ + }, + /* 1465 */ + /* unknown exports provided */ + /* all exports used */ + /*!**************************************************************!*\ + !*** ./~/react-textarea-autosize/lib/calculateNodeHeight.js ***! + \**************************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = calculateNodeHeight;\n/**\n * calculateNodeHeight(uiTextNode, useCache = false)\n */\n\nvar HIDDEN_TEXTAREA_STYLE = '\\n min-height:0 !important;\\n max-height:none !important;\\n height:0 !important;\\n visibility:hidden !important;\\n overflow:hidden !important;\\n position:absolute !important;\\n z-index:-1000 !important;\\n top:0 !important;\\n right:0 !important\\n';\n\nvar SIZING_STYLE = ['letter-spacing', 'line-height', 'padding-top', 'padding-bottom', 'font-family', 'font-weight', 'font-size', 'text-rendering', 'text-transform', 'width', 'text-indent', 'padding-left', 'padding-right', 'border-width', 'box-sizing'];\n\nvar computedStyleCache = {};\nvar hiddenTextarea = void 0;\n\nfunction calculateNodeHeight(uiTextNode) {\n var useCache = arguments.length <= 1 || arguments[1] === undefined ? false : arguments[1];\n var minRows = arguments.length <= 2 || arguments[2] === undefined ? null : arguments[2];\n var maxRows = arguments.length <= 3 || arguments[3] === undefined ? null : arguments[3];\n\n if (!hiddenTextarea) {\n hiddenTextarea = document.createElement('textarea');\n document.body.appendChild(hiddenTextarea);\n }\n\n // Copy all CSS properties that have an impact on the height of the content in\n // the textbox\n\n var _calculateNodeStyling = calculateNodeStyling(uiTextNode, useCache);\n\n var paddingSize = _calculateNodeStyling.paddingSize;\n var borderSize = _calculateNodeStyling.borderSize;\n var boxSizing = _calculateNodeStyling.boxSizing;\n var sizingStyle = _calculateNodeStyling.sizingStyle;\n\n // Need to have the overflow attribute to hide the scrollbar otherwise\n // text-lines will not calculated properly as the shadow will technically be\n // narrower for content\n\n hiddenTextarea.setAttribute('style', sizingStyle + ';' + HIDDEN_TEXTAREA_STYLE);\n hiddenTextarea.value = uiTextNode.value || uiTextNode.placeholder || 'x';\n\n var minHeight = -Infinity;\n var maxHeight = Infinity;\n var height = hiddenTextarea.scrollHeight;\n\n if (boxSizing === 'border-box') {\n // border-box: add border, since height = content + padding + border\n height = height + borderSize;\n } else if (boxSizing === 'content-box') {\n // remove padding, since height = content\n height = height - paddingSize;\n }\n\n if (minRows !== null || maxRows !== null) {\n // measure height of a textarea with a single row\n hiddenTextarea.value = 'x';\n var singleRowHeight = hiddenTextarea.scrollHeight - paddingSize;\n if (minRows !== null) {\n minHeight = singleRowHeight * minRows;\n if (boxSizing === 'border-box') {\n minHeight = minHeight + paddingSize + borderSize;\n }\n height = Math.max(minHeight, height);\n }\n if (maxRows !== null) {\n maxHeight = singleRowHeight * maxRows;\n if (boxSizing === 'border-box') {\n maxHeight = maxHeight + paddingSize + borderSize;\n }\n height = Math.min(maxHeight, height);\n }\n }\n return { height: height, minHeight: minHeight, maxHeight: maxHeight };\n}\n\nfunction calculateNodeStyling(node) {\n var useCache = arguments.length <= 1 || arguments[1] === undefined ? false : arguments[1];\n\n var nodeRef = node.getAttribute('id') || node.getAttribute('data-reactid') || node.getAttribute('name');\n\n if (useCache && computedStyleCache[nodeRef]) {\n return computedStyleCache[nodeRef];\n }\n\n var style = window.getComputedStyle(node);\n\n var boxSizing = style.getPropertyValue('box-sizing') || style.getPropertyValue('-moz-box-sizing') || style.getPropertyValue('-webkit-box-sizing');\n\n var paddingSize = parseFloat(style.getPropertyValue('padding-bottom')) + parseFloat(style.getPropertyValue('padding-top'));\n\n var borderSize = parseFloat(style.getPropertyValue('border-bottom-width')) + parseFloat(style.getPropertyValue('border-top-width'));\n\n var sizingStyle = SIZING_STYLE.map(function (name) {\n return name + ':' + style.getPropertyValue(name);\n }).join(';');\n\n var nodeInfo = {\n sizingStyle: sizingStyle,\n paddingSize: paddingSize,\n borderSize: borderSize,\n boxSizing: boxSizing\n };\n\n if (useCache && nodeRef) {\n computedStyleCache[nodeRef] = nodeInfo;\n }\n\n return nodeInfo;\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-textarea-autosize/lib/calculateNodeHeight.js\n// module id = 1465\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-textarea-autosize/lib/calculateNodeHeight.js?", + ); + + /***/ + }, + /* 1466 */ + /* unknown exports provided */ + /* all exports used */ + /*!************************************************!*\ + !*** ./~/react-toggle/dist/component/check.js ***! + \************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _react = __webpack_require__(/*! react */ 1);\n\nvar _react2 = _interopRequireDefault(_react);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = function () {\n return _react2.default.createElement(\n 'svg',\n { width: '14', height: '11', viewBox: '0 0 14 11' },\n _react2.default.createElement(\n 'title',\n null,\n 'switch-check'\n ),\n _react2.default.createElement('path', { d: 'M11.264 0L5.26 6.004 2.103 2.847 0 4.95l5.26 5.26 8.108-8.107L11.264 0', fill: '#fff', fillRule: 'evenodd' })\n );\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-toggle/dist/component/check.js\n// module id = 1466\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-toggle/dist/component/check.js?", + ); + + /***/ + }, + /* 1467 */ + /* unknown exports provided */ + /* exports used: default */ + /*!************************************************!*\ + !*** ./~/react-toggle/dist/component/index.js ***! + \************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(/*! react */ 1);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _classnames = __webpack_require__(/*! classnames */ 2);\n\nvar _classnames2 = _interopRequireDefault(_classnames);\n\nvar _check = __webpack_require__(/*! ./check */ 1466);\n\nvar _check2 = _interopRequireDefault(_check);\n\nvar _x = __webpack_require__(/*! ./x */ 1469);\n\nvar _x2 = _interopRequireDefault(_x);\n\nvar _util = __webpack_require__(/*! ./util */ 1468);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Toggle = function (_PureComponent) {\n _inherits(Toggle, _PureComponent);\n\n function Toggle(props) {\n _classCallCheck(this, Toggle);\n\n var _this = _possibleConstructorReturn(this, (Toggle.__proto__ || Object.getPrototypeOf(Toggle)).call(this, props));\n\n _this.handleClick = _this.handleClick.bind(_this);\n _this.handleTouchStart = _this.handleTouchStart.bind(_this);\n _this.handleTouchMove = _this.handleTouchMove.bind(_this);\n _this.handleTouchEnd = _this.handleTouchEnd.bind(_this);\n _this.handleFocus = _this.setState.bind(_this, { hasFocus: true }, function () {});\n _this.handleBlur = _this.setState.bind(_this, { hasFocus: false }, function () {});\n _this.previouslyChecked = !!(props.checked || props.defaultChecked);\n _this.state = {\n checked: !!(props.checked || props.defaultChecked),\n hasFocus: false\n };\n return _this;\n }\n\n _createClass(Toggle, [{\n key: 'componentWillReceiveProps',\n value: function componentWillReceiveProps(nextProps) {\n if ('checked' in nextProps) {\n this.setState({ checked: !!nextProps.checked });\n }\n }\n }, {\n key: 'handleClick',\n value: function handleClick(event) {\n var checkbox = this.input;\n if (event.target !== checkbox && !this.moved) {\n this.previouslyChecked = checkbox.checked;\n event.preventDefault();\n checkbox.focus();\n checkbox.click();\n return;\n }\n\n this.setState({ checked: checkbox.checked });\n }\n }, {\n key: 'handleTouchStart',\n value: function handleTouchStart(event) {\n this.startX = (0, _util.pointerCoord)(event).x;\n this.activated = true;\n }\n }, {\n key: 'handleTouchMove',\n value: function handleTouchMove(event) {\n if (!this.activated) return;\n this.moved = true;\n\n if (this.startX) {\n var currentX = (0, _util.pointerCoord)(event).x;\n if (this.state.checked && currentX + 15 < this.startX) {\n this.setState({ checked: false });\n this.startX = currentX;\n this.activated = true;\n } else if (currentX - 15 > this.startX) {\n this.setState({ checked: true });\n this.startX = currentX;\n this.activated = currentX < this.startX + 5;\n }\n }\n }\n }, {\n key: 'handleTouchEnd',\n value: function handleTouchEnd(event) {\n if (!this.moved) return;\n var checkbox = this.input;\n event.preventDefault();\n\n if (this.startX) {\n var endX = (0, _util.pointerCoord)(event).x;\n if (this.previouslyChecked === true && this.startX + 4 > endX) {\n if (this.previouslyChecked !== this.state.checked) {\n this.setState({ checked: false });\n this.previouslyChecked = this.state.checked;\n checkbox.click();\n }\n } else if (this.startX - 4 < endX) {\n if (this.previouslyChecked !== this.state.checked) {\n this.setState({ checked: true });\n this.previouslyChecked = this.state.checked;\n checkbox.click();\n }\n }\n\n this.activated = false;\n this.startX = null;\n this.moved = false;\n }\n }\n }, {\n key: 'getIcon',\n value: function getIcon(type) {\n var icons = this.props.icons;\n\n if (!icons) {\n return null;\n }\n return icons[type] === undefined ? Toggle.defaultProps.icons[type] : icons[type];\n }\n }, {\n key: 'render',\n value: function render() {\n var _this2 = this;\n\n var _props = this.props;\n var className = _props.className;\n var _icons = _props.icons;\n\n var inputProps = _objectWithoutProperties(_props, ['className', 'icons']);\n\n var classes = (0, _classnames2.default)('react-toggle', {\n 'react-toggle--checked': this.state.checked,\n 'react-toggle--focus': this.state.hasFocus,\n 'react-toggle--disabled': this.props.disabled\n }, className);\n\n return _react2.default.createElement(\n 'div',\n { className: classes,\n onClick: this.handleClick,\n onTouchStart: this.handleTouchStart,\n onTouchMove: this.handleTouchMove,\n onTouchEnd: this.handleTouchEnd },\n _react2.default.createElement(\n 'div',\n { className: 'react-toggle-track' },\n _react2.default.createElement(\n 'div',\n { className: 'react-toggle-track-check' },\n this.getIcon('checked')\n ),\n _react2.default.createElement(\n 'div',\n { className: 'react-toggle-track-x' },\n this.getIcon('unchecked')\n )\n ),\n _react2.default.createElement('div', { className: 'react-toggle-thumb' }),\n _react2.default.createElement('input', _extends({}, inputProps, {\n ref: function ref(_ref) {\n _this2.input = _ref;\n },\n onFocus: this.handleFocus,\n onBlur: this.handleBlur,\n className: 'react-toggle-screenreader-only',\n type: 'checkbox' }))\n );\n }\n }]);\n\n return Toggle;\n}(_react.PureComponent);\n\nexports.default = Toggle;\n\n\nToggle.displayName = 'Toggle';\n\nToggle.defaultProps = {\n icons: {\n checked: _react2.default.createElement(_check2.default, null),\n unchecked: _react2.default.createElement(_x2.default, null)\n }\n};\n\nToggle.propTypes = {\n checked: _react.PropTypes.bool,\n disabled: _react.PropTypes.bool,\n defaultChecked: _react.PropTypes.bool,\n onChange: _react.PropTypes.func,\n className: _react.PropTypes.string,\n name: _react.PropTypes.string,\n value: _react.PropTypes.string,\n id: _react.PropTypes.string,\n 'aria-labelledby': _react.PropTypes.string,\n 'aria-label': _react.PropTypes.string,\n icons: _react.PropTypes.oneOfType([_react.PropTypes.bool, _react.PropTypes.shape({\n checked: _react.PropTypes.node,\n unchecked: _react.PropTypes.node\n })])\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-toggle/dist/component/index.js\n// module id = 1467\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-toggle/dist/component/index.js?", + ); + + /***/ + }, + /* 1468 */ + /* unknown exports provided */ + /* all exports used */ + /*!***********************************************!*\ + !*** ./~/react-toggle/dist/component/util.js ***! + \***********************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.pointerCoord = pointerCoord;\n// Copyright 2015-present Drifty Co.\n// http://drifty.com/\n// from: https://github.com/driftyco/ionic/blob/master/src/util/dom.ts\n\nfunction pointerCoord(event) {\n // get coordinates for either a mouse click\n // or a touch depending on the given event\n if (event) {\n var changedTouches = event.changedTouches;\n if (changedTouches && changedTouches.length > 0) {\n var touch = changedTouches[0];\n return { x: touch.clientX, y: touch.clientY };\n }\n var pageX = event.pageX;\n if (pageX !== undefined) {\n return { x: pageX, y: event.pageY };\n }\n }\n return { x: 0, y: 0 };\n}\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-toggle/dist/component/util.js\n// module id = 1468\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-toggle/dist/component/util.js?', + ); + + /***/ + }, + /* 1469 */ + /* unknown exports provided */ + /* all exports used */ + /*!********************************************!*\ + !*** ./~/react-toggle/dist/component/x.js ***! + \********************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _react = __webpack_require__(/*! react */ 1);\n\nvar _react2 = _interopRequireDefault(_react);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = function () {\n return _react2.default.createElement(\n 'svg',\n { width: '10', height: '10', viewBox: '0 0 10 10' },\n _react2.default.createElement(\n 'title',\n null,\n 'switch-x'\n ),\n _react2.default.createElement('path', { d: 'M9.9 2.12L7.78 0 4.95 2.828 2.12 0 0 2.12l2.83 2.83L0 7.776 2.123 9.9 4.95 7.07 7.78 9.9 9.9 7.776 7.072 4.95 9.9 2.12', fill: '#fff', fillRule: 'evenodd' })\n );\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react-toggle/dist/component/x.js\n// module id = 1469\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react-toggle/dist/component/x.js?", + ); + + /***/ + }, + /* 1470 */ + /* unknown exports provided */ + /* all exports used */ + /*!***************************************!*\ + !*** ./~/react/lib/KeyEscapeUtils.js ***! + \***************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * \n */\n\n\n\n/**\n * Escape and wrap key so it is safe to use as a reactid\n *\n * @param {string} key to be escaped.\n * @return {string} the escaped key.\n */\n\nfunction escape(key) {\n var escapeRegex = /[=:]/g;\n var escaperLookup = {\n '=': '=0',\n ':': '=2'\n };\n var escapedString = ('' + key).replace(escapeRegex, function (match) {\n return escaperLookup[match];\n });\n\n return '$' + escapedString;\n}\n\n/**\n * Unescape and unwrap key for human-readable display\n *\n * @param {string} key to unescape.\n * @return {string} the unescaped key.\n */\nfunction unescape(key) {\n var unescapeRegex = /(=0|=2)/g;\n var unescaperLookup = {\n '=0': '=',\n '=2': ':'\n };\n var keySubstring = key[0] === '.' && key[1] === '$' ? key.substring(2) : key.substring(1);\n\n return ('' + keySubstring).replace(unescapeRegex, function (match) {\n return unescaperLookup[match];\n });\n}\n\nvar KeyEscapeUtils = {\n escape: escape,\n unescape: unescape\n};\n\nmodule.exports = KeyEscapeUtils;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react/lib/KeyEscapeUtils.js\n// module id = 1470\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react/lib/KeyEscapeUtils.js?", + ); + + /***/ + }, + /* 1471 */ + /* unknown exports provided */ + /* all exports used */ + /*!************************************!*\ + !*** ./~/react/lib/PooledClass.js ***! + \************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * \n */\n\n\n\nvar _prodInvariant = __webpack_require__(/*! ./reactProdInvariant */ 85);\n\nvar invariant = __webpack_require__(/*! fbjs/lib/invariant */ 12);\n\n/**\n * Static poolers. Several custom versions for each potential number of\n * arguments. A completely generic pooler is easy to implement, but would\n * require accessing the `arguments` object. In each of these, `this` refers to\n * the Class itself, not an instance. If any others are needed, simply add them\n * here, or in their own files.\n */\nvar oneArgumentPooler = function (copyFieldsFrom) {\n var Klass = this;\n if (Klass.instancePool.length) {\n var instance = Klass.instancePool.pop();\n Klass.call(instance, copyFieldsFrom);\n return instance;\n } else {\n return new Klass(copyFieldsFrom);\n }\n};\n\nvar twoArgumentPooler = function (a1, a2) {\n var Klass = this;\n if (Klass.instancePool.length) {\n var instance = Klass.instancePool.pop();\n Klass.call(instance, a1, a2);\n return instance;\n } else {\n return new Klass(a1, a2);\n }\n};\n\nvar threeArgumentPooler = function (a1, a2, a3) {\n var Klass = this;\n if (Klass.instancePool.length) {\n var instance = Klass.instancePool.pop();\n Klass.call(instance, a1, a2, a3);\n return instance;\n } else {\n return new Klass(a1, a2, a3);\n }\n};\n\nvar fourArgumentPooler = function (a1, a2, a3, a4) {\n var Klass = this;\n if (Klass.instancePool.length) {\n var instance = Klass.instancePool.pop();\n Klass.call(instance, a1, a2, a3, a4);\n return instance;\n } else {\n return new Klass(a1, a2, a3, a4);\n }\n};\n\nvar standardReleaser = function (instance) {\n var Klass = this;\n !(instance instanceof Klass) ? true ? invariant(false, 'Trying to release an instance into a pool of a different type.') : _prodInvariant('25') : void 0;\n instance.destructor();\n if (Klass.instancePool.length < Klass.poolSize) {\n Klass.instancePool.push(instance);\n }\n};\n\nvar DEFAULT_POOL_SIZE = 10;\nvar DEFAULT_POOLER = oneArgumentPooler;\n\n/**\n * Augments `CopyConstructor` to be a poolable class, augmenting only the class\n * itself (statically) not adding any prototypical fields. Any CopyConstructor\n * you give this may have a `poolSize` property, and will look for a\n * prototypical `destructor` on instances.\n *\n * @param {Function} CopyConstructor Constructor that can be used to reset.\n * @param {Function} pooler Customizable pooler.\n */\nvar addPoolingTo = function (CopyConstructor, pooler) {\n // Casting as any so that flow ignores the actual implementation and trusts\n // it to match the type we declared\n var NewKlass = CopyConstructor;\n NewKlass.instancePool = [];\n NewKlass.getPooled = pooler || DEFAULT_POOLER;\n if (!NewKlass.poolSize) {\n NewKlass.poolSize = DEFAULT_POOL_SIZE;\n }\n NewKlass.release = standardReleaser;\n return NewKlass;\n};\n\nvar PooledClass = {\n addPoolingTo: addPoolingTo,\n oneArgumentPooler: oneArgumentPooler,\n twoArgumentPooler: twoArgumentPooler,\n threeArgumentPooler: threeArgumentPooler,\n fourArgumentPooler: fourArgumentPooler\n};\n\nmodule.exports = PooledClass;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react/lib/PooledClass.js\n// module id = 1471\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react/lib/PooledClass.js?", + ); + + /***/ + }, + /* 1472 */ + /* unknown exports provided */ + /* all exports used */ + /*!**************************************!*\ + !*** ./~/react/lib/ReactChildren.js ***! + \**************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar PooledClass = __webpack_require__(/*! ./PooledClass */ 1471);\nvar ReactElement = __webpack_require__(/*! ./ReactElement */ 84);\n\nvar emptyFunction = __webpack_require__(/*! fbjs/lib/emptyFunction */ 40);\nvar traverseAllChildren = __webpack_require__(/*! ./traverseAllChildren */ 1480);\n\nvar twoArgumentPooler = PooledClass.twoArgumentPooler;\nvar fourArgumentPooler = PooledClass.fourArgumentPooler;\n\nvar userProvidedKeyEscapeRegex = /\\/+/g;\nfunction escapeUserProvidedKey(text) {\n return ('' + text).replace(userProvidedKeyEscapeRegex, '$&/');\n}\n\n/**\n * PooledClass representing the bookkeeping associated with performing a child\n * traversal. Allows avoiding binding callbacks.\n *\n * @constructor ForEachBookKeeping\n * @param {!function} forEachFunction Function to perform traversal with.\n * @param {?*} forEachContext Context to perform context with.\n */\nfunction ForEachBookKeeping(forEachFunction, forEachContext) {\n this.func = forEachFunction;\n this.context = forEachContext;\n this.count = 0;\n}\nForEachBookKeeping.prototype.destructor = function () {\n this.func = null;\n this.context = null;\n this.count = 0;\n};\nPooledClass.addPoolingTo(ForEachBookKeeping, twoArgumentPooler);\n\nfunction forEachSingleChild(bookKeeping, child, name) {\n var func = bookKeeping.func,\n context = bookKeeping.context;\n\n func.call(context, child, bookKeeping.count++);\n}\n\n/**\n * Iterates through children that are typically specified as `props.children`.\n *\n * See https://facebook.github.io/react/docs/top-level-api.html#react.children.foreach\n *\n * The provided forEachFunc(child, index) will be called for each\n * leaf child.\n *\n * @param {?*} children Children tree container.\n * @param {function(*, int)} forEachFunc\n * @param {*} forEachContext Context for forEachContext.\n */\nfunction forEachChildren(children, forEachFunc, forEachContext) {\n if (children == null) {\n return children;\n }\n var traverseContext = ForEachBookKeeping.getPooled(forEachFunc, forEachContext);\n traverseAllChildren(children, forEachSingleChild, traverseContext);\n ForEachBookKeeping.release(traverseContext);\n}\n\n/**\n * PooledClass representing the bookkeeping associated with performing a child\n * mapping. Allows avoiding binding callbacks.\n *\n * @constructor MapBookKeeping\n * @param {!*} mapResult Object containing the ordered map of results.\n * @param {!function} mapFunction Function to perform mapping with.\n * @param {?*} mapContext Context to perform mapping with.\n */\nfunction MapBookKeeping(mapResult, keyPrefix, mapFunction, mapContext) {\n this.result = mapResult;\n this.keyPrefix = keyPrefix;\n this.func = mapFunction;\n this.context = mapContext;\n this.count = 0;\n}\nMapBookKeeping.prototype.destructor = function () {\n this.result = null;\n this.keyPrefix = null;\n this.func = null;\n this.context = null;\n this.count = 0;\n};\nPooledClass.addPoolingTo(MapBookKeeping, fourArgumentPooler);\n\nfunction mapSingleChildIntoContext(bookKeeping, child, childKey) {\n var result = bookKeeping.result,\n keyPrefix = bookKeeping.keyPrefix,\n func = bookKeeping.func,\n context = bookKeeping.context;\n\n\n var mappedChild = func.call(context, child, bookKeeping.count++);\n if (Array.isArray(mappedChild)) {\n mapIntoWithKeyPrefixInternal(mappedChild, result, childKey, emptyFunction.thatReturnsArgument);\n } else if (mappedChild != null) {\n if (ReactElement.isValidElement(mappedChild)) {\n mappedChild = ReactElement.cloneAndReplaceKey(mappedChild,\n // Keep both the (mapped) and old keys if they differ, just as\n // traverseAllChildren used to do for objects as children\n keyPrefix + (mappedChild.key && (!child || child.key !== mappedChild.key) ? escapeUserProvidedKey(mappedChild.key) + '/' : '') + childKey);\n }\n result.push(mappedChild);\n }\n}\n\nfunction mapIntoWithKeyPrefixInternal(children, array, prefix, func, context) {\n var escapedPrefix = '';\n if (prefix != null) {\n escapedPrefix = escapeUserProvidedKey(prefix) + '/';\n }\n var traverseContext = MapBookKeeping.getPooled(array, escapedPrefix, func, context);\n traverseAllChildren(children, mapSingleChildIntoContext, traverseContext);\n MapBookKeeping.release(traverseContext);\n}\n\n/**\n * Maps children that are typically specified as `props.children`.\n *\n * See https://facebook.github.io/react/docs/top-level-api.html#react.children.map\n *\n * The provided mapFunction(child, key, index) will be called for each\n * leaf child.\n *\n * @param {?*} children Children tree container.\n * @param {function(*, int)} func The map function.\n * @param {*} context Context for mapFunction.\n * @return {object} Object containing the ordered map of results.\n */\nfunction mapChildren(children, func, context) {\n if (children == null) {\n return children;\n }\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, func, context);\n return result;\n}\n\nfunction forEachSingleChildDummy(traverseContext, child, name) {\n return null;\n}\n\n/**\n * Count the number of children that are typically specified as\n * `props.children`.\n *\n * See https://facebook.github.io/react/docs/top-level-api.html#react.children.count\n *\n * @param {?*} children Children tree container.\n * @return {number} The number of children.\n */\nfunction countChildren(children, context) {\n return traverseAllChildren(children, forEachSingleChildDummy, null);\n}\n\n/**\n * Flatten a children object (typically specified as `props.children`) and\n * return an array with appropriately re-keyed children.\n *\n * See https://facebook.github.io/react/docs/top-level-api.html#react.children.toarray\n */\nfunction toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);\n return result;\n}\n\nvar ReactChildren = {\n forEach: forEachChildren,\n map: mapChildren,\n mapIntoWithKeyPrefixInternal: mapIntoWithKeyPrefixInternal,\n count: countChildren,\n toArray: toArray\n};\n\nmodule.exports = ReactChildren;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react/lib/ReactChildren.js\n// module id = 1472\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react/lib/ReactChildren.js?", + ); + + /***/ + }, + /* 1473 */ + /* unknown exports provided */ + /* all exports used */ + /*!***********************************!*\ + !*** ./~/react/lib/ReactClass.js ***! + \***********************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar _prodInvariant = __webpack_require__(/*! ./reactProdInvariant */ 85),\n _assign = __webpack_require__(/*! object-assign */ 21);\n\nvar ReactComponent = __webpack_require__(/*! ./ReactComponent */ 270);\nvar ReactElement = __webpack_require__(/*! ./ReactElement */ 84);\nvar ReactPropTypeLocationNames = __webpack_require__(/*! ./ReactPropTypeLocationNames */ 272);\nvar ReactNoopUpdateQueue = __webpack_require__(/*! ./ReactNoopUpdateQueue */ 271);\n\nvar emptyObject = __webpack_require__(/*! fbjs/lib/emptyObject */ 96);\nvar invariant = __webpack_require__(/*! fbjs/lib/invariant */ 12);\nvar warning = __webpack_require__(/*! fbjs/lib/warning */ 13);\n\nvar MIXINS_KEY = 'mixins';\n\n// Helper function to allow the creation of anonymous functions which do not\n// have .name set to the name of the variable being assigned to.\nfunction identity(fn) {\n return fn;\n}\n\n/**\n * Policies that describe methods in `ReactClassInterface`.\n */\n\n\nvar injectedMixins = [];\n\n/**\n * Composite components are higher-level components that compose other composite\n * or host components.\n *\n * To create a new type of `ReactClass`, pass a specification of\n * your new class to `React.createClass`. The only requirement of your class\n * specification is that you implement a `render` method.\n *\n * var MyComponent = React.createClass({\n * render: function() {\n * return <div>Hello World</div>;\n * }\n * });\n *\n * The class specification supports a specific protocol of methods that have\n * special meaning (e.g. `render`). See `ReactClassInterface` for\n * more the comprehensive protocol. Any other properties and methods in the\n * class specification will be available on the prototype.\n *\n * @interface ReactClassInterface\n * @internal\n */\nvar ReactClassInterface = {\n\n /**\n * An array of Mixin objects to include when defining your component.\n *\n * @type {array}\n * @optional\n */\n mixins: 'DEFINE_MANY',\n\n /**\n * An object containing properties and methods that should be defined on\n * the component's constructor instead of its prototype (static methods).\n *\n * @type {object}\n * @optional\n */\n statics: 'DEFINE_MANY',\n\n /**\n * Definition of prop types for this component.\n *\n * @type {object}\n * @optional\n */\n propTypes: 'DEFINE_MANY',\n\n /**\n * Definition of context types for this component.\n *\n * @type {object}\n * @optional\n */\n contextTypes: 'DEFINE_MANY',\n\n /**\n * Definition of context types this component sets for its children.\n *\n * @type {object}\n * @optional\n */\n childContextTypes: 'DEFINE_MANY',\n\n // ==== Definition methods ====\n\n /**\n * Invoked when the component is mounted. Values in the mapping will be set on\n * `this.props` if that prop is not specified (i.e. using an `in` check).\n *\n * This method is invoked before `getInitialState` and therefore cannot rely\n * on `this.state` or use `this.setState`.\n *\n * @return {object}\n * @optional\n */\n getDefaultProps: 'DEFINE_MANY_MERGED',\n\n /**\n * Invoked once before the component is mounted. The return value will be used\n * as the initial value of `this.state`.\n *\n * getInitialState: function() {\n * return {\n * isOn: false,\n * fooBaz: new BazFoo()\n * }\n * }\n *\n * @return {object}\n * @optional\n */\n getInitialState: 'DEFINE_MANY_MERGED',\n\n /**\n * @return {object}\n * @optional\n */\n getChildContext: 'DEFINE_MANY_MERGED',\n\n /**\n * Uses props from `this.props` and state from `this.state` to render the\n * structure of the component.\n *\n * No guarantees are made about when or how often this method is invoked, so\n * it must not have side effects.\n *\n * render: function() {\n * var name = this.props.name;\n * return <div>Hello, {name}!</div>;\n * }\n *\n * @return {ReactComponent}\n * @nosideeffects\n * @required\n */\n render: 'DEFINE_ONCE',\n\n // ==== Delegate methods ====\n\n /**\n * Invoked when the component is initially created and about to be mounted.\n * This may have side effects, but any external subscriptions or data created\n * by this method must be cleaned up in `componentWillUnmount`.\n *\n * @optional\n */\n componentWillMount: 'DEFINE_MANY',\n\n /**\n * Invoked when the component has been mounted and has a DOM representation.\n * However, there is no guarantee that the DOM node is in the document.\n *\n * Use this as an opportunity to operate on the DOM when the component has\n * been mounted (initialized and rendered) for the first time.\n *\n * @param {DOMElement} rootNode DOM element representing the component.\n * @optional\n */\n componentDidMount: 'DEFINE_MANY',\n\n /**\n * Invoked before the component receives new props.\n *\n * Use this as an opportunity to react to a prop transition by updating the\n * state using `this.setState`. Current props are accessed via `this.props`.\n *\n * componentWillReceiveProps: function(nextProps, nextContext) {\n * this.setState({\n * likesIncreasing: nextProps.likeCount > this.props.likeCount\n * });\n * }\n *\n * NOTE: There is no equivalent `componentWillReceiveState`. An incoming prop\n * transition may cause a state change, but the opposite is not true. If you\n * need it, you are probably looking for `componentWillUpdate`.\n *\n * @param {object} nextProps\n * @optional\n */\n componentWillReceiveProps: 'DEFINE_MANY',\n\n /**\n * Invoked while deciding if the component should be updated as a result of\n * receiving new props, state and/or context.\n *\n * Use this as an opportunity to `return false` when you're certain that the\n * transition to the new props/state/context will not require a component\n * update.\n *\n * shouldComponentUpdate: function(nextProps, nextState, nextContext) {\n * return !equal(nextProps, this.props) ||\n * !equal(nextState, this.state) ||\n * !equal(nextContext, this.context);\n * }\n *\n * @param {object} nextProps\n * @param {?object} nextState\n * @param {?object} nextContext\n * @return {boolean} True if the component should update.\n * @optional\n */\n shouldComponentUpdate: 'DEFINE_ONCE',\n\n /**\n * Invoked when the component is about to update due to a transition from\n * `this.props`, `this.state` and `this.context` to `nextProps`, `nextState`\n * and `nextContext`.\n *\n * Use this as an opportunity to perform preparation before an update occurs.\n *\n * NOTE: You **cannot** use `this.setState()` in this method.\n *\n * @param {object} nextProps\n * @param {?object} nextState\n * @param {?object} nextContext\n * @param {ReactReconcileTransaction} transaction\n * @optional\n */\n componentWillUpdate: 'DEFINE_MANY',\n\n /**\n * Invoked when the component's DOM representation has been updated.\n *\n * Use this as an opportunity to operate on the DOM when the component has\n * been updated.\n *\n * @param {object} prevProps\n * @param {?object} prevState\n * @param {?object} prevContext\n * @param {DOMElement} rootNode DOM element representing the component.\n * @optional\n */\n componentDidUpdate: 'DEFINE_MANY',\n\n /**\n * Invoked when the component is about to be removed from its parent and have\n * its DOM representation destroyed.\n *\n * Use this as an opportunity to deallocate any external resources.\n *\n * NOTE: There is no `componentDidUnmount` since your component will have been\n * destroyed by that point.\n *\n * @optional\n */\n componentWillUnmount: 'DEFINE_MANY',\n\n // ==== Advanced methods ====\n\n /**\n * Updates the component's currently mounted DOM representation.\n *\n * By default, this implements React's rendering and reconciliation algorithm.\n * Sophisticated clients may wish to override this.\n *\n * @param {ReactReconcileTransaction} transaction\n * @internal\n * @overridable\n */\n updateComponent: 'OVERRIDE_BASE'\n\n};\n\n/**\n * Mapping from class specification keys to special processing functions.\n *\n * Although these are declared like instance properties in the specification\n * when defining classes using `React.createClass`, they are actually static\n * and are accessible on the constructor instead of the prototype. Despite\n * being static, they must be defined outside of the \"statics\" key under\n * which all other static methods are defined.\n */\nvar RESERVED_SPEC_KEYS = {\n displayName: function (Constructor, displayName) {\n Constructor.displayName = displayName;\n },\n mixins: function (Constructor, mixins) {\n if (mixins) {\n for (var i = 0; i < mixins.length; i++) {\n mixSpecIntoComponent(Constructor, mixins[i]);\n }\n }\n },\n childContextTypes: function (Constructor, childContextTypes) {\n if (true) {\n validateTypeDef(Constructor, childContextTypes, 'childContext');\n }\n Constructor.childContextTypes = _assign({}, Constructor.childContextTypes, childContextTypes);\n },\n contextTypes: function (Constructor, contextTypes) {\n if (true) {\n validateTypeDef(Constructor, contextTypes, 'context');\n }\n Constructor.contextTypes = _assign({}, Constructor.contextTypes, contextTypes);\n },\n /**\n * Special case getDefaultProps which should move into statics but requires\n * automatic merging.\n */\n getDefaultProps: function (Constructor, getDefaultProps) {\n if (Constructor.getDefaultProps) {\n Constructor.getDefaultProps = createMergedResultFunction(Constructor.getDefaultProps, getDefaultProps);\n } else {\n Constructor.getDefaultProps = getDefaultProps;\n }\n },\n propTypes: function (Constructor, propTypes) {\n if (true) {\n validateTypeDef(Constructor, propTypes, 'prop');\n }\n Constructor.propTypes = _assign({}, Constructor.propTypes, propTypes);\n },\n statics: function (Constructor, statics) {\n mixStaticSpecIntoComponent(Constructor, statics);\n },\n autobind: function () {} };\n\nfunction validateTypeDef(Constructor, typeDef, location) {\n for (var propName in typeDef) {\n if (typeDef.hasOwnProperty(propName)) {\n // use a warning instead of an invariant so components\n // don't show up in prod but only in __DEV__\n true ? warning(typeof typeDef[propName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', Constructor.displayName || 'ReactClass', ReactPropTypeLocationNames[location], propName) : void 0;\n }\n }\n}\n\nfunction validateMethodOverride(isAlreadyDefined, name) {\n var specPolicy = ReactClassInterface.hasOwnProperty(name) ? ReactClassInterface[name] : null;\n\n // Disallow overriding of base class methods unless explicitly allowed.\n if (ReactClassMixin.hasOwnProperty(name)) {\n !(specPolicy === 'OVERRIDE_BASE') ? true ? invariant(false, 'ReactClassInterface: You are attempting to override `%s` from your class specification. Ensure that your method names do not overlap with React methods.', name) : _prodInvariant('73', name) : void 0;\n }\n\n // Disallow defining methods more than once unless explicitly allowed.\n if (isAlreadyDefined) {\n !(specPolicy === 'DEFINE_MANY' || specPolicy === 'DEFINE_MANY_MERGED') ? true ? invariant(false, 'ReactClassInterface: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.', name) : _prodInvariant('74', name) : void 0;\n }\n}\n\n/**\n * Mixin helper which handles policy validation and reserved\n * specification keys when building React classes.\n */\nfunction mixSpecIntoComponent(Constructor, spec) {\n if (!spec) {\n if (true) {\n var typeofSpec = typeof spec;\n var isMixinValid = typeofSpec === 'object' && spec !== null;\n\n true ? warning(isMixinValid, '%s: You\\'re attempting to include a mixin that is either null ' + 'or not an object. Check the mixins included by the component, ' + 'as well as any mixins they include themselves. ' + 'Expected object but got %s.', Constructor.displayName || 'ReactClass', spec === null ? null : typeofSpec) : void 0;\n }\n\n return;\n }\n\n !(typeof spec !== 'function') ? true ? invariant(false, 'ReactClass: You\\'re attempting to use a component class or function as a mixin. Instead, just use a regular object.') : _prodInvariant('75') : void 0;\n !!ReactElement.isValidElement(spec) ? true ? invariant(false, 'ReactClass: You\\'re attempting to use a component as a mixin. Instead, just use a regular object.') : _prodInvariant('76') : void 0;\n\n var proto = Constructor.prototype;\n var autoBindPairs = proto.__reactAutoBindPairs;\n\n // By handling mixins before any other properties, we ensure the same\n // chaining order is applied to methods with DEFINE_MANY policy, whether\n // mixins are listed before or after these methods in the spec.\n if (spec.hasOwnProperty(MIXINS_KEY)) {\n RESERVED_SPEC_KEYS.mixins(Constructor, spec.mixins);\n }\n\n for (var name in spec) {\n if (!spec.hasOwnProperty(name)) {\n continue;\n }\n\n if (name === MIXINS_KEY) {\n // We have already handled mixins in a special case above.\n continue;\n }\n\n var property = spec[name];\n var isAlreadyDefined = proto.hasOwnProperty(name);\n validateMethodOverride(isAlreadyDefined, name);\n\n if (RESERVED_SPEC_KEYS.hasOwnProperty(name)) {\n RESERVED_SPEC_KEYS[name](Constructor, property);\n } else {\n // Setup methods on prototype:\n // The following member methods should not be automatically bound:\n // 1. Expected ReactClass methods (in the \"interface\").\n // 2. Overridden methods (that were mixed in).\n var isReactClassMethod = ReactClassInterface.hasOwnProperty(name);\n var isFunction = typeof property === 'function';\n var shouldAutoBind = isFunction && !isReactClassMethod && !isAlreadyDefined && spec.autobind !== false;\n\n if (shouldAutoBind) {\n autoBindPairs.push(name, property);\n proto[name] = property;\n } else {\n if (isAlreadyDefined) {\n var specPolicy = ReactClassInterface[name];\n\n // These cases should already be caught by validateMethodOverride.\n !(isReactClassMethod && (specPolicy === 'DEFINE_MANY_MERGED' || specPolicy === 'DEFINE_MANY')) ? true ? invariant(false, 'ReactClass: Unexpected spec policy %s for key %s when mixing in component specs.', specPolicy, name) : _prodInvariant('77', specPolicy, name) : void 0;\n\n // For methods which are defined more than once, call the existing\n // methods before calling the new property, merging if appropriate.\n if (specPolicy === 'DEFINE_MANY_MERGED') {\n proto[name] = createMergedResultFunction(proto[name], property);\n } else if (specPolicy === 'DEFINE_MANY') {\n proto[name] = createChainedFunction(proto[name], property);\n }\n } else {\n proto[name] = property;\n if (true) {\n // Add verbose displayName to the function, which helps when looking\n // at profiling tools.\n if (typeof property === 'function' && spec.displayName) {\n proto[name].displayName = spec.displayName + '_' + name;\n }\n }\n }\n }\n }\n }\n}\n\nfunction mixStaticSpecIntoComponent(Constructor, statics) {\n if (!statics) {\n return;\n }\n for (var name in statics) {\n var property = statics[name];\n if (!statics.hasOwnProperty(name)) {\n continue;\n }\n\n var isReserved = name in RESERVED_SPEC_KEYS;\n !!isReserved ? true ? invariant(false, 'ReactClass: You are attempting to define a reserved property, `%s`, that shouldn\\'t be on the \"statics\" key. Define it as an instance property instead; it will still be accessible on the constructor.', name) : _prodInvariant('78', name) : void 0;\n\n var isInherited = name in Constructor;\n !!isInherited ? true ? invariant(false, 'ReactClass: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.', name) : _prodInvariant('79', name) : void 0;\n Constructor[name] = property;\n }\n}\n\n/**\n * Merge two objects, but throw if both contain the same key.\n *\n * @param {object} one The first object, which is mutated.\n * @param {object} two The second object\n * @return {object} one after it has been mutated to contain everything in two.\n */\nfunction mergeIntoWithNoDuplicateKeys(one, two) {\n !(one && two && typeof one === 'object' && typeof two === 'object') ? true ? invariant(false, 'mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.') : _prodInvariant('80') : void 0;\n\n for (var key in two) {\n if (two.hasOwnProperty(key)) {\n !(one[key] === undefined) ? true ? invariant(false, 'mergeIntoWithNoDuplicateKeys(): Tried to merge two objects with the same key: `%s`. This conflict may be due to a mixin; in particular, this may be caused by two getInitialState() or getDefaultProps() methods returning objects with clashing keys.', key) : _prodInvariant('81', key) : void 0;\n one[key] = two[key];\n }\n }\n return one;\n}\n\n/**\n * Creates a function that invokes two functions and merges their return values.\n *\n * @param {function} one Function to invoke first.\n * @param {function} two Function to invoke second.\n * @return {function} Function that invokes the two argument functions.\n * @private\n */\nfunction createMergedResultFunction(one, two) {\n return function mergedResult() {\n var a = one.apply(this, arguments);\n var b = two.apply(this, arguments);\n if (a == null) {\n return b;\n } else if (b == null) {\n return a;\n }\n var c = {};\n mergeIntoWithNoDuplicateKeys(c, a);\n mergeIntoWithNoDuplicateKeys(c, b);\n return c;\n };\n}\n\n/**\n * Creates a function that invokes two functions and ignores their return vales.\n *\n * @param {function} one Function to invoke first.\n * @param {function} two Function to invoke second.\n * @return {function} Function that invokes the two argument functions.\n * @private\n */\nfunction createChainedFunction(one, two) {\n return function chainedFunction() {\n one.apply(this, arguments);\n two.apply(this, arguments);\n };\n}\n\n/**\n * Binds a method to the component.\n *\n * @param {object} component Component whose method is going to be bound.\n * @param {function} method Method to be bound.\n * @return {function} The bound method.\n */\nfunction bindAutoBindMethod(component, method) {\n var boundMethod = method.bind(component);\n if (true) {\n boundMethod.__reactBoundContext = component;\n boundMethod.__reactBoundMethod = method;\n boundMethod.__reactBoundArguments = null;\n var componentName = component.constructor.displayName;\n var _bind = boundMethod.bind;\n boundMethod.bind = function (newThis) {\n for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n // User is trying to bind() an autobound method; we effectively will\n // ignore the value of \"this\" that the user is trying to use, so\n // let's warn.\n if (newThis !== component && newThis !== null) {\n true ? warning(false, 'bind(): React component methods may only be bound to the ' + 'component instance. See %s', componentName) : void 0;\n } else if (!args.length) {\n true ? warning(false, 'bind(): You are binding a component method to the component. ' + 'React does this for you automatically in a high-performance ' + 'way, so you can safely remove this call. See %s', componentName) : void 0;\n return boundMethod;\n }\n var reboundMethod = _bind.apply(boundMethod, arguments);\n reboundMethod.__reactBoundContext = component;\n reboundMethod.__reactBoundMethod = method;\n reboundMethod.__reactBoundArguments = args;\n return reboundMethod;\n };\n }\n return boundMethod;\n}\n\n/**\n * Binds all auto-bound methods in a component.\n *\n * @param {object} component Component whose method is going to be bound.\n */\nfunction bindAutoBindMethods(component) {\n var pairs = component.__reactAutoBindPairs;\n for (var i = 0; i < pairs.length; i += 2) {\n var autoBindKey = pairs[i];\n var method = pairs[i + 1];\n component[autoBindKey] = bindAutoBindMethod(component, method);\n }\n}\n\n/**\n * Add more to the ReactClass base class. These are all legacy features and\n * therefore not already part of the modern ReactComponent.\n */\nvar ReactClassMixin = {\n\n /**\n * TODO: This will be deprecated because state should always keep a consistent\n * type signature and the only use case for this, is to avoid that.\n */\n replaceState: function (newState, callback) {\n this.updater.enqueueReplaceState(this, newState);\n if (callback) {\n this.updater.enqueueCallback(this, callback, 'replaceState');\n }\n },\n\n /**\n * Checks whether or not this composite component is mounted.\n * @return {boolean} True if mounted, false otherwise.\n * @protected\n * @final\n */\n isMounted: function () {\n return this.updater.isMounted(this);\n }\n};\n\nvar ReactClassComponent = function () {};\n_assign(ReactClassComponent.prototype, ReactComponent.prototype, ReactClassMixin);\n\n/**\n * Module for creating composite components.\n *\n * @class ReactClass\n */\nvar ReactClass = {\n\n /**\n * Creates a composite component class given a class specification.\n * See https://facebook.github.io/react/docs/top-level-api.html#react.createclass\n *\n * @param {object} spec Class specification (which must define `render`).\n * @return {function} Component constructor function.\n * @public\n */\n createClass: function (spec) {\n // To keep our warnings more understandable, we'll use a little hack here to\n // ensure that Constructor.name !== 'Constructor'. This makes sure we don't\n // unnecessarily identify a class without displayName as 'Constructor'.\n var Constructor = identity(function (props, context, updater) {\n // This constructor gets overridden by mocks. The argument is used\n // by mocks to assert on what gets mounted.\n\n if (true) {\n true ? warning(this instanceof Constructor, 'Something is calling a React component directly. Use a factory or ' + 'JSX instead. See: https://fb.me/react-legacyfactory') : void 0;\n }\n\n // Wire up auto-binding\n if (this.__reactAutoBindPairs.length) {\n bindAutoBindMethods(this);\n }\n\n this.props = props;\n this.context = context;\n this.refs = emptyObject;\n this.updater = updater || ReactNoopUpdateQueue;\n\n this.state = null;\n\n // ReactClasses doesn't have constructors. Instead, they use the\n // getInitialState and componentWillMount methods for initialization.\n\n var initialState = this.getInitialState ? this.getInitialState() : null;\n if (true) {\n // We allow auto-mocks to proceed as if they're returning null.\n if (initialState === undefined && this.getInitialState._isMockFunction) {\n // This is probably bad practice. Consider warning here and\n // deprecating this convenience.\n initialState = null;\n }\n }\n !(typeof initialState === 'object' && !Array.isArray(initialState)) ? true ? invariant(false, '%s.getInitialState(): must return an object or null', Constructor.displayName || 'ReactCompositeComponent') : _prodInvariant('82', Constructor.displayName || 'ReactCompositeComponent') : void 0;\n\n this.state = initialState;\n });\n Constructor.prototype = new ReactClassComponent();\n Constructor.prototype.constructor = Constructor;\n Constructor.prototype.__reactAutoBindPairs = [];\n\n injectedMixins.forEach(mixSpecIntoComponent.bind(null, Constructor));\n\n mixSpecIntoComponent(Constructor, spec);\n\n // Initialize the defaultProps property after all mixins have been merged.\n if (Constructor.getDefaultProps) {\n Constructor.defaultProps = Constructor.getDefaultProps();\n }\n\n if (true) {\n // This is a tag to indicate that the use of these method names is ok,\n // since it's used with createClass. If it's not, then it's likely a\n // mistake so we'll warn you to use the static property, property\n // initializer or constructor respectively.\n if (Constructor.getDefaultProps) {\n Constructor.getDefaultProps.isReactClassApproved = {};\n }\n if (Constructor.prototype.getInitialState) {\n Constructor.prototype.getInitialState.isReactClassApproved = {};\n }\n }\n\n !Constructor.prototype.render ? true ? invariant(false, 'createClass(...): Class specification must implement a `render` method.') : _prodInvariant('83') : void 0;\n\n if (true) {\n true ? warning(!Constructor.prototype.componentShouldUpdate, '%s has a method called ' + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + 'The name is phrased as a question because the function is ' + 'expected to return a value.', spec.displayName || 'A component') : void 0;\n true ? warning(!Constructor.prototype.componentWillRecieveProps, '%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', spec.displayName || 'A component') : void 0;\n }\n\n // Reduce time spent doing lookups by setting these on the prototype.\n for (var methodName in ReactClassInterface) {\n if (!Constructor.prototype[methodName]) {\n Constructor.prototype[methodName] = null;\n }\n }\n\n return Constructor;\n },\n\n injection: {\n injectMixin: function (mixin) {\n injectedMixins.push(mixin);\n }\n }\n\n};\n\nmodule.exports = ReactClass;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react/lib/ReactClass.js\n// module id = 1473\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react/lib/ReactClass.js?", + ); + + /***/ + }, + /* 1474 */ + /* unknown exports provided */ + /* all exports used */ + /*!******************************************!*\ + !*** ./~/react/lib/ReactDOMFactories.js ***! + \******************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar ReactElement = __webpack_require__(/*! ./ReactElement */ 84);\n\n/**\n * Create a factory that creates HTML tag elements.\n *\n * @private\n */\nvar createDOMFactory = ReactElement.createFactory;\nif (true) {\n var ReactElementValidator = __webpack_require__(/*! ./ReactElementValidator */ 584);\n createDOMFactory = ReactElementValidator.createFactory;\n}\n\n/**\n * Creates a mapping from supported HTML tags to `ReactDOMComponent` classes.\n * This is also accessible via `React.DOM`.\n *\n * @public\n */\nvar ReactDOMFactories = {\n a: createDOMFactory('a'),\n abbr: createDOMFactory('abbr'),\n address: createDOMFactory('address'),\n area: createDOMFactory('area'),\n article: createDOMFactory('article'),\n aside: createDOMFactory('aside'),\n audio: createDOMFactory('audio'),\n b: createDOMFactory('b'),\n base: createDOMFactory('base'),\n bdi: createDOMFactory('bdi'),\n bdo: createDOMFactory('bdo'),\n big: createDOMFactory('big'),\n blockquote: createDOMFactory('blockquote'),\n body: createDOMFactory('body'),\n br: createDOMFactory('br'),\n button: createDOMFactory('button'),\n canvas: createDOMFactory('canvas'),\n caption: createDOMFactory('caption'),\n cite: createDOMFactory('cite'),\n code: createDOMFactory('code'),\n col: createDOMFactory('col'),\n colgroup: createDOMFactory('colgroup'),\n data: createDOMFactory('data'),\n datalist: createDOMFactory('datalist'),\n dd: createDOMFactory('dd'),\n del: createDOMFactory('del'),\n details: createDOMFactory('details'),\n dfn: createDOMFactory('dfn'),\n dialog: createDOMFactory('dialog'),\n div: createDOMFactory('div'),\n dl: createDOMFactory('dl'),\n dt: createDOMFactory('dt'),\n em: createDOMFactory('em'),\n embed: createDOMFactory('embed'),\n fieldset: createDOMFactory('fieldset'),\n figcaption: createDOMFactory('figcaption'),\n figure: createDOMFactory('figure'),\n footer: createDOMFactory('footer'),\n form: createDOMFactory('form'),\n h1: createDOMFactory('h1'),\n h2: createDOMFactory('h2'),\n h3: createDOMFactory('h3'),\n h4: createDOMFactory('h4'),\n h5: createDOMFactory('h5'),\n h6: createDOMFactory('h6'),\n head: createDOMFactory('head'),\n header: createDOMFactory('header'),\n hgroup: createDOMFactory('hgroup'),\n hr: createDOMFactory('hr'),\n html: createDOMFactory('html'),\n i: createDOMFactory('i'),\n iframe: createDOMFactory('iframe'),\n img: createDOMFactory('img'),\n input: createDOMFactory('input'),\n ins: createDOMFactory('ins'),\n kbd: createDOMFactory('kbd'),\n keygen: createDOMFactory('keygen'),\n label: createDOMFactory('label'),\n legend: createDOMFactory('legend'),\n li: createDOMFactory('li'),\n link: createDOMFactory('link'),\n main: createDOMFactory('main'),\n map: createDOMFactory('map'),\n mark: createDOMFactory('mark'),\n menu: createDOMFactory('menu'),\n menuitem: createDOMFactory('menuitem'),\n meta: createDOMFactory('meta'),\n meter: createDOMFactory('meter'),\n nav: createDOMFactory('nav'),\n noscript: createDOMFactory('noscript'),\n object: createDOMFactory('object'),\n ol: createDOMFactory('ol'),\n optgroup: createDOMFactory('optgroup'),\n option: createDOMFactory('option'),\n output: createDOMFactory('output'),\n p: createDOMFactory('p'),\n param: createDOMFactory('param'),\n picture: createDOMFactory('picture'),\n pre: createDOMFactory('pre'),\n progress: createDOMFactory('progress'),\n q: createDOMFactory('q'),\n rp: createDOMFactory('rp'),\n rt: createDOMFactory('rt'),\n ruby: createDOMFactory('ruby'),\n s: createDOMFactory('s'),\n samp: createDOMFactory('samp'),\n script: createDOMFactory('script'),\n section: createDOMFactory('section'),\n select: createDOMFactory('select'),\n small: createDOMFactory('small'),\n source: createDOMFactory('source'),\n span: createDOMFactory('span'),\n strong: createDOMFactory('strong'),\n style: createDOMFactory('style'),\n sub: createDOMFactory('sub'),\n summary: createDOMFactory('summary'),\n sup: createDOMFactory('sup'),\n table: createDOMFactory('table'),\n tbody: createDOMFactory('tbody'),\n td: createDOMFactory('td'),\n textarea: createDOMFactory('textarea'),\n tfoot: createDOMFactory('tfoot'),\n th: createDOMFactory('th'),\n thead: createDOMFactory('thead'),\n time: createDOMFactory('time'),\n title: createDOMFactory('title'),\n tr: createDOMFactory('tr'),\n track: createDOMFactory('track'),\n u: createDOMFactory('u'),\n ul: createDOMFactory('ul'),\n 'var': createDOMFactory('var'),\n video: createDOMFactory('video'),\n wbr: createDOMFactory('wbr'),\n\n // SVG\n circle: createDOMFactory('circle'),\n clipPath: createDOMFactory('clipPath'),\n defs: createDOMFactory('defs'),\n ellipse: createDOMFactory('ellipse'),\n g: createDOMFactory('g'),\n image: createDOMFactory('image'),\n line: createDOMFactory('line'),\n linearGradient: createDOMFactory('linearGradient'),\n mask: createDOMFactory('mask'),\n path: createDOMFactory('path'),\n pattern: createDOMFactory('pattern'),\n polygon: createDOMFactory('polygon'),\n polyline: createDOMFactory('polyline'),\n radialGradient: createDOMFactory('radialGradient'),\n rect: createDOMFactory('rect'),\n stop: createDOMFactory('stop'),\n svg: createDOMFactory('svg'),\n text: createDOMFactory('text'),\n tspan: createDOMFactory('tspan')\n};\n\nmodule.exports = ReactDOMFactories;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react/lib/ReactDOMFactories.js\n// module id = 1474\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react/lib/ReactDOMFactories.js?", + ); + + /***/ + }, + /* 1475 */ + /* unknown exports provided */ + /* all exports used */ + /*!***************************************!*\ + !*** ./~/react/lib/ReactPropTypes.js ***! + \***************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar ReactElement = __webpack_require__(/*! ./ReactElement */ 84);\nvar ReactPropTypeLocationNames = __webpack_require__(/*! ./ReactPropTypeLocationNames */ 272);\nvar ReactPropTypesSecret = __webpack_require__(/*! ./ReactPropTypesSecret */ 585);\n\nvar emptyFunction = __webpack_require__(/*! fbjs/lib/emptyFunction */ 40);\nvar getIteratorFn = __webpack_require__(/*! ./getIteratorFn */ 274);\nvar warning = __webpack_require__(/*! fbjs/lib/warning */ 13);\n\n/**\n * Collection of methods that allow declaration and validation of props that are\n * supplied to React components. Example usage:\n *\n * var Props = require('ReactPropTypes');\n * var MyArticle = React.createClass({\n * propTypes: {\n * // An optional string prop named \"description\".\n * description: Props.string,\n *\n * // A required enum prop named \"category\".\n * category: Props.oneOf(['News','Photos']).isRequired,\n *\n * // A prop named \"dialog\" that requires an instance of Dialog.\n * dialog: Props.instanceOf(Dialog).isRequired\n * },\n * render: function() { ... }\n * });\n *\n * A more formal specification of how these methods are used:\n *\n * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)\n * decl := ReactPropTypes.{type}(.isRequired)?\n *\n * Each and every declaration produces a function with the same signature. This\n * allows the creation of custom validation functions. For example:\n *\n * var MyLink = React.createClass({\n * propTypes: {\n * // An optional string or URI prop named \"href\".\n * href: function(props, propName, componentName) {\n * var propValue = props[propName];\n * if (propValue != null && typeof propValue !== 'string' &&\n * !(propValue instanceof URI)) {\n * return new Error(\n * 'Expected a string or an URI for ' + propName + ' in ' +\n * componentName\n * );\n * }\n * }\n * },\n * render: function() {...}\n * });\n *\n * @internal\n */\n\nvar ANONYMOUS = '<<anonymous>>';\n\nvar ReactPropTypes = {\n array: createPrimitiveTypeChecker('array'),\n bool: createPrimitiveTypeChecker('boolean'),\n func: createPrimitiveTypeChecker('function'),\n number: createPrimitiveTypeChecker('number'),\n object: createPrimitiveTypeChecker('object'),\n string: createPrimitiveTypeChecker('string'),\n symbol: createPrimitiveTypeChecker('symbol'),\n\n any: createAnyTypeChecker(),\n arrayOf: createArrayOfTypeChecker,\n element: createElementTypeChecker(),\n instanceOf: createInstanceTypeChecker,\n node: createNodeChecker(),\n objectOf: createObjectOfTypeChecker,\n oneOf: createEnumTypeChecker,\n oneOfType: createUnionTypeChecker,\n shape: createShapeTypeChecker\n};\n\n/**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\n/*eslint-disable no-self-compare*/\nfunction is(x, y) {\n // SameValue algorithm\n if (x === y) {\n // Steps 1-5, 7-10\n // Steps 6.b-6.e: +0 != -0\n return x !== 0 || 1 / x === 1 / y;\n } else {\n // Step 6.a: NaN == NaN\n return x !== x && y !== y;\n }\n}\n/*eslint-enable no-self-compare*/\n\n/**\n * We use an Error-like object for backward compatibility as people may call\n * PropTypes directly and inspect their output. However we don't use real\n * Errors anymore. We don't inspect their stack anyway, and creating them\n * is prohibitively expensive if they are created too often, such as what\n * happens in oneOfType() for any type before the one that matched.\n */\nfunction PropTypeError(message) {\n this.message = message;\n this.stack = '';\n}\n// Make `instanceof Error` still work for returned errors.\nPropTypeError.prototype = Error.prototype;\n\nfunction createChainableTypeChecker(validate) {\n if (true) {\n var manualPropTypeCallCache = {};\n }\n function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {\n componentName = componentName || ANONYMOUS;\n propFullName = propFullName || propName;\n if (true) {\n if (secret !== ReactPropTypesSecret && typeof console !== 'undefined') {\n var cacheKey = componentName + ':' + propName;\n if (!manualPropTypeCallCache[cacheKey]) {\n true ? warning(false, 'You are manually calling a React.PropTypes validation ' + 'function for the `%s` prop on `%s`. This is deprecated ' + 'and will not work in production with the next major version. ' + 'You may be seeing this warning due to a third-party PropTypes ' + 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.', propFullName, componentName) : void 0;\n manualPropTypeCallCache[cacheKey] = true;\n }\n }\n }\n if (props[propName] == null) {\n var locationName = ReactPropTypeLocationNames[location];\n if (isRequired) {\n if (props[propName] === null) {\n return new PropTypeError('The ' + locationName + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));\n }\n return new PropTypeError('The ' + locationName + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));\n }\n return null;\n } else {\n return validate(props, propName, componentName, location, propFullName);\n }\n }\n\n var chainedCheckType = checkType.bind(null, false);\n chainedCheckType.isRequired = checkType.bind(null, true);\n\n return chainedCheckType;\n}\n\nfunction createPrimitiveTypeChecker(expectedType) {\n function validate(props, propName, componentName, location, propFullName, secret) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== expectedType) {\n var locationName = ReactPropTypeLocationNames[location];\n // `propValue` being instance of, say, date/regexp, pass the 'object'\n // check, but we can offer a more precise error message here rather than\n // 'of type `object`'.\n var preciseType = getPreciseType(propValue);\n\n return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n}\n\nfunction createAnyTypeChecker() {\n return createChainableTypeChecker(emptyFunction.thatReturns(null));\n}\n\nfunction createArrayOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');\n }\n var propValue = props[propName];\n if (!Array.isArray(propValue)) {\n var locationName = ReactPropTypeLocationNames[location];\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));\n }\n for (var i = 0; i < propValue.length; i++) {\n var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n}\n\nfunction createElementTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (!ReactElement.isValidElement(propValue)) {\n var locationName = ReactPropTypeLocationNames[location];\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n}\n\nfunction createInstanceTypeChecker(expectedClass) {\n function validate(props, propName, componentName, location, propFullName) {\n if (!(props[propName] instanceof expectedClass)) {\n var locationName = ReactPropTypeLocationNames[location];\n var expectedClassName = expectedClass.name || ANONYMOUS;\n var actualClassName = getClassName(props[propName]);\n return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n}\n\nfunction createEnumTypeChecker(expectedValues) {\n if (!Array.isArray(expectedValues)) {\n true ? warning(false, 'Invalid argument supplied to oneOf, expected an instance of array.') : void 0;\n return emptyFunction.thatReturnsNull;\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n for (var i = 0; i < expectedValues.length; i++) {\n if (is(propValue, expectedValues[i])) {\n return null;\n }\n }\n\n var locationName = ReactPropTypeLocationNames[location];\n var valuesString = JSON.stringify(expectedValues);\n return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));\n }\n return createChainableTypeChecker(validate);\n}\n\nfunction createObjectOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');\n }\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n var locationName = ReactPropTypeLocationNames[location];\n return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));\n }\n for (var key in propValue) {\n if (propValue.hasOwnProperty(key)) {\n var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n}\n\nfunction createUnionTypeChecker(arrayOfTypeCheckers) {\n if (!Array.isArray(arrayOfTypeCheckers)) {\n true ? warning(false, 'Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;\n return emptyFunction.thatReturnsNull;\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) {\n return null;\n }\n }\n\n var locationName = ReactPropTypeLocationNames[location];\n return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));\n }\n return createChainableTypeChecker(validate);\n}\n\nfunction createNodeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n if (!isNode(props[propName])) {\n var locationName = ReactPropTypeLocationNames[location];\n return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n}\n\nfunction createShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n var locationName = ReactPropTypeLocationNames[location];\n return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n for (var key in shapeTypes) {\n var checker = shapeTypes[key];\n if (!checker) {\n continue;\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n}\n\nfunction isNode(propValue) {\n switch (typeof propValue) {\n case 'number':\n case 'string':\n case 'undefined':\n return true;\n case 'boolean':\n return !propValue;\n case 'object':\n if (Array.isArray(propValue)) {\n return propValue.every(isNode);\n }\n if (propValue === null || ReactElement.isValidElement(propValue)) {\n return true;\n }\n\n var iteratorFn = getIteratorFn(propValue);\n if (iteratorFn) {\n var iterator = iteratorFn.call(propValue);\n var step;\n if (iteratorFn !== propValue.entries) {\n while (!(step = iterator.next()).done) {\n if (!isNode(step.value)) {\n return false;\n }\n }\n } else {\n // Iterator will provide entry [k,v] tuples rather than values.\n while (!(step = iterator.next()).done) {\n var entry = step.value;\n if (entry) {\n if (!isNode(entry[1])) {\n return false;\n }\n }\n }\n }\n } else {\n return false;\n }\n\n return true;\n default:\n return false;\n }\n}\n\nfunction isSymbol(propType, propValue) {\n // Native Symbol.\n if (propType === 'symbol') {\n return true;\n }\n\n // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'\n if (propValue['@@toStringTag'] === 'Symbol') {\n return true;\n }\n\n // Fallback for non-spec compliant Symbols which are polyfilled.\n if (typeof Symbol === 'function' && propValue instanceof Symbol) {\n return true;\n }\n\n return false;\n}\n\n// Equivalent of `typeof` but with special handling for array and regexp.\nfunction getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n}\n\n// This handles more types than `getPropType`. Only used for error messages.\n// See `createPrimitiveTypeChecker`.\nfunction getPreciseType(propValue) {\n var propType = getPropType(propValue);\n if (propType === 'object') {\n if (propValue instanceof Date) {\n return 'date';\n } else if (propValue instanceof RegExp) {\n return 'regexp';\n }\n }\n return propType;\n}\n\n// Returns class name of the object, if any.\nfunction getClassName(propValue) {\n if (!propValue.constructor || !propValue.constructor.name) {\n return ANONYMOUS;\n }\n return propValue.constructor.name;\n}\n\nmodule.exports = ReactPropTypes;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react/lib/ReactPropTypes.js\n// module id = 1475\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react/lib/ReactPropTypes.js?", + ); + + /***/ + }, + /* 1476 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************************!*\ + !*** ./~/react/lib/ReactPureComponent.js ***! + \*******************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + '/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar _assign = __webpack_require__(/*! object-assign */ 21);\n\nvar ReactComponent = __webpack_require__(/*! ./ReactComponent */ 270);\nvar ReactNoopUpdateQueue = __webpack_require__(/*! ./ReactNoopUpdateQueue */ 271);\n\nvar emptyObject = __webpack_require__(/*! fbjs/lib/emptyObject */ 96);\n\n/**\n * Base class helpers for the updating state of a component.\n */\nfunction ReactPureComponent(props, context, updater) {\n // Duplicated from ReactComponent.\n this.props = props;\n this.context = context;\n this.refs = emptyObject;\n // We initialize the default updater but the real one gets injected by the\n // renderer.\n this.updater = updater || ReactNoopUpdateQueue;\n}\n\nfunction ComponentDummy() {}\nComponentDummy.prototype = ReactComponent.prototype;\nReactPureComponent.prototype = new ComponentDummy();\nReactPureComponent.prototype.constructor = ReactPureComponent;\n// Avoid an extra prototype jump for these methods.\n_assign(ReactPureComponent.prototype, ReactComponent.prototype);\nReactPureComponent.prototype.isPureReactComponent = true;\n\nmodule.exports = ReactPureComponent;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react/lib/ReactPureComponent.js\n// module id = 1476\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react/lib/ReactPureComponent.js?', + ); + + /***/ + }, + /* 1477 */ + /* unknown exports provided */ + /* all exports used */ + /*!*************************************!*\ + !*** ./~/react/lib/ReactVersion.js ***! + \*************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nmodule.exports = '15.4.2';\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react/lib/ReactVersion.js\n// module id = 1477\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react/lib/ReactVersion.js?", + ); + + /***/ + }, + /* 1478 */ + /* unknown exports provided */ + /* all exports used */ + /*!*******************************************!*\ + !*** ./~/react/lib/checkReactTypeSpec.js ***! + \*******************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/* WEBPACK VAR INJECTION */(function(process) {/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar _prodInvariant = __webpack_require__(/*! ./reactProdInvariant */ 85);\n\nvar ReactPropTypeLocationNames = __webpack_require__(/*! ./ReactPropTypeLocationNames */ 272);\nvar ReactPropTypesSecret = __webpack_require__(/*! ./ReactPropTypesSecret */ 585);\n\nvar invariant = __webpack_require__(/*! fbjs/lib/invariant */ 12);\nvar warning = __webpack_require__(/*! fbjs/lib/warning */ 13);\n\nvar ReactComponentTreeHook;\n\nif (typeof process !== 'undefined' && __webpack_require__.i({\"NODE_ENV\":\"dev\",\"RAILS_ENV\":undefined,\"SERVER_RENDERING\":true,\"HONEYBADGER_API_KEY\":undefined}) && \"dev\" === 'test') {\n // Temporary hack.\n // Inline requires don't work well with Jest:\n // https://github.com/facebook/react/issues/7240\n // Remove the inline requires when we don't need them anymore:\n // https://github.com/facebook/react/pull/7178\n ReactComponentTreeHook = __webpack_require__(/*! ./ReactComponentTreeHook */ 37);\n}\n\nvar loggedTypeFailures = {};\n\n/**\n * Assert that the values match with the type specs.\n * Error messages are memorized and will only be shown once.\n *\n * @param {object} typeSpecs Map of name to a ReactPropType\n * @param {object} values Runtime values that need to be type-checked\n * @param {string} location e.g. \"prop\", \"context\", \"child context\"\n * @param {string} componentName Name of the component for error messages.\n * @param {?object} element The React element that is being type-checked\n * @param {?number} debugID The React component instance that is being type-checked\n * @private\n */\nfunction checkReactTypeSpec(typeSpecs, values, location, componentName, element, debugID) {\n for (var typeSpecName in typeSpecs) {\n if (typeSpecs.hasOwnProperty(typeSpecName)) {\n var error;\n // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n !(typeof typeSpecs[typeSpecName] === 'function') ? true ? invariant(false, '%s: %s type `%s` is invalid; it must be a function, usually from React.PropTypes.', componentName || 'React class', ReactPropTypeLocationNames[location], typeSpecName) : _prodInvariant('84', componentName || 'React class', ReactPropTypeLocationNames[location], typeSpecName) : void 0;\n error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);\n } catch (ex) {\n error = ex;\n }\n true ? warning(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', ReactPropTypeLocationNames[location], typeSpecName, typeof error) : void 0;\n if (error instanceof Error && !(error.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error.message] = true;\n\n var componentStackInfo = '';\n\n if (true) {\n if (!ReactComponentTreeHook) {\n ReactComponentTreeHook = __webpack_require__(/*! ./ReactComponentTreeHook */ 37);\n }\n if (debugID !== null) {\n componentStackInfo = ReactComponentTreeHook.getStackAddendumByID(debugID);\n } else if (element !== null) {\n componentStackInfo = ReactComponentTreeHook.getCurrentStackAddendum(element);\n }\n }\n\n true ? warning(false, 'Failed %s type: %s%s', location, error.message, componentStackInfo) : void 0;\n }\n }\n }\n}\n\nmodule.exports = checkReactTypeSpec;\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(/*! ./../../process/browser.js */ 164)))\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react/lib/checkReactTypeSpec.js\n// module id = 1478\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react/lib/checkReactTypeSpec.js?", + ); + + /***/ + }, + /* 1479 */ + /* unknown exports provided */ + /* all exports used */ + /*!**********************************!*\ + !*** ./~/react/lib/onlyChild.js ***! + \**********************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\nvar _prodInvariant = __webpack_require__(/*! ./reactProdInvariant */ 85);\n\nvar ReactElement = __webpack_require__(/*! ./ReactElement */ 84);\n\nvar invariant = __webpack_require__(/*! fbjs/lib/invariant */ 12);\n\n/**\n * Returns the first child in a collection of children and verifies that there\n * is only one child in the collection.\n *\n * See https://facebook.github.io/react/docs/top-level-api.html#react.children.only\n *\n * The current implementation of this function assumes that a single child gets\n * passed without a wrapper, but the purpose of this helper function is to\n * abstract away the particular structure of children.\n *\n * @param {?object} children Child collection structure.\n * @return {ReactElement} The first and only `ReactElement` contained in the\n * structure.\n */\nfunction onlyChild(children) {\n !ReactElement.isValidElement(children) ? true ? invariant(false, 'React.Children.only expected to receive a single React element child.') : _prodInvariant('143') : void 0;\n return children;\n}\n\nmodule.exports = onlyChild;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react/lib/onlyChild.js\n// module id = 1479\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react/lib/onlyChild.js?", + ); + + /***/ + }, + /* 1480 */ + /* unknown exports provided */ + /* all exports used */ + /*!********************************************!*\ + !*** ./~/react/lib/traverseAllChildren.js ***! + \********************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar _prodInvariant = __webpack_require__(/*! ./reactProdInvariant */ 85);\n\nvar ReactCurrentOwner = __webpack_require__(/*! ./ReactCurrentOwner */ 55);\nvar REACT_ELEMENT_TYPE = __webpack_require__(/*! ./ReactElementSymbol */ 583);\n\nvar getIteratorFn = __webpack_require__(/*! ./getIteratorFn */ 274);\nvar invariant = __webpack_require__(/*! fbjs/lib/invariant */ 12);\nvar KeyEscapeUtils = __webpack_require__(/*! ./KeyEscapeUtils */ 1470);\nvar warning = __webpack_require__(/*! fbjs/lib/warning */ 13);\n\nvar SEPARATOR = '.';\nvar SUBSEPARATOR = ':';\n\n/**\n * This is inlined from ReactElement since this file is shared between\n * isomorphic and renderers. We could extract this to a\n *\n */\n\n/**\n * TODO: Test that a single child and an array with one item have the same key\n * pattern.\n */\n\nvar didWarnAboutMaps = false;\n\n/**\n * Generate a key string that identifies a component within a set.\n *\n * @param {*} component A component that could contain a manual key.\n * @param {number} index Index that is used if a manual key is not provided.\n * @return {string}\n */\nfunction getComponentKey(component, index) {\n // Do some typechecking here since we call this blindly. We want to ensure\n // that we don't block potential future ES APIs.\n if (component && typeof component === 'object' && component.key != null) {\n // Explicit key\n return KeyEscapeUtils.escape(component.key);\n }\n // Implicit key determined by the index in the set\n return index.toString(36);\n}\n\n/**\n * @param {?*} children Children tree container.\n * @param {!string} nameSoFar Name of the key path so far.\n * @param {!function} callback Callback to invoke with each child found.\n * @param {?*} traverseContext Used to pass information throughout the traversal\n * process.\n * @return {!number} The number of children in this subtree.\n */\nfunction traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) {\n var type = typeof children;\n\n if (type === 'undefined' || type === 'boolean') {\n // All of the above are perceived as null.\n children = null;\n }\n\n if (children === null || type === 'string' || type === 'number' ||\n // The following is inlined from ReactElement. This means we can optimize\n // some checks. React Fiber also inlines this logic for similar purposes.\n type === 'object' && children.$$typeof === REACT_ELEMENT_TYPE) {\n callback(traverseContext, children,\n // If it's the only child, treat the name as if it was wrapped in an array\n // so that it's consistent if the number of children grows.\n nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar);\n return 1;\n }\n\n var child;\n var nextName;\n var subtreeCount = 0; // Count of children found in the current subtree.\n var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;\n\n if (Array.isArray(children)) {\n for (var i = 0; i < children.length; i++) {\n child = children[i];\n nextName = nextNamePrefix + getComponentKey(child, i);\n subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);\n }\n } else {\n var iteratorFn = getIteratorFn(children);\n if (iteratorFn) {\n var iterator = iteratorFn.call(children);\n var step;\n if (iteratorFn !== children.entries) {\n var ii = 0;\n while (!(step = iterator.next()).done) {\n child = step.value;\n nextName = nextNamePrefix + getComponentKey(child, ii++);\n subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);\n }\n } else {\n if (true) {\n var mapsAsChildrenAddendum = '';\n if (ReactCurrentOwner.current) {\n var mapsAsChildrenOwnerName = ReactCurrentOwner.current.getName();\n if (mapsAsChildrenOwnerName) {\n mapsAsChildrenAddendum = ' Check the render method of `' + mapsAsChildrenOwnerName + '`.';\n }\n }\n true ? warning(didWarnAboutMaps, 'Using Maps as children is not yet fully supported. It is an ' + 'experimental feature that might be removed. Convert it to a ' + 'sequence / iterable of keyed ReactElements instead.%s', mapsAsChildrenAddendum) : void 0;\n didWarnAboutMaps = true;\n }\n // Iterator will provide entry [k,v] tuples rather than values.\n while (!(step = iterator.next()).done) {\n var entry = step.value;\n if (entry) {\n child = entry[1];\n nextName = nextNamePrefix + KeyEscapeUtils.escape(entry[0]) + SUBSEPARATOR + getComponentKey(child, 0);\n subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);\n }\n }\n }\n } else if (type === 'object') {\n var addendum = '';\n if (true) {\n addendum = ' If you meant to render a collection of children, use an array ' + 'instead or wrap the object using createFragment(object) from the ' + 'React add-ons.';\n if (children._isReactElement) {\n addendum = ' It looks like you\\'re using an element created by a different ' + 'version of React. Make sure to use only one copy of React.';\n }\n if (ReactCurrentOwner.current) {\n var name = ReactCurrentOwner.current.getName();\n if (name) {\n addendum += ' Check the render method of `' + name + '`.';\n }\n }\n }\n var childrenString = String(children);\n true ? true ? invariant(false, 'Objects are not valid as a React child (found: %s).%s', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum) : _prodInvariant('31', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum) : void 0;\n }\n }\n\n return subtreeCount;\n}\n\n/**\n * Traverses children that are typically specified as `props.children`, but\n * might also be specified through attributes:\n *\n * - `traverseAllChildren(this.props.children, ...)`\n * - `traverseAllChildren(this.props.leftPanelChildren, ...)`\n *\n * The `traverseContext` is an optional argument that is passed through the\n * entire traversal. It can be used to store accumulations or anything else that\n * the callback might find relevant.\n *\n * @param {?*} children Children tree object.\n * @param {!function} callback To invoke upon traversing each child.\n * @param {?*} traverseContext Context for traversal.\n * @return {!number} The number of children in this subtree.\n */\nfunction traverseAllChildren(children, callback, traverseContext) {\n if (children == null) {\n return 0;\n }\n\n return traverseAllChildrenImpl(children, '', callback, traverseContext);\n}\n\nmodule.exports = traverseAllChildren;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/react/lib/traverseAllChildren.js\n// module id = 1480\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/react/lib/traverseAllChildren.js?", + ); + + /***/ + }, + /* 1481 */ + /* exports provided: mapProps, withProps, withPropsOnChange, withHandlers, defaultProps, renameProp, renameProps, flattenProp, withState, withReducer, branch, renderComponent, renderNothing, shouldUpdate, pure, onlyUpdateForKeys, onlyUpdateForPropTypes, withContext, getContext, lifecycle, toClass, setStatic, setPropTypes, setDisplayName, compose, getDisplayName, wrapDisplayName, shallowEqual, isClassComponent, createEagerElement, createEagerFactory, createSink, componentFromProp, nest, hoistStatics, componentFromStream, mapPropsStream, createEventHandler, setObservableConfig */ + /* exports used: wrapDisplayName */ + /*!*************************************!*\ + !*** ./~/recompose/es/Recompose.js ***! + \*************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(/*! react */ 1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_fbjs_lib_shallowEqual__ = __webpack_require__(/*! fbjs/lib/shallowEqual */ 97);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_fbjs_lib_shallowEqual___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_fbjs_lib_shallowEqual__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_hoist_non_react_statics__ = __webpack_require__(/*! hoist-non-react-statics */ 217);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_hoist_non_react_statics___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_hoist_non_react_statics__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_change_emitter__ = __webpack_require__(/*! change-emitter */ 903);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_change_emitter___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_change_emitter__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_symbol_observable__ = __webpack_require__(/*! symbol-observable */ 589);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_symbol_observable___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_symbol_observable__);\n/* unused harmony reexport shallowEqual */\n/* unused harmony export mapProps */\n/* unused harmony export withProps */\n/* unused harmony export withPropsOnChange */\n/* unused harmony export withHandlers */\n/* unused harmony export defaultProps */\n/* unused harmony export renameProp */\n/* unused harmony export renameProps */\n/* unused harmony export flattenProp */\n/* unused harmony export withState */\n/* unused harmony export withReducer */\n/* unused harmony export branch */\n/* unused harmony export renderComponent */\n/* unused harmony export renderNothing */\n/* unused harmony export shouldUpdate */\n/* unused harmony export pure */\n/* unused harmony export onlyUpdateForKeys */\n/* unused harmony export onlyUpdateForPropTypes */\n/* unused harmony export withContext */\n/* unused harmony export getContext */\n/* unused harmony export lifecycle */\n/* unused harmony export toClass */\n/* unused harmony export setStatic */\n/* unused harmony export setPropTypes */\n/* unused harmony export setDisplayName */\n/* unused harmony export compose */\n/* unused harmony export getDisplayName */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return wrapDisplayName; });\n/* unused harmony export isClassComponent */\n/* unused harmony export createEagerElement */\n/* unused harmony export createEagerFactory */\n/* unused harmony export createSink */\n/* unused harmony export componentFromProp */\n/* unused harmony export nest */\n/* unused harmony export hoistStatics */\n/* unused harmony export componentFromStream */\n/* unused harmony export mapPropsStream */\n/* unused harmony export createEventHandler */\n/* unused harmony export setObservableConfig */\n\n\n\n\n\n\nvar getDisplayName = function getDisplayName(Component$$1) {\n if (typeof Component$$1 === 'string') {\n return Component$$1;\n }\n\n if (!Component$$1) {\n return undefined;\n }\n\n return Component$$1.displayName || Component$$1.name || 'Component';\n};\n\nvar wrapDisplayName = function wrapDisplayName(BaseComponent, hocName) {\n return hocName + '(' + getDisplayName(BaseComponent) + ')';\n};\n\nvar createHelper = function createHelper(func, helperName) {\n var setDisplayName = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n var noArgs = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n\n if (\"dev\" !== 'production' && setDisplayName) {\n if (noArgs) {\n return function (BaseComponent) {\n var Component$$1 = func(BaseComponent);\n Component$$1.displayName = wrapDisplayName(BaseComponent, helperName);\n return Component$$1;\n };\n }\n\n return function () {\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return function (BaseComponent) {\n var Component$$1 = func.apply(undefined, args)(BaseComponent);\n Component$$1.displayName = wrapDisplayName(BaseComponent, helperName);\n return Component$$1;\n };\n };\n }\n\n return func;\n};\n\nvar classCallCheck = function (instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n};\n\n\n\n\n\n\n\n\n\nvar _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n};\n\n\n\nvar inherits = function (subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass);\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n};\n\n\n\n\n\n\n\n\n\nvar objectWithoutProperties = function (obj, keys) {\n var target = {};\n\n for (var i in obj) {\n if (keys.indexOf(i) >= 0) continue;\n if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;\n target[i] = obj[i];\n }\n\n return target;\n};\n\nvar possibleConstructorReturn = function (self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\n};\n\nvar createEagerElementUtil = function createEagerElementUtil(hasKey, isReferentiallyTransparent, type, props, children) {\n if (!hasKey && isReferentiallyTransparent) {\n if (children) {\n return type(_extends({}, props, { children: children }));\n }\n return type(props);\n }\n\n var Component$$1 = type;\n\n if (children) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n Component$$1,\n props,\n children\n );\n }\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(Component$$1, props);\n};\n\nvar isClassComponent = function isClassComponent(Component$$1) {\n return Boolean(Component$$1 && Component$$1.prototype && typeof Component$$1.prototype.isReactComponent === 'object');\n};\n\nvar isReferentiallyTransparentFunctionComponent = function isReferentiallyTransparentFunctionComponent(Component$$1) {\n return Boolean(typeof Component$$1 === 'function' && !isClassComponent(Component$$1) && !Component$$1.defaultProps && !Component$$1.contextTypes && (\"dev\" === 'production' || !Component$$1.propTypes));\n};\n\nvar createFactory = function createFactory(type) {\n var isReferentiallyTransparent = isReferentiallyTransparentFunctionComponent(type);\n return function (p, c) {\n return createEagerElementUtil(false, isReferentiallyTransparent, type, p, c);\n };\n};\n\nvar mapProps = function mapProps(propsMapper) {\n return function (BaseComponent) {\n var factory = createFactory(BaseComponent);\n return function (props) {\n return factory(propsMapper(props));\n };\n };\n};\n\nvar mapProps$1 = createHelper(mapProps, 'mapProps');\n\nvar withProps = function withProps(input) {\n return mapProps$1(function (props) {\n return _extends({}, props, typeof input === 'function' ? input(props) : input);\n });\n};\n\nvar withProps$1 = createHelper(withProps, 'withProps');\n\nvar pick = function pick(obj, keys) {\n var result = {};\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n if (obj.hasOwnProperty(key)) {\n result[key] = obj[key];\n }\n }\n return result;\n};\n\nvar withPropsOnChange = function withPropsOnChange(shouldMapOrKeys, propsMapper) {\n return function (BaseComponent) {\n var factory = createFactory(BaseComponent);\n var shouldMap = typeof shouldMapOrKeys === 'function' ? shouldMapOrKeys : function (props, nextProps) {\n return !__WEBPACK_IMPORTED_MODULE_1_fbjs_lib_shallowEqual___default()(pick(props, shouldMapOrKeys), pick(nextProps, shouldMapOrKeys));\n };\n\n return function (_Component) {\n inherits(_class2, _Component);\n\n function _class2() {\n var _temp, _this, _ret;\n\n classCallCheck(this, _class2);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = possibleConstructorReturn(this, _Component.call.apply(_Component, [this].concat(args))), _this), _this.computedProps = propsMapper(_this.props), _temp), possibleConstructorReturn(_this, _ret);\n }\n\n _class2.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {\n if (shouldMap(this.props, nextProps)) {\n this.computedProps = propsMapper(nextProps);\n }\n };\n\n _class2.prototype.render = function render() {\n return factory(_extends({}, this.props, this.computedProps));\n };\n\n return _class2;\n }(__WEBPACK_IMPORTED_MODULE_0_react__[\"Component\"]);\n };\n};\n\nvar withPropsOnChange$1 = createHelper(withPropsOnChange, 'withPropsOnChange');\n\nvar mapValues = function mapValues(obj, func) {\n var result = {};\n /* eslint-disable no-restricted-syntax */\n for (var key in obj) {\n if (obj.hasOwnProperty(key)) {\n result[key] = func(obj[key], key);\n }\n }\n /* eslint-enable no-restricted-syntax */\n return result;\n};\n\nvar withHandlers = function withHandlers(handlers) {\n return function (BaseComponent) {\n var _class, _temp2, _initialiseProps;\n\n var factory = createFactory(BaseComponent);\n return _temp2 = _class = function (_Component) {\n inherits(_class, _Component);\n\n function _class() {\n var _temp, _this, _ret;\n\n classCallCheck(this, _class);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = possibleConstructorReturn(this, _Component.call.apply(_Component, [this].concat(args))), _this), _initialiseProps.call(_this), _temp), possibleConstructorReturn(_this, _ret);\n }\n\n _class.prototype.componentWillReceiveProps = function componentWillReceiveProps() {\n this.cachedHandlers = {};\n };\n\n _class.prototype.render = function render() {\n return factory(_extends({}, this.props, this.handlers));\n };\n\n return _class;\n }(__WEBPACK_IMPORTED_MODULE_0_react__[\"Component\"]), _initialiseProps = function _initialiseProps() {\n var _this2 = this;\n\n this.cachedHandlers = {};\n this.handlers = mapValues(typeof handlers === 'function' ? handlers(this.props) : handlers, function (createHandler, handlerName) {\n return function () {\n var cachedHandler = _this2.cachedHandlers[handlerName];\n if (cachedHandler) {\n return cachedHandler.apply(undefined, arguments);\n }\n\n var handler = createHandler(_this2.props);\n _this2.cachedHandlers[handlerName] = handler;\n\n if (\"dev\" !== 'production' && typeof handler !== 'function') {\n console.error( // eslint-disable-line no-console\n 'withHandlers(): Expected a map of higher-order functions. ' + 'Refer to the docs for more info.');\n }\n\n return handler.apply(undefined, arguments);\n };\n });\n }, _temp2;\n };\n};\n\nvar withHandlers$1 = createHelper(withHandlers, 'withHandlers');\n\nvar defaultProps = function defaultProps(props) {\n return function (BaseComponent) {\n var factory = createFactory(BaseComponent);\n var DefaultProps = function DefaultProps(ownerProps) {\n return factory(ownerProps);\n };\n DefaultProps.defaultProps = props;\n return DefaultProps;\n };\n};\n\nvar defaultProps$1 = createHelper(defaultProps, 'defaultProps');\n\nvar omit = function omit(obj, keys) {\n var rest = objectWithoutProperties(obj, []);\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n if (rest.hasOwnProperty(key)) {\n delete rest[key];\n }\n }\n return rest;\n};\n\nvar renameProp = function renameProp(oldName, newName) {\n return mapProps$1(function (props) {\n var _babelHelpers$extends;\n\n return _extends({}, omit(props, [oldName]), (_babelHelpers$extends = {}, _babelHelpers$extends[newName] = props[oldName], _babelHelpers$extends));\n });\n};\n\nvar renameProp$1 = createHelper(renameProp, 'renameProp');\n\nvar keys = Object.keys;\n\n\nvar mapKeys = function mapKeys(obj, func) {\n return keys(obj).reduce(function (result, key) {\n var val = obj[key];\n /* eslint-disable no-param-reassign */\n result[func(val, key)] = val;\n /* eslint-enable no-param-reassign */\n return result;\n }, {});\n};\n\nvar renameProps = function renameProps(nameMap) {\n return mapProps$1(function (props) {\n return _extends({}, omit(props, keys(nameMap)), mapKeys(pick(props, keys(nameMap)), function (_, oldName) {\n return nameMap[oldName];\n }));\n });\n};\n\nvar renameProps$1 = createHelper(renameProps, 'renameProps');\n\nvar flattenProp = function flattenProp(propName) {\n return function (BaseComponent) {\n var factory = createFactory(BaseComponent);\n return function (props) {\n return factory(_extends({}, props, props[propName]));\n };\n };\n};\n\nvar flattenProp$1 = createHelper(flattenProp, 'flattenProp');\n\nvar withState = function withState(stateName, stateUpdaterName, initialState) {\n return function (BaseComponent) {\n var factory = createFactory(BaseComponent);\n return function (_Component) {\n inherits(_class2, _Component);\n\n function _class2() {\n var _temp, _this, _ret;\n\n classCallCheck(this, _class2);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = possibleConstructorReturn(this, _Component.call.apply(_Component, [this].concat(args))), _this), _this.state = {\n stateValue: typeof initialState === 'function' ? initialState(_this.props) : initialState\n }, _this.updateStateValue = function (updateFn, callback) {\n return _this.setState(function (_ref) {\n var stateValue = _ref.stateValue;\n return {\n stateValue: typeof updateFn === 'function' ? updateFn(stateValue) : updateFn\n };\n }, callback);\n }, _temp), possibleConstructorReturn(_this, _ret);\n }\n\n _class2.prototype.render = function render() {\n var _babelHelpers$extends;\n\n return factory(_extends({}, this.props, (_babelHelpers$extends = {}, _babelHelpers$extends[stateName] = this.state.stateValue, _babelHelpers$extends[stateUpdaterName] = this.updateStateValue, _babelHelpers$extends)));\n };\n\n return _class2;\n }(__WEBPACK_IMPORTED_MODULE_0_react__[\"Component\"]);\n };\n};\n\nvar withState$1 = createHelper(withState, 'withState');\n\nvar withReducer = function withReducer(stateName, dispatchName, reducer, initialState) {\n return function (BaseComponent) {\n var factory = createFactory(BaseComponent);\n return function (_Component) {\n inherits(_class2, _Component);\n\n function _class2() {\n var _temp, _this, _ret;\n\n classCallCheck(this, _class2);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = possibleConstructorReturn(this, _Component.call.apply(_Component, [this].concat(args))), _this), _this.state = {\n stateValue: _this.initializeStateValue()\n }, _this.dispatch = function (action) {\n return _this.setState(function (_ref) {\n var stateValue = _ref.stateValue;\n return {\n stateValue: reducer(stateValue, action)\n };\n });\n }, _temp), possibleConstructorReturn(_this, _ret);\n }\n\n _class2.prototype.initializeStateValue = function initializeStateValue() {\n if (initialState !== undefined) {\n return typeof initialState === 'function' ? initialState(this.props) : initialState;\n }\n return reducer(undefined, { type: '@@recompose/INIT' });\n };\n\n _class2.prototype.render = function render() {\n var _babelHelpers$extends;\n\n return factory(_extends({}, this.props, (_babelHelpers$extends = {}, _babelHelpers$extends[stateName] = this.state.stateValue, _babelHelpers$extends[dispatchName] = this.dispatch, _babelHelpers$extends)));\n };\n\n return _class2;\n }(__WEBPACK_IMPORTED_MODULE_0_react__[\"Component\"]);\n };\n};\n\nvar withReducer$1 = createHelper(withReducer, 'withReducer');\n\nvar identity = function identity(Component$$1) {\n return Component$$1;\n};\n\nvar branch = function branch(test, left) {\n var right = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : identity;\n return function (BaseComponent) {\n var leftFactory = void 0;\n var rightFactory = void 0;\n return function (props) {\n if (test(props)) {\n leftFactory = leftFactory || createFactory(left(BaseComponent));\n return leftFactory(props);\n }\n rightFactory = rightFactory || createFactory(right(BaseComponent));\n return rightFactory(props);\n };\n };\n};\n\nvar branch$1 = createHelper(branch, 'branch');\n\nvar renderComponent = function renderComponent(Component$$1) {\n return function (_) {\n var factory = createFactory(Component$$1);\n var RenderComponent = function RenderComponent(props) {\n return factory(props);\n };\n if (true) {\n RenderComponent.displayName = wrapDisplayName(Component$$1, 'renderComponent');\n }\n return RenderComponent;\n };\n};\n\nvar renderComponent$1 = createHelper(renderComponent, 'renderComponent', false);\n\nvar Nothing = function (_Component) {\n inherits(Nothing, _Component);\n\n function Nothing() {\n classCallCheck(this, Nothing);\n return possibleConstructorReturn(this, _Component.apply(this, arguments));\n }\n\n Nothing.prototype.render = function render() {\n return null;\n };\n\n return Nothing;\n}(__WEBPACK_IMPORTED_MODULE_0_react__[\"Component\"]);\n\nNothing.displayName = 'Nothing';\n\nvar renderNothing = function renderNothing(_) {\n return Nothing;\n};\n\nvar renderNothing$1 = createHelper(renderNothing, 'renderNothing', false, true);\n\nvar shouldUpdate = function shouldUpdate(test) {\n return function (BaseComponent) {\n var factory = createFactory(BaseComponent);\n return function (_Component) {\n inherits(_class, _Component);\n\n function _class() {\n classCallCheck(this, _class);\n return possibleConstructorReturn(this, _Component.apply(this, arguments));\n }\n\n _class.prototype.shouldComponentUpdate = function shouldComponentUpdate(nextProps) {\n return test(this.props, nextProps);\n };\n\n _class.prototype.render = function render() {\n return factory(this.props);\n };\n\n return _class;\n }(__WEBPACK_IMPORTED_MODULE_0_react__[\"Component\"]);\n };\n};\n\nvar shouldUpdate$1 = createHelper(shouldUpdate, 'shouldUpdate');\n\nvar pure = shouldUpdate$1(function (props, nextProps) {\n return !__WEBPACK_IMPORTED_MODULE_1_fbjs_lib_shallowEqual___default()(props, nextProps);\n});\n\nvar pure$1 = createHelper(pure, 'pure', true, true);\n\nvar onlyUpdateForKeys = function onlyUpdateForKeys(propKeys) {\n return shouldUpdate$1(function (props, nextProps) {\n return !__WEBPACK_IMPORTED_MODULE_1_fbjs_lib_shallowEqual___default()(pick(nextProps, propKeys), pick(props, propKeys));\n });\n};\n\nvar onlyUpdateForKeys$1 = createHelper(onlyUpdateForKeys, 'onlyUpdateForKeys');\n\nvar onlyUpdateForPropTypes = function onlyUpdateForPropTypes(BaseComponent) {\n var propTypes = BaseComponent.propTypes;\n\n if (true) {\n if (!propTypes) {\n /* eslint-disable */\n console.error('A component without any `propTypes` was passed to ' + '`onlyUpdateForPropTypes()`. Check the implementation of the ' + ('component with display name \"' + getDisplayName(BaseComponent) + '\".'));\n /* eslint-enable */\n }\n }\n\n var propKeys = Object.keys(propTypes || {});\n var OnlyUpdateForPropTypes = onlyUpdateForKeys$1(propKeys)(BaseComponent);\n\n return OnlyUpdateForPropTypes;\n};\n\nvar onlyUpdateForPropTypes$1 = createHelper(onlyUpdateForPropTypes, 'onlyUpdateForPropTypes', true, true);\n\nvar withContext = function withContext(childContextTypes, getChildContext) {\n return function (BaseComponent) {\n var factory = createFactory(BaseComponent);\n\n var WithContext = function (_Component) {\n inherits(WithContext, _Component);\n\n function WithContext() {\n var _temp, _this, _ret;\n\n classCallCheck(this, WithContext);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = possibleConstructorReturn(this, _Component.call.apply(_Component, [this].concat(args))), _this), _this.getChildContext = function () {\n return getChildContext(_this.props);\n }, _temp), possibleConstructorReturn(_this, _ret);\n }\n\n WithContext.prototype.render = function render() {\n return factory(this.props);\n };\n\n return WithContext;\n }(__WEBPACK_IMPORTED_MODULE_0_react__[\"Component\"]);\n\n WithContext.childContextTypes = childContextTypes;\n\n return WithContext;\n };\n};\n\nvar withContext$1 = createHelper(withContext, 'withContext');\n\nvar getContext = function getContext(contextTypes) {\n return function (BaseComponent) {\n var factory = createFactory(BaseComponent);\n var GetContext = function GetContext(ownerProps, context) {\n return factory(_extends({}, ownerProps, context));\n };\n\n GetContext.contextTypes = contextTypes;\n\n return GetContext;\n };\n};\n\nvar getContext$1 = createHelper(getContext, 'getContext');\n\nvar lifecycle = function lifecycle(spec) {\n return function (BaseComponent) {\n var factory = createFactory(BaseComponent);\n\n if (\"dev\" !== 'production' && spec.hasOwnProperty('render')) {\n console.error('lifecycle() does not support the render method; its behavior is to ' + 'pass all props and state to the base component.');\n }\n\n return function (_Component) {\n inherits(_class, _Component);\n\n function _class() {\n classCallCheck(this, _class);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n var _this = possibleConstructorReturn(this, _Component.call.apply(_Component, [this].concat(args)));\n\n Object.assign(_this, spec);\n return _this;\n }\n\n _class.prototype.render = function render() {\n return factory(_extends({}, this.props, this.state));\n };\n\n return _class;\n }(__WEBPACK_IMPORTED_MODULE_0_react__[\"Component\"]);\n };\n};\n\nvar lifecycle$1 = createHelper(lifecycle, 'lifecycle');\n\nvar toClass = function toClass(baseComponent) {\n if (isClassComponent(baseComponent)) {\n return baseComponent;\n }\n\n var ToClass = function (_Component) {\n inherits(ToClass, _Component);\n\n function ToClass() {\n classCallCheck(this, ToClass);\n return possibleConstructorReturn(this, _Component.apply(this, arguments));\n }\n\n ToClass.prototype.render = function render() {\n if (typeof baseComponent === 'string') {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(baseComponent, this.props);\n }\n return baseComponent(this.props, this.context);\n };\n\n return ToClass;\n }(__WEBPACK_IMPORTED_MODULE_0_react__[\"Component\"]);\n\n ToClass.displayName = getDisplayName(baseComponent);\n ToClass.propTypes = baseComponent.propTypes;\n ToClass.contextTypes = baseComponent.contextTypes;\n ToClass.defaultProps = baseComponent.defaultProps;\n\n return ToClass;\n};\n\nvar setStatic = function setStatic(key, value) {\n return function (BaseComponent) {\n /* eslint-disable no-param-reassign */\n BaseComponent[key] = value;\n /* eslint-enable no-param-reassign */\n return BaseComponent;\n };\n};\n\nvar setStatic$1 = createHelper(setStatic, 'setStatic', false);\n\nvar setPropTypes = function setPropTypes(propTypes) {\n return setStatic$1('propTypes', propTypes);\n};\n\nvar setPropTypes$1 = createHelper(setPropTypes, 'setPropTypes', false);\n\nvar setDisplayName = function setDisplayName(displayName) {\n return setStatic$1('displayName', displayName);\n};\n\nvar setDisplayName$1 = createHelper(setDisplayName, 'setDisplayName', false);\n\nfunction compose() {\n for (var _len = arguments.length, funcs = Array(_len), _key = 0; _key < _len; _key++) {\n funcs[_key] = arguments[_key];\n }\n\n if (funcs.length === 0) {\n return function (arg) {\n return arg;\n };\n }\n\n if (funcs.length === 1) {\n return funcs[0];\n }\n\n return funcs.reduce(function (a, b) {\n return function () {\n return a(b.apply(undefined, arguments));\n };\n });\n}\n\nvar createEagerElement = function createEagerElement(type, props, children) {\n var isReferentiallyTransparent = isReferentiallyTransparentFunctionComponent(type);\n /* eslint-disable */\n var hasKey = props && props.hasOwnProperty('key');\n /* eslint-enable */\n return createEagerElementUtil(hasKey, isReferentiallyTransparent, type, props, children);\n};\n\nvar createSink = function createSink(callback) {\n return function (_Component) {\n inherits(Sink, _Component);\n\n function Sink() {\n classCallCheck(this, Sink);\n return possibleConstructorReturn(this, _Component.apply(this, arguments));\n }\n\n Sink.prototype.componentWillMount = function componentWillMount() {\n callback(this.props);\n };\n\n Sink.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {\n callback(nextProps);\n };\n\n Sink.prototype.render = function render() {\n return null;\n };\n\n return Sink;\n }(__WEBPACK_IMPORTED_MODULE_0_react__[\"Component\"]);\n};\n\nvar componentFromProp = function componentFromProp(propName) {\n var Component$$1 = function Component$$1(props) {\n return createEagerElement(props[propName], omit(props, [propName]));\n };\n Component$$1.displayName = 'componentFromProp(' + propName + ')';\n return Component$$1;\n};\n\nvar nest = function nest() {\n for (var _len = arguments.length, Components = Array(_len), _key = 0; _key < _len; _key++) {\n Components[_key] = arguments[_key];\n }\n\n var factories = Components.map(createFactory);\n var Nest = function Nest(_ref) {\n var props = objectWithoutProperties(_ref, []),\n children = _ref.children;\n return factories.reduceRight(function (child, factory) {\n return factory(props, child);\n }, children);\n };\n\n if (true) {\n var displayNames = Components.map(getDisplayName);\n Nest.displayName = 'nest(' + displayNames.join(', ') + ')';\n }\n\n return Nest;\n};\n\nvar hoistStatics = function hoistStatics(higherOrderComponent) {\n return function (BaseComponent) {\n var NewComponent = higherOrderComponent(BaseComponent);\n __WEBPACK_IMPORTED_MODULE_2_hoist_non_react_statics___default()(NewComponent, BaseComponent);\n return NewComponent;\n };\n};\n\nvar _config = {\n fromESObservable: null,\n toESObservable: null\n};\n\nvar configureObservable = function configureObservable(c) {\n _config = c;\n};\n\nvar config = {\n fromESObservable: function fromESObservable(observable) {\n return typeof _config.fromESObservable === 'function' ? _config.fromESObservable(observable) : observable;\n },\n toESObservable: function toESObservable(stream) {\n return typeof _config.toESObservable === 'function' ? _config.toESObservable(stream) : stream;\n }\n};\n\nvar componentFromStreamWithConfig = function componentFromStreamWithConfig(config$$1) {\n return function (propsToVdom) {\n return function (_Component) {\n inherits(ComponentFromStream, _Component);\n\n function ComponentFromStream() {\n var _config$fromESObserva;\n\n var _temp, _this, _ret;\n\n classCallCheck(this, ComponentFromStream);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = possibleConstructorReturn(this, _Component.call.apply(_Component, [this].concat(args))), _this), _this.state = { vdom: null }, _this.propsEmitter = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3_change_emitter__[\"createChangeEmitter\"])(), _this.props$ = config$$1.fromESObservable((_config$fromESObserva = {\n subscribe: function subscribe(observer) {\n var unsubscribe = _this.propsEmitter.listen(function (props) {\n if (props) {\n observer.next(props);\n } else {\n observer.complete();\n }\n });\n return { unsubscribe: unsubscribe };\n }\n }, _config$fromESObserva[__WEBPACK_IMPORTED_MODULE_4_symbol_observable___default.a] = function () {\n return this;\n }, _config$fromESObserva)), _this.vdom$ = config$$1.toESObservable(propsToVdom(_this.props$)), _temp), possibleConstructorReturn(_this, _ret);\n }\n\n // Stream of props\n\n\n // Stream of vdom\n\n\n ComponentFromStream.prototype.componentWillMount = function componentWillMount() {\n var _this2 = this;\n\n // Subscribe to child prop changes so we know when to re-render\n this.subscription = this.vdom$.subscribe({\n next: function next(vdom) {\n _this2.setState({ vdom: vdom });\n }\n });\n this.propsEmitter.emit(this.props);\n };\n\n ComponentFromStream.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {\n // Receive new props from the owner\n this.propsEmitter.emit(nextProps);\n };\n\n ComponentFromStream.prototype.shouldComponentUpdate = function shouldComponentUpdate(nextProps, nextState) {\n return nextState.vdom !== this.state.vdom;\n };\n\n ComponentFromStream.prototype.componentWillUnmount = function componentWillUnmount() {\n // Call without arguments to complete stream\n this.propsEmitter.emit();\n\n // Clean-up subscription before un-mounting\n this.subscription.unsubscribe();\n };\n\n ComponentFromStream.prototype.render = function render() {\n return this.state.vdom;\n };\n\n return ComponentFromStream;\n }(__WEBPACK_IMPORTED_MODULE_0_react__[\"Component\"]);\n };\n};\n\nvar componentFromStream = componentFromStreamWithConfig(config);\n\nvar identity$1 = function identity(t) {\n return t;\n};\nvar componentFromStream$2 = componentFromStreamWithConfig({\n fromESObservable: identity$1,\n toESObservable: identity$1\n});\n\nvar mapPropsStreamWithConfig = function mapPropsStreamWithConfig(config$$1) {\n return function (transform) {\n return function (BaseComponent) {\n var factory = createFactory(BaseComponent);\n var fromESObservable = config$$1.fromESObservable,\n toESObservable = config$$1.toESObservable;\n\n return componentFromStream$2(function (props$) {\n var _ref;\n\n return _ref = {\n subscribe: function subscribe(observer) {\n var subscription = toESObservable(transform(fromESObservable(props$))).subscribe({\n next: function next(childProps) {\n return observer.next(factory(childProps));\n }\n });\n return {\n unsubscribe: function unsubscribe() {\n return subscription.unsubscribe();\n }\n };\n }\n }, _ref[__WEBPACK_IMPORTED_MODULE_4_symbol_observable___default.a] = function () {\n return this;\n }, _ref;\n });\n };\n };\n};\n\nvar mapPropsStream = mapPropsStreamWithConfig(config);\n\nvar mapPropsStream$1 = createHelper(mapPropsStream, 'mapPropsStream');\n\nvar createEventHandlerWithConfig = function createEventHandlerWithConfig(config$$1) {\n return function () {\n var _config$fromESObserva;\n\n var emitter = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3_change_emitter__[\"createChangeEmitter\"])();\n var stream = config$$1.fromESObservable((_config$fromESObserva = {\n subscribe: function subscribe(observer) {\n var unsubscribe = emitter.listen(function (value) {\n return observer.next(value);\n });\n return { unsubscribe: unsubscribe };\n }\n }, _config$fromESObserva[__WEBPACK_IMPORTED_MODULE_4_symbol_observable___default.a] = function () {\n return this;\n }, _config$fromESObserva));\n return {\n handler: emitter.emit,\n stream: stream\n };\n };\n};\n\nvar createEventHandler = createEventHandlerWithConfig(config);\n\n// Higher-order component helpers\n// Static property helpers\n\n// Composition function\n\n// Other utils\n\n// Observable helpers\n\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/recompose/es/Recompose.js\n// module id = 1481\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/recompose/es/Recompose.js?", + ); + + /***/ + }, + /* 1482 */ + /* unknown exports provided */ + /* exports used: devToolsEnhancer, composeWithDevTools */ + /*!*********************************************!*\ + !*** ./~/redux-devtools-extension/index.js ***! + \*********************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nvar compose = __webpack_require__(/*! redux */ 129).compose;\n\nexports.__esModule = true;\nexports.composeWithDevTools = (\n typeof window !== 'undefined' && window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ ?\n window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ :\n function() {\n if (arguments.length === 0) return undefined;\n if (typeof arguments[0] === 'object') return compose;\n return compose.apply(null, arguments);\n }\n);\n\nexports.devToolsEnhancer = (\n typeof window !== 'undefined' && window.__REDUX_DEVTOOLS_EXTENSION__ ?\n window.__REDUX_DEVTOOLS_EXTENSION__ :\n function() { return function(noop) { return noop; } }\n);\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/redux-devtools-extension/index.js\n// module id = 1482\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/redux-devtools-extension/index.js?", + ); + + /***/ + }, + /* 1483 */ + /* unknown exports provided */ + /* exports used: default */ + /*!************************************!*\ + !*** ./~/redux-thunk/lib/index.js ***! + \************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nexports.__esModule = true;\nfunction createThunkMiddleware(extraArgument) {\n return function (_ref) {\n var dispatch = _ref.dispatch,\n getState = _ref.getState;\n return function (next) {\n return function (action) {\n if (typeof action === 'function') {\n return action(dispatch, getState, extraArgument);\n }\n\n return next(action);\n };\n };\n };\n}\n\nvar thunk = createThunkMiddleware();\nthunk.withExtraArgument = createThunkMiddleware;\n\nexports['default'] = thunk;\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/redux-thunk/lib/index.js\n// module id = 1483\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/redux-thunk/lib/index.js?", + ); + + /***/ + }, + /* 1484 */ + /* exports provided: default */ + /* exports used: default */ + /*!***************************************!*\ + !*** ./~/redux/es/applyMiddleware.js ***! + \***************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + '/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__compose__ = __webpack_require__(/*! ./compose */ 586);\n/* harmony export (immutable) */ __webpack_exports__["a"] = applyMiddleware;\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\n\n\n/**\n * Creates a store enhancer that applies middleware to the dispatch method\n * of the Redux store. This is handy for a variety of tasks, such as expressing\n * asynchronous actions in a concise manner, or logging every action payload.\n *\n * See `redux-thunk` package as an example of the Redux middleware.\n *\n * Because middleware is potentially asynchronous, this should be the first\n * store enhancer in the composition chain.\n *\n * Note that each middleware will be given the `dispatch` and `getState` functions\n * as named arguments.\n *\n * @param {...Function} middlewares The middleware chain to be applied.\n * @returns {Function} A store enhancer applying the middleware.\n */\nfunction applyMiddleware() {\n for (var _len = arguments.length, middlewares = Array(_len), _key = 0; _key < _len; _key++) {\n middlewares[_key] = arguments[_key];\n }\n\n return function (createStore) {\n return function (reducer, preloadedState, enhancer) {\n var store = createStore(reducer, preloadedState, enhancer);\n var _dispatch = store.dispatch;\n var chain = [];\n\n var middlewareAPI = {\n getState: store.getState,\n dispatch: function dispatch(action) {\n return _dispatch(action);\n }\n };\n chain = middlewares.map(function (middleware) {\n return middleware(middlewareAPI);\n });\n _dispatch = __WEBPACK_IMPORTED_MODULE_0__compose__["a" /* default */].apply(undefined, chain)(store.dispatch);\n\n return _extends({}, store, {\n dispatch: _dispatch\n });\n };\n };\n}\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/redux/es/applyMiddleware.js\n// module id = 1484\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/redux/es/applyMiddleware.js?', + ); + + /***/ + }, + /* 1485 */ + /* exports provided: default */ + /* exports used: default */ + /*!******************************************!*\ + !*** ./~/redux/es/bindActionCreators.js ***! + \******************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony export (immutable) */ __webpack_exports__[\"a\"] = bindActionCreators;\nfunction bindActionCreator(actionCreator, dispatch) {\n return function () {\n return dispatch(actionCreator.apply(undefined, arguments));\n };\n}\n\n/**\n * Turns an object whose values are action creators, into an object with the\n * same keys, but with every function wrapped into a `dispatch` call so they\n * may be invoked directly. This is just a convenience method, as you can call\n * `store.dispatch(MyActionCreators.doSomething())` yourself just fine.\n *\n * For convenience, you can also pass a single function as the first argument,\n * and get a function in return.\n *\n * @param {Function|Object} actionCreators An object whose values are action\n * creator functions. One handy way to obtain it is to use ES6 `import * as`\n * syntax. You may also pass a single function.\n *\n * @param {Function} dispatch The `dispatch` function available on your Redux\n * store.\n *\n * @returns {Function|Object} The object mimicking the original object, but with\n * every action creator wrapped into the `dispatch` call. If you passed a\n * function as `actionCreators`, the return value will also be a single\n * function.\n */\nfunction bindActionCreators(actionCreators, dispatch) {\n if (typeof actionCreators === 'function') {\n return bindActionCreator(actionCreators, dispatch);\n }\n\n if (typeof actionCreators !== 'object' || actionCreators === null) {\n throw new Error('bindActionCreators expected an object or a function, instead received ' + (actionCreators === null ? 'null' : typeof actionCreators) + '. ' + 'Did you write \"import ActionCreators from\" instead of \"import * as ActionCreators from\"?');\n }\n\n var keys = Object.keys(actionCreators);\n var boundActionCreators = {};\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n var actionCreator = actionCreators[key];\n if (typeof actionCreator === 'function') {\n boundActionCreators[key] = bindActionCreator(actionCreator, dispatch);\n }\n }\n return boundActionCreators;\n}\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/redux/es/bindActionCreators.js\n// module id = 1485\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/redux/es/bindActionCreators.js?", + ); + + /***/ + }, + /* 1486 */ + /* exports provided: default */ + /* exports used: default */ + /*!***************************************!*\ + !*** ./~/redux/es/combineReducers.js ***! + \***************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createStore__ = __webpack_require__(/*! ./createStore */ 587);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_es_isPlainObject__ = __webpack_require__(/*! lodash-es/isPlainObject */ 220);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_warning__ = __webpack_require__(/*! ./utils/warning */ 588);\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = combineReducers;\n\n\n\n\nfunction getUndefinedStateErrorMessage(key, action) {\n var actionType = action && action.type;\n var actionName = actionType && '\"' + actionType.toString() + '\"' || 'an action';\n\n return 'Given action ' + actionName + ', reducer \"' + key + '\" returned undefined. ' + 'To ignore an action, you must explicitly return the previous state.';\n}\n\nfunction getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) {\n var reducerKeys = Object.keys(reducers);\n var argumentName = action && action.type === __WEBPACK_IMPORTED_MODULE_0__createStore__[\"b\" /* ActionTypes */].INIT ? 'preloadedState argument passed to createStore' : 'previous state received by the reducer';\n\n if (reducerKeys.length === 0) {\n return 'Store does not have a valid reducer. Make sure the argument passed ' + 'to combineReducers is an object whose values are reducers.';\n }\n\n if (!__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_lodash_es_isPlainObject__[\"a\" /* default */])(inputState)) {\n return 'The ' + argumentName + ' has unexpected type of \"' + {}.toString.call(inputState).match(/\\s([a-z|A-Z]+)/)[1] + '\". Expected argument to be an object with the following ' + ('keys: \"' + reducerKeys.join('\", \"') + '\"');\n }\n\n var unexpectedKeys = Object.keys(inputState).filter(function (key) {\n return !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key];\n });\n\n unexpectedKeys.forEach(function (key) {\n unexpectedKeyCache[key] = true;\n });\n\n if (unexpectedKeys.length > 0) {\n return 'Unexpected ' + (unexpectedKeys.length > 1 ? 'keys' : 'key') + ' ' + ('\"' + unexpectedKeys.join('\", \"') + '\" found in ' + argumentName + '. ') + 'Expected to find one of the known reducer keys instead: ' + ('\"' + reducerKeys.join('\", \"') + '\". Unexpected keys will be ignored.');\n }\n}\n\nfunction assertReducerSanity(reducers) {\n Object.keys(reducers).forEach(function (key) {\n var reducer = reducers[key];\n var initialState = reducer(undefined, { type: __WEBPACK_IMPORTED_MODULE_0__createStore__[\"b\" /* ActionTypes */].INIT });\n\n if (typeof initialState === 'undefined') {\n throw new Error('Reducer \"' + key + '\" returned undefined during initialization. ' + 'If the state passed to the reducer is undefined, you must ' + 'explicitly return the initial state. The initial state may ' + 'not be undefined.');\n }\n\n var type = '@@redux/PROBE_UNKNOWN_ACTION_' + Math.random().toString(36).substring(7).split('').join('.');\n if (typeof reducer(undefined, { type: type }) === 'undefined') {\n throw new Error('Reducer \"' + key + '\" returned undefined when probed with a random type. ' + ('Don\\'t try to handle ' + __WEBPACK_IMPORTED_MODULE_0__createStore__[\"b\" /* ActionTypes */].INIT + ' or other actions in \"redux/*\" ') + 'namespace. They are considered private. Instead, you must return the ' + 'current state for any unknown actions, unless it is undefined, ' + 'in which case you must return the initial state, regardless of the ' + 'action type. The initial state may not be undefined.');\n }\n });\n}\n\n/**\n * Turns an object whose values are different reducer functions, into a single\n * reducer function. It will call every child reducer, and gather their results\n * into a single state object, whose keys correspond to the keys of the passed\n * reducer functions.\n *\n * @param {Object} reducers An object whose values correspond to different\n * reducer functions that need to be combined into one. One handy way to obtain\n * it is to use ES6 `import * as reducers` syntax. The reducers may never return\n * undefined for any action. Instead, they should return their initial state\n * if the state passed to them was undefined, and the current state for any\n * unrecognized action.\n *\n * @returns {Function} A reducer function that invokes every reducer inside the\n * passed object, and builds a state object with the same shape.\n */\nfunction combineReducers(reducers) {\n var reducerKeys = Object.keys(reducers);\n var finalReducers = {};\n for (var i = 0; i < reducerKeys.length; i++) {\n var key = reducerKeys[i];\n\n if (true) {\n if (typeof reducers[key] === 'undefined') {\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__utils_warning__[\"a\" /* default */])('No reducer provided for key \"' + key + '\"');\n }\n }\n\n if (typeof reducers[key] === 'function') {\n finalReducers[key] = reducers[key];\n }\n }\n var finalReducerKeys = Object.keys(finalReducers);\n\n if (true) {\n var unexpectedKeyCache = {};\n }\n\n var sanityError;\n try {\n assertReducerSanity(finalReducers);\n } catch (e) {\n sanityError = e;\n }\n\n return function combination() {\n var state = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n var action = arguments[1];\n\n if (sanityError) {\n throw sanityError;\n }\n\n if (true) {\n var warningMessage = getUnexpectedStateShapeWarningMessage(state, finalReducers, action, unexpectedKeyCache);\n if (warningMessage) {\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__utils_warning__[\"a\" /* default */])(warningMessage);\n }\n }\n\n var hasChanged = false;\n var nextState = {};\n for (var i = 0; i < finalReducerKeys.length; i++) {\n var key = finalReducerKeys[i];\n var reducer = finalReducers[key];\n var previousStateForKey = state[key];\n var nextStateForKey = reducer(previousStateForKey, action);\n if (typeof nextStateForKey === 'undefined') {\n var errorMessage = getUndefinedStateErrorMessage(key, action);\n throw new Error(errorMessage);\n }\n nextState[key] = nextStateForKey;\n hasChanged = hasChanged || nextStateForKey !== previousStateForKey;\n }\n return hasChanged ? nextState : state;\n };\n}\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/redux/es/combineReducers.js\n// module id = 1486\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/redux/es/combineReducers.js?", + ); + + /***/ + }, + /* 1487 */ + /* exports provided: default */ + /* all exports used */ + /*!**************************************************************!*\ + !*** ./~/resize-observer-polyfill/dist/ResizeObserver.es.js ***! + \**************************************************************/ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + eval( + "/* WEBPACK VAR INJECTION */(function(global) {Object.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/**\n * Exports global object for the current environment.\n */\nvar global$1 = (function () {\n if (typeof global != 'undefined' && global.Math === Math) {\n return global;\n }\n\n if (typeof self != 'undefined' && self.Math === Math) {\n return self;\n }\n\n if (typeof window != 'undefined' && window.Math === Math) {\n return window;\n }\n\n // eslint-disable-next-line no-new-func\n return Function('return this')();\n})();\n\n/**\n * A collection of shims that provide minimal functionality of the ES6 collections.\n *\n * These implementations are not meant to be used outside of the ResizeObserver\n * modules as they cover only a limited range of use cases.\n */\n/* eslint-disable require-jsdoc */\nvar Map = (function () {\n if (typeof global$1.Map === 'function') {\n return global$1.Map;\n }\n\n function getIndex(arr, key) {\n var result = -1;\n\n arr.some(function (entry, index) {\n if (entry[0] === key) {\n result = index;\n\n return true;\n }\n\n return false;\n });\n\n return result;\n }\n\n return (function () {\n function anonymous() {\n this.__entries__ = [];\n }\n\n var prototypeAccessors = { size: {} };\n\n prototypeAccessors.size.get = function () {\n return this.__entries__.length;\n };\n\n anonymous.prototype.get = function (key) {\n var index = getIndex(this.__entries__, key);\n var entry = this.__entries__[index];\n\n return entry && entry[1];\n };\n\n anonymous.prototype.set = function (key, value) {\n var index = getIndex(this.__entries__, key);\n\n if (~index) {\n this.__entries__[index][1] = value;\n } else {\n this.__entries__.push([key, value]);\n }\n };\n\n anonymous.prototype.delete = function (key) {\n var entries = this.__entries__;\n var index = getIndex(entries, key);\n\n if (~index) {\n entries.splice(index, 1);\n }\n };\n\n anonymous.prototype.has = function (key) {\n return !!~getIndex(this.__entries__, key);\n };\n\n anonymous.prototype.clear = function () {\n this.__entries__.splice(0);\n };\n\n anonymous.prototype.forEach = function (callback, ctx) {\n var this$1 = this;\n if ( ctx === void 0 ) ctx = null;\n\n for (var i = 0, list = this$1.__entries__; i < list.length; i += 1) {\n var entry = list[i];\n\n callback.call(ctx, entry[1], entry[0]);\n }\n };\n\n Object.defineProperties( anonymous.prototype, prototypeAccessors );\n\n return anonymous;\n }());\n})();\n\n/**\n * Detects whether window and document objects are available in current environment.\n */\nvar isBrowser = global$1.window === global$1 && typeof document != 'undefined';\n\n/**\n * A shim for the requestAnimationFrame which falls back to the setTimeout if\n * first one is not supported.\n *\n * @returns {number} Requests' identifier.\n */\nvar requestAnimationFrame$1 = (function () {\n if (typeof requestAnimationFrame === 'function') {\n return requestAnimationFrame;\n }\n\n return function (callback) { return setTimeout(function () { return callback(Date.now()); }, 1000 / 60); };\n})();\n\n// Defines minimum timeout before adding a trailing call.\nvar trailingTimeout = 2;\n\n/**\n * Returns time stamp retrieved either from the \"performance.now\" or from\n * the \"Date.now\" method.\n *\n * @returns {DOMHighResTimeStamp|number}\n */\nvar timeStamp = (function () {\n var host = Date;\n\n if (typeof performance === 'object' && typeof performance.now === 'function') {\n host = performance;\n }\n\n return function () { return host.now(); };\n})();\n\n/**\n * Creates a wrapper function which ensures that provided callback will be\n * invoked only once during the specified delay period. It also caches the last\n * call and re-invokes it after pending activation is resolved.\n *\n * @param {Function} callback - Function to be invoked after the delay period.\n * @param {number} delay - Delay after which to invoke callback.\n * @param {boolean} [afterRAF = false] - Whether function needs to be invoked as\n * a requestAnimationFrame callback.\n * @returns {Function}\n */\nvar throttle = function (callback, delay, afterRAF) {\n if ( afterRAF === void 0 ) afterRAF = false;\n\n var leadingCall = false,\n trailingCall = false,\n lastCallTime = 0;\n\n /**\n * Invokes the original callback function and schedules a new invocation if\n * the wrapper was called during current request.\n *\n * @returns {void}\n */\n function invokeCallback() {\n leadingCall = false;\n\n // Invoke original function.\n callback();\n\n // Schedule new invocation if there has been a call during delay period.\n if (trailingCall) {\n proxy();\n }\n }\n\n /**\n * Callback that will be invoked after the specified delay period. It will\n * delegate invocation of the original function to the requestAnimationFrame\n * if \"afterRAF\" parameter is set to \"true\".\n *\n * @returns {void}\n */\n function timeoutCallback() {\n afterRAF ? requestAnimationFrame$1(invokeCallback) : invokeCallback();\n }\n\n /**\n * Schedules invocation of the initial function.\n *\n * @returns {void}\n */\n function proxy() {\n var callTime = timeStamp();\n\n // Postpone activation if there is already a pending call.\n if (leadingCall) {\n // Reject immediately following invocations.\n if (callTime - lastCallTime < trailingTimeout) {\n return;\n }\n\n trailingCall = true;\n } else {\n leadingCall = true;\n trailingCall = false;\n\n // Schedule new invocation.\n setTimeout(timeoutCallback, delay);\n }\n\n lastCallTime = callTime;\n }\n\n return proxy;\n};\n\n// Minimum delay before invoking the update of observers.\nvar REFRESH_DELAY = 20;\n\n// Delay before the next iteration of the continuous cycle.\nvar CONTINUOUS_DELAY = 80;\n\n// Define whether the MutationObserver is supported.\n// eslint-disable-next-line no-extra-parens\nvar mutationsSupported = typeof MutationObserver === 'function' &&\n// MutationObserver should not be used if running in IE11 as it's\n// implementation is unreliable. Example: https://jsfiddle.net/x2r3jpuz/2/\n// Unfortunately, there is no other way to check this issue but to use\n// userAgent's information.\ntypeof navigator === 'object' && !(navigator.appName === 'Netscape' && navigator.userAgent.match(/Trident\\/.*rv:11/));\n\n/**\n * Controller class which handles updates of ResizeObserver instances.\n * It decides when and for how long it's necessary to run updates by listening\n * to the windows \"resize\" event along with a tracking of DOM mutations\n * (nodes removal, changes of attributes, etc.).\n *\n * Transitions and animations are handled by running a repeatable update cycle\n * until the dimensions of observed elements are changing.\n *\n * Continuous update cycle will be used automatically in case MutationObserver\n * is not supported.\n */\nvar ResizeObserverController = function() {\n /**\n * Continuous updates must be enabled if MutationObserver is not supported.\n *\n * @private {boolean}\n */\n this.isCycleContinuous_ = !mutationsSupported;\n\n /**\n * Indicates whether DOM listeners have been added.\n *\n * @private {boolean}\n */\n this.listenersEnabled_ = false;\n\n /**\n * Keeps reference to the instance of MutationObserver.\n *\n * @private {MutationObserver}\n */\n this.mutationsObserver_ = null;\n\n /**\n * A list of connected observers.\n *\n * @private {Array<ResizeObserverSPI>}\n */\n this.observers_ = [];\n\n // Make sure that the \"refresh\" method is invoked as a RAF callback and\n // that it happens only once during the provided period.\n this.refresh = throttle(this.refresh.bind(this), REFRESH_DELAY, true);\n\n // Additionally postpone invocation of the continuous updates.\n this.continuousUpdateHandler_ = throttle(this.refresh, CONTINUOUS_DELAY);\n};\n\n/**\n * Adds observer to observers list.\n *\n * @param {ResizeObserverSPI} observer - Observer to be added.\n * @returns {void}\n */\nResizeObserverController.prototype.connect = function (observer) {\n if (!this.isConnected(observer)) {\n this.observers_.push(observer);\n }\n\n // Add listeners if they haven't been added yet.\n if (!this.listenersEnabled_) {\n this.addListeners_();\n }\n};\n\n/**\n * Removes observer from observers list.\n *\n * @param {ResizeObserverSPI} observer - Observer to be removed.\n * @returns {void}\n */\nResizeObserverController.prototype.disconnect = function (observer) {\n var observers = this.observers_;\n var index = observers.indexOf(observer);\n\n // Remove observer if it's present in registry.\n if (~index) {\n observers.splice(index, 1);\n }\n\n // Remove listeners if controller has no connected observers.\n if (!observers.length && this.listenersEnabled_) {\n this.removeListeners_();\n }\n};\n\n/**\n * Tells whether the provided observer is connected to controller.\n *\n * @param {ResizeObserverSPI} observer - Observer to be checked.\n * @returns {boolean}\n */\nResizeObserverController.prototype.isConnected = function (observer) {\n return !!~this.observers_.indexOf(observer);\n};\n\n/**\n * Invokes the update of observers. It will continue running updates insofar\n * it detects changes or if continuous updates are enabled.\n *\n * @returns {void}\n */\nResizeObserverController.prototype.refresh = function () {\n var hasChanges = this.updateObservers_();\n\n // Continue running updates if changes have been detected as there might\n // be future ones caused by CSS transitions.\n if (hasChanges) {\n this.refresh();\n } else if (this.isCycleContinuous_ && this.listenersEnabled_) {\n // Automatically repeat cycle if it's necessary.\n this.continuousUpdateHandler_();\n }\n};\n\n/**\n * Updates every observer from observers list and notifies them of queued\n * entries.\n *\n * @private\n * @returns {boolean} Returns \"true\" if any observer has detected changes in\n * dimensions of it's elements.\n */\nResizeObserverController.prototype.updateObservers_ = function () {\n // Collect observers that have active entries.\n var active = this.observers_.filter(function (observer) {\n return observer.gatherActive(), observer.hasActive();\n });\n\n // Deliver notifications in a separate cycle in order to avoid any\n // collisions between observers. E.g. when multiple instances of\n // ResizeObserer are tracking the same element and the callback of one\n // of them changes content dimensions of the observed target. Sometimes\n // this may result in notifications being blocked for the rest of observers.\n active.forEach(function (observer) { return observer.broadcastActive(); });\n\n return active.length > 0;\n};\n\n/**\n * Initializes DOM listeners.\n *\n * @private\n * @returns {void}\n */\nResizeObserverController.prototype.addListeners_ = function () {\n // Do nothing if running in a non-browser environment or if listeners\n // have been already added.\n if (!isBrowser || this.listenersEnabled_) {\n return;\n }\n\n window.addEventListener('resize', this.refresh);\n\n // Subscription to the \"Transitionend\" event is used as a workaround for\n // delayed transitions. This way we can capture at least the final state\n // of an element.\n document.addEventListener('transitionend', this.refresh);\n\n // Subscribe to DOM mutations if it's possible as they may lead to\n // changes in the dimensions of elements.\n if (mutationsSupported) {\n this.mutationsObserver_ = new MutationObserver(this.refresh);\n\n this.mutationsObserver_.observe(document, {\n attributes: true,\n childList: true,\n characterData: true,\n subtree: true\n });\n }\n\n this.listenersEnabled_ = true;\n\n // Don't wait for a possible event that might trigger the update of\n // observers and manually initiate the update process.\n if (this.isCycleContinuous_) {\n this.refresh();\n }\n};\n\n/**\n * Removes DOM listeners.\n *\n * @private\n * @returns {void}\n */\nResizeObserverController.prototype.removeListeners_ = function () {\n // Do nothing if running in a non-browser environment or if listeners\n // have been already removed.\n if (!isBrowser || !this.listenersEnabled_) {\n return;\n }\n\n window.removeEventListener('resize', this.refresh);\n document.removeEventListener('transitionend', this.refresh);\n\n if (this.mutationsObserver_) {\n this.mutationsObserver_.disconnect();\n }\n\n this.mutationsObserver_ = null;\n this.listenersEnabled_ = false;\n};\n\n/**\n * Defines non-writable/enumerable properties of the provided target object.\n *\n * @param {Object} target - Object for which to define properties.\n * @param {Object} props - Properties to be defined.\n * @returns {Object} Target object.\n */\nvar defineConfigurable = (function (target, props) {\n for (var i = 0, list = Object.keys(props); i < list.length; i += 1) {\n var key = list[i];\n\n Object.defineProperty(target, key, {\n value: props[key],\n enumerbale: false,\n writable: false,\n configurable: true\n });\n }\n\n return target;\n});\n\n// Placeholder of an empty content rectangle.\nvar emptyRect = createRectInit(0, 0, 0, 0);\n\n/**\n * Converts provided string to a number.\n *\n * @param {number|string} value\n * @returns {number}\n */\nfunction toFloat(value) {\n return parseFloat(value) || 0;\n}\n\n/**\n * Extracts borders size from provided styles.\n *\n * @param {CSSStyleDeclaration} styles\n * @param {...string} positions - Borders positions (top, right, ...)\n * @returns {number}\n */\nfunction getBordersSize(styles) {\n var positions = Array.prototype.slice.call(arguments, 1);\n\n return positions.reduce(function (size, pos) {\n var value = styles['border-' + pos + '-width'];\n\n return size + toFloat(value);\n }, 0);\n}\n\n/**\n * Extracts paddings sizes from provided styles.\n *\n * @param {CSSStyleDeclaration} styles\n * @returns {Object} Paddings box.\n */\nfunction getPaddings(styles) {\n var boxKeys = ['top', 'right', 'bottom', 'left'];\n var paddings = {};\n\n for (var i = 0, list = boxKeys; i < list.length; i += 1) {\n var key = list[i];\n\n var value = styles['padding-' + key];\n\n paddings[key] = toFloat(value);\n }\n\n return paddings;\n}\n\n/**\n * Calculates content rectangle of provided SVG element.\n *\n * @param {SVGGraphicsElement} target - Element content rectangle of which needs\n * to be calculated.\n * @returns {DOMRectInit}\n */\nfunction getSVGContentRect(target) {\n var bbox = target.getBBox();\n\n return createRectInit(0, 0, bbox.width, bbox.height);\n}\n\n/**\n * Calculates content rectangle of provided HTMLElement.\n *\n * @param {HTMLElement} target - Element for which to calculate the content rectangle.\n * @returns {DOMRectInit}\n */\nfunction getHTMLElementContentRect(target) {\n // Client width & height properties can't be\n // used exclusively as they provide rounded values.\n var clientWidth = target.clientWidth;\n var clientHeight = target.clientHeight;\n\n // By this condition we can catch all non-replaced inline, hidden and\n // detached elements. Though elements with width & height properties less\n // than 0.5 will be discarded as well.\n //\n // Without it we would need to implement separate methods for each of\n // those cases and it's not possible to perform a precise and performance\n // effective test for hidden elements. E.g. even jQuery's ':visible' filter\n // gives wrong results for elements with width & height less than 0.5.\n if (!clientWidth && !clientHeight) {\n return emptyRect;\n }\n\n var styles = getComputedStyle(target);\n var paddings = getPaddings(styles);\n var horizPad = paddings.left + paddings.right;\n var vertPad = paddings.top + paddings.bottom;\n\n // Computed styles of width & height are being used because they are the\n // only dimensions available to JS that contain non-rounded values. It could\n // be possible to utilize getBoundingClientRect if only it's data wasn't\n // affected by CSS transformations let alone paddings, borders and scroll bars.\n var width = toFloat(styles.width),\n height = toFloat(styles.height);\n\n // Width & height include paddings and bord when 'border-box' box model is\n // applied (except for IE).\n if (styles.boxSizing === 'border-box') {\n // Following conditions are required to handle Internet Explorer which\n // doesn't include paddings and borders to computed CSS dimensions.\n //\n // We can say that if CSS dimensions + paddings are equal to the \"client\"\n // properties then it's either IE, and thus we don't need to subtract\n // anything, or an element merely doesn't have paddings/borders styles.\n if (Math.round(width + horizPad) !== clientWidth) {\n width -= getBordersSize(styles, 'left', 'right') + horizPad;\n }\n\n if (Math.round(height + vertPad) !== clientHeight) {\n height -= getBordersSize(styles, 'top', 'bottom') + vertPad;\n }\n }\n\n // Following steps can't applied to the document's root element as it's\n // client[Width/Height] properties represent viewport area of the window.\n // Besides, it's as well not necessary as the <html> itself neither has\n // rendered scroll bars nor it can be clipped.\n if (!isDocumentElement(target)) {\n // In some browsers (only in Firefox, actually) CSS width & height\n // include scroll bars size which can be removed at this step as scroll\n // bars are the only difference between rounded dimensions + paddings\n // and \"client\" properties, though that is not always true in Chrome.\n var vertScrollbar = Math.round(width + horizPad) - clientWidth;\n var horizScrollbar = Math.round(height + vertPad) - clientHeight;\n\n // Chrome has a rather weird rounding of \"client\" properties.\n // E.g. for an element with content width of 314.2px it sometimes gives\n // the client width of 315px and for the width of 314.7px it may give\n // 314px. And it doesn't happen all the time. So just ignore this delta\n // as a non-relevant.\n if (Math.abs(vertScrollbar) !== 1) {\n width -= vertScrollbar;\n }\n\n if (Math.abs(horizScrollbar) !== 1) {\n height -= horizScrollbar;\n }\n }\n\n return createRectInit(paddings.left, paddings.top, width, height);\n}\n\n/**\n * Checks whether provided element is an instance of the SVGGraphicsElement.\n *\n * @param {Element} target - Element to be checked.\n * @returns {boolean}\n */\nvar isSVGGraphicsElement = (function () {\n // Some browsers, namely IE and Edge, don't have the SVGGraphicsElement\n // interface.\n if (typeof SVGGraphicsElement === 'function') {\n return function (target) { return target instanceof SVGGraphicsElement; };\n }\n\n // If it's so, than check that element is at least an instance of the\n // SVGElement and that it has the \"getBBox\" method in the prototype chain.\n // eslint-disable-next-line no-extra-parens\n return function (target) { return target instanceof SVGElement && typeof target.getBBox === 'function'; };\n})();\n\n/**\n * Checks whether provided element is a document element (root element of a document, i.e. <html>).\n *\n * @param {Element} target - Element to be checked.\n * @returns {boolean}\n */\nfunction isDocumentElement(target) {\n return target === document.documentElement;\n}\n\n/**\n * Calculates an appropriate content rectangle for provided html or svg element.\n *\n * @param {Element} target - Element content rectangle of which needs to be calculated.\n * @returns {DOMRectInit}\n */\nfunction getContentRect(target) {\n // Return empty rectangle if running in a non-browser environment.\n if (!isBrowser) {\n return emptyRect;\n }\n\n if (isSVGGraphicsElement(target)) {\n return getSVGContentRect(target);\n }\n\n return getHTMLElementContentRect(target);\n}\n\n/**\n * Creates rectangle with an interface of the DOMRectReadOnly.\n * Spec: https://drafts.fxtf.org/geometry/#domrectreadonly\n *\n * @param {DOMRectInit} rectInit - Object with rectangle's x/y coordinates and dimensions.\n * @returns {DOMRectReadOnly}\n */\nfunction createReadOnlyRect(ref) {\n var x = ref.x;\n var y = ref.y;\n var width = ref.width;\n var height = ref.height;\n\n // If DOMRectReadOnly is available use it as a prototype for the rectangle.\n var Constr = typeof DOMRectReadOnly === 'function' ? DOMRectReadOnly : Object;\n var rect = Object.create(Constr.prototype);\n\n // Rectangle's properties are not writable and non-enumerable.\n defineConfigurable(rect, {\n x: x, y: y,\n width: width, height: height,\n top: y,\n right: x + width,\n bottom: height + y,\n left: x\n });\n\n return rect;\n}\n\n/**\n * Creates DOMRectInit object based on the provided dimensions and the x/y coordinates.\n * Spec: https://drafts.fxtf.org/geometry/#dictdef-domrectinit\n *\n * @param {number} x - X coordinate.\n * @param {number} y - Y coordinate.\n * @param {number} width - Rectangle's width.\n * @param {number} height - Rectangle's height.\n * @returns {DOMRectInit}\n */\nfunction createRectInit(x, y, width, height) {\n return { x: x, y: y, width: width, height: height };\n}\n\n/**\n * Class that is responsible for computations of the content rectangle of\n * provided DOM element and for keeping track of it's changes.\n */\nvar ResizeObservation = function(target) {\n /**\n * Reference to the observed element.\n *\n * @type {Element}\n */\n this.target = target;\n\n /**\n * Broadcasted width of content rectangle.\n *\n * @type {number}\n */\n this.broadcastWidth = 0;\n\n /**\n * Broadcasted height of content rectangle.\n *\n * @type {number}\n */\n this.broadcastHeight = 0;\n\n /**\n * Reference to the last observed content rectangle.\n *\n * @private {DOMRectInit}\n */\n this.contentRect_ = createRectInit(0, 0, 0, 0);\n};\n\n/**\n * Updates content rectangle and tells whether it's width or height properties\n * have changed since the last broadcast.\n *\n * @returns {boolean}\n */\nResizeObservation.prototype.isActive = function () {\n var rect = getContentRect(this.target);\n\n this.contentRect_ = rect;\n\n return rect.width !== this.broadcastWidth || rect.height !== this.broadcastHeight;\n};\n\n/**\n * Updates 'broadcastWidth' and 'broadcastHeight' properties with a data\n * from the corresponding properties of the last observed content rectangle.\n *\n * @returns {DOMRectInit} Last observed content rectangle.\n */\nResizeObservation.prototype.broadcastRect = function () {\n var rect = this.contentRect_;\n\n this.broadcastWidth = rect.width;\n this.broadcastHeight = rect.height;\n\n return rect;\n};\n\nvar ResizeObserverEntry = function(target, rectInit) {\n var contentRect = createReadOnlyRect(rectInit);\n\n // According to the specification following properties are not writable\n // and are also not enumerable in the native implementation.\n //\n // Property accessors are not being used as they'd require to define a\n // private WeakMap storage which may cause memory leaks in browsers that\n // don't support this type of collections.\n defineConfigurable(this, { target: target, contentRect: contentRect });\n};\n\nvar ResizeObserverSPI = function(callback, controller, callbackCtx) {\n if (typeof callback !== 'function') {\n throw new TypeError('The callback provided as parameter 1 is not a function.');\n }\n\n /**\n * Collection of resize observations that have detected changes in dimensions\n * of elements.\n *\n * Spec: https://wicg.github.io/ResizeObserver/#dom-resizeobserver-activetargets\n *\n * @private {Array<ResizeObservation>}\n */\n this.activeTargets_ = [];\n\n /**\n * Registry of the ResizeObservation instances.\n * Spec: https://wicg.github.io/ResizeObserver/#dom-resizeobserver-observationtargets\n *\n * @private {Map<Element, ResizeObservation>}\n */\n this.observationTargets_ = new Map();\n\n /**\n * Reference to the callback function.\n * Spec: https://wicg.github.io/ResizeObserver/#resize-observer-callback\n *\n * @private {ResizeObserverCallback}\n */\n this.callback_ = callback;\n\n /**\n * Reference to the associated ResizeObserverController.\n *\n * @private {ResizeObserverController}\n */\n this.controller_ = controller;\n\n /**\n * Public ResizeObserver instance which will be passed to the callback\n * function and used as a value of it's \"this\" binding.\n *\n * @private {ResizeObserver}\n */\n this.callbackCtx_ = callbackCtx;\n};\n\n/**\n * Starts observing provided element.\n * Spec: https://wicg.github.io/ResizeObserver/#dom-resizeobserver-observe\n *\n * @param {Element} target - Element to be observed.\n * @returns {void}\n */\nResizeObserverSPI.prototype.observe = function (target) {\n if (!arguments.length) {\n throw new TypeError('1 argument required, but only 0 present.');\n }\n\n // Do nothing if current environment doesn't have the Element interface.\n if (!('Element' in global$1) || !(Element instanceof Object)) {\n return;\n }\n\n if (!(target instanceof Element)) {\n throw new TypeError('parameter 1 is not of type \"Element\".');\n }\n\n var targets = this.observationTargets_;\n\n // Do nothing if element is already being observed.\n if (targets.has(target)) {\n return;\n }\n\n // Register new ResizeObservation instance.\n targets.set(target, new ResizeObservation(target));\n\n // Add observer to controller if it hasn't been connected yet.\n if (!this.controller_.isConnected(this)) {\n this.controller_.connect(this);\n }\n\n // Force the update of observations.\n this.controller_.refresh();\n};\n\n/**\n * Stops observing provided element.\n * Spec: https://wicg.github.io/ResizeObserver/#dom-resizeobserver-unobserve\n *\n * @param {Element} target - Element to stop observing.\n * @returns {void}\n */\nResizeObserverSPI.prototype.unobserve = function (target) {\n if (!arguments.length) {\n throw new TypeError('1 argument required, but only 0 present.');\n }\n\n // Do nothing if current environment doesn't have the Element interface.\n if (!('Element' in global$1) || !(Element instanceof Object)) {\n return;\n }\n\n if (!(target instanceof Element)) {\n throw new TypeError('parameter 1 is not of type \"Element\".');\n }\n\n var targets = this.observationTargets_;\n\n // Do nothing if element is not being observed.\n if (!targets.has(target)) {\n return;\n }\n\n // Remove element and associated with it ResizeObsrvation instance from\n // registry.\n targets.delete(target);\n\n // Set back the initial state if there is nothing to observe.\n if (!targets.size) {\n this.controller_.disconnect(this);\n }\n};\n\n/**\n * Stops observing all elements and clears the observations list.\n * Spec: https://wicg.github.io/ResizeObserver/#dom-resizeobserver-disconnect\n *\n * @returns {void}\n */\nResizeObserverSPI.prototype.disconnect = function () {\n this.clearActive();\n this.observationTargets_.clear();\n this.controller_.disconnect(this);\n};\n\n/**\n * Clears an array of previously collected active observations and collects\n * observation instances which associated element has changed it's content\n * rectangle.\n *\n * @returns {void}\n */\nResizeObserverSPI.prototype.gatherActive = function () {\n this.clearActive();\n\n var activeTargets = this.activeTargets_;\n\n this.observationTargets_.forEach(function (observation) {\n if (observation.isActive()) {\n activeTargets.push(observation);\n }\n });\n};\n\n/**\n * Invokes initial callback function with a list of ResizeObserverEntry\n * instances collected from active resize observations.\n *\n * @returns {void}\n */\nResizeObserverSPI.prototype.broadcastActive = function () {\n // Do nothing if observer doesn't have active observations.\n if (!this.hasActive()) {\n return;\n }\n\n var ctx = this.callbackCtx_;\n\n // Create ResizeObserverEntry instance for every active observation.\n var entries = this.activeTargets_.map(function (observation) {\n return new ResizeObserverEntry(observation.target, observation.broadcastRect());\n });\n\n this.callback_.call(ctx, entries, ctx);\n this.clearActive();\n};\n\n/**\n * Clears the collection of pending/active observations.\n *\n * @returns {void}\n */\nResizeObserverSPI.prototype.clearActive = function () {\n this.activeTargets_.splice(0);\n};\n\n/**\n * Tells whether observer has pending observations.\n *\n * @returns {boolean}\n */\nResizeObserverSPI.prototype.hasActive = function () {\n return this.activeTargets_.length > 0;\n};\n\n// Controller that will be assigned to all instances of the ResizeObserver.\nvar controller = new ResizeObserverController();\n\n// Registry of internal observers. If WeakMap is not available use current shim\n// of the Map collection as the former one can't be polyfilled anyway.\nvar observers = typeof WeakMap === 'function' ? new WeakMap() : new Map();\n\n/**\n * ResizeObserver API. Encapsulates the ResizeObserver SPI implementation\n * providing only those methods properties that are define in the spec.\n */\nvar ResizeObserver = function(callback) {\n if (!(this instanceof ResizeObserver)) {\n throw new TypeError('Cannot call a class as a function');\n }\n\n if (!arguments.length) {\n throw new TypeError('1 argument required, but only 0 present.');\n }\n\n // Create a new instance of an internal ResizeObserver.\n var observer = new ResizeObserverSPI(callback, controller, this);\n\n // Register internal observer.\n observers.set(this, observer);\n};\n\n// Expose public methods of ResizeObserver.\n['observe', 'unobserve', 'disconnect'].forEach(function (method) {\n ResizeObserver.prototype[method] = function () {\n var ref;\n\n return (ref = observers.get(this))[method].apply(ref, arguments);\n };\n});\n\nvar index = (function () {\n // Export existing implementation if it's available.\n if (typeof global$1.ResizeObserver === 'function') {\n return global$1.ResizeObserver;\n }\n\n return ResizeObserver;\n})();\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (index);\n\n/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(/*! ./../../webpack/buildin/global.js */ 104)))\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/resize-observer-polyfill/dist/ResizeObserver.es.js\n// module id = 1487\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/resize-observer-polyfill/dist/ResizeObserver.es.js?", + ); + + /***/ + }, + /* 1488 */ + /* unknown exports provided */ + /* all exports used */ + /*!********************************!*\ + !*** ./~/select/src/select.js ***! + \********************************/ + /***/ function (module, exports) { + eval( + "function select(element) {\n var selectedText;\n\n if (element.nodeName === 'SELECT') {\n element.focus();\n\n selectedText = element.value;\n }\n else if (element.nodeName === 'INPUT' || element.nodeName === 'TEXTAREA') {\n var isReadOnly = element.hasAttribute('readonly');\n\n if (!isReadOnly) {\n element.setAttribute('readonly', '');\n }\n\n element.select();\n element.setSelectionRange(0, element.value.length);\n\n if (!isReadOnly) {\n element.removeAttribute('readonly');\n }\n\n selectedText = element.value;\n }\n else {\n if (element.hasAttribute('contenteditable')) {\n element.focus();\n }\n\n var selection = window.getSelection();\n var range = document.createRange();\n\n range.selectNodeContents(element);\n selection.removeAllRanges();\n selection.addRange(range);\n\n selectedText = selection.toString();\n }\n\n return selectedText;\n}\n\nmodule.exports = select;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/select/src/select.js\n// module id = 1488\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/select/src/select.js?", + ); + + /***/ + }, + /* 1489 */ + /* unknown exports provided */ + /* all exports used */ + /*!**************************************!*\ + !*** ./~/strict-uri-encode/index.js ***! + \**************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\nmodule.exports = function (str) {\n\treturn encodeURIComponent(str).replace(/[!'()*]/g, function (c) {\n\t\treturn '%' + c.charCodeAt(0).toString(16).toUpperCase();\n\t});\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/strict-uri-encode/index.js\n// module id = 1489\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/strict-uri-encode/index.js?", + ); + + /***/ + }, + /* 1490 */ + /* unknown exports provided */ + /* all exports used */ + /*!******************************************!*\ + !*** ./~/symbol-observable/lib/index.js ***! + \******************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "/* WEBPACK VAR INJECTION */(function(global, module) {\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _ponyfill = __webpack_require__(/*! ./ponyfill */ 1491);\n\nvar _ponyfill2 = _interopRequireDefault(_ponyfill);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar root; /* global window */\n\n\nif (typeof self !== 'undefined') {\n root = self;\n} else if (typeof window !== 'undefined') {\n root = window;\n} else if (typeof global !== 'undefined') {\n root = global;\n} else if (true) {\n root = module;\n} else {\n root = Function('return this')();\n}\n\nvar result = (0, _ponyfill2['default'])(root);\nexports['default'] = result;\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(/*! ./../../webpack/buildin/global.js */ 104), __webpack_require__(/*! ./../../webpack/buildin/module.js */ 275)(module)))\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/symbol-observable/lib/index.js\n// module id = 1490\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/symbol-observable/lib/index.js?", + ); + + /***/ + }, + /* 1491 */ + /* unknown exports provided */ + /* all exports used */ + /*!*********************************************!*\ + !*** ./~/symbol-observable/lib/ponyfill.js ***! + \*********************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\nexports['default'] = symbolObservablePonyfill;\nfunction symbolObservablePonyfill(root) {\n\tvar result;\n\tvar _Symbol = root.Symbol;\n\n\tif (typeof _Symbol === 'function') {\n\t\tif (_Symbol.observable) {\n\t\t\tresult = _Symbol.observable;\n\t\t} else {\n\t\t\tresult = _Symbol('observable');\n\t\t\t_Symbol.observable = result;\n\t\t}\n\t} else {\n\t\tresult = '@@observable';\n\t}\n\n\treturn result;\n};\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/symbol-observable/lib/ponyfill.js\n// module id = 1491\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/symbol-observable/lib/ponyfill.js?", + ); + + /***/ + }, + /* 1492 */ + /* unknown exports provided */ + /* all exports used */ + /*!*********************************!*\ + !*** ./~/tiny-emitter/index.js ***! + \*********************************/ + /***/ function (module, exports) { + eval( + "function E () {\n // Keep this empty so it's easier to inherit from\n // (via https://github.com/lipsmack from https://github.com/scottcorgan/tiny-emitter/issues/3)\n}\n\nE.prototype = {\n on: function (name, callback, ctx) {\n var e = this.e || (this.e = {});\n\n (e[name] || (e[name] = [])).push({\n fn: callback,\n ctx: ctx\n });\n\n return this;\n },\n\n once: function (name, callback, ctx) {\n var self = this;\n function listener () {\n self.off(name, listener);\n callback.apply(ctx, arguments);\n };\n\n listener._ = callback\n return this.on(name, listener, ctx);\n },\n\n emit: function (name) {\n var data = [].slice.call(arguments, 1);\n var evtArr = ((this.e || (this.e = {}))[name] || []).slice();\n var i = 0;\n var len = evtArr.length;\n\n for (i; i < len; i++) {\n evtArr[i].fn.apply(evtArr[i].ctx, data);\n }\n\n return this;\n },\n\n off: function (name, callback) {\n var e = this.e || (this.e = {});\n var evts = e[name];\n var liveEvents = [];\n\n if (evts && callback) {\n for (var i = 0, len = evts.length; i < len; i++) {\n if (evts[i].fn !== callback && evts[i].fn._ !== callback)\n liveEvents.push(evts[i]);\n }\n }\n\n // Remove event from queue to prevent memory leak\n // Suggested by https://github.com/lazd\n // Ref: https://github.com/scottcorgan/tiny-emitter/commit/c6ebfaa9bc973b33d110a84a307742b7cf94c953#commitcomment-5024910\n\n (liveEvents.length)\n ? e[name] = liveEvents\n : delete e[name];\n\n return this;\n }\n};\n\nmodule.exports = E;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/tiny-emitter/index.js\n// module id = 1492\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/tiny-emitter/index.js?", + ); + + /***/ + }, + /* 1493 */ + /* unknown exports provided */ + /* all exports used */ + /*!**************************************************!*\ + !*** ./~/uncontrollable/createUncontrollable.js ***! + \**************************************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nexports.__esModule = true;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nexports.default = createUncontrollable;\n\nvar _react = __webpack_require__(/*! react */ 1);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _invariant = __webpack_require__(/*! invariant */ 25);\n\nvar _invariant2 = _interopRequireDefault(_invariant);\n\nvar _utils = __webpack_require__(/*! ./utils */ 1494);\n\nvar utils = _interopRequireWildcard(_utils);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction createUncontrollable(mixins, set) {\n\n return uncontrollable;\n\n function uncontrollable(Component, controlledValues) {\n var methods = arguments.length <= 2 || arguments[2] === undefined ? [] : arguments[2];\n\n var displayName = Component.displayName || Component.name || 'Component',\n basePropTypes = utils.getType(Component).propTypes,\n isCompositeComponent = utils.isReactComponent(Component),\n controlledProps = Object.keys(controlledValues),\n propTypes;\n\n var OMIT_PROPS = ['valueLink', 'checkedLink'].concat(controlledProps.map(utils.defaultKey));\n\n propTypes = utils.uncontrolledPropTypes(controlledValues, basePropTypes, displayName);\n\n (0, _invariant2.default)(isCompositeComponent || !methods.length, '[uncontrollable] stateless function components cannot pass through methods ' + 'because they have no associated instances. Check component: ' + displayName + ', ' + 'attempting to pass through methods: ' + methods.join(', '));\n\n methods = utils.transform(methods, function (obj, method) {\n obj[method] = function () {\n var _refs$inner;\n\n return (_refs$inner = this.refs.inner)[method].apply(_refs$inner, arguments);\n };\n }, {});\n\n var component = _react2.default.createClass(_extends({\n\n displayName: 'Uncontrolled(' + displayName + ')',\n\n mixins: mixins,\n\n propTypes: propTypes\n\n }, methods, {\n componentWillMount: function componentWillMount() {\n var _this = this;\n\n var props = this.props;\n\n this._values = {};\n\n controlledProps.forEach(function (key) {\n _this._values[key] = props[utils.defaultKey(key)];\n });\n },\n\n\n /**\n * If a prop switches from controlled to Uncontrolled\n * reset its value to the defaultValue\n */\n componentWillReceiveProps: function componentWillReceiveProps(nextProps) {\n var _this2 = this;\n\n var props = this.props;\n\n controlledProps.forEach(function (key) {\n if (utils.getValue(nextProps, key) === undefined && utils.getValue(props, key) !== undefined) {\n _this2._values[key] = nextProps[utils.defaultKey(key)];\n }\n });\n },\n getControlledInstance: function getControlledInstance() {\n return this.refs.inner;\n },\n render: function render() {\n var _this3 = this;\n\n var newProps = {},\n props = omitProps(this.props);\n\n utils.each(controlledValues, function (handle, propName) {\n var linkPropName = utils.getLinkName(propName),\n prop = _this3.props[propName];\n\n if (linkPropName && !isProp(_this3.props, propName) && isProp(_this3.props, linkPropName)) {\n prop = _this3.props[linkPropName].value;\n }\n\n newProps[propName] = prop !== undefined ? prop : _this3._values[propName];\n\n newProps[handle] = setAndNotify.bind(_this3, propName);\n });\n\n newProps = _extends({}, props, newProps, {\n ref: isCompositeComponent ? 'inner' : null\n });\n\n return _react2.default.createElement(Component, newProps);\n }\n }));\n\n component.ControlledComponent = Component;\n\n /**\n * useful when wrapping a Component and you want to control\n * everything\n */\n component.deferControlTo = function (newComponent) {\n var additions = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];\n var nextMethods = arguments[2];\n\n return uncontrollable(newComponent, _extends({}, controlledValues, additions), nextMethods);\n };\n\n return component;\n\n function setAndNotify(propName, value) {\n var linkName = utils.getLinkName(propName),\n handler = this.props[controlledValues[propName]];\n\n if (linkName && isProp(this.props, linkName) && !handler) {\n handler = this.props[linkName].requestChange;\n }\n\n for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\n args[_key - 2] = arguments[_key];\n }\n\n set(this, propName, handler, value, args);\n }\n\n function isProp(props, prop) {\n return props[prop] !== undefined;\n }\n\n function omitProps(props) {\n var result = {};\n\n utils.each(props, function (value, key) {\n if (OMIT_PROPS.indexOf(key) === -1) result[key] = value;\n });\n\n return result;\n }\n }\n}\nmodule.exports = exports['default'];\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/uncontrollable/createUncontrollable.js\n// module id = 1493\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/uncontrollable/createUncontrollable.js?", + ); + + /***/ + }, + /* 1494 */ + /* unknown exports provided */ + /* all exports used */ + /*!***********************************!*\ + !*** ./~/uncontrollable/utils.js ***! + \***********************************/ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + eval( + "\n\nexports.__esModule = true;\nexports.version = undefined;\nexports.uncontrolledPropTypes = uncontrolledPropTypes;\nexports.getType = getType;\nexports.getValue = getValue;\nexports.getLinkName = getLinkName;\nexports.defaultKey = defaultKey;\nexports.chain = chain;\nexports.transform = transform;\nexports.each = each;\nexports.has = has;\nexports.isReactComponent = isReactComponent;\n\nvar _react = __webpack_require__(/*! react */ 1);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _invariant = __webpack_require__(/*! invariant */ 25);\n\nvar _invariant2 = _interopRequireDefault(_invariant);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction readOnlyPropType(handler, name) {\n return function (props, propName) {\n if (props[propName] !== undefined) {\n if (!props[handler]) {\n return new Error('You have provided a `' + propName + '` prop to ' + '`' + name + '` without an `' + handler + '` handler. This will render a read-only field. ' + 'If the field should be mutable use `' + defaultKey(propName) + '`. Otherwise, set `' + handler + '`');\n }\n }\n };\n}\n\nfunction uncontrolledPropTypes(controlledValues, basePropTypes, displayName) {\n var propTypes = {};\n\n if (\"dev\" !== 'production' && basePropTypes) {\n transform(controlledValues, function (obj, handler, prop) {\n (0, _invariant2.default)(typeof handler === 'string' && handler.trim().length, 'Uncontrollable - [%s]: the prop `%s` needs a valid handler key name in order to make it uncontrollable', displayName, prop);\n\n obj[prop] = readOnlyPropType(handler, displayName);\n }, propTypes);\n }\n\n return propTypes;\n}\n\nvar version = exports.version = _react2.default.version.split('.').map(parseFloat);\n\nfunction getType(component) {\n if (version[0] >= 15 || version[0] === 0 && version[1] >= 13) return component;\n\n return component.type;\n}\n\nfunction getValue(props, name) {\n var linkPropName = getLinkName(name);\n\n if (linkPropName && !isProp(props, name) && isProp(props, linkPropName)) return props[linkPropName].value;\n\n return props[name];\n}\n\nfunction isProp(props, prop) {\n return props[prop] !== undefined;\n}\n\nfunction getLinkName(name) {\n return name === 'value' ? 'valueLink' : name === 'checked' ? 'checkedLink' : null;\n}\n\nfunction defaultKey(key) {\n return 'default' + key.charAt(0).toUpperCase() + key.substr(1);\n}\n\nfunction chain(thisArg, a, b) {\n return function chainedFunction() {\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n a && a.call.apply(a, [thisArg].concat(args));\n b && b.call.apply(b, [thisArg].concat(args));\n };\n}\n\nfunction transform(obj, cb, seed) {\n each(obj, cb.bind(null, seed = seed || (Array.isArray(obj) ? [] : {})));\n return seed;\n}\n\nfunction each(obj, cb, thisArg) {\n if (Array.isArray(obj)) return obj.forEach(cb, thisArg);\n\n for (var key in obj) {\n if (has(obj, key)) cb.call(thisArg, obj[key], key, obj);\n }\n}\n\nfunction has(o, k) {\n return o ? Object.prototype.hasOwnProperty.call(o, k) : false;\n}\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\nfunction isReactComponent(component) {\n return !!(component && component.prototype && component.prototype.isReactComponent);\n}\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/uncontrollable/utils.js\n// module id = 1494\n// module chunks = 0\n\n//# sourceURL=webpack:///./~/uncontrollable/utils.js?", + ); + + /***/ + }, + /******/ + ], +); diff --git a/packages/react-on-rails-pro-node-renderer/tests/fixtures/projects/friendsandguests/1a7fe417/userShowRenderingRequest.js b/packages/react-on-rails-pro-node-renderer/tests/fixtures/projects/friendsandguests/1a7fe417/userShowRenderingRequest.js new file mode 100644 index 0000000000..8f8b4de506 --- /dev/null +++ b/packages/react-on-rails-pro-node-renderer/tests/fixtures/projects/friendsandguests/1a7fe417/userShowRenderingRequest.js @@ -0,0 +1,18 @@ +(function() { + var railsContext = {"inMailer":false,"i18nLocale":"en","i18nDefaultLocale":"en","href":"http://app.lvh.me:3000/users/justingordon951","location":"/users/justingordon951","scheme":"http","host":"app.lvh.me","port":3000,"pathname":"/users/justingordon951","search":null,"httpAcceptLanguage":"ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4","railsEnv":"development","honeybadgerEnv":"development","launchdarklyAllFlags":{"blv_redux":false,"temp-calendar":true},"launchdarklySettings":{"key":"3917","anonymous":false,"email":"justin@friendsandguests.com","firstName":"Justin","lastName":"Gordon"},"cloudinaryUrl":"https://res.cloudinary.com/dsm07vjyu/image/upload/","desktop":true,"tablet":false,"mobile":false,"userId":3917,"userEmail":"justin@friendsandguests.com","serverSide":true}; + ReactOnRails.clearHydratedStores(); +var reduxProps, store, storeGenerator; +reduxProps = {"profileUser":{"id":3917,"username":"justingordon951","firstName":"Justin","lastName":"Gordon","email":"justin@friendsandguests.com","aboutMeDetails":null,"createdAt":"2017-05-15T17:05:31.376+10:00","avatarUrl":"https://res.cloudinary.com/dsm07vjyu/image/gravatar/d_default_avatar.png/60ffe5c75d594b26bfe72bace107f421.png","coverImageUrl":null,"city":null,"state":null,"country":null,"personalWebsiteUrl":null,"facebookUrl":null,"twitterProfile":null,"linkedinUrl":null,"vrboUrl":null,"airbnbUrl":null,"ownProfile":true,"listings":[]},"bundle":"users-show-client-bundle","navbar":{"publicPaths":{"listingsIndexPath":"/s","aboutPath":"/about","faqPath":"/faq","pricingPath":"/pricing","communityUrl":"https://community.friendsandguests.com/login","hostsPath":"/hosts"},"user":{"id":3917,"avatarUrl":"https://res.cloudinary.com/dsm07vjyu/image/gravatar/d_default_avatar.png/60ffe5c75d594b26bfe72bace107f421.png","firstName":"Justin","messagesPath":"/inbox","profilePath":"/users/justingordon951","accountPath":"/account/edit","signOutPath":"/users/sign_out","adminPath":"/admin","listingsCount":0,"invitationsCount":0,"conversationsCount":0,"guestListMembershipRequestsCount":0},"signedInPaths":{"listingInvitationsPath":"/listing_invitations","joinedListingInvitationsPath":"/listing_memberships","favoritesPath":"/favorites","managePropertiesPath":"/manage/listings","newListingPath":"/manage/listings/new"}},"user":{"avatarUrl":"https://res.cloudinary.com/dsm07vjyu/image/gravatar/d_default_avatar.png/60ffe5c75d594b26bfe72bace107f421.png","coverImageUrl":null,"id":3917,"username":"justingordon951","firstName":"Justin","lastName":"Gordon","fullName":"Justin Gordon","aboutMeDetails":null,"createdAt":"2017-05-15T17:05:31.376+10:00","lastSignInAt":"2017-05-19T16:47:46.141+10:00","personalWebsiteUrl":null,"twitterUrl":null,"facebookUrl":null,"linkedinUrl":null,"vrboUrl":null,"airbnbUrl":null,"fbConnected":false,"url":"/users/justingordon951"}}; +storeGenerator = ReactOnRails.getStoreGenerator('appStore'); +store = storeGenerator(reduxProps, railsContext); +ReactOnRails.setStore('appStore', store); + + var props = {}; + return ReactOnRails.serverRenderReactComponent({ + name: 'UsersShow', + domNodeId: 'UsersShow-react-component-eafaa388-5eaa-4194-bf82-72f35d3a9f81', + props: props, + trace: true, + railsContext: railsContext + }); +})() diff --git a/packages/react-on-rails-pro-node-renderer/tests/fixtures/projects/friendsandguests/1a7fe417/welcomePageRenderingRequest.js b/packages/react-on-rails-pro-node-renderer/tests/fixtures/projects/friendsandguests/1a7fe417/welcomePageRenderingRequest.js new file mode 100644 index 0000000000..ca2ef27b60 --- /dev/null +++ b/packages/react-on-rails-pro-node-renderer/tests/fixtures/projects/friendsandguests/1a7fe417/welcomePageRenderingRequest.js @@ -0,0 +1,18 @@ +(function() { + var railsContext = {"inMailer":false,"i18nLocale":"en","i18nDefaultLocale":"en","href":"http://app.lvh.me:3000/","location":"/","scheme":"http","host":"app.lvh.me","port":3000,"pathname":"/","search":null,"httpAcceptLanguage":"ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4","railsEnv":"development","honeybadgerEnv":"development","launchdarklyAllFlags":{"blv_redux":false,"temp-calendar":true},"launchdarklySettings":{"key":"3917","anonymous":false,"email":"justin@friendsandguests.com","firstName":"Justin","lastName":"Gordon"},"cloudinaryUrl":"https://res.cloudinary.com/dsm07vjyu/image/upload/","desktop":true,"tablet":false,"mobile":false,"userId":3917,"userEmail":"justin@friendsandguests.com","serverSide":true}; + ReactOnRails.clearHydratedStores(); +var reduxProps, store, storeGenerator; +reduxProps = {"navbar":{"publicPaths":{"listingsIndexPath":"/s","aboutPath":"/about","faqPath":"/faq","pricingPath":"/pricing","communityUrl":"https://community.friendsandguests.com/login","hostsPath":"/hosts"},"user":{"id":3917,"avatarUrl":"https://res.cloudinary.com/dsm07vjyu/image/gravatar/d_default_avatar.png/60ffe5c75d594b26bfe72bace107f421.png","firstName":"Justin","messagesPath":"/inbox","profilePath":"/users/justingordon951","accountPath":"/account/edit","signOutPath":"/users/sign_out","adminPath":"/admin","listingsCount":0,"invitationsCount":0,"conversationsCount":0,"guestListMembershipRequestsCount":0},"signedInPaths":{"listingInvitationsPath":"/listing_invitations","joinedListingInvitationsPath":"/listing_memberships","favoritesPath":"/favorites","managePropertiesPath":"/manage/listings","newListingPath":"/manage/listings/new"}}}; +storeGenerator = ReactOnRails.getStoreGenerator('appStore'); +store = storeGenerator(reduxProps, railsContext); +ReactOnRails.setStore('appStore', store); + + var props = {"featuredListings":[{"userContext":{"isManagedByCurrentUser":false,"favorited":false,"listingRelationshipType":"public_guest","hostRelationshipType":"unknown","guestListMembershipId":null},"id":6545,"title":"Sleek Silk Computer","price":null,"roomType":"shared_room","lat":20.759738,"lng":-156.453135,"apt":"283","country":"United States","city":"Kihei","state":"HI","zipCode":"96753","street":"233 Oluea Cir","propertyType":null,"privacyMode":"public","displayMode":"full_details","favoritesCount":2,"displayAddress":"Kihei, HI, United States","htmlUrl":"/listings/6545","photos":[],"owner":{"avatarUrl":"https://res.cloudinary.com/dsm07vjyu/image/upload/v1494831684/ptrfmbuofsut09alijr0.png","coverImageUrl":"https://res.cloudinary.com/dsm07vjyu/image/upload/v1494831686/vyhxosmpf2jowxbefodt.jpg","id":3902,"username":"staceycarter291","firstName":"stacey","lastName":"carter","fullName":"stacey carter","aboutMeDetails":"We're like many of the guests we've met at Hale Kai O' Kihei over the years -- we've got demanding jobs, and put a lot of effort into our work. So there are times when we just want to get away from the stress for a few days, and get to a place where living is just easier, the demands less.","createdAt":"2017-05-15T17:00:04.213+10:00","lastSignInAt":"2017-01-29T07:27:20.075+10:00","personalWebsiteUrl":".example.com","twitterUrl":null,"facebookUrl":null,"linkedinUrl":"http://linkedin.com/","vrboUrl":null,"airbnbUrl":null,"fbConnected":false,"url":"/users/staceycarter291"}},{"userContext":{"isManagedByCurrentUser":false,"favorited":false,"listingRelationshipType":"public_guest","hostRelationshipType":"unknown","guestListMembershipId":null},"id":6546,"title":"Synergistic Leather Shirt","price":null,"roomType":"shared_room","lat":20.770863,"lng":-156.454992,"apt":"8872","country":"United States","city":"Kihei","state":"HI","zipCode":"96753","street":"505 Ekahi Way","propertyType":null,"privacyMode":"public","displayMode":"full_details","favoritesCount":3,"displayAddress":"Kihei, HI, United States","htmlUrl":"/listings/6546","photos":[{"cloudUrl":"https://res.cloudinary.com/dsm07vjyu/image/upload/ck9lhmsifpmoi8xyep4f.jpg","id":3662,"publicId":"ck9lhmsifpmoi8xyep4f","version":"1494831873","format":"jpg","position":0,"resourceType":"image","width":1024,"height":682,"description":null,"listingId":6546},{"cloudUrl":"https://res.cloudinary.com/dsm07vjyu/image/upload/znmwgsfvibk8xdploxw2.jpg","id":3663,"publicId":"znmwgsfvibk8xdploxw2","version":"1494831874","format":"jpg","position":1,"resourceType":"image","width":1280,"height":694,"description":null,"listingId":6546}],"owner":{"avatarUrl":"https://res.cloudinary.com/dsm07vjyu/image/upload/v1494831730/woqtbsvkbtqycbg12uum.png","coverImageUrl":"https://res.cloudinary.com/dsm07vjyu/image/upload/v1494831731/a3m5txdnjijykdqtpccu.png","id":3916,"username":"michaelfox885","firstName":"michael","lastName":"fox","fullName":"michael fox","aboutMeDetails":"I have been in the Maui condo rental business for over twenty five years and have, over the years sent thousands of happy guests to our condos. We're located in Burnaby, British Columbia, Canada (just outside Vancouver). We have been married for thirty eight years and have three children with whom we spent many happy holidays on Maui and continue to do so now as well. At one point we even talked about packing up and moving to Maui but that did not materialize. Our hobbies are cycling (especially around our gorgeous seawall here in Vancouver), walking, yoga, reading and going to the cinema.","createdAt":"2017-05-15T17:00:05.292+10:00","lastSignInAt":"2016-05-24T17:55:19.323+10:00","personalWebsiteUrl":".example.com","twitterUrl":null,"facebookUrl":null,"linkedinUrl":"http://linkedin.com/","vrboUrl":null,"airbnbUrl":null,"fbConnected":false,"url":"/users/michaelfox885"}},{"userContext":{"isManagedByCurrentUser":false,"favorited":false,"listingRelationshipType":"public_guest","hostRelationshipType":"unknown","guestListMembershipId":null},"id":6509,"title":"Sleek Paper Pants","price":37,"roomType":"shared_room","lat":20.909175,"lng":-156.400598,"apt":"34779","country":"United States","city":"Paia","state":"HI","zipCode":"96779","street":"60 Ulupua Pl","propertyType":null,"privacyMode":"public","displayMode":"full_details","favoritesCount":0,"displayAddress":"Paia, HI, United States","htmlUrl":"/listings/6509","photos":[{"cloudUrl":"https://res.cloudinary.com/dsm07vjyu/image/upload/b4th3hqehelm4lih2aem.jpg","id":3600,"publicId":"b4th3hqehelm4lih2aem","version":"1494831742","format":"jpg","position":0,"resourceType":"image","width":1600,"height":1200,"description":null,"listingId":6509},{"cloudUrl":"https://res.cloudinary.com/dsm07vjyu/image/upload/yiqlje5i6atk2rkvdbum.jpg","id":3601,"publicId":"yiqlje5i6atk2rkvdbum","version":"1494831744","format":"jpg","position":1,"resourceType":"image","width":1440,"height":900,"description":null,"listingId":6509}],"owner":{"avatarUrl":"https://res.cloudinary.com/dsm07vjyu/image/facebook/d_default_avatar.png/111420839208092.png","coverImageUrl":null,"id":3878,"username":"tomsmith574","firstName":"Tom","lastName":"Smith","fullName":"Tom Smith","aboutMeDetails":"I was born and raised in Lahaina and come from a well-known and highly respected family. His grandparents immigrated here from Japan. He went to University of Hawaii for 3 and a half years and has traveled extensively in the South Pacific. He and his wife also traveled England, Sweden and Europe and a half-dozen US states. He was owner of a highly successful fish wholesale business and knows just about everything there is to know about the ocean and the things that live there and the things you can do in and on it. He's a happy-go-lucky guy who is game to do just about anything on a moment's notice. Gail was born and raised in Michigan. After graduating from the University of Michigan, she fulfilled a childhood dream by moving to Hawaii. She is the founder of H.A.P.P.Y., a social and networking group for homeschoolers. As such, she planned social events, offered crafts and field trips., She still counsels families interested in homeschooling and is the author of 'Homeschooling: Why and How' and 'Real L.I.F.E. Parenting.' She is a writer, speaker, and artist. Both Jordan and Gail are veteran Red Cross volunteers and should anything happen on Maui, you will be in good hands. We have been married for 37 years and have a son, Thumper (Yes, that's his real name), a retired professional rollerblader, having been in the top ten worldwide his entire career. He competed in such renowned contests as X-Games and Gravity Games. He is the highest rated videographer/editor in Hawaii, having All-Five-Star reviews and participates in a multitude of sports.","createdAt":"2017-05-15T17:00:02.363+10:00","lastSignInAt":"2016-04-25T20:00:38.505+10:00","personalWebsiteUrl":".example.com","twitterUrl":null,"facebookUrl":"https://facebook.com/111420839208092","linkedinUrl":"http://linkedin.com/","vrboUrl":null,"airbnbUrl":null,"fbConnected":true,"url":"/users/tomsmith574"}}],"hostsPath":"/hosts","contextualListingsPath":"/s"}; + return ReactOnRails.serverRenderReactComponent({ + name: 'WelcomePage', + domNodeId: 'WelcomePage-react-component-8995b69e-6d2d-4393-93b2-c1d96864258f', + props: props, + trace: true, + railsContext: railsContext + }); +})() diff --git a/packages/react-on-rails-pro-node-renderer/tests/fixtures/projects/react-webpack-rails-tutorial/ec974491/appRenderingRequest.js b/packages/react-on-rails-pro-node-renderer/tests/fixtures/projects/react-webpack-rails-tutorial/ec974491/appRenderingRequest.js new file mode 100644 index 0000000000..267ec463a5 --- /dev/null +++ b/packages/react-on-rails-pro-node-renderer/tests/fixtures/projects/react-webpack-rails-tutorial/ec974491/appRenderingRequest.js @@ -0,0 +1,18 @@ +(function() { + var railsContext = {"inMailer":false,"i18nLocale":"en","i18nDefaultLocale":"en","href":"http://0.0.0.0:5000/no-router","location":"/no-router","scheme":"http","host":"0.0.0.0","port":5000,"pathname":"/no-router","search":null,"httpAcceptLanguage":"ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4","serverSide":true}; + ReactOnRails.clearHydratedStores(); +var reduxProps, store, storeGenerator; +reduxProps = {"comments":[{"id":2,"author":"Vasya","text":"Another test","created_at":"2017-05-22T01:45:32.043Z","updated_at":"2017-05-22T01:45:32.043Z"},{"id":1,"author":"Denis","text":"Test","created_at":"2017-05-22T01:45:15.667Z","updated_at":"2017-05-22T01:45:15.667Z"}]}; +storeGenerator = ReactOnRails.getStoreGenerator('commentsStore'); +store = storeGenerator(reduxProps, railsContext); +ReactOnRails.setStore('commentsStore', store); + + var props = {}; + return ReactOnRails.serverRenderReactComponent({ + name: 'App', + domNodeId: 'App-react-component-1f056c41-b310-4367-8c79-2144b4e766fd', + props: props, + trace: true, + railsContext: railsContext + }); +})() diff --git a/packages/react-on-rails-pro-node-renderer/tests/fixtures/projects/react-webpack-rails-tutorial/ec974491/navigationBarAppRenderingRequest.js b/packages/react-on-rails-pro-node-renderer/tests/fixtures/projects/react-webpack-rails-tutorial/ec974491/navigationBarAppRenderingRequest.js new file mode 100644 index 0000000000..63140543f2 --- /dev/null +++ b/packages/react-on-rails-pro-node-renderer/tests/fixtures/projects/react-webpack-rails-tutorial/ec974491/navigationBarAppRenderingRequest.js @@ -0,0 +1,18 @@ +(function() { + var railsContext = {"inMailer":false,"i18nLocale":"en","i18nDefaultLocale":"en","href":"http://0.0.0.0:5000/","location":"/","scheme":"http","host":"0.0.0.0","port":5000,"pathname":"/","search":null,"httpAcceptLanguage":"ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4","serverSide":true}; + ReactOnRails.clearHydratedStores(); +var reduxProps, store, storeGenerator; +reduxProps = {"comments":[{"id":2,"author":"Vasya","text":"Another test","created_at":"2017-05-22T01:45:32.043Z","updated_at":"2017-05-22T01:45:32.043Z"},{"id":1,"author":"Denis","text":"Test","created_at":"2017-05-22T01:45:15.667Z","updated_at":"2017-05-22T01:45:15.667Z"}]}; +storeGenerator = ReactOnRails.getStoreGenerator('routerCommentsStore'); +store = storeGenerator(reduxProps, railsContext); +ReactOnRails.setStore('routerCommentsStore', store); + + var props = {}; + return ReactOnRails.serverRenderReactComponent({ + name: 'NavigationBarApp', + domNodeId: 'NavigationBarApp-react-component-737f0abf-68ba-45f0-a76d-9626747666d1', + props: props, + trace: true, + railsContext: railsContext + }); +})() diff --git a/packages/react-on-rails-pro-node-renderer/tests/fixtures/projects/react-webpack-rails-tutorial/ec974491/routerAppRenderingRequest.js b/packages/react-on-rails-pro-node-renderer/tests/fixtures/projects/react-webpack-rails-tutorial/ec974491/routerAppRenderingRequest.js new file mode 100644 index 0000000000..00e94904a4 --- /dev/null +++ b/packages/react-on-rails-pro-node-renderer/tests/fixtures/projects/react-webpack-rails-tutorial/ec974491/routerAppRenderingRequest.js @@ -0,0 +1,18 @@ +(function() { + var railsContext = {"inMailer":false,"i18nLocale":"en","i18nDefaultLocale":"en","href":"http://0.0.0.0:5000/","location":"/","scheme":"http","host":"0.0.0.0","port":5000,"pathname":"/","search":null,"httpAcceptLanguage":"ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4","serverSide":true}; + ReactOnRails.clearHydratedStores(); +var reduxProps, store, storeGenerator; +reduxProps = {"comments":[{"id":2,"author":"Vasya","text":"Another test","created_at":"2017-05-22T01:45:32.043Z","updated_at":"2017-05-22T01:45:32.043Z"},{"id":1,"author":"Denis","text":"Test","created_at":"2017-05-22T01:45:15.667Z","updated_at":"2017-05-22T01:45:15.667Z"}]}; +storeGenerator = ReactOnRails.getStoreGenerator('routerCommentsStore'); +store = storeGenerator(reduxProps, railsContext); +ReactOnRails.setStore('routerCommentsStore', store); + + var props = {}; + return ReactOnRails.serverRenderReactComponent({ + name: 'RouterApp', + domNodeId: 'RouterApp-react-component-0', + props: props, + trace: true, + railsContext: railsContext + }); +})() diff --git a/packages/react-on-rails-pro-node-renderer/tests/fixtures/projects/react-webpack-rails-tutorial/ec974491/server-bundle.js b/packages/react-on-rails-pro-node-renderer/tests/fixtures/projects/react-webpack-rails-tutorial/ec974491/server-bundle.js new file mode 100644 index 0000000000..5b6282e4e9 --- /dev/null +++ b/packages/react-on-rails-pro-node-renderer/tests/fixtures/projects/react-webpack-rails-tutorial/ec974491/server-bundle.js @@ -0,0 +1,92022 @@ +/******/ (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; + /******/ + /******/ // identity function for calling harmony imports with the correct context + /******/ __webpack_require__.i = function (value) { + return value; + }; + /******/ + /******/ // define getter function for harmony exports + /******/ __webpack_require__.d = function (exports, name, getter) { + /******/ if (!__webpack_require__.o(exports, name)) { + /******/ Object.defineProperty(exports, name, { + /******/ configurable: false, + /******/ enumerable: true, + /******/ get: getter, + /******/ + }); + /******/ + } + /******/ + }; + /******/ + /******/ // 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 = 844)); + /******/ +})( + /************************************************************************/ + /******/ [ + /* 0 */ + /***/ function (module, exports, __webpack_require__) { + var global = __webpack_require__(6), + core = __webpack_require__(56), + hide = __webpack_require__(29), + redefine = __webpack_require__(30), + ctx = __webpack_require__(57), + PROTOTYPE = 'prototype'; + + var $export = function (type, name, source) { + var IS_FORCED = type & $export.F, + IS_GLOBAL = type & $export.G, + IS_STATIC = type & $export.S, + IS_PROTO = type & $export.P, + IS_BIND = type & $export.B, + target = IS_GLOBAL + ? global + : IS_STATIC + ? global[name] || (global[name] = {}) + : (global[name] || {})[PROTOTYPE], + exports = IS_GLOBAL ? core : core[name] || (core[name] = {}), + expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {}), + key, + own, + out, + exp; + if (IS_GLOBAL) source = name; + for (key in source) { + // contains in native + own = !IS_FORCED && target && target[key] !== undefined; + // export native or passed + out = (own ? target : source)[key]; + // bind timers to global for call from export context + exp = + IS_BIND && own + ? ctx(out, global) + : IS_PROTO && typeof out == 'function' + ? ctx(Function.call, out) + : out; + // extend global + if (target) redefine(target, key, out, type & $export.U); + // export + if (exports[key] != out) hide(exports, key, exp); + if (IS_PROTO && expProto[key] != out) expProto[key] = out; + } + }; + global.core = core; + // type bitmap + $export.F = 1; // forced + $export.G = 2; // global + $export.S = 4; // static + $export.P = 8; // proto + $export.B = 16; // bind + $export.W = 32; // wrap + $export.U = 64; // safe + $export.R = 128; // real proto method for `library` + module.exports = $export; + + /***/ + }, + /* 1 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + module.exports = __webpack_require__(41); + + /***/ + }, + /* 2 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + /** + * Use invariant() to assert state which your program assumes to be true. + * + * Provide sprintf-style format (only %s is supported) and arguments + * to provide information about what broke and what you were + * expecting. + * + * The invariant message will be stripped in production, but the invariant + * will remain to ensure logic does not differ in production. + */ + + var validateFormat = function validateFormat(format) {}; + + if (true) { + validateFormat = function validateFormat(format) { + if (format === undefined) { + throw new Error('invariant requires an error message argument'); + } + }; + } + + function invariant(condition, format, a, b, c, d, e, f) { + validateFormat(format); + + if (!condition) { + var error; + if (format === undefined) { + error = new Error( + 'Minified exception occurred; use the non-minified dev environment ' + + 'for the full error message and additional helpful warnings.', + ); + } else { + var args = [a, b, c, d, e, f]; + var argIndex = 0; + error = new Error( + format.replace(/%s/g, function () { + return args[argIndex++]; + }), + ); + error.name = 'Invariant Violation'; + } + + error.framesToPop = 1; // we don't care about invariant's own frame + throw error; + } + } + + module.exports = invariant; + + /***/ + }, + /* 3 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2014-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var emptyFunction = __webpack_require__(40); + + /** + * Similar to invariant but only logs a warning if the condition is not met. + * This can be used to log issues in development environments in critical + * paths. Removing the logging code for production environments will keep the + * same logic and follow the same code paths. + */ + + var warning = emptyFunction; + + if (true) { + (function () { + var printWarning = function printWarning(format) { + for ( + var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; + _key < _len; + _key++ + ) { + args[_key - 1] = arguments[_key]; + } + + var argIndex = 0; + var message = + 'Warning: ' + + format.replace(/%s/g, function () { + return args[argIndex++]; + }); + if (typeof console !== 'undefined') { + console.error(message); + } + try { + // --- Welcome to debugging React --- + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + throw new Error(message); + } catch (x) {} + }; + + warning = function warning(condition, format) { + if (format === undefined) { + throw new Error( + '`warning(condition, format, ...args)` requires a warning ' + 'message argument', + ); + } + + if (format.indexOf('Failed Composite propType: ') === 0) { + return; // Ignore CompositeComponent proptype check. + } + + if (!condition) { + for ( + var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; + _key2 < _len2; + _key2++ + ) { + args[_key2 - 2] = arguments[_key2]; + } + + printWarning.apply(undefined, [format].concat(args)); + } + }; + })(); + } + + module.exports = warning; + + /***/ + }, + /* 4 */ + /***/ function (module, exports, __webpack_require__) { + var isObject = __webpack_require__(9); + module.exports = function (it) { + if (!isObject(it)) throw TypeError(it + ' is not an object!'); + return it; + }; + + /***/ + }, + /* 5 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + /** + * WARNING: DO NOT manually require this module. + * This is a replacement for `invariant(...)` used by the error code system + * and will _only_ be required by the corresponding babel pass. + * It always throws. + */ + + function reactProdInvariant(code) { + var argCount = arguments.length - 1; + + var message = + 'Minified React error #' + + code + + '; visit ' + + 'http://facebook.github.io/react/docs/error-decoder.html?invariant=' + + code; + + for (var argIdx = 0; argIdx < argCount; argIdx++) { + message += '&args[]=' + encodeURIComponent(arguments[argIdx + 1]); + } + + message += + ' for the full message or use the non-minified dev environment' + + ' for full errors and additional helpful warnings.'; + + var error = new Error(message); + error.name = 'Invariant Violation'; + error.framesToPop = 1; // we don't care about reactProdInvariant's own frame + + throw error; + } + + module.exports = reactProdInvariant; + + /***/ + }, + /* 6 */ + /***/ function (module, exports) { + // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 + var global = (module.exports = + typeof window != 'undefined' && window.Math == Math + ? window + : typeof self != 'undefined' && self.Math == Math + ? self + : Function('return this')()); + if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef + + /***/ + }, + /* 7 */ + /***/ function (module, exports) { + module.exports = function (exec) { + try { + return !!exec(); + } catch (e) { + return true; + } + }; + + /***/ + }, + /* 8 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /* +object-assign +(c) Sindre Sorhus +@license MIT +*/ + + /* eslint-disable no-unused-vars */ + var getOwnPropertySymbols = Object.getOwnPropertySymbols; + var hasOwnProperty = Object.prototype.hasOwnProperty; + var propIsEnumerable = Object.prototype.propertyIsEnumerable; + + function toObject(val) { + if (val === null || val === undefined) { + throw new TypeError('Object.assign cannot be called with null or undefined'); + } + + return Object(val); + } + + function shouldUseNative() { + try { + if (!Object.assign) { + return false; + } + + // Detect buggy property enumeration order in older V8 versions. + + // https://bugs.chromium.org/p/v8/issues/detail?id=4118 + var test1 = new String('abc'); // eslint-disable-line no-new-wrappers + test1[5] = 'de'; + if (Object.getOwnPropertyNames(test1)[0] === '5') { + return false; + } + + // https://bugs.chromium.org/p/v8/issues/detail?id=3056 + var test2 = {}; + for (var i = 0; i < 10; i++) { + test2['_' + String.fromCharCode(i)] = i; + } + var order2 = Object.getOwnPropertyNames(test2).map(function (n) { + return test2[n]; + }); + if (order2.join('') !== '0123456789') { + return false; + } + + // https://bugs.chromium.org/p/v8/issues/detail?id=3056 + var test3 = {}; + 'abcdefghijklmnopqrst'.split('').forEach(function (letter) { + test3[letter] = letter; + }); + if (Object.keys(Object.assign({}, test3)).join('') !== 'abcdefghijklmnopqrst') { + return false; + } + + return true; + } catch (err) { + // We don't expect any of the above to throw, but better to be safe. + return false; + } + } + + module.exports = shouldUseNative() + ? Object.assign + : function (target, source) { + var from; + var to = toObject(target); + var symbols; + + for (var s = 1; s < arguments.length; s++) { + from = Object(arguments[s]); + + for (var key in from) { + if (hasOwnProperty.call(from, key)) { + to[key] = from[key]; + } + } + + if (getOwnPropertySymbols) { + symbols = getOwnPropertySymbols(from); + for (var i = 0; i < symbols.length; i++) { + if (propIsEnumerable.call(from, symbols[i])) { + to[symbols[i]] = from[symbols[i]]; + } + } + } + } + + return to; + }; + + /***/ + }, + /* 9 */ + /***/ function (module, exports) { + module.exports = function (it) { + return typeof it === 'object' ? it !== null : typeof it === 'function'; + }; + + /***/ + }, + /* 10 */ + /***/ function (module, exports, __webpack_require__) { + var store = __webpack_require__(135)('wks'), + uid = __webpack_require__(82), + Symbol = __webpack_require__(6).Symbol, + USE_SYMBOL = typeof Symbol == 'function'; + + var $exports = (module.exports = function (name) { + return ( + store[name] || + (store[name] = (USE_SYMBOL && Symbol[name]) || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)) + ); + }); + + $exports.store = store; + + /***/ + }, + /* 11 */ + /***/ function (module, exports, __webpack_require__) { + // Thank's IE8 for his funny defineProperty + module.exports = !__webpack_require__(7)(function () { + return ( + Object.defineProperty({}, 'a', { + get: function () { + return 7; + }, + }).a != 7 + ); + }); + + /***/ + }, + /* 12 */ + /***/ function (module, exports, __webpack_require__) { + var anObject = __webpack_require__(4), + IE8_DOM_DEFINE = __webpack_require__(269), + toPrimitive = __webpack_require__(52), + dP = Object.defineProperty; + + exports.f = __webpack_require__(11) + ? Object.defineProperty + : function defineProperty(O, P, Attributes) { + anObject(O); + P = toPrimitive(P, true); + anObject(Attributes); + if (IE8_DOM_DEFINE) + try { + return dP(O, P, Attributes); + } catch (e) { + /* empty */ + } + if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!'); + if ('value' in Attributes) O[P] = Attributes.value; + return O; + }; + + /***/ + }, + /* 13 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var _prodInvariant = __webpack_require__(5); + + var DOMProperty = __webpack_require__(66); + var ReactDOMComponentFlags = __webpack_require__(311); + + var invariant = __webpack_require__(2); + + var ATTR_NAME = DOMProperty.ID_ATTRIBUTE_NAME; + var Flags = ReactDOMComponentFlags; + + var internalInstanceKey = '__reactInternalInstance$' + Math.random().toString(36).slice(2); + + /** + * Check if a given node should be cached. + */ + function shouldPrecacheNode(node, nodeID) { + return ( + (node.nodeType === 1 && node.getAttribute(ATTR_NAME) === String(nodeID)) || + (node.nodeType === 8 && node.nodeValue === ' react-text: ' + nodeID + ' ') || + (node.nodeType === 8 && node.nodeValue === ' react-empty: ' + nodeID + ' ') + ); + } + + /** + * Drill down (through composites and empty components) until we get a host or + * host text component. + * + * This is pretty polymorphic but unavoidable with the current structure we have + * for `_renderedChildren`. + */ + function getRenderedHostOrTextFromComponent(component) { + var rendered; + while ((rendered = component._renderedComponent)) { + component = rendered; + } + return component; + } + + /** + * Populate `_hostNode` on the rendered host/text component with the given + * DOM node. The passed `inst` can be a composite. + */ + function precacheNode(inst, node) { + var hostInst = getRenderedHostOrTextFromComponent(inst); + hostInst._hostNode = node; + node[internalInstanceKey] = hostInst; + } + + function uncacheNode(inst) { + var node = inst._hostNode; + if (node) { + delete node[internalInstanceKey]; + inst._hostNode = null; + } + } + + /** + * Populate `_hostNode` on each child of `inst`, assuming that the children + * match up with the DOM (element) children of `node`. + * + * We cache entire levels at once to avoid an n^2 problem where we access the + * children of a node sequentially and have to walk from the start to our target + * node every time. + * + * Since we update `_renderedChildren` and the actual DOM at (slightly) + * different times, we could race here and see a newer `_renderedChildren` than + * the DOM nodes we see. To avoid this, ReactMultiChild calls + * `prepareToManageChildren` before we change `_renderedChildren`, at which + * time the container's child nodes are always cached (until it unmounts). + */ + function precacheChildNodes(inst, node) { + if (inst._flags & Flags.hasCachedChildNodes) { + return; + } + var children = inst._renderedChildren; + var childNode = node.firstChild; + outer: for (var name in children) { + if (!children.hasOwnProperty(name)) { + continue; + } + var childInst = children[name]; + var childID = getRenderedHostOrTextFromComponent(childInst)._domID; + if (childID === 0) { + // We're currently unmounting this child in ReactMultiChild; skip it. + continue; + } + // We assume the child nodes are in the same order as the child instances. + for (; childNode !== null; childNode = childNode.nextSibling) { + if (shouldPrecacheNode(childNode, childID)) { + precacheNode(childInst, childNode); + continue outer; + } + } + // We reached the end of the DOM children without finding an ID match. + true + ? true + ? invariant(false, 'Unable to find element with ID %s.', childID) + : _prodInvariant('32', childID) + : void 0; + } + inst._flags |= Flags.hasCachedChildNodes; + } + + /** + * Given a DOM node, return the closest ReactDOMComponent or + * ReactDOMTextComponent instance ancestor. + */ + function getClosestInstanceFromNode(node) { + if (node[internalInstanceKey]) { + return node[internalInstanceKey]; + } + + // Walk up the tree until we find an ancestor whose instance we have cached. + var parents = []; + while (!node[internalInstanceKey]) { + parents.push(node); + if (node.parentNode) { + node = node.parentNode; + } else { + // Top of the tree. This node must not be part of a React tree (or is + // unmounted, potentially). + return null; + } + } + + var closest; + var inst; + for (; node && (inst = node[internalInstanceKey]); node = parents.pop()) { + closest = inst; + if (parents.length) { + precacheChildNodes(inst, node); + } + } + + return closest; + } + + /** + * Given a DOM node, return the ReactDOMComponent or ReactDOMTextComponent + * instance, or null if the node was not rendered by this React. + */ + function getInstanceFromNode(node) { + var inst = getClosestInstanceFromNode(node); + if (inst != null && inst._hostNode === node) { + return inst; + } else { + return null; + } + } + + /** + * Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding + * DOM node. + */ + function getNodeFromInstance(inst) { + // Without this first invariant, passing a non-DOM-component triggers the next + // invariant for a missing parent, which is super confusing. + !(inst._hostNode !== undefined) + ? true + ? invariant(false, 'getNodeFromInstance: Invalid argument.') + : _prodInvariant('33') + : void 0; + + if (inst._hostNode) { + return inst._hostNode; + } + + // Walk up the tree until we find an ancestor whose DOM node we have cached. + var parents = []; + while (!inst._hostNode) { + parents.push(inst); + !inst._hostParent + ? true + ? invariant(false, 'React DOM tree root should always have a node reference.') + : _prodInvariant('34') + : void 0; + inst = inst._hostParent; + } + + // Now parents contains each ancestor that does *not* have a cached native + // node, and `inst` is the deepest ancestor that does. + for (; parents.length; inst = parents.pop()) { + precacheChildNodes(inst, inst._hostNode); + } + + return inst._hostNode; + } + + var ReactDOMComponentTree = { + getClosestInstanceFromNode: getClosestInstanceFromNode, + getInstanceFromNode: getInstanceFromNode, + getNodeFromInstance: getNodeFromInstance, + precacheChildNodes: precacheChildNodes, + precacheNode: precacheNode, + uncacheNode: uncacheNode, + }; + + module.exports = ReactDOMComponentTree; + + /***/ + }, + /* 14 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement); + + /** + * Simple, lightweight module assisting with the detection and context of + * Worker. Helps avoid circular dependencies and allows code to reason about + * whether or not they are in a Worker, even if they never include the main + * `ReactWorker` dependency. + */ + var ExecutionEnvironment = { + canUseDOM: canUseDOM, + + canUseWorkers: typeof Worker !== 'undefined', + + canUseEventListeners: canUseDOM && !!(window.addEventListener || window.attachEvent), + + canUseViewport: canUseDOM && !!window.screen, + + isInWorker: !canUseDOM, // For now, this is true - might change in the future. + }; + + module.exports = ExecutionEnvironment; + + /***/ + }, + /* 15 */ + /***/ function (module, exports, __webpack_require__) { + // 7.1.15 ToLength + var toInteger = __webpack_require__(64), + min = Math.min; + module.exports = function (it) { + return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 + }; + + /***/ + }, + /* 16 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + + /** + * Use invariant() to assert state which your program assumes to be true. + * + * Provide sprintf-style format (only %s is supported) and arguments + * to provide information about what broke and what you were + * expecting. + * + * The invariant message will be stripped in production, but the invariant + * will remain to ensure logic does not differ in production. + */ + + var invariant = function (condition, format, a, b, c, d, e, f) { + if (true) { + if (format === undefined) { + throw new Error('invariant requires an error message argument'); + } + } + + if (!condition) { + var error; + if (format === undefined) { + error = new Error( + 'Minified exception occurred; use the non-minified dev environment ' + + 'for the full error message and additional helpful warnings.', + ); + } else { + var args = [a, b, c, d, e, f]; + var argIndex = 0; + error = new Error( + format.replace(/%s/g, function () { + return args[argIndex++]; + }), + ); + error.name = 'Invariant Violation'; + } + + error.framesToPop = 1; // we don't care about invariant's own frame + throw error; + } + }; + + module.exports = invariant; + + /***/ + }, + /* 17 */ + /***/ function (module, exports, __webpack_require__) { + // 7.1.13 ToObject(argument) + var defined = __webpack_require__(44); + module.exports = function (it) { + return Object(defined(it)); + }; + + /***/ + }, + /* 18 */ + /***/ function (module, exports) { + var core = (module.exports = { version: '2.4.0' }); + if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef + + /***/ + }, + /* 19 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2016-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + var _prodInvariant = __webpack_require__(87); + + var ReactCurrentOwner = __webpack_require__(54); + + var invariant = __webpack_require__(2); + var warning = __webpack_require__(3); + + function isNative(fn) { + // Based on isNative() from Lodash + var funcToString = Function.prototype.toString; + var hasOwnProperty = Object.prototype.hasOwnProperty; + var reIsNative = RegExp( + '^' + + funcToString + // Take an example native function source for comparison + .call(hasOwnProperty) + // Strip regex characters so we can use it for regex + .replace(/[\\^$.*+?()[\]{}|]/g, '\\$&') + // Remove hasOwnProperty from the template to make it generic + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + + '$', + ); + try { + var source = funcToString.call(fn); + return reIsNative.test(source); + } catch (err) { + return false; + } + } + + var canUseCollections = + // Array.from + typeof Array.from === 'function' && + // Map + typeof Map === 'function' && + isNative(Map) && + // Map.prototype.keys + Map.prototype != null && + typeof Map.prototype.keys === 'function' && + isNative(Map.prototype.keys) && + // Set + typeof Set === 'function' && + isNative(Set) && + // Set.prototype.keys + Set.prototype != null && + typeof Set.prototype.keys === 'function' && + isNative(Set.prototype.keys); + + var setItem; + var getItem; + var removeItem; + var getItemIDs; + var addRoot; + var removeRoot; + var getRootIDs; + + if (canUseCollections) { + var itemMap = new Map(); + var rootIDSet = new Set(); + + setItem = function (id, item) { + itemMap.set(id, item); + }; + getItem = function (id) { + return itemMap.get(id); + }; + removeItem = function (id) { + itemMap['delete'](id); + }; + getItemIDs = function () { + return Array.from(itemMap.keys()); + }; + + addRoot = function (id) { + rootIDSet.add(id); + }; + removeRoot = function (id) { + rootIDSet['delete'](id); + }; + getRootIDs = function () { + return Array.from(rootIDSet.keys()); + }; + } else { + var itemByKey = {}; + var rootByKey = {}; + + // Use non-numeric keys to prevent V8 performance issues: + // https://github.com/facebook/react/pull/7232 + var getKeyFromID = function (id) { + return '.' + id; + }; + var getIDFromKey = function (key) { + return parseInt(key.substr(1), 10); + }; + + setItem = function (id, item) { + var key = getKeyFromID(id); + itemByKey[key] = item; + }; + getItem = function (id) { + var key = getKeyFromID(id); + return itemByKey[key]; + }; + removeItem = function (id) { + var key = getKeyFromID(id); + delete itemByKey[key]; + }; + getItemIDs = function () { + return Object.keys(itemByKey).map(getIDFromKey); + }; + + addRoot = function (id) { + var key = getKeyFromID(id); + rootByKey[key] = true; + }; + removeRoot = function (id) { + var key = getKeyFromID(id); + delete rootByKey[key]; + }; + getRootIDs = function () { + return Object.keys(rootByKey).map(getIDFromKey); + }; + } + + var unmountedIDs = []; + + function purgeDeep(id) { + var item = getItem(id); + if (item) { + var childIDs = item.childIDs; + + removeItem(id); + childIDs.forEach(purgeDeep); + } + } + + function describeComponentFrame(name, source, ownerName) { + return ( + '\n in ' + + (name || 'Unknown') + + (source + ? ' (at ' + source.fileName.replace(/^.*[\\\/]/, '') + ':' + source.lineNumber + ')' + : ownerName + ? ' (created by ' + ownerName + ')' + : '') + ); + } + + function getDisplayName(element) { + if (element == null) { + return '#empty'; + } else if (typeof element === 'string' || typeof element === 'number') { + return '#text'; + } else if (typeof element.type === 'string') { + return element.type; + } else { + return element.type.displayName || element.type.name || 'Unknown'; + } + } + + function describeID(id) { + var name = ReactComponentTreeHook.getDisplayName(id); + var element = ReactComponentTreeHook.getElement(id); + var ownerID = ReactComponentTreeHook.getOwnerID(id); + var ownerName; + if (ownerID) { + ownerName = ReactComponentTreeHook.getDisplayName(ownerID); + } + true + ? warning( + element, + 'ReactComponentTreeHook: Missing React element for debugID %s when ' + 'building stack', + id, + ) + : void 0; + return describeComponentFrame(name, element && element._source, ownerName); + } + + var ReactComponentTreeHook = { + onSetChildren: function (id, nextChildIDs) { + var item = getItem(id); + !item ? (true ? invariant(false, 'Item must have been set') : _prodInvariant('144')) : void 0; + item.childIDs = nextChildIDs; + + for (var i = 0; i < nextChildIDs.length; i++) { + var nextChildID = nextChildIDs[i]; + var nextChild = getItem(nextChildID); + !nextChild + ? true + ? invariant( + false, + 'Expected hook events to fire for the child before its parent includes it in onSetChildren().', + ) + : _prodInvariant('140') + : void 0; + !( + nextChild.childIDs != null || + typeof nextChild.element !== 'object' || + nextChild.element == null + ) + ? true + ? invariant( + false, + 'Expected onSetChildren() to fire for a container child before its parent includes it in onSetChildren().', + ) + : _prodInvariant('141') + : void 0; + !nextChild.isMounted + ? true + ? invariant( + false, + 'Expected onMountComponent() to fire for the child before its parent includes it in onSetChildren().', + ) + : _prodInvariant('71') + : void 0; + if (nextChild.parentID == null) { + nextChild.parentID = id; + // TODO: This shouldn't be necessary but mounting a new root during in + // componentWillMount currently causes not-yet-mounted components to + // be purged from our tree data so their parent id is missing. + } + !(nextChild.parentID === id) + ? true + ? invariant( + false, + 'Expected onBeforeMountComponent() parent and onSetChildren() to be consistent (%s has parents %s and %s).', + nextChildID, + nextChild.parentID, + id, + ) + : _prodInvariant('142', nextChildID, nextChild.parentID, id) + : void 0; + } + }, + onBeforeMountComponent: function (id, element, parentID) { + var item = { + element: element, + parentID: parentID, + text: null, + childIDs: [], + isMounted: false, + updateCount: 0, + }; + setItem(id, item); + }, + onBeforeUpdateComponent: function (id, element) { + var item = getItem(id); + if (!item || !item.isMounted) { + // We may end up here as a result of setState() in componentWillUnmount(). + // In this case, ignore the element. + return; + } + item.element = element; + }, + onMountComponent: function (id) { + var item = getItem(id); + !item ? (true ? invariant(false, 'Item must have been set') : _prodInvariant('144')) : void 0; + item.isMounted = true; + var isRoot = item.parentID === 0; + if (isRoot) { + addRoot(id); + } + }, + onUpdateComponent: function (id) { + var item = getItem(id); + if (!item || !item.isMounted) { + // We may end up here as a result of setState() in componentWillUnmount(). + // In this case, ignore the element. + return; + } + item.updateCount++; + }, + onUnmountComponent: function (id) { + var item = getItem(id); + if (item) { + // We need to check if it exists. + // `item` might not exist if it is inside an error boundary, and a sibling + // error boundary child threw while mounting. Then this instance never + // got a chance to mount, but it still gets an unmounting event during + // the error boundary cleanup. + item.isMounted = false; + var isRoot = item.parentID === 0; + if (isRoot) { + removeRoot(id); + } + } + unmountedIDs.push(id); + }, + purgeUnmountedComponents: function () { + if (ReactComponentTreeHook._preventPurging) { + // Should only be used for testing. + return; + } + + for (var i = 0; i < unmountedIDs.length; i++) { + var id = unmountedIDs[i]; + purgeDeep(id); + } + unmountedIDs.length = 0; + }, + isMounted: function (id) { + var item = getItem(id); + return item ? item.isMounted : false; + }, + getCurrentStackAddendum: function (topElement) { + var info = ''; + if (topElement) { + var name = getDisplayName(topElement); + var owner = topElement._owner; + info += describeComponentFrame(name, topElement._source, owner && owner.getName()); + } + + var currentOwner = ReactCurrentOwner.current; + var id = currentOwner && currentOwner._debugID; + + info += ReactComponentTreeHook.getStackAddendumByID(id); + return info; + }, + getStackAddendumByID: function (id) { + var info = ''; + while (id) { + info += describeID(id); + id = ReactComponentTreeHook.getParentID(id); + } + return info; + }, + getChildIDs: function (id) { + var item = getItem(id); + return item ? item.childIDs : []; + }, + getDisplayName: function (id) { + var element = ReactComponentTreeHook.getElement(id); + if (!element) { + return null; + } + return getDisplayName(element); + }, + getElement: function (id) { + var item = getItem(id); + return item ? item.element : null; + }, + getOwnerID: function (id) { + var element = ReactComponentTreeHook.getElement(id); + if (!element || !element._owner) { + return null; + } + return element._owner._debugID; + }, + getParentID: function (id) { + var item = getItem(id); + return item ? item.parentID : null; + }, + getSource: function (id) { + var item = getItem(id); + var element = item ? item.element : null; + var source = element != null ? element._source : null; + return source; + }, + getText: function (id) { + var element = ReactComponentTreeHook.getElement(id); + if (typeof element === 'string') { + return element; + } else if (typeof element === 'number') { + return '' + element; + } else { + return null; + } + }, + getUpdateCount: function (id) { + var item = getItem(id); + return item ? item.updateCount : 0; + }, + + getRootIDs: getRootIDs, + getRegisteredIDs: getItemIDs, + }; + + module.exports = ReactComponentTreeHook; + + /***/ + }, + /* 20 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + + var _assign = __webpack_require__(147); + + var _assign2 = _interopRequireDefault(_assign); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + exports.default = + _assign2.default || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + + return target; + }; + + /***/ + }, + /* 21 */ + /***/ function (module, exports) { + var hasOwnProperty = {}.hasOwnProperty; + module.exports = function (it, key) { + return hasOwnProperty.call(it, key); + }; + + /***/ + }, + /* 22 */ + /***/ function (module, exports) { + var g; + + // This works in non-strict mode + g = (function () { + return this; + })(); + + try { + // This works if eval is allowed (see CSP) + g = g || Function('return this')() || (1, eval)('this'); + } catch (e) { + // This works if the window reference is available + if (typeof window === 'object') g = window; + } + + // g can still be undefined, but nothing to do about it... + // We return undefined, instead of nothing here, so it's + // easier to handle this case. if(!global) { ...} + + module.exports = g; + + /***/ + }, + /* 23 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + + exports.default = function (instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + }; + + /***/ + }, + /* 24 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + + var _setPrototypeOf = __webpack_require__(407); + + var _setPrototypeOf2 = _interopRequireDefault(_setPrototypeOf); + + var _create = __webpack_require__(405); + + var _create2 = _interopRequireDefault(_create); + + var _typeof2 = __webpack_require__(243); + + var _typeof3 = _interopRequireDefault(_typeof2); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + exports.default = function (subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + + (typeof superClass === 'undefined' ? 'undefined' : (0, _typeof3.default)(superClass)), + ); + } + + subClass.prototype = (0, _create2.default)(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true, + }, + }); + if (superClass) + _setPrototypeOf2.default + ? (0, _setPrototypeOf2.default)(subClass, superClass) + : (subClass.__proto__ = superClass); + }; + + /***/ + }, + /* 25 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + + exports.default = function (obj, keys) { + var target = {}; + + for (var i in obj) { + if (keys.indexOf(i) >= 0) continue; + if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; + target[i] = obj[i]; + } + + return target; + }; + + /***/ + }, + /* 26 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + + var _typeof2 = __webpack_require__(243); + + var _typeof3 = _interopRequireDefault(_typeof2); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + exports.default = function (self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return call && + ((typeof call === 'undefined' ? 'undefined' : (0, _typeof3.default)(call)) === 'object' || + typeof call === 'function') + ? call + : self; + }; + + /***/ + }, + /* 27 */ + /***/ function (module, exports, __webpack_require__) { + var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; /*! + Copyright (c) 2016 Jed Watson. + Licensed under the MIT License (MIT), see + http://jedwatson.github.io/classnames +*/ + /* global define */ + + (function () { + 'use strict'; + + var hasOwn = {}.hasOwnProperty; + + function classNames() { + var classes = []; + + for (var i = 0; i < arguments.length; i++) { + var arg = arguments[i]; + if (!arg) continue; + + var argType = typeof arg; + + if (argType === 'string' || argType === 'number') { + classes.push(arg); + } else if (Array.isArray(arg)) { + classes.push(classNames.apply(null, arg)); + } else if (argType === 'object') { + for (var key in arg) { + if (hasOwn.call(arg, key) && arg[key]) { + classes.push(key); + } + } + } + } + + return classes.join(' '); + } + + if (typeof module !== 'undefined' && module.exports) { + module.exports = classNames; + } else if (true) { + // register as 'classnames', consistent with npm package name + !((__WEBPACK_AMD_DEFINE_ARRAY__ = []), + (__WEBPACK_AMD_DEFINE_RESULT__ = function () { + return classNames; + }.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else { + window.classNames = classNames; + } + })(); + + /***/ + }, + /* 28 */ + /***/ function (module, exports) { + module.exports = function (it) { + if (typeof it != 'function') throw TypeError(it + ' is not a function!'); + return it; + }; + + /***/ + }, + /* 29 */ + /***/ function (module, exports, __webpack_require__) { + var dP = __webpack_require__(12), + createDesc = __webpack_require__(63); + module.exports = __webpack_require__(11) + ? function (object, key, value) { + return dP.f(object, key, createDesc(1, value)); + } + : function (object, key, value) { + object[key] = value; + return object; + }; + + /***/ + }, + /* 30 */ + /***/ function (module, exports, __webpack_require__) { + var global = __webpack_require__(6), + hide = __webpack_require__(29), + has = __webpack_require__(21), + SRC = __webpack_require__(82)('src'), + TO_STRING = 'toString', + $toString = Function[TO_STRING], + TPL = ('' + $toString).split(TO_STRING); + + __webpack_require__(56).inspectSource = function (it) { + return $toString.call(it); + }; + + (module.exports = function (O, key, val, safe) { + var isFunction = typeof val == 'function'; + if (isFunction) has(val, 'name') || hide(val, 'name', key); + if (O[key] === val) return; + if (isFunction) has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key))); + if (O === global) { + O[key] = val; + } else { + if (!safe) { + delete O[key]; + hide(O, key, val); + } else { + if (O[key]) O[key] = val; + else hide(O, key, val); + } + } + // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative + })(Function.prototype, TO_STRING, function toString() { + return (typeof this == 'function' && this[SRC]) || $toString.call(this); + }); + + /***/ + }, + /* 31 */ + /***/ function (module, exports, __webpack_require__) { + var $export = __webpack_require__(0), + fails = __webpack_require__(7), + defined = __webpack_require__(44), + quot = /"/g; + // B.2.3.2.1 CreateHTML(string, tag, attribute, value) + var createHTML = function (string, tag, attribute, value) { + var S = String(defined(string)), + p1 = '<' + tag; + if (attribute !== '') p1 += ' ' + attribute + '="' + String(value).replace(quot, '"') + '"'; + return p1 + '>' + S + '</' + tag + '>'; + }; + module.exports = function (NAME, exec) { + var O = {}; + O[NAME] = exec(createHTML); + $export( + $export.P + + $export.F * + fails(function () { + var test = ''[NAME]('"'); + return test !== test.toLowerCase() || test.split('"').length > 3; + }), + 'String', + O, + ); + }; + + /***/ + }, + /* 32 */ + /***/ function (module, exports, __webpack_require__) { + // to indexed object, toObject with fallback for non-array-like ES3 strings + var IObject = __webpack_require__(112), + defined = __webpack_require__(44); + module.exports = function (it) { + return IObject(defined(it)); + }; + + /***/ + }, + /* 33 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2016-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + // Trust the developer to only use ReactInstrumentation with a __DEV__ check + + var debugTool = null; + + if (true) { + var ReactDebugTool = __webpack_require__(314); + debugTool = ReactDebugTool; + } + + module.exports = { debugTool: debugTool }; + + /***/ + }, + /* 34 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var _prodInvariant = __webpack_require__(5), + _assign = __webpack_require__(8); + + var CallbackQueue = __webpack_require__(308); + var PooledClass = __webpack_require__(85); + var ReactFeatureFlags = __webpack_require__(317); + var ReactReconciler = __webpack_require__(67); + var Transaction = __webpack_require__(142); + + var invariant = __webpack_require__(2); + + var dirtyComponents = []; + var updateBatchNumber = 0; + var asapCallbackQueue = CallbackQueue.getPooled(); + var asapEnqueued = false; + + var batchingStrategy = null; + + function ensureInjected() { + !(ReactUpdates.ReactReconcileTransaction && batchingStrategy) + ? true + ? invariant( + false, + 'ReactUpdates: must inject a reconcile transaction class and batching strategy', + ) + : _prodInvariant('123') + : void 0; + } + + var NESTED_UPDATES = { + initialize: function () { + this.dirtyComponentsLength = dirtyComponents.length; + }, + close: function () { + if (this.dirtyComponentsLength !== dirtyComponents.length) { + // Additional updates were enqueued by componentDidUpdate handlers or + // similar; before our own UPDATE_QUEUEING wrapper closes, we want to run + // these new updates so that if A's componentDidUpdate calls setState on + // B, B will update before the callback A's updater provided when calling + // setState. + dirtyComponents.splice(0, this.dirtyComponentsLength); + flushBatchedUpdates(); + } else { + dirtyComponents.length = 0; + } + }, + }; + + var UPDATE_QUEUEING = { + initialize: function () { + this.callbackQueue.reset(); + }, + close: function () { + this.callbackQueue.notifyAll(); + }, + }; + + var TRANSACTION_WRAPPERS = [NESTED_UPDATES, UPDATE_QUEUEING]; + + function ReactUpdatesFlushTransaction() { + this.reinitializeTransaction(); + this.dirtyComponentsLength = null; + this.callbackQueue = CallbackQueue.getPooled(); + this.reconcileTransaction = ReactUpdates.ReactReconcileTransaction.getPooled( + /* useCreateElement */ true, + ); + } + + _assign(ReactUpdatesFlushTransaction.prototype, Transaction, { + getTransactionWrappers: function () { + return TRANSACTION_WRAPPERS; + }, + + destructor: function () { + this.dirtyComponentsLength = null; + CallbackQueue.release(this.callbackQueue); + this.callbackQueue = null; + ReactUpdates.ReactReconcileTransaction.release(this.reconcileTransaction); + this.reconcileTransaction = null; + }, + + perform: function (method, scope, a) { + // Essentially calls `this.reconcileTransaction.perform(method, scope, a)` + // with this transaction's wrappers around it. + return Transaction.perform.call( + this, + this.reconcileTransaction.perform, + this.reconcileTransaction, + method, + scope, + a, + ); + }, + }); + + PooledClass.addPoolingTo(ReactUpdatesFlushTransaction); + + function batchedUpdates(callback, a, b, c, d, e) { + ensureInjected(); + return batchingStrategy.batchedUpdates(callback, a, b, c, d, e); + } + + /** + * Array comparator for ReactComponents by mount ordering. + * + * @param {ReactComponent} c1 first component you're comparing + * @param {ReactComponent} c2 second component you're comparing + * @return {number} Return value usable by Array.prototype.sort(). + */ + function mountOrderComparator(c1, c2) { + return c1._mountOrder - c2._mountOrder; + } + + function runBatchedUpdates(transaction) { + var len = transaction.dirtyComponentsLength; + !(len === dirtyComponents.length) + ? true + ? invariant( + false, + "Expected flush transaction's stored dirty-components length (%s) to match dirty-components array length (%s).", + len, + dirtyComponents.length, + ) + : _prodInvariant('124', len, dirtyComponents.length) + : void 0; + + // Since reconciling a component higher in the owner hierarchy usually (not + // always -- see shouldComponentUpdate()) will reconcile children, reconcile + // them before their children by sorting the array. + dirtyComponents.sort(mountOrderComparator); + + // Any updates enqueued while reconciling must be performed after this entire + // batch. Otherwise, if dirtyComponents is [A, B] where A has children B and + // C, B could update twice in a single batch if C's render enqueues an update + // to B (since B would have already updated, we should skip it, and the only + // way we can know to do so is by checking the batch counter). + updateBatchNumber++; + + for (var i = 0; i < len; i++) { + // If a component is unmounted before pending changes apply, it will still + // be here, but we assume that it has cleared its _pendingCallbacks and + // that performUpdateIfNecessary is a noop. + var component = dirtyComponents[i]; + + // If performUpdateIfNecessary happens to enqueue any new updates, we + // shouldn't execute the callbacks until the next render happens, so + // stash the callbacks first + var callbacks = component._pendingCallbacks; + component._pendingCallbacks = null; + + var markerName; + if (ReactFeatureFlags.logTopLevelRenders) { + var namedComponent = component; + // Duck type TopLevelWrapper. This is probably always true. + if (component._currentElement.type.isReactTopLevelWrapper) { + namedComponent = component._renderedComponent; + } + markerName = 'React update: ' + namedComponent.getName(); + console.time(markerName); + } + + ReactReconciler.performUpdateIfNecessary( + component, + transaction.reconcileTransaction, + updateBatchNumber, + ); + + if (markerName) { + console.timeEnd(markerName); + } + + if (callbacks) { + for (var j = 0; j < callbacks.length; j++) { + transaction.callbackQueue.enqueue(callbacks[j], component.getPublicInstance()); + } + } + } + } + + var flushBatchedUpdates = function () { + // ReactUpdatesFlushTransaction's wrappers will clear the dirtyComponents + // array and perform any updates enqueued by mount-ready handlers (i.e., + // componentDidUpdate) but we need to check here too in order to catch + // updates enqueued by setState callbacks and asap calls. + while (dirtyComponents.length || asapEnqueued) { + if (dirtyComponents.length) { + var transaction = ReactUpdatesFlushTransaction.getPooled(); + transaction.perform(runBatchedUpdates, null, transaction); + ReactUpdatesFlushTransaction.release(transaction); + } + + if (asapEnqueued) { + asapEnqueued = false; + var queue = asapCallbackQueue; + asapCallbackQueue = CallbackQueue.getPooled(); + queue.notifyAll(); + CallbackQueue.release(queue); + } + } + }; + + /** + * Mark a component as needing a rerender, adding an optional callback to a + * list of functions which will be executed once the rerender occurs. + */ + function enqueueUpdate(component) { + ensureInjected(); + + // Various parts of our code (such as ReactCompositeComponent's + // _renderValidatedComponent) assume that calls to render aren't nested; + // verify that that's the case. (This is called by each top-level update + // function, like setState, forceUpdate, etc.; creation and + // destruction of top-level components is guarded in ReactMount.) + + if (!batchingStrategy.isBatchingUpdates) { + batchingStrategy.batchedUpdates(enqueueUpdate, component); + return; + } + + dirtyComponents.push(component); + if (component._updateBatchNumber == null) { + component._updateBatchNumber = updateBatchNumber + 1; + } + } + + /** + * Enqueue a callback to be run at the end of the current batching cycle. Throws + * if no updates are currently being performed. + */ + function asap(callback, context) { + !batchingStrategy.isBatchingUpdates + ? true + ? invariant( + false, + "ReactUpdates.asap: Can't enqueue an asap callback in a context whereupdates are not being batched.", + ) + : _prodInvariant('125') + : void 0; + asapCallbackQueue.enqueue(callback, context); + asapEnqueued = true; + } + + var ReactUpdatesInjection = { + injectReconcileTransaction: function (ReconcileTransaction) { + !ReconcileTransaction + ? true + ? invariant(false, 'ReactUpdates: must provide a reconcile transaction class') + : _prodInvariant('126') + : void 0; + ReactUpdates.ReactReconcileTransaction = ReconcileTransaction; + }, + + injectBatchingStrategy: function (_batchingStrategy) { + !_batchingStrategy + ? true + ? invariant(false, 'ReactUpdates: must provide a batching strategy') + : _prodInvariant('127') + : void 0; + !(typeof _batchingStrategy.batchedUpdates === 'function') + ? true + ? invariant(false, 'ReactUpdates: must provide a batchedUpdates() function') + : _prodInvariant('128') + : void 0; + !(typeof _batchingStrategy.isBatchingUpdates === 'boolean') + ? true + ? invariant(false, 'ReactUpdates: must provide an isBatchingUpdates boolean attribute') + : _prodInvariant('129') + : void 0; + batchingStrategy = _batchingStrategy; + }, + }; + + var ReactUpdates = { + /** + * React references `ReactReconcileTransaction` using this property in order + * to allow dependency injection. + * + * @internal + */ + ReactReconcileTransaction: null, + + batchedUpdates: batchedUpdates, + enqueueUpdate: enqueueUpdate, + flushBatchedUpdates: flushBatchedUpdates, + injection: ReactUpdatesInjection, + asap: asap, + }; + + module.exports = ReactUpdates; + + /***/ + }, + /* 35 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (Buffer) { + var bind = __webpack_require__(229); + + /*global toString:true*/ + + // utils is a library of generic helper functions non-specific to axios + + var toString = Object.prototype.toString; + + /** + * Determine if a value is an Array + * + * @param {Object} val The value to test + * @returns {boolean} True if value is an Array, otherwise false + */ + function isArray(val) { + return toString.call(val) === '[object Array]'; + } + + /** + * Determine if a value is a Node Buffer + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a Node Buffer, otherwise false + */ + function isBuffer(val) { + return typeof Buffer !== 'undefined' && Buffer.isBuffer && Buffer.isBuffer(val); + } + + /** + * Determine if a value is an ArrayBuffer + * + * @param {Object} val The value to test + * @returns {boolean} True if value is an ArrayBuffer, otherwise false + */ + function isArrayBuffer(val) { + return toString.call(val) === '[object ArrayBuffer]'; + } + + /** + * Determine if a value is a FormData + * + * @param {Object} val The value to test + * @returns {boolean} True if value is an FormData, otherwise false + */ + function isFormData(val) { + return typeof FormData !== 'undefined' && val instanceof FormData; + } + + /** + * Determine if a value is a view on an ArrayBuffer + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false + */ + function isArrayBufferView(val) { + var result; + if (typeof ArrayBuffer !== 'undefined' && ArrayBuffer.isView) { + result = ArrayBuffer.isView(val); + } else { + result = val && val.buffer && val.buffer instanceof ArrayBuffer; + } + return result; + } + + /** + * Determine if a value is a String + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a String, otherwise false + */ + function isString(val) { + return typeof val === 'string'; + } + + /** + * Determine if a value is a Number + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a Number, otherwise false + */ + function isNumber(val) { + return typeof val === 'number'; + } + + /** + * Determine if a value is undefined + * + * @param {Object} val The value to test + * @returns {boolean} True if the value is undefined, otherwise false + */ + function isUndefined(val) { + return typeof val === 'undefined'; + } + + /** + * Determine if a value is an Object + * + * @param {Object} val The value to test + * @returns {boolean} True if value is an Object, otherwise false + */ + function isObject(val) { + return val !== null && typeof val === 'object'; + } + + /** + * Determine if a value is a Date + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a Date, otherwise false + */ + function isDate(val) { + return toString.call(val) === '[object Date]'; + } + + /** + * Determine if a value is a File + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a File, otherwise false + */ + function isFile(val) { + return toString.call(val) === '[object File]'; + } + + /** + * Determine if a value is a Blob + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a Blob, otherwise false + */ + function isBlob(val) { + return toString.call(val) === '[object Blob]'; + } + + /** + * Determine if a value is a Function + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a Function, otherwise false + */ + function isFunction(val) { + return toString.call(val) === '[object Function]'; + } + + /** + * Determine if a value is a Stream + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a Stream, otherwise false + */ + function isStream(val) { + return isObject(val) && isFunction(val.pipe); + } + + /** + * Determine if a value is a URLSearchParams object + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a URLSearchParams object, otherwise false + */ + function isURLSearchParams(val) { + return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams; + } + + /** + * Trim excess whitespace off the beginning and end of a string + * + * @param {String} str The String to trim + * @returns {String} The String freed of excess whitespace + */ + function trim(str) { + return str.replace(/^\s*/, '').replace(/\s*$/, ''); + } + + /** + * Determine if we're running in a standard browser environment + * + * This allows axios to run in a web worker, and react-native. + * Both environments support XMLHttpRequest, but not fully standard globals. + * + * web workers: + * typeof window -> undefined + * typeof document -> undefined + * + * react-native: + * navigator.product -> 'ReactNative' + */ + function isStandardBrowserEnv() { + if (typeof navigator !== 'undefined' && navigator.product === 'ReactNative') { + return false; + } + return typeof window !== 'undefined' && typeof document !== 'undefined'; + } + + /** + * Iterate over an Array or an Object invoking a function for each item. + * + * If `obj` is an Array callback will be called passing + * the value, index, and complete array for each item. + * + * If 'obj' is an Object callback will be called passing + * the value, key, and complete object for each property. + * + * @param {Object|Array} obj The object to iterate + * @param {Function} fn The callback to invoke for each item + */ + function forEach(obj, fn) { + // Don't bother if no value provided + if (obj === null || typeof obj === 'undefined') { + return; + } + + // Force an array if not already something iterable + if (typeof obj !== 'object' && !isArray(obj)) { + /*eslint no-param-reassign:0*/ + obj = [obj]; + } + + if (isArray(obj)) { + // Iterate over array values + for (var i = 0, l = obj.length; i < l; i++) { + fn.call(null, obj[i], i, obj); + } + } else { + // Iterate over object keys + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + fn.call(null, obj[key], key, obj); + } + } + } + } + + /** + * Accepts varargs expecting each argument to be an object, then + * immutably merges the properties of each object and returns result. + * + * When multiple objects contain the same key the later object in + * the arguments list will take precedence. + * + * Example: + * + * ```js + * var result = merge({foo: 123}, {foo: 456}); + * console.log(result.foo); // outputs 456 + * ``` + * + * @param {Object} obj1 Object to merge + * @returns {Object} Result of all merge properties + */ + function merge(/* obj1, obj2, obj3, ... */) { + var result = {}; + function assignValue(val, key) { + if (typeof result[key] === 'object' && typeof val === 'object') { + result[key] = merge(result[key], val); + } else { + result[key] = val; + } + } + + for (var i = 0, l = arguments.length; i < l; i++) { + forEach(arguments[i], assignValue); + } + return result; + } + + /** + * Extends object a by mutably adding to it the properties of object b. + * + * @param {Object} a The object to be extended + * @param {Object} b The object to copy properties from + * @param {Object} thisArg The object to bind function to + * @return {Object} The resulting value of object a + */ + function extend(a, b, thisArg) { + forEach(b, function assignValue(val, key) { + if (thisArg && typeof val === 'function') { + a[key] = bind(val, thisArg); + } else { + a[key] = val; + } + }); + return a; + } + + module.exports = { + isArray: isArray, + isArrayBuffer: isArrayBuffer, + isBuffer: isBuffer, + isFormData: isFormData, + isArrayBufferView: isArrayBufferView, + isString: isString, + isNumber: isNumber, + isObject: isObject, + isUndefined: isUndefined, + isDate: isDate, + isFile: isFile, + isBlob: isBlob, + isFunction: isFunction, + isStream: isStream, + isURLSearchParams: isURLSearchParams, + isStandardBrowserEnv: isStandardBrowserEnv, + forEach: forEach, + merge: merge, + extend: extend, + trim: trim, + }; + + /* WEBPACK VAR INJECTION */ + }).call(exports, __webpack_require__(411).Buffer); + + /***/ + }, + /* 36 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + + var _react = __webpack_require__(1); + + var _react2 = _interopRequireDefault(_react); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + /* eslint-disable react/prefer-stateless-function */ + var BaseComponent = (function (_React$PureComponent) { + _inherits(BaseComponent, _React$PureComponent); + + function BaseComponent() { + _classCallCheck(this, BaseComponent); + + return _possibleConstructorReturn( + this, + (BaseComponent.__proto__ || Object.getPrototypeOf(BaseComponent)).apply(this, arguments), + ); + } + + return BaseComponent; + })(_react2.default.PureComponent); + + exports.default = BaseComponent; + + /***/ + }, + /* 37 */ + /***/ function (module, exports, __webpack_require__) { + var store = __webpack_require__(158)('wks'), + uid = __webpack_require__(125), + Symbol = __webpack_require__(48).Symbol, + USE_SYMBOL = typeof Symbol == 'function'; + + var $exports = (module.exports = function (name) { + return ( + store[name] || + (store[name] = (USE_SYMBOL && Symbol[name]) || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)) + ); + }); + + $exports.store = store; + + /***/ + }, + /* 38 */ + /***/ function (module, exports, __webpack_require__) { + var pIE = __webpack_require__(113), + createDesc = __webpack_require__(63), + toIObject = __webpack_require__(32), + toPrimitive = __webpack_require__(52), + has = __webpack_require__(21), + IE8_DOM_DEFINE = __webpack_require__(269), + gOPD = Object.getOwnPropertyDescriptor; + + exports.f = __webpack_require__(11) + ? gOPD + : function getOwnPropertyDescriptor(O, P) { + O = toIObject(O); + P = toPrimitive(P, true); + if (IE8_DOM_DEFINE) + try { + return gOPD(O, P); + } catch (e) { + /* empty */ + } + if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]); + }; + + /***/ + }, + /* 39 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) + var has = __webpack_require__(21), + toObject = __webpack_require__(17), + IE_PROTO = __webpack_require__(179)('IE_PROTO'), + ObjectProto = Object.prototype; + + module.exports = + Object.getPrototypeOf || + function (O) { + O = toObject(O); + if (has(O, IE_PROTO)) return O[IE_PROTO]; + if (typeof O.constructor == 'function' && O instanceof O.constructor) { + return O.constructor.prototype; + } + return O instanceof Object ? ObjectProto : null; + }; + + /***/ + }, + /* 40 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + /** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + function makeEmptyFunction(arg) { + return function () { + return arg; + }; + } + + /** + * This function accepts and discards inputs; it has no side effects. This is + * primarily useful idiomatically for overridable function endpoints which + * always need to be callable, since JS lacks a null-call idiom ala Cocoa. + */ + var emptyFunction = function emptyFunction() {}; + + emptyFunction.thatReturns = makeEmptyFunction; + emptyFunction.thatReturnsFalse = makeEmptyFunction(false); + emptyFunction.thatReturnsTrue = makeEmptyFunction(true); + emptyFunction.thatReturnsNull = makeEmptyFunction(null); + emptyFunction.thatReturnsThis = function () { + return this; + }; + emptyFunction.thatReturnsArgument = function (arg) { + return arg; + }; + + module.exports = emptyFunction; + + /***/ + }, + /* 41 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var _assign = __webpack_require__(8); + + var ReactChildren = __webpack_require__(821); + var ReactComponent = __webpack_require__(219); + var ReactPureComponent = __webpack_require__(825); + var ReactClass = __webpack_require__(822); + var ReactDOMFactories = __webpack_require__(823); + var ReactElement = __webpack_require__(86); + var ReactPropTypes = __webpack_require__(824); + var ReactVersion = __webpack_require__(829); + + var onlyChild = __webpack_require__(359); + var warning = __webpack_require__(3); + + var createElement = ReactElement.createElement; + var createFactory = ReactElement.createFactory; + var cloneElement = ReactElement.cloneElement; + + if (true) { + var ReactElementValidator = __webpack_require__(357); + createElement = ReactElementValidator.createElement; + createFactory = ReactElementValidator.createFactory; + cloneElement = ReactElementValidator.cloneElement; + } + + var __spread = _assign; + + if (true) { + var warned = false; + __spread = function () { + true + ? warning( + warned, + 'React.__spread is deprecated and should not be used. Use ' + + 'Object.assign directly or another helper function with similar ' + + 'semantics. You may be seeing this warning due to your compiler. ' + + 'See https://fb.me/react-spread-deprecation for more details.', + ) + : void 0; + warned = true; + return _assign.apply(null, arguments); + }; + } + + var React = { + // Modern + + Children: { + map: ReactChildren.map, + forEach: ReactChildren.forEach, + count: ReactChildren.count, + toArray: ReactChildren.toArray, + only: onlyChild, + }, + + Component: ReactComponent, + PureComponent: ReactPureComponent, + + createElement: createElement, + cloneElement: cloneElement, + isValidElement: ReactElement.isValidElement, + + // Classic + + PropTypes: ReactPropTypes, + createClass: ReactClass.createClass, + createFactory: createFactory, + createMixin: function (mixin) { + // Currently a noop. Will be used to validate and trace mixins. + return mixin; + }, + + // This looks DOM specific but these are actually isomorphic helpers + // since they are just generating DOM strings. + DOM: ReactDOMFactories, + + version: ReactVersion, + + // Deprecated hook for JSX spread, don't use this for anything. + __spread: __spread, + }; + + module.exports = React; + + /***/ + }, + /* 42 */ + /***/ function (module, exports, __webpack_require__) { + var global = __webpack_require__(48), + core = __webpack_require__(18), + ctx = __webpack_require__(89), + hide = __webpack_require__(60), + PROTOTYPE = 'prototype'; + + var $export = function (type, name, source) { + var IS_FORCED = type & $export.F, + IS_GLOBAL = type & $export.G, + IS_STATIC = type & $export.S, + IS_PROTO = type & $export.P, + IS_BIND = type & $export.B, + IS_WRAP = type & $export.W, + exports = IS_GLOBAL ? core : core[name] || (core[name] = {}), + expProto = exports[PROTOTYPE], + target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE], + key, + own, + out; + if (IS_GLOBAL) source = name; + for (key in source) { + // contains in native + own = !IS_FORCED && target && target[key] !== undefined; + if (own && key in exports) continue; + // export native or passed + out = own ? target[key] : source[key]; + // prevent global pollution for namespaces + exports[key] = + IS_GLOBAL && typeof target[key] != 'function' + ? source[key] + : // bind timers to global for call from export context + IS_BIND && own + ? ctx(out, global) + : // wrap global constructors for prevent change them in library + IS_WRAP && target[key] == out + ? (function (C) { + var F = function (a, b, c) { + if (this instanceof C) { + switch (arguments.length) { + case 0: + return new C(); + case 1: + return new C(a); + case 2: + return new C(a, b); + } + return new C(a, b, c); + } + return C.apply(this, arguments); + }; + F[PROTOTYPE] = C[PROTOTYPE]; + return F; + // make static versions for prototype methods + })(out) + : IS_PROTO && typeof out == 'function' + ? ctx(Function.call, out) + : out; + // export proto methods to core.%CONSTRUCTOR%.methods.%NAME% + if (IS_PROTO) { + (exports.virtual || (exports.virtual = {}))[key] = out; + // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME% + if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out); + } + } + }; + // type bitmap + $export.F = 1; // forced + $export.G = 2; // global + $export.S = 4; // static + $export.P = 8; // proto + $export.B = 16; // bind + $export.W = 32; // wrap + $export.U = 64; // safe + $export.R = 128; // real proto method for `library` + module.exports = $export; + + /***/ + }, + /* 43 */ + /***/ function (module, exports) { + var toString = {}.toString; + + module.exports = function (it) { + return toString.call(it).slice(8, -1); + }; + + /***/ + }, + /* 44 */ + /***/ function (module, exports) { + // 7.2.1 RequireObjectCoercible(argument) + module.exports = function (it) { + if (it == undefined) throw TypeError("Can't call method on " + it); + return it; + }; + + /***/ + }, + /* 45 */ + /***/ function (module, exports, __webpack_require__) { + var fails = __webpack_require__(7); + + module.exports = function (method, arg) { + return ( + !!method && + fails(function () { + arg ? method.call(null, function () {}, 1) : method.call(null); + }) + ); + }; + + /***/ + }, + /* 46 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + exports._curry = exports.bsSizes = exports.bsStyles = exports.bsClass = undefined; + + var _entries = __webpack_require__(406); + + var _entries2 = _interopRequireDefault(_entries); + + var _extends2 = __webpack_require__(20); + + var _extends3 = _interopRequireDefault(_extends2); + + exports.prefix = prefix; + exports.getClassSet = getClassSet; + exports.splitBsProps = splitBsProps; + exports.splitBsPropsAndOmit = splitBsPropsAndOmit; + exports.addStyle = addStyle; + + var _invariant = __webpack_require__(16); + + var _invariant2 = _interopRequireDefault(_invariant); + + var _react = __webpack_require__(1); + + var _StyleConfig = __webpack_require__(96); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + function curry(fn) { + return function () { + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + var last = args[args.length - 1]; + if (typeof last === 'function') { + return fn.apply(undefined, args); + } + return function (Component) { + return fn.apply(undefined, args.concat([Component])); + }; + }; + } // TODO: The publicly exposed parts of this should be in lib/BootstrapUtils. + + function prefix(props, variant) { + !(props.bsClass != null) + ? true + ? (0, _invariant2['default'])(false, 'A `bsClass` prop is required for this component') + : (0, _invariant2['default'])(false) + : void 0; + return props.bsClass + (variant ? '-' + variant : ''); + } + + var bsClass = (exports.bsClass = curry(function (defaultClass, Component) { + var propTypes = Component.propTypes || (Component.propTypes = {}); + var defaultProps = Component.defaultProps || (Component.defaultProps = {}); + + propTypes.bsClass = _react.PropTypes.string; + defaultProps.bsClass = defaultClass; + + return Component; + })); + + var bsStyles = (exports.bsStyles = curry(function (styles, defaultStyle, Component) { + if (typeof defaultStyle !== 'string') { + Component = defaultStyle; + defaultStyle = undefined; + } + + var existing = Component.STYLES || []; + var propTypes = Component.propTypes || {}; + + styles.forEach(function (style) { + if (existing.indexOf(style) === -1) { + existing.push(style); + } + }); + + var propType = _react.PropTypes.oneOf(existing); + + // expose the values on the propType function for documentation + Component.STYLES = propType._values = existing; + + Component.propTypes = (0, _extends3['default'])({}, propTypes, { + bsStyle: propType, + }); + + if (defaultStyle !== undefined) { + var defaultProps = Component.defaultProps || (Component.defaultProps = {}); + defaultProps.bsStyle = defaultStyle; + } + + return Component; + })); + + var bsSizes = (exports.bsSizes = curry(function (sizes, defaultSize, Component) { + if (typeof defaultSize !== 'string') { + Component = defaultSize; + defaultSize = undefined; + } + + var existing = Component.SIZES || []; + var propTypes = Component.propTypes || {}; + + sizes.forEach(function (size) { + if (existing.indexOf(size) === -1) { + existing.push(size); + } + }); + + var values = []; + existing.forEach(function (size) { + var mappedSize = _StyleConfig.SIZE_MAP[size]; + if (mappedSize && mappedSize !== size) { + values.push(mappedSize); + } + + values.push(size); + }); + + var propType = _react.PropTypes.oneOf(values); + propType._values = values; + + // expose the values on the propType function for documentation + Component.SIZES = existing; + + Component.propTypes = (0, _extends3['default'])({}, propTypes, { + bsSize: propType, + }); + + if (defaultSize !== undefined) { + if (!Component.defaultProps) { + Component.defaultProps = {}; + } + Component.defaultProps.bsSize = defaultSize; + } + + return Component; + })); + + function getClassSet(props) { + var _classes; + + var classes = ((_classes = {}), (_classes[prefix(props)] = true), _classes); + + if (props.bsSize) { + var bsSize = _StyleConfig.SIZE_MAP[props.bsSize] || props.bsSize; + classes[prefix(props, bsSize)] = true; + } + + if (props.bsStyle) { + classes[prefix(props, props.bsStyle)] = true; + } + + return classes; + } + + function getBsProps(props) { + return { + bsClass: props.bsClass, + bsSize: props.bsSize, + bsStyle: props.bsStyle, + bsRole: props.bsRole, + }; + } + + function isBsProp(propName) { + return ( + propName === 'bsClass' || propName === 'bsSize' || propName === 'bsStyle' || propName === 'bsRole' + ); + } + + function splitBsProps(props) { + var elementProps = {}; + (0, _entries2['default'])(props).forEach(function (_ref) { + var propName = _ref[0], + propValue = _ref[1]; + + if (!isBsProp(propName)) { + elementProps[propName] = propValue; + } + }); + + return [getBsProps(props), elementProps]; + } + + function splitBsPropsAndOmit(props, omittedPropNames) { + var isOmittedProp = {}; + omittedPropNames.forEach(function (propName) { + isOmittedProp[propName] = true; + }); + + var elementProps = {}; + (0, _entries2['default'])(props).forEach(function (_ref2) { + var propName = _ref2[0], + propValue = _ref2[1]; + + if (!isBsProp(propName) && !isOmittedProp[propName]) { + elementProps[propName] = propValue; + } + }); + + return [getBsProps(props), elementProps]; + } + + /** + * Add a style variant to a Component. Mutates the propTypes of the component + * in order to validate the new variant. + */ + function addStyle(Component) { + for ( + var _len2 = arguments.length, styleVariant = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; + _key2 < _len2; + _key2++ + ) { + styleVariant[_key2 - 1] = arguments[_key2]; + } + + bsStyles(styleVariant, Component); + } + + var _curry = (exports._curry = curry); + + /***/ + }, + /* 47 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2014-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + + /** + * Similar to invariant but only logs a warning if the condition is not met. + * This can be used to log issues in development environments in critical + * paths. Removing the logging code for production environments will keep the + * same logic and follow the same code paths. + */ + + var warning = function () {}; + + if (true) { + warning = function (condition, format, args) { + var len = arguments.length; + args = new Array(len > 2 ? len - 2 : 0); + for (var key = 2; key < len; key++) { + args[key - 2] = arguments[key]; + } + if (format === undefined) { + throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument'); + } + + if (format.length < 10 || /^[s\W]*$/.test(format)) { + throw new Error( + 'The warning format should be able to uniquely identify this ' + + 'warning. Please, use a more descriptive format than: ' + + format, + ); + } + + if (!condition) { + var argIndex = 0; + var message = + 'Warning: ' + + format.replace(/%s/g, function () { + return args[argIndex++]; + }); + if (typeof console !== 'undefined') { + console.error(message); + } + try { + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + throw new Error(message); + } catch (x) {} + } + }; + } + + module.exports = warning; + + /***/ + }, + /* 48 */ + /***/ function (module, exports) { + // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 + var global = (module.exports = + typeof window != 'undefined' && window.Math == Math + ? window + : typeof self != 'undefined' && self.Math == Math + ? self + : Function('return this')()); + if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef + + /***/ + }, + /* 49 */ + /***/ function (module, exports, __webpack_require__) { + var anObject = __webpack_require__(69), + IE8_DOM_DEFINE = __webpack_require__(247), + toPrimitive = __webpack_require__(160), + dP = Object.defineProperty; + + exports.f = __webpack_require__(55) + ? Object.defineProperty + : function defineProperty(O, P, Attributes) { + anObject(O); + P = toPrimitive(P, true); + anObject(Attributes); + if (IE8_DOM_DEFINE) + try { + return dP(O, P, Attributes); + } catch (e) { + /* empty */ + } + if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!'); + if ('value' in Attributes) O[P] = Attributes.value; + return O; + }; + + /***/ + }, + /* 50 */ + /***/ function (module, exports, __webpack_require__) { + // 0 -> Array#forEach + // 1 -> Array#map + // 2 -> Array#filter + // 3 -> Array#some + // 4 -> Array#every + // 5 -> Array#find + // 6 -> Array#findIndex + var ctx = __webpack_require__(57), + IObject = __webpack_require__(112), + toObject = __webpack_require__(17), + toLength = __webpack_require__(15), + asc = __webpack_require__(463); + module.exports = function (TYPE, $create) { + var IS_MAP = TYPE == 1, + IS_FILTER = TYPE == 2, + IS_SOME = TYPE == 3, + IS_EVERY = TYPE == 4, + IS_FIND_INDEX = TYPE == 6, + NO_HOLES = TYPE == 5 || IS_FIND_INDEX, + create = $create || asc; + return function ($this, callbackfn, that) { + var O = toObject($this), + self = IObject(O), + f = ctx(callbackfn, that, 3), + length = toLength(self.length), + index = 0, + result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined, + val, + res; + for (; length > index; index++) + if (NO_HOLES || index in self) { + val = self[index]; + res = f(val, index, O); + if (TYPE) { + if (IS_MAP) + result[index] = res; // map + else if (res) + switch (TYPE) { + case 3: + return true; // some + case 5: + return val; // find + case 6: + return index; // findIndex + case 2: + result.push(val); // filter + } + else if (IS_EVERY) return false; // every + } + } + return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result; + }; + }; + + /***/ + }, + /* 51 */ + /***/ function (module, exports, __webpack_require__) { + // most Object methods by ES6 should accept primitives + var $export = __webpack_require__(0), + core = __webpack_require__(56), + fails = __webpack_require__(7); + module.exports = function (KEY, exec) { + var fn = (core.Object || {})[KEY] || Object[KEY], + exp = {}; + exp[KEY] = exec(fn); + $export( + $export.S + + $export.F * + fails(function () { + fn(1); + }), + 'Object', + exp, + ); + }; + + /***/ + }, + /* 52 */ + /***/ function (module, exports, __webpack_require__) { + // 7.1.1 ToPrimitive(input [, PreferredType]) + var isObject = __webpack_require__(9); + // instead of the ES6 spec version, we didn't implement @@toPrimitive case + // and the second argument - flag - preferred type is a string + module.exports = function (it, S) { + if (!isObject(it)) return it; + var fn, val; + if (S && typeof (fn = it.toString) == 'function' && !isObject((val = fn.call(it)))) return val; + if (typeof (fn = it.valueOf) == 'function' && !isObject((val = fn.call(it)))) return val; + if (!S && typeof (fn = it.toString) == 'function' && !isObject((val = fn.call(it)))) return val; + throw TypeError("Can't convert object to primitive value"); + }; + + /***/ + }, + /* 53 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var _assign = __webpack_require__(8); + + var PooledClass = __webpack_require__(85); + + var emptyFunction = __webpack_require__(40); + var warning = __webpack_require__(3); + + var didWarnForAddedNewProperty = false; + var isProxySupported = typeof Proxy === 'function'; + + var shouldBeReleasedProperties = [ + 'dispatchConfig', + '_targetInst', + 'nativeEvent', + 'isDefaultPrevented', + 'isPropagationStopped', + '_dispatchListeners', + '_dispatchInstances', + ]; + + /** + * @interface Event + * @see http://www.w3.org/TR/DOM-Level-3-Events/ + */ + var EventInterface = { + type: null, + target: null, + // currentTarget is set when dispatching; no use in copying it here + currentTarget: emptyFunction.thatReturnsNull, + eventPhase: null, + bubbles: null, + cancelable: null, + timeStamp: function (event) { + return event.timeStamp || Date.now(); + }, + defaultPrevented: null, + isTrusted: null, + }; + + /** + * Synthetic events are dispatched by event plugins, typically in response to a + * top-level event delegation handler. + * + * These systems should generally use pooling to reduce the frequency of garbage + * collection. The system should check `isPersistent` to determine whether the + * event should be released into the pool after being dispatched. Users that + * need a persisted event should invoke `persist`. + * + * Synthetic events (and subclasses) implement the DOM Level 3 Events API by + * normalizing browser quirks. Subclasses do not necessarily have to implement a + * DOM interface; custom application-specific events can also subclass this. + * + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {*} targetInst Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @param {DOMEventTarget} nativeEventTarget Target node. + */ + function SyntheticEvent(dispatchConfig, targetInst, nativeEvent, nativeEventTarget) { + if (true) { + // these have a getter/setter for warnings + delete this.nativeEvent; + delete this.preventDefault; + delete this.stopPropagation; + } + + this.dispatchConfig = dispatchConfig; + this._targetInst = targetInst; + this.nativeEvent = nativeEvent; + + var Interface = this.constructor.Interface; + for (var propName in Interface) { + if (!Interface.hasOwnProperty(propName)) { + continue; + } + if (true) { + delete this[propName]; // this has a getter/setter for warnings + } + var normalize = Interface[propName]; + if (normalize) { + this[propName] = normalize(nativeEvent); + } else { + if (propName === 'target') { + this.target = nativeEventTarget; + } else { + this[propName] = nativeEvent[propName]; + } + } + } + + var defaultPrevented = + nativeEvent.defaultPrevented != null + ? nativeEvent.defaultPrevented + : nativeEvent.returnValue === false; + if (defaultPrevented) { + this.isDefaultPrevented = emptyFunction.thatReturnsTrue; + } else { + this.isDefaultPrevented = emptyFunction.thatReturnsFalse; + } + this.isPropagationStopped = emptyFunction.thatReturnsFalse; + return this; + } + + _assign(SyntheticEvent.prototype, { + preventDefault: function () { + this.defaultPrevented = true; + var event = this.nativeEvent; + if (!event) { + return; + } + + if (event.preventDefault) { + event.preventDefault(); + } else if (typeof event.returnValue !== 'unknown') { + // eslint-disable-line valid-typeof + event.returnValue = false; + } + this.isDefaultPrevented = emptyFunction.thatReturnsTrue; + }, + + stopPropagation: function () { + var event = this.nativeEvent; + if (!event) { + return; + } + + if (event.stopPropagation) { + event.stopPropagation(); + } else if (typeof event.cancelBubble !== 'unknown') { + // eslint-disable-line valid-typeof + // The ChangeEventPlugin registers a "propertychange" event for + // IE. This event does not support bubbling or cancelling, and + // any references to cancelBubble throw "Member not found". A + // typeof check of "unknown" circumvents this issue (and is also + // IE specific). + event.cancelBubble = true; + } + + this.isPropagationStopped = emptyFunction.thatReturnsTrue; + }, + + /** + * We release all dispatched `SyntheticEvent`s after each event loop, adding + * them back into the pool. This allows a way to hold onto a reference that + * won't be added back into the pool. + */ + persist: function () { + this.isPersistent = emptyFunction.thatReturnsTrue; + }, + + /** + * Checks if this event should be released back into the pool. + * + * @return {boolean} True if this should not be released, false otherwise. + */ + isPersistent: emptyFunction.thatReturnsFalse, + + /** + * `PooledClass` looks for `destructor` on each instance it releases. + */ + destructor: function () { + var Interface = this.constructor.Interface; + for (var propName in Interface) { + if (true) { + Object.defineProperty( + this, + propName, + getPooledWarningPropertyDefinition(propName, Interface[propName]), + ); + } else { + this[propName] = null; + } + } + for (var i = 0; i < shouldBeReleasedProperties.length; i++) { + this[shouldBeReleasedProperties[i]] = null; + } + if (true) { + Object.defineProperty( + this, + 'nativeEvent', + getPooledWarningPropertyDefinition('nativeEvent', null), + ); + Object.defineProperty( + this, + 'preventDefault', + getPooledWarningPropertyDefinition('preventDefault', emptyFunction), + ); + Object.defineProperty( + this, + 'stopPropagation', + getPooledWarningPropertyDefinition('stopPropagation', emptyFunction), + ); + } + }, + }); + + SyntheticEvent.Interface = EventInterface; + + if (true) { + if (isProxySupported) { + /*eslint-disable no-func-assign */ + SyntheticEvent = new Proxy(SyntheticEvent, { + construct: function (target, args) { + return this.apply(target, Object.create(target.prototype), args); + }, + apply: function (constructor, that, args) { + return new Proxy(constructor.apply(that, args), { + set: function (target, prop, value) { + if ( + prop !== 'isPersistent' && + !target.constructor.Interface.hasOwnProperty(prop) && + shouldBeReleasedProperties.indexOf(prop) === -1 + ) { + true + ? warning( + didWarnForAddedNewProperty || target.isPersistent(), + "This synthetic event is reused for performance reasons. If you're " + + "seeing this, you're adding a new property in the synthetic event object. " + + 'The property is never released. See ' + + 'https://fb.me/react-event-pooling for more information.', + ) + : void 0; + didWarnForAddedNewProperty = true; + } + target[prop] = value; + return true; + }, + }); + }, + }); + /*eslint-enable no-func-assign */ + } + } + /** + * Helper to reduce boilerplate when creating subclasses. + * + * @param {function} Class + * @param {?object} Interface + */ + SyntheticEvent.augmentClass = function (Class, Interface) { + var Super = this; + + var E = function () {}; + E.prototype = Super.prototype; + var prototype = new E(); + + _assign(prototype, Class.prototype); + Class.prototype = prototype; + Class.prototype.constructor = Class; + + Class.Interface = _assign({}, Super.Interface, Interface); + Class.augmentClass = Super.augmentClass; + + PooledClass.addPoolingTo(Class, PooledClass.fourArgumentPooler); + }; + + PooledClass.addPoolingTo(SyntheticEvent, PooledClass.fourArgumentPooler); + + module.exports = SyntheticEvent; + + /** + * Helper to nullify syntheticEvent instance properties when destructing + * + * @param {object} SyntheticEvent + * @param {String} propName + * @return {object} defineProperty object + */ + function getPooledWarningPropertyDefinition(propName, getVal) { + var isFunction = typeof getVal === 'function'; + return { + configurable: true, + set: set, + get: get, + }; + + function set(val) { + var action = isFunction ? 'setting the method' : 'setting the property'; + warn(action, 'This is effectively a no-op'); + return val; + } + + function get() { + var action = isFunction ? 'accessing the method' : 'accessing the property'; + var result = isFunction ? 'This is a no-op function' : 'This is set to null'; + warn(action, result); + return getVal; + } + + function warn(action, result) { + var warningCondition = false; + true + ? warning( + warningCondition, + "This synthetic event is reused for performance reasons. If you're seeing this, " + + "you're %s `%s` on a released/nullified synthetic event. %s. " + + 'If you must keep the original synthetic event around, use event.persist(). ' + + 'See https://fb.me/react-event-pooling for more information.', + action, + propName, + result, + ) + : void 0; + } + } + + /***/ + }, + /* 54 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + /** + * Keeps track of the current owner. + * + * The current owner is the component who should own any components that are + * currently being constructed. + */ + var ReactCurrentOwner = { + /** + * @internal + * @type {ReactComponent} + */ + current: null, + }; + + module.exports = ReactCurrentOwner; + + /***/ + }, + /* 55 */ + /***/ function (module, exports, __webpack_require__) { + // Thank's IE8 for his funny defineProperty + module.exports = !__webpack_require__(70)(function () { + return ( + Object.defineProperty({}, 'a', { + get: function () { + return 7; + }, + }).a != 7 + ); + }); + + /***/ + }, + /* 56 */ + /***/ function (module, exports) { + var core = (module.exports = { version: '2.4.0' }); + if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef + + /***/ + }, + /* 57 */ + /***/ function (module, exports, __webpack_require__) { + // optional / simple context binding + var aFunction = __webpack_require__(28); + module.exports = function (fn, that, length) { + aFunction(fn); + if (that === undefined) return fn; + switch (length) { + case 1: + return function (a) { + return fn.call(that, a); + }; + case 2: + return function (a, b) { + return fn.call(that, a, b); + }; + case 3: + return function (a, b, c) { + return fn.call(that, a, b, c); + }; + } + return function (/* ...args */) { + return fn.apply(that, arguments); + }; + }; + + /***/ + }, + /* 58 */ + /***/ function (module, exports, __webpack_require__) { + var Map = __webpack_require__(285), + $export = __webpack_require__(0), + shared = __webpack_require__(135)('metadata'), + store = shared.store || (shared.store = new (__webpack_require__(288))()); + + var getOrCreateMetadataMap = function (target, targetKey, create) { + var targetMetadata = store.get(target); + if (!targetMetadata) { + if (!create) return undefined; + store.set(target, (targetMetadata = new Map())); + } + var keyMetadata = targetMetadata.get(targetKey); + if (!keyMetadata) { + if (!create) return undefined; + targetMetadata.set(targetKey, (keyMetadata = new Map())); + } + return keyMetadata; + }; + var ordinaryHasOwnMetadata = function (MetadataKey, O, P) { + var metadataMap = getOrCreateMetadataMap(O, P, false); + return metadataMap === undefined ? false : metadataMap.has(MetadataKey); + }; + var ordinaryGetOwnMetadata = function (MetadataKey, O, P) { + var metadataMap = getOrCreateMetadataMap(O, P, false); + return metadataMap === undefined ? undefined : metadataMap.get(MetadataKey); + }; + var ordinaryDefineOwnMetadata = function (MetadataKey, MetadataValue, O, P) { + getOrCreateMetadataMap(O, P, true).set(MetadataKey, MetadataValue); + }; + var ordinaryOwnMetadataKeys = function (target, targetKey) { + var metadataMap = getOrCreateMetadataMap(target, targetKey, false), + keys = []; + if (metadataMap) + metadataMap.forEach(function (_, key) { + keys.push(key); + }); + return keys; + }; + var toMetaKey = function (it) { + return it === undefined || typeof it == 'symbol' ? it : String(it); + }; + var exp = function (O) { + $export($export.S, 'Reflect', O); + }; + + module.exports = { + store: store, + map: getOrCreateMetadataMap, + has: ordinaryHasOwnMetadata, + get: ordinaryGetOwnMetadata, + set: ordinaryDefineOwnMetadata, + keys: ordinaryOwnMetadataKeys, + key: toMetaKey, + exp: exp, + }; + + /***/ + }, + /* 59 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + if (__webpack_require__(11)) { + var LIBRARY = __webpack_require__(75), + global = __webpack_require__(6), + fails = __webpack_require__(7), + $export = __webpack_require__(0), + $typed = __webpack_require__(136), + $buffer = __webpack_require__(186), + ctx = __webpack_require__(57), + anInstance = __webpack_require__(74), + propertyDesc = __webpack_require__(63), + hide = __webpack_require__(29), + redefineAll = __webpack_require__(79), + toInteger = __webpack_require__(64), + toLength = __webpack_require__(15), + toIndex = __webpack_require__(81), + toPrimitive = __webpack_require__(52), + has = __webpack_require__(21), + same = __webpack_require__(282), + classof = __webpack_require__(111), + isObject = __webpack_require__(9), + toObject = __webpack_require__(17), + isArrayIter = __webpack_require__(171), + create = __webpack_require__(76), + getPrototypeOf = __webpack_require__(39), + gOPN = __webpack_require__(77).f, + getIterFn = __webpack_require__(188), + uid = __webpack_require__(82), + wks = __webpack_require__(10), + createArrayMethod = __webpack_require__(50), + createArrayIncludes = __webpack_require__(126), + speciesConstructor = __webpack_require__(180), + ArrayIterators = __webpack_require__(189), + Iterators = __webpack_require__(92), + $iterDetect = __webpack_require__(132), + setSpecies = __webpack_require__(80), + arrayFill = __webpack_require__(164), + arrayCopyWithin = __webpack_require__(262), + $DP = __webpack_require__(12), + $GOPD = __webpack_require__(38), + dP = $DP.f, + gOPD = $GOPD.f, + RangeError = global.RangeError, + TypeError = global.TypeError, + Uint8Array = global.Uint8Array, + ARRAY_BUFFER = 'ArrayBuffer', + SHARED_BUFFER = 'Shared' + ARRAY_BUFFER, + BYTES_PER_ELEMENT = 'BYTES_PER_ELEMENT', + PROTOTYPE = 'prototype', + ArrayProto = Array[PROTOTYPE], + $ArrayBuffer = $buffer.ArrayBuffer, + $DataView = $buffer.DataView, + arrayForEach = createArrayMethod(0), + arrayFilter = createArrayMethod(2), + arraySome = createArrayMethod(3), + arrayEvery = createArrayMethod(4), + arrayFind = createArrayMethod(5), + arrayFindIndex = createArrayMethod(6), + arrayIncludes = createArrayIncludes(true), + arrayIndexOf = createArrayIncludes(false), + arrayValues = ArrayIterators.values, + arrayKeys = ArrayIterators.keys, + arrayEntries = ArrayIterators.entries, + arrayLastIndexOf = ArrayProto.lastIndexOf, + arrayReduce = ArrayProto.reduce, + arrayReduceRight = ArrayProto.reduceRight, + arrayJoin = ArrayProto.join, + arraySort = ArrayProto.sort, + arraySlice = ArrayProto.slice, + arrayToString = ArrayProto.toString, + arrayToLocaleString = ArrayProto.toLocaleString, + ITERATOR = wks('iterator'), + TAG = wks('toStringTag'), + TYPED_CONSTRUCTOR = uid('typed_constructor'), + DEF_CONSTRUCTOR = uid('def_constructor'), + ALL_CONSTRUCTORS = $typed.CONSTR, + TYPED_ARRAY = $typed.TYPED, + VIEW = $typed.VIEW, + WRONG_LENGTH = 'Wrong length!'; + + var $map = createArrayMethod(1, function (O, length) { + return allocate(speciesConstructor(O, O[DEF_CONSTRUCTOR]), length); + }); + + var LITTLE_ENDIAN = fails(function () { + return new Uint8Array(new Uint16Array([1]).buffer)[0] === 1; + }); + + var FORCED_SET = + !!Uint8Array && + !!Uint8Array[PROTOTYPE].set && + fails(function () { + new Uint8Array(1).set({}); + }); + + var strictToLength = function (it, SAME) { + if (it === undefined) throw TypeError(WRONG_LENGTH); + var number = +it, + length = toLength(it); + if (SAME && !same(number, length)) throw RangeError(WRONG_LENGTH); + return length; + }; + + var toOffset = function (it, BYTES) { + var offset = toInteger(it); + if (offset < 0 || offset % BYTES) throw RangeError('Wrong offset!'); + return offset; + }; + + var validate = function (it) { + if (isObject(it) && TYPED_ARRAY in it) return it; + throw TypeError(it + ' is not a typed array!'); + }; + + var allocate = function (C, length) { + if (!(isObject(C) && TYPED_CONSTRUCTOR in C)) { + throw TypeError('It is not a typed array constructor!'); + } + return new C(length); + }; + + var speciesFromList = function (O, list) { + return fromList(speciesConstructor(O, O[DEF_CONSTRUCTOR]), list); + }; + + var fromList = function (C, list) { + var index = 0, + length = list.length, + result = allocate(C, length); + while (length > index) result[index] = list[index++]; + return result; + }; + + var addGetter = function (it, key, internal) { + dP(it, key, { + get: function () { + return this._d[internal]; + }, + }); + }; + + var $from = function from(source /*, mapfn, thisArg */) { + var O = toObject(source), + aLen = arguments.length, + mapfn = aLen > 1 ? arguments[1] : undefined, + mapping = mapfn !== undefined, + iterFn = getIterFn(O), + i, + length, + values, + result, + step, + iterator; + if (iterFn != undefined && !isArrayIter(iterFn)) { + for (iterator = iterFn.call(O), values = [], i = 0; !(step = iterator.next()).done; i++) { + values.push(step.value); + } + O = values; + } + if (mapping && aLen > 2) mapfn = ctx(mapfn, arguments[2], 2); + for (i = 0, length = toLength(O.length), result = allocate(this, length); length > i; i++) { + result[i] = mapping ? mapfn(O[i], i) : O[i]; + } + return result; + }; + + var $of = function of(/*...items*/) { + var index = 0, + length = arguments.length, + result = allocate(this, length); + while (length > index) result[index] = arguments[index++]; + return result; + }; + + // iOS Safari 6.x fails here + var TO_LOCALE_BUG = + !!Uint8Array && + fails(function () { + arrayToLocaleString.call(new Uint8Array(1)); + }); + + var $toLocaleString = function toLocaleString() { + return arrayToLocaleString.apply( + TO_LOCALE_BUG ? arraySlice.call(validate(this)) : validate(this), + arguments, + ); + }; + + var proto = { + copyWithin: function copyWithin(target, start /*, end */) { + return arrayCopyWithin.call( + validate(this), + target, + start, + arguments.length > 2 ? arguments[2] : undefined, + ); + }, + every: function every(callbackfn /*, thisArg */) { + return arrayEvery(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); + }, + fill: function fill(value /*, start, end */) { + // eslint-disable-line no-unused-vars + return arrayFill.apply(validate(this), arguments); + }, + filter: function filter(callbackfn /*, thisArg */) { + return speciesFromList( + this, + arrayFilter(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined), + ); + }, + find: function find(predicate /*, thisArg */) { + return arrayFind(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined); + }, + findIndex: function findIndex(predicate /*, thisArg */) { + return arrayFindIndex(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined); + }, + forEach: function forEach(callbackfn /*, thisArg */) { + arrayForEach(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); + }, + indexOf: function indexOf(searchElement /*, fromIndex */) { + return arrayIndexOf( + validate(this), + searchElement, + arguments.length > 1 ? arguments[1] : undefined, + ); + }, + includes: function includes(searchElement /*, fromIndex */) { + return arrayIncludes( + validate(this), + searchElement, + arguments.length > 1 ? arguments[1] : undefined, + ); + }, + join: function join(separator) { + // eslint-disable-line no-unused-vars + return arrayJoin.apply(validate(this), arguments); + }, + lastIndexOf: function lastIndexOf(searchElement /*, fromIndex */) { + // eslint-disable-line no-unused-vars + return arrayLastIndexOf.apply(validate(this), arguments); + }, + map: function map(mapfn /*, thisArg */) { + return $map(validate(this), mapfn, arguments.length > 1 ? arguments[1] : undefined); + }, + reduce: function reduce(callbackfn /*, initialValue */) { + // eslint-disable-line no-unused-vars + return arrayReduce.apply(validate(this), arguments); + }, + reduceRight: function reduceRight(callbackfn /*, initialValue */) { + // eslint-disable-line no-unused-vars + return arrayReduceRight.apply(validate(this), arguments); + }, + reverse: function reverse() { + var that = this, + length = validate(that).length, + middle = Math.floor(length / 2), + index = 0, + value; + while (index < middle) { + value = that[index]; + that[index++] = that[--length]; + that[length] = value; + } + return that; + }, + some: function some(callbackfn /*, thisArg */) { + return arraySome(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); + }, + sort: function sort(comparefn) { + return arraySort.call(validate(this), comparefn); + }, + subarray: function subarray(begin, end) { + var O = validate(this), + length = O.length, + $begin = toIndex(begin, length); + return new (speciesConstructor(O, O[DEF_CONSTRUCTOR]))( + O.buffer, + O.byteOffset + $begin * O.BYTES_PER_ELEMENT, + toLength((end === undefined ? length : toIndex(end, length)) - $begin), + ); + }, + }; + + var $slice = function slice(start, end) { + return speciesFromList(this, arraySlice.call(validate(this), start, end)); + }; + + var $set = function set(arrayLike /*, offset */) { + validate(this); + var offset = toOffset(arguments[1], 1), + length = this.length, + src = toObject(arrayLike), + len = toLength(src.length), + index = 0; + if (len + offset > length) throw RangeError(WRONG_LENGTH); + while (index < len) this[offset + index] = src[index++]; + }; + + var $iterators = { + entries: function entries() { + return arrayEntries.call(validate(this)); + }, + keys: function keys() { + return arrayKeys.call(validate(this)); + }, + values: function values() { + return arrayValues.call(validate(this)); + }, + }; + + var isTAIndex = function (target, key) { + return ( + isObject(target) && + target[TYPED_ARRAY] && + typeof key != 'symbol' && + key in target && + String(+key) == String(key) + ); + }; + var $getDesc = function getOwnPropertyDescriptor(target, key) { + return isTAIndex(target, (key = toPrimitive(key, true))) + ? propertyDesc(2, target[key]) + : gOPD(target, key); + }; + var $setDesc = function defineProperty(target, key, desc) { + if ( + isTAIndex(target, (key = toPrimitive(key, true))) && + isObject(desc) && + has(desc, 'value') && + !has(desc, 'get') && + !has(desc, 'set') && + // TODO: add validation descriptor w/o calling accessors + !desc.configurable && + (!has(desc, 'writable') || desc.writable) && + (!has(desc, 'enumerable') || desc.enumerable) + ) { + target[key] = desc.value; + return target; + } else return dP(target, key, desc); + }; + + if (!ALL_CONSTRUCTORS) { + $GOPD.f = $getDesc; + $DP.f = $setDesc; + } + + $export($export.S + $export.F * !ALL_CONSTRUCTORS, 'Object', { + getOwnPropertyDescriptor: $getDesc, + defineProperty: $setDesc, + }); + + if ( + fails(function () { + arrayToString.call({}); + }) + ) { + arrayToString = arrayToLocaleString = function toString() { + return arrayJoin.call(this); + }; + } + + var $TypedArrayPrototype$ = redefineAll({}, proto); + redefineAll($TypedArrayPrototype$, $iterators); + hide($TypedArrayPrototype$, ITERATOR, $iterators.values); + redefineAll($TypedArrayPrototype$, { + slice: $slice, + set: $set, + constructor: function () { + /* noop */ + }, + toString: arrayToString, + toLocaleString: $toLocaleString, + }); + addGetter($TypedArrayPrototype$, 'buffer', 'b'); + addGetter($TypedArrayPrototype$, 'byteOffset', 'o'); + addGetter($TypedArrayPrototype$, 'byteLength', 'l'); + addGetter($TypedArrayPrototype$, 'length', 'e'); + dP($TypedArrayPrototype$, TAG, { + get: function () { + return this[TYPED_ARRAY]; + }, + }); + + module.exports = function (KEY, BYTES, wrapper, CLAMPED) { + CLAMPED = !!CLAMPED; + var NAME = KEY + (CLAMPED ? 'Clamped' : '') + 'Array', + ISNT_UINT8 = NAME != 'Uint8Array', + GETTER = 'get' + KEY, + SETTER = 'set' + KEY, + TypedArray = global[NAME], + Base = TypedArray || {}, + TAC = TypedArray && getPrototypeOf(TypedArray), + FORCED = !TypedArray || !$typed.ABV, + O = {}, + TypedArrayPrototype = TypedArray && TypedArray[PROTOTYPE]; + var getter = function (that, index) { + var data = that._d; + return data.v[GETTER](index * BYTES + data.o, LITTLE_ENDIAN); + }; + var setter = function (that, index, value) { + var data = that._d; + if (CLAMPED) value = (value = Math.round(value)) < 0 ? 0 : value > 0xff ? 0xff : value & 0xff; + data.v[SETTER](index * BYTES + data.o, value, LITTLE_ENDIAN); + }; + var addElement = function (that, index) { + dP(that, index, { + get: function () { + return getter(this, index); + }, + set: function (value) { + return setter(this, index, value); + }, + enumerable: true, + }); + }; + if (FORCED) { + TypedArray = wrapper(function (that, data, $offset, $length) { + anInstance(that, TypedArray, NAME, '_d'); + var index = 0, + offset = 0, + buffer, + byteLength, + length, + klass; + if (!isObject(data)) { + length = strictToLength(data, true); + byteLength = length * BYTES; + buffer = new $ArrayBuffer(byteLength); + } else if ( + data instanceof $ArrayBuffer || + (klass = classof(data)) == ARRAY_BUFFER || + klass == SHARED_BUFFER + ) { + buffer = data; + offset = toOffset($offset, BYTES); + var $len = data.byteLength; + if ($length === undefined) { + if ($len % BYTES) throw RangeError(WRONG_LENGTH); + byteLength = $len - offset; + if (byteLength < 0) throw RangeError(WRONG_LENGTH); + } else { + byteLength = toLength($length) * BYTES; + if (byteLength + offset > $len) throw RangeError(WRONG_LENGTH); + } + length = byteLength / BYTES; + } else if (TYPED_ARRAY in data) { + return fromList(TypedArray, data); + } else { + return $from.call(TypedArray, data); + } + hide(that, '_d', { + b: buffer, + o: offset, + l: byteLength, + e: length, + v: new $DataView(buffer), + }); + while (index < length) addElement(that, index++); + }); + TypedArrayPrototype = TypedArray[PROTOTYPE] = create($TypedArrayPrototype$); + hide(TypedArrayPrototype, 'constructor', TypedArray); + } else if ( + !$iterDetect(function (iter) { + // V8 works with iterators, but fails in many other cases + // https://code.google.com/p/v8/issues/detail?id=4552 + new TypedArray(null); // eslint-disable-line no-new + new TypedArray(iter); // eslint-disable-line no-new + }, true) + ) { + TypedArray = wrapper(function (that, data, $offset, $length) { + anInstance(that, TypedArray, NAME); + var klass; + // `ws` module bug, temporarily remove validation length for Uint8Array + // https://github.com/websockets/ws/pull/645 + if (!isObject(data)) return new Base(strictToLength(data, ISNT_UINT8)); + if ( + data instanceof $ArrayBuffer || + (klass = classof(data)) == ARRAY_BUFFER || + klass == SHARED_BUFFER + ) { + return $length !== undefined + ? new Base(data, toOffset($offset, BYTES), $length) + : $offset !== undefined + ? new Base(data, toOffset($offset, BYTES)) + : new Base(data); + } + if (TYPED_ARRAY in data) return fromList(TypedArray, data); + return $from.call(TypedArray, data); + }); + arrayForEach( + TAC !== Function.prototype ? gOPN(Base).concat(gOPN(TAC)) : gOPN(Base), + function (key) { + if (!(key in TypedArray)) hide(TypedArray, key, Base[key]); + }, + ); + TypedArray[PROTOTYPE] = TypedArrayPrototype; + if (!LIBRARY) TypedArrayPrototype.constructor = TypedArray; + } + var $nativeIterator = TypedArrayPrototype[ITERATOR], + CORRECT_ITER_NAME = + !!$nativeIterator && ($nativeIterator.name == 'values' || $nativeIterator.name == undefined), + $iterator = $iterators.values; + hide(TypedArray, TYPED_CONSTRUCTOR, true); + hide(TypedArrayPrototype, TYPED_ARRAY, NAME); + hide(TypedArrayPrototype, VIEW, true); + hide(TypedArrayPrototype, DEF_CONSTRUCTOR, TypedArray); + + if (CLAMPED ? new TypedArray(1)[TAG] != NAME : !(TAG in TypedArrayPrototype)) { + dP(TypedArrayPrototype, TAG, { + get: function () { + return NAME; + }, + }); + } + + O[NAME] = TypedArray; + + $export($export.G + $export.W + $export.F * (TypedArray != Base), O); + + $export($export.S, NAME, { + BYTES_PER_ELEMENT: BYTES, + from: $from, + of: $of, + }); + + if (!(BYTES_PER_ELEMENT in TypedArrayPrototype)) + hide(TypedArrayPrototype, BYTES_PER_ELEMENT, BYTES); + + $export($export.P, NAME, proto); + + setSpecies(NAME); + + $export($export.P + $export.F * FORCED_SET, NAME, { set: $set }); + + $export($export.P + $export.F * !CORRECT_ITER_NAME, NAME, $iterators); + + $export($export.P + $export.F * (TypedArrayPrototype.toString != arrayToString), NAME, { + toString: arrayToString, + }); + + $export( + $export.P + + $export.F * + fails(function () { + new TypedArray(1).slice(); + }), + NAME, + { slice: $slice }, + ); + + $export( + $export.P + + $export.F * + (fails(function () { + return [1, 2].toLocaleString() != new TypedArray([1, 2]).toLocaleString(); + }) || + !fails(function () { + TypedArrayPrototype.toLocaleString.call([1, 2]); + })), + NAME, + { toLocaleString: $toLocaleString }, + ); + + Iterators[NAME] = CORRECT_ITER_NAME ? $nativeIterator : $iterator; + if (!LIBRARY && !CORRECT_ITER_NAME) hide(TypedArrayPrototype, ITERATOR, $iterator); + }; + } else + module.exports = function () { + /* empty */ + }; + + /***/ + }, + /* 60 */ + /***/ function (module, exports, __webpack_require__) { + var dP = __webpack_require__(49), + createDesc = __webpack_require__(109); + module.exports = __webpack_require__(55) + ? function (object, key, value) { + return dP.f(object, key, createDesc(1, value)); + } + : function (object, key, value) { + object[key] = value; + return object; + }; + + /***/ + }, + /* 61 */ + /***/ function (module, exports, __webpack_require__) { + // to indexed object, toObject with fallback for non-array-like ES3 strings + var IObject = __webpack_require__(152), + defined = __webpack_require__(121); + module.exports = function (it) { + return IObject(defined(it)); + }; + + /***/ + }, + /* 62 */ + /***/ function (module, exports, __webpack_require__) { + var META = __webpack_require__(82)('meta'), + isObject = __webpack_require__(9), + has = __webpack_require__(21), + setDesc = __webpack_require__(12).f, + id = 0; + var isExtensible = + Object.isExtensible || + function () { + return true; + }; + var FREEZE = !__webpack_require__(7)(function () { + return isExtensible(Object.preventExtensions({})); + }); + var setMeta = function (it) { + setDesc(it, META, { + value: { + i: 'O' + ++id, // object ID + w: {}, // weak collections IDs + }, + }); + }; + var fastKey = function (it, create) { + // return primitive with prefix + if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; + if (!has(it, META)) { + // can't set metadata to uncaught frozen object + if (!isExtensible(it)) return 'F'; + // not necessary to add metadata + if (!create) return 'E'; + // add missing metadata + setMeta(it); + // return object ID + } + return it[META].i; + }; + var getWeak = function (it, create) { + if (!has(it, META)) { + // can't set metadata to uncaught frozen object + if (!isExtensible(it)) return true; + // not necessary to add metadata + if (!create) return false; + // add missing metadata + setMeta(it); + // return hash weak collections IDs + } + return it[META].w; + }; + // add metadata on freeze-family methods calling + var onFreeze = function (it) { + if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it); + return it; + }; + var meta = (module.exports = { + KEY: META, + NEED: false, + fastKey: fastKey, + getWeak: getWeak, + onFreeze: onFreeze, + }); + + /***/ + }, + /* 63 */ + /***/ function (module, exports) { + module.exports = function (bitmap, value) { + return { + enumerable: !(bitmap & 1), + configurable: !(bitmap & 2), + writable: !(bitmap & 4), + value: value, + }; + }; + + /***/ + }, + /* 64 */ + /***/ function (module, exports) { + // 7.1.4 ToInteger + var ceil = Math.ceil, + floor = Math.floor; + module.exports = function (it) { + return isNaN((it = +it)) ? 0 : (it > 0 ? floor : ceil)(it); + }; + + /***/ + }, + /* 65 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + exports.createPath = + exports.parsePath = + exports.getQueryStringValueFromPath = + exports.stripQueryStringValueFromPath = + exports.addQueryStringValueToPath = + undefined; + + var _warning = __webpack_require__(47); + + var _warning2 = _interopRequireDefault(_warning); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + var addQueryStringValueToPath = (exports.addQueryStringValueToPath = function addQueryStringValueToPath( + path, + key, + value, + ) { + var _parsePath = parsePath(path), + pathname = _parsePath.pathname, + search = _parsePath.search, + hash = _parsePath.hash; + + return createPath({ + pathname: pathname, + search: search + (search.indexOf('?') === -1 ? '?' : '&') + key + '=' + value, + hash: hash, + }); + }); + + var stripQueryStringValueFromPath = (exports.stripQueryStringValueFromPath = + function stripQueryStringValueFromPath(path, key) { + var _parsePath2 = parsePath(path), + pathname = _parsePath2.pathname, + search = _parsePath2.search, + hash = _parsePath2.hash; + + return createPath({ + pathname: pathname, + search: search.replace( + new RegExp('([?&])' + key + '=[a-zA-Z0-9]+(&?)'), + function (match, prefix, suffix) { + return prefix === '?' ? prefix : suffix; + }, + ), + hash: hash, + }); + }); + + var getQueryStringValueFromPath = (exports.getQueryStringValueFromPath = + function getQueryStringValueFromPath(path, key) { + var _parsePath3 = parsePath(path), + search = _parsePath3.search; + + var match = search.match(new RegExp('[?&]' + key + '=([a-zA-Z0-9]+)')); + return match && match[1]; + }); + + var extractPath = function extractPath(string) { + var match = string.match(/^(https?:)?\/\/[^\/]*/); + return match == null ? string : string.substring(match[0].length); + }; + + var parsePath = (exports.parsePath = function parsePath(path) { + var pathname = extractPath(path); + var search = ''; + var hash = ''; + + true + ? (0, _warning2.default)( + path === pathname, + 'A path must be pathname + search + hash only, not a full URL like "%s"', + path, + ) + : void 0; + + var hashIndex = pathname.indexOf('#'); + if (hashIndex !== -1) { + hash = pathname.substring(hashIndex); + pathname = pathname.substring(0, hashIndex); + } + + var searchIndex = pathname.indexOf('?'); + if (searchIndex !== -1) { + search = pathname.substring(searchIndex); + pathname = pathname.substring(0, searchIndex); + } + + if (pathname === '') pathname = '/'; + + return { + pathname: pathname, + search: search, + hash: hash, + }; + }); + + var createPath = (exports.createPath = function createPath(location) { + if (location == null || typeof location === 'string') return location; + + var basename = location.basename, + pathname = location.pathname, + search = location.search, + hash = location.hash; + + var path = (basename || '') + pathname; + + if (search && search !== '?') path += search; + + if (hash) path += hash; + + return path; + }); + + /***/ + }, + /* 66 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var _prodInvariant = __webpack_require__(5); + + var invariant = __webpack_require__(2); + + function checkMask(value, bitmask) { + return (value & bitmask) === bitmask; + } + + var DOMPropertyInjection = { + /** + * Mapping from normalized, camelcased property names to a configuration that + * specifies how the associated DOM property should be accessed or rendered. + */ + MUST_USE_PROPERTY: 0x1, + HAS_BOOLEAN_VALUE: 0x4, + HAS_NUMERIC_VALUE: 0x8, + HAS_POSITIVE_NUMERIC_VALUE: 0x10 | 0x8, + HAS_OVERLOADED_BOOLEAN_VALUE: 0x20, + + /** + * Inject some specialized knowledge about the DOM. This takes a config object + * with the following properties: + * + * isCustomAttribute: function that given an attribute name will return true + * if it can be inserted into the DOM verbatim. Useful for data-* or aria-* + * attributes where it's impossible to enumerate all of the possible + * attribute names, + * + * Properties: object mapping DOM property name to one of the + * DOMPropertyInjection constants or null. If your attribute isn't in here, + * it won't get written to the DOM. + * + * DOMAttributeNames: object mapping React attribute name to the DOM + * attribute name. Attribute names not specified use the **lowercase** + * normalized name. + * + * DOMAttributeNamespaces: object mapping React attribute name to the DOM + * attribute namespace URL. (Attribute names not specified use no namespace.) + * + * DOMPropertyNames: similar to DOMAttributeNames but for DOM properties. + * Property names not specified use the normalized name. + * + * DOMMutationMethods: Properties that require special mutation methods. If + * `value` is undefined, the mutation method should unset the property. + * + * @param {object} domPropertyConfig the config as described above. + */ + injectDOMPropertyConfig: function (domPropertyConfig) { + var Injection = DOMPropertyInjection; + var Properties = domPropertyConfig.Properties || {}; + var DOMAttributeNamespaces = domPropertyConfig.DOMAttributeNamespaces || {}; + var DOMAttributeNames = domPropertyConfig.DOMAttributeNames || {}; + var DOMPropertyNames = domPropertyConfig.DOMPropertyNames || {}; + var DOMMutationMethods = domPropertyConfig.DOMMutationMethods || {}; + + if (domPropertyConfig.isCustomAttribute) { + DOMProperty._isCustomAttributeFunctions.push(domPropertyConfig.isCustomAttribute); + } + + for (var propName in Properties) { + !!DOMProperty.properties.hasOwnProperty(propName) + ? true + ? invariant( + false, + "injectDOMPropertyConfig(...): You're trying to inject DOM property '%s' which has already been injected. You may be accidentally injecting the same DOM property config twice, or you may be injecting two configs that have conflicting property names.", + propName, + ) + : _prodInvariant('48', propName) + : void 0; + + var lowerCased = propName.toLowerCase(); + var propConfig = Properties[propName]; + + var propertyInfo = { + attributeName: lowerCased, + attributeNamespace: null, + propertyName: propName, + mutationMethod: null, + + mustUseProperty: checkMask(propConfig, Injection.MUST_USE_PROPERTY), + hasBooleanValue: checkMask(propConfig, Injection.HAS_BOOLEAN_VALUE), + hasNumericValue: checkMask(propConfig, Injection.HAS_NUMERIC_VALUE), + hasPositiveNumericValue: checkMask(propConfig, Injection.HAS_POSITIVE_NUMERIC_VALUE), + hasOverloadedBooleanValue: checkMask(propConfig, Injection.HAS_OVERLOADED_BOOLEAN_VALUE), + }; + !( + propertyInfo.hasBooleanValue + + propertyInfo.hasNumericValue + + propertyInfo.hasOverloadedBooleanValue <= + 1 + ) + ? true + ? invariant( + false, + 'DOMProperty: Value can be one of boolean, overloaded boolean, or numeric value, but not a combination: %s', + propName, + ) + : _prodInvariant('50', propName) + : void 0; + + if (true) { + DOMProperty.getPossibleStandardName[lowerCased] = propName; + } + + if (DOMAttributeNames.hasOwnProperty(propName)) { + var attributeName = DOMAttributeNames[propName]; + propertyInfo.attributeName = attributeName; + if (true) { + DOMProperty.getPossibleStandardName[attributeName] = propName; + } + } + + if (DOMAttributeNamespaces.hasOwnProperty(propName)) { + propertyInfo.attributeNamespace = DOMAttributeNamespaces[propName]; + } + + if (DOMPropertyNames.hasOwnProperty(propName)) { + propertyInfo.propertyName = DOMPropertyNames[propName]; + } + + if (DOMMutationMethods.hasOwnProperty(propName)) { + propertyInfo.mutationMethod = DOMMutationMethods[propName]; + } + + DOMProperty.properties[propName] = propertyInfo; + } + }, + }; + + /* eslint-disable max-len */ + var ATTRIBUTE_NAME_START_CHAR = + ':A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD'; + /* eslint-enable max-len */ + + /** + * DOMProperty exports lookup objects that can be used like functions: + * + * > DOMProperty.isValid['id'] + * true + * > DOMProperty.isValid['foobar'] + * undefined + * + * Although this may be confusing, it performs better in general. + * + * @see http://jsperf.com/key-exists + * @see http://jsperf.com/key-missing + */ + var DOMProperty = { + ID_ATTRIBUTE_NAME: 'data-reactid', + ROOT_ATTRIBUTE_NAME: 'data-reactroot', + + ATTRIBUTE_NAME_START_CHAR: ATTRIBUTE_NAME_START_CHAR, + ATTRIBUTE_NAME_CHAR: ATTRIBUTE_NAME_START_CHAR + '\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040', + + /** + * Map from property "standard name" to an object with info about how to set + * the property in the DOM. Each object contains: + * + * attributeName: + * Used when rendering markup or with `*Attribute()`. + * attributeNamespace + * propertyName: + * Used on DOM node instances. (This includes properties that mutate due to + * external factors.) + * mutationMethod: + * If non-null, used instead of the property or `setAttribute()` after + * initial render. + * mustUseProperty: + * Whether the property must be accessed and mutated as an object property. + * hasBooleanValue: + * Whether the property should be removed when set to a falsey value. + * hasNumericValue: + * Whether the property must be numeric or parse as a numeric and should be + * removed when set to a falsey value. + * hasPositiveNumericValue: + * Whether the property must be positive numeric or parse as a positive + * numeric and should be removed when set to a falsey value. + * hasOverloadedBooleanValue: + * Whether the property can be used as a flag as well as with a value. + * Removed when strictly equal to false; present without a value when + * strictly equal to true; present with a value otherwise. + */ + properties: {}, + + /** + * Mapping from lowercase property names to the properly cased version, used + * to warn in the case of missing properties. Available only in __DEV__. + * + * autofocus is predefined, because adding it to the property whitelist + * causes unintended side effects. + * + * @type {Object} + */ + getPossibleStandardName: true ? { autofocus: 'autoFocus' } : null, + + /** + * All of the isCustomAttribute() functions that have been injected. + */ + _isCustomAttributeFunctions: [], + + /** + * Checks whether a property name is a custom attribute. + * @method + */ + isCustomAttribute: function (attributeName) { + for (var i = 0; i < DOMProperty._isCustomAttributeFunctions.length; i++) { + var isCustomAttributeFn = DOMProperty._isCustomAttributeFunctions[i]; + if (isCustomAttributeFn(attributeName)) { + return true; + } + } + return false; + }, + + injection: DOMPropertyInjection, + }; + + module.exports = DOMProperty; + + /***/ + }, + /* 67 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var ReactRef = __webpack_require__(757); + var ReactInstrumentation = __webpack_require__(33); + + var warning = __webpack_require__(3); + + /** + * Helper to call ReactRef.attachRefs with this composite component, split out + * to avoid allocations in the transaction mount-ready queue. + */ + function attachRefs() { + ReactRef.attachRefs(this, this._currentElement); + } + + var ReactReconciler = { + /** + * Initializes the component, renders markup, and registers event listeners. + * + * @param {ReactComponent} internalInstance + * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction + * @param {?object} the containing host component instance + * @param {?object} info about the host container + * @return {?string} Rendered markup to be inserted into the DOM. + * @final + * @internal + */ + mountComponent: function ( + internalInstance, + transaction, + hostParent, + hostContainerInfo, + context, + parentDebugID, // 0 in production and for roots + ) { + if (true) { + if (internalInstance._debugID !== 0) { + ReactInstrumentation.debugTool.onBeforeMountComponent( + internalInstance._debugID, + internalInstance._currentElement, + parentDebugID, + ); + } + } + var markup = internalInstance.mountComponent( + transaction, + hostParent, + hostContainerInfo, + context, + parentDebugID, + ); + if (internalInstance._currentElement && internalInstance._currentElement.ref != null) { + transaction.getReactMountReady().enqueue(attachRefs, internalInstance); + } + if (true) { + if (internalInstance._debugID !== 0) { + ReactInstrumentation.debugTool.onMountComponent(internalInstance._debugID); + } + } + return markup; + }, + + /** + * Returns a value that can be passed to + * ReactComponentEnvironment.replaceNodeWithMarkup. + */ + getHostNode: function (internalInstance) { + return internalInstance.getHostNode(); + }, + + /** + * Releases any resources allocated by `mountComponent`. + * + * @final + * @internal + */ + unmountComponent: function (internalInstance, safely) { + if (true) { + if (internalInstance._debugID !== 0) { + ReactInstrumentation.debugTool.onBeforeUnmountComponent(internalInstance._debugID); + } + } + ReactRef.detachRefs(internalInstance, internalInstance._currentElement); + internalInstance.unmountComponent(safely); + if (true) { + if (internalInstance._debugID !== 0) { + ReactInstrumentation.debugTool.onUnmountComponent(internalInstance._debugID); + } + } + }, + + /** + * Update a component using a new element. + * + * @param {ReactComponent} internalInstance + * @param {ReactElement} nextElement + * @param {ReactReconcileTransaction} transaction + * @param {object} context + * @internal + */ + receiveComponent: function (internalInstance, nextElement, transaction, context) { + var prevElement = internalInstance._currentElement; + + if (nextElement === prevElement && context === internalInstance._context) { + // Since elements are immutable after the owner is rendered, + // we can do a cheap identity compare here to determine if this is a + // superfluous reconcile. It's possible for state to be mutable but such + // change should trigger an update of the owner which would recreate + // the element. We explicitly check for the existence of an owner since + // it's possible for an element created outside a composite to be + // deeply mutated and reused. + + // TODO: Bailing out early is just a perf optimization right? + // TODO: Removing the return statement should affect correctness? + return; + } + + if (true) { + if (internalInstance._debugID !== 0) { + ReactInstrumentation.debugTool.onBeforeUpdateComponent(internalInstance._debugID, nextElement); + } + } + + var refsChanged = ReactRef.shouldUpdateRefs(prevElement, nextElement); + + if (refsChanged) { + ReactRef.detachRefs(internalInstance, prevElement); + } + + internalInstance.receiveComponent(nextElement, transaction, context); + + if ( + refsChanged && + internalInstance._currentElement && + internalInstance._currentElement.ref != null + ) { + transaction.getReactMountReady().enqueue(attachRefs, internalInstance); + } + + if (true) { + if (internalInstance._debugID !== 0) { + ReactInstrumentation.debugTool.onUpdateComponent(internalInstance._debugID); + } + } + }, + + /** + * Flush any dirty changes in a component. + * + * @param {ReactComponent} internalInstance + * @param {ReactReconcileTransaction} transaction + * @internal + */ + performUpdateIfNecessary: function (internalInstance, transaction, updateBatchNumber) { + if (internalInstance._updateBatchNumber !== updateBatchNumber) { + // The component's enqueued batch number should always be the current + // batch or the following one. + true + ? warning( + internalInstance._updateBatchNumber == null || + internalInstance._updateBatchNumber === updateBatchNumber + 1, + 'performUpdateIfNecessary: Unexpected batch number (current %s, ' + 'pending %s)', + updateBatchNumber, + internalInstance._updateBatchNumber, + ) + : void 0; + return; + } + if (true) { + if (internalInstance._debugID !== 0) { + ReactInstrumentation.debugTool.onBeforeUpdateComponent( + internalInstance._debugID, + internalInstance._currentElement, + ); + } + } + internalInstance.performUpdateIfNecessary(transaction); + if (true) { + if (internalInstance._debugID !== 0) { + ReactInstrumentation.debugTool.onUpdateComponent(internalInstance._debugID); + } + } + }, + }; + + module.exports = ReactReconciler; + + /***/ + }, + /* 68 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + /* harmony export (immutable) */ __webpack_exports__['b'] = isReactChildren; + /* harmony export (immutable) */ __webpack_exports__['c'] = createRouteFromReactElement; + /* unused harmony export createRoutesFromReactChildren */ + /* harmony export (immutable) */ __webpack_exports__['a'] = createRoutes; + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + function isValidChild(object) { + return object == null || __WEBPACK_IMPORTED_MODULE_0_react___default.a.isValidElement(object); + } + + function isReactChildren(object) { + return isValidChild(object) || (Array.isArray(object) && object.every(isValidChild)); + } + + function createRoute(defaultProps, props) { + return _extends({}, defaultProps, props); + } + + function createRouteFromReactElement(element) { + var type = element.type; + var route = createRoute(type.defaultProps, element.props); + + if (route.children) { + var childRoutes = createRoutesFromReactChildren(route.children, route); + + if (childRoutes.length) route.childRoutes = childRoutes; + + delete route.children; + } + + return route; + } + + /** + * Creates and returns a routes object from the given ReactChildren. JSX + * provides a convenient way to visualize how routes in the hierarchy are + * nested. + * + * import { Route, createRoutesFromReactChildren } from 'react-router' + * + * const routes = createRoutesFromReactChildren( + * <Route component={App}> + * <Route path="home" component={Dashboard}/> + * <Route path="news" component={NewsFeed}/> + * </Route> + * ) + * + * Note: This method is automatically used when you provide <Route> children + * to a <Router> component. + */ + function createRoutesFromReactChildren(children, parentRoute) { + var routes = []; + + __WEBPACK_IMPORTED_MODULE_0_react___default.a.Children.forEach(children, function (element) { + if (__WEBPACK_IMPORTED_MODULE_0_react___default.a.isValidElement(element)) { + // Component classes may have a static create* method. + if (element.type.createRouteFromReactElement) { + var route = element.type.createRouteFromReactElement(element, parentRoute); + + if (route) routes.push(route); + } else { + routes.push(createRouteFromReactElement(element)); + } + } + }); + + return routes; + } + + /** + * Creates and returns an array of routes from the given object which + * may be a JSX route, a plain object route, or an array of either. + */ + function createRoutes(routes) { + if (isReactChildren(routes)) { + routes = createRoutesFromReactChildren(routes); + } else if (routes && !Array.isArray(routes)) { + routes = [routes]; + } + + return routes; + } + + /***/ + }, + /* 69 */ + /***/ function (module, exports, __webpack_require__) { + var isObject = __webpack_require__(72); + module.exports = function (it) { + if (!isObject(it)) throw TypeError(it + ' is not an object!'); + return it; + }; + + /***/ + }, + /* 70 */ + /***/ function (module, exports) { + module.exports = function (exec) { + try { + return !!exec(); + } catch (e) { + return true; + } + }; + + /***/ + }, + /* 71 */ + /***/ function (module, exports) { + var hasOwnProperty = {}.hasOwnProperty; + module.exports = function (it, key) { + return hasOwnProperty.call(it, key); + }; + + /***/ + }, + /* 72 */ + /***/ function (module, exports) { + module.exports = function (it) { + return typeof it === 'object' ? it !== null : typeof it === 'function'; + }; + + /***/ + }, + /* 73 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.14 / 15.2.3.14 Object.keys(O) + var $keys = __webpack_require__(254), + enumBugKeys = __webpack_require__(150); + + module.exports = + Object.keys || + function keys(O) { + return $keys(O, enumBugKeys); + }; + + /***/ + }, + /* 74 */ + /***/ function (module, exports) { + module.exports = function (it, Constructor, name, forbiddenField) { + if (!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)) { + throw TypeError(name + ': incorrect invocation!'); + } + return it; + }; + + /***/ + }, + /* 75 */ + /***/ function (module, exports) { + module.exports = false; + + /***/ + }, + /* 76 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) + var anObject = __webpack_require__(4), + dPs = __webpack_require__(275), + enumBugKeys = __webpack_require__(167), + IE_PROTO = __webpack_require__(179)('IE_PROTO'), + Empty = function () { + /* empty */ + }, + PROTOTYPE = 'prototype'; + + // Create object with fake `null` prototype: use iframe Object with cleared prototype + var createDict = function () { + // Thrash, waste and sodomy: IE GC bug + var iframe = __webpack_require__(166)('iframe'), + i = enumBugKeys.length, + lt = '<', + gt = '>', + iframeDocument; + iframe.style.display = 'none'; + __webpack_require__(169).appendChild(iframe); + iframe.src = 'javascript:'; // eslint-disable-line no-script-url + // createDict = iframe.contentWindow.Object; + // html.removeChild(iframe); + iframeDocument = iframe.contentWindow.document; + iframeDocument.open(); + iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); + iframeDocument.close(); + createDict = iframeDocument.F; + while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]]; + return createDict(); + }; + + module.exports = + Object.create || + function create(O, Properties) { + var result; + if (O !== null) { + Empty[PROTOTYPE] = anObject(O); + result = new Empty(); + Empty[PROTOTYPE] = null; + // add "__proto__" for Object.getPrototypeOf polyfill + result[IE_PROTO] = O; + } else result = createDict(); + return Properties === undefined ? result : dPs(result, Properties); + }; + + /***/ + }, + /* 77 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) + var $keys = __webpack_require__(277), + hiddenKeys = __webpack_require__(167).concat('length', 'prototype'); + + exports.f = + Object.getOwnPropertyNames || + function getOwnPropertyNames(O) { + return $keys(O, hiddenKeys); + }; + + /***/ + }, + /* 78 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.14 / 15.2.3.14 Object.keys(O) + var $keys = __webpack_require__(277), + enumBugKeys = __webpack_require__(167); + + module.exports = + Object.keys || + function keys(O) { + return $keys(O, enumBugKeys); + }; + + /***/ + }, + /* 79 */ + /***/ function (module, exports, __webpack_require__) { + var redefine = __webpack_require__(30); + module.exports = function (target, src, safe) { + for (var key in src) redefine(target, key, src[key], safe); + return target; + }; + + /***/ + }, + /* 80 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var global = __webpack_require__(6), + dP = __webpack_require__(12), + DESCRIPTORS = __webpack_require__(11), + SPECIES = __webpack_require__(10)('species'); + + module.exports = function (KEY) { + var C = global[KEY]; + if (DESCRIPTORS && C && !C[SPECIES]) + dP.f(C, SPECIES, { + configurable: true, + get: function () { + return this; + }, + }); + }; + + /***/ + }, + /* 81 */ + /***/ function (module, exports, __webpack_require__) { + var toInteger = __webpack_require__(64), + max = Math.max, + min = Math.min; + module.exports = function (index, length) { + index = toInteger(index); + return index < 0 ? max(index + length, 0) : min(index, length); + }; + + /***/ + }, + /* 82 */ + /***/ function (module, exports) { + var id = 0, + px = Math.random(); + module.exports = function (key) { + return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); + }; + + /***/ + }, + /* 83 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var emptyObject = {}; + + if (true) { + Object.freeze(emptyObject); + } + + module.exports = emptyObject; + + /***/ + }, + /* 84 */ + /***/ function (module, exports) { + // shim for using process in browser + var process = (module.exports = {}); + + // cached from whatever global is present so that test runners that stub it + // don't break things. But we need to wrap it in a try catch in case it is + // wrapped in strict mode code which doesn't define any globals. It's inside a + // function because try/catches deoptimize in certain engines. + + var cachedSetTimeout; + var cachedClearTimeout; + + function defaultSetTimout() { + throw new Error('setTimeout has not been defined'); + } + function defaultClearTimeout() { + throw new Error('clearTimeout has not been defined'); + } + (function () { + try { + if (typeof setTimeout === 'function') { + cachedSetTimeout = setTimeout; + } else { + cachedSetTimeout = defaultSetTimout; + } + } catch (e) { + cachedSetTimeout = defaultSetTimout; + } + try { + if (typeof clearTimeout === 'function') { + cachedClearTimeout = clearTimeout; + } else { + cachedClearTimeout = defaultClearTimeout; + } + } catch (e) { + cachedClearTimeout = defaultClearTimeout; + } + })(); + function runTimeout(fun) { + if (cachedSetTimeout === setTimeout) { + //normal enviroments in sane situations + return setTimeout(fun, 0); + } + // if setTimeout wasn't available but was latter defined + if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { + cachedSetTimeout = setTimeout; + return setTimeout(fun, 0); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedSetTimeout(fun, 0); + } catch (e) { + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedSetTimeout.call(null, fun, 0); + } catch (e) { + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error + return cachedSetTimeout.call(this, fun, 0); + } + } + } + function runClearTimeout(marker) { + if (cachedClearTimeout === clearTimeout) { + //normal enviroments in sane situations + return clearTimeout(marker); + } + // if clearTimeout wasn't available but was latter defined + if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { + cachedClearTimeout = clearTimeout; + return clearTimeout(marker); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedClearTimeout(marker); + } catch (e) { + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedClearTimeout.call(null, marker); + } catch (e) { + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. + // Some versions of I.E. have different rules for clearTimeout vs setTimeout + return cachedClearTimeout.call(this, marker); + } + } + } + var queue = []; + var draining = false; + var currentQueue; + var queueIndex = -1; + + function cleanUpNextTick() { + if (!draining || !currentQueue) { + return; + } + draining = false; + if (currentQueue.length) { + queue = currentQueue.concat(queue); + } else { + queueIndex = -1; + } + if (queue.length) { + drainQueue(); + } + } + + function drainQueue() { + if (draining) { + return; + } + var timeout = runTimeout(cleanUpNextTick); + draining = true; + + var len = queue.length; + while (len) { + currentQueue = queue; + queue = []; + while (++queueIndex < len) { + if (currentQueue) { + currentQueue[queueIndex].run(); + } + } + queueIndex = -1; + len = queue.length; + } + currentQueue = null; + draining = false; + runClearTimeout(timeout); + } + + process.nextTick = function (fun) { + var args = new Array(arguments.length - 1); + if (arguments.length > 1) { + for (var i = 1; i < arguments.length; i++) { + args[i - 1] = arguments[i]; + } + } + queue.push(new Item(fun, args)); + if (queue.length === 1 && !draining) { + runTimeout(drainQueue); + } + }; + + // v8 likes predictible objects + function Item(fun, array) { + this.fun = fun; + this.array = array; + } + Item.prototype.run = function () { + this.fun.apply(null, this.array); + }; + process.title = 'browser'; + process.browser = true; + process.env = {}; + process.argv = []; + process.version = ''; // empty string to avoid regexp issues + process.versions = {}; + + function noop() {} + + process.on = noop; + process.addListener = noop; + process.once = noop; + process.off = noop; + process.removeListener = noop; + process.removeAllListeners = noop; + process.emit = noop; + + process.binding = function (name) { + throw new Error('process.binding is not supported'); + }; + + process.cwd = function () { + return '/'; + }; + process.chdir = function (dir) { + throw new Error('process.chdir is not supported'); + }; + process.umask = function () { + return 0; + }; + + /***/ + }, + /* 85 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + var _prodInvariant = __webpack_require__(5); + + var invariant = __webpack_require__(2); + + /** + * Static poolers. Several custom versions for each potential number of + * arguments. A completely generic pooler is easy to implement, but would + * require accessing the `arguments` object. In each of these, `this` refers to + * the Class itself, not an instance. If any others are needed, simply add them + * here, or in their own files. + */ + var oneArgumentPooler = function (copyFieldsFrom) { + var Klass = this; + if (Klass.instancePool.length) { + var instance = Klass.instancePool.pop(); + Klass.call(instance, copyFieldsFrom); + return instance; + } else { + return new Klass(copyFieldsFrom); + } + }; + + var twoArgumentPooler = function (a1, a2) { + var Klass = this; + if (Klass.instancePool.length) { + var instance = Klass.instancePool.pop(); + Klass.call(instance, a1, a2); + return instance; + } else { + return new Klass(a1, a2); + } + }; + + var threeArgumentPooler = function (a1, a2, a3) { + var Klass = this; + if (Klass.instancePool.length) { + var instance = Klass.instancePool.pop(); + Klass.call(instance, a1, a2, a3); + return instance; + } else { + return new Klass(a1, a2, a3); + } + }; + + var fourArgumentPooler = function (a1, a2, a3, a4) { + var Klass = this; + if (Klass.instancePool.length) { + var instance = Klass.instancePool.pop(); + Klass.call(instance, a1, a2, a3, a4); + return instance; + } else { + return new Klass(a1, a2, a3, a4); + } + }; + + var standardReleaser = function (instance) { + var Klass = this; + !(instance instanceof Klass) + ? true + ? invariant(false, 'Trying to release an instance into a pool of a different type.') + : _prodInvariant('25') + : void 0; + instance.destructor(); + if (Klass.instancePool.length < Klass.poolSize) { + Klass.instancePool.push(instance); + } + }; + + var DEFAULT_POOL_SIZE = 10; + var DEFAULT_POOLER = oneArgumentPooler; + + /** + * Augments `CopyConstructor` to be a poolable class, augmenting only the class + * itself (statically) not adding any prototypical fields. Any CopyConstructor + * you give this may have a `poolSize` property, and will look for a + * prototypical `destructor` on instances. + * + * @param {Function} CopyConstructor Constructor that can be used to reset. + * @param {Function} pooler Customizable pooler. + */ + var addPoolingTo = function (CopyConstructor, pooler) { + // Casting as any so that flow ignores the actual implementation and trusts + // it to match the type we declared + var NewKlass = CopyConstructor; + NewKlass.instancePool = []; + NewKlass.getPooled = pooler || DEFAULT_POOLER; + if (!NewKlass.poolSize) { + NewKlass.poolSize = DEFAULT_POOL_SIZE; + } + NewKlass.release = standardReleaser; + return NewKlass; + }; + + var PooledClass = { + addPoolingTo: addPoolingTo, + oneArgumentPooler: oneArgumentPooler, + twoArgumentPooler: twoArgumentPooler, + threeArgumentPooler: threeArgumentPooler, + fourArgumentPooler: fourArgumentPooler, + }; + + module.exports = PooledClass; + + /***/ + }, + /* 86 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2014-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var _assign = __webpack_require__(8); + + var ReactCurrentOwner = __webpack_require__(54); + + var warning = __webpack_require__(3); + var canDefineProperty = __webpack_require__(222); + var hasOwnProperty = Object.prototype.hasOwnProperty; + + var REACT_ELEMENT_TYPE = __webpack_require__(356); + + var RESERVED_PROPS = { + key: true, + ref: true, + __self: true, + __source: true, + }; + + var specialPropKeyWarningShown, specialPropRefWarningShown; + + function hasValidRef(config) { + if (true) { + if (hasOwnProperty.call(config, 'ref')) { + var getter = Object.getOwnPropertyDescriptor(config, 'ref').get; + if (getter && getter.isReactWarning) { + return false; + } + } + } + return config.ref !== undefined; + } + + function hasValidKey(config) { + if (true) { + if (hasOwnProperty.call(config, 'key')) { + var getter = Object.getOwnPropertyDescriptor(config, 'key').get; + if (getter && getter.isReactWarning) { + return false; + } + } + } + return config.key !== undefined; + } + + function defineKeyPropWarningGetter(props, displayName) { + var warnAboutAccessingKey = function () { + if (!specialPropKeyWarningShown) { + specialPropKeyWarningShown = true; + true + ? warning( + false, + '%s: `key` is not a prop. Trying to access it will result ' + + 'in `undefined` being returned. If you need to access the same ' + + 'value within the child component, you should pass it as a different ' + + 'prop. (https://fb.me/react-special-props)', + displayName, + ) + : void 0; + } + }; + warnAboutAccessingKey.isReactWarning = true; + Object.defineProperty(props, 'key', { + get: warnAboutAccessingKey, + configurable: true, + }); + } + + function defineRefPropWarningGetter(props, displayName) { + var warnAboutAccessingRef = function () { + if (!specialPropRefWarningShown) { + specialPropRefWarningShown = true; + true + ? warning( + false, + '%s: `ref` is not a prop. Trying to access it will result ' + + 'in `undefined` being returned. If you need to access the same ' + + 'value within the child component, you should pass it as a different ' + + 'prop. (https://fb.me/react-special-props)', + displayName, + ) + : void 0; + } + }; + warnAboutAccessingRef.isReactWarning = true; + Object.defineProperty(props, 'ref', { + get: warnAboutAccessingRef, + configurable: true, + }); + } + + /** + * Factory method to create a new React element. This no longer adheres to + * the class pattern, so do not use new to call it. Also, no instanceof check + * will work. Instead test $$typeof field against Symbol.for('react.element') to check + * if something is a React Element. + * + * @param {*} type + * @param {*} key + * @param {string|object} ref + * @param {*} self A *temporary* helper to detect places where `this` is + * different from the `owner` when React.createElement is called, so that we + * can warn. We want to get rid of owner and replace string `ref`s with arrow + * functions, and as long as `this` and owner are the same, there will be no + * change in behavior. + * @param {*} source An annotation object (added by a transpiler or otherwise) + * indicating filename, line number, and/or other information. + * @param {*} owner + * @param {*} props + * @internal + */ + var ReactElement = function (type, key, ref, self, source, owner, props) { + var element = { + // This tag allow us to uniquely identify this as a React Element + $$typeof: REACT_ELEMENT_TYPE, + + // Built-in properties that belong on the element + type: type, + key: key, + ref: ref, + props: props, + + // Record the component responsible for creating this element. + _owner: owner, + }; + + if (true) { + // The validation flag is currently mutative. We put it on + // an external backing store so that we can freeze the whole object. + // This can be replaced with a WeakMap once they are implemented in + // commonly used development environments. + element._store = {}; + + // To make comparing ReactElements easier for testing purposes, we make + // the validation flag non-enumerable (where possible, which should + // include every environment we run tests in), so the test framework + // ignores it. + if (canDefineProperty) { + Object.defineProperty(element._store, 'validated', { + configurable: false, + enumerable: false, + writable: true, + value: false, + }); + // self and source are DEV only properties. + Object.defineProperty(element, '_self', { + configurable: false, + enumerable: false, + writable: false, + value: self, + }); + // Two elements created in two different places should be considered + // equal for testing purposes and therefore we hide it from enumeration. + Object.defineProperty(element, '_source', { + configurable: false, + enumerable: false, + writable: false, + value: source, + }); + } else { + element._store.validated = false; + element._self = self; + element._source = source; + } + if (Object.freeze) { + Object.freeze(element.props); + Object.freeze(element); + } + } + + return element; + }; + + /** + * Create and return a new ReactElement of the given type. + * See https://facebook.github.io/react/docs/top-level-api.html#react.createelement + */ + ReactElement.createElement = function (type, config, children) { + var propName; + + // Reserved names are extracted + var props = {}; + + var key = null; + var ref = null; + var self = null; + var source = null; + + if (config != null) { + if (hasValidRef(config)) { + ref = config.ref; + } + if (hasValidKey(config)) { + key = '' + config.key; + } + + self = config.__self === undefined ? null : config.__self; + source = config.__source === undefined ? null : config.__source; + // Remaining properties are added to a new props object + for (propName in config) { + if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { + props[propName] = config[propName]; + } + } + } + + // Children can be more than one argument, and those are transferred onto + // the newly allocated props object. + var childrenLength = arguments.length - 2; + if (childrenLength === 1) { + props.children = children; + } else if (childrenLength > 1) { + var childArray = Array(childrenLength); + for (var i = 0; i < childrenLength; i++) { + childArray[i] = arguments[i + 2]; + } + if (true) { + if (Object.freeze) { + Object.freeze(childArray); + } + } + props.children = childArray; + } + + // Resolve default props + if (type && type.defaultProps) { + var defaultProps = type.defaultProps; + for (propName in defaultProps) { + if (props[propName] === undefined) { + props[propName] = defaultProps[propName]; + } + } + } + if (true) { + if (key || ref) { + if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) { + var displayName = + typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type; + if (key) { + defineKeyPropWarningGetter(props, displayName); + } + if (ref) { + defineRefPropWarningGetter(props, displayName); + } + } + } + } + return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props); + }; + + /** + * Return a function that produces ReactElements of a given type. + * See https://facebook.github.io/react/docs/top-level-api.html#react.createfactory + */ + ReactElement.createFactory = function (type) { + var factory = ReactElement.createElement.bind(null, type); + // Expose the type on the factory and the prototype so that it can be + // easily accessed on elements. E.g. `<Foo />.type === Foo`. + // This should not be named `constructor` since this may not be the function + // that created the element, and it may not even be a constructor. + // Legacy hook TODO: Warn if this is accessed + factory.type = type; + return factory; + }; + + ReactElement.cloneAndReplaceKey = function (oldElement, newKey) { + var newElement = ReactElement( + oldElement.type, + newKey, + oldElement.ref, + oldElement._self, + oldElement._source, + oldElement._owner, + oldElement.props, + ); + + return newElement; + }; + + /** + * Clone and return a new ReactElement using element as the starting point. + * See https://facebook.github.io/react/docs/top-level-api.html#react.cloneelement + */ + ReactElement.cloneElement = function (element, config, children) { + var propName; + + // Original props are copied + var props = _assign({}, element.props); + + // Reserved names are extracted + var key = element.key; + var ref = element.ref; + // Self is preserved since the owner is preserved. + var self = element._self; + // Source is preserved since cloneElement is unlikely to be targeted by a + // transpiler, and the original source is probably a better indicator of the + // true owner. + var source = element._source; + + // Owner will be preserved, unless ref is overridden + var owner = element._owner; + + if (config != null) { + if (hasValidRef(config)) { + // Silently steal the ref from the parent. + ref = config.ref; + owner = ReactCurrentOwner.current; + } + if (hasValidKey(config)) { + key = '' + config.key; + } + + // Remaining properties override existing props + var defaultProps; + if (element.type && element.type.defaultProps) { + defaultProps = element.type.defaultProps; + } + for (propName in config) { + if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { + if (config[propName] === undefined && defaultProps !== undefined) { + // Resolve default props + props[propName] = defaultProps[propName]; + } else { + props[propName] = config[propName]; + } + } + } + } + + // Children can be more than one argument, and those are transferred onto + // the newly allocated props object. + var childrenLength = arguments.length - 2; + if (childrenLength === 1) { + props.children = children; + } else if (childrenLength > 1) { + var childArray = Array(childrenLength); + for (var i = 0; i < childrenLength; i++) { + childArray[i] = arguments[i + 2]; + } + props.children = childArray; + } + + return ReactElement(element.type, key, ref, self, source, owner, props); + }; + + /** + * Verifies the object is a ReactElement. + * See https://facebook.github.io/react/docs/top-level-api.html#react.isvalidelement + * @param {?object} object + * @return {boolean} True if `object` is a valid component. + * @final + */ + ReactElement.isValidElement = function (object) { + return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; + }; + + module.exports = ReactElement; + + /***/ + }, + /* 87 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + /** + * WARNING: DO NOT manually require this module. + * This is a replacement for `invariant(...)` used by the error code system + * and will _only_ be required by the corresponding babel pass. + * It always throws. + */ + + function reactProdInvariant(code) { + var argCount = arguments.length - 1; + + var message = + 'Minified React error #' + + code + + '; visit ' + + 'http://facebook.github.io/react/docs/error-decoder.html?invariant=' + + code; + + for (var argIdx = 0; argIdx < argCount; argIdx++) { + message += '&args[]=' + encodeURIComponent(arguments[argIdx + 1]); + } + + message += + ' for the full message or use the non-minified dev environment' + + ' for full errors and additional helpful warnings.'; + + var error = new Error(message); + error.name = 'Invariant Violation'; + error.framesToPop = 1; // we don't care about reactProdInvariant's own frame + + throw error; + } + + module.exports = reactProdInvariant; + + /***/ + }, + /* 88 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.defaultLocale = exports.defaultMessages = undefined; + + var _reactIntl = __webpack_require__(101); + + var defaultLocale = 'en'; + + var defaultMessages = (0, _reactIntl.defineMessages)({ + type: { id: 'type', defaultMessage: 'English' }, + comments: { id: 'comments', defaultMessage: 'Comments ' }, + loading: { id: 'loading', defaultMessage: 'Loading...' }, + descriptionForceRefrech: { + id: 'description.force_refrech', + defaultMessage: 'Force Refresh of All Comments.', + }, + descriptionSupportMarkdown: { + id: 'description.support_markdown', + defaultMessage: 'Text supports Github Flavored Markdown.', + }, + descriptionDeleteRule: { + id: 'description.delete_rule', + defaultMessage: 'Comments older than 24 hours are deleted.', + }, + descriptionSubmitRule: { + id: 'description.submit_rule', + defaultMessage: 'Name is preserved. Text is reset, between submits.', + }, + descriptionSeeActionCable: { + id: 'description.see_action_cable', + defaultMessage: + 'To see Action Cable instantly update two browsers, open two browsers and submit a comment!', + }, + formHorizontal: { id: 'form.horizontal', defaultMessage: 'Horizontal Form' }, + formStacked: { id: 'form.stacked', defaultMessage: 'Stacked Form' }, + formInline: { id: 'form.inline', defaultMessage: 'Inline Form' }, + inputNameLabel: { id: 'input.name.label', defaultMessage: 'Name' }, + inputNamePlaceholder: { id: 'input.name.placeholder', defaultMessage: 'Your Name' }, + inputTextLabel: { id: 'input.text.label', defaultMessage: 'Text' }, + inputTextPlaceholder: { + id: 'input.text.placeholder', + defaultMessage: 'Say something using markdown...', + }, + inputSaving: { id: 'input.saving', defaultMessage: 'Saving' }, + inputPost: { id: 'input.post', defaultMessage: 'Post' }, + errorsUnavailableSession: { + id: 'errors.unavailable_session', + defaultMessage: + "Session %{id} is no longer available in memory.\n\nIf you happen to run on a multi-process server (like Unicorn or Puma) the process\nthis request hit doesn't store %{id} in memory. Consider turning the number of\nprocesses/workers to one (1) or using a different server in development.\n", + }, + errorsUnacceptableRequest: { + id: 'errors.unacceptable_request', + defaultMessage: 'A supported version is expected in the Accept header.\n', + }, + errorsConnectionRefused: { + id: 'errors.connection_refused', + defaultMessage: + 'Oops! Failed to connect to the Web Console middleware.\nPlease make sure a rails development server is running.\n', + }, + }); + + exports.defaultMessages = defaultMessages; + exports.defaultLocale = defaultLocale; + + /***/ + }, + /* 89 */ + /***/ function (module, exports, __webpack_require__) { + // optional / simple context binding + var aFunction = __webpack_require__(424); + module.exports = function (fn, that, length) { + aFunction(fn); + if (that === undefined) return fn; + switch (length) { + case 1: + return function (a) { + return fn.call(that, a); + }; + case 2: + return function (a, b) { + return fn.call(that, a, b); + }; + case 3: + return function (a, b, c) { + return fn.call(that, a, b, c); + }; + } + return function (/* ...args */) { + return fn.apply(that, arguments); + }; + }; + + /***/ + }, + /* 90 */ + /***/ function (module, exports, __webpack_require__) { + // 22.1.3.31 Array.prototype[@@unscopables] + var UNSCOPABLES = __webpack_require__(10)('unscopables'), + ArrayProto = Array.prototype; + if (ArrayProto[UNSCOPABLES] == undefined) __webpack_require__(29)(ArrayProto, UNSCOPABLES, {}); + module.exports = function (key) { + ArrayProto[UNSCOPABLES][key] = true; + }; + + /***/ + }, + /* 91 */ + /***/ function (module, exports, __webpack_require__) { + var ctx = __webpack_require__(57), + call = __webpack_require__(271), + isArrayIter = __webpack_require__(171), + anObject = __webpack_require__(4), + toLength = __webpack_require__(15), + getIterFn = __webpack_require__(188), + BREAK = {}, + RETURN = {}; + var exports = (module.exports = function (iterable, entries, fn, that, ITERATOR) { + var iterFn = ITERATOR + ? function () { + return iterable; + } + : getIterFn(iterable), + f = ctx(fn, that, entries ? 2 : 1), + index = 0, + length, + step, + iterator, + result; + if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!'); + // fast case for arrays with default iterator + if (isArrayIter(iterFn)) + for (length = toLength(iterable.length); length > index; index++) { + result = entries ? f(anObject((step = iterable[index]))[0], step[1]) : f(iterable[index]); + if (result === BREAK || result === RETURN) return result; + } + else + for (iterator = iterFn.call(iterable); !(step = iterator.next()).done; ) { + result = call(iterator, f, step.value, entries); + if (result === BREAK || result === RETURN) return result; + } + }); + exports.BREAK = BREAK; + exports.RETURN = RETURN; + + /***/ + }, + /* 92 */ + /***/ function (module, exports) { + module.exports = {}; + + /***/ + }, + /* 93 */ + /***/ function (module, exports, __webpack_require__) { + var def = __webpack_require__(12).f, + has = __webpack_require__(21), + TAG = __webpack_require__(10)('toStringTag'); + + module.exports = function (it, tag, stat) { + if (it && !has((it = stat ? it : it.prototype), TAG)) + def(it, TAG, { configurable: true, value: tag }); + }; + + /***/ + }, + /* 94 */ + /***/ function (module, exports, __webpack_require__) { + var $export = __webpack_require__(0), + defined = __webpack_require__(44), + fails = __webpack_require__(7), + spaces = __webpack_require__(184), + space = '[' + spaces + ']', + non = '\u200b\u0085', + ltrim = RegExp('^' + space + space + '*'), + rtrim = RegExp(space + space + '*$'); + + var exporter = function (KEY, exec, ALIAS) { + var exp = {}; + var FORCE = fails(function () { + return !!spaces[KEY]() || non[KEY]() != non; + }); + var fn = (exp[KEY] = FORCE ? exec(trim) : spaces[KEY]); + if (ALIAS) exp[ALIAS] = fn; + $export($export.P + $export.F * FORCE, 'String', exp); + }; + + // 1 -> String#trimLeft + // 2 -> String#trimRight + // 3 -> String#trim + var trim = (exporter.trim = function (string, TYPE) { + string = String(defined(string)); + if (TYPE & 1) string = string.replace(ltrim, ''); + if (TYPE & 2) string = string.replace(rtrim, ''); + return string; + }); + + module.exports = exporter; + + /***/ + }, + /* 95 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + exports.locationsAreEqual = + exports.statesAreEqual = + exports.createLocation = + exports.createQuery = + undefined; + + var _typeof = + typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' + ? function (obj) { + return typeof obj; + } + : function (obj) { + return obj && + typeof Symbol === 'function' && + obj.constructor === Symbol && + obj !== Symbol.prototype + ? 'symbol' + : typeof obj; + }; + + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + var _invariant = __webpack_require__(16); + + var _invariant2 = _interopRequireDefault(_invariant); + + var _warning = __webpack_require__(47); + + var _warning2 = _interopRequireDefault(_warning); + + var _PathUtils = __webpack_require__(65); + + var _Actions = __webpack_require__(137); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + var createQuery = (exports.createQuery = function createQuery(props) { + return _extends(Object.create(null), props); + }); + + var createLocation = (exports.createLocation = function createLocation() { + var input = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '/'; + var action = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _Actions.POP; + var key = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null; + + var object = typeof input === 'string' ? (0, _PathUtils.parsePath)(input) : input; + + true + ? (0, _warning2.default)( + !object.path, + 'Location descriptor objects should have a `pathname`, not a `path`.', + ) + : void 0; + + var pathname = object.pathname || '/'; + var search = object.search || ''; + var hash = object.hash || ''; + var state = object.state; + + return { + pathname: pathname, + search: search, + hash: hash, + state: state, + action: action, + key: key, + }; + }); + + var isDate = function isDate(object) { + return Object.prototype.toString.call(object) === '[object Date]'; + }; + + var statesAreEqual = (exports.statesAreEqual = function statesAreEqual(a, b) { + if (a === b) return true; + + var typeofA = typeof a === 'undefined' ? 'undefined' : _typeof(a); + var typeofB = typeof b === 'undefined' ? 'undefined' : _typeof(b); + + if (typeofA !== typeofB) return false; + + !(typeofA !== 'function') + ? true + ? (0, _invariant2.default)(false, 'You must not store functions in location state') + : (0, _invariant2.default)(false) + : void 0; + + // Not the same object, but same type. + if (typeofA === 'object') { + !!(isDate(a) && isDate(b)) + ? true + ? (0, _invariant2.default)(false, 'You must not store Date objects in location state') + : (0, _invariant2.default)(false) + : void 0; + + if (!Array.isArray(a)) { + var keysofA = Object.keys(a); + var keysofB = Object.keys(b); + return ( + keysofA.length === keysofB.length && + keysofA.every(function (key) { + return statesAreEqual(a[key], b[key]); + }) + ); + } + + return ( + Array.isArray(b) && + a.length === b.length && + a.every(function (item, index) { + return statesAreEqual(item, b[index]); + }) + ); + } + + // All other serializable types (string, number, boolean) + // should be strict equal. + return false; + }); + + var locationsAreEqual = (exports.locationsAreEqual = function locationsAreEqual(a, b) { + return ( + a.key === b.key && + // a.action === b.action && // Different action !== location change. + a.pathname === b.pathname && + a.search === b.search && + a.hash === b.hash && + statesAreEqual(a.state, b.state) + ); + }); + + /***/ + }, + /* 96 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + var Size = (exports.Size = { + LARGE: 'large', + SMALL: 'small', + XSMALL: 'xsmall', + }); + + var SIZE_MAP = (exports.SIZE_MAP = { + large: 'lg', + medium: 'md', + small: 'sm', + xsmall: 'xs', + lg: 'lg', + md: 'md', + sm: 'sm', + xs: 'xs', + }); + + var DEVICE_SIZES = (exports.DEVICE_SIZES = ['lg', 'md', 'sm', 'xs']); + + var State = (exports.State = { + SUCCESS: 'success', + WARNING: 'warning', + DANGER: 'danger', + INFO: 'info', + }); + + var Style = (exports.Style = { + DEFAULT: 'default', + PRIMARY: 'primary', + LINK: 'link', + INVERSE: 'inverse', + }); + + /***/ + }, + /* 97 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var DOMNamespaces = __webpack_require__(196); + var setInnerHTML = __webpack_require__(144); + + var createMicrosoftUnsafeLocalFunction = __webpack_require__(205); + var setTextContent = __webpack_require__(335); + + var ELEMENT_NODE_TYPE = 1; + var DOCUMENT_FRAGMENT_NODE_TYPE = 11; + + /** + * In IE (8-11) and Edge, appending nodes with no children is dramatically + * faster than appending a full subtree, so we essentially queue up the + * .appendChild calls here and apply them so each node is added to its parent + * before any children are added. + * + * In other browsers, doing so is slower or neutral compared to the other order + * (in Firefox, twice as slow) so we only do this inversion in IE. + * + * See https://github.com/spicyj/innerhtml-vs-createelement-vs-clonenode. + */ + var enableLazy = + (typeof document !== 'undefined' && typeof document.documentMode === 'number') || + (typeof navigator !== 'undefined' && + typeof navigator.userAgent === 'string' && + /\bEdge\/\d/.test(navigator.userAgent)); + + function insertTreeChildren(tree) { + if (!enableLazy) { + return; + } + var node = tree.node; + var children = tree.children; + if (children.length) { + for (var i = 0; i < children.length; i++) { + insertTreeBefore(node, children[i], null); + } + } else if (tree.html != null) { + setInnerHTML(node, tree.html); + } else if (tree.text != null) { + setTextContent(node, tree.text); + } + } + + var insertTreeBefore = createMicrosoftUnsafeLocalFunction(function (parentNode, tree, referenceNode) { + // DocumentFragments aren't actually part of the DOM after insertion so + // appending children won't update the DOM. We need to ensure the fragment + // is properly populated first, breaking out of our lazy approach for just + // this level. Also, some <object> plugins (like Flash Player) will read + // <param> nodes immediately upon insertion into the DOM, so <object> + // must also be populated prior to insertion into the DOM. + if ( + tree.node.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE || + (tree.node.nodeType === ELEMENT_NODE_TYPE && + tree.node.nodeName.toLowerCase() === 'object' && + (tree.node.namespaceURI == null || tree.node.namespaceURI === DOMNamespaces.html)) + ) { + insertTreeChildren(tree); + parentNode.insertBefore(tree.node, referenceNode); + } else { + parentNode.insertBefore(tree.node, referenceNode); + insertTreeChildren(tree); + } + }); + + function replaceChildWithTree(oldNode, newTree) { + oldNode.parentNode.replaceChild(newTree.node, oldNode); + insertTreeChildren(newTree); + } + + function queueChild(parentTree, childTree) { + if (enableLazy) { + parentTree.children.push(childTree); + } else { + parentTree.node.appendChild(childTree.node); + } + } + + function queueHTML(tree, html) { + if (enableLazy) { + tree.html = html; + } else { + setInnerHTML(tree.node, html); + } + } + + function queueText(tree, text) { + if (enableLazy) { + tree.text = text; + } else { + setTextContent(tree.node, text); + } + } + + function toString() { + return this.node.nodeName; + } + + function DOMLazyTree(node) { + return { + node: node, + children: [], + html: null, + text: null, + toString: toString, + }; + } + + DOMLazyTree.insertTreeBefore = insertTreeBefore; + DOMLazyTree.replaceChildWithTree = replaceChildWithTree; + DOMLazyTree.queueChild = queueChild; + DOMLazyTree.queueHTML = queueHTML; + DOMLazyTree.queueText = queueText; + + module.exports = DOMLazyTree; + + /***/ + }, + /* 98 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var _prodInvariant = __webpack_require__(5); + + var EventPluginRegistry = __webpack_require__(115); + var EventPluginUtils = __webpack_require__(197); + var ReactErrorUtils = __webpack_require__(203); + + var accumulateInto = __webpack_require__(327); + var forEachAccumulated = __webpack_require__(329); + var invariant = __webpack_require__(2); + + /** + * Internal store for event listeners + */ + var listenerBank = {}; + + /** + * Internal queue of events that have accumulated their dispatches and are + * waiting to have their dispatches executed. + */ + var eventQueue = null; + + /** + * Dispatches an event and releases it back into the pool, unless persistent. + * + * @param {?object} event Synthetic event to be dispatched. + * @param {boolean} simulated If the event is simulated (changes exn behavior) + * @private + */ + var executeDispatchesAndRelease = function (event, simulated) { + if (event) { + EventPluginUtils.executeDispatchesInOrder(event, simulated); + + if (!event.isPersistent()) { + event.constructor.release(event); + } + } + }; + var executeDispatchesAndReleaseSimulated = function (e) { + return executeDispatchesAndRelease(e, true); + }; + var executeDispatchesAndReleaseTopLevel = function (e) { + return executeDispatchesAndRelease(e, false); + }; + + var getDictionaryKey = function (inst) { + // Prevents V8 performance issue: + // https://github.com/facebook/react/pull/7232 + return '.' + inst._rootNodeID; + }; + + function isInteractive(tag) { + return tag === 'button' || tag === 'input' || tag === 'select' || tag === 'textarea'; + } + + function shouldPreventMouseEvent(name, type, props) { + switch (name) { + case 'onClick': + case 'onClickCapture': + case 'onDoubleClick': + case 'onDoubleClickCapture': + case 'onMouseDown': + case 'onMouseDownCapture': + case 'onMouseMove': + case 'onMouseMoveCapture': + case 'onMouseUp': + case 'onMouseUpCapture': + return !!(props.disabled && isInteractive(type)); + default: + return false; + } + } + + /** + * This is a unified interface for event plugins to be installed and configured. + * + * Event plugins can implement the following properties: + * + * `extractEvents` {function(string, DOMEventTarget, string, object): *} + * Required. When a top-level event is fired, this method is expected to + * extract synthetic events that will in turn be queued and dispatched. + * + * `eventTypes` {object} + * Optional, plugins that fire events must publish a mapping of registration + * names that are used to register listeners. Values of this mapping must + * be objects that contain `registrationName` or `phasedRegistrationNames`. + * + * `executeDispatch` {function(object, function, string)} + * Optional, allows plugins to override how an event gets dispatched. By + * default, the listener is simply invoked. + * + * Each plugin that is injected into `EventsPluginHub` is immediately operable. + * + * @public + */ + var EventPluginHub = { + /** + * Methods for injecting dependencies. + */ + injection: { + /** + * @param {array} InjectedEventPluginOrder + * @public + */ + injectEventPluginOrder: EventPluginRegistry.injectEventPluginOrder, + + /** + * @param {object} injectedNamesToPlugins Map from names to plugin modules. + */ + injectEventPluginsByName: EventPluginRegistry.injectEventPluginsByName, + }, + + /** + * Stores `listener` at `listenerBank[registrationName][key]`. Is idempotent. + * + * @param {object} inst The instance, which is the source of events. + * @param {string} registrationName Name of listener (e.g. `onClick`). + * @param {function} listener The callback to store. + */ + putListener: function (inst, registrationName, listener) { + !(typeof listener === 'function') + ? true + ? invariant( + false, + 'Expected %s listener to be a function, instead got type %s', + registrationName, + typeof listener, + ) + : _prodInvariant('94', registrationName, typeof listener) + : void 0; + + var key = getDictionaryKey(inst); + var bankForRegistrationName = + listenerBank[registrationName] || (listenerBank[registrationName] = {}); + bankForRegistrationName[key] = listener; + + var PluginModule = EventPluginRegistry.registrationNameModules[registrationName]; + if (PluginModule && PluginModule.didPutListener) { + PluginModule.didPutListener(inst, registrationName, listener); + } + }, + + /** + * @param {object} inst The instance, which is the source of events. + * @param {string} registrationName Name of listener (e.g. `onClick`). + * @return {?function} The stored callback. + */ + getListener: function (inst, registrationName) { + // TODO: shouldPreventMouseEvent is DOM-specific and definitely should not + // live here; needs to be moved to a better place soon + var bankForRegistrationName = listenerBank[registrationName]; + if ( + shouldPreventMouseEvent(registrationName, inst._currentElement.type, inst._currentElement.props) + ) { + return null; + } + var key = getDictionaryKey(inst); + return bankForRegistrationName && bankForRegistrationName[key]; + }, + + /** + * Deletes a listener from the registration bank. + * + * @param {object} inst The instance, which is the source of events. + * @param {string} registrationName Name of listener (e.g. `onClick`). + */ + deleteListener: function (inst, registrationName) { + var PluginModule = EventPluginRegistry.registrationNameModules[registrationName]; + if (PluginModule && PluginModule.willDeleteListener) { + PluginModule.willDeleteListener(inst, registrationName); + } + + var bankForRegistrationName = listenerBank[registrationName]; + // TODO: This should never be null -- when is it? + if (bankForRegistrationName) { + var key = getDictionaryKey(inst); + delete bankForRegistrationName[key]; + } + }, + + /** + * Deletes all listeners for the DOM element with the supplied ID. + * + * @param {object} inst The instance, which is the source of events. + */ + deleteAllListeners: function (inst) { + var key = getDictionaryKey(inst); + for (var registrationName in listenerBank) { + if (!listenerBank.hasOwnProperty(registrationName)) { + continue; + } + + if (!listenerBank[registrationName][key]) { + continue; + } + + var PluginModule = EventPluginRegistry.registrationNameModules[registrationName]; + if (PluginModule && PluginModule.willDeleteListener) { + PluginModule.willDeleteListener(inst, registrationName); + } + + delete listenerBank[registrationName][key]; + } + }, + + /** + * Allows registered plugins an opportunity to extract events from top-level + * native browser events. + * + * @return {*} An accumulation of synthetic events. + * @internal + */ + extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) { + var events; + var plugins = EventPluginRegistry.plugins; + for (var i = 0; i < plugins.length; i++) { + // Not every plugin in the ordering may be loaded at runtime. + var possiblePlugin = plugins[i]; + if (possiblePlugin) { + var extractedEvents = possiblePlugin.extractEvents( + topLevelType, + targetInst, + nativeEvent, + nativeEventTarget, + ); + if (extractedEvents) { + events = accumulateInto(events, extractedEvents); + } + } + } + return events; + }, + + /** + * Enqueues a synthetic event that should be dispatched when + * `processEventQueue` is invoked. + * + * @param {*} events An accumulation of synthetic events. + * @internal + */ + enqueueEvents: function (events) { + if (events) { + eventQueue = accumulateInto(eventQueue, events); + } + }, + + /** + * Dispatches all synthetic events on the event queue. + * + * @internal + */ + processEventQueue: function (simulated) { + // Set `eventQueue` to null before processing it so that we can tell if more + // events get enqueued while processing. + var processingEventQueue = eventQueue; + eventQueue = null; + if (simulated) { + forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseSimulated); + } else { + forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseTopLevel); + } + !!eventQueue + ? true + ? invariant( + false, + 'processEventQueue(): Additional events were enqueued while processing an event queue. Support for this has not yet been implemented.', + ) + : _prodInvariant('95') + : void 0; + // This would be a good time to rethrow if any of the event handlers threw. + ReactErrorUtils.rethrowCaughtError(); + }, + + /** + * These are needed for tests only. Do not use! + */ + __purge: function () { + listenerBank = {}; + }, + + __getListenerBank: function () { + return listenerBank; + }, + }; + + module.exports = EventPluginHub; + + /***/ + }, + /* 99 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var EventPluginHub = __webpack_require__(98); + var EventPluginUtils = __webpack_require__(197); + + var accumulateInto = __webpack_require__(327); + var forEachAccumulated = __webpack_require__(329); + var warning = __webpack_require__(3); + + var getListener = EventPluginHub.getListener; + + /** + * Some event types have a notion of different registration names for different + * "phases" of propagation. This finds listeners by a given phase. + */ + function listenerAtPhase(inst, event, propagationPhase) { + var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase]; + return getListener(inst, registrationName); + } + + /** + * Tags a `SyntheticEvent` with dispatched listeners. Creating this function + * here, allows us to not have to bind or create functions for each event. + * Mutating the event's members allows us to not have to create a wrapping + * "dispatch" object that pairs the event with the listener. + */ + function accumulateDirectionalDispatches(inst, phase, event) { + if (true) { + true ? warning(inst, 'Dispatching inst must not be null') : void 0; + } + var listener = listenerAtPhase(inst, event, phase); + if (listener) { + event._dispatchListeners = accumulateInto(event._dispatchListeners, listener); + event._dispatchInstances = accumulateInto(event._dispatchInstances, inst); + } + } + + /** + * Collect dispatches (must be entirely collected before dispatching - see unit + * tests). Lazily allocate the array to conserve memory. We must loop through + * each event and perform the traversal for each one. We cannot perform a + * single traversal for the entire collection of events because each event may + * have a different target. + */ + function accumulateTwoPhaseDispatchesSingle(event) { + if (event && event.dispatchConfig.phasedRegistrationNames) { + EventPluginUtils.traverseTwoPhase(event._targetInst, accumulateDirectionalDispatches, event); + } + } + + /** + * Same as `accumulateTwoPhaseDispatchesSingle`, but skips over the targetID. + */ + function accumulateTwoPhaseDispatchesSingleSkipTarget(event) { + if (event && event.dispatchConfig.phasedRegistrationNames) { + var targetInst = event._targetInst; + var parentInst = targetInst ? EventPluginUtils.getParentInstance(targetInst) : null; + EventPluginUtils.traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event); + } + } + + /** + * Accumulates without regard to direction, does not look for phased + * registration names. Same as `accumulateDirectDispatchesSingle` but without + * requiring that the `dispatchMarker` be the same as the dispatched ID. + */ + function accumulateDispatches(inst, ignoredDirection, event) { + if (event && event.dispatchConfig.registrationName) { + var registrationName = event.dispatchConfig.registrationName; + var listener = getListener(inst, registrationName); + if (listener) { + event._dispatchListeners = accumulateInto(event._dispatchListeners, listener); + event._dispatchInstances = accumulateInto(event._dispatchInstances, inst); + } + } + } + + /** + * Accumulates dispatches on an `SyntheticEvent`, but only for the + * `dispatchMarker`. + * @param {SyntheticEvent} event + */ + function accumulateDirectDispatchesSingle(event) { + if (event && event.dispatchConfig.registrationName) { + accumulateDispatches(event._targetInst, null, event); + } + } + + function accumulateTwoPhaseDispatches(events) { + forEachAccumulated(events, accumulateTwoPhaseDispatchesSingle); + } + + function accumulateTwoPhaseDispatchesSkipTarget(events) { + forEachAccumulated(events, accumulateTwoPhaseDispatchesSingleSkipTarget); + } + + function accumulateEnterLeaveDispatches(leave, enter, from, to) { + EventPluginUtils.traverseEnterLeave(from, to, accumulateDispatches, leave, enter); + } + + function accumulateDirectDispatches(events) { + forEachAccumulated(events, accumulateDirectDispatchesSingle); + } + + /** + * A small set of propagation patterns, each of which will accept a small amount + * of information, and generate a set of "dispatch ready event objects" - which + * are sets of events that have already been annotated with a set of dispatched + * listener functions/ids. The API is designed this way to discourage these + * propagation strategies from actually executing the dispatches, since we + * always want to collect the entire set of dispatches before executing event a + * single one. + * + * @constructor EventPropagators + */ + var EventPropagators = { + accumulateTwoPhaseDispatches: accumulateTwoPhaseDispatches, + accumulateTwoPhaseDispatchesSkipTarget: accumulateTwoPhaseDispatchesSkipTarget, + accumulateDirectDispatches: accumulateDirectDispatches, + accumulateEnterLeaveDispatches: accumulateEnterLeaveDispatches, + }; + + module.exports = EventPropagators; + + /***/ + }, + /* 100 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + /** + * `ReactInstanceMap` maintains a mapping from a public facing stateful + * instance (key) and the internal representation (value). This allows public + * methods to accept the user facing instance as an argument and map them back + * to internal methods. + */ + + // TODO: Replace this with ES6: var ReactInstanceMap = new Map(); + + var ReactInstanceMap = { + /** + * This API should be called `delete` but we'd have to make sure to always + * transform these to strings for IE support. When this transform is fully + * supported we can rename it. + */ + remove: function (key) { + key._reactInternalInstance = undefined; + }, + + get: function (key) { + return key._reactInternalInstance; + }, + + has: function (key) { + return key._reactInternalInstance !== undefined; + }, + + set: function (key, value) { + key._reactInternalInstance = value; + }, + }; + + module.exports = ReactInstanceMap; + + /***/ + }, + /* 101 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + Object.defineProperty(__webpack_exports__, '__esModule', { value: true }); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__locale_data_index_js__ = __webpack_require__(843); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__locale_data_index_js___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__locale_data_index_js__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_intl_messageformat__ = __webpack_require__(296); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_intl_messageformat___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_intl_messageformat__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_intl_relativeformat__ = __webpack_require__(680); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_intl_relativeformat___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_intl_relativeformat__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_3_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_invariant__ = __webpack_require__(16); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_invariant___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_4_invariant__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_intl_format_cache__ = __webpack_require__(670); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_intl_format_cache___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_intl_format_cache__); + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'addLocaleData', function () { + return addLocaleData; + }); + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'intlShape', function () { + return intlShape; + }); + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'injectIntl', function () { + return injectIntl; + }); + /* harmony export (binding) */ __webpack_require__.d( + __webpack_exports__, + 'defineMessages', + function () { + return defineMessages; + }, + ); + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'IntlProvider', function () { + return IntlProvider; + }); + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'FormattedDate', function () { + return FormattedDate; + }); + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'FormattedTime', function () { + return FormattedTime; + }); + /* harmony export (binding) */ __webpack_require__.d( + __webpack_exports__, + 'FormattedRelative', + function () { + return FormattedRelative; + }, + ); + /* harmony export (binding) */ __webpack_require__.d( + __webpack_exports__, + 'FormattedNumber', + function () { + return FormattedNumber; + }, + ); + /* harmony export (binding) */ __webpack_require__.d( + __webpack_exports__, + 'FormattedPlural', + function () { + return FormattedPlural; + }, + ); + /* harmony export (binding) */ __webpack_require__.d( + __webpack_exports__, + 'FormattedMessage', + function () { + return FormattedMessage; + }, + ); + /* harmony export (binding) */ __webpack_require__.d( + __webpack_exports__, + 'FormattedHTMLMessage', + function () { + return FormattedHTMLMessage; + }, + ); + /* + * Copyright 2017, Yahoo Inc. + * Copyrights licensed under the New BSD License. + * See the accompanying LICENSE file for terms. + */ + + // GENERATED FILE + var defaultLocaleData = { + locale: 'en', + pluralRuleFunction: function pluralRuleFunction(n, ord) { + var s = String(n).split('.'), + v0 = !s[1], + t0 = Number(s[0]) == n, + n10 = t0 && s[0].slice(-1), + n100 = t0 && s[0].slice(-2); + if (ord) + return n10 == 1 && n100 != 11 + ? 'one' + : n10 == 2 && n100 != 12 + ? 'two' + : n10 == 3 && n100 != 13 + ? 'few' + : 'other'; + return n == 1 && v0 ? 'one' : 'other'; + }, + fields: { + year: { + displayName: 'year', + relative: { 0: 'this year', 1: 'next year', '-1': 'last year' }, + relativeTime: { + future: { one: 'in {0} year', other: 'in {0} years' }, + past: { one: '{0} year ago', other: '{0} years ago' }, + }, + }, + month: { + displayName: 'month', + relative: { 0: 'this month', 1: 'next month', '-1': 'last month' }, + relativeTime: { + future: { one: 'in {0} month', other: 'in {0} months' }, + past: { one: '{0} month ago', other: '{0} months ago' }, + }, + }, + day: { + displayName: 'day', + relative: { 0: 'today', 1: 'tomorrow', '-1': 'yesterday' }, + relativeTime: { + future: { one: 'in {0} day', other: 'in {0} days' }, + past: { one: '{0} day ago', other: '{0} days ago' }, + }, + }, + hour: { + displayName: 'hour', + relativeTime: { + future: { one: 'in {0} hour', other: 'in {0} hours' }, + past: { one: '{0} hour ago', other: '{0} hours ago' }, + }, + }, + minute: { + displayName: 'minute', + relativeTime: { + future: { one: 'in {0} minute', other: 'in {0} minutes' }, + past: { one: '{0} minute ago', other: '{0} minutes ago' }, + }, + }, + second: { + displayName: 'second', + relative: { 0: 'now' }, + relativeTime: { + future: { one: 'in {0} second', other: 'in {0} seconds' }, + past: { one: '{0} second ago', other: '{0} seconds ago' }, + }, + }, + }, + }; + + /* + * Copyright 2015, Yahoo Inc. + * Copyrights licensed under the New BSD License. + * See the accompanying LICENSE file for terms. + */ + + function addLocaleData() { + var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; + + var locales = Array.isArray(data) ? data : [data]; + + locales.forEach(function (localeData) { + if (localeData && localeData.locale) { + __WEBPACK_IMPORTED_MODULE_1_intl_messageformat___default.a.__addLocaleData(localeData); + __WEBPACK_IMPORTED_MODULE_2_intl_relativeformat___default.a.__addLocaleData(localeData); + } + }); + } + + function hasLocaleData(locale) { + var localeParts = (locale || '').split('-'); + + while (localeParts.length > 0) { + if (hasIMFAndIRFLocaleData(localeParts.join('-'))) { + return true; + } + + localeParts.pop(); + } + + return false; + } + + function hasIMFAndIRFLocaleData(locale) { + var normalizedLocale = locale && locale.toLowerCase(); + + return !!( + __WEBPACK_IMPORTED_MODULE_1_intl_messageformat___default.a.__localeData__[normalizedLocale] && + __WEBPACK_IMPORTED_MODULE_2_intl_relativeformat___default.a.__localeData__[normalizedLocale] + ); + } + + var _typeof = + typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' + ? function (obj) { + return typeof obj; + } + : function (obj) { + return obj && + typeof Symbol === 'function' && + obj.constructor === Symbol && + obj !== Symbol.prototype + ? 'symbol' + : typeof obj; + }; + + var classCallCheck = function (instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + }; + + var createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + var defineProperty = function (obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true, + }); + } else { + obj[key] = value; + } + + return obj; + }; + + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + + return target; + }; + + var inherits = function (subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); + } + + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true, + }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + }; + + var objectWithoutProperties = function (obj, keys) { + var target = {}; + + for (var i in obj) { + if (keys.indexOf(i) >= 0) continue; + if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; + target[i] = obj[i]; + } + + return target; + }; + + var possibleConstructorReturn = function (self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + }; + + var toConsumableArray = function (arr) { + if (Array.isArray(arr)) { + for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i]; + + return arr2; + } else { + return Array.from(arr); + } + }; + + /* + * Copyright 2015, Yahoo Inc. + * Copyrights licensed under the New BSD License. + * See the accompanying LICENSE file for terms. + */ + + var bool = __WEBPACK_IMPORTED_MODULE_3_react__['PropTypes'].bool; + var number = __WEBPACK_IMPORTED_MODULE_3_react__['PropTypes'].number; + var string = __WEBPACK_IMPORTED_MODULE_3_react__['PropTypes'].string; + var func = __WEBPACK_IMPORTED_MODULE_3_react__['PropTypes'].func; + var object = __WEBPACK_IMPORTED_MODULE_3_react__['PropTypes'].object; + var oneOf = __WEBPACK_IMPORTED_MODULE_3_react__['PropTypes'].oneOf; + var shape = __WEBPACK_IMPORTED_MODULE_3_react__['PropTypes'].shape; + var any = __WEBPACK_IMPORTED_MODULE_3_react__['PropTypes'].any; + + var localeMatcher = oneOf(['best fit', 'lookup']); + var narrowShortLong = oneOf(['narrow', 'short', 'long']); + var numeric2digit = oneOf(['numeric', '2-digit']); + var funcReq = func.isRequired; + + var intlConfigPropTypes = { + locale: string, + formats: object, + messages: object, + textComponent: any, + + defaultLocale: string, + defaultFormats: object, + }; + + var intlFormatPropTypes = { + formatDate: funcReq, + formatTime: funcReq, + formatRelative: funcReq, + formatNumber: funcReq, + formatPlural: funcReq, + formatMessage: funcReq, + formatHTMLMessage: funcReq, + }; + + var intlShape = shape( + _extends({}, intlConfigPropTypes, intlFormatPropTypes, { + formatters: object, + now: funcReq, + }), + ); + + var messageDescriptorPropTypes = { + id: string.isRequired, + description: string, + defaultMessage: string, + }; + + var dateTimeFormatPropTypes = { + localeMatcher: localeMatcher, + formatMatcher: oneOf(['basic', 'best fit']), + + timeZone: string, + hour12: bool, + + weekday: narrowShortLong, + era: narrowShortLong, + year: numeric2digit, + month: oneOf(['numeric', '2-digit', 'narrow', 'short', 'long']), + day: numeric2digit, + hour: numeric2digit, + minute: numeric2digit, + second: numeric2digit, + timeZoneName: oneOf(['short', 'long']), + }; + + var numberFormatPropTypes = { + localeMatcher: localeMatcher, + + style: oneOf(['decimal', 'currency', 'percent']), + currency: string, + currencyDisplay: oneOf(['symbol', 'code', 'name']), + useGrouping: bool, + + minimumIntegerDigits: number, + minimumFractionDigits: number, + maximumFractionDigits: number, + minimumSignificantDigits: number, + maximumSignificantDigits: number, + }; + + var relativeFormatPropTypes = { + style: oneOf(['best fit', 'numeric']), + units: oneOf(['second', 'minute', 'hour', 'day', 'month', 'year']), + }; + + var pluralFormatPropTypes = { + style: oneOf(['cardinal', 'ordinal']), + }; + + /* +HTML escaping and shallow-equals implementations are the same as React's +(on purpose.) Therefore, it has the following Copyright and Licensing: + +Copyright 2013-2014, Facebook, Inc. +All rights reserved. + +This source code is licensed under the BSD-style license found in the LICENSE +file in the root directory of React's source tree. +*/ + + var intlConfigPropNames = Object.keys(intlConfigPropTypes); + + var ESCAPED_CHARS = { + '&': '&', + '>': '>', + '<': '<', + '"': '"', + "'": ''', + }; + + var UNSAFE_CHARS_REGEX = /[&><"']/g; + + function escape(str) { + return ('' + str).replace(UNSAFE_CHARS_REGEX, function (match) { + return ESCAPED_CHARS[match]; + }); + } + + function filterProps(props, whitelist) { + var defaults$$1 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + + return whitelist.reduce(function (filtered, name) { + if (props.hasOwnProperty(name)) { + filtered[name] = props[name]; + } else if (defaults$$1.hasOwnProperty(name)) { + filtered[name] = defaults$$1[name]; + } + + return filtered; + }, {}); + } + + function invariantIntlContext() { + var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, + intl = _ref.intl; + + __WEBPACK_IMPORTED_MODULE_4_invariant___default()( + intl, + '[React Intl] Could not find required `intl` object. ' + + '<IntlProvider> needs to exist in the component ancestry.', + ); + } + + function shallowEquals(objA, objB) { + if (objA === objB) { + return true; + } + + if ( + (typeof objA === 'undefined' ? 'undefined' : _typeof(objA)) !== 'object' || + objA === null || + (typeof objB === 'undefined' ? 'undefined' : _typeof(objB)) !== 'object' || + objB === null + ) { + return false; + } + + var keysA = Object.keys(objA); + var keysB = Object.keys(objB); + + if (keysA.length !== keysB.length) { + return false; + } + + // Test for A's keys different from B. + var bHasOwnProperty = Object.prototype.hasOwnProperty.bind(objB); + for (var i = 0; i < keysA.length; i++) { + if (!bHasOwnProperty(keysA[i]) || objA[keysA[i]] !== objB[keysA[i]]) { + return false; + } + } + + return true; + } + + function shouldIntlComponentUpdate(_ref2, nextProps, nextState) { + var props = _ref2.props, + state = _ref2.state, + _ref2$context = _ref2.context, + context = _ref2$context === undefined ? {} : _ref2$context; + var nextContext = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; + var _context$intl = context.intl, + intl = _context$intl === undefined ? {} : _context$intl; + var _nextContext$intl = nextContext.intl, + nextIntl = _nextContext$intl === undefined ? {} : _nextContext$intl; + + return ( + !shallowEquals(nextProps, props) || + !shallowEquals(nextState, state) || + !( + nextIntl === intl || + shallowEquals(filterProps(nextIntl, intlConfigPropNames), filterProps(intl, intlConfigPropNames)) + ) + ); + } + + /* + * Copyright 2015, Yahoo Inc. + * Copyrights licensed under the New BSD License. + * See the accompanying LICENSE file for terms. + */ + + // Inspired by react-redux's `connect()` HOC factory function implementation: + // https://github.com/rackt/react-redux + + function getDisplayName(Component$$1) { + return Component$$1.displayName || Component$$1.name || 'Component'; + } + + function injectIntl(WrappedComponent) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var _options$intlPropName = options.intlPropName, + intlPropName = _options$intlPropName === undefined ? 'intl' : _options$intlPropName, + _options$withRef = options.withRef, + withRef = _options$withRef === undefined ? false : _options$withRef; + + var InjectIntl = (function (_Component) { + inherits(InjectIntl, _Component); + + function InjectIntl(props, context) { + classCallCheck(this, InjectIntl); + + var _this = possibleConstructorReturn( + this, + (InjectIntl.__proto__ || Object.getPrototypeOf(InjectIntl)).call(this, props, context), + ); + + invariantIntlContext(context); + return _this; + } + + createClass(InjectIntl, [ + { + key: 'getWrappedInstance', + value: function getWrappedInstance() { + __WEBPACK_IMPORTED_MODULE_4_invariant___default()( + withRef, + '[React Intl] To access the wrapped instance, ' + + 'the `{withRef: true}` option must be set when calling: ' + + '`injectIntl()`', + ); + + return this.refs.wrappedInstance; + }, + }, + { + key: 'render', + value: function render() { + return __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement( + WrappedComponent, + _extends({}, this.props, defineProperty({}, intlPropName, this.context.intl), { + ref: withRef ? 'wrappedInstance' : null, + }), + ); + }, + }, + ]); + return InjectIntl; + })(__WEBPACK_IMPORTED_MODULE_3_react__['Component']); + + InjectIntl.displayName = 'InjectIntl(' + getDisplayName(WrappedComponent) + ')'; + InjectIntl.contextTypes = { + intl: intlShape, + }; + InjectIntl.WrappedComponent = WrappedComponent; + + return InjectIntl; + } + + /* + * Copyright 2015, Yahoo Inc. + * Copyrights licensed under the New BSD License. + * See the accompanying LICENSE file for terms. + */ + + function defineMessages(messageDescriptors) { + // This simply returns what's passed-in because it's meant to be a hook for + // babel-plugin-react-intl. + return messageDescriptors; + } + + /* + * Copyright 2015, Yahoo Inc. + * Copyrights licensed under the New BSD License. + * See the accompanying LICENSE file for terms. + */ + + // This is a "hack" until a proper `intl-pluralformat` package is created. + + function resolveLocale(locales) { + // IntlMessageFormat#_resolveLocale() does not depend on `this`. + return __WEBPACK_IMPORTED_MODULE_1_intl_messageformat___default.a.prototype._resolveLocale(locales); + } + + function findPluralFunction(locale) { + // IntlMessageFormat#_findPluralFunction() does not depend on `this`. + return __WEBPACK_IMPORTED_MODULE_1_intl_messageformat___default.a.prototype._findPluralRuleFunction( + locale, + ); + } + + var IntlPluralFormat = function IntlPluralFormat(locales) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + classCallCheck(this, IntlPluralFormat); + + var useOrdinal = options.style === 'ordinal'; + var pluralFn = findPluralFunction(resolveLocale(locales)); + + this.format = function (value) { + return pluralFn(value, useOrdinal); + }; + }; + + /* + * Copyright 2015, Yahoo Inc. + * Copyrights licensed under the New BSD License. + * See the accompanying LICENSE file for terms. + */ + + var DATE_TIME_FORMAT_OPTIONS = Object.keys(dateTimeFormatPropTypes); + var NUMBER_FORMAT_OPTIONS = Object.keys(numberFormatPropTypes); + var RELATIVE_FORMAT_OPTIONS = Object.keys(relativeFormatPropTypes); + var PLURAL_FORMAT_OPTIONS = Object.keys(pluralFormatPropTypes); + + var RELATIVE_FORMAT_THRESHOLDS = { + second: 60, // seconds to minute + minute: 60, // minutes to hour + hour: 24, // hours to day + day: 30, // days to month + month: 12, + }; + + function updateRelativeFormatThresholds(newThresholds) { + var thresholds = __WEBPACK_IMPORTED_MODULE_2_intl_relativeformat___default.a.thresholds; + thresholds.second = newThresholds.second; + thresholds.minute = newThresholds.minute; + thresholds.hour = newThresholds.hour; + thresholds.day = newThresholds.day; + thresholds.month = newThresholds.month; + } + + function getNamedFormat(formats, type, name) { + var format = formats && formats[type] && formats[type][name]; + if (format) { + return format; + } + + if (true) { + console.error('[React Intl] No ' + type + ' format named: ' + name); + } + } + + function formatDate(config, state, value) { + var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; + var locale = config.locale, + formats = config.formats; + var format = options.format; + + var date = new Date(value); + var defaults$$1 = format && getNamedFormat(formats, 'date', format); + var filteredOptions = filterProps(options, DATE_TIME_FORMAT_OPTIONS, defaults$$1); + + try { + return state.getDateTimeFormat(locale, filteredOptions).format(date); + } catch (e) { + if (true) { + console.error('[React Intl] Error formatting date.\n' + e); + } + } + + return String(date); + } + + function formatTime(config, state, value) { + var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; + var locale = config.locale, + formats = config.formats; + var format = options.format; + + var date = new Date(value); + var defaults$$1 = format && getNamedFormat(formats, 'time', format); + var filteredOptions = filterProps(options, DATE_TIME_FORMAT_OPTIONS, defaults$$1); + + if (!filteredOptions.hour && !filteredOptions.minute && !filteredOptions.second) { + // Add default formatting options if hour, minute, or second isn't defined. + filteredOptions = _extends({}, filteredOptions, { hour: 'numeric', minute: 'numeric' }); + } + + try { + return state.getDateTimeFormat(locale, filteredOptions).format(date); + } catch (e) { + if (true) { + console.error('[React Intl] Error formatting time.\n' + e); + } + } + + return String(date); + } + + function formatRelative(config, state, value) { + var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; + var locale = config.locale, + formats = config.formats; + var format = options.format; + + var date = new Date(value); + var now = new Date(options.now); + var defaults$$1 = format && getNamedFormat(formats, 'relative', format); + var filteredOptions = filterProps(options, RELATIVE_FORMAT_OPTIONS, defaults$$1); + + // Capture the current threshold values, then temporarily override them with + // specific values just for this render. + var oldThresholds = _extends( + {}, + __WEBPACK_IMPORTED_MODULE_2_intl_relativeformat___default.a.thresholds, + ); + updateRelativeFormatThresholds(RELATIVE_FORMAT_THRESHOLDS); + + try { + return state.getRelativeFormat(locale, filteredOptions).format(date, { + now: isFinite(now) ? now : state.now(), + }); + } catch (e) { + if (true) { + console.error('[React Intl] Error formatting relative time.\n' + e); + } + } finally { + updateRelativeFormatThresholds(oldThresholds); + } + + return String(date); + } + + function formatNumber(config, state, value) { + var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; + var locale = config.locale, + formats = config.formats; + var format = options.format; + + var defaults$$1 = format && getNamedFormat(formats, 'number', format); + var filteredOptions = filterProps(options, NUMBER_FORMAT_OPTIONS, defaults$$1); + + try { + return state.getNumberFormat(locale, filteredOptions).format(value); + } catch (e) { + if (true) { + console.error('[React Intl] Error formatting number.\n' + e); + } + } + + return String(value); + } + + function formatPlural(config, state, value) { + var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; + var locale = config.locale; + + var filteredOptions = filterProps(options, PLURAL_FORMAT_OPTIONS); + + try { + return state.getPluralFormat(locale, filteredOptions).format(value); + } catch (e) { + if (true) { + console.error('[React Intl] Error formatting plural.\n' + e); + } + } + + return 'other'; + } + + function formatMessage(config, state) { + var messageDescriptor = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + var values = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; + var locale = config.locale, + formats = config.formats, + messages = config.messages, + defaultLocale = config.defaultLocale, + defaultFormats = config.defaultFormats; + var id = messageDescriptor.id, + defaultMessage = messageDescriptor.defaultMessage; + + // `id` is a required field of a Message Descriptor. + + __WEBPACK_IMPORTED_MODULE_4_invariant___default()( + id, + '[React Intl] An `id` must be provided to format a message.', + ); + + var message = messages && messages[id]; + var hasValues = Object.keys(values).length > 0; + + // Avoid expensive message formatting for simple messages without values. In + // development messages will always be formatted in case of missing values. + if (!hasValues && 'development' === 'production') { + return message || defaultMessage || id; + } + + var formattedMessage = void 0; + + if (message) { + try { + var formatter = state.getMessageFormat(message, locale, formats); + + formattedMessage = formatter.format(values); + } catch (e) { + if (true) { + console.error( + '[React Intl] Error formatting message: "' + + id + + '" for locale: "' + + locale + + '"' + + (defaultMessage ? ', using default message as fallback.' : '') + + ('\n' + e), + ); + } + } + } else { + if (true) { + // This prevents warnings from littering the console in development + // when no `messages` are passed into the <IntlProvider> for the + // default locale, and a default message is in the source. + if (!defaultMessage || (locale && locale.toLowerCase() !== defaultLocale.toLowerCase())) { + console.error( + '[React Intl] Missing message: "' + + id + + '" for locale: "' + + locale + + '"' + + (defaultMessage ? ', using default message as fallback.' : ''), + ); + } + } + } + + if (!formattedMessage && defaultMessage) { + try { + var _formatter = state.getMessageFormat(defaultMessage, defaultLocale, defaultFormats); + + formattedMessage = _formatter.format(values); + } catch (e) { + if (true) { + console.error( + '[React Intl] Error formatting the default message for: "' + id + '"' + ('\n' + e), + ); + } + } + } + + if (!formattedMessage) { + if (true) { + console.error( + '[React Intl] Cannot format message: "' + + id + + '", ' + + ('using message ' + (message || defaultMessage ? 'source' : 'id') + ' as fallback.'), + ); + } + } + + return formattedMessage || message || defaultMessage || id; + } + + function formatHTMLMessage(config, state, messageDescriptor) { + var rawValues = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; + + // Process all the values before they are used when formatting the ICU + // Message string. Since the formatted message might be injected via + // `innerHTML`, all String-based values need to be HTML-escaped. + var escapedValues = Object.keys(rawValues).reduce(function (escaped, name) { + var value = rawValues[name]; + escaped[name] = typeof value === 'string' ? escape(value) : value; + return escaped; + }, {}); + + return formatMessage(config, state, messageDescriptor, escapedValues); + } + + var format = Object.freeze({ + formatDate: formatDate, + formatTime: formatTime, + formatRelative: formatRelative, + formatNumber: formatNumber, + formatPlural: formatPlural, + formatMessage: formatMessage, + formatHTMLMessage: formatHTMLMessage, + }); + + /* + * Copyright 2015, Yahoo Inc. + * Copyrights licensed under the New BSD License. + * See the accompanying LICENSE file for terms. + */ + + var intlConfigPropNames$1 = Object.keys(intlConfigPropTypes); + var intlFormatPropNames = Object.keys(intlFormatPropTypes); + + // These are not a static property on the `IntlProvider` class so the intl + // config values can be inherited from an <IntlProvider> ancestor. + var defaultProps = { + formats: {}, + messages: {}, + textComponent: 'span', + + defaultLocale: 'en', + defaultFormats: {}, + }; + + var IntlProvider = (function (_Component) { + inherits(IntlProvider, _Component); + + function IntlProvider(props) { + var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + classCallCheck(this, IntlProvider); + + var _this = possibleConstructorReturn( + this, + (IntlProvider.__proto__ || Object.getPrototypeOf(IntlProvider)).call(this, props, context), + ); + + __WEBPACK_IMPORTED_MODULE_4_invariant___default()( + typeof Intl !== 'undefined', + '[React Intl] The `Intl` APIs must be available in the runtime, ' + + 'and do not appear to be built-in. An `Intl` polyfill should be loaded.\n' + + 'See: http://formatjs.io/guides/runtime-environments/', + ); + + var intlContext = context.intl; + + // Used to stabilize time when performing an initial rendering so that + // all relative times use the same reference "now" time. + + var initialNow = void 0; + if (isFinite(props.initialNow)) { + initialNow = Number(props.initialNow); + } else { + // When an `initialNow` isn't provided via `props`, look to see an + // <IntlProvider> exists in the ancestry and call its `now()` + // function to propagate its value for "now". + initialNow = intlContext ? intlContext.now() : Date.now(); + } + + // Creating `Intl*` formatters is expensive. If there's a parent + // `<IntlProvider>`, then its formatters will be used. Otherwise, this + // memoize the `Intl*` constructors and cache them for the lifecycle of + // this IntlProvider instance. + + var _ref = intlContext || {}, + _ref$formatters = _ref.formatters, + formatters = + _ref$formatters === undefined + ? { + getDateTimeFormat: __WEBPACK_IMPORTED_MODULE_5_intl_format_cache___default()( + Intl.DateTimeFormat, + ), + getNumberFormat: __WEBPACK_IMPORTED_MODULE_5_intl_format_cache___default()( + Intl.NumberFormat, + ), + getMessageFormat: __WEBPACK_IMPORTED_MODULE_5_intl_format_cache___default()( + __WEBPACK_IMPORTED_MODULE_1_intl_messageformat___default.a, + ), + getRelativeFormat: __WEBPACK_IMPORTED_MODULE_5_intl_format_cache___default()( + __WEBPACK_IMPORTED_MODULE_2_intl_relativeformat___default.a, + ), + getPluralFormat: + __WEBPACK_IMPORTED_MODULE_5_intl_format_cache___default()(IntlPluralFormat), + } + : _ref$formatters; + + _this.state = _extends({}, formatters, { + // Wrapper to provide stable "now" time for initial render. + now: function now() { + return _this._didDisplay ? Date.now() : initialNow; + }, + }); + return _this; + } + + createClass(IntlProvider, [ + { + key: 'getConfig', + value: function getConfig() { + var intlContext = this.context.intl; + + // Build a whitelisted config object from `props`, defaults, and + // `context.intl`, if an <IntlProvider> exists in the ancestry. + + var config = filterProps(this.props, intlConfigPropNames$1, intlContext); + + // Apply default props. This must be applied last after the props have + // been resolved and inherited from any <IntlProvider> in the ancestry. + // This matches how React resolves `defaultProps`. + for (var propName in defaultProps) { + if (config[propName] === undefined) { + config[propName] = defaultProps[propName]; + } + } + + if (!hasLocaleData(config.locale)) { + var _config = config, + locale = _config.locale, + defaultLocale = _config.defaultLocale, + defaultFormats = _config.defaultFormats; + + if (true) { + console.error( + '[React Intl] Missing locale data for locale: "' + + locale + + '". ' + + ('Using default locale: "' + defaultLocale + '" as fallback.'), + ); + } + + // Since there's no registered locale data for `locale`, this will + // fallback to the `defaultLocale` to make sure things can render. + // The `messages` are overridden to the `defaultProps` empty object + // to maintain referential equality across re-renders. It's assumed + // each <FormattedMessage> contains a `defaultMessage` prop. + config = _extends({}, config, { + locale: defaultLocale, + formats: defaultFormats, + messages: defaultProps.messages, + }); + } + + return config; + }, + }, + { + key: 'getBoundFormatFns', + value: function getBoundFormatFns(config, state) { + return intlFormatPropNames.reduce(function (boundFormatFns, name) { + boundFormatFns[name] = format[name].bind(null, config, state); + return boundFormatFns; + }, {}); + }, + }, + { + key: 'getChildContext', + value: function getChildContext() { + var config = this.getConfig(); + + // Bind intl factories and current config to the format functions. + var boundFormatFns = this.getBoundFormatFns(config, this.state); + + var _state = this.state, + now = _state.now, + formatters = objectWithoutProperties(_state, ['now']); + + return { + intl: _extends({}, config, boundFormatFns, { + formatters: formatters, + now: now, + }), + }; + }, + }, + { + key: 'shouldComponentUpdate', + value: function shouldComponentUpdate() { + for (var _len = arguments.length, next = Array(_len), _key = 0; _key < _len; _key++) { + next[_key] = arguments[_key]; + } + + return shouldIntlComponentUpdate.apply(undefined, [this].concat(next)); + }, + }, + { + key: 'componentDidMount', + value: function componentDidMount() { + this._didDisplay = true; + }, + }, + { + key: 'render', + value: function render() { + return __WEBPACK_IMPORTED_MODULE_3_react__['Children'].only(this.props.children); + }, + }, + ]); + return IntlProvider; + })(__WEBPACK_IMPORTED_MODULE_3_react__['Component']); + + IntlProvider.displayName = 'IntlProvider'; + IntlProvider.contextTypes = { + intl: intlShape, + }; + IntlProvider.childContextTypes = { + intl: intlShape.isRequired, + }; + true + ? (IntlProvider.propTypes = _extends({}, intlConfigPropTypes, { + children: __WEBPACK_IMPORTED_MODULE_3_react__['PropTypes'].element.isRequired, + initialNow: __WEBPACK_IMPORTED_MODULE_3_react__['PropTypes'].any, + })) + : void 0; + + /* + * Copyright 2015, Yahoo Inc. + * Copyrights licensed under the New BSD License. + * See the accompanying LICENSE file for terms. + */ + + var FormattedDate = (function (_Component) { + inherits(FormattedDate, _Component); + + function FormattedDate(props, context) { + classCallCheck(this, FormattedDate); + + var _this = possibleConstructorReturn( + this, + (FormattedDate.__proto__ || Object.getPrototypeOf(FormattedDate)).call(this, props, context), + ); + + invariantIntlContext(context); + return _this; + } + + createClass(FormattedDate, [ + { + key: 'shouldComponentUpdate', + value: function shouldComponentUpdate() { + for (var _len = arguments.length, next = Array(_len), _key = 0; _key < _len; _key++) { + next[_key] = arguments[_key]; + } + + return shouldIntlComponentUpdate.apply(undefined, [this].concat(next)); + }, + }, + { + key: 'render', + value: function render() { + var _context$intl = this.context.intl, + formatDate = _context$intl.formatDate, + Text = _context$intl.textComponent; + var _props = this.props, + value = _props.value, + children = _props.children; + + var formattedDate = formatDate(value, this.props); + + if (typeof children === 'function') { + return children(formattedDate); + } + + return __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(Text, null, formattedDate); + }, + }, + ]); + return FormattedDate; + })(__WEBPACK_IMPORTED_MODULE_3_react__['Component']); + + FormattedDate.displayName = 'FormattedDate'; + FormattedDate.contextTypes = { + intl: intlShape, + }; + true + ? (FormattedDate.propTypes = _extends({}, dateTimeFormatPropTypes, { + value: __WEBPACK_IMPORTED_MODULE_3_react__['PropTypes'].any.isRequired, + format: __WEBPACK_IMPORTED_MODULE_3_react__['PropTypes'].string, + children: __WEBPACK_IMPORTED_MODULE_3_react__['PropTypes'].func, + })) + : void 0; + + /* + * Copyright 2015, Yahoo Inc. + * Copyrights licensed under the New BSD License. + * See the accompanying LICENSE file for terms. + */ + + var FormattedTime = (function (_Component) { + inherits(FormattedTime, _Component); + + function FormattedTime(props, context) { + classCallCheck(this, FormattedTime); + + var _this = possibleConstructorReturn( + this, + (FormattedTime.__proto__ || Object.getPrototypeOf(FormattedTime)).call(this, props, context), + ); + + invariantIntlContext(context); + return _this; + } + + createClass(FormattedTime, [ + { + key: 'shouldComponentUpdate', + value: function shouldComponentUpdate() { + for (var _len = arguments.length, next = Array(_len), _key = 0; _key < _len; _key++) { + next[_key] = arguments[_key]; + } + + return shouldIntlComponentUpdate.apply(undefined, [this].concat(next)); + }, + }, + { + key: 'render', + value: function render() { + var _context$intl = this.context.intl, + formatTime = _context$intl.formatTime, + Text = _context$intl.textComponent; + var _props = this.props, + value = _props.value, + children = _props.children; + + var formattedTime = formatTime(value, this.props); + + if (typeof children === 'function') { + return children(formattedTime); + } + + return __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(Text, null, formattedTime); + }, + }, + ]); + return FormattedTime; + })(__WEBPACK_IMPORTED_MODULE_3_react__['Component']); + + FormattedTime.displayName = 'FormattedTime'; + FormattedTime.contextTypes = { + intl: intlShape, + }; + true + ? (FormattedTime.propTypes = _extends({}, dateTimeFormatPropTypes, { + value: __WEBPACK_IMPORTED_MODULE_3_react__['PropTypes'].any.isRequired, + format: __WEBPACK_IMPORTED_MODULE_3_react__['PropTypes'].string, + children: __WEBPACK_IMPORTED_MODULE_3_react__['PropTypes'].func, + })) + : void 0; + + /* + * Copyright 2015, Yahoo Inc. + * Copyrights licensed under the New BSD License. + * See the accompanying LICENSE file for terms. + */ + + var SECOND = 1000; + var MINUTE = 1000 * 60; + var HOUR = 1000 * 60 * 60; + var DAY = 1000 * 60 * 60 * 24; + + // The maximum timer delay value is a 32-bit signed integer. + // See: https://mdn.io/setTimeout + var MAX_TIMER_DELAY = 2147483647; + + function selectUnits(delta) { + var absDelta = Math.abs(delta); + + if (absDelta < MINUTE) { + return 'second'; + } + + if (absDelta < HOUR) { + return 'minute'; + } + + if (absDelta < DAY) { + return 'hour'; + } + + // The maximum scheduled delay will be measured in days since the maximum + // timer delay is less than the number of milliseconds in 25 days. + return 'day'; + } + + function getUnitDelay(units) { + switch (units) { + case 'second': + return SECOND; + case 'minute': + return MINUTE; + case 'hour': + return HOUR; + case 'day': + return DAY; + default: + return MAX_TIMER_DELAY; + } + } + + function isSameDate(a, b) { + if (a === b) { + return true; + } + + var aTime = new Date(a).getTime(); + var bTime = new Date(b).getTime(); + + return isFinite(aTime) && isFinite(bTime) && aTime === bTime; + } + + var FormattedRelative = (function (_Component) { + inherits(FormattedRelative, _Component); + + function FormattedRelative(props, context) { + classCallCheck(this, FormattedRelative); + + var _this = possibleConstructorReturn( + this, + (FormattedRelative.__proto__ || Object.getPrototypeOf(FormattedRelative)).call( + this, + props, + context, + ), + ); + + invariantIntlContext(context); + + var now = isFinite(props.initialNow) ? Number(props.initialNow) : context.intl.now(); + + // `now` is stored as state so that `render()` remains a function of + // props + state, instead of accessing `Date.now()` inside `render()`. + _this.state = { now: now }; + return _this; + } + + createClass(FormattedRelative, [ + { + key: 'scheduleNextUpdate', + value: function scheduleNextUpdate(props, state) { + var _this2 = this; + + var updateInterval = props.updateInterval; + + // If the `updateInterval` is falsy, including `0`, then auto updates + // have been turned off, so we bail and skip scheduling an update. + + if (!updateInterval) { + return; + } + + var time = new Date(props.value).getTime(); + var delta = time - state.now; + var units = props.units || selectUnits(delta); + + var unitDelay = getUnitDelay(units); + var unitRemainder = Math.abs(delta % unitDelay); + + // We want the largest possible timer delay which will still display + // accurate information while reducing unnecessary re-renders. The delay + // should be until the next "interesting" moment, like a tick from + // "1 minute ago" to "2 minutes ago" when the delta is 120,000ms. + var delay = + delta < 0 + ? Math.max(updateInterval, unitDelay - unitRemainder) + : Math.max(updateInterval, unitRemainder); + + clearTimeout(this._timer); + + this._timer = setTimeout(function () { + _this2.setState({ now: _this2.context.intl.now() }); + }, delay); + }, + }, + { + key: 'componentDidMount', + value: function componentDidMount() { + this.scheduleNextUpdate(this.props, this.state); + }, + }, + { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(_ref) { + var nextValue = _ref.value; + + // When the `props.value` date changes, `state.now` needs to be updated, + // and the next update can be rescheduled. + if (!isSameDate(nextValue, this.props.value)) { + this.setState({ now: this.context.intl.now() }); + } + }, + }, + { + key: 'shouldComponentUpdate', + value: function shouldComponentUpdate() { + for (var _len = arguments.length, next = Array(_len), _key = 0; _key < _len; _key++) { + next[_key] = arguments[_key]; + } + + return shouldIntlComponentUpdate.apply(undefined, [this].concat(next)); + }, + }, + { + key: 'componentWillUpdate', + value: function componentWillUpdate(nextProps, nextState) { + this.scheduleNextUpdate(nextProps, nextState); + }, + }, + { + key: 'componentWillUnmount', + value: function componentWillUnmount() { + clearTimeout(this._timer); + }, + }, + { + key: 'render', + value: function render() { + var _context$intl = this.context.intl, + formatRelative = _context$intl.formatRelative, + Text = _context$intl.textComponent; + var _props = this.props, + value = _props.value, + children = _props.children; + + var formattedRelative = formatRelative(value, _extends({}, this.props, this.state)); + + if (typeof children === 'function') { + return children(formattedRelative); + } + + return __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement( + Text, + null, + formattedRelative, + ); + }, + }, + ]); + return FormattedRelative; + })(__WEBPACK_IMPORTED_MODULE_3_react__['Component']); + + FormattedRelative.displayName = 'FormattedRelative'; + FormattedRelative.contextTypes = { + intl: intlShape, + }; + FormattedRelative.defaultProps = { + updateInterval: 1000 * 10, + }; + true + ? (FormattedRelative.propTypes = _extends({}, relativeFormatPropTypes, { + value: __WEBPACK_IMPORTED_MODULE_3_react__['PropTypes'].any.isRequired, + format: __WEBPACK_IMPORTED_MODULE_3_react__['PropTypes'].string, + updateInterval: __WEBPACK_IMPORTED_MODULE_3_react__['PropTypes'].number, + initialNow: __WEBPACK_IMPORTED_MODULE_3_react__['PropTypes'].any, + children: __WEBPACK_IMPORTED_MODULE_3_react__['PropTypes'].func, + })) + : void 0; + + /* + * Copyright 2015, Yahoo Inc. + * Copyrights licensed under the New BSD License. + * See the accompanying LICENSE file for terms. + */ + + var FormattedNumber = (function (_Component) { + inherits(FormattedNumber, _Component); + + function FormattedNumber(props, context) { + classCallCheck(this, FormattedNumber); + + var _this = possibleConstructorReturn( + this, + (FormattedNumber.__proto__ || Object.getPrototypeOf(FormattedNumber)).call(this, props, context), + ); + + invariantIntlContext(context); + return _this; + } + + createClass(FormattedNumber, [ + { + key: 'shouldComponentUpdate', + value: function shouldComponentUpdate() { + for (var _len = arguments.length, next = Array(_len), _key = 0; _key < _len; _key++) { + next[_key] = arguments[_key]; + } + + return shouldIntlComponentUpdate.apply(undefined, [this].concat(next)); + }, + }, + { + key: 'render', + value: function render() { + var _context$intl = this.context.intl, + formatNumber = _context$intl.formatNumber, + Text = _context$intl.textComponent; + var _props = this.props, + value = _props.value, + children = _props.children; + + var formattedNumber = formatNumber(value, this.props); + + if (typeof children === 'function') { + return children(formattedNumber); + } + + return __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(Text, null, formattedNumber); + }, + }, + ]); + return FormattedNumber; + })(__WEBPACK_IMPORTED_MODULE_3_react__['Component']); + + FormattedNumber.displayName = 'FormattedNumber'; + FormattedNumber.contextTypes = { + intl: intlShape, + }; + true + ? (FormattedNumber.propTypes = _extends({}, numberFormatPropTypes, { + value: __WEBPACK_IMPORTED_MODULE_3_react__['PropTypes'].any.isRequired, + format: __WEBPACK_IMPORTED_MODULE_3_react__['PropTypes'].string, + children: __WEBPACK_IMPORTED_MODULE_3_react__['PropTypes'].func, + })) + : void 0; + + /* + * Copyright 2015, Yahoo Inc. + * Copyrights licensed under the New BSD License. + * See the accompanying LICENSE file for terms. + */ + + var FormattedPlural = (function (_Component) { + inherits(FormattedPlural, _Component); + + function FormattedPlural(props, context) { + classCallCheck(this, FormattedPlural); + + var _this = possibleConstructorReturn( + this, + (FormattedPlural.__proto__ || Object.getPrototypeOf(FormattedPlural)).call(this, props, context), + ); + + invariantIntlContext(context); + return _this; + } + + createClass(FormattedPlural, [ + { + key: 'shouldComponentUpdate', + value: function shouldComponentUpdate() { + for (var _len = arguments.length, next = Array(_len), _key = 0; _key < _len; _key++) { + next[_key] = arguments[_key]; + } + + return shouldIntlComponentUpdate.apply(undefined, [this].concat(next)); + }, + }, + { + key: 'render', + value: function render() { + var _context$intl = this.context.intl, + formatPlural = _context$intl.formatPlural, + Text = _context$intl.textComponent; + var _props = this.props, + value = _props.value, + other = _props.other, + children = _props.children; + + var pluralCategory = formatPlural(value, this.props); + var formattedPlural = this.props[pluralCategory] || other; + + if (typeof children === 'function') { + return children(formattedPlural); + } + + return __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(Text, null, formattedPlural); + }, + }, + ]); + return FormattedPlural; + })(__WEBPACK_IMPORTED_MODULE_3_react__['Component']); + + FormattedPlural.displayName = 'FormattedPlural'; + FormattedPlural.contextTypes = { + intl: intlShape, + }; + FormattedPlural.defaultProps = { + style: 'cardinal', + }; + true + ? (FormattedPlural.propTypes = _extends({}, pluralFormatPropTypes, { + value: __WEBPACK_IMPORTED_MODULE_3_react__['PropTypes'].any.isRequired, + + other: __WEBPACK_IMPORTED_MODULE_3_react__['PropTypes'].node.isRequired, + zero: __WEBPACK_IMPORTED_MODULE_3_react__['PropTypes'].node, + one: __WEBPACK_IMPORTED_MODULE_3_react__['PropTypes'].node, + two: __WEBPACK_IMPORTED_MODULE_3_react__['PropTypes'].node, + few: __WEBPACK_IMPORTED_MODULE_3_react__['PropTypes'].node, + many: __WEBPACK_IMPORTED_MODULE_3_react__['PropTypes'].node, + + children: __WEBPACK_IMPORTED_MODULE_3_react__['PropTypes'].func, + })) + : void 0; + + /* + * Copyright 2015, Yahoo Inc. + * Copyrights licensed under the New BSD License. + * See the accompanying LICENSE file for terms. + */ + + var FormattedMessage = (function (_Component) { + inherits(FormattedMessage, _Component); + + function FormattedMessage(props, context) { + classCallCheck(this, FormattedMessage); + + var _this = possibleConstructorReturn( + this, + (FormattedMessage.__proto__ || Object.getPrototypeOf(FormattedMessage)).call( + this, + props, + context, + ), + ); + + invariantIntlContext(context); + return _this; + } + + createClass(FormattedMessage, [ + { + key: 'shouldComponentUpdate', + value: function shouldComponentUpdate(nextProps) { + var values = this.props.values; + var nextValues = nextProps.values; + + if (!shallowEquals(nextValues, values)) { + return true; + } + + // Since `values` has already been checked, we know they're not + // different, so the current `values` are carried over so the shallow + // equals comparison on the other props isn't affected by the `values`. + var nextPropsToCheck = _extends({}, nextProps, { + values: values, + }); + + for ( + var _len = arguments.length, next = Array(_len > 1 ? _len - 1 : 0), _key = 1; + _key < _len; + _key++ + ) { + next[_key - 1] = arguments[_key]; + } + + return shouldIntlComponentUpdate.apply(undefined, [this, nextPropsToCheck].concat(next)); + }, + }, + { + key: 'render', + value: function render() { + var _context$intl = this.context.intl, + formatMessage = _context$intl.formatMessage, + Text = _context$intl.textComponent; + var _props = this.props, + id = _props.id, + description = _props.description, + defaultMessage = _props.defaultMessage, + values = _props.values, + _props$tagName = _props.tagName, + Component$$1 = _props$tagName === undefined ? Text : _props$tagName, + children = _props.children; + + var tokenDelimiter = void 0; + var tokenizedValues = void 0; + var elements = void 0; + + var hasValues = values && Object.keys(values).length > 0; + if (hasValues) { + (function () { + // Creates a token with a random UID that should not be guessable or + // conflict with other parts of the `message` string. + var uid = Math.floor(Math.random() * 0x10000000000).toString(16); + + var generateToken = (function () { + var counter = 0; + return function () { + return 'ELEMENT-' + uid + '-' + (counter += 1); + }; + })(); + + // Splitting with a delimiter to support IE8. When using a regex + // with a capture group IE8 does not include the capture group in + // the resulting array. + tokenDelimiter = '@__' + uid + '__@'; + tokenizedValues = {}; + elements = {}; + + // Iterates over the `props` to keep track of any React Element + // values so they can be represented by the `token` as a placeholder + // when the `message` is formatted. This allows the formatted + // message to then be broken-up into parts with references to the + // React Elements inserted back in. + Object.keys(values).forEach(function (name) { + var value = values[name]; + + if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3_react__['isValidElement'])(value)) { + var token = generateToken(); + tokenizedValues[name] = tokenDelimiter + token + tokenDelimiter; + elements[token] = value; + } else { + tokenizedValues[name] = value; + } + }); + })(); + } + + var descriptor = { id: id, description: description, defaultMessage: defaultMessage }; + var formattedMessage = formatMessage(descriptor, tokenizedValues || values); + + var nodes = void 0; + + var hasElements = elements && Object.keys(elements).length > 0; + if (hasElements) { + // Split the message into parts so the React Element values captured + // above can be inserted back into the rendered message. This + // approach allows messages to render with React Elements while + // keeping React's virtual diffing working properly. + nodes = formattedMessage + .split(tokenDelimiter) + .filter(function (part) { + return !!part; + }) + .map(function (part) { + return elements[part] || part; + }); + } else { + nodes = [formattedMessage]; + } + + if (typeof children === 'function') { + return children.apply(undefined, toConsumableArray(nodes)); + } + + // Needs to use `createElement()` instead of JSX, otherwise React will + // warn about a missing `key` prop with rich-text message formatting. + return __WEBPACK_IMPORTED_MODULE_3_react__['createElement'].apply( + undefined, + [Component$$1, null].concat(toConsumableArray(nodes)), + ); + }, + }, + ]); + return FormattedMessage; + })(__WEBPACK_IMPORTED_MODULE_3_react__['Component']); + + FormattedMessage.displayName = 'FormattedMessage'; + FormattedMessage.contextTypes = { + intl: intlShape, + }; + FormattedMessage.defaultProps = { + values: {}, + }; + true + ? (FormattedMessage.propTypes = _extends({}, messageDescriptorPropTypes, { + values: __WEBPACK_IMPORTED_MODULE_3_react__['PropTypes'].object, + tagName: __WEBPACK_IMPORTED_MODULE_3_react__['PropTypes'].string, + children: __WEBPACK_IMPORTED_MODULE_3_react__['PropTypes'].func, + })) + : void 0; + + /* + * Copyright 2015, Yahoo Inc. + * Copyrights licensed under the New BSD License. + * See the accompanying LICENSE file for terms. + */ + + var FormattedHTMLMessage = (function (_Component) { + inherits(FormattedHTMLMessage, _Component); + + function FormattedHTMLMessage(props, context) { + classCallCheck(this, FormattedHTMLMessage); + + var _this = possibleConstructorReturn( + this, + (FormattedHTMLMessage.__proto__ || Object.getPrototypeOf(FormattedHTMLMessage)).call( + this, + props, + context, + ), + ); + + invariantIntlContext(context); + return _this; + } + + createClass(FormattedHTMLMessage, [ + { + key: 'shouldComponentUpdate', + value: function shouldComponentUpdate(nextProps) { + var values = this.props.values; + var nextValues = nextProps.values; + + if (!shallowEquals(nextValues, values)) { + return true; + } + + // Since `values` has already been checked, we know they're not + // different, so the current `values` are carried over so the shallow + // equals comparison on the other props isn't affected by the `values`. + var nextPropsToCheck = _extends({}, nextProps, { + values: values, + }); + + for ( + var _len = arguments.length, next = Array(_len > 1 ? _len - 1 : 0), _key = 1; + _key < _len; + _key++ + ) { + next[_key - 1] = arguments[_key]; + } + + return shouldIntlComponentUpdate.apply(undefined, [this, nextPropsToCheck].concat(next)); + }, + }, + { + key: 'render', + value: function render() { + var _context$intl = this.context.intl, + formatHTMLMessage = _context$intl.formatHTMLMessage, + Text = _context$intl.textComponent; + var _props = this.props, + id = _props.id, + description = _props.description, + defaultMessage = _props.defaultMessage, + rawValues = _props.values, + _props$tagName = _props.tagName, + Component$$1 = _props$tagName === undefined ? Text : _props$tagName, + children = _props.children; + + var descriptor = { id: id, description: description, defaultMessage: defaultMessage }; + var formattedHTMLMessage = formatHTMLMessage(descriptor, rawValues); + + if (typeof children === 'function') { + return children(formattedHTMLMessage); + } + + // Since the message presumably has HTML in it, we need to set + // `innerHTML` in order for it to be rendered and not escaped by React. + // To be safe, all string prop values were escaped when formatting the + // message. It is assumed that the message is not UGC, and came from the + // developer making it more like a template. + // + // Note: There's a perf impact of using this component since there's no + // way for React to do its virtual DOM diffing. + var html = { __html: formattedHTMLMessage }; + return __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(Component$$1, { + dangerouslySetInnerHTML: html, + }); + }, + }, + ]); + return FormattedHTMLMessage; + })(__WEBPACK_IMPORTED_MODULE_3_react__['Component']); + + FormattedHTMLMessage.displayName = 'FormattedHTMLMessage'; + FormattedHTMLMessage.contextTypes = { + intl: intlShape, + }; + FormattedHTMLMessage.defaultProps = { + values: {}, + }; + true + ? (FormattedHTMLMessage.propTypes = _extends({}, messageDescriptorPropTypes, { + values: __WEBPACK_IMPORTED_MODULE_3_react__['PropTypes'].object, + tagName: __WEBPACK_IMPORTED_MODULE_3_react__['PropTypes'].string, + children: __WEBPACK_IMPORTED_MODULE_3_react__['PropTypes'].func, + })) + : void 0; + + /* + * Copyright 2015, Yahoo Inc. + * Copyrights licensed under the New BSD License. + * See the accompanying LICENSE file for terms. + */ + + addLocaleData(defaultLocaleData); + + /* + * Copyright 2015, Yahoo Inc. + * Copyrights licensed under the New BSD License. + * See the accompanying LICENSE file for terms. + */ + + addLocaleData(__WEBPACK_IMPORTED_MODULE_0__locale_data_index_js___default.a); + + /***/ + }, + /* 102 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + + var _assign = __webpack_require__(147); + + var _assign2 = _interopRequireDefault(_assign); + + var _stringify = __webpack_require__(120); + + var _stringify2 = _interopRequireDefault(_stringify); + + var _keys = __webpack_require__(148); + + var _keys2 = _interopRequireDefault(_keys); + + var _reactDom = __webpack_require__(140); + + var _reactDom2 = _interopRequireDefault(_reactDom); + + var _clientStartup = __webpack_require__(788); + + var ClientStartup = _interopRequireWildcard(_clientStartup); + + var _handleError2 = __webpack_require__(340); + + var _handleError3 = _interopRequireDefault(_handleError2); + + var _ComponentRegistry = __webpack_require__(338); + + var _ComponentRegistry2 = _interopRequireDefault(_ComponentRegistry); + + var _StoreRegistry = __webpack_require__(787); + + var _StoreRegistry2 = _interopRequireDefault(_StoreRegistry); + + var _serverRenderReactComponent2 = __webpack_require__(792); + + var _serverRenderReactComponent3 = _interopRequireDefault(_serverRenderReactComponent2); + + var _buildConsoleReplay2 = __webpack_require__(339); + + var _buildConsoleReplay3 = _interopRequireDefault(_buildConsoleReplay2); + + var _createReactElement = __webpack_require__(213); + + var _createReactElement2 = _interopRequireDefault(_createReactElement); + + var _Authenticity = __webpack_require__(785); + + var _Authenticity2 = _interopRequireDefault(_Authenticity); + + var _context = __webpack_require__(789); + + var _context2 = _interopRequireDefault(_context); + + function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; + } + } + newObj.default = obj; + return newObj; + } + } + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + var ctx = (0, _context2.default)(); + + var DEFAULT_OPTIONS = { + traceTurbolinks: false, + }; + + ctx.ReactOnRails = { + /** + * Main entry point to using the react-on-rails npm package. This is how Rails will be able to + * find you components for rendering. + * @param components (key is component name, value is component) + */ + register: function register(components) { + _ComponentRegistry2.default.register(components); + }, + + /** + * Allows registration of store generators to be used by multiple react components on one Rails + * view. store generators are functions that take one arg, props, and return a store. Note that + * the setStore API is different in tha it's the actual store hydrated with props. + * @param stores (keys are store names, values are the store generators) + */ + registerStore: function registerStore(stores) { + if (!stores) { + throw new Error( + 'Called ReactOnRails.registerStores with a null or undefined, rather than ' + + 'an Object with keys being the store names and the values are the store generators.', + ); + } + + _StoreRegistry2.default.register(stores); + }, + + /** + * Allows retrieval of the store by name. This store will be hydrated by any Rails form props. + * Pass optional param throwIfMissing = false if you want to use this call to get back null if the + * store with name is not registered. + * @param name + * @param throwIfMissing Defaults to true. Set to false to have this call return undefined if + * there is no store with the given name. + * @returns Redux Store, possibly hydrated + */ + getStore: function getStore(name) { + var throwIfMissing = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + + return _StoreRegistry2.default.getStore(name, throwIfMissing); + }, + + /** + * Set options for ReactOnRails, typically before you call ReactOnRails.register + * Available Options: + * `traceTurbolinks: true|false Gives you debugging messages on Turbolinks events + */ + setOptions: function setOptions(newOptions) { + if ('traceTurbolinks' in newOptions) { + this.options.traceTurbolinks = newOptions.traceTurbolinks; + + // eslint-disable-next-line no-param-reassign + delete newOptions.traceTurbolinks; + } + + if ((0, _keys2.default)(newOptions).length > 0) { + throw new Error( + 'Invalid options passed to ReactOnRails.options: ', + (0, _stringify2.default)(newOptions), + ); + } + }, + + /** + * Allow directly calling the page loaded script in case the default events that trigger react + * rendering are not sufficient, such as when loading JavaScript asynchronously with TurboLinks: + * More details can be found here: + * https://github.com/shakacode/react_on_rails/blob/master/docs/additional-reading/turbolinks.md + */ + reactOnRailsPageLoaded: function reactOnRailsPageLoaded() { + ClientStartup.reactOnRailsPageLoaded(); + }, + + /** + * Returns CSRF authenticity token inserted by Rails csrf_meta_tags + * @returns String or null + */ + + authenticityToken: function authenticityToken() { + return _Authenticity2.default.authenticityToken(); + }, + + /** + * Returns header with csrf authenticity token and XMLHttpRequest + * @param {*} other headers + * @returns {*} header + */ + + authenticityHeaders: function authenticityHeaders() { + var otherHeaders = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + + return _Authenticity2.default.authenticityHeaders(otherHeaders); + }, + + // ///////////////////////////////////////////////////////////////////////////// + // INTERNALLY USED APIs + // ///////////////////////////////////////////////////////////////////////////// + + /** + * Retrieve an option by key. + * @param key + * @returns option value + */ + option: function option(key) { + return this.options[key]; + }, + + /** + * Allows retrieval of the store generator by name. This is used internally by ReactOnRails after + * a rails form loads to prepare stores. + * @param name + * @returns Redux Store generator function + */ + getStoreGenerator: function getStoreGenerator(name) { + return _StoreRegistry2.default.getStoreGenerator(name); + }, + + /** + * Allows saving the store populated by Rails form props. Used internally by ReactOnRails. + * @param name + * @returns Redux Store, possibly hydrated + */ + setStore: function setStore(name, store) { + return _StoreRegistry2.default.setStore(name, store); + }, + + /** + * Clears hydratedStores to avoid accidental usage of wrong store hydrated in previous/parallel + * request. + */ + clearHydratedStores: function clearHydratedStores() { + _StoreRegistry2.default.clearHydratedStores(); + }, + + /** + * ReactOnRails.render("HelloWorldApp", {name: "Stranger"}, 'app'); + * + * Does this: + * ReactDOM.render(React.createElement(HelloWorldApp, {name: "Stranger"}), + * document.getElementById('app')) + * + * @param name Name of your registered component + * @param props Props to pass to your component + * @param domNodeId + * @returns {virtualDomElement} Reference to your component's backing instance + */ + render: function render(name, props, domNodeId) { + var componentObj = _ComponentRegistry2.default.get(name); + var reactElement = (0, _createReactElement2.default)({ + componentObj: componentObj, + props: props, + domNodeId: domNodeId, + }); + + // eslint-disable-next-line react/no-render-return-value + return _reactDom2.default.render(reactElement, document.getElementById(domNodeId)); + }, + + /** + * Get the component that you registered + * @param name + * @returns {name, component, generatorFunction, isRenderer} + */ + getComponent: function getComponent(name) { + return _ComponentRegistry2.default.get(name); + }, + + /** + * Used by server rendering by Rails + * @param options + */ + serverRenderReactComponent: function serverRenderReactComponent(options) { + return (0, _serverRenderReactComponent3.default)(options); + }, + + /** + * Used by Rails to catch errors in rendering + * @param options + */ + handleError: function handleError(options) { + return (0, _handleError3.default)(options); + }, + + /** + * Used by Rails server rendering to replay console messages. + */ + buildConsoleReplay: function buildConsoleReplay() { + return (0, _buildConsoleReplay3.default)(); + }, + + /** + * Get an Object containing all registered components. Useful for debugging. + * @returns {*} + */ + registeredComponents: function registeredComponents() { + return _ComponentRegistry2.default.components(); + }, + + /** + * Get an Object containing all registered store generators. Useful for debugging. + * @returns {*} + */ + storeGenerators: function storeGenerators() { + return _StoreRegistry2.default.storeGenerators(); + }, + + /** + * Get an Object containing all hydrated stores. Useful for debugging. + * @returns {*} + */ + stores: function stores() { + return _StoreRegistry2.default.stores(); + }, + resetOptions: function resetOptions() { + this.options = (0, _assign2.default)({}, DEFAULT_OPTIONS); + }, + }; + + ctx.ReactOnRails.resetOptions(); + + ClientStartup.clientStartup(ctx); + + exports.default = ctx.ReactOnRails; + + /***/ + }, + /* 103 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + + var _typeof = + typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' + ? function (obj) { + return typeof obj; + } + : function (obj) { + return obj && typeof Symbol === 'function' && obj.constructor === Symbol + ? 'symbol' + : typeof obj; + }; + + var _react = __webpack_require__(1); + + var _react2 = _interopRequireDefault(_react); + + var _createChainableTypeChecker = __webpack_require__(342); + + var _createChainableTypeChecker2 = _interopRequireDefault(_createChainableTypeChecker); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + function elementType(props, propName, componentName, location, propFullName) { + var propValue = props[propName]; + var propType = typeof propValue === 'undefined' ? 'undefined' : _typeof(propValue); + + if (_react2.default.isValidElement(propValue)) { + return new Error( + 'Invalid ' + + location + + ' `' + + propFullName + + '` of type ReactElement ' + + ('supplied to `' + componentName + '`, expected an element type (a string ') + + 'or a ReactClass).', + ); + } + + if (propType !== 'function' && propType !== 'string') { + return new Error( + 'Invalid ' + + location + + ' `' + + propFullName + + '` of value `' + + propValue + + '` ' + + ('supplied to `' + componentName + '`, expected an element type (a string ') + + 'or a ReactClass).', + ); + } + + return null; + } + + exports.default = (0, _createChainableTypeChecker2.default)(elementType); + + /***/ + }, + /* 104 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + exports.connect = exports.Provider = undefined; + + var _Provider = __webpack_require__(794); + + var _Provider2 = _interopRequireDefault(_Provider); + + var _connect = __webpack_require__(795); + + var _connect2 = _interopRequireDefault(_connect); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + exports.Provider = _Provider2['default']; + exports.connect = _connect2['default']; + + /***/ + }, + /* 105 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant__ = __webpack_require__(16); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_invariant__, + ); + /* unused harmony export compilePattern */ + /* harmony export (immutable) */ __webpack_exports__['c'] = matchPattern; + /* harmony export (immutable) */ __webpack_exports__['b'] = getParamNames; + /* unused harmony export getParams */ + /* harmony export (immutable) */ __webpack_exports__['a'] = formatPattern; + + function escapeRegExp(string) { + return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); + } + + function _compilePattern(pattern) { + var regexpSource = ''; + var paramNames = []; + var tokens = []; + + var match = void 0, + lastIndex = 0, + matcher = /:([a-zA-Z_$][a-zA-Z0-9_$]*)|\*\*|\*|\(|\)|\\\(|\\\)/g; + while ((match = matcher.exec(pattern))) { + if (match.index !== lastIndex) { + tokens.push(pattern.slice(lastIndex, match.index)); + regexpSource += escapeRegExp(pattern.slice(lastIndex, match.index)); + } + + if (match[1]) { + regexpSource += '([^/]+)'; + paramNames.push(match[1]); + } else if (match[0] === '**') { + regexpSource += '(.*)'; + paramNames.push('splat'); + } else if (match[0] === '*') { + regexpSource += '(.*?)'; + paramNames.push('splat'); + } else if (match[0] === '(') { + regexpSource += '(?:'; + } else if (match[0] === ')') { + regexpSource += ')?'; + } else if (match[0] === '\\(') { + regexpSource += '\\('; + } else if (match[0] === '\\)') { + regexpSource += '\\)'; + } + + tokens.push(match[0]); + + lastIndex = matcher.lastIndex; + } + + if (lastIndex !== pattern.length) { + tokens.push(pattern.slice(lastIndex, pattern.length)); + regexpSource += escapeRegExp(pattern.slice(lastIndex, pattern.length)); + } + + return { + pattern: pattern, + regexpSource: regexpSource, + paramNames: paramNames, + tokens: tokens, + }; + } + + var CompiledPatternsCache = Object.create(null); + + function compilePattern(pattern) { + if (!CompiledPatternsCache[pattern]) CompiledPatternsCache[pattern] = _compilePattern(pattern); + + return CompiledPatternsCache[pattern]; + } + + /** + * Attempts to match a pattern on the given pathname. Patterns may use + * the following special characters: + * + * - :paramName Matches a URL segment up to the next /, ?, or #. The + * captured string is considered a "param" + * - () Wraps a segment of the URL that is optional + * - * Consumes (non-greedy) all characters up to the next + * character in the pattern, or to the end of the URL if + * there is none + * - ** Consumes (greedy) all characters up to the next character + * in the pattern, or to the end of the URL if there is none + * + * The function calls callback(error, matched) when finished. + * The return value is an object with the following properties: + * + * - remainingPathname + * - paramNames + * - paramValues + */ + function matchPattern(pattern, pathname) { + // Ensure pattern starts with leading slash for consistency with pathname. + if (pattern.charAt(0) !== '/') { + pattern = '/' + pattern; + } + + var _compilePattern2 = compilePattern(pattern), + regexpSource = _compilePattern2.regexpSource, + paramNames = _compilePattern2.paramNames, + tokens = _compilePattern2.tokens; + + if (pattern.charAt(pattern.length - 1) !== '/') { + regexpSource += '/?'; // Allow optional path separator at end. + } + + // Special-case patterns like '*' for catch-all routes. + if (tokens[tokens.length - 1] === '*') { + regexpSource += '$'; + } + + var match = pathname.match(new RegExp('^' + regexpSource, 'i')); + if (match == null) { + return null; + } + + var matchedPath = match[0]; + var remainingPathname = pathname.substr(matchedPath.length); + + if (remainingPathname) { + // Require that the match ends at a path separator, if we didn't match + // the full path, so any remaining pathname is a new path segment. + if (matchedPath.charAt(matchedPath.length - 1) !== '/') { + return null; + } + + // If there is a remaining pathname, treat the path separator as part of + // the remaining pathname for properly continuing the match. + remainingPathname = '/' + remainingPathname; + } + + return { + remainingPathname: remainingPathname, + paramNames: paramNames, + paramValues: match.slice(1).map(function (v) { + return v && decodeURIComponent(v); + }), + }; + } + + function getParamNames(pattern) { + return compilePattern(pattern).paramNames; + } + + function getParams(pattern, pathname) { + var match = matchPattern(pattern, pathname); + if (!match) { + return null; + } + + var paramNames = match.paramNames, + paramValues = match.paramValues; + + var params = {}; + + paramNames.forEach(function (paramName, index) { + params[paramName] = paramValues[index]; + }); + + return params; + } + + /** + * Returns a version of the given pattern with params interpolated. Throws + * if there is a dynamic segment of the pattern for which there is no param. + */ + function formatPattern(pattern, params) { + params = params || {}; + + var _compilePattern3 = compilePattern(pattern), + tokens = _compilePattern3.tokens; + + var parenCount = 0, + pathname = '', + splatIndex = 0, + parenHistory = []; + + var token = void 0, + paramName = void 0, + paramValue = void 0; + for (var i = 0, len = tokens.length; i < len; ++i) { + token = tokens[i]; + + if (token === '*' || token === '**') { + paramValue = Array.isArray(params.splat) ? params.splat[splatIndex++] : params.splat; + + !(paramValue != null || parenCount > 0) + ? true + ? __WEBPACK_IMPORTED_MODULE_0_invariant___default()( + false, + 'Missing splat #%s for path "%s"', + splatIndex, + pattern, + ) + : invariant(false) + : void 0; + + if (paramValue != null) pathname += encodeURI(paramValue); + } else if (token === '(') { + parenHistory[parenCount] = ''; + parenCount += 1; + } else if (token === ')') { + var parenText = parenHistory.pop(); + parenCount -= 1; + + if (parenCount) parenHistory[parenCount - 1] += parenText; + else pathname += parenText; + } else if (token === '\\(') { + pathname += '('; + } else if (token === '\\)') { + pathname += ')'; + } else if (token.charAt(0) === ':') { + paramName = token.substring(1); + paramValue = params[paramName]; + + !(paramValue != null || parenCount > 0) + ? true + ? __WEBPACK_IMPORTED_MODULE_0_invariant___default()( + false, + 'Missing "%s" parameter for path "%s"', + paramName, + pattern, + ) + : invariant(false) + : void 0; + + if (paramValue == null) { + if (parenCount) { + parenHistory[parenCount - 1] = ''; + + var curTokenIdx = tokens.indexOf(token); + var tokensSubset = tokens.slice(curTokenIdx, tokens.length); + var nextParenIdx = -1; + + for (var _i = 0; _i < tokensSubset.length; _i++) { + if (tokensSubset[_i] == ')') { + nextParenIdx = _i; + break; + } + } + + !(nextParenIdx > 0) + ? true + ? __WEBPACK_IMPORTED_MODULE_0_invariant___default()( + false, + 'Path "%s" is missing end paren at segment "%s"', + pattern, + tokensSubset.join(''), + ) + : invariant(false) + : void 0; + + // jump to ending paren + i = curTokenIdx + nextParenIdx - 1; + } + } else if (parenCount) parenHistory[parenCount - 1] += encodeURIComponent(paramValue); + else pathname += encodeURIComponent(paramValue); + } else { + if (parenCount) parenHistory[parenCount - 1] += token; + else pathname += token; + } + } + + !(parenCount <= 0) + ? true + ? __WEBPACK_IMPORTED_MODULE_0_invariant___default()( + false, + 'Path "%s" is missing end paren', + pattern, + ) + : invariant(false) + : void 0; + + return pathname.replace(/\/+/g, '/'); + } + + /***/ + }, + /* 106 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(47); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_warning__, + ); + /* harmony export (immutable) */ __webpack_exports__['a'] = routerWarning; + /* unused harmony export _resetWarned */ + + var warned = {}; + + function routerWarning(falseToWarn, message) { + // Only issue deprecation warnings once. + if (message.indexOf('deprecated') !== -1) { + if (warned[message]) { + return; + } + + warned[message] = true; + } + + message = '[react-router] ' + message; + + for ( + var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; + _key < _len; + _key++ + ) { + args[_key - 2] = arguments[_key]; + } + + __WEBPACK_IMPORTED_MODULE_0_warning___default.a.apply(undefined, [falseToWarn, message].concat(args)); + } + + function _resetWarned() { + warned = {}; + } + + /***/ + }, + /* 107 */ + /***/ function (module, exports) { + module.exports = {}; + + /***/ + }, + /* 108 */ + /***/ function (module, exports) { + exports.f = {}.propertyIsEnumerable; + + /***/ + }, + /* 109 */ + /***/ function (module, exports) { + module.exports = function (bitmap, value) { + return { + enumerable: !(bitmap & 1), + configurable: !(bitmap & 2), + writable: !(bitmap & 4), + value: value, + }; + }; + + /***/ + }, + /* 110 */ + /***/ function (module, exports, __webpack_require__) { + // 7.1.13 ToObject(argument) + var defined = __webpack_require__(121); + module.exports = function (it) { + return Object(defined(it)); + }; + + /***/ + }, + /* 111 */ + /***/ function (module, exports, __webpack_require__) { + // getting tag from 19.1.3.6 Object.prototype.toString() + var cof = __webpack_require__(43), + TAG = __webpack_require__(10)('toStringTag'), + // ES3 wrong here + ARG = + cof( + (function () { + return arguments; + })(), + ) == 'Arguments'; + + // fallback for IE11 Script Access Denied error + var tryGet = function (it, key) { + try { + return it[key]; + } catch (e) { + /* empty */ + } + }; + + module.exports = function (it) { + var O, T, B; + return it === undefined + ? 'Undefined' + : it === null + ? 'Null' + : // @@toStringTag case + typeof (T = tryGet((O = Object(it)), TAG)) == 'string' + ? T + : // builtinTag case + ARG + ? cof(O) + : // ES3 arguments fallback + (B = cof(O)) == 'Object' && typeof O.callee == 'function' + ? 'Arguments' + : B; + }; + + /***/ + }, + /* 112 */ + /***/ function (module, exports, __webpack_require__) { + // fallback for non-array-like ES3 and non-enumerable old V8 strings + var cof = __webpack_require__(43); + module.exports = Object('z').propertyIsEnumerable(0) + ? Object + : function (it) { + return cof(it) == 'String' ? it.split('') : Object(it); + }; + + /***/ + }, + /* 113 */ + /***/ function (module, exports) { + exports.f = {}.propertyIsEnumerable; + + /***/ + }, + /* 114 */ + /***/ function (module, exports, __webpack_require__) { + /* WEBPACK VAR INJECTION */ (function (global, module) { + var __WEBPACK_AMD_DEFINE_RESULT__; /** + * @license + * Lodash <https://lodash.com/> + * Copyright JS Foundation and other contributors <https://js.foundation/> + * Released under MIT license <https://lodash.com/license> + * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ + (function () { + /** Used as a safe reference for `undefined` in pre-ES5 environments. */ + var undefined; + + /** Used as the semantic version number. */ + var VERSION = '4.17.4'; + + /** Used as the size to enable large array optimizations. */ + var LARGE_ARRAY_SIZE = 200; + + /** Error message constants. */ + var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.', + FUNC_ERROR_TEXT = 'Expected a function'; + + /** Used to stand-in for `undefined` hash values. */ + var HASH_UNDEFINED = '__lodash_hash_undefined__'; + + /** Used as the maximum memoize cache size. */ + var MAX_MEMOIZE_SIZE = 500; + + /** Used as the internal argument placeholder. */ + var PLACEHOLDER = '__lodash_placeholder__'; + + /** Used to compose bitmasks for cloning. */ + var CLONE_DEEP_FLAG = 1, + CLONE_FLAT_FLAG = 2, + CLONE_SYMBOLS_FLAG = 4; + + /** Used to compose bitmasks for value comparisons. */ + var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; + + /** Used to compose bitmasks for function metadata. */ + var WRAP_BIND_FLAG = 1, + WRAP_BIND_KEY_FLAG = 2, + WRAP_CURRY_BOUND_FLAG = 4, + WRAP_CURRY_FLAG = 8, + WRAP_CURRY_RIGHT_FLAG = 16, + WRAP_PARTIAL_FLAG = 32, + WRAP_PARTIAL_RIGHT_FLAG = 64, + WRAP_ARY_FLAG = 128, + WRAP_REARG_FLAG = 256, + WRAP_FLIP_FLAG = 512; + + /** Used as default options for `_.truncate`. */ + var DEFAULT_TRUNC_LENGTH = 30, + DEFAULT_TRUNC_OMISSION = '...'; + + /** Used to detect hot functions by number of calls within a span of milliseconds. */ + var HOT_COUNT = 800, + HOT_SPAN = 16; + + /** Used to indicate the type of lazy iteratees. */ + var LAZY_FILTER_FLAG = 1, + LAZY_MAP_FLAG = 2, + LAZY_WHILE_FLAG = 3; + + /** Used as references for various `Number` constants. */ + var INFINITY = 1 / 0, + MAX_SAFE_INTEGER = 9007199254740991, + MAX_INTEGER = 1.7976931348623157e308, + NAN = 0 / 0; + + /** Used as references for the maximum length and index of an array. */ + var MAX_ARRAY_LENGTH = 4294967295, + MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1, + HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1; + + /** Used to associate wrap methods with their bit flags. */ + var wrapFlags = [ + ['ary', WRAP_ARY_FLAG], + ['bind', WRAP_BIND_FLAG], + ['bindKey', WRAP_BIND_KEY_FLAG], + ['curry', WRAP_CURRY_FLAG], + ['curryRight', WRAP_CURRY_RIGHT_FLAG], + ['flip', WRAP_FLIP_FLAG], + ['partial', WRAP_PARTIAL_FLAG], + ['partialRight', WRAP_PARTIAL_RIGHT_FLAG], + ['rearg', WRAP_REARG_FLAG], + ]; + + /** `Object#toString` result references. */ + var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + asyncTag = '[object AsyncFunction]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + domExcTag = '[object DOMException]', + errorTag = '[object Error]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + mapTag = '[object Map]', + numberTag = '[object Number]', + nullTag = '[object Null]', + objectTag = '[object Object]', + promiseTag = '[object Promise]', + proxyTag = '[object Proxy]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]', + undefinedTag = '[object Undefined]', + weakMapTag = '[object WeakMap]', + weakSetTag = '[object WeakSet]'; + + var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + + /** Used to match empty string literals in compiled template source. */ + var reEmptyStringLeading = /\b__p \+= '';/g, + reEmptyStringMiddle = /\b(__p \+=) '' \+/g, + reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g; + + /** Used to match HTML entities and HTML characters. */ + var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g, + reUnescapedHtml = /[&<>"']/g, + reHasEscapedHtml = RegExp(reEscapedHtml.source), + reHasUnescapedHtml = RegExp(reUnescapedHtml.source); + + /** Used to match template delimiters. */ + var reEscape = /<%-([\s\S]+?)%>/g, + reEvaluate = /<%([\s\S]+?)%>/g, + reInterpolate = /<%=([\s\S]+?)%>/g; + + /** Used to match property names within property paths. */ + var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, + reIsPlainProp = /^\w*$/, + reLeadingDot = /^\./, + rePropName = + /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; + + /** + * Used to match `RegExp` + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). + */ + var reRegExpChar = /[\\^$.*+?()[\]{}|]/g, + reHasRegExpChar = RegExp(reRegExpChar.source); + + /** Used to match leading and trailing whitespace. */ + var reTrim = /^\s+|\s+$/g, + reTrimStart = /^\s+/, + reTrimEnd = /\s+$/; + + /** Used to match wrap detail comments. */ + var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, + reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/, + reSplitDetails = /,? & /; + + /** Used to match words composed of alphanumeric characters. */ + var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g; + + /** Used to match backslashes in property paths. */ + var reEscapeChar = /\\(\\)?/g; + + /** + * Used to match + * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components). + */ + var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g; + + /** Used to match `RegExp` flags from their coerced string values. */ + var reFlags = /\w*$/; + + /** Used to detect bad signed hexadecimal string values. */ + var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; + + /** Used to detect binary string values. */ + var reIsBinary = /^0b[01]+$/i; + + /** Used to detect host constructors (Safari). */ + var reIsHostCtor = /^\[object .+?Constructor\]$/; + + /** Used to detect octal string values. */ + var reIsOctal = /^0o[0-7]+$/i; + + /** Used to detect unsigned integer values. */ + var reIsUint = /^(?:0|[1-9]\d*)$/; + + /** Used to match Latin Unicode letters (excluding mathematical operators). */ + var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g; + + /** Used to ensure capturing order of template delimiters. */ + var reNoMatch = /($^)/; + + /** Used to match unescaped characters in compiled string literals. */ + var reUnescapedString = /['\n\r\u2028\u2029\\]/g; + + /** Used to compose unicode character classes. */ + var rsAstralRange = '\\ud800-\\udfff', + rsComboMarksRange = '\\u0300-\\u036f', + reComboHalfMarksRange = '\\ufe20-\\ufe2f', + rsComboSymbolsRange = '\\u20d0-\\u20ff', + rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, + rsDingbatRange = '\\u2700-\\u27bf', + rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff', + rsMathOpRange = '\\xac\\xb1\\xd7\\xf7', + rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf', + rsPunctuationRange = '\\u2000-\\u206f', + rsSpaceRange = + ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000', + rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde', + rsVarRange = '\\ufe0e\\ufe0f', + rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange; + + /** Used to compose unicode capture groups. */ + var rsApos = "['\u2019]", + rsAstral = '[' + rsAstralRange + ']', + rsBreak = '[' + rsBreakRange + ']', + rsCombo = '[' + rsComboRange + ']', + rsDigits = '\\d+', + rsDingbat = '[' + rsDingbatRange + ']', + rsLower = '[' + rsLowerRange + ']', + rsMisc = + '[^' + + rsAstralRange + + rsBreakRange + + rsDigits + + rsDingbatRange + + rsLowerRange + + rsUpperRange + + ']', + rsFitz = '\\ud83c[\\udffb-\\udfff]', + rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', + rsNonAstral = '[^' + rsAstralRange + ']', + rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', + rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', + rsUpper = '[' + rsUpperRange + ']', + rsZWJ = '\\u200d'; + + /** Used to compose unicode regexes. */ + var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')', + rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')', + rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?', + rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?', + reOptMod = rsModifier + '?', + rsOptVar = '[' + rsVarRange + ']?', + rsOptJoin = + '(?:' + + rsZWJ + + '(?:' + + [rsNonAstral, rsRegional, rsSurrPair].join('|') + + ')' + + rsOptVar + + reOptMod + + ')*', + rsOrdLower = '\\d*(?:(?:1st|2nd|3rd|(?![123])\\dth)\\b)', + rsOrdUpper = '\\d*(?:(?:1ST|2ND|3RD|(?![123])\\dTH)\\b)', + rsSeq = rsOptVar + reOptMod + rsOptJoin, + rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq, + rsSymbol = + '(?:' + + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + + ')'; + + /** Used to match apostrophes. */ + var reApos = RegExp(rsApos, 'g'); + + /** + * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and + * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols). + */ + var reComboMark = RegExp(rsCombo, 'g'); + + /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ + var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); + + /** Used to match complex or compound words. */ + var reUnicodeWord = RegExp( + [ + rsUpper + + '?' + + rsLower + + '+' + + rsOptContrLower + + '(?=' + + [rsBreak, rsUpper, '$'].join('|') + + ')', + rsMiscUpper + + '+' + + rsOptContrUpper + + '(?=' + + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + + ')', + rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower, + rsUpper + '+' + rsOptContrUpper, + rsOrdUpper, + rsOrdLower, + rsDigits, + rsEmoji, + ].join('|'), + 'g', + ); + + /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */ + var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']'); + + /** Used to detect strings that need a more robust regexp to match words. */ + var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/; + + /** Used to assign default `context` object properties. */ + var contextProps = [ + 'Array', + 'Buffer', + 'DataView', + 'Date', + 'Error', + 'Float32Array', + 'Float64Array', + 'Function', + 'Int8Array', + 'Int16Array', + 'Int32Array', + 'Map', + 'Math', + 'Object', + 'Promise', + 'RegExp', + 'Set', + 'String', + 'Symbol', + 'TypeError', + 'Uint8Array', + 'Uint8ClampedArray', + 'Uint16Array', + 'Uint32Array', + 'WeakMap', + '_', + 'clearTimeout', + 'isFinite', + 'parseInt', + 'setTimeout', + ]; + + /** Used to make template sourceURLs easier to identify. */ + var templateCounter = -1; + + /** Used to identify `toStringTag` values of typed arrays. */ + var typedArrayTags = {}; + typedArrayTags[float32Tag] = + typedArrayTags[float64Tag] = + typedArrayTags[int8Tag] = + typedArrayTags[int16Tag] = + typedArrayTags[int32Tag] = + typedArrayTags[uint8Tag] = + typedArrayTags[uint8ClampedTag] = + typedArrayTags[uint16Tag] = + typedArrayTags[uint32Tag] = + true; + typedArrayTags[argsTag] = + typedArrayTags[arrayTag] = + typedArrayTags[arrayBufferTag] = + typedArrayTags[boolTag] = + typedArrayTags[dataViewTag] = + typedArrayTags[dateTag] = + typedArrayTags[errorTag] = + typedArrayTags[funcTag] = + typedArrayTags[mapTag] = + typedArrayTags[numberTag] = + typedArrayTags[objectTag] = + typedArrayTags[regexpTag] = + typedArrayTags[setTag] = + typedArrayTags[stringTag] = + typedArrayTags[weakMapTag] = + false; + + /** Used to identify `toStringTag` values supported by `_.clone`. */ + var cloneableTags = {}; + cloneableTags[argsTag] = + cloneableTags[arrayTag] = + cloneableTags[arrayBufferTag] = + cloneableTags[dataViewTag] = + cloneableTags[boolTag] = + cloneableTags[dateTag] = + cloneableTags[float32Tag] = + cloneableTags[float64Tag] = + cloneableTags[int8Tag] = + cloneableTags[int16Tag] = + cloneableTags[int32Tag] = + cloneableTags[mapTag] = + cloneableTags[numberTag] = + cloneableTags[objectTag] = + cloneableTags[regexpTag] = + cloneableTags[setTag] = + cloneableTags[stringTag] = + cloneableTags[symbolTag] = + cloneableTags[uint8Tag] = + cloneableTags[uint8ClampedTag] = + cloneableTags[uint16Tag] = + cloneableTags[uint32Tag] = + true; + cloneableTags[errorTag] = cloneableTags[funcTag] = cloneableTags[weakMapTag] = false; + + /** Used to map Latin Unicode letters to basic Latin letters. */ + var deburredLetters = { + // Latin-1 Supplement block. + '\xc0': 'A', + '\xc1': 'A', + '\xc2': 'A', + '\xc3': 'A', + '\xc4': 'A', + '\xc5': 'A', + '\xe0': 'a', + '\xe1': 'a', + '\xe2': 'a', + '\xe3': 'a', + '\xe4': 'a', + '\xe5': 'a', + '\xc7': 'C', + '\xe7': 'c', + '\xd0': 'D', + '\xf0': 'd', + '\xc8': 'E', + '\xc9': 'E', + '\xca': 'E', + '\xcb': 'E', + '\xe8': 'e', + '\xe9': 'e', + '\xea': 'e', + '\xeb': 'e', + '\xcc': 'I', + '\xcd': 'I', + '\xce': 'I', + '\xcf': 'I', + '\xec': 'i', + '\xed': 'i', + '\xee': 'i', + '\xef': 'i', + '\xd1': 'N', + '\xf1': 'n', + '\xd2': 'O', + '\xd3': 'O', + '\xd4': 'O', + '\xd5': 'O', + '\xd6': 'O', + '\xd8': 'O', + '\xf2': 'o', + '\xf3': 'o', + '\xf4': 'o', + '\xf5': 'o', + '\xf6': 'o', + '\xf8': 'o', + '\xd9': 'U', + '\xda': 'U', + '\xdb': 'U', + '\xdc': 'U', + '\xf9': 'u', + '\xfa': 'u', + '\xfb': 'u', + '\xfc': 'u', + '\xdd': 'Y', + '\xfd': 'y', + '\xff': 'y', + '\xc6': 'Ae', + '\xe6': 'ae', + '\xde': 'Th', + '\xfe': 'th', + '\xdf': 'ss', + // Latin Extended-A block. + '\u0100': 'A', + '\u0102': 'A', + '\u0104': 'A', + '\u0101': 'a', + '\u0103': 'a', + '\u0105': 'a', + '\u0106': 'C', + '\u0108': 'C', + '\u010a': 'C', + '\u010c': 'C', + '\u0107': 'c', + '\u0109': 'c', + '\u010b': 'c', + '\u010d': 'c', + '\u010e': 'D', + '\u0110': 'D', + '\u010f': 'd', + '\u0111': 'd', + '\u0112': 'E', + '\u0114': 'E', + '\u0116': 'E', + '\u0118': 'E', + '\u011a': 'E', + '\u0113': 'e', + '\u0115': 'e', + '\u0117': 'e', + '\u0119': 'e', + '\u011b': 'e', + '\u011c': 'G', + '\u011e': 'G', + '\u0120': 'G', + '\u0122': 'G', + '\u011d': 'g', + '\u011f': 'g', + '\u0121': 'g', + '\u0123': 'g', + '\u0124': 'H', + '\u0126': 'H', + '\u0125': 'h', + '\u0127': 'h', + '\u0128': 'I', + '\u012a': 'I', + '\u012c': 'I', + '\u012e': 'I', + '\u0130': 'I', + '\u0129': 'i', + '\u012b': 'i', + '\u012d': 'i', + '\u012f': 'i', + '\u0131': 'i', + '\u0134': 'J', + '\u0135': 'j', + '\u0136': 'K', + '\u0137': 'k', + '\u0138': 'k', + '\u0139': 'L', + '\u013b': 'L', + '\u013d': 'L', + '\u013f': 'L', + '\u0141': 'L', + '\u013a': 'l', + '\u013c': 'l', + '\u013e': 'l', + '\u0140': 'l', + '\u0142': 'l', + '\u0143': 'N', + '\u0145': 'N', + '\u0147': 'N', + '\u014a': 'N', + '\u0144': 'n', + '\u0146': 'n', + '\u0148': 'n', + '\u014b': 'n', + '\u014c': 'O', + '\u014e': 'O', + '\u0150': 'O', + '\u014d': 'o', + '\u014f': 'o', + '\u0151': 'o', + '\u0154': 'R', + '\u0156': 'R', + '\u0158': 'R', + '\u0155': 'r', + '\u0157': 'r', + '\u0159': 'r', + '\u015a': 'S', + '\u015c': 'S', + '\u015e': 'S', + '\u0160': 'S', + '\u015b': 's', + '\u015d': 's', + '\u015f': 's', + '\u0161': 's', + '\u0162': 'T', + '\u0164': 'T', + '\u0166': 'T', + '\u0163': 't', + '\u0165': 't', + '\u0167': 't', + '\u0168': 'U', + '\u016a': 'U', + '\u016c': 'U', + '\u016e': 'U', + '\u0170': 'U', + '\u0172': 'U', + '\u0169': 'u', + '\u016b': 'u', + '\u016d': 'u', + '\u016f': 'u', + '\u0171': 'u', + '\u0173': 'u', + '\u0174': 'W', + '\u0175': 'w', + '\u0176': 'Y', + '\u0177': 'y', + '\u0178': 'Y', + '\u0179': 'Z', + '\u017b': 'Z', + '\u017d': 'Z', + '\u017a': 'z', + '\u017c': 'z', + '\u017e': 'z', + '\u0132': 'IJ', + '\u0133': 'ij', + '\u0152': 'Oe', + '\u0153': 'oe', + '\u0149': "'n", + '\u017f': 's', + }; + + /** Used to map characters to HTML entities. */ + var htmlEscapes = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''', + }; + + /** Used to map HTML entities to characters. */ + var htmlUnescapes = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + ''': "'", + }; + + /** Used to escape characters for inclusion in compiled string literals. */ + var stringEscapes = { + '\\': '\\', + "'": "'", + '\n': 'n', + '\r': 'r', + '\u2028': 'u2028', + '\u2029': 'u2029', + }; + + /** Built-in method references without a dependency on `root`. */ + var freeParseFloat = parseFloat, + freeParseInt = parseInt; + + /** Detect free variable `global` from Node.js. */ + var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + + /** Detect free variable `self`. */ + var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + + /** Used as a reference to the global object. */ + var root = freeGlobal || freeSelf || Function('return this')(); + + /** Detect free variable `exports`. */ + var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; + + /** Detect free variable `module`. */ + var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + + /** Detect the popular CommonJS extension `module.exports`. */ + var moduleExports = freeModule && freeModule.exports === freeExports; + + /** Detect free variable `process` from Node.js. */ + var freeProcess = moduleExports && freeGlobal.process; + + /** Used to access faster Node.js helpers. */ + var nodeUtil = (function () { + try { + return freeProcess && freeProcess.binding && freeProcess.binding('util'); + } catch (e) {} + })(); + + /* Node.js helper references. */ + var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer, + nodeIsDate = nodeUtil && nodeUtil.isDate, + nodeIsMap = nodeUtil && nodeUtil.isMap, + nodeIsRegExp = nodeUtil && nodeUtil.isRegExp, + nodeIsSet = nodeUtil && nodeUtil.isSet, + nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; + + /*--------------------------------------------------------------------------*/ + + /** + * Adds the key-value `pair` to `map`. + * + * @private + * @param {Object} map The map to modify. + * @param {Array} pair The key-value pair to add. + * @returns {Object} Returns `map`. + */ + function addMapEntry(map, pair) { + // Don't return `map.set` because it's not chainable in IE 11. + map.set(pair[0], pair[1]); + return map; + } + + /** + * Adds `value` to `set`. + * + * @private + * @param {Object} set The set to modify. + * @param {*} value The value to add. + * @returns {Object} Returns `set`. + */ + function addSetEntry(set, value) { + // Don't return `set.add` because it's not chainable in IE 11. + set.add(value); + return set; + } + + /** + * A faster alternative to `Function#apply`, this function invokes `func` + * with the `this` binding of `thisArg` and the arguments of `args`. + * + * @private + * @param {Function} func The function to invoke. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} args The arguments to invoke `func` with. + * @returns {*} Returns the result of `func`. + */ + function apply(func, thisArg, args) { + switch (args.length) { + case 0: + return func.call(thisArg); + case 1: + return func.call(thisArg, args[0]); + case 2: + return func.call(thisArg, args[0], args[1]); + case 3: + return func.call(thisArg, args[0], args[1], args[2]); + } + return func.apply(thisArg, args); + } + + /** + * A specialized version of `baseAggregator` for arrays. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} setter The function to set `accumulator` values. + * @param {Function} iteratee The iteratee to transform keys. + * @param {Object} accumulator The initial aggregated object. + * @returns {Function} Returns `accumulator`. + */ + function arrayAggregator(array, setter, iteratee, accumulator) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + var value = array[index]; + setter(accumulator, value, iteratee(value), array); + } + return accumulator; + } + + /** + * A specialized version of `_.forEach` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ + function arrayEach(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (iteratee(array[index], index, array) === false) { + break; + } + } + return array; + } + + /** + * A specialized version of `_.forEachRight` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ + function arrayEachRight(array, iteratee) { + var length = array == null ? 0 : array.length; + + while (length--) { + if (iteratee(array[length], length, array) === false) { + break; + } + } + return array; + } + + /** + * A specialized version of `_.every` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false`. + */ + function arrayEvery(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (!predicate(array[index], index, array)) { + return false; + } + } + return true; + } + + /** + * A specialized version of `_.filter` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ + function arrayFilter(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result[resIndex++] = value; + } + } + return result; + } + + /** + * A specialized version of `_.includes` for arrays without support for + * specifying an index to search from. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ + function arrayIncludes(array, value) { + var length = array == null ? 0 : array.length; + return !!length && baseIndexOf(array, value, 0) > -1; + } + + /** + * This function is like `arrayIncludes` except that it accepts a comparator. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @param {Function} comparator The comparator invoked per element. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ + function arrayIncludesWith(array, value, comparator) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (comparator(value, array[index])) { + return true; + } + } + return false; + } + + /** + * A specialized version of `_.map` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ + function arrayMap(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length, + result = Array(length); + + while (++index < length) { + result[index] = iteratee(array[index], index, array); + } + return result; + } + + /** + * Appends the elements of `values` to `array`. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to append. + * @returns {Array} Returns `array`. + */ + function arrayPush(array, values) { + var index = -1, + length = values.length, + offset = array.length; + + while (++index < length) { + array[offset + index] = values[index]; + } + return array; + } + + /** + * A specialized version of `_.reduce` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {boolean} [initAccum] Specify using the first element of `array` as + * the initial value. + * @returns {*} Returns the accumulated value. + */ + function arrayReduce(array, iteratee, accumulator, initAccum) { + var index = -1, + length = array == null ? 0 : array.length; + + if (initAccum && length) { + accumulator = array[++index]; + } + while (++index < length) { + accumulator = iteratee(accumulator, array[index], index, array); + } + return accumulator; + } + + /** + * A specialized version of `_.reduceRight` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {boolean} [initAccum] Specify using the last element of `array` as + * the initial value. + * @returns {*} Returns the accumulated value. + */ + function arrayReduceRight(array, iteratee, accumulator, initAccum) { + var length = array == null ? 0 : array.length; + if (initAccum && length) { + accumulator = array[--length]; + } + while (length--) { + accumulator = iteratee(accumulator, array[length], length, array); + } + return accumulator; + } + + /** + * A specialized version of `_.some` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ + function arraySome(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (predicate(array[index], index, array)) { + return true; + } + } + return false; + } + + /** + * Gets the size of an ASCII `string`. + * + * @private + * @param {string} string The string inspect. + * @returns {number} Returns the string size. + */ + var asciiSize = baseProperty('length'); + + /** + * Converts an ASCII `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ + function asciiToArray(string) { + return string.split(''); + } + + /** + * Splits an ASCII `string` into an array of its words. + * + * @private + * @param {string} The string to inspect. + * @returns {Array} Returns the words of `string`. + */ + function asciiWords(string) { + return string.match(reAsciiWord) || []; + } + + /** + * The base implementation of methods like `_.findKey` and `_.findLastKey`, + * without support for iteratee shorthands, which iterates over `collection` + * using `eachFunc`. + * + * @private + * @param {Array|Object} collection The collection to inspect. + * @param {Function} predicate The function invoked per iteration. + * @param {Function} eachFunc The function to iterate over `collection`. + * @returns {*} Returns the found element or its key, else `undefined`. + */ + function baseFindKey(collection, predicate, eachFunc) { + var result; + eachFunc(collection, function (value, key, collection) { + if (predicate(value, key, collection)) { + result = key; + return false; + } + }); + return result; + } + + /** + * The base implementation of `_.findIndex` and `_.findLastIndex` without + * support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} predicate The function invoked per iteration. + * @param {number} fromIndex The index to search from. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function baseFindIndex(array, predicate, fromIndex, fromRight) { + var length = array.length, + index = fromIndex + (fromRight ? 1 : -1); + + while (fromRight ? index-- : ++index < length) { + if (predicate(array[index], index, array)) { + return index; + } + } + return -1; + } + + /** + * The base implementation of `_.indexOf` without `fromIndex` bounds checks. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function baseIndexOf(array, value, fromIndex) { + return value === value + ? strictIndexOf(array, value, fromIndex) + : baseFindIndex(array, baseIsNaN, fromIndex); + } + + /** + * This function is like `baseIndexOf` except that it accepts a comparator. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @param {Function} comparator The comparator invoked per element. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function baseIndexOfWith(array, value, fromIndex, comparator) { + var index = fromIndex - 1, + length = array.length; + + while (++index < length) { + if (comparator(array[index], value)) { + return index; + } + } + return -1; + } + + /** + * The base implementation of `_.isNaN` without support for number objects. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + */ + function baseIsNaN(value) { + return value !== value; + } + + /** + * The base implementation of `_.mean` and `_.meanBy` without support for + * iteratee shorthands. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {number} Returns the mean. + */ + function baseMean(array, iteratee) { + var length = array == null ? 0 : array.length; + return length ? baseSum(array, iteratee) / length : NAN; + } + + /** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new accessor function. + */ + function baseProperty(key) { + return function (object) { + return object == null ? undefined : object[key]; + }; + } + + /** + * The base implementation of `_.propertyOf` without support for deep paths. + * + * @private + * @param {Object} object The object to query. + * @returns {Function} Returns the new accessor function. + */ + function basePropertyOf(object) { + return function (key) { + return object == null ? undefined : object[key]; + }; + } + + /** + * The base implementation of `_.reduce` and `_.reduceRight`, without support + * for iteratee shorthands, which iterates over `collection` using `eachFunc`. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} accumulator The initial value. + * @param {boolean} initAccum Specify using the first or last element of + * `collection` as the initial value. + * @param {Function} eachFunc The function to iterate over `collection`. + * @returns {*} Returns the accumulated value. + */ + function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) { + eachFunc(collection, function (value, index, collection) { + accumulator = initAccum + ? ((initAccum = false), value) + : iteratee(accumulator, value, index, collection); + }); + return accumulator; + } + + /** + * The base implementation of `_.sortBy` which uses `comparer` to define the + * sort order of `array` and replaces criteria objects with their corresponding + * values. + * + * @private + * @param {Array} array The array to sort. + * @param {Function} comparer The function to define sort order. + * @returns {Array} Returns `array`. + */ + function baseSortBy(array, comparer) { + var length = array.length; + + array.sort(comparer); + while (length--) { + array[length] = array[length].value; + } + return array; + } + + /** + * The base implementation of `_.sum` and `_.sumBy` without support for + * iteratee shorthands. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {number} Returns the sum. + */ + function baseSum(array, iteratee) { + var result, + index = -1, + length = array.length; + + while (++index < length) { + var current = iteratee(array[index]); + if (current !== undefined) { + result = result === undefined ? current : result + current; + } + } + return result; + } + + /** + * The base implementation of `_.times` without support for iteratee shorthands + * or max array length checks. + * + * @private + * @param {number} n The number of times to invoke `iteratee`. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the array of results. + */ + function baseTimes(n, iteratee) { + var index = -1, + result = Array(n); + + while (++index < n) { + result[index] = iteratee(index); + } + return result; + } + + /** + * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array + * of key-value pairs for `object` corresponding to the property names of `props`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} props The property names to get values for. + * @returns {Object} Returns the key-value pairs. + */ + function baseToPairs(object, props) { + return arrayMap(props, function (key) { + return [key, object[key]]; + }); + } + + /** + * The base implementation of `_.unary` without support for storing metadata. + * + * @private + * @param {Function} func The function to cap arguments for. + * @returns {Function} Returns the new capped function. + */ + function baseUnary(func) { + return function (value) { + return func(value); + }; + } + + /** + * The base implementation of `_.values` and `_.valuesIn` which creates an + * array of `object` property values corresponding to the property names + * of `props`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} props The property names to get values for. + * @returns {Object} Returns the array of property values. + */ + function baseValues(object, props) { + return arrayMap(props, function (key) { + return object[key]; + }); + } + + /** + * Checks if a `cache` value for `key` exists. + * + * @private + * @param {Object} cache The cache to query. + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function cacheHas(cache, key) { + return cache.has(key); + } + + /** + * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol + * that is not found in the character symbols. + * + * @private + * @param {Array} strSymbols The string symbols to inspect. + * @param {Array} chrSymbols The character symbols to find. + * @returns {number} Returns the index of the first unmatched string symbol. + */ + function charsStartIndex(strSymbols, chrSymbols) { + var index = -1, + length = strSymbols.length; + + while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} + return index; + } + + /** + * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol + * that is not found in the character symbols. + * + * @private + * @param {Array} strSymbols The string symbols to inspect. + * @param {Array} chrSymbols The character symbols to find. + * @returns {number} Returns the index of the last unmatched string symbol. + */ + function charsEndIndex(strSymbols, chrSymbols) { + var index = strSymbols.length; + + while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} + return index; + } + + /** + * Gets the number of `placeholder` occurrences in `array`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} placeholder The placeholder to search for. + * @returns {number} Returns the placeholder count. + */ + function countHolders(array, placeholder) { + var length = array.length, + result = 0; + + while (length--) { + if (array[length] === placeholder) { + ++result; + } + } + return result; + } + + /** + * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A + * letters to basic Latin letters. + * + * @private + * @param {string} letter The matched letter to deburr. + * @returns {string} Returns the deburred letter. + */ + var deburrLetter = basePropertyOf(deburredLetters); + + /** + * Used by `_.escape` to convert characters to HTML entities. + * + * @private + * @param {string} chr The matched character to escape. + * @returns {string} Returns the escaped character. + */ + var escapeHtmlChar = basePropertyOf(htmlEscapes); + + /** + * Used by `_.template` to escape characters for inclusion in compiled string literals. + * + * @private + * @param {string} chr The matched character to escape. + * @returns {string} Returns the escaped character. + */ + function escapeStringChar(chr) { + return '\\' + stringEscapes[chr]; + } + + /** + * Gets the value at `key` of `object`. + * + * @private + * @param {Object} [object] The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ + function getValue(object, key) { + return object == null ? undefined : object[key]; + } + + /** + * Checks if `string` contains Unicode symbols. + * + * @private + * @param {string} string The string to inspect. + * @returns {boolean} Returns `true` if a symbol is found, else `false`. + */ + function hasUnicode(string) { + return reHasUnicode.test(string); + } + + /** + * Checks if `string` contains a word composed of Unicode symbols. + * + * @private + * @param {string} string The string to inspect. + * @returns {boolean} Returns `true` if a word is found, else `false`. + */ + function hasUnicodeWord(string) { + return reHasUnicodeWord.test(string); + } + + /** + * Converts `iterator` to an array. + * + * @private + * @param {Object} iterator The iterator to convert. + * @returns {Array} Returns the converted array. + */ + function iteratorToArray(iterator) { + var data, + result = []; + + while (!(data = iterator.next()).done) { + result.push(data.value); + } + return result; + } + + /** + * Converts `map` to its key-value pairs. + * + * @private + * @param {Object} map The map to convert. + * @returns {Array} Returns the key-value pairs. + */ + function mapToArray(map) { + var index = -1, + result = Array(map.size); + + map.forEach(function (value, key) { + result[++index] = [key, value]; + }); + return result; + } + + /** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ + function overArg(func, transform) { + return function (arg) { + return func(transform(arg)); + }; + } + + /** + * Replaces all `placeholder` elements in `array` with an internal placeholder + * and returns an array of their indexes. + * + * @private + * @param {Array} array The array to modify. + * @param {*} placeholder The placeholder to replace. + * @returns {Array} Returns the new array of placeholder indexes. + */ + function replaceHolders(array, placeholder) { + var index = -1, + length = array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (value === placeholder || value === PLACEHOLDER) { + array[index] = PLACEHOLDER; + result[resIndex++] = index; + } + } + return result; + } + + /** + * Converts `set` to an array of its values. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the values. + */ + function setToArray(set) { + var index = -1, + result = Array(set.size); + + set.forEach(function (value) { + result[++index] = value; + }); + return result; + } + + /** + * Converts `set` to its value-value pairs. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the value-value pairs. + */ + function setToPairs(set) { + var index = -1, + result = Array(set.size); + + set.forEach(function (value) { + result[++index] = [value, value]; + }); + return result; + } + + /** + * A specialized version of `_.indexOf` which performs strict equality + * comparisons of values, i.e. `===`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function strictIndexOf(array, value, fromIndex) { + var index = fromIndex - 1, + length = array.length; + + while (++index < length) { + if (array[index] === value) { + return index; + } + } + return -1; + } + + /** + * A specialized version of `_.lastIndexOf` which performs strict equality + * comparisons of values, i.e. `===`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function strictLastIndexOf(array, value, fromIndex) { + var index = fromIndex + 1; + while (index--) { + if (array[index] === value) { + return index; + } + } + return index; + } + + /** + * Gets the number of symbols in `string`. + * + * @private + * @param {string} string The string to inspect. + * @returns {number} Returns the string size. + */ + function stringSize(string) { + return hasUnicode(string) ? unicodeSize(string) : asciiSize(string); + } + + /** + * Converts `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ + function stringToArray(string) { + return hasUnicode(string) ? unicodeToArray(string) : asciiToArray(string); + } + + /** + * Used by `_.unescape` to convert HTML entities to characters. + * + * @private + * @param {string} chr The matched character to unescape. + * @returns {string} Returns the unescaped character. + */ + var unescapeHtmlChar = basePropertyOf(htmlUnescapes); + + /** + * Gets the size of a Unicode `string`. + * + * @private + * @param {string} string The string inspect. + * @returns {number} Returns the string size. + */ + function unicodeSize(string) { + var result = (reUnicode.lastIndex = 0); + while (reUnicode.test(string)) { + ++result; + } + return result; + } + + /** + * Converts a Unicode `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ + function unicodeToArray(string) { + return string.match(reUnicode) || []; + } + + /** + * Splits a Unicode `string` into an array of its words. + * + * @private + * @param {string} The string to inspect. + * @returns {Array} Returns the words of `string`. + */ + function unicodeWords(string) { + return string.match(reUnicodeWord) || []; + } + + /*--------------------------------------------------------------------------*/ + + /** + * Create a new pristine `lodash` function using the `context` object. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category Util + * @param {Object} [context=root] The context object. + * @returns {Function} Returns a new `lodash` function. + * @example + * + * _.mixin({ 'foo': _.constant('foo') }); + * + * var lodash = _.runInContext(); + * lodash.mixin({ 'bar': lodash.constant('bar') }); + * + * _.isFunction(_.foo); + * // => true + * _.isFunction(_.bar); + * // => false + * + * lodash.isFunction(lodash.foo); + * // => false + * lodash.isFunction(lodash.bar); + * // => true + * + * // Create a suped-up `defer` in Node.js. + * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer; + */ + var runInContext = function runInContext(context) { + context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps)); + + /** Built-in constructor references. */ + var Array = context.Array, + Date = context.Date, + Error = context.Error, + Function = context.Function, + Math = context.Math, + Object = context.Object, + RegExp = context.RegExp, + String = context.String, + TypeError = context.TypeError; + + /** Used for built-in method references. */ + var arrayProto = Array.prototype, + funcProto = Function.prototype, + objectProto = Object.prototype; + + /** Used to detect overreaching core-js shims. */ + var coreJsData = context['__core-js_shared__']; + + /** Used to resolve the decompiled source of functions. */ + var funcToString = funcProto.toString; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** Used to generate unique IDs. */ + var idCounter = 0; + + /** Used to detect methods masquerading as native. */ + var maskSrcKey = (function () { + var uid = /[^.]+$/.exec((coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO) || ''); + return uid ? 'Symbol(src)_1.' + uid : ''; + })(); + + /** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ + var nativeObjectToString = objectProto.toString; + + /** Used to infer the `Object` constructor. */ + var objectCtorString = funcToString.call(Object); + + /** Used to restore the original `_` reference in `_.noConflict`. */ + var oldDash = root._; + + /** Used to detect if a method is native. */ + var reIsNative = RegExp( + '^' + + funcToString + .call(hasOwnProperty) + .replace(reRegExpChar, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + + '$', + ); + + /** Built-in value references. */ + var Buffer = moduleExports ? context.Buffer : undefined, + Symbol = context.Symbol, + Uint8Array = context.Uint8Array, + allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined, + getPrototype = overArg(Object.getPrototypeOf, Object), + objectCreate = Object.create, + propertyIsEnumerable = objectProto.propertyIsEnumerable, + splice = arrayProto.splice, + spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined, + symIterator = Symbol ? Symbol.iterator : undefined, + symToStringTag = Symbol ? Symbol.toStringTag : undefined; + + var defineProperty = (function () { + try { + var func = getNative(Object, 'defineProperty'); + func({}, '', {}); + return func; + } catch (e) {} + })(); + + /** Mocked built-ins. */ + var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout, + ctxNow = Date && Date.now !== root.Date.now && Date.now, + ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout; + + /* Built-in method references for those with the same name as other `lodash` methods. */ + var nativeCeil = Math.ceil, + nativeFloor = Math.floor, + nativeGetSymbols = Object.getOwnPropertySymbols, + nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined, + nativeIsFinite = context.isFinite, + nativeJoin = arrayProto.join, + nativeKeys = overArg(Object.keys, Object), + nativeMax = Math.max, + nativeMin = Math.min, + nativeNow = Date.now, + nativeParseInt = context.parseInt, + nativeRandom = Math.random, + nativeReverse = arrayProto.reverse; + + /* Built-in method references that are verified to be native. */ + var DataView = getNative(context, 'DataView'), + Map = getNative(context, 'Map'), + Promise = getNative(context, 'Promise'), + Set = getNative(context, 'Set'), + WeakMap = getNative(context, 'WeakMap'), + nativeCreate = getNative(Object, 'create'); + + /** Used to store function metadata. */ + var metaMap = WeakMap && new WeakMap(); + + /** Used to lookup unminified function names. */ + var realNames = {}; + + /** Used to detect maps, sets, and weakmaps. */ + var dataViewCtorString = toSource(DataView), + mapCtorString = toSource(Map), + promiseCtorString = toSource(Promise), + setCtorString = toSource(Set), + weakMapCtorString = toSource(WeakMap); + + /** Used to convert symbols to primitives and strings. */ + var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolValueOf = symbolProto ? symbolProto.valueOf : undefined, + symbolToString = symbolProto ? symbolProto.toString : undefined; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a `lodash` object which wraps `value` to enable implicit method + * chain sequences. Methods that operate on and return arrays, collections, + * and functions can be chained together. Methods that retrieve a single value + * or may return a primitive value will automatically end the chain sequence + * and return the unwrapped value. Otherwise, the value must be unwrapped + * with `_#value`. + * + * Explicit chain sequences, which must be unwrapped with `_#value`, may be + * enabled using `_.chain`. + * + * The execution of chained methods is lazy, that is, it's deferred until + * `_#value` is implicitly or explicitly called. + * + * Lazy evaluation allows several methods to support shortcut fusion. + * Shortcut fusion is an optimization to merge iteratee calls; this avoids + * the creation of intermediate arrays and can greatly reduce the number of + * iteratee executions. Sections of a chain sequence qualify for shortcut + * fusion if the section is applied to an array and iteratees accept only + * one argument. The heuristic for whether a section qualifies for shortcut + * fusion is subject to change. + * + * Chaining is supported in custom builds as long as the `_#value` method is + * directly or indirectly included in the build. + * + * In addition to lodash methods, wrappers have `Array` and `String` methods. + * + * The wrapper `Array` methods are: + * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift` + * + * The wrapper `String` methods are: + * `replace` and `split` + * + * The wrapper methods that support shortcut fusion are: + * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`, + * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`, + * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray` + * + * The chainable wrapper methods are: + * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`, + * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`, + * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`, + * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`, + * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`, + * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`, + * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`, + * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`, + * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`, + * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`, + * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`, + * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`, + * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`, + * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`, + * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`, + * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`, + * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`, + * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`, + * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`, + * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`, + * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`, + * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`, + * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`, + * `zipObject`, `zipObjectDeep`, and `zipWith` + * + * The wrapper methods that are **not** chainable by default are: + * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`, + * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`, + * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`, + * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`, + * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`, + * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`, + * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`, + * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`, + * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`, + * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`, + * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`, + * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`, + * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`, + * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`, + * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`, + * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`, + * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`, + * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`, + * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`, + * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`, + * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`, + * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`, + * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`, + * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`, + * `upperFirst`, `value`, and `words` + * + * @name _ + * @constructor + * @category Seq + * @param {*} value The value to wrap in a `lodash` instance. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * function square(n) { + * return n * n; + * } + * + * var wrapped = _([1, 2, 3]); + * + * // Returns an unwrapped value. + * wrapped.reduce(_.add); + * // => 6 + * + * // Returns a wrapped value. + * var squares = wrapped.map(square); + * + * _.isArray(squares); + * // => false + * + * _.isArray(squares.value()); + * // => true + */ + function lodash(value) { + if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) { + if (value instanceof LodashWrapper) { + return value; + } + if (hasOwnProperty.call(value, '__wrapped__')) { + return wrapperClone(value); + } + } + return new LodashWrapper(value); + } + + /** + * The base implementation of `_.create` without support for assigning + * properties to the created object. + * + * @private + * @param {Object} proto The object to inherit from. + * @returns {Object} Returns the new object. + */ + var baseCreate = (function () { + function object() {} + return function (proto) { + if (!isObject(proto)) { + return {}; + } + if (objectCreate) { + return objectCreate(proto); + } + object.prototype = proto; + var result = new object(); + object.prototype = undefined; + return result; + }; + })(); + + /** + * The function whose prototype chain sequence wrappers inherit from. + * + * @private + */ + function baseLodash() { + // No operation performed. + } + + /** + * The base constructor for creating `lodash` wrapper objects. + * + * @private + * @param {*} value The value to wrap. + * @param {boolean} [chainAll] Enable explicit method chain sequences. + */ + function LodashWrapper(value, chainAll) { + this.__wrapped__ = value; + this.__actions__ = []; + this.__chain__ = !!chainAll; + this.__index__ = 0; + this.__values__ = undefined; + } + + /** + * By default, the template delimiters used by lodash are like those in + * embedded Ruby (ERB) as well as ES2015 template strings. Change the + * following template settings to use alternative delimiters. + * + * @static + * @memberOf _ + * @type {Object} + */ + lodash.templateSettings = { + /** + * Used to detect `data` property values to be HTML-escaped. + * + * @memberOf _.templateSettings + * @type {RegExp} + */ + escape: reEscape, + + /** + * Used to detect code to be evaluated. + * + * @memberOf _.templateSettings + * @type {RegExp} + */ + evaluate: reEvaluate, + + /** + * Used to detect `data` property values to inject. + * + * @memberOf _.templateSettings + * @type {RegExp} + */ + interpolate: reInterpolate, + + /** + * Used to reference the data object in the template text. + * + * @memberOf _.templateSettings + * @type {string} + */ + variable: '', + + /** + * Used to import variables into the compiled template. + * + * @memberOf _.templateSettings + * @type {Object} + */ + imports: { + /** + * A reference to the `lodash` function. + * + * @memberOf _.templateSettings.imports + * @type {Function} + */ + _: lodash, + }, + }; + + // Ensure wrappers are instances of `baseLodash`. + lodash.prototype = baseLodash.prototype; + lodash.prototype.constructor = lodash; + + LodashWrapper.prototype = baseCreate(baseLodash.prototype); + LodashWrapper.prototype.constructor = LodashWrapper; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation. + * + * @private + * @constructor + * @param {*} value The value to wrap. + */ + function LazyWrapper(value) { + this.__wrapped__ = value; + this.__actions__ = []; + this.__dir__ = 1; + this.__filtered__ = false; + this.__iteratees__ = []; + this.__takeCount__ = MAX_ARRAY_LENGTH; + this.__views__ = []; + } + + /** + * Creates a clone of the lazy wrapper object. + * + * @private + * @name clone + * @memberOf LazyWrapper + * @returns {Object} Returns the cloned `LazyWrapper` object. + */ + function lazyClone() { + var result = new LazyWrapper(this.__wrapped__); + result.__actions__ = copyArray(this.__actions__); + result.__dir__ = this.__dir__; + result.__filtered__ = this.__filtered__; + result.__iteratees__ = copyArray(this.__iteratees__); + result.__takeCount__ = this.__takeCount__; + result.__views__ = copyArray(this.__views__); + return result; + } + + /** + * Reverses the direction of lazy iteration. + * + * @private + * @name reverse + * @memberOf LazyWrapper + * @returns {Object} Returns the new reversed `LazyWrapper` object. + */ + function lazyReverse() { + if (this.__filtered__) { + var result = new LazyWrapper(this); + result.__dir__ = -1; + result.__filtered__ = true; + } else { + result = this.clone(); + result.__dir__ *= -1; + } + return result; + } + + /** + * Extracts the unwrapped value from its lazy wrapper. + * + * @private + * @name value + * @memberOf LazyWrapper + * @returns {*} Returns the unwrapped value. + */ + function lazyValue() { + var array = this.__wrapped__.value(), + dir = this.__dir__, + isArr = isArray(array), + isRight = dir < 0, + arrLength = isArr ? array.length : 0, + view = getView(0, arrLength, this.__views__), + start = view.start, + end = view.end, + length = end - start, + index = isRight ? end : start - 1, + iteratees = this.__iteratees__, + iterLength = iteratees.length, + resIndex = 0, + takeCount = nativeMin(length, this.__takeCount__); + + if (!isArr || (!isRight && arrLength == length && takeCount == length)) { + return baseWrapperValue(array, this.__actions__); + } + var result = []; + + outer: while (length-- && resIndex < takeCount) { + index += dir; + + var iterIndex = -1, + value = array[index]; + + while (++iterIndex < iterLength) { + var data = iteratees[iterIndex], + iteratee = data.iteratee, + type = data.type, + computed = iteratee(value); + + if (type == LAZY_MAP_FLAG) { + value = computed; + } else if (!computed) { + if (type == LAZY_FILTER_FLAG) { + continue outer; + } else { + break outer; + } + } + } + result[resIndex++] = value; + } + return result; + } + + // Ensure `LazyWrapper` is an instance of `baseLodash`. + LazyWrapper.prototype = baseCreate(baseLodash.prototype); + LazyWrapper.prototype.constructor = LazyWrapper; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a hash object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function Hash(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + + /** + * Removes all key-value entries from the hash. + * + * @private + * @name clear + * @memberOf Hash + */ + function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; + this.size = 0; + } + + /** + * Removes `key` and its value from the hash. + * + * @private + * @name delete + * @memberOf Hash + * @param {Object} hash The hash to modify. + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function hashDelete(key) { + var result = this.has(key) && delete this.__data__[key]; + this.size -= result ? 1 : 0; + return result; + } + + /** + * Gets the hash value for `key`. + * + * @private + * @name get + * @memberOf Hash + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function hashGet(key) { + var data = this.__data__; + if (nativeCreate) { + var result = data[key]; + return result === HASH_UNDEFINED ? undefined : result; + } + return hasOwnProperty.call(data, key) ? data[key] : undefined; + } + + /** + * Checks if a hash value for `key` exists. + * + * @private + * @name has + * @memberOf Hash + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function hashHas(key) { + var data = this.__data__; + return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key); + } + + /** + * Sets the hash `key` to `value`. + * + * @private + * @name set + * @memberOf Hash + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the hash instance. + */ + function hashSet(key, value) { + var data = this.__data__; + this.size += this.has(key) ? 0 : 1; + data[key] = nativeCreate && value === undefined ? HASH_UNDEFINED : value; + return this; + } + + // Add methods to `Hash`. + Hash.prototype.clear = hashClear; + Hash.prototype['delete'] = hashDelete; + Hash.prototype.get = hashGet; + Hash.prototype.has = hashHas; + Hash.prototype.set = hashSet; + + /*------------------------------------------------------------------------*/ + + /** + * Creates an list cache object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function ListCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + + /** + * Removes all key-value entries from the list cache. + * + * @private + * @name clear + * @memberOf ListCache + */ + function listCacheClear() { + this.__data__ = []; + this.size = 0; + } + + /** + * Removes `key` and its value from the list cache. + * + * @private + * @name delete + * @memberOf ListCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function listCacheDelete(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + return false; + } + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + --this.size; + return true; + } + + /** + * Gets the list cache value for `key`. + * + * @private + * @name get + * @memberOf ListCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function listCacheGet(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + return index < 0 ? undefined : data[index][1]; + } + + /** + * Checks if a list cache value for `key` exists. + * + * @private + * @name has + * @memberOf ListCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; + } + + /** + * Sets the list cache `key` to `value`. + * + * @private + * @name set + * @memberOf ListCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the list cache instance. + */ + function listCacheSet(key, value) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + ++this.size; + data.push([key, value]); + } else { + data[index][1] = value; + } + return this; + } + + // Add methods to `ListCache`. + ListCache.prototype.clear = listCacheClear; + ListCache.prototype['delete'] = listCacheDelete; + ListCache.prototype.get = listCacheGet; + ListCache.prototype.has = listCacheHas; + ListCache.prototype.set = listCacheSet; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a map cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function MapCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + + /** + * Removes all key-value entries from the map. + * + * @private + * @name clear + * @memberOf MapCache + */ + function mapCacheClear() { + this.size = 0; + this.__data__ = { + hash: new Hash(), + map: new (Map || ListCache)(), + string: new Hash(), + }; + } + + /** + * Removes `key` and its value from the map. + * + * @private + * @name delete + * @memberOf MapCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function mapCacheDelete(key) { + var result = getMapData(this, key)['delete'](key); + this.size -= result ? 1 : 0; + return result; + } + + /** + * Gets the map value for `key`. + * + * @private + * @name get + * @memberOf MapCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function mapCacheGet(key) { + return getMapData(this, key).get(key); + } + + /** + * Checks if a map value for `key` exists. + * + * @private + * @name has + * @memberOf MapCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function mapCacheHas(key) { + return getMapData(this, key).has(key); + } + + /** + * Sets the map `key` to `value`. + * + * @private + * @name set + * @memberOf MapCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the map cache instance. + */ + function mapCacheSet(key, value) { + var data = getMapData(this, key), + size = data.size; + + data.set(key, value); + this.size += data.size == size ? 0 : 1; + return this; + } + + // Add methods to `MapCache`. + MapCache.prototype.clear = mapCacheClear; + MapCache.prototype['delete'] = mapCacheDelete; + MapCache.prototype.get = mapCacheGet; + MapCache.prototype.has = mapCacheHas; + MapCache.prototype.set = mapCacheSet; + + /*------------------------------------------------------------------------*/ + + /** + * + * Creates an array cache object to store unique values. + * + * @private + * @constructor + * @param {Array} [values] The values to cache. + */ + function SetCache(values) { + var index = -1, + length = values == null ? 0 : values.length; + + this.__data__ = new MapCache(); + while (++index < length) { + this.add(values[index]); + } + } + + /** + * Adds `value` to the array cache. + * + * @private + * @name add + * @memberOf SetCache + * @alias push + * @param {*} value The value to cache. + * @returns {Object} Returns the cache instance. + */ + function setCacheAdd(value) { + this.__data__.set(value, HASH_UNDEFINED); + return this; + } + + /** + * Checks if `value` is in the array cache. + * + * @private + * @name has + * @memberOf SetCache + * @param {*} value The value to search for. + * @returns {number} Returns `true` if `value` is found, else `false`. + */ + function setCacheHas(value) { + return this.__data__.has(value); + } + + // Add methods to `SetCache`. + SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; + SetCache.prototype.has = setCacheHas; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a stack cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function Stack(entries) { + var data = (this.__data__ = new ListCache(entries)); + this.size = data.size; + } + + /** + * Removes all key-value entries from the stack. + * + * @private + * @name clear + * @memberOf Stack + */ + function stackClear() { + this.__data__ = new ListCache(); + this.size = 0; + } + + /** + * Removes `key` and its value from the stack. + * + * @private + * @name delete + * @memberOf Stack + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function stackDelete(key) { + var data = this.__data__, + result = data['delete'](key); + + this.size = data.size; + return result; + } + + /** + * Gets the stack value for `key`. + * + * @private + * @name get + * @memberOf Stack + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function stackGet(key) { + return this.__data__.get(key); + } + + /** + * Checks if a stack value for `key` exists. + * + * @private + * @name has + * @memberOf Stack + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function stackHas(key) { + return this.__data__.has(key); + } + + /** + * Sets the stack `key` to `value`. + * + * @private + * @name set + * @memberOf Stack + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the stack cache instance. + */ + function stackSet(key, value) { + var data = this.__data__; + if (data instanceof ListCache) { + var pairs = data.__data__; + if (!Map || pairs.length < LARGE_ARRAY_SIZE - 1) { + pairs.push([key, value]); + this.size = ++data.size; + return this; + } + data = this.__data__ = new MapCache(pairs); + } + data.set(key, value); + this.size = data.size; + return this; + } + + // Add methods to `Stack`. + Stack.prototype.clear = stackClear; + Stack.prototype['delete'] = stackDelete; + Stack.prototype.get = stackGet; + Stack.prototype.has = stackHas; + Stack.prototype.set = stackSet; + + /*------------------------------------------------------------------------*/ + + /** + * Creates an array of the enumerable property names of the array-like `value`. + * + * @private + * @param {*} value The value to query. + * @param {boolean} inherited Specify returning inherited property names. + * @returns {Array} Returns the array of property names. + */ + function arrayLikeKeys(value, inherited) { + var isArr = isArray(value), + isArg = !isArr && isArguments(value), + isBuff = !isArr && !isArg && isBuffer(value), + isType = !isArr && !isArg && !isBuff && isTypedArray(value), + skipIndexes = isArr || isArg || isBuff || isType, + result = skipIndexes ? baseTimes(value.length, String) : [], + length = result.length; + + for (var key in value) { + if ( + (inherited || hasOwnProperty.call(value, key)) && + !( + skipIndexes && + // Safari 9 has enumerable `arguments.length` in strict mode. + (key == 'length' || + // Node.js 0.10 has enumerable non-index properties on buffers. + (isBuff && (key == 'offset' || key == 'parent')) || + // PhantomJS 2 has enumerable non-index properties on typed arrays. + (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) || + // Skip index properties. + isIndex(key, length)) + ) + ) { + result.push(key); + } + } + return result; + } + + /** + * A specialized version of `_.sample` for arrays. + * + * @private + * @param {Array} array The array to sample. + * @returns {*} Returns the random element. + */ + function arraySample(array) { + var length = array.length; + return length ? array[baseRandom(0, length - 1)] : undefined; + } + + /** + * A specialized version of `_.sampleSize` for arrays. + * + * @private + * @param {Array} array The array to sample. + * @param {number} n The number of elements to sample. + * @returns {Array} Returns the random elements. + */ + function arraySampleSize(array, n) { + return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length)); + } + + /** + * A specialized version of `_.shuffle` for arrays. + * + * @private + * @param {Array} array The array to shuffle. + * @returns {Array} Returns the new shuffled array. + */ + function arrayShuffle(array) { + return shuffleSelf(copyArray(array)); + } + + /** + * This function is like `assignValue` except that it doesn't assign + * `undefined` values. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ + function assignMergeValue(object, key, value) { + if ( + (value !== undefined && !eq(object[key], value)) || + (value === undefined && !(key in object)) + ) { + baseAssignValue(object, key, value); + } + } + + /** + * Assigns `value` to `key` of `object` if the existing value is not equivalent + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ + function assignValue(object, key, value) { + var objValue = object[key]; + if ( + !(hasOwnProperty.call(object, key) && eq(objValue, value)) || + (value === undefined && !(key in object)) + ) { + baseAssignValue(object, key, value); + } + } + + /** + * Gets the index at which the `key` is found in `array` of key-value pairs. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} key The key to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + return -1; + } + + /** + * Aggregates elements of `collection` on `accumulator` with keys transformed + * by `iteratee` and values set by `setter`. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} setter The function to set `accumulator` values. + * @param {Function} iteratee The iteratee to transform keys. + * @param {Object} accumulator The initial aggregated object. + * @returns {Function} Returns `accumulator`. + */ + function baseAggregator(collection, setter, iteratee, accumulator) { + baseEach(collection, function (value, key, collection) { + setter(accumulator, value, iteratee(value), collection); + }); + return accumulator; + } + + /** + * The base implementation of `_.assign` without support for multiple sources + * or `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ + function baseAssign(object, source) { + return object && copyObject(source, keys(source), object); + } + + /** + * The base implementation of `_.assignIn` without support for multiple sources + * or `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ + function baseAssignIn(object, source) { + return object && copyObject(source, keysIn(source), object); + } + + /** + * The base implementation of `assignValue` and `assignMergeValue` without + * value checks. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ + function baseAssignValue(object, key, value) { + if (key == '__proto__' && defineProperty) { + defineProperty(object, key, { + configurable: true, + enumerable: true, + value: value, + writable: true, + }); + } else { + object[key] = value; + } + } + + /** + * The base implementation of `_.at` without support for individual paths. + * + * @private + * @param {Object} object The object to iterate over. + * @param {string[]} paths The property paths to pick. + * @returns {Array} Returns the picked elements. + */ + function baseAt(object, paths) { + var index = -1, + length = paths.length, + result = Array(length), + skip = object == null; + + while (++index < length) { + result[index] = skip ? undefined : get(object, paths[index]); + } + return result; + } + + /** + * The base implementation of `_.clamp` which doesn't coerce arguments. + * + * @private + * @param {number} number The number to clamp. + * @param {number} [lower] The lower bound. + * @param {number} upper The upper bound. + * @returns {number} Returns the clamped number. + */ + function baseClamp(number, lower, upper) { + if (number === number) { + if (upper !== undefined) { + number = number <= upper ? number : upper; + } + if (lower !== undefined) { + number = number >= lower ? number : lower; + } + } + return number; + } + + /** + * The base implementation of `_.clone` and `_.cloneDeep` which tracks + * traversed objects. + * + * @private + * @param {*} value The value to clone. + * @param {boolean} bitmask The bitmask flags. + * 1 - Deep clone + * 2 - Flatten inherited properties + * 4 - Clone symbols + * @param {Function} [customizer] The function to customize cloning. + * @param {string} [key] The key of `value`. + * @param {Object} [object] The parent object of `value`. + * @param {Object} [stack] Tracks traversed objects and their clone counterparts. + * @returns {*} Returns the cloned value. + */ + function baseClone(value, bitmask, customizer, key, object, stack) { + var result, + isDeep = bitmask & CLONE_DEEP_FLAG, + isFlat = bitmask & CLONE_FLAT_FLAG, + isFull = bitmask & CLONE_SYMBOLS_FLAG; + + if (customizer) { + result = object ? customizer(value, key, object, stack) : customizer(value); + } + if (result !== undefined) { + return result; + } + if (!isObject(value)) { + return value; + } + var isArr = isArray(value); + if (isArr) { + result = initCloneArray(value); + if (!isDeep) { + return copyArray(value, result); + } + } else { + var tag = getTag(value), + isFunc = tag == funcTag || tag == genTag; + + if (isBuffer(value)) { + return cloneBuffer(value, isDeep); + } + if (tag == objectTag || tag == argsTag || (isFunc && !object)) { + result = isFlat || isFunc ? {} : initCloneObject(value); + if (!isDeep) { + return isFlat + ? copySymbolsIn(value, baseAssignIn(result, value)) + : copySymbols(value, baseAssign(result, value)); + } + } else { + if (!cloneableTags[tag]) { + return object ? value : {}; + } + result = initCloneByTag(value, tag, baseClone, isDeep); + } + } + // Check for circular references and return its corresponding clone. + stack || (stack = new Stack()); + var stacked = stack.get(value); + if (stacked) { + return stacked; + } + stack.set(value, result); + + var keysFunc = isFull ? (isFlat ? getAllKeysIn : getAllKeys) : isFlat ? keysIn : keys; + + var props = isArr ? undefined : keysFunc(value); + arrayEach(props || value, function (subValue, key) { + if (props) { + key = subValue; + subValue = value[key]; + } + // Recursively populate clone (susceptible to call stack limits). + assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack)); + }); + return result; + } + + /** + * The base implementation of `_.conforms` which doesn't clone `source`. + * + * @private + * @param {Object} source The object of property predicates to conform to. + * @returns {Function} Returns the new spec function. + */ + function baseConforms(source) { + var props = keys(source); + return function (object) { + return baseConformsTo(object, source, props); + }; + } + + /** + * The base implementation of `_.conformsTo` which accepts `props` to check. + * + * @private + * @param {Object} object The object to inspect. + * @param {Object} source The object of property predicates to conform to. + * @returns {boolean} Returns `true` if `object` conforms, else `false`. + */ + function baseConformsTo(object, source, props) { + var length = props.length; + if (object == null) { + return !length; + } + object = Object(object); + while (length--) { + var key = props[length], + predicate = source[key], + value = object[key]; + + if ((value === undefined && !(key in object)) || !predicate(value)) { + return false; + } + } + return true; + } + + /** + * The base implementation of `_.delay` and `_.defer` which accepts `args` + * to provide to `func`. + * + * @private + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @param {Array} args The arguments to provide to `func`. + * @returns {number|Object} Returns the timer id or timeout object. + */ + function baseDelay(func, wait, args) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + return setTimeout(function () { + func.apply(undefined, args); + }, wait); + } + + /** + * The base implementation of methods like `_.difference` without support + * for excluding multiple arrays or iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Array} values The values to exclude. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of filtered values. + */ + function baseDifference(array, values, iteratee, comparator) { + var index = -1, + includes = arrayIncludes, + isCommon = true, + length = array.length, + result = [], + valuesLength = values.length; + + if (!length) { + return result; + } + if (iteratee) { + values = arrayMap(values, baseUnary(iteratee)); + } + if (comparator) { + includes = arrayIncludesWith; + isCommon = false; + } else if (values.length >= LARGE_ARRAY_SIZE) { + includes = cacheHas; + isCommon = false; + values = new SetCache(values); + } + outer: while (++index < length) { + var value = array[index], + computed = iteratee == null ? value : iteratee(value); + + value = comparator || value !== 0 ? value : 0; + if (isCommon && computed === computed) { + var valuesIndex = valuesLength; + while (valuesIndex--) { + if (values[valuesIndex] === computed) { + continue outer; + } + } + result.push(value); + } else if (!includes(values, computed, comparator)) { + result.push(value); + } + } + return result; + } + + /** + * The base implementation of `_.forEach` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + */ + var baseEach = createBaseEach(baseForOwn); + + /** + * The base implementation of `_.forEachRight` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + */ + var baseEachRight = createBaseEach(baseForOwnRight, true); + + /** + * The base implementation of `_.every` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false` + */ + function baseEvery(collection, predicate) { + var result = true; + baseEach(collection, function (value, index, collection) { + result = !!predicate(value, index, collection); + return result; + }); + return result; + } + + /** + * The base implementation of methods like `_.max` and `_.min` which accepts a + * `comparator` to determine the extremum value. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The iteratee invoked per iteration. + * @param {Function} comparator The comparator used to compare values. + * @returns {*} Returns the extremum value. + */ + function baseExtremum(array, iteratee, comparator) { + var index = -1, + length = array.length; + + while (++index < length) { + var value = array[index], + current = iteratee(value); + + if ( + current != null && + (computed === undefined + ? current === current && !isSymbol(current) + : comparator(current, computed)) + ) { + var computed = current, + result = value; + } + } + return result; + } + + /** + * The base implementation of `_.fill` without an iteratee call guard. + * + * @private + * @param {Array} array The array to fill. + * @param {*} value The value to fill `array` with. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns `array`. + */ + function baseFill(array, value, start, end) { + var length = array.length; + + start = toInteger(start); + if (start < 0) { + start = -start > length ? 0 : length + start; + } + end = end === undefined || end > length ? length : toInteger(end); + if (end < 0) { + end += length; + } + end = start > end ? 0 : toLength(end); + while (start < end) { + array[start++] = value; + } + return array; + } + + /** + * The base implementation of `_.filter` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ + function baseFilter(collection, predicate) { + var result = []; + baseEach(collection, function (value, index, collection) { + if (predicate(value, index, collection)) { + result.push(value); + } + }); + return result; + } + + /** + * The base implementation of `_.flatten` with support for restricting flattening. + * + * @private + * @param {Array} array The array to flatten. + * @param {number} depth The maximum recursion depth. + * @param {boolean} [predicate=isFlattenable] The function invoked per iteration. + * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks. + * @param {Array} [result=[]] The initial result value. + * @returns {Array} Returns the new flattened array. + */ + function baseFlatten(array, depth, predicate, isStrict, result) { + var index = -1, + length = array.length; + + predicate || (predicate = isFlattenable); + result || (result = []); + + while (++index < length) { + var value = array[index]; + if (depth > 0 && predicate(value)) { + if (depth > 1) { + // Recursively flatten arrays (susceptible to call stack limits). + baseFlatten(value, depth - 1, predicate, isStrict, result); + } else { + arrayPush(result, value); + } + } else if (!isStrict) { + result[result.length] = value; + } + } + return result; + } + + /** + * The base implementation of `baseForOwn` which iterates over `object` + * properties returned by `keysFunc` and invokes `iteratee` for each property. + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ + var baseFor = createBaseFor(); + + /** + * This function is like `baseFor` except that it iterates over properties + * in the opposite order. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ + var baseForRight = createBaseFor(true); + + /** + * The base implementation of `_.forOwn` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ + function baseForOwn(object, iteratee) { + return object && baseFor(object, iteratee, keys); + } + + /** + * The base implementation of `_.forOwnRight` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ + function baseForOwnRight(object, iteratee) { + return object && baseForRight(object, iteratee, keys); + } + + /** + * The base implementation of `_.functions` which creates an array of + * `object` function property names filtered from `props`. + * + * @private + * @param {Object} object The object to inspect. + * @param {Array} props The property names to filter. + * @returns {Array} Returns the function names. + */ + function baseFunctions(object, props) { + return arrayFilter(props, function (key) { + return isFunction(object[key]); + }); + } + + /** + * The base implementation of `_.get` without support for default values. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @returns {*} Returns the resolved value. + */ + function baseGet(object, path) { + path = castPath(path, object); + + var index = 0, + length = path.length; + + while (object != null && index < length) { + object = object[toKey(path[index++])]; + } + return index && index == length ? object : undefined; + } + + /** + * The base implementation of `getAllKeys` and `getAllKeysIn` which uses + * `keysFunc` and `symbolsFunc` to get the enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Function} keysFunc The function to get the keys of `object`. + * @param {Function} symbolsFunc The function to get the symbols of `object`. + * @returns {Array} Returns the array of property names and symbols. + */ + function baseGetAllKeys(object, keysFunc, symbolsFunc) { + var result = keysFunc(object); + return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); + } + + /** + * The base implementation of `getTag` without fallbacks for buggy environments. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ + function baseGetTag(value) { + if (value == null) { + return value === undefined ? undefinedTag : nullTag; + } + return symToStringTag && symToStringTag in Object(value) + ? getRawTag(value) + : objectToString(value); + } + + /** + * The base implementation of `_.gt` which doesn't coerce arguments. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than `other`, + * else `false`. + */ + function baseGt(value, other) { + return value > other; + } + + /** + * The base implementation of `_.has` without support for deep paths. + * + * @private + * @param {Object} [object] The object to query. + * @param {Array|string} key The key to check. + * @returns {boolean} Returns `true` if `key` exists, else `false`. + */ + function baseHas(object, key) { + return object != null && hasOwnProperty.call(object, key); + } + + /** + * The base implementation of `_.hasIn` without support for deep paths. + * + * @private + * @param {Object} [object] The object to query. + * @param {Array|string} key The key to check. + * @returns {boolean} Returns `true` if `key` exists, else `false`. + */ + function baseHasIn(object, key) { + return object != null && key in Object(object); + } + + /** + * The base implementation of `_.inRange` which doesn't coerce arguments. + * + * @private + * @param {number} number The number to check. + * @param {number} start The start of the range. + * @param {number} end The end of the range. + * @returns {boolean} Returns `true` if `number` is in the range, else `false`. + */ + function baseInRange(number, start, end) { + return number >= nativeMin(start, end) && number < nativeMax(start, end); + } + + /** + * The base implementation of methods like `_.intersection`, without support + * for iteratee shorthands, that accepts an array of arrays to inspect. + * + * @private + * @param {Array} arrays The arrays to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of shared values. + */ + function baseIntersection(arrays, iteratee, comparator) { + var includes = comparator ? arrayIncludesWith : arrayIncludes, + length = arrays[0].length, + othLength = arrays.length, + othIndex = othLength, + caches = Array(othLength), + maxLength = Infinity, + result = []; + + while (othIndex--) { + var array = arrays[othIndex]; + if (othIndex && iteratee) { + array = arrayMap(array, baseUnary(iteratee)); + } + maxLength = nativeMin(array.length, maxLength); + caches[othIndex] = + !comparator && (iteratee || (length >= 120 && array.length >= 120)) + ? new SetCache(othIndex && array) + : undefined; + } + array = arrays[0]; + + var index = -1, + seen = caches[0]; + + outer: while (++index < length && result.length < maxLength) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + value = comparator || value !== 0 ? value : 0; + if (!(seen ? cacheHas(seen, computed) : includes(result, computed, comparator))) { + othIndex = othLength; + while (--othIndex) { + var cache = caches[othIndex]; + if ( + !(cache ? cacheHas(cache, computed) : includes(arrays[othIndex], computed, comparator)) + ) { + continue outer; + } + } + if (seen) { + seen.push(computed); + } + result.push(value); + } + } + return result; + } + + /** + * The base implementation of `_.invert` and `_.invertBy` which inverts + * `object` with values transformed by `iteratee` and set by `setter`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} setter The function to set `accumulator` values. + * @param {Function} iteratee The iteratee to transform values. + * @param {Object} accumulator The initial inverted object. + * @returns {Function} Returns `accumulator`. + */ + function baseInverter(object, setter, iteratee, accumulator) { + baseForOwn(object, function (value, key, object) { + setter(accumulator, iteratee(value), key, object); + }); + return accumulator; + } + + /** + * The base implementation of `_.invoke` without support for individual + * method arguments. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path of the method to invoke. + * @param {Array} args The arguments to invoke the method with. + * @returns {*} Returns the result of the invoked method. + */ + function baseInvoke(object, path, args) { + path = castPath(path, object); + object = parent(object, path); + var func = object == null ? object : object[toKey(last(path))]; + return func == null ? undefined : apply(func, object, args); + } + + /** + * The base implementation of `_.isArguments`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + */ + function baseIsArguments(value) { + return isObjectLike(value) && baseGetTag(value) == argsTag; + } + + /** + * The base implementation of `_.isArrayBuffer` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`. + */ + function baseIsArrayBuffer(value) { + return isObjectLike(value) && baseGetTag(value) == arrayBufferTag; + } + + /** + * The base implementation of `_.isDate` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a date object, else `false`. + */ + function baseIsDate(value) { + return isObjectLike(value) && baseGetTag(value) == dateTag; + } + + /** + * The base implementation of `_.isEqual` which supports partial comparisons + * and tracks traversed objects. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {boolean} bitmask The bitmask flags. + * 1 - Unordered comparison + * 2 - Partial comparison + * @param {Function} [customizer] The function to customize comparisons. + * @param {Object} [stack] Tracks traversed `value` and `other` objects. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + */ + function baseIsEqual(value, other, bitmask, customizer, stack) { + if (value === other) { + return true; + } + if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) { + return value !== value && other !== other; + } + return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); + } + + /** + * A specialized version of `baseIsEqual` for arrays and objects which performs + * deep comparisons and tracks traversed objects enabling objects with circular + * references to be compared. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} [stack] Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { + var objIsArr = isArray(object), + othIsArr = isArray(other), + objTag = objIsArr ? arrayTag : getTag(object), + othTag = othIsArr ? arrayTag : getTag(other); + + objTag = objTag == argsTag ? objectTag : objTag; + othTag = othTag == argsTag ? objectTag : othTag; + + var objIsObj = objTag == objectTag, + othIsObj = othTag == objectTag, + isSameTag = objTag == othTag; + + if (isSameTag && isBuffer(object)) { + if (!isBuffer(other)) { + return false; + } + objIsArr = true; + objIsObj = false; + } + if (isSameTag && !objIsObj) { + stack || (stack = new Stack()); + return objIsArr || isTypedArray(object) + ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) + : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); + } + if (!(bitmask & COMPARE_PARTIAL_FLAG)) { + var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), + othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); + + if (objIsWrapped || othIsWrapped) { + var objUnwrapped = objIsWrapped ? object.value() : object, + othUnwrapped = othIsWrapped ? other.value() : other; + + stack || (stack = new Stack()); + return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); + } + } + if (!isSameTag) { + return false; + } + stack || (stack = new Stack()); + return equalObjects(object, other, bitmask, customizer, equalFunc, stack); + } + + /** + * The base implementation of `_.isMap` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a map, else `false`. + */ + function baseIsMap(value) { + return isObjectLike(value) && getTag(value) == mapTag; + } + + /** + * The base implementation of `_.isMatch` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @param {Array} matchData The property names, values, and compare flags to match. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + */ + function baseIsMatch(object, source, matchData, customizer) { + var index = matchData.length, + length = index, + noCustomizer = !customizer; + + if (object == null) { + return !length; + } + object = Object(object); + while (index--) { + var data = matchData[index]; + if (noCustomizer && data[2] ? data[1] !== object[data[0]] : !(data[0] in object)) { + return false; + } + } + while (++index < length) { + data = matchData[index]; + var key = data[0], + objValue = object[key], + srcValue = data[1]; + + if (noCustomizer && data[2]) { + if (objValue === undefined && !(key in object)) { + return false; + } + } else { + var stack = new Stack(); + if (customizer) { + var result = customizer(objValue, srcValue, key, object, source, stack); + } + if ( + !(result === undefined + ? baseIsEqual( + srcValue, + objValue, + COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, + customizer, + stack, + ) + : result) + ) { + return false; + } + } + } + return true; + } + + /** + * The base implementation of `_.isNative` without bad shim checks. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + */ + function baseIsNative(value) { + if (!isObject(value) || isMasked(value)) { + return false; + } + var pattern = isFunction(value) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); + } + + /** + * The base implementation of `_.isRegExp` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. + */ + function baseIsRegExp(value) { + return isObjectLike(value) && baseGetTag(value) == regexpTag; + } + + /** + * The base implementation of `_.isSet` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a set, else `false`. + */ + function baseIsSet(value) { + return isObjectLike(value) && getTag(value) == setTag; + } + + /** + * The base implementation of `_.isTypedArray` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + */ + function baseIsTypedArray(value) { + return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; + } + + /** + * The base implementation of `_.iteratee`. + * + * @private + * @param {*} [value=_.identity] The value to convert to an iteratee. + * @returns {Function} Returns the iteratee. + */ + function baseIteratee(value) { + // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9. + // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details. + if (typeof value == 'function') { + return value; + } + if (value == null) { + return identity; + } + if (typeof value == 'object') { + return isArray(value) ? baseMatchesProperty(value[0], value[1]) : baseMatches(value); + } + return property(value); + } + + /** + * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + function baseKeys(object) { + if (!isPrototype(object)) { + return nativeKeys(object); + } + var result = []; + for (var key in Object(object)) { + if (hasOwnProperty.call(object, key) && key != 'constructor') { + result.push(key); + } + } + return result; + } + + /** + * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + function baseKeysIn(object) { + if (!isObject(object)) { + return nativeKeysIn(object); + } + var isProto = isPrototype(object), + result = []; + + for (var key in object) { + if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { + result.push(key); + } + } + return result; + } + + /** + * The base implementation of `_.lt` which doesn't coerce arguments. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than `other`, + * else `false`. + */ + function baseLt(value, other) { + return value < other; + } + + /** + * The base implementation of `_.map` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ + function baseMap(collection, iteratee) { + var index = -1, + result = isArrayLike(collection) ? Array(collection.length) : []; + + baseEach(collection, function (value, key, collection) { + result[++index] = iteratee(value, key, collection); + }); + return result; + } + + /** + * The base implementation of `_.matches` which doesn't clone `source`. + * + * @private + * @param {Object} source The object of property values to match. + * @returns {Function} Returns the new spec function. + */ + function baseMatches(source) { + var matchData = getMatchData(source); + if (matchData.length == 1 && matchData[0][2]) { + return matchesStrictComparable(matchData[0][0], matchData[0][1]); + } + return function (object) { + return object === source || baseIsMatch(object, source, matchData); + }; + } + + /** + * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`. + * + * @private + * @param {string} path The path of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + */ + function baseMatchesProperty(path, srcValue) { + if (isKey(path) && isStrictComparable(srcValue)) { + return matchesStrictComparable(toKey(path), srcValue); + } + return function (object) { + var objValue = get(object, path); + return objValue === undefined && objValue === srcValue + ? hasIn(object, path) + : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG); + }; + } + + /** + * The base implementation of `_.merge` without support for multiple sources. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {number} srcIndex The index of `source`. + * @param {Function} [customizer] The function to customize merged values. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + */ + function baseMerge(object, source, srcIndex, customizer, stack) { + if (object === source) { + return; + } + baseFor( + source, + function (srcValue, key) { + if (isObject(srcValue)) { + stack || (stack = new Stack()); + baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack); + } else { + var newValue = customizer + ? customizer(object[key], srcValue, key + '', object, source, stack) + : undefined; + + if (newValue === undefined) { + newValue = srcValue; + } + assignMergeValue(object, key, newValue); + } + }, + keysIn, + ); + } + + /** + * A specialized version of `baseMerge` for arrays and objects which performs + * deep merges and tracks traversed objects enabling objects with circular + * references to be merged. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {string} key The key of the value to merge. + * @param {number} srcIndex The index of `source`. + * @param {Function} mergeFunc The function to merge values. + * @param {Function} [customizer] The function to customize assigned values. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + */ + function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) { + var objValue = object[key], + srcValue = source[key], + stacked = stack.get(srcValue); + + if (stacked) { + assignMergeValue(object, key, stacked); + return; + } + var newValue = customizer + ? customizer(objValue, srcValue, key + '', object, source, stack) + : undefined; + + var isCommon = newValue === undefined; + + if (isCommon) { + var isArr = isArray(srcValue), + isBuff = !isArr && isBuffer(srcValue), + isTyped = !isArr && !isBuff && isTypedArray(srcValue); + + newValue = srcValue; + if (isArr || isBuff || isTyped) { + if (isArray(objValue)) { + newValue = objValue; + } else if (isArrayLikeObject(objValue)) { + newValue = copyArray(objValue); + } else if (isBuff) { + isCommon = false; + newValue = cloneBuffer(srcValue, true); + } else if (isTyped) { + isCommon = false; + newValue = cloneTypedArray(srcValue, true); + } else { + newValue = []; + } + } else if (isPlainObject(srcValue) || isArguments(srcValue)) { + newValue = objValue; + if (isArguments(objValue)) { + newValue = toPlainObject(objValue); + } else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) { + newValue = initCloneObject(srcValue); + } + } else { + isCommon = false; + } + } + if (isCommon) { + // Recursively merge objects and arrays (susceptible to call stack limits). + stack.set(srcValue, newValue); + mergeFunc(newValue, srcValue, srcIndex, customizer, stack); + stack['delete'](srcValue); + } + assignMergeValue(object, key, newValue); + } + + /** + * The base implementation of `_.nth` which doesn't coerce arguments. + * + * @private + * @param {Array} array The array to query. + * @param {number} n The index of the element to return. + * @returns {*} Returns the nth element of `array`. + */ + function baseNth(array, n) { + var length = array.length; + if (!length) { + return; + } + n += n < 0 ? length : 0; + return isIndex(n, length) ? array[n] : undefined; + } + + /** + * The base implementation of `_.orderBy` without param guards. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by. + * @param {string[]} orders The sort orders of `iteratees`. + * @returns {Array} Returns the new sorted array. + */ + function baseOrderBy(collection, iteratees, orders) { + var index = -1; + iteratees = arrayMap(iteratees.length ? iteratees : [identity], baseUnary(getIteratee())); + + var result = baseMap(collection, function (value, key, collection) { + var criteria = arrayMap(iteratees, function (iteratee) { + return iteratee(value); + }); + return { criteria: criteria, index: ++index, value: value }; + }); + + return baseSortBy(result, function (object, other) { + return compareMultiple(object, other, orders); + }); + } + + /** + * The base implementation of `_.pick` without support for individual + * property identifiers. + * + * @private + * @param {Object} object The source object. + * @param {string[]} paths The property paths to pick. + * @returns {Object} Returns the new object. + */ + function basePick(object, paths) { + return basePickBy(object, paths, function (value, path) { + return hasIn(object, path); + }); + } + + /** + * The base implementation of `_.pickBy` without support for iteratee shorthands. + * + * @private + * @param {Object} object The source object. + * @param {string[]} paths The property paths to pick. + * @param {Function} predicate The function invoked per property. + * @returns {Object} Returns the new object. + */ + function basePickBy(object, paths, predicate) { + var index = -1, + length = paths.length, + result = {}; + + while (++index < length) { + var path = paths[index], + value = baseGet(object, path); + + if (predicate(value, path)) { + baseSet(result, castPath(path, object), value); + } + } + return result; + } + + /** + * A specialized version of `baseProperty` which supports deep paths. + * + * @private + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new accessor function. + */ + function basePropertyDeep(path) { + return function (object) { + return baseGet(object, path); + }; + } + + /** + * The base implementation of `_.pullAllBy` without support for iteratee + * shorthands. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns `array`. + */ + function basePullAll(array, values, iteratee, comparator) { + var indexOf = comparator ? baseIndexOfWith : baseIndexOf, + index = -1, + length = values.length, + seen = array; + + if (array === values) { + values = copyArray(values); + } + if (iteratee) { + seen = arrayMap(array, baseUnary(iteratee)); + } + while (++index < length) { + var fromIndex = 0, + value = values[index], + computed = iteratee ? iteratee(value) : value; + + while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) { + if (seen !== array) { + splice.call(seen, fromIndex, 1); + } + splice.call(array, fromIndex, 1); + } + } + return array; + } + + /** + * The base implementation of `_.pullAt` without support for individual + * indexes or capturing the removed elements. + * + * @private + * @param {Array} array The array to modify. + * @param {number[]} indexes The indexes of elements to remove. + * @returns {Array} Returns `array`. + */ + function basePullAt(array, indexes) { + var length = array ? indexes.length : 0, + lastIndex = length - 1; + + while (length--) { + var index = indexes[length]; + if (length == lastIndex || index !== previous) { + var previous = index; + if (isIndex(index)) { + splice.call(array, index, 1); + } else { + baseUnset(array, index); + } + } + } + return array; + } + + /** + * The base implementation of `_.random` without support for returning + * floating-point numbers. + * + * @private + * @param {number} lower The lower bound. + * @param {number} upper The upper bound. + * @returns {number} Returns the random number. + */ + function baseRandom(lower, upper) { + return lower + nativeFloor(nativeRandom() * (upper - lower + 1)); + } + + /** + * The base implementation of `_.range` and `_.rangeRight` which doesn't + * coerce arguments. + * + * @private + * @param {number} start The start of the range. + * @param {number} end The end of the range. + * @param {number} step The value to increment or decrement by. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Array} Returns the range of numbers. + */ + function baseRange(start, end, step, fromRight) { + var index = -1, + length = nativeMax(nativeCeil((end - start) / (step || 1)), 0), + result = Array(length); + + while (length--) { + result[fromRight ? length : ++index] = start; + start += step; + } + return result; + } + + /** + * The base implementation of `_.repeat` which doesn't coerce arguments. + * + * @private + * @param {string} string The string to repeat. + * @param {number} n The number of times to repeat the string. + * @returns {string} Returns the repeated string. + */ + function baseRepeat(string, n) { + var result = ''; + if (!string || n < 1 || n > MAX_SAFE_INTEGER) { + return result; + } + // Leverage the exponentiation by squaring algorithm for a faster repeat. + // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details. + do { + if (n % 2) { + result += string; + } + n = nativeFloor(n / 2); + if (n) { + string += string; + } + } while (n); + + return result; + } + + /** + * The base implementation of `_.rest` which doesn't validate or coerce arguments. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + */ + function baseRest(func, start) { + return setToString(overRest(func, start, identity), func + ''); + } + + /** + * The base implementation of `_.sample`. + * + * @private + * @param {Array|Object} collection The collection to sample. + * @returns {*} Returns the random element. + */ + function baseSample(collection) { + return arraySample(values(collection)); + } + + /** + * The base implementation of `_.sampleSize` without param guards. + * + * @private + * @param {Array|Object} collection The collection to sample. + * @param {number} n The number of elements to sample. + * @returns {Array} Returns the random elements. + */ + function baseSampleSize(collection, n) { + var array = values(collection); + return shuffleSelf(array, baseClamp(n, 0, array.length)); + } + + /** + * The base implementation of `_.set`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @param {Function} [customizer] The function to customize path creation. + * @returns {Object} Returns `object`. + */ + function baseSet(object, path, value, customizer) { + if (!isObject(object)) { + return object; + } + path = castPath(path, object); + + var index = -1, + length = path.length, + lastIndex = length - 1, + nested = object; + + while (nested != null && ++index < length) { + var key = toKey(path[index]), + newValue = value; + + if (index != lastIndex) { + var objValue = nested[key]; + newValue = customizer ? customizer(objValue, key, nested) : undefined; + if (newValue === undefined) { + newValue = isObject(objValue) ? objValue : isIndex(path[index + 1]) ? [] : {}; + } + } + assignValue(nested, key, newValue); + nested = nested[key]; + } + return object; + } + + /** + * The base implementation of `setData` without support for hot loop shorting. + * + * @private + * @param {Function} func The function to associate metadata with. + * @param {*} data The metadata. + * @returns {Function} Returns `func`. + */ + var baseSetData = !metaMap + ? identity + : function (func, data) { + metaMap.set(func, data); + return func; + }; + + /** + * The base implementation of `setToString` without support for hot loop shorting. + * + * @private + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. + */ + var baseSetToString = !defineProperty + ? identity + : function (func, string) { + return defineProperty(func, 'toString', { + configurable: true, + enumerable: false, + value: constant(string), + writable: true, + }); + }; + + /** + * The base implementation of `_.shuffle`. + * + * @private + * @param {Array|Object} collection The collection to shuffle. + * @returns {Array} Returns the new shuffled array. + */ + function baseShuffle(collection) { + return shuffleSelf(values(collection)); + } + + /** + * The base implementation of `_.slice` without an iteratee call guard. + * + * @private + * @param {Array} array The array to slice. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the slice of `array`. + */ + function baseSlice(array, start, end) { + var index = -1, + length = array.length; + + if (start < 0) { + start = -start > length ? 0 : length + start; + } + end = end > length ? length : end; + if (end < 0) { + end += length; + } + length = start > end ? 0 : (end - start) >>> 0; + start >>>= 0; + + var result = Array(length); + while (++index < length) { + result[index] = array[index + start]; + } + return result; + } + + /** + * The base implementation of `_.some` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ + function baseSome(collection, predicate) { + var result; + + baseEach(collection, function (value, index, collection) { + result = predicate(value, index, collection); + return !result; + }); + return !!result; + } + + /** + * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which + * performs a binary search of `array` to determine the index at which `value` + * should be inserted into `array` in order to maintain its sort order. + * + * @private + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {boolean} [retHighest] Specify returning the highest qualified index. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + */ + function baseSortedIndex(array, value, retHighest) { + var low = 0, + high = array == null ? low : array.length; + + if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) { + while (low < high) { + var mid = (low + high) >>> 1, + computed = array[mid]; + + if ( + computed !== null && + !isSymbol(computed) && + (retHighest ? computed <= value : computed < value) + ) { + low = mid + 1; + } else { + high = mid; + } + } + return high; + } + return baseSortedIndexBy(array, value, identity, retHighest); + } + + /** + * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy` + * which invokes `iteratee` for `value` and each element of `array` to compute + * their sort ranking. The iteratee is invoked with one argument; (value). + * + * @private + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function} iteratee The iteratee invoked per element. + * @param {boolean} [retHighest] Specify returning the highest qualified index. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + */ + function baseSortedIndexBy(array, value, iteratee, retHighest) { + value = iteratee(value); + + var low = 0, + high = array == null ? 0 : array.length, + valIsNaN = value !== value, + valIsNull = value === null, + valIsSymbol = isSymbol(value), + valIsUndefined = value === undefined; + + while (low < high) { + var mid = nativeFloor((low + high) / 2), + computed = iteratee(array[mid]), + othIsDefined = computed !== undefined, + othIsNull = computed === null, + othIsReflexive = computed === computed, + othIsSymbol = isSymbol(computed); + + if (valIsNaN) { + var setLow = retHighest || othIsReflexive; + } else if (valIsUndefined) { + setLow = othIsReflexive && (retHighest || othIsDefined); + } else if (valIsNull) { + setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull); + } else if (valIsSymbol) { + setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol); + } else if (othIsNull || othIsSymbol) { + setLow = false; + } else { + setLow = retHighest ? computed <= value : computed < value; + } + if (setLow) { + low = mid + 1; + } else { + high = mid; + } + } + return nativeMin(high, MAX_ARRAY_INDEX); + } + + /** + * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without + * support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @returns {Array} Returns the new duplicate free array. + */ + function baseSortedUniq(array, iteratee) { + var index = -1, + length = array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + if (!index || !eq(computed, seen)) { + var seen = computed; + result[resIndex++] = value === 0 ? 0 : value; + } + } + return result; + } + + /** + * The base implementation of `_.toNumber` which doesn't ensure correct + * conversions of binary, hexadecimal, or octal string values. + * + * @private + * @param {*} value The value to process. + * @returns {number} Returns the number. + */ + function baseToNumber(value) { + if (typeof value == 'number') { + return value; + } + if (isSymbol(value)) { + return NAN; + } + return +value; + } + + /** + * The base implementation of `_.toString` which doesn't convert nullish + * values to empty strings. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ + function baseToString(value) { + // Exit early for strings to avoid a performance hit in some environments. + if (typeof value == 'string') { + return value; + } + if (isArray(value)) { + // Recursively convert values (susceptible to call stack limits). + return arrayMap(value, baseToString) + ''; + } + if (isSymbol(value)) { + return symbolToString ? symbolToString.call(value) : ''; + } + var result = value + ''; + return result == '0' && 1 / value == -INFINITY ? '-0' : result; + } + + /** + * The base implementation of `_.uniqBy` without support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new duplicate free array. + */ + function baseUniq(array, iteratee, comparator) { + var index = -1, + includes = arrayIncludes, + length = array.length, + isCommon = true, + result = [], + seen = result; + + if (comparator) { + isCommon = false; + includes = arrayIncludesWith; + } else if (length >= LARGE_ARRAY_SIZE) { + var set = iteratee ? null : createSet(array); + if (set) { + return setToArray(set); + } + isCommon = false; + includes = cacheHas; + seen = new SetCache(); + } else { + seen = iteratee ? [] : result; + } + outer: while (++index < length) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + value = comparator || value !== 0 ? value : 0; + if (isCommon && computed === computed) { + var seenIndex = seen.length; + while (seenIndex--) { + if (seen[seenIndex] === computed) { + continue outer; + } + } + if (iteratee) { + seen.push(computed); + } + result.push(value); + } else if (!includes(seen, computed, comparator)) { + if (seen !== result) { + seen.push(computed); + } + result.push(value); + } + } + return result; + } + + /** + * The base implementation of `_.unset`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The property path to unset. + * @returns {boolean} Returns `true` if the property is deleted, else `false`. + */ + function baseUnset(object, path) { + path = castPath(path, object); + object = parent(object, path); + return object == null || delete object[toKey(last(path))]; + } + + /** + * The base implementation of `_.update`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to update. + * @param {Function} updater The function to produce the updated value. + * @param {Function} [customizer] The function to customize path creation. + * @returns {Object} Returns `object`. + */ + function baseUpdate(object, path, updater, customizer) { + return baseSet(object, path, updater(baseGet(object, path)), customizer); + } + + /** + * The base implementation of methods like `_.dropWhile` and `_.takeWhile` + * without support for iteratee shorthands. + * + * @private + * @param {Array} array The array to query. + * @param {Function} predicate The function invoked per iteration. + * @param {boolean} [isDrop] Specify dropping elements instead of taking them. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Array} Returns the slice of `array`. + */ + function baseWhile(array, predicate, isDrop, fromRight) { + var length = array.length, + index = fromRight ? length : -1; + + while ((fromRight ? index-- : ++index < length) && predicate(array[index], index, array)) {} + + return isDrop + ? baseSlice(array, fromRight ? 0 : index, fromRight ? index + 1 : length) + : baseSlice(array, fromRight ? index + 1 : 0, fromRight ? length : index); + } + + /** + * The base implementation of `wrapperValue` which returns the result of + * performing a sequence of actions on the unwrapped `value`, where each + * successive action is supplied the return value of the previous. + * + * @private + * @param {*} value The unwrapped value. + * @param {Array} actions Actions to perform to resolve the unwrapped value. + * @returns {*} Returns the resolved value. + */ + function baseWrapperValue(value, actions) { + var result = value; + if (result instanceof LazyWrapper) { + result = result.value(); + } + return arrayReduce( + actions, + function (result, action) { + return action.func.apply(action.thisArg, arrayPush([result], action.args)); + }, + result, + ); + } + + /** + * The base implementation of methods like `_.xor`, without support for + * iteratee shorthands, that accepts an array of arrays to inspect. + * + * @private + * @param {Array} arrays The arrays to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of values. + */ + function baseXor(arrays, iteratee, comparator) { + var length = arrays.length; + if (length < 2) { + return length ? baseUniq(arrays[0]) : []; + } + var index = -1, + result = Array(length); + + while (++index < length) { + var array = arrays[index], + othIndex = -1; + + while (++othIndex < length) { + if (othIndex != index) { + result[index] = baseDifference( + result[index] || array, + arrays[othIndex], + iteratee, + comparator, + ); + } + } + } + return baseUniq(baseFlatten(result, 1), iteratee, comparator); + } + + /** + * This base implementation of `_.zipObject` which assigns values using `assignFunc`. + * + * @private + * @param {Array} props The property identifiers. + * @param {Array} values The property values. + * @param {Function} assignFunc The function to assign values. + * @returns {Object} Returns the new object. + */ + function baseZipObject(props, values, assignFunc) { + var index = -1, + length = props.length, + valsLength = values.length, + result = {}; + + while (++index < length) { + var value = index < valsLength ? values[index] : undefined; + assignFunc(result, props[index], value); + } + return result; + } + + /** + * Casts `value` to an empty array if it's not an array like object. + * + * @private + * @param {*} value The value to inspect. + * @returns {Array|Object} Returns the cast array-like object. + */ + function castArrayLikeObject(value) { + return isArrayLikeObject(value) ? value : []; + } + + /** + * Casts `value` to `identity` if it's not a function. + * + * @private + * @param {*} value The value to inspect. + * @returns {Function} Returns cast function. + */ + function castFunction(value) { + return typeof value == 'function' ? value : identity; + } + + /** + * Casts `value` to a path array if it's not one. + * + * @private + * @param {*} value The value to inspect. + * @param {Object} [object] The object to query keys on. + * @returns {Array} Returns the cast property path array. + */ + function castPath(value, object) { + if (isArray(value)) { + return value; + } + return isKey(value, object) ? [value] : stringToPath(toString(value)); + } + + /** + * A `baseRest` alias which can be replaced with `identity` by module + * replacement plugins. + * + * @private + * @type {Function} + * @param {Function} func The function to apply a rest parameter to. + * @returns {Function} Returns the new function. + */ + var castRest = baseRest; + + /** + * Casts `array` to a slice if it's needed. + * + * @private + * @param {Array} array The array to inspect. + * @param {number} start The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the cast slice. + */ + function castSlice(array, start, end) { + var length = array.length; + end = end === undefined ? length : end; + return !start && end >= length ? array : baseSlice(array, start, end); + } + + /** + * A simple wrapper around the global [`clearTimeout`](https://mdn.io/clearTimeout). + * + * @private + * @param {number|Object} id The timer id or timeout object of the timer to clear. + */ + var clearTimeout = + ctxClearTimeout || + function (id) { + return root.clearTimeout(id); + }; + + /** + * Creates a clone of `buffer`. + * + * @private + * @param {Buffer} buffer The buffer to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Buffer} Returns the cloned buffer. + */ + function cloneBuffer(buffer, isDeep) { + if (isDeep) { + return buffer.slice(); + } + var length = buffer.length, + result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length); + + buffer.copy(result); + return result; + } + + /** + * Creates a clone of `arrayBuffer`. + * + * @private + * @param {ArrayBuffer} arrayBuffer The array buffer to clone. + * @returns {ArrayBuffer} Returns the cloned array buffer. + */ + function cloneArrayBuffer(arrayBuffer) { + var result = new arrayBuffer.constructor(arrayBuffer.byteLength); + new Uint8Array(result).set(new Uint8Array(arrayBuffer)); + return result; + } + + /** + * Creates a clone of `dataView`. + * + * @private + * @param {Object} dataView The data view to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned data view. + */ + function cloneDataView(dataView, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer; + return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); + } + + /** + * Creates a clone of `map`. + * + * @private + * @param {Object} map The map to clone. + * @param {Function} cloneFunc The function to clone values. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned map. + */ + function cloneMap(map, isDeep, cloneFunc) { + var array = isDeep ? cloneFunc(mapToArray(map), CLONE_DEEP_FLAG) : mapToArray(map); + return arrayReduce(array, addMapEntry, new map.constructor()); + } + + /** + * Creates a clone of `regexp`. + * + * @private + * @param {Object} regexp The regexp to clone. + * @returns {Object} Returns the cloned regexp. + */ + function cloneRegExp(regexp) { + var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); + result.lastIndex = regexp.lastIndex; + return result; + } + + /** + * Creates a clone of `set`. + * + * @private + * @param {Object} set The set to clone. + * @param {Function} cloneFunc The function to clone values. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned set. + */ + function cloneSet(set, isDeep, cloneFunc) { + var array = isDeep ? cloneFunc(setToArray(set), CLONE_DEEP_FLAG) : setToArray(set); + return arrayReduce(array, addSetEntry, new set.constructor()); + } + + /** + * Creates a clone of the `symbol` object. + * + * @private + * @param {Object} symbol The symbol object to clone. + * @returns {Object} Returns the cloned symbol object. + */ + function cloneSymbol(symbol) { + return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; + } + + /** + * Creates a clone of `typedArray`. + * + * @private + * @param {Object} typedArray The typed array to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned typed array. + */ + function cloneTypedArray(typedArray, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; + return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); + } + + /** + * Compares values to sort them in ascending order. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {number} Returns the sort order indicator for `value`. + */ + function compareAscending(value, other) { + if (value !== other) { + var valIsDefined = value !== undefined, + valIsNull = value === null, + valIsReflexive = value === value, + valIsSymbol = isSymbol(value); + + var othIsDefined = other !== undefined, + othIsNull = other === null, + othIsReflexive = other === other, + othIsSymbol = isSymbol(other); + + if ( + (!othIsNull && !othIsSymbol && !valIsSymbol && value > other) || + (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) || + (valIsNull && othIsDefined && othIsReflexive) || + (!valIsDefined && othIsReflexive) || + !valIsReflexive + ) { + return 1; + } + if ( + (!valIsNull && !valIsSymbol && !othIsSymbol && value < other) || + (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) || + (othIsNull && valIsDefined && valIsReflexive) || + (!othIsDefined && valIsReflexive) || + !othIsReflexive + ) { + return -1; + } + } + return 0; + } + + /** + * Used by `_.orderBy` to compare multiple properties of a value to another + * and stable sort them. + * + * If `orders` is unspecified, all values are sorted in ascending order. Otherwise, + * specify an order of "desc" for descending or "asc" for ascending sort order + * of corresponding values. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {boolean[]|string[]} orders The order to sort by for each property. + * @returns {number} Returns the sort order indicator for `object`. + */ + function compareMultiple(object, other, orders) { + var index = -1, + objCriteria = object.criteria, + othCriteria = other.criteria, + length = objCriteria.length, + ordersLength = orders.length; + + while (++index < length) { + var result = compareAscending(objCriteria[index], othCriteria[index]); + if (result) { + if (index >= ordersLength) { + return result; + } + var order = orders[index]; + return result * (order == 'desc' ? -1 : 1); + } + } + // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications + // that causes it, under certain circumstances, to provide the same value for + // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247 + // for more details. + // + // This also ensures a stable sort in V8 and other engines. + // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details. + return object.index - other.index; + } + + /** + * Creates an array that is the composition of partially applied arguments, + * placeholders, and provided arguments into a single array of arguments. + * + * @private + * @param {Array} args The provided arguments. + * @param {Array} partials The arguments to prepend to those provided. + * @param {Array} holders The `partials` placeholder indexes. + * @params {boolean} [isCurried] Specify composing for a curried function. + * @returns {Array} Returns the new array of composed arguments. + */ + function composeArgs(args, partials, holders, isCurried) { + var argsIndex = -1, + argsLength = args.length, + holdersLength = holders.length, + leftIndex = -1, + leftLength = partials.length, + rangeLength = nativeMax(argsLength - holdersLength, 0), + result = Array(leftLength + rangeLength), + isUncurried = !isCurried; + + while (++leftIndex < leftLength) { + result[leftIndex] = partials[leftIndex]; + } + while (++argsIndex < holdersLength) { + if (isUncurried || argsIndex < argsLength) { + result[holders[argsIndex]] = args[argsIndex]; + } + } + while (rangeLength--) { + result[leftIndex++] = args[argsIndex++]; + } + return result; + } + + /** + * This function is like `composeArgs` except that the arguments composition + * is tailored for `_.partialRight`. + * + * @private + * @param {Array} args The provided arguments. + * @param {Array} partials The arguments to append to those provided. + * @param {Array} holders The `partials` placeholder indexes. + * @params {boolean} [isCurried] Specify composing for a curried function. + * @returns {Array} Returns the new array of composed arguments. + */ + function composeArgsRight(args, partials, holders, isCurried) { + var argsIndex = -1, + argsLength = args.length, + holdersIndex = -1, + holdersLength = holders.length, + rightIndex = -1, + rightLength = partials.length, + rangeLength = nativeMax(argsLength - holdersLength, 0), + result = Array(rangeLength + rightLength), + isUncurried = !isCurried; + + while (++argsIndex < rangeLength) { + result[argsIndex] = args[argsIndex]; + } + var offset = argsIndex; + while (++rightIndex < rightLength) { + result[offset + rightIndex] = partials[rightIndex]; + } + while (++holdersIndex < holdersLength) { + if (isUncurried || argsIndex < argsLength) { + result[offset + holders[holdersIndex]] = args[argsIndex++]; + } + } + return result; + } + + /** + * Copies the values of `source` to `array`. + * + * @private + * @param {Array} source The array to copy values from. + * @param {Array} [array=[]] The array to copy values to. + * @returns {Array} Returns `array`. + */ + function copyArray(source, array) { + var index = -1, + length = source.length; + + array || (array = Array(length)); + while (++index < length) { + array[index] = source[index]; + } + return array; + } + + /** + * Copies properties of `source` to `object`. + * + * @private + * @param {Object} source The object to copy properties from. + * @param {Array} props The property identifiers to copy. + * @param {Object} [object={}] The object to copy properties to. + * @param {Function} [customizer] The function to customize copied values. + * @returns {Object} Returns `object`. + */ + function copyObject(source, props, object, customizer) { + var isNew = !object; + object || (object = {}); + + var index = -1, + length = props.length; + + while (++index < length) { + var key = props[index]; + + var newValue = customizer + ? customizer(object[key], source[key], key, object, source) + : undefined; + + if (newValue === undefined) { + newValue = source[key]; + } + if (isNew) { + baseAssignValue(object, key, newValue); + } else { + assignValue(object, key, newValue); + } + } + return object; + } + + /** + * Copies own symbols of `source` to `object`. + * + * @private + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. + */ + function copySymbols(source, object) { + return copyObject(source, getSymbols(source), object); + } + + /** + * Copies own and inherited symbols of `source` to `object`. + * + * @private + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. + */ + function copySymbolsIn(source, object) { + return copyObject(source, getSymbolsIn(source), object); + } + + /** + * Creates a function like `_.groupBy`. + * + * @private + * @param {Function} setter The function to set accumulator values. + * @param {Function} [initializer] The accumulator object initializer. + * @returns {Function} Returns the new aggregator function. + */ + function createAggregator(setter, initializer) { + return function (collection, iteratee) { + var func = isArray(collection) ? arrayAggregator : baseAggregator, + accumulator = initializer ? initializer() : {}; + + return func(collection, setter, getIteratee(iteratee, 2), accumulator); + }; + } + + /** + * Creates a function like `_.assign`. + * + * @private + * @param {Function} assigner The function to assign values. + * @returns {Function} Returns the new assigner function. + */ + function createAssigner(assigner) { + return baseRest(function (object, sources) { + var index = -1, + length = sources.length, + customizer = length > 1 ? sources[length - 1] : undefined, + guard = length > 2 ? sources[2] : undefined; + + customizer = + assigner.length > 3 && typeof customizer == 'function' ? (length--, customizer) : undefined; + + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + customizer = length < 3 ? undefined : customizer; + length = 1; + } + object = Object(object); + while (++index < length) { + var source = sources[index]; + if (source) { + assigner(object, source, index, customizer); + } + } + return object; + }); + } + + /** + * Creates a `baseEach` or `baseEachRight` function. + * + * @private + * @param {Function} eachFunc The function to iterate over a collection. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ + function createBaseEach(eachFunc, fromRight) { + return function (collection, iteratee) { + if (collection == null) { + return collection; + } + if (!isArrayLike(collection)) { + return eachFunc(collection, iteratee); + } + var length = collection.length, + index = fromRight ? length : -1, + iterable = Object(collection); + + while (fromRight ? index-- : ++index < length) { + if (iteratee(iterable[index], index, iterable) === false) { + break; + } + } + return collection; + }; + } + + /** + * Creates a base function for methods like `_.forIn` and `_.forOwn`. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ + function createBaseFor(fromRight) { + return function (object, iteratee, keysFunc) { + var index = -1, + iterable = Object(object), + props = keysFunc(object), + length = props.length; + + while (length--) { + var key = props[fromRight ? length : ++index]; + if (iteratee(iterable[key], key, iterable) === false) { + break; + } + } + return object; + }; + } + + /** + * Creates a function that wraps `func` to invoke it with the optional `this` + * binding of `thisArg`. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {*} [thisArg] The `this` binding of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createBind(func, bitmask, thisArg) { + var isBind = bitmask & WRAP_BIND_FLAG, + Ctor = createCtor(func); + + function wrapper() { + var fn = this && this !== root && this instanceof wrapper ? Ctor : func; + return fn.apply(isBind ? thisArg : this, arguments); + } + return wrapper; + } + + /** + * Creates a function like `_.lowerFirst`. + * + * @private + * @param {string} methodName The name of the `String` case method to use. + * @returns {Function} Returns the new case function. + */ + function createCaseFirst(methodName) { + return function (string) { + string = toString(string); + + var strSymbols = hasUnicode(string) ? stringToArray(string) : undefined; + + var chr = strSymbols ? strSymbols[0] : string.charAt(0); + + var trailing = strSymbols ? castSlice(strSymbols, 1).join('') : string.slice(1); + + return chr[methodName]() + trailing; + }; + } + + /** + * Creates a function like `_.camelCase`. + * + * @private + * @param {Function} callback The function to combine each word. + * @returns {Function} Returns the new compounder function. + */ + function createCompounder(callback) { + return function (string) { + return arrayReduce(words(deburr(string).replace(reApos, '')), callback, ''); + }; + } + + /** + * Creates a function that produces an instance of `Ctor` regardless of + * whether it was invoked as part of a `new` expression or by `call` or `apply`. + * + * @private + * @param {Function} Ctor The constructor to wrap. + * @returns {Function} Returns the new wrapped function. + */ + function createCtor(Ctor) { + return function () { + // Use a `switch` statement to work with class constructors. See + // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist + // for more details. + var args = arguments; + switch (args.length) { + case 0: + return new Ctor(); + case 1: + return new Ctor(args[0]); + case 2: + return new Ctor(args[0], args[1]); + case 3: + return new Ctor(args[0], args[1], args[2]); + case 4: + return new Ctor(args[0], args[1], args[2], args[3]); + case 5: + return new Ctor(args[0], args[1], args[2], args[3], args[4]); + case 6: + return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]); + case 7: + return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]); + } + var thisBinding = baseCreate(Ctor.prototype), + result = Ctor.apply(thisBinding, args); + + // Mimic the constructor's `return` behavior. + // See https://es5.github.io/#x13.2.2 for more details. + return isObject(result) ? result : thisBinding; + }; + } + + /** + * Creates a function that wraps `func` to enable currying. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {number} arity The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createCurry(func, bitmask, arity) { + var Ctor = createCtor(func); + + function wrapper() { + var length = arguments.length, + args = Array(length), + index = length, + placeholder = getHolder(wrapper); + + while (index--) { + args[index] = arguments[index]; + } + var holders = + length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder + ? [] + : replaceHolders(args, placeholder); + + length -= holders.length; + if (length < arity) { + return createRecurry( + func, + bitmask, + createHybrid, + wrapper.placeholder, + undefined, + args, + holders, + undefined, + undefined, + arity - length, + ); + } + var fn = this && this !== root && this instanceof wrapper ? Ctor : func; + return apply(fn, this, args); + } + return wrapper; + } + + /** + * Creates a `_.find` or `_.findLast` function. + * + * @private + * @param {Function} findIndexFunc The function to find the collection index. + * @returns {Function} Returns the new find function. + */ + function createFind(findIndexFunc) { + return function (collection, predicate, fromIndex) { + var iterable = Object(collection); + if (!isArrayLike(collection)) { + var iteratee = getIteratee(predicate, 3); + collection = keys(collection); + predicate = function (key) { + return iteratee(iterable[key], key, iterable); + }; + } + var index = findIndexFunc(collection, predicate, fromIndex); + return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined; + }; + } + + /** + * Creates a `_.flow` or `_.flowRight` function. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new flow function. + */ + function createFlow(fromRight) { + return flatRest(function (funcs) { + var length = funcs.length, + index = length, + prereq = LodashWrapper.prototype.thru; + + if (fromRight) { + funcs.reverse(); + } + while (index--) { + var func = funcs[index]; + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + if (prereq && !wrapper && getFuncName(func) == 'wrapper') { + var wrapper = new LodashWrapper([], true); + } + } + index = wrapper ? index : length; + while (++index < length) { + func = funcs[index]; + + var funcName = getFuncName(func), + data = funcName == 'wrapper' ? getData(func) : undefined; + + if ( + data && + isLaziable(data[0]) && + data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) && + !data[4].length && + data[9] == 1 + ) { + wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]); + } else { + wrapper = func.length == 1 && isLaziable(func) ? wrapper[funcName]() : wrapper.thru(func); + } + } + return function () { + var args = arguments, + value = args[0]; + + if (wrapper && args.length == 1 && isArray(value)) { + return wrapper.plant(value).value(); + } + var index = 0, + result = length ? funcs[index].apply(this, args) : value; + + while (++index < length) { + result = funcs[index].call(this, result); + } + return result; + }; + }); + } + + /** + * Creates a function that wraps `func` to invoke it with optional `this` + * binding of `thisArg`, partial application, and currying. + * + * @private + * @param {Function|string} func The function or method name to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to prepend to those provided to + * the new function. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [partialsRight] The arguments to append to those provided + * to the new function. + * @param {Array} [holdersRight] The `partialsRight` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createHybrid( + func, + bitmask, + thisArg, + partials, + holders, + partialsRight, + holdersRight, + argPos, + ary, + arity, + ) { + var isAry = bitmask & WRAP_ARY_FLAG, + isBind = bitmask & WRAP_BIND_FLAG, + isBindKey = bitmask & WRAP_BIND_KEY_FLAG, + isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG), + isFlip = bitmask & WRAP_FLIP_FLAG, + Ctor = isBindKey ? undefined : createCtor(func); + + function wrapper() { + var length = arguments.length, + args = Array(length), + index = length; + + while (index--) { + args[index] = arguments[index]; + } + if (isCurried) { + var placeholder = getHolder(wrapper), + holdersCount = countHolders(args, placeholder); + } + if (partials) { + args = composeArgs(args, partials, holders, isCurried); + } + if (partialsRight) { + args = composeArgsRight(args, partialsRight, holdersRight, isCurried); + } + length -= holdersCount; + if (isCurried && length < arity) { + var newHolders = replaceHolders(args, placeholder); + return createRecurry( + func, + bitmask, + createHybrid, + wrapper.placeholder, + thisArg, + args, + newHolders, + argPos, + ary, + arity - length, + ); + } + var thisBinding = isBind ? thisArg : this, + fn = isBindKey ? thisBinding[func] : func; + + length = args.length; + if (argPos) { + args = reorder(args, argPos); + } else if (isFlip && length > 1) { + args.reverse(); + } + if (isAry && ary < length) { + args.length = ary; + } + if (this && this !== root && this instanceof wrapper) { + fn = Ctor || createCtor(fn); + } + return fn.apply(thisBinding, args); + } + return wrapper; + } + + /** + * Creates a function like `_.invertBy`. + * + * @private + * @param {Function} setter The function to set accumulator values. + * @param {Function} toIteratee The function to resolve iteratees. + * @returns {Function} Returns the new inverter function. + */ + function createInverter(setter, toIteratee) { + return function (object, iteratee) { + return baseInverter(object, setter, toIteratee(iteratee), {}); + }; + } + + /** + * Creates a function that performs a mathematical operation on two values. + * + * @private + * @param {Function} operator The function to perform the operation. + * @param {number} [defaultValue] The value used for `undefined` arguments. + * @returns {Function} Returns the new mathematical operation function. + */ + function createMathOperation(operator, defaultValue) { + return function (value, other) { + var result; + if (value === undefined && other === undefined) { + return defaultValue; + } + if (value !== undefined) { + result = value; + } + if (other !== undefined) { + if (result === undefined) { + return other; + } + if (typeof value == 'string' || typeof other == 'string') { + value = baseToString(value); + other = baseToString(other); + } else { + value = baseToNumber(value); + other = baseToNumber(other); + } + result = operator(value, other); + } + return result; + }; + } + + /** + * Creates a function like `_.over`. + * + * @private + * @param {Function} arrayFunc The function to iterate over iteratees. + * @returns {Function} Returns the new over function. + */ + function createOver(arrayFunc) { + return flatRest(function (iteratees) { + iteratees = arrayMap(iteratees, baseUnary(getIteratee())); + return baseRest(function (args) { + var thisArg = this; + return arrayFunc(iteratees, function (iteratee) { + return apply(iteratee, thisArg, args); + }); + }); + }); + } + + /** + * Creates the padding for `string` based on `length`. The `chars` string + * is truncated if the number of characters exceeds `length`. + * + * @private + * @param {number} length The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padding for `string`. + */ + function createPadding(length, chars) { + chars = chars === undefined ? ' ' : baseToString(chars); + + var charsLength = chars.length; + if (charsLength < 2) { + return charsLength ? baseRepeat(chars, length) : chars; + } + var result = baseRepeat(chars, nativeCeil(length / stringSize(chars))); + return hasUnicode(chars) + ? castSlice(stringToArray(result), 0, length).join('') + : result.slice(0, length); + } + + /** + * Creates a function that wraps `func` to invoke it with the `this` binding + * of `thisArg` and `partials` prepended to the arguments it receives. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} partials The arguments to prepend to those provided to + * the new function. + * @returns {Function} Returns the new wrapped function. + */ + function createPartial(func, bitmask, thisArg, partials) { + var isBind = bitmask & WRAP_BIND_FLAG, + Ctor = createCtor(func); + + function wrapper() { + var argsIndex = -1, + argsLength = arguments.length, + leftIndex = -1, + leftLength = partials.length, + args = Array(leftLength + argsLength), + fn = this && this !== root && this instanceof wrapper ? Ctor : func; + + while (++leftIndex < leftLength) { + args[leftIndex] = partials[leftIndex]; + } + while (argsLength--) { + args[leftIndex++] = arguments[++argsIndex]; + } + return apply(fn, isBind ? thisArg : this, args); + } + return wrapper; + } + + /** + * Creates a `_.range` or `_.rangeRight` function. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new range function. + */ + function createRange(fromRight) { + return function (start, end, step) { + if (step && typeof step != 'number' && isIterateeCall(start, end, step)) { + end = step = undefined; + } + // Ensure the sign of `-0` is preserved. + start = toFinite(start); + if (end === undefined) { + end = start; + start = 0; + } else { + end = toFinite(end); + } + step = step === undefined ? (start < end ? 1 : -1) : toFinite(step); + return baseRange(start, end, step, fromRight); + }; + } + + /** + * Creates a function that performs a relational operation on two values. + * + * @private + * @param {Function} operator The function to perform the operation. + * @returns {Function} Returns the new relational operation function. + */ + function createRelationalOperation(operator) { + return function (value, other) { + if (!(typeof value == 'string' && typeof other == 'string')) { + value = toNumber(value); + other = toNumber(other); + } + return operator(value, other); + }; + } + + /** + * Creates a function that wraps `func` to continue currying. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {Function} wrapFunc The function to create the `func` wrapper. + * @param {*} placeholder The placeholder value. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to prepend to those provided to + * the new function. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createRecurry( + func, + bitmask, + wrapFunc, + placeholder, + thisArg, + partials, + holders, + argPos, + ary, + arity, + ) { + var isCurry = bitmask & WRAP_CURRY_FLAG, + newHolders = isCurry ? holders : undefined, + newHoldersRight = isCurry ? undefined : holders, + newPartials = isCurry ? partials : undefined, + newPartialsRight = isCurry ? undefined : partials; + + bitmask |= isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG; + bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG); + + if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) { + bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG); + } + var newData = [ + func, + bitmask, + thisArg, + newPartials, + newHolders, + newPartialsRight, + newHoldersRight, + argPos, + ary, + arity, + ]; + + var result = wrapFunc.apply(undefined, newData); + if (isLaziable(func)) { + setData(result, newData); + } + result.placeholder = placeholder; + return setWrapToString(result, func, bitmask); + } + + /** + * Creates a function like `_.round`. + * + * @private + * @param {string} methodName The name of the `Math` method to use when rounding. + * @returns {Function} Returns the new round function. + */ + function createRound(methodName) { + var func = Math[methodName]; + return function (number, precision) { + number = toNumber(number); + precision = precision == null ? 0 : nativeMin(toInteger(precision), 292); + if (precision) { + // Shift with exponential notation to avoid floating-point issues. + // See [MDN](https://mdn.io/round#Examples) for more details. + var pair = (toString(number) + 'e').split('e'), + value = func(pair[0] + 'e' + (+pair[1] + precision)); + + pair = (toString(value) + 'e').split('e'); + return +(pair[0] + 'e' + (+pair[1] - precision)); + } + return func(number); + }; + } + + /** + * Creates a set object of `values`. + * + * @private + * @param {Array} values The values to add to the set. + * @returns {Object} Returns the new set. + */ + var createSet = !(Set && 1 / setToArray(new Set([, -0]))[1] == INFINITY) + ? noop + : function (values) { + return new Set(values); + }; + + /** + * Creates a `_.toPairs` or `_.toPairsIn` function. + * + * @private + * @param {Function} keysFunc The function to get the keys of a given object. + * @returns {Function} Returns the new pairs function. + */ + function createToPairs(keysFunc) { + return function (object) { + var tag = getTag(object); + if (tag == mapTag) { + return mapToArray(object); + } + if (tag == setTag) { + return setToPairs(object); + } + return baseToPairs(object, keysFunc(object)); + }; + } + + /** + * Creates a function that either curries or invokes `func` with optional + * `this` binding and partially applied arguments. + * + * @private + * @param {Function|string} func The function or method name to wrap. + * @param {number} bitmask The bitmask flags. + * 1 - `_.bind` + * 2 - `_.bindKey` + * 4 - `_.curry` or `_.curryRight` of a bound function + * 8 - `_.curry` + * 16 - `_.curryRight` + * 32 - `_.partial` + * 64 - `_.partialRight` + * 128 - `_.rearg` + * 256 - `_.ary` + * 512 - `_.flip` + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to be partially applied. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) { + var isBindKey = bitmask & WRAP_BIND_KEY_FLAG; + if (!isBindKey && typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + var length = partials ? partials.length : 0; + if (!length) { + bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG); + partials = holders = undefined; + } + ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0); + arity = arity === undefined ? arity : toInteger(arity); + length -= holders ? holders.length : 0; + + if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) { + var partialsRight = partials, + holdersRight = holders; + + partials = holders = undefined; + } + var data = isBindKey ? undefined : getData(func); + + var newData = [ + func, + bitmask, + thisArg, + partials, + holders, + partialsRight, + holdersRight, + argPos, + ary, + arity, + ]; + + if (data) { + mergeData(newData, data); + } + func = newData[0]; + bitmask = newData[1]; + thisArg = newData[2]; + partials = newData[3]; + holders = newData[4]; + arity = newData[9] = + newData[9] === undefined ? (isBindKey ? 0 : func.length) : nativeMax(newData[9] - length, 0); + + if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) { + bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG); + } + if (!bitmask || bitmask == WRAP_BIND_FLAG) { + var result = createBind(func, bitmask, thisArg); + } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) { + result = createCurry(func, bitmask, arity); + } else if ( + (bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && + !holders.length + ) { + result = createPartial(func, bitmask, thisArg, partials); + } else { + result = createHybrid.apply(undefined, newData); + } + var setter = data ? baseSetData : setData; + return setWrapToString(setter(result, newData), func, bitmask); + } + + /** + * Used by `_.defaults` to customize its `_.assignIn` use to assign properties + * of source objects to the destination object for all destination properties + * that resolve to `undefined`. + * + * @private + * @param {*} objValue The destination value. + * @param {*} srcValue The source value. + * @param {string} key The key of the property to assign. + * @param {Object} object The parent object of `objValue`. + * @returns {*} Returns the value to assign. + */ + function customDefaultsAssignIn(objValue, srcValue, key, object) { + if ( + objValue === undefined || + (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key)) + ) { + return srcValue; + } + return objValue; + } + + /** + * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source + * objects into destination objects that are passed thru. + * + * @private + * @param {*} objValue The destination value. + * @param {*} srcValue The source value. + * @param {string} key The key of the property to merge. + * @param {Object} object The parent object of `objValue`. + * @param {Object} source The parent object of `srcValue`. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + * @returns {*} Returns the value to assign. + */ + function customDefaultsMerge(objValue, srcValue, key, object, source, stack) { + if (isObject(objValue) && isObject(srcValue)) { + // Recursively merge objects and arrays (susceptible to call stack limits). + stack.set(srcValue, objValue); + baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack); + stack['delete'](srcValue); + } + return objValue; + } + + /** + * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain + * objects. + * + * @private + * @param {*} value The value to inspect. + * @param {string} key The key of the property to inspect. + * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`. + */ + function customOmitClone(value) { + return isPlainObject(value) ? undefined : value; + } + + /** + * A specialized version of `baseIsEqualDeep` for arrays with support for + * partial deep comparisons. + * + * @private + * @param {Array} array The array to compare. + * @param {Array} other The other array to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `array` and `other` objects. + * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. + */ + function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + arrLength = array.length, + othLength = other.length; + + if (arrLength != othLength && !(isPartial && othLength > arrLength)) { + return false; + } + // Assume cyclic values are equal. + var stacked = stack.get(array); + if (stacked && stack.get(other)) { + return stacked == other; + } + var index = -1, + result = true, + seen = bitmask & COMPARE_UNORDERED_FLAG ? new SetCache() : undefined; + + stack.set(array, other); + stack.set(other, array); + + // Ignore non-index properties. + while (++index < arrLength) { + var arrValue = array[index], + othValue = other[index]; + + if (customizer) { + var compared = isPartial + ? customizer(othValue, arrValue, index, other, array, stack) + : customizer(arrValue, othValue, index, array, other, stack); + } + if (compared !== undefined) { + if (compared) { + continue; + } + result = false; + break; + } + // Recursively compare arrays (susceptible to call stack limits). + if (seen) { + if ( + !arraySome(other, function (othValue, othIndex) { + if ( + !cacheHas(seen, othIndex) && + (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack)) + ) { + return seen.push(othIndex); + } + }) + ) { + result = false; + break; + } + } else if ( + !(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack)) + ) { + result = false; + break; + } + } + stack['delete'](array); + stack['delete'](other); + return result; + } + + /** + * A specialized version of `baseIsEqualDeep` for comparing objects of + * the same `toStringTag`. + * + * **Note:** This function only supports comparing values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {string} tag The `toStringTag` of the objects to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { + switch (tag) { + case dataViewTag: + if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) { + return false; + } + object = object.buffer; + other = other.buffer; + + case arrayBufferTag: + if ( + object.byteLength != other.byteLength || + !equalFunc(new Uint8Array(object), new Uint8Array(other)) + ) { + return false; + } + return true; + + case boolTag: + case dateTag: + case numberTag: + // Coerce booleans to `1` or `0` and dates to milliseconds. + // Invalid dates are coerced to `NaN`. + return eq(+object, +other); + + case errorTag: + return object.name == other.name && object.message == other.message; + + case regexpTag: + case stringTag: + // Coerce regexes to strings and treat strings, primitives and objects, + // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring + // for more details. + return object == other + ''; + + case mapTag: + var convert = mapToArray; + + case setTag: + var isPartial = bitmask & COMPARE_PARTIAL_FLAG; + convert || (convert = setToArray); + + if (object.size != other.size && !isPartial) { + return false; + } + // Assume cyclic values are equal. + var stacked = stack.get(object); + if (stacked) { + return stacked == other; + } + bitmask |= COMPARE_UNORDERED_FLAG; + + // Recursively compare objects (susceptible to call stack limits). + stack.set(object, other); + var result = equalArrays( + convert(object), + convert(other), + bitmask, + customizer, + equalFunc, + stack, + ); + stack['delete'](object); + return result; + + case symbolTag: + if (symbolValueOf) { + return symbolValueOf.call(object) == symbolValueOf.call(other); + } + } + return false; + } + + /** + * A specialized version of `baseIsEqualDeep` for objects with support for + * partial deep comparisons. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + objProps = getAllKeys(object), + objLength = objProps.length, + othProps = getAllKeys(other), + othLength = othProps.length; + + if (objLength != othLength && !isPartial) { + return false; + } + var index = objLength; + while (index--) { + var key = objProps[index]; + if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { + return false; + } + } + // Assume cyclic values are equal. + var stacked = stack.get(object); + if (stacked && stack.get(other)) { + return stacked == other; + } + var result = true; + stack.set(object, other); + stack.set(other, object); + + var skipCtor = isPartial; + while (++index < objLength) { + key = objProps[index]; + var objValue = object[key], + othValue = other[key]; + + if (customizer) { + var compared = isPartial + ? customizer(othValue, objValue, key, other, object, stack) + : customizer(objValue, othValue, key, object, other, stack); + } + // Recursively compare objects (susceptible to call stack limits). + if ( + !(compared === undefined + ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) + : compared) + ) { + result = false; + break; + } + skipCtor || (skipCtor = key == 'constructor'); + } + if (result && !skipCtor) { + var objCtor = object.constructor, + othCtor = other.constructor; + + // Non `Object` object instances with different constructors are not equal. + if ( + objCtor != othCtor && + 'constructor' in object && + 'constructor' in other && + !( + typeof objCtor == 'function' && + objCtor instanceof objCtor && + typeof othCtor == 'function' && + othCtor instanceof othCtor + ) + ) { + result = false; + } + } + stack['delete'](object); + stack['delete'](other); + return result; + } + + /** + * A specialized version of `baseRest` which flattens the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @returns {Function} Returns the new function. + */ + function flatRest(func) { + return setToString(overRest(func, undefined, flatten), func + ''); + } + + /** + * Creates an array of own enumerable property names and symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ + function getAllKeys(object) { + return baseGetAllKeys(object, keys, getSymbols); + } + + /** + * Creates an array of own and inherited enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ + function getAllKeysIn(object) { + return baseGetAllKeys(object, keysIn, getSymbolsIn); + } + + /** + * Gets metadata for `func`. + * + * @private + * @param {Function} func The function to query. + * @returns {*} Returns the metadata for `func`. + */ + var getData = !metaMap + ? noop + : function (func) { + return metaMap.get(func); + }; + + /** + * Gets the name of `func`. + * + * @private + * @param {Function} func The function to query. + * @returns {string} Returns the function name. + */ + function getFuncName(func) { + var result = func.name + '', + array = realNames[result], + length = hasOwnProperty.call(realNames, result) ? array.length : 0; + + while (length--) { + var data = array[length], + otherFunc = data.func; + if (otherFunc == null || otherFunc == func) { + return data.name; + } + } + return result; + } + + /** + * Gets the argument placeholder value for `func`. + * + * @private + * @param {Function} func The function to inspect. + * @returns {*} Returns the placeholder value. + */ + function getHolder(func) { + var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func; + return object.placeholder; + } + + /** + * Gets the appropriate "iteratee" function. If `_.iteratee` is customized, + * this function returns the custom method, otherwise it returns `baseIteratee`. + * If arguments are provided, the chosen function is invoked with them and + * its result is returned. + * + * @private + * @param {*} [value] The value to convert to an iteratee. + * @param {number} [arity] The arity of the created iteratee. + * @returns {Function} Returns the chosen function or its result. + */ + function getIteratee() { + var result = lodash.iteratee || iteratee; + result = result === iteratee ? baseIteratee : result; + return arguments.length ? result(arguments[0], arguments[1]) : result; + } + + /** + * Gets the data for `map`. + * + * @private + * @param {Object} map The map to query. + * @param {string} key The reference key. + * @returns {*} Returns the map data. + */ + function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) ? data[typeof key == 'string' ? 'string' : 'hash'] : data.map; + } + + /** + * Gets the property names, values, and compare flags of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the match data of `object`. + */ + function getMatchData(object) { + var result = keys(object), + length = result.length; + + while (length--) { + var key = result[length], + value = object[key]; + + result[length] = [key, value, isStrictComparable(value)]; + } + return result; + } + + /** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ + function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : undefined; + } + + /** + * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the raw `toStringTag`. + */ + function getRawTag(value) { + var isOwn = hasOwnProperty.call(value, symToStringTag), + tag = value[symToStringTag]; + + try { + value[symToStringTag] = undefined; + var unmasked = true; + } catch (e) {} + + var result = nativeObjectToString.call(value); + if (unmasked) { + if (isOwn) { + value[symToStringTag] = tag; + } else { + delete value[symToStringTag]; + } + } + return result; + } + + /** + * Creates an array of the own enumerable symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ + var getSymbols = !nativeGetSymbols + ? stubArray + : function (object) { + if (object == null) { + return []; + } + object = Object(object); + return arrayFilter(nativeGetSymbols(object), function (symbol) { + return propertyIsEnumerable.call(object, symbol); + }); + }; + + /** + * Creates an array of the own and inherited enumerable symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ + var getSymbolsIn = !nativeGetSymbols + ? stubArray + : function (object) { + var result = []; + while (object) { + arrayPush(result, getSymbols(object)); + object = getPrototype(object); + } + return result; + }; + + /** + * Gets the `toStringTag` of `value`. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ + var getTag = baseGetTag; + + // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6. + if ( + (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || + (Map && getTag(new Map()) != mapTag) || + (Promise && getTag(Promise.resolve()) != promiseTag) || + (Set && getTag(new Set()) != setTag) || + (WeakMap && getTag(new WeakMap()) != weakMapTag) + ) { + getTag = function (value) { + var result = baseGetTag(value), + Ctor = result == objectTag ? value.constructor : undefined, + ctorString = Ctor ? toSource(Ctor) : ''; + + if (ctorString) { + switch (ctorString) { + case dataViewCtorString: + return dataViewTag; + case mapCtorString: + return mapTag; + case promiseCtorString: + return promiseTag; + case setCtorString: + return setTag; + case weakMapCtorString: + return weakMapTag; + } + } + return result; + }; + } + + /** + * Gets the view, applying any `transforms` to the `start` and `end` positions. + * + * @private + * @param {number} start The start of the view. + * @param {number} end The end of the view. + * @param {Array} transforms The transformations to apply to the view. + * @returns {Object} Returns an object containing the `start` and `end` + * positions of the view. + */ + function getView(start, end, transforms) { + var index = -1, + length = transforms.length; + + while (++index < length) { + var data = transforms[index], + size = data.size; + + switch (data.type) { + case 'drop': + start += size; + break; + case 'dropRight': + end -= size; + break; + case 'take': + end = nativeMin(end, start + size); + break; + case 'takeRight': + start = nativeMax(start, end - size); + break; + } + } + return { start: start, end: end }; + } + + /** + * Extracts wrapper details from the `source` body comment. + * + * @private + * @param {string} source The source to inspect. + * @returns {Array} Returns the wrapper details. + */ + function getWrapDetails(source) { + var match = source.match(reWrapDetails); + return match ? match[1].split(reSplitDetails) : []; + } + + /** + * Checks if `path` exists on `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @param {Function} hasFunc The function to check properties. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + */ + function hasPath(object, path, hasFunc) { + path = castPath(path, object); + + var index = -1, + length = path.length, + result = false; + + while (++index < length) { + var key = toKey(path[index]); + if (!(result = object != null && hasFunc(object, key))) { + break; + } + object = object[key]; + } + if (result || ++index != length) { + return result; + } + length = object == null ? 0 : object.length; + return ( + !!length && + isLength(length) && + isIndex(key, length) && + (isArray(object) || isArguments(object)) + ); + } + + /** + * Initializes an array clone. + * + * @private + * @param {Array} array The array to clone. + * @returns {Array} Returns the initialized clone. + */ + function initCloneArray(array) { + var length = array.length, + result = array.constructor(length); + + // Add properties assigned by `RegExp#exec`. + if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) { + result.index = array.index; + result.input = array.input; + } + return result; + } + + /** + * Initializes an object clone. + * + * @private + * @param {Object} object The object to clone. + * @returns {Object} Returns the initialized clone. + */ + function initCloneObject(object) { + return typeof object.constructor == 'function' && !isPrototype(object) + ? baseCreate(getPrototype(object)) + : {}; + } + + /** + * Initializes an object clone based on its `toStringTag`. + * + * **Note:** This function only supports cloning values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * + * @private + * @param {Object} object The object to clone. + * @param {string} tag The `toStringTag` of the object to clone. + * @param {Function} cloneFunc The function to clone values. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the initialized clone. + */ + function initCloneByTag(object, tag, cloneFunc, isDeep) { + var Ctor = object.constructor; + switch (tag) { + case arrayBufferTag: + return cloneArrayBuffer(object); + + case boolTag: + case dateTag: + return new Ctor(+object); + + case dataViewTag: + return cloneDataView(object, isDeep); + + case float32Tag: + case float64Tag: + case int8Tag: + case int16Tag: + case int32Tag: + case uint8Tag: + case uint8ClampedTag: + case uint16Tag: + case uint32Tag: + return cloneTypedArray(object, isDeep); + + case mapTag: + return cloneMap(object, isDeep, cloneFunc); + + case numberTag: + case stringTag: + return new Ctor(object); + + case regexpTag: + return cloneRegExp(object); + + case setTag: + return cloneSet(object, isDeep, cloneFunc); + + case symbolTag: + return cloneSymbol(object); + } + } + + /** + * Inserts wrapper `details` in a comment at the top of the `source` body. + * + * @private + * @param {string} source The source to modify. + * @returns {Array} details The details to insert. + * @returns {string} Returns the modified source. + */ + function insertWrapDetails(source, details) { + var length = details.length; + if (!length) { + return source; + } + var lastIndex = length - 1; + details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex]; + details = details.join(length > 2 ? ', ' : ' '); + return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n'); + } + + /** + * Checks if `value` is a flattenable `arguments` object or array. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. + */ + function isFlattenable(value) { + return ( + isArray(value) || + isArguments(value) || + !!(spreadableSymbol && value && value[spreadableSymbol]) + ); + } + + /** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ + function isIndex(value, length) { + length = length == null ? MAX_SAFE_INTEGER : length; + return ( + !!length && + (typeof value == 'number' || reIsUint.test(value)) && + value > -1 && + value % 1 == 0 && + value < length + ); + } + + /** + * Checks if the given arguments are from an iteratee call. + * + * @private + * @param {*} value The potential iteratee value argument. + * @param {*} index The potential iteratee index or key argument. + * @param {*} object The potential iteratee object argument. + * @returns {boolean} Returns `true` if the arguments are from an iteratee call, + * else `false`. + */ + function isIterateeCall(value, index, object) { + if (!isObject(object)) { + return false; + } + var type = typeof index; + if ( + type == 'number' + ? isArrayLike(object) && isIndex(index, object.length) + : type == 'string' && index in object + ) { + return eq(object[index], value); + } + return false; + } + + /** + * Checks if `value` is a property name and not a property path. + * + * @private + * @param {*} value The value to check. + * @param {Object} [object] The object to query keys on. + * @returns {boolean} Returns `true` if `value` is a property name, else `false`. + */ + function isKey(value, object) { + if (isArray(value)) { + return false; + } + var type = typeof value; + if ( + type == 'number' || + type == 'symbol' || + type == 'boolean' || + value == null || + isSymbol(value) + ) { + return true; + } + return ( + reIsPlainProp.test(value) || + !reIsDeepProp.test(value) || + (object != null && value in Object(object)) + ); + } + + /** + * Checks if `value` is suitable for use as unique object key. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is suitable, else `false`. + */ + function isKeyable(value) { + var type = typeof value; + return type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean' + ? value !== '__proto__' + : value === null; + } + + /** + * Checks if `func` has a lazy counterpart. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` has a lazy counterpart, + * else `false`. + */ + function isLaziable(func) { + var funcName = getFuncName(func), + other = lodash[funcName]; + + if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) { + return false; + } + if (func === other) { + return true; + } + var data = getData(other); + return !!data && func === data[0]; + } + + /** + * Checks if `func` has its source masked. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` is masked, else `false`. + */ + function isMasked(func) { + return !!maskSrcKey && maskSrcKey in func; + } + + /** + * Checks if `func` is capable of being masked. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `func` is maskable, else `false`. + */ + var isMaskable = coreJsData ? isFunction : stubFalse; + + /** + * Checks if `value` is likely a prototype object. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. + */ + function isPrototype(value) { + var Ctor = value && value.constructor, + proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; + + return value === proto; + } + + /** + * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` if suitable for strict + * equality comparisons, else `false`. + */ + function isStrictComparable(value) { + return value === value && !isObject(value); + } + + /** + * A specialized version of `matchesProperty` for source values suitable + * for strict equality comparisons, i.e. `===`. + * + * @private + * @param {string} key The key of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + */ + function matchesStrictComparable(key, srcValue) { + return function (object) { + if (object == null) { + return false; + } + return object[key] === srcValue && (srcValue !== undefined || key in Object(object)); + }; + } + + /** + * A specialized version of `_.memoize` which clears the memoized function's + * cache when it exceeds `MAX_MEMOIZE_SIZE`. + * + * @private + * @param {Function} func The function to have its output memoized. + * @returns {Function} Returns the new memoized function. + */ + function memoizeCapped(func) { + var result = memoize(func, function (key) { + if (cache.size === MAX_MEMOIZE_SIZE) { + cache.clear(); + } + return key; + }); + + var cache = result.cache; + return result; + } + + /** + * Merges the function metadata of `source` into `data`. + * + * Merging metadata reduces the number of wrappers used to invoke a function. + * This is possible because methods like `_.bind`, `_.curry`, and `_.partial` + * may be applied regardless of execution order. Methods like `_.ary` and + * `_.rearg` modify function arguments, making the order in which they are + * executed important, preventing the merging of metadata. However, we make + * an exception for a safe combined case where curried functions have `_.ary` + * and or `_.rearg` applied. + * + * @private + * @param {Array} data The destination metadata. + * @param {Array} source The source metadata. + * @returns {Array} Returns `data`. + */ + function mergeData(data, source) { + var bitmask = data[1], + srcBitmask = source[1], + newBitmask = bitmask | srcBitmask, + isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG); + + var isCombo = + (srcBitmask == WRAP_ARY_FLAG && bitmask == WRAP_CURRY_FLAG) || + (srcBitmask == WRAP_ARY_FLAG && bitmask == WRAP_REARG_FLAG && data[7].length <= source[8]) || + (srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG) && + source[7].length <= source[8] && + bitmask == WRAP_CURRY_FLAG); + + // Exit early if metadata can't be merged. + if (!(isCommon || isCombo)) { + return data; + } + // Use source `thisArg` if available. + if (srcBitmask & WRAP_BIND_FLAG) { + data[2] = source[2]; + // Set when currying a bound function. + newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG; + } + // Compose partial arguments. + var value = source[3]; + if (value) { + var partials = data[3]; + data[3] = partials ? composeArgs(partials, value, source[4]) : value; + data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4]; + } + // Compose partial right arguments. + value = source[5]; + if (value) { + partials = data[5]; + data[5] = partials ? composeArgsRight(partials, value, source[6]) : value; + data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6]; + } + // Use source `argPos` if available. + value = source[7]; + if (value) { + data[7] = value; + } + // Use source `ary` if it's smaller. + if (srcBitmask & WRAP_ARY_FLAG) { + data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]); + } + // Use source `arity` if one is not provided. + if (data[9] == null) { + data[9] = source[9]; + } + // Use source `func` and merge bitmasks. + data[0] = source[0]; + data[1] = newBitmask; + + return data; + } + + /** + * This function is like + * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * except that it includes inherited enumerable properties. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + function nativeKeysIn(object) { + var result = []; + if (object != null) { + for (var key in Object(object)) { + result.push(key); + } + } + return result; + } + + /** + * Converts `value` to a string using `Object.prototype.toString`. + * + * @private + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + */ + function objectToString(value) { + return nativeObjectToString.call(value); + } + + /** + * A specialized version of `baseRest` which transforms the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @param {Function} transform The rest array transform. + * @returns {Function} Returns the new function. + */ + function overRest(func, start, transform) { + start = nativeMax(start === undefined ? func.length - 1 : start, 0); + return function () { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + array = Array(length); + + while (++index < length) { + array[index] = args[start + index]; + } + index = -1; + var otherArgs = Array(start + 1); + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = transform(array); + return apply(func, this, otherArgs); + }; + } + + /** + * Gets the parent value at `path` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} path The path to get the parent value of. + * @returns {*} Returns the parent value. + */ + function parent(object, path) { + return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1)); + } + + /** + * Reorder `array` according to the specified indexes where the element at + * the first index is assigned as the first element, the element at + * the second index is assigned as the second element, and so on. + * + * @private + * @param {Array} array The array to reorder. + * @param {Array} indexes The arranged array indexes. + * @returns {Array} Returns `array`. + */ + function reorder(array, indexes) { + var arrLength = array.length, + length = nativeMin(indexes.length, arrLength), + oldArray = copyArray(array); + + while (length--) { + var index = indexes[length]; + array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined; + } + return array; + } + + /** + * Sets metadata for `func`. + * + * **Note:** If this function becomes hot, i.e. is invoked a lot in a short + * period of time, it will trip its breaker and transition to an identity + * function to avoid garbage collection pauses in V8. See + * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070) + * for more details. + * + * @private + * @param {Function} func The function to associate metadata with. + * @param {*} data The metadata. + * @returns {Function} Returns `func`. + */ + var setData = shortOut(baseSetData); + + /** + * A simple wrapper around the global [`setTimeout`](https://mdn.io/setTimeout). + * + * @private + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @returns {number|Object} Returns the timer id or timeout object. + */ + var setTimeout = + ctxSetTimeout || + function (func, wait) { + return root.setTimeout(func, wait); + }; + + /** + * Sets the `toString` method of `func` to return `string`. + * + * @private + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. + */ + var setToString = shortOut(baseSetToString); + + /** + * Sets the `toString` method of `wrapper` to mimic the source of `reference` + * with wrapper details in a comment at the top of the source body. + * + * @private + * @param {Function} wrapper The function to modify. + * @param {Function} reference The reference function. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @returns {Function} Returns `wrapper`. + */ + function setWrapToString(wrapper, reference, bitmask) { + var source = reference + ''; + return setToString( + wrapper, + insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)), + ); + } + + /** + * Creates a function that'll short out and invoke `identity` instead + * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN` + * milliseconds. + * + * @private + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new shortable function. + */ + function shortOut(func) { + var count = 0, + lastCalled = 0; + + return function () { + var stamp = nativeNow(), + remaining = HOT_SPAN - (stamp - lastCalled); + + lastCalled = stamp; + if (remaining > 0) { + if (++count >= HOT_COUNT) { + return arguments[0]; + } + } else { + count = 0; + } + return func.apply(undefined, arguments); + }; + } + + /** + * A specialized version of `_.shuffle` which mutates and sets the size of `array`. + * + * @private + * @param {Array} array The array to shuffle. + * @param {number} [size=array.length] The size of `array`. + * @returns {Array} Returns `array`. + */ + function shuffleSelf(array, size) { + var index = -1, + length = array.length, + lastIndex = length - 1; + + size = size === undefined ? length : size; + while (++index < size) { + var rand = baseRandom(index, lastIndex), + value = array[rand]; + + array[rand] = array[index]; + array[index] = value; + } + array.length = size; + return array; + } + + /** + * Converts `string` to a property path array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the property path array. + */ + var stringToPath = memoizeCapped(function (string) { + var result = []; + if (reLeadingDot.test(string)) { + result.push(''); + } + string.replace(rePropName, function (match, number, quote, string) { + result.push(quote ? string.replace(reEscapeChar, '$1') : number || match); + }); + return result; + }); + + /** + * Converts `value` to a string key if it's not a string or symbol. + * + * @private + * @param {*} value The value to inspect. + * @returns {string|symbol} Returns the key. + */ + function toKey(value) { + if (typeof value == 'string' || isSymbol(value)) { + return value; + } + var result = value + ''; + return result == '0' && 1 / value == -INFINITY ? '-0' : result; + } + + /** + * Converts `func` to its source code. + * + * @private + * @param {Function} func The function to convert. + * @returns {string} Returns the source code. + */ + function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) {} + try { + return func + ''; + } catch (e) {} + } + return ''; + } + + /** + * Updates wrapper `details` based on `bitmask` flags. + * + * @private + * @returns {Array} details The details to modify. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @returns {Array} Returns `details`. + */ + function updateWrapDetails(details, bitmask) { + arrayEach(wrapFlags, function (pair) { + var value = '_.' + pair[0]; + if (bitmask & pair[1] && !arrayIncludes(details, value)) { + details.push(value); + } + }); + return details.sort(); + } + + /** + * Creates a clone of `wrapper`. + * + * @private + * @param {Object} wrapper The wrapper to clone. + * @returns {Object} Returns the cloned wrapper. + */ + function wrapperClone(wrapper) { + if (wrapper instanceof LazyWrapper) { + return wrapper.clone(); + } + var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__); + result.__actions__ = copyArray(wrapper.__actions__); + result.__index__ = wrapper.__index__; + result.__values__ = wrapper.__values__; + return result; + } + + /*------------------------------------------------------------------------*/ + + /** + * Creates an array of elements split into groups the length of `size`. + * If `array` can't be split evenly, the final chunk will be the remaining + * elements. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to process. + * @param {number} [size=1] The length of each chunk + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the new array of chunks. + * @example + * + * _.chunk(['a', 'b', 'c', 'd'], 2); + * // => [['a', 'b'], ['c', 'd']] + * + * _.chunk(['a', 'b', 'c', 'd'], 3); + * // => [['a', 'b', 'c'], ['d']] + */ + function chunk(array, size, guard) { + if (guard ? isIterateeCall(array, size, guard) : size === undefined) { + size = 1; + } else { + size = nativeMax(toInteger(size), 0); + } + var length = array == null ? 0 : array.length; + if (!length || size < 1) { + return []; + } + var index = 0, + resIndex = 0, + result = Array(nativeCeil(length / size)); + + while (index < length) { + result[resIndex++] = baseSlice(array, index, (index += size)); + } + return result; + } + + /** + * Creates an array with all falsey values removed. The values `false`, `null`, + * `0`, `""`, `undefined`, and `NaN` are falsey. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to compact. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.compact([0, 1, false, 2, '', 3]); + * // => [1, 2, 3] + */ + function compact(array) { + var index = -1, + length = array == null ? 0 : array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (value) { + result[resIndex++] = value; + } + } + return result; + } + + /** + * Creates a new array concatenating `array` with any additional arrays + * and/or values. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to concatenate. + * @param {...*} [values] The values to concatenate. + * @returns {Array} Returns the new concatenated array. + * @example + * + * var array = [1]; + * var other = _.concat(array, 2, [3], [[4]]); + * + * console.log(other); + * // => [1, 2, 3, [4]] + * + * console.log(array); + * // => [1] + */ + function concat() { + var length = arguments.length; + if (!length) { + return []; + } + var args = Array(length - 1), + array = arguments[0], + index = length; + + while (index--) { + args[index - 1] = arguments[index]; + } + return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1)); + } + + /** + * Creates an array of `array` values not included in the other given arrays + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. The order and references of result values are + * determined by the first array. + * + * **Note:** Unlike `_.pullAll`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The values to exclude. + * @returns {Array} Returns the new array of filtered values. + * @see _.without, _.xor + * @example + * + * _.difference([2, 1], [2, 3]); + * // => [1] + */ + var difference = baseRest(function (array, values) { + return isArrayLikeObject(array) + ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true)) + : []; + }); + + /** + * This method is like `_.difference` except that it accepts `iteratee` which + * is invoked for each element of `array` and `values` to generate the criterion + * by which they're compared. The order and references of result values are + * determined by the first array. The iteratee is invoked with one argument: + * (value). + * + * **Note:** Unlike `_.pullAllBy`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The values to exclude. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor); + * // => [1.2] + * + * // The `_.property` iteratee shorthand. + * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x'); + * // => [{ 'x': 2 }] + */ + var differenceBy = baseRest(function (array, values) { + var iteratee = last(values); + if (isArrayLikeObject(iteratee)) { + iteratee = undefined; + } + return isArrayLikeObject(array) + ? baseDifference( + array, + baseFlatten(values, 1, isArrayLikeObject, true), + getIteratee(iteratee, 2), + ) + : []; + }); + + /** + * This method is like `_.difference` except that it accepts `comparator` + * which is invoked to compare elements of `array` to `values`. The order and + * references of result values are determined by the first array. The comparator + * is invoked with two arguments: (arrVal, othVal). + * + * **Note:** Unlike `_.pullAllWith`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The values to exclude. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * + * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual); + * // => [{ 'x': 2, 'y': 1 }] + */ + var differenceWith = baseRest(function (array, values) { + var comparator = last(values); + if (isArrayLikeObject(comparator)) { + comparator = undefined; + } + return isArrayLikeObject(array) + ? baseDifference( + array, + baseFlatten(values, 1, isArrayLikeObject, true), + undefined, + comparator, + ) + : []; + }); + + /** + * Creates a slice of `array` with `n` elements dropped from the beginning. + * + * @static + * @memberOf _ + * @since 0.5.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to drop. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.drop([1, 2, 3]); + * // => [2, 3] + * + * _.drop([1, 2, 3], 2); + * // => [3] + * + * _.drop([1, 2, 3], 5); + * // => [] + * + * _.drop([1, 2, 3], 0); + * // => [1, 2, 3] + */ + function drop(array, n, guard) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + n = guard || n === undefined ? 1 : toInteger(n); + return baseSlice(array, n < 0 ? 0 : n, length); + } + + /** + * Creates a slice of `array` with `n` elements dropped from the end. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to drop. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.dropRight([1, 2, 3]); + * // => [1, 2] + * + * _.dropRight([1, 2, 3], 2); + * // => [1] + * + * _.dropRight([1, 2, 3], 5); + * // => [] + * + * _.dropRight([1, 2, 3], 0); + * // => [1, 2, 3] + */ + function dropRight(array, n, guard) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + n = guard || n === undefined ? 1 : toInteger(n); + n = length - n; + return baseSlice(array, 0, n < 0 ? 0 : n); + } + + /** + * Creates a slice of `array` excluding elements dropped from the end. + * Elements are dropped until `predicate` returns falsey. The predicate is + * invoked with three arguments: (value, index, array). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * _.dropRightWhile(users, function(o) { return !o.active; }); + * // => objects for ['barney'] + * + * // The `_.matches` iteratee shorthand. + * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false }); + * // => objects for ['barney', 'fred'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.dropRightWhile(users, ['active', false]); + * // => objects for ['barney'] + * + * // The `_.property` iteratee shorthand. + * _.dropRightWhile(users, 'active'); + * // => objects for ['barney', 'fred', 'pebbles'] + */ + function dropRightWhile(array, predicate) { + return array && array.length ? baseWhile(array, getIteratee(predicate, 3), true, true) : []; + } + + /** + * Creates a slice of `array` excluding elements dropped from the beginning. + * Elements are dropped until `predicate` returns falsey. The predicate is + * invoked with three arguments: (value, index, array). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.dropWhile(users, function(o) { return !o.active; }); + * // => objects for ['pebbles'] + * + * // The `_.matches` iteratee shorthand. + * _.dropWhile(users, { 'user': 'barney', 'active': false }); + * // => objects for ['fred', 'pebbles'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.dropWhile(users, ['active', false]); + * // => objects for ['pebbles'] + * + * // The `_.property` iteratee shorthand. + * _.dropWhile(users, 'active'); + * // => objects for ['barney', 'fred', 'pebbles'] + */ + function dropWhile(array, predicate) { + return array && array.length ? baseWhile(array, getIteratee(predicate, 3), true) : []; + } + + /** + * Fills elements of `array` with `value` from `start` up to, but not + * including, `end`. + * + * **Note:** This method mutates `array`. + * + * @static + * @memberOf _ + * @since 3.2.0 + * @category Array + * @param {Array} array The array to fill. + * @param {*} value The value to fill `array` with. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns `array`. + * @example + * + * var array = [1, 2, 3]; + * + * _.fill(array, 'a'); + * console.log(array); + * // => ['a', 'a', 'a'] + * + * _.fill(Array(3), 2); + * // => [2, 2, 2] + * + * _.fill([4, 6, 8, 10], '*', 1, 3); + * // => [4, '*', '*', 10] + */ + function fill(array, value, start, end) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + if (start && typeof start != 'number' && isIterateeCall(array, value, start)) { + start = 0; + end = length; + } + return baseFill(array, value, start, end); + } + + /** + * This method is like `_.find` except that it returns the index of the first + * element `predicate` returns truthy for instead of the element itself. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.findIndex(users, function(o) { return o.user == 'barney'; }); + * // => 0 + * + * // The `_.matches` iteratee shorthand. + * _.findIndex(users, { 'user': 'fred', 'active': false }); + * // => 1 + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findIndex(users, ['active', false]); + * // => 0 + * + * // The `_.property` iteratee shorthand. + * _.findIndex(users, 'active'); + * // => 2 + */ + function findIndex(array, predicate, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = fromIndex == null ? 0 : toInteger(fromIndex); + if (index < 0) { + index = nativeMax(length + index, 0); + } + return baseFindIndex(array, getIteratee(predicate, 3), index); + } + + /** + * This method is like `_.findIndex` except that it iterates over elements + * of `collection` from right to left. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=array.length-1] The index to search from. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; }); + * // => 2 + * + * // The `_.matches` iteratee shorthand. + * _.findLastIndex(users, { 'user': 'barney', 'active': true }); + * // => 0 + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findLastIndex(users, ['active', false]); + * // => 2 + * + * // The `_.property` iteratee shorthand. + * _.findLastIndex(users, 'active'); + * // => 0 + */ + function findLastIndex(array, predicate, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = length - 1; + if (fromIndex !== undefined) { + index = toInteger(fromIndex); + index = fromIndex < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1); + } + return baseFindIndex(array, getIteratee(predicate, 3), index, true); + } + + /** + * Flattens `array` a single level deep. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to flatten. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flatten([1, [2, [3, [4]], 5]]); + * // => [1, 2, [3, [4]], 5] + */ + function flatten(array) { + var length = array == null ? 0 : array.length; + return length ? baseFlatten(array, 1) : []; + } + + /** + * Recursively flattens `array`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to flatten. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flattenDeep([1, [2, [3, [4]], 5]]); + * // => [1, 2, 3, 4, 5] + */ + function flattenDeep(array) { + var length = array == null ? 0 : array.length; + return length ? baseFlatten(array, INFINITY) : []; + } + + /** + * Recursively flatten `array` up to `depth` times. + * + * @static + * @memberOf _ + * @since 4.4.0 + * @category Array + * @param {Array} array The array to flatten. + * @param {number} [depth=1] The maximum recursion depth. + * @returns {Array} Returns the new flattened array. + * @example + * + * var array = [1, [2, [3, [4]], 5]]; + * + * _.flattenDepth(array, 1); + * // => [1, 2, [3, [4]], 5] + * + * _.flattenDepth(array, 2); + * // => [1, 2, 3, [4], 5] + */ + function flattenDepth(array, depth) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + depth = depth === undefined ? 1 : toInteger(depth); + return baseFlatten(array, depth); + } + + /** + * The inverse of `_.toPairs`; this method returns an object composed + * from key-value `pairs`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} pairs The key-value pairs. + * @returns {Object} Returns the new object. + * @example + * + * _.fromPairs([['a', 1], ['b', 2]]); + * // => { 'a': 1, 'b': 2 } + */ + function fromPairs(pairs) { + var index = -1, + length = pairs == null ? 0 : pairs.length, + result = {}; + + while (++index < length) { + var pair = pairs[index]; + result[pair[0]] = pair[1]; + } + return result; + } + + /** + * Gets the first element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @alias first + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the first element of `array`. + * @example + * + * _.head([1, 2, 3]); + * // => 1 + * + * _.head([]); + * // => undefined + */ + function head(array) { + return array && array.length ? array[0] : undefined; + } + + /** + * Gets the index at which the first occurrence of `value` is found in `array` + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. If `fromIndex` is negative, it's used as the + * offset from the end of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.indexOf([1, 2, 1, 2], 2); + * // => 1 + * + * // Search from the `fromIndex`. + * _.indexOf([1, 2, 1, 2], 2, 2); + * // => 3 + */ + function indexOf(array, value, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = fromIndex == null ? 0 : toInteger(fromIndex); + if (index < 0) { + index = nativeMax(length + index, 0); + } + return baseIndexOf(array, value, index); + } + + /** + * Gets all but the last element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.initial([1, 2, 3]); + * // => [1, 2] + */ + function initial(array) { + var length = array == null ? 0 : array.length; + return length ? baseSlice(array, 0, -1) : []; + } + + /** + * Creates an array of unique values that are included in all given arrays + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. The order and references of result values are + * determined by the first array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of intersecting values. + * @example + * + * _.intersection([2, 1], [2, 3]); + * // => [2] + */ + var intersection = baseRest(function (arrays) { + var mapped = arrayMap(arrays, castArrayLikeObject); + return mapped.length && mapped[0] === arrays[0] ? baseIntersection(mapped) : []; + }); + + /** + * This method is like `_.intersection` except that it accepts `iteratee` + * which is invoked for each element of each `arrays` to generate the criterion + * by which they're compared. The order and references of result values are + * determined by the first array. The iteratee is invoked with one argument: + * (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of intersecting values. + * @example + * + * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor); + * // => [2.1] + * + * // The `_.property` iteratee shorthand. + * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }] + */ + var intersectionBy = baseRest(function (arrays) { + var iteratee = last(arrays), + mapped = arrayMap(arrays, castArrayLikeObject); + + if (iteratee === last(mapped)) { + iteratee = undefined; + } else { + mapped.pop(); + } + return mapped.length && mapped[0] === arrays[0] + ? baseIntersection(mapped, getIteratee(iteratee, 2)) + : []; + }); + + /** + * This method is like `_.intersection` except that it accepts `comparator` + * which is invoked to compare elements of `arrays`. The order and references + * of result values are determined by the first array. The comparator is + * invoked with two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of intersecting values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.intersectionWith(objects, others, _.isEqual); + * // => [{ 'x': 1, 'y': 2 }] + */ + var intersectionWith = baseRest(function (arrays) { + var comparator = last(arrays), + mapped = arrayMap(arrays, castArrayLikeObject); + + comparator = typeof comparator == 'function' ? comparator : undefined; + if (comparator) { + mapped.pop(); + } + return mapped.length && mapped[0] === arrays[0] + ? baseIntersection(mapped, undefined, comparator) + : []; + }); + + /** + * Converts all elements in `array` into a string separated by `separator`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to convert. + * @param {string} [separator=','] The element separator. + * @returns {string} Returns the joined string. + * @example + * + * _.join(['a', 'b', 'c'], '~'); + * // => 'a~b~c' + */ + function join(array, separator) { + return array == null ? '' : nativeJoin.call(array, separator); + } + + /** + * Gets the last element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the last element of `array`. + * @example + * + * _.last([1, 2, 3]); + * // => 3 + */ + function last(array) { + var length = array == null ? 0 : array.length; + return length ? array[length - 1] : undefined; + } + + /** + * This method is like `_.indexOf` except that it iterates over elements of + * `array` from right to left. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} [fromIndex=array.length-1] The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.lastIndexOf([1, 2, 1, 2], 2); + * // => 3 + * + * // Search from the `fromIndex`. + * _.lastIndexOf([1, 2, 1, 2], 2, 2); + * // => 1 + */ + function lastIndexOf(array, value, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = length; + if (fromIndex !== undefined) { + index = toInteger(fromIndex); + index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1); + } + return value === value + ? strictLastIndexOf(array, value, index) + : baseFindIndex(array, baseIsNaN, index, true); + } + + /** + * Gets the element at index `n` of `array`. If `n` is negative, the nth + * element from the end is returned. + * + * @static + * @memberOf _ + * @since 4.11.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=0] The index of the element to return. + * @returns {*} Returns the nth element of `array`. + * @example + * + * var array = ['a', 'b', 'c', 'd']; + * + * _.nth(array, 1); + * // => 'b' + * + * _.nth(array, -2); + * // => 'c'; + */ + function nth(array, n) { + return array && array.length ? baseNth(array, toInteger(n)) : undefined; + } + + /** + * Removes all given values from `array` using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove` + * to remove elements from an array by predicate. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {...*} [values] The values to remove. + * @returns {Array} Returns `array`. + * @example + * + * var array = ['a', 'b', 'c', 'a', 'b', 'c']; + * + * _.pull(array, 'a', 'c'); + * console.log(array); + * // => ['b', 'b'] + */ + var pull = baseRest(pullAll); + + /** + * This method is like `_.pull` except that it accepts an array of values to remove. + * + * **Note:** Unlike `_.difference`, this method mutates `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @returns {Array} Returns `array`. + * @example + * + * var array = ['a', 'b', 'c', 'a', 'b', 'c']; + * + * _.pullAll(array, ['a', 'c']); + * console.log(array); + * // => ['b', 'b'] + */ + function pullAll(array, values) { + return array && array.length && values && values.length ? basePullAll(array, values) : array; + } + + /** + * This method is like `_.pullAll` except that it accepts `iteratee` which is + * invoked for each element of `array` and `values` to generate the criterion + * by which they're compared. The iteratee is invoked with one argument: (value). + * + * **Note:** Unlike `_.differenceBy`, this method mutates `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns `array`. + * @example + * + * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }]; + * + * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x'); + * console.log(array); + * // => [{ 'x': 2 }] + */ + function pullAllBy(array, values, iteratee) { + return array && array.length && values && values.length + ? basePullAll(array, values, getIteratee(iteratee, 2)) + : array; + } + + /** + * This method is like `_.pullAll` except that it accepts `comparator` which + * is invoked to compare elements of `array` to `values`. The comparator is + * invoked with two arguments: (arrVal, othVal). + * + * **Note:** Unlike `_.differenceWith`, this method mutates `array`. + * + * @static + * @memberOf _ + * @since 4.6.0 + * @category Array + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns `array`. + * @example + * + * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }]; + * + * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual); + * console.log(array); + * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }] + */ + function pullAllWith(array, values, comparator) { + return array && array.length && values && values.length + ? basePullAll(array, values, undefined, comparator) + : array; + } + + /** + * Removes elements from `array` corresponding to `indexes` and returns an + * array of removed elements. + * + * **Note:** Unlike `_.at`, this method mutates `array`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {...(number|number[])} [indexes] The indexes of elements to remove. + * @returns {Array} Returns the new array of removed elements. + * @example + * + * var array = ['a', 'b', 'c', 'd']; + * var pulled = _.pullAt(array, [1, 3]); + * + * console.log(array); + * // => ['a', 'c'] + * + * console.log(pulled); + * // => ['b', 'd'] + */ + var pullAt = flatRest(function (array, indexes) { + var length = array == null ? 0 : array.length, + result = baseAt(array, indexes); + + basePullAt( + array, + arrayMap(indexes, function (index) { + return isIndex(index, length) ? +index : index; + }).sort(compareAscending), + ); + + return result; + }); + + /** + * Removes all elements from `array` that `predicate` returns truthy for + * and returns an array of the removed elements. The predicate is invoked + * with three arguments: (value, index, array). + * + * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull` + * to pull elements from an array by value. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new array of removed elements. + * @example + * + * var array = [1, 2, 3, 4]; + * var evens = _.remove(array, function(n) { + * return n % 2 == 0; + * }); + * + * console.log(array); + * // => [1, 3] + * + * console.log(evens); + * // => [2, 4] + */ + function remove(array, predicate) { + var result = []; + if (!(array && array.length)) { + return result; + } + var index = -1, + indexes = [], + length = array.length; + + predicate = getIteratee(predicate, 3); + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result.push(value); + indexes.push(index); + } + } + basePullAt(array, indexes); + return result; + } + + /** + * Reverses `array` so that the first element becomes the last, the second + * element becomes the second to last, and so on. + * + * **Note:** This method mutates `array` and is based on + * [`Array#reverse`](https://mdn.io/Array/reverse). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to modify. + * @returns {Array} Returns `array`. + * @example + * + * var array = [1, 2, 3]; + * + * _.reverse(array); + * // => [3, 2, 1] + * + * console.log(array); + * // => [3, 2, 1] + */ + function reverse(array) { + return array == null ? array : nativeReverse.call(array); + } + + /** + * Creates a slice of `array` from `start` up to, but not including, `end`. + * + * **Note:** This method is used instead of + * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are + * returned. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to slice. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the slice of `array`. + */ + function slice(array, start, end) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + if (end && typeof end != 'number' && isIterateeCall(array, start, end)) { + start = 0; + end = length; + } else { + start = start == null ? 0 : toInteger(start); + end = end === undefined ? length : toInteger(end); + } + return baseSlice(array, start, end); + } + + /** + * Uses a binary search to determine the lowest index at which `value` + * should be inserted into `array` in order to maintain its sort order. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * _.sortedIndex([30, 50], 40); + * // => 1 + */ + function sortedIndex(array, value) { + return baseSortedIndex(array, value); + } + + /** + * This method is like `_.sortedIndex` except that it accepts `iteratee` + * which is invoked for `value` and each element of `array` to compute their + * sort ranking. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * var objects = [{ 'x': 4 }, { 'x': 5 }]; + * + * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; }); + * // => 0 + * + * // The `_.property` iteratee shorthand. + * _.sortedIndexBy(objects, { 'x': 4 }, 'x'); + * // => 0 + */ + function sortedIndexBy(array, value, iteratee) { + return baseSortedIndexBy(array, value, getIteratee(iteratee, 2)); + } + + /** + * This method is like `_.indexOf` except that it performs a binary + * search on a sorted `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.sortedIndexOf([4, 5, 5, 5, 6], 5); + * // => 1 + */ + function sortedIndexOf(array, value) { + var length = array == null ? 0 : array.length; + if (length) { + var index = baseSortedIndex(array, value); + if (index < length && eq(array[index], value)) { + return index; + } + } + return -1; + } + + /** + * This method is like `_.sortedIndex` except that it returns the highest + * index at which `value` should be inserted into `array` in order to + * maintain its sort order. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * _.sortedLastIndex([4, 5, 5, 5, 6], 5); + * // => 4 + */ + function sortedLastIndex(array, value) { + return baseSortedIndex(array, value, true); + } + + /** + * This method is like `_.sortedLastIndex` except that it accepts `iteratee` + * which is invoked for `value` and each element of `array` to compute their + * sort ranking. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * var objects = [{ 'x': 4 }, { 'x': 5 }]; + * + * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; }); + * // => 1 + * + * // The `_.property` iteratee shorthand. + * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x'); + * // => 1 + */ + function sortedLastIndexBy(array, value, iteratee) { + return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true); + } + + /** + * This method is like `_.lastIndexOf` except that it performs a binary + * search on a sorted `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5); + * // => 3 + */ + function sortedLastIndexOf(array, value) { + var length = array == null ? 0 : array.length; + if (length) { + var index = baseSortedIndex(array, value, true) - 1; + if (eq(array[index], value)) { + return index; + } + } + return -1; + } + + /** + * This method is like `_.uniq` except that it's designed and optimized + * for sorted arrays. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.sortedUniq([1, 1, 2]); + * // => [1, 2] + */ + function sortedUniq(array) { + return array && array.length ? baseSortedUniq(array) : []; + } + + /** + * This method is like `_.uniqBy` except that it's designed and optimized + * for sorted arrays. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor); + * // => [1.1, 2.3] + */ + function sortedUniqBy(array, iteratee) { + return array && array.length ? baseSortedUniq(array, getIteratee(iteratee, 2)) : []; + } + + /** + * Gets all but the first element of `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to query. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.tail([1, 2, 3]); + * // => [2, 3] + */ + function tail(array) { + var length = array == null ? 0 : array.length; + return length ? baseSlice(array, 1, length) : []; + } + + /** + * Creates a slice of `array` with `n` elements taken from the beginning. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to take. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.take([1, 2, 3]); + * // => [1] + * + * _.take([1, 2, 3], 2); + * // => [1, 2] + * + * _.take([1, 2, 3], 5); + * // => [1, 2, 3] + * + * _.take([1, 2, 3], 0); + * // => [] + */ + function take(array, n, guard) { + if (!(array && array.length)) { + return []; + } + n = guard || n === undefined ? 1 : toInteger(n); + return baseSlice(array, 0, n < 0 ? 0 : n); + } + + /** + * Creates a slice of `array` with `n` elements taken from the end. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to take. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.takeRight([1, 2, 3]); + * // => [3] + * + * _.takeRight([1, 2, 3], 2); + * // => [2, 3] + * + * _.takeRight([1, 2, 3], 5); + * // => [1, 2, 3] + * + * _.takeRight([1, 2, 3], 0); + * // => [] + */ + function takeRight(array, n, guard) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + n = guard || n === undefined ? 1 : toInteger(n); + n = length - n; + return baseSlice(array, n < 0 ? 0 : n, length); + } + + /** + * Creates a slice of `array` with elements taken from the end. Elements are + * taken until `predicate` returns falsey. The predicate is invoked with + * three arguments: (value, index, array). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * _.takeRightWhile(users, function(o) { return !o.active; }); + * // => objects for ['fred', 'pebbles'] + * + * // The `_.matches` iteratee shorthand. + * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false }); + * // => objects for ['pebbles'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.takeRightWhile(users, ['active', false]); + * // => objects for ['fred', 'pebbles'] + * + * // The `_.property` iteratee shorthand. + * _.takeRightWhile(users, 'active'); + * // => [] + */ + function takeRightWhile(array, predicate) { + return array && array.length ? baseWhile(array, getIteratee(predicate, 3), false, true) : []; + } + + /** + * Creates a slice of `array` with elements taken from the beginning. Elements + * are taken until `predicate` returns falsey. The predicate is invoked with + * three arguments: (value, index, array). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.takeWhile(users, function(o) { return !o.active; }); + * // => objects for ['barney', 'fred'] + * + * // The `_.matches` iteratee shorthand. + * _.takeWhile(users, { 'user': 'barney', 'active': false }); + * // => objects for ['barney'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.takeWhile(users, ['active', false]); + * // => objects for ['barney', 'fred'] + * + * // The `_.property` iteratee shorthand. + * _.takeWhile(users, 'active'); + * // => [] + */ + function takeWhile(array, predicate) { + return array && array.length ? baseWhile(array, getIteratee(predicate, 3)) : []; + } + + /** + * Creates an array of unique values, in order, from all given arrays using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of combined values. + * @example + * + * _.union([2], [1, 2]); + * // => [2, 1] + */ + var union = baseRest(function (arrays) { + return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true)); + }); + + /** + * This method is like `_.union` except that it accepts `iteratee` which is + * invoked for each element of each `arrays` to generate the criterion by + * which uniqueness is computed. Result values are chosen from the first + * array in which the value occurs. The iteratee is invoked with one argument: + * (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of combined values. + * @example + * + * _.unionBy([2.1], [1.2, 2.3], Math.floor); + * // => [2.1, 1.2] + * + * // The `_.property` iteratee shorthand. + * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }, { 'x': 2 }] + */ + var unionBy = baseRest(function (arrays) { + var iteratee = last(arrays); + if (isArrayLikeObject(iteratee)) { + iteratee = undefined; + } + return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2)); + }); + + /** + * This method is like `_.union` except that it accepts `comparator` which + * is invoked to compare elements of `arrays`. Result values are chosen from + * the first array in which the value occurs. The comparator is invoked + * with two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of combined values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.unionWith(objects, others, _.isEqual); + * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }] + */ + var unionWith = baseRest(function (arrays) { + var comparator = last(arrays); + comparator = typeof comparator == 'function' ? comparator : undefined; + return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator); + }); + + /** + * Creates a duplicate-free version of an array, using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons, in which only the first occurrence of each element + * is kept. The order of result values is determined by the order they occur + * in the array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.uniq([2, 1, 2]); + * // => [2, 1] + */ + function uniq(array) { + return array && array.length ? baseUniq(array) : []; + } + + /** + * This method is like `_.uniq` except that it accepts `iteratee` which is + * invoked for each element in `array` to generate the criterion by which + * uniqueness is computed. The order of result values is determined by the + * order they occur in the array. The iteratee is invoked with one argument: + * (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.uniqBy([2.1, 1.2, 2.3], Math.floor); + * // => [2.1, 1.2] + * + * // The `_.property` iteratee shorthand. + * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }, { 'x': 2 }] + */ + function uniqBy(array, iteratee) { + return array && array.length ? baseUniq(array, getIteratee(iteratee, 2)) : []; + } + + /** + * This method is like `_.uniq` except that it accepts `comparator` which + * is invoked to compare elements of `array`. The order of result values is + * determined by the order they occur in the array.The comparator is invoked + * with two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.uniqWith(objects, _.isEqual); + * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }] + */ + function uniqWith(array, comparator) { + comparator = typeof comparator == 'function' ? comparator : undefined; + return array && array.length ? baseUniq(array, undefined, comparator) : []; + } + + /** + * This method is like `_.zip` except that it accepts an array of grouped + * elements and creates an array regrouping the elements to their pre-zip + * configuration. + * + * @static + * @memberOf _ + * @since 1.2.0 + * @category Array + * @param {Array} array The array of grouped elements to process. + * @returns {Array} Returns the new array of regrouped elements. + * @example + * + * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]); + * // => [['a', 1, true], ['b', 2, false]] + * + * _.unzip(zipped); + * // => [['a', 'b'], [1, 2], [true, false]] + */ + function unzip(array) { + if (!(array && array.length)) { + return []; + } + var length = 0; + array = arrayFilter(array, function (group) { + if (isArrayLikeObject(group)) { + length = nativeMax(group.length, length); + return true; + } + }); + return baseTimes(length, function (index) { + return arrayMap(array, baseProperty(index)); + }); + } + + /** + * This method is like `_.unzip` except that it accepts `iteratee` to specify + * how regrouped values should be combined. The iteratee is invoked with the + * elements of each group: (...group). + * + * @static + * @memberOf _ + * @since 3.8.0 + * @category Array + * @param {Array} array The array of grouped elements to process. + * @param {Function} [iteratee=_.identity] The function to combine + * regrouped values. + * @returns {Array} Returns the new array of regrouped elements. + * @example + * + * var zipped = _.zip([1, 2], [10, 20], [100, 200]); + * // => [[1, 10, 100], [2, 20, 200]] + * + * _.unzipWith(zipped, _.add); + * // => [3, 30, 300] + */ + function unzipWith(array, iteratee) { + if (!(array && array.length)) { + return []; + } + var result = unzip(array); + if (iteratee == null) { + return result; + } + return arrayMap(result, function (group) { + return apply(iteratee, undefined, group); + }); + } + + /** + * Creates an array excluding all given values using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * **Note:** Unlike `_.pull`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...*} [values] The values to exclude. + * @returns {Array} Returns the new array of filtered values. + * @see _.difference, _.xor + * @example + * + * _.without([2, 1, 2, 3], 1, 2); + * // => [3] + */ + var without = baseRest(function (array, values) { + return isArrayLikeObject(array) ? baseDifference(array, values) : []; + }); + + /** + * Creates an array of unique values that is the + * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference) + * of the given arrays. The order of result values is determined by the order + * they occur in the arrays. + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of filtered values. + * @see _.difference, _.without + * @example + * + * _.xor([2, 1], [2, 3]); + * // => [1, 3] + */ + var xor = baseRest(function (arrays) { + return baseXor(arrayFilter(arrays, isArrayLikeObject)); + }); + + /** + * This method is like `_.xor` except that it accepts `iteratee` which is + * invoked for each element of each `arrays` to generate the criterion by + * which by which they're compared. The order of result values is determined + * by the order they occur in the arrays. The iteratee is invoked with one + * argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor); + * // => [1.2, 3.4] + * + * // The `_.property` iteratee shorthand. + * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 2 }] + */ + var xorBy = baseRest(function (arrays) { + var iteratee = last(arrays); + if (isArrayLikeObject(iteratee)) { + iteratee = undefined; + } + return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2)); + }); + + /** + * This method is like `_.xor` except that it accepts `comparator` which is + * invoked to compare elements of `arrays`. The order of result values is + * determined by the order they occur in the arrays. The comparator is invoked + * with two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.xorWith(objects, others, _.isEqual); + * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }] + */ + var xorWith = baseRest(function (arrays) { + var comparator = last(arrays); + comparator = typeof comparator == 'function' ? comparator : undefined; + return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator); + }); + + /** + * Creates an array of grouped elements, the first of which contains the + * first elements of the given arrays, the second of which contains the + * second elements of the given arrays, and so on. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {...Array} [arrays] The arrays to process. + * @returns {Array} Returns the new array of grouped elements. + * @example + * + * _.zip(['a', 'b'], [1, 2], [true, false]); + * // => [['a', 1, true], ['b', 2, false]] + */ + var zip = baseRest(unzip); + + /** + * This method is like `_.fromPairs` except that it accepts two arrays, + * one of property identifiers and one of corresponding values. + * + * @static + * @memberOf _ + * @since 0.4.0 + * @category Array + * @param {Array} [props=[]] The property identifiers. + * @param {Array} [values=[]] The property values. + * @returns {Object} Returns the new object. + * @example + * + * _.zipObject(['a', 'b'], [1, 2]); + * // => { 'a': 1, 'b': 2 } + */ + function zipObject(props, values) { + return baseZipObject(props || [], values || [], assignValue); + } + + /** + * This method is like `_.zipObject` except that it supports property paths. + * + * @static + * @memberOf _ + * @since 4.1.0 + * @category Array + * @param {Array} [props=[]] The property identifiers. + * @param {Array} [values=[]] The property values. + * @returns {Object} Returns the new object. + * @example + * + * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]); + * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } } + */ + function zipObjectDeep(props, values) { + return baseZipObject(props || [], values || [], baseSet); + } + + /** + * This method is like `_.zip` except that it accepts `iteratee` to specify + * how grouped values should be combined. The iteratee is invoked with the + * elements of each group: (...group). + * + * @static + * @memberOf _ + * @since 3.8.0 + * @category Array + * @param {...Array} [arrays] The arrays to process. + * @param {Function} [iteratee=_.identity] The function to combine + * grouped values. + * @returns {Array} Returns the new array of grouped elements. + * @example + * + * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) { + * return a + b + c; + * }); + * // => [111, 222] + */ + var zipWith = baseRest(function (arrays) { + var length = arrays.length, + iteratee = length > 1 ? arrays[length - 1] : undefined; + + iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined; + return unzipWith(arrays, iteratee); + }); + + /*------------------------------------------------------------------------*/ + + /** + * Creates a `lodash` wrapper instance that wraps `value` with explicit method + * chain sequences enabled. The result of such sequences must be unwrapped + * with `_#value`. + * + * @static + * @memberOf _ + * @since 1.3.0 + * @category Seq + * @param {*} value The value to wrap. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 }, + * { 'user': 'pebbles', 'age': 1 } + * ]; + * + * var youngest = _ + * .chain(users) + * .sortBy('age') + * .map(function(o) { + * return o.user + ' is ' + o.age; + * }) + * .head() + * .value(); + * // => 'pebbles is 1' + */ + function chain(value) { + var result = lodash(value); + result.__chain__ = true; + return result; + } + + /** + * This method invokes `interceptor` and returns `value`. The interceptor + * is invoked with one argument; (value). The purpose of this method is to + * "tap into" a method chain sequence in order to modify intermediate results. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Seq + * @param {*} value The value to provide to `interceptor`. + * @param {Function} interceptor The function to invoke. + * @returns {*} Returns `value`. + * @example + * + * _([1, 2, 3]) + * .tap(function(array) { + * // Mutate input array. + * array.pop(); + * }) + * .reverse() + * .value(); + * // => [2, 1] + */ + function tap(value, interceptor) { + interceptor(value); + return value; + } + + /** + * This method is like `_.tap` except that it returns the result of `interceptor`. + * The purpose of this method is to "pass thru" values replacing intermediate + * results in a method chain sequence. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Seq + * @param {*} value The value to provide to `interceptor`. + * @param {Function} interceptor The function to invoke. + * @returns {*} Returns the result of `interceptor`. + * @example + * + * _(' abc ') + * .chain() + * .trim() + * .thru(function(value) { + * return [value]; + * }) + * .value(); + * // => ['abc'] + */ + function thru(value, interceptor) { + return interceptor(value); + } + + /** + * This method is the wrapper version of `_.at`. + * + * @name at + * @memberOf _ + * @since 1.0.0 + * @category Seq + * @param {...(string|string[])} [paths] The property paths to pick. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] }; + * + * _(object).at(['a[0].b.c', 'a[1]']).value(); + * // => [3, 4] + */ + var wrapperAt = flatRest(function (paths) { + var length = paths.length, + start = length ? paths[0] : 0, + value = this.__wrapped__, + interceptor = function (object) { + return baseAt(object, paths); + }; + + if ( + length > 1 || + this.__actions__.length || + !(value instanceof LazyWrapper) || + !isIndex(start) + ) { + return this.thru(interceptor); + } + value = value.slice(start, +start + (length ? 1 : 0)); + value.__actions__.push({ + func: thru, + args: [interceptor], + thisArg: undefined, + }); + return new LodashWrapper(value, this.__chain__).thru(function (array) { + if (length && !array.length) { + array.push(undefined); + } + return array; + }); + }); + + /** + * Creates a `lodash` wrapper instance with explicit method chain sequences enabled. + * + * @name chain + * @memberOf _ + * @since 0.1.0 + * @category Seq + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 } + * ]; + * + * // A sequence without explicit chaining. + * _(users).head(); + * // => { 'user': 'barney', 'age': 36 } + * + * // A sequence with explicit chaining. + * _(users) + * .chain() + * .head() + * .pick('user') + * .value(); + * // => { 'user': 'barney' } + */ + function wrapperChain() { + return chain(this); + } + + /** + * Executes the chain sequence and returns the wrapped result. + * + * @name commit + * @memberOf _ + * @since 3.2.0 + * @category Seq + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var array = [1, 2]; + * var wrapped = _(array).push(3); + * + * console.log(array); + * // => [1, 2] + * + * wrapped = wrapped.commit(); + * console.log(array); + * // => [1, 2, 3] + * + * wrapped.last(); + * // => 3 + * + * console.log(array); + * // => [1, 2, 3] + */ + function wrapperCommit() { + return new LodashWrapper(this.value(), this.__chain__); + } + + /** + * Gets the next value on a wrapped object following the + * [iterator protocol](https://mdn.io/iteration_protocols#iterator). + * + * @name next + * @memberOf _ + * @since 4.0.0 + * @category Seq + * @returns {Object} Returns the next iterator value. + * @example + * + * var wrapped = _([1, 2]); + * + * wrapped.next(); + * // => { 'done': false, 'value': 1 } + * + * wrapped.next(); + * // => { 'done': false, 'value': 2 } + * + * wrapped.next(); + * // => { 'done': true, 'value': undefined } + */ + function wrapperNext() { + if (this.__values__ === undefined) { + this.__values__ = toArray(this.value()); + } + var done = this.__index__ >= this.__values__.length, + value = done ? undefined : this.__values__[this.__index__++]; + + return { done: done, value: value }; + } + + /** + * Enables the wrapper to be iterable. + * + * @name Symbol.iterator + * @memberOf _ + * @since 4.0.0 + * @category Seq + * @returns {Object} Returns the wrapper object. + * @example + * + * var wrapped = _([1, 2]); + * + * wrapped[Symbol.iterator]() === wrapped; + * // => true + * + * Array.from(wrapped); + * // => [1, 2] + */ + function wrapperToIterator() { + return this; + } + + /** + * Creates a clone of the chain sequence planting `value` as the wrapped value. + * + * @name plant + * @memberOf _ + * @since 3.2.0 + * @category Seq + * @param {*} value The value to plant. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * function square(n) { + * return n * n; + * } + * + * var wrapped = _([1, 2]).map(square); + * var other = wrapped.plant([3, 4]); + * + * other.value(); + * // => [9, 16] + * + * wrapped.value(); + * // => [1, 4] + */ + function wrapperPlant(value) { + var result, + parent = this; + + while (parent instanceof baseLodash) { + var clone = wrapperClone(parent); + clone.__index__ = 0; + clone.__values__ = undefined; + if (result) { + previous.__wrapped__ = clone; + } else { + result = clone; + } + var previous = clone; + parent = parent.__wrapped__; + } + previous.__wrapped__ = value; + return result; + } + + /** + * This method is the wrapper version of `_.reverse`. + * + * **Note:** This method mutates the wrapped array. + * + * @name reverse + * @memberOf _ + * @since 0.1.0 + * @category Seq + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var array = [1, 2, 3]; + * + * _(array).reverse().value() + * // => [3, 2, 1] + * + * console.log(array); + * // => [3, 2, 1] + */ + function wrapperReverse() { + var value = this.__wrapped__; + if (value instanceof LazyWrapper) { + var wrapped = value; + if (this.__actions__.length) { + wrapped = new LazyWrapper(this); + } + wrapped = wrapped.reverse(); + wrapped.__actions__.push({ + func: thru, + args: [reverse], + thisArg: undefined, + }); + return new LodashWrapper(wrapped, this.__chain__); + } + return this.thru(reverse); + } + + /** + * Executes the chain sequence to resolve the unwrapped value. + * + * @name value + * @memberOf _ + * @since 0.1.0 + * @alias toJSON, valueOf + * @category Seq + * @returns {*} Returns the resolved unwrapped value. + * @example + * + * _([1, 2, 3]).value(); + * // => [1, 2, 3] + */ + function wrapperValue() { + return baseWrapperValue(this.__wrapped__, this.__actions__); + } + + /*------------------------------------------------------------------------*/ + + /** + * Creates an object composed of keys generated from the results of running + * each element of `collection` thru `iteratee`. The corresponding value of + * each key is the number of times the key was returned by `iteratee`. The + * iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 0.5.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee to transform keys. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * _.countBy([6.1, 4.2, 6.3], Math.floor); + * // => { '4': 1, '6': 2 } + * + * // The `_.property` iteratee shorthand. + * _.countBy(['one', 'two', 'three'], 'length'); + * // => { '3': 2, '5': 1 } + */ + var countBy = createAggregator(function (result, value, key) { + if (hasOwnProperty.call(result, key)) { + ++result[key]; + } else { + baseAssignValue(result, key, 1); + } + }); + + /** + * Checks if `predicate` returns truthy for **all** elements of `collection`. + * Iteration is stopped once `predicate` returns falsey. The predicate is + * invoked with three arguments: (value, index|key, collection). + * + * **Note:** This method returns `true` for + * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because + * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of + * elements of empty collections. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false`. + * @example + * + * _.every([true, 1, null, 'yes'], Boolean); + * // => false + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * // The `_.matches` iteratee shorthand. + * _.every(users, { 'user': 'barney', 'active': false }); + * // => false + * + * // The `_.matchesProperty` iteratee shorthand. + * _.every(users, ['active', false]); + * // => true + * + * // The `_.property` iteratee shorthand. + * _.every(users, 'active'); + * // => false + */ + function every(collection, predicate, guard) { + var func = isArray(collection) ? arrayEvery : baseEvery; + if (guard && isIterateeCall(collection, predicate, guard)) { + predicate = undefined; + } + return func(collection, getIteratee(predicate, 3)); + } + + /** + * Iterates over elements of `collection`, returning an array of all elements + * `predicate` returns truthy for. The predicate is invoked with three + * arguments: (value, index|key, collection). + * + * **Note:** Unlike `_.remove`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + * @see _.reject + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * _.filter(users, function(o) { return !o.active; }); + * // => objects for ['fred'] + * + * // The `_.matches` iteratee shorthand. + * _.filter(users, { 'age': 36, 'active': true }); + * // => objects for ['barney'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.filter(users, ['active', false]); + * // => objects for ['fred'] + * + * // The `_.property` iteratee shorthand. + * _.filter(users, 'active'); + * // => objects for ['barney'] + */ + function filter(collection, predicate) { + var func = isArray(collection) ? arrayFilter : baseFilter; + return func(collection, getIteratee(predicate, 3)); + } + + /** + * Iterates over elements of `collection`, returning the first element + * `predicate` returns truthy for. The predicate is invoked with three + * arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. + * @returns {*} Returns the matched element, else `undefined`. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false }, + * { 'user': 'pebbles', 'age': 1, 'active': true } + * ]; + * + * _.find(users, function(o) { return o.age < 40; }); + * // => object for 'barney' + * + * // The `_.matches` iteratee shorthand. + * _.find(users, { 'age': 1, 'active': true }); + * // => object for 'pebbles' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.find(users, ['active', false]); + * // => object for 'fred' + * + * // The `_.property` iteratee shorthand. + * _.find(users, 'active'); + * // => object for 'barney' + */ + var find = createFind(findIndex); + + /** + * This method is like `_.find` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Collection + * @param {Array|Object} collection The collection to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=collection.length-1] The index to search from. + * @returns {*} Returns the matched element, else `undefined`. + * @example + * + * _.findLast([1, 2, 3, 4], function(n) { + * return n % 2 == 1; + * }); + * // => 3 + */ + var findLast = createFind(findLastIndex); + + /** + * Creates a flattened array of values by running each element in `collection` + * thru `iteratee` and flattening the mapped results. The iteratee is invoked + * with three arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new flattened array. + * @example + * + * function duplicate(n) { + * return [n, n]; + * } + * + * _.flatMap([1, 2], duplicate); + * // => [1, 1, 2, 2] + */ + function flatMap(collection, iteratee) { + return baseFlatten(map(collection, iteratee), 1); + } + + /** + * This method is like `_.flatMap` except that it recursively flattens the + * mapped results. + * + * @static + * @memberOf _ + * @since 4.7.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new flattened array. + * @example + * + * function duplicate(n) { + * return [[[n, n]]]; + * } + * + * _.flatMapDeep([1, 2], duplicate); + * // => [1, 1, 2, 2] + */ + function flatMapDeep(collection, iteratee) { + return baseFlatten(map(collection, iteratee), INFINITY); + } + + /** + * This method is like `_.flatMap` except that it recursively flattens the + * mapped results up to `depth` times. + * + * @static + * @memberOf _ + * @since 4.7.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {number} [depth=1] The maximum recursion depth. + * @returns {Array} Returns the new flattened array. + * @example + * + * function duplicate(n) { + * return [[[n, n]]]; + * } + * + * _.flatMapDepth([1, 2], duplicate, 2); + * // => [[1, 1], [2, 2]] + */ + function flatMapDepth(collection, iteratee, depth) { + depth = depth === undefined ? 1 : toInteger(depth); + return baseFlatten(map(collection, iteratee), depth); + } + + /** + * Iterates over elements of `collection` and invokes `iteratee` for each element. + * The iteratee is invoked with three arguments: (value, index|key, collection). + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * **Note:** As with other "Collections" methods, objects with a "length" + * property are iterated like arrays. To avoid this behavior use `_.forIn` + * or `_.forOwn` for object iteration. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @alias each + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + * @see _.forEachRight + * @example + * + * _.forEach([1, 2], function(value) { + * console.log(value); + * }); + * // => Logs `1` then `2`. + * + * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a' then 'b' (iteration order is not guaranteed). + */ + function forEach(collection, iteratee) { + var func = isArray(collection) ? arrayEach : baseEach; + return func(collection, getIteratee(iteratee, 3)); + } + + /** + * This method is like `_.forEach` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @alias eachRight + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + * @see _.forEach + * @example + * + * _.forEachRight([1, 2], function(value) { + * console.log(value); + * }); + * // => Logs `2` then `1`. + */ + function forEachRight(collection, iteratee) { + var func = isArray(collection) ? arrayEachRight : baseEachRight; + return func(collection, getIteratee(iteratee, 3)); + } + + /** + * Creates an object composed of keys generated from the results of running + * each element of `collection` thru `iteratee`. The order of grouped values + * is determined by the order they occur in `collection`. The corresponding + * value of each key is an array of elements responsible for generating the + * key. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee to transform keys. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * _.groupBy([6.1, 4.2, 6.3], Math.floor); + * // => { '4': [4.2], '6': [6.1, 6.3] } + * + * // The `_.property` iteratee shorthand. + * _.groupBy(['one', 'two', 'three'], 'length'); + * // => { '3': ['one', 'two'], '5': ['three'] } + */ + var groupBy = createAggregator(function (result, value, key) { + if (hasOwnProperty.call(result, key)) { + result[key].push(value); + } else { + baseAssignValue(result, key, [value]); + } + }); + + /** + * Checks if `value` is in `collection`. If `collection` is a string, it's + * checked for a substring of `value`, otherwise + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * is used for equality comparisons. If `fromIndex` is negative, it's used as + * the offset from the end of `collection`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object|string} collection The collection to inspect. + * @param {*} value The value to search for. + * @param {number} [fromIndex=0] The index to search from. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`. + * @returns {boolean} Returns `true` if `value` is found, else `false`. + * @example + * + * _.includes([1, 2, 3], 1); + * // => true + * + * _.includes([1, 2, 3], 1, 2); + * // => false + * + * _.includes({ 'a': 1, 'b': 2 }, 1); + * // => true + * + * _.includes('abcd', 'bc'); + * // => true + */ + function includes(collection, value, fromIndex, guard) { + collection = isArrayLike(collection) ? collection : values(collection); + fromIndex = fromIndex && !guard ? toInteger(fromIndex) : 0; + + var length = collection.length; + if (fromIndex < 0) { + fromIndex = nativeMax(length + fromIndex, 0); + } + return isString(collection) + ? fromIndex <= length && collection.indexOf(value, fromIndex) > -1 + : !!length && baseIndexOf(collection, value, fromIndex) > -1; + } + + /** + * Invokes the method at `path` of each element in `collection`, returning + * an array of the results of each invoked method. Any additional arguments + * are provided to each invoked method. If `path` is a function, it's invoked + * for, and `this` bound to, each element in `collection`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Array|Function|string} path The path of the method to invoke or + * the function invoked per iteration. + * @param {...*} [args] The arguments to invoke each method with. + * @returns {Array} Returns the array of results. + * @example + * + * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort'); + * // => [[1, 5, 7], [1, 2, 3]] + * + * _.invokeMap([123, 456], String.prototype.split, ''); + * // => [['1', '2', '3'], ['4', '5', '6']] + */ + var invokeMap = baseRest(function (collection, path, args) { + var index = -1, + isFunc = typeof path == 'function', + result = isArrayLike(collection) ? Array(collection.length) : []; + + baseEach(collection, function (value) { + result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args); + }); + return result; + }); + + /** + * Creates an object composed of keys generated from the results of running + * each element of `collection` thru `iteratee`. The corresponding value of + * each key is the last element responsible for generating the key. The + * iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee to transform keys. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * var array = [ + * { 'dir': 'left', 'code': 97 }, + * { 'dir': 'right', 'code': 100 } + * ]; + * + * _.keyBy(array, function(o) { + * return String.fromCharCode(o.code); + * }); + * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } } + * + * _.keyBy(array, 'dir'); + * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } } + */ + var keyBy = createAggregator(function (result, value, key) { + baseAssignValue(result, key, value); + }); + + /** + * Creates an array of values by running each element in `collection` thru + * `iteratee`. The iteratee is invoked with three arguments: + * (value, index|key, collection). + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. + * + * The guarded methods are: + * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`, + * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`, + * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`, + * `template`, `trim`, `trimEnd`, `trimStart`, and `words` + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + * @example + * + * function square(n) { + * return n * n; + * } + * + * _.map([4, 8], square); + * // => [16, 64] + * + * _.map({ 'a': 4, 'b': 8 }, square); + * // => [16, 64] (iteration order is not guaranteed) + * + * var users = [ + * { 'user': 'barney' }, + * { 'user': 'fred' } + * ]; + * + * // The `_.property` iteratee shorthand. + * _.map(users, 'user'); + * // => ['barney', 'fred'] + */ + function map(collection, iteratee) { + var func = isArray(collection) ? arrayMap : baseMap; + return func(collection, getIteratee(iteratee, 3)); + } + + /** + * This method is like `_.sortBy` except that it allows specifying the sort + * orders of the iteratees to sort by. If `orders` is unspecified, all values + * are sorted in ascending order. Otherwise, specify an order of "desc" for + * descending or "asc" for ascending sort order of corresponding values. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]] + * The iteratees to sort by. + * @param {string[]} [orders] The sort orders of `iteratees`. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`. + * @returns {Array} Returns the new sorted array. + * @example + * + * var users = [ + * { 'user': 'fred', 'age': 48 }, + * { 'user': 'barney', 'age': 34 }, + * { 'user': 'fred', 'age': 40 }, + * { 'user': 'barney', 'age': 36 } + * ]; + * + * // Sort by `user` in ascending order and by `age` in descending order. + * _.orderBy(users, ['user', 'age'], ['asc', 'desc']); + * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]] + */ + function orderBy(collection, iteratees, orders, guard) { + if (collection == null) { + return []; + } + if (!isArray(iteratees)) { + iteratees = iteratees == null ? [] : [iteratees]; + } + orders = guard ? undefined : orders; + if (!isArray(orders)) { + orders = orders == null ? [] : [orders]; + } + return baseOrderBy(collection, iteratees, orders); + } + + /** + * Creates an array of elements split into two groups, the first of which + * contains elements `predicate` returns truthy for, the second of which + * contains elements `predicate` returns falsey for. The predicate is + * invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the array of grouped elements. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false }, + * { 'user': 'fred', 'age': 40, 'active': true }, + * { 'user': 'pebbles', 'age': 1, 'active': false } + * ]; + * + * _.partition(users, function(o) { return o.active; }); + * // => objects for [['fred'], ['barney', 'pebbles']] + * + * // The `_.matches` iteratee shorthand. + * _.partition(users, { 'age': 1, 'active': false }); + * // => objects for [['pebbles'], ['barney', 'fred']] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.partition(users, ['active', false]); + * // => objects for [['barney', 'pebbles'], ['fred']] + * + * // The `_.property` iteratee shorthand. + * _.partition(users, 'active'); + * // => objects for [['fred'], ['barney', 'pebbles']] + */ + var partition = createAggregator( + function (result, value, key) { + result[key ? 0 : 1].push(value); + }, + function () { + return [[], []]; + }, + ); + + /** + * Reduces `collection` to a value which is the accumulated result of running + * each element in `collection` thru `iteratee`, where each successive + * invocation is supplied the return value of the previous. If `accumulator` + * is not given, the first element of `collection` is used as the initial + * value. The iteratee is invoked with four arguments: + * (accumulator, value, index|key, collection). + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.reduce`, `_.reduceRight`, and `_.transform`. + * + * The guarded methods are: + * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`, + * and `sortBy` + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @returns {*} Returns the accumulated value. + * @see _.reduceRight + * @example + * + * _.reduce([1, 2], function(sum, n) { + * return sum + n; + * }, 0); + * // => 3 + * + * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { + * (result[value] || (result[value] = [])).push(key); + * return result; + * }, {}); + * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed) + */ + function reduce(collection, iteratee, accumulator) { + var func = isArray(collection) ? arrayReduce : baseReduce, + initAccum = arguments.length < 3; + + return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach); + } + + /** + * This method is like `_.reduce` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @returns {*} Returns the accumulated value. + * @see _.reduce + * @example + * + * var array = [[0, 1], [2, 3], [4, 5]]; + * + * _.reduceRight(array, function(flattened, other) { + * return flattened.concat(other); + * }, []); + * // => [4, 5, 2, 3, 0, 1] + */ + function reduceRight(collection, iteratee, accumulator) { + var func = isArray(collection) ? arrayReduceRight : baseReduce, + initAccum = arguments.length < 3; + + return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight); + } + + /** + * The opposite of `_.filter`; this method returns the elements of `collection` + * that `predicate` does **not** return truthy for. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + * @see _.filter + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false }, + * { 'user': 'fred', 'age': 40, 'active': true } + * ]; + * + * _.reject(users, function(o) { return !o.active; }); + * // => objects for ['fred'] + * + * // The `_.matches` iteratee shorthand. + * _.reject(users, { 'age': 40, 'active': true }); + * // => objects for ['barney'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.reject(users, ['active', false]); + * // => objects for ['fred'] + * + * // The `_.property` iteratee shorthand. + * _.reject(users, 'active'); + * // => objects for ['barney'] + */ + function reject(collection, predicate) { + var func = isArray(collection) ? arrayFilter : baseFilter; + return func(collection, negate(getIteratee(predicate, 3))); + } + + /** + * Gets a random element from `collection`. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Collection + * @param {Array|Object} collection The collection to sample. + * @returns {*} Returns the random element. + * @example + * + * _.sample([1, 2, 3, 4]); + * // => 2 + */ + function sample(collection) { + var func = isArray(collection) ? arraySample : baseSample; + return func(collection); + } + + /** + * Gets `n` random elements at unique keys from `collection` up to the + * size of `collection`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to sample. + * @param {number} [n=1] The number of elements to sample. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the random elements. + * @example + * + * _.sampleSize([1, 2, 3], 2); + * // => [3, 1] + * + * _.sampleSize([1, 2, 3], 4); + * // => [2, 3, 1] + */ + function sampleSize(collection, n, guard) { + if (guard ? isIterateeCall(collection, n, guard) : n === undefined) { + n = 1; + } else { + n = toInteger(n); + } + var func = isArray(collection) ? arraySampleSize : baseSampleSize; + return func(collection, n); + } + + /** + * Creates an array of shuffled values, using a version of the + * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to shuffle. + * @returns {Array} Returns the new shuffled array. + * @example + * + * _.shuffle([1, 2, 3, 4]); + * // => [4, 1, 3, 2] + */ + function shuffle(collection) { + var func = isArray(collection) ? arrayShuffle : baseShuffle; + return func(collection); + } + + /** + * Gets the size of `collection` by returning its length for array-like + * values or the number of own enumerable string keyed properties for objects. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object|string} collection The collection to inspect. + * @returns {number} Returns the collection size. + * @example + * + * _.size([1, 2, 3]); + * // => 3 + * + * _.size({ 'a': 1, 'b': 2 }); + * // => 2 + * + * _.size('pebbles'); + * // => 7 + */ + function size(collection) { + if (collection == null) { + return 0; + } + if (isArrayLike(collection)) { + return isString(collection) ? stringSize(collection) : collection.length; + } + var tag = getTag(collection); + if (tag == mapTag || tag == setTag) { + return collection.size; + } + return baseKeys(collection).length; + } + + /** + * Checks if `predicate` returns truthy for **any** element of `collection`. + * Iteration is stopped once `predicate` returns truthy. The predicate is + * invoked with three arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + * @example + * + * _.some([null, 0, 'yes', false], Boolean); + * // => true + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false } + * ]; + * + * // The `_.matches` iteratee shorthand. + * _.some(users, { 'user': 'barney', 'active': false }); + * // => false + * + * // The `_.matchesProperty` iteratee shorthand. + * _.some(users, ['active', false]); + * // => true + * + * // The `_.property` iteratee shorthand. + * _.some(users, 'active'); + * // => true + */ + function some(collection, predicate, guard) { + var func = isArray(collection) ? arraySome : baseSome; + if (guard && isIterateeCall(collection, predicate, guard)) { + predicate = undefined; + } + return func(collection, getIteratee(predicate, 3)); + } + + /** + * Creates an array of elements, sorted in ascending order by the results of + * running each element in a collection thru each iteratee. This method + * performs a stable sort, that is, it preserves the original sort order of + * equal elements. The iteratees are invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {...(Function|Function[])} [iteratees=[_.identity]] + * The iteratees to sort by. + * @returns {Array} Returns the new sorted array. + * @example + * + * var users = [ + * { 'user': 'fred', 'age': 48 }, + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 }, + * { 'user': 'barney', 'age': 34 } + * ]; + * + * _.sortBy(users, [function(o) { return o.user; }]); + * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]] + * + * _.sortBy(users, ['user', 'age']); + * // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]] + */ + var sortBy = baseRest(function (collection, iteratees) { + if (collection == null) { + return []; + } + var length = iteratees.length; + if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) { + iteratees = []; + } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) { + iteratees = [iteratees[0]]; + } + return baseOrderBy(collection, baseFlatten(iteratees, 1), []); + }); + + /*------------------------------------------------------------------------*/ + + /** + * Gets the timestamp of the number of milliseconds that have elapsed since + * the Unix epoch (1 January 1970 00:00:00 UTC). + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Date + * @returns {number} Returns the timestamp. + * @example + * + * _.defer(function(stamp) { + * console.log(_.now() - stamp); + * }, _.now()); + * // => Logs the number of milliseconds it took for the deferred invocation. + */ + var now = + ctxNow || + function () { + return root.Date.now(); + }; + + /*------------------------------------------------------------------------*/ + + /** + * The opposite of `_.before`; this method creates a function that invokes + * `func` once it's called `n` or more times. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {number} n The number of calls before `func` is invoked. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * var saves = ['profile', 'settings']; + * + * var done = _.after(saves.length, function() { + * console.log('done saving!'); + * }); + * + * _.forEach(saves, function(type) { + * asyncSave({ 'type': type, 'complete': done }); + * }); + * // => Logs 'done saving!' after the two async saves have completed. + */ + function after(n, func) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + n = toInteger(n); + return function () { + if (--n < 1) { + return func.apply(this, arguments); + } + }; + } + + /** + * Creates a function that invokes `func`, with up to `n` arguments, + * ignoring any additional arguments. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} func The function to cap arguments for. + * @param {number} [n=func.length] The arity cap. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the new capped function. + * @example + * + * _.map(['6', '8', '10'], _.ary(parseInt, 1)); + * // => [6, 8, 10] + */ + function ary(func, n, guard) { + n = guard ? undefined : n; + n = func && n == null ? func.length : n; + return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n); + } + + /** + * Creates a function that invokes `func`, with the `this` binding and arguments + * of the created function, while it's called less than `n` times. Subsequent + * calls to the created function return the result of the last `func` invocation. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {number} n The number of calls at which `func` is no longer invoked. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * jQuery(element).on('click', _.before(5, addContactToList)); + * // => Allows adding up to 4 contacts to the list. + */ + function before(n, func) { + var result; + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + n = toInteger(n); + return function () { + if (--n > 0) { + result = func.apply(this, arguments); + } + if (n <= 1) { + func = undefined; + } + return result; + }; + } + + /** + * Creates a function that invokes `func` with the `this` binding of `thisArg` + * and `partials` prepended to the arguments it receives. + * + * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds, + * may be used as a placeholder for partially applied arguments. + * + * **Note:** Unlike native `Function#bind`, this method doesn't set the "length" + * property of bound functions. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to bind. + * @param {*} thisArg The `this` binding of `func`. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new bound function. + * @example + * + * function greet(greeting, punctuation) { + * return greeting + ' ' + this.user + punctuation; + * } + * + * var object = { 'user': 'fred' }; + * + * var bound = _.bind(greet, object, 'hi'); + * bound('!'); + * // => 'hi fred!' + * + * // Bound with placeholders. + * var bound = _.bind(greet, object, _, '!'); + * bound('hi'); + * // => 'hi fred!' + */ + var bind = baseRest(function (func, thisArg, partials) { + var bitmask = WRAP_BIND_FLAG; + if (partials.length) { + var holders = replaceHolders(partials, getHolder(bind)); + bitmask |= WRAP_PARTIAL_FLAG; + } + return createWrap(func, bitmask, thisArg, partials, holders); + }); + + /** + * Creates a function that invokes the method at `object[key]` with `partials` + * prepended to the arguments it receives. + * + * This method differs from `_.bind` by allowing bound functions to reference + * methods that may be redefined or don't yet exist. See + * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern) + * for more details. + * + * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for partially applied arguments. + * + * @static + * @memberOf _ + * @since 0.10.0 + * @category Function + * @param {Object} object The object to invoke the method on. + * @param {string} key The key of the method. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new bound function. + * @example + * + * var object = { + * 'user': 'fred', + * 'greet': function(greeting, punctuation) { + * return greeting + ' ' + this.user + punctuation; + * } + * }; + * + * var bound = _.bindKey(object, 'greet', 'hi'); + * bound('!'); + * // => 'hi fred!' + * + * object.greet = function(greeting, punctuation) { + * return greeting + 'ya ' + this.user + punctuation; + * }; + * + * bound('!'); + * // => 'hiya fred!' + * + * // Bound with placeholders. + * var bound = _.bindKey(object, 'greet', _, '!'); + * bound('hi'); + * // => 'hiya fred!' + */ + var bindKey = baseRest(function (object, key, partials) { + var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG; + if (partials.length) { + var holders = replaceHolders(partials, getHolder(bindKey)); + bitmask |= WRAP_PARTIAL_FLAG; + } + return createWrap(key, bitmask, object, partials, holders); + }); + + /** + * Creates a function that accepts arguments of `func` and either invokes + * `func` returning its result, if at least `arity` number of arguments have + * been provided, or returns a function that accepts the remaining `func` + * arguments, and so on. The arity of `func` may be specified if `func.length` + * is not sufficient. + * + * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds, + * may be used as a placeholder for provided arguments. + * + * **Note:** This method doesn't set the "length" property of curried functions. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Function + * @param {Function} func The function to curry. + * @param {number} [arity=func.length] The arity of `func`. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the new curried function. + * @example + * + * var abc = function(a, b, c) { + * return [a, b, c]; + * }; + * + * var curried = _.curry(abc); + * + * curried(1)(2)(3); + * // => [1, 2, 3] + * + * curried(1, 2)(3); + * // => [1, 2, 3] + * + * curried(1, 2, 3); + * // => [1, 2, 3] + * + * // Curried with placeholders. + * curried(1)(_, 3)(2); + * // => [1, 2, 3] + */ + function curry(func, arity, guard) { + arity = guard ? undefined : arity; + var result = createWrap( + func, + WRAP_CURRY_FLAG, + undefined, + undefined, + undefined, + undefined, + undefined, + arity, + ); + result.placeholder = curry.placeholder; + return result; + } + + /** + * This method is like `_.curry` except that arguments are applied to `func` + * in the manner of `_.partialRight` instead of `_.partial`. + * + * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for provided arguments. + * + * **Note:** This method doesn't set the "length" property of curried functions. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} func The function to curry. + * @param {number} [arity=func.length] The arity of `func`. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the new curried function. + * @example + * + * var abc = function(a, b, c) { + * return [a, b, c]; + * }; + * + * var curried = _.curryRight(abc); + * + * curried(3)(2)(1); + * // => [1, 2, 3] + * + * curried(2, 3)(1); + * // => [1, 2, 3] + * + * curried(1, 2, 3); + * // => [1, 2, 3] + * + * // Curried with placeholders. + * curried(3)(1, _)(2); + * // => [1, 2, 3] + */ + function curryRight(func, arity, guard) { + arity = guard ? undefined : arity; + var result = createWrap( + func, + WRAP_CURRY_RIGHT_FLAG, + undefined, + undefined, + undefined, + undefined, + undefined, + arity, + ); + result.placeholder = curryRight.placeholder; + return result; + } + + /** + * Creates a debounced function that delays invoking `func` until after `wait` + * milliseconds have elapsed since the last time the debounced function was + * invoked. The debounced function comes with a `cancel` method to cancel + * delayed `func` invocations and a `flush` method to immediately invoke them. + * Provide `options` to indicate whether `func` should be invoked on the + * leading and/or trailing edge of the `wait` timeout. The `func` is invoked + * with the last arguments provided to the debounced function. Subsequent + * calls to the debounced function return the result of the last `func` + * invocation. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is + * invoked on the trailing edge of the timeout only if the debounced function + * is invoked more than once during the `wait` timeout. + * + * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred + * until to the next tick, similar to `setTimeout` with a timeout of `0`. + * + * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) + * for details over the differences between `_.debounce` and `_.throttle`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to debounce. + * @param {number} [wait=0] The number of milliseconds to delay. + * @param {Object} [options={}] The options object. + * @param {boolean} [options.leading=false] + * Specify invoking on the leading edge of the timeout. + * @param {number} [options.maxWait] + * The maximum time `func` is allowed to be delayed before it's invoked. + * @param {boolean} [options.trailing=true] + * Specify invoking on the trailing edge of the timeout. + * @returns {Function} Returns the new debounced function. + * @example + * + * // Avoid costly calculations while the window size is in flux. + * jQuery(window).on('resize', _.debounce(calculateLayout, 150)); + * + * // Invoke `sendMail` when clicked, debouncing subsequent calls. + * jQuery(element).on('click', _.debounce(sendMail, 300, { + * 'leading': true, + * 'trailing': false + * })); + * + * // Ensure `batchLog` is invoked once after 1 second of debounced calls. + * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 }); + * var source = new EventSource('/stream'); + * jQuery(source).on('message', debounced); + * + * // Cancel the trailing debounced invocation. + * jQuery(window).on('popstate', debounced.cancel); + */ + function debounce(func, wait, options) { + var lastArgs, + lastThis, + maxWait, + result, + timerId, + lastCallTime, + lastInvokeTime = 0, + leading = false, + maxing = false, + trailing = true; + + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + wait = toNumber(wait) || 0; + if (isObject(options)) { + leading = !!options.leading; + maxing = 'maxWait' in options; + maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait; + trailing = 'trailing' in options ? !!options.trailing : trailing; + } + + function invokeFunc(time) { + var args = lastArgs, + thisArg = lastThis; + + lastArgs = lastThis = undefined; + lastInvokeTime = time; + result = func.apply(thisArg, args); + return result; + } + + function leadingEdge(time) { + // Reset any `maxWait` timer. + lastInvokeTime = time; + // Start the timer for the trailing edge. + timerId = setTimeout(timerExpired, wait); + // Invoke the leading edge. + return leading ? invokeFunc(time) : result; + } + + function remainingWait(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime, + result = wait - timeSinceLastCall; + + return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result; + } + + function shouldInvoke(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime; + + // Either this is the first call, activity has stopped and we're at the + // trailing edge, the system time has gone backwards and we're treating + // it as the trailing edge, or we've hit the `maxWait` limit. + return ( + lastCallTime === undefined || + timeSinceLastCall >= wait || + timeSinceLastCall < 0 || + (maxing && timeSinceLastInvoke >= maxWait) + ); + } + + function timerExpired() { + var time = now(); + if (shouldInvoke(time)) { + return trailingEdge(time); + } + // Restart the timer. + timerId = setTimeout(timerExpired, remainingWait(time)); + } + + function trailingEdge(time) { + timerId = undefined; + + // Only invoke if we have `lastArgs` which means `func` has been + // debounced at least once. + if (trailing && lastArgs) { + return invokeFunc(time); + } + lastArgs = lastThis = undefined; + return result; + } + + function cancel() { + if (timerId !== undefined) { + clearTimeout(timerId); + } + lastInvokeTime = 0; + lastArgs = lastCallTime = lastThis = timerId = undefined; + } + + function flush() { + return timerId === undefined ? result : trailingEdge(now()); + } + + function debounced() { + var time = now(), + isInvoking = shouldInvoke(time); + + lastArgs = arguments; + lastThis = this; + lastCallTime = time; + + if (isInvoking) { + if (timerId === undefined) { + return leadingEdge(lastCallTime); + } + if (maxing) { + // Handle invocations in a tight loop. + timerId = setTimeout(timerExpired, wait); + return invokeFunc(lastCallTime); + } + } + if (timerId === undefined) { + timerId = setTimeout(timerExpired, wait); + } + return result; + } + debounced.cancel = cancel; + debounced.flush = flush; + return debounced; + } + + /** + * Defers invoking the `func` until the current call stack has cleared. Any + * additional arguments are provided to `func` when it's invoked. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to defer. + * @param {...*} [args] The arguments to invoke `func` with. + * @returns {number} Returns the timer id. + * @example + * + * _.defer(function(text) { + * console.log(text); + * }, 'deferred'); + * // => Logs 'deferred' after one millisecond. + */ + var defer = baseRest(function (func, args) { + return baseDelay(func, 1, args); + }); + + /** + * Invokes `func` after `wait` milliseconds. Any additional arguments are + * provided to `func` when it's invoked. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @param {...*} [args] The arguments to invoke `func` with. + * @returns {number} Returns the timer id. + * @example + * + * _.delay(function(text) { + * console.log(text); + * }, 1000, 'later'); + * // => Logs 'later' after one second. + */ + var delay = baseRest(function (func, wait, args) { + return baseDelay(func, toNumber(wait) || 0, args); + }); + + /** + * Creates a function that invokes `func` with arguments reversed. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Function + * @param {Function} func The function to flip arguments for. + * @returns {Function} Returns the new flipped function. + * @example + * + * var flipped = _.flip(function() { + * return _.toArray(arguments); + * }); + * + * flipped('a', 'b', 'c', 'd'); + * // => ['d', 'c', 'b', 'a'] + */ + function flip(func) { + return createWrap(func, WRAP_FLIP_FLAG); + } + + /** + * Creates a function that memoizes the result of `func`. If `resolver` is + * provided, it determines the cache key for storing the result based on the + * arguments provided to the memoized function. By default, the first argument + * provided to the memoized function is used as the map cache key. The `func` + * is invoked with the `this` binding of the memoized function. + * + * **Note:** The cache is exposed as the `cache` property on the memoized + * function. Its creation may be customized by replacing the `_.memoize.Cache` + * constructor with one whose instances implement the + * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object) + * method interface of `clear`, `delete`, `get`, `has`, and `set`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to have its output memoized. + * @param {Function} [resolver] The function to resolve the cache key. + * @returns {Function} Returns the new memoized function. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * var other = { 'c': 3, 'd': 4 }; + * + * var values = _.memoize(_.values); + * values(object); + * // => [1, 2] + * + * values(other); + * // => [3, 4] + * + * object.a = 2; + * values(object); + * // => [1, 2] + * + * // Modify the result cache. + * values.cache.set(object, ['a', 'b']); + * values(object); + * // => ['a', 'b'] + * + * // Replace `_.memoize.Cache`. + * _.memoize.Cache = WeakMap; + */ + function memoize(func, resolver) { + if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) { + throw new TypeError(FUNC_ERROR_TEXT); + } + var memoized = function () { + var args = arguments, + key = resolver ? resolver.apply(this, args) : args[0], + cache = memoized.cache; + + if (cache.has(key)) { + return cache.get(key); + } + var result = func.apply(this, args); + memoized.cache = cache.set(key, result) || cache; + return result; + }; + memoized.cache = new (memoize.Cache || MapCache)(); + return memoized; + } + + // Expose `MapCache`. + memoize.Cache = MapCache; + + /** + * Creates a function that negates the result of the predicate `func`. The + * `func` predicate is invoked with the `this` binding and arguments of the + * created function. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} predicate The predicate to negate. + * @returns {Function} Returns the new negated function. + * @example + * + * function isEven(n) { + * return n % 2 == 0; + * } + * + * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven)); + * // => [1, 3, 5] + */ + function negate(predicate) { + if (typeof predicate != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + return function () { + var args = arguments; + switch (args.length) { + case 0: + return !predicate.call(this); + case 1: + return !predicate.call(this, args[0]); + case 2: + return !predicate.call(this, args[0], args[1]); + case 3: + return !predicate.call(this, args[0], args[1], args[2]); + } + return !predicate.apply(this, args); + }; + } + + /** + * Creates a function that is restricted to invoking `func` once. Repeat calls + * to the function return the value of the first invocation. The `func` is + * invoked with the `this` binding and arguments of the created function. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * var initialize = _.once(createApplication); + * initialize(); + * initialize(); + * // => `createApplication` is invoked once + */ + function once(func) { + return before(2, func); + } + + /** + * Creates a function that invokes `func` with its arguments transformed. + * + * @static + * @since 4.0.0 + * @memberOf _ + * @category Function + * @param {Function} func The function to wrap. + * @param {...(Function|Function[])} [transforms=[_.identity]] + * The argument transforms. + * @returns {Function} Returns the new function. + * @example + * + * function doubled(n) { + * return n * 2; + * } + * + * function square(n) { + * return n * n; + * } + * + * var func = _.overArgs(function(x, y) { + * return [x, y]; + * }, [square, doubled]); + * + * func(9, 3); + * // => [81, 6] + * + * func(10, 5); + * // => [100, 10] + */ + var overArgs = castRest(function (func, transforms) { + transforms = + transforms.length == 1 && isArray(transforms[0]) + ? arrayMap(transforms[0], baseUnary(getIteratee())) + : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee())); + + var funcsLength = transforms.length; + return baseRest(function (args) { + var index = -1, + length = nativeMin(args.length, funcsLength); + + while (++index < length) { + args[index] = transforms[index].call(this, args[index]); + } + return apply(func, this, args); + }); + }); + + /** + * Creates a function that invokes `func` with `partials` prepended to the + * arguments it receives. This method is like `_.bind` except it does **not** + * alter the `this` binding. + * + * The `_.partial.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for partially applied arguments. + * + * **Note:** This method doesn't set the "length" property of partially + * applied functions. + * + * @static + * @memberOf _ + * @since 0.2.0 + * @category Function + * @param {Function} func The function to partially apply arguments to. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new partially applied function. + * @example + * + * function greet(greeting, name) { + * return greeting + ' ' + name; + * } + * + * var sayHelloTo = _.partial(greet, 'hello'); + * sayHelloTo('fred'); + * // => 'hello fred' + * + * // Partially applied with placeholders. + * var greetFred = _.partial(greet, _, 'fred'); + * greetFred('hi'); + * // => 'hi fred' + */ + var partial = baseRest(function (func, partials) { + var holders = replaceHolders(partials, getHolder(partial)); + return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders); + }); + + /** + * This method is like `_.partial` except that partially applied arguments + * are appended to the arguments it receives. + * + * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for partially applied arguments. + * + * **Note:** This method doesn't set the "length" property of partially + * applied functions. + * + * @static + * @memberOf _ + * @since 1.0.0 + * @category Function + * @param {Function} func The function to partially apply arguments to. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new partially applied function. + * @example + * + * function greet(greeting, name) { + * return greeting + ' ' + name; + * } + * + * var greetFred = _.partialRight(greet, 'fred'); + * greetFred('hi'); + * // => 'hi fred' + * + * // Partially applied with placeholders. + * var sayHelloTo = _.partialRight(greet, 'hello', _); + * sayHelloTo('fred'); + * // => 'hello fred' + */ + var partialRight = baseRest(function (func, partials) { + var holders = replaceHolders(partials, getHolder(partialRight)); + return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders); + }); + + /** + * Creates a function that invokes `func` with arguments arranged according + * to the specified `indexes` where the argument value at the first index is + * provided as the first argument, the argument value at the second index is + * provided as the second argument, and so on. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} func The function to rearrange arguments for. + * @param {...(number|number[])} indexes The arranged argument indexes. + * @returns {Function} Returns the new function. + * @example + * + * var rearged = _.rearg(function(a, b, c) { + * return [a, b, c]; + * }, [2, 0, 1]); + * + * rearged('b', 'c', 'a') + * // => ['a', 'b', 'c'] + */ + var rearg = flatRest(function (func, indexes) { + return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes); + }); + + /** + * Creates a function that invokes `func` with the `this` binding of the + * created function and arguments from `start` and beyond provided as + * an array. + * + * **Note:** This method is based on the + * [rest parameter](https://mdn.io/rest_parameters). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Function + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + * @example + * + * var say = _.rest(function(what, names) { + * return what + ' ' + _.initial(names).join(', ') + + * (_.size(names) > 1 ? ', & ' : '') + _.last(names); + * }); + * + * say('hello', 'fred', 'barney', 'pebbles'); + * // => 'hello fred, barney, & pebbles' + */ + function rest(func, start) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + start = start === undefined ? start : toInteger(start); + return baseRest(func, start); + } + + /** + * Creates a function that invokes `func` with the `this` binding of the + * create function and an array of arguments much like + * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply). + * + * **Note:** This method is based on the + * [spread operator](https://mdn.io/spread_operator). + * + * @static + * @memberOf _ + * @since 3.2.0 + * @category Function + * @param {Function} func The function to spread arguments over. + * @param {number} [start=0] The start position of the spread. + * @returns {Function} Returns the new function. + * @example + * + * var say = _.spread(function(who, what) { + * return who + ' says ' + what; + * }); + * + * say(['fred', 'hello']); + * // => 'fred says hello' + * + * var numbers = Promise.all([ + * Promise.resolve(40), + * Promise.resolve(36) + * ]); + * + * numbers.then(_.spread(function(x, y) { + * return x + y; + * })); + * // => a Promise of 76 + */ + function spread(func, start) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + start = start == null ? 0 : nativeMax(toInteger(start), 0); + return baseRest(function (args) { + var array = args[start], + otherArgs = castSlice(args, 0, start); + + if (array) { + arrayPush(otherArgs, array); + } + return apply(func, this, otherArgs); + }); + } + + /** + * Creates a throttled function that only invokes `func` at most once per + * every `wait` milliseconds. The throttled function comes with a `cancel` + * method to cancel delayed `func` invocations and a `flush` method to + * immediately invoke them. Provide `options` to indicate whether `func` + * should be invoked on the leading and/or trailing edge of the `wait` + * timeout. The `func` is invoked with the last arguments provided to the + * throttled function. Subsequent calls to the throttled function return the + * result of the last `func` invocation. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is + * invoked on the trailing edge of the timeout only if the throttled function + * is invoked more than once during the `wait` timeout. + * + * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred + * until to the next tick, similar to `setTimeout` with a timeout of `0`. + * + * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) + * for details over the differences between `_.throttle` and `_.debounce`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to throttle. + * @param {number} [wait=0] The number of milliseconds to throttle invocations to. + * @param {Object} [options={}] The options object. + * @param {boolean} [options.leading=true] + * Specify invoking on the leading edge of the timeout. + * @param {boolean} [options.trailing=true] + * Specify invoking on the trailing edge of the timeout. + * @returns {Function} Returns the new throttled function. + * @example + * + * // Avoid excessively updating the position while scrolling. + * jQuery(window).on('scroll', _.throttle(updatePosition, 100)); + * + * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes. + * var throttled = _.throttle(renewToken, 300000, { 'trailing': false }); + * jQuery(element).on('click', throttled); + * + * // Cancel the trailing throttled invocation. + * jQuery(window).on('popstate', throttled.cancel); + */ + function throttle(func, wait, options) { + var leading = true, + trailing = true; + + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + if (isObject(options)) { + leading = 'leading' in options ? !!options.leading : leading; + trailing = 'trailing' in options ? !!options.trailing : trailing; + } + return debounce(func, wait, { + leading: leading, + maxWait: wait, + trailing: trailing, + }); + } + + /** + * Creates a function that accepts up to one argument, ignoring any + * additional arguments. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Function + * @param {Function} func The function to cap arguments for. + * @returns {Function} Returns the new capped function. + * @example + * + * _.map(['6', '8', '10'], _.unary(parseInt)); + * // => [6, 8, 10] + */ + function unary(func) { + return ary(func, 1); + } + + /** + * Creates a function that provides `value` to `wrapper` as its first + * argument. Any additional arguments provided to the function are appended + * to those provided to the `wrapper`. The wrapper is invoked with the `this` + * binding of the created function. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {*} value The value to wrap. + * @param {Function} [wrapper=identity] The wrapper function. + * @returns {Function} Returns the new function. + * @example + * + * var p = _.wrap(_.escape, function(func, text) { + * return '<p>' + func(text) + '</p>'; + * }); + * + * p('fred, barney, & pebbles'); + * // => '<p>fred, barney, & pebbles</p>' + */ + function wrap(value, wrapper) { + return partial(castFunction(wrapper), value); + } + + /*------------------------------------------------------------------------*/ + + /** + * Casts `value` as an array if it's not one. + * + * @static + * @memberOf _ + * @since 4.4.0 + * @category Lang + * @param {*} value The value to inspect. + * @returns {Array} Returns the cast array. + * @example + * + * _.castArray(1); + * // => [1] + * + * _.castArray({ 'a': 1 }); + * // => [{ 'a': 1 }] + * + * _.castArray('abc'); + * // => ['abc'] + * + * _.castArray(null); + * // => [null] + * + * _.castArray(undefined); + * // => [undefined] + * + * _.castArray(); + * // => [] + * + * var array = [1, 2, 3]; + * console.log(_.castArray(array) === array); + * // => true + */ + function castArray() { + if (!arguments.length) { + return []; + } + var value = arguments[0]; + return isArray(value) ? value : [value]; + } + + /** + * Creates a shallow clone of `value`. + * + * **Note:** This method is loosely based on the + * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm) + * and supports cloning arrays, array buffers, booleans, date objects, maps, + * numbers, `Object` objects, regexes, sets, strings, symbols, and typed + * arrays. The own enumerable properties of `arguments` objects are cloned + * as plain objects. An empty object is returned for uncloneable values such + * as error objects, functions, DOM nodes, and WeakMaps. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to clone. + * @returns {*} Returns the cloned value. + * @see _.cloneDeep + * @example + * + * var objects = [{ 'a': 1 }, { 'b': 2 }]; + * + * var shallow = _.clone(objects); + * console.log(shallow[0] === objects[0]); + * // => true + */ + function clone(value) { + return baseClone(value, CLONE_SYMBOLS_FLAG); + } + + /** + * This method is like `_.clone` except that it accepts `customizer` which + * is invoked to produce the cloned value. If `customizer` returns `undefined`, + * cloning is handled by the method instead. The `customizer` is invoked with + * up to four arguments; (value [, index|key, object, stack]). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to clone. + * @param {Function} [customizer] The function to customize cloning. + * @returns {*} Returns the cloned value. + * @see _.cloneDeepWith + * @example + * + * function customizer(value) { + * if (_.isElement(value)) { + * return value.cloneNode(false); + * } + * } + * + * var el = _.cloneWith(document.body, customizer); + * + * console.log(el === document.body); + * // => false + * console.log(el.nodeName); + * // => 'BODY' + * console.log(el.childNodes.length); + * // => 0 + */ + function cloneWith(value, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return baseClone(value, CLONE_SYMBOLS_FLAG, customizer); + } + + /** + * This method is like `_.clone` except that it recursively clones `value`. + * + * @static + * @memberOf _ + * @since 1.0.0 + * @category Lang + * @param {*} value The value to recursively clone. + * @returns {*} Returns the deep cloned value. + * @see _.clone + * @example + * + * var objects = [{ 'a': 1 }, { 'b': 2 }]; + * + * var deep = _.cloneDeep(objects); + * console.log(deep[0] === objects[0]); + * // => false + */ + function cloneDeep(value) { + return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG); + } + + /** + * This method is like `_.cloneWith` except that it recursively clones `value`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to recursively clone. + * @param {Function} [customizer] The function to customize cloning. + * @returns {*} Returns the deep cloned value. + * @see _.cloneWith + * @example + * + * function customizer(value) { + * if (_.isElement(value)) { + * return value.cloneNode(true); + * } + * } + * + * var el = _.cloneDeepWith(document.body, customizer); + * + * console.log(el === document.body); + * // => false + * console.log(el.nodeName); + * // => 'BODY' + * console.log(el.childNodes.length); + * // => 20 + */ + function cloneDeepWith(value, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer); + } + + /** + * Checks if `object` conforms to `source` by invoking the predicate + * properties of `source` with the corresponding property values of `object`. + * + * **Note:** This method is equivalent to `_.conforms` when `source` is + * partially applied. + * + * @static + * @memberOf _ + * @since 4.14.0 + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property predicates to conform to. + * @returns {boolean} Returns `true` if `object` conforms, else `false`. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * + * _.conformsTo(object, { 'b': function(n) { return n > 1; } }); + * // => true + * + * _.conformsTo(object, { 'b': function(n) { return n > 2; } }); + * // => false + */ + function conformsTo(object, source) { + return source == null || baseConformsTo(object, source, keys(source)); + } + + /** + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ + function eq(value, other) { + return value === other || (value !== value && other !== other); + } + + /** + * Checks if `value` is greater than `other`. + * + * @static + * @memberOf _ + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than `other`, + * else `false`. + * @see _.lt + * @example + * + * _.gt(3, 1); + * // => true + * + * _.gt(3, 3); + * // => false + * + * _.gt(1, 3); + * // => false + */ + var gt = createRelationalOperation(baseGt); + + /** + * Checks if `value` is greater than or equal to `other`. + * + * @static + * @memberOf _ + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than or equal to + * `other`, else `false`. + * @see _.lte + * @example + * + * _.gte(3, 1); + * // => true + * + * _.gte(3, 3); + * // => true + * + * _.gte(1, 3); + * // => false + */ + var gte = createRelationalOperation(function (value, other) { + return value >= other; + }); + + /** + * Checks if `value` is likely an `arguments` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + * else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ + var isArguments = baseIsArguments( + (function () { + return arguments; + })(), + ) + ? baseIsArguments + : function (value) { + return ( + isObjectLike(value) && + hasOwnProperty.call(value, 'callee') && + !propertyIsEnumerable.call(value, 'callee') + ); + }; + + /** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ + var isArray = Array.isArray; + + /** + * Checks if `value` is classified as an `ArrayBuffer` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`. + * @example + * + * _.isArrayBuffer(new ArrayBuffer(2)); + * // => true + * + * _.isArrayBuffer(new Array(2)); + * // => false + */ + var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer; + + /** + * Checks if `value` is array-like. A value is considered array-like if it's + * not a function and has a `value.length` that's an integer greater than or + * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + * @example + * + * _.isArrayLike([1, 2, 3]); + * // => true + * + * _.isArrayLike(document.body.children); + * // => true + * + * _.isArrayLike('abc'); + * // => true + * + * _.isArrayLike(_.noop); + * // => false + */ + function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); + } + + /** + * This method is like `_.isArrayLike` except that it also checks if `value` + * is an object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array-like object, + * else `false`. + * @example + * + * _.isArrayLikeObject([1, 2, 3]); + * // => true + * + * _.isArrayLikeObject(document.body.children); + * // => true + * + * _.isArrayLikeObject('abc'); + * // => false + * + * _.isArrayLikeObject(_.noop); + * // => false + */ + function isArrayLikeObject(value) { + return isObjectLike(value) && isArrayLike(value); + } + + /** + * Checks if `value` is classified as a boolean primitive or object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a boolean, else `false`. + * @example + * + * _.isBoolean(false); + * // => true + * + * _.isBoolean(null); + * // => false + */ + function isBoolean(value) { + return ( + value === true || value === false || (isObjectLike(value) && baseGetTag(value) == boolTag) + ); + } + + /** + * Checks if `value` is a buffer. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. + * @example + * + * _.isBuffer(new Buffer(2)); + * // => true + * + * _.isBuffer(new Uint8Array(2)); + * // => false + */ + var isBuffer = nativeIsBuffer || stubFalse; + + /** + * Checks if `value` is classified as a `Date` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a date object, else `false`. + * @example + * + * _.isDate(new Date); + * // => true + * + * _.isDate('Mon April 23 2012'); + * // => false + */ + var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate; + + /** + * Checks if `value` is likely a DOM element. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`. + * @example + * + * _.isElement(document.body); + * // => true + * + * _.isElement('<body>'); + * // => false + */ + function isElement(value) { + return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value); + } + + /** + * Checks if `value` is an empty object, collection, map, or set. + * + * Objects are considered empty if they have no own enumerable string keyed + * properties. + * + * Array-like values such as `arguments` objects, arrays, buffers, strings, or + * jQuery-like collections are considered empty if they have a `length` of `0`. + * Similarly, maps and sets are considered empty if they have a `size` of `0`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is empty, else `false`. + * @example + * + * _.isEmpty(null); + * // => true + * + * _.isEmpty(true); + * // => true + * + * _.isEmpty(1); + * // => true + * + * _.isEmpty([1, 2, 3]); + * // => false + * + * _.isEmpty({ 'a': 1 }); + * // => false + */ + function isEmpty(value) { + if (value == null) { + return true; + } + if ( + isArrayLike(value) && + (isArray(value) || + typeof value == 'string' || + typeof value.splice == 'function' || + isBuffer(value) || + isTypedArray(value) || + isArguments(value)) + ) { + return !value.length; + } + var tag = getTag(value); + if (tag == mapTag || tag == setTag) { + return !value.size; + } + if (isPrototype(value)) { + return !baseKeys(value).length; + } + for (var key in value) { + if (hasOwnProperty.call(value, key)) { + return false; + } + } + return true; + } + + /** + * Performs a deep comparison between two values to determine if they are + * equivalent. + * + * **Note:** This method supports comparing arrays, array buffers, booleans, + * date objects, error objects, maps, numbers, `Object` objects, regexes, + * sets, strings, symbols, and typed arrays. `Object` objects are compared + * by their own, not inherited, enumerable properties. Functions and DOM + * nodes are compared by strict equality, i.e. `===`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.isEqual(object, other); + * // => true + * + * object === other; + * // => false + */ + function isEqual(value, other) { + return baseIsEqual(value, other); + } + + /** + * This method is like `_.isEqual` except that it accepts `customizer` which + * is invoked to compare values. If `customizer` returns `undefined`, comparisons + * are handled by the method instead. The `customizer` is invoked with up to + * six arguments: (objValue, othValue [, index|key, object, other, stack]). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * function isGreeting(value) { + * return /^h(?:i|ello)$/.test(value); + * } + * + * function customizer(objValue, othValue) { + * if (isGreeting(objValue) && isGreeting(othValue)) { + * return true; + * } + * } + * + * var array = ['hello', 'goodbye']; + * var other = ['hi', 'goodbye']; + * + * _.isEqualWith(array, other, customizer); + * // => true + */ + function isEqualWith(value, other, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + var result = customizer ? customizer(value, other) : undefined; + return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result; + } + + /** + * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`, + * `SyntaxError`, `TypeError`, or `URIError` object. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an error object, else `false`. + * @example + * + * _.isError(new Error); + * // => true + * + * _.isError(Error); + * // => false + */ + function isError(value) { + if (!isObjectLike(value)) { + return false; + } + var tag = baseGetTag(value); + return ( + tag == errorTag || + tag == domExcTag || + (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value)) + ); + } + + /** + * Checks if `value` is a finite primitive number. + * + * **Note:** This method is based on + * [`Number.isFinite`](https://mdn.io/Number/isFinite). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a finite number, else `false`. + * @example + * + * _.isFinite(3); + * // => true + * + * _.isFinite(Number.MIN_VALUE); + * // => true + * + * _.isFinite(Infinity); + * // => false + * + * _.isFinite('3'); + * // => false + */ + function isFinite(value) { + return typeof value == 'number' && nativeIsFinite(value); + } + + /** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ + function isFunction(value) { + if (!isObject(value)) { + return false; + } + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 9 which returns 'object' for typed arrays and other constructors. + var tag = baseGetTag(value); + return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; + } + + /** + * Checks if `value` is an integer. + * + * **Note:** This method is based on + * [`Number.isInteger`](https://mdn.io/Number/isInteger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an integer, else `false`. + * @example + * + * _.isInteger(3); + * // => true + * + * _.isInteger(Number.MIN_VALUE); + * // => false + * + * _.isInteger(Infinity); + * // => false + * + * _.isInteger('3'); + * // => false + */ + function isInteger(value) { + return typeof value == 'number' && value == toInteger(value); + } + + /** + * Checks if `value` is a valid array-like length. + * + * **Note:** This method is loosely based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @example + * + * _.isLength(3); + * // => true + * + * _.isLength(Number.MIN_VALUE); + * // => false + * + * _.isLength(Infinity); + * // => false + * + * _.isLength('3'); + * // => false + */ + function isLength(value) { + return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + + /** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ + function isObject(value) { + var type = typeof value; + return value != null && (type == 'object' || type == 'function'); + } + + /** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ + function isObjectLike(value) { + return value != null && typeof value == 'object'; + } + + /** + * Checks if `value` is classified as a `Map` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a map, else `false`. + * @example + * + * _.isMap(new Map); + * // => true + * + * _.isMap(new WeakMap); + * // => false + */ + var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap; + + /** + * Performs a partial deep comparison between `object` and `source` to + * determine if `object` contains equivalent property values. + * + * **Note:** This method is equivalent to `_.matches` when `source` is + * partially applied. + * + * Partial comparisons will match empty array and empty object `source` + * values against any array or object value, respectively. See `_.isEqual` + * for a list of supported value comparisons. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * + * _.isMatch(object, { 'b': 2 }); + * // => true + * + * _.isMatch(object, { 'b': 1 }); + * // => false + */ + function isMatch(object, source) { + return object === source || baseIsMatch(object, source, getMatchData(source)); + } + + /** + * This method is like `_.isMatch` except that it accepts `customizer` which + * is invoked to compare values. If `customizer` returns `undefined`, comparisons + * are handled by the method instead. The `customizer` is invoked with five + * arguments: (objValue, srcValue, index|key, object, source). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + * @example + * + * function isGreeting(value) { + * return /^h(?:i|ello)$/.test(value); + * } + * + * function customizer(objValue, srcValue) { + * if (isGreeting(objValue) && isGreeting(srcValue)) { + * return true; + * } + * } + * + * var object = { 'greeting': 'hello' }; + * var source = { 'greeting': 'hi' }; + * + * _.isMatchWith(object, source, customizer); + * // => true + */ + function isMatchWith(object, source, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return baseIsMatch(object, source, getMatchData(source), customizer); + } + + /** + * Checks if `value` is `NaN`. + * + * **Note:** This method is based on + * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as + * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for + * `undefined` and other non-number values. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + * @example + * + * _.isNaN(NaN); + * // => true + * + * _.isNaN(new Number(NaN)); + * // => true + * + * isNaN(undefined); + * // => true + * + * _.isNaN(undefined); + * // => false + */ + function isNaN(value) { + // An `NaN` primitive is the only value that is not equal to itself. + // Perform the `toStringTag` check first to avoid errors with some + // ActiveX objects in IE. + return isNumber(value) && value != +value; + } + + /** + * Checks if `value` is a pristine native function. + * + * **Note:** This method can't reliably detect native functions in the presence + * of the core-js package because core-js circumvents this kind of detection. + * Despite multiple requests, the core-js maintainer has made it clear: any + * attempt to fix the detection will be obstructed. As a result, we're left + * with little choice but to throw an error. Unfortunately, this also affects + * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill), + * which rely on core-js. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + * @example + * + * _.isNative(Array.prototype.push); + * // => true + * + * _.isNative(_); + * // => false + */ + function isNative(value) { + if (isMaskable(value)) { + throw new Error(CORE_ERROR_TEXT); + } + return baseIsNative(value); + } + + /** + * Checks if `value` is `null`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `null`, else `false`. + * @example + * + * _.isNull(null); + * // => true + * + * _.isNull(void 0); + * // => false + */ + function isNull(value) { + return value === null; + } + + /** + * Checks if `value` is `null` or `undefined`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is nullish, else `false`. + * @example + * + * _.isNil(null); + * // => true + * + * _.isNil(void 0); + * // => true + * + * _.isNil(NaN); + * // => false + */ + function isNil(value) { + return value == null; + } + + /** + * Checks if `value` is classified as a `Number` primitive or object. + * + * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are + * classified as numbers, use the `_.isFinite` method. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a number, else `false`. + * @example + * + * _.isNumber(3); + * // => true + * + * _.isNumber(Number.MIN_VALUE); + * // => true + * + * _.isNumber(Infinity); + * // => true + * + * _.isNumber('3'); + * // => false + */ + function isNumber(value) { + return typeof value == 'number' || (isObjectLike(value) && baseGetTag(value) == numberTag); + } + + /** + * Checks if `value` is a plain object, that is, an object created by the + * `Object` constructor or one with a `[[Prototype]]` of `null`. + * + * @static + * @memberOf _ + * @since 0.8.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * _.isPlainObject(new Foo); + * // => false + * + * _.isPlainObject([1, 2, 3]); + * // => false + * + * _.isPlainObject({ 'x': 0, 'y': 0 }); + * // => true + * + * _.isPlainObject(Object.create(null)); + * // => true + */ + function isPlainObject(value) { + if (!isObjectLike(value) || baseGetTag(value) != objectTag) { + return false; + } + var proto = getPrototype(value); + if (proto === null) { + return true; + } + var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; + return ( + typeof Ctor == 'function' && + Ctor instanceof Ctor && + funcToString.call(Ctor) == objectCtorString + ); + } + + /** + * Checks if `value` is classified as a `RegExp` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. + * @example + * + * _.isRegExp(/abc/); + * // => true + * + * _.isRegExp('/abc/'); + * // => false + */ + var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp; + + /** + * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754 + * double precision number which isn't the result of a rounded unsafe integer. + * + * **Note:** This method is based on + * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`. + * @example + * + * _.isSafeInteger(3); + * // => true + * + * _.isSafeInteger(Number.MIN_VALUE); + * // => false + * + * _.isSafeInteger(Infinity); + * // => false + * + * _.isSafeInteger('3'); + * // => false + */ + function isSafeInteger(value) { + return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER; + } + + /** + * Checks if `value` is classified as a `Set` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a set, else `false`. + * @example + * + * _.isSet(new Set); + * // => true + * + * _.isSet(new WeakSet); + * // => false + */ + var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet; + + /** + * Checks if `value` is classified as a `String` primitive or object. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a string, else `false`. + * @example + * + * _.isString('abc'); + * // => true + * + * _.isString(1); + * // => false + */ + function isString(value) { + return ( + typeof value == 'string' || + (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag) + ); + } + + /** + * Checks if `value` is classified as a `Symbol` primitive or object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ + function isSymbol(value) { + return typeof value == 'symbol' || (isObjectLike(value) && baseGetTag(value) == symbolTag); + } + + /** + * Checks if `value` is classified as a typed array. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + * @example + * + * _.isTypedArray(new Uint8Array); + * // => true + * + * _.isTypedArray([]); + * // => false + */ + var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; + + /** + * Checks if `value` is `undefined`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`. + * @example + * + * _.isUndefined(void 0); + * // => true + * + * _.isUndefined(null); + * // => false + */ + function isUndefined(value) { + return value === undefined; + } + + /** + * Checks if `value` is classified as a `WeakMap` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a weak map, else `false`. + * @example + * + * _.isWeakMap(new WeakMap); + * // => true + * + * _.isWeakMap(new Map); + * // => false + */ + function isWeakMap(value) { + return isObjectLike(value) && getTag(value) == weakMapTag; + } + + /** + * Checks if `value` is classified as a `WeakSet` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a weak set, else `false`. + * @example + * + * _.isWeakSet(new WeakSet); + * // => true + * + * _.isWeakSet(new Set); + * // => false + */ + function isWeakSet(value) { + return isObjectLike(value) && baseGetTag(value) == weakSetTag; + } + + /** + * Checks if `value` is less than `other`. + * + * @static + * @memberOf _ + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than `other`, + * else `false`. + * @see _.gt + * @example + * + * _.lt(1, 3); + * // => true + * + * _.lt(3, 3); + * // => false + * + * _.lt(3, 1); + * // => false + */ + var lt = createRelationalOperation(baseLt); + + /** + * Checks if `value` is less than or equal to `other`. + * + * @static + * @memberOf _ + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than or equal to + * `other`, else `false`. + * @see _.gte + * @example + * + * _.lte(1, 3); + * // => true + * + * _.lte(3, 3); + * // => true + * + * _.lte(3, 1); + * // => false + */ + var lte = createRelationalOperation(function (value, other) { + return value <= other; + }); + + /** + * Converts `value` to an array. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to convert. + * @returns {Array} Returns the converted array. + * @example + * + * _.toArray({ 'a': 1, 'b': 2 }); + * // => [1, 2] + * + * _.toArray('abc'); + * // => ['a', 'b', 'c'] + * + * _.toArray(1); + * // => [] + * + * _.toArray(null); + * // => [] + */ + function toArray(value) { + if (!value) { + return []; + } + if (isArrayLike(value)) { + return isString(value) ? stringToArray(value) : copyArray(value); + } + if (symIterator && value[symIterator]) { + return iteratorToArray(value[symIterator]()); + } + var tag = getTag(value), + func = tag == mapTag ? mapToArray : tag == setTag ? setToArray : values; + + return func(value); + } + + /** + * Converts `value` to a finite number. + * + * @static + * @memberOf _ + * @since 4.12.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted number. + * @example + * + * _.toFinite(3.2); + * // => 3.2 + * + * _.toFinite(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toFinite(Infinity); + * // => 1.7976931348623157e+308 + * + * _.toFinite('3.2'); + * // => 3.2 + */ + function toFinite(value) { + if (!value) { + return value === 0 ? value : 0; + } + value = toNumber(value); + if (value === INFINITY || value === -INFINITY) { + var sign = value < 0 ? -1 : 1; + return sign * MAX_INTEGER; + } + return value === value ? value : 0; + } + + /** + * Converts `value` to an integer. + * + * **Note:** This method is loosely based on + * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted integer. + * @example + * + * _.toInteger(3.2); + * // => 3 + * + * _.toInteger(Number.MIN_VALUE); + * // => 0 + * + * _.toInteger(Infinity); + * // => 1.7976931348623157e+308 + * + * _.toInteger('3.2'); + * // => 3 + */ + function toInteger(value) { + var result = toFinite(value), + remainder = result % 1; + + return result === result ? (remainder ? result - remainder : result) : 0; + } + + /** + * Converts `value` to an integer suitable for use as the length of an + * array-like object. + * + * **Note:** This method is based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted integer. + * @example + * + * _.toLength(3.2); + * // => 3 + * + * _.toLength(Number.MIN_VALUE); + * // => 0 + * + * _.toLength(Infinity); + * // => 4294967295 + * + * _.toLength('3.2'); + * // => 3 + */ + function toLength(value) { + return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0; + } + + /** + * Converts `value` to a number. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to process. + * @returns {number} Returns the number. + * @example + * + * _.toNumber(3.2); + * // => 3.2 + * + * _.toNumber(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toNumber(Infinity); + * // => Infinity + * + * _.toNumber('3.2'); + * // => 3.2 + */ + function toNumber(value) { + if (typeof value == 'number') { + return value; + } + if (isSymbol(value)) { + return NAN; + } + if (isObject(value)) { + var other = typeof value.valueOf == 'function' ? value.valueOf() : value; + value = isObject(other) ? other + '' : other; + } + if (typeof value != 'string') { + return value === 0 ? value : +value; + } + value = value.replace(reTrim, ''); + var isBinary = reIsBinary.test(value); + return isBinary || reIsOctal.test(value) + ? freeParseInt(value.slice(2), isBinary ? 2 : 8) + : reIsBadHex.test(value) + ? NAN + : +value; + } + + /** + * Converts `value` to a plain object flattening inherited enumerable string + * keyed properties of `value` to own properties of the plain object. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {Object} Returns the converted plain object. + * @example + * + * function Foo() { + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.assign({ 'a': 1 }, new Foo); + * // => { 'a': 1, 'b': 2 } + * + * _.assign({ 'a': 1 }, _.toPlainObject(new Foo)); + * // => { 'a': 1, 'b': 2, 'c': 3 } + */ + function toPlainObject(value) { + return copyObject(value, keysIn(value)); + } + + /** + * Converts `value` to a safe integer. A safe integer can be compared and + * represented correctly. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted integer. + * @example + * + * _.toSafeInteger(3.2); + * // => 3 + * + * _.toSafeInteger(Number.MIN_VALUE); + * // => 0 + * + * _.toSafeInteger(Infinity); + * // => 9007199254740991 + * + * _.toSafeInteger('3.2'); + * // => 3 + */ + function toSafeInteger(value) { + return value + ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER) + : value === 0 + ? value + : 0; + } + + /** + * Converts `value` to a string. An empty string is returned for `null` + * and `undefined` values. The sign of `-0` is preserved. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + * @example + * + * _.toString(null); + * // => '' + * + * _.toString(-0); + * // => '-0' + * + * _.toString([1, 2, 3]); + * // => '1,2,3' + */ + function toString(value) { + return value == null ? '' : baseToString(value); + } + + /*------------------------------------------------------------------------*/ + + /** + * Assigns own enumerable string keyed properties of source objects to the + * destination object. Source objects are applied from left to right. + * Subsequent sources overwrite property assignments of previous sources. + * + * **Note:** This method mutates `object` and is loosely based on + * [`Object.assign`](https://mdn.io/Object/assign). + * + * @static + * @memberOf _ + * @since 0.10.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.assignIn + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * function Bar() { + * this.c = 3; + * } + * + * Foo.prototype.b = 2; + * Bar.prototype.d = 4; + * + * _.assign({ 'a': 0 }, new Foo, new Bar); + * // => { 'a': 1, 'c': 3 } + */ + var assign = createAssigner(function (object, source) { + if (isPrototype(source) || isArrayLike(source)) { + copyObject(source, keys(source), object); + return; + } + for (var key in source) { + if (hasOwnProperty.call(source, key)) { + assignValue(object, key, source[key]); + } + } + }); + + /** + * This method is like `_.assign` except that it iterates over own and + * inherited source properties. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias extend + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.assign + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * function Bar() { + * this.c = 3; + * } + * + * Foo.prototype.b = 2; + * Bar.prototype.d = 4; + * + * _.assignIn({ 'a': 0 }, new Foo, new Bar); + * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 } + */ + var assignIn = createAssigner(function (object, source) { + copyObject(source, keysIn(source), object); + }); + + /** + * This method is like `_.assignIn` except that it accepts `customizer` + * which is invoked to produce the assigned values. If `customizer` returns + * `undefined`, assignment is handled by the method instead. The `customizer` + * is invoked with five arguments: (objValue, srcValue, key, object, source). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias extendWith + * @category Object + * @param {Object} object The destination object. + * @param {...Object} sources The source objects. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @see _.assignWith + * @example + * + * function customizer(objValue, srcValue) { + * return _.isUndefined(objValue) ? srcValue : objValue; + * } + * + * var defaults = _.partialRight(_.assignInWith, customizer); + * + * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ + var assignInWith = createAssigner(function (object, source, srcIndex, customizer) { + copyObject(source, keysIn(source), object, customizer); + }); + + /** + * This method is like `_.assign` except that it accepts `customizer` + * which is invoked to produce the assigned values. If `customizer` returns + * `undefined`, assignment is handled by the method instead. The `customizer` + * is invoked with five arguments: (objValue, srcValue, key, object, source). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} sources The source objects. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @see _.assignInWith + * @example + * + * function customizer(objValue, srcValue) { + * return _.isUndefined(objValue) ? srcValue : objValue; + * } + * + * var defaults = _.partialRight(_.assignWith, customizer); + * + * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ + var assignWith = createAssigner(function (object, source, srcIndex, customizer) { + copyObject(source, keys(source), object, customizer); + }); + + /** + * Creates an array of values corresponding to `paths` of `object`. + * + * @static + * @memberOf _ + * @since 1.0.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {...(string|string[])} [paths] The property paths to pick. + * @returns {Array} Returns the picked values. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] }; + * + * _.at(object, ['a[0].b.c', 'a[1]']); + * // => [3, 4] + */ + var at = flatRest(baseAt); + + /** + * Creates an object that inherits from the `prototype` object. If a + * `properties` object is given, its own enumerable string keyed properties + * are assigned to the created object. + * + * @static + * @memberOf _ + * @since 2.3.0 + * @category Object + * @param {Object} prototype The object to inherit from. + * @param {Object} [properties] The properties to assign to the object. + * @returns {Object} Returns the new object. + * @example + * + * function Shape() { + * this.x = 0; + * this.y = 0; + * } + * + * function Circle() { + * Shape.call(this); + * } + * + * Circle.prototype = _.create(Shape.prototype, { + * 'constructor': Circle + * }); + * + * var circle = new Circle; + * circle instanceof Circle; + * // => true + * + * circle instanceof Shape; + * // => true + */ + function create(prototype, properties) { + var result = baseCreate(prototype); + return properties == null ? result : baseAssign(result, properties); + } + + /** + * Assigns own and inherited enumerable string keyed properties of source + * objects to the destination object for all destination properties that + * resolve to `undefined`. Source objects are applied from left to right. + * Once a property is set, additional values of the same property are ignored. + * + * **Note:** This method mutates `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.defaultsDeep + * @example + * + * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ + var defaults = baseRest(function (args) { + args.push(undefined, customDefaultsAssignIn); + return apply(assignInWith, undefined, args); + }); + + /** + * This method is like `_.defaults` except that it recursively assigns + * default properties. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 3.10.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.defaults + * @example + * + * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } }); + * // => { 'a': { 'b': 2, 'c': 3 } } + */ + var defaultsDeep = baseRest(function (args) { + args.push(undefined, customDefaultsMerge); + return apply(mergeWith, undefined, args); + }); + + /** + * This method is like `_.find` except that it returns the key of the first + * element `predicate` returns truthy for instead of the element itself. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category Object + * @param {Object} object The object to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {string|undefined} Returns the key of the matched element, + * else `undefined`. + * @example + * + * var users = { + * 'barney': { 'age': 36, 'active': true }, + * 'fred': { 'age': 40, 'active': false }, + * 'pebbles': { 'age': 1, 'active': true } + * }; + * + * _.findKey(users, function(o) { return o.age < 40; }); + * // => 'barney' (iteration order is not guaranteed) + * + * // The `_.matches` iteratee shorthand. + * _.findKey(users, { 'age': 1, 'active': true }); + * // => 'pebbles' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findKey(users, ['active', false]); + * // => 'fred' + * + * // The `_.property` iteratee shorthand. + * _.findKey(users, 'active'); + * // => 'barney' + */ + function findKey(object, predicate) { + return baseFindKey(object, getIteratee(predicate, 3), baseForOwn); + } + + /** + * This method is like `_.findKey` except that it iterates over elements of + * a collection in the opposite order. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Object + * @param {Object} object The object to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {string|undefined} Returns the key of the matched element, + * else `undefined`. + * @example + * + * var users = { + * 'barney': { 'age': 36, 'active': true }, + * 'fred': { 'age': 40, 'active': false }, + * 'pebbles': { 'age': 1, 'active': true } + * }; + * + * _.findLastKey(users, function(o) { return o.age < 40; }); + * // => returns 'pebbles' assuming `_.findKey` returns 'barney' + * + * // The `_.matches` iteratee shorthand. + * _.findLastKey(users, { 'age': 36, 'active': true }); + * // => 'barney' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findLastKey(users, ['active', false]); + * // => 'fred' + * + * // The `_.property` iteratee shorthand. + * _.findLastKey(users, 'active'); + * // => 'pebbles' + */ + function findLastKey(object, predicate) { + return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight); + } + + /** + * Iterates over own and inherited enumerable string keyed properties of an + * object and invokes `iteratee` for each property. The iteratee is invoked + * with three arguments: (value, key, object). Iteratee functions may exit + * iteration early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @since 0.3.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forInRight + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forIn(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed). + */ + function forIn(object, iteratee) { + return object == null ? object : baseFor(object, getIteratee(iteratee, 3), keysIn); + } + + /** + * This method is like `_.forIn` except that it iterates over properties of + * `object` in the opposite order. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forIn + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forInRight(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'. + */ + function forInRight(object, iteratee) { + return object == null ? object : baseForRight(object, getIteratee(iteratee, 3), keysIn); + } + + /** + * Iterates over own enumerable string keyed properties of an object and + * invokes `iteratee` for each property. The iteratee is invoked with three + * arguments: (value, key, object). Iteratee functions may exit iteration + * early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @since 0.3.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forOwnRight + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forOwn(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a' then 'b' (iteration order is not guaranteed). + */ + function forOwn(object, iteratee) { + return object && baseForOwn(object, getIteratee(iteratee, 3)); + } + + /** + * This method is like `_.forOwn` except that it iterates over properties of + * `object` in the opposite order. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forOwn + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forOwnRight(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'. + */ + function forOwnRight(object, iteratee) { + return object && baseForOwnRight(object, getIteratee(iteratee, 3)); + } + + /** + * Creates an array of function property names from own enumerable properties + * of `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to inspect. + * @returns {Array} Returns the function names. + * @see _.functionsIn + * @example + * + * function Foo() { + * this.a = _.constant('a'); + * this.b = _.constant('b'); + * } + * + * Foo.prototype.c = _.constant('c'); + * + * _.functions(new Foo); + * // => ['a', 'b'] + */ + function functions(object) { + return object == null ? [] : baseFunctions(object, keys(object)); + } + + /** + * Creates an array of function property names from own and inherited + * enumerable properties of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to inspect. + * @returns {Array} Returns the function names. + * @see _.functions + * @example + * + * function Foo() { + * this.a = _.constant('a'); + * this.b = _.constant('b'); + * } + * + * Foo.prototype.c = _.constant('c'); + * + * _.functionsIn(new Foo); + * // => ['a', 'b', 'c'] + */ + function functionsIn(object) { + return object == null ? [] : baseFunctions(object, keysIn(object)); + } + + /** + * Gets the value at `path` of `object`. If the resolved value is + * `undefined`, the `defaultValue` is returned in its place. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @param {*} [defaultValue] The value returned for `undefined` resolved values. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.get(object, 'a[0].b.c'); + * // => 3 + * + * _.get(object, ['a', '0', 'b', 'c']); + * // => 3 + * + * _.get(object, 'a.b.c', 'default'); + * // => 'default' + */ + function get(object, path, defaultValue) { + var result = object == null ? undefined : baseGet(object, path); + return result === undefined ? defaultValue : result; + } + + /** + * Checks if `path` is a direct property of `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = { 'a': { 'b': 2 } }; + * var other = _.create({ 'a': _.create({ 'b': 2 }) }); + * + * _.has(object, 'a'); + * // => true + * + * _.has(object, 'a.b'); + * // => true + * + * _.has(object, ['a', 'b']); + * // => true + * + * _.has(other, 'a'); + * // => false + */ + function has(object, path) { + return object != null && hasPath(object, path, baseHas); + } + + /** + * Checks if `path` is a direct or inherited property of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = _.create({ 'a': _.create({ 'b': 2 }) }); + * + * _.hasIn(object, 'a'); + * // => true + * + * _.hasIn(object, 'a.b'); + * // => true + * + * _.hasIn(object, ['a', 'b']); + * // => true + * + * _.hasIn(object, 'b'); + * // => false + */ + function hasIn(object, path) { + return object != null && hasPath(object, path, baseHasIn); + } + + /** + * Creates an object composed of the inverted keys and values of `object`. + * If `object` contains duplicate values, subsequent values overwrite + * property assignments of previous values. + * + * @static + * @memberOf _ + * @since 0.7.0 + * @category Object + * @param {Object} object The object to invert. + * @returns {Object} Returns the new inverted object. + * @example + * + * var object = { 'a': 1, 'b': 2, 'c': 1 }; + * + * _.invert(object); + * // => { '1': 'c', '2': 'b' } + */ + var invert = createInverter(function (result, value, key) { + result[value] = key; + }, constant(identity)); + + /** + * This method is like `_.invert` except that the inverted object is generated + * from the results of running each element of `object` thru `iteratee`. The + * corresponding inverted value of each inverted key is an array of keys + * responsible for generating the inverted value. The iteratee is invoked + * with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.1.0 + * @category Object + * @param {Object} object The object to invert. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Object} Returns the new inverted object. + * @example + * + * var object = { 'a': 1, 'b': 2, 'c': 1 }; + * + * _.invertBy(object); + * // => { '1': ['a', 'c'], '2': ['b'] } + * + * _.invertBy(object, function(value) { + * return 'group' + value; + * }); + * // => { 'group1': ['a', 'c'], 'group2': ['b'] } + */ + var invertBy = createInverter(function (result, value, key) { + if (hasOwnProperty.call(result, value)) { + result[value].push(key); + } else { + result[value] = [key]; + } + }, getIteratee); + + /** + * Invokes the method at `path` of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the method to invoke. + * @param {...*} [args] The arguments to invoke the method with. + * @returns {*} Returns the result of the invoked method. + * @example + * + * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] }; + * + * _.invoke(object, 'a[0].b.c.slice', 1, 3); + * // => [2, 3] + */ + var invoke = baseRest(baseInvoke); + + /** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * for more details. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ + function keys(object) { + return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); + } + + /** + * Creates an array of the own and inherited enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keysIn(new Foo); + * // => ['a', 'b', 'c'] (iteration order is not guaranteed) + */ + function keysIn(object) { + return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); + } + + /** + * The opposite of `_.mapValues`; this method creates an object with the + * same values as `object` and keys generated by running each own enumerable + * string keyed property of `object` thru `iteratee`. The iteratee is invoked + * with three arguments: (value, key, object). + * + * @static + * @memberOf _ + * @since 3.8.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns the new mapped object. + * @see _.mapValues + * @example + * + * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) { + * return key + value; + * }); + * // => { 'a1': 1, 'b2': 2 } + */ + function mapKeys(object, iteratee) { + var result = {}; + iteratee = getIteratee(iteratee, 3); + + baseForOwn(object, function (value, key, object) { + baseAssignValue(result, iteratee(value, key, object), value); + }); + return result; + } + + /** + * Creates an object with the same keys as `object` and values generated + * by running each own enumerable string keyed property of `object` thru + * `iteratee`. The iteratee is invoked with three arguments: + * (value, key, object). + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns the new mapped object. + * @see _.mapKeys + * @example + * + * var users = { + * 'fred': { 'user': 'fred', 'age': 40 }, + * 'pebbles': { 'user': 'pebbles', 'age': 1 } + * }; + * + * _.mapValues(users, function(o) { return o.age; }); + * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) + * + * // The `_.property` iteratee shorthand. + * _.mapValues(users, 'age'); + * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) + */ + function mapValues(object, iteratee) { + var result = {}; + iteratee = getIteratee(iteratee, 3); + + baseForOwn(object, function (value, key, object) { + baseAssignValue(result, key, iteratee(value, key, object)); + }); + return result; + } + + /** + * This method is like `_.assign` except that it recursively merges own and + * inherited enumerable string keyed properties of source objects into the + * destination object. Source properties that resolve to `undefined` are + * skipped if a destination value exists. Array and plain object properties + * are merged recursively. Other objects and value types are overridden by + * assignment. Source objects are applied from left to right. Subsequent + * sources overwrite property assignments of previous sources. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 0.5.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @example + * + * var object = { + * 'a': [{ 'b': 2 }, { 'd': 4 }] + * }; + * + * var other = { + * 'a': [{ 'c': 3 }, { 'e': 5 }] + * }; + * + * _.merge(object, other); + * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] } + */ + var merge = createAssigner(function (object, source, srcIndex) { + baseMerge(object, source, srcIndex); + }); + + /** + * This method is like `_.merge` except that it accepts `customizer` which + * is invoked to produce the merged values of the destination and source + * properties. If `customizer` returns `undefined`, merging is handled by the + * method instead. The `customizer` is invoked with six arguments: + * (objValue, srcValue, key, object, source, stack). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} sources The source objects. + * @param {Function} customizer The function to customize assigned values. + * @returns {Object} Returns `object`. + * @example + * + * function customizer(objValue, srcValue) { + * if (_.isArray(objValue)) { + * return objValue.concat(srcValue); + * } + * } + * + * var object = { 'a': [1], 'b': [2] }; + * var other = { 'a': [3], 'b': [4] }; + * + * _.mergeWith(object, other, customizer); + * // => { 'a': [1, 3], 'b': [2, 4] } + */ + var mergeWith = createAssigner(function (object, source, srcIndex, customizer) { + baseMerge(object, source, srcIndex, customizer); + }); + + /** + * The opposite of `_.pick`; this method creates an object composed of the + * own and inherited enumerable property paths of `object` that are not omitted. + * + * **Note:** This method is considerably slower than `_.pick`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The source object. + * @param {...(string|string[])} [paths] The property paths to omit. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.omit(object, ['a', 'c']); + * // => { 'b': '2' } + */ + var omit = flatRest(function (object, paths) { + var result = {}; + if (object == null) { + return result; + } + var isDeep = false; + paths = arrayMap(paths, function (path) { + path = castPath(path, object); + isDeep || (isDeep = path.length > 1); + return path; + }); + copyObject(object, getAllKeysIn(object), result); + if (isDeep) { + result = baseClone( + result, + CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, + customOmitClone, + ); + } + var length = paths.length; + while (length--) { + baseUnset(result, paths[length]); + } + return result; + }); + + /** + * The opposite of `_.pickBy`; this method creates an object composed of + * the own and inherited enumerable string keyed properties of `object` that + * `predicate` doesn't return truthy for. The predicate is invoked with two + * arguments: (value, key). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The source object. + * @param {Function} [predicate=_.identity] The function invoked per property. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.omitBy(object, _.isNumber); + * // => { 'b': '2' } + */ + function omitBy(object, predicate) { + return pickBy(object, negate(getIteratee(predicate))); + } + + /** + * Creates an object composed of the picked `object` properties. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The source object. + * @param {...(string|string[])} [paths] The property paths to pick. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.pick(object, ['a', 'c']); + * // => { 'a': 1, 'c': 3 } + */ + var pick = flatRest(function (object, paths) { + return object == null ? {} : basePick(object, paths); + }); + + /** + * Creates an object composed of the `object` properties `predicate` returns + * truthy for. The predicate is invoked with two arguments: (value, key). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The source object. + * @param {Function} [predicate=_.identity] The function invoked per property. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.pickBy(object, _.isNumber); + * // => { 'a': 1, 'c': 3 } + */ + function pickBy(object, predicate) { + if (object == null) { + return {}; + } + var props = arrayMap(getAllKeysIn(object), function (prop) { + return [prop]; + }); + predicate = getIteratee(predicate); + return basePickBy(object, props, function (value, path) { + return predicate(value, path[0]); + }); + } + + /** + * This method is like `_.get` except that if the resolved value is a + * function it's invoked with the `this` binding of its parent object and + * its result is returned. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to resolve. + * @param {*} [defaultValue] The value returned for `undefined` resolved values. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] }; + * + * _.result(object, 'a[0].b.c1'); + * // => 3 + * + * _.result(object, 'a[0].b.c2'); + * // => 4 + * + * _.result(object, 'a[0].b.c3', 'default'); + * // => 'default' + * + * _.result(object, 'a[0].b.c3', _.constant('default')); + * // => 'default' + */ + function result(object, path, defaultValue) { + path = castPath(path, object); + + var index = -1, + length = path.length; + + // Ensure the loop is entered when path is empty. + if (!length) { + length = 1; + object = undefined; + } + while (++index < length) { + var value = object == null ? undefined : object[toKey(path[index])]; + if (value === undefined) { + index = length; + value = defaultValue; + } + object = isFunction(value) ? value.call(object) : value; + } + return object; + } + + /** + * Sets the value at `path` of `object`. If a portion of `path` doesn't exist, + * it's created. Arrays are created for missing index properties while objects + * are created for all other missing properties. Use `_.setWith` to customize + * `path` creation. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @returns {Object} Returns `object`. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.set(object, 'a[0].b.c', 4); + * console.log(object.a[0].b.c); + * // => 4 + * + * _.set(object, ['x', '0', 'y', 'z'], 5); + * console.log(object.x[0].y.z); + * // => 5 + */ + function set(object, path, value) { + return object == null ? object : baseSet(object, path, value); + } + + /** + * This method is like `_.set` except that it accepts `customizer` which is + * invoked to produce the objects of `path`. If `customizer` returns `undefined` + * path creation is handled by the method instead. The `customizer` is invoked + * with three arguments: (nsValue, key, nsObject). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @example + * + * var object = {}; + * + * _.setWith(object, '[0][1]', 'a', Object); + * // => { '0': { '1': 'a' } } + */ + function setWith(object, path, value, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return object == null ? object : baseSet(object, path, value, customizer); + } + + /** + * Creates an array of own enumerable string keyed-value pairs for `object` + * which can be consumed by `_.fromPairs`. If `object` is a map or set, its + * entries are returned. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias entries + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the key-value pairs. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.toPairs(new Foo); + * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed) + */ + var toPairs = createToPairs(keys); + + /** + * Creates an array of own and inherited enumerable string keyed-value pairs + * for `object` which can be consumed by `_.fromPairs`. If `object` is a map + * or set, its entries are returned. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias entriesIn + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the key-value pairs. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.toPairsIn(new Foo); + * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed) + */ + var toPairsIn = createToPairs(keysIn); + + /** + * An alternative to `_.reduce`; this method transforms `object` to a new + * `accumulator` object which is the result of running each of its own + * enumerable string keyed properties thru `iteratee`, with each invocation + * potentially mutating the `accumulator` object. If `accumulator` is not + * provided, a new object with the same `[[Prototype]]` will be used. The + * iteratee is invoked with four arguments: (accumulator, value, key, object). + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @since 1.3.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The custom accumulator value. + * @returns {*} Returns the accumulated value. + * @example + * + * _.transform([2, 3, 4], function(result, n) { + * result.push(n *= n); + * return n % 2 == 0; + * }, []); + * // => [4, 9] + * + * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { + * (result[value] || (result[value] = [])).push(key); + * }, {}); + * // => { '1': ['a', 'c'], '2': ['b'] } + */ + function transform(object, iteratee, accumulator) { + var isArr = isArray(object), + isArrLike = isArr || isBuffer(object) || isTypedArray(object); + + iteratee = getIteratee(iteratee, 4); + if (accumulator == null) { + var Ctor = object && object.constructor; + if (isArrLike) { + accumulator = isArr ? new Ctor() : []; + } else if (isObject(object)) { + accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {}; + } else { + accumulator = {}; + } + } + (isArrLike ? arrayEach : baseForOwn)(object, function (value, index, object) { + return iteratee(accumulator, value, index, object); + }); + return accumulator; + } + + /** + * Removes the property at `path` of `object`. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to unset. + * @returns {boolean} Returns `true` if the property is deleted, else `false`. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 7 } }] }; + * _.unset(object, 'a[0].b.c'); + * // => true + * + * console.log(object); + * // => { 'a': [{ 'b': {} }] }; + * + * _.unset(object, ['a', '0', 'b', 'c']); + * // => true + * + * console.log(object); + * // => { 'a': [{ 'b': {} }] }; + */ + function unset(object, path) { + return object == null ? true : baseUnset(object, path); + } + + /** + * This method is like `_.set` except that accepts `updater` to produce the + * value to set. Use `_.updateWith` to customize `path` creation. The `updater` + * is invoked with one argument: (value). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.6.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {Function} updater The function to produce the updated value. + * @returns {Object} Returns `object`. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.update(object, 'a[0].b.c', function(n) { return n * n; }); + * console.log(object.a[0].b.c); + * // => 9 + * + * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; }); + * console.log(object.x[0].y.z); + * // => 0 + */ + function update(object, path, updater) { + return object == null ? object : baseUpdate(object, path, castFunction(updater)); + } + + /** + * This method is like `_.update` except that it accepts `customizer` which is + * invoked to produce the objects of `path`. If `customizer` returns `undefined` + * path creation is handled by the method instead. The `customizer` is invoked + * with three arguments: (nsValue, key, nsObject). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.6.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {Function} updater The function to produce the updated value. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @example + * + * var object = {}; + * + * _.updateWith(object, '[0][1]', _.constant('a'), Object); + * // => { '0': { '1': 'a' } } + */ + function updateWith(object, path, updater, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer); + } + + /** + * Creates an array of the own enumerable string keyed property values of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property values. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.values(new Foo); + * // => [1, 2] (iteration order is not guaranteed) + * + * _.values('hi'); + * // => ['h', 'i'] + */ + function values(object) { + return object == null ? [] : baseValues(object, keys(object)); + } + + /** + * Creates an array of the own and inherited enumerable string keyed property + * values of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property values. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.valuesIn(new Foo); + * // => [1, 2, 3] (iteration order is not guaranteed) + */ + function valuesIn(object) { + return object == null ? [] : baseValues(object, keysIn(object)); + } + + /*------------------------------------------------------------------------*/ + + /** + * Clamps `number` within the inclusive `lower` and `upper` bounds. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Number + * @param {number} number The number to clamp. + * @param {number} [lower] The lower bound. + * @param {number} upper The upper bound. + * @returns {number} Returns the clamped number. + * @example + * + * _.clamp(-10, -5, 5); + * // => -5 + * + * _.clamp(10, -5, 5); + * // => 5 + */ + function clamp(number, lower, upper) { + if (upper === undefined) { + upper = lower; + lower = undefined; + } + if (upper !== undefined) { + upper = toNumber(upper); + upper = upper === upper ? upper : 0; + } + if (lower !== undefined) { + lower = toNumber(lower); + lower = lower === lower ? lower : 0; + } + return baseClamp(toNumber(number), lower, upper); + } + + /** + * Checks if `n` is between `start` and up to, but not including, `end`. If + * `end` is not specified, it's set to `start` with `start` then set to `0`. + * If `start` is greater than `end` the params are swapped to support + * negative ranges. + * + * @static + * @memberOf _ + * @since 3.3.0 + * @category Number + * @param {number} number The number to check. + * @param {number} [start=0] The start of the range. + * @param {number} end The end of the range. + * @returns {boolean} Returns `true` if `number` is in the range, else `false`. + * @see _.range, _.rangeRight + * @example + * + * _.inRange(3, 2, 4); + * // => true + * + * _.inRange(4, 8); + * // => true + * + * _.inRange(4, 2); + * // => false + * + * _.inRange(2, 2); + * // => false + * + * _.inRange(1.2, 2); + * // => true + * + * _.inRange(5.2, 4); + * // => false + * + * _.inRange(-3, -2, -6); + * // => true + */ + function inRange(number, start, end) { + start = toFinite(start); + if (end === undefined) { + end = start; + start = 0; + } else { + end = toFinite(end); + } + number = toNumber(number); + return baseInRange(number, start, end); + } + + /** + * Produces a random number between the inclusive `lower` and `upper` bounds. + * If only one argument is provided a number between `0` and the given number + * is returned. If `floating` is `true`, or either `lower` or `upper` are + * floats, a floating-point number is returned instead of an integer. + * + * **Note:** JavaScript follows the IEEE-754 standard for resolving + * floating-point values which can produce unexpected results. + * + * @static + * @memberOf _ + * @since 0.7.0 + * @category Number + * @param {number} [lower=0] The lower bound. + * @param {number} [upper=1] The upper bound. + * @param {boolean} [floating] Specify returning a floating-point number. + * @returns {number} Returns the random number. + * @example + * + * _.random(0, 5); + * // => an integer between 0 and 5 + * + * _.random(5); + * // => also an integer between 0 and 5 + * + * _.random(5, true); + * // => a floating-point number between 0 and 5 + * + * _.random(1.2, 5.2); + * // => a floating-point number between 1.2 and 5.2 + */ + function random(lower, upper, floating) { + if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) { + upper = floating = undefined; + } + if (floating === undefined) { + if (typeof upper == 'boolean') { + floating = upper; + upper = undefined; + } else if (typeof lower == 'boolean') { + floating = lower; + lower = undefined; + } + } + if (lower === undefined && upper === undefined) { + lower = 0; + upper = 1; + } else { + lower = toFinite(lower); + if (upper === undefined) { + upper = lower; + lower = 0; + } else { + upper = toFinite(upper); + } + } + if (lower > upper) { + var temp = lower; + lower = upper; + upper = temp; + } + if (floating || lower % 1 || upper % 1) { + var rand = nativeRandom(); + return nativeMin( + lower + rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1))), + upper, + ); + } + return baseRandom(lower, upper); + } + + /*------------------------------------------------------------------------*/ + + /** + * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the camel cased string. + * @example + * + * _.camelCase('Foo Bar'); + * // => 'fooBar' + * + * _.camelCase('--foo-bar--'); + * // => 'fooBar' + * + * _.camelCase('__FOO_BAR__'); + * // => 'fooBar' + */ + var camelCase = createCompounder(function (result, word, index) { + word = word.toLowerCase(); + return result + (index ? capitalize(word) : word); + }); + + /** + * Converts the first character of `string` to upper case and the remaining + * to lower case. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to capitalize. + * @returns {string} Returns the capitalized string. + * @example + * + * _.capitalize('FRED'); + * // => 'Fred' + */ + function capitalize(string) { + return upperFirst(toString(string).toLowerCase()); + } + + /** + * Deburrs `string` by converting + * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table) + * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A) + * letters to basic Latin letters and removing + * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to deburr. + * @returns {string} Returns the deburred string. + * @example + * + * _.deburr('déjà vu'); + * // => 'deja vu' + */ + function deburr(string) { + string = toString(string); + return string && string.replace(reLatin, deburrLetter).replace(reComboMark, ''); + } + + /** + * Checks if `string` ends with the given target string. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to inspect. + * @param {string} [target] The string to search for. + * @param {number} [position=string.length] The position to search up to. + * @returns {boolean} Returns `true` if `string` ends with `target`, + * else `false`. + * @example + * + * _.endsWith('abc', 'c'); + * // => true + * + * _.endsWith('abc', 'b'); + * // => false + * + * _.endsWith('abc', 'b', 2); + * // => true + */ + function endsWith(string, target, position) { + string = toString(string); + target = baseToString(target); + + var length = string.length; + position = position === undefined ? length : baseClamp(toInteger(position), 0, length); + + var end = position; + position -= target.length; + return position >= 0 && string.slice(position, end) == target; + } + + /** + * Converts the characters "&", "<", ">", '"', and "'" in `string` to their + * corresponding HTML entities. + * + * **Note:** No other characters are escaped. To escape additional + * characters use a third-party library like [_he_](https://mths.be/he). + * + * Though the ">" character is escaped for symmetry, characters like + * ">" and "/" don't need escaping in HTML and have no special meaning + * unless they're part of a tag or unquoted attribute value. See + * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands) + * (under "semi-related fun fact") for more details. + * + * When working with HTML you should always + * [quote attribute values](http://wonko.com/post/html-escaping) to reduce + * XSS vectors. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category String + * @param {string} [string=''] The string to escape. + * @returns {string} Returns the escaped string. + * @example + * + * _.escape('fred, barney, & pebbles'); + * // => 'fred, barney, & pebbles' + */ + function escape(string) { + string = toString(string); + return string && reHasUnescapedHtml.test(string) + ? string.replace(reUnescapedHtml, escapeHtmlChar) + : string; + } + + /** + * Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+", + * "?", "(", ")", "[", "]", "{", "}", and "|" in `string`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to escape. + * @returns {string} Returns the escaped string. + * @example + * + * _.escapeRegExp('[lodash](https://lodash.com/)'); + * // => '\[lodash\]\(https://lodash\.com/\)' + */ + function escapeRegExp(string) { + string = toString(string); + return string && reHasRegExpChar.test(string) ? string.replace(reRegExpChar, '\\$&') : string; + } + + /** + * Converts `string` to + * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the kebab cased string. + * @example + * + * _.kebabCase('Foo Bar'); + * // => 'foo-bar' + * + * _.kebabCase('fooBar'); + * // => 'foo-bar' + * + * _.kebabCase('__FOO_BAR__'); + * // => 'foo-bar' + */ + var kebabCase = createCompounder(function (result, word, index) { + return result + (index ? '-' : '') + word.toLowerCase(); + }); + + /** + * Converts `string`, as space separated words, to lower case. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the lower cased string. + * @example + * + * _.lowerCase('--Foo-Bar--'); + * // => 'foo bar' + * + * _.lowerCase('fooBar'); + * // => 'foo bar' + * + * _.lowerCase('__FOO_BAR__'); + * // => 'foo bar' + */ + var lowerCase = createCompounder(function (result, word, index) { + return result + (index ? ' ' : '') + word.toLowerCase(); + }); + + /** + * Converts the first character of `string` to lower case. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the converted string. + * @example + * + * _.lowerFirst('Fred'); + * // => 'fred' + * + * _.lowerFirst('FRED'); + * // => 'fRED' + */ + var lowerFirst = createCaseFirst('toLowerCase'); + + /** + * Pads `string` on the left and right sides if it's shorter than `length`. + * Padding characters are truncated if they can't be evenly divided by `length`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to pad. + * @param {number} [length=0] The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padded string. + * @example + * + * _.pad('abc', 8); + * // => ' abc ' + * + * _.pad('abc', 8, '_-'); + * // => '_-abc_-_' + * + * _.pad('abc', 3); + * // => 'abc' + */ + function pad(string, length, chars) { + string = toString(string); + length = toInteger(length); + + var strLength = length ? stringSize(string) : 0; + if (!length || strLength >= length) { + return string; + } + var mid = (length - strLength) / 2; + return createPadding(nativeFloor(mid), chars) + string + createPadding(nativeCeil(mid), chars); + } + + /** + * Pads `string` on the right side if it's shorter than `length`. Padding + * characters are truncated if they exceed `length`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to pad. + * @param {number} [length=0] The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padded string. + * @example + * + * _.padEnd('abc', 6); + * // => 'abc ' + * + * _.padEnd('abc', 6, '_-'); + * // => 'abc_-_' + * + * _.padEnd('abc', 3); + * // => 'abc' + */ + function padEnd(string, length, chars) { + string = toString(string); + length = toInteger(length); + + var strLength = length ? stringSize(string) : 0; + return length && strLength < length + ? string + createPadding(length - strLength, chars) + : string; + } + + /** + * Pads `string` on the left side if it's shorter than `length`. Padding + * characters are truncated if they exceed `length`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to pad. + * @param {number} [length=0] The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padded string. + * @example + * + * _.padStart('abc', 6); + * // => ' abc' + * + * _.padStart('abc', 6, '_-'); + * // => '_-_abc' + * + * _.padStart('abc', 3); + * // => 'abc' + */ + function padStart(string, length, chars) { + string = toString(string); + length = toInteger(length); + + var strLength = length ? stringSize(string) : 0; + return length && strLength < length + ? createPadding(length - strLength, chars) + string + : string; + } + + /** + * Converts `string` to an integer of the specified radix. If `radix` is + * `undefined` or `0`, a `radix` of `10` is used unless `value` is a + * hexadecimal, in which case a `radix` of `16` is used. + * + * **Note:** This method aligns with the + * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category String + * @param {string} string The string to convert. + * @param {number} [radix=10] The radix to interpret `value` by. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {number} Returns the converted integer. + * @example + * + * _.parseInt('08'); + * // => 8 + * + * _.map(['6', '08', '10'], _.parseInt); + * // => [6, 8, 10] + */ + function parseInt(string, radix, guard) { + if (guard || radix == null) { + radix = 0; + } else if (radix) { + radix = +radix; + } + return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0); + } + + /** + * Repeats the given string `n` times. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to repeat. + * @param {number} [n=1] The number of times to repeat the string. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {string} Returns the repeated string. + * @example + * + * _.repeat('*', 3); + * // => '***' + * + * _.repeat('abc', 2); + * // => 'abcabc' + * + * _.repeat('abc', 0); + * // => '' + */ + function repeat(string, n, guard) { + if (guard ? isIterateeCall(string, n, guard) : n === undefined) { + n = 1; + } else { + n = toInteger(n); + } + return baseRepeat(toString(string), n); + } + + /** + * Replaces matches for `pattern` in `string` with `replacement`. + * + * **Note:** This method is based on + * [`String#replace`](https://mdn.io/String/replace). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to modify. + * @param {RegExp|string} pattern The pattern to replace. + * @param {Function|string} replacement The match replacement. + * @returns {string} Returns the modified string. + * @example + * + * _.replace('Hi Fred', 'Fred', 'Barney'); + * // => 'Hi Barney' + */ + function replace() { + var args = arguments, + string = toString(args[0]); + + return args.length < 3 ? string : string.replace(args[1], args[2]); + } + + /** + * Converts `string` to + * [snake case](https://en.wikipedia.org/wiki/Snake_case). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the snake cased string. + * @example + * + * _.snakeCase('Foo Bar'); + * // => 'foo_bar' + * + * _.snakeCase('fooBar'); + * // => 'foo_bar' + * + * _.snakeCase('--FOO-BAR--'); + * // => 'foo_bar' + */ + var snakeCase = createCompounder(function (result, word, index) { + return result + (index ? '_' : '') + word.toLowerCase(); + }); + + /** + * Splits `string` by `separator`. + * + * **Note:** This method is based on + * [`String#split`](https://mdn.io/String/split). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to split. + * @param {RegExp|string} separator The separator pattern to split by. + * @param {number} [limit] The length to truncate results to. + * @returns {Array} Returns the string segments. + * @example + * + * _.split('a-b-c', '-', 2); + * // => ['a', 'b'] + */ + function split(string, separator, limit) { + if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) { + separator = limit = undefined; + } + limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0; + if (!limit) { + return []; + } + string = toString(string); + if (string && (typeof separator == 'string' || (separator != null && !isRegExp(separator)))) { + separator = baseToString(separator); + if (!separator && hasUnicode(string)) { + return castSlice(stringToArray(string), 0, limit); + } + } + return string.split(separator, limit); + } + + /** + * Converts `string` to + * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage). + * + * @static + * @memberOf _ + * @since 3.1.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the start cased string. + * @example + * + * _.startCase('--foo-bar--'); + * // => 'Foo Bar' + * + * _.startCase('fooBar'); + * // => 'Foo Bar' + * + * _.startCase('__FOO_BAR__'); + * // => 'FOO BAR' + */ + var startCase = createCompounder(function (result, word, index) { + return result + (index ? ' ' : '') + upperFirst(word); + }); + + /** + * Checks if `string` starts with the given target string. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to inspect. + * @param {string} [target] The string to search for. + * @param {number} [position=0] The position to search from. + * @returns {boolean} Returns `true` if `string` starts with `target`, + * else `false`. + * @example + * + * _.startsWith('abc', 'a'); + * // => true + * + * _.startsWith('abc', 'b'); + * // => false + * + * _.startsWith('abc', 'b', 1); + * // => true + */ + function startsWith(string, target, position) { + string = toString(string); + position = position == null ? 0 : baseClamp(toInteger(position), 0, string.length); + + target = baseToString(target); + return string.slice(position, position + target.length) == target; + } + + /** + * Creates a compiled template function that can interpolate data properties + * in "interpolate" delimiters, HTML-escape interpolated data properties in + * "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data + * properties may be accessed as free variables in the template. If a setting + * object is given, it takes precedence over `_.templateSettings` values. + * + * **Note:** In the development build `_.template` utilizes + * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl) + * for easier debugging. + * + * For more information on precompiling templates see + * [lodash's custom builds documentation](https://lodash.com/custom-builds). + * + * For more information on Chrome extension sandboxes see + * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval). + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category String + * @param {string} [string=''] The template string. + * @param {Object} [options={}] The options object. + * @param {RegExp} [options.escape=_.templateSettings.escape] + * The HTML "escape" delimiter. + * @param {RegExp} [options.evaluate=_.templateSettings.evaluate] + * The "evaluate" delimiter. + * @param {Object} [options.imports=_.templateSettings.imports] + * An object to import into the template as free variables. + * @param {RegExp} [options.interpolate=_.templateSettings.interpolate] + * The "interpolate" delimiter. + * @param {string} [options.sourceURL='lodash.templateSources[n]'] + * The sourceURL of the compiled template. + * @param {string} [options.variable='obj'] + * The data object variable name. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the compiled template function. + * @example + * + * // Use the "interpolate" delimiter to create a compiled template. + * var compiled = _.template('hello <%= user %>!'); + * compiled({ 'user': 'fred' }); + * // => 'hello fred!' + * + * // Use the HTML "escape" delimiter to escape data property values. + * var compiled = _.template('<b><%- value %></b>'); + * compiled({ 'value': '<script>' }); + * // => '<b><script></b>' + * + * // Use the "evaluate" delimiter to execute JavaScript and generate HTML. + * var compiled = _.template('<% _.forEach(users, function(user) { %><li><%- user %></li><% }); %>'); + * compiled({ 'users': ['fred', 'barney'] }); + * // => '<li>fred</li><li>barney</li>' + * + * // Use the internal `print` function in "evaluate" delimiters. + * var compiled = _.template('<% print("hello " + user); %>!'); + * compiled({ 'user': 'barney' }); + * // => 'hello barney!' + * + * // Use the ES template literal delimiter as an "interpolate" delimiter. + * // Disable support by replacing the "interpolate" delimiter. + * var compiled = _.template('hello ${ user }!'); + * compiled({ 'user': 'pebbles' }); + * // => 'hello pebbles!' + * + * // Use backslashes to treat delimiters as plain text. + * var compiled = _.template('<%= "\\<%- value %\\>" %>'); + * compiled({ 'value': 'ignored' }); + * // => '<%- value %>' + * + * // Use the `imports` option to import `jQuery` as `jq`. + * var text = '<% jq.each(users, function(user) { %><li><%- user %></li><% }); %>'; + * var compiled = _.template(text, { 'imports': { 'jq': jQuery } }); + * compiled({ 'users': ['fred', 'barney'] }); + * // => '<li>fred</li><li>barney</li>' + * + * // Use the `sourceURL` option to specify a custom sourceURL for the template. + * var compiled = _.template('hello <%= user %>!', { 'sourceURL': '/basic/greeting.jst' }); + * compiled(data); + * // => Find the source of "greeting.jst" under the Sources tab or Resources panel of the web inspector. + * + * // Use the `variable` option to ensure a with-statement isn't used in the compiled template. + * var compiled = _.template('hi <%= data.user %>!', { 'variable': 'data' }); + * compiled.source; + * // => function(data) { + * // var __t, __p = ''; + * // __p += 'hi ' + ((__t = ( data.user )) == null ? '' : __t) + '!'; + * // return __p; + * // } + * + * // Use custom template delimiters. + * _.templateSettings.interpolate = /{{([\s\S]+?)}}/g; + * var compiled = _.template('hello {{ user }}!'); + * compiled({ 'user': 'mustache' }); + * // => 'hello mustache!' + * + * // Use the `source` property to inline compiled templates for meaningful + * // line numbers in error messages and stack traces. + * fs.writeFileSync(path.join(process.cwd(), 'jst.js'), '\ + * var JST = {\ + * "main": ' + _.template(mainText).source + '\ + * };\ + * '); + */ + function template(string, options, guard) { + // Based on John Resig's `tmpl` implementation + // (http://ejohn.org/blog/javascript-micro-templating/) + // and Laura Doktorova's doT.js (https://github.com/olado/doT). + var settings = lodash.templateSettings; + + if (guard && isIterateeCall(string, options, guard)) { + options = undefined; + } + string = toString(string); + options = assignInWith({}, options, settings, customDefaultsAssignIn); + + var imports = assignInWith({}, options.imports, settings.imports, customDefaultsAssignIn), + importsKeys = keys(imports), + importsValues = baseValues(imports, importsKeys); + + var isEscaping, + isEvaluating, + index = 0, + interpolate = options.interpolate || reNoMatch, + source = "__p += '"; + + // Compile the regexp to match each delimiter. + var reDelimiters = RegExp( + (options.escape || reNoMatch).source + + '|' + + interpolate.source + + '|' + + (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + + '|' + + (options.evaluate || reNoMatch).source + + '|$', + 'g', + ); + + // Use a sourceURL for easier debugging. + var sourceURL = + '//# sourceURL=' + + ('sourceURL' in options + ? options.sourceURL + : 'lodash.templateSources[' + ++templateCounter + ']') + + '\n'; + + string.replace( + reDelimiters, + function (match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) { + interpolateValue || (interpolateValue = esTemplateValue); + + // Escape characters that can't be included in string literals. + source += string.slice(index, offset).replace(reUnescapedString, escapeStringChar); + + // Replace delimiters with snippets. + if (escapeValue) { + isEscaping = true; + source += "' +\n__e(" + escapeValue + ") +\n'"; + } + if (evaluateValue) { + isEvaluating = true; + source += "';\n" + evaluateValue + ";\n__p += '"; + } + if (interpolateValue) { + source += "' +\n((__t = (" + interpolateValue + ")) == null ? '' : __t) +\n'"; + } + index = offset + match.length; + + // The JS engine embedded in Adobe products needs `match` returned in + // order to produce the correct `offset` value. + return match; + }, + ); + + source += "';\n"; + + // If `variable` is not specified wrap a with-statement around the generated + // code to add the data object to the top of the scope chain. + var variable = options.variable; + if (!variable) { + source = 'with (obj) {\n' + source + '\n}\n'; + } + // Cleanup code by stripping empty strings. + source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source) + .replace(reEmptyStringMiddle, '$1') + .replace(reEmptyStringTrailing, '$1;'); + + // Frame code as the function body. + source = + 'function(' + + (variable || 'obj') + + ') {\n' + + (variable ? '' : 'obj || (obj = {});\n') + + "var __t, __p = ''" + + (isEscaping ? ', __e = _.escape' : '') + + (isEvaluating + ? ', __j = Array.prototype.join;\n' + + "function print() { __p += __j.call(arguments, '') }\n" + : ';\n') + + source + + 'return __p\n}'; + + var result = attempt(function () { + return Function(importsKeys, sourceURL + 'return ' + source).apply(undefined, importsValues); + }); + + // Provide the compiled function's source by its `toString` method or + // the `source` property as a convenience for inlining compiled templates. + result.source = source; + if (isError(result)) { + throw result; + } + return result; + } + + /** + * Converts `string`, as a whole, to lower case just like + * [String#toLowerCase](https://mdn.io/toLowerCase). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the lower cased string. + * @example + * + * _.toLower('--Foo-Bar--'); + * // => '--foo-bar--' + * + * _.toLower('fooBar'); + * // => 'foobar' + * + * _.toLower('__FOO_BAR__'); + * // => '__foo_bar__' + */ + function toLower(value) { + return toString(value).toLowerCase(); + } + + /** + * Converts `string`, as a whole, to upper case just like + * [String#toUpperCase](https://mdn.io/toUpperCase). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the upper cased string. + * @example + * + * _.toUpper('--foo-bar--'); + * // => '--FOO-BAR--' + * + * _.toUpper('fooBar'); + * // => 'FOOBAR' + * + * _.toUpper('__foo_bar__'); + * // => '__FOO_BAR__' + */ + function toUpper(value) { + return toString(value).toUpperCase(); + } + + /** + * Removes leading and trailing whitespace or specified characters from `string`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to trim. + * @param {string} [chars=whitespace] The characters to trim. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {string} Returns the trimmed string. + * @example + * + * _.trim(' abc '); + * // => 'abc' + * + * _.trim('-_-abc-_-', '_-'); + * // => 'abc' + * + * _.map([' foo ', ' bar '], _.trim); + * // => ['foo', 'bar'] + */ + function trim(string, chars, guard) { + string = toString(string); + if (string && (guard || chars === undefined)) { + return string.replace(reTrim, ''); + } + if (!string || !(chars = baseToString(chars))) { + return string; + } + var strSymbols = stringToArray(string), + chrSymbols = stringToArray(chars), + start = charsStartIndex(strSymbols, chrSymbols), + end = charsEndIndex(strSymbols, chrSymbols) + 1; + + return castSlice(strSymbols, start, end).join(''); + } + + /** + * Removes trailing whitespace or specified characters from `string`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to trim. + * @param {string} [chars=whitespace] The characters to trim. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {string} Returns the trimmed string. + * @example + * + * _.trimEnd(' abc '); + * // => ' abc' + * + * _.trimEnd('-_-abc-_-', '_-'); + * // => '-_-abc' + */ + function trimEnd(string, chars, guard) { + string = toString(string); + if (string && (guard || chars === undefined)) { + return string.replace(reTrimEnd, ''); + } + if (!string || !(chars = baseToString(chars))) { + return string; + } + var strSymbols = stringToArray(string), + end = charsEndIndex(strSymbols, stringToArray(chars)) + 1; + + return castSlice(strSymbols, 0, end).join(''); + } + + /** + * Removes leading whitespace or specified characters from `string`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to trim. + * @param {string} [chars=whitespace] The characters to trim. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {string} Returns the trimmed string. + * @example + * + * _.trimStart(' abc '); + * // => 'abc ' + * + * _.trimStart('-_-abc-_-', '_-'); + * // => 'abc-_-' + */ + function trimStart(string, chars, guard) { + string = toString(string); + if (string && (guard || chars === undefined)) { + return string.replace(reTrimStart, ''); + } + if (!string || !(chars = baseToString(chars))) { + return string; + } + var strSymbols = stringToArray(string), + start = charsStartIndex(strSymbols, stringToArray(chars)); + + return castSlice(strSymbols, start).join(''); + } + + /** + * Truncates `string` if it's longer than the given maximum string length. + * The last characters of the truncated string are replaced with the omission + * string which defaults to "...". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to truncate. + * @param {Object} [options={}] The options object. + * @param {number} [options.length=30] The maximum string length. + * @param {string} [options.omission='...'] The string to indicate text is omitted. + * @param {RegExp|string} [options.separator] The separator pattern to truncate to. + * @returns {string} Returns the truncated string. + * @example + * + * _.truncate('hi-diddly-ho there, neighborino'); + * // => 'hi-diddly-ho there, neighbo...' + * + * _.truncate('hi-diddly-ho there, neighborino', { + * 'length': 24, + * 'separator': ' ' + * }); + * // => 'hi-diddly-ho there,...' + * + * _.truncate('hi-diddly-ho there, neighborino', { + * 'length': 24, + * 'separator': /,? +/ + * }); + * // => 'hi-diddly-ho there...' + * + * _.truncate('hi-diddly-ho there, neighborino', { + * 'omission': ' [...]' + * }); + * // => 'hi-diddly-ho there, neig [...]' + */ + function truncate(string, options) { + var length = DEFAULT_TRUNC_LENGTH, + omission = DEFAULT_TRUNC_OMISSION; + + if (isObject(options)) { + var separator = 'separator' in options ? options.separator : separator; + length = 'length' in options ? toInteger(options.length) : length; + omission = 'omission' in options ? baseToString(options.omission) : omission; + } + string = toString(string); + + var strLength = string.length; + if (hasUnicode(string)) { + var strSymbols = stringToArray(string); + strLength = strSymbols.length; + } + if (length >= strLength) { + return string; + } + var end = length - stringSize(omission); + if (end < 1) { + return omission; + } + var result = strSymbols ? castSlice(strSymbols, 0, end).join('') : string.slice(0, end); + + if (separator === undefined) { + return result + omission; + } + if (strSymbols) { + end += result.length - end; + } + if (isRegExp(separator)) { + if (string.slice(end).search(separator)) { + var match, + substring = result; + + if (!separator.global) { + separator = RegExp(separator.source, toString(reFlags.exec(separator)) + 'g'); + } + separator.lastIndex = 0; + while ((match = separator.exec(substring))) { + var newEnd = match.index; + } + result = result.slice(0, newEnd === undefined ? end : newEnd); + } + } else if (string.indexOf(baseToString(separator), end) != end) { + var index = result.lastIndexOf(separator); + if (index > -1) { + result = result.slice(0, index); + } + } + return result + omission; + } + + /** + * The inverse of `_.escape`; this method converts the HTML entities + * `&`, `<`, `>`, `"`, and `'` in `string` to + * their corresponding characters. + * + * **Note:** No other HTML entities are unescaped. To unescape additional + * HTML entities use a third-party library like [_he_](https://mths.be/he). + * + * @static + * @memberOf _ + * @since 0.6.0 + * @category String + * @param {string} [string=''] The string to unescape. + * @returns {string} Returns the unescaped string. + * @example + * + * _.unescape('fred, barney, & pebbles'); + * // => 'fred, barney, & pebbles' + */ + function unescape(string) { + string = toString(string); + return string && reHasEscapedHtml.test(string) + ? string.replace(reEscapedHtml, unescapeHtmlChar) + : string; + } + + /** + * Converts `string`, as space separated words, to upper case. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the upper cased string. + * @example + * + * _.upperCase('--foo-bar'); + * // => 'FOO BAR' + * + * _.upperCase('fooBar'); + * // => 'FOO BAR' + * + * _.upperCase('__foo_bar__'); + * // => 'FOO BAR' + */ + var upperCase = createCompounder(function (result, word, index) { + return result + (index ? ' ' : '') + word.toUpperCase(); + }); + + /** + * Converts the first character of `string` to upper case. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the converted string. + * @example + * + * _.upperFirst('fred'); + * // => 'Fred' + * + * _.upperFirst('FRED'); + * // => 'FRED' + */ + var upperFirst = createCaseFirst('toUpperCase'); + + /** + * Splits `string` into an array of its words. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to inspect. + * @param {RegExp|string} [pattern] The pattern to match words. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the words of `string`. + * @example + * + * _.words('fred, barney, & pebbles'); + * // => ['fred', 'barney', 'pebbles'] + * + * _.words('fred, barney, & pebbles', /[^, ]+/g); + * // => ['fred', 'barney', '&', 'pebbles'] + */ + function words(string, pattern, guard) { + string = toString(string); + pattern = guard ? undefined : pattern; + + if (pattern === undefined) { + return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string); + } + return string.match(pattern) || []; + } + + /*------------------------------------------------------------------------*/ + + /** + * Attempts to invoke `func`, returning either the result or the caught error + * object. Any additional arguments are provided to `func` when it's invoked. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Util + * @param {Function} func The function to attempt. + * @param {...*} [args] The arguments to invoke `func` with. + * @returns {*} Returns the `func` result or error object. + * @example + * + * // Avoid throwing errors for invalid selectors. + * var elements = _.attempt(function(selector) { + * return document.querySelectorAll(selector); + * }, '>_>'); + * + * if (_.isError(elements)) { + * elements = []; + * } + */ + var attempt = baseRest(function (func, args) { + try { + return apply(func, undefined, args); + } catch (e) { + return isError(e) ? e : new Error(e); + } + }); + + /** + * Binds methods of an object to the object itself, overwriting the existing + * method. + * + * **Note:** This method doesn't set the "length" property of bound functions. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {Object} object The object to bind and assign the bound methods to. + * @param {...(string|string[])} methodNames The object method names to bind. + * @returns {Object} Returns `object`. + * @example + * + * var view = { + * 'label': 'docs', + * 'click': function() { + * console.log('clicked ' + this.label); + * } + * }; + * + * _.bindAll(view, ['click']); + * jQuery(element).on('click', view.click); + * // => Logs 'clicked docs' when clicked. + */ + var bindAll = flatRest(function (object, methodNames) { + arrayEach(methodNames, function (key) { + key = toKey(key); + baseAssignValue(object, key, bind(object[key], object)); + }); + return object; + }); + + /** + * Creates a function that iterates over `pairs` and invokes the corresponding + * function of the first predicate to return truthy. The predicate-function + * pairs are invoked with the `this` binding and arguments of the created + * function. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Util + * @param {Array} pairs The predicate-function pairs. + * @returns {Function} Returns the new composite function. + * @example + * + * var func = _.cond([ + * [_.matches({ 'a': 1 }), _.constant('matches A')], + * [_.conforms({ 'b': _.isNumber }), _.constant('matches B')], + * [_.stubTrue, _.constant('no match')] + * ]); + * + * func({ 'a': 1, 'b': 2 }); + * // => 'matches A' + * + * func({ 'a': 0, 'b': 1 }); + * // => 'matches B' + * + * func({ 'a': '1', 'b': '2' }); + * // => 'no match' + */ + function cond(pairs) { + var length = pairs == null ? 0 : pairs.length, + toIteratee = getIteratee(); + + pairs = !length + ? [] + : arrayMap(pairs, function (pair) { + if (typeof pair[1] != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + return [toIteratee(pair[0]), pair[1]]; + }); + + return baseRest(function (args) { + var index = -1; + while (++index < length) { + var pair = pairs[index]; + if (apply(pair[0], this, args)) { + return apply(pair[1], this, args); + } + } + }); + } + + /** + * Creates a function that invokes the predicate properties of `source` with + * the corresponding property values of a given object, returning `true` if + * all predicates return truthy, else `false`. + * + * **Note:** The created function is equivalent to `_.conformsTo` with + * `source` partially applied. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Util + * @param {Object} source The object of property predicates to conform to. + * @returns {Function} Returns the new spec function. + * @example + * + * var objects = [ + * { 'a': 2, 'b': 1 }, + * { 'a': 1, 'b': 2 } + * ]; + * + * _.filter(objects, _.conforms({ 'b': function(n) { return n > 1; } })); + * // => [{ 'a': 1, 'b': 2 }] + */ + function conforms(source) { + return baseConforms(baseClone(source, CLONE_DEEP_FLAG)); + } + + /** + * Creates a function that returns `value`. + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Util + * @param {*} value The value to return from the new function. + * @returns {Function} Returns the new constant function. + * @example + * + * var objects = _.times(2, _.constant({ 'a': 1 })); + * + * console.log(objects); + * // => [{ 'a': 1 }, { 'a': 1 }] + * + * console.log(objects[0] === objects[1]); + * // => true + */ + function constant(value) { + return function () { + return value; + }; + } + + /** + * Checks `value` to determine whether a default value should be returned in + * its place. The `defaultValue` is returned if `value` is `NaN`, `null`, + * or `undefined`. + * + * @static + * @memberOf _ + * @since 4.14.0 + * @category Util + * @param {*} value The value to check. + * @param {*} defaultValue The default value. + * @returns {*} Returns the resolved value. + * @example + * + * _.defaultTo(1, 10); + * // => 1 + * + * _.defaultTo(undefined, 10); + * // => 10 + */ + function defaultTo(value, defaultValue) { + return value == null || value !== value ? defaultValue : value; + } + + /** + * Creates a function that returns the result of invoking the given functions + * with the `this` binding of the created function, where each successive + * invocation is supplied the return value of the previous. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Util + * @param {...(Function|Function[])} [funcs] The functions to invoke. + * @returns {Function} Returns the new composite function. + * @see _.flowRight + * @example + * + * function square(n) { + * return n * n; + * } + * + * var addSquare = _.flow([_.add, square]); + * addSquare(1, 2); + * // => 9 + */ + var flow = createFlow(); + + /** + * This method is like `_.flow` except that it creates a function that + * invokes the given functions from right to left. + * + * @static + * @since 3.0.0 + * @memberOf _ + * @category Util + * @param {...(Function|Function[])} [funcs] The functions to invoke. + * @returns {Function} Returns the new composite function. + * @see _.flow + * @example + * + * function square(n) { + * return n * n; + * } + * + * var addSquare = _.flowRight([square, _.add]); + * addSquare(1, 2); + * // => 9 + */ + var flowRight = createFlow(true); + + /** + * This method returns the first argument it receives. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {*} value Any value. + * @returns {*} Returns `value`. + * @example + * + * var object = { 'a': 1 }; + * + * console.log(_.identity(object) === object); + * // => true + */ + function identity(value) { + return value; + } + + /** + * Creates a function that invokes `func` with the arguments of the created + * function. If `func` is a property name, the created function returns the + * property value for a given element. If `func` is an array or object, the + * created function returns `true` for elements that contain the equivalent + * source properties, otherwise it returns `false`. + * + * @static + * @since 4.0.0 + * @memberOf _ + * @category Util + * @param {*} [func=_.identity] The value to convert to a callback. + * @returns {Function} Returns the callback. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * // The `_.matches` iteratee shorthand. + * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true })); + * // => [{ 'user': 'barney', 'age': 36, 'active': true }] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.filter(users, _.iteratee(['user', 'fred'])); + * // => [{ 'user': 'fred', 'age': 40 }] + * + * // The `_.property` iteratee shorthand. + * _.map(users, _.iteratee('user')); + * // => ['barney', 'fred'] + * + * // Create custom iteratee shorthands. + * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) { + * return !_.isRegExp(func) ? iteratee(func) : function(string) { + * return func.test(string); + * }; + * }); + * + * _.filter(['abc', 'def'], /ef/); + * // => ['def'] + */ + function iteratee(func) { + return baseIteratee(typeof func == 'function' ? func : baseClone(func, CLONE_DEEP_FLAG)); + } + + /** + * Creates a function that performs a partial deep comparison between a given + * object and `source`, returning `true` if the given object has equivalent + * property values, else `false`. + * + * **Note:** The created function is equivalent to `_.isMatch` with `source` + * partially applied. + * + * Partial comparisons will match empty array and empty object `source` + * values against any array or object value, respectively. See `_.isEqual` + * for a list of supported value comparisons. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Util + * @param {Object} source The object of property values to match. + * @returns {Function} Returns the new spec function. + * @example + * + * var objects = [ + * { 'a': 1, 'b': 2, 'c': 3 }, + * { 'a': 4, 'b': 5, 'c': 6 } + * ]; + * + * _.filter(objects, _.matches({ 'a': 4, 'c': 6 })); + * // => [{ 'a': 4, 'b': 5, 'c': 6 }] + */ + function matches(source) { + return baseMatches(baseClone(source, CLONE_DEEP_FLAG)); + } + + /** + * Creates a function that performs a partial deep comparison between the + * value at `path` of a given object to `srcValue`, returning `true` if the + * object value is equivalent, else `false`. + * + * **Note:** Partial comparisons will match empty array and empty object + * `srcValue` values against any array or object value, respectively. See + * `_.isEqual` for a list of supported value comparisons. + * + * @static + * @memberOf _ + * @since 3.2.0 + * @category Util + * @param {Array|string} path The path of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + * @example + * + * var objects = [ + * { 'a': 1, 'b': 2, 'c': 3 }, + * { 'a': 4, 'b': 5, 'c': 6 } + * ]; + * + * _.find(objects, _.matchesProperty('a', 4)); + * // => { 'a': 4, 'b': 5, 'c': 6 } + */ + function matchesProperty(path, srcValue) { + return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG)); + } + + /** + * Creates a function that invokes the method at `path` of a given object. + * Any additional arguments are provided to the invoked method. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Util + * @param {Array|string} path The path of the method to invoke. + * @param {...*} [args] The arguments to invoke the method with. + * @returns {Function} Returns the new invoker function. + * @example + * + * var objects = [ + * { 'a': { 'b': _.constant(2) } }, + * { 'a': { 'b': _.constant(1) } } + * ]; + * + * _.map(objects, _.method('a.b')); + * // => [2, 1] + * + * _.map(objects, _.method(['a', 'b'])); + * // => [2, 1] + */ + var method = baseRest(function (path, args) { + return function (object) { + return baseInvoke(object, path, args); + }; + }); + + /** + * The opposite of `_.method`; this method creates a function that invokes + * the method at a given path of `object`. Any additional arguments are + * provided to the invoked method. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Util + * @param {Object} object The object to query. + * @param {...*} [args] The arguments to invoke the method with. + * @returns {Function} Returns the new invoker function. + * @example + * + * var array = _.times(3, _.constant), + * object = { 'a': array, 'b': array, 'c': array }; + * + * _.map(['a[2]', 'c[0]'], _.methodOf(object)); + * // => [2, 0] + * + * _.map([['a', '2'], ['c', '0']], _.methodOf(object)); + * // => [2, 0] + */ + var methodOf = baseRest(function (object, args) { + return function (path) { + return baseInvoke(object, path, args); + }; + }); + + /** + * Adds all own enumerable string keyed function properties of a source + * object to the destination object. If `object` is a function, then methods + * are added to its prototype as well. + * + * **Note:** Use `_.runInContext` to create a pristine `lodash` function to + * avoid conflicts caused by modifying the original. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {Function|Object} [object=lodash] The destination object. + * @param {Object} source The object of functions to add. + * @param {Object} [options={}] The options object. + * @param {boolean} [options.chain=true] Specify whether mixins are chainable. + * @returns {Function|Object} Returns `object`. + * @example + * + * function vowels(string) { + * return _.filter(string, function(v) { + * return /[aeiou]/i.test(v); + * }); + * } + * + * _.mixin({ 'vowels': vowels }); + * _.vowels('fred'); + * // => ['e'] + * + * _('fred').vowels().value(); + * // => ['e'] + * + * _.mixin({ 'vowels': vowels }, { 'chain': false }); + * _('fred').vowels(); + * // => ['e'] + */ + function mixin(object, source, options) { + var props = keys(source), + methodNames = baseFunctions(source, props); + + if (options == null && !(isObject(source) && (methodNames.length || !props.length))) { + options = source; + source = object; + object = this; + methodNames = baseFunctions(source, keys(source)); + } + var chain = !(isObject(options) && 'chain' in options) || !!options.chain, + isFunc = isFunction(object); + + arrayEach(methodNames, function (methodName) { + var func = source[methodName]; + object[methodName] = func; + if (isFunc) { + object.prototype[methodName] = function () { + var chainAll = this.__chain__; + if (chain || chainAll) { + var result = object(this.__wrapped__), + actions = (result.__actions__ = copyArray(this.__actions__)); + + actions.push({ func: func, args: arguments, thisArg: object }); + result.__chain__ = chainAll; + return result; + } + return func.apply(object, arrayPush([this.value()], arguments)); + }; + } + }); + + return object; + } + + /** + * Reverts the `_` variable to its previous value and returns a reference to + * the `lodash` function. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @returns {Function} Returns the `lodash` function. + * @example + * + * var lodash = _.noConflict(); + */ + function noConflict() { + if (root._ === this) { + root._ = oldDash; + } + return this; + } + + /** + * This method returns `undefined`. + * + * @static + * @memberOf _ + * @since 2.3.0 + * @category Util + * @example + * + * _.times(2, _.noop); + * // => [undefined, undefined] + */ + function noop() { + // No operation performed. + } + + /** + * Creates a function that gets the argument at index `n`. If `n` is negative, + * the nth argument from the end is returned. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Util + * @param {number} [n=0] The index of the argument to return. + * @returns {Function} Returns the new pass-thru function. + * @example + * + * var func = _.nthArg(1); + * func('a', 'b', 'c', 'd'); + * // => 'b' + * + * var func = _.nthArg(-2); + * func('a', 'b', 'c', 'd'); + * // => 'c' + */ + function nthArg(n) { + n = toInteger(n); + return baseRest(function (args) { + return baseNth(args, n); + }); + } + + /** + * Creates a function that invokes `iteratees` with the arguments it receives + * and returns their results. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Util + * @param {...(Function|Function[])} [iteratees=[_.identity]] + * The iteratees to invoke. + * @returns {Function} Returns the new function. + * @example + * + * var func = _.over([Math.max, Math.min]); + * + * func(1, 2, 3, 4); + * // => [4, 1] + */ + var over = createOver(arrayMap); + + /** + * Creates a function that checks if **all** of the `predicates` return + * truthy when invoked with the arguments it receives. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Util + * @param {...(Function|Function[])} [predicates=[_.identity]] + * The predicates to check. + * @returns {Function} Returns the new function. + * @example + * + * var func = _.overEvery([Boolean, isFinite]); + * + * func('1'); + * // => true + * + * func(null); + * // => false + * + * func(NaN); + * // => false + */ + var overEvery = createOver(arrayEvery); + + /** + * Creates a function that checks if **any** of the `predicates` return + * truthy when invoked with the arguments it receives. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Util + * @param {...(Function|Function[])} [predicates=[_.identity]] + * The predicates to check. + * @returns {Function} Returns the new function. + * @example + * + * var func = _.overSome([Boolean, isFinite]); + * + * func('1'); + * // => true + * + * func(null); + * // => true + * + * func(NaN); + * // => false + */ + var overSome = createOver(arraySome); + + /** + * Creates a function that returns the value at `path` of a given object. + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Util + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new accessor function. + * @example + * + * var objects = [ + * { 'a': { 'b': 2 } }, + * { 'a': { 'b': 1 } } + * ]; + * + * _.map(objects, _.property('a.b')); + * // => [2, 1] + * + * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b'); + * // => [1, 2] + */ + function property(path) { + return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path); + } + + /** + * The opposite of `_.property`; this method creates a function that returns + * the value at a given path of `object`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Util + * @param {Object} object The object to query. + * @returns {Function} Returns the new accessor function. + * @example + * + * var array = [0, 1, 2], + * object = { 'a': array, 'b': array, 'c': array }; + * + * _.map(['a[2]', 'c[0]'], _.propertyOf(object)); + * // => [2, 0] + * + * _.map([['a', '2'], ['c', '0']], _.propertyOf(object)); + * // => [2, 0] + */ + function propertyOf(object) { + return function (path) { + return object == null ? undefined : baseGet(object, path); + }; + } + + /** + * Creates an array of numbers (positive and/or negative) progressing from + * `start` up to, but not including, `end`. A step of `-1` is used if a negative + * `start` is specified without an `end` or `step`. If `end` is not specified, + * it's set to `start` with `start` then set to `0`. + * + * **Note:** JavaScript follows the IEEE-754 standard for resolving + * floating-point values which can produce unexpected results. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {number} [start=0] The start of the range. + * @param {number} end The end of the range. + * @param {number} [step=1] The value to increment or decrement by. + * @returns {Array} Returns the range of numbers. + * @see _.inRange, _.rangeRight + * @example + * + * _.range(4); + * // => [0, 1, 2, 3] + * + * _.range(-4); + * // => [0, -1, -2, -3] + * + * _.range(1, 5); + * // => [1, 2, 3, 4] + * + * _.range(0, 20, 5); + * // => [0, 5, 10, 15] + * + * _.range(0, -4, -1); + * // => [0, -1, -2, -3] + * + * _.range(1, 4, 0); + * // => [1, 1, 1] + * + * _.range(0); + * // => [] + */ + var range = createRange(); + + /** + * This method is like `_.range` except that it populates values in + * descending order. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Util + * @param {number} [start=0] The start of the range. + * @param {number} end The end of the range. + * @param {number} [step=1] The value to increment or decrement by. + * @returns {Array} Returns the range of numbers. + * @see _.inRange, _.range + * @example + * + * _.rangeRight(4); + * // => [3, 2, 1, 0] + * + * _.rangeRight(-4); + * // => [-3, -2, -1, 0] + * + * _.rangeRight(1, 5); + * // => [4, 3, 2, 1] + * + * _.rangeRight(0, 20, 5); + * // => [15, 10, 5, 0] + * + * _.rangeRight(0, -4, -1); + * // => [-3, -2, -1, 0] + * + * _.rangeRight(1, 4, 0); + * // => [1, 1, 1] + * + * _.rangeRight(0); + * // => [] + */ + var rangeRight = createRange(true); + + /** + * This method returns a new empty array. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {Array} Returns the new empty array. + * @example + * + * var arrays = _.times(2, _.stubArray); + * + * console.log(arrays); + * // => [[], []] + * + * console.log(arrays[0] === arrays[1]); + * // => false + */ + function stubArray() { + return []; + } + + /** + * This method returns `false`. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {boolean} Returns `false`. + * @example + * + * _.times(2, _.stubFalse); + * // => [false, false] + */ + function stubFalse() { + return false; + } + + /** + * This method returns a new empty object. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {Object} Returns the new empty object. + * @example + * + * var objects = _.times(2, _.stubObject); + * + * console.log(objects); + * // => [{}, {}] + * + * console.log(objects[0] === objects[1]); + * // => false + */ + function stubObject() { + return {}; + } + + /** + * This method returns an empty string. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {string} Returns the empty string. + * @example + * + * _.times(2, _.stubString); + * // => ['', ''] + */ + function stubString() { + return ''; + } + + /** + * This method returns `true`. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {boolean} Returns `true`. + * @example + * + * _.times(2, _.stubTrue); + * // => [true, true] + */ + function stubTrue() { + return true; + } + + /** + * Invokes the iteratee `n` times, returning an array of the results of + * each invocation. The iteratee is invoked with one argument; (index). + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {number} n The number of times to invoke `iteratee`. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the array of results. + * @example + * + * _.times(3, String); + * // => ['0', '1', '2'] + * + * _.times(4, _.constant(0)); + * // => [0, 0, 0, 0] + */ + function times(n, iteratee) { + n = toInteger(n); + if (n < 1 || n > MAX_SAFE_INTEGER) { + return []; + } + var index = MAX_ARRAY_LENGTH, + length = nativeMin(n, MAX_ARRAY_LENGTH); + + iteratee = getIteratee(iteratee); + n -= MAX_ARRAY_LENGTH; + + var result = baseTimes(length, iteratee); + while (++index < n) { + iteratee(index); + } + return result; + } + + /** + * Converts `value` to a property path array. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Util + * @param {*} value The value to convert. + * @returns {Array} Returns the new property path array. + * @example + * + * _.toPath('a.b.c'); + * // => ['a', 'b', 'c'] + * + * _.toPath('a[0].b.c'); + * // => ['a', '0', 'b', 'c'] + */ + function toPath(value) { + if (isArray(value)) { + return arrayMap(value, toKey); + } + return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value))); + } + + /** + * Generates a unique ID. If `prefix` is given, the ID is appended to it. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {string} [prefix=''] The value to prefix the ID with. + * @returns {string} Returns the unique ID. + * @example + * + * _.uniqueId('contact_'); + * // => 'contact_104' + * + * _.uniqueId(); + * // => '105' + */ + function uniqueId(prefix) { + var id = ++idCounter; + return toString(prefix) + id; + } + + /*------------------------------------------------------------------------*/ + + /** + * Adds two numbers. + * + * @static + * @memberOf _ + * @since 3.4.0 + * @category Math + * @param {number} augend The first number in an addition. + * @param {number} addend The second number in an addition. + * @returns {number} Returns the total. + * @example + * + * _.add(6, 4); + * // => 10 + */ + var add = createMathOperation(function (augend, addend) { + return augend + addend; + }, 0); + + /** + * Computes `number` rounded up to `precision`. + * + * @static + * @memberOf _ + * @since 3.10.0 + * @category Math + * @param {number} number The number to round up. + * @param {number} [precision=0] The precision to round up to. + * @returns {number} Returns the rounded up number. + * @example + * + * _.ceil(4.006); + * // => 5 + * + * _.ceil(6.004, 2); + * // => 6.01 + * + * _.ceil(6040, -2); + * // => 6100 + */ + var ceil = createRound('ceil'); + + /** + * Divide two numbers. + * + * @static + * @memberOf _ + * @since 4.7.0 + * @category Math + * @param {number} dividend The first number in a division. + * @param {number} divisor The second number in a division. + * @returns {number} Returns the quotient. + * @example + * + * _.divide(6, 4); + * // => 1.5 + */ + var divide = createMathOperation(function (dividend, divisor) { + return dividend / divisor; + }, 1); + + /** + * Computes `number` rounded down to `precision`. + * + * @static + * @memberOf _ + * @since 3.10.0 + * @category Math + * @param {number} number The number to round down. + * @param {number} [precision=0] The precision to round down to. + * @returns {number} Returns the rounded down number. + * @example + * + * _.floor(4.006); + * // => 4 + * + * _.floor(0.046, 2); + * // => 0.04 + * + * _.floor(4060, -2); + * // => 4000 + */ + var floor = createRound('floor'); + + /** + * Computes the maximum value of `array`. If `array` is empty or falsey, + * `undefined` is returned. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Math + * @param {Array} array The array to iterate over. + * @returns {*} Returns the maximum value. + * @example + * + * _.max([4, 2, 8, 6]); + * // => 8 + * + * _.max([]); + * // => undefined + */ + function max(array) { + return array && array.length ? baseExtremum(array, identity, baseGt) : undefined; + } + + /** + * This method is like `_.max` except that it accepts `iteratee` which is + * invoked for each element in `array` to generate the criterion by which + * the value is ranked. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Math + * @param {Array} array The array to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {*} Returns the maximum value. + * @example + * + * var objects = [{ 'n': 1 }, { 'n': 2 }]; + * + * _.maxBy(objects, function(o) { return o.n; }); + * // => { 'n': 2 } + * + * // The `_.property` iteratee shorthand. + * _.maxBy(objects, 'n'); + * // => { 'n': 2 } + */ + function maxBy(array, iteratee) { + return array && array.length + ? baseExtremum(array, getIteratee(iteratee, 2), baseGt) + : undefined; + } + + /** + * Computes the mean of the values in `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Math + * @param {Array} array The array to iterate over. + * @returns {number} Returns the mean. + * @example + * + * _.mean([4, 2, 8, 6]); + * // => 5 + */ + function mean(array) { + return baseMean(array, identity); + } + + /** + * This method is like `_.mean` except that it accepts `iteratee` which is + * invoked for each element in `array` to generate the value to be averaged. + * The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.7.0 + * @category Math + * @param {Array} array The array to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {number} Returns the mean. + * @example + * + * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }]; + * + * _.meanBy(objects, function(o) { return o.n; }); + * // => 5 + * + * // The `_.property` iteratee shorthand. + * _.meanBy(objects, 'n'); + * // => 5 + */ + function meanBy(array, iteratee) { + return baseMean(array, getIteratee(iteratee, 2)); + } + + /** + * Computes the minimum value of `array`. If `array` is empty or falsey, + * `undefined` is returned. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Math + * @param {Array} array The array to iterate over. + * @returns {*} Returns the minimum value. + * @example + * + * _.min([4, 2, 8, 6]); + * // => 2 + * + * _.min([]); + * // => undefined + */ + function min(array) { + return array && array.length ? baseExtremum(array, identity, baseLt) : undefined; + } + + /** + * This method is like `_.min` except that it accepts `iteratee` which is + * invoked for each element in `array` to generate the criterion by which + * the value is ranked. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Math + * @param {Array} array The array to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {*} Returns the minimum value. + * @example + * + * var objects = [{ 'n': 1 }, { 'n': 2 }]; + * + * _.minBy(objects, function(o) { return o.n; }); + * // => { 'n': 1 } + * + * // The `_.property` iteratee shorthand. + * _.minBy(objects, 'n'); + * // => { 'n': 1 } + */ + function minBy(array, iteratee) { + return array && array.length + ? baseExtremum(array, getIteratee(iteratee, 2), baseLt) + : undefined; + } + + /** + * Multiply two numbers. + * + * @static + * @memberOf _ + * @since 4.7.0 + * @category Math + * @param {number} multiplier The first number in a multiplication. + * @param {number} multiplicand The second number in a multiplication. + * @returns {number} Returns the product. + * @example + * + * _.multiply(6, 4); + * // => 24 + */ + var multiply = createMathOperation(function (multiplier, multiplicand) { + return multiplier * multiplicand; + }, 1); + + /** + * Computes `number` rounded to `precision`. + * + * @static + * @memberOf _ + * @since 3.10.0 + * @category Math + * @param {number} number The number to round. + * @param {number} [precision=0] The precision to round to. + * @returns {number} Returns the rounded number. + * @example + * + * _.round(4.006); + * // => 4 + * + * _.round(4.006, 2); + * // => 4.01 + * + * _.round(4060, -2); + * // => 4100 + */ + var round = createRound('round'); + + /** + * Subtract two numbers. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Math + * @param {number} minuend The first number in a subtraction. + * @param {number} subtrahend The second number in a subtraction. + * @returns {number} Returns the difference. + * @example + * + * _.subtract(6, 4); + * // => 2 + */ + var subtract = createMathOperation(function (minuend, subtrahend) { + return minuend - subtrahend; + }, 0); + + /** + * Computes the sum of the values in `array`. + * + * @static + * @memberOf _ + * @since 3.4.0 + * @category Math + * @param {Array} array The array to iterate over. + * @returns {number} Returns the sum. + * @example + * + * _.sum([4, 2, 8, 6]); + * // => 20 + */ + function sum(array) { + return array && array.length ? baseSum(array, identity) : 0; + } + + /** + * This method is like `_.sum` except that it accepts `iteratee` which is + * invoked for each element in `array` to generate the value to be summed. + * The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Math + * @param {Array} array The array to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {number} Returns the sum. + * @example + * + * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }]; + * + * _.sumBy(objects, function(o) { return o.n; }); + * // => 20 + * + * // The `_.property` iteratee shorthand. + * _.sumBy(objects, 'n'); + * // => 20 + */ + function sumBy(array, iteratee) { + return array && array.length ? baseSum(array, getIteratee(iteratee, 2)) : 0; + } + + /*------------------------------------------------------------------------*/ + + // Add methods that return wrapped values in chain sequences. + lodash.after = after; + lodash.ary = ary; + lodash.assign = assign; + lodash.assignIn = assignIn; + lodash.assignInWith = assignInWith; + lodash.assignWith = assignWith; + lodash.at = at; + lodash.before = before; + lodash.bind = bind; + lodash.bindAll = bindAll; + lodash.bindKey = bindKey; + lodash.castArray = castArray; + lodash.chain = chain; + lodash.chunk = chunk; + lodash.compact = compact; + lodash.concat = concat; + lodash.cond = cond; + lodash.conforms = conforms; + lodash.constant = constant; + lodash.countBy = countBy; + lodash.create = create; + lodash.curry = curry; + lodash.curryRight = curryRight; + lodash.debounce = debounce; + lodash.defaults = defaults; + lodash.defaultsDeep = defaultsDeep; + lodash.defer = defer; + lodash.delay = delay; + lodash.difference = difference; + lodash.differenceBy = differenceBy; + lodash.differenceWith = differenceWith; + lodash.drop = drop; + lodash.dropRight = dropRight; + lodash.dropRightWhile = dropRightWhile; + lodash.dropWhile = dropWhile; + lodash.fill = fill; + lodash.filter = filter; + lodash.flatMap = flatMap; + lodash.flatMapDeep = flatMapDeep; + lodash.flatMapDepth = flatMapDepth; + lodash.flatten = flatten; + lodash.flattenDeep = flattenDeep; + lodash.flattenDepth = flattenDepth; + lodash.flip = flip; + lodash.flow = flow; + lodash.flowRight = flowRight; + lodash.fromPairs = fromPairs; + lodash.functions = functions; + lodash.functionsIn = functionsIn; + lodash.groupBy = groupBy; + lodash.initial = initial; + lodash.intersection = intersection; + lodash.intersectionBy = intersectionBy; + lodash.intersectionWith = intersectionWith; + lodash.invert = invert; + lodash.invertBy = invertBy; + lodash.invokeMap = invokeMap; + lodash.iteratee = iteratee; + lodash.keyBy = keyBy; + lodash.keys = keys; + lodash.keysIn = keysIn; + lodash.map = map; + lodash.mapKeys = mapKeys; + lodash.mapValues = mapValues; + lodash.matches = matches; + lodash.matchesProperty = matchesProperty; + lodash.memoize = memoize; + lodash.merge = merge; + lodash.mergeWith = mergeWith; + lodash.method = method; + lodash.methodOf = methodOf; + lodash.mixin = mixin; + lodash.negate = negate; + lodash.nthArg = nthArg; + lodash.omit = omit; + lodash.omitBy = omitBy; + lodash.once = once; + lodash.orderBy = orderBy; + lodash.over = over; + lodash.overArgs = overArgs; + lodash.overEvery = overEvery; + lodash.overSome = overSome; + lodash.partial = partial; + lodash.partialRight = partialRight; + lodash.partition = partition; + lodash.pick = pick; + lodash.pickBy = pickBy; + lodash.property = property; + lodash.propertyOf = propertyOf; + lodash.pull = pull; + lodash.pullAll = pullAll; + lodash.pullAllBy = pullAllBy; + lodash.pullAllWith = pullAllWith; + lodash.pullAt = pullAt; + lodash.range = range; + lodash.rangeRight = rangeRight; + lodash.rearg = rearg; + lodash.reject = reject; + lodash.remove = remove; + lodash.rest = rest; + lodash.reverse = reverse; + lodash.sampleSize = sampleSize; + lodash.set = set; + lodash.setWith = setWith; + lodash.shuffle = shuffle; + lodash.slice = slice; + lodash.sortBy = sortBy; + lodash.sortedUniq = sortedUniq; + lodash.sortedUniqBy = sortedUniqBy; + lodash.split = split; + lodash.spread = spread; + lodash.tail = tail; + lodash.take = take; + lodash.takeRight = takeRight; + lodash.takeRightWhile = takeRightWhile; + lodash.takeWhile = takeWhile; + lodash.tap = tap; + lodash.throttle = throttle; + lodash.thru = thru; + lodash.toArray = toArray; + lodash.toPairs = toPairs; + lodash.toPairsIn = toPairsIn; + lodash.toPath = toPath; + lodash.toPlainObject = toPlainObject; + lodash.transform = transform; + lodash.unary = unary; + lodash.union = union; + lodash.unionBy = unionBy; + lodash.unionWith = unionWith; + lodash.uniq = uniq; + lodash.uniqBy = uniqBy; + lodash.uniqWith = uniqWith; + lodash.unset = unset; + lodash.unzip = unzip; + lodash.unzipWith = unzipWith; + lodash.update = update; + lodash.updateWith = updateWith; + lodash.values = values; + lodash.valuesIn = valuesIn; + lodash.without = without; + lodash.words = words; + lodash.wrap = wrap; + lodash.xor = xor; + lodash.xorBy = xorBy; + lodash.xorWith = xorWith; + lodash.zip = zip; + lodash.zipObject = zipObject; + lodash.zipObjectDeep = zipObjectDeep; + lodash.zipWith = zipWith; + + // Add aliases. + lodash.entries = toPairs; + lodash.entriesIn = toPairsIn; + lodash.extend = assignIn; + lodash.extendWith = assignInWith; + + // Add methods to `lodash.prototype`. + mixin(lodash, lodash); + + /*------------------------------------------------------------------------*/ + + // Add methods that return unwrapped values in chain sequences. + lodash.add = add; + lodash.attempt = attempt; + lodash.camelCase = camelCase; + lodash.capitalize = capitalize; + lodash.ceil = ceil; + lodash.clamp = clamp; + lodash.clone = clone; + lodash.cloneDeep = cloneDeep; + lodash.cloneDeepWith = cloneDeepWith; + lodash.cloneWith = cloneWith; + lodash.conformsTo = conformsTo; + lodash.deburr = deburr; + lodash.defaultTo = defaultTo; + lodash.divide = divide; + lodash.endsWith = endsWith; + lodash.eq = eq; + lodash.escape = escape; + lodash.escapeRegExp = escapeRegExp; + lodash.every = every; + lodash.find = find; + lodash.findIndex = findIndex; + lodash.findKey = findKey; + lodash.findLast = findLast; + lodash.findLastIndex = findLastIndex; + lodash.findLastKey = findLastKey; + lodash.floor = floor; + lodash.forEach = forEach; + lodash.forEachRight = forEachRight; + lodash.forIn = forIn; + lodash.forInRight = forInRight; + lodash.forOwn = forOwn; + lodash.forOwnRight = forOwnRight; + lodash.get = get; + lodash.gt = gt; + lodash.gte = gte; + lodash.has = has; + lodash.hasIn = hasIn; + lodash.head = head; + lodash.identity = identity; + lodash.includes = includes; + lodash.indexOf = indexOf; + lodash.inRange = inRange; + lodash.invoke = invoke; + lodash.isArguments = isArguments; + lodash.isArray = isArray; + lodash.isArrayBuffer = isArrayBuffer; + lodash.isArrayLike = isArrayLike; + lodash.isArrayLikeObject = isArrayLikeObject; + lodash.isBoolean = isBoolean; + lodash.isBuffer = isBuffer; + lodash.isDate = isDate; + lodash.isElement = isElement; + lodash.isEmpty = isEmpty; + lodash.isEqual = isEqual; + lodash.isEqualWith = isEqualWith; + lodash.isError = isError; + lodash.isFinite = isFinite; + lodash.isFunction = isFunction; + lodash.isInteger = isInteger; + lodash.isLength = isLength; + lodash.isMap = isMap; + lodash.isMatch = isMatch; + lodash.isMatchWith = isMatchWith; + lodash.isNaN = isNaN; + lodash.isNative = isNative; + lodash.isNil = isNil; + lodash.isNull = isNull; + lodash.isNumber = isNumber; + lodash.isObject = isObject; + lodash.isObjectLike = isObjectLike; + lodash.isPlainObject = isPlainObject; + lodash.isRegExp = isRegExp; + lodash.isSafeInteger = isSafeInteger; + lodash.isSet = isSet; + lodash.isString = isString; + lodash.isSymbol = isSymbol; + lodash.isTypedArray = isTypedArray; + lodash.isUndefined = isUndefined; + lodash.isWeakMap = isWeakMap; + lodash.isWeakSet = isWeakSet; + lodash.join = join; + lodash.kebabCase = kebabCase; + lodash.last = last; + lodash.lastIndexOf = lastIndexOf; + lodash.lowerCase = lowerCase; + lodash.lowerFirst = lowerFirst; + lodash.lt = lt; + lodash.lte = lte; + lodash.max = max; + lodash.maxBy = maxBy; + lodash.mean = mean; + lodash.meanBy = meanBy; + lodash.min = min; + lodash.minBy = minBy; + lodash.stubArray = stubArray; + lodash.stubFalse = stubFalse; + lodash.stubObject = stubObject; + lodash.stubString = stubString; + lodash.stubTrue = stubTrue; + lodash.multiply = multiply; + lodash.nth = nth; + lodash.noConflict = noConflict; + lodash.noop = noop; + lodash.now = now; + lodash.pad = pad; + lodash.padEnd = padEnd; + lodash.padStart = padStart; + lodash.parseInt = parseInt; + lodash.random = random; + lodash.reduce = reduce; + lodash.reduceRight = reduceRight; + lodash.repeat = repeat; + lodash.replace = replace; + lodash.result = result; + lodash.round = round; + lodash.runInContext = runInContext; + lodash.sample = sample; + lodash.size = size; + lodash.snakeCase = snakeCase; + lodash.some = some; + lodash.sortedIndex = sortedIndex; + lodash.sortedIndexBy = sortedIndexBy; + lodash.sortedIndexOf = sortedIndexOf; + lodash.sortedLastIndex = sortedLastIndex; + lodash.sortedLastIndexBy = sortedLastIndexBy; + lodash.sortedLastIndexOf = sortedLastIndexOf; + lodash.startCase = startCase; + lodash.startsWith = startsWith; + lodash.subtract = subtract; + lodash.sum = sum; + lodash.sumBy = sumBy; + lodash.template = template; + lodash.times = times; + lodash.toFinite = toFinite; + lodash.toInteger = toInteger; + lodash.toLength = toLength; + lodash.toLower = toLower; + lodash.toNumber = toNumber; + lodash.toSafeInteger = toSafeInteger; + lodash.toString = toString; + lodash.toUpper = toUpper; + lodash.trim = trim; + lodash.trimEnd = trimEnd; + lodash.trimStart = trimStart; + lodash.truncate = truncate; + lodash.unescape = unescape; + lodash.uniqueId = uniqueId; + lodash.upperCase = upperCase; + lodash.upperFirst = upperFirst; + + // Add aliases. + lodash.each = forEach; + lodash.eachRight = forEachRight; + lodash.first = head; + + mixin( + lodash, + (function () { + var source = {}; + baseForOwn(lodash, function (func, methodName) { + if (!hasOwnProperty.call(lodash.prototype, methodName)) { + source[methodName] = func; + } + }); + return source; + })(), + { chain: false }, + ); + + /*------------------------------------------------------------------------*/ + + /** + * The semantic version number. + * + * @static + * @memberOf _ + * @type {string} + */ + lodash.VERSION = VERSION; + + // Assign default placeholders. + arrayEach( + ['bind', 'bindKey', 'curry', 'curryRight', 'partial', 'partialRight'], + function (methodName) { + lodash[methodName].placeholder = lodash; + }, + ); + + // Add `LazyWrapper` methods for `_.drop` and `_.take` variants. + arrayEach(['drop', 'take'], function (methodName, index) { + LazyWrapper.prototype[methodName] = function (n) { + n = n === undefined ? 1 : nativeMax(toInteger(n), 0); + + var result = this.__filtered__ && !index ? new LazyWrapper(this) : this.clone(); + + if (result.__filtered__) { + result.__takeCount__ = nativeMin(n, result.__takeCount__); + } else { + result.__views__.push({ + size: nativeMin(n, MAX_ARRAY_LENGTH), + type: methodName + (result.__dir__ < 0 ? 'Right' : ''), + }); + } + return result; + }; + + LazyWrapper.prototype[methodName + 'Right'] = function (n) { + return this.reverse()[methodName](n).reverse(); + }; + }); + + // Add `LazyWrapper` methods that accept an `iteratee` value. + arrayEach(['filter', 'map', 'takeWhile'], function (methodName, index) { + var type = index + 1, + isFilter = type == LAZY_FILTER_FLAG || type == LAZY_WHILE_FLAG; + + LazyWrapper.prototype[methodName] = function (iteratee) { + var result = this.clone(); + result.__iteratees__.push({ + iteratee: getIteratee(iteratee, 3), + type: type, + }); + result.__filtered__ = result.__filtered__ || isFilter; + return result; + }; + }); + + // Add `LazyWrapper` methods for `_.head` and `_.last`. + arrayEach(['head', 'last'], function (methodName, index) { + var takeName = 'take' + (index ? 'Right' : ''); + + LazyWrapper.prototype[methodName] = function () { + return this[takeName](1).value()[0]; + }; + }); + + // Add `LazyWrapper` methods for `_.initial` and `_.tail`. + arrayEach(['initial', 'tail'], function (methodName, index) { + var dropName = 'drop' + (index ? '' : 'Right'); + + LazyWrapper.prototype[methodName] = function () { + return this.__filtered__ ? new LazyWrapper(this) : this[dropName](1); + }; + }); + + LazyWrapper.prototype.compact = function () { + return this.filter(identity); + }; + + LazyWrapper.prototype.find = function (predicate) { + return this.filter(predicate).head(); + }; + + LazyWrapper.prototype.findLast = function (predicate) { + return this.reverse().find(predicate); + }; + + LazyWrapper.prototype.invokeMap = baseRest(function (path, args) { + if (typeof path == 'function') { + return new LazyWrapper(this); + } + return this.map(function (value) { + return baseInvoke(value, path, args); + }); + }); + + LazyWrapper.prototype.reject = function (predicate) { + return this.filter(negate(getIteratee(predicate))); + }; + + LazyWrapper.prototype.slice = function (start, end) { + start = toInteger(start); + + var result = this; + if (result.__filtered__ && (start > 0 || end < 0)) { + return new LazyWrapper(result); + } + if (start < 0) { + result = result.takeRight(-start); + } else if (start) { + result = result.drop(start); + } + if (end !== undefined) { + end = toInteger(end); + result = end < 0 ? result.dropRight(-end) : result.take(end - start); + } + return result; + }; + + LazyWrapper.prototype.takeRightWhile = function (predicate) { + return this.reverse().takeWhile(predicate).reverse(); + }; + + LazyWrapper.prototype.toArray = function () { + return this.take(MAX_ARRAY_LENGTH); + }; + + // Add `LazyWrapper` methods to `lodash.prototype`. + baseForOwn(LazyWrapper.prototype, function (func, methodName) { + var checkIteratee = /^(?:filter|find|map|reject)|While$/.test(methodName), + isTaker = /^(?:head|last)$/.test(methodName), + lodashFunc = lodash[isTaker ? 'take' + (methodName == 'last' ? 'Right' : '') : methodName], + retUnwrapped = isTaker || /^find/.test(methodName); + + if (!lodashFunc) { + return; + } + lodash.prototype[methodName] = function () { + var value = this.__wrapped__, + args = isTaker ? [1] : arguments, + isLazy = value instanceof LazyWrapper, + iteratee = args[0], + useLazy = isLazy || isArray(value); + + var interceptor = function (value) { + var result = lodashFunc.apply(lodash, arrayPush([value], args)); + return isTaker && chainAll ? result[0] : result; + }; + + if (useLazy && checkIteratee && typeof iteratee == 'function' && iteratee.length != 1) { + // Avoid lazy use if the iteratee has a "length" value other than `1`. + isLazy = useLazy = false; + } + var chainAll = this.__chain__, + isHybrid = !!this.__actions__.length, + isUnwrapped = retUnwrapped && !chainAll, + onlyLazy = isLazy && !isHybrid; + + if (!retUnwrapped && useLazy) { + value = onlyLazy ? value : new LazyWrapper(this); + var result = func.apply(value, args); + result.__actions__.push({ func: thru, args: [interceptor], thisArg: undefined }); + return new LodashWrapper(result, chainAll); + } + if (isUnwrapped && onlyLazy) { + return func.apply(this, args); + } + result = this.thru(interceptor); + return isUnwrapped ? (isTaker ? result.value()[0] : result.value()) : result; + }; + }); + + // Add `Array` methods to `lodash.prototype`. + arrayEach(['pop', 'push', 'shift', 'sort', 'splice', 'unshift'], function (methodName) { + var func = arrayProto[methodName], + chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru', + retUnwrapped = /^(?:pop|shift)$/.test(methodName); + + lodash.prototype[methodName] = function () { + var args = arguments; + if (retUnwrapped && !this.__chain__) { + var value = this.value(); + return func.apply(isArray(value) ? value : [], args); + } + return this[chainName](function (value) { + return func.apply(isArray(value) ? value : [], args); + }); + }; + }); + + // Map minified method names to their real names. + baseForOwn(LazyWrapper.prototype, function (func, methodName) { + var lodashFunc = lodash[methodName]; + if (lodashFunc) { + var key = lodashFunc.name + '', + names = realNames[key] || (realNames[key] = []); + + names.push({ name: methodName, func: lodashFunc }); + } + }); + + realNames[createHybrid(undefined, WRAP_BIND_KEY_FLAG).name] = [ + { + name: 'wrapper', + func: undefined, + }, + ]; + + // Add methods to `LazyWrapper`. + LazyWrapper.prototype.clone = lazyClone; + LazyWrapper.prototype.reverse = lazyReverse; + LazyWrapper.prototype.value = lazyValue; + + // Add chain sequence methods to the `lodash` wrapper. + lodash.prototype.at = wrapperAt; + lodash.prototype.chain = wrapperChain; + lodash.prototype.commit = wrapperCommit; + lodash.prototype.next = wrapperNext; + lodash.prototype.plant = wrapperPlant; + lodash.prototype.reverse = wrapperReverse; + lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue; + + // Add lazy aliases. + lodash.prototype.first = lodash.prototype.head; + + if (symIterator) { + lodash.prototype[symIterator] = wrapperToIterator; + } + return lodash; + }; + + /*--------------------------------------------------------------------------*/ + + // Export lodash. + var _ = runInContext(); + + // Some AMD build optimizers, like r.js, check for condition patterns like: + if (true) { + // Expose Lodash on the global object to prevent errors when Lodash is + // loaded by a script tag in the presence of an AMD loader. + // See http://requirejs.org/docs/errors.html#mismatch for more details. + // Use `_.noConflict` to remove Lodash from the global object. + root._ = _; + + // Define as an anonymous module so, through path mapping, it can be + // referenced as the "underscore" module. + !((__WEBPACK_AMD_DEFINE_RESULT__ = function () { + return _; + }.call(exports, __webpack_require__, exports, module)), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } + // Check for `exports` after `define` in case a build optimizer adds it. + else if (freeModule) { + // Export for Node.js. + (freeModule.exports = _)._ = _; + // Export for CommonJS support. + freeExports._ = _; + } else { + // Export to the global object. + root._ = _; + } + }).call(this); + + /* WEBPACK VAR INJECTION */ + }).call(exports, __webpack_require__(22), __webpack_require__(365)(module)); + + /***/ + }, + /* 115 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + var _prodInvariant = __webpack_require__(5); + + var invariant = __webpack_require__(2); + + /** + * Injectable ordering of event plugins. + */ + var eventPluginOrder = null; + + /** + * Injectable mapping from names to event plugin modules. + */ + var namesToPlugins = {}; + + /** + * Recomputes the plugin list using the injected plugins and plugin ordering. + * + * @private + */ + function recomputePluginOrdering() { + if (!eventPluginOrder) { + // Wait until an `eventPluginOrder` is injected. + return; + } + for (var pluginName in namesToPlugins) { + var pluginModule = namesToPlugins[pluginName]; + var pluginIndex = eventPluginOrder.indexOf(pluginName); + !(pluginIndex > -1) + ? true + ? invariant( + false, + 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', + pluginName, + ) + : _prodInvariant('96', pluginName) + : void 0; + if (EventPluginRegistry.plugins[pluginIndex]) { + continue; + } + !pluginModule.extractEvents + ? true + ? invariant( + false, + 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', + pluginName, + ) + : _prodInvariant('97', pluginName) + : void 0; + EventPluginRegistry.plugins[pluginIndex] = pluginModule; + var publishedEvents = pluginModule.eventTypes; + for (var eventName in publishedEvents) { + !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) + ? true + ? invariant( + false, + 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', + eventName, + pluginName, + ) + : _prodInvariant('98', eventName, pluginName) + : void 0; + } + } + } + + /** + * Publishes an event so that it can be dispatched by the supplied plugin. + * + * @param {object} dispatchConfig Dispatch configuration for the event. + * @param {object} PluginModule Plugin publishing the event. + * @return {boolean} True if the event was successfully published. + * @private + */ + function publishEventForPlugin(dispatchConfig, pluginModule, eventName) { + !!EventPluginRegistry.eventNameDispatchConfigs.hasOwnProperty(eventName) + ? true + ? invariant( + false, + 'EventPluginHub: More than one plugin attempted to publish the same event name, `%s`.', + eventName, + ) + : _prodInvariant('99', eventName) + : void 0; + EventPluginRegistry.eventNameDispatchConfigs[eventName] = dispatchConfig; + + var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames; + if (phasedRegistrationNames) { + for (var phaseName in phasedRegistrationNames) { + if (phasedRegistrationNames.hasOwnProperty(phaseName)) { + var phasedRegistrationName = phasedRegistrationNames[phaseName]; + publishRegistrationName(phasedRegistrationName, pluginModule, eventName); + } + } + return true; + } else if (dispatchConfig.registrationName) { + publishRegistrationName(dispatchConfig.registrationName, pluginModule, eventName); + return true; + } + return false; + } + + /** + * Publishes a registration name that is used to identify dispatched events and + * can be used with `EventPluginHub.putListener` to register listeners. + * + * @param {string} registrationName Registration name to add. + * @param {object} PluginModule Plugin publishing the event. + * @private + */ + function publishRegistrationName(registrationName, pluginModule, eventName) { + !!EventPluginRegistry.registrationNameModules[registrationName] + ? true + ? invariant( + false, + 'EventPluginHub: More than one plugin attempted to publish the same registration name, `%s`.', + registrationName, + ) + : _prodInvariant('100', registrationName) + : void 0; + EventPluginRegistry.registrationNameModules[registrationName] = pluginModule; + EventPluginRegistry.registrationNameDependencies[registrationName] = + pluginModule.eventTypes[eventName].dependencies; + + if (true) { + var lowerCasedName = registrationName.toLowerCase(); + EventPluginRegistry.possibleRegistrationNames[lowerCasedName] = registrationName; + + if (registrationName === 'onDoubleClick') { + EventPluginRegistry.possibleRegistrationNames.ondblclick = registrationName; + } + } + } + + /** + * Registers plugins so that they can extract and dispatch events. + * + * @see {EventPluginHub} + */ + var EventPluginRegistry = { + /** + * Ordered list of injected plugins. + */ + plugins: [], + + /** + * Mapping from event name to dispatch config + */ + eventNameDispatchConfigs: {}, + + /** + * Mapping from registration name to plugin module + */ + registrationNameModules: {}, + + /** + * Mapping from registration name to event name + */ + registrationNameDependencies: {}, + + /** + * Mapping from lowercase registration names to the properly cased version, + * used to warn in the case of missing event handlers. Available + * only in __DEV__. + * @type {Object} + */ + possibleRegistrationNames: true ? {} : null, + // Trust the developer to only use possibleRegistrationNames in __DEV__ + + /** + * Injects an ordering of plugins (by plugin name). This allows the ordering + * to be decoupled from injection of the actual plugins so that ordering is + * always deterministic regardless of packaging, on-the-fly injection, etc. + * + * @param {array} InjectedEventPluginOrder + * @internal + * @see {EventPluginHub.injection.injectEventPluginOrder} + */ + injectEventPluginOrder: function (injectedEventPluginOrder) { + !!eventPluginOrder + ? true + ? invariant( + false, + 'EventPluginRegistry: Cannot inject event plugin ordering more than once. You are likely trying to load more than one copy of React.', + ) + : _prodInvariant('101') + : void 0; + // Clone the ordering so it cannot be dynamically mutated. + eventPluginOrder = Array.prototype.slice.call(injectedEventPluginOrder); + recomputePluginOrdering(); + }, + + /** + * Injects plugins to be used by `EventPluginHub`. The plugin names must be + * in the ordering injected by `injectEventPluginOrder`. + * + * Plugins can be injected as part of page initialization or on-the-fly. + * + * @param {object} injectedNamesToPlugins Map from names to plugin modules. + * @internal + * @see {EventPluginHub.injection.injectEventPluginsByName} + */ + injectEventPluginsByName: function (injectedNamesToPlugins) { + var isOrderingDirty = false; + for (var pluginName in injectedNamesToPlugins) { + if (!injectedNamesToPlugins.hasOwnProperty(pluginName)) { + continue; + } + var pluginModule = injectedNamesToPlugins[pluginName]; + if (!namesToPlugins.hasOwnProperty(pluginName) || namesToPlugins[pluginName] !== pluginModule) { + !!namesToPlugins[pluginName] + ? true + ? invariant( + false, + 'EventPluginRegistry: Cannot inject two different event plugins using the same name, `%s`.', + pluginName, + ) + : _prodInvariant('102', pluginName) + : void 0; + namesToPlugins[pluginName] = pluginModule; + isOrderingDirty = true; + } + } + if (isOrderingDirty) { + recomputePluginOrdering(); + } + }, + + /** + * Looks up the plugin for the supplied event. + * + * @param {object} event A synthetic event. + * @return {?object} The plugin that created the supplied event. + * @internal + */ + getPluginModuleForEvent: function (event) { + var dispatchConfig = event.dispatchConfig; + if (dispatchConfig.registrationName) { + return EventPluginRegistry.registrationNameModules[dispatchConfig.registrationName] || null; + } + if (dispatchConfig.phasedRegistrationNames !== undefined) { + // pulling phasedRegistrationNames out of dispatchConfig helps Flow see + // that it is not undefined. + var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames; + + for (var phase in phasedRegistrationNames) { + if (!phasedRegistrationNames.hasOwnProperty(phase)) { + continue; + } + var pluginModule = EventPluginRegistry.registrationNameModules[phasedRegistrationNames[phase]]; + if (pluginModule) { + return pluginModule; + } + } + } + return null; + }, + + /** + * Exposed for unit testing. + * @private + */ + _resetEventPlugins: function () { + eventPluginOrder = null; + for (var pluginName in namesToPlugins) { + if (namesToPlugins.hasOwnProperty(pluginName)) { + delete namesToPlugins[pluginName]; + } + } + EventPluginRegistry.plugins.length = 0; + + var eventNameDispatchConfigs = EventPluginRegistry.eventNameDispatchConfigs; + for (var eventName in eventNameDispatchConfigs) { + if (eventNameDispatchConfigs.hasOwnProperty(eventName)) { + delete eventNameDispatchConfigs[eventName]; + } + } + + var registrationNameModules = EventPluginRegistry.registrationNameModules; + for (var registrationName in registrationNameModules) { + if (registrationNameModules.hasOwnProperty(registrationName)) { + delete registrationNameModules[registrationName]; + } + } + + if (true) { + var possibleRegistrationNames = EventPluginRegistry.possibleRegistrationNames; + for (var lowerCasedName in possibleRegistrationNames) { + if (possibleRegistrationNames.hasOwnProperty(lowerCasedName)) { + delete possibleRegistrationNames[lowerCasedName]; + } + } + } + }, + }; + + module.exports = EventPluginRegistry; + + /***/ + }, + /* 116 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var _assign = __webpack_require__(8); + + var EventPluginRegistry = __webpack_require__(115); + var ReactEventEmitterMixin = __webpack_require__(747); + var ViewportMetrics = __webpack_require__(326); + + var getVendorPrefixedEventName = __webpack_require__(333); + var isEventSupported = __webpack_require__(210); + + /** + * Summary of `ReactBrowserEventEmitter` event handling: + * + * - Top-level delegation is used to trap most native browser events. This + * may only occur in the main thread and is the responsibility of + * ReactEventListener, which is injected and can therefore support pluggable + * event sources. This is the only work that occurs in the main thread. + * + * - We normalize and de-duplicate events to account for browser quirks. This + * may be done in the worker thread. + * + * - Forward these native events (with the associated top-level type used to + * trap it) to `EventPluginHub`, which in turn will ask plugins if they want + * to extract any synthetic events. + * + * - The `EventPluginHub` will then process each event by annotating them with + * "dispatches", a sequence of listeners and IDs that care about that event. + * + * - The `EventPluginHub` then dispatches the events. + * + * Overview of React and the event system: + * + * +------------+ . + * | DOM | . + * +------------+ . + * | . + * v . + * +------------+ . + * | ReactEvent | . + * | Listener | . + * +------------+ . +-----------+ + * | . +--------+|SimpleEvent| + * | . | |Plugin | + * +-----|------+ . v +-----------+ + * | | | . +--------------+ +------------+ + * | +-----------.--->|EventPluginHub| | Event | + * | | . | | +-----------+ | Propagators| + * | ReactEvent | . | | |TapEvent | |------------| + * | Emitter | . | |<---+|Plugin | |other plugin| + * | | . | | +-----------+ | utilities | + * | +-----------.--->| | +------------+ + * | | | . +--------------+ + * +-----|------+ . ^ +-----------+ + * | . | |Enter/Leave| + * + . +-------+|Plugin | + * +-------------+ . +-----------+ + * | application | . + * |-------------| . + * | | . + * | | . + * +-------------+ . + * . + * React Core . General Purpose Event Plugin System + */ + + var hasEventPageXY; + var alreadyListeningTo = {}; + var isMonitoringScrollValue = false; + var reactTopListenersCounter = 0; + + // For events like 'submit' which don't consistently bubble (which we trap at a + // lower node than `document`), binding at `document` would cause duplicate + // events so we don't include them here + var topEventMapping = { + topAbort: 'abort', + topAnimationEnd: getVendorPrefixedEventName('animationend') || 'animationend', + topAnimationIteration: getVendorPrefixedEventName('animationiteration') || 'animationiteration', + topAnimationStart: getVendorPrefixedEventName('animationstart') || 'animationstart', + topBlur: 'blur', + topCanPlay: 'canplay', + topCanPlayThrough: 'canplaythrough', + topChange: 'change', + topClick: 'click', + topCompositionEnd: 'compositionend', + topCompositionStart: 'compositionstart', + topCompositionUpdate: 'compositionupdate', + topContextMenu: 'contextmenu', + topCopy: 'copy', + topCut: 'cut', + topDoubleClick: 'dblclick', + topDrag: 'drag', + topDragEnd: 'dragend', + topDragEnter: 'dragenter', + topDragExit: 'dragexit', + topDragLeave: 'dragleave', + topDragOver: 'dragover', + topDragStart: 'dragstart', + topDrop: 'drop', + topDurationChange: 'durationchange', + topEmptied: 'emptied', + topEncrypted: 'encrypted', + topEnded: 'ended', + topError: 'error', + topFocus: 'focus', + topInput: 'input', + topKeyDown: 'keydown', + topKeyPress: 'keypress', + topKeyUp: 'keyup', + topLoadedData: 'loadeddata', + topLoadedMetadata: 'loadedmetadata', + topLoadStart: 'loadstart', + topMouseDown: 'mousedown', + topMouseMove: 'mousemove', + topMouseOut: 'mouseout', + topMouseOver: 'mouseover', + topMouseUp: 'mouseup', + topPaste: 'paste', + topPause: 'pause', + topPlay: 'play', + topPlaying: 'playing', + topProgress: 'progress', + topRateChange: 'ratechange', + topScroll: 'scroll', + topSeeked: 'seeked', + topSeeking: 'seeking', + topSelectionChange: 'selectionchange', + topStalled: 'stalled', + topSuspend: 'suspend', + topTextInput: 'textInput', + topTimeUpdate: 'timeupdate', + topTouchCancel: 'touchcancel', + topTouchEnd: 'touchend', + topTouchMove: 'touchmove', + topTouchStart: 'touchstart', + topTransitionEnd: getVendorPrefixedEventName('transitionend') || 'transitionend', + topVolumeChange: 'volumechange', + topWaiting: 'waiting', + topWheel: 'wheel', + }; + + /** + * To ensure no conflicts with other potential React instances on the page + */ + var topListenersIDKey = '_reactListenersID' + String(Math.random()).slice(2); + + function getListeningForDocument(mountAt) { + // In IE8, `mountAt` is a host object and doesn't have `hasOwnProperty` + // directly. + if (!Object.prototype.hasOwnProperty.call(mountAt, topListenersIDKey)) { + mountAt[topListenersIDKey] = reactTopListenersCounter++; + alreadyListeningTo[mountAt[topListenersIDKey]] = {}; + } + return alreadyListeningTo[mountAt[topListenersIDKey]]; + } + + /** + * `ReactBrowserEventEmitter` is used to attach top-level event listeners. For + * example: + * + * EventPluginHub.putListener('myID', 'onClick', myFunction); + * + * This would allocate a "registration" of `('onClick', myFunction)` on 'myID'. + * + * @internal + */ + var ReactBrowserEventEmitter = _assign({}, ReactEventEmitterMixin, { + /** + * Injectable event backend + */ + ReactEventListener: null, + + injection: { + /** + * @param {object} ReactEventListener + */ + injectReactEventListener: function (ReactEventListener) { + ReactEventListener.setHandleTopLevel(ReactBrowserEventEmitter.handleTopLevel); + ReactBrowserEventEmitter.ReactEventListener = ReactEventListener; + }, + }, + + /** + * Sets whether or not any created callbacks should be enabled. + * + * @param {boolean} enabled True if callbacks should be enabled. + */ + setEnabled: function (enabled) { + if (ReactBrowserEventEmitter.ReactEventListener) { + ReactBrowserEventEmitter.ReactEventListener.setEnabled(enabled); + } + }, + + /** + * @return {boolean} True if callbacks are enabled. + */ + isEnabled: function () { + return !!( + ReactBrowserEventEmitter.ReactEventListener && + ReactBrowserEventEmitter.ReactEventListener.isEnabled() + ); + }, + + /** + * We listen for bubbled touch events on the document object. + * + * Firefox v8.01 (and possibly others) exhibited strange behavior when + * mounting `onmousemove` events at some node that was not the document + * element. The symptoms were that if your mouse is not moving over something + * contained within that mount point (for example on the background) the + * top-level listeners for `onmousemove` won't be called. However, if you + * register the `mousemove` on the document object, then it will of course + * catch all `mousemove`s. This along with iOS quirks, justifies restricting + * top-level listeners to the document object only, at least for these + * movement types of events and possibly all events. + * + * @see http://www.quirksmode.org/blog/archives/2010/09/click_event_del.html + * + * Also, `keyup`/`keypress`/`keydown` do not bubble to the window on IE, but + * they bubble to document. + * + * @param {string} registrationName Name of listener (e.g. `onClick`). + * @param {object} contentDocumentHandle Document which owns the container + */ + listenTo: function (registrationName, contentDocumentHandle) { + var mountAt = contentDocumentHandle; + var isListening = getListeningForDocument(mountAt); + var dependencies = EventPluginRegistry.registrationNameDependencies[registrationName]; + + for (var i = 0; i < dependencies.length; i++) { + var dependency = dependencies[i]; + if (!(isListening.hasOwnProperty(dependency) && isListening[dependency])) { + if (dependency === 'topWheel') { + if (isEventSupported('wheel')) { + ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topWheel', 'wheel', mountAt); + } else if (isEventSupported('mousewheel')) { + ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent( + 'topWheel', + 'mousewheel', + mountAt, + ); + } else { + // Firefox needs to capture a different mouse scroll event. + // @see http://www.quirksmode.org/dom/events/tests/scroll.html + ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent( + 'topWheel', + 'DOMMouseScroll', + mountAt, + ); + } + } else if (dependency === 'topScroll') { + if (isEventSupported('scroll', true)) { + ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent( + 'topScroll', + 'scroll', + mountAt, + ); + } else { + ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent( + 'topScroll', + 'scroll', + ReactBrowserEventEmitter.ReactEventListener.WINDOW_HANDLE, + ); + } + } else if (dependency === 'topFocus' || dependency === 'topBlur') { + if (isEventSupported('focus', true)) { + ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent('topFocus', 'focus', mountAt); + ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent('topBlur', 'blur', mountAt); + } else if (isEventSupported('focusin')) { + // IE has `focusin` and `focusout` events which bubble. + // @see http://www.quirksmode.org/blog/archives/2008/04/delegating_the.html + ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent( + 'topFocus', + 'focusin', + mountAt, + ); + ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent( + 'topBlur', + 'focusout', + mountAt, + ); + } + + // to make sure blur and focus event listeners are only attached once + isListening.topBlur = true; + isListening.topFocus = true; + } else if (topEventMapping.hasOwnProperty(dependency)) { + ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent( + dependency, + topEventMapping[dependency], + mountAt, + ); + } + + isListening[dependency] = true; + } + } + }, + + trapBubbledEvent: function (topLevelType, handlerBaseName, handle) { + return ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent( + topLevelType, + handlerBaseName, + handle, + ); + }, + + trapCapturedEvent: function (topLevelType, handlerBaseName, handle) { + return ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent( + topLevelType, + handlerBaseName, + handle, + ); + }, + + /** + * Protect against document.createEvent() returning null + * Some popup blocker extensions appear to do this: + * https://github.com/facebook/react/issues/6887 + */ + supportsEventPageXY: function () { + if (!document.createEvent) { + return false; + } + var ev = document.createEvent('MouseEvent'); + return ev != null && 'pageX' in ev; + }, + + /** + * Listens to window scroll and resize events. We cache scroll values so that + * application code can access them without triggering reflows. + * + * ViewportMetrics is only used by SyntheticMouse/TouchEvent and only when + * pageX/pageY isn't supported (legacy browsers). + * + * NOTE: Scroll events do not bubble. + * + * @see http://www.quirksmode.org/dom/events/scroll.html + */ + ensureScrollValueMonitoring: function () { + if (hasEventPageXY === undefined) { + hasEventPageXY = ReactBrowserEventEmitter.supportsEventPageXY(); + } + if (!hasEventPageXY && !isMonitoringScrollValue) { + var refresh = ViewportMetrics.refreshScrollValues; + ReactBrowserEventEmitter.ReactEventListener.monitorScrollValue(refresh); + isMonitoringScrollValue = true; + } + }, + }); + + module.exports = ReactBrowserEventEmitter; + + /***/ + }, + /* 117 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var SyntheticEvent = __webpack_require__(53); + + var getEventTarget = __webpack_require__(208); + + /** + * @interface UIEvent + * @see http://www.w3.org/TR/DOM-Level-3-Events/ + */ + var UIEventInterface = { + view: function (event) { + if (event.view) { + return event.view; + } + + var target = getEventTarget(event); + if (target.window === target) { + // target is a window object + return target; + } + + var doc = target.ownerDocument; + // TODO: Figure out why `ownerDocument` is sometimes undefined in IE8. + if (doc) { + return doc.defaultView || doc.parentWindow; + } else { + return window; + } + }, + detail: function (event) { + return event.detail || 0; + }, + }; + + /** + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @extends {SyntheticEvent} + */ + function SyntheticUIEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); + } + + SyntheticEvent.augmentClass(SyntheticUIEvent, UIEventInterface); + + module.exports = SyntheticUIEvent; + + /***/ + }, + /* 118 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + /* harmony export (immutable) */ __webpack_exports__['c'] = falsy; + /* unused harmony export history */ + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'a', function () { + return component; + }); + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'b', function () { + return components; + }); + /* unused harmony export route */ + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'd', function () { + return routes; + }); + + var func = __WEBPACK_IMPORTED_MODULE_0_react__['PropTypes'].func, + object = __WEBPACK_IMPORTED_MODULE_0_react__['PropTypes'].object, + arrayOf = __WEBPACK_IMPORTED_MODULE_0_react__['PropTypes'].arrayOf, + oneOfType = __WEBPACK_IMPORTED_MODULE_0_react__['PropTypes'].oneOfType, + element = __WEBPACK_IMPORTED_MODULE_0_react__['PropTypes'].element, + shape = __WEBPACK_IMPORTED_MODULE_0_react__['PropTypes'].shape, + string = __WEBPACK_IMPORTED_MODULE_0_react__['PropTypes'].string; + + function falsy(props, propName, componentName) { + if (props[propName]) + return new Error('<' + componentName + '> should not have a "' + propName + '" prop'); + } + + var history = shape({ + listen: func.isRequired, + push: func.isRequired, + replace: func.isRequired, + go: func.isRequired, + goBack: func.isRequired, + goForward: func.isRequired, + }); + + var component = oneOfType([func, string]); + var components = oneOfType([component, object]); + var route = oneOfType([object, element]); + var routes = oneOfType([route, arrayOf(route)]); + + /***/ + }, + /* 119 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + Object.defineProperty(__webpack_exports__, '__esModule', { value: true }); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createStore__ = __webpack_require__(363); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__combineReducers__ = __webpack_require__(834); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__bindActionCreators__ = __webpack_require__(833); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__applyMiddleware__ = __webpack_require__(832); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__compose__ = __webpack_require__(362); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__utils_warning__ = __webpack_require__(364); + /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, 'createStore', function () { + return __WEBPACK_IMPORTED_MODULE_0__createStore__['a']; + }); + /* harmony reexport (binding) */ __webpack_require__.d( + __webpack_exports__, + 'combineReducers', + function () { + return __WEBPACK_IMPORTED_MODULE_1__combineReducers__['a']; + }, + ); + /* harmony reexport (binding) */ __webpack_require__.d( + __webpack_exports__, + 'bindActionCreators', + function () { + return __WEBPACK_IMPORTED_MODULE_2__bindActionCreators__['a']; + }, + ); + /* harmony reexport (binding) */ __webpack_require__.d( + __webpack_exports__, + 'applyMiddleware', + function () { + return __WEBPACK_IMPORTED_MODULE_3__applyMiddleware__['a']; + }, + ); + /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, 'compose', function () { + return __WEBPACK_IMPORTED_MODULE_4__compose__['a']; + }); + + /* + * This is a dummy function to check if the function name has been altered by minification. + * If the function has been minified and NODE_ENV !== 'production', warn the user. + */ + function isCrushed() {} + + if ( + 'development' !== 'production' && + typeof isCrushed.name === 'string' && + isCrushed.name !== 'isCrushed' + ) { + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__utils_warning__['a' /* default */])( + "You are currently using minified code outside of NODE_ENV === 'production'. " + + 'This means that you are running a slower development build of Redux. ' + + 'You can use loose-envify (https://github.com/zertosh/loose-envify) for browserify ' + + 'or DefinePlugin for webpack (http://stackoverflow.com/questions/30030031) ' + + 'to ensure you have the correct code for your production build.', + ); + } + + /***/ + }, + /* 120 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = { default: __webpack_require__(414), __esModule: true }; + + /***/ + }, + /* 121 */ + /***/ function (module, exports) { + // 7.2.1 RequireObjectCoercible(argument) + module.exports = function (it) { + if (it == undefined) throw TypeError("Can't call method on " + it); + return it; + }; + + /***/ + }, + /* 122 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) + var anObject = __webpack_require__(69), + dPs = __webpack_require__(441), + enumBugKeys = __webpack_require__(150), + IE_PROTO = __webpack_require__(157)('IE_PROTO'), + Empty = function () { + /* empty */ + }, + PROTOTYPE = 'prototype'; + + // Create object with fake `null` prototype: use iframe Object with cleared prototype + var createDict = function () { + // Thrash, waste and sodomy: IE GC bug + var iframe = __webpack_require__(246)('iframe'), + i = enumBugKeys.length, + lt = '<', + gt = '>', + iframeDocument; + iframe.style.display = 'none'; + __webpack_require__(436).appendChild(iframe); + iframe.src = 'javascript:'; // eslint-disable-line no-script-url + // createDict = iframe.contentWindow.Object; + // html.removeChild(iframe); + iframeDocument = iframe.contentWindow.document; + iframeDocument.open(); + iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); + iframeDocument.close(); + createDict = iframeDocument.F; + while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]]; + return createDict(); + }; + + module.exports = + Object.create || + function create(O, Properties) { + var result; + if (O !== null) { + Empty[PROTOTYPE] = anObject(O); + result = new Empty(); + Empty[PROTOTYPE] = null; + // add "__proto__" for Object.getPrototypeOf polyfill + result[IE_PROTO] = O; + } else result = createDict(); + return Properties === undefined ? result : dPs(result, Properties); + }; + + /***/ + }, + /* 123 */ + /***/ function (module, exports, __webpack_require__) { + var def = __webpack_require__(49).f, + has = __webpack_require__(71), + TAG = __webpack_require__(37)('toStringTag'); + + module.exports = function (it, tag, stat) { + if (it && !has((it = stat ? it : it.prototype), TAG)) + def(it, TAG, { configurable: true, value: tag }); + }; + + /***/ + }, + /* 124 */ + /***/ function (module, exports, __webpack_require__) { + // 7.1.15 ToLength + var toInteger = __webpack_require__(159), + min = Math.min; + module.exports = function (it) { + return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 + }; + + /***/ + }, + /* 125 */ + /***/ function (module, exports) { + var id = 0, + px = Math.random(); + module.exports = function (key) { + return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); + }; + + /***/ + }, + /* 126 */ + /***/ function (module, exports, __webpack_require__) { + // false -> Array#indexOf + // true -> Array#includes + var toIObject = __webpack_require__(32), + toLength = __webpack_require__(15), + toIndex = __webpack_require__(81); + module.exports = function (IS_INCLUDES) { + return function ($this, el, fromIndex) { + var O = toIObject($this), + length = toLength(O.length), + index = toIndex(fromIndex, length), + value; + // Array#includes uses SameValueZero equality algorithm + if (IS_INCLUDES && el != el) + while (length > index) { + value = O[index++]; + if (value != value) return true; + // Array#toIndex ignores holes, Array#includes - not + } + else + for (; length > index; index++) + if (IS_INCLUDES || index in O) { + if (O[index] === el) return IS_INCLUDES || index || 0; + } + return !IS_INCLUDES && -1; + }; + }; + + /***/ + }, + /* 127 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var global = __webpack_require__(6), + $export = __webpack_require__(0), + redefine = __webpack_require__(30), + redefineAll = __webpack_require__(79), + meta = __webpack_require__(62), + forOf = __webpack_require__(91), + anInstance = __webpack_require__(74), + isObject = __webpack_require__(9), + fails = __webpack_require__(7), + $iterDetect = __webpack_require__(132), + setToStringTag = __webpack_require__(93), + inheritIfRequired = __webpack_require__(170); + + module.exports = function (NAME, wrapper, methods, common, IS_MAP, IS_WEAK) { + var Base = global[NAME], + C = Base, + ADDER = IS_MAP ? 'set' : 'add', + proto = C && C.prototype, + O = {}; + var fixMethod = function (KEY) { + var fn = proto[KEY]; + redefine( + proto, + KEY, + KEY == 'delete' + ? function (a) { + return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a); + } + : KEY == 'has' + ? function has(a) { + return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a); + } + : KEY == 'get' + ? function get(a) { + return IS_WEAK && !isObject(a) ? undefined : fn.call(this, a === 0 ? 0 : a); + } + : KEY == 'add' + ? function add(a) { + fn.call(this, a === 0 ? 0 : a); + return this; + } + : function set(a, b) { + fn.call(this, a === 0 ? 0 : a, b); + return this; + }, + ); + }; + if ( + typeof C != 'function' || + !( + IS_WEAK || + (proto.forEach && + !fails(function () { + new C().entries().next(); + })) + ) + ) { + // create collection constructor + C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER); + redefineAll(C.prototype, methods); + meta.NEED = true; + } else { + var instance = new C(), + // early implementations not supports chaining + HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance, + // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false + THROWS_ON_PRIMITIVES = fails(function () { + instance.has(1); + }), + // most early implementations doesn't supports iterables, most modern - not close it correctly + ACCEPT_ITERABLES = $iterDetect(function (iter) { + new C(iter); + }), // eslint-disable-line no-new + // for early implementations -0 and +0 not the same + BUGGY_ZERO = + !IS_WEAK && + fails(function () { + // V8 ~ Chromium 42- fails only with 5+ elements + var $instance = new C(), + index = 5; + while (index--) $instance[ADDER](index, index); + return !$instance.has(-0); + }); + if (!ACCEPT_ITERABLES) { + C = wrapper(function (target, iterable) { + anInstance(target, C, NAME); + var that = inheritIfRequired(new Base(), target, C); + if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that); + return that; + }); + C.prototype = proto; + proto.constructor = C; + } + if (THROWS_ON_PRIMITIVES || BUGGY_ZERO) { + fixMethod('delete'); + fixMethod('has'); + IS_MAP && fixMethod('get'); + } + if (BUGGY_ZERO || HASNT_CHAINING) fixMethod(ADDER); + // weak collections should not contains .clear method + if (IS_WEAK && proto.clear) delete proto.clear; + } + + setToStringTag(C, NAME); + + O[NAME] = C; + $export($export.G + $export.W + $export.F * (C != Base), O); + + if (!IS_WEAK) common.setStrong(C, NAME, IS_MAP); + + return C; + }; + + /***/ + }, + /* 128 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var hide = __webpack_require__(29), + redefine = __webpack_require__(30), + fails = __webpack_require__(7), + defined = __webpack_require__(44), + wks = __webpack_require__(10); + + module.exports = function (KEY, length, exec) { + var SYMBOL = wks(KEY), + fns = exec(defined, SYMBOL, ''[KEY]), + strfn = fns[0], + rxfn = fns[1]; + if ( + fails(function () { + var O = {}; + O[SYMBOL] = function () { + return 7; + }; + return ''[KEY](O) != 7; + }) + ) { + redefine(String.prototype, KEY, strfn); + hide( + RegExp.prototype, + SYMBOL, + length == 2 + ? // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue) + // 21.2.5.11 RegExp.prototype[@@split](string, limit) + function (string, arg) { + return rxfn.call(string, this, arg); + } + : // 21.2.5.6 RegExp.prototype[@@match](string) + // 21.2.5.9 RegExp.prototype[@@search](string) + function (string) { + return rxfn.call(string, this); + }, + ); + } + }; + + /***/ + }, + /* 129 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // 21.2.5.3 get RegExp.prototype.flags + var anObject = __webpack_require__(4); + module.exports = function () { + var that = anObject(this), + result = ''; + if (that.global) result += 'g'; + if (that.ignoreCase) result += 'i'; + if (that.multiline) result += 'm'; + if (that.unicode) result += 'u'; + if (that.sticky) result += 'y'; + return result; + }; + + /***/ + }, + /* 130 */ + /***/ function (module, exports) { + // fast apply, http://jsperf.lnkit.com/fast-apply/5 + module.exports = function (fn, args, that) { + var un = that === undefined; + switch (args.length) { + case 0: + return un ? fn() : fn.call(that); + case 1: + return un ? fn(args[0]) : fn.call(that, args[0]); + case 2: + return un ? fn(args[0], args[1]) : fn.call(that, args[0], args[1]); + case 3: + return un ? fn(args[0], args[1], args[2]) : fn.call(that, args[0], args[1], args[2]); + case 4: + return un + ? fn(args[0], args[1], args[2], args[3]) + : fn.call(that, args[0], args[1], args[2], args[3]); + } + return fn.apply(that, args); + }; + + /***/ + }, + /* 131 */ + /***/ function (module, exports, __webpack_require__) { + // 7.2.8 IsRegExp(argument) + var isObject = __webpack_require__(9), + cof = __webpack_require__(43), + MATCH = __webpack_require__(10)('match'); + module.exports = function (it) { + var isRegExp; + return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp'); + }; + + /***/ + }, + /* 132 */ + /***/ function (module, exports, __webpack_require__) { + var ITERATOR = __webpack_require__(10)('iterator'), + SAFE_CLOSING = false; + + try { + var riter = [7][ITERATOR](); + riter['return'] = function () { + SAFE_CLOSING = true; + }; + Array.from(riter, function () { + throw 2; + }); + } catch (e) { + /* empty */ + } + + module.exports = function (exec, skipClosing) { + if (!skipClosing && !SAFE_CLOSING) return false; + var safe = false; + try { + var arr = [7], + iter = arr[ITERATOR](); + iter.next = function () { + return { done: (safe = true) }; + }; + arr[ITERATOR] = function () { + return iter; + }; + exec(arr); + } catch (e) { + /* empty */ + } + return safe; + }; + + /***/ + }, + /* 133 */ + /***/ function (module, exports, __webpack_require__) { + // Forced replacement prototype accessors methods + module.exports = + __webpack_require__(75) || + !__webpack_require__(7)(function () { + var K = Math.random(); + // In FF throws only define methods + __defineSetter__.call(null, K, function () { + /* empty */ + }); + delete __webpack_require__(6)[K]; + }); + + /***/ + }, + /* 134 */ + /***/ function (module, exports) { + exports.f = Object.getOwnPropertySymbols; + + /***/ + }, + /* 135 */ + /***/ function (module, exports, __webpack_require__) { + var global = __webpack_require__(6), + SHARED = '__core-js_shared__', + store = global[SHARED] || (global[SHARED] = {}); + module.exports = function (key) { + return store[key] || (store[key] = {}); + }; + + /***/ + }, + /* 136 */ + /***/ function (module, exports, __webpack_require__) { + var global = __webpack_require__(6), + hide = __webpack_require__(29), + uid = __webpack_require__(82), + TYPED = uid('typed_array'), + VIEW = uid('view'), + ABV = !!(global.ArrayBuffer && global.DataView), + CONSTR = ABV, + i = 0, + l = 9, + Typed; + + var TypedArrayConstructors = + 'Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array'.split( + ',', + ); + + while (i < l) { + if ((Typed = global[TypedArrayConstructors[i++]])) { + hide(Typed.prototype, TYPED, true); + hide(Typed.prototype, VIEW, true); + } else CONSTR = false; + } + + module.exports = { + ABV: ABV, + CONSTR: CONSTR, + TYPED: TYPED, + VIEW: VIEW, + }; + + /***/ + }, + /* 137 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + /** + * Indicates that navigation was caused by a call to history.push. + */ + var PUSH = (exports.PUSH = 'PUSH'); + + /** + * Indicates that navigation was caused by a call to history.replace. + */ + var REPLACE = (exports.REPLACE = 'REPLACE'); + + /** + * Indicates that navigation was caused by some other action such + * as using a browser's back/forward buttons and/or manually manipulating + * the URL in a browser's location bar. This is the default. + * + * See https://developer.mozilla.org/en-US/docs/Web/API/WindowEventHandlers/onpopstate + * for more information. + */ + var POP = (exports.POP = 'POP'); + + /***/ + }, + /* 138 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + var addEventListener = (exports.addEventListener = function addEventListener(node, event, listener) { + return node.addEventListener + ? node.addEventListener(event, listener, false) + : node.attachEvent('on' + event, listener); + }); + + var removeEventListener = (exports.removeEventListener = function removeEventListener( + node, + event, + listener, + ) { + return node.removeEventListener + ? node.removeEventListener(event, listener, false) + : node.detachEvent('on' + event, listener); + }); + + /** + * Returns true if the HTML5 history API is supported. Taken from Modernizr. + * + * https://github.com/Modernizr/Modernizr/blob/master/LICENSE + * https://github.com/Modernizr/Modernizr/blob/master/feature-detects/history.js + * changed to avoid false negatives for Windows Phones: https://github.com/reactjs/react-router/issues/586 + */ + var supportsHistory = (exports.supportsHistory = function supportsHistory() { + var ua = window.navigator.userAgent; + + if ( + (ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && + ua.indexOf('Mobile Safari') !== -1 && + ua.indexOf('Chrome') === -1 && + ua.indexOf('Windows Phone') === -1 + ) + return false; + + return window.history && 'pushState' in window.history; + }); + + /** + * Returns false if using go(n) with hash history causes a full page reload. + */ + var supportsGoWithoutReloadUsingHash = (exports.supportsGoWithoutReloadUsingHash = + function supportsGoWithoutReloadUsingHash() { + return window.navigator.userAgent.indexOf('Firefox') === -1; + }); + + /** + * Returns true if browser fires popstate on hash change. + * IE10 and IE11 do not. + */ + var supportsPopstateOnHashchange = (exports.supportsPopstateOnHashchange = + function supportsPopstateOnHashchange() { + return window.navigator.userAgent.indexOf('Trident') === -1; + }); + + /** + * Returns true if a given popstate event is an extraneous WebKit event. + * Accounts for the fact that Chrome on iOS fires real popstate events + * containing undefined state when pressing the back button. + */ + var isExtraneousPopstateEvent = (exports.isExtraneousPopstateEvent = function isExtraneousPopstateEvent( + event, + ) { + return event.state === undefined && navigator.userAgent.indexOf('CriOS') === -1; + }); + + /***/ + }, + /* 139 */ + /***/ function (module, exports, __webpack_require__) { + /** + * Copyright (c) 2014-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + + (function (global, factory) { + true + ? (module.exports = factory()) + : typeof define === 'function' && define.amd + ? define(factory) + : (global.Immutable = factory()); + })(this, function () { + 'use strict'; + var SLICE$0 = Array.prototype.slice; + + function createClass(ctor, superClass) { + if (superClass) { + ctor.prototype = Object.create(superClass.prototype); + } + ctor.prototype.constructor = ctor; + } + + function Iterable(value) { + return isIterable(value) ? value : Seq(value); + } + + createClass(KeyedIterable, Iterable); + function KeyedIterable(value) { + return isKeyed(value) ? value : KeyedSeq(value); + } + + createClass(IndexedIterable, Iterable); + function IndexedIterable(value) { + return isIndexed(value) ? value : IndexedSeq(value); + } + + createClass(SetIterable, Iterable); + function SetIterable(value) { + return isIterable(value) && !isAssociative(value) ? value : SetSeq(value); + } + + function isIterable(maybeIterable) { + return !!(maybeIterable && maybeIterable[IS_ITERABLE_SENTINEL]); + } + + function isKeyed(maybeKeyed) { + return !!(maybeKeyed && maybeKeyed[IS_KEYED_SENTINEL]); + } + + function isIndexed(maybeIndexed) { + return !!(maybeIndexed && maybeIndexed[IS_INDEXED_SENTINEL]); + } + + function isAssociative(maybeAssociative) { + return isKeyed(maybeAssociative) || isIndexed(maybeAssociative); + } + + function isOrdered(maybeOrdered) { + return !!(maybeOrdered && maybeOrdered[IS_ORDERED_SENTINEL]); + } + + Iterable.isIterable = isIterable; + Iterable.isKeyed = isKeyed; + Iterable.isIndexed = isIndexed; + Iterable.isAssociative = isAssociative; + Iterable.isOrdered = isOrdered; + + Iterable.Keyed = KeyedIterable; + Iterable.Indexed = IndexedIterable; + Iterable.Set = SetIterable; + + var IS_ITERABLE_SENTINEL = '@@__IMMUTABLE_ITERABLE__@@'; + var IS_KEYED_SENTINEL = '@@__IMMUTABLE_KEYED__@@'; + var IS_INDEXED_SENTINEL = '@@__IMMUTABLE_INDEXED__@@'; + var IS_ORDERED_SENTINEL = '@@__IMMUTABLE_ORDERED__@@'; + + // Used for setting prototype methods that IE8 chokes on. + var DELETE = 'delete'; + + // Constants describing the size of trie nodes. + var SHIFT = 5; // Resulted in best performance after ______? + var SIZE = 1 << SHIFT; + var MASK = SIZE - 1; + + // A consistent shared value representing "not set" which equals nothing other + // than itself, and nothing that could be provided externally. + var NOT_SET = {}; + + // Boolean references, Rough equivalent of `bool &`. + var CHANGE_LENGTH = { value: false }; + var DID_ALTER = { value: false }; + + function MakeRef(ref) { + ref.value = false; + return ref; + } + + function SetRef(ref) { + ref && (ref.value = true); + } + + // A function which returns a value representing an "owner" for transient writes + // to tries. The return value will only ever equal itself, and will not equal + // the return of any subsequent call of this function. + function OwnerID() {} + + // http://jsperf.com/copy-array-inline + function arrCopy(arr, offset) { + offset = offset || 0; + var len = Math.max(0, arr.length - offset); + var newArr = new Array(len); + for (var ii = 0; ii < len; ii++) { + newArr[ii] = arr[ii + offset]; + } + return newArr; + } + + function ensureSize(iter) { + if (iter.size === undefined) { + iter.size = iter.__iterate(returnTrue); + } + return iter.size; + } + + function wrapIndex(iter, index) { + // This implements "is array index" which the ECMAString spec defines as: + // + // A String property name P is an array index if and only if + // ToString(ToUint32(P)) is equal to P and ToUint32(P) is not equal + // to 2^32−1. + // + // http://www.ecma-international.org/ecma-262/6.0/#sec-array-exotic-objects + if (typeof index !== 'number') { + var uint32Index = index >>> 0; // N >>> 0 is shorthand for ToUint32 + if ('' + uint32Index !== index || uint32Index === 4294967295) { + return NaN; + } + index = uint32Index; + } + return index < 0 ? ensureSize(iter) + index : index; + } + + function returnTrue() { + return true; + } + + function wholeSlice(begin, end, size) { + return ( + (begin === 0 || (size !== undefined && begin <= -size)) && + (end === undefined || (size !== undefined && end >= size)) + ); + } + + function resolveBegin(begin, size) { + return resolveIndex(begin, size, 0); + } + + function resolveEnd(end, size) { + return resolveIndex(end, size, size); + } + + function resolveIndex(index, size, defaultIndex) { + return index === undefined + ? defaultIndex + : index < 0 + ? Math.max(0, size + index) + : size === undefined + ? index + : Math.min(size, index); + } + + /* global Symbol */ + + var ITERATE_KEYS = 0; + var ITERATE_VALUES = 1; + var ITERATE_ENTRIES = 2; + + var REAL_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; + var FAUX_ITERATOR_SYMBOL = '@@iterator'; + + var ITERATOR_SYMBOL = REAL_ITERATOR_SYMBOL || FAUX_ITERATOR_SYMBOL; + + function Iterator(next) { + this.next = next; + } + + Iterator.prototype.toString = function () { + return '[Iterator]'; + }; + + Iterator.KEYS = ITERATE_KEYS; + Iterator.VALUES = ITERATE_VALUES; + Iterator.ENTRIES = ITERATE_ENTRIES; + + Iterator.prototype.inspect = Iterator.prototype.toSource = function () { + return this.toString(); + }; + Iterator.prototype[ITERATOR_SYMBOL] = function () { + return this; + }; + + function iteratorValue(type, k, v, iteratorResult) { + var value = type === 0 ? k : type === 1 ? v : [k, v]; + iteratorResult + ? (iteratorResult.value = value) + : (iteratorResult = { + value: value, + done: false, + }); + return iteratorResult; + } + + function iteratorDone() { + return { value: undefined, done: true }; + } + + function hasIterator(maybeIterable) { + return !!getIteratorFn(maybeIterable); + } + + function isIterator(maybeIterator) { + return maybeIterator && typeof maybeIterator.next === 'function'; + } + + function getIterator(iterable) { + var iteratorFn = getIteratorFn(iterable); + return iteratorFn && iteratorFn.call(iterable); + } + + function getIteratorFn(iterable) { + var iteratorFn = + iterable && + ((REAL_ITERATOR_SYMBOL && iterable[REAL_ITERATOR_SYMBOL]) || iterable[FAUX_ITERATOR_SYMBOL]); + if (typeof iteratorFn === 'function') { + return iteratorFn; + } + } + + function isArrayLike(value) { + return value && typeof value.length === 'number'; + } + + createClass(Seq, Iterable); + function Seq(value) { + return value === null || value === undefined + ? emptySequence() + : isIterable(value) + ? value.toSeq() + : seqFromValue(value); + } + + Seq.of = function (/*...values*/) { + return Seq(arguments); + }; + + Seq.prototype.toSeq = function () { + return this; + }; + + Seq.prototype.toString = function () { + return this.__toString('Seq {', '}'); + }; + + Seq.prototype.cacheResult = function () { + if (!this._cache && this.__iterateUncached) { + this._cache = this.entrySeq().toArray(); + this.size = this._cache.length; + } + return this; + }; + + // abstract __iterateUncached(fn, reverse) + + Seq.prototype.__iterate = function (fn, reverse) { + return seqIterate(this, fn, reverse, true); + }; + + // abstract __iteratorUncached(type, reverse) + + Seq.prototype.__iterator = function (type, reverse) { + return seqIterator(this, type, reverse, true); + }; + + createClass(KeyedSeq, Seq); + function KeyedSeq(value) { + return value === null || value === undefined + ? emptySequence().toKeyedSeq() + : isIterable(value) + ? isKeyed(value) + ? value.toSeq() + : value.fromEntrySeq() + : keyedSeqFromValue(value); + } + + KeyedSeq.prototype.toKeyedSeq = function () { + return this; + }; + + createClass(IndexedSeq, Seq); + function IndexedSeq(value) { + return value === null || value === undefined + ? emptySequence() + : !isIterable(value) + ? indexedSeqFromValue(value) + : isKeyed(value) + ? value.entrySeq() + : value.toIndexedSeq(); + } + + IndexedSeq.of = function (/*...values*/) { + return IndexedSeq(arguments); + }; + + IndexedSeq.prototype.toIndexedSeq = function () { + return this; + }; + + IndexedSeq.prototype.toString = function () { + return this.__toString('Seq [', ']'); + }; + + IndexedSeq.prototype.__iterate = function (fn, reverse) { + return seqIterate(this, fn, reverse, false); + }; + + IndexedSeq.prototype.__iterator = function (type, reverse) { + return seqIterator(this, type, reverse, false); + }; + + createClass(SetSeq, Seq); + function SetSeq(value) { + return ( + value === null || value === undefined + ? emptySequence() + : !isIterable(value) + ? indexedSeqFromValue(value) + : isKeyed(value) + ? value.entrySeq() + : value + ).toSetSeq(); + } + + SetSeq.of = function (/*...values*/) { + return SetSeq(arguments); + }; + + SetSeq.prototype.toSetSeq = function () { + return this; + }; + + Seq.isSeq = isSeq; + Seq.Keyed = KeyedSeq; + Seq.Set = SetSeq; + Seq.Indexed = IndexedSeq; + + var IS_SEQ_SENTINEL = '@@__IMMUTABLE_SEQ__@@'; + + Seq.prototype[IS_SEQ_SENTINEL] = true; + + createClass(ArraySeq, IndexedSeq); + function ArraySeq(array) { + this._array = array; + this.size = array.length; + } + + ArraySeq.prototype.get = function (index, notSetValue) { + return this.has(index) ? this._array[wrapIndex(this, index)] : notSetValue; + }; + + ArraySeq.prototype.__iterate = function (fn, reverse) { + var array = this._array; + var maxIndex = array.length - 1; + for (var ii = 0; ii <= maxIndex; ii++) { + if (fn(array[reverse ? maxIndex - ii : ii], ii, this) === false) { + return ii + 1; + } + } + return ii; + }; + + ArraySeq.prototype.__iterator = function (type, reverse) { + var array = this._array; + var maxIndex = array.length - 1; + var ii = 0; + return new Iterator(function () { + return ii > maxIndex + ? iteratorDone() + : iteratorValue(type, ii, array[reverse ? maxIndex - ii++ : ii++]); + }); + }; + + createClass(ObjectSeq, KeyedSeq); + function ObjectSeq(object) { + var keys = Object.keys(object); + this._object = object; + this._keys = keys; + this.size = keys.length; + } + + ObjectSeq.prototype.get = function (key, notSetValue) { + if (notSetValue !== undefined && !this.has(key)) { + return notSetValue; + } + return this._object[key]; + }; + + ObjectSeq.prototype.has = function (key) { + return this._object.hasOwnProperty(key); + }; + + ObjectSeq.prototype.__iterate = function (fn, reverse) { + var object = this._object; + var keys = this._keys; + var maxIndex = keys.length - 1; + for (var ii = 0; ii <= maxIndex; ii++) { + var key = keys[reverse ? maxIndex - ii : ii]; + if (fn(object[key], key, this) === false) { + return ii + 1; + } + } + return ii; + }; + + ObjectSeq.prototype.__iterator = function (type, reverse) { + var object = this._object; + var keys = this._keys; + var maxIndex = keys.length - 1; + var ii = 0; + return new Iterator(function () { + var key = keys[reverse ? maxIndex - ii : ii]; + return ii++ > maxIndex ? iteratorDone() : iteratorValue(type, key, object[key]); + }); + }; + + ObjectSeq.prototype[IS_ORDERED_SENTINEL] = true; + + createClass(IterableSeq, IndexedSeq); + function IterableSeq(iterable) { + this._iterable = iterable; + this.size = iterable.length || iterable.size; + } + + IterableSeq.prototype.__iterateUncached = function (fn, reverse) { + if (reverse) { + return this.cacheResult().__iterate(fn, reverse); + } + var iterable = this._iterable; + var iterator = getIterator(iterable); + var iterations = 0; + if (isIterator(iterator)) { + var step; + while (!(step = iterator.next()).done) { + if (fn(step.value, iterations++, this) === false) { + break; + } + } + } + return iterations; + }; + + IterableSeq.prototype.__iteratorUncached = function (type, reverse) { + if (reverse) { + return this.cacheResult().__iterator(type, reverse); + } + var iterable = this._iterable; + var iterator = getIterator(iterable); + if (!isIterator(iterator)) { + return new Iterator(iteratorDone); + } + var iterations = 0; + return new Iterator(function () { + var step = iterator.next(); + return step.done ? step : iteratorValue(type, iterations++, step.value); + }); + }; + + createClass(IteratorSeq, IndexedSeq); + function IteratorSeq(iterator) { + this._iterator = iterator; + this._iteratorCache = []; + } + + IteratorSeq.prototype.__iterateUncached = function (fn, reverse) { + if (reverse) { + return this.cacheResult().__iterate(fn, reverse); + } + var iterator = this._iterator; + var cache = this._iteratorCache; + var iterations = 0; + while (iterations < cache.length) { + if (fn(cache[iterations], iterations++, this) === false) { + return iterations; + } + } + var step; + while (!(step = iterator.next()).done) { + var val = step.value; + cache[iterations] = val; + if (fn(val, iterations++, this) === false) { + break; + } + } + return iterations; + }; + + IteratorSeq.prototype.__iteratorUncached = function (type, reverse) { + if (reverse) { + return this.cacheResult().__iterator(type, reverse); + } + var iterator = this._iterator; + var cache = this._iteratorCache; + var iterations = 0; + return new Iterator(function () { + if (iterations >= cache.length) { + var step = iterator.next(); + if (step.done) { + return step; + } + cache[iterations] = step.value; + } + return iteratorValue(type, iterations, cache[iterations++]); + }); + }; + + // # pragma Helper functions + + function isSeq(maybeSeq) { + return !!(maybeSeq && maybeSeq[IS_SEQ_SENTINEL]); + } + + var EMPTY_SEQ; + + function emptySequence() { + return EMPTY_SEQ || (EMPTY_SEQ = new ArraySeq([])); + } + + function keyedSeqFromValue(value) { + var seq = Array.isArray(value) + ? new ArraySeq(value).fromEntrySeq() + : isIterator(value) + ? new IteratorSeq(value).fromEntrySeq() + : hasIterator(value) + ? new IterableSeq(value).fromEntrySeq() + : typeof value === 'object' + ? new ObjectSeq(value) + : undefined; + if (!seq) { + throw new TypeError( + 'Expected Array or iterable object of [k, v] entries, ' + 'or keyed object: ' + value, + ); + } + return seq; + } + + function indexedSeqFromValue(value) { + var seq = maybeIndexedSeqFromValue(value); + if (!seq) { + throw new TypeError('Expected Array or iterable object of values: ' + value); + } + return seq; + } + + function seqFromValue(value) { + var seq = maybeIndexedSeqFromValue(value) || (typeof value === 'object' && new ObjectSeq(value)); + if (!seq) { + throw new TypeError('Expected Array or iterable object of values, or keyed object: ' + value); + } + return seq; + } + + function maybeIndexedSeqFromValue(value) { + return isArrayLike(value) + ? new ArraySeq(value) + : isIterator(value) + ? new IteratorSeq(value) + : hasIterator(value) + ? new IterableSeq(value) + : undefined; + } + + function seqIterate(seq, fn, reverse, useKeys) { + var cache = seq._cache; + if (cache) { + var maxIndex = cache.length - 1; + for (var ii = 0; ii <= maxIndex; ii++) { + var entry = cache[reverse ? maxIndex - ii : ii]; + if (fn(entry[1], useKeys ? entry[0] : ii, seq) === false) { + return ii + 1; + } + } + return ii; + } + return seq.__iterateUncached(fn, reverse); + } + + function seqIterator(seq, type, reverse, useKeys) { + var cache = seq._cache; + if (cache) { + var maxIndex = cache.length - 1; + var ii = 0; + return new Iterator(function () { + var entry = cache[reverse ? maxIndex - ii : ii]; + return ii++ > maxIndex + ? iteratorDone() + : iteratorValue(type, useKeys ? entry[0] : ii - 1, entry[1]); + }); + } + return seq.__iteratorUncached(type, reverse); + } + + function fromJS(json, converter) { + return converter ? fromJSWith(converter, json, '', { '': json }) : fromJSDefault(json); + } + + function fromJSWith(converter, json, key, parentJSON) { + if (Array.isArray(json)) { + return converter.call( + parentJSON, + key, + IndexedSeq(json).map(function (v, k) { + return fromJSWith(converter, v, k, json); + }), + ); + } + if (isPlainObj(json)) { + return converter.call( + parentJSON, + key, + KeyedSeq(json).map(function (v, k) { + return fromJSWith(converter, v, k, json); + }), + ); + } + return json; + } + + function fromJSDefault(json) { + if (Array.isArray(json)) { + return IndexedSeq(json).map(fromJSDefault).toList(); + } + if (isPlainObj(json)) { + return KeyedSeq(json).map(fromJSDefault).toMap(); + } + return json; + } + + function isPlainObj(value) { + return value && (value.constructor === Object || value.constructor === undefined); + } + + /** + * An extension of the "same-value" algorithm as [described for use by ES6 Map + * and Set](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map#Key_equality) + * + * NaN is considered the same as NaN, however -0 and 0 are considered the same + * value, which is different from the algorithm described by + * [`Object.is`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is). + * + * This is extended further to allow Objects to describe the values they + * represent, by way of `valueOf` or `equals` (and `hashCode`). + * + * Note: because of this extension, the key equality of Immutable.Map and the + * value equality of Immutable.Set will differ from ES6 Map and Set. + * + * ### Defining custom values + * + * The easiest way to describe the value an object represents is by implementing + * `valueOf`. For example, `Date` represents a value by returning a unix + * timestamp for `valueOf`: + * + * var date1 = new Date(1234567890000); // Fri Feb 13 2009 ... + * var date2 = new Date(1234567890000); + * date1.valueOf(); // 1234567890000 + * assert( date1 !== date2 ); + * assert( Immutable.is( date1, date2 ) ); + * + * Note: overriding `valueOf` may have other implications if you use this object + * where JavaScript expects a primitive, such as implicit string coercion. + * + * For more complex types, especially collections, implementing `valueOf` may + * not be performant. An alternative is to implement `equals` and `hashCode`. + * + * `equals` takes another object, presumably of similar type, and returns true + * if the it is equal. Equality is symmetrical, so the same result should be + * returned if this and the argument are flipped. + * + * assert( a.equals(b) === b.equals(a) ); + * + * `hashCode` returns a 32bit integer number representing the object which will + * be used to determine how to store the value object in a Map or Set. You must + * provide both or neither methods, one must not exist without the other. + * + * Also, an important relationship between these methods must be upheld: if two + * values are equal, they *must* return the same hashCode. If the values are not + * equal, they might have the same hashCode; this is called a hash collision, + * and while undesirable for performance reasons, it is acceptable. + * + * if (a.equals(b)) { + * assert( a.hashCode() === b.hashCode() ); + * } + * + * All Immutable collections implement `equals` and `hashCode`. + * + */ + function is(valueA, valueB) { + if (valueA === valueB || (valueA !== valueA && valueB !== valueB)) { + return true; + } + if (!valueA || !valueB) { + return false; + } + if (typeof valueA.valueOf === 'function' && typeof valueB.valueOf === 'function') { + valueA = valueA.valueOf(); + valueB = valueB.valueOf(); + if (valueA === valueB || (valueA !== valueA && valueB !== valueB)) { + return true; + } + if (!valueA || !valueB) { + return false; + } + } + if ( + typeof valueA.equals === 'function' && + typeof valueB.equals === 'function' && + valueA.equals(valueB) + ) { + return true; + } + return false; + } + + function deepEqual(a, b) { + if (a === b) { + return true; + } + + if ( + !isIterable(b) || + (a.size !== undefined && b.size !== undefined && a.size !== b.size) || + (a.__hash !== undefined && b.__hash !== undefined && a.__hash !== b.__hash) || + isKeyed(a) !== isKeyed(b) || + isIndexed(a) !== isIndexed(b) || + isOrdered(a) !== isOrdered(b) + ) { + return false; + } + + if (a.size === 0 && b.size === 0) { + return true; + } + + var notAssociative = !isAssociative(a); + + if (isOrdered(a)) { + var entries = a.entries(); + return ( + b.every(function (v, k) { + var entry = entries.next().value; + return entry && is(entry[1], v) && (notAssociative || is(entry[0], k)); + }) && entries.next().done + ); + } + + var flipped = false; + + if (a.size === undefined) { + if (b.size === undefined) { + if (typeof a.cacheResult === 'function') { + a.cacheResult(); + } + } else { + flipped = true; + var _ = a; + a = b; + b = _; + } + } + + var allEqual = true; + var bSize = b.__iterate(function (v, k) { + if ( + notAssociative ? !a.has(v) : flipped ? !is(v, a.get(k, NOT_SET)) : !is(a.get(k, NOT_SET), v) + ) { + allEqual = false; + return false; + } + }); + + return allEqual && a.size === bSize; + } + + createClass(Repeat, IndexedSeq); + + function Repeat(value, times) { + if (!(this instanceof Repeat)) { + return new Repeat(value, times); + } + this._value = value; + this.size = times === undefined ? Infinity : Math.max(0, times); + if (this.size === 0) { + if (EMPTY_REPEAT) { + return EMPTY_REPEAT; + } + EMPTY_REPEAT = this; + } + } + + Repeat.prototype.toString = function () { + if (this.size === 0) { + return 'Repeat []'; + } + return 'Repeat [ ' + this._value + ' ' + this.size + ' times ]'; + }; + + Repeat.prototype.get = function (index, notSetValue) { + return this.has(index) ? this._value : notSetValue; + }; + + Repeat.prototype.includes = function (searchValue) { + return is(this._value, searchValue); + }; + + Repeat.prototype.slice = function (begin, end) { + var size = this.size; + return wholeSlice(begin, end, size) + ? this + : new Repeat(this._value, resolveEnd(end, size) - resolveBegin(begin, size)); + }; + + Repeat.prototype.reverse = function () { + return this; + }; + + Repeat.prototype.indexOf = function (searchValue) { + if (is(this._value, searchValue)) { + return 0; + } + return -1; + }; + + Repeat.prototype.lastIndexOf = function (searchValue) { + if (is(this._value, searchValue)) { + return this.size; + } + return -1; + }; + + Repeat.prototype.__iterate = function (fn, reverse) { + for (var ii = 0; ii < this.size; ii++) { + if (fn(this._value, ii, this) === false) { + return ii + 1; + } + } + return ii; + }; + + Repeat.prototype.__iterator = function (type, reverse) { + var this$0 = this; + var ii = 0; + return new Iterator(function () { + return ii < this$0.size ? iteratorValue(type, ii++, this$0._value) : iteratorDone(); + }); + }; + + Repeat.prototype.equals = function (other) { + return other instanceof Repeat ? is(this._value, other._value) : deepEqual(other); + }; + + var EMPTY_REPEAT; + + function invariant(condition, error) { + if (!condition) throw new Error(error); + } + + createClass(Range, IndexedSeq); + + function Range(start, end, step) { + if (!(this instanceof Range)) { + return new Range(start, end, step); + } + invariant(step !== 0, 'Cannot step a Range by 0'); + start = start || 0; + if (end === undefined) { + end = Infinity; + } + step = step === undefined ? 1 : Math.abs(step); + if (end < start) { + step = -step; + } + this._start = start; + this._end = end; + this._step = step; + this.size = Math.max(0, Math.ceil((end - start) / step - 1) + 1); + if (this.size === 0) { + if (EMPTY_RANGE) { + return EMPTY_RANGE; + } + EMPTY_RANGE = this; + } + } + + Range.prototype.toString = function () { + if (this.size === 0) { + return 'Range []'; + } + return ( + 'Range [ ' + + this._start + + '...' + + this._end + + (this._step !== 1 ? ' by ' + this._step : '') + + ' ]' + ); + }; + + Range.prototype.get = function (index, notSetValue) { + return this.has(index) ? this._start + wrapIndex(this, index) * this._step : notSetValue; + }; + + Range.prototype.includes = function (searchValue) { + var possibleIndex = (searchValue - this._start) / this._step; + return ( + possibleIndex >= 0 && possibleIndex < this.size && possibleIndex === Math.floor(possibleIndex) + ); + }; + + Range.prototype.slice = function (begin, end) { + if (wholeSlice(begin, end, this.size)) { + return this; + } + begin = resolveBegin(begin, this.size); + end = resolveEnd(end, this.size); + if (end <= begin) { + return new Range(0, 0); + } + return new Range(this.get(begin, this._end), this.get(end, this._end), this._step); + }; + + Range.prototype.indexOf = function (searchValue) { + var offsetValue = searchValue - this._start; + if (offsetValue % this._step === 0) { + var index = offsetValue / this._step; + if (index >= 0 && index < this.size) { + return index; + } + } + return -1; + }; + + Range.prototype.lastIndexOf = function (searchValue) { + return this.indexOf(searchValue); + }; + + Range.prototype.__iterate = function (fn, reverse) { + var maxIndex = this.size - 1; + var step = this._step; + var value = reverse ? this._start + maxIndex * step : this._start; + for (var ii = 0; ii <= maxIndex; ii++) { + if (fn(value, ii, this) === false) { + return ii + 1; + } + value += reverse ? -step : step; + } + return ii; + }; + + Range.prototype.__iterator = function (type, reverse) { + var maxIndex = this.size - 1; + var step = this._step; + var value = reverse ? this._start + maxIndex * step : this._start; + var ii = 0; + return new Iterator(function () { + var v = value; + value += reverse ? -step : step; + return ii > maxIndex ? iteratorDone() : iteratorValue(type, ii++, v); + }); + }; + + Range.prototype.equals = function (other) { + return other instanceof Range + ? this._start === other._start && this._end === other._end && this._step === other._step + : deepEqual(this, other); + }; + + var EMPTY_RANGE; + + createClass(Collection, Iterable); + function Collection() { + throw TypeError('Abstract'); + } + + createClass(KeyedCollection, Collection); + function KeyedCollection() {} + + createClass(IndexedCollection, Collection); + function IndexedCollection() {} + + createClass(SetCollection, Collection); + function SetCollection() {} + + Collection.Keyed = KeyedCollection; + Collection.Indexed = IndexedCollection; + Collection.Set = SetCollection; + + var imul = + typeof Math.imul === 'function' && Math.imul(0xffffffff, 2) === -2 + ? Math.imul + : function imul(a, b) { + a = a | 0; // int + b = b | 0; // int + var c = a & 0xffff; + var d = b & 0xffff; + // Shift by 0 fixes the sign on the high part. + return (c * d + ((((a >>> 16) * d + c * (b >>> 16)) << 16) >>> 0)) | 0; // int + }; + + // v8 has an optimization for storing 31-bit signed numbers. + // Values which have either 00 or 11 as the high order bits qualify. + // This function drops the highest order bit in a signed number, maintaining + // the sign bit. + function smi(i32) { + return ((i32 >>> 1) & 0x40000000) | (i32 & 0xbfffffff); + } + + function hash(o) { + if (o === false || o === null || o === undefined) { + return 0; + } + if (typeof o.valueOf === 'function') { + o = o.valueOf(); + if (o === false || o === null || o === undefined) { + return 0; + } + } + if (o === true) { + return 1; + } + var type = typeof o; + if (type === 'number') { + if (o !== o || o === Infinity) { + return 0; + } + var h = o | 0; + if (h !== o) { + h ^= o * 0xffffffff; + } + while (o > 0xffffffff) { + o /= 0xffffffff; + h ^= o; + } + return smi(h); + } + if (type === 'string') { + return o.length > STRING_HASH_CACHE_MIN_STRLEN ? cachedHashString(o) : hashString(o); + } + if (typeof o.hashCode === 'function') { + return o.hashCode(); + } + if (type === 'object') { + return hashJSObj(o); + } + if (typeof o.toString === 'function') { + return hashString(o.toString()); + } + throw new Error('Value type ' + type + ' cannot be hashed.'); + } + + function cachedHashString(string) { + var hash = stringHashCache[string]; + if (hash === undefined) { + hash = hashString(string); + if (STRING_HASH_CACHE_SIZE === STRING_HASH_CACHE_MAX_SIZE) { + STRING_HASH_CACHE_SIZE = 0; + stringHashCache = {}; + } + STRING_HASH_CACHE_SIZE++; + stringHashCache[string] = hash; + } + return hash; + } + + // http://jsperf.com/hashing-strings + function hashString(string) { + // This is the hash from JVM + // The hash code for a string is computed as + // s[0] * 31 ^ (n - 1) + s[1] * 31 ^ (n - 2) + ... + s[n - 1], + // where s[i] is the ith character of the string and n is the length of + // the string. We "mod" the result to make it between 0 (inclusive) and 2^31 + // (exclusive) by dropping high bits. + var hash = 0; + for (var ii = 0; ii < string.length; ii++) { + hash = (31 * hash + string.charCodeAt(ii)) | 0; + } + return smi(hash); + } + + function hashJSObj(obj) { + var hash; + if (usingWeakMap) { + hash = weakMap.get(obj); + if (hash !== undefined) { + return hash; + } + } + + hash = obj[UID_HASH_KEY]; + if (hash !== undefined) { + return hash; + } + + if (!canDefineProperty) { + hash = obj.propertyIsEnumerable && obj.propertyIsEnumerable[UID_HASH_KEY]; + if (hash !== undefined) { + return hash; + } + + hash = getIENodeHash(obj); + if (hash !== undefined) { + return hash; + } + } + + hash = ++objHashUID; + if (objHashUID & 0x40000000) { + objHashUID = 0; + } + + if (usingWeakMap) { + weakMap.set(obj, hash); + } else if (isExtensible !== undefined && isExtensible(obj) === false) { + throw new Error('Non-extensible objects are not allowed as keys.'); + } else if (canDefineProperty) { + Object.defineProperty(obj, UID_HASH_KEY, { + enumerable: false, + configurable: false, + writable: false, + value: hash, + }); + } else if ( + obj.propertyIsEnumerable !== undefined && + obj.propertyIsEnumerable === obj.constructor.prototype.propertyIsEnumerable + ) { + // Since we can't define a non-enumerable property on the object + // we'll hijack one of the less-used non-enumerable properties to + // save our hash on it. Since this is a function it will not show up in + // `JSON.stringify` which is what we want. + obj.propertyIsEnumerable = function () { + return this.constructor.prototype.propertyIsEnumerable.apply(this, arguments); + }; + obj.propertyIsEnumerable[UID_HASH_KEY] = hash; + } else if (obj.nodeType !== undefined) { + // At this point we couldn't get the IE `uniqueID` to use as a hash + // and we couldn't use a non-enumerable property to exploit the + // dontEnum bug so we simply add the `UID_HASH_KEY` on the node + // itself. + obj[UID_HASH_KEY] = hash; + } else { + throw new Error('Unable to set a non-enumerable property on object.'); + } + + return hash; + } + + // Get references to ES5 object methods. + var isExtensible = Object.isExtensible; + + // True if Object.defineProperty works as expected. IE8 fails this test. + var canDefineProperty = (function () { + try { + Object.defineProperty({}, '@', {}); + return true; + } catch (e) { + return false; + } + })(); + + // IE has a `uniqueID` property on DOM nodes. We can construct the hash from it + // and avoid memory leaks from the IE cloneNode bug. + function getIENodeHash(node) { + if (node && node.nodeType > 0) { + switch (node.nodeType) { + case 1: // Element + return node.uniqueID; + case 9: // Document + return node.documentElement && node.documentElement.uniqueID; + } + } + } + + // If possible, use a WeakMap. + var usingWeakMap = typeof WeakMap === 'function'; + var weakMap; + if (usingWeakMap) { + weakMap = new WeakMap(); + } + + var objHashUID = 0; + + var UID_HASH_KEY = '__immutablehash__'; + if (typeof Symbol === 'function') { + UID_HASH_KEY = Symbol(UID_HASH_KEY); + } + + var STRING_HASH_CACHE_MIN_STRLEN = 16; + var STRING_HASH_CACHE_MAX_SIZE = 255; + var STRING_HASH_CACHE_SIZE = 0; + var stringHashCache = {}; + + function assertNotInfinite(size) { + invariant(size !== Infinity, 'Cannot perform this action with an infinite size.'); + } + + createClass(Map, KeyedCollection); + + // @pragma Construction + + function Map(value) { + return value === null || value === undefined + ? emptyMap() + : isMap(value) && !isOrdered(value) + ? value + : emptyMap().withMutations(function (map) { + var iter = KeyedIterable(value); + assertNotInfinite(iter.size); + iter.forEach(function (v, k) { + return map.set(k, v); + }); + }); + } + + Map.of = function () { + var keyValues = SLICE$0.call(arguments, 0); + return emptyMap().withMutations(function (map) { + for (var i = 0; i < keyValues.length; i += 2) { + if (i + 1 >= keyValues.length) { + throw new Error('Missing value for key: ' + keyValues[i]); + } + map.set(keyValues[i], keyValues[i + 1]); + } + }); + }; + + Map.prototype.toString = function () { + return this.__toString('Map {', '}'); + }; + + // @pragma Access + + Map.prototype.get = function (k, notSetValue) { + return this._root ? this._root.get(0, undefined, k, notSetValue) : notSetValue; + }; + + // @pragma Modification + + Map.prototype.set = function (k, v) { + return updateMap(this, k, v); + }; + + Map.prototype.setIn = function (keyPath, v) { + return this.updateIn(keyPath, NOT_SET, function () { + return v; + }); + }; + + Map.prototype.remove = function (k) { + return updateMap(this, k, NOT_SET); + }; + + Map.prototype.deleteIn = function (keyPath) { + return this.updateIn(keyPath, function () { + return NOT_SET; + }); + }; + + Map.prototype.update = function (k, notSetValue, updater) { + return arguments.length === 1 ? k(this) : this.updateIn([k], notSetValue, updater); + }; + + Map.prototype.updateIn = function (keyPath, notSetValue, updater) { + if (!updater) { + updater = notSetValue; + notSetValue = undefined; + } + var updatedValue = updateInDeepMap(this, forceIterator(keyPath), notSetValue, updater); + return updatedValue === NOT_SET ? undefined : updatedValue; + }; + + Map.prototype.clear = function () { + if (this.size === 0) { + return this; + } + if (this.__ownerID) { + this.size = 0; + this._root = null; + this.__hash = undefined; + this.__altered = true; + return this; + } + return emptyMap(); + }; + + // @pragma Composition + + Map.prototype.merge = function (/*...iters*/) { + return mergeIntoMapWith(this, undefined, arguments); + }; + + Map.prototype.mergeWith = function (merger) { + var iters = SLICE$0.call(arguments, 1); + return mergeIntoMapWith(this, merger, iters); + }; + + Map.prototype.mergeIn = function (keyPath) { + var iters = SLICE$0.call(arguments, 1); + return this.updateIn(keyPath, emptyMap(), function (m) { + return typeof m.merge === 'function' ? m.merge.apply(m, iters) : iters[iters.length - 1]; + }); + }; + + Map.prototype.mergeDeep = function (/*...iters*/) { + return mergeIntoMapWith(this, deepMerger, arguments); + }; + + Map.prototype.mergeDeepWith = function (merger) { + var iters = SLICE$0.call(arguments, 1); + return mergeIntoMapWith(this, deepMergerWith(merger), iters); + }; + + Map.prototype.mergeDeepIn = function (keyPath) { + var iters = SLICE$0.call(arguments, 1); + return this.updateIn(keyPath, emptyMap(), function (m) { + return typeof m.mergeDeep === 'function' ? m.mergeDeep.apply(m, iters) : iters[iters.length - 1]; + }); + }; + + Map.prototype.sort = function (comparator) { + // Late binding + return OrderedMap(sortFactory(this, comparator)); + }; + + Map.prototype.sortBy = function (mapper, comparator) { + // Late binding + return OrderedMap(sortFactory(this, comparator, mapper)); + }; + + // @pragma Mutability + + Map.prototype.withMutations = function (fn) { + var mutable = this.asMutable(); + fn(mutable); + return mutable.wasAltered() ? mutable.__ensureOwner(this.__ownerID) : this; + }; + + Map.prototype.asMutable = function () { + return this.__ownerID ? this : this.__ensureOwner(new OwnerID()); + }; + + Map.prototype.asImmutable = function () { + return this.__ensureOwner(); + }; + + Map.prototype.wasAltered = function () { + return this.__altered; + }; + + Map.prototype.__iterator = function (type, reverse) { + return new MapIterator(this, type, reverse); + }; + + Map.prototype.__iterate = function (fn, reverse) { + var this$0 = this; + var iterations = 0; + this._root && + this._root.iterate(function (entry) { + iterations++; + return fn(entry[1], entry[0], this$0); + }, reverse); + return iterations; + }; + + Map.prototype.__ensureOwner = function (ownerID) { + if (ownerID === this.__ownerID) { + return this; + } + if (!ownerID) { + this.__ownerID = ownerID; + this.__altered = false; + return this; + } + return makeMap(this.size, this._root, ownerID, this.__hash); + }; + + function isMap(maybeMap) { + return !!(maybeMap && maybeMap[IS_MAP_SENTINEL]); + } + + Map.isMap = isMap; + + var IS_MAP_SENTINEL = '@@__IMMUTABLE_MAP__@@'; + + var MapPrototype = Map.prototype; + MapPrototype[IS_MAP_SENTINEL] = true; + MapPrototype[DELETE] = MapPrototype.remove; + MapPrototype.removeIn = MapPrototype.deleteIn; + + // #pragma Trie Nodes + + function ArrayMapNode(ownerID, entries) { + this.ownerID = ownerID; + this.entries = entries; + } + + ArrayMapNode.prototype.get = function (shift, keyHash, key, notSetValue) { + var entries = this.entries; + for (var ii = 0, len = entries.length; ii < len; ii++) { + if (is(key, entries[ii][0])) { + return entries[ii][1]; + } + } + return notSetValue; + }; + + ArrayMapNode.prototype.update = function ( + ownerID, + shift, + keyHash, + key, + value, + didChangeSize, + didAlter, + ) { + var removed = value === NOT_SET; + + var entries = this.entries; + var idx = 0; + for (var len = entries.length; idx < len; idx++) { + if (is(key, entries[idx][0])) { + break; + } + } + var exists = idx < len; + + if (exists ? entries[idx][1] === value : removed) { + return this; + } + + SetRef(didAlter); + (removed || !exists) && SetRef(didChangeSize); + + if (removed && entries.length === 1) { + return; // undefined + } + + if (!exists && !removed && entries.length >= MAX_ARRAY_MAP_SIZE) { + return createNodes(ownerID, entries, key, value); + } + + var isEditable = ownerID && ownerID === this.ownerID; + var newEntries = isEditable ? entries : arrCopy(entries); + + if (exists) { + if (removed) { + idx === len - 1 ? newEntries.pop() : (newEntries[idx] = newEntries.pop()); + } else { + newEntries[idx] = [key, value]; + } + } else { + newEntries.push([key, value]); + } + + if (isEditable) { + this.entries = newEntries; + return this; + } + + return new ArrayMapNode(ownerID, newEntries); + }; + + function BitmapIndexedNode(ownerID, bitmap, nodes) { + this.ownerID = ownerID; + this.bitmap = bitmap; + this.nodes = nodes; + } + + BitmapIndexedNode.prototype.get = function (shift, keyHash, key, notSetValue) { + if (keyHash === undefined) { + keyHash = hash(key); + } + var bit = 1 << ((shift === 0 ? keyHash : keyHash >>> shift) & MASK); + var bitmap = this.bitmap; + return (bitmap & bit) === 0 + ? notSetValue + : this.nodes[popCount(bitmap & (bit - 1))].get(shift + SHIFT, keyHash, key, notSetValue); + }; + + BitmapIndexedNode.prototype.update = function ( + ownerID, + shift, + keyHash, + key, + value, + didChangeSize, + didAlter, + ) { + if (keyHash === undefined) { + keyHash = hash(key); + } + var keyHashFrag = (shift === 0 ? keyHash : keyHash >>> shift) & MASK; + var bit = 1 << keyHashFrag; + var bitmap = this.bitmap; + var exists = (bitmap & bit) !== 0; + + if (!exists && value === NOT_SET) { + return this; + } + + var idx = popCount(bitmap & (bit - 1)); + var nodes = this.nodes; + var node = exists ? nodes[idx] : undefined; + var newNode = updateNode( + node, + ownerID, + shift + SHIFT, + keyHash, + key, + value, + didChangeSize, + didAlter, + ); + + if (newNode === node) { + return this; + } + + if (!exists && newNode && nodes.length >= MAX_BITMAP_INDEXED_SIZE) { + return expandNodes(ownerID, nodes, bitmap, keyHashFrag, newNode); + } + + if (exists && !newNode && nodes.length === 2 && isLeafNode(nodes[idx ^ 1])) { + return nodes[idx ^ 1]; + } + + if (exists && newNode && nodes.length === 1 && isLeafNode(newNode)) { + return newNode; + } + + var isEditable = ownerID && ownerID === this.ownerID; + var newBitmap = exists ? (newNode ? bitmap : bitmap ^ bit) : bitmap | bit; + var newNodes = exists + ? newNode + ? setIn(nodes, idx, newNode, isEditable) + : spliceOut(nodes, idx, isEditable) + : spliceIn(nodes, idx, newNode, isEditable); + + if (isEditable) { + this.bitmap = newBitmap; + this.nodes = newNodes; + return this; + } + + return new BitmapIndexedNode(ownerID, newBitmap, newNodes); + }; + + function HashArrayMapNode(ownerID, count, nodes) { + this.ownerID = ownerID; + this.count = count; + this.nodes = nodes; + } + + HashArrayMapNode.prototype.get = function (shift, keyHash, key, notSetValue) { + if (keyHash === undefined) { + keyHash = hash(key); + } + var idx = (shift === 0 ? keyHash : keyHash >>> shift) & MASK; + var node = this.nodes[idx]; + return node ? node.get(shift + SHIFT, keyHash, key, notSetValue) : notSetValue; + }; + + HashArrayMapNode.prototype.update = function ( + ownerID, + shift, + keyHash, + key, + value, + didChangeSize, + didAlter, + ) { + if (keyHash === undefined) { + keyHash = hash(key); + } + var idx = (shift === 0 ? keyHash : keyHash >>> shift) & MASK; + var removed = value === NOT_SET; + var nodes = this.nodes; + var node = nodes[idx]; + + if (removed && !node) { + return this; + } + + var newNode = updateNode( + node, + ownerID, + shift + SHIFT, + keyHash, + key, + value, + didChangeSize, + didAlter, + ); + if (newNode === node) { + return this; + } + + var newCount = this.count; + if (!node) { + newCount++; + } else if (!newNode) { + newCount--; + if (newCount < MIN_HASH_ARRAY_MAP_SIZE) { + return packNodes(ownerID, nodes, newCount, idx); + } + } + + var isEditable = ownerID && ownerID === this.ownerID; + var newNodes = setIn(nodes, idx, newNode, isEditable); + + if (isEditable) { + this.count = newCount; + this.nodes = newNodes; + return this; + } + + return new HashArrayMapNode(ownerID, newCount, newNodes); + }; + + function HashCollisionNode(ownerID, keyHash, entries) { + this.ownerID = ownerID; + this.keyHash = keyHash; + this.entries = entries; + } + + HashCollisionNode.prototype.get = function (shift, keyHash, key, notSetValue) { + var entries = this.entries; + for (var ii = 0, len = entries.length; ii < len; ii++) { + if (is(key, entries[ii][0])) { + return entries[ii][1]; + } + } + return notSetValue; + }; + + HashCollisionNode.prototype.update = function ( + ownerID, + shift, + keyHash, + key, + value, + didChangeSize, + didAlter, + ) { + if (keyHash === undefined) { + keyHash = hash(key); + } + + var removed = value === NOT_SET; + + if (keyHash !== this.keyHash) { + if (removed) { + return this; + } + SetRef(didAlter); + SetRef(didChangeSize); + return mergeIntoNode(this, ownerID, shift, keyHash, [key, value]); + } + + var entries = this.entries; + var idx = 0; + for (var len = entries.length; idx < len; idx++) { + if (is(key, entries[idx][0])) { + break; + } + } + var exists = idx < len; + + if (exists ? entries[idx][1] === value : removed) { + return this; + } + + SetRef(didAlter); + (removed || !exists) && SetRef(didChangeSize); + + if (removed && len === 2) { + return new ValueNode(ownerID, this.keyHash, entries[idx ^ 1]); + } + + var isEditable = ownerID && ownerID === this.ownerID; + var newEntries = isEditable ? entries : arrCopy(entries); + + if (exists) { + if (removed) { + idx === len - 1 ? newEntries.pop() : (newEntries[idx] = newEntries.pop()); + } else { + newEntries[idx] = [key, value]; + } + } else { + newEntries.push([key, value]); + } + + if (isEditable) { + this.entries = newEntries; + return this; + } + + return new HashCollisionNode(ownerID, this.keyHash, newEntries); + }; + + function ValueNode(ownerID, keyHash, entry) { + this.ownerID = ownerID; + this.keyHash = keyHash; + this.entry = entry; + } + + ValueNode.prototype.get = function (shift, keyHash, key, notSetValue) { + return is(key, this.entry[0]) ? this.entry[1] : notSetValue; + }; + + ValueNode.prototype.update = function (ownerID, shift, keyHash, key, value, didChangeSize, didAlter) { + var removed = value === NOT_SET; + var keyMatch = is(key, this.entry[0]); + if (keyMatch ? value === this.entry[1] : removed) { + return this; + } + + SetRef(didAlter); + + if (removed) { + SetRef(didChangeSize); + return; // undefined + } + + if (keyMatch) { + if (ownerID && ownerID === this.ownerID) { + this.entry[1] = value; + return this; + } + return new ValueNode(ownerID, this.keyHash, [key, value]); + } + + SetRef(didChangeSize); + return mergeIntoNode(this, ownerID, shift, hash(key), [key, value]); + }; + + // #pragma Iterators + + ArrayMapNode.prototype.iterate = HashCollisionNode.prototype.iterate = function (fn, reverse) { + var entries = this.entries; + for (var ii = 0, maxIndex = entries.length - 1; ii <= maxIndex; ii++) { + if (fn(entries[reverse ? maxIndex - ii : ii]) === false) { + return false; + } + } + }; + + BitmapIndexedNode.prototype.iterate = HashArrayMapNode.prototype.iterate = function (fn, reverse) { + var nodes = this.nodes; + for (var ii = 0, maxIndex = nodes.length - 1; ii <= maxIndex; ii++) { + var node = nodes[reverse ? maxIndex - ii : ii]; + if (node && node.iterate(fn, reverse) === false) { + return false; + } + } + }; + + ValueNode.prototype.iterate = function (fn, reverse) { + return fn(this.entry); + }; + + createClass(MapIterator, Iterator); + + function MapIterator(map, type, reverse) { + this._type = type; + this._reverse = reverse; + this._stack = map._root && mapIteratorFrame(map._root); + } + + MapIterator.prototype.next = function () { + var type = this._type; + var stack = this._stack; + while (stack) { + var node = stack.node; + var index = stack.index++; + var maxIndex; + if (node.entry) { + if (index === 0) { + return mapIteratorValue(type, node.entry); + } + } else if (node.entries) { + maxIndex = node.entries.length - 1; + if (index <= maxIndex) { + return mapIteratorValue(type, node.entries[this._reverse ? maxIndex - index : index]); + } + } else { + maxIndex = node.nodes.length - 1; + if (index <= maxIndex) { + var subNode = node.nodes[this._reverse ? maxIndex - index : index]; + if (subNode) { + if (subNode.entry) { + return mapIteratorValue(type, subNode.entry); + } + stack = this._stack = mapIteratorFrame(subNode, stack); + } + continue; + } + } + stack = this._stack = this._stack.__prev; + } + return iteratorDone(); + }; + + function mapIteratorValue(type, entry) { + return iteratorValue(type, entry[0], entry[1]); + } + + function mapIteratorFrame(node, prev) { + return { + node: node, + index: 0, + __prev: prev, + }; + } + + function makeMap(size, root, ownerID, hash) { + var map = Object.create(MapPrototype); + map.size = size; + map._root = root; + map.__ownerID = ownerID; + map.__hash = hash; + map.__altered = false; + return map; + } + + var EMPTY_MAP; + function emptyMap() { + return EMPTY_MAP || (EMPTY_MAP = makeMap(0)); + } + + function updateMap(map, k, v) { + var newRoot; + var newSize; + if (!map._root) { + if (v === NOT_SET) { + return map; + } + newSize = 1; + newRoot = new ArrayMapNode(map.__ownerID, [[k, v]]); + } else { + var didChangeSize = MakeRef(CHANGE_LENGTH); + var didAlter = MakeRef(DID_ALTER); + newRoot = updateNode(map._root, map.__ownerID, 0, undefined, k, v, didChangeSize, didAlter); + if (!didAlter.value) { + return map; + } + newSize = map.size + (didChangeSize.value ? (v === NOT_SET ? -1 : 1) : 0); + } + if (map.__ownerID) { + map.size = newSize; + map._root = newRoot; + map.__hash = undefined; + map.__altered = true; + return map; + } + return newRoot ? makeMap(newSize, newRoot) : emptyMap(); + } + + function updateNode(node, ownerID, shift, keyHash, key, value, didChangeSize, didAlter) { + if (!node) { + if (value === NOT_SET) { + return node; + } + SetRef(didAlter); + SetRef(didChangeSize); + return new ValueNode(ownerID, keyHash, [key, value]); + } + return node.update(ownerID, shift, keyHash, key, value, didChangeSize, didAlter); + } + + function isLeafNode(node) { + return node.constructor === ValueNode || node.constructor === HashCollisionNode; + } + + function mergeIntoNode(node, ownerID, shift, keyHash, entry) { + if (node.keyHash === keyHash) { + return new HashCollisionNode(ownerID, keyHash, [node.entry, entry]); + } + + var idx1 = (shift === 0 ? node.keyHash : node.keyHash >>> shift) & MASK; + var idx2 = (shift === 0 ? keyHash : keyHash >>> shift) & MASK; + + var newNode; + var nodes = + idx1 === idx2 + ? [mergeIntoNode(node, ownerID, shift + SHIFT, keyHash, entry)] + : ((newNode = new ValueNode(ownerID, keyHash, entry)), + idx1 < idx2 ? [node, newNode] : [newNode, node]); + + return new BitmapIndexedNode(ownerID, (1 << idx1) | (1 << idx2), nodes); + } + + function createNodes(ownerID, entries, key, value) { + if (!ownerID) { + ownerID = new OwnerID(); + } + var node = new ValueNode(ownerID, hash(key), [key, value]); + for (var ii = 0; ii < entries.length; ii++) { + var entry = entries[ii]; + node = node.update(ownerID, 0, undefined, entry[0], entry[1]); + } + return node; + } + + function packNodes(ownerID, nodes, count, excluding) { + var bitmap = 0; + var packedII = 0; + var packedNodes = new Array(count); + for (var ii = 0, bit = 1, len = nodes.length; ii < len; ii++, bit <<= 1) { + var node = nodes[ii]; + if (node !== undefined && ii !== excluding) { + bitmap |= bit; + packedNodes[packedII++] = node; + } + } + return new BitmapIndexedNode(ownerID, bitmap, packedNodes); + } + + function expandNodes(ownerID, nodes, bitmap, including, node) { + var count = 0; + var expandedNodes = new Array(SIZE); + for (var ii = 0; bitmap !== 0; ii++, bitmap >>>= 1) { + expandedNodes[ii] = bitmap & 1 ? nodes[count++] : undefined; + } + expandedNodes[including] = node; + return new HashArrayMapNode(ownerID, count + 1, expandedNodes); + } + + function mergeIntoMapWith(map, merger, iterables) { + var iters = []; + for (var ii = 0; ii < iterables.length; ii++) { + var value = iterables[ii]; + var iter = KeyedIterable(value); + if (!isIterable(value)) { + iter = iter.map(function (v) { + return fromJS(v); + }); + } + iters.push(iter); + } + return mergeIntoCollectionWith(map, merger, iters); + } + + function deepMerger(existing, value, key) { + return existing && existing.mergeDeep && isIterable(value) + ? existing.mergeDeep(value) + : is(existing, value) + ? existing + : value; + } + + function deepMergerWith(merger) { + return function (existing, value, key) { + if (existing && existing.mergeDeepWith && isIterable(value)) { + return existing.mergeDeepWith(merger, value); + } + var nextValue = merger(existing, value, key); + return is(existing, nextValue) ? existing : nextValue; + }; + } + + function mergeIntoCollectionWith(collection, merger, iters) { + iters = iters.filter(function (x) { + return x.size !== 0; + }); + if (iters.length === 0) { + return collection; + } + if (collection.size === 0 && !collection.__ownerID && iters.length === 1) { + return collection.constructor(iters[0]); + } + return collection.withMutations(function (collection) { + var mergeIntoMap = merger + ? function (value, key) { + collection.update(key, NOT_SET, function (existing) { + return existing === NOT_SET ? value : merger(existing, value, key); + }); + } + : function (value, key) { + collection.set(key, value); + }; + for (var ii = 0; ii < iters.length; ii++) { + iters[ii].forEach(mergeIntoMap); + } + }); + } + + function updateInDeepMap(existing, keyPathIter, notSetValue, updater) { + var isNotSet = existing === NOT_SET; + var step = keyPathIter.next(); + if (step.done) { + var existingValue = isNotSet ? notSetValue : existing; + var newValue = updater(existingValue); + return newValue === existingValue ? existing : newValue; + } + invariant(isNotSet || (existing && existing.set), 'invalid keyPath'); + var key = step.value; + var nextExisting = isNotSet ? NOT_SET : existing.get(key, NOT_SET); + var nextUpdated = updateInDeepMap(nextExisting, keyPathIter, notSetValue, updater); + return nextUpdated === nextExisting + ? existing + : nextUpdated === NOT_SET + ? existing.remove(key) + : (isNotSet ? emptyMap() : existing).set(key, nextUpdated); + } + + function popCount(x) { + x = x - ((x >> 1) & 0x55555555); + x = (x & 0x33333333) + ((x >> 2) & 0x33333333); + x = (x + (x >> 4)) & 0x0f0f0f0f; + x = x + (x >> 8); + x = x + (x >> 16); + return x & 0x7f; + } + + function setIn(array, idx, val, canEdit) { + var newArray = canEdit ? array : arrCopy(array); + newArray[idx] = val; + return newArray; + } + + function spliceIn(array, idx, val, canEdit) { + var newLen = array.length + 1; + if (canEdit && idx + 1 === newLen) { + array[idx] = val; + return array; + } + var newArray = new Array(newLen); + var after = 0; + for (var ii = 0; ii < newLen; ii++) { + if (ii === idx) { + newArray[ii] = val; + after = -1; + } else { + newArray[ii] = array[ii + after]; + } + } + return newArray; + } + + function spliceOut(array, idx, canEdit) { + var newLen = array.length - 1; + if (canEdit && idx === newLen) { + array.pop(); + return array; + } + var newArray = new Array(newLen); + var after = 0; + for (var ii = 0; ii < newLen; ii++) { + if (ii === idx) { + after = 1; + } + newArray[ii] = array[ii + after]; + } + return newArray; + } + + var MAX_ARRAY_MAP_SIZE = SIZE / 4; + var MAX_BITMAP_INDEXED_SIZE = SIZE / 2; + var MIN_HASH_ARRAY_MAP_SIZE = SIZE / 4; + + createClass(List, IndexedCollection); + + // @pragma Construction + + function List(value) { + var empty = emptyList(); + if (value === null || value === undefined) { + return empty; + } + if (isList(value)) { + return value; + } + var iter = IndexedIterable(value); + var size = iter.size; + if (size === 0) { + return empty; + } + assertNotInfinite(size); + if (size > 0 && size < SIZE) { + return makeList(0, size, SHIFT, null, new VNode(iter.toArray())); + } + return empty.withMutations(function (list) { + list.setSize(size); + iter.forEach(function (v, i) { + return list.set(i, v); + }); + }); + } + + List.of = function (/*...values*/) { + return this(arguments); + }; + + List.prototype.toString = function () { + return this.__toString('List [', ']'); + }; + + // @pragma Access + + List.prototype.get = function (index, notSetValue) { + index = wrapIndex(this, index); + if (index >= 0 && index < this.size) { + index += this._origin; + var node = listNodeFor(this, index); + return node && node.array[index & MASK]; + } + return notSetValue; + }; + + // @pragma Modification + + List.prototype.set = function (index, value) { + return updateList(this, index, value); + }; + + List.prototype.remove = function (index) { + return !this.has(index) + ? this + : index === 0 + ? this.shift() + : index === this.size - 1 + ? this.pop() + : this.splice(index, 1); + }; + + List.prototype.insert = function (index, value) { + return this.splice(index, 0, value); + }; + + List.prototype.clear = function () { + if (this.size === 0) { + return this; + } + if (this.__ownerID) { + this.size = this._origin = this._capacity = 0; + this._level = SHIFT; + this._root = this._tail = null; + this.__hash = undefined; + this.__altered = true; + return this; + } + return emptyList(); + }; + + List.prototype.push = function (/*...values*/) { + var values = arguments; + var oldSize = this.size; + return this.withMutations(function (list) { + setListBounds(list, 0, oldSize + values.length); + for (var ii = 0; ii < values.length; ii++) { + list.set(oldSize + ii, values[ii]); + } + }); + }; + + List.prototype.pop = function () { + return setListBounds(this, 0, -1); + }; + + List.prototype.unshift = function (/*...values*/) { + var values = arguments; + return this.withMutations(function (list) { + setListBounds(list, -values.length); + for (var ii = 0; ii < values.length; ii++) { + list.set(ii, values[ii]); + } + }); + }; + + List.prototype.shift = function () { + return setListBounds(this, 1); + }; + + // @pragma Composition + + List.prototype.merge = function (/*...iters*/) { + return mergeIntoListWith(this, undefined, arguments); + }; + + List.prototype.mergeWith = function (merger) { + var iters = SLICE$0.call(arguments, 1); + return mergeIntoListWith(this, merger, iters); + }; + + List.prototype.mergeDeep = function (/*...iters*/) { + return mergeIntoListWith(this, deepMerger, arguments); + }; + + List.prototype.mergeDeepWith = function (merger) { + var iters = SLICE$0.call(arguments, 1); + return mergeIntoListWith(this, deepMergerWith(merger), iters); + }; + + List.prototype.setSize = function (size) { + return setListBounds(this, 0, size); + }; + + // @pragma Iteration + + List.prototype.slice = function (begin, end) { + var size = this.size; + if (wholeSlice(begin, end, size)) { + return this; + } + return setListBounds(this, resolveBegin(begin, size), resolveEnd(end, size)); + }; + + List.prototype.__iterator = function (type, reverse) { + var index = 0; + var values = iterateList(this, reverse); + return new Iterator(function () { + var value = values(); + return value === DONE ? iteratorDone() : iteratorValue(type, index++, value); + }); + }; + + List.prototype.__iterate = function (fn, reverse) { + var index = 0; + var values = iterateList(this, reverse); + var value; + while ((value = values()) !== DONE) { + if (fn(value, index++, this) === false) { + break; + } + } + return index; + }; + + List.prototype.__ensureOwner = function (ownerID) { + if (ownerID === this.__ownerID) { + return this; + } + if (!ownerID) { + this.__ownerID = ownerID; + return this; + } + return makeList( + this._origin, + this._capacity, + this._level, + this._root, + this._tail, + ownerID, + this.__hash, + ); + }; + + function isList(maybeList) { + return !!(maybeList && maybeList[IS_LIST_SENTINEL]); + } + + List.isList = isList; + + var IS_LIST_SENTINEL = '@@__IMMUTABLE_LIST__@@'; + + var ListPrototype = List.prototype; + ListPrototype[IS_LIST_SENTINEL] = true; + ListPrototype[DELETE] = ListPrototype.remove; + ListPrototype.setIn = MapPrototype.setIn; + ListPrototype.deleteIn = ListPrototype.removeIn = MapPrototype.removeIn; + ListPrototype.update = MapPrototype.update; + ListPrototype.updateIn = MapPrototype.updateIn; + ListPrototype.mergeIn = MapPrototype.mergeIn; + ListPrototype.mergeDeepIn = MapPrototype.mergeDeepIn; + ListPrototype.withMutations = MapPrototype.withMutations; + ListPrototype.asMutable = MapPrototype.asMutable; + ListPrototype.asImmutable = MapPrototype.asImmutable; + ListPrototype.wasAltered = MapPrototype.wasAltered; + + function VNode(array, ownerID) { + this.array = array; + this.ownerID = ownerID; + } + + // TODO: seems like these methods are very similar + + VNode.prototype.removeBefore = function (ownerID, level, index) { + if (index === level ? 1 << level : 0 || this.array.length === 0) { + return this; + } + var originIndex = (index >>> level) & MASK; + if (originIndex >= this.array.length) { + return new VNode([], ownerID); + } + var removingFirst = originIndex === 0; + var newChild; + if (level > 0) { + var oldChild = this.array[originIndex]; + newChild = oldChild && oldChild.removeBefore(ownerID, level - SHIFT, index); + if (newChild === oldChild && removingFirst) { + return this; + } + } + if (removingFirst && !newChild) { + return this; + } + var editable = editableVNode(this, ownerID); + if (!removingFirst) { + for (var ii = 0; ii < originIndex; ii++) { + editable.array[ii] = undefined; + } + } + if (newChild) { + editable.array[originIndex] = newChild; + } + return editable; + }; + + VNode.prototype.removeAfter = function (ownerID, level, index) { + if (index === (level ? 1 << level : 0) || this.array.length === 0) { + return this; + } + var sizeIndex = ((index - 1) >>> level) & MASK; + if (sizeIndex >= this.array.length) { + return this; + } + + var newChild; + if (level > 0) { + var oldChild = this.array[sizeIndex]; + newChild = oldChild && oldChild.removeAfter(ownerID, level - SHIFT, index); + if (newChild === oldChild && sizeIndex === this.array.length - 1) { + return this; + } + } + + var editable = editableVNode(this, ownerID); + editable.array.splice(sizeIndex + 1); + if (newChild) { + editable.array[sizeIndex] = newChild; + } + return editable; + }; + + var DONE = {}; + + function iterateList(list, reverse) { + var left = list._origin; + var right = list._capacity; + var tailPos = getTailOffset(right); + var tail = list._tail; + + return iterateNodeOrLeaf(list._root, list._level, 0); + + function iterateNodeOrLeaf(node, level, offset) { + return level === 0 ? iterateLeaf(node, offset) : iterateNode(node, level, offset); + } + + function iterateLeaf(node, offset) { + var array = offset === tailPos ? tail && tail.array : node && node.array; + var from = offset > left ? 0 : left - offset; + var to = right - offset; + if (to > SIZE) { + to = SIZE; + } + return function () { + if (from === to) { + return DONE; + } + var idx = reverse ? --to : from++; + return array && array[idx]; + }; + } + + function iterateNode(node, level, offset) { + var values; + var array = node && node.array; + var from = offset > left ? 0 : (left - offset) >> level; + var to = ((right - offset) >> level) + 1; + if (to > SIZE) { + to = SIZE; + } + return function () { + do { + if (values) { + var value = values(); + if (value !== DONE) { + return value; + } + values = null; + } + if (from === to) { + return DONE; + } + var idx = reverse ? --to : from++; + values = iterateNodeOrLeaf(array && array[idx], level - SHIFT, offset + (idx << level)); + } while (true); + }; + } + } + + function makeList(origin, capacity, level, root, tail, ownerID, hash) { + var list = Object.create(ListPrototype); + list.size = capacity - origin; + list._origin = origin; + list._capacity = capacity; + list._level = level; + list._root = root; + list._tail = tail; + list.__ownerID = ownerID; + list.__hash = hash; + list.__altered = false; + return list; + } + + var EMPTY_LIST; + function emptyList() { + return EMPTY_LIST || (EMPTY_LIST = makeList(0, 0, SHIFT)); + } + + function updateList(list, index, value) { + index = wrapIndex(list, index); + + if (index !== index) { + return list; + } + + if (index >= list.size || index < 0) { + return list.withMutations(function (list) { + index < 0 + ? setListBounds(list, index).set(0, value) + : setListBounds(list, 0, index + 1).set(index, value); + }); + } + + index += list._origin; + + var newTail = list._tail; + var newRoot = list._root; + var didAlter = MakeRef(DID_ALTER); + if (index >= getTailOffset(list._capacity)) { + newTail = updateVNode(newTail, list.__ownerID, 0, index, value, didAlter); + } else { + newRoot = updateVNode(newRoot, list.__ownerID, list._level, index, value, didAlter); + } + + if (!didAlter.value) { + return list; + } + + if (list.__ownerID) { + list._root = newRoot; + list._tail = newTail; + list.__hash = undefined; + list.__altered = true; + return list; + } + return makeList(list._origin, list._capacity, list._level, newRoot, newTail); + } + + function updateVNode(node, ownerID, level, index, value, didAlter) { + var idx = (index >>> level) & MASK; + var nodeHas = node && idx < node.array.length; + if (!nodeHas && value === undefined) { + return node; + } + + var newNode; + + if (level > 0) { + var lowerNode = node && node.array[idx]; + var newLowerNode = updateVNode(lowerNode, ownerID, level - SHIFT, index, value, didAlter); + if (newLowerNode === lowerNode) { + return node; + } + newNode = editableVNode(node, ownerID); + newNode.array[idx] = newLowerNode; + return newNode; + } + + if (nodeHas && node.array[idx] === value) { + return node; + } + + SetRef(didAlter); + + newNode = editableVNode(node, ownerID); + if (value === undefined && idx === newNode.array.length - 1) { + newNode.array.pop(); + } else { + newNode.array[idx] = value; + } + return newNode; + } + + function editableVNode(node, ownerID) { + if (ownerID && node && ownerID === node.ownerID) { + return node; + } + return new VNode(node ? node.array.slice() : [], ownerID); + } + + function listNodeFor(list, rawIndex) { + if (rawIndex >= getTailOffset(list._capacity)) { + return list._tail; + } + if (rawIndex < 1 << (list._level + SHIFT)) { + var node = list._root; + var level = list._level; + while (node && level > 0) { + node = node.array[(rawIndex >>> level) & MASK]; + level -= SHIFT; + } + return node; + } + } + + function setListBounds(list, begin, end) { + // Sanitize begin & end using this shorthand for ToInt32(argument) + // http://www.ecma-international.org/ecma-262/6.0/#sec-toint32 + if (begin !== undefined) { + begin = begin | 0; + } + if (end !== undefined) { + end = end | 0; + } + var owner = list.__ownerID || new OwnerID(); + var oldOrigin = list._origin; + var oldCapacity = list._capacity; + var newOrigin = oldOrigin + begin; + var newCapacity = end === undefined ? oldCapacity : end < 0 ? oldCapacity + end : oldOrigin + end; + if (newOrigin === oldOrigin && newCapacity === oldCapacity) { + return list; + } + + // If it's going to end after it starts, it's empty. + if (newOrigin >= newCapacity) { + return list.clear(); + } + + var newLevel = list._level; + var newRoot = list._root; + + // New origin might need creating a higher root. + var offsetShift = 0; + while (newOrigin + offsetShift < 0) { + newRoot = new VNode(newRoot && newRoot.array.length ? [undefined, newRoot] : [], owner); + newLevel += SHIFT; + offsetShift += 1 << newLevel; + } + if (offsetShift) { + newOrigin += offsetShift; + oldOrigin += offsetShift; + newCapacity += offsetShift; + oldCapacity += offsetShift; + } + + var oldTailOffset = getTailOffset(oldCapacity); + var newTailOffset = getTailOffset(newCapacity); + + // New size might need creating a higher root. + while (newTailOffset >= 1 << (newLevel + SHIFT)) { + newRoot = new VNode(newRoot && newRoot.array.length ? [newRoot] : [], owner); + newLevel += SHIFT; + } + + // Locate or create the new tail. + var oldTail = list._tail; + var newTail = + newTailOffset < oldTailOffset + ? listNodeFor(list, newCapacity - 1) + : newTailOffset > oldTailOffset + ? new VNode([], owner) + : oldTail; + + // Merge Tail into tree. + if (oldTail && newTailOffset > oldTailOffset && newOrigin < oldCapacity && oldTail.array.length) { + newRoot = editableVNode(newRoot, owner); + var node = newRoot; + for (var level = newLevel; level > SHIFT; level -= SHIFT) { + var idx = (oldTailOffset >>> level) & MASK; + node = node.array[idx] = editableVNode(node.array[idx], owner); + } + node.array[(oldTailOffset >>> SHIFT) & MASK] = oldTail; + } + + // If the size has been reduced, there's a chance the tail needs to be trimmed. + if (newCapacity < oldCapacity) { + newTail = newTail && newTail.removeAfter(owner, 0, newCapacity); + } + + // If the new origin is within the tail, then we do not need a root. + if (newOrigin >= newTailOffset) { + newOrigin -= newTailOffset; + newCapacity -= newTailOffset; + newLevel = SHIFT; + newRoot = null; + newTail = newTail && newTail.removeBefore(owner, 0, newOrigin); + + // Otherwise, if the root has been trimmed, garbage collect. + } else if (newOrigin > oldOrigin || newTailOffset < oldTailOffset) { + offsetShift = 0; + + // Identify the new top root node of the subtree of the old root. + while (newRoot) { + var beginIndex = (newOrigin >>> newLevel) & MASK; + if ((beginIndex !== newTailOffset >>> newLevel) & MASK) { + break; + } + if (beginIndex) { + offsetShift += (1 << newLevel) * beginIndex; + } + newLevel -= SHIFT; + newRoot = newRoot.array[beginIndex]; + } + + // Trim the new sides of the new root. + if (newRoot && newOrigin > oldOrigin) { + newRoot = newRoot.removeBefore(owner, newLevel, newOrigin - offsetShift); + } + if (newRoot && newTailOffset < oldTailOffset) { + newRoot = newRoot.removeAfter(owner, newLevel, newTailOffset - offsetShift); + } + if (offsetShift) { + newOrigin -= offsetShift; + newCapacity -= offsetShift; + } + } + + if (list.__ownerID) { + list.size = newCapacity - newOrigin; + list._origin = newOrigin; + list._capacity = newCapacity; + list._level = newLevel; + list._root = newRoot; + list._tail = newTail; + list.__hash = undefined; + list.__altered = true; + return list; + } + return makeList(newOrigin, newCapacity, newLevel, newRoot, newTail); + } + + function mergeIntoListWith(list, merger, iterables) { + var iters = []; + var maxSize = 0; + for (var ii = 0; ii < iterables.length; ii++) { + var value = iterables[ii]; + var iter = IndexedIterable(value); + if (iter.size > maxSize) { + maxSize = iter.size; + } + if (!isIterable(value)) { + iter = iter.map(function (v) { + return fromJS(v); + }); + } + iters.push(iter); + } + if (maxSize > list.size) { + list = list.setSize(maxSize); + } + return mergeIntoCollectionWith(list, merger, iters); + } + + function getTailOffset(size) { + return size < SIZE ? 0 : ((size - 1) >>> SHIFT) << SHIFT; + } + + createClass(OrderedMap, Map); + + // @pragma Construction + + function OrderedMap(value) { + return value === null || value === undefined + ? emptyOrderedMap() + : isOrderedMap(value) + ? value + : emptyOrderedMap().withMutations(function (map) { + var iter = KeyedIterable(value); + assertNotInfinite(iter.size); + iter.forEach(function (v, k) { + return map.set(k, v); + }); + }); + } + + OrderedMap.of = function (/*...values*/) { + return this(arguments); + }; + + OrderedMap.prototype.toString = function () { + return this.__toString('OrderedMap {', '}'); + }; + + // @pragma Access + + OrderedMap.prototype.get = function (k, notSetValue) { + var index = this._map.get(k); + return index !== undefined ? this._list.get(index)[1] : notSetValue; + }; + + // @pragma Modification + + OrderedMap.prototype.clear = function () { + if (this.size === 0) { + return this; + } + if (this.__ownerID) { + this.size = 0; + this._map.clear(); + this._list.clear(); + return this; + } + return emptyOrderedMap(); + }; + + OrderedMap.prototype.set = function (k, v) { + return updateOrderedMap(this, k, v); + }; + + OrderedMap.prototype.remove = function (k) { + return updateOrderedMap(this, k, NOT_SET); + }; + + OrderedMap.prototype.wasAltered = function () { + return this._map.wasAltered() || this._list.wasAltered(); + }; + + OrderedMap.prototype.__iterate = function (fn, reverse) { + var this$0 = this; + return this._list.__iterate(function (entry) { + return entry && fn(entry[1], entry[0], this$0); + }, reverse); + }; + + OrderedMap.prototype.__iterator = function (type, reverse) { + return this._list.fromEntrySeq().__iterator(type, reverse); + }; + + OrderedMap.prototype.__ensureOwner = function (ownerID) { + if (ownerID === this.__ownerID) { + return this; + } + var newMap = this._map.__ensureOwner(ownerID); + var newList = this._list.__ensureOwner(ownerID); + if (!ownerID) { + this.__ownerID = ownerID; + this._map = newMap; + this._list = newList; + return this; + } + return makeOrderedMap(newMap, newList, ownerID, this.__hash); + }; + + function isOrderedMap(maybeOrderedMap) { + return isMap(maybeOrderedMap) && isOrdered(maybeOrderedMap); + } + + OrderedMap.isOrderedMap = isOrderedMap; + + OrderedMap.prototype[IS_ORDERED_SENTINEL] = true; + OrderedMap.prototype[DELETE] = OrderedMap.prototype.remove; + + function makeOrderedMap(map, list, ownerID, hash) { + var omap = Object.create(OrderedMap.prototype); + omap.size = map ? map.size : 0; + omap._map = map; + omap._list = list; + omap.__ownerID = ownerID; + omap.__hash = hash; + return omap; + } + + var EMPTY_ORDERED_MAP; + function emptyOrderedMap() { + return EMPTY_ORDERED_MAP || (EMPTY_ORDERED_MAP = makeOrderedMap(emptyMap(), emptyList())); + } + + function updateOrderedMap(omap, k, v) { + var map = omap._map; + var list = omap._list; + var i = map.get(k); + var has = i !== undefined; + var newMap; + var newList; + if (v === NOT_SET) { + // removed + if (!has) { + return omap; + } + if (list.size >= SIZE && list.size >= map.size * 2) { + newList = list.filter(function (entry, idx) { + return entry !== undefined && i !== idx; + }); + newMap = newList + .toKeyedSeq() + .map(function (entry) { + return entry[0]; + }) + .flip() + .toMap(); + if (omap.__ownerID) { + newMap.__ownerID = newList.__ownerID = omap.__ownerID; + } + } else { + newMap = map.remove(k); + newList = i === list.size - 1 ? list.pop() : list.set(i, undefined); + } + } else { + if (has) { + if (v === list.get(i)[1]) { + return omap; + } + newMap = map; + newList = list.set(i, [k, v]); + } else { + newMap = map.set(k, list.size); + newList = list.set(list.size, [k, v]); + } + } + if (omap.__ownerID) { + omap.size = newMap.size; + omap._map = newMap; + omap._list = newList; + omap.__hash = undefined; + return omap; + } + return makeOrderedMap(newMap, newList); + } + + createClass(ToKeyedSequence, KeyedSeq); + function ToKeyedSequence(indexed, useKeys) { + this._iter = indexed; + this._useKeys = useKeys; + this.size = indexed.size; + } + + ToKeyedSequence.prototype.get = function (key, notSetValue) { + return this._iter.get(key, notSetValue); + }; + + ToKeyedSequence.prototype.has = function (key) { + return this._iter.has(key); + }; + + ToKeyedSequence.prototype.valueSeq = function () { + return this._iter.valueSeq(); + }; + + ToKeyedSequence.prototype.reverse = function () { + var this$0 = this; + var reversedSequence = reverseFactory(this, true); + if (!this._useKeys) { + reversedSequence.valueSeq = function () { + return this$0._iter.toSeq().reverse(); + }; + } + return reversedSequence; + }; + + ToKeyedSequence.prototype.map = function (mapper, context) { + var this$0 = this; + var mappedSequence = mapFactory(this, mapper, context); + if (!this._useKeys) { + mappedSequence.valueSeq = function () { + return this$0._iter.toSeq().map(mapper, context); + }; + } + return mappedSequence; + }; + + ToKeyedSequence.prototype.__iterate = function (fn, reverse) { + var this$0 = this; + var ii; + return this._iter.__iterate( + this._useKeys + ? function (v, k) { + return fn(v, k, this$0); + } + : ((ii = reverse ? resolveSize(this) : 0), + function (v) { + return fn(v, reverse ? --ii : ii++, this$0); + }), + reverse, + ); + }; + + ToKeyedSequence.prototype.__iterator = function (type, reverse) { + if (this._useKeys) { + return this._iter.__iterator(type, reverse); + } + var iterator = this._iter.__iterator(ITERATE_VALUES, reverse); + var ii = reverse ? resolveSize(this) : 0; + return new Iterator(function () { + var step = iterator.next(); + return step.done ? step : iteratorValue(type, reverse ? --ii : ii++, step.value, step); + }); + }; + + ToKeyedSequence.prototype[IS_ORDERED_SENTINEL] = true; + + createClass(ToIndexedSequence, IndexedSeq); + function ToIndexedSequence(iter) { + this._iter = iter; + this.size = iter.size; + } + + ToIndexedSequence.prototype.includes = function (value) { + return this._iter.includes(value); + }; + + ToIndexedSequence.prototype.__iterate = function (fn, reverse) { + var this$0 = this; + var iterations = 0; + return this._iter.__iterate(function (v) { + return fn(v, iterations++, this$0); + }, reverse); + }; + + ToIndexedSequence.prototype.__iterator = function (type, reverse) { + var iterator = this._iter.__iterator(ITERATE_VALUES, reverse); + var iterations = 0; + return new Iterator(function () { + var step = iterator.next(); + return step.done ? step : iteratorValue(type, iterations++, step.value, step); + }); + }; + + createClass(ToSetSequence, SetSeq); + function ToSetSequence(iter) { + this._iter = iter; + this.size = iter.size; + } + + ToSetSequence.prototype.has = function (key) { + return this._iter.includes(key); + }; + + ToSetSequence.prototype.__iterate = function (fn, reverse) { + var this$0 = this; + return this._iter.__iterate(function (v) { + return fn(v, v, this$0); + }, reverse); + }; + + ToSetSequence.prototype.__iterator = function (type, reverse) { + var iterator = this._iter.__iterator(ITERATE_VALUES, reverse); + return new Iterator(function () { + var step = iterator.next(); + return step.done ? step : iteratorValue(type, step.value, step.value, step); + }); + }; + + createClass(FromEntriesSequence, KeyedSeq); + function FromEntriesSequence(entries) { + this._iter = entries; + this.size = entries.size; + } + + FromEntriesSequence.prototype.entrySeq = function () { + return this._iter.toSeq(); + }; + + FromEntriesSequence.prototype.__iterate = function (fn, reverse) { + var this$0 = this; + return this._iter.__iterate(function (entry) { + // Check if entry exists first so array access doesn't throw for holes + // in the parent iteration. + if (entry) { + validateEntry(entry); + var indexedIterable = isIterable(entry); + return fn( + indexedIterable ? entry.get(1) : entry[1], + indexedIterable ? entry.get(0) : entry[0], + this$0, + ); + } + }, reverse); + }; + + FromEntriesSequence.prototype.__iterator = function (type, reverse) { + var iterator = this._iter.__iterator(ITERATE_VALUES, reverse); + return new Iterator(function () { + while (true) { + var step = iterator.next(); + if (step.done) { + return step; + } + var entry = step.value; + // Check if entry exists first so array access doesn't throw for holes + // in the parent iteration. + if (entry) { + validateEntry(entry); + var indexedIterable = isIterable(entry); + return iteratorValue( + type, + indexedIterable ? entry.get(0) : entry[0], + indexedIterable ? entry.get(1) : entry[1], + step, + ); + } + } + }); + }; + + ToIndexedSequence.prototype.cacheResult = + ToKeyedSequence.prototype.cacheResult = + ToSetSequence.prototype.cacheResult = + FromEntriesSequence.prototype.cacheResult = + cacheResultThrough; + + function flipFactory(iterable) { + var flipSequence = makeSequence(iterable); + flipSequence._iter = iterable; + flipSequence.size = iterable.size; + flipSequence.flip = function () { + return iterable; + }; + flipSequence.reverse = function () { + var reversedSequence = iterable.reverse.apply(this); // super.reverse() + reversedSequence.flip = function () { + return iterable.reverse(); + }; + return reversedSequence; + }; + flipSequence.has = function (key) { + return iterable.includes(key); + }; + flipSequence.includes = function (key) { + return iterable.has(key); + }; + flipSequence.cacheResult = cacheResultThrough; + flipSequence.__iterateUncached = function (fn, reverse) { + var this$0 = this; + return iterable.__iterate(function (v, k) { + return fn(k, v, this$0) !== false; + }, reverse); + }; + flipSequence.__iteratorUncached = function (type, reverse) { + if (type === ITERATE_ENTRIES) { + var iterator = iterable.__iterator(type, reverse); + return new Iterator(function () { + var step = iterator.next(); + if (!step.done) { + var k = step.value[0]; + step.value[0] = step.value[1]; + step.value[1] = k; + } + return step; + }); + } + return iterable.__iterator(type === ITERATE_VALUES ? ITERATE_KEYS : ITERATE_VALUES, reverse); + }; + return flipSequence; + } + + function mapFactory(iterable, mapper, context) { + var mappedSequence = makeSequence(iterable); + mappedSequence.size = iterable.size; + mappedSequence.has = function (key) { + return iterable.has(key); + }; + mappedSequence.get = function (key, notSetValue) { + var v = iterable.get(key, NOT_SET); + return v === NOT_SET ? notSetValue : mapper.call(context, v, key, iterable); + }; + mappedSequence.__iterateUncached = function (fn, reverse) { + var this$0 = this; + return iterable.__iterate(function (v, k, c) { + return fn(mapper.call(context, v, k, c), k, this$0) !== false; + }, reverse); + }; + mappedSequence.__iteratorUncached = function (type, reverse) { + var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse); + return new Iterator(function () { + var step = iterator.next(); + if (step.done) { + return step; + } + var entry = step.value; + var key = entry[0]; + return iteratorValue(type, key, mapper.call(context, entry[1], key, iterable), step); + }); + }; + return mappedSequence; + } + + function reverseFactory(iterable, useKeys) { + var reversedSequence = makeSequence(iterable); + reversedSequence._iter = iterable; + reversedSequence.size = iterable.size; + reversedSequence.reverse = function () { + return iterable; + }; + if (iterable.flip) { + reversedSequence.flip = function () { + var flipSequence = flipFactory(iterable); + flipSequence.reverse = function () { + return iterable.flip(); + }; + return flipSequence; + }; + } + reversedSequence.get = function (key, notSetValue) { + return iterable.get(useKeys ? key : -1 - key, notSetValue); + }; + reversedSequence.has = function (key) { + return iterable.has(useKeys ? key : -1 - key); + }; + reversedSequence.includes = function (value) { + return iterable.includes(value); + }; + reversedSequence.cacheResult = cacheResultThrough; + reversedSequence.__iterate = function (fn, reverse) { + var this$0 = this; + return iterable.__iterate(function (v, k) { + return fn(v, k, this$0); + }, !reverse); + }; + reversedSequence.__iterator = function (type, reverse) { + return iterable.__iterator(type, !reverse); + }; + return reversedSequence; + } + + function filterFactory(iterable, predicate, context, useKeys) { + var filterSequence = makeSequence(iterable); + if (useKeys) { + filterSequence.has = function (key) { + var v = iterable.get(key, NOT_SET); + return v !== NOT_SET && !!predicate.call(context, v, key, iterable); + }; + filterSequence.get = function (key, notSetValue) { + var v = iterable.get(key, NOT_SET); + return v !== NOT_SET && predicate.call(context, v, key, iterable) ? v : notSetValue; + }; + } + filterSequence.__iterateUncached = function (fn, reverse) { + var this$0 = this; + var iterations = 0; + iterable.__iterate(function (v, k, c) { + if (predicate.call(context, v, k, c)) { + iterations++; + return fn(v, useKeys ? k : iterations - 1, this$0); + } + }, reverse); + return iterations; + }; + filterSequence.__iteratorUncached = function (type, reverse) { + var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse); + var iterations = 0; + return new Iterator(function () { + while (true) { + var step = iterator.next(); + if (step.done) { + return step; + } + var entry = step.value; + var key = entry[0]; + var value = entry[1]; + if (predicate.call(context, value, key, iterable)) { + return iteratorValue(type, useKeys ? key : iterations++, value, step); + } + } + }); + }; + return filterSequence; + } + + function countByFactory(iterable, grouper, context) { + var groups = Map().asMutable(); + iterable.__iterate(function (v, k) { + groups.update(grouper.call(context, v, k, iterable), 0, function (a) { + return a + 1; + }); + }); + return groups.asImmutable(); + } + + function groupByFactory(iterable, grouper, context) { + var isKeyedIter = isKeyed(iterable); + var groups = (isOrdered(iterable) ? OrderedMap() : Map()).asMutable(); + iterable.__iterate(function (v, k) { + groups.update(grouper.call(context, v, k, iterable), function (a) { + return (a = a || []), a.push(isKeyedIter ? [k, v] : v), a; + }); + }); + var coerce = iterableClass(iterable); + return groups.map(function (arr) { + return reify(iterable, coerce(arr)); + }); + } + + function sliceFactory(iterable, begin, end, useKeys) { + var originalSize = iterable.size; + + // Sanitize begin & end using this shorthand for ToInt32(argument) + // http://www.ecma-international.org/ecma-262/6.0/#sec-toint32 + if (begin !== undefined) { + begin = begin | 0; + } + if (end !== undefined) { + if (end === Infinity) { + end = originalSize; + } else { + end = end | 0; + } + } + + if (wholeSlice(begin, end, originalSize)) { + return iterable; + } + + var resolvedBegin = resolveBegin(begin, originalSize); + var resolvedEnd = resolveEnd(end, originalSize); + + // begin or end will be NaN if they were provided as negative numbers and + // this iterable's size is unknown. In that case, cache first so there is + // a known size and these do not resolve to NaN. + if (resolvedBegin !== resolvedBegin || resolvedEnd !== resolvedEnd) { + return sliceFactory(iterable.toSeq().cacheResult(), begin, end, useKeys); + } + + // Note: resolvedEnd is undefined when the original sequence's length is + // unknown and this slice did not supply an end and should contain all + // elements after resolvedBegin. + // In that case, resolvedSize will be NaN and sliceSize will remain undefined. + var resolvedSize = resolvedEnd - resolvedBegin; + var sliceSize; + if (resolvedSize === resolvedSize) { + sliceSize = resolvedSize < 0 ? 0 : resolvedSize; + } + + var sliceSeq = makeSequence(iterable); + + // If iterable.size is undefined, the size of the realized sliceSeq is + // unknown at this point unless the number of items to slice is 0 + sliceSeq.size = sliceSize === 0 ? sliceSize : (iterable.size && sliceSize) || undefined; + + if (!useKeys && isSeq(iterable) && sliceSize >= 0) { + sliceSeq.get = function (index, notSetValue) { + index = wrapIndex(this, index); + return index >= 0 && index < sliceSize + ? iterable.get(index + resolvedBegin, notSetValue) + : notSetValue; + }; + } + + sliceSeq.__iterateUncached = function (fn, reverse) { + var this$0 = this; + if (sliceSize === 0) { + return 0; + } + if (reverse) { + return this.cacheResult().__iterate(fn, reverse); + } + var skipped = 0; + var isSkipping = true; + var iterations = 0; + iterable.__iterate(function (v, k) { + if (!(isSkipping && (isSkipping = skipped++ < resolvedBegin))) { + iterations++; + return fn(v, useKeys ? k : iterations - 1, this$0) !== false && iterations !== sliceSize; + } + }); + return iterations; + }; + + sliceSeq.__iteratorUncached = function (type, reverse) { + if (sliceSize !== 0 && reverse) { + return this.cacheResult().__iterator(type, reverse); + } + // Don't bother instantiating parent iterator if taking 0. + var iterator = sliceSize !== 0 && iterable.__iterator(type, reverse); + var skipped = 0; + var iterations = 0; + return new Iterator(function () { + while (skipped++ < resolvedBegin) { + iterator.next(); + } + if (++iterations > sliceSize) { + return iteratorDone(); + } + var step = iterator.next(); + if (useKeys || type === ITERATE_VALUES) { + return step; + } else if (type === ITERATE_KEYS) { + return iteratorValue(type, iterations - 1, undefined, step); + } else { + return iteratorValue(type, iterations - 1, step.value[1], step); + } + }); + }; + + return sliceSeq; + } + + function takeWhileFactory(iterable, predicate, context) { + var takeSequence = makeSequence(iterable); + takeSequence.__iterateUncached = function (fn, reverse) { + var this$0 = this; + if (reverse) { + return this.cacheResult().__iterate(fn, reverse); + } + var iterations = 0; + iterable.__iterate(function (v, k, c) { + return predicate.call(context, v, k, c) && ++iterations && fn(v, k, this$0); + }); + return iterations; + }; + takeSequence.__iteratorUncached = function (type, reverse) { + var this$0 = this; + if (reverse) { + return this.cacheResult().__iterator(type, reverse); + } + var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse); + var iterating = true; + return new Iterator(function () { + if (!iterating) { + return iteratorDone(); + } + var step = iterator.next(); + if (step.done) { + return step; + } + var entry = step.value; + var k = entry[0]; + var v = entry[1]; + if (!predicate.call(context, v, k, this$0)) { + iterating = false; + return iteratorDone(); + } + return type === ITERATE_ENTRIES ? step : iteratorValue(type, k, v, step); + }); + }; + return takeSequence; + } + + function skipWhileFactory(iterable, predicate, context, useKeys) { + var skipSequence = makeSequence(iterable); + skipSequence.__iterateUncached = function (fn, reverse) { + var this$0 = this; + if (reverse) { + return this.cacheResult().__iterate(fn, reverse); + } + var isSkipping = true; + var iterations = 0; + iterable.__iterate(function (v, k, c) { + if (!(isSkipping && (isSkipping = predicate.call(context, v, k, c)))) { + iterations++; + return fn(v, useKeys ? k : iterations - 1, this$0); + } + }); + return iterations; + }; + skipSequence.__iteratorUncached = function (type, reverse) { + var this$0 = this; + if (reverse) { + return this.cacheResult().__iterator(type, reverse); + } + var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse); + var skipping = true; + var iterations = 0; + return new Iterator(function () { + var step, k, v; + do { + step = iterator.next(); + if (step.done) { + if (useKeys || type === ITERATE_VALUES) { + return step; + } else if (type === ITERATE_KEYS) { + return iteratorValue(type, iterations++, undefined, step); + } else { + return iteratorValue(type, iterations++, step.value[1], step); + } + } + var entry = step.value; + k = entry[0]; + v = entry[1]; + skipping && (skipping = predicate.call(context, v, k, this$0)); + } while (skipping); + return type === ITERATE_ENTRIES ? step : iteratorValue(type, k, v, step); + }); + }; + return skipSequence; + } + + function concatFactory(iterable, values) { + var isKeyedIterable = isKeyed(iterable); + var iters = [iterable] + .concat(values) + .map(function (v) { + if (!isIterable(v)) { + v = isKeyedIterable ? keyedSeqFromValue(v) : indexedSeqFromValue(Array.isArray(v) ? v : [v]); + } else if (isKeyedIterable) { + v = KeyedIterable(v); + } + return v; + }) + .filter(function (v) { + return v.size !== 0; + }); + + if (iters.length === 0) { + return iterable; + } + + if (iters.length === 1) { + var singleton = iters[0]; + if ( + singleton === iterable || + (isKeyedIterable && isKeyed(singleton)) || + (isIndexed(iterable) && isIndexed(singleton)) + ) { + return singleton; + } + } + + var concatSeq = new ArraySeq(iters); + if (isKeyedIterable) { + concatSeq = concatSeq.toKeyedSeq(); + } else if (!isIndexed(iterable)) { + concatSeq = concatSeq.toSetSeq(); + } + concatSeq = concatSeq.flatten(true); + concatSeq.size = iters.reduce(function (sum, seq) { + if (sum !== undefined) { + var size = seq.size; + if (size !== undefined) { + return sum + size; + } + } + }, 0); + return concatSeq; + } + + function flattenFactory(iterable, depth, useKeys) { + var flatSequence = makeSequence(iterable); + flatSequence.__iterateUncached = function (fn, reverse) { + var iterations = 0; + var stopped = false; + function flatDeep(iter, currentDepth) { + var this$0 = this; + iter.__iterate(function (v, k) { + if ((!depth || currentDepth < depth) && isIterable(v)) { + flatDeep(v, currentDepth + 1); + } else if (fn(v, useKeys ? k : iterations++, this$0) === false) { + stopped = true; + } + return !stopped; + }, reverse); + } + flatDeep(iterable, 0); + return iterations; + }; + flatSequence.__iteratorUncached = function (type, reverse) { + var iterator = iterable.__iterator(type, reverse); + var stack = []; + var iterations = 0; + return new Iterator(function () { + while (iterator) { + var step = iterator.next(); + if (step.done !== false) { + iterator = stack.pop(); + continue; + } + var v = step.value; + if (type === ITERATE_ENTRIES) { + v = v[1]; + } + if ((!depth || stack.length < depth) && isIterable(v)) { + stack.push(iterator); + iterator = v.__iterator(type, reverse); + } else { + return useKeys ? step : iteratorValue(type, iterations++, v, step); + } + } + return iteratorDone(); + }); + }; + return flatSequence; + } + + function flatMapFactory(iterable, mapper, context) { + var coerce = iterableClass(iterable); + return iterable + .toSeq() + .map(function (v, k) { + return coerce(mapper.call(context, v, k, iterable)); + }) + .flatten(true); + } + + function interposeFactory(iterable, separator) { + var interposedSequence = makeSequence(iterable); + interposedSequence.size = iterable.size && iterable.size * 2 - 1; + interposedSequence.__iterateUncached = function (fn, reverse) { + var this$0 = this; + var iterations = 0; + iterable.__iterate(function (v, k) { + return ( + (!iterations || fn(separator, iterations++, this$0) !== false) && + fn(v, iterations++, this$0) !== false + ); + }, reverse); + return iterations; + }; + interposedSequence.__iteratorUncached = function (type, reverse) { + var iterator = iterable.__iterator(ITERATE_VALUES, reverse); + var iterations = 0; + var step; + return new Iterator(function () { + if (!step || iterations % 2) { + step = iterator.next(); + if (step.done) { + return step; + } + } + return iterations % 2 + ? iteratorValue(type, iterations++, separator) + : iteratorValue(type, iterations++, step.value, step); + }); + }; + return interposedSequence; + } + + function sortFactory(iterable, comparator, mapper) { + if (!comparator) { + comparator = defaultComparator; + } + var isKeyedIterable = isKeyed(iterable); + var index = 0; + var entries = iterable + .toSeq() + .map(function (v, k) { + return [k, v, index++, mapper ? mapper(v, k, iterable) : v]; + }) + .toArray(); + entries + .sort(function (a, b) { + return comparator(a[3], b[3]) || a[2] - b[2]; + }) + .forEach( + isKeyedIterable + ? function (v, i) { + entries[i].length = 2; + } + : function (v, i) { + entries[i] = v[1]; + }, + ); + return isKeyedIterable + ? KeyedSeq(entries) + : isIndexed(iterable) + ? IndexedSeq(entries) + : SetSeq(entries); + } + + function maxFactory(iterable, comparator, mapper) { + if (!comparator) { + comparator = defaultComparator; + } + if (mapper) { + var entry = iterable + .toSeq() + .map(function (v, k) { + return [v, mapper(v, k, iterable)]; + }) + .reduce(function (a, b) { + return maxCompare(comparator, a[1], b[1]) ? b : a; + }); + return entry && entry[0]; + } else { + return iterable.reduce(function (a, b) { + return maxCompare(comparator, a, b) ? b : a; + }); + } + } + + function maxCompare(comparator, a, b) { + var comp = comparator(b, a); + // b is considered the new max if the comparator declares them equal, but + // they are not equal and b is in fact a nullish value. + return (comp === 0 && b !== a && (b === undefined || b === null || b !== b)) || comp > 0; + } + + function zipWithFactory(keyIter, zipper, iters) { + var zipSequence = makeSequence(keyIter); + zipSequence.size = new ArraySeq(iters) + .map(function (i) { + return i.size; + }) + .min(); + // Note: this a generic base implementation of __iterate in terms of + // __iterator which may be more generically useful in the future. + zipSequence.__iterate = function (fn, reverse) { + /* generic: + var iterator = this.__iterator(ITERATE_ENTRIES, reverse); + var step; + var iterations = 0; + while (!(step = iterator.next()).done) { + iterations++; + if (fn(step.value[1], step.value[0], this) === false) { + break; + } + } + return iterations; + */ + // indexed: + var iterator = this.__iterator(ITERATE_VALUES, reverse); + var step; + var iterations = 0; + while (!(step = iterator.next()).done) { + if (fn(step.value, iterations++, this) === false) { + break; + } + } + return iterations; + }; + zipSequence.__iteratorUncached = function (type, reverse) { + var iterators = iters.map(function (i) { + return (i = Iterable(i)), getIterator(reverse ? i.reverse() : i); + }); + var iterations = 0; + var isDone = false; + return new Iterator(function () { + var steps; + if (!isDone) { + steps = iterators.map(function (i) { + return i.next(); + }); + isDone = steps.some(function (s) { + return s.done; + }); + } + if (isDone) { + return iteratorDone(); + } + return iteratorValue( + type, + iterations++, + zipper.apply( + null, + steps.map(function (s) { + return s.value; + }), + ), + ); + }); + }; + return zipSequence; + } + + // #pragma Helper Functions + + function reify(iter, seq) { + return isSeq(iter) ? seq : iter.constructor(seq); + } + + function validateEntry(entry) { + if (entry !== Object(entry)) { + throw new TypeError('Expected [K, V] tuple: ' + entry); + } + } + + function resolveSize(iter) { + assertNotInfinite(iter.size); + return ensureSize(iter); + } + + function iterableClass(iterable) { + return isKeyed(iterable) ? KeyedIterable : isIndexed(iterable) ? IndexedIterable : SetIterable; + } + + function makeSequence(iterable) { + return Object.create( + (isKeyed(iterable) ? KeyedSeq : isIndexed(iterable) ? IndexedSeq : SetSeq).prototype, + ); + } + + function cacheResultThrough() { + if (this._iter.cacheResult) { + this._iter.cacheResult(); + this.size = this._iter.size; + return this; + } else { + return Seq.prototype.cacheResult.call(this); + } + } + + function defaultComparator(a, b) { + return a > b ? 1 : a < b ? -1 : 0; + } + + function forceIterator(keyPath) { + var iter = getIterator(keyPath); + if (!iter) { + // Array might not be iterable in this environment, so we need a fallback + // to our wrapped type. + if (!isArrayLike(keyPath)) { + throw new TypeError('Expected iterable or array-like: ' + keyPath); + } + iter = getIterator(Iterable(keyPath)); + } + return iter; + } + + createClass(Record, KeyedCollection); + + function Record(defaultValues, name) { + var hasInitialized; + + var RecordType = function Record(values) { + if (values instanceof RecordType) { + return values; + } + if (!(this instanceof RecordType)) { + return new RecordType(values); + } + if (!hasInitialized) { + hasInitialized = true; + var keys = Object.keys(defaultValues); + setProps(RecordTypePrototype, keys); + RecordTypePrototype.size = keys.length; + RecordTypePrototype._name = name; + RecordTypePrototype._keys = keys; + RecordTypePrototype._defaultValues = defaultValues; + } + this._map = Map(values); + }; + + var RecordTypePrototype = (RecordType.prototype = Object.create(RecordPrototype)); + RecordTypePrototype.constructor = RecordType; + + return RecordType; + } + + Record.prototype.toString = function () { + return this.__toString(recordName(this) + ' {', '}'); + }; + + // @pragma Access + + Record.prototype.has = function (k) { + return this._defaultValues.hasOwnProperty(k); + }; + + Record.prototype.get = function (k, notSetValue) { + if (!this.has(k)) { + return notSetValue; + } + var defaultVal = this._defaultValues[k]; + return this._map ? this._map.get(k, defaultVal) : defaultVal; + }; + + // @pragma Modification + + Record.prototype.clear = function () { + if (this.__ownerID) { + this._map && this._map.clear(); + return this; + } + var RecordType = this.constructor; + return RecordType._empty || (RecordType._empty = makeRecord(this, emptyMap())); + }; + + Record.prototype.set = function (k, v) { + if (!this.has(k)) { + throw new Error('Cannot set unknown key "' + k + '" on ' + recordName(this)); + } + if (this._map && !this._map.has(k)) { + var defaultVal = this._defaultValues[k]; + if (v === defaultVal) { + return this; + } + } + var newMap = this._map && this._map.set(k, v); + if (this.__ownerID || newMap === this._map) { + return this; + } + return makeRecord(this, newMap); + }; + + Record.prototype.remove = function (k) { + if (!this.has(k)) { + return this; + } + var newMap = this._map && this._map.remove(k); + if (this.__ownerID || newMap === this._map) { + return this; + } + return makeRecord(this, newMap); + }; + + Record.prototype.wasAltered = function () { + return this._map.wasAltered(); + }; + + Record.prototype.__iterator = function (type, reverse) { + var this$0 = this; + return KeyedIterable(this._defaultValues) + .map(function (_, k) { + return this$0.get(k); + }) + .__iterator(type, reverse); + }; + + Record.prototype.__iterate = function (fn, reverse) { + var this$0 = this; + return KeyedIterable(this._defaultValues) + .map(function (_, k) { + return this$0.get(k); + }) + .__iterate(fn, reverse); + }; + + Record.prototype.__ensureOwner = function (ownerID) { + if (ownerID === this.__ownerID) { + return this; + } + var newMap = this._map && this._map.__ensureOwner(ownerID); + if (!ownerID) { + this.__ownerID = ownerID; + this._map = newMap; + return this; + } + return makeRecord(this, newMap, ownerID); + }; + + var RecordPrototype = Record.prototype; + RecordPrototype[DELETE] = RecordPrototype.remove; + RecordPrototype.deleteIn = RecordPrototype.removeIn = MapPrototype.removeIn; + RecordPrototype.merge = MapPrototype.merge; + RecordPrototype.mergeWith = MapPrototype.mergeWith; + RecordPrototype.mergeIn = MapPrototype.mergeIn; + RecordPrototype.mergeDeep = MapPrototype.mergeDeep; + RecordPrototype.mergeDeepWith = MapPrototype.mergeDeepWith; + RecordPrototype.mergeDeepIn = MapPrototype.mergeDeepIn; + RecordPrototype.setIn = MapPrototype.setIn; + RecordPrototype.update = MapPrototype.update; + RecordPrototype.updateIn = MapPrototype.updateIn; + RecordPrototype.withMutations = MapPrototype.withMutations; + RecordPrototype.asMutable = MapPrototype.asMutable; + RecordPrototype.asImmutable = MapPrototype.asImmutable; + + function makeRecord(likeRecord, map, ownerID) { + var record = Object.create(Object.getPrototypeOf(likeRecord)); + record._map = map; + record.__ownerID = ownerID; + return record; + } + + function recordName(record) { + return record._name || record.constructor.name || 'Record'; + } + + function setProps(prototype, names) { + try { + names.forEach(setProp.bind(undefined, prototype)); + } catch (error) { + // Object.defineProperty failed. Probably IE8. + } + } + + function setProp(prototype, name) { + Object.defineProperty(prototype, name, { + get: function () { + return this.get(name); + }, + set: function (value) { + invariant(this.__ownerID, 'Cannot set on an immutable record.'); + this.set(name, value); + }, + }); + } + + createClass(Set, SetCollection); + + // @pragma Construction + + function Set(value) { + return value === null || value === undefined + ? emptySet() + : isSet(value) && !isOrdered(value) + ? value + : emptySet().withMutations(function (set) { + var iter = SetIterable(value); + assertNotInfinite(iter.size); + iter.forEach(function (v) { + return set.add(v); + }); + }); + } + + Set.of = function (/*...values*/) { + return this(arguments); + }; + + Set.fromKeys = function (value) { + return this(KeyedIterable(value).keySeq()); + }; + + Set.prototype.toString = function () { + return this.__toString('Set {', '}'); + }; + + // @pragma Access + + Set.prototype.has = function (value) { + return this._map.has(value); + }; + + // @pragma Modification + + Set.prototype.add = function (value) { + return updateSet(this, this._map.set(value, true)); + }; + + Set.prototype.remove = function (value) { + return updateSet(this, this._map.remove(value)); + }; + + Set.prototype.clear = function () { + return updateSet(this, this._map.clear()); + }; + + // @pragma Composition + + Set.prototype.union = function () { + var iters = SLICE$0.call(arguments, 0); + iters = iters.filter(function (x) { + return x.size !== 0; + }); + if (iters.length === 0) { + return this; + } + if (this.size === 0 && !this.__ownerID && iters.length === 1) { + return this.constructor(iters[0]); + } + return this.withMutations(function (set) { + for (var ii = 0; ii < iters.length; ii++) { + SetIterable(iters[ii]).forEach(function (value) { + return set.add(value); + }); + } + }); + }; + + Set.prototype.intersect = function () { + var iters = SLICE$0.call(arguments, 0); + if (iters.length === 0) { + return this; + } + iters = iters.map(function (iter) { + return SetIterable(iter); + }); + var originalSet = this; + return this.withMutations(function (set) { + originalSet.forEach(function (value) { + if ( + !iters.every(function (iter) { + return iter.includes(value); + }) + ) { + set.remove(value); + } + }); + }); + }; + + Set.prototype.subtract = function () { + var iters = SLICE$0.call(arguments, 0); + if (iters.length === 0) { + return this; + } + iters = iters.map(function (iter) { + return SetIterable(iter); + }); + var originalSet = this; + return this.withMutations(function (set) { + originalSet.forEach(function (value) { + if ( + iters.some(function (iter) { + return iter.includes(value); + }) + ) { + set.remove(value); + } + }); + }); + }; + + Set.prototype.merge = function () { + return this.union.apply(this, arguments); + }; + + Set.prototype.mergeWith = function (merger) { + var iters = SLICE$0.call(arguments, 1); + return this.union.apply(this, iters); + }; + + Set.prototype.sort = function (comparator) { + // Late binding + return OrderedSet(sortFactory(this, comparator)); + }; + + Set.prototype.sortBy = function (mapper, comparator) { + // Late binding + return OrderedSet(sortFactory(this, comparator, mapper)); + }; + + Set.prototype.wasAltered = function () { + return this._map.wasAltered(); + }; + + Set.prototype.__iterate = function (fn, reverse) { + var this$0 = this; + return this._map.__iterate(function (_, k) { + return fn(k, k, this$0); + }, reverse); + }; + + Set.prototype.__iterator = function (type, reverse) { + return this._map + .map(function (_, k) { + return k; + }) + .__iterator(type, reverse); + }; + + Set.prototype.__ensureOwner = function (ownerID) { + if (ownerID === this.__ownerID) { + return this; + } + var newMap = this._map.__ensureOwner(ownerID); + if (!ownerID) { + this.__ownerID = ownerID; + this._map = newMap; + return this; + } + return this.__make(newMap, ownerID); + }; + + function isSet(maybeSet) { + return !!(maybeSet && maybeSet[IS_SET_SENTINEL]); + } + + Set.isSet = isSet; + + var IS_SET_SENTINEL = '@@__IMMUTABLE_SET__@@'; + + var SetPrototype = Set.prototype; + SetPrototype[IS_SET_SENTINEL] = true; + SetPrototype[DELETE] = SetPrototype.remove; + SetPrototype.mergeDeep = SetPrototype.merge; + SetPrototype.mergeDeepWith = SetPrototype.mergeWith; + SetPrototype.withMutations = MapPrototype.withMutations; + SetPrototype.asMutable = MapPrototype.asMutable; + SetPrototype.asImmutable = MapPrototype.asImmutable; + + SetPrototype.__empty = emptySet; + SetPrototype.__make = makeSet; + + function updateSet(set, newMap) { + if (set.__ownerID) { + set.size = newMap.size; + set._map = newMap; + return set; + } + return newMap === set._map ? set : newMap.size === 0 ? set.__empty() : set.__make(newMap); + } + + function makeSet(map, ownerID) { + var set = Object.create(SetPrototype); + set.size = map ? map.size : 0; + set._map = map; + set.__ownerID = ownerID; + return set; + } + + var EMPTY_SET; + function emptySet() { + return EMPTY_SET || (EMPTY_SET = makeSet(emptyMap())); + } + + createClass(OrderedSet, Set); + + // @pragma Construction + + function OrderedSet(value) { + return value === null || value === undefined + ? emptyOrderedSet() + : isOrderedSet(value) + ? value + : emptyOrderedSet().withMutations(function (set) { + var iter = SetIterable(value); + assertNotInfinite(iter.size); + iter.forEach(function (v) { + return set.add(v); + }); + }); + } + + OrderedSet.of = function (/*...values*/) { + return this(arguments); + }; + + OrderedSet.fromKeys = function (value) { + return this(KeyedIterable(value).keySeq()); + }; + + OrderedSet.prototype.toString = function () { + return this.__toString('OrderedSet {', '}'); + }; + + function isOrderedSet(maybeOrderedSet) { + return isSet(maybeOrderedSet) && isOrdered(maybeOrderedSet); + } + + OrderedSet.isOrderedSet = isOrderedSet; + + var OrderedSetPrototype = OrderedSet.prototype; + OrderedSetPrototype[IS_ORDERED_SENTINEL] = true; + + OrderedSetPrototype.__empty = emptyOrderedSet; + OrderedSetPrototype.__make = makeOrderedSet; + + function makeOrderedSet(map, ownerID) { + var set = Object.create(OrderedSetPrototype); + set.size = map ? map.size : 0; + set._map = map; + set.__ownerID = ownerID; + return set; + } + + var EMPTY_ORDERED_SET; + function emptyOrderedSet() { + return EMPTY_ORDERED_SET || (EMPTY_ORDERED_SET = makeOrderedSet(emptyOrderedMap())); + } + + createClass(Stack, IndexedCollection); + + // @pragma Construction + + function Stack(value) { + return value === null || value === undefined + ? emptyStack() + : isStack(value) + ? value + : emptyStack().unshiftAll(value); + } + + Stack.of = function (/*...values*/) { + return this(arguments); + }; + + Stack.prototype.toString = function () { + return this.__toString('Stack [', ']'); + }; + + // @pragma Access + + Stack.prototype.get = function (index, notSetValue) { + var head = this._head; + index = wrapIndex(this, index); + while (head && index--) { + head = head.next; + } + return head ? head.value : notSetValue; + }; + + Stack.prototype.peek = function () { + return this._head && this._head.value; + }; + + // @pragma Modification + + Stack.prototype.push = function (/*...values*/) { + if (arguments.length === 0) { + return this; + } + var newSize = this.size + arguments.length; + var head = this._head; + for (var ii = arguments.length - 1; ii >= 0; ii--) { + head = { + value: arguments[ii], + next: head, + }; + } + if (this.__ownerID) { + this.size = newSize; + this._head = head; + this.__hash = undefined; + this.__altered = true; + return this; + } + return makeStack(newSize, head); + }; + + Stack.prototype.pushAll = function (iter) { + iter = IndexedIterable(iter); + if (iter.size === 0) { + return this; + } + assertNotInfinite(iter.size); + var newSize = this.size; + var head = this._head; + iter.reverse().forEach(function (value) { + newSize++; + head = { + value: value, + next: head, + }; + }); + if (this.__ownerID) { + this.size = newSize; + this._head = head; + this.__hash = undefined; + this.__altered = true; + return this; + } + return makeStack(newSize, head); + }; + + Stack.prototype.pop = function () { + return this.slice(1); + }; + + Stack.prototype.unshift = function (/*...values*/) { + return this.push.apply(this, arguments); + }; + + Stack.prototype.unshiftAll = function (iter) { + return this.pushAll(iter); + }; + + Stack.prototype.shift = function () { + return this.pop.apply(this, arguments); + }; + + Stack.prototype.clear = function () { + if (this.size === 0) { + return this; + } + if (this.__ownerID) { + this.size = 0; + this._head = undefined; + this.__hash = undefined; + this.__altered = true; + return this; + } + return emptyStack(); + }; + + Stack.prototype.slice = function (begin, end) { + if (wholeSlice(begin, end, this.size)) { + return this; + } + var resolvedBegin = resolveBegin(begin, this.size); + var resolvedEnd = resolveEnd(end, this.size); + if (resolvedEnd !== this.size) { + // super.slice(begin, end); + return IndexedCollection.prototype.slice.call(this, begin, end); + } + var newSize = this.size - resolvedBegin; + var head = this._head; + while (resolvedBegin--) { + head = head.next; + } + if (this.__ownerID) { + this.size = newSize; + this._head = head; + this.__hash = undefined; + this.__altered = true; + return this; + } + return makeStack(newSize, head); + }; + + // @pragma Mutability + + Stack.prototype.__ensureOwner = function (ownerID) { + if (ownerID === this.__ownerID) { + return this; + } + if (!ownerID) { + this.__ownerID = ownerID; + this.__altered = false; + return this; + } + return makeStack(this.size, this._head, ownerID, this.__hash); + }; + + // @pragma Iteration + + Stack.prototype.__iterate = function (fn, reverse) { + if (reverse) { + return this.reverse().__iterate(fn); + } + var iterations = 0; + var node = this._head; + while (node) { + if (fn(node.value, iterations++, this) === false) { + break; + } + node = node.next; + } + return iterations; + }; + + Stack.prototype.__iterator = function (type, reverse) { + if (reverse) { + return this.reverse().__iterator(type); + } + var iterations = 0; + var node = this._head; + return new Iterator(function () { + if (node) { + var value = node.value; + node = node.next; + return iteratorValue(type, iterations++, value); + } + return iteratorDone(); + }); + }; + + function isStack(maybeStack) { + return !!(maybeStack && maybeStack[IS_STACK_SENTINEL]); + } + + Stack.isStack = isStack; + + var IS_STACK_SENTINEL = '@@__IMMUTABLE_STACK__@@'; + + var StackPrototype = Stack.prototype; + StackPrototype[IS_STACK_SENTINEL] = true; + StackPrototype.withMutations = MapPrototype.withMutations; + StackPrototype.asMutable = MapPrototype.asMutable; + StackPrototype.asImmutable = MapPrototype.asImmutable; + StackPrototype.wasAltered = MapPrototype.wasAltered; + + function makeStack(size, head, ownerID, hash) { + var map = Object.create(StackPrototype); + map.size = size; + map._head = head; + map.__ownerID = ownerID; + map.__hash = hash; + map.__altered = false; + return map; + } + + var EMPTY_STACK; + function emptyStack() { + return EMPTY_STACK || (EMPTY_STACK = makeStack(0)); + } + + /** + * Contributes additional methods to a constructor + */ + function mixin(ctor, methods) { + var keyCopier = function (key) { + ctor.prototype[key] = methods[key]; + }; + Object.keys(methods).forEach(keyCopier); + Object.getOwnPropertySymbols && Object.getOwnPropertySymbols(methods).forEach(keyCopier); + return ctor; + } + + Iterable.Iterator = Iterator; + + mixin(Iterable, { + // ### Conversion to other types + + toArray: function () { + assertNotInfinite(this.size); + var array = new Array(this.size || 0); + this.valueSeq().__iterate(function (v, i) { + array[i] = v; + }); + return array; + }, + + toIndexedSeq: function () { + return new ToIndexedSequence(this); + }, + + toJS: function () { + return this.toSeq() + .map(function (value) { + return value && typeof value.toJS === 'function' ? value.toJS() : value; + }) + .__toJS(); + }, + + toJSON: function () { + return this.toSeq() + .map(function (value) { + return value && typeof value.toJSON === 'function' ? value.toJSON() : value; + }) + .__toJS(); + }, + + toKeyedSeq: function () { + return new ToKeyedSequence(this, true); + }, + + toMap: function () { + // Use Late Binding here to solve the circular dependency. + return Map(this.toKeyedSeq()); + }, + + toObject: function () { + assertNotInfinite(this.size); + var object = {}; + this.__iterate(function (v, k) { + object[k] = v; + }); + return object; + }, + + toOrderedMap: function () { + // Use Late Binding here to solve the circular dependency. + return OrderedMap(this.toKeyedSeq()); + }, + + toOrderedSet: function () { + // Use Late Binding here to solve the circular dependency. + return OrderedSet(isKeyed(this) ? this.valueSeq() : this); + }, + + toSet: function () { + // Use Late Binding here to solve the circular dependency. + return Set(isKeyed(this) ? this.valueSeq() : this); + }, + + toSetSeq: function () { + return new ToSetSequence(this); + }, + + toSeq: function () { + return isIndexed(this) + ? this.toIndexedSeq() + : isKeyed(this) + ? this.toKeyedSeq() + : this.toSetSeq(); + }, + + toStack: function () { + // Use Late Binding here to solve the circular dependency. + return Stack(isKeyed(this) ? this.valueSeq() : this); + }, + + toList: function () { + // Use Late Binding here to solve the circular dependency. + return List(isKeyed(this) ? this.valueSeq() : this); + }, + + // ### Common JavaScript methods and properties + + toString: function () { + return '[Iterable]'; + }, + + __toString: function (head, tail) { + if (this.size === 0) { + return head + tail; + } + return head + ' ' + this.toSeq().map(this.__toStringMapper).join(', ') + ' ' + tail; + }, + + // ### ES6 Collection methods (ES6 Array and Map) + + concat: function () { + var values = SLICE$0.call(arguments, 0); + return reify(this, concatFactory(this, values)); + }, + + includes: function (searchValue) { + return this.some(function (value) { + return is(value, searchValue); + }); + }, + + entries: function () { + return this.__iterator(ITERATE_ENTRIES); + }, + + every: function (predicate, context) { + assertNotInfinite(this.size); + var returnValue = true; + this.__iterate(function (v, k, c) { + if (!predicate.call(context, v, k, c)) { + returnValue = false; + return false; + } + }); + return returnValue; + }, + + filter: function (predicate, context) { + return reify(this, filterFactory(this, predicate, context, true)); + }, + + find: function (predicate, context, notSetValue) { + var entry = this.findEntry(predicate, context); + return entry ? entry[1] : notSetValue; + }, + + forEach: function (sideEffect, context) { + assertNotInfinite(this.size); + return this.__iterate(context ? sideEffect.bind(context) : sideEffect); + }, + + join: function (separator) { + assertNotInfinite(this.size); + separator = separator !== undefined ? '' + separator : ','; + var joined = ''; + var isFirst = true; + this.__iterate(function (v) { + isFirst ? (isFirst = false) : (joined += separator); + joined += v !== null && v !== undefined ? v.toString() : ''; + }); + return joined; + }, + + keys: function () { + return this.__iterator(ITERATE_KEYS); + }, + + map: function (mapper, context) { + return reify(this, mapFactory(this, mapper, context)); + }, + + reduce: function (reducer, initialReduction, context) { + assertNotInfinite(this.size); + var reduction; + var useFirst; + if (arguments.length < 2) { + useFirst = true; + } else { + reduction = initialReduction; + } + this.__iterate(function (v, k, c) { + if (useFirst) { + useFirst = false; + reduction = v; + } else { + reduction = reducer.call(context, reduction, v, k, c); + } + }); + return reduction; + }, + + reduceRight: function (reducer, initialReduction, context) { + var reversed = this.toKeyedSeq().reverse(); + return reversed.reduce.apply(reversed, arguments); + }, + + reverse: function () { + return reify(this, reverseFactory(this, true)); + }, + + slice: function (begin, end) { + return reify(this, sliceFactory(this, begin, end, true)); + }, + + some: function (predicate, context) { + return !this.every(not(predicate), context); + }, + + sort: function (comparator) { + return reify(this, sortFactory(this, comparator)); + }, + + values: function () { + return this.__iterator(ITERATE_VALUES); + }, + + // ### More sequential methods + + butLast: function () { + return this.slice(0, -1); + }, + + isEmpty: function () { + return this.size !== undefined + ? this.size === 0 + : !this.some(function () { + return true; + }); + }, + + count: function (predicate, context) { + return ensureSize(predicate ? this.toSeq().filter(predicate, context) : this); + }, + + countBy: function (grouper, context) { + return countByFactory(this, grouper, context); + }, + + equals: function (other) { + return deepEqual(this, other); + }, + + entrySeq: function () { + var iterable = this; + if (iterable._cache) { + // We cache as an entries array, so we can just return the cache! + return new ArraySeq(iterable._cache); + } + var entriesSequence = iterable.toSeq().map(entryMapper).toIndexedSeq(); + entriesSequence.fromEntrySeq = function () { + return iterable.toSeq(); + }; + return entriesSequence; + }, + + filterNot: function (predicate, context) { + return this.filter(not(predicate), context); + }, + + findEntry: function (predicate, context, notSetValue) { + var found = notSetValue; + this.__iterate(function (v, k, c) { + if (predicate.call(context, v, k, c)) { + found = [k, v]; + return false; + } + }); + return found; + }, + + findKey: function (predicate, context) { + var entry = this.findEntry(predicate, context); + return entry && entry[0]; + }, + + findLast: function (predicate, context, notSetValue) { + return this.toKeyedSeq().reverse().find(predicate, context, notSetValue); + }, + + findLastEntry: function (predicate, context, notSetValue) { + return this.toKeyedSeq().reverse().findEntry(predicate, context, notSetValue); + }, + + findLastKey: function (predicate, context) { + return this.toKeyedSeq().reverse().findKey(predicate, context); + }, + + first: function () { + return this.find(returnTrue); + }, + + flatMap: function (mapper, context) { + return reify(this, flatMapFactory(this, mapper, context)); + }, + + flatten: function (depth) { + return reify(this, flattenFactory(this, depth, true)); + }, + + fromEntrySeq: function () { + return new FromEntriesSequence(this); + }, + + get: function (searchKey, notSetValue) { + return this.find( + function (_, key) { + return is(key, searchKey); + }, + undefined, + notSetValue, + ); + }, + + getIn: function (searchKeyPath, notSetValue) { + var nested = this; + // Note: in an ES6 environment, we would prefer: + // for (var key of searchKeyPath) { + var iter = forceIterator(searchKeyPath); + var step; + while (!(step = iter.next()).done) { + var key = step.value; + nested = nested && nested.get ? nested.get(key, NOT_SET) : NOT_SET; + if (nested === NOT_SET) { + return notSetValue; + } + } + return nested; + }, + + groupBy: function (grouper, context) { + return groupByFactory(this, grouper, context); + }, + + has: function (searchKey) { + return this.get(searchKey, NOT_SET) !== NOT_SET; + }, + + hasIn: function (searchKeyPath) { + return this.getIn(searchKeyPath, NOT_SET) !== NOT_SET; + }, + + isSubset: function (iter) { + iter = typeof iter.includes === 'function' ? iter : Iterable(iter); + return this.every(function (value) { + return iter.includes(value); + }); + }, + + isSuperset: function (iter) { + iter = typeof iter.isSubset === 'function' ? iter : Iterable(iter); + return iter.isSubset(this); + }, + + keyOf: function (searchValue) { + return this.findKey(function (value) { + return is(value, searchValue); + }); + }, + + keySeq: function () { + return this.toSeq().map(keyMapper).toIndexedSeq(); + }, + + last: function () { + return this.toSeq().reverse().first(); + }, + + lastKeyOf: function (searchValue) { + return this.toKeyedSeq().reverse().keyOf(searchValue); + }, + + max: function (comparator) { + return maxFactory(this, comparator); + }, + + maxBy: function (mapper, comparator) { + return maxFactory(this, comparator, mapper); + }, + + min: function (comparator) { + return maxFactory(this, comparator ? neg(comparator) : defaultNegComparator); + }, + + minBy: function (mapper, comparator) { + return maxFactory(this, comparator ? neg(comparator) : defaultNegComparator, mapper); + }, + + rest: function () { + return this.slice(1); + }, + + skip: function (amount) { + return this.slice(Math.max(0, amount)); + }, + + skipLast: function (amount) { + return reify(this, this.toSeq().reverse().skip(amount).reverse()); + }, + + skipWhile: function (predicate, context) { + return reify(this, skipWhileFactory(this, predicate, context, true)); + }, + + skipUntil: function (predicate, context) { + return this.skipWhile(not(predicate), context); + }, + + sortBy: function (mapper, comparator) { + return reify(this, sortFactory(this, comparator, mapper)); + }, + + take: function (amount) { + return this.slice(0, Math.max(0, amount)); + }, + + takeLast: function (amount) { + return reify(this, this.toSeq().reverse().take(amount).reverse()); + }, + + takeWhile: function (predicate, context) { + return reify(this, takeWhileFactory(this, predicate, context)); + }, + + takeUntil: function (predicate, context) { + return this.takeWhile(not(predicate), context); + }, + + valueSeq: function () { + return this.toIndexedSeq(); + }, + + // ### Hashable Object + + hashCode: function () { + return this.__hash || (this.__hash = hashIterable(this)); + }, + + // ### Internal + + // abstract __iterate(fn, reverse) + + // abstract __iterator(type, reverse) + }); + + // var IS_ITERABLE_SENTINEL = '@@__IMMUTABLE_ITERABLE__@@'; + // var IS_KEYED_SENTINEL = '@@__IMMUTABLE_KEYED__@@'; + // var IS_INDEXED_SENTINEL = '@@__IMMUTABLE_INDEXED__@@'; + // var IS_ORDERED_SENTINEL = '@@__IMMUTABLE_ORDERED__@@'; + + var IterablePrototype = Iterable.prototype; + IterablePrototype[IS_ITERABLE_SENTINEL] = true; + IterablePrototype[ITERATOR_SYMBOL] = IterablePrototype.values; + IterablePrototype.__toJS = IterablePrototype.toArray; + IterablePrototype.__toStringMapper = quoteString; + IterablePrototype.inspect = IterablePrototype.toSource = function () { + return this.toString(); + }; + IterablePrototype.chain = IterablePrototype.flatMap; + IterablePrototype.contains = IterablePrototype.includes; + + mixin(KeyedIterable, { + // ### More sequential methods + + flip: function () { + return reify(this, flipFactory(this)); + }, + + mapEntries: function (mapper, context) { + var this$0 = this; + var iterations = 0; + return reify( + this, + this.toSeq() + .map(function (v, k) { + return mapper.call(context, [k, v], iterations++, this$0); + }) + .fromEntrySeq(), + ); + }, + + mapKeys: function (mapper, context) { + var this$0 = this; + return reify( + this, + this.toSeq() + .flip() + .map(function (k, v) { + return mapper.call(context, k, v, this$0); + }) + .flip(), + ); + }, + }); + + var KeyedIterablePrototype = KeyedIterable.prototype; + KeyedIterablePrototype[IS_KEYED_SENTINEL] = true; + KeyedIterablePrototype[ITERATOR_SYMBOL] = IterablePrototype.entries; + KeyedIterablePrototype.__toJS = IterablePrototype.toObject; + KeyedIterablePrototype.__toStringMapper = function (v, k) { + return JSON.stringify(k) + ': ' + quoteString(v); + }; + + mixin(IndexedIterable, { + // ### Conversion to other types + + toKeyedSeq: function () { + return new ToKeyedSequence(this, false); + }, + + // ### ES6 Collection methods (ES6 Array and Map) + + filter: function (predicate, context) { + return reify(this, filterFactory(this, predicate, context, false)); + }, + + findIndex: function (predicate, context) { + var entry = this.findEntry(predicate, context); + return entry ? entry[0] : -1; + }, + + indexOf: function (searchValue) { + var key = this.keyOf(searchValue); + return key === undefined ? -1 : key; + }, + + lastIndexOf: function (searchValue) { + var key = this.lastKeyOf(searchValue); + return key === undefined ? -1 : key; + }, + + reverse: function () { + return reify(this, reverseFactory(this, false)); + }, + + slice: function (begin, end) { + return reify(this, sliceFactory(this, begin, end, false)); + }, + + splice: function (index, removeNum /*, ...values*/) { + var numArgs = arguments.length; + removeNum = Math.max(removeNum | 0, 0); + if (numArgs === 0 || (numArgs === 2 && !removeNum)) { + return this; + } + // If index is negative, it should resolve relative to the size of the + // collection. However size may be expensive to compute if not cached, so + // only call count() if the number is in fact negative. + index = resolveBegin(index, index < 0 ? this.count() : this.size); + var spliced = this.slice(0, index); + return reify( + this, + numArgs === 1 ? spliced : spliced.concat(arrCopy(arguments, 2), this.slice(index + removeNum)), + ); + }, + + // ### More collection methods + + findLastIndex: function (predicate, context) { + var entry = this.findLastEntry(predicate, context); + return entry ? entry[0] : -1; + }, + + first: function () { + return this.get(0); + }, + + flatten: function (depth) { + return reify(this, flattenFactory(this, depth, false)); + }, + + get: function (index, notSetValue) { + index = wrapIndex(this, index); + return index < 0 || this.size === Infinity || (this.size !== undefined && index > this.size) + ? notSetValue + : this.find( + function (_, key) { + return key === index; + }, + undefined, + notSetValue, + ); + }, + + has: function (index) { + index = wrapIndex(this, index); + return ( + index >= 0 && + (this.size !== undefined + ? this.size === Infinity || index < this.size + : this.indexOf(index) !== -1) + ); + }, + + interpose: function (separator) { + return reify(this, interposeFactory(this, separator)); + }, + + interleave: function (/*...iterables*/) { + var iterables = [this].concat(arrCopy(arguments)); + var zipped = zipWithFactory(this.toSeq(), IndexedSeq.of, iterables); + var interleaved = zipped.flatten(true); + if (zipped.size) { + interleaved.size = zipped.size * iterables.length; + } + return reify(this, interleaved); + }, + + keySeq: function () { + return Range(0, this.size); + }, + + last: function () { + return this.get(-1); + }, + + skipWhile: function (predicate, context) { + return reify(this, skipWhileFactory(this, predicate, context, false)); + }, + + zip: function (/*, ...iterables */) { + var iterables = [this].concat(arrCopy(arguments)); + return reify(this, zipWithFactory(this, defaultZipper, iterables)); + }, + + zipWith: function (zipper /*, ...iterables */) { + var iterables = arrCopy(arguments); + iterables[0] = this; + return reify(this, zipWithFactory(this, zipper, iterables)); + }, + }); + + IndexedIterable.prototype[IS_INDEXED_SENTINEL] = true; + IndexedIterable.prototype[IS_ORDERED_SENTINEL] = true; + + mixin(SetIterable, { + // ### ES6 Collection methods (ES6 Array and Map) + + get: function (value, notSetValue) { + return this.has(value) ? value : notSetValue; + }, + + includes: function (value) { + return this.has(value); + }, + + // ### More sequential methods + + keySeq: function () { + return this.valueSeq(); + }, + }); + + SetIterable.prototype.has = IterablePrototype.includes; + SetIterable.prototype.contains = SetIterable.prototype.includes; + + // Mixin subclasses + + mixin(KeyedSeq, KeyedIterable.prototype); + mixin(IndexedSeq, IndexedIterable.prototype); + mixin(SetSeq, SetIterable.prototype); + + mixin(KeyedCollection, KeyedIterable.prototype); + mixin(IndexedCollection, IndexedIterable.prototype); + mixin(SetCollection, SetIterable.prototype); + + // #pragma Helper functions + + function keyMapper(v, k) { + return k; + } + + function entryMapper(v, k) { + return [k, v]; + } + + function not(predicate) { + return function () { + return !predicate.apply(this, arguments); + }; + } + + function neg(predicate) { + return function () { + return -predicate.apply(this, arguments); + }; + } + + function quoteString(value) { + return typeof value === 'string' ? JSON.stringify(value) : String(value); + } + + function defaultZipper() { + return arrCopy(arguments); + } + + function defaultNegComparator(a, b) { + return a < b ? 1 : a > b ? -1 : 0; + } + + function hashIterable(iterable) { + if (iterable.size === Infinity) { + return 0; + } + var ordered = isOrdered(iterable); + var keyed = isKeyed(iterable); + var h = ordered ? 1 : 0; + var size = iterable.__iterate( + keyed + ? ordered + ? function (v, k) { + h = (31 * h + hashMerge(hash(v), hash(k))) | 0; + } + : function (v, k) { + h = (h + hashMerge(hash(v), hash(k))) | 0; + } + : ordered + ? function (v) { + h = (31 * h + hash(v)) | 0; + } + : function (v) { + h = (h + hash(v)) | 0; + }, + ); + return murmurHashOfSize(size, h); + } + + function murmurHashOfSize(size, h) { + h = imul(h, 0xcc9e2d51); + h = imul((h << 15) | (h >>> -15), 0x1b873593); + h = imul((h << 13) | (h >>> -13), 5); + h = ((h + 0xe6546b64) | 0) ^ size; + h = imul(h ^ (h >>> 16), 0x85ebca6b); + h = imul(h ^ (h >>> 13), 0xc2b2ae35); + h = smi(h ^ (h >>> 16)); + return h; + } + + function hashMerge(a, b) { + return (a ^ (b + 0x9e3779b9 + (a << 6) + (a >> 2))) | 0; // int + } + + var Immutable = { + Iterable: Iterable, + + Seq: Seq, + Collection: Collection, + Map: Map, + OrderedMap: OrderedMap, + List: List, + Stack: Stack, + Set: Set, + OrderedSet: OrderedSet, + + Record: Record, + Range: Range, + Repeat: Repeat, + + is: is, + fromJS: fromJS, + }; + + return Immutable; + }); + + /***/ + }, + /* 140 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + module.exports = __webpack_require__(201); + + /***/ + }, + /* 141 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var SyntheticUIEvent = __webpack_require__(117); + var ViewportMetrics = __webpack_require__(326); + + var getEventModifierState = __webpack_require__(207); + + /** + * @interface MouseEvent + * @see http://www.w3.org/TR/DOM-Level-3-Events/ + */ + var MouseEventInterface = { + screenX: null, + screenY: null, + clientX: null, + clientY: null, + ctrlKey: null, + shiftKey: null, + altKey: null, + metaKey: null, + getModifierState: getEventModifierState, + button: function (event) { + // Webkit, Firefox, IE9+ + // which: 1 2 3 + // button: 0 1 2 (standard) + var button = event.button; + if ('which' in event) { + return button; + } + // IE<9 + // which: undefined + // button: 0 0 0 + // button: 1 4 2 (onmouseup) + return button === 2 ? 2 : button === 4 ? 1 : 0; + }, + buttons: null, + relatedTarget: function (event) { + return ( + event.relatedTarget || + (event.fromElement === event.srcElement ? event.toElement : event.fromElement) + ); + }, + // "Proprietary" Interface. + pageX: function (event) { + return 'pageX' in event ? event.pageX : event.clientX + ViewportMetrics.currentScrollLeft; + }, + pageY: function (event) { + return 'pageY' in event ? event.pageY : event.clientY + ViewportMetrics.currentScrollTop; + }, + }; + + /** + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @extends {SyntheticUIEvent} + */ + function SyntheticMouseEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); + } + + SyntheticUIEvent.augmentClass(SyntheticMouseEvent, MouseEventInterface); + + module.exports = SyntheticMouseEvent; + + /***/ + }, + /* 142 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + var _prodInvariant = __webpack_require__(5); + + var invariant = __webpack_require__(2); + + var OBSERVED_ERROR = {}; + + /** + * `Transaction` creates a black box that is able to wrap any method such that + * certain invariants are maintained before and after the method is invoked + * (Even if an exception is thrown while invoking the wrapped method). Whoever + * instantiates a transaction can provide enforcers of the invariants at + * creation time. The `Transaction` class itself will supply one additional + * automatic invariant for you - the invariant that any transaction instance + * should not be run while it is already being run. You would typically create a + * single instance of a `Transaction` for reuse multiple times, that potentially + * is used to wrap several different methods. Wrappers are extremely simple - + * they only require implementing two methods. + * + * <pre> + * wrappers (injected at creation time) + * + + + * | | + * +-----------------|--------|--------------+ + * | v | | + * | +---------------+ | | + * | +--| wrapper1 |---|----+ | + * | | +---------------+ v | | + * | | +-------------+ | | + * | | +----| wrapper2 |--------+ | + * | | | +-------------+ | | | + * | | | | | | + * | v v v v | wrapper + * | +---+ +---+ +---------+ +---+ +---+ | invariants + * perform(anyMethod) | | | | | | | | | | | | maintained + * +----------------->|-|---|-|---|-->|anyMethod|---|---|-|---|-|--------> + * | | | | | | | | | | | | + * | | | | | | | | | | | | + * | | | | | | | | | | | | + * | +---+ +---+ +---------+ +---+ +---+ | + * | initialize close | + * +-----------------------------------------+ + * </pre> + * + * Use cases: + * - Preserving the input selection ranges before/after reconciliation. + * Restoring selection even in the event of an unexpected error. + * - Deactivating events while rearranging the DOM, preventing blurs/focuses, + * while guaranteeing that afterwards, the event system is reactivated. + * - Flushing a queue of collected DOM mutations to the main UI thread after a + * reconciliation takes place in a worker thread. + * - Invoking any collected `componentDidUpdate` callbacks after rendering new + * content. + * - (Future use case): Wrapping particular flushes of the `ReactWorker` queue + * to preserve the `scrollTop` (an automatic scroll aware DOM). + * - (Future use case): Layout calculations before and after DOM updates. + * + * Transactional plugin API: + * - A module that has an `initialize` method that returns any precomputation. + * - and a `close` method that accepts the precomputation. `close` is invoked + * when the wrapped process is completed, or has failed. + * + * @param {Array<TransactionalWrapper>} transactionWrapper Wrapper modules + * that implement `initialize` and `close`. + * @return {Transaction} Single transaction for reuse in thread. + * + * @class Transaction + */ + var TransactionImpl = { + /** + * Sets up this instance so that it is prepared for collecting metrics. Does + * so such that this setup method may be used on an instance that is already + * initialized, in a way that does not consume additional memory upon reuse. + * That can be useful if you decide to make your subclass of this mixin a + * "PooledClass". + */ + reinitializeTransaction: function () { + this.transactionWrappers = this.getTransactionWrappers(); + if (this.wrapperInitData) { + this.wrapperInitData.length = 0; + } else { + this.wrapperInitData = []; + } + this._isInTransaction = false; + }, + + _isInTransaction: false, + + /** + * @abstract + * @return {Array<TransactionWrapper>} Array of transaction wrappers. + */ + getTransactionWrappers: null, + + isInTransaction: function () { + return !!this._isInTransaction; + }, + + /** + * Executes the function within a safety window. Use this for the top level + * methods that result in large amounts of computation/mutations that would + * need to be safety checked. The optional arguments helps prevent the need + * to bind in many cases. + * + * @param {function} method Member of scope to call. + * @param {Object} scope Scope to invoke from. + * @param {Object?=} a Argument to pass to the method. + * @param {Object?=} b Argument to pass to the method. + * @param {Object?=} c Argument to pass to the method. + * @param {Object?=} d Argument to pass to the method. + * @param {Object?=} e Argument to pass to the method. + * @param {Object?=} f Argument to pass to the method. + * + * @return {*} Return value from `method`. + */ + perform: function (method, scope, a, b, c, d, e, f) { + !!this.isInTransaction() + ? true + ? invariant( + false, + 'Transaction.perform(...): Cannot initialize a transaction when there is already an outstanding transaction.', + ) + : _prodInvariant('27') + : void 0; + var errorThrown; + var ret; + try { + this._isInTransaction = true; + // Catching errors makes debugging more difficult, so we start with + // errorThrown set to true before setting it to false after calling + // close -- if it's still set to true in the finally block, it means + // one of these calls threw. + errorThrown = true; + this.initializeAll(0); + ret = method.call(scope, a, b, c, d, e, f); + errorThrown = false; + } finally { + try { + if (errorThrown) { + // If `method` throws, prefer to show that stack trace over any thrown + // by invoking `closeAll`. + try { + this.closeAll(0); + } catch (err) {} + } else { + // Since `method` didn't throw, we don't want to silence the exception + // here. + this.closeAll(0); + } + } finally { + this._isInTransaction = false; + } + } + return ret; + }, + + initializeAll: function (startIndex) { + var transactionWrappers = this.transactionWrappers; + for (var i = startIndex; i < transactionWrappers.length; i++) { + var wrapper = transactionWrappers[i]; + try { + // Catching errors makes debugging more difficult, so we start with the + // OBSERVED_ERROR state before overwriting it with the real return value + // of initialize -- if it's still set to OBSERVED_ERROR in the finally + // block, it means wrapper.initialize threw. + this.wrapperInitData[i] = OBSERVED_ERROR; + this.wrapperInitData[i] = wrapper.initialize ? wrapper.initialize.call(this) : null; + } finally { + if (this.wrapperInitData[i] === OBSERVED_ERROR) { + // The initializer for wrapper i threw an error; initialize the + // remaining wrappers but silence any exceptions from them to ensure + // that the first error is the one to bubble up. + try { + this.initializeAll(i + 1); + } catch (err) {} + } + } + } + }, + + /** + * Invokes each of `this.transactionWrappers.close[i]` functions, passing into + * them the respective return values of `this.transactionWrappers.init[i]` + * (`close`rs that correspond to initializers that failed will not be + * invoked). + */ + closeAll: function (startIndex) { + !this.isInTransaction() + ? true + ? invariant(false, 'Transaction.closeAll(): Cannot close transaction when none are open.') + : _prodInvariant('28') + : void 0; + var transactionWrappers = this.transactionWrappers; + for (var i = startIndex; i < transactionWrappers.length; i++) { + var wrapper = transactionWrappers[i]; + var initData = this.wrapperInitData[i]; + var errorThrown; + try { + // Catching errors makes debugging more difficult, so we start with + // errorThrown set to true before setting it to false after calling + // close -- if it's still set to true in the finally block, it means + // wrapper.close threw. + errorThrown = true; + if (initData !== OBSERVED_ERROR && wrapper.close) { + wrapper.close.call(this, initData); + } + errorThrown = false; + } finally { + if (errorThrown) { + // The closer for wrapper i threw an error; close the remaining + // wrappers but silence any exceptions from them to ensure that the + // first error is the one to bubble up. + try { + this.closeAll(i + 1); + } catch (e) {} + } + } + } + this.wrapperInitData.length = 0; + }, + }; + + module.exports = TransactionImpl; + + /***/ + }, + /* 143 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2016-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * Based on the escape-html library, which is used under the MIT License below: + * + * Copyright (c) 2012-2013 TJ Holowaychuk + * Copyright (c) 2015 Andreas Lubbe + * Copyright (c) 2015 Tiancheng "Timothy" Gu + * + * 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. + * + */ + + // code copied and modified from escape-html + /** + * Module variables. + * @private + */ + + var matchHtmlRegExp = /["'&<>]/; + + /** + * Escape special characters in the given string of html. + * + * @param {string} string The string to escape for inserting into HTML + * @return {string} + * @public + */ + + function escapeHtml(string) { + var str = '' + string; + var match = matchHtmlRegExp.exec(str); + + if (!match) { + return str; + } + + var escape; + var html = ''; + var index = 0; + var lastIndex = 0; + + for (index = match.index; index < str.length; index++) { + switch (str.charCodeAt(index)) { + case 34: + // " + escape = '"'; + break; + case 38: + // & + escape = '&'; + break; + case 39: + // ' + escape = '''; // modified from escape-html; used to be ''' + break; + case 60: + // < + escape = '<'; + break; + case 62: + // > + escape = '>'; + break; + default: + continue; + } + + if (lastIndex !== index) { + html += str.substring(lastIndex, index); + } + + lastIndex = index + 1; + html += escape; + } + + return lastIndex !== index ? html + str.substring(lastIndex, index) : html; + } + // end code copied and modified from escape-html + + /** + * Escapes text to prevent scripting attacks. + * + * @param {*} text Text value to escape. + * @return {string} An escaped string. + */ + function escapeTextContentForBrowser(text) { + if (typeof text === 'boolean' || typeof text === 'number') { + // this shortcircuit helps perf for types that we know will never have + // special characters, especially given that this function is used often + // for numeric dom ids. + return '' + text; + } + return escapeHtml(text); + } + + module.exports = escapeTextContentForBrowser; + + /***/ + }, + /* 144 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var ExecutionEnvironment = __webpack_require__(14); + var DOMNamespaces = __webpack_require__(196); + + var WHITESPACE_TEST = /^[ \r\n\t\f]/; + var NONVISIBLE_TEST = /<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/; + + var createMicrosoftUnsafeLocalFunction = __webpack_require__(205); + + // SVG temp container for IE lacking innerHTML + var reusableSVGContainer; + + /** + * Set the innerHTML property of a node, ensuring that whitespace is preserved + * even in IE8. + * + * @param {DOMElement} node + * @param {string} html + * @internal + */ + var setInnerHTML = createMicrosoftUnsafeLocalFunction(function (node, html) { + // IE does not have innerHTML for SVG nodes, so instead we inject the + // new markup in a temp node and then move the child nodes across into + // the target node + if (node.namespaceURI === DOMNamespaces.svg && !('innerHTML' in node)) { + reusableSVGContainer = reusableSVGContainer || document.createElement('div'); + reusableSVGContainer.innerHTML = '<svg>' + html + '</svg>'; + var svgNode = reusableSVGContainer.firstChild; + while (svgNode.firstChild) { + node.appendChild(svgNode.firstChild); + } + } else { + node.innerHTML = html; + } + }); + + if (ExecutionEnvironment.canUseDOM) { + // IE8: When updating a just created node with innerHTML only leading + // whitespace is removed. When updating an existing node with innerHTML + // whitespace in root TextNodes is also collapsed. + // @see quirksmode.org/bugreports/archives/2004/11/innerhtml_and_t.html + + // Feature detection; only IE8 is known to behave improperly like this. + var testElement = document.createElement('div'); + testElement.innerHTML = ' '; + if (testElement.innerHTML === '') { + setInnerHTML = function (node, html) { + // Magic theory: IE8 supposedly differentiates between added and updated + // nodes when processing innerHTML, innerHTML on updated nodes suffers + // from worse whitespace behavior. Re-adding a node like this triggers + // the initial and more favorable whitespace behavior. + // TODO: What to do on a detached node? + if (node.parentNode) { + node.parentNode.replaceChild(node, node); + } + + // We also implement a workaround for non-visible tags disappearing into + // thin air on IE8, this only happens if there is no visible text + // in-front of the non-visible tags. Piggyback on the whitespace fix + // and simply check if any non-visible tags appear in the source. + if (WHITESPACE_TEST.test(html) || (html[0] === '<' && NONVISIBLE_TEST.test(html))) { + // Recover leading whitespace by temporarily prepending any character. + // \uFEFF has the potential advantage of being zero-width/invisible. + // UglifyJS drops U+FEFF chars when parsing, so use String.fromCharCode + // in hopes that this is preserved even if "\uFEFF" is transformed to + // the actual Unicode character (by Babel, for example). + // https://github.com/mishoo/UglifyJS2/blob/v2.4.20/lib/parse.js#L216 + node.innerHTML = String.fromCharCode(0xfeff) + html; + + // deleteData leaves an empty `TextNode` which offsets the index of all + // children. Definitely want to avoid this. + var textNode = node.firstChild; + if (textNode.data.length === 1) { + node.removeChild(textNode); + } else { + textNode.deleteData(0, 1); + } + } else { + node.innerHTML = html; + } + }; + } + testElement = null; + } + + module.exports = setInnerHTML; + + /***/ + }, + /* 145 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (process) { + var utils = __webpack_require__(35); + var normalizeHeaderName = __webpack_require__(383); + + var DEFAULT_CONTENT_TYPE = { + 'Content-Type': 'application/x-www-form-urlencoded', + }; + + function setContentTypeIfUnset(headers, value) { + if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) { + headers['Content-Type'] = value; + } + } + + function getDefaultAdapter() { + var adapter; + if (typeof XMLHttpRequest !== 'undefined') { + // For browsers use XHR adapter + adapter = __webpack_require__(225); + } else if (typeof process !== 'undefined') { + // For node use HTTP adapter + adapter = __webpack_require__(225); + } + return adapter; + } + + var defaults = { + adapter: getDefaultAdapter(), + + transformRequest: [ + function transformRequest(data, headers) { + normalizeHeaderName(headers, 'Content-Type'); + if ( + utils.isFormData(data) || + utils.isArrayBuffer(data) || + utils.isBuffer(data) || + utils.isStream(data) || + utils.isFile(data) || + utils.isBlob(data) + ) { + return data; + } + if (utils.isArrayBufferView(data)) { + return data.buffer; + } + if (utils.isURLSearchParams(data)) { + setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8'); + return data.toString(); + } + if (utils.isObject(data)) { + setContentTypeIfUnset(headers, 'application/json;charset=utf-8'); + return JSON.stringify(data); + } + return data; + }, + ], + + transformResponse: [ + function transformResponse(data) { + /*eslint no-param-reassign:0*/ + if (typeof data === 'string') { + try { + data = JSON.parse(data); + } catch (e) { + /* Ignore */ + } + } + return data; + }, + ], + + timeout: 0, + + xsrfCookieName: 'XSRF-TOKEN', + xsrfHeaderName: 'X-XSRF-TOKEN', + + maxContentLength: -1, + + validateStatus: function validateStatus(status) { + return status >= 200 && status < 300; + }, + }; + + defaults.headers = { + common: { + Accept: 'application/json, text/plain, */*', + }, + }; + + utils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) { + defaults.headers[method] = {}; + }); + + utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) { + defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE); + }); + + module.exports = defaults; + + /* WEBPACK VAR INJECTION */ + }).call(exports, __webpack_require__(84)); + + /***/ + }, + /* 146 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + var translations = (exports.translations = { + de: { + type: 'Deutsch', + comments: 'Kommentare ', + loading: 'Laden...', + 'description.force_refrech': 'Erzwingt die Aktualisierung aller Kommentare.', + 'description.support_markdown': 'Der Text unterstützt Github Flavored Markdown.', + 'description.delete_rule': 'Kommentare, die aelter als 24 Stunden sind, werden gelöscht.', + 'description.submit_rule': + 'Der Name wird beibehalten. Der Text wird während des Postens zurücksetzt.', + 'description.see_action_cable': + 'So sehen Action Cable sofort aktualisieren zwei Browser, öffnen Sie zwei Browser und senden Sie einen Kommentar!', + 'form.horizontal': 'Horizontale Form', + 'form.stacked': 'Gestapelte Form', + 'form.inline': 'Inline Form', + 'input.name.label': 'Name', + 'input.name.placeholder': 'Dein Name', + 'input.text.label': 'Text', + 'input.text.placeholder': 'Sagen Sie etwas mit markdown...', + 'input.saving': 'Speichern', + 'input.post': 'Schicken', + }, + en: { + type: 'English', + comments: 'Comments ', + loading: 'Loading...', + 'description.force_refrech': 'Force Refresh of All Comments.', + 'description.support_markdown': 'Text supports Github Flavored Markdown.', + 'description.delete_rule': 'Comments older than 24 hours are deleted.', + 'description.submit_rule': 'Name is preserved. Text is reset, between submits.', + 'description.see_action_cable': + 'To see Action Cable instantly update two browsers, open two browsers and submit a comment!', + 'form.horizontal': 'Horizontal Form', + 'form.stacked': 'Stacked Form', + 'form.inline': 'Inline Form', + 'input.name.label': 'Name', + 'input.name.placeholder': 'Your Name', + 'input.text.label': 'Text', + 'input.text.placeholder': 'Say something using markdown...', + 'input.saving': 'Saving', + 'input.post': 'Post', + 'errors.unavailable_session': + "Session %{id} is no longer available in memory.\n\nIf you happen to run on a multi-process server (like Unicorn or Puma) the process\nthis request hit doesn't store %{id} in memory. Consider turning the number of\nprocesses/workers to one (1) or using a different server in development.\n", + 'errors.unacceptable_request': 'A supported version is expected in the Accept header.\n', + 'errors.connection_refused': + 'Oops! Failed to connect to the Web Console middleware.\nPlease make sure a rails development server is running.\n', + }, + ja: { + type: '日本語', + comments: 'コメント ', + loading: '読み込んでいます...', + 'description.force_refrech': 'すべてのコメントを強制的にリフレッシュします。', + 'description.support_markdown': 'テキストは Github Flavored Markdown をサポートしています。', + 'description.delete_rule': 'コメントは24時間後削除されます。', + 'description.submit_rule': '送信の間に名前は保存され、テキストがリセットされます。', + 'description.see_action_cable': + 'Action Cableが即座に2つのブラウザを更新することを確認するには、2つのブラウザを開いてコメントを送信してください!', + 'form.horizontal': '水平フォーム', + 'form.stacked': '積み上げフォーム', + 'form.inline': 'インラインフォーム', + 'input.name.label': '名前', + 'input.name.placeholder': 'あなたの名前', + 'input.text.label': '本文', + 'input.text.placeholder': '何かが Markdown を使用して言います...', + 'input.saving': '保存', + 'input.post': 'サブミット', + }, + 'zh-CN': { + type: '简体中文', + comments: '评论 ', + loading: '载入中...', + 'description.force_refrech': '强制更新所有评论。', + 'description.support_markdown': '支援 Github Flavored Markdown。', + 'description.delete_rule': '评论于24小时后移除。', + 'description.submit_rule': '送出评论后, 名字保留并清除内容。', + 'description.see_action_cable': '要查看 Action Cable 立即更新两个浏览器,打开两个浏览器并提交评论!', + 'form.horizontal': '水平格式', + 'form.stacked': '堆叠格式', + 'form.inline': '内嵌格式', + 'input.name.label': '名字', + 'input.name.placeholder': '你的名字', + 'input.text.label': '内容', + 'input.text.placeholder': '使用markdown说些什么...', + 'input.saving': '储存', + 'input.post': '发表', + }, + 'zh-TW': { + type: '正體中文', + comments: '評論 ', + loading: '載入中...', + 'description.force_refrech': '強制更新所有評論。', + 'description.support_markdown': '支援 Github Flavored Markdown。', + 'description.delete_rule': '評論於24小時後移除。', + 'description.submit_rule': '送出評論後, 名字保留並清除內容。', + 'description.see_action_cable': '要查看 Action Cable 立即更新兩個瀏覽器,打開兩個瀏覽器並提交評論!', + 'form.horizontal': '水平格式', + 'form.stacked': '堆疊格式', + 'form.inline': '內嵌格式', + 'input.name.label': '名字', + 'input.name.placeholder': '你的名字', + 'input.text.label': '內容', + 'input.text.placeholder': '使用markdown說些什麼...', + 'input.saving': '儲存', + 'input.post': '發表', + }, + }); + + /***/ + }, + /* 147 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = { default: __webpack_require__(416), __esModule: true }; + + /***/ + }, + /* 148 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = { default: __webpack_require__(419), __esModule: true }; + + /***/ + }, + /* 149 */ + /***/ function (module, exports) { + var toString = {}.toString; + + module.exports = function (it) { + return toString.call(it).slice(8, -1); + }; + + /***/ + }, + /* 150 */ + /***/ function (module, exports) { + // IE 8- don't enum bug keys + module.exports = + 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'.split( + ',', + ); + + /***/ + }, + /* 151 */ + /***/ function (module, exports, __webpack_require__) { + var ctx = __webpack_require__(89), + call = __webpack_require__(250), + isArrayIter = __webpack_require__(248), + anObject = __webpack_require__(69), + toLength = __webpack_require__(124), + getIterFn = __webpack_require__(258), + BREAK = {}, + RETURN = {}; + var exports = (module.exports = function (iterable, entries, fn, that, ITERATOR) { + var iterFn = ITERATOR + ? function () { + return iterable; + } + : getIterFn(iterable), + f = ctx(fn, that, entries ? 2 : 1), + index = 0, + length, + step, + iterator, + result; + if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!'); + // fast case for arrays with default iterator + if (isArrayIter(iterFn)) + for (length = toLength(iterable.length); length > index; index++) { + result = entries ? f(anObject((step = iterable[index]))[0], step[1]) : f(iterable[index]); + if (result === BREAK || result === RETURN) return result; + } + else + for (iterator = iterFn.call(iterable); !(step = iterator.next()).done; ) { + result = call(iterator, f, step.value, entries); + if (result === BREAK || result === RETURN) return result; + } + }); + exports.BREAK = BREAK; + exports.RETURN = RETURN; + + /***/ + }, + /* 152 */ + /***/ function (module, exports, __webpack_require__) { + // fallback for non-array-like ES3 and non-enumerable old V8 strings + var cof = __webpack_require__(149); + module.exports = Object('z').propertyIsEnumerable(0) + ? Object + : function (it) { + return cof(it) == 'String' ? it.split('') : Object(it); + }; + + /***/ + }, + /* 153 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var LIBRARY = __webpack_require__(154), + $export = __webpack_require__(42), + redefine = __webpack_require__(257), + hide = __webpack_require__(60), + has = __webpack_require__(71), + Iterators = __webpack_require__(107), + $iterCreate = __webpack_require__(437), + setToStringTag = __webpack_require__(123), + getPrototypeOf = __webpack_require__(443), + ITERATOR = __webpack_require__(37)('iterator'), + BUGGY = !([].keys && 'next' in [].keys()), // Safari has buggy iterators w/o `next` + FF_ITERATOR = '@@iterator', + KEYS = 'keys', + VALUES = 'values'; + + var returnThis = function () { + return this; + }; + + module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) { + $iterCreate(Constructor, NAME, next); + var getMethod = function (kind) { + if (!BUGGY && kind in proto) return proto[kind]; + switch (kind) { + case KEYS: + return function keys() { + return new Constructor(this, kind); + }; + case VALUES: + return function values() { + return new Constructor(this, kind); + }; + } + return function entries() { + return new Constructor(this, kind); + }; + }; + var TAG = NAME + ' Iterator', + DEF_VALUES = DEFAULT == VALUES, + VALUES_BUG = false, + proto = Base.prototype, + $native = proto[ITERATOR] || proto[FF_ITERATOR] || (DEFAULT && proto[DEFAULT]), + $default = $native || getMethod(DEFAULT), + $entries = DEFAULT ? (!DEF_VALUES ? $default : getMethod('entries')) : undefined, + $anyNative = NAME == 'Array' ? proto.entries || $native : $native, + methods, + key, + IteratorPrototype; + // Fix native + if ($anyNative) { + IteratorPrototype = getPrototypeOf($anyNative.call(new Base())); + if (IteratorPrototype !== Object.prototype) { + // Set @@toStringTag to native iterators + setToStringTag(IteratorPrototype, TAG, true); + // fix for some old engines + if (!LIBRARY && !has(IteratorPrototype, ITERATOR)) hide(IteratorPrototype, ITERATOR, returnThis); + } + } + // fix Array#{values, @@iterator}.name in V8 / FF + if (DEF_VALUES && $native && $native.name !== VALUES) { + VALUES_BUG = true; + $default = function values() { + return $native.call(this); + }; + } + // Define iterator + if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) { + hide(proto, ITERATOR, $default); + } + // Plug for library + Iterators[NAME] = $default; + Iterators[TAG] = returnThis; + if (DEFAULT) { + methods = { + values: DEF_VALUES ? $default : getMethod(VALUES), + keys: IS_SET ? $default : getMethod(KEYS), + entries: $entries, + }; + if (FORCED) + for (key in methods) { + if (!(key in proto)) redefine(proto, key, methods[key]); + } + else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); + } + return methods; + }; + + /***/ + }, + /* 154 */ + /***/ function (module, exports) { + module.exports = true; + + /***/ + }, + /* 155 */ + /***/ function (module, exports, __webpack_require__) { + var META = __webpack_require__(125)('meta'), + isObject = __webpack_require__(72), + has = __webpack_require__(71), + setDesc = __webpack_require__(49).f, + id = 0; + var isExtensible = + Object.isExtensible || + function () { + return true; + }; + var FREEZE = !__webpack_require__(70)(function () { + return isExtensible(Object.preventExtensions({})); + }); + var setMeta = function (it) { + setDesc(it, META, { + value: { + i: 'O' + ++id, // object ID + w: {}, // weak collections IDs + }, + }); + }; + var fastKey = function (it, create) { + // return primitive with prefix + if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; + if (!has(it, META)) { + // can't set metadata to uncaught frozen object + if (!isExtensible(it)) return 'F'; + // not necessary to add metadata + if (!create) return 'E'; + // add missing metadata + setMeta(it); + // return object ID + } + return it[META].i; + }; + var getWeak = function (it, create) { + if (!has(it, META)) { + // can't set metadata to uncaught frozen object + if (!isExtensible(it)) return true; + // not necessary to add metadata + if (!create) return false; + // add missing metadata + setMeta(it); + // return hash weak collections IDs + } + return it[META].w; + }; + // add metadata on freeze-family methods calling + var onFreeze = function (it) { + if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it); + return it; + }; + var meta = (module.exports = { + KEY: META, + NEED: false, + fastKey: fastKey, + getWeak: getWeak, + onFreeze: onFreeze, + }); + + /***/ + }, + /* 156 */ + /***/ function (module, exports) { + exports.f = Object.getOwnPropertySymbols; + + /***/ + }, + /* 157 */ + /***/ function (module, exports, __webpack_require__) { + var shared = __webpack_require__(158)('keys'), + uid = __webpack_require__(125); + module.exports = function (key) { + return shared[key] || (shared[key] = uid(key)); + }; + + /***/ + }, + /* 158 */ + /***/ function (module, exports, __webpack_require__) { + var global = __webpack_require__(48), + SHARED = '__core-js_shared__', + store = global[SHARED] || (global[SHARED] = {}); + module.exports = function (key) { + return store[key] || (store[key] = {}); + }; + + /***/ + }, + /* 159 */ + /***/ function (module, exports) { + // 7.1.4 ToInteger + var ceil = Math.ceil, + floor = Math.floor; + module.exports = function (it) { + return isNaN((it = +it)) ? 0 : (it > 0 ? floor : ceil)(it); + }; + + /***/ + }, + /* 160 */ + /***/ function (module, exports, __webpack_require__) { + // 7.1.1 ToPrimitive(input [, PreferredType]) + var isObject = __webpack_require__(72); + // instead of the ES6 spec version, we didn't implement @@toPrimitive case + // and the second argument - flag - preferred type is a string + module.exports = function (it, S) { + if (!isObject(it)) return it; + var fn, val; + if (S && typeof (fn = it.toString) == 'function' && !isObject((val = fn.call(it)))) return val; + if (typeof (fn = it.valueOf) == 'function' && !isObject((val = fn.call(it)))) return val; + if (!S && typeof (fn = it.toString) == 'function' && !isObject((val = fn.call(it)))) return val; + throw TypeError("Can't convert object to primitive value"); + }; + + /***/ + }, + /* 161 */ + /***/ function (module, exports, __webpack_require__) { + var global = __webpack_require__(48), + core = __webpack_require__(18), + LIBRARY = __webpack_require__(154), + wksExt = __webpack_require__(162), + defineProperty = __webpack_require__(49).f; + module.exports = function (name) { + var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {}); + if (name.charAt(0) != '_' && !(name in $Symbol)) + defineProperty($Symbol, name, { value: wksExt.f(name) }); + }; + + /***/ + }, + /* 162 */ + /***/ function (module, exports, __webpack_require__) { + exports.f = __webpack_require__(37); + + /***/ + }, + /* 163 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $at = __webpack_require__(447)(true); + + // 21.1.3.27 String.prototype[@@iterator]() + __webpack_require__(153)( + String, + 'String', + function (iterated) { + this._t = String(iterated); // target + this._i = 0; // next index + // 21.1.5.2.1 %StringIteratorPrototype%.next() + }, + function () { + var O = this._t, + index = this._i, + point; + if (index >= O.length) return { value: undefined, done: true }; + point = $at(O, index); + this._i += point.length; + return { value: point, done: false }; + }, + ); + + /***/ + }, + /* 164 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + // 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length) + + var toObject = __webpack_require__(17), + toIndex = __webpack_require__(81), + toLength = __webpack_require__(15); + module.exports = function fill(value /*, start = 0, end = @length */) { + var O = toObject(this), + length = toLength(O.length), + aLen = arguments.length, + index = toIndex(aLen > 1 ? arguments[1] : undefined, length), + end = aLen > 2 ? arguments[2] : undefined, + endPos = end === undefined ? length : toIndex(end, length); + while (endPos > index) O[index++] = value; + return O; + }; + + /***/ + }, + /* 165 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $defineProperty = __webpack_require__(12), + createDesc = __webpack_require__(63); + + module.exports = function (object, index, value) { + if (index in object) $defineProperty.f(object, index, createDesc(0, value)); + else object[index] = value; + }; + + /***/ + }, + /* 166 */ + /***/ function (module, exports, __webpack_require__) { + var isObject = __webpack_require__(9), + document = __webpack_require__(6).document, + // in old IE typeof document.createElement is 'object' + is = isObject(document) && isObject(document.createElement); + module.exports = function (it) { + return is ? document.createElement(it) : {}; + }; + + /***/ + }, + /* 167 */ + /***/ function (module, exports) { + // IE 8- don't enum bug keys + module.exports = + 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'.split( + ',', + ); + + /***/ + }, + /* 168 */ + /***/ function (module, exports, __webpack_require__) { + var MATCH = __webpack_require__(10)('match'); + module.exports = function (KEY) { + var re = /./; + try { + '/./'[KEY](re); + } catch (e) { + try { + re[MATCH] = false; + return !'/./'[KEY](re); + } catch (f) { + /* empty */ + } + } + return true; + }; + + /***/ + }, + /* 169 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = __webpack_require__(6).document && document.documentElement; + + /***/ + }, + /* 170 */ + /***/ function (module, exports, __webpack_require__) { + var isObject = __webpack_require__(9), + setPrototypeOf = __webpack_require__(178).set; + module.exports = function (that, target, C) { + var P, + S = target.constructor; + if ( + S !== C && + typeof S == 'function' && + (P = S.prototype) !== C.prototype && + isObject(P) && + setPrototypeOf + ) { + setPrototypeOf(that, P); + } + return that; + }; + + /***/ + }, + /* 171 */ + /***/ function (module, exports, __webpack_require__) { + // check on default Array iterator + var Iterators = __webpack_require__(92), + ITERATOR = __webpack_require__(10)('iterator'), + ArrayProto = Array.prototype; + + module.exports = function (it) { + return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it); + }; + + /***/ + }, + /* 172 */ + /***/ function (module, exports, __webpack_require__) { + // 7.2.2 IsArray(argument) + var cof = __webpack_require__(43); + module.exports = + Array.isArray || + function isArray(arg) { + return cof(arg) == 'Array'; + }; + + /***/ + }, + /* 173 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var create = __webpack_require__(76), + descriptor = __webpack_require__(63), + setToStringTag = __webpack_require__(93), + IteratorPrototype = {}; + + // 25.1.2.1.1 %IteratorPrototype%[@@iterator]() + __webpack_require__(29)(IteratorPrototype, __webpack_require__(10)('iterator'), function () { + return this; + }); + + module.exports = function (Constructor, NAME, next) { + Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) }); + setToStringTag(Constructor, NAME + ' Iterator'); + }; + + /***/ + }, + /* 174 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var LIBRARY = __webpack_require__(75), + $export = __webpack_require__(0), + redefine = __webpack_require__(30), + hide = __webpack_require__(29), + has = __webpack_require__(21), + Iterators = __webpack_require__(92), + $iterCreate = __webpack_require__(173), + setToStringTag = __webpack_require__(93), + getPrototypeOf = __webpack_require__(39), + ITERATOR = __webpack_require__(10)('iterator'), + BUGGY = !([].keys && 'next' in [].keys()), // Safari has buggy iterators w/o `next` + FF_ITERATOR = '@@iterator', + KEYS = 'keys', + VALUES = 'values'; + + var returnThis = function () { + return this; + }; + + module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) { + $iterCreate(Constructor, NAME, next); + var getMethod = function (kind) { + if (!BUGGY && kind in proto) return proto[kind]; + switch (kind) { + case KEYS: + return function keys() { + return new Constructor(this, kind); + }; + case VALUES: + return function values() { + return new Constructor(this, kind); + }; + } + return function entries() { + return new Constructor(this, kind); + }; + }; + var TAG = NAME + ' Iterator', + DEF_VALUES = DEFAULT == VALUES, + VALUES_BUG = false, + proto = Base.prototype, + $native = proto[ITERATOR] || proto[FF_ITERATOR] || (DEFAULT && proto[DEFAULT]), + $default = $native || getMethod(DEFAULT), + $entries = DEFAULT ? (!DEF_VALUES ? $default : getMethod('entries')) : undefined, + $anyNative = NAME == 'Array' ? proto.entries || $native : $native, + methods, + key, + IteratorPrototype; + // Fix native + if ($anyNative) { + IteratorPrototype = getPrototypeOf($anyNative.call(new Base())); + if (IteratorPrototype !== Object.prototype) { + // Set @@toStringTag to native iterators + setToStringTag(IteratorPrototype, TAG, true); + // fix for some old engines + if (!LIBRARY && !has(IteratorPrototype, ITERATOR)) hide(IteratorPrototype, ITERATOR, returnThis); + } + } + // fix Array#{values, @@iterator}.name in V8 / FF + if (DEF_VALUES && $native && $native.name !== VALUES) { + VALUES_BUG = true; + $default = function values() { + return $native.call(this); + }; + } + // Define iterator + if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) { + hide(proto, ITERATOR, $default); + } + // Plug for library + Iterators[NAME] = $default; + Iterators[TAG] = returnThis; + if (DEFAULT) { + methods = { + values: DEF_VALUES ? $default : getMethod(VALUES), + keys: IS_SET ? $default : getMethod(KEYS), + entries: $entries, + }; + if (FORCED) + for (key in methods) { + if (!(key in proto)) redefine(proto, key, methods[key]); + } + else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); + } + return methods; + }; + + /***/ + }, + /* 175 */ + /***/ function (module, exports) { + // 20.2.2.14 Math.expm1(x) + var $expm1 = Math.expm1; + module.exports = + !$expm1 || + // Old FF bug + $expm1(10) > 22025.465794806719 || + $expm1(10) < 22025.4657948067165168 || + // Tor Browser bug + $expm1(-2e-17) != -2e-17 + ? function expm1(x) { + return (x = +x) == 0 ? x : x > -1e-6 && x < 1e-6 ? x + (x * x) / 2 : Math.exp(x) - 1; + } + : $expm1; + + /***/ + }, + /* 176 */ + /***/ function (module, exports) { + // 20.2.2.28 Math.sign(x) + module.exports = + Math.sign || + function sign(x) { + return (x = +x) == 0 || x != x ? x : x < 0 ? -1 : 1; + }; + + /***/ + }, + /* 177 */ + /***/ function (module, exports, __webpack_require__) { + var global = __webpack_require__(6), + macrotask = __webpack_require__(185).set, + Observer = global.MutationObserver || global.WebKitMutationObserver, + process = global.process, + Promise = global.Promise, + isNode = __webpack_require__(43)(process) == 'process'; + + module.exports = function () { + var head, last, notify; + + var flush = function () { + var parent, fn; + if (isNode && (parent = process.domain)) parent.exit(); + while (head) { + fn = head.fn; + head = head.next; + try { + fn(); + } catch (e) { + if (head) notify(); + else last = undefined; + throw e; + } + } + last = undefined; + if (parent) parent.enter(); + }; + + // Node.js + if (isNode) { + notify = function () { + process.nextTick(flush); + }; + // browsers with MutationObserver + } else if (Observer) { + var toggle = true, + node = document.createTextNode(''); + new Observer(flush).observe(node, { characterData: true }); // eslint-disable-line no-new + notify = function () { + node.data = toggle = !toggle; + }; + // environments with maybe non-completely correct, but existent Promise + } else if (Promise && Promise.resolve) { + var promise = Promise.resolve(); + notify = function () { + promise.then(flush); + }; + // for other environments - macrotask based on: + // - setImmediate + // - MessageChannel + // - window.postMessag + // - onreadystatechange + // - setTimeout + } else { + notify = function () { + // strange IE + webpack dev server bug - use .call(global) + macrotask.call(global, flush); + }; + } + + return function (fn) { + var task = { fn: fn, next: undefined }; + if (last) last.next = task; + if (!head) { + head = task; + notify(); + } + last = task; + }; + }; + + /***/ + }, + /* 178 */ + /***/ function (module, exports, __webpack_require__) { + // Works with __proto__ only. Old v8 can't work with null proto objects. + /* eslint-disable no-proto */ + var isObject = __webpack_require__(9), + anObject = __webpack_require__(4); + var check = function (O, proto) { + anObject(O); + if (!isObject(proto) && proto !== null) throw TypeError(proto + ": can't set as prototype!"); + }; + module.exports = { + set: + Object.setPrototypeOf || + ('__proto__' in {} // eslint-disable-line + ? (function (test, buggy, set) { + try { + set = __webpack_require__(57)( + Function.call, + __webpack_require__(38).f(Object.prototype, '__proto__').set, + 2, + ); + set(test, []); + buggy = !(test instanceof Array); + } catch (e) { + buggy = true; + } + return function setPrototypeOf(O, proto) { + check(O, proto); + if (buggy) O.__proto__ = proto; + else set(O, proto); + return O; + }; + })({}, false) + : undefined), + check: check, + }; + + /***/ + }, + /* 179 */ + /***/ function (module, exports, __webpack_require__) { + var shared = __webpack_require__(135)('keys'), + uid = __webpack_require__(82); + module.exports = function (key) { + return shared[key] || (shared[key] = uid(key)); + }; + + /***/ + }, + /* 180 */ + /***/ function (module, exports, __webpack_require__) { + // 7.3.20 SpeciesConstructor(O, defaultConstructor) + var anObject = __webpack_require__(4), + aFunction = __webpack_require__(28), + SPECIES = __webpack_require__(10)('species'); + module.exports = function (O, D) { + var C = anObject(O).constructor, + S; + return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S); + }; + + /***/ + }, + /* 181 */ + /***/ function (module, exports, __webpack_require__) { + var toInteger = __webpack_require__(64), + defined = __webpack_require__(44); + // true -> String#at + // false -> String#codePointAt + module.exports = function (TO_STRING) { + return function (that, pos) { + var s = String(defined(that)), + i = toInteger(pos), + l = s.length, + a, + b; + if (i < 0 || i >= l) return TO_STRING ? '' : undefined; + a = s.charCodeAt(i); + return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff + ? TO_STRING + ? s.charAt(i) + : a + : TO_STRING + ? s.slice(i, i + 2) + : ((a - 0xd800) << 10) + (b - 0xdc00) + 0x10000; + }; + }; + + /***/ + }, + /* 182 */ + /***/ function (module, exports, __webpack_require__) { + // helper for String#{startsWith, endsWith, includes} + var isRegExp = __webpack_require__(131), + defined = __webpack_require__(44); + + module.exports = function (that, searchString, NAME) { + if (isRegExp(searchString)) throw TypeError('String#' + NAME + " doesn't accept regex!"); + return String(defined(that)); + }; + + /***/ + }, + /* 183 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var toInteger = __webpack_require__(64), + defined = __webpack_require__(44); + + module.exports = function repeat(count) { + var str = String(defined(this)), + res = '', + n = toInteger(count); + if (n < 0 || n == Infinity) throw RangeError("Count can't be negative"); + for (; n > 0; (n >>>= 1) && (str += str)) if (n & 1) res += str; + return res; + }; + + /***/ + }, + /* 184 */ + /***/ function (module, exports) { + module.exports = + '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' + + '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'; + + /***/ + }, + /* 185 */ + /***/ function (module, exports, __webpack_require__) { + var ctx = __webpack_require__(57), + invoke = __webpack_require__(130), + html = __webpack_require__(169), + cel = __webpack_require__(166), + global = __webpack_require__(6), + process = global.process, + setTask = global.setImmediate, + clearTask = global.clearImmediate, + MessageChannel = global.MessageChannel, + counter = 0, + queue = {}, + ONREADYSTATECHANGE = 'onreadystatechange', + defer, + channel, + port; + var run = function () { + var id = +this; + if (queue.hasOwnProperty(id)) { + var fn = queue[id]; + delete queue[id]; + fn(); + } + }; + var listener = function (event) { + run.call(event.data); + }; + // Node.js 0.9+ & IE10+ has setImmediate, otherwise: + if (!setTask || !clearTask) { + setTask = function setImmediate(fn) { + var args = [], + i = 1; + while (arguments.length > i) args.push(arguments[i++]); + queue[++counter] = function () { + invoke(typeof fn == 'function' ? fn : Function(fn), args); + }; + defer(counter); + return counter; + }; + clearTask = function clearImmediate(id) { + delete queue[id]; + }; + // Node.js 0.8- + if (__webpack_require__(43)(process) == 'process') { + defer = function (id) { + process.nextTick(ctx(run, id, 1)); + }; + // Browsers with MessageChannel, includes WebWorkers + } else if (MessageChannel) { + channel = new MessageChannel(); + port = channel.port2; + channel.port1.onmessage = listener; + defer = ctx(port.postMessage, port, 1); + // Browsers with postMessage, skip WebWorkers + // IE8 has postMessage, but it's sync & typeof its postMessage is 'object' + } else if (global.addEventListener && typeof postMessage == 'function' && !global.importScripts) { + defer = function (id) { + global.postMessage(id + '', '*'); + }; + global.addEventListener('message', listener, false); + // IE8- + } else if (ONREADYSTATECHANGE in cel('script')) { + defer = function (id) { + html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function () { + html.removeChild(this); + run.call(id); + }; + }; + // Rest old browsers + } else { + defer = function (id) { + setTimeout(ctx(run, id, 1), 0); + }; + } + } + module.exports = { + set: setTask, + clear: clearTask, + }; + + /***/ + }, + /* 186 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var global = __webpack_require__(6), + DESCRIPTORS = __webpack_require__(11), + LIBRARY = __webpack_require__(75), + $typed = __webpack_require__(136), + hide = __webpack_require__(29), + redefineAll = __webpack_require__(79), + fails = __webpack_require__(7), + anInstance = __webpack_require__(74), + toInteger = __webpack_require__(64), + toLength = __webpack_require__(15), + gOPN = __webpack_require__(77).f, + dP = __webpack_require__(12).f, + arrayFill = __webpack_require__(164), + setToStringTag = __webpack_require__(93), + ARRAY_BUFFER = 'ArrayBuffer', + DATA_VIEW = 'DataView', + PROTOTYPE = 'prototype', + WRONG_LENGTH = 'Wrong length!', + WRONG_INDEX = 'Wrong index!', + $ArrayBuffer = global[ARRAY_BUFFER], + $DataView = global[DATA_VIEW], + Math = global.Math, + RangeError = global.RangeError, + Infinity = global.Infinity, + BaseBuffer = $ArrayBuffer, + abs = Math.abs, + pow = Math.pow, + floor = Math.floor, + log = Math.log, + LN2 = Math.LN2, + BUFFER = 'buffer', + BYTE_LENGTH = 'byteLength', + BYTE_OFFSET = 'byteOffset', + $BUFFER = DESCRIPTORS ? '_b' : BUFFER, + $LENGTH = DESCRIPTORS ? '_l' : BYTE_LENGTH, + $OFFSET = DESCRIPTORS ? '_o' : BYTE_OFFSET; + + // IEEE754 conversions based on https://github.com/feross/ieee754 + var packIEEE754 = function (value, mLen, nBytes) { + var buffer = Array(nBytes), + eLen = nBytes * 8 - mLen - 1, + eMax = (1 << eLen) - 1, + eBias = eMax >> 1, + rt = mLen === 23 ? pow(2, -24) - pow(2, -77) : 0, + i = 0, + s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0, + e, + m, + c; + value = abs(value); + if (value != value || value === Infinity) { + m = value != value ? 1 : 0; + e = eMax; + } else { + e = floor(log(value) / LN2); + if (value * (c = pow(2, -e)) < 1) { + e--; + c *= 2; + } + if (e + eBias >= 1) { + value += rt / c; + } else { + value += rt * pow(2, 1 - eBias); + } + if (value * c >= 2) { + e++; + c /= 2; + } + if (e + eBias >= eMax) { + m = 0; + e = eMax; + } else if (e + eBias >= 1) { + m = (value * c - 1) * pow(2, mLen); + e = e + eBias; + } else { + m = value * pow(2, eBias - 1) * pow(2, mLen); + e = 0; + } + } + for (; mLen >= 8; buffer[i++] = m & 255, m /= 256, mLen -= 8); + e = (e << mLen) | m; + eLen += mLen; + for (; eLen > 0; buffer[i++] = e & 255, e /= 256, eLen -= 8); + buffer[--i] |= s * 128; + return buffer; + }; + var unpackIEEE754 = function (buffer, mLen, nBytes) { + var eLen = nBytes * 8 - mLen - 1, + eMax = (1 << eLen) - 1, + eBias = eMax >> 1, + nBits = eLen - 7, + i = nBytes - 1, + s = buffer[i--], + e = s & 127, + m; + s >>= 7; + for (; nBits > 0; e = e * 256 + buffer[i], i--, nBits -= 8); + m = e & ((1 << -nBits) - 1); + e >>= -nBits; + nBits += mLen; + for (; nBits > 0; m = m * 256 + buffer[i], i--, nBits -= 8); + if (e === 0) { + e = 1 - eBias; + } else if (e === eMax) { + return m ? NaN : s ? -Infinity : Infinity; + } else { + m = m + pow(2, mLen); + e = e - eBias; + } + return (s ? -1 : 1) * m * pow(2, e - mLen); + }; + + var unpackI32 = function (bytes) { + return (bytes[3] << 24) | (bytes[2] << 16) | (bytes[1] << 8) | bytes[0]; + }; + var packI8 = function (it) { + return [it & 0xff]; + }; + var packI16 = function (it) { + return [it & 0xff, (it >> 8) & 0xff]; + }; + var packI32 = function (it) { + return [it & 0xff, (it >> 8) & 0xff, (it >> 16) & 0xff, (it >> 24) & 0xff]; + }; + var packF64 = function (it) { + return packIEEE754(it, 52, 8); + }; + var packF32 = function (it) { + return packIEEE754(it, 23, 4); + }; + + var addGetter = function (C, key, internal) { + dP(C[PROTOTYPE], key, { + get: function () { + return this[internal]; + }, + }); + }; + + var get = function (view, bytes, index, isLittleEndian) { + var numIndex = +index, + intIndex = toInteger(numIndex); + if (numIndex != intIndex || intIndex < 0 || intIndex + bytes > view[$LENGTH]) + throw RangeError(WRONG_INDEX); + var store = view[$BUFFER]._b, + start = intIndex + view[$OFFSET], + pack = store.slice(start, start + bytes); + return isLittleEndian ? pack : pack.reverse(); + }; + var set = function (view, bytes, index, conversion, value, isLittleEndian) { + var numIndex = +index, + intIndex = toInteger(numIndex); + if (numIndex != intIndex || intIndex < 0 || intIndex + bytes > view[$LENGTH]) + throw RangeError(WRONG_INDEX); + var store = view[$BUFFER]._b, + start = intIndex + view[$OFFSET], + pack = conversion(+value); + for (var i = 0; i < bytes; i++) store[start + i] = pack[isLittleEndian ? i : bytes - i - 1]; + }; + + var validateArrayBufferArguments = function (that, length) { + anInstance(that, $ArrayBuffer, ARRAY_BUFFER); + var numberLength = +length, + byteLength = toLength(numberLength); + if (numberLength != byteLength) throw RangeError(WRONG_LENGTH); + return byteLength; + }; + + if (!$typed.ABV) { + $ArrayBuffer = function ArrayBuffer(length) { + var byteLength = validateArrayBufferArguments(this, length); + this._b = arrayFill.call(Array(byteLength), 0); + this[$LENGTH] = byteLength; + }; + + $DataView = function DataView(buffer, byteOffset, byteLength) { + anInstance(this, $DataView, DATA_VIEW); + anInstance(buffer, $ArrayBuffer, DATA_VIEW); + var bufferLength = buffer[$LENGTH], + offset = toInteger(byteOffset); + if (offset < 0 || offset > bufferLength) throw RangeError('Wrong offset!'); + byteLength = byteLength === undefined ? bufferLength - offset : toLength(byteLength); + if (offset + byteLength > bufferLength) throw RangeError(WRONG_LENGTH); + this[$BUFFER] = buffer; + this[$OFFSET] = offset; + this[$LENGTH] = byteLength; + }; + + if (DESCRIPTORS) { + addGetter($ArrayBuffer, BYTE_LENGTH, '_l'); + addGetter($DataView, BUFFER, '_b'); + addGetter($DataView, BYTE_LENGTH, '_l'); + addGetter($DataView, BYTE_OFFSET, '_o'); + } + + redefineAll($DataView[PROTOTYPE], { + getInt8: function getInt8(byteOffset) { + return (get(this, 1, byteOffset)[0] << 24) >> 24; + }, + getUint8: function getUint8(byteOffset) { + return get(this, 1, byteOffset)[0]; + }, + getInt16: function getInt16(byteOffset /*, littleEndian */) { + var bytes = get(this, 2, byteOffset, arguments[1]); + return (((bytes[1] << 8) | bytes[0]) << 16) >> 16; + }, + getUint16: function getUint16(byteOffset /*, littleEndian */) { + var bytes = get(this, 2, byteOffset, arguments[1]); + return (bytes[1] << 8) | bytes[0]; + }, + getInt32: function getInt32(byteOffset /*, littleEndian */) { + return unpackI32(get(this, 4, byteOffset, arguments[1])); + }, + getUint32: function getUint32(byteOffset /*, littleEndian */) { + return unpackI32(get(this, 4, byteOffset, arguments[1])) >>> 0; + }, + getFloat32: function getFloat32(byteOffset /*, littleEndian */) { + return unpackIEEE754(get(this, 4, byteOffset, arguments[1]), 23, 4); + }, + getFloat64: function getFloat64(byteOffset /*, littleEndian */) { + return unpackIEEE754(get(this, 8, byteOffset, arguments[1]), 52, 8); + }, + setInt8: function setInt8(byteOffset, value) { + set(this, 1, byteOffset, packI8, value); + }, + setUint8: function setUint8(byteOffset, value) { + set(this, 1, byteOffset, packI8, value); + }, + setInt16: function setInt16(byteOffset, value /*, littleEndian */) { + set(this, 2, byteOffset, packI16, value, arguments[2]); + }, + setUint16: function setUint16(byteOffset, value /*, littleEndian */) { + set(this, 2, byteOffset, packI16, value, arguments[2]); + }, + setInt32: function setInt32(byteOffset, value /*, littleEndian */) { + set(this, 4, byteOffset, packI32, value, arguments[2]); + }, + setUint32: function setUint32(byteOffset, value /*, littleEndian */) { + set(this, 4, byteOffset, packI32, value, arguments[2]); + }, + setFloat32: function setFloat32(byteOffset, value /*, littleEndian */) { + set(this, 4, byteOffset, packF32, value, arguments[2]); + }, + setFloat64: function setFloat64(byteOffset, value /*, littleEndian */) { + set(this, 8, byteOffset, packF64, value, arguments[2]); + }, + }); + } else { + if ( + !fails(function () { + new $ArrayBuffer(); // eslint-disable-line no-new + }) || + !fails(function () { + new $ArrayBuffer(0.5); // eslint-disable-line no-new + }) + ) { + $ArrayBuffer = function ArrayBuffer(length) { + return new BaseBuffer(validateArrayBufferArguments(this, length)); + }; + var ArrayBufferProto = ($ArrayBuffer[PROTOTYPE] = BaseBuffer[PROTOTYPE]); + for (var keys = gOPN(BaseBuffer), j = 0, key; keys.length > j; ) { + if (!((key = keys[j++]) in $ArrayBuffer)) hide($ArrayBuffer, key, BaseBuffer[key]); + } + if (!LIBRARY) ArrayBufferProto.constructor = $ArrayBuffer; + } + // iOS Safari 7.x bug + var view = new $DataView(new $ArrayBuffer(2)), + $setInt8 = $DataView[PROTOTYPE].setInt8; + view.setInt8(0, 2147483648); + view.setInt8(1, 2147483649); + if (view.getInt8(0) || !view.getInt8(1)) + redefineAll( + $DataView[PROTOTYPE], + { + setInt8: function setInt8(byteOffset, value) { + $setInt8.call(this, byteOffset, (value << 24) >> 24); + }, + setUint8: function setUint8(byteOffset, value) { + $setInt8.call(this, byteOffset, (value << 24) >> 24); + }, + }, + true, + ); + } + setToStringTag($ArrayBuffer, ARRAY_BUFFER); + setToStringTag($DataView, DATA_VIEW); + hide($DataView[PROTOTYPE], $typed.VIEW, true); + exports[ARRAY_BUFFER] = $ArrayBuffer; + exports[DATA_VIEW] = $DataView; + + /***/ + }, + /* 187 */ + /***/ function (module, exports, __webpack_require__) { + var global = __webpack_require__(6), + core = __webpack_require__(56), + LIBRARY = __webpack_require__(75), + wksExt = __webpack_require__(284), + defineProperty = __webpack_require__(12).f; + module.exports = function (name) { + var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {}); + if (name.charAt(0) != '_' && !(name in $Symbol)) + defineProperty($Symbol, name, { value: wksExt.f(name) }); + }; + + /***/ + }, + /* 188 */ + /***/ function (module, exports, __webpack_require__) { + var classof = __webpack_require__(111), + ITERATOR = __webpack_require__(10)('iterator'), + Iterators = __webpack_require__(92); + module.exports = __webpack_require__(56).getIteratorMethod = function (it) { + if (it != undefined) return it[ITERATOR] || it['@@iterator'] || Iterators[classof(it)]; + }; + + /***/ + }, + /* 189 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var addToUnscopables = __webpack_require__(90), + step = __webpack_require__(272), + Iterators = __webpack_require__(92), + toIObject = __webpack_require__(32); + + // 22.1.3.4 Array.prototype.entries() + // 22.1.3.13 Array.prototype.keys() + // 22.1.3.29 Array.prototype.values() + // 22.1.3.30 Array.prototype[@@iterator]() + module.exports = __webpack_require__(174)( + Array, + 'Array', + function (iterated, kind) { + this._t = toIObject(iterated); // target + this._i = 0; // next index + this._k = kind; // kind + // 22.1.5.2.1 %ArrayIteratorPrototype%.next() + }, + function () { + var O = this._t, + kind = this._k, + index = this._i++; + if (!O || index >= O.length) { + this._t = undefined; + return step(1); + } + if (kind == 'keys') return step(0, index); + if (kind == 'values') return step(0, O[index]); + return step(0, [index, O[index]]); + }, + 'values', + ); + + // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) + Iterators.Arguments = Iterators.Array; + + addToUnscopables('keys'); + addToUnscopables('values'); + addToUnscopables('entries'); + + /***/ + }, + /* 190 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @typechecks + * + */ + + /*eslint-disable no-self-compare */ + + var hasOwnProperty = Object.prototype.hasOwnProperty; + + /** + * inlined Object.is polyfill to avoid requiring consumers ship their own + * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is + */ + function is(x, y) { + // SameValue algorithm + if (x === y) { + // Steps 1-5, 7-10 + // Steps 6.b-6.e: +0 != -0 + // Added the nonzero y check to make Flow happy, but it is redundant + return x !== 0 || y !== 0 || 1 / x === 1 / y; + } else { + // Step 6.a: NaN == NaN + return x !== x && y !== y; + } + } + + /** + * Performs equality by iterating through keys on an object and returning false + * when any key has values which are not strictly equal between the arguments. + * Returns true when the values of all keys are strictly equal. + */ + function shallowEqual(objA, objB) { + if (is(objA, objB)) { + return true; + } + + if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) { + return false; + } + + var keysA = Object.keys(objA); + var keysB = Object.keys(objB); + + if (keysA.length !== keysB.length) { + return false; + } + + // Test for A's keys different from B. + for (var i = 0; i < keysA.length; i++) { + if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) { + return false; + } + } + + return true; + } + + module.exports = shallowEqual; + + /***/ + }, + /* 191 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + exports.go = + exports.replaceLocation = + exports.pushLocation = + exports.startListener = + exports.getUserConfirmation = + exports.getCurrentLocation = + undefined; + + var _LocationUtils = __webpack_require__(95); + + var _DOMUtils = __webpack_require__(138); + + var _DOMStateStorage = __webpack_require__(292); + + var _PathUtils = __webpack_require__(65); + + var _ExecutionEnvironment = __webpack_require__(192); + + var PopStateEvent = 'popstate'; + var HashChangeEvent = 'hashchange'; + + var needsHashchangeListener = + _ExecutionEnvironment.canUseDOM && !(0, _DOMUtils.supportsPopstateOnHashchange)(); + + var _createLocation = function _createLocation(historyState) { + var key = historyState && historyState.key; + + return (0, _LocationUtils.createLocation)( + { + pathname: window.location.pathname, + search: window.location.search, + hash: window.location.hash, + state: key ? (0, _DOMStateStorage.readState)(key) : undefined, + }, + undefined, + key, + ); + }; + + var getCurrentLocation = (exports.getCurrentLocation = function getCurrentLocation() { + var historyState = void 0; + try { + historyState = window.history.state || {}; + } catch (error) { + // IE 11 sometimes throws when accessing window.history.state + // See https://github.com/ReactTraining/history/pull/289 + historyState = {}; + } + + return _createLocation(historyState); + }); + + var getUserConfirmation = (exports.getUserConfirmation = function getUserConfirmation( + message, + callback, + ) { + return callback(window.confirm(message)); + }); // eslint-disable-line no-alert + + var startListener = (exports.startListener = function startListener(listener) { + var handlePopState = function handlePopState(event) { + if ((0, _DOMUtils.isExtraneousPopstateEvent)(event)) + // Ignore extraneous popstate events in WebKit + return; + listener(_createLocation(event.state)); + }; + + (0, _DOMUtils.addEventListener)(window, PopStateEvent, handlePopState); + + var handleUnpoppedHashChange = function handleUnpoppedHashChange() { + return listener(getCurrentLocation()); + }; + + if (needsHashchangeListener) { + (0, _DOMUtils.addEventListener)(window, HashChangeEvent, handleUnpoppedHashChange); + } + + return function () { + (0, _DOMUtils.removeEventListener)(window, PopStateEvent, handlePopState); + + if (needsHashchangeListener) { + (0, _DOMUtils.removeEventListener)(window, HashChangeEvent, handleUnpoppedHashChange); + } + }; + }); + + var updateLocation = function updateLocation(location, updateState) { + var state = location.state, + key = location.key; + + if (state !== undefined) (0, _DOMStateStorage.saveState)(key, state); + + updateState({ key: key }, (0, _PathUtils.createPath)(location)); + }; + + var pushLocation = (exports.pushLocation = function pushLocation(location) { + return updateLocation(location, function (state, path) { + return window.history.pushState(state, null, path); + }); + }); + + var replaceLocation = (exports.replaceLocation = function replaceLocation(location) { + return updateLocation(location, function (state, path) { + return window.history.replaceState(state, null, path); + }); + }); + + var go = (exports.go = function go(n) { + if (n) window.history.go(n); + }); + + /***/ + }, + /* 192 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + var canUseDOM = (exports.canUseDOM = !!( + typeof window !== 'undefined' && + window.document && + window.document.createElement + )); + + /***/ + }, + /* 193 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + + var _AsyncUtils = __webpack_require__(663); + + var _PathUtils = __webpack_require__(65); + + var _runTransitionHook = __webpack_require__(194); + + var _runTransitionHook2 = _interopRequireDefault(_runTransitionHook); + + var _Actions = __webpack_require__(137); + + var _LocationUtils = __webpack_require__(95); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + var createHistory = function createHistory() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + var getCurrentLocation = options.getCurrentLocation, + getUserConfirmation = options.getUserConfirmation, + pushLocation = options.pushLocation, + replaceLocation = options.replaceLocation, + go = options.go, + keyLength = options.keyLength; + + var currentLocation = void 0; + var pendingLocation = void 0; + var beforeListeners = []; + var listeners = []; + var allKeys = []; + + var getCurrentIndex = function getCurrentIndex() { + if (pendingLocation && pendingLocation.action === _Actions.POP) + return allKeys.indexOf(pendingLocation.key); + + if (currentLocation) return allKeys.indexOf(currentLocation.key); + + return -1; + }; + + var updateLocation = function updateLocation(nextLocation) { + var currentIndex = getCurrentIndex(); + + currentLocation = nextLocation; + + if (currentLocation.action === _Actions.PUSH) { + allKeys = [].concat(allKeys.slice(0, currentIndex + 1), [currentLocation.key]); + } else if (currentLocation.action === _Actions.REPLACE) { + allKeys[currentIndex] = currentLocation.key; + } + + listeners.forEach(function (listener) { + return listener(currentLocation); + }); + }; + + var listenBefore = function listenBefore(listener) { + beforeListeners.push(listener); + + return function () { + return (beforeListeners = beforeListeners.filter(function (item) { + return item !== listener; + })); + }; + }; + + var listen = function listen(listener) { + listeners.push(listener); + + return function () { + return (listeners = listeners.filter(function (item) { + return item !== listener; + })); + }; + }; + + var confirmTransitionTo = function confirmTransitionTo(location, callback) { + (0, _AsyncUtils.loopAsync)( + beforeListeners.length, + function (index, next, done) { + (0, _runTransitionHook2.default)(beforeListeners[index], location, function (result) { + return result != null ? done(result) : next(); + }); + }, + function (message) { + if (getUserConfirmation && typeof message === 'string') { + getUserConfirmation(message, function (ok) { + return callback(ok !== false); + }); + } else { + callback(message !== false); + } + }, + ); + }; + + var transitionTo = function transitionTo(nextLocation) { + if ( + (currentLocation && (0, _LocationUtils.locationsAreEqual)(currentLocation, nextLocation)) || + (pendingLocation && (0, _LocationUtils.locationsAreEqual)(pendingLocation, nextLocation)) + ) + return; // Nothing to do + + pendingLocation = nextLocation; + + confirmTransitionTo(nextLocation, function (ok) { + if (pendingLocation !== nextLocation) return; // Transition was interrupted during confirmation + + pendingLocation = null; + + if (ok) { + // Treat PUSH to same path like REPLACE to be consistent with browsers + if (nextLocation.action === _Actions.PUSH) { + var prevPath = (0, _PathUtils.createPath)(currentLocation); + var nextPath = (0, _PathUtils.createPath)(nextLocation); + + if ( + nextPath === prevPath && + (0, _LocationUtils.statesAreEqual)(currentLocation.state, nextLocation.state) + ) + nextLocation.action = _Actions.REPLACE; + } + + if (nextLocation.action === _Actions.POP) { + updateLocation(nextLocation); + } else if (nextLocation.action === _Actions.PUSH) { + if (pushLocation(nextLocation) !== false) updateLocation(nextLocation); + } else if (nextLocation.action === _Actions.REPLACE) { + if (replaceLocation(nextLocation) !== false) updateLocation(nextLocation); + } + } else if (currentLocation && nextLocation.action === _Actions.POP) { + var prevIndex = allKeys.indexOf(currentLocation.key); + var nextIndex = allKeys.indexOf(nextLocation.key); + + if (prevIndex !== -1 && nextIndex !== -1) go(prevIndex - nextIndex); // Restore the URL + } + }); + }; + + var push = function push(input) { + return transitionTo(createLocation(input, _Actions.PUSH)); + }; + + var replace = function replace(input) { + return transitionTo(createLocation(input, _Actions.REPLACE)); + }; + + var goBack = function goBack() { + return go(-1); + }; + + var goForward = function goForward() { + return go(1); + }; + + var createKey = function createKey() { + return Math.random() + .toString(36) + .substr(2, keyLength || 6); + }; + + var createHref = function createHref(location) { + return (0, _PathUtils.createPath)(location); + }; + + var createLocation = function createLocation(location, action) { + var key = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : createKey(); + return (0, _LocationUtils.createLocation)(location, action, key); + }; + + return { + getCurrentLocation: getCurrentLocation, + listenBefore: listenBefore, + listen: listen, + transitionTo: transitionTo, + push: push, + replace: replace, + go: go, + goBack: goBack, + goForward: goForward, + createKey: createKey, + createPath: _PathUtils.createPath, + createHref: createHref, + createLocation: createLocation, + }; + }; + + exports.default = createHistory; + + /***/ + }, + /* 194 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + + var _warning = __webpack_require__(47); + + var _warning2 = _interopRequireDefault(_warning); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + var runTransitionHook = function runTransitionHook(hook, location, callback) { + var result = hook(location, callback); + + if (hook.length < 2) { + // Assume the hook runs synchronously and automatically + // call the callback with the return value. + callback(result); + } else { + true + ? (0, _warning2.default)( + result === undefined, + 'You should not "return" in a transition hook with a callback argument; ' + + 'call the callback instead', + ) + : void 0; + } + }; + + exports.default = runTransitionHook; + + /***/ + }, + /* 195 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var DOMLazyTree = __webpack_require__(97); + var Danger = __webpack_require__(724); + var ReactDOMComponentTree = __webpack_require__(13); + var ReactInstrumentation = __webpack_require__(33); + + var createMicrosoftUnsafeLocalFunction = __webpack_require__(205); + var setInnerHTML = __webpack_require__(144); + var setTextContent = __webpack_require__(335); + + function getNodeAfter(parentNode, node) { + // Special case for text components, which return [open, close] comments + // from getHostNode. + if (Array.isArray(node)) { + node = node[1]; + } + return node ? node.nextSibling : parentNode.firstChild; + } + + /** + * Inserts `childNode` as a child of `parentNode` at the `index`. + * + * @param {DOMElement} parentNode Parent node in which to insert. + * @param {DOMElement} childNode Child node to insert. + * @param {number} index Index at which to insert the child. + * @internal + */ + var insertChildAt = createMicrosoftUnsafeLocalFunction(function (parentNode, childNode, referenceNode) { + // We rely exclusively on `insertBefore(node, null)` instead of also using + // `appendChild(node)`. (Using `undefined` is not allowed by all browsers so + // we are careful to use `null`.) + parentNode.insertBefore(childNode, referenceNode); + }); + + function insertLazyTreeChildAt(parentNode, childTree, referenceNode) { + DOMLazyTree.insertTreeBefore(parentNode, childTree, referenceNode); + } + + function moveChild(parentNode, childNode, referenceNode) { + if (Array.isArray(childNode)) { + moveDelimitedText(parentNode, childNode[0], childNode[1], referenceNode); + } else { + insertChildAt(parentNode, childNode, referenceNode); + } + } + + function removeChild(parentNode, childNode) { + if (Array.isArray(childNode)) { + var closingComment = childNode[1]; + childNode = childNode[0]; + removeDelimitedText(parentNode, childNode, closingComment); + parentNode.removeChild(closingComment); + } + parentNode.removeChild(childNode); + } + + function moveDelimitedText(parentNode, openingComment, closingComment, referenceNode) { + var node = openingComment; + while (true) { + var nextNode = node.nextSibling; + insertChildAt(parentNode, node, referenceNode); + if (node === closingComment) { + break; + } + node = nextNode; + } + } + + function removeDelimitedText(parentNode, startNode, closingComment) { + while (true) { + var node = startNode.nextSibling; + if (node === closingComment) { + // The closing comment is removed by ReactMultiChild. + break; + } else { + parentNode.removeChild(node); + } + } + } + + function replaceDelimitedText(openingComment, closingComment, stringText) { + var parentNode = openingComment.parentNode; + var nodeAfterComment = openingComment.nextSibling; + if (nodeAfterComment === closingComment) { + // There are no text nodes between the opening and closing comments; insert + // a new one if stringText isn't empty. + if (stringText) { + insertChildAt(parentNode, document.createTextNode(stringText), nodeAfterComment); + } + } else { + if (stringText) { + // Set the text content of the first node after the opening comment, and + // remove all following nodes up until the closing comment. + setTextContent(nodeAfterComment, stringText); + removeDelimitedText(parentNode, nodeAfterComment, closingComment); + } else { + removeDelimitedText(parentNode, openingComment, closingComment); + } + } + + if (true) { + ReactInstrumentation.debugTool.onHostOperation({ + instanceID: ReactDOMComponentTree.getInstanceFromNode(openingComment)._debugID, + type: 'replace text', + payload: stringText, + }); + } + } + + var dangerouslyReplaceNodeWithMarkup = Danger.dangerouslyReplaceNodeWithMarkup; + if (true) { + dangerouslyReplaceNodeWithMarkup = function (oldChild, markup, prevInstance) { + Danger.dangerouslyReplaceNodeWithMarkup(oldChild, markup); + if (prevInstance._debugID !== 0) { + ReactInstrumentation.debugTool.onHostOperation({ + instanceID: prevInstance._debugID, + type: 'replace with', + payload: markup.toString(), + }); + } else { + var nextInstance = ReactDOMComponentTree.getInstanceFromNode(markup.node); + if (nextInstance._debugID !== 0) { + ReactInstrumentation.debugTool.onHostOperation({ + instanceID: nextInstance._debugID, + type: 'mount', + payload: markup.toString(), + }); + } + } + }; + } + + /** + * Operations for updating with DOM children. + */ + var DOMChildrenOperations = { + dangerouslyReplaceNodeWithMarkup: dangerouslyReplaceNodeWithMarkup, + + replaceDelimitedText: replaceDelimitedText, + + /** + * Updates a component's children by processing a series of updates. The + * update configurations are each expected to have a `parentNode` property. + * + * @param {array<object>} updates List of update configurations. + * @internal + */ + processUpdates: function (parentNode, updates) { + if (true) { + var parentNodeDebugID = ReactDOMComponentTree.getInstanceFromNode(parentNode)._debugID; + } + + for (var k = 0; k < updates.length; k++) { + var update = updates[k]; + switch (update.type) { + case 'INSERT_MARKUP': + insertLazyTreeChildAt(parentNode, update.content, getNodeAfter(parentNode, update.afterNode)); + if (true) { + ReactInstrumentation.debugTool.onHostOperation({ + instanceID: parentNodeDebugID, + type: 'insert child', + payload: { toIndex: update.toIndex, content: update.content.toString() }, + }); + } + break; + case 'MOVE_EXISTING': + moveChild(parentNode, update.fromNode, getNodeAfter(parentNode, update.afterNode)); + if (true) { + ReactInstrumentation.debugTool.onHostOperation({ + instanceID: parentNodeDebugID, + type: 'move child', + payload: { fromIndex: update.fromIndex, toIndex: update.toIndex }, + }); + } + break; + case 'SET_MARKUP': + setInnerHTML(parentNode, update.content); + if (true) { + ReactInstrumentation.debugTool.onHostOperation({ + instanceID: parentNodeDebugID, + type: 'replace children', + payload: update.content.toString(), + }); + } + break; + case 'TEXT_CONTENT': + setTextContent(parentNode, update.content); + if (true) { + ReactInstrumentation.debugTool.onHostOperation({ + instanceID: parentNodeDebugID, + type: 'replace text', + payload: update.content.toString(), + }); + } + break; + case 'REMOVE_NODE': + removeChild(parentNode, update.fromNode); + if (true) { + ReactInstrumentation.debugTool.onHostOperation({ + instanceID: parentNodeDebugID, + type: 'remove child', + payload: { fromIndex: update.fromIndex }, + }); + } + break; + } + } + }, + }; + + module.exports = DOMChildrenOperations; + + /***/ + }, + /* 196 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var DOMNamespaces = { + html: 'http://www.w3.org/1999/xhtml', + mathml: 'http://www.w3.org/1998/Math/MathML', + svg: 'http://www.w3.org/2000/svg', + }; + + module.exports = DOMNamespaces; + + /***/ + }, + /* 197 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var _prodInvariant = __webpack_require__(5); + + var ReactErrorUtils = __webpack_require__(203); + + var invariant = __webpack_require__(2); + var warning = __webpack_require__(3); + + /** + * Injected dependencies: + */ + + /** + * - `ComponentTree`: [required] Module that can convert between React instances + * and actual node references. + */ + var ComponentTree; + var TreeTraversal; + var injection = { + injectComponentTree: function (Injected) { + ComponentTree = Injected; + if (true) { + true + ? warning( + Injected && Injected.getNodeFromInstance && Injected.getInstanceFromNode, + 'EventPluginUtils.injection.injectComponentTree(...): Injected ' + + 'module is missing getNodeFromInstance or getInstanceFromNode.', + ) + : void 0; + } + }, + injectTreeTraversal: function (Injected) { + TreeTraversal = Injected; + if (true) { + true + ? warning( + Injected && Injected.isAncestor && Injected.getLowestCommonAncestor, + 'EventPluginUtils.injection.injectTreeTraversal(...): Injected ' + + 'module is missing isAncestor or getLowestCommonAncestor.', + ) + : void 0; + } + }, + }; + + function isEndish(topLevelType) { + return ( + topLevelType === 'topMouseUp' || topLevelType === 'topTouchEnd' || topLevelType === 'topTouchCancel' + ); + } + + function isMoveish(topLevelType) { + return topLevelType === 'topMouseMove' || topLevelType === 'topTouchMove'; + } + function isStartish(topLevelType) { + return topLevelType === 'topMouseDown' || topLevelType === 'topTouchStart'; + } + + var validateEventDispatches; + if (true) { + validateEventDispatches = function (event) { + var dispatchListeners = event._dispatchListeners; + var dispatchInstances = event._dispatchInstances; + + var listenersIsArr = Array.isArray(dispatchListeners); + var listenersLen = listenersIsArr ? dispatchListeners.length : dispatchListeners ? 1 : 0; + + var instancesIsArr = Array.isArray(dispatchInstances); + var instancesLen = instancesIsArr ? dispatchInstances.length : dispatchInstances ? 1 : 0; + + true + ? warning( + instancesIsArr === listenersIsArr && instancesLen === listenersLen, + 'EventPluginUtils: Invalid `event`.', + ) + : void 0; + }; + } + + /** + * Dispatch the event to the listener. + * @param {SyntheticEvent} event SyntheticEvent to handle + * @param {boolean} simulated If the event is simulated (changes exn behavior) + * @param {function} listener Application-level callback + * @param {*} inst Internal component instance + */ + function executeDispatch(event, simulated, listener, inst) { + var type = event.type || 'unknown-event'; + event.currentTarget = EventPluginUtils.getNodeFromInstance(inst); + if (simulated) { + ReactErrorUtils.invokeGuardedCallbackWithCatch(type, listener, event); + } else { + ReactErrorUtils.invokeGuardedCallback(type, listener, event); + } + event.currentTarget = null; + } + + /** + * Standard/simple iteration through an event's collected dispatches. + */ + function executeDispatchesInOrder(event, simulated) { + var dispatchListeners = event._dispatchListeners; + var dispatchInstances = event._dispatchInstances; + if (true) { + validateEventDispatches(event); + } + if (Array.isArray(dispatchListeners)) { + for (var i = 0; i < dispatchListeners.length; i++) { + if (event.isPropagationStopped()) { + break; + } + // Listeners and Instances are two parallel arrays that are always in sync. + executeDispatch(event, simulated, dispatchListeners[i], dispatchInstances[i]); + } + } else if (dispatchListeners) { + executeDispatch(event, simulated, dispatchListeners, dispatchInstances); + } + event._dispatchListeners = null; + event._dispatchInstances = null; + } + + /** + * Standard/simple iteration through an event's collected dispatches, but stops + * at the first dispatch execution returning true, and returns that id. + * + * @return {?string} id of the first dispatch execution who's listener returns + * true, or null if no listener returned true. + */ + function executeDispatchesInOrderStopAtTrueImpl(event) { + var dispatchListeners = event._dispatchListeners; + var dispatchInstances = event._dispatchInstances; + if (true) { + validateEventDispatches(event); + } + if (Array.isArray(dispatchListeners)) { + for (var i = 0; i < dispatchListeners.length; i++) { + if (event.isPropagationStopped()) { + break; + } + // Listeners and Instances are two parallel arrays that are always in sync. + if (dispatchListeners[i](event, dispatchInstances[i])) { + return dispatchInstances[i]; + } + } + } else if (dispatchListeners) { + if (dispatchListeners(event, dispatchInstances)) { + return dispatchInstances; + } + } + return null; + } + + /** + * @see executeDispatchesInOrderStopAtTrueImpl + */ + function executeDispatchesInOrderStopAtTrue(event) { + var ret = executeDispatchesInOrderStopAtTrueImpl(event); + event._dispatchInstances = null; + event._dispatchListeners = null; + return ret; + } + + /** + * Execution of a "direct" dispatch - there must be at most one dispatch + * accumulated on the event or it is considered an error. It doesn't really make + * sense for an event with multiple dispatches (bubbled) to keep track of the + * return values at each dispatch execution, but it does tend to make sense when + * dealing with "direct" dispatches. + * + * @return {*} The return value of executing the single dispatch. + */ + function executeDirectDispatch(event) { + if (true) { + validateEventDispatches(event); + } + var dispatchListener = event._dispatchListeners; + var dispatchInstance = event._dispatchInstances; + !!Array.isArray(dispatchListener) + ? true + ? invariant(false, 'executeDirectDispatch(...): Invalid `event`.') + : _prodInvariant('103') + : void 0; + event.currentTarget = dispatchListener + ? EventPluginUtils.getNodeFromInstance(dispatchInstance) + : null; + var res = dispatchListener ? dispatchListener(event) : null; + event.currentTarget = null; + event._dispatchListeners = null; + event._dispatchInstances = null; + return res; + } + + /** + * @param {SyntheticEvent} event + * @return {boolean} True iff number of dispatches accumulated is greater than 0. + */ + function hasDispatches(event) { + return !!event._dispatchListeners; + } + + /** + * General utilities that are useful in creating custom Event Plugins. + */ + var EventPluginUtils = { + isEndish: isEndish, + isMoveish: isMoveish, + isStartish: isStartish, + + executeDirectDispatch: executeDirectDispatch, + executeDispatchesInOrder: executeDispatchesInOrder, + executeDispatchesInOrderStopAtTrue: executeDispatchesInOrderStopAtTrue, + hasDispatches: hasDispatches, + + getInstanceFromNode: function (node) { + return ComponentTree.getInstanceFromNode(node); + }, + getNodeFromInstance: function (node) { + return ComponentTree.getNodeFromInstance(node); + }, + isAncestor: function (a, b) { + return TreeTraversal.isAncestor(a, b); + }, + getLowestCommonAncestor: function (a, b) { + return TreeTraversal.getLowestCommonAncestor(a, b); + }, + getParentInstance: function (inst) { + return TreeTraversal.getParentInstance(inst); + }, + traverseTwoPhase: function (target, fn, arg) { + return TreeTraversal.traverseTwoPhase(target, fn, arg); + }, + traverseEnterLeave: function (from, to, fn, argFrom, argTo) { + return TreeTraversal.traverseEnterLeave(from, to, fn, argFrom, argTo); + }, + + injection: injection, + }; + + module.exports = EventPluginUtils; + + /***/ + }, + /* 198 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + /** + * Escape and wrap key so it is safe to use as a reactid + * + * @param {string} key to be escaped. + * @return {string} the escaped key. + */ + + function escape(key) { + var escapeRegex = /[=:]/g; + var escaperLookup = { + '=': '=0', + ':': '=2', + }; + var escapedString = ('' + key).replace(escapeRegex, function (match) { + return escaperLookup[match]; + }); + + return '$' + escapedString; + } + + /** + * Unescape and unwrap key for human-readable display + * + * @param {string} key to unescape. + * @return {string} the unescaped key. + */ + function unescape(key) { + var unescapeRegex = /(=0|=2)/g; + var unescaperLookup = { + '=0': '=', + '=2': ':', + }; + var keySubstring = key[0] === '.' && key[1] === '$' ? key.substring(2) : key.substring(1); + + return ('' + keySubstring).replace(unescapeRegex, function (match) { + return unescaperLookup[match]; + }); + } + + var KeyEscapeUtils = { + escape: escape, + unescape: unescape, + }; + + module.exports = KeyEscapeUtils; + + /***/ + }, + /* 199 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var _prodInvariant = __webpack_require__(5); + + var React = __webpack_require__(41); + var ReactPropTypesSecret = __webpack_require__(323); + + var invariant = __webpack_require__(2); + var warning = __webpack_require__(3); + + var hasReadOnlyValue = { + button: true, + checkbox: true, + image: true, + hidden: true, + radio: true, + reset: true, + submit: true, + }; + + function _assertSingleLink(inputProps) { + !(inputProps.checkedLink == null || inputProps.valueLink == null) + ? true + ? invariant( + false, + "Cannot provide a checkedLink and a valueLink. If you want to use checkedLink, you probably don't want to use valueLink and vice versa.", + ) + : _prodInvariant('87') + : void 0; + } + function _assertValueLink(inputProps) { + _assertSingleLink(inputProps); + !(inputProps.value == null && inputProps.onChange == null) + ? true + ? invariant( + false, + "Cannot provide a valueLink and a value or onChange event. If you want to use value or onChange, you probably don't want to use valueLink.", + ) + : _prodInvariant('88') + : void 0; + } + + function _assertCheckedLink(inputProps) { + _assertSingleLink(inputProps); + !(inputProps.checked == null && inputProps.onChange == null) + ? true + ? invariant( + false, + "Cannot provide a checkedLink and a checked property or onChange event. If you want to use checked or onChange, you probably don't want to use checkedLink", + ) + : _prodInvariant('89') + : void 0; + } + + var propTypes = { + value: function (props, propName, componentName) { + if ( + !props[propName] || + hasReadOnlyValue[props.type] || + props.onChange || + props.readOnly || + props.disabled + ) { + return null; + } + return new Error( + 'You provided a `value` prop to a form field without an ' + + '`onChange` handler. This will render a read-only field. If ' + + 'the field should be mutable use `defaultValue`. Otherwise, ' + + 'set either `onChange` or `readOnly`.', + ); + }, + checked: function (props, propName, componentName) { + if (!props[propName] || props.onChange || props.readOnly || props.disabled) { + return null; + } + return new Error( + 'You provided a `checked` prop to a form field without an ' + + '`onChange` handler. This will render a read-only field. If ' + + 'the field should be mutable use `defaultChecked`. Otherwise, ' + + 'set either `onChange` or `readOnly`.', + ); + }, + onChange: React.PropTypes.func, + }; + + var loggedTypeFailures = {}; + function getDeclarationErrorAddendum(owner) { + if (owner) { + var name = owner.getName(); + if (name) { + return ' Check the render method of `' + name + '`.'; + } + } + return ''; + } + + /** + * Provide a linked `value` attribute for controlled forms. You should not use + * this outside of the ReactDOM controlled form components. + */ + var LinkedValueUtils = { + checkPropTypes: function (tagName, props, owner) { + for (var propName in propTypes) { + if (propTypes.hasOwnProperty(propName)) { + var error = propTypes[propName](props, propName, tagName, 'prop', null, ReactPropTypesSecret); + } + if (error instanceof Error && !(error.message in loggedTypeFailures)) { + // Only monitor this failure once because there tends to be a lot of the + // same error. + loggedTypeFailures[error.message] = true; + + var addendum = getDeclarationErrorAddendum(owner); + true ? warning(false, 'Failed form propType: %s%s', error.message, addendum) : void 0; + } + } + }, + + /** + * @param {object} inputProps Props for form component + * @return {*} current value of the input either from value prop or link. + */ + getValue: function (inputProps) { + if (inputProps.valueLink) { + _assertValueLink(inputProps); + return inputProps.valueLink.value; + } + return inputProps.value; + }, + + /** + * @param {object} inputProps Props for form component + * @return {*} current checked status of the input either from checked prop + * or link. + */ + getChecked: function (inputProps) { + if (inputProps.checkedLink) { + _assertCheckedLink(inputProps); + return inputProps.checkedLink.value; + } + return inputProps.checked; + }, + + /** + * @param {object} inputProps Props for form component + * @param {SyntheticEvent} event change event to handle + */ + executeOnChange: function (inputProps, event) { + if (inputProps.valueLink) { + _assertValueLink(inputProps); + return inputProps.valueLink.requestChange(event.target.value); + } else if (inputProps.checkedLink) { + _assertCheckedLink(inputProps); + return inputProps.checkedLink.requestChange(event.target.checked); + } else if (inputProps.onChange) { + return inputProps.onChange.call(undefined, event); + } + }, + }; + + module.exports = LinkedValueUtils; + + /***/ + }, + /* 200 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2014-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + var _prodInvariant = __webpack_require__(5); + + var invariant = __webpack_require__(2); + + var injected = false; + + var ReactComponentEnvironment = { + /** + * Optionally injectable hook for swapping out mount images in the middle of + * the tree. + */ + replaceNodeWithMarkup: null, + + /** + * Optionally injectable hook for processing a queue of child updates. Will + * later move into MultiChildComponents. + */ + processChildrenUpdates: null, + + injection: { + injectEnvironment: function (environment) { + !!injected + ? true + ? invariant(false, 'ReactCompositeComponent: injectEnvironment() can only be called once.') + : _prodInvariant('104') + : void 0; + ReactComponentEnvironment.replaceNodeWithMarkup = environment.replaceNodeWithMarkup; + ReactComponentEnvironment.processChildrenUpdates = environment.processChildrenUpdates; + injected = true; + }, + }, + }; + + module.exports = ReactComponentEnvironment; + + /***/ + }, + /* 201 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + /* globals __REACT_DEVTOOLS_GLOBAL_HOOK__*/ + + var ReactDOMComponentTree = __webpack_require__(13); + var ReactDefaultInjection = __webpack_require__(202); + var ReactMount = __webpack_require__(321); + var ReactReconciler = __webpack_require__(67); + var ReactUpdates = __webpack_require__(34); + var ReactVersion = __webpack_require__(325); + + var findDOMNode = __webpack_require__(328); + var getHostComponentFromComposite = __webpack_require__(330); + var renderSubtreeIntoContainer = __webpack_require__(784); + var warning = __webpack_require__(3); + + ReactDefaultInjection.inject(); + + var ReactDOM = { + findDOMNode: findDOMNode, + render: ReactMount.render, + unmountComponentAtNode: ReactMount.unmountComponentAtNode, + version: ReactVersion, + + /* eslint-disable camelcase */ + unstable_batchedUpdates: ReactUpdates.batchedUpdates, + unstable_renderSubtreeIntoContainer: renderSubtreeIntoContainer, + }; + + // Inject the runtime into a devtools global hook regardless of browser. + // Allows for debugging when the hook is injected on the page. + if ( + typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' && + typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject === 'function' + ) { + __REACT_DEVTOOLS_GLOBAL_HOOK__.inject({ + ComponentTree: { + getClosestInstanceFromNode: ReactDOMComponentTree.getClosestInstanceFromNode, + getNodeFromInstance: function (inst) { + // inst is an internal instance (but could be a composite) + if (inst._renderedComponent) { + inst = getHostComponentFromComposite(inst); + } + if (inst) { + return ReactDOMComponentTree.getNodeFromInstance(inst); + } else { + return null; + } + }, + }, + Mount: ReactMount, + Reconciler: ReactReconciler, + }); + } + + if (true) { + var ExecutionEnvironment = __webpack_require__(14); + if (ExecutionEnvironment.canUseDOM && window.top === window.self) { + // First check if devtools is not installed + if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined') { + // If we're in Chrome or Firefox, provide a download link if not installed. + if ( + (navigator.userAgent.indexOf('Chrome') > -1 && navigator.userAgent.indexOf('Edge') === -1) || + navigator.userAgent.indexOf('Firefox') > -1 + ) { + // Firefox does not have the issue with devtools loaded over file:// + var showFileUrlMessage = + window.location.protocol.indexOf('http') === -1 && + navigator.userAgent.indexOf('Firefox') === -1; + console.debug( + 'Download the React DevTools ' + + (showFileUrlMessage ? 'and use an HTTP server (instead of a file: URL) ' : '') + + 'for a better development experience: ' + + 'https://fb.me/react-devtools', + ); + } + } + + var testFunc = function testFn() {}; + true + ? warning( + (testFunc.name || testFunc.toString()).indexOf('testFn') !== -1, + "It looks like you're using a minified copy of the development build " + + 'of React. When deploying React apps to production, make sure to use ' + + 'the production build which skips development warnings and is faster. ' + + 'See https://fb.me/react-minification for more details.', + ) + : void 0; + + // If we're in IE8, check to see if we are in compatibility mode and provide + // information on preventing compatibility mode + var ieCompatibilityMode = document.documentMode && document.documentMode < 8; + + true + ? warning( + !ieCompatibilityMode, + 'Internet Explorer is running in compatibility mode; please add the ' + + 'following tag to your HTML to prevent this from happening: ' + + '<meta http-equiv="X-UA-Compatible" content="IE=edge" />', + ) + : void 0; + + var expectedFeatures = [ + // shims + Array.isArray, + Array.prototype.every, + Array.prototype.forEach, + Array.prototype.indexOf, + Array.prototype.map, + Date.now, + Function.prototype.bind, + Object.keys, + String.prototype.trim, + ]; + + for (var i = 0; i < expectedFeatures.length; i++) { + if (!expectedFeatures[i]) { + true + ? warning( + false, + 'One or more ES5 shims expected by React are not available: ' + + 'https://fb.me/react-warning-polyfills', + ) + : void 0; + break; + } + } + } + } + + if (true) { + var ReactInstrumentation = __webpack_require__(33); + var ReactDOMUnknownPropertyHook = __webpack_require__(745); + var ReactDOMNullInputValuePropHook = __webpack_require__(738); + var ReactDOMInvalidARIAHook = __webpack_require__(737); + + ReactInstrumentation.debugTool.addHook(ReactDOMUnknownPropertyHook); + ReactInstrumentation.debugTool.addHook(ReactDOMNullInputValuePropHook); + ReactInstrumentation.debugTool.addHook(ReactDOMInvalidARIAHook); + } + + module.exports = ReactDOM; + + /***/ + }, + /* 202 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var ARIADOMPropertyConfig = __webpack_require__(719); + var BeforeInputEventPlugin = __webpack_require__(721); + var ChangeEventPlugin = __webpack_require__(723); + var DefaultEventPluginOrder = __webpack_require__(725); + var EnterLeaveEventPlugin = __webpack_require__(726); + var HTMLDOMPropertyConfig = __webpack_require__(729); + var ReactComponentBrowserEnvironment = __webpack_require__(731); + var ReactDOMComponent = __webpack_require__(732); + var ReactDOMComponentTree = __webpack_require__(13); + var ReactDOMEmptyComponent = __webpack_require__(733); + var ReactDOMTreeTraversal = __webpack_require__(744); + var ReactDOMTextComponent = __webpack_require__(742); + var ReactDefaultBatchingStrategy = __webpack_require__(315); + var ReactEventListener = __webpack_require__(748); + var ReactInjection = __webpack_require__(750); + var ReactReconcileTransaction = __webpack_require__(756); + var SVGDOMPropertyConfig = __webpack_require__(763); + var SelectEventPlugin = __webpack_require__(764); + var SimpleEventPlugin = __webpack_require__(765); + + var alreadyInjected = false; + + function inject() { + if (alreadyInjected) { + // TODO: This is currently true because these injections are shared between + // the client and the server package. They should be built independently + // and not share any injection state. Then this problem will be solved. + return; + } + alreadyInjected = true; + + ReactInjection.EventEmitter.injectReactEventListener(ReactEventListener); + + /** + * Inject modules for resolving DOM hierarchy and plugin ordering. + */ + ReactInjection.EventPluginHub.injectEventPluginOrder(DefaultEventPluginOrder); + ReactInjection.EventPluginUtils.injectComponentTree(ReactDOMComponentTree); + ReactInjection.EventPluginUtils.injectTreeTraversal(ReactDOMTreeTraversal); + + /** + * Some important event plugins included by default (without having to require + * them). + */ + ReactInjection.EventPluginHub.injectEventPluginsByName({ + SimpleEventPlugin: SimpleEventPlugin, + EnterLeaveEventPlugin: EnterLeaveEventPlugin, + ChangeEventPlugin: ChangeEventPlugin, + SelectEventPlugin: SelectEventPlugin, + BeforeInputEventPlugin: BeforeInputEventPlugin, + }); + + ReactInjection.HostComponent.injectGenericComponentClass(ReactDOMComponent); + + ReactInjection.HostComponent.injectTextComponentClass(ReactDOMTextComponent); + + ReactInjection.DOMProperty.injectDOMPropertyConfig(ARIADOMPropertyConfig); + ReactInjection.DOMProperty.injectDOMPropertyConfig(HTMLDOMPropertyConfig); + ReactInjection.DOMProperty.injectDOMPropertyConfig(SVGDOMPropertyConfig); + + ReactInjection.EmptyComponent.injectEmptyComponentFactory(function (instantiate) { + return new ReactDOMEmptyComponent(instantiate); + }); + + ReactInjection.Updates.injectReconcileTransaction(ReactReconcileTransaction); + ReactInjection.Updates.injectBatchingStrategy(ReactDefaultBatchingStrategy); + + ReactInjection.Component.injectEnvironment(ReactComponentBrowserEnvironment); + } + + module.exports = { + inject: inject, + }; + + /***/ + }, + /* 203 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + var caughtError = null; + + /** + * Call a function while guarding against errors that happens within it. + * + * @param {String} name of the guard to use for logging or debugging + * @param {Function} func The function to invoke + * @param {*} a First argument + * @param {*} b Second argument + */ + function invokeGuardedCallback(name, func, a) { + try { + func(a); + } catch (x) { + if (caughtError === null) { + caughtError = x; + } + } + } + + var ReactErrorUtils = { + invokeGuardedCallback: invokeGuardedCallback, + + /** + * Invoked by ReactTestUtils.Simulate so that any errors thrown by the event + * handler are sure to be rethrown by rethrowCaughtError. + */ + invokeGuardedCallbackWithCatch: invokeGuardedCallback, + + /** + * During execution of guarded functions we will capture the first error which + * we will rethrow to be handled by the top level error handler. + */ + rethrowCaughtError: function () { + if (caughtError) { + var error = caughtError; + caughtError = null; + throw error; + } + }, + }; + + if (true) { + /** + * To help development we can get better devtools integration by simulating a + * real browser event. + */ + if ( + typeof window !== 'undefined' && + typeof window.dispatchEvent === 'function' && + typeof document !== 'undefined' && + typeof document.createEvent === 'function' + ) { + var fakeNode = document.createElement('react'); + ReactErrorUtils.invokeGuardedCallback = function (name, func, a) { + var boundFunc = func.bind(null, a); + var evtType = 'react-' + name; + fakeNode.addEventListener(evtType, boundFunc, false); + var evt = document.createEvent('Event'); + // $FlowFixMe https://github.com/facebook/flow/issues/2336 + evt.initEvent(evtType, false, false); + fakeNode.dispatchEvent(evt); + fakeNode.removeEventListener(evtType, boundFunc, false); + }; + } + } + + module.exports = ReactErrorUtils; + + /***/ + }, + /* 204 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var _prodInvariant = __webpack_require__(5); + + var ReactCurrentOwner = __webpack_require__(54); + var ReactInstanceMap = __webpack_require__(100); + var ReactInstrumentation = __webpack_require__(33); + var ReactUpdates = __webpack_require__(34); + + var invariant = __webpack_require__(2); + var warning = __webpack_require__(3); + + function enqueueUpdate(internalInstance) { + ReactUpdates.enqueueUpdate(internalInstance); + } + + function formatUnexpectedArgument(arg) { + var type = typeof arg; + if (type !== 'object') { + return type; + } + var displayName = (arg.constructor && arg.constructor.name) || type; + var keys = Object.keys(arg); + if (keys.length > 0 && keys.length < 20) { + return displayName + ' (keys: ' + keys.join(', ') + ')'; + } + return displayName; + } + + function getInternalInstanceReadyForUpdate(publicInstance, callerName) { + var internalInstance = ReactInstanceMap.get(publicInstance); + if (!internalInstance) { + if (true) { + var ctor = publicInstance.constructor; + // Only warn when we have a callerName. Otherwise we should be silent. + // We're probably calling from enqueueCallback. We don't want to warn + // there because we already warned for the corresponding lifecycle method. + true + ? warning( + !callerName, + '%s(...): Can only update a mounted or mounting component. ' + + 'This usually means you called %s() on an unmounted component. ' + + 'This is a no-op. Please check the code for the %s component.', + callerName, + callerName, + (ctor && (ctor.displayName || ctor.name)) || 'ReactClass', + ) + : void 0; + } + return null; + } + + if (true) { + true + ? warning( + ReactCurrentOwner.current == null, + '%s(...): Cannot update during an existing state transition (such as ' + + "within `render` or another component's constructor). Render methods " + + 'should be a pure function of props and state; constructor ' + + 'side-effects are an anti-pattern, but can be moved to ' + + '`componentWillMount`.', + callerName, + ) + : void 0; + } + + return internalInstance; + } + + /** + * ReactUpdateQueue allows for state updates to be scheduled into a later + * reconciliation step. + */ + var ReactUpdateQueue = { + /** + * Checks whether or not this composite component is mounted. + * @param {ReactClass} publicInstance The instance we want to test. + * @return {boolean} True if mounted, false otherwise. + * @protected + * @final + */ + isMounted: function (publicInstance) { + if (true) { + var owner = ReactCurrentOwner.current; + if (owner !== null) { + true + ? warning( + owner._warnedAboutRefsInRender, + '%s is accessing isMounted inside its render() function. ' + + 'render() should be a pure function of props and state. It should ' + + 'never access something that requires stale data from the previous ' + + 'render, such as refs. Move this logic to componentDidMount and ' + + 'componentDidUpdate instead.', + owner.getName() || 'A component', + ) + : void 0; + owner._warnedAboutRefsInRender = true; + } + } + var internalInstance = ReactInstanceMap.get(publicInstance); + if (internalInstance) { + // During componentWillMount and render this will still be null but after + // that will always render to something. At least for now. So we can use + // this hack. + return !!internalInstance._renderedComponent; + } else { + return false; + } + }, + + /** + * Enqueue a callback that will be executed after all the pending updates + * have processed. + * + * @param {ReactClass} publicInstance The instance to use as `this` context. + * @param {?function} callback Called after state is updated. + * @param {string} callerName Name of the calling function in the public API. + * @internal + */ + enqueueCallback: function (publicInstance, callback, callerName) { + ReactUpdateQueue.validateCallback(callback, callerName); + var internalInstance = getInternalInstanceReadyForUpdate(publicInstance); + + // Previously we would throw an error if we didn't have an internal + // instance. Since we want to make it a no-op instead, we mirror the same + // behavior we have in other enqueue* methods. + // We also need to ignore callbacks in componentWillMount. See + // enqueueUpdates. + if (!internalInstance) { + return null; + } + + if (internalInstance._pendingCallbacks) { + internalInstance._pendingCallbacks.push(callback); + } else { + internalInstance._pendingCallbacks = [callback]; + } + // TODO: The callback here is ignored when setState is called from + // componentWillMount. Either fix it or disallow doing so completely in + // favor of getInitialState. Alternatively, we can disallow + // componentWillMount during server-side rendering. + enqueueUpdate(internalInstance); + }, + + enqueueCallbackInternal: function (internalInstance, callback) { + if (internalInstance._pendingCallbacks) { + internalInstance._pendingCallbacks.push(callback); + } else { + internalInstance._pendingCallbacks = [callback]; + } + enqueueUpdate(internalInstance); + }, + + /** + * Forces an update. This should only be invoked when it is known with + * certainty that we are **not** in a DOM transaction. + * + * You may want to call this when you know that some deeper aspect of the + * component's state has changed but `setState` was not called. + * + * This will not invoke `shouldComponentUpdate`, but it will invoke + * `componentWillUpdate` and `componentDidUpdate`. + * + * @param {ReactClass} publicInstance The instance that should rerender. + * @internal + */ + enqueueForceUpdate: function (publicInstance) { + var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, 'forceUpdate'); + + if (!internalInstance) { + return; + } + + internalInstance._pendingForceUpdate = true; + + enqueueUpdate(internalInstance); + }, + + /** + * Replaces all of the state. Always use this or `setState` to mutate state. + * You should treat `this.state` as immutable. + * + * There is no guarantee that `this.state` will be immediately updated, so + * accessing `this.state` after calling this method may return the old value. + * + * @param {ReactClass} publicInstance The instance that should rerender. + * @param {object} completeState Next state. + * @internal + */ + enqueueReplaceState: function (publicInstance, completeState) { + var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, 'replaceState'); + + if (!internalInstance) { + return; + } + + internalInstance._pendingStateQueue = [completeState]; + internalInstance._pendingReplaceState = true; + + enqueueUpdate(internalInstance); + }, + + /** + * Sets a subset of the state. This only exists because _pendingState is + * internal. This provides a merging strategy that is not available to deep + * properties which is confusing. TODO: Expose pendingState or don't use it + * during the merge. + * + * @param {ReactClass} publicInstance The instance that should rerender. + * @param {object} partialState Next partial state to be merged with state. + * @internal + */ + enqueueSetState: function (publicInstance, partialState) { + if (true) { + ReactInstrumentation.debugTool.onSetState(); + true + ? warning( + partialState != null, + 'setState(...): You passed an undefined or null state object; ' + + 'instead, use forceUpdate().', + ) + : void 0; + } + + var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, 'setState'); + + if (!internalInstance) { + return; + } + + var queue = internalInstance._pendingStateQueue || (internalInstance._pendingStateQueue = []); + queue.push(partialState); + + enqueueUpdate(internalInstance); + }, + + enqueueElementInternal: function (internalInstance, nextElement, nextContext) { + internalInstance._pendingElement = nextElement; + // TODO: introduce _pendingContext instead of setting it directly. + internalInstance._context = nextContext; + enqueueUpdate(internalInstance); + }, + + validateCallback: function (callback, callerName) { + !(!callback || typeof callback === 'function') + ? true + ? invariant( + false, + '%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.', + callerName, + formatUnexpectedArgument(callback), + ) + : _prodInvariant('122', callerName, formatUnexpectedArgument(callback)) + : void 0; + }, + }; + + module.exports = ReactUpdateQueue; + + /***/ + }, + /* 205 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + /* globals MSApp */ + + /** + * Create a function which has 'unsafe' privileges (required by windows8 apps) + */ + + var createMicrosoftUnsafeLocalFunction = function (func) { + if (typeof MSApp !== 'undefined' && MSApp.execUnsafeLocalFunction) { + return function (arg0, arg1, arg2, arg3) { + MSApp.execUnsafeLocalFunction(function () { + return func(arg0, arg1, arg2, arg3); + }); + }; + } else { + return func; + } + }; + + module.exports = createMicrosoftUnsafeLocalFunction; + + /***/ + }, + /* 206 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + /** + * `charCode` represents the actual "character code" and is safe to use with + * `String.fromCharCode`. As such, only keys that correspond to printable + * characters produce a valid `charCode`, the only exception to this is Enter. + * The Tab-key is considered non-printable and does not have a `charCode`, + * presumably because it does not produce a tab-character in browsers. + * + * @param {object} nativeEvent Native browser event. + * @return {number} Normalized `charCode` property. + */ + + function getEventCharCode(nativeEvent) { + var charCode; + var keyCode = nativeEvent.keyCode; + + if ('charCode' in nativeEvent) { + charCode = nativeEvent.charCode; + + // FF does not set `charCode` for the Enter-key, check against `keyCode`. + if (charCode === 0 && keyCode === 13) { + charCode = 13; + } + } else { + // IE8 does not implement `charCode`, but `keyCode` has the correct value. + charCode = keyCode; + } + + // Some non-printable keys are reported in `charCode`/`keyCode`, discard them. + // Must not discard the (non-)printable Enter-key. + if (charCode >= 32 || charCode === 13) { + return charCode; + } + + return 0; + } + + module.exports = getEventCharCode; + + /***/ + }, + /* 207 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + /** + * Translation from modifier key to the associated property in the event. + * @see http://www.w3.org/TR/DOM-Level-3-Events/#keys-Modifiers + */ + + var modifierKeyToProp = { + Alt: 'altKey', + Control: 'ctrlKey', + Meta: 'metaKey', + Shift: 'shiftKey', + }; + + // IE8 does not implement getModifierState so we simply map it to the only + // modifier keys exposed by the event itself, does not support Lock-keys. + // Currently, all major browsers except Chrome seems to support Lock-keys. + function modifierStateGetter(keyArg) { + var syntheticEvent = this; + var nativeEvent = syntheticEvent.nativeEvent; + if (nativeEvent.getModifierState) { + return nativeEvent.getModifierState(keyArg); + } + var keyProp = modifierKeyToProp[keyArg]; + return keyProp ? !!nativeEvent[keyProp] : false; + } + + function getEventModifierState(nativeEvent) { + return modifierStateGetter; + } + + module.exports = getEventModifierState; + + /***/ + }, + /* 208 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + /** + * Gets the target node from a native browser event by accounting for + * inconsistencies in browser DOM APIs. + * + * @param {object} nativeEvent Native browser event. + * @return {DOMEventTarget} Target node. + */ + + function getEventTarget(nativeEvent) { + var target = nativeEvent.target || nativeEvent.srcElement || window; + + // Normalize SVG <use> element events #4963 + if (target.correspondingUseElement) { + target = target.correspondingUseElement; + } + + // Safari may fire events on text nodes (Node.TEXT_NODE is 3). + // @see http://www.quirksmode.org/js/events_properties.html + return target.nodeType === 3 ? target.parentNode : target; + } + + module.exports = getEventTarget; + + /***/ + }, + /* 209 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var _prodInvariant = __webpack_require__(5), + _assign = __webpack_require__(8); + + var ReactCompositeComponent = __webpack_require__(310); + var ReactEmptyComponent = __webpack_require__(316); + var ReactHostComponent = __webpack_require__(318); + + var getNextDebugID = __webpack_require__(331); + var invariant = __webpack_require__(2); + var warning = __webpack_require__(3); + + // To avoid a cyclic dependency, we create the final class in this module + var ReactCompositeComponentWrapper = function (element) { + this.construct(element); + }; + _assign(ReactCompositeComponentWrapper.prototype, ReactCompositeComponent, { + _instantiateReactComponent: instantiateReactComponent, + }); + + function getDeclarationErrorAddendum(owner) { + if (owner) { + var name = owner.getName(); + if (name) { + return ' Check the render method of `' + name + '`.'; + } + } + return ''; + } + + /** + * Check if the type reference is a known internal type. I.e. not a user + * provided composite type. + * + * @param {function} type + * @return {boolean} Returns true if this is a valid internal type. + */ + function isInternalComponentType(type) { + return ( + typeof type === 'function' && + typeof type.prototype !== 'undefined' && + typeof type.prototype.mountComponent === 'function' && + typeof type.prototype.receiveComponent === 'function' + ); + } + + /** + * Given a ReactNode, create an instance that will actually be mounted. + * + * @param {ReactNode} node + * @param {boolean} shouldHaveDebugID + * @return {object} A new instance of the element's constructor. + * @protected + */ + function instantiateReactComponent(node, shouldHaveDebugID) { + var instance; + + if (node === null || node === false) { + instance = ReactEmptyComponent.create(instantiateReactComponent); + } else if (typeof node === 'object') { + var element = node; + var type = element.type; + if (typeof type !== 'function' && typeof type !== 'string') { + var info = ''; + if (true) { + if ( + type === undefined || + (typeof type === 'object' && type !== null && Object.keys(type).length === 0) + ) { + info += ' You likely forgot to export your component from the file ' + "it's defined in."; + } + } + info += getDeclarationErrorAddendum(element._owner); + true + ? true + ? invariant( + false, + 'Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s', + type == null ? type : typeof type, + info, + ) + : _prodInvariant('130', type == null ? type : typeof type, info) + : void 0; + } + + // Special case string values + if (typeof element.type === 'string') { + instance = ReactHostComponent.createInternalComponent(element); + } else if (isInternalComponentType(element.type)) { + // This is temporarily available for custom components that are not string + // representations. I.e. ART. Once those are updated to use the string + // representation, we can drop this code path. + instance = new element.type(element); + + // We renamed this. Allow the old name for compat. :( + if (!instance.getHostNode) { + instance.getHostNode = instance.getNativeNode; + } + } else { + instance = new ReactCompositeComponentWrapper(element); + } + } else if (typeof node === 'string' || typeof node === 'number') { + instance = ReactHostComponent.createInstanceForText(node); + } else { + true + ? true + ? invariant(false, 'Encountered invalid React node of type %s', typeof node) + : _prodInvariant('131', typeof node) + : void 0; + } + + if (true) { + true + ? warning( + typeof instance.mountComponent === 'function' && + typeof instance.receiveComponent === 'function' && + typeof instance.getHostNode === 'function' && + typeof instance.unmountComponent === 'function', + 'Only React Components can be mounted.', + ) + : void 0; + } + + // These two fields are used by the DOM and ART diffing algorithms + // respectively. Instead of using expandos on components, we should be + // storing the state needed by the diffing algorithms elsewhere. + instance._mountIndex = 0; + instance._mountImage = null; + + if (true) { + instance._debugID = shouldHaveDebugID ? getNextDebugID() : 0; + } + + // Internal instances should fully constructed at this point, so they should + // not get any new fields added to them at this point. + if (true) { + if (Object.preventExtensions) { + Object.preventExtensions(instance); + } + } + + return instance; + } + + module.exports = instantiateReactComponent; + + /***/ + }, + /* 210 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var ExecutionEnvironment = __webpack_require__(14); + + var useHasFeature; + if (ExecutionEnvironment.canUseDOM) { + useHasFeature = + document.implementation && + document.implementation.hasFeature && + // always returns true in newer browsers as per the standard. + // @see http://dom.spec.whatwg.org/#dom-domimplementation-hasfeature + document.implementation.hasFeature('', '') !== true; + } + + /** + * Checks if an event is supported in the current execution environment. + * + * NOTE: This will not work correctly for non-generic events such as `change`, + * `reset`, `load`, `error`, and `select`. + * + * Borrows from Modernizr. + * + * @param {string} eventNameSuffix Event name, e.g. "click". + * @param {?boolean} capture Check if the capture phase is supported. + * @return {boolean} True if the event is supported. + * @internal + * @license Modernizr 3.0.0pre (Custom Build) | MIT + */ + function isEventSupported(eventNameSuffix, capture) { + if (!ExecutionEnvironment.canUseDOM || (capture && !('addEventListener' in document))) { + return false; + } + + var eventName = 'on' + eventNameSuffix; + var isSupported = eventName in document; + + if (!isSupported) { + var element = document.createElement('div'); + element.setAttribute(eventName, 'return;'); + isSupported = typeof element[eventName] === 'function'; + } + + if (!isSupported && useHasFeature && eventNameSuffix === 'wheel') { + // This is the only way to test support for the `wheel` event in IE9+. + isSupported = document.implementation.hasFeature('Events.wheel', '3.0'); + } + + return isSupported; + } + + module.exports = isEventSupported; + + /***/ + }, + /* 211 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + /** + * Given a `prevElement` and `nextElement`, determines if the existing + * instance should be updated as opposed to being destroyed or replaced by a new + * instance. Both arguments are elements. This ensures that this logic can + * operate on stateless trees without any backing instance. + * + * @param {?object} prevElement + * @param {?object} nextElement + * @return {boolean} True if the existing instance should be updated. + * @protected + */ + + function shouldUpdateReactComponent(prevElement, nextElement) { + var prevEmpty = prevElement === null || prevElement === false; + var nextEmpty = nextElement === null || nextElement === false; + if (prevEmpty || nextEmpty) { + return prevEmpty === nextEmpty; + } + + var prevType = typeof prevElement; + var nextType = typeof nextElement; + if (prevType === 'string' || prevType === 'number') { + return nextType === 'string' || nextType === 'number'; + } else { + return ( + nextType === 'object' && + prevElement.type === nextElement.type && + prevElement.key === nextElement.key + ); + } + } + + module.exports = shouldUpdateReactComponent; + + /***/ + }, + /* 212 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var _assign = __webpack_require__(8); + + var emptyFunction = __webpack_require__(40); + var warning = __webpack_require__(3); + + var validateDOMNesting = emptyFunction; + + if (true) { + // This validation code was written based on the HTML5 parsing spec: + // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope + // + // Note: this does not catch all invalid nesting, nor does it try to (as it's + // not clear what practical benefit doing so provides); instead, we warn only + // for cases where the parser will give a parse tree differing from what React + // intended. For example, <b><div></div></b> is invalid but we don't warn + // because it still parses correctly; we do warn for other cases like nested + // <p> tags where the beginning of the second element implicitly closes the + // first, causing a confusing mess. + + // https://html.spec.whatwg.org/multipage/syntax.html#special + var specialTags = [ + 'address', + 'applet', + 'area', + 'article', + 'aside', + 'base', + 'basefont', + 'bgsound', + 'blockquote', + 'body', + 'br', + 'button', + 'caption', + 'center', + 'col', + 'colgroup', + 'dd', + 'details', + 'dir', + 'div', + 'dl', + 'dt', + 'embed', + 'fieldset', + 'figcaption', + 'figure', + 'footer', + 'form', + 'frame', + 'frameset', + 'h1', + 'h2', + 'h3', + 'h4', + 'h5', + 'h6', + 'head', + 'header', + 'hgroup', + 'hr', + 'html', + 'iframe', + 'img', + 'input', + 'isindex', + 'li', + 'link', + 'listing', + 'main', + 'marquee', + 'menu', + 'menuitem', + 'meta', + 'nav', + 'noembed', + 'noframes', + 'noscript', + 'object', + 'ol', + 'p', + 'param', + 'plaintext', + 'pre', + 'script', + 'section', + 'select', + 'source', + 'style', + 'summary', + 'table', + 'tbody', + 'td', + 'template', + 'textarea', + 'tfoot', + 'th', + 'thead', + 'title', + 'tr', + 'track', + 'ul', + 'wbr', + 'xmp', + ]; + + // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope + var inScopeTags = [ + 'applet', + 'caption', + 'html', + 'table', + 'td', + 'th', + 'marquee', + 'object', + 'template', + + // https://html.spec.whatwg.org/multipage/syntax.html#html-integration-point + // TODO: Distinguish by namespace here -- for <title>, including it here + // errs on the side of fewer warnings + 'foreignObject', + 'desc', + 'title', + ]; + + // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-button-scope + var buttonScopeTags = inScopeTags.concat(['button']); + + // https://html.spec.whatwg.org/multipage/syntax.html#generate-implied-end-tags + var impliedEndTags = ['dd', 'dt', 'li', 'option', 'optgroup', 'p', 'rp', 'rt']; + + var emptyAncestorInfo = { + current: null, + + formTag: null, + aTagInScope: null, + buttonTagInScope: null, + nobrTagInScope: null, + pTagInButtonScope: null, + + listItemTagAutoclosing: null, + dlItemTagAutoclosing: null, + }; + + var updatedAncestorInfo = function (oldInfo, tag, instance) { + var ancestorInfo = _assign({}, oldInfo || emptyAncestorInfo); + var info = { tag: tag, instance: instance }; + + if (inScopeTags.indexOf(tag) !== -1) { + ancestorInfo.aTagInScope = null; + ancestorInfo.buttonTagInScope = null; + ancestorInfo.nobrTagInScope = null; + } + if (buttonScopeTags.indexOf(tag) !== -1) { + ancestorInfo.pTagInButtonScope = null; + } + + // See rules for 'li', 'dd', 'dt' start tags in + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody + if (specialTags.indexOf(tag) !== -1 && tag !== 'address' && tag !== 'div' && tag !== 'p') { + ancestorInfo.listItemTagAutoclosing = null; + ancestorInfo.dlItemTagAutoclosing = null; + } + + ancestorInfo.current = info; + + if (tag === 'form') { + ancestorInfo.formTag = info; + } + if (tag === 'a') { + ancestorInfo.aTagInScope = info; + } + if (tag === 'button') { + ancestorInfo.buttonTagInScope = info; + } + if (tag === 'nobr') { + ancestorInfo.nobrTagInScope = info; + } + if (tag === 'p') { + ancestorInfo.pTagInButtonScope = info; + } + if (tag === 'li') { + ancestorInfo.listItemTagAutoclosing = info; + } + if (tag === 'dd' || tag === 'dt') { + ancestorInfo.dlItemTagAutoclosing = info; + } + + return ancestorInfo; + }; + + /** + * Returns whether + */ + var isTagValidWithParent = function (tag, parentTag) { + // First, let's check if we're in an unusual parsing mode... + switch (parentTag) { + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inselect + case 'select': + return tag === 'option' || tag === 'optgroup' || tag === '#text'; + case 'optgroup': + return tag === 'option' || tag === '#text'; + // Strictly speaking, seeing an <option> doesn't mean we're in a <select> + // but + case 'option': + return tag === '#text'; + + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intd + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incaption + // No special behavior since these rules fall back to "in body" mode for + // all except special table nodes which cause bad parsing behavior anyway. + + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intr + case 'tr': + return ( + tag === 'th' || tag === 'td' || tag === 'style' || tag === 'script' || tag === 'template' + ); + + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intbody + case 'tbody': + case 'thead': + case 'tfoot': + return tag === 'tr' || tag === 'style' || tag === 'script' || tag === 'template'; + + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incolgroup + case 'colgroup': + return tag === 'col' || tag === 'template'; + + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intable + case 'table': + return ( + tag === 'caption' || + tag === 'colgroup' || + tag === 'tbody' || + tag === 'tfoot' || + tag === 'thead' || + tag === 'style' || + tag === 'script' || + tag === 'template' + ); + + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inhead + case 'head': + return ( + tag === 'base' || + tag === 'basefont' || + tag === 'bgsound' || + tag === 'link' || + tag === 'meta' || + tag === 'title' || + tag === 'noscript' || + tag === 'noframes' || + tag === 'style' || + tag === 'script' || + tag === 'template' + ); + + // https://html.spec.whatwg.org/multipage/semantics.html#the-html-element + case 'html': + return tag === 'head' || tag === 'body'; + case '#document': + return tag === 'html'; + } + + // Probably in the "in body" parsing mode, so we outlaw only tag combos + // where the parsing rules cause implicit opens or closes to be added. + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody + switch (tag) { + case 'h1': + case 'h2': + case 'h3': + case 'h4': + case 'h5': + case 'h6': + return ( + parentTag !== 'h1' && + parentTag !== 'h2' && + parentTag !== 'h3' && + parentTag !== 'h4' && + parentTag !== 'h5' && + parentTag !== 'h6' + ); + + case 'rp': + case 'rt': + return impliedEndTags.indexOf(parentTag) === -1; + + case 'body': + case 'caption': + case 'col': + case 'colgroup': + case 'frame': + case 'head': + case 'html': + case 'tbody': + case 'td': + case 'tfoot': + case 'th': + case 'thead': + case 'tr': + // These tags are only valid with a few parents that have special child + // parsing rules -- if we're down here, then none of those matched and + // so we allow it only if we don't know what the parent is, as all other + // cases are invalid. + return parentTag == null; + } + + return true; + }; + + /** + * Returns whether + */ + var findInvalidAncestorForTag = function (tag, ancestorInfo) { + switch (tag) { + case 'address': + case 'article': + case 'aside': + case 'blockquote': + case 'center': + case 'details': + case 'dialog': + case 'dir': + case 'div': + case 'dl': + case 'fieldset': + case 'figcaption': + case 'figure': + case 'footer': + case 'header': + case 'hgroup': + case 'main': + case 'menu': + case 'nav': + case 'ol': + case 'p': + case 'section': + case 'summary': + case 'ul': + + case 'pre': + case 'listing': + + case 'table': + + case 'hr': + + case 'xmp': + + case 'h1': + case 'h2': + case 'h3': + case 'h4': + case 'h5': + case 'h6': + return ancestorInfo.pTagInButtonScope; + + case 'form': + return ancestorInfo.formTag || ancestorInfo.pTagInButtonScope; + + case 'li': + return ancestorInfo.listItemTagAutoclosing; + + case 'dd': + case 'dt': + return ancestorInfo.dlItemTagAutoclosing; + + case 'button': + return ancestorInfo.buttonTagInScope; + + case 'a': + // Spec says something about storing a list of markers, but it sounds + // equivalent to this check. + return ancestorInfo.aTagInScope; + + case 'nobr': + return ancestorInfo.nobrTagInScope; + } + + return null; + }; + + /** + * Given a ReactCompositeComponent instance, return a list of its recursive + * owners, starting at the root and ending with the instance itself. + */ + var findOwnerStack = function (instance) { + if (!instance) { + return []; + } + + var stack = []; + do { + stack.push(instance); + } while ((instance = instance._currentElement._owner)); + stack.reverse(); + return stack; + }; + + var didWarn = {}; + + validateDOMNesting = function (childTag, childText, childInstance, ancestorInfo) { + ancestorInfo = ancestorInfo || emptyAncestorInfo; + var parentInfo = ancestorInfo.current; + var parentTag = parentInfo && parentInfo.tag; + + if (childText != null) { + true + ? warning( + childTag == null, + 'validateDOMNesting: when childText is passed, childTag should be null', + ) + : void 0; + childTag = '#text'; + } + + var invalidParent = isTagValidWithParent(childTag, parentTag) ? null : parentInfo; + var invalidAncestor = invalidParent ? null : findInvalidAncestorForTag(childTag, ancestorInfo); + var problematic = invalidParent || invalidAncestor; + + if (problematic) { + var ancestorTag = problematic.tag; + var ancestorInstance = problematic.instance; + + var childOwner = childInstance && childInstance._currentElement._owner; + var ancestorOwner = ancestorInstance && ancestorInstance._currentElement._owner; + + var childOwners = findOwnerStack(childOwner); + var ancestorOwners = findOwnerStack(ancestorOwner); + + var minStackLen = Math.min(childOwners.length, ancestorOwners.length); + var i; + + var deepestCommon = -1; + for (i = 0; i < minStackLen; i++) { + if (childOwners[i] === ancestorOwners[i]) { + deepestCommon = i; + } else { + break; + } + } + + var UNKNOWN = '(unknown)'; + var childOwnerNames = childOwners.slice(deepestCommon + 1).map(function (inst) { + return inst.getName() || UNKNOWN; + }); + var ancestorOwnerNames = ancestorOwners.slice(deepestCommon + 1).map(function (inst) { + return inst.getName() || UNKNOWN; + }); + var ownerInfo = [] + .concat( + // If the parent and child instances have a common owner ancestor, start + // with that -- otherwise we just start with the parent's owners. + deepestCommon !== -1 ? childOwners[deepestCommon].getName() || UNKNOWN : [], + ancestorOwnerNames, + ancestorTag, + // If we're warning about an invalid (non-parent) ancestry, add '...' + invalidAncestor ? ['...'] : [], + childOwnerNames, + childTag, + ) + .join(' > '); + + var warnKey = !!invalidParent + '|' + childTag + '|' + ancestorTag + '|' + ownerInfo; + if (didWarn[warnKey]) { + return; + } + didWarn[warnKey] = true; + + var tagDisplayName = childTag; + var whitespaceInfo = ''; + if (childTag === '#text') { + if (/\S/.test(childText)) { + tagDisplayName = 'Text nodes'; + } else { + tagDisplayName = 'Whitespace text nodes'; + whitespaceInfo = + " Make sure you don't have any extra whitespace between tags on " + + 'each line of your source code.'; + } + } else { + tagDisplayName = '<' + childTag + '>'; + } + + if (invalidParent) { + var info = ''; + if (ancestorTag === 'table' && childTag === 'tr') { + info += ' Add a <tbody> to your code to match the DOM tree generated by ' + 'the browser.'; + } + true + ? warning( + false, + 'validateDOMNesting(...): %s cannot appear as a child of <%s>.%s ' + 'See %s.%s', + tagDisplayName, + ancestorTag, + whitespaceInfo, + ownerInfo, + info, + ) + : void 0; + } else { + true + ? warning( + false, + 'validateDOMNesting(...): %s cannot appear as a descendant of ' + '<%s>. See %s.', + tagDisplayName, + ancestorTag, + ownerInfo, + ) + : void 0; + } + } + }; + + validateDOMNesting.updatedAncestorInfo = updatedAncestorInfo; + + // For testing + validateDOMNesting.isTagValidInContext = function (tag, ancestorInfo) { + ancestorInfo = ancestorInfo || emptyAncestorInfo; + var parentInfo = ancestorInfo.current; + var parentTag = parentInfo && parentInfo.tag; + return isTagValidWithParent(tag, parentTag) && !findInvalidAncestorForTag(tag, ancestorInfo); + }; + } + + module.exports = validateDOMNesting; + + /***/ + }, + /* 213 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.default = createReactElement; + + var _react = __webpack_require__(1); + + var _react2 = _interopRequireDefault(_react); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + /** + * Logic to either call the generatorFunction or call React.createElement to get the + * React.Component + * @param options + * @param options.componentObj + * @param options.props + * @param options.domNodeId + * @param options.trace + * @param options.location + * @returns {Element} + */ + function createReactElement(_ref) { + var componentObj = _ref.componentObj, + props = _ref.props, + railsContext = _ref.railsContext, + domNodeId = _ref.domNodeId, + trace = _ref.trace; + var name = componentObj.name, + component = componentObj.component, + generatorFunction = componentObj.generatorFunction; + + if (trace) { + if (railsContext && railsContext.serverSide) { + console.log( + 'RENDERED ' + name + ' to dom node with id: ' + domNodeId + ' with railsContext:', + railsContext, + ); + } else { + console.log( + 'RENDERED ' + name + ' to dom node with id: ' + domNodeId + ' with props, railsContext:', + props, + railsContext, + ); + } + } + + if (generatorFunction) { + return component(props, railsContext); + } + + return _react2.default.createElement(component, props); + } /* eslint-disable react/prop-types */ + + /***/ + }, + /* 214 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['b'] = loopAsync; + /* harmony export (immutable) */ __webpack_exports__['a'] = mapAsync; + function loopAsync(turns, work, callback) { + var currentTurn = 0, + isDone = false; + var sync = false, + hasNext = false, + doneArgs = void 0; + + function done() { + isDone = true; + if (sync) { + // Iterate instead of recursing if possible. + doneArgs = [].concat(Array.prototype.slice.call(arguments)); + return; + } + + callback.apply(this, arguments); + } + + function next() { + if (isDone) { + return; + } + + hasNext = true; + if (sync) { + // Iterate instead of recursing if possible. + return; + } + + sync = true; + + while (!isDone && currentTurn < turns && hasNext) { + hasNext = false; + work.call(this, currentTurn++, next, done); + } + + sync = false; + + if (isDone) { + // This means the loop finished synchronously. + callback.apply(this, doneArgs); + return; + } + + if (currentTurn >= turns && hasNext) { + isDone = true; + callback(); + } + } + + next(); + } + + function mapAsync(array, work, callback) { + var length = array.length; + var values = []; + + if (length === 0) return callback(null, values); + + var isDone = false, + doneCount = 0; + + function done(index, error, value) { + if (isDone) return; + + if (error) { + isDone = true; + callback(error); + } else { + values[index] = value; + + isDone = ++doneCount === length; + + if (isDone) callback(null, values); + } + } + + array.forEach(function (item, index) { + work(item, index, function (error, value) { + done(index, error, value); + }); + }); + } + + /***/ + }, + /* 215 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + /* harmony export (immutable) */ __webpack_exports__['a'] = ContextProvider; + /* harmony export (immutable) */ __webpack_exports__['b'] = ContextSubscriber; + + // Works around issues with context updates failing to propagate. + // Caveat: the context value is expected to never change its identity. + // https://github.com/facebook/react/issues/2517 + // https://github.com/reactjs/react-router/issues/470 + + var contextProviderShape = __WEBPACK_IMPORTED_MODULE_0_react__['PropTypes'].shape({ + subscribe: __WEBPACK_IMPORTED_MODULE_0_react__['PropTypes'].func.isRequired, + eventIndex: __WEBPACK_IMPORTED_MODULE_0_react__['PropTypes'].number.isRequired, + }); + + function makeContextName(name) { + return '@@contextSubscriber/' + name; + } + + function ContextProvider(name) { + var _childContextTypes, _ref2; + + var contextName = makeContextName(name); + var listenersKey = contextName + '/listeners'; + var eventIndexKey = contextName + '/eventIndex'; + var subscribeKey = contextName + '/subscribe'; + + return ( + (_ref2 = { + childContextTypes: + ((_childContextTypes = {}), + (_childContextTypes[contextName] = contextProviderShape.isRequired), + _childContextTypes), + + getChildContext: function getChildContext() { + var _ref; + + return ( + (_ref = {}), + (_ref[contextName] = { + eventIndex: this[eventIndexKey], + subscribe: this[subscribeKey], + }), + _ref + ); + }, + componentWillMount: function componentWillMount() { + this[listenersKey] = []; + this[eventIndexKey] = 0; + }, + componentWillReceiveProps: function componentWillReceiveProps() { + this[eventIndexKey]++; + }, + componentDidUpdate: function componentDidUpdate() { + var _this = this; + + this[listenersKey].forEach(function (listener) { + return listener(_this[eventIndexKey]); + }); + }, + }), + (_ref2[subscribeKey] = function (listener) { + var _this2 = this; + + // No need to immediately call listener here. + this[listenersKey].push(listener); + + return function () { + _this2[listenersKey] = _this2[listenersKey].filter(function (item) { + return item !== listener; + }); + }; + }), + _ref2 + ); + } + + function ContextSubscriber(name) { + var _contextTypes, _ref4; + + var contextName = makeContextName(name); + var lastRenderedEventIndexKey = contextName + '/lastRenderedEventIndex'; + var handleContextUpdateKey = contextName + '/handleContextUpdate'; + var unsubscribeKey = contextName + '/unsubscribe'; + + return ( + (_ref4 = { + contextTypes: + ((_contextTypes = {}), (_contextTypes[contextName] = contextProviderShape), _contextTypes), + + getInitialState: function getInitialState() { + var _ref3; + + if (!this.context[contextName]) { + return {}; + } + + return ( + (_ref3 = {}), (_ref3[lastRenderedEventIndexKey] = this.context[contextName].eventIndex), _ref3 + ); + }, + componentDidMount: function componentDidMount() { + if (!this.context[contextName]) { + return; + } + + this[unsubscribeKey] = this.context[contextName].subscribe(this[handleContextUpdateKey]); + }, + componentWillReceiveProps: function componentWillReceiveProps() { + var _setState; + + if (!this.context[contextName]) { + return; + } + + this.setState( + ((_setState = {}), + (_setState[lastRenderedEventIndexKey] = this.context[contextName].eventIndex), + _setState), + ); + }, + componentWillUnmount: function componentWillUnmount() { + if (!this[unsubscribeKey]) { + return; + } + + this[unsubscribeKey](); + this[unsubscribeKey] = null; + }, + }), + (_ref4[handleContextUpdateKey] = function (eventIndex) { + if (eventIndex !== this.state[lastRenderedEventIndexKey]) { + var _setState2; + + this.setState( + ((_setState2 = {}), (_setState2[lastRenderedEventIndexKey] = eventIndex), _setState2), + ); + } + }), + _ref4 + ); + } + + /***/ + }, + /* 216 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'b', function () { + return routerShape; + }); + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'a', function () { + return locationShape; + }); + + var func = __WEBPACK_IMPORTED_MODULE_0_react__['PropTypes'].func, + object = __WEBPACK_IMPORTED_MODULE_0_react__['PropTypes'].object, + shape = __WEBPACK_IMPORTED_MODULE_0_react__['PropTypes'].shape, + string = __WEBPACK_IMPORTED_MODULE_0_react__['PropTypes'].string; + + var routerShape = shape({ + push: func.isRequired, + replace: func.isRequired, + go: func.isRequired, + goBack: func.isRequired, + goForward: func.isRequired, + setRouteLeaveHook: func.isRequired, + isActive: func.isRequired, + }); + + var locationShape = shape({ + pathname: string.isRequired, + search: string.isRequired, + state: object, + action: string.isRequired, + key: string, + }); + + /***/ + }, + /* 217 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant__ = __webpack_require__(16); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_invariant__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__getRouteParams__ = __webpack_require__(811); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__ContextUtils__ = __webpack_require__(215); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__RouteUtils__ = __webpack_require__(68); + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + var _typeof = + typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' + ? function (obj) { + return typeof obj; + } + : function (obj) { + return obj && + typeof Symbol === 'function' && + obj.constructor === Symbol && + obj !== Symbol.prototype + ? 'symbol' + : typeof obj; + }; + + var _React$PropTypes = __WEBPACK_IMPORTED_MODULE_1_react___default.a.PropTypes, + array = _React$PropTypes.array, + func = _React$PropTypes.func, + object = _React$PropTypes.object; + + /** + * A <RouterContext> renders the component tree for a given router state + * and sets the history object and the current location in context. + */ + + var RouterContext = __WEBPACK_IMPORTED_MODULE_1_react___default.a.createClass({ + displayName: 'RouterContext', + + mixins: [ + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__ContextUtils__['a' /* ContextProvider */])( + 'router', + ), + ], + + propTypes: { + router: object.isRequired, + location: object.isRequired, + routes: array.isRequired, + params: object.isRequired, + components: array.isRequired, + createElement: func.isRequired, + }, + + getDefaultProps: function getDefaultProps() { + return { + createElement: __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement, + }; + }, + + childContextTypes: { + router: object.isRequired, + }, + + getChildContext: function getChildContext() { + return { + router: this.props.router, + }; + }, + createElement: function createElement(component, props) { + return component == null ? null : this.props.createElement(component, props); + }, + render: function render() { + var _this = this; + + var _props = this.props, + location = _props.location, + routes = _props.routes, + params = _props.params, + components = _props.components, + router = _props.router; + + var element = null; + + if (components) { + element = components.reduceRight(function (element, components, index) { + if (components == null) return element; // Don't create new children; use the grandchildren. + + var route = routes[index]; + var routeParams = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_2__getRouteParams__['a' /* default */], + )(route, params); + var props = { + location: location, + params: params, + route: route, + router: router, + routeParams: routeParams, + routes: routes, + }; + + if ( + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__RouteUtils__['b' /* isReactChildren */])( + element, + ) + ) { + props.children = element; + } else if (element) { + for (var prop in element) { + if (Object.prototype.hasOwnProperty.call(element, prop)) props[prop] = element[prop]; + } + } + + if ((typeof components === 'undefined' ? 'undefined' : _typeof(components)) === 'object') { + var elements = {}; + + for (var key in components) { + if (Object.prototype.hasOwnProperty.call(components, key)) { + // Pass through the key as a prop to createElement to allow + // custom createElement functions to know which named component + // they're rendering, for e.g. matching up to fetched data. + elements[key] = _this.createElement( + components[key], + _extends( + { + key: key, + }, + props, + ), + ); + } + } + + return elements; + } + + return _this.createElement(components, props); + }, element); + } + + !( + element === null || + element === false || + __WEBPACK_IMPORTED_MODULE_1_react___default.a.isValidElement(element) + ) + ? true + ? __WEBPACK_IMPORTED_MODULE_0_invariant___default()( + false, + 'The root route must render a single element', + ) + : invariant(false) + : void 0; + + return element; + }, + }); + + /* harmony default export */ __webpack_exports__['a'] = RouterContext; + + /***/ + }, + /* 218 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + Object.defineProperty(__webpack_exports__, '__esModule', { value: true }); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Router__ = __webpack_require__(805); + /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, 'Router', function () { + return __WEBPACK_IMPORTED_MODULE_0__Router__['a']; + }); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Link__ = __webpack_require__(347); + /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, 'Link', function () { + return __WEBPACK_IMPORTED_MODULE_1__Link__['a']; + }); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__IndexLink__ = __webpack_require__(801); + /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, 'IndexLink', function () { + return __WEBPACK_IMPORTED_MODULE_2__IndexLink__['a']; + }); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__withRouter__ = __webpack_require__(816); + /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, 'withRouter', function () { + return __WEBPACK_IMPORTED_MODULE_3__withRouter__['a']; + }); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__IndexRedirect__ = __webpack_require__(802); + /* harmony reexport (binding) */ __webpack_require__.d( + __webpack_exports__, + 'IndexRedirect', + function () { + return __WEBPACK_IMPORTED_MODULE_4__IndexRedirect__['a']; + }, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__IndexRoute__ = __webpack_require__(803); + /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, 'IndexRoute', function () { + return __WEBPACK_IMPORTED_MODULE_5__IndexRoute__['a']; + }); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__Redirect__ = __webpack_require__(349); + /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, 'Redirect', function () { + return __WEBPACK_IMPORTED_MODULE_6__Redirect__['a']; + }); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__Route__ = __webpack_require__(804); + /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, 'Route', function () { + return __WEBPACK_IMPORTED_MODULE_7__Route__['a']; + }); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__RouteUtils__ = __webpack_require__(68); + /* harmony reexport (binding) */ __webpack_require__.d( + __webpack_exports__, + 'createRoutes', + function () { + return __WEBPACK_IMPORTED_MODULE_8__RouteUtils__['a']; + }, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__RouterContext__ = __webpack_require__(217); + /* harmony reexport (binding) */ __webpack_require__.d( + __webpack_exports__, + 'RouterContext', + function () { + return __WEBPACK_IMPORTED_MODULE_9__RouterContext__['a']; + }, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__PropTypes__ = __webpack_require__(216); + /* harmony reexport (binding) */ __webpack_require__.d( + __webpack_exports__, + 'locationShape', + function () { + return __WEBPACK_IMPORTED_MODULE_10__PropTypes__['a']; + }, + ); + /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, 'routerShape', function () { + return __WEBPACK_IMPORTED_MODULE_10__PropTypes__['b']; + }); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__match__ = __webpack_require__(814); + /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, 'match', function () { + return __WEBPACK_IMPORTED_MODULE_11__match__['a']; + }); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__useRouterHistory__ = __webpack_require__(354); + /* harmony reexport (binding) */ __webpack_require__.d( + __webpack_exports__, + 'useRouterHistory', + function () { + return __WEBPACK_IMPORTED_MODULE_12__useRouterHistory__['a']; + }, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__PatternUtils__ = __webpack_require__(105); + /* harmony reexport (binding) */ __webpack_require__.d( + __webpack_exports__, + 'formatPattern', + function () { + return __WEBPACK_IMPORTED_MODULE_13__PatternUtils__['a']; + }, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__applyRouterMiddleware__ = + __webpack_require__(807); + /* harmony reexport (binding) */ __webpack_require__.d( + __webpack_exports__, + 'applyRouterMiddleware', + function () { + return __WEBPACK_IMPORTED_MODULE_14__applyRouterMiddleware__['a']; + }, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__browserHistory__ = __webpack_require__(808); + /* harmony reexport (binding) */ __webpack_require__.d( + __webpack_exports__, + 'browserHistory', + function () { + return __WEBPACK_IMPORTED_MODULE_15__browserHistory__['a']; + }, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__hashHistory__ = __webpack_require__(812); + /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, 'hashHistory', function () { + return __WEBPACK_IMPORTED_MODULE_16__hashHistory__['a']; + }); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__createMemoryHistory__ = __webpack_require__(351); + /* harmony reexport (binding) */ __webpack_require__.d( + __webpack_exports__, + 'createMemoryHistory', + function () { + return __WEBPACK_IMPORTED_MODULE_17__createMemoryHistory__['a']; + }, + ); + /* components */ + + /* components (configuration) */ + + /* utils */ + + /* histories */ + + /***/ + }, + /* 219 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var _prodInvariant = __webpack_require__(87); + + var ReactNoopUpdateQueue = __webpack_require__(220); + + var canDefineProperty = __webpack_require__(222); + var emptyObject = __webpack_require__(83); + var invariant = __webpack_require__(2); + var warning = __webpack_require__(3); + + /** + * Base class helpers for the updating state of a component. + */ + function ReactComponent(props, context, updater) { + this.props = props; + this.context = context; + this.refs = emptyObject; + // We initialize the default updater but the real one gets injected by the + // renderer. + this.updater = updater || ReactNoopUpdateQueue; + } + + ReactComponent.prototype.isReactComponent = {}; + + /** + * Sets a subset of the state. Always use this to mutate + * state. You should treat `this.state` as immutable. + * + * There is no guarantee that `this.state` will be immediately updated, so + * accessing `this.state` after calling this method may return the old value. + * + * There is no guarantee that calls to `setState` will run synchronously, + * as they may eventually be batched together. You can provide an optional + * callback that will be executed when the call to setState is actually + * completed. + * + * When a function is provided to setState, it will be called at some point in + * the future (not synchronously). It will be called with the up to date + * component arguments (state, props, context). These values can be different + * from this.* because your function may be called after receiveProps but before + * shouldComponentUpdate, and this new state, props, and context will not yet be + * assigned to this. + * + * @param {object|function} partialState Next partial state or function to + * produce next partial state to be merged with current state. + * @param {?function} callback Called after state is updated. + * @final + * @protected + */ + ReactComponent.prototype.setState = function (partialState, callback) { + !(typeof partialState === 'object' || typeof partialState === 'function' || partialState == null) + ? true + ? invariant( + false, + 'setState(...): takes an object of state variables to update or a function which returns an object of state variables.', + ) + : _prodInvariant('85') + : void 0; + this.updater.enqueueSetState(this, partialState); + if (callback) { + this.updater.enqueueCallback(this, callback, 'setState'); + } + }; + + /** + * Forces an update. This should only be invoked when it is known with + * certainty that we are **not** in a DOM transaction. + * + * You may want to call this when you know that some deeper aspect of the + * component's state has changed but `setState` was not called. + * + * This will not invoke `shouldComponentUpdate`, but it will invoke + * `componentWillUpdate` and `componentDidUpdate`. + * + * @param {?function} callback Called after update is complete. + * @final + * @protected + */ + ReactComponent.prototype.forceUpdate = function (callback) { + this.updater.enqueueForceUpdate(this); + if (callback) { + this.updater.enqueueCallback(this, callback, 'forceUpdate'); + } + }; + + /** + * Deprecated APIs. These APIs used to exist on classic React classes but since + * we would like to deprecate them, we're not going to move them over to this + * modern base class. Instead, we define a getter that warns if it's accessed. + */ + if (true) { + var deprecatedAPIs = { + isMounted: [ + 'isMounted', + 'Instead, make sure to clean up subscriptions and pending requests in ' + + 'componentWillUnmount to prevent memory leaks.', + ], + replaceState: [ + 'replaceState', + 'Refactor your code to use setState instead (see ' + + 'https://github.com/facebook/react/issues/3236).', + ], + }; + var defineDeprecationWarning = function (methodName, info) { + if (canDefineProperty) { + Object.defineProperty(ReactComponent.prototype, methodName, { + get: function () { + true + ? warning( + false, + '%s(...) is deprecated in plain JavaScript React classes. %s', + info[0], + info[1], + ) + : void 0; + return undefined; + }, + }); + } + }; + for (var fnName in deprecatedAPIs) { + if (deprecatedAPIs.hasOwnProperty(fnName)) { + defineDeprecationWarning(fnName, deprecatedAPIs[fnName]); + } + } + } + + module.exports = ReactComponent; + + /***/ + }, + /* 220 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var warning = __webpack_require__(3); + + function warnNoop(publicInstance, callerName) { + if (true) { + var constructor = publicInstance.constructor; + true + ? warning( + false, + '%s(...): Can only update a mounted or mounting component. ' + + 'This usually means you called %s() on an unmounted component. ' + + 'This is a no-op. Please check the code for the %s component.', + callerName, + callerName, + (constructor && (constructor.displayName || constructor.name)) || 'ReactClass', + ) + : void 0; + } + } + + /** + * This is the abstract API for an update queue. + */ + var ReactNoopUpdateQueue = { + /** + * Checks whether or not this composite component is mounted. + * @param {ReactClass} publicInstance The instance we want to test. + * @return {boolean} True if mounted, false otherwise. + * @protected + * @final + */ + isMounted: function (publicInstance) { + return false; + }, + + /** + * Enqueue a callback that will be executed after all the pending updates + * have processed. + * + * @param {ReactClass} publicInstance The instance to use as `this` context. + * @param {?function} callback Called after state is updated. + * @internal + */ + enqueueCallback: function (publicInstance, callback) {}, + + /** + * Forces an update. This should only be invoked when it is known with + * certainty that we are **not** in a DOM transaction. + * + * You may want to call this when you know that some deeper aspect of the + * component's state has changed but `setState` was not called. + * + * This will not invoke `shouldComponentUpdate`, but it will invoke + * `componentWillUpdate` and `componentDidUpdate`. + * + * @param {ReactClass} publicInstance The instance that should rerender. + * @internal + */ + enqueueForceUpdate: function (publicInstance) { + warnNoop(publicInstance, 'forceUpdate'); + }, + + /** + * Replaces all of the state. Always use this or `setState` to mutate state. + * You should treat `this.state` as immutable. + * + * There is no guarantee that `this.state` will be immediately updated, so + * accessing `this.state` after calling this method may return the old value. + * + * @param {ReactClass} publicInstance The instance that should rerender. + * @param {object} completeState Next state. + * @internal + */ + enqueueReplaceState: function (publicInstance, completeState) { + warnNoop(publicInstance, 'replaceState'); + }, + + /** + * Sets a subset of the state. This only exists because _pendingState is + * internal. This provides a merging strategy that is not available to deep + * properties which is confusing. TODO: Expose pendingState or don't use it + * during the merge. + * + * @param {ReactClass} publicInstance The instance that should rerender. + * @param {object} partialState Next partial state to be merged with state. + * @internal + */ + enqueueSetState: function (publicInstance, partialState) { + warnNoop(publicInstance, 'setState'); + }, + }; + + module.exports = ReactNoopUpdateQueue; + + /***/ + }, + /* 221 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + var ReactPropTypeLocationNames = {}; + + if (true) { + ReactPropTypeLocationNames = { + prop: 'prop', + context: 'context', + childContext: 'child context', + }; + } + + module.exports = ReactPropTypeLocationNames; + + /***/ + }, + /* 222 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + var canDefineProperty = false; + if (true) { + try { + // $FlowFixMe https://github.com/facebook/flow/issues/285 + Object.defineProperty({}, 'x', { get: function () {} }); + canDefineProperty = true; + } catch (x) { + // IE will fail on defineProperty + } + } + + module.exports = canDefineProperty; + + /***/ + }, + /* 223 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + /* global Symbol */ + + var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; + var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec. + + /** + * Returns the iterator method function contained on the iterable object. + * + * Be sure to invoke the function with the iterable as context: + * + * var iteratorFn = getIteratorFn(myIterable); + * if (iteratorFn) { + * var iterator = iteratorFn.call(myIterable); + * ... + * } + * + * @param {?object} maybeIterable + * @return {?function} + */ + function getIteratorFn(maybeIterable) { + var iteratorFn = + maybeIterable && + ((ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL]) || maybeIterable[FAUX_ITERATOR_SYMBOL]); + if (typeof iteratorFn === 'function') { + return iteratorFn; + } + } + + module.exports = getIteratorFn; + + /***/ + }, + /* 224 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = __webpack_require__(369); + + /***/ + }, + /* 225 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var utils = __webpack_require__(35); + var settle = __webpack_require__(375); + var buildURL = __webpack_require__(378); + var parseHeaders = __webpack_require__(384); + var isURLSameOrigin = __webpack_require__(382); + var createError = __webpack_require__(228); + var btoa = + (typeof window !== 'undefined' && window.btoa && window.btoa.bind(window)) || + __webpack_require__(377); + + module.exports = function xhrAdapter(config) { + return new Promise(function dispatchXhrRequest(resolve, reject) { + var requestData = config.data; + var requestHeaders = config.headers; + + if (utils.isFormData(requestData)) { + delete requestHeaders['Content-Type']; // Let the browser set it + } + + var request = new XMLHttpRequest(); + var loadEvent = 'onreadystatechange'; + var xDomain = false; + + // For IE 8/9 CORS support + // Only supports POST and GET calls and doesn't returns the response headers. + // DON'T do this for testing b/c XMLHttpRequest is mocked, not XDomainRequest. + if ( + 'development' !== 'test' && + typeof window !== 'undefined' && + window.XDomainRequest && + !('withCredentials' in request) && + !isURLSameOrigin(config.url) + ) { + request = new window.XDomainRequest(); + loadEvent = 'onload'; + xDomain = true; + request.onprogress = function handleProgress() {}; + request.ontimeout = function handleTimeout() {}; + } + + // HTTP basic authentication + if (config.auth) { + var username = config.auth.username || ''; + var password = config.auth.password || ''; + requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password); + } + + request.open( + config.method.toUpperCase(), + buildURL(config.url, config.params, config.paramsSerializer), + true, + ); + + // Set the request timeout in MS + request.timeout = config.timeout; + + // Listen for ready state + request[loadEvent] = function handleLoad() { + if (!request || (request.readyState !== 4 && !xDomain)) { + return; + } + + // The request errored out and we didn't get a response, this will be + // handled by onerror instead + // With one exception: request that using file: protocol, most browsers + // will return status as 0 even though it's a successful request + if ( + request.status === 0 && + !(request.responseURL && request.responseURL.indexOf('file:') === 0) + ) { + return; + } + + // Prepare the response + var responseHeaders = + 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null; + var responseData = + !config.responseType || config.responseType === 'text' + ? request.responseText + : request.response; + var response = { + data: responseData, + // IE sends 1223 instead of 204 (https://github.com/mzabriskie/axios/issues/201) + status: request.status === 1223 ? 204 : request.status, + statusText: request.status === 1223 ? 'No Content' : request.statusText, + headers: responseHeaders, + config: config, + request: request, + }; + + settle(resolve, reject, response); + + // Clean up request + request = null; + }; + + // Handle low level network errors + request.onerror = function handleError() { + // Real errors are hidden from us by the browser + // onerror should only fire if it's a network error + reject(createError('Network Error', config)); + + // Clean up request + request = null; + }; + + // Handle timeout + request.ontimeout = function handleTimeout() { + reject(createError('timeout of ' + config.timeout + 'ms exceeded', config, 'ECONNABORTED')); + + // Clean up request + request = null; + }; + + // Add xsrf header + // This is only done if running in a standard browser environment. + // Specifically not if we're in a web worker, or react-native. + if (utils.isStandardBrowserEnv()) { + var cookies = __webpack_require__(380); + + // Add xsrf header + var xsrfValue = + (config.withCredentials || isURLSameOrigin(config.url)) && config.xsrfCookieName + ? cookies.read(config.xsrfCookieName) + : undefined; + + if (xsrfValue) { + requestHeaders[config.xsrfHeaderName] = xsrfValue; + } + } + + // Add headers to the request + if ('setRequestHeader' in request) { + utils.forEach(requestHeaders, function setRequestHeader(val, key) { + if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') { + // Remove Content-Type if data is undefined + delete requestHeaders[key]; + } else { + // Otherwise add header to the request + request.setRequestHeader(key, val); + } + }); + } + + // Add withCredentials to request if needed + if (config.withCredentials) { + request.withCredentials = true; + } + + // Add responseType to request if needed + if (config.responseType) { + try { + request.responseType = config.responseType; + } catch (e) { + // Expected DOMException thrown by browsers not compatible XMLHttpRequest Level 2. + // But, this can be suppressed for 'json' type as it can be parsed by default 'transformResponse' function. + if (config.responseType !== 'json') { + throw e; + } + } + } + + // Handle progress if needed + if (typeof config.onDownloadProgress === 'function') { + request.addEventListener('progress', config.onDownloadProgress); + } + + // Not all browsers support upload events + if (typeof config.onUploadProgress === 'function' && request.upload) { + request.upload.addEventListener('progress', config.onUploadProgress); + } + + if (config.cancelToken) { + // Handle cancellation + config.cancelToken.promise.then(function onCanceled(cancel) { + if (!request) { + return; + } + + request.abort(); + reject(cancel); + // Clean up request + request = null; + }); + } + + if (requestData === undefined) { + requestData = null; + } + + // Send the request + request.send(requestData); + }); + }; + + /***/ + }, + /* 226 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + /** + * A `Cancel` is an object that is thrown when an operation is canceled. + * + * @class + * @param {string=} message The message. + */ + function Cancel(message) { + this.message = message; + } + + Cancel.prototype.toString = function toString() { + return 'Cancel' + (this.message ? ': ' + this.message : ''); + }; + + Cancel.prototype.__CANCEL__ = true; + + module.exports = Cancel; + + /***/ + }, + /* 227 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + module.exports = function isCancel(value) { + return !!(value && value.__CANCEL__); + }; + + /***/ + }, + /* 228 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var enhanceError = __webpack_require__(374); + + /** + * Create an Error with the specified message, config, error code, and response. + * + * @param {string} message The error message. + * @param {Object} config The config. + * @param {string} [code] The error code (for example, 'ECONNABORTED'). + @ @param {Object} [response] The response. + * @returns {Error} The created error. + */ + module.exports = function createError(message, config, code, response) { + var error = new Error(message); + return enhanceError(error, config, code, response); + }; + + /***/ + }, + /* 229 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + module.exports = function bind(fn, thisArg) { + return function wrap() { + var args = new Array(arguments.length); + for (var i = 0; i < args.length; i++) { + args[i] = arguments[i]; + } + return fn.apply(thisArg, args); + }; + }; + + /***/ + }, + /* 230 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.setIsFetching = setIsFetching; + exports.setIsSaving = setIsSaving; + exports.fetchCommentsSuccess = fetchCommentsSuccess; + exports.fetchCommentsFailure = fetchCommentsFailure; + exports.messageReceived = messageReceived; + exports.submitCommentSuccess = submitCommentSuccess; + exports.submitCommentFailure = submitCommentFailure; + exports.fetchComments = fetchComments; + exports.submitComment = submitComment; + exports.setLocale = setLocale; + + var _requestsManager = __webpack_require__(404); + + var _requestsManager2 = _interopRequireDefault(_requestsManager); + + var _commentsConstants = __webpack_require__(235); + + var actionTypes = _interopRequireWildcard(_commentsConstants); + + function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; + } + } + newObj.default = obj; + return newObj; + } + } + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + function setIsFetching() { + return { + type: actionTypes.SET_IS_FETCHING, + }; + } + + function setIsSaving() { + return { + type: actionTypes.SET_IS_SAVING, + }; + } + + function fetchCommentsSuccess(data) { + return { + type: actionTypes.FETCH_COMMENTS_SUCCESS, + comments: data.comments, + }; + } + + function fetchCommentsFailure(error) { + return { + type: actionTypes.FETCH_COMMENTS_FAILURE, + error: error, + }; + } + + function messageReceived(comment) { + return { + type: actionTypes.MESSAGE_RECEIVED, + comment: comment, + }; + } + + function submitCommentSuccess(comment) { + return { + type: actionTypes.SUBMIT_COMMENT_SUCCESS, + comment: comment, + }; + } + + function submitCommentFailure(error) { + return { + type: actionTypes.SUBMIT_COMMENT_FAILURE, + error: error, + }; + } + + function fetchComments() { + return function (dispatch) { + dispatch(setIsFetching()); + return _requestsManager2.default + .fetchEntities() + .then(function (res) { + return dispatch(fetchCommentsSuccess(res.data)); + }) + .catch(function (error) { + return dispatch(fetchCommentsFailure(error)); + }); + }; + } + + function submitComment(comment) { + return function (dispatch) { + dispatch(setIsSaving()); + return _requestsManager2.default + .submitEntity({ comment: comment }) + .then(function (res) { + return dispatch(submitCommentSuccess(res.data)); + }) + .catch(function (error) { + return dispatch(submitCommentFailure(error)); + }); + }; + } + + function setLocale(locale) { + return { + type: actionTypes.SET_LOCALE, + locale: locale, + }; + } + + /***/ + }, + /* 231 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + var _react = __webpack_require__(1); + + var _react2 = _interopRequireDefault(_react); + + var _reactDom = __webpack_require__(140); + + var _reactDom2 = _interopRequireDefault(_reactDom); + + var _Col = __webpack_require__(709); + + var _Col2 = _interopRequireDefault(_Col); + + var _FormControl = __webpack_require__(712); + + var _FormControl2 = _interopRequireDefault(_FormControl); + + var _ControlLabel = __webpack_require__(710); + + var _ControlLabel2 = _interopRequireDefault(_ControlLabel); + + var _Form = __webpack_require__(711); + + var _Form2 = _interopRequireDefault(_Form); + + var _FormGroup = __webpack_require__(715); + + var _FormGroup2 = _interopRequireDefault(_FormGroup); + + var _Button = __webpack_require__(708); + + var _Button2 = _interopRequireDefault(_Button); + + var _Nav = __webpack_require__(717); + + var _Nav2 = _interopRequireDefault(_Nav); + + var _NavItem = __webpack_require__(718); + + var _NavItem2 = _interopRequireDefault(_NavItem); + + var _Alert = __webpack_require__(303); + + var _Alert2 = _interopRequireDefault(_Alert); + + var _reactAddonsCssTransitionGroup = __webpack_require__(302); + + var _reactAddonsCssTransitionGroup2 = _interopRequireDefault(_reactAddonsCssTransitionGroup); + + var _lodash = __webpack_require__(114); + + var _lodash2 = _interopRequireDefault(_lodash); + + var _reactIntl = __webpack_require__(101); + + var _default = __webpack_require__(88); + + var _BaseComponent2 = __webpack_require__(36); + + var _BaseComponent3 = _interopRequireDefault(_BaseComponent2); + + var _CommentForm = __webpack_require__(643); + + var _CommentForm2 = _interopRequireDefault(_CommentForm); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } // NOTE: https://github.com/react-bootstrap/react-bootstrap/issues/1850 seesm to require string + // refs and not the callback kind. + /* eslint-disable react/no-find-dom-node, react/no-string-refs */ + + var emptyComment = { author: '', text: '' }; + + function bsStyleFor(propName, error) { + if (error) { + var errorData = (error && error.response && error.response.data) || {}; + return propName in errorData ? 'error' : 'success'; + } + + return null; + } + + var CommentForm = (function (_BaseComponent) { + _inherits(CommentForm, _BaseComponent); + + function CommentForm(props, context) { + _classCallCheck(this, CommentForm); + + var _this = _possibleConstructorReturn( + this, + (CommentForm.__proto__ || Object.getPrototypeOf(CommentForm)).call(this, props, context), + ); + + _this.state = { + formMode: 0, + comment: emptyComment, + }; + + _lodash2.default.bindAll(_this, ['handleSelect', 'handleChange', 'handleSubmit', 'resetAndFocus']); + return _this; + } + + _createClass(CommentForm, [ + { + key: 'handleSelect', + value: function handleSelect(selectedKey) { + this.setState({ formMode: selectedKey }); + }, + }, + { + key: 'handleChange', + value: function handleChange() { + var comment = void 0; + + switch (this.state.formMode) { + case 0: + comment = { + author: _reactDom2.default.findDOMNode(this.refs.horizontalAuthorNode).value, + text: _reactDom2.default.findDOMNode(this.refs.horizontalTextNode).value, + }; + break; + case 1: + comment = { + author: _reactDom2.default.findDOMNode(this.refs.stackedAuthorNode).value, + text: _reactDom2.default.findDOMNode(this.refs.stackedTextNode).value, + }; + break; + case 2: + comment = { + // This is different because the input is a native HTML element + // rather than a React element. + author: _reactDom2.default.findDOMNode(this.refs.inlineAuthorNode).value, + text: _reactDom2.default.findDOMNode(this.refs.inlineTextNode).value, + }; + break; + default: + throw new Error('Unexpected state.formMode ' + this.state.formMode); + } + + this.setState({ comment: comment }); + }, + }, + { + key: 'handleSubmit', + value: function handleSubmit(e) { + e.preventDefault(); + var actions = this.props.actions; + + actions.submitComment(this.state.comment).then(this.resetAndFocus); + }, + }, + { + key: 'resetAndFocus', + value: function resetAndFocus() { + // Don't reset a form that didn't submit, this results in data loss + if (this.props.error) return; + + var comment = { author: this.state.comment.author, text: '' }; + this.setState({ comment: comment }); + + var ref = void 0; + switch (this.state.formMode) { + case 0: + ref = _reactDom2.default.findDOMNode(this.refs.horizontalTextNode); + break; + case 1: + ref = _reactDom2.default.findDOMNode(this.refs.stackedTextNode); + break; + case 2: + ref = _reactDom2.default.findDOMNode(this.refs.inlineTextNode); + break; + default: + throw new Error('Unexpected state.formMode ' + this.state.formMode); + } + + ref.focus(); + }, + }, + { + key: 'formHorizontal', + value: function formHorizontal() { + var formatMessage = this.props.intl.formatMessage; + + return _react2.default.createElement( + 'div', + null, + _react2.default.createElement('hr', null), + _react2.default.createElement( + _Form2.default, + { horizontal: true, className: 'commentForm form-horizontal', onSubmit: this.handleSubmit }, + _react2.default.createElement( + _FormGroup2.default, + { controlId: 'formHorizontalName' }, + _react2.default.createElement( + _Col2.default, + { componentClass: _ControlLabel2.default, sm: 2 }, + formatMessage(_default.defaultMessages.inputNameLabel), + ), + _react2.default.createElement( + _Col2.default, + { sm: 10 }, + _react2.default.createElement(_FormControl2.default, { + type: 'text', + placeholder: formatMessage(_default.defaultMessages.inputNamePlaceholder), + ref: 'horizontalAuthorNode', + value: this.state.comment.author, + onChange: this.handleChange, + disabled: this.props.isSaving, + bsStyle: bsStyleFor('author', this.props.error), + }), + ), + ), + _react2.default.createElement( + _FormGroup2.default, + { controlId: 'formHorizontalName' }, + _react2.default.createElement( + _Col2.default, + { componentClass: _ControlLabel2.default, sm: 2 }, + formatMessage(_default.defaultMessages.inputTextLabel), + ), + _react2.default.createElement( + _Col2.default, + { sm: 10 }, + _react2.default.createElement(_FormControl2.default, { + type: 'textarea', + label: 'Text', + placeholder: formatMessage(_default.defaultMessages.inputTextPlaceholder), + ref: 'horizontalTextNode', + value: this.state.comment.text, + onChange: this.handleChange, + disabled: this.props.isSaving, + bsStyle: bsStyleFor('text', this.props.error), + }), + ), + ), + _react2.default.createElement( + _FormGroup2.default, + { controlId: 'formHorizontalSubmit' }, + _react2.default.createElement( + _Col2.default, + { smOffset: 2, sm: 10 }, + _react2.default.createElement( + _Button2.default, + { + type: 'submit', + className: 'btn btn-primary', + disabled: this.props.isSaving, + }, + this.props.isSaving + ? formatMessage(_default.defaultMessages.inputSaving) + '...' + : formatMessage(_default.defaultMessages.inputPost), + ), + ), + ), + ), + ); + }, + }, + { + key: 'formStacked', + value: function formStacked() { + var formatMessage = this.props.intl.formatMessage; + + return _react2.default.createElement( + 'div', + null, + _react2.default.createElement('hr', null), + _react2.default.createElement( + 'form', + { className: 'commentForm form form-stacked', onSubmit: this.handleSubmit }, + _react2.default.createElement( + _FormGroup2.default, + { controlId: 'formBasicName' }, + _react2.default.createElement( + _ControlLabel2.default, + null, + formatMessage(_default.defaultMessages.inputNameLabel), + ), + _react2.default.createElement(_FormControl2.default, { + type: 'text', + placeholder: formatMessage(_default.defaultMessages.inputNamePlaceholder), + ref: 'stackedAuthorNode', + value: this.state.comment.author, + onChange: this.handleChange, + disabled: this.props.isSaving, + bsStyle: bsStyleFor('author', this.props.error), + }), + ), + _react2.default.createElement( + _FormGroup2.default, + { + controlId: 'formBasicText', + }, + _react2.default.createElement( + _ControlLabel2.default, + null, + formatMessage(_default.defaultMessages.inputTextLabel), + ), + _react2.default.createElement(_FormControl2.default, { + type: 'textarea', + label: 'Text', + placeholder: formatMessage(_default.defaultMessages.inputTextPlaceholder), + ref: 'stackedTextNode', + value: this.state.comment.text, + onChange: this.handleChange, + disabled: this.props.isSaving, + bsStyle: bsStyleFor('text', this.props.error), + }), + ), + _react2.default.createElement( + _FormGroup2.default, + { controlId: 'formBasicSubmit' }, + _react2.default.createElement( + _Button2.default, + { + type: 'submit', + className: 'btn btn-primary', + disabled: this.props.isSaving, + }, + this.props.isSaving + ? formatMessage(_default.defaultMessages.inputSaving) + '...' + : formatMessage(_default.defaultMessages.inputPost), + ), + ), + ), + ); + }, + + // Head up! We have some CSS modules going on here with the className props below. + }, + { + key: 'formInline', + value: function formInline() { + var formatMessage = this.props.intl.formatMessage; + + return _react2.default.createElement( + 'div', + null, + _react2.default.createElement('hr', null), + _react2.default.createElement( + _Form2.default, + { inline: true, className: 'commentForm', onSubmit: this.handleSubmit }, + _react2.default.createElement( + _FormGroup2.default, + { controlId: 'formInlineName' }, + _react2.default.createElement( + _ControlLabel2.default, + null, + formatMessage(_default.defaultMessages.inputNameLabel), + ), + _react2.default.createElement(_FormControl2.default, { + type: 'text', + placeholder: formatMessage(_default.defaultMessages.inputNamePlaceholder), + ref: 'inlineAuthorNode', + value: this.state.comment.author, + onChange: this.handleChange, + disabled: this.props.isSaving, + bsStyle: bsStyleFor('author', this.props.error), + className: _CommentForm2.default.nameFormControl, + }), + ), + _react2.default.createElement( + _FormGroup2.default, + { controlId: 'formInlineName' }, + _react2.default.createElement( + _ControlLabel2.default, + null, + formatMessage(_default.defaultMessages.inputTextLabel), + ), + _react2.default.createElement(_FormControl2.default, { + type: 'textarea', + label: 'Text', + placeholder: formatMessage(_default.defaultMessages.inputTextPlaceholder), + ref: 'inlineTextNode', + value: this.state.comment.text, + onChange: this.handleChange, + disabled: this.props.isSaving, + bsStyle: bsStyleFor('text', this.props.error), + className: _CommentForm2.default.textFormControl, + }), + ), + _react2.default.createElement( + _Button2.default, + { + type: 'submit', + className: 'btn btn-primary', + disabled: this.props.isSaving, + }, + this.props.isSaving + ? formatMessage(_default.defaultMessages.inputSaving) + '...' + : formatMessage(_default.defaultMessages.inputPost), + ), + ), + ); + }, + }, + { + key: 'errorWarning', + value: function errorWarning() { + var error = this.props.error; + + // If there is no error, there is nothing to add to the DOM + if (!error) return null; + + var errorData = error.response && error.response.data; + + var errorElements = _lodash2.default.transform( + errorData, + function (result, errorText, errorFor) { + result.push( + _react2.default.createElement( + 'li', + { key: errorFor }, + _react2.default.createElement('b', null, _lodash2.default.upperFirst(errorFor), ':'), + ' ', + errorText, + ), + ); + }, + [], + ); + + return _react2.default.createElement( + _Alert2.default, + { bsStyle: 'danger', key: 'commentSubmissionError' }, + _react2.default.createElement('strong', null, 'Your comment was not saved!'), + _react2.default.createElement('ul', null, errorElements), + ); + }, + }, + { + key: 'render', + value: function render() { + var inputForm = void 0; + switch (this.state.formMode) { + case 0: + inputForm = this.formHorizontal(); + break; + case 1: + inputForm = this.formStacked(); + break; + case 2: + inputForm = this.formInline(); + break; + default: + throw new Error('Unknown form mode: ' + this.state.formMode + '.'); + } + + var cssTransitionGroupClassNames = this.props.cssTransitionGroupClassNames; + var formatMessage = this.props.intl.formatMessage; + + // For animation with ReactCSSTransitionGroup + // https://facebook.github.io/react/docs/animation.html + // The 500 must correspond to the 0.5s in: + // client/app/bundles/comments/components/CommentBox/CommentBox.scss:6 + + return _react2.default.createElement( + 'div', + null, + _react2.default.createElement( + _reactAddonsCssTransitionGroup2.default, + { + transitionName: cssTransitionGroupClassNames, + transitionEnterTimeout: 500, + transitionLeaveTimeout: 500, + }, + this.errorWarning(), + ), + _react2.default.createElement( + _Nav2.default, + { bsStyle: 'pills', activeKey: this.state.formMode, onSelect: this.handleSelect }, + _react2.default.createElement( + _NavItem2.default, + { eventKey: 0 }, + formatMessage(_default.defaultMessages.formHorizontal), + ), + _react2.default.createElement( + _NavItem2.default, + { eventKey: 1 }, + formatMessage(_default.defaultMessages.formStacked), + ), + _react2.default.createElement( + _NavItem2.default, + { eventKey: 2 }, + formatMessage(_default.defaultMessages.formInline), + ), + ), + inputForm, + ); + }, + }, + ]); + + return CommentForm; + })(_BaseComponent3.default); + + CommentForm.propTypes = { + isSaving: _react.PropTypes.bool.isRequired, + actions: _react.PropTypes.object.isRequired, + error: _react.PropTypes.any, + cssTransitionGroupClassNames: _react.PropTypes.object.isRequired, + intl: _reactIntl.intlShape.isRequired, + }; + exports.default = (0, _reactIntl.injectIntl)(CommentForm); + + /***/ + }, + /* 232 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.commentPropTypes = undefined; + + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + var _Alert = __webpack_require__(303); + + var _Alert2 = _interopRequireDefault(_Alert); + + var _BaseComponent2 = __webpack_require__(36); + + var _BaseComponent3 = _interopRequireDefault(_BaseComponent2); + + var _immutable = __webpack_require__(139); + + var _immutable2 = _interopRequireDefault(_immutable); + + var _react = __webpack_require__(1); + + var _react2 = _interopRequireDefault(_react); + + var _reactAddonsCssTransitionGroup = __webpack_require__(302); + + var _reactAddonsCssTransitionGroup2 = _interopRequireDefault(_reactAddonsCssTransitionGroup); + + var _lodash = __webpack_require__(114); + + var _lodash2 = _interopRequireDefault(_lodash); + + var _Comment = __webpack_require__(387); + + var _Comment2 = _interopRequireDefault(_Comment); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + var commentPropTypes = (exports.commentPropTypes = { + $$comments: _react.PropTypes.instanceOf(_immutable2.default.List).isRequired, + error: _react.PropTypes.any, + cssTransitionGroupClassNames: _react.PropTypes.object.isRequired, + }); + + var CommentList = (function (_BaseComponent) { + _inherits(CommentList, _BaseComponent); + + function CommentList(props, context) { + _classCallCheck(this, CommentList); + + var _this = _possibleConstructorReturn( + this, + (CommentList.__proto__ || Object.getPrototypeOf(CommentList)).call(this, props, context), + ); + + _this.state = {}; + _lodash2.default.bindAll(_this, 'errorWarning'); + return _this; + } + + _createClass(CommentList, [ + { + key: 'errorWarning', + value: function errorWarning() { + // If there is no error, there is nothing to add to the DOM + if (!this.props.error) return null; + return _react2.default.createElement( + _Alert2.default, + { bsStyle: 'danger', key: 'commentFetchError' }, + _react2.default.createElement('strong', null, 'Comments could not be retrieved. '), + 'A server error prevented loading comments. Please try again.', + ); + }, + }, + { + key: 'render', + value: function render() { + var _props = this.props, + $$comments = _props.$$comments, + cssTransitionGroupClassNames = _props.cssTransitionGroupClassNames; + + var commentNodes = $$comments.map(function ($$comment, index) { + return ( + // `key` is a React-specific concept and is not mandatory for the + // purpose of this tutorial. if you're curious, see more here: + // http://facebook.github.io/react/docs/multiple-components.html#dynamic-children + _react2.default.createElement(_Comment2.default, { + key: $$comment.get('id') || index, + author: $$comment.get('author'), + text: $$comment.get('text'), + }) + ); + }); + + // For animation with ReactCSSTransitionGroup + // https://facebook.github.io/react/docs/animation.html + // The 500 must correspond to the 0.5s in: + // client/app/bundles/comments/components/CommentBox/CommentBox.scss:6 + return _react2.default.createElement( + 'div', + null, + _react2.default.createElement( + _reactAddonsCssTransitionGroup2.default, + { + transitionName: cssTransitionGroupClassNames, + transitionEnterTimeout: 500, + transitionLeaveTimeout: 500, + }, + this.errorWarning(), + ), + _react2.default.createElement( + _reactAddonsCssTransitionGroup2.default, + { + transitionName: cssTransitionGroupClassNames, + transitionEnterTimeout: 500, + transitionLeaveTimeout: 500, + className: 'commentList', + component: 'div', + }, + commentNodes, + ), + ); + }, + }, + ]); + + return CommentList; + })(_BaseComponent3.default); + + CommentList.propTypes = commentPropTypes; + exports.default = CommentList; + + /***/ + }, + /* 233 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + var _react = __webpack_require__(1); + + var _react2 = _interopRequireDefault(_react); + + var _BaseComponent2 = __webpack_require__(36); + + var _BaseComponent3 = _interopRequireDefault(_BaseComponent2); + + var _CommentBox = __webpack_require__(386); + + var _CommentBox2 = _interopRequireDefault(_CommentBox); + + var _CommentScreen = __webpack_require__(645); + + var _CommentScreen2 = _interopRequireDefault(_CommentScreen); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + var CommentScreen = (function (_BaseComponent) { + _inherits(CommentScreen, _BaseComponent); + + function CommentScreen() { + _classCallCheck(this, CommentScreen); + + return _possibleConstructorReturn( + this, + (CommentScreen.__proto__ || Object.getPrototypeOf(CommentScreen)).apply(this, arguments), + ); + } + + _createClass(CommentScreen, [ + { + key: 'renderNotification', + value: function renderNotification() { + var locationState = this.props.locationState; + + if (!locationState || !locationState.redirectFrom) return null; + + return _react2.default.createElement( + 'div', + { className: 'bg-success ' + _CommentScreen2.default.notification }, + 'You have been redirected from', + _react2.default.createElement('strong', null, locationState.redirectFrom), + ); + }, + }, + { + key: 'render', + value: function render() { + var _props = this.props, + data = _props.data, + actions = _props.actions; + + return _react2.default.createElement( + 'div', + null, + this.renderNotification(), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_CommentBox2.default, { + pollInterval: 60000, + data: data, + actions: actions, + ajaxCounter: data.get('ajaxCounter'), + }), + _react2.default.createElement( + 'div', + { className: 'container' }, + _react2.default.createElement( + 'a', + { href: 'http://www.shakacode.com' }, + _react2.default.createElement( + 'h3', + null, + _react2.default.createElement('div', { className: _CommentScreen2.default.logo }), + 'Example of styling using image-url and Open Sans Light custom font', + ), + ), + _react2.default.createElement( + 'a', + { href: 'https://twitter.com/railsonmaui' }, + _react2.default.createElement('div', { + className: _CommentScreen2.default.twitterImage, + }), + 'Rails On Maui on Twitter', + ), + ), + ), + ); + }, + }, + ]); + + return CommentScreen; + })(_BaseComponent3.default); + + CommentScreen.propTypes = { + actions: _react.PropTypes.object.isRequired, + data: _react.PropTypes.object.isRequired, + locationState: _react.PropTypes.object, + }; + exports.default = CommentScreen; + + /***/ + }, + /* 234 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + + var _classnames = __webpack_require__(27); + + var _classnames2 = _interopRequireDefault(_classnames); + + var _lodash = __webpack_require__(114); + + var _lodash2 = _interopRequireDefault(_lodash); + + var _react = __webpack_require__(1); + + var _react2 = _interopRequireDefault(_react); + + var _CommentsCount = __webpack_require__(388); + + var _CommentsCount2 = _interopRequireDefault(_CommentsCount); + + var _paths = __webpack_require__(236); + + var paths = _interopRequireWildcard(_paths); + + function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; + } + } + newObj.default = obj; + return newObj; + } + } + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + var NavigationBar = function NavigationBar(props) { + var commentsCount = props.commentsCount, + pathname = props.pathname; + + /* eslint-disable new-cap */ + + return _react2.default.createElement( + 'nav', + { className: 'navbar navbar-default', role: 'navigation' }, + _react2.default.createElement( + 'div', + { className: 'container' }, + _react2.default.createElement( + 'div', + { className: 'navbar-header' }, + _react2.default.createElement( + 'button', + { + type: 'button', + className: 'navbar-toggle', + 'data-toggle': 'collapse', + 'data-target': '#bs-example-navbar-collapse-1', + }, + _react2.default.createElement('span', { className: 'sr-only' }, 'Toggle navigation'), + _react2.default.createElement('span', { className: 'icon-bar' }), + _react2.default.createElement('span', { className: 'icon-bar' }), + _react2.default.createElement('span', { className: 'icon-bar' }), + ), + _react2.default.createElement( + 'a', + { className: 'navbar-brand', href: 'http://www.shakacode.com' }, + 'ShakaCode', + ), + ), + _react2.default.createElement( + 'div', + { className: 'collapse navbar-collapse', id: 'bs-example-navbar-collapse-1' }, + _react2.default.createElement( + 'ul', + { className: 'nav navbar-nav' }, + _react2.default.createElement( + 'li', + { className: (0, _classnames2.default)({ active: pathname === paths.ROUTER_PATH }) }, + _react2.default.createElement('a', { href: paths.ROUTER_PATH }, 'React Router Demo'), + ), + _react2.default.createElement( + 'li', + { className: (0, _classnames2.default)({ active: pathname === paths.NO_ROUTER_PATH }) }, + _react2.default.createElement('a', { href: paths.NO_ROUTER_PATH }, 'React Demo'), + ), + _react2.default.createElement( + 'li', + { className: (0, _classnames2.default)({ active: pathname === paths.SIMPLE_REACT_PATH }) }, + _react2.default.createElement('a', { href: paths.SIMPLE_REACT_PATH }, 'Simple React'), + ), + _react2.default.createElement( + 'li', + { className: (0, _classnames2.default)({ active: pathname === paths.RAILS_PATH }) }, + _react2.default.createElement('a', { href: paths.RAILS_PATH }, 'Classic Rails'), + ), + _react2.default.createElement( + 'li', + null, + _react2.default.createElement( + 'a', + { + href: 'https://github.com/' + 'shakacode/react-webpack-rails-tutorial', + }, + 'Source', + ), + ), + _react2.default.createElement( + 'li', + null, + _react2.default.createElement( + 'a', + { + href: 'https://forum.shakacode.com/c/reactjs', + }, + 'Forum', + ), + ), + _lodash2.default.isNumber(commentsCount) && + (0, _CommentsCount2.default)({ commentsCount: commentsCount }), + ), + ), + ), + ); + }; // https://github.com/eslint/eslint/issues/6876 + // eslint-disable new-cap + + NavigationBar.propTypes = { + commentsCount: _react.PropTypes.number, + pathname: _react.PropTypes.string.isRequired, + }; + + exports.default = NavigationBar; + + /***/ + }, + /* 235 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + var FETCH_COMMENTS_SUCCESS = (exports.FETCH_COMMENTS_SUCCESS = 'FETCH_COMMENTS_SUCCESS'); + var FETCH_COMMENTS_FAILURE = (exports.FETCH_COMMENTS_FAILURE = 'FETCH_COMMENTS_FAILURE'); + + var SUBMIT_COMMENT_SUCCESS = (exports.SUBMIT_COMMENT_SUCCESS = 'SUBMIT_COMMENT_SUCCESS'); + var SUBMIT_COMMENT_FAILURE = (exports.SUBMIT_COMMENT_FAILURE = 'SUBMIT_COMMENT_FAILURE'); + var MESSAGE_RECEIVED = (exports.MESSAGE_RECEIVED = 'MESSAGE_RECEIVED'); + + var SET_IS_FETCHING = (exports.SET_IS_FETCHING = 'SET_IS_FETCHING'); + var SET_IS_SAVING = (exports.SET_IS_SAVING = 'SET_IS_SAVING'); + + var SET_LOCALE = (exports.SET_LOCALE = 'SET_LOCALE'); + + /***/ + }, + /* 236 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + var ROUTER_PATH = (exports.ROUTER_PATH = '/'); + var NO_ROUTER_PATH = (exports.NO_ROUTER_PATH = '/no-router'); + var SIMPLE_REACT_PATH = (exports.SIMPLE_REACT_PATH = '/simple'); + var RAILS_PATH = (exports.RAILS_PATH = '/comments'); + + /***/ + }, + /* 237 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.initialStates = undefined; + + var _commentsReducer = __webpack_require__(396); + + var _commentsReducer2 = _interopRequireDefault(_commentsReducer); + + var _railsContextReducer = __webpack_require__(397); + + var _railsContextReducer2 = _interopRequireDefault(_railsContextReducer); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + exports.default = { + $$commentsStore: _commentsReducer2.default, + railsContext: _railsContextReducer2.default, + }; + var initialStates = (exports.initialStates = { + $$commentsState: _commentsReducer.$$initialState, + railsContextState: _railsContextReducer.initialState, + }); + + /***/ + }, + /* 238 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + + var _react = __webpack_require__(1); + + var _react2 = _interopRequireDefault(_react); + + var _default = __webpack_require__(88); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + var SelectLanguage = function SelectLanguage(_onChange) { + var locale = + arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _default.defaultLocale; + return _react2.default.createElement( + 'select', + { + onChange: function onChange(e) { + return _onChange(e.target.value); + }, + value: locale, + }, + _react2.default.createElement('option', { value: 'en' }, 'English'), + _react2.default.createElement('option', { value: 'de' }, 'Deutsch'), + _react2.default.createElement('option', { value: 'ja' }, '\u65E5\u672C\u8A9E'), + _react2.default.createElement('option', { value: 'zh-CN' }, '\u7B80\u4F53\u4E2D\u6587'), + _react2.default.createElement('option', { value: 'zh-TW' }, '\u6B63\u9AD4\u4E2D\u6587'), + ); + }; + + exports.default = SelectLanguage; + + /***/ + }, + /* 239 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.default = logger; + /* eslint no-console: 0 */ + + function logger(_ref) { + var getState = _ref.getState; + + return function (next) { + return function (action) { + console.log('will dispatch', action); + + // Call the next dispatch method in the middleware chain. + var result = next(action); + + // We can't _read_ immutable objects in console out-of-the-box. + var state = getState(); + var readableState = {}; + + Object.keys(state).forEach(function (storeItem) { + readableState[storeItem] = state[storeItem].toJS ? state[storeItem].toJS() : state[storeItem]; + }); + + console.log('state after dispatch', readableState); + + // This will likely be the action itself, unless + // a middleware further in chain changed it. + return result; + }; + }; + } + + /***/ + }, + /* 240 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = { default: __webpack_require__(413), __esModule: true }; + + /***/ + }, + /* 241 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = { default: __webpack_require__(415), __esModule: true }; + + /***/ + }, + /* 242 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = { default: __webpack_require__(421), __esModule: true }; + + /***/ + }, + /* 243 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + + var _iterator = __webpack_require__(409); + + var _iterator2 = _interopRequireDefault(_iterator); + + var _symbol = __webpack_require__(408); + + var _symbol2 = _interopRequireDefault(_symbol); + + var _typeof = + typeof _symbol2.default === 'function' && typeof _iterator2.default === 'symbol' + ? function (obj) { + return typeof obj; + } + : function (obj) { + return obj && + typeof _symbol2.default === 'function' && + obj.constructor === _symbol2.default && + obj !== _symbol2.default.prototype + ? 'symbol' + : typeof obj; + }; + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + exports.default = + typeof _symbol2.default === 'function' && _typeof(_iterator2.default) === 'symbol' + ? function (obj) { + return typeof obj === 'undefined' ? 'undefined' : _typeof(obj); + } + : function (obj) { + return obj && + typeof _symbol2.default === 'function' && + obj.constructor === _symbol2.default && + obj !== _symbol2.default.prototype + ? 'symbol' + : typeof obj === 'undefined' + ? 'undefined' + : _typeof(obj); + }; + + /***/ + }, + /* 244 */ + /***/ function (module, exports) { + module.exports = function (it, Constructor, name, forbiddenField) { + if (!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)) { + throw TypeError(name + ': incorrect invocation!'); + } + return it; + }; + + /***/ + }, + /* 245 */ + /***/ function (module, exports, __webpack_require__) { + // getting tag from 19.1.3.6 Object.prototype.toString() + var cof = __webpack_require__(149), + TAG = __webpack_require__(37)('toStringTag'), + // ES3 wrong here + ARG = + cof( + (function () { + return arguments; + })(), + ) == 'Arguments'; + + // fallback for IE11 Script Access Denied error + var tryGet = function (it, key) { + try { + return it[key]; + } catch (e) { + /* empty */ + } + }; + + module.exports = function (it) { + var O, T, B; + return it === undefined + ? 'Undefined' + : it === null + ? 'Null' + : // @@toStringTag case + typeof (T = tryGet((O = Object(it)), TAG)) == 'string' + ? T + : // builtinTag case + ARG + ? cof(O) + : // ES3 arguments fallback + (B = cof(O)) == 'Object' && typeof O.callee == 'function' + ? 'Arguments' + : B; + }; + + /***/ + }, + /* 246 */ + /***/ function (module, exports, __webpack_require__) { + var isObject = __webpack_require__(72), + document = __webpack_require__(48).document, + // in old IE typeof document.createElement is 'object' + is = isObject(document) && isObject(document.createElement); + module.exports = function (it) { + return is ? document.createElement(it) : {}; + }; + + /***/ + }, + /* 247 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = + !__webpack_require__(55) && + !__webpack_require__(70)(function () { + return ( + Object.defineProperty(__webpack_require__(246)('div'), 'a', { + get: function () { + return 7; + }, + }).a != 7 + ); + }); + + /***/ + }, + /* 248 */ + /***/ function (module, exports, __webpack_require__) { + // check on default Array iterator + var Iterators = __webpack_require__(107), + ITERATOR = __webpack_require__(37)('iterator'), + ArrayProto = Array.prototype; + + module.exports = function (it) { + return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it); + }; + + /***/ + }, + /* 249 */ + /***/ function (module, exports, __webpack_require__) { + // 7.2.2 IsArray(argument) + var cof = __webpack_require__(149); + module.exports = + Array.isArray || + function isArray(arg) { + return cof(arg) == 'Array'; + }; + + /***/ + }, + /* 250 */ + /***/ function (module, exports, __webpack_require__) { + // call something on iterator step with safe closing on error + var anObject = __webpack_require__(69); + module.exports = function (iterator, fn, value, entries) { + try { + return entries ? fn(anObject(value)[0], value[1]) : fn(value); + // 7.4.6 IteratorClose(iterator, completion) + } catch (e) { + var ret = iterator['return']; + if (ret !== undefined) anObject(ret.call(iterator)); + throw e; + } + }; + + /***/ + }, + /* 251 */ + /***/ function (module, exports) { + module.exports = function (done, value) { + return { value: value, done: !!done }; + }; + + /***/ + }, + /* 252 */ + /***/ function (module, exports, __webpack_require__) { + var pIE = __webpack_require__(108), + createDesc = __webpack_require__(109), + toIObject = __webpack_require__(61), + toPrimitive = __webpack_require__(160), + has = __webpack_require__(71), + IE8_DOM_DEFINE = __webpack_require__(247), + gOPD = Object.getOwnPropertyDescriptor; + + exports.f = __webpack_require__(55) + ? gOPD + : function getOwnPropertyDescriptor(O, P) { + O = toIObject(O); + P = toPrimitive(P, true); + if (IE8_DOM_DEFINE) + try { + return gOPD(O, P); + } catch (e) { + /* empty */ + } + if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]); + }; + + /***/ + }, + /* 253 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) + var $keys = __webpack_require__(254), + hiddenKeys = __webpack_require__(150).concat('length', 'prototype'); + + exports.f = + Object.getOwnPropertyNames || + function getOwnPropertyNames(O) { + return $keys(O, hiddenKeys); + }; + + /***/ + }, + /* 254 */ + /***/ function (module, exports, __webpack_require__) { + var has = __webpack_require__(71), + toIObject = __webpack_require__(61), + arrayIndexOf = __webpack_require__(427)(false), + IE_PROTO = __webpack_require__(157)('IE_PROTO'); + + module.exports = function (object, names) { + var O = toIObject(object), + i = 0, + result = [], + key; + for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key); + // Don't enum bug & hidden keys + while (names.length > i) + if (has(O, (key = names[i++]))) { + ~arrayIndexOf(result, key) || result.push(key); + } + return result; + }; + + /***/ + }, + /* 255 */ + /***/ function (module, exports, __webpack_require__) { + var getKeys = __webpack_require__(73), + toIObject = __webpack_require__(61), + isEnum = __webpack_require__(108).f; + module.exports = function (isEntries) { + return function (it) { + var O = toIObject(it), + keys = getKeys(O), + length = keys.length, + i = 0, + result = [], + key; + while (length > i) + if (isEnum.call(O, (key = keys[i++]))) { + result.push(isEntries ? [key, O[key]] : O[key]); + } + return result; + }; + }; + + /***/ + }, + /* 256 */ + /***/ function (module, exports, __webpack_require__) { + var hide = __webpack_require__(60); + module.exports = function (target, src, safe) { + for (var key in src) { + if (safe && target[key]) target[key] = src[key]; + else hide(target, key, src[key]); + } + return target; + }; + + /***/ + }, + /* 257 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = __webpack_require__(60); + + /***/ + }, + /* 258 */ + /***/ function (module, exports, __webpack_require__) { + var classof = __webpack_require__(245), + ITERATOR = __webpack_require__(37)('iterator'), + Iterators = __webpack_require__(107); + module.exports = __webpack_require__(18).getIteratorMethod = function (it) { + if (it != undefined) return it[ITERATOR] || it['@@iterator'] || Iterators[classof(it)]; + }; + + /***/ + }, + /* 259 */ + /***/ function (module, exports) { + /***/ + }, + /* 260 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(450); + var global = __webpack_require__(48), + hide = __webpack_require__(60), + Iterators = __webpack_require__(107), + TO_STRING_TAG = __webpack_require__(37)('toStringTag'); + + for ( + var collections = ['NodeList', 'DOMTokenList', 'MediaList', 'StyleSheetList', 'CSSRuleList'], i = 0; + i < 5; + i++ + ) { + var NAME = collections[i], + Collection = global[NAME], + proto = Collection && Collection.prototype; + if (proto && !proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME); + Iterators[NAME] = Iterators.Array; + } + + /***/ + }, + /* 261 */ + /***/ function (module, exports, __webpack_require__) { + var cof = __webpack_require__(43); + module.exports = function (it, msg) { + if (typeof it != 'number' && cof(it) != 'Number') throw TypeError(msg); + return +it; + }; + + /***/ + }, + /* 262 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + // 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length) + + var toObject = __webpack_require__(17), + toIndex = __webpack_require__(81), + toLength = __webpack_require__(15); + + module.exports = + [].copyWithin || + function copyWithin(target /*= 0*/, start /*= 0, end = @length*/) { + var O = toObject(this), + len = toLength(O.length), + to = toIndex(target, len), + from = toIndex(start, len), + end = arguments.length > 2 ? arguments[2] : undefined, + count = Math.min((end === undefined ? len : toIndex(end, len)) - from, len - to), + inc = 1; + if (from < to && to < from + count) { + inc = -1; + from += count - 1; + to += count - 1; + } + while (count-- > 0) { + if (from in O) O[to] = O[from]; + else delete O[to]; + to += inc; + from += inc; + } + return O; + }; + + /***/ + }, + /* 263 */ + /***/ function (module, exports, __webpack_require__) { + var forOf = __webpack_require__(91); + + module.exports = function (iter, ITERATOR) { + var result = []; + forOf(iter, false, result.push, result, ITERATOR); + return result; + }; + + /***/ + }, + /* 264 */ + /***/ function (module, exports, __webpack_require__) { + var aFunction = __webpack_require__(28), + toObject = __webpack_require__(17), + IObject = __webpack_require__(112), + toLength = __webpack_require__(15); + + module.exports = function (that, callbackfn, aLen, memo, isRight) { + aFunction(callbackfn); + var O = toObject(that), + self = IObject(O), + length = toLength(O.length), + index = isRight ? length - 1 : 0, + i = isRight ? -1 : 1; + if (aLen < 2) + for (;;) { + if (index in self) { + memo = self[index]; + index += i; + break; + } + index += i; + if (isRight ? index < 0 : length <= index) { + throw TypeError('Reduce of empty array with no initial value'); + } + } + for (; isRight ? index >= 0 : length > index; index += i) + if (index in self) { + memo = callbackfn(memo, self[index], index, O); + } + return memo; + }; + + /***/ + }, + /* 265 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var aFunction = __webpack_require__(28), + isObject = __webpack_require__(9), + invoke = __webpack_require__(130), + arraySlice = [].slice, + factories = {}; + + var construct = function (F, len, args) { + if (!(len in factories)) { + for (var n = [], i = 0; i < len; i++) n[i] = 'a[' + i + ']'; + factories[len] = Function('F,a', 'return new F(' + n.join(',') + ')'); + } + return factories[len](F, args); + }; + + module.exports = + Function.bind || + function bind(that /*, args... */) { + var fn = aFunction(this), + partArgs = arraySlice.call(arguments, 1); + var bound = function (/* args... */) { + var args = partArgs.concat(arraySlice.call(arguments)); + return this instanceof bound ? construct(fn, args.length, args) : invoke(fn, args, that); + }; + if (isObject(fn.prototype)) bound.prototype = fn.prototype; + return bound; + }; + + /***/ + }, + /* 266 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var dP = __webpack_require__(12).f, + create = __webpack_require__(76), + redefineAll = __webpack_require__(79), + ctx = __webpack_require__(57), + anInstance = __webpack_require__(74), + defined = __webpack_require__(44), + forOf = __webpack_require__(91), + $iterDefine = __webpack_require__(174), + step = __webpack_require__(272), + setSpecies = __webpack_require__(80), + DESCRIPTORS = __webpack_require__(11), + fastKey = __webpack_require__(62).fastKey, + SIZE = DESCRIPTORS ? '_s' : 'size'; + + var getEntry = function (that, key) { + // fast case + var index = fastKey(key), + entry; + if (index !== 'F') return that._i[index]; + // frozen object case + for (entry = that._f; entry; entry = entry.n) { + if (entry.k == key) return entry; + } + }; + + module.exports = { + getConstructor: function (wrapper, NAME, IS_MAP, ADDER) { + var C = wrapper(function (that, iterable) { + anInstance(that, C, NAME, '_i'); + that._i = create(null); // index + that._f = undefined; // first entry + that._l = undefined; // last entry + that[SIZE] = 0; // size + if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that); + }); + redefineAll(C.prototype, { + // 23.1.3.1 Map.prototype.clear() + // 23.2.3.2 Set.prototype.clear() + clear: function clear() { + for (var that = this, data = that._i, entry = that._f; entry; entry = entry.n) { + entry.r = true; + if (entry.p) entry.p = entry.p.n = undefined; + delete data[entry.i]; + } + that._f = that._l = undefined; + that[SIZE] = 0; + }, + // 23.1.3.3 Map.prototype.delete(key) + // 23.2.3.4 Set.prototype.delete(value) + delete: function (key) { + var that = this, + entry = getEntry(that, key); + if (entry) { + var next = entry.n, + prev = entry.p; + delete that._i[entry.i]; + entry.r = true; + if (prev) prev.n = next; + if (next) next.p = prev; + if (that._f == entry) that._f = next; + if (that._l == entry) that._l = prev; + that[SIZE]--; + } + return !!entry; + }, + // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined) + // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined) + forEach: function forEach(callbackfn /*, that = undefined */) { + anInstance(this, C, 'forEach'); + var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3), + entry; + while ((entry = entry ? entry.n : this._f)) { + f(entry.v, entry.k, this); + // revert to the last existing entry + while (entry && entry.r) entry = entry.p; + } + }, + // 23.1.3.7 Map.prototype.has(key) + // 23.2.3.7 Set.prototype.has(value) + has: function has(key) { + return !!getEntry(this, key); + }, + }); + if (DESCRIPTORS) + dP(C.prototype, 'size', { + get: function () { + return defined(this[SIZE]); + }, + }); + return C; + }, + def: function (that, key, value) { + var entry = getEntry(that, key), + prev, + index; + // change existing entry + if (entry) { + entry.v = value; + // create new entry + } else { + that._l = entry = { + i: (index = fastKey(key, true)), // <- index + k: key, // <- key + v: value, // <- value + p: (prev = that._l), // <- previous entry + n: undefined, // <- next entry + r: false, // <- removed + }; + if (!that._f) that._f = entry; + if (prev) prev.n = entry; + that[SIZE]++; + // add to index + if (index !== 'F') that._i[index] = entry; + } + return that; + }, + getEntry: getEntry, + setStrong: function (C, NAME, IS_MAP) { + // add .keys, .values, .entries, [@@iterator] + // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11 + $iterDefine( + C, + NAME, + function (iterated, kind) { + this._t = iterated; // target + this._k = kind; // kind + this._l = undefined; // previous + }, + function () { + var that = this, + kind = that._k, + entry = that._l; + // revert to the last existing entry + while (entry && entry.r) entry = entry.p; + // get next entry + if (!that._t || !(that._l = entry = entry ? entry.n : that._t._f)) { + // or finish the iteration + that._t = undefined; + return step(1); + } + // return step by kind + if (kind == 'keys') return step(0, entry.k); + if (kind == 'values') return step(0, entry.v); + return step(0, [entry.k, entry.v]); + }, + IS_MAP ? 'entries' : 'values', + !IS_MAP, + true, + ); + + // add [@@species], 23.1.2.2, 23.2.2.2 + setSpecies(NAME); + }, + }; + + /***/ + }, + /* 267 */ + /***/ function (module, exports, __webpack_require__) { + // https://github.com/DavidBruant/Map-Set.prototype.toJSON + var classof = __webpack_require__(111), + from = __webpack_require__(263); + module.exports = function (NAME) { + return function toJSON() { + if (classof(this) != NAME) throw TypeError(NAME + "#toJSON isn't generic"); + return from(this); + }; + }; + + /***/ + }, + /* 268 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var redefineAll = __webpack_require__(79), + getWeak = __webpack_require__(62).getWeak, + anObject = __webpack_require__(4), + isObject = __webpack_require__(9), + anInstance = __webpack_require__(74), + forOf = __webpack_require__(91), + createArrayMethod = __webpack_require__(50), + $has = __webpack_require__(21), + arrayFind = createArrayMethod(5), + arrayFindIndex = createArrayMethod(6), + id = 0; + + // fallback for uncaught frozen keys + var uncaughtFrozenStore = function (that) { + return that._l || (that._l = new UncaughtFrozenStore()); + }; + var UncaughtFrozenStore = function () { + this.a = []; + }; + var findUncaughtFrozen = function (store, key) { + return arrayFind(store.a, function (it) { + return it[0] === key; + }); + }; + UncaughtFrozenStore.prototype = { + get: function (key) { + var entry = findUncaughtFrozen(this, key); + if (entry) return entry[1]; + }, + has: function (key) { + return !!findUncaughtFrozen(this, key); + }, + set: function (key, value) { + var entry = findUncaughtFrozen(this, key); + if (entry) entry[1] = value; + else this.a.push([key, value]); + }, + delete: function (key) { + var index = arrayFindIndex(this.a, function (it) { + return it[0] === key; + }); + if (~index) this.a.splice(index, 1); + return !!~index; + }, + }; + + module.exports = { + getConstructor: function (wrapper, NAME, IS_MAP, ADDER) { + var C = wrapper(function (that, iterable) { + anInstance(that, C, NAME, '_i'); + that._i = id++; // collection id + that._l = undefined; // leak store for uncaught frozen objects + if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that); + }); + redefineAll(C.prototype, { + // 23.3.3.2 WeakMap.prototype.delete(key) + // 23.4.3.3 WeakSet.prototype.delete(value) + delete: function (key) { + if (!isObject(key)) return false; + var data = getWeak(key); + if (data === true) return uncaughtFrozenStore(this)['delete'](key); + return data && $has(data, this._i) && delete data[this._i]; + }, + // 23.3.3.4 WeakMap.prototype.has(key) + // 23.4.3.4 WeakSet.prototype.has(value) + has: function has(key) { + if (!isObject(key)) return false; + var data = getWeak(key); + if (data === true) return uncaughtFrozenStore(this).has(key); + return data && $has(data, this._i); + }, + }); + return C; + }, + def: function (that, key, value) { + var data = getWeak(anObject(key), true); + if (data === true) uncaughtFrozenStore(that).set(key, value); + else data[that._i] = value; + return that; + }, + ufstore: uncaughtFrozenStore, + }; + + /***/ + }, + /* 269 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = + !__webpack_require__(11) && + !__webpack_require__(7)(function () { + return ( + Object.defineProperty(__webpack_require__(166)('div'), 'a', { + get: function () { + return 7; + }, + }).a != 7 + ); + }); + + /***/ + }, + /* 270 */ + /***/ function (module, exports, __webpack_require__) { + // 20.1.2.3 Number.isInteger(number) + var isObject = __webpack_require__(9), + floor = Math.floor; + module.exports = function isInteger(it) { + return !isObject(it) && isFinite(it) && floor(it) === it; + }; + + /***/ + }, + /* 271 */ + /***/ function (module, exports, __webpack_require__) { + // call something on iterator step with safe closing on error + var anObject = __webpack_require__(4); + module.exports = function (iterator, fn, value, entries) { + try { + return entries ? fn(anObject(value)[0], value[1]) : fn(value); + // 7.4.6 IteratorClose(iterator, completion) + } catch (e) { + var ret = iterator['return']; + if (ret !== undefined) anObject(ret.call(iterator)); + throw e; + } + }; + + /***/ + }, + /* 272 */ + /***/ function (module, exports) { + module.exports = function (done, value) { + return { value: value, done: !!done }; + }; + + /***/ + }, + /* 273 */ + /***/ function (module, exports) { + // 20.2.2.20 Math.log1p(x) + module.exports = + Math.log1p || + function log1p(x) { + return (x = +x) > -1e-8 && x < 1e-8 ? x - (x * x) / 2 : Math.log(1 + x); + }; + + /***/ + }, + /* 274 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // 19.1.2.1 Object.assign(target, source, ...) + var getKeys = __webpack_require__(78), + gOPS = __webpack_require__(134), + pIE = __webpack_require__(113), + toObject = __webpack_require__(17), + IObject = __webpack_require__(112), + $assign = Object.assign; + + // should work with symbols and should have deterministic property order (V8 bug) + module.exports = + !$assign || + __webpack_require__(7)(function () { + var A = {}, + B = {}, + S = Symbol(), + K = 'abcdefghijklmnopqrst'; + A[S] = 7; + K.split('').forEach(function (k) { + B[k] = k; + }); + return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K; + }) + ? function assign(target, source) { + // eslint-disable-line no-unused-vars + var T = toObject(target), + aLen = arguments.length, + index = 1, + getSymbols = gOPS.f, + isEnum = pIE.f; + while (aLen > index) { + var S = IObject(arguments[index++]), + keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S), + length = keys.length, + j = 0, + key; + while (length > j) if (isEnum.call(S, (key = keys[j++]))) T[key] = S[key]; + } + return T; + } + : $assign; + + /***/ + }, + /* 275 */ + /***/ function (module, exports, __webpack_require__) { + var dP = __webpack_require__(12), + anObject = __webpack_require__(4), + getKeys = __webpack_require__(78); + + module.exports = __webpack_require__(11) + ? Object.defineProperties + : function defineProperties(O, Properties) { + anObject(O); + var keys = getKeys(Properties), + length = keys.length, + i = 0, + P; + while (length > i) dP.f(O, (P = keys[i++]), Properties[P]); + return O; + }; + + /***/ + }, + /* 276 */ + /***/ function (module, exports, __webpack_require__) { + // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window + var toIObject = __webpack_require__(32), + gOPN = __webpack_require__(77).f, + toString = {}.toString; + + var windowNames = + typeof window == 'object' && window && Object.getOwnPropertyNames + ? Object.getOwnPropertyNames(window) + : []; + + var getWindowNames = function (it) { + try { + return gOPN(it); + } catch (e) { + return windowNames.slice(); + } + }; + + module.exports.f = function getOwnPropertyNames(it) { + return windowNames && toString.call(it) == '[object Window]' + ? getWindowNames(it) + : gOPN(toIObject(it)); + }; + + /***/ + }, + /* 277 */ + /***/ function (module, exports, __webpack_require__) { + var has = __webpack_require__(21), + toIObject = __webpack_require__(32), + arrayIndexOf = __webpack_require__(126)(false), + IE_PROTO = __webpack_require__(179)('IE_PROTO'); + + module.exports = function (object, names) { + var O = toIObject(object), + i = 0, + result = [], + key; + for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key); + // Don't enum bug & hidden keys + while (names.length > i) + if (has(O, (key = names[i++]))) { + ~arrayIndexOf(result, key) || result.push(key); + } + return result; + }; + + /***/ + }, + /* 278 */ + /***/ function (module, exports, __webpack_require__) { + var getKeys = __webpack_require__(78), + toIObject = __webpack_require__(32), + isEnum = __webpack_require__(113).f; + module.exports = function (isEntries) { + return function (it) { + var O = toIObject(it), + keys = getKeys(O), + length = keys.length, + i = 0, + result = [], + key; + while (length > i) + if (isEnum.call(O, (key = keys[i++]))) { + result.push(isEntries ? [key, O[key]] : O[key]); + } + return result; + }; + }; + + /***/ + }, + /* 279 */ + /***/ function (module, exports, __webpack_require__) { + // all object keys, includes non-enumerable and symbols + var gOPN = __webpack_require__(77), + gOPS = __webpack_require__(134), + anObject = __webpack_require__(4), + Reflect = __webpack_require__(6).Reflect; + module.exports = + (Reflect && Reflect.ownKeys) || + function ownKeys(it) { + var keys = gOPN.f(anObject(it)), + getSymbols = gOPS.f; + return getSymbols ? keys.concat(getSymbols(it)) : keys; + }; + + /***/ + }, + /* 280 */ + /***/ function (module, exports, __webpack_require__) { + var $parseFloat = __webpack_require__(6).parseFloat, + $trim = __webpack_require__(94).trim; + + module.exports = + 1 / $parseFloat(__webpack_require__(184) + '-0') !== -Infinity + ? function parseFloat(str) { + var string = $trim(String(str), 3), + result = $parseFloat(string); + return result === 0 && string.charAt(0) == '-' ? -0 : result; + } + : $parseFloat; + + /***/ + }, + /* 281 */ + /***/ function (module, exports, __webpack_require__) { + var $parseInt = __webpack_require__(6).parseInt, + $trim = __webpack_require__(94).trim, + ws = __webpack_require__(184), + hex = /^[\-+]?0[xX]/; + + module.exports = + $parseInt(ws + '08') !== 8 || $parseInt(ws + '0x16') !== 22 + ? function parseInt(str, radix) { + var string = $trim(String(str), 3); + return $parseInt(string, radix >>> 0 || (hex.test(string) ? 16 : 10)); + } + : $parseInt; + + /***/ + }, + /* 282 */ + /***/ function (module, exports) { + // 7.2.9 SameValue(x, y) + module.exports = + Object.is || + function is(x, y) { + return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y; + }; + + /***/ + }, + /* 283 */ + /***/ function (module, exports, __webpack_require__) { + // https://github.com/tc39/proposal-string-pad-start-end + var toLength = __webpack_require__(15), + repeat = __webpack_require__(183), + defined = __webpack_require__(44); + + module.exports = function (that, maxLength, fillString, left) { + var S = String(defined(that)), + stringLength = S.length, + fillStr = fillString === undefined ? ' ' : String(fillString), + intMaxLength = toLength(maxLength); + if (intMaxLength <= stringLength || fillStr == '') return S; + var fillLen = intMaxLength - stringLength, + stringFiller = repeat.call(fillStr, Math.ceil(fillLen / fillStr.length)); + if (stringFiller.length > fillLen) stringFiller = stringFiller.slice(0, fillLen); + return left ? stringFiller + S : S + stringFiller; + }; + + /***/ + }, + /* 284 */ + /***/ function (module, exports, __webpack_require__) { + exports.f = __webpack_require__(10); + + /***/ + }, + /* 285 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var strong = __webpack_require__(266); + + // 23.1 Map Objects + module.exports = __webpack_require__(127)( + 'Map', + function (get) { + return function Map() { + return get(this, arguments.length > 0 ? arguments[0] : undefined); + }; + }, + { + // 23.1.3.6 Map.prototype.get(key) + get: function get(key) { + var entry = strong.getEntry(this, key); + return entry && entry.v; + }, + // 23.1.3.9 Map.prototype.set(key, value) + set: function set(key, value) { + return strong.def(this, key === 0 ? 0 : key, value); + }, + }, + strong, + true, + ); + + /***/ + }, + /* 286 */ + /***/ function (module, exports, __webpack_require__) { + // 21.2.5.3 get RegExp.prototype.flags() + if (__webpack_require__(11) && /./g.flags != 'g') + __webpack_require__(12).f(RegExp.prototype, 'flags', { + configurable: true, + get: __webpack_require__(129), + }); + + /***/ + }, + /* 287 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var strong = __webpack_require__(266); + + // 23.2 Set Objects + module.exports = __webpack_require__(127)( + 'Set', + function (get) { + return function Set() { + return get(this, arguments.length > 0 ? arguments[0] : undefined); + }; + }, + { + // 23.2.3.1 Set.prototype.add(value) + add: function add(value) { + return strong.def(this, (value = value === 0 ? 0 : value), value); + }, + }, + strong, + ); + + /***/ + }, + /* 288 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var each = __webpack_require__(50)(0), + redefine = __webpack_require__(30), + meta = __webpack_require__(62), + assign = __webpack_require__(274), + weak = __webpack_require__(268), + isObject = __webpack_require__(9), + getWeak = meta.getWeak, + isExtensible = Object.isExtensible, + uncaughtFrozenStore = weak.ufstore, + tmp = {}, + InternalMap; + + var wrapper = function (get) { + return function WeakMap() { + return get(this, arguments.length > 0 ? arguments[0] : undefined); + }; + }; + + var methods = { + // 23.3.3.3 WeakMap.prototype.get(key) + get: function get(key) { + if (isObject(key)) { + var data = getWeak(key); + if (data === true) return uncaughtFrozenStore(this).get(key); + return data ? data[this._i] : undefined; + } + }, + // 23.3.3.5 WeakMap.prototype.set(key, value) + set: function set(key, value) { + return weak.def(this, key, value); + }, + }; + + // 23.3 WeakMap Objects + var $WeakMap = (module.exports = __webpack_require__(127)( + 'WeakMap', + wrapper, + methods, + weak, + true, + true, + )); + + // IE11 WeakMap frozen keys fix + if (new $WeakMap().set((Object.freeze || Object)(tmp), 7).get(tmp) != 7) { + InternalMap = weak.getConstructor(wrapper); + assign(InternalMap.prototype, methods); + meta.NEED = true; + each(['delete', 'has', 'get', 'set'], function (key) { + var proto = $WeakMap.prototype, + method = proto[key]; + redefine(proto, key, function (a, b) { + // store frozen objects on internal weakmap shim + if (isObject(a) && !isExtensible(a)) { + if (!this._f) this._f = new InternalMap(); + var result = this._f[key](a, b); + return key == 'set' ? this : result; + // store all the rest on native weakmap + } + return method.call(this, a, b); + }); + }); + } + + /***/ + }, + /* 289 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + /** + * Copyright (c) 2013-present, Facebook, Inc. + * + * 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 + * + * http://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. + * + * @typechecks + */ + + var emptyFunction = __webpack_require__(40); + + /** + * Upstream version of event listener. Does not take into account specific + * nature of platform. + */ + var EventListener = { + /** + * Listen to DOM events during the bubble phase. + * + * @param {DOMEventTarget} target DOM element to register listener on. + * @param {string} eventType Event type, e.g. 'click' or 'mouseover'. + * @param {function} callback Callback function. + * @return {object} Object with a `remove` method. + */ + listen: function listen(target, eventType, callback) { + if (target.addEventListener) { + target.addEventListener(eventType, callback, false); + return { + remove: function remove() { + target.removeEventListener(eventType, callback, false); + }, + }; + } else if (target.attachEvent) { + target.attachEvent('on' + eventType, callback); + return { + remove: function remove() { + target.detachEvent('on' + eventType, callback); + }, + }; + } + }, + + /** + * Listen to DOM events during the capture phase. + * + * @param {DOMEventTarget} target DOM element to register listener on. + * @param {string} eventType Event type, e.g. 'click' or 'mouseover'. + * @param {function} callback Callback function. + * @return {object} Object with a `remove` method. + */ + capture: function capture(target, eventType, callback) { + if (target.addEventListener) { + target.addEventListener(eventType, callback, true); + return { + remove: function remove() { + target.removeEventListener(eventType, callback, true); + }, + }; + } else { + if (true) { + console.error( + 'Attempted to listen to events during the capture phase on a ' + + 'browser that does not support the capture phase. Your application ' + + 'will not receive some events.', + ); + } + return { + remove: emptyFunction, + }; + } + }, + + registerDefault: function registerDefault() {}, + }; + + module.exports = EventListener; + + /***/ + }, + /* 290 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + /** + * @param {DOMElement} node input/textarea to focus + */ + + function focusNode(node) { + // IE8 can throw "Can't move focus to the control because it is invisible, + // not enabled, or of a type that does not accept the focus." for all kinds of + // reasons that are too expensive and fragile to test. + try { + node.focus(); + } catch (e) {} + } + + module.exports = focusNode; + + /***/ + }, + /* 291 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + /** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @typechecks + */ + + /* eslint-disable fb-www/typeof-undefined */ + + /** + * Same as document.activeElement but wraps in a try-catch block. In IE it is + * not safe to call document.activeElement if there is nothing focused. + * + * The activeElement will be null only if the document or document body is not + * yet defined. + * + * @param {?DOMDocument} doc Defaults to current document. + * @return {?DOMElement} + */ + function getActiveElement(doc) /*?DOMElement*/ { + doc = doc || (typeof document !== 'undefined' ? document : undefined); + if (typeof doc === 'undefined') { + return null; + } + try { + return doc.activeElement || doc.body; + } catch (e) { + return doc.body; + } + } + + module.exports = getActiveElement; + + /***/ + }, + /* 292 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + exports.readState = exports.saveState = undefined; + + var _warning = __webpack_require__(47); + + var _warning2 = _interopRequireDefault(_warning); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + var QuotaExceededErrors = { + QuotaExceededError: true, + QUOTA_EXCEEDED_ERR: true, + }; + + var SecurityErrors = { + SecurityError: true, + }; + + var KeyPrefix = '@@History/'; + + var createKey = function createKey(key) { + return KeyPrefix + key; + }; + + var saveState = (exports.saveState = function saveState(key, state) { + if (!window.sessionStorage) { + // Session storage is not available or hidden. + // sessionStorage is undefined in Internet Explorer when served via file protocol. + true + ? (0, _warning2.default)(false, '[history] Unable to save state; sessionStorage is not available') + : void 0; + + return; + } + + try { + if (state == null) { + window.sessionStorage.removeItem(createKey(key)); + } else { + window.sessionStorage.setItem(createKey(key), JSON.stringify(state)); + } + } catch (error) { + if (SecurityErrors[error.name]) { + // Blocking cookies in Chrome/Firefox/Safari throws SecurityError on any + // attempt to access window.sessionStorage. + true + ? (0, _warning2.default)( + false, + '[history] Unable to save state; sessionStorage is not available due to security settings', + ) + : void 0; + + return; + } + + if (QuotaExceededErrors[error.name] && window.sessionStorage.length === 0) { + // Safari "private mode" throws QuotaExceededError. + true + ? (0, _warning2.default)( + false, + '[history] Unable to save state; sessionStorage is not available in Safari private mode', + ) + : void 0; + + return; + } + + throw error; + } + }); + + var readState = (exports.readState = function readState(key) { + var json = void 0; + try { + json = window.sessionStorage.getItem(createKey(key)); + } catch (error) { + if (SecurityErrors[error.name]) { + // Blocking cookies in Chrome/Firefox/Safari throws SecurityError on any + // attempt to access window.sessionStorage. + true + ? (0, _warning2.default)( + false, + '[history] Unable to read state; sessionStorage is not available due to security settings', + ) + : void 0; + + return undefined; + } + } + + if (json) { + try { + return JSON.parse(json); + } catch (error) { + // Ignore invalid JSON. + } + } + + return undefined; + }); + + /***/ + }, + /* 293 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + var _runTransitionHook = __webpack_require__(194); + + var _runTransitionHook2 = _interopRequireDefault(_runTransitionHook); + + var _PathUtils = __webpack_require__(65); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + var useBasename = function useBasename(createHistory) { + return function () { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + + var history = createHistory(options); + var basename = options.basename; + + var addBasename = function addBasename(location) { + if (!location) return location; + + if (basename && location.basename == null) { + if (location.pathname.toLowerCase().indexOf(basename.toLowerCase()) === 0) { + location.pathname = location.pathname.substring(basename.length); + location.basename = basename; + + if (location.pathname === '') location.pathname = '/'; + } else { + location.basename = ''; + } + } + + return location; + }; + + var prependBasename = function prependBasename(location) { + if (!basename) return location; + + var object = typeof location === 'string' ? (0, _PathUtils.parsePath)(location) : location; + var pname = object.pathname; + var normalizedBasename = basename.slice(-1) === '/' ? basename : basename + '/'; + var normalizedPathname = pname.charAt(0) === '/' ? pname.slice(1) : pname; + var pathname = normalizedBasename + normalizedPathname; + + return _extends({}, object, { + pathname: pathname, + }); + }; + + // Override all read methods with basename-aware versions. + var getCurrentLocation = function getCurrentLocation() { + return addBasename(history.getCurrentLocation()); + }; + + var listenBefore = function listenBefore(hook) { + return history.listenBefore(function (location, callback) { + return (0, _runTransitionHook2.default)(hook, addBasename(location), callback); + }); + }; + + var listen = function listen(listener) { + return history.listen(function (location) { + return listener(addBasename(location)); + }); + }; + + // Override all write methods with basename-aware versions. + var push = function push(location) { + return history.push(prependBasename(location)); + }; + + var replace = function replace(location) { + return history.replace(prependBasename(location)); + }; + + var createPath = function createPath(location) { + return history.createPath(prependBasename(location)); + }; + + var createHref = function createHref(location) { + return history.createHref(prependBasename(location)); + }; + + var createLocation = function createLocation(location) { + for ( + var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; + _key < _len; + _key++ + ) { + args[_key - 1] = arguments[_key]; + } + + return addBasename( + history.createLocation.apply(history, [prependBasename(location)].concat(args)), + ); + }; + + return _extends({}, history, { + getCurrentLocation: getCurrentLocation, + listenBefore: listenBefore, + listen: listen, + push: push, + replace: replace, + createPath: createPath, + createHref: createHref, + createLocation: createLocation, + }); + }; + }; + + exports.default = useBasename; + + /***/ + }, + /* 294 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + var _queryString = __webpack_require__(707); + + var _runTransitionHook = __webpack_require__(194); + + var _runTransitionHook2 = _interopRequireDefault(_runTransitionHook); + + var _LocationUtils = __webpack_require__(95); + + var _PathUtils = __webpack_require__(65); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + var defaultStringifyQuery = function defaultStringifyQuery(query) { + return (0, _queryString.stringify)(query).replace(/%20/g, '+'); + }; + + var defaultParseQueryString = _queryString.parse; + + /** + * Returns a new createHistory function that may be used to create + * history objects that know how to handle URL queries. + */ + var useQueries = function useQueries(createHistory) { + return function () { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + + var history = createHistory(options); + var stringifyQuery = options.stringifyQuery, + parseQueryString = options.parseQueryString; + + if (typeof stringifyQuery !== 'function') stringifyQuery = defaultStringifyQuery; + + if (typeof parseQueryString !== 'function') parseQueryString = defaultParseQueryString; + + var decodeQuery = function decodeQuery(location) { + if (!location) return location; + + if (location.query == null) location.query = parseQueryString(location.search.substring(1)); + + return location; + }; + + var encodeQuery = function encodeQuery(location, query) { + if (query == null) return location; + + var object = typeof location === 'string' ? (0, _PathUtils.parsePath)(location) : location; + var queryString = stringifyQuery(query); + var search = queryString ? '?' + queryString : ''; + + return _extends({}, object, { + search: search, + }); + }; + + // Override all read methods with query-aware versions. + var getCurrentLocation = function getCurrentLocation() { + return decodeQuery(history.getCurrentLocation()); + }; + + var listenBefore = function listenBefore(hook) { + return history.listenBefore(function (location, callback) { + return (0, _runTransitionHook2.default)(hook, decodeQuery(location), callback); + }); + }; + + var listen = function listen(listener) { + return history.listen(function (location) { + return listener(decodeQuery(location)); + }); + }; + + // Override all write methods with query-aware versions. + var push = function push(location) { + return history.push(encodeQuery(location, location.query)); + }; + + var replace = function replace(location) { + return history.replace(encodeQuery(location, location.query)); + }; + + var createPath = function createPath(location) { + return history.createPath(encodeQuery(location, location.query)); + }; + + var createHref = function createHref(location) { + return history.createHref(encodeQuery(location, location.query)); + }; + + var createLocation = function createLocation(location) { + for ( + var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; + _key < _len; + _key++ + ) { + args[_key - 1] = arguments[_key]; + } + + var newLocation = history.createLocation.apply( + history, + [encodeQuery(location, location.query)].concat(args), + ); + + if (location.query) newLocation.query = (0, _LocationUtils.createQuery)(location.query); + + return decodeQuery(newLocation); + }; + + return _extends({}, history, { + getCurrentLocation: getCurrentLocation, + listenBefore: listenBefore, + listen: listen, + push: push, + replace: replace, + createPath: createPath, + createHref: createHref, + createLocation: createLocation, + }); + }; + }; + + exports.default = useQueries; + + /***/ + }, + /* 295 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2015, Yahoo! Inc. + * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. + */ + + var REACT_STATICS = { + childContextTypes: true, + contextTypes: true, + defaultProps: true, + displayName: true, + getDefaultProps: true, + mixins: true, + propTypes: true, + type: true, + }; + + var KNOWN_STATICS = { + name: true, + length: true, + prototype: true, + caller: true, + arguments: true, + arity: true, + }; + + var isGetOwnPropertySymbolsAvailable = typeof Object.getOwnPropertySymbols === 'function'; + + module.exports = function hoistNonReactStatics(targetComponent, sourceComponent, customStatics) { + if (typeof sourceComponent !== 'string') { + // don't hoist over string (html) components + var keys = Object.getOwnPropertyNames(sourceComponent); + + /* istanbul ignore else */ + if (isGetOwnPropertySymbolsAvailable) { + keys = keys.concat(Object.getOwnPropertySymbols(sourceComponent)); + } + + for (var i = 0; i < keys.length; ++i) { + if ( + !REACT_STATICS[keys[i]] && + !KNOWN_STATICS[keys[i]] && + (!customStatics || !customStatics[keys[i]]) + ) { + try { + targetComponent[keys[i]] = sourceComponent[keys[i]]; + } catch (error) {} + } + } + } + + return targetComponent; + }; + + /***/ + }, + /* 296 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /* jshint node:true */ + + var IntlMessageFormat = __webpack_require__(679)['default']; + + // Add all locale data to `IntlMessageFormat`. This module will be ignored when + // bundling for the browser with Browserify/Webpack. + __webpack_require__(841); + + // Re-export `IntlMessageFormat` as the CommonJS default exports with all the + // locale data registered, and with English set as the default locale. Define + // the `default` prop for use with other compiled ES6 Modules. + exports = module.exports = IntlMessageFormat; + exports['default'] = exports; + + /***/ + }, + /* 297 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /* +Copyright (c) 2014, Yahoo! Inc. All rights reserved. +Copyrights licensed under the New BSD License. +See the accompanying LICENSE file for terms. +*/ + + /* jslint esnext: true */ + + exports.extend = extend; + var hop = Object.prototype.hasOwnProperty; + + function extend(obj) { + var sources = Array.prototype.slice.call(arguments, 1), + i, + len, + source, + key; + + for (i = 0, len = sources.length; i < len; i += 1) { + source = sources[i]; + if (!source) { + continue; + } + + for (key in source) { + if (hop.call(source, key)) { + obj[key] = source[key]; + } + } + } + + return obj; + } + exports.hop = hop; + + //# sourceMappingURL=utils.js.map + + /***/ + }, + /* 298 */ + /***/ function (module, exports, __webpack_require__) { + /* WEBPACK VAR INJECTION */ (function (global) { + // Expose `IntlPolyfill` as global to add locale data into runtime later on. + global.IntlPolyfill = __webpack_require__(686); + + // Require all locale data for `Intl`. This module will be + // ignored when bundling for the browser with Browserify/Webpack. + __webpack_require__(840); + + // hack to export the polyfill as global Intl if needed + if (!global.Intl) { + global.Intl = global.IntlPolyfill; + global.IntlPolyfill.__applyLocaleSensitivePrototypes(); + } + + // providing an idiomatic api for the nodejs version of this module + module.exports = global.IntlPolyfill; + + /* WEBPACK VAR INJECTION */ + }).call(exports, __webpack_require__(22)); + + /***/ + }, + /* 299 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__root_js__ = __webpack_require__(695); + + /** Built-in value references. */ + var Symbol = __WEBPACK_IMPORTED_MODULE_0__root_js__['a' /* default */].Symbol; + + /* harmony default export */ __webpack_exports__['a'] = Symbol; + + /***/ + }, + /* 300 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__ = __webpack_require__(689); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getPrototype_js__ = __webpack_require__(691); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isObjectLike_js__ = __webpack_require__(696); + + /** `Object#toString` result references. */ + var objectTag = '[object Object]'; + + /** Used for built-in method references. */ + var funcProto = Function.prototype, + objectProto = Object.prototype; + + /** Used to resolve the decompiled source of functions. */ + var funcToString = funcProto.toString; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** Used to infer the `Object` constructor. */ + var objectCtorString = funcToString.call(Object); + + /** + * Checks if `value` is a plain object, that is, an object created by the + * `Object` constructor or one with a `[[Prototype]]` of `null`. + * + * @static + * @memberOf _ + * @since 0.8.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * _.isPlainObject(new Foo); + * // => false + * + * _.isPlainObject([1, 2, 3]); + * // => false + * + * _.isPlainObject({ 'x': 0, 'y': 0 }); + * // => true + * + * _.isPlainObject(Object.create(null)); + * // => true + */ + function isPlainObject(value) { + if ( + !__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__isObjectLike_js__['a' /* default */])(value) || + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__['a' /* default */])(value) != + objectTag + ) { + return false; + } + var proto = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__getPrototype_js__['a' /* default */])( + value, + ); + if (proto === null) { + return true; + } + var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; + return ( + typeof Ctor == 'function' && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString + ); + } + + /* harmony default export */ __webpack_exports__['a'] = isPlainObject; + + /***/ + }, + /* 301 */ + /***/ function (module, exports, __webpack_require__) { + var root = __webpack_require__(703); + + /** Built-in value references. */ + var Symbol = root.Symbol; + + module.exports = Symbol; + + /***/ + }, + /* 302 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = __webpack_require__(819); + + /***/ + }, + /* 303 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + + var _values = __webpack_require__(242); + + var _values2 = _interopRequireDefault(_values); + + var _extends3 = __webpack_require__(20); + + var _extends4 = _interopRequireDefault(_extends3); + + var _objectWithoutProperties2 = __webpack_require__(25); + + var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + + var _classCallCheck2 = __webpack_require__(23); + + var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + + var _possibleConstructorReturn2 = __webpack_require__(26); + + var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + + var _inherits2 = __webpack_require__(24); + + var _inherits3 = _interopRequireDefault(_inherits2); + + var _classnames = __webpack_require__(27); + + var _classnames2 = _interopRequireDefault(_classnames); + + var _react = __webpack_require__(1); + + var _react2 = _interopRequireDefault(_react); + + var _bootstrapUtils = __webpack_require__(46); + + var _StyleConfig = __webpack_require__(96); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + var propTypes = { + onDismiss: _react2['default'].PropTypes.func, + closeLabel: _react2['default'].PropTypes.string, + }; + + var defaultProps = { + closeLabel: 'Close alert', + }; + + var Alert = (function (_React$Component) { + (0, _inherits3['default'])(Alert, _React$Component); + + function Alert() { + (0, _classCallCheck3['default'])(this, Alert); + return (0, _possibleConstructorReturn3['default'])(this, _React$Component.apply(this, arguments)); + } + + Alert.prototype.renderDismissButton = function renderDismissButton(onDismiss) { + return _react2['default'].createElement( + 'button', + { + type: 'button', + className: 'close', + onClick: onDismiss, + 'aria-hidden': 'true', + tabIndex: '-1', + }, + _react2['default'].createElement('span', null, '\xD7'), + ); + }; + + Alert.prototype.renderSrOnlyDismissButton = function renderSrOnlyDismissButton( + onDismiss, + closeLabel, + ) { + return _react2['default'].createElement( + 'button', + { + type: 'button', + className: 'close sr-only', + onClick: onDismiss, + }, + closeLabel, + ); + }; + + Alert.prototype.render = function render() { + var _extends2; + + var _props = this.props, + onDismiss = _props.onDismiss, + closeLabel = _props.closeLabel, + className = _props.className, + children = _props.children, + props = (0, _objectWithoutProperties3['default'])(_props, [ + 'onDismiss', + 'closeLabel', + 'className', + 'children', + ]); + + var _splitBsProps = (0, _bootstrapUtils.splitBsProps)(props), + bsProps = _splitBsProps[0], + elementProps = _splitBsProps[1]; + + var dismissable = !!onDismiss; + var classes = (0, _extends4['default'])( + {}, + (0, _bootstrapUtils.getClassSet)(bsProps), + ((_extends2 = {}), + (_extends2[(0, _bootstrapUtils.prefix)(bsProps, 'dismissable')] = dismissable), + _extends2), + ); + + return _react2['default'].createElement( + 'div', + (0, _extends4['default'])({}, elementProps, { + role: 'alert', + className: (0, _classnames2['default'])(className, classes), + }), + dismissable && this.renderDismissButton(onDismiss), + children, + dismissable && this.renderSrOnlyDismissButton(onDismiss, closeLabel), + ); + }; + + return Alert; + })(_react2['default'].Component); + + Alert.propTypes = propTypes; + Alert.defaultProps = defaultProps; + + exports['default'] = (0, _bootstrapUtils.bsStyles)( + (0, _values2['default'])(_StyleConfig.State), + _StyleConfig.State.INFO, + (0, _bootstrapUtils.bsClass)('alert', Alert), + ); + module.exports = exports['default']; + + /***/ + }, + /* 304 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + + var _extends2 = __webpack_require__(20); + + var _extends3 = _interopRequireDefault(_extends2); + + var _objectWithoutProperties2 = __webpack_require__(25); + + var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + + var _classCallCheck2 = __webpack_require__(23); + + var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + + var _possibleConstructorReturn2 = __webpack_require__(26); + + var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + + var _inherits2 = __webpack_require__(24); + + var _inherits3 = _interopRequireDefault(_inherits2); + + var _react = __webpack_require__(1); + + var _react2 = _interopRequireDefault(_react); + + var _elementType = __webpack_require__(103); + + var _elementType2 = _interopRequireDefault(_elementType); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + var propTypes = { + href: _react2['default'].PropTypes.string, + onClick: _react2['default'].PropTypes.func, + disabled: _react2['default'].PropTypes.bool, + role: _react2['default'].PropTypes.string, + tabIndex: _react2['default'].PropTypes.oneOfType([ + _react2['default'].PropTypes.number, + _react2['default'].PropTypes.string, + ]), + /** + * this is sort of silly but needed for Button + */ + componentClass: _elementType2['default'], + }; + + var defaultProps = { + componentClass: 'a', + }; + + function isTrivialHref(href) { + return !href || href.trim() === '#'; + } + + /** + * There are situations due to browser quirks or Bootstrap CSS where + * an anchor tag is needed, when semantically a button tag is the + * better choice. SafeAnchor ensures that when an anchor is used like a + * button its accessible. It also emulates input `disabled` behavior for + * links, which is usually desirable for Buttons, NavItems, MenuItems, etc. + */ + + var SafeAnchor = (function (_React$Component) { + (0, _inherits3['default'])(SafeAnchor, _React$Component); + + function SafeAnchor(props, context) { + (0, _classCallCheck3['default'])(this, SafeAnchor); + + var _this = (0, _possibleConstructorReturn3['default'])( + this, + _React$Component.call(this, props, context), + ); + + _this.handleClick = _this.handleClick.bind(_this); + return _this; + } + + SafeAnchor.prototype.handleClick = function handleClick(event) { + var _props = this.props, + disabled = _props.disabled, + href = _props.href, + onClick = _props.onClick; + + if (disabled || isTrivialHref(href)) { + event.preventDefault(); + } + + if (disabled) { + event.stopPropagation(); + return; + } + + if (onClick) { + onClick(event); + } + }; + + SafeAnchor.prototype.render = function render() { + var _props2 = this.props, + Component = _props2.componentClass, + disabled = _props2.disabled, + props = (0, _objectWithoutProperties3['default'])(_props2, ['componentClass', 'disabled']); + + if (isTrivialHref(props.href)) { + props.role = props.role || 'button'; + // we want to make sure there is a href attribute on the node + // otherwise, the cursor incorrectly styled (except with role='button') + props.href = props.href || '#'; + } + + if (disabled) { + props.tabIndex = -1; + props.style = (0, _extends3['default'])({ pointerEvents: 'none' }, props.style); + } + + return _react2['default'].createElement( + Component, + (0, _extends3['default'])({}, props, { + onClick: this.handleClick, + }), + ); + }; + + return SafeAnchor; + })(_react2['default'].Component); + + SafeAnchor.propTypes = propTypes; + SafeAnchor.defaultProps = defaultProps; + + exports['default'] = SafeAnchor; + module.exports = exports['default']; + + /***/ + }, + /* 305 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + + var _react = __webpack_require__(1); + + var _react2 = _interopRequireDefault(_react); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + /** + * Iterates through children that are typically specified as `props.children`, + * but only maps over children that are "valid components". + * + * The mapFunction provided index will be normalised to the components mapped, + * so an invalid component would not increase the index. + * + * @param {?*} children Children tree container. + * @param {function(*, int)} func. + * @param {*} context Context for func. + * @return {object} Object containing the ordered map of results. + */ + function map(children, func, context) { + var index = 0; + + return _react2['default'].Children.map(children, function (child) { + if (!_react2['default'].isValidElement(child)) { + return child; + } + + return func.call(context, child, index++); + }); + } + + /** + * Iterates through children that are "valid components". + * + * The provided forEachFunc(child, index) will be called for each + * leaf child with the index reflecting the position relative to "valid components". + * + * @param {?*} children Children tree container. + * @param {function(*, int)} func. + * @param {*} context Context for context. + */ + // TODO: This module should be ElementChildren, and should use named exports. + + function forEach(children, func, context) { + var index = 0; + + _react2['default'].Children.forEach(children, function (child) { + if (!_react2['default'].isValidElement(child)) { + return; + } + + func.call(context, child, index++); + }); + } + + /** + * Count the number of "valid components" in the Children container. + * + * @param {?*} children Children tree container. + * @returns {number} + */ + function count(children) { + var result = 0; + + _react2['default'].Children.forEach(children, function (child) { + if (!_react2['default'].isValidElement(child)) { + return; + } + + ++result; + }); + + return result; + } + + /** + * Finds children that are typically specified as `props.children`, + * but only iterates over children that are "valid components". + * + * The provided forEachFunc(child, index) will be called for each + * leaf child with the index reflecting the position relative to "valid components". + * + * @param {?*} children Children tree container. + * @param {function(*, int)} func. + * @param {*} context Context for func. + * @returns {array} of children that meet the func return statement + */ + function filter(children, func, context) { + var index = 0; + var result = []; + + _react2['default'].Children.forEach(children, function (child) { + if (!_react2['default'].isValidElement(child)) { + return; + } + + if (func.call(context, child, index++)) { + result.push(child); + } + }); + + return result; + } + + function find(children, func, context) { + var index = 0; + var result = undefined; + + _react2['default'].Children.forEach(children, function (child) { + if (result) { + return; + } + if (!_react2['default'].isValidElement(child)) { + return; + } + + if (func.call(context, child, index++)) { + result = child; + } + }); + + return result; + } + + function every(children, func, context) { + var index = 0; + var result = true; + + _react2['default'].Children.forEach(children, function (child) { + if (!result) { + return; + } + if (!_react2['default'].isValidElement(child)) { + return; + } + + if (!func.call(context, child, index++)) { + result = false; + } + }); + + return result; + } + + function some(children, func, context) { + var index = 0; + var result = false; + + _react2['default'].Children.forEach(children, function (child) { + if (result) { + return; + } + if (!_react2['default'].isValidElement(child)) { + return; + } + + if (func.call(context, child, index++)) { + result = true; + } + }); + + return result; + } + + function toArray(children) { + var result = []; + + _react2['default'].Children.forEach(children, function (child) { + if (!_react2['default'].isValidElement(child)) { + return; + } + + result.push(child); + }); + + return result; + } + + exports['default'] = { + map: map, + forEach: forEach, + count: count, + find: find, + filter: filter, + every: every, + some: some, + toArray: toArray, + }; + module.exports = exports['default']; + + /***/ + }, + /* 306 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + /** + * Safe chained function + * + * Will only create a new function if needed, + * otherwise will pass back existing functions or null. + * + * @param {function} functions to chain + * @returns {function|null} + */ + function createChainedFunction() { + for (var _len = arguments.length, funcs = Array(_len), _key = 0; _key < _len; _key++) { + funcs[_key] = arguments[_key]; + } + + return funcs + .filter(function (f) { + return f != null; + }) + .reduce(function (acc, f) { + if (typeof f !== 'function') { + throw new Error('Invalid Argument Type, must only provide functions, undefined, or null.'); + } + + if (acc === null) { + return f; + } + + return function chainedFunction() { + for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { + args[_key2] = arguments[_key2]; + } + + acc.apply(this, args); + f.apply(this, args); + }; + }, null); + } + + exports['default'] = createChainedFunction; + module.exports = exports['default']; + + /***/ + }, + /* 307 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + /** + * CSS properties which accept numbers but are not in units of "px". + */ + + var isUnitlessNumber = { + animationIterationCount: true, + borderImageOutset: true, + borderImageSlice: true, + borderImageWidth: true, + boxFlex: true, + boxFlexGroup: true, + boxOrdinalGroup: true, + columnCount: true, + flex: true, + flexGrow: true, + flexPositive: true, + flexShrink: true, + flexNegative: true, + flexOrder: true, + gridRow: true, + gridColumn: true, + fontWeight: true, + lineClamp: true, + lineHeight: true, + opacity: true, + order: true, + orphans: true, + tabSize: true, + widows: true, + zIndex: true, + zoom: true, + + // SVG-related properties + fillOpacity: true, + floodOpacity: true, + stopOpacity: true, + strokeDasharray: true, + strokeDashoffset: true, + strokeMiterlimit: true, + strokeOpacity: true, + strokeWidth: true, + }; + + /** + * @param {string} prefix vendor-specific prefix, eg: Webkit + * @param {string} key style name, eg: transitionDuration + * @return {string} style name prefixed with `prefix`, properly camelCased, eg: + * WebkitTransitionDuration + */ + function prefixKey(prefix, key) { + return prefix + key.charAt(0).toUpperCase() + key.substring(1); + } + + /** + * Support style names that may come passed in prefixed by adding permutations + * of vendor prefixes. + */ + var prefixes = ['Webkit', 'ms', 'Moz', 'O']; + + // Using Object.keys here, or else the vanilla for-in loop makes IE8 go into an + // infinite loop, because it iterates over the newly added props too. + Object.keys(isUnitlessNumber).forEach(function (prop) { + prefixes.forEach(function (prefix) { + isUnitlessNumber[prefixKey(prefix, prop)] = isUnitlessNumber[prop]; + }); + }); + + /** + * Most style properties can be unset by doing .style[prop] = '' but IE8 + * doesn't like doing that with shorthand properties so for the properties that + * IE8 breaks on, which are listed here, we instead unset each of the + * individual properties. See http://bugs.jquery.com/ticket/12385. + * The 4-value 'clock' properties like margin, padding, border-width seem to + * behave without any problems. Curiously, list-style works too without any + * special prodding. + */ + var shorthandPropertyExpansions = { + background: { + backgroundAttachment: true, + backgroundColor: true, + backgroundImage: true, + backgroundPositionX: true, + backgroundPositionY: true, + backgroundRepeat: true, + }, + backgroundPosition: { + backgroundPositionX: true, + backgroundPositionY: true, + }, + border: { + borderWidth: true, + borderStyle: true, + borderColor: true, + }, + borderBottom: { + borderBottomWidth: true, + borderBottomStyle: true, + borderBottomColor: true, + }, + borderLeft: { + borderLeftWidth: true, + borderLeftStyle: true, + borderLeftColor: true, + }, + borderRight: { + borderRightWidth: true, + borderRightStyle: true, + borderRightColor: true, + }, + borderTop: { + borderTopWidth: true, + borderTopStyle: true, + borderTopColor: true, + }, + font: { + fontStyle: true, + fontVariant: true, + fontWeight: true, + fontSize: true, + lineHeight: true, + fontFamily: true, + }, + outline: { + outlineWidth: true, + outlineStyle: true, + outlineColor: true, + }, + }; + + var CSSProperty = { + isUnitlessNumber: isUnitlessNumber, + shorthandPropertyExpansions: shorthandPropertyExpansions, + }; + + module.exports = CSSProperty; + + /***/ + }, + /* 308 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + var _prodInvariant = __webpack_require__(5); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + var PooledClass = __webpack_require__(85); + + var invariant = __webpack_require__(2); + + /** + * A specialized pseudo-event module to help keep track of components waiting to + * be notified when their DOM representations are available for use. + * + * This implements `PooledClass`, so you should never need to instantiate this. + * Instead, use `CallbackQueue.getPooled()`. + * + * @class ReactMountReady + * @implements PooledClass + * @internal + */ + + var CallbackQueue = (function () { + function CallbackQueue(arg) { + _classCallCheck(this, CallbackQueue); + + this._callbacks = null; + this._contexts = null; + this._arg = arg; + } + + /** + * Enqueues a callback to be invoked when `notifyAll` is invoked. + * + * @param {function} callback Invoked when `notifyAll` is invoked. + * @param {?object} context Context to call `callback` with. + * @internal + */ + + CallbackQueue.prototype.enqueue = function enqueue(callback, context) { + this._callbacks = this._callbacks || []; + this._callbacks.push(callback); + this._contexts = this._contexts || []; + this._contexts.push(context); + }; + + /** + * Invokes all enqueued callbacks and clears the queue. This is invoked after + * the DOM representation of a component has been created or updated. + * + * @internal + */ + + CallbackQueue.prototype.notifyAll = function notifyAll() { + var callbacks = this._callbacks; + var contexts = this._contexts; + var arg = this._arg; + if (callbacks && contexts) { + !(callbacks.length === contexts.length) + ? true + ? invariant(false, 'Mismatched list of contexts in callback queue') + : _prodInvariant('24') + : void 0; + this._callbacks = null; + this._contexts = null; + for (var i = 0; i < callbacks.length; i++) { + callbacks[i].call(contexts[i], arg); + } + callbacks.length = 0; + contexts.length = 0; + } + }; + + CallbackQueue.prototype.checkpoint = function checkpoint() { + return this._callbacks ? this._callbacks.length : 0; + }; + + CallbackQueue.prototype.rollback = function rollback(len) { + if (this._callbacks && this._contexts) { + this._callbacks.length = len; + this._contexts.length = len; + } + }; + + /** + * Resets the internal queue. + * + * @internal + */ + + CallbackQueue.prototype.reset = function reset() { + this._callbacks = null; + this._contexts = null; + }; + + /** + * `PooledClass` looks for this. + */ + + CallbackQueue.prototype.destructor = function destructor() { + this.reset(); + }; + + return CallbackQueue; + })(); + + module.exports = PooledClass.addPoolingTo(CallbackQueue); + + /***/ + }, + /* 309 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var DOMProperty = __webpack_require__(66); + var ReactDOMComponentTree = __webpack_require__(13); + var ReactInstrumentation = __webpack_require__(33); + + var quoteAttributeValueForBrowser = __webpack_require__(783); + var warning = __webpack_require__(3); + + var VALID_ATTRIBUTE_NAME_REGEX = new RegExp( + '^[' + DOMProperty.ATTRIBUTE_NAME_START_CHAR + '][' + DOMProperty.ATTRIBUTE_NAME_CHAR + ']*$', + ); + var illegalAttributeNameCache = {}; + var validatedAttributeNameCache = {}; + + function isAttributeNameSafe(attributeName) { + if (validatedAttributeNameCache.hasOwnProperty(attributeName)) { + return true; + } + if (illegalAttributeNameCache.hasOwnProperty(attributeName)) { + return false; + } + if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) { + validatedAttributeNameCache[attributeName] = true; + return true; + } + illegalAttributeNameCache[attributeName] = true; + true ? warning(false, 'Invalid attribute name: `%s`', attributeName) : void 0; + return false; + } + + function shouldIgnoreValue(propertyInfo, value) { + return ( + value == null || + (propertyInfo.hasBooleanValue && !value) || + (propertyInfo.hasNumericValue && isNaN(value)) || + (propertyInfo.hasPositiveNumericValue && value < 1) || + (propertyInfo.hasOverloadedBooleanValue && value === false) + ); + } + + /** + * Operations for dealing with DOM properties. + */ + var DOMPropertyOperations = { + /** + * Creates markup for the ID property. + * + * @param {string} id Unescaped ID. + * @return {string} Markup string. + */ + createMarkupForID: function (id) { + return DOMProperty.ID_ATTRIBUTE_NAME + '=' + quoteAttributeValueForBrowser(id); + }, + + setAttributeForID: function (node, id) { + node.setAttribute(DOMProperty.ID_ATTRIBUTE_NAME, id); + }, + + createMarkupForRoot: function () { + return DOMProperty.ROOT_ATTRIBUTE_NAME + '=""'; + }, + + setAttributeForRoot: function (node) { + node.setAttribute(DOMProperty.ROOT_ATTRIBUTE_NAME, ''); + }, + + /** + * Creates markup for a property. + * + * @param {string} name + * @param {*} value + * @return {?string} Markup string, or null if the property was invalid. + */ + createMarkupForProperty: function (name, value) { + var propertyInfo = DOMProperty.properties.hasOwnProperty(name) + ? DOMProperty.properties[name] + : null; + if (propertyInfo) { + if (shouldIgnoreValue(propertyInfo, value)) { + return ''; + } + var attributeName = propertyInfo.attributeName; + if (propertyInfo.hasBooleanValue || (propertyInfo.hasOverloadedBooleanValue && value === true)) { + return attributeName + '=""'; + } + return attributeName + '=' + quoteAttributeValueForBrowser(value); + } else if (DOMProperty.isCustomAttribute(name)) { + if (value == null) { + return ''; + } + return name + '=' + quoteAttributeValueForBrowser(value); + } + return null; + }, + + /** + * Creates markup for a custom property. + * + * @param {string} name + * @param {*} value + * @return {string} Markup string, or empty string if the property was invalid. + */ + createMarkupForCustomAttribute: function (name, value) { + if (!isAttributeNameSafe(name) || value == null) { + return ''; + } + return name + '=' + quoteAttributeValueForBrowser(value); + }, + + /** + * Sets the value for a property on a node. + * + * @param {DOMElement} node + * @param {string} name + * @param {*} value + */ + setValueForProperty: function (node, name, value) { + var propertyInfo = DOMProperty.properties.hasOwnProperty(name) + ? DOMProperty.properties[name] + : null; + if (propertyInfo) { + var mutationMethod = propertyInfo.mutationMethod; + if (mutationMethod) { + mutationMethod(node, value); + } else if (shouldIgnoreValue(propertyInfo, value)) { + this.deleteValueForProperty(node, name); + return; + } else if (propertyInfo.mustUseProperty) { + // Contrary to `setAttribute`, object properties are properly + // `toString`ed by IE8/9. + node[propertyInfo.propertyName] = value; + } else { + var attributeName = propertyInfo.attributeName; + var namespace = propertyInfo.attributeNamespace; + // `setAttribute` with objects becomes only `[object]` in IE8/9, + // ('' + value) makes it output the correct toString()-value. + if (namespace) { + node.setAttributeNS(namespace, attributeName, '' + value); + } else if ( + propertyInfo.hasBooleanValue || + (propertyInfo.hasOverloadedBooleanValue && value === true) + ) { + node.setAttribute(attributeName, ''); + } else { + node.setAttribute(attributeName, '' + value); + } + } + } else if (DOMProperty.isCustomAttribute(name)) { + DOMPropertyOperations.setValueForAttribute(node, name, value); + return; + } + + if (true) { + var payload = {}; + payload[name] = value; + ReactInstrumentation.debugTool.onHostOperation({ + instanceID: ReactDOMComponentTree.getInstanceFromNode(node)._debugID, + type: 'update attribute', + payload: payload, + }); + } + }, + + setValueForAttribute: function (node, name, value) { + if (!isAttributeNameSafe(name)) { + return; + } + if (value == null) { + node.removeAttribute(name); + } else { + node.setAttribute(name, '' + value); + } + + if (true) { + var payload = {}; + payload[name] = value; + ReactInstrumentation.debugTool.onHostOperation({ + instanceID: ReactDOMComponentTree.getInstanceFromNode(node)._debugID, + type: 'update attribute', + payload: payload, + }); + } + }, + + /** + * Deletes an attributes from a node. + * + * @param {DOMElement} node + * @param {string} name + */ + deleteValueForAttribute: function (node, name) { + node.removeAttribute(name); + if (true) { + ReactInstrumentation.debugTool.onHostOperation({ + instanceID: ReactDOMComponentTree.getInstanceFromNode(node)._debugID, + type: 'remove attribute', + payload: name, + }); + } + }, + + /** + * Deletes the value for a property on a node. + * + * @param {DOMElement} node + * @param {string} name + */ + deleteValueForProperty: function (node, name) { + var propertyInfo = DOMProperty.properties.hasOwnProperty(name) + ? DOMProperty.properties[name] + : null; + if (propertyInfo) { + var mutationMethod = propertyInfo.mutationMethod; + if (mutationMethod) { + mutationMethod(node, undefined); + } else if (propertyInfo.mustUseProperty) { + var propName = propertyInfo.propertyName; + if (propertyInfo.hasBooleanValue) { + node[propName] = false; + } else { + node[propName] = ''; + } + } else { + node.removeAttribute(propertyInfo.attributeName); + } + } else if (DOMProperty.isCustomAttribute(name)) { + node.removeAttribute(name); + } + + if (true) { + ReactInstrumentation.debugTool.onHostOperation({ + instanceID: ReactDOMComponentTree.getInstanceFromNode(node)._debugID, + type: 'remove attribute', + payload: name, + }); + } + }, + }; + + module.exports = DOMPropertyOperations; + + /***/ + }, + /* 310 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var _prodInvariant = __webpack_require__(5), + _assign = __webpack_require__(8); + + var React = __webpack_require__(41); + var ReactComponentEnvironment = __webpack_require__(200); + var ReactCurrentOwner = __webpack_require__(54); + var ReactErrorUtils = __webpack_require__(203); + var ReactInstanceMap = __webpack_require__(100); + var ReactInstrumentation = __webpack_require__(33); + var ReactNodeTypes = __webpack_require__(322); + var ReactReconciler = __webpack_require__(67); + + if (true) { + var checkReactTypeSpec = __webpack_require__(777); + } + + var emptyObject = __webpack_require__(83); + var invariant = __webpack_require__(2); + var shallowEqual = __webpack_require__(190); + var shouldUpdateReactComponent = __webpack_require__(211); + var warning = __webpack_require__(3); + + var CompositeTypes = { + ImpureClass: 0, + PureClass: 1, + StatelessFunctional: 2, + }; + + function StatelessComponent(Component) {} + StatelessComponent.prototype.render = function () { + var Component = ReactInstanceMap.get(this)._currentElement.type; + var element = Component(this.props, this.context, this.updater); + warnIfInvalidElement(Component, element); + return element; + }; + + function warnIfInvalidElement(Component, element) { + if (true) { + true + ? warning( + element === null || element === false || React.isValidElement(element), + '%s(...): A valid React element (or null) must be returned. You may have ' + + 'returned undefined, an array or some other invalid object.', + Component.displayName || Component.name || 'Component', + ) + : void 0; + true + ? warning( + !Component.childContextTypes, + '%s(...): childContextTypes cannot be defined on a functional component.', + Component.displayName || Component.name || 'Component', + ) + : void 0; + } + } + + function shouldConstruct(Component) { + return !!(Component.prototype && Component.prototype.isReactComponent); + } + + function isPureComponent(Component) { + return !!(Component.prototype && Component.prototype.isPureReactComponent); + } + + // Separated into a function to contain deoptimizations caused by try/finally. + function measureLifeCyclePerf(fn, debugID, timerType) { + if (debugID === 0) { + // Top-level wrappers (see ReactMount) and empty components (see + // ReactDOMEmptyComponent) are invisible to hooks and devtools. + // Both are implementation details that should go away in the future. + return fn(); + } + + ReactInstrumentation.debugTool.onBeginLifeCycleTimer(debugID, timerType); + try { + return fn(); + } finally { + ReactInstrumentation.debugTool.onEndLifeCycleTimer(debugID, timerType); + } + } + + /** + * ------------------ The Life-Cycle of a Composite Component ------------------ + * + * - constructor: Initialization of state. The instance is now retained. + * - componentWillMount + * - render + * - [children's constructors] + * - [children's componentWillMount and render] + * - [children's componentDidMount] + * - componentDidMount + * + * Update Phases: + * - componentWillReceiveProps (only called if parent updated) + * - shouldComponentUpdate + * - componentWillUpdate + * - render + * - [children's constructors or receive props phases] + * - componentDidUpdate + * + * - componentWillUnmount + * - [children's componentWillUnmount] + * - [children destroyed] + * - (destroyed): The instance is now blank, released by React and ready for GC. + * + * ----------------------------------------------------------------------------- + */ + + /** + * An incrementing ID assigned to each component when it is mounted. This is + * used to enforce the order in which `ReactUpdates` updates dirty components. + * + * @private + */ + var nextMountID = 1; + + /** + * @lends {ReactCompositeComponent.prototype} + */ + var ReactCompositeComponent = { + /** + * Base constructor for all composite component. + * + * @param {ReactElement} element + * @final + * @internal + */ + construct: function (element) { + this._currentElement = element; + this._rootNodeID = 0; + this._compositeType = null; + this._instance = null; + this._hostParent = null; + this._hostContainerInfo = null; + + // See ReactUpdateQueue + this._updateBatchNumber = null; + this._pendingElement = null; + this._pendingStateQueue = null; + this._pendingReplaceState = false; + this._pendingForceUpdate = false; + + this._renderedNodeType = null; + this._renderedComponent = null; + this._context = null; + this._mountOrder = 0; + this._topLevelWrapper = null; + + // See ReactUpdates and ReactUpdateQueue. + this._pendingCallbacks = null; + + // ComponentWillUnmount shall only be called once + this._calledComponentWillUnmount = false; + + if (true) { + this._warnedAboutRefsInRender = false; + } + }, + + /** + * Initializes the component, renders markup, and registers event listeners. + * + * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction + * @param {?object} hostParent + * @param {?object} hostContainerInfo + * @param {?object} context + * @return {?string} Rendered markup to be inserted into the DOM. + * @final + * @internal + */ + mountComponent: function (transaction, hostParent, hostContainerInfo, context) { + var _this = this; + + this._context = context; + this._mountOrder = nextMountID++; + this._hostParent = hostParent; + this._hostContainerInfo = hostContainerInfo; + + var publicProps = this._currentElement.props; + var publicContext = this._processContext(context); + + var Component = this._currentElement.type; + + var updateQueue = transaction.getUpdateQueue(); + + // Initialize the public class + var doConstruct = shouldConstruct(Component); + var inst = this._constructComponent(doConstruct, publicProps, publicContext, updateQueue); + var renderedElement; + + // Support functional components + if (!doConstruct && (inst == null || inst.render == null)) { + renderedElement = inst; + warnIfInvalidElement(Component, renderedElement); + !(inst === null || inst === false || React.isValidElement(inst)) + ? true + ? invariant( + false, + '%s(...): A valid React element (or null) must be returned. You may have returned undefined, an array or some other invalid object.', + Component.displayName || Component.name || 'Component', + ) + : _prodInvariant('105', Component.displayName || Component.name || 'Component') + : void 0; + inst = new StatelessComponent(Component); + this._compositeType = CompositeTypes.StatelessFunctional; + } else { + if (isPureComponent(Component)) { + this._compositeType = CompositeTypes.PureClass; + } else { + this._compositeType = CompositeTypes.ImpureClass; + } + } + + if (true) { + // This will throw later in _renderValidatedComponent, but add an early + // warning now to help debugging + if (inst.render == null) { + true + ? warning( + false, + '%s(...): No `render` method found on the returned component ' + + 'instance: you may have forgotten to define `render`.', + Component.displayName || Component.name || 'Component', + ) + : void 0; + } + + var propsMutated = inst.props !== publicProps; + var componentName = Component.displayName || Component.name || 'Component'; + + true + ? warning( + inst.props === undefined || !propsMutated, + '%s(...): When calling super() in `%s`, make sure to pass ' + + "up the same props that your component's constructor was passed.", + componentName, + componentName, + ) + : void 0; + } + + // These should be set up in the constructor, but as a convenience for + // simpler class abstractions, we set them up after the fact. + inst.props = publicProps; + inst.context = publicContext; + inst.refs = emptyObject; + inst.updater = updateQueue; + + this._instance = inst; + + // Store a reference from the instance back to the internal representation + ReactInstanceMap.set(inst, this); + + if (true) { + // Since plain JS classes are defined without any special initialization + // logic, we can not catch common errors early. Therefore, we have to + // catch them here, at initialization time, instead. + true + ? warning( + !inst.getInitialState || inst.getInitialState.isReactClassApproved || inst.state, + 'getInitialState was defined on %s, a plain JavaScript class. ' + + 'This is only supported for classes created using React.createClass. ' + + 'Did you mean to define a state property instead?', + this.getName() || 'a component', + ) + : void 0; + true + ? warning( + !inst.getDefaultProps || inst.getDefaultProps.isReactClassApproved, + 'getDefaultProps was defined on %s, a plain JavaScript class. ' + + 'This is only supported for classes created using React.createClass. ' + + 'Use a static property to define defaultProps instead.', + this.getName() || 'a component', + ) + : void 0; + true + ? warning( + !inst.propTypes, + 'propTypes was defined as an instance property on %s. Use a static ' + + 'property to define propTypes instead.', + this.getName() || 'a component', + ) + : void 0; + true + ? warning( + !inst.contextTypes, + 'contextTypes was defined as an instance property on %s. Use a ' + + 'static property to define contextTypes instead.', + this.getName() || 'a component', + ) + : void 0; + true + ? warning( + typeof inst.componentShouldUpdate !== 'function', + '%s has a method called ' + + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + + 'The name is phrased as a question because the function is ' + + 'expected to return a value.', + this.getName() || 'A component', + ) + : void 0; + true + ? warning( + typeof inst.componentDidUnmount !== 'function', + '%s has a method called ' + + 'componentDidUnmount(). But there is no such lifecycle method. ' + + 'Did you mean componentWillUnmount()?', + this.getName() || 'A component', + ) + : void 0; + true + ? warning( + typeof inst.componentWillRecieveProps !== 'function', + '%s has a method called ' + + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', + this.getName() || 'A component', + ) + : void 0; + } + + var initialState = inst.state; + if (initialState === undefined) { + inst.state = initialState = null; + } + !(typeof initialState === 'object' && !Array.isArray(initialState)) + ? true + ? invariant( + false, + '%s.state: must be set to an object or null', + this.getName() || 'ReactCompositeComponent', + ) + : _prodInvariant('106', this.getName() || 'ReactCompositeComponent') + : void 0; + + this._pendingStateQueue = null; + this._pendingReplaceState = false; + this._pendingForceUpdate = false; + + var markup; + if (inst.unstable_handleError) { + markup = this.performInitialMountWithErrorHandling( + renderedElement, + hostParent, + hostContainerInfo, + transaction, + context, + ); + } else { + markup = this.performInitialMount( + renderedElement, + hostParent, + hostContainerInfo, + transaction, + context, + ); + } + + if (inst.componentDidMount) { + if (true) { + transaction.getReactMountReady().enqueue(function () { + measureLifeCyclePerf( + function () { + return inst.componentDidMount(); + }, + _this._debugID, + 'componentDidMount', + ); + }); + } else { + transaction.getReactMountReady().enqueue(inst.componentDidMount, inst); + } + } + + return markup; + }, + + _constructComponent: function (doConstruct, publicProps, publicContext, updateQueue) { + if (true) { + ReactCurrentOwner.current = this; + try { + return this._constructComponentWithoutOwner( + doConstruct, + publicProps, + publicContext, + updateQueue, + ); + } finally { + ReactCurrentOwner.current = null; + } + } else { + return this._constructComponentWithoutOwner(doConstruct, publicProps, publicContext, updateQueue); + } + }, + + _constructComponentWithoutOwner: function (doConstruct, publicProps, publicContext, updateQueue) { + var Component = this._currentElement.type; + + if (doConstruct) { + if (true) { + return measureLifeCyclePerf( + function () { + return new Component(publicProps, publicContext, updateQueue); + }, + this._debugID, + 'ctor', + ); + } else { + return new Component(publicProps, publicContext, updateQueue); + } + } + + // This can still be an instance in case of factory components + // but we'll count this as time spent rendering as the more common case. + if (true) { + return measureLifeCyclePerf( + function () { + return Component(publicProps, publicContext, updateQueue); + }, + this._debugID, + 'render', + ); + } else { + return Component(publicProps, publicContext, updateQueue); + } + }, + + performInitialMountWithErrorHandling: function ( + renderedElement, + hostParent, + hostContainerInfo, + transaction, + context, + ) { + var markup; + var checkpoint = transaction.checkpoint(); + try { + markup = this.performInitialMount( + renderedElement, + hostParent, + hostContainerInfo, + transaction, + context, + ); + } catch (e) { + // Roll back to checkpoint, handle error (which may add items to the transaction), and take a new checkpoint + transaction.rollback(checkpoint); + this._instance.unstable_handleError(e); + if (this._pendingStateQueue) { + this._instance.state = this._processPendingState(this._instance.props, this._instance.context); + } + checkpoint = transaction.checkpoint(); + + this._renderedComponent.unmountComponent(true); + transaction.rollback(checkpoint); + + // Try again - we've informed the component about the error, so they can render an error message this time. + // If this throws again, the error will bubble up (and can be caught by a higher error boundary). + markup = this.performInitialMount( + renderedElement, + hostParent, + hostContainerInfo, + transaction, + context, + ); + } + return markup; + }, + + performInitialMount: function (renderedElement, hostParent, hostContainerInfo, transaction, context) { + var inst = this._instance; + + var debugID = 0; + if (true) { + debugID = this._debugID; + } + + if (inst.componentWillMount) { + if (true) { + measureLifeCyclePerf( + function () { + return inst.componentWillMount(); + }, + debugID, + 'componentWillMount', + ); + } else { + inst.componentWillMount(); + } + // When mounting, calls to `setState` by `componentWillMount` will set + // `this._pendingStateQueue` without triggering a re-render. + if (this._pendingStateQueue) { + inst.state = this._processPendingState(inst.props, inst.context); + } + } + + // If not a stateless component, we now render + if (renderedElement === undefined) { + renderedElement = this._renderValidatedComponent(); + } + + var nodeType = ReactNodeTypes.getType(renderedElement); + this._renderedNodeType = nodeType; + var child = this._instantiateReactComponent( + renderedElement, + nodeType !== ReactNodeTypes.EMPTY /* shouldHaveDebugID */, + ); + this._renderedComponent = child; + + var markup = ReactReconciler.mountComponent( + child, + transaction, + hostParent, + hostContainerInfo, + this._processChildContext(context), + debugID, + ); + + if (true) { + if (debugID !== 0) { + var childDebugIDs = child._debugID !== 0 ? [child._debugID] : []; + ReactInstrumentation.debugTool.onSetChildren(debugID, childDebugIDs); + } + } + + return markup; + }, + + getHostNode: function () { + return ReactReconciler.getHostNode(this._renderedComponent); + }, + + /** + * Releases any resources allocated by `mountComponent`. + * + * @final + * @internal + */ + unmountComponent: function (safely) { + if (!this._renderedComponent) { + return; + } + + var inst = this._instance; + + if (inst.componentWillUnmount && !inst._calledComponentWillUnmount) { + inst._calledComponentWillUnmount = true; + + if (safely) { + var name = this.getName() + '.componentWillUnmount()'; + ReactErrorUtils.invokeGuardedCallback(name, inst.componentWillUnmount.bind(inst)); + } else { + if (true) { + measureLifeCyclePerf( + function () { + return inst.componentWillUnmount(); + }, + this._debugID, + 'componentWillUnmount', + ); + } else { + inst.componentWillUnmount(); + } + } + } + + if (this._renderedComponent) { + ReactReconciler.unmountComponent(this._renderedComponent, safely); + this._renderedNodeType = null; + this._renderedComponent = null; + this._instance = null; + } + + // Reset pending fields + // Even if this component is scheduled for another update in ReactUpdates, + // it would still be ignored because these fields are reset. + this._pendingStateQueue = null; + this._pendingReplaceState = false; + this._pendingForceUpdate = false; + this._pendingCallbacks = null; + this._pendingElement = null; + + // These fields do not really need to be reset since this object is no + // longer accessible. + this._context = null; + this._rootNodeID = 0; + this._topLevelWrapper = null; + + // Delete the reference from the instance to this internal representation + // which allow the internals to be properly cleaned up even if the user + // leaks a reference to the public instance. + ReactInstanceMap.remove(inst); + + // Some existing components rely on inst.props even after they've been + // destroyed (in event handlers). + // TODO: inst.props = null; + // TODO: inst.state = null; + // TODO: inst.context = null; + }, + + /** + * Filters the context object to only contain keys specified in + * `contextTypes` + * + * @param {object} context + * @return {?object} + * @private + */ + _maskContext: function (context) { + var Component = this._currentElement.type; + var contextTypes = Component.contextTypes; + if (!contextTypes) { + return emptyObject; + } + var maskedContext = {}; + for (var contextName in contextTypes) { + maskedContext[contextName] = context[contextName]; + } + return maskedContext; + }, + + /** + * Filters the context object to only contain keys specified in + * `contextTypes`, and asserts that they are valid. + * + * @param {object} context + * @return {?object} + * @private + */ + _processContext: function (context) { + var maskedContext = this._maskContext(context); + if (true) { + var Component = this._currentElement.type; + if (Component.contextTypes) { + this._checkContextTypes(Component.contextTypes, maskedContext, 'context'); + } + } + return maskedContext; + }, + + /** + * @param {object} currentContext + * @return {object} + * @private + */ + _processChildContext: function (currentContext) { + var Component = this._currentElement.type; + var inst = this._instance; + var childContext; + + if (inst.getChildContext) { + if (true) { + ReactInstrumentation.debugTool.onBeginProcessingChildContext(); + try { + childContext = inst.getChildContext(); + } finally { + ReactInstrumentation.debugTool.onEndProcessingChildContext(); + } + } else { + childContext = inst.getChildContext(); + } + } + + if (childContext) { + !(typeof Component.childContextTypes === 'object') + ? true + ? invariant( + false, + '%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().', + this.getName() || 'ReactCompositeComponent', + ) + : _prodInvariant('107', this.getName() || 'ReactCompositeComponent') + : void 0; + if (true) { + this._checkContextTypes(Component.childContextTypes, childContext, 'childContext'); + } + for (var name in childContext) { + !(name in Component.childContextTypes) + ? true + ? invariant( + false, + '%s.getChildContext(): key "%s" is not defined in childContextTypes.', + this.getName() || 'ReactCompositeComponent', + name, + ) + : _prodInvariant('108', this.getName() || 'ReactCompositeComponent', name) + : void 0; + } + return _assign({}, currentContext, childContext); + } + return currentContext; + }, + + /** + * Assert that the context types are valid + * + * @param {object} typeSpecs Map of context field to a ReactPropType + * @param {object} values Runtime values that need to be type-checked + * @param {string} location e.g. "prop", "context", "child context" + * @private + */ + _checkContextTypes: function (typeSpecs, values, location) { + if (true) { + checkReactTypeSpec(typeSpecs, values, location, this.getName(), null, this._debugID); + } + }, + + receiveComponent: function (nextElement, transaction, nextContext) { + var prevElement = this._currentElement; + var prevContext = this._context; + + this._pendingElement = null; + + this.updateComponent(transaction, prevElement, nextElement, prevContext, nextContext); + }, + + /** + * If any of `_pendingElement`, `_pendingStateQueue`, or `_pendingForceUpdate` + * is set, update the component. + * + * @param {ReactReconcileTransaction} transaction + * @internal + */ + performUpdateIfNecessary: function (transaction) { + if (this._pendingElement != null) { + ReactReconciler.receiveComponent(this, this._pendingElement, transaction, this._context); + } else if (this._pendingStateQueue !== null || this._pendingForceUpdate) { + this.updateComponent( + transaction, + this._currentElement, + this._currentElement, + this._context, + this._context, + ); + } else { + this._updateBatchNumber = null; + } + }, + + /** + * Perform an update to a mounted component. The componentWillReceiveProps and + * shouldComponentUpdate methods are called, then (assuming the update isn't + * skipped) the remaining update lifecycle methods are called and the DOM + * representation is updated. + * + * By default, this implements React's rendering and reconciliation algorithm. + * Sophisticated clients may wish to override this. + * + * @param {ReactReconcileTransaction} transaction + * @param {ReactElement} prevParentElement + * @param {ReactElement} nextParentElement + * @internal + * @overridable + */ + updateComponent: function ( + transaction, + prevParentElement, + nextParentElement, + prevUnmaskedContext, + nextUnmaskedContext, + ) { + var inst = this._instance; + !(inst != null) + ? true + ? invariant( + false, + 'Attempted to update component `%s` that has already been unmounted (or failed to mount).', + this.getName() || 'ReactCompositeComponent', + ) + : _prodInvariant('136', this.getName() || 'ReactCompositeComponent') + : void 0; + + var willReceive = false; + var nextContext; + + // Determine if the context has changed or not + if (this._context === nextUnmaskedContext) { + nextContext = inst.context; + } else { + nextContext = this._processContext(nextUnmaskedContext); + willReceive = true; + } + + var prevProps = prevParentElement.props; + var nextProps = nextParentElement.props; + + // Not a simple state update but a props update + if (prevParentElement !== nextParentElement) { + willReceive = true; + } + + // An update here will schedule an update but immediately set + // _pendingStateQueue which will ensure that any state updates gets + // immediately reconciled instead of waiting for the next batch. + if (willReceive && inst.componentWillReceiveProps) { + if (true) { + measureLifeCyclePerf( + function () { + return inst.componentWillReceiveProps(nextProps, nextContext); + }, + this._debugID, + 'componentWillReceiveProps', + ); + } else { + inst.componentWillReceiveProps(nextProps, nextContext); + } + } + + var nextState = this._processPendingState(nextProps, nextContext); + var shouldUpdate = true; + + if (!this._pendingForceUpdate) { + if (inst.shouldComponentUpdate) { + if (true) { + shouldUpdate = measureLifeCyclePerf( + function () { + return inst.shouldComponentUpdate(nextProps, nextState, nextContext); + }, + this._debugID, + 'shouldComponentUpdate', + ); + } else { + shouldUpdate = inst.shouldComponentUpdate(nextProps, nextState, nextContext); + } + } else { + if (this._compositeType === CompositeTypes.PureClass) { + shouldUpdate = !shallowEqual(prevProps, nextProps) || !shallowEqual(inst.state, nextState); + } + } + } + + if (true) { + true + ? warning( + shouldUpdate !== undefined, + '%s.shouldComponentUpdate(): Returned undefined instead of a ' + + 'boolean value. Make sure to return true or false.', + this.getName() || 'ReactCompositeComponent', + ) + : void 0; + } + + this._updateBatchNumber = null; + if (shouldUpdate) { + this._pendingForceUpdate = false; + // Will set `this.props`, `this.state` and `this.context`. + this._performComponentUpdate( + nextParentElement, + nextProps, + nextState, + nextContext, + transaction, + nextUnmaskedContext, + ); + } else { + // If it's determined that a component should not update, we still want + // to set props and state but we shortcut the rest of the update. + this._currentElement = nextParentElement; + this._context = nextUnmaskedContext; + inst.props = nextProps; + inst.state = nextState; + inst.context = nextContext; + } + }, + + _processPendingState: function (props, context) { + var inst = this._instance; + var queue = this._pendingStateQueue; + var replace = this._pendingReplaceState; + this._pendingReplaceState = false; + this._pendingStateQueue = null; + + if (!queue) { + return inst.state; + } + + if (replace && queue.length === 1) { + return queue[0]; + } + + var nextState = _assign({}, replace ? queue[0] : inst.state); + for (var i = replace ? 1 : 0; i < queue.length; i++) { + var partial = queue[i]; + _assign( + nextState, + typeof partial === 'function' ? partial.call(inst, nextState, props, context) : partial, + ); + } + + return nextState; + }, + + /** + * Merges new props and state, notifies delegate methods of update and + * performs update. + * + * @param {ReactElement} nextElement Next element + * @param {object} nextProps Next public object to set as properties. + * @param {?object} nextState Next object to set as state. + * @param {?object} nextContext Next public object to set as context. + * @param {ReactReconcileTransaction} transaction + * @param {?object} unmaskedContext + * @private + */ + _performComponentUpdate: function ( + nextElement, + nextProps, + nextState, + nextContext, + transaction, + unmaskedContext, + ) { + var _this2 = this; + + var inst = this._instance; + + var hasComponentDidUpdate = Boolean(inst.componentDidUpdate); + var prevProps; + var prevState; + var prevContext; + if (hasComponentDidUpdate) { + prevProps = inst.props; + prevState = inst.state; + prevContext = inst.context; + } + + if (inst.componentWillUpdate) { + if (true) { + measureLifeCyclePerf( + function () { + return inst.componentWillUpdate(nextProps, nextState, nextContext); + }, + this._debugID, + 'componentWillUpdate', + ); + } else { + inst.componentWillUpdate(nextProps, nextState, nextContext); + } + } + + this._currentElement = nextElement; + this._context = unmaskedContext; + inst.props = nextProps; + inst.state = nextState; + inst.context = nextContext; + + this._updateRenderedComponent(transaction, unmaskedContext); + + if (hasComponentDidUpdate) { + if (true) { + transaction.getReactMountReady().enqueue(function () { + measureLifeCyclePerf( + inst.componentDidUpdate.bind(inst, prevProps, prevState, prevContext), + _this2._debugID, + 'componentDidUpdate', + ); + }); + } else { + transaction + .getReactMountReady() + .enqueue(inst.componentDidUpdate.bind(inst, prevProps, prevState, prevContext), inst); + } + } + }, + + /** + * Call the component's `render` method and update the DOM accordingly. + * + * @param {ReactReconcileTransaction} transaction + * @internal + */ + _updateRenderedComponent: function (transaction, context) { + var prevComponentInstance = this._renderedComponent; + var prevRenderedElement = prevComponentInstance._currentElement; + var nextRenderedElement = this._renderValidatedComponent(); + + var debugID = 0; + if (true) { + debugID = this._debugID; + } + + if (shouldUpdateReactComponent(prevRenderedElement, nextRenderedElement)) { + ReactReconciler.receiveComponent( + prevComponentInstance, + nextRenderedElement, + transaction, + this._processChildContext(context), + ); + } else { + var oldHostNode = ReactReconciler.getHostNode(prevComponentInstance); + ReactReconciler.unmountComponent(prevComponentInstance, false); + + var nodeType = ReactNodeTypes.getType(nextRenderedElement); + this._renderedNodeType = nodeType; + var child = this._instantiateReactComponent( + nextRenderedElement, + nodeType !== ReactNodeTypes.EMPTY /* shouldHaveDebugID */, + ); + this._renderedComponent = child; + + var nextMarkup = ReactReconciler.mountComponent( + child, + transaction, + this._hostParent, + this._hostContainerInfo, + this._processChildContext(context), + debugID, + ); + + if (true) { + if (debugID !== 0) { + var childDebugIDs = child._debugID !== 0 ? [child._debugID] : []; + ReactInstrumentation.debugTool.onSetChildren(debugID, childDebugIDs); + } + } + + this._replaceNodeWithMarkup(oldHostNode, nextMarkup, prevComponentInstance); + } + }, + + /** + * Overridden in shallow rendering. + * + * @protected + */ + _replaceNodeWithMarkup: function (oldHostNode, nextMarkup, prevInstance) { + ReactComponentEnvironment.replaceNodeWithMarkup(oldHostNode, nextMarkup, prevInstance); + }, + + /** + * @protected + */ + _renderValidatedComponentWithoutOwnerOrContext: function () { + var inst = this._instance; + var renderedElement; + + if (true) { + renderedElement = measureLifeCyclePerf( + function () { + return inst.render(); + }, + this._debugID, + 'render', + ); + } else { + renderedElement = inst.render(); + } + + if (true) { + // We allow auto-mocks to proceed as if they're returning null. + if (renderedElement === undefined && inst.render._isMockFunction) { + // This is probably bad practice. Consider warning here and + // deprecating this convenience. + renderedElement = null; + } + } + + return renderedElement; + }, + + /** + * @private + */ + _renderValidatedComponent: function () { + var renderedElement; + if (true) { + ReactCurrentOwner.current = this; + try { + renderedElement = this._renderValidatedComponentWithoutOwnerOrContext(); + } finally { + ReactCurrentOwner.current = null; + } + } else { + renderedElement = this._renderValidatedComponentWithoutOwnerOrContext(); + } + !( + // TODO: An `isValidNode` function would probably be more appropriate + (renderedElement === null || renderedElement === false || React.isValidElement(renderedElement)) + ) + ? true + ? invariant( + false, + '%s.render(): A valid React element (or null) must be returned. You may have returned undefined, an array or some other invalid object.', + this.getName() || 'ReactCompositeComponent', + ) + : _prodInvariant('109', this.getName() || 'ReactCompositeComponent') + : void 0; + + return renderedElement; + }, + + /** + * Lazily allocates the refs object and stores `component` as `ref`. + * + * @param {string} ref Reference name. + * @param {component} component Component to store as `ref`. + * @final + * @private + */ + attachRef: function (ref, component) { + var inst = this.getPublicInstance(); + !(inst != null) + ? true + ? invariant(false, 'Stateless function components cannot have refs.') + : _prodInvariant('110') + : void 0; + var publicComponentInstance = component.getPublicInstance(); + if (true) { + var componentName = component && component.getName ? component.getName() : 'a component'; + true + ? warning( + publicComponentInstance != null || + component._compositeType !== CompositeTypes.StatelessFunctional, + 'Stateless function components cannot be given refs ' + + '(See ref "%s" in %s created by %s). ' + + 'Attempts to access this ref will fail.', + ref, + componentName, + this.getName(), + ) + : void 0; + } + var refs = inst.refs === emptyObject ? (inst.refs = {}) : inst.refs; + refs[ref] = publicComponentInstance; + }, + + /** + * Detaches a reference name. + * + * @param {string} ref Name to dereference. + * @final + * @private + */ + detachRef: function (ref) { + var refs = this.getPublicInstance().refs; + delete refs[ref]; + }, + + /** + * Get a text description of the component that can be used to identify it + * in error messages. + * @return {string} The name or null. + * @internal + */ + getName: function () { + var type = this._currentElement.type; + var constructor = this._instance && this._instance.constructor; + return ( + type.displayName || + (constructor && constructor.displayName) || + type.name || + (constructor && constructor.name) || + null + ); + }, + + /** + * Get the publicly accessible representation of this component - i.e. what + * is exposed by refs and returned by render. Can be null for stateless + * components. + * + * @return {ReactComponent} the public component instance. + * @internal + */ + getPublicInstance: function () { + var inst = this._instance; + if (this._compositeType === CompositeTypes.StatelessFunctional) { + return null; + } + return inst; + }, + + // Stub + _instantiateReactComponent: null, + }; + + module.exports = ReactCompositeComponent; + + /***/ + }, + /* 311 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var ReactDOMComponentFlags = { + hasCachedChildNodes: 1 << 0, + }; + + module.exports = ReactDOMComponentFlags; + + /***/ + }, + /* 312 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var validateDOMNesting = __webpack_require__(212); + + var DOC_NODE_TYPE = 9; + + function ReactDOMContainerInfo(topLevelWrapper, node) { + var info = { + _topLevelWrapper: topLevelWrapper, + _idCounter: 1, + _ownerDocument: node ? (node.nodeType === DOC_NODE_TYPE ? node : node.ownerDocument) : null, + _node: node, + _tag: node ? node.nodeName.toLowerCase() : null, + _namespaceURI: node ? node.namespaceURI : null, + }; + if (true) { + info._ancestorInfo = node ? validateDOMNesting.updatedAncestorInfo(null, info._tag, null) : null; + } + return info; + } + + module.exports = ReactDOMContainerInfo; + + /***/ + }, + /* 313 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var _assign = __webpack_require__(8); + + var LinkedValueUtils = __webpack_require__(199); + var ReactDOMComponentTree = __webpack_require__(13); + var ReactUpdates = __webpack_require__(34); + + var warning = __webpack_require__(3); + + var didWarnValueLink = false; + var didWarnValueDefaultValue = false; + + function updateOptionsIfPendingUpdateAndMounted() { + if (this._rootNodeID && this._wrapperState.pendingUpdate) { + this._wrapperState.pendingUpdate = false; + + var props = this._currentElement.props; + var value = LinkedValueUtils.getValue(props); + + if (value != null) { + updateOptions(this, Boolean(props.multiple), value); + } + } + } + + function getDeclarationErrorAddendum(owner) { + if (owner) { + var name = owner.getName(); + if (name) { + return ' Check the render method of `' + name + '`.'; + } + } + return ''; + } + + var valuePropNames = ['value', 'defaultValue']; + + /** + * Validation function for `value` and `defaultValue`. + * @private + */ + function checkSelectPropTypes(inst, props) { + var owner = inst._currentElement._owner; + LinkedValueUtils.checkPropTypes('select', props, owner); + + if (props.valueLink !== undefined && !didWarnValueLink) { + true + ? warning( + false, + '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.', + ) + : void 0; + didWarnValueLink = true; + } + + for (var i = 0; i < valuePropNames.length; i++) { + var propName = valuePropNames[i]; + if (props[propName] == null) { + continue; + } + var isArray = Array.isArray(props[propName]); + if (props.multiple && !isArray) { + true + ? warning( + false, + 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', + propName, + getDeclarationErrorAddendum(owner), + ) + : void 0; + } else if (!props.multiple && isArray) { + true + ? warning( + false, + 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', + propName, + getDeclarationErrorAddendum(owner), + ) + : void 0; + } + } + } + + /** + * @param {ReactDOMComponent} inst + * @param {boolean} multiple + * @param {*} propValue A stringable (with `multiple`, a list of stringables). + * @private + */ + function updateOptions(inst, multiple, propValue) { + var selectedValue, i; + var options = ReactDOMComponentTree.getNodeFromInstance(inst).options; + + if (multiple) { + selectedValue = {}; + for (i = 0; i < propValue.length; i++) { + selectedValue['' + propValue[i]] = true; + } + for (i = 0; i < options.length; i++) { + var selected = selectedValue.hasOwnProperty(options[i].value); + if (options[i].selected !== selected) { + options[i].selected = selected; + } + } + } else { + // Do not set `select.value` as exact behavior isn't consistent across all + // browsers for all cases. + selectedValue = '' + propValue; + for (i = 0; i < options.length; i++) { + if (options[i].value === selectedValue) { + options[i].selected = true; + return; + } + } + if (options.length) { + options[0].selected = true; + } + } + } + + /** + * Implements a <select> host component that allows optionally setting the + * props `value` and `defaultValue`. If `multiple` is false, the prop must be a + * stringable. If `multiple` is true, the prop must be an array of stringables. + * + * If `value` is not supplied (or null/undefined), user actions that change the + * selected option will trigger updates to the rendered options. + * + * If it is supplied (and not null/undefined), the rendered options will not + * update in response to user actions. Instead, the `value` prop must change in + * order for the rendered options to update. + * + * If `defaultValue` is provided, any options with the supplied values will be + * selected. + */ + var ReactDOMSelect = { + getHostProps: function (inst, props) { + return _assign({}, props, { + onChange: inst._wrapperState.onChange, + value: undefined, + }); + }, + + mountWrapper: function (inst, props) { + if (true) { + checkSelectPropTypes(inst, props); + } + + var value = LinkedValueUtils.getValue(props); + inst._wrapperState = { + pendingUpdate: false, + initialValue: value != null ? value : props.defaultValue, + listeners: null, + onChange: _handleChange.bind(inst), + wasMultiple: Boolean(props.multiple), + }; + + if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue) { + true + ? warning( + false, + 'Select elements must be either controlled or uncontrolled ' + + '(specify either the value prop, or the defaultValue prop, but not ' + + 'both). Decide between using a controlled or uncontrolled select ' + + 'element and remove one of these props. More info: ' + + 'https://fb.me/react-controlled-components', + ) + : void 0; + didWarnValueDefaultValue = true; + } + }, + + getSelectValueContext: function (inst) { + // ReactDOMOption looks at this initial value so the initial generated + // markup has correct `selected` attributes + return inst._wrapperState.initialValue; + }, + + postUpdateWrapper: function (inst) { + var props = inst._currentElement.props; + + // After the initial mount, we control selected-ness manually so don't pass + // this value down + inst._wrapperState.initialValue = undefined; + + var wasMultiple = inst._wrapperState.wasMultiple; + inst._wrapperState.wasMultiple = Boolean(props.multiple); + + var value = LinkedValueUtils.getValue(props); + if (value != null) { + inst._wrapperState.pendingUpdate = false; + updateOptions(inst, Boolean(props.multiple), value); + } else if (wasMultiple !== Boolean(props.multiple)) { + // For simplicity, reapply `defaultValue` if `multiple` is toggled. + if (props.defaultValue != null) { + updateOptions(inst, Boolean(props.multiple), props.defaultValue); + } else { + // Revert the select back to its default unselected state. + updateOptions(inst, Boolean(props.multiple), props.multiple ? [] : ''); + } + } + }, + }; + + function _handleChange(event) { + var props = this._currentElement.props; + var returnValue = LinkedValueUtils.executeOnChange(props, event); + + if (this._rootNodeID) { + this._wrapperState.pendingUpdate = true; + } + ReactUpdates.asap(updateOptionsIfPendingUpdateAndMounted, this); + return returnValue; + } + + module.exports = ReactDOMSelect; + + /***/ + }, + /* 314 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2016-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + var ReactInvalidSetStateWarningHook = __webpack_require__(751); + var ReactHostOperationHistoryHook = __webpack_require__(749); + var ReactComponentTreeHook = __webpack_require__(19); + var ExecutionEnvironment = __webpack_require__(14); + + var performanceNow = __webpack_require__(662); + var warning = __webpack_require__(3); + + var hooks = []; + var didHookThrowForEvent = {}; + + function callHook(event, fn, context, arg1, arg2, arg3, arg4, arg5) { + try { + fn.call(context, arg1, arg2, arg3, arg4, arg5); + } catch (e) { + true + ? warning( + didHookThrowForEvent[event], + 'Exception thrown by hook while handling %s: %s', + event, + e + '\n' + e.stack, + ) + : void 0; + didHookThrowForEvent[event] = true; + } + } + + function emitEvent(event, arg1, arg2, arg3, arg4, arg5) { + for (var i = 0; i < hooks.length; i++) { + var hook = hooks[i]; + var fn = hook[event]; + if (fn) { + callHook(event, fn, hook, arg1, arg2, arg3, arg4, arg5); + } + } + } + + var isProfiling = false; + var flushHistory = []; + var lifeCycleTimerStack = []; + var currentFlushNesting = 0; + var currentFlushMeasurements = []; + var currentFlushStartTime = 0; + var currentTimerDebugID = null; + var currentTimerStartTime = 0; + var currentTimerNestedFlushDuration = 0; + var currentTimerType = null; + + var lifeCycleTimerHasWarned = false; + + function clearHistory() { + ReactComponentTreeHook.purgeUnmountedComponents(); + ReactHostOperationHistoryHook.clearHistory(); + } + + function getTreeSnapshot(registeredIDs) { + return registeredIDs.reduce(function (tree, id) { + var ownerID = ReactComponentTreeHook.getOwnerID(id); + var parentID = ReactComponentTreeHook.getParentID(id); + tree[id] = { + displayName: ReactComponentTreeHook.getDisplayName(id), + text: ReactComponentTreeHook.getText(id), + updateCount: ReactComponentTreeHook.getUpdateCount(id), + childIDs: ReactComponentTreeHook.getChildIDs(id), + // Text nodes don't have owners but this is close enough. + ownerID: ownerID || (parentID && ReactComponentTreeHook.getOwnerID(parentID)) || 0, + parentID: parentID, + }; + return tree; + }, {}); + } + + function resetMeasurements() { + var previousStartTime = currentFlushStartTime; + var previousMeasurements = currentFlushMeasurements; + var previousOperations = ReactHostOperationHistoryHook.getHistory(); + + if (currentFlushNesting === 0) { + currentFlushStartTime = 0; + currentFlushMeasurements = []; + clearHistory(); + return; + } + + if (previousMeasurements.length || previousOperations.length) { + var registeredIDs = ReactComponentTreeHook.getRegisteredIDs(); + flushHistory.push({ + duration: performanceNow() - previousStartTime, + measurements: previousMeasurements || [], + operations: previousOperations || [], + treeSnapshot: getTreeSnapshot(registeredIDs), + }); + } + + clearHistory(); + currentFlushStartTime = performanceNow(); + currentFlushMeasurements = []; + } + + function checkDebugID(debugID) { + var allowRoot = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + + if (allowRoot && debugID === 0) { + return; + } + if (!debugID) { + true ? warning(false, 'ReactDebugTool: debugID may not be empty.') : void 0; + } + } + + function beginLifeCycleTimer(debugID, timerType) { + if (currentFlushNesting === 0) { + return; + } + if (currentTimerType && !lifeCycleTimerHasWarned) { + true + ? warning( + false, + 'There is an internal error in the React performance measurement code. ' + + 'Did not expect %s timer to start while %s timer is still in ' + + 'progress for %s instance.', + timerType, + currentTimerType || 'no', + debugID === currentTimerDebugID ? 'the same' : 'another', + ) + : void 0; + lifeCycleTimerHasWarned = true; + } + currentTimerStartTime = performanceNow(); + currentTimerNestedFlushDuration = 0; + currentTimerDebugID = debugID; + currentTimerType = timerType; + } + + function endLifeCycleTimer(debugID, timerType) { + if (currentFlushNesting === 0) { + return; + } + if (currentTimerType !== timerType && !lifeCycleTimerHasWarned) { + true + ? warning( + false, + 'There is an internal error in the React performance measurement code. ' + + 'We did not expect %s timer to stop while %s timer is still in ' + + 'progress for %s instance. Please report this as a bug in React.', + timerType, + currentTimerType || 'no', + debugID === currentTimerDebugID ? 'the same' : 'another', + ) + : void 0; + lifeCycleTimerHasWarned = true; + } + if (isProfiling) { + currentFlushMeasurements.push({ + timerType: timerType, + instanceID: debugID, + duration: performanceNow() - currentTimerStartTime - currentTimerNestedFlushDuration, + }); + } + currentTimerStartTime = 0; + currentTimerNestedFlushDuration = 0; + currentTimerDebugID = null; + currentTimerType = null; + } + + function pauseCurrentLifeCycleTimer() { + var currentTimer = { + startTime: currentTimerStartTime, + nestedFlushStartTime: performanceNow(), + debugID: currentTimerDebugID, + timerType: currentTimerType, + }; + lifeCycleTimerStack.push(currentTimer); + currentTimerStartTime = 0; + currentTimerNestedFlushDuration = 0; + currentTimerDebugID = null; + currentTimerType = null; + } + + function resumeCurrentLifeCycleTimer() { + var _lifeCycleTimerStack$ = lifeCycleTimerStack.pop(), + startTime = _lifeCycleTimerStack$.startTime, + nestedFlushStartTime = _lifeCycleTimerStack$.nestedFlushStartTime, + debugID = _lifeCycleTimerStack$.debugID, + timerType = _lifeCycleTimerStack$.timerType; + + var nestedFlushDuration = performanceNow() - nestedFlushStartTime; + currentTimerStartTime = startTime; + currentTimerNestedFlushDuration += nestedFlushDuration; + currentTimerDebugID = debugID; + currentTimerType = timerType; + } + + var lastMarkTimeStamp = 0; + var canUsePerformanceMeasure = + // $FlowFixMe https://github.com/facebook/flow/issues/2345 + typeof performance !== 'undefined' && + typeof performance.mark === 'function' && + typeof performance.clearMarks === 'function' && + typeof performance.measure === 'function' && + typeof performance.clearMeasures === 'function'; + + function shouldMark(debugID) { + if (!isProfiling || !canUsePerformanceMeasure) { + return false; + } + var element = ReactComponentTreeHook.getElement(debugID); + if (element == null || typeof element !== 'object') { + return false; + } + var isHostElement = typeof element.type === 'string'; + if (isHostElement) { + return false; + } + return true; + } + + function markBegin(debugID, markType) { + if (!shouldMark(debugID)) { + return; + } + + var markName = debugID + '::' + markType; + lastMarkTimeStamp = performanceNow(); + performance.mark(markName); + } + + function markEnd(debugID, markType) { + if (!shouldMark(debugID)) { + return; + } + + var markName = debugID + '::' + markType; + var displayName = ReactComponentTreeHook.getDisplayName(debugID) || 'Unknown'; + + // Chrome has an issue of dropping markers recorded too fast: + // https://bugs.chromium.org/p/chromium/issues/detail?id=640652 + // To work around this, we will not report very small measurements. + // I determined the magic number by tweaking it back and forth. + // 0.05ms was enough to prevent the issue, but I set it to 0.1ms to be safe. + // When the bug is fixed, we can `measure()` unconditionally if we want to. + var timeStamp = performanceNow(); + if (timeStamp - lastMarkTimeStamp > 0.1) { + var measurementName = displayName + ' [' + markType + ']'; + performance.measure(measurementName, markName); + } + + performance.clearMarks(markName); + performance.clearMeasures(measurementName); + } + + var ReactDebugTool = { + addHook: function (hook) { + hooks.push(hook); + }, + removeHook: function (hook) { + for (var i = 0; i < hooks.length; i++) { + if (hooks[i] === hook) { + hooks.splice(i, 1); + i--; + } + } + }, + isProfiling: function () { + return isProfiling; + }, + beginProfiling: function () { + if (isProfiling) { + return; + } + + isProfiling = true; + flushHistory.length = 0; + resetMeasurements(); + ReactDebugTool.addHook(ReactHostOperationHistoryHook); + }, + endProfiling: function () { + if (!isProfiling) { + return; + } + + isProfiling = false; + resetMeasurements(); + ReactDebugTool.removeHook(ReactHostOperationHistoryHook); + }, + getFlushHistory: function () { + return flushHistory; + }, + onBeginFlush: function () { + currentFlushNesting++; + resetMeasurements(); + pauseCurrentLifeCycleTimer(); + emitEvent('onBeginFlush'); + }, + onEndFlush: function () { + resetMeasurements(); + currentFlushNesting--; + resumeCurrentLifeCycleTimer(); + emitEvent('onEndFlush'); + }, + onBeginLifeCycleTimer: function (debugID, timerType) { + checkDebugID(debugID); + emitEvent('onBeginLifeCycleTimer', debugID, timerType); + markBegin(debugID, timerType); + beginLifeCycleTimer(debugID, timerType); + }, + onEndLifeCycleTimer: function (debugID, timerType) { + checkDebugID(debugID); + endLifeCycleTimer(debugID, timerType); + markEnd(debugID, timerType); + emitEvent('onEndLifeCycleTimer', debugID, timerType); + }, + onBeginProcessingChildContext: function () { + emitEvent('onBeginProcessingChildContext'); + }, + onEndProcessingChildContext: function () { + emitEvent('onEndProcessingChildContext'); + }, + onHostOperation: function (operation) { + checkDebugID(operation.instanceID); + emitEvent('onHostOperation', operation); + }, + onSetState: function () { + emitEvent('onSetState'); + }, + onSetChildren: function (debugID, childDebugIDs) { + checkDebugID(debugID); + childDebugIDs.forEach(checkDebugID); + emitEvent('onSetChildren', debugID, childDebugIDs); + }, + onBeforeMountComponent: function (debugID, element, parentDebugID) { + checkDebugID(debugID); + checkDebugID(parentDebugID, true); + emitEvent('onBeforeMountComponent', debugID, element, parentDebugID); + markBegin(debugID, 'mount'); + }, + onMountComponent: function (debugID) { + checkDebugID(debugID); + markEnd(debugID, 'mount'); + emitEvent('onMountComponent', debugID); + }, + onBeforeUpdateComponent: function (debugID, element) { + checkDebugID(debugID); + emitEvent('onBeforeUpdateComponent', debugID, element); + markBegin(debugID, 'update'); + }, + onUpdateComponent: function (debugID) { + checkDebugID(debugID); + markEnd(debugID, 'update'); + emitEvent('onUpdateComponent', debugID); + }, + onBeforeUnmountComponent: function (debugID) { + checkDebugID(debugID); + emitEvent('onBeforeUnmountComponent', debugID); + markBegin(debugID, 'unmount'); + }, + onUnmountComponent: function (debugID) { + checkDebugID(debugID); + markEnd(debugID, 'unmount'); + emitEvent('onUnmountComponent', debugID); + }, + onTestEvent: function () { + emitEvent('onTestEvent'); + }, + }; + + // TODO remove these when RN/www gets updated + ReactDebugTool.addDevtool = ReactDebugTool.addHook; + ReactDebugTool.removeDevtool = ReactDebugTool.removeHook; + + ReactDebugTool.addHook(ReactInvalidSetStateWarningHook); + ReactDebugTool.addHook(ReactComponentTreeHook); + var url = (ExecutionEnvironment.canUseDOM && window.location.href) || ''; + if (/[?&]react_perf\b/.test(url)) { + ReactDebugTool.beginProfiling(); + } + + module.exports = ReactDebugTool; + + /***/ + }, + /* 315 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var _assign = __webpack_require__(8); + + var ReactUpdates = __webpack_require__(34); + var Transaction = __webpack_require__(142); + + var emptyFunction = __webpack_require__(40); + + var RESET_BATCHED_UPDATES = { + initialize: emptyFunction, + close: function () { + ReactDefaultBatchingStrategy.isBatchingUpdates = false; + }, + }; + + var FLUSH_BATCHED_UPDATES = { + initialize: emptyFunction, + close: ReactUpdates.flushBatchedUpdates.bind(ReactUpdates), + }; + + var TRANSACTION_WRAPPERS = [FLUSH_BATCHED_UPDATES, RESET_BATCHED_UPDATES]; + + function ReactDefaultBatchingStrategyTransaction() { + this.reinitializeTransaction(); + } + + _assign(ReactDefaultBatchingStrategyTransaction.prototype, Transaction, { + getTransactionWrappers: function () { + return TRANSACTION_WRAPPERS; + }, + }); + + var transaction = new ReactDefaultBatchingStrategyTransaction(); + + var ReactDefaultBatchingStrategy = { + isBatchingUpdates: false, + + /** + * Call the provided function in a context within which calls to `setState` + * and friends are batched such that components aren't updated unnecessarily. + */ + batchedUpdates: function (callback, a, b, c, d, e) { + var alreadyBatchingUpdates = ReactDefaultBatchingStrategy.isBatchingUpdates; + + ReactDefaultBatchingStrategy.isBatchingUpdates = true; + + // The code is written this way to avoid extra allocations + if (alreadyBatchingUpdates) { + return callback(a, b, c, d, e); + } else { + return transaction.perform(callback, null, a, b, c, d, e); + } + }, + }; + + module.exports = ReactDefaultBatchingStrategy; + + /***/ + }, + /* 316 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2014-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var emptyComponentFactory; + + var ReactEmptyComponentInjection = { + injectEmptyComponentFactory: function (factory) { + emptyComponentFactory = factory; + }, + }; + + var ReactEmptyComponent = { + create: function (instantiate) { + return emptyComponentFactory(instantiate); + }, + }; + + ReactEmptyComponent.injection = ReactEmptyComponentInjection; + + module.exports = ReactEmptyComponent; + + /***/ + }, + /* 317 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + var ReactFeatureFlags = { + // When true, call console.time() before and .timeEnd() after each top-level + // render (both initial renders and updates). Useful when looking at prod-mode + // timeline profiles in Chrome, for example. + logTopLevelRenders: false, + }; + + module.exports = ReactFeatureFlags; + + /***/ + }, + /* 318 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2014-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var _prodInvariant = __webpack_require__(5); + + var invariant = __webpack_require__(2); + + var genericComponentClass = null; + var textComponentClass = null; + + var ReactHostComponentInjection = { + // This accepts a class that receives the tag string. This is a catch all + // that can render any kind of tag. + injectGenericComponentClass: function (componentClass) { + genericComponentClass = componentClass; + }, + // This accepts a text component class that takes the text string to be + // rendered as props. + injectTextComponentClass: function (componentClass) { + textComponentClass = componentClass; + }, + }; + + /** + * Get a host internal component class for a specific tag. + * + * @param {ReactElement} element The element to create. + * @return {function} The internal class constructor function. + */ + function createInternalComponent(element) { + !genericComponentClass + ? true + ? invariant(false, 'There is no registered component for the tag %s', element.type) + : _prodInvariant('111', element.type) + : void 0; + return new genericComponentClass(element); + } + + /** + * @param {ReactText} text + * @return {ReactComponent} + */ + function createInstanceForText(text) { + return new textComponentClass(text); + } + + /** + * @param {ReactComponent} component + * @return {boolean} + */ + function isTextComponent(component) { + return component instanceof textComponentClass; + } + + var ReactHostComponent = { + createInternalComponent: createInternalComponent, + createInstanceForText: createInstanceForText, + isTextComponent: isTextComponent, + injection: ReactHostComponentInjection, + }; + + module.exports = ReactHostComponent; + + /***/ + }, + /* 319 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var ReactDOMSelection = __webpack_require__(740); + + var containsNode = __webpack_require__(651); + var focusNode = __webpack_require__(290); + var getActiveElement = __webpack_require__(291); + + function isInDocument(node) { + return containsNode(document.documentElement, node); + } + + /** + * @ReactInputSelection: React input selection module. Based on Selection.js, + * but modified to be suitable for react and has a couple of bug fixes (doesn't + * assume buttons have range selections allowed). + * Input selection module for React. + */ + var ReactInputSelection = { + hasSelectionCapabilities: function (elem) { + var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase(); + return ( + nodeName && + ((nodeName === 'input' && elem.type === 'text') || + nodeName === 'textarea' || + elem.contentEditable === 'true') + ); + }, + + getSelectionInformation: function () { + var focusedElem = getActiveElement(); + return { + focusedElem: focusedElem, + selectionRange: ReactInputSelection.hasSelectionCapabilities(focusedElem) + ? ReactInputSelection.getSelection(focusedElem) + : null, + }; + }, + + /** + * @restoreSelection: If any selection information was potentially lost, + * restore it. This is useful when performing operations that could remove dom + * nodes and place them back in, resulting in focus being lost. + */ + restoreSelection: function (priorSelectionInformation) { + var curFocusedElem = getActiveElement(); + var priorFocusedElem = priorSelectionInformation.focusedElem; + var priorSelectionRange = priorSelectionInformation.selectionRange; + if (curFocusedElem !== priorFocusedElem && isInDocument(priorFocusedElem)) { + if (ReactInputSelection.hasSelectionCapabilities(priorFocusedElem)) { + ReactInputSelection.setSelection(priorFocusedElem, priorSelectionRange); + } + focusNode(priorFocusedElem); + } + }, + + /** + * @getSelection: Gets the selection bounds of a focused textarea, input or + * contentEditable node. + * -@input: Look up selection bounds of this input + * -@return {start: selectionStart, end: selectionEnd} + */ + getSelection: function (input) { + var selection; + + if ('selectionStart' in input) { + // Modern browser with input or textarea. + selection = { + start: input.selectionStart, + end: input.selectionEnd, + }; + } else if (document.selection && input.nodeName && input.nodeName.toLowerCase() === 'input') { + // IE8 input. + var range = document.selection.createRange(); + // There can only be one selection per document in IE, so it must + // be in our element. + if (range.parentElement() === input) { + selection = { + start: -range.moveStart('character', -input.value.length), + end: -range.moveEnd('character', -input.value.length), + }; + } + } else { + // Content editable or old IE textarea. + selection = ReactDOMSelection.getOffsets(input); + } + + return selection || { start: 0, end: 0 }; + }, + + /** + * @setSelection: Sets the selection bounds of a textarea or input and focuses + * the input. + * -@input Set selection bounds of this input or textarea + * -@offsets Object of same form that is returned from get* + */ + setSelection: function (input, offsets) { + var start = offsets.start; + var end = offsets.end; + if (end === undefined) { + end = start; + } + + if ('selectionStart' in input) { + input.selectionStart = start; + input.selectionEnd = Math.min(end, input.value.length); + } else if (document.selection && input.nodeName && input.nodeName.toLowerCase() === 'input') { + var range = input.createTextRange(); + range.collapse(true); + range.moveStart('character', start); + range.moveEnd('character', end - start); + range.select(); + } else { + ReactDOMSelection.setOffsets(input, offsets); + } + }, + }; + + module.exports = ReactInputSelection; + + /***/ + }, + /* 320 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var adler32 = __webpack_require__(776); + + var TAG_END = /\/?>/; + var COMMENT_START = /^<\!\-\-/; + + var ReactMarkupChecksum = { + CHECKSUM_ATTR_NAME: 'data-react-checksum', + + /** + * @param {string} markup Markup string + * @return {string} Markup string with checksum attribute attached + */ + addChecksumToMarkup: function (markup) { + var checksum = adler32(markup); + + // Add checksum (handle both parent tags, comments and self-closing tags) + if (COMMENT_START.test(markup)) { + return markup; + } else { + return markup.replace( + TAG_END, + ' ' + ReactMarkupChecksum.CHECKSUM_ATTR_NAME + '="' + checksum + '"$&', + ); + } + }, + + /** + * @param {string} markup to use + * @param {DOMElement} element root React element + * @returns {boolean} whether or not the markup is the same + */ + canReuseMarkup: function (markup, element) { + var existingChecksum = element.getAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME); + existingChecksum = existingChecksum && parseInt(existingChecksum, 10); + var markupChecksum = adler32(markup); + return markupChecksum === existingChecksum; + }, + }; + + module.exports = ReactMarkupChecksum; + + /***/ + }, + /* 321 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var _prodInvariant = __webpack_require__(5); + + var DOMLazyTree = __webpack_require__(97); + var DOMProperty = __webpack_require__(66); + var React = __webpack_require__(41); + var ReactBrowserEventEmitter = __webpack_require__(116); + var ReactCurrentOwner = __webpack_require__(54); + var ReactDOMComponentTree = __webpack_require__(13); + var ReactDOMContainerInfo = __webpack_require__(312); + var ReactDOMFeatureFlags = __webpack_require__(734); + var ReactFeatureFlags = __webpack_require__(317); + var ReactInstanceMap = __webpack_require__(100); + var ReactInstrumentation = __webpack_require__(33); + var ReactMarkupChecksum = __webpack_require__(320); + var ReactReconciler = __webpack_require__(67); + var ReactUpdateQueue = __webpack_require__(204); + var ReactUpdates = __webpack_require__(34); + + var emptyObject = __webpack_require__(83); + var instantiateReactComponent = __webpack_require__(209); + var invariant = __webpack_require__(2); + var setInnerHTML = __webpack_require__(144); + var shouldUpdateReactComponent = __webpack_require__(211); + var warning = __webpack_require__(3); + + var ATTR_NAME = DOMProperty.ID_ATTRIBUTE_NAME; + var ROOT_ATTR_NAME = DOMProperty.ROOT_ATTRIBUTE_NAME; + + var ELEMENT_NODE_TYPE = 1; + var DOC_NODE_TYPE = 9; + var DOCUMENT_FRAGMENT_NODE_TYPE = 11; + + var instancesByReactRootID = {}; + + /** + * Finds the index of the first character + * that's not common between the two given strings. + * + * @return {number} the index of the character where the strings diverge + */ + function firstDifferenceIndex(string1, string2) { + var minLen = Math.min(string1.length, string2.length); + for (var i = 0; i < minLen; i++) { + if (string1.charAt(i) !== string2.charAt(i)) { + return i; + } + } + return string1.length === string2.length ? -1 : minLen; + } + + /** + * @param {DOMElement|DOMDocument} container DOM element that may contain + * a React component + * @return {?*} DOM element that may have the reactRoot ID, or null. + */ + function getReactRootElementInContainer(container) { + if (!container) { + return null; + } + + if (container.nodeType === DOC_NODE_TYPE) { + return container.documentElement; + } else { + return container.firstChild; + } + } + + function internalGetID(node) { + // If node is something like a window, document, or text node, none of + // which support attributes or a .getAttribute method, gracefully return + // the empty string, as if the attribute were missing. + return (node.getAttribute && node.getAttribute(ATTR_NAME)) || ''; + } + + /** + * Mounts this component and inserts it into the DOM. + * + * @param {ReactComponent} componentInstance The instance to mount. + * @param {DOMElement} container DOM element to mount into. + * @param {ReactReconcileTransaction} transaction + * @param {boolean} shouldReuseMarkup If true, do not insert markup + */ + function mountComponentIntoNode(wrapperInstance, container, transaction, shouldReuseMarkup, context) { + var markerName; + if (ReactFeatureFlags.logTopLevelRenders) { + var wrappedElement = wrapperInstance._currentElement.props.child; + var type = wrappedElement.type; + markerName = 'React mount: ' + (typeof type === 'string' ? type : type.displayName || type.name); + console.time(markerName); + } + + var markup = ReactReconciler.mountComponent( + wrapperInstance, + transaction, + null, + ReactDOMContainerInfo(wrapperInstance, container), + context, + 0 /* parentDebugID */, + ); + + if (markerName) { + console.timeEnd(markerName); + } + + wrapperInstance._renderedComponent._topLevelWrapper = wrapperInstance; + ReactMount._mountImageIntoNode(markup, container, wrapperInstance, shouldReuseMarkup, transaction); + } + + /** + * Batched mount. + * + * @param {ReactComponent} componentInstance The instance to mount. + * @param {DOMElement} container DOM element to mount into. + * @param {boolean} shouldReuseMarkup If true, do not insert markup + */ + function batchedMountComponentIntoNode(componentInstance, container, shouldReuseMarkup, context) { + var transaction = ReactUpdates.ReactReconcileTransaction.getPooled( + /* useCreateElement */ + !shouldReuseMarkup && ReactDOMFeatureFlags.useCreateElement, + ); + transaction.perform( + mountComponentIntoNode, + null, + componentInstance, + container, + transaction, + shouldReuseMarkup, + context, + ); + ReactUpdates.ReactReconcileTransaction.release(transaction); + } + + /** + * Unmounts a component and removes it from the DOM. + * + * @param {ReactComponent} instance React component instance. + * @param {DOMElement} container DOM element to unmount from. + * @final + * @internal + * @see {ReactMount.unmountComponentAtNode} + */ + function unmountComponentFromNode(instance, container, safely) { + if (true) { + ReactInstrumentation.debugTool.onBeginFlush(); + } + ReactReconciler.unmountComponent(instance, safely); + if (true) { + ReactInstrumentation.debugTool.onEndFlush(); + } + + if (container.nodeType === DOC_NODE_TYPE) { + container = container.documentElement; + } + + // http://jsperf.com/emptying-a-node + while (container.lastChild) { + container.removeChild(container.lastChild); + } + } + + /** + * True if the supplied DOM node has a direct React-rendered child that is + * not a React root element. Useful for warning in `render`, + * `unmountComponentAtNode`, etc. + * + * @param {?DOMElement} node The candidate DOM node. + * @return {boolean} True if the DOM element contains a direct child that was + * rendered by React but is not a root element. + * @internal + */ + function hasNonRootReactChild(container) { + var rootEl = getReactRootElementInContainer(container); + if (rootEl) { + var inst = ReactDOMComponentTree.getInstanceFromNode(rootEl); + return !!(inst && inst._hostParent); + } + } + + /** + * True if the supplied DOM node is a React DOM element and + * it has been rendered by another copy of React. + * + * @param {?DOMElement} node The candidate DOM node. + * @return {boolean} True if the DOM has been rendered by another copy of React + * @internal + */ + function nodeIsRenderedByOtherInstance(container) { + var rootEl = getReactRootElementInContainer(container); + return !!(rootEl && isReactNode(rootEl) && !ReactDOMComponentTree.getInstanceFromNode(rootEl)); + } + + /** + * True if the supplied DOM node is a valid node element. + * + * @param {?DOMElement} node The candidate DOM node. + * @return {boolean} True if the DOM is a valid DOM node. + * @internal + */ + function isValidContainer(node) { + return !!( + node && + (node.nodeType === ELEMENT_NODE_TYPE || + node.nodeType === DOC_NODE_TYPE || + node.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE) + ); + } + + /** + * True if the supplied DOM node is a valid React node element. + * + * @param {?DOMElement} node The candidate DOM node. + * @return {boolean} True if the DOM is a valid React DOM node. + * @internal + */ + function isReactNode(node) { + return isValidContainer(node) && (node.hasAttribute(ROOT_ATTR_NAME) || node.hasAttribute(ATTR_NAME)); + } + + function getHostRootInstanceInContainer(container) { + var rootEl = getReactRootElementInContainer(container); + var prevHostInstance = rootEl && ReactDOMComponentTree.getInstanceFromNode(rootEl); + return prevHostInstance && !prevHostInstance._hostParent ? prevHostInstance : null; + } + + function getTopLevelWrapperInContainer(container) { + var root = getHostRootInstanceInContainer(container); + return root ? root._hostContainerInfo._topLevelWrapper : null; + } + + /** + * Temporary (?) hack so that we can store all top-level pending updates on + * composites instead of having to worry about different types of components + * here. + */ + var topLevelRootCounter = 1; + var TopLevelWrapper = function () { + this.rootID = topLevelRootCounter++; + }; + TopLevelWrapper.prototype.isReactComponent = {}; + if (true) { + TopLevelWrapper.displayName = 'TopLevelWrapper'; + } + TopLevelWrapper.prototype.render = function () { + return this.props.child; + }; + TopLevelWrapper.isReactTopLevelWrapper = true; + + /** + * Mounting is the process of initializing a React component by creating its + * representative DOM elements and inserting them into a supplied `container`. + * Any prior content inside `container` is destroyed in the process. + * + * ReactMount.render( + * component, + * document.getElementById('container') + * ); + * + * <div id="container"> <-- Supplied `container`. + * <div data-reactid=".3"> <-- Rendered reactRoot of React + * // ... component. + * </div> + * </div> + * + * Inside of `container`, the first element rendered is the "reactRoot". + */ + var ReactMount = { + TopLevelWrapper: TopLevelWrapper, + + /** + * Used by devtools. The keys are not important. + */ + _instancesByReactRootID: instancesByReactRootID, + + /** + * This is a hook provided to support rendering React components while + * ensuring that the apparent scroll position of its `container` does not + * change. + * + * @param {DOMElement} container The `container` being rendered into. + * @param {function} renderCallback This must be called once to do the render. + */ + scrollMonitor: function (container, renderCallback) { + renderCallback(); + }, + + /** + * Take a component that's already mounted into the DOM and replace its props + * @param {ReactComponent} prevComponent component instance already in the DOM + * @param {ReactElement} nextElement component instance to render + * @param {DOMElement} container container to render into + * @param {?function} callback function triggered on completion + */ + _updateRootComponent: function (prevComponent, nextElement, nextContext, container, callback) { + ReactMount.scrollMonitor(container, function () { + ReactUpdateQueue.enqueueElementInternal(prevComponent, nextElement, nextContext); + if (callback) { + ReactUpdateQueue.enqueueCallbackInternal(prevComponent, callback); + } + }); + + return prevComponent; + }, + + /** + * Render a new component into the DOM. Hooked by hooks! + * + * @param {ReactElement} nextElement element to render + * @param {DOMElement} container container to render into + * @param {boolean} shouldReuseMarkup if we should skip the markup insertion + * @return {ReactComponent} nextComponent + */ + _renderNewRootComponent: function (nextElement, container, shouldReuseMarkup, context) { + // Various parts of our code (such as ReactCompositeComponent's + // _renderValidatedComponent) assume that calls to render aren't nested; + // verify that that's the case. + true + ? warning( + ReactCurrentOwner.current == null, + '_renderNewRootComponent(): Render methods should be a pure function ' + + 'of props and state; triggering nested component updates from ' + + 'render is not allowed. If necessary, trigger nested updates in ' + + 'componentDidUpdate. Check the render method of %s.', + (ReactCurrentOwner.current && ReactCurrentOwner.current.getName()) || + 'ReactCompositeComponent', + ) + : void 0; + + !isValidContainer(container) + ? true + ? invariant(false, '_registerComponent(...): Target container is not a DOM element.') + : _prodInvariant('37') + : void 0; + + ReactBrowserEventEmitter.ensureScrollValueMonitoring(); + var componentInstance = instantiateReactComponent(nextElement, false); + + // The initial render is synchronous but any updates that happen during + // rendering, in componentWillMount or componentDidMount, will be batched + // according to the current batching strategy. + + ReactUpdates.batchedUpdates( + batchedMountComponentIntoNode, + componentInstance, + container, + shouldReuseMarkup, + context, + ); + + var wrapperID = componentInstance._instance.rootID; + instancesByReactRootID[wrapperID] = componentInstance; + + return componentInstance; + }, + + /** + * Renders a React component into the DOM in the supplied `container`. + * + * If the React component was previously rendered into `container`, this will + * perform an update on it and only mutate the DOM as necessary to reflect the + * latest React component. + * + * @param {ReactComponent} parentComponent The conceptual parent of this render tree. + * @param {ReactElement} nextElement Component element to render. + * @param {DOMElement} container DOM element to render into. + * @param {?function} callback function triggered on completion + * @return {ReactComponent} Component instance rendered in `container`. + */ + renderSubtreeIntoContainer: function (parentComponent, nextElement, container, callback) { + !(parentComponent != null && ReactInstanceMap.has(parentComponent)) + ? true + ? invariant(false, 'parentComponent must be a valid React Component') + : _prodInvariant('38') + : void 0; + return ReactMount._renderSubtreeIntoContainer(parentComponent, nextElement, container, callback); + }, + + _renderSubtreeIntoContainer: function (parentComponent, nextElement, container, callback) { + ReactUpdateQueue.validateCallback(callback, 'ReactDOM.render'); + !React.isValidElement(nextElement) + ? true + ? invariant( + false, + 'ReactDOM.render(): Invalid component element.%s', + typeof nextElement === 'string' + ? " Instead of passing a string like 'div', pass " + + "React.createElement('div') or <div />." + : typeof nextElement === 'function' + ? ' Instead of passing a class like Foo, pass ' + 'React.createElement(Foo) or <Foo />.' + : // Check if it quacks like an element + nextElement != null && nextElement.props !== undefined + ? ' This may be caused by unintentionally loading two independent ' + + 'copies of React.' + : '', + ) + : _prodInvariant( + '39', + typeof nextElement === 'string' + ? " Instead of passing a string like 'div', pass " + + "React.createElement('div') or <div />." + : typeof nextElement === 'function' + ? ' Instead of passing a class like Foo, pass ' + 'React.createElement(Foo) or <Foo />.' + : nextElement != null && nextElement.props !== undefined + ? ' This may be caused by unintentionally loading two independent ' + + 'copies of React.' + : '', + ) + : void 0; + + true + ? warning( + !container || !container.tagName || container.tagName.toUpperCase() !== 'BODY', + 'render(): Rendering components directly into document.body is ' + + 'discouraged, since its children are often manipulated by third-party ' + + 'scripts and browser extensions. This may lead to subtle ' + + 'reconciliation issues. Try rendering into a container element created ' + + 'for your app.', + ) + : void 0; + + var nextWrappedElement = React.createElement(TopLevelWrapper, { child: nextElement }); + + var nextContext; + if (parentComponent) { + var parentInst = ReactInstanceMap.get(parentComponent); + nextContext = parentInst._processChildContext(parentInst._context); + } else { + nextContext = emptyObject; + } + + var prevComponent = getTopLevelWrapperInContainer(container); + + if (prevComponent) { + var prevWrappedElement = prevComponent._currentElement; + var prevElement = prevWrappedElement.props.child; + if (shouldUpdateReactComponent(prevElement, nextElement)) { + var publicInst = prevComponent._renderedComponent.getPublicInstance(); + var updatedCallback = + callback && + function () { + callback.call(publicInst); + }; + ReactMount._updateRootComponent( + prevComponent, + nextWrappedElement, + nextContext, + container, + updatedCallback, + ); + return publicInst; + } else { + ReactMount.unmountComponentAtNode(container); + } + } + + var reactRootElement = getReactRootElementInContainer(container); + var containerHasReactMarkup = reactRootElement && !!internalGetID(reactRootElement); + var containerHasNonRootReactChild = hasNonRootReactChild(container); + + if (true) { + true + ? warning( + !containerHasNonRootReactChild, + 'render(...): Replacing React-rendered children with a new root ' + + 'component. If you intended to update the children of this node, ' + + 'you should instead have the existing children update their state ' + + 'and render the new components instead of calling ReactDOM.render.', + ) + : void 0; + + if (!containerHasReactMarkup || reactRootElement.nextSibling) { + var rootElementSibling = reactRootElement; + while (rootElementSibling) { + if (internalGetID(rootElementSibling)) { + true + ? warning( + false, + 'render(): Target node has markup rendered by React, but there ' + + 'are unrelated nodes as well. This is most commonly caused by ' + + 'white-space inserted around server-rendered markup.', + ) + : void 0; + break; + } + rootElementSibling = rootElementSibling.nextSibling; + } + } + } + + var shouldReuseMarkup = containerHasReactMarkup && !prevComponent && !containerHasNonRootReactChild; + var component = ReactMount._renderNewRootComponent( + nextWrappedElement, + container, + shouldReuseMarkup, + nextContext, + )._renderedComponent.getPublicInstance(); + if (callback) { + callback.call(component); + } + return component; + }, + + /** + * Renders a React component into the DOM in the supplied `container`. + * See https://facebook.github.io/react/docs/top-level-api.html#reactdom.render + * + * If the React component was previously rendered into `container`, this will + * perform an update on it and only mutate the DOM as necessary to reflect the + * latest React component. + * + * @param {ReactElement} nextElement Component element to render. + * @param {DOMElement} container DOM element to render into. + * @param {?function} callback function triggered on completion + * @return {ReactComponent} Component instance rendered in `container`. + */ + render: function (nextElement, container, callback) { + return ReactMount._renderSubtreeIntoContainer(null, nextElement, container, callback); + }, + + /** + * Unmounts and destroys the React component rendered in the `container`. + * See https://facebook.github.io/react/docs/top-level-api.html#reactdom.unmountcomponentatnode + * + * @param {DOMElement} container DOM element containing a React component. + * @return {boolean} True if a component was found in and unmounted from + * `container` + */ + unmountComponentAtNode: function (container) { + // Various parts of our code (such as ReactCompositeComponent's + // _renderValidatedComponent) assume that calls to render aren't nested; + // verify that that's the case. (Strictly speaking, unmounting won't cause a + // render but we still don't expect to be in a render call here.) + true + ? warning( + ReactCurrentOwner.current == null, + 'unmountComponentAtNode(): Render methods should be a pure function ' + + 'of props and state; triggering nested component updates from render ' + + 'is not allowed. If necessary, trigger nested updates in ' + + 'componentDidUpdate. Check the render method of %s.', + (ReactCurrentOwner.current && ReactCurrentOwner.current.getName()) || + 'ReactCompositeComponent', + ) + : void 0; + + !isValidContainer(container) + ? true + ? invariant(false, 'unmountComponentAtNode(...): Target container is not a DOM element.') + : _prodInvariant('40') + : void 0; + + if (true) { + true + ? warning( + !nodeIsRenderedByOtherInstance(container), + "unmountComponentAtNode(): The node you're attempting to unmount " + + 'was rendered by another copy of React.', + ) + : void 0; + } + + var prevComponent = getTopLevelWrapperInContainer(container); + if (!prevComponent) { + // Check if the node being unmounted was rendered by React, but isn't a + // root node. + var containerHasNonRootReactChild = hasNonRootReactChild(container); + + // Check if the container itself is a React root node. + var isContainerReactRoot = container.nodeType === 1 && container.hasAttribute(ROOT_ATTR_NAME); + + if (true) { + true + ? warning( + !containerHasNonRootReactChild, + "unmountComponentAtNode(): The node you're attempting to unmount " + + 'was rendered by React and is not a top-level container. %s', + isContainerReactRoot + ? 'You may have accidentally passed in a React root node instead ' + 'of its container.' + : 'Instead, have the parent component update its state and ' + + 'rerender in order to remove this component.', + ) + : void 0; + } + + return false; + } + delete instancesByReactRootID[prevComponent._instance.rootID]; + ReactUpdates.batchedUpdates(unmountComponentFromNode, prevComponent, container, false); + return true; + }, + + _mountImageIntoNode: function (markup, container, instance, shouldReuseMarkup, transaction) { + !isValidContainer(container) + ? true + ? invariant(false, 'mountComponentIntoNode(...): Target container is not valid.') + : _prodInvariant('41') + : void 0; + + if (shouldReuseMarkup) { + var rootElement = getReactRootElementInContainer(container); + if (ReactMarkupChecksum.canReuseMarkup(markup, rootElement)) { + ReactDOMComponentTree.precacheNode(instance, rootElement); + return; + } else { + var checksum = rootElement.getAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME); + rootElement.removeAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME); + + var rootMarkup = rootElement.outerHTML; + rootElement.setAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME, checksum); + + var normalizedMarkup = markup; + if (true) { + // because rootMarkup is retrieved from the DOM, various normalizations + // will have occurred which will not be present in `markup`. Here, + // insert markup into a <div> or <iframe> depending on the container + // type to perform the same normalizations before comparing. + var normalizer; + if (container.nodeType === ELEMENT_NODE_TYPE) { + normalizer = document.createElement('div'); + normalizer.innerHTML = markup; + normalizedMarkup = normalizer.innerHTML; + } else { + normalizer = document.createElement('iframe'); + document.body.appendChild(normalizer); + normalizer.contentDocument.write(markup); + normalizedMarkup = normalizer.contentDocument.documentElement.outerHTML; + document.body.removeChild(normalizer); + } + } + + var diffIndex = firstDifferenceIndex(normalizedMarkup, rootMarkup); + var difference = + ' (client) ' + + normalizedMarkup.substring(diffIndex - 20, diffIndex + 20) + + '\n (server) ' + + rootMarkup.substring(diffIndex - 20, diffIndex + 20); + + !(container.nodeType !== DOC_NODE_TYPE) + ? true + ? invariant( + false, + "You're trying to render a component to the document using server rendering but the checksum was invalid. This usually means you rendered a different component type or props on the client from the one on the server, or your render() methods are impure. React cannot handle this case due to cross-browser quirks by rendering at the document root. You should look for environment dependent code in your components and ensure the props are the same client and server side:\n%s", + difference, + ) + : _prodInvariant('42', difference) + : void 0; + + if (true) { + true + ? warning( + false, + 'React attempted to reuse markup in a container but the ' + + 'checksum was invalid. This generally means that you are ' + + 'using server rendering and the markup generated on the ' + + 'server was not what the client was expecting. React injected ' + + 'new markup to compensate which works but you have lost many ' + + 'of the benefits of server rendering. Instead, figure out ' + + 'why the markup being generated is different on the client ' + + 'or server:\n%s', + difference, + ) + : void 0; + } + } + } + + !(container.nodeType !== DOC_NODE_TYPE) + ? true + ? invariant( + false, + "You're trying to render a component to the document but you didn't use server rendering. We can't do this without using server rendering due to cross-browser quirks. See ReactDOMServer.renderToString() for server rendering.", + ) + : _prodInvariant('43') + : void 0; + + if (transaction.useCreateElement) { + while (container.lastChild) { + container.removeChild(container.lastChild); + } + DOMLazyTree.insertTreeBefore(container, markup, null); + } else { + setInnerHTML(container, markup); + ReactDOMComponentTree.precacheNode(instance, container.firstChild); + } + + if (true) { + var hostNode = ReactDOMComponentTree.getInstanceFromNode(container.firstChild); + if (hostNode._debugID !== 0) { + ReactInstrumentation.debugTool.onHostOperation({ + instanceID: hostNode._debugID, + type: 'mount', + payload: markup.toString(), + }); + } + } + }, + }; + + module.exports = ReactMount; + + /***/ + }, + /* 322 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + var _prodInvariant = __webpack_require__(5); + + var React = __webpack_require__(41); + + var invariant = __webpack_require__(2); + + var ReactNodeTypes = { + HOST: 0, + COMPOSITE: 1, + EMPTY: 2, + + getType: function (node) { + if (node === null || node === false) { + return ReactNodeTypes.EMPTY; + } else if (React.isValidElement(node)) { + if (typeof node.type === 'function') { + return ReactNodeTypes.COMPOSITE; + } else { + return ReactNodeTypes.HOST; + } + } + true ? (true ? invariant(false, 'Unexpected node: %s', node) : _prodInvariant('26', node)) : void 0; + }, + }; + + module.exports = ReactNodeTypes; + + /***/ + }, + /* 323 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; + + module.exports = ReactPropTypesSecret; + + /***/ + }, + /* 324 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2014-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var _assign = __webpack_require__(8); + + var PooledClass = __webpack_require__(85); + var Transaction = __webpack_require__(142); + var ReactInstrumentation = __webpack_require__(33); + var ReactServerUpdateQueue = __webpack_require__(760); + + /** + * Executed within the scope of the `Transaction` instance. Consider these as + * being member methods, but with an implied ordering while being isolated from + * each other. + */ + var TRANSACTION_WRAPPERS = []; + + if (true) { + TRANSACTION_WRAPPERS.push({ + initialize: ReactInstrumentation.debugTool.onBeginFlush, + close: ReactInstrumentation.debugTool.onEndFlush, + }); + } + + var noopCallbackQueue = { + enqueue: function () {}, + }; + + /** + * @class ReactServerRenderingTransaction + * @param {boolean} renderToStaticMarkup + */ + function ReactServerRenderingTransaction(renderToStaticMarkup) { + this.reinitializeTransaction(); + this.renderToStaticMarkup = renderToStaticMarkup; + this.useCreateElement = false; + this.updateQueue = new ReactServerUpdateQueue(this); + } + + var Mixin = { + /** + * @see Transaction + * @abstract + * @final + * @return {array} Empty list of operation wrap procedures. + */ + getTransactionWrappers: function () { + return TRANSACTION_WRAPPERS; + }, + + /** + * @return {object} The queue to collect `onDOMReady` callbacks with. + */ + getReactMountReady: function () { + return noopCallbackQueue; + }, + + /** + * @return {object} The queue to collect React async events. + */ + getUpdateQueue: function () { + return this.updateQueue; + }, + + /** + * `PooledClass` looks for this, and will invoke this before allowing this + * instance to be reused. + */ + destructor: function () {}, + + checkpoint: function () {}, + + rollback: function () {}, + }; + + _assign(ReactServerRenderingTransaction.prototype, Transaction, Mixin); + + PooledClass.addPoolingTo(ReactServerRenderingTransaction); + + module.exports = ReactServerRenderingTransaction; + + /***/ + }, + /* 325 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + module.exports = '15.4.2'; + + /***/ + }, + /* 326 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var ViewportMetrics = { + currentScrollLeft: 0, + + currentScrollTop: 0, + + refreshScrollValues: function (scrollPosition) { + ViewportMetrics.currentScrollLeft = scrollPosition.x; + ViewportMetrics.currentScrollTop = scrollPosition.y; + }, + }; + + module.exports = ViewportMetrics; + + /***/ + }, + /* 327 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2014-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + var _prodInvariant = __webpack_require__(5); + + var invariant = __webpack_require__(2); + + /** + * Accumulates items that must not be null or undefined into the first one. This + * is used to conserve memory by avoiding array allocations, and thus sacrifices + * API cleanness. Since `current` can be null before being passed in and not + * null after this function, make sure to assign it back to `current`: + * + * `a = accumulateInto(a, b);` + * + * This API should be sparingly used. Try `accumulate` for something cleaner. + * + * @return {*|array<*>} An accumulation of items. + */ + + function accumulateInto(current, next) { + !(next != null) + ? true + ? invariant(false, 'accumulateInto(...): Accumulated items must not be null or undefined.') + : _prodInvariant('30') + : void 0; + + if (current == null) { + return next; + } + + // Both are not empty. Warning: Never call x.concat(y) when you are not + // certain that x is an Array (x could be a string with concat method). + if (Array.isArray(current)) { + if (Array.isArray(next)) { + current.push.apply(current, next); + return current; + } + current.push(next); + return current; + } + + if (Array.isArray(next)) { + // A bit too dangerous to mutate `next`. + return [current].concat(next); + } + + return [current, next]; + } + + module.exports = accumulateInto; + + /***/ + }, + /* 328 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var _prodInvariant = __webpack_require__(5); + + var ReactCurrentOwner = __webpack_require__(54); + var ReactDOMComponentTree = __webpack_require__(13); + var ReactInstanceMap = __webpack_require__(100); + + var getHostComponentFromComposite = __webpack_require__(330); + var invariant = __webpack_require__(2); + var warning = __webpack_require__(3); + + /** + * Returns the DOM node rendered by this element. + * + * See https://facebook.github.io/react/docs/top-level-api.html#reactdom.finddomnode + * + * @param {ReactComponent|DOMElement} componentOrElement + * @return {?DOMElement} The root node of this element. + */ + function findDOMNode(componentOrElement) { + if (true) { + var owner = ReactCurrentOwner.current; + if (owner !== null) { + true + ? warning( + owner._warnedAboutRefsInRender, + '%s is accessing findDOMNode inside its render(). ' + + 'render() should be a pure function of props and state. It should ' + + 'never access something that requires stale data from the previous ' + + 'render, such as refs. Move this logic to componentDidMount and ' + + 'componentDidUpdate instead.', + owner.getName() || 'A component', + ) + : void 0; + owner._warnedAboutRefsInRender = true; + } + } + if (componentOrElement == null) { + return null; + } + if (componentOrElement.nodeType === 1) { + return componentOrElement; + } + + var inst = ReactInstanceMap.get(componentOrElement); + if (inst) { + inst = getHostComponentFromComposite(inst); + return inst ? ReactDOMComponentTree.getNodeFromInstance(inst) : null; + } + + if (typeof componentOrElement.render === 'function') { + true + ? true + ? invariant(false, 'findDOMNode was called on an unmounted component.') + : _prodInvariant('44') + : void 0; + } else { + true + ? true + ? invariant( + false, + 'Element appears to be neither ReactComponent nor DOMNode (keys: %s)', + Object.keys(componentOrElement), + ) + : _prodInvariant('45', Object.keys(componentOrElement)) + : void 0; + } + } + + module.exports = findDOMNode; + + /***/ + }, + /* 329 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + /** + * @param {array} arr an "accumulation" of items which is either an Array or + * a single item. Useful when paired with the `accumulate` module. This is a + * simple utility that allows us to reason about a collection of items, but + * handling the case when there is exactly one item (and we do not need to + * allocate an array). + */ + + function forEachAccumulated(arr, cb, scope) { + if (Array.isArray(arr)) { + arr.forEach(cb, scope); + } else if (arr) { + cb.call(scope, arr); + } + } + + module.exports = forEachAccumulated; + + /***/ + }, + /* 330 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var ReactNodeTypes = __webpack_require__(322); + + function getHostComponentFromComposite(inst) { + var type; + + while ((type = inst._renderedNodeType) === ReactNodeTypes.COMPOSITE) { + inst = inst._renderedComponent; + } + + if (type === ReactNodeTypes.HOST) { + return inst._renderedComponent; + } else if (type === ReactNodeTypes.EMPTY) { + return null; + } + } + + module.exports = getHostComponentFromComposite; + + /***/ + }, + /* 331 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + var nextDebugID = 1; + + function getNextDebugID() { + return nextDebugID++; + } + + module.exports = getNextDebugID; + + /***/ + }, + /* 332 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var ExecutionEnvironment = __webpack_require__(14); + + var contentKey = null; + + /** + * Gets the key used to access text content on a DOM node. + * + * @return {?string} Key used to access text content. + * @internal + */ + function getTextContentAccessor() { + if (!contentKey && ExecutionEnvironment.canUseDOM) { + // Prefer textContent to innerText because many browsers support both but + // SVG <text> elements don't support innerText even when <div> does. + contentKey = 'textContent' in document.documentElement ? 'textContent' : 'innerText'; + } + return contentKey; + } + + module.exports = getTextContentAccessor; + + /***/ + }, + /* 333 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var ExecutionEnvironment = __webpack_require__(14); + + /** + * Generate a mapping of standard vendor prefixes using the defined style property and event name. + * + * @param {string} styleProp + * @param {string} eventName + * @returns {object} + */ + function makePrefixMap(styleProp, eventName) { + var prefixes = {}; + + prefixes[styleProp.toLowerCase()] = eventName.toLowerCase(); + prefixes['Webkit' + styleProp] = 'webkit' + eventName; + prefixes['Moz' + styleProp] = 'moz' + eventName; + prefixes['ms' + styleProp] = 'MS' + eventName; + prefixes['O' + styleProp] = 'o' + eventName.toLowerCase(); + + return prefixes; + } + + /** + * A list of event names to a configurable list of vendor prefixes. + */ + var vendorPrefixes = { + animationend: makePrefixMap('Animation', 'AnimationEnd'), + animationiteration: makePrefixMap('Animation', 'AnimationIteration'), + animationstart: makePrefixMap('Animation', 'AnimationStart'), + transitionend: makePrefixMap('Transition', 'TransitionEnd'), + }; + + /** + * Event names that have already been detected and prefixed (if applicable). + */ + var prefixedEventNames = {}; + + /** + * Element to check for prefixes on. + */ + var style = {}; + + /** + * Bootstrap if a DOM exists. + */ + if (ExecutionEnvironment.canUseDOM) { + style = document.createElement('div').style; + + // On some platforms, in particular some releases of Android 4.x, + // the un-prefixed "animation" and "transition" properties are defined on the + // style object but the events that fire will still be prefixed, so we need + // to check if the un-prefixed events are usable, and if not remove them from the map. + if (!('AnimationEvent' in window)) { + delete vendorPrefixes.animationend.animation; + delete vendorPrefixes.animationiteration.animation; + delete vendorPrefixes.animationstart.animation; + } + + // Same as above + if (!('TransitionEvent' in window)) { + delete vendorPrefixes.transitionend.transition; + } + } + + /** + * Attempts to determine the correct vendor prefixed event name. + * + * @param {string} eventName + * @returns {string} + */ + function getVendorPrefixedEventName(eventName) { + if (prefixedEventNames[eventName]) { + return prefixedEventNames[eventName]; + } else if (!vendorPrefixes[eventName]) { + return eventName; + } + + var prefixMap = vendorPrefixes[eventName]; + + for (var styleProp in prefixMap) { + if (prefixMap.hasOwnProperty(styleProp) && styleProp in style) { + return (prefixedEventNames[eventName] = prefixMap[styleProp]); + } + } + + return ''; + } + + module.exports = getVendorPrefixedEventName; + + /***/ + }, + /* 334 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + /** + * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary + */ + + var supportedInputTypes = { + color: true, + date: true, + datetime: true, + 'datetime-local': true, + email: true, + month: true, + number: true, + password: true, + range: true, + search: true, + tel: true, + text: true, + time: true, + url: true, + week: true, + }; + + function isTextInputElement(elem) { + var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase(); + + if (nodeName === 'input') { + return !!supportedInputTypes[elem.type]; + } + + if (nodeName === 'textarea') { + return true; + } + + return false; + } + + module.exports = isTextInputElement; + + /***/ + }, + /* 335 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var ExecutionEnvironment = __webpack_require__(14); + var escapeTextContentForBrowser = __webpack_require__(143); + var setInnerHTML = __webpack_require__(144); + + /** + * Set the textContent property of a node, ensuring that whitespace is preserved + * even in IE8. innerText is a poor substitute for textContent and, among many + * issues, inserts <br> instead of the literal newline chars. innerHTML behaves + * as it should. + * + * @param {DOMElement} node + * @param {string} text + * @internal + */ + var setTextContent = function (node, text) { + if (text) { + var firstChild = node.firstChild; + + if (firstChild && firstChild === node.lastChild && firstChild.nodeType === 3) { + firstChild.nodeValue = text; + return; + } + } + node.textContent = text; + }; + + if (ExecutionEnvironment.canUseDOM) { + if (!('textContent' in document.documentElement)) { + setTextContent = function (node, text) { + if (node.nodeType === 3) { + node.nodeValue = text; + return; + } + setInnerHTML(node, escapeTextContentForBrowser(text)); + }; + } + } + + module.exports = setTextContent; + + /***/ + }, + /* 336 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var _prodInvariant = __webpack_require__(5); + + var ReactCurrentOwner = __webpack_require__(54); + var REACT_ELEMENT_TYPE = __webpack_require__(746); + + var getIteratorFn = __webpack_require__(781); + var invariant = __webpack_require__(2); + var KeyEscapeUtils = __webpack_require__(198); + var warning = __webpack_require__(3); + + var SEPARATOR = '.'; + var SUBSEPARATOR = ':'; + + /** + * This is inlined from ReactElement since this file is shared between + * isomorphic and renderers. We could extract this to a + * + */ + + /** + * TODO: Test that a single child and an array with one item have the same key + * pattern. + */ + + var didWarnAboutMaps = false; + + /** + * Generate a key string that identifies a component within a set. + * + * @param {*} component A component that could contain a manual key. + * @param {number} index Index that is used if a manual key is not provided. + * @return {string} + */ + function getComponentKey(component, index) { + // Do some typechecking here since we call this blindly. We want to ensure + // that we don't block potential future ES APIs. + if (component && typeof component === 'object' && component.key != null) { + // Explicit key + return KeyEscapeUtils.escape(component.key); + } + // Implicit key determined by the index in the set + return index.toString(36); + } + + /** + * @param {?*} children Children tree container. + * @param {!string} nameSoFar Name of the key path so far. + * @param {!function} callback Callback to invoke with each child found. + * @param {?*} traverseContext Used to pass information throughout the traversal + * process. + * @return {!number} The number of children in this subtree. + */ + function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) { + var type = typeof children; + + if (type === 'undefined' || type === 'boolean') { + // All of the above are perceived as null. + children = null; + } + + if ( + children === null || + type === 'string' || + type === 'number' || + // The following is inlined from ReactElement. This means we can optimize + // some checks. React Fiber also inlines this logic for similar purposes. + (type === 'object' && children.$$typeof === REACT_ELEMENT_TYPE) + ) { + callback( + traverseContext, + children, + // If it's the only child, treat the name as if it was wrapped in an array + // so that it's consistent if the number of children grows. + nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar, + ); + return 1; + } + + var child; + var nextName; + var subtreeCount = 0; // Count of children found in the current subtree. + var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR; + + if (Array.isArray(children)) { + for (var i = 0; i < children.length; i++) { + child = children[i]; + nextName = nextNamePrefix + getComponentKey(child, i); + subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext); + } + } else { + var iteratorFn = getIteratorFn(children); + if (iteratorFn) { + var iterator = iteratorFn.call(children); + var step; + if (iteratorFn !== children.entries) { + var ii = 0; + while (!(step = iterator.next()).done) { + child = step.value; + nextName = nextNamePrefix + getComponentKey(child, ii++); + subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext); + } + } else { + if (true) { + var mapsAsChildrenAddendum = ''; + if (ReactCurrentOwner.current) { + var mapsAsChildrenOwnerName = ReactCurrentOwner.current.getName(); + if (mapsAsChildrenOwnerName) { + mapsAsChildrenAddendum = ' Check the render method of `' + mapsAsChildrenOwnerName + '`.'; + } + } + true + ? warning( + didWarnAboutMaps, + 'Using Maps as children is not yet fully supported. It is an ' + + 'experimental feature that might be removed. Convert it to a ' + + 'sequence / iterable of keyed ReactElements instead.%s', + mapsAsChildrenAddendum, + ) + : void 0; + didWarnAboutMaps = true; + } + // Iterator will provide entry [k,v] tuples rather than values. + while (!(step = iterator.next()).done) { + var entry = step.value; + if (entry) { + child = entry[1]; + nextName = + nextNamePrefix + + KeyEscapeUtils.escape(entry[0]) + + SUBSEPARATOR + + getComponentKey(child, 0); + subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext); + } + } + } + } else if (type === 'object') { + var addendum = ''; + if (true) { + addendum = + ' If you meant to render a collection of children, use an array ' + + 'instead or wrap the object using createFragment(object) from the ' + + 'React add-ons.'; + if (children._isReactElement) { + addendum = + " It looks like you're using an element created by a different " + + 'version of React. Make sure to use only one copy of React.'; + } + if (ReactCurrentOwner.current) { + var name = ReactCurrentOwner.current.getName(); + if (name) { + addendum += ' Check the render method of `' + name + '`.'; + } + } + } + var childrenString = String(children); + true + ? true + ? invariant( + false, + 'Objects are not valid as a React child (found: %s).%s', + childrenString === '[object Object]' + ? 'object with keys {' + Object.keys(children).join(', ') + '}' + : childrenString, + addendum, + ) + : _prodInvariant( + '31', + childrenString === '[object Object]' + ? 'object with keys {' + Object.keys(children).join(', ') + '}' + : childrenString, + addendum, + ) + : void 0; + } + } + + return subtreeCount; + } + + /** + * Traverses children that are typically specified as `props.children`, but + * might also be specified through attributes: + * + * - `traverseAllChildren(this.props.children, ...)` + * - `traverseAllChildren(this.props.leftPanelChildren, ...)` + * + * The `traverseContext` is an optional argument that is passed through the + * entire traversal. It can be used to store accumulations or anything else that + * the callback might find relevant. + * + * @param {?*} children Children tree object. + * @param {!function} callback To invoke upon traversing each child. + * @param {?*} traverseContext Context for traversal. + * @return {!number} The number of children in this subtree. + */ + function traverseAllChildren(children, callback, traverseContext) { + if (children == null) { + return 0; + } + + return traverseAllChildrenImpl(children, '', callback, traverseContext); + } + + module.exports = traverseAllChildren; + + /***/ + }, + /* 337 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + module.exports = __webpack_require__(741); + + /***/ + }, + /* 338 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + + var _from = __webpack_require__(240); + + var _from2 = _interopRequireDefault(_from); + + var _keys = __webpack_require__(148); + + var _keys2 = _interopRequireDefault(_keys); + + var _map = __webpack_require__(241); + + var _map2 = _interopRequireDefault(_map); + + var _generatorFunction = __webpack_require__(790); + + var _generatorFunction2 = _interopRequireDefault(_generatorFunction); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + var registeredComponents = new _map2.default(); // key = name used by react_on_rails + // value = { name, component, generatorFunction: boolean, isRenderer: boolean } + exports.default = { + /** + * @param components { component1: component1, component2: component2, etc. } + */ + register: function register(components) { + (0, _keys2.default)(components).forEach(function (name) { + if (registeredComponents.has(name)) { + console.warn('Called register for component that is already registered', name); + } + + var component = components[name]; + if (!component) { + throw new Error('Called register with null component named ' + name); + } + + var isGeneratorFunction = (0, _generatorFunction2.default)(component); + var isRenderer = isGeneratorFunction && component.length === 3; + + registeredComponents.set(name, { + name: name, + component: component, + generatorFunction: isGeneratorFunction, + isRenderer: isRenderer, + }); + }); + }, + + /** + * @param name + * @returns { name, component, generatorFunction } + */ + get: function get(name) { + if (registeredComponents.has(name)) { + return registeredComponents.get(name); + } + + var keys = (0, _from2.default)(registeredComponents.keys()).join(', '); + throw new Error( + 'Could not find component registered with name ' + + name + + '. Registered component names include [ ' + + keys + + ' ]. Maybe you forgot to register the component?', + ); + }, + + /** + * Get a Map containing all registered components. Useful for debugging. + * @returns Map where key is the component name and values are the + * { name, component, generatorFunction} + */ + components: function components() { + return registeredComponents; + }, + }; + + /***/ + }, + /* 339 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + + var _stringify = __webpack_require__(120); + + var _stringify2 = _interopRequireDefault(_stringify); + + exports.consoleReplay = consoleReplay; + exports.default = buildConsoleReplay; + + var _RenderUtils = __webpack_require__(786); + + var _RenderUtils2 = _interopRequireDefault(_RenderUtils); + + var _scriptSanitizedVal = __webpack_require__(791); + + var _scriptSanitizedVal2 = _interopRequireDefault(_scriptSanitizedVal); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + function consoleReplay() { + // console.history is a global polyfill used in server rendering. + if (!(console.history instanceof Array)) { + return ''; + } + + var lines = console.history.map(function (msg) { + var stringifiedList = msg.arguments.map(function (arg) { + var val = void 0; + try { + val = typeof arg === 'string' || arg instanceof String ? arg : (0, _stringify2.default)(arg); + } catch (e) { + val = e.message + ': ' + arg; + } + + return (0, _scriptSanitizedVal2.default)(val); + }); + + return ( + 'console.' + msg.level + '.apply(console, ' + (0, _stringify2.default)(stringifiedList) + ');' + ); + }); + + return lines.join('\n'); + } + + function buildConsoleReplay() { + return _RenderUtils2.default.wrapInScriptTags('consoleReplayLog', consoleReplay()); + } + + /***/ + }, + /* 340 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + + var _react = __webpack_require__(1); + + var _react2 = _interopRequireDefault(_react); + + var _server = __webpack_require__(337); + + var _server2 = _interopRequireDefault(_server); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + function handleGeneratorFunctionIssue(options) { + var e = options.e, + name = options.name; + + var msg = ''; + + if (name) { + var lastLine = + 'A generator function takes a single arg of props (and the location for react-router) ' + + 'and returns a ReactElement.'; + + var shouldBeGeneratorError = + "ERROR: ReactOnRails is incorrectly detecting generator function to be false. The React\ncomponent '" + + name + + "' seems to be a generator function.\n" + + lastLine; + var reMatchShouldBeGeneratorError = /Can't add property context, object is not extensible/; + if (reMatchShouldBeGeneratorError.test(e.message)) { + msg += shouldBeGeneratorError + '\n\n'; + console.error(shouldBeGeneratorError); + } + + shouldBeGeneratorError = + "ERROR: ReactOnRails is incorrectly detecting generatorFunction to be true, but the React\ncomponent '" + + name + + "' is not a generator function.\n" + + lastLine; + + var reMatchShouldNotBeGeneratorError = /Cannot call a class as a function/; + + if (reMatchShouldNotBeGeneratorError.test(e.message)) { + msg += shouldBeGeneratorError + '\n\n'; + console.error(shouldBeGeneratorError); + } + } + + return msg; + } + + var handleError = function handleError(options) { + var e = options.e, + jsCode = options.jsCode, + serverSide = options.serverSide; + + console.error('Exception in rendering!'); + + var msg = handleGeneratorFunctionIssue(options); + + if (jsCode) { + console.error('JS code was: ' + jsCode); + } + + if (e.fileName) { + console.error('location: ' + e.fileName + ':' + e.lineNumber); + } + + console.error('message: ' + e.message); + console.error('stack: ' + e.stack); + + if (serverSide) { + msg += + 'Exception in rendering!\n' + + (e.fileName ? '\nlocation: ' + e.fileName + ':' + e.lineNumber : '') + + '\nMessage: ' + + e.message + + '\n\n' + + e.stack; + + var reactElement = _react2.default.createElement('pre', null, msg); + return _server2.default.renderToString(reactElement); + } + + return undefined; + }; + + exports.default = handleError; + + /***/ + }, + /* 341 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.default = isResultNonReactComponent; + function isResultNonReactComponent(reactElementOrRouterResult) { + return !!( + reactElementOrRouterResult.renderedHtml || + reactElementOrRouterResult.redirectLocation || + reactElementOrRouterResult.error + ); + } + + /***/ + }, + /* 342 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + exports.default = createChainableTypeChecker; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + + // Mostly taken from ReactPropTypes. + + function createChainableTypeChecker(validate) { + function checkType(isRequired, props, propName, componentName, location, propFullName) { + var componentNameSafe = componentName || '<<anonymous>>'; + var propFullNameSafe = propFullName || propName; + + if (props[propName] == null) { + if (isRequired) { + return new Error( + 'Required ' + + location + + ' `' + + propFullNameSafe + + '` was not specified ' + + ('in `' + componentNameSafe + '`.'), + ); + } + + return null; + } + + for ( + var _len = arguments.length, args = Array(_len > 6 ? _len - 6 : 0), _key = 6; + _key < _len; + _key++ + ) { + args[_key - 6] = arguments[_key]; + } + + return validate.apply( + undefined, + [props, propName, componentNameSafe, location, propFullNameSafe].concat(args), + ); + } + + var chainedCheckType = checkType.bind(null, false); + chainedCheckType.isRequired = checkType.bind(null, true); + + return chainedCheckType; + } + + /***/ + }, + /* 343 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + + var _react = __webpack_require__(1); + + exports['default'] = _react.PropTypes.shape({ + subscribe: _react.PropTypes.func.isRequired, + dispatch: _react.PropTypes.func.isRequired, + getState: _react.PropTypes.func.isRequired, + }); + + /***/ + }, + /* 344 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + exports['default'] = warning; + /** + * Prints a warning in the console if it exists. + * + * @param {String} message The warning message. + * @returns {void} + */ + function warning(message) { + /* eslint-disable no-console */ + if (typeof console !== 'undefined' && typeof console.error === 'function') { + console.error(message); + } + /* eslint-enable no-console */ + try { + // This error was thrown as a convenience so that if you enable + // "break on all exceptions" in your console, + // it would pause the execution at this line. + throw new Error(message); + /* eslint-disable no-empty */ + } catch (e) {} + /* eslint-enable no-empty */ + } + + /***/ + }, + /* 345 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + /** + * This action type will be dispatched by the history actions below. + * If you're writing a middleware to watch for navigation events, be sure to + * look for actions of this type. + */ + var CALL_HISTORY_METHOD = (exports.CALL_HISTORY_METHOD = '@@router/CALL_HISTORY_METHOD'); + + function updateLocation(method) { + return function () { + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return { + type: CALL_HISTORY_METHOD, + payload: { method: method, args: args }, + }; + }; + } + + /** + * These actions correspond to the history API. + * The associated routerMiddleware will capture these events before they get to + * your reducer and reissue them as the matching function on your history. + */ + var push = (exports.push = updateLocation('push')); + var replace = (exports.replace = updateLocation('replace')); + var go = (exports.go = updateLocation('go')); + var goBack = (exports.goBack = updateLocation('goBack')); + var goForward = (exports.goForward = updateLocation('goForward')); + + var routerActions = (exports.routerActions = { + push: push, + replace: replace, + go: go, + goBack: goBack, + goForward: goForward, + }); + + /***/ + }, + /* 346 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + exports.routerReducer = routerReducer; + /** + * This action type will be dispatched when your history + * receives a location change. + */ + var LOCATION_CHANGE = (exports.LOCATION_CHANGE = '@@router/LOCATION_CHANGE'); + + var initialState = { + locationBeforeTransitions: null, + }; + + /** + * This reducer will update the state with the most recent location history + * has transitioned to. This may not be in sync with the router, particularly + * if you have asynchronously-loaded routes, so reading from and relying on + * this state is discouraged. + */ + function routerReducer() { + var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState; + + var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, + type = _ref.type, + payload = _ref.payload; + + if (type === LOCATION_CHANGE) { + return _extends({}, state, { locationBeforeTransitions: payload }); + } + + return state; + } + + /***/ + }, + /* 347 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(16); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_invariant__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__PropTypes__ = __webpack_require__(216); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__ContextUtils__ = __webpack_require__(215); + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + function _objectWithoutProperties(obj, keys) { + var target = {}; + for (var i in obj) { + if (keys.indexOf(i) >= 0) continue; + if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; + target[i] = obj[i]; + } + return target; + } + + var _React$PropTypes = __WEBPACK_IMPORTED_MODULE_0_react___default.a.PropTypes, + bool = _React$PropTypes.bool, + object = _React$PropTypes.object, + string = _React$PropTypes.string, + func = _React$PropTypes.func, + oneOfType = _React$PropTypes.oneOfType; + + function isLeftClickEvent(event) { + return event.button === 0; + } + + function isModifiedEvent(event) { + return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey); + } + + // TODO: De-duplicate against hasAnyProperties in createTransitionManager. + function isEmptyObject(object) { + for (var p in object) { + if (Object.prototype.hasOwnProperty.call(object, p)) return false; + } + return true; + } + + function resolveToLocation(to, router) { + return typeof to === 'function' ? to(router.location) : to; + } + + /** + * A <Link> is used to create an <a> element that links to a route. + * When that route is active, the link gets the value of its + * activeClassName prop. + * + * For example, assuming you have the following route: + * + * <Route path="/posts/:postID" component={Post} /> + * + * You could use the following component to link to that route: + * + * <Link to={`/posts/${post.id}`} /> + * + * Links may pass along location state and/or query string parameters + * in the state/query props, respectively. + * + * <Link ... query={{ show: true }} state={{ the: 'state' }} /> + */ + var Link = __WEBPACK_IMPORTED_MODULE_0_react___default.a.createClass({ + displayName: 'Link', + + mixins: [ + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__ContextUtils__['b' /* ContextSubscriber */])( + 'router', + ), + ], + + contextTypes: { + router: __WEBPACK_IMPORTED_MODULE_2__PropTypes__['b' /* routerShape */], + }, + + propTypes: { + to: oneOfType([string, object, func]), + query: object, + hash: string, + state: object, + activeStyle: object, + activeClassName: string, + onlyActiveOnIndex: bool.isRequired, + onClick: func, + target: string, + }, + + getDefaultProps: function getDefaultProps() { + return { + onlyActiveOnIndex: false, + style: {}, + }; + }, + handleClick: function handleClick(event) { + if (this.props.onClick) this.props.onClick(event); + + if (event.defaultPrevented) return; + + var router = this.context.router; + + !router + ? true + ? __WEBPACK_IMPORTED_MODULE_1_invariant___default()( + false, + '<Link>s rendered outside of a router context cannot navigate.', + ) + : invariant(false) + : void 0; + + if (isModifiedEvent(event) || !isLeftClickEvent(event)) return; + + // If target prop is set (e.g. to "_blank"), let browser handle link. + /* istanbul ignore if: untestable with Karma */ + if (this.props.target) return; + + event.preventDefault(); + + router.push(resolveToLocation(this.props.to, router)); + }, + render: function render() { + var _props = this.props, + to = _props.to, + activeClassName = _props.activeClassName, + activeStyle = _props.activeStyle, + onlyActiveOnIndex = _props.onlyActiveOnIndex, + props = _objectWithoutProperties(_props, [ + 'to', + 'activeClassName', + 'activeStyle', + 'onlyActiveOnIndex', + ]); + + // Ignore if rendered outside the context of router to simplify unit testing. + + var router = this.context.router; + + if (router) { + // If user does not specify a `to` prop, return an empty anchor tag. + if (!to) { + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('a', props); + } + + var toLocation = resolveToLocation(to, router); + props.href = router.createHref(toLocation); + + if (activeClassName || (activeStyle != null && !isEmptyObject(activeStyle))) { + if (router.isActive(toLocation, onlyActiveOnIndex)) { + if (activeClassName) { + if (props.className) { + props.className += ' ' + activeClassName; + } else { + props.className = activeClassName; + } + } + + if (activeStyle) props.style = _extends({}, props.style, activeStyle); + } + } + } + + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'a', + _extends({}, props, { onClick: this.handleClick }), + ); + }, + }); + + /* harmony default export */ __webpack_exports__['a'] = Link; + + /***/ + }, + /* 348 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = isPromise; + function isPromise(obj) { + return obj && typeof obj.then === 'function'; + } + + /***/ + }, + /* 349 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(16); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_invariant__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__RouteUtils__ = __webpack_require__(68); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__PatternUtils__ = __webpack_require__(105); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__InternalPropTypes__ = __webpack_require__(118); + + var _React$PropTypes = __WEBPACK_IMPORTED_MODULE_0_react___default.a.PropTypes, + string = _React$PropTypes.string, + object = _React$PropTypes.object; + + /** + * A <Redirect> is used to declare another URL path a client should + * be sent to when they request a given URL. + * + * Redirects are placed alongside routes in the route configuration + * and are traversed in the same manner. + */ + /* eslint-disable react/require-render-return */ + + var Redirect = __WEBPACK_IMPORTED_MODULE_0_react___default.a.createClass({ + displayName: 'Redirect', + + statics: { + createRouteFromReactElement: function createRouteFromReactElement(element) { + var route = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_2__RouteUtils__['c' /* createRouteFromReactElement */], + )(element); + + if (route.from) route.path = route.from; + + route.onEnter = function (nextState, replace) { + var location = nextState.location, + params = nextState.params; + + var pathname = void 0; + if (route.to.charAt(0) === '/') { + pathname = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_3__PatternUtils__['a' /* formatPattern */], + )(route.to, params); + } else if (!route.to) { + pathname = location.pathname; + } else { + var routeIndex = nextState.routes.indexOf(route); + var parentPattern = Redirect.getRoutePattern(nextState.routes, routeIndex - 1); + var pattern = parentPattern.replace(/\/*$/, '/') + route.to; + pathname = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_3__PatternUtils__['a' /* formatPattern */], + )(pattern, params); + } + + replace({ + pathname: pathname, + query: route.query || location.query, + state: route.state || location.state, + }); + }; + + return route; + }, + getRoutePattern: function getRoutePattern(routes, routeIndex) { + var parentPattern = ''; + + for (var i = routeIndex; i >= 0; i--) { + var route = routes[i]; + var pattern = route.path || ''; + + parentPattern = pattern.replace(/\/*$/, '/') + parentPattern; + + if (pattern.indexOf('/') === 0) break; + } + + return '/' + parentPattern; + }, + }, + + propTypes: { + path: string, + from: string, // Alias for path + to: string.isRequired, + query: object, + state: object, + onEnter: __WEBPACK_IMPORTED_MODULE_4__InternalPropTypes__['c' /* falsy */], + children: __WEBPACK_IMPORTED_MODULE_4__InternalPropTypes__['c' /* falsy */], + }, + + /* istanbul ignore next: sanity check */ + render: function render() { + true + ? true + ? __WEBPACK_IMPORTED_MODULE_1_invariant___default()( + false, + '<Redirect> elements are for router configuration only and should not be rendered', + ) + : invariant(false) + : void 0; + }, + }); + + /* harmony default export */ __webpack_exports__['a'] = Redirect; + + /***/ + }, + /* 350 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = createRouterObject; + /* harmony export (immutable) */ __webpack_exports__['b'] = assignRouterState; + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + function createRouterObject(history, transitionManager, state) { + var router = _extends({}, history, { + setRouteLeaveHook: transitionManager.listenBeforeLeavingRoute, + isActive: transitionManager.isActive, + }); + + return assignRouterState(router, state); + } + + function assignRouterState(router, _ref) { + var location = _ref.location, + params = _ref.params, + routes = _ref.routes; + + router.location = location; + router.params = params; + router.routes = routes; + + return router; + } + + /***/ + }, + /* 351 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries__ = + __webpack_require__(294); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename__ = + __webpack_require__(293); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_history_lib_createMemoryHistory__ = + __webpack_require__(668); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_history_lib_createMemoryHistory___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_history_lib_createMemoryHistory__); + /* harmony export (immutable) */ __webpack_exports__['a'] = createMemoryHistory; + + function createMemoryHistory(options) { + // signatures and type checking differ between `useQueries` and + // `createMemoryHistory`, have to create `memoryHistory` first because + // `useQueries` doesn't understand the signature + var memoryHistory = __WEBPACK_IMPORTED_MODULE_2_history_lib_createMemoryHistory___default()(options); + var createHistory = function createHistory() { + return memoryHistory; + }; + var history = __WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries___default()( + __WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename___default()(createHistory), + )(options); + return history; + } + + /***/ + }, + /* 352 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__useRouterHistory__ = __webpack_require__(354); + + var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement); + + /* harmony default export */ __webpack_exports__['a'] = function (createHistory) { + var history = void 0; + if (canUseDOM) + history = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__useRouterHistory__['a' /* default */])( + createHistory, + )(); + return history; + }; + + /***/ + }, + /* 353 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__routerWarning__ = __webpack_require__(106); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__computeChangedRoutes__ = __webpack_require__(809); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__TransitionUtils__ = __webpack_require__(806); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isActive__ = __webpack_require__(813); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__getComponents__ = __webpack_require__(810); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__matchRoutes__ = __webpack_require__(815); + /* harmony export (immutable) */ __webpack_exports__['a'] = createTransitionManager; + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + function hasAnyProperties(object) { + for (var p in object) { + if (Object.prototype.hasOwnProperty.call(object, p)) return true; + } + return false; + } + + function createTransitionManager(history, routes) { + var state = {}; + + // Signature should be (location, indexOnly), but needs to support (path, + // query, indexOnly) + function isActive(location, indexOnly) { + location = history.createLocation(location); + + return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__isActive__['a' /* default */])( + location, + indexOnly, + state.location, + state.routes, + state.params, + ); + } + + var partialNextState = void 0; + + function match(location, callback) { + if (partialNextState && partialNextState.location === location) { + // Continue from where we left off. + finishMatch(partialNextState, callback); + } else { + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__matchRoutes__['a' /* default */])( + routes, + location, + function (error, nextState) { + if (error) { + callback(error); + } else if (nextState) { + finishMatch(_extends({}, nextState, { location: location }), callback); + } else { + callback(); + } + }, + ); + } + } + + function finishMatch(nextState, callback) { + var _computeChangedRoutes = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_1__computeChangedRoutes__['a' /* default */], + )(state, nextState), + leaveRoutes = _computeChangedRoutes.leaveRoutes, + changeRoutes = _computeChangedRoutes.changeRoutes, + enterRoutes = _computeChangedRoutes.enterRoutes; + + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__TransitionUtils__['a' /* runLeaveHooks */])( + leaveRoutes, + state, + ); + + // Tear down confirmation hooks for left routes + leaveRoutes + .filter(function (route) { + return enterRoutes.indexOf(route) === -1; + }) + .forEach(removeListenBeforeHooksForRoute); + + // change and enter hooks are run in series + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__TransitionUtils__['b' /* runChangeHooks */])( + changeRoutes, + state, + nextState, + function (error, redirectInfo) { + if (error || redirectInfo) return handleErrorOrRedirect(error, redirectInfo); + + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__TransitionUtils__['c' /* runEnterHooks */])( + enterRoutes, + nextState, + finishEnterHooks, + ); + }, + ); + + function finishEnterHooks(error, redirectInfo) { + if (error || redirectInfo) return handleErrorOrRedirect(error, redirectInfo); + + // TODO: Fetch components after state is updated. + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__getComponents__['a' /* default */])( + nextState, + function (error, components) { + if (error) { + callback(error); + } else { + // TODO: Make match a pure function and have some other API + // for "match and update state". + callback(null, null, (state = _extends({}, nextState, { components: components }))); + } + }, + ); + } + + function handleErrorOrRedirect(error, redirectInfo) { + if (error) callback(error); + else callback(null, redirectInfo); + } + } + + var RouteGuid = 1; + + function getRouteID(route) { + var create = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + + return route.__id__ || (create && (route.__id__ = RouteGuid++)); + } + + var RouteHooks = Object.create(null); + + function getRouteHooksForRoutes(routes) { + return routes + .map(function (route) { + return RouteHooks[getRouteID(route)]; + }) + .filter(function (hook) { + return hook; + }); + } + + function transitionHook(location, callback) { + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__matchRoutes__['a' /* default */])( + routes, + location, + function (error, nextState) { + if (nextState == null) { + // TODO: We didn't actually match anything, but hang + // onto error/nextState so we don't have to matchRoutes + // again in the listen callback. + callback(); + return; + } + + // Cache some state here so we don't have to + // matchRoutes() again in the listen callback. + partialNextState = _extends({}, nextState, { location: location }); + + var hooks = getRouteHooksForRoutes( + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__computeChangedRoutes__['a' /* default */])( + state, + partialNextState, + ).leaveRoutes, + ); + + var result = void 0; + for (var i = 0, len = hooks.length; result == null && i < len; ++i) { + // Passing the location arg here indicates to + // the user that this is a transition hook. + result = hooks[i](location); + } + + callback(result); + }, + ); + } + + /* istanbul ignore next: untestable with Karma */ + function beforeUnloadHook() { + // Synchronously check to see if any route hooks want + // to prevent the current window/tab from closing. + if (state.routes) { + var hooks = getRouteHooksForRoutes(state.routes); + + var message = void 0; + for (var i = 0, len = hooks.length; typeof message !== 'string' && i < len; ++i) { + // Passing no args indicates to the user that this is a + // beforeunload hook. We don't know the next location. + message = hooks[i](); + } + + return message; + } + } + + var unlistenBefore = void 0, + unlistenBeforeUnload = void 0; + + function removeListenBeforeHooksForRoute(route) { + var routeID = getRouteID(route); + if (!routeID) { + return; + } + + delete RouteHooks[routeID]; + + if (!hasAnyProperties(RouteHooks)) { + // teardown transition & beforeunload hooks + if (unlistenBefore) { + unlistenBefore(); + unlistenBefore = null; + } + + if (unlistenBeforeUnload) { + unlistenBeforeUnload(); + unlistenBeforeUnload = null; + } + } + } + + /** + * Registers the given hook function to run before leaving the given route. + * + * During a normal transition, the hook function receives the next location + * as its only argument and can return either a prompt message (string) to show the user, + * to make sure they want to leave the page; or `false`, to prevent the transition. + * Any other return value will have no effect. + * + * During the beforeunload event (in browsers) the hook receives no arguments. + * In this case it must return a prompt message to prevent the transition. + * + * Returns a function that may be used to unbind the listener. + */ + function listenBeforeLeavingRoute(route, hook) { + var thereWereNoRouteHooks = !hasAnyProperties(RouteHooks); + var routeID = getRouteID(route, true); + + RouteHooks[routeID] = hook; + + if (thereWereNoRouteHooks) { + // setup transition & beforeunload hooks + unlistenBefore = history.listenBefore(transitionHook); + + if (history.listenBeforeUnload) + unlistenBeforeUnload = history.listenBeforeUnload(beforeUnloadHook); + } + + return function () { + removeListenBeforeHooksForRoute(route); + }; + } + + /** + * This is the API for stateful environments. As the location + * changes, we update state and call the listener. We can also + * gracefully handle errors and redirects. + */ + function listen(listener) { + function historyListener(location) { + if (state.location === location) { + listener(null, state); + } else { + match(location, function (error, redirectLocation, nextState) { + if (error) { + listener(error); + } else if (redirectLocation) { + history.replace(redirectLocation); + } else if (nextState) { + listener(null, nextState); + } else { + true + ? __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__routerWarning__['a' /* default */])( + false, + 'Location "%s" did not match any routes', + location.pathname + location.search + location.hash, + ) + : void 0; + } + }); + } + } + + // TODO: Only use a single history listener. Otherwise we'll end up with + // multiple concurrent calls to match. + + // Set up the history listener first in case the initial match redirects. + var unsubscribe = history.listen(historyListener); + + if (state.location) { + // Picking up on a matchContext. + listener(null, state); + } else { + historyListener(history.getCurrentLocation()); + } + + return unsubscribe; + } + + return { + isActive: isActive, + match: match, + listenBeforeLeavingRoute: listenBeforeLeavingRoute, + listen: listen, + }; + } + + /***/ + }, + /* 354 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries__ = + __webpack_require__(294); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename__ = + __webpack_require__(293); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename__); + /* harmony export (immutable) */ __webpack_exports__['a'] = useRouterHistory; + + function useRouterHistory(createHistory) { + return function (options) { + var history = __WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries___default()( + __WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename___default()(createHistory), + )(options); + return history; + }; + } + + /***/ + }, + /* 355 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + /** + * Escape and wrap key so it is safe to use as a reactid + * + * @param {string} key to be escaped. + * @return {string} the escaped key. + */ + + function escape(key) { + var escapeRegex = /[=:]/g; + var escaperLookup = { + '=': '=0', + ':': '=2', + }; + var escapedString = ('' + key).replace(escapeRegex, function (match) { + return escaperLookup[match]; + }); + + return '$' + escapedString; + } + + /** + * Unescape and unwrap key for human-readable display + * + * @param {string} key to unescape. + * @return {string} the unescaped key. + */ + function unescape(key) { + var unescapeRegex = /(=0|=2)/g; + var unescaperLookup = { + '=0': '=', + '=2': ':', + }; + var keySubstring = key[0] === '.' && key[1] === '$' ? key.substring(2) : key.substring(1); + + return ('' + keySubstring).replace(unescapeRegex, function (match) { + return unescaperLookup[match]; + }); + } + + var KeyEscapeUtils = { + escape: escape, + unescape: unescape, + }; + + module.exports = KeyEscapeUtils; + + /***/ + }, + /* 356 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2014-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + // The Symbol used to tag the ReactElement type. If there is no native Symbol + // nor polyfill, then a plain number is used for performance. + + var REACT_ELEMENT_TYPE = + (typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.element')) || 0xeac7; + + module.exports = REACT_ELEMENT_TYPE; + + /***/ + }, + /* 357 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2014-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + /** + * ReactElementValidator provides a wrapper around a element factory + * which validates the props passed to the element. This is intended to be + * used only in DEV and could be replaced by a static type checker for languages + * that support it. + */ + + var ReactCurrentOwner = __webpack_require__(54); + var ReactComponentTreeHook = __webpack_require__(19); + var ReactElement = __webpack_require__(86); + + var checkReactTypeSpec = __webpack_require__(830); + + var canDefineProperty = __webpack_require__(222); + var getIteratorFn = __webpack_require__(223); + var warning = __webpack_require__(3); + + function getDeclarationErrorAddendum() { + if (ReactCurrentOwner.current) { + var name = ReactCurrentOwner.current.getName(); + if (name) { + return ' Check the render method of `' + name + '`.'; + } + } + return ''; + } + + /** + * Warn if there's no key explicitly set on dynamic arrays of children or + * object keys are not valid. This allows us to keep track of children between + * updates. + */ + var ownerHasKeyUseWarning = {}; + + function getCurrentComponentErrorInfo(parentType) { + var info = getDeclarationErrorAddendum(); + + if (!info) { + var parentName = + typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name; + if (parentName) { + info = ' Check the top-level render call using <' + parentName + '>.'; + } + } + return info; + } + + /** + * Warn if the element doesn't have an explicit key assigned to it. + * This element is in an array. The array could grow and shrink or be + * reordered. All children that haven't already been validated are required to + * have a "key" property assigned to it. Error statuses are cached so a warning + * will only be shown once. + * + * @internal + * @param {ReactElement} element Element that requires a key. + * @param {*} parentType element's parent's type. + */ + function validateExplicitKey(element, parentType) { + if (!element._store || element._store.validated || element.key != null) { + return; + } + element._store.validated = true; + + var memoizer = ownerHasKeyUseWarning.uniqueKey || (ownerHasKeyUseWarning.uniqueKey = {}); + + var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType); + if (memoizer[currentComponentErrorInfo]) { + return; + } + memoizer[currentComponentErrorInfo] = true; + + // Usually the current owner is the offender, but if it accepts children as a + // property, it may be the creator of the child that's responsible for + // assigning it a key. + var childOwner = ''; + if (element && element._owner && element._owner !== ReactCurrentOwner.current) { + // Give the component that originally created this child. + childOwner = ' It was passed a child from ' + element._owner.getName() + '.'; + } + + true + ? warning( + false, + 'Each child in an array or iterator should have a unique "key" prop.' + + '%s%s See https://fb.me/react-warning-keys for more information.%s', + currentComponentErrorInfo, + childOwner, + ReactComponentTreeHook.getCurrentStackAddendum(element), + ) + : void 0; + } + + /** + * Ensure that every element either is passed in a static location, in an + * array with an explicit keys property defined, or in an object literal + * with valid key property. + * + * @internal + * @param {ReactNode} node Statically passed child of any type. + * @param {*} parentType node's parent's type. + */ + function validateChildKeys(node, parentType) { + if (typeof node !== 'object') { + return; + } + if (Array.isArray(node)) { + for (var i = 0; i < node.length; i++) { + var child = node[i]; + if (ReactElement.isValidElement(child)) { + validateExplicitKey(child, parentType); + } + } + } else if (ReactElement.isValidElement(node)) { + // This element was passed in a valid location. + if (node._store) { + node._store.validated = true; + } + } else if (node) { + var iteratorFn = getIteratorFn(node); + // Entry iterators provide implicit keys. + if (iteratorFn) { + if (iteratorFn !== node.entries) { + var iterator = iteratorFn.call(node); + var step; + while (!(step = iterator.next()).done) { + if (ReactElement.isValidElement(step.value)) { + validateExplicitKey(step.value, parentType); + } + } + } + } + } + } + + /** + * Given an element, validate that its props follow the propTypes definition, + * provided by the type. + * + * @param {ReactElement} element + */ + function validatePropTypes(element) { + var componentClass = element.type; + if (typeof componentClass !== 'function') { + return; + } + var name = componentClass.displayName || componentClass.name; + if (componentClass.propTypes) { + checkReactTypeSpec(componentClass.propTypes, element.props, 'prop', name, element, null); + } + if (typeof componentClass.getDefaultProps === 'function') { + true + ? warning( + componentClass.getDefaultProps.isReactClassApproved, + 'getDefaultProps is only used on classic React.createClass ' + + 'definitions. Use a static property named `defaultProps` instead.', + ) + : void 0; + } + } + + var ReactElementValidator = { + createElement: function (type, props, children) { + var validType = typeof type === 'string' || typeof type === 'function'; + // We warn in this case but don't throw. We expect the element creation to + // succeed and there will likely be errors in render. + if (!validType) { + if (typeof type !== 'function' && typeof type !== 'string') { + var info = ''; + if ( + type === undefined || + (typeof type === 'object' && type !== null && Object.keys(type).length === 0) + ) { + info += ' You likely forgot to export your component from the file ' + "it's defined in."; + } + info += getDeclarationErrorAddendum(); + true + ? warning( + false, + 'React.createElement: type is invalid -- expected a string (for ' + + 'built-in components) or a class/function (for composite ' + + 'components) but got: %s.%s', + type == null ? type : typeof type, + info, + ) + : void 0; + } + } + + var element = ReactElement.createElement.apply(this, arguments); + + // The result can be nullish if a mock or a custom function is used. + // TODO: Drop this when these are no longer allowed as the type argument. + if (element == null) { + return element; + } + + // Skip key warning if the type isn't valid since our key validation logic + // doesn't expect a non-string/function type and can throw confusing errors. + // We don't want exception behavior to differ between dev and prod. + // (Rendering will throw with a helpful message and as soon as the type is + // fixed, the key warnings will appear.) + if (validType) { + for (var i = 2; i < arguments.length; i++) { + validateChildKeys(arguments[i], type); + } + } + + validatePropTypes(element); + + return element; + }, + + createFactory: function (type) { + var validatedFactory = ReactElementValidator.createElement.bind(null, type); + // Legacy hook TODO: Warn if this is accessed + validatedFactory.type = type; + + if (true) { + if (canDefineProperty) { + Object.defineProperty(validatedFactory, 'type', { + enumerable: false, + get: function () { + true + ? warning( + false, + 'Factory.type is deprecated. Access the class directly ' + + 'before passing it to createFactory.', + ) + : void 0; + Object.defineProperty(this, 'type', { + value: type, + }); + return type; + }, + }); + } + } + + return validatedFactory; + }, + + cloneElement: function (element, props, children) { + var newElement = ReactElement.cloneElement.apply(this, arguments); + for (var i = 2; i < arguments.length; i++) { + validateChildKeys(arguments[i], newElement.type); + } + validatePropTypes(newElement); + return newElement; + }, + }; + + module.exports = ReactElementValidator; + + /***/ + }, + /* 358 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; + + module.exports = ReactPropTypesSecret; + + /***/ + }, + /* 359 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var _prodInvariant = __webpack_require__(87); + + var ReactElement = __webpack_require__(86); + + var invariant = __webpack_require__(2); + + /** + * Returns the first child in a collection of children and verifies that there + * is only one child in the collection. + * + * See https://facebook.github.io/react/docs/top-level-api.html#react.children.only + * + * The current implementation of this function assumes that a single child gets + * passed without a wrapper, but the purpose of this helper function is to + * abstract away the particular structure of children. + * + * @param {?object} children Child collection structure. + * @return {ReactElement} The first and only `ReactElement` contained in the + * structure. + */ + function onlyChild(children) { + !ReactElement.isValidElement(children) + ? true + ? invariant(false, 'React.Children.only expected to receive a single React element child.') + : _prodInvariant('143') + : void 0; + return children; + } + + module.exports = onlyChild; + + /***/ + }, + /* 360 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var _prodInvariant = __webpack_require__(87); + + var ReactCurrentOwner = __webpack_require__(54); + var REACT_ELEMENT_TYPE = __webpack_require__(356); + + var getIteratorFn = __webpack_require__(223); + var invariant = __webpack_require__(2); + var KeyEscapeUtils = __webpack_require__(355); + var warning = __webpack_require__(3); + + var SEPARATOR = '.'; + var SUBSEPARATOR = ':'; + + /** + * This is inlined from ReactElement since this file is shared between + * isomorphic and renderers. We could extract this to a + * + */ + + /** + * TODO: Test that a single child and an array with one item have the same key + * pattern. + */ + + var didWarnAboutMaps = false; + + /** + * Generate a key string that identifies a component within a set. + * + * @param {*} component A component that could contain a manual key. + * @param {number} index Index that is used if a manual key is not provided. + * @return {string} + */ + function getComponentKey(component, index) { + // Do some typechecking here since we call this blindly. We want to ensure + // that we don't block potential future ES APIs. + if (component && typeof component === 'object' && component.key != null) { + // Explicit key + return KeyEscapeUtils.escape(component.key); + } + // Implicit key determined by the index in the set + return index.toString(36); + } + + /** + * @param {?*} children Children tree container. + * @param {!string} nameSoFar Name of the key path so far. + * @param {!function} callback Callback to invoke with each child found. + * @param {?*} traverseContext Used to pass information throughout the traversal + * process. + * @return {!number} The number of children in this subtree. + */ + function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) { + var type = typeof children; + + if (type === 'undefined' || type === 'boolean') { + // All of the above are perceived as null. + children = null; + } + + if ( + children === null || + type === 'string' || + type === 'number' || + // The following is inlined from ReactElement. This means we can optimize + // some checks. React Fiber also inlines this logic for similar purposes. + (type === 'object' && children.$$typeof === REACT_ELEMENT_TYPE) + ) { + callback( + traverseContext, + children, + // If it's the only child, treat the name as if it was wrapped in an array + // so that it's consistent if the number of children grows. + nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar, + ); + return 1; + } + + var child; + var nextName; + var subtreeCount = 0; // Count of children found in the current subtree. + var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR; + + if (Array.isArray(children)) { + for (var i = 0; i < children.length; i++) { + child = children[i]; + nextName = nextNamePrefix + getComponentKey(child, i); + subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext); + } + } else { + var iteratorFn = getIteratorFn(children); + if (iteratorFn) { + var iterator = iteratorFn.call(children); + var step; + if (iteratorFn !== children.entries) { + var ii = 0; + while (!(step = iterator.next()).done) { + child = step.value; + nextName = nextNamePrefix + getComponentKey(child, ii++); + subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext); + } + } else { + if (true) { + var mapsAsChildrenAddendum = ''; + if (ReactCurrentOwner.current) { + var mapsAsChildrenOwnerName = ReactCurrentOwner.current.getName(); + if (mapsAsChildrenOwnerName) { + mapsAsChildrenAddendum = ' Check the render method of `' + mapsAsChildrenOwnerName + '`.'; + } + } + true + ? warning( + didWarnAboutMaps, + 'Using Maps as children is not yet fully supported. It is an ' + + 'experimental feature that might be removed. Convert it to a ' + + 'sequence / iterable of keyed ReactElements instead.%s', + mapsAsChildrenAddendum, + ) + : void 0; + didWarnAboutMaps = true; + } + // Iterator will provide entry [k,v] tuples rather than values. + while (!(step = iterator.next()).done) { + var entry = step.value; + if (entry) { + child = entry[1]; + nextName = + nextNamePrefix + + KeyEscapeUtils.escape(entry[0]) + + SUBSEPARATOR + + getComponentKey(child, 0); + subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext); + } + } + } + } else if (type === 'object') { + var addendum = ''; + if (true) { + addendum = + ' If you meant to render a collection of children, use an array ' + + 'instead or wrap the object using createFragment(object) from the ' + + 'React add-ons.'; + if (children._isReactElement) { + addendum = + " It looks like you're using an element created by a different " + + 'version of React. Make sure to use only one copy of React.'; + } + if (ReactCurrentOwner.current) { + var name = ReactCurrentOwner.current.getName(); + if (name) { + addendum += ' Check the render method of `' + name + '`.'; + } + } + } + var childrenString = String(children); + true + ? true + ? invariant( + false, + 'Objects are not valid as a React child (found: %s).%s', + childrenString === '[object Object]' + ? 'object with keys {' + Object.keys(children).join(', ') + '}' + : childrenString, + addendum, + ) + : _prodInvariant( + '31', + childrenString === '[object Object]' + ? 'object with keys {' + Object.keys(children).join(', ') + '}' + : childrenString, + addendum, + ) + : void 0; + } + } + + return subtreeCount; + } + + /** + * Traverses children that are typically specified as `props.children`, but + * might also be specified through attributes: + * + * - `traverseAllChildren(this.props.children, ...)` + * - `traverseAllChildren(this.props.leftPanelChildren, ...)` + * + * The `traverseContext` is an optional argument that is passed through the + * entire traversal. It can be used to store accumulations or anything else that + * the callback might find relevant. + * + * @param {?*} children Children tree object. + * @param {!function} callback To invoke upon traversing each child. + * @param {?*} traverseContext Context for traversal. + * @return {!number} The number of children in this subtree. + */ + function traverseAllChildren(children, callback, traverseContext) { + if (children == null) { + return 0; + } + + return traverseAllChildrenImpl(children, '', callback, traverseContext); + } + + module.exports = traverseAllChildren; + + /***/ + }, + /* 361 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + function createThunkMiddleware(extraArgument) { + return function (_ref) { + var dispatch = _ref.dispatch, + getState = _ref.getState; + return function (next) { + return function (action) { + if (typeof action === 'function') { + return action(dispatch, getState, extraArgument); + } + + return next(action); + }; + }; + }; + } + + var thunk = createThunkMiddleware(); + thunk.withExtraArgument = createThunkMiddleware; + + exports['default'] = thunk; + + /***/ + }, + /* 362 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = compose; + /** + * Composes single-argument functions from right to left. The rightmost + * function can take multiple arguments as it provides the signature for + * the resulting composite function. + * + * @param {...Function} funcs The functions to compose. + * @returns {Function} A function obtained by composing the argument functions + * from right to left. For example, compose(f, g, h) is identical to doing + * (...args) => f(g(h(...args))). + */ + + function compose() { + for (var _len = arguments.length, funcs = Array(_len), _key = 0; _key < _len; _key++) { + funcs[_key] = arguments[_key]; + } + + if (funcs.length === 0) { + return function (arg) { + return arg; + }; + } + + if (funcs.length === 1) { + return funcs[0]; + } + + var last = funcs[funcs.length - 1]; + var rest = funcs.slice(0, -1); + return function () { + return rest.reduceRight( + function (composed, f) { + return f(composed); + }, + last.apply(undefined, arguments), + ); + }; + } + + /***/ + }, + /* 363 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_isPlainObject__ = + __webpack_require__(300); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_symbol_observable__ = __webpack_require__(837); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_symbol_observable___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_symbol_observable__); + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'b', function () { + return ActionTypes; + }); + /* harmony export (immutable) */ __webpack_exports__['a'] = createStore; + + /** + * These are private action types reserved by Redux. + * For any unknown actions, you must return the current state. + * If the current state is undefined, you must return the initial state. + * Do not reference these action types directly in your code. + */ + var ActionTypes = { + INIT: '@@redux/INIT', + }; + + /** + * Creates a Redux store that holds the state tree. + * The only way to change the data in the store is to call `dispatch()` on it. + * + * There should only be a single store in your app. To specify how different + * parts of the state tree respond to actions, you may combine several reducers + * into a single reducer function by using `combineReducers`. + * + * @param {Function} reducer A function that returns the next state tree, given + * the current state tree and the action to handle. + * + * @param {any} [preloadedState] The initial state. You may optionally specify it + * to hydrate the state from the server in universal apps, or to restore a + * previously serialized user session. + * If you use `combineReducers` to produce the root reducer function, this must be + * an object with the same shape as `combineReducers` keys. + * + * @param {Function} enhancer The store enhancer. You may optionally specify it + * to enhance the store with third-party capabilities such as middleware, + * time travel, persistence, etc. The only store enhancer that ships with Redux + * is `applyMiddleware()`. + * + * @returns {Store} A Redux store that lets you read the state, dispatch actions + * and subscribe to changes. + */ + function createStore(reducer, preloadedState, enhancer) { + var _ref2; + + if (typeof preloadedState === 'function' && typeof enhancer === 'undefined') { + enhancer = preloadedState; + preloadedState = undefined; + } + + if (typeof enhancer !== 'undefined') { + if (typeof enhancer !== 'function') { + throw new Error('Expected the enhancer to be a function.'); + } + + return enhancer(createStore)(reducer, preloadedState); + } + + if (typeof reducer !== 'function') { + throw new Error('Expected the reducer to be a function.'); + } + + var currentReducer = reducer; + var currentState = preloadedState; + var currentListeners = []; + var nextListeners = currentListeners; + var isDispatching = false; + + function ensureCanMutateNextListeners() { + if (nextListeners === currentListeners) { + nextListeners = currentListeners.slice(); + } + } + + /** + * Reads the state tree managed by the store. + * + * @returns {any} The current state tree of your application. + */ + function getState() { + return currentState; + } + + /** + * Adds a change listener. It will be called any time an action is dispatched, + * and some part of the state tree may potentially have changed. You may then + * call `getState()` to read the current state tree inside the callback. + * + * You may call `dispatch()` from a change listener, with the following + * caveats: + * + * 1. The subscriptions are snapshotted just before every `dispatch()` call. + * If you subscribe or unsubscribe while the listeners are being invoked, this + * will not have any effect on the `dispatch()` that is currently in progress. + * However, the next `dispatch()` call, whether nested or not, will use a more + * recent snapshot of the subscription list. + * + * 2. The listener should not expect to see all state changes, as the state + * might have been updated multiple times during a nested `dispatch()` before + * the listener is called. It is, however, guaranteed that all subscribers + * registered before the `dispatch()` started will be called with the latest + * state by the time it exits. + * + * @param {Function} listener A callback to be invoked on every dispatch. + * @returns {Function} A function to remove this change listener. + */ + function subscribe(listener) { + if (typeof listener !== 'function') { + throw new Error('Expected listener to be a function.'); + } + + var isSubscribed = true; + + ensureCanMutateNextListeners(); + nextListeners.push(listener); + + return function unsubscribe() { + if (!isSubscribed) { + return; + } + + isSubscribed = false; + + ensureCanMutateNextListeners(); + var index = nextListeners.indexOf(listener); + nextListeners.splice(index, 1); + }; + } + + /** + * Dispatches an action. It is the only way to trigger a state change. + * + * The `reducer` function, used to create the store, will be called with the + * current state tree and the given `action`. Its return value will + * be considered the **next** state of the tree, and the change listeners + * will be notified. + * + * The base implementation only supports plain object actions. If you want to + * dispatch a Promise, an Observable, a thunk, or something else, you need to + * wrap your store creating function into the corresponding middleware. For + * example, see the documentation for the `redux-thunk` package. Even the + * middleware will eventually dispatch plain object actions using this method. + * + * @param {Object} action A plain object representing “what changed”. It is + * a good idea to keep actions serializable so you can record and replay user + * sessions, or use the time travelling `redux-devtools`. An action must have + * a `type` property which may not be `undefined`. It is a good idea to use + * string constants for action types. + * + * @returns {Object} For convenience, the same action object you dispatched. + * + * Note that, if you use a custom middleware, it may wrap `dispatch()` to + * return something else (for example, a Promise you can await). + */ + function dispatch(action) { + if ( + !__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0_lodash_es_isPlainObject__['a' /* default */])( + action, + ) + ) { + throw new Error('Actions must be plain objects. ' + 'Use custom middleware for async actions.'); + } + + if (typeof action.type === 'undefined') { + throw new Error( + 'Actions may not have an undefined "type" property. ' + 'Have you misspelled a constant?', + ); + } + + if (isDispatching) { + throw new Error('Reducers may not dispatch actions.'); + } + + try { + isDispatching = true; + currentState = currentReducer(currentState, action); + } finally { + isDispatching = false; + } + + var listeners = (currentListeners = nextListeners); + for (var i = 0; i < listeners.length; i++) { + listeners[i](); + } + + return action; + } + + /** + * Replaces the reducer currently used by the store to calculate the state. + * + * You might need this if your app implements code splitting and you want to + * load some of the reducers dynamically. You might also need this if you + * implement a hot reloading mechanism for Redux. + * + * @param {Function} nextReducer The reducer for the store to use instead. + * @returns {void} + */ + function replaceReducer(nextReducer) { + if (typeof nextReducer !== 'function') { + throw new Error('Expected the nextReducer to be a function.'); + } + + currentReducer = nextReducer; + dispatch({ type: ActionTypes.INIT }); + } + + /** + * Interoperability point for observable/reactive libraries. + * @returns {observable} A minimal observable of state changes. + * For more information, see the observable proposal: + * https://github.com/zenparsing/es-observable + */ + function observable() { + var _ref; + + var outerSubscribe = subscribe; + return ( + (_ref = { + /** + * The minimal observable subscription method. + * @param {Object} observer Any object that can be used as an observer. + * The observer object should have a `next` method. + * @returns {subscription} An object with an `unsubscribe` method that can + * be used to unsubscribe the observable from the store, and prevent further + * emission of values from the observable. + */ + subscribe: function subscribe(observer) { + if (typeof observer !== 'object') { + throw new TypeError('Expected the observer to be an object.'); + } + + function observeState() { + if (observer.next) { + observer.next(getState()); + } + } + + observeState(); + var unsubscribe = outerSubscribe(observeState); + return { unsubscribe: unsubscribe }; + }, + }), + (_ref[__WEBPACK_IMPORTED_MODULE_1_symbol_observable___default.a] = function () { + return this; + }), + _ref + ); + } + + // When a store is created, an "INIT" action is dispatched so that every + // reducer returns their initial state. This effectively populates + // the initial state tree. + dispatch({ type: ActionTypes.INIT }); + + return ( + (_ref2 = { + dispatch: dispatch, + subscribe: subscribe, + getState: getState, + replaceReducer: replaceReducer, + }), + (_ref2[__WEBPACK_IMPORTED_MODULE_1_symbol_observable___default.a] = observable), + _ref2 + ); + } + + /***/ + }, + /* 364 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = warning; + /** + * Prints a warning in the console if it exists. + * + * @param {String} message The warning message. + * @returns {void} + */ + function warning(message) { + /* eslint-disable no-console */ + if (typeof console !== 'undefined' && typeof console.error === 'function') { + console.error(message); + } + /* eslint-enable no-console */ + try { + // This error was thrown as a convenience so that if you enable + // "break on all exceptions" in your console, + // it would pause the execution at this line. + throw new Error(message); + /* eslint-disable no-empty */ + } catch (e) {} + /* eslint-enable no-empty */ + } + + /***/ + }, + /* 365 */ + /***/ function (module, exports) { + module.exports = function (module) { + if (!module.webpackPolyfill) { + module.deprecate = function () {}; + module.paths = []; + // module.parent = undefined by default + if (!module.children) module.children = []; + Object.defineProperty(module, 'loaded', { + enumerable: true, + get: function () { + return module.l; + }, + }); + Object.defineProperty(module, 'id', { + enumerable: true, + get: function () { + return module.i; + }, + }); + module.webpackPolyfill = 1; + } + return module; + }; + + /***/ + }, + /* 366 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var _reactOnRails = __webpack_require__(102); + + var _reactOnRails2 = _interopRequireDefault(_reactOnRails); + + var _App = __webpack_require__(399); + + var _App2 = _interopRequireDefault(_App); + + var _ServerRouterApp = __webpack_require__(401); + + var _ServerRouterApp2 = _interopRequireDefault(_ServerRouterApp); + + var _SimpleCommentScreen = __webpack_require__(389); + + var _SimpleCommentScreen2 = _interopRequireDefault(_SimpleCommentScreen); + + var _NavigationBarApp = __webpack_require__(400); + + var _NavigationBarApp2 = _interopRequireDefault(_NavigationBarApp); + + var _routerCommentsStore = __webpack_require__(403); + + var _routerCommentsStore2 = _interopRequireDefault(_routerCommentsStore); + + var _commentsStore = __webpack_require__(402); + + var _commentsStore2 = _interopRequireDefault(_commentsStore); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + _reactOnRails2.default.register({ + App: _App2.default, + RouterApp: _ServerRouterApp2.default, + NavigationBarApp: _NavigationBarApp2.default, + SimpleCommentScreen: _SimpleCommentScreen2.default, + }); // Example of React + Redux + + _reactOnRails2.default.registerStore({ + routerCommentsStore: _routerCommentsStore2.default, + commentsStore: _commentsStore2.default, + }); + + /***/ + }, + /* 367 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (global) { + __webpack_require__(641); + + __webpack_require__(835); + + __webpack_require__(412); + + if (global._babelPolyfill) { + throw new Error('only one instance of babel-polyfill is allowed'); + } + global._babelPolyfill = true; + + var DEFINE_PROPERTY = 'defineProperty'; + function define(O, key, value) { + O[key] || + Object[DEFINE_PROPERTY](O, key, { + writable: true, + configurable: true, + value: value, + }); + } + + define(String.prototype, 'padLeft', ''.padStart); + define(String.prototype, 'padRight', ''.padEnd); + + 'pop,reverse,shift,keys,values,entries,indexOf,every,some,forEach,map,filter,find,findIndex,includes,join,slice,concat,push,splice,unshift,sort,lastIndexOf,reduce,reduceRight,copyWithin,fill' + .split(',') + .forEach(function (key) { + [][key] && define(Array, key, Function.call.bind([][key])); + }); + /* WEBPACK VAR INJECTION */ + }).call(exports, __webpack_require__(22)); + + /***/ + }, + /* 368 */ + /***/ function (module, exports, __webpack_require__) { + var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__; + (function () { + (function () { + (function () { + var slice = [].slice; + + this.ActionCable = { + INTERNAL: { + message_types: { + welcome: 'welcome', + ping: 'ping', + confirmation: 'confirm_subscription', + rejection: 'reject_subscription', + }, + default_mount_path: '/cable', + protocols: ['actioncable-v1-json', 'actioncable-unsupported'], + }, + createConsumer: function (url) { + var ref; + if (url == null) { + url = (ref = this.getConfig('url')) != null ? ref : this.INTERNAL.default_mount_path; + } + return new ActionCable.Consumer(this.createWebSocketURL(url)); + }, + getConfig: function (name) { + var element; + element = document.head.querySelector("meta[name='action-cable-" + name + "']"); + return element != null ? element.getAttribute('content') : void 0; + }, + createWebSocketURL: function (url) { + var a; + if (url && !/^wss?:/i.test(url)) { + a = document.createElement('a'); + a.href = url; + a.href = a.href; + a.protocol = a.protocol.replace('http', 'ws'); + return a.href; + } else { + return url; + } + }, + startDebugging: function () { + return (this.debugging = true); + }, + stopDebugging: function () { + return (this.debugging = null); + }, + log: function () { + var messages; + messages = 1 <= arguments.length ? slice.call(arguments, 0) : []; + if (this.debugging) { + messages.push(Date.now()); + return console.log.apply(console, ['[ActionCable]'].concat(slice.call(messages))); + } + }, + }; + }).call(this); + }).call(this); + + var ActionCable = this.ActionCable; + + (function () { + (function () { + var bind = function (fn, me) { + return function () { + return fn.apply(me, arguments); + }; + }; + + ActionCable.ConnectionMonitor = (function () { + var clamp, now, secondsSince; + + ConnectionMonitor.pollInterval = { + min: 3, + max: 30, + }; + + ConnectionMonitor.staleThreshold = 6; + + function ConnectionMonitor(connection) { + this.connection = connection; + this.visibilityDidChange = bind(this.visibilityDidChange, this); + this.reconnectAttempts = 0; + } + + ConnectionMonitor.prototype.start = function () { + if (!this.isRunning()) { + this.startedAt = now(); + delete this.stoppedAt; + this.startPolling(); + document.addEventListener('visibilitychange', this.visibilityDidChange); + return ActionCable.log( + 'ConnectionMonitor started. pollInterval = ' + this.getPollInterval() + ' ms', + ); + } + }; + + ConnectionMonitor.prototype.stop = function () { + if (this.isRunning()) { + this.stoppedAt = now(); + this.stopPolling(); + document.removeEventListener('visibilitychange', this.visibilityDidChange); + return ActionCable.log('ConnectionMonitor stopped'); + } + }; + + ConnectionMonitor.prototype.isRunning = function () { + return this.startedAt != null && this.stoppedAt == null; + }; + + ConnectionMonitor.prototype.recordPing = function () { + return (this.pingedAt = now()); + }; + + ConnectionMonitor.prototype.recordConnect = function () { + this.reconnectAttempts = 0; + this.recordPing(); + delete this.disconnectedAt; + return ActionCable.log('ConnectionMonitor recorded connect'); + }; + + ConnectionMonitor.prototype.recordDisconnect = function () { + this.disconnectedAt = now(); + return ActionCable.log('ConnectionMonitor recorded disconnect'); + }; + + ConnectionMonitor.prototype.startPolling = function () { + this.stopPolling(); + return this.poll(); + }; + + ConnectionMonitor.prototype.stopPolling = function () { + return clearTimeout(this.pollTimeout); + }; + + ConnectionMonitor.prototype.poll = function () { + return (this.pollTimeout = setTimeout( + (function (_this) { + return function () { + _this.reconnectIfStale(); + return _this.poll(); + }; + })(this), + this.getPollInterval(), + )); + }; + + ConnectionMonitor.prototype.getPollInterval = function () { + var interval, max, min, ref; + (ref = this.constructor.pollInterval), (min = ref.min), (max = ref.max); + interval = 5 * Math.log(this.reconnectAttempts + 1); + return Math.round(clamp(interval, min, max) * 1000); + }; + + ConnectionMonitor.prototype.reconnectIfStale = function () { + if (this.connectionIsStale()) { + ActionCable.log( + 'ConnectionMonitor detected stale connection. reconnectAttempts = ' + + this.reconnectAttempts + + ', pollInterval = ' + + this.getPollInterval() + + ' ms, time disconnected = ' + + secondsSince(this.disconnectedAt) + + ' s, stale threshold = ' + + this.constructor.staleThreshold + + ' s', + ); + this.reconnectAttempts++; + if (this.disconnectedRecently()) { + return ActionCable.log('ConnectionMonitor skipping reopening recent disconnect'); + } else { + ActionCable.log('ConnectionMonitor reopening'); + return this.connection.reopen(); + } + } + }; + + ConnectionMonitor.prototype.connectionIsStale = function () { + var ref; + return ( + secondsSince((ref = this.pingedAt) != null ? ref : this.startedAt) > + this.constructor.staleThreshold + ); + }; + + ConnectionMonitor.prototype.disconnectedRecently = function () { + return ( + this.disconnectedAt && secondsSince(this.disconnectedAt) < this.constructor.staleThreshold + ); + }; + + ConnectionMonitor.prototype.visibilityDidChange = function () { + if (document.visibilityState === 'visible') { + return setTimeout( + (function (_this) { + return function () { + if (_this.connectionIsStale() || !_this.connection.isOpen()) { + ActionCable.log( + 'ConnectionMonitor reopening stale connection on visibilitychange. visbilityState = ' + + document.visibilityState, + ); + return _this.connection.reopen(); + } + }; + })(this), + 200, + ); + } + }; + + now = function () { + return new Date().getTime(); + }; + + secondsSince = function (time) { + return (now() - time) / 1000; + }; + + clamp = function (number, min, max) { + return Math.max(min, Math.min(max, number)); + }; + + return ConnectionMonitor; + })(); + }).call(this); + (function () { + var i, + message_types, + protocols, + ref, + supportedProtocols, + unsupportedProtocol, + slice = [].slice, + bind = function (fn, me) { + return function () { + return fn.apply(me, arguments); + }; + }, + indexOf = + [].indexOf || + function (item) { + for (var i = 0, l = this.length; i < l; i++) { + if (i in this && this[i] === item) return i; + } + return -1; + }; + + (ref = ActionCable.INTERNAL), (message_types = ref.message_types), (protocols = ref.protocols); + + (supportedProtocols = + 2 <= protocols.length ? slice.call(protocols, 0, (i = protocols.length - 1)) : ((i = 0), [])), + (unsupportedProtocol = protocols[i++]); + + ActionCable.Connection = (function () { + Connection.reopenDelay = 500; + + function Connection(consumer) { + this.consumer = consumer; + this.open = bind(this.open, this); + this.subscriptions = this.consumer.subscriptions; + this.monitor = new ActionCable.ConnectionMonitor(this); + this.disconnected = true; + } + + Connection.prototype.send = function (data) { + if (this.isOpen()) { + this.webSocket.send(JSON.stringify(data)); + return true; + } else { + return false; + } + }; + + Connection.prototype.open = function () { + if (this.isActive()) { + ActionCable.log('Attempted to open WebSocket, but existing socket is ' + this.getState()); + throw new Error('Existing connection must be closed before opening'); + } else { + ActionCable.log( + 'Opening WebSocket, current state is ' + this.getState() + ', subprotocols: ' + protocols, + ); + if (this.webSocket != null) { + this.uninstallEventHandlers(); + } + this.webSocket = new WebSocket(this.consumer.url, protocols); + this.installEventHandlers(); + this.monitor.start(); + return true; + } + }; + + Connection.prototype.close = function (arg) { + var allowReconnect, ref1; + allowReconnect = ( + arg != null + ? arg + : { + allowReconnect: true, + } + ).allowReconnect; + if (!allowReconnect) { + this.monitor.stop(); + } + if (this.isActive()) { + return (ref1 = this.webSocket) != null ? ref1.close() : void 0; + } + }; + + Connection.prototype.reopen = function () { + var error; + ActionCable.log('Reopening WebSocket, current state is ' + this.getState()); + if (this.isActive()) { + try { + return this.close(); + } catch (error1) { + error = error1; + return ActionCable.log('Failed to reopen WebSocket', error); + } finally { + ActionCable.log('Reopening WebSocket in ' + this.constructor.reopenDelay + 'ms'); + setTimeout(this.open, this.constructor.reopenDelay); + } + } else { + return this.open(); + } + }; + + Connection.prototype.getProtocol = function () { + var ref1; + return (ref1 = this.webSocket) != null ? ref1.protocol : void 0; + }; + + Connection.prototype.isOpen = function () { + return this.isState('open'); + }; + + Connection.prototype.isActive = function () { + return this.isState('open', 'connecting'); + }; + + Connection.prototype.isProtocolSupported = function () { + var ref1; + return (ref1 = this.getProtocol()), indexOf.call(supportedProtocols, ref1) >= 0; + }; + + Connection.prototype.isState = function () { + var ref1, states; + states = 1 <= arguments.length ? slice.call(arguments, 0) : []; + return (ref1 = this.getState()), indexOf.call(states, ref1) >= 0; + }; + + Connection.prototype.getState = function () { + var ref1, state, value; + for (state in WebSocket) { + value = WebSocket[state]; + if (value === ((ref1 = this.webSocket) != null ? ref1.readyState : void 0)) { + return state.toLowerCase(); + } + } + return null; + }; + + Connection.prototype.installEventHandlers = function () { + var eventName, handler; + for (eventName in this.events) { + handler = this.events[eventName].bind(this); + this.webSocket['on' + eventName] = handler; + } + }; + + Connection.prototype.uninstallEventHandlers = function () { + var eventName; + for (eventName in this.events) { + this.webSocket['on' + eventName] = function () {}; + } + }; + + Connection.prototype.events = { + message: function (event) { + var identifier, message, ref1, type; + if (!this.isProtocolSupported()) { + return; + } + (ref1 = JSON.parse(event.data)), + (identifier = ref1.identifier), + (message = ref1.message), + (type = ref1.type); + switch (type) { + case message_types.welcome: + this.monitor.recordConnect(); + return this.subscriptions.reload(); + case message_types.ping: + return this.monitor.recordPing(); + case message_types.confirmation: + return this.subscriptions.notify(identifier, 'connected'); + case message_types.rejection: + return this.subscriptions.reject(identifier); + default: + return this.subscriptions.notify(identifier, 'received', message); + } + }, + open: function () { + ActionCable.log("WebSocket onopen event, using '" + this.getProtocol() + "' subprotocol"); + this.disconnected = false; + if (!this.isProtocolSupported()) { + ActionCable.log('Protocol is unsupported. Stopping monitor and disconnecting.'); + return this.close({ + allowReconnect: false, + }); + } + }, + close: function (event) { + ActionCable.log('WebSocket onclose event'); + if (this.disconnected) { + return; + } + this.disconnected = true; + this.monitor.recordDisconnect(); + return this.subscriptions.notifyAll('disconnected', { + willAttemptReconnect: this.monitor.isRunning(), + }); + }, + error: function () { + return ActionCable.log('WebSocket onerror event'); + }, + }; + + return Connection; + })(); + }).call(this); + (function () { + var slice = [].slice; + + ActionCable.Subscriptions = (function () { + function Subscriptions(consumer) { + this.consumer = consumer; + this.subscriptions = []; + } + + Subscriptions.prototype.create = function (channelName, mixin) { + var channel, params, subscription; + channel = channelName; + params = + typeof channel === 'object' + ? channel + : { + channel: channel, + }; + subscription = new ActionCable.Subscription(this.consumer, params, mixin); + return this.add(subscription); + }; + + Subscriptions.prototype.add = function (subscription) { + this.subscriptions.push(subscription); + this.consumer.ensureActiveConnection(); + this.notify(subscription, 'initialized'); + this.sendCommand(subscription, 'subscribe'); + return subscription; + }; + + Subscriptions.prototype.remove = function (subscription) { + this.forget(subscription); + if (!this.findAll(subscription.identifier).length) { + this.sendCommand(subscription, 'unsubscribe'); + } + return subscription; + }; + + Subscriptions.prototype.reject = function (identifier) { + var i, len, ref, results, subscription; + ref = this.findAll(identifier); + results = []; + for (i = 0, len = ref.length; i < len; i++) { + subscription = ref[i]; + this.forget(subscription); + this.notify(subscription, 'rejected'); + results.push(subscription); + } + return results; + }; + + Subscriptions.prototype.forget = function (subscription) { + var s; + this.subscriptions = function () { + var i, len, ref, results; + ref = this.subscriptions; + results = []; + for (i = 0, len = ref.length; i < len; i++) { + s = ref[i]; + if (s !== subscription) { + results.push(s); + } + } + return results; + }.call(this); + return subscription; + }; + + Subscriptions.prototype.findAll = function (identifier) { + var i, len, ref, results, s; + ref = this.subscriptions; + results = []; + for (i = 0, len = ref.length; i < len; i++) { + s = ref[i]; + if (s.identifier === identifier) { + results.push(s); + } + } + return results; + }; + + Subscriptions.prototype.reload = function () { + var i, len, ref, results, subscription; + ref = this.subscriptions; + results = []; + for (i = 0, len = ref.length; i < len; i++) { + subscription = ref[i]; + results.push(this.sendCommand(subscription, 'subscribe')); + } + return results; + }; + + Subscriptions.prototype.notifyAll = function () { + var args, callbackName, i, len, ref, results, subscription; + (callbackName = arguments[0]), (args = 2 <= arguments.length ? slice.call(arguments, 1) : []); + ref = this.subscriptions; + results = []; + for (i = 0, len = ref.length; i < len; i++) { + subscription = ref[i]; + results.push( + this.notify.apply(this, [subscription, callbackName].concat(slice.call(args))), + ); + } + return results; + }; + + Subscriptions.prototype.notify = function () { + var args, callbackName, i, len, results, subscription, subscriptions; + (subscription = arguments[0]), + (callbackName = arguments[1]), + (args = 3 <= arguments.length ? slice.call(arguments, 2) : []); + if (typeof subscription === 'string') { + subscriptions = this.findAll(subscription); + } else { + subscriptions = [subscription]; + } + results = []; + for (i = 0, len = subscriptions.length; i < len; i++) { + subscription = subscriptions[i]; + results.push( + typeof subscription[callbackName] === 'function' + ? subscription[callbackName].apply(subscription, args) + : void 0, + ); + } + return results; + }; + + Subscriptions.prototype.sendCommand = function (subscription, command) { + var identifier; + identifier = subscription.identifier; + return this.consumer.send({ + command: command, + identifier: identifier, + }); + }; + + return Subscriptions; + })(); + }).call(this); + (function () { + ActionCable.Subscription = (function () { + var extend; + + function Subscription(consumer, params, mixin) { + this.consumer = consumer; + if (params == null) { + params = {}; + } + this.identifier = JSON.stringify(params); + extend(this, mixin); + } + + Subscription.prototype.perform = function (action, data) { + if (data == null) { + data = {}; + } + data.action = action; + return this.send(data); + }; + + Subscription.prototype.send = function (data) { + return this.consumer.send({ + command: 'message', + identifier: this.identifier, + data: JSON.stringify(data), + }); + }; + + Subscription.prototype.unsubscribe = function () { + return this.consumer.subscriptions.remove(this); + }; + + extend = function (object, properties) { + var key, value; + if (properties != null) { + for (key in properties) { + value = properties[key]; + object[key] = value; + } + } + return object; + }; + + return Subscription; + })(); + }).call(this); + (function () { + ActionCable.Consumer = (function () { + function Consumer(url) { + this.url = url; + this.subscriptions = new ActionCable.Subscriptions(this); + this.connection = new ActionCable.Connection(this); + } + + Consumer.prototype.send = function (data) { + return this.connection.send(data); + }; + + Consumer.prototype.connect = function () { + return this.connection.open(); + }; + + Consumer.prototype.disconnect = function () { + return this.connection.close({ + allowReconnect: false, + }); + }; + + Consumer.prototype.ensureActiveConnection = function () { + if (!this.connection.isActive()) { + return this.connection.open(); + } + }; + + return Consumer; + })(); + }).call(this); + }).call(this); + + if (typeof module === 'object' && module.exports) { + module.exports = ActionCable; + } else if (true) { + !((__WEBPACK_AMD_DEFINE_FACTORY__ = ActionCable), + (__WEBPACK_AMD_DEFINE_RESULT__ = + typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' + ? __WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module) + : __WEBPACK_AMD_DEFINE_FACTORY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } + }).call(this); + + /***/ + }, + /* 369 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var utils = __webpack_require__(35); + var bind = __webpack_require__(229); + var Axios = __webpack_require__(371); + var defaults = __webpack_require__(145); + + /** + * Create an instance of Axios + * + * @param {Object} defaultConfig The default config for the instance + * @return {Axios} A new instance of Axios + */ + function createInstance(defaultConfig) { + var context = new Axios(defaultConfig); + var instance = bind(Axios.prototype.request, context); + + // Copy axios.prototype to instance + utils.extend(instance, Axios.prototype, context); + + // Copy context to instance + utils.extend(instance, context); + + return instance; + } + + // Create the default instance to be exported + var axios = createInstance(defaults); + + // Expose Axios class to allow class inheritance + axios.Axios = Axios; + + // Factory for creating new instances + axios.create = function create(instanceConfig) { + return createInstance(utils.merge(defaults, instanceConfig)); + }; + + // Expose Cancel & CancelToken + axios.Cancel = __webpack_require__(226); + axios.CancelToken = __webpack_require__(370); + axios.isCancel = __webpack_require__(227); + + // Expose all/spread + axios.all = function all(promises) { + return Promise.all(promises); + }; + axios.spread = __webpack_require__(385); + + module.exports = axios; + + // Allow use of default import syntax in TypeScript + module.exports.default = axios; + + /***/ + }, + /* 370 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var Cancel = __webpack_require__(226); + + /** + * A `CancelToken` is an object that can be used to request cancellation of an operation. + * + * @class + * @param {Function} executor The executor function. + */ + function CancelToken(executor) { + if (typeof executor !== 'function') { + throw new TypeError('executor must be a function.'); + } + + var resolvePromise; + this.promise = new Promise(function promiseExecutor(resolve) { + resolvePromise = resolve; + }); + + var token = this; + executor(function cancel(message) { + if (token.reason) { + // Cancellation has already been requested + return; + } + + token.reason = new Cancel(message); + resolvePromise(token.reason); + }); + } + + /** + * Throws a `Cancel` if cancellation has been requested. + */ + CancelToken.prototype.throwIfRequested = function throwIfRequested() { + if (this.reason) { + throw this.reason; + } + }; + + /** + * Returns an object that contains a new `CancelToken` and a function that, when called, + * cancels the `CancelToken`. + */ + CancelToken.source = function source() { + var cancel; + var token = new CancelToken(function executor(c) { + cancel = c; + }); + return { + token: token, + cancel: cancel, + }; + }; + + module.exports = CancelToken; + + /***/ + }, + /* 371 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var defaults = __webpack_require__(145); + var utils = __webpack_require__(35); + var InterceptorManager = __webpack_require__(372); + var dispatchRequest = __webpack_require__(373); + var isAbsoluteURL = __webpack_require__(381); + var combineURLs = __webpack_require__(379); + + /** + * Create a new instance of Axios + * + * @param {Object} instanceConfig The default config for the instance + */ + function Axios(instanceConfig) { + this.defaults = instanceConfig; + this.interceptors = { + request: new InterceptorManager(), + response: new InterceptorManager(), + }; + } + + /** + * Dispatch a request + * + * @param {Object} config The config specific for this request (merged with this.defaults) + */ + Axios.prototype.request = function request(config) { + /*eslint no-param-reassign:0*/ + // Allow for axios('example/url'[, config]) a la fetch API + if (typeof config === 'string') { + config = utils.merge( + { + url: arguments[0], + }, + arguments[1], + ); + } + + config = utils.merge(defaults, this.defaults, { method: 'get' }, config); + + // Support baseURL config + if (config.baseURL && !isAbsoluteURL(config.url)) { + config.url = combineURLs(config.baseURL, config.url); + } + + // Hook up interceptors middleware + var chain = [dispatchRequest, undefined]; + var promise = Promise.resolve(config); + + this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) { + chain.unshift(interceptor.fulfilled, interceptor.rejected); + }); + + this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) { + chain.push(interceptor.fulfilled, interceptor.rejected); + }); + + while (chain.length) { + promise = promise.then(chain.shift(), chain.shift()); + } + + return promise; + }; + + // Provide aliases for supported request methods + utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) { + /*eslint func-names:0*/ + Axios.prototype[method] = function (url, config) { + return this.request( + utils.merge(config || {}, { + method: method, + url: url, + }), + ); + }; + }); + + utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) { + /*eslint func-names:0*/ + Axios.prototype[method] = function (url, data, config) { + return this.request( + utils.merge(config || {}, { + method: method, + url: url, + data: data, + }), + ); + }; + }); + + module.exports = Axios; + + /***/ + }, + /* 372 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var utils = __webpack_require__(35); + + function InterceptorManager() { + this.handlers = []; + } + + /** + * Add a new interceptor to the stack + * + * @param {Function} fulfilled The function to handle `then` for a `Promise` + * @param {Function} rejected The function to handle `reject` for a `Promise` + * + * @return {Number} An ID used to remove interceptor later + */ + InterceptorManager.prototype.use = function use(fulfilled, rejected) { + this.handlers.push({ + fulfilled: fulfilled, + rejected: rejected, + }); + return this.handlers.length - 1; + }; + + /** + * Remove an interceptor from the stack + * + * @param {Number} id The ID that was returned by `use` + */ + InterceptorManager.prototype.eject = function eject(id) { + if (this.handlers[id]) { + this.handlers[id] = null; + } + }; + + /** + * Iterate over all the registered interceptors + * + * This method is particularly useful for skipping over any + * interceptors that may have become `null` calling `eject`. + * + * @param {Function} fn The function to call for each interceptor + */ + InterceptorManager.prototype.forEach = function forEach(fn) { + utils.forEach(this.handlers, function forEachHandler(h) { + if (h !== null) { + fn(h); + } + }); + }; + + module.exports = InterceptorManager; + + /***/ + }, + /* 373 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var utils = __webpack_require__(35); + var transformData = __webpack_require__(376); + var isCancel = __webpack_require__(227); + var defaults = __webpack_require__(145); + + /** + * Throws a `Cancel` if cancellation has been requested. + */ + function throwIfCancellationRequested(config) { + if (config.cancelToken) { + config.cancelToken.throwIfRequested(); + } + } + + /** + * Dispatch a request to the server using the configured adapter. + * + * @param {object} config The config that is to be used for the request + * @returns {Promise} The Promise to be fulfilled + */ + module.exports = function dispatchRequest(config) { + throwIfCancellationRequested(config); + + // Ensure headers exist + config.headers = config.headers || {}; + + // Transform request data + config.data = transformData(config.data, config.headers, config.transformRequest); + + // Flatten headers + config.headers = utils.merge( + config.headers.common || {}, + config.headers[config.method] || {}, + config.headers || {}, + ); + + utils.forEach( + ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], + function cleanHeaderConfig(method) { + delete config.headers[method]; + }, + ); + + var adapter = config.adapter || defaults.adapter; + + return adapter(config).then( + function onAdapterResolution(response) { + throwIfCancellationRequested(config); + + // Transform response data + response.data = transformData(response.data, response.headers, config.transformResponse); + + return response; + }, + function onAdapterRejection(reason) { + if (!isCancel(reason)) { + throwIfCancellationRequested(config); + + // Transform response data + if (reason && reason.response) { + reason.response.data = transformData( + reason.response.data, + reason.response.headers, + config.transformResponse, + ); + } + } + + return Promise.reject(reason); + }, + ); + }; + + /***/ + }, + /* 374 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + /** + * Update an Error with the specified config, error code, and response. + * + * @param {Error} error The error to update. + * @param {Object} config The config. + * @param {string} [code] The error code (for example, 'ECONNABORTED'). + @ @param {Object} [response] The response. + * @returns {Error} The error. + */ + module.exports = function enhanceError(error, config, code, response) { + error.config = config; + if (code) { + error.code = code; + } + error.response = response; + return error; + }; + + /***/ + }, + /* 375 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var createError = __webpack_require__(228); + + /** + * Resolve or reject a Promise based on response status. + * + * @param {Function} resolve A function that resolves the promise. + * @param {Function} reject A function that rejects the promise. + * @param {object} response The response. + */ + module.exports = function settle(resolve, reject, response) { + var validateStatus = response.config.validateStatus; + // Note: status is not exposed by XDomainRequest + if (!response.status || !validateStatus || validateStatus(response.status)) { + resolve(response); + } else { + reject( + createError( + 'Request failed with status code ' + response.status, + response.config, + null, + response, + ), + ); + } + }; + + /***/ + }, + /* 376 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var utils = __webpack_require__(35); + + /** + * Transform the data for a request or a response + * + * @param {Object|String} data The data to be transformed + * @param {Array} headers The headers for the request or response + * @param {Array|Function} fns A single function or Array of functions + * @returns {*} The resulting transformed data + */ + module.exports = function transformData(data, headers, fns) { + /*eslint no-param-reassign:0*/ + utils.forEach(fns, function transform(fn) { + data = fn(data, headers); + }); + + return data; + }; + + /***/ + }, + /* 377 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // btoa polyfill for IE<10 courtesy https://github.com/davidchambers/Base64.js + + var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='; + + function E() { + this.message = 'String contains an invalid character'; + } + E.prototype = new Error(); + E.prototype.code = 5; + E.prototype.name = 'InvalidCharacterError'; + + function btoa(input) { + var str = String(input); + var output = ''; + for ( + // initialize result and counter + var block, charCode, idx = 0, map = chars; + // if the next str index does not exist: + // change the mapping table to "=" + // check if d has no fractional digits + str.charAt(idx | 0) || ((map = '='), idx % 1); + // "8 - idx % 1 * 8" generates the sequence 2, 4, 6, 8 + output += map.charAt(63 & (block >> (8 - (idx % 1) * 8))) + ) { + charCode = str.charCodeAt((idx += 3 / 4)); + if (charCode > 0xff) { + throw new E(); + } + block = (block << 8) | charCode; + } + return output; + } + + module.exports = btoa; + + /***/ + }, + /* 378 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var utils = __webpack_require__(35); + + function encode(val) { + return encodeURIComponent(val) + .replace(/%40/gi, '@') + .replace(/%3A/gi, ':') + .replace(/%24/g, '$') + .replace(/%2C/gi, ',') + .replace(/%20/g, '+') + .replace(/%5B/gi, '[') + .replace(/%5D/gi, ']'); + } + + /** + * Build a URL by appending params to the end + * + * @param {string} url The base of the url (e.g., http://www.google.com) + * @param {object} [params] The params to be appended + * @returns {string} The formatted url + */ + module.exports = function buildURL(url, params, paramsSerializer) { + /*eslint no-param-reassign:0*/ + if (!params) { + return url; + } + + var serializedParams; + if (paramsSerializer) { + serializedParams = paramsSerializer(params); + } else if (utils.isURLSearchParams(params)) { + serializedParams = params.toString(); + } else { + var parts = []; + + utils.forEach(params, function serialize(val, key) { + if (val === null || typeof val === 'undefined') { + return; + } + + if (utils.isArray(val)) { + key = key + '[]'; + } + + if (!utils.isArray(val)) { + val = [val]; + } + + utils.forEach(val, function parseValue(v) { + if (utils.isDate(v)) { + v = v.toISOString(); + } else if (utils.isObject(v)) { + v = JSON.stringify(v); + } + parts.push(encode(key) + '=' + encode(v)); + }); + }); + + serializedParams = parts.join('&'); + } + + if (serializedParams) { + url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams; + } + + return url; + }; + + /***/ + }, + /* 379 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + /** + * Creates a new URL by combining the specified URLs + * + * @param {string} baseURL The base URL + * @param {string} relativeURL The relative URL + * @returns {string} The combined URL + */ + module.exports = function combineURLs(baseURL, relativeURL) { + return relativeURL ? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '') : baseURL; + }; + + /***/ + }, + /* 380 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var utils = __webpack_require__(35); + + module.exports = utils.isStandardBrowserEnv() + ? // Standard browser envs support document.cookie + (function standardBrowserEnv() { + return { + write: function write(name, value, expires, path, domain, secure) { + var cookie = []; + cookie.push(name + '=' + encodeURIComponent(value)); + + if (utils.isNumber(expires)) { + cookie.push('expires=' + new Date(expires).toGMTString()); + } + + if (utils.isString(path)) { + cookie.push('path=' + path); + } + + if (utils.isString(domain)) { + cookie.push('domain=' + domain); + } + + if (secure === true) { + cookie.push('secure'); + } + + document.cookie = cookie.join('; '); + }, + + read: function read(name) { + var match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)')); + return match ? decodeURIComponent(match[3]) : null; + }, + + remove: function remove(name) { + this.write(name, '', Date.now() - 86400000); + }, + }; + })() + : // Non standard browser env (web workers, react-native) lack needed support. + (function nonStandardBrowserEnv() { + return { + write: function write() {}, + read: function read() { + return null; + }, + remove: function remove() {}, + }; + })(); + + /***/ + }, + /* 381 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + /** + * Determines whether the specified URL is absolute + * + * @param {string} url The URL to test + * @returns {boolean} True if the specified URL is absolute, otherwise false + */ + module.exports = function isAbsoluteURL(url) { + // A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL). + // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed + // by any combination of letters, digits, plus, period, or hyphen. + return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url); + }; + + /***/ + }, + /* 382 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var utils = __webpack_require__(35); + + module.exports = utils.isStandardBrowserEnv() + ? // Standard browser envs have full support of the APIs needed to test + // whether the request URL is of the same origin as current location. + (function standardBrowserEnv() { + var msie = /(msie|trident)/i.test(navigator.userAgent); + var urlParsingNode = document.createElement('a'); + var originURL; + + /** + * Parse a URL to discover it's components + * + * @param {String} url The URL to be parsed + * @returns {Object} + */ + function resolveURL(url) { + var href = url; + + if (msie) { + // IE needs attribute set twice to normalize properties + urlParsingNode.setAttribute('href', href); + href = urlParsingNode.href; + } + + urlParsingNode.setAttribute('href', href); + + // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils + return { + href: urlParsingNode.href, + protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '', + host: urlParsingNode.host, + search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '', + hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '', + hostname: urlParsingNode.hostname, + port: urlParsingNode.port, + pathname: + urlParsingNode.pathname.charAt(0) === '/' + ? urlParsingNode.pathname + : '/' + urlParsingNode.pathname, + }; + } + + originURL = resolveURL(window.location.href); + + /** + * Determine if a URL shares the same origin as the current location + * + * @param {String} requestURL The URL to test + * @returns {boolean} True if URL shares the same origin, otherwise false + */ + return function isURLSameOrigin(requestURL) { + var parsed = utils.isString(requestURL) ? resolveURL(requestURL) : requestURL; + return parsed.protocol === originURL.protocol && parsed.host === originURL.host; + }; + })() + : // Non standard browser envs (web workers, react-native) lack needed support. + (function nonStandardBrowserEnv() { + return function isURLSameOrigin() { + return true; + }; + })(); + + /***/ + }, + /* 383 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var utils = __webpack_require__(35); + + module.exports = function normalizeHeaderName(headers, normalizedName) { + utils.forEach(headers, function processHeader(value, name) { + if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) { + headers[normalizedName] = value; + delete headers[name]; + } + }); + }; + + /***/ + }, + /* 384 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var utils = __webpack_require__(35); + + /** + * Parse headers into an object + * + * ``` + * Date: Wed, 27 Aug 2014 08:58:49 GMT + * Content-Type: application/json + * Connection: keep-alive + * Transfer-Encoding: chunked + * ``` + * + * @param {String} headers Headers needing to be parsed + * @returns {Object} Headers parsed into an object + */ + module.exports = function parseHeaders(headers) { + var parsed = {}; + var key; + var val; + var i; + + if (!headers) { + return parsed; + } + + utils.forEach(headers.split('\n'), function parser(line) { + i = line.indexOf(':'); + key = utils.trim(line.substr(0, i)).toLowerCase(); + val = utils.trim(line.substr(i + 1)); + + if (key) { + parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val; + } + }); + + return parsed; + }; + + /***/ + }, + /* 385 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + /** + * Syntactic sugar for invoking a function and expanding an array for arguments. + * + * Common use case would be to use `Function.prototype.apply`. + * + * ```js + * function f(x, y, z) {} + * var args = [1, 2, 3]; + * f.apply(null, args); + * ``` + * + * With `spread` this example can be re-written. + * + * ```js + * spread(function(x, y, z) {})([1, 2, 3]); + * ``` + * + * @param {Function} callback + * @returns {Function} + */ + module.exports = function spread(callback) { + return function wrap(arr) { + return callback.apply(null, arr); + }; + }; + + /***/ + }, + /* 386 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + var _react = __webpack_require__(1); + + var _react2 = _interopRequireDefault(_react); + + var _immutable = __webpack_require__(139); + + var _immutable2 = _interopRequireDefault(_immutable); + + var _actioncable = __webpack_require__(368); + + var _actioncable2 = _interopRequireDefault(_actioncable); + + var _lodash = __webpack_require__(114); + + var _lodash2 = _interopRequireDefault(_lodash); + + var _BaseComponent2 = __webpack_require__(36); + + var _BaseComponent3 = _interopRequireDefault(_BaseComponent2); + + var _reactIntl = __webpack_require__(101); + + var _selectLanguage = __webpack_require__(238); + + var _selectLanguage2 = _interopRequireDefault(_selectLanguage); + + var _default = __webpack_require__(88); + + var _CommentForm = __webpack_require__(231); + + var _CommentForm2 = _interopRequireDefault(_CommentForm); + + var _CommentList = __webpack_require__(232); + + var _CommentList2 = _interopRequireDefault(_CommentList); + + var _CommentBox = __webpack_require__(642); + + var _CommentBox2 = _interopRequireDefault(_CommentBox); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + var CommentBox = (function (_BaseComponent) { + _inherits(CommentBox, _BaseComponent); + + function CommentBox() { + _classCallCheck(this, CommentBox); + + var _this = _possibleConstructorReturn( + this, + (CommentBox.__proto__ || Object.getPrototypeOf(CommentBox)).call(this), + ); + + _lodash2.default.bindAll(_this, ['refreshComments']); + _this.cable = null; + return _this; + } + + _createClass(CommentBox, [ + { + key: 'subscribeChannel', + value: function subscribeChannel() { + var messageReceived = this.props.actions.messageReceived; + + var protocol = window.location.protocol === 'https:' ? 'wss://' : 'ws://'; + var cableUrl = '' + protocol + window.location.hostname + ':' + window.location.port + '/cable'; + this.cable = _actioncable2.default.createConsumer(cableUrl); + + /* eslint no-console: ["error", { allow: ["log"] }] */ + this.cable.subscriptions.create( + { channel: 'CommentsChannel' }, + { + connected: function connected() { + console.log('connected'); + }, + disconnected: function disconnected() { + console.log('disconnected'); + }, + received: function received(comment) { + messageReceived(_immutable2.default.fromJS(comment)); + }, + }, + ); + }, + }, + { + key: 'componentDidMount', + value: function componentDidMount() { + var fetchComments = this.props.actions.fetchComments; + + fetchComments(); + this.subscribeChannel(); + }, + }, + { + key: 'componentWillUnmount', + value: function componentWillUnmount() { + this.cable.subscriptions.remove({ channel: 'CommentsChannel' }); + }, + }, + { + key: 'refreshComments', + value: function refreshComments() { + var fetchComments = this.props.actions.fetchComments; + + fetchComments(); + }, + }, + { + key: 'render', + value: function render() { + var _props = this.props, + actions = _props.actions, + data = _props.data, + intl = _props.intl; + var formatMessage = intl.formatMessage; + + var cssTransitionGroupClassNames = { + enter: _CommentBox2.default.elementEnter, + enterActive: _CommentBox2.default.elementEnterActive, + leave: _CommentBox2.default.elementLeave, + leaveActive: _CommentBox2.default.elementLeaveActive, + }; + var locale = data.get('locale') || _default.defaultLocale; + + /* eslint-disable no-script-url */ + return _react2.default.createElement( + 'div', + { className: 'commentBox container' }, + _react2.default.createElement( + 'h2', + null, + formatMessage(_default.defaultMessages.comments), + data.get('isFetching') && formatMessage(_default.defaultMessages.loading), + ), + (0, _selectLanguage2.default)(actions.setLocale, locale), + _react2.default.createElement( + 'ul', + null, + _react2.default.createElement( + 'li', + null, + (data.get('isFetching') && _react2.default.createElement('br', null)) || + _react2.default.createElement( + 'a', + { href: 'javascript:void(0)', onClick: this.refreshComments }, + formatMessage(_default.defaultMessages.descriptionForceRefrech), + ), + ), + _react2.default.createElement( + 'li', + null, + formatMessage(_default.defaultMessages.descriptionSupportMarkdown), + ), + _react2.default.createElement( + 'li', + null, + formatMessage(_default.defaultMessages.descriptionDeleteRule), + ), + _react2.default.createElement( + 'li', + null, + formatMessage(_default.defaultMessages.descriptionSubmitRule), + ), + _react2.default.createElement( + 'li', + null, + formatMessage(_default.defaultMessages.descriptionSeeActionCable), + ), + ), + _react2.default.createElement(_CommentForm2.default, { + isSaving: data.get('isSaving'), + error: data.get('submitCommentError'), + actions: actions, + cssTransitionGroupClassNames: cssTransitionGroupClassNames, + }), + _react2.default.createElement(_CommentList2.default, { + $$comments: data.get('$$comments'), + error: data.get('fetchCommentError'), + cssTransitionGroupClassNames: cssTransitionGroupClassNames, + }), + ); + }, + }, + ]); + + return CommentBox; + })(_BaseComponent3.default); + + CommentBox.propTypes = { + pollInterval: _react.PropTypes.number.isRequired, + actions: _react.PropTypes.shape({ + fetchComments: _react2.default.PropTypes.function, + }), + data: _react.PropTypes.shape({ + isFetching: _react2.default.PropTypes.boolean, + isSaving: _react2.default.PropTypes.boolean, + submitCommentError: _react2.default.PropTypes.string, + $$comments: _react2.default.PropTypes.arrayOf(_CommentList.CommentPropTypes), + }).isRequired, + intl: _reactIntl.intlShape.isRequired, + }; + exports.default = (0, _reactIntl.injectIntl)(CommentBox); + + /***/ + }, + /* 387 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + var _BaseComponent2 = __webpack_require__(36); + + var _BaseComponent3 = _interopRequireDefault(_BaseComponent2); + + var _react = __webpack_require__(1); + + var _react2 = _interopRequireDefault(_react); + + var _marked = __webpack_require__(706); + + var _marked2 = _interopRequireDefault(_marked); + + var _Comment = __webpack_require__(644); + + var _Comment2 = _interopRequireDefault(_Comment); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + var Comment = (function (_BaseComponent) { + _inherits(Comment, _BaseComponent); + + function Comment() { + _classCallCheck(this, Comment); + + return _possibleConstructorReturn( + this, + (Comment.__proto__ || Object.getPrototypeOf(Comment)).apply(this, arguments), + ); + } + + _createClass(Comment, [ + { + key: 'render', + value: function render() { + var _props = this.props, + author = _props.author, + text = _props.text; + + var rawMarkup = (0, _marked2.default)(text, { gfm: true, sanitize: true }); + + /* eslint-disable react/no-danger */ + return _react2.default.createElement( + 'div', + { className: _Comment2.default.comment }, + _react2.default.createElement( + 'h2', + { className: _Comment2.default.commentAuthor + ' js-comment-author' }, + author, + ), + _react2.default.createElement('span', { + dangerouslySetInnerHTML: { __html: rawMarkup }, + className: 'js-comment-text', + }), + ); + }, + }, + ]); + + return Comment; + })(_BaseComponent3.default); + + Comment.propTypes = { + author: _react.PropTypes.string.isRequired, + text: _react.PropTypes.string.isRequired, + }; + exports.default = Comment; + + /***/ + }, + /* 388 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + + var _react = __webpack_require__(1); + + var _react2 = _interopRequireDefault(_react); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + var href = + 'https://github.com/shakacode/react_on_rails/blob/master/README.md#multiple-react-' + + 'components-on-a-page-with-one-store'; + var CommentsCount = function CommentsCount(props) { + return _react2.default.createElement( + 'li', + null, + _react2.default.createElement( + 'a', + { id: 'js-comment-count', href: href }, + 'Comments: ', + props.commentsCount, + ), + ); + }; + + CommentsCount.propTypes = { + commentsCount: _react.PropTypes.number.isRequired, + }; + + exports.default = CommentsCount; + + /***/ + }, + /* 389 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + var _react = __webpack_require__(1); + + var _react2 = _interopRequireDefault(_react); + + var _axios = __webpack_require__(224); + + var _axios2 = _interopRequireDefault(_axios); + + var _immutable = __webpack_require__(139); + + var _immutable2 = _interopRequireDefault(_immutable); + + var _lodash = __webpack_require__(114); + + var _lodash2 = _interopRequireDefault(_lodash); + + var _reactOnRails = __webpack_require__(102); + + var _reactOnRails2 = _interopRequireDefault(_reactOnRails); + + var _reactIntl = __webpack_require__(101); + + var _BaseComponent3 = __webpack_require__(36); + + var _BaseComponent4 = _interopRequireDefault(_BaseComponent3); + + var _selectLanguage = __webpack_require__(238); + + var _selectLanguage2 = _interopRequireDefault(_selectLanguage); + + var _default = __webpack_require__(88); + + var _translations = __webpack_require__(146); + + var _CommentForm = __webpack_require__(231); + + var _CommentForm2 = _interopRequireDefault(_CommentForm); + + var _CommentList = __webpack_require__(232); + + var _CommentList2 = _interopRequireDefault(_CommentList); + + var _SimpleCommentScreen = __webpack_require__(646); + + var _SimpleCommentScreen2 = _interopRequireDefault(_SimpleCommentScreen); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + var SimpleCommentScreen = (function (_BaseComponent) { + _inherits(SimpleCommentScreen, _BaseComponent); + + function SimpleCommentScreen(props) { + _classCallCheck(this, SimpleCommentScreen); + + var _this = _possibleConstructorReturn( + this, + (SimpleCommentScreen.__proto__ || Object.getPrototypeOf(SimpleCommentScreen)).call(this, props), + ); + + _this.state = { + $$comments: _immutable2.default.fromJS([]), + isSaving: false, + fetchCommentsError: null, + submitCommentError: null, + }; + + _lodash2.default.bindAll(_this, 'fetchComments', 'handleCommentSubmit'); + return _this; + } + + _createClass(SimpleCommentScreen, [ + { + key: 'componentDidMount', + value: function componentDidMount() { + this.fetchComments(); + }, + }, + { + key: 'fetchComments', + value: function fetchComments() { + var _this2 = this; + + return _axios2.default + .get('comments.json', { responseType: 'json' }) + .then(function (res) { + return _this2.setState({ $$comments: _immutable2.default.fromJS(res.data.comments) }); + }) + .catch(function (error) { + return _this2.setState({ fetchCommentsError: error }); + }); + }, + }, + { + key: 'handleCommentSubmit', + value: function handleCommentSubmit(comment) { + var _this3 = this; + + this.setState({ isSaving: true }); + + var requestConfig = { + responseType: 'json', + headers: _reactOnRails2.default.authenticityHeaders(), + }; + + return _axios2.default + .post('comments.json', { comment: comment }, requestConfig) + .then(function () { + var $$comments = _this3.state.$$comments; + + var $$comment = _immutable2.default.fromJS(comment); + + _this3.setState({ + $$comments: $$comments.unshift($$comment), + submitCommentError: null, + isSaving: false, + }); + }) + .catch(function (error) { + _this3.setState({ + submitCommentError: error, + isSaving: false, + }); + }); + }, + }, + { + key: 'render', + value: function render() { + var _props = this.props, + handleSetLocale = _props.handleSetLocale, + locale = _props.locale, + intl = _props.intl; + var formatMessage = intl.formatMessage; + + var cssTransitionGroupClassNames = { + enter: _SimpleCommentScreen2.default.elementEnter, + enterActive: _SimpleCommentScreen2.default.elementEnterActive, + leave: _SimpleCommentScreen2.default.elementLeave, + leaveActive: _SimpleCommentScreen2.default.elementLeaveActive, + }; + + return _react2.default.createElement( + 'div', + { className: 'commentBox container' }, + _react2.default.createElement('h2', null, formatMessage(_default.defaultMessages.comments)), + (0, _selectLanguage2.default)(handleSetLocale, locale), + _react2.default.createElement( + 'ul', + null, + _react2.default.createElement( + 'li', + null, + formatMessage(_default.defaultMessages.descriptionSupportMarkdown), + ), + _react2.default.createElement( + 'li', + null, + formatMessage(_default.defaultMessages.descriptionDeleteRule), + ), + _react2.default.createElement( + 'li', + null, + formatMessage(_default.defaultMessages.descriptionSubmitRule), + ), + ), + _react2.default.createElement(_CommentForm2.default, { + isSaving: this.state.isSaving, + actions: { submitComment: this.handleCommentSubmit }, + error: this.state.submitCommentError, + cssTransitionGroupClassNames: cssTransitionGroupClassNames, + }), + _react2.default.createElement(_CommentList2.default, { + $$comments: this.state.$$comments, + error: this.state.fetchCommentsError, + cssTransitionGroupClassNames: cssTransitionGroupClassNames, + }), + ); + }, + }, + ]); + + return SimpleCommentScreen; + })(_BaseComponent4.default); + + var I18nWrapper = (function (_BaseComponent2) { + _inherits(I18nWrapper, _BaseComponent2); + + function I18nWrapper(props) { + _classCallCheck(this, I18nWrapper); + + var _this4 = _possibleConstructorReturn( + this, + (I18nWrapper.__proto__ || Object.getPrototypeOf(I18nWrapper)).call(this, props), + ); + + _this4.state = { + locale: _default.defaultLocale, + }; + + _lodash2.default.bindAll(_this4, 'handleSetLocale'); + return _this4; + } + + _createClass(I18nWrapper, [ + { + key: 'handleSetLocale', + value: function handleSetLocale(locale) { + this.setState({ locale: locale }); + }, + }, + { + key: 'render', + value: function render() { + var locale = this.state.locale; + + var messages = _translations.translations[locale]; + var InjectedSimpleCommentScreen = (0, _reactIntl.injectIntl)(SimpleCommentScreen); + + return _react2.default.createElement( + _reactIntl.IntlProvider, + { locale: locale, key: locale, messages: messages }, + _react2.default.createElement( + InjectedSimpleCommentScreen, + _extends({}, this.props, { + locale: locale, + handleSetLocale: this.handleSetLocale, + }), + ), + ); + }, + }, + ]); + + return I18nWrapper; + })(_BaseComponent4.default); + + exports.default = I18nWrapper; + + /***/ + }, + /* 390 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + var _react = __webpack_require__(1); + + var _react2 = _interopRequireDefault(_react); + + var _BaseComponent2 = __webpack_require__(36); + + var _BaseComponent3 = _interopRequireDefault(_BaseComponent2); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + var TestReactRouter = (function (_BaseComponent) { + _inherits(TestReactRouter, _BaseComponent); + + function TestReactRouter() { + _classCallCheck(this, TestReactRouter); + + return _possibleConstructorReturn( + this, + (TestReactRouter.__proto__ || Object.getPrototypeOf(TestReactRouter)).apply(this, arguments), + ); + } + + _createClass(TestReactRouter, [ + { + key: 'render', + value: function render() { + return _react2.default.createElement( + 'div', + { className: 'container' }, + _react2.default.createElement('h1', null, 'React Router is working!'), + _react2.default.createElement( + 'p', + null, + 'Woohoo, we can use ', + _react2.default.createElement('code', null, 'react-router'), + ' here!', + ), + ); + }, + }, + ]); + + return TestReactRouter; + })(_BaseComponent3.default); + + exports.default = TestReactRouter; + + /***/ + }, + /* 391 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + var _react = __webpack_require__(1); + + var _react2 = _interopRequireDefault(_react); + + var _BaseComponent2 = __webpack_require__(36); + + var _BaseComponent3 = _interopRequireDefault(_BaseComponent2); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + var TestReactRouterRedirect = (function (_BaseComponent) { + _inherits(TestReactRouterRedirect, _BaseComponent); + + function TestReactRouterRedirect() { + _classCallCheck(this, TestReactRouterRedirect); + + return _possibleConstructorReturn( + this, + (TestReactRouterRedirect.__proto__ || Object.getPrototypeOf(TestReactRouterRedirect)).apply( + this, + arguments, + ), + ); + } + + _createClass( + TestReactRouterRedirect, + [ + { + key: 'render', + value: function render() { + return _react2.default.createElement('div', null, 'Nope.'); + }, + }, + ], + [ + { + key: 'checkAuth', + value: function checkAuth(nextState, replace) { + // Hard code this to demonstrate the effect + var notAuthorized = true; + if (notAuthorized) { + replace({ pathname: '/', state: { redirectFrom: nextState.location.pathname } }); + } + }, + }, + ], + ); + + return TestReactRouterRedirect; + })(_BaseComponent3.default); + + exports.default = TestReactRouterRedirect; + + /***/ + }, + /* 392 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + var _react = __webpack_require__(1); + + var _react2 = _interopRequireDefault(_react); + + var _reactRedux = __webpack_require__(104); + + var _BaseComponent2 = __webpack_require__(36); + + var _BaseComponent3 = _interopRequireDefault(_BaseComponent2); + + var _NavigationBar = __webpack_require__(234); + + var _NavigationBar2 = _interopRequireDefault(_NavigationBar); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + function stateToProps(state) { + // Which part of the Redux global state does our component want to receive as props? + if (state.$$commentsStore) { + return { + commentsCount: state.$$commentsStore.get('$$comments').size, + pathname: state.railsContext.pathname, + }; + } + return {}; + } + + var NavigationBarContainer = (function (_BaseComponent) { + _inherits(NavigationBarContainer, _BaseComponent); + + function NavigationBarContainer() { + _classCallCheck(this, NavigationBarContainer); + + return _possibleConstructorReturn( + this, + (NavigationBarContainer.__proto__ || Object.getPrototypeOf(NavigationBarContainer)).apply( + this, + arguments, + ), + ); + } + + _createClass(NavigationBarContainer, [ + { + key: 'render', + value: function render() { + var _props = this.props, + commentsCount = _props.commentsCount, + pathname = _props.pathname; + + return _react2.default.createElement(_NavigationBar2.default, { + commentsCount: commentsCount, + pathname: pathname, + }); + }, + }, + ]); + + return NavigationBarContainer; + })(_BaseComponent3.default); + + // Don't forget to actually use connect! + + NavigationBarContainer.propTypes = { + commentsCount: _react.PropTypes.number.isRequired, + pathname: _react.PropTypes.string.isRequired, + }; + exports.default = (0, _reactRedux.connect)(stateToProps)(NavigationBarContainer); + + /***/ + }, + /* 393 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (global) { + Object.defineProperty(exports, '__esModule', { + value: true, + }); + + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + var _react = __webpack_require__(1); + + var _react2 = _interopRequireDefault(_react); + + var _reactRedux = __webpack_require__(104); + + var _redux = __webpack_require__(119); + + var _BaseComponent2 = __webpack_require__(36); + + var _BaseComponent3 = _interopRequireDefault(_BaseComponent2); + + var _reactIntl = __webpack_require__(101); + + var _translations = __webpack_require__(146); + + var _default = __webpack_require__(88); + + var _intl = __webpack_require__(298); + + var _intl2 = _interopRequireDefault(_intl); + + var _CommentScreen = __webpack_require__(233); + + var _CommentScreen2 = _interopRequireDefault(_CommentScreen); + + var _commentsActionCreators = __webpack_require__(230); + + var commentsActionCreators = _interopRequireWildcard(_commentsActionCreators); + + function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; + } + } + newObj.default = obj; + return newObj; + } + } + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + // polyfill for server-side rendering, required by react-intl + + global.Intl = _intl2.default; + + function select(state) { + // Which part of the Redux global state does our component want to receive as props? + return { data: state.$$commentsStore }; + } + + var NonRouterCommentsContainer = (function (_BaseComponent) { + _inherits(NonRouterCommentsContainer, _BaseComponent); + + function NonRouterCommentsContainer() { + _classCallCheck(this, NonRouterCommentsContainer); + + return _possibleConstructorReturn( + this, + ( + NonRouterCommentsContainer.__proto__ || Object.getPrototypeOf(NonRouterCommentsContainer) + ).apply(this, arguments), + ); + } + + _createClass(NonRouterCommentsContainer, [ + { + key: 'render', + value: function render() { + var _props = this.props, + dispatch = _props.dispatch, + data = _props.data; + + var actions = (0, _redux.bindActionCreators)(commentsActionCreators, dispatch); + var locale = data.get('locale') || _default.defaultLocale; + var messages = _translations.translations[locale]; + + return _react2.default.createElement( + _reactIntl.IntlProvider, + { locale: locale, key: locale, messages: messages }, + _react2.default.createElement(_CommentScreen2.default, { actions: actions, data: data }), + ); + }, + }, + ]); + + return NonRouterCommentsContainer; + })(_BaseComponent3.default); + + // Don't forget to actually use connect! + + NonRouterCommentsContainer.propTypes = { + dispatch: _react.PropTypes.func.isRequired, + data: _react.PropTypes.object.isRequired, + }; + exports.default = (0, _reactRedux.connect)(select)(NonRouterCommentsContainer); + /* WEBPACK VAR INJECTION */ + }).call(exports, __webpack_require__(22)); + + /***/ + }, + /* 394 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (global) { + Object.defineProperty(exports, '__esModule', { + value: true, + }); + + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + var _react = __webpack_require__(1); + + var _react2 = _interopRequireDefault(_react); + + var _reactRedux = __webpack_require__(104); + + var _redux = __webpack_require__(119); + + var _reactIntl = __webpack_require__(101); + + var _intl = __webpack_require__(298); + + var _intl2 = _interopRequireDefault(_intl); + + var _default = __webpack_require__(88); + + var _translations = __webpack_require__(146); + + var _BaseComponent2 = __webpack_require__(36); + + var _BaseComponent3 = _interopRequireDefault(_BaseComponent2); + + var _CommentScreen = __webpack_require__(233); + + var _CommentScreen2 = _interopRequireDefault(_CommentScreen); + + var _commentsActionCreators = __webpack_require__(230); + + var commentsActionCreators = _interopRequireWildcard(_commentsActionCreators); + + function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; + } + } + newObj.default = obj; + return newObj; + } + } + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + global.Intl = _intl2.default; + + function select(state) { + // Which part of the Redux global state does our component want to receive as props? + return { data: state.$$commentsStore }; + } + + var RouterCommentsContainer = (function (_BaseComponent) { + _inherits(RouterCommentsContainer, _BaseComponent); + + function RouterCommentsContainer() { + _classCallCheck(this, RouterCommentsContainer); + + return _possibleConstructorReturn( + this, + (RouterCommentsContainer.__proto__ || Object.getPrototypeOf(RouterCommentsContainer)).apply( + this, + arguments, + ), + ); + } + + _createClass(RouterCommentsContainer, [ + { + key: 'render', + value: function render() { + var _props = this.props, + dispatch = _props.dispatch, + data = _props.data; + + var actions = (0, _redux.bindActionCreators)(commentsActionCreators, dispatch); + var locationState = this.props.location.state; + var locale = data.get('locale') || _default.defaultLocale; + var messages = _translations.translations[locale]; + + return _react2.default.createElement( + _reactIntl.IntlProvider, + { locale: locale, key: locale, messages: messages }, + _react2.default.createElement(_CommentScreen2.default, { + actions: actions, + data: data, + locationState: locationState, + }), + ); + }, + }, + ]); + + return RouterCommentsContainer; + })(_BaseComponent3.default); + + // Don't forget to actually use connect! + + RouterCommentsContainer.propTypes = { + dispatch: _react.PropTypes.func.isRequired, + data: _react.PropTypes.object.isRequired, + location: _react.PropTypes.shape({ + state: _react.PropTypes.object, + }).isRequired, + }; + exports.default = (0, _reactRedux.connect)(select)(RouterCommentsContainer); + /* WEBPACK VAR INJECTION */ + }).call(exports, __webpack_require__(22)); + + /***/ + }, + /* 395 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + var _react = __webpack_require__(1); + + var _react2 = _interopRequireDefault(_react); + + var _reactRouter = __webpack_require__(218); + + var _BaseComponent2 = __webpack_require__(36); + + var _BaseComponent3 = _interopRequireDefault(_BaseComponent2); + + __webpack_require__(647); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + var Layout = (function (_BaseComponent) { + _inherits(Layout, _BaseComponent); + + function Layout() { + _classCallCheck(this, Layout); + + return _possibleConstructorReturn( + this, + (Layout.__proto__ || Object.getPrototypeOf(Layout)).apply(this, arguments), + ); + } + + _createClass(Layout, [ + { + key: 'render', + + /* eslint-disable react/no-unescaped-entities */ + value: function render() { + return _react2.default.createElement( + 'section', + null, + _react2.default.createElement( + 'header', + null, + _react2.default.createElement( + 'ul', + null, + _react2.default.createElement( + 'li', + null, + _react2.default.createElement( + _reactRouter.IndexLink, + { to: '/', activeClassName: 'active' }, + 'Comments (Root URL)', + ), + ), + _react2.default.createElement( + 'li', + null, + _react2.default.createElement( + _reactRouter.Link, + { to: '/react-router', activeClassName: 'active' }, + "Test React Router ('/react-router')", + ), + ), + _react2.default.createElement( + 'li', + null, + _react2.default.createElement( + _reactRouter.Link, + { to: '/react-router/redirect', activeClassName: 'active' }, + "Test Redirect (url to '/react-router/redirect' which goes to root '/')", + ), + ), + ), + ), + this.props.children, + ); + }, + }, + ]); + + return Layout; + })(_BaseComponent3.default); + + Layout.propTypes = { + children: _react.PropTypes.object.isRequired, + }; + exports.default = Layout; + + /***/ + }, + /* 396 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.$$initialState = undefined; + exports.default = commentsReducer; + + var _immutable = __webpack_require__(139); + + var _immutable2 = _interopRequireDefault(_immutable); + + var _commentsConstants = __webpack_require__(235); + + var actionTypes = _interopRequireWildcard(_commentsConstants); + + function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; + } + } + newObj.default = obj; + return newObj; + } + } + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + /* eslint new-cap: 0 */ + + var $$initialState = (exports.$$initialState = _immutable2.default.fromJS({ + $$comments: [], + fetchCommentError: null, + submitCommentError: null, + isFetching: false, + isSaving: false, + locale: null, + })); + + function commentsReducer() { + var $$state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : $$initialState; + var action = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; + var type = action.type, + comment = action.comment, + comments = action.comments, + error = action.error, + locale = action.locale; + + switch (type) { + case actionTypes.FETCH_COMMENTS_SUCCESS: { + return $$state.merge({ + $$comments: comments, + fetchCommentError: null, + isFetching: false, + }); + } + + case actionTypes.FETCH_COMMENTS_FAILURE: { + return $$state.merge({ + fetchCommentError: error, + isFetching: false, + }); + } + + case actionTypes.MESSAGE_RECEIVED: { + return $$state.withMutations(function (state) { + return state.updateIn(['$$comments'], function ($$comments) { + return $$comments.findIndex(function (com) { + return com.get('id') === comment.get('id'); + }) === -1 + ? $$comments.unshift(_immutable2.default.fromJS(comment)) + : $$comments; + }); + }); + } + + case actionTypes.SUBMIT_COMMENT_SUCCESS: { + return $$state.withMutations(function (state) { + return state + .updateIn(['$$comments'], function ($$comments) { + return $$comments.unshift(_immutable2.default.fromJS(comment)); + }) + .merge({ + submitCommentError: null, + isSaving: false, + }); + }); + } + + case actionTypes.SUBMIT_COMMENT_FAILURE: { + return $$state.merge({ + submitCommentError: error, + isSaving: false, + }); + } + + case actionTypes.SET_IS_FETCHING: { + return $$state.merge({ + isFetching: true, + }); + } + + case actionTypes.SET_IS_SAVING: { + return $$state.merge({ + isSaving: true, + }); + } + + case actionTypes.SET_LOCALE: { + return $$state.merge({ + locale: locale, + }); + } + + default: { + return $$state; + } + } + } + + /***/ + }, + /* 397 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.default = railsContextReducer; + var initialState = (exports.initialState = {}); + + function railsContextReducer() { + var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState; + + return state; + } + + /***/ + }, + /* 398 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + + var _react = __webpack_require__(1); + + var _react2 = _interopRequireDefault(_react); + + var _reactRouter = __webpack_require__(218); + + var _Layout = __webpack_require__(395); + + var _Layout2 = _interopRequireDefault(_Layout); + + var _TestReactRouter = __webpack_require__(390); + + var _TestReactRouter2 = _interopRequireDefault(_TestReactRouter); + + var _TestReactRouterRedirect = __webpack_require__(391); + + var _TestReactRouterRedirect2 = _interopRequireDefault(_TestReactRouterRedirect); + + var _RouterCommentsContainer = __webpack_require__(394); + + var _RouterCommentsContainer2 = _interopRequireDefault(_RouterCommentsContainer); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + exports.default = _react2.default.createElement( + _reactRouter.Route, + { path: '/', component: _Layout2.default }, + _react2.default.createElement(_reactRouter.IndexRoute, { + component: _RouterCommentsContainer2.default, + }), + _react2.default.createElement(_reactRouter.Route, { + path: 'react-router', + component: _TestReactRouter2.default, + }), + _react2.default.createElement(_reactRouter.Route, { + path: 'react-router/redirect', + component: _TestReactRouterRedirect2.default, + onEnter: _TestReactRouterRedirect2.default.checkAuth, + }), + ); + + /***/ + }, + /* 399 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + + var _react = __webpack_require__(1); + + var _react2 = _interopRequireDefault(_react); + + var _reactRedux = __webpack_require__(104); + + var _reactOnRails = __webpack_require__(102); + + var _reactOnRails2 = _interopRequireDefault(_reactOnRails); + + var _NonRouterCommentsContainer = __webpack_require__(393); + + var _NonRouterCommentsContainer2 = _interopRequireDefault(_NonRouterCommentsContainer); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + exports.default = function (_props, _railsContext) { + var store = _reactOnRails2.default.getStore('commentsStore'); + + return _react2.default.createElement( + _reactRedux.Provider, + { store: store }, + _react2.default.createElement(_NonRouterCommentsContainer2.default, null), + ); + }; + + /***/ + }, + /* 400 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + + var _react = __webpack_require__(1); + + var _react2 = _interopRequireDefault(_react); + + var _reactOnRails = __webpack_require__(102); + + var _reactOnRails2 = _interopRequireDefault(_reactOnRails); + + var _reactRedux = __webpack_require__(104); + + var _NavigationBar = __webpack_require__(234); + + var _NavigationBar2 = _interopRequireDefault(_NavigationBar); + + var _NavigationBarContainer = __webpack_require__(392); + + var _NavigationBarContainer2 = _interopRequireDefault(_NavigationBarContainer); + + var _paths = __webpack_require__(236); + + var paths = _interopRequireWildcard(_paths); + + function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; + } + } + newObj.default = obj; + return newObj; + } + } + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + /* + * Export a function that returns a ReactComponent, depending on a store named SharedReduxStore. + * This is used for the client rendering hook after the page html is rendered. + * React will see that the state is the same and not do anything. + */ + // Top level component for client side. + // Compare this to the ./ServerApp.jsx file which is used for server side rendering. + + exports.default = function (_props, railsContext) { + // This is where we get the existing store. + var pathname = railsContext.pathname; + + var store = void 0; + if (pathname === paths.ROUTER_PATH) { + store = _reactOnRails2.default.getStore('routerCommentsStore', false); + } else if (pathname === paths.NO_ROUTER_PATH) { + store = _reactOnRails2.default.getStore('commentsStore', false); + } else { + return _react2.default.createElement(_NavigationBar2.default, { pathname: pathname }); + } + + return _react2.default.createElement( + _reactRedux.Provider, + { store: store }, + _react2.default.createElement(_NavigationBarContainer2.default, null), + ); + }; + + /***/ + }, + /* 401 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + + var _react = __webpack_require__(1); + + var _react2 = _interopRequireDefault(_react); + + var _reactRedux = __webpack_require__(104); + + var _reactRouter = __webpack_require__(218); + + var _reactOnRails = __webpack_require__(102); + + var _reactOnRails2 = _interopRequireDefault(_reactOnRails); + + var _routes = __webpack_require__(398); + + var _routes2 = _interopRequireDefault(_routes); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + exports.default = function (_props, railsContext) { + var store = _reactOnRails2.default.getStore('routerCommentsStore'); + + var error = void 0; + var redirectLocation = void 0; + var routeProps = void 0; + var location = railsContext.location; + + // See https://github.com/reactjs/react-router/blob/master/docs/guides/ServerRendering.md + + (0, _reactRouter.match)( + { routes: _routes2.default, location: location }, + function (_error, _redirectLocation, _routeProps) { + error = _error; + redirectLocation = _redirectLocation; + routeProps = _routeProps; + }, + ); + + // This tell react_on_rails to skip server rendering any HTML. Note, client rendering + // will handle the redirect. What's key is that we don't try to render. + // Critical to return the Object properties to match this { error, redirectLocation } + if (error || redirectLocation) { + return { error: error, redirectLocation: redirectLocation }; + } + + // Important that you don't do this if you are redirecting or have an error. + return _react2.default.createElement( + _reactRedux.Provider, + { store: store }, + _react2.default.createElement(_reactRouter.RouterContext, routeProps), + ); + }; // Compare to ../ClientRouterApp.jsx + + /***/ + }, + /* 402 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + + var _redux = __webpack_require__(119); + + var _reduxThunk = __webpack_require__(361); + + var _reduxThunk2 = _interopRequireDefault(_reduxThunk); + + var _loggerMiddleware = __webpack_require__(239); + + var _loggerMiddleware2 = _interopRequireDefault(_loggerMiddleware); + + var _reducers = __webpack_require__(237); + + var _reducers2 = _interopRequireDefault(_reducers); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + exports.default = function (props, railsContext) { + var initialComments = props.comments; + var $$commentsState = _reducers.initialStates.$$commentsState; + + var initialState = { + $$commentsStore: $$commentsState.merge({ + $$comments: initialComments, + }), + railsContext: railsContext, + }; + + var reducer = (0, _redux.combineReducers)(_reducers2.default); + var composedStore = (0, _redux.compose)( + (0, _redux.applyMiddleware)(_reduxThunk2.default, _loggerMiddleware2.default), + ); + + return composedStore(_redux.createStore)(reducer, initialState); + }; + + /***/ + }, + /* 403 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + var _redux = __webpack_require__(119); + + var _reactRouterRedux = __webpack_require__(798); + + var _reduxThunk = __webpack_require__(361); + + var _reduxThunk2 = _interopRequireDefault(_reduxThunk); + + var _loggerMiddleware = __webpack_require__(239); + + var _loggerMiddleware2 = _interopRequireDefault(_loggerMiddleware); + + var _reducers = __webpack_require__(237); + + var _reducers2 = _interopRequireDefault(_reducers); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + exports.default = function (props, railsContext) { + var initialComments = props.comments; + var $$commentsState = _reducers.initialStates.$$commentsState; + + var initialState = { + $$commentsStore: $$commentsState.merge({ + $$comments: initialComments, + }), + railsContext: railsContext, + }; + + // https://github.com/reactjs/react-router-redux + var reducer = (0, _redux.combineReducers)( + _extends({}, _reducers2.default, { + routing: _reactRouterRedux.routerReducer, + }), + ); + + // Sync dispatched route actions to the history + var finalCreateStore = (0, _redux.compose)( + (0, _redux.applyMiddleware)(_reduxThunk2.default, _loggerMiddleware2.default), + )(_redux.createStore); + + return finalCreateStore(reducer, initialState); + }; + + /***/ + }, + /* 404 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + + var _axios = __webpack_require__(224); + + var _axios2 = _interopRequireDefault(_axios); + + var _reactOnRails = __webpack_require__(102); + + var _reactOnRails2 = _interopRequireDefault(_reactOnRails); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + var API_URL = 'comments.json'; + + exports.default = { + /** + * Retrieve list of entities from server using AJAX call. + * + * @returns {Promise} - Result of ajax call. + */ + fetchEntities: function fetchEntities() { + return (0, _axios2.default)({ + method: 'GET', + url: API_URL, + responseType: 'json', + }); + }, + + /** + * Submit new entity to server using AJAX call. + * + * @param {Object} entity - Request body to post. + * @returns {Promise} - Result of ajax call. + */ + submitEntity: function submitEntity(entity) { + return (0, _axios2.default)({ + method: 'POST', + url: API_URL, + responseType: 'json', + headers: _reactOnRails2.default.authenticityHeaders(), + data: entity, + }); + }, + }; + + /***/ + }, + /* 405 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = { default: __webpack_require__(417), __esModule: true }; + + /***/ + }, + /* 406 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = { default: __webpack_require__(418), __esModule: true }; + + /***/ + }, + /* 407 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = { default: __webpack_require__(420), __esModule: true }; + + /***/ + }, + /* 408 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = { default: __webpack_require__(422), __esModule: true }; + + /***/ + }, + /* 409 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = { default: __webpack_require__(423), __esModule: true }; + + /***/ + }, + /* 410 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.byteLength = byteLength; + exports.toByteArray = toByteArray; + exports.fromByteArray = fromByteArray; + + var lookup = []; + var revLookup = []; + var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array; + + var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; + for (var i = 0, len = code.length; i < len; ++i) { + lookup[i] = code[i]; + revLookup[code.charCodeAt(i)] = i; + } + + revLookup['-'.charCodeAt(0)] = 62; + revLookup['_'.charCodeAt(0)] = 63; + + function placeHoldersCount(b64) { + var len = b64.length; + if (len % 4 > 0) { + throw new Error('Invalid string. Length must be a multiple of 4'); + } + + // the number of equal signs (place holders) + // if there are two placeholders, than the two characters before it + // represent one byte + // if there is only one, then the three characters before it represent 2 bytes + // this is just a cheap hack to not do indexOf twice + return b64[len - 2] === '=' ? 2 : b64[len - 1] === '=' ? 1 : 0; + } + + function byteLength(b64) { + // base64 is 4/3 + up to two characters of the original data + return (b64.length * 3) / 4 - placeHoldersCount(b64); + } + + function toByteArray(b64) { + var i, j, l, tmp, placeHolders, arr; + var len = b64.length; + placeHolders = placeHoldersCount(b64); + + arr = new Arr((len * 3) / 4 - placeHolders); + + // if there are placeholders, only get up to the last complete 4 chars + l = placeHolders > 0 ? len - 4 : len; + + var L = 0; + + for (i = 0, j = 0; i < l; i += 4, j += 3) { + tmp = + (revLookup[b64.charCodeAt(i)] << 18) | + (revLookup[b64.charCodeAt(i + 1)] << 12) | + (revLookup[b64.charCodeAt(i + 2)] << 6) | + revLookup[b64.charCodeAt(i + 3)]; + arr[L++] = (tmp >> 16) & 0xff; + arr[L++] = (tmp >> 8) & 0xff; + arr[L++] = tmp & 0xff; + } + + if (placeHolders === 2) { + tmp = (revLookup[b64.charCodeAt(i)] << 2) | (revLookup[b64.charCodeAt(i + 1)] >> 4); + arr[L++] = tmp & 0xff; + } else if (placeHolders === 1) { + tmp = + (revLookup[b64.charCodeAt(i)] << 10) | + (revLookup[b64.charCodeAt(i + 1)] << 4) | + (revLookup[b64.charCodeAt(i + 2)] >> 2); + arr[L++] = (tmp >> 8) & 0xff; + arr[L++] = tmp & 0xff; + } + + return arr; + } + + function tripletToBase64(num) { + return ( + lookup[(num >> 18) & 0x3f] + + lookup[(num >> 12) & 0x3f] + + lookup[(num >> 6) & 0x3f] + + lookup[num & 0x3f] + ); + } + + function encodeChunk(uint8, start, end) { + var tmp; + var output = []; + for (var i = start; i < end; i += 3) { + tmp = (uint8[i] << 16) + (uint8[i + 1] << 8) + uint8[i + 2]; + output.push(tripletToBase64(tmp)); + } + return output.join(''); + } + + function fromByteArray(uint8) { + var tmp; + var len = uint8.length; + var extraBytes = len % 3; // if we have 1 byte left, pad 2 bytes + var output = ''; + var parts = []; + var maxChunkLength = 16383; // must be multiple of 3 + + // go through the array every three bytes, we'll deal with trailing stuff later + for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) { + parts.push(encodeChunk(uint8, i, i + maxChunkLength > len2 ? len2 : i + maxChunkLength)); + } + + // pad the end with zeros, but make sure to not forget the extra bytes + if (extraBytes === 1) { + tmp = uint8[len - 1]; + output += lookup[tmp >> 2]; + output += lookup[(tmp << 4) & 0x3f]; + output += '=='; + } else if (extraBytes === 2) { + tmp = (uint8[len - 2] << 8) + uint8[len - 1]; + output += lookup[tmp >> 10]; + output += lookup[(tmp >> 4) & 0x3f]; + output += lookup[(tmp << 2) & 0x3f]; + output += '='; + } + + parts.push(output); + + return parts.join(''); + } + + /***/ + }, + /* 411 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (global) { + /*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org> + * @license MIT + */ + /* eslint-disable no-proto */ + + var base64 = __webpack_require__(410); + var ieee754 = __webpack_require__(669); + var isArray = __webpack_require__(687); + + exports.Buffer = Buffer; + exports.SlowBuffer = SlowBuffer; + exports.INSPECT_MAX_BYTES = 50; + + /** + * If `Buffer.TYPED_ARRAY_SUPPORT`: + * === true Use Uint8Array implementation (fastest) + * === false Use Object implementation (most compatible, even IE6) + * + * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+, + * Opera 11.6+, iOS 4.2+. + * + * Due to various browser bugs, sometimes the Object implementation will be used even + * when the browser supports typed arrays. + * + * Note: + * + * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances, + * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438. + * + * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function. + * + * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of + * incorrect length in some situations. + + * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they + * get the Object implementation, which is slower but behaves correctly. + */ + Buffer.TYPED_ARRAY_SUPPORT = + global.TYPED_ARRAY_SUPPORT !== undefined ? global.TYPED_ARRAY_SUPPORT : typedArraySupport(); + + /* + * Export kMaxLength after typed array support is determined. + */ + exports.kMaxLength = kMaxLength(); + + function typedArraySupport() { + try { + var arr = new Uint8Array(1); + arr.__proto__ = { + __proto__: Uint8Array.prototype, + foo: function () { + return 42; + }, + }; + return ( + arr.foo() === 42 && // typed array instances can be augmented + typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray` + arr.subarray(1, 1).byteLength === 0 + ); // ie10 has broken `subarray` + } catch (e) { + return false; + } + } + + function kMaxLength() { + return Buffer.TYPED_ARRAY_SUPPORT ? 0x7fffffff : 0x3fffffff; + } + + function createBuffer(that, length) { + if (kMaxLength() < length) { + throw new RangeError('Invalid typed array length'); + } + if (Buffer.TYPED_ARRAY_SUPPORT) { + // Return an augmented `Uint8Array` instance, for best performance + that = new Uint8Array(length); + that.__proto__ = Buffer.prototype; + } else { + // Fallback: Return an object instance of the Buffer class + if (that === null) { + that = new Buffer(length); + } + that.length = length; + } + + return that; + } + + /** + * The Buffer constructor returns instances of `Uint8Array` that have their + * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of + * `Uint8Array`, so the returned instances will have all the node `Buffer` methods + * and the `Uint8Array` methods. Square bracket notation works as expected -- it + * returns a single octet. + * + * The `Uint8Array` prototype remains unmodified. + */ + + function Buffer(arg, encodingOrOffset, length) { + if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) { + return new Buffer(arg, encodingOrOffset, length); + } + + // Common case. + if (typeof arg === 'number') { + if (typeof encodingOrOffset === 'string') { + throw new Error('If encoding is specified then the first argument must be a string'); + } + return allocUnsafe(this, arg); + } + return from(this, arg, encodingOrOffset, length); + } + + Buffer.poolSize = 8192; // not used by this implementation + + // TODO: Legacy, not needed anymore. Remove in next major version. + Buffer._augment = function (arr) { + arr.__proto__ = Buffer.prototype; + return arr; + }; + + function from(that, value, encodingOrOffset, length) { + if (typeof value === 'number') { + throw new TypeError('"value" argument must not be a number'); + } + + if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) { + return fromArrayBuffer(that, value, encodingOrOffset, length); + } + + if (typeof value === 'string') { + return fromString(that, value, encodingOrOffset); + } + + return fromObject(that, value); + } + + /** + * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError + * if value is a number. + * Buffer.from(str[, encoding]) + * Buffer.from(array) + * Buffer.from(buffer) + * Buffer.from(arrayBuffer[, byteOffset[, length]]) + **/ + Buffer.from = function (value, encodingOrOffset, length) { + return from(null, value, encodingOrOffset, length); + }; + + if (Buffer.TYPED_ARRAY_SUPPORT) { + Buffer.prototype.__proto__ = Uint8Array.prototype; + Buffer.__proto__ = Uint8Array; + if (typeof Symbol !== 'undefined' && Symbol.species && Buffer[Symbol.species] === Buffer) { + // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97 + Object.defineProperty(Buffer, Symbol.species, { + value: null, + configurable: true, + }); + } + } + + function assertSize(size) { + if (typeof size !== 'number') { + throw new TypeError('"size" argument must be a number'); + } else if (size < 0) { + throw new RangeError('"size" argument must not be negative'); + } + } + + function alloc(that, size, fill, encoding) { + assertSize(size); + if (size <= 0) { + return createBuffer(that, size); + } + if (fill !== undefined) { + // Only pay attention to encoding if it's a string. This + // prevents accidentally sending in a number that would + // be interpretted as a start offset. + return typeof encoding === 'string' + ? createBuffer(that, size).fill(fill, encoding) + : createBuffer(that, size).fill(fill); + } + return createBuffer(that, size); + } + + /** + * Creates a new filled Buffer instance. + * alloc(size[, fill[, encoding]]) + **/ + Buffer.alloc = function (size, fill, encoding) { + return alloc(null, size, fill, encoding); + }; + + function allocUnsafe(that, size) { + assertSize(size); + that = createBuffer(that, size < 0 ? 0 : checked(size) | 0); + if (!Buffer.TYPED_ARRAY_SUPPORT) { + for (var i = 0; i < size; ++i) { + that[i] = 0; + } + } + return that; + } + + /** + * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance. + * */ + Buffer.allocUnsafe = function (size) { + return allocUnsafe(null, size); + }; + /** + * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. + */ + Buffer.allocUnsafeSlow = function (size) { + return allocUnsafe(null, size); + }; + + function fromString(that, string, encoding) { + if (typeof encoding !== 'string' || encoding === '') { + encoding = 'utf8'; + } + + if (!Buffer.isEncoding(encoding)) { + throw new TypeError('"encoding" must be a valid string encoding'); + } + + var length = byteLength(string, encoding) | 0; + that = createBuffer(that, length); + + var actual = that.write(string, encoding); + + if (actual !== length) { + // Writing a hex string, for example, that contains invalid characters will + // cause everything after the first invalid character to be ignored. (e.g. + // 'abxxcd' will be treated as 'ab') + that = that.slice(0, actual); + } + + return that; + } + + function fromArrayLike(that, array) { + var length = array.length < 0 ? 0 : checked(array.length) | 0; + that = createBuffer(that, length); + for (var i = 0; i < length; i += 1) { + that[i] = array[i] & 255; + } + return that; + } + + function fromArrayBuffer(that, array, byteOffset, length) { + array.byteLength; // this throws if `array` is not a valid ArrayBuffer + + if (byteOffset < 0 || array.byteLength < byteOffset) { + throw new RangeError("'offset' is out of bounds"); + } + + if (array.byteLength < byteOffset + (length || 0)) { + throw new RangeError("'length' is out of bounds"); + } + + if (byteOffset === undefined && length === undefined) { + array = new Uint8Array(array); + } else if (length === undefined) { + array = new Uint8Array(array, byteOffset); + } else { + array = new Uint8Array(array, byteOffset, length); + } + + if (Buffer.TYPED_ARRAY_SUPPORT) { + // Return an augmented `Uint8Array` instance, for best performance + that = array; + that.__proto__ = Buffer.prototype; + } else { + // Fallback: Return an object instance of the Buffer class + that = fromArrayLike(that, array); + } + return that; + } + + function fromObject(that, obj) { + if (Buffer.isBuffer(obj)) { + var len = checked(obj.length) | 0; + that = createBuffer(that, len); + + if (that.length === 0) { + return that; + } + + obj.copy(that, 0, 0, len); + return that; + } + + if (obj) { + if ( + (typeof ArrayBuffer !== 'undefined' && obj.buffer instanceof ArrayBuffer) || + 'length' in obj + ) { + if (typeof obj.length !== 'number' || isnan(obj.length)) { + return createBuffer(that, 0); + } + return fromArrayLike(that, obj); + } + + if (obj.type === 'Buffer' && isArray(obj.data)) { + return fromArrayLike(that, obj.data); + } + } + + throw new TypeError( + 'First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.', + ); + } + + function checked(length) { + // Note: cannot use `length < kMaxLength()` here because that fails when + // length is NaN (which is otherwise coerced to zero.) + if (length >= kMaxLength()) { + throw new RangeError( + 'Attempt to allocate Buffer larger than maximum ' + + 'size: 0x' + + kMaxLength().toString(16) + + ' bytes', + ); + } + return length | 0; + } + + function SlowBuffer(length) { + if (+length != length) { + // eslint-disable-line eqeqeq + length = 0; + } + return Buffer.alloc(+length); + } + + Buffer.isBuffer = function isBuffer(b) { + return !!(b != null && b._isBuffer); + }; + + Buffer.compare = function compare(a, b) { + if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) { + throw new TypeError('Arguments must be Buffers'); + } + + if (a === b) return 0; + + var x = a.length; + var y = b.length; + + for (var i = 0, len = Math.min(x, y); i < len; ++i) { + if (a[i] !== b[i]) { + x = a[i]; + y = b[i]; + break; + } + } + + if (x < y) return -1; + if (y < x) return 1; + return 0; + }; + + Buffer.isEncoding = function isEncoding(encoding) { + switch (String(encoding).toLowerCase()) { + case 'hex': + case 'utf8': + case 'utf-8': + case 'ascii': + case 'latin1': + case 'binary': + case 'base64': + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return true; + default: + return false; + } + }; + + Buffer.concat = function concat(list, length) { + if (!isArray(list)) { + throw new TypeError('"list" argument must be an Array of Buffers'); + } + + if (list.length === 0) { + return Buffer.alloc(0); + } + + var i; + if (length === undefined) { + length = 0; + for (i = 0; i < list.length; ++i) { + length += list[i].length; + } + } + + var buffer = Buffer.allocUnsafe(length); + var pos = 0; + for (i = 0; i < list.length; ++i) { + var buf = list[i]; + if (!Buffer.isBuffer(buf)) { + throw new TypeError('"list" argument must be an Array of Buffers'); + } + buf.copy(buffer, pos); + pos += buf.length; + } + return buffer; + }; + + function byteLength(string, encoding) { + if (Buffer.isBuffer(string)) { + return string.length; + } + if ( + typeof ArrayBuffer !== 'undefined' && + typeof ArrayBuffer.isView === 'function' && + (ArrayBuffer.isView(string) || string instanceof ArrayBuffer) + ) { + return string.byteLength; + } + if (typeof string !== 'string') { + string = '' + string; + } + + var len = string.length; + if (len === 0) return 0; + + // Use a for loop to avoid recursion + var loweredCase = false; + for (;;) { + switch (encoding) { + case 'ascii': + case 'latin1': + case 'binary': + return len; + case 'utf8': + case 'utf-8': + case undefined: + return utf8ToBytes(string).length; + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return len * 2; + case 'hex': + return len >>> 1; + case 'base64': + return base64ToBytes(string).length; + default: + if (loweredCase) return utf8ToBytes(string).length; // assume utf8 + encoding = ('' + encoding).toLowerCase(); + loweredCase = true; + } + } + } + Buffer.byteLength = byteLength; + + function slowToString(encoding, start, end) { + var loweredCase = false; + + // No need to verify that "this.length <= MAX_UINT32" since it's a read-only + // property of a typed array. + + // This behaves neither like String nor Uint8Array in that we set start/end + // to their upper/lower bounds if the value passed is out of range. + // undefined is handled specially as per ECMA-262 6th Edition, + // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization. + if (start === undefined || start < 0) { + start = 0; + } + // Return early if start > this.length. Done here to prevent potential uint32 + // coercion fail below. + if (start > this.length) { + return ''; + } + + if (end === undefined || end > this.length) { + end = this.length; + } + + if (end <= 0) { + return ''; + } + + // Force coersion to uint32. This will also coerce falsey/NaN values to 0. + end >>>= 0; + start >>>= 0; + + if (end <= start) { + return ''; + } + + if (!encoding) encoding = 'utf8'; + + while (true) { + switch (encoding) { + case 'hex': + return hexSlice(this, start, end); + + case 'utf8': + case 'utf-8': + return utf8Slice(this, start, end); + + case 'ascii': + return asciiSlice(this, start, end); + + case 'latin1': + case 'binary': + return latin1Slice(this, start, end); + + case 'base64': + return base64Slice(this, start, end); + + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return utf16leSlice(this, start, end); + + default: + if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding); + encoding = (encoding + '').toLowerCase(); + loweredCase = true; + } + } + } + + // The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect + // Buffer instances. + Buffer.prototype._isBuffer = true; + + function swap(b, n, m) { + var i = b[n]; + b[n] = b[m]; + b[m] = i; + } + + Buffer.prototype.swap16 = function swap16() { + var len = this.length; + if (len % 2 !== 0) { + throw new RangeError('Buffer size must be a multiple of 16-bits'); + } + for (var i = 0; i < len; i += 2) { + swap(this, i, i + 1); + } + return this; + }; + + Buffer.prototype.swap32 = function swap32() { + var len = this.length; + if (len % 4 !== 0) { + throw new RangeError('Buffer size must be a multiple of 32-bits'); + } + for (var i = 0; i < len; i += 4) { + swap(this, i, i + 3); + swap(this, i + 1, i + 2); + } + return this; + }; + + Buffer.prototype.swap64 = function swap64() { + var len = this.length; + if (len % 8 !== 0) { + throw new RangeError('Buffer size must be a multiple of 64-bits'); + } + for (var i = 0; i < len; i += 8) { + swap(this, i, i + 7); + swap(this, i + 1, i + 6); + swap(this, i + 2, i + 5); + swap(this, i + 3, i + 4); + } + return this; + }; + + Buffer.prototype.toString = function toString() { + var length = this.length | 0; + if (length === 0) return ''; + if (arguments.length === 0) return utf8Slice(this, 0, length); + return slowToString.apply(this, arguments); + }; + + Buffer.prototype.equals = function equals(b) { + if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer'); + if (this === b) return true; + return Buffer.compare(this, b) === 0; + }; + + Buffer.prototype.inspect = function inspect() { + var str = ''; + var max = exports.INSPECT_MAX_BYTES; + if (this.length > 0) { + str = this.toString('hex', 0, max).match(/.{2}/g).join(' '); + if (this.length > max) str += ' ... '; + } + return '<Buffer ' + str + '>'; + }; + + Buffer.prototype.compare = function compare(target, start, end, thisStart, thisEnd) { + if (!Buffer.isBuffer(target)) { + throw new TypeError('Argument must be a Buffer'); + } + + if (start === undefined) { + start = 0; + } + if (end === undefined) { + end = target ? target.length : 0; + } + if (thisStart === undefined) { + thisStart = 0; + } + if (thisEnd === undefined) { + thisEnd = this.length; + } + + if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) { + throw new RangeError('out of range index'); + } + + if (thisStart >= thisEnd && start >= end) { + return 0; + } + if (thisStart >= thisEnd) { + return -1; + } + if (start >= end) { + return 1; + } + + start >>>= 0; + end >>>= 0; + thisStart >>>= 0; + thisEnd >>>= 0; + + if (this === target) return 0; + + var x = thisEnd - thisStart; + var y = end - start; + var len = Math.min(x, y); + + var thisCopy = this.slice(thisStart, thisEnd); + var targetCopy = target.slice(start, end); + + for (var i = 0; i < len; ++i) { + if (thisCopy[i] !== targetCopy[i]) { + x = thisCopy[i]; + y = targetCopy[i]; + break; + } + } + + if (x < y) return -1; + if (y < x) return 1; + return 0; + }; + + // Finds either the first index of `val` in `buffer` at offset >= `byteOffset`, + // OR the last index of `val` in `buffer` at offset <= `byteOffset`. + // + // Arguments: + // - buffer - a Buffer to search + // - val - a string, Buffer, or number + // - byteOffset - an index into `buffer`; will be clamped to an int32 + // - encoding - an optional encoding, relevant is val is a string + // - dir - true for indexOf, false for lastIndexOf + function bidirectionalIndexOf(buffer, val, byteOffset, encoding, dir) { + // Empty buffer means no match + if (buffer.length === 0) return -1; + + // Normalize byteOffset + if (typeof byteOffset === 'string') { + encoding = byteOffset; + byteOffset = 0; + } else if (byteOffset > 0x7fffffff) { + byteOffset = 0x7fffffff; + } else if (byteOffset < -0x80000000) { + byteOffset = -0x80000000; + } + byteOffset = +byteOffset; // Coerce to Number. + if (isNaN(byteOffset)) { + // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer + byteOffset = dir ? 0 : buffer.length - 1; + } + + // Normalize byteOffset: negative offsets start from the end of the buffer + if (byteOffset < 0) byteOffset = buffer.length + byteOffset; + if (byteOffset >= buffer.length) { + if (dir) return -1; + else byteOffset = buffer.length - 1; + } else if (byteOffset < 0) { + if (dir) byteOffset = 0; + else return -1; + } + + // Normalize val + if (typeof val === 'string') { + val = Buffer.from(val, encoding); + } + + // Finally, search either indexOf (if dir is true) or lastIndexOf + if (Buffer.isBuffer(val)) { + // Special case: looking for empty string/buffer always fails + if (val.length === 0) { + return -1; + } + return arrayIndexOf(buffer, val, byteOffset, encoding, dir); + } else if (typeof val === 'number') { + val = val & 0xff; // Search for a byte value [0-255] + if (Buffer.TYPED_ARRAY_SUPPORT && typeof Uint8Array.prototype.indexOf === 'function') { + if (dir) { + return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset); + } else { + return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset); + } + } + return arrayIndexOf(buffer, [val], byteOffset, encoding, dir); + } + + throw new TypeError('val must be string, number or Buffer'); + } + + function arrayIndexOf(arr, val, byteOffset, encoding, dir) { + var indexSize = 1; + var arrLength = arr.length; + var valLength = val.length; + + if (encoding !== undefined) { + encoding = String(encoding).toLowerCase(); + if ( + encoding === 'ucs2' || + encoding === 'ucs-2' || + encoding === 'utf16le' || + encoding === 'utf-16le' + ) { + if (arr.length < 2 || val.length < 2) { + return -1; + } + indexSize = 2; + arrLength /= 2; + valLength /= 2; + byteOffset /= 2; + } + } + + function read(buf, i) { + if (indexSize === 1) { + return buf[i]; + } else { + return buf.readUInt16BE(i * indexSize); + } + } + + var i; + if (dir) { + var foundIndex = -1; + for (i = byteOffset; i < arrLength; i++) { + if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) { + if (foundIndex === -1) foundIndex = i; + if (i - foundIndex + 1 === valLength) return foundIndex * indexSize; + } else { + if (foundIndex !== -1) i -= i - foundIndex; + foundIndex = -1; + } + } + } else { + if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength; + for (i = byteOffset; i >= 0; i--) { + var found = true; + for (var j = 0; j < valLength; j++) { + if (read(arr, i + j) !== read(val, j)) { + found = false; + break; + } + } + if (found) return i; + } + } + + return -1; + } + + Buffer.prototype.includes = function includes(val, byteOffset, encoding) { + return this.indexOf(val, byteOffset, encoding) !== -1; + }; + + Buffer.prototype.indexOf = function indexOf(val, byteOffset, encoding) { + return bidirectionalIndexOf(this, val, byteOffset, encoding, true); + }; + + Buffer.prototype.lastIndexOf = function lastIndexOf(val, byteOffset, encoding) { + return bidirectionalIndexOf(this, val, byteOffset, encoding, false); + }; + + function hexWrite(buf, string, offset, length) { + offset = Number(offset) || 0; + var remaining = buf.length - offset; + if (!length) { + length = remaining; + } else { + length = Number(length); + if (length > remaining) { + length = remaining; + } + } + + // must be an even number of digits + var strLen = string.length; + if (strLen % 2 !== 0) throw new TypeError('Invalid hex string'); + + if (length > strLen / 2) { + length = strLen / 2; + } + for (var i = 0; i < length; ++i) { + var parsed = parseInt(string.substr(i * 2, 2), 16); + if (isNaN(parsed)) return i; + buf[offset + i] = parsed; + } + return i; + } + + function utf8Write(buf, string, offset, length) { + return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length); + } + + function asciiWrite(buf, string, offset, length) { + return blitBuffer(asciiToBytes(string), buf, offset, length); + } + + function latin1Write(buf, string, offset, length) { + return asciiWrite(buf, string, offset, length); + } + + function base64Write(buf, string, offset, length) { + return blitBuffer(base64ToBytes(string), buf, offset, length); + } + + function ucs2Write(buf, string, offset, length) { + return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length); + } + + Buffer.prototype.write = function write(string, offset, length, encoding) { + // Buffer#write(string) + if (offset === undefined) { + encoding = 'utf8'; + length = this.length; + offset = 0; + // Buffer#write(string, encoding) + } else if (length === undefined && typeof offset === 'string') { + encoding = offset; + length = this.length; + offset = 0; + // Buffer#write(string, offset[, length][, encoding]) + } else if (isFinite(offset)) { + offset = offset | 0; + if (isFinite(length)) { + length = length | 0; + if (encoding === undefined) encoding = 'utf8'; + } else { + encoding = length; + length = undefined; + } + // legacy write(string, encoding, offset, length) - remove in v0.13 + } else { + throw new Error('Buffer.write(string, encoding, offset[, length]) is no longer supported'); + } + + var remaining = this.length - offset; + if (length === undefined || length > remaining) length = remaining; + + if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) { + throw new RangeError('Attempt to write outside buffer bounds'); + } + + if (!encoding) encoding = 'utf8'; + + var loweredCase = false; + for (;;) { + switch (encoding) { + case 'hex': + return hexWrite(this, string, offset, length); + + case 'utf8': + case 'utf-8': + return utf8Write(this, string, offset, length); + + case 'ascii': + return asciiWrite(this, string, offset, length); + + case 'latin1': + case 'binary': + return latin1Write(this, string, offset, length); + + case 'base64': + // Warning: maxLength not taken into account in base64Write + return base64Write(this, string, offset, length); + + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return ucs2Write(this, string, offset, length); + + default: + if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding); + encoding = ('' + encoding).toLowerCase(); + loweredCase = true; + } + } + }; + + Buffer.prototype.toJSON = function toJSON() { + return { + type: 'Buffer', + data: Array.prototype.slice.call(this._arr || this, 0), + }; + }; + + function base64Slice(buf, start, end) { + if (start === 0 && end === buf.length) { + return base64.fromByteArray(buf); + } else { + return base64.fromByteArray(buf.slice(start, end)); + } + } + + function utf8Slice(buf, start, end) { + end = Math.min(buf.length, end); + var res = []; + + var i = start; + while (i < end) { + var firstByte = buf[i]; + var codePoint = null; + var bytesPerSequence = firstByte > 0xef ? 4 : firstByte > 0xdf ? 3 : firstByte > 0xbf ? 2 : 1; + + if (i + bytesPerSequence <= end) { + var secondByte, thirdByte, fourthByte, tempCodePoint; + + switch (bytesPerSequence) { + case 1: + if (firstByte < 0x80) { + codePoint = firstByte; + } + break; + case 2: + secondByte = buf[i + 1]; + if ((secondByte & 0xc0) === 0x80) { + tempCodePoint = ((firstByte & 0x1f) << 0x6) | (secondByte & 0x3f); + if (tempCodePoint > 0x7f) { + codePoint = tempCodePoint; + } + } + break; + case 3: + secondByte = buf[i + 1]; + thirdByte = buf[i + 2]; + if ((secondByte & 0xc0) === 0x80 && (thirdByte & 0xc0) === 0x80) { + tempCodePoint = + ((firstByte & 0xf) << 0xc) | ((secondByte & 0x3f) << 0x6) | (thirdByte & 0x3f); + if (tempCodePoint > 0x7ff && (tempCodePoint < 0xd800 || tempCodePoint > 0xdfff)) { + codePoint = tempCodePoint; + } + } + break; + case 4: + secondByte = buf[i + 1]; + thirdByte = buf[i + 2]; + fourthByte = buf[i + 3]; + if ( + (secondByte & 0xc0) === 0x80 && + (thirdByte & 0xc0) === 0x80 && + (fourthByte & 0xc0) === 0x80 + ) { + tempCodePoint = + ((firstByte & 0xf) << 0x12) | + ((secondByte & 0x3f) << 0xc) | + ((thirdByte & 0x3f) << 0x6) | + (fourthByte & 0x3f); + if (tempCodePoint > 0xffff && tempCodePoint < 0x110000) { + codePoint = tempCodePoint; + } + } + } + } + + if (codePoint === null) { + // we did not generate a valid codePoint so insert a + // replacement char (U+FFFD) and advance only 1 byte + codePoint = 0xfffd; + bytesPerSequence = 1; + } else if (codePoint > 0xffff) { + // encode to utf16 (surrogate pair dance) + codePoint -= 0x10000; + res.push(((codePoint >>> 10) & 0x3ff) | 0xd800); + codePoint = 0xdc00 | (codePoint & 0x3ff); + } + + res.push(codePoint); + i += bytesPerSequence; + } + + return decodeCodePointsArray(res); + } + + // Based on http://stackoverflow.com/a/22747272/680742, the browser with + // the lowest limit is Chrome, with 0x10000 args. + // We go 1 magnitude less, for safety + var MAX_ARGUMENTS_LENGTH = 0x1000; + + function decodeCodePointsArray(codePoints) { + var len = codePoints.length; + if (len <= MAX_ARGUMENTS_LENGTH) { + return String.fromCharCode.apply(String, codePoints); // avoid extra slice() + } + + // Decode in chunks to avoid "call stack size exceeded". + var res = ''; + var i = 0; + while (i < len) { + res += String.fromCharCode.apply(String, codePoints.slice(i, (i += MAX_ARGUMENTS_LENGTH))); + } + return res; + } + + function asciiSlice(buf, start, end) { + var ret = ''; + end = Math.min(buf.length, end); + + for (var i = start; i < end; ++i) { + ret += String.fromCharCode(buf[i] & 0x7f); + } + return ret; + } + + function latin1Slice(buf, start, end) { + var ret = ''; + end = Math.min(buf.length, end); + + for (var i = start; i < end; ++i) { + ret += String.fromCharCode(buf[i]); + } + return ret; + } + + function hexSlice(buf, start, end) { + var len = buf.length; + + if (!start || start < 0) start = 0; + if (!end || end < 0 || end > len) end = len; + + var out = ''; + for (var i = start; i < end; ++i) { + out += toHex(buf[i]); + } + return out; + } + + function utf16leSlice(buf, start, end) { + var bytes = buf.slice(start, end); + var res = ''; + for (var i = 0; i < bytes.length; i += 2) { + res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256); + } + return res; + } + + Buffer.prototype.slice = function slice(start, end) { + var len = this.length; + start = ~~start; + end = end === undefined ? len : ~~end; + + if (start < 0) { + start += len; + if (start < 0) start = 0; + } else if (start > len) { + start = len; + } + + if (end < 0) { + end += len; + if (end < 0) end = 0; + } else if (end > len) { + end = len; + } + + if (end < start) end = start; + + var newBuf; + if (Buffer.TYPED_ARRAY_SUPPORT) { + newBuf = this.subarray(start, end); + newBuf.__proto__ = Buffer.prototype; + } else { + var sliceLen = end - start; + newBuf = new Buffer(sliceLen, undefined); + for (var i = 0; i < sliceLen; ++i) { + newBuf[i] = this[i + start]; + } + } + + return newBuf; + }; + + /* + * Need to make sure that buffer isn't trying to write out of bounds. + */ + function checkOffset(offset, ext, length) { + if (offset % 1 !== 0 || offset < 0) throw new RangeError('offset is not uint'); + if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length'); + } + + Buffer.prototype.readUIntLE = function readUIntLE(offset, byteLength, noAssert) { + offset = offset | 0; + byteLength = byteLength | 0; + if (!noAssert) checkOffset(offset, byteLength, this.length); + + var val = this[offset]; + var mul = 1; + var i = 0; + while (++i < byteLength && (mul *= 0x100)) { + val += this[offset + i] * mul; + } + + return val; + }; + + Buffer.prototype.readUIntBE = function readUIntBE(offset, byteLength, noAssert) { + offset = offset | 0; + byteLength = byteLength | 0; + if (!noAssert) { + checkOffset(offset, byteLength, this.length); + } + + var val = this[offset + --byteLength]; + var mul = 1; + while (byteLength > 0 && (mul *= 0x100)) { + val += this[offset + --byteLength] * mul; + } + + return val; + }; + + Buffer.prototype.readUInt8 = function readUInt8(offset, noAssert) { + if (!noAssert) checkOffset(offset, 1, this.length); + return this[offset]; + }; + + Buffer.prototype.readUInt16LE = function readUInt16LE(offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length); + return this[offset] | (this[offset + 1] << 8); + }; + + Buffer.prototype.readUInt16BE = function readUInt16BE(offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length); + return (this[offset] << 8) | this[offset + 1]; + }; + + Buffer.prototype.readUInt32LE = function readUInt32LE(offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length); + + return ( + (this[offset] | (this[offset + 1] << 8) | (this[offset + 2] << 16)) + this[offset + 3] * 0x1000000 + ); + }; + + Buffer.prototype.readUInt32BE = function readUInt32BE(offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length); + + return ( + this[offset] * 0x1000000 + ((this[offset + 1] << 16) | (this[offset + 2] << 8) | this[offset + 3]) + ); + }; + + Buffer.prototype.readIntLE = function readIntLE(offset, byteLength, noAssert) { + offset = offset | 0; + byteLength = byteLength | 0; + if (!noAssert) checkOffset(offset, byteLength, this.length); + + var val = this[offset]; + var mul = 1; + var i = 0; + while (++i < byteLength && (mul *= 0x100)) { + val += this[offset + i] * mul; + } + mul *= 0x80; + + if (val >= mul) val -= Math.pow(2, 8 * byteLength); + + return val; + }; + + Buffer.prototype.readIntBE = function readIntBE(offset, byteLength, noAssert) { + offset = offset | 0; + byteLength = byteLength | 0; + if (!noAssert) checkOffset(offset, byteLength, this.length); + + var i = byteLength; + var mul = 1; + var val = this[offset + --i]; + while (i > 0 && (mul *= 0x100)) { + val += this[offset + --i] * mul; + } + mul *= 0x80; + + if (val >= mul) val -= Math.pow(2, 8 * byteLength); + + return val; + }; + + Buffer.prototype.readInt8 = function readInt8(offset, noAssert) { + if (!noAssert) checkOffset(offset, 1, this.length); + if (!(this[offset] & 0x80)) return this[offset]; + return (0xff - this[offset] + 1) * -1; + }; + + Buffer.prototype.readInt16LE = function readInt16LE(offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length); + var val = this[offset] | (this[offset + 1] << 8); + return val & 0x8000 ? val | 0xffff0000 : val; + }; + + Buffer.prototype.readInt16BE = function readInt16BE(offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length); + var val = this[offset + 1] | (this[offset] << 8); + return val & 0x8000 ? val | 0xffff0000 : val; + }; + + Buffer.prototype.readInt32LE = function readInt32LE(offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length); + + return this[offset] | (this[offset + 1] << 8) | (this[offset + 2] << 16) | (this[offset + 3] << 24); + }; + + Buffer.prototype.readInt32BE = function readInt32BE(offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length); + + return (this[offset] << 24) | (this[offset + 1] << 16) | (this[offset + 2] << 8) | this[offset + 3]; + }; + + Buffer.prototype.readFloatLE = function readFloatLE(offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length); + return ieee754.read(this, offset, true, 23, 4); + }; + + Buffer.prototype.readFloatBE = function readFloatBE(offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length); + return ieee754.read(this, offset, false, 23, 4); + }; + + Buffer.prototype.readDoubleLE = function readDoubleLE(offset, noAssert) { + if (!noAssert) checkOffset(offset, 8, this.length); + return ieee754.read(this, offset, true, 52, 8); + }; + + Buffer.prototype.readDoubleBE = function readDoubleBE(offset, noAssert) { + if (!noAssert) checkOffset(offset, 8, this.length); + return ieee754.read(this, offset, false, 52, 8); + }; + + function checkInt(buf, value, offset, ext, max, min) { + if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance'); + if (value > max || value < min) throw new RangeError('"value" argument is out of bounds'); + if (offset + ext > buf.length) throw new RangeError('Index out of range'); + } + + Buffer.prototype.writeUIntLE = function writeUIntLE(value, offset, byteLength, noAssert) { + value = +value; + offset = offset | 0; + byteLength = byteLength | 0; + if (!noAssert) { + var maxBytes = Math.pow(2, 8 * byteLength) - 1; + checkInt(this, value, offset, byteLength, maxBytes, 0); + } + + var mul = 1; + var i = 0; + this[offset] = value & 0xff; + while (++i < byteLength && (mul *= 0x100)) { + this[offset + i] = (value / mul) & 0xff; + } + + return offset + byteLength; + }; + + Buffer.prototype.writeUIntBE = function writeUIntBE(value, offset, byteLength, noAssert) { + value = +value; + offset = offset | 0; + byteLength = byteLength | 0; + if (!noAssert) { + var maxBytes = Math.pow(2, 8 * byteLength) - 1; + checkInt(this, value, offset, byteLength, maxBytes, 0); + } + + var i = byteLength - 1; + var mul = 1; + this[offset + i] = value & 0xff; + while (--i >= 0 && (mul *= 0x100)) { + this[offset + i] = (value / mul) & 0xff; + } + + return offset + byteLength; + }; + + Buffer.prototype.writeUInt8 = function writeUInt8(value, offset, noAssert) { + value = +value; + offset = offset | 0; + if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0); + if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value); + this[offset] = value & 0xff; + return offset + 1; + }; + + function objectWriteUInt16(buf, value, offset, littleEndian) { + if (value < 0) value = 0xffff + value + 1; + for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) { + buf[offset + i] = + (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>> ((littleEndian ? i : 1 - i) * 8); + } + } + + Buffer.prototype.writeUInt16LE = function writeUInt16LE(value, offset, noAssert) { + value = +value; + offset = offset | 0; + if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0); + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = value & 0xff; + this[offset + 1] = value >>> 8; + } else { + objectWriteUInt16(this, value, offset, true); + } + return offset + 2; + }; + + Buffer.prototype.writeUInt16BE = function writeUInt16BE(value, offset, noAssert) { + value = +value; + offset = offset | 0; + if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0); + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = value >>> 8; + this[offset + 1] = value & 0xff; + } else { + objectWriteUInt16(this, value, offset, false); + } + return offset + 2; + }; + + function objectWriteUInt32(buf, value, offset, littleEndian) { + if (value < 0) value = 0xffffffff + value + 1; + for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) { + buf[offset + i] = (value >>> ((littleEndian ? i : 3 - i) * 8)) & 0xff; + } + } + + Buffer.prototype.writeUInt32LE = function writeUInt32LE(value, offset, noAssert) { + value = +value; + offset = offset | 0; + if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0); + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset + 3] = value >>> 24; + this[offset + 2] = value >>> 16; + this[offset + 1] = value >>> 8; + this[offset] = value & 0xff; + } else { + objectWriteUInt32(this, value, offset, true); + } + return offset + 4; + }; + + Buffer.prototype.writeUInt32BE = function writeUInt32BE(value, offset, noAssert) { + value = +value; + offset = offset | 0; + if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0); + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = value >>> 24; + this[offset + 1] = value >>> 16; + this[offset + 2] = value >>> 8; + this[offset + 3] = value & 0xff; + } else { + objectWriteUInt32(this, value, offset, false); + } + return offset + 4; + }; + + Buffer.prototype.writeIntLE = function writeIntLE(value, offset, byteLength, noAssert) { + value = +value; + offset = offset | 0; + if (!noAssert) { + var limit = Math.pow(2, 8 * byteLength - 1); + + checkInt(this, value, offset, byteLength, limit - 1, -limit); + } + + var i = 0; + var mul = 1; + var sub = 0; + this[offset] = value & 0xff; + while (++i < byteLength && (mul *= 0x100)) { + if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) { + sub = 1; + } + this[offset + i] = (((value / mul) >> 0) - sub) & 0xff; + } + + return offset + byteLength; + }; + + Buffer.prototype.writeIntBE = function writeIntBE(value, offset, byteLength, noAssert) { + value = +value; + offset = offset | 0; + if (!noAssert) { + var limit = Math.pow(2, 8 * byteLength - 1); + + checkInt(this, value, offset, byteLength, limit - 1, -limit); + } + + var i = byteLength - 1; + var mul = 1; + var sub = 0; + this[offset + i] = value & 0xff; + while (--i >= 0 && (mul *= 0x100)) { + if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) { + sub = 1; + } + this[offset + i] = (((value / mul) >> 0) - sub) & 0xff; + } + + return offset + byteLength; + }; + + Buffer.prototype.writeInt8 = function writeInt8(value, offset, noAssert) { + value = +value; + offset = offset | 0; + if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80); + if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value); + if (value < 0) value = 0xff + value + 1; + this[offset] = value & 0xff; + return offset + 1; + }; + + Buffer.prototype.writeInt16LE = function writeInt16LE(value, offset, noAssert) { + value = +value; + offset = offset | 0; + if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000); + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = value & 0xff; + this[offset + 1] = value >>> 8; + } else { + objectWriteUInt16(this, value, offset, true); + } + return offset + 2; + }; + + Buffer.prototype.writeInt16BE = function writeInt16BE(value, offset, noAssert) { + value = +value; + offset = offset | 0; + if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000); + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = value >>> 8; + this[offset + 1] = value & 0xff; + } else { + objectWriteUInt16(this, value, offset, false); + } + return offset + 2; + }; + + Buffer.prototype.writeInt32LE = function writeInt32LE(value, offset, noAssert) { + value = +value; + offset = offset | 0; + if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000); + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = value & 0xff; + this[offset + 1] = value >>> 8; + this[offset + 2] = value >>> 16; + this[offset + 3] = value >>> 24; + } else { + objectWriteUInt32(this, value, offset, true); + } + return offset + 4; + }; + + Buffer.prototype.writeInt32BE = function writeInt32BE(value, offset, noAssert) { + value = +value; + offset = offset | 0; + if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000); + if (value < 0) value = 0xffffffff + value + 1; + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = value >>> 24; + this[offset + 1] = value >>> 16; + this[offset + 2] = value >>> 8; + this[offset + 3] = value & 0xff; + } else { + objectWriteUInt32(this, value, offset, false); + } + return offset + 4; + }; + + function checkIEEE754(buf, value, offset, ext, max, min) { + if (offset + ext > buf.length) throw new RangeError('Index out of range'); + if (offset < 0) throw new RangeError('Index out of range'); + } + + function writeFloat(buf, value, offset, littleEndian, noAssert) { + if (!noAssert) { + checkIEEE754(buf, value, offset, 4, 3.4028234663852886e38, -3.4028234663852886e38); + } + ieee754.write(buf, value, offset, littleEndian, 23, 4); + return offset + 4; + } + + Buffer.prototype.writeFloatLE = function writeFloatLE(value, offset, noAssert) { + return writeFloat(this, value, offset, true, noAssert); + }; + + Buffer.prototype.writeFloatBE = function writeFloatBE(value, offset, noAssert) { + return writeFloat(this, value, offset, false, noAssert); + }; + + function writeDouble(buf, value, offset, littleEndian, noAssert) { + if (!noAssert) { + checkIEEE754(buf, value, offset, 8, 1.7976931348623157e308, -1.7976931348623157e308); + } + ieee754.write(buf, value, offset, littleEndian, 52, 8); + return offset + 8; + } + + Buffer.prototype.writeDoubleLE = function writeDoubleLE(value, offset, noAssert) { + return writeDouble(this, value, offset, true, noAssert); + }; + + Buffer.prototype.writeDoubleBE = function writeDoubleBE(value, offset, noAssert) { + return writeDouble(this, value, offset, false, noAssert); + }; + + // copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length) + Buffer.prototype.copy = function copy(target, targetStart, start, end) { + if (!start) start = 0; + if (!end && end !== 0) end = this.length; + if (targetStart >= target.length) targetStart = target.length; + if (!targetStart) targetStart = 0; + if (end > 0 && end < start) end = start; + + // Copy 0 bytes; we're done + if (end === start) return 0; + if (target.length === 0 || this.length === 0) return 0; + + // Fatal error conditions + if (targetStart < 0) { + throw new RangeError('targetStart out of bounds'); + } + if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds'); + if (end < 0) throw new RangeError('sourceEnd out of bounds'); + + // Are we oob? + if (end > this.length) end = this.length; + if (target.length - targetStart < end - start) { + end = target.length - targetStart + start; + } + + var len = end - start; + var i; + + if (this === target && start < targetStart && targetStart < end) { + // descending copy from end + for (i = len - 1; i >= 0; --i) { + target[i + targetStart] = this[i + start]; + } + } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) { + // ascending copy from start + for (i = 0; i < len; ++i) { + target[i + targetStart] = this[i + start]; + } + } else { + Uint8Array.prototype.set.call(target, this.subarray(start, start + len), targetStart); + } + + return len; + }; + + // Usage: + // buffer.fill(number[, offset[, end]]) + // buffer.fill(buffer[, offset[, end]]) + // buffer.fill(string[, offset[, end]][, encoding]) + Buffer.prototype.fill = function fill(val, start, end, encoding) { + // Handle string cases: + if (typeof val === 'string') { + if (typeof start === 'string') { + encoding = start; + start = 0; + end = this.length; + } else if (typeof end === 'string') { + encoding = end; + end = this.length; + } + if (val.length === 1) { + var code = val.charCodeAt(0); + if (code < 256) { + val = code; + } + } + if (encoding !== undefined && typeof encoding !== 'string') { + throw new TypeError('encoding must be a string'); + } + if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) { + throw new TypeError('Unknown encoding: ' + encoding); + } + } else if (typeof val === 'number') { + val = val & 255; + } + + // Invalid ranges are not set to a default, so can range check early. + if (start < 0 || this.length < start || this.length < end) { + throw new RangeError('Out of range index'); + } + + if (end <= start) { + return this; + } + + start = start >>> 0; + end = end === undefined ? this.length : end >>> 0; + + if (!val) val = 0; + + var i; + if (typeof val === 'number') { + for (i = start; i < end; ++i) { + this[i] = val; + } + } else { + var bytes = Buffer.isBuffer(val) ? val : utf8ToBytes(new Buffer(val, encoding).toString()); + var len = bytes.length; + for (i = 0; i < end - start; ++i) { + this[i + start] = bytes[i % len]; + } + } + + return this; + }; + + // HELPER FUNCTIONS + // ================ + + var INVALID_BASE64_RE = /[^+\/0-9A-Za-z-_]/g; + + function base64clean(str) { + // Node strips out invalid characters like \n and \t from the string, base64-js does not + str = stringtrim(str).replace(INVALID_BASE64_RE, ''); + // Node converts strings with length < 2 to '' + if (str.length < 2) return ''; + // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not + while (str.length % 4 !== 0) { + str = str + '='; + } + return str; + } + + function stringtrim(str) { + if (str.trim) return str.trim(); + return str.replace(/^\s+|\s+$/g, ''); + } + + function toHex(n) { + if (n < 16) return '0' + n.toString(16); + return n.toString(16); + } + + function utf8ToBytes(string, units) { + units = units || Infinity; + var codePoint; + var length = string.length; + var leadSurrogate = null; + var bytes = []; + + for (var i = 0; i < length; ++i) { + codePoint = string.charCodeAt(i); + + // is surrogate component + if (codePoint > 0xd7ff && codePoint < 0xe000) { + // last char was a lead + if (!leadSurrogate) { + // no lead yet + if (codePoint > 0xdbff) { + // unexpected trail + if ((units -= 3) > -1) bytes.push(0xef, 0xbf, 0xbd); + continue; + } else if (i + 1 === length) { + // unpaired lead + if ((units -= 3) > -1) bytes.push(0xef, 0xbf, 0xbd); + continue; + } + + // valid lead + leadSurrogate = codePoint; + + continue; + } + + // 2 leads in a row + if (codePoint < 0xdc00) { + if ((units -= 3) > -1) bytes.push(0xef, 0xbf, 0xbd); + leadSurrogate = codePoint; + continue; + } + + // valid surrogate pair + codePoint = (((leadSurrogate - 0xd800) << 10) | (codePoint - 0xdc00)) + 0x10000; + } else if (leadSurrogate) { + // valid bmp char, but last char was a lead + if ((units -= 3) > -1) bytes.push(0xef, 0xbf, 0xbd); + } + + leadSurrogate = null; + + // encode utf8 + if (codePoint < 0x80) { + if ((units -= 1) < 0) break; + bytes.push(codePoint); + } else if (codePoint < 0x800) { + if ((units -= 2) < 0) break; + bytes.push((codePoint >> 0x6) | 0xc0, (codePoint & 0x3f) | 0x80); + } else if (codePoint < 0x10000) { + if ((units -= 3) < 0) break; + bytes.push( + (codePoint >> 0xc) | 0xe0, + ((codePoint >> 0x6) & 0x3f) | 0x80, + (codePoint & 0x3f) | 0x80, + ); + } else if (codePoint < 0x110000) { + if ((units -= 4) < 0) break; + bytes.push( + (codePoint >> 0x12) | 0xf0, + ((codePoint >> 0xc) & 0x3f) | 0x80, + ((codePoint >> 0x6) & 0x3f) | 0x80, + (codePoint & 0x3f) | 0x80, + ); + } else { + throw new Error('Invalid code point'); + } + } + + return bytes; + } + + function asciiToBytes(str) { + var byteArray = []; + for (var i = 0; i < str.length; ++i) { + // Node's code seems to be doing this and not & 0x7F.. + byteArray.push(str.charCodeAt(i) & 0xff); + } + return byteArray; + } + + function utf16leToBytes(str, units) { + var c, hi, lo; + var byteArray = []; + for (var i = 0; i < str.length; ++i) { + if ((units -= 2) < 0) break; + + c = str.charCodeAt(i); + hi = c >> 8; + lo = c % 256; + byteArray.push(lo); + byteArray.push(hi); + } + + return byteArray; + } + + function base64ToBytes(str) { + return base64.toByteArray(base64clean(str)); + } + + function blitBuffer(src, dst, offset, length) { + for (var i = 0; i < length; ++i) { + if (i + offset >= dst.length || i >= src.length) break; + dst[i + offset] = src[i]; + } + return i; + } + + function isnan(val) { + return val !== val; // eslint-disable-line no-self-compare + } + + /* WEBPACK VAR INJECTION */ + }).call(exports, __webpack_require__(22)); + + /***/ + }, + /* 412 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(470); + module.exports = __webpack_require__(56).RegExp.escape; + + /***/ + }, + /* 413 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(163); + __webpack_require__(449); + module.exports = __webpack_require__(18).Array.from; + + /***/ + }, + /* 414 */ + /***/ function (module, exports, __webpack_require__) { + var core = __webpack_require__(18), + $JSON = core.JSON || (core.JSON = { stringify: JSON.stringify }); + module.exports = function stringify(it) { + // eslint-disable-line no-unused-vars + return $JSON.stringify.apply($JSON, arguments); + }; + + /***/ + }, + /* 415 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(259); + __webpack_require__(163); + __webpack_require__(260); + __webpack_require__(451); + __webpack_require__(457); + module.exports = __webpack_require__(18).Map; + + /***/ + }, + /* 416 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(452); + module.exports = __webpack_require__(18).Object.assign; + + /***/ + }, + /* 417 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(453); + var $Object = __webpack_require__(18).Object; + module.exports = function create(P, D) { + return $Object.create(P, D); + }; + + /***/ + }, + /* 418 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(458); + module.exports = __webpack_require__(18).Object.entries; + + /***/ + }, + /* 419 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(454); + module.exports = __webpack_require__(18).Object.keys; + + /***/ + }, + /* 420 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(455); + module.exports = __webpack_require__(18).Object.setPrototypeOf; + + /***/ + }, + /* 421 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(459); + module.exports = __webpack_require__(18).Object.values; + + /***/ + }, + /* 422 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(456); + __webpack_require__(259); + __webpack_require__(460); + __webpack_require__(461); + module.exports = __webpack_require__(18).Symbol; + + /***/ + }, + /* 423 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(163); + __webpack_require__(260); + module.exports = __webpack_require__(162).f('iterator'); + + /***/ + }, + /* 424 */ + /***/ function (module, exports) { + module.exports = function (it) { + if (typeof it != 'function') throw TypeError(it + ' is not a function!'); + return it; + }; + + /***/ + }, + /* 425 */ + /***/ function (module, exports) { + module.exports = function () { + /* empty */ + }; + + /***/ + }, + /* 426 */ + /***/ function (module, exports, __webpack_require__) { + var forOf = __webpack_require__(151); + + module.exports = function (iter, ITERATOR) { + var result = []; + forOf(iter, false, result.push, result, ITERATOR); + return result; + }; + + /***/ + }, + /* 427 */ + /***/ function (module, exports, __webpack_require__) { + // false -> Array#indexOf + // true -> Array#includes + var toIObject = __webpack_require__(61), + toLength = __webpack_require__(124), + toIndex = __webpack_require__(448); + module.exports = function (IS_INCLUDES) { + return function ($this, el, fromIndex) { + var O = toIObject($this), + length = toLength(O.length), + index = toIndex(fromIndex, length), + value; + // Array#includes uses SameValueZero equality algorithm + if (IS_INCLUDES && el != el) + while (length > index) { + value = O[index++]; + if (value != value) return true; + // Array#toIndex ignores holes, Array#includes - not + } + else + for (; length > index; index++) + if (IS_INCLUDES || index in O) { + if (O[index] === el) return IS_INCLUDES || index || 0; + } + return !IS_INCLUDES && -1; + }; + }; + + /***/ + }, + /* 428 */ + /***/ function (module, exports, __webpack_require__) { + // 0 -> Array#forEach + // 1 -> Array#map + // 2 -> Array#filter + // 3 -> Array#some + // 4 -> Array#every + // 5 -> Array#find + // 6 -> Array#findIndex + var ctx = __webpack_require__(89), + IObject = __webpack_require__(152), + toObject = __webpack_require__(110), + toLength = __webpack_require__(124), + asc = __webpack_require__(430); + module.exports = function (TYPE, $create) { + var IS_MAP = TYPE == 1, + IS_FILTER = TYPE == 2, + IS_SOME = TYPE == 3, + IS_EVERY = TYPE == 4, + IS_FIND_INDEX = TYPE == 6, + NO_HOLES = TYPE == 5 || IS_FIND_INDEX, + create = $create || asc; + return function ($this, callbackfn, that) { + var O = toObject($this), + self = IObject(O), + f = ctx(callbackfn, that, 3), + length = toLength(self.length), + index = 0, + result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined, + val, + res; + for (; length > index; index++) + if (NO_HOLES || index in self) { + val = self[index]; + res = f(val, index, O); + if (TYPE) { + if (IS_MAP) + result[index] = res; // map + else if (res) + switch (TYPE) { + case 3: + return true; // some + case 5: + return val; // find + case 6: + return index; // findIndex + case 2: + result.push(val); // filter + } + else if (IS_EVERY) return false; // every + } + } + return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result; + }; + }; + + /***/ + }, + /* 429 */ + /***/ function (module, exports, __webpack_require__) { + var isObject = __webpack_require__(72), + isArray = __webpack_require__(249), + SPECIES = __webpack_require__(37)('species'); + + module.exports = function (original) { + var C; + if (isArray(original)) { + C = original.constructor; + // cross-realm fallback + if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined; + if (isObject(C)) { + C = C[SPECIES]; + if (C === null) C = undefined; + } + } + return C === undefined ? Array : C; + }; + + /***/ + }, + /* 430 */ + /***/ function (module, exports, __webpack_require__) { + // 9.4.2.3 ArraySpeciesCreate(originalArray, length) + var speciesConstructor = __webpack_require__(429); + + module.exports = function (original, length) { + return new (speciesConstructor(original))(length); + }; + + /***/ + }, + /* 431 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var dP = __webpack_require__(49).f, + create = __webpack_require__(122), + redefineAll = __webpack_require__(256), + ctx = __webpack_require__(89), + anInstance = __webpack_require__(244), + defined = __webpack_require__(121), + forOf = __webpack_require__(151), + $iterDefine = __webpack_require__(153), + step = __webpack_require__(251), + setSpecies = __webpack_require__(446), + DESCRIPTORS = __webpack_require__(55), + fastKey = __webpack_require__(155).fastKey, + SIZE = DESCRIPTORS ? '_s' : 'size'; + + var getEntry = function (that, key) { + // fast case + var index = fastKey(key), + entry; + if (index !== 'F') return that._i[index]; + // frozen object case + for (entry = that._f; entry; entry = entry.n) { + if (entry.k == key) return entry; + } + }; + + module.exports = { + getConstructor: function (wrapper, NAME, IS_MAP, ADDER) { + var C = wrapper(function (that, iterable) { + anInstance(that, C, NAME, '_i'); + that._i = create(null); // index + that._f = undefined; // first entry + that._l = undefined; // last entry + that[SIZE] = 0; // size + if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that); + }); + redefineAll(C.prototype, { + // 23.1.3.1 Map.prototype.clear() + // 23.2.3.2 Set.prototype.clear() + clear: function clear() { + for (var that = this, data = that._i, entry = that._f; entry; entry = entry.n) { + entry.r = true; + if (entry.p) entry.p = entry.p.n = undefined; + delete data[entry.i]; + } + that._f = that._l = undefined; + that[SIZE] = 0; + }, + // 23.1.3.3 Map.prototype.delete(key) + // 23.2.3.4 Set.prototype.delete(value) + delete: function (key) { + var that = this, + entry = getEntry(that, key); + if (entry) { + var next = entry.n, + prev = entry.p; + delete that._i[entry.i]; + entry.r = true; + if (prev) prev.n = next; + if (next) next.p = prev; + if (that._f == entry) that._f = next; + if (that._l == entry) that._l = prev; + that[SIZE]--; + } + return !!entry; + }, + // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined) + // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined) + forEach: function forEach(callbackfn /*, that = undefined */) { + anInstance(this, C, 'forEach'); + var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3), + entry; + while ((entry = entry ? entry.n : this._f)) { + f(entry.v, entry.k, this); + // revert to the last existing entry + while (entry && entry.r) entry = entry.p; + } + }, + // 23.1.3.7 Map.prototype.has(key) + // 23.2.3.7 Set.prototype.has(value) + has: function has(key) { + return !!getEntry(this, key); + }, + }); + if (DESCRIPTORS) + dP(C.prototype, 'size', { + get: function () { + return defined(this[SIZE]); + }, + }); + return C; + }, + def: function (that, key, value) { + var entry = getEntry(that, key), + prev, + index; + // change existing entry + if (entry) { + entry.v = value; + // create new entry + } else { + that._l = entry = { + i: (index = fastKey(key, true)), // <- index + k: key, // <- key + v: value, // <- value + p: (prev = that._l), // <- previous entry + n: undefined, // <- next entry + r: false, // <- removed + }; + if (!that._f) that._f = entry; + if (prev) prev.n = entry; + that[SIZE]++; + // add to index + if (index !== 'F') that._i[index] = entry; + } + return that; + }, + getEntry: getEntry, + setStrong: function (C, NAME, IS_MAP) { + // add .keys, .values, .entries, [@@iterator] + // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11 + $iterDefine( + C, + NAME, + function (iterated, kind) { + this._t = iterated; // target + this._k = kind; // kind + this._l = undefined; // previous + }, + function () { + var that = this, + kind = that._k, + entry = that._l; + // revert to the last existing entry + while (entry && entry.r) entry = entry.p; + // get next entry + if (!that._t || !(that._l = entry = entry ? entry.n : that._t._f)) { + // or finish the iteration + that._t = undefined; + return step(1); + } + // return step by kind + if (kind == 'keys') return step(0, entry.k); + if (kind == 'values') return step(0, entry.v); + return step(0, [entry.k, entry.v]); + }, + IS_MAP ? 'entries' : 'values', + !IS_MAP, + true, + ); + + // add [@@species], 23.1.2.2, 23.2.2.2 + setSpecies(NAME); + }, + }; + + /***/ + }, + /* 432 */ + /***/ function (module, exports, __webpack_require__) { + // https://github.com/DavidBruant/Map-Set.prototype.toJSON + var classof = __webpack_require__(245), + from = __webpack_require__(426); + module.exports = function (NAME) { + return function toJSON() { + if (classof(this) != NAME) throw TypeError(NAME + "#toJSON isn't generic"); + return from(this); + }; + }; + + /***/ + }, + /* 433 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var global = __webpack_require__(48), + $export = __webpack_require__(42), + meta = __webpack_require__(155), + fails = __webpack_require__(70), + hide = __webpack_require__(60), + redefineAll = __webpack_require__(256), + forOf = __webpack_require__(151), + anInstance = __webpack_require__(244), + isObject = __webpack_require__(72), + setToStringTag = __webpack_require__(123), + dP = __webpack_require__(49).f, + each = __webpack_require__(428)(0), + DESCRIPTORS = __webpack_require__(55); + + module.exports = function (NAME, wrapper, methods, common, IS_MAP, IS_WEAK) { + var Base = global[NAME], + C = Base, + ADDER = IS_MAP ? 'set' : 'add', + proto = C && C.prototype, + O = {}; + if ( + !DESCRIPTORS || + typeof C != 'function' || + !( + IS_WEAK || + (proto.forEach && + !fails(function () { + new C().entries().next(); + })) + ) + ) { + // create collection constructor + C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER); + redefineAll(C.prototype, methods); + meta.NEED = true; + } else { + C = wrapper(function (target, iterable) { + anInstance(target, C, NAME, '_c'); + target._c = new Base(); + if (iterable != undefined) forOf(iterable, IS_MAP, target[ADDER], target); + }); + each('add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON'.split(','), function (KEY) { + var IS_ADDER = KEY == 'add' || KEY == 'set'; + if (KEY in proto && !(IS_WEAK && KEY == 'clear')) + hide(C.prototype, KEY, function (a, b) { + anInstance(this, C, KEY); + if (!IS_ADDER && IS_WEAK && !isObject(a)) return KEY == 'get' ? undefined : false; + var result = this._c[KEY](a === 0 ? 0 : a, b); + return IS_ADDER ? this : result; + }); + }); + if ('size' in proto) + dP(C.prototype, 'size', { + get: function () { + return this._c.size; + }, + }); + } + + setToStringTag(C, NAME); + + O[NAME] = C; + $export($export.G + $export.W + $export.F, O); + + if (!IS_WEAK) common.setStrong(C, NAME, IS_MAP); + + return C; + }; + + /***/ + }, + /* 434 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $defineProperty = __webpack_require__(49), + createDesc = __webpack_require__(109); + + module.exports = function (object, index, value) { + if (index in object) $defineProperty.f(object, index, createDesc(0, value)); + else object[index] = value; + }; + + /***/ + }, + /* 435 */ + /***/ function (module, exports, __webpack_require__) { + // all enumerable object keys, includes symbols + var getKeys = __webpack_require__(73), + gOPS = __webpack_require__(156), + pIE = __webpack_require__(108); + module.exports = function (it) { + var result = getKeys(it), + getSymbols = gOPS.f; + if (getSymbols) { + var symbols = getSymbols(it), + isEnum = pIE.f, + i = 0, + key; + while (symbols.length > i) if (isEnum.call(it, (key = symbols[i++]))) result.push(key); + } + return result; + }; + + /***/ + }, + /* 436 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = __webpack_require__(48).document && document.documentElement; + + /***/ + }, + /* 437 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var create = __webpack_require__(122), + descriptor = __webpack_require__(109), + setToStringTag = __webpack_require__(123), + IteratorPrototype = {}; + + // 25.1.2.1.1 %IteratorPrototype%[@@iterator]() + __webpack_require__(60)(IteratorPrototype, __webpack_require__(37)('iterator'), function () { + return this; + }); + + module.exports = function (Constructor, NAME, next) { + Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) }); + setToStringTag(Constructor, NAME + ' Iterator'); + }; + + /***/ + }, + /* 438 */ + /***/ function (module, exports, __webpack_require__) { + var ITERATOR = __webpack_require__(37)('iterator'), + SAFE_CLOSING = false; + + try { + var riter = [7][ITERATOR](); + riter['return'] = function () { + SAFE_CLOSING = true; + }; + Array.from(riter, function () { + throw 2; + }); + } catch (e) { + /* empty */ + } + + module.exports = function (exec, skipClosing) { + if (!skipClosing && !SAFE_CLOSING) return false; + var safe = false; + try { + var arr = [7], + iter = arr[ITERATOR](); + iter.next = function () { + return { done: (safe = true) }; + }; + arr[ITERATOR] = function () { + return iter; + }; + exec(arr); + } catch (e) { + /* empty */ + } + return safe; + }; + + /***/ + }, + /* 439 */ + /***/ function (module, exports, __webpack_require__) { + var getKeys = __webpack_require__(73), + toIObject = __webpack_require__(61); + module.exports = function (object, el) { + var O = toIObject(object), + keys = getKeys(O), + length = keys.length, + index = 0, + key; + while (length > index) if (O[(key = keys[index++])] === el) return key; + }; + + /***/ + }, + /* 440 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // 19.1.2.1 Object.assign(target, source, ...) + var getKeys = __webpack_require__(73), + gOPS = __webpack_require__(156), + pIE = __webpack_require__(108), + toObject = __webpack_require__(110), + IObject = __webpack_require__(152), + $assign = Object.assign; + + // should work with symbols and should have deterministic property order (V8 bug) + module.exports = + !$assign || + __webpack_require__(70)(function () { + var A = {}, + B = {}, + S = Symbol(), + K = 'abcdefghijklmnopqrst'; + A[S] = 7; + K.split('').forEach(function (k) { + B[k] = k; + }); + return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K; + }) + ? function assign(target, source) { + // eslint-disable-line no-unused-vars + var T = toObject(target), + aLen = arguments.length, + index = 1, + getSymbols = gOPS.f, + isEnum = pIE.f; + while (aLen > index) { + var S = IObject(arguments[index++]), + keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S), + length = keys.length, + j = 0, + key; + while (length > j) if (isEnum.call(S, (key = keys[j++]))) T[key] = S[key]; + } + return T; + } + : $assign; + + /***/ + }, + /* 441 */ + /***/ function (module, exports, __webpack_require__) { + var dP = __webpack_require__(49), + anObject = __webpack_require__(69), + getKeys = __webpack_require__(73); + + module.exports = __webpack_require__(55) + ? Object.defineProperties + : function defineProperties(O, Properties) { + anObject(O); + var keys = getKeys(Properties), + length = keys.length, + i = 0, + P; + while (length > i) dP.f(O, (P = keys[i++]), Properties[P]); + return O; + }; + + /***/ + }, + /* 442 */ + /***/ function (module, exports, __webpack_require__) { + // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window + var toIObject = __webpack_require__(61), + gOPN = __webpack_require__(253).f, + toString = {}.toString; + + var windowNames = + typeof window == 'object' && window && Object.getOwnPropertyNames + ? Object.getOwnPropertyNames(window) + : []; + + var getWindowNames = function (it) { + try { + return gOPN(it); + } catch (e) { + return windowNames.slice(); + } + }; + + module.exports.f = function getOwnPropertyNames(it) { + return windowNames && toString.call(it) == '[object Window]' + ? getWindowNames(it) + : gOPN(toIObject(it)); + }; + + /***/ + }, + /* 443 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) + var has = __webpack_require__(71), + toObject = __webpack_require__(110), + IE_PROTO = __webpack_require__(157)('IE_PROTO'), + ObjectProto = Object.prototype; + + module.exports = + Object.getPrototypeOf || + function (O) { + O = toObject(O); + if (has(O, IE_PROTO)) return O[IE_PROTO]; + if (typeof O.constructor == 'function' && O instanceof O.constructor) { + return O.constructor.prototype; + } + return O instanceof Object ? ObjectProto : null; + }; + + /***/ + }, + /* 444 */ + /***/ function (module, exports, __webpack_require__) { + // most Object methods by ES6 should accept primitives + var $export = __webpack_require__(42), + core = __webpack_require__(18), + fails = __webpack_require__(70); + module.exports = function (KEY, exec) { + var fn = (core.Object || {})[KEY] || Object[KEY], + exp = {}; + exp[KEY] = exec(fn); + $export( + $export.S + + $export.F * + fails(function () { + fn(1); + }), + 'Object', + exp, + ); + }; + + /***/ + }, + /* 445 */ + /***/ function (module, exports, __webpack_require__) { + // Works with __proto__ only. Old v8 can't work with null proto objects. + /* eslint-disable no-proto */ + var isObject = __webpack_require__(72), + anObject = __webpack_require__(69); + var check = function (O, proto) { + anObject(O); + if (!isObject(proto) && proto !== null) throw TypeError(proto + ": can't set as prototype!"); + }; + module.exports = { + set: + Object.setPrototypeOf || + ('__proto__' in {} // eslint-disable-line + ? (function (test, buggy, set) { + try { + set = __webpack_require__(89)( + Function.call, + __webpack_require__(252).f(Object.prototype, '__proto__').set, + 2, + ); + set(test, []); + buggy = !(test instanceof Array); + } catch (e) { + buggy = true; + } + return function setPrototypeOf(O, proto) { + check(O, proto); + if (buggy) O.__proto__ = proto; + else set(O, proto); + return O; + }; + })({}, false) + : undefined), + check: check, + }; + + /***/ + }, + /* 446 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var global = __webpack_require__(48), + core = __webpack_require__(18), + dP = __webpack_require__(49), + DESCRIPTORS = __webpack_require__(55), + SPECIES = __webpack_require__(37)('species'); + + module.exports = function (KEY) { + var C = typeof core[KEY] == 'function' ? core[KEY] : global[KEY]; + if (DESCRIPTORS && C && !C[SPECIES]) + dP.f(C, SPECIES, { + configurable: true, + get: function () { + return this; + }, + }); + }; + + /***/ + }, + /* 447 */ + /***/ function (module, exports, __webpack_require__) { + var toInteger = __webpack_require__(159), + defined = __webpack_require__(121); + // true -> String#at + // false -> String#codePointAt + module.exports = function (TO_STRING) { + return function (that, pos) { + var s = String(defined(that)), + i = toInteger(pos), + l = s.length, + a, + b; + if (i < 0 || i >= l) return TO_STRING ? '' : undefined; + a = s.charCodeAt(i); + return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff + ? TO_STRING + ? s.charAt(i) + : a + : TO_STRING + ? s.slice(i, i + 2) + : ((a - 0xd800) << 10) + (b - 0xdc00) + 0x10000; + }; + }; + + /***/ + }, + /* 448 */ + /***/ function (module, exports, __webpack_require__) { + var toInteger = __webpack_require__(159), + max = Math.max, + min = Math.min; + module.exports = function (index, length) { + index = toInteger(index); + return index < 0 ? max(index + length, 0) : min(index, length); + }; + + /***/ + }, + /* 449 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var ctx = __webpack_require__(89), + $export = __webpack_require__(42), + toObject = __webpack_require__(110), + call = __webpack_require__(250), + isArrayIter = __webpack_require__(248), + toLength = __webpack_require__(124), + createProperty = __webpack_require__(434), + getIterFn = __webpack_require__(258); + + $export( + $export.S + + $export.F * + !__webpack_require__(438)(function (iter) { + Array.from(iter); + }), + 'Array', + { + // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined) + from: function from(arrayLike /*, mapfn = undefined, thisArg = undefined*/) { + var O = toObject(arrayLike), + C = typeof this == 'function' ? this : Array, + aLen = arguments.length, + mapfn = aLen > 1 ? arguments[1] : undefined, + mapping = mapfn !== undefined, + index = 0, + iterFn = getIterFn(O), + length, + result, + step, + iterator; + if (mapping) mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2); + // if object isn't iterable or it's array with default iterator - use simple case + if (iterFn != undefined && !(C == Array && isArrayIter(iterFn))) { + for (iterator = iterFn.call(O), result = new C(); !(step = iterator.next()).done; index++) { + createProperty( + result, + index, + mapping ? call(iterator, mapfn, [step.value, index], true) : step.value, + ); + } + } else { + length = toLength(O.length); + for (result = new C(length); length > index; index++) { + createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]); + } + } + result.length = index; + return result; + }, + }, + ); + + /***/ + }, + /* 450 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var addToUnscopables = __webpack_require__(425), + step = __webpack_require__(251), + Iterators = __webpack_require__(107), + toIObject = __webpack_require__(61); + + // 22.1.3.4 Array.prototype.entries() + // 22.1.3.13 Array.prototype.keys() + // 22.1.3.29 Array.prototype.values() + // 22.1.3.30 Array.prototype[@@iterator]() + module.exports = __webpack_require__(153)( + Array, + 'Array', + function (iterated, kind) { + this._t = toIObject(iterated); // target + this._i = 0; // next index + this._k = kind; // kind + // 22.1.5.2.1 %ArrayIteratorPrototype%.next() + }, + function () { + var O = this._t, + kind = this._k, + index = this._i++; + if (!O || index >= O.length) { + this._t = undefined; + return step(1); + } + if (kind == 'keys') return step(0, index); + if (kind == 'values') return step(0, O[index]); + return step(0, [index, O[index]]); + }, + 'values', + ); + + // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) + Iterators.Arguments = Iterators.Array; + + addToUnscopables('keys'); + addToUnscopables('values'); + addToUnscopables('entries'); + + /***/ + }, + /* 451 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var strong = __webpack_require__(431); + + // 23.1 Map Objects + module.exports = __webpack_require__(433)( + 'Map', + function (get) { + return function Map() { + return get(this, arguments.length > 0 ? arguments[0] : undefined); + }; + }, + { + // 23.1.3.6 Map.prototype.get(key) + get: function get(key) { + var entry = strong.getEntry(this, key); + return entry && entry.v; + }, + // 23.1.3.9 Map.prototype.set(key, value) + set: function set(key, value) { + return strong.def(this, key === 0 ? 0 : key, value); + }, + }, + strong, + true, + ); + + /***/ + }, + /* 452 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.3.1 Object.assign(target, source) + var $export = __webpack_require__(42); + + $export($export.S + $export.F, 'Object', { assign: __webpack_require__(440) }); + + /***/ + }, + /* 453 */ + /***/ function (module, exports, __webpack_require__) { + var $export = __webpack_require__(42); + // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) + $export($export.S, 'Object', { create: __webpack_require__(122) }); + + /***/ + }, + /* 454 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.14 Object.keys(O) + var toObject = __webpack_require__(110), + $keys = __webpack_require__(73); + + __webpack_require__(444)('keys', function () { + return function keys(it) { + return $keys(toObject(it)); + }; + }); + + /***/ + }, + /* 455 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.3.19 Object.setPrototypeOf(O, proto) + var $export = __webpack_require__(42); + $export($export.S, 'Object', { setPrototypeOf: __webpack_require__(445).set }); + + /***/ + }, + /* 456 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // ECMAScript 6 symbols shim + var global = __webpack_require__(48), + has = __webpack_require__(71), + DESCRIPTORS = __webpack_require__(55), + $export = __webpack_require__(42), + redefine = __webpack_require__(257), + META = __webpack_require__(155).KEY, + $fails = __webpack_require__(70), + shared = __webpack_require__(158), + setToStringTag = __webpack_require__(123), + uid = __webpack_require__(125), + wks = __webpack_require__(37), + wksExt = __webpack_require__(162), + wksDefine = __webpack_require__(161), + keyOf = __webpack_require__(439), + enumKeys = __webpack_require__(435), + isArray = __webpack_require__(249), + anObject = __webpack_require__(69), + toIObject = __webpack_require__(61), + toPrimitive = __webpack_require__(160), + createDesc = __webpack_require__(109), + _create = __webpack_require__(122), + gOPNExt = __webpack_require__(442), + $GOPD = __webpack_require__(252), + $DP = __webpack_require__(49), + $keys = __webpack_require__(73), + gOPD = $GOPD.f, + dP = $DP.f, + gOPN = gOPNExt.f, + $Symbol = global.Symbol, + $JSON = global.JSON, + _stringify = $JSON && $JSON.stringify, + PROTOTYPE = 'prototype', + HIDDEN = wks('_hidden'), + TO_PRIMITIVE = wks('toPrimitive'), + isEnum = {}.propertyIsEnumerable, + SymbolRegistry = shared('symbol-registry'), + AllSymbols = shared('symbols'), + OPSymbols = shared('op-symbols'), + ObjectProto = Object[PROTOTYPE], + USE_NATIVE = typeof $Symbol == 'function', + QObject = global.QObject; + // Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173 + var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild; + + // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687 + var setSymbolDesc = + DESCRIPTORS && + $fails(function () { + return ( + _create( + dP({}, 'a', { + get: function () { + return dP(this, 'a', { value: 7 }).a; + }, + }), + ).a != 7 + ); + }) + ? function (it, key, D) { + var protoDesc = gOPD(ObjectProto, key); + if (protoDesc) delete ObjectProto[key]; + dP(it, key, D); + if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc); + } + : dP; + + var wrap = function (tag) { + var sym = (AllSymbols[tag] = _create($Symbol[PROTOTYPE])); + sym._k = tag; + return sym; + }; + + var isSymbol = + USE_NATIVE && typeof $Symbol.iterator == 'symbol' + ? function (it) { + return typeof it == 'symbol'; + } + : function (it) { + return it instanceof $Symbol; + }; + + var $defineProperty = function defineProperty(it, key, D) { + if (it === ObjectProto) $defineProperty(OPSymbols, key, D); + anObject(it); + key = toPrimitive(key, true); + anObject(D); + if (has(AllSymbols, key)) { + if (!D.enumerable) { + if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {})); + it[HIDDEN][key] = true; + } else { + if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false; + D = _create(D, { enumerable: createDesc(0, false) }); + } + return setSymbolDesc(it, key, D); + } + return dP(it, key, D); + }; + var $defineProperties = function defineProperties(it, P) { + anObject(it); + var keys = enumKeys((P = toIObject(P))), + i = 0, + l = keys.length, + key; + while (l > i) $defineProperty(it, (key = keys[i++]), P[key]); + return it; + }; + var $create = function create(it, P) { + return P === undefined ? _create(it) : $defineProperties(_create(it), P); + }; + var $propertyIsEnumerable = function propertyIsEnumerable(key) { + var E = isEnum.call(this, (key = toPrimitive(key, true))); + if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false; + return E || !has(this, key) || !has(AllSymbols, key) || (has(this, HIDDEN) && this[HIDDEN][key]) + ? E + : true; + }; + var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) { + it = toIObject(it); + key = toPrimitive(key, true); + if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return; + var D = gOPD(it, key); + if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true; + return D; + }; + var $getOwnPropertyNames = function getOwnPropertyNames(it) { + var names = gOPN(toIObject(it)), + result = [], + i = 0, + key; + while (names.length > i) { + if (!has(AllSymbols, (key = names[i++])) && key != HIDDEN && key != META) result.push(key); + } + return result; + }; + var $getOwnPropertySymbols = function getOwnPropertySymbols(it) { + var IS_OP = it === ObjectProto, + names = gOPN(IS_OP ? OPSymbols : toIObject(it)), + result = [], + i = 0, + key; + while (names.length > i) { + if (has(AllSymbols, (key = names[i++])) && (IS_OP ? has(ObjectProto, key) : true)) + result.push(AllSymbols[key]); + } + return result; + }; + + // 19.4.1.1 Symbol([description]) + if (!USE_NATIVE) { + $Symbol = function Symbol() { + if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!'); + var tag = uid(arguments.length > 0 ? arguments[0] : undefined); + var $set = function (value) { + if (this === ObjectProto) $set.call(OPSymbols, value); + if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false; + setSymbolDesc(this, tag, createDesc(1, value)); + }; + if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set }); + return wrap(tag); + }; + redefine($Symbol[PROTOTYPE], 'toString', function toString() { + return this._k; + }); + + $GOPD.f = $getOwnPropertyDescriptor; + $DP.f = $defineProperty; + __webpack_require__(253).f = gOPNExt.f = $getOwnPropertyNames; + __webpack_require__(108).f = $propertyIsEnumerable; + __webpack_require__(156).f = $getOwnPropertySymbols; + + if (DESCRIPTORS && !__webpack_require__(154)) { + redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true); + } + + wksExt.f = function (name) { + return wrap(wks(name)); + }; + } + + $export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol }); + + for ( + var symbols = + // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14 + 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'.split( + ',', + ), + i = 0; + symbols.length > i; + + ) + wks(symbols[i++]); + + for (var symbols = $keys(wks.store), i = 0; symbols.length > i; ) wksDefine(symbols[i++]); + + $export($export.S + $export.F * !USE_NATIVE, 'Symbol', { + // 19.4.2.1 Symbol.for(key) + for: function (key) { + return has(SymbolRegistry, (key += '')) + ? SymbolRegistry[key] + : (SymbolRegistry[key] = $Symbol(key)); + }, + // 19.4.2.5 Symbol.keyFor(sym) + keyFor: function keyFor(key) { + if (isSymbol(key)) return keyOf(SymbolRegistry, key); + throw TypeError(key + ' is not a symbol!'); + }, + useSetter: function () { + setter = true; + }, + useSimple: function () { + setter = false; + }, + }); + + $export($export.S + $export.F * !USE_NATIVE, 'Object', { + // 19.1.2.2 Object.create(O [, Properties]) + create: $create, + // 19.1.2.4 Object.defineProperty(O, P, Attributes) + defineProperty: $defineProperty, + // 19.1.2.3 Object.defineProperties(O, Properties) + defineProperties: $defineProperties, + // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) + getOwnPropertyDescriptor: $getOwnPropertyDescriptor, + // 19.1.2.7 Object.getOwnPropertyNames(O) + getOwnPropertyNames: $getOwnPropertyNames, + // 19.1.2.8 Object.getOwnPropertySymbols(O) + getOwnPropertySymbols: $getOwnPropertySymbols, + }); + + // 24.3.2 JSON.stringify(value [, replacer [, space]]) + $JSON && + $export( + $export.S + + $export.F * + (!USE_NATIVE || + $fails(function () { + var S = $Symbol(); + // MS Edge converts symbol values to JSON as {} + // WebKit converts symbol values to JSON as null + // V8 throws on boxed symbols + return ( + _stringify([S]) != '[null]' || + _stringify({ a: S }) != '{}' || + _stringify(Object(S)) != '{}' + ); + })), + 'JSON', + { + stringify: function stringify(it) { + if (it === undefined || isSymbol(it)) return; // IE8 returns string on undefined + var args = [it], + i = 1, + replacer, + $replacer; + while (arguments.length > i) args.push(arguments[i++]); + replacer = args[1]; + if (typeof replacer == 'function') $replacer = replacer; + if ($replacer || !isArray(replacer)) + replacer = function (key, value) { + if ($replacer) value = $replacer.call(this, key, value); + if (!isSymbol(value)) return value; + }; + args[1] = replacer; + return _stringify.apply($JSON, args); + }, + }, + ); + + // 19.4.3.4 Symbol.prototype[@@toPrimitive](hint) + $Symbol[PROTOTYPE][TO_PRIMITIVE] || + __webpack_require__(60)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf); + // 19.4.3.5 Symbol.prototype[@@toStringTag] + setToStringTag($Symbol, 'Symbol'); + // 20.2.1.9 Math[@@toStringTag] + setToStringTag(Math, 'Math', true); + // 24.3.3 JSON[@@toStringTag] + setToStringTag(global.JSON, 'JSON', true); + + /***/ + }, + /* 457 */ + /***/ function (module, exports, __webpack_require__) { + // https://github.com/DavidBruant/Map-Set.prototype.toJSON + var $export = __webpack_require__(42); + + $export($export.P + $export.R, 'Map', { toJSON: __webpack_require__(432)('Map') }); + + /***/ + }, + /* 458 */ + /***/ function (module, exports, __webpack_require__) { + // https://github.com/tc39/proposal-object-values-entries + var $export = __webpack_require__(42), + $entries = __webpack_require__(255)(true); + + $export($export.S, 'Object', { + entries: function entries(it) { + return $entries(it); + }, + }); + + /***/ + }, + /* 459 */ + /***/ function (module, exports, __webpack_require__) { + // https://github.com/tc39/proposal-object-values-entries + var $export = __webpack_require__(42), + $values = __webpack_require__(255)(false); + + $export($export.S, 'Object', { + values: function values(it) { + return $values(it); + }, + }); + + /***/ + }, + /* 460 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(161)('asyncIterator'); + + /***/ + }, + /* 461 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(161)('observable'); + + /***/ + }, + /* 462 */ + /***/ function (module, exports, __webpack_require__) { + var isObject = __webpack_require__(9), + isArray = __webpack_require__(172), + SPECIES = __webpack_require__(10)('species'); + + module.exports = function (original) { + var C; + if (isArray(original)) { + C = original.constructor; + // cross-realm fallback + if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined; + if (isObject(C)) { + C = C[SPECIES]; + if (C === null) C = undefined; + } + } + return C === undefined ? Array : C; + }; + + /***/ + }, + /* 463 */ + /***/ function (module, exports, __webpack_require__) { + // 9.4.2.3 ArraySpeciesCreate(originalArray, length) + var speciesConstructor = __webpack_require__(462); + + module.exports = function (original, length) { + return new (speciesConstructor(original))(length); + }; + + /***/ + }, + /* 464 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var anObject = __webpack_require__(4), + toPrimitive = __webpack_require__(52), + NUMBER = 'number'; + + module.exports = function (hint) { + if (hint !== 'string' && hint !== NUMBER && hint !== 'default') throw TypeError('Incorrect hint'); + return toPrimitive(anObject(this), hint != NUMBER); + }; + + /***/ + }, + /* 465 */ + /***/ function (module, exports, __webpack_require__) { + // all enumerable object keys, includes symbols + var getKeys = __webpack_require__(78), + gOPS = __webpack_require__(134), + pIE = __webpack_require__(113); + module.exports = function (it) { + var result = getKeys(it), + getSymbols = gOPS.f; + if (getSymbols) { + var symbols = getSymbols(it), + isEnum = pIE.f, + i = 0, + key; + while (symbols.length > i) if (isEnum.call(it, (key = symbols[i++]))) result.push(key); + } + return result; + }; + + /***/ + }, + /* 466 */ + /***/ function (module, exports, __webpack_require__) { + var getKeys = __webpack_require__(78), + toIObject = __webpack_require__(32); + module.exports = function (object, el) { + var O = toIObject(object), + keys = getKeys(O), + length = keys.length, + index = 0, + key; + while (length > index) if (O[(key = keys[index++])] === el) return key; + }; + + /***/ + }, + /* 467 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var path = __webpack_require__(468), + invoke = __webpack_require__(130), + aFunction = __webpack_require__(28); + module.exports = function (/* ...pargs */) { + var fn = aFunction(this), + length = arguments.length, + pargs = Array(length), + i = 0, + _ = path._, + holder = false; + while (length > i) if ((pargs[i] = arguments[i++]) === _) holder = true; + return function (/* ...args */) { + var that = this, + aLen = arguments.length, + j = 0, + k = 0, + args; + if (!holder && !aLen) return invoke(fn, pargs, that); + args = pargs.slice(); + if (holder) for (; length > j; j++) if (args[j] === _) args[j] = arguments[k++]; + while (aLen > k) args.push(arguments[k++]); + return invoke(fn, args, that); + }; + }; + + /***/ + }, + /* 468 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = __webpack_require__(6); + + /***/ + }, + /* 469 */ + /***/ function (module, exports) { + module.exports = function (regExp, replace) { + var replacer = + replace === Object(replace) + ? function (part) { + return replace[part]; + } + : replace; + return function (it) { + return String(it).replace(regExp, replacer); + }; + }; + + /***/ + }, + /* 470 */ + /***/ function (module, exports, __webpack_require__) { + // https://github.com/benjamingr/RexExp.escape + var $export = __webpack_require__(0), + $re = __webpack_require__(469)(/[\\^$*+?.()|[\]{}]/g, '\\$&'); + + $export($export.S, 'RegExp', { + escape: function escape(it) { + return $re(it); + }, + }); + + /***/ + }, + /* 471 */ + /***/ function (module, exports, __webpack_require__) { + // 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length) + var $export = __webpack_require__(0); + + $export($export.P, 'Array', { copyWithin: __webpack_require__(262) }); + + __webpack_require__(90)('copyWithin'); + + /***/ + }, + /* 472 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0), + $every = __webpack_require__(50)(4); + + $export($export.P + $export.F * !__webpack_require__(45)([].every, true), 'Array', { + // 22.1.3.5 / 15.4.4.16 Array.prototype.every(callbackfn [, thisArg]) + every: function every(callbackfn /* , thisArg */) { + return $every(this, callbackfn, arguments[1]); + }, + }); + + /***/ + }, + /* 473 */ + /***/ function (module, exports, __webpack_require__) { + // 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length) + var $export = __webpack_require__(0); + + $export($export.P, 'Array', { fill: __webpack_require__(164) }); + + __webpack_require__(90)('fill'); + + /***/ + }, + /* 474 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0), + $filter = __webpack_require__(50)(2); + + $export($export.P + $export.F * !__webpack_require__(45)([].filter, true), 'Array', { + // 22.1.3.7 / 15.4.4.20 Array.prototype.filter(callbackfn [, thisArg]) + filter: function filter(callbackfn /* , thisArg */) { + return $filter(this, callbackfn, arguments[1]); + }, + }); + + /***/ + }, + /* 475 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // 22.1.3.9 Array.prototype.findIndex(predicate, thisArg = undefined) + var $export = __webpack_require__(0), + $find = __webpack_require__(50)(6), + KEY = 'findIndex', + forced = true; + // Shouldn't skip holes + if (KEY in []) + Array(1)[KEY](function () { + forced = false; + }); + $export($export.P + $export.F * forced, 'Array', { + findIndex: function findIndex(callbackfn /*, that = undefined */) { + return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); + }, + }); + __webpack_require__(90)(KEY); + + /***/ + }, + /* 476 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // 22.1.3.8 Array.prototype.find(predicate, thisArg = undefined) + var $export = __webpack_require__(0), + $find = __webpack_require__(50)(5), + KEY = 'find', + forced = true; + // Shouldn't skip holes + if (KEY in []) + Array(1)[KEY](function () { + forced = false; + }); + $export($export.P + $export.F * forced, 'Array', { + find: function find(callbackfn /*, that = undefined */) { + return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); + }, + }); + __webpack_require__(90)(KEY); + + /***/ + }, + /* 477 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0), + $forEach = __webpack_require__(50)(0), + STRICT = __webpack_require__(45)([].forEach, true); + + $export($export.P + $export.F * !STRICT, 'Array', { + // 22.1.3.10 / 15.4.4.18 Array.prototype.forEach(callbackfn [, thisArg]) + forEach: function forEach(callbackfn /* , thisArg */) { + return $forEach(this, callbackfn, arguments[1]); + }, + }); + + /***/ + }, + /* 478 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var ctx = __webpack_require__(57), + $export = __webpack_require__(0), + toObject = __webpack_require__(17), + call = __webpack_require__(271), + isArrayIter = __webpack_require__(171), + toLength = __webpack_require__(15), + createProperty = __webpack_require__(165), + getIterFn = __webpack_require__(188); + + $export( + $export.S + + $export.F * + !__webpack_require__(132)(function (iter) { + Array.from(iter); + }), + 'Array', + { + // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined) + from: function from(arrayLike /*, mapfn = undefined, thisArg = undefined*/) { + var O = toObject(arrayLike), + C = typeof this == 'function' ? this : Array, + aLen = arguments.length, + mapfn = aLen > 1 ? arguments[1] : undefined, + mapping = mapfn !== undefined, + index = 0, + iterFn = getIterFn(O), + length, + result, + step, + iterator; + if (mapping) mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2); + // if object isn't iterable or it's array with default iterator - use simple case + if (iterFn != undefined && !(C == Array && isArrayIter(iterFn))) { + for (iterator = iterFn.call(O), result = new C(); !(step = iterator.next()).done; index++) { + createProperty( + result, + index, + mapping ? call(iterator, mapfn, [step.value, index], true) : step.value, + ); + } + } else { + length = toLength(O.length); + for (result = new C(length); length > index; index++) { + createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]); + } + } + result.length = index; + return result; + }, + }, + ); + + /***/ + }, + /* 479 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0), + $indexOf = __webpack_require__(126)(false), + $native = [].indexOf, + NEGATIVE_ZERO = !!$native && 1 / [1].indexOf(1, -0) < 0; + + $export($export.P + $export.F * (NEGATIVE_ZERO || !__webpack_require__(45)($native)), 'Array', { + // 22.1.3.11 / 15.4.4.14 Array.prototype.indexOf(searchElement [, fromIndex]) + indexOf: function indexOf(searchElement /*, fromIndex = 0 */) { + return NEGATIVE_ZERO + ? // convert -0 to +0 + $native.apply(this, arguments) || 0 + : $indexOf(this, searchElement, arguments[1]); + }, + }); + + /***/ + }, + /* 480 */ + /***/ function (module, exports, __webpack_require__) { + // 22.1.2.2 / 15.4.3.2 Array.isArray(arg) + var $export = __webpack_require__(0); + + $export($export.S, 'Array', { isArray: __webpack_require__(172) }); + + /***/ + }, + /* 481 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // 22.1.3.13 Array.prototype.join(separator) + var $export = __webpack_require__(0), + toIObject = __webpack_require__(32), + arrayJoin = [].join; + + // fallback for not array-like strings + $export( + $export.P + $export.F * (__webpack_require__(112) != Object || !__webpack_require__(45)(arrayJoin)), + 'Array', + { + join: function join(separator) { + return arrayJoin.call(toIObject(this), separator === undefined ? ',' : separator); + }, + }, + ); + + /***/ + }, + /* 482 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0), + toIObject = __webpack_require__(32), + toInteger = __webpack_require__(64), + toLength = __webpack_require__(15), + $native = [].lastIndexOf, + NEGATIVE_ZERO = !!$native && 1 / [1].lastIndexOf(1, -0) < 0; + + $export($export.P + $export.F * (NEGATIVE_ZERO || !__webpack_require__(45)($native)), 'Array', { + // 22.1.3.14 / 15.4.4.15 Array.prototype.lastIndexOf(searchElement [, fromIndex]) + lastIndexOf: function lastIndexOf(searchElement /*, fromIndex = @[*-1] */) { + // convert -0 to +0 + if (NEGATIVE_ZERO) return $native.apply(this, arguments) || 0; + var O = toIObject(this), + length = toLength(O.length), + index = length - 1; + if (arguments.length > 1) index = Math.min(index, toInteger(arguments[1])); + if (index < 0) index = length + index; + for (; index >= 0; index--) if (index in O) if (O[index] === searchElement) return index || 0; + return -1; + }, + }); + + /***/ + }, + /* 483 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0), + $map = __webpack_require__(50)(1); + + $export($export.P + $export.F * !__webpack_require__(45)([].map, true), 'Array', { + // 22.1.3.15 / 15.4.4.19 Array.prototype.map(callbackfn [, thisArg]) + map: function map(callbackfn /* , thisArg */) { + return $map(this, callbackfn, arguments[1]); + }, + }); + + /***/ + }, + /* 484 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0), + createProperty = __webpack_require__(165); + + // WebKit Array.of isn't generic + $export( + $export.S + + $export.F * + __webpack_require__(7)(function () { + function F() {} + return !(Array.of.call(F) instanceof F); + }), + 'Array', + { + // 22.1.2.3 Array.of( ...items) + of: function of(/* ...args */) { + var index = 0, + aLen = arguments.length, + result = new (typeof this == 'function' ? this : Array)(aLen); + while (aLen > index) createProperty(result, index, arguments[index++]); + result.length = aLen; + return result; + }, + }, + ); + + /***/ + }, + /* 485 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0), + $reduce = __webpack_require__(264); + + $export($export.P + $export.F * !__webpack_require__(45)([].reduceRight, true), 'Array', { + // 22.1.3.19 / 15.4.4.22 Array.prototype.reduceRight(callbackfn [, initialValue]) + reduceRight: function reduceRight(callbackfn /* , initialValue */) { + return $reduce(this, callbackfn, arguments.length, arguments[1], true); + }, + }); + + /***/ + }, + /* 486 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0), + $reduce = __webpack_require__(264); + + $export($export.P + $export.F * !__webpack_require__(45)([].reduce, true), 'Array', { + // 22.1.3.18 / 15.4.4.21 Array.prototype.reduce(callbackfn [, initialValue]) + reduce: function reduce(callbackfn /* , initialValue */) { + return $reduce(this, callbackfn, arguments.length, arguments[1], false); + }, + }); + + /***/ + }, + /* 487 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0), + html = __webpack_require__(169), + cof = __webpack_require__(43), + toIndex = __webpack_require__(81), + toLength = __webpack_require__(15), + arraySlice = [].slice; + + // fallback for not array-like ES3 strings and DOM objects + $export( + $export.P + + $export.F * + __webpack_require__(7)(function () { + if (html) arraySlice.call(html); + }), + 'Array', + { + slice: function slice(begin, end) { + var len = toLength(this.length), + klass = cof(this); + end = end === undefined ? len : end; + if (klass == 'Array') return arraySlice.call(this, begin, end); + var start = toIndex(begin, len), + upTo = toIndex(end, len), + size = toLength(upTo - start), + cloned = Array(size), + i = 0; + for (; i < size; i++) cloned[i] = klass == 'String' ? this.charAt(start + i) : this[start + i]; + return cloned; + }, + }, + ); + + /***/ + }, + /* 488 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0), + $some = __webpack_require__(50)(3); + + $export($export.P + $export.F * !__webpack_require__(45)([].some, true), 'Array', { + // 22.1.3.23 / 15.4.4.17 Array.prototype.some(callbackfn [, thisArg]) + some: function some(callbackfn /* , thisArg */) { + return $some(this, callbackfn, arguments[1]); + }, + }); + + /***/ + }, + /* 489 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0), + aFunction = __webpack_require__(28), + toObject = __webpack_require__(17), + fails = __webpack_require__(7), + $sort = [].sort, + test = [1, 2, 3]; + + $export( + $export.P + + $export.F * + (fails(function () { + // IE8- + test.sort(undefined); + }) || + !fails(function () { + // V8 bug + test.sort(null); + // Old WebKit + }) || + !__webpack_require__(45)($sort)), + 'Array', + { + // 22.1.3.25 Array.prototype.sort(comparefn) + sort: function sort(comparefn) { + return comparefn === undefined + ? $sort.call(toObject(this)) + : $sort.call(toObject(this), aFunction(comparefn)); + }, + }, + ); + + /***/ + }, + /* 490 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(80)('Array'); + + /***/ + }, + /* 491 */ + /***/ function (module, exports, __webpack_require__) { + // 20.3.3.1 / 15.9.4.4 Date.now() + var $export = __webpack_require__(0); + + $export($export.S, 'Date', { + now: function () { + return new Date().getTime(); + }, + }); + + /***/ + }, + /* 492 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString() + var $export = __webpack_require__(0), + fails = __webpack_require__(7), + getTime = Date.prototype.getTime; + + var lz = function (num) { + return num > 9 ? num : '0' + num; + }; + + // PhantomJS / old WebKit has a broken implementations + $export( + $export.P + + $export.F * + (fails(function () { + return new Date(-5e13 - 1).toISOString() != '0385-07-25T07:06:39.999Z'; + }) || + !fails(function () { + new Date(NaN).toISOString(); + })), + 'Date', + { + toISOString: function toISOString() { + if (!isFinite(getTime.call(this))) throw RangeError('Invalid time value'); + var d = this, + y = d.getUTCFullYear(), + m = d.getUTCMilliseconds(), + s = y < 0 ? '-' : y > 9999 ? '+' : ''; + return ( + s + + ('00000' + Math.abs(y)).slice(s ? -6 : -4) + + '-' + + lz(d.getUTCMonth() + 1) + + '-' + + lz(d.getUTCDate()) + + 'T' + + lz(d.getUTCHours()) + + ':' + + lz(d.getUTCMinutes()) + + ':' + + lz(d.getUTCSeconds()) + + '.' + + (m > 99 ? m : '0' + lz(m)) + + 'Z' + ); + }, + }, + ); + + /***/ + }, + /* 493 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0), + toObject = __webpack_require__(17), + toPrimitive = __webpack_require__(52); + + $export( + $export.P + + $export.F * + __webpack_require__(7)(function () { + return ( + new Date(NaN).toJSON() !== null || + Date.prototype.toJSON.call({ + toISOString: function () { + return 1; + }, + }) !== 1 + ); + }), + 'Date', + { + toJSON: function toJSON(key) { + var O = toObject(this), + pv = toPrimitive(O); + return typeof pv == 'number' && !isFinite(pv) ? null : O.toISOString(); + }, + }, + ); + + /***/ + }, + /* 494 */ + /***/ function (module, exports, __webpack_require__) { + var TO_PRIMITIVE = __webpack_require__(10)('toPrimitive'), + proto = Date.prototype; + + if (!(TO_PRIMITIVE in proto)) __webpack_require__(29)(proto, TO_PRIMITIVE, __webpack_require__(464)); + + /***/ + }, + /* 495 */ + /***/ function (module, exports, __webpack_require__) { + var DateProto = Date.prototype, + INVALID_DATE = 'Invalid Date', + TO_STRING = 'toString', + $toString = DateProto[TO_STRING], + getTime = DateProto.getTime; + if (new Date(NaN) + '' != INVALID_DATE) { + __webpack_require__(30)(DateProto, TO_STRING, function toString() { + var value = getTime.call(this); + return value === value ? $toString.call(this) : INVALID_DATE; + }); + } + + /***/ + }, + /* 496 */ + /***/ function (module, exports, __webpack_require__) { + // 19.2.3.2 / 15.3.4.5 Function.prototype.bind(thisArg, args...) + var $export = __webpack_require__(0); + + $export($export.P, 'Function', { bind: __webpack_require__(265) }); + + /***/ + }, + /* 497 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var isObject = __webpack_require__(9), + getPrototypeOf = __webpack_require__(39), + HAS_INSTANCE = __webpack_require__(10)('hasInstance'), + FunctionProto = Function.prototype; + // 19.2.3.6 Function.prototype[@@hasInstance](V) + if (!(HAS_INSTANCE in FunctionProto)) + __webpack_require__(12).f(FunctionProto, HAS_INSTANCE, { + value: function (O) { + if (typeof this != 'function' || !isObject(O)) return false; + if (!isObject(this.prototype)) return O instanceof this; + // for environment w/o native `@@hasInstance` logic enough `instanceof`, but add this: + while ((O = getPrototypeOf(O))) if (this.prototype === O) return true; + return false; + }, + }); + + /***/ + }, + /* 498 */ + /***/ function (module, exports, __webpack_require__) { + var dP = __webpack_require__(12).f, + createDesc = __webpack_require__(63), + has = __webpack_require__(21), + FProto = Function.prototype, + nameRE = /^\s*function ([^ (]*)/, + NAME = 'name'; + + var isExtensible = + Object.isExtensible || + function () { + return true; + }; + + // 19.2.4.2 name + NAME in FProto || + (__webpack_require__(11) && + dP(FProto, NAME, { + configurable: true, + get: function () { + try { + var that = this, + name = ('' + that).match(nameRE)[1]; + has(that, NAME) || !isExtensible(that) || dP(that, NAME, createDesc(5, name)); + return name; + } catch (e) { + return ''; + } + }, + })); + + /***/ + }, + /* 499 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.3 Math.acosh(x) + var $export = __webpack_require__(0), + log1p = __webpack_require__(273), + sqrt = Math.sqrt, + $acosh = Math.acosh; + + $export( + $export.S + + $export.F * + !( + $acosh && + // V8 bug: https://code.google.com/p/v8/issues/detail?id=3509 + Math.floor($acosh(Number.MAX_VALUE)) == 710 && + // Tor Browser bug: Math.acosh(Infinity) -> NaN + $acosh(Infinity) == Infinity + ), + 'Math', + { + acosh: function acosh(x) { + return (x = +x) < 1 + ? NaN + : x > 94906265.62425156 + ? Math.log(x) + Math.LN2 + : log1p(x - 1 + sqrt(x - 1) * sqrt(x + 1)); + }, + }, + ); + + /***/ + }, + /* 500 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.5 Math.asinh(x) + var $export = __webpack_require__(0), + $asinh = Math.asinh; + + function asinh(x) { + return !isFinite((x = +x)) || x == 0 ? x : x < 0 ? -asinh(-x) : Math.log(x + Math.sqrt(x * x + 1)); + } + + // Tor Browser bug: Math.asinh(0) -> -0 + $export($export.S + $export.F * !($asinh && 1 / $asinh(0) > 0), 'Math', { asinh: asinh }); + + /***/ + }, + /* 501 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.7 Math.atanh(x) + var $export = __webpack_require__(0), + $atanh = Math.atanh; + + // Tor Browser bug: Math.atanh(-0) -> 0 + $export($export.S + $export.F * !($atanh && 1 / $atanh(-0) < 0), 'Math', { + atanh: function atanh(x) { + return (x = +x) == 0 ? x : Math.log((1 + x) / (1 - x)) / 2; + }, + }); + + /***/ + }, + /* 502 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.9 Math.cbrt(x) + var $export = __webpack_require__(0), + sign = __webpack_require__(176); + + $export($export.S, 'Math', { + cbrt: function cbrt(x) { + return sign((x = +x)) * Math.pow(Math.abs(x), 1 / 3); + }, + }); + + /***/ + }, + /* 503 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.11 Math.clz32(x) + var $export = __webpack_require__(0); + + $export($export.S, 'Math', { + clz32: function clz32(x) { + return (x >>>= 0) ? 31 - Math.floor(Math.log(x + 0.5) * Math.LOG2E) : 32; + }, + }); + + /***/ + }, + /* 504 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.12 Math.cosh(x) + var $export = __webpack_require__(0), + exp = Math.exp; + + $export($export.S, 'Math', { + cosh: function cosh(x) { + return (exp((x = +x)) + exp(-x)) / 2; + }, + }); + + /***/ + }, + /* 505 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.14 Math.expm1(x) + var $export = __webpack_require__(0), + $expm1 = __webpack_require__(175); + + $export($export.S + $export.F * ($expm1 != Math.expm1), 'Math', { expm1: $expm1 }); + + /***/ + }, + /* 506 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.16 Math.fround(x) + var $export = __webpack_require__(0), + sign = __webpack_require__(176), + pow = Math.pow, + EPSILON = pow(2, -52), + EPSILON32 = pow(2, -23), + MAX32 = pow(2, 127) * (2 - EPSILON32), + MIN32 = pow(2, -126); + + var roundTiesToEven = function (n) { + return n + 1 / EPSILON - 1 / EPSILON; + }; + + $export($export.S, 'Math', { + fround: function fround(x) { + var $abs = Math.abs(x), + $sign = sign(x), + a, + result; + if ($abs < MIN32) return $sign * roundTiesToEven($abs / MIN32 / EPSILON32) * MIN32 * EPSILON32; + a = (1 + EPSILON32 / EPSILON) * $abs; + result = a - (a - $abs); + if (result > MAX32 || result != result) return $sign * Infinity; + return $sign * result; + }, + }); + + /***/ + }, + /* 507 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.17 Math.hypot([value1[, value2[, … ]]]) + var $export = __webpack_require__(0), + abs = Math.abs; + + $export($export.S, 'Math', { + hypot: function hypot(value1, value2) { + // eslint-disable-line no-unused-vars + var sum = 0, + i = 0, + aLen = arguments.length, + larg = 0, + arg, + div; + while (i < aLen) { + arg = abs(arguments[i++]); + if (larg < arg) { + div = larg / arg; + sum = sum * div * div + 1; + larg = arg; + } else if (arg > 0) { + div = arg / larg; + sum += div * div; + } else sum += arg; + } + return larg === Infinity ? Infinity : larg * Math.sqrt(sum); + }, + }); + + /***/ + }, + /* 508 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.18 Math.imul(x, y) + var $export = __webpack_require__(0), + $imul = Math.imul; + + // some WebKit versions fails with big numbers, some has wrong arity + $export( + $export.S + + $export.F * + __webpack_require__(7)(function () { + return $imul(0xffffffff, 5) != -5 || $imul.length != 2; + }), + 'Math', + { + imul: function imul(x, y) { + var UINT16 = 0xffff, + xn = +x, + yn = +y, + xl = UINT16 & xn, + yl = UINT16 & yn; + return ( + 0 | (xl * yl + ((((UINT16 & (xn >>> 16)) * yl + xl * (UINT16 & (yn >>> 16))) << 16) >>> 0)) + ); + }, + }, + ); + + /***/ + }, + /* 509 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.21 Math.log10(x) + var $export = __webpack_require__(0); + + $export($export.S, 'Math', { + log10: function log10(x) { + return Math.log(x) / Math.LN10; + }, + }); + + /***/ + }, + /* 510 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.20 Math.log1p(x) + var $export = __webpack_require__(0); + + $export($export.S, 'Math', { log1p: __webpack_require__(273) }); + + /***/ + }, + /* 511 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.22 Math.log2(x) + var $export = __webpack_require__(0); + + $export($export.S, 'Math', { + log2: function log2(x) { + return Math.log(x) / Math.LN2; + }, + }); + + /***/ + }, + /* 512 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.28 Math.sign(x) + var $export = __webpack_require__(0); + + $export($export.S, 'Math', { sign: __webpack_require__(176) }); + + /***/ + }, + /* 513 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.30 Math.sinh(x) + var $export = __webpack_require__(0), + expm1 = __webpack_require__(175), + exp = Math.exp; + + // V8 near Chromium 38 has a problem with very small numbers + $export( + $export.S + + $export.F * + __webpack_require__(7)(function () { + return !Math.sinh(-2e-17) != -2e-17; + }), + 'Math', + { + sinh: function sinh(x) { + return Math.abs((x = +x)) < 1 + ? (expm1(x) - expm1(-x)) / 2 + : (exp(x - 1) - exp(-x - 1)) * (Math.E / 2); + }, + }, + ); + + /***/ + }, + /* 514 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.33 Math.tanh(x) + var $export = __webpack_require__(0), + expm1 = __webpack_require__(175), + exp = Math.exp; + + $export($export.S, 'Math', { + tanh: function tanh(x) { + var a = expm1((x = +x)), + b = expm1(-x); + return a == Infinity ? 1 : b == Infinity ? -1 : (a - b) / (exp(x) + exp(-x)); + }, + }); + + /***/ + }, + /* 515 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.34 Math.trunc(x) + var $export = __webpack_require__(0); + + $export($export.S, 'Math', { + trunc: function trunc(it) { + return (it > 0 ? Math.floor : Math.ceil)(it); + }, + }); + + /***/ + }, + /* 516 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var global = __webpack_require__(6), + has = __webpack_require__(21), + cof = __webpack_require__(43), + inheritIfRequired = __webpack_require__(170), + toPrimitive = __webpack_require__(52), + fails = __webpack_require__(7), + gOPN = __webpack_require__(77).f, + gOPD = __webpack_require__(38).f, + dP = __webpack_require__(12).f, + $trim = __webpack_require__(94).trim, + NUMBER = 'Number', + $Number = global[NUMBER], + Base = $Number, + proto = $Number.prototype, + // Opera ~12 has broken Object#toString + BROKEN_COF = cof(__webpack_require__(76)(proto)) == NUMBER, + TRIM = 'trim' in String.prototype; + + // 7.1.3 ToNumber(argument) + var toNumber = function (argument) { + var it = toPrimitive(argument, false); + if (typeof it == 'string' && it.length > 2) { + it = TRIM ? it.trim() : $trim(it, 3); + var first = it.charCodeAt(0), + third, + radix, + maxCode; + if (first === 43 || first === 45) { + third = it.charCodeAt(2); + if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix + } else if (first === 48) { + switch (it.charCodeAt(1)) { + case 66: + case 98: + radix = 2; + maxCode = 49; + break; // fast equal /^0b[01]+$/i + case 79: + case 111: + radix = 8; + maxCode = 55; + break; // fast equal /^0o[0-7]+$/i + default: + return +it; + } + for (var digits = it.slice(2), i = 0, l = digits.length, code; i < l; i++) { + code = digits.charCodeAt(i); + // parseInt parses a string to a first unavailable symbol + // but ToNumber should return NaN if a string contains unavailable symbols + if (code < 48 || code > maxCode) return NaN; + } + return parseInt(digits, radix); + } + } + return +it; + }; + + if (!$Number(' 0o1') || !$Number('0b1') || $Number('+0x1')) { + $Number = function Number(value) { + var it = arguments.length < 1 ? 0 : value, + that = this; + return that instanceof $Number && + // check on 1..constructor(foo) case + (BROKEN_COF + ? fails(function () { + proto.valueOf.call(that); + }) + : cof(that) != NUMBER) + ? inheritIfRequired(new Base(toNumber(it)), that, $Number) + : toNumber(it); + }; + for ( + var keys = __webpack_require__(11) + ? gOPN(Base) + : // ES3: + ( + 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' + + // ES6 (in case, if modules with ES6 Number statics required before): + 'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' + + 'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger' + ).split(','), + j = 0, + key; + keys.length > j; + j++ + ) { + if (has(Base, (key = keys[j])) && !has($Number, key)) { + dP($Number, key, gOPD(Base, key)); + } + } + $Number.prototype = proto; + proto.constructor = $Number; + __webpack_require__(30)(global, NUMBER, $Number); + } + + /***/ + }, + /* 517 */ + /***/ function (module, exports, __webpack_require__) { + // 20.1.2.1 Number.EPSILON + var $export = __webpack_require__(0); + + $export($export.S, 'Number', { EPSILON: Math.pow(2, -52) }); + + /***/ + }, + /* 518 */ + /***/ function (module, exports, __webpack_require__) { + // 20.1.2.2 Number.isFinite(number) + var $export = __webpack_require__(0), + _isFinite = __webpack_require__(6).isFinite; + + $export($export.S, 'Number', { + isFinite: function isFinite(it) { + return typeof it == 'number' && _isFinite(it); + }, + }); + + /***/ + }, + /* 519 */ + /***/ function (module, exports, __webpack_require__) { + // 20.1.2.3 Number.isInteger(number) + var $export = __webpack_require__(0); + + $export($export.S, 'Number', { isInteger: __webpack_require__(270) }); + + /***/ + }, + /* 520 */ + /***/ function (module, exports, __webpack_require__) { + // 20.1.2.4 Number.isNaN(number) + var $export = __webpack_require__(0); + + $export($export.S, 'Number', { + isNaN: function isNaN(number) { + return number != number; + }, + }); + + /***/ + }, + /* 521 */ + /***/ function (module, exports, __webpack_require__) { + // 20.1.2.5 Number.isSafeInteger(number) + var $export = __webpack_require__(0), + isInteger = __webpack_require__(270), + abs = Math.abs; + + $export($export.S, 'Number', { + isSafeInteger: function isSafeInteger(number) { + return isInteger(number) && abs(number) <= 0x1fffffffffffff; + }, + }); + + /***/ + }, + /* 522 */ + /***/ function (module, exports, __webpack_require__) { + // 20.1.2.6 Number.MAX_SAFE_INTEGER + var $export = __webpack_require__(0); + + $export($export.S, 'Number', { MAX_SAFE_INTEGER: 0x1fffffffffffff }); + + /***/ + }, + /* 523 */ + /***/ function (module, exports, __webpack_require__) { + // 20.1.2.10 Number.MIN_SAFE_INTEGER + var $export = __webpack_require__(0); + + $export($export.S, 'Number', { MIN_SAFE_INTEGER: -0x1fffffffffffff }); + + /***/ + }, + /* 524 */ + /***/ function (module, exports, __webpack_require__) { + var $export = __webpack_require__(0), + $parseFloat = __webpack_require__(280); + // 20.1.2.12 Number.parseFloat(string) + $export($export.S + $export.F * (Number.parseFloat != $parseFloat), 'Number', { + parseFloat: $parseFloat, + }); + + /***/ + }, + /* 525 */ + /***/ function (module, exports, __webpack_require__) { + var $export = __webpack_require__(0), + $parseInt = __webpack_require__(281); + // 20.1.2.13 Number.parseInt(string, radix) + $export($export.S + $export.F * (Number.parseInt != $parseInt), 'Number', { parseInt: $parseInt }); + + /***/ + }, + /* 526 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0), + toInteger = __webpack_require__(64), + aNumberValue = __webpack_require__(261), + repeat = __webpack_require__(183), + $toFixed = (1).toFixed, + floor = Math.floor, + data = [0, 0, 0, 0, 0, 0], + ERROR = 'Number.toFixed: incorrect invocation!', + ZERO = '0'; + + var multiply = function (n, c) { + var i = -1, + c2 = c; + while (++i < 6) { + c2 += n * data[i]; + data[i] = c2 % 1e7; + c2 = floor(c2 / 1e7); + } + }; + var divide = function (n) { + var i = 6, + c = 0; + while (--i >= 0) { + c += data[i]; + data[i] = floor(c / n); + c = (c % n) * 1e7; + } + }; + var numToString = function () { + var i = 6, + s = ''; + while (--i >= 0) { + if (s !== '' || i === 0 || data[i] !== 0) { + var t = String(data[i]); + s = s === '' ? t : s + repeat.call(ZERO, 7 - t.length) + t; + } + } + return s; + }; + var pow = function (x, n, acc) { + return n === 0 ? acc : n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc); + }; + var log = function (x) { + var n = 0, + x2 = x; + while (x2 >= 4096) { + n += 12; + x2 /= 4096; + } + while (x2 >= 2) { + n += 1; + x2 /= 2; + } + return n; + }; + + $export( + $export.P + + $export.F * + ((!!$toFixed && + ((0.00008).toFixed(3) !== '0.000' || + (0.9).toFixed(0) !== '1' || + (1.255).toFixed(2) !== '1.25' || + (1000000000000000128).toFixed(0) !== '1000000000000000128')) || + !__webpack_require__(7)(function () { + // V8 ~ Android 4.3- + $toFixed.call({}); + })), + 'Number', + { + toFixed: function toFixed(fractionDigits) { + var x = aNumberValue(this, ERROR), + f = toInteger(fractionDigits), + s = '', + m = ZERO, + e, + z, + j, + k; + if (f < 0 || f > 20) throw RangeError(ERROR); + if (x != x) return 'NaN'; + if (x <= -1e21 || x >= 1e21) return String(x); + if (x < 0) { + s = '-'; + x = -x; + } + if (x > 1e-21) { + e = log(x * pow(2, 69, 1)) - 69; + z = e < 0 ? x * pow(2, -e, 1) : x / pow(2, e, 1); + z *= 0x10000000000000; + e = 52 - e; + if (e > 0) { + multiply(0, z); + j = f; + while (j >= 7) { + multiply(1e7, 0); + j -= 7; + } + multiply(pow(10, j, 1), 0); + j = e - 1; + while (j >= 23) { + divide(1 << 23); + j -= 23; + } + divide(1 << j); + multiply(1, 1); + divide(2); + m = numToString(); + } else { + multiply(0, z); + multiply(1 << -e, 0); + m = numToString() + repeat.call(ZERO, f); + } + } + if (f > 0) { + k = m.length; + m = + s + (k <= f ? '0.' + repeat.call(ZERO, f - k) + m : m.slice(0, k - f) + '.' + m.slice(k - f)); + } else { + m = s + m; + } + return m; + }, + }, + ); + + /***/ + }, + /* 527 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0), + $fails = __webpack_require__(7), + aNumberValue = __webpack_require__(261), + $toPrecision = (1).toPrecision; + + $export( + $export.P + + $export.F * + ($fails(function () { + // IE7- + return $toPrecision.call(1, undefined) !== '1'; + }) || + !$fails(function () { + // V8 ~ Android 4.3- + $toPrecision.call({}); + })), + 'Number', + { + toPrecision: function toPrecision(precision) { + var that = aNumberValue(this, 'Number#toPrecision: incorrect invocation!'); + return precision === undefined ? $toPrecision.call(that) : $toPrecision.call(that, precision); + }, + }, + ); + + /***/ + }, + /* 528 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.3.1 Object.assign(target, source) + var $export = __webpack_require__(0); + + $export($export.S + $export.F, 'Object', { assign: __webpack_require__(274) }); + + /***/ + }, + /* 529 */ + /***/ function (module, exports, __webpack_require__) { + var $export = __webpack_require__(0); + // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) + $export($export.S, 'Object', { create: __webpack_require__(76) }); + + /***/ + }, + /* 530 */ + /***/ function (module, exports, __webpack_require__) { + var $export = __webpack_require__(0); + // 19.1.2.3 / 15.2.3.7 Object.defineProperties(O, Properties) + $export($export.S + $export.F * !__webpack_require__(11), 'Object', { + defineProperties: __webpack_require__(275), + }); + + /***/ + }, + /* 531 */ + /***/ function (module, exports, __webpack_require__) { + var $export = __webpack_require__(0); + // 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes) + $export($export.S + $export.F * !__webpack_require__(11), 'Object', { + defineProperty: __webpack_require__(12).f, + }); + + /***/ + }, + /* 532 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.5 Object.freeze(O) + var isObject = __webpack_require__(9), + meta = __webpack_require__(62).onFreeze; + + __webpack_require__(51)('freeze', function ($freeze) { + return function freeze(it) { + return $freeze && isObject(it) ? $freeze(meta(it)) : it; + }; + }); + + /***/ + }, + /* 533 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) + var toIObject = __webpack_require__(32), + $getOwnPropertyDescriptor = __webpack_require__(38).f; + + __webpack_require__(51)('getOwnPropertyDescriptor', function () { + return function getOwnPropertyDescriptor(it, key) { + return $getOwnPropertyDescriptor(toIObject(it), key); + }; + }); + + /***/ + }, + /* 534 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.7 Object.getOwnPropertyNames(O) + __webpack_require__(51)('getOwnPropertyNames', function () { + return __webpack_require__(276).f; + }); + + /***/ + }, + /* 535 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.9 Object.getPrototypeOf(O) + var toObject = __webpack_require__(17), + $getPrototypeOf = __webpack_require__(39); + + __webpack_require__(51)('getPrototypeOf', function () { + return function getPrototypeOf(it) { + return $getPrototypeOf(toObject(it)); + }; + }); + + /***/ + }, + /* 536 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.11 Object.isExtensible(O) + var isObject = __webpack_require__(9); + + __webpack_require__(51)('isExtensible', function ($isExtensible) { + return function isExtensible(it) { + return isObject(it) ? ($isExtensible ? $isExtensible(it) : true) : false; + }; + }); + + /***/ + }, + /* 537 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.12 Object.isFrozen(O) + var isObject = __webpack_require__(9); + + __webpack_require__(51)('isFrozen', function ($isFrozen) { + return function isFrozen(it) { + return isObject(it) ? ($isFrozen ? $isFrozen(it) : false) : true; + }; + }); + + /***/ + }, + /* 538 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.13 Object.isSealed(O) + var isObject = __webpack_require__(9); + + __webpack_require__(51)('isSealed', function ($isSealed) { + return function isSealed(it) { + return isObject(it) ? ($isSealed ? $isSealed(it) : false) : true; + }; + }); + + /***/ + }, + /* 539 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.3.10 Object.is(value1, value2) + var $export = __webpack_require__(0); + $export($export.S, 'Object', { is: __webpack_require__(282) }); + + /***/ + }, + /* 540 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.14 Object.keys(O) + var toObject = __webpack_require__(17), + $keys = __webpack_require__(78); + + __webpack_require__(51)('keys', function () { + return function keys(it) { + return $keys(toObject(it)); + }; + }); + + /***/ + }, + /* 541 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.15 Object.preventExtensions(O) + var isObject = __webpack_require__(9), + meta = __webpack_require__(62).onFreeze; + + __webpack_require__(51)('preventExtensions', function ($preventExtensions) { + return function preventExtensions(it) { + return $preventExtensions && isObject(it) ? $preventExtensions(meta(it)) : it; + }; + }); + + /***/ + }, + /* 542 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.17 Object.seal(O) + var isObject = __webpack_require__(9), + meta = __webpack_require__(62).onFreeze; + + __webpack_require__(51)('seal', function ($seal) { + return function seal(it) { + return $seal && isObject(it) ? $seal(meta(it)) : it; + }; + }); + + /***/ + }, + /* 543 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.3.19 Object.setPrototypeOf(O, proto) + var $export = __webpack_require__(0); + $export($export.S, 'Object', { setPrototypeOf: __webpack_require__(178).set }); + + /***/ + }, + /* 544 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // 19.1.3.6 Object.prototype.toString() + var classof = __webpack_require__(111), + test = {}; + test[__webpack_require__(10)('toStringTag')] = 'z'; + if (test + '' != '[object z]') { + __webpack_require__(30)( + Object.prototype, + 'toString', + function toString() { + return '[object ' + classof(this) + ']'; + }, + true, + ); + } + + /***/ + }, + /* 545 */ + /***/ function (module, exports, __webpack_require__) { + var $export = __webpack_require__(0), + $parseFloat = __webpack_require__(280); + // 18.2.4 parseFloat(string) + $export($export.G + $export.F * (parseFloat != $parseFloat), { parseFloat: $parseFloat }); + + /***/ + }, + /* 546 */ + /***/ function (module, exports, __webpack_require__) { + var $export = __webpack_require__(0), + $parseInt = __webpack_require__(281); + // 18.2.5 parseInt(string, radix) + $export($export.G + $export.F * (parseInt != $parseInt), { parseInt: $parseInt }); + + /***/ + }, + /* 547 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var LIBRARY = __webpack_require__(75), + global = __webpack_require__(6), + ctx = __webpack_require__(57), + classof = __webpack_require__(111), + $export = __webpack_require__(0), + isObject = __webpack_require__(9), + aFunction = __webpack_require__(28), + anInstance = __webpack_require__(74), + forOf = __webpack_require__(91), + speciesConstructor = __webpack_require__(180), + task = __webpack_require__(185).set, + microtask = __webpack_require__(177)(), + PROMISE = 'Promise', + TypeError = global.TypeError, + process = global.process, + $Promise = global[PROMISE], + process = global.process, + isNode = classof(process) == 'process', + empty = function () { + /* empty */ + }, + Internal, + GenericPromiseCapability, + Wrapper; + + var USE_NATIVE = !!(function () { + try { + // correct subclassing with @@species support + var promise = $Promise.resolve(1), + FakePromise = ((promise.constructor = {})[__webpack_require__(10)('species')] = function (exec) { + exec(empty, empty); + }); + // unhandled rejections tracking support, NodeJS Promise without it fails @@species test + return ( + (isNode || typeof PromiseRejectionEvent == 'function') && + promise.then(empty) instanceof FakePromise + ); + } catch (e) { + /* empty */ + } + })(); + + // helpers + var sameConstructor = function (a, b) { + // with library wrapper special case + return a === b || (a === $Promise && b === Wrapper); + }; + var isThenable = function (it) { + var then; + return isObject(it) && typeof (then = it.then) == 'function' ? then : false; + }; + var newPromiseCapability = function (C) { + return sameConstructor($Promise, C) ? new PromiseCapability(C) : new GenericPromiseCapability(C); + }; + var PromiseCapability = (GenericPromiseCapability = function (C) { + var resolve, reject; + this.promise = new C(function ($$resolve, $$reject) { + if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor'); + resolve = $$resolve; + reject = $$reject; + }); + this.resolve = aFunction(resolve); + this.reject = aFunction(reject); + }); + var perform = function (exec) { + try { + exec(); + } catch (e) { + return { error: e }; + } + }; + var notify = function (promise, isReject) { + if (promise._n) return; + promise._n = true; + var chain = promise._c; + microtask(function () { + var value = promise._v, + ok = promise._s == 1, + i = 0; + var run = function (reaction) { + var handler = ok ? reaction.ok : reaction.fail, + resolve = reaction.resolve, + reject = reaction.reject, + domain = reaction.domain, + result, + then; + try { + if (handler) { + if (!ok) { + if (promise._h == 2) onHandleUnhandled(promise); + promise._h = 1; + } + if (handler === true) result = value; + else { + if (domain) domain.enter(); + result = handler(value); + if (domain) domain.exit(); + } + if (result === reaction.promise) { + reject(TypeError('Promise-chain cycle')); + } else if ((then = isThenable(result))) { + then.call(result, resolve, reject); + } else resolve(result); + } else reject(value); + } catch (e) { + reject(e); + } + }; + while (chain.length > i) run(chain[i++]); // variable length - can't use forEach + promise._c = []; + promise._n = false; + if (isReject && !promise._h) onUnhandled(promise); + }); + }; + var onUnhandled = function (promise) { + task.call(global, function () { + var value = promise._v, + abrupt, + handler, + console; + if (isUnhandled(promise)) { + abrupt = perform(function () { + if (isNode) { + process.emit('unhandledRejection', value, promise); + } else if ((handler = global.onunhandledrejection)) { + handler({ promise: promise, reason: value }); + } else if ((console = global.console) && console.error) { + console.error('Unhandled promise rejection', value); + } + }); + // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should + promise._h = isNode || isUnhandled(promise) ? 2 : 1; + } + promise._a = undefined; + if (abrupt) throw abrupt.error; + }); + }; + var isUnhandled = function (promise) { + if (promise._h == 1) return false; + var chain = promise._a || promise._c, + i = 0, + reaction; + while (chain.length > i) { + reaction = chain[i++]; + if (reaction.fail || !isUnhandled(reaction.promise)) return false; + } + return true; + }; + var onHandleUnhandled = function (promise) { + task.call(global, function () { + var handler; + if (isNode) { + process.emit('rejectionHandled', promise); + } else if ((handler = global.onrejectionhandled)) { + handler({ promise: promise, reason: promise._v }); + } + }); + }; + var $reject = function (value) { + var promise = this; + if (promise._d) return; + promise._d = true; + promise = promise._w || promise; // unwrap + promise._v = value; + promise._s = 2; + if (!promise._a) promise._a = promise._c.slice(); + notify(promise, true); + }; + var $resolve = function (value) { + var promise = this, + then; + if (promise._d) return; + promise._d = true; + promise = promise._w || promise; // unwrap + try { + if (promise === value) throw TypeError("Promise can't be resolved itself"); + if ((then = isThenable(value))) { + microtask(function () { + var wrapper = { _w: promise, _d: false }; // wrap + try { + then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1)); + } catch (e) { + $reject.call(wrapper, e); + } + }); + } else { + promise._v = value; + promise._s = 1; + notify(promise, false); + } + } catch (e) { + $reject.call({ _w: promise, _d: false }, e); // wrap + } + }; + + // constructor polyfill + if (!USE_NATIVE) { + // 25.4.3.1 Promise(executor) + $Promise = function Promise(executor) { + anInstance(this, $Promise, PROMISE, '_h'); + aFunction(executor); + Internal.call(this); + try { + executor(ctx($resolve, this, 1), ctx($reject, this, 1)); + } catch (err) { + $reject.call(this, err); + } + }; + Internal = function Promise(executor) { + this._c = []; // <- awaiting reactions + this._a = undefined; // <- checked in isUnhandled reactions + this._s = 0; // <- state + this._d = false; // <- done + this._v = undefined; // <- value + this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled + this._n = false; // <- notify + }; + Internal.prototype = __webpack_require__(79)($Promise.prototype, { + // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected) + then: function then(onFulfilled, onRejected) { + var reaction = newPromiseCapability(speciesConstructor(this, $Promise)); + reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true; + reaction.fail = typeof onRejected == 'function' && onRejected; + reaction.domain = isNode ? process.domain : undefined; + this._c.push(reaction); + if (this._a) this._a.push(reaction); + if (this._s) notify(this, false); + return reaction.promise; + }, + // 25.4.5.1 Promise.prototype.catch(onRejected) + catch: function (onRejected) { + return this.then(undefined, onRejected); + }, + }); + PromiseCapability = function () { + var promise = new Internal(); + this.promise = promise; + this.resolve = ctx($resolve, promise, 1); + this.reject = ctx($reject, promise, 1); + }; + } + + $export($export.G + $export.W + $export.F * !USE_NATIVE, { Promise: $Promise }); + __webpack_require__(93)($Promise, PROMISE); + __webpack_require__(80)(PROMISE); + Wrapper = __webpack_require__(56)[PROMISE]; + + // statics + $export($export.S + $export.F * !USE_NATIVE, PROMISE, { + // 25.4.4.5 Promise.reject(r) + reject: function reject(r) { + var capability = newPromiseCapability(this), + $$reject = capability.reject; + $$reject(r); + return capability.promise; + }, + }); + $export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, { + // 25.4.4.6 Promise.resolve(x) + resolve: function resolve(x) { + // instanceof instead of internal slot check because we should fix it without replacement native Promise core + if (x instanceof $Promise && sameConstructor(x.constructor, this)) return x; + var capability = newPromiseCapability(this), + $$resolve = capability.resolve; + $$resolve(x); + return capability.promise; + }, + }); + $export( + $export.S + + $export.F * + !( + USE_NATIVE && + __webpack_require__(132)(function (iter) { + $Promise.all(iter)['catch'](empty); + }) + ), + PROMISE, + { + // 25.4.4.1 Promise.all(iterable) + all: function all(iterable) { + var C = this, + capability = newPromiseCapability(C), + resolve = capability.resolve, + reject = capability.reject; + var abrupt = perform(function () { + var values = [], + index = 0, + remaining = 1; + forOf(iterable, false, function (promise) { + var $index = index++, + alreadyCalled = false; + values.push(undefined); + remaining++; + C.resolve(promise).then(function (value) { + if (alreadyCalled) return; + alreadyCalled = true; + values[$index] = value; + --remaining || resolve(values); + }, reject); + }); + --remaining || resolve(values); + }); + if (abrupt) reject(abrupt.error); + return capability.promise; + }, + // 25.4.4.4 Promise.race(iterable) + race: function race(iterable) { + var C = this, + capability = newPromiseCapability(C), + reject = capability.reject; + var abrupt = perform(function () { + forOf(iterable, false, function (promise) { + C.resolve(promise).then(capability.resolve, reject); + }); + }); + if (abrupt) reject(abrupt.error); + return capability.promise; + }, + }, + ); + + /***/ + }, + /* 548 */ + /***/ function (module, exports, __webpack_require__) { + // 26.1.1 Reflect.apply(target, thisArgument, argumentsList) + var $export = __webpack_require__(0), + aFunction = __webpack_require__(28), + anObject = __webpack_require__(4), + rApply = (__webpack_require__(6).Reflect || {}).apply, + fApply = Function.apply; + // MS Edge argumentsList argument is optional + $export( + $export.S + + $export.F * + !__webpack_require__(7)(function () { + rApply(function () {}); + }), + 'Reflect', + { + apply: function apply(target, thisArgument, argumentsList) { + var T = aFunction(target), + L = anObject(argumentsList); + return rApply ? rApply(T, thisArgument, L) : fApply.call(T, thisArgument, L); + }, + }, + ); + + /***/ + }, + /* 549 */ + /***/ function (module, exports, __webpack_require__) { + // 26.1.2 Reflect.construct(target, argumentsList [, newTarget]) + var $export = __webpack_require__(0), + create = __webpack_require__(76), + aFunction = __webpack_require__(28), + anObject = __webpack_require__(4), + isObject = __webpack_require__(9), + fails = __webpack_require__(7), + bind = __webpack_require__(265), + rConstruct = (__webpack_require__(6).Reflect || {}).construct; + + // MS Edge supports only 2 arguments and argumentsList argument is optional + // FF Nightly sets third argument as `new.target`, but does not create `this` from it + var NEW_TARGET_BUG = fails(function () { + function F() {} + return !(rConstruct(function () {}, [], F) instanceof F); + }); + var ARGS_BUG = !fails(function () { + rConstruct(function () {}); + }); + + $export($export.S + $export.F * (NEW_TARGET_BUG || ARGS_BUG), 'Reflect', { + construct: function construct(Target, args /*, newTarget*/) { + aFunction(Target); + anObject(args); + var newTarget = arguments.length < 3 ? Target : aFunction(arguments[2]); + if (ARGS_BUG && !NEW_TARGET_BUG) return rConstruct(Target, args, newTarget); + if (Target == newTarget) { + // w/o altered newTarget, optimization for 0-4 arguments + switch (args.length) { + case 0: + return new Target(); + case 1: + return new Target(args[0]); + case 2: + return new Target(args[0], args[1]); + case 3: + return new Target(args[0], args[1], args[2]); + case 4: + return new Target(args[0], args[1], args[2], args[3]); + } + // w/o altered newTarget, lot of arguments case + var $args = [null]; + $args.push.apply($args, args); + return new (bind.apply(Target, $args))(); + } + // with altered newTarget, not support built-in constructors + var proto = newTarget.prototype, + instance = create(isObject(proto) ? proto : Object.prototype), + result = Function.apply.call(Target, instance, args); + return isObject(result) ? result : instance; + }, + }); + + /***/ + }, + /* 550 */ + /***/ function (module, exports, __webpack_require__) { + // 26.1.3 Reflect.defineProperty(target, propertyKey, attributes) + var dP = __webpack_require__(12), + $export = __webpack_require__(0), + anObject = __webpack_require__(4), + toPrimitive = __webpack_require__(52); + + // MS Edge has broken Reflect.defineProperty - throwing instead of returning false + $export( + $export.S + + $export.F * + __webpack_require__(7)(function () { + Reflect.defineProperty(dP.f({}, 1, { value: 1 }), 1, { value: 2 }); + }), + 'Reflect', + { + defineProperty: function defineProperty(target, propertyKey, attributes) { + anObject(target); + propertyKey = toPrimitive(propertyKey, true); + anObject(attributes); + try { + dP.f(target, propertyKey, attributes); + return true; + } catch (e) { + return false; + } + }, + }, + ); + + /***/ + }, + /* 551 */ + /***/ function (module, exports, __webpack_require__) { + // 26.1.4 Reflect.deleteProperty(target, propertyKey) + var $export = __webpack_require__(0), + gOPD = __webpack_require__(38).f, + anObject = __webpack_require__(4); + + $export($export.S, 'Reflect', { + deleteProperty: function deleteProperty(target, propertyKey) { + var desc = gOPD(anObject(target), propertyKey); + return desc && !desc.configurable ? false : delete target[propertyKey]; + }, + }); + + /***/ + }, + /* 552 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // 26.1.5 Reflect.enumerate(target) + var $export = __webpack_require__(0), + anObject = __webpack_require__(4); + var Enumerate = function (iterated) { + this._t = anObject(iterated); // target + this._i = 0; // next index + var keys = (this._k = []), // keys + key; + for (key in iterated) keys.push(key); + }; + __webpack_require__(173)(Enumerate, 'Object', function () { + var that = this, + keys = that._k, + key; + do { + if (that._i >= keys.length) return { value: undefined, done: true }; + } while (!((key = keys[that._i++]) in that._t)); + return { value: key, done: false }; + }); + + $export($export.S, 'Reflect', { + enumerate: function enumerate(target) { + return new Enumerate(target); + }, + }); + + /***/ + }, + /* 553 */ + /***/ function (module, exports, __webpack_require__) { + // 26.1.7 Reflect.getOwnPropertyDescriptor(target, propertyKey) + var gOPD = __webpack_require__(38), + $export = __webpack_require__(0), + anObject = __webpack_require__(4); + + $export($export.S, 'Reflect', { + getOwnPropertyDescriptor: function getOwnPropertyDescriptor(target, propertyKey) { + return gOPD.f(anObject(target), propertyKey); + }, + }); + + /***/ + }, + /* 554 */ + /***/ function (module, exports, __webpack_require__) { + // 26.1.8 Reflect.getPrototypeOf(target) + var $export = __webpack_require__(0), + getProto = __webpack_require__(39), + anObject = __webpack_require__(4); + + $export($export.S, 'Reflect', { + getPrototypeOf: function getPrototypeOf(target) { + return getProto(anObject(target)); + }, + }); + + /***/ + }, + /* 555 */ + /***/ function (module, exports, __webpack_require__) { + // 26.1.6 Reflect.get(target, propertyKey [, receiver]) + var gOPD = __webpack_require__(38), + getPrototypeOf = __webpack_require__(39), + has = __webpack_require__(21), + $export = __webpack_require__(0), + isObject = __webpack_require__(9), + anObject = __webpack_require__(4); + + function get(target, propertyKey /*, receiver*/) { + var receiver = arguments.length < 3 ? target : arguments[2], + desc, + proto; + if (anObject(target) === receiver) return target[propertyKey]; + if ((desc = gOPD.f(target, propertyKey))) + return has(desc, 'value') + ? desc.value + : desc.get !== undefined + ? desc.get.call(receiver) + : undefined; + if (isObject((proto = getPrototypeOf(target)))) return get(proto, propertyKey, receiver); + } + + $export($export.S, 'Reflect', { get: get }); + + /***/ + }, + /* 556 */ + /***/ function (module, exports, __webpack_require__) { + // 26.1.9 Reflect.has(target, propertyKey) + var $export = __webpack_require__(0); + + $export($export.S, 'Reflect', { + has: function has(target, propertyKey) { + return propertyKey in target; + }, + }); + + /***/ + }, + /* 557 */ + /***/ function (module, exports, __webpack_require__) { + // 26.1.10 Reflect.isExtensible(target) + var $export = __webpack_require__(0), + anObject = __webpack_require__(4), + $isExtensible = Object.isExtensible; + + $export($export.S, 'Reflect', { + isExtensible: function isExtensible(target) { + anObject(target); + return $isExtensible ? $isExtensible(target) : true; + }, + }); + + /***/ + }, + /* 558 */ + /***/ function (module, exports, __webpack_require__) { + // 26.1.11 Reflect.ownKeys(target) + var $export = __webpack_require__(0); + + $export($export.S, 'Reflect', { ownKeys: __webpack_require__(279) }); + + /***/ + }, + /* 559 */ + /***/ function (module, exports, __webpack_require__) { + // 26.1.12 Reflect.preventExtensions(target) + var $export = __webpack_require__(0), + anObject = __webpack_require__(4), + $preventExtensions = Object.preventExtensions; + + $export($export.S, 'Reflect', { + preventExtensions: function preventExtensions(target) { + anObject(target); + try { + if ($preventExtensions) $preventExtensions(target); + return true; + } catch (e) { + return false; + } + }, + }); + + /***/ + }, + /* 560 */ + /***/ function (module, exports, __webpack_require__) { + // 26.1.14 Reflect.setPrototypeOf(target, proto) + var $export = __webpack_require__(0), + setProto = __webpack_require__(178); + + if (setProto) + $export($export.S, 'Reflect', { + setPrototypeOf: function setPrototypeOf(target, proto) { + setProto.check(target, proto); + try { + setProto.set(target, proto); + return true; + } catch (e) { + return false; + } + }, + }); + + /***/ + }, + /* 561 */ + /***/ function (module, exports, __webpack_require__) { + // 26.1.13 Reflect.set(target, propertyKey, V [, receiver]) + var dP = __webpack_require__(12), + gOPD = __webpack_require__(38), + getPrototypeOf = __webpack_require__(39), + has = __webpack_require__(21), + $export = __webpack_require__(0), + createDesc = __webpack_require__(63), + anObject = __webpack_require__(4), + isObject = __webpack_require__(9); + + function set(target, propertyKey, V /*, receiver*/) { + var receiver = arguments.length < 4 ? target : arguments[3], + ownDesc = gOPD.f(anObject(target), propertyKey), + existingDescriptor, + proto; + if (!ownDesc) { + if (isObject((proto = getPrototypeOf(target)))) { + return set(proto, propertyKey, V, receiver); + } + ownDesc = createDesc(0); + } + if (has(ownDesc, 'value')) { + if (ownDesc.writable === false || !isObject(receiver)) return false; + existingDescriptor = gOPD.f(receiver, propertyKey) || createDesc(0); + existingDescriptor.value = V; + dP.f(receiver, propertyKey, existingDescriptor); + return true; + } + return ownDesc.set === undefined ? false : (ownDesc.set.call(receiver, V), true); + } + + $export($export.S, 'Reflect', { set: set }); + + /***/ + }, + /* 562 */ + /***/ function (module, exports, __webpack_require__) { + var global = __webpack_require__(6), + inheritIfRequired = __webpack_require__(170), + dP = __webpack_require__(12).f, + gOPN = __webpack_require__(77).f, + isRegExp = __webpack_require__(131), + $flags = __webpack_require__(129), + $RegExp = global.RegExp, + Base = $RegExp, + proto = $RegExp.prototype, + re1 = /a/g, + re2 = /a/g, + // "new" creates a new object, old webkit buggy here + CORRECT_NEW = new $RegExp(re1) !== re1; + + if ( + __webpack_require__(11) && + (!CORRECT_NEW || + __webpack_require__(7)(function () { + re2[__webpack_require__(10)('match')] = false; + // RegExp constructor can alter flags and IsRegExp works correct with @@match + return $RegExp(re1) != re1 || $RegExp(re2) == re2 || $RegExp(re1, 'i') != '/a/i'; + })) + ) { + $RegExp = function RegExp(p, f) { + var tiRE = this instanceof $RegExp, + piRE = isRegExp(p), + fiU = f === undefined; + return !tiRE && piRE && p.constructor === $RegExp && fiU + ? p + : inheritIfRequired( + CORRECT_NEW + ? new Base(piRE && !fiU ? p.source : p, f) + : Base((piRE = p instanceof $RegExp) ? p.source : p, piRE && fiU ? $flags.call(p) : f), + tiRE ? this : proto, + $RegExp, + ); + }; + var proxy = function (key) { + key in $RegExp || + dP($RegExp, key, { + configurable: true, + get: function () { + return Base[key]; + }, + set: function (it) { + Base[key] = it; + }, + }); + }; + for (var keys = gOPN(Base), i = 0; keys.length > i; ) proxy(keys[i++]); + proto.constructor = $RegExp; + $RegExp.prototype = proto; + __webpack_require__(30)(global, 'RegExp', $RegExp); + } + + __webpack_require__(80)('RegExp'); + + /***/ + }, + /* 563 */ + /***/ function (module, exports, __webpack_require__) { + // @@match logic + __webpack_require__(128)('match', 1, function (defined, MATCH, $match) { + // 21.1.3.11 String.prototype.match(regexp) + return [ + function match(regexp) { + 'use strict'; + var O = defined(this), + fn = regexp == undefined ? undefined : regexp[MATCH]; + return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[MATCH](String(O)); + }, + $match, + ]; + }); + + /***/ + }, + /* 564 */ + /***/ function (module, exports, __webpack_require__) { + // @@replace logic + __webpack_require__(128)('replace', 2, function (defined, REPLACE, $replace) { + // 21.1.3.14 String.prototype.replace(searchValue, replaceValue) + return [ + function replace(searchValue, replaceValue) { + 'use strict'; + var O = defined(this), + fn = searchValue == undefined ? undefined : searchValue[REPLACE]; + return fn !== undefined + ? fn.call(searchValue, O, replaceValue) + : $replace.call(String(O), searchValue, replaceValue); + }, + $replace, + ]; + }); + + /***/ + }, + /* 565 */ + /***/ function (module, exports, __webpack_require__) { + // @@search logic + __webpack_require__(128)('search', 1, function (defined, SEARCH, $search) { + // 21.1.3.15 String.prototype.search(regexp) + return [ + function search(regexp) { + 'use strict'; + var O = defined(this), + fn = regexp == undefined ? undefined : regexp[SEARCH]; + return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O)); + }, + $search, + ]; + }); + + /***/ + }, + /* 566 */ + /***/ function (module, exports, __webpack_require__) { + // @@split logic + __webpack_require__(128)('split', 2, function (defined, SPLIT, $split) { + 'use strict'; + var isRegExp = __webpack_require__(131), + _split = $split, + $push = [].push, + $SPLIT = 'split', + LENGTH = 'length', + LAST_INDEX = 'lastIndex'; + if ( + 'abbc'[$SPLIT](/(b)*/)[1] == 'c' || + 'test'[$SPLIT](/(?:)/, -1)[LENGTH] != 4 || + 'ab'[$SPLIT](/(?:ab)*/)[LENGTH] != 2 || + '.'[$SPLIT](/(.?)(.?)/)[LENGTH] != 4 || + '.'[$SPLIT](/()()/)[LENGTH] > 1 || + ''[$SPLIT](/.?/)[LENGTH] + ) { + var NPCG = /()??/.exec('')[1] === undefined; // nonparticipating capturing group + // based on es5-shim implementation, need to rework it + $split = function (separator, limit) { + var string = String(this); + if (separator === undefined && limit === 0) return []; + // If `separator` is not a regex, use native split + if (!isRegExp(separator)) return _split.call(string, separator, limit); + var output = []; + var flags = + (separator.ignoreCase ? 'i' : '') + + (separator.multiline ? 'm' : '') + + (separator.unicode ? 'u' : '') + + (separator.sticky ? 'y' : ''); + var lastLastIndex = 0; + var splitLimit = limit === undefined ? 4294967295 : limit >>> 0; + // Make `global` and avoid `lastIndex` issues by working with a copy + var separatorCopy = new RegExp(separator.source, flags + 'g'); + var separator2, match, lastIndex, lastLength, i; + // Doesn't need flags gy, but they don't hurt + if (!NPCG) separator2 = new RegExp('^' + separatorCopy.source + '$(?!\\s)', flags); + while ((match = separatorCopy.exec(string))) { + // `separatorCopy.lastIndex` is not reliable cross-browser + lastIndex = match.index + match[0][LENGTH]; + if (lastIndex > lastLastIndex) { + output.push(string.slice(lastLastIndex, match.index)); + // Fix browsers whose `exec` methods don't consistently return `undefined` for NPCG + if (!NPCG && match[LENGTH] > 1) + match[0].replace(separator2, function () { + for (i = 1; i < arguments[LENGTH] - 2; i++) + if (arguments[i] === undefined) match[i] = undefined; + }); + if (match[LENGTH] > 1 && match.index < string[LENGTH]) $push.apply(output, match.slice(1)); + lastLength = match[0][LENGTH]; + lastLastIndex = lastIndex; + if (output[LENGTH] >= splitLimit) break; + } + if (separatorCopy[LAST_INDEX] === match.index) separatorCopy[LAST_INDEX]++; // Avoid an infinite loop + } + if (lastLastIndex === string[LENGTH]) { + if (lastLength || !separatorCopy.test('')) output.push(''); + } else output.push(string.slice(lastLastIndex)); + return output[LENGTH] > splitLimit ? output.slice(0, splitLimit) : output; + }; + // Chakra, V8 + } else if ('0'[$SPLIT](undefined, 0)[LENGTH]) { + $split = function (separator, limit) { + return separator === undefined && limit === 0 ? [] : _split.call(this, separator, limit); + }; + } + // 21.1.3.17 String.prototype.split(separator, limit) + return [ + function split(separator, limit) { + var O = defined(this), + fn = separator == undefined ? undefined : separator[SPLIT]; + return fn !== undefined ? fn.call(separator, O, limit) : $split.call(String(O), separator, limit); + }, + $split, + ]; + }); + + /***/ + }, + /* 567 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + __webpack_require__(286); + var anObject = __webpack_require__(4), + $flags = __webpack_require__(129), + DESCRIPTORS = __webpack_require__(11), + TO_STRING = 'toString', + $toString = /./[TO_STRING]; + + var define = function (fn) { + __webpack_require__(30)(RegExp.prototype, TO_STRING, fn, true); + }; + + // 21.2.5.14 RegExp.prototype.toString() + if ( + __webpack_require__(7)(function () { + return $toString.call({ source: 'a', flags: 'b' }) != '/a/b'; + }) + ) { + define(function toString() { + var R = anObject(this); + return '/'.concat( + R.source, + '/', + 'flags' in R ? R.flags : !DESCRIPTORS && R instanceof RegExp ? $flags.call(R) : undefined, + ); + }); + // FF44- RegExp#toString has a wrong name + } else if ($toString.name != TO_STRING) { + define(function toString() { + return $toString.call(this); + }); + } + + /***/ + }, + /* 568 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // B.2.3.2 String.prototype.anchor(name) + __webpack_require__(31)('anchor', function (createHTML) { + return function anchor(name) { + return createHTML(this, 'a', 'name', name); + }; + }); + + /***/ + }, + /* 569 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // B.2.3.3 String.prototype.big() + __webpack_require__(31)('big', function (createHTML) { + return function big() { + return createHTML(this, 'big', '', ''); + }; + }); + + /***/ + }, + /* 570 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // B.2.3.4 String.prototype.blink() + __webpack_require__(31)('blink', function (createHTML) { + return function blink() { + return createHTML(this, 'blink', '', ''); + }; + }); + + /***/ + }, + /* 571 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // B.2.3.5 String.prototype.bold() + __webpack_require__(31)('bold', function (createHTML) { + return function bold() { + return createHTML(this, 'b', '', ''); + }; + }); + + /***/ + }, + /* 572 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0), + $at = __webpack_require__(181)(false); + $export($export.P, 'String', { + // 21.1.3.3 String.prototype.codePointAt(pos) + codePointAt: function codePointAt(pos) { + return $at(this, pos); + }, + }); + + /***/ + }, + /* 573 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + // 21.1.3.6 String.prototype.endsWith(searchString [, endPosition]) + + var $export = __webpack_require__(0), + toLength = __webpack_require__(15), + context = __webpack_require__(182), + ENDS_WITH = 'endsWith', + $endsWith = ''[ENDS_WITH]; + + $export($export.P + $export.F * __webpack_require__(168)(ENDS_WITH), 'String', { + endsWith: function endsWith(searchString /*, endPosition = @length */) { + var that = context(this, searchString, ENDS_WITH), + endPosition = arguments.length > 1 ? arguments[1] : undefined, + len = toLength(that.length), + end = endPosition === undefined ? len : Math.min(toLength(endPosition), len), + search = String(searchString); + return $endsWith + ? $endsWith.call(that, search, end) + : that.slice(end - search.length, end) === search; + }, + }); + + /***/ + }, + /* 574 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // B.2.3.6 String.prototype.fixed() + __webpack_require__(31)('fixed', function (createHTML) { + return function fixed() { + return createHTML(this, 'tt', '', ''); + }; + }); + + /***/ + }, + /* 575 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // B.2.3.7 String.prototype.fontcolor(color) + __webpack_require__(31)('fontcolor', function (createHTML) { + return function fontcolor(color) { + return createHTML(this, 'font', 'color', color); + }; + }); + + /***/ + }, + /* 576 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // B.2.3.8 String.prototype.fontsize(size) + __webpack_require__(31)('fontsize', function (createHTML) { + return function fontsize(size) { + return createHTML(this, 'font', 'size', size); + }; + }); + + /***/ + }, + /* 577 */ + /***/ function (module, exports, __webpack_require__) { + var $export = __webpack_require__(0), + toIndex = __webpack_require__(81), + fromCharCode = String.fromCharCode, + $fromCodePoint = String.fromCodePoint; + + // length should be 1, old FF problem + $export($export.S + $export.F * (!!$fromCodePoint && $fromCodePoint.length != 1), 'String', { + // 21.1.2.2 String.fromCodePoint(...codePoints) + fromCodePoint: function fromCodePoint(x) { + // eslint-disable-line no-unused-vars + var res = [], + aLen = arguments.length, + i = 0, + code; + while (aLen > i) { + code = +arguments[i++]; + if (toIndex(code, 0x10ffff) !== code) throw RangeError(code + ' is not a valid code point'); + res.push( + code < 0x10000 + ? fromCharCode(code) + : fromCharCode(((code -= 0x10000) >> 10) + 0xd800, (code % 0x400) + 0xdc00), + ); + } + return res.join(''); + }, + }); + + /***/ + }, + /* 578 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + // 21.1.3.7 String.prototype.includes(searchString, position = 0) + + var $export = __webpack_require__(0), + context = __webpack_require__(182), + INCLUDES = 'includes'; + + $export($export.P + $export.F * __webpack_require__(168)(INCLUDES), 'String', { + includes: function includes(searchString /*, position = 0 */) { + return !!~context(this, searchString, INCLUDES).indexOf( + searchString, + arguments.length > 1 ? arguments[1] : undefined, + ); + }, + }); + + /***/ + }, + /* 579 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // B.2.3.9 String.prototype.italics() + __webpack_require__(31)('italics', function (createHTML) { + return function italics() { + return createHTML(this, 'i', '', ''); + }; + }); + + /***/ + }, + /* 580 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $at = __webpack_require__(181)(true); + + // 21.1.3.27 String.prototype[@@iterator]() + __webpack_require__(174)( + String, + 'String', + function (iterated) { + this._t = String(iterated); // target + this._i = 0; // next index + // 21.1.5.2.1 %StringIteratorPrototype%.next() + }, + function () { + var O = this._t, + index = this._i, + point; + if (index >= O.length) return { value: undefined, done: true }; + point = $at(O, index); + this._i += point.length; + return { value: point, done: false }; + }, + ); + + /***/ + }, + /* 581 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // B.2.3.10 String.prototype.link(url) + __webpack_require__(31)('link', function (createHTML) { + return function link(url) { + return createHTML(this, 'a', 'href', url); + }; + }); + + /***/ + }, + /* 582 */ + /***/ function (module, exports, __webpack_require__) { + var $export = __webpack_require__(0), + toIObject = __webpack_require__(32), + toLength = __webpack_require__(15); + + $export($export.S, 'String', { + // 21.1.2.4 String.raw(callSite, ...substitutions) + raw: function raw(callSite) { + var tpl = toIObject(callSite.raw), + len = toLength(tpl.length), + aLen = arguments.length, + res = [], + i = 0; + while (len > i) { + res.push(String(tpl[i++])); + if (i < aLen) res.push(String(arguments[i])); + } + return res.join(''); + }, + }); + + /***/ + }, + /* 583 */ + /***/ function (module, exports, __webpack_require__) { + var $export = __webpack_require__(0); + + $export($export.P, 'String', { + // 21.1.3.13 String.prototype.repeat(count) + repeat: __webpack_require__(183), + }); + + /***/ + }, + /* 584 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // B.2.3.11 String.prototype.small() + __webpack_require__(31)('small', function (createHTML) { + return function small() { + return createHTML(this, 'small', '', ''); + }; + }); + + /***/ + }, + /* 585 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + // 21.1.3.18 String.prototype.startsWith(searchString [, position ]) + + var $export = __webpack_require__(0), + toLength = __webpack_require__(15), + context = __webpack_require__(182), + STARTS_WITH = 'startsWith', + $startsWith = ''[STARTS_WITH]; + + $export($export.P + $export.F * __webpack_require__(168)(STARTS_WITH), 'String', { + startsWith: function startsWith(searchString /*, position = 0 */) { + var that = context(this, searchString, STARTS_WITH), + index = toLength(Math.min(arguments.length > 1 ? arguments[1] : undefined, that.length)), + search = String(searchString); + return $startsWith + ? $startsWith.call(that, search, index) + : that.slice(index, index + search.length) === search; + }, + }); + + /***/ + }, + /* 586 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // B.2.3.12 String.prototype.strike() + __webpack_require__(31)('strike', function (createHTML) { + return function strike() { + return createHTML(this, 'strike', '', ''); + }; + }); + + /***/ + }, + /* 587 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // B.2.3.13 String.prototype.sub() + __webpack_require__(31)('sub', function (createHTML) { + return function sub() { + return createHTML(this, 'sub', '', ''); + }; + }); + + /***/ + }, + /* 588 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // B.2.3.14 String.prototype.sup() + __webpack_require__(31)('sup', function (createHTML) { + return function sup() { + return createHTML(this, 'sup', '', ''); + }; + }); + + /***/ + }, + /* 589 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // 21.1.3.25 String.prototype.trim() + __webpack_require__(94)('trim', function ($trim) { + return function trim() { + return $trim(this, 3); + }; + }); + + /***/ + }, + /* 590 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // ECMAScript 6 symbols shim + var global = __webpack_require__(6), + has = __webpack_require__(21), + DESCRIPTORS = __webpack_require__(11), + $export = __webpack_require__(0), + redefine = __webpack_require__(30), + META = __webpack_require__(62).KEY, + $fails = __webpack_require__(7), + shared = __webpack_require__(135), + setToStringTag = __webpack_require__(93), + uid = __webpack_require__(82), + wks = __webpack_require__(10), + wksExt = __webpack_require__(284), + wksDefine = __webpack_require__(187), + keyOf = __webpack_require__(466), + enumKeys = __webpack_require__(465), + isArray = __webpack_require__(172), + anObject = __webpack_require__(4), + toIObject = __webpack_require__(32), + toPrimitive = __webpack_require__(52), + createDesc = __webpack_require__(63), + _create = __webpack_require__(76), + gOPNExt = __webpack_require__(276), + $GOPD = __webpack_require__(38), + $DP = __webpack_require__(12), + $keys = __webpack_require__(78), + gOPD = $GOPD.f, + dP = $DP.f, + gOPN = gOPNExt.f, + $Symbol = global.Symbol, + $JSON = global.JSON, + _stringify = $JSON && $JSON.stringify, + PROTOTYPE = 'prototype', + HIDDEN = wks('_hidden'), + TO_PRIMITIVE = wks('toPrimitive'), + isEnum = {}.propertyIsEnumerable, + SymbolRegistry = shared('symbol-registry'), + AllSymbols = shared('symbols'), + OPSymbols = shared('op-symbols'), + ObjectProto = Object[PROTOTYPE], + USE_NATIVE = typeof $Symbol == 'function', + QObject = global.QObject; + // Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173 + var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild; + + // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687 + var setSymbolDesc = + DESCRIPTORS && + $fails(function () { + return ( + _create( + dP({}, 'a', { + get: function () { + return dP(this, 'a', { value: 7 }).a; + }, + }), + ).a != 7 + ); + }) + ? function (it, key, D) { + var protoDesc = gOPD(ObjectProto, key); + if (protoDesc) delete ObjectProto[key]; + dP(it, key, D); + if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc); + } + : dP; + + var wrap = function (tag) { + var sym = (AllSymbols[tag] = _create($Symbol[PROTOTYPE])); + sym._k = tag; + return sym; + }; + + var isSymbol = + USE_NATIVE && typeof $Symbol.iterator == 'symbol' + ? function (it) { + return typeof it == 'symbol'; + } + : function (it) { + return it instanceof $Symbol; + }; + + var $defineProperty = function defineProperty(it, key, D) { + if (it === ObjectProto) $defineProperty(OPSymbols, key, D); + anObject(it); + key = toPrimitive(key, true); + anObject(D); + if (has(AllSymbols, key)) { + if (!D.enumerable) { + if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {})); + it[HIDDEN][key] = true; + } else { + if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false; + D = _create(D, { enumerable: createDesc(0, false) }); + } + return setSymbolDesc(it, key, D); + } + return dP(it, key, D); + }; + var $defineProperties = function defineProperties(it, P) { + anObject(it); + var keys = enumKeys((P = toIObject(P))), + i = 0, + l = keys.length, + key; + while (l > i) $defineProperty(it, (key = keys[i++]), P[key]); + return it; + }; + var $create = function create(it, P) { + return P === undefined ? _create(it) : $defineProperties(_create(it), P); + }; + var $propertyIsEnumerable = function propertyIsEnumerable(key) { + var E = isEnum.call(this, (key = toPrimitive(key, true))); + if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false; + return E || !has(this, key) || !has(AllSymbols, key) || (has(this, HIDDEN) && this[HIDDEN][key]) + ? E + : true; + }; + var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) { + it = toIObject(it); + key = toPrimitive(key, true); + if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return; + var D = gOPD(it, key); + if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true; + return D; + }; + var $getOwnPropertyNames = function getOwnPropertyNames(it) { + var names = gOPN(toIObject(it)), + result = [], + i = 0, + key; + while (names.length > i) { + if (!has(AllSymbols, (key = names[i++])) && key != HIDDEN && key != META) result.push(key); + } + return result; + }; + var $getOwnPropertySymbols = function getOwnPropertySymbols(it) { + var IS_OP = it === ObjectProto, + names = gOPN(IS_OP ? OPSymbols : toIObject(it)), + result = [], + i = 0, + key; + while (names.length > i) { + if (has(AllSymbols, (key = names[i++])) && (IS_OP ? has(ObjectProto, key) : true)) + result.push(AllSymbols[key]); + } + return result; + }; + + // 19.4.1.1 Symbol([description]) + if (!USE_NATIVE) { + $Symbol = function Symbol() { + if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!'); + var tag = uid(arguments.length > 0 ? arguments[0] : undefined); + var $set = function (value) { + if (this === ObjectProto) $set.call(OPSymbols, value); + if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false; + setSymbolDesc(this, tag, createDesc(1, value)); + }; + if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set }); + return wrap(tag); + }; + redefine($Symbol[PROTOTYPE], 'toString', function toString() { + return this._k; + }); + + $GOPD.f = $getOwnPropertyDescriptor; + $DP.f = $defineProperty; + __webpack_require__(77).f = gOPNExt.f = $getOwnPropertyNames; + __webpack_require__(113).f = $propertyIsEnumerable; + __webpack_require__(134).f = $getOwnPropertySymbols; + + if (DESCRIPTORS && !__webpack_require__(75)) { + redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true); + } + + wksExt.f = function (name) { + return wrap(wks(name)); + }; + } + + $export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol }); + + for ( + var symbols = + // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14 + 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'.split( + ',', + ), + i = 0; + symbols.length > i; + + ) + wks(symbols[i++]); + + for (var symbols = $keys(wks.store), i = 0; symbols.length > i; ) wksDefine(symbols[i++]); + + $export($export.S + $export.F * !USE_NATIVE, 'Symbol', { + // 19.4.2.1 Symbol.for(key) + for: function (key) { + return has(SymbolRegistry, (key += '')) + ? SymbolRegistry[key] + : (SymbolRegistry[key] = $Symbol(key)); + }, + // 19.4.2.5 Symbol.keyFor(sym) + keyFor: function keyFor(key) { + if (isSymbol(key)) return keyOf(SymbolRegistry, key); + throw TypeError(key + ' is not a symbol!'); + }, + useSetter: function () { + setter = true; + }, + useSimple: function () { + setter = false; + }, + }); + + $export($export.S + $export.F * !USE_NATIVE, 'Object', { + // 19.1.2.2 Object.create(O [, Properties]) + create: $create, + // 19.1.2.4 Object.defineProperty(O, P, Attributes) + defineProperty: $defineProperty, + // 19.1.2.3 Object.defineProperties(O, Properties) + defineProperties: $defineProperties, + // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) + getOwnPropertyDescriptor: $getOwnPropertyDescriptor, + // 19.1.2.7 Object.getOwnPropertyNames(O) + getOwnPropertyNames: $getOwnPropertyNames, + // 19.1.2.8 Object.getOwnPropertySymbols(O) + getOwnPropertySymbols: $getOwnPropertySymbols, + }); + + // 24.3.2 JSON.stringify(value [, replacer [, space]]) + $JSON && + $export( + $export.S + + $export.F * + (!USE_NATIVE || + $fails(function () { + var S = $Symbol(); + // MS Edge converts symbol values to JSON as {} + // WebKit converts symbol values to JSON as null + // V8 throws on boxed symbols + return ( + _stringify([S]) != '[null]' || + _stringify({ a: S }) != '{}' || + _stringify(Object(S)) != '{}' + ); + })), + 'JSON', + { + stringify: function stringify(it) { + if (it === undefined || isSymbol(it)) return; // IE8 returns string on undefined + var args = [it], + i = 1, + replacer, + $replacer; + while (arguments.length > i) args.push(arguments[i++]); + replacer = args[1]; + if (typeof replacer == 'function') $replacer = replacer; + if ($replacer || !isArray(replacer)) + replacer = function (key, value) { + if ($replacer) value = $replacer.call(this, key, value); + if (!isSymbol(value)) return value; + }; + args[1] = replacer; + return _stringify.apply($JSON, args); + }, + }, + ); + + // 19.4.3.4 Symbol.prototype[@@toPrimitive](hint) + $Symbol[PROTOTYPE][TO_PRIMITIVE] || + __webpack_require__(29)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf); + // 19.4.3.5 Symbol.prototype[@@toStringTag] + setToStringTag($Symbol, 'Symbol'); + // 20.2.1.9 Math[@@toStringTag] + setToStringTag(Math, 'Math', true); + // 24.3.3 JSON[@@toStringTag] + setToStringTag(global.JSON, 'JSON', true); + + /***/ + }, + /* 591 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0), + $typed = __webpack_require__(136), + buffer = __webpack_require__(186), + anObject = __webpack_require__(4), + toIndex = __webpack_require__(81), + toLength = __webpack_require__(15), + isObject = __webpack_require__(9), + ArrayBuffer = __webpack_require__(6).ArrayBuffer, + speciesConstructor = __webpack_require__(180), + $ArrayBuffer = buffer.ArrayBuffer, + $DataView = buffer.DataView, + $isView = $typed.ABV && ArrayBuffer.isView, + $slice = $ArrayBuffer.prototype.slice, + VIEW = $typed.VIEW, + ARRAY_BUFFER = 'ArrayBuffer'; + + $export($export.G + $export.W + $export.F * (ArrayBuffer !== $ArrayBuffer), { + ArrayBuffer: $ArrayBuffer, + }); + + $export($export.S + $export.F * !$typed.CONSTR, ARRAY_BUFFER, { + // 24.1.3.1 ArrayBuffer.isView(arg) + isView: function isView(it) { + return ($isView && $isView(it)) || (isObject(it) && VIEW in it); + }, + }); + + $export( + $export.P + + $export.U + + $export.F * + __webpack_require__(7)(function () { + return !new $ArrayBuffer(2).slice(1, undefined).byteLength; + }), + ARRAY_BUFFER, + { + // 24.1.4.3 ArrayBuffer.prototype.slice(start, end) + slice: function slice(start, end) { + if ($slice !== undefined && end === undefined) return $slice.call(anObject(this), start); // FF fix + var len = anObject(this).byteLength, + first = toIndex(start, len), + final = toIndex(end === undefined ? len : end, len), + result = new (speciesConstructor(this, $ArrayBuffer))(toLength(final - first)), + viewS = new $DataView(this), + viewT = new $DataView(result), + index = 0; + while (first < final) { + viewT.setUint8(index++, viewS.getUint8(first++)); + } + return result; + }, + }, + ); + + __webpack_require__(80)(ARRAY_BUFFER); + + /***/ + }, + /* 592 */ + /***/ function (module, exports, __webpack_require__) { + var $export = __webpack_require__(0); + $export($export.G + $export.W + $export.F * !__webpack_require__(136).ABV, { + DataView: __webpack_require__(186).DataView, + }); + + /***/ + }, + /* 593 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(59)('Float32', 4, function (init) { + return function Float32Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; + }); + + /***/ + }, + /* 594 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(59)('Float64', 8, function (init) { + return function Float64Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; + }); + + /***/ + }, + /* 595 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(59)('Int16', 2, function (init) { + return function Int16Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; + }); + + /***/ + }, + /* 596 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(59)('Int32', 4, function (init) { + return function Int32Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; + }); + + /***/ + }, + /* 597 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(59)('Int8', 1, function (init) { + return function Int8Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; + }); + + /***/ + }, + /* 598 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(59)('Uint16', 2, function (init) { + return function Uint16Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; + }); + + /***/ + }, + /* 599 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(59)('Uint32', 4, function (init) { + return function Uint32Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; + }); + + /***/ + }, + /* 600 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(59)('Uint8', 1, function (init) { + return function Uint8Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; + }); + + /***/ + }, + /* 601 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(59)( + 'Uint8', + 1, + function (init) { + return function Uint8ClampedArray(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; + }, + true, + ); + + /***/ + }, + /* 602 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var weak = __webpack_require__(268); + + // 23.4 WeakSet Objects + __webpack_require__(127)( + 'WeakSet', + function (get) { + return function WeakSet() { + return get(this, arguments.length > 0 ? arguments[0] : undefined); + }; + }, + { + // 23.4.3.1 WeakSet.prototype.add(value) + add: function add(value) { + return weak.def(this, value, true); + }, + }, + weak, + false, + true, + ); + + /***/ + }, + /* 603 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // https://github.com/tc39/Array.prototype.includes + var $export = __webpack_require__(0), + $includes = __webpack_require__(126)(true); + + $export($export.P, 'Array', { + includes: function includes(el /*, fromIndex = 0 */) { + return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined); + }, + }); + + __webpack_require__(90)('includes'); + + /***/ + }, + /* 604 */ + /***/ function (module, exports, __webpack_require__) { + // https://github.com/rwaldron/tc39-notes/blob/master/es6/2014-09/sept-25.md#510-globalasap-for-enqueuing-a-microtask + var $export = __webpack_require__(0), + microtask = __webpack_require__(177)(), + process = __webpack_require__(6).process, + isNode = __webpack_require__(43)(process) == 'process'; + + $export($export.G, { + asap: function asap(fn) { + var domain = isNode && process.domain; + microtask(domain ? domain.bind(fn) : fn); + }, + }); + + /***/ + }, + /* 605 */ + /***/ function (module, exports, __webpack_require__) { + // https://github.com/ljharb/proposal-is-error + var $export = __webpack_require__(0), + cof = __webpack_require__(43); + + $export($export.S, 'Error', { + isError: function isError(it) { + return cof(it) === 'Error'; + }, + }); + + /***/ + }, + /* 606 */ + /***/ function (module, exports, __webpack_require__) { + // https://github.com/DavidBruant/Map-Set.prototype.toJSON + var $export = __webpack_require__(0); + + $export($export.P + $export.R, 'Map', { toJSON: __webpack_require__(267)('Map') }); + + /***/ + }, + /* 607 */ + /***/ function (module, exports, __webpack_require__) { + // https://gist.github.com/BrendanEich/4294d5c212a6d2254703 + var $export = __webpack_require__(0); + + $export($export.S, 'Math', { + iaddh: function iaddh(x0, x1, y0, y1) { + var $x0 = x0 >>> 0, + $x1 = x1 >>> 0, + $y0 = y0 >>> 0; + return ($x1 + (y1 >>> 0) + ((($x0 & $y0) | (($x0 | $y0) & ~(($x0 + $y0) >>> 0))) >>> 31)) | 0; + }, + }); + + /***/ + }, + /* 608 */ + /***/ function (module, exports, __webpack_require__) { + // https://gist.github.com/BrendanEich/4294d5c212a6d2254703 + var $export = __webpack_require__(0); + + $export($export.S, 'Math', { + imulh: function imulh(u, v) { + var UINT16 = 0xffff, + $u = +u, + $v = +v, + u0 = $u & UINT16, + v0 = $v & UINT16, + u1 = $u >> 16, + v1 = $v >> 16, + t = ((u1 * v0) >>> 0) + ((u0 * v0) >>> 16); + return u1 * v1 + (t >> 16) + ((((u0 * v1) >>> 0) + (t & UINT16)) >> 16); + }, + }); + + /***/ + }, + /* 609 */ + /***/ function (module, exports, __webpack_require__) { + // https://gist.github.com/BrendanEich/4294d5c212a6d2254703 + var $export = __webpack_require__(0); + + $export($export.S, 'Math', { + isubh: function isubh(x0, x1, y0, y1) { + var $x0 = x0 >>> 0, + $x1 = x1 >>> 0, + $y0 = y0 >>> 0; + return ($x1 - (y1 >>> 0) - (((~$x0 & $y0) | (~($x0 ^ $y0) & (($x0 - $y0) >>> 0))) >>> 31)) | 0; + }, + }); + + /***/ + }, + /* 610 */ + /***/ function (module, exports, __webpack_require__) { + // https://gist.github.com/BrendanEich/4294d5c212a6d2254703 + var $export = __webpack_require__(0); + + $export($export.S, 'Math', { + umulh: function umulh(u, v) { + var UINT16 = 0xffff, + $u = +u, + $v = +v, + u0 = $u & UINT16, + v0 = $v & UINT16, + u1 = $u >>> 16, + v1 = $v >>> 16, + t = ((u1 * v0) >>> 0) + ((u0 * v0) >>> 16); + return u1 * v1 + (t >>> 16) + ((((u0 * v1) >>> 0) + (t & UINT16)) >>> 16); + }, + }); + + /***/ + }, + /* 611 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0), + toObject = __webpack_require__(17), + aFunction = __webpack_require__(28), + $defineProperty = __webpack_require__(12); + + // B.2.2.2 Object.prototype.__defineGetter__(P, getter) + __webpack_require__(11) && + $export($export.P + __webpack_require__(133), 'Object', { + __defineGetter__: function __defineGetter__(P, getter) { + $defineProperty.f(toObject(this), P, { + get: aFunction(getter), + enumerable: true, + configurable: true, + }); + }, + }); + + /***/ + }, + /* 612 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0), + toObject = __webpack_require__(17), + aFunction = __webpack_require__(28), + $defineProperty = __webpack_require__(12); + + // B.2.2.3 Object.prototype.__defineSetter__(P, setter) + __webpack_require__(11) && + $export($export.P + __webpack_require__(133), 'Object', { + __defineSetter__: function __defineSetter__(P, setter) { + $defineProperty.f(toObject(this), P, { + set: aFunction(setter), + enumerable: true, + configurable: true, + }); + }, + }); + + /***/ + }, + /* 613 */ + /***/ function (module, exports, __webpack_require__) { + // https://github.com/tc39/proposal-object-values-entries + var $export = __webpack_require__(0), + $entries = __webpack_require__(278)(true); + + $export($export.S, 'Object', { + entries: function entries(it) { + return $entries(it); + }, + }); + + /***/ + }, + /* 614 */ + /***/ function (module, exports, __webpack_require__) { + // https://github.com/tc39/proposal-object-getownpropertydescriptors + var $export = __webpack_require__(0), + ownKeys = __webpack_require__(279), + toIObject = __webpack_require__(32), + gOPD = __webpack_require__(38), + createProperty = __webpack_require__(165); + + $export($export.S, 'Object', { + getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object) { + var O = toIObject(object), + getDesc = gOPD.f, + keys = ownKeys(O), + result = {}, + i = 0, + key; + while (keys.length > i) createProperty(result, (key = keys[i++]), getDesc(O, key)); + return result; + }, + }); + + /***/ + }, + /* 615 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0), + toObject = __webpack_require__(17), + toPrimitive = __webpack_require__(52), + getPrototypeOf = __webpack_require__(39), + getOwnPropertyDescriptor = __webpack_require__(38).f; + + // B.2.2.4 Object.prototype.__lookupGetter__(P) + __webpack_require__(11) && + $export($export.P + __webpack_require__(133), 'Object', { + __lookupGetter__: function __lookupGetter__(P) { + var O = toObject(this), + K = toPrimitive(P, true), + D; + do { + if ((D = getOwnPropertyDescriptor(O, K))) return D.get; + } while ((O = getPrototypeOf(O))); + }, + }); + + /***/ + }, + /* 616 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0), + toObject = __webpack_require__(17), + toPrimitive = __webpack_require__(52), + getPrototypeOf = __webpack_require__(39), + getOwnPropertyDescriptor = __webpack_require__(38).f; + + // B.2.2.5 Object.prototype.__lookupSetter__(P) + __webpack_require__(11) && + $export($export.P + __webpack_require__(133), 'Object', { + __lookupSetter__: function __lookupSetter__(P) { + var O = toObject(this), + K = toPrimitive(P, true), + D; + do { + if ((D = getOwnPropertyDescriptor(O, K))) return D.set; + } while ((O = getPrototypeOf(O))); + }, + }); + + /***/ + }, + /* 617 */ + /***/ function (module, exports, __webpack_require__) { + // https://github.com/tc39/proposal-object-values-entries + var $export = __webpack_require__(0), + $values = __webpack_require__(278)(false); + + $export($export.S, 'Object', { + values: function values(it) { + return $values(it); + }, + }); + + /***/ + }, + /* 618 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // https://github.com/zenparsing/es-observable + var $export = __webpack_require__(0), + global = __webpack_require__(6), + core = __webpack_require__(56), + microtask = __webpack_require__(177)(), + OBSERVABLE = __webpack_require__(10)('observable'), + aFunction = __webpack_require__(28), + anObject = __webpack_require__(4), + anInstance = __webpack_require__(74), + redefineAll = __webpack_require__(79), + hide = __webpack_require__(29), + forOf = __webpack_require__(91), + RETURN = forOf.RETURN; + + var getMethod = function (fn) { + return fn == null ? undefined : aFunction(fn); + }; + + var cleanupSubscription = function (subscription) { + var cleanup = subscription._c; + if (cleanup) { + subscription._c = undefined; + cleanup(); + } + }; + + var subscriptionClosed = function (subscription) { + return subscription._o === undefined; + }; + + var closeSubscription = function (subscription) { + if (!subscriptionClosed(subscription)) { + subscription._o = undefined; + cleanupSubscription(subscription); + } + }; + + var Subscription = function (observer, subscriber) { + anObject(observer); + this._c = undefined; + this._o = observer; + observer = new SubscriptionObserver(this); + try { + var cleanup = subscriber(observer), + subscription = cleanup; + if (cleanup != null) { + if (typeof cleanup.unsubscribe === 'function') + cleanup = function () { + subscription.unsubscribe(); + }; + else aFunction(cleanup); + this._c = cleanup; + } + } catch (e) { + observer.error(e); + return; + } + if (subscriptionClosed(this)) cleanupSubscription(this); + }; + + Subscription.prototype = redefineAll( + {}, + { + unsubscribe: function unsubscribe() { + closeSubscription(this); + }, + }, + ); + + var SubscriptionObserver = function (subscription) { + this._s = subscription; + }; + + SubscriptionObserver.prototype = redefineAll( + {}, + { + next: function next(value) { + var subscription = this._s; + if (!subscriptionClosed(subscription)) { + var observer = subscription._o; + try { + var m = getMethod(observer.next); + if (m) return m.call(observer, value); + } catch (e) { + try { + closeSubscription(subscription); + } finally { + throw e; + } + } + } + }, + error: function error(value) { + var subscription = this._s; + if (subscriptionClosed(subscription)) throw value; + var observer = subscription._o; + subscription._o = undefined; + try { + var m = getMethod(observer.error); + if (!m) throw value; + value = m.call(observer, value); + } catch (e) { + try { + cleanupSubscription(subscription); + } finally { + throw e; + } + } + cleanupSubscription(subscription); + return value; + }, + complete: function complete(value) { + var subscription = this._s; + if (!subscriptionClosed(subscription)) { + var observer = subscription._o; + subscription._o = undefined; + try { + var m = getMethod(observer.complete); + value = m ? m.call(observer, value) : undefined; + } catch (e) { + try { + cleanupSubscription(subscription); + } finally { + throw e; + } + } + cleanupSubscription(subscription); + return value; + } + }, + }, + ); + + var $Observable = function Observable(subscriber) { + anInstance(this, $Observable, 'Observable', '_f')._f = aFunction(subscriber); + }; + + redefineAll($Observable.prototype, { + subscribe: function subscribe(observer) { + return new Subscription(observer, this._f); + }, + forEach: function forEach(fn) { + var that = this; + return new (core.Promise || global.Promise)(function (resolve, reject) { + aFunction(fn); + var subscription = that.subscribe({ + next: function (value) { + try { + return fn(value); + } catch (e) { + reject(e); + subscription.unsubscribe(); + } + }, + error: reject, + complete: resolve, + }); + }); + }, + }); + + redefineAll($Observable, { + from: function from(x) { + var C = typeof this === 'function' ? this : $Observable; + var method = getMethod(anObject(x)[OBSERVABLE]); + if (method) { + var observable = anObject(method.call(x)); + return observable.constructor === C + ? observable + : new C(function (observer) { + return observable.subscribe(observer); + }); + } + return new C(function (observer) { + var done = false; + microtask(function () { + if (!done) { + try { + if ( + forOf(x, false, function (it) { + observer.next(it); + if (done) return RETURN; + }) === RETURN + ) + return; + } catch (e) { + if (done) throw e; + observer.error(e); + return; + } + observer.complete(); + } + }); + return function () { + done = true; + }; + }); + }, + of: function of() { + for (var i = 0, l = arguments.length, items = Array(l); i < l; ) items[i] = arguments[i++]; + return new (typeof this === 'function' ? this : $Observable)(function (observer) { + var done = false; + microtask(function () { + if (!done) { + for (var i = 0; i < items.length; ++i) { + observer.next(items[i]); + if (done) return; + } + observer.complete(); + } + }); + return function () { + done = true; + }; + }); + }, + }); + + hide($Observable.prototype, OBSERVABLE, function () { + return this; + }); + + $export($export.G, { Observable: $Observable }); + + __webpack_require__(80)('Observable'); + + /***/ + }, + /* 619 */ + /***/ function (module, exports, __webpack_require__) { + var metadata = __webpack_require__(58), + anObject = __webpack_require__(4), + toMetaKey = metadata.key, + ordinaryDefineOwnMetadata = metadata.set; + + metadata.exp({ + defineMetadata: function defineMetadata(metadataKey, metadataValue, target, targetKey) { + ordinaryDefineOwnMetadata(metadataKey, metadataValue, anObject(target), toMetaKey(targetKey)); + }, + }); + + /***/ + }, + /* 620 */ + /***/ function (module, exports, __webpack_require__) { + var metadata = __webpack_require__(58), + anObject = __webpack_require__(4), + toMetaKey = metadata.key, + getOrCreateMetadataMap = metadata.map, + store = metadata.store; + + metadata.exp({ + deleteMetadata: function deleteMetadata(metadataKey, target /*, targetKey */) { + var targetKey = arguments.length < 3 ? undefined : toMetaKey(arguments[2]), + metadataMap = getOrCreateMetadataMap(anObject(target), targetKey, false); + if (metadataMap === undefined || !metadataMap['delete'](metadataKey)) return false; + if (metadataMap.size) return true; + var targetMetadata = store.get(target); + targetMetadata['delete'](targetKey); + return !!targetMetadata.size || store['delete'](target); + }, + }); + + /***/ + }, + /* 621 */ + /***/ function (module, exports, __webpack_require__) { + var Set = __webpack_require__(287), + from = __webpack_require__(263), + metadata = __webpack_require__(58), + anObject = __webpack_require__(4), + getPrototypeOf = __webpack_require__(39), + ordinaryOwnMetadataKeys = metadata.keys, + toMetaKey = metadata.key; + + var ordinaryMetadataKeys = function (O, P) { + var oKeys = ordinaryOwnMetadataKeys(O, P), + parent = getPrototypeOf(O); + if (parent === null) return oKeys; + var pKeys = ordinaryMetadataKeys(parent, P); + return pKeys.length ? (oKeys.length ? from(new Set(oKeys.concat(pKeys))) : pKeys) : oKeys; + }; + + metadata.exp({ + getMetadataKeys: function getMetadataKeys(target /*, targetKey */) { + return ordinaryMetadataKeys( + anObject(target), + arguments.length < 2 ? undefined : toMetaKey(arguments[1]), + ); + }, + }); + + /***/ + }, + /* 622 */ + /***/ function (module, exports, __webpack_require__) { + var metadata = __webpack_require__(58), + anObject = __webpack_require__(4), + getPrototypeOf = __webpack_require__(39), + ordinaryHasOwnMetadata = metadata.has, + ordinaryGetOwnMetadata = metadata.get, + toMetaKey = metadata.key; + + var ordinaryGetMetadata = function (MetadataKey, O, P) { + var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P); + if (hasOwn) return ordinaryGetOwnMetadata(MetadataKey, O, P); + var parent = getPrototypeOf(O); + return parent !== null ? ordinaryGetMetadata(MetadataKey, parent, P) : undefined; + }; + + metadata.exp({ + getMetadata: function getMetadata(metadataKey, target /*, targetKey */) { + return ordinaryGetMetadata( + metadataKey, + anObject(target), + arguments.length < 3 ? undefined : toMetaKey(arguments[2]), + ); + }, + }); + + /***/ + }, + /* 623 */ + /***/ function (module, exports, __webpack_require__) { + var metadata = __webpack_require__(58), + anObject = __webpack_require__(4), + ordinaryOwnMetadataKeys = metadata.keys, + toMetaKey = metadata.key; + + metadata.exp({ + getOwnMetadataKeys: function getOwnMetadataKeys(target /*, targetKey */) { + return ordinaryOwnMetadataKeys( + anObject(target), + arguments.length < 2 ? undefined : toMetaKey(arguments[1]), + ); + }, + }); + + /***/ + }, + /* 624 */ + /***/ function (module, exports, __webpack_require__) { + var metadata = __webpack_require__(58), + anObject = __webpack_require__(4), + ordinaryGetOwnMetadata = metadata.get, + toMetaKey = metadata.key; + + metadata.exp({ + getOwnMetadata: function getOwnMetadata(metadataKey, target /*, targetKey */) { + return ordinaryGetOwnMetadata( + metadataKey, + anObject(target), + arguments.length < 3 ? undefined : toMetaKey(arguments[2]), + ); + }, + }); + + /***/ + }, + /* 625 */ + /***/ function (module, exports, __webpack_require__) { + var metadata = __webpack_require__(58), + anObject = __webpack_require__(4), + getPrototypeOf = __webpack_require__(39), + ordinaryHasOwnMetadata = metadata.has, + toMetaKey = metadata.key; + + var ordinaryHasMetadata = function (MetadataKey, O, P) { + var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P); + if (hasOwn) return true; + var parent = getPrototypeOf(O); + return parent !== null ? ordinaryHasMetadata(MetadataKey, parent, P) : false; + }; + + metadata.exp({ + hasMetadata: function hasMetadata(metadataKey, target /*, targetKey */) { + return ordinaryHasMetadata( + metadataKey, + anObject(target), + arguments.length < 3 ? undefined : toMetaKey(arguments[2]), + ); + }, + }); + + /***/ + }, + /* 626 */ + /***/ function (module, exports, __webpack_require__) { + var metadata = __webpack_require__(58), + anObject = __webpack_require__(4), + ordinaryHasOwnMetadata = metadata.has, + toMetaKey = metadata.key; + + metadata.exp({ + hasOwnMetadata: function hasOwnMetadata(metadataKey, target /*, targetKey */) { + return ordinaryHasOwnMetadata( + metadataKey, + anObject(target), + arguments.length < 3 ? undefined : toMetaKey(arguments[2]), + ); + }, + }); + + /***/ + }, + /* 627 */ + /***/ function (module, exports, __webpack_require__) { + var metadata = __webpack_require__(58), + anObject = __webpack_require__(4), + aFunction = __webpack_require__(28), + toMetaKey = metadata.key, + ordinaryDefineOwnMetadata = metadata.set; + + metadata.exp({ + metadata: function metadata(metadataKey, metadataValue) { + return function decorator(target, targetKey) { + ordinaryDefineOwnMetadata( + metadataKey, + metadataValue, + (targetKey !== undefined ? anObject : aFunction)(target), + toMetaKey(targetKey), + ); + }; + }, + }); + + /***/ + }, + /* 628 */ + /***/ function (module, exports, __webpack_require__) { + // https://github.com/DavidBruant/Map-Set.prototype.toJSON + var $export = __webpack_require__(0); + + $export($export.P + $export.R, 'Set', { toJSON: __webpack_require__(267)('Set') }); + + /***/ + }, + /* 629 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // https://github.com/mathiasbynens/String.prototype.at + var $export = __webpack_require__(0), + $at = __webpack_require__(181)(true); + + $export($export.P, 'String', { + at: function at(pos) { + return $at(this, pos); + }, + }); + + /***/ + }, + /* 630 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // https://tc39.github.io/String.prototype.matchAll/ + var $export = __webpack_require__(0), + defined = __webpack_require__(44), + toLength = __webpack_require__(15), + isRegExp = __webpack_require__(131), + getFlags = __webpack_require__(129), + RegExpProto = RegExp.prototype; + + var $RegExpStringIterator = function (regexp, string) { + this._r = regexp; + this._s = string; + }; + + __webpack_require__(173)($RegExpStringIterator, 'RegExp String', function next() { + var match = this._r.exec(this._s); + return { value: match, done: match === null }; + }); + + $export($export.P, 'String', { + matchAll: function matchAll(regexp) { + defined(this); + if (!isRegExp(regexp)) throw TypeError(regexp + ' is not a regexp!'); + var S = String(this), + flags = 'flags' in RegExpProto ? String(regexp.flags) : getFlags.call(regexp), + rx = new RegExp(regexp.source, ~flags.indexOf('g') ? flags : 'g' + flags); + rx.lastIndex = toLength(regexp.lastIndex); + return new $RegExpStringIterator(rx, S); + }, + }); + + /***/ + }, + /* 631 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // https://github.com/tc39/proposal-string-pad-start-end + var $export = __webpack_require__(0), + $pad = __webpack_require__(283); + + $export($export.P, 'String', { + padEnd: function padEnd(maxLength /*, fillString = ' ' */) { + return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, false); + }, + }); + + /***/ + }, + /* 632 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // https://github.com/tc39/proposal-string-pad-start-end + var $export = __webpack_require__(0), + $pad = __webpack_require__(283); + + $export($export.P, 'String', { + padStart: function padStart(maxLength /*, fillString = ' ' */) { + return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, true); + }, + }); + + /***/ + }, + /* 633 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // https://github.com/sebmarkbage/ecmascript-string-left-right-trim + __webpack_require__(94)( + 'trimLeft', + function ($trim) { + return function trimLeft() { + return $trim(this, 1); + }; + }, + 'trimStart', + ); + + /***/ + }, + /* 634 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // https://github.com/sebmarkbage/ecmascript-string-left-right-trim + __webpack_require__(94)( + 'trimRight', + function ($trim) { + return function trimRight() { + return $trim(this, 2); + }; + }, + 'trimEnd', + ); + + /***/ + }, + /* 635 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(187)('asyncIterator'); + + /***/ + }, + /* 636 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(187)('observable'); + + /***/ + }, + /* 637 */ + /***/ function (module, exports, __webpack_require__) { + // https://github.com/ljharb/proposal-global + var $export = __webpack_require__(0); + + $export($export.S, 'System', { global: __webpack_require__(6) }); + + /***/ + }, + /* 638 */ + /***/ function (module, exports, __webpack_require__) { + var $iterators = __webpack_require__(189), + redefine = __webpack_require__(30), + global = __webpack_require__(6), + hide = __webpack_require__(29), + Iterators = __webpack_require__(92), + wks = __webpack_require__(10), + ITERATOR = wks('iterator'), + TO_STRING_TAG = wks('toStringTag'), + ArrayValues = Iterators.Array; + + for ( + var collections = ['NodeList', 'DOMTokenList', 'MediaList', 'StyleSheetList', 'CSSRuleList'], i = 0; + i < 5; + i++ + ) { + var NAME = collections[i], + Collection = global[NAME], + proto = Collection && Collection.prototype, + key; + if (proto) { + if (!proto[ITERATOR]) hide(proto, ITERATOR, ArrayValues); + if (!proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME); + Iterators[NAME] = ArrayValues; + for (key in $iterators) if (!proto[key]) redefine(proto, key, $iterators[key], true); + } + } + + /***/ + }, + /* 639 */ + /***/ function (module, exports, __webpack_require__) { + var $export = __webpack_require__(0), + $task = __webpack_require__(185); + $export($export.G + $export.B, { + setImmediate: $task.set, + clearImmediate: $task.clear, + }); + + /***/ + }, + /* 640 */ + /***/ function (module, exports, __webpack_require__) { + // ie9- setTimeout & setInterval additional parameters fix + var global = __webpack_require__(6), + $export = __webpack_require__(0), + invoke = __webpack_require__(130), + partial = __webpack_require__(467), + navigator = global.navigator, + MSIE = !!navigator && /MSIE .\./.test(navigator.userAgent); // <- dirty ie9- check + var wrap = function (set) { + return MSIE + ? function (fn, time /*, ...args */) { + return set( + invoke(partial, [].slice.call(arguments, 2), typeof fn == 'function' ? fn : Function(fn)), + time, + ); + } + : set; + }; + $export($export.G + $export.B + $export.F * MSIE, { + setTimeout: wrap(global.setTimeout), + setInterval: wrap(global.setInterval), + }); + + /***/ + }, + /* 641 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(590); + __webpack_require__(529); + __webpack_require__(531); + __webpack_require__(530); + __webpack_require__(533); + __webpack_require__(535); + __webpack_require__(540); + __webpack_require__(534); + __webpack_require__(532); + __webpack_require__(542); + __webpack_require__(541); + __webpack_require__(537); + __webpack_require__(538); + __webpack_require__(536); + __webpack_require__(528); + __webpack_require__(539); + __webpack_require__(543); + __webpack_require__(544); + __webpack_require__(496); + __webpack_require__(498); + __webpack_require__(497); + __webpack_require__(546); + __webpack_require__(545); + __webpack_require__(516); + __webpack_require__(526); + __webpack_require__(527); + __webpack_require__(517); + __webpack_require__(518); + __webpack_require__(519); + __webpack_require__(520); + __webpack_require__(521); + __webpack_require__(522); + __webpack_require__(523); + __webpack_require__(524); + __webpack_require__(525); + __webpack_require__(499); + __webpack_require__(500); + __webpack_require__(501); + __webpack_require__(502); + __webpack_require__(503); + __webpack_require__(504); + __webpack_require__(505); + __webpack_require__(506); + __webpack_require__(507); + __webpack_require__(508); + __webpack_require__(509); + __webpack_require__(510); + __webpack_require__(511); + __webpack_require__(512); + __webpack_require__(513); + __webpack_require__(514); + __webpack_require__(515); + __webpack_require__(577); + __webpack_require__(582); + __webpack_require__(589); + __webpack_require__(580); + __webpack_require__(572); + __webpack_require__(573); + __webpack_require__(578); + __webpack_require__(583); + __webpack_require__(585); + __webpack_require__(568); + __webpack_require__(569); + __webpack_require__(570); + __webpack_require__(571); + __webpack_require__(574); + __webpack_require__(575); + __webpack_require__(576); + __webpack_require__(579); + __webpack_require__(581); + __webpack_require__(584); + __webpack_require__(586); + __webpack_require__(587); + __webpack_require__(588); + __webpack_require__(491); + __webpack_require__(493); + __webpack_require__(492); + __webpack_require__(495); + __webpack_require__(494); + __webpack_require__(480); + __webpack_require__(478); + __webpack_require__(484); + __webpack_require__(481); + __webpack_require__(487); + __webpack_require__(489); + __webpack_require__(477); + __webpack_require__(483); + __webpack_require__(474); + __webpack_require__(488); + __webpack_require__(472); + __webpack_require__(486); + __webpack_require__(485); + __webpack_require__(479); + __webpack_require__(482); + __webpack_require__(471); + __webpack_require__(473); + __webpack_require__(476); + __webpack_require__(475); + __webpack_require__(490); + __webpack_require__(189); + __webpack_require__(562); + __webpack_require__(567); + __webpack_require__(286); + __webpack_require__(563); + __webpack_require__(564); + __webpack_require__(565); + __webpack_require__(566); + __webpack_require__(547); + __webpack_require__(285); + __webpack_require__(287); + __webpack_require__(288); + __webpack_require__(602); + __webpack_require__(591); + __webpack_require__(592); + __webpack_require__(597); + __webpack_require__(600); + __webpack_require__(601); + __webpack_require__(595); + __webpack_require__(598); + __webpack_require__(596); + __webpack_require__(599); + __webpack_require__(593); + __webpack_require__(594); + __webpack_require__(548); + __webpack_require__(549); + __webpack_require__(550); + __webpack_require__(551); + __webpack_require__(552); + __webpack_require__(555); + __webpack_require__(553); + __webpack_require__(554); + __webpack_require__(556); + __webpack_require__(557); + __webpack_require__(558); + __webpack_require__(559); + __webpack_require__(561); + __webpack_require__(560); + __webpack_require__(603); + __webpack_require__(629); + __webpack_require__(632); + __webpack_require__(631); + __webpack_require__(633); + __webpack_require__(634); + __webpack_require__(630); + __webpack_require__(635); + __webpack_require__(636); + __webpack_require__(614); + __webpack_require__(617); + __webpack_require__(613); + __webpack_require__(611); + __webpack_require__(612); + __webpack_require__(615); + __webpack_require__(616); + __webpack_require__(606); + __webpack_require__(628); + __webpack_require__(637); + __webpack_require__(605); + __webpack_require__(607); + __webpack_require__(609); + __webpack_require__(608); + __webpack_require__(610); + __webpack_require__(619); + __webpack_require__(620); + __webpack_require__(622); + __webpack_require__(621); + __webpack_require__(624); + __webpack_require__(623); + __webpack_require__(625); + __webpack_require__(626); + __webpack_require__(627); + __webpack_require__(604); + __webpack_require__(618); + __webpack_require__(640); + __webpack_require__(639); + __webpack_require__(638); + module.exports = __webpack_require__(56); + + /***/ + }, + /* 642 */ + /***/ function (module, exports) { + module.exports = { + elementEnter: 'CommentBox__elementEnter__UnQqf', + elementEnterActive: 'CommentBox__elementEnterActive__WCerK', + elementLeave: 'CommentBox__elementLeave__301pz', + elementLeaveActive: 'CommentBox__elementLeaveActive__Kl0zX', + }; + + /***/ + }, + /* 643 */ + /***/ function (module, exports) { + module.exports = { + nameFormControl: 'CommentForm__nameFormControl__95px9', + textFormControl: 'CommentForm__textFormControl__33iwo', + }; + + /***/ + }, + /* 644 */ + /***/ function (module, exports) { + module.exports = { + comment: 'Comment__comment__oFS_h', + commentAuthor: 'Comment__commentAuthor__GZy1Y', + }; + + /***/ + }, + /* 645 */ + /***/ function (module, exports) { + module.exports = { + notification: 'CommentScreen__notification__FuVVd', + logo: 'CommentScreen__logo__3WbOP', + twitterImage: 'CommentScreen__twitterImage__bdFDx', + }; + + /***/ + }, + /* 646 */ + /***/ function (module, exports) { + module.exports = { + elementEnter: 'SimpleCommentScreen__elementEnter__3IEhV', + elementEnterActive: 'SimpleCommentScreen__elementEnterActive__38PsD', + elementLeave: 'SimpleCommentScreen__elementLeave__3vkmW', + elementLeaveActive: 'SimpleCommentScreen__elementLeaveActive__RWIj6', + }; + + /***/ + }, + /* 647 */ + /***/ function (module, exports) { + /***/ + }, + /* 648 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + /** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @typechecks + */ + + var invariant = __webpack_require__(2); + + /** + * The CSSCore module specifies the API (and implements most of the methods) + * that should be used when dealing with the display of elements (via their + * CSS classes and visibility on screen. It is an API focused on mutating the + * display and not reading it as no logical state should be encoded in the + * display of elements. + */ + + /* Slow implementation for browsers that don't natively support .matches() */ + function matchesSelector_SLOW(element, selector) { + var root = element; + while (root.parentNode) { + root = root.parentNode; + } + + var all = root.querySelectorAll(selector); + return Array.prototype.indexOf.call(all, element) !== -1; + } + + var CSSCore = { + /** + * Adds the class passed in to the element if it doesn't already have it. + * + * @param {DOMElement} element the element to set the class on + * @param {string} className the CSS className + * @return {DOMElement} the element passed in + */ + addClass: function addClass(element, className) { + !!/\s/.test(className) + ? true + ? invariant( + false, + 'CSSCore.addClass takes only a single class name. "%s" contains ' + 'multiple classes.', + className, + ) + : invariant(false) + : void 0; + + if (className) { + if (element.classList) { + element.classList.add(className); + } else if (!CSSCore.hasClass(element, className)) { + element.className = element.className + ' ' + className; + } + } + return element; + }, + + /** + * Removes the class passed in from the element + * + * @param {DOMElement} element the element to set the class on + * @param {string} className the CSS className + * @return {DOMElement} the element passed in + */ + removeClass: function removeClass(element, className) { + !!/\s/.test(className) + ? true + ? invariant( + false, + 'CSSCore.removeClass takes only a single class name. "%s" contains ' + 'multiple classes.', + className, + ) + : invariant(false) + : void 0; + + if (className) { + if (element.classList) { + element.classList.remove(className); + } else if (CSSCore.hasClass(element, className)) { + element.className = element.className + .replace(new RegExp('(^|\\s)' + className + '(?:\\s|$)', 'g'), '$1') + .replace(/\s+/g, ' ') // multiple spaces to one + .replace(/^\s*|\s*$/g, ''); // trim the ends + } + } + return element; + }, + + /** + * Helper to add or remove a class from an element based on a condition. + * + * @param {DOMElement} element the element to set the class on + * @param {string} className the CSS className + * @param {*} bool condition to whether to add or remove the class + * @return {DOMElement} the element passed in + */ + conditionClass: function conditionClass(element, className, bool) { + return (bool ? CSSCore.addClass : CSSCore.removeClass)(element, className); + }, + + /** + * Tests whether the element has the class specified. + * + * @param {DOMNode|DOMWindow} element the element to check the class on + * @param {string} className the CSS className + * @return {boolean} true if the element has the class, false if not + */ + hasClass: function hasClass(element, className) { + !!/\s/.test(className) + ? true + ? invariant(false, 'CSS.hasClass takes only a single class name.') + : invariant(false) + : void 0; + if (element.classList) { + return !!className && element.classList.contains(className); + } + return (' ' + element.className + ' ').indexOf(' ' + className + ' ') > -1; + }, + + /** + * Tests whether the element matches the selector specified + * + * @param {DOMNode|DOMWindow} element the element that we are querying + * @param {string} selector the CSS selector + * @return {boolean} true if the element matches the selector, false if not + */ + matchesSelector: function matchesSelector(element, selector) { + var matchesImpl = + element.matches || + element.webkitMatchesSelector || + element.mozMatchesSelector || + element.msMatchesSelector || + function (s) { + return matchesSelector_SLOW(element, s); + }; + return matchesImpl.call(element, selector); + }, + }; + + module.exports = CSSCore; + + /***/ + }, + /* 649 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + /** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @typechecks + */ + + var _hyphenPattern = /-(.)/g; + + /** + * Camelcases a hyphenated string, for example: + * + * > camelize('background-color') + * < "backgroundColor" + * + * @param {string} string + * @return {string} + */ + function camelize(string) { + return string.replace(_hyphenPattern, function (_, character) { + return character.toUpperCase(); + }); + } + + module.exports = camelize; + + /***/ + }, + /* 650 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @typechecks + */ + + var camelize = __webpack_require__(649); + + var msPattern = /^-ms-/; + + /** + * Camelcases a hyphenated CSS property name, for example: + * + * > camelizeStyleName('background-color') + * < "backgroundColor" + * > camelizeStyleName('-moz-transition') + * < "MozTransition" + * > camelizeStyleName('-ms-transition') + * < "msTransition" + * + * As Andi Smith suggests + * (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix + * is converted to lowercase `ms`. + * + * @param {string} string + * @return {string} + */ + function camelizeStyleName(string) { + return camelize(string.replace(msPattern, 'ms-')); + } + + module.exports = camelizeStyleName; + + /***/ + }, + /* 651 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + /** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + var isTextNode = __webpack_require__(659); + + /*eslint-disable no-bitwise */ + + /** + * Checks if a given DOM node contains or is another DOM node. + */ + function containsNode(outerNode, innerNode) { + if (!outerNode || !innerNode) { + return false; + } else if (outerNode === innerNode) { + return true; + } else if (isTextNode(outerNode)) { + return false; + } else if (isTextNode(innerNode)) { + return containsNode(outerNode, innerNode.parentNode); + } else if ('contains' in outerNode) { + return outerNode.contains(innerNode); + } else if (outerNode.compareDocumentPosition) { + return !!(outerNode.compareDocumentPosition(innerNode) & 16); + } else { + return false; + } + } + + module.exports = containsNode; + + /***/ + }, + /* 652 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + /** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @typechecks + */ + + var invariant = __webpack_require__(2); + + /** + * Convert array-like objects to arrays. + * + * This API assumes the caller knows the contents of the data type. For less + * well defined inputs use createArrayFromMixed. + * + * @param {object|function|filelist} obj + * @return {array} + */ + function toArray(obj) { + var length = obj.length; + + // Some browsers builtin objects can report typeof 'function' (e.g. NodeList + // in old versions of Safari). + !(!Array.isArray(obj) && (typeof obj === 'object' || typeof obj === 'function')) + ? true + ? invariant(false, 'toArray: Array-like object expected') + : invariant(false) + : void 0; + + !(typeof length === 'number') + ? true + ? invariant(false, 'toArray: Object needs a length property') + : invariant(false) + : void 0; + + !(length === 0 || length - 1 in obj) + ? true + ? invariant(false, 'toArray: Object should have keys for indices') + : invariant(false) + : void 0; + + !(typeof obj.callee !== 'function') + ? true + ? invariant( + false, + "toArray: Object can't be `arguments`. Use rest params " + + '(function(...args) {}) or Array.from() instead.', + ) + : invariant(false) + : void 0; + + // Old IE doesn't give collections access to hasOwnProperty. Assume inputs + // without method will throw during the slice call and skip straight to the + // fallback. + if (obj.hasOwnProperty) { + try { + return Array.prototype.slice.call(obj); + } catch (e) { + // IE < 9 does not support Array#slice on collections objects + } + } + + // Fall back to copying key by key. This assumes all keys have a value, + // so will not preserve sparsely populated inputs. + var ret = Array(length); + for (var ii = 0; ii < length; ii++) { + ret[ii] = obj[ii]; + } + return ret; + } + + /** + * Perform a heuristic test to determine if an object is "array-like". + * + * A monk asked Joshu, a Zen master, "Has a dog Buddha nature?" + * Joshu replied: "Mu." + * + * This function determines if its argument has "array nature": it returns + * true if the argument is an actual array, an `arguments' object, or an + * HTMLCollection (e.g. node.childNodes or node.getElementsByTagName()). + * + * It will return false for other array-like objects like Filelist. + * + * @param {*} obj + * @return {boolean} + */ + function hasArrayNature(obj) { + return ( + // not null/false + !!obj && + // arrays are objects, NodeLists are functions in Safari + (typeof obj == 'object' || typeof obj == 'function') && + // quacks like an array + 'length' in obj && + // not window + !('setInterval' in obj) && + // no DOM node should be considered an array-like + // a 'select' element has 'length' and 'item' properties on IE8 + typeof obj.nodeType != 'number' && + // a real array + (Array.isArray(obj) || + // arguments + 'callee' in obj || + // HTMLCollection/NodeList + 'item' in obj) + ); + } + + /** + * Ensure that the argument is an array by wrapping it in an array if it is not. + * Creates a copy of the argument if it is already an array. + * + * This is mostly useful idiomatically: + * + * var createArrayFromMixed = require('createArrayFromMixed'); + * + * function takesOneOrMoreThings(things) { + * things = createArrayFromMixed(things); + * ... + * } + * + * This allows you to treat `things' as an array, but accept scalars in the API. + * + * If you need to convert an array-like object, like `arguments`, into an array + * use toArray instead. + * + * @param {*} obj + * @return {array} + */ + function createArrayFromMixed(obj) { + if (!hasArrayNature(obj)) { + return [obj]; + } else if (Array.isArray(obj)) { + return obj.slice(); + } else { + return toArray(obj); + } + } + + module.exports = createArrayFromMixed; + + /***/ + }, + /* 653 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + /** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @typechecks + */ + + /*eslint-disable fb-www/unsafe-html*/ + + var ExecutionEnvironment = __webpack_require__(14); + + var createArrayFromMixed = __webpack_require__(652); + var getMarkupWrap = __webpack_require__(654); + var invariant = __webpack_require__(2); + + /** + * Dummy container used to render all markup. + */ + var dummyNode = ExecutionEnvironment.canUseDOM ? document.createElement('div') : null; + + /** + * Pattern used by `getNodeName`. + */ + var nodeNamePattern = /^\s*<(\w+)/; + + /** + * Extracts the `nodeName` of the first element in a string of markup. + * + * @param {string} markup String of markup. + * @return {?string} Node name of the supplied markup. + */ + function getNodeName(markup) { + var nodeNameMatch = markup.match(nodeNamePattern); + return nodeNameMatch && nodeNameMatch[1].toLowerCase(); + } + + /** + * Creates an array containing the nodes rendered from the supplied markup. The + * optionally supplied `handleScript` function will be invoked once for each + * <script> element that is rendered. If no `handleScript` function is supplied, + * an exception is thrown if any <script> elements are rendered. + * + * @param {string} markup A string of valid HTML markup. + * @param {?function} handleScript Invoked once for each rendered <script>. + * @return {array<DOMElement|DOMTextNode>} An array of rendered nodes. + */ + function createNodesFromMarkup(markup, handleScript) { + var node = dummyNode; + !!!dummyNode + ? true + ? invariant(false, 'createNodesFromMarkup dummy not initialized') + : invariant(false) + : void 0; + var nodeName = getNodeName(markup); + + var wrap = nodeName && getMarkupWrap(nodeName); + if (wrap) { + node.innerHTML = wrap[1] + markup + wrap[2]; + + var wrapDepth = wrap[0]; + while (wrapDepth--) { + node = node.lastChild; + } + } else { + node.innerHTML = markup; + } + + var scripts = node.getElementsByTagName('script'); + if (scripts.length) { + !handleScript + ? true + ? invariant(false, 'createNodesFromMarkup(...): Unexpected <script> element rendered.') + : invariant(false) + : void 0; + createArrayFromMixed(scripts).forEach(handleScript); + } + + var nodes = Array.from(node.childNodes); + while (node.lastChild) { + node.removeChild(node.lastChild); + } + return nodes; + } + + module.exports = createNodesFromMarkup; + + /***/ + }, + /* 654 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + /** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + /*eslint-disable fb-www/unsafe-html */ + + var ExecutionEnvironment = __webpack_require__(14); + + var invariant = __webpack_require__(2); + + /** + * Dummy container used to detect which wraps are necessary. + */ + var dummyNode = ExecutionEnvironment.canUseDOM ? document.createElement('div') : null; + + /** + * Some browsers cannot use `innerHTML` to render certain elements standalone, + * so we wrap them, render the wrapped nodes, then extract the desired node. + * + * In IE8, certain elements cannot render alone, so wrap all elements ('*'). + */ + + var shouldWrap = {}; + + var selectWrap = [1, '<select multiple="true">', '</select>']; + var tableWrap = [1, '<table>', '</table>']; + var trWrap = [3, '<table><tbody><tr>', '</tr></tbody></table>']; + + var svgWrap = [1, '<svg xmlns="http://www.w3.org/2000/svg">', '</svg>']; + + var markupWrap = { + '*': [1, '?<div>', '</div>'], + + area: [1, '<map>', '</map>'], + col: [2, '<table><tbody></tbody><colgroup>', '</colgroup></table>'], + legend: [1, '<fieldset>', '</fieldset>'], + param: [1, '<object>', '</object>'], + tr: [2, '<table><tbody>', '</tbody></table>'], + + optgroup: selectWrap, + option: selectWrap, + + caption: tableWrap, + colgroup: tableWrap, + tbody: tableWrap, + tfoot: tableWrap, + thead: tableWrap, + + td: trWrap, + th: trWrap, + }; + + // Initialize the SVG elements since we know they'll always need to be wrapped + // consistently. If they are created inside a <div> they will be initialized in + // the wrong namespace (and will not display). + var svgElements = [ + 'circle', + 'clipPath', + 'defs', + 'ellipse', + 'g', + 'image', + 'line', + 'linearGradient', + 'mask', + 'path', + 'pattern', + 'polygon', + 'polyline', + 'radialGradient', + 'rect', + 'stop', + 'text', + 'tspan', + ]; + svgElements.forEach(function (nodeName) { + markupWrap[nodeName] = svgWrap; + shouldWrap[nodeName] = true; + }); + + /** + * Gets the markup wrap configuration for the supplied `nodeName`. + * + * NOTE: This lazily detects which wraps are necessary for the current browser. + * + * @param {string} nodeName Lowercase `nodeName`. + * @return {?array} Markup wrap configuration, if applicable. + */ + function getMarkupWrap(nodeName) { + !!!dummyNode + ? true + ? invariant(false, 'Markup wrapping node not initialized') + : invariant(false) + : void 0; + if (!markupWrap.hasOwnProperty(nodeName)) { + nodeName = '*'; + } + if (!shouldWrap.hasOwnProperty(nodeName)) { + if (nodeName === '*') { + dummyNode.innerHTML = '<link />'; + } else { + dummyNode.innerHTML = '<' + nodeName + '></' + nodeName + '>'; + } + shouldWrap[nodeName] = !dummyNode.firstChild; + } + return shouldWrap[nodeName] ? markupWrap[nodeName] : null; + } + + module.exports = getMarkupWrap; + + /***/ + }, + /* 655 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @typechecks + */ + + /** + * Gets the scroll position of the supplied element or window. + * + * The return values are unbounded, unlike `getScrollPosition`. This means they + * may be negative or exceed the element boundaries (which is possible using + * inertial scrolling). + * + * @param {DOMWindow|DOMElement} scrollable + * @return {object} Map with `x` and `y` keys. + */ + + function getUnboundedScrollPosition(scrollable) { + if (scrollable.Window && scrollable instanceof scrollable.Window) { + return { + x: scrollable.pageXOffset || scrollable.document.documentElement.scrollLeft, + y: scrollable.pageYOffset || scrollable.document.documentElement.scrollTop, + }; + } + return { + x: scrollable.scrollLeft, + y: scrollable.scrollTop, + }; + } + + module.exports = getUnboundedScrollPosition; + + /***/ + }, + /* 656 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + /** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @typechecks + */ + + var _uppercasePattern = /([A-Z])/g; + + /** + * Hyphenates a camelcased string, for example: + * + * > hyphenate('backgroundColor') + * < "background-color" + * + * For CSS style names, use `hyphenateStyleName` instead which works properly + * with all vendor prefixes, including `ms`. + * + * @param {string} string + * @return {string} + */ + function hyphenate(string) { + return string.replace(_uppercasePattern, '-$1').toLowerCase(); + } + + module.exports = hyphenate; + + /***/ + }, + /* 657 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @typechecks + */ + + var hyphenate = __webpack_require__(656); + + var msPattern = /^ms-/; + + /** + * Hyphenates a camelcased CSS property name, for example: + * + * > hyphenateStyleName('backgroundColor') + * < "background-color" + * > hyphenateStyleName('MozTransition') + * < "-moz-transition" + * > hyphenateStyleName('msTransition') + * < "-ms-transition" + * + * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix + * is converted to `-ms-`. + * + * @param {string} string + * @return {string} + */ + function hyphenateStyleName(string) { + return hyphenate(string).replace(msPattern, '-ms-'); + } + + module.exports = hyphenateStyleName; + + /***/ + }, + /* 658 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + /** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @typechecks + */ + + /** + * @param {*} object The object to check. + * @return {boolean} Whether or not the object is a DOM node. + */ + function isNode(object) { + var doc = object ? object.ownerDocument || object : document; + var defaultView = doc.defaultView || window; + return !!( + object && + (typeof defaultView.Node === 'function' + ? object instanceof defaultView.Node + : typeof object === 'object' && + typeof object.nodeType === 'number' && + typeof object.nodeName === 'string') + ); + } + + module.exports = isNode; + + /***/ + }, + /* 659 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + /** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @typechecks + */ + + var isNode = __webpack_require__(658); + + /** + * @param {*} object The object to check. + * @return {boolean} Whether or not the object is a DOM text node. + */ + function isTextNode(object) { + return isNode(object) && object.nodeType == 3; + } + + module.exports = isTextNode; + + /***/ + }, + /* 660 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + * @typechecks static-only + */ + + /** + * Memoizes the return value of a function that accepts one string argument. + */ + + function memoizeStringOnly(callback) { + var cache = {}; + return function (string) { + if (!cache.hasOwnProperty(string)) { + cache[string] = callback.call(this, string); + } + return cache[string]; + }; + } + + module.exports = memoizeStringOnly; + + /***/ + }, + /* 661 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @typechecks + */ + + var ExecutionEnvironment = __webpack_require__(14); + + var performance; + + if (ExecutionEnvironment.canUseDOM) { + performance = window.performance || window.msPerformance || window.webkitPerformance; + } + + module.exports = performance || {}; + + /***/ + }, + /* 662 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + /** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @typechecks + */ + + var performance = __webpack_require__(661); + + var performanceNow; + + /** + * Detect if we can use `window.performance.now()` and gracefully fallback to + * `Date.now()` if it doesn't exist. We need to support Firefox < 15 for now + * because of Facebook's testing infrastructure. + */ + if (performance.now) { + performanceNow = function performanceNow() { + return performance.now(); + }; + } else { + performanceNow = function performanceNow() { + return Date.now(); + }; + } + + module.exports = performanceNow; + + /***/ + }, + /* 663 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + var loopAsync = (exports.loopAsync = function loopAsync(turns, work, callback) { + var currentTurn = 0, + isDone = false; + var isSync = false, + hasNext = false, + doneArgs = void 0; + + var done = function done() { + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + isDone = true; + + if (isSync) { + // Iterate instead of recursing if possible. + doneArgs = args; + return; + } + + callback.apply(undefined, args); + }; + + var next = function next() { + if (isDone) return; + + hasNext = true; + + if (isSync) return; // Iterate instead of recursing if possible. + + isSync = true; + + while (!isDone && currentTurn < turns && hasNext) { + hasNext = false; + work(currentTurn++, next, done); + } + + isSync = false; + + if (isDone) { + // This means the loop finished synchronously. + callback.apply(undefined, doneArgs); + return; + } + + if (currentTurn >= turns && hasNext) { + isDone = true; + callback(); + } + }; + + next(); + }); + + /***/ + }, + /* 664 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + exports.replaceLocation = + exports.pushLocation = + exports.startListener = + exports.getCurrentLocation = + exports.go = + exports.getUserConfirmation = + undefined; + + var _BrowserProtocol = __webpack_require__(191); + + Object.defineProperty(exports, 'getUserConfirmation', { + enumerable: true, + get: function get() { + return _BrowserProtocol.getUserConfirmation; + }, + }); + Object.defineProperty(exports, 'go', { + enumerable: true, + get: function get() { + return _BrowserProtocol.go; + }, + }); + + var _warning = __webpack_require__(47); + + var _warning2 = _interopRequireDefault(_warning); + + var _LocationUtils = __webpack_require__(95); + + var _DOMUtils = __webpack_require__(138); + + var _DOMStateStorage = __webpack_require__(292); + + var _PathUtils = __webpack_require__(65); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + var HashChangeEvent = 'hashchange'; + + var getHashPath = function getHashPath() { + // We can't use window.location.hash here because it's not + // consistent across browsers - Firefox will pre-decode it! + var href = window.location.href; + var hashIndex = href.indexOf('#'); + return hashIndex === -1 ? '' : href.substring(hashIndex + 1); + }; + + var pushHashPath = function pushHashPath(path) { + return (window.location.hash = path); + }; + + var replaceHashPath = function replaceHashPath(path) { + var hashIndex = window.location.href.indexOf('#'); + + window.location.replace(window.location.href.slice(0, hashIndex >= 0 ? hashIndex : 0) + '#' + path); + }; + + var getCurrentLocation = (exports.getCurrentLocation = function getCurrentLocation( + pathCoder, + queryKey, + ) { + var path = pathCoder.decodePath(getHashPath()); + var key = (0, _PathUtils.getQueryStringValueFromPath)(path, queryKey); + + var state = void 0; + if (key) { + path = (0, _PathUtils.stripQueryStringValueFromPath)(path, queryKey); + state = (0, _DOMStateStorage.readState)(key); + } + + var init = (0, _PathUtils.parsePath)(path); + init.state = state; + + return (0, _LocationUtils.createLocation)(init, undefined, key); + }); + + var prevLocation = void 0; + + var startListener = (exports.startListener = function startListener(listener, pathCoder, queryKey) { + var handleHashChange = function handleHashChange() { + var path = getHashPath(); + var encodedPath = pathCoder.encodePath(path); + + if (path !== encodedPath) { + // Always be sure we have a properly-encoded hash. + replaceHashPath(encodedPath); + } else { + var currentLocation = getCurrentLocation(pathCoder, queryKey); + + if (prevLocation && currentLocation.key && prevLocation.key === currentLocation.key) return; // Ignore extraneous hashchange events + + prevLocation = currentLocation; + + listener(currentLocation); + } + }; + + // Ensure the hash is encoded properly. + var path = getHashPath(); + var encodedPath = pathCoder.encodePath(path); + + if (path !== encodedPath) replaceHashPath(encodedPath); + + (0, _DOMUtils.addEventListener)(window, HashChangeEvent, handleHashChange); + + return function () { + return (0, _DOMUtils.removeEventListener)(window, HashChangeEvent, handleHashChange); + }; + }); + + var updateLocation = function updateLocation(location, pathCoder, queryKey, updateHash) { + var state = location.state, + key = location.key; + + var path = pathCoder.encodePath((0, _PathUtils.createPath)(location)); + + if (state !== undefined) { + path = (0, _PathUtils.addQueryStringValueToPath)(path, queryKey, key); + (0, _DOMStateStorage.saveState)(key, state); + } + + prevLocation = location; + + updateHash(path); + }; + + var pushLocation = (exports.pushLocation = function pushLocation(location, pathCoder, queryKey) { + return updateLocation(location, pathCoder, queryKey, function (path) { + if (getHashPath() !== path) { + pushHashPath(path); + } else { + true ? (0, _warning2.default)(false, 'You cannot PUSH the same path using hash history') : void 0; + } + }); + }); + + var replaceLocation = (exports.replaceLocation = function replaceLocation( + location, + pathCoder, + queryKey, + ) { + return updateLocation(location, pathCoder, queryKey, function (path) { + if (getHashPath() !== path) replaceHashPath(path); + }); + }); + + /***/ + }, + /* 665 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + exports.replaceLocation = + exports.pushLocation = + exports.getCurrentLocation = + exports.go = + exports.getUserConfirmation = + undefined; + + var _BrowserProtocol = __webpack_require__(191); + + Object.defineProperty(exports, 'getUserConfirmation', { + enumerable: true, + get: function get() { + return _BrowserProtocol.getUserConfirmation; + }, + }); + Object.defineProperty(exports, 'go', { + enumerable: true, + get: function get() { + return _BrowserProtocol.go; + }, + }); + + var _LocationUtils = __webpack_require__(95); + + var _PathUtils = __webpack_require__(65); + + var getCurrentLocation = (exports.getCurrentLocation = function getCurrentLocation() { + return (0, _LocationUtils.createLocation)(window.location); + }); + + var pushLocation = (exports.pushLocation = function pushLocation(location) { + window.location.href = (0, _PathUtils.createPath)(location); + return false; // Don't update location + }); + + var replaceLocation = (exports.replaceLocation = function replaceLocation(location) { + window.location.replace((0, _PathUtils.createPath)(location)); + return false; // Don't update location + }); + + /***/ + }, + /* 666 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + var _invariant = __webpack_require__(16); + + var _invariant2 = _interopRequireDefault(_invariant); + + var _ExecutionEnvironment = __webpack_require__(192); + + var _BrowserProtocol = __webpack_require__(191); + + var BrowserProtocol = _interopRequireWildcard(_BrowserProtocol); + + var _RefreshProtocol = __webpack_require__(665); + + var RefreshProtocol = _interopRequireWildcard(_RefreshProtocol); + + var _DOMUtils = __webpack_require__(138); + + var _createHistory = __webpack_require__(193); + + var _createHistory2 = _interopRequireDefault(_createHistory); + + function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; + } + } + newObj.default = obj; + return newObj; + } + } + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + /** + * Creates and returns a history object that uses HTML5's history API + * (pushState, replaceState, and the popstate event) to manage history. + * This is the recommended method of managing history in browsers because + * it provides the cleanest URLs. + * + * Note: In browsers that do not support the HTML5 history API full + * page reloads will be used to preserve clean URLs. You can force this + * behavior using { forceRefresh: true } in options. + */ + var createBrowserHistory = function createBrowserHistory() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + + !_ExecutionEnvironment.canUseDOM + ? true + ? (0, _invariant2.default)(false, 'Browser history needs a DOM') + : (0, _invariant2.default)(false) + : void 0; + + var useRefresh = options.forceRefresh || !(0, _DOMUtils.supportsHistory)(); + var Protocol = useRefresh ? RefreshProtocol : BrowserProtocol; + + var getUserConfirmation = Protocol.getUserConfirmation, + getCurrentLocation = Protocol.getCurrentLocation, + pushLocation = Protocol.pushLocation, + replaceLocation = Protocol.replaceLocation, + go = Protocol.go; + + var history = (0, _createHistory2.default)( + _extends( + { + getUserConfirmation: getUserConfirmation, + }, + options, + { + getCurrentLocation: getCurrentLocation, + pushLocation: pushLocation, + replaceLocation: replaceLocation, + go: go, + }, + ), + ); + + var listenerCount = 0, + stopListener = void 0; + + var startListener = function startListener(listener, before) { + if (++listenerCount === 1) stopListener = BrowserProtocol.startListener(history.transitionTo); + + var unlisten = before ? history.listenBefore(listener) : history.listen(listener); + + return function () { + unlisten(); + + if (--listenerCount === 0) stopListener(); + }; + }; + + var listenBefore = function listenBefore(listener) { + return startListener(listener, true); + }; + + var listen = function listen(listener) { + return startListener(listener, false); + }; + + return _extends({}, history, { + listenBefore: listenBefore, + listen: listen, + }); + }; + + exports.default = createBrowserHistory; + + /***/ + }, + /* 667 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + var _warning = __webpack_require__(47); + + var _warning2 = _interopRequireDefault(_warning); + + var _invariant = __webpack_require__(16); + + var _invariant2 = _interopRequireDefault(_invariant); + + var _ExecutionEnvironment = __webpack_require__(192); + + var _DOMUtils = __webpack_require__(138); + + var _HashProtocol = __webpack_require__(664); + + var HashProtocol = _interopRequireWildcard(_HashProtocol); + + var _createHistory = __webpack_require__(193); + + var _createHistory2 = _interopRequireDefault(_createHistory); + + function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; + } + } + newObj.default = obj; + return newObj; + } + } + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + var DefaultQueryKey = '_k'; + + var addLeadingSlash = function addLeadingSlash(path) { + return path.charAt(0) === '/' ? path : '/' + path; + }; + + var HashPathCoders = { + hashbang: { + encodePath: function encodePath(path) { + return path.charAt(0) === '!' ? path : '!' + path; + }, + decodePath: function decodePath(path) { + return path.charAt(0) === '!' ? path.substring(1) : path; + }, + }, + noslash: { + encodePath: function encodePath(path) { + return path.charAt(0) === '/' ? path.substring(1) : path; + }, + decodePath: addLeadingSlash, + }, + slash: { + encodePath: addLeadingSlash, + decodePath: addLeadingSlash, + }, + }; + + var createHashHistory = function createHashHistory() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + + !_ExecutionEnvironment.canUseDOM + ? true + ? (0, _invariant2.default)(false, 'Hash history needs a DOM') + : (0, _invariant2.default)(false) + : void 0; + + var queryKey = options.queryKey, + hashType = options.hashType; + + true + ? (0, _warning2.default)( + queryKey !== false, + "Using { queryKey: false } no longer works. Instead, just don't " + + "use location state if you don't want a key in your URL query string", + ) + : void 0; + + if (typeof queryKey !== 'string') queryKey = DefaultQueryKey; + + if (hashType == null) hashType = 'slash'; + + if (!(hashType in HashPathCoders)) { + true ? (0, _warning2.default)(false, 'Invalid hash type: %s', hashType) : void 0; + + hashType = 'slash'; + } + + var pathCoder = HashPathCoders[hashType]; + + var getUserConfirmation = HashProtocol.getUserConfirmation; + + var getCurrentLocation = function getCurrentLocation() { + return HashProtocol.getCurrentLocation(pathCoder, queryKey); + }; + + var pushLocation = function pushLocation(location) { + return HashProtocol.pushLocation(location, pathCoder, queryKey); + }; + + var replaceLocation = function replaceLocation(location) { + return HashProtocol.replaceLocation(location, pathCoder, queryKey); + }; + + var history = (0, _createHistory2.default)( + _extends( + { + getUserConfirmation: getUserConfirmation, + }, + options, + { + getCurrentLocation: getCurrentLocation, + pushLocation: pushLocation, + replaceLocation: replaceLocation, + go: HashProtocol.go, + }, + ), + ); + + var listenerCount = 0, + stopListener = void 0; + + var startListener = function startListener(listener, before) { + if (++listenerCount === 1) + stopListener = HashProtocol.startListener(history.transitionTo, pathCoder, queryKey); + + var unlisten = before ? history.listenBefore(listener) : history.listen(listener); + + return function () { + unlisten(); + + if (--listenerCount === 0) stopListener(); + }; + }; + + var listenBefore = function listenBefore(listener) { + return startListener(listener, true); + }; + + var listen = function listen(listener) { + return startListener(listener, false); + }; + + var goIsSupportedWithoutReload = (0, _DOMUtils.supportsGoWithoutReloadUsingHash)(); + + var go = function go(n) { + true + ? (0, _warning2.default)( + goIsSupportedWithoutReload, + 'Hash history go(n) causes a full page reload in this browser', + ) + : void 0; + + history.go(n); + }; + + var createHref = function createHref(path) { + return '#' + pathCoder.encodePath(history.createHref(path)); + }; + + return _extends({}, history, { + listenBefore: listenBefore, + listen: listen, + go: go, + createHref: createHref, + }); + }; + + exports.default = createHashHistory; + + /***/ + }, + /* 668 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + var _warning = __webpack_require__(47); + + var _warning2 = _interopRequireDefault(_warning); + + var _invariant = __webpack_require__(16); + + var _invariant2 = _interopRequireDefault(_invariant); + + var _LocationUtils = __webpack_require__(95); + + var _PathUtils = __webpack_require__(65); + + var _createHistory = __webpack_require__(193); + + var _createHistory2 = _interopRequireDefault(_createHistory); + + var _Actions = __webpack_require__(137); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + var createStateStorage = function createStateStorage(entries) { + return entries + .filter(function (entry) { + return entry.state; + }) + .reduce(function (memo, entry) { + memo[entry.key] = entry.state; + return memo; + }, {}); + }; + + var createMemoryHistory = function createMemoryHistory() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + + if (Array.isArray(options)) { + options = { entries: options }; + } else if (typeof options === 'string') { + options = { entries: [options] }; + } + + var getCurrentLocation = function getCurrentLocation() { + var entry = entries[current]; + var path = (0, _PathUtils.createPath)(entry); + + var key = void 0, + state = void 0; + if (entry.key) { + key = entry.key; + state = readState(key); + } + + var init = (0, _PathUtils.parsePath)(path); + + return (0, _LocationUtils.createLocation)(_extends({}, init, { state: state }), undefined, key); + }; + + var canGo = function canGo(n) { + var index = current + n; + return index >= 0 && index < entries.length; + }; + + var go = function go(n) { + if (!n) return; + + if (!canGo(n)) { + true ? (0, _warning2.default)(false, 'Cannot go(%s) there is not enough history', n) : void 0; + + return; + } + + current += n; + var currentLocation = getCurrentLocation(); + + // Change action to POP + history.transitionTo(_extends({}, currentLocation, { action: _Actions.POP })); + }; + + var pushLocation = function pushLocation(location) { + current += 1; + + if (current < entries.length) entries.splice(current); + + entries.push(location); + + saveState(location.key, location.state); + }; + + var replaceLocation = function replaceLocation(location) { + entries[current] = location; + saveState(location.key, location.state); + }; + + var history = (0, _createHistory2.default)( + _extends({}, options, { + getCurrentLocation: getCurrentLocation, + pushLocation: pushLocation, + replaceLocation: replaceLocation, + go: go, + }), + ); + + var _options = options, + entries = _options.entries, + current = _options.current; + + if (typeof entries === 'string') { + entries = [entries]; + } else if (!Array.isArray(entries)) { + entries = ['/']; + } + + entries = entries.map(function (entry) { + return (0, _LocationUtils.createLocation)(entry); + }); + + if (current == null) { + current = entries.length - 1; + } else { + !(current >= 0 && current < entries.length) + ? true + ? (0, _invariant2.default)( + false, + 'Current index must be >= 0 and < %s, was %s', + entries.length, + current, + ) + : (0, _invariant2.default)(false) + : void 0; + } + + var storage = createStateStorage(entries); + + var saveState = function saveState(key, state) { + return (storage[key] = state); + }; + + var readState = function readState(key) { + return storage[key]; + }; + + return _extends({}, history, { + canGo: canGo, + }); + }; + + exports.default = createMemoryHistory; + + /***/ + }, + /* 669 */ + /***/ function (module, exports) { + exports.read = function (buffer, offset, isLE, mLen, nBytes) { + var e, m; + var eLen = nBytes * 8 - mLen - 1; + var eMax = (1 << eLen) - 1; + var eBias = eMax >> 1; + var nBits = -7; + var i = isLE ? nBytes - 1 : 0; + var d = isLE ? -1 : 1; + var s = buffer[offset + i]; + + i += d; + + e = s & ((1 << -nBits) - 1); + s >>= -nBits; + nBits += eLen; + for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {} + + m = e & ((1 << -nBits) - 1); + e >>= -nBits; + nBits += mLen; + for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {} + + if (e === 0) { + e = 1 - eBias; + } else if (e === eMax) { + return m ? NaN : (s ? -1 : 1) * Infinity; + } else { + m = m + Math.pow(2, mLen); + e = e - eBias; + } + return (s ? -1 : 1) * m * Math.pow(2, e - mLen); + }; + + exports.write = function (buffer, value, offset, isLE, mLen, nBytes) { + var e, m, c; + var eLen = nBytes * 8 - mLen - 1; + var eMax = (1 << eLen) - 1; + var eBias = eMax >> 1; + var rt = mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0; + var i = isLE ? 0 : nBytes - 1; + var d = isLE ? 1 : -1; + var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0; + + value = Math.abs(value); + + if (isNaN(value) || value === Infinity) { + m = isNaN(value) ? 1 : 0; + e = eMax; + } else { + e = Math.floor(Math.log(value) / Math.LN2); + if (value * (c = Math.pow(2, -e)) < 1) { + e--; + c *= 2; + } + if (e + eBias >= 1) { + value += rt / c; + } else { + value += rt * Math.pow(2, 1 - eBias); + } + if (value * c >= 2) { + e++; + c /= 2; + } + + if (e + eBias >= eMax) { + m = 0; + e = eMax; + } else if (e + eBias >= 1) { + m = (value * c - 1) * Math.pow(2, mLen); + e = e + eBias; + } else { + m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen); + e = 0; + } + } + + for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {} + + e = (e << mLen) | m; + eLen += mLen; + for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {} + + buffer[offset + i - d] |= s * 128; + }; + + /***/ + }, + /* 670 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports = module.exports = __webpack_require__(672)['default']; + exports['default'] = exports; + + /***/ + }, + /* 671 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + /* +Copyright (c) 2014, Yahoo! Inc. All rights reserved. +Copyrights licensed under the New BSD License. +See the accompanying LICENSE file for terms. +*/ + + /* jslint esnext: true */ + + // Function.prototype.bind implementation from Mozilla Developer Network: + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind#Polyfill + + var bind = + Function.prototype.bind || + function (oThis) { + if (typeof this !== 'function') { + // closest thing possible to the ECMAScript 5 + // internal IsCallable function + throw new TypeError('Function.prototype.bind - what is trying to be bound is not callable'); + } + + var aArgs = Array.prototype.slice.call(arguments, 1), + fToBind = this, + fNOP = function () {}, + fBound = function () { + return fToBind.apply( + this instanceof fNOP ? this : oThis, + aArgs.concat(Array.prototype.slice.call(arguments)), + ); + }; + + if (this.prototype) { + // native functions don't have a prototype + fNOP.prototype = this.prototype; + } + fBound.prototype = new fNOP(); + + return fBound; + }; + + // Purposely using the same implementation as the Intl.js `Intl` polyfill. + // Copyright 2013 Andy Earnshaw, MIT License + + var hop = Object.prototype.hasOwnProperty; + + var realDefineProp = (function () { + try { + return !!Object.defineProperty({}, 'a', {}); + } catch (e) { + return false; + } + })(); + + var es3 = !realDefineProp && !Object.prototype.__defineGetter__; + + var defineProperty = realDefineProp + ? Object.defineProperty + : function (obj, name, desc) { + if ('get' in desc && obj.__defineGetter__) { + obj.__defineGetter__(name, desc.get); + } else if (!hop.call(obj, name) || 'value' in desc) { + obj[name] = desc.value; + } + }; + + var objCreate = + Object.create || + function (proto, props) { + var obj, k; + + function F() {} + F.prototype = proto; + obj = new F(); + + for (k in props) { + if (hop.call(props, k)) { + defineProperty(obj, k, props[k]); + } + } + + return obj; + }; + + (exports.bind = bind), (exports.defineProperty = defineProperty), (exports.objCreate = objCreate); + + //# sourceMappingURL=es5.js.map + + /***/ + }, + /* 672 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var src$es5$$ = __webpack_require__(671); + exports['default'] = createFormatCache; + + // ----------------------------------------------------------------------------- + + function createFormatCache(FormatConstructor) { + var cache = src$es5$$.objCreate(null); + + return function () { + var args = Array.prototype.slice.call(arguments); + var cacheId = getCacheId(args); + var format = cacheId && cache[cacheId]; + + if (!format) { + format = new (src$es5$$.bind.apply(FormatConstructor, [null].concat(args)))(); + + if (cacheId) { + cache[cacheId] = format; + } + } + + return format; + }; + } + + // -- Utilities ---------------------------------------------------------------- + + function getCacheId(inputs) { + // When JSON is not available in the runtime, we will not create a cache id. + if (typeof JSON === 'undefined') { + return; + } + + var cacheId = []; + + var i, len, input; + + for (i = 0, len = inputs.length; i < len; i += 1) { + input = inputs[i]; + + if (input && typeof input === 'object') { + cacheId.push(orderedProps(input)); + } else { + cacheId.push(input); + } + } + + return JSON.stringify(cacheId); + } + + function orderedProps(obj) { + var props = [], + keys = []; + + var key, i, len, prop; + + for (key in obj) { + if (obj.hasOwnProperty(key)) { + keys.push(key); + } + } + + var orderedKeys = keys.sort(); + + for (i = 0, len = orderedKeys.length; i < len; i += 1) { + key = orderedKeys[i]; + prop = {}; + + prop[key] = obj[key]; + props[i] = prop; + } + + return props; + } + + //# sourceMappingURL=memoizer.js.map + + /***/ + }, + /* 673 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports = module.exports = __webpack_require__(674)['default']; + exports['default'] = exports; + + /***/ + }, + /* 674 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports['default'] = (function () { + /* + * Generated by PEG.js 0.8.0. + * + * http://pegjs.majda.cz/ + */ + + function peg$subclass(child, parent) { + function ctor() { + this.constructor = child; + } + ctor.prototype = parent.prototype; + child.prototype = new ctor(); + } + + function SyntaxError(message, expected, found, offset, line, column) { + this.message = message; + this.expected = expected; + this.found = found; + this.offset = offset; + this.line = line; + this.column = column; + + this.name = 'SyntaxError'; + } + + peg$subclass(SyntaxError, Error); + + function parse(input) { + var options = arguments.length > 1 ? arguments[1] : {}, + peg$FAILED = {}, + peg$startRuleFunctions = { start: peg$parsestart }, + peg$startRuleFunction = peg$parsestart, + peg$c0 = [], + peg$c1 = function (elements) { + return { + type: 'messageFormatPattern', + elements: elements, + }; + }, + peg$c2 = peg$FAILED, + peg$c3 = function (text) { + var string = '', + i, + j, + outerLen, + inner, + innerLen; + + for (i = 0, outerLen = text.length; i < outerLen; i += 1) { + inner = text[i]; + + for (j = 0, innerLen = inner.length; j < innerLen; j += 1) { + string += inner[j]; + } + } + + return string; + }, + peg$c4 = function (messageText) { + return { + type: 'messageTextElement', + value: messageText, + }; + }, + peg$c5 = /^[^ \t\n\r,.+={}#]/, + peg$c6 = { type: 'class', value: '[^ \\t\\n\\r,.+={}#]', description: '[^ \\t\\n\\r,.+={}#]' }, + peg$c7 = '{', + peg$c8 = { type: 'literal', value: '{', description: '"{"' }, + peg$c9 = null, + peg$c10 = ',', + peg$c11 = { type: 'literal', value: ',', description: '","' }, + peg$c12 = '}', + peg$c13 = { type: 'literal', value: '}', description: '"}"' }, + peg$c14 = function (id, format) { + return { + type: 'argumentElement', + id: id, + format: format && format[2], + }; + }, + peg$c15 = 'number', + peg$c16 = { type: 'literal', value: 'number', description: '"number"' }, + peg$c17 = 'date', + peg$c18 = { type: 'literal', value: 'date', description: '"date"' }, + peg$c19 = 'time', + peg$c20 = { type: 'literal', value: 'time', description: '"time"' }, + peg$c21 = function (type, style) { + return { + type: type + 'Format', + style: style && style[2], + }; + }, + peg$c22 = 'plural', + peg$c23 = { type: 'literal', value: 'plural', description: '"plural"' }, + peg$c24 = function (pluralStyle) { + return { + type: pluralStyle.type, + ordinal: false, + offset: pluralStyle.offset || 0, + options: pluralStyle.options, + }; + }, + peg$c25 = 'selectordinal', + peg$c26 = { type: 'literal', value: 'selectordinal', description: '"selectordinal"' }, + peg$c27 = function (pluralStyle) { + return { + type: pluralStyle.type, + ordinal: true, + offset: pluralStyle.offset || 0, + options: pluralStyle.options, + }; + }, + peg$c28 = 'select', + peg$c29 = { type: 'literal', value: 'select', description: '"select"' }, + peg$c30 = function (options) { + return { + type: 'selectFormat', + options: options, + }; + }, + peg$c31 = '=', + peg$c32 = { type: 'literal', value: '=', description: '"="' }, + peg$c33 = function (selector, pattern) { + return { + type: 'optionalFormatPattern', + selector: selector, + value: pattern, + }; + }, + peg$c34 = 'offset:', + peg$c35 = { type: 'literal', value: 'offset:', description: '"offset:"' }, + peg$c36 = function (number) { + return number; + }, + peg$c37 = function (offset, options) { + return { + type: 'pluralFormat', + offset: offset, + options: options, + }; + }, + peg$c38 = { type: 'other', description: 'whitespace' }, + peg$c39 = /^[ \t\n\r]/, + peg$c40 = { type: 'class', value: '[ \\t\\n\\r]', description: '[ \\t\\n\\r]' }, + peg$c41 = { type: 'other', description: 'optionalWhitespace' }, + peg$c42 = /^[0-9]/, + peg$c43 = { type: 'class', value: '[0-9]', description: '[0-9]' }, + peg$c44 = /^[0-9a-f]/i, + peg$c45 = { type: 'class', value: '[0-9a-f]i', description: '[0-9a-f]i' }, + peg$c46 = '0', + peg$c47 = { type: 'literal', value: '0', description: '"0"' }, + peg$c48 = /^[1-9]/, + peg$c49 = { type: 'class', value: '[1-9]', description: '[1-9]' }, + peg$c50 = function (digits) { + return parseInt(digits, 10); + }, + peg$c51 = /^[^{}\\\0-\x1F \t\n\r]/, + peg$c52 = { + type: 'class', + value: '[^{}\\\\\\0-\\x1F \\t\\n\\r]', + description: '[^{}\\\\\\0-\\x1F \\t\\n\\r]', + }, + peg$c53 = '\\\\', + peg$c54 = { type: 'literal', value: '\\\\', description: '"\\\\\\\\"' }, + peg$c55 = function () { + return '\\'; + }, + peg$c56 = '\\#', + peg$c57 = { type: 'literal', value: '\\#', description: '"\\\\#"' }, + peg$c58 = function () { + return '\\#'; + }, + peg$c59 = '\\{', + peg$c60 = { type: 'literal', value: '\\{', description: '"\\\\{"' }, + peg$c61 = function () { + return '\u007B'; + }, + peg$c62 = '\\}', + peg$c63 = { type: 'literal', value: '\\}', description: '"\\\\}"' }, + peg$c64 = function () { + return '\u007D'; + }, + peg$c65 = '\\u', + peg$c66 = { type: 'literal', value: '\\u', description: '"\\\\u"' }, + peg$c67 = function (digits) { + return String.fromCharCode(parseInt(digits, 16)); + }, + peg$c68 = function (chars) { + return chars.join(''); + }, + peg$currPos = 0, + peg$reportedPos = 0, + peg$cachedPos = 0, + peg$cachedPosDetails = { line: 1, column: 1, seenCR: false }, + peg$maxFailPos = 0, + peg$maxFailExpected = [], + peg$silentFails = 0, + peg$result; + + if ('startRule' in options) { + if (!(options.startRule in peg$startRuleFunctions)) { + throw new Error('Can\'t start parsing from rule "' + options.startRule + '".'); + } + + peg$startRuleFunction = peg$startRuleFunctions[options.startRule]; + } + + function text() { + return input.substring(peg$reportedPos, peg$currPos); + } + + function offset() { + return peg$reportedPos; + } + + function line() { + return peg$computePosDetails(peg$reportedPos).line; + } + + function column() { + return peg$computePosDetails(peg$reportedPos).column; + } + + function expected(description) { + throw peg$buildException(null, [{ type: 'other', description: description }], peg$reportedPos); + } + + function error(message) { + throw peg$buildException(message, null, peg$reportedPos); + } + + function peg$computePosDetails(pos) { + function advance(details, startPos, endPos) { + var p, ch; + + for (p = startPos; p < endPos; p++) { + ch = input.charAt(p); + if (ch === '\n') { + if (!details.seenCR) { + details.line++; + } + details.column = 1; + details.seenCR = false; + } else if (ch === '\r' || ch === '\u2028' || ch === '\u2029') { + details.line++; + details.column = 1; + details.seenCR = true; + } else { + details.column++; + details.seenCR = false; + } + } + } + + if (peg$cachedPos !== pos) { + if (peg$cachedPos > pos) { + peg$cachedPos = 0; + peg$cachedPosDetails = { line: 1, column: 1, seenCR: false }; + } + advance(peg$cachedPosDetails, peg$cachedPos, pos); + peg$cachedPos = pos; + } + + return peg$cachedPosDetails; + } + + function peg$fail(expected) { + if (peg$currPos < peg$maxFailPos) { + return; + } + + if (peg$currPos > peg$maxFailPos) { + peg$maxFailPos = peg$currPos; + peg$maxFailExpected = []; + } + + peg$maxFailExpected.push(expected); + } + + function peg$buildException(message, expected, pos) { + function cleanupExpected(expected) { + var i = 1; + + expected.sort(function (a, b) { + if (a.description < b.description) { + return -1; + } else if (a.description > b.description) { + return 1; + } else { + return 0; + } + }); + + while (i < expected.length) { + if (expected[i - 1] === expected[i]) { + expected.splice(i, 1); + } else { + i++; + } + } + } + + function buildMessage(expected, found) { + function stringEscape(s) { + function hex(ch) { + return ch.charCodeAt(0).toString(16).toUpperCase(); + } + + return s + .replace(/\\/g, '\\\\') + .replace(/"/g, '\\"') + .replace(/\x08/g, '\\b') + .replace(/\t/g, '\\t') + .replace(/\n/g, '\\n') + .replace(/\f/g, '\\f') + .replace(/\r/g, '\\r') + .replace(/[\x00-\x07\x0B\x0E\x0F]/g, function (ch) { + return '\\x0' + hex(ch); + }) + .replace(/[\x10-\x1F\x80-\xFF]/g, function (ch) { + return '\\x' + hex(ch); + }) + .replace(/[\u0180-\u0FFF]/g, function (ch) { + return '\\u0' + hex(ch); + }) + .replace(/[\u1080-\uFFFF]/g, function (ch) { + return '\\u' + hex(ch); + }); + } + + var expectedDescs = new Array(expected.length), + expectedDesc, + foundDesc, + i; + + for (i = 0; i < expected.length; i++) { + expectedDescs[i] = expected[i].description; + } + + expectedDesc = + expected.length > 1 + ? expectedDescs.slice(0, -1).join(', ') + ' or ' + expectedDescs[expected.length - 1] + : expectedDescs[0]; + + foundDesc = found ? '"' + stringEscape(found) + '"' : 'end of input'; + + return 'Expected ' + expectedDesc + ' but ' + foundDesc + ' found.'; + } + + var posDetails = peg$computePosDetails(pos), + found = pos < input.length ? input.charAt(pos) : null; + + if (expected !== null) { + cleanupExpected(expected); + } + + return new SyntaxError( + message !== null ? message : buildMessage(expected, found), + expected, + found, + pos, + posDetails.line, + posDetails.column, + ); + } + + function peg$parsestart() { + var s0; + + s0 = peg$parsemessageFormatPattern(); + + return s0; + } + + function peg$parsemessageFormatPattern() { + var s0, s1, s2; + + s0 = peg$currPos; + s1 = []; + s2 = peg$parsemessageFormatElement(); + while (s2 !== peg$FAILED) { + s1.push(s2); + s2 = peg$parsemessageFormatElement(); + } + if (s1 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c1(s1); + } + s0 = s1; + + return s0; + } + + function peg$parsemessageFormatElement() { + var s0; + + s0 = peg$parsemessageTextElement(); + if (s0 === peg$FAILED) { + s0 = peg$parseargumentElement(); + } + + return s0; + } + + function peg$parsemessageText() { + var s0, s1, s2, s3, s4, s5; + + s0 = peg$currPos; + s1 = []; + s2 = peg$currPos; + s3 = peg$parse_(); + if (s3 !== peg$FAILED) { + s4 = peg$parsechars(); + if (s4 !== peg$FAILED) { + s5 = peg$parse_(); + if (s5 !== peg$FAILED) { + s3 = [s3, s4, s5]; + s2 = s3; + } else { + peg$currPos = s2; + s2 = peg$c2; + } + } else { + peg$currPos = s2; + s2 = peg$c2; + } + } else { + peg$currPos = s2; + s2 = peg$c2; + } + if (s2 !== peg$FAILED) { + while (s2 !== peg$FAILED) { + s1.push(s2); + s2 = peg$currPos; + s3 = peg$parse_(); + if (s3 !== peg$FAILED) { + s4 = peg$parsechars(); + if (s4 !== peg$FAILED) { + s5 = peg$parse_(); + if (s5 !== peg$FAILED) { + s3 = [s3, s4, s5]; + s2 = s3; + } else { + peg$currPos = s2; + s2 = peg$c2; + } + } else { + peg$currPos = s2; + s2 = peg$c2; + } + } else { + peg$currPos = s2; + s2 = peg$c2; + } + } + } else { + s1 = peg$c2; + } + if (s1 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c3(s1); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parsews(); + if (s1 !== peg$FAILED) { + s1 = input.substring(s0, peg$currPos); + } + s0 = s1; + } + + return s0; + } + + function peg$parsemessageTextElement() { + var s0, s1; + + s0 = peg$currPos; + s1 = peg$parsemessageText(); + if (s1 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c4(s1); + } + s0 = s1; + + return s0; + } + + function peg$parseargument() { + var s0, s1, s2; + + s0 = peg$parsenumber(); + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = []; + if (peg$c5.test(input.charAt(peg$currPos))) { + s2 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c6); + } + } + if (s2 !== peg$FAILED) { + while (s2 !== peg$FAILED) { + s1.push(s2); + if (peg$c5.test(input.charAt(peg$currPos))) { + s2 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c6); + } + } + } + } else { + s1 = peg$c2; + } + if (s1 !== peg$FAILED) { + s1 = input.substring(s0, peg$currPos); + } + s0 = s1; + } + + return s0; + } + + function peg$parseargumentElement() { + var s0, s1, s2, s3, s4, s5, s6, s7, s8; + + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 123) { + s1 = peg$c7; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c8); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + s3 = peg$parseargument(); + if (s3 !== peg$FAILED) { + s4 = peg$parse_(); + if (s4 !== peg$FAILED) { + s5 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 44) { + s6 = peg$c10; + peg$currPos++; + } else { + s6 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c11); + } + } + if (s6 !== peg$FAILED) { + s7 = peg$parse_(); + if (s7 !== peg$FAILED) { + s8 = peg$parseelementFormat(); + if (s8 !== peg$FAILED) { + s6 = [s6, s7, s8]; + s5 = s6; + } else { + peg$currPos = s5; + s5 = peg$c2; + } + } else { + peg$currPos = s5; + s5 = peg$c2; + } + } else { + peg$currPos = s5; + s5 = peg$c2; + } + if (s5 === peg$FAILED) { + s5 = peg$c9; + } + if (s5 !== peg$FAILED) { + s6 = peg$parse_(); + if (s6 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 125) { + s7 = peg$c12; + peg$currPos++; + } else { + s7 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c13); + } + } + if (s7 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c14(s3, s5); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + + return s0; + } + + function peg$parseelementFormat() { + var s0; + + s0 = peg$parsesimpleFormat(); + if (s0 === peg$FAILED) { + s0 = peg$parsepluralFormat(); + if (s0 === peg$FAILED) { + s0 = peg$parseselectOrdinalFormat(); + if (s0 === peg$FAILED) { + s0 = peg$parseselectFormat(); + } + } + } + + return s0; + } + + function peg$parsesimpleFormat() { + var s0, s1, s2, s3, s4, s5, s6; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 6) === peg$c15) { + s1 = peg$c15; + peg$currPos += 6; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c16); + } + } + if (s1 === peg$FAILED) { + if (input.substr(peg$currPos, 4) === peg$c17) { + s1 = peg$c17; + peg$currPos += 4; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c18); + } + } + if (s1 === peg$FAILED) { + if (input.substr(peg$currPos, 4) === peg$c19) { + s1 = peg$c19; + peg$currPos += 4; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c20); + } + } + } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + s3 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 44) { + s4 = peg$c10; + peg$currPos++; + } else { + s4 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c11); + } + } + if (s4 !== peg$FAILED) { + s5 = peg$parse_(); + if (s5 !== peg$FAILED) { + s6 = peg$parsechars(); + if (s6 !== peg$FAILED) { + s4 = [s4, s5, s6]; + s3 = s4; + } else { + peg$currPos = s3; + s3 = peg$c2; + } + } else { + peg$currPos = s3; + s3 = peg$c2; + } + } else { + peg$currPos = s3; + s3 = peg$c2; + } + if (s3 === peg$FAILED) { + s3 = peg$c9; + } + if (s3 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c21(s1, s3); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + + return s0; + } + + function peg$parsepluralFormat() { + var s0, s1, s2, s3, s4, s5; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 6) === peg$c22) { + s1 = peg$c22; + peg$currPos += 6; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c23); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 44) { + s3 = peg$c10; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c11); + } + } + if (s3 !== peg$FAILED) { + s4 = peg$parse_(); + if (s4 !== peg$FAILED) { + s5 = peg$parsepluralStyle(); + if (s5 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c24(s5); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + + return s0; + } + + function peg$parseselectOrdinalFormat() { + var s0, s1, s2, s3, s4, s5; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 13) === peg$c25) { + s1 = peg$c25; + peg$currPos += 13; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c26); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 44) { + s3 = peg$c10; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c11); + } + } + if (s3 !== peg$FAILED) { + s4 = peg$parse_(); + if (s4 !== peg$FAILED) { + s5 = peg$parsepluralStyle(); + if (s5 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c27(s5); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + + return s0; + } + + function peg$parseselectFormat() { + var s0, s1, s2, s3, s4, s5, s6; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 6) === peg$c28) { + s1 = peg$c28; + peg$currPos += 6; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c29); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 44) { + s3 = peg$c10; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c11); + } + } + if (s3 !== peg$FAILED) { + s4 = peg$parse_(); + if (s4 !== peg$FAILED) { + s5 = []; + s6 = peg$parseoptionalFormatPattern(); + if (s6 !== peg$FAILED) { + while (s6 !== peg$FAILED) { + s5.push(s6); + s6 = peg$parseoptionalFormatPattern(); + } + } else { + s5 = peg$c2; + } + if (s5 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c30(s5); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + + return s0; + } + + function peg$parseselector() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + s1 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 61) { + s2 = peg$c31; + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c32); + } + } + if (s2 !== peg$FAILED) { + s3 = peg$parsenumber(); + if (s3 !== peg$FAILED) { + s2 = [s2, s3]; + s1 = s2; + } else { + peg$currPos = s1; + s1 = peg$c2; + } + } else { + peg$currPos = s1; + s1 = peg$c2; + } + if (s1 !== peg$FAILED) { + s1 = input.substring(s0, peg$currPos); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$parsechars(); + } + + return s0; + } + + function peg$parseoptionalFormatPattern() { + var s0, s1, s2, s3, s4, s5, s6, s7, s8; + + s0 = peg$currPos; + s1 = peg$parse_(); + if (s1 !== peg$FAILED) { + s2 = peg$parseselector(); + if (s2 !== peg$FAILED) { + s3 = peg$parse_(); + if (s3 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 123) { + s4 = peg$c7; + peg$currPos++; + } else { + s4 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c8); + } + } + if (s4 !== peg$FAILED) { + s5 = peg$parse_(); + if (s5 !== peg$FAILED) { + s6 = peg$parsemessageFormatPattern(); + if (s6 !== peg$FAILED) { + s7 = peg$parse_(); + if (s7 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 125) { + s8 = peg$c12; + peg$currPos++; + } else { + s8 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c13); + } + } + if (s8 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c33(s2, s6); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + + return s0; + } + + function peg$parseoffset() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 7) === peg$c34) { + s1 = peg$c34; + peg$currPos += 7; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c35); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + s3 = peg$parsenumber(); + if (s3 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c36(s3); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + + return s0; + } + + function peg$parsepluralStyle() { + var s0, s1, s2, s3, s4; + + s0 = peg$currPos; + s1 = peg$parseoffset(); + if (s1 === peg$FAILED) { + s1 = peg$c9; + } + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + s3 = []; + s4 = peg$parseoptionalFormatPattern(); + if (s4 !== peg$FAILED) { + while (s4 !== peg$FAILED) { + s3.push(s4); + s4 = peg$parseoptionalFormatPattern(); + } + } else { + s3 = peg$c2; + } + if (s3 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c37(s1, s3); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + + return s0; + } + + function peg$parsews() { + var s0, s1; + + peg$silentFails++; + s0 = []; + if (peg$c39.test(input.charAt(peg$currPos))) { + s1 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c40); + } + } + if (s1 !== peg$FAILED) { + while (s1 !== peg$FAILED) { + s0.push(s1); + if (peg$c39.test(input.charAt(peg$currPos))) { + s1 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c40); + } + } + } + } else { + s0 = peg$c2; + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c38); + } + } + + return s0; + } + + function peg$parse_() { + var s0, s1, s2; + + peg$silentFails++; + s0 = peg$currPos; + s1 = []; + s2 = peg$parsews(); + while (s2 !== peg$FAILED) { + s1.push(s2); + s2 = peg$parsews(); + } + if (s1 !== peg$FAILED) { + s1 = input.substring(s0, peg$currPos); + } + s0 = s1; + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c41); + } + } + + return s0; + } + + function peg$parsedigit() { + var s0; + + if (peg$c42.test(input.charAt(peg$currPos))) { + s0 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c43); + } + } + + return s0; + } + + function peg$parsehexDigit() { + var s0; + + if (peg$c44.test(input.charAt(peg$currPos))) { + s0 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c45); + } + } + + return s0; + } + + function peg$parsenumber() { + var s0, s1, s2, s3, s4, s5; + + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 48) { + s1 = peg$c46; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c47); + } + } + if (s1 === peg$FAILED) { + s1 = peg$currPos; + s2 = peg$currPos; + if (peg$c48.test(input.charAt(peg$currPos))) { + s3 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c49); + } + } + if (s3 !== peg$FAILED) { + s4 = []; + s5 = peg$parsedigit(); + while (s5 !== peg$FAILED) { + s4.push(s5); + s5 = peg$parsedigit(); + } + if (s4 !== peg$FAILED) { + s3 = [s3, s4]; + s2 = s3; + } else { + peg$currPos = s2; + s2 = peg$c2; + } + } else { + peg$currPos = s2; + s2 = peg$c2; + } + if (s2 !== peg$FAILED) { + s2 = input.substring(s1, peg$currPos); + } + s1 = s2; + } + if (s1 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c50(s1); + } + s0 = s1; + + return s0; + } + + function peg$parsechar() { + var s0, s1, s2, s3, s4, s5, s6, s7; + + if (peg$c51.test(input.charAt(peg$currPos))) { + s0 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c52); + } + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.substr(peg$currPos, 2) === peg$c53) { + s1 = peg$c53; + peg$currPos += 2; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c54); + } + } + if (s1 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c55(); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.substr(peg$currPos, 2) === peg$c56) { + s1 = peg$c56; + peg$currPos += 2; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c57); + } + } + if (s1 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c58(); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.substr(peg$currPos, 2) === peg$c59) { + s1 = peg$c59; + peg$currPos += 2; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c60); + } + } + if (s1 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c61(); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.substr(peg$currPos, 2) === peg$c62) { + s1 = peg$c62; + peg$currPos += 2; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c63); + } + } + if (s1 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c64(); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.substr(peg$currPos, 2) === peg$c65) { + s1 = peg$c65; + peg$currPos += 2; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c66); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + s3 = peg$currPos; + s4 = peg$parsehexDigit(); + if (s4 !== peg$FAILED) { + s5 = peg$parsehexDigit(); + if (s5 !== peg$FAILED) { + s6 = peg$parsehexDigit(); + if (s6 !== peg$FAILED) { + s7 = peg$parsehexDigit(); + if (s7 !== peg$FAILED) { + s4 = [s4, s5, s6, s7]; + s3 = s4; + } else { + peg$currPos = s3; + s3 = peg$c2; + } + } else { + peg$currPos = s3; + s3 = peg$c2; + } + } else { + peg$currPos = s3; + s3 = peg$c2; + } + } else { + peg$currPos = s3; + s3 = peg$c2; + } + if (s3 !== peg$FAILED) { + s3 = input.substring(s2, peg$currPos); + } + s2 = s3; + if (s2 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c67(s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } + } + } + } + } + + return s0; + } + + function peg$parsechars() { + var s0, s1, s2; + + s0 = peg$currPos; + s1 = []; + s2 = peg$parsechar(); + if (s2 !== peg$FAILED) { + while (s2 !== peg$FAILED) { + s1.push(s2); + s2 = peg$parsechar(); + } + } else { + s1 = peg$c2; + } + if (s1 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c68(s1); + } + s0 = s1; + + return s0; + } + + peg$result = peg$startRuleFunction(); + + if (peg$result !== peg$FAILED && peg$currPos === input.length) { + return peg$result; + } else { + if (peg$result !== peg$FAILED && peg$currPos < input.length) { + peg$fail({ type: 'end', description: 'end of input' }); + } + + throw peg$buildException(null, peg$maxFailExpected, peg$maxFailPos); + } + } + + return { + SyntaxError: SyntaxError, + parse: parse, + }; + })(); + + //# sourceMappingURL=parser.js.map + + /***/ + }, + /* 675 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /* +Copyright (c) 2014, Yahoo! Inc. All rights reserved. +Copyrights licensed under the New BSD License. +See the accompanying LICENSE file for terms. +*/ + + /* jslint esnext: true */ + + exports['default'] = Compiler; + + function Compiler(locales, formats, pluralFn) { + this.locales = locales; + this.formats = formats; + this.pluralFn = pluralFn; + } + + Compiler.prototype.compile = function (ast) { + this.pluralStack = []; + this.currentPlural = null; + this.pluralNumberFormat = null; + + return this.compileMessage(ast); + }; + + Compiler.prototype.compileMessage = function (ast) { + if (!(ast && ast.type === 'messageFormatPattern')) { + throw new Error('Message AST is not of type: "messageFormatPattern"'); + } + + var elements = ast.elements, + pattern = []; + + var i, len, element; + + for (i = 0, len = elements.length; i < len; i += 1) { + element = elements[i]; + + switch (element.type) { + case 'messageTextElement': + pattern.push(this.compileMessageText(element)); + break; + + case 'argumentElement': + pattern.push(this.compileArgument(element)); + break; + + default: + throw new Error('Message element does not have a valid type'); + } + } + + return pattern; + }; + + Compiler.prototype.compileMessageText = function (element) { + // When this `element` is part of plural sub-pattern and its value contains + // an unescaped '#', use a `PluralOffsetString` helper to properly output + // the number with the correct offset in the string. + if (this.currentPlural && /(^|[^\\])#/g.test(element.value)) { + // Create a cache a NumberFormat instance that can be reused for any + // PluralOffsetString instance in this message. + if (!this.pluralNumberFormat) { + this.pluralNumberFormat = new Intl.NumberFormat(this.locales); + } + + return new PluralOffsetString( + this.currentPlural.id, + this.currentPlural.format.offset, + this.pluralNumberFormat, + element.value, + ); + } + + // Unescape the escaped '#'s in the message text. + return element.value.replace(/\\#/g, '#'); + }; + + Compiler.prototype.compileArgument = function (element) { + var format = element.format; + + if (!format) { + return new StringFormat(element.id); + } + + var formats = this.formats, + locales = this.locales, + pluralFn = this.pluralFn, + options; + + switch (format.type) { + case 'numberFormat': + options = formats.number[format.style]; + return { + id: element.id, + format: new Intl.NumberFormat(locales, options).format, + }; + + case 'dateFormat': + options = formats.date[format.style]; + return { + id: element.id, + format: new Intl.DateTimeFormat(locales, options).format, + }; + + case 'timeFormat': + options = formats.time[format.style]; + return { + id: element.id, + format: new Intl.DateTimeFormat(locales, options).format, + }; + + case 'pluralFormat': + options = this.compileOptions(element); + return new PluralFormat(element.id, format.ordinal, format.offset, options, pluralFn); + + case 'selectFormat': + options = this.compileOptions(element); + return new SelectFormat(element.id, options); + + default: + throw new Error('Message element does not have a valid format type'); + } + }; + + Compiler.prototype.compileOptions = function (element) { + var format = element.format, + options = format.options, + optionsHash = {}; + + // Save the current plural element, if any, then set it to a new value when + // compiling the options sub-patterns. This conforms the spec's algorithm + // for handling `"#"` syntax in message text. + this.pluralStack.push(this.currentPlural); + this.currentPlural = format.type === 'pluralFormat' ? element : null; + + var i, len, option; + + for (i = 0, len = options.length; i < len; i += 1) { + option = options[i]; + + // Compile the sub-pattern and save it under the options's selector. + optionsHash[option.selector] = this.compileMessage(option.value); + } + + // Pop the plural stack to put back the original current plural value. + this.currentPlural = this.pluralStack.pop(); + + return optionsHash; + }; + + // -- Compiler Helper Classes -------------------------------------------------- + + function StringFormat(id) { + this.id = id; + } + + StringFormat.prototype.format = function (value) { + if (!value) { + return ''; + } + + return typeof value === 'string' ? value : String(value); + }; + + function PluralFormat(id, useOrdinal, offset, options, pluralFn) { + this.id = id; + this.useOrdinal = useOrdinal; + this.offset = offset; + this.options = options; + this.pluralFn = pluralFn; + } + + PluralFormat.prototype.getOption = function (value) { + var options = this.options; + + var option = options['=' + value] || options[this.pluralFn(value - this.offset, this.useOrdinal)]; + + return option || options.other; + }; + + function PluralOffsetString(id, offset, numberFormat, string) { + this.id = id; + this.offset = offset; + this.numberFormat = numberFormat; + this.string = string; + } + + PluralOffsetString.prototype.format = function (value) { + var number = this.numberFormat.format(value - this.offset); + + return this.string.replace(/(^|[^\\])#/g, '$1' + number).replace(/\\#/g, '#'); + }; + + function SelectFormat(id, options) { + this.id = id; + this.options = options; + } + + SelectFormat.prototype.getOption = function (value) { + var options = this.options; + return options[value] || options.other; + }; + + //# sourceMappingURL=compiler.js.map + + /***/ + }, + /* 676 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /* +Copyright (c) 2014, Yahoo! Inc. All rights reserved. +Copyrights licensed under the New BSD License. +See the accompanying LICENSE file for terms. +*/ + + /* jslint esnext: true */ + + var src$utils$$ = __webpack_require__(297), + src$es5$$ = __webpack_require__(678), + src$compiler$$ = __webpack_require__(675), + intl$messageformat$parser$$ = __webpack_require__(673); + exports['default'] = MessageFormat; + + // -- MessageFormat -------------------------------------------------------- + + function MessageFormat(message, locales, formats) { + // Parse string messages into an AST. + var ast = typeof message === 'string' ? MessageFormat.__parse(message) : message; + + if (!(ast && ast.type === 'messageFormatPattern')) { + throw new TypeError('A message must be provided as a String or AST.'); + } + + // Creates a new object with the specified `formats` merged with the default + // formats. + formats = this._mergeFormats(MessageFormat.formats, formats); + + // Defined first because it's used to build the format pattern. + src$es5$$.defineProperty(this, '_locale', { value: this._resolveLocale(locales) }); + + // Compile the `ast` to a pattern that is highly optimized for repeated + // `format()` invocations. **Note:** This passes the `locales` set provided + // to the constructor instead of just the resolved locale. + var pluralFn = this._findPluralRuleFunction(this._locale); + var pattern = this._compilePattern(ast, locales, formats, pluralFn); + + // "Bind" `format()` method to `this` so it can be passed by reference like + // the other `Intl` APIs. + var messageFormat = this; + this.format = function (values) { + return messageFormat._format(pattern, values); + }; + } + + // Default format options used as the prototype of the `formats` provided to the + // constructor. These are used when constructing the internal Intl.NumberFormat + // and Intl.DateTimeFormat instances. + src$es5$$.defineProperty(MessageFormat, 'formats', { + enumerable: true, + + value: { + number: { + currency: { + style: 'currency', + }, + + percent: { + style: 'percent', + }, + }, + + date: { + short: { + month: 'numeric', + day: 'numeric', + year: '2-digit', + }, + + medium: { + month: 'short', + day: 'numeric', + year: 'numeric', + }, + + long: { + month: 'long', + day: 'numeric', + year: 'numeric', + }, + + full: { + weekday: 'long', + month: 'long', + day: 'numeric', + year: 'numeric', + }, + }, + + time: { + short: { + hour: 'numeric', + minute: 'numeric', + }, + + medium: { + hour: 'numeric', + minute: 'numeric', + second: 'numeric', + }, + + long: { + hour: 'numeric', + minute: 'numeric', + second: 'numeric', + timeZoneName: 'short', + }, + + full: { + hour: 'numeric', + minute: 'numeric', + second: 'numeric', + timeZoneName: 'short', + }, + }, + }, + }); + + // Define internal private properties for dealing with locale data. + src$es5$$.defineProperty(MessageFormat, '__localeData__', { value: src$es5$$.objCreate(null) }); + src$es5$$.defineProperty(MessageFormat, '__addLocaleData', { + value: function (data) { + if (!(data && data.locale)) { + throw new Error('Locale data provided to IntlMessageFormat is missing a ' + '`locale` property'); + } + + MessageFormat.__localeData__[data.locale.toLowerCase()] = data; + }, + }); + + // Defines `__parse()` static method as an exposed private. + src$es5$$.defineProperty(MessageFormat, '__parse', { + value: intl$messageformat$parser$$['default'].parse, + }); + + // Define public `defaultLocale` property which defaults to English, but can be + // set by the developer. + src$es5$$.defineProperty(MessageFormat, 'defaultLocale', { + enumerable: true, + writable: true, + value: undefined, + }); + + MessageFormat.prototype.resolvedOptions = function () { + // TODO: Provide anything else? + return { + locale: this._locale, + }; + }; + + MessageFormat.prototype._compilePattern = function (ast, locales, formats, pluralFn) { + var compiler = new src$compiler$$['default'](locales, formats, pluralFn); + return compiler.compile(ast); + }; + + MessageFormat.prototype._findPluralRuleFunction = function (locale) { + var localeData = MessageFormat.__localeData__; + var data = localeData[locale.toLowerCase()]; + + // The locale data is de-duplicated, so we have to traverse the locale's + // hierarchy until we find a `pluralRuleFunction` to return. + while (data) { + if (data.pluralRuleFunction) { + return data.pluralRuleFunction; + } + + data = data.parentLocale && localeData[data.parentLocale.toLowerCase()]; + } + + throw new Error( + 'Locale data added to IntlMessageFormat is missing a ' + '`pluralRuleFunction` for :' + locale, + ); + }; + + MessageFormat.prototype._format = function (pattern, values) { + var result = '', + i, + len, + part, + id, + value; + + for (i = 0, len = pattern.length; i < len; i += 1) { + part = pattern[i]; + + // Exist early for string parts. + if (typeof part === 'string') { + result += part; + continue; + } + + id = part.id; + + // Enforce that all required values are provided by the caller. + if (!(values && src$utils$$.hop.call(values, id))) { + throw new Error('A value must be provided for: ' + id); + } + + value = values[id]; + + // Recursively format plural and select parts' option — which can be a + // nested pattern structure. The choosing of the option to use is + // abstracted-by and delegated-to the part helper object. + if (part.options) { + result += this._format(part.getOption(value), values); + } else { + result += part.format(value); + } + } + + return result; + }; + + MessageFormat.prototype._mergeFormats = function (defaults, formats) { + var mergedFormats = {}, + type, + mergedType; + + for (type in defaults) { + if (!src$utils$$.hop.call(defaults, type)) { + continue; + } + + mergedFormats[type] = mergedType = src$es5$$.objCreate(defaults[type]); + + if (formats && src$utils$$.hop.call(formats, type)) { + src$utils$$.extend(mergedType, formats[type]); + } + } + + return mergedFormats; + }; + + MessageFormat.prototype._resolveLocale = function (locales) { + if (typeof locales === 'string') { + locales = [locales]; + } + + // Create a copy of the array so we can push on the default locale. + locales = (locales || []).concat(MessageFormat.defaultLocale); + + var localeData = MessageFormat.__localeData__; + var i, len, localeParts, data; + + // Using the set of locales + the default locale, we look for the first one + // which that has been registered. When data does not exist for a locale, we + // traverse its ancestors to find something that's been registered within + // its hierarchy of locales. Since we lack the proper `parentLocale` data + // here, we must take a naive approach to traversal. + for (i = 0, len = locales.length; i < len; i += 1) { + localeParts = locales[i].toLowerCase().split('-'); + + while (localeParts.length) { + data = localeData[localeParts.join('-')]; + if (data) { + // Return the normalized locale string; e.g., we return "en-US", + // instead of "en-us". + return data.locale; + } + + localeParts.pop(); + } + } + + var defaultLocale = locales.pop(); + throw new Error( + 'No locale data has been added to IntlMessageFormat for: ' + + locales.join(', ') + + ', or the default locale: ' + + defaultLocale, + ); + }; + + //# sourceMappingURL=core.js.map + + /***/ + }, + /* 677 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + // GENERATED FILE + + exports['default'] = { + locale: 'en', + pluralRuleFunction: function (n, ord) { + var s = String(n).split('.'), + v0 = !s[1], + t0 = Number(s[0]) == n, + n10 = t0 && s[0].slice(-1), + n100 = t0 && s[0].slice(-2); + if (ord) + return n10 == 1 && n100 != 11 + ? 'one' + : n10 == 2 && n100 != 12 + ? 'two' + : n10 == 3 && n100 != 13 + ? 'few' + : 'other'; + return n == 1 && v0 ? 'one' : 'other'; + }, + }; + + //# sourceMappingURL=en.js.map + + /***/ + }, + /* 678 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /* +Copyright (c) 2014, Yahoo! Inc. All rights reserved. +Copyrights licensed under the New BSD License. +See the accompanying LICENSE file for terms. +*/ + + /* jslint esnext: true */ + + var src$utils$$ = __webpack_require__(297); + + // Purposely using the same implementation as the Intl.js `Intl` polyfill. + // Copyright 2013 Andy Earnshaw, MIT License + + var realDefineProp = (function () { + try { + return !!Object.defineProperty({}, 'a', {}); + } catch (e) { + return false; + } + })(); + + var es3 = !realDefineProp && !Object.prototype.__defineGetter__; + + var defineProperty = realDefineProp + ? Object.defineProperty + : function (obj, name, desc) { + if ('get' in desc && obj.__defineGetter__) { + obj.__defineGetter__(name, desc.get); + } else if (!src$utils$$.hop.call(obj, name) || 'value' in desc) { + obj[name] = desc.value; + } + }; + + var objCreate = + Object.create || + function (proto, props) { + var obj, k; + + function F() {} + F.prototype = proto; + obj = new F(); + + for (k in props) { + if (src$utils$$.hop.call(props, k)) { + defineProperty(obj, k, props[k]); + } + } + + return obj; + }; + (exports.defineProperty = defineProperty), (exports.objCreate = objCreate); + + //# sourceMappingURL=es5.js.map + + /***/ + }, + /* 679 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /* jslint esnext: true */ + + var src$core$$ = __webpack_require__(676), + src$en$$ = __webpack_require__(677); + + src$core$$['default'].__addLocaleData(src$en$$['default']); + src$core$$['default'].defaultLocale = 'en'; + + exports['default'] = src$core$$['default']; + + //# sourceMappingURL=main.js.map + + /***/ + }, + /* 680 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /* jshint node:true */ + + var IntlRelativeFormat = __webpack_require__(685)['default']; + + // Add all locale data to `IntlRelativeFormat`. This module will be ignored when + // bundling for the browser with Browserify/Webpack. + __webpack_require__(842); + + // Re-export `IntlRelativeFormat` as the CommonJS default exports with all the + // locale data registered, and with English set as the default locale. Define + // the `default` prop for use with other compiled ES6 Modules. + exports = module.exports = IntlRelativeFormat; + exports['default'] = exports; + + /***/ + }, + /* 681 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /* +Copyright (c) 2014, Yahoo! Inc. All rights reserved. +Copyrights licensed under the New BSD License. +See the accompanying LICENSE file for terms. +*/ + + /* jslint esnext: true */ + + var intl$messageformat$$ = __webpack_require__(296), + src$diff$$ = __webpack_require__(682), + src$es5$$ = __webpack_require__(684); + exports['default'] = RelativeFormat; + + // ----------------------------------------------------------------------------- + + var FIELDS = ['second', 'minute', 'hour', 'day', 'month', 'year']; + var STYLES = ['best fit', 'numeric']; + + // -- RelativeFormat ----------------------------------------------------------- + + function RelativeFormat(locales, options) { + options = options || {}; + + // Make a copy of `locales` if it's an array, so that it doesn't change + // since it's used lazily. + if (src$es5$$.isArray(locales)) { + locales = locales.concat(); + } + + src$es5$$.defineProperty(this, '_locale', { value: this._resolveLocale(locales) }); + src$es5$$.defineProperty(this, '_options', { + value: { + style: this._resolveStyle(options.style), + units: this._isValidUnits(options.units) && options.units, + }, + }); + + src$es5$$.defineProperty(this, '_locales', { value: locales }); + src$es5$$.defineProperty(this, '_fields', { value: this._findFields(this._locale) }); + src$es5$$.defineProperty(this, '_messages', { value: src$es5$$.objCreate(null) }); + + // "Bind" `format()` method to `this` so it can be passed by reference like + // the other `Intl` APIs. + var relativeFormat = this; + this.format = function format(date, options) { + return relativeFormat._format(date, options); + }; + } + + // Define internal private properties for dealing with locale data. + src$es5$$.defineProperty(RelativeFormat, '__localeData__', { value: src$es5$$.objCreate(null) }); + src$es5$$.defineProperty(RelativeFormat, '__addLocaleData', { + value: function (data) { + if (!(data && data.locale)) { + throw new Error( + 'Locale data provided to IntlRelativeFormat is missing a ' + '`locale` property value', + ); + } + + RelativeFormat.__localeData__[data.locale.toLowerCase()] = data; + + // Add data to IntlMessageFormat. + intl$messageformat$$['default'].__addLocaleData(data); + }, + }); + + // Define public `defaultLocale` property which can be set by the developer, or + // it will be set when the first RelativeFormat instance is created by + // leveraging the resolved locale from `Intl`. + src$es5$$.defineProperty(RelativeFormat, 'defaultLocale', { + enumerable: true, + writable: true, + value: undefined, + }); + + // Define public `thresholds` property which can be set by the developer, and + // defaults to relative time thresholds from moment.js. + src$es5$$.defineProperty(RelativeFormat, 'thresholds', { + enumerable: true, + + value: { + second: 45, // seconds to minute + minute: 45, // minutes to hour + hour: 22, // hours to day + day: 26, // days to month + month: 11, // months to year + }, + }); + + RelativeFormat.prototype.resolvedOptions = function () { + return { + locale: this._locale, + style: this._options.style, + units: this._options.units, + }; + }; + + RelativeFormat.prototype._compileMessage = function (units) { + // `this._locales` is the original set of locales the user specified to the + // constructor, while `this._locale` is the resolved root locale. + var locales = this._locales; + var resolvedLocale = this._locale; + + var field = this._fields[units]; + var relativeTime = field.relativeTime; + var future = ''; + var past = ''; + var i; + + for (i in relativeTime.future) { + if (relativeTime.future.hasOwnProperty(i)) { + future += ' ' + i + ' {' + relativeTime.future[i].replace('{0}', '#') + '}'; + } + } + + for (i in relativeTime.past) { + if (relativeTime.past.hasOwnProperty(i)) { + past += ' ' + i + ' {' + relativeTime.past[i].replace('{0}', '#') + '}'; + } + } + + var message = + '{when, select, future {{0, plural, ' + future + '}}' + 'past {{0, plural, ' + past + '}}}'; + + // Create the synthetic IntlMessageFormat instance using the original + // locales value specified by the user when constructing the the parent + // IntlRelativeFormat instance. + return new intl$messageformat$$['default'](message, locales); + }; + + RelativeFormat.prototype._getMessage = function (units) { + var messages = this._messages; + + // Create a new synthetic message based on the locale data from CLDR. + if (!messages[units]) { + messages[units] = this._compileMessage(units); + } + + return messages[units]; + }; + + RelativeFormat.prototype._getRelativeUnits = function (diff, units) { + var field = this._fields[units]; + + if (field.relative) { + return field.relative[diff]; + } + }; + + RelativeFormat.prototype._findFields = function (locale) { + var localeData = RelativeFormat.__localeData__; + var data = localeData[locale.toLowerCase()]; + + // The locale data is de-duplicated, so we have to traverse the locale's + // hierarchy until we find `fields` to return. + while (data) { + if (data.fields) { + return data.fields; + } + + data = data.parentLocale && localeData[data.parentLocale.toLowerCase()]; + } + + throw new Error('Locale data added to IntlRelativeFormat is missing `fields` for :' + locale); + }; + + RelativeFormat.prototype._format = function (date, options) { + var now = options && options.now !== undefined ? options.now : src$es5$$.dateNow(); + + if (date === undefined) { + date = now; + } + + // Determine if the `date` and optional `now` values are valid, and throw a + // similar error to what `Intl.DateTimeFormat#format()` would throw. + if (!isFinite(now)) { + throw new RangeError( + 'The `now` option provided to IntlRelativeFormat#format() is not ' + 'in valid range.', + ); + } + + if (!isFinite(date)) { + throw new RangeError( + 'The date value provided to IntlRelativeFormat#format() is not ' + 'in valid range.', + ); + } + + var diffReport = src$diff$$['default'](now, date); + var units = this._options.units || this._selectUnits(diffReport); + var diffInUnits = diffReport[units]; + + if (this._options.style !== 'numeric') { + var relativeUnits = this._getRelativeUnits(diffInUnits, units); + if (relativeUnits) { + return relativeUnits; + } + } + + return this._getMessage(units).format({ + 0: Math.abs(diffInUnits), + when: diffInUnits < 0 ? 'past' : 'future', + }); + }; + + RelativeFormat.prototype._isValidUnits = function (units) { + if (!units || src$es5$$.arrIndexOf.call(FIELDS, units) >= 0) { + return true; + } + + if (typeof units === 'string') { + var suggestion = /s$/.test(units) && units.substr(0, units.length - 1); + if (suggestion && src$es5$$.arrIndexOf.call(FIELDS, suggestion) >= 0) { + throw new Error( + '"' + + units + + '" is not a valid IntlRelativeFormat `units` ' + + 'value, did you mean: ' + + suggestion, + ); + } + } + + throw new Error( + '"' + + units + + '" is not a valid IntlRelativeFormat `units` value, it ' + + 'must be one of: "' + + FIELDS.join('", "') + + '"', + ); + }; + + RelativeFormat.prototype._resolveLocale = function (locales) { + if (typeof locales === 'string') { + locales = [locales]; + } + + // Create a copy of the array so we can push on the default locale. + locales = (locales || []).concat(RelativeFormat.defaultLocale); + + var localeData = RelativeFormat.__localeData__; + var i, len, localeParts, data; + + // Using the set of locales + the default locale, we look for the first one + // which that has been registered. When data does not exist for a locale, we + // traverse its ancestors to find something that's been registered within + // its hierarchy of locales. Since we lack the proper `parentLocale` data + // here, we must take a naive approach to traversal. + for (i = 0, len = locales.length; i < len; i += 1) { + localeParts = locales[i].toLowerCase().split('-'); + + while (localeParts.length) { + data = localeData[localeParts.join('-')]; + if (data) { + // Return the normalized locale string; e.g., we return "en-US", + // instead of "en-us". + return data.locale; + } + + localeParts.pop(); + } + } + + var defaultLocale = locales.pop(); + throw new Error( + 'No locale data has been added to IntlRelativeFormat for: ' + + locales.join(', ') + + ', or the default locale: ' + + defaultLocale, + ); + }; + + RelativeFormat.prototype._resolveStyle = function (style) { + // Default to "best fit" style. + if (!style) { + return STYLES[0]; + } + + if (src$es5$$.arrIndexOf.call(STYLES, style) >= 0) { + return style; + } + + throw new Error( + '"' + + style + + '" is not a valid IntlRelativeFormat `style` value, it ' + + 'must be one of: "' + + STYLES.join('", "') + + '"', + ); + }; + + RelativeFormat.prototype._selectUnits = function (diffReport) { + var i, l, units; + + for (i = 0, l = FIELDS.length; i < l; i += 1) { + units = FIELDS[i]; + + if (Math.abs(diffReport[units]) < RelativeFormat.thresholds[units]) { + break; + } + } + + return units; + }; + + //# sourceMappingURL=core.js.map + + /***/ + }, + /* 682 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /* +Copyright (c) 2014, Yahoo! Inc. All rights reserved. +Copyrights licensed under the New BSD License. +See the accompanying LICENSE file for terms. +*/ + + /* jslint esnext: true */ + + var round = Math.round; + + function daysToYears(days) { + // 400 years have 146097 days (taking into account leap year rules) + return (days * 400) / 146097; + } + + exports['default'] = function (from, to) { + // Convert to ms timestamps. + from = +from; + to = +to; + + var millisecond = round(to - from), + second = round(millisecond / 1000), + minute = round(second / 60), + hour = round(minute / 60), + day = round(hour / 24), + week = round(day / 7); + + var rawYears = daysToYears(day), + month = round(rawYears * 12), + year = round(rawYears); + + return { + millisecond: millisecond, + second: second, + minute: minute, + hour: hour, + day: day, + week: week, + month: month, + year: year, + }; + }; + + //# sourceMappingURL=diff.js.map + + /***/ + }, + /* 683 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + // GENERATED FILE + + exports['default'] = { + locale: 'en', + pluralRuleFunction: function (n, ord) { + var s = String(n).split('.'), + v0 = !s[1], + t0 = Number(s[0]) == n, + n10 = t0 && s[0].slice(-1), + n100 = t0 && s[0].slice(-2); + if (ord) + return n10 == 1 && n100 != 11 + ? 'one' + : n10 == 2 && n100 != 12 + ? 'two' + : n10 == 3 && n100 != 13 + ? 'few' + : 'other'; + return n == 1 && v0 ? 'one' : 'other'; + }, + fields: { + year: { + displayName: 'year', + relative: { 0: 'this year', 1: 'next year', '-1': 'last year' }, + relativeTime: { + future: { one: 'in {0} year', other: 'in {0} years' }, + past: { one: '{0} year ago', other: '{0} years ago' }, + }, + }, + month: { + displayName: 'month', + relative: { 0: 'this month', 1: 'next month', '-1': 'last month' }, + relativeTime: { + future: { one: 'in {0} month', other: 'in {0} months' }, + past: { one: '{0} month ago', other: '{0} months ago' }, + }, + }, + day: { + displayName: 'day', + relative: { 0: 'today', 1: 'tomorrow', '-1': 'yesterday' }, + relativeTime: { + future: { one: 'in {0} day', other: 'in {0} days' }, + past: { one: '{0} day ago', other: '{0} days ago' }, + }, + }, + hour: { + displayName: 'hour', + relativeTime: { + future: { one: 'in {0} hour', other: 'in {0} hours' }, + past: { one: '{0} hour ago', other: '{0} hours ago' }, + }, + }, + minute: { + displayName: 'minute', + relativeTime: { + future: { one: 'in {0} minute', other: 'in {0} minutes' }, + past: { one: '{0} minute ago', other: '{0} minutes ago' }, + }, + }, + second: { + displayName: 'second', + relative: { 0: 'now' }, + relativeTime: { + future: { one: 'in {0} second', other: 'in {0} seconds' }, + past: { one: '{0} second ago', other: '{0} seconds ago' }, + }, + }, + }, + }; + + //# sourceMappingURL=en.js.map + + /***/ + }, + /* 684 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /* +Copyright (c) 2014, Yahoo! Inc. All rights reserved. +Copyrights licensed under the New BSD License. +See the accompanying LICENSE file for terms. +*/ + + /* jslint esnext: true */ + + // Purposely using the same implementation as the Intl.js `Intl` polyfill. + // Copyright 2013 Andy Earnshaw, MIT License + + var hop = Object.prototype.hasOwnProperty; + var toString = Object.prototype.toString; + + var realDefineProp = (function () { + try { + return !!Object.defineProperty({}, 'a', {}); + } catch (e) { + return false; + } + })(); + + var es3 = !realDefineProp && !Object.prototype.__defineGetter__; + + var defineProperty = realDefineProp + ? Object.defineProperty + : function (obj, name, desc) { + if ('get' in desc && obj.__defineGetter__) { + obj.__defineGetter__(name, desc.get); + } else if (!hop.call(obj, name) || 'value' in desc) { + obj[name] = desc.value; + } + }; + + var objCreate = + Object.create || + function (proto, props) { + var obj, k; + + function F() {} + F.prototype = proto; + obj = new F(); + + for (k in props) { + if (hop.call(props, k)) { + defineProperty(obj, k, props[k]); + } + } + + return obj; + }; + + var arrIndexOf = + Array.prototype.indexOf || + function (search, fromIndex) { + /*jshint validthis:true */ + var arr = this; + if (!arr.length) { + return -1; + } + + for (var i = fromIndex || 0, max = arr.length; i < max; i++) { + if (arr[i] === search) { + return i; + } + } + + return -1; + }; + + var isArray = + Array.isArray || + function (obj) { + return toString.call(obj) === '[object Array]'; + }; + + var dateNow = + Date.now || + function () { + return new Date().getTime(); + }; + (exports.defineProperty = defineProperty), + (exports.objCreate = objCreate), + (exports.arrIndexOf = arrIndexOf), + (exports.isArray = isArray), + (exports.dateNow = dateNow); + + //# sourceMappingURL=es5.js.map + + /***/ + }, + /* 685 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /* jslint esnext: true */ + + var src$core$$ = __webpack_require__(681), + src$en$$ = __webpack_require__(683); + + src$core$$['default'].__addLocaleData(src$en$$['default']); + src$core$$['default'].defaultLocale = 'en'; + + exports['default'] = src$core$$['default']; + + //# sourceMappingURL=main.js.map + + /***/ + }, + /* 686 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (global) { + var _typeof = + typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' + ? function (obj) { + return typeof obj; + } + : function (obj) { + return obj && typeof Symbol === 'function' && obj.constructor === Symbol + ? 'symbol' + : typeof obj; + }; + + var jsx = (function () { + var REACT_ELEMENT_TYPE = + (typeof Symbol === 'function' && Symbol.for && Symbol.for('react.element')) || 0xeac7; + return function createRawReactElement(type, props, key, children) { + var defaultProps = type && type.defaultProps; + var childrenLength = arguments.length - 3; + + if (!props && childrenLength !== 0) { + props = {}; + } + + if (props && defaultProps) { + for (var propName in defaultProps) { + if (props[propName] === void 0) { + props[propName] = defaultProps[propName]; + } + } + } else if (!props) { + props = defaultProps || {}; + } + + if (childrenLength === 1) { + props.children = children; + } else if (childrenLength > 1) { + var childArray = Array(childrenLength); + + for (var i = 0; i < childrenLength; i++) { + childArray[i] = arguments[i + 3]; + } + + props.children = childArray; + } + + return { + $$typeof: REACT_ELEMENT_TYPE, + type: type, + key: key === undefined ? null : '' + key, + ref: null, + props: props, + _owner: null, + }; + }; + })(); + + var asyncToGenerator = function (fn) { + return function () { + var gen = fn.apply(this, arguments); + return new Promise(function (resolve, reject) { + function step(key, arg) { + try { + var info = gen[key](arg); + var value = info.value; + } catch (error) { + reject(error); + return; + } + + if (info.done) { + resolve(value); + } else { + return Promise.resolve(value).then( + function (value) { + return step('next', value); + }, + function (err) { + return step('throw', err); + }, + ); + } + } + + return step('next'); + }); + }; + }; + + var classCallCheck = function (instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + }; + + var createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + var defineEnumerableProperties = function (obj, descs) { + for (var key in descs) { + var desc = descs[key]; + desc.configurable = desc.enumerable = true; + if ('value' in desc) desc.writable = true; + Object.defineProperty(obj, key, desc); + } + + return obj; + }; + + var defaults = function (obj, defaults) { + var keys = Object.getOwnPropertyNames(defaults); + + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + var value = Object.getOwnPropertyDescriptor(defaults, key); + + if (value && value.configurable && obj[key] === undefined) { + Object.defineProperty(obj, key, value); + } + } + + return obj; + }; + + var defineProperty$1 = function (obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true, + }); + } else { + obj[key] = value; + } + + return obj; + }; + + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + + return target; + }; + + var get = function get(object, property, receiver) { + if (object === null) object = Function.prototype; + var desc = Object.getOwnPropertyDescriptor(object, property); + + if (desc === undefined) { + var parent = Object.getPrototypeOf(object); + + if (parent === null) { + return undefined; + } else { + return get(parent, property, receiver); + } + } else if ('value' in desc) { + return desc.value; + } else { + var getter = desc.get; + + if (getter === undefined) { + return undefined; + } + + return getter.call(receiver); + } + }; + + var inherits = function (subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError( + 'Super expression must either be null or a function, not ' + typeof superClass, + ); + } + + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true, + }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + }; + + var _instanceof = function (left, right) { + if (right != null && typeof Symbol !== 'undefined' && right[Symbol.hasInstance]) { + return right[Symbol.hasInstance](left); + } else { + return left instanceof right; + } + }; + + var interopRequireDefault = function (obj) { + return obj && obj.__esModule + ? obj + : { + default: obj, + }; + }; + + var interopRequireWildcard = function (obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; + } + } + + newObj.default = obj; + return newObj; + } + }; + + var newArrowCheck = function (innerThis, boundThis) { + if (innerThis !== boundThis) { + throw new TypeError('Cannot instantiate an arrow function'); + } + }; + + var objectDestructuringEmpty = function (obj) { + if (obj == null) throw new TypeError('Cannot destructure undefined'); + }; + + var objectWithoutProperties = function (obj, keys) { + var target = {}; + + for (var i in obj) { + if (keys.indexOf(i) >= 0) continue; + if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; + target[i] = obj[i]; + } + + return target; + }; + + var possibleConstructorReturn = function (self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + }; + + var selfGlobal = typeof global === 'undefined' ? self : global; + + var set = function set(object, property, value, receiver) { + var desc = Object.getOwnPropertyDescriptor(object, property); + + if (desc === undefined) { + var parent = Object.getPrototypeOf(object); + + if (parent !== null) { + set(parent, property, value, receiver); + } + } else if ('value' in desc && desc.writable) { + desc.value = value; + } else { + var setter = desc.set; + + if (setter !== undefined) { + setter.call(receiver, value); + } + } + + return value; + }; + + var slicedToArray = (function () { + function sliceIterator(arr, i) { + var _arr = []; + var _n = true; + var _d = false; + var _e = undefined; + + try { + for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { + _arr.push(_s.value); + + if (i && _arr.length === i) break; + } + } catch (err) { + _d = true; + _e = err; + } finally { + try { + if (!_n && _i['return']) _i['return'](); + } finally { + if (_d) throw _e; + } + } + + return _arr; + } + + return function (arr, i) { + if (Array.isArray(arr)) { + return arr; + } else if (Symbol.iterator in Object(arr)) { + return sliceIterator(arr, i); + } else { + throw new TypeError('Invalid attempt to destructure non-iterable instance'); + } + }; + })(); + + var slicedToArrayLoose = function (arr, i) { + if (Array.isArray(arr)) { + return arr; + } else if (Symbol.iterator in Object(arr)) { + var _arr = []; + + for (var _iterator = arr[Symbol.iterator](), _step; !(_step = _iterator.next()).done; ) { + _arr.push(_step.value); + + if (i && _arr.length === i) break; + } + + return _arr; + } else { + throw new TypeError('Invalid attempt to destructure non-iterable instance'); + } + }; + + var taggedTemplateLiteral = function (strings, raw) { + return Object.freeze( + Object.defineProperties(strings, { + raw: { + value: Object.freeze(raw), + }, + }), + ); + }; + + var taggedTemplateLiteralLoose = function (strings, raw) { + strings.raw = raw; + return strings; + }; + + var temporalRef = function (val, name, undef) { + if (val === undef) { + throw new ReferenceError(name + ' is not defined - temporal dead zone'); + } else { + return val; + } + }; + + var temporalUndefined = {}; + + var toArray = function (arr) { + return Array.isArray(arr) ? arr : Array.from(arr); + }; + + var toConsumableArray = function (arr) { + if (Array.isArray(arr)) { + for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i]; + + return arr2; + } else { + return Array.from(arr); + } + }; + + var babelHelpers$1 = Object.freeze({ + jsx: jsx, + asyncToGenerator: asyncToGenerator, + classCallCheck: classCallCheck, + createClass: createClass, + defineEnumerableProperties: defineEnumerableProperties, + defaults: defaults, + defineProperty: defineProperty$1, + get: get, + inherits: inherits, + interopRequireDefault: interopRequireDefault, + interopRequireWildcard: interopRequireWildcard, + newArrowCheck: newArrowCheck, + objectDestructuringEmpty: objectDestructuringEmpty, + objectWithoutProperties: objectWithoutProperties, + possibleConstructorReturn: possibleConstructorReturn, + selfGlobal: selfGlobal, + set: set, + slicedToArray: slicedToArray, + slicedToArrayLoose: slicedToArrayLoose, + taggedTemplateLiteral: taggedTemplateLiteral, + taggedTemplateLiteralLoose: taggedTemplateLiteralLoose, + temporalRef: temporalRef, + temporalUndefined: temporalUndefined, + toArray: toArray, + toConsumableArray: toConsumableArray, + typeof: _typeof, + extends: _extends, + instanceof: _instanceof, + }); + + var realDefineProp = (function () { + var sentinel = function sentinel() {}; + try { + Object.defineProperty(sentinel, 'a', { + get: function get() { + return 1; + }, + }); + Object.defineProperty(sentinel, 'prototype', { writable: false }); + return sentinel.a === 1 && sentinel.prototype instanceof Object; + } catch (e) { + return false; + } + })(); + + // Need a workaround for getters in ES3 + var es3 = !realDefineProp && !Object.prototype.__defineGetter__; + + // We use this a lot (and need it for proto-less objects) + var hop = Object.prototype.hasOwnProperty; + + // Naive defineProperty for compatibility + var defineProperty = realDefineProp + ? Object.defineProperty + : function (obj, name, desc) { + if ('get' in desc && obj.__defineGetter__) obj.__defineGetter__(name, desc.get); + else if (!hop.call(obj, name) || 'value' in desc) obj[name] = desc.value; + }; + + // Array.prototype.indexOf, as good as we need it to be + var arrIndexOf = + Array.prototype.indexOf || + function (search) { + /*jshint validthis:true */ + var t = this; + if (!t.length) return -1; + + for (var i = arguments[1] || 0, max = t.length; i < max; i++) { + if (t[i] === search) return i; + } + + return -1; + }; + + // Create an object with the specified prototype (2nd arg required for Record) + var objCreate = + Object.create || + function (proto, props) { + var obj = void 0; + + function F() {} + F.prototype = proto; + obj = new F(); + + for (var k in props) { + if (hop.call(props, k)) defineProperty(obj, k, props[k]); + } + + return obj; + }; + + // Snapshot some (hopefully still) native built-ins + var arrSlice = Array.prototype.slice; + var arrConcat = Array.prototype.concat; + var arrPush = Array.prototype.push; + var arrJoin = Array.prototype.join; + var arrShift = Array.prototype.shift; + + // Naive Function.prototype.bind for compatibility + var fnBind = + Function.prototype.bind || + function (thisObj) { + var fn = this, + args = arrSlice.call(arguments, 1); + + // All our (presently) bound functions have either 1 or 0 arguments. By returning + // different function signatures, we can pass some tests in ES3 environments + if (fn.length === 1) { + return function () { + return fn.apply(thisObj, arrConcat.call(args, arrSlice.call(arguments))); + }; + } + return function () { + return fn.apply(thisObj, arrConcat.call(args, arrSlice.call(arguments))); + }; + }; + + // Object housing internal properties for constructors + var internals = objCreate(null); + + // Keep internal properties internal + var secret = Math.random(); + + // Helper functions + // ================ + + /** + * A function to deal with the inaccuracy of calculating log10 in pre-ES6 + * JavaScript environments. Math.log(num) / Math.LN10 was responsible for + * causing issue #62. + */ + function log10Floor(n) { + // ES6 provides the more accurate Math.log10 + if (typeof Math.log10 === 'function') return Math.floor(Math.log10(n)); + + var x = Math.round(Math.log(n) * Math.LOG10E); + return x - (Number('1e' + x) > n); + } + + /** + * A map that doesn't contain Object in its prototype chain + */ + function Record(obj) { + // Copy only own properties over unless this object is already a Record instance + for (var k in obj) { + if (obj instanceof Record || hop.call(obj, k)) + defineProperty(this, k, { + value: obj[k], + enumerable: true, + writable: true, + configurable: true, + }); + } + } + Record.prototype = objCreate(null); + + /** + * An ordered list + */ + function List() { + defineProperty(this, 'length', { writable: true, value: 0 }); + + if (arguments.length) arrPush.apply(this, arrSlice.call(arguments)); + } + List.prototype = objCreate(null); + + /** + * Constructs a regular expression to restore tainted RegExp properties + */ + function createRegExpRestore() { + if (internals.disableRegExpRestore) { + return function () { + /* no-op */ + }; + } + + var regExpCache = { + lastMatch: RegExp.lastMatch || '', + leftContext: RegExp.leftContext, + multiline: RegExp.multiline, + input: RegExp.input, + }, + has = false; + + // Create a snapshot of all the 'captured' properties + for (var i = 1; i <= 9; i++) { + has = (regExpCache['$' + i] = RegExp['$' + i]) || has; + } + return function () { + // Now we've snapshotted some properties, escape the lastMatch string + var esc = /[.?*+^$[\]\\(){}|-]/g, + lm = regExpCache.lastMatch.replace(esc, '\\$&'), + reg = new List(); + + // If any of the captured strings were non-empty, iterate over them all + if (has) { + for (var _i = 1; _i <= 9; _i++) { + var m = regExpCache['$' + _i]; + + // If it's empty, add an empty capturing group + if (!m) lm = '()' + lm; + // Else find the string in lm and escape & wrap it to capture it + else { + m = m.replace(esc, '\\$&'); + lm = lm.replace(m, '(' + m + ')'); + } + + // Push it to the reg and chop lm to make sure further groups come after + arrPush.call(reg, lm.slice(0, lm.indexOf('(') + 1)); + lm = lm.slice(lm.indexOf('(') + 1); + } + } + + var exprStr = arrJoin.call(reg, '') + lm; + + // Shorten the regex by replacing each part of the expression with a match + // for a string of that exact length. This is safe for the type of + // expressions generated above, because the expression matches the whole + // match string, so we know each group and each segment between capturing + // groups can be matched by its length alone. + exprStr = exprStr.replace(/(\\\(|\\\)|[^()])+/g, function (match) { + return '[\\s\\S]{' + match.replace('\\', '').length + '}'; + }); + + // Create the regular expression that will reconstruct the RegExp properties + var expr = new RegExp(exprStr, regExpCache.multiline ? 'gm' : 'g'); + + // Set the lastIndex of the generated expression to ensure that the match + // is found in the correct index. + expr.lastIndex = regExpCache.leftContext.length; + + expr.exec(regExpCache.input); + }; + } + + /** + * Mimics ES5's abstract ToObject() function + */ + function toObject(arg) { + if (arg === null) throw new TypeError('Cannot convert null or undefined to object'); + + if ((typeof arg === 'undefined' ? 'undefined' : babelHelpers$1['typeof'](arg)) === 'object') + return arg; + return Object(arg); + } + + function toNumber(arg) { + if (typeof arg === 'number') return arg; + return Number(arg); + } + + function toInteger(arg) { + var number = toNumber(arg); + if (isNaN(number)) return 0; + if (number === +0 || number === -0 || number === +Infinity || number === -Infinity) return number; + if (number < 0) return Math.floor(Math.abs(number)) * -1; + return Math.floor(Math.abs(number)); + } + + function toLength(arg) { + var len = toInteger(arg); + if (len <= 0) return 0; + if (len === Infinity) return Math.pow(2, 53) - 1; + return Math.min(len, Math.pow(2, 53) - 1); + } + + /** + * Returns "internal" properties for an object + */ + function getInternalProperties(obj) { + if (hop.call(obj, '__getInternalProperties')) return obj.__getInternalProperties(secret); + + return objCreate(null); + } + + /** + * Defines regular expressions for various operations related to the BCP 47 syntax, + * as defined at http://tools.ietf.org/html/bcp47#section-2.1 + */ + + // extlang = 3ALPHA ; selected ISO 639 codes + // *2("-" 3ALPHA) ; permanently reserved + var extlang = '[a-z]{3}(?:-[a-z]{3}){0,2}'; + + // language = 2*3ALPHA ; shortest ISO 639 code + // ["-" extlang] ; sometimes followed by + // ; extended language subtags + // / 4ALPHA ; or reserved for future use + // / 5*8ALPHA ; or registered language subtag + var language = '(?:[a-z]{2,3}(?:-' + extlang + ')?|[a-z]{4}|[a-z]{5,8})'; + + // script = 4ALPHA ; ISO 15924 code + var script = '[a-z]{4}'; + + // region = 2ALPHA ; ISO 3166-1 code + // / 3DIGIT ; UN M.49 code + var region = '(?:[a-z]{2}|\\d{3})'; + + // variant = 5*8alphanum ; registered variants + // / (DIGIT 3alphanum) + var variant = '(?:[a-z0-9]{5,8}|\\d[a-z0-9]{3})'; + + // ; Single alphanumerics + // ; "x" reserved for private use + // singleton = DIGIT ; 0 - 9 + // / %x41-57 ; A - W + // / %x59-5A ; Y - Z + // / %x61-77 ; a - w + // / %x79-7A ; y - z + var singleton = '[0-9a-wy-z]'; + + // extension = singleton 1*("-" (2*8alphanum)) + var extension = singleton + '(?:-[a-z0-9]{2,8})+'; + + // privateuse = "x" 1*("-" (1*8alphanum)) + var privateuse = 'x(?:-[a-z0-9]{1,8})+'; + + // irregular = "en-GB-oed" ; irregular tags do not match + // / "i-ami" ; the 'langtag' production and + // / "i-bnn" ; would not otherwise be + // / "i-default" ; considered 'well-formed' + // / "i-enochian" ; These tags are all valid, + // / "i-hak" ; but most are deprecated + // / "i-klingon" ; in favor of more modern + // / "i-lux" ; subtags or subtag + // / "i-mingo" ; combination + // / "i-navajo" + // / "i-pwn" + // / "i-tao" + // / "i-tay" + // / "i-tsu" + // / "sgn-BE-FR" + // / "sgn-BE-NL" + // / "sgn-CH-DE" + var irregular = + '(?:en-GB-oed' + + '|i-(?:ami|bnn|default|enochian|hak|klingon|lux|mingo|navajo|pwn|tao|tay|tsu)' + + '|sgn-(?:BE-FR|BE-NL|CH-DE))'; + + // regular = "art-lojban" ; these tags match the 'langtag' + // / "cel-gaulish" ; production, but their subtags + // / "no-bok" ; are not extended language + // / "no-nyn" ; or variant subtags: their meaning + // / "zh-guoyu" ; is defined by their registration + // / "zh-hakka" ; and all of these are deprecated + // / "zh-min" ; in favor of a more modern + // / "zh-min-nan" ; subtag or sequence of subtags + // / "zh-xiang" + var regular = '(?:art-lojban|cel-gaulish|no-bok|no-nyn' + '|zh-(?:guoyu|hakka|min|min-nan|xiang))'; + + // grandfathered = irregular ; non-redundant tags registered + // / regular ; during the RFC 3066 era + var grandfathered = '(?:' + irregular + '|' + regular + ')'; + + // langtag = language + // ["-" script] + // ["-" region] + // *("-" variant) + // *("-" extension) + // ["-" privateuse] + var langtag = + language + + '(?:-' + + script + + ')?(?:-' + + region + + ')?(?:-' + + variant + + ')*(?:-' + + extension + + ')*(?:-' + + privateuse + + ')?'; + + // Language-Tag = langtag ; normal language tags + // / privateuse ; private use tag + // / grandfathered ; grandfathered tags + var expBCP47Syntax = RegExp('^(?:' + langtag + '|' + privateuse + '|' + grandfathered + ')$', 'i'); + + // Match duplicate variants in a language tag + var expVariantDupes = RegExp('^(?!x).*?-(' + variant + ')-(?:\\w{4,8}-(?!x-))*\\1\\b', 'i'); + + // Match duplicate singletons in a language tag (except in private use) + var expSingletonDupes = RegExp('^(?!x).*?-(' + singleton + ')-(?:\\w+-(?!x-))*\\1\\b', 'i'); + + // Match all extension sequences + var expExtSequences = RegExp('-' + extension, 'ig'); + + // Default locale is the first-added locale data for us + var defaultLocale = void 0; + function setDefaultLocale(locale) { + defaultLocale = locale; + } + + // IANA Subtag Registry redundant tag and subtag maps + var redundantTags = { + tags: { + 'art-lojban': 'jbo', + 'i-ami': 'ami', + 'i-bnn': 'bnn', + 'i-hak': 'hak', + 'i-klingon': 'tlh', + 'i-lux': 'lb', + 'i-navajo': 'nv', + 'i-pwn': 'pwn', + 'i-tao': 'tao', + 'i-tay': 'tay', + 'i-tsu': 'tsu', + 'no-bok': 'nb', + 'no-nyn': 'nn', + 'sgn-BE-FR': 'sfb', + 'sgn-BE-NL': 'vgt', + 'sgn-CH-DE': 'sgg', + 'zh-guoyu': 'cmn', + 'zh-hakka': 'hak', + 'zh-min-nan': 'nan', + 'zh-xiang': 'hsn', + 'sgn-BR': 'bzs', + 'sgn-CO': 'csn', + 'sgn-DE': 'gsg', + 'sgn-DK': 'dsl', + 'sgn-ES': 'ssp', + 'sgn-FR': 'fsl', + 'sgn-GB': 'bfi', + 'sgn-GR': 'gss', + 'sgn-IE': 'isg', + 'sgn-IT': 'ise', + 'sgn-JP': 'jsl', + 'sgn-MX': 'mfs', + 'sgn-NI': 'ncs', + 'sgn-NL': 'dse', + 'sgn-NO': 'nsl', + 'sgn-PT': 'psr', + 'sgn-SE': 'swl', + 'sgn-US': 'ase', + 'sgn-ZA': 'sfs', + 'zh-cmn': 'cmn', + 'zh-cmn-Hans': 'cmn-Hans', + 'zh-cmn-Hant': 'cmn-Hant', + 'zh-gan': 'gan', + 'zh-wuu': 'wuu', + 'zh-yue': 'yue', + }, + subtags: { + BU: 'MM', + DD: 'DE', + FX: 'FR', + TP: 'TL', + YD: 'YE', + ZR: 'CD', + heploc: 'alalc97', + in: 'id', + iw: 'he', + ji: 'yi', + jw: 'jv', + mo: 'ro', + ayx: 'nun', + bjd: 'drl', + ccq: 'rki', + cjr: 'mom', + cka: 'cmr', + cmk: 'xch', + drh: 'khk', + drw: 'prs', + gav: 'dev', + hrr: 'jal', + ibi: 'opa', + kgh: 'kml', + lcq: 'ppr', + mst: 'mry', + myt: 'mry', + sca: 'hle', + tie: 'ras', + tkk: 'twm', + tlw: 'weo', + tnf: 'prs', + ybd: 'rki', + yma: 'lrr', + }, + extLang: { + aao: ['aao', 'ar'], + abh: ['abh', 'ar'], + abv: ['abv', 'ar'], + acm: ['acm', 'ar'], + acq: ['acq', 'ar'], + acw: ['acw', 'ar'], + acx: ['acx', 'ar'], + acy: ['acy', 'ar'], + adf: ['adf', 'ar'], + ads: ['ads', 'sgn'], + aeb: ['aeb', 'ar'], + aec: ['aec', 'ar'], + aed: ['aed', 'sgn'], + aen: ['aen', 'sgn'], + afb: ['afb', 'ar'], + afg: ['afg', 'sgn'], + ajp: ['ajp', 'ar'], + apc: ['apc', 'ar'], + apd: ['apd', 'ar'], + arb: ['arb', 'ar'], + arq: ['arq', 'ar'], + ars: ['ars', 'ar'], + ary: ['ary', 'ar'], + arz: ['arz', 'ar'], + ase: ['ase', 'sgn'], + asf: ['asf', 'sgn'], + asp: ['asp', 'sgn'], + asq: ['asq', 'sgn'], + asw: ['asw', 'sgn'], + auz: ['auz', 'ar'], + avl: ['avl', 'ar'], + ayh: ['ayh', 'ar'], + ayl: ['ayl', 'ar'], + ayn: ['ayn', 'ar'], + ayp: ['ayp', 'ar'], + bbz: ['bbz', 'ar'], + bfi: ['bfi', 'sgn'], + bfk: ['bfk', 'sgn'], + bjn: ['bjn', 'ms'], + bog: ['bog', 'sgn'], + bqn: ['bqn', 'sgn'], + bqy: ['bqy', 'sgn'], + btj: ['btj', 'ms'], + bve: ['bve', 'ms'], + bvl: ['bvl', 'sgn'], + bvu: ['bvu', 'ms'], + bzs: ['bzs', 'sgn'], + cdo: ['cdo', 'zh'], + cds: ['cds', 'sgn'], + cjy: ['cjy', 'zh'], + cmn: ['cmn', 'zh'], + coa: ['coa', 'ms'], + cpx: ['cpx', 'zh'], + csc: ['csc', 'sgn'], + csd: ['csd', 'sgn'], + cse: ['cse', 'sgn'], + csf: ['csf', 'sgn'], + csg: ['csg', 'sgn'], + csl: ['csl', 'sgn'], + csn: ['csn', 'sgn'], + csq: ['csq', 'sgn'], + csr: ['csr', 'sgn'], + czh: ['czh', 'zh'], + czo: ['czo', 'zh'], + doq: ['doq', 'sgn'], + dse: ['dse', 'sgn'], + dsl: ['dsl', 'sgn'], + dup: ['dup', 'ms'], + ecs: ['ecs', 'sgn'], + esl: ['esl', 'sgn'], + esn: ['esn', 'sgn'], + eso: ['eso', 'sgn'], + eth: ['eth', 'sgn'], + fcs: ['fcs', 'sgn'], + fse: ['fse', 'sgn'], + fsl: ['fsl', 'sgn'], + fss: ['fss', 'sgn'], + gan: ['gan', 'zh'], + gds: ['gds', 'sgn'], + gom: ['gom', 'kok'], + gse: ['gse', 'sgn'], + gsg: ['gsg', 'sgn'], + gsm: ['gsm', 'sgn'], + gss: ['gss', 'sgn'], + gus: ['gus', 'sgn'], + hab: ['hab', 'sgn'], + haf: ['haf', 'sgn'], + hak: ['hak', 'zh'], + hds: ['hds', 'sgn'], + hji: ['hji', 'ms'], + hks: ['hks', 'sgn'], + hos: ['hos', 'sgn'], + hps: ['hps', 'sgn'], + hsh: ['hsh', 'sgn'], + hsl: ['hsl', 'sgn'], + hsn: ['hsn', 'zh'], + icl: ['icl', 'sgn'], + ils: ['ils', 'sgn'], + inl: ['inl', 'sgn'], + ins: ['ins', 'sgn'], + ise: ['ise', 'sgn'], + isg: ['isg', 'sgn'], + isr: ['isr', 'sgn'], + jak: ['jak', 'ms'], + jax: ['jax', 'ms'], + jcs: ['jcs', 'sgn'], + jhs: ['jhs', 'sgn'], + jls: ['jls', 'sgn'], + jos: ['jos', 'sgn'], + jsl: ['jsl', 'sgn'], + jus: ['jus', 'sgn'], + kgi: ['kgi', 'sgn'], + knn: ['knn', 'kok'], + kvb: ['kvb', 'ms'], + kvk: ['kvk', 'sgn'], + kvr: ['kvr', 'ms'], + kxd: ['kxd', 'ms'], + lbs: ['lbs', 'sgn'], + lce: ['lce', 'ms'], + lcf: ['lcf', 'ms'], + liw: ['liw', 'ms'], + lls: ['lls', 'sgn'], + lsg: ['lsg', 'sgn'], + lsl: ['lsl', 'sgn'], + lso: ['lso', 'sgn'], + lsp: ['lsp', 'sgn'], + lst: ['lst', 'sgn'], + lsy: ['lsy', 'sgn'], + ltg: ['ltg', 'lv'], + lvs: ['lvs', 'lv'], + lzh: ['lzh', 'zh'], + max: ['max', 'ms'], + mdl: ['mdl', 'sgn'], + meo: ['meo', 'ms'], + mfa: ['mfa', 'ms'], + mfb: ['mfb', 'ms'], + mfs: ['mfs', 'sgn'], + min: ['min', 'ms'], + mnp: ['mnp', 'zh'], + mqg: ['mqg', 'ms'], + mre: ['mre', 'sgn'], + msd: ['msd', 'sgn'], + msi: ['msi', 'ms'], + msr: ['msr', 'sgn'], + mui: ['mui', 'ms'], + mzc: ['mzc', 'sgn'], + mzg: ['mzg', 'sgn'], + mzy: ['mzy', 'sgn'], + nan: ['nan', 'zh'], + nbs: ['nbs', 'sgn'], + ncs: ['ncs', 'sgn'], + nsi: ['nsi', 'sgn'], + nsl: ['nsl', 'sgn'], + nsp: ['nsp', 'sgn'], + nsr: ['nsr', 'sgn'], + nzs: ['nzs', 'sgn'], + okl: ['okl', 'sgn'], + orn: ['orn', 'ms'], + ors: ['ors', 'ms'], + pel: ['pel', 'ms'], + pga: ['pga', 'ar'], + pks: ['pks', 'sgn'], + prl: ['prl', 'sgn'], + prz: ['prz', 'sgn'], + psc: ['psc', 'sgn'], + psd: ['psd', 'sgn'], + pse: ['pse', 'ms'], + psg: ['psg', 'sgn'], + psl: ['psl', 'sgn'], + pso: ['pso', 'sgn'], + psp: ['psp', 'sgn'], + psr: ['psr', 'sgn'], + pys: ['pys', 'sgn'], + rms: ['rms', 'sgn'], + rsi: ['rsi', 'sgn'], + rsl: ['rsl', 'sgn'], + sdl: ['sdl', 'sgn'], + sfb: ['sfb', 'sgn'], + sfs: ['sfs', 'sgn'], + sgg: ['sgg', 'sgn'], + sgx: ['sgx', 'sgn'], + shu: ['shu', 'ar'], + slf: ['slf', 'sgn'], + sls: ['sls', 'sgn'], + sqk: ['sqk', 'sgn'], + sqs: ['sqs', 'sgn'], + ssh: ['ssh', 'ar'], + ssp: ['ssp', 'sgn'], + ssr: ['ssr', 'sgn'], + svk: ['svk', 'sgn'], + swc: ['swc', 'sw'], + swh: ['swh', 'sw'], + swl: ['swl', 'sgn'], + syy: ['syy', 'sgn'], + tmw: ['tmw', 'ms'], + tse: ['tse', 'sgn'], + tsm: ['tsm', 'sgn'], + tsq: ['tsq', 'sgn'], + tss: ['tss', 'sgn'], + tsy: ['tsy', 'sgn'], + tza: ['tza', 'sgn'], + ugn: ['ugn', 'sgn'], + ugy: ['ugy', 'sgn'], + ukl: ['ukl', 'sgn'], + uks: ['uks', 'sgn'], + urk: ['urk', 'ms'], + uzn: ['uzn', 'uz'], + uzs: ['uzs', 'uz'], + vgt: ['vgt', 'sgn'], + vkk: ['vkk', 'ms'], + vkt: ['vkt', 'ms'], + vsi: ['vsi', 'sgn'], + vsl: ['vsl', 'sgn'], + vsv: ['vsv', 'sgn'], + wuu: ['wuu', 'zh'], + xki: ['xki', 'sgn'], + xml: ['xml', 'sgn'], + xmm: ['xmm', 'ms'], + xms: ['xms', 'sgn'], + yds: ['yds', 'sgn'], + ysl: ['ysl', 'sgn'], + yue: ['yue', 'zh'], + zib: ['zib', 'sgn'], + zlm: ['zlm', 'ms'], + zmi: ['zmi', 'ms'], + zsl: ['zsl', 'sgn'], + zsm: ['zsm', 'ms'], + }, + }; + + /** + * Convert only a-z to uppercase as per section 6.1 of the spec + */ + function toLatinUpperCase(str) { + var i = str.length; + + while (i--) { + var ch = str.charAt(i); + + if (ch >= 'a' && ch <= 'z') str = str.slice(0, i) + ch.toUpperCase() + str.slice(i + 1); + } + + return str; + } + + /** + * The IsStructurallyValidLanguageTag abstract operation verifies that the locale + * argument (which must be a String value) + * + * - represents a well-formed BCP 47 language tag as specified in RFC 5646 section + * 2.1, or successor, + * - does not include duplicate variant subtags, and + * - does not include duplicate singleton subtags. + * + * The abstract operation returns true if locale can be generated from the ABNF + * grammar in section 2.1 of the RFC, starting with Language-Tag, and does not + * contain duplicate variant or singleton subtags (other than as a private use + * subtag). It returns false otherwise. Terminal value characters in the grammar are + * interpreted as the Unicode equivalents of the ASCII octet values given. + */ + function /* 6.2.2 */ IsStructurallyValidLanguageTag(locale) { + // represents a well-formed BCP 47 language tag as specified in RFC 5646 + if (!expBCP47Syntax.test(locale)) return false; + + // does not include duplicate variant subtags, and + if (expVariantDupes.test(locale)) return false; + + // does not include duplicate singleton subtags. + if (expSingletonDupes.test(locale)) return false; + + return true; + } + + /** + * The CanonicalizeLanguageTag abstract operation returns the canonical and case- + * regularized form of the locale argument (which must be a String value that is + * a structurally valid BCP 47 language tag as verified by the + * IsStructurallyValidLanguageTag abstract operation). It takes the steps + * specified in RFC 5646 section 4.5, or successor, to bring the language tag + * into canonical form, and to regularize the case of the subtags, but does not + * take the steps to bring a language tag into “extlang form” and to reorder + * variant subtags. + + * The specifications for extensions to BCP 47 language tags, such as RFC 6067, + * may include canonicalization rules for the extension subtag sequences they + * define that go beyond the canonicalization rules of RFC 5646 section 4.5. + * Implementations are allowed, but not required, to apply these additional rules. + */ + function /* 6.2.3 */ CanonicalizeLanguageTag(locale) { + var match = void 0, + parts = void 0; + + // A language tag is in 'canonical form' when the tag is well-formed + // according to the rules in Sections 2.1 and 2.2 + + // Section 2.1 says all subtags use lowercase... + locale = locale.toLowerCase(); + + // ...with 2 exceptions: 'two-letter and four-letter subtags that neither + // appear at the start of the tag nor occur after singletons. Such two-letter + // subtags are all uppercase (as in the tags "en-CA-x-ca" or "sgn-BE-FR") and + // four-letter subtags are titlecase (as in the tag "az-Latn-x-latn"). + parts = locale.split('-'); + for (var i = 1, max = parts.length; i < max; i++) { + // Two-letter subtags are all uppercase + if (parts[i].length === 2) parts[i] = parts[i].toUpperCase(); + // Four-letter subtags are titlecase + else if (parts[i].length === 4) parts[i] = parts[i].charAt(0).toUpperCase() + parts[i].slice(1); + // Is it a singleton? + else if (parts[i].length === 1 && parts[i] !== 'x') break; + } + locale = arrJoin.call(parts, '-'); + + // The steps laid out in RFC 5646 section 4.5 are as follows: + + // 1. Extension sequences are ordered into case-insensitive ASCII order + // by singleton subtag. + if ((match = locale.match(expExtSequences)) && match.length > 1) { + // The built-in sort() sorts by ASCII order, so use that + match.sort(); + + // Replace all extensions with the joined, sorted array + locale = locale.replace( + RegExp('(?:' + expExtSequences.source + ')+', 'i'), + arrJoin.call(match, ''), + ); + } + + // 2. Redundant or grandfathered tags are replaced by their 'Preferred- + // Value', if there is one. + if (hop.call(redundantTags.tags, locale)) locale = redundantTags.tags[locale]; + + // 3. Subtags are replaced by their 'Preferred-Value', if there is one. + // For extlangs, the original primary language subtag is also + // replaced if there is a primary language subtag in the 'Preferred- + // Value'. + parts = locale.split('-'); + + for (var _i = 1, _max = parts.length; _i < _max; _i++) { + if (hop.call(redundantTags.subtags, parts[_i])) parts[_i] = redundantTags.subtags[parts[_i]]; + else if (hop.call(redundantTags.extLang, parts[_i])) { + parts[_i] = redundantTags.extLang[parts[_i]][0]; + + // For extlang tags, the prefix needs to be removed if it is redundant + if (_i === 1 && redundantTags.extLang[parts[1]][1] === parts[0]) { + parts = arrSlice.call(parts, _i++); + _max -= 1; + } + } + } + + return arrJoin.call(parts, '-'); + } + + /** + * The DefaultLocale abstract operation returns a String value representing the + * structurally valid (6.2.2) and canonicalized (6.2.3) BCP 47 language tag for the + * host environment’s current locale. + */ + function /* 6.2.4 */ DefaultLocale() { + return defaultLocale; + } + + // Sect 6.3 Currency Codes + // ======================= + + var expCurrencyCode = /^[A-Z]{3}$/; + + /** + * The IsWellFormedCurrencyCode abstract operation verifies that the currency argument + * (after conversion to a String value) represents a well-formed 3-letter ISO currency + * code. The following steps are taken: + */ + function /* 6.3.1 */ IsWellFormedCurrencyCode(currency) { + // 1. Let `c` be ToString(currency) + var c = String(currency); + + // 2. Let `normalized` be the result of mapping c to upper case as described + // in 6.1. + var normalized = toLatinUpperCase(c); + + // 3. If the string length of normalized is not 3, return false. + // 4. If normalized contains any character that is not in the range "A" to "Z" + // (U+0041 to U+005A), return false. + if (expCurrencyCode.test(normalized) === false) return false; + + // 5. Return true + return true; + } + + var expUnicodeExSeq = /-u(?:-[0-9a-z]{2,8})+/gi; // See `extension` below + + function /* 9.2.1 */ CanonicalizeLocaleList(locales) { + // The abstract operation CanonicalizeLocaleList takes the following steps: + + // 1. If locales is undefined, then a. Return a new empty List + if (locales === undefined) return new List(); + + // 2. Let seen be a new empty List. + var seen = new List(); + + // 3. If locales is a String value, then + // a. Let locales be a new array created as if by the expression new + // Array(locales) where Array is the standard built-in constructor with + // that name and locales is the value of locales. + locales = typeof locales === 'string' ? [locales] : locales; + + // 4. Let O be ToObject(locales). + var O = toObject(locales); + + // 5. Let lenValue be the result of calling the [[Get]] internal method of + // O with the argument "length". + // 6. Let len be ToUint32(lenValue). + var len = toLength(O.length); + + // 7. Let k be 0. + var k = 0; + + // 8. Repeat, while k < len + while (k < len) { + // a. Let Pk be ToString(k). + var Pk = String(k); + + // b. Let kPresent be the result of calling the [[HasProperty]] internal + // method of O with argument Pk. + var kPresent = Pk in O; + + // c. If kPresent is true, then + if (kPresent) { + // i. Let kValue be the result of calling the [[Get]] internal + // method of O with argument Pk. + var kValue = O[Pk]; + + // ii. If the type of kValue is not String or Object, then throw a + // TypeError exception. + if ( + kValue === null || + (typeof kValue !== 'string' && + (typeof kValue === 'undefined' ? 'undefined' : babelHelpers$1['typeof'](kValue)) !== + 'object') + ) + throw new TypeError('String or Object type expected'); + + // iii. Let tag be ToString(kValue). + var tag = String(kValue); + + // iv. If the result of calling the abstract operation + // IsStructurallyValidLanguageTag (defined in 6.2.2), passing tag as + // the argument, is false, then throw a RangeError exception. + if (!IsStructurallyValidLanguageTag(tag)) + throw new RangeError("'" + tag + "' is not a structurally valid language tag"); + + // v. Let tag be the result of calling the abstract operation + // CanonicalizeLanguageTag (defined in 6.2.3), passing tag as the + // argument. + tag = CanonicalizeLanguageTag(tag); + + // vi. If tag is not an element of seen, then append tag as the last + // element of seen. + if (arrIndexOf.call(seen, tag) === -1) arrPush.call(seen, tag); + } + + // d. Increase k by 1. + k++; + } + + // 9. Return seen. + return seen; + } + + /** + * The BestAvailableLocale abstract operation compares the provided argument + * locale, which must be a String value with a structurally valid and + * canonicalized BCP 47 language tag, against the locales in availableLocales and + * returns either the longest non-empty prefix of locale that is an element of + * availableLocales, or undefined if there is no such element. It uses the + * fallback mechanism of RFC 4647, section 3.4. The following steps are taken: + */ + function /* 9.2.2 */ BestAvailableLocale(availableLocales, locale) { + // 1. Let candidate be locale + var candidate = locale; + + // 2. Repeat + while (candidate) { + // a. If availableLocales contains an element equal to candidate, then return + // candidate. + if (arrIndexOf.call(availableLocales, candidate) > -1) return candidate; + + // b. Let pos be the character index of the last occurrence of "-" + // (U+002D) within candidate. If that character does not occur, return + // undefined. + var pos = candidate.lastIndexOf('-'); + + if (pos < 0) return; + + // c. If pos ≥ 2 and the character "-" occurs at index pos-2 of candidate, + // then decrease pos by 2. + if (pos >= 2 && candidate.charAt(pos - 2) === '-') pos -= 2; + + // d. Let candidate be the substring of candidate from position 0, inclusive, + // to position pos, exclusive. + candidate = candidate.substring(0, pos); + } + } + + /** + * The LookupMatcher abstract operation compares requestedLocales, which must be + * a List as returned by CanonicalizeLocaleList, against the locales in + * availableLocales and determines the best available language to meet the + * request. The following steps are taken: + */ + function /* 9.2.3 */ LookupMatcher(availableLocales, requestedLocales) { + // 1. Let i be 0. + var i = 0; + + // 2. Let len be the number of elements in requestedLocales. + var len = requestedLocales.length; + + // 3. Let availableLocale be undefined. + var availableLocale = void 0; + + var locale = void 0, + noExtensionsLocale = void 0; + + // 4. Repeat while i < len and availableLocale is undefined: + while (i < len && !availableLocale) { + // a. Let locale be the element of requestedLocales at 0-origined list + // position i. + locale = requestedLocales[i]; + + // b. Let noExtensionsLocale be the String value that is locale with all + // Unicode locale extension sequences removed. + noExtensionsLocale = String(locale).replace(expUnicodeExSeq, ''); + + // c. Let availableLocale be the result of calling the + // BestAvailableLocale abstract operation (defined in 9.2.2) with + // arguments availableLocales and noExtensionsLocale. + availableLocale = BestAvailableLocale(availableLocales, noExtensionsLocale); + + // d. Increase i by 1. + i++; + } + + // 5. Let result be a new Record. + var result = new Record(); + + // 6. If availableLocale is not undefined, then + if (availableLocale !== undefined) { + // a. Set result.[[locale]] to availableLocale. + result['[[locale]]'] = availableLocale; + + // b. If locale and noExtensionsLocale are not the same String value, then + if (String(locale) !== String(noExtensionsLocale)) { + // i. Let extension be the String value consisting of the first + // substring of locale that is a Unicode locale extension sequence. + var extension = locale.match(expUnicodeExSeq)[0]; + + // ii. Let extensionIndex be the character position of the initial + // "-" of the first Unicode locale extension sequence within locale. + var extensionIndex = locale.indexOf('-u-'); + + // iii. Set result.[[extension]] to extension. + result['[[extension]]'] = extension; + + // iv. Set result.[[extensionIndex]] to extensionIndex. + result['[[extensionIndex]]'] = extensionIndex; + } + } + // 7. Else + else + // a. Set result.[[locale]] to the value returned by the DefaultLocale abstract + // operation (defined in 6.2.4). + result['[[locale]]'] = DefaultLocale(); + + // 8. Return result + return result; + } + + /** + * The BestFitMatcher abstract operation compares requestedLocales, which must be + * a List as returned by CanonicalizeLocaleList, against the locales in + * availableLocales and determines the best available language to meet the + * request. The algorithm is implementation dependent, but should produce results + * that a typical user of the requested locales would perceive as at least as + * good as those produced by the LookupMatcher abstract operation. Options + * specified through Unicode locale extension sequences must be ignored by the + * algorithm. Information about such subsequences is returned separately. + * The abstract operation returns a record with a [[locale]] field, whose value + * is the language tag of the selected locale, which must be an element of + * availableLocales. If the language tag of the request locale that led to the + * selected locale contained a Unicode locale extension sequence, then the + * returned record also contains an [[extension]] field whose value is the first + * Unicode locale extension sequence, and an [[extensionIndex]] field whose value + * is the index of the first Unicode locale extension sequence within the request + * locale language tag. + */ + function /* 9.2.4 */ BestFitMatcher(availableLocales, requestedLocales) { + return LookupMatcher(availableLocales, requestedLocales); + } + + /** + * The ResolveLocale abstract operation compares a BCP 47 language priority list + * requestedLocales against the locales in availableLocales and determines the + * best available language to meet the request. availableLocales and + * requestedLocales must be provided as List values, options as a Record. + */ + function /* 9.2.5 */ ResolveLocale( + availableLocales, + requestedLocales, + options, + relevantExtensionKeys, + localeData, + ) { + if (availableLocales.length === 0) { + throw new ReferenceError('No locale data has been provided for this object yet.'); + } + + // The following steps are taken: + // 1. Let matcher be the value of options.[[localeMatcher]]. + var matcher = options['[[localeMatcher]]']; + + var r = void 0; + + // 2. If matcher is "lookup", then + if (matcher === 'lookup') + // a. Let r be the result of calling the LookupMatcher abstract operation + // (defined in 9.2.3) with arguments availableLocales and + // requestedLocales. + r = LookupMatcher(availableLocales, requestedLocales); + // 3. Else + else + // a. Let r be the result of calling the BestFitMatcher abstract + // operation (defined in 9.2.4) with arguments availableLocales and + // requestedLocales. + r = BestFitMatcher(availableLocales, requestedLocales); + + // 4. Let foundLocale be the value of r.[[locale]]. + var foundLocale = r['[[locale]]']; + + var extensionSubtags = void 0, + extensionSubtagsLength = void 0; + + // 5. If r has an [[extension]] field, then + if (hop.call(r, '[[extension]]')) { + // a. Let extension be the value of r.[[extension]]. + var extension = r['[[extension]]']; + // b. Let split be the standard built-in function object defined in ES5, + // 15.5.4.14. + var split = String.prototype.split; + // c. Let extensionSubtags be the result of calling the [[Call]] internal + // method of split with extension as the this value and an argument + // list containing the single item "-". + extensionSubtags = split.call(extension, '-'); + // d. Let extensionSubtagsLength be the result of calling the [[Get]] + // internal method of extensionSubtags with argument "length". + extensionSubtagsLength = extensionSubtags.length; + } + + // 6. Let result be a new Record. + var result = new Record(); + + // 7. Set result.[[dataLocale]] to foundLocale. + result['[[dataLocale]]'] = foundLocale; + + // 8. Let supportedExtension be "-u". + var supportedExtension = '-u'; + // 9. Let i be 0. + var i = 0; + // 10. Let len be the result of calling the [[Get]] internal method of + // relevantExtensionKeys with argument "length". + var len = relevantExtensionKeys.length; + + // 11 Repeat while i < len: + while (i < len) { + // a. Let key be the result of calling the [[Get]] internal method of + // relevantExtensionKeys with argument ToString(i). + var key = relevantExtensionKeys[i]; + // b. Let foundLocaleData be the result of calling the [[Get]] internal + // method of localeData with the argument foundLocale. + var foundLocaleData = localeData[foundLocale]; + // c. Let keyLocaleData be the result of calling the [[Get]] internal + // method of foundLocaleData with the argument key. + var keyLocaleData = foundLocaleData[key]; + // d. Let value be the result of calling the [[Get]] internal method of + // keyLocaleData with argument "0". + var value = keyLocaleData['0']; + // e. Let supportedExtensionAddition be "". + var supportedExtensionAddition = ''; + // f. Let indexOf be the standard built-in function object defined in + // ES5, 15.4.4.14. + var indexOf = arrIndexOf; + + // g. If extensionSubtags is not undefined, then + if (extensionSubtags !== undefined) { + // i. Let keyPos be the result of calling the [[Call]] internal + // method of indexOf with extensionSubtags as the this value and + // an argument list containing the single item key. + var keyPos = indexOf.call(extensionSubtags, key); + + // ii. If keyPos ≠ -1, then + if (keyPos !== -1) { + // 1. If keyPos + 1 < extensionSubtagsLength and the length of the + // result of calling the [[Get]] internal method of + // extensionSubtags with argument ToString(keyPos +1) is greater + // than 2, then + if (keyPos + 1 < extensionSubtagsLength && extensionSubtags[keyPos + 1].length > 2) { + // a. Let requestedValue be the result of calling the [[Get]] + // internal method of extensionSubtags with argument + // ToString(keyPos + 1). + var requestedValue = extensionSubtags[keyPos + 1]; + // b. Let valuePos be the result of calling the [[Call]] + // internal method of indexOf with keyLocaleData as the + // this value and an argument list containing the single + // item requestedValue. + var valuePos = indexOf.call(keyLocaleData, requestedValue); + + // c. If valuePos ≠ -1, then + if (valuePos !== -1) { + // i. Let value be requestedValue. + (value = requestedValue), + // ii. Let supportedExtensionAddition be the + // concatenation of "-", key, "-", and value. + (supportedExtensionAddition = '-' + key + '-' + value); + } + } + // 2. Else + else { + // a. Let valuePos be the result of calling the [[Call]] + // internal method of indexOf with keyLocaleData as the this + // value and an argument list containing the single item + // "true". + var _valuePos = indexOf(keyLocaleData, 'true'); + + // b. If valuePos ≠ -1, then + if (_valuePos !== -1) + // i. Let value be "true". + value = 'true'; + } + } + } + // h. If options has a field [[<key>]], then + if (hop.call(options, '[[' + key + ']]')) { + // i. Let optionsValue be the value of options.[[<key>]]. + var optionsValue = options['[[' + key + ']]']; + + // ii. If the result of calling the [[Call]] internal method of indexOf + // with keyLocaleData as the this value and an argument list + // containing the single item optionsValue is not -1, then + if (indexOf.call(keyLocaleData, optionsValue) !== -1) { + // 1. If optionsValue is not equal to value, then + if (optionsValue !== value) { + // a. Let value be optionsValue. + value = optionsValue; + // b. Let supportedExtensionAddition be "". + supportedExtensionAddition = ''; + } + } + } + // i. Set result.[[<key>]] to value. + result['[[' + key + ']]'] = value; + + // j. Append supportedExtensionAddition to supportedExtension. + supportedExtension += supportedExtensionAddition; + + // k. Increase i by 1. + i++; + } + // 12. If the length of supportedExtension is greater than 2, then + if (supportedExtension.length > 2) { + // a. + var privateIndex = foundLocale.indexOf('-x-'); + // b. + if (privateIndex === -1) { + // i. + foundLocale = foundLocale + supportedExtension; + } + // c. + else { + // i. + var preExtension = foundLocale.substring(0, privateIndex); + // ii. + var postExtension = foundLocale.substring(privateIndex); + // iii. + foundLocale = preExtension + supportedExtension + postExtension; + } + // d. asserting - skipping + // e. + foundLocale = CanonicalizeLanguageTag(foundLocale); + } + // 13. Set result.[[locale]] to foundLocale. + result['[[locale]]'] = foundLocale; + + // 14. Return result. + return result; + } + + /** + * The LookupSupportedLocales abstract operation returns the subset of the + * provided BCP 47 language priority list requestedLocales for which + * availableLocales has a matching locale when using the BCP 47 Lookup algorithm. + * Locales appear in the same order in the returned list as in requestedLocales. + * The following steps are taken: + */ + function /* 9.2.6 */ LookupSupportedLocales(availableLocales, requestedLocales) { + // 1. Let len be the number of elements in requestedLocales. + var len = requestedLocales.length; + // 2. Let subset be a new empty List. + var subset = new List(); + // 3. Let k be 0. + var k = 0; + + // 4. Repeat while k < len + while (k < len) { + // a. Let locale be the element of requestedLocales at 0-origined list + // position k. + var locale = requestedLocales[k]; + // b. Let noExtensionsLocale be the String value that is locale with all + // Unicode locale extension sequences removed. + var noExtensionsLocale = String(locale).replace(expUnicodeExSeq, ''); + // c. Let availableLocale be the result of calling the + // BestAvailableLocale abstract operation (defined in 9.2.2) with + // arguments availableLocales and noExtensionsLocale. + var availableLocale = BestAvailableLocale(availableLocales, noExtensionsLocale); + + // d. If availableLocale is not undefined, then append locale to the end of + // subset. + if (availableLocale !== undefined) arrPush.call(subset, locale); + + // e. Increment k by 1. + k++; + } + + // 5. Let subsetArray be a new Array object whose elements are the same + // values in the same order as the elements of subset. + var subsetArray = arrSlice.call(subset); + + // 6. Return subsetArray. + return subsetArray; + } + + /** + * The BestFitSupportedLocales abstract operation returns the subset of the + * provided BCP 47 language priority list requestedLocales for which + * availableLocales has a matching locale when using the Best Fit Matcher + * algorithm. Locales appear in the same order in the returned list as in + * requestedLocales. The steps taken are implementation dependent. + */ + function /*9.2.7 */ BestFitSupportedLocales(availableLocales, requestedLocales) { + // ###TODO: implement this function as described by the specification### + return LookupSupportedLocales(availableLocales, requestedLocales); + } + + /** + * The SupportedLocales abstract operation returns the subset of the provided BCP + * 47 language priority list requestedLocales for which availableLocales has a + * matching locale. Two algorithms are available to match the locales: the Lookup + * algorithm described in RFC 4647 section 3.4, and an implementation dependent + * best-fit algorithm. Locales appear in the same order in the returned list as + * in requestedLocales. The following steps are taken: + */ + function /*9.2.8 */ SupportedLocales(availableLocales, requestedLocales, options) { + var matcher = void 0, + subset = void 0; + + // 1. If options is not undefined, then + if (options !== undefined) { + // a. Let options be ToObject(options). + options = new Record(toObject(options)); + // b. Let matcher be the result of calling the [[Get]] internal method of + // options with argument "localeMatcher". + matcher = options.localeMatcher; + + // c. If matcher is not undefined, then + if (matcher !== undefined) { + // i. Let matcher be ToString(matcher). + matcher = String(matcher); + + // ii. If matcher is not "lookup" or "best fit", then throw a RangeError + // exception. + if (matcher !== 'lookup' && matcher !== 'best fit') + throw new RangeError('matcher should be "lookup" or "best fit"'); + } + } + // 2. If matcher is undefined or "best fit", then + if (matcher === undefined || matcher === 'best fit') + // a. Let subset be the result of calling the BestFitSupportedLocales + // abstract operation (defined in 9.2.7) with arguments + // availableLocales and requestedLocales. + subset = BestFitSupportedLocales(availableLocales, requestedLocales); + // 3. Else + else + // a. Let subset be the result of calling the LookupSupportedLocales + // abstract operation (defined in 9.2.6) with arguments + // availableLocales and requestedLocales. + subset = LookupSupportedLocales(availableLocales, requestedLocales); + + // 4. For each named own property name P of subset, + for (var P in subset) { + if (!hop.call(subset, P)) continue; + + // a. Let desc be the result of calling the [[GetOwnProperty]] internal + // method of subset with P. + // b. Set desc.[[Writable]] to false. + // c. Set desc.[[Configurable]] to false. + // d. Call the [[DefineOwnProperty]] internal method of subset with P, desc, + // and true as arguments. + defineProperty(subset, P, { + writable: false, + configurable: false, + value: subset[P], + }); + } + // "Freeze" the array so no new elements can be added + defineProperty(subset, 'length', { writable: false }); + + // 5. Return subset + return subset; + } + + /** + * The GetOption abstract operation extracts the value of the property named + * property from the provided options object, converts it to the required type, + * checks whether it is one of a List of allowed values, and fills in a fallback + * value if necessary. + */ + function /*9.2.9 */ GetOption(options, property, type, values, fallback) { + // 1. Let value be the result of calling the [[Get]] internal method of + // options with argument property. + var value = options[property]; + + // 2. If value is not undefined, then + if (value !== undefined) { + // a. Assert: type is "boolean" or "string". + // b. If type is "boolean", then let value be ToBoolean(value). + // c. If type is "string", then let value be ToString(value). + value = type === 'boolean' ? Boolean(value) : type === 'string' ? String(value) : value; + + // d. If values is not undefined, then + if (values !== undefined) { + // i. If values does not contain an element equal to value, then throw a + // RangeError exception. + if (arrIndexOf.call(values, value) === -1) + throw new RangeError("'" + value + "' is not an allowed value for `" + property + '`'); + } + + // e. Return value. + return value; + } + // Else return fallback. + return fallback; + } + + /** + * The GetNumberOption abstract operation extracts a property value from the + * provided options object, converts it to a Number value, checks whether it is + * in the allowed range, and fills in a fallback value if necessary. + */ + function /* 9.2.10 */ GetNumberOption(options, property, minimum, maximum, fallback) { + // 1. Let value be the result of calling the [[Get]] internal method of + // options with argument property. + var value = options[property]; + + // 2. If value is not undefined, then + if (value !== undefined) { + // a. Let value be ToNumber(value). + value = Number(value); + + // b. If value is NaN or less than minimum or greater than maximum, throw a + // RangeError exception. + if (isNaN(value) || value < minimum || value > maximum) + throw new RangeError('Value is not a number or outside accepted range'); + + // c. Return floor(value). + return Math.floor(value); + } + // 3. Else return fallback. + return fallback; + } + + // 8 The Intl Object + var Intl = {}; + + // 8.2 Function Properties of the Intl Object + + // 8.2.1 + // @spec[tc39/ecma402/master/spec/intl.html] + // @clause[sec-intl.getcanonicallocales] + function getCanonicalLocales(locales) { + // 1. Let ll be ? CanonicalizeLocaleList(locales). + var ll = CanonicalizeLocaleList(locales); + // 2. Return CreateArrayFromList(ll). + { + var result = []; + + var len = ll.length; + var k = 0; + + while (k < len) { + result[k] = ll[k]; + k++; + } + return result; + } + } + + Object.defineProperty(Intl, 'getCanonicalLocales', { + enumerable: false, + configurable: true, + writable: true, + value: getCanonicalLocales, + }); + + // Currency minor units output from get-4217 grunt task, formatted + var currencyMinorUnits = { + BHD: 3, + BYR: 0, + XOF: 0, + BIF: 0, + XAF: 0, + CLF: 4, + CLP: 0, + KMF: 0, + DJF: 0, + XPF: 0, + GNF: 0, + ISK: 0, + IQD: 3, + JPY: 0, + JOD: 3, + KRW: 0, + KWD: 3, + LYD: 3, + OMR: 3, + PYG: 0, + RWF: 0, + TND: 3, + UGX: 0, + UYI: 0, + VUV: 0, + VND: 0, + }; + + // Define the NumberFormat constructor internally so it cannot be tainted + function NumberFormatConstructor() { + var locales = arguments[0]; + var options = arguments[1]; + + if (!this || this === Intl) { + return new Intl.NumberFormat(locales, options); + } + + return InitializeNumberFormat(toObject(this), locales, options); + } + + defineProperty(Intl, 'NumberFormat', { + configurable: true, + writable: true, + value: NumberFormatConstructor, + }); + + // Must explicitly set prototypes as unwritable + defineProperty(Intl.NumberFormat, 'prototype', { + writable: false, + }); + + /** + * The abstract operation InitializeNumberFormat accepts the arguments + * numberFormat (which must be an object), locales, and options. It initializes + * numberFormat as a NumberFormat object. + */ + function /*11.1.1.1 */ InitializeNumberFormat(numberFormat, locales, options) { + // This will be a internal properties object if we're not already initialized + var internal = getInternalProperties(numberFormat); + + // Create an object whose props can be used to restore the values of RegExp props + var regexpRestore = createRegExpRestore(); + + // 1. If numberFormat has an [[initializedIntlObject]] internal property with + // value true, throw a TypeError exception. + if (internal['[[initializedIntlObject]]'] === true) + throw new TypeError('`this` object has already been initialized as an Intl object'); + + // Need this to access the `internal` object + defineProperty(numberFormat, '__getInternalProperties', { + value: function value() { + // NOTE: Non-standard, for internal use only + if (arguments[0] === secret) return internal; + }, + }); + + // 2. Set the [[initializedIntlObject]] internal property of numberFormat to true. + internal['[[initializedIntlObject]]'] = true; + + // 3. Let requestedLocales be the result of calling the CanonicalizeLocaleList + // abstract operation (defined in 9.2.1) with argument locales. + var requestedLocales = CanonicalizeLocaleList(locales); + + // 4. If options is undefined, then + if (options === undefined) + // a. Let options be the result of creating a new object as if by the + // expression new Object() where Object is the standard built-in constructor + // with that name. + options = {}; + // 5. Else + else + // a. Let options be ToObject(options). + options = toObject(options); + + // 6. Let opt be a new Record. + var opt = new Record(), + // 7. Let matcher be the result of calling the GetOption abstract operation + // (defined in 9.2.9) with the arguments options, "localeMatcher", "string", + // a List containing the two String values "lookup" and "best fit", and + // "best fit". + matcher = GetOption( + options, + 'localeMatcher', + 'string', + new List('lookup', 'best fit'), + 'best fit', + ); + + // 8. Set opt.[[localeMatcher]] to matcher. + opt['[[localeMatcher]]'] = matcher; + + // 9. Let NumberFormat be the standard built-in object that is the initial value + // of Intl.NumberFormat. + // 10. Let localeData be the value of the [[localeData]] internal property of + // NumberFormat. + var localeData = internals.NumberFormat['[[localeData]]']; + + // 11. Let r be the result of calling the ResolveLocale abstract operation + // (defined in 9.2.5) with the [[availableLocales]] internal property of + // NumberFormat, requestedLocales, opt, the [[relevantExtensionKeys]] + // internal property of NumberFormat, and localeData. + var r = ResolveLocale( + internals.NumberFormat['[[availableLocales]]'], + requestedLocales, + opt, + internals.NumberFormat['[[relevantExtensionKeys]]'], + localeData, + ); + + // 12. Set the [[locale]] internal property of numberFormat to the value of + // r.[[locale]]. + internal['[[locale]]'] = r['[[locale]]']; + + // 13. Set the [[numberingSystem]] internal property of numberFormat to the value + // of r.[[nu]]. + internal['[[numberingSystem]]'] = r['[[nu]]']; + + // The specification doesn't tell us to do this, but it's helpful later on + internal['[[dataLocale]]'] = r['[[dataLocale]]']; + + // 14. Let dataLocale be the value of r.[[dataLocale]]. + var dataLocale = r['[[dataLocale]]']; + + // 15. Let s be the result of calling the GetOption abstract operation with the + // arguments options, "style", "string", a List containing the three String + // values "decimal", "percent", and "currency", and "decimal". + var s = GetOption( + options, + 'style', + 'string', + new List('decimal', 'percent', 'currency'), + 'decimal', + ); + + // 16. Set the [[style]] internal property of numberFormat to s. + internal['[[style]]'] = s; + + // 17. Let c be the result of calling the GetOption abstract operation with the + // arguments options, "currency", "string", undefined, and undefined. + var c = GetOption(options, 'currency', 'string'); + + // 18. If c is not undefined and the result of calling the + // IsWellFormedCurrencyCode abstract operation (defined in 6.3.1) with + // argument c is false, then throw a RangeError exception. + if (c !== undefined && !IsWellFormedCurrencyCode(c)) + throw new RangeError("'" + c + "' is not a valid currency code"); + + // 19. If s is "currency" and c is undefined, throw a TypeError exception. + if (s === 'currency' && c === undefined) + throw new TypeError('Currency code is required when style is currency'); + + var cDigits = void 0; + + // 20. If s is "currency", then + if (s === 'currency') { + // a. Let c be the result of converting c to upper case as specified in 6.1. + c = c.toUpperCase(); + + // b. Set the [[currency]] internal property of numberFormat to c. + internal['[[currency]]'] = c; + + // c. Let cDigits be the result of calling the CurrencyDigits abstract + // operation (defined below) with argument c. + cDigits = CurrencyDigits(c); + } + + // 21. Let cd be the result of calling the GetOption abstract operation with the + // arguments options, "currencyDisplay", "string", a List containing the + // three String values "code", "symbol", and "name", and "symbol". + var cd = GetOption( + options, + 'currencyDisplay', + 'string', + new List('code', 'symbol', 'name'), + 'symbol', + ); + + // 22. If s is "currency", then set the [[currencyDisplay]] internal property of + // numberFormat to cd. + if (s === 'currency') internal['[[currencyDisplay]]'] = cd; + + // 23. Let mnid be the result of calling the GetNumberOption abstract operation + // (defined in 9.2.10) with arguments options, "minimumIntegerDigits", 1, 21, + // and 1. + var mnid = GetNumberOption(options, 'minimumIntegerDigits', 1, 21, 1); + + // 24. Set the [[minimumIntegerDigits]] internal property of numberFormat to mnid. + internal['[[minimumIntegerDigits]]'] = mnid; + + // 25. If s is "currency", then let mnfdDefault be cDigits; else let mnfdDefault + // be 0. + var mnfdDefault = s === 'currency' ? cDigits : 0; + + // 26. Let mnfd be the result of calling the GetNumberOption abstract operation + // with arguments options, "minimumFractionDigits", 0, 20, and mnfdDefault. + var mnfd = GetNumberOption(options, 'minimumFractionDigits', 0, 20, mnfdDefault); + + // 27. Set the [[minimumFractionDigits]] internal property of numberFormat to mnfd. + internal['[[minimumFractionDigits]]'] = mnfd; + + // 28. If s is "currency", then let mxfdDefault be max(mnfd, cDigits); else if s + // is "percent", then let mxfdDefault be max(mnfd, 0); else let mxfdDefault + // be max(mnfd, 3). + var mxfdDefault = + s === 'currency' + ? Math.max(mnfd, cDigits) + : s === 'percent' + ? Math.max(mnfd, 0) + : Math.max(mnfd, 3); + + // 29. Let mxfd be the result of calling the GetNumberOption abstract operation + // with arguments options, "maximumFractionDigits", mnfd, 20, and mxfdDefault. + var mxfd = GetNumberOption(options, 'maximumFractionDigits', mnfd, 20, mxfdDefault); + + // 30. Set the [[maximumFractionDigits]] internal property of numberFormat to mxfd. + internal['[[maximumFractionDigits]]'] = mxfd; + + // 31. Let mnsd be the result of calling the [[Get]] internal method of options + // with argument "minimumSignificantDigits". + var mnsd = options.minimumSignificantDigits; + + // 32. Let mxsd be the result of calling the [[Get]] internal method of options + // with argument "maximumSignificantDigits". + var mxsd = options.maximumSignificantDigits; + + // 33. If mnsd is not undefined or mxsd is not undefined, then: + if (mnsd !== undefined || mxsd !== undefined) { + // a. Let mnsd be the result of calling the GetNumberOption abstract + // operation with arguments options, "minimumSignificantDigits", 1, 21, + // and 1. + mnsd = GetNumberOption(options, 'minimumSignificantDigits', 1, 21, 1); + + // b. Let mxsd be the result of calling the GetNumberOption abstract + // operation with arguments options, "maximumSignificantDigits", mnsd, + // 21, and 21. + mxsd = GetNumberOption(options, 'maximumSignificantDigits', mnsd, 21, 21); + + // c. Set the [[minimumSignificantDigits]] internal property of numberFormat + // to mnsd, and the [[maximumSignificantDigits]] internal property of + // numberFormat to mxsd. + internal['[[minimumSignificantDigits]]'] = mnsd; + internal['[[maximumSignificantDigits]]'] = mxsd; + } + // 34. Let g be the result of calling the GetOption abstract operation with the + // arguments options, "useGrouping", "boolean", undefined, and true. + var g = GetOption(options, 'useGrouping', 'boolean', undefined, true); + + // 35. Set the [[useGrouping]] internal property of numberFormat to g. + internal['[[useGrouping]]'] = g; + + // 36. Let dataLocaleData be the result of calling the [[Get]] internal method of + // localeData with argument dataLocale. + var dataLocaleData = localeData[dataLocale]; + + // 37. Let patterns be the result of calling the [[Get]] internal method of + // dataLocaleData with argument "patterns". + var patterns = dataLocaleData.patterns; + + // 38. Assert: patterns is an object (see 11.2.3) + + // 39. Let stylePatterns be the result of calling the [[Get]] internal method of + // patterns with argument s. + var stylePatterns = patterns[s]; + + // 40. Set the [[positivePattern]] internal property of numberFormat to the + // result of calling the [[Get]] internal method of stylePatterns with the + // argument "positivePattern". + internal['[[positivePattern]]'] = stylePatterns.positivePattern; + + // 41. Set the [[negativePattern]] internal property of numberFormat to the + // result of calling the [[Get]] internal method of stylePatterns with the + // argument "negativePattern". + internal['[[negativePattern]]'] = stylePatterns.negativePattern; + + // 42. Set the [[boundFormat]] internal property of numberFormat to undefined. + internal['[[boundFormat]]'] = undefined; + + // 43. Set the [[initializedNumberFormat]] internal property of numberFormat to + // true. + internal['[[initializedNumberFormat]]'] = true; + + // In ES3, we need to pre-bind the format() function + if (es3) numberFormat.format = GetFormatNumber.call(numberFormat); + + // Restore the RegExp properties + regexpRestore(); + + // Return the newly initialised object + return numberFormat; + } + + function CurrencyDigits(currency) { + // When the CurrencyDigits abstract operation is called with an argument currency + // (which must be an upper case String value), the following steps are taken: + + // 1. If the ISO 4217 currency and funds code list contains currency as an + // alphabetic code, then return the minor unit value corresponding to the + // currency from the list; else return 2. + return currencyMinorUnits[currency] !== undefined ? currencyMinorUnits[currency] : 2; + } + + /* 11.2.3 */ internals.NumberFormat = { + '[[availableLocales]]': [], + '[[relevantExtensionKeys]]': ['nu'], + '[[localeData]]': {}, + }; + + /** + * When the supportedLocalesOf method of Intl.NumberFormat is called, the + * following steps are taken: + */ + /* 11.2.2 */ + defineProperty(Intl.NumberFormat, 'supportedLocalesOf', { + configurable: true, + writable: true, + value: fnBind.call(function (locales) { + // Bound functions only have the `this` value altered if being used as a constructor, + // this lets us imitate a native function that has no constructor + if (!hop.call(this, '[[availableLocales]]')) + throw new TypeError('supportedLocalesOf() is not a constructor'); + + // Create an object whose props can be used to restore the values of RegExp props + var regexpRestore = createRegExpRestore(), + // 1. If options is not provided, then let options be undefined. + options = arguments[1], + // 2. Let availableLocales be the value of the [[availableLocales]] internal + // property of the standard built-in object that is the initial value of + // Intl.NumberFormat. + + availableLocales = this['[[availableLocales]]'], + // 3. Let requestedLocales be the result of calling the CanonicalizeLocaleList + // abstract operation (defined in 9.2.1) with argument locales. + requestedLocales = CanonicalizeLocaleList(locales); + + // Restore the RegExp properties + regexpRestore(); + + // 4. Return the result of calling the SupportedLocales abstract operation + // (defined in 9.2.8) with arguments availableLocales, requestedLocales, + // and options. + return SupportedLocales(availableLocales, requestedLocales, options); + }, internals.NumberFormat), + }); + + /** + * This named accessor property returns a function that formats a number + * according to the effective locale and the formatting options of this + * NumberFormat object. + */ + /* 11.3.2 */ defineProperty(Intl.NumberFormat.prototype, 'format', { + configurable: true, + get: GetFormatNumber, + }); + + function GetFormatNumber() { + var internal = + this !== null && babelHelpers$1['typeof'](this) === 'object' && getInternalProperties(this); + + // Satisfy test 11.3_b + if (!internal || !internal['[[initializedNumberFormat]]']) + throw new TypeError('`this` value for format() is not an initialized Intl.NumberFormat object.'); + + // The value of the [[Get]] attribute is a function that takes the following + // steps: + + // 1. If the [[boundFormat]] internal property of this NumberFormat object + // is undefined, then: + if (internal['[[boundFormat]]'] === undefined) { + // a. Let F be a Function object, with internal properties set as + // specified for built-in functions in ES5, 15, or successor, and the + // length property set to 1, that takes the argument value and + // performs the following steps: + var F = function F(value) { + // i. If value is not provided, then let value be undefined. + // ii. Let x be ToNumber(value). + // iii. Return the result of calling the FormatNumber abstract + // operation (defined below) with arguments this and x. + return FormatNumber(this, /* x = */ Number(value)); + }; + + // b. Let bind be the standard built-in function object defined in ES5, + // 15.3.4.5. + // c. Let bf be the result of calling the [[Call]] internal method of + // bind with F as the this value and an argument list containing + // the single item this. + var bf = fnBind.call(F, this); + + // d. Set the [[boundFormat]] internal property of this NumberFormat + // object to bf. + internal['[[boundFormat]]'] = bf; + } + // Return the value of the [[boundFormat]] internal property of this + // NumberFormat object. + return internal['[[boundFormat]]']; + } + + function formatToParts() { + var value = arguments.length <= 0 || arguments[0] === undefined ? undefined : arguments[0]; + + var internal = + this !== null && babelHelpers$1['typeof'](this) === 'object' && getInternalProperties(this); + if (!internal || !internal['[[initializedNumberFormat]]']) + throw new TypeError( + '`this` value for formatToParts() is not an initialized Intl.NumberFormat object.', + ); + + var x = Number(value); + return FormatNumberToParts(this, x); + } + + Object.defineProperty(Intl.NumberFormat.prototype, 'formatToParts', { + configurable: true, + enumerable: false, + writable: true, + value: formatToParts, + }); + + /* + * @spec[stasm/ecma402/number-format-to-parts/spec/numberformat.html] + * @clause[sec-formatnumbertoparts] + */ + function FormatNumberToParts(numberFormat, x) { + // 1. Let parts be ? PartitionNumberPattern(numberFormat, x). + var parts = PartitionNumberPattern(numberFormat, x); + // 2. Let result be ArrayCreate(0). + var result = []; + // 3. Let n be 0. + var n = 0; + // 4. For each part in parts, do: + for (var i = 0; parts.length > i; i++) { + var part = parts[i]; + // a. Let O be ObjectCreate(%ObjectPrototype%). + var O = {}; + // a. Perform ? CreateDataPropertyOrThrow(O, "type", part.[[type]]). + O.type = part['[[type]]']; + // a. Perform ? CreateDataPropertyOrThrow(O, "value", part.[[value]]). + O.value = part['[[value]]']; + // a. Perform ? CreateDataPropertyOrThrow(result, ? ToString(n), O). + result[n] = O; + // a. Increment n by 1. + n += 1; + } + // 5. Return result. + return result; + } + + /* + * @spec[stasm/ecma402/number-format-to-parts/spec/numberformat.html] + * @clause[sec-partitionnumberpattern] + */ + function PartitionNumberPattern(numberFormat, x) { + var internal = getInternalProperties(numberFormat), + locale = internal['[[dataLocale]]'], + nums = internal['[[numberingSystem]]'], + data = internals.NumberFormat['[[localeData]]'][locale], + ild = data.symbols[nums] || data.symbols.latn, + pattern = void 0; + + // 1. If x is not NaN and x < 0, then: + if (!isNaN(x) && x < 0) { + // a. Let x be -x. + x = -x; + // a. Let pattern be the value of numberFormat.[[negativePattern]]. + pattern = internal['[[negativePattern]]']; + } + // 2. Else, + else { + // a. Let pattern be the value of numberFormat.[[positivePattern]]. + pattern = internal['[[positivePattern]]']; + } + // 3. Let result be a new empty List. + var result = new List(); + // 4. Let beginIndex be Call(%StringProto_indexOf%, pattern, "{", 0). + var beginIndex = pattern.indexOf('{', 0); + // 5. Let endIndex be 0. + var endIndex = 0; + // 6. Let nextIndex be 0. + var nextIndex = 0; + // 7. Let length be the number of code units in pattern. + var length = pattern.length; + // 8. Repeat while beginIndex is an integer index into pattern: + while (beginIndex > -1 && beginIndex < length) { + // a. Set endIndex to Call(%StringProto_indexOf%, pattern, "}", beginIndex) + endIndex = pattern.indexOf('}', beginIndex); + // a. If endIndex = -1, throw new Error exception. + if (endIndex === -1) throw new Error(); + // a. If beginIndex is greater than nextIndex, then: + if (beginIndex > nextIndex) { + // i. Let literal be a substring of pattern from position nextIndex, inclusive, to position beginIndex, exclusive. + var literal = pattern.substring(nextIndex, beginIndex); + // ii. Add new part record { [[type]]: "literal", [[value]]: literal } as a new element of the list result. + arrPush.call(result, { '[[type]]': 'literal', '[[value]]': literal }); + } + // a. Let p be the substring of pattern from position beginIndex, exclusive, to position endIndex, exclusive. + var p = pattern.substring(beginIndex + 1, endIndex); + // a. If p is equal "number", then: + if (p === 'number') { + // i. If x is NaN, + if (isNaN(x)) { + // 1. Let n be an ILD String value indicating the NaN value. + var n = ild.nan; + // 2. Add new part record { [[type]]: "nan", [[value]]: n } as a new element of the list result. + arrPush.call(result, { '[[type]]': 'nan', '[[value]]': n }); + } + // ii. Else if isFinite(x) is false, + else if (!isFinite(x)) { + // 1. Let n be an ILD String value indicating infinity. + var _n = ild.infinity; + // 2. Add new part record { [[type]]: "infinity", [[value]]: n } as a new element of the list result. + arrPush.call(result, { '[[type]]': 'infinity', '[[value]]': _n }); + } + // iii. Else, + else { + // 1. If the value of numberFormat.[[style]] is "percent" and isFinite(x), let x be 100 × x. + if (internal['[[style]]'] === 'percent' && isFinite(x)) x *= 100; + + var _n2 = void 0; + // 2. If the numberFormat.[[minimumSignificantDigits]] and numberFormat.[[maximumSignificantDigits]] are present, then + if ( + hop.call(internal, '[[minimumSignificantDigits]]') && + hop.call(internal, '[[maximumSignificantDigits]]') + ) { + // a. Let n be ToRawPrecision(x, numberFormat.[[minimumSignificantDigits]], numberFormat.[[maximumSignificantDigits]]). + _n2 = ToRawPrecision( + x, + internal['[[minimumSignificantDigits]]'], + internal['[[maximumSignificantDigits]]'], + ); + } + // 3. Else, + else { + // a. Let n be ToRawFixed(x, numberFormat.[[minimumIntegerDigits]], numberFormat.[[minimumFractionDigits]], numberFormat.[[maximumFractionDigits]]). + _n2 = ToRawFixed( + x, + internal['[[minimumIntegerDigits]]'], + internal['[[minimumFractionDigits]]'], + internal['[[maximumFractionDigits]]'], + ); + } + // 4. If the value of the numberFormat.[[numberingSystem]] matches one of the values in the "Numbering System" column of Table 2 below, then + if (numSys[nums]) { + (function () { + // a. Let digits be an array whose 10 String valued elements are the UTF-16 string representations of the 10 digits specified in the "Digits" column of the matching row in Table 2. + var digits = numSys[nums]; + // a. Replace each digit in n with the value of digits[digit]. + _n2 = String(_n2).replace(/\d/g, function (digit) { + return digits[digit]; + }); + })(); + } + // 5. Else use an implementation dependent algorithm to map n to the appropriate representation of n in the given numbering system. + else _n2 = String(_n2); // ###TODO### + + var integer = void 0; + var fraction = void 0; + // 6. Let decimalSepIndex be Call(%StringProto_indexOf%, n, ".", 0). + var decimalSepIndex = _n2.indexOf('.', 0); + // 7. If decimalSepIndex > 0, then: + if (decimalSepIndex > 0) { + // a. Let integer be the substring of n from position 0, inclusive, to position decimalSepIndex, exclusive. + integer = _n2.substring(0, decimalSepIndex); + // a. Let fraction be the substring of n from position decimalSepIndex, exclusive, to the end of n. + fraction = _n2.substring(decimalSepIndex + 1, decimalSepIndex.length); + } + // 8. Else: + else { + // a. Let integer be n. + integer = _n2; + // a. Let fraction be undefined. + fraction = undefined; + } + // 9. If the value of the numberFormat.[[useGrouping]] is true, + if (internal['[[useGrouping]]'] === true) { + // a. Let groupSepSymbol be the ILND String representing the grouping separator. + var groupSepSymbol = ild.group; + // a. Let groups be a List whose elements are, in left to right order, the substrings defined by ILND set of locations within the integer. + var groups = []; + // ----> implementation: + // Primary group represents the group closest to the decimal + var pgSize = data.patterns.primaryGroupSize || 3; + // Secondary group is every other group + var sgSize = data.patterns.secondaryGroupSize || pgSize; + // Group only if necessary + if (integer.length > pgSize) { + // Index of the primary grouping separator + var end = integer.length - pgSize; + // Starting index for our loop + var idx = end % sgSize; + var start = integer.slice(0, idx); + if (start.length) arrPush.call(groups, start); + // Loop to separate into secondary grouping digits + while (idx < end) { + arrPush.call(groups, integer.slice(idx, idx + sgSize)); + idx += sgSize; + } + // Add the primary grouping digits + arrPush.call(groups, integer.slice(end)); + } else { + arrPush.call(groups, integer); + } + // a. Assert: The number of elements in groups List is greater than 0. + if (groups.length === 0) throw new Error(); + // a. Repeat, while groups List is not empty: + while (groups.length) { + // i. Remove the first element from groups and let integerGroup be the value of that element. + var integerGroup = arrShift.call(groups); + // ii. Add new part record { [[type]]: "integer", [[value]]: integerGroup } as a new element of the list result. + arrPush.call(result, { '[[type]]': 'integer', '[[value]]': integerGroup }); + // iii. If groups List is not empty, then: + if (groups.length) { + // 1. Add new part record { [[type]]: "group", [[value]]: groupSepSymbol } as a new element of the list result. + arrPush.call(result, { '[[type]]': 'group', '[[value]]': groupSepSymbol }); + } + } + } + // 10. Else, + else { + // a. Add new part record { [[type]]: "integer", [[value]]: integer } as a new element of the list result. + arrPush.call(result, { '[[type]]': 'integer', '[[value]]': integer }); + } + // 11. If fraction is not undefined, then: + if (fraction !== undefined) { + // a. Let decimalSepSymbol be the ILND String representing the decimal separator. + var decimalSepSymbol = ild.decimal; + // a. Add new part record { [[type]]: "decimal", [[value]]: decimalSepSymbol } as a new element of the list result. + arrPush.call(result, { '[[type]]': 'decimal', '[[value]]': decimalSepSymbol }); + // a. Add new part record { [[type]]: "fraction", [[value]]: fraction } as a new element of the list result. + arrPush.call(result, { '[[type]]': 'fraction', '[[value]]': fraction }); + } + } + } + // a. Else if p is equal "plusSign", then: + else if (p === 'plusSign') { + // i. Let plusSignSymbol be the ILND String representing the plus sign. + var plusSignSymbol = ild.plusSign; + // ii. Add new part record { [[type]]: "plusSign", [[value]]: plusSignSymbol } as a new element of the list result. + arrPush.call(result, { '[[type]]': 'plusSign', '[[value]]': plusSignSymbol }); + } + // a. Else if p is equal "minusSign", then: + else if (p === 'minusSign') { + // i. Let minusSignSymbol be the ILND String representing the minus sign. + var minusSignSymbol = ild.minusSign; + // ii. Add new part record { [[type]]: "minusSign", [[value]]: minusSignSymbol } as a new element of the list result. + arrPush.call(result, { '[[type]]': 'minusSign', '[[value]]': minusSignSymbol }); + } + // a. Else if p is equal "percentSign" and numberFormat.[[style]] is "percent", then: + else if (p === 'percentSign' && internal['[[style]]'] === 'percent') { + // i. Let percentSignSymbol be the ILND String representing the percent sign. + var percentSignSymbol = ild.percentSign; + // ii. Add new part record { [[type]]: "percentSign", [[value]]: percentSignSymbol } as a new element of the list result. + arrPush.call(result, { '[[type]]': 'literal', '[[value]]': percentSignSymbol }); + } + // a. Else if p is equal "currency" and numberFormat.[[style]] is "currency", then: + else if (p === 'currency' && internal['[[style]]'] === 'currency') { + // i. Let currency be the value of numberFormat.[[currency]]. + var currency = internal['[[currency]]']; + + var cd = void 0; + + // ii. If numberFormat.[[currencyDisplay]] is "code", then + if (internal['[[currencyDisplay]]'] === 'code') { + // 1. Let cd be currency. + cd = currency; + } + // iii. Else if numberFormat.[[currencyDisplay]] is "symbol", then + else if (internal['[[currencyDisplay]]'] === 'symbol') { + // 1. Let cd be an ILD string representing currency in short form. If the implementation does not have such a representation of currency, use currency itself. + cd = data.currencies[currency] || currency; + } + // iv. Else if numberFormat.[[currencyDisplay]] is "name", then + else if (internal['[[currencyDisplay]]'] === 'name') { + // 1. Let cd be an ILD string representing currency in long form. If the implementation does not have such a representation of currency, then use currency itself. + cd = currency; + } + // v. Add new part record { [[type]]: "currency", [[value]]: cd } as a new element of the list result. + arrPush.call(result, { '[[type]]': 'currency', '[[value]]': cd }); + } + // a. Else, + else { + // i. Let literal be the substring of pattern from position beginIndex, inclusive, to position endIndex, inclusive. + var _literal = pattern.substring(beginIndex, endIndex); + // ii. Add new part record { [[type]]: "literal", [[value]]: literal } as a new element of the list result. + arrPush.call(result, { '[[type]]': 'literal', '[[value]]': _literal }); + } + // a. Set nextIndex to endIndex + 1. + nextIndex = endIndex + 1; + // a. Set beginIndex to Call(%StringProto_indexOf%, pattern, "{", nextIndex) + beginIndex = pattern.indexOf('{', nextIndex); + } + // 9. If nextIndex is less than length, then: + if (nextIndex < length) { + // a. Let literal be the substring of pattern from position nextIndex, inclusive, to position length, exclusive. + var _literal2 = pattern.substring(nextIndex, length); + // a. Add new part record { [[type]]: "literal", [[value]]: literal } as a new element of the list result. + arrPush.call(result, { '[[type]]': 'literal', '[[value]]': _literal2 }); + } + // 10. Return result. + return result; + } + + /* + * @spec[stasm/ecma402/number-format-to-parts/spec/numberformat.html] + * @clause[sec-formatnumber] + */ + function FormatNumber(numberFormat, x) { + // 1. Let parts be ? PartitionNumberPattern(numberFormat, x). + var parts = PartitionNumberPattern(numberFormat, x); + // 2. Let result be an empty String. + var result = ''; + // 3. For each part in parts, do: + for (var i = 0; parts.length > i; i++) { + var part = parts[i]; + // a. Set result to a String value produced by concatenating result and part.[[value]]. + result += part['[[value]]']; + } + // 4. Return result. + return result; + } + + /** + * When the ToRawPrecision abstract operation is called with arguments x (which + * must be a finite non-negative number), minPrecision, and maxPrecision (both + * must be integers between 1 and 21) the following steps are taken: + */ + function ToRawPrecision(x, minPrecision, maxPrecision) { + // 1. Let p be maxPrecision. + var p = maxPrecision; + + var m = void 0, + e = void 0; + + // 2. If x = 0, then + if (x === 0) { + // a. Let m be the String consisting of p occurrences of the character "0". + m = arrJoin.call(Array(p + 1), '0'); + // b. Let e be 0. + e = 0; + } + // 3. Else + else { + // a. Let e and n be integers such that 10ᵖ⁻¹ ≤ n < 10ᵖ and for which the + // exact mathematical value of n × 10ᵉ⁻ᵖ⁺¹ – x is as close to zero as + // possible. If there are two such sets of e and n, pick the e and n for + // which n × 10ᵉ⁻ᵖ⁺¹ is larger. + e = log10Floor(Math.abs(x)); + + // Easier to get to m from here + var f = Math.round(Math.exp(Math.abs(e - p + 1) * Math.LN10)); + + // b. Let m be the String consisting of the digits of the decimal + // representation of n (in order, with no leading zeroes) + m = String(Math.round(e - p + 1 < 0 ? x * f : x / f)); + } + + // 4. If e ≥ p, then + if (e >= p) + // a. Return the concatenation of m and e-p+1 occurrences of the character "0". + return m + arrJoin.call(Array(e - p + 1 + 1), '0'); + // 5. If e = p-1, then + else if (e === p - 1) + // a. Return m. + return m; + // 6. If e ≥ 0, then + else if (e >= 0) + // a. Let m be the concatenation of the first e+1 characters of m, the character + // ".", and the remaining p–(e+1) characters of m. + m = m.slice(0, e + 1) + '.' + m.slice(e + 1); + // 7. If e < 0, then + else if (e < 0) + // a. Let m be the concatenation of the String "0.", –(e+1) occurrences of the + // character "0", and the string m. + m = '0.' + arrJoin.call(Array(-(e + 1) + 1), '0') + m; + + // 8. If m contains the character ".", and maxPrecision > minPrecision, then + if (m.indexOf('.') >= 0 && maxPrecision > minPrecision) { + // a. Let cut be maxPrecision – minPrecision. + var cut = maxPrecision - minPrecision; + + // b. Repeat while cut > 0 and the last character of m is "0": + while (cut > 0 && m.charAt(m.length - 1) === '0') { + // i. Remove the last character from m. + m = m.slice(0, -1); + + // ii. Decrease cut by 1. + cut--; + } + + // c. If the last character of m is ".", then + if (m.charAt(m.length - 1) === '.') + // i. Remove the last character from m. + m = m.slice(0, -1); + } + // 9. Return m. + return m; + } + + /** + * @spec[tc39/ecma402/master/spec/numberformat.html] + * @clause[sec-torawfixed] + * When the ToRawFixed abstract operation is called with arguments x (which must + * be a finite non-negative number), minInteger (which must be an integer between + * 1 and 21), minFraction, and maxFraction (which must be integers between 0 and + * 20) the following steps are taken: + */ + function ToRawFixed(x, minInteger, minFraction, maxFraction) { + // 1. Let f be maxFraction. + var f = maxFraction; + // 2. Let n be an integer for which the exact mathematical value of n ÷ 10f – x is as close to zero as possible. If there are two such n, pick the larger n. + var n = Math.pow(10, f) * x; // diverging... + // 3. If n = 0, let m be the String "0". Otherwise, let m be the String consisting of the digits of the decimal representation of n (in order, with no leading zeroes). + var m = n === 0 ? '0' : n.toFixed(0); // divering... + + { + // this diversion is needed to take into consideration big numbers, e.g.: + // 1.2344501e+37 -> 12344501000000000000000000000000000000 + var idx = void 0; + var exp = (idx = m.indexOf('e')) > -1 ? m.slice(idx + 1) : 0; + if (exp) { + m = m.slice(0, idx).replace('.', ''); + m += arrJoin.call(Array(exp - (m.length - 1) + 1), '0'); + } + } + + var int = void 0; + // 4. If f ≠ 0, then + if (f !== 0) { + // a. Let k be the number of characters in m. + var k = m.length; + // a. If k ≤ f, then + if (k <= f) { + // i. Let z be the String consisting of f+1–k occurrences of the character "0". + var z = arrJoin.call(Array(f + 1 - k + 1), '0'); + // ii. Let m be the concatenation of Strings z and m. + m = z + m; + // iii. Let k be f+1. + k = f + 1; + } + // a. Let a be the first k–f characters of m, and let b be the remaining f characters of m. + var a = m.substring(0, k - f), + b = m.substring(k - f, m.length); + // a. Let m be the concatenation of the three Strings a, ".", and b. + m = a + '.' + b; + // a. Let int be the number of characters in a. + int = a.length; + } + // 5. Else, let int be the number of characters in m. + else int = m.length; + // 6. Let cut be maxFraction – minFraction. + var cut = maxFraction - minFraction; + // 7. Repeat while cut > 0 and the last character of m is "0": + while (cut > 0 && m.slice(-1) === '0') { + // a. Remove the last character from m. + m = m.slice(0, -1); + // a. Decrease cut by 1. + cut--; + } + // 8. If the last character of m is ".", then + if (m.slice(-1) === '.') { + // a. Remove the last character from m. + m = m.slice(0, -1); + } + // 9. If int < minInteger, then + if (int < minInteger) { + // a. Let z be the String consisting of minInteger–int occurrences of the character "0". + var _z = arrJoin.call(Array(minInteger - int + 1), '0'); + // a. Let m be the concatenation of Strings z and m. + m = _z + m; + } + // 10. Return m. + return m; + } + + // Sect 11.3.2 Table 2, Numbering systems + // ====================================== + var numSys = { + arab: ['٠', '١', '٢', '٣', '٤', '٥', '٦', '٧', '٨', '٩'], + arabext: ['۰', '۱', '۲', '۳', '۴', '۵', '۶', '۷', '۸', '۹'], + bali: ['᭐', '᭑', '᭒', '᭓', '᭔', '᭕', '᭖', '᭗', '᭘', '᭙'], + beng: ['০', '১', '২', '৩', '৪', '৫', '৬', '৭', '৮', '৯'], + deva: ['०', '१', '२', '३', '४', '५', '६', '७', '८', '९'], + fullwide: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], + gujr: ['૦', '૧', '૨', '૩', '૪', '૫', '૬', '૭', '૮', '૯'], + guru: ['੦', '੧', '੨', '੩', '੪', '੫', '੬', '੭', '੮', '੯'], + hanidec: ['〇', '一', '二', '三', '四', '五', '六', '七', '八', '九'], + khmr: ['០', '១', '២', '៣', '៤', '៥', '៦', '៧', '៨', '៩'], + knda: ['೦', '೧', '೨', '೩', '೪', '೫', '೬', '೭', '೮', '೯'], + laoo: ['໐', '໑', '໒', '໓', '໔', '໕', '໖', '໗', '໘', '໙'], + latn: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], + limb: ['᥆', '᥇', '᥈', '᥉', '᥊', '᥋', '᥌', '᥍', '᥎', '᥏'], + mlym: ['൦', '൧', '൨', '൩', '൪', '൫', '൬', '൭', '൮', '൯'], + mong: ['᠐', '᠑', '᠒', '᠓', '᠔', '᠕', '᠖', '᠗', '᠘', '᠙'], + mymr: ['၀', '၁', '၂', '၃', '၄', '၅', '၆', '၇', '၈', '၉'], + orya: ['୦', '୧', '୨', '୩', '୪', '୫', '୬', '୭', '୮', '୯'], + tamldec: ['௦', '௧', '௨', '௩', '௪', '௫', '௬', '௭', '௮', '௯'], + telu: ['౦', '౧', '౨', '౩', '౪', '౫', '౬', '౭', '౮', '౯'], + thai: ['๐', '๑', '๒', '๓', '๔', '๕', '๖', '๗', '๘', '๙'], + tibt: ['༠', '༡', '༢', '༣', '༤', '༥', '༦', '༧', '༨', '༩'], + }; + + /** + * This function provides access to the locale and formatting options computed + * during initialization of the object. + * + * The function returns a new object whose properties and attributes are set as + * if constructed by an object literal assigning to each of the following + * properties the value of the corresponding internal property of this + * NumberFormat object (see 11.4): locale, numberingSystem, style, currency, + * currencyDisplay, minimumIntegerDigits, minimumFractionDigits, + * maximumFractionDigits, minimumSignificantDigits, maximumSignificantDigits, and + * useGrouping. Properties whose corresponding internal properties are not present + * are not assigned. + */ + /* 11.3.3 */ defineProperty(Intl.NumberFormat.prototype, 'resolvedOptions', { + configurable: true, + writable: true, + value: function value() { + var prop = void 0, + descs = new Record(), + props = [ + 'locale', + 'numberingSystem', + 'style', + 'currency', + 'currencyDisplay', + 'minimumIntegerDigits', + 'minimumFractionDigits', + 'maximumFractionDigits', + 'minimumSignificantDigits', + 'maximumSignificantDigits', + 'useGrouping', + ], + internal = + this !== null && babelHelpers$1['typeof'](this) === 'object' && getInternalProperties(this); + + // Satisfy test 11.3_b + if (!internal || !internal['[[initializedNumberFormat]]']) + throw new TypeError( + '`this` value for resolvedOptions() is not an initialized Intl.NumberFormat object.', + ); + + for (var i = 0, max = props.length; i < max; i++) { + if (hop.call(internal, (prop = '[[' + props[i] + ']]'))) + descs[props[i]] = { + value: internal[prop], + writable: true, + configurable: true, + enumerable: true, + }; + } + + return objCreate({}, descs); + }, + }); + + /* jslint esnext: true */ + + // Match these datetime components in a CLDR pattern, except those in single quotes + var expDTComponents = + /(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g; + // trim patterns after transformations + var expPatternTrimmer = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g; + // Skip over patterns with these datetime components because we don't have data + // to back them up: + // timezone, weekday, amoung others + var unwantedDTCs = /[rqQASjJgwWIQq]/; // xXVO were removed from this list in favor of computing matches with timeZoneName values but printing as empty string + + var dtKeys = ['era', 'year', 'month', 'day', 'weekday', 'quarter']; + var tmKeys = ['hour', 'minute', 'second', 'hour12', 'timeZoneName']; + + function isDateFormatOnly(obj) { + for (var i = 0; i < tmKeys.length; i += 1) { + if (obj.hasOwnProperty(tmKeys[i])) { + return false; + } + } + return true; + } + + function isTimeFormatOnly(obj) { + for (var i = 0; i < dtKeys.length; i += 1) { + if (obj.hasOwnProperty(dtKeys[i])) { + return false; + } + } + return true; + } + + function joinDateAndTimeFormats(dateFormatObj, timeFormatObj) { + var o = { _: {} }; + for (var i = 0; i < dtKeys.length; i += 1) { + if (dateFormatObj[dtKeys[i]]) { + o[dtKeys[i]] = dateFormatObj[dtKeys[i]]; + } + if (dateFormatObj._[dtKeys[i]]) { + o._[dtKeys[i]] = dateFormatObj._[dtKeys[i]]; + } + } + for (var j = 0; j < tmKeys.length; j += 1) { + if (timeFormatObj[tmKeys[j]]) { + o[tmKeys[j]] = timeFormatObj[tmKeys[j]]; + } + if (timeFormatObj._[tmKeys[j]]) { + o._[tmKeys[j]] = timeFormatObj._[tmKeys[j]]; + } + } + return o; + } + + function computeFinalPatterns(formatObj) { + // From http://www.unicode.org/reports/tr35/tr35-dates.html#Date_Format_Patterns: + // 'In patterns, two single quotes represents a literal single quote, either + // inside or outside single quotes. Text within single quotes is not + // interpreted in any way (except for two adjacent single quotes).' + formatObj.pattern12 = formatObj.extendedPattern.replace(/'([^']*)'/g, function ($0, literal) { + return literal ? literal : "'"; + }); + + // pattern 12 is always the default. we can produce the 24 by removing {ampm} + formatObj.pattern = formatObj.pattern12.replace('{ampm}', '').replace(expPatternTrimmer, ''); + return formatObj; + } + + function expDTComponentsMeta($0, formatObj) { + switch ($0.charAt(0)) { + // --- Era + case 'G': + formatObj.era = ['short', 'short', 'short', 'long', 'narrow'][$0.length - 1]; + return '{era}'; + + // --- Year + case 'y': + case 'Y': + case 'u': + case 'U': + case 'r': + formatObj.year = $0.length === 2 ? '2-digit' : 'numeric'; + return '{year}'; + + // --- Quarter (not supported in this polyfill) + case 'Q': + case 'q': + formatObj.quarter = ['numeric', '2-digit', 'short', 'long', 'narrow'][$0.length - 1]; + return '{quarter}'; + + // --- Month + case 'M': + case 'L': + formatObj.month = ['numeric', '2-digit', 'short', 'long', 'narrow'][$0.length - 1]; + return '{month}'; + + // --- Week (not supported in this polyfill) + case 'w': + // week of the year + formatObj.week = $0.length === 2 ? '2-digit' : 'numeric'; + return '{weekday}'; + case 'W': + // week of the month + formatObj.week = 'numeric'; + return '{weekday}'; + + // --- Day + case 'd': + // day of the month + formatObj.day = $0.length === 2 ? '2-digit' : 'numeric'; + return '{day}'; + case 'D': // day of the year + case 'F': // day of the week + case 'g': + // 1..n: Modified Julian day + formatObj.day = 'numeric'; + return '{day}'; + + // --- Week Day + case 'E': + // day of the week + formatObj.weekday = ['short', 'short', 'short', 'long', 'narrow', 'short'][$0.length - 1]; + return '{weekday}'; + case 'e': + // local day of the week + formatObj.weekday = ['numeric', '2-digit', 'short', 'long', 'narrow', 'short'][$0.length - 1]; + return '{weekday}'; + case 'c': + // stand alone local day of the week + formatObj.weekday = ['numeric', undefined, 'short', 'long', 'narrow', 'short'][$0.length - 1]; + return '{weekday}'; + + // --- Period + case 'a': // AM, PM + case 'b': // am, pm, noon, midnight + case 'B': + // flexible day periods + formatObj.hour12 = true; + return '{ampm}'; + + // --- Hour + case 'h': + case 'H': + formatObj.hour = $0.length === 2 ? '2-digit' : 'numeric'; + return '{hour}'; + case 'k': + case 'K': + formatObj.hour12 = true; // 12-hour-cycle time formats (using h or K) + formatObj.hour = $0.length === 2 ? '2-digit' : 'numeric'; + return '{hour}'; + + // --- Minute + case 'm': + formatObj.minute = $0.length === 2 ? '2-digit' : 'numeric'; + return '{minute}'; + + // --- Second + case 's': + formatObj.second = $0.length === 2 ? '2-digit' : 'numeric'; + return '{second}'; + case 'S': + case 'A': + formatObj.second = 'numeric'; + return '{second}'; + + // --- Timezone + case 'z': // 1..3, 4: specific non-location format + case 'Z': // 1..3, 4, 5: The ISO8601 varios formats + case 'O': // 1, 4: miliseconds in day short, long + case 'v': // 1, 4: generic non-location format + case 'V': // 1, 2, 3, 4: time zone ID or city + case 'X': // 1, 2, 3, 4: The ISO8601 varios formats + case 'x': + // 1, 2, 3, 4: The ISO8601 varios formats + // this polyfill only supports much, for now, we are just doing something dummy + formatObj.timeZoneName = $0.length < 4 ? 'short' : 'long'; + return '{timeZoneName}'; + } + } + + /** + * Converts the CLDR availableFormats into the objects and patterns required by + * the ECMAScript Internationalization API specification. + */ + function createDateTimeFormat(skeleton, pattern) { + // we ignore certain patterns that are unsupported to avoid this expensive op. + if (unwantedDTCs.test(pattern)) return undefined; + + var formatObj = { + originalPattern: pattern, + _: {}, + }; + + // Replace the pattern string with the one required by the specification, whilst + // at the same time evaluating it for the subsets and formats + formatObj.extendedPattern = pattern.replace(expDTComponents, function ($0) { + // See which symbol we're dealing with + return expDTComponentsMeta($0, formatObj._); + }); + + // Match the skeleton string with the one required by the specification + // this implementation is based on the Date Field Symbol Table: + // http://unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table + // Note: we are adding extra data to the formatObject even though this polyfill + // might not support it. + skeleton.replace(expDTComponents, function ($0) { + // See which symbol we're dealing with + return expDTComponentsMeta($0, formatObj); + }); + + return computeFinalPatterns(formatObj); + } + + /** + * Processes DateTime formats from CLDR to an easier-to-parse format. + * the result of this operation should be cached the first time a particular + * calendar is analyzed. + * + * The specification requires we support at least the following subsets of + * date/time components: + * + * - 'weekday', 'year', 'month', 'day', 'hour', 'minute', 'second' + * - 'weekday', 'year', 'month', 'day' + * - 'year', 'month', 'day' + * - 'year', 'month' + * - 'month', 'day' + * - 'hour', 'minute', 'second' + * - 'hour', 'minute' + * + * We need to cherry pick at least these subsets from the CLDR data and convert + * them into the pattern objects used in the ECMA-402 API. + */ + function createDateTimeFormats(formats) { + var availableFormats = formats.availableFormats; + var timeFormats = formats.timeFormats; + var dateFormats = formats.dateFormats; + var result = []; + var skeleton = void 0, + pattern = void 0, + computed = void 0, + i = void 0, + j = void 0; + var timeRelatedFormats = []; + var dateRelatedFormats = []; + + // Map available (custom) formats into a pattern for createDateTimeFormats + for (skeleton in availableFormats) { + if (availableFormats.hasOwnProperty(skeleton)) { + pattern = availableFormats[skeleton]; + computed = createDateTimeFormat(skeleton, pattern); + if (computed) { + result.push(computed); + // in some cases, the format is only displaying date specific props + // or time specific props, in which case we need to also produce the + // combined formats. + if (isDateFormatOnly(computed)) { + dateRelatedFormats.push(computed); + } else if (isTimeFormatOnly(computed)) { + timeRelatedFormats.push(computed); + } + } + } + } + + // Map time formats into a pattern for createDateTimeFormats + for (skeleton in timeFormats) { + if (timeFormats.hasOwnProperty(skeleton)) { + pattern = timeFormats[skeleton]; + computed = createDateTimeFormat(skeleton, pattern); + if (computed) { + result.push(computed); + timeRelatedFormats.push(computed); + } + } + } + + // Map date formats into a pattern for createDateTimeFormats + for (skeleton in dateFormats) { + if (dateFormats.hasOwnProperty(skeleton)) { + pattern = dateFormats[skeleton]; + computed = createDateTimeFormat(skeleton, pattern); + if (computed) { + result.push(computed); + dateRelatedFormats.push(computed); + } + } + } + + // combine custom time and custom date formats when they are orthogonals to complete the + // formats supported by CLDR. + // This Algo is based on section "Missing Skeleton Fields" from: + // http://unicode.org/reports/tr35/tr35-dates.html#availableFormats_appendItems + for (i = 0; i < timeRelatedFormats.length; i += 1) { + for (j = 0; j < dateRelatedFormats.length; j += 1) { + if (dateRelatedFormats[j].month === 'long') { + pattern = dateRelatedFormats[j].weekday ? formats.full : formats.long; + } else if (dateRelatedFormats[j].month === 'short') { + pattern = formats.medium; + } else { + pattern = formats.short; + } + computed = joinDateAndTimeFormats(dateRelatedFormats[j], timeRelatedFormats[i]); + computed.originalPattern = pattern; + computed.extendedPattern = pattern + .replace('{0}', timeRelatedFormats[i].extendedPattern) + .replace('{1}', dateRelatedFormats[j].extendedPattern) + .replace(/^[,\s]+|[,\s]+$/gi, ''); + result.push(computeFinalPatterns(computed)); + } + } + + return result; + } + + // this represents the exceptions of the rule that are not covered by CLDR availableFormats + // for single property configurations, they play no role when using multiple properties, and + // those that are not in this table, are not exceptions or are not covered by the data we + // provide. + var validSyntheticProps = { + second: { + numeric: 's', + '2-digit': 'ss', + }, + minute: { + numeric: 'm', + '2-digit': 'mm', + }, + year: { + numeric: 'y', + '2-digit': 'yy', + }, + day: { + numeric: 'd', + '2-digit': 'dd', + }, + month: { + numeric: 'L', + '2-digit': 'LL', + narrow: 'LLLLL', + short: 'LLL', + long: 'LLLL', + }, + weekday: { + narrow: 'ccccc', + short: 'ccc', + long: 'cccc', + }, + }; + + function generateSyntheticFormat(propName, propValue) { + if (validSyntheticProps[propName] && validSyntheticProps[propName][propValue]) { + var _ref2; + + return ( + (_ref2 = { + originalPattern: validSyntheticProps[propName][propValue], + _: defineProperty$1({}, propName, propValue), + extendedPattern: '{' + propName + '}', + }), + defineProperty$1(_ref2, propName, propValue), + defineProperty$1(_ref2, 'pattern12', '{' + propName + '}'), + defineProperty$1(_ref2, 'pattern', '{' + propName + '}'), + _ref2 + ); + } + } + + // An object map of date component keys, saves using a regex later + var dateWidths = objCreate(null, { narrow: {}, short: {}, long: {} }); + + /** + * Returns a string for a date component, resolved using multiple inheritance as specified + * as specified in the Unicode Technical Standard 35. + */ + function resolveDateString(data, ca, component, width, key) { + // From http://www.unicode.org/reports/tr35/tr35.html#Multiple_Inheritance: + // 'In clearly specified instances, resources may inherit from within the same locale. + // For example, ... the Buddhist calendar inherits from the Gregorian calendar.' + var obj = data[ca] && data[ca][component] ? data[ca][component] : data.gregory[component], + // "sideways" inheritance resolves strings when a key doesn't exist + alts = { + narrow: ['short', 'long'], + short: ['long', 'narrow'], + long: ['short', 'narrow'], + }, + // + resolved = hop.call(obj, width) + ? obj[width] + : hop.call(obj, alts[width][0]) + ? obj[alts[width][0]] + : obj[alts[width][1]]; + + // `key` wouldn't be specified for components 'dayPeriods' + return key !== null ? resolved[key] : resolved; + } + + // Define the DateTimeFormat constructor internally so it cannot be tainted + function DateTimeFormatConstructor() { + var locales = arguments[0]; + var options = arguments[1]; + + if (!this || this === Intl) { + return new Intl.DateTimeFormat(locales, options); + } + return InitializeDateTimeFormat(toObject(this), locales, options); + } + + defineProperty(Intl, 'DateTimeFormat', { + configurable: true, + writable: true, + value: DateTimeFormatConstructor, + }); + + // Must explicitly set prototypes as unwritable + defineProperty(DateTimeFormatConstructor, 'prototype', { + writable: false, + }); + + /** + * The abstract operation InitializeDateTimeFormat accepts the arguments dateTimeFormat + * (which must be an object), locales, and options. It initializes dateTimeFormat as a + * DateTimeFormat object. + */ + function /* 12.1.1.1 */ InitializeDateTimeFormat(dateTimeFormat, locales, options) { + // This will be a internal properties object if we're not already initialized + var internal = getInternalProperties(dateTimeFormat); + + // Create an object whose props can be used to restore the values of RegExp props + var regexpRestore = createRegExpRestore(); + + // 1. If dateTimeFormat has an [[initializedIntlObject]] internal property with + // value true, throw a TypeError exception. + if (internal['[[initializedIntlObject]]'] === true) + throw new TypeError('`this` object has already been initialized as an Intl object'); + + // Need this to access the `internal` object + defineProperty(dateTimeFormat, '__getInternalProperties', { + value: function value() { + // NOTE: Non-standard, for internal use only + if (arguments[0] === secret) return internal; + }, + }); + + // 2. Set the [[initializedIntlObject]] internal property of numberFormat to true. + internal['[[initializedIntlObject]]'] = true; + + // 3. Let requestedLocales be the result of calling the CanonicalizeLocaleList + // abstract operation (defined in 9.2.1) with argument locales. + var requestedLocales = CanonicalizeLocaleList(locales); + + // 4. Let options be the result of calling the ToDateTimeOptions abstract + // operation (defined below) with arguments options, "any", and "date". + options = ToDateTimeOptions(options, 'any', 'date'); + + // 5. Let opt be a new Record. + var opt = new Record(); + + // 6. Let matcher be the result of calling the GetOption abstract operation + // (defined in 9.2.9) with arguments options, "localeMatcher", "string", a List + // containing the two String values "lookup" and "best fit", and "best fit". + var matcher = GetOption( + options, + 'localeMatcher', + 'string', + new List('lookup', 'best fit'), + 'best fit', + ); + + // 7. Set opt.[[localeMatcher]] to matcher. + opt['[[localeMatcher]]'] = matcher; + + // 8. Let DateTimeFormat be the standard built-in object that is the initial + // value of Intl.DateTimeFormat. + var DateTimeFormat = internals.DateTimeFormat; // This is what we *really* need + + // 9. Let localeData be the value of the [[localeData]] internal property of + // DateTimeFormat. + var localeData = DateTimeFormat['[[localeData]]']; + + // 10. Let r be the result of calling the ResolveLocale abstract operation + // (defined in 9.2.5) with the [[availableLocales]] internal property of + // DateTimeFormat, requestedLocales, opt, the [[relevantExtensionKeys]] + // internal property of DateTimeFormat, and localeData. + var r = ResolveLocale( + DateTimeFormat['[[availableLocales]]'], + requestedLocales, + opt, + DateTimeFormat['[[relevantExtensionKeys]]'], + localeData, + ); + + // 11. Set the [[locale]] internal property of dateTimeFormat to the value of + // r.[[locale]]. + internal['[[locale]]'] = r['[[locale]]']; + + // 12. Set the [[calendar]] internal property of dateTimeFormat to the value of + // r.[[ca]]. + internal['[[calendar]]'] = r['[[ca]]']; + + // 13. Set the [[numberingSystem]] internal property of dateTimeFormat to the value of + // r.[[nu]]. + internal['[[numberingSystem]]'] = r['[[nu]]']; + + // The specification doesn't tell us to do this, but it's helpful later on + internal['[[dataLocale]]'] = r['[[dataLocale]]']; + + // 14. Let dataLocale be the value of r.[[dataLocale]]. + var dataLocale = r['[[dataLocale]]']; + + // 15. Let tz be the result of calling the [[Get]] internal method of options with + // argument "timeZone". + var tz = options.timeZone; + + // 16. If tz is not undefined, then + if (tz !== undefined) { + // a. Let tz be ToString(tz). + // b. Convert tz to upper case as described in 6.1. + // NOTE: If an implementation accepts additional time zone values, as permitted + // under certain conditions by the Conformance clause, different casing + // rules apply. + tz = toLatinUpperCase(tz); + + // c. If tz is not "UTC", then throw a RangeError exception. + // ###TODO: accept more time zones### + if (tz !== 'UTC') throw new RangeError('timeZone is not supported.'); + } + + // 17. Set the [[timeZone]] internal property of dateTimeFormat to tz. + internal['[[timeZone]]'] = tz; + + // 18. Let opt be a new Record. + opt = new Record(); + + // 19. For each row of Table 3, except the header row, do: + for (var prop in dateTimeComponents) { + if (!hop.call(dateTimeComponents, prop)) continue; + + // 20. Let prop be the name given in the Property column of the row. + // 21. Let value be the result of calling the GetOption abstract operation, + // passing as argument options, the name given in the Property column of the + // row, "string", a List containing the strings given in the Values column of + // the row, and undefined. + var value = GetOption(options, prop, 'string', dateTimeComponents[prop]); + + // 22. Set opt.[[<prop>]] to value. + opt['[[' + prop + ']]'] = value; + } + + // Assigned a value below + var bestFormat = void 0; + + // 23. Let dataLocaleData be the result of calling the [[Get]] internal method of + // localeData with argument dataLocale. + var dataLocaleData = localeData[dataLocale]; + + // 24. Let formats be the result of calling the [[Get]] internal method of + // dataLocaleData with argument "formats". + // Note: we process the CLDR formats into the spec'd structure + var formats = ToDateTimeFormats(dataLocaleData.formats); + + // 25. Let matcher be the result of calling the GetOption abstract operation with + // arguments options, "formatMatcher", "string", a List containing the two String + // values "basic" and "best fit", and "best fit". + matcher = GetOption(options, 'formatMatcher', 'string', new List('basic', 'best fit'), 'best fit'); + + // Optimization: caching the processed formats as a one time operation by + // replacing the initial structure from localeData + dataLocaleData.formats = formats; + + // 26. If matcher is "basic", then + if (matcher === 'basic') { + // 27. Let bestFormat be the result of calling the BasicFormatMatcher abstract + // operation (defined below) with opt and formats. + bestFormat = BasicFormatMatcher(opt, formats); + + // 28. Else + } else { + { + // diverging + var _hr = GetOption(options, 'hour12', 'boolean' /*, undefined, undefined*/); + opt.hour12 = _hr === undefined ? dataLocaleData.hour12 : _hr; + } + // 29. Let bestFormat be the result of calling the BestFitFormatMatcher + // abstract operation (defined below) with opt and formats. + bestFormat = BestFitFormatMatcher(opt, formats); + } + + // 30. For each row in Table 3, except the header row, do + for (var _prop in dateTimeComponents) { + if (!hop.call(dateTimeComponents, _prop)) continue; + + // a. Let prop be the name given in the Property column of the row. + // b. Let pDesc be the result of calling the [[GetOwnProperty]] internal method of + // bestFormat with argument prop. + // c. If pDesc is not undefined, then + if (hop.call(bestFormat, _prop)) { + // i. Let p be the result of calling the [[Get]] internal method of bestFormat + // with argument prop. + var p = bestFormat[_prop]; + { + // diverging + p = bestFormat._ && hop.call(bestFormat._, _prop) ? bestFormat._[_prop] : p; + } + + // ii. Set the [[<prop>]] internal property of dateTimeFormat to p. + internal['[[' + _prop + ']]'] = p; + } + } + + var pattern = void 0; // Assigned a value below + + // 31. Let hr12 be the result of calling the GetOption abstract operation with + // arguments options, "hour12", "boolean", undefined, and undefined. + var hr12 = GetOption(options, 'hour12', 'boolean' /*, undefined, undefined*/); + + // 32. If dateTimeFormat has an internal property [[hour]], then + if (internal['[[hour]]']) { + // a. If hr12 is undefined, then let hr12 be the result of calling the [[Get]] + // internal method of dataLocaleData with argument "hour12". + hr12 = hr12 === undefined ? dataLocaleData.hour12 : hr12; + + // b. Set the [[hour12]] internal property of dateTimeFormat to hr12. + internal['[[hour12]]'] = hr12; + + // c. If hr12 is true, then + if (hr12 === true) { + // i. Let hourNo0 be the result of calling the [[Get]] internal method of + // dataLocaleData with argument "hourNo0". + var hourNo0 = dataLocaleData.hourNo0; + + // ii. Set the [[hourNo0]] internal property of dateTimeFormat to hourNo0. + internal['[[hourNo0]]'] = hourNo0; + + // iii. Let pattern be the result of calling the [[Get]] internal method of + // bestFormat with argument "pattern12". + pattern = bestFormat.pattern12; + } + + // d. Else + else + // i. Let pattern be the result of calling the [[Get]] internal method of + // bestFormat with argument "pattern". + pattern = bestFormat.pattern; + } + + // 33. Else + else + // a. Let pattern be the result of calling the [[Get]] internal method of + // bestFormat with argument "pattern". + pattern = bestFormat.pattern; + + // 34. Set the [[pattern]] internal property of dateTimeFormat to pattern. + internal['[[pattern]]'] = pattern; + + // 35. Set the [[boundFormat]] internal property of dateTimeFormat to undefined. + internal['[[boundFormat]]'] = undefined; + + // 36. Set the [[initializedDateTimeFormat]] internal property of dateTimeFormat to + // true. + internal['[[initializedDateTimeFormat]]'] = true; + + // In ES3, we need to pre-bind the format() function + if (es3) dateTimeFormat.format = GetFormatDateTime.call(dateTimeFormat); + + // Restore the RegExp properties + regexpRestore(); + + // Return the newly initialised object + return dateTimeFormat; + } + + /** + * Several DateTimeFormat algorithms use values from the following table, which provides + * property names and allowable values for the components of date and time formats: + */ + var dateTimeComponents = { + weekday: ['narrow', 'short', 'long'], + era: ['narrow', 'short', 'long'], + year: ['2-digit', 'numeric'], + month: ['2-digit', 'numeric', 'narrow', 'short', 'long'], + day: ['2-digit', 'numeric'], + hour: ['2-digit', 'numeric'], + minute: ['2-digit', 'numeric'], + second: ['2-digit', 'numeric'], + timeZoneName: ['short', 'long'], + }; + + /** + * When the ToDateTimeOptions abstract operation is called with arguments options, + * required, and defaults, the following steps are taken: + */ + function ToDateTimeFormats(formats) { + if (Object.prototype.toString.call(formats) === '[object Array]') { + return formats; + } + return createDateTimeFormats(formats); + } + + /** + * When the ToDateTimeOptions abstract operation is called with arguments options, + * required, and defaults, the following steps are taken: + */ + function ToDateTimeOptions(options, required, defaults) { + // 1. If options is undefined, then let options be null, else let options be + // ToObject(options). + if (options === undefined) options = null; + else { + // (#12) options needs to be a Record, but it also needs to inherit properties + var opt2 = toObject(options); + options = new Record(); + + for (var k in opt2) { + options[k] = opt2[k]; + } + } + + // 2. Let create be the standard built-in function object defined in ES5, 15.2.3.5. + var create = objCreate; + + // 3. Let options be the result of calling the [[Call]] internal method of create with + // undefined as the this value and an argument list containing the single item + // options. + options = create(options); + + // 4. Let needDefaults be true. + var needDefaults = true; + + // 5. If required is "date" or "any", then + if (required === 'date' || required === 'any') { + // a. For each of the property names "weekday", "year", "month", "day": + // i. If the result of calling the [[Get]] internal method of options with the + // property name is not undefined, then let needDefaults be false. + if ( + options.weekday !== undefined || + options.year !== undefined || + options.month !== undefined || + options.day !== undefined + ) + needDefaults = false; + } + + // 6. If required is "time" or "any", then + if (required === 'time' || required === 'any') { + // a. For each of the property names "hour", "minute", "second": + // i. If the result of calling the [[Get]] internal method of options with the + // property name is not undefined, then let needDefaults be false. + if (options.hour !== undefined || options.minute !== undefined || options.second !== undefined) + needDefaults = false; + } + + // 7. If needDefaults is true and defaults is either "date" or "all", then + if (needDefaults && (defaults === 'date' || defaults === 'all')) + // a. For each of the property names "year", "month", "day": + // i. Call the [[DefineOwnProperty]] internal method of options with the + // property name, Property Descriptor {[[Value]]: "numeric", [[Writable]]: + // true, [[Enumerable]]: true, [[Configurable]]: true}, and false. + options.year = options.month = options.day = 'numeric'; + + // 8. If needDefaults is true and defaults is either "time" or "all", then + if (needDefaults && (defaults === 'time' || defaults === 'all')) + // a. For each of the property names "hour", "minute", "second": + // i. Call the [[DefineOwnProperty]] internal method of options with the + // property name, Property Descriptor {[[Value]]: "numeric", [[Writable]]: + // true, [[Enumerable]]: true, [[Configurable]]: true}, and false. + options.hour = options.minute = options.second = 'numeric'; + + // 9. Return options. + return options; + } + + /** + * When the BasicFormatMatcher abstract operation is called with two arguments options and + * formats, the following steps are taken: + */ + function BasicFormatMatcher(options, formats) { + // 1. Let removalPenalty be 120. + var removalPenalty = 120; + + // 2. Let additionPenalty be 20. + var additionPenalty = 20; + + // 3. Let longLessPenalty be 8. + var longLessPenalty = 8; + + // 4. Let longMorePenalty be 6. + var longMorePenalty = 6; + + // 5. Let shortLessPenalty be 6. + var shortLessPenalty = 6; + + // 6. Let shortMorePenalty be 3. + var shortMorePenalty = 3; + + // 7. Let bestScore be -Infinity. + var bestScore = -Infinity; + + // 8. Let bestFormat be undefined. + var bestFormat = void 0; + + // 9. Let i be 0. + var i = 0; + + // 10. Assert: formats is an Array object. + + // 11. Let len be the result of calling the [[Get]] internal method of formats with argument "length". + var len = formats.length; + + // 12. Repeat while i < len: + while (i < len) { + // a. Let format be the result of calling the [[Get]] internal method of formats with argument ToString(i). + var format = formats[i]; + + // b. Let score be 0. + var score = 0; + + // c. For each property shown in Table 3: + for (var property in dateTimeComponents) { + if (!hop.call(dateTimeComponents, property)) continue; + + // i. Let optionsProp be options.[[<property>]]. + var optionsProp = options['[[' + property + ']]']; + + // ii. Let formatPropDesc be the result of calling the [[GetOwnProperty]] internal method of format + // with argument property. + // iii. If formatPropDesc is not undefined, then + // 1. Let formatProp be the result of calling the [[Get]] internal method of format with argument property. + var formatProp = hop.call(format, property) ? format[property] : undefined; + + // iv. If optionsProp is undefined and formatProp is not undefined, then decrease score by + // additionPenalty. + if (optionsProp === undefined && formatProp !== undefined) score -= additionPenalty; + // v. Else if optionsProp is not undefined and formatProp is undefined, then decrease score by + // removalPenalty. + else if (optionsProp !== undefined && formatProp === undefined) score -= removalPenalty; + // vi. Else + else { + // 1. Let values be the array ["2-digit", "numeric", "narrow", "short", + // "long"]. + var values = ['2-digit', 'numeric', 'narrow', 'short', 'long']; + + // 2. Let optionsPropIndex be the index of optionsProp within values. + var optionsPropIndex = arrIndexOf.call(values, optionsProp); + + // 3. Let formatPropIndex be the index of formatProp within values. + var formatPropIndex = arrIndexOf.call(values, formatProp); + + // 4. Let delta be max(min(formatPropIndex - optionsPropIndex, 2), -2). + var delta = Math.max(Math.min(formatPropIndex - optionsPropIndex, 2), -2); + + // 5. If delta = 2, decrease score by longMorePenalty. + if (delta === 2) score -= longMorePenalty; + // 6. Else if delta = 1, decrease score by shortMorePenalty. + else if (delta === 1) score -= shortMorePenalty; + // 7. Else if delta = -1, decrease score by shortLessPenalty. + else if (delta === -1) score -= shortLessPenalty; + // 8. Else if delta = -2, decrease score by longLessPenalty. + else if (delta === -2) score -= longLessPenalty; + } + } + + // d. If score > bestScore, then + if (score > bestScore) { + // i. Let bestScore be score. + bestScore = score; + + // ii. Let bestFormat be format. + bestFormat = format; + } + + // e. Increase i by 1. + i++; + } + + // 13. Return bestFormat. + return bestFormat; + } + + /** + * When the BestFitFormatMatcher abstract operation is called with two arguments options + * and formats, it performs implementation dependent steps, which should return a set of + * component representations that a typical user of the selected locale would perceive as + * at least as good as the one returned by BasicFormatMatcher. + * + * This polyfill defines the algorithm to be the same as BasicFormatMatcher, + * with the addition of bonus points awarded where the requested format is of + * the same data type as the potentially matching format. + * + * This algo relies on the concept of closest distance matching described here: + * http://unicode.org/reports/tr35/tr35-dates.html#Matching_Skeletons + * Typically a “best match” is found using a closest distance match, such as: + * + * Symbols requesting a best choice for the locale are replaced. + * j → one of {H, k, h, K}; C → one of {a, b, B} + * -> Covered by cldr.js matching process + * + * For fields with symbols representing the same type (year, month, day, etc): + * Most symbols have a small distance from each other. + * M ≅ L; E ≅ c; a ≅ b ≅ B; H ≅ k ≅ h ≅ K; ... + * -> Covered by cldr.js matching process + * + * Width differences among fields, other than those marking text vs numeric, are given small distance from each other. + * MMM ≅ MMMM + * MM ≅ M + * Numeric and text fields are given a larger distance from each other. + * MMM ≈ MM + * Symbols representing substantial differences (week of year vs week of month) are given much larger a distances from each other. + * d ≋ D; ... + * Missing or extra fields cause a match to fail. (But see Missing Skeleton Fields). + * + * + * For example, + * + * { month: 'numeric', day: 'numeric' } + * + * should match + * + * { month: '2-digit', day: '2-digit' } + * + * rather than + * + * { month: 'short', day: 'numeric' } + * + * This makes sense because a user requesting a formatted date with numeric parts would + * not expect to see the returned format containing narrow, short or long part names + */ + function BestFitFormatMatcher(options, formats) { + /** Diverging: this block implements the hack for single property configuration, eg.: + * + * `new Intl.DateTimeFormat('en', {day: 'numeric'})` + * + * should produce a single digit with the day of the month. This is needed because + * CLDR `availableFormats` data structure doesn't cover these cases. + */ + { + var optionsPropNames = []; + for (var property in dateTimeComponents) { + if (!hop.call(dateTimeComponents, property)) continue; + + if (options['[[' + property + ']]'] !== undefined) { + optionsPropNames.push(property); + } + } + if (optionsPropNames.length === 1) { + var _bestFormat = generateSyntheticFormat( + optionsPropNames[0], + options['[[' + optionsPropNames[0] + ']]'], + ); + if (_bestFormat) { + return _bestFormat; + } + } + } + + // 1. Let removalPenalty be 120. + var removalPenalty = 120; + + // 2. Let additionPenalty be 20. + var additionPenalty = 20; + + // 3. Let longLessPenalty be 8. + var longLessPenalty = 8; + + // 4. Let longMorePenalty be 6. + var longMorePenalty = 6; + + // 5. Let shortLessPenalty be 6. + var shortLessPenalty = 6; + + // 6. Let shortMorePenalty be 3. + var shortMorePenalty = 3; + + var patternPenalty = 2; + + var hour12Penalty = 1; + + // 7. Let bestScore be -Infinity. + var bestScore = -Infinity; + + // 8. Let bestFormat be undefined. + var bestFormat = void 0; + + // 9. Let i be 0. + var i = 0; + + // 10. Assert: formats is an Array object. + + // 11. Let len be the result of calling the [[Get]] internal method of formats with argument "length". + var len = formats.length; + + // 12. Repeat while i < len: + while (i < len) { + // a. Let format be the result of calling the [[Get]] internal method of formats with argument ToString(i). + var format = formats[i]; + + // b. Let score be 0. + var score = 0; + + // c. For each property shown in Table 3: + for (var _property in dateTimeComponents) { + if (!hop.call(dateTimeComponents, _property)) continue; + + // i. Let optionsProp be options.[[<property>]]. + var optionsProp = options['[[' + _property + ']]']; + + // ii. Let formatPropDesc be the result of calling the [[GetOwnProperty]] internal method of format + // with argument property. + // iii. If formatPropDesc is not undefined, then + // 1. Let formatProp be the result of calling the [[Get]] internal method of format with argument property. + var formatProp = hop.call(format, _property) ? format[_property] : undefined; + + // Diverging: using the default properties produced by the pattern/skeleton + // to match it with user options, and apply a penalty + var patternProp = hop.call(format._, _property) ? format._[_property] : undefined; + if (optionsProp !== patternProp) { + score -= patternPenalty; + } + + // iv. If optionsProp is undefined and formatProp is not undefined, then decrease score by + // additionPenalty. + if (optionsProp === undefined && formatProp !== undefined) score -= additionPenalty; + // v. Else if optionsProp is not undefined and formatProp is undefined, then decrease score by + // removalPenalty. + else if (optionsProp !== undefined && formatProp === undefined) score -= removalPenalty; + // vi. Else + else { + // 1. Let values be the array ["2-digit", "numeric", "narrow", "short", + // "long"]. + var values = ['2-digit', 'numeric', 'narrow', 'short', 'long']; + + // 2. Let optionsPropIndex be the index of optionsProp within values. + var optionsPropIndex = arrIndexOf.call(values, optionsProp); + + // 3. Let formatPropIndex be the index of formatProp within values. + var formatPropIndex = arrIndexOf.call(values, formatProp); + + // 4. Let delta be max(min(formatPropIndex - optionsPropIndex, 2), -2). + var delta = Math.max(Math.min(formatPropIndex - optionsPropIndex, 2), -2); + + { + // diverging from spec + // When the bestFit argument is true, subtract additional penalty where data types are not the same + if ( + (formatPropIndex <= 1 && optionsPropIndex >= 2) || + (formatPropIndex >= 2 && optionsPropIndex <= 1) + ) { + // 5. If delta = 2, decrease score by longMorePenalty. + if (delta > 0) score -= longMorePenalty; + else if (delta < 0) score -= longLessPenalty; + } else { + // 5. If delta = 2, decrease score by longMorePenalty. + if (delta > 1) score -= shortMorePenalty; + else if (delta < -1) score -= shortLessPenalty; + } + } + } + } + + { + // diverging to also take into consideration differences between 12 or 24 hours + // which is special for the best fit only. + if (format._.hour12 !== options.hour12) { + score -= hour12Penalty; + } + } + + // d. If score > bestScore, then + if (score > bestScore) { + // i. Let bestScore be score. + bestScore = score; + // ii. Let bestFormat be format. + bestFormat = format; + } + + // e. Increase i by 1. + i++; + } + + // 13. Return bestFormat. + return bestFormat; + } + + /* 12.2.3 */ internals.DateTimeFormat = { + '[[availableLocales]]': [], + '[[relevantExtensionKeys]]': ['ca', 'nu'], + '[[localeData]]': {}, + }; + + /** + * When the supportedLocalesOf method of Intl.DateTimeFormat is called, the + * following steps are taken: + */ + /* 12.2.2 */ + defineProperty(Intl.DateTimeFormat, 'supportedLocalesOf', { + configurable: true, + writable: true, + value: fnBind.call(function (locales) { + // Bound functions only have the `this` value altered if being used as a constructor, + // this lets us imitate a native function that has no constructor + if (!hop.call(this, '[[availableLocales]]')) + throw new TypeError('supportedLocalesOf() is not a constructor'); + + // Create an object whose props can be used to restore the values of RegExp props + var regexpRestore = createRegExpRestore(), + // 1. If options is not provided, then let options be undefined. + options = arguments[1], + // 2. Let availableLocales be the value of the [[availableLocales]] internal + // property of the standard built-in object that is the initial value of + // Intl.NumberFormat. + + availableLocales = this['[[availableLocales]]'], + // 3. Let requestedLocales be the result of calling the CanonicalizeLocaleList + // abstract operation (defined in 9.2.1) with argument locales. + requestedLocales = CanonicalizeLocaleList(locales); + + // Restore the RegExp properties + regexpRestore(); + + // 4. Return the result of calling the SupportedLocales abstract operation + // (defined in 9.2.8) with arguments availableLocales, requestedLocales, + // and options. + return SupportedLocales(availableLocales, requestedLocales, options); + }, internals.NumberFormat), + }); + + /** + * This named accessor property returns a function that formats a number + * according to the effective locale and the formatting options of this + * DateTimeFormat object. + */ + /* 12.3.2 */ defineProperty(Intl.DateTimeFormat.prototype, 'format', { + configurable: true, + get: GetFormatDateTime, + }); + + function GetFormatDateTime() { + var internal = + this !== null && babelHelpers$1['typeof'](this) === 'object' && getInternalProperties(this); + + // Satisfy test 12.3_b + if (!internal || !internal['[[initializedDateTimeFormat]]']) + throw new TypeError( + '`this` value for format() is not an initialized Intl.DateTimeFormat object.', + ); + + // The value of the [[Get]] attribute is a function that takes the following + // steps: + + // 1. If the [[boundFormat]] internal property of this DateTimeFormat object + // is undefined, then: + if (internal['[[boundFormat]]'] === undefined) { + // a. Let F be a Function object, with internal properties set as + // specified for built-in functions in ES5, 15, or successor, and the + // length property set to 0, that takes the argument date and + // performs the following steps: + var F = function F() { + var date = arguments.length <= 0 || arguments[0] === undefined ? undefined : arguments[0]; + + // i. If date is not provided or is undefined, then let x be the + // result as if by the expression Date.now() where Date.now is + // the standard built-in function defined in ES5, 15.9.4.4. + // ii. Else let x be ToNumber(date). + // iii. Return the result of calling the FormatDateTime abstract + // operation (defined below) with arguments this and x. + var x = date === undefined ? Date.now() : toNumber(date); + return FormatDateTime(this, x); + }; + // b. Let bind be the standard built-in function object defined in ES5, + // 15.3.4.5. + // c. Let bf be the result of calling the [[Call]] internal method of + // bind with F as the this value and an argument list containing + // the single item this. + var bf = fnBind.call(F, this); + // d. Set the [[boundFormat]] internal property of this NumberFormat + // object to bf. + internal['[[boundFormat]]'] = bf; + } + // Return the value of the [[boundFormat]] internal property of this + // NumberFormat object. + return internal['[[boundFormat]]']; + } + + function formatToParts$1() { + var date = arguments.length <= 0 || arguments[0] === undefined ? undefined : arguments[0]; + + var internal = + this !== null && babelHelpers$1['typeof'](this) === 'object' && getInternalProperties(this); + + if (!internal || !internal['[[initializedDateTimeFormat]]']) + throw new TypeError( + '`this` value for formatToParts() is not an initialized Intl.DateTimeFormat object.', + ); + + var x = date === undefined ? Date.now() : toNumber(date); + return FormatToPartsDateTime(this, x); + } + + Object.defineProperty(Intl.DateTimeFormat.prototype, 'formatToParts', { + enumerable: false, + writable: true, + configurable: true, + value: formatToParts$1, + }); + + function CreateDateTimeParts(dateTimeFormat, x) { + // 1. If x is not a finite Number, then throw a RangeError exception. + if (!isFinite(x)) throw new RangeError('Invalid valid date passed to format'); + + var internal = dateTimeFormat.__getInternalProperties(secret); + + // Creating restore point for properties on the RegExp object... please wait + /* let regexpRestore = */ createRegExpRestore(); // ###TODO: review this + + // 2. Let locale be the value of the [[locale]] internal property of dateTimeFormat. + var locale = internal['[[locale]]']; + + // 3. Let nf be the result of creating a new NumberFormat object as if by the + // expression new Intl.NumberFormat([locale], {useGrouping: false}) where + // Intl.NumberFormat is the standard built-in constructor defined in 11.1.3. + var nf = new Intl.NumberFormat([locale], { useGrouping: false }); + + // 4. Let nf2 be the result of creating a new NumberFormat object as if by the + // expression new Intl.NumberFormat([locale], {minimumIntegerDigits: 2, useGrouping: + // false}) where Intl.NumberFormat is the standard built-in constructor defined in + // 11.1.3. + var nf2 = new Intl.NumberFormat([locale], { minimumIntegerDigits: 2, useGrouping: false }); + + // 5. Let tm be the result of calling the ToLocalTime abstract operation (defined + // below) with x, the value of the [[calendar]] internal property of dateTimeFormat, + // and the value of the [[timeZone]] internal property of dateTimeFormat. + var tm = ToLocalTime(x, internal['[[calendar]]'], internal['[[timeZone]]']); + + // 6. Let result be the value of the [[pattern]] internal property of dateTimeFormat. + var pattern = internal['[[pattern]]']; + + // 7. + var result = new List(); + + // 8. + var index = 0; + + // 9. + var beginIndex = pattern.indexOf('{'); + + // 10. + var endIndex = 0; + + // Need the locale minus any extensions + var dataLocale = internal['[[dataLocale]]']; + + // Need the calendar data from CLDR + var localeData = internals.DateTimeFormat['[[localeData]]'][dataLocale].calendars; + var ca = internal['[[calendar]]']; + + // 11. + while (beginIndex !== -1) { + var fv = void 0; + // a. + endIndex = pattern.indexOf('}', beginIndex); + // b. + if (endIndex === -1) { + throw new Error('Unclosed pattern'); + } + // c. + if (beginIndex > index) { + arrPush.call(result, { + type: 'literal', + value: pattern.substring(index, beginIndex), + }); + } + // d. + var p = pattern.substring(beginIndex + 1, endIndex); + // e. + if (dateTimeComponents.hasOwnProperty(p)) { + // i. Let f be the value of the [[<p>]] internal property of dateTimeFormat. + var f = internal['[[' + p + ']]']; + // ii. Let v be the value of tm.[[<p>]]. + var v = tm['[[' + p + ']]']; + // iii. If p is "year" and v ≤ 0, then let v be 1 - v. + if (p === 'year' && v <= 0) { + v = 1 - v; + } + // iv. If p is "month", then increase v by 1. + else if (p === 'month') { + v++; + } + // v. If p is "hour" and the value of the [[hour12]] internal property of + // dateTimeFormat is true, then + else if (p === 'hour' && internal['[[hour12]]'] === true) { + // 1. Let v be v modulo 12. + v = v % 12; + // 2. If v is 0 and the value of the [[hourNo0]] internal property of + // dateTimeFormat is true, then let v be 12. + if (v === 0 && internal['[[hourNo0]]'] === true) { + v = 12; + } + } + + // vi. If f is "numeric", then + if (f === 'numeric') { + // 1. Let fv be the result of calling the FormatNumber abstract operation + // (defined in 11.3.2) with arguments nf and v. + fv = FormatNumber(nf, v); + } + // vii. Else if f is "2-digit", then + else if (f === '2-digit') { + // 1. Let fv be the result of calling the FormatNumber abstract operation + // with arguments nf2 and v. + fv = FormatNumber(nf2, v); + // 2. If the length of fv is greater than 2, let fv be the substring of fv + // containing the last two characters. + if (fv.length > 2) { + fv = fv.slice(-2); + } + } + // viii. Else if f is "narrow", "short", or "long", then let fv be a String + // value representing f in the desired form; the String value depends upon + // the implementation and the effective locale and calendar of + // dateTimeFormat. If p is "month", then the String value may also depend + // on whether dateTimeFormat has a [[day]] internal property. If p is + // "timeZoneName", then the String value may also depend on the value of + // the [[inDST]] field of tm. + else if (f in dateWidths) { + switch (p) { + case 'month': + fv = resolveDateString(localeData, ca, 'months', f, tm['[[' + p + ']]']); + break; + + case 'weekday': + try { + fv = resolveDateString(localeData, ca, 'days', f, tm['[[' + p + ']]']); + // fv = resolveDateString(ca.days, f)[tm['[['+ p +']]']]; + } catch (e) { + throw new Error('Could not find weekday data for locale ' + locale); + } + break; + + case 'timeZoneName': + fv = ''; // ###TODO + break; + + case 'era': + try { + fv = resolveDateString(localeData, ca, 'eras', f, tm['[[' + p + ']]']); + } catch (e) { + throw new Error('Could not find era data for locale ' + locale); + } + break; + + default: + fv = tm['[[' + p + ']]']; + } + } + // ix + arrPush.call(result, { + type: p, + value: fv, + }); + // f. + } else if (p === 'ampm') { + // i. + var _v = tm['[[hour]]']; + // ii./iii. + fv = resolveDateString(localeData, ca, 'dayPeriods', _v > 11 ? 'pm' : 'am', null); + // iv. + arrPush.call(result, { + type: 'dayPeriod', + value: fv, + }); + // g. + } else { + arrPush.call(result, { + type: 'literal', + value: pattern.substring(beginIndex, endIndex + 1), + }); + } + // h. + index = endIndex + 1; + // i. + beginIndex = pattern.indexOf('{', index); + } + // 12. + if (endIndex < pattern.length - 1) { + arrPush.call(result, { + type: 'literal', + value: pattern.substr(endIndex + 1), + }); + } + // 13. + return result; + } + + /** + * When the FormatDateTime abstract operation is called with arguments dateTimeFormat + * (which must be an object initialized as a DateTimeFormat) and x (which must be a Number + * value), it returns a String value representing x (interpreted as a time value as + * specified in ES5, 15.9.1.1) according to the effective locale and the formatting + * options of dateTimeFormat. + */ + function FormatDateTime(dateTimeFormat, x) { + var parts = CreateDateTimeParts(dateTimeFormat, x); + var result = ''; + + for (var i = 0; parts.length > i; i++) { + var part = parts[i]; + result += part.value; + } + return result; + } + + function FormatToPartsDateTime(dateTimeFormat, x) { + var parts = CreateDateTimeParts(dateTimeFormat, x); + var result = []; + for (var i = 0; parts.length > i; i++) { + var part = parts[i]; + result.push({ + type: part.type, + value: part.value, + }); + } + return result; + } + + /** + * When the ToLocalTime abstract operation is called with arguments date, calendar, and + * timeZone, the following steps are taken: + */ + function ToLocalTime(date, calendar, timeZone) { + // 1. Apply calendrical calculations on date for the given calendar and time zone to + // produce weekday, era, year, month, day, hour, minute, second, and inDST values. + // The calculations should use best available information about the specified + // calendar and time zone. If the calendar is "gregory", then the calculations must + // match the algorithms specified in ES5, 15.9.1, except that calculations are not + // bound by the restrictions on the use of best available information on time zones + // for local time zone adjustment and daylight saving time adjustment imposed by + // ES5, 15.9.1.7 and 15.9.1.8. + // ###TODO### + var d = new Date(date), + m = 'get' + (timeZone || ''); + + // 2. Return a Record with fields [[weekday]], [[era]], [[year]], [[month]], [[day]], + // [[hour]], [[minute]], [[second]], and [[inDST]], each with the corresponding + // calculated value. + return new Record({ + '[[weekday]]': d[m + 'Day'](), + '[[era]]': +(d[m + 'FullYear']() >= 0), + '[[year]]': d[m + 'FullYear'](), + '[[month]]': d[m + 'Month'](), + '[[day]]': d[m + 'Date'](), + '[[hour]]': d[m + 'Hours'](), + '[[minute]]': d[m + 'Minutes'](), + '[[second]]': d[m + 'Seconds'](), + '[[inDST]]': false, // ###TODO### + }); + } + + /** + * The function returns a new object whose properties and attributes are set as if + * constructed by an object literal assigning to each of the following properties the + * value of the corresponding internal property of this DateTimeFormat object (see 12.4): + * locale, calendar, numberingSystem, timeZone, hour12, weekday, era, year, month, day, + * hour, minute, second, and timeZoneName. Properties whose corresponding internal + * properties are not present are not assigned. + */ + /* 12.3.3 */ defineProperty(Intl.DateTimeFormat.prototype, 'resolvedOptions', { + writable: true, + configurable: true, + value: function value() { + var prop = void 0, + descs = new Record(), + props = [ + 'locale', + 'calendar', + 'numberingSystem', + 'timeZone', + 'hour12', + 'weekday', + 'era', + 'year', + 'month', + 'day', + 'hour', + 'minute', + 'second', + 'timeZoneName', + ], + internal = + this !== null && babelHelpers$1['typeof'](this) === 'object' && getInternalProperties(this); + + // Satisfy test 12.3_b + if (!internal || !internal['[[initializedDateTimeFormat]]']) + throw new TypeError( + '`this` value for resolvedOptions() is not an initialized Intl.DateTimeFormat object.', + ); + + for (var i = 0, max = props.length; i < max; i++) { + if (hop.call(internal, (prop = '[[' + props[i] + ']]'))) + descs[props[i]] = { + value: internal[prop], + writable: true, + configurable: true, + enumerable: true, + }; + } + + return objCreate({}, descs); + }, + }); + + var ls = (Intl.__localeSensitiveProtos = { + Number: {}, + Date: {}, + }); + + /** + * When the toLocaleString method is called with optional arguments locales and options, + * the following steps are taken: + */ + /* 13.2.1 */ ls.Number.toLocaleString = function () { + // Satisfy test 13.2.1_1 + if (Object.prototype.toString.call(this) !== '[object Number]') + throw new TypeError('`this` value must be a number for Number.prototype.toLocaleString()'); + + // 1. Let x be this Number value (as defined in ES5, 15.7.4). + // 2. If locales is not provided, then let locales be undefined. + // 3. If options is not provided, then let options be undefined. + // 4. Let numberFormat be the result of creating a new object as if by the + // expression new Intl.NumberFormat(locales, options) where + // Intl.NumberFormat is the standard built-in constructor defined in 11.1.3. + // 5. Return the result of calling the FormatNumber abstract operation + // (defined in 11.3.2) with arguments numberFormat and x. + return FormatNumber(new NumberFormatConstructor(arguments[0], arguments[1]), this); + }; + + /** + * When the toLocaleString method is called with optional arguments locales and options, + * the following steps are taken: + */ + /* 13.3.1 */ ls.Date.toLocaleString = function () { + // Satisfy test 13.3.0_1 + if (Object.prototype.toString.call(this) !== '[object Date]') + throw new TypeError('`this` value must be a Date instance for Date.prototype.toLocaleString()'); + + // 1. Let x be this time value (as defined in ES5, 15.9.5). + var x = +this; + + // 2. If x is NaN, then return "Invalid Date". + if (isNaN(x)) return 'Invalid Date'; + + // 3. If locales is not provided, then let locales be undefined. + var locales = arguments[0]; + + // 4. If options is not provided, then let options be undefined. + var options = arguments[1]; + + // 5. Let options be the result of calling the ToDateTimeOptions abstract + // operation (defined in 12.1.1) with arguments options, "any", and "all". + options = ToDateTimeOptions(options, 'any', 'all'); + + // 6. Let dateTimeFormat be the result of creating a new object as if by the + // expression new Intl.DateTimeFormat(locales, options) where + // Intl.DateTimeFormat is the standard built-in constructor defined in 12.1.3. + var dateTimeFormat = new DateTimeFormatConstructor(locales, options); + + // 7. Return the result of calling the FormatDateTime abstract operation (defined + // in 12.3.2) with arguments dateTimeFormat and x. + return FormatDateTime(dateTimeFormat, x); + }; + + /** + * When the toLocaleDateString method is called with optional arguments locales and + * options, the following steps are taken: + */ + /* 13.3.2 */ ls.Date.toLocaleDateString = function () { + // Satisfy test 13.3.0_1 + if (Object.prototype.toString.call(this) !== '[object Date]') + throw new TypeError( + '`this` value must be a Date instance for Date.prototype.toLocaleDateString()', + ); + + // 1. Let x be this time value (as defined in ES5, 15.9.5). + var x = +this; + + // 2. If x is NaN, then return "Invalid Date". + if (isNaN(x)) return 'Invalid Date'; + + // 3. If locales is not provided, then let locales be undefined. + var locales = arguments[0], + // 4. If options is not provided, then let options be undefined. + options = arguments[1]; + + // 5. Let options be the result of calling the ToDateTimeOptions abstract + // operation (defined in 12.1.1) with arguments options, "date", and "date". + options = ToDateTimeOptions(options, 'date', 'date'); + + // 6. Let dateTimeFormat be the result of creating a new object as if by the + // expression new Intl.DateTimeFormat(locales, options) where + // Intl.DateTimeFormat is the standard built-in constructor defined in 12.1.3. + var dateTimeFormat = new DateTimeFormatConstructor(locales, options); + + // 7. Return the result of calling the FormatDateTime abstract operation (defined + // in 12.3.2) with arguments dateTimeFormat and x. + return FormatDateTime(dateTimeFormat, x); + }; + + /** + * When the toLocaleTimeString method is called with optional arguments locales and + * options, the following steps are taken: + */ + /* 13.3.3 */ ls.Date.toLocaleTimeString = function () { + // Satisfy test 13.3.0_1 + if (Object.prototype.toString.call(this) !== '[object Date]') + throw new TypeError( + '`this` value must be a Date instance for Date.prototype.toLocaleTimeString()', + ); + + // 1. Let x be this time value (as defined in ES5, 15.9.5). + var x = +this; + + // 2. If x is NaN, then return "Invalid Date". + if (isNaN(x)) return 'Invalid Date'; + + // 3. If locales is not provided, then let locales be undefined. + var locales = arguments[0]; + + // 4. If options is not provided, then let options be undefined. + var options = arguments[1]; + + // 5. Let options be the result of calling the ToDateTimeOptions abstract + // operation (defined in 12.1.1) with arguments options, "time", and "time". + options = ToDateTimeOptions(options, 'time', 'time'); + + // 6. Let dateTimeFormat be the result of creating a new object as if by the + // expression new Intl.DateTimeFormat(locales, options) where + // Intl.DateTimeFormat is the standard built-in constructor defined in 12.1.3. + var dateTimeFormat = new DateTimeFormatConstructor(locales, options); + + // 7. Return the result of calling the FormatDateTime abstract operation (defined + // in 12.3.2) with arguments dateTimeFormat and x. + return FormatDateTime(dateTimeFormat, x); + }; + + defineProperty(Intl, '__applyLocaleSensitivePrototypes', { + writable: true, + configurable: true, + value: function value() { + defineProperty(Number.prototype, 'toLocaleString', { + writable: true, + configurable: true, + value: ls.Number.toLocaleString, + }); + // Need this here for IE 8, to avoid the _DontEnum_ bug + defineProperty(Date.prototype, 'toLocaleString', { + writable: true, + configurable: true, + value: ls.Date.toLocaleString, + }); + + for (var k in ls.Date) { + if (hop.call(ls.Date, k)) + defineProperty(Date.prototype, k, { writable: true, configurable: true, value: ls.Date[k] }); + } + }, + }); + + /** + * Can't really ship a single script with data for hundreds of locales, so we provide + * this __addLocaleData method as a means for the developer to add the data on an + * as-needed basis + */ + defineProperty(Intl, '__addLocaleData', { + value: function value(data) { + if (!IsStructurallyValidLanguageTag(data.locale)) + throw new Error("Object passed doesn't identify itself with a valid language tag"); + + addLocaleData(data, data.locale); + }, + }); + + function addLocaleData(data, tag) { + // Both NumberFormat and DateTimeFormat require number data, so throw if it isn't present + if (!data.number) + throw new Error("Object passed doesn't contain locale data for Intl.NumberFormat"); + + var locale = void 0, + locales = [tag], + parts = tag.split('-'); + + // Create fallbacks for locale data with scripts, e.g. Latn, Hans, Vaii, etc + if (parts.length > 2 && parts[1].length === 4) arrPush.call(locales, parts[0] + '-' + parts[2]); + + while ((locale = arrShift.call(locales))) { + // Add to NumberFormat internal properties as per 11.2.3 + arrPush.call(internals.NumberFormat['[[availableLocales]]'], locale); + internals.NumberFormat['[[localeData]]'][locale] = data.number; + + // ...and DateTimeFormat internal properties as per 12.2.3 + if (data.date) { + data.date.nu = data.number.nu; + arrPush.call(internals.DateTimeFormat['[[availableLocales]]'], locale); + internals.DateTimeFormat['[[localeData]]'][locale] = data.date; + } + } + + // If this is the first set of locale data added, make it the default + if (defaultLocale === undefined) setDefaultLocale(tag); + } + + defineProperty(Intl, '__disableRegExpRestore', { + value: function value() { + internals.disableRegExpRestore = true; + }, + }); + + module.exports = Intl; + /* WEBPACK VAR INJECTION */ + }).call(exports, __webpack_require__(22)); + + /***/ + }, + /* 687 */ + /***/ function (module, exports) { + var toString = {}.toString; + + module.exports = + Array.isArray || + function (arr) { + return toString.call(arr) == '[object Array]'; + }; + + /***/ + }, + /* 688 */ + /***/ function (module, exports) { + // Source: http://jsfiddle.net/vWx8V/ + // http://stackoverflow.com/questions/5603195/full-list-of-javascript-keycodes + + /** + * Conenience method returns corresponding value for given keyName or keyCode. + * + * @param {Mixed} keyCode {Number} or keyName {String} + * @return {Mixed} + * @api public + */ + + exports = module.exports = function (searchInput) { + // Keyboard Events + if (searchInput && 'object' === typeof searchInput) { + var hasKeyCode = searchInput.which || searchInput.keyCode || searchInput.charCode; + if (hasKeyCode) searchInput = hasKeyCode; + } + + // Numbers + if ('number' === typeof searchInput) return names[searchInput]; + + // Everything else (cast to string) + var search = String(searchInput); + + // check codes + var foundNamedKey = codes[search.toLowerCase()]; + if (foundNamedKey) return foundNamedKey; + + // check aliases + var foundNamedKey = aliases[search.toLowerCase()]; + if (foundNamedKey) return foundNamedKey; + + // weird character? + if (search.length === 1) return search.charCodeAt(0); + + return undefined; + }; + + /** + * Get by name + * + * exports.code['enter'] // => 13 + */ + + var codes = + (exports.code = + exports.codes = + { + backspace: 8, + tab: 9, + enter: 13, + shift: 16, + ctrl: 17, + alt: 18, + 'pause/break': 19, + 'caps lock': 20, + esc: 27, + space: 32, + 'page up': 33, + 'page down': 34, + end: 35, + home: 36, + left: 37, + up: 38, + right: 39, + down: 40, + insert: 45, + delete: 46, + command: 91, + 'left command': 91, + 'right command': 93, + 'numpad *': 106, + 'numpad +': 107, + 'numpad -': 109, + 'numpad .': 110, + 'numpad /': 111, + 'num lock': 144, + 'scroll lock': 145, + 'my computer': 182, + 'my calculator': 183, + ';': 186, + '=': 187, + ',': 188, + '-': 189, + '.': 190, + '/': 191, + '`': 192, + '[': 219, + '\\': 220, + ']': 221, + "'": 222, + }); + + // Helper aliases + + var aliases = (exports.aliases = { + windows: 91, + '⇧': 16, + '⌥': 18, + '⌃': 17, + '⌘': 91, + ctl: 17, + control: 17, + option: 18, + pause: 19, + break: 19, + caps: 20, + return: 13, + escape: 27, + spc: 32, + pgup: 33, + pgdn: 34, + ins: 45, + del: 46, + cmd: 91, + }); + + /*! + * Programatically add the following + */ + + // lower case chars + for (i = 97; i < 123; i++) codes[String.fromCharCode(i)] = i - 32; + + // numbers + for (var i = 48; i < 58; i++) codes[i - 48] = i; + + // function keys + for (i = 1; i < 13; i++) codes['f' + i] = i + 111; + + // numpad keys + for (i = 0; i < 10; i++) codes['numpad ' + i] = i + 96; + + /** + * Get by code + * + * exports.name[13] // => 'Enter' + */ + + var names = (exports.names = exports.title = {}); // title for backward compat + + // Create reverse mapping + for (i in codes) names[codes[i]] = i; + + // Add aliases + for (var alias in aliases) { + codes[alias] = aliases[alias]; + } + + /***/ + }, + /* 689 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Symbol_js__ = __webpack_require__(299); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getRawTag_js__ = __webpack_require__(692); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__objectToString_js__ = __webpack_require__(693); + + /** `Object#toString` result references. */ + var nullTag = '[object Null]', + undefinedTag = '[object Undefined]'; + + /** Built-in value references. */ + var symToStringTag = __WEBPACK_IMPORTED_MODULE_0__Symbol_js__['a' /* default */] + ? __WEBPACK_IMPORTED_MODULE_0__Symbol_js__['a' /* default */].toStringTag + : undefined; + + /** + * The base implementation of `getTag` without fallbacks for buggy environments. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ + function baseGetTag(value) { + if (value == null) { + return value === undefined ? undefinedTag : nullTag; + } + return symToStringTag && symToStringTag in Object(value) + ? __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__getRawTag_js__['a' /* default */])(value) + : __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__objectToString_js__['a' /* default */])(value); + } + + /* harmony default export */ __webpack_exports__['a'] = baseGetTag; + + /***/ + }, + /* 690 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (global) { + /** Detect free variable `global` from Node.js. */ + var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + + /* harmony default export */ __webpack_exports__['a'] = freeGlobal; + + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(22)); + + /***/ + }, + /* 691 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__overArg_js__ = __webpack_require__(694); + + /** Built-in value references. */ + var getPrototype = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__overArg_js__['a' /* default */])( + Object.getPrototypeOf, + Object, + ); + + /* harmony default export */ __webpack_exports__['a'] = getPrototype; + + /***/ + }, + /* 692 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Symbol_js__ = __webpack_require__(299); + + /** Used for built-in method references. */ + var objectProto = Object.prototype; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ + var nativeObjectToString = objectProto.toString; + + /** Built-in value references. */ + var symToStringTag = __WEBPACK_IMPORTED_MODULE_0__Symbol_js__['a' /* default */] + ? __WEBPACK_IMPORTED_MODULE_0__Symbol_js__['a' /* default */].toStringTag + : undefined; + + /** + * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the raw `toStringTag`. + */ + function getRawTag(value) { + var isOwn = hasOwnProperty.call(value, symToStringTag), + tag = value[symToStringTag]; + + try { + value[symToStringTag] = undefined; + var unmasked = true; + } catch (e) {} + + var result = nativeObjectToString.call(value); + if (unmasked) { + if (isOwn) { + value[symToStringTag] = tag; + } else { + delete value[symToStringTag]; + } + } + return result; + } + + /* harmony default export */ __webpack_exports__['a'] = getRawTag; + + /***/ + }, + /* 693 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /** Used for built-in method references. */ + var objectProto = Object.prototype; + + /** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ + var nativeObjectToString = objectProto.toString; + + /** + * Converts `value` to a string using `Object.prototype.toString`. + * + * @private + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + */ + function objectToString(value) { + return nativeObjectToString.call(value); + } + + /* harmony default export */ __webpack_exports__['a'] = objectToString; + + /***/ + }, + /* 694 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ + function overArg(func, transform) { + return function (arg) { + return func(transform(arg)); + }; + } + + /* harmony default export */ __webpack_exports__['a'] = overArg; + + /***/ + }, + /* 695 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__freeGlobal_js__ = __webpack_require__(690); + + /** Detect free variable `self`. */ + var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + + /** Used as a reference to the global object. */ + var root = + __WEBPACK_IMPORTED_MODULE_0__freeGlobal_js__['a' /* default */] || + freeSelf || + Function('return this')(); + + /* harmony default export */ __webpack_exports__['a'] = root; + + /***/ + }, + /* 696 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ + function isObjectLike(value) { + return value != null && typeof value == 'object'; + } + + /* harmony default export */ __webpack_exports__['a'] = isObjectLike; + + /***/ + }, + /* 697 */ + /***/ function (module, exports, __webpack_require__) { + var Symbol = __webpack_require__(301), + getRawTag = __webpack_require__(700), + objectToString = __webpack_require__(701); + + /** `Object#toString` result references. */ + var nullTag = '[object Null]', + undefinedTag = '[object Undefined]'; + + /** Built-in value references. */ + var symToStringTag = Symbol ? Symbol.toStringTag : undefined; + + /** + * The base implementation of `getTag` without fallbacks for buggy environments. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ + function baseGetTag(value) { + if (value == null) { + return value === undefined ? undefinedTag : nullTag; + } + return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value); + } + + module.exports = baseGetTag; + + /***/ + }, + /* 698 */ + /***/ function (module, exports, __webpack_require__) { + /* WEBPACK VAR INJECTION */ (function (global) { + /** Detect free variable `global` from Node.js. */ + var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + + module.exports = freeGlobal; + + /* WEBPACK VAR INJECTION */ + }).call(exports, __webpack_require__(22)); + + /***/ + }, + /* 699 */ + /***/ function (module, exports, __webpack_require__) { + var overArg = __webpack_require__(702); + + /** Built-in value references. */ + var getPrototype = overArg(Object.getPrototypeOf, Object); + + module.exports = getPrototype; + + /***/ + }, + /* 700 */ + /***/ function (module, exports, __webpack_require__) { + var Symbol = __webpack_require__(301); + + /** Used for built-in method references. */ + var objectProto = Object.prototype; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ + var nativeObjectToString = objectProto.toString; + + /** Built-in value references. */ + var symToStringTag = Symbol ? Symbol.toStringTag : undefined; + + /** + * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the raw `toStringTag`. + */ + function getRawTag(value) { + var isOwn = hasOwnProperty.call(value, symToStringTag), + tag = value[symToStringTag]; + + try { + value[symToStringTag] = undefined; + var unmasked = true; + } catch (e) {} + + var result = nativeObjectToString.call(value); + if (unmasked) { + if (isOwn) { + value[symToStringTag] = tag; + } else { + delete value[symToStringTag]; + } + } + return result; + } + + module.exports = getRawTag; + + /***/ + }, + /* 701 */ + /***/ function (module, exports) { + /** Used for built-in method references. */ + var objectProto = Object.prototype; + + /** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ + var nativeObjectToString = objectProto.toString; + + /** + * Converts `value` to a string using `Object.prototype.toString`. + * + * @private + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + */ + function objectToString(value) { + return nativeObjectToString.call(value); + } + + module.exports = objectToString; + + /***/ + }, + /* 702 */ + /***/ function (module, exports) { + /** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ + function overArg(func, transform) { + return function (arg) { + return func(transform(arg)); + }; + } + + module.exports = overArg; + + /***/ + }, + /* 703 */ + /***/ function (module, exports, __webpack_require__) { + var freeGlobal = __webpack_require__(698); + + /** Detect free variable `self`. */ + var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + + /** Used as a reference to the global object. */ + var root = freeGlobal || freeSelf || Function('return this')(); + + module.exports = root; + + /***/ + }, + /* 704 */ + /***/ function (module, exports) { + /** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ + function isObjectLike(value) { + return value != null && typeof value == 'object'; + } + + module.exports = isObjectLike; + + /***/ + }, + /* 705 */ + /***/ function (module, exports, __webpack_require__) { + var baseGetTag = __webpack_require__(697), + getPrototype = __webpack_require__(699), + isObjectLike = __webpack_require__(704); + + /** `Object#toString` result references. */ + var objectTag = '[object Object]'; + + /** Used for built-in method references. */ + var funcProto = Function.prototype, + objectProto = Object.prototype; + + /** Used to resolve the decompiled source of functions. */ + var funcToString = funcProto.toString; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** Used to infer the `Object` constructor. */ + var objectCtorString = funcToString.call(Object); + + /** + * Checks if `value` is a plain object, that is, an object created by the + * `Object` constructor or one with a `[[Prototype]]` of `null`. + * + * @static + * @memberOf _ + * @since 0.8.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * _.isPlainObject(new Foo); + * // => false + * + * _.isPlainObject([1, 2, 3]); + * // => false + * + * _.isPlainObject({ 'x': 0, 'y': 0 }); + * // => true + * + * _.isPlainObject(Object.create(null)); + * // => true + */ + function isPlainObject(value) { + if (!isObjectLike(value) || baseGetTag(value) != objectTag) { + return false; + } + var proto = getPrototype(value); + if (proto === null) { + return true; + } + var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; + return ( + typeof Ctor == 'function' && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString + ); + } + + module.exports = isPlainObject; + + /***/ + }, + /* 706 */ + /***/ function (module, exports, __webpack_require__) { + /* WEBPACK VAR INJECTION */ (function (global) { + /** + * marked - a markdown parser + * Copyright (c) 2011-2014, Christopher Jeffrey. (MIT Licensed) + * https://github.com/chjj/marked + */ + + (function () { + /** + * Block-Level Grammar + */ + + var block = { + newline: /^\n+/, + code: /^( {4}[^\n]+\n*)+/, + fences: noop, + hr: /^( *[-*_]){3,} *(?:\n+|$)/, + heading: /^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/, + nptable: noop, + lheading: /^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/, + blockquote: /^( *>[^\n]+(\n(?!def)[^\n]+)*\n*)+/, + list: /^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/, + html: /^ *(?:comment *(?:\n|\s*$)|closed *(?:\n{2,}|\s*$)|closing *(?:\n{2,}|\s*$))/, + def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/, + table: noop, + paragraph: /^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/, + text: /^[^\n]+/, + }; + + block.bullet = /(?:[*+-]|\d+\.)/; + block.item = /^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/; + block.item = replace(block.item, 'gm')(/bull/g, block.bullet)(); + + block.list = replace(block.list)(/bull/g, block.bullet)( + 'hr', + '\\n+(?=\\1?(?:[-*_] *){3,}(?:\\n+|$))', + )('def', '\\n+(?=' + block.def.source + ')')(); + + block.blockquote = replace(block.blockquote)('def', block.def)(); + + block._tag = + '(?!(?:' + + 'a|em|strong|small|s|cite|q|dfn|abbr|data|time|code' + + '|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo' + + '|span|br|wbr|ins|del|img)\\b)\\w+(?!:/|[^\\w\\s@]*@)\\b'; + + block.html = replace(block.html)('comment', /<!--[\s\S]*?-->/)('closed', /<(tag)[\s\S]+?<\/\1>/)( + 'closing', + /<tag(?:"[^"]*"|'[^']*'|[^'">])*?>/, + )(/tag/g, block._tag)(); + + block.paragraph = replace(block.paragraph)('hr', block.hr)('heading', block.heading)( + 'lheading', + block.lheading, + )('blockquote', block.blockquote)('tag', '<' + block._tag)('def', block.def)(); + + /** + * Normal Block Grammar + */ + + block.normal = merge({}, block); + + /** + * GFM Block Grammar + */ + + block.gfm = merge({}, block.normal, { + fences: /^ *(`{3,}|~{3,})[ \.]*(\S+)? *\n([\s\S]*?)\s*\1 *(?:\n+|$)/, + paragraph: /^/, + heading: /^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/, + }); + + block.gfm.paragraph = replace(block.paragraph)( + '(?!', + '(?!' + + block.gfm.fences.source.replace('\\1', '\\2') + + '|' + + block.list.source.replace('\\1', '\\3') + + '|', + )(); + + /** + * GFM + Tables Block Grammar + */ + + block.tables = merge({}, block.gfm, { + nptable: /^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/, + table: /^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/, + }); + + /** + * Block Lexer + */ + + function Lexer(options) { + this.tokens = []; + this.tokens.links = {}; + this.options = options || marked.defaults; + this.rules = block.normal; + + if (this.options.gfm) { + if (this.options.tables) { + this.rules = block.tables; + } else { + this.rules = block.gfm; + } + } + } + + /** + * Expose Block Rules + */ + + Lexer.rules = block; + + /** + * Static Lex Method + */ + + Lexer.lex = function (src, options) { + var lexer = new Lexer(options); + return lexer.lex(src); + }; + + /** + * Preprocessing + */ + + Lexer.prototype.lex = function (src) { + src = src + .replace(/\r\n|\r/g, '\n') + .replace(/\t/g, ' ') + .replace(/\u00a0/g, ' ') + .replace(/\u2424/g, '\n'); + + return this.token(src, true); + }; + + /** + * Lexing + */ + + Lexer.prototype.token = function (src, top, bq) { + var src = src.replace(/^ +$/gm, ''), + next, + loose, + cap, + bull, + b, + item, + space, + i, + l; + + while (src) { + // newline + if ((cap = this.rules.newline.exec(src))) { + src = src.substring(cap[0].length); + if (cap[0].length > 1) { + this.tokens.push({ + type: 'space', + }); + } + } + + // code + if ((cap = this.rules.code.exec(src))) { + src = src.substring(cap[0].length); + cap = cap[0].replace(/^ {4}/gm, ''); + this.tokens.push({ + type: 'code', + text: !this.options.pedantic ? cap.replace(/\n+$/, '') : cap, + }); + continue; + } + + // fences (gfm) + if ((cap = this.rules.fences.exec(src))) { + src = src.substring(cap[0].length); + this.tokens.push({ + type: 'code', + lang: cap[2], + text: cap[3] || '', + }); + continue; + } + + // heading + if ((cap = this.rules.heading.exec(src))) { + src = src.substring(cap[0].length); + this.tokens.push({ + type: 'heading', + depth: cap[1].length, + text: cap[2], + }); + continue; + } + + // table no leading pipe (gfm) + if (top && (cap = this.rules.nptable.exec(src))) { + src = src.substring(cap[0].length); + + item = { + type: 'table', + header: cap[1].replace(/^ *| *\| *$/g, '').split(/ *\| */), + align: cap[2].replace(/^ *|\| *$/g, '').split(/ *\| */), + cells: cap[3].replace(/\n$/, '').split('\n'), + }; + + for (i = 0; i < item.align.length; i++) { + if (/^ *-+: *$/.test(item.align[i])) { + item.align[i] = 'right'; + } else if (/^ *:-+: *$/.test(item.align[i])) { + item.align[i] = 'center'; + } else if (/^ *:-+ *$/.test(item.align[i])) { + item.align[i] = 'left'; + } else { + item.align[i] = null; + } + } + + for (i = 0; i < item.cells.length; i++) { + item.cells[i] = item.cells[i].split(/ *\| */); + } + + this.tokens.push(item); + + continue; + } + + // lheading + if ((cap = this.rules.lheading.exec(src))) { + src = src.substring(cap[0].length); + this.tokens.push({ + type: 'heading', + depth: cap[2] === '=' ? 1 : 2, + text: cap[1], + }); + continue; + } + + // hr + if ((cap = this.rules.hr.exec(src))) { + src = src.substring(cap[0].length); + this.tokens.push({ + type: 'hr', + }); + continue; + } + + // blockquote + if ((cap = this.rules.blockquote.exec(src))) { + src = src.substring(cap[0].length); + + this.tokens.push({ + type: 'blockquote_start', + }); + + cap = cap[0].replace(/^ *> ?/gm, ''); + + // Pass `top` to keep the current + // "toplevel" state. This is exactly + // how markdown.pl works. + this.token(cap, top, true); + + this.tokens.push({ + type: 'blockquote_end', + }); + + continue; + } + + // list + if ((cap = this.rules.list.exec(src))) { + src = src.substring(cap[0].length); + bull = cap[2]; + + this.tokens.push({ + type: 'list_start', + ordered: bull.length > 1, + }); + + // Get each top-level item. + cap = cap[0].match(this.rules.item); + + next = false; + l = cap.length; + i = 0; + + for (; i < l; i++) { + item = cap[i]; + + // Remove the list item's bullet + // so it is seen as the next token. + space = item.length; + item = item.replace(/^ *([*+-]|\d+\.) +/, ''); + + // Outdent whatever the + // list item contains. Hacky. + if (~item.indexOf('\n ')) { + space -= item.length; + item = !this.options.pedantic + ? item.replace(new RegExp('^ {1,' + space + '}', 'gm'), '') + : item.replace(/^ {1,4}/gm, ''); + } + + // Determine whether the next list item belongs here. + // Backpedal if it does not belong in this list. + if (this.options.smartLists && i !== l - 1) { + b = block.bullet.exec(cap[i + 1])[0]; + if (bull !== b && !(bull.length > 1 && b.length > 1)) { + src = cap.slice(i + 1).join('\n') + src; + i = l - 1; + } + } + + // Determine whether item is loose or not. + // Use: /(^|\n)(?! )[^\n]+\n\n(?!\s*$)/ + // for discount behavior. + loose = next || /\n\n(?!\s*$)/.test(item); + if (i !== l - 1) { + next = item.charAt(item.length - 1) === '\n'; + if (!loose) loose = next; + } + + this.tokens.push({ + type: loose ? 'loose_item_start' : 'list_item_start', + }); + + // Recurse. + this.token(item, false, bq); + + this.tokens.push({ + type: 'list_item_end', + }); + } + + this.tokens.push({ + type: 'list_end', + }); + + continue; + } + + // html + if ((cap = this.rules.html.exec(src))) { + src = src.substring(cap[0].length); + this.tokens.push({ + type: this.options.sanitize ? 'paragraph' : 'html', + pre: + !this.options.sanitizer && + (cap[1] === 'pre' || cap[1] === 'script' || cap[1] === 'style'), + text: cap[0], + }); + continue; + } + + // def + if (!bq && top && (cap = this.rules.def.exec(src))) { + src = src.substring(cap[0].length); + this.tokens.links[cap[1].toLowerCase()] = { + href: cap[2], + title: cap[3], + }; + continue; + } + + // table (gfm) + if (top && (cap = this.rules.table.exec(src))) { + src = src.substring(cap[0].length); + + item = { + type: 'table', + header: cap[1].replace(/^ *| *\| *$/g, '').split(/ *\| */), + align: cap[2].replace(/^ *|\| *$/g, '').split(/ *\| */), + cells: cap[3].replace(/(?: *\| *)?\n$/, '').split('\n'), + }; + + for (i = 0; i < item.align.length; i++) { + if (/^ *-+: *$/.test(item.align[i])) { + item.align[i] = 'right'; + } else if (/^ *:-+: *$/.test(item.align[i])) { + item.align[i] = 'center'; + } else if (/^ *:-+ *$/.test(item.align[i])) { + item.align[i] = 'left'; + } else { + item.align[i] = null; + } + } + + for (i = 0; i < item.cells.length; i++) { + item.cells[i] = item.cells[i].replace(/^ *\| *| *\| *$/g, '').split(/ *\| */); + } + + this.tokens.push(item); + + continue; + } + + // top-level paragraph + if (top && (cap = this.rules.paragraph.exec(src))) { + src = src.substring(cap[0].length); + this.tokens.push({ + type: 'paragraph', + text: cap[1].charAt(cap[1].length - 1) === '\n' ? cap[1].slice(0, -1) : cap[1], + }); + continue; + } + + // text + if ((cap = this.rules.text.exec(src))) { + // Top-level should never reach here. + src = src.substring(cap[0].length); + this.tokens.push({ + type: 'text', + text: cap[0], + }); + continue; + } + + if (src) { + throw new Error('Infinite loop on byte: ' + src.charCodeAt(0)); + } + } + + return this.tokens; + }; + + /** + * Inline-Level Grammar + */ + + var inline = { + escape: /^\\([\\`*{}\[\]()#+\-.!_>])/, + autolink: /^<([^ >]+(@|:\/)[^ >]+)>/, + url: noop, + tag: /^<!--[\s\S]*?-->|^<\/?\w+(?:"[^"]*"|'[^']*'|[^'">])*?>/, + link: /^!?\[(inside)\]\(href\)/, + reflink: /^!?\[(inside)\]\s*\[([^\]]*)\]/, + nolink: /^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/, + strong: /^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/, + em: /^\b_((?:[^_]|__)+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/, + code: /^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/, + br: /^ {2,}\n(?!\s*$)/, + del: noop, + text: /^[\s\S]+?(?=[\\<!\[_*`]| {2,}\n|$)/, + }; + + inline._inside = /(?:\[[^\]]*\]|[^\[\]]|\](?=[^\[]*\]))*/; + inline._href = /\s*<?([\s\S]*?)>?(?:\s+['"]([\s\S]*?)['"])?\s*/; + + inline.link = replace(inline.link)('inside', inline._inside)('href', inline._href)(); + + inline.reflink = replace(inline.reflink)('inside', inline._inside)(); + + /** + * Normal Inline Grammar + */ + + inline.normal = merge({}, inline); + + /** + * Pedantic Inline Grammar + */ + + inline.pedantic = merge({}, inline.normal, { + strong: /^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/, + em: /^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/, + }); + + /** + * GFM Inline Grammar + */ + + inline.gfm = merge({}, inline.normal, { + escape: replace(inline.escape)('])', '~|])')(), + url: /^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/, + del: /^~~(?=\S)([\s\S]*?\S)~~/, + text: replace(inline.text)(']|', '~]|')('|', '|https?://|')(), + }); + + /** + * GFM + Line Breaks Inline Grammar + */ + + inline.breaks = merge({}, inline.gfm, { + br: replace(inline.br)('{2,}', '*')(), + text: replace(inline.gfm.text)('{2,}', '*')(), + }); + + /** + * Inline Lexer & Compiler + */ + + function InlineLexer(links, options) { + this.options = options || marked.defaults; + this.links = links; + this.rules = inline.normal; + this.renderer = this.options.renderer || new Renderer(); + this.renderer.options = this.options; + + if (!this.links) { + throw new Error('Tokens array requires a `links` property.'); + } + + if (this.options.gfm) { + if (this.options.breaks) { + this.rules = inline.breaks; + } else { + this.rules = inline.gfm; + } + } else if (this.options.pedantic) { + this.rules = inline.pedantic; + } + } + + /** + * Expose Inline Rules + */ + + InlineLexer.rules = inline; + + /** + * Static Lexing/Compiling Method + */ + + InlineLexer.output = function (src, links, options) { + var inline = new InlineLexer(links, options); + return inline.output(src); + }; + + /** + * Lexing/Compiling + */ + + InlineLexer.prototype.output = function (src) { + var out = '', + link, + text, + href, + cap; + + while (src) { + // escape + if ((cap = this.rules.escape.exec(src))) { + src = src.substring(cap[0].length); + out += cap[1]; + continue; + } + + // autolink + if ((cap = this.rules.autolink.exec(src))) { + src = src.substring(cap[0].length); + if (cap[2] === '@') { + text = cap[1].charAt(6) === ':' ? this.mangle(cap[1].substring(7)) : this.mangle(cap[1]); + href = this.mangle('mailto:') + text; + } else { + text = escape(cap[1]); + href = text; + } + out += this.renderer.link(href, null, text); + continue; + } + + // url (gfm) + if (!this.inLink && (cap = this.rules.url.exec(src))) { + src = src.substring(cap[0].length); + text = escape(cap[1]); + href = text; + out += this.renderer.link(href, null, text); + continue; + } + + // tag + if ((cap = this.rules.tag.exec(src))) { + if (!this.inLink && /^<a /i.test(cap[0])) { + this.inLink = true; + } else if (this.inLink && /^<\/a>/i.test(cap[0])) { + this.inLink = false; + } + src = src.substring(cap[0].length); + out += this.options.sanitize + ? this.options.sanitizer + ? this.options.sanitizer(cap[0]) + : escape(cap[0]) + : cap[0]; + continue; + } + + // link + if ((cap = this.rules.link.exec(src))) { + src = src.substring(cap[0].length); + this.inLink = true; + out += this.outputLink(cap, { + href: cap[2], + title: cap[3], + }); + this.inLink = false; + continue; + } + + // reflink, nolink + if ((cap = this.rules.reflink.exec(src)) || (cap = this.rules.nolink.exec(src))) { + src = src.substring(cap[0].length); + link = (cap[2] || cap[1]).replace(/\s+/g, ' '); + link = this.links[link.toLowerCase()]; + if (!link || !link.href) { + out += cap[0].charAt(0); + src = cap[0].substring(1) + src; + continue; + } + this.inLink = true; + out += this.outputLink(cap, link); + this.inLink = false; + continue; + } + + // strong + if ((cap = this.rules.strong.exec(src))) { + src = src.substring(cap[0].length); + out += this.renderer.strong(this.output(cap[2] || cap[1])); + continue; + } + + // em + if ((cap = this.rules.em.exec(src))) { + src = src.substring(cap[0].length); + out += this.renderer.em(this.output(cap[2] || cap[1])); + continue; + } + + // code + if ((cap = this.rules.code.exec(src))) { + src = src.substring(cap[0].length); + out += this.renderer.codespan(escape(cap[2], true)); + continue; + } + + // br + if ((cap = this.rules.br.exec(src))) { + src = src.substring(cap[0].length); + out += this.renderer.br(); + continue; + } + + // del (gfm) + if ((cap = this.rules.del.exec(src))) { + src = src.substring(cap[0].length); + out += this.renderer.del(this.output(cap[1])); + continue; + } + + // text + if ((cap = this.rules.text.exec(src))) { + src = src.substring(cap[0].length); + out += this.renderer.text(escape(this.smartypants(cap[0]))); + continue; + } + + if (src) { + throw new Error('Infinite loop on byte: ' + src.charCodeAt(0)); + } + } + + return out; + }; + + /** + * Compile Link + */ + + InlineLexer.prototype.outputLink = function (cap, link) { + var href = escape(link.href), + title = link.title ? escape(link.title) : null; + + return cap[0].charAt(0) !== '!' + ? this.renderer.link(href, title, this.output(cap[1])) + : this.renderer.image(href, title, escape(cap[1])); + }; + + /** + * Smartypants Transformations + */ + + InlineLexer.prototype.smartypants = function (text) { + if (!this.options.smartypants) return text; + return ( + text + // em-dashes + .replace(/---/g, '\u2014') + // en-dashes + .replace(/--/g, '\u2013') + // opening singles + .replace(/(^|[-\u2014/(\[{"\s])'/g, '$1\u2018') + // closing singles & apostrophes + .replace(/'/g, '\u2019') + // opening doubles + .replace(/(^|[-\u2014/(\[{\u2018\s])"/g, '$1\u201c') + // closing doubles + .replace(/"/g, '\u201d') + // ellipses + .replace(/\.{3}/g, '\u2026') + ); + }; + + /** + * Mangle Links + */ + + InlineLexer.prototype.mangle = function (text) { + if (!this.options.mangle) return text; + var out = '', + l = text.length, + i = 0, + ch; + + for (; i < l; i++) { + ch = text.charCodeAt(i); + if (Math.random() > 0.5) { + ch = 'x' + ch.toString(16); + } + out += '&#' + ch + ';'; + } + + return out; + }; + + /** + * Renderer + */ + + function Renderer(options) { + this.options = options || {}; + } + + Renderer.prototype.code = function (code, lang, escaped) { + if (this.options.highlight) { + var out = this.options.highlight(code, lang); + if (out != null && out !== code) { + escaped = true; + code = out; + } + } + + if (!lang) { + return '<pre><code>' + (escaped ? code : escape(code, true)) + '\n</code></pre>'; + } + + return ( + '<pre><code class="' + + this.options.langPrefix + + escape(lang, true) + + '">' + + (escaped ? code : escape(code, true)) + + '\n</code></pre>\n' + ); + }; + + Renderer.prototype.blockquote = function (quote) { + return '<blockquote>\n' + quote + '</blockquote>\n'; + }; + + Renderer.prototype.html = function (html) { + return html; + }; + + Renderer.prototype.heading = function (text, level, raw) { + return ( + '<h' + + level + + ' id="' + + this.options.headerPrefix + + raw.toLowerCase().replace(/[^\w]+/g, '-') + + '">' + + text + + '</h' + + level + + '>\n' + ); + }; + + Renderer.prototype.hr = function () { + return this.options.xhtml ? '<hr/>\n' : '<hr>\n'; + }; + + Renderer.prototype.list = function (body, ordered) { + var type = ordered ? 'ol' : 'ul'; + return '<' + type + '>\n' + body + '</' + type + '>\n'; + }; + + Renderer.prototype.listitem = function (text) { + return '<li>' + text + '</li>\n'; + }; + + Renderer.prototype.paragraph = function (text) { + return '<p>' + text + '</p>\n'; + }; + + Renderer.prototype.table = function (header, body) { + return ( + '<table>\n' + + '<thead>\n' + + header + + '</thead>\n' + + '<tbody>\n' + + body + + '</tbody>\n' + + '</table>\n' + ); + }; + + Renderer.prototype.tablerow = function (content) { + return '<tr>\n' + content + '</tr>\n'; + }; + + Renderer.prototype.tablecell = function (content, flags) { + var type = flags.header ? 'th' : 'td'; + var tag = flags.align + ? '<' + type + ' style="text-align:' + flags.align + '">' + : '<' + type + '>'; + return tag + content + '</' + type + '>\n'; + }; + + // span level renderer + Renderer.prototype.strong = function (text) { + return '<strong>' + text + '</strong>'; + }; + + Renderer.prototype.em = function (text) { + return '<em>' + text + '</em>'; + }; + + Renderer.prototype.codespan = function (text) { + return '<code>' + text + '</code>'; + }; + + Renderer.prototype.br = function () { + return this.options.xhtml ? '<br/>' : '<br>'; + }; + + Renderer.prototype.del = function (text) { + return '<del>' + text + '</del>'; + }; + + Renderer.prototype.link = function (href, title, text) { + if (this.options.sanitize) { + try { + var prot = decodeURIComponent(unescape(href)) + .replace(/[^\w:]/g, '') + .toLowerCase(); + } catch (e) { + return ''; + } + if (prot.indexOf('javascript:') === 0 || prot.indexOf('vbscript:') === 0) { + return ''; + } + } + var out = '<a href="' + href + '"'; + if (title) { + out += ' title="' + title + '"'; + } + out += '>' + text + '</a>'; + return out; + }; + + Renderer.prototype.image = function (href, title, text) { + var out = '<img src="' + href + '" alt="' + text + '"'; + if (title) { + out += ' title="' + title + '"'; + } + out += this.options.xhtml ? '/>' : '>'; + return out; + }; + + Renderer.prototype.text = function (text) { + return text; + }; + + /** + * Parsing & Compiling + */ + + function Parser(options) { + this.tokens = []; + this.token = null; + this.options = options || marked.defaults; + this.options.renderer = this.options.renderer || new Renderer(); + this.renderer = this.options.renderer; + this.renderer.options = this.options; + } + + /** + * Static Parse Method + */ + + Parser.parse = function (src, options, renderer) { + var parser = new Parser(options, renderer); + return parser.parse(src); + }; + + /** + * Parse Loop + */ + + Parser.prototype.parse = function (src) { + this.inline = new InlineLexer(src.links, this.options, this.renderer); + this.tokens = src.reverse(); + + var out = ''; + while (this.next()) { + out += this.tok(); + } + + return out; + }; + + /** + * Next Token + */ + + Parser.prototype.next = function () { + return (this.token = this.tokens.pop()); + }; + + /** + * Preview Next Token + */ + + Parser.prototype.peek = function () { + return this.tokens[this.tokens.length - 1] || 0; + }; + + /** + * Parse Text Tokens + */ + + Parser.prototype.parseText = function () { + var body = this.token.text; + + while (this.peek().type === 'text') { + body += '\n' + this.next().text; + } + + return this.inline.output(body); + }; + + /** + * Parse Current Token + */ + + Parser.prototype.tok = function () { + switch (this.token.type) { + case 'space': { + return ''; + } + case 'hr': { + return this.renderer.hr(); + } + case 'heading': { + return this.renderer.heading( + this.inline.output(this.token.text), + this.token.depth, + this.token.text, + ); + } + case 'code': { + return this.renderer.code(this.token.text, this.token.lang, this.token.escaped); + } + case 'table': { + var header = '', + body = '', + i, + row, + cell, + flags, + j; + + // header + cell = ''; + for (i = 0; i < this.token.header.length; i++) { + flags = { header: true, align: this.token.align[i] }; + cell += this.renderer.tablecell(this.inline.output(this.token.header[i]), { + header: true, + align: this.token.align[i], + }); + } + header += this.renderer.tablerow(cell); + + for (i = 0; i < this.token.cells.length; i++) { + row = this.token.cells[i]; + + cell = ''; + for (j = 0; j < row.length; j++) { + cell += this.renderer.tablecell(this.inline.output(row[j]), { + header: false, + align: this.token.align[j], + }); + } + + body += this.renderer.tablerow(cell); + } + return this.renderer.table(header, body); + } + case 'blockquote_start': { + var body = ''; + + while (this.next().type !== 'blockquote_end') { + body += this.tok(); + } + + return this.renderer.blockquote(body); + } + case 'list_start': { + var body = '', + ordered = this.token.ordered; + + while (this.next().type !== 'list_end') { + body += this.tok(); + } + + return this.renderer.list(body, ordered); + } + case 'list_item_start': { + var body = ''; + + while (this.next().type !== 'list_item_end') { + body += this.token.type === 'text' ? this.parseText() : this.tok(); + } + + return this.renderer.listitem(body); + } + case 'loose_item_start': { + var body = ''; + + while (this.next().type !== 'list_item_end') { + body += this.tok(); + } + + return this.renderer.listitem(body); + } + case 'html': { + var html = + !this.token.pre && !this.options.pedantic + ? this.inline.output(this.token.text) + : this.token.text; + return this.renderer.html(html); + } + case 'paragraph': { + return this.renderer.paragraph(this.inline.output(this.token.text)); + } + case 'text': { + return this.renderer.paragraph(this.parseText()); + } + } + }; + + /** + * Helpers + */ + + function escape(html, encode) { + return html + .replace(!encode ? /&(?!#?\w+;)/g : /&/g, '&') + .replace(/</g, '<') + .replace(/>/g, '>') + .replace(/"/g, '"') + .replace(/'/g, '''); + } + + function unescape(html) { + // explicitly match decimal, hex, and named HTML entities + return html.replace(/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/g, function (_, n) { + n = n.toLowerCase(); + if (n === 'colon') return ':'; + if (n.charAt(0) === '#') { + return n.charAt(1) === 'x' + ? String.fromCharCode(parseInt(n.substring(2), 16)) + : String.fromCharCode(+n.substring(1)); + } + return ''; + }); + } + + function replace(regex, opt) { + regex = regex.source; + opt = opt || ''; + return function self(name, val) { + if (!name) return new RegExp(regex, opt); + val = val.source || val; + val = val.replace(/(^|[^\[])\^/g, '$1'); + regex = regex.replace(name, val); + return self; + }; + } + + function noop() {} + noop.exec = noop; + + function merge(obj) { + var i = 1, + target, + key; + + for (; i < arguments.length; i++) { + target = arguments[i]; + for (key in target) { + if (Object.prototype.hasOwnProperty.call(target, key)) { + obj[key] = target[key]; + } + } + } + + return obj; + } + + /** + * Marked + */ + + function marked(src, opt, callback) { + if (callback || typeof opt === 'function') { + if (!callback) { + callback = opt; + opt = null; + } + + opt = merge({}, marked.defaults, opt || {}); + + var highlight = opt.highlight, + tokens, + pending, + i = 0; + + try { + tokens = Lexer.lex(src, opt); + } catch (e) { + return callback(e); + } + + pending = tokens.length; + + var done = function (err) { + if (err) { + opt.highlight = highlight; + return callback(err); + } + + var out; + + try { + out = Parser.parse(tokens, opt); + } catch (e) { + err = e; + } + + opt.highlight = highlight; + + return err ? callback(err) : callback(null, out); + }; + + if (!highlight || highlight.length < 3) { + return done(); + } + + delete opt.highlight; + + if (!pending) return done(); + + for (; i < tokens.length; i++) { + (function (token) { + if (token.type !== 'code') { + return --pending || done(); + } + return highlight(token.text, token.lang, function (err, code) { + if (err) return done(err); + if (code == null || code === token.text) { + return --pending || done(); + } + token.text = code; + token.escaped = true; + --pending || done(); + }); + })(tokens[i]); + } + + return; + } + try { + if (opt) opt = merge({}, marked.defaults, opt); + return Parser.parse(Lexer.lex(src, opt), opt); + } catch (e) { + e.message += '\nPlease report this to https://github.com/chjj/marked.'; + if ((opt || marked.defaults).silent) { + return '<p>An error occured:</p><pre>' + escape(e.message + '', true) + '</pre>'; + } + throw e; + } + } + + /** + * Options + */ + + marked.options = marked.setOptions = function (opt) { + merge(marked.defaults, opt); + return marked; + }; + + marked.defaults = { + gfm: true, + tables: true, + breaks: false, + pedantic: false, + sanitize: false, + sanitizer: null, + mangle: true, + smartLists: false, + silent: false, + highlight: null, + langPrefix: 'lang-', + smartypants: false, + headerPrefix: '', + renderer: new Renderer(), + xhtml: false, + }; + + /** + * Expose + */ + + marked.Parser = Parser; + marked.parser = Parser.parse; + + marked.Renderer = Renderer; + + marked.Lexer = Lexer; + marked.lexer = Lexer.lex; + + marked.InlineLexer = InlineLexer; + marked.inlineLexer = InlineLexer.output; + + marked.parse = marked; + + if (true) { + module.exports = marked; + } else if (typeof define === 'function' && define.amd) { + define(function () { + return marked; + }); + } else { + this.marked = marked; + } + }).call( + (function () { + return this || (typeof window !== 'undefined' ? window : global); + })(), + ); + + /* WEBPACK VAR INJECTION */ + }).call(exports, __webpack_require__(22)); + + /***/ + }, + /* 707 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var strictUriEncode = __webpack_require__(836); + var objectAssign = __webpack_require__(8); + + function encoderForArrayFormat(opts) { + switch (opts.arrayFormat) { + case 'index': + return function (key, value, index) { + return value === null + ? [encode(key, opts), '[', index, ']'].join('') + : [encode(key, opts), '[', encode(index, opts), ']=', encode(value, opts)].join(''); + }; + + case 'bracket': + return function (key, value) { + return value === null + ? encode(key, opts) + : [encode(key, opts), '[]=', encode(value, opts)].join(''); + }; + + default: + return function (key, value) { + return value === null + ? encode(key, opts) + : [encode(key, opts), '=', encode(value, opts)].join(''); + }; + } + } + + function parserForArrayFormat(opts) { + var result; + + switch (opts.arrayFormat) { + case 'index': + return function (key, value, accumulator) { + result = /\[(\d*)\]$/.exec(key); + + key = key.replace(/\[\d*\]$/, ''); + + if (!result) { + accumulator[key] = value; + return; + } + + if (accumulator[key] === undefined) { + accumulator[key] = {}; + } + + accumulator[key][result[1]] = value; + }; + + case 'bracket': + return function (key, value, accumulator) { + result = /(\[\])$/.exec(key); + + key = key.replace(/\[\]$/, ''); + + if (!result || accumulator[key] === undefined) { + accumulator[key] = value; + return; + } + + accumulator[key] = [].concat(accumulator[key], value); + }; + + default: + return function (key, value, accumulator) { + if (accumulator[key] === undefined) { + accumulator[key] = value; + return; + } + + accumulator[key] = [].concat(accumulator[key], value); + }; + } + } + + function encode(value, opts) { + if (opts.encode) { + return opts.strict ? strictUriEncode(value) : encodeURIComponent(value); + } + + return value; + } + + function keysSorter(input) { + if (Array.isArray(input)) { + return input.sort(); + } else if (typeof input === 'object') { + return keysSorter(Object.keys(input)) + .sort(function (a, b) { + return Number(a) - Number(b); + }) + .map(function (key) { + return input[key]; + }); + } + + return input; + } + + exports.extract = function (str) { + return str.split('?')[1] || ''; + }; + + exports.parse = function (str, opts) { + opts = objectAssign({ arrayFormat: 'none' }, opts); + + var formatter = parserForArrayFormat(opts); + + // Create an object with no prototype + // https://github.com/sindresorhus/query-string/issues/47 + var ret = Object.create(null); + + if (typeof str !== 'string') { + return ret; + } + + str = str.trim().replace(/^(\?|#|&)/, ''); + + if (!str) { + return ret; + } + + str.split('&').forEach(function (param) { + var parts = param.replace(/\+/g, ' ').split('='); + // Firefox (pre 40) decodes `%3D` to `=` + // https://github.com/sindresorhus/query-string/pull/37 + var key = parts.shift(); + var val = parts.length > 0 ? parts.join('=') : undefined; + + // missing `=` should be `null`: + // http://w3.org/TR/2012/WD-url-20120524/#collect-url-parameters + val = val === undefined ? null : decodeURIComponent(val); + + formatter(decodeURIComponent(key), val, ret); + }); + + return Object.keys(ret) + .sort() + .reduce(function (result, key) { + var val = ret[key]; + if (Boolean(val) && typeof val === 'object' && !Array.isArray(val)) { + // Sort object keys, not values + result[key] = keysSorter(val); + } else { + result[key] = val; + } + + return result; + }, Object.create(null)); + }; + + exports.stringify = function (obj, opts) { + var defaults = { + encode: true, + strict: true, + arrayFormat: 'none', + }; + + opts = objectAssign(defaults, opts); + + var formatter = encoderForArrayFormat(opts); + + return obj + ? Object.keys(obj) + .sort() + .map(function (key) { + var val = obj[key]; + + if (val === undefined) { + return ''; + } + + if (val === null) { + return encode(key, opts); + } + + if (Array.isArray(val)) { + var result = []; + + val.slice().forEach(function (val2) { + if (val2 === undefined) { + return; + } + + result.push(formatter(key, val2, result.length)); + }); + + return result.join('&'); + } + + return encode(key, opts) + '=' + encode(val, opts); + }) + .filter(function (x) { + return x.length > 0; + }) + .join('&') + : ''; + }; + + /***/ + }, + /* 708 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + + var _values = __webpack_require__(242); + + var _values2 = _interopRequireDefault(_values); + + var _objectWithoutProperties2 = __webpack_require__(25); + + var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + + var _extends3 = __webpack_require__(20); + + var _extends4 = _interopRequireDefault(_extends3); + + var _classCallCheck2 = __webpack_require__(23); + + var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + + var _possibleConstructorReturn2 = __webpack_require__(26); + + var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + + var _inherits2 = __webpack_require__(24); + + var _inherits3 = _interopRequireDefault(_inherits2); + + var _classnames = __webpack_require__(27); + + var _classnames2 = _interopRequireDefault(_classnames); + + var _react = __webpack_require__(1); + + var _react2 = _interopRequireDefault(_react); + + var _elementType = __webpack_require__(103); + + var _elementType2 = _interopRequireDefault(_elementType); + + var _bootstrapUtils = __webpack_require__(46); + + var _StyleConfig = __webpack_require__(96); + + var _SafeAnchor = __webpack_require__(304); + + var _SafeAnchor2 = _interopRequireDefault(_SafeAnchor); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + var propTypes = { + active: _react2['default'].PropTypes.bool, + disabled: _react2['default'].PropTypes.bool, + block: _react2['default'].PropTypes.bool, + onClick: _react2['default'].PropTypes.func, + componentClass: _elementType2['default'], + href: _react2['default'].PropTypes.string, + /** + * Defines HTML button type attribute + * @defaultValue 'button' + */ + type: _react2['default'].PropTypes.oneOf(['button', 'reset', 'submit']), + }; + + var defaultProps = { + active: false, + block: false, + disabled: false, + }; + + var Button = (function (_React$Component) { + (0, _inherits3['default'])(Button, _React$Component); + + function Button() { + (0, _classCallCheck3['default'])(this, Button); + return (0, _possibleConstructorReturn3['default'])(this, _React$Component.apply(this, arguments)); + } + + Button.prototype.renderAnchor = function renderAnchor(elementProps, className) { + return _react2['default'].createElement( + _SafeAnchor2['default'], + (0, _extends4['default'])({}, elementProps, { + className: (0, _classnames2['default'])(className, elementProps.disabled && 'disabled'), + }), + ); + }; + + Button.prototype.renderButton = function renderButton(_ref, className) { + var componentClass = _ref.componentClass, + elementProps = (0, _objectWithoutProperties3['default'])(_ref, ['componentClass']); + + var Component = componentClass || 'button'; + + return _react2['default'].createElement( + Component, + (0, _extends4['default'])({}, elementProps, { + type: elementProps.type || 'button', + className: className, + }), + ); + }; + + Button.prototype.render = function render() { + var _extends2; + + var _props = this.props, + active = _props.active, + block = _props.block, + className = _props.className, + props = (0, _objectWithoutProperties3['default'])(_props, ['active', 'block', 'className']); + + var _splitBsProps = (0, _bootstrapUtils.splitBsProps)(props), + bsProps = _splitBsProps[0], + elementProps = _splitBsProps[1]; + + var classes = (0, _extends4['default'])( + {}, + (0, _bootstrapUtils.getClassSet)(bsProps), + ((_extends2 = { + active: active, + }), + (_extends2[(0, _bootstrapUtils.prefix)(bsProps, 'block')] = block), + _extends2), + ); + var fullClassName = (0, _classnames2['default'])(className, classes); + + if (elementProps.href) { + return this.renderAnchor(elementProps, fullClassName); + } + + return this.renderButton(elementProps, fullClassName); + }; + + return Button; + })(_react2['default'].Component); + + Button.propTypes = propTypes; + Button.defaultProps = defaultProps; + + exports['default'] = (0, _bootstrapUtils.bsClass)( + 'btn', + (0, _bootstrapUtils.bsSizes)( + [_StyleConfig.Size.LARGE, _StyleConfig.Size.SMALL, _StyleConfig.Size.XSMALL], + (0, _bootstrapUtils.bsStyles)( + [].concat((0, _values2['default'])(_StyleConfig.State), [ + _StyleConfig.Style.DEFAULT, + _StyleConfig.Style.PRIMARY, + _StyleConfig.Style.LINK, + ]), + _StyleConfig.Style.DEFAULT, + Button, + ), + ), + ); + module.exports = exports['default']; + + /***/ + }, + /* 709 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + + var _extends2 = __webpack_require__(20); + + var _extends3 = _interopRequireDefault(_extends2); + + var _objectWithoutProperties2 = __webpack_require__(25); + + var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + + var _classCallCheck2 = __webpack_require__(23); + + var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + + var _possibleConstructorReturn2 = __webpack_require__(26); + + var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + + var _inherits2 = __webpack_require__(24); + + var _inherits3 = _interopRequireDefault(_inherits2); + + var _classnames = __webpack_require__(27); + + var _classnames2 = _interopRequireDefault(_classnames); + + var _react = __webpack_require__(1); + + var _react2 = _interopRequireDefault(_react); + + var _elementType = __webpack_require__(103); + + var _elementType2 = _interopRequireDefault(_elementType); + + var _bootstrapUtils = __webpack_require__(46); + + var _StyleConfig = __webpack_require__(96); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + var propTypes = { + componentClass: _elementType2['default'], + + /** + * The number of columns you wish to span + * + * for Extra small devices Phones (<768px) + * + * class-prefix `col-xs-` + */ + xs: _react2['default'].PropTypes.number, + /** + * The number of columns you wish to span + * + * for Small devices Tablets (≥768px) + * + * class-prefix `col-sm-` + */ + sm: _react2['default'].PropTypes.number, + /** + * The number of columns you wish to span + * + * for Medium devices Desktops (≥992px) + * + * class-prefix `col-md-` + */ + md: _react2['default'].PropTypes.number, + /** + * The number of columns you wish to span + * + * for Large devices Desktops (≥1200px) + * + * class-prefix `col-lg-` + */ + lg: _react2['default'].PropTypes.number, + /** + * Hide column + * + * on Extra small devices Phones + * + * adds class `hidden-xs` + */ + xsHidden: _react2['default'].PropTypes.bool, + /** + * Hide column + * + * on Small devices Tablets + * + * adds class `hidden-sm` + */ + smHidden: _react2['default'].PropTypes.bool, + /** + * Hide column + * + * on Medium devices Desktops + * + * adds class `hidden-md` + */ + mdHidden: _react2['default'].PropTypes.bool, + /** + * Hide column + * + * on Large devices Desktops + * + * adds class `hidden-lg` + */ + lgHidden: _react2['default'].PropTypes.bool, + /** + * Move columns to the right + * + * for Extra small devices Phones + * + * class-prefix `col-xs-offset-` + */ + xsOffset: _react2['default'].PropTypes.number, + /** + * Move columns to the right + * + * for Small devices Tablets + * + * class-prefix `col-sm-offset-` + */ + smOffset: _react2['default'].PropTypes.number, + /** + * Move columns to the right + * + * for Medium devices Desktops + * + * class-prefix `col-md-offset-` + */ + mdOffset: _react2['default'].PropTypes.number, + /** + * Move columns to the right + * + * for Large devices Desktops + * + * class-prefix `col-lg-offset-` + */ + lgOffset: _react2['default'].PropTypes.number, + /** + * Change the order of grid columns to the right + * + * for Extra small devices Phones + * + * class-prefix `col-xs-push-` + */ + xsPush: _react2['default'].PropTypes.number, + /** + * Change the order of grid columns to the right + * + * for Small devices Tablets + * + * class-prefix `col-sm-push-` + */ + smPush: _react2['default'].PropTypes.number, + /** + * Change the order of grid columns to the right + * + * for Medium devices Desktops + * + * class-prefix `col-md-push-` + */ + mdPush: _react2['default'].PropTypes.number, + /** + * Change the order of grid columns to the right + * + * for Large devices Desktops + * + * class-prefix `col-lg-push-` + */ + lgPush: _react2['default'].PropTypes.number, + /** + * Change the order of grid columns to the left + * + * for Extra small devices Phones + * + * class-prefix `col-xs-pull-` + */ + xsPull: _react2['default'].PropTypes.number, + /** + * Change the order of grid columns to the left + * + * for Small devices Tablets + * + * class-prefix `col-sm-pull-` + */ + smPull: _react2['default'].PropTypes.number, + /** + * Change the order of grid columns to the left + * + * for Medium devices Desktops + * + * class-prefix `col-md-pull-` + */ + mdPull: _react2['default'].PropTypes.number, + /** + * Change the order of grid columns to the left + * + * for Large devices Desktops + * + * class-prefix `col-lg-pull-` + */ + lgPull: _react2['default'].PropTypes.number, + }; + + var defaultProps = { + componentClass: 'div', + }; + + var Col = (function (_React$Component) { + (0, _inherits3['default'])(Col, _React$Component); + + function Col() { + (0, _classCallCheck3['default'])(this, Col); + return (0, _possibleConstructorReturn3['default'])(this, _React$Component.apply(this, arguments)); + } + + Col.prototype.render = function render() { + var _props = this.props, + Component = _props.componentClass, + className = _props.className, + props = (0, _objectWithoutProperties3['default'])(_props, ['componentClass', 'className']); + + var _splitBsProps = (0, _bootstrapUtils.splitBsProps)(props), + bsProps = _splitBsProps[0], + elementProps = _splitBsProps[1]; + + var classes = []; + + _StyleConfig.DEVICE_SIZES.forEach(function (size) { + function popProp(propSuffix, modifier) { + var propName = '' + size + propSuffix; + var propValue = elementProps[propName]; + + if (propValue != null) { + classes.push((0, _bootstrapUtils.prefix)(bsProps, '' + size + modifier + '-' + propValue)); + } + + delete elementProps[propName]; + } + + popProp('', ''); + popProp('Offset', '-offset'); + popProp('Push', '-push'); + popProp('Pull', '-pull'); + + var hiddenPropName = size + 'Hidden'; + if (elementProps[hiddenPropName]) { + classes.push('hidden-' + size); + } + delete elementProps[hiddenPropName]; + }); + + return _react2['default'].createElement( + Component, + (0, _extends3['default'])({}, elementProps, { + className: (0, _classnames2['default'])(className, classes), + }), + ); + }; + + return Col; + })(_react2['default'].Component); + + Col.propTypes = propTypes; + Col.defaultProps = defaultProps; + + exports['default'] = (0, _bootstrapUtils.bsClass)('col', Col); + module.exports = exports['default']; + + /***/ + }, + /* 710 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + + var _extends2 = __webpack_require__(20); + + var _extends3 = _interopRequireDefault(_extends2); + + var _objectWithoutProperties2 = __webpack_require__(25); + + var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + + var _classCallCheck2 = __webpack_require__(23); + + var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + + var _possibleConstructorReturn2 = __webpack_require__(26); + + var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + + var _inherits2 = __webpack_require__(24); + + var _inherits3 = _interopRequireDefault(_inherits2); + + var _classnames = __webpack_require__(27); + + var _classnames2 = _interopRequireDefault(_classnames); + + var _react = __webpack_require__(1); + + var _react2 = _interopRequireDefault(_react); + + var _warning = __webpack_require__(47); + + var _warning2 = _interopRequireDefault(_warning); + + var _bootstrapUtils = __webpack_require__(46); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + var propTypes = { + /** + * Uses `controlId` from `<FormGroup>` if not explicitly specified. + */ + htmlFor: _react2['default'].PropTypes.string, + srOnly: _react2['default'].PropTypes.bool, + }; + + var defaultProps = { + srOnly: false, + }; + + var contextTypes = { + $bs_formGroup: _react2['default'].PropTypes.object, + }; + + var ControlLabel = (function (_React$Component) { + (0, _inherits3['default'])(ControlLabel, _React$Component); + + function ControlLabel() { + (0, _classCallCheck3['default'])(this, ControlLabel); + return (0, _possibleConstructorReturn3['default'])(this, _React$Component.apply(this, arguments)); + } + + ControlLabel.prototype.render = function render() { + var formGroup = this.context.$bs_formGroup; + var controlId = formGroup && formGroup.controlId; + + var _props = this.props, + _props$htmlFor = _props.htmlFor, + htmlFor = _props$htmlFor === undefined ? controlId : _props$htmlFor, + srOnly = _props.srOnly, + className = _props.className, + props = (0, _objectWithoutProperties3['default'])(_props, ['htmlFor', 'srOnly', 'className']); + + var _splitBsProps = (0, _bootstrapUtils.splitBsProps)(props), + bsProps = _splitBsProps[0], + elementProps = _splitBsProps[1]; + + true + ? (0, _warning2['default'])( + controlId == null || htmlFor === controlId, + '`controlId` is ignored on `<ControlLabel>` when `htmlFor` is specified.', + ) + : void 0; + + var classes = (0, _extends3['default'])({}, (0, _bootstrapUtils.getClassSet)(bsProps), { + 'sr-only': srOnly, + }); + + return _react2['default'].createElement( + 'label', + (0, _extends3['default'])({}, elementProps, { + htmlFor: htmlFor, + className: (0, _classnames2['default'])(className, classes), + }), + ); + }; + + return ControlLabel; + })(_react2['default'].Component); + + ControlLabel.propTypes = propTypes; + ControlLabel.defaultProps = defaultProps; + ControlLabel.contextTypes = contextTypes; + + exports['default'] = (0, _bootstrapUtils.bsClass)('control-label', ControlLabel); + module.exports = exports['default']; + + /***/ + }, + /* 711 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + + var _extends2 = __webpack_require__(20); + + var _extends3 = _interopRequireDefault(_extends2); + + var _objectWithoutProperties2 = __webpack_require__(25); + + var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + + var _classCallCheck2 = __webpack_require__(23); + + var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + + var _possibleConstructorReturn2 = __webpack_require__(26); + + var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + + var _inherits2 = __webpack_require__(24); + + var _inherits3 = _interopRequireDefault(_inherits2); + + var _classnames = __webpack_require__(27); + + var _classnames2 = _interopRequireDefault(_classnames); + + var _react = __webpack_require__(1); + + var _react2 = _interopRequireDefault(_react); + + var _elementType = __webpack_require__(103); + + var _elementType2 = _interopRequireDefault(_elementType); + + var _bootstrapUtils = __webpack_require__(46); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + var propTypes = { + horizontal: _react2['default'].PropTypes.bool, + inline: _react2['default'].PropTypes.bool, + componentClass: _elementType2['default'], + }; + + var defaultProps = { + horizontal: false, + inline: false, + componentClass: 'form', + }; + + var Form = (function (_React$Component) { + (0, _inherits3['default'])(Form, _React$Component); + + function Form() { + (0, _classCallCheck3['default'])(this, Form); + return (0, _possibleConstructorReturn3['default'])(this, _React$Component.apply(this, arguments)); + } + + Form.prototype.render = function render() { + var _props = this.props, + horizontal = _props.horizontal, + inline = _props.inline, + Component = _props.componentClass, + className = _props.className, + props = (0, _objectWithoutProperties3['default'])(_props, [ + 'horizontal', + 'inline', + 'componentClass', + 'className', + ]); + + var _splitBsProps = (0, _bootstrapUtils.splitBsProps)(props), + bsProps = _splitBsProps[0], + elementProps = _splitBsProps[1]; + + var classes = []; + if (horizontal) { + classes.push((0, _bootstrapUtils.prefix)(bsProps, 'horizontal')); + } + if (inline) { + classes.push((0, _bootstrapUtils.prefix)(bsProps, 'inline')); + } + + return _react2['default'].createElement( + Component, + (0, _extends3['default'])({}, elementProps, { + className: (0, _classnames2['default'])(className, classes), + }), + ); + }; + + return Form; + })(_react2['default'].Component); + + Form.propTypes = propTypes; + Form.defaultProps = defaultProps; + + exports['default'] = (0, _bootstrapUtils.bsClass)('form', Form); + module.exports = exports['default']; + + /***/ + }, + /* 712 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + + var _extends2 = __webpack_require__(20); + + var _extends3 = _interopRequireDefault(_extends2); + + var _objectWithoutProperties2 = __webpack_require__(25); + + var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + + var _classCallCheck2 = __webpack_require__(23); + + var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + + var _possibleConstructorReturn2 = __webpack_require__(26); + + var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + + var _inherits2 = __webpack_require__(24); + + var _inherits3 = _interopRequireDefault(_inherits2); + + var _classnames = __webpack_require__(27); + + var _classnames2 = _interopRequireDefault(_classnames); + + var _react = __webpack_require__(1); + + var _react2 = _interopRequireDefault(_react); + + var _elementType = __webpack_require__(103); + + var _elementType2 = _interopRequireDefault(_elementType); + + var _warning = __webpack_require__(47); + + var _warning2 = _interopRequireDefault(_warning); + + var _FormControlFeedback = __webpack_require__(713); + + var _FormControlFeedback2 = _interopRequireDefault(_FormControlFeedback); + + var _FormControlStatic = __webpack_require__(714); + + var _FormControlStatic2 = _interopRequireDefault(_FormControlStatic); + + var _bootstrapUtils = __webpack_require__(46); + + var _StyleConfig = __webpack_require__(96); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + var propTypes = { + componentClass: _elementType2['default'], + /** + * Only relevant if `componentClass` is `'input'`. + */ + type: _react2['default'].PropTypes.string, + /** + * Uses `controlId` from `<FormGroup>` if not explicitly specified. + */ + id: _react2['default'].PropTypes.string, + /** + * Attaches a ref to the `<input>` element. Only functions can be used here. + * + * ```js + * <FormControl inputRef={ref => { this.input = ref; }} /> + * ``` + */ + inputRef: _react2['default'].PropTypes.func, + }; + + var defaultProps = { + componentClass: 'input', + }; + + var contextTypes = { + $bs_formGroup: _react2['default'].PropTypes.object, + }; + + var FormControl = (function (_React$Component) { + (0, _inherits3['default'])(FormControl, _React$Component); + + function FormControl() { + (0, _classCallCheck3['default'])(this, FormControl); + return (0, _possibleConstructorReturn3['default'])(this, _React$Component.apply(this, arguments)); + } + + FormControl.prototype.render = function render() { + var formGroup = this.context.$bs_formGroup; + var controlId = formGroup && formGroup.controlId; + + var _props = this.props, + Component = _props.componentClass, + type = _props.type, + _props$id = _props.id, + id = _props$id === undefined ? controlId : _props$id, + inputRef = _props.inputRef, + className = _props.className, + bsSize = _props.bsSize, + props = (0, _objectWithoutProperties3['default'])(_props, [ + 'componentClass', + 'type', + 'id', + 'inputRef', + 'className', + 'bsSize', + ]); + + var _splitBsProps = (0, _bootstrapUtils.splitBsProps)(props), + bsProps = _splitBsProps[0], + elementProps = _splitBsProps[1]; + + true + ? (0, _warning2['default'])( + controlId == null || id === controlId, + '`controlId` is ignored on `<FormControl>` when `id` is specified.', + ) + : void 0; + + // input[type="file"] should not have .form-control. + var classes = void 0; + if (type !== 'file') { + classes = (0, _bootstrapUtils.getClassSet)(bsProps); + } + + // If user provides a size, make sure to append it to classes as input- + // e.g. if bsSize is small, it will append input-sm + if (bsSize) { + var size = _StyleConfig.SIZE_MAP[bsSize] || bsSize; + classes[(0, _bootstrapUtils.prefix)({ bsClass: 'input' }, size)] = true; + } + + return _react2['default'].createElement( + Component, + (0, _extends3['default'])({}, elementProps, { + type: type, + id: id, + ref: inputRef, + className: (0, _classnames2['default'])(className, classes), + }), + ); + }; + + return FormControl; + })(_react2['default'].Component); + + FormControl.propTypes = propTypes; + FormControl.defaultProps = defaultProps; + FormControl.contextTypes = contextTypes; + + FormControl.Feedback = _FormControlFeedback2['default']; + FormControl.Static = _FormControlStatic2['default']; + + exports['default'] = (0, _bootstrapUtils.bsClass)( + 'form-control', + (0, _bootstrapUtils.bsSizes)([_StyleConfig.Size.SMALL, _StyleConfig.Size.LARGE], FormControl), + ); + module.exports = exports['default']; + + /***/ + }, + /* 713 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + + var _objectWithoutProperties2 = __webpack_require__(25); + + var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + + var _extends2 = __webpack_require__(20); + + var _extends3 = _interopRequireDefault(_extends2); + + var _classCallCheck2 = __webpack_require__(23); + + var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + + var _possibleConstructorReturn2 = __webpack_require__(26); + + var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + + var _inherits2 = __webpack_require__(24); + + var _inherits3 = _interopRequireDefault(_inherits2); + + var _classnames = __webpack_require__(27); + + var _classnames2 = _interopRequireDefault(_classnames); + + var _react = __webpack_require__(1); + + var _react2 = _interopRequireDefault(_react); + + var _Glyphicon = __webpack_require__(716); + + var _Glyphicon2 = _interopRequireDefault(_Glyphicon); + + var _bootstrapUtils = __webpack_require__(46); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + var defaultProps = { + bsRole: 'feedback', + }; + + var contextTypes = { + $bs_formGroup: _react2['default'].PropTypes.object, + }; + + var FormControlFeedback = (function (_React$Component) { + (0, _inherits3['default'])(FormControlFeedback, _React$Component); + + function FormControlFeedback() { + (0, _classCallCheck3['default'])(this, FormControlFeedback); + return (0, _possibleConstructorReturn3['default'])(this, _React$Component.apply(this, arguments)); + } + + FormControlFeedback.prototype.getGlyph = function getGlyph(validationState) { + switch (validationState) { + case 'success': + return 'ok'; + case 'warning': + return 'warning-sign'; + case 'error': + return 'remove'; + default: + return null; + } + }; + + FormControlFeedback.prototype.renderDefaultFeedback = function renderDefaultFeedback( + formGroup, + className, + classes, + elementProps, + ) { + var glyph = this.getGlyph(formGroup && formGroup.validationState); + if (!glyph) { + return null; + } + + return _react2['default'].createElement( + _Glyphicon2['default'], + (0, _extends3['default'])({}, elementProps, { + glyph: glyph, + className: (0, _classnames2['default'])(className, classes), + }), + ); + }; + + FormControlFeedback.prototype.render = function render() { + var _props = this.props, + className = _props.className, + children = _props.children, + props = (0, _objectWithoutProperties3['default'])(_props, ['className', 'children']); + + var _splitBsProps = (0, _bootstrapUtils.splitBsProps)(props), + bsProps = _splitBsProps[0], + elementProps = _splitBsProps[1]; + + var classes = (0, _bootstrapUtils.getClassSet)(bsProps); + + if (!children) { + return this.renderDefaultFeedback(this.context.$bs_formGroup, className, classes, elementProps); + } + + var child = _react2['default'].Children.only(children); + return _react2['default'].cloneElement( + child, + (0, _extends3['default'])({}, elementProps, { + className: (0, _classnames2['default'])(child.props.className, className, classes), + }), + ); + }; + + return FormControlFeedback; + })(_react2['default'].Component); + + FormControlFeedback.defaultProps = defaultProps; + FormControlFeedback.contextTypes = contextTypes; + + exports['default'] = (0, _bootstrapUtils.bsClass)('form-control-feedback', FormControlFeedback); + module.exports = exports['default']; + + /***/ + }, + /* 714 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + + var _extends2 = __webpack_require__(20); + + var _extends3 = _interopRequireDefault(_extends2); + + var _objectWithoutProperties2 = __webpack_require__(25); + + var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + + var _classCallCheck2 = __webpack_require__(23); + + var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + + var _possibleConstructorReturn2 = __webpack_require__(26); + + var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + + var _inherits2 = __webpack_require__(24); + + var _inherits3 = _interopRequireDefault(_inherits2); + + var _classnames = __webpack_require__(27); + + var _classnames2 = _interopRequireDefault(_classnames); + + var _react = __webpack_require__(1); + + var _react2 = _interopRequireDefault(_react); + + var _elementType = __webpack_require__(103); + + var _elementType2 = _interopRequireDefault(_elementType); + + var _bootstrapUtils = __webpack_require__(46); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + var propTypes = { + componentClass: _elementType2['default'], + }; + + var defaultProps = { + componentClass: 'p', + }; + + var FormControlStatic = (function (_React$Component) { + (0, _inherits3['default'])(FormControlStatic, _React$Component); + + function FormControlStatic() { + (0, _classCallCheck3['default'])(this, FormControlStatic); + return (0, _possibleConstructorReturn3['default'])(this, _React$Component.apply(this, arguments)); + } + + FormControlStatic.prototype.render = function render() { + var _props = this.props, + Component = _props.componentClass, + className = _props.className, + props = (0, _objectWithoutProperties3['default'])(_props, ['componentClass', 'className']); + + var _splitBsProps = (0, _bootstrapUtils.splitBsProps)(props), + bsProps = _splitBsProps[0], + elementProps = _splitBsProps[1]; + + var classes = (0, _bootstrapUtils.getClassSet)(bsProps); + + return _react2['default'].createElement( + Component, + (0, _extends3['default'])({}, elementProps, { + className: (0, _classnames2['default'])(className, classes), + }), + ); + }; + + return FormControlStatic; + })(_react2['default'].Component); + + FormControlStatic.propTypes = propTypes; + FormControlStatic.defaultProps = defaultProps; + + exports['default'] = (0, _bootstrapUtils.bsClass)('form-control-static', FormControlStatic); + module.exports = exports['default']; + + /***/ + }, + /* 715 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + + var _extends2 = __webpack_require__(20); + + var _extends3 = _interopRequireDefault(_extends2); + + var _objectWithoutProperties2 = __webpack_require__(25); + + var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + + var _classCallCheck2 = __webpack_require__(23); + + var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + + var _possibleConstructorReturn2 = __webpack_require__(26); + + var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + + var _inherits2 = __webpack_require__(24); + + var _inherits3 = _interopRequireDefault(_inherits2); + + var _classnames = __webpack_require__(27); + + var _classnames2 = _interopRequireDefault(_classnames); + + var _react = __webpack_require__(1); + + var _react2 = _interopRequireDefault(_react); + + var _bootstrapUtils = __webpack_require__(46); + + var _StyleConfig = __webpack_require__(96); + + var _ValidComponentChildren = __webpack_require__(305); + + var _ValidComponentChildren2 = _interopRequireDefault(_ValidComponentChildren); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + var propTypes = { + /** + * Sets `id` on `<FormControl>` and `htmlFor` on `<FormGroup.Label>`. + */ + controlId: _react2['default'].PropTypes.string, + validationState: _react2['default'].PropTypes.oneOf(['success', 'warning', 'error', null]), + }; + + var childContextTypes = { + $bs_formGroup: _react2['default'].PropTypes.object.isRequired, + }; + + var FormGroup = (function (_React$Component) { + (0, _inherits3['default'])(FormGroup, _React$Component); + + function FormGroup() { + (0, _classCallCheck3['default'])(this, FormGroup); + return (0, _possibleConstructorReturn3['default'])(this, _React$Component.apply(this, arguments)); + } + + FormGroup.prototype.getChildContext = function getChildContext() { + var _props = this.props, + controlId = _props.controlId, + validationState = _props.validationState; + + return { + $bs_formGroup: { + controlId: controlId, + validationState: validationState, + }, + }; + }; + + FormGroup.prototype.hasFeedback = function hasFeedback(children) { + var _this2 = this; + + return _ValidComponentChildren2['default'].some(children, function (child) { + return ( + child.props.bsRole === 'feedback' || + (child.props.children && _this2.hasFeedback(child.props.children)) + ); + }); + }; + + FormGroup.prototype.render = function render() { + var _props2 = this.props, + validationState = _props2.validationState, + className = _props2.className, + children = _props2.children, + props = (0, _objectWithoutProperties3['default'])(_props2, [ + 'validationState', + 'className', + 'children', + ]); + + var _splitBsPropsAndOmit = (0, _bootstrapUtils.splitBsPropsAndOmit)(props, ['controlId']), + bsProps = _splitBsPropsAndOmit[0], + elementProps = _splitBsPropsAndOmit[1]; + + var classes = (0, _extends3['default'])({}, (0, _bootstrapUtils.getClassSet)(bsProps), { + 'has-feedback': this.hasFeedback(children), + }); + if (validationState) { + classes['has-' + validationState] = true; + } + + return _react2['default'].createElement( + 'div', + (0, _extends3['default'])({}, elementProps, { + className: (0, _classnames2['default'])(className, classes), + }), + children, + ); + }; + + return FormGroup; + })(_react2['default'].Component); + + FormGroup.propTypes = propTypes; + FormGroup.childContextTypes = childContextTypes; + + exports['default'] = (0, _bootstrapUtils.bsClass)( + 'form-group', + (0, _bootstrapUtils.bsSizes)([_StyleConfig.Size.LARGE, _StyleConfig.Size.SMALL], FormGroup), + ); + module.exports = exports['default']; + + /***/ + }, + /* 716 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + + var _extends3 = __webpack_require__(20); + + var _extends4 = _interopRequireDefault(_extends3); + + var _objectWithoutProperties2 = __webpack_require__(25); + + var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + + var _classCallCheck2 = __webpack_require__(23); + + var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + + var _possibleConstructorReturn2 = __webpack_require__(26); + + var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + + var _inherits2 = __webpack_require__(24); + + var _inherits3 = _interopRequireDefault(_inherits2); + + var _classnames = __webpack_require__(27); + + var _classnames2 = _interopRequireDefault(_classnames); + + var _react = __webpack_require__(1); + + var _react2 = _interopRequireDefault(_react); + + var _bootstrapUtils = __webpack_require__(46); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + var propTypes = { + /** + * An icon name without "glyphicon-" prefix. See e.g. http://getbootstrap.com/components/#glyphicons + */ + glyph: _react2['default'].PropTypes.string.isRequired, + }; + + var Glyphicon = (function (_React$Component) { + (0, _inherits3['default'])(Glyphicon, _React$Component); + + function Glyphicon() { + (0, _classCallCheck3['default'])(this, Glyphicon); + return (0, _possibleConstructorReturn3['default'])(this, _React$Component.apply(this, arguments)); + } + + Glyphicon.prototype.render = function render() { + var _extends2; + + var _props = this.props, + glyph = _props.glyph, + className = _props.className, + props = (0, _objectWithoutProperties3['default'])(_props, ['glyph', 'className']); + + var _splitBsProps = (0, _bootstrapUtils.splitBsProps)(props), + bsProps = _splitBsProps[0], + elementProps = _splitBsProps[1]; + + var classes = (0, _extends4['default'])( + {}, + (0, _bootstrapUtils.getClassSet)(bsProps), + ((_extends2 = {}), (_extends2[(0, _bootstrapUtils.prefix)(bsProps, glyph)] = true), _extends2), + ); + + return _react2['default'].createElement( + 'span', + (0, _extends4['default'])({}, elementProps, { + className: (0, _classnames2['default'])(className, classes), + }), + ); + }; + + return Glyphicon; + })(_react2['default'].Component); + + Glyphicon.propTypes = propTypes; + + exports['default'] = (0, _bootstrapUtils.bsClass)('glyphicon', Glyphicon); + module.exports = exports['default']; + + /***/ + }, + /* 717 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + + var _extends3 = __webpack_require__(20); + + var _extends4 = _interopRequireDefault(_extends3); + + var _objectWithoutProperties2 = __webpack_require__(25); + + var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + + var _classCallCheck2 = __webpack_require__(23); + + var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + + var _possibleConstructorReturn2 = __webpack_require__(26); + + var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + + var _inherits2 = __webpack_require__(24); + + var _inherits3 = _interopRequireDefault(_inherits2); + + var _classnames = __webpack_require__(27); + + var _classnames2 = _interopRequireDefault(_classnames); + + var _keycode = __webpack_require__(688); + + var _keycode2 = _interopRequireDefault(_keycode); + + var _react = __webpack_require__(1); + + var _react2 = _interopRequireDefault(_react); + + var _reactDom = __webpack_require__(140); + + var _reactDom2 = _interopRequireDefault(_reactDom); + + var _all = __webpack_require__(793); + + var _all2 = _interopRequireDefault(_all); + + var _warning = __webpack_require__(47); + + var _warning2 = _interopRequireDefault(_warning); + + var _bootstrapUtils = __webpack_require__(46); + + var _createChainedFunction = __webpack_require__(306); + + var _createChainedFunction2 = _interopRequireDefault(_createChainedFunction); + + var _ValidComponentChildren = __webpack_require__(305); + + var _ValidComponentChildren2 = _interopRequireDefault(_ValidComponentChildren); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + // TODO: Should we expose `<NavItem>` as `<Nav.Item>`? + + // TODO: This `bsStyle` is very unlike the others. Should we rename it? + + // TODO: `pullRight` and `pullLeft` don't render right outside of `navbar`. + // Consider renaming or replacing them. + + var propTypes = { + /** + * Marks the NavItem with a matching `eventKey` as active. Has a + * higher precedence over `activeHref`. + */ + activeKey: _react2['default'].PropTypes.any, + + /** + * Marks the child NavItem with a matching `href` prop as active. + */ + activeHref: _react2['default'].PropTypes.string, + + /** + * NavItems are be positioned vertically. + */ + stacked: _react2['default'].PropTypes.bool, + + justified: (0, _all2['default'])(_react2['default'].PropTypes.bool, function (_ref) { + var justified = _ref.justified, + navbar = _ref.navbar; + return justified && navbar ? Error('justified navbar `Nav`s are not supported') : null; + }), + + /** + * A callback fired when a NavItem is selected. + * + * ```js + * function ( + * Any eventKey, + * SyntheticEvent event? + * ) + * ``` + */ + onSelect: _react2['default'].PropTypes.func, + + /** + * ARIA role for the Nav, in the context of a TabContainer, the default will + * be set to "tablist", but can be overridden by the Nav when set explicitly. + * + * When the role is set to "tablist" NavItem focus is managed according to + * the ARIA authoring practices for tabs: + * https://www.w3.org/TR/2013/WD-wai-aria-practices-20130307/#tabpanel + */ + role: _react2['default'].PropTypes.string, + + /** + * Apply styling an alignment for use in a Navbar. This prop will be set + * automatically when the Nav is used inside a Navbar. + */ + navbar: _react2['default'].PropTypes.bool, + + /** + * Float the Nav to the right. When `navbar` is `true` the appropriate + * contextual classes are added as well. + */ + pullRight: _react2['default'].PropTypes.bool, + + /** + * Float the Nav to the left. When `navbar` is `true` the appropriate + * contextual classes are added as well. + */ + pullLeft: _react2['default'].PropTypes.bool, + }; + + var defaultProps = { + justified: false, + pullRight: false, + pullLeft: false, + stacked: false, + }; + + var contextTypes = { + $bs_navbar: _react2['default'].PropTypes.shape({ + bsClass: _react2['default'].PropTypes.string, + onSelect: _react2['default'].PropTypes.func, + }), + + $bs_tabContainer: _react2['default'].PropTypes.shape({ + activeKey: _react2['default'].PropTypes.any, + onSelect: _react2['default'].PropTypes.func.isRequired, + getTabId: _react2['default'].PropTypes.func.isRequired, + getPaneId: _react2['default'].PropTypes.func.isRequired, + }), + }; + + var Nav = (function (_React$Component) { + (0, _inherits3['default'])(Nav, _React$Component); + + function Nav() { + (0, _classCallCheck3['default'])(this, Nav); + return (0, _possibleConstructorReturn3['default'])(this, _React$Component.apply(this, arguments)); + } + + Nav.prototype.componentDidUpdate = function componentDidUpdate() { + var _this2 = this; + + if (!this._needsRefocus) { + return; + } + + this._needsRefocus = false; + + var children = this.props.children; + + var _getActiveProps = this.getActiveProps(), + activeKey = _getActiveProps.activeKey, + activeHref = _getActiveProps.activeHref; + + var activeChild = _ValidComponentChildren2['default'].find(children, function (child) { + return _this2.isActive(child, activeKey, activeHref); + }); + + var childrenArray = _ValidComponentChildren2['default'].toArray(children); + var activeChildIndex = childrenArray.indexOf(activeChild); + + var childNodes = _reactDom2['default'].findDOMNode(this).children; + var activeNode = childNodes && childNodes[activeChildIndex]; + + if (!activeNode || !activeNode.firstChild) { + return; + } + + activeNode.firstChild.focus(); + }; + + Nav.prototype.handleTabKeyDown = function handleTabKeyDown(onSelect, event) { + var nextActiveChild = void 0; + + switch (event.keyCode) { + case _keycode2['default'].codes.left: + case _keycode2['default'].codes.up: + nextActiveChild = this.getNextActiveChild(-1); + break; + case _keycode2['default'].codes.right: + case _keycode2['default'].codes.down: + nextActiveChild = this.getNextActiveChild(1); + break; + default: + // It was a different key; don't handle this keypress. + return; + } + + event.preventDefault(); + + if (onSelect && nextActiveChild && nextActiveChild.props.eventKey) { + onSelect(nextActiveChild.props.eventKey); + } + + this._needsRefocus = true; + }; + + Nav.prototype.getNextActiveChild = function getNextActiveChild(offset) { + var _this3 = this; + + var children = this.props.children; + + var validChildren = children.filter(function (child) { + return child.props.eventKey && !child.props.disabled; + }); + + var _getActiveProps2 = this.getActiveProps(), + activeKey = _getActiveProps2.activeKey, + activeHref = _getActiveProps2.activeHref; + + var activeChild = _ValidComponentChildren2['default'].find(children, function (child) { + return _this3.isActive(child, activeKey, activeHref); + }); + + // This assumes the active child is not disabled. + var activeChildIndex = validChildren.indexOf(activeChild); + if (activeChildIndex === -1) { + // Something has gone wrong. Select the first valid child we can find. + return validChildren[0]; + } + + var nextIndex = activeChildIndex + offset; + var numValidChildren = validChildren.length; + + if (nextIndex >= numValidChildren) { + nextIndex = 0; + } else if (nextIndex < 0) { + nextIndex = numValidChildren - 1; + } + + return validChildren[nextIndex]; + }; + + Nav.prototype.getActiveProps = function getActiveProps() { + var tabContainer = this.context.$bs_tabContainer; + + if (tabContainer) { + true + ? (0, _warning2['default'])( + this.props.activeKey == null && !this.props.activeHref, + 'Specifying a `<Nav>` `activeKey` or `activeHref` in the context of ' + + 'a `<TabContainer>` is not supported. Instead use `<TabContainer ' + + ('activeKey={' + this.props.activeKey + '} />`.'), + ) + : void 0; + + return tabContainer; + } + + return this.props; + }; + + Nav.prototype.isActive = function isActive(_ref2, activeKey, activeHref) { + var props = _ref2.props; + + if ( + props.active || + (activeKey != null && props.eventKey === activeKey) || + (activeHref && props.href === activeHref) + ) { + return true; + } + + return props.active; + }; + + Nav.prototype.getTabProps = function getTabProps(child, tabContainer, navRole, active, onSelect) { + var _this4 = this; + + if (!tabContainer && navRole !== 'tablist') { + // No tab props here. + return null; + } + + var _child$props = child.props, + id = _child$props.id, + controls = _child$props['aria-controls'], + eventKey = _child$props.eventKey, + role = _child$props.role, + onKeyDown = _child$props.onKeyDown, + tabIndex = _child$props.tabIndex; + + if (tabContainer) { + true + ? (0, _warning2['default'])( + !id && !controls, + 'In the context of a `<TabContainer>`, `<NavItem>`s are given ' + + 'generated `id` and `aria-controls` attributes for the sake of ' + + 'proper component accessibility. Any provided ones will be ignored. ' + + 'To control these attributes directly, provide a `generateChildId` ' + + 'prop to the parent `<TabContainer>`.', + ) + : void 0; + + id = tabContainer.getTabId(eventKey); + controls = tabContainer.getPaneId(eventKey); + } + + if (navRole === 'tablist') { + role = role || 'tab'; + onKeyDown = (0, _createChainedFunction2['default'])(function (event) { + return _this4.handleTabKeyDown(onSelect, event); + }, onKeyDown); + tabIndex = active ? tabIndex : -1; + } + + return { + id: id, + role: role, + onKeyDown: onKeyDown, + 'aria-controls': controls, + tabIndex: tabIndex, + }; + }; + + Nav.prototype.render = function render() { + var _extends2, + _this5 = this; + + var _props = this.props, + stacked = _props.stacked, + justified = _props.justified, + onSelect = _props.onSelect, + propsRole = _props.role, + propsNavbar = _props.navbar, + pullRight = _props.pullRight, + pullLeft = _props.pullLeft, + className = _props.className, + children = _props.children, + props = (0, _objectWithoutProperties3['default'])(_props, [ + 'stacked', + 'justified', + 'onSelect', + 'role', + 'navbar', + 'pullRight', + 'pullLeft', + 'className', + 'children', + ]); + + var tabContainer = this.context.$bs_tabContainer; + var role = propsRole || (tabContainer ? 'tablist' : null); + + var _getActiveProps3 = this.getActiveProps(), + activeKey = _getActiveProps3.activeKey, + activeHref = _getActiveProps3.activeHref; + + delete props.activeKey; // Accessed via this.getActiveProps(). + delete props.activeHref; // Accessed via this.getActiveProps(). + + var _splitBsProps = (0, _bootstrapUtils.splitBsProps)(props), + bsProps = _splitBsProps[0], + elementProps = _splitBsProps[1]; + + var classes = (0, _extends4['default'])( + {}, + (0, _bootstrapUtils.getClassSet)(bsProps), + ((_extends2 = {}), + (_extends2[(0, _bootstrapUtils.prefix)(bsProps, 'stacked')] = stacked), + (_extends2[(0, _bootstrapUtils.prefix)(bsProps, 'justified')] = justified), + _extends2), + ); + + var navbar = propsNavbar != null ? propsNavbar : this.context.$bs_navbar; + var pullLeftClassName = void 0; + var pullRightClassName = void 0; + + if (navbar) { + var navbarProps = this.context.$bs_navbar || { bsClass: 'navbar' }; + + classes[(0, _bootstrapUtils.prefix)(navbarProps, 'nav')] = true; + + pullRightClassName = (0, _bootstrapUtils.prefix)(navbarProps, 'right'); + pullLeftClassName = (0, _bootstrapUtils.prefix)(navbarProps, 'left'); + } else { + pullRightClassName = 'pull-right'; + pullLeftClassName = 'pull-left'; + } + + classes[pullRightClassName] = pullRight; + classes[pullLeftClassName] = pullLeft; + + return _react2['default'].createElement( + 'ul', + (0, _extends4['default'])({}, elementProps, { + role: role, + className: (0, _classnames2['default'])(className, classes), + }), + _ValidComponentChildren2['default'].map(children, function (child) { + var active = _this5.isActive(child, activeKey, activeHref); + var childOnSelect = (0, _createChainedFunction2['default'])( + child.props.onSelect, + onSelect, + navbar && navbar.onSelect, + tabContainer && tabContainer.onSelect, + ); + + return (0, _react.cloneElement)( + child, + (0, _extends4['default'])( + {}, + _this5.getTabProps(child, tabContainer, role, active, childOnSelect), + { + active: active, + activeKey: activeKey, + activeHref: activeHref, + onSelect: childOnSelect, + }, + ), + ); + }), + ); + }; + + return Nav; + })(_react2['default'].Component); + + Nav.propTypes = propTypes; + Nav.defaultProps = defaultProps; + Nav.contextTypes = contextTypes; + + exports['default'] = (0, _bootstrapUtils.bsClass)( + 'nav', + (0, _bootstrapUtils.bsStyles)(['tabs', 'pills'], Nav), + ); + module.exports = exports['default']; + + /***/ + }, + /* 718 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + + var _extends2 = __webpack_require__(20); + + var _extends3 = _interopRequireDefault(_extends2); + + var _objectWithoutProperties2 = __webpack_require__(25); + + var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + + var _classCallCheck2 = __webpack_require__(23); + + var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + + var _possibleConstructorReturn2 = __webpack_require__(26); + + var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + + var _inherits2 = __webpack_require__(24); + + var _inherits3 = _interopRequireDefault(_inherits2); + + var _classnames = __webpack_require__(27); + + var _classnames2 = _interopRequireDefault(_classnames); + + var _react = __webpack_require__(1); + + var _react2 = _interopRequireDefault(_react); + + var _SafeAnchor = __webpack_require__(304); + + var _SafeAnchor2 = _interopRequireDefault(_SafeAnchor); + + var _createChainedFunction = __webpack_require__(306); + + var _createChainedFunction2 = _interopRequireDefault(_createChainedFunction); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + var propTypes = { + active: _react2['default'].PropTypes.bool, + disabled: _react2['default'].PropTypes.bool, + role: _react2['default'].PropTypes.string, + href: _react2['default'].PropTypes.string, + onClick: _react2['default'].PropTypes.func, + onSelect: _react2['default'].PropTypes.func, + eventKey: _react2['default'].PropTypes.any, + }; + + var defaultProps = { + active: false, + disabled: false, + }; + + var NavItem = (function (_React$Component) { + (0, _inherits3['default'])(NavItem, _React$Component); + + function NavItem(props, context) { + (0, _classCallCheck3['default'])(this, NavItem); + + var _this = (0, _possibleConstructorReturn3['default'])( + this, + _React$Component.call(this, props, context), + ); + + _this.handleClick = _this.handleClick.bind(_this); + return _this; + } + + NavItem.prototype.handleClick = function handleClick(e) { + if (this.props.onSelect) { + e.preventDefault(); + + if (!this.props.disabled) { + this.props.onSelect(this.props.eventKey, e); + } + } + }; + + NavItem.prototype.render = function render() { + var _props = this.props, + active = _props.active, + disabled = _props.disabled, + onClick = _props.onClick, + className = _props.className, + style = _props.style, + props = (0, _objectWithoutProperties3['default'])(_props, [ + 'active', + 'disabled', + 'onClick', + 'className', + 'style', + ]); + + delete props.onSelect; + delete props.eventKey; + + // These are injected down by `<Nav>` for building `<SubNav>`s. + delete props.activeKey; + delete props.activeHref; + + if (!props.role) { + if (props.href === '#') { + props.role = 'button'; + } + } else if (props.role === 'tab') { + props['aria-selected'] = active; + } + + return _react2['default'].createElement( + 'li', + { + role: 'presentation', + className: (0, _classnames2['default'])(className, { active: active, disabled: disabled }), + style: style, + }, + _react2['default'].createElement( + _SafeAnchor2['default'], + (0, _extends3['default'])({}, props, { + disabled: disabled, + onClick: (0, _createChainedFunction2['default'])(onClick, this.handleClick), + }), + ), + ); + }; + + return NavItem; + })(_react2['default'].Component); + + NavItem.propTypes = propTypes; + NavItem.defaultProps = defaultProps; + + exports['default'] = NavItem; + module.exports = exports['default']; + + /***/ + }, + /* 719 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var ARIADOMPropertyConfig = { + Properties: { + // Global States and Properties + 'aria-current': 0, // state + 'aria-details': 0, + 'aria-disabled': 0, // state + 'aria-hidden': 0, // state + 'aria-invalid': 0, // state + 'aria-keyshortcuts': 0, + 'aria-label': 0, + 'aria-roledescription': 0, + // Widget Attributes + 'aria-autocomplete': 0, + 'aria-checked': 0, + 'aria-expanded': 0, + 'aria-haspopup': 0, + 'aria-level': 0, + 'aria-modal': 0, + 'aria-multiline': 0, + 'aria-multiselectable': 0, + 'aria-orientation': 0, + 'aria-placeholder': 0, + 'aria-pressed': 0, + 'aria-readonly': 0, + 'aria-required': 0, + 'aria-selected': 0, + 'aria-sort': 0, + 'aria-valuemax': 0, + 'aria-valuemin': 0, + 'aria-valuenow': 0, + 'aria-valuetext': 0, + // Live Region Attributes + 'aria-atomic': 0, + 'aria-busy': 0, + 'aria-live': 0, + 'aria-relevant': 0, + // Drag-and-Drop Attributes + 'aria-dropeffect': 0, + 'aria-grabbed': 0, + // Relationship Attributes + 'aria-activedescendant': 0, + 'aria-colcount': 0, + 'aria-colindex': 0, + 'aria-colspan': 0, + 'aria-controls': 0, + 'aria-describedby': 0, + 'aria-errormessage': 0, + 'aria-flowto': 0, + 'aria-labelledby': 0, + 'aria-owns': 0, + 'aria-posinset': 0, + 'aria-rowcount': 0, + 'aria-rowindex': 0, + 'aria-rowspan': 0, + 'aria-setsize': 0, + }, + DOMAttributeNames: {}, + DOMPropertyNames: {}, + }; + + module.exports = ARIADOMPropertyConfig; + + /***/ + }, + /* 720 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var ReactDOMComponentTree = __webpack_require__(13); + + var focusNode = __webpack_require__(290); + + var AutoFocusUtils = { + focusDOMComponent: function () { + focusNode(ReactDOMComponentTree.getNodeFromInstance(this)); + }, + }; + + module.exports = AutoFocusUtils; + + /***/ + }, + /* 721 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var EventPropagators = __webpack_require__(99); + var ExecutionEnvironment = __webpack_require__(14); + var FallbackCompositionState = __webpack_require__(728); + var SyntheticCompositionEvent = __webpack_require__(768); + var SyntheticInputEvent = __webpack_require__(771); + + var END_KEYCODES = [9, 13, 27, 32]; // Tab, Return, Esc, Space + var START_KEYCODE = 229; + + var canUseCompositionEvent = ExecutionEnvironment.canUseDOM && 'CompositionEvent' in window; + + var documentMode = null; + if (ExecutionEnvironment.canUseDOM && 'documentMode' in document) { + documentMode = document.documentMode; + } + + // Webkit offers a very useful `textInput` event that can be used to + // directly represent `beforeInput`. The IE `textinput` event is not as + // useful, so we don't use it. + var canUseTextInputEvent = + ExecutionEnvironment.canUseDOM && 'TextEvent' in window && !documentMode && !isPresto(); + + // In IE9+, we have access to composition events, but the data supplied + // by the native compositionend event may be incorrect. Japanese ideographic + // spaces, for instance (\u3000) are not recorded correctly. + var useFallbackCompositionData = + ExecutionEnvironment.canUseDOM && + (!canUseCompositionEvent || (documentMode && documentMode > 8 && documentMode <= 11)); + + /** + * Opera <= 12 includes TextEvent in window, but does not fire + * text input events. Rely on keypress instead. + */ + function isPresto() { + var opera = window.opera; + return ( + typeof opera === 'object' && + typeof opera.version === 'function' && + parseInt(opera.version(), 10) <= 12 + ); + } + + var SPACEBAR_CODE = 32; + var SPACEBAR_CHAR = String.fromCharCode(SPACEBAR_CODE); + + // Events and their corresponding property names. + var eventTypes = { + beforeInput: { + phasedRegistrationNames: { + bubbled: 'onBeforeInput', + captured: 'onBeforeInputCapture', + }, + dependencies: ['topCompositionEnd', 'topKeyPress', 'topTextInput', 'topPaste'], + }, + compositionEnd: { + phasedRegistrationNames: { + bubbled: 'onCompositionEnd', + captured: 'onCompositionEndCapture', + }, + dependencies: [ + 'topBlur', + 'topCompositionEnd', + 'topKeyDown', + 'topKeyPress', + 'topKeyUp', + 'topMouseDown', + ], + }, + compositionStart: { + phasedRegistrationNames: { + bubbled: 'onCompositionStart', + captured: 'onCompositionStartCapture', + }, + dependencies: [ + 'topBlur', + 'topCompositionStart', + 'topKeyDown', + 'topKeyPress', + 'topKeyUp', + 'topMouseDown', + ], + }, + compositionUpdate: { + phasedRegistrationNames: { + bubbled: 'onCompositionUpdate', + captured: 'onCompositionUpdateCapture', + }, + dependencies: [ + 'topBlur', + 'topCompositionUpdate', + 'topKeyDown', + 'topKeyPress', + 'topKeyUp', + 'topMouseDown', + ], + }, + }; + + // Track whether we've ever handled a keypress on the space key. + var hasSpaceKeypress = false; + + /** + * Return whether a native keypress event is assumed to be a command. + * This is required because Firefox fires `keypress` events for key commands + * (cut, copy, select-all, etc.) even though no character is inserted. + */ + function isKeypressCommand(nativeEvent) { + return ( + (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) && + // ctrlKey && altKey is equivalent to AltGr, and is not a command. + !(nativeEvent.ctrlKey && nativeEvent.altKey) + ); + } + + /** + * Translate native top level events into event types. + * + * @param {string} topLevelType + * @return {object} + */ + function getCompositionEventType(topLevelType) { + switch (topLevelType) { + case 'topCompositionStart': + return eventTypes.compositionStart; + case 'topCompositionEnd': + return eventTypes.compositionEnd; + case 'topCompositionUpdate': + return eventTypes.compositionUpdate; + } + } + + /** + * Does our fallback best-guess model think this event signifies that + * composition has begun? + * + * @param {string} topLevelType + * @param {object} nativeEvent + * @return {boolean} + */ + function isFallbackCompositionStart(topLevelType, nativeEvent) { + return topLevelType === 'topKeyDown' && nativeEvent.keyCode === START_KEYCODE; + } + + /** + * Does our fallback mode think that this event is the end of composition? + * + * @param {string} topLevelType + * @param {object} nativeEvent + * @return {boolean} + */ + function isFallbackCompositionEnd(topLevelType, nativeEvent) { + switch (topLevelType) { + case 'topKeyUp': + // Command keys insert or clear IME input. + return END_KEYCODES.indexOf(nativeEvent.keyCode) !== -1; + case 'topKeyDown': + // Expect IME keyCode on each keydown. If we get any other + // code we must have exited earlier. + return nativeEvent.keyCode !== START_KEYCODE; + case 'topKeyPress': + case 'topMouseDown': + case 'topBlur': + // Events are not possible without cancelling IME. + return true; + default: + return false; + } + } + + /** + * Google Input Tools provides composition data via a CustomEvent, + * with the `data` property populated in the `detail` object. If this + * is available on the event object, use it. If not, this is a plain + * composition event and we have nothing special to extract. + * + * @param {object} nativeEvent + * @return {?string} + */ + function getDataFromCustomEvent(nativeEvent) { + var detail = nativeEvent.detail; + if (typeof detail === 'object' && 'data' in detail) { + return detail.data; + } + return null; + } + + // Track the current IME composition fallback object, if any. + var currentComposition = null; + + /** + * @return {?object} A SyntheticCompositionEvent. + */ + function extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) { + var eventType; + var fallbackData; + + if (canUseCompositionEvent) { + eventType = getCompositionEventType(topLevelType); + } else if (!currentComposition) { + if (isFallbackCompositionStart(topLevelType, nativeEvent)) { + eventType = eventTypes.compositionStart; + } + } else if (isFallbackCompositionEnd(topLevelType, nativeEvent)) { + eventType = eventTypes.compositionEnd; + } + + if (!eventType) { + return null; + } + + if (useFallbackCompositionData) { + // The current composition is stored statically and must not be + // overwritten while composition continues. + if (!currentComposition && eventType === eventTypes.compositionStart) { + currentComposition = FallbackCompositionState.getPooled(nativeEventTarget); + } else if (eventType === eventTypes.compositionEnd) { + if (currentComposition) { + fallbackData = currentComposition.getData(); + } + } + } + + var event = SyntheticCompositionEvent.getPooled( + eventType, + targetInst, + nativeEvent, + nativeEventTarget, + ); + + if (fallbackData) { + // Inject data generated from fallback path into the synthetic event. + // This matches the property of native CompositionEventInterface. + event.data = fallbackData; + } else { + var customData = getDataFromCustomEvent(nativeEvent); + if (customData !== null) { + event.data = customData; + } + } + + EventPropagators.accumulateTwoPhaseDispatches(event); + return event; + } + + /** + * @param {string} topLevelType Record from `EventConstants`. + * @param {object} nativeEvent Native browser event. + * @return {?string} The string corresponding to this `beforeInput` event. + */ + function getNativeBeforeInputChars(topLevelType, nativeEvent) { + switch (topLevelType) { + case 'topCompositionEnd': + return getDataFromCustomEvent(nativeEvent); + case 'topKeyPress': + /** + * If native `textInput` events are available, our goal is to make + * use of them. However, there is a special case: the spacebar key. + * In Webkit, preventing default on a spacebar `textInput` event + * cancels character insertion, but it *also* causes the browser + * to fall back to its default spacebar behavior of scrolling the + * page. + * + * Tracking at: + * https://code.google.com/p/chromium/issues/detail?id=355103 + * + * To avoid this issue, use the keypress event as if no `textInput` + * event is available. + */ + var which = nativeEvent.which; + if (which !== SPACEBAR_CODE) { + return null; + } + + hasSpaceKeypress = true; + return SPACEBAR_CHAR; + + case 'topTextInput': + // Record the characters to be added to the DOM. + var chars = nativeEvent.data; + + // If it's a spacebar character, assume that we have already handled + // it at the keypress level and bail immediately. Android Chrome + // doesn't give us keycodes, so we need to blacklist it. + if (chars === SPACEBAR_CHAR && hasSpaceKeypress) { + return null; + } + + return chars; + + default: + // For other native event types, do nothing. + return null; + } + } + + /** + * For browsers that do not provide the `textInput` event, extract the + * appropriate string to use for SyntheticInputEvent. + * + * @param {string} topLevelType Record from `EventConstants`. + * @param {object} nativeEvent Native browser event. + * @return {?string} The fallback string for this `beforeInput` event. + */ + function getFallbackBeforeInputChars(topLevelType, nativeEvent) { + // If we are currently composing (IME) and using a fallback to do so, + // try to extract the composed characters from the fallback object. + // If composition event is available, we extract a string only at + // compositionevent, otherwise extract it at fallback events. + if (currentComposition) { + if ( + topLevelType === 'topCompositionEnd' || + (!canUseCompositionEvent && isFallbackCompositionEnd(topLevelType, nativeEvent)) + ) { + var chars = currentComposition.getData(); + FallbackCompositionState.release(currentComposition); + currentComposition = null; + return chars; + } + return null; + } + + switch (topLevelType) { + case 'topPaste': + // If a paste event occurs after a keypress, throw out the input + // chars. Paste events should not lead to BeforeInput events. + return null; + case 'topKeyPress': + /** + * As of v27, Firefox may fire keypress events even when no character + * will be inserted. A few possibilities: + * + * - `which` is `0`. Arrow keys, Esc key, etc. + * + * - `which` is the pressed key code, but no char is available. + * Ex: 'AltGr + d` in Polish. There is no modified character for + * this key combination and no character is inserted into the + * document, but FF fires the keypress for char code `100` anyway. + * No `input` event will occur. + * + * - `which` is the pressed key code, but a command combination is + * being used. Ex: `Cmd+C`. No character is inserted, and no + * `input` event will occur. + */ + if (nativeEvent.which && !isKeypressCommand(nativeEvent)) { + return String.fromCharCode(nativeEvent.which); + } + return null; + case 'topCompositionEnd': + return useFallbackCompositionData ? null : nativeEvent.data; + default: + return null; + } + } + + /** + * Extract a SyntheticInputEvent for `beforeInput`, based on either native + * `textInput` or fallback behavior. + * + * @return {?object} A SyntheticInputEvent. + */ + function extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) { + var chars; + + if (canUseTextInputEvent) { + chars = getNativeBeforeInputChars(topLevelType, nativeEvent); + } else { + chars = getFallbackBeforeInputChars(topLevelType, nativeEvent); + } + + // If no characters are being inserted, no BeforeInput event should + // be fired. + if (!chars) { + return null; + } + + var event = SyntheticInputEvent.getPooled( + eventTypes.beforeInput, + targetInst, + nativeEvent, + nativeEventTarget, + ); + + event.data = chars; + EventPropagators.accumulateTwoPhaseDispatches(event); + return event; + } + + /** + * Create an `onBeforeInput` event to match + * http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105/#events-inputevents. + * + * This event plugin is based on the native `textInput` event + * available in Chrome, Safari, Opera, and IE. This event fires after + * `onKeyPress` and `onCompositionEnd`, but before `onInput`. + * + * `beforeInput` is spec'd but not implemented in any browsers, and + * the `input` event does not provide any useful information about what has + * actually been added, contrary to the spec. Thus, `textInput` is the best + * available event to identify the characters that have actually been inserted + * into the target node. + * + * This plugin is also responsible for emitting `composition` events, thus + * allowing us to share composition fallback code for both `beforeInput` and + * `composition` event types. + */ + var BeforeInputEventPlugin = { + eventTypes: eventTypes, + + extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) { + return [ + extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget), + extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget), + ]; + }, + }; + + module.exports = BeforeInputEventPlugin; + + /***/ + }, + /* 722 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var CSSProperty = __webpack_require__(307); + var ExecutionEnvironment = __webpack_require__(14); + var ReactInstrumentation = __webpack_require__(33); + + var camelizeStyleName = __webpack_require__(650); + var dangerousStyleValue = __webpack_require__(778); + var hyphenateStyleName = __webpack_require__(657); + var memoizeStringOnly = __webpack_require__(660); + var warning = __webpack_require__(3); + + var processStyleName = memoizeStringOnly(function (styleName) { + return hyphenateStyleName(styleName); + }); + + var hasShorthandPropertyBug = false; + var styleFloatAccessor = 'cssFloat'; + if (ExecutionEnvironment.canUseDOM) { + var tempStyle = document.createElement('div').style; + try { + // IE8 throws "Invalid argument." if resetting shorthand style properties. + tempStyle.font = ''; + } catch (e) { + hasShorthandPropertyBug = true; + } + // IE8 only supports accessing cssFloat (standard) as styleFloat + if (document.documentElement.style.cssFloat === undefined) { + styleFloatAccessor = 'styleFloat'; + } + } + + if (true) { + // 'msTransform' is correct, but the other prefixes should be capitalized + var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/; + + // style values shouldn't contain a semicolon + var badStyleValueWithSemicolonPattern = /;\s*$/; + + var warnedStyleNames = {}; + var warnedStyleValues = {}; + var warnedForNaNValue = false; + + var warnHyphenatedStyleName = function (name, owner) { + if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) { + return; + } + + warnedStyleNames[name] = true; + true + ? warning( + false, + 'Unsupported style property %s. Did you mean %s?%s', + name, + camelizeStyleName(name), + checkRenderMessage(owner), + ) + : void 0; + }; + + var warnBadVendoredStyleName = function (name, owner) { + if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) { + return; + } + + warnedStyleNames[name] = true; + true + ? warning( + false, + 'Unsupported vendor-prefixed style property %s. Did you mean %s?%s', + name, + name.charAt(0).toUpperCase() + name.slice(1), + checkRenderMessage(owner), + ) + : void 0; + }; + + var warnStyleValueWithSemicolon = function (name, value, owner) { + if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) { + return; + } + + warnedStyleValues[value] = true; + true + ? warning( + false, + "Style property values shouldn't contain a semicolon.%s " + 'Try "%s: %s" instead.', + checkRenderMessage(owner), + name, + value.replace(badStyleValueWithSemicolonPattern, ''), + ) + : void 0; + }; + + var warnStyleValueIsNaN = function (name, value, owner) { + if (warnedForNaNValue) { + return; + } + + warnedForNaNValue = true; + true + ? warning( + false, + '`NaN` is an invalid value for the `%s` css style property.%s', + name, + checkRenderMessage(owner), + ) + : void 0; + }; + + var checkRenderMessage = function (owner) { + if (owner) { + var name = owner.getName(); + if (name) { + return ' Check the render method of `' + name + '`.'; + } + } + return ''; + }; + + /** + * @param {string} name + * @param {*} value + * @param {ReactDOMComponent} component + */ + var warnValidStyle = function (name, value, component) { + var owner; + if (component) { + owner = component._currentElement._owner; + } + if (name.indexOf('-') > -1) { + warnHyphenatedStyleName(name, owner); + } else if (badVendoredStyleNamePattern.test(name)) { + warnBadVendoredStyleName(name, owner); + } else if (badStyleValueWithSemicolonPattern.test(value)) { + warnStyleValueWithSemicolon(name, value, owner); + } + + if (typeof value === 'number' && isNaN(value)) { + warnStyleValueIsNaN(name, value, owner); + } + }; + } + + /** + * Operations for dealing with CSS properties. + */ + var CSSPropertyOperations = { + /** + * Serializes a mapping of style properties for use as inline styles: + * + * > createMarkupForStyles({width: '200px', height: 0}) + * "width:200px;height:0;" + * + * Undefined values are ignored so that declarative programming is easier. + * The result should be HTML-escaped before insertion into the DOM. + * + * @param {object} styles + * @param {ReactDOMComponent} component + * @return {?string} + */ + createMarkupForStyles: function (styles, component) { + var serialized = ''; + for (var styleName in styles) { + if (!styles.hasOwnProperty(styleName)) { + continue; + } + var styleValue = styles[styleName]; + if (true) { + warnValidStyle(styleName, styleValue, component); + } + if (styleValue != null) { + serialized += processStyleName(styleName) + ':'; + serialized += dangerousStyleValue(styleName, styleValue, component) + ';'; + } + } + return serialized || null; + }, + + /** + * Sets the value for multiple styles on a node. If a value is specified as + * '' (empty string), the corresponding style property will be unset. + * + * @param {DOMElement} node + * @param {object} styles + * @param {ReactDOMComponent} component + */ + setValueForStyles: function (node, styles, component) { + if (true) { + ReactInstrumentation.debugTool.onHostOperation({ + instanceID: component._debugID, + type: 'update styles', + payload: styles, + }); + } + + var style = node.style; + for (var styleName in styles) { + if (!styles.hasOwnProperty(styleName)) { + continue; + } + if (true) { + warnValidStyle(styleName, styles[styleName], component); + } + var styleValue = dangerousStyleValue(styleName, styles[styleName], component); + if (styleName === 'float' || styleName === 'cssFloat') { + styleName = styleFloatAccessor; + } + if (styleValue) { + style[styleName] = styleValue; + } else { + var expansion = hasShorthandPropertyBug && CSSProperty.shorthandPropertyExpansions[styleName]; + if (expansion) { + // Shorthand property that IE8 won't like unsetting, so unset each + // component to placate it + for (var individualStyleName in expansion) { + style[individualStyleName] = ''; + } + } else { + style[styleName] = ''; + } + } + } + }, + }; + + module.exports = CSSPropertyOperations; + + /***/ + }, + /* 723 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var EventPluginHub = __webpack_require__(98); + var EventPropagators = __webpack_require__(99); + var ExecutionEnvironment = __webpack_require__(14); + var ReactDOMComponentTree = __webpack_require__(13); + var ReactUpdates = __webpack_require__(34); + var SyntheticEvent = __webpack_require__(53); + + var getEventTarget = __webpack_require__(208); + var isEventSupported = __webpack_require__(210); + var isTextInputElement = __webpack_require__(334); + + var eventTypes = { + change: { + phasedRegistrationNames: { + bubbled: 'onChange', + captured: 'onChangeCapture', + }, + dependencies: [ + 'topBlur', + 'topChange', + 'topClick', + 'topFocus', + 'topInput', + 'topKeyDown', + 'topKeyUp', + 'topSelectionChange', + ], + }, + }; + + /** + * For IE shims + */ + var activeElement = null; + var activeElementInst = null; + var activeElementValue = null; + var activeElementValueProp = null; + + /** + * SECTION: handle `change` event + */ + function shouldUseChangeEvent(elem) { + var nodeName = elem.nodeName && elem.nodeName.toLowerCase(); + return nodeName === 'select' || (nodeName === 'input' && elem.type === 'file'); + } + + var doesChangeEventBubble = false; + if (ExecutionEnvironment.canUseDOM) { + // See `handleChange` comment below + doesChangeEventBubble = + isEventSupported('change') && (!document.documentMode || document.documentMode > 8); + } + + function manualDispatchChangeEvent(nativeEvent) { + var event = SyntheticEvent.getPooled( + eventTypes.change, + activeElementInst, + nativeEvent, + getEventTarget(nativeEvent), + ); + EventPropagators.accumulateTwoPhaseDispatches(event); + + // If change and propertychange bubbled, we'd just bind to it like all the + // other events and have it go through ReactBrowserEventEmitter. Since it + // doesn't, we manually listen for the events and so we have to enqueue and + // process the abstract event manually. + // + // Batching is necessary here in order to ensure that all event handlers run + // before the next rerender (including event handlers attached to ancestor + // elements instead of directly on the input). Without this, controlled + // components don't work properly in conjunction with event bubbling because + // the component is rerendered and the value reverted before all the event + // handlers can run. See https://github.com/facebook/react/issues/708. + ReactUpdates.batchedUpdates(runEventInBatch, event); + } + + function runEventInBatch(event) { + EventPluginHub.enqueueEvents(event); + EventPluginHub.processEventQueue(false); + } + + function startWatchingForChangeEventIE8(target, targetInst) { + activeElement = target; + activeElementInst = targetInst; + activeElement.attachEvent('onchange', manualDispatchChangeEvent); + } + + function stopWatchingForChangeEventIE8() { + if (!activeElement) { + return; + } + activeElement.detachEvent('onchange', manualDispatchChangeEvent); + activeElement = null; + activeElementInst = null; + } + + function getTargetInstForChangeEvent(topLevelType, targetInst) { + if (topLevelType === 'topChange') { + return targetInst; + } + } + function handleEventsForChangeEventIE8(topLevelType, target, targetInst) { + if (topLevelType === 'topFocus') { + // stopWatching() should be a noop here but we call it just in case we + // missed a blur event somehow. + stopWatchingForChangeEventIE8(); + startWatchingForChangeEventIE8(target, targetInst); + } else if (topLevelType === 'topBlur') { + stopWatchingForChangeEventIE8(); + } + } + + /** + * SECTION: handle `input` event + */ + var isInputEventSupported = false; + if (ExecutionEnvironment.canUseDOM) { + // IE9 claims to support the input event but fails to trigger it when + // deleting text, so we ignore its input events. + // IE10+ fire input events to often, such when a placeholder + // changes or when an input with a placeholder is focused. + isInputEventSupported = + isEventSupported('input') && (!document.documentMode || document.documentMode > 11); + } + + /** + * (For IE <=11) Replacement getter/setter for the `value` property that gets + * set on the active element. + */ + var newValueProp = { + get: function () { + return activeElementValueProp.get.call(this); + }, + set: function (val) { + // Cast to a string so we can do equality checks. + activeElementValue = '' + val; + activeElementValueProp.set.call(this, val); + }, + }; + + /** + * (For IE <=11) Starts tracking propertychange events on the passed-in element + * and override the value property so that we can distinguish user events from + * value changes in JS. + */ + function startWatchingForValueChange(target, targetInst) { + activeElement = target; + activeElementInst = targetInst; + activeElementValue = target.value; + activeElementValueProp = Object.getOwnPropertyDescriptor(target.constructor.prototype, 'value'); + + // Not guarded in a canDefineProperty check: IE8 supports defineProperty only + // on DOM elements + Object.defineProperty(activeElement, 'value', newValueProp); + if (activeElement.attachEvent) { + activeElement.attachEvent('onpropertychange', handlePropertyChange); + } else { + activeElement.addEventListener('propertychange', handlePropertyChange, false); + } + } + + /** + * (For IE <=11) Removes the event listeners from the currently-tracked element, + * if any exists. + */ + function stopWatchingForValueChange() { + if (!activeElement) { + return; + } + + // delete restores the original property definition + delete activeElement.value; + + if (activeElement.detachEvent) { + activeElement.detachEvent('onpropertychange', handlePropertyChange); + } else { + activeElement.removeEventListener('propertychange', handlePropertyChange, false); + } + + activeElement = null; + activeElementInst = null; + activeElementValue = null; + activeElementValueProp = null; + } + + /** + * (For IE <=11) Handles a propertychange event, sending a `change` event if + * the value of the active element has changed. + */ + function handlePropertyChange(nativeEvent) { + if (nativeEvent.propertyName !== 'value') { + return; + } + var value = nativeEvent.srcElement.value; + if (value === activeElementValue) { + return; + } + activeElementValue = value; + + manualDispatchChangeEvent(nativeEvent); + } + + /** + * If a `change` event should be fired, returns the target's ID. + */ + function getTargetInstForInputEvent(topLevelType, targetInst) { + if (topLevelType === 'topInput') { + // In modern browsers (i.e., not IE8 or IE9), the input event is exactly + // what we want so fall through here and trigger an abstract event + return targetInst; + } + } + + function handleEventsForInputEventIE(topLevelType, target, targetInst) { + if (topLevelType === 'topFocus') { + // In IE8, we can capture almost all .value changes by adding a + // propertychange handler and looking for events with propertyName + // equal to 'value' + // In IE9-11, propertychange fires for most input events but is buggy and + // doesn't fire when text is deleted, but conveniently, selectionchange + // appears to fire in all of the remaining cases so we catch those and + // forward the event if the value has changed + // In either case, we don't want to call the event handler if the value + // is changed from JS so we redefine a setter for `.value` that updates + // our activeElementValue variable, allowing us to ignore those changes + // + // stopWatching() should be a noop here but we call it just in case we + // missed a blur event somehow. + stopWatchingForValueChange(); + startWatchingForValueChange(target, targetInst); + } else if (topLevelType === 'topBlur') { + stopWatchingForValueChange(); + } + } + + // For IE8 and IE9. + function getTargetInstForInputEventIE(topLevelType, targetInst) { + if ( + topLevelType === 'topSelectionChange' || + topLevelType === 'topKeyUp' || + topLevelType === 'topKeyDown' + ) { + // On the selectionchange event, the target is just document which isn't + // helpful for us so just check activeElement instead. + // + // 99% of the time, keydown and keyup aren't necessary. IE8 fails to fire + // propertychange on the first input event after setting `value` from a + // script and fires only keydown, keypress, keyup. Catching keyup usually + // gets it and catching keydown lets us fire an event for the first + // keystroke if user does a key repeat (it'll be a little delayed: right + // before the second keystroke). Other input methods (e.g., paste) seem to + // fire selectionchange normally. + if (activeElement && activeElement.value !== activeElementValue) { + activeElementValue = activeElement.value; + return activeElementInst; + } + } + } + + /** + * SECTION: handle `click` event + */ + function shouldUseClickEvent(elem) { + // Use the `click` event to detect changes to checkbox and radio inputs. + // This approach works across all browsers, whereas `change` does not fire + // until `blur` in IE8. + return ( + elem.nodeName && + elem.nodeName.toLowerCase() === 'input' && + (elem.type === 'checkbox' || elem.type === 'radio') + ); + } + + function getTargetInstForClickEvent(topLevelType, targetInst) { + if (topLevelType === 'topClick') { + return targetInst; + } + } + + /** + * This plugin creates an `onChange` event that normalizes change events + * across form elements. This event fires at a time when it's possible to + * change the element's value without seeing a flicker. + * + * Supported elements are: + * - input (see `isTextInputElement`) + * - textarea + * - select + */ + var ChangeEventPlugin = { + eventTypes: eventTypes, + + extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) { + var targetNode = targetInst ? ReactDOMComponentTree.getNodeFromInstance(targetInst) : window; + + var getTargetInstFunc, handleEventFunc; + if (shouldUseChangeEvent(targetNode)) { + if (doesChangeEventBubble) { + getTargetInstFunc = getTargetInstForChangeEvent; + } else { + handleEventFunc = handleEventsForChangeEventIE8; + } + } else if (isTextInputElement(targetNode)) { + if (isInputEventSupported) { + getTargetInstFunc = getTargetInstForInputEvent; + } else { + getTargetInstFunc = getTargetInstForInputEventIE; + handleEventFunc = handleEventsForInputEventIE; + } + } else if (shouldUseClickEvent(targetNode)) { + getTargetInstFunc = getTargetInstForClickEvent; + } + + if (getTargetInstFunc) { + var inst = getTargetInstFunc(topLevelType, targetInst); + if (inst) { + var event = SyntheticEvent.getPooled(eventTypes.change, inst, nativeEvent, nativeEventTarget); + event.type = 'change'; + EventPropagators.accumulateTwoPhaseDispatches(event); + return event; + } + } + + if (handleEventFunc) { + handleEventFunc(topLevelType, targetNode, targetInst); + } + }, + }; + + module.exports = ChangeEventPlugin; + + /***/ + }, + /* 724 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var _prodInvariant = __webpack_require__(5); + + var DOMLazyTree = __webpack_require__(97); + var ExecutionEnvironment = __webpack_require__(14); + + var createNodesFromMarkup = __webpack_require__(653); + var emptyFunction = __webpack_require__(40); + var invariant = __webpack_require__(2); + + var Danger = { + /** + * Replaces a node with a string of markup at its current position within its + * parent. The markup must render into a single root node. + * + * @param {DOMElement} oldChild Child node to replace. + * @param {string} markup Markup to render in place of the child node. + * @internal + */ + dangerouslyReplaceNodeWithMarkup: function (oldChild, markup) { + !ExecutionEnvironment.canUseDOM + ? true + ? invariant( + false, + 'dangerouslyReplaceNodeWithMarkup(...): Cannot render markup in a worker thread. Make sure `window` and `document` are available globally before requiring React when unit testing or use ReactDOMServer.renderToString() for server rendering.', + ) + : _prodInvariant('56') + : void 0; + !markup + ? true + ? invariant(false, 'dangerouslyReplaceNodeWithMarkup(...): Missing markup.') + : _prodInvariant('57') + : void 0; + !(oldChild.nodeName !== 'HTML') + ? true + ? invariant( + false, + 'dangerouslyReplaceNodeWithMarkup(...): Cannot replace markup of the <html> node. This is because browser quirks make this unreliable and/or slow. If you want to render to the root you must use server rendering. See ReactDOMServer.renderToString().', + ) + : _prodInvariant('58') + : void 0; + + if (typeof markup === 'string') { + var newChild = createNodesFromMarkup(markup, emptyFunction)[0]; + oldChild.parentNode.replaceChild(newChild, oldChild); + } else { + DOMLazyTree.replaceChildWithTree(oldChild, markup); + } + }, + }; + + module.exports = Danger; + + /***/ + }, + /* 725 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + /** + * Module that is injectable into `EventPluginHub`, that specifies a + * deterministic ordering of `EventPlugin`s. A convenient way to reason about + * plugins, without having to package every one of them. This is better than + * having plugins be ordered in the same order that they are injected because + * that ordering would be influenced by the packaging order. + * `ResponderEventPlugin` must occur before `SimpleEventPlugin` so that + * preventing default on events is convenient in `SimpleEventPlugin` handlers. + */ + + var DefaultEventPluginOrder = [ + 'ResponderEventPlugin', + 'SimpleEventPlugin', + 'TapEventPlugin', + 'EnterLeaveEventPlugin', + 'ChangeEventPlugin', + 'SelectEventPlugin', + 'BeforeInputEventPlugin', + ]; + + module.exports = DefaultEventPluginOrder; + + /***/ + }, + /* 726 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var EventPropagators = __webpack_require__(99); + var ReactDOMComponentTree = __webpack_require__(13); + var SyntheticMouseEvent = __webpack_require__(141); + + var eventTypes = { + mouseEnter: { + registrationName: 'onMouseEnter', + dependencies: ['topMouseOut', 'topMouseOver'], + }, + mouseLeave: { + registrationName: 'onMouseLeave', + dependencies: ['topMouseOut', 'topMouseOver'], + }, + }; + + var EnterLeaveEventPlugin = { + eventTypes: eventTypes, + + /** + * For almost every interaction we care about, there will be both a top-level + * `mouseover` and `mouseout` event that occurs. Only use `mouseout` so that + * we do not extract duplicate events. However, moving the mouse into the + * browser from outside will not fire a `mouseout` event. In this case, we use + * the `mouseover` top-level event. + */ + extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) { + if (topLevelType === 'topMouseOver' && (nativeEvent.relatedTarget || nativeEvent.fromElement)) { + return null; + } + if (topLevelType !== 'topMouseOut' && topLevelType !== 'topMouseOver') { + // Must not be a mouse in or mouse out - ignoring. + return null; + } + + var win; + if (nativeEventTarget.window === nativeEventTarget) { + // `nativeEventTarget` is probably a window object. + win = nativeEventTarget; + } else { + // TODO: Figure out why `ownerDocument` is sometimes undefined in IE8. + var doc = nativeEventTarget.ownerDocument; + if (doc) { + win = doc.defaultView || doc.parentWindow; + } else { + win = window; + } + } + + var from; + var to; + if (topLevelType === 'topMouseOut') { + from = targetInst; + var related = nativeEvent.relatedTarget || nativeEvent.toElement; + to = related ? ReactDOMComponentTree.getClosestInstanceFromNode(related) : null; + } else { + // Moving to a node from outside the window. + from = null; + to = targetInst; + } + + if (from === to) { + // Nothing pertains to our managed components. + return null; + } + + var fromNode = from == null ? win : ReactDOMComponentTree.getNodeFromInstance(from); + var toNode = to == null ? win : ReactDOMComponentTree.getNodeFromInstance(to); + + var leave = SyntheticMouseEvent.getPooled( + eventTypes.mouseLeave, + from, + nativeEvent, + nativeEventTarget, + ); + leave.type = 'mouseleave'; + leave.target = fromNode; + leave.relatedTarget = toNode; + + var enter = SyntheticMouseEvent.getPooled( + eventTypes.mouseEnter, + to, + nativeEvent, + nativeEventTarget, + ); + enter.type = 'mouseenter'; + enter.target = toNode; + enter.relatedTarget = fromNode; + + EventPropagators.accumulateEnterLeaveDispatches(leave, enter, from, to); + + return [leave, enter]; + }, + }; + + module.exports = EnterLeaveEventPlugin; + + /***/ + }, + /* 727 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + /** + * Types of raw signals from the browser caught at the top level. + */ + var topLevelTypes = { + topAbort: null, + topAnimationEnd: null, + topAnimationIteration: null, + topAnimationStart: null, + topBlur: null, + topCanPlay: null, + topCanPlayThrough: null, + topChange: null, + topClick: null, + topCompositionEnd: null, + topCompositionStart: null, + topCompositionUpdate: null, + topContextMenu: null, + topCopy: null, + topCut: null, + topDoubleClick: null, + topDrag: null, + topDragEnd: null, + topDragEnter: null, + topDragExit: null, + topDragLeave: null, + topDragOver: null, + topDragStart: null, + topDrop: null, + topDurationChange: null, + topEmptied: null, + topEncrypted: null, + topEnded: null, + topError: null, + topFocus: null, + topInput: null, + topInvalid: null, + topKeyDown: null, + topKeyPress: null, + topKeyUp: null, + topLoad: null, + topLoadedData: null, + topLoadedMetadata: null, + topLoadStart: null, + topMouseDown: null, + topMouseMove: null, + topMouseOut: null, + topMouseOver: null, + topMouseUp: null, + topPaste: null, + topPause: null, + topPlay: null, + topPlaying: null, + topProgress: null, + topRateChange: null, + topReset: null, + topScroll: null, + topSeeked: null, + topSeeking: null, + topSelectionChange: null, + topStalled: null, + topSubmit: null, + topSuspend: null, + topTextInput: null, + topTimeUpdate: null, + topTouchCancel: null, + topTouchEnd: null, + topTouchMove: null, + topTouchStart: null, + topTransitionEnd: null, + topVolumeChange: null, + topWaiting: null, + topWheel: null, + }; + + var EventConstants = { + topLevelTypes: topLevelTypes, + }; + + module.exports = EventConstants; + + /***/ + }, + /* 728 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var _assign = __webpack_require__(8); + + var PooledClass = __webpack_require__(85); + + var getTextContentAccessor = __webpack_require__(332); + + /** + * This helper class stores information about text content of a target node, + * allowing comparison of content before and after a given event. + * + * Identify the node where selection currently begins, then observe + * both its text content and its current position in the DOM. Since the + * browser may natively replace the target node during composition, we can + * use its position to find its replacement. + * + * @param {DOMEventTarget} root + */ + function FallbackCompositionState(root) { + this._root = root; + this._startText = this.getText(); + this._fallbackText = null; + } + + _assign(FallbackCompositionState.prototype, { + destructor: function () { + this._root = null; + this._startText = null; + this._fallbackText = null; + }, + + /** + * Get current text of input. + * + * @return {string} + */ + getText: function () { + if ('value' in this._root) { + return this._root.value; + } + return this._root[getTextContentAccessor()]; + }, + + /** + * Determine the differing substring between the initially stored + * text content and the current content. + * + * @return {string} + */ + getData: function () { + if (this._fallbackText) { + return this._fallbackText; + } + + var start; + var startValue = this._startText; + var startLength = startValue.length; + var end; + var endValue = this.getText(); + var endLength = endValue.length; + + for (start = 0; start < startLength; start++) { + if (startValue[start] !== endValue[start]) { + break; + } + } + + var minEnd = startLength - start; + for (end = 1; end <= minEnd; end++) { + if (startValue[startLength - end] !== endValue[endLength - end]) { + break; + } + } + + var sliceTail = end > 1 ? 1 - end : undefined; + this._fallbackText = endValue.slice(start, sliceTail); + return this._fallbackText; + }, + }); + + PooledClass.addPoolingTo(FallbackCompositionState); + + module.exports = FallbackCompositionState; + + /***/ + }, + /* 729 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var DOMProperty = __webpack_require__(66); + + var MUST_USE_PROPERTY = DOMProperty.injection.MUST_USE_PROPERTY; + var HAS_BOOLEAN_VALUE = DOMProperty.injection.HAS_BOOLEAN_VALUE; + var HAS_NUMERIC_VALUE = DOMProperty.injection.HAS_NUMERIC_VALUE; + var HAS_POSITIVE_NUMERIC_VALUE = DOMProperty.injection.HAS_POSITIVE_NUMERIC_VALUE; + var HAS_OVERLOADED_BOOLEAN_VALUE = DOMProperty.injection.HAS_OVERLOADED_BOOLEAN_VALUE; + + var HTMLDOMPropertyConfig = { + isCustomAttribute: RegExp.prototype.test.bind( + new RegExp('^(data|aria)-[' + DOMProperty.ATTRIBUTE_NAME_CHAR + ']*$'), + ), + Properties: { + /** + * Standard Properties + */ + accept: 0, + acceptCharset: 0, + accessKey: 0, + action: 0, + allowFullScreen: HAS_BOOLEAN_VALUE, + allowTransparency: 0, + alt: 0, + // specifies target context for links with `preload` type + as: 0, + async: HAS_BOOLEAN_VALUE, + autoComplete: 0, + // autoFocus is polyfilled/normalized by AutoFocusUtils + // autoFocus: HAS_BOOLEAN_VALUE, + autoPlay: HAS_BOOLEAN_VALUE, + capture: HAS_BOOLEAN_VALUE, + cellPadding: 0, + cellSpacing: 0, + charSet: 0, + challenge: 0, + checked: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE, + cite: 0, + classID: 0, + className: 0, + cols: HAS_POSITIVE_NUMERIC_VALUE, + colSpan: 0, + content: 0, + contentEditable: 0, + contextMenu: 0, + controls: HAS_BOOLEAN_VALUE, + coords: 0, + crossOrigin: 0, + data: 0, // For `<object />` acts as `src`. + dateTime: 0, + default: HAS_BOOLEAN_VALUE, + defer: HAS_BOOLEAN_VALUE, + dir: 0, + disabled: HAS_BOOLEAN_VALUE, + download: HAS_OVERLOADED_BOOLEAN_VALUE, + draggable: 0, + encType: 0, + form: 0, + formAction: 0, + formEncType: 0, + formMethod: 0, + formNoValidate: HAS_BOOLEAN_VALUE, + formTarget: 0, + frameBorder: 0, + headers: 0, + height: 0, + hidden: HAS_BOOLEAN_VALUE, + high: 0, + href: 0, + hrefLang: 0, + htmlFor: 0, + httpEquiv: 0, + icon: 0, + id: 0, + inputMode: 0, + integrity: 0, + is: 0, + keyParams: 0, + keyType: 0, + kind: 0, + label: 0, + lang: 0, + list: 0, + loop: HAS_BOOLEAN_VALUE, + low: 0, + manifest: 0, + marginHeight: 0, + marginWidth: 0, + max: 0, + maxLength: 0, + media: 0, + mediaGroup: 0, + method: 0, + min: 0, + minLength: 0, + // Caution; `option.selected` is not updated if `select.multiple` is + // disabled with `removeAttribute`. + multiple: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE, + muted: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE, + name: 0, + nonce: 0, + noValidate: HAS_BOOLEAN_VALUE, + open: HAS_BOOLEAN_VALUE, + optimum: 0, + pattern: 0, + placeholder: 0, + playsInline: HAS_BOOLEAN_VALUE, + poster: 0, + preload: 0, + profile: 0, + radioGroup: 0, + readOnly: HAS_BOOLEAN_VALUE, + referrerPolicy: 0, + rel: 0, + required: HAS_BOOLEAN_VALUE, + reversed: HAS_BOOLEAN_VALUE, + role: 0, + rows: HAS_POSITIVE_NUMERIC_VALUE, + rowSpan: HAS_NUMERIC_VALUE, + sandbox: 0, + scope: 0, + scoped: HAS_BOOLEAN_VALUE, + scrolling: 0, + seamless: HAS_BOOLEAN_VALUE, + selected: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE, + shape: 0, + size: HAS_POSITIVE_NUMERIC_VALUE, + sizes: 0, + span: HAS_POSITIVE_NUMERIC_VALUE, + spellCheck: 0, + src: 0, + srcDoc: 0, + srcLang: 0, + srcSet: 0, + start: HAS_NUMERIC_VALUE, + step: 0, + style: 0, + summary: 0, + tabIndex: 0, + target: 0, + title: 0, + // Setting .type throws on non-<input> tags + type: 0, + useMap: 0, + value: 0, + width: 0, + wmode: 0, + wrap: 0, + + /** + * RDFa Properties + */ + about: 0, + datatype: 0, + inlist: 0, + prefix: 0, + // property is also supported for OpenGraph in meta tags. + property: 0, + resource: 0, + typeof: 0, + vocab: 0, + + /** + * Non-standard Properties + */ + // autoCapitalize and autoCorrect are supported in Mobile Safari for + // keyboard hints. + autoCapitalize: 0, + autoCorrect: 0, + // autoSave allows WebKit/Blink to persist values of input fields on page reloads + autoSave: 0, + // color is for Safari mask-icon link + color: 0, + // itemProp, itemScope, itemType are for + // Microdata support. See http://schema.org/docs/gs.html + itemProp: 0, + itemScope: HAS_BOOLEAN_VALUE, + itemType: 0, + // itemID and itemRef are for Microdata support as well but + // only specified in the WHATWG spec document. See + // https://html.spec.whatwg.org/multipage/microdata.html#microdata-dom-api + itemID: 0, + itemRef: 0, + // results show looking glass icon and recent searches on input + // search fields in WebKit/Blink + results: 0, + // IE-only attribute that specifies security restrictions on an iframe + // as an alternative to the sandbox attribute on IE<10 + security: 0, + // IE-only attribute that controls focus behavior + unselectable: 0, + }, + DOMAttributeNames: { + acceptCharset: 'accept-charset', + className: 'class', + htmlFor: 'for', + httpEquiv: 'http-equiv', + }, + DOMPropertyNames: {}, + }; + + module.exports = HTMLDOMPropertyConfig; + + /***/ + }, + /* 730 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (process) { + /** + * Copyright 2014-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var ReactReconciler = __webpack_require__(67); + + var instantiateReactComponent = __webpack_require__(209); + var KeyEscapeUtils = __webpack_require__(198); + var shouldUpdateReactComponent = __webpack_require__(211); + var traverseAllChildren = __webpack_require__(336); + var warning = __webpack_require__(3); + + var ReactComponentTreeHook; + + if ( + typeof process !== 'undefined' && + __webpack_require__.i({ NODE_ENV: 'development' }) && + 'development' === 'test' + ) { + // Temporary hack. + // Inline requires don't work well with Jest: + // https://github.com/facebook/react/issues/7240 + // Remove the inline requires when we don't need them anymore: + // https://github.com/facebook/react/pull/7178 + ReactComponentTreeHook = __webpack_require__(19); + } + + function instantiateChild(childInstances, child, name, selfDebugID) { + // We found a component instance. + var keyUnique = childInstances[name] === undefined; + if (true) { + if (!ReactComponentTreeHook) { + ReactComponentTreeHook = __webpack_require__(19); + } + if (!keyUnique) { + true + ? warning( + false, + 'flattenChildren(...): Encountered two children with the same key, ' + + '`%s`. Child keys must be unique; when two children share a key, only ' + + 'the first child will be used.%s', + KeyEscapeUtils.unescape(name), + ReactComponentTreeHook.getStackAddendumByID(selfDebugID), + ) + : void 0; + } + } + if (child != null && keyUnique) { + childInstances[name] = instantiateReactComponent(child, true); + } + } + + /** + * ReactChildReconciler provides helpers for initializing or updating a set of + * children. Its output is suitable for passing it onto ReactMultiChild which + * does diffed reordering and insertion. + */ + var ReactChildReconciler = { + /** + * Generates a "mount image" for each of the supplied children. In the case + * of `ReactDOMComponent`, a mount image is a string of markup. + * + * @param {?object} nestedChildNodes Nested child maps. + * @return {?object} A set of child instances. + * @internal + */ + instantiateChildren: function ( + nestedChildNodes, + transaction, + context, + selfDebugID, // 0 in production and for roots + ) { + if (nestedChildNodes == null) { + return null; + } + var childInstances = {}; + + if (true) { + traverseAllChildren( + nestedChildNodes, + function (childInsts, child, name) { + return instantiateChild(childInsts, child, name, selfDebugID); + }, + childInstances, + ); + } else { + traverseAllChildren(nestedChildNodes, instantiateChild, childInstances); + } + return childInstances; + }, + + /** + * Updates the rendered children and returns a new set of children. + * + * @param {?object} prevChildren Previously initialized set of children. + * @param {?object} nextChildren Flat child element maps. + * @param {ReactReconcileTransaction} transaction + * @param {object} context + * @return {?object} A new set of child instances. + * @internal + */ + updateChildren: function ( + prevChildren, + nextChildren, + mountImages, + removedNodes, + transaction, + hostParent, + hostContainerInfo, + context, + selfDebugID, // 0 in production and for roots + ) { + // We currently don't have a way to track moves here but if we use iterators + // instead of for..in we can zip the iterators and check if an item has + // moved. + // TODO: If nothing has changed, return the prevChildren object so that we + // can quickly bailout if nothing has changed. + if (!nextChildren && !prevChildren) { + return; + } + var name; + var prevChild; + for (name in nextChildren) { + if (!nextChildren.hasOwnProperty(name)) { + continue; + } + prevChild = prevChildren && prevChildren[name]; + var prevElement = prevChild && prevChild._currentElement; + var nextElement = nextChildren[name]; + if (prevChild != null && shouldUpdateReactComponent(prevElement, nextElement)) { + ReactReconciler.receiveComponent(prevChild, nextElement, transaction, context); + nextChildren[name] = prevChild; + } else { + if (prevChild) { + removedNodes[name] = ReactReconciler.getHostNode(prevChild); + ReactReconciler.unmountComponent(prevChild, false); + } + // The child must be instantiated before it's mounted. + var nextChildInstance = instantiateReactComponent(nextElement, true); + nextChildren[name] = nextChildInstance; + // Creating mount image now ensures refs are resolved in right order + // (see https://github.com/facebook/react/pull/7101 for explanation). + var nextChildMountImage = ReactReconciler.mountComponent( + nextChildInstance, + transaction, + hostParent, + hostContainerInfo, + context, + selfDebugID, + ); + mountImages.push(nextChildMountImage); + } + } + // Unmount children that are no longer present. + for (name in prevChildren) { + if (prevChildren.hasOwnProperty(name) && !(nextChildren && nextChildren.hasOwnProperty(name))) { + prevChild = prevChildren[name]; + removedNodes[name] = ReactReconciler.getHostNode(prevChild); + ReactReconciler.unmountComponent(prevChild, false); + } + } + }, + + /** + * Unmounts all rendered children. This should be used to clean up children + * when this component is unmounted. + * + * @param {?object} renderedChildren Previously initialized set of children. + * @internal + */ + unmountChildren: function (renderedChildren, safely) { + for (var name in renderedChildren) { + if (renderedChildren.hasOwnProperty(name)) { + var renderedChild = renderedChildren[name]; + ReactReconciler.unmountComponent(renderedChild, safely); + } + } + }, + }; + + module.exports = ReactChildReconciler; + /* WEBPACK VAR INJECTION */ + }).call(exports, __webpack_require__(84)); + + /***/ + }, + /* 731 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var DOMChildrenOperations = __webpack_require__(195); + var ReactDOMIDOperations = __webpack_require__(735); + + /** + * Abstracts away all functionality of the reconciler that requires knowledge of + * the browser context. TODO: These callers should be refactored to avoid the + * need for this injection. + */ + var ReactComponentBrowserEnvironment = { + processChildrenUpdates: ReactDOMIDOperations.dangerouslyProcessChildrenUpdates, + + replaceNodeWithMarkup: DOMChildrenOperations.dangerouslyReplaceNodeWithMarkup, + }; + + module.exports = ReactComponentBrowserEnvironment; + + /***/ + }, + /* 732 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + /* global hasOwnProperty:true */ + + var _prodInvariant = __webpack_require__(5), + _assign = __webpack_require__(8); + + var AutoFocusUtils = __webpack_require__(720); + var CSSPropertyOperations = __webpack_require__(722); + var DOMLazyTree = __webpack_require__(97); + var DOMNamespaces = __webpack_require__(196); + var DOMProperty = __webpack_require__(66); + var DOMPropertyOperations = __webpack_require__(309); + var EventPluginHub = __webpack_require__(98); + var EventPluginRegistry = __webpack_require__(115); + var ReactBrowserEventEmitter = __webpack_require__(116); + var ReactDOMComponentFlags = __webpack_require__(311); + var ReactDOMComponentTree = __webpack_require__(13); + var ReactDOMInput = __webpack_require__(736); + var ReactDOMOption = __webpack_require__(739); + var ReactDOMSelect = __webpack_require__(313); + var ReactDOMTextarea = __webpack_require__(743); + var ReactInstrumentation = __webpack_require__(33); + var ReactMultiChild = __webpack_require__(752); + var ReactServerRenderingTransaction = __webpack_require__(324); + + var emptyFunction = __webpack_require__(40); + var escapeTextContentForBrowser = __webpack_require__(143); + var invariant = __webpack_require__(2); + var isEventSupported = __webpack_require__(210); + var shallowEqual = __webpack_require__(190); + var validateDOMNesting = __webpack_require__(212); + var warning = __webpack_require__(3); + + var Flags = ReactDOMComponentFlags; + var deleteListener = EventPluginHub.deleteListener; + var getNode = ReactDOMComponentTree.getNodeFromInstance; + var listenTo = ReactBrowserEventEmitter.listenTo; + var registrationNameModules = EventPluginRegistry.registrationNameModules; + + // For quickly matching children type, to test if can be treated as content. + var CONTENT_TYPES = { string: true, number: true }; + + var STYLE = 'style'; + var HTML = '__html'; + var RESERVED_PROPS = { + children: null, + dangerouslySetInnerHTML: null, + suppressContentEditableWarning: null, + }; + + // Node type for document fragments (Node.DOCUMENT_FRAGMENT_NODE). + var DOC_FRAGMENT_TYPE = 11; + + function getDeclarationErrorAddendum(internalInstance) { + if (internalInstance) { + var owner = internalInstance._currentElement._owner || null; + if (owner) { + var name = owner.getName(); + if (name) { + return ' This DOM node was rendered by `' + name + '`.'; + } + } + } + return ''; + } + + function friendlyStringify(obj) { + if (typeof obj === 'object') { + if (Array.isArray(obj)) { + return '[' + obj.map(friendlyStringify).join(', ') + ']'; + } else { + var pairs = []; + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + var keyEscaped = /^[a-z$_][\w$_]*$/i.test(key) ? key : JSON.stringify(key); + pairs.push(keyEscaped + ': ' + friendlyStringify(obj[key])); + } + } + return '{' + pairs.join(', ') + '}'; + } + } else if (typeof obj === 'string') { + return JSON.stringify(obj); + } else if (typeof obj === 'function') { + return '[function object]'; + } + // Differs from JSON.stringify in that undefined because undefined and that + // inf and nan don't become null + return String(obj); + } + + var styleMutationWarning = {}; + + function checkAndWarnForMutatedStyle(style1, style2, component) { + if (style1 == null || style2 == null) { + return; + } + if (shallowEqual(style1, style2)) { + return; + } + + var componentName = component._tag; + var owner = component._currentElement._owner; + var ownerName; + if (owner) { + ownerName = owner.getName(); + } + + var hash = ownerName + '|' + componentName; + + if (styleMutationWarning.hasOwnProperty(hash)) { + return; + } + + styleMutationWarning[hash] = true; + + true + ? warning( + false, + '`%s` was passed a style object that has previously been mutated. ' + + 'Mutating `style` is deprecated. Consider cloning it beforehand. Check ' + + 'the `render` %s. Previous style: %s. Mutated style: %s.', + componentName, + owner ? 'of `' + ownerName + '`' : 'using <' + componentName + '>', + friendlyStringify(style1), + friendlyStringify(style2), + ) + : void 0; + } + + /** + * @param {object} component + * @param {?object} props + */ + function assertValidProps(component, props) { + if (!props) { + return; + } + // Note the use of `==` which checks for null or undefined. + if (voidElementTags[component._tag]) { + !(props.children == null && props.dangerouslySetInnerHTML == null) + ? true + ? invariant( + false, + '%s is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.%s', + component._tag, + component._currentElement._owner + ? ' Check the render method of ' + component._currentElement._owner.getName() + '.' + : '', + ) + : _prodInvariant( + '137', + component._tag, + component._currentElement._owner + ? ' Check the render method of ' + component._currentElement._owner.getName() + '.' + : '', + ) + : void 0; + } + if (props.dangerouslySetInnerHTML != null) { + !(props.children == null) + ? true + ? invariant(false, 'Can only set one of `children` or `props.dangerouslySetInnerHTML`.') + : _prodInvariant('60') + : void 0; + !(typeof props.dangerouslySetInnerHTML === 'object' && HTML in props.dangerouslySetInnerHTML) + ? true + ? invariant( + false, + '`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://fb.me/react-invariant-dangerously-set-inner-html for more information.', + ) + : _prodInvariant('61') + : void 0; + } + if (true) { + true + ? warning( + props.innerHTML == null, + 'Directly setting property `innerHTML` is not permitted. ' + + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.', + ) + : void 0; + true + ? warning( + props.suppressContentEditableWarning || !props.contentEditable || props.children == null, + 'A component is `contentEditable` and contains `children` managed by ' + + 'React. It is now your responsibility to guarantee that none of ' + + 'those nodes are unexpectedly modified or duplicated. This is ' + + 'probably not intentional.', + ) + : void 0; + true + ? warning( + props.onFocusIn == null && props.onFocusOut == null, + 'React uses onFocus and onBlur instead of onFocusIn and onFocusOut. ' + + 'All React events are normalized to bubble, so onFocusIn and onFocusOut ' + + 'are not needed/supported by React.', + ) + : void 0; + } + !(props.style == null || typeof props.style === 'object') + ? true + ? invariant( + false, + "The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.%s", + getDeclarationErrorAddendum(component), + ) + : _prodInvariant('62', getDeclarationErrorAddendum(component)) + : void 0; + } + + function enqueuePutListener(inst, registrationName, listener, transaction) { + if (transaction instanceof ReactServerRenderingTransaction) { + return; + } + if (true) { + // IE8 has no API for event capturing and the `onScroll` event doesn't + // bubble. + true + ? warning( + registrationName !== 'onScroll' || isEventSupported('scroll', true), + "This browser doesn't support the `onScroll` event", + ) + : void 0; + } + var containerInfo = inst._hostContainerInfo; + var isDocumentFragment = containerInfo._node && containerInfo._node.nodeType === DOC_FRAGMENT_TYPE; + var doc = isDocumentFragment ? containerInfo._node : containerInfo._ownerDocument; + listenTo(registrationName, doc); + transaction.getReactMountReady().enqueue(putListener, { + inst: inst, + registrationName: registrationName, + listener: listener, + }); + } + + function putListener() { + var listenerToPut = this; + EventPluginHub.putListener( + listenerToPut.inst, + listenerToPut.registrationName, + listenerToPut.listener, + ); + } + + function inputPostMount() { + var inst = this; + ReactDOMInput.postMountWrapper(inst); + } + + function textareaPostMount() { + var inst = this; + ReactDOMTextarea.postMountWrapper(inst); + } + + function optionPostMount() { + var inst = this; + ReactDOMOption.postMountWrapper(inst); + } + + var setAndValidateContentChildDev = emptyFunction; + if (true) { + setAndValidateContentChildDev = function (content) { + var hasExistingContent = this._contentDebugID != null; + var debugID = this._debugID; + // This ID represents the inlined child that has no backing instance: + var contentDebugID = -debugID; + + if (content == null) { + if (hasExistingContent) { + ReactInstrumentation.debugTool.onUnmountComponent(this._contentDebugID); + } + this._contentDebugID = null; + return; + } + + validateDOMNesting(null, String(content), this, this._ancestorInfo); + this._contentDebugID = contentDebugID; + if (hasExistingContent) { + ReactInstrumentation.debugTool.onBeforeUpdateComponent(contentDebugID, content); + ReactInstrumentation.debugTool.onUpdateComponent(contentDebugID); + } else { + ReactInstrumentation.debugTool.onBeforeMountComponent(contentDebugID, content, debugID); + ReactInstrumentation.debugTool.onMountComponent(contentDebugID); + ReactInstrumentation.debugTool.onSetChildren(debugID, [contentDebugID]); + } + }; + } + + // There are so many media events, it makes sense to just + // maintain a list rather than create a `trapBubbledEvent` for each + var mediaEvents = { + topAbort: 'abort', + topCanPlay: 'canplay', + topCanPlayThrough: 'canplaythrough', + topDurationChange: 'durationchange', + topEmptied: 'emptied', + topEncrypted: 'encrypted', + topEnded: 'ended', + topError: 'error', + topLoadedData: 'loadeddata', + topLoadedMetadata: 'loadedmetadata', + topLoadStart: 'loadstart', + topPause: 'pause', + topPlay: 'play', + topPlaying: 'playing', + topProgress: 'progress', + topRateChange: 'ratechange', + topSeeked: 'seeked', + topSeeking: 'seeking', + topStalled: 'stalled', + topSuspend: 'suspend', + topTimeUpdate: 'timeupdate', + topVolumeChange: 'volumechange', + topWaiting: 'waiting', + }; + + function trapBubbledEventsLocal() { + var inst = this; + // If a component renders to null or if another component fatals and causes + // the state of the tree to be corrupted, `node` here can be null. + !inst._rootNodeID + ? true + ? invariant(false, 'Must be mounted to trap events') + : _prodInvariant('63') + : void 0; + var node = getNode(inst); + !node + ? true + ? invariant(false, 'trapBubbledEvent(...): Requires node to be rendered.') + : _prodInvariant('64') + : void 0; + + switch (inst._tag) { + case 'iframe': + case 'object': + inst._wrapperState.listeners = [ + ReactBrowserEventEmitter.trapBubbledEvent('topLoad', 'load', node), + ]; + break; + case 'video': + case 'audio': + inst._wrapperState.listeners = []; + // Create listener for each media event + for (var event in mediaEvents) { + if (mediaEvents.hasOwnProperty(event)) { + inst._wrapperState.listeners.push( + ReactBrowserEventEmitter.trapBubbledEvent(event, mediaEvents[event], node), + ); + } + } + break; + case 'source': + inst._wrapperState.listeners = [ + ReactBrowserEventEmitter.trapBubbledEvent('topError', 'error', node), + ]; + break; + case 'img': + inst._wrapperState.listeners = [ + ReactBrowserEventEmitter.trapBubbledEvent('topError', 'error', node), + ReactBrowserEventEmitter.trapBubbledEvent('topLoad', 'load', node), + ]; + break; + case 'form': + inst._wrapperState.listeners = [ + ReactBrowserEventEmitter.trapBubbledEvent('topReset', 'reset', node), + ReactBrowserEventEmitter.trapBubbledEvent('topSubmit', 'submit', node), + ]; + break; + case 'input': + case 'select': + case 'textarea': + inst._wrapperState.listeners = [ + ReactBrowserEventEmitter.trapBubbledEvent('topInvalid', 'invalid', node), + ]; + break; + } + } + + function postUpdateSelectWrapper() { + ReactDOMSelect.postUpdateWrapper(this); + } + + // For HTML, certain tags should omit their close tag. We keep a whitelist for + // those special-case tags. + + var omittedCloseTags = { + area: true, + base: true, + br: true, + col: true, + embed: true, + hr: true, + img: true, + input: true, + keygen: true, + link: true, + meta: true, + param: true, + source: true, + track: true, + wbr: true, + }; + + var newlineEatingTags = { + listing: true, + pre: true, + textarea: true, + }; + + // For HTML, certain tags cannot have children. This has the same purpose as + // `omittedCloseTags` except that `menuitem` should still have its closing tag. + + var voidElementTags = _assign( + { + menuitem: true, + }, + omittedCloseTags, + ); + + // We accept any tag to be rendered but since this gets injected into arbitrary + // HTML, we want to make sure that it's a safe tag. + // http://www.w3.org/TR/REC-xml/#NT-Name + + var VALID_TAG_REGEX = /^[a-zA-Z][a-zA-Z:_\.\-\d]*$/; // Simplified subset + var validatedTagCache = {}; + var hasOwnProperty = {}.hasOwnProperty; + + function validateDangerousTag(tag) { + if (!hasOwnProperty.call(validatedTagCache, tag)) { + !VALID_TAG_REGEX.test(tag) + ? true + ? invariant(false, 'Invalid tag: %s', tag) + : _prodInvariant('65', tag) + : void 0; + validatedTagCache[tag] = true; + } + } + + function isCustomComponent(tagName, props) { + return tagName.indexOf('-') >= 0 || props.is != null; + } + + var globalIdCounter = 1; + + /** + * Creates a new React class that is idempotent and capable of containing other + * React components. It accepts event listeners and DOM properties that are + * valid according to `DOMProperty`. + * + * - Event listeners: `onClick`, `onMouseDown`, etc. + * - DOM properties: `className`, `name`, `title`, etc. + * + * The `style` property functions differently from the DOM API. It accepts an + * object mapping of style properties to values. + * + * @constructor ReactDOMComponent + * @extends ReactMultiChild + */ + function ReactDOMComponent(element) { + var tag = element.type; + validateDangerousTag(tag); + this._currentElement = element; + this._tag = tag.toLowerCase(); + this._namespaceURI = null; + this._renderedChildren = null; + this._previousStyle = null; + this._previousStyleCopy = null; + this._hostNode = null; + this._hostParent = null; + this._rootNodeID = 0; + this._domID = 0; + this._hostContainerInfo = null; + this._wrapperState = null; + this._topLevelWrapper = null; + this._flags = 0; + if (true) { + this._ancestorInfo = null; + setAndValidateContentChildDev.call(this, null); + } + } + + ReactDOMComponent.displayName = 'ReactDOMComponent'; + + ReactDOMComponent.Mixin = { + /** + * Generates root tag markup then recurses. This method has side effects and + * is not idempotent. + * + * @internal + * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction + * @param {?ReactDOMComponent} the parent component instance + * @param {?object} info about the host container + * @param {object} context + * @return {string} The computed markup. + */ + mountComponent: function (transaction, hostParent, hostContainerInfo, context) { + this._rootNodeID = globalIdCounter++; + this._domID = hostContainerInfo._idCounter++; + this._hostParent = hostParent; + this._hostContainerInfo = hostContainerInfo; + + var props = this._currentElement.props; + + switch (this._tag) { + case 'audio': + case 'form': + case 'iframe': + case 'img': + case 'link': + case 'object': + case 'source': + case 'video': + this._wrapperState = { + listeners: null, + }; + transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this); + break; + case 'input': + ReactDOMInput.mountWrapper(this, props, hostParent); + props = ReactDOMInput.getHostProps(this, props); + transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this); + break; + case 'option': + ReactDOMOption.mountWrapper(this, props, hostParent); + props = ReactDOMOption.getHostProps(this, props); + break; + case 'select': + ReactDOMSelect.mountWrapper(this, props, hostParent); + props = ReactDOMSelect.getHostProps(this, props); + transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this); + break; + case 'textarea': + ReactDOMTextarea.mountWrapper(this, props, hostParent); + props = ReactDOMTextarea.getHostProps(this, props); + transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this); + break; + } + + assertValidProps(this, props); + + // We create tags in the namespace of their parent container, except HTML + // tags get no namespace. + var namespaceURI; + var parentTag; + if (hostParent != null) { + namespaceURI = hostParent._namespaceURI; + parentTag = hostParent._tag; + } else if (hostContainerInfo._tag) { + namespaceURI = hostContainerInfo._namespaceURI; + parentTag = hostContainerInfo._tag; + } + if (namespaceURI == null || (namespaceURI === DOMNamespaces.svg && parentTag === 'foreignobject')) { + namespaceURI = DOMNamespaces.html; + } + if (namespaceURI === DOMNamespaces.html) { + if (this._tag === 'svg') { + namespaceURI = DOMNamespaces.svg; + } else if (this._tag === 'math') { + namespaceURI = DOMNamespaces.mathml; + } + } + this._namespaceURI = namespaceURI; + + if (true) { + var parentInfo; + if (hostParent != null) { + parentInfo = hostParent._ancestorInfo; + } else if (hostContainerInfo._tag) { + parentInfo = hostContainerInfo._ancestorInfo; + } + if (parentInfo) { + // parentInfo should always be present except for the top-level + // component when server rendering + validateDOMNesting(this._tag, null, this, parentInfo); + } + this._ancestorInfo = validateDOMNesting.updatedAncestorInfo(parentInfo, this._tag, this); + } + + var mountImage; + if (transaction.useCreateElement) { + var ownerDocument = hostContainerInfo._ownerDocument; + var el; + if (namespaceURI === DOMNamespaces.html) { + if (this._tag === 'script') { + // Create the script via .innerHTML so its "parser-inserted" flag is + // set to true and it does not execute + var div = ownerDocument.createElement('div'); + var type = this._currentElement.type; + div.innerHTML = '<' + type + '></' + type + '>'; + el = div.removeChild(div.firstChild); + } else if (props.is) { + el = ownerDocument.createElement(this._currentElement.type, props.is); + } else { + // Separate else branch instead of using `props.is || undefined` above becuase of a Firefox bug. + // See discussion in https://github.com/facebook/react/pull/6896 + // and discussion in https://bugzilla.mozilla.org/show_bug.cgi?id=1276240 + el = ownerDocument.createElement(this._currentElement.type); + } + } else { + el = ownerDocument.createElementNS(namespaceURI, this._currentElement.type); + } + ReactDOMComponentTree.precacheNode(this, el); + this._flags |= Flags.hasCachedChildNodes; + if (!this._hostParent) { + DOMPropertyOperations.setAttributeForRoot(el); + } + this._updateDOMProperties(null, props, transaction); + var lazyTree = DOMLazyTree(el); + this._createInitialChildren(transaction, props, context, lazyTree); + mountImage = lazyTree; + } else { + var tagOpen = this._createOpenTagMarkupAndPutListeners(transaction, props); + var tagContent = this._createContentMarkup(transaction, props, context); + if (!tagContent && omittedCloseTags[this._tag]) { + mountImage = tagOpen + '/>'; + } else { + mountImage = tagOpen + '>' + tagContent + '</' + this._currentElement.type + '>'; + } + } + + switch (this._tag) { + case 'input': + transaction.getReactMountReady().enqueue(inputPostMount, this); + if (props.autoFocus) { + transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this); + } + break; + case 'textarea': + transaction.getReactMountReady().enqueue(textareaPostMount, this); + if (props.autoFocus) { + transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this); + } + break; + case 'select': + if (props.autoFocus) { + transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this); + } + break; + case 'button': + if (props.autoFocus) { + transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this); + } + break; + case 'option': + transaction.getReactMountReady().enqueue(optionPostMount, this); + break; + } + + return mountImage; + }, + + /** + * Creates markup for the open tag and all attributes. + * + * This method has side effects because events get registered. + * + * Iterating over object properties is faster than iterating over arrays. + * @see http://jsperf.com/obj-vs-arr-iteration + * + * @private + * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction + * @param {object} props + * @return {string} Markup of opening tag. + */ + _createOpenTagMarkupAndPutListeners: function (transaction, props) { + var ret = '<' + this._currentElement.type; + + for (var propKey in props) { + if (!props.hasOwnProperty(propKey)) { + continue; + } + var propValue = props[propKey]; + if (propValue == null) { + continue; + } + if (registrationNameModules.hasOwnProperty(propKey)) { + if (propValue) { + enqueuePutListener(this, propKey, propValue, transaction); + } + } else { + if (propKey === STYLE) { + if (propValue) { + if (true) { + // See `_updateDOMProperties`. style block + this._previousStyle = propValue; + } + propValue = this._previousStyleCopy = _assign({}, props.style); + } + propValue = CSSPropertyOperations.createMarkupForStyles(propValue, this); + } + var markup = null; + if (this._tag != null && isCustomComponent(this._tag, props)) { + if (!RESERVED_PROPS.hasOwnProperty(propKey)) { + markup = DOMPropertyOperations.createMarkupForCustomAttribute(propKey, propValue); + } + } else { + markup = DOMPropertyOperations.createMarkupForProperty(propKey, propValue); + } + if (markup) { + ret += ' ' + markup; + } + } + } + + // For static pages, no need to put React ID and checksum. Saves lots of + // bytes. + if (transaction.renderToStaticMarkup) { + return ret; + } + + if (!this._hostParent) { + ret += ' ' + DOMPropertyOperations.createMarkupForRoot(); + } + ret += ' ' + DOMPropertyOperations.createMarkupForID(this._domID); + return ret; + }, + + /** + * Creates markup for the content between the tags. + * + * @private + * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction + * @param {object} props + * @param {object} context + * @return {string} Content markup. + */ + _createContentMarkup: function (transaction, props, context) { + var ret = ''; + + // Intentional use of != to avoid catching zero/false. + var innerHTML = props.dangerouslySetInnerHTML; + if (innerHTML != null) { + if (innerHTML.__html != null) { + ret = innerHTML.__html; + } + } else { + var contentToUse = CONTENT_TYPES[typeof props.children] ? props.children : null; + var childrenToUse = contentToUse != null ? null : props.children; + if (contentToUse != null) { + // TODO: Validate that text is allowed as a child of this node + ret = escapeTextContentForBrowser(contentToUse); + if (true) { + setAndValidateContentChildDev.call(this, contentToUse); + } + } else if (childrenToUse != null) { + var mountImages = this.mountChildren(childrenToUse, transaction, context); + ret = mountImages.join(''); + } + } + if (newlineEatingTags[this._tag] && ret.charAt(0) === '\n') { + // text/html ignores the first character in these tags if it's a newline + // Prefer to break application/xml over text/html (for now) by adding + // a newline specifically to get eaten by the parser. (Alternately for + // textareas, replacing "^\n" with "\r\n" doesn't get eaten, and the first + // \r is normalized out by HTMLTextAreaElement#value.) + // See: <http://www.w3.org/TR/html-polyglot/#newlines-in-textarea-and-pre> + // See: <http://www.w3.org/TR/html5/syntax.html#element-restrictions> + // See: <http://www.w3.org/TR/html5/syntax.html#newlines> + // See: Parsing of "textarea" "listing" and "pre" elements + // from <http://www.w3.org/TR/html5/syntax.html#parsing-main-inbody> + return '\n' + ret; + } else { + return ret; + } + }, + + _createInitialChildren: function (transaction, props, context, lazyTree) { + // Intentional use of != to avoid catching zero/false. + var innerHTML = props.dangerouslySetInnerHTML; + if (innerHTML != null) { + if (innerHTML.__html != null) { + DOMLazyTree.queueHTML(lazyTree, innerHTML.__html); + } + } else { + var contentToUse = CONTENT_TYPES[typeof props.children] ? props.children : null; + var childrenToUse = contentToUse != null ? null : props.children; + // TODO: Validate that text is allowed as a child of this node + if (contentToUse != null) { + // Avoid setting textContent when the text is empty. In IE11 setting + // textContent on a text area will cause the placeholder to not + // show within the textarea until it has been focused and blurred again. + // https://github.com/facebook/react/issues/6731#issuecomment-254874553 + if (contentToUse !== '') { + if (true) { + setAndValidateContentChildDev.call(this, contentToUse); + } + DOMLazyTree.queueText(lazyTree, contentToUse); + } + } else if (childrenToUse != null) { + var mountImages = this.mountChildren(childrenToUse, transaction, context); + for (var i = 0; i < mountImages.length; i++) { + DOMLazyTree.queueChild(lazyTree, mountImages[i]); + } + } + } + }, + + /** + * Receives a next element and updates the component. + * + * @internal + * @param {ReactElement} nextElement + * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction + * @param {object} context + */ + receiveComponent: function (nextElement, transaction, context) { + var prevElement = this._currentElement; + this._currentElement = nextElement; + this.updateComponent(transaction, prevElement, nextElement, context); + }, + + /** + * Updates a DOM component after it has already been allocated and + * attached to the DOM. Reconciles the root DOM node, then recurses. + * + * @param {ReactReconcileTransaction} transaction + * @param {ReactElement} prevElement + * @param {ReactElement} nextElement + * @internal + * @overridable + */ + updateComponent: function (transaction, prevElement, nextElement, context) { + var lastProps = prevElement.props; + var nextProps = this._currentElement.props; + + switch (this._tag) { + case 'input': + lastProps = ReactDOMInput.getHostProps(this, lastProps); + nextProps = ReactDOMInput.getHostProps(this, nextProps); + break; + case 'option': + lastProps = ReactDOMOption.getHostProps(this, lastProps); + nextProps = ReactDOMOption.getHostProps(this, nextProps); + break; + case 'select': + lastProps = ReactDOMSelect.getHostProps(this, lastProps); + nextProps = ReactDOMSelect.getHostProps(this, nextProps); + break; + case 'textarea': + lastProps = ReactDOMTextarea.getHostProps(this, lastProps); + nextProps = ReactDOMTextarea.getHostProps(this, nextProps); + break; + } + + assertValidProps(this, nextProps); + this._updateDOMProperties(lastProps, nextProps, transaction); + this._updateDOMChildren(lastProps, nextProps, transaction, context); + + switch (this._tag) { + case 'input': + // Update the wrapper around inputs *after* updating props. This has to + // happen after `_updateDOMProperties`. Otherwise HTML5 input validations + // raise warnings and prevent the new value from being assigned. + ReactDOMInput.updateWrapper(this); + break; + case 'textarea': + ReactDOMTextarea.updateWrapper(this); + break; + case 'select': + // <select> value update needs to occur after <option> children + // reconciliation + transaction.getReactMountReady().enqueue(postUpdateSelectWrapper, this); + break; + } + }, + + /** + * Reconciles the properties by detecting differences in property values and + * updating the DOM as necessary. This function is probably the single most + * critical path for performance optimization. + * + * TODO: Benchmark whether checking for changed values in memory actually + * improves performance (especially statically positioned elements). + * TODO: Benchmark the effects of putting this at the top since 99% of props + * do not change for a given reconciliation. + * TODO: Benchmark areas that can be improved with caching. + * + * @private + * @param {object} lastProps + * @param {object} nextProps + * @param {?DOMElement} node + */ + _updateDOMProperties: function (lastProps, nextProps, transaction) { + var propKey; + var styleName; + var styleUpdates; + for (propKey in lastProps) { + if ( + nextProps.hasOwnProperty(propKey) || + !lastProps.hasOwnProperty(propKey) || + lastProps[propKey] == null + ) { + continue; + } + if (propKey === STYLE) { + var lastStyle = this._previousStyleCopy; + for (styleName in lastStyle) { + if (lastStyle.hasOwnProperty(styleName)) { + styleUpdates = styleUpdates || {}; + styleUpdates[styleName] = ''; + } + } + this._previousStyleCopy = null; + } else if (registrationNameModules.hasOwnProperty(propKey)) { + if (lastProps[propKey]) { + // Only call deleteListener if there was a listener previously or + // else willDeleteListener gets called when there wasn't actually a + // listener (e.g., onClick={null}) + deleteListener(this, propKey); + } + } else if (isCustomComponent(this._tag, lastProps)) { + if (!RESERVED_PROPS.hasOwnProperty(propKey)) { + DOMPropertyOperations.deleteValueForAttribute(getNode(this), propKey); + } + } else if (DOMProperty.properties[propKey] || DOMProperty.isCustomAttribute(propKey)) { + DOMPropertyOperations.deleteValueForProperty(getNode(this), propKey); + } + } + for (propKey in nextProps) { + var nextProp = nextProps[propKey]; + var lastProp = + propKey === STYLE + ? this._previousStyleCopy + : lastProps != null + ? lastProps[propKey] + : undefined; + if ( + !nextProps.hasOwnProperty(propKey) || + nextProp === lastProp || + (nextProp == null && lastProp == null) + ) { + continue; + } + if (propKey === STYLE) { + if (nextProp) { + if (true) { + checkAndWarnForMutatedStyle(this._previousStyleCopy, this._previousStyle, this); + this._previousStyle = nextProp; + } + nextProp = this._previousStyleCopy = _assign({}, nextProp); + } else { + this._previousStyleCopy = null; + } + if (lastProp) { + // Unset styles on `lastProp` but not on `nextProp`. + for (styleName in lastProp) { + if ( + lastProp.hasOwnProperty(styleName) && + (!nextProp || !nextProp.hasOwnProperty(styleName)) + ) { + styleUpdates = styleUpdates || {}; + styleUpdates[styleName] = ''; + } + } + // Update styles that changed since `lastProp`. + for (styleName in nextProp) { + if (nextProp.hasOwnProperty(styleName) && lastProp[styleName] !== nextProp[styleName]) { + styleUpdates = styleUpdates || {}; + styleUpdates[styleName] = nextProp[styleName]; + } + } + } else { + // Relies on `updateStylesByID` not mutating `styleUpdates`. + styleUpdates = nextProp; + } + } else if (registrationNameModules.hasOwnProperty(propKey)) { + if (nextProp) { + enqueuePutListener(this, propKey, nextProp, transaction); + } else if (lastProp) { + deleteListener(this, propKey); + } + } else if (isCustomComponent(this._tag, nextProps)) { + if (!RESERVED_PROPS.hasOwnProperty(propKey)) { + DOMPropertyOperations.setValueForAttribute(getNode(this), propKey, nextProp); + } + } else if (DOMProperty.properties[propKey] || DOMProperty.isCustomAttribute(propKey)) { + var node = getNode(this); + // If we're updating to null or undefined, we should remove the property + // from the DOM node instead of inadvertently setting to a string. This + // brings us in line with the same behavior we have on initial render. + if (nextProp != null) { + DOMPropertyOperations.setValueForProperty(node, propKey, nextProp); + } else { + DOMPropertyOperations.deleteValueForProperty(node, propKey); + } + } + } + if (styleUpdates) { + CSSPropertyOperations.setValueForStyles(getNode(this), styleUpdates, this); + } + }, + + /** + * Reconciles the children with the various properties that affect the + * children content. + * + * @param {object} lastProps + * @param {object} nextProps + * @param {ReactReconcileTransaction} transaction + * @param {object} context + */ + _updateDOMChildren: function (lastProps, nextProps, transaction, context) { + var lastContent = CONTENT_TYPES[typeof lastProps.children] ? lastProps.children : null; + var nextContent = CONTENT_TYPES[typeof nextProps.children] ? nextProps.children : null; + + var lastHtml = lastProps.dangerouslySetInnerHTML && lastProps.dangerouslySetInnerHTML.__html; + var nextHtml = nextProps.dangerouslySetInnerHTML && nextProps.dangerouslySetInnerHTML.__html; + + // Note the use of `!=` which checks for null or undefined. + var lastChildren = lastContent != null ? null : lastProps.children; + var nextChildren = nextContent != null ? null : nextProps.children; + + // If we're switching from children to content/html or vice versa, remove + // the old content + var lastHasContentOrHtml = lastContent != null || lastHtml != null; + var nextHasContentOrHtml = nextContent != null || nextHtml != null; + if (lastChildren != null && nextChildren == null) { + this.updateChildren(null, transaction, context); + } else if (lastHasContentOrHtml && !nextHasContentOrHtml) { + this.updateTextContent(''); + if (true) { + ReactInstrumentation.debugTool.onSetChildren(this._debugID, []); + } + } + + if (nextContent != null) { + if (lastContent !== nextContent) { + this.updateTextContent('' + nextContent); + if (true) { + setAndValidateContentChildDev.call(this, nextContent); + } + } + } else if (nextHtml != null) { + if (lastHtml !== nextHtml) { + this.updateMarkup('' + nextHtml); + } + if (true) { + ReactInstrumentation.debugTool.onSetChildren(this._debugID, []); + } + } else if (nextChildren != null) { + if (true) { + setAndValidateContentChildDev.call(this, null); + } + + this.updateChildren(nextChildren, transaction, context); + } + }, + + getHostNode: function () { + return getNode(this); + }, + + /** + * Destroys all event registrations for this instance. Does not remove from + * the DOM. That must be done by the parent. + * + * @internal + */ + unmountComponent: function (safely) { + switch (this._tag) { + case 'audio': + case 'form': + case 'iframe': + case 'img': + case 'link': + case 'object': + case 'source': + case 'video': + var listeners = this._wrapperState.listeners; + if (listeners) { + for (var i = 0; i < listeners.length; i++) { + listeners[i].remove(); + } + } + break; + case 'html': + case 'head': + case 'body': + /** + * Components like <html> <head> and <body> can't be removed or added + * easily in a cross-browser way, however it's valuable to be able to + * take advantage of React's reconciliation for styling and <title> + * management. So we just document it and throw in dangerous cases. + */ + true + ? true + ? invariant( + false, + '<%s> tried to unmount. Because of cross-browser quirks it is impossible to unmount some top-level components (eg <html>, <head>, and <body>) reliably and efficiently. To fix this, have a single top-level component that never unmounts render these elements.', + this._tag, + ) + : _prodInvariant('66', this._tag) + : void 0; + break; + } + + this.unmountChildren(safely); + ReactDOMComponentTree.uncacheNode(this); + EventPluginHub.deleteAllListeners(this); + this._rootNodeID = 0; + this._domID = 0; + this._wrapperState = null; + + if (true) { + setAndValidateContentChildDev.call(this, null); + } + }, + + getPublicInstance: function () { + return getNode(this); + }, + }; + + _assign(ReactDOMComponent.prototype, ReactDOMComponent.Mixin, ReactMultiChild.Mixin); + + module.exports = ReactDOMComponent; + + /***/ + }, + /* 733 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2014-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var _assign = __webpack_require__(8); + + var DOMLazyTree = __webpack_require__(97); + var ReactDOMComponentTree = __webpack_require__(13); + + var ReactDOMEmptyComponent = function (instantiate) { + // ReactCompositeComponent uses this: + this._currentElement = null; + // ReactDOMComponentTree uses these: + this._hostNode = null; + this._hostParent = null; + this._hostContainerInfo = null; + this._domID = 0; + }; + _assign(ReactDOMEmptyComponent.prototype, { + mountComponent: function (transaction, hostParent, hostContainerInfo, context) { + var domID = hostContainerInfo._idCounter++; + this._domID = domID; + this._hostParent = hostParent; + this._hostContainerInfo = hostContainerInfo; + + var nodeValue = ' react-empty: ' + this._domID + ' '; + if (transaction.useCreateElement) { + var ownerDocument = hostContainerInfo._ownerDocument; + var node = ownerDocument.createComment(nodeValue); + ReactDOMComponentTree.precacheNode(this, node); + return DOMLazyTree(node); + } else { + if (transaction.renderToStaticMarkup) { + // Normally we'd insert a comment node, but since this is a situation + // where React won't take over (static pages), we can simply return + // nothing. + return ''; + } + return '<!--' + nodeValue + '-->'; + } + }, + receiveComponent: function () {}, + getHostNode: function () { + return ReactDOMComponentTree.getNodeFromInstance(this); + }, + unmountComponent: function () { + ReactDOMComponentTree.uncacheNode(this); + }, + }); + + module.exports = ReactDOMEmptyComponent; + + /***/ + }, + /* 734 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var ReactDOMFeatureFlags = { + useCreateElement: true, + useFiber: false, + }; + + module.exports = ReactDOMFeatureFlags; + + /***/ + }, + /* 735 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var DOMChildrenOperations = __webpack_require__(195); + var ReactDOMComponentTree = __webpack_require__(13); + + /** + * Operations used to process updates to DOM nodes. + */ + var ReactDOMIDOperations = { + /** + * Updates a component's children by processing a series of updates. + * + * @param {array<object>} updates List of update configurations. + * @internal + */ + dangerouslyProcessChildrenUpdates: function (parentInst, updates) { + var node = ReactDOMComponentTree.getNodeFromInstance(parentInst); + DOMChildrenOperations.processUpdates(node, updates); + }, + }; + + module.exports = ReactDOMIDOperations; + + /***/ + }, + /* 736 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var _prodInvariant = __webpack_require__(5), + _assign = __webpack_require__(8); + + var DOMPropertyOperations = __webpack_require__(309); + var LinkedValueUtils = __webpack_require__(199); + var ReactDOMComponentTree = __webpack_require__(13); + var ReactUpdates = __webpack_require__(34); + + var invariant = __webpack_require__(2); + var warning = __webpack_require__(3); + + var didWarnValueLink = false; + var didWarnCheckedLink = false; + var didWarnValueDefaultValue = false; + var didWarnCheckedDefaultChecked = false; + var didWarnControlledToUncontrolled = false; + var didWarnUncontrolledToControlled = false; + + function forceUpdateIfMounted() { + if (this._rootNodeID) { + // DOM component is still mounted; update + ReactDOMInput.updateWrapper(this); + } + } + + function isControlled(props) { + var usesChecked = props.type === 'checkbox' || props.type === 'radio'; + return usesChecked ? props.checked != null : props.value != null; + } + + /** + * Implements an <input> host component that allows setting these optional + * props: `checked`, `value`, `defaultChecked`, and `defaultValue`. + * + * If `checked` or `value` are not supplied (or null/undefined), user actions + * that affect the checked state or value will trigger updates to the element. + * + * If they are supplied (and not null/undefined), the rendered element will not + * trigger updates to the element. Instead, the props must change in order for + * the rendered element to be updated. + * + * The rendered element will be initialized as unchecked (or `defaultChecked`) + * with an empty value (or `defaultValue`). + * + * @see http://www.w3.org/TR/2012/WD-html5-20121025/the-input-element.html + */ + var ReactDOMInput = { + getHostProps: function (inst, props) { + var value = LinkedValueUtils.getValue(props); + var checked = LinkedValueUtils.getChecked(props); + + var hostProps = _assign( + { + // Make sure we set .type before any other properties (setting .value + // before .type means .value is lost in IE11 and below) + type: undefined, + // Make sure we set .step before .value (setting .value before .step + // means .value is rounded on mount, based upon step precision) + step: undefined, + // Make sure we set .min & .max before .value (to ensure proper order + // in corner cases such as min or max deriving from value, e.g. Issue #7170) + min: undefined, + max: undefined, + }, + props, + { + defaultChecked: undefined, + defaultValue: undefined, + value: value != null ? value : inst._wrapperState.initialValue, + checked: checked != null ? checked : inst._wrapperState.initialChecked, + onChange: inst._wrapperState.onChange, + }, + ); + + return hostProps; + }, + + mountWrapper: function (inst, props) { + if (true) { + LinkedValueUtils.checkPropTypes('input', props, inst._currentElement._owner); + + var owner = inst._currentElement._owner; + + if (props.valueLink !== undefined && !didWarnValueLink) { + true + ? warning( + false, + '`valueLink` prop on `input` is deprecated; set `value` and `onChange` instead.', + ) + : void 0; + didWarnValueLink = true; + } + if (props.checkedLink !== undefined && !didWarnCheckedLink) { + true + ? warning( + false, + '`checkedLink` prop on `input` is deprecated; set `value` and `onChange` instead.', + ) + : void 0; + didWarnCheckedLink = true; + } + if ( + props.checked !== undefined && + props.defaultChecked !== undefined && + !didWarnCheckedDefaultChecked + ) { + true + ? warning( + false, + '%s contains an input of type %s with both checked and defaultChecked props. ' + + 'Input elements must be either controlled or uncontrolled ' + + '(specify either the checked prop, or the defaultChecked prop, but not ' + + 'both). Decide between using a controlled or uncontrolled input ' + + 'element and remove one of these props. More info: ' + + 'https://fb.me/react-controlled-components', + (owner && owner.getName()) || 'A component', + props.type, + ) + : void 0; + didWarnCheckedDefaultChecked = true; + } + if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue) { + true + ? warning( + false, + '%s contains an input of type %s with both value and defaultValue props. ' + + 'Input elements must be either controlled or uncontrolled ' + + '(specify either the value prop, or the defaultValue prop, but not ' + + 'both). Decide between using a controlled or uncontrolled input ' + + 'element and remove one of these props. More info: ' + + 'https://fb.me/react-controlled-components', + (owner && owner.getName()) || 'A component', + props.type, + ) + : void 0; + didWarnValueDefaultValue = true; + } + } + + var defaultValue = props.defaultValue; + inst._wrapperState = { + initialChecked: props.checked != null ? props.checked : props.defaultChecked, + initialValue: props.value != null ? props.value : defaultValue, + listeners: null, + onChange: _handleChange.bind(inst), + }; + + if (true) { + inst._wrapperState.controlled = isControlled(props); + } + }, + + updateWrapper: function (inst) { + var props = inst._currentElement.props; + + if (true) { + var controlled = isControlled(props); + var owner = inst._currentElement._owner; + + if (!inst._wrapperState.controlled && controlled && !didWarnUncontrolledToControlled) { + true + ? warning( + false, + '%s is changing an uncontrolled input of type %s to be controlled. ' + + 'Input elements should not switch from uncontrolled to controlled (or vice versa). ' + + 'Decide between using a controlled or uncontrolled input ' + + 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components', + (owner && owner.getName()) || 'A component', + props.type, + ) + : void 0; + didWarnUncontrolledToControlled = true; + } + if (inst._wrapperState.controlled && !controlled && !didWarnControlledToUncontrolled) { + true + ? warning( + false, + '%s is changing a controlled input of type %s to be uncontrolled. ' + + 'Input elements should not switch from controlled to uncontrolled (or vice versa). ' + + 'Decide between using a controlled or uncontrolled input ' + + 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components', + (owner && owner.getName()) || 'A component', + props.type, + ) + : void 0; + didWarnControlledToUncontrolled = true; + } + } + + // TODO: Shouldn't this be getChecked(props)? + var checked = props.checked; + if (checked != null) { + DOMPropertyOperations.setValueForProperty( + ReactDOMComponentTree.getNodeFromInstance(inst), + 'checked', + checked || false, + ); + } + + var node = ReactDOMComponentTree.getNodeFromInstance(inst); + var value = LinkedValueUtils.getValue(props); + if (value != null) { + // Cast `value` to a string to ensure the value is set correctly. While + // browsers typically do this as necessary, jsdom doesn't. + var newValue = '' + value; + + // To avoid side effects (such as losing text selection), only set value if changed + if (newValue !== node.value) { + node.value = newValue; + } + } else { + if (props.value == null && props.defaultValue != null) { + // In Chrome, assigning defaultValue to certain input types triggers input validation. + // For number inputs, the display value loses trailing decimal points. For email inputs, + // Chrome raises "The specified value <x> is not a valid email address". + // + // Here we check to see if the defaultValue has actually changed, avoiding these problems + // when the user is inputting text + // + // https://github.com/facebook/react/issues/7253 + if (node.defaultValue !== '' + props.defaultValue) { + node.defaultValue = '' + props.defaultValue; + } + } + if (props.checked == null && props.defaultChecked != null) { + node.defaultChecked = !!props.defaultChecked; + } + } + }, + + postMountWrapper: function (inst) { + var props = inst._currentElement.props; + + // This is in postMount because we need access to the DOM node, which is not + // available until after the component has mounted. + var node = ReactDOMComponentTree.getNodeFromInstance(inst); + + // Detach value from defaultValue. We won't do anything if we're working on + // submit or reset inputs as those values & defaultValues are linked. They + // are not resetable nodes so this operation doesn't matter and actually + // removes browser-default values (eg "Submit Query") when no value is + // provided. + + switch (props.type) { + case 'submit': + case 'reset': + break; + case 'color': + case 'date': + case 'datetime': + case 'datetime-local': + case 'month': + case 'time': + case 'week': + // This fixes the no-show issue on iOS Safari and Android Chrome: + // https://github.com/facebook/react/issues/7233 + node.value = ''; + node.value = node.defaultValue; + break; + default: + node.value = node.value; + break; + } + + // Normally, we'd just do `node.checked = node.checked` upon initial mount, less this bug + // this is needed to work around a chrome bug where setting defaultChecked + // will sometimes influence the value of checked (even after detachment). + // Reference: https://bugs.chromium.org/p/chromium/issues/detail?id=608416 + // We need to temporarily unset name to avoid disrupting radio button groups. + var name = node.name; + if (name !== '') { + node.name = ''; + } + node.defaultChecked = !node.defaultChecked; + node.defaultChecked = !node.defaultChecked; + if (name !== '') { + node.name = name; + } + }, + }; + + function _handleChange(event) { + var props = this._currentElement.props; + + var returnValue = LinkedValueUtils.executeOnChange(props, event); + + // Here we use asap to wait until all updates have propagated, which + // is important when using controlled components within layers: + // https://github.com/facebook/react/issues/1698 + ReactUpdates.asap(forceUpdateIfMounted, this); + + var name = props.name; + if (props.type === 'radio' && name != null) { + var rootNode = ReactDOMComponentTree.getNodeFromInstance(this); + var queryRoot = rootNode; + + while (queryRoot.parentNode) { + queryRoot = queryRoot.parentNode; + } + + // If `rootNode.form` was non-null, then we could try `form.elements`, + // but that sometimes behaves strangely in IE8. We could also try using + // `form.getElementsByName`, but that will only return direct children + // and won't include inputs that use the HTML5 `form=` attribute. Since + // the input might not even be in a form, let's just use the global + // `querySelectorAll` to ensure we don't miss anything. + var group = queryRoot.querySelectorAll( + 'input[name=' + JSON.stringify('' + name) + '][type="radio"]', + ); + + for (var i = 0; i < group.length; i++) { + var otherNode = group[i]; + if (otherNode === rootNode || otherNode.form !== rootNode.form) { + continue; + } + // This will throw if radio buttons rendered by different copies of React + // and the same name are rendered into the same form (same as #1939). + // That's probably okay; we don't support it just as we don't support + // mixing React radio buttons with non-React ones. + var otherInstance = ReactDOMComponentTree.getInstanceFromNode(otherNode); + !otherInstance + ? true + ? invariant( + false, + 'ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.', + ) + : _prodInvariant('90') + : void 0; + // If this is a controlled radio button group, forcing the input that + // was previously checked to update will cause it to be come re-checked + // as appropriate. + ReactUpdates.asap(forceUpdateIfMounted, otherInstance); + } + } + + return returnValue; + } + + module.exports = ReactDOMInput; + + /***/ + }, + /* 737 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var DOMProperty = __webpack_require__(66); + var ReactComponentTreeHook = __webpack_require__(19); + + var warning = __webpack_require__(3); + + var warnedProperties = {}; + var rARIA = new RegExp('^(aria)-[' + DOMProperty.ATTRIBUTE_NAME_CHAR + ']*$'); + + function validateProperty(tagName, name, debugID) { + if (warnedProperties.hasOwnProperty(name) && warnedProperties[name]) { + return true; + } + + if (rARIA.test(name)) { + var lowerCasedName = name.toLowerCase(); + var standardName = DOMProperty.getPossibleStandardName.hasOwnProperty(lowerCasedName) + ? DOMProperty.getPossibleStandardName[lowerCasedName] + : null; + + // If this is an aria-* attribute, but is not listed in the known DOM + // DOM properties, then it is an invalid aria-* attribute. + if (standardName == null) { + warnedProperties[name] = true; + return false; + } + // aria-* attributes should be lowercase; suggest the lowercase version. + if (name !== standardName) { + true + ? warning( + false, + 'Unknown ARIA attribute %s. Did you mean %s?%s', + name, + standardName, + ReactComponentTreeHook.getStackAddendumByID(debugID), + ) + : void 0; + warnedProperties[name] = true; + return true; + } + } + + return true; + } + + function warnInvalidARIAProps(debugID, element) { + var invalidProps = []; + + for (var key in element.props) { + var isValid = validateProperty(element.type, key, debugID); + if (!isValid) { + invalidProps.push(key); + } + } + + var unknownPropString = invalidProps + .map(function (prop) { + return '`' + prop + '`'; + }) + .join(', '); + + if (invalidProps.length === 1) { + true + ? warning( + false, + 'Invalid aria prop %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop%s', + unknownPropString, + element.type, + ReactComponentTreeHook.getStackAddendumByID(debugID), + ) + : void 0; + } else if (invalidProps.length > 1) { + true + ? warning( + false, + 'Invalid aria props %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop%s', + unknownPropString, + element.type, + ReactComponentTreeHook.getStackAddendumByID(debugID), + ) + : void 0; + } + } + + function handleElement(debugID, element) { + if (element == null || typeof element.type !== 'string') { + return; + } + if (element.type.indexOf('-') >= 0 || element.props.is) { + return; + } + + warnInvalidARIAProps(debugID, element); + } + + var ReactDOMInvalidARIAHook = { + onBeforeMountComponent: function (debugID, element) { + if (true) { + handleElement(debugID, element); + } + }, + onBeforeUpdateComponent: function (debugID, element) { + if (true) { + handleElement(debugID, element); + } + }, + }; + + module.exports = ReactDOMInvalidARIAHook; + + /***/ + }, + /* 738 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var ReactComponentTreeHook = __webpack_require__(19); + + var warning = __webpack_require__(3); + + var didWarnValueNull = false; + + function handleElement(debugID, element) { + if (element == null) { + return; + } + if (element.type !== 'input' && element.type !== 'textarea' && element.type !== 'select') { + return; + } + if (element.props != null && element.props.value === null && !didWarnValueNull) { + true + ? warning( + false, + '`value` prop on `%s` should not be null. ' + + 'Consider using the empty string to clear the component or `undefined` ' + + 'for uncontrolled components.%s', + element.type, + ReactComponentTreeHook.getStackAddendumByID(debugID), + ) + : void 0; + + didWarnValueNull = true; + } + } + + var ReactDOMNullInputValuePropHook = { + onBeforeMountComponent: function (debugID, element) { + handleElement(debugID, element); + }, + onBeforeUpdateComponent: function (debugID, element) { + handleElement(debugID, element); + }, + }; + + module.exports = ReactDOMNullInputValuePropHook; + + /***/ + }, + /* 739 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var _assign = __webpack_require__(8); + + var React = __webpack_require__(41); + var ReactDOMComponentTree = __webpack_require__(13); + var ReactDOMSelect = __webpack_require__(313); + + var warning = __webpack_require__(3); + var didWarnInvalidOptionChildren = false; + + function flattenChildren(children) { + var content = ''; + + // Flatten children and warn if they aren't strings or numbers; + // invalid types are ignored. + React.Children.forEach(children, function (child) { + if (child == null) { + return; + } + if (typeof child === 'string' || typeof child === 'number') { + content += child; + } else if (!didWarnInvalidOptionChildren) { + didWarnInvalidOptionChildren = true; + true ? warning(false, 'Only strings and numbers are supported as <option> children.') : void 0; + } + }); + + return content; + } + + /** + * Implements an <option> host component that warns when `selected` is set. + */ + var ReactDOMOption = { + mountWrapper: function (inst, props, hostParent) { + // TODO (yungsters): Remove support for `selected` in <option>. + if (true) { + true + ? warning( + props.selected == null, + 'Use the `defaultValue` or `value` props on <select> instead of ' + + 'setting `selected` on <option>.', + ) + : void 0; + } + + // Look up whether this option is 'selected' + var selectValue = null; + if (hostParent != null) { + var selectParent = hostParent; + + if (selectParent._tag === 'optgroup') { + selectParent = selectParent._hostParent; + } + + if (selectParent != null && selectParent._tag === 'select') { + selectValue = ReactDOMSelect.getSelectValueContext(selectParent); + } + } + + // If the value is null (e.g., no specified value or after initial mount) + // or missing (e.g., for <datalist>), we don't change props.selected + var selected = null; + if (selectValue != null) { + var value; + if (props.value != null) { + value = props.value + ''; + } else { + value = flattenChildren(props.children); + } + selected = false; + if (Array.isArray(selectValue)) { + // multiple + for (var i = 0; i < selectValue.length; i++) { + if ('' + selectValue[i] === value) { + selected = true; + break; + } + } + } else { + selected = '' + selectValue === value; + } + } + + inst._wrapperState = { selected: selected }; + }, + + postMountWrapper: function (inst) { + // value="" should make a value attribute (#6219) + var props = inst._currentElement.props; + if (props.value != null) { + var node = ReactDOMComponentTree.getNodeFromInstance(inst); + node.setAttribute('value', props.value); + } + }, + + getHostProps: function (inst, props) { + var hostProps = _assign({ selected: undefined, children: undefined }, props); + + // Read state only from initial mount because <select> updates value + // manually; we need the initial state only for server rendering + if (inst._wrapperState.selected != null) { + hostProps.selected = inst._wrapperState.selected; + } + + var content = flattenChildren(props.children); + + if (content) { + hostProps.children = content; + } + + return hostProps; + }, + }; + + module.exports = ReactDOMOption; + + /***/ + }, + /* 740 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var ExecutionEnvironment = __webpack_require__(14); + + var getNodeForCharacterOffset = __webpack_require__(782); + var getTextContentAccessor = __webpack_require__(332); + + /** + * While `isCollapsed` is available on the Selection object and `collapsed` + * is available on the Range object, IE11 sometimes gets them wrong. + * If the anchor/focus nodes and offsets are the same, the range is collapsed. + */ + function isCollapsed(anchorNode, anchorOffset, focusNode, focusOffset) { + return anchorNode === focusNode && anchorOffset === focusOffset; + } + + /** + * Get the appropriate anchor and focus node/offset pairs for IE. + * + * The catch here is that IE's selection API doesn't provide information + * about whether the selection is forward or backward, so we have to + * behave as though it's always forward. + * + * IE text differs from modern selection in that it behaves as though + * block elements end with a new line. This means character offsets will + * differ between the two APIs. + * + * @param {DOMElement} node + * @return {object} + */ + function getIEOffsets(node) { + var selection = document.selection; + var selectedRange = selection.createRange(); + var selectedLength = selectedRange.text.length; + + // Duplicate selection so we can move range without breaking user selection. + var fromStart = selectedRange.duplicate(); + fromStart.moveToElementText(node); + fromStart.setEndPoint('EndToStart', selectedRange); + + var startOffset = fromStart.text.length; + var endOffset = startOffset + selectedLength; + + return { + start: startOffset, + end: endOffset, + }; + } + + /** + * @param {DOMElement} node + * @return {?object} + */ + function getModernOffsets(node) { + var selection = window.getSelection && window.getSelection(); + + if (!selection || selection.rangeCount === 0) { + return null; + } + + var anchorNode = selection.anchorNode; + var anchorOffset = selection.anchorOffset; + var focusNode = selection.focusNode; + var focusOffset = selection.focusOffset; + + var currentRange = selection.getRangeAt(0); + + // In Firefox, range.startContainer and range.endContainer can be "anonymous + // divs", e.g. the up/down buttons on an <input type="number">. Anonymous + // divs do not seem to expose properties, triggering a "Permission denied + // error" if any of its properties are accessed. The only seemingly possible + // way to avoid erroring is to access a property that typically works for + // non-anonymous divs and catch any error that may otherwise arise. See + // https://bugzilla.mozilla.org/show_bug.cgi?id=208427 + try { + /* eslint-disable no-unused-expressions */ + currentRange.startContainer.nodeType; + currentRange.endContainer.nodeType; + /* eslint-enable no-unused-expressions */ + } catch (e) { + return null; + } + + // If the node and offset values are the same, the selection is collapsed. + // `Selection.isCollapsed` is available natively, but IE sometimes gets + // this value wrong. + var isSelectionCollapsed = isCollapsed( + selection.anchorNode, + selection.anchorOffset, + selection.focusNode, + selection.focusOffset, + ); + + var rangeLength = isSelectionCollapsed ? 0 : currentRange.toString().length; + + var tempRange = currentRange.cloneRange(); + tempRange.selectNodeContents(node); + tempRange.setEnd(currentRange.startContainer, currentRange.startOffset); + + var isTempRangeCollapsed = isCollapsed( + tempRange.startContainer, + tempRange.startOffset, + tempRange.endContainer, + tempRange.endOffset, + ); + + var start = isTempRangeCollapsed ? 0 : tempRange.toString().length; + var end = start + rangeLength; + + // Detect whether the selection is backward. + var detectionRange = document.createRange(); + detectionRange.setStart(anchorNode, anchorOffset); + detectionRange.setEnd(focusNode, focusOffset); + var isBackward = detectionRange.collapsed; + + return { + start: isBackward ? end : start, + end: isBackward ? start : end, + }; + } + + /** + * @param {DOMElement|DOMTextNode} node + * @param {object} offsets + */ + function setIEOffsets(node, offsets) { + var range = document.selection.createRange().duplicate(); + var start, end; + + if (offsets.end === undefined) { + start = offsets.start; + end = start; + } else if (offsets.start > offsets.end) { + start = offsets.end; + end = offsets.start; + } else { + start = offsets.start; + end = offsets.end; + } + + range.moveToElementText(node); + range.moveStart('character', start); + range.setEndPoint('EndToStart', range); + range.moveEnd('character', end - start); + range.select(); + } + + /** + * In modern non-IE browsers, we can support both forward and backward + * selections. + * + * Note: IE10+ supports the Selection object, but it does not support + * the `extend` method, which means that even in modern IE, it's not possible + * to programmatically create a backward selection. Thus, for all IE + * versions, we use the old IE API to create our selections. + * + * @param {DOMElement|DOMTextNode} node + * @param {object} offsets + */ + function setModernOffsets(node, offsets) { + if (!window.getSelection) { + return; + } + + var selection = window.getSelection(); + var length = node[getTextContentAccessor()].length; + var start = Math.min(offsets.start, length); + var end = offsets.end === undefined ? start : Math.min(offsets.end, length); + + // IE 11 uses modern selection, but doesn't support the extend method. + // Flip backward selections, so we can set with a single range. + if (!selection.extend && start > end) { + var temp = end; + end = start; + start = temp; + } + + var startMarker = getNodeForCharacterOffset(node, start); + var endMarker = getNodeForCharacterOffset(node, end); + + if (startMarker && endMarker) { + var range = document.createRange(); + range.setStart(startMarker.node, startMarker.offset); + selection.removeAllRanges(); + + if (start > end) { + selection.addRange(range); + selection.extend(endMarker.node, endMarker.offset); + } else { + range.setEnd(endMarker.node, endMarker.offset); + selection.addRange(range); + } + } + } + + var useIEOffsets = + ExecutionEnvironment.canUseDOM && 'selection' in document && !('getSelection' in window); + + var ReactDOMSelection = { + /** + * @param {DOMElement} node + */ + getOffsets: useIEOffsets ? getIEOffsets : getModernOffsets, + + /** + * @param {DOMElement|DOMTextNode} node + * @param {object} offsets + */ + setOffsets: useIEOffsets ? setIEOffsets : setModernOffsets, + }; + + module.exports = ReactDOMSelection; + + /***/ + }, + /* 741 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var ReactDefaultInjection = __webpack_require__(202); + var ReactServerRendering = __webpack_require__(759); + var ReactVersion = __webpack_require__(325); + + ReactDefaultInjection.inject(); + + var ReactDOMServer = { + renderToString: ReactServerRendering.renderToString, + renderToStaticMarkup: ReactServerRendering.renderToStaticMarkup, + version: ReactVersion, + }; + + module.exports = ReactDOMServer; + + /***/ + }, + /* 742 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var _prodInvariant = __webpack_require__(5), + _assign = __webpack_require__(8); + + var DOMChildrenOperations = __webpack_require__(195); + var DOMLazyTree = __webpack_require__(97); + var ReactDOMComponentTree = __webpack_require__(13); + + var escapeTextContentForBrowser = __webpack_require__(143); + var invariant = __webpack_require__(2); + var validateDOMNesting = __webpack_require__(212); + + /** + * Text nodes violate a couple assumptions that React makes about components: + * + * - When mounting text into the DOM, adjacent text nodes are merged. + * - Text nodes cannot be assigned a React root ID. + * + * This component is used to wrap strings between comment nodes so that they + * can undergo the same reconciliation that is applied to elements. + * + * TODO: Investigate representing React components in the DOM with text nodes. + * + * @class ReactDOMTextComponent + * @extends ReactComponent + * @internal + */ + var ReactDOMTextComponent = function (text) { + // TODO: This is really a ReactText (ReactNode), not a ReactElement + this._currentElement = text; + this._stringText = '' + text; + // ReactDOMComponentTree uses these: + this._hostNode = null; + this._hostParent = null; + + // Properties + this._domID = 0; + this._mountIndex = 0; + this._closingComment = null; + this._commentNodes = null; + }; + + _assign(ReactDOMTextComponent.prototype, { + /** + * Creates the markup for this text node. This node is not intended to have + * any features besides containing text content. + * + * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction + * @return {string} Markup for this text node. + * @internal + */ + mountComponent: function (transaction, hostParent, hostContainerInfo, context) { + if (true) { + var parentInfo; + if (hostParent != null) { + parentInfo = hostParent._ancestorInfo; + } else if (hostContainerInfo != null) { + parentInfo = hostContainerInfo._ancestorInfo; + } + if (parentInfo) { + // parentInfo should always be present except for the top-level + // component when server rendering + validateDOMNesting(null, this._stringText, this, parentInfo); + } + } + + var domID = hostContainerInfo._idCounter++; + var openingValue = ' react-text: ' + domID + ' '; + var closingValue = ' /react-text '; + this._domID = domID; + this._hostParent = hostParent; + if (transaction.useCreateElement) { + var ownerDocument = hostContainerInfo._ownerDocument; + var openingComment = ownerDocument.createComment(openingValue); + var closingComment = ownerDocument.createComment(closingValue); + var lazyTree = DOMLazyTree(ownerDocument.createDocumentFragment()); + DOMLazyTree.queueChild(lazyTree, DOMLazyTree(openingComment)); + if (this._stringText) { + DOMLazyTree.queueChild(lazyTree, DOMLazyTree(ownerDocument.createTextNode(this._stringText))); + } + DOMLazyTree.queueChild(lazyTree, DOMLazyTree(closingComment)); + ReactDOMComponentTree.precacheNode(this, openingComment); + this._closingComment = closingComment; + return lazyTree; + } else { + var escapedText = escapeTextContentForBrowser(this._stringText); + + if (transaction.renderToStaticMarkup) { + // Normally we'd wrap this between comment nodes for the reasons stated + // above, but since this is a situation where React won't take over + // (static pages), we can simply return the text as it is. + return escapedText; + } + + return '<!--' + openingValue + '-->' + escapedText + '<!--' + closingValue + '-->'; + } + }, + + /** + * Updates this component by updating the text content. + * + * @param {ReactText} nextText The next text content + * @param {ReactReconcileTransaction} transaction + * @internal + */ + receiveComponent: function (nextText, transaction) { + if (nextText !== this._currentElement) { + this._currentElement = nextText; + var nextStringText = '' + nextText; + if (nextStringText !== this._stringText) { + // TODO: Save this as pending props and use performUpdateIfNecessary + // and/or updateComponent to do the actual update for consistency with + // other component types? + this._stringText = nextStringText; + var commentNodes = this.getHostNode(); + DOMChildrenOperations.replaceDelimitedText(commentNodes[0], commentNodes[1], nextStringText); + } + } + }, + + getHostNode: function () { + var hostNode = this._commentNodes; + if (hostNode) { + return hostNode; + } + if (!this._closingComment) { + var openingComment = ReactDOMComponentTree.getNodeFromInstance(this); + var node = openingComment.nextSibling; + while (true) { + !(node != null) + ? true + ? invariant(false, 'Missing closing comment for text component %s', this._domID) + : _prodInvariant('67', this._domID) + : void 0; + if (node.nodeType === 8 && node.nodeValue === ' /react-text ') { + this._closingComment = node; + break; + } + node = node.nextSibling; + } + } + hostNode = [this._hostNode, this._closingComment]; + this._commentNodes = hostNode; + return hostNode; + }, + + unmountComponent: function () { + this._closingComment = null; + this._commentNodes = null; + ReactDOMComponentTree.uncacheNode(this); + }, + }); + + module.exports = ReactDOMTextComponent; + + /***/ + }, + /* 743 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var _prodInvariant = __webpack_require__(5), + _assign = __webpack_require__(8); + + var LinkedValueUtils = __webpack_require__(199); + var ReactDOMComponentTree = __webpack_require__(13); + var ReactUpdates = __webpack_require__(34); + + var invariant = __webpack_require__(2); + var warning = __webpack_require__(3); + + var didWarnValueLink = false; + var didWarnValDefaultVal = false; + + function forceUpdateIfMounted() { + if (this._rootNodeID) { + // DOM component is still mounted; update + ReactDOMTextarea.updateWrapper(this); + } + } + + /** + * Implements a <textarea> host component that allows setting `value`, and + * `defaultValue`. This differs from the traditional DOM API because value is + * usually set as PCDATA children. + * + * If `value` is not supplied (or null/undefined), user actions that affect the + * value will trigger updates to the element. + * + * If `value` is supplied (and not null/undefined), the rendered element will + * not trigger updates to the element. Instead, the `value` prop must change in + * order for the rendered element to be updated. + * + * The rendered element will be initialized with an empty value, the prop + * `defaultValue` if specified, or the children content (deprecated). + */ + var ReactDOMTextarea = { + getHostProps: function (inst, props) { + !(props.dangerouslySetInnerHTML == null) + ? true + ? invariant(false, '`dangerouslySetInnerHTML` does not make sense on <textarea>.') + : _prodInvariant('91') + : void 0; + + // Always set children to the same thing. In IE9, the selection range will + // get reset if `textContent` is mutated. We could add a check in setTextContent + // to only set the value if/when the value differs from the node value (which would + // completely solve this IE9 bug), but Sebastian+Ben seemed to like this solution. + // The value can be a boolean or object so that's why it's forced to be a string. + var hostProps = _assign({}, props, { + value: undefined, + defaultValue: undefined, + children: '' + inst._wrapperState.initialValue, + onChange: inst._wrapperState.onChange, + }); + + return hostProps; + }, + + mountWrapper: function (inst, props) { + if (true) { + LinkedValueUtils.checkPropTypes('textarea', props, inst._currentElement._owner); + if (props.valueLink !== undefined && !didWarnValueLink) { + true + ? warning( + false, + '`valueLink` prop on `textarea` is deprecated; set `value` and `onChange` instead.', + ) + : void 0; + didWarnValueLink = true; + } + if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValDefaultVal) { + true + ? warning( + false, + 'Textarea elements must be either controlled or uncontrolled ' + + '(specify either the value prop, or the defaultValue prop, but not ' + + 'both). Decide between using a controlled or uncontrolled textarea ' + + 'and remove one of these props. More info: ' + + 'https://fb.me/react-controlled-components', + ) + : void 0; + didWarnValDefaultVal = true; + } + } + + var value = LinkedValueUtils.getValue(props); + var initialValue = value; + + // Only bother fetching default value if we're going to use it + if (value == null) { + var defaultValue = props.defaultValue; + // TODO (yungsters): Remove support for children content in <textarea>. + var children = props.children; + if (children != null) { + if (true) { + true + ? warning( + false, + 'Use the `defaultValue` or `value` props instead of setting ' + + 'children on <textarea>.', + ) + : void 0; + } + !(defaultValue == null) + ? true + ? invariant(false, 'If you supply `defaultValue` on a <textarea>, do not pass children.') + : _prodInvariant('92') + : void 0; + if (Array.isArray(children)) { + !(children.length <= 1) + ? true + ? invariant(false, '<textarea> can only have at most one child.') + : _prodInvariant('93') + : void 0; + children = children[0]; + } + + defaultValue = '' + children; + } + if (defaultValue == null) { + defaultValue = ''; + } + initialValue = defaultValue; + } + + inst._wrapperState = { + initialValue: '' + initialValue, + listeners: null, + onChange: _handleChange.bind(inst), + }; + }, + + updateWrapper: function (inst) { + var props = inst._currentElement.props; + + var node = ReactDOMComponentTree.getNodeFromInstance(inst); + var value = LinkedValueUtils.getValue(props); + if (value != null) { + // Cast `value` to a string to ensure the value is set correctly. While + // browsers typically do this as necessary, jsdom doesn't. + var newValue = '' + value; + + // To avoid side effects (such as losing text selection), only set value if changed + if (newValue !== node.value) { + node.value = newValue; + } + if (props.defaultValue == null) { + node.defaultValue = newValue; + } + } + if (props.defaultValue != null) { + node.defaultValue = props.defaultValue; + } + }, + + postMountWrapper: function (inst) { + // This is in postMount because we need access to the DOM node, which is not + // available until after the component has mounted. + var node = ReactDOMComponentTree.getNodeFromInstance(inst); + var textContent = node.textContent; + + // Only set node.value if textContent is equal to the expected + // initial value. In IE10/IE11 there is a bug where the placeholder attribute + // will populate textContent as well. + // https://developer.microsoft.com/microsoft-edge/platform/issues/101525/ + if (textContent === inst._wrapperState.initialValue) { + node.value = textContent; + } + }, + }; + + function _handleChange(event) { + var props = this._currentElement.props; + var returnValue = LinkedValueUtils.executeOnChange(props, event); + ReactUpdates.asap(forceUpdateIfMounted, this); + return returnValue; + } + + module.exports = ReactDOMTextarea; + + /***/ + }, + /* 744 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var _prodInvariant = __webpack_require__(5); + + var invariant = __webpack_require__(2); + + /** + * Return the lowest common ancestor of A and B, or null if they are in + * different trees. + */ + function getLowestCommonAncestor(instA, instB) { + !('_hostNode' in instA) + ? true + ? invariant(false, 'getNodeFromInstance: Invalid argument.') + : _prodInvariant('33') + : void 0; + !('_hostNode' in instB) + ? true + ? invariant(false, 'getNodeFromInstance: Invalid argument.') + : _prodInvariant('33') + : void 0; + + var depthA = 0; + for (var tempA = instA; tempA; tempA = tempA._hostParent) { + depthA++; + } + var depthB = 0; + for (var tempB = instB; tempB; tempB = tempB._hostParent) { + depthB++; + } + + // If A is deeper, crawl up. + while (depthA - depthB > 0) { + instA = instA._hostParent; + depthA--; + } + + // If B is deeper, crawl up. + while (depthB - depthA > 0) { + instB = instB._hostParent; + depthB--; + } + + // Walk in lockstep until we find a match. + var depth = depthA; + while (depth--) { + if (instA === instB) { + return instA; + } + instA = instA._hostParent; + instB = instB._hostParent; + } + return null; + } + + /** + * Return if A is an ancestor of B. + */ + function isAncestor(instA, instB) { + !('_hostNode' in instA) + ? true + ? invariant(false, 'isAncestor: Invalid argument.') + : _prodInvariant('35') + : void 0; + !('_hostNode' in instB) + ? true + ? invariant(false, 'isAncestor: Invalid argument.') + : _prodInvariant('35') + : void 0; + + while (instB) { + if (instB === instA) { + return true; + } + instB = instB._hostParent; + } + return false; + } + + /** + * Return the parent instance of the passed-in instance. + */ + function getParentInstance(inst) { + !('_hostNode' in inst) + ? true + ? invariant(false, 'getParentInstance: Invalid argument.') + : _prodInvariant('36') + : void 0; + + return inst._hostParent; + } + + /** + * Simulates the traversal of a two-phase, capture/bubble event dispatch. + */ + function traverseTwoPhase(inst, fn, arg) { + var path = []; + while (inst) { + path.push(inst); + inst = inst._hostParent; + } + var i; + for (i = path.length; i-- > 0; ) { + fn(path[i], 'captured', arg); + } + for (i = 0; i < path.length; i++) { + fn(path[i], 'bubbled', arg); + } + } + + /** + * Traverses the ID hierarchy and invokes the supplied `cb` on any IDs that + * should would receive a `mouseEnter` or `mouseLeave` event. + * + * Does not invoke the callback on the nearest common ancestor because nothing + * "entered" or "left" that element. + */ + function traverseEnterLeave(from, to, fn, argFrom, argTo) { + var common = from && to ? getLowestCommonAncestor(from, to) : null; + var pathFrom = []; + while (from && from !== common) { + pathFrom.push(from); + from = from._hostParent; + } + var pathTo = []; + while (to && to !== common) { + pathTo.push(to); + to = to._hostParent; + } + var i; + for (i = 0; i < pathFrom.length; i++) { + fn(pathFrom[i], 'bubbled', argFrom); + } + for (i = pathTo.length; i-- > 0; ) { + fn(pathTo[i], 'captured', argTo); + } + } + + module.exports = { + isAncestor: isAncestor, + getLowestCommonAncestor: getLowestCommonAncestor, + getParentInstance: getParentInstance, + traverseTwoPhase: traverseTwoPhase, + traverseEnterLeave: traverseEnterLeave, + }; + + /***/ + }, + /* 745 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var DOMProperty = __webpack_require__(66); + var EventPluginRegistry = __webpack_require__(115); + var ReactComponentTreeHook = __webpack_require__(19); + + var warning = __webpack_require__(3); + + if (true) { + var reactProps = { + children: true, + dangerouslySetInnerHTML: true, + key: true, + ref: true, + + autoFocus: true, + defaultValue: true, + valueLink: true, + defaultChecked: true, + checkedLink: true, + innerHTML: true, + suppressContentEditableWarning: true, + onFocusIn: true, + onFocusOut: true, + }; + var warnedProperties = {}; + + var validateProperty = function (tagName, name, debugID) { + if (DOMProperty.properties.hasOwnProperty(name) || DOMProperty.isCustomAttribute(name)) { + return true; + } + if ( + (reactProps.hasOwnProperty(name) && reactProps[name]) || + (warnedProperties.hasOwnProperty(name) && warnedProperties[name]) + ) { + return true; + } + if (EventPluginRegistry.registrationNameModules.hasOwnProperty(name)) { + return true; + } + warnedProperties[name] = true; + var lowerCasedName = name.toLowerCase(); + + // data-* attributes should be lowercase; suggest the lowercase version + var standardName = DOMProperty.isCustomAttribute(lowerCasedName) + ? lowerCasedName + : DOMProperty.getPossibleStandardName.hasOwnProperty(lowerCasedName) + ? DOMProperty.getPossibleStandardName[lowerCasedName] + : null; + + var registrationName = EventPluginRegistry.possibleRegistrationNames.hasOwnProperty(lowerCasedName) + ? EventPluginRegistry.possibleRegistrationNames[lowerCasedName] + : null; + + if (standardName != null) { + true + ? warning( + false, + 'Unknown DOM property %s. Did you mean %s?%s', + name, + standardName, + ReactComponentTreeHook.getStackAddendumByID(debugID), + ) + : void 0; + return true; + } else if (registrationName != null) { + true + ? warning( + false, + 'Unknown event handler property %s. Did you mean `%s`?%s', + name, + registrationName, + ReactComponentTreeHook.getStackAddendumByID(debugID), + ) + : void 0; + return true; + } else { + // We were unable to guess which prop the user intended. + // It is likely that the user was just blindly spreading/forwarding props + // Components should be careful to only render valid props/attributes. + // Warning will be invoked in warnUnknownProperties to allow grouping. + return false; + } + }; + } + + var warnUnknownProperties = function (debugID, element) { + var unknownProps = []; + for (var key in element.props) { + var isValid = validateProperty(element.type, key, debugID); + if (!isValid) { + unknownProps.push(key); + } + } + + var unknownPropString = unknownProps + .map(function (prop) { + return '`' + prop + '`'; + }) + .join(', '); + + if (unknownProps.length === 1) { + true + ? warning( + false, + 'Unknown prop %s on <%s> tag. Remove this prop from the element. ' + + 'For details, see https://fb.me/react-unknown-prop%s', + unknownPropString, + element.type, + ReactComponentTreeHook.getStackAddendumByID(debugID), + ) + : void 0; + } else if (unknownProps.length > 1) { + true + ? warning( + false, + 'Unknown props %s on <%s> tag. Remove these props from the element. ' + + 'For details, see https://fb.me/react-unknown-prop%s', + unknownPropString, + element.type, + ReactComponentTreeHook.getStackAddendumByID(debugID), + ) + : void 0; + } + }; + + function handleElement(debugID, element) { + if (element == null || typeof element.type !== 'string') { + return; + } + if (element.type.indexOf('-') >= 0 || element.props.is) { + return; + } + warnUnknownProperties(debugID, element); + } + + var ReactDOMUnknownPropertyHook = { + onBeforeMountComponent: function (debugID, element) { + handleElement(debugID, element); + }, + onBeforeUpdateComponent: function (debugID, element) { + handleElement(debugID, element); + }, + }; + + module.exports = ReactDOMUnknownPropertyHook; + + /***/ + }, + /* 746 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2014-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + // The Symbol used to tag the ReactElement type. If there is no native Symbol + // nor polyfill, then a plain number is used for performance. + + var REACT_ELEMENT_TYPE = + (typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.element')) || 0xeac7; + + module.exports = REACT_ELEMENT_TYPE; + + /***/ + }, + /* 747 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var EventPluginHub = __webpack_require__(98); + + function runEventQueueInBatch(events) { + EventPluginHub.enqueueEvents(events); + EventPluginHub.processEventQueue(false); + } + + var ReactEventEmitterMixin = { + /** + * Streams a fired top-level event to `EventPluginHub` where plugins have the + * opportunity to create `ReactEvent`s to be dispatched. + */ + handleTopLevel: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) { + var events = EventPluginHub.extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget); + runEventQueueInBatch(events); + }, + }; + + module.exports = ReactEventEmitterMixin; + + /***/ + }, + /* 748 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var _assign = __webpack_require__(8); + + var EventListener = __webpack_require__(289); + var ExecutionEnvironment = __webpack_require__(14); + var PooledClass = __webpack_require__(85); + var ReactDOMComponentTree = __webpack_require__(13); + var ReactUpdates = __webpack_require__(34); + + var getEventTarget = __webpack_require__(208); + var getUnboundedScrollPosition = __webpack_require__(655); + + /** + * Find the deepest React component completely containing the root of the + * passed-in instance (for use when entire React trees are nested within each + * other). If React trees are not nested, returns null. + */ + function findParent(inst) { + // TODO: It may be a good idea to cache this to prevent unnecessary DOM + // traversal, but caching is difficult to do correctly without using a + // mutation observer to listen for all DOM changes. + while (inst._hostParent) { + inst = inst._hostParent; + } + var rootNode = ReactDOMComponentTree.getNodeFromInstance(inst); + var container = rootNode.parentNode; + return ReactDOMComponentTree.getClosestInstanceFromNode(container); + } + + // Used to store ancestor hierarchy in top level callback + function TopLevelCallbackBookKeeping(topLevelType, nativeEvent) { + this.topLevelType = topLevelType; + this.nativeEvent = nativeEvent; + this.ancestors = []; + } + _assign(TopLevelCallbackBookKeeping.prototype, { + destructor: function () { + this.topLevelType = null; + this.nativeEvent = null; + this.ancestors.length = 0; + }, + }); + PooledClass.addPoolingTo(TopLevelCallbackBookKeeping, PooledClass.twoArgumentPooler); + + function handleTopLevelImpl(bookKeeping) { + var nativeEventTarget = getEventTarget(bookKeeping.nativeEvent); + var targetInst = ReactDOMComponentTree.getClosestInstanceFromNode(nativeEventTarget); + + // Loop through the hierarchy, in case there's any nested components. + // It's important that we build the array of ancestors before calling any + // event handlers, because event handlers can modify the DOM, leading to + // inconsistencies with ReactMount's node cache. See #1105. + var ancestor = targetInst; + do { + bookKeeping.ancestors.push(ancestor); + ancestor = ancestor && findParent(ancestor); + } while (ancestor); + + for (var i = 0; i < bookKeeping.ancestors.length; i++) { + targetInst = bookKeeping.ancestors[i]; + ReactEventListener._handleTopLevel( + bookKeeping.topLevelType, + targetInst, + bookKeeping.nativeEvent, + getEventTarget(bookKeeping.nativeEvent), + ); + } + } + + function scrollValueMonitor(cb) { + var scrollPosition = getUnboundedScrollPosition(window); + cb(scrollPosition); + } + + var ReactEventListener = { + _enabled: true, + _handleTopLevel: null, + + WINDOW_HANDLE: ExecutionEnvironment.canUseDOM ? window : null, + + setHandleTopLevel: function (handleTopLevel) { + ReactEventListener._handleTopLevel = handleTopLevel; + }, + + setEnabled: function (enabled) { + ReactEventListener._enabled = !!enabled; + }, + + isEnabled: function () { + return ReactEventListener._enabled; + }, + + /** + * Traps top-level events by using event bubbling. + * + * @param {string} topLevelType Record from `EventConstants`. + * @param {string} handlerBaseName Event name (e.g. "click"). + * @param {object} element Element on which to attach listener. + * @return {?object} An object with a remove function which will forcefully + * remove the listener. + * @internal + */ + trapBubbledEvent: function (topLevelType, handlerBaseName, element) { + if (!element) { + return null; + } + return EventListener.listen( + element, + handlerBaseName, + ReactEventListener.dispatchEvent.bind(null, topLevelType), + ); + }, + + /** + * Traps a top-level event by using event capturing. + * + * @param {string} topLevelType Record from `EventConstants`. + * @param {string} handlerBaseName Event name (e.g. "click"). + * @param {object} element Element on which to attach listener. + * @return {?object} An object with a remove function which will forcefully + * remove the listener. + * @internal + */ + trapCapturedEvent: function (topLevelType, handlerBaseName, element) { + if (!element) { + return null; + } + return EventListener.capture( + element, + handlerBaseName, + ReactEventListener.dispatchEvent.bind(null, topLevelType), + ); + }, + + monitorScrollValue: function (refresh) { + var callback = scrollValueMonitor.bind(null, refresh); + EventListener.listen(window, 'scroll', callback); + }, + + dispatchEvent: function (topLevelType, nativeEvent) { + if (!ReactEventListener._enabled) { + return; + } + + var bookKeeping = TopLevelCallbackBookKeeping.getPooled(topLevelType, nativeEvent); + try { + // Event queue being processed in the same cycle allows + // `preventDefault`. + ReactUpdates.batchedUpdates(handleTopLevelImpl, bookKeeping); + } finally { + TopLevelCallbackBookKeeping.release(bookKeeping); + } + }, + }; + + module.exports = ReactEventListener; + + /***/ + }, + /* 749 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2016-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + var history = []; + + var ReactHostOperationHistoryHook = { + onHostOperation: function (operation) { + history.push(operation); + }, + clearHistory: function () { + if (ReactHostOperationHistoryHook._preventClearing) { + // Should only be used for tests. + return; + } + + history = []; + }, + getHistory: function () { + return history; + }, + }; + + module.exports = ReactHostOperationHistoryHook; + + /***/ + }, + /* 750 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var DOMProperty = __webpack_require__(66); + var EventPluginHub = __webpack_require__(98); + var EventPluginUtils = __webpack_require__(197); + var ReactComponentEnvironment = __webpack_require__(200); + var ReactEmptyComponent = __webpack_require__(316); + var ReactBrowserEventEmitter = __webpack_require__(116); + var ReactHostComponent = __webpack_require__(318); + var ReactUpdates = __webpack_require__(34); + + var ReactInjection = { + Component: ReactComponentEnvironment.injection, + DOMProperty: DOMProperty.injection, + EmptyComponent: ReactEmptyComponent.injection, + EventPluginHub: EventPluginHub.injection, + EventPluginUtils: EventPluginUtils.injection, + EventEmitter: ReactBrowserEventEmitter.injection, + HostComponent: ReactHostComponent.injection, + Updates: ReactUpdates.injection, + }; + + module.exports = ReactInjection; + + /***/ + }, + /* 751 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2016-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + var warning = __webpack_require__(3); + + if (true) { + var processingChildContext = false; + + var warnInvalidSetState = function () { + true + ? warning( + !processingChildContext, + 'setState(...): Cannot call setState() inside getChildContext()', + ) + : void 0; + }; + } + + var ReactInvalidSetStateWarningHook = { + onBeginProcessingChildContext: function () { + processingChildContext = true; + }, + onEndProcessingChildContext: function () { + processingChildContext = false; + }, + onSetState: function () { + warnInvalidSetState(); + }, + }; + + module.exports = ReactInvalidSetStateWarningHook; + + /***/ + }, + /* 752 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var _prodInvariant = __webpack_require__(5); + + var ReactComponentEnvironment = __webpack_require__(200); + var ReactInstanceMap = __webpack_require__(100); + var ReactInstrumentation = __webpack_require__(33); + + var ReactCurrentOwner = __webpack_require__(54); + var ReactReconciler = __webpack_require__(67); + var ReactChildReconciler = __webpack_require__(730); + + var emptyFunction = __webpack_require__(40); + var flattenChildren = __webpack_require__(779); + var invariant = __webpack_require__(2); + + /** + * Make an update for markup to be rendered and inserted at a supplied index. + * + * @param {string} markup Markup that renders into an element. + * @param {number} toIndex Destination index. + * @private + */ + function makeInsertMarkup(markup, afterNode, toIndex) { + // NOTE: Null values reduce hidden classes. + return { + type: 'INSERT_MARKUP', + content: markup, + fromIndex: null, + fromNode: null, + toIndex: toIndex, + afterNode: afterNode, + }; + } + + /** + * Make an update for moving an existing element to another index. + * + * @param {number} fromIndex Source index of the existing element. + * @param {number} toIndex Destination index of the element. + * @private + */ + function makeMove(child, afterNode, toIndex) { + // NOTE: Null values reduce hidden classes. + return { + type: 'MOVE_EXISTING', + content: null, + fromIndex: child._mountIndex, + fromNode: ReactReconciler.getHostNode(child), + toIndex: toIndex, + afterNode: afterNode, + }; + } + + /** + * Make an update for removing an element at an index. + * + * @param {number} fromIndex Index of the element to remove. + * @private + */ + function makeRemove(child, node) { + // NOTE: Null values reduce hidden classes. + return { + type: 'REMOVE_NODE', + content: null, + fromIndex: child._mountIndex, + fromNode: node, + toIndex: null, + afterNode: null, + }; + } + + /** + * Make an update for setting the markup of a node. + * + * @param {string} markup Markup that renders into an element. + * @private + */ + function makeSetMarkup(markup) { + // NOTE: Null values reduce hidden classes. + return { + type: 'SET_MARKUP', + content: markup, + fromIndex: null, + fromNode: null, + toIndex: null, + afterNode: null, + }; + } + + /** + * Make an update for setting the text content. + * + * @param {string} textContent Text content to set. + * @private + */ + function makeTextContent(textContent) { + // NOTE: Null values reduce hidden classes. + return { + type: 'TEXT_CONTENT', + content: textContent, + fromIndex: null, + fromNode: null, + toIndex: null, + afterNode: null, + }; + } + + /** + * Push an update, if any, onto the queue. Creates a new queue if none is + * passed and always returns the queue. Mutative. + */ + function enqueue(queue, update) { + if (update) { + queue = queue || []; + queue.push(update); + } + return queue; + } + + /** + * Processes any enqueued updates. + * + * @private + */ + function processQueue(inst, updateQueue) { + ReactComponentEnvironment.processChildrenUpdates(inst, updateQueue); + } + + var setChildrenForInstrumentation = emptyFunction; + if (true) { + var getDebugID = function (inst) { + if (!inst._debugID) { + // Check for ART-like instances. TODO: This is silly/gross. + var internal; + if ((internal = ReactInstanceMap.get(inst))) { + inst = internal; + } + } + return inst._debugID; + }; + setChildrenForInstrumentation = function (children) { + var debugID = getDebugID(this); + // TODO: React Native empty components are also multichild. + // This means they still get into this method but don't have _debugID. + if (debugID !== 0) { + ReactInstrumentation.debugTool.onSetChildren( + debugID, + children + ? Object.keys(children).map(function (key) { + return children[key]._debugID; + }) + : [], + ); + } + }; + } + + /** + * ReactMultiChild are capable of reconciling multiple children. + * + * @class ReactMultiChild + * @internal + */ + var ReactMultiChild = { + /** + * Provides common functionality for components that must reconcile multiple + * children. This is used by `ReactDOMComponent` to mount, update, and + * unmount child components. + * + * @lends {ReactMultiChild.prototype} + */ + Mixin: { + _reconcilerInstantiateChildren: function (nestedChildren, transaction, context) { + if (true) { + var selfDebugID = getDebugID(this); + if (this._currentElement) { + try { + ReactCurrentOwner.current = this._currentElement._owner; + return ReactChildReconciler.instantiateChildren( + nestedChildren, + transaction, + context, + selfDebugID, + ); + } finally { + ReactCurrentOwner.current = null; + } + } + } + return ReactChildReconciler.instantiateChildren(nestedChildren, transaction, context); + }, + + _reconcilerUpdateChildren: function ( + prevChildren, + nextNestedChildrenElements, + mountImages, + removedNodes, + transaction, + context, + ) { + var nextChildren; + var selfDebugID = 0; + if (true) { + selfDebugID = getDebugID(this); + if (this._currentElement) { + try { + ReactCurrentOwner.current = this._currentElement._owner; + nextChildren = flattenChildren(nextNestedChildrenElements, selfDebugID); + } finally { + ReactCurrentOwner.current = null; + } + ReactChildReconciler.updateChildren( + prevChildren, + nextChildren, + mountImages, + removedNodes, + transaction, + this, + this._hostContainerInfo, + context, + selfDebugID, + ); + return nextChildren; + } + } + nextChildren = flattenChildren(nextNestedChildrenElements, selfDebugID); + ReactChildReconciler.updateChildren( + prevChildren, + nextChildren, + mountImages, + removedNodes, + transaction, + this, + this._hostContainerInfo, + context, + selfDebugID, + ); + return nextChildren; + }, + + /** + * Generates a "mount image" for each of the supplied children. In the case + * of `ReactDOMComponent`, a mount image is a string of markup. + * + * @param {?object} nestedChildren Nested child maps. + * @return {array} An array of mounted representations. + * @internal + */ + mountChildren: function (nestedChildren, transaction, context) { + var children = this._reconcilerInstantiateChildren(nestedChildren, transaction, context); + this._renderedChildren = children; + + var mountImages = []; + var index = 0; + for (var name in children) { + if (children.hasOwnProperty(name)) { + var child = children[name]; + var selfDebugID = 0; + if (true) { + selfDebugID = getDebugID(this); + } + var mountImage = ReactReconciler.mountComponent( + child, + transaction, + this, + this._hostContainerInfo, + context, + selfDebugID, + ); + child._mountIndex = index++; + mountImages.push(mountImage); + } + } + + if (true) { + setChildrenForInstrumentation.call(this, children); + } + + return mountImages; + }, + + /** + * Replaces any rendered children with a text content string. + * + * @param {string} nextContent String of content. + * @internal + */ + updateTextContent: function (nextContent) { + var prevChildren = this._renderedChildren; + // Remove any rendered children. + ReactChildReconciler.unmountChildren(prevChildren, false); + for (var name in prevChildren) { + if (prevChildren.hasOwnProperty(name)) { + true + ? true + ? invariant(false, 'updateTextContent called on non-empty component.') + : _prodInvariant('118') + : void 0; + } + } + // Set new text content. + var updates = [makeTextContent(nextContent)]; + processQueue(this, updates); + }, + + /** + * Replaces any rendered children with a markup string. + * + * @param {string} nextMarkup String of markup. + * @internal + */ + updateMarkup: function (nextMarkup) { + var prevChildren = this._renderedChildren; + // Remove any rendered children. + ReactChildReconciler.unmountChildren(prevChildren, false); + for (var name in prevChildren) { + if (prevChildren.hasOwnProperty(name)) { + true + ? true + ? invariant(false, 'updateTextContent called on non-empty component.') + : _prodInvariant('118') + : void 0; + } + } + var updates = [makeSetMarkup(nextMarkup)]; + processQueue(this, updates); + }, + + /** + * Updates the rendered children with new children. + * + * @param {?object} nextNestedChildrenElements Nested child element maps. + * @param {ReactReconcileTransaction} transaction + * @internal + */ + updateChildren: function (nextNestedChildrenElements, transaction, context) { + // Hook used by React ART + this._updateChildren(nextNestedChildrenElements, transaction, context); + }, + + /** + * @param {?object} nextNestedChildrenElements Nested child element maps. + * @param {ReactReconcileTransaction} transaction + * @final + * @protected + */ + _updateChildren: function (nextNestedChildrenElements, transaction, context) { + var prevChildren = this._renderedChildren; + var removedNodes = {}; + var mountImages = []; + var nextChildren = this._reconcilerUpdateChildren( + prevChildren, + nextNestedChildrenElements, + mountImages, + removedNodes, + transaction, + context, + ); + if (!nextChildren && !prevChildren) { + return; + } + var updates = null; + var name; + // `nextIndex` will increment for each child in `nextChildren`, but + // `lastIndex` will be the last index visited in `prevChildren`. + var nextIndex = 0; + var lastIndex = 0; + // `nextMountIndex` will increment for each newly mounted child. + var nextMountIndex = 0; + var lastPlacedNode = null; + for (name in nextChildren) { + if (!nextChildren.hasOwnProperty(name)) { + continue; + } + var prevChild = prevChildren && prevChildren[name]; + var nextChild = nextChildren[name]; + if (prevChild === nextChild) { + updates = enqueue(updates, this.moveChild(prevChild, lastPlacedNode, nextIndex, lastIndex)); + lastIndex = Math.max(prevChild._mountIndex, lastIndex); + prevChild._mountIndex = nextIndex; + } else { + if (prevChild) { + // Update `lastIndex` before `_mountIndex` gets unset by unmounting. + lastIndex = Math.max(prevChild._mountIndex, lastIndex); + // The `removedNodes` loop below will actually remove the child. + } + // The child must be instantiated before it's mounted. + updates = enqueue( + updates, + this._mountChildAtIndex( + nextChild, + mountImages[nextMountIndex], + lastPlacedNode, + nextIndex, + transaction, + context, + ), + ); + nextMountIndex++; + } + nextIndex++; + lastPlacedNode = ReactReconciler.getHostNode(nextChild); + } + // Remove children that are no longer present. + for (name in removedNodes) { + if (removedNodes.hasOwnProperty(name)) { + updates = enqueue(updates, this._unmountChild(prevChildren[name], removedNodes[name])); + } + } + if (updates) { + processQueue(this, updates); + } + this._renderedChildren = nextChildren; + + if (true) { + setChildrenForInstrumentation.call(this, nextChildren); + } + }, + + /** + * Unmounts all rendered children. This should be used to clean up children + * when this component is unmounted. It does not actually perform any + * backend operations. + * + * @internal + */ + unmountChildren: function (safely) { + var renderedChildren = this._renderedChildren; + ReactChildReconciler.unmountChildren(renderedChildren, safely); + this._renderedChildren = null; + }, + + /** + * Moves a child component to the supplied index. + * + * @param {ReactComponent} child Component to move. + * @param {number} toIndex Destination index of the element. + * @param {number} lastIndex Last index visited of the siblings of `child`. + * @protected + */ + moveChild: function (child, afterNode, toIndex, lastIndex) { + // If the index of `child` is less than `lastIndex`, then it needs to + // be moved. Otherwise, we do not need to move it because a child will be + // inserted or moved before `child`. + if (child._mountIndex < lastIndex) { + return makeMove(child, afterNode, toIndex); + } + }, + + /** + * Creates a child component. + * + * @param {ReactComponent} child Component to create. + * @param {string} mountImage Markup to insert. + * @protected + */ + createChild: function (child, afterNode, mountImage) { + return makeInsertMarkup(mountImage, afterNode, child._mountIndex); + }, + + /** + * Removes a child component. + * + * @param {ReactComponent} child Child to remove. + * @protected + */ + removeChild: function (child, node) { + return makeRemove(child, node); + }, + + /** + * Mounts a child with the supplied name. + * + * NOTE: This is part of `updateChildren` and is here for readability. + * + * @param {ReactComponent} child Component to mount. + * @param {string} name Name of the child. + * @param {number} index Index at which to insert the child. + * @param {ReactReconcileTransaction} transaction + * @private + */ + _mountChildAtIndex: function (child, mountImage, afterNode, index, transaction, context) { + child._mountIndex = index; + return this.createChild(child, afterNode, mountImage); + }, + + /** + * Unmounts a rendered child. + * + * NOTE: This is part of `updateChildren` and is here for readability. + * + * @param {ReactComponent} child Component to unmount. + * @private + */ + _unmountChild: function (child, node) { + var update = this.removeChild(child, node); + child._mountIndex = null; + return update; + }, + }, + }; + + module.exports = ReactMultiChild; + + /***/ + }, + /* 753 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + var _prodInvariant = __webpack_require__(5); + + var invariant = __webpack_require__(2); + + /** + * @param {?object} object + * @return {boolean} True if `object` is a valid owner. + * @final + */ + function isValidOwner(object) { + return !!(object && typeof object.attachRef === 'function' && typeof object.detachRef === 'function'); + } + + /** + * ReactOwners are capable of storing references to owned components. + * + * All components are capable of //being// referenced by owner components, but + * only ReactOwner components are capable of //referencing// owned components. + * The named reference is known as a "ref". + * + * Refs are available when mounted and updated during reconciliation. + * + * var MyComponent = React.createClass({ + * render: function() { + * return ( + * <div onClick={this.handleClick}> + * <CustomComponent ref="custom" /> + * </div> + * ); + * }, + * handleClick: function() { + * this.refs.custom.handleClick(); + * }, + * componentDidMount: function() { + * this.refs.custom.initialize(); + * } + * }); + * + * Refs should rarely be used. When refs are used, they should only be done to + * control data that is not handled by React's data flow. + * + * @class ReactOwner + */ + var ReactOwner = { + /** + * Adds a component by ref to an owner component. + * + * @param {ReactComponent} component Component to reference. + * @param {string} ref Name by which to refer to the component. + * @param {ReactOwner} owner Component on which to record the ref. + * @final + * @internal + */ + addComponentAsRefTo: function (component, ref, owner) { + !isValidOwner(owner) + ? true + ? invariant( + false, + "addComponentAsRefTo(...): Only a ReactOwner can have refs. You might be adding a ref to a component that was not created inside a component's `render` method, or you have multiple copies of React loaded (details: https://fb.me/react-refs-must-have-owner).", + ) + : _prodInvariant('119') + : void 0; + owner.attachRef(ref, component); + }, + + /** + * Removes a component by ref from an owner component. + * + * @param {ReactComponent} component Component to dereference. + * @param {string} ref Name of the ref to remove. + * @param {ReactOwner} owner Component on which the ref is recorded. + * @final + * @internal + */ + removeComponentAsRefFrom: function (component, ref, owner) { + !isValidOwner(owner) + ? true + ? invariant( + false, + "removeComponentAsRefFrom(...): Only a ReactOwner can have refs. You might be removing a ref to a component that was not created inside a component's `render` method, or you have multiple copies of React loaded (details: https://fb.me/react-refs-must-have-owner).", + ) + : _prodInvariant('120') + : void 0; + var ownerPublicInstance = owner.getPublicInstance(); + // Check that `component`'s owner is still alive and that `component` is still the current ref + // because we do not want to detach the ref if another component stole it. + if (ownerPublicInstance && ownerPublicInstance.refs[ref] === component.getPublicInstance()) { + owner.detachRef(ref); + } + }, + }; + + module.exports = ReactOwner; + + /***/ + }, + /* 754 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2016-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + var _assign = __webpack_require__(8); + + var _extends = + _assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + var ReactDebugTool = __webpack_require__(314); + var warning = __webpack_require__(3); + var alreadyWarned = false; + + function roundFloat(val) { + var base = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2; + + var n = Math.pow(10, base); + return Math.floor(val * n) / n; + } + + // Flow type definition of console.table is too strict right now, see + // https://github.com/facebook/flow/pull/2353 for updates + function consoleTable(table) { + console.table(table); + } + + function warnInProduction() { + if (alreadyWarned) { + return; + } + alreadyWarned = true; + if (typeof console !== 'undefined') { + console.error( + 'ReactPerf is not supported in the production builds of React. ' + + 'To collect measurements, please use the development build of React instead.', + ); + } + } + + function getLastMeasurements() { + if (false) { + warnInProduction(); + return []; + } + + return ReactDebugTool.getFlushHistory(); + } + + function getExclusive() { + var flushHistory = + arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getLastMeasurements(); + + if (false) { + warnInProduction(); + return []; + } + + var aggregatedStats = {}; + var affectedIDs = {}; + + function updateAggregatedStats(treeSnapshot, instanceID, timerType, applyUpdate) { + var displayName = treeSnapshot[instanceID].displayName; + + var key = displayName; + var stats = aggregatedStats[key]; + if (!stats) { + affectedIDs[key] = {}; + stats = aggregatedStats[key] = { + key: key, + instanceCount: 0, + counts: {}, + durations: {}, + totalDuration: 0, + }; + } + if (!stats.durations[timerType]) { + stats.durations[timerType] = 0; + } + if (!stats.counts[timerType]) { + stats.counts[timerType] = 0; + } + affectedIDs[key][instanceID] = true; + applyUpdate(stats); + } + + flushHistory.forEach(function (flush) { + var measurements = flush.measurements, + treeSnapshot = flush.treeSnapshot; + + measurements.forEach(function (measurement) { + var duration = measurement.duration, + instanceID = measurement.instanceID, + timerType = measurement.timerType; + + updateAggregatedStats(treeSnapshot, instanceID, timerType, function (stats) { + stats.totalDuration += duration; + stats.durations[timerType] += duration; + stats.counts[timerType]++; + }); + }); + }); + + return Object.keys(aggregatedStats) + .map(function (key) { + return _extends({}, aggregatedStats[key], { + instanceCount: Object.keys(affectedIDs[key]).length, + }); + }) + .sort(function (a, b) { + return b.totalDuration - a.totalDuration; + }); + } + + function getInclusive() { + var flushHistory = + arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getLastMeasurements(); + + if (false) { + warnInProduction(); + return []; + } + + var aggregatedStats = {}; + var affectedIDs = {}; + + function updateAggregatedStats(treeSnapshot, instanceID, applyUpdate) { + var _treeSnapshot$instanc = treeSnapshot[instanceID], + displayName = _treeSnapshot$instanc.displayName, + ownerID = _treeSnapshot$instanc.ownerID; + + var owner = treeSnapshot[ownerID]; + var key = (owner ? owner.displayName + ' > ' : '') + displayName; + var stats = aggregatedStats[key]; + if (!stats) { + affectedIDs[key] = {}; + stats = aggregatedStats[key] = { + key: key, + instanceCount: 0, + inclusiveRenderDuration: 0, + renderCount: 0, + }; + } + affectedIDs[key][instanceID] = true; + applyUpdate(stats); + } + + var isCompositeByID = {}; + flushHistory.forEach(function (flush) { + var measurements = flush.measurements; + + measurements.forEach(function (measurement) { + var instanceID = measurement.instanceID, + timerType = measurement.timerType; + + if (timerType !== 'render') { + return; + } + isCompositeByID[instanceID] = true; + }); + }); + + flushHistory.forEach(function (flush) { + var measurements = flush.measurements, + treeSnapshot = flush.treeSnapshot; + + measurements.forEach(function (measurement) { + var duration = measurement.duration, + instanceID = measurement.instanceID, + timerType = measurement.timerType; + + if (timerType !== 'render') { + return; + } + updateAggregatedStats(treeSnapshot, instanceID, function (stats) { + stats.renderCount++; + }); + var nextParentID = instanceID; + while (nextParentID) { + // As we traverse parents, only count inclusive time towards composites. + // We know something is a composite if its render() was called. + if (isCompositeByID[nextParentID]) { + updateAggregatedStats(treeSnapshot, nextParentID, function (stats) { + stats.inclusiveRenderDuration += duration; + }); + } + nextParentID = treeSnapshot[nextParentID].parentID; + } + }); + }); + + return Object.keys(aggregatedStats) + .map(function (key) { + return _extends({}, aggregatedStats[key], { + instanceCount: Object.keys(affectedIDs[key]).length, + }); + }) + .sort(function (a, b) { + return b.inclusiveRenderDuration - a.inclusiveRenderDuration; + }); + } + + function getWasted() { + var flushHistory = + arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getLastMeasurements(); + + if (false) { + warnInProduction(); + return []; + } + + var aggregatedStats = {}; + var affectedIDs = {}; + + function updateAggregatedStats(treeSnapshot, instanceID, applyUpdate) { + var _treeSnapshot$instanc2 = treeSnapshot[instanceID], + displayName = _treeSnapshot$instanc2.displayName, + ownerID = _treeSnapshot$instanc2.ownerID; + + var owner = treeSnapshot[ownerID]; + var key = (owner ? owner.displayName + ' > ' : '') + displayName; + var stats = aggregatedStats[key]; + if (!stats) { + affectedIDs[key] = {}; + stats = aggregatedStats[key] = { + key: key, + instanceCount: 0, + inclusiveRenderDuration: 0, + renderCount: 0, + }; + } + affectedIDs[key][instanceID] = true; + applyUpdate(stats); + } + + flushHistory.forEach(function (flush) { + var measurements = flush.measurements, + treeSnapshot = flush.treeSnapshot, + operations = flush.operations; + + var isDefinitelyNotWastedByID = {}; + + // Find host components associated with an operation in this batch. + // Mark all components in their parent tree as definitely not wasted. + operations.forEach(function (operation) { + var instanceID = operation.instanceID; + + var nextParentID = instanceID; + while (nextParentID) { + isDefinitelyNotWastedByID[nextParentID] = true; + nextParentID = treeSnapshot[nextParentID].parentID; + } + }); + + // Find composite components that rendered in this batch. + // These are potential candidates for being wasted renders. + var renderedCompositeIDs = {}; + measurements.forEach(function (measurement) { + var instanceID = measurement.instanceID, + timerType = measurement.timerType; + + if (timerType !== 'render') { + return; + } + renderedCompositeIDs[instanceID] = true; + }); + + measurements.forEach(function (measurement) { + var duration = measurement.duration, + instanceID = measurement.instanceID, + timerType = measurement.timerType; + + if (timerType !== 'render') { + return; + } + + // If there was a DOM update below this component, or it has just been + // mounted, its render() is not considered wasted. + var updateCount = treeSnapshot[instanceID].updateCount; + + if (isDefinitelyNotWastedByID[instanceID] || updateCount === 0) { + return; + } + + // We consider this render() wasted. + updateAggregatedStats(treeSnapshot, instanceID, function (stats) { + stats.renderCount++; + }); + + var nextParentID = instanceID; + while (nextParentID) { + // Any parents rendered during this batch are considered wasted + // unless we previously marked them as dirty. + var isWasted = renderedCompositeIDs[nextParentID] && !isDefinitelyNotWastedByID[nextParentID]; + if (isWasted) { + updateAggregatedStats(treeSnapshot, nextParentID, function (stats) { + stats.inclusiveRenderDuration += duration; + }); + } + nextParentID = treeSnapshot[nextParentID].parentID; + } + }); + }); + + return Object.keys(aggregatedStats) + .map(function (key) { + return _extends({}, aggregatedStats[key], { + instanceCount: Object.keys(affectedIDs[key]).length, + }); + }) + .sort(function (a, b) { + return b.inclusiveRenderDuration - a.inclusiveRenderDuration; + }); + } + + function getOperations() { + var flushHistory = + arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getLastMeasurements(); + + if (false) { + warnInProduction(); + return []; + } + + var stats = []; + flushHistory.forEach(function (flush, flushIndex) { + var operations = flush.operations, + treeSnapshot = flush.treeSnapshot; + + operations.forEach(function (operation) { + var instanceID = operation.instanceID, + type = operation.type, + payload = operation.payload; + var _treeSnapshot$instanc3 = treeSnapshot[instanceID], + displayName = _treeSnapshot$instanc3.displayName, + ownerID = _treeSnapshot$instanc3.ownerID; + + var owner = treeSnapshot[ownerID]; + var key = (owner ? owner.displayName + ' > ' : '') + displayName; + + stats.push({ + flushIndex: flushIndex, + instanceID: instanceID, + key: key, + type: type, + ownerID: ownerID, + payload: payload, + }); + }); + }); + return stats; + } + + function printExclusive(flushHistory) { + if (false) { + warnInProduction(); + return; + } + + var stats = getExclusive(flushHistory); + var table = stats.map(function (item) { + var key = item.key, + instanceCount = item.instanceCount, + totalDuration = item.totalDuration; + + var renderCount = item.counts.render || 0; + var renderDuration = item.durations.render || 0; + return { + Component: key, + 'Total time (ms)': roundFloat(totalDuration), + 'Instance count': instanceCount, + 'Total render time (ms)': roundFloat(renderDuration), + 'Average render time (ms)': renderCount ? roundFloat(renderDuration / renderCount) : undefined, + 'Render count': renderCount, + 'Total lifecycle time (ms)': roundFloat(totalDuration - renderDuration), + }; + }); + consoleTable(table); + } + + function printInclusive(flushHistory) { + if (false) { + warnInProduction(); + return; + } + + var stats = getInclusive(flushHistory); + var table = stats.map(function (item) { + var key = item.key, + instanceCount = item.instanceCount, + inclusiveRenderDuration = item.inclusiveRenderDuration, + renderCount = item.renderCount; + + return { + 'Owner > Component': key, + 'Inclusive render time (ms)': roundFloat(inclusiveRenderDuration), + 'Instance count': instanceCount, + 'Render count': renderCount, + }; + }); + consoleTable(table); + } + + function printWasted(flushHistory) { + if (false) { + warnInProduction(); + return; + } + + var stats = getWasted(flushHistory); + var table = stats.map(function (item) { + var key = item.key, + instanceCount = item.instanceCount, + inclusiveRenderDuration = item.inclusiveRenderDuration, + renderCount = item.renderCount; + + return { + 'Owner > Component': key, + 'Inclusive wasted time (ms)': roundFloat(inclusiveRenderDuration), + 'Instance count': instanceCount, + 'Render count': renderCount, + }; + }); + consoleTable(table); + } + + function printOperations(flushHistory) { + if (false) { + warnInProduction(); + return; + } + + var stats = getOperations(flushHistory); + var table = stats.map(function (stat) { + return { + 'Owner > Node': stat.key, + Operation: stat.type, + Payload: typeof stat.payload === 'object' ? JSON.stringify(stat.payload) : stat.payload, + 'Flush index': stat.flushIndex, + 'Owner Component ID': stat.ownerID, + 'DOM Component ID': stat.instanceID, + }; + }); + consoleTable(table); + } + + var warnedAboutPrintDOM = false; + function printDOM(measurements) { + true + ? warning( + warnedAboutPrintDOM, + '`ReactPerf.printDOM(...)` is deprecated. Use ' + '`ReactPerf.printOperations(...)` instead.', + ) + : void 0; + warnedAboutPrintDOM = true; + return printOperations(measurements); + } + + var warnedAboutGetMeasurementsSummaryMap = false; + function getMeasurementsSummaryMap(measurements) { + true + ? warning( + warnedAboutGetMeasurementsSummaryMap, + '`ReactPerf.getMeasurementsSummaryMap(...)` is deprecated. Use ' + + '`ReactPerf.getWasted(...)` instead.', + ) + : void 0; + warnedAboutGetMeasurementsSummaryMap = true; + return getWasted(measurements); + } + + function start() { + if (false) { + warnInProduction(); + return; + } + + ReactDebugTool.beginProfiling(); + } + + function stop() { + if (false) { + warnInProduction(); + return; + } + + ReactDebugTool.endProfiling(); + } + + function isRunning() { + if (false) { + warnInProduction(); + return false; + } + + return ReactDebugTool.isProfiling(); + } + + var ReactPerfAnalysis = { + getLastMeasurements: getLastMeasurements, + getExclusive: getExclusive, + getInclusive: getInclusive, + getWasted: getWasted, + getOperations: getOperations, + printExclusive: printExclusive, + printInclusive: printInclusive, + printWasted: printWasted, + printOperations: printOperations, + start: start, + stop: stop, + isRunning: isRunning, + // Deprecated: + printDOM: printDOM, + getMeasurementsSummaryMap: getMeasurementsSummaryMap, + }; + + module.exports = ReactPerfAnalysis; + + /***/ + }, + /* 755 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + var ReactPropTypeLocationNames = {}; + + if (true) { + ReactPropTypeLocationNames = { + prop: 'prop', + context: 'context', + childContext: 'child context', + }; + } + + module.exports = ReactPropTypeLocationNames; + + /***/ + }, + /* 756 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var _assign = __webpack_require__(8); + + var CallbackQueue = __webpack_require__(308); + var PooledClass = __webpack_require__(85); + var ReactBrowserEventEmitter = __webpack_require__(116); + var ReactInputSelection = __webpack_require__(319); + var ReactInstrumentation = __webpack_require__(33); + var Transaction = __webpack_require__(142); + var ReactUpdateQueue = __webpack_require__(204); + + /** + * Ensures that, when possible, the selection range (currently selected text + * input) is not disturbed by performing the transaction. + */ + var SELECTION_RESTORATION = { + /** + * @return {Selection} Selection information. + */ + initialize: ReactInputSelection.getSelectionInformation, + /** + * @param {Selection} sel Selection information returned from `initialize`. + */ + close: ReactInputSelection.restoreSelection, + }; + + /** + * Suppresses events (blur/focus) that could be inadvertently dispatched due to + * high level DOM manipulations (like temporarily removing a text input from the + * DOM). + */ + var EVENT_SUPPRESSION = { + /** + * @return {boolean} The enabled status of `ReactBrowserEventEmitter` before + * the reconciliation. + */ + initialize: function () { + var currentlyEnabled = ReactBrowserEventEmitter.isEnabled(); + ReactBrowserEventEmitter.setEnabled(false); + return currentlyEnabled; + }, + + /** + * @param {boolean} previouslyEnabled Enabled status of + * `ReactBrowserEventEmitter` before the reconciliation occurred. `close` + * restores the previous value. + */ + close: function (previouslyEnabled) { + ReactBrowserEventEmitter.setEnabled(previouslyEnabled); + }, + }; + + /** + * Provides a queue for collecting `componentDidMount` and + * `componentDidUpdate` callbacks during the transaction. + */ + var ON_DOM_READY_QUEUEING = { + /** + * Initializes the internal `onDOMReady` queue. + */ + initialize: function () { + this.reactMountReady.reset(); + }, + + /** + * After DOM is flushed, invoke all registered `onDOMReady` callbacks. + */ + close: function () { + this.reactMountReady.notifyAll(); + }, + }; + + /** + * Executed within the scope of the `Transaction` instance. Consider these as + * being member methods, but with an implied ordering while being isolated from + * each other. + */ + var TRANSACTION_WRAPPERS = [SELECTION_RESTORATION, EVENT_SUPPRESSION, ON_DOM_READY_QUEUEING]; + + if (true) { + TRANSACTION_WRAPPERS.push({ + initialize: ReactInstrumentation.debugTool.onBeginFlush, + close: ReactInstrumentation.debugTool.onEndFlush, + }); + } + + /** + * Currently: + * - The order that these are listed in the transaction is critical: + * - Suppresses events. + * - Restores selection range. + * + * Future: + * - Restore document/overflow scroll positions that were unintentionally + * modified via DOM insertions above the top viewport boundary. + * - Implement/integrate with customized constraint based layout system and keep + * track of which dimensions must be remeasured. + * + * @class ReactReconcileTransaction + */ + function ReactReconcileTransaction(useCreateElement) { + this.reinitializeTransaction(); + // Only server-side rendering really needs this option (see + // `ReactServerRendering`), but server-side uses + // `ReactServerRenderingTransaction` instead. This option is here so that it's + // accessible and defaults to false when `ReactDOMComponent` and + // `ReactDOMTextComponent` checks it in `mountComponent`.` + this.renderToStaticMarkup = false; + this.reactMountReady = CallbackQueue.getPooled(null); + this.useCreateElement = useCreateElement; + } + + var Mixin = { + /** + * @see Transaction + * @abstract + * @final + * @return {array<object>} List of operation wrap procedures. + * TODO: convert to array<TransactionWrapper> + */ + getTransactionWrappers: function () { + return TRANSACTION_WRAPPERS; + }, + + /** + * @return {object} The queue to collect `onDOMReady` callbacks with. + */ + getReactMountReady: function () { + return this.reactMountReady; + }, + + /** + * @return {object} The queue to collect React async events. + */ + getUpdateQueue: function () { + return ReactUpdateQueue; + }, + + /** + * Save current transaction state -- if the return value from this method is + * passed to `rollback`, the transaction will be reset to that state. + */ + checkpoint: function () { + // reactMountReady is the our only stateful wrapper + return this.reactMountReady.checkpoint(); + }, + + rollback: function (checkpoint) { + this.reactMountReady.rollback(checkpoint); + }, + + /** + * `PooledClass` looks for this, and will invoke this before allowing this + * instance to be reused. + */ + destructor: function () { + CallbackQueue.release(this.reactMountReady); + this.reactMountReady = null; + }, + }; + + _assign(ReactReconcileTransaction.prototype, Transaction, Mixin); + + PooledClass.addPoolingTo(ReactReconcileTransaction); + + module.exports = ReactReconcileTransaction; + + /***/ + }, + /* 757 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + var ReactOwner = __webpack_require__(753); + + var ReactRef = {}; + + function attachRef(ref, component, owner) { + if (typeof ref === 'function') { + ref(component.getPublicInstance()); + } else { + // Legacy ref + ReactOwner.addComponentAsRefTo(component, ref, owner); + } + } + + function detachRef(ref, component, owner) { + if (typeof ref === 'function') { + ref(null); + } else { + // Legacy ref + ReactOwner.removeComponentAsRefFrom(component, ref, owner); + } + } + + ReactRef.attachRefs = function (instance, element) { + if (element === null || typeof element !== 'object') { + return; + } + var ref = element.ref; + if (ref != null) { + attachRef(ref, instance, element._owner); + } + }; + + ReactRef.shouldUpdateRefs = function (prevElement, nextElement) { + // If either the owner or a `ref` has changed, make sure the newest owner + // has stored a reference to `this`, and the previous owner (if different) + // has forgotten the reference to `this`. We use the element instead + // of the public this.props because the post processing cannot determine + // a ref. The ref conceptually lives on the element. + + // TODO: Should this even be possible? The owner cannot change because + // it's forbidden by shouldUpdateReactComponent. The ref can change + // if you swap the keys of but not the refs. Reconsider where this check + // is made. It probably belongs where the key checking and + // instantiateReactComponent is done. + + var prevRef = null; + var prevOwner = null; + if (prevElement !== null && typeof prevElement === 'object') { + prevRef = prevElement.ref; + prevOwner = prevElement._owner; + } + + var nextRef = null; + var nextOwner = null; + if (nextElement !== null && typeof nextElement === 'object') { + nextRef = nextElement.ref; + nextOwner = nextElement._owner; + } + + return ( + prevRef !== nextRef || + // If owner changes but we have an unchanged function ref, don't update refs + (typeof nextRef === 'string' && nextOwner !== prevOwner) + ); + }; + + ReactRef.detachRefs = function (instance, element) { + if (element === null || typeof element !== 'object') { + return; + } + var ref = element.ref; + if (ref != null) { + detachRef(ref, instance, element._owner); + } + }; + + module.exports = ReactRef; + + /***/ + }, + /* 758 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2014-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var ReactServerBatchingStrategy = { + isBatchingUpdates: false, + batchedUpdates: function (callback) { + // Don't do anything here. During the server rendering we don't want to + // schedule any updates. We will simply ignore them. + }, + }; + + module.exports = ReactServerBatchingStrategy; + + /***/ + }, + /* 759 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var _prodInvariant = __webpack_require__(5); + + var React = __webpack_require__(41); + var ReactDOMContainerInfo = __webpack_require__(312); + var ReactDefaultBatchingStrategy = __webpack_require__(315); + var ReactInstrumentation = __webpack_require__(33); + var ReactMarkupChecksum = __webpack_require__(320); + var ReactReconciler = __webpack_require__(67); + var ReactServerBatchingStrategy = __webpack_require__(758); + var ReactServerRenderingTransaction = __webpack_require__(324); + var ReactUpdates = __webpack_require__(34); + + var emptyObject = __webpack_require__(83); + var instantiateReactComponent = __webpack_require__(209); + var invariant = __webpack_require__(2); + + var pendingTransactions = 0; + + /** + * @param {ReactElement} element + * @return {string} the HTML markup + */ + function renderToStringImpl(element, makeStaticMarkup) { + var transaction; + try { + ReactUpdates.injection.injectBatchingStrategy(ReactServerBatchingStrategy); + + transaction = ReactServerRenderingTransaction.getPooled(makeStaticMarkup); + + pendingTransactions++; + + return transaction.perform(function () { + var componentInstance = instantiateReactComponent(element, true); + var markup = ReactReconciler.mountComponent( + componentInstance, + transaction, + null, + ReactDOMContainerInfo(), + emptyObject, + 0 /* parentDebugID */, + ); + if (true) { + ReactInstrumentation.debugTool.onUnmountComponent(componentInstance._debugID); + } + if (!makeStaticMarkup) { + markup = ReactMarkupChecksum.addChecksumToMarkup(markup); + } + return markup; + }, null); + } finally { + pendingTransactions--; + ReactServerRenderingTransaction.release(transaction); + // Revert to the DOM batching strategy since these two renderers + // currently share these stateful modules. + if (!pendingTransactions) { + ReactUpdates.injection.injectBatchingStrategy(ReactDefaultBatchingStrategy); + } + } + } + + /** + * Render a ReactElement to its initial HTML. This should only be used on the + * server. + * See https://facebook.github.io/react/docs/top-level-api.html#reactdomserver.rendertostring + */ + function renderToString(element) { + !React.isValidElement(element) + ? true + ? invariant(false, 'renderToString(): You must pass a valid ReactElement.') + : _prodInvariant('46') + : void 0; + return renderToStringImpl(element, false); + } + + /** + * Similar to renderToString, except this doesn't create extra DOM attributes + * such as data-react-id that React uses internally. + * See https://facebook.github.io/react/docs/top-level-api.html#reactdomserver.rendertostaticmarkup + */ + function renderToStaticMarkup(element) { + !React.isValidElement(element) + ? true + ? invariant(false, 'renderToStaticMarkup(): You must pass a valid ReactElement.') + : _prodInvariant('47') + : void 0; + return renderToStringImpl(element, true); + } + + module.exports = { + renderToString: renderToString, + renderToStaticMarkup: renderToStaticMarkup, + }; + + /***/ + }, + /* 760 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + var ReactUpdateQueue = __webpack_require__(204); + + var warning = __webpack_require__(3); + + function warnNoop(publicInstance, callerName) { + if (true) { + var constructor = publicInstance.constructor; + true + ? warning( + false, + '%s(...): Can only update a mounting component. ' + + 'This usually means you called %s() outside componentWillMount() on the server. ' + + 'This is a no-op. Please check the code for the %s component.', + callerName, + callerName, + (constructor && (constructor.displayName || constructor.name)) || 'ReactClass', + ) + : void 0; + } + } + + /** + * This is the update queue used for server rendering. + * It delegates to ReactUpdateQueue while server rendering is in progress and + * switches to ReactNoopUpdateQueue after the transaction has completed. + * @class ReactServerUpdateQueue + * @param {Transaction} transaction + */ + + var ReactServerUpdateQueue = (function () { + function ReactServerUpdateQueue(transaction) { + _classCallCheck(this, ReactServerUpdateQueue); + + this.transaction = transaction; + } + + /** + * Checks whether or not this composite component is mounted. + * @param {ReactClass} publicInstance The instance we want to test. + * @return {boolean} True if mounted, false otherwise. + * @protected + * @final + */ + + ReactServerUpdateQueue.prototype.isMounted = function isMounted(publicInstance) { + return false; + }; + + /** + * Enqueue a callback that will be executed after all the pending updates + * have processed. + * + * @param {ReactClass} publicInstance The instance to use as `this` context. + * @param {?function} callback Called after state is updated. + * @internal + */ + + ReactServerUpdateQueue.prototype.enqueueCallback = function enqueueCallback( + publicInstance, + callback, + callerName, + ) { + if (this.transaction.isInTransaction()) { + ReactUpdateQueue.enqueueCallback(publicInstance, callback, callerName); + } + }; + + /** + * Forces an update. This should only be invoked when it is known with + * certainty that we are **not** in a DOM transaction. + * + * You may want to call this when you know that some deeper aspect of the + * component's state has changed but `setState` was not called. + * + * This will not invoke `shouldComponentUpdate`, but it will invoke + * `componentWillUpdate` and `componentDidUpdate`. + * + * @param {ReactClass} publicInstance The instance that should rerender. + * @internal + */ + + ReactServerUpdateQueue.prototype.enqueueForceUpdate = function enqueueForceUpdate(publicInstance) { + if (this.transaction.isInTransaction()) { + ReactUpdateQueue.enqueueForceUpdate(publicInstance); + } else { + warnNoop(publicInstance, 'forceUpdate'); + } + }; + + /** + * Replaces all of the state. Always use this or `setState` to mutate state. + * You should treat `this.state` as immutable. + * + * There is no guarantee that `this.state` will be immediately updated, so + * accessing `this.state` after calling this method may return the old value. + * + * @param {ReactClass} publicInstance The instance that should rerender. + * @param {object|function} completeState Next state. + * @internal + */ + + ReactServerUpdateQueue.prototype.enqueueReplaceState = function enqueueReplaceState( + publicInstance, + completeState, + ) { + if (this.transaction.isInTransaction()) { + ReactUpdateQueue.enqueueReplaceState(publicInstance, completeState); + } else { + warnNoop(publicInstance, 'replaceState'); + } + }; + + /** + * Sets a subset of the state. This only exists because _pendingState is + * internal. This provides a merging strategy that is not available to deep + * properties which is confusing. TODO: Expose pendingState or don't use it + * during the merge. + * + * @param {ReactClass} publicInstance The instance that should rerender. + * @param {object|function} partialState Next partial state to be merged with state. + * @internal + */ + + ReactServerUpdateQueue.prototype.enqueueSetState = function enqueueSetState( + publicInstance, + partialState, + ) { + if (this.transaction.isInTransaction()) { + ReactUpdateQueue.enqueueSetState(publicInstance, partialState); + } else { + warnNoop(publicInstance, 'setState'); + } + }; + + return ReactServerUpdateQueue; + })(); + + module.exports = ReactServerUpdateQueue; + + /***/ + }, + /* 761 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var _prodInvariant = __webpack_require__(5), + _assign = __webpack_require__(8); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + var React = __webpack_require__(41); + var ReactDefaultInjection = __webpack_require__(202); + var ReactCompositeComponent = __webpack_require__(310); + var ReactReconciler = __webpack_require__(67); + var ReactUpdates = __webpack_require__(34); + + var emptyObject = __webpack_require__(83); + var getNextDebugID = __webpack_require__(331); + var invariant = __webpack_require__(2); + + var NoopInternalComponent = (function () { + function NoopInternalComponent(element) { + _classCallCheck(this, NoopInternalComponent); + + this._renderedOutput = element; + this._currentElement = element; + + if (true) { + this._debugID = getNextDebugID(); + } + } + + NoopInternalComponent.prototype.mountComponent = function mountComponent() {}; + + NoopInternalComponent.prototype.receiveComponent = function receiveComponent(element) { + this._renderedOutput = element; + this._currentElement = element; + }; + + NoopInternalComponent.prototype.unmountComponent = function unmountComponent() {}; + + NoopInternalComponent.prototype.getHostNode = function getHostNode() { + return undefined; + }; + + NoopInternalComponent.prototype.getPublicInstance = function getPublicInstance() { + return null; + }; + + return NoopInternalComponent; + })(); + + var ShallowComponentWrapper = function (element) { + // TODO: Consolidate with instantiateReactComponent + if (true) { + this._debugID = getNextDebugID(); + } + + this.construct(element); + }; + _assign(ShallowComponentWrapper.prototype, ReactCompositeComponent, { + _constructComponent: ReactCompositeComponent._constructComponentWithoutOwner, + _instantiateReactComponent: function (element) { + return new NoopInternalComponent(element); + }, + _replaceNodeWithMarkup: function () {}, + _renderValidatedComponent: ReactCompositeComponent._renderValidatedComponentWithoutOwnerOrContext, + }); + + function _batchedRender(renderer, element, context) { + var transaction = ReactUpdates.ReactReconcileTransaction.getPooled(true); + renderer._render(element, transaction, context); + ReactUpdates.ReactReconcileTransaction.release(transaction); + } + + var ReactShallowRenderer = (function () { + function ReactShallowRenderer() { + _classCallCheck(this, ReactShallowRenderer); + + this._instance = null; + } + + ReactShallowRenderer.prototype.getMountedInstance = function getMountedInstance() { + return this._instance ? this._instance._instance : null; + }; + + ReactShallowRenderer.prototype.render = function render(element, context) { + // Ensure we've done the default injections. This might not be true in the + // case of a simple test that only requires React and the TestUtils in + // conjunction with an inline-requires transform. + ReactDefaultInjection.inject(); + + !React.isValidElement(element) + ? true + ? invariant( + false, + 'ReactShallowRenderer render(): Invalid component element.%s', + typeof element === 'function' + ? ' Instead of passing a component class, make sure to instantiate ' + + 'it by passing it to React.createElement.' + : '', + ) + : _prodInvariant( + '12', + typeof element === 'function' + ? ' Instead of passing a component class, make sure to instantiate ' + + 'it by passing it to React.createElement.' + : '', + ) + : void 0; + !(typeof element.type !== 'string') + ? true + ? invariant( + false, + 'ReactShallowRenderer render(): Shallow rendering works only with custom components, not primitives (%s). Instead of calling `.render(el)` and inspecting the rendered output, look at `el.props` directly instead.', + element.type, + ) + : _prodInvariant('13', element.type) + : void 0; + + if (!context) { + context = emptyObject; + } + ReactUpdates.batchedUpdates(_batchedRender, this, element, context); + + return this.getRenderOutput(); + }; + + ReactShallowRenderer.prototype.getRenderOutput = function getRenderOutput() { + return ( + (this._instance && + this._instance._renderedComponent && + this._instance._renderedComponent._renderedOutput) || + null + ); + }; + + ReactShallowRenderer.prototype.unmount = function unmount() { + if (this._instance) { + ReactReconciler.unmountComponent(this._instance, false); + } + }; + + ReactShallowRenderer.prototype._render = function _render(element, transaction, context) { + if (this._instance) { + ReactReconciler.receiveComponent(this._instance, element, transaction, context); + } else { + var instance = new ShallowComponentWrapper(element); + ReactReconciler.mountComponent(instance, transaction, null, null, context, 0); + this._instance = instance; + } + }; + + return ReactShallowRenderer; + })(); + + module.exports = ReactShallowRenderer; + + /***/ + }, + /* 762 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var _prodInvariant = __webpack_require__(5), + _assign = __webpack_require__(8); + + var EventConstants = __webpack_require__(727); + var EventPluginHub = __webpack_require__(98); + var EventPluginRegistry = __webpack_require__(115); + var EventPropagators = __webpack_require__(99); + var React = __webpack_require__(41); + var ReactDOM = __webpack_require__(201); + var ReactDOMComponentTree = __webpack_require__(13); + var ReactBrowserEventEmitter = __webpack_require__(116); + var ReactInstanceMap = __webpack_require__(100); + var ReactUpdates = __webpack_require__(34); + var SyntheticEvent = __webpack_require__(53); + var ReactShallowRenderer = __webpack_require__(761); + + var findDOMNode = __webpack_require__(328); + var invariant = __webpack_require__(2); + + var topLevelTypes = EventConstants.topLevelTypes; + + function Event(suffix) {} + + /** + * @class ReactTestUtils + */ + + function findAllInRenderedTreeInternal(inst, test) { + if (!inst || !inst.getPublicInstance) { + return []; + } + var publicInst = inst.getPublicInstance(); + var ret = test(publicInst) ? [publicInst] : []; + var currentElement = inst._currentElement; + if (ReactTestUtils.isDOMComponent(publicInst)) { + var renderedChildren = inst._renderedChildren; + var key; + for (key in renderedChildren) { + if (!renderedChildren.hasOwnProperty(key)) { + continue; + } + ret = ret.concat(findAllInRenderedTreeInternal(renderedChildren[key], test)); + } + } else if (React.isValidElement(currentElement) && typeof currentElement.type === 'function') { + ret = ret.concat(findAllInRenderedTreeInternal(inst._renderedComponent, test)); + } + return ret; + } + + /** + * Utilities for making it easy to test React components. + * + * See https://facebook.github.io/react/docs/test-utils.html + * + * Todo: Support the entire DOM.scry query syntax. For now, these simple + * utilities will suffice for testing purposes. + * @lends ReactTestUtils + */ + var ReactTestUtils = { + renderIntoDocument: function (element) { + var div = document.createElement('div'); + // None of our tests actually require attaching the container to the + // DOM, and doing so creates a mess that we rely on test isolation to + // clean up, so we're going to stop honoring the name of this method + // (and probably rename it eventually) if no problems arise. + // document.documentElement.appendChild(div); + return ReactDOM.render(element, div); + }, + + isElement: function (element) { + return React.isValidElement(element); + }, + + isElementOfType: function (inst, convenienceConstructor) { + return React.isValidElement(inst) && inst.type === convenienceConstructor; + }, + + isDOMComponent: function (inst) { + return !!(inst && inst.nodeType === 1 && inst.tagName); + }, + + isDOMComponentElement: function (inst) { + return !!(inst && React.isValidElement(inst) && !!inst.tagName); + }, + + isCompositeComponent: function (inst) { + if (ReactTestUtils.isDOMComponent(inst)) { + // Accessing inst.setState warns; just return false as that'll be what + // this returns when we have DOM nodes as refs directly + return false; + } + return inst != null && typeof inst.render === 'function' && typeof inst.setState === 'function'; + }, + + isCompositeComponentWithType: function (inst, type) { + if (!ReactTestUtils.isCompositeComponent(inst)) { + return false; + } + var internalInstance = ReactInstanceMap.get(inst); + var constructor = internalInstance._currentElement.type; + + return constructor === type; + }, + + isCompositeComponentElement: function (inst) { + if (!React.isValidElement(inst)) { + return false; + } + // We check the prototype of the type that will get mounted, not the + // instance itself. This is a future proof way of duck typing. + var prototype = inst.type.prototype; + return typeof prototype.render === 'function' && typeof prototype.setState === 'function'; + }, + + isCompositeComponentElementWithType: function (inst, type) { + var internalInstance = ReactInstanceMap.get(inst); + var constructor = internalInstance._currentElement.type; + + return !!(ReactTestUtils.isCompositeComponentElement(inst) && constructor === type); + }, + + getRenderedChildOfCompositeComponent: function (inst) { + if (!ReactTestUtils.isCompositeComponent(inst)) { + return null; + } + var internalInstance = ReactInstanceMap.get(inst); + return internalInstance._renderedComponent.getPublicInstance(); + }, + + findAllInRenderedTree: function (inst, test) { + if (!inst) { + return []; + } + !ReactTestUtils.isCompositeComponent(inst) + ? true + ? invariant(false, 'findAllInRenderedTree(...): instance must be a composite component') + : _prodInvariant('10') + : void 0; + return findAllInRenderedTreeInternal(ReactInstanceMap.get(inst), test); + }, + + /** + * Finds all instance of components in the rendered tree that are DOM + * components with the class name matching `className`. + * @return {array} an array of all the matches. + */ + scryRenderedDOMComponentsWithClass: function (root, classNames) { + return ReactTestUtils.findAllInRenderedTree(root, function (inst) { + if (ReactTestUtils.isDOMComponent(inst)) { + var className = inst.className; + if (typeof className !== 'string') { + // SVG, probably. + className = inst.getAttribute('class') || ''; + } + var classList = className.split(/\s+/); + + if (!Array.isArray(classNames)) { + !(classNames !== undefined) + ? true + ? invariant( + false, + 'TestUtils.scryRenderedDOMComponentsWithClass expects a className as a second argument.', + ) + : _prodInvariant('11') + : void 0; + classNames = classNames.split(/\s+/); + } + return classNames.every(function (name) { + return classList.indexOf(name) !== -1; + }); + } + return false; + }); + }, + + /** + * Like scryRenderedDOMComponentsWithClass but expects there to be one result, + * and returns that one result, or throws exception if there is any other + * number of matches besides one. + * @return {!ReactDOMComponent} The one match. + */ + findRenderedDOMComponentWithClass: function (root, className) { + var all = ReactTestUtils.scryRenderedDOMComponentsWithClass(root, className); + if (all.length !== 1) { + throw new Error( + 'Did not find exactly one match (found: ' + all.length + ') ' + 'for class:' + className, + ); + } + return all[0]; + }, + + /** + * Finds all instance of components in the rendered tree that are DOM + * components with the tag name matching `tagName`. + * @return {array} an array of all the matches. + */ + scryRenderedDOMComponentsWithTag: function (root, tagName) { + return ReactTestUtils.findAllInRenderedTree(root, function (inst) { + return ( + ReactTestUtils.isDOMComponent(inst) && inst.tagName.toUpperCase() === tagName.toUpperCase() + ); + }); + }, + + /** + * Like scryRenderedDOMComponentsWithTag but expects there to be one result, + * and returns that one result, or throws exception if there is any other + * number of matches besides one. + * @return {!ReactDOMComponent} The one match. + */ + findRenderedDOMComponentWithTag: function (root, tagName) { + var all = ReactTestUtils.scryRenderedDOMComponentsWithTag(root, tagName); + if (all.length !== 1) { + throw new Error( + 'Did not find exactly one match (found: ' + all.length + ') ' + 'for tag:' + tagName, + ); + } + return all[0]; + }, + + /** + * Finds all instances of components with type equal to `componentType`. + * @return {array} an array of all the matches. + */ + scryRenderedComponentsWithType: function (root, componentType) { + return ReactTestUtils.findAllInRenderedTree(root, function (inst) { + return ReactTestUtils.isCompositeComponentWithType(inst, componentType); + }); + }, + + /** + * Same as `scryRenderedComponentsWithType` but expects there to be one result + * and returns that one result, or throws exception if there is any other + * number of matches besides one. + * @return {!ReactComponent} The one match. + */ + findRenderedComponentWithType: function (root, componentType) { + var all = ReactTestUtils.scryRenderedComponentsWithType(root, componentType); + if (all.length !== 1) { + throw new Error( + 'Did not find exactly one match (found: ' + + all.length + + ') ' + + 'for componentType:' + + componentType, + ); + } + return all[0]; + }, + + /** + * Pass a mocked component module to this method to augment it with + * useful methods that allow it to be used as a dummy React component. + * Instead of rendering as usual, the component will become a simple + * <div> containing any provided children. + * + * @param {object} module the mock function object exported from a + * module that defines the component to be mocked + * @param {?string} mockTagName optional dummy root tag name to return + * from render method (overrides + * module.mockTagName if provided) + * @return {object} the ReactTestUtils object (for chaining) + */ + mockComponent: function (module, mockTagName) { + mockTagName = mockTagName || module.mockTagName || 'div'; + + module.prototype.render.mockImplementation(function () { + return React.createElement(mockTagName, null, this.props.children); + }); + + return this; + }, + + /** + * Simulates a top level event being dispatched from a raw event that occurred + * on an `Element` node. + * @param {Object} topLevelType A type from `EventConstants.topLevelTypes` + * @param {!Element} node The dom to simulate an event occurring on. + * @param {?Event} fakeNativeEvent Fake native event to use in SyntheticEvent. + */ + simulateNativeEventOnNode: function (topLevelType, node, fakeNativeEvent) { + fakeNativeEvent.target = node; + ReactBrowserEventEmitter.ReactEventListener.dispatchEvent(topLevelType, fakeNativeEvent); + }, + + /** + * Simulates a top level event being dispatched from a raw event that occurred + * on the `ReactDOMComponent` `comp`. + * @param {Object} topLevelType A type from `EventConstants.topLevelTypes`. + * @param {!ReactDOMComponent} comp + * @param {?Event} fakeNativeEvent Fake native event to use in SyntheticEvent. + */ + simulateNativeEventOnDOMComponent: function (topLevelType, comp, fakeNativeEvent) { + ReactTestUtils.simulateNativeEventOnNode(topLevelType, findDOMNode(comp), fakeNativeEvent); + }, + + nativeTouchData: function (x, y) { + return { + touches: [{ pageX: x, pageY: y }], + }; + }, + + createRenderer: function () { + return new ReactShallowRenderer(); + }, + + Simulate: null, + SimulateNative: {}, + }; + + /** + * Exports: + * + * - `ReactTestUtils.Simulate.click(Element/ReactDOMComponent)` + * - `ReactTestUtils.Simulate.mouseMove(Element/ReactDOMComponent)` + * - `ReactTestUtils.Simulate.change(Element/ReactDOMComponent)` + * - ... (All keys from event plugin `eventTypes` objects) + */ + function makeSimulator(eventType) { + return function (domComponentOrNode, eventData) { + var node; + !!React.isValidElement(domComponentOrNode) + ? true + ? invariant( + false, + 'TestUtils.Simulate expects a component instance and not a ReactElement.TestUtils.Simulate will not work if you are using shallow rendering.', + ) + : _prodInvariant('14') + : void 0; + if (ReactTestUtils.isDOMComponent(domComponentOrNode)) { + node = findDOMNode(domComponentOrNode); + } else if (domComponentOrNode.tagName) { + node = domComponentOrNode; + } + + var dispatchConfig = EventPluginRegistry.eventNameDispatchConfigs[eventType]; + + var fakeNativeEvent = new Event(); + fakeNativeEvent.target = node; + fakeNativeEvent.type = eventType.toLowerCase(); + + // We don't use SyntheticEvent.getPooled in order to not have to worry about + // properly destroying any properties assigned from `eventData` upon release + var event = new SyntheticEvent( + dispatchConfig, + ReactDOMComponentTree.getInstanceFromNode(node), + fakeNativeEvent, + node, + ); + // Since we aren't using pooling, always persist the event. This will make + // sure it's marked and won't warn when setting additional properties. + event.persist(); + _assign(event, eventData); + + if (dispatchConfig.phasedRegistrationNames) { + EventPropagators.accumulateTwoPhaseDispatches(event); + } else { + EventPropagators.accumulateDirectDispatches(event); + } + + ReactUpdates.batchedUpdates(function () { + EventPluginHub.enqueueEvents(event); + EventPluginHub.processEventQueue(true); + }); + }; + } + + function buildSimulators() { + ReactTestUtils.Simulate = {}; + + var eventType; + for (eventType in EventPluginRegistry.eventNameDispatchConfigs) { + /** + * @param {!Element|ReactDOMComponent} domComponentOrNode + * @param {?object} eventData Fake event data to use in SyntheticEvent. + */ + ReactTestUtils.Simulate[eventType] = makeSimulator(eventType); + } + } + + // Rebuild ReactTestUtils.Simulate whenever event plugins are injected + var oldInjectEventPluginOrder = EventPluginHub.injection.injectEventPluginOrder; + EventPluginHub.injection.injectEventPluginOrder = function () { + oldInjectEventPluginOrder.apply(this, arguments); + buildSimulators(); + }; + var oldInjectEventPlugins = EventPluginHub.injection.injectEventPluginsByName; + EventPluginHub.injection.injectEventPluginsByName = function () { + oldInjectEventPlugins.apply(this, arguments); + buildSimulators(); + }; + + buildSimulators(); + + /** + * Exports: + * + * - `ReactTestUtils.SimulateNative.click(Element/ReactDOMComponent)` + * - `ReactTestUtils.SimulateNative.mouseMove(Element/ReactDOMComponent)` + * - `ReactTestUtils.SimulateNative.mouseIn/ReactDOMComponent)` + * - `ReactTestUtils.SimulateNative.mouseOut(Element/ReactDOMComponent)` + * - ... (All keys from `EventConstants.topLevelTypes`) + * + * Note: Top level event types are a subset of the entire set of handler types + * (which include a broader set of "synthetic" events). For example, onDragDone + * is a synthetic event. Except when testing an event plugin or React's event + * handling code specifically, you probably want to use ReactTestUtils.Simulate + * to dispatch synthetic events. + */ + + function makeNativeSimulator(eventType) { + return function (domComponentOrNode, nativeEventData) { + var fakeNativeEvent = new Event(eventType); + _assign(fakeNativeEvent, nativeEventData); + if (ReactTestUtils.isDOMComponent(domComponentOrNode)) { + ReactTestUtils.simulateNativeEventOnDOMComponent(eventType, domComponentOrNode, fakeNativeEvent); + } else if (domComponentOrNode.tagName) { + // Will allow on actual dom nodes. + ReactTestUtils.simulateNativeEventOnNode(eventType, domComponentOrNode, fakeNativeEvent); + } + }; + } + + Object.keys(topLevelTypes).forEach(function (eventType) { + // Event type is stored as 'topClick' - we transform that to 'click' + var convenienceName = + eventType.indexOf('top') === 0 + ? eventType.charAt(3).toLowerCase() + eventType.substr(4) + : eventType; + /** + * @param {!Element|ReactDOMComponent} domComponentOrNode + * @param {?Event} nativeEventData Fake native event to use in SyntheticEvent. + */ + ReactTestUtils.SimulateNative[convenienceName] = makeNativeSimulator(eventType); + }); + + module.exports = ReactTestUtils; + + /***/ + }, + /* 763 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var NS = { + xlink: 'http://www.w3.org/1999/xlink', + xml: 'http://www.w3.org/XML/1998/namespace', + }; + + // We use attributes for everything SVG so let's avoid some duplication and run + // code instead. + // The following are all specified in the HTML config already so we exclude here. + // - class (as className) + // - color + // - height + // - id + // - lang + // - max + // - media + // - method + // - min + // - name + // - style + // - target + // - type + // - width + var ATTRS = { + accentHeight: 'accent-height', + accumulate: 0, + additive: 0, + alignmentBaseline: 'alignment-baseline', + allowReorder: 'allowReorder', + alphabetic: 0, + amplitude: 0, + arabicForm: 'arabic-form', + ascent: 0, + attributeName: 'attributeName', + attributeType: 'attributeType', + autoReverse: 'autoReverse', + azimuth: 0, + baseFrequency: 'baseFrequency', + baseProfile: 'baseProfile', + baselineShift: 'baseline-shift', + bbox: 0, + begin: 0, + bias: 0, + by: 0, + calcMode: 'calcMode', + capHeight: 'cap-height', + clip: 0, + clipPath: 'clip-path', + clipRule: 'clip-rule', + clipPathUnits: 'clipPathUnits', + colorInterpolation: 'color-interpolation', + colorInterpolationFilters: 'color-interpolation-filters', + colorProfile: 'color-profile', + colorRendering: 'color-rendering', + contentScriptType: 'contentScriptType', + contentStyleType: 'contentStyleType', + cursor: 0, + cx: 0, + cy: 0, + d: 0, + decelerate: 0, + descent: 0, + diffuseConstant: 'diffuseConstant', + direction: 0, + display: 0, + divisor: 0, + dominantBaseline: 'dominant-baseline', + dur: 0, + dx: 0, + dy: 0, + edgeMode: 'edgeMode', + elevation: 0, + enableBackground: 'enable-background', + end: 0, + exponent: 0, + externalResourcesRequired: 'externalResourcesRequired', + fill: 0, + fillOpacity: 'fill-opacity', + fillRule: 'fill-rule', + filter: 0, + filterRes: 'filterRes', + filterUnits: 'filterUnits', + floodColor: 'flood-color', + floodOpacity: 'flood-opacity', + focusable: 0, + fontFamily: 'font-family', + fontSize: 'font-size', + fontSizeAdjust: 'font-size-adjust', + fontStretch: 'font-stretch', + fontStyle: 'font-style', + fontVariant: 'font-variant', + fontWeight: 'font-weight', + format: 0, + from: 0, + fx: 0, + fy: 0, + g1: 0, + g2: 0, + glyphName: 'glyph-name', + glyphOrientationHorizontal: 'glyph-orientation-horizontal', + glyphOrientationVertical: 'glyph-orientation-vertical', + glyphRef: 'glyphRef', + gradientTransform: 'gradientTransform', + gradientUnits: 'gradientUnits', + hanging: 0, + horizAdvX: 'horiz-adv-x', + horizOriginX: 'horiz-origin-x', + ideographic: 0, + imageRendering: 'image-rendering', + in: 0, + in2: 0, + intercept: 0, + k: 0, + k1: 0, + k2: 0, + k3: 0, + k4: 0, + kernelMatrix: 'kernelMatrix', + kernelUnitLength: 'kernelUnitLength', + kerning: 0, + keyPoints: 'keyPoints', + keySplines: 'keySplines', + keyTimes: 'keyTimes', + lengthAdjust: 'lengthAdjust', + letterSpacing: 'letter-spacing', + lightingColor: 'lighting-color', + limitingConeAngle: 'limitingConeAngle', + local: 0, + markerEnd: 'marker-end', + markerMid: 'marker-mid', + markerStart: 'marker-start', + markerHeight: 'markerHeight', + markerUnits: 'markerUnits', + markerWidth: 'markerWidth', + mask: 0, + maskContentUnits: 'maskContentUnits', + maskUnits: 'maskUnits', + mathematical: 0, + mode: 0, + numOctaves: 'numOctaves', + offset: 0, + opacity: 0, + operator: 0, + order: 0, + orient: 0, + orientation: 0, + origin: 0, + overflow: 0, + overlinePosition: 'overline-position', + overlineThickness: 'overline-thickness', + paintOrder: 'paint-order', + panose1: 'panose-1', + pathLength: 'pathLength', + patternContentUnits: 'patternContentUnits', + patternTransform: 'patternTransform', + patternUnits: 'patternUnits', + pointerEvents: 'pointer-events', + points: 0, + pointsAtX: 'pointsAtX', + pointsAtY: 'pointsAtY', + pointsAtZ: 'pointsAtZ', + preserveAlpha: 'preserveAlpha', + preserveAspectRatio: 'preserveAspectRatio', + primitiveUnits: 'primitiveUnits', + r: 0, + radius: 0, + refX: 'refX', + refY: 'refY', + renderingIntent: 'rendering-intent', + repeatCount: 'repeatCount', + repeatDur: 'repeatDur', + requiredExtensions: 'requiredExtensions', + requiredFeatures: 'requiredFeatures', + restart: 0, + result: 0, + rotate: 0, + rx: 0, + ry: 0, + scale: 0, + seed: 0, + shapeRendering: 'shape-rendering', + slope: 0, + spacing: 0, + specularConstant: 'specularConstant', + specularExponent: 'specularExponent', + speed: 0, + spreadMethod: 'spreadMethod', + startOffset: 'startOffset', + stdDeviation: 'stdDeviation', + stemh: 0, + stemv: 0, + stitchTiles: 'stitchTiles', + stopColor: 'stop-color', + stopOpacity: 'stop-opacity', + strikethroughPosition: 'strikethrough-position', + strikethroughThickness: 'strikethrough-thickness', + string: 0, + stroke: 0, + strokeDasharray: 'stroke-dasharray', + strokeDashoffset: 'stroke-dashoffset', + strokeLinecap: 'stroke-linecap', + strokeLinejoin: 'stroke-linejoin', + strokeMiterlimit: 'stroke-miterlimit', + strokeOpacity: 'stroke-opacity', + strokeWidth: 'stroke-width', + surfaceScale: 'surfaceScale', + systemLanguage: 'systemLanguage', + tableValues: 'tableValues', + targetX: 'targetX', + targetY: 'targetY', + textAnchor: 'text-anchor', + textDecoration: 'text-decoration', + textRendering: 'text-rendering', + textLength: 'textLength', + to: 0, + transform: 0, + u1: 0, + u2: 0, + underlinePosition: 'underline-position', + underlineThickness: 'underline-thickness', + unicode: 0, + unicodeBidi: 'unicode-bidi', + unicodeRange: 'unicode-range', + unitsPerEm: 'units-per-em', + vAlphabetic: 'v-alphabetic', + vHanging: 'v-hanging', + vIdeographic: 'v-ideographic', + vMathematical: 'v-mathematical', + values: 0, + vectorEffect: 'vector-effect', + version: 0, + vertAdvY: 'vert-adv-y', + vertOriginX: 'vert-origin-x', + vertOriginY: 'vert-origin-y', + viewBox: 'viewBox', + viewTarget: 'viewTarget', + visibility: 0, + widths: 0, + wordSpacing: 'word-spacing', + writingMode: 'writing-mode', + x: 0, + xHeight: 'x-height', + x1: 0, + x2: 0, + xChannelSelector: 'xChannelSelector', + xlinkActuate: 'xlink:actuate', + xlinkArcrole: 'xlink:arcrole', + xlinkHref: 'xlink:href', + xlinkRole: 'xlink:role', + xlinkShow: 'xlink:show', + xlinkTitle: 'xlink:title', + xlinkType: 'xlink:type', + xmlBase: 'xml:base', + xmlns: 0, + xmlnsXlink: 'xmlns:xlink', + xmlLang: 'xml:lang', + xmlSpace: 'xml:space', + y: 0, + y1: 0, + y2: 0, + yChannelSelector: 'yChannelSelector', + z: 0, + zoomAndPan: 'zoomAndPan', + }; + + var SVGDOMPropertyConfig = { + Properties: {}, + DOMAttributeNamespaces: { + xlinkActuate: NS.xlink, + xlinkArcrole: NS.xlink, + xlinkHref: NS.xlink, + xlinkRole: NS.xlink, + xlinkShow: NS.xlink, + xlinkTitle: NS.xlink, + xlinkType: NS.xlink, + xmlBase: NS.xml, + xmlLang: NS.xml, + xmlSpace: NS.xml, + }, + DOMAttributeNames: {}, + }; + + Object.keys(ATTRS).forEach(function (key) { + SVGDOMPropertyConfig.Properties[key] = 0; + if (ATTRS[key]) { + SVGDOMPropertyConfig.DOMAttributeNames[key] = ATTRS[key]; + } + }); + + module.exports = SVGDOMPropertyConfig; + + /***/ + }, + /* 764 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var EventPropagators = __webpack_require__(99); + var ExecutionEnvironment = __webpack_require__(14); + var ReactDOMComponentTree = __webpack_require__(13); + var ReactInputSelection = __webpack_require__(319); + var SyntheticEvent = __webpack_require__(53); + + var getActiveElement = __webpack_require__(291); + var isTextInputElement = __webpack_require__(334); + var shallowEqual = __webpack_require__(190); + + var skipSelectionChangeEvent = + ExecutionEnvironment.canUseDOM && 'documentMode' in document && document.documentMode <= 11; + + var eventTypes = { + select: { + phasedRegistrationNames: { + bubbled: 'onSelect', + captured: 'onSelectCapture', + }, + dependencies: [ + 'topBlur', + 'topContextMenu', + 'topFocus', + 'topKeyDown', + 'topKeyUp', + 'topMouseDown', + 'topMouseUp', + 'topSelectionChange', + ], + }, + }; + + var activeElement = null; + var activeElementInst = null; + var lastSelection = null; + var mouseDown = false; + + // Track whether a listener exists for this plugin. If none exist, we do + // not extract events. See #3639. + var hasListener = false; + + /** + * Get an object which is a unique representation of the current selection. + * + * The return value will not be consistent across nodes or browsers, but + * two identical selections on the same node will return identical objects. + * + * @param {DOMElement} node + * @return {object} + */ + function getSelection(node) { + if ('selectionStart' in node && ReactInputSelection.hasSelectionCapabilities(node)) { + return { + start: node.selectionStart, + end: node.selectionEnd, + }; + } else if (window.getSelection) { + var selection = window.getSelection(); + return { + anchorNode: selection.anchorNode, + anchorOffset: selection.anchorOffset, + focusNode: selection.focusNode, + focusOffset: selection.focusOffset, + }; + } else if (document.selection) { + var range = document.selection.createRange(); + return { + parentElement: range.parentElement(), + text: range.text, + top: range.boundingTop, + left: range.boundingLeft, + }; + } + } + + /** + * Poll selection to see whether it's changed. + * + * @param {object} nativeEvent + * @return {?SyntheticEvent} + */ + function constructSelectEvent(nativeEvent, nativeEventTarget) { + // Ensure we have the right element, and that the user is not dragging a + // selection (this matches native `select` event behavior). In HTML5, select + // fires only on input and textarea thus if there's no focused element we + // won't dispatch. + if (mouseDown || activeElement == null || activeElement !== getActiveElement()) { + return null; + } + + // Only fire when selection has actually changed. + var currentSelection = getSelection(activeElement); + if (!lastSelection || !shallowEqual(lastSelection, currentSelection)) { + lastSelection = currentSelection; + + var syntheticEvent = SyntheticEvent.getPooled( + eventTypes.select, + activeElementInst, + nativeEvent, + nativeEventTarget, + ); + + syntheticEvent.type = 'select'; + syntheticEvent.target = activeElement; + + EventPropagators.accumulateTwoPhaseDispatches(syntheticEvent); + + return syntheticEvent; + } + + return null; + } + + /** + * This plugin creates an `onSelect` event that normalizes select events + * across form elements. + * + * Supported elements are: + * - input (see `isTextInputElement`) + * - textarea + * - contentEditable + * + * This differs from native browser implementations in the following ways: + * - Fires on contentEditable fields as well as inputs. + * - Fires for collapsed selection. + * - Fires after user input. + */ + var SelectEventPlugin = { + eventTypes: eventTypes, + + extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) { + if (!hasListener) { + return null; + } + + var targetNode = targetInst ? ReactDOMComponentTree.getNodeFromInstance(targetInst) : window; + + switch (topLevelType) { + // Track the input node that has focus. + case 'topFocus': + if (isTextInputElement(targetNode) || targetNode.contentEditable === 'true') { + activeElement = targetNode; + activeElementInst = targetInst; + lastSelection = null; + } + break; + case 'topBlur': + activeElement = null; + activeElementInst = null; + lastSelection = null; + break; + + // Don't fire the event while the user is dragging. This matches the + // semantics of the native select event. + case 'topMouseDown': + mouseDown = true; + break; + case 'topContextMenu': + case 'topMouseUp': + mouseDown = false; + return constructSelectEvent(nativeEvent, nativeEventTarget); + + // Chrome and IE fire non-standard event when selection is changed (and + // sometimes when it hasn't). IE's event fires out of order with respect + // to key and input events on deletion, so we discard it. + // + // Firefox doesn't support selectionchange, so check selection status + // after each key entry. The selection changes after keydown and before + // keyup, but we check on keydown as well in the case of holding down a + // key, when multiple keydown events are fired but only one keyup is. + // This is also our approach for IE handling, for the reason above. + case 'topSelectionChange': + if (skipSelectionChangeEvent) { + break; + } + // falls through + case 'topKeyDown': + case 'topKeyUp': + return constructSelectEvent(nativeEvent, nativeEventTarget); + } + + return null; + }, + + didPutListener: function (inst, registrationName, listener) { + if (registrationName === 'onSelect') { + hasListener = true; + } + }, + }; + + module.exports = SelectEventPlugin; + + /***/ + }, + /* 765 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + var _prodInvariant = __webpack_require__(5); + + var EventListener = __webpack_require__(289); + var EventPropagators = __webpack_require__(99); + var ReactDOMComponentTree = __webpack_require__(13); + var SyntheticAnimationEvent = __webpack_require__(766); + var SyntheticClipboardEvent = __webpack_require__(767); + var SyntheticEvent = __webpack_require__(53); + var SyntheticFocusEvent = __webpack_require__(770); + var SyntheticKeyboardEvent = __webpack_require__(772); + var SyntheticMouseEvent = __webpack_require__(141); + var SyntheticDragEvent = __webpack_require__(769); + var SyntheticTouchEvent = __webpack_require__(773); + var SyntheticTransitionEvent = __webpack_require__(774); + var SyntheticUIEvent = __webpack_require__(117); + var SyntheticWheelEvent = __webpack_require__(775); + + var emptyFunction = __webpack_require__(40); + var getEventCharCode = __webpack_require__(206); + var invariant = __webpack_require__(2); + + /** + * Turns + * ['abort', ...] + * into + * eventTypes = { + * 'abort': { + * phasedRegistrationNames: { + * bubbled: 'onAbort', + * captured: 'onAbortCapture', + * }, + * dependencies: ['topAbort'], + * }, + * ... + * }; + * topLevelEventsToDispatchConfig = { + * 'topAbort': { sameConfig } + * }; + */ + var eventTypes = {}; + var topLevelEventsToDispatchConfig = {}; + [ + 'abort', + 'animationEnd', + 'animationIteration', + 'animationStart', + 'blur', + 'canPlay', + 'canPlayThrough', + 'click', + 'contextMenu', + 'copy', + 'cut', + 'doubleClick', + 'drag', + 'dragEnd', + 'dragEnter', + 'dragExit', + 'dragLeave', + 'dragOver', + 'dragStart', + 'drop', + 'durationChange', + 'emptied', + 'encrypted', + 'ended', + 'error', + 'focus', + 'input', + 'invalid', + 'keyDown', + 'keyPress', + 'keyUp', + 'load', + 'loadedData', + 'loadedMetadata', + 'loadStart', + 'mouseDown', + 'mouseMove', + 'mouseOut', + 'mouseOver', + 'mouseUp', + 'paste', + 'pause', + 'play', + 'playing', + 'progress', + 'rateChange', + 'reset', + 'scroll', + 'seeked', + 'seeking', + 'stalled', + 'submit', + 'suspend', + 'timeUpdate', + 'touchCancel', + 'touchEnd', + 'touchMove', + 'touchStart', + 'transitionEnd', + 'volumeChange', + 'waiting', + 'wheel', + ].forEach(function (event) { + var capitalizedEvent = event[0].toUpperCase() + event.slice(1); + var onEvent = 'on' + capitalizedEvent; + var topEvent = 'top' + capitalizedEvent; + + var type = { + phasedRegistrationNames: { + bubbled: onEvent, + captured: onEvent + 'Capture', + }, + dependencies: [topEvent], + }; + eventTypes[event] = type; + topLevelEventsToDispatchConfig[topEvent] = type; + }); + + var onClickListeners = {}; + + function getDictionaryKey(inst) { + // Prevents V8 performance issue: + // https://github.com/facebook/react/pull/7232 + return '.' + inst._rootNodeID; + } + + function isInteractive(tag) { + return tag === 'button' || tag === 'input' || tag === 'select' || tag === 'textarea'; + } + + var SimpleEventPlugin = { + eventTypes: eventTypes, + + extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) { + var dispatchConfig = topLevelEventsToDispatchConfig[topLevelType]; + if (!dispatchConfig) { + return null; + } + var EventConstructor; + switch (topLevelType) { + case 'topAbort': + case 'topCanPlay': + case 'topCanPlayThrough': + case 'topDurationChange': + case 'topEmptied': + case 'topEncrypted': + case 'topEnded': + case 'topError': + case 'topInput': + case 'topInvalid': + case 'topLoad': + case 'topLoadedData': + case 'topLoadedMetadata': + case 'topLoadStart': + case 'topPause': + case 'topPlay': + case 'topPlaying': + case 'topProgress': + case 'topRateChange': + case 'topReset': + case 'topSeeked': + case 'topSeeking': + case 'topStalled': + case 'topSubmit': + case 'topSuspend': + case 'topTimeUpdate': + case 'topVolumeChange': + case 'topWaiting': + // HTML Events + // @see http://www.w3.org/TR/html5/index.html#events-0 + EventConstructor = SyntheticEvent; + break; + case 'topKeyPress': + // Firefox creates a keypress event for function keys too. This removes + // the unwanted keypress events. Enter is however both printable and + // non-printable. One would expect Tab to be as well (but it isn't). + if (getEventCharCode(nativeEvent) === 0) { + return null; + } + /* falls through */ + case 'topKeyDown': + case 'topKeyUp': + EventConstructor = SyntheticKeyboardEvent; + break; + case 'topBlur': + case 'topFocus': + EventConstructor = SyntheticFocusEvent; + break; + case 'topClick': + // Firefox creates a click event on right mouse clicks. This removes the + // unwanted click events. + if (nativeEvent.button === 2) { + return null; + } + /* falls through */ + case 'topDoubleClick': + case 'topMouseDown': + case 'topMouseMove': + case 'topMouseUp': + // TODO: Disabled elements should not respond to mouse events + /* falls through */ + case 'topMouseOut': + case 'topMouseOver': + case 'topContextMenu': + EventConstructor = SyntheticMouseEvent; + break; + case 'topDrag': + case 'topDragEnd': + case 'topDragEnter': + case 'topDragExit': + case 'topDragLeave': + case 'topDragOver': + case 'topDragStart': + case 'topDrop': + EventConstructor = SyntheticDragEvent; + break; + case 'topTouchCancel': + case 'topTouchEnd': + case 'topTouchMove': + case 'topTouchStart': + EventConstructor = SyntheticTouchEvent; + break; + case 'topAnimationEnd': + case 'topAnimationIteration': + case 'topAnimationStart': + EventConstructor = SyntheticAnimationEvent; + break; + case 'topTransitionEnd': + EventConstructor = SyntheticTransitionEvent; + break; + case 'topScroll': + EventConstructor = SyntheticUIEvent; + break; + case 'topWheel': + EventConstructor = SyntheticWheelEvent; + break; + case 'topCopy': + case 'topCut': + case 'topPaste': + EventConstructor = SyntheticClipboardEvent; + break; + } + !EventConstructor + ? true + ? invariant(false, 'SimpleEventPlugin: Unhandled event type, `%s`.', topLevelType) + : _prodInvariant('86', topLevelType) + : void 0; + var event = EventConstructor.getPooled(dispatchConfig, targetInst, nativeEvent, nativeEventTarget); + EventPropagators.accumulateTwoPhaseDispatches(event); + return event; + }, + + didPutListener: function (inst, registrationName, listener) { + // Mobile Safari does not fire properly bubble click events on + // non-interactive elements, which means delegated click listeners do not + // fire. The workaround for this bug involves attaching an empty click + // listener on the target node. + // http://www.quirksmode.org/blog/archives/2010/09/click_event_del.html + if (registrationName === 'onClick' && !isInteractive(inst._tag)) { + var key = getDictionaryKey(inst); + var node = ReactDOMComponentTree.getNodeFromInstance(inst); + if (!onClickListeners[key]) { + onClickListeners[key] = EventListener.listen(node, 'click', emptyFunction); + } + } + }, + + willDeleteListener: function (inst, registrationName) { + if (registrationName === 'onClick' && !isInteractive(inst._tag)) { + var key = getDictionaryKey(inst); + onClickListeners[key].remove(); + delete onClickListeners[key]; + } + }, + }; + + module.exports = SimpleEventPlugin; + + /***/ + }, + /* 766 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var SyntheticEvent = __webpack_require__(53); + + /** + * @interface Event + * @see http://www.w3.org/TR/css3-animations/#AnimationEvent-interface + * @see https://developer.mozilla.org/en-US/docs/Web/API/AnimationEvent + */ + var AnimationEventInterface = { + animationName: null, + elapsedTime: null, + pseudoElement: null, + }; + + /** + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @extends {SyntheticEvent} + */ + function SyntheticAnimationEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); + } + + SyntheticEvent.augmentClass(SyntheticAnimationEvent, AnimationEventInterface); + + module.exports = SyntheticAnimationEvent; + + /***/ + }, + /* 767 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var SyntheticEvent = __webpack_require__(53); + + /** + * @interface Event + * @see http://www.w3.org/TR/clipboard-apis/ + */ + var ClipboardEventInterface = { + clipboardData: function (event) { + return 'clipboardData' in event ? event.clipboardData : window.clipboardData; + }, + }; + + /** + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @extends {SyntheticUIEvent} + */ + function SyntheticClipboardEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); + } + + SyntheticEvent.augmentClass(SyntheticClipboardEvent, ClipboardEventInterface); + + module.exports = SyntheticClipboardEvent; + + /***/ + }, + /* 768 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var SyntheticEvent = __webpack_require__(53); + + /** + * @interface Event + * @see http://www.w3.org/TR/DOM-Level-3-Events/#events-compositionevents + */ + var CompositionEventInterface = { + data: null, + }; + + /** + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @extends {SyntheticUIEvent} + */ + function SyntheticCompositionEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); + } + + SyntheticEvent.augmentClass(SyntheticCompositionEvent, CompositionEventInterface); + + module.exports = SyntheticCompositionEvent; + + /***/ + }, + /* 769 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var SyntheticMouseEvent = __webpack_require__(141); + + /** + * @interface DragEvent + * @see http://www.w3.org/TR/DOM-Level-3-Events/ + */ + var DragEventInterface = { + dataTransfer: null, + }; + + /** + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @extends {SyntheticUIEvent} + */ + function SyntheticDragEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + return SyntheticMouseEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); + } + + SyntheticMouseEvent.augmentClass(SyntheticDragEvent, DragEventInterface); + + module.exports = SyntheticDragEvent; + + /***/ + }, + /* 770 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var SyntheticUIEvent = __webpack_require__(117); + + /** + * @interface FocusEvent + * @see http://www.w3.org/TR/DOM-Level-3-Events/ + */ + var FocusEventInterface = { + relatedTarget: null, + }; + + /** + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @extends {SyntheticUIEvent} + */ + function SyntheticFocusEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); + } + + SyntheticUIEvent.augmentClass(SyntheticFocusEvent, FocusEventInterface); + + module.exports = SyntheticFocusEvent; + + /***/ + }, + /* 771 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var SyntheticEvent = __webpack_require__(53); + + /** + * @interface Event + * @see http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105 + * /#events-inputevents + */ + var InputEventInterface = { + data: null, + }; + + /** + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @extends {SyntheticUIEvent} + */ + function SyntheticInputEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); + } + + SyntheticEvent.augmentClass(SyntheticInputEvent, InputEventInterface); + + module.exports = SyntheticInputEvent; + + /***/ + }, + /* 772 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var SyntheticUIEvent = __webpack_require__(117); + + var getEventCharCode = __webpack_require__(206); + var getEventKey = __webpack_require__(780); + var getEventModifierState = __webpack_require__(207); + + /** + * @interface KeyboardEvent + * @see http://www.w3.org/TR/DOM-Level-3-Events/ + */ + var KeyboardEventInterface = { + key: getEventKey, + location: null, + ctrlKey: null, + shiftKey: null, + altKey: null, + metaKey: null, + repeat: null, + locale: null, + getModifierState: getEventModifierState, + // Legacy Interface + charCode: function (event) { + // `charCode` is the result of a KeyPress event and represents the value of + // the actual printable character. + + // KeyPress is deprecated, but its replacement is not yet final and not + // implemented in any major browser. Only KeyPress has charCode. + if (event.type === 'keypress') { + return getEventCharCode(event); + } + return 0; + }, + keyCode: function (event) { + // `keyCode` is the result of a KeyDown/Up event and represents the value of + // physical keyboard key. + + // The actual meaning of the value depends on the users' keyboard layout + // which cannot be detected. Assuming that it is a US keyboard layout + // provides a surprisingly accurate mapping for US and European users. + // Due to this, it is left to the user to implement at this time. + if (event.type === 'keydown' || event.type === 'keyup') { + return event.keyCode; + } + return 0; + }, + which: function (event) { + // `which` is an alias for either `keyCode` or `charCode` depending on the + // type of the event. + if (event.type === 'keypress') { + return getEventCharCode(event); + } + if (event.type === 'keydown' || event.type === 'keyup') { + return event.keyCode; + } + return 0; + }, + }; + + /** + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @extends {SyntheticUIEvent} + */ + function SyntheticKeyboardEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); + } + + SyntheticUIEvent.augmentClass(SyntheticKeyboardEvent, KeyboardEventInterface); + + module.exports = SyntheticKeyboardEvent; + + /***/ + }, + /* 773 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var SyntheticUIEvent = __webpack_require__(117); + + var getEventModifierState = __webpack_require__(207); + + /** + * @interface TouchEvent + * @see http://www.w3.org/TR/touch-events/ + */ + var TouchEventInterface = { + touches: null, + targetTouches: null, + changedTouches: null, + altKey: null, + metaKey: null, + ctrlKey: null, + shiftKey: null, + getModifierState: getEventModifierState, + }; + + /** + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @extends {SyntheticUIEvent} + */ + function SyntheticTouchEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); + } + + SyntheticUIEvent.augmentClass(SyntheticTouchEvent, TouchEventInterface); + + module.exports = SyntheticTouchEvent; + + /***/ + }, + /* 774 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var SyntheticEvent = __webpack_require__(53); + + /** + * @interface Event + * @see http://www.w3.org/TR/2009/WD-css3-transitions-20090320/#transition-events- + * @see https://developer.mozilla.org/en-US/docs/Web/API/TransitionEvent + */ + var TransitionEventInterface = { + propertyName: null, + elapsedTime: null, + pseudoElement: null, + }; + + /** + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @extends {SyntheticEvent} + */ + function SyntheticTransitionEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); + } + + SyntheticEvent.augmentClass(SyntheticTransitionEvent, TransitionEventInterface); + + module.exports = SyntheticTransitionEvent; + + /***/ + }, + /* 775 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var SyntheticMouseEvent = __webpack_require__(141); + + /** + * @interface WheelEvent + * @see http://www.w3.org/TR/DOM-Level-3-Events/ + */ + var WheelEventInterface = { + deltaX: function (event) { + return 'deltaX' in event + ? event.deltaX + : // Fallback to `wheelDeltaX` for Webkit and normalize (right is positive). + 'wheelDeltaX' in event + ? -event.wheelDeltaX + : 0; + }, + deltaY: function (event) { + return 'deltaY' in event + ? event.deltaY + : // Fallback to `wheelDeltaY` for Webkit and normalize (down is positive). + 'wheelDeltaY' in event + ? -event.wheelDeltaY + : // Fallback to `wheelDelta` for IE<9 and normalize (down is positive). + 'wheelDelta' in event + ? -event.wheelDelta + : 0; + }, + deltaZ: null, + + // Browsers without "deltaMode" is reporting in raw wheel delta where one + // notch on the scroll is always +/- 120, roughly equivalent to pixels. + // A good approximation of DOM_DELTA_LINE (1) is 5% of viewport size or + // ~40 pixels, for DOM_DELTA_SCREEN (2) it is 87.5% of viewport size. + deltaMode: null, + }; + + /** + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @extends {SyntheticMouseEvent} + */ + function SyntheticWheelEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + return SyntheticMouseEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); + } + + SyntheticMouseEvent.augmentClass(SyntheticWheelEvent, WheelEventInterface); + + module.exports = SyntheticWheelEvent; + + /***/ + }, + /* 776 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + var MOD = 65521; + + // adler32 is not cryptographically strong, and is only used to sanity check that + // markup generated on the server matches the markup generated on the client. + // This implementation (a modified version of the SheetJS version) has been optimized + // for our use case, at the expense of conforming to the adler32 specification + // for non-ascii inputs. + function adler32(data) { + var a = 1; + var b = 0; + var i = 0; + var l = data.length; + var m = l & ~0x3; + while (i < m) { + var n = Math.min(i + 4096, m); + for (; i < n; i += 4) { + b += + (a += data.charCodeAt(i)) + + (a += data.charCodeAt(i + 1)) + + (a += data.charCodeAt(i + 2)) + + (a += data.charCodeAt(i + 3)); + } + a %= MOD; + b %= MOD; + } + for (; i < l; i++) { + b += a += data.charCodeAt(i); + } + a %= MOD; + b %= MOD; + return a | (b << 16); + } + + module.exports = adler32; + + /***/ + }, + /* 777 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (process) { + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var _prodInvariant = __webpack_require__(5); + + var ReactPropTypeLocationNames = __webpack_require__(755); + var ReactPropTypesSecret = __webpack_require__(323); + + var invariant = __webpack_require__(2); + var warning = __webpack_require__(3); + + var ReactComponentTreeHook; + + if ( + typeof process !== 'undefined' && + __webpack_require__.i({ NODE_ENV: 'development' }) && + 'development' === 'test' + ) { + // Temporary hack. + // Inline requires don't work well with Jest: + // https://github.com/facebook/react/issues/7240 + // Remove the inline requires when we don't need them anymore: + // https://github.com/facebook/react/pull/7178 + ReactComponentTreeHook = __webpack_require__(19); + } + + var loggedTypeFailures = {}; + + /** + * Assert that the values match with the type specs. + * Error messages are memorized and will only be shown once. + * + * @param {object} typeSpecs Map of name to a ReactPropType + * @param {object} values Runtime values that need to be type-checked + * @param {string} location e.g. "prop", "context", "child context" + * @param {string} componentName Name of the component for error messages. + * @param {?object} element The React element that is being type-checked + * @param {?number} debugID The React component instance that is being type-checked + * @private + */ + function checkReactTypeSpec(typeSpecs, values, location, componentName, element, debugID) { + for (var typeSpecName in typeSpecs) { + if (typeSpecs.hasOwnProperty(typeSpecName)) { + var error; + // Prop type validation may throw. In case they do, we don't want to + // fail the render phase where it didn't fail before. So we log it. + // After these have been cleaned up, we'll let them throw. + try { + // This is intentionally an invariant that gets caught. It's the same + // behavior as without this statement except with a better message. + !(typeof typeSpecs[typeSpecName] === 'function') + ? true + ? invariant( + false, + '%s: %s type `%s` is invalid; it must be a function, usually from React.PropTypes.', + componentName || 'React class', + ReactPropTypeLocationNames[location], + typeSpecName, + ) + : _prodInvariant( + '84', + componentName || 'React class', + ReactPropTypeLocationNames[location], + typeSpecName, + ) + : void 0; + error = typeSpecs[typeSpecName]( + values, + typeSpecName, + componentName, + location, + null, + ReactPropTypesSecret, + ); + } catch (ex) { + error = ex; + } + true + ? warning( + !error || error instanceof Error, + '%s: type specification of %s `%s` is invalid; the type checker ' + + 'function must return `null` or an `Error` but returned a %s. ' + + 'You may have forgotten to pass an argument to the type checker ' + + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + + 'shape all require an argument).', + componentName || 'React class', + ReactPropTypeLocationNames[location], + typeSpecName, + typeof error, + ) + : void 0; + if (error instanceof Error && !(error.message in loggedTypeFailures)) { + // Only monitor this failure once because there tends to be a lot of the + // same error. + loggedTypeFailures[error.message] = true; + + var componentStackInfo = ''; + + if (true) { + if (!ReactComponentTreeHook) { + ReactComponentTreeHook = __webpack_require__(19); + } + if (debugID !== null) { + componentStackInfo = ReactComponentTreeHook.getStackAddendumByID(debugID); + } else if (element !== null) { + componentStackInfo = ReactComponentTreeHook.getCurrentStackAddendum(element); + } + } + + true + ? warning(false, 'Failed %s type: %s%s', location, error.message, componentStackInfo) + : void 0; + } + } + } + } + + module.exports = checkReactTypeSpec; + /* WEBPACK VAR INJECTION */ + }).call(exports, __webpack_require__(84)); + + /***/ + }, + /* 778 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var CSSProperty = __webpack_require__(307); + var warning = __webpack_require__(3); + + var isUnitlessNumber = CSSProperty.isUnitlessNumber; + var styleWarnings = {}; + + /** + * Convert a value into the proper css writable value. The style name `name` + * should be logical (no hyphens), as specified + * in `CSSProperty.isUnitlessNumber`. + * + * @param {string} name CSS property name such as `topMargin`. + * @param {*} value CSS property value such as `10px`. + * @param {ReactDOMComponent} component + * @return {string} Normalized style value with dimensions applied. + */ + function dangerousStyleValue(name, value, component) { + // Note that we've removed escapeTextForBrowser() calls here since the + // whole string will be escaped when the attribute is injected into + // the markup. If you provide unsafe user data here they can inject + // arbitrary CSS which may be problematic (I couldn't repro this): + // https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet + // http://www.thespanner.co.uk/2007/11/26/ultimate-xss-css-injection/ + // This is not an XSS hole but instead a potential CSS injection issue + // which has lead to a greater discussion about how we're going to + // trust URLs moving forward. See #2115901 + + var isEmpty = value == null || typeof value === 'boolean' || value === ''; + if (isEmpty) { + return ''; + } + + var isNonNumeric = isNaN(value); + if ( + isNonNumeric || + value === 0 || + (isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name]) + ) { + return '' + value; // cast to string + } + + if (typeof value === 'string') { + if (true) { + // Allow '0' to pass through without warning. 0 is already special and + // doesn't require units, so we don't need to warn about it. + if (component && value !== '0') { + var owner = component._currentElement._owner; + var ownerName = owner ? owner.getName() : null; + if (ownerName && !styleWarnings[ownerName]) { + styleWarnings[ownerName] = {}; + } + var warned = false; + if (ownerName) { + var warnings = styleWarnings[ownerName]; + warned = warnings[name]; + if (!warned) { + warnings[name] = true; + } + } + if (!warned) { + true + ? warning( + false, + 'a `%s` tag (owner: `%s`) was passed a numeric string value ' + + 'for CSS property `%s` (value: `%s`) which will be treated ' + + 'as a unitless number in a future version of React.', + component._currentElement.type, + ownerName || 'unknown', + name, + value, + ) + : void 0; + } + } + } + value = value.trim(); + } + return value + 'px'; + } + + module.exports = dangerousStyleValue; + + /***/ + }, + /* 779 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (process) { + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + var KeyEscapeUtils = __webpack_require__(198); + var traverseAllChildren = __webpack_require__(336); + var warning = __webpack_require__(3); + + var ReactComponentTreeHook; + + if ( + typeof process !== 'undefined' && + __webpack_require__.i({ NODE_ENV: 'development' }) && + 'development' === 'test' + ) { + // Temporary hack. + // Inline requires don't work well with Jest: + // https://github.com/facebook/react/issues/7240 + // Remove the inline requires when we don't need them anymore: + // https://github.com/facebook/react/pull/7178 + ReactComponentTreeHook = __webpack_require__(19); + } + + /** + * @param {function} traverseContext Context passed through traversal. + * @param {?ReactComponent} child React child component. + * @param {!string} name String name of key path to child. + * @param {number=} selfDebugID Optional debugID of the current internal instance. + */ + function flattenSingleChildIntoContext(traverseContext, child, name, selfDebugID) { + // We found a component instance. + if (traverseContext && typeof traverseContext === 'object') { + var result = traverseContext; + var keyUnique = result[name] === undefined; + if (true) { + if (!ReactComponentTreeHook) { + ReactComponentTreeHook = __webpack_require__(19); + } + if (!keyUnique) { + true + ? warning( + false, + 'flattenChildren(...): Encountered two children with the same key, ' + + '`%s`. Child keys must be unique; when two children share a key, only ' + + 'the first child will be used.%s', + KeyEscapeUtils.unescape(name), + ReactComponentTreeHook.getStackAddendumByID(selfDebugID), + ) + : void 0; + } + } + if (keyUnique && child != null) { + result[name] = child; + } + } + } + + /** + * Flattens children that are typically specified as `props.children`. Any null + * children will not be included in the resulting object. + * @return {!object} flattened children keyed by name. + */ + function flattenChildren(children, selfDebugID) { + if (children == null) { + return children; + } + var result = {}; + + if (true) { + traverseAllChildren( + children, + function (traverseContext, child, name) { + return flattenSingleChildIntoContext(traverseContext, child, name, selfDebugID); + }, + result, + ); + } else { + traverseAllChildren(children, flattenSingleChildIntoContext, result); + } + return result; + } + + module.exports = flattenChildren; + /* WEBPACK VAR INJECTION */ + }).call(exports, __webpack_require__(84)); + + /***/ + }, + /* 780 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var getEventCharCode = __webpack_require__(206); + + /** + * Normalization of deprecated HTML5 `key` values + * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names + */ + var normalizeKey = { + Esc: 'Escape', + Spacebar: ' ', + Left: 'ArrowLeft', + Up: 'ArrowUp', + Right: 'ArrowRight', + Down: 'ArrowDown', + Del: 'Delete', + Win: 'OS', + Menu: 'ContextMenu', + Apps: 'ContextMenu', + Scroll: 'ScrollLock', + MozPrintableKey: 'Unidentified', + }; + + /** + * Translation from legacy `keyCode` to HTML5 `key` + * Only special keys supported, all others depend on keyboard layout or browser + * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names + */ + var translateToKey = { + 8: 'Backspace', + 9: 'Tab', + 12: 'Clear', + 13: 'Enter', + 16: 'Shift', + 17: 'Control', + 18: 'Alt', + 19: 'Pause', + 20: 'CapsLock', + 27: 'Escape', + 32: ' ', + 33: 'PageUp', + 34: 'PageDown', + 35: 'End', + 36: 'Home', + 37: 'ArrowLeft', + 38: 'ArrowUp', + 39: 'ArrowRight', + 40: 'ArrowDown', + 45: 'Insert', + 46: 'Delete', + 112: 'F1', + 113: 'F2', + 114: 'F3', + 115: 'F4', + 116: 'F5', + 117: 'F6', + 118: 'F7', + 119: 'F8', + 120: 'F9', + 121: 'F10', + 122: 'F11', + 123: 'F12', + 144: 'NumLock', + 145: 'ScrollLock', + 224: 'Meta', + }; + + /** + * @param {object} nativeEvent Native browser event. + * @return {string} Normalized `key` property. + */ + function getEventKey(nativeEvent) { + if (nativeEvent.key) { + // Normalize inconsistent values reported by browsers due to + // implementations of a working draft specification. + + // FireFox implements `key` but returns `MozPrintableKey` for all + // printable characters (normalized to `Unidentified`), ignore it. + var key = normalizeKey[nativeEvent.key] || nativeEvent.key; + if (key !== 'Unidentified') { + return key; + } + } + + // Browser does not implement `key`, polyfill as much of it as we can. + if (nativeEvent.type === 'keypress') { + var charCode = getEventCharCode(nativeEvent); + + // The enter-key is technically both printable and non-printable and can + // thus be captured by `keypress`, no other non-printable key should. + return charCode === 13 ? 'Enter' : String.fromCharCode(charCode); + } + if (nativeEvent.type === 'keydown' || nativeEvent.type === 'keyup') { + // While user keyboard layout determines the actual meaning of each + // `keyCode` value, almost all function keys have a universal value. + return translateToKey[nativeEvent.keyCode] || 'Unidentified'; + } + return ''; + } + + module.exports = getEventKey; + + /***/ + }, + /* 781 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + /* global Symbol */ + + var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; + var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec. + + /** + * Returns the iterator method function contained on the iterable object. + * + * Be sure to invoke the function with the iterable as context: + * + * var iteratorFn = getIteratorFn(myIterable); + * if (iteratorFn) { + * var iterator = iteratorFn.call(myIterable); + * ... + * } + * + * @param {?object} maybeIterable + * @return {?function} + */ + function getIteratorFn(maybeIterable) { + var iteratorFn = + maybeIterable && + ((ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL]) || maybeIterable[FAUX_ITERATOR_SYMBOL]); + if (typeof iteratorFn === 'function') { + return iteratorFn; + } + } + + module.exports = getIteratorFn; + + /***/ + }, + /* 782 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + /** + * Given any node return the first leaf node without children. + * + * @param {DOMElement|DOMTextNode} node + * @return {DOMElement|DOMTextNode} + */ + + function getLeafNode(node) { + while (node && node.firstChild) { + node = node.firstChild; + } + return node; + } + + /** + * Get the next sibling within a container. This will walk up the + * DOM if a node's siblings have been exhausted. + * + * @param {DOMElement|DOMTextNode} node + * @return {?DOMElement|DOMTextNode} + */ + function getSiblingNode(node) { + while (node) { + if (node.nextSibling) { + return node.nextSibling; + } + node = node.parentNode; + } + } + + /** + * Get object describing the nodes which contain characters at offset. + * + * @param {DOMElement|DOMTextNode} root + * @param {number} offset + * @return {?object} + */ + function getNodeForCharacterOffset(root, offset) { + var node = getLeafNode(root); + var nodeStart = 0; + var nodeEnd = 0; + + while (node) { + if (node.nodeType === 3) { + nodeEnd = nodeStart + node.textContent.length; + + if (nodeStart <= offset && nodeEnd >= offset) { + return { + node: node, + offset: offset - nodeStart, + }; + } + + nodeStart = nodeEnd; + } + + node = getLeafNode(getSiblingNode(node)); + } + } + + module.exports = getNodeForCharacterOffset; + + /***/ + }, + /* 783 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var escapeTextContentForBrowser = __webpack_require__(143); + + /** + * Escapes attribute value to prevent scripting attacks. + * + * @param {*} value Value to escape. + * @return {string} An escaped string. + */ + function quoteAttributeValueForBrowser(value) { + return '"' + escapeTextContentForBrowser(value) + '"'; + } + + module.exports = quoteAttributeValueForBrowser; + + /***/ + }, + /* 784 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var ReactMount = __webpack_require__(321); + + module.exports = ReactMount.renderSubtreeIntoContainer; + + /***/ + }, + /* 785 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + + var _assign = __webpack_require__(147); + + var _assign2 = _interopRequireDefault(_assign); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + exports.default = { + authenticityToken: function authenticityToken() { + var token = document.querySelector('meta[name="csrf-token"]'); + if (token && token instanceof window.HTMLMetaElement) { + return token.content; + } + return null; + }, + authenticityHeaders: function authenticityHeaders() { + var otherHeaders = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + + return (0, _assign2.default)(otherHeaders, { + 'X-CSRF-Token': this.authenticityToken(), + 'X-Requested-With': 'XMLHttpRequest', + }); + }, + }; + + /***/ + }, + /* 786 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.default = { + wrapInScriptTags: function wrapInScriptTags(scriptId, scriptBody) { + if (!scriptBody) { + return ''; + } + + return '\n<script id="' + scriptId + '">\n' + scriptBody + '\n</script>'; + }, + }; + + /***/ + }, + /* 787 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + + var _from = __webpack_require__(240); + + var _from2 = _interopRequireDefault(_from); + + var _keys = __webpack_require__(148); + + var _keys2 = _interopRequireDefault(_keys); + + var _map = __webpack_require__(241); + + var _map2 = _interopRequireDefault(_map); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + // key = name used by react_on_rails to identify the store + // value = redux store creator, which is a function that takes props and returns a store + var registeredStoreGenerators = new _map2.default(); + var hydratedStores = new _map2.default(); + + exports.default = { + /** + * Register a store generator, a function that takes props and returns a store. + * @param storeGenerators { name1: storeGenerator1, name2: storeGenerator2 } + */ + register: function register(storeGenerators) { + (0, _keys2.default)(storeGenerators).forEach(function (name) { + if (registeredStoreGenerators.has(name)) { + console.warn('Called registerStore for store that is already registered', name); + } + + var store = storeGenerators[name]; + if (!store) { + throw new Error( + 'Called ReactOnRails.registerStores with a null or undefined as a value ' + + ('for the store generator with key ' + name + '.'), + ); + } + + registeredStoreGenerators.set(name, store); + }); + }, + + /** + * Used by components to get the hydrated store which contains props. + * @param name + * @param throwIfMissing Defaults to true. Set to false to have this call return undefined if + * there is no store with the given name. + * @returns Redux Store, possibly hydrated + */ + getStore: function getStore(name) { + var throwIfMissing = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + + if (hydratedStores.has(name)) { + return hydratedStores.get(name); + } + + var storeKeys = (0, _from2.default)(hydratedStores.keys()).join(', '); + + if (storeKeys.length === 0) { + var msg = + 'There are no stores hydrated and you are requesting the store ' + + name + + ".\nThis can happen if you are server rendering and either:\n1. You do not call redux_store near the top of your controller action's view (not the layout)\n and before any call to react_component.\n2. You do not render redux_store_hydration_data anywhere on your page."; + throw new Error(msg); + } + + if (throwIfMissing) { + console.log('storeKeys', storeKeys); + throw new Error( + "Could not find hydrated store with name '" + + name + + "'. " + + ('Hydrated store names include [' + storeKeys + '].'), + ); + } + + return undefined; + }, + + /** + * Internally used function to get the store creator that was passed to `register`. + * @param name + * @returns storeCreator with given name + */ + getStoreGenerator: function getStoreGenerator(name) { + if (registeredStoreGenerators.has(name)) { + return registeredStoreGenerators.get(name); + } + + var storeKeys = (0, _from2.default)(registeredStoreGenerators.keys()).join(', '); + throw new Error( + "Could not find store registered with name '" + + name + + "'. Registered store " + + ('names include [ ' + storeKeys + ' ]. Maybe you forgot to register the store?'), + ); + }, + + /** + * Internally used function to set the hydrated store after a Rails page is loaded. + * @param name + * @param store (not the storeGenerator, but the hydrated store) + */ + setStore: function setStore(name, store) { + hydratedStores.set(name, store); + }, + + /** + * Internally used function to completely clear hydratedStores Map. + */ + clearHydratedStores: function clearHydratedStores() { + hydratedStores.clear(); + }, + + /** + * Get a Map containing all registered store generators. Useful for debugging. + * @returns Map where key is the component name and values are the store generators. + */ + storeGenerators: function storeGenerators() { + return registeredStoreGenerators; + }, + + /** + * Get a Map containing all hydrated stores. Useful for debugging. + * @returns Map where key is the component name and values are the hydrated stores. + */ + stores: function stores() { + return hydratedStores; + }, + }; + + /***/ + }, + /* 788 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (global) { + Object.defineProperty(exports, '__esModule', { + value: true, + }); + + var _stringify = __webpack_require__(120); + + var _stringify2 = _interopRequireDefault(_stringify); + + exports.reactOnRailsPageLoaded = reactOnRailsPageLoaded; + exports.clientStartup = clientStartup; + + var _reactDom = __webpack_require__(140); + + var _reactDom2 = _interopRequireDefault(_reactDom); + + var _createReactElement = __webpack_require__(213); + + var _createReactElement2 = _interopRequireDefault(_createReactElement); + + var _isCreateReactElementResultNonReactComponent = __webpack_require__(341); + + var _isCreateReactElementResultNonReactComponent2 = _interopRequireDefault( + _isCreateReactElementResultNonReactComponent, + ); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + var REACT_ON_RAILS_STORE_ATTRIBUTE = + 'data-js-react-on-rails-store'; /* global ReactOnRails Turbolinks */ + + function findContext() { + if (typeof window.ReactOnRails !== 'undefined') { + return window; + } else if (typeof ReactOnRails !== 'undefined') { + return global; + } + + throw new Error('ReactOnRails is undefined in both global and window namespaces.\n '); + } + + function debugTurbolinks() { + if (!window) { + return; + } + + var context = findContext(); + if (context.ReactOnRails.option('traceTurbolinks')) { + var _console; + + for (var _len = arguments.length, msg = Array(_len), _key = 0; _key < _len; _key++) { + msg[_key] = arguments[_key]; + } + + (_console = console).log.apply(_console, ['TURBO:'].concat(msg)); + } + } + + function turbolinksInstalled() { + return typeof Turbolinks !== 'undefined'; + } + + function forEach(fn, className, railsContext) { + var els = document.getElementsByClassName(className); + for (var i = 0; i < els.length; i += 1) { + fn(els[i], railsContext); + } + } + + function forEachByAttribute(fn, attributeName, railsContext) { + var els = document.querySelectorAll('[' + attributeName + ']'); + for (var i = 0; i < els.length; i += 1) { + fn(els[i], railsContext); + } + } + + function forEachComponent(fn, railsContext) { + forEach(fn, 'js-react-on-rails-component', railsContext); + } + + function initializeStore(el, railsContext) { + var context = findContext(); + var name = el.getAttribute(REACT_ON_RAILS_STORE_ATTRIBUTE); + var props = JSON.parse(el.textContent); + var storeGenerator = context.ReactOnRails.getStoreGenerator(name); + var store = storeGenerator(props, railsContext); + context.ReactOnRails.setStore(name, store); + } + + function forEachStore(railsContext) { + forEachByAttribute(initializeStore, REACT_ON_RAILS_STORE_ATTRIBUTE, railsContext); + } + + function turbolinksVersion5() { + return typeof Turbolinks.controller !== 'undefined'; + } + + function turbolinksSupported() { + return Turbolinks.supported; + } + + function delegateToRenderer(componentObj, props, railsContext, domNodeId, trace) { + var name = componentObj.name, + component = componentObj.component, + isRenderer = componentObj.isRenderer; + + if (isRenderer) { + if (trace) { + console.log( + 'DELEGATING TO RENDERER ' + + name + + ' for dom node with id: ' + + domNodeId + + ' with props, railsContext:', + props, + railsContext, + ); + } + + component(props, railsContext, domNodeId); + return true; + } + + return false; + } + + function domNodeIdForEl(el) { + return el.getAttribute('data-dom-id'); + } + + /** + * Used for client rendering by ReactOnRails. Either calls ReactDOM.render or delegates + * to a renderer registered by the user. + * @param el + */ + function render(el, railsContext) { + var context = findContext(); + // This must match app/helpers/react_on_rails_helper.rb:113 + var name = el.getAttribute('data-component-name'); + var domNodeId = domNodeIdForEl(el); + var props = JSON.parse(el.textContent); + var trace = el.getAttribute('data-trace'); + + try { + var domNode = document.getElementById(domNodeId); + if (domNode) { + var componentObj = context.ReactOnRails.getComponent(name); + if (delegateToRenderer(componentObj, props, railsContext, domNodeId, trace)) { + return; + } + + var reactElementOrRouterResult = (0, _createReactElement2.default)({ + componentObj: componentObj, + props: props, + domNodeId: domNodeId, + trace: trace, + railsContext: railsContext, + }); + + if ((0, _isCreateReactElementResultNonReactComponent2.default)(reactElementOrRouterResult)) { + throw new Error( + 'You returned a server side type of react-router error: ' + + (0, _stringify2.default)(reactElementOrRouterResult) + + '\nYou should return a React.Component always for the client side entry point.', + ); + } else { + _reactDom2.default.render(reactElementOrRouterResult, domNode); + } + } + } catch (e) { + e.message = + 'ReactOnRails encountered an error while rendering component: ' + + name + + '.\n' + + ('Original message: ' + e.message); + throw e; + } + } + + function parseRailsContext() { + var el = document.getElementById('js-react-on-rails-context'); + if (el) { + return JSON.parse(el.textContent); + } + + return null; + } + + function reactOnRailsPageLoaded() { + debugTurbolinks('reactOnRailsPageLoaded'); + + var railsContext = parseRailsContext(); + forEachStore(railsContext); + forEachComponent(render, railsContext); + } + + function unmount(el) { + var domNodeId = domNodeIdForEl(el); + var domNode = document.getElementById(domNodeId); + try { + _reactDom2.default.unmountComponentAtNode(domNode); + } catch (e) { + console.info( + 'Caught error calling unmountComponentAtNode: ' + e.message + ' for domNode', + domNode, + e, + ); + } + } + + function reactOnRailsPageUnloaded() { + debugTurbolinks('reactOnRailsPageUnloaded'); + forEachComponent(unmount); + } + + function clientStartup(context) { + var document = context.document; + + // Check if server rendering + if (!document) { + return; + } + + // Tried with a file local variable, but the install handler gets called twice. + // eslint-disable-next-line no-underscore-dangle + if (context.__REACT_ON_RAILS_EVENT_HANDLERS_RAN_ONCE__) { + return; + } + + // eslint-disable-next-line no-underscore-dangle, no-param-reassign + context.__REACT_ON_RAILS_EVENT_HANDLERS_RAN_ONCE__ = true; + + debugTurbolinks('Adding DOMContentLoaded event to install event listeners.'); + + document.addEventListener('DOMContentLoaded', function () { + // Install listeners when running on the client (browser). + // We must do this check for turbolinks AFTER the document is loaded because we load the + // Webpack bundles first. + + if (turbolinksInstalled() && turbolinksSupported()) { + if (turbolinksVersion5()) { + debugTurbolinks( + 'USING TURBOLINKS 5: document added event listeners ' + + 'turbolinks:before-render and turbolinks:render.', + ); + document.addEventListener('turbolinks:before-render', reactOnRailsPageUnloaded); + document.addEventListener('turbolinks:render', reactOnRailsPageLoaded); + reactOnRailsPageLoaded(); + } else { + debugTurbolinks( + 'USING TURBOLINKS 2: document added event listeners page:before-unload and ' + + 'page:change.', + ); + document.addEventListener('page:before-unload', reactOnRailsPageUnloaded); + document.addEventListener('page:change', reactOnRailsPageLoaded); + } + } else { + debugTurbolinks('NOT USING TURBOLINKS: DOMContentLoaded event, calling reactOnRailsPageLoaded'); + reactOnRailsPageLoaded(); + } + }); + } + /* WEBPACK VAR INJECTION */ + }).call(exports, __webpack_require__(22)); + + /***/ + }, + /* 789 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (global) { + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.default = context; + + /** + * Get the context, be it window or global + * @returns {boolean|Window|*|context} + */ + function context() { + return ( + (typeof window !== 'undefined' && window) || (typeof global !== 'undefined' && global) || this + ); + } + /* WEBPACK VAR INJECTION */ + }).call(exports, __webpack_require__(22)); + + /***/ + }, + /* 790 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.default = generatorFunction; + + // See discussion: + // https://discuss.reactjs.org/t/how-to-determine-if-js-object-is-react-component/2825/2 + + /** + * Used to determine we'll call be calling React.createElement on the component of if this is a + * generator function used return a function that takes props to return a React element + * @param component + * @returns {boolean} + */ + function generatorFunction(component) { + if (!component.prototype) { + return false; + } + + // es5 or es6 React Component + return !component.prototype.isReactComponent; + } + + /***/ + }, + /* 791 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + + exports.default = function (val) { + // Replace closing + var re = /<\/\W*script/gi; + return val.replace(re, '(/script'); + }; + + /***/ + }, + /* 792 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + + var _stringify = __webpack_require__(120); + + var _stringify2 = _interopRequireDefault(_stringify); + + exports.default = serverRenderReactComponent; + + var _server = __webpack_require__(337); + + var _server2 = _interopRequireDefault(_server); + + var _ComponentRegistry = __webpack_require__(338); + + var _ComponentRegistry2 = _interopRequireDefault(_ComponentRegistry); + + var _createReactElement = __webpack_require__(213); + + var _createReactElement2 = _interopRequireDefault(_createReactElement); + + var _isCreateReactElementResultNonReactComponent = __webpack_require__(341); + + var _isCreateReactElementResultNonReactComponent2 = _interopRequireDefault( + _isCreateReactElementResultNonReactComponent, + ); + + var _buildConsoleReplay = __webpack_require__(339); + + var _buildConsoleReplay2 = _interopRequireDefault(_buildConsoleReplay); + + var _handleError = __webpack_require__(340); + + var _handleError2 = _interopRequireDefault(_handleError); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + function serverRenderReactComponent(options) { + var name = options.name, + domNodeId = options.domNodeId, + trace = options.trace, + props = options.props, + railsContext = options.railsContext; + + var htmlResult = ''; + var hasErrors = false; + + try { + var componentObj = _ComponentRegistry2.default.get(name); + if (componentObj.isRenderer) { + throw new Error( + "Detected a renderer while server rendering component '" + + name + + "'. See https://github.com/shakacode/react_on_rails#renderer-functions", + ); + } + + var reactElementOrRouterResult = (0, _createReactElement2.default)({ + componentObj: componentObj, + domNodeId: domNodeId, + trace: trace, + props: props, + railsContext: railsContext, + }); + + if ((0, _isCreateReactElementResultNonReactComponent2.default)(reactElementOrRouterResult)) { + // We let the client side handle any redirect + // Set hasErrors in case we want to throw a Rails exception + hasErrors = !!reactElementOrRouterResult.routeError; + + if (hasErrors) { + console.error( + 'React Router ERROR: ' + (0, _stringify2.default)(reactElementOrRouterResult.routeError), + ); + } + + if (reactElementOrRouterResult.redirectLocation) { + if (trace) { + var redirectLocation = reactElementOrRouterResult.redirectLocation; + var redirectPath = redirectLocation.pathname + redirectLocation.search; + console.log( + 'ROUTER REDIRECT: ' + + name + + ' to dom node with id: ' + + domNodeId + + ', redirect to ' + + redirectPath, + ); + } + // For redirects on server rendering, we can't stop Rails from returning the same result. + // Possibly, someday, we could have the rails server redirect. + } else { + htmlResult = reactElementOrRouterResult.renderedHtml; + } + } else { + htmlResult = _server2.default.renderToString(reactElementOrRouterResult); + } + } catch (e) { + hasErrors = true; + htmlResult = (0, _handleError2.default)({ + e: e, + name: name, + serverSide: true, + }); + } + + var consoleReplayScript = (0, _buildConsoleReplay2.default)(); + + return (0, _stringify2.default)({ + html: htmlResult, + consoleReplayScript: consoleReplayScript, + hasErrors: hasErrors, + }); + } + + /***/ + }, + /* 793 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + exports.default = all; + + var _createChainableTypeChecker = __webpack_require__(342); + + var _createChainableTypeChecker2 = _interopRequireDefault(_createChainableTypeChecker); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + function all() { + for (var _len = arguments.length, validators = Array(_len), _key = 0; _key < _len; _key++) { + validators[_key] = arguments[_key]; + } + + function allPropTypes() { + for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { + args[_key2] = arguments[_key2]; + } + + var error = null; + + validators.forEach(function (validator) { + if (error != null) { + return; + } + + var result = validator.apply(undefined, args); + if (result != null) { + error = result; + } + }); + + return error; + } + + return (0, _createChainableTypeChecker2.default)(allPropTypes); + } + + /***/ + }, + /* 794 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + exports['default'] = undefined; + + var _react = __webpack_require__(1); + + var _storeShape = __webpack_require__(343); + + var _storeShape2 = _interopRequireDefault(_storeShape); + + var _warning = __webpack_require__(344); + + var _warning2 = _interopRequireDefault(_warning); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + var didWarnAboutReceivingStore = false; + function warnAboutReceivingStore() { + if (didWarnAboutReceivingStore) { + return; + } + didWarnAboutReceivingStore = true; + + (0, _warning2['default'])( + '<Provider> does not support changing `store` on the fly. ' + + 'It is most likely that you see this error because you updated to ' + + 'Redux 2.x and React Redux 2.x which no longer hot reload reducers ' + + 'automatically. See https://github.com/reactjs/react-redux/releases/' + + 'tag/v2.0.0 for the migration instructions.', + ); + } + + var Provider = (function (_Component) { + _inherits(Provider, _Component); + + Provider.prototype.getChildContext = function getChildContext() { + return { store: this.store }; + }; + + function Provider(props, context) { + _classCallCheck(this, Provider); + + var _this = _possibleConstructorReturn(this, _Component.call(this, props, context)); + + _this.store = props.store; + return _this; + } + + Provider.prototype.render = function render() { + return _react.Children.only(this.props.children); + }; + + return Provider; + })(_react.Component); + + exports['default'] = Provider; + + if (true) { + Provider.prototype.componentWillReceiveProps = function (nextProps) { + var store = this.store; + var nextStore = nextProps.store; + + if (store !== nextStore) { + warnAboutReceivingStore(); + } + }; + } + + Provider.propTypes = { + store: _storeShape2['default'].isRequired, + children: _react.PropTypes.element.isRequired, + }; + Provider.childContextTypes = { + store: _storeShape2['default'].isRequired, + }; + + /***/ + }, + /* 795 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + exports['default'] = connect; + + var _react = __webpack_require__(1); + + var _storeShape = __webpack_require__(343); + + var _storeShape2 = _interopRequireDefault(_storeShape); + + var _shallowEqual = __webpack_require__(796); + + var _shallowEqual2 = _interopRequireDefault(_shallowEqual); + + var _wrapActionCreators = __webpack_require__(797); + + var _wrapActionCreators2 = _interopRequireDefault(_wrapActionCreators); + + var _warning = __webpack_require__(344); + + var _warning2 = _interopRequireDefault(_warning); + + var _isPlainObject = __webpack_require__(705); + + var _isPlainObject2 = _interopRequireDefault(_isPlainObject); + + var _hoistNonReactStatics = __webpack_require__(295); + + var _hoistNonReactStatics2 = _interopRequireDefault(_hoistNonReactStatics); + + var _invariant = __webpack_require__(16); + + var _invariant2 = _interopRequireDefault(_invariant); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + var defaultMapStateToProps = function defaultMapStateToProps(state) { + return {}; + }; // eslint-disable-line no-unused-vars + var defaultMapDispatchToProps = function defaultMapDispatchToProps(dispatch) { + return { dispatch: dispatch }; + }; + var defaultMergeProps = function defaultMergeProps(stateProps, dispatchProps, parentProps) { + return _extends({}, parentProps, stateProps, dispatchProps); + }; + + function getDisplayName(WrappedComponent) { + return WrappedComponent.displayName || WrappedComponent.name || 'Component'; + } + + var errorObject = { value: null }; + function tryCatch(fn, ctx) { + try { + return fn.apply(ctx); + } catch (e) { + errorObject.value = e; + return errorObject; + } + } + + // Helps track hot reloading. + var nextVersion = 0; + + function connect(mapStateToProps, mapDispatchToProps, mergeProps) { + var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; + + var shouldSubscribe = Boolean(mapStateToProps); + var mapState = mapStateToProps || defaultMapStateToProps; + + var mapDispatch = void 0; + if (typeof mapDispatchToProps === 'function') { + mapDispatch = mapDispatchToProps; + } else if (!mapDispatchToProps) { + mapDispatch = defaultMapDispatchToProps; + } else { + mapDispatch = (0, _wrapActionCreators2['default'])(mapDispatchToProps); + } + + var finalMergeProps = mergeProps || defaultMergeProps; + var _options$pure = options.pure, + pure = _options$pure === undefined ? true : _options$pure, + _options$withRef = options.withRef, + withRef = _options$withRef === undefined ? false : _options$withRef; + + var checkMergedEquals = pure && finalMergeProps !== defaultMergeProps; + + // Helps track hot reloading. + var version = nextVersion++; + + return function wrapWithConnect(WrappedComponent) { + var connectDisplayName = 'Connect(' + getDisplayName(WrappedComponent) + ')'; + + function checkStateShape(props, methodName) { + if (!(0, _isPlainObject2['default'])(props)) { + (0, _warning2['default'])( + methodName + + '() in ' + + connectDisplayName + + ' must return a plain object. ' + + ('Instead received ' + props + '.'), + ); + } + } + + function computeMergedProps(stateProps, dispatchProps, parentProps) { + var mergedProps = finalMergeProps(stateProps, dispatchProps, parentProps); + if (true) { + checkStateShape(mergedProps, 'mergeProps'); + } + return mergedProps; + } + + var Connect = (function (_Component) { + _inherits(Connect, _Component); + + Connect.prototype.shouldComponentUpdate = function shouldComponentUpdate() { + return !pure || this.haveOwnPropsChanged || this.hasStoreStateChanged; + }; + + function Connect(props, context) { + _classCallCheck(this, Connect); + + var _this = _possibleConstructorReturn(this, _Component.call(this, props, context)); + + _this.version = version; + _this.store = props.store || context.store; + + (0, _invariant2['default'])( + _this.store, + 'Could not find "store" in either the context or ' + + ('props of "' + connectDisplayName + '". ') + + 'Either wrap the root component in a <Provider>, ' + + ('or explicitly pass "store" as a prop to "' + connectDisplayName + '".'), + ); + + var storeState = _this.store.getState(); + _this.state = { storeState: storeState }; + _this.clearCache(); + return _this; + } + + Connect.prototype.computeStateProps = function computeStateProps(store, props) { + if (!this.finalMapStateToProps) { + return this.configureFinalMapState(store, props); + } + + var state = store.getState(); + var stateProps = this.doStatePropsDependOnOwnProps + ? this.finalMapStateToProps(state, props) + : this.finalMapStateToProps(state); + + if (true) { + checkStateShape(stateProps, 'mapStateToProps'); + } + return stateProps; + }; + + Connect.prototype.configureFinalMapState = function configureFinalMapState(store, props) { + var mappedState = mapState(store.getState(), props); + var isFactory = typeof mappedState === 'function'; + + this.finalMapStateToProps = isFactory ? mappedState : mapState; + this.doStatePropsDependOnOwnProps = this.finalMapStateToProps.length !== 1; + + if (isFactory) { + return this.computeStateProps(store, props); + } + + if (true) { + checkStateShape(mappedState, 'mapStateToProps'); + } + return mappedState; + }; + + Connect.prototype.computeDispatchProps = function computeDispatchProps(store, props) { + if (!this.finalMapDispatchToProps) { + return this.configureFinalMapDispatch(store, props); + } + + var dispatch = store.dispatch; + + var dispatchProps = this.doDispatchPropsDependOnOwnProps + ? this.finalMapDispatchToProps(dispatch, props) + : this.finalMapDispatchToProps(dispatch); + + if (true) { + checkStateShape(dispatchProps, 'mapDispatchToProps'); + } + return dispatchProps; + }; + + Connect.prototype.configureFinalMapDispatch = function configureFinalMapDispatch(store, props) { + var mappedDispatch = mapDispatch(store.dispatch, props); + var isFactory = typeof mappedDispatch === 'function'; + + this.finalMapDispatchToProps = isFactory ? mappedDispatch : mapDispatch; + this.doDispatchPropsDependOnOwnProps = this.finalMapDispatchToProps.length !== 1; + + if (isFactory) { + return this.computeDispatchProps(store, props); + } + + if (true) { + checkStateShape(mappedDispatch, 'mapDispatchToProps'); + } + return mappedDispatch; + }; + + Connect.prototype.updateStatePropsIfNeeded = function updateStatePropsIfNeeded() { + var nextStateProps = this.computeStateProps(this.store, this.props); + if (this.stateProps && (0, _shallowEqual2['default'])(nextStateProps, this.stateProps)) { + return false; + } + + this.stateProps = nextStateProps; + return true; + }; + + Connect.prototype.updateDispatchPropsIfNeeded = function updateDispatchPropsIfNeeded() { + var nextDispatchProps = this.computeDispatchProps(this.store, this.props); + if ( + this.dispatchProps && + (0, _shallowEqual2['default'])(nextDispatchProps, this.dispatchProps) + ) { + return false; + } + + this.dispatchProps = nextDispatchProps; + return true; + }; + + Connect.prototype.updateMergedPropsIfNeeded = function updateMergedPropsIfNeeded() { + var nextMergedProps = computeMergedProps(this.stateProps, this.dispatchProps, this.props); + if ( + this.mergedProps && + checkMergedEquals && + (0, _shallowEqual2['default'])(nextMergedProps, this.mergedProps) + ) { + return false; + } + + this.mergedProps = nextMergedProps; + return true; + }; + + Connect.prototype.isSubscribed = function isSubscribed() { + return typeof this.unsubscribe === 'function'; + }; + + Connect.prototype.trySubscribe = function trySubscribe() { + if (shouldSubscribe && !this.unsubscribe) { + this.unsubscribe = this.store.subscribe(this.handleChange.bind(this)); + this.handleChange(); + } + }; + + Connect.prototype.tryUnsubscribe = function tryUnsubscribe() { + if (this.unsubscribe) { + this.unsubscribe(); + this.unsubscribe = null; + } + }; + + Connect.prototype.componentDidMount = function componentDidMount() { + this.trySubscribe(); + }; + + Connect.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) { + if (!pure || !(0, _shallowEqual2['default'])(nextProps, this.props)) { + this.haveOwnPropsChanged = true; + } + }; + + Connect.prototype.componentWillUnmount = function componentWillUnmount() { + this.tryUnsubscribe(); + this.clearCache(); + }; + + Connect.prototype.clearCache = function clearCache() { + this.dispatchProps = null; + this.stateProps = null; + this.mergedProps = null; + this.haveOwnPropsChanged = true; + this.hasStoreStateChanged = true; + this.haveStatePropsBeenPrecalculated = false; + this.statePropsPrecalculationError = null; + this.renderedElement = null; + this.finalMapDispatchToProps = null; + this.finalMapStateToProps = null; + }; + + Connect.prototype.handleChange = function handleChange() { + if (!this.unsubscribe) { + return; + } + + var storeState = this.store.getState(); + var prevStoreState = this.state.storeState; + if (pure && prevStoreState === storeState) { + return; + } + + if (pure && !this.doStatePropsDependOnOwnProps) { + var haveStatePropsChanged = tryCatch(this.updateStatePropsIfNeeded, this); + if (!haveStatePropsChanged) { + return; + } + if (haveStatePropsChanged === errorObject) { + this.statePropsPrecalculationError = errorObject.value; + } + this.haveStatePropsBeenPrecalculated = true; + } + + this.hasStoreStateChanged = true; + this.setState({ storeState: storeState }); + }; + + Connect.prototype.getWrappedInstance = function getWrappedInstance() { + (0, _invariant2['default'])( + withRef, + 'To access the wrapped instance, you need to specify ' + + '{ withRef: true } as the fourth argument of the connect() call.', + ); + + return this.refs.wrappedInstance; + }; + + Connect.prototype.render = function render() { + var haveOwnPropsChanged = this.haveOwnPropsChanged, + hasStoreStateChanged = this.hasStoreStateChanged, + haveStatePropsBeenPrecalculated = this.haveStatePropsBeenPrecalculated, + statePropsPrecalculationError = this.statePropsPrecalculationError, + renderedElement = this.renderedElement; + + this.haveOwnPropsChanged = false; + this.hasStoreStateChanged = false; + this.haveStatePropsBeenPrecalculated = false; + this.statePropsPrecalculationError = null; + + if (statePropsPrecalculationError) { + throw statePropsPrecalculationError; + } + + var shouldUpdateStateProps = true; + var shouldUpdateDispatchProps = true; + if (pure && renderedElement) { + shouldUpdateStateProps = + hasStoreStateChanged || (haveOwnPropsChanged && this.doStatePropsDependOnOwnProps); + shouldUpdateDispatchProps = haveOwnPropsChanged && this.doDispatchPropsDependOnOwnProps; + } + + var haveStatePropsChanged = false; + var haveDispatchPropsChanged = false; + if (haveStatePropsBeenPrecalculated) { + haveStatePropsChanged = true; + } else if (shouldUpdateStateProps) { + haveStatePropsChanged = this.updateStatePropsIfNeeded(); + } + if (shouldUpdateDispatchProps) { + haveDispatchPropsChanged = this.updateDispatchPropsIfNeeded(); + } + + var haveMergedPropsChanged = true; + if (haveStatePropsChanged || haveDispatchPropsChanged || haveOwnPropsChanged) { + haveMergedPropsChanged = this.updateMergedPropsIfNeeded(); + } else { + haveMergedPropsChanged = false; + } + + if (!haveMergedPropsChanged && renderedElement) { + return renderedElement; + } + + if (withRef) { + this.renderedElement = (0, _react.createElement)( + WrappedComponent, + _extends({}, this.mergedProps, { + ref: 'wrappedInstance', + }), + ); + } else { + this.renderedElement = (0, _react.createElement)(WrappedComponent, this.mergedProps); + } + + return this.renderedElement; + }; + + return Connect; + })(_react.Component); + + Connect.displayName = connectDisplayName; + Connect.WrappedComponent = WrappedComponent; + Connect.contextTypes = { + store: _storeShape2['default'], + }; + Connect.propTypes = { + store: _storeShape2['default'], + }; + + if (true) { + Connect.prototype.componentWillUpdate = function componentWillUpdate() { + if (this.version === version) { + return; + } + + // We are hot reloading! + this.version = version; + this.trySubscribe(); + this.clearCache(); + }; + } + + return (0, _hoistNonReactStatics2['default'])(Connect, WrappedComponent); + }; + } + + /***/ + }, + /* 796 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + exports['default'] = shallowEqual; + function shallowEqual(objA, objB) { + if (objA === objB) { + return true; + } + + var keysA = Object.keys(objA); + var keysB = Object.keys(objB); + + if (keysA.length !== keysB.length) { + return false; + } + + // Test for A's keys different from B. + var hasOwn = Object.prototype.hasOwnProperty; + for (var i = 0; i < keysA.length; i++) { + if (!hasOwn.call(objB, keysA[i]) || objA[keysA[i]] !== objB[keysA[i]]) { + return false; + } + } + + return true; + } + + /***/ + }, + /* 797 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + exports['default'] = wrapActionCreators; + + var _redux = __webpack_require__(119); + + function wrapActionCreators(actionCreators) { + return function (dispatch) { + return (0, _redux.bindActionCreators)(actionCreators, dispatch); + }; + } + + /***/ + }, + /* 798 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.routerMiddleware = + exports.routerActions = + exports.goForward = + exports.goBack = + exports.go = + exports.replace = + exports.push = + exports.CALL_HISTORY_METHOD = + exports.routerReducer = + exports.LOCATION_CHANGE = + exports.syncHistoryWithStore = + undefined; + + var _reducer = __webpack_require__(346); + + Object.defineProperty(exports, 'LOCATION_CHANGE', { + enumerable: true, + get: function get() { + return _reducer.LOCATION_CHANGE; + }, + }); + Object.defineProperty(exports, 'routerReducer', { + enumerable: true, + get: function get() { + return _reducer.routerReducer; + }, + }); + + var _actions = __webpack_require__(345); + + Object.defineProperty(exports, 'CALL_HISTORY_METHOD', { + enumerable: true, + get: function get() { + return _actions.CALL_HISTORY_METHOD; + }, + }); + Object.defineProperty(exports, 'push', { + enumerable: true, + get: function get() { + return _actions.push; + }, + }); + Object.defineProperty(exports, 'replace', { + enumerable: true, + get: function get() { + return _actions.replace; + }, + }); + Object.defineProperty(exports, 'go', { + enumerable: true, + get: function get() { + return _actions.go; + }, + }); + Object.defineProperty(exports, 'goBack', { + enumerable: true, + get: function get() { + return _actions.goBack; + }, + }); + Object.defineProperty(exports, 'goForward', { + enumerable: true, + get: function get() { + return _actions.goForward; + }, + }); + Object.defineProperty(exports, 'routerActions', { + enumerable: true, + get: function get() { + return _actions.routerActions; + }, + }); + + var _sync = __webpack_require__(800); + + var _sync2 = _interopRequireDefault(_sync); + + var _middleware = __webpack_require__(799); + + var _middleware2 = _interopRequireDefault(_middleware); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + exports.syncHistoryWithStore = _sync2['default']; + exports.routerMiddleware = _middleware2['default']; + + /***/ + }, + /* 799 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports['default'] = routerMiddleware; + + var _actions = __webpack_require__(345); + + function _toConsumableArray(arr) { + if (Array.isArray(arr)) { + for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { + arr2[i] = arr[i]; + } + return arr2; + } else { + return Array.from(arr); + } + } + + /** + * This middleware captures CALL_HISTORY_METHOD actions to redirect to the + * provided history object. This will prevent these actions from reaching your + * reducer or any middleware that comes after this one. + */ + function routerMiddleware(history) { + return function () { + return function (next) { + return function (action) { + if (action.type !== _actions.CALL_HISTORY_METHOD) { + return next(action); + } + + var _action$payload = action.payload, + method = _action$payload.method, + args = _action$payload.args; + + history[method].apply(history, _toConsumableArray(args)); + }; + }; + }; + } + + /***/ + }, + /* 800 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + exports['default'] = syncHistoryWithStore; + + var _reducer = __webpack_require__(346); + + var defaultSelectLocationState = function defaultSelectLocationState(state) { + return state.routing; + }; + + /** + * This function synchronizes your history state with the Redux store. + * Location changes flow from history to the store. An enhanced history is + * returned with a listen method that responds to store updates for location. + * + * When this history is provided to the router, this means the location data + * will flow like this: + * history.push -> store.dispatch -> enhancedHistory.listen -> router + * This ensures that when the store state changes due to a replay or other + * event, the router will be updated appropriately and can transition to the + * correct router state. + */ + function syncHistoryWithStore(history, store) { + var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}, + _ref$selectLocationSt = _ref.selectLocationState, + selectLocationState = + _ref$selectLocationSt === undefined ? defaultSelectLocationState : _ref$selectLocationSt, + _ref$adjustUrlOnRepla = _ref.adjustUrlOnReplay, + adjustUrlOnReplay = _ref$adjustUrlOnRepla === undefined ? true : _ref$adjustUrlOnRepla; + + // Ensure that the reducer is mounted on the store and functioning properly. + if (typeof selectLocationState(store.getState()) === 'undefined') { + throw new Error( + 'Expected the routing state to be available either as `state.routing` ' + + 'or as the custom expression you can specify as `selectLocationState` ' + + 'in the `syncHistoryWithStore()` options. ' + + "Ensure you have added the `routerReducer` to your store's " + + 'reducers via `combineReducers` or whatever method you use to isolate ' + + 'your reducers.', + ); + } + + var initialLocation = void 0; + var isTimeTraveling = void 0; + var unsubscribeFromStore = void 0; + var unsubscribeFromHistory = void 0; + var currentLocation = void 0; + + // What does the store say about current location? + var getLocationInStore = function getLocationInStore(useInitialIfEmpty) { + var locationState = selectLocationState(store.getState()); + return locationState.locationBeforeTransitions || (useInitialIfEmpty ? initialLocation : undefined); + }; + + // Init initialLocation with potential location in store + initialLocation = getLocationInStore(); + + // If the store is replayed, update the URL in the browser to match. + if (adjustUrlOnReplay) { + var handleStoreChange = function handleStoreChange() { + var locationInStore = getLocationInStore(true); + if (currentLocation === locationInStore || initialLocation === locationInStore) { + return; + } + + // Update address bar to reflect store state + isTimeTraveling = true; + currentLocation = locationInStore; + history.transitionTo( + _extends({}, locationInStore, { + action: 'PUSH', + }), + ); + isTimeTraveling = false; + }; + + unsubscribeFromStore = store.subscribe(handleStoreChange); + handleStoreChange(); + } + + // Whenever location changes, dispatch an action to get it in the store + var handleLocationChange = function handleLocationChange(location) { + // ... unless we just caused that location change + if (isTimeTraveling) { + return; + } + + // Remember where we are + currentLocation = location; + + // Are we being called for the first time? + if (!initialLocation) { + // Remember as a fallback in case state is reset + initialLocation = location; + + // Respect persisted location, if any + if (getLocationInStore()) { + return; + } + } + + // Tell the store to update by dispatching an action + store.dispatch({ + type: _reducer.LOCATION_CHANGE, + payload: location, + }); + }; + unsubscribeFromHistory = history.listen(handleLocationChange); + + // History 3.x doesn't call listen synchronously, so fire the initial location change ourselves + if (history.getCurrentLocation) { + handleLocationChange(history.getCurrentLocation()); + } + + // The enhanced history uses store as source of truth + return _extends({}, history, { + // The listeners are subscribed to the store instead of history + listen: function listen(listener) { + // Copy of last location. + var lastPublishedLocation = getLocationInStore(true); + + // Keep track of whether we unsubscribed, as Redux store + // only applies changes in subscriptions on next dispatch + var unsubscribed = false; + var unsubscribeFromStore = store.subscribe(function () { + var currentLocation = getLocationInStore(true); + if (currentLocation === lastPublishedLocation) { + return; + } + lastPublishedLocation = currentLocation; + if (!unsubscribed) { + listener(lastPublishedLocation); + } + }); + + // History 2.x listeners expect a synchronous call. Make the first call to the + // listener after subscribing to the store, in case the listener causes a + // location change (e.g. when it redirects) + if (!history.getCurrentLocation) { + listener(lastPublishedLocation); + } + + // Let user unsubscribe later + return function () { + unsubscribed = true; + unsubscribeFromStore(); + }; + }, + + // It also provides a way to destroy internal listeners + unsubscribe: function unsubscribe() { + if (adjustUrlOnReplay) { + unsubscribeFromStore(); + } + unsubscribeFromHistory(); + }, + }); + } + + /***/ + }, + /* 801 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Link__ = __webpack_require__(347); + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + /** + * An <IndexLink> is used to link to an <IndexRoute>. + */ + var IndexLink = __WEBPACK_IMPORTED_MODULE_0_react___default.a.createClass({ + displayName: 'IndexLink', + render: function render() { + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_1__Link__['a' /* default */], + _extends({}, this.props, { onlyActiveOnIndex: true }), + ); + }, + }); + + /* harmony default export */ __webpack_exports__['a'] = IndexLink; + + /***/ + }, + /* 802 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__routerWarning__ = __webpack_require__(106); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant__ = __webpack_require__(16); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_2_invariant__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Redirect__ = __webpack_require__(349); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__InternalPropTypes__ = __webpack_require__(118); + + var _React$PropTypes = __WEBPACK_IMPORTED_MODULE_0_react___default.a.PropTypes, + string = _React$PropTypes.string, + object = _React$PropTypes.object; + + /** + * An <IndexRedirect> is used to redirect from an indexRoute. + */ + /* eslint-disable react/require-render-return */ + + var IndexRedirect = __WEBPACK_IMPORTED_MODULE_0_react___default.a.createClass({ + displayName: 'IndexRedirect', + + statics: { + createRouteFromReactElement: function createRouteFromReactElement(element, parentRoute) { + /* istanbul ignore else: sanity check */ + if (parentRoute) { + parentRoute.indexRoute = + __WEBPACK_IMPORTED_MODULE_3__Redirect__['a' /* default */].createRouteFromReactElement( + element, + ); + } else { + true + ? __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__routerWarning__['a' /* default */])( + false, + 'An <IndexRedirect> does not make sense at the root of your route config', + ) + : void 0; + } + }, + }, + + propTypes: { + to: string.isRequired, + query: object, + state: object, + onEnter: __WEBPACK_IMPORTED_MODULE_4__InternalPropTypes__['c' /* falsy */], + children: __WEBPACK_IMPORTED_MODULE_4__InternalPropTypes__['c' /* falsy */], + }, + + /* istanbul ignore next: sanity check */ + render: function render() { + true + ? true + ? __WEBPACK_IMPORTED_MODULE_2_invariant___default()( + false, + '<IndexRedirect> elements are for router configuration only and should not be rendered', + ) + : invariant(false) + : void 0; + }, + }); + + /* harmony default export */ __webpack_exports__['a'] = IndexRedirect; + + /***/ + }, + /* 803 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__routerWarning__ = __webpack_require__(106); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant__ = __webpack_require__(16); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_2_invariant__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__RouteUtils__ = __webpack_require__(68); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__InternalPropTypes__ = __webpack_require__(118); + + var func = __WEBPACK_IMPORTED_MODULE_0_react___default.a.PropTypes.func; + + /** + * An <IndexRoute> is used to specify its parent's <Route indexRoute> in + * a JSX route config. + */ + /* eslint-disable react/require-render-return */ + + var IndexRoute = __WEBPACK_IMPORTED_MODULE_0_react___default.a.createClass({ + displayName: 'IndexRoute', + + statics: { + createRouteFromReactElement: function createRouteFromReactElement(element, parentRoute) { + /* istanbul ignore else: sanity check */ + if (parentRoute) { + parentRoute.indexRoute = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_3__RouteUtils__['c' /* createRouteFromReactElement */], + )(element); + } else { + true + ? __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__routerWarning__['a' /* default */])( + false, + 'An <IndexRoute> does not make sense at the root of your route config', + ) + : void 0; + } + }, + }, + + propTypes: { + path: __WEBPACK_IMPORTED_MODULE_4__InternalPropTypes__['c' /* falsy */], + component: __WEBPACK_IMPORTED_MODULE_4__InternalPropTypes__['a' /* component */], + components: __WEBPACK_IMPORTED_MODULE_4__InternalPropTypes__['b' /* components */], + getComponent: func, + getComponents: func, + }, + + /* istanbul ignore next: sanity check */ + render: function render() { + true + ? true + ? __WEBPACK_IMPORTED_MODULE_2_invariant___default()( + false, + '<IndexRoute> elements are for router configuration only and should not be rendered', + ) + : invariant(false) + : void 0; + }, + }); + + /* harmony default export */ __webpack_exports__['a'] = IndexRoute; + + /***/ + }, + /* 804 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(16); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_invariant__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__RouteUtils__ = __webpack_require__(68); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__InternalPropTypes__ = __webpack_require__(118); + + var _React$PropTypes = __WEBPACK_IMPORTED_MODULE_0_react___default.a.PropTypes, + string = _React$PropTypes.string, + func = _React$PropTypes.func; + + /** + * A <Route> is used to declare which components are rendered to the + * page when the URL matches a given pattern. + * + * Routes are arranged in a nested tree structure. When a new URL is + * requested, the tree is searched depth-first to find a route whose + * path matches the URL. When one is found, all routes in the tree + * that lead to it are considered "active" and their components are + * rendered into the DOM, nested in the same order as in the tree. + */ + /* eslint-disable react/require-render-return */ + + var Route = __WEBPACK_IMPORTED_MODULE_0_react___default.a.createClass({ + displayName: 'Route', + + statics: { + createRouteFromReactElement: + __WEBPACK_IMPORTED_MODULE_2__RouteUtils__['c' /* createRouteFromReactElement */], + }, + + propTypes: { + path: string, + component: __WEBPACK_IMPORTED_MODULE_3__InternalPropTypes__['a' /* component */], + components: __WEBPACK_IMPORTED_MODULE_3__InternalPropTypes__['b' /* components */], + getComponent: func, + getComponents: func, + }, + + /* istanbul ignore next: sanity check */ + render: function render() { + true + ? true + ? __WEBPACK_IMPORTED_MODULE_1_invariant___default()( + false, + '<Route> elements are for router configuration only and should not be rendered', + ) + : invariant(false) + : void 0; + }, + }); + + /* harmony default export */ __webpack_exports__['a'] = Route; + + /***/ + }, + /* 805 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant__ = __webpack_require__(16); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_invariant__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__createTransitionManager__ = + __webpack_require__(353); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__InternalPropTypes__ = __webpack_require__(118); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__RouterContext__ = __webpack_require__(217); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__RouteUtils__ = __webpack_require__(68); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__RouterUtils__ = __webpack_require__(350); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__routerWarning__ = __webpack_require__(106); + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + function _objectWithoutProperties(obj, keys) { + var target = {}; + for (var i in obj) { + if (keys.indexOf(i) >= 0) continue; + if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; + target[i] = obj[i]; + } + return target; + } + + var _React$PropTypes = __WEBPACK_IMPORTED_MODULE_1_react___default.a.PropTypes, + func = _React$PropTypes.func, + object = _React$PropTypes.object; + + /** + * A <Router> is a high-level API for automatically setting up + * a router that renders a <RouterContext> with all the props + * it needs each time the URL changes. + */ + + var Router = __WEBPACK_IMPORTED_MODULE_1_react___default.a.createClass({ + displayName: 'Router', + + propTypes: { + history: object, + children: __WEBPACK_IMPORTED_MODULE_3__InternalPropTypes__['d' /* routes */], + routes: __WEBPACK_IMPORTED_MODULE_3__InternalPropTypes__['d' /* routes */], // alias for children + render: func, + createElement: func, + onError: func, + onUpdate: func, + + // PRIVATE: For client-side rehydration of server match. + matchContext: object, + }, + + getDefaultProps: function getDefaultProps() { + return { + render: function render(props) { + return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_4__RouterContext__['a' /* default */], + props, + ); + }, + }; + }, + getInitialState: function getInitialState() { + return { + location: null, + routes: null, + params: null, + components: null, + }; + }, + handleError: function handleError(error) { + if (this.props.onError) { + this.props.onError.call(this, error); + } else { + // Throw errors by default so we don't silently swallow them! + throw error; // This error probably occurred in getChildRoutes or getComponents. + } + }, + createRouterObject: function createRouterObject(state) { + var matchContext = this.props.matchContext; + + if (matchContext) { + return matchContext.router; + } + + var history = this.props.history; + + return __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_6__RouterUtils__['a' /* createRouterObject */], + )(history, this.transitionManager, state); + }, + createTransitionManager: function createTransitionManager() { + var matchContext = this.props.matchContext; + + if (matchContext) { + return matchContext.transitionManager; + } + + var history = this.props.history; + var _props = this.props, + routes = _props.routes, + children = _props.children; + + !history.getCurrentLocation + ? true + ? __WEBPACK_IMPORTED_MODULE_0_invariant___default()( + false, + 'You have provided a history object created with history v4.x or v2.x ' + + 'and earlier. This version of React Router is only compatible with v3 ' + + 'history objects. Please change to history v3.x.', + ) + : invariant(false) + : void 0; + + return __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_2__createTransitionManager__['a' /* default */], + )( + history, + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__RouteUtils__['a' /* createRoutes */])( + routes || children, + ), + ); + }, + componentWillMount: function componentWillMount() { + var _this = this; + + this.transitionManager = this.createTransitionManager(); + this.router = this.createRouterObject(this.state); + + this._unlisten = this.transitionManager.listen(function (error, state) { + if (error) { + _this.handleError(error); + } else { + // Keep the identity of this.router because of a caveat in ContextUtils: + // they only work if the object identity is preserved. + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__RouterUtils__['b' /* assignRouterState */])( + _this.router, + state, + ); + _this.setState(state, _this.props.onUpdate); + } + }); + }, + + /* istanbul ignore next: sanity check */ + componentWillReceiveProps: function componentWillReceiveProps(nextProps) { + true + ? __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_7__routerWarning__['a' /* default */])( + nextProps.history === this.props.history, + 'You cannot change <Router history>; it will be ignored', + ) + : void 0; + + true + ? __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_7__routerWarning__['a' /* default */])( + (nextProps.routes || nextProps.children) === (this.props.routes || this.props.children), + 'You cannot change <Router routes>; it will be ignored', + ) + : void 0; + }, + componentWillUnmount: function componentWillUnmount() { + if (this._unlisten) this._unlisten(); + }, + render: function render() { + var _state = this.state, + location = _state.location, + routes = _state.routes, + params = _state.params, + components = _state.components; + + var _props2 = this.props, + createElement = _props2.createElement, + render = _props2.render, + props = _objectWithoutProperties(_props2, ['createElement', 'render']); + + if (location == null) return null; // Async match + + // Only forward non-Router-specific props to routing context, as those are + // the only ones that might be custom routing context props. + Object.keys(Router.propTypes).forEach(function (propType) { + return delete props[propType]; + }); + + return render( + _extends({}, props, { + router: this.router, + location: location, + routes: routes, + params: params, + components: components, + createElement: createElement, + }), + ); + }, + }); + + /* harmony default export */ __webpack_exports__['a'] = Router; + + /***/ + }, + /* 806 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__AsyncUtils__ = __webpack_require__(214); + /* harmony export (immutable) */ __webpack_exports__['c'] = runEnterHooks; + /* harmony export (immutable) */ __webpack_exports__['b'] = runChangeHooks; + /* harmony export (immutable) */ __webpack_exports__['a'] = runLeaveHooks; + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + var PendingHooks = function PendingHooks() { + var _this = this; + + _classCallCheck(this, PendingHooks); + + this.hooks = []; + + this.add = function (hook) { + return _this.hooks.push(hook); + }; + + this.remove = function (hook) { + return (_this.hooks = _this.hooks.filter(function (h) { + return h !== hook; + })); + }; + + this.has = function (hook) { + return _this.hooks.indexOf(hook) !== -1; + }; + + this.clear = function () { + return (_this.hooks = []); + }; + }; + + var enterHooks = new PendingHooks(); + var changeHooks = new PendingHooks(); + + function createTransitionHook(hook, route, asyncArity, pendingHooks) { + var isSync = hook.length < asyncArity; + + var transitionHook = function transitionHook() { + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + hook.apply(route, args); + + if (isSync) { + var callback = args[args.length - 1]; + // Assume hook executes synchronously and + // automatically call the callback. + callback(); + } + }; + + pendingHooks.add(transitionHook); + + return transitionHook; + } + + function getEnterHooks(routes) { + return routes.reduce(function (hooks, route) { + if (route.onEnter) hooks.push(createTransitionHook(route.onEnter, route, 3, enterHooks)); + return hooks; + }, []); + } + + function getChangeHooks(routes) { + return routes.reduce(function (hooks, route) { + if (route.onChange) hooks.push(createTransitionHook(route.onChange, route, 4, changeHooks)); + return hooks; + }, []); + } + + function runTransitionHooks(length, iter, callback) { + if (!length) { + callback(); + return; + } + + var redirectInfo = void 0; + function replace(location) { + redirectInfo = location; + } + + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__AsyncUtils__['b' /* loopAsync */])( + length, + function (index, next, done) { + iter(index, replace, function (error) { + if (error || redirectInfo) { + done(error, redirectInfo); // No need to continue. + } else { + next(); + } + }); + }, + callback, + ); + } + + /** + * Runs all onEnter hooks in the given array of routes in order + * with onEnter(nextState, replace, callback) and calls + * callback(error, redirectInfo) when finished. The first hook + * to use replace short-circuits the loop. + * + * If a hook needs to run asynchronously, it may use the callback + * function. However, doing so will cause the transition to pause, + * which could lead to a non-responsive UI if the hook is slow. + */ + function runEnterHooks(routes, nextState, callback) { + enterHooks.clear(); + var hooks = getEnterHooks(routes); + return runTransitionHooks( + hooks.length, + function (index, replace, next) { + var wrappedNext = function wrappedNext() { + if (enterHooks.has(hooks[index])) { + next.apply(undefined, arguments); + enterHooks.remove(hooks[index]); + } + }; + hooks[index](nextState, replace, wrappedNext); + }, + callback, + ); + } + + /** + * Runs all onChange hooks in the given array of routes in order + * with onChange(prevState, nextState, replace, callback) and calls + * callback(error, redirectInfo) when finished. The first hook + * to use replace short-circuits the loop. + * + * If a hook needs to run asynchronously, it may use the callback + * function. However, doing so will cause the transition to pause, + * which could lead to a non-responsive UI if the hook is slow. + */ + function runChangeHooks(routes, state, nextState, callback) { + changeHooks.clear(); + var hooks = getChangeHooks(routes); + return runTransitionHooks( + hooks.length, + function (index, replace, next) { + var wrappedNext = function wrappedNext() { + if (changeHooks.has(hooks[index])) { + next.apply(undefined, arguments); + changeHooks.remove(hooks[index]); + } + }; + hooks[index](state, nextState, replace, wrappedNext); + }, + callback, + ); + } + + /** + * Runs all onLeave hooks in the given array of routes in order. + */ + function runLeaveHooks(routes, prevState) { + for (var i = 0, len = routes.length; i < len; ++i) { + if (routes[i].onLeave) routes[i].onLeave.call(routes[i], prevState); + } + } + + /***/ + }, + /* 807 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__RouterContext__ = __webpack_require__(217); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__routerWarning__ = __webpack_require__(106); + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + /* harmony default export */ __webpack_exports__['a'] = function () { + for (var _len = arguments.length, middlewares = Array(_len), _key = 0; _key < _len; _key++) { + middlewares[_key] = arguments[_key]; + } + + if (true) { + middlewares.forEach(function (middleware, index) { + true + ? __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__routerWarning__['a' /* default */])( + middleware.renderRouterContext || middleware.renderRouteComponent, + 'The middleware specified at index ' + + index + + ' does not appear to be ' + + 'a valid React Router middleware.', + ) + : void 0; + }); + } + + var withContext = middlewares + .map(function (middleware) { + return middleware.renderRouterContext; + }) + .filter(Boolean); + var withComponent = middlewares + .map(function (middleware) { + return middleware.renderRouteComponent; + }) + .filter(Boolean); + + var makeCreateElement = function makeCreateElement() { + var baseCreateElement = + arguments.length > 0 && arguments[0] !== undefined + ? arguments[0] + : __WEBPACK_IMPORTED_MODULE_0_react__['createElement']; + return function (Component, props) { + return withComponent.reduceRight( + function (previous, renderRouteComponent) { + return renderRouteComponent(previous, props); + }, + baseCreateElement(Component, props), + ); + }; + }; + + return function (renderProps) { + return withContext.reduceRight( + function (previous, renderRouterContext) { + return renderRouterContext(previous, renderProps); + }, + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_1__RouterContext__['a' /* default */], + _extends({}, renderProps, { + createElement: makeCreateElement(renderProps.createElement), + }), + ), + ); + }; + }; + + /***/ + }, + /* 808 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_createBrowserHistory__ = + __webpack_require__(666); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_createBrowserHistory___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_history_lib_createBrowserHistory__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__createRouterHistory__ = __webpack_require__(352); + + /* harmony default export */ __webpack_exports__['a'] = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_1__createRouterHistory__['a' /* default */], + )(__WEBPACK_IMPORTED_MODULE_0_history_lib_createBrowserHistory___default.a); + + /***/ + }, + /* 809 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__PatternUtils__ = __webpack_require__(105); + + function routeParamsChanged(route, prevState, nextState) { + if (!route.path) return false; + + var paramNames = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_0__PatternUtils__['b' /* getParamNames */], + )(route.path); + + return paramNames.some(function (paramName) { + return prevState.params[paramName] !== nextState.params[paramName]; + }); + } + + /** + * Returns an object of { leaveRoutes, changeRoutes, enterRoutes } determined by + * the change from prevState to nextState. We leave routes if either + * 1) they are not in the next state or 2) they are in the next state + * but their params have changed (i.e. /users/123 => /users/456). + * + * leaveRoutes are ordered starting at the leaf route of the tree + * we're leaving up to the common parent route. enterRoutes are ordered + * from the top of the tree we're entering down to the leaf route. + * + * changeRoutes are any routes that didn't leave or enter during + * the transition. + */ + function computeChangedRoutes(prevState, nextState) { + var prevRoutes = prevState && prevState.routes; + var nextRoutes = nextState.routes; + + var leaveRoutes = void 0, + changeRoutes = void 0, + enterRoutes = void 0; + if (prevRoutes) { + (function () { + var parentIsLeaving = false; + leaveRoutes = prevRoutes.filter(function (route) { + if (parentIsLeaving) { + return true; + } else { + var isLeaving = + nextRoutes.indexOf(route) === -1 || routeParamsChanged(route, prevState, nextState); + if (isLeaving) parentIsLeaving = true; + return isLeaving; + } + }); + + // onLeave hooks start at the leaf route. + leaveRoutes.reverse(); + + enterRoutes = []; + changeRoutes = []; + + nextRoutes.forEach(function (route) { + var isNew = prevRoutes.indexOf(route) === -1; + var paramsChanged = leaveRoutes.indexOf(route) !== -1; + + if (isNew || paramsChanged) enterRoutes.push(route); + else changeRoutes.push(route); + }); + })(); + } else { + leaveRoutes = []; + changeRoutes = []; + enterRoutes = nextRoutes; + } + + return { + leaveRoutes: leaveRoutes, + changeRoutes: changeRoutes, + enterRoutes: enterRoutes, + }; + } + + /* harmony default export */ __webpack_exports__['a'] = computeChangedRoutes; + + /***/ + }, + /* 810 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__AsyncUtils__ = __webpack_require__(214); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__PromiseUtils__ = __webpack_require__(348); + + function getComponentsForRoute(nextState, route, callback) { + if (route.component || route.components) { + callback(null, route.component || route.components); + return; + } + + var getComponent = route.getComponent || route.getComponents; + if (getComponent) { + var componentReturn = getComponent.call(route, nextState, callback); + if ( + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__PromiseUtils__['a' /* isPromise */])( + componentReturn, + ) + ) + componentReturn.then(function (component) { + return callback(null, component); + }, callback); + } else { + callback(); + } + } + + /** + * Asynchronously fetches all components needed for the given router + * state and calls callback(error, components) when finished. + * + * Note: This operation may finish synchronously if no routes have an + * asynchronous getComponents method. + */ + function getComponents(nextState, callback) { + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__AsyncUtils__['a' /* mapAsync */])( + nextState.routes, + function (route, index, callback) { + getComponentsForRoute(nextState, route, callback); + }, + callback, + ); + } + + /* harmony default export */ __webpack_exports__['a'] = getComponents; + + /***/ + }, + /* 811 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__PatternUtils__ = __webpack_require__(105); + + /** + * Extracts an object of params the given route cares about from + * the given params object. + */ + function getRouteParams(route, params) { + var routeParams = {}; + + if (!route.path) return routeParams; + + __webpack_require__ + .i(__WEBPACK_IMPORTED_MODULE_0__PatternUtils__['b' /* getParamNames */])(route.path) + .forEach(function (p) { + if (Object.prototype.hasOwnProperty.call(params, p)) { + routeParams[p] = params[p]; + } + }); + + return routeParams; + } + + /* harmony default export */ __webpack_exports__['a'] = getRouteParams; + + /***/ + }, + /* 812 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_createHashHistory__ = + __webpack_require__(667); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_createHashHistory___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_history_lib_createHashHistory__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__createRouterHistory__ = __webpack_require__(352); + + /* harmony default export */ __webpack_exports__['a'] = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_1__createRouterHistory__['a' /* default */], + )(__WEBPACK_IMPORTED_MODULE_0_history_lib_createHashHistory___default.a); + + /***/ + }, + /* 813 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__PatternUtils__ = __webpack_require__(105); + /* harmony export (immutable) */ __webpack_exports__['a'] = isActive; + var _typeof = + typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' + ? function (obj) { + return typeof obj; + } + : function (obj) { + return obj && + typeof Symbol === 'function' && + obj.constructor === Symbol && + obj !== Symbol.prototype + ? 'symbol' + : typeof obj; + }; + + function deepEqual(a, b) { + if (a == b) return true; + + if (a == null || b == null) return false; + + if (Array.isArray(a)) { + return ( + Array.isArray(b) && + a.length === b.length && + a.every(function (item, index) { + return deepEqual(item, b[index]); + }) + ); + } + + if ((typeof a === 'undefined' ? 'undefined' : _typeof(a)) === 'object') { + for (var p in a) { + if (!Object.prototype.hasOwnProperty.call(a, p)) { + continue; + } + + if (a[p] === undefined) { + if (b[p] !== undefined) { + return false; + } + } else if (!Object.prototype.hasOwnProperty.call(b, p)) { + return false; + } else if (!deepEqual(a[p], b[p])) { + return false; + } + } + + return true; + } + + return String(a) === String(b); + } + + /** + * Returns true if the current pathname matches the supplied one, net of + * leading and trailing slash normalization. This is sufficient for an + * indexOnly route match. + */ + function pathIsActive(pathname, currentPathname) { + // Normalize leading slash for consistency. Leading slash on pathname has + // already been normalized in isActive. See caveat there. + if (currentPathname.charAt(0) !== '/') { + currentPathname = '/' + currentPathname; + } + + // Normalize the end of both path names too. Maybe `/foo/` shouldn't show + // `/foo` as active, but in this case, we would already have failed the + // match. + if (pathname.charAt(pathname.length - 1) !== '/') { + pathname += '/'; + } + if (currentPathname.charAt(currentPathname.length - 1) !== '/') { + currentPathname += '/'; + } + + return currentPathname === pathname; + } + + /** + * Returns true if the given pathname matches the active routes and params. + */ + function routeIsActive(pathname, routes, params) { + var remainingPathname = pathname, + paramNames = [], + paramValues = []; + + // for...of would work here but it's probably slower post-transpilation. + for (var i = 0, len = routes.length; i < len; ++i) { + var route = routes[i]; + var pattern = route.path || ''; + + if (pattern.charAt(0) === '/') { + remainingPathname = pathname; + paramNames = []; + paramValues = []; + } + + if (remainingPathname !== null && pattern) { + var matched = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_0__PatternUtils__['c' /* matchPattern */], + )(pattern, remainingPathname); + if (matched) { + remainingPathname = matched.remainingPathname; + paramNames = [].concat(paramNames, matched.paramNames); + paramValues = [].concat(paramValues, matched.paramValues); + } else { + remainingPathname = null; + } + + if (remainingPathname === '') { + // We have an exact match on the route. Just check that all the params + // match. + // FIXME: This doesn't work on repeated params. + return paramNames.every(function (paramName, index) { + return String(paramValues[index]) === String(params[paramName]); + }); + } + } + } + + return false; + } + + /** + * Returns true if all key/value pairs in the given query are + * currently active. + */ + function queryIsActive(query, activeQuery) { + if (activeQuery == null) return query == null; + + if (query == null) return true; + + return deepEqual(query, activeQuery); + } + + /** + * Returns true if a <Link> to the given pathname/query combination is + * currently active. + */ + function isActive(_ref, indexOnly, currentLocation, routes, params) { + var pathname = _ref.pathname, + query = _ref.query; + + if (currentLocation == null) return false; + + // TODO: This is a bit ugly. It keeps around support for treating pathnames + // without preceding slashes as absolute paths, but possibly also works + // around the same quirks with basenames as in matchRoutes. + if (pathname.charAt(0) !== '/') { + pathname = '/' + pathname; + } + + if (!pathIsActive(pathname, currentLocation.pathname)) { + // The path check is necessary and sufficient for indexOnly, but otherwise + // we still need to check the routes. + if (indexOnly || !routeIsActive(pathname, routes, params)) { + return false; + } + } + + return queryIsActive(query, currentLocation.query); + } + + /***/ + }, + /* 814 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_Actions__ = __webpack_require__(137); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_Actions___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_history_lib_Actions__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(16); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_invariant__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__createMemoryHistory__ = __webpack_require__(351); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__createTransitionManager__ = + __webpack_require__(353); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__RouteUtils__ = __webpack_require__(68); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__RouterUtils__ = __webpack_require__(350); + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + function _objectWithoutProperties(obj, keys) { + var target = {}; + for (var i in obj) { + if (keys.indexOf(i) >= 0) continue; + if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; + target[i] = obj[i]; + } + return target; + } + + /** + * A high-level API to be used for server-side rendering. + * + * This function matches a location to a set of routes and calls + * callback(error, redirectLocation, renderProps) when finished. + * + * Note: You probably don't want to use this in a browser unless you're using + * server-side rendering with async routes. + */ + function match(_ref, callback) { + var history = _ref.history, + routes = _ref.routes, + location = _ref.location, + options = _objectWithoutProperties(_ref, ['history', 'routes', 'location']); + + !(history || location) + ? true + ? __WEBPACK_IMPORTED_MODULE_1_invariant___default()(false, 'match needs a history or a location') + : invariant(false) + : void 0; + + history = history + ? history + : __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__createMemoryHistory__['a' /* default */])( + options, + ); + var transitionManager = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_3__createTransitionManager__['a' /* default */], + )( + history, + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__RouteUtils__['a' /* createRoutes */])(routes), + ); + + if (location) { + // Allow match({ location: '/the/path', ... }) + location = history.createLocation(location); + } else { + location = history.getCurrentLocation(); + } + + transitionManager.match(location, function (error, redirectLocation, nextState) { + var renderProps = void 0; + + if (nextState) { + var router = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_5__RouterUtils__['a' /* createRouterObject */], + )(history, transitionManager, nextState); + renderProps = _extends({}, nextState, { + router: router, + matchContext: { transitionManager: transitionManager, router: router }, + }); + } + + callback( + error, + redirectLocation && + history.createLocation( + redirectLocation, + __WEBPACK_IMPORTED_MODULE_0_history_lib_Actions__['REPLACE'], + ), + renderProps, + ); + }); + } + + /* harmony default export */ __webpack_exports__['a'] = match; + + /***/ + }, + /* 815 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__AsyncUtils__ = __webpack_require__(214); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__PromiseUtils__ = __webpack_require__(348); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__PatternUtils__ = __webpack_require__(105); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__routerWarning__ = __webpack_require__(106); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__RouteUtils__ = __webpack_require__(68); + /* harmony export (immutable) */ __webpack_exports__['a'] = matchRoutes; + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + var _typeof = + typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' + ? function (obj) { + return typeof obj; + } + : function (obj) { + return obj && + typeof Symbol === 'function' && + obj.constructor === Symbol && + obj !== Symbol.prototype + ? 'symbol' + : typeof obj; + }; + + function getChildRoutes(route, location, paramNames, paramValues, callback) { + if (route.childRoutes) { + return [null, route.childRoutes]; + } + if (!route.getChildRoutes) { + return []; + } + + var sync = true, + result = void 0; + + var partialNextState = { + location: location, + params: createParams(paramNames, paramValues), + }; + + var childRoutesReturn = route.getChildRoutes(partialNextState, function (error, childRoutes) { + childRoutes = + !error && + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__RouteUtils__['a' /* createRoutes */])( + childRoutes, + ); + if (sync) { + result = [error, childRoutes]; + return; + } + + callback(error, childRoutes); + }); + + if ( + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__PromiseUtils__['a' /* isPromise */])( + childRoutesReturn, + ) + ) + childRoutesReturn.then(function (childRoutes) { + return callback( + null, + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__RouteUtils__['a' /* createRoutes */])( + childRoutes, + ), + ); + }, callback); + + sync = false; + return result; // Might be undefined. + } + + function getIndexRoute(route, location, paramNames, paramValues, callback) { + if (route.indexRoute) { + callback(null, route.indexRoute); + } else if (route.getIndexRoute) { + var partialNextState = { + location: location, + params: createParams(paramNames, paramValues), + }; + + var indexRoutesReturn = route.getIndexRoute(partialNextState, function (error, indexRoute) { + callback( + error, + !error && + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__RouteUtils__['a' /* createRoutes */])( + indexRoute, + )[0], + ); + }); + + if ( + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__PromiseUtils__['a' /* isPromise */])( + indexRoutesReturn, + ) + ) + indexRoutesReturn.then(function (indexRoute) { + return callback( + null, + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__RouteUtils__['a' /* createRoutes */])( + indexRoute, + )[0], + ); + }, callback); + } else if (route.childRoutes || route.getChildRoutes) { + var onChildRoutes = function onChildRoutes(error, childRoutes) { + if (error) { + callback(error); + return; + } + + var pathless = childRoutes.filter(function (childRoute) { + return !childRoute.path; + }); + + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__AsyncUtils__['b' /* loopAsync */])( + pathless.length, + function (index, next, done) { + getIndexRoute( + pathless[index], + location, + paramNames, + paramValues, + function (error, indexRoute) { + if (error || indexRoute) { + var routes = [pathless[index]].concat( + Array.isArray(indexRoute) ? indexRoute : [indexRoute], + ); + done(error, routes); + } else { + next(); + } + }, + ); + }, + function (err, routes) { + callback(null, routes); + }, + ); + }; + + var result = getChildRoutes(route, location, paramNames, paramValues, onChildRoutes); + if (result) { + onChildRoutes.apply(undefined, result); + } + } else { + callback(); + } + } + + function assignParams(params, paramNames, paramValues) { + return paramNames.reduce(function (params, paramName, index) { + var paramValue = paramValues && paramValues[index]; + + if (Array.isArray(params[paramName])) { + params[paramName].push(paramValue); + } else if (paramName in params) { + params[paramName] = [params[paramName], paramValue]; + } else { + params[paramName] = paramValue; + } + + return params; + }, params); + } + + function createParams(paramNames, paramValues) { + return assignParams({}, paramNames, paramValues); + } + + function matchRouteDeep(route, location, remainingPathname, paramNames, paramValues, callback) { + var pattern = route.path || ''; + + if (pattern.charAt(0) === '/') { + remainingPathname = location.pathname; + paramNames = []; + paramValues = []; + } + + // Only try to match the path if the route actually has a pattern, and if + // we're not just searching for potential nested absolute paths. + if (remainingPathname !== null && pattern) { + try { + var matched = __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_2__PatternUtils__['c' /* matchPattern */], + )(pattern, remainingPathname); + if (matched) { + remainingPathname = matched.remainingPathname; + paramNames = [].concat(paramNames, matched.paramNames); + paramValues = [].concat(paramValues, matched.paramValues); + } else { + remainingPathname = null; + } + } catch (error) { + callback(error); + } + + // By assumption, pattern is non-empty here, which is the prerequisite for + // actually terminating a match. + if (remainingPathname === '') { + var _ret = (function () { + var match = { + routes: [route], + params: createParams(paramNames, paramValues), + }; + + getIndexRoute(route, location, paramNames, paramValues, function (error, indexRoute) { + if (error) { + callback(error); + } else { + if (Array.isArray(indexRoute)) { + var _match$routes; + + true + ? __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_3__routerWarning__['a' /* default */], + )( + indexRoute.every(function (route) { + return !route.path; + }), + 'Index routes should not have paths', + ) + : void 0; + (_match$routes = match.routes).push.apply(_match$routes, indexRoute); + } else if (indexRoute) { + true + ? __webpack_require__.i( + __WEBPACK_IMPORTED_MODULE_3__routerWarning__['a' /* default */], + )(!indexRoute.path, 'Index routes should not have paths') + : void 0; + match.routes.push(indexRoute); + } + + callback(null, match); + } + }); + + return { + v: void 0, + }; + })(); + + if ((typeof _ret === 'undefined' ? 'undefined' : _typeof(_ret)) === 'object') return _ret.v; + } + } + + if (remainingPathname != null || route.childRoutes) { + // Either a) this route matched at least some of the path or b) + // we don't have to load this route's children asynchronously. In + // either case continue checking for matches in the subtree. + var onChildRoutes = function onChildRoutes(error, childRoutes) { + if (error) { + callback(error); + } else if (childRoutes) { + // Check the child routes to see if any of them match. + matchRoutes( + childRoutes, + location, + function (error, match) { + if (error) { + callback(error); + } else if (match) { + // A child route matched! Augment the match and pass it up the stack. + match.routes.unshift(route); + callback(null, match); + } else { + callback(); + } + }, + remainingPathname, + paramNames, + paramValues, + ); + } else { + callback(); + } + }; + + var result = getChildRoutes(route, location, paramNames, paramValues, onChildRoutes); + if (result) { + onChildRoutes.apply(undefined, result); + } + } else { + callback(); + } + } + + /** + * Asynchronously matches the given location to a set of routes and calls + * callback(error, state) when finished. The state object will have the + * following properties: + * + * - routes An array of routes that matched, in hierarchical order + * - params An object of URL parameters + * + * Note: This operation may finish synchronously if no routes have an + * asynchronous getChildRoutes method. + */ + function matchRoutes(routes, location, callback, remainingPathname) { + var paramNames = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : []; + var paramValues = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : []; + + if (remainingPathname === undefined) { + // TODO: This is a little bit ugly, but it works around a quirk in history + // that strips the leading slash from pathnames when using basenames with + // trailing slashes. + if (location.pathname.charAt(0) !== '/') { + location = _extends({}, location, { + pathname: '/' + location.pathname, + }); + } + remainingPathname = location.pathname; + } + + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__AsyncUtils__['b' /* loopAsync */])( + routes.length, + function (index, next, done) { + matchRouteDeep( + routes[index], + location, + remainingPathname, + paramNames, + paramValues, + function (error, match) { + if (error || match) { + done(error, match); + } else { + next(); + } + }, + ); + }, + callback, + ); + } + + /***/ + }, + /* 816 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant__ = __webpack_require__(16); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_invariant__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_hoist_non_react_statics__ = + __webpack_require__(295); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_hoist_non_react_statics___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_hoist_non_react_statics__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__ContextUtils__ = __webpack_require__(215); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__PropTypes__ = __webpack_require__(216); + /* harmony export (immutable) */ __webpack_exports__['a'] = withRouter; + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + function getDisplayName(WrappedComponent) { + return WrappedComponent.displayName || WrappedComponent.name || 'Component'; + } + + function withRouter(WrappedComponent, options) { + var withRef = options && options.withRef; + + var WithRouter = __WEBPACK_IMPORTED_MODULE_1_react___default.a.createClass({ + displayName: 'WithRouter', + + mixins: [ + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__ContextUtils__['b' /* ContextSubscriber */])( + 'router', + ), + ], + + contextTypes: { router: __WEBPACK_IMPORTED_MODULE_4__PropTypes__['b' /* routerShape */] }, + propTypes: { router: __WEBPACK_IMPORTED_MODULE_4__PropTypes__['b' /* routerShape */] }, + + getWrappedInstance: function getWrappedInstance() { + !withRef + ? true + ? __WEBPACK_IMPORTED_MODULE_0_invariant___default()( + false, + 'To access the wrapped instance, you need to specify ' + + '`{ withRef: true }` as the second argument of the withRouter() call.', + ) + : invariant(false) + : void 0; + + return this.wrappedInstance; + }, + render: function render() { + var _this = this; + + var router = this.props.router || this.context.router; + if (!router) { + return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + WrappedComponent, + this.props, + ); + } + + var params = router.params, + location = router.location, + routes = router.routes; + + var props = _extends({}, this.props, { + router: router, + params: params, + location: location, + routes: routes, + }); + + if (withRef) { + props.ref = function (c) { + _this.wrappedInstance = c; + }; + } + + return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(WrappedComponent, props); + }, + }); + + WithRouter.displayName = 'withRouter(' + getDisplayName(WrappedComponent) + ')'; + WithRouter.WrappedComponent = WrappedComponent; + + return __WEBPACK_IMPORTED_MODULE_2_hoist_non_react_statics___default()(WithRouter, WrappedComponent); + } + + /***/ + }, + /* 817 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + var _prodInvariant = __webpack_require__(87); + + var invariant = __webpack_require__(2); + + /** + * Static poolers. Several custom versions for each potential number of + * arguments. A completely generic pooler is easy to implement, but would + * require accessing the `arguments` object. In each of these, `this` refers to + * the Class itself, not an instance. If any others are needed, simply add them + * here, or in their own files. + */ + var oneArgumentPooler = function (copyFieldsFrom) { + var Klass = this; + if (Klass.instancePool.length) { + var instance = Klass.instancePool.pop(); + Klass.call(instance, copyFieldsFrom); + return instance; + } else { + return new Klass(copyFieldsFrom); + } + }; + + var twoArgumentPooler = function (a1, a2) { + var Klass = this; + if (Klass.instancePool.length) { + var instance = Klass.instancePool.pop(); + Klass.call(instance, a1, a2); + return instance; + } else { + return new Klass(a1, a2); + } + }; + + var threeArgumentPooler = function (a1, a2, a3) { + var Klass = this; + if (Klass.instancePool.length) { + var instance = Klass.instancePool.pop(); + Klass.call(instance, a1, a2, a3); + return instance; + } else { + return new Klass(a1, a2, a3); + } + }; + + var fourArgumentPooler = function (a1, a2, a3, a4) { + var Klass = this; + if (Klass.instancePool.length) { + var instance = Klass.instancePool.pop(); + Klass.call(instance, a1, a2, a3, a4); + return instance; + } else { + return new Klass(a1, a2, a3, a4); + } + }; + + var standardReleaser = function (instance) { + var Klass = this; + !(instance instanceof Klass) + ? true + ? invariant(false, 'Trying to release an instance into a pool of a different type.') + : _prodInvariant('25') + : void 0; + instance.destructor(); + if (Klass.instancePool.length < Klass.poolSize) { + Klass.instancePool.push(instance); + } + }; + + var DEFAULT_POOL_SIZE = 10; + var DEFAULT_POOLER = oneArgumentPooler; + + /** + * Augments `CopyConstructor` to be a poolable class, augmenting only the class + * itself (statically) not adding any prototypical fields. Any CopyConstructor + * you give this may have a `poolSize` property, and will look for a + * prototypical `destructor` on instances. + * + * @param {Function} CopyConstructor Constructor that can be used to reset. + * @param {Function} pooler Customizable pooler. + */ + var addPoolingTo = function (CopyConstructor, pooler) { + // Casting as any so that flow ignores the actual implementation and trusts + // it to match the type we declared + var NewKlass = CopyConstructor; + NewKlass.instancePool = []; + NewKlass.getPooled = pooler || DEFAULT_POOLER; + if (!NewKlass.poolSize) { + NewKlass.poolSize = DEFAULT_POOL_SIZE; + } + NewKlass.release = standardReleaser; + return NewKlass; + }; + + var PooledClass = { + addPoolingTo: addPoolingTo, + oneArgumentPooler: oneArgumentPooler, + twoArgumentPooler: twoArgumentPooler, + threeArgumentPooler: threeArgumentPooler, + fourArgumentPooler: fourArgumentPooler, + }; + + module.exports = PooledClass; + + /***/ + }, + /* 818 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var ReactDOM = __webpack_require__(201); + + exports.getReactDOM = function () { + return ReactDOM; + }; + + if (true) { + var ReactPerf; + var ReactTestUtils; + + exports.getReactPerf = function () { + if (!ReactPerf) { + ReactPerf = __webpack_require__(754); + } + return ReactPerf; + }; + + exports.getReactTestUtils = function () { + if (!ReactTestUtils) { + ReactTestUtils = __webpack_require__(762); + } + return ReactTestUtils; + }; + } + + /***/ + }, + /* 819 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var _assign = __webpack_require__(8); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + var React = __webpack_require__(41); + + var ReactTransitionGroup = __webpack_require__(828); + var ReactCSSTransitionGroupChild = __webpack_require__(820); + + function createTransitionTimeoutPropValidator(transitionType) { + var timeoutPropName = 'transition' + transitionType + 'Timeout'; + var enabledPropName = 'transition' + transitionType; + + return function (props) { + // If the transition is enabled + if (props[enabledPropName]) { + // If no timeout duration is provided + if (props[timeoutPropName] == null) { + return new Error( + timeoutPropName + + " wasn't supplied to ReactCSSTransitionGroup: " + + "this can cause unreliable animations and won't be supported in " + + 'a future version of React. See ' + + 'https://fb.me/react-animation-transition-group-timeout for more ' + + 'information.', + ); + + // If the duration isn't a number + } else if (typeof props[timeoutPropName] !== 'number') { + return new Error(timeoutPropName + ' must be a number (in milliseconds)'); + } + } + }; + } + + /** + * An easy way to perform CSS transitions and animations when a React component + * enters or leaves the DOM. + * See https://facebook.github.io/react/docs/animation.html#high-level-api-reactcsstransitiongroup + */ + + var ReactCSSTransitionGroup = (function (_React$Component) { + _inherits(ReactCSSTransitionGroup, _React$Component); + + function ReactCSSTransitionGroup() { + var _temp, _this, _ret; + + _classCallCheck(this, ReactCSSTransitionGroup); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return ( + (_ret = + ((_temp = + ((_this = _possibleConstructorReturn( + this, + _React$Component.call.apply(_React$Component, [this].concat(args)), + )), + _this)), + (_this._wrapChild = function (child) { + // We need to provide this childFactory so that + // ReactCSSTransitionGroupChild can receive updates to name, enter, and + // leave while it is leaving. + return React.createElement( + ReactCSSTransitionGroupChild, + { + name: _this.props.transitionName, + appear: _this.props.transitionAppear, + enter: _this.props.transitionEnter, + leave: _this.props.transitionLeave, + appearTimeout: _this.props.transitionAppearTimeout, + enterTimeout: _this.props.transitionEnterTimeout, + leaveTimeout: _this.props.transitionLeaveTimeout, + }, + child, + ); + }), + _temp)), + _possibleConstructorReturn(_this, _ret) + ); + } + + ReactCSSTransitionGroup.prototype.render = function render() { + return React.createElement( + ReactTransitionGroup, + _assign({}, this.props, { childFactory: this._wrapChild }), + ); + }; + + return ReactCSSTransitionGroup; + })(React.Component); + + ReactCSSTransitionGroup.displayName = 'ReactCSSTransitionGroup'; + ReactCSSTransitionGroup.propTypes = { + transitionName: ReactCSSTransitionGroupChild.propTypes.name, + + transitionAppear: React.PropTypes.bool, + transitionEnter: React.PropTypes.bool, + transitionLeave: React.PropTypes.bool, + transitionAppearTimeout: createTransitionTimeoutPropValidator('Appear'), + transitionEnterTimeout: createTransitionTimeoutPropValidator('Enter'), + transitionLeaveTimeout: createTransitionTimeoutPropValidator('Leave'), + }; + ReactCSSTransitionGroup.defaultProps = { + transitionAppear: false, + transitionEnter: true, + transitionLeave: true, + }; + + module.exports = ReactCSSTransitionGroup; + + /***/ + }, + /* 820 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var React = __webpack_require__(41); + var ReactAddonsDOMDependencies = __webpack_require__(818); + + var CSSCore = __webpack_require__(648); + var ReactTransitionEvents = __webpack_require__(827); + + var onlyChild = __webpack_require__(359); + + var TICK = 17; + + var ReactCSSTransitionGroupChild = React.createClass({ + displayName: 'ReactCSSTransitionGroupChild', + + propTypes: { + name: React.PropTypes.oneOfType([ + React.PropTypes.string, + React.PropTypes.shape({ + enter: React.PropTypes.string, + leave: React.PropTypes.string, + active: React.PropTypes.string, + }), + React.PropTypes.shape({ + enter: React.PropTypes.string, + enterActive: React.PropTypes.string, + leave: React.PropTypes.string, + leaveActive: React.PropTypes.string, + appear: React.PropTypes.string, + appearActive: React.PropTypes.string, + }), + ]).isRequired, + + // Once we require timeouts to be specified, we can remove the + // boolean flags (appear etc.) and just accept a number + // or a bool for the timeout flags (appearTimeout etc.) + appear: React.PropTypes.bool, + enter: React.PropTypes.bool, + leave: React.PropTypes.bool, + appearTimeout: React.PropTypes.number, + enterTimeout: React.PropTypes.number, + leaveTimeout: React.PropTypes.number, + }, + + transition: function (animationType, finishCallback, userSpecifiedDelay) { + var node = ReactAddonsDOMDependencies.getReactDOM().findDOMNode(this); + + if (!node) { + if (finishCallback) { + finishCallback(); + } + return; + } + + var className = this.props.name[animationType] || this.props.name + '-' + animationType; + var activeClassName = this.props.name[animationType + 'Active'] || className + '-active'; + var timeout = null; + + var endListener = function (e) { + if (e && e.target !== node) { + return; + } + + clearTimeout(timeout); + + CSSCore.removeClass(node, className); + CSSCore.removeClass(node, activeClassName); + + ReactTransitionEvents.removeEndEventListener(node, endListener); + + // Usually this optional callback is used for informing an owner of + // a leave animation and telling it to remove the child. + if (finishCallback) { + finishCallback(); + } + }; + + CSSCore.addClass(node, className); + + // Need to do this to actually trigger a transition. + this.queueClassAndNode(activeClassName, node); + + // If the user specified a timeout delay. + if (userSpecifiedDelay) { + // Clean-up the animation after the specified delay + timeout = setTimeout(endListener, userSpecifiedDelay); + this.transitionTimeouts.push(timeout); + } else { + // DEPRECATED: this listener will be removed in a future version of react + ReactTransitionEvents.addEndEventListener(node, endListener); + } + }, + + queueClassAndNode: function (className, node) { + this.classNameAndNodeQueue.push({ + className: className, + node: node, + }); + + if (!this.timeout) { + this.timeout = setTimeout(this.flushClassNameAndNodeQueue, TICK); + } + }, + + flushClassNameAndNodeQueue: function () { + if (this.isMounted()) { + this.classNameAndNodeQueue.forEach(function (obj) { + CSSCore.addClass(obj.node, obj.className); + }); + } + this.classNameAndNodeQueue.length = 0; + this.timeout = null; + }, + + componentWillMount: function () { + this.classNameAndNodeQueue = []; + this.transitionTimeouts = []; + }, + + componentWillUnmount: function () { + if (this.timeout) { + clearTimeout(this.timeout); + } + this.transitionTimeouts.forEach(function (timeout) { + clearTimeout(timeout); + }); + + this.classNameAndNodeQueue.length = 0; + }, + + componentWillAppear: function (done) { + if (this.props.appear) { + this.transition('appear', done, this.props.appearTimeout); + } else { + done(); + } + }, + + componentWillEnter: function (done) { + if (this.props.enter) { + this.transition('enter', done, this.props.enterTimeout); + } else { + done(); + } + }, + + componentWillLeave: function (done) { + if (this.props.leave) { + this.transition('leave', done, this.props.leaveTimeout); + } else { + done(); + } + }, + + render: function () { + return onlyChild(this.props.children); + }, + }); + + module.exports = ReactCSSTransitionGroupChild; + + /***/ + }, + /* 821 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var PooledClass = __webpack_require__(817); + var ReactElement = __webpack_require__(86); + + var emptyFunction = __webpack_require__(40); + var traverseAllChildren = __webpack_require__(360); + + var twoArgumentPooler = PooledClass.twoArgumentPooler; + var fourArgumentPooler = PooledClass.fourArgumentPooler; + + var userProvidedKeyEscapeRegex = /\/+/g; + function escapeUserProvidedKey(text) { + return ('' + text).replace(userProvidedKeyEscapeRegex, '$&/'); + } + + /** + * PooledClass representing the bookkeeping associated with performing a child + * traversal. Allows avoiding binding callbacks. + * + * @constructor ForEachBookKeeping + * @param {!function} forEachFunction Function to perform traversal with. + * @param {?*} forEachContext Context to perform context with. + */ + function ForEachBookKeeping(forEachFunction, forEachContext) { + this.func = forEachFunction; + this.context = forEachContext; + this.count = 0; + } + ForEachBookKeeping.prototype.destructor = function () { + this.func = null; + this.context = null; + this.count = 0; + }; + PooledClass.addPoolingTo(ForEachBookKeeping, twoArgumentPooler); + + function forEachSingleChild(bookKeeping, child, name) { + var func = bookKeeping.func, + context = bookKeeping.context; + + func.call(context, child, bookKeeping.count++); + } + + /** + * Iterates through children that are typically specified as `props.children`. + * + * See https://facebook.github.io/react/docs/top-level-api.html#react.children.foreach + * + * The provided forEachFunc(child, index) will be called for each + * leaf child. + * + * @param {?*} children Children tree container. + * @param {function(*, int)} forEachFunc + * @param {*} forEachContext Context for forEachContext. + */ + function forEachChildren(children, forEachFunc, forEachContext) { + if (children == null) { + return children; + } + var traverseContext = ForEachBookKeeping.getPooled(forEachFunc, forEachContext); + traverseAllChildren(children, forEachSingleChild, traverseContext); + ForEachBookKeeping.release(traverseContext); + } + + /** + * PooledClass representing the bookkeeping associated with performing a child + * mapping. Allows avoiding binding callbacks. + * + * @constructor MapBookKeeping + * @param {!*} mapResult Object containing the ordered map of results. + * @param {!function} mapFunction Function to perform mapping with. + * @param {?*} mapContext Context to perform mapping with. + */ + function MapBookKeeping(mapResult, keyPrefix, mapFunction, mapContext) { + this.result = mapResult; + this.keyPrefix = keyPrefix; + this.func = mapFunction; + this.context = mapContext; + this.count = 0; + } + MapBookKeeping.prototype.destructor = function () { + this.result = null; + this.keyPrefix = null; + this.func = null; + this.context = null; + this.count = 0; + }; + PooledClass.addPoolingTo(MapBookKeeping, fourArgumentPooler); + + function mapSingleChildIntoContext(bookKeeping, child, childKey) { + var result = bookKeeping.result, + keyPrefix = bookKeeping.keyPrefix, + func = bookKeeping.func, + context = bookKeeping.context; + + var mappedChild = func.call(context, child, bookKeeping.count++); + if (Array.isArray(mappedChild)) { + mapIntoWithKeyPrefixInternal(mappedChild, result, childKey, emptyFunction.thatReturnsArgument); + } else if (mappedChild != null) { + if (ReactElement.isValidElement(mappedChild)) { + mappedChild = ReactElement.cloneAndReplaceKey( + mappedChild, + // Keep both the (mapped) and old keys if they differ, just as + // traverseAllChildren used to do for objects as children + keyPrefix + + (mappedChild.key && (!child || child.key !== mappedChild.key) + ? escapeUserProvidedKey(mappedChild.key) + '/' + : '') + + childKey, + ); + } + result.push(mappedChild); + } + } + + function mapIntoWithKeyPrefixInternal(children, array, prefix, func, context) { + var escapedPrefix = ''; + if (prefix != null) { + escapedPrefix = escapeUserProvidedKey(prefix) + '/'; + } + var traverseContext = MapBookKeeping.getPooled(array, escapedPrefix, func, context); + traverseAllChildren(children, mapSingleChildIntoContext, traverseContext); + MapBookKeeping.release(traverseContext); + } + + /** + * Maps children that are typically specified as `props.children`. + * + * See https://facebook.github.io/react/docs/top-level-api.html#react.children.map + * + * The provided mapFunction(child, key, index) will be called for each + * leaf child. + * + * @param {?*} children Children tree container. + * @param {function(*, int)} func The map function. + * @param {*} context Context for mapFunction. + * @return {object} Object containing the ordered map of results. + */ + function mapChildren(children, func, context) { + if (children == null) { + return children; + } + var result = []; + mapIntoWithKeyPrefixInternal(children, result, null, func, context); + return result; + } + + function forEachSingleChildDummy(traverseContext, child, name) { + return null; + } + + /** + * Count the number of children that are typically specified as + * `props.children`. + * + * See https://facebook.github.io/react/docs/top-level-api.html#react.children.count + * + * @param {?*} children Children tree container. + * @return {number} The number of children. + */ + function countChildren(children, context) { + return traverseAllChildren(children, forEachSingleChildDummy, null); + } + + /** + * Flatten a children object (typically specified as `props.children`) and + * return an array with appropriately re-keyed children. + * + * See https://facebook.github.io/react/docs/top-level-api.html#react.children.toarray + */ + function toArray(children) { + var result = []; + mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument); + return result; + } + + var ReactChildren = { + forEach: forEachChildren, + map: mapChildren, + mapIntoWithKeyPrefixInternal: mapIntoWithKeyPrefixInternal, + count: countChildren, + toArray: toArray, + }; + + module.exports = ReactChildren; + + /***/ + }, + /* 822 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var _prodInvariant = __webpack_require__(87), + _assign = __webpack_require__(8); + + var ReactComponent = __webpack_require__(219); + var ReactElement = __webpack_require__(86); + var ReactPropTypeLocationNames = __webpack_require__(221); + var ReactNoopUpdateQueue = __webpack_require__(220); + + var emptyObject = __webpack_require__(83); + var invariant = __webpack_require__(2); + var warning = __webpack_require__(3); + + var MIXINS_KEY = 'mixins'; + + // Helper function to allow the creation of anonymous functions which do not + // have .name set to the name of the variable being assigned to. + function identity(fn) { + return fn; + } + + /** + * Policies that describe methods in `ReactClassInterface`. + */ + + var injectedMixins = []; + + /** + * Composite components are higher-level components that compose other composite + * or host components. + * + * To create a new type of `ReactClass`, pass a specification of + * your new class to `React.createClass`. The only requirement of your class + * specification is that you implement a `render` method. + * + * var MyComponent = React.createClass({ + * render: function() { + * return <div>Hello World</div>; + * } + * }); + * + * The class specification supports a specific protocol of methods that have + * special meaning (e.g. `render`). See `ReactClassInterface` for + * more the comprehensive protocol. Any other properties and methods in the + * class specification will be available on the prototype. + * + * @interface ReactClassInterface + * @internal + */ + var ReactClassInterface = { + /** + * An array of Mixin objects to include when defining your component. + * + * @type {array} + * @optional + */ + mixins: 'DEFINE_MANY', + + /** + * An object containing properties and methods that should be defined on + * the component's constructor instead of its prototype (static methods). + * + * @type {object} + * @optional + */ + statics: 'DEFINE_MANY', + + /** + * Definition of prop types for this component. + * + * @type {object} + * @optional + */ + propTypes: 'DEFINE_MANY', + + /** + * Definition of context types for this component. + * + * @type {object} + * @optional + */ + contextTypes: 'DEFINE_MANY', + + /** + * Definition of context types this component sets for its children. + * + * @type {object} + * @optional + */ + childContextTypes: 'DEFINE_MANY', + + // ==== Definition methods ==== + + /** + * Invoked when the component is mounted. Values in the mapping will be set on + * `this.props` if that prop is not specified (i.e. using an `in` check). + * + * This method is invoked before `getInitialState` and therefore cannot rely + * on `this.state` or use `this.setState`. + * + * @return {object} + * @optional + */ + getDefaultProps: 'DEFINE_MANY_MERGED', + + /** + * Invoked once before the component is mounted. The return value will be used + * as the initial value of `this.state`. + * + * getInitialState: function() { + * return { + * isOn: false, + * fooBaz: new BazFoo() + * } + * } + * + * @return {object} + * @optional + */ + getInitialState: 'DEFINE_MANY_MERGED', + + /** + * @return {object} + * @optional + */ + getChildContext: 'DEFINE_MANY_MERGED', + + /** + * Uses props from `this.props` and state from `this.state` to render the + * structure of the component. + * + * No guarantees are made about when or how often this method is invoked, so + * it must not have side effects. + * + * render: function() { + * var name = this.props.name; + * return <div>Hello, {name}!</div>; + * } + * + * @return {ReactComponent} + * @nosideeffects + * @required + */ + render: 'DEFINE_ONCE', + + // ==== Delegate methods ==== + + /** + * Invoked when the component is initially created and about to be mounted. + * This may have side effects, but any external subscriptions or data created + * by this method must be cleaned up in `componentWillUnmount`. + * + * @optional + */ + componentWillMount: 'DEFINE_MANY', + + /** + * Invoked when the component has been mounted and has a DOM representation. + * However, there is no guarantee that the DOM node is in the document. + * + * Use this as an opportunity to operate on the DOM when the component has + * been mounted (initialized and rendered) for the first time. + * + * @param {DOMElement} rootNode DOM element representing the component. + * @optional + */ + componentDidMount: 'DEFINE_MANY', + + /** + * Invoked before the component receives new props. + * + * Use this as an opportunity to react to a prop transition by updating the + * state using `this.setState`. Current props are accessed via `this.props`. + * + * componentWillReceiveProps: function(nextProps, nextContext) { + * this.setState({ + * likesIncreasing: nextProps.likeCount > this.props.likeCount + * }); + * } + * + * NOTE: There is no equivalent `componentWillReceiveState`. An incoming prop + * transition may cause a state change, but the opposite is not true. If you + * need it, you are probably looking for `componentWillUpdate`. + * + * @param {object} nextProps + * @optional + */ + componentWillReceiveProps: 'DEFINE_MANY', + + /** + * Invoked while deciding if the component should be updated as a result of + * receiving new props, state and/or context. + * + * Use this as an opportunity to `return false` when you're certain that the + * transition to the new props/state/context will not require a component + * update. + * + * shouldComponentUpdate: function(nextProps, nextState, nextContext) { + * return !equal(nextProps, this.props) || + * !equal(nextState, this.state) || + * !equal(nextContext, this.context); + * } + * + * @param {object} nextProps + * @param {?object} nextState + * @param {?object} nextContext + * @return {boolean} True if the component should update. + * @optional + */ + shouldComponentUpdate: 'DEFINE_ONCE', + + /** + * Invoked when the component is about to update due to a transition from + * `this.props`, `this.state` and `this.context` to `nextProps`, `nextState` + * and `nextContext`. + * + * Use this as an opportunity to perform preparation before an update occurs. + * + * NOTE: You **cannot** use `this.setState()` in this method. + * + * @param {object} nextProps + * @param {?object} nextState + * @param {?object} nextContext + * @param {ReactReconcileTransaction} transaction + * @optional + */ + componentWillUpdate: 'DEFINE_MANY', + + /** + * Invoked when the component's DOM representation has been updated. + * + * Use this as an opportunity to operate on the DOM when the component has + * been updated. + * + * @param {object} prevProps + * @param {?object} prevState + * @param {?object} prevContext + * @param {DOMElement} rootNode DOM element representing the component. + * @optional + */ + componentDidUpdate: 'DEFINE_MANY', + + /** + * Invoked when the component is about to be removed from its parent and have + * its DOM representation destroyed. + * + * Use this as an opportunity to deallocate any external resources. + * + * NOTE: There is no `componentDidUnmount` since your component will have been + * destroyed by that point. + * + * @optional + */ + componentWillUnmount: 'DEFINE_MANY', + + // ==== Advanced methods ==== + + /** + * Updates the component's currently mounted DOM representation. + * + * By default, this implements React's rendering and reconciliation algorithm. + * Sophisticated clients may wish to override this. + * + * @param {ReactReconcileTransaction} transaction + * @internal + * @overridable + */ + updateComponent: 'OVERRIDE_BASE', + }; + + /** + * Mapping from class specification keys to special processing functions. + * + * Although these are declared like instance properties in the specification + * when defining classes using `React.createClass`, they are actually static + * and are accessible on the constructor instead of the prototype. Despite + * being static, they must be defined outside of the "statics" key under + * which all other static methods are defined. + */ + var RESERVED_SPEC_KEYS = { + displayName: function (Constructor, displayName) { + Constructor.displayName = displayName; + }, + mixins: function (Constructor, mixins) { + if (mixins) { + for (var i = 0; i < mixins.length; i++) { + mixSpecIntoComponent(Constructor, mixins[i]); + } + } + }, + childContextTypes: function (Constructor, childContextTypes) { + if (true) { + validateTypeDef(Constructor, childContextTypes, 'childContext'); + } + Constructor.childContextTypes = _assign({}, Constructor.childContextTypes, childContextTypes); + }, + contextTypes: function (Constructor, contextTypes) { + if (true) { + validateTypeDef(Constructor, contextTypes, 'context'); + } + Constructor.contextTypes = _assign({}, Constructor.contextTypes, contextTypes); + }, + /** + * Special case getDefaultProps which should move into statics but requires + * automatic merging. + */ + getDefaultProps: function (Constructor, getDefaultProps) { + if (Constructor.getDefaultProps) { + Constructor.getDefaultProps = createMergedResultFunction( + Constructor.getDefaultProps, + getDefaultProps, + ); + } else { + Constructor.getDefaultProps = getDefaultProps; + } + }, + propTypes: function (Constructor, propTypes) { + if (true) { + validateTypeDef(Constructor, propTypes, 'prop'); + } + Constructor.propTypes = _assign({}, Constructor.propTypes, propTypes); + }, + statics: function (Constructor, statics) { + mixStaticSpecIntoComponent(Constructor, statics); + }, + autobind: function () {}, + }; + + function validateTypeDef(Constructor, typeDef, location) { + for (var propName in typeDef) { + if (typeDef.hasOwnProperty(propName)) { + // use a warning instead of an invariant so components + // don't show up in prod but only in __DEV__ + true + ? warning( + typeof typeDef[propName] === 'function', + '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', + Constructor.displayName || 'ReactClass', + ReactPropTypeLocationNames[location], + propName, + ) + : void 0; + } + } + } + + function validateMethodOverride(isAlreadyDefined, name) { + var specPolicy = ReactClassInterface.hasOwnProperty(name) ? ReactClassInterface[name] : null; + + // Disallow overriding of base class methods unless explicitly allowed. + if (ReactClassMixin.hasOwnProperty(name)) { + !(specPolicy === 'OVERRIDE_BASE') + ? true + ? invariant( + false, + 'ReactClassInterface: You are attempting to override `%s` from your class specification. Ensure that your method names do not overlap with React methods.', + name, + ) + : _prodInvariant('73', name) + : void 0; + } + + // Disallow defining methods more than once unless explicitly allowed. + if (isAlreadyDefined) { + !(specPolicy === 'DEFINE_MANY' || specPolicy === 'DEFINE_MANY_MERGED') + ? true + ? invariant( + false, + 'ReactClassInterface: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.', + name, + ) + : _prodInvariant('74', name) + : void 0; + } + } + + /** + * Mixin helper which handles policy validation and reserved + * specification keys when building React classes. + */ + function mixSpecIntoComponent(Constructor, spec) { + if (!spec) { + if (true) { + var typeofSpec = typeof spec; + var isMixinValid = typeofSpec === 'object' && spec !== null; + + true + ? warning( + isMixinValid, + "%s: You're attempting to include a mixin that is either null " + + 'or not an object. Check the mixins included by the component, ' + + 'as well as any mixins they include themselves. ' + + 'Expected object but got %s.', + Constructor.displayName || 'ReactClass', + spec === null ? null : typeofSpec, + ) + : void 0; + } + + return; + } + + !(typeof spec !== 'function') + ? true + ? invariant( + false, + "ReactClass: You're attempting to use a component class or function as a mixin. Instead, just use a regular object.", + ) + : _prodInvariant('75') + : void 0; + !!ReactElement.isValidElement(spec) + ? true + ? invariant( + false, + "ReactClass: You're attempting to use a component as a mixin. Instead, just use a regular object.", + ) + : _prodInvariant('76') + : void 0; + + var proto = Constructor.prototype; + var autoBindPairs = proto.__reactAutoBindPairs; + + // By handling mixins before any other properties, we ensure the same + // chaining order is applied to methods with DEFINE_MANY policy, whether + // mixins are listed before or after these methods in the spec. + if (spec.hasOwnProperty(MIXINS_KEY)) { + RESERVED_SPEC_KEYS.mixins(Constructor, spec.mixins); + } + + for (var name in spec) { + if (!spec.hasOwnProperty(name)) { + continue; + } + + if (name === MIXINS_KEY) { + // We have already handled mixins in a special case above. + continue; + } + + var property = spec[name]; + var isAlreadyDefined = proto.hasOwnProperty(name); + validateMethodOverride(isAlreadyDefined, name); + + if (RESERVED_SPEC_KEYS.hasOwnProperty(name)) { + RESERVED_SPEC_KEYS[name](Constructor, property); + } else { + // Setup methods on prototype: + // The following member methods should not be automatically bound: + // 1. Expected ReactClass methods (in the "interface"). + // 2. Overridden methods (that were mixed in). + var isReactClassMethod = ReactClassInterface.hasOwnProperty(name); + var isFunction = typeof property === 'function'; + var shouldAutoBind = + isFunction && !isReactClassMethod && !isAlreadyDefined && spec.autobind !== false; + + if (shouldAutoBind) { + autoBindPairs.push(name, property); + proto[name] = property; + } else { + if (isAlreadyDefined) { + var specPolicy = ReactClassInterface[name]; + + // These cases should already be caught by validateMethodOverride. + !(isReactClassMethod && (specPolicy === 'DEFINE_MANY_MERGED' || specPolicy === 'DEFINE_MANY')) + ? true + ? invariant( + false, + 'ReactClass: Unexpected spec policy %s for key %s when mixing in component specs.', + specPolicy, + name, + ) + : _prodInvariant('77', specPolicy, name) + : void 0; + + // For methods which are defined more than once, call the existing + // methods before calling the new property, merging if appropriate. + if (specPolicy === 'DEFINE_MANY_MERGED') { + proto[name] = createMergedResultFunction(proto[name], property); + } else if (specPolicy === 'DEFINE_MANY') { + proto[name] = createChainedFunction(proto[name], property); + } + } else { + proto[name] = property; + if (true) { + // Add verbose displayName to the function, which helps when looking + // at profiling tools. + if (typeof property === 'function' && spec.displayName) { + proto[name].displayName = spec.displayName + '_' + name; + } + } + } + } + } + } + } + + function mixStaticSpecIntoComponent(Constructor, statics) { + if (!statics) { + return; + } + for (var name in statics) { + var property = statics[name]; + if (!statics.hasOwnProperty(name)) { + continue; + } + + var isReserved = name in RESERVED_SPEC_KEYS; + !!isReserved + ? true + ? invariant( + false, + 'ReactClass: You are attempting to define a reserved property, `%s`, that shouldn\'t be on the "statics" key. Define it as an instance property instead; it will still be accessible on the constructor.', + name, + ) + : _prodInvariant('78', name) + : void 0; + + var isInherited = name in Constructor; + !!isInherited + ? true + ? invariant( + false, + 'ReactClass: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.', + name, + ) + : _prodInvariant('79', name) + : void 0; + Constructor[name] = property; + } + } + + /** + * Merge two objects, but throw if both contain the same key. + * + * @param {object} one The first object, which is mutated. + * @param {object} two The second object + * @return {object} one after it has been mutated to contain everything in two. + */ + function mergeIntoWithNoDuplicateKeys(one, two) { + !(one && two && typeof one === 'object' && typeof two === 'object') + ? true + ? invariant(false, 'mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.') + : _prodInvariant('80') + : void 0; + + for (var key in two) { + if (two.hasOwnProperty(key)) { + !(one[key] === undefined) + ? true + ? invariant( + false, + 'mergeIntoWithNoDuplicateKeys(): Tried to merge two objects with the same key: `%s`. This conflict may be due to a mixin; in particular, this may be caused by two getInitialState() or getDefaultProps() methods returning objects with clashing keys.', + key, + ) + : _prodInvariant('81', key) + : void 0; + one[key] = two[key]; + } + } + return one; + } + + /** + * Creates a function that invokes two functions and merges their return values. + * + * @param {function} one Function to invoke first. + * @param {function} two Function to invoke second. + * @return {function} Function that invokes the two argument functions. + * @private + */ + function createMergedResultFunction(one, two) { + return function mergedResult() { + var a = one.apply(this, arguments); + var b = two.apply(this, arguments); + if (a == null) { + return b; + } else if (b == null) { + return a; + } + var c = {}; + mergeIntoWithNoDuplicateKeys(c, a); + mergeIntoWithNoDuplicateKeys(c, b); + return c; + }; + } + + /** + * Creates a function that invokes two functions and ignores their return vales. + * + * @param {function} one Function to invoke first. + * @param {function} two Function to invoke second. + * @return {function} Function that invokes the two argument functions. + * @private + */ + function createChainedFunction(one, two) { + return function chainedFunction() { + one.apply(this, arguments); + two.apply(this, arguments); + }; + } + + /** + * Binds a method to the component. + * + * @param {object} component Component whose method is going to be bound. + * @param {function} method Method to be bound. + * @return {function} The bound method. + */ + function bindAutoBindMethod(component, method) { + var boundMethod = method.bind(component); + if (true) { + boundMethod.__reactBoundContext = component; + boundMethod.__reactBoundMethod = method; + boundMethod.__reactBoundArguments = null; + var componentName = component.constructor.displayName; + var _bind = boundMethod.bind; + boundMethod.bind = function (newThis) { + for ( + var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; + _key < _len; + _key++ + ) { + args[_key - 1] = arguments[_key]; + } + + // User is trying to bind() an autobound method; we effectively will + // ignore the value of "this" that the user is trying to use, so + // let's warn. + if (newThis !== component && newThis !== null) { + true + ? warning( + false, + 'bind(): React component methods may only be bound to the ' + + 'component instance. See %s', + componentName, + ) + : void 0; + } else if (!args.length) { + true + ? warning( + false, + 'bind(): You are binding a component method to the component. ' + + 'React does this for you automatically in a high-performance ' + + 'way, so you can safely remove this call. See %s', + componentName, + ) + : void 0; + return boundMethod; + } + var reboundMethod = _bind.apply(boundMethod, arguments); + reboundMethod.__reactBoundContext = component; + reboundMethod.__reactBoundMethod = method; + reboundMethod.__reactBoundArguments = args; + return reboundMethod; + }; + } + return boundMethod; + } + + /** + * Binds all auto-bound methods in a component. + * + * @param {object} component Component whose method is going to be bound. + */ + function bindAutoBindMethods(component) { + var pairs = component.__reactAutoBindPairs; + for (var i = 0; i < pairs.length; i += 2) { + var autoBindKey = pairs[i]; + var method = pairs[i + 1]; + component[autoBindKey] = bindAutoBindMethod(component, method); + } + } + + /** + * Add more to the ReactClass base class. These are all legacy features and + * therefore not already part of the modern ReactComponent. + */ + var ReactClassMixin = { + /** + * TODO: This will be deprecated because state should always keep a consistent + * type signature and the only use case for this, is to avoid that. + */ + replaceState: function (newState, callback) { + this.updater.enqueueReplaceState(this, newState); + if (callback) { + this.updater.enqueueCallback(this, callback, 'replaceState'); + } + }, + + /** + * Checks whether or not this composite component is mounted. + * @return {boolean} True if mounted, false otherwise. + * @protected + * @final + */ + isMounted: function () { + return this.updater.isMounted(this); + }, + }; + + var ReactClassComponent = function () {}; + _assign(ReactClassComponent.prototype, ReactComponent.prototype, ReactClassMixin); + + /** + * Module for creating composite components. + * + * @class ReactClass + */ + var ReactClass = { + /** + * Creates a composite component class given a class specification. + * See https://facebook.github.io/react/docs/top-level-api.html#react.createclass + * + * @param {object} spec Class specification (which must define `render`). + * @return {function} Component constructor function. + * @public + */ + createClass: function (spec) { + // To keep our warnings more understandable, we'll use a little hack here to + // ensure that Constructor.name !== 'Constructor'. This makes sure we don't + // unnecessarily identify a class without displayName as 'Constructor'. + var Constructor = identity(function (props, context, updater) { + // This constructor gets overridden by mocks. The argument is used + // by mocks to assert on what gets mounted. + + if (true) { + true + ? warning( + this instanceof Constructor, + 'Something is calling a React component directly. Use a factory or ' + + 'JSX instead. See: https://fb.me/react-legacyfactory', + ) + : void 0; + } + + // Wire up auto-binding + if (this.__reactAutoBindPairs.length) { + bindAutoBindMethods(this); + } + + this.props = props; + this.context = context; + this.refs = emptyObject; + this.updater = updater || ReactNoopUpdateQueue; + + this.state = null; + + // ReactClasses doesn't have constructors. Instead, they use the + // getInitialState and componentWillMount methods for initialization. + + var initialState = this.getInitialState ? this.getInitialState() : null; + if (true) { + // We allow auto-mocks to proceed as if they're returning null. + if (initialState === undefined && this.getInitialState._isMockFunction) { + // This is probably bad practice. Consider warning here and + // deprecating this convenience. + initialState = null; + } + } + !(typeof initialState === 'object' && !Array.isArray(initialState)) + ? true + ? invariant( + false, + '%s.getInitialState(): must return an object or null', + Constructor.displayName || 'ReactCompositeComponent', + ) + : _prodInvariant('82', Constructor.displayName || 'ReactCompositeComponent') + : void 0; + + this.state = initialState; + }); + Constructor.prototype = new ReactClassComponent(); + Constructor.prototype.constructor = Constructor; + Constructor.prototype.__reactAutoBindPairs = []; + + injectedMixins.forEach(mixSpecIntoComponent.bind(null, Constructor)); + + mixSpecIntoComponent(Constructor, spec); + + // Initialize the defaultProps property after all mixins have been merged. + if (Constructor.getDefaultProps) { + Constructor.defaultProps = Constructor.getDefaultProps(); + } + + if (true) { + // This is a tag to indicate that the use of these method names is ok, + // since it's used with createClass. If it's not, then it's likely a + // mistake so we'll warn you to use the static property, property + // initializer or constructor respectively. + if (Constructor.getDefaultProps) { + Constructor.getDefaultProps.isReactClassApproved = {}; + } + if (Constructor.prototype.getInitialState) { + Constructor.prototype.getInitialState.isReactClassApproved = {}; + } + } + + !Constructor.prototype.render + ? true + ? invariant(false, 'createClass(...): Class specification must implement a `render` method.') + : _prodInvariant('83') + : void 0; + + if (true) { + true + ? warning( + !Constructor.prototype.componentShouldUpdate, + '%s has a method called ' + + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + + 'The name is phrased as a question because the function is ' + + 'expected to return a value.', + spec.displayName || 'A component', + ) + : void 0; + true + ? warning( + !Constructor.prototype.componentWillRecieveProps, + '%s has a method called ' + + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', + spec.displayName || 'A component', + ) + : void 0; + } + + // Reduce time spent doing lookups by setting these on the prototype. + for (var methodName in ReactClassInterface) { + if (!Constructor.prototype[methodName]) { + Constructor.prototype[methodName] = null; + } + } + + return Constructor; + }, + + injection: { + injectMixin: function (mixin) { + injectedMixins.push(mixin); + }, + }, + }; + + module.exports = ReactClass; + + /***/ + }, + /* 823 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var ReactElement = __webpack_require__(86); + + /** + * Create a factory that creates HTML tag elements. + * + * @private + */ + var createDOMFactory = ReactElement.createFactory; + if (true) { + var ReactElementValidator = __webpack_require__(357); + createDOMFactory = ReactElementValidator.createFactory; + } + + /** + * Creates a mapping from supported HTML tags to `ReactDOMComponent` classes. + * This is also accessible via `React.DOM`. + * + * @public + */ + var ReactDOMFactories = { + a: createDOMFactory('a'), + abbr: createDOMFactory('abbr'), + address: createDOMFactory('address'), + area: createDOMFactory('area'), + article: createDOMFactory('article'), + aside: createDOMFactory('aside'), + audio: createDOMFactory('audio'), + b: createDOMFactory('b'), + base: createDOMFactory('base'), + bdi: createDOMFactory('bdi'), + bdo: createDOMFactory('bdo'), + big: createDOMFactory('big'), + blockquote: createDOMFactory('blockquote'), + body: createDOMFactory('body'), + br: createDOMFactory('br'), + button: createDOMFactory('button'), + canvas: createDOMFactory('canvas'), + caption: createDOMFactory('caption'), + cite: createDOMFactory('cite'), + code: createDOMFactory('code'), + col: createDOMFactory('col'), + colgroup: createDOMFactory('colgroup'), + data: createDOMFactory('data'), + datalist: createDOMFactory('datalist'), + dd: createDOMFactory('dd'), + del: createDOMFactory('del'), + details: createDOMFactory('details'), + dfn: createDOMFactory('dfn'), + dialog: createDOMFactory('dialog'), + div: createDOMFactory('div'), + dl: createDOMFactory('dl'), + dt: createDOMFactory('dt'), + em: createDOMFactory('em'), + embed: createDOMFactory('embed'), + fieldset: createDOMFactory('fieldset'), + figcaption: createDOMFactory('figcaption'), + figure: createDOMFactory('figure'), + footer: createDOMFactory('footer'), + form: createDOMFactory('form'), + h1: createDOMFactory('h1'), + h2: createDOMFactory('h2'), + h3: createDOMFactory('h3'), + h4: createDOMFactory('h4'), + h5: createDOMFactory('h5'), + h6: createDOMFactory('h6'), + head: createDOMFactory('head'), + header: createDOMFactory('header'), + hgroup: createDOMFactory('hgroup'), + hr: createDOMFactory('hr'), + html: createDOMFactory('html'), + i: createDOMFactory('i'), + iframe: createDOMFactory('iframe'), + img: createDOMFactory('img'), + input: createDOMFactory('input'), + ins: createDOMFactory('ins'), + kbd: createDOMFactory('kbd'), + keygen: createDOMFactory('keygen'), + label: createDOMFactory('label'), + legend: createDOMFactory('legend'), + li: createDOMFactory('li'), + link: createDOMFactory('link'), + main: createDOMFactory('main'), + map: createDOMFactory('map'), + mark: createDOMFactory('mark'), + menu: createDOMFactory('menu'), + menuitem: createDOMFactory('menuitem'), + meta: createDOMFactory('meta'), + meter: createDOMFactory('meter'), + nav: createDOMFactory('nav'), + noscript: createDOMFactory('noscript'), + object: createDOMFactory('object'), + ol: createDOMFactory('ol'), + optgroup: createDOMFactory('optgroup'), + option: createDOMFactory('option'), + output: createDOMFactory('output'), + p: createDOMFactory('p'), + param: createDOMFactory('param'), + picture: createDOMFactory('picture'), + pre: createDOMFactory('pre'), + progress: createDOMFactory('progress'), + q: createDOMFactory('q'), + rp: createDOMFactory('rp'), + rt: createDOMFactory('rt'), + ruby: createDOMFactory('ruby'), + s: createDOMFactory('s'), + samp: createDOMFactory('samp'), + script: createDOMFactory('script'), + section: createDOMFactory('section'), + select: createDOMFactory('select'), + small: createDOMFactory('small'), + source: createDOMFactory('source'), + span: createDOMFactory('span'), + strong: createDOMFactory('strong'), + style: createDOMFactory('style'), + sub: createDOMFactory('sub'), + summary: createDOMFactory('summary'), + sup: createDOMFactory('sup'), + table: createDOMFactory('table'), + tbody: createDOMFactory('tbody'), + td: createDOMFactory('td'), + textarea: createDOMFactory('textarea'), + tfoot: createDOMFactory('tfoot'), + th: createDOMFactory('th'), + thead: createDOMFactory('thead'), + time: createDOMFactory('time'), + title: createDOMFactory('title'), + tr: createDOMFactory('tr'), + track: createDOMFactory('track'), + u: createDOMFactory('u'), + ul: createDOMFactory('ul'), + var: createDOMFactory('var'), + video: createDOMFactory('video'), + wbr: createDOMFactory('wbr'), + + // SVG + circle: createDOMFactory('circle'), + clipPath: createDOMFactory('clipPath'), + defs: createDOMFactory('defs'), + ellipse: createDOMFactory('ellipse'), + g: createDOMFactory('g'), + image: createDOMFactory('image'), + line: createDOMFactory('line'), + linearGradient: createDOMFactory('linearGradient'), + mask: createDOMFactory('mask'), + path: createDOMFactory('path'), + pattern: createDOMFactory('pattern'), + polygon: createDOMFactory('polygon'), + polyline: createDOMFactory('polyline'), + radialGradient: createDOMFactory('radialGradient'), + rect: createDOMFactory('rect'), + stop: createDOMFactory('stop'), + svg: createDOMFactory('svg'), + text: createDOMFactory('text'), + tspan: createDOMFactory('tspan'), + }; + + module.exports = ReactDOMFactories; + + /***/ + }, + /* 824 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var ReactElement = __webpack_require__(86); + var ReactPropTypeLocationNames = __webpack_require__(221); + var ReactPropTypesSecret = __webpack_require__(358); + + var emptyFunction = __webpack_require__(40); + var getIteratorFn = __webpack_require__(223); + var warning = __webpack_require__(3); + + /** + * Collection of methods that allow declaration and validation of props that are + * supplied to React components. Example usage: + * + * var Props = require('ReactPropTypes'); + * var MyArticle = React.createClass({ + * propTypes: { + * // An optional string prop named "description". + * description: Props.string, + * + * // A required enum prop named "category". + * category: Props.oneOf(['News','Photos']).isRequired, + * + * // A prop named "dialog" that requires an instance of Dialog. + * dialog: Props.instanceOf(Dialog).isRequired + * }, + * render: function() { ... } + * }); + * + * A more formal specification of how these methods are used: + * + * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...) + * decl := ReactPropTypes.{type}(.isRequired)? + * + * Each and every declaration produces a function with the same signature. This + * allows the creation of custom validation functions. For example: + * + * var MyLink = React.createClass({ + * propTypes: { + * // An optional string or URI prop named "href". + * href: function(props, propName, componentName) { + * var propValue = props[propName]; + * if (propValue != null && typeof propValue !== 'string' && + * !(propValue instanceof URI)) { + * return new Error( + * 'Expected a string or an URI for ' + propName + ' in ' + + * componentName + * ); + * } + * } + * }, + * render: function() {...} + * }); + * + * @internal + */ + + var ANONYMOUS = '<<anonymous>>'; + + var ReactPropTypes = { + array: createPrimitiveTypeChecker('array'), + bool: createPrimitiveTypeChecker('boolean'), + func: createPrimitiveTypeChecker('function'), + number: createPrimitiveTypeChecker('number'), + object: createPrimitiveTypeChecker('object'), + string: createPrimitiveTypeChecker('string'), + symbol: createPrimitiveTypeChecker('symbol'), + + any: createAnyTypeChecker(), + arrayOf: createArrayOfTypeChecker, + element: createElementTypeChecker(), + instanceOf: createInstanceTypeChecker, + node: createNodeChecker(), + objectOf: createObjectOfTypeChecker, + oneOf: createEnumTypeChecker, + oneOfType: createUnionTypeChecker, + shape: createShapeTypeChecker, + }; + + /** + * inlined Object.is polyfill to avoid requiring consumers ship their own + * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is + */ + /*eslint-disable no-self-compare*/ + function is(x, y) { + // SameValue algorithm + if (x === y) { + // Steps 1-5, 7-10 + // Steps 6.b-6.e: +0 != -0 + return x !== 0 || 1 / x === 1 / y; + } else { + // Step 6.a: NaN == NaN + return x !== x && y !== y; + } + } + /*eslint-enable no-self-compare*/ + + /** + * We use an Error-like object for backward compatibility as people may call + * PropTypes directly and inspect their output. However we don't use real + * Errors anymore. We don't inspect their stack anyway, and creating them + * is prohibitively expensive if they are created too often, such as what + * happens in oneOfType() for any type before the one that matched. + */ + function PropTypeError(message) { + this.message = message; + this.stack = ''; + } + // Make `instanceof Error` still work for returned errors. + PropTypeError.prototype = Error.prototype; + + function createChainableTypeChecker(validate) { + if (true) { + var manualPropTypeCallCache = {}; + } + function checkType(isRequired, props, propName, componentName, location, propFullName, secret) { + componentName = componentName || ANONYMOUS; + propFullName = propFullName || propName; + if (true) { + if (secret !== ReactPropTypesSecret && typeof console !== 'undefined') { + var cacheKey = componentName + ':' + propName; + if (!manualPropTypeCallCache[cacheKey]) { + true + ? warning( + false, + 'You are manually calling a React.PropTypes validation ' + + 'function for the `%s` prop on `%s`. This is deprecated ' + + 'and will not work in production with the next major version. ' + + 'You may be seeing this warning due to a third-party PropTypes ' + + 'library. See https://fb.me/react-warning-dont-call-proptypes ' + + 'for details.', + propFullName, + componentName, + ) + : void 0; + manualPropTypeCallCache[cacheKey] = true; + } + } + } + if (props[propName] == null) { + var locationName = ReactPropTypeLocationNames[location]; + if (isRequired) { + if (props[propName] === null) { + return new PropTypeError( + 'The ' + + locationName + + ' `' + + propFullName + + '` is marked as required ' + + ('in `' + componentName + '`, but its value is `null`.'), + ); + } + return new PropTypeError( + 'The ' + + locationName + + ' `' + + propFullName + + '` is marked as required in ' + + ('`' + componentName + '`, but its value is `undefined`.'), + ); + } + return null; + } else { + return validate(props, propName, componentName, location, propFullName); + } + } + + var chainedCheckType = checkType.bind(null, false); + chainedCheckType.isRequired = checkType.bind(null, true); + + return chainedCheckType; + } + + function createPrimitiveTypeChecker(expectedType) { + function validate(props, propName, componentName, location, propFullName, secret) { + var propValue = props[propName]; + var propType = getPropType(propValue); + if (propType !== expectedType) { + var locationName = ReactPropTypeLocationNames[location]; + // `propValue` being instance of, say, date/regexp, pass the 'object' + // check, but we can offer a more precise error message here rather than + // 'of type `object`'. + var preciseType = getPreciseType(propValue); + + return new PropTypeError( + 'Invalid ' + + locationName + + ' `' + + propFullName + + '` of type ' + + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + + ('`' + expectedType + '`.'), + ); + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createAnyTypeChecker() { + return createChainableTypeChecker(emptyFunction.thatReturns(null)); + } + + function createArrayOfTypeChecker(typeChecker) { + function validate(props, propName, componentName, location, propFullName) { + if (typeof typeChecker !== 'function') { + return new PropTypeError( + 'Property `' + + propFullName + + '` of component `' + + componentName + + '` has invalid PropType notation inside arrayOf.', + ); + } + var propValue = props[propName]; + if (!Array.isArray(propValue)) { + var locationName = ReactPropTypeLocationNames[location]; + var propType = getPropType(propValue); + return new PropTypeError( + 'Invalid ' + + locationName + + ' `' + + propFullName + + '` of type ' + + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'), + ); + } + for (var i = 0; i < propValue.length; i++) { + var error = typeChecker( + propValue, + i, + componentName, + location, + propFullName + '[' + i + ']', + ReactPropTypesSecret, + ); + if (error instanceof Error) { + return error; + } + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createElementTypeChecker() { + function validate(props, propName, componentName, location, propFullName) { + var propValue = props[propName]; + if (!ReactElement.isValidElement(propValue)) { + var locationName = ReactPropTypeLocationNames[location]; + var propType = getPropType(propValue); + return new PropTypeError( + 'Invalid ' + + locationName + + ' `' + + propFullName + + '` of type ' + + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'), + ); + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createInstanceTypeChecker(expectedClass) { + function validate(props, propName, componentName, location, propFullName) { + if (!(props[propName] instanceof expectedClass)) { + var locationName = ReactPropTypeLocationNames[location]; + var expectedClassName = expectedClass.name || ANONYMOUS; + var actualClassName = getClassName(props[propName]); + return new PropTypeError( + 'Invalid ' + + locationName + + ' `' + + propFullName + + '` of type ' + + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + + ('instance of `' + expectedClassName + '`.'), + ); + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createEnumTypeChecker(expectedValues) { + if (!Array.isArray(expectedValues)) { + true + ? warning(false, 'Invalid argument supplied to oneOf, expected an instance of array.') + : void 0; + return emptyFunction.thatReturnsNull; + } + + function validate(props, propName, componentName, location, propFullName) { + var propValue = props[propName]; + for (var i = 0; i < expectedValues.length; i++) { + if (is(propValue, expectedValues[i])) { + return null; + } + } + + var locationName = ReactPropTypeLocationNames[location]; + var valuesString = JSON.stringify(expectedValues); + return new PropTypeError( + 'Invalid ' + + locationName + + ' `' + + propFullName + + '` of value `' + + propValue + + '` ' + + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'), + ); + } + return createChainableTypeChecker(validate); + } + + function createObjectOfTypeChecker(typeChecker) { + function validate(props, propName, componentName, location, propFullName) { + if (typeof typeChecker !== 'function') { + return new PropTypeError( + 'Property `' + + propFullName + + '` of component `' + + componentName + + '` has invalid PropType notation inside objectOf.', + ); + } + var propValue = props[propName]; + var propType = getPropType(propValue); + if (propType !== 'object') { + var locationName = ReactPropTypeLocationNames[location]; + return new PropTypeError( + 'Invalid ' + + locationName + + ' `' + + propFullName + + '` of type ' + + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'), + ); + } + for (var key in propValue) { + if (propValue.hasOwnProperty(key)) { + var error = typeChecker( + propValue, + key, + componentName, + location, + propFullName + '.' + key, + ReactPropTypesSecret, + ); + if (error instanceof Error) { + return error; + } + } + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createUnionTypeChecker(arrayOfTypeCheckers) { + if (!Array.isArray(arrayOfTypeCheckers)) { + true + ? warning(false, 'Invalid argument supplied to oneOfType, expected an instance of array.') + : void 0; + return emptyFunction.thatReturnsNull; + } + + function validate(props, propName, componentName, location, propFullName) { + for (var i = 0; i < arrayOfTypeCheckers.length; i++) { + var checker = arrayOfTypeCheckers[i]; + if ( + checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null + ) { + return null; + } + } + + var locationName = ReactPropTypeLocationNames[location]; + return new PropTypeError( + 'Invalid ' + locationName + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'), + ); + } + return createChainableTypeChecker(validate); + } + + function createNodeChecker() { + function validate(props, propName, componentName, location, propFullName) { + if (!isNode(props[propName])) { + var locationName = ReactPropTypeLocationNames[location]; + return new PropTypeError( + 'Invalid ' + + locationName + + ' `' + + propFullName + + '` supplied to ' + + ('`' + componentName + '`, expected a ReactNode.'), + ); + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createShapeTypeChecker(shapeTypes) { + function validate(props, propName, componentName, location, propFullName) { + var propValue = props[propName]; + var propType = getPropType(propValue); + if (propType !== 'object') { + var locationName = ReactPropTypeLocationNames[location]; + return new PropTypeError( + 'Invalid ' + + locationName + + ' `' + + propFullName + + '` of type `' + + propType + + '` ' + + ('supplied to `' + componentName + '`, expected `object`.'), + ); + } + for (var key in shapeTypes) { + var checker = shapeTypes[key]; + if (!checker) { + continue; + } + var error = checker( + propValue, + key, + componentName, + location, + propFullName + '.' + key, + ReactPropTypesSecret, + ); + if (error) { + return error; + } + } + return null; + } + return createChainableTypeChecker(validate); + } + + function isNode(propValue) { + switch (typeof propValue) { + case 'number': + case 'string': + case 'undefined': + return true; + case 'boolean': + return !propValue; + case 'object': + if (Array.isArray(propValue)) { + return propValue.every(isNode); + } + if (propValue === null || ReactElement.isValidElement(propValue)) { + return true; + } + + var iteratorFn = getIteratorFn(propValue); + if (iteratorFn) { + var iterator = iteratorFn.call(propValue); + var step; + if (iteratorFn !== propValue.entries) { + while (!(step = iterator.next()).done) { + if (!isNode(step.value)) { + return false; + } + } + } else { + // Iterator will provide entry [k,v] tuples rather than values. + while (!(step = iterator.next()).done) { + var entry = step.value; + if (entry) { + if (!isNode(entry[1])) { + return false; + } + } + } + } + } else { + return false; + } + + return true; + default: + return false; + } + } + + function isSymbol(propType, propValue) { + // Native Symbol. + if (propType === 'symbol') { + return true; + } + + // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol' + if (propValue['@@toStringTag'] === 'Symbol') { + return true; + } + + // Fallback for non-spec compliant Symbols which are polyfilled. + if (typeof Symbol === 'function' && propValue instanceof Symbol) { + return true; + } + + return false; + } + + // Equivalent of `typeof` but with special handling for array and regexp. + function getPropType(propValue) { + var propType = typeof propValue; + if (Array.isArray(propValue)) { + return 'array'; + } + if (propValue instanceof RegExp) { + // Old webkits (at least until Android 4.0) return 'function' rather than + // 'object' for typeof a RegExp. We'll normalize this here so that /bla/ + // passes PropTypes.object. + return 'object'; + } + if (isSymbol(propType, propValue)) { + return 'symbol'; + } + return propType; + } + + // This handles more types than `getPropType`. Only used for error messages. + // See `createPrimitiveTypeChecker`. + function getPreciseType(propValue) { + var propType = getPropType(propValue); + if (propType === 'object') { + if (propValue instanceof Date) { + return 'date'; + } else if (propValue instanceof RegExp) { + return 'regexp'; + } + } + return propType; + } + + // Returns class name of the object, if any. + function getClassName(propValue) { + if (!propValue.constructor || !propValue.constructor.name) { + return ANONYMOUS; + } + return propValue.constructor.name; + } + + module.exports = ReactPropTypes; + + /***/ + }, + /* 825 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var _assign = __webpack_require__(8); + + var ReactComponent = __webpack_require__(219); + var ReactNoopUpdateQueue = __webpack_require__(220); + + var emptyObject = __webpack_require__(83); + + /** + * Base class helpers for the updating state of a component. + */ + function ReactPureComponent(props, context, updater) { + // Duplicated from ReactComponent. + this.props = props; + this.context = context; + this.refs = emptyObject; + // We initialize the default updater but the real one gets injected by the + // renderer. + this.updater = updater || ReactNoopUpdateQueue; + } + + function ComponentDummy() {} + ComponentDummy.prototype = ReactComponent.prototype; + ReactPureComponent.prototype = new ComponentDummy(); + ReactPureComponent.prototype.constructor = ReactPureComponent; + // Avoid an extra prototype jump for these methods. + _assign(ReactPureComponent.prototype, ReactComponent.prototype); + ReactPureComponent.prototype.isPureReactComponent = true; + + module.exports = ReactPureComponent; + + /***/ + }, + /* 826 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var flattenChildren = __webpack_require__(831); + + var ReactTransitionChildMapping = { + /** + * Given `this.props.children`, return an object mapping key to child. Just + * simple syntactic sugar around flattenChildren(). + * + * @param {*} children `this.props.children` + * @param {number=} selfDebugID Optional debugID of the current internal instance. + * @return {object} Mapping of key to child + */ + getChildMapping: function (children, selfDebugID) { + if (!children) { + return children; + } + + if (true) { + return flattenChildren(children, selfDebugID); + } + + return flattenChildren(children); + }, + + /** + * When you're adding or removing children some may be added or removed in the + * same render pass. We want to show *both* since we want to simultaneously + * animate elements in and out. This function takes a previous set of keys + * and a new set of keys and merges them with its best guess of the correct + * ordering. In the future we may expose some of the utilities in + * ReactMultiChild to make this easy, but for now React itself does not + * directly have this concept of the union of prevChildren and nextChildren + * so we implement it here. + * + * @param {object} prev prev children as returned from + * `ReactTransitionChildMapping.getChildMapping()`. + * @param {object} next next children as returned from + * `ReactTransitionChildMapping.getChildMapping()`. + * @return {object} a key set that contains all keys in `prev` and all keys + * in `next` in a reasonable order. + */ + mergeChildMappings: function (prev, next) { + prev = prev || {}; + next = next || {}; + + function getValueForKey(key) { + if (next.hasOwnProperty(key)) { + return next[key]; + } else { + return prev[key]; + } + } + + // For each key of `next`, the list of keys to insert before that key in + // the combined list + var nextKeysPending = {}; + + var pendingKeys = []; + for (var prevKey in prev) { + if (next.hasOwnProperty(prevKey)) { + if (pendingKeys.length) { + nextKeysPending[prevKey] = pendingKeys; + pendingKeys = []; + } + } else { + pendingKeys.push(prevKey); + } + } + + var i; + var childMapping = {}; + for (var nextKey in next) { + if (nextKeysPending.hasOwnProperty(nextKey)) { + for (i = 0; i < nextKeysPending[nextKey].length; i++) { + var pendingNextKey = nextKeysPending[nextKey][i]; + childMapping[nextKeysPending[nextKey][i]] = getValueForKey(pendingNextKey); + } + } + childMapping[nextKey] = getValueForKey(nextKey); + } + + // Finally, add the keys which didn't appear before any key in `next` + for (i = 0; i < pendingKeys.length; i++) { + childMapping[pendingKeys[i]] = getValueForKey(pendingKeys[i]); + } + + return childMapping; + }, + }; + + module.exports = ReactTransitionChildMapping; + + /***/ + }, + /* 827 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var ExecutionEnvironment = __webpack_require__(14); + + var getVendorPrefixedEventName = __webpack_require__(333); + + var endEvents = []; + + function detectEvents() { + var animEnd = getVendorPrefixedEventName('animationend'); + var transEnd = getVendorPrefixedEventName('transitionend'); + + if (animEnd) { + endEvents.push(animEnd); + } + + if (transEnd) { + endEvents.push(transEnd); + } + } + + if (ExecutionEnvironment.canUseDOM) { + detectEvents(); + } + + // We use the raw {add|remove}EventListener() call because EventListener + // does not know how to remove event listeners and we really should + // clean up. Also, these events are not triggered in older browsers + // so we should be A-OK here. + + function addEventListener(node, eventName, eventListener) { + node.addEventListener(eventName, eventListener, false); + } + + function removeEventListener(node, eventName, eventListener) { + node.removeEventListener(eventName, eventListener, false); + } + + var ReactTransitionEvents = { + addEndEventListener: function (node, eventListener) { + if (endEvents.length === 0) { + // If CSS transitions are not supported, trigger an "end animation" + // event immediately. + window.setTimeout(eventListener, 0); + return; + } + endEvents.forEach(function (endEvent) { + addEventListener(node, endEvent, eventListener); + }); + }, + + removeEndEventListener: function (node, eventListener) { + if (endEvents.length === 0) { + return; + } + endEvents.forEach(function (endEvent) { + removeEventListener(node, endEvent, eventListener); + }); + }, + }; + + module.exports = ReactTransitionEvents; + + /***/ + }, + /* 828 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var _assign = __webpack_require__(8); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + var React = __webpack_require__(41); + var ReactTransitionChildMapping = __webpack_require__(826); + + var emptyFunction = __webpack_require__(40); + + /** + * A basis for animations. When children are declaratively added or removed, + * special lifecycle hooks are called. + * See https://facebook.github.io/react/docs/animation.html#low-level-api-reacttransitiongroup + */ + + var ReactTransitionGroup = (function (_React$Component) { + _inherits(ReactTransitionGroup, _React$Component); + + function ReactTransitionGroup() { + var _temp, _this, _ret; + + _classCallCheck(this, ReactTransitionGroup); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return ( + (_ret = + ((_temp = + ((_this = _possibleConstructorReturn( + this, + _React$Component.call.apply(_React$Component, [this].concat(args)), + )), + _this)), + (_this.state = { + // TODO: can we get useful debug information to show at this point? + children: ReactTransitionChildMapping.getChildMapping(_this.props.children), + }), + (_this.performAppear = function (key) { + _this.currentlyTransitioningKeys[key] = true; + + var component = _this.refs[key]; + + if (component.componentWillAppear) { + component.componentWillAppear(_this._handleDoneAppearing.bind(_this, key)); + } else { + _this._handleDoneAppearing(key); + } + }), + (_this._handleDoneAppearing = function (key) { + var component = _this.refs[key]; + if (component.componentDidAppear) { + component.componentDidAppear(); + } + + delete _this.currentlyTransitioningKeys[key]; + + var currentChildMapping = ReactTransitionChildMapping.getChildMapping(_this.props.children); + + if (!currentChildMapping || !currentChildMapping.hasOwnProperty(key)) { + // This was removed before it had fully appeared. Remove it. + _this.performLeave(key); + } + }), + (_this.performEnter = function (key) { + _this.currentlyTransitioningKeys[key] = true; + + var component = _this.refs[key]; + + if (component.componentWillEnter) { + component.componentWillEnter(_this._handleDoneEntering.bind(_this, key)); + } else { + _this._handleDoneEntering(key); + } + }), + (_this._handleDoneEntering = function (key) { + var component = _this.refs[key]; + if (component.componentDidEnter) { + component.componentDidEnter(); + } + + delete _this.currentlyTransitioningKeys[key]; + + var currentChildMapping = ReactTransitionChildMapping.getChildMapping(_this.props.children); + + if (!currentChildMapping || !currentChildMapping.hasOwnProperty(key)) { + // This was removed before it had fully entered. Remove it. + _this.performLeave(key); + } + }), + (_this.performLeave = function (key) { + _this.currentlyTransitioningKeys[key] = true; + + var component = _this.refs[key]; + if (component.componentWillLeave) { + component.componentWillLeave(_this._handleDoneLeaving.bind(_this, key)); + } else { + // Note that this is somewhat dangerous b/c it calls setState() + // again, effectively mutating the component before all the work + // is done. + _this._handleDoneLeaving(key); + } + }), + (_this._handleDoneLeaving = function (key) { + var component = _this.refs[key]; + + if (component.componentDidLeave) { + component.componentDidLeave(); + } + + delete _this.currentlyTransitioningKeys[key]; + + var currentChildMapping = ReactTransitionChildMapping.getChildMapping(_this.props.children); + + if (currentChildMapping && currentChildMapping.hasOwnProperty(key)) { + // This entered again before it fully left. Add it again. + _this.performEnter(key); + } else { + _this.setState(function (state) { + var newChildren = _assign({}, state.children); + delete newChildren[key]; + return { children: newChildren }; + }); + } + }), + _temp)), + _possibleConstructorReturn(_this, _ret) + ); + } + + ReactTransitionGroup.prototype.componentWillMount = function componentWillMount() { + this.currentlyTransitioningKeys = {}; + this.keysToEnter = []; + this.keysToLeave = []; + }; + + ReactTransitionGroup.prototype.componentDidMount = function componentDidMount() { + var initialChildMapping = this.state.children; + for (var key in initialChildMapping) { + if (initialChildMapping[key]) { + this.performAppear(key); + } + } + }; + + ReactTransitionGroup.prototype.componentWillReceiveProps = function componentWillReceiveProps( + nextProps, + ) { + var nextChildMapping = ReactTransitionChildMapping.getChildMapping(nextProps.children); + var prevChildMapping = this.state.children; + + this.setState({ + children: ReactTransitionChildMapping.mergeChildMappings(prevChildMapping, nextChildMapping), + }); + + var key; + + for (key in nextChildMapping) { + var hasPrev = prevChildMapping && prevChildMapping.hasOwnProperty(key); + if (nextChildMapping[key] && !hasPrev && !this.currentlyTransitioningKeys[key]) { + this.keysToEnter.push(key); + } + } + + for (key in prevChildMapping) { + var hasNext = nextChildMapping && nextChildMapping.hasOwnProperty(key); + if (prevChildMapping[key] && !hasNext && !this.currentlyTransitioningKeys[key]) { + this.keysToLeave.push(key); + } + } + + // If we want to someday check for reordering, we could do it here. + }; + + ReactTransitionGroup.prototype.componentDidUpdate = function componentDidUpdate() { + var keysToEnter = this.keysToEnter; + this.keysToEnter = []; + keysToEnter.forEach(this.performEnter); + + var keysToLeave = this.keysToLeave; + this.keysToLeave = []; + keysToLeave.forEach(this.performLeave); + }; + + ReactTransitionGroup.prototype.render = function render() { + // TODO: we could get rid of the need for the wrapper node + // by cloning a single child + var childrenToRender = []; + for (var key in this.state.children) { + var child = this.state.children[key]; + if (child) { + // You may need to apply reactive updates to a child as it is leaving. + // The normal React way to do it won't work since the child will have + // already been removed. In case you need this behavior you can provide + // a childFactory function to wrap every child, even the ones that are + // leaving. + childrenToRender.push( + React.cloneElement(this.props.childFactory(child), { ref: key, key: key }), + ); + } + } + + // Do not forward ReactTransitionGroup props to primitive DOM nodes + var props = _assign({}, this.props); + delete props.transitionLeave; + delete props.transitionName; + delete props.transitionAppear; + delete props.transitionEnter; + delete props.childFactory; + delete props.transitionLeaveTimeout; + delete props.transitionEnterTimeout; + delete props.transitionAppearTimeout; + delete props.component; + + return React.createElement(this.props.component, props, childrenToRender); + }; + + return ReactTransitionGroup; + })(React.Component); + + ReactTransitionGroup.displayName = 'ReactTransitionGroup'; + ReactTransitionGroup.propTypes = { + component: React.PropTypes.any, + childFactory: React.PropTypes.func, + }; + ReactTransitionGroup.defaultProps = { + component: 'span', + childFactory: emptyFunction.thatReturnsArgument, + }; + + module.exports = ReactTransitionGroup; + + /***/ + }, + /* 829 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + module.exports = '15.4.2'; + + /***/ + }, + /* 830 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (process) { + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + var _prodInvariant = __webpack_require__(87); + + var ReactPropTypeLocationNames = __webpack_require__(221); + var ReactPropTypesSecret = __webpack_require__(358); + + var invariant = __webpack_require__(2); + var warning = __webpack_require__(3); + + var ReactComponentTreeHook; + + if ( + typeof process !== 'undefined' && + __webpack_require__.i({ NODE_ENV: 'development' }) && + 'development' === 'test' + ) { + // Temporary hack. + // Inline requires don't work well with Jest: + // https://github.com/facebook/react/issues/7240 + // Remove the inline requires when we don't need them anymore: + // https://github.com/facebook/react/pull/7178 + ReactComponentTreeHook = __webpack_require__(19); + } + + var loggedTypeFailures = {}; + + /** + * Assert that the values match with the type specs. + * Error messages are memorized and will only be shown once. + * + * @param {object} typeSpecs Map of name to a ReactPropType + * @param {object} values Runtime values that need to be type-checked + * @param {string} location e.g. "prop", "context", "child context" + * @param {string} componentName Name of the component for error messages. + * @param {?object} element The React element that is being type-checked + * @param {?number} debugID The React component instance that is being type-checked + * @private + */ + function checkReactTypeSpec(typeSpecs, values, location, componentName, element, debugID) { + for (var typeSpecName in typeSpecs) { + if (typeSpecs.hasOwnProperty(typeSpecName)) { + var error; + // Prop type validation may throw. In case they do, we don't want to + // fail the render phase where it didn't fail before. So we log it. + // After these have been cleaned up, we'll let them throw. + try { + // This is intentionally an invariant that gets caught. It's the same + // behavior as without this statement except with a better message. + !(typeof typeSpecs[typeSpecName] === 'function') + ? true + ? invariant( + false, + '%s: %s type `%s` is invalid; it must be a function, usually from React.PropTypes.', + componentName || 'React class', + ReactPropTypeLocationNames[location], + typeSpecName, + ) + : _prodInvariant( + '84', + componentName || 'React class', + ReactPropTypeLocationNames[location], + typeSpecName, + ) + : void 0; + error = typeSpecs[typeSpecName]( + values, + typeSpecName, + componentName, + location, + null, + ReactPropTypesSecret, + ); + } catch (ex) { + error = ex; + } + true + ? warning( + !error || error instanceof Error, + '%s: type specification of %s `%s` is invalid; the type checker ' + + 'function must return `null` or an `Error` but returned a %s. ' + + 'You may have forgotten to pass an argument to the type checker ' + + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + + 'shape all require an argument).', + componentName || 'React class', + ReactPropTypeLocationNames[location], + typeSpecName, + typeof error, + ) + : void 0; + if (error instanceof Error && !(error.message in loggedTypeFailures)) { + // Only monitor this failure once because there tends to be a lot of the + // same error. + loggedTypeFailures[error.message] = true; + + var componentStackInfo = ''; + + if (true) { + if (!ReactComponentTreeHook) { + ReactComponentTreeHook = __webpack_require__(19); + } + if (debugID !== null) { + componentStackInfo = ReactComponentTreeHook.getStackAddendumByID(debugID); + } else if (element !== null) { + componentStackInfo = ReactComponentTreeHook.getCurrentStackAddendum(element); + } + } + + true + ? warning(false, 'Failed %s type: %s%s', location, error.message, componentStackInfo) + : void 0; + } + } + } + } + + module.exports = checkReactTypeSpec; + /* WEBPACK VAR INJECTION */ + }).call(exports, __webpack_require__(84)); + + /***/ + }, + /* 831 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (process) { + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + var KeyEscapeUtils = __webpack_require__(355); + var traverseAllChildren = __webpack_require__(360); + var warning = __webpack_require__(3); + + var ReactComponentTreeHook; + + if ( + typeof process !== 'undefined' && + __webpack_require__.i({ NODE_ENV: 'development' }) && + 'development' === 'test' + ) { + // Temporary hack. + // Inline requires don't work well with Jest: + // https://github.com/facebook/react/issues/7240 + // Remove the inline requires when we don't need them anymore: + // https://github.com/facebook/react/pull/7178 + ReactComponentTreeHook = __webpack_require__(19); + } + + /** + * @param {function} traverseContext Context passed through traversal. + * @param {?ReactComponent} child React child component. + * @param {!string} name String name of key path to child. + * @param {number=} selfDebugID Optional debugID of the current internal instance. + */ + function flattenSingleChildIntoContext(traverseContext, child, name, selfDebugID) { + // We found a component instance. + if (traverseContext && typeof traverseContext === 'object') { + var result = traverseContext; + var keyUnique = result[name] === undefined; + if (true) { + if (!ReactComponentTreeHook) { + ReactComponentTreeHook = __webpack_require__(19); + } + if (!keyUnique) { + true + ? warning( + false, + 'flattenChildren(...): Encountered two children with the same key, ' + + '`%s`. Child keys must be unique; when two children share a key, only ' + + 'the first child will be used.%s', + KeyEscapeUtils.unescape(name), + ReactComponentTreeHook.getStackAddendumByID(selfDebugID), + ) + : void 0; + } + } + if (keyUnique && child != null) { + result[name] = child; + } + } + } + + /** + * Flattens children that are typically specified as `props.children`. Any null + * children will not be included in the resulting object. + * @return {!object} flattened children keyed by name. + */ + function flattenChildren(children, selfDebugID) { + if (children == null) { + return children; + } + var result = {}; + + if (true) { + traverseAllChildren( + children, + function (traverseContext, child, name) { + return flattenSingleChildIntoContext(traverseContext, child, name, selfDebugID); + }, + result, + ); + } else { + traverseAllChildren(children, flattenSingleChildIntoContext, result); + } + return result; + } + + module.exports = flattenChildren; + /* WEBPACK VAR INJECTION */ + }).call(exports, __webpack_require__(84)); + + /***/ + }, + /* 832 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__compose__ = __webpack_require__(362); + /* harmony export (immutable) */ __webpack_exports__['a'] = applyMiddleware; + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + /** + * Creates a store enhancer that applies middleware to the dispatch method + * of the Redux store. This is handy for a variety of tasks, such as expressing + * asynchronous actions in a concise manner, or logging every action payload. + * + * See `redux-thunk` package as an example of the Redux middleware. + * + * Because middleware is potentially asynchronous, this should be the first + * store enhancer in the composition chain. + * + * Note that each middleware will be given the `dispatch` and `getState` functions + * as named arguments. + * + * @param {...Function} middlewares The middleware chain to be applied. + * @returns {Function} A store enhancer applying the middleware. + */ + function applyMiddleware() { + for (var _len = arguments.length, middlewares = Array(_len), _key = 0; _key < _len; _key++) { + middlewares[_key] = arguments[_key]; + } + + return function (createStore) { + return function (reducer, preloadedState, enhancer) { + var store = createStore(reducer, preloadedState, enhancer); + var _dispatch = store.dispatch; + var chain = []; + + var middlewareAPI = { + getState: store.getState, + dispatch: function dispatch(action) { + return _dispatch(action); + }, + }; + chain = middlewares.map(function (middleware) { + return middleware(middlewareAPI); + }); + _dispatch = __WEBPACK_IMPORTED_MODULE_0__compose__['a' /* default */].apply( + undefined, + chain, + )(store.dispatch); + + return _extends({}, store, { + dispatch: _dispatch, + }); + }; + }; + } + + /***/ + }, + /* 833 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = bindActionCreators; + function bindActionCreator(actionCreator, dispatch) { + return function () { + return dispatch(actionCreator.apply(undefined, arguments)); + }; + } + + /** + * Turns an object whose values are action creators, into an object with the + * same keys, but with every function wrapped into a `dispatch` call so they + * may be invoked directly. This is just a convenience method, as you can call + * `store.dispatch(MyActionCreators.doSomething())` yourself just fine. + * + * For convenience, you can also pass a single function as the first argument, + * and get a function in return. + * + * @param {Function|Object} actionCreators An object whose values are action + * creator functions. One handy way to obtain it is to use ES6 `import * as` + * syntax. You may also pass a single function. + * + * @param {Function} dispatch The `dispatch` function available on your Redux + * store. + * + * @returns {Function|Object} The object mimicking the original object, but with + * every action creator wrapped into the `dispatch` call. If you passed a + * function as `actionCreators`, the return value will also be a single + * function. + */ + function bindActionCreators(actionCreators, dispatch) { + if (typeof actionCreators === 'function') { + return bindActionCreator(actionCreators, dispatch); + } + + if (typeof actionCreators !== 'object' || actionCreators === null) { + throw new Error( + 'bindActionCreators expected an object or a function, instead received ' + + (actionCreators === null ? 'null' : typeof actionCreators) + + '. ' + + 'Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?', + ); + } + + var keys = Object.keys(actionCreators); + var boundActionCreators = {}; + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + var actionCreator = actionCreators[key]; + if (typeof actionCreator === 'function') { + boundActionCreators[key] = bindActionCreator(actionCreator, dispatch); + } + } + return boundActionCreators; + } + + /***/ + }, + /* 834 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createStore__ = __webpack_require__(363); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_es_isPlainObject__ = + __webpack_require__(300); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_warning__ = __webpack_require__(364); + /* harmony export (immutable) */ __webpack_exports__['a'] = combineReducers; + + function getUndefinedStateErrorMessage(key, action) { + var actionType = action && action.type; + var actionName = (actionType && '"' + actionType.toString() + '"') || 'an action'; + + return ( + 'Given action ' + + actionName + + ', reducer "' + + key + + '" returned undefined. ' + + 'To ignore an action, you must explicitly return the previous state.' + ); + } + + function getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) { + var reducerKeys = Object.keys(reducers); + var argumentName = + action && action.type === __WEBPACK_IMPORTED_MODULE_0__createStore__['b' /* ActionTypes */].INIT + ? 'preloadedState argument passed to createStore' + : 'previous state received by the reducer'; + + if (reducerKeys.length === 0) { + return ( + 'Store does not have a valid reducer. Make sure the argument passed ' + + 'to combineReducers is an object whose values are reducers.' + ); + } + + if ( + !__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_lodash_es_isPlainObject__['a' /* default */])( + inputState, + ) + ) { + return ( + 'The ' + + argumentName + + ' has unexpected type of "' + + {}.toString.call(inputState).match(/\s([a-z|A-Z]+)/)[1] + + '". Expected argument to be an object with the following ' + + ('keys: "' + reducerKeys.join('", "') + '"') + ); + } + + var unexpectedKeys = Object.keys(inputState).filter(function (key) { + return !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key]; + }); + + unexpectedKeys.forEach(function (key) { + unexpectedKeyCache[key] = true; + }); + + if (unexpectedKeys.length > 0) { + return ( + 'Unexpected ' + + (unexpectedKeys.length > 1 ? 'keys' : 'key') + + ' ' + + ('"' + unexpectedKeys.join('", "') + '" found in ' + argumentName + '. ') + + 'Expected to find one of the known reducer keys instead: ' + + ('"' + reducerKeys.join('", "') + '". Unexpected keys will be ignored.') + ); + } + } + + function assertReducerSanity(reducers) { + Object.keys(reducers).forEach(function (key) { + var reducer = reducers[key]; + var initialState = reducer(undefined, { + type: __WEBPACK_IMPORTED_MODULE_0__createStore__['b' /* ActionTypes */].INIT, + }); + + if (typeof initialState === 'undefined') { + throw new Error( + 'Reducer "' + + key + + '" returned undefined during initialization. ' + + 'If the state passed to the reducer is undefined, you must ' + + 'explicitly return the initial state. The initial state may ' + + 'not be undefined.', + ); + } + + var type = + '@@redux/PROBE_UNKNOWN_ACTION_' + Math.random().toString(36).substring(7).split('').join('.'); + if (typeof reducer(undefined, { type: type }) === 'undefined') { + throw new Error( + 'Reducer "' + + key + + '" returned undefined when probed with a random type. ' + + ("Don't try to handle " + + __WEBPACK_IMPORTED_MODULE_0__createStore__['b' /* ActionTypes */].INIT + + ' or other actions in "redux/*" ') + + 'namespace. They are considered private. Instead, you must return the ' + + 'current state for any unknown actions, unless it is undefined, ' + + 'in which case you must return the initial state, regardless of the ' + + 'action type. The initial state may not be undefined.', + ); + } + }); + } + + /** + * Turns an object whose values are different reducer functions, into a single + * reducer function. It will call every child reducer, and gather their results + * into a single state object, whose keys correspond to the keys of the passed + * reducer functions. + * + * @param {Object} reducers An object whose values correspond to different + * reducer functions that need to be combined into one. One handy way to obtain + * it is to use ES6 `import * as reducers` syntax. The reducers may never return + * undefined for any action. Instead, they should return their initial state + * if the state passed to them was undefined, and the current state for any + * unrecognized action. + * + * @returns {Function} A reducer function that invokes every reducer inside the + * passed object, and builds a state object with the same shape. + */ + function combineReducers(reducers) { + var reducerKeys = Object.keys(reducers); + var finalReducers = {}; + for (var i = 0; i < reducerKeys.length; i++) { + var key = reducerKeys[i]; + + if (true) { + if (typeof reducers[key] === 'undefined') { + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__utils_warning__['a' /* default */])( + 'No reducer provided for key "' + key + '"', + ); + } + } + + if (typeof reducers[key] === 'function') { + finalReducers[key] = reducers[key]; + } + } + var finalReducerKeys = Object.keys(finalReducers); + + if (true) { + var unexpectedKeyCache = {}; + } + + var sanityError; + try { + assertReducerSanity(finalReducers); + } catch (e) { + sanityError = e; + } + + return function combination() { + var state = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; + var action = arguments[1]; + + if (sanityError) { + throw sanityError; + } + + if (true) { + var warningMessage = getUnexpectedStateShapeWarningMessage( + state, + finalReducers, + action, + unexpectedKeyCache, + ); + if (warningMessage) { + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__utils_warning__['a' /* default */])( + warningMessage, + ); + } + } + + var hasChanged = false; + var nextState = {}; + for (var i = 0; i < finalReducerKeys.length; i++) { + var key = finalReducerKeys[i]; + var reducer = finalReducers[key]; + var previousStateForKey = state[key]; + var nextStateForKey = reducer(previousStateForKey, action); + if (typeof nextStateForKey === 'undefined') { + var errorMessage = getUndefinedStateErrorMessage(key, action); + throw new Error(errorMessage); + } + nextState[key] = nextStateForKey; + hasChanged = hasChanged || nextStateForKey !== previousStateForKey; + } + return hasChanged ? nextState : state; + }; + } + + /***/ + }, + /* 835 */ + /***/ function (module, exports, __webpack_require__) { + /* WEBPACK VAR INJECTION */ (function (global, process) { + /** + * Copyright (c) 2014, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * https://raw.github.com/facebook/regenerator/master/LICENSE file. An + * additional grant of patent rights can be found in the PATENTS file in + * the same directory. + */ + + !(function (global) { + 'use strict'; + + var Op = Object.prototype; + var hasOwn = Op.hasOwnProperty; + var undefined; // More compressible than void 0. + var $Symbol = typeof Symbol === 'function' ? Symbol : {}; + var iteratorSymbol = $Symbol.iterator || '@@iterator'; + var toStringTagSymbol = $Symbol.toStringTag || '@@toStringTag'; + + var inModule = typeof module === 'object'; + var runtime = global.regeneratorRuntime; + if (runtime) { + if (inModule) { + // If regeneratorRuntime is defined globally and we're in a module, + // make the exports object identical to regeneratorRuntime. + module.exports = runtime; + } + // Don't bother evaluating the rest of this file if the runtime was + // already defined globally. + return; + } + + // Define the runtime globally (as expected by generated code) as either + // module.exports (if we're in a module) or a new, empty object. + runtime = global.regeneratorRuntime = inModule ? module.exports : {}; + + function wrap(innerFn, outerFn, self, tryLocsList) { + // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator. + var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator; + var generator = Object.create(protoGenerator.prototype); + var context = new Context(tryLocsList || []); + + // The ._invoke method unifies the implementations of the .next, + // .throw, and .return methods. + generator._invoke = makeInvokeMethod(innerFn, self, context); + + return generator; + } + runtime.wrap = wrap; + + // Try/catch helper to minimize deoptimizations. Returns a completion + // record like context.tryEntries[i].completion. This interface could + // have been (and was previously) designed to take a closure to be + // invoked without arguments, but in all the cases we care about we + // already have an existing method we want to call, so there's no need + // to create a new function object. We can even get away with assuming + // the method takes exactly one argument, since that happens to be true + // in every case, so we don't have to touch the arguments object. The + // only additional allocation required is the completion record, which + // has a stable shape and so hopefully should be cheap to allocate. + function tryCatch(fn, obj, arg) { + try { + return { type: 'normal', arg: fn.call(obj, arg) }; + } catch (err) { + return { type: 'throw', arg: err }; + } + } + + var GenStateSuspendedStart = 'suspendedStart'; + var GenStateSuspendedYield = 'suspendedYield'; + var GenStateExecuting = 'executing'; + var GenStateCompleted = 'completed'; + + // Returning this object from the innerFn has the same effect as + // breaking out of the dispatch switch statement. + var ContinueSentinel = {}; + + // Dummy constructor functions that we use as the .constructor and + // .constructor.prototype properties for functions that return Generator + // objects. For full spec compliance, you may wish to configure your + // minifier not to mangle the names of these two functions. + function Generator() {} + function GeneratorFunction() {} + function GeneratorFunctionPrototype() {} + + // This is a polyfill for %IteratorPrototype% for environments that + // don't natively support it. + var IteratorPrototype = {}; + IteratorPrototype[iteratorSymbol] = function () { + return this; + }; + + var getProto = Object.getPrototypeOf; + var NativeIteratorPrototype = getProto && getProto(getProto(values([]))); + if ( + NativeIteratorPrototype && + NativeIteratorPrototype !== Op && + hasOwn.call(NativeIteratorPrototype, iteratorSymbol) + ) { + // This environment has a native %IteratorPrototype%; use it instead + // of the polyfill. + IteratorPrototype = NativeIteratorPrototype; + } + + var Gp = + (GeneratorFunctionPrototype.prototype = + Generator.prototype = + Object.create(IteratorPrototype)); + GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype; + GeneratorFunctionPrototype.constructor = GeneratorFunction; + GeneratorFunctionPrototype[toStringTagSymbol] = GeneratorFunction.displayName = 'GeneratorFunction'; + + // Helper for defining the .next, .throw, and .return methods of the + // Iterator interface in terms of a single ._invoke method. + function defineIteratorMethods(prototype) { + ['next', 'throw', 'return'].forEach(function (method) { + prototype[method] = function (arg) { + return this._invoke(method, arg); + }; + }); + } + + runtime.isGeneratorFunction = function (genFun) { + var ctor = typeof genFun === 'function' && genFun.constructor; + return ctor + ? ctor === GeneratorFunction || + // For the native GeneratorFunction constructor, the best we can + // do is to check its .name property. + (ctor.displayName || ctor.name) === 'GeneratorFunction' + : false; + }; + + runtime.mark = function (genFun) { + if (Object.setPrototypeOf) { + Object.setPrototypeOf(genFun, GeneratorFunctionPrototype); + } else { + genFun.__proto__ = GeneratorFunctionPrototype; + if (!(toStringTagSymbol in genFun)) { + genFun[toStringTagSymbol] = 'GeneratorFunction'; + } + } + genFun.prototype = Object.create(Gp); + return genFun; + }; + + // Within the body of any async function, `await x` is transformed to + // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test + // `hasOwn.call(value, "__await")` to determine if the yielded value is + // meant to be awaited. + runtime.awrap = function (arg) { + return { __await: arg }; + }; + + function AsyncIterator(generator) { + function invoke(method, arg, resolve, reject) { + var record = tryCatch(generator[method], generator, arg); + if (record.type === 'throw') { + reject(record.arg); + } else { + var result = record.arg; + var value = result.value; + if (value && typeof value === 'object' && hasOwn.call(value, '__await')) { + return Promise.resolve(value.__await).then( + function (value) { + invoke('next', value, resolve, reject); + }, + function (err) { + invoke('throw', err, resolve, reject); + }, + ); + } + + return Promise.resolve(value).then(function (unwrapped) { + // When a yielded Promise is resolved, its final value becomes + // the .value of the Promise<{value,done}> result for the + // current iteration. If the Promise is rejected, however, the + // result for this iteration will be rejected with the same + // reason. Note that rejections of yielded Promises are not + // thrown back into the generator function, as is the case + // when an awaited Promise is rejected. This difference in + // behavior between yield and await is important, because it + // allows the consumer to decide what to do with the yielded + // rejection (swallow it and continue, manually .throw it back + // into the generator, abandon iteration, whatever). With + // await, by contrast, there is no opportunity to examine the + // rejection reason outside the generator function, so the + // only option is to throw it from the await expression, and + // let the generator function handle the exception. + result.value = unwrapped; + resolve(result); + }, reject); + } + } + + if (typeof process === 'object' && process.domain) { + invoke = process.domain.bind(invoke); + } + + var previousPromise; + + function enqueue(method, arg) { + function callInvokeWithMethodAndArg() { + return new Promise(function (resolve, reject) { + invoke(method, arg, resolve, reject); + }); + } + + return (previousPromise = + // If enqueue has been called before, then we want to wait until + // all previous Promises have been resolved before calling invoke, + // so that results are always delivered in the correct order. If + // enqueue has not been called before, then it is important to + // call invoke immediately, without waiting on a callback to fire, + // so that the async generator function has the opportunity to do + // any necessary setup in a predictable way. This predictability + // is why the Promise constructor synchronously invokes its + // executor callback, and why async functions synchronously + // execute code before the first await. Since we implement simple + // async functions in terms of async generators, it is especially + // important to get this right, even though it requires care. + previousPromise + ? previousPromise.then( + callInvokeWithMethodAndArg, + // Avoid propagating failures to Promises returned by later + // invocations of the iterator. + callInvokeWithMethodAndArg, + ) + : callInvokeWithMethodAndArg()); + } + + // Define the unified helper method that is used to implement .next, + // .throw, and .return (see defineIteratorMethods). + this._invoke = enqueue; + } + + defineIteratorMethods(AsyncIterator.prototype); + runtime.AsyncIterator = AsyncIterator; + + // Note that simple async functions are implemented on top of + // AsyncIterator objects; they just return a Promise for the value of + // the final result produced by the iterator. + runtime.async = function (innerFn, outerFn, self, tryLocsList) { + var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList)); + + return runtime.isGeneratorFunction(outerFn) + ? iter // If outerFn is a generator, return the full iterator. + : iter.next().then(function (result) { + return result.done ? result.value : iter.next(); + }); + }; + + function makeInvokeMethod(innerFn, self, context) { + var state = GenStateSuspendedStart; + + return function invoke(method, arg) { + if (state === GenStateExecuting) { + throw new Error('Generator is already running'); + } + + if (state === GenStateCompleted) { + if (method === 'throw') { + throw arg; + } + + // Be forgiving, per 25.3.3.3.3 of the spec: + // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume + return doneResult(); + } + + context.method = method; + context.arg = arg; + + while (true) { + var delegate = context.delegate; + if (delegate) { + var delegateResult = maybeInvokeDelegate(delegate, context); + if (delegateResult) { + if (delegateResult === ContinueSentinel) continue; + return delegateResult; + } + } + + if (context.method === 'next') { + // Setting context._sent for legacy support of Babel's + // function.sent implementation. + context.sent = context._sent = context.arg; + } else if (context.method === 'throw') { + if (state === GenStateSuspendedStart) { + state = GenStateCompleted; + throw context.arg; + } + + context.dispatchException(context.arg); + } else if (context.method === 'return') { + context.abrupt('return', context.arg); + } + + state = GenStateExecuting; + + var record = tryCatch(innerFn, self, context); + if (record.type === 'normal') { + // If an exception is thrown from innerFn, we leave state === + // GenStateExecuting and loop back for another invocation. + state = context.done ? GenStateCompleted : GenStateSuspendedYield; + + if (record.arg === ContinueSentinel) { + continue; + } + + return { + value: record.arg, + done: context.done, + }; + } else if (record.type === 'throw') { + state = GenStateCompleted; + // Dispatch the exception by looping back around to the + // context.dispatchException(context.arg) call above. + context.method = 'throw'; + context.arg = record.arg; + } + } + }; + } + + // Call delegate.iterator[context.method](context.arg) and handle the + // result, either by returning a { value, done } result from the + // delegate iterator, or by modifying context.method and context.arg, + // setting context.delegate to null, and returning the ContinueSentinel. + function maybeInvokeDelegate(delegate, context) { + var method = delegate.iterator[context.method]; + if (method === undefined) { + // A .throw or .return when the delegate iterator has no .throw + // method always terminates the yield* loop. + context.delegate = null; + + if (context.method === 'throw') { + if (delegate.iterator.return) { + // If the delegate iterator has a return method, give it a + // chance to clean up. + context.method = 'return'; + context.arg = undefined; + maybeInvokeDelegate(delegate, context); + + if (context.method === 'throw') { + // If maybeInvokeDelegate(context) changed context.method from + // "return" to "throw", let that override the TypeError below. + return ContinueSentinel; + } + } + + context.method = 'throw'; + context.arg = new TypeError("The iterator does not provide a 'throw' method"); + } + + return ContinueSentinel; + } + + var record = tryCatch(method, delegate.iterator, context.arg); + + if (record.type === 'throw') { + context.method = 'throw'; + context.arg = record.arg; + context.delegate = null; + return ContinueSentinel; + } + + var info = record.arg; + + if (!info) { + context.method = 'throw'; + context.arg = new TypeError('iterator result is not an object'); + context.delegate = null; + return ContinueSentinel; + } + + if (info.done) { + // Assign the result of the finished delegate to the temporary + // variable specified by delegate.resultName (see delegateYield). + context[delegate.resultName] = info.value; + + // Resume execution at the desired location (see delegateYield). + context.next = delegate.nextLoc; + + // If context.method was "throw" but the delegate handled the + // exception, let the outer generator proceed normally. If + // context.method was "next", forget context.arg since it has been + // "consumed" by the delegate iterator. If context.method was + // "return", allow the original .return call to continue in the + // outer generator. + if (context.method !== 'return') { + context.method = 'next'; + context.arg = undefined; + } + } else { + // Re-yield the result returned by the delegate method. + return info; + } + + // The delegate iterator is finished, so forget it and continue with + // the outer generator. + context.delegate = null; + return ContinueSentinel; + } + + // Define Generator.prototype.{next,throw,return} in terms of the + // unified ._invoke helper method. + defineIteratorMethods(Gp); + + Gp[toStringTagSymbol] = 'Generator'; + + Gp.toString = function () { + return '[object Generator]'; + }; + + function pushTryEntry(locs) { + var entry = { tryLoc: locs[0] }; + + if (1 in locs) { + entry.catchLoc = locs[1]; + } + + if (2 in locs) { + entry.finallyLoc = locs[2]; + entry.afterLoc = locs[3]; + } + + this.tryEntries.push(entry); + } + + function resetTryEntry(entry) { + var record = entry.completion || {}; + record.type = 'normal'; + delete record.arg; + entry.completion = record; + } + + function Context(tryLocsList) { + // The root entry object (effectively a try statement without a catch + // or a finally block) gives us a place to store values thrown from + // locations where there is no enclosing try statement. + this.tryEntries = [{ tryLoc: 'root' }]; + tryLocsList.forEach(pushTryEntry, this); + this.reset(true); + } + + runtime.keys = function (object) { + var keys = []; + for (var key in object) { + keys.push(key); + } + keys.reverse(); + + // Rather than returning an object with a next method, we keep + // things simple and return the next function itself. + return function next() { + while (keys.length) { + var key = keys.pop(); + if (key in object) { + next.value = key; + next.done = false; + return next; + } + } + + // To avoid creating an additional object, we just hang the .value + // and .done properties off the next function object itself. This + // also ensures that the minifier will not anonymize the function. + next.done = true; + return next; + }; + }; + + function values(iterable) { + if (iterable) { + var iteratorMethod = iterable[iteratorSymbol]; + if (iteratorMethod) { + return iteratorMethod.call(iterable); + } + + if (typeof iterable.next === 'function') { + return iterable; + } + + if (!isNaN(iterable.length)) { + var i = -1, + next = function next() { + while (++i < iterable.length) { + if (hasOwn.call(iterable, i)) { + next.value = iterable[i]; + next.done = false; + return next; + } + } + + next.value = undefined; + next.done = true; + + return next; + }; + + return (next.next = next); + } + } + + // Return an iterator with no values. + return { next: doneResult }; + } + runtime.values = values; + + function doneResult() { + return { value: undefined, done: true }; + } + + Context.prototype = { + constructor: Context, + + reset: function (skipTempReset) { + this.prev = 0; + this.next = 0; + // Resetting context._sent for legacy support of Babel's + // function.sent implementation. + this.sent = this._sent = undefined; + this.done = false; + this.delegate = null; + + this.method = 'next'; + this.arg = undefined; + + this.tryEntries.forEach(resetTryEntry); + + if (!skipTempReset) { + for (var name in this) { + // Not sure about the optimal order of these conditions: + if (name.charAt(0) === 't' && hasOwn.call(this, name) && !isNaN(+name.slice(1))) { + this[name] = undefined; + } + } + } + }, + + stop: function () { + this.done = true; + + var rootEntry = this.tryEntries[0]; + var rootRecord = rootEntry.completion; + if (rootRecord.type === 'throw') { + throw rootRecord.arg; + } + + return this.rval; + }, + + dispatchException: function (exception) { + if (this.done) { + throw exception; + } + + var context = this; + function handle(loc, caught) { + record.type = 'throw'; + record.arg = exception; + context.next = loc; + + if (caught) { + // If the dispatched exception was caught by a catch block, + // then let that catch block handle the exception normally. + context.method = 'next'; + context.arg = undefined; + } + + return !!caught; + } + + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + var record = entry.completion; + + if (entry.tryLoc === 'root') { + // Exception thrown outside of any try block that could handle + // it, so set the completion value of the entire function to + // throw the exception. + return handle('end'); + } + + if (entry.tryLoc <= this.prev) { + var hasCatch = hasOwn.call(entry, 'catchLoc'); + var hasFinally = hasOwn.call(entry, 'finallyLoc'); + + if (hasCatch && hasFinally) { + if (this.prev < entry.catchLoc) { + return handle(entry.catchLoc, true); + } else if (this.prev < entry.finallyLoc) { + return handle(entry.finallyLoc); + } + } else if (hasCatch) { + if (this.prev < entry.catchLoc) { + return handle(entry.catchLoc, true); + } + } else if (hasFinally) { + if (this.prev < entry.finallyLoc) { + return handle(entry.finallyLoc); + } + } else { + throw new Error('try statement without catch or finally'); + } + } + } + }, + + abrupt: function (type, arg) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + if ( + entry.tryLoc <= this.prev && + hasOwn.call(entry, 'finallyLoc') && + this.prev < entry.finallyLoc + ) { + var finallyEntry = entry; + break; + } + } + + if ( + finallyEntry && + (type === 'break' || type === 'continue') && + finallyEntry.tryLoc <= arg && + arg <= finallyEntry.finallyLoc + ) { + // Ignore the finally entry if control is not jumping to a + // location outside the try/catch block. + finallyEntry = null; + } + + var record = finallyEntry ? finallyEntry.completion : {}; + record.type = type; + record.arg = arg; + + if (finallyEntry) { + this.method = 'next'; + this.next = finallyEntry.finallyLoc; + return ContinueSentinel; + } + + return this.complete(record); + }, + + complete: function (record, afterLoc) { + if (record.type === 'throw') { + throw record.arg; + } + + if (record.type === 'break' || record.type === 'continue') { + this.next = record.arg; + } else if (record.type === 'return') { + this.rval = this.arg = record.arg; + this.method = 'return'; + this.next = 'end'; + } else if (record.type === 'normal' && afterLoc) { + this.next = afterLoc; + } + + return ContinueSentinel; + }, + + finish: function (finallyLoc) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + if (entry.finallyLoc === finallyLoc) { + this.complete(entry.completion, entry.afterLoc); + resetTryEntry(entry); + return ContinueSentinel; + } + } + }, + + catch: function (tryLoc) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + if (entry.tryLoc === tryLoc) { + var record = entry.completion; + if (record.type === 'throw') { + var thrown = record.arg; + resetTryEntry(entry); + } + return thrown; + } + } + + // The context.catch method must only be called with a location + // argument that corresponds to a known catch block. + throw new Error('illegal catch attempt'); + }, + + delegateYield: function (iterable, resultName, nextLoc) { + this.delegate = { + iterator: values(iterable), + resultName: resultName, + nextLoc: nextLoc, + }; + + if (this.method === 'next') { + // Deliberately forget the last sent value so that we don't + // accidentally pass it on to the delegate. + this.arg = undefined; + } + + return ContinueSentinel; + }, + }; + })( + // Among the various tricks for obtaining a reference to the global + // object, this seems to be the most reliable technique that does not + // use indirect eval (which violates Content Security Policy). + typeof global === 'object' + ? global + : typeof window === 'object' + ? window + : typeof self === 'object' + ? self + : this, + ); + + /* WEBPACK VAR INJECTION */ + }).call(exports, __webpack_require__(22), __webpack_require__(84)); + + /***/ + }, + /* 836 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + module.exports = function (str) { + return encodeURIComponent(str).replace(/[!'()*]/g, function (c) { + return '%' + c.charCodeAt(0).toString(16).toUpperCase(); + }); + }; + + /***/ + }, + /* 837 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = __webpack_require__(838); + + /***/ + }, + /* 838 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (global, module) { + Object.defineProperty(exports, '__esModule', { + value: true, + }); + + var _ponyfill = __webpack_require__(839); + + var _ponyfill2 = _interopRequireDefault(_ponyfill); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + var root; /* global window */ + + if (typeof self !== 'undefined') { + root = self; + } else if (typeof window !== 'undefined') { + root = window; + } else if (typeof global !== 'undefined') { + root = global; + } else if (true) { + root = module; + } else { + root = Function('return this')(); + } + + var result = (0, _ponyfill2['default'])(root); + exports['default'] = result; + /* WEBPACK VAR INJECTION */ + }).call(exports, __webpack_require__(22), __webpack_require__(365)(module)); + + /***/ + }, + /* 839 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports['default'] = symbolObservablePonyfill; + function symbolObservablePonyfill(root) { + var result; + var _Symbol = root.Symbol; + + if (typeof _Symbol === 'function') { + if (_Symbol.observable) { + result = _Symbol.observable; + } else { + result = _Symbol('observable'); + _Symbol.observable = result; + } + } else { + result = '@@observable'; + } + + return result; + } + + /***/ + }, + /* 840 */ + /***/ function (module, exports) { + /* (ignored) */ + /***/ + }, + /* 841 */ + /***/ function (module, exports) { + /* (ignored) */ + /***/ + }, + /* 842 */ + /***/ function (module, exports) { + /* (ignored) */ + /***/ + }, + /* 843 */ + /***/ function (module, exports) { + /* (ignored) */ + /***/ + }, + /* 844 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(367); + module.exports = __webpack_require__(366); + + /***/ + }, + /******/ + ], +); diff --git a/packages/react-on-rails-pro-node-renderer/tests/fixtures/projects/spec-dummy-web-target/9fa89f7 /reduxAppRenderingRequest.js b/packages/react-on-rails-pro-node-renderer/tests/fixtures/projects/spec-dummy-web-target/9fa89f7 /reduxAppRenderingRequest.js new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/react-on-rails-pro-node-renderer/tests/fixtures/projects/spec-dummy-web-target/9fa89f7 /server-bundle-node-target.js b/packages/react-on-rails-pro-node-renderer/tests/fixtures/projects/spec-dummy-web-target/9fa89f7 /server-bundle-node-target.js new file mode 100644 index 0000000000..f574aff9c4 --- /dev/null +++ b/packages/react-on-rails-pro-node-renderer/tests/fixtures/projects/spec-dummy-web-target/9fa89f7 /server-bundle-node-target.js @@ -0,0 +1,94313 @@ +module.exports = /******/ (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, { + /******/ configurable: false, + /******/ enumerable: true, + /******/ get: getter, + /******/ + }); + /******/ + } + /******/ + }; + /******/ + /******/ // 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 = '/webpack/development/'; + /******/ + /******/ // Load entry module and return exports + /******/ return __webpack_require__((__webpack_require__.s = 266)); + /******/ +})( + /************************************************************************/ + /******/ [ + /* 0 */ + /***/ function (module, exports, __webpack_require__) { + var global = __webpack_require__(3); + var core = __webpack_require__(23); + var hide = __webpack_require__(15); + var redefine = __webpack_require__(16); + var ctx = __webpack_require__(24); + var PROTOTYPE = 'prototype'; + + var $export = function (type, name, source) { + var IS_FORCED = type & $export.F; + var IS_GLOBAL = type & $export.G; + var IS_STATIC = type & $export.S; + var IS_PROTO = type & $export.P; + var IS_BIND = type & $export.B; + var target = IS_GLOBAL + ? global + : IS_STATIC + ? global[name] || (global[name] = {}) + : (global[name] || {})[PROTOTYPE]; + var exports = IS_GLOBAL ? core : core[name] || (core[name] = {}); + var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {}); + var key, own, out, exp; + if (IS_GLOBAL) source = name; + for (key in source) { + // contains in native + own = !IS_FORCED && target && target[key] !== undefined; + // export native or passed + out = (own ? target : source)[key]; + // bind timers to global for call from export context + exp = + IS_BIND && own + ? ctx(out, global) + : IS_PROTO && typeof out == 'function' + ? ctx(Function.call, out) + : out; + // extend global + if (target) redefine(target, key, out, type & $export.U); + // export + if (exports[key] != out) hide(exports, key, exp); + if (IS_PROTO && expProto[key] != out) expProto[key] = out; + } + }; + global.core = core; + // type bitmap + $export.F = 1; // forced + $export.G = 2; // global + $export.S = 4; // static + $export.P = 8; // proto + $export.B = 16; // bind + $export.W = 32; // wrap + $export.U = 64; // safe + $export.R = 128; // real proto method for `library` + module.exports = $export; + + /***/ + }, + /* 1 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + if (false) { + module.exports = require('./cjs/react.production.min.js'); + } else { + module.exports = __webpack_require__(511); + } + + /***/ + }, + /* 2 */ + /***/ function (module, exports, __webpack_require__) { + var isObject = __webpack_require__(5); + module.exports = function (it) { + if (!isObject(it)) throw TypeError(it + ' is not an object!'); + return it; + }; + + /***/ + }, + /* 3 */ + /***/ function (module, exports) { + // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 + var global = (module.exports = + typeof window != 'undefined' && window.Math == Math + ? window + : typeof self != 'undefined' && self.Math == Math + ? self + : // eslint-disable-next-line no-new-func + Function('return this')()); + if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef + + /***/ + }, + /* 4 */ + /***/ function (module, exports) { + module.exports = function (exec) { + try { + return !!exec(); + } catch (e) { + return true; + } + }; + + /***/ + }, + /* 5 */ + /***/ function (module, exports) { + module.exports = function (it) { + return typeof it === 'object' ? it !== null : typeof it === 'function'; + }; + + /***/ + }, + /* 6 */ + /***/ function (module, exports, __webpack_require__) { + var store = __webpack_require__(73)('wks'); + var uid = __webpack_require__(50); + var Symbol = __webpack_require__(3).Symbol; + var USE_SYMBOL = typeof Symbol == 'function'; + + var $exports = (module.exports = function (name) { + return ( + store[name] || + (store[name] = (USE_SYMBOL && Symbol[name]) || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)) + ); + }); + + $exports.store = store; + + /***/ + }, + /* 7 */ + /***/ function (module, exports, __webpack_require__) { + // 7.1.15 ToLength + var toInteger = __webpack_require__(26); + var min = Math.min; + module.exports = function (it) { + return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 + }; + + /***/ + }, + /* 8 */ + /***/ function (module, exports, __webpack_require__) { + // Thank's IE8 for his funny defineProperty + module.exports = !__webpack_require__(4)(function () { + return ( + Object.defineProperty({}, 'a', { + get: function () { + return 7; + }, + }).a != 7 + ); + }); + + /***/ + }, + /* 9 */ + /***/ function (module, exports, __webpack_require__) { + var anObject = __webpack_require__(2); + var IE8_DOM_DEFINE = __webpack_require__(174); + var toPrimitive = __webpack_require__(31); + var dP = Object.defineProperty; + + exports.f = __webpack_require__(8) + ? Object.defineProperty + : function defineProperty(O, P, Attributes) { + anObject(O); + P = toPrimitive(P, true); + anObject(Attributes); + if (IE8_DOM_DEFINE) + try { + return dP(O, P, Attributes); + } catch (e) { + /* empty */ + } + if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!'); + if ('value' in Attributes) O[P] = Attributes.value; + return O; + }; + + /***/ + }, + /* 10 */ + /***/ function (module, exports, __webpack_require__) { + /** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + + if (true) { + var ReactIs = __webpack_require__(108); + + // By explicitly using `prop-types` you are opting into new development behavior. + // http://fb.me/prop-types-in-prod + var throwOnDirectAccess = true; + module.exports = __webpack_require__(542)(ReactIs.isElement, throwOnDirectAccess); + } else { + // By explicitly using `prop-types` you are opting into new production behavior. + // http://fb.me/prop-types-in-prod + module.exports = require('./factoryWithThrowingShims')(); + } + + /***/ + }, + /* 11 */ + /***/ function (module, exports, __webpack_require__) { + // 7.1.13 ToObject(argument) + var defined = __webpack_require__(32); + module.exports = function (it) { + return Object(defined(it)); + }; + + /***/ + }, + /* 12 */ + /***/ function (module, exports) { + module.exports = function (it) { + if (typeof it != 'function') throw TypeError(it + ' is not a function!'); + return it; + }; + + /***/ + }, + /* 13 */ + /***/ function (module, exports) { + var core = (module.exports = { version: '2.6.11' }); + if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef + + /***/ + }, + /* 14 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + + /** + * Use invariant() to assert state which your program assumes to be true. + * + * Provide sprintf-style format (only %s is supported) and arguments + * to provide information about what broke and what you were + * expecting. + * + * The invariant message will be stripped in production, but the invariant + * will remain to ensure logic does not differ in production. + */ + + var NODE_ENV = 'development'; + + var invariant = function (condition, format, a, b, c, d, e, f) { + if (NODE_ENV !== 'production') { + if (format === undefined) { + throw new Error('invariant requires an error message argument'); + } + } + + if (!condition) { + var error; + if (format === undefined) { + error = new Error( + 'Minified exception occurred; use the non-minified dev environment ' + + 'for the full error message and additional helpful warnings.', + ); + } else { + var args = [a, b, c, d, e, f]; + var argIndex = 0; + error = new Error( + format.replace(/%s/g, function () { + return args[argIndex++]; + }), + ); + error.name = 'Invariant Violation'; + } + + error.framesToPop = 1; // we don't care about invariant's own frame + throw error; + } + }; + + module.exports = invariant; + + /***/ + }, + /* 15 */ + /***/ function (module, exports, __webpack_require__) { + var dP = __webpack_require__(9); + var createDesc = __webpack_require__(49); + module.exports = __webpack_require__(8) + ? function (object, key, value) { + return dP.f(object, key, createDesc(1, value)); + } + : function (object, key, value) { + object[key] = value; + return object; + }; + + /***/ + }, + /* 16 */ + /***/ function (module, exports, __webpack_require__) { + var global = __webpack_require__(3); + var hide = __webpack_require__(15); + var has = __webpack_require__(18); + var SRC = __webpack_require__(50)('src'); + var $toString = __webpack_require__(271); + var TO_STRING = 'toString'; + var TPL = ('' + $toString).split(TO_STRING); + + __webpack_require__(23).inspectSource = function (it) { + return $toString.call(it); + }; + + (module.exports = function (O, key, val, safe) { + var isFunction = typeof val == 'function'; + if (isFunction) has(val, 'name') || hide(val, 'name', key); + if (O[key] === val) return; + if (isFunction) has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key))); + if (O === global) { + O[key] = val; + } else if (!safe) { + delete O[key]; + hide(O, key, val); + } else if (O[key]) { + O[key] = val; + } else { + hide(O, key, val); + } + // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative + })(Function.prototype, TO_STRING, function toString() { + return (typeof this == 'function' && this[SRC]) || $toString.call(this); + }); + + /***/ + }, + /* 17 */ + /***/ function (module, exports, __webpack_require__) { + var $export = __webpack_require__(0); + var fails = __webpack_require__(4); + var defined = __webpack_require__(32); + var quot = /"/g; + // B.2.3.2.1 CreateHTML(string, tag, attribute, value) + var createHTML = function (string, tag, attribute, value) { + var S = String(defined(string)); + var p1 = '<' + tag; + if (attribute !== '') p1 += ' ' + attribute + '="' + String(value).replace(quot, '"') + '"'; + return p1 + '>' + S + '</' + tag + '>'; + }; + module.exports = function (NAME, exec) { + var O = {}; + O[NAME] = exec(createHTML); + $export( + $export.P + + $export.F * + fails(function () { + var test = ''[NAME]('"'); + return test !== test.toLowerCase() || test.split('"').length > 3; + }), + 'String', + O, + ); + }; + + /***/ + }, + /* 18 */ + /***/ function (module, exports) { + var hasOwnProperty = {}.hasOwnProperty; + module.exports = function (it, key) { + return hasOwnProperty.call(it, key); + }; + + /***/ + }, + /* 19 */ + /***/ function (module, exports, __webpack_require__) { + // to indexed object, toObject with fallback for non-array-like ES3 strings + var IObject = __webpack_require__(74); + var defined = __webpack_require__(32); + module.exports = function (it) { + return IObject(defined(it)); + }; + + /***/ + }, + /* 20 */ + /***/ function (module, exports, __webpack_require__) { + var pIE = __webpack_require__(75); + var createDesc = __webpack_require__(49); + var toIObject = __webpack_require__(19); + var toPrimitive = __webpack_require__(31); + var has = __webpack_require__(18); + var IE8_DOM_DEFINE = __webpack_require__(174); + var gOPD = Object.getOwnPropertyDescriptor; + + exports.f = __webpack_require__(8) + ? gOPD + : function getOwnPropertyDescriptor(O, P) { + O = toIObject(O); + P = toPrimitive(P, true); + if (IE8_DOM_DEFINE) + try { + return gOPD(O, P); + } catch (e) { + /* empty */ + } + if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]); + }; + + /***/ + }, + /* 21 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) + var has = __webpack_require__(18); + var toObject = __webpack_require__(11); + var IE_PROTO = __webpack_require__(114)('IE_PROTO'); + var ObjectProto = Object.prototype; + + module.exports = + Object.getPrototypeOf || + function (O) { + O = toObject(O); + if (has(O, IE_PROTO)) return O[IE_PROTO]; + if (typeof O.constructor == 'function' && O instanceof O.constructor) { + return O.constructor.prototype; + } + return O instanceof Object ? ObjectProto : null; + }; + + /***/ + }, + /* 22 */ + /***/ function (module, exports, __webpack_require__) { + var store = __webpack_require__(149)('wks'); + var uid = __webpack_require__(103); + var Symbol = __webpack_require__(29).Symbol; + var USE_SYMBOL = typeof Symbol == 'function'; + + var $exports = (module.exports = function (name) { + return ( + store[name] || + (store[name] = (USE_SYMBOL && Symbol[name]) || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)) + ); + }); + + $exports.store = store; + + /***/ + }, + /* 23 */ + /***/ function (module, exports) { + var core = (module.exports = { version: '2.6.11' }); + if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef + + /***/ + }, + /* 24 */ + /***/ function (module, exports, __webpack_require__) { + // optional / simple context binding + var aFunction = __webpack_require__(12); + module.exports = function (fn, that, length) { + aFunction(fn); + if (that === undefined) return fn; + switch (length) { + case 1: + return function (a) { + return fn.call(that, a); + }; + case 2: + return function (a, b) { + return fn.call(that, a, b); + }; + case 3: + return function (a, b, c) { + return fn.call(that, a, b, c); + }; + } + return function (/* ...args */) { + return fn.apply(that, arguments); + }; + }; + + /***/ + }, + /* 25 */ + /***/ function (module, exports) { + var toString = {}.toString; + + module.exports = function (it) { + return toString.call(it).slice(8, -1); + }; + + /***/ + }, + /* 26 */ + /***/ function (module, exports) { + // 7.1.4 ToInteger + var ceil = Math.ceil; + var floor = Math.floor; + module.exports = function (it) { + return isNaN((it = +it)) ? 0 : (it > 0 ? floor : ceil)(it); + }; + + /***/ + }, + /* 27 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var fails = __webpack_require__(4); + + module.exports = function (method, arg) { + return ( + !!method && + fails(function () { + // eslint-disable-next-line no-useless-call + arg + ? method.call( + null, + function () { + /* empty */ + }, + 1, + ) + : method.call(null); + }) + ); + }; + + /***/ + }, + /* 28 */ + /***/ function (module, exports, __webpack_require__) { + // Thank's IE8 for his funny defineProperty + module.exports = !__webpack_require__(61)(function () { + return ( + Object.defineProperty({}, 'a', { + get: function () { + return 7; + }, + }).a != 7 + ); + }); + + /***/ + }, + /* 29 */ + /***/ function (module, exports) { + // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 + var global = (module.exports = + typeof window != 'undefined' && window.Math == Math + ? window + : typeof self != 'undefined' && self.Math == Math + ? self + : // eslint-disable-next-line no-new-func + Function('return this')()); + if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef + + /***/ + }, + /* 30 */ + /***/ function (module, exports, __webpack_require__) { + var anObject = __webpack_require__(62); + var IE8_DOM_DEFINE = __webpack_require__(212); + var toPrimitive = __webpack_require__(142); + var dP = Object.defineProperty; + + exports.f = __webpack_require__(28) + ? Object.defineProperty + : function defineProperty(O, P, Attributes) { + anObject(O); + P = toPrimitive(P, true); + anObject(Attributes); + if (IE8_DOM_DEFINE) + try { + return dP(O, P, Attributes); + } catch (e) { + /* empty */ + } + if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!'); + if ('value' in Attributes) O[P] = Attributes.value; + return O; + }; + + /***/ + }, + /* 31 */ + /***/ function (module, exports, __webpack_require__) { + // 7.1.1 ToPrimitive(input [, PreferredType]) + var isObject = __webpack_require__(5); + // instead of the ES6 spec version, we didn't implement @@toPrimitive case + // and the second argument - flag - preferred type is a string + module.exports = function (it, S) { + if (!isObject(it)) return it; + var fn, val; + if (S && typeof (fn = it.toString) == 'function' && !isObject((val = fn.call(it)))) return val; + if (typeof (fn = it.valueOf) == 'function' && !isObject((val = fn.call(it)))) return val; + if (!S && typeof (fn = it.toString) == 'function' && !isObject((val = fn.call(it)))) return val; + throw TypeError("Can't convert object to primitive value"); + }; + + /***/ + }, + /* 32 */ + /***/ function (module, exports) { + // 7.2.1 RequireObjectCoercible(argument) + module.exports = function (it) { + if (it == undefined) throw TypeError("Can't call method on " + it); + return it; + }; + + /***/ + }, + /* 33 */ + /***/ function (module, exports, __webpack_require__) { + // most Object methods by ES6 should accept primitives + var $export = __webpack_require__(0); + var core = __webpack_require__(23); + var fails = __webpack_require__(4); + module.exports = function (KEY, exec) { + var fn = (core.Object || {})[KEY] || Object[KEY]; + var exp = {}; + exp[KEY] = exec(fn); + $export( + $export.S + + $export.F * + fails(function () { + fn(1); + }), + 'Object', + exp, + ); + }; + + /***/ + }, + /* 34 */ + /***/ function (module, exports, __webpack_require__) { + // 0 -> Array#forEach + // 1 -> Array#map + // 2 -> Array#filter + // 3 -> Array#some + // 4 -> Array#every + // 5 -> Array#find + // 6 -> Array#findIndex + var ctx = __webpack_require__(24); + var IObject = __webpack_require__(74); + var toObject = __webpack_require__(11); + var toLength = __webpack_require__(7); + var asc = __webpack_require__(130); + module.exports = function (TYPE, $create) { + var IS_MAP = TYPE == 1; + var IS_FILTER = TYPE == 2; + var IS_SOME = TYPE == 3; + var IS_EVERY = TYPE == 4; + var IS_FIND_INDEX = TYPE == 6; + var NO_HOLES = TYPE == 5 || IS_FIND_INDEX; + var create = $create || asc; + return function ($this, callbackfn, that) { + var O = toObject($this); + var self = IObject(O); + var f = ctx(callbackfn, that, 3); + var length = toLength(self.length); + var index = 0; + var result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined; + var val, res; + for (; length > index; index++) + if (NO_HOLES || index in self) { + val = self[index]; + res = f(val, index, O); + if (TYPE) { + if (IS_MAP) + result[index] = res; // map + else if (res) + switch (TYPE) { + case 3: + return true; // some + case 5: + return val; // find + case 6: + return index; // findIndex + case 2: + result.push(val); // filter + } + else if (IS_EVERY) return false; // every + } + } + return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result; + }; + }; + + /***/ + }, + /* 35 */ + /***/ function (module, exports) { + module.exports = function (it) { + return typeof it === 'object' ? it !== null : typeof it === 'function'; + }; + + /***/ + }, + /* 36 */ + /***/ function (module, exports, __webpack_require__) { + var global = __webpack_require__(29); + var core = __webpack_require__(13); + var ctx = __webpack_require__(68); + var hide = __webpack_require__(45); + var has = __webpack_require__(44); + var PROTOTYPE = 'prototype'; + + var $export = function (type, name, source) { + var IS_FORCED = type & $export.F; + var IS_GLOBAL = type & $export.G; + var IS_STATIC = type & $export.S; + var IS_PROTO = type & $export.P; + var IS_BIND = type & $export.B; + var IS_WRAP = type & $export.W; + var exports = IS_GLOBAL ? core : core[name] || (core[name] = {}); + var expProto = exports[PROTOTYPE]; + var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]; + var key, own, out; + if (IS_GLOBAL) source = name; + for (key in source) { + // contains in native + own = !IS_FORCED && target && target[key] !== undefined; + if (own && has(exports, key)) continue; + // export native or passed + out = own ? target[key] : source[key]; + // prevent global pollution for namespaces + exports[key] = + IS_GLOBAL && typeof target[key] != 'function' + ? source[key] + : // bind timers to global for call from export context + IS_BIND && own + ? ctx(out, global) + : // wrap global constructors for prevent change them in library + IS_WRAP && target[key] == out + ? (function (C) { + var F = function (a, b, c) { + if (this instanceof C) { + switch (arguments.length) { + case 0: + return new C(); + case 1: + return new C(a); + case 2: + return new C(a, b); + } + return new C(a, b, c); + } + return C.apply(this, arguments); + }; + F[PROTOTYPE] = C[PROTOTYPE]; + return F; + // make static versions for prototype methods + })(out) + : IS_PROTO && typeof out == 'function' + ? ctx(Function.call, out) + : out; + // export proto methods to core.%CONSTRUCTOR%.methods.%NAME% + if (IS_PROTO) { + (exports.virtual || (exports.virtual = {}))[key] = out; + // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME% + if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out); + } + } + }; + // type bitmap + $export.F = 1; // forced + $export.G = 2; // global + $export.S = 4; // static + $export.P = 8; // proto + $export.B = 16; // bind + $export.W = 32; // wrap + $export.U = 64; // safe + $export.R = 128; // real proto method for `library` + module.exports = $export; + + /***/ + }, + /* 37 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + */ + + var React = __webpack_require__(1); + var factory = __webpack_require__(546); + + if (typeof React === 'undefined') { + throw Error( + 'create-react-class could not find the React object. If you are using script tags, ' + + 'make sure that React is being loaded before create-react-class.', + ); + } + + // Hack to grab NoopUpdateQueue from isomorphic React + var ReactNoopUpdateQueue = new React.Component().updater; + + module.exports = factory(React.Component, React.isValidElement, ReactNoopUpdateQueue); + + /***/ + }, + /* 38 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + if (__webpack_require__(8)) { + var LIBRARY = __webpack_require__(41); + var global = __webpack_require__(3); + var fails = __webpack_require__(4); + var $export = __webpack_require__(0); + var $typed = __webpack_require__(96); + var $buffer = __webpack_require__(138); + var ctx = __webpack_require__(24); + var anInstance = __webpack_require__(56); + var propertyDesc = __webpack_require__(49); + var hide = __webpack_require__(15); + var redefineAll = __webpack_require__(58); + var toInteger = __webpack_require__(26); + var toLength = __webpack_require__(7); + var toIndex = __webpack_require__(202); + var toAbsoluteIndex = __webpack_require__(52); + var toPrimitive = __webpack_require__(31); + var has = __webpack_require__(18); + var classof = __webpack_require__(65); + var isObject = __webpack_require__(5); + var toObject = __webpack_require__(11); + var isArrayIter = __webpack_require__(127); + var create = __webpack_require__(53); + var getPrototypeOf = __webpack_require__(21); + var gOPN = __webpack_require__(54).f; + var getIterFn = __webpack_require__(129); + var uid = __webpack_require__(50); + var wks = __webpack_require__(6); + var createArrayMethod = __webpack_require__(34); + var createArrayIncludes = __webpack_require__(86); + var speciesConstructor = __webpack_require__(77); + var ArrayIterators = __webpack_require__(132); + var Iterators = __webpack_require__(67); + var $iterDetect = __webpack_require__(91); + var setSpecies = __webpack_require__(55); + var arrayFill = __webpack_require__(131); + var arrayCopyWithin = __webpack_require__(191); + var $DP = __webpack_require__(9); + var $GOPD = __webpack_require__(20); + var dP = $DP.f; + var gOPD = $GOPD.f; + var RangeError = global.RangeError; + var TypeError = global.TypeError; + var Uint8Array = global.Uint8Array; + var ARRAY_BUFFER = 'ArrayBuffer'; + var SHARED_BUFFER = 'Shared' + ARRAY_BUFFER; + var BYTES_PER_ELEMENT = 'BYTES_PER_ELEMENT'; + var PROTOTYPE = 'prototype'; + var ArrayProto = Array[PROTOTYPE]; + var $ArrayBuffer = $buffer.ArrayBuffer; + var $DataView = $buffer.DataView; + var arrayForEach = createArrayMethod(0); + var arrayFilter = createArrayMethod(2); + var arraySome = createArrayMethod(3); + var arrayEvery = createArrayMethod(4); + var arrayFind = createArrayMethod(5); + var arrayFindIndex = createArrayMethod(6); + var arrayIncludes = createArrayIncludes(true); + var arrayIndexOf = createArrayIncludes(false); + var arrayValues = ArrayIterators.values; + var arrayKeys = ArrayIterators.keys; + var arrayEntries = ArrayIterators.entries; + var arrayLastIndexOf = ArrayProto.lastIndexOf; + var arrayReduce = ArrayProto.reduce; + var arrayReduceRight = ArrayProto.reduceRight; + var arrayJoin = ArrayProto.join; + var arraySort = ArrayProto.sort; + var arraySlice = ArrayProto.slice; + var arrayToString = ArrayProto.toString; + var arrayToLocaleString = ArrayProto.toLocaleString; + var ITERATOR = wks('iterator'); + var TAG = wks('toStringTag'); + var TYPED_CONSTRUCTOR = uid('typed_constructor'); + var DEF_CONSTRUCTOR = uid('def_constructor'); + var ALL_CONSTRUCTORS = $typed.CONSTR; + var TYPED_ARRAY = $typed.TYPED; + var VIEW = $typed.VIEW; + var WRONG_LENGTH = 'Wrong length!'; + + var $map = createArrayMethod(1, function (O, length) { + return allocate(speciesConstructor(O, O[DEF_CONSTRUCTOR]), length); + }); + + var LITTLE_ENDIAN = fails(function () { + // eslint-disable-next-line no-undef + return new Uint8Array(new Uint16Array([1]).buffer)[0] === 1; + }); + + var FORCED_SET = + !!Uint8Array && + !!Uint8Array[PROTOTYPE].set && + fails(function () { + new Uint8Array(1).set({}); + }); + + var toOffset = function (it, BYTES) { + var offset = toInteger(it); + if (offset < 0 || offset % BYTES) throw RangeError('Wrong offset!'); + return offset; + }; + + var validate = function (it) { + if (isObject(it) && TYPED_ARRAY in it) return it; + throw TypeError(it + ' is not a typed array!'); + }; + + var allocate = function (C, length) { + if (!(isObject(C) && TYPED_CONSTRUCTOR in C)) { + throw TypeError('It is not a typed array constructor!'); + } + return new C(length); + }; + + var speciesFromList = function (O, list) { + return fromList(speciesConstructor(O, O[DEF_CONSTRUCTOR]), list); + }; + + var fromList = function (C, list) { + var index = 0; + var length = list.length; + var result = allocate(C, length); + while (length > index) result[index] = list[index++]; + return result; + }; + + var addGetter = function (it, key, internal) { + dP(it, key, { + get: function () { + return this._d[internal]; + }, + }); + }; + + var $from = function from(source /* , mapfn, thisArg */) { + var O = toObject(source); + var aLen = arguments.length; + var mapfn = aLen > 1 ? arguments[1] : undefined; + var mapping = mapfn !== undefined; + var iterFn = getIterFn(O); + var i, length, values, result, step, iterator; + if (iterFn != undefined && !isArrayIter(iterFn)) { + for (iterator = iterFn.call(O), values = [], i = 0; !(step = iterator.next()).done; i++) { + values.push(step.value); + } + O = values; + } + if (mapping && aLen > 2) mapfn = ctx(mapfn, arguments[2], 2); + for (i = 0, length = toLength(O.length), result = allocate(this, length); length > i; i++) { + result[i] = mapping ? mapfn(O[i], i) : O[i]; + } + return result; + }; + + var $of = function of(/* ...items */) { + var index = 0; + var length = arguments.length; + var result = allocate(this, length); + while (length > index) result[index] = arguments[index++]; + return result; + }; + + // iOS Safari 6.x fails here + var TO_LOCALE_BUG = + !!Uint8Array && + fails(function () { + arrayToLocaleString.call(new Uint8Array(1)); + }); + + var $toLocaleString = function toLocaleString() { + return arrayToLocaleString.apply( + TO_LOCALE_BUG ? arraySlice.call(validate(this)) : validate(this), + arguments, + ); + }; + + var proto = { + copyWithin: function copyWithin(target, start /* , end */) { + return arrayCopyWithin.call( + validate(this), + target, + start, + arguments.length > 2 ? arguments[2] : undefined, + ); + }, + every: function every(callbackfn /* , thisArg */) { + return arrayEvery(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); + }, + fill: function fill(value /* , start, end */) { + // eslint-disable-line no-unused-vars + return arrayFill.apply(validate(this), arguments); + }, + filter: function filter(callbackfn /* , thisArg */) { + return speciesFromList( + this, + arrayFilter(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined), + ); + }, + find: function find(predicate /* , thisArg */) { + return arrayFind(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined); + }, + findIndex: function findIndex(predicate /* , thisArg */) { + return arrayFindIndex(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined); + }, + forEach: function forEach(callbackfn /* , thisArg */) { + arrayForEach(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); + }, + indexOf: function indexOf(searchElement /* , fromIndex */) { + return arrayIndexOf( + validate(this), + searchElement, + arguments.length > 1 ? arguments[1] : undefined, + ); + }, + includes: function includes(searchElement /* , fromIndex */) { + return arrayIncludes( + validate(this), + searchElement, + arguments.length > 1 ? arguments[1] : undefined, + ); + }, + join: function join(separator) { + // eslint-disable-line no-unused-vars + return arrayJoin.apply(validate(this), arguments); + }, + lastIndexOf: function lastIndexOf(searchElement /* , fromIndex */) { + // eslint-disable-line no-unused-vars + return arrayLastIndexOf.apply(validate(this), arguments); + }, + map: function map(mapfn /* , thisArg */) { + return $map(validate(this), mapfn, arguments.length > 1 ? arguments[1] : undefined); + }, + reduce: function reduce(callbackfn /* , initialValue */) { + // eslint-disable-line no-unused-vars + return arrayReduce.apply(validate(this), arguments); + }, + reduceRight: function reduceRight(callbackfn /* , initialValue */) { + // eslint-disable-line no-unused-vars + return arrayReduceRight.apply(validate(this), arguments); + }, + reverse: function reverse() { + var that = this; + var length = validate(that).length; + var middle = Math.floor(length / 2); + var index = 0; + var value; + while (index < middle) { + value = that[index]; + that[index++] = that[--length]; + that[length] = value; + } + return that; + }, + some: function some(callbackfn /* , thisArg */) { + return arraySome(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); + }, + sort: function sort(comparefn) { + return arraySort.call(validate(this), comparefn); + }, + subarray: function subarray(begin, end) { + var O = validate(this); + var length = O.length; + var $begin = toAbsoluteIndex(begin, length); + return new (speciesConstructor(O, O[DEF_CONSTRUCTOR]))( + O.buffer, + O.byteOffset + $begin * O.BYTES_PER_ELEMENT, + toLength((end === undefined ? length : toAbsoluteIndex(end, length)) - $begin), + ); + }, + }; + + var $slice = function slice(start, end) { + return speciesFromList(this, arraySlice.call(validate(this), start, end)); + }; + + var $set = function set(arrayLike /* , offset */) { + validate(this); + var offset = toOffset(arguments[1], 1); + var length = this.length; + var src = toObject(arrayLike); + var len = toLength(src.length); + var index = 0; + if (len + offset > length) throw RangeError(WRONG_LENGTH); + while (index < len) this[offset + index] = src[index++]; + }; + + var $iterators = { + entries: function entries() { + return arrayEntries.call(validate(this)); + }, + keys: function keys() { + return arrayKeys.call(validate(this)); + }, + values: function values() { + return arrayValues.call(validate(this)); + }, + }; + + var isTAIndex = function (target, key) { + return ( + isObject(target) && + target[TYPED_ARRAY] && + typeof key != 'symbol' && + key in target && + String(+key) == String(key) + ); + }; + var $getDesc = function getOwnPropertyDescriptor(target, key) { + return isTAIndex(target, (key = toPrimitive(key, true))) + ? propertyDesc(2, target[key]) + : gOPD(target, key); + }; + var $setDesc = function defineProperty(target, key, desc) { + if ( + isTAIndex(target, (key = toPrimitive(key, true))) && + isObject(desc) && + has(desc, 'value') && + !has(desc, 'get') && + !has(desc, 'set') && + // TODO: add validation descriptor w/o calling accessors + !desc.configurable && + (!has(desc, 'writable') || desc.writable) && + (!has(desc, 'enumerable') || desc.enumerable) + ) { + target[key] = desc.value; + return target; + } + return dP(target, key, desc); + }; + + if (!ALL_CONSTRUCTORS) { + $GOPD.f = $getDesc; + $DP.f = $setDesc; + } + + $export($export.S + $export.F * !ALL_CONSTRUCTORS, 'Object', { + getOwnPropertyDescriptor: $getDesc, + defineProperty: $setDesc, + }); + + if ( + fails(function () { + arrayToString.call({}); + }) + ) { + arrayToString = arrayToLocaleString = function toString() { + return arrayJoin.call(this); + }; + } + + var $TypedArrayPrototype$ = redefineAll({}, proto); + redefineAll($TypedArrayPrototype$, $iterators); + hide($TypedArrayPrototype$, ITERATOR, $iterators.values); + redefineAll($TypedArrayPrototype$, { + slice: $slice, + set: $set, + constructor: function () { + /* noop */ + }, + toString: arrayToString, + toLocaleString: $toLocaleString, + }); + addGetter($TypedArrayPrototype$, 'buffer', 'b'); + addGetter($TypedArrayPrototype$, 'byteOffset', 'o'); + addGetter($TypedArrayPrototype$, 'byteLength', 'l'); + addGetter($TypedArrayPrototype$, 'length', 'e'); + dP($TypedArrayPrototype$, TAG, { + get: function () { + return this[TYPED_ARRAY]; + }, + }); + + // eslint-disable-next-line max-statements + module.exports = function (KEY, BYTES, wrapper, CLAMPED) { + CLAMPED = !!CLAMPED; + var NAME = KEY + (CLAMPED ? 'Clamped' : '') + 'Array'; + var GETTER = 'get' + KEY; + var SETTER = 'set' + KEY; + var TypedArray = global[NAME]; + var Base = TypedArray || {}; + var TAC = TypedArray && getPrototypeOf(TypedArray); + var FORCED = !TypedArray || !$typed.ABV; + var O = {}; + var TypedArrayPrototype = TypedArray && TypedArray[PROTOTYPE]; + var getter = function (that, index) { + var data = that._d; + return data.v[GETTER](index * BYTES + data.o, LITTLE_ENDIAN); + }; + var setter = function (that, index, value) { + var data = that._d; + if (CLAMPED) value = (value = Math.round(value)) < 0 ? 0 : value > 0xff ? 0xff : value & 0xff; + data.v[SETTER](index * BYTES + data.o, value, LITTLE_ENDIAN); + }; + var addElement = function (that, index) { + dP(that, index, { + get: function () { + return getter(this, index); + }, + set: function (value) { + return setter(this, index, value); + }, + enumerable: true, + }); + }; + if (FORCED) { + TypedArray = wrapper(function (that, data, $offset, $length) { + anInstance(that, TypedArray, NAME, '_d'); + var index = 0; + var offset = 0; + var buffer, byteLength, length, klass; + if (!isObject(data)) { + length = toIndex(data); + byteLength = length * BYTES; + buffer = new $ArrayBuffer(byteLength); + } else if ( + data instanceof $ArrayBuffer || + (klass = classof(data)) == ARRAY_BUFFER || + klass == SHARED_BUFFER + ) { + buffer = data; + offset = toOffset($offset, BYTES); + var $len = data.byteLength; + if ($length === undefined) { + if ($len % BYTES) throw RangeError(WRONG_LENGTH); + byteLength = $len - offset; + if (byteLength < 0) throw RangeError(WRONG_LENGTH); + } else { + byteLength = toLength($length) * BYTES; + if (byteLength + offset > $len) throw RangeError(WRONG_LENGTH); + } + length = byteLength / BYTES; + } else if (TYPED_ARRAY in data) { + return fromList(TypedArray, data); + } else { + return $from.call(TypedArray, data); + } + hide(that, '_d', { + b: buffer, + o: offset, + l: byteLength, + e: length, + v: new $DataView(buffer), + }); + while (index < length) addElement(that, index++); + }); + TypedArrayPrototype = TypedArray[PROTOTYPE] = create($TypedArrayPrototype$); + hide(TypedArrayPrototype, 'constructor', TypedArray); + } else if ( + !fails(function () { + TypedArray(1); + }) || + !fails(function () { + new TypedArray(-1); // eslint-disable-line no-new + }) || + !$iterDetect(function (iter) { + new TypedArray(); // eslint-disable-line no-new + new TypedArray(null); // eslint-disable-line no-new + new TypedArray(1.5); // eslint-disable-line no-new + new TypedArray(iter); // eslint-disable-line no-new + }, true) + ) { + TypedArray = wrapper(function (that, data, $offset, $length) { + anInstance(that, TypedArray, NAME); + var klass; + // `ws` module bug, temporarily remove validation length for Uint8Array + // https://github.com/websockets/ws/pull/645 + if (!isObject(data)) return new Base(toIndex(data)); + if ( + data instanceof $ArrayBuffer || + (klass = classof(data)) == ARRAY_BUFFER || + klass == SHARED_BUFFER + ) { + return $length !== undefined + ? new Base(data, toOffset($offset, BYTES), $length) + : $offset !== undefined + ? new Base(data, toOffset($offset, BYTES)) + : new Base(data); + } + if (TYPED_ARRAY in data) return fromList(TypedArray, data); + return $from.call(TypedArray, data); + }); + arrayForEach( + TAC !== Function.prototype ? gOPN(Base).concat(gOPN(TAC)) : gOPN(Base), + function (key) { + if (!(key in TypedArray)) hide(TypedArray, key, Base[key]); + }, + ); + TypedArray[PROTOTYPE] = TypedArrayPrototype; + if (!LIBRARY) TypedArrayPrototype.constructor = TypedArray; + } + var $nativeIterator = TypedArrayPrototype[ITERATOR]; + var CORRECT_ITER_NAME = + !!$nativeIterator && ($nativeIterator.name == 'values' || $nativeIterator.name == undefined); + var $iterator = $iterators.values; + hide(TypedArray, TYPED_CONSTRUCTOR, true); + hide(TypedArrayPrototype, TYPED_ARRAY, NAME); + hide(TypedArrayPrototype, VIEW, true); + hide(TypedArrayPrototype, DEF_CONSTRUCTOR, TypedArray); + + if (CLAMPED ? new TypedArray(1)[TAG] != NAME : !(TAG in TypedArrayPrototype)) { + dP(TypedArrayPrototype, TAG, { + get: function () { + return NAME; + }, + }); + } + + O[NAME] = TypedArray; + + $export($export.G + $export.W + $export.F * (TypedArray != Base), O); + + $export($export.S, NAME, { + BYTES_PER_ELEMENT: BYTES, + }); + + $export( + $export.S + + $export.F * + fails(function () { + Base.of.call(TypedArray, 1); + }), + NAME, + { + from: $from, + of: $of, + }, + ); + + if (!(BYTES_PER_ELEMENT in TypedArrayPrototype)) + hide(TypedArrayPrototype, BYTES_PER_ELEMENT, BYTES); + + $export($export.P, NAME, proto); + + setSpecies(NAME); + + $export($export.P + $export.F * FORCED_SET, NAME, { set: $set }); + + $export($export.P + $export.F * !CORRECT_ITER_NAME, NAME, $iterators); + + if (!LIBRARY && TypedArrayPrototype.toString != arrayToString) + TypedArrayPrototype.toString = arrayToString; + + $export( + $export.P + + $export.F * + fails(function () { + new TypedArray(1).slice(); + }), + NAME, + { slice: $slice }, + ); + + $export( + $export.P + + $export.F * + (fails(function () { + return [1, 2].toLocaleString() != new TypedArray([1, 2]).toLocaleString(); + }) || + !fails(function () { + TypedArrayPrototype.toLocaleString.call([1, 2]); + })), + NAME, + { toLocaleString: $toLocaleString }, + ); + + Iterators[NAME] = CORRECT_ITER_NAME ? $nativeIterator : $iterator; + if (!LIBRARY && !CORRECT_ITER_NAME) hide(TypedArrayPrototype, ITERATOR, $iterator); + }; + } else + module.exports = function () { + /* empty */ + }; + + /***/ + }, + /* 39 */ + /***/ function (module, exports, __webpack_require__) { + var Map = __webpack_require__(197); + var $export = __webpack_require__(0); + var shared = __webpack_require__(73)('metadata'); + var store = shared.store || (shared.store = new (__webpack_require__(200))()); + + var getOrCreateMetadataMap = function (target, targetKey, create) { + var targetMetadata = store.get(target); + if (!targetMetadata) { + if (!create) return undefined; + store.set(target, (targetMetadata = new Map())); + } + var keyMetadata = targetMetadata.get(targetKey); + if (!keyMetadata) { + if (!create) return undefined; + targetMetadata.set(targetKey, (keyMetadata = new Map())); + } + return keyMetadata; + }; + var ordinaryHasOwnMetadata = function (MetadataKey, O, P) { + var metadataMap = getOrCreateMetadataMap(O, P, false); + return metadataMap === undefined ? false : metadataMap.has(MetadataKey); + }; + var ordinaryGetOwnMetadata = function (MetadataKey, O, P) { + var metadataMap = getOrCreateMetadataMap(O, P, false); + return metadataMap === undefined ? undefined : metadataMap.get(MetadataKey); + }; + var ordinaryDefineOwnMetadata = function (MetadataKey, MetadataValue, O, P) { + getOrCreateMetadataMap(O, P, true).set(MetadataKey, MetadataValue); + }; + var ordinaryOwnMetadataKeys = function (target, targetKey) { + var metadataMap = getOrCreateMetadataMap(target, targetKey, false); + var keys = []; + if (metadataMap) + metadataMap.forEach(function (_, key) { + keys.push(key); + }); + return keys; + }; + var toMetaKey = function (it) { + return it === undefined || typeof it == 'symbol' ? it : String(it); + }; + var exp = function (O) { + $export($export.S, 'Reflect', O); + }; + + module.exports = { + store: store, + map: getOrCreateMetadataMap, + has: ordinaryHasOwnMetadata, + get: ordinaryGetOwnMetadata, + set: ordinaryDefineOwnMetadata, + keys: ordinaryOwnMetadataKeys, + key: toMetaKey, + exp: exp, + }; + + /***/ + }, + /* 40 */ + /***/ function (module, exports) { + function _interopRequireDefault(obj) { + return obj && obj.__esModule + ? obj + : { + default: obj, + }; + } + + module.exports = _interopRequireDefault; + + /***/ + }, + /* 41 */ + /***/ function (module, exports) { + module.exports = false; + + /***/ + }, + /* 42 */ + /***/ function (module, exports, __webpack_require__) { + var META = __webpack_require__(50)('meta'); + var isObject = __webpack_require__(5); + var has = __webpack_require__(18); + var setDesc = __webpack_require__(9).f; + var id = 0; + var isExtensible = + Object.isExtensible || + function () { + return true; + }; + var FREEZE = !__webpack_require__(4)(function () { + return isExtensible(Object.preventExtensions({})); + }); + var setMeta = function (it) { + setDesc(it, META, { + value: { + i: 'O' + ++id, // object ID + w: {}, // weak collections IDs + }, + }); + }; + var fastKey = function (it, create) { + // return primitive with prefix + if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; + if (!has(it, META)) { + // can't set metadata to uncaught frozen object + if (!isExtensible(it)) return 'F'; + // not necessary to add metadata + if (!create) return 'E'; + // add missing metadata + setMeta(it); + // return object ID + } + return it[META].i; + }; + var getWeak = function (it, create) { + if (!has(it, META)) { + // can't set metadata to uncaught frozen object + if (!isExtensible(it)) return true; + // not necessary to add metadata + if (!create) return false; + // add missing metadata + setMeta(it); + // return hash weak collections IDs + } + return it[META].w; + }; + // add metadata on freeze-family methods calling + var onFreeze = function (it) { + if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it); + return it; + }; + var meta = (module.exports = { + KEY: META, + NEED: false, + fastKey: fastKey, + getWeak: getWeak, + onFreeze: onFreeze, + }); + + /***/ + }, + /* 43 */ + /***/ function (module, exports, __webpack_require__) { + // 22.1.3.31 Array.prototype[@@unscopables] + var UNSCOPABLES = __webpack_require__(6)('unscopables'); + var ArrayProto = Array.prototype; + if (ArrayProto[UNSCOPABLES] == undefined) __webpack_require__(15)(ArrayProto, UNSCOPABLES, {}); + module.exports = function (key) { + ArrayProto[UNSCOPABLES][key] = true; + }; + + /***/ + }, + /* 44 */ + /***/ function (module, exports) { + var hasOwnProperty = {}.hasOwnProperty; + module.exports = function (it, key) { + return hasOwnProperty.call(it, key); + }; + + /***/ + }, + /* 45 */ + /***/ function (module, exports, __webpack_require__) { + var dP = __webpack_require__(30); + var createDesc = __webpack_require__(78); + module.exports = __webpack_require__(28) + ? function (object, key, value) { + return dP.f(object, key, createDesc(1, value)); + } + : function (object, key, value) { + object[key] = value; + return object; + }; + + /***/ + }, + /* 46 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2014-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + + /** + * Similar to invariant but only logs a warning if the condition is not met. + * This can be used to log issues in development environments in critical + * paths. Removing the logging code for production environments will keep the + * same logic and follow the same code paths. + */ + + var __DEV__ = 'development' !== 'production'; + + var warning = function () {}; + + if (__DEV__) { + warning = function (condition, format, args) { + var len = arguments.length; + args = new Array(len > 2 ? len - 2 : 0); + for (var key = 2; key < len; key++) { + args[key - 2] = arguments[key]; + } + if (format === undefined) { + throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument'); + } + + if (format.length < 10 || /^[s\W]*$/.test(format)) { + throw new Error( + 'The warning format should be able to uniquely identify this ' + + 'warning. Please, use a more descriptive format than: ' + + format, + ); + } + + if (!condition) { + var argIndex = 0; + var message = + 'Warning: ' + + format.replace(/%s/g, function () { + return args[argIndex++]; + }); + if (typeof console !== 'undefined') { + console.error(message); + } + try { + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + throw new Error(message); + } catch (x) {} + } + }; + } + + module.exports = warning; + + /***/ + }, + /* 47 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['c'] = isReactChildren; + /* harmony export (immutable) */ __webpack_exports__['a'] = createRouteFromReactElement; + /* unused harmony export createRoutesFromReactChildren */ + /* harmony export (immutable) */ __webpack_exports__['b'] = createRoutes; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + function isValidChild(object) { + return object == null || __WEBPACK_IMPORTED_MODULE_0_react___default.a.isValidElement(object); + } + + function isReactChildren(object) { + return isValidChild(object) || (Array.isArray(object) && object.every(isValidChild)); + } + + function createRoute(defaultProps, props) { + return _extends({}, defaultProps, props); + } + + function createRouteFromReactElement(element) { + var type = element.type; + var route = createRoute(type.defaultProps, element.props); + + if (route.children) { + var childRoutes = createRoutesFromReactChildren(route.children, route); + + if (childRoutes.length) route.childRoutes = childRoutes; + + delete route.children; + } + + return route; + } + + /** + * Creates and returns a routes object from the given ReactChildren. JSX + * provides a convenient way to visualize how routes in the hierarchy are + * nested. + * + * import { Route, createRoutesFromReactChildren } from 'react-router' + * + * const routes = createRoutesFromReactChildren( + * <Route component={App}> + * <Route path="home" component={Dashboard}/> + * <Route path="news" component={NewsFeed}/> + * </Route> + * ) + * + * Note: This method is automatically used when you provide <Route> children + * to a <Router> component. + */ + function createRoutesFromReactChildren(children, parentRoute) { + var routes = []; + + __WEBPACK_IMPORTED_MODULE_0_react___default.a.Children.forEach(children, function (element) { + if (__WEBPACK_IMPORTED_MODULE_0_react___default.a.isValidElement(element)) { + // Component classes may have a static create* method. + if (element.type.createRouteFromReactElement) { + var route = element.type.createRouteFromReactElement(element, parentRoute); + + if (route) routes.push(route); + } else { + routes.push(createRouteFromReactElement(element)); + } + } + }); + + return routes; + } + + /** + * Creates and returns an array of routes from the given object which + * may be a JSX route, a plain object route, or an array of either. + */ + function createRoutes(routes) { + if (isReactChildren(routes)) { + routes = createRoutesFromReactChildren(routes); + } else if (routes && !Array.isArray(routes)) { + routes = [routes]; + } + + return routes; + } + + /***/ + }, + /* 48 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + exports.createPath = + exports.parsePath = + exports.getQueryStringValueFromPath = + exports.stripQueryStringValueFromPath = + exports.addQueryStringValueToPath = + undefined; + + var _warning = __webpack_require__(46); + + var _warning2 = _interopRequireDefault(_warning); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + var addQueryStringValueToPath = (exports.addQueryStringValueToPath = function addQueryStringValueToPath( + path, + key, + value, + ) { + var _parsePath = parsePath(path), + pathname = _parsePath.pathname, + search = _parsePath.search, + hash = _parsePath.hash; + + return createPath({ + pathname: pathname, + search: search + (search.indexOf('?') === -1 ? '?' : '&') + key + '=' + value, + hash: hash, + }); + }); + + var stripQueryStringValueFromPath = (exports.stripQueryStringValueFromPath = + function stripQueryStringValueFromPath(path, key) { + var _parsePath2 = parsePath(path), + pathname = _parsePath2.pathname, + search = _parsePath2.search, + hash = _parsePath2.hash; + + return createPath({ + pathname: pathname, + search: search.replace( + new RegExp('([?&])' + key + '=[a-zA-Z0-9]+(&?)'), + function (match, prefix, suffix) { + return prefix === '?' ? prefix : suffix; + }, + ), + hash: hash, + }); + }); + + var getQueryStringValueFromPath = (exports.getQueryStringValueFromPath = + function getQueryStringValueFromPath(path, key) { + var _parsePath3 = parsePath(path), + search = _parsePath3.search; + + var match = search.match(new RegExp('[?&]' + key + '=([a-zA-Z0-9]+)')); + return match && match[1]; + }); + + var extractPath = function extractPath(string) { + var match = string.match(/^(https?:)?\/\/[^\/]*/); + return match == null ? string : string.substring(match[0].length); + }; + + var parsePath = (exports.parsePath = function parsePath(path) { + var pathname = extractPath(path); + var search = ''; + var hash = ''; + + true + ? (0, _warning2.default)( + path === pathname, + 'A path must be pathname + search + hash only, not a full URL like "%s"', + path, + ) + : void 0; + + var hashIndex = pathname.indexOf('#'); + if (hashIndex !== -1) { + hash = pathname.substring(hashIndex); + pathname = pathname.substring(0, hashIndex); + } + + var searchIndex = pathname.indexOf('?'); + if (searchIndex !== -1) { + search = pathname.substring(searchIndex); + pathname = pathname.substring(0, searchIndex); + } + + if (pathname === '') pathname = '/'; + + return { + pathname: pathname, + search: search, + hash: hash, + }; + }); + + var createPath = (exports.createPath = function createPath(location) { + if (location == null || typeof location === 'string') return location; + + var basename = location.basename, + pathname = location.pathname, + search = location.search, + hash = location.hash; + + var path = (basename || '') + pathname; + + if (search && search !== '?') path += search; + + if (hash) path += hash; + + return path; + }); + + /***/ + }, + /* 49 */ + /***/ function (module, exports) { + module.exports = function (bitmap, value) { + return { + enumerable: !(bitmap & 1), + configurable: !(bitmap & 2), + writable: !(bitmap & 4), + value: value, + }; + }; + + /***/ + }, + /* 50 */ + /***/ function (module, exports) { + var id = 0; + var px = Math.random(); + module.exports = function (key) { + return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); + }; + + /***/ + }, + /* 51 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.14 / 15.2.3.14 Object.keys(O) + var $keys = __webpack_require__(176); + var enumBugKeys = __webpack_require__(115); + + module.exports = + Object.keys || + function keys(O) { + return $keys(O, enumBugKeys); + }; + + /***/ + }, + /* 52 */ + /***/ function (module, exports, __webpack_require__) { + var toInteger = __webpack_require__(26); + var max = Math.max; + var min = Math.min; + module.exports = function (index, length) { + index = toInteger(index); + return index < 0 ? max(index + length, 0) : min(index, length); + }; + + /***/ + }, + /* 53 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) + var anObject = __webpack_require__(2); + var dPs = __webpack_require__(177); + var enumBugKeys = __webpack_require__(115); + var IE_PROTO = __webpack_require__(114)('IE_PROTO'); + var Empty = function () { + /* empty */ + }; + var PROTOTYPE = 'prototype'; + + // Create object with fake `null` prototype: use iframe Object with cleared prototype + var createDict = function () { + // Thrash, waste and sodomy: IE GC bug + var iframe = __webpack_require__(112)('iframe'); + var i = enumBugKeys.length; + var lt = '<'; + var gt = '>'; + var iframeDocument; + iframe.style.display = 'none'; + __webpack_require__(116).appendChild(iframe); + iframe.src = 'javascript:'; // eslint-disable-line no-script-url + // createDict = iframe.contentWindow.Object; + // html.removeChild(iframe); + iframeDocument = iframe.contentWindow.document; + iframeDocument.open(); + iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); + iframeDocument.close(); + createDict = iframeDocument.F; + while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]]; + return createDict(); + }; + + module.exports = + Object.create || + function create(O, Properties) { + var result; + if (O !== null) { + Empty[PROTOTYPE] = anObject(O); + result = new Empty(); + Empty[PROTOTYPE] = null; + // add "__proto__" for Object.getPrototypeOf polyfill + result[IE_PROTO] = O; + } else result = createDict(); + return Properties === undefined ? result : dPs(result, Properties); + }; + + /***/ + }, + /* 54 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) + var $keys = __webpack_require__(176); + var hiddenKeys = __webpack_require__(115).concat('length', 'prototype'); + + exports.f = + Object.getOwnPropertyNames || + function getOwnPropertyNames(O) { + return $keys(O, hiddenKeys); + }; + + /***/ + }, + /* 55 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var global = __webpack_require__(3); + var dP = __webpack_require__(9); + var DESCRIPTORS = __webpack_require__(8); + var SPECIES = __webpack_require__(6)('species'); + + module.exports = function (KEY) { + var C = global[KEY]; + if (DESCRIPTORS && C && !C[SPECIES]) + dP.f(C, SPECIES, { + configurable: true, + get: function () { + return this; + }, + }); + }; + + /***/ + }, + /* 56 */ + /***/ function (module, exports) { + module.exports = function (it, Constructor, name, forbiddenField) { + if (!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)) { + throw TypeError(name + ': incorrect invocation!'); + } + return it; + }; + + /***/ + }, + /* 57 */ + /***/ function (module, exports, __webpack_require__) { + var ctx = __webpack_require__(24); + var call = __webpack_require__(189); + var isArrayIter = __webpack_require__(127); + var anObject = __webpack_require__(2); + var toLength = __webpack_require__(7); + var getIterFn = __webpack_require__(129); + var BREAK = {}; + var RETURN = {}; + var exports = (module.exports = function (iterable, entries, fn, that, ITERATOR) { + var iterFn = ITERATOR + ? function () { + return iterable; + } + : getIterFn(iterable); + var f = ctx(fn, that, entries ? 2 : 1); + var index = 0; + var length, step, iterator, result; + if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!'); + // fast case for arrays with default iterator + if (isArrayIter(iterFn)) + for (length = toLength(iterable.length); length > index; index++) { + result = entries ? f(anObject((step = iterable[index]))[0], step[1]) : f(iterable[index]); + if (result === BREAK || result === RETURN) return result; + } + else + for (iterator = iterFn.call(iterable); !(step = iterator.next()).done; ) { + result = call(iterator, f, step.value, entries); + if (result === BREAK || result === RETURN) return result; + } + }); + exports.BREAK = BREAK; + exports.RETURN = RETURN; + + /***/ + }, + /* 58 */ + /***/ function (module, exports, __webpack_require__) { + var redefine = __webpack_require__(16); + module.exports = function (target, src, safe) { + for (var key in src) redefine(target, key, src[key], safe); + return target; + }; + + /***/ + }, + /* 59 */ + /***/ function (module, exports, __webpack_require__) { + var isObject = __webpack_require__(5); + module.exports = function (it, TYPE) { + if (!isObject(it) || it._t !== TYPE) throw TypeError('Incompatible receiver, ' + TYPE + ' required!'); + return it; + }; + + /***/ + }, + /* 60 */ + /***/ function (module, exports, __webpack_require__) { + // to indexed object, toObject with fallback for non-array-like ES3 strings + var IObject = __webpack_require__(139); + var defined = __webpack_require__(141); + module.exports = function (it) { + return IObject(defined(it)); + }; + + /***/ + }, + /* 61 */ + /***/ function (module, exports) { + module.exports = function (exec) { + try { + return !!exec(); + } catch (e) { + return true; + } + }; + + /***/ + }, + /* 62 */ + /***/ function (module, exports, __webpack_require__) { + var isObject = __webpack_require__(35); + module.exports = function (it) { + if (!isObject(it)) throw TypeError(it + ' is not an object!'); + return it; + }; + + /***/ + }, + /* 63 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /* +object-assign +(c) Sindre Sorhus +@license MIT +*/ + + /* eslint-disable no-unused-vars */ + var getOwnPropertySymbols = Object.getOwnPropertySymbols; + var hasOwnProperty = Object.prototype.hasOwnProperty; + var propIsEnumerable = Object.prototype.propertyIsEnumerable; + + function toObject(val) { + if (val === null || val === undefined) { + throw new TypeError('Object.assign cannot be called with null or undefined'); + } + + return Object(val); + } + + function shouldUseNative() { + try { + if (!Object.assign) { + return false; + } + + // Detect buggy property enumeration order in older V8 versions. + + // https://bugs.chromium.org/p/v8/issues/detail?id=4118 + var test1 = new String('abc'); // eslint-disable-line no-new-wrappers + test1[5] = 'de'; + if (Object.getOwnPropertyNames(test1)[0] === '5') { + return false; + } + + // https://bugs.chromium.org/p/v8/issues/detail?id=3056 + var test2 = {}; + for (var i = 0; i < 10; i++) { + test2['_' + String.fromCharCode(i)] = i; + } + var order2 = Object.getOwnPropertyNames(test2).map(function (n) { + return test2[n]; + }); + if (order2.join('') !== '0123456789') { + return false; + } + + // https://bugs.chromium.org/p/v8/issues/detail?id=3056 + var test3 = {}; + 'abcdefghijklmnopqrst'.split('').forEach(function (letter) { + test3[letter] = letter; + }); + if (Object.keys(Object.assign({}, test3)).join('') !== 'abcdefghijklmnopqrst') { + return false; + } + + return true; + } catch (err) { + // We don't expect any of the above to throw, but better to be safe. + return false; + } + } + + module.exports = shouldUseNative() + ? Object.assign + : function (target, source) { + var from; + var to = toObject(target); + var symbols; + + for (var s = 1; s < arguments.length; s++) { + from = Object(arguments[s]); + + for (var key in from) { + if (hasOwnProperty.call(from, key)) { + to[key] = from[key]; + } + } + + if (getOwnPropertySymbols) { + symbols = getOwnPropertySymbols(from); + for (var i = 0; i < symbols.length; i++) { + if (propIsEnumerable.call(from, symbols[i])) { + to[symbols[i]] = from[symbols[i]]; + } + } + } + } + + return to; + }; + + /***/ + }, + /* 64 */ + /***/ function (module, exports, __webpack_require__) { + var def = __webpack_require__(9).f; + var has = __webpack_require__(18); + var TAG = __webpack_require__(6)('toStringTag'); + + module.exports = function (it, tag, stat) { + if (it && !has((it = stat ? it : it.prototype), TAG)) + def(it, TAG, { configurable: true, value: tag }); + }; + + /***/ + }, + /* 65 */ + /***/ function (module, exports, __webpack_require__) { + // getting tag from 19.1.3.6 Object.prototype.toString() + var cof = __webpack_require__(25); + var TAG = __webpack_require__(6)('toStringTag'); + // ES3 wrong here + var ARG = + cof( + (function () { + return arguments; + })(), + ) == 'Arguments'; + + // fallback for IE11 Script Access Denied error + var tryGet = function (it, key) { + try { + return it[key]; + } catch (e) { + /* empty */ + } + }; + + module.exports = function (it) { + var O, T, B; + return it === undefined + ? 'Undefined' + : it === null + ? 'Null' + : // @@toStringTag case + typeof (T = tryGet((O = Object(it)), TAG)) == 'string' + ? T + : // builtinTag case + ARG + ? cof(O) + : // ES3 arguments fallback + (B = cof(O)) == 'Object' && typeof O.callee == 'function' + ? 'Arguments' + : B; + }; + + /***/ + }, + /* 66 */ + /***/ function (module, exports, __webpack_require__) { + var $export = __webpack_require__(0); + var defined = __webpack_require__(32); + var fails = __webpack_require__(4); + var spaces = __webpack_require__(118); + var space = '[' + spaces + ']'; + var non = '\u200b\u0085'; + var ltrim = RegExp('^' + space + space + '*'); + var rtrim = RegExp(space + space + '*$'); + + var exporter = function (KEY, exec, ALIAS) { + var exp = {}; + var FORCE = fails(function () { + return !!spaces[KEY]() || non[KEY]() != non; + }); + var fn = (exp[KEY] = FORCE ? exec(trim) : spaces[KEY]); + if (ALIAS) exp[ALIAS] = fn; + $export($export.P + $export.F * FORCE, 'String', exp); + }; + + // 1 -> String#trimLeft + // 2 -> String#trimRight + // 3 -> String#trim + var trim = (exporter.trim = function (string, TYPE) { + string = String(defined(string)); + if (TYPE & 1) string = string.replace(ltrim, ''); + if (TYPE & 2) string = string.replace(rtrim, ''); + return string; + }); + + module.exports = exporter; + + /***/ + }, + /* 67 */ + /***/ function (module, exports) { + module.exports = {}; + + /***/ + }, + /* 68 */ + /***/ function (module, exports, __webpack_require__) { + // optional / simple context binding + var aFunction = __webpack_require__(215); + module.exports = function (fn, that, length) { + aFunction(fn); + if (that === undefined) return fn; + switch (length) { + case 1: + return function (a) { + return fn.call(that, a); + }; + case 2: + return function (a, b) { + return fn.call(that, a, b); + }; + case 3: + return function (a, b, c) { + return fn.call(that, a, b, c); + }; + } + return function (/* ...args */) { + return fn.apply(that, arguments); + }; + }; + + /***/ + }, + /* 69 */ + /***/ function (module, exports, __webpack_require__) { + // 7.1.13 ToObject(argument) + var defined = __webpack_require__(141); + module.exports = function (it) { + return Object(defined(it)); + }; + + /***/ + }, + /* 70 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = routerWarning; + /* unused harmony export _resetWarned */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(46); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_warning__, + ); + + var warned = {}; + + function routerWarning(falseToWarn, message) { + // Only issue deprecation warnings once. + if (message.indexOf('deprecated') !== -1) { + if (warned[message]) { + return; + } + + warned[message] = true; + } + + message = '[react-router] ' + message; + + for ( + var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; + _key < _len; + _key++ + ) { + args[_key - 2] = arguments[_key]; + } + + __WEBPACK_IMPORTED_MODULE_0_warning___default.a.apply(undefined, [falseToWarn, message].concat(args)); + } + + function _resetWarned() { + warned = {}; + } + + /***/ + }, + /* 71 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* unused harmony export compilePattern */ + /* harmony export (immutable) */ __webpack_exports__['c'] = matchPattern; + /* harmony export (immutable) */ __webpack_exports__['b'] = getParamNames; + /* unused harmony export getParams */ + /* harmony export (immutable) */ __webpack_exports__['a'] = formatPattern; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant__ = __webpack_require__(14); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_invariant__, + ); + + function escapeRegExp(string) { + return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); + } + + function _compilePattern(pattern) { + var regexpSource = ''; + var paramNames = []; + var tokens = []; + + var match = void 0, + lastIndex = 0, + matcher = /:([a-zA-Z_$][a-zA-Z0-9_$]*)|\*\*|\*|\(|\)|\\\(|\\\)/g; + while ((match = matcher.exec(pattern))) { + if (match.index !== lastIndex) { + tokens.push(pattern.slice(lastIndex, match.index)); + regexpSource += escapeRegExp(pattern.slice(lastIndex, match.index)); + } + + if (match[1]) { + regexpSource += '([^/]+)'; + paramNames.push(match[1]); + } else if (match[0] === '**') { + regexpSource += '(.*)'; + paramNames.push('splat'); + } else if (match[0] === '*') { + regexpSource += '(.*?)'; + paramNames.push('splat'); + } else if (match[0] === '(') { + regexpSource += '(?:'; + } else if (match[0] === ')') { + regexpSource += ')?'; + } else if (match[0] === '\\(') { + regexpSource += '\\('; + } else if (match[0] === '\\)') { + regexpSource += '\\)'; + } + + tokens.push(match[0]); + + lastIndex = matcher.lastIndex; + } + + if (lastIndex !== pattern.length) { + tokens.push(pattern.slice(lastIndex, pattern.length)); + regexpSource += escapeRegExp(pattern.slice(lastIndex, pattern.length)); + } + + return { + pattern: pattern, + regexpSource: regexpSource, + paramNames: paramNames, + tokens: tokens, + }; + } + + var CompiledPatternsCache = Object.create(null); + + function compilePattern(pattern) { + if (!CompiledPatternsCache[pattern]) CompiledPatternsCache[pattern] = _compilePattern(pattern); + + return CompiledPatternsCache[pattern]; + } + + /** + * Attempts to match a pattern on the given pathname. Patterns may use + * the following special characters: + * + * - :paramName Matches a URL segment up to the next /, ?, or #. The + * captured string is considered a "param" + * - () Wraps a segment of the URL that is optional + * - * Consumes (non-greedy) all characters up to the next + * character in the pattern, or to the end of the URL if + * there is none + * - ** Consumes (greedy) all characters up to the next character + * in the pattern, or to the end of the URL if there is none + * + * The function calls callback(error, matched) when finished. + * The return value is an object with the following properties: + * + * - remainingPathname + * - paramNames + * - paramValues + */ + function matchPattern(pattern, pathname) { + // Ensure pattern starts with leading slash for consistency with pathname. + if (pattern.charAt(0) !== '/') { + pattern = '/' + pattern; + } + + var _compilePattern2 = compilePattern(pattern), + regexpSource = _compilePattern2.regexpSource, + paramNames = _compilePattern2.paramNames, + tokens = _compilePattern2.tokens; + + if (pattern.charAt(pattern.length - 1) !== '/') { + regexpSource += '/?'; // Allow optional path separator at end. + } + + // Special-case patterns like '*' for catch-all routes. + if (tokens[tokens.length - 1] === '*') { + regexpSource += '$'; + } + + var match = pathname.match(new RegExp('^' + regexpSource, 'i')); + if (match == null) { + return null; + } + + var matchedPath = match[0]; + var remainingPathname = pathname.substr(matchedPath.length); + + if (remainingPathname) { + // Require that the match ends at a path separator, if we didn't match + // the full path, so any remaining pathname is a new path segment. + if (matchedPath.charAt(matchedPath.length - 1) !== '/') { + return null; + } + + // If there is a remaining pathname, treat the path separator as part of + // the remaining pathname for properly continuing the match. + remainingPathname = '/' + remainingPathname; + } + + return { + remainingPathname: remainingPathname, + paramNames: paramNames, + paramValues: match.slice(1).map(function (v) { + return v && decodeURIComponent(v); + }), + }; + } + + function getParamNames(pattern) { + return compilePattern(pattern).paramNames; + } + + function getParams(pattern, pathname) { + var match = matchPattern(pattern, pathname); + if (!match) { + return null; + } + + var paramNames = match.paramNames, + paramValues = match.paramValues; + + var params = {}; + + paramNames.forEach(function (paramName, index) { + params[paramName] = paramValues[index]; + }); + + return params; + } + + /** + * Returns a version of the given pattern with params interpolated. Throws + * if there is a dynamic segment of the pattern for which there is no param. + */ + function formatPattern(pattern, params) { + params = params || {}; + + var _compilePattern3 = compilePattern(pattern), + tokens = _compilePattern3.tokens; + + var parenCount = 0, + pathname = '', + splatIndex = 0, + parenHistory = []; + + var token = void 0, + paramName = void 0, + paramValue = void 0; + for (var i = 0, len = tokens.length; i < len; ++i) { + token = tokens[i]; + + if (token === '*' || token === '**') { + paramValue = Array.isArray(params.splat) ? params.splat[splatIndex++] : params.splat; + + !(paramValue != null || parenCount > 0) + ? true + ? __WEBPACK_IMPORTED_MODULE_0_invariant___default()( + false, + 'Missing splat #%s for path "%s"', + splatIndex, + pattern, + ) + : invariant(false) + : void 0; + + if (paramValue != null) pathname += encodeURI(paramValue); + } else if (token === '(') { + parenHistory[parenCount] = ''; + parenCount += 1; + } else if (token === ')') { + var parenText = parenHistory.pop(); + parenCount -= 1; + + if (parenCount) parenHistory[parenCount - 1] += parenText; + else pathname += parenText; + } else if (token === '\\(') { + pathname += '('; + } else if (token === '\\)') { + pathname += ')'; + } else if (token.charAt(0) === ':') { + paramName = token.substring(1); + paramValue = params[paramName]; + + !(paramValue != null || parenCount > 0) + ? true + ? __WEBPACK_IMPORTED_MODULE_0_invariant___default()( + false, + 'Missing "%s" parameter for path "%s"', + paramName, + pattern, + ) + : invariant(false) + : void 0; + + if (paramValue == null) { + if (parenCount) { + parenHistory[parenCount - 1] = ''; + + var curTokenIdx = tokens.indexOf(token); + var tokensSubset = tokens.slice(curTokenIdx, tokens.length); + var nextParenIdx = -1; + + for (var _i = 0; _i < tokensSubset.length; _i++) { + if (tokensSubset[_i] == ')') { + nextParenIdx = _i; + break; + } + } + + !(nextParenIdx > 0) + ? true + ? __WEBPACK_IMPORTED_MODULE_0_invariant___default()( + false, + 'Path "%s" is missing end paren at segment "%s"', + pattern, + tokensSubset.join(''), + ) + : invariant(false) + : void 0; + + // jump to ending paren + i = curTokenIdx + nextParenIdx - 1; + } + } else if (parenCount) parenHistory[parenCount - 1] += encodeURIComponent(paramValue); + else pathname += encodeURIComponent(paramValue); + } else { + if (parenCount) parenHistory[parenCount - 1] += token; + else pathname += token; + } + } + + !(parenCount <= 0) + ? true + ? __WEBPACK_IMPORTED_MODULE_0_invariant___default()( + false, + 'Path "%s" is missing end paren', + pattern, + ) + : invariant(false) + : void 0; + + return pathname.replace(/\/+/g, '/'); + } + + /***/ + }, + /* 72 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + exports.locationsAreEqual = + exports.statesAreEqual = + exports.createLocation = + exports.createQuery = + undefined; + + var _typeof = + typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' + ? function (obj) { + return typeof obj; + } + : function (obj) { + return obj && + typeof Symbol === 'function' && + obj.constructor === Symbol && + obj !== Symbol.prototype + ? 'symbol' + : typeof obj; + }; + + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + var _invariant = __webpack_require__(14); + + var _invariant2 = _interopRequireDefault(_invariant); + + var _warning = __webpack_require__(46); + + var _warning2 = _interopRequireDefault(_warning); + + var _PathUtils = __webpack_require__(48); + + var _Actions = __webpack_require__(110); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + var createQuery = (exports.createQuery = function createQuery(props) { + return _extends(Object.create(null), props); + }); + + var createLocation = (exports.createLocation = function createLocation() { + var input = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '/'; + var action = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _Actions.POP; + var key = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null; + + var object = typeof input === 'string' ? (0, _PathUtils.parsePath)(input) : input; + + true + ? (0, _warning2.default)( + !object.path, + 'Location descriptor objects should have a `pathname`, not a `path`.', + ) + : void 0; + + var pathname = object.pathname || '/'; + var search = object.search || ''; + var hash = object.hash || ''; + var state = object.state; + + return { + pathname: pathname, + search: search, + hash: hash, + state: state, + action: action, + key: key, + }; + }); + + var isDate = function isDate(object) { + return Object.prototype.toString.call(object) === '[object Date]'; + }; + + var statesAreEqual = (exports.statesAreEqual = function statesAreEqual(a, b) { + if (a === b) return true; + + var typeofA = typeof a === 'undefined' ? 'undefined' : _typeof(a); + var typeofB = typeof b === 'undefined' ? 'undefined' : _typeof(b); + + if (typeofA !== typeofB) return false; + + !(typeofA !== 'function') + ? true + ? (0, _invariant2.default)(false, 'You must not store functions in location state') + : (0, _invariant2.default)(false) + : void 0; + + // Not the same object, but same type. + if (typeofA === 'object') { + !!(isDate(a) && isDate(b)) + ? true + ? (0, _invariant2.default)(false, 'You must not store Date objects in location state') + : (0, _invariant2.default)(false) + : void 0; + + if (!Array.isArray(a)) { + var keysofA = Object.keys(a); + var keysofB = Object.keys(b); + return ( + keysofA.length === keysofB.length && + keysofA.every(function (key) { + return statesAreEqual(a[key], b[key]); + }) + ); + } + + return ( + Array.isArray(b) && + a.length === b.length && + a.every(function (item, index) { + return statesAreEqual(item, b[index]); + }) + ); + } + + // All other serializable types (string, number, boolean) + // should be strict equal. + return false; + }); + + var locationsAreEqual = (exports.locationsAreEqual = function locationsAreEqual(a, b) { + return ( + a.key === b.key && + // a.action === b.action && // Different action !== location change. + a.pathname === b.pathname && + a.search === b.search && + a.hash === b.hash && + statesAreEqual(a.state, b.state) + ); + }); + + /***/ + }, + /* 73 */ + /***/ function (module, exports, __webpack_require__) { + var core = __webpack_require__(23); + var global = __webpack_require__(3); + var SHARED = '__core-js_shared__'; + var store = global[SHARED] || (global[SHARED] = {}); + + (module.exports = function (key, value) { + return store[key] || (store[key] = value !== undefined ? value : {}); + })('versions', []).push({ + version: core.version, + mode: __webpack_require__(41) ? 'pure' : 'global', + copyright: '© 2019 Denis Pushkarev (zloirock.ru)', + }); + + /***/ + }, + /* 74 */ + /***/ function (module, exports, __webpack_require__) { + // fallback for non-array-like ES3 and non-enumerable old V8 strings + var cof = __webpack_require__(25); + // eslint-disable-next-line no-prototype-builtins + module.exports = Object('z').propertyIsEnumerable(0) + ? Object + : function (it) { + return cof(it) == 'String' ? it.split('') : Object(it); + }; + + /***/ + }, + /* 75 */ + /***/ function (module, exports) { + exports.f = {}.propertyIsEnumerable; + + /***/ + }, + /* 76 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // 21.2.5.3 get RegExp.prototype.flags + var anObject = __webpack_require__(2); + module.exports = function () { + var that = anObject(this); + var result = ''; + if (that.global) result += 'g'; + if (that.ignoreCase) result += 'i'; + if (that.multiline) result += 'm'; + if (that.unicode) result += 'u'; + if (that.sticky) result += 'y'; + return result; + }; + + /***/ + }, + /* 77 */ + /***/ function (module, exports, __webpack_require__) { + // 7.3.20 SpeciesConstructor(O, defaultConstructor) + var anObject = __webpack_require__(2); + var aFunction = __webpack_require__(12); + var SPECIES = __webpack_require__(6)('species'); + module.exports = function (O, D) { + var C = anObject(O).constructor; + var S; + return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S); + }; + + /***/ + }, + /* 78 */ + /***/ function (module, exports) { + module.exports = function (bitmap, value) { + return { + enumerable: !(bitmap & 1), + configurable: !(bitmap & 2), + writable: !(bitmap & 4), + value: value, + }; + }; + + /***/ + }, + /* 79 */ + /***/ function (module, exports) { + module.exports = {}; + + /***/ + }, + /* 80 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.14 / 15.2.3.14 Object.keys(O) + var $keys = __webpack_require__(216); + var enumBugKeys = __webpack_require__(150); + + module.exports = + Object.keys || + function keys(O) { + return $keys(O, enumBugKeys); + }; + + /***/ + }, + /* 81 */ + /***/ function (module, exports, __webpack_require__) { + var META = __webpack_require__(103)('meta'); + var isObject = __webpack_require__(35); + var has = __webpack_require__(44); + var setDesc = __webpack_require__(30).f; + var id = 0; + var isExtensible = + Object.isExtensible || + function () { + return true; + }; + var FREEZE = !__webpack_require__(61)(function () { + return isExtensible(Object.preventExtensions({})); + }); + var setMeta = function (it) { + setDesc(it, META, { + value: { + i: 'O' + ++id, // object ID + w: {}, // weak collections IDs + }, + }); + }; + var fastKey = function (it, create) { + // return primitive with prefix + if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; + if (!has(it, META)) { + // can't set metadata to uncaught frozen object + if (!isExtensible(it)) return 'F'; + // not necessary to add metadata + if (!create) return 'E'; + // add missing metadata + setMeta(it); + // return object ID + } + return it[META].i; + }; + var getWeak = function (it, create) { + if (!has(it, META)) { + // can't set metadata to uncaught frozen object + if (!isExtensible(it)) return true; + // not necessary to add metadata + if (!create) return false; + // add missing metadata + setMeta(it); + // return hash weak collections IDs + } + return it[META].w; + }; + // add metadata on freeze-family methods calling + var onFreeze = function (it) { + if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it); + return it; + }; + var meta = (module.exports = { + KEY: META, + NEED: false, + fastKey: fastKey, + getWeak: getWeak, + onFreeze: onFreeze, + }); + + /***/ + }, + /* 82 */ + /***/ function (module, exports, __webpack_require__) { + var ctx = __webpack_require__(68); + var call = __webpack_require__(221); + var isArrayIter = __webpack_require__(222); + var anObject = __webpack_require__(62); + var toLength = __webpack_require__(102); + var getIterFn = __webpack_require__(223); + var BREAK = {}; + var RETURN = {}; + var exports = (module.exports = function (iterable, entries, fn, that, ITERATOR) { + var iterFn = ITERATOR + ? function () { + return iterable; + } + : getIterFn(iterable); + var f = ctx(fn, that, entries ? 2 : 1); + var index = 0; + var length, step, iterator, result; + if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!'); + // fast case for arrays with default iterator + if (isArrayIter(iterFn)) + for (length = toLength(iterable.length); length > index; index++) { + result = entries ? f(anObject((step = iterable[index]))[0], step[1]) : f(iterable[index]); + if (result === BREAK || result === RETURN) return result; + } + else + for (iterator = iterFn.call(iterable); !(step = iterator.next()).done; ) { + result = call(iterator, f, step.value, entries); + if (result === BREAK || result === RETURN) return result; + } + }); + exports.BREAK = BREAK; + exports.RETURN = RETURN; + + /***/ + }, + /* 83 */ + /***/ function (module, exports, __webpack_require__) { + var isObject = __webpack_require__(35); + module.exports = function (it, TYPE) { + if (!isObject(it) || it._t !== TYPE) throw TypeError('Incompatible receiver, ' + TYPE + ' required!'); + return it; + }; + + /***/ + }, + /* 84 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Router__ = __webpack_require__(588); + /* unused harmony reexport Router */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Link__ = __webpack_require__(256); + /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, 'a', function () { + return __WEBPACK_IMPORTED_MODULE_1__Link__['a']; + }); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__IndexLink__ = __webpack_require__(595); + /* unused harmony reexport IndexLink */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__withRouter__ = __webpack_require__(596); + /* unused harmony reexport withRouter */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__IndexRedirect__ = __webpack_require__(598); + /* unused harmony reexport IndexRedirect */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__IndexRoute__ = __webpack_require__(599); + /* unused harmony reexport IndexRoute */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__Redirect__ = __webpack_require__(257); + /* unused harmony reexport Redirect */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__Route__ = __webpack_require__(600); + /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, 'b', function () { + return __WEBPACK_IMPORTED_MODULE_7__Route__['a']; + }); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__RouteUtils__ = __webpack_require__(47); + /* unused harmony reexport createRoutes */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__RouterContext__ = __webpack_require__(167); + /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, 'c', function () { + return __WEBPACK_IMPORTED_MODULE_9__RouterContext__['a']; + }); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__PropTypes__ = __webpack_require__(169); + /* unused harmony reexport locationShape */ + /* unused harmony reexport routerShape */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__match__ = __webpack_require__(601); + /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, 'd', function () { + return __WEBPACK_IMPORTED_MODULE_11__match__['a']; + }); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__useRouterHistory__ = __webpack_require__(261); + /* unused harmony reexport useRouterHistory */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__PatternUtils__ = __webpack_require__(71); + /* unused harmony reexport formatPattern */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__applyRouterMiddleware__ = + __webpack_require__(606); + /* unused harmony reexport applyRouterMiddleware */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__browserHistory__ = __webpack_require__(607); + /* unused harmony reexport browserHistory */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__hashHistory__ = __webpack_require__(610); + /* unused harmony reexport hashHistory */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__createMemoryHistory__ = __webpack_require__(258); + /* unused harmony reexport createMemoryHistory */ + /* components */ + + /* components (configuration) */ + + /* utils */ + + /* histories */ + + /***/ + }, + /* 85 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['c'] = falsy; + /* unused harmony export history */ + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'a', function () { + return component; + }); + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'b', function () { + return components; + }); + /* unused harmony export route */ + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'd', function () { + return routes; + }); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(10); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + + function falsy(props, propName, componentName) { + if (props[propName]) + return new Error('<' + componentName + '> should not have a "' + propName + '" prop'); + } + + var history = Object(__WEBPACK_IMPORTED_MODULE_0_prop_types__['shape'])({ + listen: __WEBPACK_IMPORTED_MODULE_0_prop_types__['func'].isRequired, + push: __WEBPACK_IMPORTED_MODULE_0_prop_types__['func'].isRequired, + replace: __WEBPACK_IMPORTED_MODULE_0_prop_types__['func'].isRequired, + go: __WEBPACK_IMPORTED_MODULE_0_prop_types__['func'].isRequired, + goBack: __WEBPACK_IMPORTED_MODULE_0_prop_types__['func'].isRequired, + goForward: __WEBPACK_IMPORTED_MODULE_0_prop_types__['func'].isRequired, + }); + + var component = Object(__WEBPACK_IMPORTED_MODULE_0_prop_types__['oneOfType'])([ + __WEBPACK_IMPORTED_MODULE_0_prop_types__['func'], + __WEBPACK_IMPORTED_MODULE_0_prop_types__['string'], + ]); + var components = Object(__WEBPACK_IMPORTED_MODULE_0_prop_types__['oneOfType'])([ + component, + __WEBPACK_IMPORTED_MODULE_0_prop_types__['object'], + ]); + var route = Object(__WEBPACK_IMPORTED_MODULE_0_prop_types__['oneOfType'])([ + __WEBPACK_IMPORTED_MODULE_0_prop_types__['object'], + __WEBPACK_IMPORTED_MODULE_0_prop_types__['element'], + ]); + var routes = Object(__WEBPACK_IMPORTED_MODULE_0_prop_types__['oneOfType'])([ + route, + Object(__WEBPACK_IMPORTED_MODULE_0_prop_types__['arrayOf'])(route), + ]); + + /***/ + }, + /* 86 */ + /***/ function (module, exports, __webpack_require__) { + // false -> Array#indexOf + // true -> Array#includes + var toIObject = __webpack_require__(19); + var toLength = __webpack_require__(7); + var toAbsoluteIndex = __webpack_require__(52); + module.exports = function (IS_INCLUDES) { + return function ($this, el, fromIndex) { + var O = toIObject($this); + var length = toLength(O.length); + var index = toAbsoluteIndex(fromIndex, length); + var value; + // Array#includes uses SameValueZero equality algorithm + // eslint-disable-next-line no-self-compare + if (IS_INCLUDES && el != el) + while (length > index) { + value = O[index++]; + // eslint-disable-next-line no-self-compare + if (value != value) return true; + // Array#indexOf ignores holes, Array#includes - not + } + else + for (; length > index; index++) + if (IS_INCLUDES || index in O) { + if (O[index] === el) return IS_INCLUDES || index || 0; + } + return !IS_INCLUDES && -1; + }; + }; + + /***/ + }, + /* 87 */ + /***/ function (module, exports) { + exports.f = Object.getOwnPropertySymbols; + + /***/ + }, + /* 88 */ + /***/ function (module, exports, __webpack_require__) { + // 7.2.2 IsArray(argument) + var cof = __webpack_require__(25); + module.exports = + Array.isArray || + function isArray(arg) { + return cof(arg) == 'Array'; + }; + + /***/ + }, + /* 89 */ + /***/ function (module, exports, __webpack_require__) { + var toInteger = __webpack_require__(26); + var defined = __webpack_require__(32); + // true -> String#at + // false -> String#codePointAt + module.exports = function (TO_STRING) { + return function (that, pos) { + var s = String(defined(that)); + var i = toInteger(pos); + var l = s.length; + var a, b; + if (i < 0 || i >= l) return TO_STRING ? '' : undefined; + a = s.charCodeAt(i); + return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff + ? TO_STRING + ? s.charAt(i) + : a + : TO_STRING + ? s.slice(i, i + 2) + : ((a - 0xd800) << 10) + (b - 0xdc00) + 0x10000; + }; + }; + + /***/ + }, + /* 90 */ + /***/ function (module, exports, __webpack_require__) { + // 7.2.8 IsRegExp(argument) + var isObject = __webpack_require__(5); + var cof = __webpack_require__(25); + var MATCH = __webpack_require__(6)('match'); + module.exports = function (it) { + var isRegExp; + return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp'); + }; + + /***/ + }, + /* 91 */ + /***/ function (module, exports, __webpack_require__) { + var ITERATOR = __webpack_require__(6)('iterator'); + var SAFE_CLOSING = false; + + try { + var riter = [7][ITERATOR](); + riter['return'] = function () { + SAFE_CLOSING = true; + }; + // eslint-disable-next-line no-throw-literal + Array.from(riter, function () { + throw 2; + }); + } catch (e) { + /* empty */ + } + + module.exports = function (exec, skipClosing) { + if (!skipClosing && !SAFE_CLOSING) return false; + var safe = false; + try { + var arr = [7]; + var iter = arr[ITERATOR](); + iter.next = function () { + return { done: (safe = true) }; + }; + arr[ITERATOR] = function () { + return iter; + }; + exec(arr); + } catch (e) { + /* empty */ + } + return safe; + }; + + /***/ + }, + /* 92 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var classof = __webpack_require__(65); + var builtinExec = RegExp.prototype.exec; + + // `RegExpExec` abstract operation + // https://tc39.github.io/ecma262/#sec-regexpexec + module.exports = function (R, S) { + var exec = R.exec; + if (typeof exec === 'function') { + var result = exec.call(R, S); + if (typeof result !== 'object') { + throw new TypeError('RegExp exec method returned something other than an Object or null'); + } + return result; + } + if (classof(R) !== 'RegExp') { + throw new TypeError('RegExp#exec called on incompatible receiver'); + } + return builtinExec.call(R, S); + }; + + /***/ + }, + /* 93 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + __webpack_require__(193); + var redefine = __webpack_require__(16); + var hide = __webpack_require__(15); + var fails = __webpack_require__(4); + var defined = __webpack_require__(32); + var wks = __webpack_require__(6); + var regexpExec = __webpack_require__(133); + + var SPECIES = wks('species'); + + var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () { + // #replace needs built-in support for named groups. + // #match works fine because it just return the exec results, even if it has + // a "grops" property. + var re = /./; + re.exec = function () { + var result = []; + result.groups = { a: '7' }; + return result; + }; + return ''.replace(re, '$<a>') !== '7'; + }); + + var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = (function () { + // Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec + var re = /(?:)/; + var originalExec = re.exec; + re.exec = function () { + return originalExec.apply(this, arguments); + }; + var result = 'ab'.split(re); + return result.length === 2 && result[0] === 'a' && result[1] === 'b'; + })(); + + module.exports = function (KEY, length, exec) { + var SYMBOL = wks(KEY); + + var DELEGATES_TO_SYMBOL = !fails(function () { + // String methods call symbol-named RegEp methods + var O = {}; + O[SYMBOL] = function () { + return 7; + }; + return ''[KEY](O) != 7; + }); + + var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL + ? !fails(function () { + // Symbol-named RegExp methods call .exec + var execCalled = false; + var re = /a/; + re.exec = function () { + execCalled = true; + return null; + }; + if (KEY === 'split') { + // RegExp[@@split] doesn't call the regex's exec method, but first creates + // a new one. We need to return the patched regex when creating the new one. + re.constructor = {}; + re.constructor[SPECIES] = function () { + return re; + }; + } + re[SYMBOL](''); + return !execCalled; + }) + : undefined; + + if ( + !DELEGATES_TO_SYMBOL || + !DELEGATES_TO_EXEC || + (KEY === 'replace' && !REPLACE_SUPPORTS_NAMED_GROUPS) || + (KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC) + ) { + var nativeRegExpMethod = /./[SYMBOL]; + var fns = exec( + defined, + SYMBOL, + ''[KEY], + function maybeCallNative(nativeMethod, regexp, str, arg2, forceStringMethod) { + if (regexp.exec === regexpExec) { + if (DELEGATES_TO_SYMBOL && !forceStringMethod) { + // The native String method already delegates to @@method (this + // polyfilled function), leasing to infinite recursion. + // We avoid it by directly calling the native @@method method. + return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) }; + } + return { done: true, value: nativeMethod.call(str, regexp, arg2) }; + } + return { done: false }; + }, + ); + var strfn = fns[0]; + var rxfn = fns[1]; + + redefine(String.prototype, KEY, strfn); + hide( + RegExp.prototype, + SYMBOL, + length == 2 + ? // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue) + // 21.2.5.11 RegExp.prototype[@@split](string, limit) + function (string, arg) { + return rxfn.call(string, this, arg); + } + : // 21.2.5.6 RegExp.prototype[@@match](string) + // 21.2.5.9 RegExp.prototype[@@search](string) + function (string) { + return rxfn.call(string, this); + }, + ); + } + }; + + /***/ + }, + /* 94 */ + /***/ function (module, exports, __webpack_require__) { + var global = __webpack_require__(3); + var navigator = global.navigator; + + module.exports = (navigator && navigator.userAgent) || ''; + + /***/ + }, + /* 95 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var global = __webpack_require__(3); + var $export = __webpack_require__(0); + var redefine = __webpack_require__(16); + var redefineAll = __webpack_require__(58); + var meta = __webpack_require__(42); + var forOf = __webpack_require__(57); + var anInstance = __webpack_require__(56); + var isObject = __webpack_require__(5); + var fails = __webpack_require__(4); + var $iterDetect = __webpack_require__(91); + var setToStringTag = __webpack_require__(64); + var inheritIfRequired = __webpack_require__(119); + + module.exports = function (NAME, wrapper, methods, common, IS_MAP, IS_WEAK) { + var Base = global[NAME]; + var C = Base; + var ADDER = IS_MAP ? 'set' : 'add'; + var proto = C && C.prototype; + var O = {}; + var fixMethod = function (KEY) { + var fn = proto[KEY]; + redefine( + proto, + KEY, + KEY == 'delete' + ? function (a) { + return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a); + } + : KEY == 'has' + ? function has(a) { + return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a); + } + : KEY == 'get' + ? function get(a) { + return IS_WEAK && !isObject(a) ? undefined : fn.call(this, a === 0 ? 0 : a); + } + : KEY == 'add' + ? function add(a) { + fn.call(this, a === 0 ? 0 : a); + return this; + } + : function set(a, b) { + fn.call(this, a === 0 ? 0 : a, b); + return this; + }, + ); + }; + if ( + typeof C != 'function' || + !( + IS_WEAK || + (proto.forEach && + !fails(function () { + new C().entries().next(); + })) + ) + ) { + // create collection constructor + C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER); + redefineAll(C.prototype, methods); + meta.NEED = true; + } else { + var instance = new C(); + // early implementations not supports chaining + var HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance; + // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false + var THROWS_ON_PRIMITIVES = fails(function () { + instance.has(1); + }); + // most early implementations doesn't supports iterables, most modern - not close it correctly + var ACCEPT_ITERABLES = $iterDetect(function (iter) { + new C(iter); + }); // eslint-disable-line no-new + // for early implementations -0 and +0 not the same + var BUGGY_ZERO = + !IS_WEAK && + fails(function () { + // V8 ~ Chromium 42- fails only with 5+ elements + var $instance = new C(); + var index = 5; + while (index--) $instance[ADDER](index, index); + return !$instance.has(-0); + }); + if (!ACCEPT_ITERABLES) { + C = wrapper(function (target, iterable) { + anInstance(target, C, NAME); + var that = inheritIfRequired(new Base(), target, C); + if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that); + return that; + }); + C.prototype = proto; + proto.constructor = C; + } + if (THROWS_ON_PRIMITIVES || BUGGY_ZERO) { + fixMethod('delete'); + fixMethod('has'); + IS_MAP && fixMethod('get'); + } + if (BUGGY_ZERO || HASNT_CHAINING) fixMethod(ADDER); + // weak collections should not contains .clear method + if (IS_WEAK && proto.clear) delete proto.clear; + } + + setToStringTag(C, NAME); + + O[NAME] = C; + $export($export.G + $export.W + $export.F * (C != Base), O); + + if (!IS_WEAK) common.setStrong(C, NAME, IS_MAP); + + return C; + }; + + /***/ + }, + /* 96 */ + /***/ function (module, exports, __webpack_require__) { + var global = __webpack_require__(3); + var hide = __webpack_require__(15); + var uid = __webpack_require__(50); + var TYPED = uid('typed_array'); + var VIEW = uid('view'); + var ABV = !!(global.ArrayBuffer && global.DataView); + var CONSTR = ABV; + var i = 0; + var l = 9; + var Typed; + + var TypedArrayConstructors = + 'Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array'.split( + ',', + ); + + while (i < l) { + if ((Typed = global[TypedArrayConstructors[i++]])) { + hide(Typed.prototype, TYPED, true); + hide(Typed.prototype, VIEW, true); + } else CONSTR = false; + } + + module.exports = { + ABV: ABV, + CONSTR: CONSTR, + TYPED: TYPED, + VIEW: VIEW, + }; + + /***/ + }, + /* 97 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // Forced replacement prototype accessors methods + module.exports = + __webpack_require__(41) || + !__webpack_require__(4)(function () { + var K = Math.random(); + // In FF throws only define methods + // eslint-disable-next-line no-undef, no-useless-call + __defineSetter__.call(null, K, function () { + /* empty */ + }); + delete __webpack_require__(3)[K]; + }); + + /***/ + }, + /* 98 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // https://tc39.github.io/proposal-setmap-offrom/ + var $export = __webpack_require__(0); + + module.exports = function (COLLECTION) { + $export($export.S, COLLECTION, { + of: function of() { + var length = arguments.length; + var A = new Array(length); + while (length--) A[length] = arguments[length]; + return new this(A); + }, + }); + }; + + /***/ + }, + /* 99 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // https://tc39.github.io/proposal-setmap-offrom/ + var $export = __webpack_require__(0); + var aFunction = __webpack_require__(12); + var ctx = __webpack_require__(24); + var forOf = __webpack_require__(57); + + module.exports = function (COLLECTION) { + $export($export.S, COLLECTION, { + from: function from(source /* , mapFn, thisArg */) { + var mapFn = arguments[1]; + var mapping, A, n, cb; + aFunction(this); + mapping = mapFn !== undefined; + if (mapping) aFunction(mapFn); + if (source == undefined) return new this(); + A = []; + if (mapping) { + n = 0; + cb = ctx(mapFn, arguments[2], 2); + forOf(source, false, function (nextItem) { + A.push(cb(nextItem, n++)); + }); + } else { + forOf(source, false, A.push, A); + } + return new this(A); + }, + }); + }; + + /***/ + }, + /* 100 */ + /***/ function (module, exports) { + exports.f = {}.propertyIsEnumerable; + + /***/ + }, + /* 101 */ + /***/ function (module, exports) { + module.exports = true; + + /***/ + }, + /* 102 */ + /***/ function (module, exports, __webpack_require__) { + // 7.1.15 ToLength + var toInteger = __webpack_require__(144); + var min = Math.min; + module.exports = function (it) { + return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 + }; + + /***/ + }, + /* 103 */ + /***/ function (module, exports) { + var id = 0; + var px = Math.random(); + module.exports = function (key) { + return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); + }; + + /***/ + }, + /* 104 */ + /***/ function (module, exports, __webpack_require__) { + var def = __webpack_require__(30).f; + var has = __webpack_require__(44); + var TAG = __webpack_require__(22)('toStringTag'); + + module.exports = function (it, tag, stat) { + if (it && !has((it = stat ? it : it.prototype), TAG)) + def(it, TAG, { configurable: true, value: tag }); + }; + + /***/ + }, + /* 105 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = __webpack_require__(507); + + /***/ + }, + /* 106 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + + var printWarning = function () {}; + + if (true) { + var ReactPropTypesSecret = __webpack_require__(230); + var loggedTypeFailures = {}; + var has = Function.call.bind(Object.prototype.hasOwnProperty); + + printWarning = function (text) { + var message = 'Warning: ' + text; + if (typeof console !== 'undefined') { + console.error(message); + } + try { + // --- Welcome to debugging React --- + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + throw new Error(message); + } catch (x) {} + }; + } + + /** + * Assert that the values match with the type specs. + * Error messages are memorized and will only be shown once. + * + * @param {object} typeSpecs Map of name to a ReactPropType + * @param {object} values Runtime values that need to be type-checked + * @param {string} location e.g. "prop", "context", "child context" + * @param {string} componentName Name of the component for error messages. + * @param {?Function} getStack Returns the component stack. + * @private + */ + function checkPropTypes(typeSpecs, values, location, componentName, getStack) { + if (true) { + for (var typeSpecName in typeSpecs) { + if (has(typeSpecs, typeSpecName)) { + var error; + // Prop type validation may throw. In case they do, we don't want to + // fail the render phase where it didn't fail before. So we log it. + // After these have been cleaned up, we'll let them throw. + try { + // This is intentionally an invariant that gets caught. It's the same + // behavior as without this statement except with a better message. + if (typeof typeSpecs[typeSpecName] !== 'function') { + var err = Error( + (componentName || 'React class') + + ': ' + + location + + ' type `' + + typeSpecName + + '` is invalid; ' + + 'it must be a function, usually from the `prop-types` package, but received `' + + typeof typeSpecs[typeSpecName] + + '`.', + ); + err.name = 'Invariant Violation'; + throw err; + } + error = typeSpecs[typeSpecName]( + values, + typeSpecName, + componentName, + location, + null, + ReactPropTypesSecret, + ); + } catch (ex) { + error = ex; + } + if (error && !(error instanceof Error)) { + printWarning( + (componentName || 'React class') + + ': type specification of ' + + location + + ' `' + + typeSpecName + + '` is invalid; the type checker ' + + 'function must return `null` or an `Error` but returned a ' + + typeof error + + '. ' + + 'You may have forgotten to pass an argument to the type checker ' + + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + + 'shape all require an argument).', + ); + } + if (error instanceof Error && !(error.message in loggedTypeFailures)) { + // Only monitor this failure once because there tends to be a lot of the + // same error. + loggedTypeFailures[error.message] = true; + + var stack = getStack ? getStack() : ''; + + printWarning('Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')); + } + } + } + } + } + + /** + * Resets warning cache when testing. + * + * @private + */ + checkPropTypes.resetWarningCache = function () { + if (true) { + loggedTypeFailures = {}; + } + }; + + module.exports = checkPropTypes; + + /***/ + }, + /* 107 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + module.exports = __webpack_require__(517); + + /***/ + }, + /* 108 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + if (false) { + module.exports = require('./cjs/react-is.production.min.js'); + } else { + module.exports = __webpack_require__(541); + } + + /***/ + }, + /* 109 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createStore__ = __webpack_require__(239); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__combineReducers__ = __webpack_require__(566); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__bindActionCreators__ = __webpack_require__(567); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__applyMiddleware__ = __webpack_require__(568); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__compose__ = __webpack_require__(243); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__utils_warning__ = __webpack_require__(242); + /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, 'd', function () { + return __WEBPACK_IMPORTED_MODULE_0__createStore__['b']; + }); + /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, 'c', function () { + return __WEBPACK_IMPORTED_MODULE_1__combineReducers__['a']; + }); + /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, 'b', function () { + return __WEBPACK_IMPORTED_MODULE_2__bindActionCreators__['a']; + }); + /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, 'a', function () { + return __WEBPACK_IMPORTED_MODULE_3__applyMiddleware__['a']; + }); + /* unused harmony reexport compose */ + + /* + * This is a dummy function to check if the function name has been altered by minification. + * If the function has been minified and NODE_ENV !== 'production', warn the user. + */ + function isCrushed() {} + + if ( + 'development' !== 'production' && + typeof isCrushed.name === 'string' && + isCrushed.name !== 'isCrushed' + ) { + Object(__WEBPACK_IMPORTED_MODULE_5__utils_warning__['a' /* default */])( + "You are currently using minified code outside of NODE_ENV === 'production'. " + + 'This means that you are running a slower development build of Redux. ' + + 'You can use loose-envify (https://github.com/zertosh/loose-envify) for browserify ' + + 'or DefinePlugin for webpack (http://stackoverflow.com/questions/30030031) ' + + 'to ensure you have the correct code for your production build.', + ); + } + + /***/ + }, + /* 110 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + /** + * Indicates that navigation was caused by a call to history.push. + */ + var PUSH = (exports.PUSH = 'PUSH'); + + /** + * Indicates that navigation was caused by a call to history.replace. + */ + var REPLACE = (exports.REPLACE = 'REPLACE'); + + /** + * Indicates that navigation was caused by some other action such + * as using a browser's back/forward buttons and/or manually manipulating + * the URL in a browser's location bar. This is the default. + * + * See https://developer.mozilla.org/en-US/docs/Web/API/WindowEventHandlers/onpopstate + * for more information. + */ + var POP = (exports.POP = 'POP'); + + /***/ + }, + /* 111 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + var addEventListener = (exports.addEventListener = function addEventListener(node, event, listener) { + return node.addEventListener + ? node.addEventListener(event, listener, false) + : node.attachEvent('on' + event, listener); + }); + + var removeEventListener = (exports.removeEventListener = function removeEventListener( + node, + event, + listener, + ) { + return node.removeEventListener + ? node.removeEventListener(event, listener, false) + : node.detachEvent('on' + event, listener); + }); + + /** + * Returns true if the HTML5 history API is supported. Taken from Modernizr. + * + * https://github.com/Modernizr/Modernizr/blob/master/LICENSE + * https://github.com/Modernizr/Modernizr/blob/master/feature-detects/history.js + * changed to avoid false negatives for Windows Phones: https://github.com/reactjs/react-router/issues/586 + */ + var supportsHistory = (exports.supportsHistory = function supportsHistory() { + var ua = window.navigator.userAgent; + + if ( + (ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && + ua.indexOf('Mobile Safari') !== -1 && + ua.indexOf('Chrome') === -1 && + ua.indexOf('Windows Phone') === -1 + ) + return false; + + return window.history && 'pushState' in window.history; + }); + + /** + * Returns false if using go(n) with hash history causes a full page reload. + */ + var supportsGoWithoutReloadUsingHash = (exports.supportsGoWithoutReloadUsingHash = + function supportsGoWithoutReloadUsingHash() { + return window.navigator.userAgent.indexOf('Firefox') === -1; + }); + + /** + * Returns true if browser fires popstate on hash change. + * IE10 and IE11 do not. + */ + var supportsPopstateOnHashchange = (exports.supportsPopstateOnHashchange = + function supportsPopstateOnHashchange() { + return window.navigator.userAgent.indexOf('Trident') === -1; + }); + + /** + * Returns true if a given popstate event is an extraneous WebKit event. + * Accounts for the fact that Chrome on iOS fires real popstate events + * containing undefined state when pressing the back button. + */ + var isExtraneousPopstateEvent = (exports.isExtraneousPopstateEvent = function isExtraneousPopstateEvent( + event, + ) { + return event.state === undefined && navigator.userAgent.indexOf('CriOS') === -1; + }); + + /***/ + }, + /* 112 */ + /***/ function (module, exports, __webpack_require__) { + var isObject = __webpack_require__(5); + var document = __webpack_require__(3).document; + // typeof document.createElement is 'object' in old IE + var is = isObject(document) && isObject(document.createElement); + module.exports = function (it) { + return is ? document.createElement(it) : {}; + }; + + /***/ + }, + /* 113 */ + /***/ function (module, exports, __webpack_require__) { + var global = __webpack_require__(3); + var core = __webpack_require__(23); + var LIBRARY = __webpack_require__(41); + var wksExt = __webpack_require__(175); + var defineProperty = __webpack_require__(9).f; + module.exports = function (name) { + var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {}); + if (name.charAt(0) != '_' && !(name in $Symbol)) + defineProperty($Symbol, name, { value: wksExt.f(name) }); + }; + + /***/ + }, + /* 114 */ + /***/ function (module, exports, __webpack_require__) { + var shared = __webpack_require__(73)('keys'); + var uid = __webpack_require__(50); + module.exports = function (key) { + return shared[key] || (shared[key] = uid(key)); + }; + + /***/ + }, + /* 115 */ + /***/ function (module, exports) { + // IE 8- don't enum bug keys + module.exports = + 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'.split( + ',', + ); + + /***/ + }, + /* 116 */ + /***/ function (module, exports, __webpack_require__) { + var document = __webpack_require__(3).document; + module.exports = document && document.documentElement; + + /***/ + }, + /* 117 */ + /***/ function (module, exports, __webpack_require__) { + // Works with __proto__ only. Old v8 can't work with null proto objects. + /* eslint-disable no-proto */ + var isObject = __webpack_require__(5); + var anObject = __webpack_require__(2); + var check = function (O, proto) { + anObject(O); + if (!isObject(proto) && proto !== null) throw TypeError(proto + ": can't set as prototype!"); + }; + module.exports = { + set: + Object.setPrototypeOf || + ('__proto__' in {} // eslint-disable-line + ? (function (test, buggy, set) { + try { + set = __webpack_require__(24)( + Function.call, + __webpack_require__(20).f(Object.prototype, '__proto__').set, + 2, + ); + set(test, []); + buggy = !(test instanceof Array); + } catch (e) { + buggy = true; + } + return function setPrototypeOf(O, proto) { + check(O, proto); + if (buggy) O.__proto__ = proto; + else set(O, proto); + return O; + }; + })({}, false) + : undefined), + check: check, + }; + + /***/ + }, + /* 118 */ + /***/ function (module, exports) { + module.exports = + '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' + + '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'; + + /***/ + }, + /* 119 */ + /***/ function (module, exports, __webpack_require__) { + var isObject = __webpack_require__(5); + var setPrototypeOf = __webpack_require__(117).set; + module.exports = function (that, target, C) { + var S = target.constructor; + var P; + if ( + S !== C && + typeof S == 'function' && + (P = S.prototype) !== C.prototype && + isObject(P) && + setPrototypeOf + ) { + setPrototypeOf(that, P); + } + return that; + }; + + /***/ + }, + /* 120 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var toInteger = __webpack_require__(26); + var defined = __webpack_require__(32); + + module.exports = function repeat(count) { + var str = String(defined(this)); + var res = ''; + var n = toInteger(count); + if (n < 0 || n == Infinity) throw RangeError("Count can't be negative"); + for (; n > 0; (n >>>= 1) && (str += str)) if (n & 1) res += str; + return res; + }; + + /***/ + }, + /* 121 */ + /***/ function (module, exports) { + // 20.2.2.28 Math.sign(x) + module.exports = + Math.sign || + function sign(x) { + // eslint-disable-next-line no-self-compare + return (x = +x) == 0 || x != x ? x : x < 0 ? -1 : 1; + }; + + /***/ + }, + /* 122 */ + /***/ function (module, exports) { + // 20.2.2.14 Math.expm1(x) + var $expm1 = Math.expm1; + module.exports = + !$expm1 || + // Old FF bug + $expm1(10) > 22025.465794806719 || + $expm1(10) < 22025.4657948067165168 || + // Tor Browser bug + $expm1(-2e-17) != -2e-17 + ? function expm1(x) { + return (x = +x) == 0 ? x : x > -1e-6 && x < 1e-6 ? x + (x * x) / 2 : Math.exp(x) - 1; + } + : $expm1; + + /***/ + }, + /* 123 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var LIBRARY = __webpack_require__(41); + var $export = __webpack_require__(0); + var redefine = __webpack_require__(16); + var hide = __webpack_require__(15); + var Iterators = __webpack_require__(67); + var $iterCreate = __webpack_require__(124); + var setToStringTag = __webpack_require__(64); + var getPrototypeOf = __webpack_require__(21); + var ITERATOR = __webpack_require__(6)('iterator'); + var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next` + var FF_ITERATOR = '@@iterator'; + var KEYS = 'keys'; + var VALUES = 'values'; + + var returnThis = function () { + return this; + }; + + module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) { + $iterCreate(Constructor, NAME, next); + var getMethod = function (kind) { + if (!BUGGY && kind in proto) return proto[kind]; + switch (kind) { + case KEYS: + return function keys() { + return new Constructor(this, kind); + }; + case VALUES: + return function values() { + return new Constructor(this, kind); + }; + } + return function entries() { + return new Constructor(this, kind); + }; + }; + var TAG = NAME + ' Iterator'; + var DEF_VALUES = DEFAULT == VALUES; + var VALUES_BUG = false; + var proto = Base.prototype; + var $native = proto[ITERATOR] || proto[FF_ITERATOR] || (DEFAULT && proto[DEFAULT]); + var $default = $native || getMethod(DEFAULT); + var $entries = DEFAULT ? (!DEF_VALUES ? $default : getMethod('entries')) : undefined; + var $anyNative = NAME == 'Array' ? proto.entries || $native : $native; + var methods, key, IteratorPrototype; + // Fix native + if ($anyNative) { + IteratorPrototype = getPrototypeOf($anyNative.call(new Base())); + if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) { + // Set @@toStringTag to native iterators + setToStringTag(IteratorPrototype, TAG, true); + // fix for some old engines + if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') + hide(IteratorPrototype, ITERATOR, returnThis); + } + } + // fix Array#{values, @@iterator}.name in V8 / FF + if (DEF_VALUES && $native && $native.name !== VALUES) { + VALUES_BUG = true; + $default = function values() { + return $native.call(this); + }; + } + // Define iterator + if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) { + hide(proto, ITERATOR, $default); + } + // Plug for library + Iterators[NAME] = $default; + Iterators[TAG] = returnThis; + if (DEFAULT) { + methods = { + values: DEF_VALUES ? $default : getMethod(VALUES), + keys: IS_SET ? $default : getMethod(KEYS), + entries: $entries, + }; + if (FORCED) + for (key in methods) { + if (!(key in proto)) redefine(proto, key, methods[key]); + } + else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); + } + return methods; + }; + + /***/ + }, + /* 124 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var create = __webpack_require__(53); + var descriptor = __webpack_require__(49); + var setToStringTag = __webpack_require__(64); + var IteratorPrototype = {}; + + // 25.1.2.1.1 %IteratorPrototype%[@@iterator]() + __webpack_require__(15)(IteratorPrototype, __webpack_require__(6)('iterator'), function () { + return this; + }); + + module.exports = function (Constructor, NAME, next) { + Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) }); + setToStringTag(Constructor, NAME + ' Iterator'); + }; + + /***/ + }, + /* 125 */ + /***/ function (module, exports, __webpack_require__) { + // helper for String#{startsWith, endsWith, includes} + var isRegExp = __webpack_require__(90); + var defined = __webpack_require__(32); + + module.exports = function (that, searchString, NAME) { + if (isRegExp(searchString)) throw TypeError('String#' + NAME + " doesn't accept regex!"); + return String(defined(that)); + }; + + /***/ + }, + /* 126 */ + /***/ function (module, exports, __webpack_require__) { + var MATCH = __webpack_require__(6)('match'); + module.exports = function (KEY) { + var re = /./; + try { + '/./'[KEY](re); + } catch (e) { + try { + re[MATCH] = false; + return !'/./'[KEY](re); + } catch (f) { + /* empty */ + } + } + return true; + }; + + /***/ + }, + /* 127 */ + /***/ function (module, exports, __webpack_require__) { + // check on default Array iterator + var Iterators = __webpack_require__(67); + var ITERATOR = __webpack_require__(6)('iterator'); + var ArrayProto = Array.prototype; + + module.exports = function (it) { + return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it); + }; + + /***/ + }, + /* 128 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $defineProperty = __webpack_require__(9); + var createDesc = __webpack_require__(49); + + module.exports = function (object, index, value) { + if (index in object) $defineProperty.f(object, index, createDesc(0, value)); + else object[index] = value; + }; + + /***/ + }, + /* 129 */ + /***/ function (module, exports, __webpack_require__) { + var classof = __webpack_require__(65); + var ITERATOR = __webpack_require__(6)('iterator'); + var Iterators = __webpack_require__(67); + module.exports = __webpack_require__(23).getIteratorMethod = function (it) { + if (it != undefined) return it[ITERATOR] || it['@@iterator'] || Iterators[classof(it)]; + }; + + /***/ + }, + /* 130 */ + /***/ function (module, exports, __webpack_require__) { + // 9.4.2.3 ArraySpeciesCreate(originalArray, length) + var speciesConstructor = __webpack_require__(360); + + module.exports = function (original, length) { + return new (speciesConstructor(original))(length); + }; + + /***/ + }, + /* 131 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + // 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length) + + var toObject = __webpack_require__(11); + var toAbsoluteIndex = __webpack_require__(52); + var toLength = __webpack_require__(7); + module.exports = function fill(value /* , start = 0, end = @length */) { + var O = toObject(this); + var length = toLength(O.length); + var aLen = arguments.length; + var index = toAbsoluteIndex(aLen > 1 ? arguments[1] : undefined, length); + var end = aLen > 2 ? arguments[2] : undefined; + var endPos = end === undefined ? length : toAbsoluteIndex(end, length); + while (endPos > index) O[index++] = value; + return O; + }; + + /***/ + }, + /* 132 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var addToUnscopables = __webpack_require__(43); + var step = __webpack_require__(192); + var Iterators = __webpack_require__(67); + var toIObject = __webpack_require__(19); + + // 22.1.3.4 Array.prototype.entries() + // 22.1.3.13 Array.prototype.keys() + // 22.1.3.29 Array.prototype.values() + // 22.1.3.30 Array.prototype[@@iterator]() + module.exports = __webpack_require__(123)( + Array, + 'Array', + function (iterated, kind) { + this._t = toIObject(iterated); // target + this._i = 0; // next index + this._k = kind; // kind + // 22.1.5.2.1 %ArrayIteratorPrototype%.next() + }, + function () { + var O = this._t; + var kind = this._k; + var index = this._i++; + if (!O || index >= O.length) { + this._t = undefined; + return step(1); + } + if (kind == 'keys') return step(0, index); + if (kind == 'values') return step(0, O[index]); + return step(0, [index, O[index]]); + }, + 'values', + ); + + // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) + Iterators.Arguments = Iterators.Array; + + addToUnscopables('keys'); + addToUnscopables('values'); + addToUnscopables('entries'); + + /***/ + }, + /* 133 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var regexpFlags = __webpack_require__(76); + + var nativeExec = RegExp.prototype.exec; + // This always refers to the native implementation, because the + // String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js, + // which loads this file before patching the method. + var nativeReplace = String.prototype.replace; + + var patchedExec = nativeExec; + + var LAST_INDEX = 'lastIndex'; + + var UPDATES_LAST_INDEX_WRONG = (function () { + var re1 = /a/, + re2 = /b*/g; + nativeExec.call(re1, 'a'); + nativeExec.call(re2, 'a'); + return re1[LAST_INDEX] !== 0 || re2[LAST_INDEX] !== 0; + })(); + + // nonparticipating capturing group, copied from es5-shim's String#split patch. + var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined; + + var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED; + + if (PATCH) { + patchedExec = function exec(str) { + var re = this; + var lastIndex, reCopy, match, i; + + if (NPCG_INCLUDED) { + reCopy = new RegExp('^' + re.source + '$(?!\\s)', regexpFlags.call(re)); + } + if (UPDATES_LAST_INDEX_WRONG) lastIndex = re[LAST_INDEX]; + + match = nativeExec.call(re, str); + + if (UPDATES_LAST_INDEX_WRONG && match) { + re[LAST_INDEX] = re.global ? match.index + match[0].length : lastIndex; + } + if (NPCG_INCLUDED && match && match.length > 1) { + // Fix browsers whose `exec` methods don't consistently return `undefined` + // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/ + // eslint-disable-next-line no-loop-func + nativeReplace.call(match[0], reCopy, function () { + for (i = 1; i < arguments.length - 2; i++) { + if (arguments[i] === undefined) match[i] = undefined; + } + }); + } + + return match; + }; + } + + module.exports = patchedExec; + + /***/ + }, + /* 134 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var at = __webpack_require__(89)(true); + + // `AdvanceStringIndex` abstract operation + // https://tc39.github.io/ecma262/#sec-advancestringindex + module.exports = function (S, index, unicode) { + return index + (unicode ? at(S, index).length : 1); + }; + + /***/ + }, + /* 135 */ + /***/ function (module, exports, __webpack_require__) { + var ctx = __webpack_require__(24); + var invoke = __webpack_require__(182); + var html = __webpack_require__(116); + var cel = __webpack_require__(112); + var global = __webpack_require__(3); + var process = global.process; + var setTask = global.setImmediate; + var clearTask = global.clearImmediate; + var MessageChannel = global.MessageChannel; + var Dispatch = global.Dispatch; + var counter = 0; + var queue = {}; + var ONREADYSTATECHANGE = 'onreadystatechange'; + var defer, channel, port; + var run = function () { + var id = +this; + // eslint-disable-next-line no-prototype-builtins + if (queue.hasOwnProperty(id)) { + var fn = queue[id]; + delete queue[id]; + fn(); + } + }; + var listener = function (event) { + run.call(event.data); + }; + // Node.js 0.9+ & IE10+ has setImmediate, otherwise: + if (!setTask || !clearTask) { + setTask = function setImmediate(fn) { + var args = []; + var i = 1; + while (arguments.length > i) args.push(arguments[i++]); + queue[++counter] = function () { + // eslint-disable-next-line no-new-func + invoke(typeof fn == 'function' ? fn : Function(fn), args); + }; + defer(counter); + return counter; + }; + clearTask = function clearImmediate(id) { + delete queue[id]; + }; + // Node.js 0.8- + if (__webpack_require__(25)(process) == 'process') { + defer = function (id) { + process.nextTick(ctx(run, id, 1)); + }; + // Sphere (JS game engine) Dispatch API + } else if (Dispatch && Dispatch.now) { + defer = function (id) { + Dispatch.now(ctx(run, id, 1)); + }; + // Browsers with MessageChannel, includes WebWorkers + } else if (MessageChannel) { + channel = new MessageChannel(); + port = channel.port2; + channel.port1.onmessage = listener; + defer = ctx(port.postMessage, port, 1); + // Browsers with postMessage, skip WebWorkers + // IE8 has postMessage, but it's sync & typeof its postMessage is 'object' + } else if (global.addEventListener && typeof postMessage == 'function' && !global.importScripts) { + defer = function (id) { + global.postMessage(id + '', '*'); + }; + global.addEventListener('message', listener, false); + // IE8- + } else if (ONREADYSTATECHANGE in cel('script')) { + defer = function (id) { + html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function () { + html.removeChild(this); + run.call(id); + }; + }; + // Rest old browsers + } else { + defer = function (id) { + setTimeout(ctx(run, id, 1), 0); + }; + } + } + module.exports = { + set: setTask, + clear: clearTask, + }; + + /***/ + }, + /* 136 */ + /***/ function (module, exports, __webpack_require__) { + var global = __webpack_require__(3); + var macrotask = __webpack_require__(135).set; + var Observer = global.MutationObserver || global.WebKitMutationObserver; + var process = global.process; + var Promise = global.Promise; + var isNode = __webpack_require__(25)(process) == 'process'; + + module.exports = function () { + var head, last, notify; + + var flush = function () { + var parent, fn; + if (isNode && (parent = process.domain)) parent.exit(); + while (head) { + fn = head.fn; + head = head.next; + try { + fn(); + } catch (e) { + if (head) notify(); + else last = undefined; + throw e; + } + } + last = undefined; + if (parent) parent.enter(); + }; + + // Node.js + if (isNode) { + notify = function () { + process.nextTick(flush); + }; + // browsers with MutationObserver, except iOS Safari - https://github.com/zloirock/core-js/issues/339 + } else if (Observer && !(global.navigator && global.navigator.standalone)) { + var toggle = true; + var node = document.createTextNode(''); + new Observer(flush).observe(node, { characterData: true }); // eslint-disable-line no-new + notify = function () { + node.data = toggle = !toggle; + }; + // environments with maybe non-completely correct, but existent Promise + } else if (Promise && Promise.resolve) { + // Promise.resolve without an argument throws an error in LG WebOS 2 + var promise = Promise.resolve(undefined); + notify = function () { + promise.then(flush); + }; + // for other environments - macrotask based on: + // - setImmediate + // - MessageChannel + // - window.postMessag + // - onreadystatechange + // - setTimeout + } else { + notify = function () { + // strange IE + webpack dev server bug - use .call(global) + macrotask.call(global, flush); + }; + } + + return function (fn) { + var task = { fn: fn, next: undefined }; + if (last) last.next = task; + if (!head) { + head = task; + notify(); + } + last = task; + }; + }; + + /***/ + }, + /* 137 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // 25.4.1.5 NewPromiseCapability(C) + var aFunction = __webpack_require__(12); + + function PromiseCapability(C) { + var resolve, reject; + this.promise = new C(function ($$resolve, $$reject) { + if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor'); + resolve = $$resolve; + reject = $$reject; + }); + this.resolve = aFunction(resolve); + this.reject = aFunction(reject); + } + + module.exports.f = function (C) { + return new PromiseCapability(C); + }; + + /***/ + }, + /* 138 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var global = __webpack_require__(3); + var DESCRIPTORS = __webpack_require__(8); + var LIBRARY = __webpack_require__(41); + var $typed = __webpack_require__(96); + var hide = __webpack_require__(15); + var redefineAll = __webpack_require__(58); + var fails = __webpack_require__(4); + var anInstance = __webpack_require__(56); + var toInteger = __webpack_require__(26); + var toLength = __webpack_require__(7); + var toIndex = __webpack_require__(202); + var gOPN = __webpack_require__(54).f; + var dP = __webpack_require__(9).f; + var arrayFill = __webpack_require__(131); + var setToStringTag = __webpack_require__(64); + var ARRAY_BUFFER = 'ArrayBuffer'; + var DATA_VIEW = 'DataView'; + var PROTOTYPE = 'prototype'; + var WRONG_LENGTH = 'Wrong length!'; + var WRONG_INDEX = 'Wrong index!'; + var $ArrayBuffer = global[ARRAY_BUFFER]; + var $DataView = global[DATA_VIEW]; + var Math = global.Math; + var RangeError = global.RangeError; + // eslint-disable-next-line no-shadow-restricted-names + var Infinity = global.Infinity; + var BaseBuffer = $ArrayBuffer; + var abs = Math.abs; + var pow = Math.pow; + var floor = Math.floor; + var log = Math.log; + var LN2 = Math.LN2; + var BUFFER = 'buffer'; + var BYTE_LENGTH = 'byteLength'; + var BYTE_OFFSET = 'byteOffset'; + var $BUFFER = DESCRIPTORS ? '_b' : BUFFER; + var $LENGTH = DESCRIPTORS ? '_l' : BYTE_LENGTH; + var $OFFSET = DESCRIPTORS ? '_o' : BYTE_OFFSET; + + // IEEE754 conversions based on https://github.com/feross/ieee754 + function packIEEE754(value, mLen, nBytes) { + var buffer = new Array(nBytes); + var eLen = nBytes * 8 - mLen - 1; + var eMax = (1 << eLen) - 1; + var eBias = eMax >> 1; + var rt = mLen === 23 ? pow(2, -24) - pow(2, -77) : 0; + var i = 0; + var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0; + var e, m, c; + value = abs(value); + // eslint-disable-next-line no-self-compare + if (value != value || value === Infinity) { + // eslint-disable-next-line no-self-compare + m = value != value ? 1 : 0; + e = eMax; + } else { + e = floor(log(value) / LN2); + if (value * (c = pow(2, -e)) < 1) { + e--; + c *= 2; + } + if (e + eBias >= 1) { + value += rt / c; + } else { + value += rt * pow(2, 1 - eBias); + } + if (value * c >= 2) { + e++; + c /= 2; + } + if (e + eBias >= eMax) { + m = 0; + e = eMax; + } else if (e + eBias >= 1) { + m = (value * c - 1) * pow(2, mLen); + e = e + eBias; + } else { + m = value * pow(2, eBias - 1) * pow(2, mLen); + e = 0; + } + } + for (; mLen >= 8; buffer[i++] = m & 255, m /= 256, mLen -= 8); + e = (e << mLen) | m; + eLen += mLen; + for (; eLen > 0; buffer[i++] = e & 255, e /= 256, eLen -= 8); + buffer[--i] |= s * 128; + return buffer; + } + function unpackIEEE754(buffer, mLen, nBytes) { + var eLen = nBytes * 8 - mLen - 1; + var eMax = (1 << eLen) - 1; + var eBias = eMax >> 1; + var nBits = eLen - 7; + var i = nBytes - 1; + var s = buffer[i--]; + var e = s & 127; + var m; + s >>= 7; + for (; nBits > 0; e = e * 256 + buffer[i], i--, nBits -= 8); + m = e & ((1 << -nBits) - 1); + e >>= -nBits; + nBits += mLen; + for (; nBits > 0; m = m * 256 + buffer[i], i--, nBits -= 8); + if (e === 0) { + e = 1 - eBias; + } else if (e === eMax) { + return m ? NaN : s ? -Infinity : Infinity; + } else { + m = m + pow(2, mLen); + e = e - eBias; + } + return (s ? -1 : 1) * m * pow(2, e - mLen); + } + + function unpackI32(bytes) { + return (bytes[3] << 24) | (bytes[2] << 16) | (bytes[1] << 8) | bytes[0]; + } + function packI8(it) { + return [it & 0xff]; + } + function packI16(it) { + return [it & 0xff, (it >> 8) & 0xff]; + } + function packI32(it) { + return [it & 0xff, (it >> 8) & 0xff, (it >> 16) & 0xff, (it >> 24) & 0xff]; + } + function packF64(it) { + return packIEEE754(it, 52, 8); + } + function packF32(it) { + return packIEEE754(it, 23, 4); + } + + function addGetter(C, key, internal) { + dP(C[PROTOTYPE], key, { + get: function () { + return this[internal]; + }, + }); + } + + function get(view, bytes, index, isLittleEndian) { + var numIndex = +index; + var intIndex = toIndex(numIndex); + if (intIndex + bytes > view[$LENGTH]) throw RangeError(WRONG_INDEX); + var store = view[$BUFFER]._b; + var start = intIndex + view[$OFFSET]; + var pack = store.slice(start, start + bytes); + return isLittleEndian ? pack : pack.reverse(); + } + function set(view, bytes, index, conversion, value, isLittleEndian) { + var numIndex = +index; + var intIndex = toIndex(numIndex); + if (intIndex + bytes > view[$LENGTH]) throw RangeError(WRONG_INDEX); + var store = view[$BUFFER]._b; + var start = intIndex + view[$OFFSET]; + var pack = conversion(+value); + for (var i = 0; i < bytes; i++) store[start + i] = pack[isLittleEndian ? i : bytes - i - 1]; + } + + if (!$typed.ABV) { + $ArrayBuffer = function ArrayBuffer(length) { + anInstance(this, $ArrayBuffer, ARRAY_BUFFER); + var byteLength = toIndex(length); + this._b = arrayFill.call(new Array(byteLength), 0); + this[$LENGTH] = byteLength; + }; + + $DataView = function DataView(buffer, byteOffset, byteLength) { + anInstance(this, $DataView, DATA_VIEW); + anInstance(buffer, $ArrayBuffer, DATA_VIEW); + var bufferLength = buffer[$LENGTH]; + var offset = toInteger(byteOffset); + if (offset < 0 || offset > bufferLength) throw RangeError('Wrong offset!'); + byteLength = byteLength === undefined ? bufferLength - offset : toLength(byteLength); + if (offset + byteLength > bufferLength) throw RangeError(WRONG_LENGTH); + this[$BUFFER] = buffer; + this[$OFFSET] = offset; + this[$LENGTH] = byteLength; + }; + + if (DESCRIPTORS) { + addGetter($ArrayBuffer, BYTE_LENGTH, '_l'); + addGetter($DataView, BUFFER, '_b'); + addGetter($DataView, BYTE_LENGTH, '_l'); + addGetter($DataView, BYTE_OFFSET, '_o'); + } + + redefineAll($DataView[PROTOTYPE], { + getInt8: function getInt8(byteOffset) { + return (get(this, 1, byteOffset)[0] << 24) >> 24; + }, + getUint8: function getUint8(byteOffset) { + return get(this, 1, byteOffset)[0]; + }, + getInt16: function getInt16(byteOffset /* , littleEndian */) { + var bytes = get(this, 2, byteOffset, arguments[1]); + return (((bytes[1] << 8) | bytes[0]) << 16) >> 16; + }, + getUint16: function getUint16(byteOffset /* , littleEndian */) { + var bytes = get(this, 2, byteOffset, arguments[1]); + return (bytes[1] << 8) | bytes[0]; + }, + getInt32: function getInt32(byteOffset /* , littleEndian */) { + return unpackI32(get(this, 4, byteOffset, arguments[1])); + }, + getUint32: function getUint32(byteOffset /* , littleEndian */) { + return unpackI32(get(this, 4, byteOffset, arguments[1])) >>> 0; + }, + getFloat32: function getFloat32(byteOffset /* , littleEndian */) { + return unpackIEEE754(get(this, 4, byteOffset, arguments[1]), 23, 4); + }, + getFloat64: function getFloat64(byteOffset /* , littleEndian */) { + return unpackIEEE754(get(this, 8, byteOffset, arguments[1]), 52, 8); + }, + setInt8: function setInt8(byteOffset, value) { + set(this, 1, byteOffset, packI8, value); + }, + setUint8: function setUint8(byteOffset, value) { + set(this, 1, byteOffset, packI8, value); + }, + setInt16: function setInt16(byteOffset, value /* , littleEndian */) { + set(this, 2, byteOffset, packI16, value, arguments[2]); + }, + setUint16: function setUint16(byteOffset, value /* , littleEndian */) { + set(this, 2, byteOffset, packI16, value, arguments[2]); + }, + setInt32: function setInt32(byteOffset, value /* , littleEndian */) { + set(this, 4, byteOffset, packI32, value, arguments[2]); + }, + setUint32: function setUint32(byteOffset, value /* , littleEndian */) { + set(this, 4, byteOffset, packI32, value, arguments[2]); + }, + setFloat32: function setFloat32(byteOffset, value /* , littleEndian */) { + set(this, 4, byteOffset, packF32, value, arguments[2]); + }, + setFloat64: function setFloat64(byteOffset, value /* , littleEndian */) { + set(this, 8, byteOffset, packF64, value, arguments[2]); + }, + }); + } else { + if ( + !fails(function () { + $ArrayBuffer(1); + }) || + !fails(function () { + new $ArrayBuffer(-1); // eslint-disable-line no-new + }) || + fails(function () { + new $ArrayBuffer(); // eslint-disable-line no-new + new $ArrayBuffer(1.5); // eslint-disable-line no-new + new $ArrayBuffer(NaN); // eslint-disable-line no-new + return $ArrayBuffer.name != ARRAY_BUFFER; + }) + ) { + $ArrayBuffer = function ArrayBuffer(length) { + anInstance(this, $ArrayBuffer); + return new BaseBuffer(toIndex(length)); + }; + var ArrayBufferProto = ($ArrayBuffer[PROTOTYPE] = BaseBuffer[PROTOTYPE]); + for (var keys = gOPN(BaseBuffer), j = 0, key; keys.length > j; ) { + if (!((key = keys[j++]) in $ArrayBuffer)) hide($ArrayBuffer, key, BaseBuffer[key]); + } + if (!LIBRARY) ArrayBufferProto.constructor = $ArrayBuffer; + } + // iOS Safari 7.x bug + var view = new $DataView(new $ArrayBuffer(2)); + var $setInt8 = $DataView[PROTOTYPE].setInt8; + view.setInt8(0, 2147483648); + view.setInt8(1, 2147483649); + if (view.getInt8(0) || !view.getInt8(1)) + redefineAll( + $DataView[PROTOTYPE], + { + setInt8: function setInt8(byteOffset, value) { + $setInt8.call(this, byteOffset, (value << 24) >> 24); + }, + setUint8: function setUint8(byteOffset, value) { + $setInt8.call(this, byteOffset, (value << 24) >> 24); + }, + }, + true, + ); + } + setToStringTag($ArrayBuffer, ARRAY_BUFFER); + setToStringTag($DataView, DATA_VIEW); + hide($DataView[PROTOTYPE], $typed.VIEW, true); + exports[ARRAY_BUFFER] = $ArrayBuffer; + exports[DATA_VIEW] = $DataView; + + /***/ + }, + /* 139 */ + /***/ function (module, exports, __webpack_require__) { + // fallback for non-array-like ES3 and non-enumerable old V8 strings + var cof = __webpack_require__(140); + // eslint-disable-next-line no-prototype-builtins + module.exports = Object('z').propertyIsEnumerable(0) + ? Object + : function (it) { + return cof(it) == 'String' ? it.split('') : Object(it); + }; + + /***/ + }, + /* 140 */ + /***/ function (module, exports) { + var toString = {}.toString; + + module.exports = function (it) { + return toString.call(it).slice(8, -1); + }; + + /***/ + }, + /* 141 */ + /***/ function (module, exports) { + // 7.2.1 RequireObjectCoercible(argument) + module.exports = function (it) { + if (it == undefined) throw TypeError("Can't call method on " + it); + return it; + }; + + /***/ + }, + /* 142 */ + /***/ function (module, exports, __webpack_require__) { + // 7.1.1 ToPrimitive(input [, PreferredType]) + var isObject = __webpack_require__(35); + // instead of the ES6 spec version, we didn't implement @@toPrimitive case + // and the second argument - flag - preferred type is a string + module.exports = function (it, S) { + if (!isObject(it)) return it; + var fn, val; + if (S && typeof (fn = it.toString) == 'function' && !isObject((val = fn.call(it)))) return val; + if (typeof (fn = it.valueOf) == 'function' && !isObject((val = fn.call(it)))) return val; + if (!S && typeof (fn = it.toString) == 'function' && !isObject((val = fn.call(it)))) return val; + throw TypeError("Can't convert object to primitive value"); + }; + + /***/ + }, + /* 143 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $at = __webpack_require__(481)(true); + + // 21.1.3.27 String.prototype[@@iterator]() + __webpack_require__(145)( + String, + 'String', + function (iterated) { + this._t = String(iterated); // target + this._i = 0; // next index + // 21.1.5.2.1 %StringIteratorPrototype%.next() + }, + function () { + var O = this._t; + var index = this._i; + var point; + if (index >= O.length) return { value: undefined, done: true }; + point = $at(O, index); + this._i += point.length; + return { value: point, done: false }; + }, + ); + + /***/ + }, + /* 144 */ + /***/ function (module, exports) { + // 7.1.4 ToInteger + var ceil = Math.ceil; + var floor = Math.floor; + module.exports = function (it) { + return isNaN((it = +it)) ? 0 : (it > 0 ? floor : ceil)(it); + }; + + /***/ + }, + /* 145 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var LIBRARY = __webpack_require__(101); + var $export = __webpack_require__(36); + var redefine = __webpack_require__(146); + var hide = __webpack_require__(45); + var Iterators = __webpack_require__(79); + var $iterCreate = __webpack_require__(482); + var setToStringTag = __webpack_require__(104); + var getPrototypeOf = __webpack_require__(487); + var ITERATOR = __webpack_require__(22)('iterator'); + var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next` + var FF_ITERATOR = '@@iterator'; + var KEYS = 'keys'; + var VALUES = 'values'; + + var returnThis = function () { + return this; + }; + + module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) { + $iterCreate(Constructor, NAME, next); + var getMethod = function (kind) { + if (!BUGGY && kind in proto) return proto[kind]; + switch (kind) { + case KEYS: + return function keys() { + return new Constructor(this, kind); + }; + case VALUES: + return function values() { + return new Constructor(this, kind); + }; + } + return function entries() { + return new Constructor(this, kind); + }; + }; + var TAG = NAME + ' Iterator'; + var DEF_VALUES = DEFAULT == VALUES; + var VALUES_BUG = false; + var proto = Base.prototype; + var $native = proto[ITERATOR] || proto[FF_ITERATOR] || (DEFAULT && proto[DEFAULT]); + var $default = $native || getMethod(DEFAULT); + var $entries = DEFAULT ? (!DEF_VALUES ? $default : getMethod('entries')) : undefined; + var $anyNative = NAME == 'Array' ? proto.entries || $native : $native; + var methods, key, IteratorPrototype; + // Fix native + if ($anyNative) { + IteratorPrototype = getPrototypeOf($anyNative.call(new Base())); + if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) { + // Set @@toStringTag to native iterators + setToStringTag(IteratorPrototype, TAG, true); + // fix for some old engines + if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') + hide(IteratorPrototype, ITERATOR, returnThis); + } + } + // fix Array#{values, @@iterator}.name in V8 / FF + if (DEF_VALUES && $native && $native.name !== VALUES) { + VALUES_BUG = true; + $default = function values() { + return $native.call(this); + }; + } + // Define iterator + if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) { + hide(proto, ITERATOR, $default); + } + // Plug for library + Iterators[NAME] = $default; + Iterators[TAG] = returnThis; + if (DEFAULT) { + methods = { + values: DEF_VALUES ? $default : getMethod(VALUES), + keys: IS_SET ? $default : getMethod(KEYS), + entries: $entries, + }; + if (FORCED) + for (key in methods) { + if (!(key in proto)) redefine(proto, key, methods[key]); + } + else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); + } + return methods; + }; + + /***/ + }, + /* 146 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = __webpack_require__(45); + + /***/ + }, + /* 147 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) + var anObject = __webpack_require__(62); + var dPs = __webpack_require__(483); + var enumBugKeys = __webpack_require__(150); + var IE_PROTO = __webpack_require__(148)('IE_PROTO'); + var Empty = function () { + /* empty */ + }; + var PROTOTYPE = 'prototype'; + + // Create object with fake `null` prototype: use iframe Object with cleared prototype + var createDict = function () { + // Thrash, waste and sodomy: IE GC bug + var iframe = __webpack_require__(213)('iframe'); + var i = enumBugKeys.length; + var lt = '<'; + var gt = '>'; + var iframeDocument; + iframe.style.display = 'none'; + __webpack_require__(486).appendChild(iframe); + iframe.src = 'javascript:'; // eslint-disable-line no-script-url + // createDict = iframe.contentWindow.Object; + // html.removeChild(iframe); + iframeDocument = iframe.contentWindow.document; + iframeDocument.open(); + iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); + iframeDocument.close(); + createDict = iframeDocument.F; + while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]]; + return createDict(); + }; + + module.exports = + Object.create || + function create(O, Properties) { + var result; + if (O !== null) { + Empty[PROTOTYPE] = anObject(O); + result = new Empty(); + Empty[PROTOTYPE] = null; + // add "__proto__" for Object.getPrototypeOf polyfill + result[IE_PROTO] = O; + } else result = createDict(); + return Properties === undefined ? result : dPs(result, Properties); + }; + + /***/ + }, + /* 148 */ + /***/ function (module, exports, __webpack_require__) { + var shared = __webpack_require__(149)('keys'); + var uid = __webpack_require__(103); + module.exports = function (key) { + return shared[key] || (shared[key] = uid(key)); + }; + + /***/ + }, + /* 149 */ + /***/ function (module, exports, __webpack_require__) { + var core = __webpack_require__(13); + var global = __webpack_require__(29); + var SHARED = '__core-js_shared__'; + var store = global[SHARED] || (global[SHARED] = {}); + + (module.exports = function (key, value) { + return store[key] || (store[key] = value !== undefined ? value : {}); + })('versions', []).push({ + version: core.version, + mode: __webpack_require__(101) ? 'pure' : 'global', + copyright: '© 2019 Denis Pushkarev (zloirock.ru)', + }); + + /***/ + }, + /* 150 */ + /***/ function (module, exports) { + // IE 8- don't enum bug keys + module.exports = + 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'.split( + ',', + ); + + /***/ + }, + /* 151 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(488); + var global = __webpack_require__(29); + var hide = __webpack_require__(45); + var Iterators = __webpack_require__(79); + var TO_STRING_TAG = __webpack_require__(22)('toStringTag'); + + var DOMIterables = ( + 'CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,' + + 'DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,' + + 'MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,' + + 'SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,' + + 'TextTrackList,TouchList' + ).split(','); + + for (var i = 0; i < DOMIterables.length; i++) { + var NAME = DOMIterables[i]; + var Collection = global[NAME]; + var proto = Collection && Collection.prototype; + if (proto && !proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME); + Iterators[NAME] = Iterators.Array; + } + + /***/ + }, + /* 152 */ + /***/ function (module, exports, __webpack_require__) { + exports.f = __webpack_require__(22); + + /***/ + }, + /* 153 */ + /***/ function (module, exports, __webpack_require__) { + var global = __webpack_require__(29); + var core = __webpack_require__(13); + var LIBRARY = __webpack_require__(101); + var wksExt = __webpack_require__(152); + var defineProperty = __webpack_require__(30).f; + module.exports = function (name) { + var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {}); + if (name.charAt(0) != '_' && !(name in $Symbol)) + defineProperty($Symbol, name, { value: wksExt.f(name) }); + }; + + /***/ + }, + /* 154 */ + /***/ function (module, exports) { + exports.f = Object.getOwnPropertySymbols; + + /***/ + }, + /* 155 */ + /***/ function (module, exports) { + /***/ + }, + /* 156 */ + /***/ function (module, exports, __webpack_require__) { + // 0 -> Array#forEach + // 1 -> Array#map + // 2 -> Array#filter + // 3 -> Array#some + // 4 -> Array#every + // 5 -> Array#find + // 6 -> Array#findIndex + var ctx = __webpack_require__(68); + var IObject = __webpack_require__(139); + var toObject = __webpack_require__(69); + var toLength = __webpack_require__(102); + var asc = __webpack_require__(500); + module.exports = function (TYPE, $create) { + var IS_MAP = TYPE == 1; + var IS_FILTER = TYPE == 2; + var IS_SOME = TYPE == 3; + var IS_EVERY = TYPE == 4; + var IS_FIND_INDEX = TYPE == 6; + var NO_HOLES = TYPE == 5 || IS_FIND_INDEX; + var create = $create || asc; + return function ($this, callbackfn, that) { + var O = toObject($this); + var self = IObject(O); + var f = ctx(callbackfn, that, 3); + var length = toLength(self.length); + var index = 0; + var result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined; + var val, res; + for (; length > index; index++) + if (NO_HOLES || index in self) { + val = self[index]; + res = f(val, index, O); + if (TYPE) { + if (IS_MAP) + result[index] = res; // map + else if (res) + switch (TYPE) { + case 3: + return true; // some + case 5: + return val; // find + case 6: + return index; // findIndex + case 2: + result.push(val); // filter + } + else if (IS_EVERY) return false; // every + } + } + return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result; + }; + }; + + /***/ + }, + /* 157 */ + /***/ function (module, exports, __webpack_require__) { + var hide = __webpack_require__(45); + module.exports = function (target, src, safe) { + for (var key in src) { + if (safe && target[key]) target[key] = src[key]; + else hide(target, key, src[key]); + } + return target; + }; + + /***/ + }, + /* 158 */ + /***/ function (module, exports) { + module.exports = function (it, Constructor, name, forbiddenField) { + if (!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)) { + throw TypeError(name + ': incorrect invocation!'); + } + return it; + }; + + /***/ + }, + /* 159 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = __webpack_require__(508); + + /***/ + }, + /* 160 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var _interopRequireDefault = __webpack_require__(40); + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.default = createReactElement; + + var _react = _interopRequireDefault(__webpack_require__(1)); + + /* eslint-disable react/prop-types */ + + /** + * Logic to either call the generatorFunction or call React.createElement to get the + * React.Component + * @param options + * @param options.componentObj + * @param options.props + * @param options.domNodeId + * @param options.trace + * @param options.location + * @returns {Element} + */ + function createReactElement(_ref) { + var componentObj = _ref.componentObj, + props = _ref.props, + railsContext = _ref.railsContext, + domNodeId = _ref.domNodeId, + trace = _ref.trace, + shouldHydrate = _ref.shouldHydrate; + var name = componentObj.name, + component = componentObj.component, + generatorFunction = componentObj.generatorFunction; + + if (trace) { + if (railsContext && railsContext.serverSide) { + console.log('RENDERED '.concat(name, ' to dom node with id: ').concat(domNodeId)); + } else if (shouldHydrate) { + console.log( + 'HYDRATED ' + .concat(name, ' in dom node with id: ') + .concat(domNodeId, ' using props, railsContext:'), + props, + railsContext, + ); + } else { + console.log( + 'RENDERED ' + .concat(name, ' to dom node with id: ') + .concat(domNodeId, ' with props, railsContext:'), + props, + railsContext, + ); + } + } + + if (generatorFunction) { + return component(props, railsContext); + } + + return _react.default.createElement(component, props); + } + + /***/ + }, + /* 161 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(10); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__RailsContext__ = __webpack_require__(237); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__HelloWorld_scss__ = __webpack_require__(544); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__HelloWorld_scss___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_3__HelloWorld_scss__, + ); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + // Example of CSS modules. + + // Super simple example of the simplest possible React component + + var HelloWorld = (function (_React$Component) { + _inherits(HelloWorld, _React$Component); + + // Not necessary if we only call super, but we'll need to initialize state, etc. + function HelloWorld(props) { + _classCallCheck(this, HelloWorld); + + var _this = _possibleConstructorReturn( + this, + (HelloWorld.__proto__ || Object.getPrototypeOf(HelloWorld)).call(this, props), + ); + + _this.state = props.helloWorldData; + _this.setNameDomRef = _this.setNameDomRef.bind(_this); + _this.handleChange = _this.handleChange.bind(_this); + return _this; + } + + _createClass(HelloWorld, [ + { + key: 'setNameDomRef', + value: function setNameDomRef(nameDomNode) { + this.nameDomRef = nameDomNode; + }, + }, + { + key: 'handleChange', + value: function handleChange() { + var name = this.nameDomRef.value; + this.setState({ name: name }); + }, + }, + { + key: 'render', + value: function render() { + // eslint-disable-next-line no-console + console.log( + 'HelloWorld demonstrating a call to console.log in ' + + 'spec/dummy/client/app/components/HelloWorld.jsx:18', + ); + + var name = this.state.name; + var railsContext = this.props.railsContext; + + return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'div', + null, + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'h3', + { className: __WEBPACK_IMPORTED_MODULE_3__HelloWorld_scss___default.a.brightColor }, + 'Hello, ', + name, + '!', + ), + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'p', + null, + 'Say hello to:', + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('input', { + type: 'text', + ref: this.setNameDomRef, + defaultValue: name, + onChange: this.handleChange, + }), + ), + railsContext && + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_2__RailsContext__['a' /* default */], + { railsContext: railsContext }, + ), + ); + }, + }, + ]); + + return HelloWorld; + })(__WEBPACK_IMPORTED_MODULE_1_react___default.a.Component); + + HelloWorld.propTypes = { + helloWorldData: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.shape({ + name: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string, + }).isRequired, + railsContext: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object, + }; + var _default = HelloWorld; + + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + HelloWorld, + 'HelloWorld', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/HelloWorld.jsx', + ); + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/HelloWorld.jsx', + ); + })(); + + /***/ + }, + /* 162 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__components_Provider__ = __webpack_require__(569); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__components_connectAdvanced__ = + __webpack_require__(246); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__connect_connect__ = __webpack_require__(573); + /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, 'a', function () { + return __WEBPACK_IMPORTED_MODULE_0__components_Provider__['a']; + }); + /* unused harmony reexport createProvider */ + /* unused harmony reexport connectAdvanced */ + /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, 'b', function () { + return __WEBPACK_IMPORTED_MODULE_2__connect_connect__['a']; + }); + + /***/ + }, + /* 163 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = warning; + /** + * Prints a warning in the console if it exists. + * + * @param {String} message The warning message. + * @returns {void} + */ + function warning(message) { + /* eslint-disable no-console */ + if (typeof console !== 'undefined' && typeof console.error === 'function') { + console.error(message); + } + /* eslint-enable no-console */ + + try { + // This error was thrown as a convenience so that if you enable + // "break on all exceptions" in your console, + // it would pause the execution at this line. + throw new Error(message); + /* eslint-disable no-empty */ + } catch (e) {} + /* eslint-enable no-empty */ + } + + /***/ + }, + /* 164 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = _extends; + function _extends() { + _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + + return target; + }; + + return _extends.apply(this, arguments); + } + + /***/ + }, + /* 165 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = _objectWithoutPropertiesLoose; + function _objectWithoutPropertiesLoose(source, excluded) { + if (source == null) return {}; + var target = {}; + var sourceKeys = Object.keys(source); + var key, i; + + for (i = 0; i < sourceKeys.length; i++) { + key = sourceKeys[i]; + if (excluded.indexOf(key) >= 0) continue; + target[key] = source[key]; + } + + return target; + } + + /***/ + }, + /* 166 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = loopAsync; + /* harmony export (immutable) */ __webpack_exports__['b'] = mapAsync; + function loopAsync(turns, work, callback) { + var currentTurn = 0, + isDone = false; + var sync = false, + hasNext = false, + doneArgs = void 0; + + function done() { + isDone = true; + if (sync) { + // Iterate instead of recursing if possible. + doneArgs = [].concat(Array.prototype.slice.call(arguments)); + return; + } + + callback.apply(this, arguments); + } + + function next() { + if (isDone) { + return; + } + + hasNext = true; + if (sync) { + // Iterate instead of recursing if possible. + return; + } + + sync = true; + + while (!isDone && currentTurn < turns && hasNext) { + hasNext = false; + work.call(this, currentTurn++, next, done); + } + + sync = false; + + if (isDone) { + // This means the loop finished synchronously. + callback.apply(this, doneArgs); + return; + } + + if (currentTurn >= turns && hasNext) { + isDone = true; + callback(); + } + } + + next(); + } + + function mapAsync(array, work, callback) { + var length = array.length; + var values = []; + + if (length === 0) return callback(null, values); + + var isDone = false, + doneCount = 0; + + function done(index, error, value) { + if (isDone) return; + + if (error) { + isDone = true; + callback(error); + } else { + values[index] = value; + + isDone = ++doneCount === length; + + if (isDone) callback(null, values); + } + } + + array.forEach(function (item, index) { + work(item, index, function (error, value) { + done(index, error, value); + }); + }); + } + + /***/ + }, + /* 167 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant__ = __webpack_require__(14); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_invariant__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_create_react_class__ = __webpack_require__(37); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_create_react_class___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_create_react_class__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types__ = __webpack_require__(10); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_3_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__getRouteParams__ = __webpack_require__(594); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__ContextUtils__ = __webpack_require__(168); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__RouteUtils__ = __webpack_require__(47); + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + var _typeof = + typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' + ? function (obj) { + return typeof obj; + } + : function (obj) { + return obj && + typeof Symbol === 'function' && + obj.constructor === Symbol && + obj !== Symbol.prototype + ? 'symbol' + : typeof obj; + }; + + /** + * A <RouterContext> renders the component tree for a given router state + * and sets the history object and the current location in context. + */ + var RouterContext = __WEBPACK_IMPORTED_MODULE_2_create_react_class___default()({ + displayName: 'RouterContext', + + mixins: [Object(__WEBPACK_IMPORTED_MODULE_5__ContextUtils__['a' /* ContextProvider */])('router')], + + propTypes: { + router: __WEBPACK_IMPORTED_MODULE_3_prop_types__['object'].isRequired, + location: __WEBPACK_IMPORTED_MODULE_3_prop_types__['object'].isRequired, + routes: __WEBPACK_IMPORTED_MODULE_3_prop_types__['array'].isRequired, + params: __WEBPACK_IMPORTED_MODULE_3_prop_types__['object'].isRequired, + components: __WEBPACK_IMPORTED_MODULE_3_prop_types__['array'].isRequired, + createElement: __WEBPACK_IMPORTED_MODULE_3_prop_types__['func'].isRequired, + }, + + getDefaultProps: function getDefaultProps() { + return { + createElement: __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement, + }; + }, + + childContextTypes: { + router: __WEBPACK_IMPORTED_MODULE_3_prop_types__['object'].isRequired, + }, + + getChildContext: function getChildContext() { + return { + router: this.props.router, + }; + }, + createElement: function createElement(component, props) { + return component == null ? null : this.props.createElement(component, props); + }, + render: function render() { + var _this = this; + + var _props = this.props, + location = _props.location, + routes = _props.routes, + params = _props.params, + components = _props.components, + router = _props.router; + + var element = null; + + if (components) { + element = components.reduceRight(function (element, components, index) { + if (components == null) return element; // Don't create new children; use the grandchildren. + + var route = routes[index]; + var routeParams = Object(__WEBPACK_IMPORTED_MODULE_4__getRouteParams__['a' /* default */])( + route, + params, + ); + var props = { + location: location, + params: params, + route: route, + router: router, + routeParams: routeParams, + routes: routes, + }; + + if (Object(__WEBPACK_IMPORTED_MODULE_6__RouteUtils__['c' /* isReactChildren */])(element)) { + props.children = element; + } else if (element) { + for (var prop in element) { + if (Object.prototype.hasOwnProperty.call(element, prop)) props[prop] = element[prop]; + } + } + + if ((typeof components === 'undefined' ? 'undefined' : _typeof(components)) === 'object') { + var elements = {}; + + for (var key in components) { + if (Object.prototype.hasOwnProperty.call(components, key)) { + // Pass through the key as a prop to createElement to allow + // custom createElement functions to know which named component + // they're rendering, for e.g. matching up to fetched data. + elements[key] = _this.createElement( + components[key], + _extends( + { + key: key, + }, + props, + ), + ); + } + } + + return elements; + } + + return _this.createElement(components, props); + }, element); + } + + !( + element === null || + element === false || + __WEBPACK_IMPORTED_MODULE_1_react___default.a.isValidElement(element) + ) + ? true + ? __WEBPACK_IMPORTED_MODULE_0_invariant___default()( + false, + 'The root route must render a single element', + ) + : invariant(false) + : void 0; + + return element; + }, + }); + + /* harmony default export */ __webpack_exports__['a'] = RouterContext; + + /***/ + }, + /* 168 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = ContextProvider; + /* harmony export (immutable) */ __webpack_exports__['b'] = ContextSubscriber; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(10); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + + // Works around issues with context updates failing to propagate. + // Caveat: the context value is expected to never change its identity. + // https://github.com/facebook/react/issues/2517 + // https://github.com/reactjs/react-router/issues/470 + + var contextProviderShape = __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.shape({ + subscribe: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired, + eventIndex: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number.isRequired, + }); + + function makeContextName(name) { + return '@@contextSubscriber/' + name; + } + + function ContextProvider(name) { + var _childContextTypes, _ref2; + + var contextName = makeContextName(name); + var listenersKey = contextName + '/listeners'; + var eventIndexKey = contextName + '/eventIndex'; + var subscribeKey = contextName + '/subscribe'; + + return ( + (_ref2 = { + childContextTypes: + ((_childContextTypes = {}), + (_childContextTypes[contextName] = contextProviderShape.isRequired), + _childContextTypes), + + getChildContext: function getChildContext() { + var _ref; + + return ( + (_ref = {}), + (_ref[contextName] = { + eventIndex: this[eventIndexKey], + subscribe: this[subscribeKey], + }), + _ref + ); + }, + componentWillMount: function componentWillMount() { + this[listenersKey] = []; + this[eventIndexKey] = 0; + }, + componentWillReceiveProps: function componentWillReceiveProps() { + this[eventIndexKey]++; + }, + componentDidUpdate: function componentDidUpdate() { + var _this = this; + + this[listenersKey].forEach(function (listener) { + return listener(_this[eventIndexKey]); + }); + }, + }), + (_ref2[subscribeKey] = function (listener) { + var _this2 = this; + + // No need to immediately call listener here. + this[listenersKey].push(listener); + + return function () { + _this2[listenersKey] = _this2[listenersKey].filter(function (item) { + return item !== listener; + }); + }; + }), + _ref2 + ); + } + + function ContextSubscriber(name) { + var _contextTypes, _ref4; + + var contextName = makeContextName(name); + var lastRenderedEventIndexKey = contextName + '/lastRenderedEventIndex'; + var handleContextUpdateKey = contextName + '/handleContextUpdate'; + var unsubscribeKey = contextName + '/unsubscribe'; + + return ( + (_ref4 = { + contextTypes: + ((_contextTypes = {}), (_contextTypes[contextName] = contextProviderShape), _contextTypes), + + getInitialState: function getInitialState() { + var _ref3; + + if (!this.context[contextName]) { + return {}; + } + + return ( + (_ref3 = {}), (_ref3[lastRenderedEventIndexKey] = this.context[contextName].eventIndex), _ref3 + ); + }, + componentDidMount: function componentDidMount() { + if (!this.context[contextName]) { + return; + } + + this[unsubscribeKey] = this.context[contextName].subscribe(this[handleContextUpdateKey]); + }, + componentWillReceiveProps: function componentWillReceiveProps() { + var _setState; + + if (!this.context[contextName]) { + return; + } + + this.setState( + ((_setState = {}), + (_setState[lastRenderedEventIndexKey] = this.context[contextName].eventIndex), + _setState), + ); + }, + componentWillUnmount: function componentWillUnmount() { + if (!this[unsubscribeKey]) { + return; + } + + this[unsubscribeKey](); + this[unsubscribeKey] = null; + }, + }), + (_ref4[handleContextUpdateKey] = function (eventIndex) { + if (eventIndex !== this.state[lastRenderedEventIndexKey]) { + var _setState2; + + this.setState( + ((_setState2 = {}), (_setState2[lastRenderedEventIndexKey] = eventIndex), _setState2), + ); + } + }), + _ref4 + ); + } + + /***/ + }, + /* 169 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'a', function () { + return routerShape; + }); + /* unused harmony export locationShape */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(10); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + + var routerShape = Object(__WEBPACK_IMPORTED_MODULE_0_prop_types__['shape'])({ + push: __WEBPACK_IMPORTED_MODULE_0_prop_types__['func'].isRequired, + replace: __WEBPACK_IMPORTED_MODULE_0_prop_types__['func'].isRequired, + go: __WEBPACK_IMPORTED_MODULE_0_prop_types__['func'].isRequired, + goBack: __WEBPACK_IMPORTED_MODULE_0_prop_types__['func'].isRequired, + goForward: __WEBPACK_IMPORTED_MODULE_0_prop_types__['func'].isRequired, + setRouteLeaveHook: __WEBPACK_IMPORTED_MODULE_0_prop_types__['func'].isRequired, + isActive: __WEBPACK_IMPORTED_MODULE_0_prop_types__['func'].isRequired, + }); + + var locationShape = Object(__WEBPACK_IMPORTED_MODULE_0_prop_types__['shape'])({ + pathname: __WEBPACK_IMPORTED_MODULE_0_prop_types__['string'].isRequired, + search: __WEBPACK_IMPORTED_MODULE_0_prop_types__['string'].isRequired, + state: __WEBPACK_IMPORTED_MODULE_0_prop_types__['object'], + action: __WEBPACK_IMPORTED_MODULE_0_prop_types__['string'].isRequired, + key: __WEBPACK_IMPORTED_MODULE_0_prop_types__['string'], + }); + + /***/ + }, + /* 170 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + + var _warning = __webpack_require__(46); + + var _warning2 = _interopRequireDefault(_warning); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + var runTransitionHook = function runTransitionHook(hook, location, callback) { + var result = hook(location, callback); + + if (hook.length < 2) { + // Assume the hook runs synchronously and automatically + // call the callback with the return value. + callback(result); + } else { + true + ? (0, _warning2.default)( + result === undefined, + 'You should not "return" in a transition hook with a callback argument; ' + + 'call the callback instead', + ) + : void 0; + } + }; + + exports.default = runTransitionHook; + + /***/ + }, + /* 171 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + + var _AsyncUtils = __webpack_require__(605); + + var _PathUtils = __webpack_require__(48); + + var _runTransitionHook = __webpack_require__(170); + + var _runTransitionHook2 = _interopRequireDefault(_runTransitionHook); + + var _Actions = __webpack_require__(110); + + var _LocationUtils = __webpack_require__(72); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + var createHistory = function createHistory() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + var getCurrentLocation = options.getCurrentLocation, + getUserConfirmation = options.getUserConfirmation, + pushLocation = options.pushLocation, + replaceLocation = options.replaceLocation, + go = options.go, + keyLength = options.keyLength; + + var currentLocation = void 0; + var pendingLocation = void 0; + var beforeListeners = []; + var listeners = []; + var allKeys = []; + + var getCurrentIndex = function getCurrentIndex() { + if (pendingLocation && pendingLocation.action === _Actions.POP) + return allKeys.indexOf(pendingLocation.key); + + if (currentLocation) return allKeys.indexOf(currentLocation.key); + + return -1; + }; + + var updateLocation = function updateLocation(nextLocation) { + var currentIndex = getCurrentIndex(); + + currentLocation = nextLocation; + + if (currentLocation.action === _Actions.PUSH) { + allKeys = [].concat(allKeys.slice(0, currentIndex + 1), [currentLocation.key]); + } else if (currentLocation.action === _Actions.REPLACE) { + allKeys[currentIndex] = currentLocation.key; + } + + listeners.forEach(function (listener) { + return listener(currentLocation); + }); + }; + + var listenBefore = function listenBefore(listener) { + beforeListeners.push(listener); + + return function () { + return (beforeListeners = beforeListeners.filter(function (item) { + return item !== listener; + })); + }; + }; + + var listen = function listen(listener) { + listeners.push(listener); + + return function () { + return (listeners = listeners.filter(function (item) { + return item !== listener; + })); + }; + }; + + var confirmTransitionTo = function confirmTransitionTo(location, callback) { + (0, _AsyncUtils.loopAsync)( + beforeListeners.length, + function (index, next, done) { + (0, _runTransitionHook2.default)(beforeListeners[index], location, function (result) { + return result != null ? done(result) : next(); + }); + }, + function (message) { + if (getUserConfirmation && typeof message === 'string') { + getUserConfirmation(message, function (ok) { + return callback(ok !== false); + }); + } else { + callback(message !== false); + } + }, + ); + }; + + var transitionTo = function transitionTo(nextLocation) { + if ( + (currentLocation && (0, _LocationUtils.locationsAreEqual)(currentLocation, nextLocation)) || + (pendingLocation && (0, _LocationUtils.locationsAreEqual)(pendingLocation, nextLocation)) + ) + return; // Nothing to do + + pendingLocation = nextLocation; + + confirmTransitionTo(nextLocation, function (ok) { + if (pendingLocation !== nextLocation) return; // Transition was interrupted during confirmation + + pendingLocation = null; + + if (ok) { + // Treat PUSH to same path like REPLACE to be consistent with browsers + if (nextLocation.action === _Actions.PUSH) { + var prevPath = (0, _PathUtils.createPath)(currentLocation); + var nextPath = (0, _PathUtils.createPath)(nextLocation); + + if ( + nextPath === prevPath && + (0, _LocationUtils.statesAreEqual)(currentLocation.state, nextLocation.state) + ) + nextLocation.action = _Actions.REPLACE; + } + + if (nextLocation.action === _Actions.POP) { + updateLocation(nextLocation); + } else if (nextLocation.action === _Actions.PUSH) { + if (pushLocation(nextLocation) !== false) updateLocation(nextLocation); + } else if (nextLocation.action === _Actions.REPLACE) { + if (replaceLocation(nextLocation) !== false) updateLocation(nextLocation); + } + } else if (currentLocation && nextLocation.action === _Actions.POP) { + var prevIndex = allKeys.indexOf(currentLocation.key); + var nextIndex = allKeys.indexOf(nextLocation.key); + + if (prevIndex !== -1 && nextIndex !== -1) go(prevIndex - nextIndex); // Restore the URL + } + }); + }; + + var push = function push(input) { + return transitionTo(createLocation(input, _Actions.PUSH)); + }; + + var replace = function replace(input) { + return transitionTo(createLocation(input, _Actions.REPLACE)); + }; + + var goBack = function goBack() { + return go(-1); + }; + + var goForward = function goForward() { + return go(1); + }; + + var createKey = function createKey() { + return Math.random() + .toString(36) + .substr(2, keyLength || 6); + }; + + var createHref = function createHref(location) { + return (0, _PathUtils.createPath)(location); + }; + + var createLocation = function createLocation(location, action) { + var key = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : createKey(); + return (0, _LocationUtils.createLocation)(location, action, key); + }; + + return { + getCurrentLocation: getCurrentLocation, + listenBefore: listenBefore, + listen: listen, + transitionTo: transitionTo, + push: push, + replace: replace, + go: go, + goBack: goBack, + goForward: goForward, + createKey: createKey, + createPath: _PathUtils.createPath, + createHref: createHref, + createLocation: createLocation, + }; + }; + + exports.default = createHistory; + + /***/ + }, + /* 172 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + var canUseDOM = (exports.canUseDOM = !!( + typeof window !== 'undefined' && + window.document && + window.document.createElement + )); + + /***/ + }, + /* 173 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + exports.go = + exports.replaceLocation = + exports.pushLocation = + exports.startListener = + exports.getUserConfirmation = + exports.getCurrentLocation = + undefined; + + var _LocationUtils = __webpack_require__(72); + + var _DOMUtils = __webpack_require__(111); + + var _DOMStateStorage = __webpack_require__(262); + + var _PathUtils = __webpack_require__(48); + + var _ExecutionEnvironment = __webpack_require__(172); + + var PopStateEvent = 'popstate'; + var HashChangeEvent = 'hashchange'; + + var needsHashchangeListener = + _ExecutionEnvironment.canUseDOM && !(0, _DOMUtils.supportsPopstateOnHashchange)(); + + var _createLocation = function _createLocation(historyState) { + var key = historyState && historyState.key; + + return (0, _LocationUtils.createLocation)( + { + pathname: window.location.pathname, + search: window.location.search, + hash: window.location.hash, + state: key ? (0, _DOMStateStorage.readState)(key) : undefined, + }, + undefined, + key, + ); + }; + + var getCurrentLocation = (exports.getCurrentLocation = function getCurrentLocation() { + var historyState = void 0; + try { + historyState = window.history.state || {}; + } catch (error) { + // IE 11 sometimes throws when accessing window.history.state + // See https://github.com/ReactTraining/history/pull/289 + historyState = {}; + } + + return _createLocation(historyState); + }); + + var getUserConfirmation = (exports.getUserConfirmation = function getUserConfirmation( + message, + callback, + ) { + return callback(window.confirm(message)); + }); // eslint-disable-line no-alert + + var startListener = (exports.startListener = function startListener(listener) { + var handlePopState = function handlePopState(event) { + if ((0, _DOMUtils.isExtraneousPopstateEvent)(event)) + // Ignore extraneous popstate events in WebKit + return; + listener(_createLocation(event.state)); + }; + + (0, _DOMUtils.addEventListener)(window, PopStateEvent, handlePopState); + + var handleUnpoppedHashChange = function handleUnpoppedHashChange() { + return listener(getCurrentLocation()); + }; + + if (needsHashchangeListener) { + (0, _DOMUtils.addEventListener)(window, HashChangeEvent, handleUnpoppedHashChange); + } + + return function () { + (0, _DOMUtils.removeEventListener)(window, PopStateEvent, handlePopState); + + if (needsHashchangeListener) { + (0, _DOMUtils.removeEventListener)(window, HashChangeEvent, handleUnpoppedHashChange); + } + }; + }); + + var updateLocation = function updateLocation(location, updateState) { + var state = location.state, + key = location.key; + + if (state !== undefined) (0, _DOMStateStorage.saveState)(key, state); + + updateState({ key: key }, (0, _PathUtils.createPath)(location)); + }; + + var pushLocation = (exports.pushLocation = function pushLocation(location) { + return updateLocation(location, function (state, path) { + return window.history.pushState(state, null, path); + }); + }); + + var replaceLocation = (exports.replaceLocation = function replaceLocation(location) { + return updateLocation(location, function (state, path) { + return window.history.replaceState(state, null, path); + }); + }); + + var go = (exports.go = function go(n) { + if (n) window.history.go(n); + }); + + /***/ + }, + /* 174 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = + !__webpack_require__(8) && + !__webpack_require__(4)(function () { + return ( + Object.defineProperty(__webpack_require__(112)('div'), 'a', { + get: function () { + return 7; + }, + }).a != 7 + ); + }); + + /***/ + }, + /* 175 */ + /***/ function (module, exports, __webpack_require__) { + exports.f = __webpack_require__(6); + + /***/ + }, + /* 176 */ + /***/ function (module, exports, __webpack_require__) { + var has = __webpack_require__(18); + var toIObject = __webpack_require__(19); + var arrayIndexOf = __webpack_require__(86)(false); + var IE_PROTO = __webpack_require__(114)('IE_PROTO'); + + module.exports = function (object, names) { + var O = toIObject(object); + var i = 0; + var result = []; + var key; + for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key); + // Don't enum bug & hidden keys + while (names.length > i) + if (has(O, (key = names[i++]))) { + ~arrayIndexOf(result, key) || result.push(key); + } + return result; + }; + + /***/ + }, + /* 177 */ + /***/ function (module, exports, __webpack_require__) { + var dP = __webpack_require__(9); + var anObject = __webpack_require__(2); + var getKeys = __webpack_require__(51); + + module.exports = __webpack_require__(8) + ? Object.defineProperties + : function defineProperties(O, Properties) { + anObject(O); + var keys = getKeys(Properties); + var length = keys.length; + var i = 0; + var P; + while (length > i) dP.f(O, (P = keys[i++]), Properties[P]); + return O; + }; + + /***/ + }, + /* 178 */ + /***/ function (module, exports, __webpack_require__) { + // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window + var toIObject = __webpack_require__(19); + var gOPN = __webpack_require__(54).f; + var toString = {}.toString; + + var windowNames = + typeof window == 'object' && window && Object.getOwnPropertyNames + ? Object.getOwnPropertyNames(window) + : []; + + var getWindowNames = function (it) { + try { + return gOPN(it); + } catch (e) { + return windowNames.slice(); + } + }; + + module.exports.f = function getOwnPropertyNames(it) { + return windowNames && toString.call(it) == '[object Window]' + ? getWindowNames(it) + : gOPN(toIObject(it)); + }; + + /***/ + }, + /* 179 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // 19.1.2.1 Object.assign(target, source, ...) + var DESCRIPTORS = __webpack_require__(8); + var getKeys = __webpack_require__(51); + var gOPS = __webpack_require__(87); + var pIE = __webpack_require__(75); + var toObject = __webpack_require__(11); + var IObject = __webpack_require__(74); + var $assign = Object.assign; + + // should work with symbols and should have deterministic property order (V8 bug) + module.exports = + !$assign || + __webpack_require__(4)(function () { + var A = {}; + var B = {}; + // eslint-disable-next-line no-undef + var S = Symbol(); + var K = 'abcdefghijklmnopqrst'; + A[S] = 7; + K.split('').forEach(function (k) { + B[k] = k; + }); + return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K; + }) + ? function assign(target, source) { + // eslint-disable-line no-unused-vars + var T = toObject(target); + var aLen = arguments.length; + var index = 1; + var getSymbols = gOPS.f; + var isEnum = pIE.f; + while (aLen > index) { + var S = IObject(arguments[index++]); + var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S); + var length = keys.length; + var j = 0; + var key; + while (length > j) { + key = keys[j++]; + if (!DESCRIPTORS || isEnum.call(S, key)) T[key] = S[key]; + } + } + return T; + } + : $assign; + + /***/ + }, + /* 180 */ + /***/ function (module, exports) { + // 7.2.9 SameValue(x, y) + module.exports = + Object.is || + function is(x, y) { + // eslint-disable-next-line no-self-compare + return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y; + }; + + /***/ + }, + /* 181 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var aFunction = __webpack_require__(12); + var isObject = __webpack_require__(5); + var invoke = __webpack_require__(182); + var arraySlice = [].slice; + var factories = {}; + + var construct = function (F, len, args) { + if (!(len in factories)) { + for (var n = [], i = 0; i < len; i++) n[i] = 'a[' + i + ']'; + // eslint-disable-next-line no-new-func + factories[len] = Function('F,a', 'return new F(' + n.join(',') + ')'); + } + return factories[len](F, args); + }; + + module.exports = + Function.bind || + function bind(that /* , ...args */) { + var fn = aFunction(this); + var partArgs = arraySlice.call(arguments, 1); + var bound = function (/* args... */) { + var args = partArgs.concat(arraySlice.call(arguments)); + return this instanceof bound ? construct(fn, args.length, args) : invoke(fn, args, that); + }; + if (isObject(fn.prototype)) bound.prototype = fn.prototype; + return bound; + }; + + /***/ + }, + /* 182 */ + /***/ function (module, exports) { + // fast apply, http://jsperf.lnkit.com/fast-apply/5 + module.exports = function (fn, args, that) { + var un = that === undefined; + switch (args.length) { + case 0: + return un ? fn() : fn.call(that); + case 1: + return un ? fn(args[0]) : fn.call(that, args[0]); + case 2: + return un ? fn(args[0], args[1]) : fn.call(that, args[0], args[1]); + case 3: + return un ? fn(args[0], args[1], args[2]) : fn.call(that, args[0], args[1], args[2]); + case 4: + return un + ? fn(args[0], args[1], args[2], args[3]) + : fn.call(that, args[0], args[1], args[2], args[3]); + } + return fn.apply(that, args); + }; + + /***/ + }, + /* 183 */ + /***/ function (module, exports, __webpack_require__) { + var $parseInt = __webpack_require__(3).parseInt; + var $trim = __webpack_require__(66).trim; + var ws = __webpack_require__(118); + var hex = /^[-+]?0[xX]/; + + module.exports = + $parseInt(ws + '08') !== 8 || $parseInt(ws + '0x16') !== 22 + ? function parseInt(str, radix) { + var string = $trim(String(str), 3); + return $parseInt(string, radix >>> 0 || (hex.test(string) ? 16 : 10)); + } + : $parseInt; + + /***/ + }, + /* 184 */ + /***/ function (module, exports, __webpack_require__) { + var $parseFloat = __webpack_require__(3).parseFloat; + var $trim = __webpack_require__(66).trim; + + module.exports = + 1 / $parseFloat(__webpack_require__(118) + '-0') !== -Infinity + ? function parseFloat(str) { + var string = $trim(String(str), 3); + var result = $parseFloat(string); + return result === 0 && string.charAt(0) == '-' ? -0 : result; + } + : $parseFloat; + + /***/ + }, + /* 185 */ + /***/ function (module, exports, __webpack_require__) { + var cof = __webpack_require__(25); + module.exports = function (it, msg) { + if (typeof it != 'number' && cof(it) != 'Number') throw TypeError(msg); + return +it; + }; + + /***/ + }, + /* 186 */ + /***/ function (module, exports, __webpack_require__) { + // 20.1.2.3 Number.isInteger(number) + var isObject = __webpack_require__(5); + var floor = Math.floor; + module.exports = function isInteger(it) { + return !isObject(it) && isFinite(it) && floor(it) === it; + }; + + /***/ + }, + /* 187 */ + /***/ function (module, exports) { + // 20.2.2.20 Math.log1p(x) + module.exports = + Math.log1p || + function log1p(x) { + return (x = +x) > -1e-8 && x < 1e-8 ? x - (x * x) / 2 : Math.log(1 + x); + }; + + /***/ + }, + /* 188 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.16 Math.fround(x) + var sign = __webpack_require__(121); + var pow = Math.pow; + var EPSILON = pow(2, -52); + var EPSILON32 = pow(2, -23); + var MAX32 = pow(2, 127) * (2 - EPSILON32); + var MIN32 = pow(2, -126); + + var roundTiesToEven = function (n) { + return n + 1 / EPSILON - 1 / EPSILON; + }; + + module.exports = + Math.fround || + function fround(x) { + var $abs = Math.abs(x); + var $sign = sign(x); + var a, result; + if ($abs < MIN32) return $sign * roundTiesToEven($abs / MIN32 / EPSILON32) * MIN32 * EPSILON32; + a = (1 + EPSILON32 / EPSILON) * $abs; + result = a - (a - $abs); + // eslint-disable-next-line no-self-compare + if (result > MAX32 || result != result) return $sign * Infinity; + return $sign * result; + }; + + /***/ + }, + /* 189 */ + /***/ function (module, exports, __webpack_require__) { + // call something on iterator step with safe closing on error + var anObject = __webpack_require__(2); + module.exports = function (iterator, fn, value, entries) { + try { + return entries ? fn(anObject(value)[0], value[1]) : fn(value); + // 7.4.6 IteratorClose(iterator, completion) + } catch (e) { + var ret = iterator['return']; + if (ret !== undefined) anObject(ret.call(iterator)); + throw e; + } + }; + + /***/ + }, + /* 190 */ + /***/ function (module, exports, __webpack_require__) { + var aFunction = __webpack_require__(12); + var toObject = __webpack_require__(11); + var IObject = __webpack_require__(74); + var toLength = __webpack_require__(7); + + module.exports = function (that, callbackfn, aLen, memo, isRight) { + aFunction(callbackfn); + var O = toObject(that); + var self = IObject(O); + var length = toLength(O.length); + var index = isRight ? length - 1 : 0; + var i = isRight ? -1 : 1; + if (aLen < 2) + for (;;) { + if (index in self) { + memo = self[index]; + index += i; + break; + } + index += i; + if (isRight ? index < 0 : length <= index) { + throw TypeError('Reduce of empty array with no initial value'); + } + } + for (; isRight ? index >= 0 : length > index; index += i) + if (index in self) { + memo = callbackfn(memo, self[index], index, O); + } + return memo; + }; + + /***/ + }, + /* 191 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + // 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length) + + var toObject = __webpack_require__(11); + var toAbsoluteIndex = __webpack_require__(52); + var toLength = __webpack_require__(7); + + module.exports = + [].copyWithin || + function copyWithin(target /* = 0 */, start /* = 0, end = @length */) { + var O = toObject(this); + var len = toLength(O.length); + var to = toAbsoluteIndex(target, len); + var from = toAbsoluteIndex(start, len); + var end = arguments.length > 2 ? arguments[2] : undefined; + var count = Math.min((end === undefined ? len : toAbsoluteIndex(end, len)) - from, len - to); + var inc = 1; + if (from < to && to < from + count) { + inc = -1; + from += count - 1; + to += count - 1; + } + while (count-- > 0) { + if (from in O) O[to] = O[from]; + else delete O[to]; + to += inc; + from += inc; + } + return O; + }; + + /***/ + }, + /* 192 */ + /***/ function (module, exports) { + module.exports = function (done, value) { + return { value: value, done: !!done }; + }; + + /***/ + }, + /* 193 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var regexpExec = __webpack_require__(133); + __webpack_require__(0)( + { + target: 'RegExp', + proto: true, + forced: regexpExec !== /./.exec, + }, + { + exec: regexpExec, + }, + ); + + /***/ + }, + /* 194 */ + /***/ function (module, exports, __webpack_require__) { + // 21.2.5.3 get RegExp.prototype.flags() + if (__webpack_require__(8) && /./g.flags != 'g') + __webpack_require__(9).f(RegExp.prototype, 'flags', { + configurable: true, + get: __webpack_require__(76), + }); + + /***/ + }, + /* 195 */ + /***/ function (module, exports) { + module.exports = function (exec) { + try { + return { e: false, v: exec() }; + } catch (e) { + return { e: true, v: e }; + } + }; + + /***/ + }, + /* 196 */ + /***/ function (module, exports, __webpack_require__) { + var anObject = __webpack_require__(2); + var isObject = __webpack_require__(5); + var newPromiseCapability = __webpack_require__(137); + + module.exports = function (C, x) { + anObject(C); + if (isObject(x) && x.constructor === C) return x; + var promiseCapability = newPromiseCapability.f(C); + var resolve = promiseCapability.resolve; + resolve(x); + return promiseCapability.promise; + }; + + /***/ + }, + /* 197 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var strong = __webpack_require__(198); + var validate = __webpack_require__(59); + var MAP = 'Map'; + + // 23.1 Map Objects + module.exports = __webpack_require__(95)( + MAP, + function (get) { + return function Map() { + return get(this, arguments.length > 0 ? arguments[0] : undefined); + }; + }, + { + // 23.1.3.6 Map.prototype.get(key) + get: function get(key) { + var entry = strong.getEntry(validate(this, MAP), key); + return entry && entry.v; + }, + // 23.1.3.9 Map.prototype.set(key, value) + set: function set(key, value) { + return strong.def(validate(this, MAP), key === 0 ? 0 : key, value); + }, + }, + strong, + true, + ); + + /***/ + }, + /* 198 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var dP = __webpack_require__(9).f; + var create = __webpack_require__(53); + var redefineAll = __webpack_require__(58); + var ctx = __webpack_require__(24); + var anInstance = __webpack_require__(56); + var forOf = __webpack_require__(57); + var $iterDefine = __webpack_require__(123); + var step = __webpack_require__(192); + var setSpecies = __webpack_require__(55); + var DESCRIPTORS = __webpack_require__(8); + var fastKey = __webpack_require__(42).fastKey; + var validate = __webpack_require__(59); + var SIZE = DESCRIPTORS ? '_s' : 'size'; + + var getEntry = function (that, key) { + // fast case + var index = fastKey(key); + var entry; + if (index !== 'F') return that._i[index]; + // frozen object case + for (entry = that._f; entry; entry = entry.n) { + if (entry.k == key) return entry; + } + }; + + module.exports = { + getConstructor: function (wrapper, NAME, IS_MAP, ADDER) { + var C = wrapper(function (that, iterable) { + anInstance(that, C, NAME, '_i'); + that._t = NAME; // collection type + that._i = create(null); // index + that._f = undefined; // first entry + that._l = undefined; // last entry + that[SIZE] = 0; // size + if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that); + }); + redefineAll(C.prototype, { + // 23.1.3.1 Map.prototype.clear() + // 23.2.3.2 Set.prototype.clear() + clear: function clear() { + for (var that = validate(this, NAME), data = that._i, entry = that._f; entry; entry = entry.n) { + entry.r = true; + if (entry.p) entry.p = entry.p.n = undefined; + delete data[entry.i]; + } + that._f = that._l = undefined; + that[SIZE] = 0; + }, + // 23.1.3.3 Map.prototype.delete(key) + // 23.2.3.4 Set.prototype.delete(value) + delete: function (key) { + var that = validate(this, NAME); + var entry = getEntry(that, key); + if (entry) { + var next = entry.n; + var prev = entry.p; + delete that._i[entry.i]; + entry.r = true; + if (prev) prev.n = next; + if (next) next.p = prev; + if (that._f == entry) that._f = next; + if (that._l == entry) that._l = prev; + that[SIZE]--; + } + return !!entry; + }, + // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined) + // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined) + forEach: function forEach(callbackfn /* , that = undefined */) { + validate(this, NAME); + var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3); + var entry; + while ((entry = entry ? entry.n : this._f)) { + f(entry.v, entry.k, this); + // revert to the last existing entry + while (entry && entry.r) entry = entry.p; + } + }, + // 23.1.3.7 Map.prototype.has(key) + // 23.2.3.7 Set.prototype.has(value) + has: function has(key) { + return !!getEntry(validate(this, NAME), key); + }, + }); + if (DESCRIPTORS) + dP(C.prototype, 'size', { + get: function () { + return validate(this, NAME)[SIZE]; + }, + }); + return C; + }, + def: function (that, key, value) { + var entry = getEntry(that, key); + var prev, index; + // change existing entry + if (entry) { + entry.v = value; + // create new entry + } else { + that._l = entry = { + i: (index = fastKey(key, true)), // <- index + k: key, // <- key + v: value, // <- value + p: (prev = that._l), // <- previous entry + n: undefined, // <- next entry + r: false, // <- removed + }; + if (!that._f) that._f = entry; + if (prev) prev.n = entry; + that[SIZE]++; + // add to index + if (index !== 'F') that._i[index] = entry; + } + return that; + }, + getEntry: getEntry, + setStrong: function (C, NAME, IS_MAP) { + // add .keys, .values, .entries, [@@iterator] + // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11 + $iterDefine( + C, + NAME, + function (iterated, kind) { + this._t = validate(iterated, NAME); // target + this._k = kind; // kind + this._l = undefined; // previous + }, + function () { + var that = this; + var kind = that._k; + var entry = that._l; + // revert to the last existing entry + while (entry && entry.r) entry = entry.p; + // get next entry + if (!that._t || !(that._l = entry = entry ? entry.n : that._t._f)) { + // or finish the iteration + that._t = undefined; + return step(1); + } + // return step by kind + if (kind == 'keys') return step(0, entry.k); + if (kind == 'values') return step(0, entry.v); + return step(0, [entry.k, entry.v]); + }, + IS_MAP ? 'entries' : 'values', + !IS_MAP, + true, + ); + + // add [@@species], 23.1.2.2, 23.2.2.2 + setSpecies(NAME); + }, + }; + + /***/ + }, + /* 199 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var strong = __webpack_require__(198); + var validate = __webpack_require__(59); + var SET = 'Set'; + + // 23.2 Set Objects + module.exports = __webpack_require__(95)( + SET, + function (get) { + return function Set() { + return get(this, arguments.length > 0 ? arguments[0] : undefined); + }; + }, + { + // 23.2.3.1 Set.prototype.add(value) + add: function add(value) { + return strong.def(validate(this, SET), (value = value === 0 ? 0 : value), value); + }, + }, + strong, + ); + + /***/ + }, + /* 200 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var global = __webpack_require__(3); + var each = __webpack_require__(34)(0); + var redefine = __webpack_require__(16); + var meta = __webpack_require__(42); + var assign = __webpack_require__(179); + var weak = __webpack_require__(201); + var isObject = __webpack_require__(5); + var validate = __webpack_require__(59); + var NATIVE_WEAK_MAP = __webpack_require__(59); + var IS_IE11 = !global.ActiveXObject && 'ActiveXObject' in global; + var WEAK_MAP = 'WeakMap'; + var getWeak = meta.getWeak; + var isExtensible = Object.isExtensible; + var uncaughtFrozenStore = weak.ufstore; + var InternalMap; + + var wrapper = function (get) { + return function WeakMap() { + return get(this, arguments.length > 0 ? arguments[0] : undefined); + }; + }; + + var methods = { + // 23.3.3.3 WeakMap.prototype.get(key) + get: function get(key) { + if (isObject(key)) { + var data = getWeak(key); + if (data === true) return uncaughtFrozenStore(validate(this, WEAK_MAP)).get(key); + return data ? data[this._i] : undefined; + } + }, + // 23.3.3.5 WeakMap.prototype.set(key, value) + set: function set(key, value) { + return weak.def(validate(this, WEAK_MAP), key, value); + }, + }; + + // 23.3 WeakMap Objects + var $WeakMap = (module.exports = __webpack_require__(95)(WEAK_MAP, wrapper, methods, weak, true, true)); + + // IE11 WeakMap frozen keys fix + if (NATIVE_WEAK_MAP && IS_IE11) { + InternalMap = weak.getConstructor(wrapper, WEAK_MAP); + assign(InternalMap.prototype, methods); + meta.NEED = true; + each(['delete', 'has', 'get', 'set'], function (key) { + var proto = $WeakMap.prototype; + var method = proto[key]; + redefine(proto, key, function (a, b) { + // store frozen objects on internal weakmap shim + if (isObject(a) && !isExtensible(a)) { + if (!this._f) this._f = new InternalMap(); + var result = this._f[key](a, b); + return key == 'set' ? this : result; + // store all the rest on native weakmap + } + return method.call(this, a, b); + }); + }); + } + + /***/ + }, + /* 201 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var redefineAll = __webpack_require__(58); + var getWeak = __webpack_require__(42).getWeak; + var anObject = __webpack_require__(2); + var isObject = __webpack_require__(5); + var anInstance = __webpack_require__(56); + var forOf = __webpack_require__(57); + var createArrayMethod = __webpack_require__(34); + var $has = __webpack_require__(18); + var validate = __webpack_require__(59); + var arrayFind = createArrayMethod(5); + var arrayFindIndex = createArrayMethod(6); + var id = 0; + + // fallback for uncaught frozen keys + var uncaughtFrozenStore = function (that) { + return that._l || (that._l = new UncaughtFrozenStore()); + }; + var UncaughtFrozenStore = function () { + this.a = []; + }; + var findUncaughtFrozen = function (store, key) { + return arrayFind(store.a, function (it) { + return it[0] === key; + }); + }; + UncaughtFrozenStore.prototype = { + get: function (key) { + var entry = findUncaughtFrozen(this, key); + if (entry) return entry[1]; + }, + has: function (key) { + return !!findUncaughtFrozen(this, key); + }, + set: function (key, value) { + var entry = findUncaughtFrozen(this, key); + if (entry) entry[1] = value; + else this.a.push([key, value]); + }, + delete: function (key) { + var index = arrayFindIndex(this.a, function (it) { + return it[0] === key; + }); + if (~index) this.a.splice(index, 1); + return !!~index; + }, + }; + + module.exports = { + getConstructor: function (wrapper, NAME, IS_MAP, ADDER) { + var C = wrapper(function (that, iterable) { + anInstance(that, C, NAME, '_i'); + that._t = NAME; // collection type + that._i = id++; // collection id + that._l = undefined; // leak store for uncaught frozen objects + if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that); + }); + redefineAll(C.prototype, { + // 23.3.3.2 WeakMap.prototype.delete(key) + // 23.4.3.3 WeakSet.prototype.delete(value) + delete: function (key) { + if (!isObject(key)) return false; + var data = getWeak(key); + if (data === true) return uncaughtFrozenStore(validate(this, NAME))['delete'](key); + return data && $has(data, this._i) && delete data[this._i]; + }, + // 23.3.3.4 WeakMap.prototype.has(key) + // 23.4.3.4 WeakSet.prototype.has(value) + has: function has(key) { + if (!isObject(key)) return false; + var data = getWeak(key); + if (data === true) return uncaughtFrozenStore(validate(this, NAME)).has(key); + return data && $has(data, this._i); + }, + }); + return C; + }, + def: function (that, key, value) { + var data = getWeak(anObject(key), true); + if (data === true) uncaughtFrozenStore(that).set(key, value); + else data[that._i] = value; + return that; + }, + ufstore: uncaughtFrozenStore, + }; + + /***/ + }, + /* 202 */ + /***/ function (module, exports, __webpack_require__) { + // https://tc39.github.io/ecma262/#sec-toindex + var toInteger = __webpack_require__(26); + var toLength = __webpack_require__(7); + module.exports = function (it) { + if (it === undefined) return 0; + var number = toInteger(it); + var length = toLength(number); + if (number !== length) throw RangeError('Wrong length!'); + return length; + }; + + /***/ + }, + /* 203 */ + /***/ function (module, exports, __webpack_require__) { + // all object keys, includes non-enumerable and symbols + var gOPN = __webpack_require__(54); + var gOPS = __webpack_require__(87); + var anObject = __webpack_require__(2); + var Reflect = __webpack_require__(3).Reflect; + module.exports = + (Reflect && Reflect.ownKeys) || + function ownKeys(it) { + var keys = gOPN.f(anObject(it)); + var getSymbols = gOPS.f; + return getSymbols ? keys.concat(getSymbols(it)) : keys; + }; + + /***/ + }, + /* 204 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray + var isArray = __webpack_require__(88); + var isObject = __webpack_require__(5); + var toLength = __webpack_require__(7); + var ctx = __webpack_require__(24); + var IS_CONCAT_SPREADABLE = __webpack_require__(6)('isConcatSpreadable'); + + function flattenIntoArray(target, original, source, sourceLen, start, depth, mapper, thisArg) { + var targetIndex = start; + var sourceIndex = 0; + var mapFn = mapper ? ctx(mapper, thisArg, 3) : false; + var element, spreadable; + + while (sourceIndex < sourceLen) { + if (sourceIndex in source) { + element = mapFn ? mapFn(source[sourceIndex], sourceIndex, original) : source[sourceIndex]; + + spreadable = false; + if (isObject(element)) { + spreadable = element[IS_CONCAT_SPREADABLE]; + spreadable = spreadable !== undefined ? !!spreadable : isArray(element); + } + + if (spreadable && depth > 0) { + targetIndex = + flattenIntoArray( + target, + original, + element, + toLength(element.length), + targetIndex, + depth - 1, + ) - 1; + } else { + if (targetIndex >= 0x1fffffffffffff) throw TypeError(); + target[targetIndex] = element; + } + + targetIndex++; + } + sourceIndex++; + } + return targetIndex; + } + + module.exports = flattenIntoArray; + + /***/ + }, + /* 205 */ + /***/ function (module, exports, __webpack_require__) { + // https://github.com/tc39/proposal-string-pad-start-end + var toLength = __webpack_require__(7); + var repeat = __webpack_require__(120); + var defined = __webpack_require__(32); + + module.exports = function (that, maxLength, fillString, left) { + var S = String(defined(that)); + var stringLength = S.length; + var fillStr = fillString === undefined ? ' ' : String(fillString); + var intMaxLength = toLength(maxLength); + if (intMaxLength <= stringLength || fillStr == '') return S; + var fillLen = intMaxLength - stringLength; + var stringFiller = repeat.call(fillStr, Math.ceil(fillLen / fillStr.length)); + if (stringFiller.length > fillLen) stringFiller = stringFiller.slice(0, fillLen); + return left ? stringFiller + S : S + stringFiller; + }; + + /***/ + }, + /* 206 */ + /***/ function (module, exports, __webpack_require__) { + var DESCRIPTORS = __webpack_require__(8); + var getKeys = __webpack_require__(51); + var toIObject = __webpack_require__(19); + var isEnum = __webpack_require__(75).f; + module.exports = function (isEntries) { + return function (it) { + var O = toIObject(it); + var keys = getKeys(O); + var length = keys.length; + var i = 0; + var result = []; + var key; + while (length > i) { + key = keys[i++]; + if (!DESCRIPTORS || isEnum.call(O, key)) { + result.push(isEntries ? [key, O[key]] : O[key]); + } + } + return result; + }; + }; + + /***/ + }, + /* 207 */ + /***/ function (module, exports, __webpack_require__) { + // https://github.com/DavidBruant/Map-Set.prototype.toJSON + var classof = __webpack_require__(65); + var from = __webpack_require__(208); + module.exports = function (NAME) { + return function toJSON() { + if (classof(this) != NAME) throw TypeError(NAME + "#toJSON isn't generic"); + return from(this); + }; + }; + + /***/ + }, + /* 208 */ + /***/ function (module, exports, __webpack_require__) { + var forOf = __webpack_require__(57); + + module.exports = function (iter, ITERATOR) { + var result = []; + forOf(iter, false, result.push, result, ITERATOR); + return result; + }; + + /***/ + }, + /* 209 */ + /***/ function (module, exports) { + // https://rwaldron.github.io/proposal-math-extensions/ + module.exports = + Math.scale || + function scale(x, inLow, inHigh, outLow, outHigh) { + if ( + arguments.length === 0 || + // eslint-disable-next-line no-self-compare + x != x || + // eslint-disable-next-line no-self-compare + inLow != inLow || + // eslint-disable-next-line no-self-compare + inHigh != inHigh || + // eslint-disable-next-line no-self-compare + outLow != outLow || + // eslint-disable-next-line no-self-compare + outHigh != outHigh + ) + return NaN; + if (x === Infinity || x === -Infinity) return x; + return ((x - inLow) * (outHigh - outLow)) / (inHigh - inLow) + outLow; + }; + + /***/ + }, + /* 210 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var _interopRequireWildcard = __webpack_require__(471); + + var _interopRequireDefault = __webpack_require__(40); + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.default = void 0; + + var _assign = _interopRequireDefault(__webpack_require__(228)); + + var _stringify = _interopRequireDefault(__webpack_require__(105)); + + var _keys = _interopRequireDefault(__webpack_require__(159)); + + var _reactDom = _interopRequireDefault(__webpack_require__(229)); + + var ClientStartup = _interopRequireWildcard(__webpack_require__(516)); + + var _handleError2 = _interopRequireDefault(__webpack_require__(232)); + + var _ComponentRegistry = _interopRequireDefault(__webpack_require__(233)); + + var _StoreRegistry = _interopRequireDefault(__webpack_require__(534)); + + var _serverRenderReactComponent2 = _interopRequireDefault(__webpack_require__(535)); + + var _buildConsoleReplay2 = _interopRequireDefault(__webpack_require__(236)); + + var _createReactElement = _interopRequireDefault(__webpack_require__(160)); + + var _Authenticity = _interopRequireDefault(__webpack_require__(538)); + + var _context = _interopRequireDefault(__webpack_require__(539)); + + var ctx = (0, _context.default)(); + var DEFAULT_OPTIONS = { + traceTurbolinks: false, + }; + ctx.ReactOnRails = { + /** + * Main entry point to using the react-on-rails npm package. This is how Rails will be able to + * find you components for rendering. + * @param components (key is component name, value is component) + */ + register: function register(components) { + _ComponentRegistry.default.register(components); + }, + + /** + * Allows registration of store generators to be used by multiple react components on one Rails + * view. store generators are functions that take one arg, props, and return a store. Note that + * the setStore API is different in that it's the actual store hydrated with props. + * @param stores (keys are store names, values are the store generators) + */ + registerStore: function registerStore(stores) { + if (!stores) { + throw new Error( + 'Called ReactOnRails.registerStores with a null or undefined, rather than ' + + 'an Object with keys being the store names and the values are the store generators.', + ); + } + + _StoreRegistry.default.register(stores); + }, + + /** + * Allows retrieval of the store by name. This store will be hydrated by any Rails form props. + * Pass optional param throwIfMissing = false if you want to use this call to get back null if the + * store with name is not registered. + * @param name + * @param throwIfMissing Defaults to true. Set to false to have this call return undefined if + * there is no store with the given name. + * @returns Redux Store, possibly hydrated + */ + getStore: function getStore(name) { + var throwIfMissing = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + return _StoreRegistry.default.getStore(name, throwIfMissing); + }, + + /** + * Set options for ReactOnRails, typically before you call ReactOnRails.register + * Available Options: + * `traceTurbolinks: true|false Gives you debugging messages on Turbolinks events + */ + setOptions: function setOptions(newOptions) { + if ('traceTurbolinks' in newOptions) { + this.options.traceTurbolinks = newOptions.traceTurbolinks; // eslint-disable-next-line no-param-reassign + + delete newOptions.traceTurbolinks; + } + + if ((0, _keys.default)(newOptions).length > 0) { + throw new Error( + 'Invalid options passed to ReactOnRails.options: ', + (0, _stringify.default)(newOptions), + ); + } + }, + + /** + * Allow directly calling the page loaded script in case the default events that trigger react + * rendering are not sufficient, such as when loading JavaScript asynchronously with TurboLinks: + * More details can be found here: + * https://github.com/shakacode/react_on_rails/blob/master/docs/additional-reading/turbolinks.md + */ + reactOnRailsPageLoaded: function reactOnRailsPageLoaded() { + ClientStartup.reactOnRailsPageLoaded(); + }, + + /** + * Returns CSRF authenticity token inserted by Rails csrf_meta_tags + * @returns String or null + */ + authenticityToken: function authenticityToken() { + return _Authenticity.default.authenticityToken(); + }, + + /** + * Returns header with csrf authenticity token and XMLHttpRequest + * @param {*} other headers + * @returns {*} header + */ + authenticityHeaders: function authenticityHeaders() { + var otherHeaders = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + return _Authenticity.default.authenticityHeaders(otherHeaders); + }, + // ///////////////////////////////////////////////////////////////////////////// + // INTERNALLY USED APIs + // ///////////////////////////////////////////////////////////////////////////// + + /** + * Retrieve an option by key. + * @param key + * @returns option value + */ + option: function option(key) { + return this.options[key]; + }, + + /** + * Allows retrieval of the store generator by name. This is used internally by ReactOnRails after + * a rails form loads to prepare stores. + * @param name + * @returns Redux Store generator function + */ + getStoreGenerator: function getStoreGenerator(name) { + return _StoreRegistry.default.getStoreGenerator(name); + }, + + /** + * Allows saving the store populated by Rails form props. Used internally by ReactOnRails. + * @param name + * @returns Redux Store, possibly hydrated + */ + setStore: function setStore(name, store) { + return _StoreRegistry.default.setStore(name, store); + }, + + /** + * Clears hydratedStores to avoid accidental usage of wrong store hydrated in previous/parallel + * request. + */ + clearHydratedStores: function clearHydratedStores() { + _StoreRegistry.default.clearHydratedStores(); + }, + + /** + * ReactOnRails.render("HelloWorldApp", {name: "Stranger"}, 'app'); + * + * Does this: + * ReactDOM.render(React.createElement(HelloWorldApp, {name: "Stranger"}), + * document.getElementById('app')) + * + * @param name Name of your registered component + * @param props Props to pass to your component + * @param domNodeId + * @param hydrate Pass truthy to update server rendered html. Default is falsy + * @returns {virtualDomElement} Reference to your component's backing instance + */ + render: function render(name, props, domNodeId, hydrate) { + var componentObj = _ComponentRegistry.default.get(name); + + var reactElement = (0, _createReactElement.default)({ + componentObj: componentObj, + props: props, + domNodeId: domNodeId, + }); + var render = hydrate ? _reactDom.default.hydrate : _reactDom.default.render; // eslint-disable-next-line react/no-render-return-value + + return render(reactElement, document.getElementById(domNodeId)); + }, + + /** + * Get the component that you registered + * @param name + * @returns {name, component, generatorFunction, isRenderer} + */ + getComponent: function getComponent(name) { + return _ComponentRegistry.default.get(name); + }, + + /** + * Used by server rendering by Rails + * @param options + */ + serverRenderReactComponent: function serverRenderReactComponent(options) { + return (0, _serverRenderReactComponent2.default)(options); + }, + + /** + * Used by Rails to catch errors in rendering + * @param options + */ + handleError: function handleError(options) { + return (0, _handleError2.default)(options); + }, + + /** + * Used by Rails server rendering to replay console messages. + */ + buildConsoleReplay: function buildConsoleReplay() { + return (0, _buildConsoleReplay2.default)(); + }, + + /** + * Get an Object containing all registered components. Useful for debugging. + * @returns {*} + */ + registeredComponents: function registeredComponents() { + return _ComponentRegistry.default.components(); + }, + + /** + * Get an Object containing all registered store generators. Useful for debugging. + * @returns {*} + */ + storeGenerators: function storeGenerators() { + return _StoreRegistry.default.storeGenerators(); + }, + + /** + * Get an Object containing all hydrated stores. Useful for debugging. + * @returns {*} + */ + stores: function stores() { + return _StoreRegistry.default.stores(); + }, + resetOptions: function resetOptions() { + this.options = (0, _assign.default)({}, DEFAULT_OPTIONS); + }, + }; + ctx.ReactOnRails.resetOptions(); + ClientStartup.clientStartup(ctx); + var _default = ctx.ReactOnRails; + exports.default = _default; + + /***/ + }, + /* 211 */ + /***/ function (module, exports, __webpack_require__) { + var pIE = __webpack_require__(100); + var createDesc = __webpack_require__(78); + var toIObject = __webpack_require__(60); + var toPrimitive = __webpack_require__(142); + var has = __webpack_require__(44); + var IE8_DOM_DEFINE = __webpack_require__(212); + var gOPD = Object.getOwnPropertyDescriptor; + + exports.f = __webpack_require__(28) + ? gOPD + : function getOwnPropertyDescriptor(O, P) { + O = toIObject(O); + P = toPrimitive(P, true); + if (IE8_DOM_DEFINE) + try { + return gOPD(O, P); + } catch (e) { + /* empty */ + } + if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]); + }; + + /***/ + }, + /* 212 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = + !__webpack_require__(28) && + !__webpack_require__(61)(function () { + return ( + Object.defineProperty(__webpack_require__(213)('div'), 'a', { + get: function () { + return 7; + }, + }).a != 7 + ); + }); + + /***/ + }, + /* 213 */ + /***/ function (module, exports, __webpack_require__) { + var isObject = __webpack_require__(35); + var document = __webpack_require__(29).document; + // typeof document.createElement is 'object' in old IE + var is = isObject(document) && isObject(document.createElement); + module.exports = function (it) { + return is ? document.createElement(it) : {}; + }; + + /***/ + }, + /* 214 */ + /***/ function (module, exports, __webpack_require__) { + // most Object methods by ES6 should accept primitives + var $export = __webpack_require__(36); + var core = __webpack_require__(13); + var fails = __webpack_require__(61); + module.exports = function (KEY, exec) { + var fn = (core.Object || {})[KEY] || Object[KEY]; + var exp = {}; + exp[KEY] = exec(fn); + $export( + $export.S + + $export.F * + fails(function () { + fn(1); + }), + 'Object', + exp, + ); + }; + + /***/ + }, + /* 215 */ + /***/ function (module, exports) { + module.exports = function (it) { + if (typeof it != 'function') throw TypeError(it + ' is not a function!'); + return it; + }; + + /***/ + }, + /* 216 */ + /***/ function (module, exports, __webpack_require__) { + var has = __webpack_require__(44); + var toIObject = __webpack_require__(60); + var arrayIndexOf = __webpack_require__(484)(false); + var IE_PROTO = __webpack_require__(148)('IE_PROTO'); + + module.exports = function (object, names) { + var O = toIObject(object); + var i = 0; + var result = []; + var key; + for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key); + // Don't enum bug & hidden keys + while (names.length > i) + if (has(O, (key = names[i++]))) { + ~arrayIndexOf(result, key) || result.push(key); + } + return result; + }; + + /***/ + }, + /* 217 */ + /***/ function (module, exports) { + module.exports = function (done, value) { + return { value: value, done: !!done }; + }; + + /***/ + }, + /* 218 */ + /***/ function (module, exports, __webpack_require__) { + // 7.2.2 IsArray(argument) + var cof = __webpack_require__(140); + module.exports = + Array.isArray || + function isArray(arg) { + return cof(arg) == 'Array'; + }; + + /***/ + }, + /* 219 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) + var $keys = __webpack_require__(216); + var hiddenKeys = __webpack_require__(150).concat('length', 'prototype'); + + exports.f = + Object.getOwnPropertyNames || + function getOwnPropertyNames(O) { + return $keys(O, hiddenKeys); + }; + + /***/ + }, + /* 220 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // 19.1.2.1 Object.assign(target, source, ...) + var DESCRIPTORS = __webpack_require__(28); + var getKeys = __webpack_require__(80); + var gOPS = __webpack_require__(154); + var pIE = __webpack_require__(100); + var toObject = __webpack_require__(69); + var IObject = __webpack_require__(139); + var $assign = Object.assign; + + // should work with symbols and should have deterministic property order (V8 bug) + module.exports = + !$assign || + __webpack_require__(61)(function () { + var A = {}; + var B = {}; + // eslint-disable-next-line no-undef + var S = Symbol(); + var K = 'abcdefghijklmnopqrst'; + A[S] = 7; + K.split('').forEach(function (k) { + B[k] = k; + }); + return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K; + }) + ? function assign(target, source) { + // eslint-disable-line no-unused-vars + var T = toObject(target); + var aLen = arguments.length; + var index = 1; + var getSymbols = gOPS.f; + var isEnum = pIE.f; + while (aLen > index) { + var S = IObject(arguments[index++]); + var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S); + var length = keys.length; + var j = 0; + var key; + while (length > j) { + key = keys[j++]; + if (!DESCRIPTORS || isEnum.call(S, key)) T[key] = S[key]; + } + } + return T; + } + : $assign; + + /***/ + }, + /* 221 */ + /***/ function (module, exports, __webpack_require__) { + // call something on iterator step with safe closing on error + var anObject = __webpack_require__(62); + module.exports = function (iterator, fn, value, entries) { + try { + return entries ? fn(anObject(value)[0], value[1]) : fn(value); + // 7.4.6 IteratorClose(iterator, completion) + } catch (e) { + var ret = iterator['return']; + if (ret !== undefined) anObject(ret.call(iterator)); + throw e; + } + }; + + /***/ + }, + /* 222 */ + /***/ function (module, exports, __webpack_require__) { + // check on default Array iterator + var Iterators = __webpack_require__(79); + var ITERATOR = __webpack_require__(22)('iterator'); + var ArrayProto = Array.prototype; + + module.exports = function (it) { + return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it); + }; + + /***/ + }, + /* 223 */ + /***/ function (module, exports, __webpack_require__) { + var classof = __webpack_require__(224); + var ITERATOR = __webpack_require__(22)('iterator'); + var Iterators = __webpack_require__(79); + module.exports = __webpack_require__(13).getIteratorMethod = function (it) { + if (it != undefined) return it[ITERATOR] || it['@@iterator'] || Iterators[classof(it)]; + }; + + /***/ + }, + /* 224 */ + /***/ function (module, exports, __webpack_require__) { + // getting tag from 19.1.3.6 Object.prototype.toString() + var cof = __webpack_require__(140); + var TAG = __webpack_require__(22)('toStringTag'); + // ES3 wrong here + var ARG = + cof( + (function () { + return arguments; + })(), + ) == 'Arguments'; + + // fallback for IE11 Script Access Denied error + var tryGet = function (it, key) { + try { + return it[key]; + } catch (e) { + /* empty */ + } + }; + + module.exports = function (it) { + var O, T, B; + return it === undefined + ? 'Undefined' + : it === null + ? 'Null' + : // @@toStringTag case + typeof (T = tryGet((O = Object(it)), TAG)) == 'string' + ? T + : // builtinTag case + ARG + ? cof(O) + : // ES3 arguments fallback + (B = cof(O)) == 'Object' && typeof O.callee == 'function' + ? 'Arguments' + : B; + }; + + /***/ + }, + /* 225 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var global = __webpack_require__(29); + var $export = __webpack_require__(36); + var meta = __webpack_require__(81); + var fails = __webpack_require__(61); + var hide = __webpack_require__(45); + var redefineAll = __webpack_require__(157); + var forOf = __webpack_require__(82); + var anInstance = __webpack_require__(158); + var isObject = __webpack_require__(35); + var setToStringTag = __webpack_require__(104); + var dP = __webpack_require__(30).f; + var each = __webpack_require__(156)(0); + var DESCRIPTORS = __webpack_require__(28); + + module.exports = function (NAME, wrapper, methods, common, IS_MAP, IS_WEAK) { + var Base = global[NAME]; + var C = Base; + var ADDER = IS_MAP ? 'set' : 'add'; + var proto = C && C.prototype; + var O = {}; + if ( + !DESCRIPTORS || + typeof C != 'function' || + !( + IS_WEAK || + (proto.forEach && + !fails(function () { + new C().entries().next(); + })) + ) + ) { + // create collection constructor + C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER); + redefineAll(C.prototype, methods); + meta.NEED = true; + } else { + C = wrapper(function (target, iterable) { + anInstance(target, C, NAME, '_c'); + target._c = new Base(); + if (iterable != undefined) forOf(iterable, IS_MAP, target[ADDER], target); + }); + each('add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON'.split(','), function (KEY) { + var IS_ADDER = KEY == 'add' || KEY == 'set'; + if (KEY in proto && !(IS_WEAK && KEY == 'clear')) + hide(C.prototype, KEY, function (a, b) { + anInstance(this, C, KEY); + if (!IS_ADDER && IS_WEAK && !isObject(a)) return KEY == 'get' ? undefined : false; + var result = this._c[KEY](a === 0 ? 0 : a, b); + return IS_ADDER ? this : result; + }); + }); + IS_WEAK || + dP(C.prototype, 'size', { + get: function () { + return this._c.size; + }, + }); + } + + setToStringTag(C, NAME); + + O[NAME] = C; + $export($export.G + $export.W + $export.F, O); + + if (!IS_WEAK) common.setStrong(C, NAME, IS_MAP); + + return C; + }; + + /***/ + }, + /* 226 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // https://tc39.github.io/proposal-setmap-offrom/ + var $export = __webpack_require__(36); + + module.exports = function (COLLECTION) { + $export($export.S, COLLECTION, { + of: function of() { + var length = arguments.length; + var A = new Array(length); + while (length--) A[length] = arguments[length]; + return new this(A); + }, + }); + }; + + /***/ + }, + /* 227 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // https://tc39.github.io/proposal-setmap-offrom/ + var $export = __webpack_require__(36); + var aFunction = __webpack_require__(215); + var ctx = __webpack_require__(68); + var forOf = __webpack_require__(82); + + module.exports = function (COLLECTION) { + $export($export.S, COLLECTION, { + from: function from(source /* , mapFn, thisArg */) { + var mapFn = arguments[1]; + var mapping, A, n, cb; + aFunction(this); + mapping = mapFn !== undefined; + if (mapping) aFunction(mapFn); + if (source == undefined) return new this(); + A = []; + if (mapping) { + n = 0; + cb = ctx(mapFn, arguments[2], 2); + forOf(source, false, function (nextItem) { + A.push(cb(nextItem, n++)); + }); + } else { + forOf(source, false, A.push, A); + } + return new this(A); + }, + }); + }; + + /***/ + }, + /* 228 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = __webpack_require__(505); + + /***/ + }, + /* 229 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + function checkDCE() { + /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */ + if ( + typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined' || + typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== 'function' + ) { + return; + } + if (true) { + // This branch is unreachable because this function is only called + // in production, but the condition is true only in development. + // Therefore if the branch is still here, dead code elimination wasn't + // properly applied. + // Don't change the message. React DevTools relies on it. Also make sure + // this message doesn't occur elsewhere in this function, or it will cause + // a false positive. + throw new Error('^_^'); + } + try { + // Verify that the code above has been dead code eliminated (DCE'd). + __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE); + } catch (err) { + // DevTools shouldn't crash React, no matter what. + // We should still report in case we break this code. + console.error(err); + } + } + + if (false) { + // DCE check should happen before ReactDOM bundle executes so that + // DevTools can report bad minification during injection. + checkDCE(); + module.exports = require('./cjs/react-dom.production.min.js'); + } else { + module.exports = __webpack_require__(510); + } + + /***/ + }, + /* 230 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + + var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; + + module.exports = ReactPropTypesSecret; + + /***/ + }, + /* 231 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.default = isResultNonReactComponent; + + function isResultNonReactComponent(reactElementOrRouterResult) { + return !!( + reactElementOrRouterResult.renderedHtml || + reactElementOrRouterResult.redirectLocation || + reactElementOrRouterResult.error + ); + } + + /***/ + }, + /* 232 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var _interopRequireDefault = __webpack_require__(40); + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.default = void 0; + + var _react = _interopRequireDefault(__webpack_require__(1)); + + var _server = _interopRequireDefault(__webpack_require__(107)); + + function handleGeneratorFunctionIssue(options) { + var e = options.e, + name = options.name; + var msg = ''; + + if (name) { + var lastLine = + 'A generator function takes a single arg of props (and the location for react-router) ' + + 'and returns a ReactElement.'; + var shouldBeGeneratorError = + "ERROR: ReactOnRails is incorrectly detecting generator function to be false. The React\ncomponent '" + .concat(name, "' seems to be a generator function.\n") + .concat(lastLine); + var reMatchShouldBeGeneratorError = /Can't add property context, object is not extensible/; + + if (reMatchShouldBeGeneratorError.test(e.message)) { + msg += ''.concat(shouldBeGeneratorError, '\n\n'); + console.error(shouldBeGeneratorError); + } + + shouldBeGeneratorError = + "ERROR: ReactOnRails is incorrectly detecting generatorFunction to be true, but the React\ncomponent '" + .concat(name, "' is not a generator function.\n") + .concat(lastLine); + var reMatchShouldNotBeGeneratorError = /Cannot call a class as a function/; + + if (reMatchShouldNotBeGeneratorError.test(e.message)) { + msg += ''.concat(shouldBeGeneratorError, '\n\n'); + console.error(shouldBeGeneratorError); + } + } + + return msg; + } + + var handleError = function handleError(options) { + var e = options.e, + jsCode = options.jsCode, + serverSide = options.serverSide; + console.error('Exception in rendering!'); + var msg = handleGeneratorFunctionIssue(options); + + if (jsCode) { + console.error('JS code was: '.concat(jsCode)); + } + + if (e.fileName) { + console.error('location: '.concat(e.fileName, ':').concat(e.lineNumber)); + } + + console.error('message: '.concat(e.message)); + console.error('stack: '.concat(e.stack)); + + if (serverSide) { + msg += 'Exception in rendering!\n' + .concat( + e.fileName ? '\nlocation: '.concat(e.fileName, ':').concat(e.lineNumber) : '', + '\nMessage: ', + ) + .concat(e.message, '\n\n') + .concat(e.stack); + + var reactElement = _react.default.createElement('pre', null, msg); + + return _server.default.renderToString(reactElement); + } + + return undefined; + }; + + var _default = handleError; + exports.default = _default; + + /***/ + }, + /* 233 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var _interopRequireDefault = __webpack_require__(40); + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.default = void 0; + + var _from = _interopRequireDefault(__webpack_require__(234)); + + var _keys = _interopRequireDefault(__webpack_require__(159)); + + var _map = _interopRequireDefault(__webpack_require__(235)); + + var _generatorFunction = _interopRequireDefault(__webpack_require__(533)); + + // key = name used by react_on_rails + // value = { name, component, generatorFunction: boolean, isRenderer: boolean } + var registeredComponents = new _map.default(); + var _default = { + /** + * @param components { component1: component1, component2: component2, etc. } + */ + register: function register(components) { + (0, _keys.default)(components).forEach(function (name) { + if (registeredComponents.has(name)) { + console.warn('Called register for component that is already registered', name); + } + + var component = components[name]; + + if (!component) { + throw new Error('Called register with null component named '.concat(name)); + } + + var isGeneratorFunction = (0, _generatorFunction.default)(component); + var isRenderer = isGeneratorFunction && component.length === 3; + registeredComponents.set(name, { + name: name, + component: component, + generatorFunction: isGeneratorFunction, + isRenderer: isRenderer, + }); + }); + }, + + /** + * @param name + * @returns { name, component, generatorFunction } + */ + get: function get(name) { + if (registeredComponents.has(name)) { + return registeredComponents.get(name); + } + + var keys = (0, _from.default)(registeredComponents.keys()).join(', '); + throw new Error( + 'Could not find component registered with name ' + .concat(name, '. Registered component names include [ ') + .concat(keys, ' ]. Maybe you forgot to register the component?'), + ); + }, + + /** + * Get a Map containing all registered components. Useful for debugging. + * @returns Map where key is the component name and values are the + * { name, component, generatorFunction} + */ + components: function components() { + return registeredComponents; + }, + }; + exports.default = _default; + + /***/ + }, + /* 234 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = __webpack_require__(520); + + /***/ + }, + /* 235 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = __webpack_require__(524); + + /***/ + }, + /* 236 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var _interopRequireDefault = __webpack_require__(40); + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.consoleReplay = consoleReplay; + exports.default = buildConsoleReplay; + + var _stringify = _interopRequireDefault(__webpack_require__(105)); + + var _RenderUtils = _interopRequireDefault(__webpack_require__(536)); + + var _scriptSanitizedVal = _interopRequireDefault(__webpack_require__(537)); + + function consoleReplay() { + // console.history is a global polyfill used in server rendering. + // $FlowFixMe + if (!(console.history instanceof Array)) { + return ''; + } + + var lines = console.history.map(function (msg) { + var stringifiedList = msg.arguments.map(function (arg) { + var val; + + try { + val = typeof arg === 'string' || arg instanceof String ? arg : (0, _stringify.default)(arg); + } catch (e) { + val = ''.concat(e.message, ': ').concat(arg); + } + + return (0, _scriptSanitizedVal.default)(val); + }); + return 'console.' + .concat(msg.level, '.apply(console, ') + .concat((0, _stringify.default)(stringifiedList), ');'); + }); + return lines.join('\n'); + } + + function buildConsoleReplay() { + return _RenderUtils.default.wrapInScriptTags('consoleReplayLog', consoleReplay()); + } + + /***/ + }, + /* 237 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(10); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash__ = __webpack_require__(543); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_2_lodash__, + ); + + function renderContextRows(railsContext) { + // eslint-disable-next-line no-console + console.log('railsContext.serverSide is ', railsContext.serverSide); + return __WEBPACK_IMPORTED_MODULE_2_lodash___default.a.transform( + railsContext, + function (accum, value, key) { + if (key !== 'serverSide') { + var className = 'js-' + key; + accum.push( + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'tr', + { key: className }, + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'td', + null, + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('strong', null, key, ':\xA0'), + ), + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'td', + { className: className }, + '' + value, + ), + ), + ); + } + }, + [], + ); + } + + var RailsContext = function RailsContext(props) { + return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'table', + null, + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'thead', + null, + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'tr', + null, + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'th', + null, + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('i', null, 'key'), + ), + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'th', + null, + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('i', null, 'value'), + ), + ), + ), + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'tbody', + null, + renderContextRows(props.railsContext), + ), + ); + }; + + RailsContext.propTypes = { + railsContext: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object.isRequired, + }; + + var _default = RailsContext; + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + renderContextRows, + 'renderContextRows', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/RailsContext.jsx', + ); + + __REACT_HOT_LOADER__.register( + RailsContext, + 'RailsContext', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/RailsContext.jsx', + ); + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/RailsContext.jsx', + ); + })(); + + /***/ + }, + /* 238 */ + /***/ function (module, exports) { + module.exports = function (module) { + if (!module.webpackPolyfill) { + module.deprecate = function () {}; + module.paths = []; + // module.parent = undefined by default + if (!module.children) module.children = []; + Object.defineProperty(module, 'loaded', { + enumerable: true, + get: function () { + return module.l; + }, + }); + Object.defineProperty(module, 'id', { + enumerable: true, + get: function () { + return module.i; + }, + }); + module.webpackPolyfill = 1; + } + return module; + }; + + /***/ + }, + /* 239 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'a', function () { + return ActionTypes; + }); + /* harmony export (immutable) */ __webpack_exports__['b'] = createStore; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_isPlainObject__ = + __webpack_require__(240); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_symbol_observable__ = __webpack_require__(563); + + /** + * These are private action types reserved by Redux. + * For any unknown actions, you must return the current state. + * If the current state is undefined, you must return the initial state. + * Do not reference these action types directly in your code. + */ + var ActionTypes = { + INIT: '@@redux/INIT', + + /** + * Creates a Redux store that holds the state tree. + * The only way to change the data in the store is to call `dispatch()` on it. + * + * There should only be a single store in your app. To specify how different + * parts of the state tree respond to actions, you may combine several reducers + * into a single reducer function by using `combineReducers`. + * + * @param {Function} reducer A function that returns the next state tree, given + * the current state tree and the action to handle. + * + * @param {any} [preloadedState] The initial state. You may optionally specify it + * to hydrate the state from the server in universal apps, or to restore a + * previously serialized user session. + * If you use `combineReducers` to produce the root reducer function, this must be + * an object with the same shape as `combineReducers` keys. + * + * @param {Function} [enhancer] The store enhancer. You may optionally specify it + * to enhance the store with third-party capabilities such as middleware, + * time travel, persistence, etc. The only store enhancer that ships with Redux + * is `applyMiddleware()`. + * + * @returns {Store} A Redux store that lets you read the state, dispatch actions + * and subscribe to changes. + */ + }; + function createStore(reducer, preloadedState, enhancer) { + var _ref2; + + if (typeof preloadedState === 'function' && typeof enhancer === 'undefined') { + enhancer = preloadedState; + preloadedState = undefined; + } + + if (typeof enhancer !== 'undefined') { + if (typeof enhancer !== 'function') { + throw new Error('Expected the enhancer to be a function.'); + } + + return enhancer(createStore)(reducer, preloadedState); + } + + if (typeof reducer !== 'function') { + throw new Error('Expected the reducer to be a function.'); + } + + var currentReducer = reducer; + var currentState = preloadedState; + var currentListeners = []; + var nextListeners = currentListeners; + var isDispatching = false; + + function ensureCanMutateNextListeners() { + if (nextListeners === currentListeners) { + nextListeners = currentListeners.slice(); + } + } + + /** + * Reads the state tree managed by the store. + * + * @returns {any} The current state tree of your application. + */ + function getState() { + return currentState; + } + + /** + * Adds a change listener. It will be called any time an action is dispatched, + * and some part of the state tree may potentially have changed. You may then + * call `getState()` to read the current state tree inside the callback. + * + * You may call `dispatch()` from a change listener, with the following + * caveats: + * + * 1. The subscriptions are snapshotted just before every `dispatch()` call. + * If you subscribe or unsubscribe while the listeners are being invoked, this + * will not have any effect on the `dispatch()` that is currently in progress. + * However, the next `dispatch()` call, whether nested or not, will use a more + * recent snapshot of the subscription list. + * + * 2. The listener should not expect to see all state changes, as the state + * might have been updated multiple times during a nested `dispatch()` before + * the listener is called. It is, however, guaranteed that all subscribers + * registered before the `dispatch()` started will be called with the latest + * state by the time it exits. + * + * @param {Function} listener A callback to be invoked on every dispatch. + * @returns {Function} A function to remove this change listener. + */ + function subscribe(listener) { + if (typeof listener !== 'function') { + throw new Error('Expected listener to be a function.'); + } + + var isSubscribed = true; + + ensureCanMutateNextListeners(); + nextListeners.push(listener); + + return function unsubscribe() { + if (!isSubscribed) { + return; + } + + isSubscribed = false; + + ensureCanMutateNextListeners(); + var index = nextListeners.indexOf(listener); + nextListeners.splice(index, 1); + }; + } + + /** + * Dispatches an action. It is the only way to trigger a state change. + * + * The `reducer` function, used to create the store, will be called with the + * current state tree and the given `action`. Its return value will + * be considered the **next** state of the tree, and the change listeners + * will be notified. + * + * The base implementation only supports plain object actions. If you want to + * dispatch a Promise, an Observable, a thunk, or something else, you need to + * wrap your store creating function into the corresponding middleware. For + * example, see the documentation for the `redux-thunk` package. Even the + * middleware will eventually dispatch plain object actions using this method. + * + * @param {Object} action A plain object representing “what changed”. It is + * a good idea to keep actions serializable so you can record and replay user + * sessions, or use the time travelling `redux-devtools`. An action must have + * a `type` property which may not be `undefined`. It is a good idea to use + * string constants for action types. + * + * @returns {Object} For convenience, the same action object you dispatched. + * + * Note that, if you use a custom middleware, it may wrap `dispatch()` to + * return something else (for example, a Promise you can await). + */ + function dispatch(action) { + if (!Object(__WEBPACK_IMPORTED_MODULE_0_lodash_es_isPlainObject__['a' /* default */])(action)) { + throw new Error('Actions must be plain objects. ' + 'Use custom middleware for async actions.'); + } + + if (typeof action.type === 'undefined') { + throw new Error( + 'Actions may not have an undefined "type" property. ' + 'Have you misspelled a constant?', + ); + } + + if (isDispatching) { + throw new Error('Reducers may not dispatch actions.'); + } + + try { + isDispatching = true; + currentState = currentReducer(currentState, action); + } finally { + isDispatching = false; + } + + var listeners = (currentListeners = nextListeners); + for (var i = 0; i < listeners.length; i++) { + var listener = listeners[i]; + listener(); + } + + return action; + } + + /** + * Replaces the reducer currently used by the store to calculate the state. + * + * You might need this if your app implements code splitting and you want to + * load some of the reducers dynamically. You might also need this if you + * implement a hot reloading mechanism for Redux. + * + * @param {Function} nextReducer The reducer for the store to use instead. + * @returns {void} + */ + function replaceReducer(nextReducer) { + if (typeof nextReducer !== 'function') { + throw new Error('Expected the nextReducer to be a function.'); + } + + currentReducer = nextReducer; + dispatch({ type: ActionTypes.INIT }); + } + + /** + * Interoperability point for observable/reactive libraries. + * @returns {observable} A minimal observable of state changes. + * For more information, see the observable proposal: + * https://github.com/tc39/proposal-observable + */ + function observable() { + var _ref; + + var outerSubscribe = subscribe; + return ( + (_ref = { + /** + * The minimal observable subscription method. + * @param {Object} observer Any object that can be used as an observer. + * The observer object should have a `next` method. + * @returns {subscription} An object with an `unsubscribe` method that can + * be used to unsubscribe the observable from the store, and prevent further + * emission of values from the observable. + */ + subscribe: function subscribe(observer) { + if (typeof observer !== 'object') { + throw new TypeError('Expected the observer to be an object.'); + } + + function observeState() { + if (observer.next) { + observer.next(getState()); + } + } + + observeState(); + var unsubscribe = outerSubscribe(observeState); + return { unsubscribe: unsubscribe }; + }, + }), + (_ref[__WEBPACK_IMPORTED_MODULE_1_symbol_observable__['a' /* default */]] = function () { + return this; + }), + _ref + ); + } + + // When a store is created, an "INIT" action is dispatched so that every + // reducer returns their initial state. This effectively populates + // the initial state tree. + dispatch({ type: ActionTypes.INIT }); + + return ( + (_ref2 = { + dispatch: dispatch, + subscribe: subscribe, + getState: getState, + replaceReducer: replaceReducer, + }), + (_ref2[__WEBPACK_IMPORTED_MODULE_1_symbol_observable__['a' /* default */]] = observable), + _ref2 + ); + } + + /***/ + }, + /* 240 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__ = __webpack_require__(555); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getPrototype_js__ = __webpack_require__(560); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isObjectLike_js__ = __webpack_require__(562); + + /** `Object#toString` result references. */ + var objectTag = '[object Object]'; + + /** Used for built-in method references. */ + var funcProto = Function.prototype, + objectProto = Object.prototype; + + /** Used to resolve the decompiled source of functions. */ + var funcToString = funcProto.toString; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** Used to infer the `Object` constructor. */ + var objectCtorString = funcToString.call(Object); + + /** + * Checks if `value` is a plain object, that is, an object created by the + * `Object` constructor or one with a `[[Prototype]]` of `null`. + * + * @static + * @memberOf _ + * @since 0.8.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * _.isPlainObject(new Foo); + * // => false + * + * _.isPlainObject([1, 2, 3]); + * // => false + * + * _.isPlainObject({ 'x': 0, 'y': 0 }); + * // => true + * + * _.isPlainObject(Object.create(null)); + * // => true + */ + function isPlainObject(value) { + if ( + !Object(__WEBPACK_IMPORTED_MODULE_2__isObjectLike_js__['a' /* default */])(value) || + Object(__WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__['a' /* default */])(value) != objectTag + ) { + return false; + } + var proto = Object(__WEBPACK_IMPORTED_MODULE_1__getPrototype_js__['a' /* default */])(value); + if (proto === null) { + return true; + } + var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; + return ( + typeof Ctor == 'function' && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString + ); + } + + /* harmony default export */ __webpack_exports__['a'] = isPlainObject; + + /***/ + }, + /* 241 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__root_js__ = __webpack_require__(556); + + /** Built-in value references. */ + var Symbol = __WEBPACK_IMPORTED_MODULE_0__root_js__['a' /* default */].Symbol; + + /* harmony default export */ __webpack_exports__['a'] = Symbol; + + /***/ + }, + /* 242 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = warning; + /** + * Prints a warning in the console if it exists. + * + * @param {String} message The warning message. + * @returns {void} + */ + function warning(message) { + /* eslint-disable no-console */ + if (typeof console !== 'undefined' && typeof console.error === 'function') { + console.error(message); + } + /* eslint-enable no-console */ + try { + // This error was thrown as a convenience so that if you enable + // "break on all exceptions" in your console, + // it would pause the execution at this line. + throw new Error(message); + /* eslint-disable no-empty */ + } catch (e) {} + /* eslint-enable no-empty */ + } + + /***/ + }, + /* 243 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = compose; + /** + * Composes single-argument functions from right to left. The rightmost + * function can take multiple arguments as it provides the signature for + * the resulting composite function. + * + * @param {...Function} funcs The functions to compose. + * @returns {Function} A function obtained by composing the argument functions + * from right to left. For example, compose(f, g, h) is identical to doing + * (...args) => f(g(h(...args))). + */ + + function compose() { + for (var _len = arguments.length, funcs = Array(_len), _key = 0; _key < _len; _key++) { + funcs[_key] = arguments[_key]; + } + + if (funcs.length === 0) { + return function (arg) { + return arg; + }; + } + + if (funcs.length === 1) { + return funcs[0]; + } + + return funcs.reduce(function (a, b) { + return function () { + return a(b.apply(undefined, arguments)); + }; + }); + } + + /***/ + }, + /* 244 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = _inheritsLoose; + function _inheritsLoose(subClass, superClass) { + subClass.prototype = Object.create(superClass.prototype); + subClass.prototype.constructor = subClass; + subClass.__proto__ = superClass; + } + + /***/ + }, + /* 245 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'b', function () { + return subscriptionShape; + }); + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'a', function () { + return storeShape; + }); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(10); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + + var subscriptionShape = __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.shape({ + trySubscribe: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired, + tryUnsubscribe: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired, + notifyNestedSubs: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired, + isSubscribed: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired, + }); + var storeShape = __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.shape({ + subscribe: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired, + dispatch: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired, + getState: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired, + }); + + /***/ + }, + /* 246 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = connectAdvanced; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_inheritsLoose__ = + __webpack_require__(244); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_esm_assertThisInitialized__ = + __webpack_require__(570); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__babel_runtime_helpers_esm_extends__ = + __webpack_require__(164); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__babel_runtime_helpers_esm_objectWithoutPropertiesLoose__ = + __webpack_require__(165); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_hoist_non_react_statics__ = + __webpack_require__(571); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_hoist_non_react_statics___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_hoist_non_react_statics__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_invariant__ = __webpack_require__(14); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_invariant___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_5_invariant__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_6_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react_is__ = __webpack_require__(108); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react_is___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_7_react_is__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__utils_Subscription__ = __webpack_require__(572); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__utils_PropTypes__ = __webpack_require__(245); + + var prefixUnsafeLifecycleMethods = + typeof __WEBPACK_IMPORTED_MODULE_6_react___default.a.forwardRef !== 'undefined'; + var hotReloadingVersion = 0; + var dummyState = {}; + + function noop() {} + + function makeSelectorStateful(sourceSelector, store) { + // wrap the selector in an object that tracks its results between runs. + var selector = { + run: function runComponentSelector(props) { + try { + var nextProps = sourceSelector(store.getState(), props); + + if (nextProps !== selector.props || selector.error) { + selector.shouldComponentUpdate = true; + selector.props = nextProps; + selector.error = null; + } + } catch (error) { + selector.shouldComponentUpdate = true; + selector.error = error; + } + }, + }; + return selector; + } + + function connectAdvanced( + /* + selectorFactory is a func that is responsible for returning the selector function used to + compute new props from state, props, and dispatch. For example: + export default connectAdvanced((dispatch, options) => (state, props) => ({ + thing: state.things[props.thingId], + saveThing: fields => dispatch(actionCreators.saveThing(props.thingId, fields)), + }))(YourComponent) + Access to dispatch is provided to the factory so selectorFactories can bind actionCreators + outside of their selector as an optimization. Options passed to connectAdvanced are passed to + the selectorFactory, along with displayName and WrappedComponent, as the second argument. + Note that selectorFactory is responsible for all caching/memoization of inbound and outbound + props. Do not use connectAdvanced directly without memoizing results between calls to your + selector, otherwise the Connect component will re-render on every state or props change. +*/ + selectorFactory, // options object: + _ref, + ) { + var _contextTypes, _childContextTypes; + + if (_ref === void 0) { + _ref = {}; + } + + var _ref2 = _ref, + _ref2$getDisplayName = _ref2.getDisplayName, + getDisplayName = + _ref2$getDisplayName === void 0 + ? function (name) { + return 'ConnectAdvanced(' + name + ')'; + } + : _ref2$getDisplayName, + _ref2$methodName = _ref2.methodName, + methodName = _ref2$methodName === void 0 ? 'connectAdvanced' : _ref2$methodName, + _ref2$renderCountProp = _ref2.renderCountProp, + renderCountProp = _ref2$renderCountProp === void 0 ? undefined : _ref2$renderCountProp, + _ref2$shouldHandleSta = _ref2.shouldHandleStateChanges, + shouldHandleStateChanges = _ref2$shouldHandleSta === void 0 ? true : _ref2$shouldHandleSta, + _ref2$storeKey = _ref2.storeKey, + storeKey = _ref2$storeKey === void 0 ? 'store' : _ref2$storeKey, + _ref2$withRef = _ref2.withRef, + withRef = _ref2$withRef === void 0 ? false : _ref2$withRef, + connectOptions = Object( + __WEBPACK_IMPORTED_MODULE_3__babel_runtime_helpers_esm_objectWithoutPropertiesLoose__[ + 'a' /* default */ + ], + )(_ref2, [ + 'getDisplayName', + 'methodName', + 'renderCountProp', + 'shouldHandleStateChanges', + 'storeKey', + 'withRef', + ]); + + var subscriptionKey = storeKey + 'Subscription'; + var version = hotReloadingVersion++; + var contextTypes = + ((_contextTypes = {}), + (_contextTypes[storeKey] = __WEBPACK_IMPORTED_MODULE_9__utils_PropTypes__['a' /* storeShape */]), + (_contextTypes[subscriptionKey] = + __WEBPACK_IMPORTED_MODULE_9__utils_PropTypes__['b' /* subscriptionShape */]), + _contextTypes); + var childContextTypes = + ((_childContextTypes = {}), + (_childContextTypes[subscriptionKey] = + __WEBPACK_IMPORTED_MODULE_9__utils_PropTypes__['b' /* subscriptionShape */]), + _childContextTypes); + return function wrapWithConnect(WrappedComponent) { + __WEBPACK_IMPORTED_MODULE_5_invariant___default()( + Object(__WEBPACK_IMPORTED_MODULE_7_react_is__['isValidElementType'])(WrappedComponent), + 'You must pass a component to the function returned by ' + + (methodName + '. Instead received ' + JSON.stringify(WrappedComponent)), + ); + var wrappedComponentName = WrappedComponent.displayName || WrappedComponent.name || 'Component'; + var displayName = getDisplayName(wrappedComponentName); + + var selectorFactoryOptions = Object( + __WEBPACK_IMPORTED_MODULE_2__babel_runtime_helpers_esm_extends__['a' /* default */], + )({}, connectOptions, { + getDisplayName: getDisplayName, + methodName: methodName, + renderCountProp: renderCountProp, + shouldHandleStateChanges: shouldHandleStateChanges, + storeKey: storeKey, + withRef: withRef, + displayName: displayName, + wrappedComponentName: wrappedComponentName, + WrappedComponent: WrappedComponent, // TODO Actually fix our use of componentWillReceiveProps + + /* eslint-disable react/no-deprecated */ + }); + + var Connect = + /*#__PURE__*/ + (function (_Component) { + Object( + __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_inheritsLoose__['a' /* default */], + )(Connect, _Component); + + function Connect(props, context) { + var _this; + + _this = _Component.call(this, props, context) || this; + _this.version = version; + _this.state = {}; + _this.renderCount = 0; + _this.store = props[storeKey] || context[storeKey]; + _this.propsMode = Boolean(props[storeKey]); + _this.setWrappedInstance = _this.setWrappedInstance.bind( + Object( + __WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_esm_assertThisInitialized__[ + 'a' /* default */ + ], + )( + Object( + __WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_esm_assertThisInitialized__[ + 'a' /* default */ + ], + )(_this), + ), + ); + __WEBPACK_IMPORTED_MODULE_5_invariant___default()( + _this.store, + 'Could not find "' + + storeKey + + '" in either the context or props of ' + + ('"' + displayName + '". Either wrap the root component in a <Provider>, ') + + ('or explicitly pass "' + storeKey + '" as a prop to "' + displayName + '".'), + ); + + _this.initSelector(); + + _this.initSubscription(); + + return _this; + } + + var _proto = Connect.prototype; + + _proto.getChildContext = function getChildContext() { + var _ref3; + + // If this component received store from props, its subscription should be transparent + // to any descendants receiving store+subscription from context; it passes along + // subscription passed to it. Otherwise, it shadows the parent subscription, which allows + // Connect to control ordering of notifications to flow top-down. + var subscription = this.propsMode ? null : this.subscription; + return ( + (_ref3 = {}), + (_ref3[subscriptionKey] = subscription || this.context[subscriptionKey]), + _ref3 + ); + }; + + _proto.componentDidMount = function componentDidMount() { + if (!shouldHandleStateChanges) return; // componentWillMount fires during server side rendering, but componentDidMount and + // componentWillUnmount do not. Because of this, trySubscribe happens during ...didMount. + // Otherwise, unsubscription would never take place during SSR, causing a memory leak. + // To handle the case where a child component may have triggered a state change by + // dispatching an action in its componentWillMount, we have to re-run the select and maybe + // re-render. + + this.subscription.trySubscribe(); + this.selector.run(this.props); + if (this.selector.shouldComponentUpdate) this.forceUpdate(); + }; // Note: this is renamed below to the UNSAFE_ version in React >=16.3.0 + + _proto.componentWillReceiveProps = function componentWillReceiveProps(nextProps) { + this.selector.run(nextProps); + }; + + _proto.shouldComponentUpdate = function shouldComponentUpdate() { + return this.selector.shouldComponentUpdate; + }; + + _proto.componentWillUnmount = function componentWillUnmount() { + if (this.subscription) this.subscription.tryUnsubscribe(); + this.subscription = null; + this.notifyNestedSubs = noop; + this.store = null; + this.selector.run = noop; + this.selector.shouldComponentUpdate = false; + }; + + _proto.getWrappedInstance = function getWrappedInstance() { + __WEBPACK_IMPORTED_MODULE_5_invariant___default()( + withRef, + 'To access the wrapped instance, you need to specify ' + + ('{ withRef: true } in the options argument of the ' + methodName + '() call.'), + ); + return this.wrappedInstance; + }; + + _proto.setWrappedInstance = function setWrappedInstance(ref) { + this.wrappedInstance = ref; + }; + + _proto.initSelector = function initSelector() { + var sourceSelector = selectorFactory(this.store.dispatch, selectorFactoryOptions); + this.selector = makeSelectorStateful(sourceSelector, this.store); + this.selector.run(this.props); + }; + + _proto.initSubscription = function initSubscription() { + if (!shouldHandleStateChanges) return; // parentSub's source should match where store came from: props vs. context. A component + // connected to the store via props shouldn't use subscription from context, or vice versa. + + var parentSub = (this.propsMode ? this.props : this.context)[subscriptionKey]; + this.subscription = new __WEBPACK_IMPORTED_MODULE_8__utils_Subscription__['a' /* default */]( + this.store, + parentSub, + this.onStateChange.bind(this), + ); // `notifyNestedSubs` is duplicated to handle the case where the component is unmounted in + // the middle of the notification loop, where `this.subscription` will then be null. An + // extra null check every change can be avoided by copying the method onto `this` and then + // replacing it with a no-op on unmount. This can probably be avoided if Subscription's + // listeners logic is changed to not call listeners that have been unsubscribed in the + // middle of the notification loop. + + this.notifyNestedSubs = this.subscription.notifyNestedSubs.bind(this.subscription); + }; + + _proto.onStateChange = function onStateChange() { + this.selector.run(this.props); + + if (!this.selector.shouldComponentUpdate) { + this.notifyNestedSubs(); + } else { + this.componentDidUpdate = this.notifyNestedSubsOnComponentDidUpdate; + this.setState(dummyState); + } + }; + + _proto.notifyNestedSubsOnComponentDidUpdate = function notifyNestedSubsOnComponentDidUpdate() { + // `componentDidUpdate` is conditionally implemented when `onStateChange` determines it + // needs to notify nested subs. Once called, it unimplements itself until further state + // changes occur. Doing it this way vs having a permanent `componentDidUpdate` that does + // a boolean check every time avoids an extra method call most of the time, resulting + // in some perf boost. + this.componentDidUpdate = undefined; + this.notifyNestedSubs(); + }; + + _proto.isSubscribed = function isSubscribed() { + return Boolean(this.subscription) && this.subscription.isSubscribed(); + }; + + _proto.addExtraProps = function addExtraProps(props) { + if (!withRef && !renderCountProp && !(this.propsMode && this.subscription)) return props; // make a shallow copy so that fields added don't leak to the original selector. + // this is especially important for 'ref' since that's a reference back to the component + // instance. a singleton memoized selector would then be holding a reference to the + // instance, preventing the instance from being garbage collected, and that would be bad + + var withExtras = Object( + __WEBPACK_IMPORTED_MODULE_2__babel_runtime_helpers_esm_extends__['a' /* default */], + )({}, props); + + if (withRef) withExtras.ref = this.setWrappedInstance; + if (renderCountProp) withExtras[renderCountProp] = this.renderCount++; + if (this.propsMode && this.subscription) withExtras[subscriptionKey] = this.subscription; + return withExtras; + }; + + _proto.render = function render() { + var selector = this.selector; + selector.shouldComponentUpdate = false; + + if (selector.error) { + throw selector.error; + } else { + return Object(__WEBPACK_IMPORTED_MODULE_6_react__['createElement'])( + WrappedComponent, + this.addExtraProps(selector.props), + ); + } + }; + + return Connect; + })(__WEBPACK_IMPORTED_MODULE_6_react__['Component']); + + if (prefixUnsafeLifecycleMethods) { + // Use UNSAFE_ event name where supported + Connect.prototype.UNSAFE_componentWillReceiveProps = Connect.prototype.componentWillReceiveProps; + delete Connect.prototype.componentWillReceiveProps; + } + /* eslint-enable react/no-deprecated */ + + Connect.WrappedComponent = WrappedComponent; + Connect.displayName = displayName; + Connect.childContextTypes = childContextTypes; + Connect.contextTypes = contextTypes; + Connect.propTypes = contextTypes; + + if (true) { + // Use UNSAFE_ event name where supported + var eventName = prefixUnsafeLifecycleMethods + ? 'UNSAFE_componentWillUpdate' + : 'componentWillUpdate'; + + Connect.prototype[eventName] = function componentWillUpdate() { + var _this2 = this; + + // We are hot reloading! + if (this.version !== version) { + this.version = version; + this.initSelector(); // If any connected descendants don't hot reload (and resubscribe in the process), their + // listeners will be lost when we unsubscribe. Unfortunately, by copying over all + // listeners, this does mean that the old versions of connected descendants will still be + // notified of state changes; however, their onStateChange function is a no-op so this + // isn't a huge deal. + + var oldListeners = []; + + if (this.subscription) { + oldListeners = this.subscription.listeners.get(); + this.subscription.tryUnsubscribe(); + } + + this.initSubscription(); + + if (shouldHandleStateChanges) { + this.subscription.trySubscribe(); + oldListeners.forEach(function (listener) { + return _this2.subscription.listeners.subscribe(listener); + }); + } + } + }; + } + + return __WEBPACK_IMPORTED_MODULE_4_hoist_non_react_statics___default()(Connect, WrappedComponent); + }; + } + + /***/ + }, + /* 247 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = wrapMapToPropsConstant; + /* unused harmony export getDependsOnOwnProps */ + /* harmony export (immutable) */ __webpack_exports__['b'] = wrapMapToPropsFunc; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils_verifyPlainObject__ = + __webpack_require__(248); + + function wrapMapToPropsConstant(getConstant) { + return function initConstantSelector(dispatch, options) { + var constant = getConstant(dispatch, options); + + function constantSelector() { + return constant; + } + + constantSelector.dependsOnOwnProps = false; + return constantSelector; + }; + } // dependsOnOwnProps is used by createMapToPropsProxy to determine whether to pass props as args + // to the mapToProps function being wrapped. It is also used by makePurePropsSelector to determine + // whether mapToProps needs to be invoked when props have changed. + // + // A length of one signals that mapToProps does not depend on props from the parent component. + // A length of zero is assumed to mean mapToProps is getting args via arguments or ...args and + // therefore not reporting its length accurately.. + + function getDependsOnOwnProps(mapToProps) { + return mapToProps.dependsOnOwnProps !== null && mapToProps.dependsOnOwnProps !== undefined + ? Boolean(mapToProps.dependsOnOwnProps) + : mapToProps.length !== 1; + } // Used by whenMapStateToPropsIsFunction and whenMapDispatchToPropsIsFunction, + // this function wraps mapToProps in a proxy function which does several things: + // + // * Detects whether the mapToProps function being called depends on props, which + // is used by selectorFactory to decide if it should reinvoke on props changes. + // + // * On first call, handles mapToProps if returns another function, and treats that + // new function as the true mapToProps for subsequent calls. + // + // * On first call, verifies the first result is a plain object, in order to warn + // the developer that their mapToProps function is not returning a valid result. + // + + function wrapMapToPropsFunc(mapToProps, methodName) { + return function initProxySelector(dispatch, _ref) { + var displayName = _ref.displayName; + + var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) { + return proxy.dependsOnOwnProps + ? proxy.mapToProps(stateOrDispatch, ownProps) + : proxy.mapToProps(stateOrDispatch); + }; // allow detectFactoryAndVerify to get ownProps + + proxy.dependsOnOwnProps = true; + + proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) { + proxy.mapToProps = mapToProps; + proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps); + var props = proxy(stateOrDispatch, ownProps); + + if (typeof props === 'function') { + proxy.mapToProps = props; + proxy.dependsOnOwnProps = getDependsOnOwnProps(props); + props = proxy(stateOrDispatch, ownProps); + } + + if (true) + Object(__WEBPACK_IMPORTED_MODULE_0__utils_verifyPlainObject__['a' /* default */])( + props, + displayName, + methodName, + ); + return props; + }; + + return proxy; + }; + } + + /***/ + }, + /* 248 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = verifyPlainObject; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isPlainObject__ = __webpack_require__(576); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__warning__ = __webpack_require__(163); + + function verifyPlainObject(value, displayName, methodName) { + if (!Object(__WEBPACK_IMPORTED_MODULE_0__isPlainObject__['a' /* default */])(value)) { + Object(__WEBPACK_IMPORTED_MODULE_1__warning__['a' /* default */])( + methodName + + '() in ' + + displayName + + ' must return a plain object. Instead received ' + + value + + '.', + ); + } + } + + /***/ + }, + /* 249 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + function createThunkMiddleware(extraArgument) { + return function (_ref) { + var dispatch = _ref.dispatch, + getState = _ref.getState; + return function (next) { + return function (action) { + if (typeof action === 'function') { + return action(dispatch, getState, extraArgument); + } + + return next(action); + }; + }; + }; + } + + var thunk = createThunkMiddleware(); + thunk.withExtraArgument = createThunkMiddleware; + + /* harmony default export */ __webpack_exports__['a'] = thunk; + + /***/ + }, + /* 250 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__HelloWorldReducer__ = __webpack_require__(581); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__RailsContextReducer__ = __webpack_require__(582); + + // This is how you do a directory of reducers. + // The `import * as reducers` does not work for a directory, but only with a single file + var _default = { + helloWorldData: __WEBPACK_IMPORTED_MODULE_0__HelloWorldReducer__['a' /* default */], + railsContext: __WEBPACK_IMPORTED_MODULE_1__RailsContextReducer__['a' /* default */], + }; + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/reducers/reducersIndex.jsx', + ); + })(); + + /***/ + }, + /* 251 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'a', function () { + return HELLO_WORLD_NAME_UPDATE; + }); + /* eslint-disable import/prefer-default-export */ + var HELLO_WORLD_NAME_UPDATE = 'HELLO_WORLD_NAME_UPDATE'; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + HELLO_WORLD_NAME_UPDATE, + 'HELLO_WORLD_NAME_UPDATE', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/constants/HelloWorldConstants.jsx', + ); + })(); + + /***/ + }, + /* 252 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(10); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_redux__ = __webpack_require__(162); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_redux__ = __webpack_require__(109); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__HelloWorldRedux__ = __webpack_require__(584); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__actions_HelloWorldActions__ = + __webpack_require__(585); + + var HelloWorldContainer = function HelloWorldContainer(_ref) { + var actions = _ref.actions, + data = _ref.data, + railsContext = _ref.railsContext; + return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_4__HelloWorldRedux__['a' /* default */], + { actions: actions, data: data, railsContext: railsContext }, + ); + }; + HelloWorldContainer.propTypes = { + actions: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object.isRequired, + data: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object.isRequired, + railsContext: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object.isRequired, + }; + + function mapStateToProps(state) { + return { + data: state.helloWorldData, + railsContext: state.railsContext, + }; + } + + function mapDispatchToProps(dispatch) { + return { + actions: Object(__WEBPACK_IMPORTED_MODULE_3_redux__['b' /* bindActionCreators */])( + __WEBPACK_IMPORTED_MODULE_5__actions_HelloWorldActions__, + dispatch, + ), + }; + } + + // Don't forget to actually use connect! + + var _default = Object(__WEBPACK_IMPORTED_MODULE_2_react_redux__['b' /* connect */])( + mapStateToProps, + mapDispatchToProps, + )(HelloWorldContainer); + + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + HelloWorldContainer, + 'HelloWorldContainer', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/HelloWorldContainer.jsx', + ); + + __REACT_HOT_LOADER__.register( + mapStateToProps, + 'mapStateToProps', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/HelloWorldContainer.jsx', + ); + + __REACT_HOT_LOADER__.register( + mapDispatchToProps, + 'mapDispatchToProps', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/HelloWorldContainer.jsx', + ); + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/HelloWorldContainer.jsx', + ); + })(); + + /***/ + }, + /* 253 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = createTransitionManager; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__routerWarning__ = __webpack_require__(70); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__computeChangedRoutes__ = __webpack_require__(589); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__TransitionUtils__ = __webpack_require__(590); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isActive__ = __webpack_require__(591); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__getComponents__ = __webpack_require__(592); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__matchRoutes__ = __webpack_require__(593); + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + function hasAnyProperties(object) { + for (var p in object) { + if (Object.prototype.hasOwnProperty.call(object, p)) return true; + } + return false; + } + + function createTransitionManager(history, routes) { + var state = {}; + + var _getTransitionUtils = Object(__WEBPACK_IMPORTED_MODULE_2__TransitionUtils__['a' /* default */])(), + runEnterHooks = _getTransitionUtils.runEnterHooks, + runChangeHooks = _getTransitionUtils.runChangeHooks, + runLeaveHooks = _getTransitionUtils.runLeaveHooks; + + // Signature should be (location, indexOnly), but needs to support (path, + // query, indexOnly) + + function isActive(location, indexOnly) { + location = history.createLocation(location); + + return Object(__WEBPACK_IMPORTED_MODULE_3__isActive__['a' /* default */])( + location, + indexOnly, + state.location, + state.routes, + state.params, + ); + } + + var partialNextState = void 0; + + function match(location, callback) { + if (partialNextState && partialNextState.location === location) { + // Continue from where we left off. + finishMatch(partialNextState, callback); + } else { + Object(__WEBPACK_IMPORTED_MODULE_5__matchRoutes__['a' /* default */])( + routes, + location, + function (error, nextState) { + if (error) { + callback(error); + } else if (nextState) { + finishMatch(_extends({}, nextState, { location: location }), callback); + } else { + callback(); + } + }, + ); + } + } + + function finishMatch(nextState, callback) { + var _computeChangedRoutes = Object( + __WEBPACK_IMPORTED_MODULE_1__computeChangedRoutes__['a' /* default */], + )(state, nextState), + leaveRoutes = _computeChangedRoutes.leaveRoutes, + changeRoutes = _computeChangedRoutes.changeRoutes, + enterRoutes = _computeChangedRoutes.enterRoutes; + + runLeaveHooks(leaveRoutes, state); + + // Tear down confirmation hooks for left routes + leaveRoutes + .filter(function (route) { + return enterRoutes.indexOf(route) === -1; + }) + .forEach(removeListenBeforeHooksForRoute); + + // change and enter hooks are run in series + runChangeHooks(changeRoutes, state, nextState, function (error, redirectInfo) { + if (error || redirectInfo) return handleErrorOrRedirect(error, redirectInfo); + + runEnterHooks(enterRoutes, nextState, finishEnterHooks); + }); + + function finishEnterHooks(error, redirectInfo) { + if (error || redirectInfo) return handleErrorOrRedirect(error, redirectInfo); + + // TODO: Fetch components after state is updated. + Object(__WEBPACK_IMPORTED_MODULE_4__getComponents__['a' /* default */])( + nextState, + function (error, components) { + if (error) { + callback(error); + } else { + // TODO: Make match a pure function and have some other API + // for "match and update state". + callback(null, null, (state = _extends({}, nextState, { components: components }))); + } + }, + ); + } + + function handleErrorOrRedirect(error, redirectInfo) { + if (error) callback(error); + else callback(null, redirectInfo); + } + } + + var RouteGuid = 1; + + function getRouteID(route) { + var create = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + + return route.__id__ || (create && (route.__id__ = RouteGuid++)); + } + + var RouteHooks = Object.create(null); + + function getRouteHooksForRoutes(routes) { + return routes + .map(function (route) { + return RouteHooks[getRouteID(route)]; + }) + .filter(function (hook) { + return hook; + }); + } + + function transitionHook(location, callback) { + Object(__WEBPACK_IMPORTED_MODULE_5__matchRoutes__['a' /* default */])( + routes, + location, + function (error, nextState) { + if (nextState == null) { + // TODO: We didn't actually match anything, but hang + // onto error/nextState so we don't have to matchRoutes + // again in the listen callback. + callback(); + return; + } + + // Cache some state here so we don't have to + // matchRoutes() again in the listen callback. + partialNextState = _extends({}, nextState, { location: location }); + + var hooks = getRouteHooksForRoutes( + Object(__WEBPACK_IMPORTED_MODULE_1__computeChangedRoutes__['a' /* default */])( + state, + partialNextState, + ).leaveRoutes, + ); + + var result = void 0; + for (var i = 0, len = hooks.length; result == null && i < len; ++i) { + // Passing the location arg here indicates to + // the user that this is a transition hook. + result = hooks[i](location); + } + + callback(result); + }, + ); + } + + /* istanbul ignore next: untestable with Karma */ + function beforeUnloadHook() { + // Synchronously check to see if any route hooks want + // to prevent the current window/tab from closing. + if (state.routes) { + var hooks = getRouteHooksForRoutes(state.routes); + + var message = void 0; + for (var i = 0, len = hooks.length; typeof message !== 'string' && i < len; ++i) { + // Passing no args indicates to the user that this is a + // beforeunload hook. We don't know the next location. + message = hooks[i](); + } + + return message; + } + } + + var unlistenBefore = void 0, + unlistenBeforeUnload = void 0; + + function removeListenBeforeHooksForRoute(route) { + var routeID = getRouteID(route); + if (!routeID) { + return; + } + + delete RouteHooks[routeID]; + + if (!hasAnyProperties(RouteHooks)) { + // teardown transition & beforeunload hooks + if (unlistenBefore) { + unlistenBefore(); + unlistenBefore = null; + } + + if (unlistenBeforeUnload) { + unlistenBeforeUnload(); + unlistenBeforeUnload = null; + } + } + } + + /** + * Registers the given hook function to run before leaving the given route. + * + * During a normal transition, the hook function receives the next location + * as its only argument and can return either a prompt message (string) to show the user, + * to make sure they want to leave the page; or `false`, to prevent the transition. + * Any other return value will have no effect. + * + * During the beforeunload event (in browsers) the hook receives no arguments. + * In this case it must return a prompt message to prevent the transition. + * + * Returns a function that may be used to unbind the listener. + */ + function listenBeforeLeavingRoute(route, hook) { + var thereWereNoRouteHooks = !hasAnyProperties(RouteHooks); + var routeID = getRouteID(route, true); + + RouteHooks[routeID] = hook; + + if (thereWereNoRouteHooks) { + // setup transition & beforeunload hooks + unlistenBefore = history.listenBefore(transitionHook); + + if (history.listenBeforeUnload) + unlistenBeforeUnload = history.listenBeforeUnload(beforeUnloadHook); + } + + return function () { + removeListenBeforeHooksForRoute(route); + }; + } + + /** + * This is the API for stateful environments. As the location + * changes, we update state and call the listener. We can also + * gracefully handle errors and redirects. + */ + function listen(listener) { + function historyListener(location) { + if (state.location === location) { + listener(null, state); + } else { + match(location, function (error, redirectLocation, nextState) { + if (error) { + listener(error); + } else if (redirectLocation) { + history.replace(redirectLocation); + } else if (nextState) { + listener(null, nextState); + } else { + true + ? Object(__WEBPACK_IMPORTED_MODULE_0__routerWarning__['a' /* default */])( + false, + 'Location "%s" did not match any routes', + location.pathname + location.search + location.hash, + ) + : void 0; + } + }); + } + } + + // TODO: Only use a single history listener. Otherwise we'll end up with + // multiple concurrent calls to match. + + // Set up the history listener first in case the initial match redirects. + var unsubscribe = history.listen(historyListener); + + if (state.location) { + // Picking up on a matchContext. + listener(null, state); + } else { + historyListener(history.getCurrentLocation()); + } + + return unsubscribe; + } + + return { + isActive: isActive, + match: match, + listenBeforeLeavingRoute: listenBeforeLeavingRoute, + listen: listen, + }; + } + + /***/ + }, + /* 254 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = isPromise; + function isPromise(obj) { + return obj && typeof obj.then === 'function'; + } + + /***/ + }, + /* 255 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['b'] = createRouterObject; + /* harmony export (immutable) */ __webpack_exports__['a'] = assignRouterState; + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + function createRouterObject(history, transitionManager, state) { + var router = _extends({}, history, { + setRouteLeaveHook: transitionManager.listenBeforeLeavingRoute, + isActive: transitionManager.isActive, + }); + + return assignRouterState(router, state); + } + + function assignRouterState(router, _ref) { + var location = _ref.location, + params = _ref.params, + routes = _ref.routes; + + router.location = location; + router.params = params; + router.routes = routes; + + return router; + } + + /***/ + }, + /* 256 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_create_react_class__ = __webpack_require__(37); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_create_react_class___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_create_react_class__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types__ = __webpack_require__(10); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_2_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_invariant__ = __webpack_require__(14); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_invariant___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_3_invariant__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__PropTypes__ = __webpack_require__(169); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__ContextUtils__ = __webpack_require__(168); + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + function _objectWithoutProperties(obj, keys) { + var target = {}; + for (var i in obj) { + if (keys.indexOf(i) >= 0) continue; + if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; + target[i] = obj[i]; + } + return target; + } + + function isLeftClickEvent(event) { + return event.button === 0; + } + + function isModifiedEvent(event) { + return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey); + } + + // TODO: De-duplicate against hasAnyProperties in createTransitionManager. + function isEmptyObject(object) { + for (var p in object) { + if (Object.prototype.hasOwnProperty.call(object, p)) return false; + } + return true; + } + + function resolveToLocation(to, router) { + return typeof to === 'function' ? to(router.location) : to; + } + + /** + * A <Link> is used to create an <a> element that links to a route. + * When that route is active, the link gets the value of its + * activeClassName prop. + * + * For example, assuming you have the following route: + * + * <Route path="/posts/:postID" component={Post} /> + * + * You could use the following component to link to that route: + * + * <Link to={`/posts/${post.id}`} /> + */ + var Link = __WEBPACK_IMPORTED_MODULE_1_create_react_class___default()({ + displayName: 'Link', + + mixins: [Object(__WEBPACK_IMPORTED_MODULE_5__ContextUtils__['b' /* ContextSubscriber */])('router')], + + contextTypes: { + router: __WEBPACK_IMPORTED_MODULE_4__PropTypes__['a' /* routerShape */], + }, + + propTypes: { + to: Object(__WEBPACK_IMPORTED_MODULE_2_prop_types__['oneOfType'])([ + __WEBPACK_IMPORTED_MODULE_2_prop_types__['string'], + __WEBPACK_IMPORTED_MODULE_2_prop_types__['object'], + __WEBPACK_IMPORTED_MODULE_2_prop_types__['func'], + ]), + activeStyle: __WEBPACK_IMPORTED_MODULE_2_prop_types__['object'], + activeClassName: __WEBPACK_IMPORTED_MODULE_2_prop_types__['string'], + onlyActiveOnIndex: __WEBPACK_IMPORTED_MODULE_2_prop_types__['bool'].isRequired, + onClick: __WEBPACK_IMPORTED_MODULE_2_prop_types__['func'], + target: __WEBPACK_IMPORTED_MODULE_2_prop_types__['string'], + }, + + getDefaultProps: function getDefaultProps() { + return { + onlyActiveOnIndex: false, + style: {}, + }; + }, + handleClick: function handleClick(event) { + if (this.props.onClick) this.props.onClick(event); + + if (event.defaultPrevented) return; + + var router = this.context.router; + + !router + ? true + ? __WEBPACK_IMPORTED_MODULE_3_invariant___default()( + false, + '<Link>s rendered outside of a router context cannot navigate.', + ) + : invariant(false) + : void 0; + + if (isModifiedEvent(event) || !isLeftClickEvent(event)) return; + + // If target prop is set (e.g. to "_blank"), let browser handle link. + /* istanbul ignore if: untestable with Karma */ + if (this.props.target) return; + + event.preventDefault(); + + router.push(resolveToLocation(this.props.to, router)); + }, + render: function render() { + var _props = this.props, + to = _props.to, + activeClassName = _props.activeClassName, + activeStyle = _props.activeStyle, + onlyActiveOnIndex = _props.onlyActiveOnIndex, + props = _objectWithoutProperties(_props, [ + 'to', + 'activeClassName', + 'activeStyle', + 'onlyActiveOnIndex', + ]); + + // Ignore if rendered outside the context of router to simplify unit testing. + + var router = this.context.router; + + if (router) { + // If user does not specify a `to` prop, return an empty anchor tag. + if (!to) { + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('a', props); + } + + var toLocation = resolveToLocation(to, router); + props.href = router.createHref(toLocation); + + if (activeClassName || (activeStyle != null && !isEmptyObject(activeStyle))) { + if (router.isActive(toLocation, onlyActiveOnIndex)) { + if (activeClassName) { + if (props.className) { + props.className += ' ' + activeClassName; + } else { + props.className = activeClassName; + } + } + + if (activeStyle) props.style = _extends({}, props.style, activeStyle); + } + } + } + + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'a', + _extends({}, props, { onClick: this.handleClick }), + ); + }, + }); + + /* harmony default export */ __webpack_exports__['a'] = Link; + + /***/ + }, + /* 257 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_create_react_class__ = __webpack_require__(37); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_create_react_class___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_create_react_class__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(10); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant__ = __webpack_require__(14); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_2_invariant__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__RouteUtils__ = __webpack_require__(47); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__PatternUtils__ = __webpack_require__(71); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__ = __webpack_require__(85); + + /** + * A <Redirect> is used to declare another URL path a client should + * be sent to when they request a given URL. + * + * Redirects are placed alongside routes in the route configuration + * and are traversed in the same manner. + */ + /* eslint-disable react/require-render-return */ + var Redirect = __WEBPACK_IMPORTED_MODULE_0_create_react_class___default()({ + displayName: 'Redirect', + + statics: { + createRouteFromReactElement: function createRouteFromReactElement(element) { + var route = Object( + __WEBPACK_IMPORTED_MODULE_3__RouteUtils__['a' /* createRouteFromReactElement */], + )(element); + + if (route.from) route.path = route.from; + + route.onEnter = function (nextState, replace) { + var location = nextState.location, + params = nextState.params; + + var pathname = void 0; + if (route.to.charAt(0) === '/') { + pathname = Object(__WEBPACK_IMPORTED_MODULE_4__PatternUtils__['a' /* formatPattern */])( + route.to, + params, + ); + } else if (!route.to) { + pathname = location.pathname; + } else { + var routeIndex = nextState.routes.indexOf(route); + var parentPattern = Redirect.getRoutePattern(nextState.routes, routeIndex - 1); + var pattern = parentPattern.replace(/\/*$/, '/') + route.to; + pathname = Object(__WEBPACK_IMPORTED_MODULE_4__PatternUtils__['a' /* formatPattern */])( + pattern, + params, + ); + } + + replace({ + pathname: pathname, + query: route.query || location.query, + state: route.state || location.state, + }); + }; + + return route; + }, + getRoutePattern: function getRoutePattern(routes, routeIndex) { + var parentPattern = ''; + + for (var i = routeIndex; i >= 0; i--) { + var route = routes[i]; + var pattern = route.path || ''; + + parentPattern = pattern.replace(/\/*$/, '/') + parentPattern; + + if (pattern.indexOf('/') === 0) break; + } + + return '/' + parentPattern; + }, + }, + + propTypes: { + path: __WEBPACK_IMPORTED_MODULE_1_prop_types__['string'], + from: __WEBPACK_IMPORTED_MODULE_1_prop_types__['string'], // Alias for path + to: __WEBPACK_IMPORTED_MODULE_1_prop_types__['string'].isRequired, + query: __WEBPACK_IMPORTED_MODULE_1_prop_types__['object'], + state: __WEBPACK_IMPORTED_MODULE_1_prop_types__['object'], + onEnter: __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__['c' /* falsy */], + children: __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__['c' /* falsy */], + }, + + /* istanbul ignore next: sanity check */ + render: function render() { + true + ? true + ? __WEBPACK_IMPORTED_MODULE_2_invariant___default()( + false, + '<Redirect> elements are for router configuration only and should not be rendered', + ) + : invariant(false) + : void 0; + }, + }); + + /* harmony default export */ __webpack_exports__['a'] = Redirect; + + /***/ + }, + /* 258 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = createMemoryHistory; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries__ = + __webpack_require__(259); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename__ = + __webpack_require__(260); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_history_lib_createMemoryHistory__ = + __webpack_require__(604); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_history_lib_createMemoryHistory___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_history_lib_createMemoryHistory__); + + function createMemoryHistory(options) { + // signatures and type checking differ between `useQueries` and + // `createMemoryHistory`, have to create `memoryHistory` first because + // `useQueries` doesn't understand the signature + var memoryHistory = __WEBPACK_IMPORTED_MODULE_2_history_lib_createMemoryHistory___default()(options); + var createHistory = function createHistory() { + return memoryHistory; + }; + var history = __WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries___default()( + __WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename___default()(createHistory), + )(options); + return history; + } + + /***/ + }, + /* 259 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + var _queryString = __webpack_require__(602); + + var _runTransitionHook = __webpack_require__(170); + + var _runTransitionHook2 = _interopRequireDefault(_runTransitionHook); + + var _LocationUtils = __webpack_require__(72); + + var _PathUtils = __webpack_require__(48); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + var defaultStringifyQuery = function defaultStringifyQuery(query) { + return (0, _queryString.stringify)(query).replace(/%20/g, '+'); + }; + + var defaultParseQueryString = _queryString.parse; + + /** + * Returns a new createHistory function that may be used to create + * history objects that know how to handle URL queries. + */ + var useQueries = function useQueries(createHistory) { + return function () { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + + var history = createHistory(options); + var stringifyQuery = options.stringifyQuery, + parseQueryString = options.parseQueryString; + + if (typeof stringifyQuery !== 'function') stringifyQuery = defaultStringifyQuery; + + if (typeof parseQueryString !== 'function') parseQueryString = defaultParseQueryString; + + var decodeQuery = function decodeQuery(location) { + if (!location) return location; + + if (location.query == null) location.query = parseQueryString(location.search.substring(1)); + + return location; + }; + + var encodeQuery = function encodeQuery(location, query) { + if (query == null) return location; + + var object = typeof location === 'string' ? (0, _PathUtils.parsePath)(location) : location; + var queryString = stringifyQuery(query); + var search = queryString ? '?' + queryString : ''; + + return _extends({}, object, { + search: search, + }); + }; + + // Override all read methods with query-aware versions. + var getCurrentLocation = function getCurrentLocation() { + return decodeQuery(history.getCurrentLocation()); + }; + + var listenBefore = function listenBefore(hook) { + return history.listenBefore(function (location, callback) { + return (0, _runTransitionHook2.default)(hook, decodeQuery(location), callback); + }); + }; + + var listen = function listen(listener) { + return history.listen(function (location) { + return listener(decodeQuery(location)); + }); + }; + + // Override all write methods with query-aware versions. + var push = function push(location) { + return history.push(encodeQuery(location, location.query)); + }; + + var replace = function replace(location) { + return history.replace(encodeQuery(location, location.query)); + }; + + var createPath = function createPath(location) { + return history.createPath(encodeQuery(location, location.query)); + }; + + var createHref = function createHref(location) { + return history.createHref(encodeQuery(location, location.query)); + }; + + var createLocation = function createLocation(location) { + for ( + var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; + _key < _len; + _key++ + ) { + args[_key - 1] = arguments[_key]; + } + + var newLocation = history.createLocation.apply( + history, + [encodeQuery(location, location.query)].concat(args), + ); + + if (location.query) newLocation.query = (0, _LocationUtils.createQuery)(location.query); + + return decodeQuery(newLocation); + }; + + return _extends({}, history, { + getCurrentLocation: getCurrentLocation, + listenBefore: listenBefore, + listen: listen, + push: push, + replace: replace, + createPath: createPath, + createHref: createHref, + createLocation: createLocation, + }); + }; + }; + + exports.default = useQueries; + + /***/ + }, + /* 260 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + var _runTransitionHook = __webpack_require__(170); + + var _runTransitionHook2 = _interopRequireDefault(_runTransitionHook); + + var _PathUtils = __webpack_require__(48); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + var useBasename = function useBasename(createHistory) { + return function () { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + + var history = createHistory(options); + var basename = options.basename; + + var addBasename = function addBasename(location) { + if (!location) return location; + + if (basename && location.basename == null) { + if (location.pathname.toLowerCase().indexOf(basename.toLowerCase()) === 0) { + location.pathname = location.pathname.substring(basename.length); + location.basename = basename; + + if (location.pathname === '') location.pathname = '/'; + } else { + location.basename = ''; + } + } + + return location; + }; + + var prependBasename = function prependBasename(location) { + if (!basename) return location; + + var object = typeof location === 'string' ? (0, _PathUtils.parsePath)(location) : location; + var pname = object.pathname; + var normalizedBasename = basename.slice(-1) === '/' ? basename : basename + '/'; + var normalizedPathname = pname.charAt(0) === '/' ? pname.slice(1) : pname; + var pathname = normalizedBasename + normalizedPathname; + + return _extends({}, object, { + pathname: pathname, + }); + }; + + // Override all read methods with basename-aware versions. + var getCurrentLocation = function getCurrentLocation() { + return addBasename(history.getCurrentLocation()); + }; + + var listenBefore = function listenBefore(hook) { + return history.listenBefore(function (location, callback) { + return (0, _runTransitionHook2.default)(hook, addBasename(location), callback); + }); + }; + + var listen = function listen(listener) { + return history.listen(function (location) { + return listener(addBasename(location)); + }); + }; + + // Override all write methods with basename-aware versions. + var push = function push(location) { + return history.push(prependBasename(location)); + }; + + var replace = function replace(location) { + return history.replace(prependBasename(location)); + }; + + var createPath = function createPath(location) { + return history.createPath(prependBasename(location)); + }; + + var createHref = function createHref(location) { + return history.createHref(prependBasename(location)); + }; + + var createLocation = function createLocation(location) { + for ( + var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; + _key < _len; + _key++ + ) { + args[_key - 1] = arguments[_key]; + } + + return addBasename( + history.createLocation.apply(history, [prependBasename(location)].concat(args)), + ); + }; + + return _extends({}, history, { + getCurrentLocation: getCurrentLocation, + listenBefore: listenBefore, + listen: listen, + push: push, + replace: replace, + createPath: createPath, + createHref: createHref, + createLocation: createLocation, + }); + }; + }; + + exports.default = useBasename; + + /***/ + }, + /* 261 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = useRouterHistory; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries__ = + __webpack_require__(259); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename__ = + __webpack_require__(260); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename__); + + function useRouterHistory(createHistory) { + return function (options) { + var history = __WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries___default()( + __WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename___default()(createHistory), + )(options); + return history; + }; + } + + /***/ + }, + /* 262 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + exports.readState = exports.saveState = undefined; + + var _warning = __webpack_require__(46); + + var _warning2 = _interopRequireDefault(_warning); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + var QuotaExceededErrors = { + QuotaExceededError: true, + QUOTA_EXCEEDED_ERR: true, + }; + + var SecurityErrors = { + SecurityError: true, + }; + + var KeyPrefix = '@@History/'; + + var createKey = function createKey(key) { + return KeyPrefix + key; + }; + + var saveState = (exports.saveState = function saveState(key, state) { + if (!window.sessionStorage) { + // Session storage is not available or hidden. + // sessionStorage is undefined in Internet Explorer when served via file protocol. + true + ? (0, _warning2.default)(false, '[history] Unable to save state; sessionStorage is not available') + : void 0; + + return; + } + + try { + if (state == null) { + window.sessionStorage.removeItem(createKey(key)); + } else { + window.sessionStorage.setItem(createKey(key), JSON.stringify(state)); + } + } catch (error) { + if (SecurityErrors[error.name]) { + // Blocking cookies in Chrome/Firefox/Safari throws SecurityError on any + // attempt to access window.sessionStorage. + true + ? (0, _warning2.default)( + false, + '[history] Unable to save state; sessionStorage is not available due to security settings', + ) + : void 0; + + return; + } + + if (QuotaExceededErrors[error.name] && window.sessionStorage.length === 0) { + // Safari "private mode" throws QuotaExceededError. + true + ? (0, _warning2.default)( + false, + '[history] Unable to save state; sessionStorage is not available in Safari private mode', + ) + : void 0; + + return; + } + + throw error; + } + }); + + var readState = (exports.readState = function readState(key) { + var json = void 0; + try { + json = window.sessionStorage.getItem(createKey(key)); + } catch (error) { + if (SecurityErrors[error.name]) { + // Blocking cookies in Chrome/Firefox/Safari throws SecurityError on any + // attempt to access window.sessionStorage. + true + ? (0, _warning2.default)( + false, + '[history] Unable to read state; sessionStorage is not available due to security settings', + ) + : void 0; + + return undefined; + } + } + + if (json) { + try { + return JSON.parse(json); + } catch (error) { + // Ignore invalid JSON. + } + } + + return undefined; + }); + + /***/ + }, + /* 263 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = createRouterHistory; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__useRouterHistory__ = __webpack_require__(261); + + var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement); + + function createRouterHistory(createHistory) { + var history = void 0; + if (canUseDOM) + history = Object(__WEBPACK_IMPORTED_MODULE_0__useRouterHistory__['a' /* default */])( + createHistory, + )(); + return history; + } + + /***/ + }, + /* 264 */ + /***/ function (module, exports, __webpack_require__) { + exports.__esModule = true; + exports.Helmet = undefined; + + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + var _react = __webpack_require__(1); + + var _react2 = _interopRequireDefault(_react); + + var _propTypes = __webpack_require__(10); + + var _propTypes2 = _interopRequireDefault(_propTypes); + + var _reactSideEffect = __webpack_require__(627); + + var _reactSideEffect2 = _interopRequireDefault(_reactSideEffect); + + var _reactFastCompare = __webpack_require__(629); + + var _reactFastCompare2 = _interopRequireDefault(_reactFastCompare); + + var _HelmetUtils = __webpack_require__(630); + + var _HelmetConstants = __webpack_require__(265); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + function _objectWithoutProperties(obj, keys) { + var target = {}; + for (var i in obj) { + if (keys.indexOf(i) >= 0) continue; + if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; + target[i] = obj[i]; + } + return target; + } + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + var Helmet = function Helmet(Component) { + var _class, _temp; + + return ( + (_temp = _class = + (function (_React$Component) { + _inherits(HelmetWrapper, _React$Component); + + function HelmetWrapper() { + _classCallCheck(this, HelmetWrapper); + + return _possibleConstructorReturn(this, _React$Component.apply(this, arguments)); + } + + HelmetWrapper.prototype.shouldComponentUpdate = function shouldComponentUpdate(nextProps) { + return !(0, _reactFastCompare2.default)(this.props, nextProps); + }; + + HelmetWrapper.prototype.mapNestedChildrenToProps = function mapNestedChildrenToProps( + child, + nestedChildren, + ) { + if (!nestedChildren) { + return null; + } + + switch (child.type) { + case _HelmetConstants.TAG_NAMES.SCRIPT: + case _HelmetConstants.TAG_NAMES.NOSCRIPT: + return { + innerHTML: nestedChildren, + }; + + case _HelmetConstants.TAG_NAMES.STYLE: + return { + cssText: nestedChildren, + }; + } + + throw new Error( + '<' + + child.type + + ' /> elements are self-closing and can not contain children. Refer to our API for more information.', + ); + }; + + HelmetWrapper.prototype.flattenArrayTypeChildren = function flattenArrayTypeChildren(_ref) { + var _extends2; + + var child = _ref.child, + arrayTypeChildren = _ref.arrayTypeChildren, + newChildProps = _ref.newChildProps, + nestedChildren = _ref.nestedChildren; + + return _extends( + {}, + arrayTypeChildren, + ((_extends2 = {}), + (_extends2[child.type] = [].concat(arrayTypeChildren[child.type] || [], [ + _extends({}, newChildProps, this.mapNestedChildrenToProps(child, nestedChildren)), + ])), + _extends2), + ); + }; + + HelmetWrapper.prototype.mapObjectTypeChildren = function mapObjectTypeChildren(_ref2) { + var _extends3, _extends4; + + var child = _ref2.child, + newProps = _ref2.newProps, + newChildProps = _ref2.newChildProps, + nestedChildren = _ref2.nestedChildren; + + switch (child.type) { + case _HelmetConstants.TAG_NAMES.TITLE: + return _extends( + {}, + newProps, + ((_extends3 = {}), + (_extends3[child.type] = nestedChildren), + (_extends3.titleAttributes = _extends({}, newChildProps)), + _extends3), + ); + + case _HelmetConstants.TAG_NAMES.BODY: + return _extends({}, newProps, { + bodyAttributes: _extends({}, newChildProps), + }); + + case _HelmetConstants.TAG_NAMES.HTML: + return _extends({}, newProps, { + htmlAttributes: _extends({}, newChildProps), + }); + } + + return _extends( + {}, + newProps, + ((_extends4 = {}), (_extends4[child.type] = _extends({}, newChildProps)), _extends4), + ); + }; + + HelmetWrapper.prototype.mapArrayTypeChildrenToProps = function mapArrayTypeChildrenToProps( + arrayTypeChildren, + newProps, + ) { + var newFlattenedProps = _extends({}, newProps); + + Object.keys(arrayTypeChildren).forEach(function (arrayChildName) { + var _extends5; + + newFlattenedProps = _extends( + {}, + newFlattenedProps, + ((_extends5 = {}), + (_extends5[arrayChildName] = arrayTypeChildren[arrayChildName]), + _extends5), + ); + }); + + return newFlattenedProps; + }; + + HelmetWrapper.prototype.warnOnInvalidChildren = function warnOnInvalidChildren( + child, + nestedChildren, + ) { + if (true) { + if ( + !_HelmetConstants.VALID_TAG_NAMES.some(function (name) { + return child.type === name; + }) + ) { + if (typeof child.type === 'function') { + return (0, _HelmetUtils.warn)( + 'You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information.', + ); + } + + return (0, _HelmetUtils.warn)( + 'Only elements types ' + + _HelmetConstants.VALID_TAG_NAMES.join(', ') + + ' are allowed. Helmet does not support rendering <' + + child.type + + '> elements. Refer to our API for more information.', + ); + } + + if ( + nestedChildren && + typeof nestedChildren !== 'string' && + (!Array.isArray(nestedChildren) || + nestedChildren.some(function (nestedChild) { + return typeof nestedChild !== 'string'; + })) + ) { + throw new Error( + 'Helmet expects a string as a child of <' + + child.type + + '>. Did you forget to wrap your children in braces? ( <' + + child.type + + '>{``}</' + + child.type + + '> ) Refer to our API for more information.', + ); + } + } + + return true; + }; + + HelmetWrapper.prototype.mapChildrenToProps = function mapChildrenToProps(children, newProps) { + var _this2 = this; + + var arrayTypeChildren = {}; + + _react2.default.Children.forEach(children, function (child) { + if (!child || !child.props) { + return; + } + + var _child$props = child.props, + nestedChildren = _child$props.children, + childProps = _objectWithoutProperties(_child$props, ['children']); + + var newChildProps = (0, _HelmetUtils.convertReactPropstoHtmlAttributes)(childProps); + + _this2.warnOnInvalidChildren(child, nestedChildren); + + switch (child.type) { + case _HelmetConstants.TAG_NAMES.LINK: + case _HelmetConstants.TAG_NAMES.META: + case _HelmetConstants.TAG_NAMES.NOSCRIPT: + case _HelmetConstants.TAG_NAMES.SCRIPT: + case _HelmetConstants.TAG_NAMES.STYLE: + arrayTypeChildren = _this2.flattenArrayTypeChildren({ + child: child, + arrayTypeChildren: arrayTypeChildren, + newChildProps: newChildProps, + nestedChildren: nestedChildren, + }); + break; + + default: + newProps = _this2.mapObjectTypeChildren({ + child: child, + newProps: newProps, + newChildProps: newChildProps, + nestedChildren: nestedChildren, + }); + break; + } + }); + + newProps = this.mapArrayTypeChildrenToProps(arrayTypeChildren, newProps); + return newProps; + }; + + HelmetWrapper.prototype.render = function render() { + var _props = this.props, + children = _props.children, + props = _objectWithoutProperties(_props, ['children']); + + var newProps = _extends({}, props); + + if (children) { + newProps = this.mapChildrenToProps(children, newProps); + } + + return _react2.default.createElement(Component, newProps); + }; + + _createClass(HelmetWrapper, null, [ + { + key: 'canUseDOM', + + // Component.peek comes from react-side-effect: + // For testing, you may use a static peek() method available on the returned component. + // It lets you get the current state without resetting the mounted instance stack. + // Don’t use it for anything other than testing. + + /** + * @param {Object} base: {"target": "_blank", "href": "http://mysite.com/"} + * @param {Object} bodyAttributes: {"className": "root"} + * @param {String} defaultTitle: "Default Title" + * @param {Boolean} defer: true + * @param {Boolean} encodeSpecialCharacters: true + * @param {Object} htmlAttributes: {"lang": "en", "amp": undefined} + * @param {Array} link: [{"rel": "canonical", "href": "http://mysite.com/example"}] + * @param {Array} meta: [{"name": "description", "content": "Test description"}] + * @param {Array} noscript: [{"innerHTML": "<img src='http://mysite.com/js/test.js'"}] + * @param {Function} onChangeClientState: "(newState) => console.log(newState)" + * @param {Array} script: [{"type": "text/javascript", "src": "http://mysite.com/js/test.js"}] + * @param {Array} style: [{"type": "text/css", "cssText": "div { display: block; color: blue; }"}] + * @param {String} title: "Title" + * @param {Object} titleAttributes: {"itemprop": "name"} + * @param {String} titleTemplate: "MySite.com - %s" + */ + set: function set(canUseDOM) { + Component.canUseDOM = canUseDOM; + }, + }, + ]); + + return HelmetWrapper; + })(_react2.default.Component)), + (_class.propTypes = { + base: _propTypes2.default.object, + bodyAttributes: _propTypes2.default.object, + children: _propTypes2.default.oneOfType([ + _propTypes2.default.arrayOf(_propTypes2.default.node), + _propTypes2.default.node, + ]), + defaultTitle: _propTypes2.default.string, + defer: _propTypes2.default.bool, + encodeSpecialCharacters: _propTypes2.default.bool, + htmlAttributes: _propTypes2.default.object, + link: _propTypes2.default.arrayOf(_propTypes2.default.object), + meta: _propTypes2.default.arrayOf(_propTypes2.default.object), + noscript: _propTypes2.default.arrayOf(_propTypes2.default.object), + onChangeClientState: _propTypes2.default.func, + script: _propTypes2.default.arrayOf(_propTypes2.default.object), + style: _propTypes2.default.arrayOf(_propTypes2.default.object), + title: _propTypes2.default.string, + titleAttributes: _propTypes2.default.object, + titleTemplate: _propTypes2.default.string, + }), + (_class.defaultProps = { + defer: true, + encodeSpecialCharacters: true, + }), + (_class.peek = Component.peek), + (_class.rewind = function () { + var mappedState = Component.rewind(); + if (!mappedState) { + // provide fallback if mappedState is undefined + mappedState = (0, _HelmetUtils.mapStateOnServer)({ + baseTag: [], + bodyAttributes: {}, + encodeSpecialCharacters: true, + htmlAttributes: {}, + linkTags: [], + metaTags: [], + noscriptTags: [], + scriptTags: [], + styleTags: [], + title: '', + titleAttributes: {}, + }); + } + + return mappedState; + }), + _temp + ); + }; + + var NullComponent = function NullComponent() { + return null; + }; + + var HelmetSideEffects = (0, _reactSideEffect2.default)( + _HelmetUtils.reducePropsToState, + _HelmetUtils.handleClientStateChange, + _HelmetUtils.mapStateOnServer, + )(NullComponent); + + var HelmetExport = Helmet(HelmetSideEffects); + HelmetExport.renderStatic = HelmetExport.rewind; + + exports.Helmet = HelmetExport; + exports.default = HelmetExport; + + /***/ + }, + /* 265 */ + /***/ function (module, exports) { + exports.__esModule = true; + var ATTRIBUTE_NAMES = (exports.ATTRIBUTE_NAMES = { + BODY: 'bodyAttributes', + HTML: 'htmlAttributes', + TITLE: 'titleAttributes', + }); + + var TAG_NAMES = (exports.TAG_NAMES = { + BASE: 'base', + BODY: 'body', + HEAD: 'head', + HTML: 'html', + LINK: 'link', + META: 'meta', + NOSCRIPT: 'noscript', + SCRIPT: 'script', + STYLE: 'style', + TITLE: 'title', + }); + + var VALID_TAG_NAMES = (exports.VALID_TAG_NAMES = Object.keys(TAG_NAMES).map(function (name) { + return TAG_NAMES[name]; + })); + + var TAG_PROPERTIES = (exports.TAG_PROPERTIES = { + CHARSET: 'charset', + CSS_TEXT: 'cssText', + HREF: 'href', + HTTPEQUIV: 'http-equiv', + INNER_HTML: 'innerHTML', + ITEM_PROP: 'itemprop', + NAME: 'name', + PROPERTY: 'property', + REL: 'rel', + SRC: 'src', + }); + + var REACT_TAG_MAP = (exports.REACT_TAG_MAP = { + accesskey: 'accessKey', + charset: 'charSet', + class: 'className', + contenteditable: 'contentEditable', + contextmenu: 'contextMenu', + 'http-equiv': 'httpEquiv', + itemprop: 'itemProp', + tabindex: 'tabIndex', + }); + + var HELMET_PROPS = (exports.HELMET_PROPS = { + DEFAULT_TITLE: 'defaultTitle', + DEFER: 'defer', + ENCODE_SPECIAL_CHARACTERS: 'encodeSpecialCharacters', + ON_CHANGE_CLIENT_STATE: 'onChangeClientState', + TITLE_TEMPLATE: 'titleTemplate', + }); + + var HTML_TAG_MAP = (exports.HTML_TAG_MAP = Object.keys(REACT_TAG_MAP).reduce(function (obj, key) { + obj[REACT_TAG_MAP[key]] = key; + return obj; + }, {})); + + var SELF_CLOSING_TAGS = (exports.SELF_CLOSING_TAGS = [ + TAG_NAMES.NOSCRIPT, + TAG_NAMES.SCRIPT, + TAG_NAMES.STYLE, + ]); + + var HELMET_ATTRIBUTE = (exports.HELMET_ATTRIBUTE = 'data-react-helmet'); + + /***/ + }, + /* 266 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = __webpack_require__(267); + + /***/ + }, + /* 267 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + Object.defineProperty(__webpack_exports__, '__esModule', { value: true }); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_polyfill__ = __webpack_require__(268); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_polyfill___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_babel_polyfill__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_es5_shim__ = __webpack_require__(470); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_es5_shim___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_es5_shim__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_on_rails__ = __webpack_require__(210); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_on_rails___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_2_react_on_rails__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__non_react_HelloString__ = + __webpack_require__(540); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__components_HelloWorld__ = + __webpack_require__(161); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__components_HelloWorldES5__ = + __webpack_require__(545); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__components_HelloWorldWithLogAndThrow__ = + __webpack_require__(551); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__HelloWorldApp__ = __webpack_require__(552); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__BrokenApp__ = __webpack_require__(553); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__ServerReduxApp__ = __webpack_require__(554); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__ServerReduxSharedStoreApp__ = + __webpack_require__(586); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__ServerRouterApp__ = __webpack_require__(587); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__components_PureComponent__ = + __webpack_require__(617); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__components_CssModulesImagesFontsExample__ = + __webpack_require__(618); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__stores_SharedReduxStore__ = + __webpack_require__(620); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__DeferredRenderAppServer__ = + __webpack_require__(621); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__ServerRenderedHtml__ = __webpack_require__(624); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__ReactHelmetServerApp__ = + __webpack_require__(626); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__components_ImageExample__ = + __webpack_require__(632); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_19__SetTimeoutLoggingApp__ = + __webpack_require__(639); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_20__ComponentWithLodashApp__ = + __webpack_require__(640); + + // Shows the mapping from the exported object to the name used by the server rendering. + + // Example of server rendering with no React + + // React components + + // Generator function + + // Example of React + Redux + + // Example of 2 React components sharing the same store + + // Example of React Router with Server Rendering + + // Deferred render on the client side w/ server render + + // Deferred render on the client side w/ server render + + // Deferred render on the client side w/ server render with additional HTML strings: + + // Demonstrate using Images + + __WEBPACK_IMPORTED_MODULE_2_react_on_rails___default.a.register({ + BrokenApp: __WEBPACK_IMPORTED_MODULE_8__BrokenApp__['a' /* default */], + HelloWorld: __WEBPACK_IMPORTED_MODULE_4__components_HelloWorld__['a' /* default */], + HelloWorldWithLogAndThrow: + __WEBPACK_IMPORTED_MODULE_6__components_HelloWorldWithLogAndThrow__['a' /* default */], + HelloWorldES5: __WEBPACK_IMPORTED_MODULE_5__components_HelloWorldES5__['a' /* default */], + ReduxApp: __WEBPACK_IMPORTED_MODULE_9__ServerReduxApp__['a' /* default */], + ReduxSharedStoreApp: __WEBPACK_IMPORTED_MODULE_10__ServerReduxSharedStoreApp__['a' /* default */], + HelloWorldApp: __WEBPACK_IMPORTED_MODULE_7__HelloWorldApp__['a' /* default */], + RouterApp: __WEBPACK_IMPORTED_MODULE_11__ServerRouterApp__['a' /* default */], + HelloString: __WEBPACK_IMPORTED_MODULE_3__non_react_HelloString__['a' /* default */], + PureComponent: __WEBPACK_IMPORTED_MODULE_12__components_PureComponent__['a' /* default */], + CssModulesImagesFontsExample: + __WEBPACK_IMPORTED_MODULE_13__components_CssModulesImagesFontsExample__['a' /* default */], + DeferredRenderApp: __WEBPACK_IMPORTED_MODULE_15__DeferredRenderAppServer__['a' /* default */], + RenderedHtml: __WEBPACK_IMPORTED_MODULE_16__ServerRenderedHtml__['a' /* default */], + ReactHelmetApp: __WEBPACK_IMPORTED_MODULE_17__ReactHelmetServerApp__['a' /* default */], + ImageExample: __WEBPACK_IMPORTED_MODULE_18__components_ImageExample__['a' /* default */], + SetTimeoutLoggingApp: __WEBPACK_IMPORTED_MODULE_19__SetTimeoutLoggingApp__['a' /* default */], + ComponentWithLodashApp: __WEBPACK_IMPORTED_MODULE_20__ComponentWithLodashApp__['a' /* default */], + }); + + __WEBPACK_IMPORTED_MODULE_2_react_on_rails___default.a.registerStore({ + SharedReduxStore: __WEBPACK_IMPORTED_MODULE_14__stores_SharedReduxStore__['a' /* default */], + }); + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + })(); + + /***/ + }, + /* 268 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + __webpack_require__(269); + + __webpack_require__(466); + + __webpack_require__(467); + + if (global._babelPolyfill) { + throw new Error('only one instance of babel-polyfill is allowed'); + } + global._babelPolyfill = true; + + var DEFINE_PROPERTY = 'defineProperty'; + function define(O, key, value) { + O[key] || + Object[DEFINE_PROPERTY](O, key, { + writable: true, + configurable: true, + value: value, + }); + } + + define(String.prototype, 'padLeft', ''.padStart); + define(String.prototype, 'padRight', ''.padEnd); + + 'pop,reverse,shift,keys,values,entries,indexOf,every,some,forEach,map,filter,find,findIndex,includes,join,slice,concat,push,splice,unshift,sort,lastIndexOf,reduce,reduceRight,copyWithin,fill' + .split(',') + .forEach(function (key) { + [][key] && define(Array, key, Function.call.bind([][key])); + }); + + /***/ + }, + /* 269 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(270); + __webpack_require__(273); + __webpack_require__(274); + __webpack_require__(275); + __webpack_require__(276); + __webpack_require__(277); + __webpack_require__(278); + __webpack_require__(279); + __webpack_require__(280); + __webpack_require__(281); + __webpack_require__(282); + __webpack_require__(283); + __webpack_require__(284); + __webpack_require__(285); + __webpack_require__(286); + __webpack_require__(287); + __webpack_require__(288); + __webpack_require__(289); + __webpack_require__(290); + __webpack_require__(291); + __webpack_require__(292); + __webpack_require__(293); + __webpack_require__(294); + __webpack_require__(295); + __webpack_require__(296); + __webpack_require__(297); + __webpack_require__(298); + __webpack_require__(299); + __webpack_require__(300); + __webpack_require__(301); + __webpack_require__(302); + __webpack_require__(303); + __webpack_require__(304); + __webpack_require__(305); + __webpack_require__(306); + __webpack_require__(307); + __webpack_require__(308); + __webpack_require__(309); + __webpack_require__(310); + __webpack_require__(311); + __webpack_require__(312); + __webpack_require__(313); + __webpack_require__(314); + __webpack_require__(315); + __webpack_require__(316); + __webpack_require__(317); + __webpack_require__(318); + __webpack_require__(319); + __webpack_require__(320); + __webpack_require__(321); + __webpack_require__(322); + __webpack_require__(323); + __webpack_require__(324); + __webpack_require__(325); + __webpack_require__(326); + __webpack_require__(327); + __webpack_require__(328); + __webpack_require__(329); + __webpack_require__(330); + __webpack_require__(331); + __webpack_require__(332); + __webpack_require__(333); + __webpack_require__(334); + __webpack_require__(335); + __webpack_require__(336); + __webpack_require__(337); + __webpack_require__(338); + __webpack_require__(339); + __webpack_require__(340); + __webpack_require__(341); + __webpack_require__(342); + __webpack_require__(343); + __webpack_require__(344); + __webpack_require__(345); + __webpack_require__(346); + __webpack_require__(347); + __webpack_require__(348); + __webpack_require__(350); + __webpack_require__(351); + __webpack_require__(353); + __webpack_require__(354); + __webpack_require__(355); + __webpack_require__(356); + __webpack_require__(357); + __webpack_require__(358); + __webpack_require__(359); + __webpack_require__(361); + __webpack_require__(362); + __webpack_require__(363); + __webpack_require__(364); + __webpack_require__(365); + __webpack_require__(366); + __webpack_require__(367); + __webpack_require__(368); + __webpack_require__(369); + __webpack_require__(370); + __webpack_require__(371); + __webpack_require__(372); + __webpack_require__(373); + __webpack_require__(132); + __webpack_require__(374); + __webpack_require__(193); + __webpack_require__(375); + __webpack_require__(194); + __webpack_require__(376); + __webpack_require__(377); + __webpack_require__(378); + __webpack_require__(379); + __webpack_require__(380); + __webpack_require__(197); + __webpack_require__(199); + __webpack_require__(200); + __webpack_require__(381); + __webpack_require__(382); + __webpack_require__(383); + __webpack_require__(384); + __webpack_require__(385); + __webpack_require__(386); + __webpack_require__(387); + __webpack_require__(388); + __webpack_require__(389); + __webpack_require__(390); + __webpack_require__(391); + __webpack_require__(392); + __webpack_require__(393); + __webpack_require__(394); + __webpack_require__(395); + __webpack_require__(396); + __webpack_require__(397); + __webpack_require__(398); + __webpack_require__(399); + __webpack_require__(400); + __webpack_require__(401); + __webpack_require__(402); + __webpack_require__(403); + __webpack_require__(404); + __webpack_require__(405); + __webpack_require__(406); + __webpack_require__(407); + __webpack_require__(408); + __webpack_require__(409); + __webpack_require__(410); + __webpack_require__(411); + __webpack_require__(412); + __webpack_require__(413); + __webpack_require__(414); + __webpack_require__(415); + __webpack_require__(416); + __webpack_require__(417); + __webpack_require__(418); + __webpack_require__(419); + __webpack_require__(420); + __webpack_require__(421); + __webpack_require__(422); + __webpack_require__(423); + __webpack_require__(424); + __webpack_require__(425); + __webpack_require__(426); + __webpack_require__(427); + __webpack_require__(428); + __webpack_require__(429); + __webpack_require__(430); + __webpack_require__(431); + __webpack_require__(432); + __webpack_require__(433); + __webpack_require__(434); + __webpack_require__(435); + __webpack_require__(436); + __webpack_require__(437); + __webpack_require__(438); + __webpack_require__(439); + __webpack_require__(440); + __webpack_require__(441); + __webpack_require__(442); + __webpack_require__(443); + __webpack_require__(444); + __webpack_require__(445); + __webpack_require__(446); + __webpack_require__(447); + __webpack_require__(448); + __webpack_require__(449); + __webpack_require__(450); + __webpack_require__(451); + __webpack_require__(452); + __webpack_require__(453); + __webpack_require__(454); + __webpack_require__(455); + __webpack_require__(456); + __webpack_require__(457); + __webpack_require__(458); + __webpack_require__(459); + __webpack_require__(460); + __webpack_require__(461); + __webpack_require__(462); + __webpack_require__(463); + __webpack_require__(464); + __webpack_require__(465); + module.exports = __webpack_require__(23); + + /***/ + }, + /* 270 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // ECMAScript 6 symbols shim + var global = __webpack_require__(3); + var has = __webpack_require__(18); + var DESCRIPTORS = __webpack_require__(8); + var $export = __webpack_require__(0); + var redefine = __webpack_require__(16); + var META = __webpack_require__(42).KEY; + var $fails = __webpack_require__(4); + var shared = __webpack_require__(73); + var setToStringTag = __webpack_require__(64); + var uid = __webpack_require__(50); + var wks = __webpack_require__(6); + var wksExt = __webpack_require__(175); + var wksDefine = __webpack_require__(113); + var enumKeys = __webpack_require__(272); + var isArray = __webpack_require__(88); + var anObject = __webpack_require__(2); + var isObject = __webpack_require__(5); + var toObject = __webpack_require__(11); + var toIObject = __webpack_require__(19); + var toPrimitive = __webpack_require__(31); + var createDesc = __webpack_require__(49); + var _create = __webpack_require__(53); + var gOPNExt = __webpack_require__(178); + var $GOPD = __webpack_require__(20); + var $GOPS = __webpack_require__(87); + var $DP = __webpack_require__(9); + var $keys = __webpack_require__(51); + var gOPD = $GOPD.f; + var dP = $DP.f; + var gOPN = gOPNExt.f; + var $Symbol = global.Symbol; + var $JSON = global.JSON; + var _stringify = $JSON && $JSON.stringify; + var PROTOTYPE = 'prototype'; + var HIDDEN = wks('_hidden'); + var TO_PRIMITIVE = wks('toPrimitive'); + var isEnum = {}.propertyIsEnumerable; + var SymbolRegistry = shared('symbol-registry'); + var AllSymbols = shared('symbols'); + var OPSymbols = shared('op-symbols'); + var ObjectProto = Object[PROTOTYPE]; + var USE_NATIVE = typeof $Symbol == 'function' && !!$GOPS.f; + var QObject = global.QObject; + // Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173 + var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild; + + // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687 + var setSymbolDesc = + DESCRIPTORS && + $fails(function () { + return ( + _create( + dP({}, 'a', { + get: function () { + return dP(this, 'a', { value: 7 }).a; + }, + }), + ).a != 7 + ); + }) + ? function (it, key, D) { + var protoDesc = gOPD(ObjectProto, key); + if (protoDesc) delete ObjectProto[key]; + dP(it, key, D); + if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc); + } + : dP; + + var wrap = function (tag) { + var sym = (AllSymbols[tag] = _create($Symbol[PROTOTYPE])); + sym._k = tag; + return sym; + }; + + var isSymbol = + USE_NATIVE && typeof $Symbol.iterator == 'symbol' + ? function (it) { + return typeof it == 'symbol'; + } + : function (it) { + return it instanceof $Symbol; + }; + + var $defineProperty = function defineProperty(it, key, D) { + if (it === ObjectProto) $defineProperty(OPSymbols, key, D); + anObject(it); + key = toPrimitive(key, true); + anObject(D); + if (has(AllSymbols, key)) { + if (!D.enumerable) { + if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {})); + it[HIDDEN][key] = true; + } else { + if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false; + D = _create(D, { enumerable: createDesc(0, false) }); + } + return setSymbolDesc(it, key, D); + } + return dP(it, key, D); + }; + var $defineProperties = function defineProperties(it, P) { + anObject(it); + var keys = enumKeys((P = toIObject(P))); + var i = 0; + var l = keys.length; + var key; + while (l > i) $defineProperty(it, (key = keys[i++]), P[key]); + return it; + }; + var $create = function create(it, P) { + return P === undefined ? _create(it) : $defineProperties(_create(it), P); + }; + var $propertyIsEnumerable = function propertyIsEnumerable(key) { + var E = isEnum.call(this, (key = toPrimitive(key, true))); + if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false; + return E || !has(this, key) || !has(AllSymbols, key) || (has(this, HIDDEN) && this[HIDDEN][key]) + ? E + : true; + }; + var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) { + it = toIObject(it); + key = toPrimitive(key, true); + if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return; + var D = gOPD(it, key); + if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true; + return D; + }; + var $getOwnPropertyNames = function getOwnPropertyNames(it) { + var names = gOPN(toIObject(it)); + var result = []; + var i = 0; + var key; + while (names.length > i) { + if (!has(AllSymbols, (key = names[i++])) && key != HIDDEN && key != META) result.push(key); + } + return result; + }; + var $getOwnPropertySymbols = function getOwnPropertySymbols(it) { + var IS_OP = it === ObjectProto; + var names = gOPN(IS_OP ? OPSymbols : toIObject(it)); + var result = []; + var i = 0; + var key; + while (names.length > i) { + if (has(AllSymbols, (key = names[i++])) && (IS_OP ? has(ObjectProto, key) : true)) + result.push(AllSymbols[key]); + } + return result; + }; + + // 19.4.1.1 Symbol([description]) + if (!USE_NATIVE) { + $Symbol = function Symbol() { + if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!'); + var tag = uid(arguments.length > 0 ? arguments[0] : undefined); + var $set = function (value) { + if (this === ObjectProto) $set.call(OPSymbols, value); + if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false; + setSymbolDesc(this, tag, createDesc(1, value)); + }; + if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set }); + return wrap(tag); + }; + redefine($Symbol[PROTOTYPE], 'toString', function toString() { + return this._k; + }); + + $GOPD.f = $getOwnPropertyDescriptor; + $DP.f = $defineProperty; + __webpack_require__(54).f = gOPNExt.f = $getOwnPropertyNames; + __webpack_require__(75).f = $propertyIsEnumerable; + $GOPS.f = $getOwnPropertySymbols; + + if (DESCRIPTORS && !__webpack_require__(41)) { + redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true); + } + + wksExt.f = function (name) { + return wrap(wks(name)); + }; + } + + $export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol }); + + for ( + var es6Symbols = + // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14 + 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'.split( + ',', + ), + j = 0; + es6Symbols.length > j; + + ) + wks(es6Symbols[j++]); + + for (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k; ) + wksDefine(wellKnownSymbols[k++]); + + $export($export.S + $export.F * !USE_NATIVE, 'Symbol', { + // 19.4.2.1 Symbol.for(key) + for: function (key) { + return has(SymbolRegistry, (key += '')) + ? SymbolRegistry[key] + : (SymbolRegistry[key] = $Symbol(key)); + }, + // 19.4.2.5 Symbol.keyFor(sym) + keyFor: function keyFor(sym) { + if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!'); + for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key; + }, + useSetter: function () { + setter = true; + }, + useSimple: function () { + setter = false; + }, + }); + + $export($export.S + $export.F * !USE_NATIVE, 'Object', { + // 19.1.2.2 Object.create(O [, Properties]) + create: $create, + // 19.1.2.4 Object.defineProperty(O, P, Attributes) + defineProperty: $defineProperty, + // 19.1.2.3 Object.defineProperties(O, Properties) + defineProperties: $defineProperties, + // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) + getOwnPropertyDescriptor: $getOwnPropertyDescriptor, + // 19.1.2.7 Object.getOwnPropertyNames(O) + getOwnPropertyNames: $getOwnPropertyNames, + // 19.1.2.8 Object.getOwnPropertySymbols(O) + getOwnPropertySymbols: $getOwnPropertySymbols, + }); + + // Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives + // https://bugs.chromium.org/p/v8/issues/detail?id=3443 + var FAILS_ON_PRIMITIVES = $fails(function () { + $GOPS.f(1); + }); + + $export($export.S + $export.F * FAILS_ON_PRIMITIVES, 'Object', { + getOwnPropertySymbols: function getOwnPropertySymbols(it) { + return $GOPS.f(toObject(it)); + }, + }); + + // 24.3.2 JSON.stringify(value [, replacer [, space]]) + $JSON && + $export( + $export.S + + $export.F * + (!USE_NATIVE || + $fails(function () { + var S = $Symbol(); + // MS Edge converts symbol values to JSON as {} + // WebKit converts symbol values to JSON as null + // V8 throws on boxed symbols + return ( + _stringify([S]) != '[null]' || + _stringify({ a: S }) != '{}' || + _stringify(Object(S)) != '{}' + ); + })), + 'JSON', + { + stringify: function stringify(it) { + var args = [it]; + var i = 1; + var replacer, $replacer; + while (arguments.length > i) args.push(arguments[i++]); + $replacer = replacer = args[1]; + if ((!isObject(replacer) && it === undefined) || isSymbol(it)) return; // IE8 returns string on undefined + if (!isArray(replacer)) + replacer = function (key, value) { + if (typeof $replacer == 'function') value = $replacer.call(this, key, value); + if (!isSymbol(value)) return value; + }; + args[1] = replacer; + return _stringify.apply($JSON, args); + }, + }, + ); + + // 19.4.3.4 Symbol.prototype[@@toPrimitive](hint) + $Symbol[PROTOTYPE][TO_PRIMITIVE] || + __webpack_require__(15)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf); + // 19.4.3.5 Symbol.prototype[@@toStringTag] + setToStringTag($Symbol, 'Symbol'); + // 20.2.1.9 Math[@@toStringTag] + setToStringTag(Math, 'Math', true); + // 24.3.3 JSON[@@toStringTag] + setToStringTag(global.JSON, 'JSON', true); + + /***/ + }, + /* 271 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = __webpack_require__(73)('native-function-to-string', Function.toString); + + /***/ + }, + /* 272 */ + /***/ function (module, exports, __webpack_require__) { + // all enumerable object keys, includes symbols + var getKeys = __webpack_require__(51); + var gOPS = __webpack_require__(87); + var pIE = __webpack_require__(75); + module.exports = function (it) { + var result = getKeys(it); + var getSymbols = gOPS.f; + if (getSymbols) { + var symbols = getSymbols(it); + var isEnum = pIE.f; + var i = 0; + var key; + while (symbols.length > i) if (isEnum.call(it, (key = symbols[i++]))) result.push(key); + } + return result; + }; + + /***/ + }, + /* 273 */ + /***/ function (module, exports, __webpack_require__) { + var $export = __webpack_require__(0); + // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) + $export($export.S, 'Object', { create: __webpack_require__(53) }); + + /***/ + }, + /* 274 */ + /***/ function (module, exports, __webpack_require__) { + var $export = __webpack_require__(0); + // 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes) + $export($export.S + $export.F * !__webpack_require__(8), 'Object', { + defineProperty: __webpack_require__(9).f, + }); + + /***/ + }, + /* 275 */ + /***/ function (module, exports, __webpack_require__) { + var $export = __webpack_require__(0); + // 19.1.2.3 / 15.2.3.7 Object.defineProperties(O, Properties) + $export($export.S + $export.F * !__webpack_require__(8), 'Object', { + defineProperties: __webpack_require__(177), + }); + + /***/ + }, + /* 276 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) + var toIObject = __webpack_require__(19); + var $getOwnPropertyDescriptor = __webpack_require__(20).f; + + __webpack_require__(33)('getOwnPropertyDescriptor', function () { + return function getOwnPropertyDescriptor(it, key) { + return $getOwnPropertyDescriptor(toIObject(it), key); + }; + }); + + /***/ + }, + /* 277 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.9 Object.getPrototypeOf(O) + var toObject = __webpack_require__(11); + var $getPrototypeOf = __webpack_require__(21); + + __webpack_require__(33)('getPrototypeOf', function () { + return function getPrototypeOf(it) { + return $getPrototypeOf(toObject(it)); + }; + }); + + /***/ + }, + /* 278 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.14 Object.keys(O) + var toObject = __webpack_require__(11); + var $keys = __webpack_require__(51); + + __webpack_require__(33)('keys', function () { + return function keys(it) { + return $keys(toObject(it)); + }; + }); + + /***/ + }, + /* 279 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.7 Object.getOwnPropertyNames(O) + __webpack_require__(33)('getOwnPropertyNames', function () { + return __webpack_require__(178).f; + }); + + /***/ + }, + /* 280 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.5 Object.freeze(O) + var isObject = __webpack_require__(5); + var meta = __webpack_require__(42).onFreeze; + + __webpack_require__(33)('freeze', function ($freeze) { + return function freeze(it) { + return $freeze && isObject(it) ? $freeze(meta(it)) : it; + }; + }); + + /***/ + }, + /* 281 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.17 Object.seal(O) + var isObject = __webpack_require__(5); + var meta = __webpack_require__(42).onFreeze; + + __webpack_require__(33)('seal', function ($seal) { + return function seal(it) { + return $seal && isObject(it) ? $seal(meta(it)) : it; + }; + }); + + /***/ + }, + /* 282 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.15 Object.preventExtensions(O) + var isObject = __webpack_require__(5); + var meta = __webpack_require__(42).onFreeze; + + __webpack_require__(33)('preventExtensions', function ($preventExtensions) { + return function preventExtensions(it) { + return $preventExtensions && isObject(it) ? $preventExtensions(meta(it)) : it; + }; + }); + + /***/ + }, + /* 283 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.12 Object.isFrozen(O) + var isObject = __webpack_require__(5); + + __webpack_require__(33)('isFrozen', function ($isFrozen) { + return function isFrozen(it) { + return isObject(it) ? ($isFrozen ? $isFrozen(it) : false) : true; + }; + }); + + /***/ + }, + /* 284 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.13 Object.isSealed(O) + var isObject = __webpack_require__(5); + + __webpack_require__(33)('isSealed', function ($isSealed) { + return function isSealed(it) { + return isObject(it) ? ($isSealed ? $isSealed(it) : false) : true; + }; + }); + + /***/ + }, + /* 285 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.11 Object.isExtensible(O) + var isObject = __webpack_require__(5); + + __webpack_require__(33)('isExtensible', function ($isExtensible) { + return function isExtensible(it) { + return isObject(it) ? ($isExtensible ? $isExtensible(it) : true) : false; + }; + }); + + /***/ + }, + /* 286 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.3.1 Object.assign(target, source) + var $export = __webpack_require__(0); + + $export($export.S + $export.F, 'Object', { assign: __webpack_require__(179) }); + + /***/ + }, + /* 287 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.3.10 Object.is(value1, value2) + var $export = __webpack_require__(0); + $export($export.S, 'Object', { is: __webpack_require__(180) }); + + /***/ + }, + /* 288 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.3.19 Object.setPrototypeOf(O, proto) + var $export = __webpack_require__(0); + $export($export.S, 'Object', { setPrototypeOf: __webpack_require__(117).set }); + + /***/ + }, + /* 289 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // 19.1.3.6 Object.prototype.toString() + var classof = __webpack_require__(65); + var test = {}; + test[__webpack_require__(6)('toStringTag')] = 'z'; + if (test + '' != '[object z]') { + __webpack_require__(16)( + Object.prototype, + 'toString', + function toString() { + return '[object ' + classof(this) + ']'; + }, + true, + ); + } + + /***/ + }, + /* 290 */ + /***/ function (module, exports, __webpack_require__) { + // 19.2.3.2 / 15.3.4.5 Function.prototype.bind(thisArg, args...) + var $export = __webpack_require__(0); + + $export($export.P, 'Function', { bind: __webpack_require__(181) }); + + /***/ + }, + /* 291 */ + /***/ function (module, exports, __webpack_require__) { + var dP = __webpack_require__(9).f; + var FProto = Function.prototype; + var nameRE = /^\s*function ([^ (]*)/; + var NAME = 'name'; + + // 19.2.4.2 name + NAME in FProto || + (__webpack_require__(8) && + dP(FProto, NAME, { + configurable: true, + get: function () { + try { + return ('' + this).match(nameRE)[1]; + } catch (e) { + return ''; + } + }, + })); + + /***/ + }, + /* 292 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var isObject = __webpack_require__(5); + var getPrototypeOf = __webpack_require__(21); + var HAS_INSTANCE = __webpack_require__(6)('hasInstance'); + var FunctionProto = Function.prototype; + // 19.2.3.6 Function.prototype[@@hasInstance](V) + if (!(HAS_INSTANCE in FunctionProto)) + __webpack_require__(9).f(FunctionProto, HAS_INSTANCE, { + value: function (O) { + if (typeof this != 'function' || !isObject(O)) return false; + if (!isObject(this.prototype)) return O instanceof this; + // for environment w/o native `@@hasInstance` logic enough `instanceof`, but add this: + while ((O = getPrototypeOf(O))) if (this.prototype === O) return true; + return false; + }, + }); + + /***/ + }, + /* 293 */ + /***/ function (module, exports, __webpack_require__) { + var $export = __webpack_require__(0); + var $parseInt = __webpack_require__(183); + // 18.2.5 parseInt(string, radix) + $export($export.G + $export.F * (parseInt != $parseInt), { parseInt: $parseInt }); + + /***/ + }, + /* 294 */ + /***/ function (module, exports, __webpack_require__) { + var $export = __webpack_require__(0); + var $parseFloat = __webpack_require__(184); + // 18.2.4 parseFloat(string) + $export($export.G + $export.F * (parseFloat != $parseFloat), { parseFloat: $parseFloat }); + + /***/ + }, + /* 295 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var global = __webpack_require__(3); + var has = __webpack_require__(18); + var cof = __webpack_require__(25); + var inheritIfRequired = __webpack_require__(119); + var toPrimitive = __webpack_require__(31); + var fails = __webpack_require__(4); + var gOPN = __webpack_require__(54).f; + var gOPD = __webpack_require__(20).f; + var dP = __webpack_require__(9).f; + var $trim = __webpack_require__(66).trim; + var NUMBER = 'Number'; + var $Number = global[NUMBER]; + var Base = $Number; + var proto = $Number.prototype; + // Opera ~12 has broken Object#toString + var BROKEN_COF = cof(__webpack_require__(53)(proto)) == NUMBER; + var TRIM = 'trim' in String.prototype; + + // 7.1.3 ToNumber(argument) + var toNumber = function (argument) { + var it = toPrimitive(argument, false); + if (typeof it == 'string' && it.length > 2) { + it = TRIM ? it.trim() : $trim(it, 3); + var first = it.charCodeAt(0); + var third, radix, maxCode; + if (first === 43 || first === 45) { + third = it.charCodeAt(2); + if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix + } else if (first === 48) { + switch (it.charCodeAt(1)) { + case 66: + case 98: + radix = 2; + maxCode = 49; + break; // fast equal /^0b[01]+$/i + case 79: + case 111: + radix = 8; + maxCode = 55; + break; // fast equal /^0o[0-7]+$/i + default: + return +it; + } + for (var digits = it.slice(2), i = 0, l = digits.length, code; i < l; i++) { + code = digits.charCodeAt(i); + // parseInt parses a string to a first unavailable symbol + // but ToNumber should return NaN if a string contains unavailable symbols + if (code < 48 || code > maxCode) return NaN; + } + return parseInt(digits, radix); + } + } + return +it; + }; + + if (!$Number(' 0o1') || !$Number('0b1') || $Number('+0x1')) { + $Number = function Number(value) { + var it = arguments.length < 1 ? 0 : value; + var that = this; + return that instanceof $Number && + // check on 1..constructor(foo) case + (BROKEN_COF + ? fails(function () { + proto.valueOf.call(that); + }) + : cof(that) != NUMBER) + ? inheritIfRequired(new Base(toNumber(it)), that, $Number) + : toNumber(it); + }; + for ( + var keys = __webpack_require__(8) + ? gOPN(Base) + : // ES3: + ( + 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' + + // ES6 (in case, if modules with ES6 Number statics required before): + 'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' + + 'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger' + ).split(','), + j = 0, + key; + keys.length > j; + j++ + ) { + if (has(Base, (key = keys[j])) && !has($Number, key)) { + dP($Number, key, gOPD(Base, key)); + } + } + $Number.prototype = proto; + proto.constructor = $Number; + __webpack_require__(16)(global, NUMBER, $Number); + } + + /***/ + }, + /* 296 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0); + var toInteger = __webpack_require__(26); + var aNumberValue = __webpack_require__(185); + var repeat = __webpack_require__(120); + var $toFixed = (1.0).toFixed; + var floor = Math.floor; + var data = [0, 0, 0, 0, 0, 0]; + var ERROR = 'Number.toFixed: incorrect invocation!'; + var ZERO = '0'; + + var multiply = function (n, c) { + var i = -1; + var c2 = c; + while (++i < 6) { + c2 += n * data[i]; + data[i] = c2 % 1e7; + c2 = floor(c2 / 1e7); + } + }; + var divide = function (n) { + var i = 6; + var c = 0; + while (--i >= 0) { + c += data[i]; + data[i] = floor(c / n); + c = (c % n) * 1e7; + } + }; + var numToString = function () { + var i = 6; + var s = ''; + while (--i >= 0) { + if (s !== '' || i === 0 || data[i] !== 0) { + var t = String(data[i]); + s = s === '' ? t : s + repeat.call(ZERO, 7 - t.length) + t; + } + } + return s; + }; + var pow = function (x, n, acc) { + return n === 0 ? acc : n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc); + }; + var log = function (x) { + var n = 0; + var x2 = x; + while (x2 >= 4096) { + n += 12; + x2 /= 4096; + } + while (x2 >= 2) { + n += 1; + x2 /= 2; + } + return n; + }; + + $export( + $export.P + + $export.F * + ((!!$toFixed && + ((0.00008).toFixed(3) !== '0.000' || + (0.9).toFixed(0) !== '1' || + (1.255).toFixed(2) !== '1.25' || + (1000000000000000128.0).toFixed(0) !== '1000000000000000128')) || + !__webpack_require__(4)(function () { + // V8 ~ Android 4.3- + $toFixed.call({}); + })), + 'Number', + { + toFixed: function toFixed(fractionDigits) { + var x = aNumberValue(this, ERROR); + var f = toInteger(fractionDigits); + var s = ''; + var m = ZERO; + var e, z, j, k; + if (f < 0 || f > 20) throw RangeError(ERROR); + // eslint-disable-next-line no-self-compare + if (x != x) return 'NaN'; + if (x <= -1e21 || x >= 1e21) return String(x); + if (x < 0) { + s = '-'; + x = -x; + } + if (x > 1e-21) { + e = log(x * pow(2, 69, 1)) - 69; + z = e < 0 ? x * pow(2, -e, 1) : x / pow(2, e, 1); + z *= 0x10000000000000; + e = 52 - e; + if (e > 0) { + multiply(0, z); + j = f; + while (j >= 7) { + multiply(1e7, 0); + j -= 7; + } + multiply(pow(10, j, 1), 0); + j = e - 1; + while (j >= 23) { + divide(1 << 23); + j -= 23; + } + divide(1 << j); + multiply(1, 1); + divide(2); + m = numToString(); + } else { + multiply(0, z); + multiply(1 << -e, 0); + m = numToString() + repeat.call(ZERO, f); + } + } + if (f > 0) { + k = m.length; + m = + s + (k <= f ? '0.' + repeat.call(ZERO, f - k) + m : m.slice(0, k - f) + '.' + m.slice(k - f)); + } else { + m = s + m; + } + return m; + }, + }, + ); + + /***/ + }, + /* 297 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0); + var $fails = __webpack_require__(4); + var aNumberValue = __webpack_require__(185); + var $toPrecision = (1.0).toPrecision; + + $export( + $export.P + + $export.F * + ($fails(function () { + // IE7- + return $toPrecision.call(1, undefined) !== '1'; + }) || + !$fails(function () { + // V8 ~ Android 4.3- + $toPrecision.call({}); + })), + 'Number', + { + toPrecision: function toPrecision(precision) { + var that = aNumberValue(this, 'Number#toPrecision: incorrect invocation!'); + return precision === undefined ? $toPrecision.call(that) : $toPrecision.call(that, precision); + }, + }, + ); + + /***/ + }, + /* 298 */ + /***/ function (module, exports, __webpack_require__) { + // 20.1.2.1 Number.EPSILON + var $export = __webpack_require__(0); + + $export($export.S, 'Number', { EPSILON: Math.pow(2, -52) }); + + /***/ + }, + /* 299 */ + /***/ function (module, exports, __webpack_require__) { + // 20.1.2.2 Number.isFinite(number) + var $export = __webpack_require__(0); + var _isFinite = __webpack_require__(3).isFinite; + + $export($export.S, 'Number', { + isFinite: function isFinite(it) { + return typeof it == 'number' && _isFinite(it); + }, + }); + + /***/ + }, + /* 300 */ + /***/ function (module, exports, __webpack_require__) { + // 20.1.2.3 Number.isInteger(number) + var $export = __webpack_require__(0); + + $export($export.S, 'Number', { isInteger: __webpack_require__(186) }); + + /***/ + }, + /* 301 */ + /***/ function (module, exports, __webpack_require__) { + // 20.1.2.4 Number.isNaN(number) + var $export = __webpack_require__(0); + + $export($export.S, 'Number', { + isNaN: function isNaN(number) { + // eslint-disable-next-line no-self-compare + return number != number; + }, + }); + + /***/ + }, + /* 302 */ + /***/ function (module, exports, __webpack_require__) { + // 20.1.2.5 Number.isSafeInteger(number) + var $export = __webpack_require__(0); + var isInteger = __webpack_require__(186); + var abs = Math.abs; + + $export($export.S, 'Number', { + isSafeInteger: function isSafeInteger(number) { + return isInteger(number) && abs(number) <= 0x1fffffffffffff; + }, + }); + + /***/ + }, + /* 303 */ + /***/ function (module, exports, __webpack_require__) { + // 20.1.2.6 Number.MAX_SAFE_INTEGER + var $export = __webpack_require__(0); + + $export($export.S, 'Number', { MAX_SAFE_INTEGER: 0x1fffffffffffff }); + + /***/ + }, + /* 304 */ + /***/ function (module, exports, __webpack_require__) { + // 20.1.2.10 Number.MIN_SAFE_INTEGER + var $export = __webpack_require__(0); + + $export($export.S, 'Number', { MIN_SAFE_INTEGER: -0x1fffffffffffff }); + + /***/ + }, + /* 305 */ + /***/ function (module, exports, __webpack_require__) { + var $export = __webpack_require__(0); + var $parseFloat = __webpack_require__(184); + // 20.1.2.12 Number.parseFloat(string) + $export($export.S + $export.F * (Number.parseFloat != $parseFloat), 'Number', { + parseFloat: $parseFloat, + }); + + /***/ + }, + /* 306 */ + /***/ function (module, exports, __webpack_require__) { + var $export = __webpack_require__(0); + var $parseInt = __webpack_require__(183); + // 20.1.2.13 Number.parseInt(string, radix) + $export($export.S + $export.F * (Number.parseInt != $parseInt), 'Number', { parseInt: $parseInt }); + + /***/ + }, + /* 307 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.3 Math.acosh(x) + var $export = __webpack_require__(0); + var log1p = __webpack_require__(187); + var sqrt = Math.sqrt; + var $acosh = Math.acosh; + + $export( + $export.S + + $export.F * + !( + $acosh && + // V8 bug: https://code.google.com/p/v8/issues/detail?id=3509 + Math.floor($acosh(Number.MAX_VALUE)) == 710 && + // Tor Browser bug: Math.acosh(Infinity) -> NaN + $acosh(Infinity) == Infinity + ), + 'Math', + { + acosh: function acosh(x) { + return (x = +x) < 1 + ? NaN + : x > 94906265.62425156 + ? Math.log(x) + Math.LN2 + : log1p(x - 1 + sqrt(x - 1) * sqrt(x + 1)); + }, + }, + ); + + /***/ + }, + /* 308 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.5 Math.asinh(x) + var $export = __webpack_require__(0); + var $asinh = Math.asinh; + + function asinh(x) { + return !isFinite((x = +x)) || x == 0 ? x : x < 0 ? -asinh(-x) : Math.log(x + Math.sqrt(x * x + 1)); + } + + // Tor Browser bug: Math.asinh(0) -> -0 + $export($export.S + $export.F * !($asinh && 1 / $asinh(0) > 0), 'Math', { asinh: asinh }); + + /***/ + }, + /* 309 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.7 Math.atanh(x) + var $export = __webpack_require__(0); + var $atanh = Math.atanh; + + // Tor Browser bug: Math.atanh(-0) -> 0 + $export($export.S + $export.F * !($atanh && 1 / $atanh(-0) < 0), 'Math', { + atanh: function atanh(x) { + return (x = +x) == 0 ? x : Math.log((1 + x) / (1 - x)) / 2; + }, + }); + + /***/ + }, + /* 310 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.9 Math.cbrt(x) + var $export = __webpack_require__(0); + var sign = __webpack_require__(121); + + $export($export.S, 'Math', { + cbrt: function cbrt(x) { + return sign((x = +x)) * Math.pow(Math.abs(x), 1 / 3); + }, + }); + + /***/ + }, + /* 311 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.11 Math.clz32(x) + var $export = __webpack_require__(0); + + $export($export.S, 'Math', { + clz32: function clz32(x) { + return (x >>>= 0) ? 31 - Math.floor(Math.log(x + 0.5) * Math.LOG2E) : 32; + }, + }); + + /***/ + }, + /* 312 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.12 Math.cosh(x) + var $export = __webpack_require__(0); + var exp = Math.exp; + + $export($export.S, 'Math', { + cosh: function cosh(x) { + return (exp((x = +x)) + exp(-x)) / 2; + }, + }); + + /***/ + }, + /* 313 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.14 Math.expm1(x) + var $export = __webpack_require__(0); + var $expm1 = __webpack_require__(122); + + $export($export.S + $export.F * ($expm1 != Math.expm1), 'Math', { expm1: $expm1 }); + + /***/ + }, + /* 314 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.16 Math.fround(x) + var $export = __webpack_require__(0); + + $export($export.S, 'Math', { fround: __webpack_require__(188) }); + + /***/ + }, + /* 315 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.17 Math.hypot([value1[, value2[, … ]]]) + var $export = __webpack_require__(0); + var abs = Math.abs; + + $export($export.S, 'Math', { + hypot: function hypot(value1, value2) { + // eslint-disable-line no-unused-vars + var sum = 0; + var i = 0; + var aLen = arguments.length; + var larg = 0; + var arg, div; + while (i < aLen) { + arg = abs(arguments[i++]); + if (larg < arg) { + div = larg / arg; + sum = sum * div * div + 1; + larg = arg; + } else if (arg > 0) { + div = arg / larg; + sum += div * div; + } else sum += arg; + } + return larg === Infinity ? Infinity : larg * Math.sqrt(sum); + }, + }); + + /***/ + }, + /* 316 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.18 Math.imul(x, y) + var $export = __webpack_require__(0); + var $imul = Math.imul; + + // some WebKit versions fails with big numbers, some has wrong arity + $export( + $export.S + + $export.F * + __webpack_require__(4)(function () { + return $imul(0xffffffff, 5) != -5 || $imul.length != 2; + }), + 'Math', + { + imul: function imul(x, y) { + var UINT16 = 0xffff; + var xn = +x; + var yn = +y; + var xl = UINT16 & xn; + var yl = UINT16 & yn; + return ( + 0 | (xl * yl + ((((UINT16 & (xn >>> 16)) * yl + xl * (UINT16 & (yn >>> 16))) << 16) >>> 0)) + ); + }, + }, + ); + + /***/ + }, + /* 317 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.21 Math.log10(x) + var $export = __webpack_require__(0); + + $export($export.S, 'Math', { + log10: function log10(x) { + return Math.log(x) * Math.LOG10E; + }, + }); + + /***/ + }, + /* 318 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.20 Math.log1p(x) + var $export = __webpack_require__(0); + + $export($export.S, 'Math', { log1p: __webpack_require__(187) }); + + /***/ + }, + /* 319 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.22 Math.log2(x) + var $export = __webpack_require__(0); + + $export($export.S, 'Math', { + log2: function log2(x) { + return Math.log(x) / Math.LN2; + }, + }); + + /***/ + }, + /* 320 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.28 Math.sign(x) + var $export = __webpack_require__(0); + + $export($export.S, 'Math', { sign: __webpack_require__(121) }); + + /***/ + }, + /* 321 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.30 Math.sinh(x) + var $export = __webpack_require__(0); + var expm1 = __webpack_require__(122); + var exp = Math.exp; + + // V8 near Chromium 38 has a problem with very small numbers + $export( + $export.S + + $export.F * + __webpack_require__(4)(function () { + return !Math.sinh(-2e-17) != -2e-17; + }), + 'Math', + { + sinh: function sinh(x) { + return Math.abs((x = +x)) < 1 + ? (expm1(x) - expm1(-x)) / 2 + : (exp(x - 1) - exp(-x - 1)) * (Math.E / 2); + }, + }, + ); + + /***/ + }, + /* 322 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.33 Math.tanh(x) + var $export = __webpack_require__(0); + var expm1 = __webpack_require__(122); + var exp = Math.exp; + + $export($export.S, 'Math', { + tanh: function tanh(x) { + var a = expm1((x = +x)); + var b = expm1(-x); + return a == Infinity ? 1 : b == Infinity ? -1 : (a - b) / (exp(x) + exp(-x)); + }, + }); + + /***/ + }, + /* 323 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.34 Math.trunc(x) + var $export = __webpack_require__(0); + + $export($export.S, 'Math', { + trunc: function trunc(it) { + return (it > 0 ? Math.floor : Math.ceil)(it); + }, + }); + + /***/ + }, + /* 324 */ + /***/ function (module, exports, __webpack_require__) { + var $export = __webpack_require__(0); + var toAbsoluteIndex = __webpack_require__(52); + var fromCharCode = String.fromCharCode; + var $fromCodePoint = String.fromCodePoint; + + // length should be 1, old FF problem + $export($export.S + $export.F * (!!$fromCodePoint && $fromCodePoint.length != 1), 'String', { + // 21.1.2.2 String.fromCodePoint(...codePoints) + fromCodePoint: function fromCodePoint(x) { + // eslint-disable-line no-unused-vars + var res = []; + var aLen = arguments.length; + var i = 0; + var code; + while (aLen > i) { + code = +arguments[i++]; + if (toAbsoluteIndex(code, 0x10ffff) !== code) + throw RangeError(code + ' is not a valid code point'); + res.push( + code < 0x10000 + ? fromCharCode(code) + : fromCharCode(((code -= 0x10000) >> 10) + 0xd800, (code % 0x400) + 0xdc00), + ); + } + return res.join(''); + }, + }); + + /***/ + }, + /* 325 */ + /***/ function (module, exports, __webpack_require__) { + var $export = __webpack_require__(0); + var toIObject = __webpack_require__(19); + var toLength = __webpack_require__(7); + + $export($export.S, 'String', { + // 21.1.2.4 String.raw(callSite, ...substitutions) + raw: function raw(callSite) { + var tpl = toIObject(callSite.raw); + var len = toLength(tpl.length); + var aLen = arguments.length; + var res = []; + var i = 0; + while (len > i) { + res.push(String(tpl[i++])); + if (i < aLen) res.push(String(arguments[i])); + } + return res.join(''); + }, + }); + + /***/ + }, + /* 326 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // 21.1.3.25 String.prototype.trim() + __webpack_require__(66)('trim', function ($trim) { + return function trim() { + return $trim(this, 3); + }; + }); + + /***/ + }, + /* 327 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $at = __webpack_require__(89)(true); + + // 21.1.3.27 String.prototype[@@iterator]() + __webpack_require__(123)( + String, + 'String', + function (iterated) { + this._t = String(iterated); // target + this._i = 0; // next index + // 21.1.5.2.1 %StringIteratorPrototype%.next() + }, + function () { + var O = this._t; + var index = this._i; + var point; + if (index >= O.length) return { value: undefined, done: true }; + point = $at(O, index); + this._i += point.length; + return { value: point, done: false }; + }, + ); + + /***/ + }, + /* 328 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0); + var $at = __webpack_require__(89)(false); + $export($export.P, 'String', { + // 21.1.3.3 String.prototype.codePointAt(pos) + codePointAt: function codePointAt(pos) { + return $at(this, pos); + }, + }); + + /***/ + }, + /* 329 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + // 21.1.3.6 String.prototype.endsWith(searchString [, endPosition]) + + var $export = __webpack_require__(0); + var toLength = __webpack_require__(7); + var context = __webpack_require__(125); + var ENDS_WITH = 'endsWith'; + var $endsWith = ''[ENDS_WITH]; + + $export($export.P + $export.F * __webpack_require__(126)(ENDS_WITH), 'String', { + endsWith: function endsWith(searchString /* , endPosition = @length */) { + var that = context(this, searchString, ENDS_WITH); + var endPosition = arguments.length > 1 ? arguments[1] : undefined; + var len = toLength(that.length); + var end = endPosition === undefined ? len : Math.min(toLength(endPosition), len); + var search = String(searchString); + return $endsWith + ? $endsWith.call(that, search, end) + : that.slice(end - search.length, end) === search; + }, + }); + + /***/ + }, + /* 330 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + // 21.1.3.7 String.prototype.includes(searchString, position = 0) + + var $export = __webpack_require__(0); + var context = __webpack_require__(125); + var INCLUDES = 'includes'; + + $export($export.P + $export.F * __webpack_require__(126)(INCLUDES), 'String', { + includes: function includes(searchString /* , position = 0 */) { + return !!~context(this, searchString, INCLUDES).indexOf( + searchString, + arguments.length > 1 ? arguments[1] : undefined, + ); + }, + }); + + /***/ + }, + /* 331 */ + /***/ function (module, exports, __webpack_require__) { + var $export = __webpack_require__(0); + + $export($export.P, 'String', { + // 21.1.3.13 String.prototype.repeat(count) + repeat: __webpack_require__(120), + }); + + /***/ + }, + /* 332 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + // 21.1.3.18 String.prototype.startsWith(searchString [, position ]) + + var $export = __webpack_require__(0); + var toLength = __webpack_require__(7); + var context = __webpack_require__(125); + var STARTS_WITH = 'startsWith'; + var $startsWith = ''[STARTS_WITH]; + + $export($export.P + $export.F * __webpack_require__(126)(STARTS_WITH), 'String', { + startsWith: function startsWith(searchString /* , position = 0 */) { + var that = context(this, searchString, STARTS_WITH); + var index = toLength(Math.min(arguments.length > 1 ? arguments[1] : undefined, that.length)); + var search = String(searchString); + return $startsWith + ? $startsWith.call(that, search, index) + : that.slice(index, index + search.length) === search; + }, + }); + + /***/ + }, + /* 333 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // B.2.3.2 String.prototype.anchor(name) + __webpack_require__(17)('anchor', function (createHTML) { + return function anchor(name) { + return createHTML(this, 'a', 'name', name); + }; + }); + + /***/ + }, + /* 334 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // B.2.3.3 String.prototype.big() + __webpack_require__(17)('big', function (createHTML) { + return function big() { + return createHTML(this, 'big', '', ''); + }; + }); + + /***/ + }, + /* 335 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // B.2.3.4 String.prototype.blink() + __webpack_require__(17)('blink', function (createHTML) { + return function blink() { + return createHTML(this, 'blink', '', ''); + }; + }); + + /***/ + }, + /* 336 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // B.2.3.5 String.prototype.bold() + __webpack_require__(17)('bold', function (createHTML) { + return function bold() { + return createHTML(this, 'b', '', ''); + }; + }); + + /***/ + }, + /* 337 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // B.2.3.6 String.prototype.fixed() + __webpack_require__(17)('fixed', function (createHTML) { + return function fixed() { + return createHTML(this, 'tt', '', ''); + }; + }); + + /***/ + }, + /* 338 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // B.2.3.7 String.prototype.fontcolor(color) + __webpack_require__(17)('fontcolor', function (createHTML) { + return function fontcolor(color) { + return createHTML(this, 'font', 'color', color); + }; + }); + + /***/ + }, + /* 339 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // B.2.3.8 String.prototype.fontsize(size) + __webpack_require__(17)('fontsize', function (createHTML) { + return function fontsize(size) { + return createHTML(this, 'font', 'size', size); + }; + }); + + /***/ + }, + /* 340 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // B.2.3.9 String.prototype.italics() + __webpack_require__(17)('italics', function (createHTML) { + return function italics() { + return createHTML(this, 'i', '', ''); + }; + }); + + /***/ + }, + /* 341 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // B.2.3.10 String.prototype.link(url) + __webpack_require__(17)('link', function (createHTML) { + return function link(url) { + return createHTML(this, 'a', 'href', url); + }; + }); + + /***/ + }, + /* 342 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // B.2.3.11 String.prototype.small() + __webpack_require__(17)('small', function (createHTML) { + return function small() { + return createHTML(this, 'small', '', ''); + }; + }); + + /***/ + }, + /* 343 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // B.2.3.12 String.prototype.strike() + __webpack_require__(17)('strike', function (createHTML) { + return function strike() { + return createHTML(this, 'strike', '', ''); + }; + }); + + /***/ + }, + /* 344 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // B.2.3.13 String.prototype.sub() + __webpack_require__(17)('sub', function (createHTML) { + return function sub() { + return createHTML(this, 'sub', '', ''); + }; + }); + + /***/ + }, + /* 345 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // B.2.3.14 String.prototype.sup() + __webpack_require__(17)('sup', function (createHTML) { + return function sup() { + return createHTML(this, 'sup', '', ''); + }; + }); + + /***/ + }, + /* 346 */ + /***/ function (module, exports, __webpack_require__) { + // 20.3.3.1 / 15.9.4.4 Date.now() + var $export = __webpack_require__(0); + + $export($export.S, 'Date', { + now: function () { + return new Date().getTime(); + }, + }); + + /***/ + }, + /* 347 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0); + var toObject = __webpack_require__(11); + var toPrimitive = __webpack_require__(31); + + $export( + $export.P + + $export.F * + __webpack_require__(4)(function () { + return ( + new Date(NaN).toJSON() !== null || + Date.prototype.toJSON.call({ + toISOString: function () { + return 1; + }, + }) !== 1 + ); + }), + 'Date', + { + // eslint-disable-next-line no-unused-vars + toJSON: function toJSON(key) { + var O = toObject(this); + var pv = toPrimitive(O); + return typeof pv == 'number' && !isFinite(pv) ? null : O.toISOString(); + }, + }, + ); + + /***/ + }, + /* 348 */ + /***/ function (module, exports, __webpack_require__) { + // 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString() + var $export = __webpack_require__(0); + var toISOString = __webpack_require__(349); + + // PhantomJS / old WebKit has a broken implementations + $export($export.P + $export.F * (Date.prototype.toISOString !== toISOString), 'Date', { + toISOString: toISOString, + }); + + /***/ + }, + /* 349 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString() + var fails = __webpack_require__(4); + var getTime = Date.prototype.getTime; + var $toISOString = Date.prototype.toISOString; + + var lz = function (num) { + return num > 9 ? num : '0' + num; + }; + + // PhantomJS / old WebKit has a broken implementations + module.exports = + fails(function () { + return $toISOString.call(new Date(-5e13 - 1)) != '0385-07-25T07:06:39.999Z'; + }) || + !fails(function () { + $toISOString.call(new Date(NaN)); + }) + ? function toISOString() { + if (!isFinite(getTime.call(this))) throw RangeError('Invalid time value'); + var d = this; + var y = d.getUTCFullYear(); + var m = d.getUTCMilliseconds(); + var s = y < 0 ? '-' : y > 9999 ? '+' : ''; + return ( + s + + ('00000' + Math.abs(y)).slice(s ? -6 : -4) + + '-' + + lz(d.getUTCMonth() + 1) + + '-' + + lz(d.getUTCDate()) + + 'T' + + lz(d.getUTCHours()) + + ':' + + lz(d.getUTCMinutes()) + + ':' + + lz(d.getUTCSeconds()) + + '.' + + (m > 99 ? m : '0' + lz(m)) + + 'Z' + ); + } + : $toISOString; + + /***/ + }, + /* 350 */ + /***/ function (module, exports, __webpack_require__) { + var DateProto = Date.prototype; + var INVALID_DATE = 'Invalid Date'; + var TO_STRING = 'toString'; + var $toString = DateProto[TO_STRING]; + var getTime = DateProto.getTime; + if (new Date(NaN) + '' != INVALID_DATE) { + __webpack_require__(16)(DateProto, TO_STRING, function toString() { + var value = getTime.call(this); + // eslint-disable-next-line no-self-compare + return value === value ? $toString.call(this) : INVALID_DATE; + }); + } + + /***/ + }, + /* 351 */ + /***/ function (module, exports, __webpack_require__) { + var TO_PRIMITIVE = __webpack_require__(6)('toPrimitive'); + var proto = Date.prototype; + + if (!(TO_PRIMITIVE in proto)) __webpack_require__(15)(proto, TO_PRIMITIVE, __webpack_require__(352)); + + /***/ + }, + /* 352 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var anObject = __webpack_require__(2); + var toPrimitive = __webpack_require__(31); + var NUMBER = 'number'; + + module.exports = function (hint) { + if (hint !== 'string' && hint !== NUMBER && hint !== 'default') throw TypeError('Incorrect hint'); + return toPrimitive(anObject(this), hint != NUMBER); + }; + + /***/ + }, + /* 353 */ + /***/ function (module, exports, __webpack_require__) { + // 22.1.2.2 / 15.4.3.2 Array.isArray(arg) + var $export = __webpack_require__(0); + + $export($export.S, 'Array', { isArray: __webpack_require__(88) }); + + /***/ + }, + /* 354 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var ctx = __webpack_require__(24); + var $export = __webpack_require__(0); + var toObject = __webpack_require__(11); + var call = __webpack_require__(189); + var isArrayIter = __webpack_require__(127); + var toLength = __webpack_require__(7); + var createProperty = __webpack_require__(128); + var getIterFn = __webpack_require__(129); + + $export( + $export.S + + $export.F * + !__webpack_require__(91)(function (iter) { + Array.from(iter); + }), + 'Array', + { + // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined) + from: function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) { + var O = toObject(arrayLike); + var C = typeof this == 'function' ? this : Array; + var aLen = arguments.length; + var mapfn = aLen > 1 ? arguments[1] : undefined; + var mapping = mapfn !== undefined; + var index = 0; + var iterFn = getIterFn(O); + var length, result, step, iterator; + if (mapping) mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2); + // if object isn't iterable or it's array with default iterator - use simple case + if (iterFn != undefined && !(C == Array && isArrayIter(iterFn))) { + for (iterator = iterFn.call(O), result = new C(); !(step = iterator.next()).done; index++) { + createProperty( + result, + index, + mapping ? call(iterator, mapfn, [step.value, index], true) : step.value, + ); + } + } else { + length = toLength(O.length); + for (result = new C(length); length > index; index++) { + createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]); + } + } + result.length = index; + return result; + }, + }, + ); + + /***/ + }, + /* 355 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0); + var createProperty = __webpack_require__(128); + + // WebKit Array.of isn't generic + $export( + $export.S + + $export.F * + __webpack_require__(4)(function () { + function F() { + /* empty */ + } + return !(Array.of.call(F) instanceof F); + }), + 'Array', + { + // 22.1.2.3 Array.of( ...items) + of: function of(/* ...args */) { + var index = 0; + var aLen = arguments.length; + var result = new (typeof this == 'function' ? this : Array)(aLen); + while (aLen > index) createProperty(result, index, arguments[index++]); + result.length = aLen; + return result; + }, + }, + ); + + /***/ + }, + /* 356 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // 22.1.3.13 Array.prototype.join(separator) + var $export = __webpack_require__(0); + var toIObject = __webpack_require__(19); + var arrayJoin = [].join; + + // fallback for not array-like strings + $export( + $export.P + $export.F * (__webpack_require__(74) != Object || !__webpack_require__(27)(arrayJoin)), + 'Array', + { + join: function join(separator) { + return arrayJoin.call(toIObject(this), separator === undefined ? ',' : separator); + }, + }, + ); + + /***/ + }, + /* 357 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0); + var html = __webpack_require__(116); + var cof = __webpack_require__(25); + var toAbsoluteIndex = __webpack_require__(52); + var toLength = __webpack_require__(7); + var arraySlice = [].slice; + + // fallback for not array-like ES3 strings and DOM objects + $export( + $export.P + + $export.F * + __webpack_require__(4)(function () { + if (html) arraySlice.call(html); + }), + 'Array', + { + slice: function slice(begin, end) { + var len = toLength(this.length); + var klass = cof(this); + end = end === undefined ? len : end; + if (klass == 'Array') return arraySlice.call(this, begin, end); + var start = toAbsoluteIndex(begin, len); + var upTo = toAbsoluteIndex(end, len); + var size = toLength(upTo - start); + var cloned = new Array(size); + var i = 0; + for (; i < size; i++) cloned[i] = klass == 'String' ? this.charAt(start + i) : this[start + i]; + return cloned; + }, + }, + ); + + /***/ + }, + /* 358 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0); + var aFunction = __webpack_require__(12); + var toObject = __webpack_require__(11); + var fails = __webpack_require__(4); + var $sort = [].sort; + var test = [1, 2, 3]; + + $export( + $export.P + + $export.F * + (fails(function () { + // IE8- + test.sort(undefined); + }) || + !fails(function () { + // V8 bug + test.sort(null); + // Old WebKit + }) || + !__webpack_require__(27)($sort)), + 'Array', + { + // 22.1.3.25 Array.prototype.sort(comparefn) + sort: function sort(comparefn) { + return comparefn === undefined + ? $sort.call(toObject(this)) + : $sort.call(toObject(this), aFunction(comparefn)); + }, + }, + ); + + /***/ + }, + /* 359 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0); + var $forEach = __webpack_require__(34)(0); + var STRICT = __webpack_require__(27)([].forEach, true); + + $export($export.P + $export.F * !STRICT, 'Array', { + // 22.1.3.10 / 15.4.4.18 Array.prototype.forEach(callbackfn [, thisArg]) + forEach: function forEach(callbackfn /* , thisArg */) { + return $forEach(this, callbackfn, arguments[1]); + }, + }); + + /***/ + }, + /* 360 */ + /***/ function (module, exports, __webpack_require__) { + var isObject = __webpack_require__(5); + var isArray = __webpack_require__(88); + var SPECIES = __webpack_require__(6)('species'); + + module.exports = function (original) { + var C; + if (isArray(original)) { + C = original.constructor; + // cross-realm fallback + if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined; + if (isObject(C)) { + C = C[SPECIES]; + if (C === null) C = undefined; + } + } + return C === undefined ? Array : C; + }; + + /***/ + }, + /* 361 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0); + var $map = __webpack_require__(34)(1); + + $export($export.P + $export.F * !__webpack_require__(27)([].map, true), 'Array', { + // 22.1.3.15 / 15.4.4.19 Array.prototype.map(callbackfn [, thisArg]) + map: function map(callbackfn /* , thisArg */) { + return $map(this, callbackfn, arguments[1]); + }, + }); + + /***/ + }, + /* 362 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0); + var $filter = __webpack_require__(34)(2); + + $export($export.P + $export.F * !__webpack_require__(27)([].filter, true), 'Array', { + // 22.1.3.7 / 15.4.4.20 Array.prototype.filter(callbackfn [, thisArg]) + filter: function filter(callbackfn /* , thisArg */) { + return $filter(this, callbackfn, arguments[1]); + }, + }); + + /***/ + }, + /* 363 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0); + var $some = __webpack_require__(34)(3); + + $export($export.P + $export.F * !__webpack_require__(27)([].some, true), 'Array', { + // 22.1.3.23 / 15.4.4.17 Array.prototype.some(callbackfn [, thisArg]) + some: function some(callbackfn /* , thisArg */) { + return $some(this, callbackfn, arguments[1]); + }, + }); + + /***/ + }, + /* 364 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0); + var $every = __webpack_require__(34)(4); + + $export($export.P + $export.F * !__webpack_require__(27)([].every, true), 'Array', { + // 22.1.3.5 / 15.4.4.16 Array.prototype.every(callbackfn [, thisArg]) + every: function every(callbackfn /* , thisArg */) { + return $every(this, callbackfn, arguments[1]); + }, + }); + + /***/ + }, + /* 365 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0); + var $reduce = __webpack_require__(190); + + $export($export.P + $export.F * !__webpack_require__(27)([].reduce, true), 'Array', { + // 22.1.3.18 / 15.4.4.21 Array.prototype.reduce(callbackfn [, initialValue]) + reduce: function reduce(callbackfn /* , initialValue */) { + return $reduce(this, callbackfn, arguments.length, arguments[1], false); + }, + }); + + /***/ + }, + /* 366 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0); + var $reduce = __webpack_require__(190); + + $export($export.P + $export.F * !__webpack_require__(27)([].reduceRight, true), 'Array', { + // 22.1.3.19 / 15.4.4.22 Array.prototype.reduceRight(callbackfn [, initialValue]) + reduceRight: function reduceRight(callbackfn /* , initialValue */) { + return $reduce(this, callbackfn, arguments.length, arguments[1], true); + }, + }); + + /***/ + }, + /* 367 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0); + var $indexOf = __webpack_require__(86)(false); + var $native = [].indexOf; + var NEGATIVE_ZERO = !!$native && 1 / [1].indexOf(1, -0) < 0; + + $export($export.P + $export.F * (NEGATIVE_ZERO || !__webpack_require__(27)($native)), 'Array', { + // 22.1.3.11 / 15.4.4.14 Array.prototype.indexOf(searchElement [, fromIndex]) + indexOf: function indexOf(searchElement /* , fromIndex = 0 */) { + return NEGATIVE_ZERO + ? // convert -0 to +0 + $native.apply(this, arguments) || 0 + : $indexOf(this, searchElement, arguments[1]); + }, + }); + + /***/ + }, + /* 368 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0); + var toIObject = __webpack_require__(19); + var toInteger = __webpack_require__(26); + var toLength = __webpack_require__(7); + var $native = [].lastIndexOf; + var NEGATIVE_ZERO = !!$native && 1 / [1].lastIndexOf(1, -0) < 0; + + $export($export.P + $export.F * (NEGATIVE_ZERO || !__webpack_require__(27)($native)), 'Array', { + // 22.1.3.14 / 15.4.4.15 Array.prototype.lastIndexOf(searchElement [, fromIndex]) + lastIndexOf: function lastIndexOf(searchElement /* , fromIndex = @[*-1] */) { + // convert -0 to +0 + if (NEGATIVE_ZERO) return $native.apply(this, arguments) || 0; + var O = toIObject(this); + var length = toLength(O.length); + var index = length - 1; + if (arguments.length > 1) index = Math.min(index, toInteger(arguments[1])); + if (index < 0) index = length + index; + for (; index >= 0; index--) if (index in O) if (O[index] === searchElement) return index || 0; + return -1; + }, + }); + + /***/ + }, + /* 369 */ + /***/ function (module, exports, __webpack_require__) { + // 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length) + var $export = __webpack_require__(0); + + $export($export.P, 'Array', { copyWithin: __webpack_require__(191) }); + + __webpack_require__(43)('copyWithin'); + + /***/ + }, + /* 370 */ + /***/ function (module, exports, __webpack_require__) { + // 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length) + var $export = __webpack_require__(0); + + $export($export.P, 'Array', { fill: __webpack_require__(131) }); + + __webpack_require__(43)('fill'); + + /***/ + }, + /* 371 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // 22.1.3.8 Array.prototype.find(predicate, thisArg = undefined) + var $export = __webpack_require__(0); + var $find = __webpack_require__(34)(5); + var KEY = 'find'; + var forced = true; + // Shouldn't skip holes + if (KEY in []) + Array(1)[KEY](function () { + forced = false; + }); + $export($export.P + $export.F * forced, 'Array', { + find: function find(callbackfn /* , that = undefined */) { + return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); + }, + }); + __webpack_require__(43)(KEY); + + /***/ + }, + /* 372 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // 22.1.3.9 Array.prototype.findIndex(predicate, thisArg = undefined) + var $export = __webpack_require__(0); + var $find = __webpack_require__(34)(6); + var KEY = 'findIndex'; + var forced = true; + // Shouldn't skip holes + if (KEY in []) + Array(1)[KEY](function () { + forced = false; + }); + $export($export.P + $export.F * forced, 'Array', { + findIndex: function findIndex(callbackfn /* , that = undefined */) { + return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); + }, + }); + __webpack_require__(43)(KEY); + + /***/ + }, + /* 373 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(55)('Array'); + + /***/ + }, + /* 374 */ + /***/ function (module, exports, __webpack_require__) { + var global = __webpack_require__(3); + var inheritIfRequired = __webpack_require__(119); + var dP = __webpack_require__(9).f; + var gOPN = __webpack_require__(54).f; + var isRegExp = __webpack_require__(90); + var $flags = __webpack_require__(76); + var $RegExp = global.RegExp; + var Base = $RegExp; + var proto = $RegExp.prototype; + var re1 = /a/g; + var re2 = /a/g; + // "new" creates a new object, old webkit buggy here + var CORRECT_NEW = new $RegExp(re1) !== re1; + + if ( + __webpack_require__(8) && + (!CORRECT_NEW || + __webpack_require__(4)(function () { + re2[__webpack_require__(6)('match')] = false; + // RegExp constructor can alter flags and IsRegExp works correct with @@match + return $RegExp(re1) != re1 || $RegExp(re2) == re2 || $RegExp(re1, 'i') != '/a/i'; + })) + ) { + $RegExp = function RegExp(p, f) { + var tiRE = this instanceof $RegExp; + var piRE = isRegExp(p); + var fiU = f === undefined; + return !tiRE && piRE && p.constructor === $RegExp && fiU + ? p + : inheritIfRequired( + CORRECT_NEW + ? new Base(piRE && !fiU ? p.source : p, f) + : Base((piRE = p instanceof $RegExp) ? p.source : p, piRE && fiU ? $flags.call(p) : f), + tiRE ? this : proto, + $RegExp, + ); + }; + var proxy = function (key) { + key in $RegExp || + dP($RegExp, key, { + configurable: true, + get: function () { + return Base[key]; + }, + set: function (it) { + Base[key] = it; + }, + }); + }; + for (var keys = gOPN(Base), i = 0; keys.length > i; ) proxy(keys[i++]); + proto.constructor = $RegExp; + $RegExp.prototype = proto; + __webpack_require__(16)(global, 'RegExp', $RegExp); + } + + __webpack_require__(55)('RegExp'); + + /***/ + }, + /* 375 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + __webpack_require__(194); + var anObject = __webpack_require__(2); + var $flags = __webpack_require__(76); + var DESCRIPTORS = __webpack_require__(8); + var TO_STRING = 'toString'; + var $toString = /./[TO_STRING]; + + var define = function (fn) { + __webpack_require__(16)(RegExp.prototype, TO_STRING, fn, true); + }; + + // 21.2.5.14 RegExp.prototype.toString() + if ( + __webpack_require__(4)(function () { + return $toString.call({ source: 'a', flags: 'b' }) != '/a/b'; + }) + ) { + define(function toString() { + var R = anObject(this); + return '/'.concat( + R.source, + '/', + 'flags' in R ? R.flags : !DESCRIPTORS && R instanceof RegExp ? $flags.call(R) : undefined, + ); + }); + // FF44- RegExp#toString has a wrong name + } else if ($toString.name != TO_STRING) { + define(function toString() { + return $toString.call(this); + }); + } + + /***/ + }, + /* 376 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var anObject = __webpack_require__(2); + var toLength = __webpack_require__(7); + var advanceStringIndex = __webpack_require__(134); + var regExpExec = __webpack_require__(92); + + // @@match logic + __webpack_require__(93)('match', 1, function (defined, MATCH, $match, maybeCallNative) { + return [ + // `String.prototype.match` method + // https://tc39.github.io/ecma262/#sec-string.prototype.match + function match(regexp) { + var O = defined(this); + var fn = regexp == undefined ? undefined : regexp[MATCH]; + return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[MATCH](String(O)); + }, + // `RegExp.prototype[@@match]` method + // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@match + function (regexp) { + var res = maybeCallNative($match, regexp, this); + if (res.done) return res.value; + var rx = anObject(regexp); + var S = String(this); + if (!rx.global) return regExpExec(rx, S); + var fullUnicode = rx.unicode; + rx.lastIndex = 0; + var A = []; + var n = 0; + var result; + while ((result = regExpExec(rx, S)) !== null) { + var matchStr = String(result[0]); + A[n] = matchStr; + if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode); + n++; + } + return n === 0 ? null : A; + }, + ]; + }); + + /***/ + }, + /* 377 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var anObject = __webpack_require__(2); + var toObject = __webpack_require__(11); + var toLength = __webpack_require__(7); + var toInteger = __webpack_require__(26); + var advanceStringIndex = __webpack_require__(134); + var regExpExec = __webpack_require__(92); + var max = Math.max; + var min = Math.min; + var floor = Math.floor; + var SUBSTITUTION_SYMBOLS = /\$([$&`']|\d\d?|<[^>]*>)/g; + var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&`']|\d\d?)/g; + + var maybeToString = function (it) { + return it === undefined ? it : String(it); + }; + + // @@replace logic + __webpack_require__(93)('replace', 2, function (defined, REPLACE, $replace, maybeCallNative) { + return [ + // `String.prototype.replace` method + // https://tc39.github.io/ecma262/#sec-string.prototype.replace + function replace(searchValue, replaceValue) { + var O = defined(this); + var fn = searchValue == undefined ? undefined : searchValue[REPLACE]; + return fn !== undefined + ? fn.call(searchValue, O, replaceValue) + : $replace.call(String(O), searchValue, replaceValue); + }, + // `RegExp.prototype[@@replace]` method + // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@replace + function (regexp, replaceValue) { + var res = maybeCallNative($replace, regexp, this, replaceValue); + if (res.done) return res.value; + + var rx = anObject(regexp); + var S = String(this); + var functionalReplace = typeof replaceValue === 'function'; + if (!functionalReplace) replaceValue = String(replaceValue); + var global = rx.global; + if (global) { + var fullUnicode = rx.unicode; + rx.lastIndex = 0; + } + var results = []; + while (true) { + var result = regExpExec(rx, S); + if (result === null) break; + results.push(result); + if (!global) break; + var matchStr = String(result[0]); + if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode); + } + var accumulatedResult = ''; + var nextSourcePosition = 0; + for (var i = 0; i < results.length; i++) { + result = results[i]; + var matched = String(result[0]); + var position = max(min(toInteger(result.index), S.length), 0); + var captures = []; + // NOTE: This is equivalent to + // captures = result.slice(1).map(maybeToString) + // but for some reason `nativeSlice.call(result, 1, result.length)` (called in + // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and + // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it. + for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j])); + var namedCaptures = result.groups; + if (functionalReplace) { + var replacerArgs = [matched].concat(captures, position, S); + if (namedCaptures !== undefined) replacerArgs.push(namedCaptures); + var replacement = String(replaceValue.apply(undefined, replacerArgs)); + } else { + replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue); + } + if (position >= nextSourcePosition) { + accumulatedResult += S.slice(nextSourcePosition, position) + replacement; + nextSourcePosition = position + matched.length; + } + } + return accumulatedResult + S.slice(nextSourcePosition); + }, + ]; + + // https://tc39.github.io/ecma262/#sec-getsubstitution + function getSubstitution(matched, str, position, captures, namedCaptures, replacement) { + var tailPos = position + matched.length; + var m = captures.length; + var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED; + if (namedCaptures !== undefined) { + namedCaptures = toObject(namedCaptures); + symbols = SUBSTITUTION_SYMBOLS; + } + return $replace.call(replacement, symbols, function (match, ch) { + var capture; + switch (ch.charAt(0)) { + case '$': + return '$'; + case '&': + return matched; + case '`': + return str.slice(0, position); + case "'": + return str.slice(tailPos); + case '<': + capture = namedCaptures[ch.slice(1, -1)]; + break; + default: // \d\d? + var n = +ch; + if (n === 0) return match; + if (n > m) { + var f = floor(n / 10); + if (f === 0) return match; + if (f <= m) + return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1); + return match; + } + capture = captures[n - 1]; + } + return capture === undefined ? '' : capture; + }); + } + }); + + /***/ + }, + /* 378 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var anObject = __webpack_require__(2); + var sameValue = __webpack_require__(180); + var regExpExec = __webpack_require__(92); + + // @@search logic + __webpack_require__(93)('search', 1, function (defined, SEARCH, $search, maybeCallNative) { + return [ + // `String.prototype.search` method + // https://tc39.github.io/ecma262/#sec-string.prototype.search + function search(regexp) { + var O = defined(this); + var fn = regexp == undefined ? undefined : regexp[SEARCH]; + return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O)); + }, + // `RegExp.prototype[@@search]` method + // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@search + function (regexp) { + var res = maybeCallNative($search, regexp, this); + if (res.done) return res.value; + var rx = anObject(regexp); + var S = String(this); + var previousLastIndex = rx.lastIndex; + if (!sameValue(previousLastIndex, 0)) rx.lastIndex = 0; + var result = regExpExec(rx, S); + if (!sameValue(rx.lastIndex, previousLastIndex)) rx.lastIndex = previousLastIndex; + return result === null ? -1 : result.index; + }, + ]; + }); + + /***/ + }, + /* 379 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var isRegExp = __webpack_require__(90); + var anObject = __webpack_require__(2); + var speciesConstructor = __webpack_require__(77); + var advanceStringIndex = __webpack_require__(134); + var toLength = __webpack_require__(7); + var callRegExpExec = __webpack_require__(92); + var regexpExec = __webpack_require__(133); + var fails = __webpack_require__(4); + var $min = Math.min; + var $push = [].push; + var $SPLIT = 'split'; + var LENGTH = 'length'; + var LAST_INDEX = 'lastIndex'; + var MAX_UINT32 = 0xffffffff; + + // babel-minify transpiles RegExp('x', 'y') -> /x/y and it causes SyntaxError + var SUPPORTS_Y = !fails(function () { + RegExp(MAX_UINT32, 'y'); + }); + + // @@split logic + __webpack_require__(93)('split', 2, function (defined, SPLIT, $split, maybeCallNative) { + var internalSplit; + if ( + 'abbc'[$SPLIT](/(b)*/)[1] == 'c' || + 'test'[$SPLIT](/(?:)/, -1)[LENGTH] != 4 || + 'ab'[$SPLIT](/(?:ab)*/)[LENGTH] != 2 || + '.'[$SPLIT](/(.?)(.?)/)[LENGTH] != 4 || + '.'[$SPLIT](/()()/)[LENGTH] > 1 || + ''[$SPLIT](/.?/)[LENGTH] + ) { + // based on es5-shim implementation, need to rework it + internalSplit = function (separator, limit) { + var string = String(this); + if (separator === undefined && limit === 0) return []; + // If `separator` is not a regex, use native split + if (!isRegExp(separator)) return $split.call(string, separator, limit); + var output = []; + var flags = + (separator.ignoreCase ? 'i' : '') + + (separator.multiline ? 'm' : '') + + (separator.unicode ? 'u' : '') + + (separator.sticky ? 'y' : ''); + var lastLastIndex = 0; + var splitLimit = limit === undefined ? MAX_UINT32 : limit >>> 0; + // Make `global` and avoid `lastIndex` issues by working with a copy + var separatorCopy = new RegExp(separator.source, flags + 'g'); + var match, lastIndex, lastLength; + while ((match = regexpExec.call(separatorCopy, string))) { + lastIndex = separatorCopy[LAST_INDEX]; + if (lastIndex > lastLastIndex) { + output.push(string.slice(lastLastIndex, match.index)); + if (match[LENGTH] > 1 && match.index < string[LENGTH]) $push.apply(output, match.slice(1)); + lastLength = match[0][LENGTH]; + lastLastIndex = lastIndex; + if (output[LENGTH] >= splitLimit) break; + } + if (separatorCopy[LAST_INDEX] === match.index) separatorCopy[LAST_INDEX]++; // Avoid an infinite loop + } + if (lastLastIndex === string[LENGTH]) { + if (lastLength || !separatorCopy.test('')) output.push(''); + } else output.push(string.slice(lastLastIndex)); + return output[LENGTH] > splitLimit ? output.slice(0, splitLimit) : output; + }; + // Chakra, V8 + } else if ('0'[$SPLIT](undefined, 0)[LENGTH]) { + internalSplit = function (separator, limit) { + return separator === undefined && limit === 0 ? [] : $split.call(this, separator, limit); + }; + } else { + internalSplit = $split; + } + + return [ + // `String.prototype.split` method + // https://tc39.github.io/ecma262/#sec-string.prototype.split + function split(separator, limit) { + var O = defined(this); + var splitter = separator == undefined ? undefined : separator[SPLIT]; + return splitter !== undefined + ? splitter.call(separator, O, limit) + : internalSplit.call(String(O), separator, limit); + }, + // `RegExp.prototype[@@split]` method + // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@split + // + // NOTE: This cannot be properly polyfilled in engines that don't support + // the 'y' flag. + function (regexp, limit) { + var res = maybeCallNative(internalSplit, regexp, this, limit, internalSplit !== $split); + if (res.done) return res.value; + + var rx = anObject(regexp); + var S = String(this); + var C = speciesConstructor(rx, RegExp); + + var unicodeMatching = rx.unicode; + var flags = + (rx.ignoreCase ? 'i' : '') + + (rx.multiline ? 'm' : '') + + (rx.unicode ? 'u' : '') + + (SUPPORTS_Y ? 'y' : 'g'); + + // ^(? + rx + ) is needed, in combination with some S slicing, to + // simulate the 'y' flag. + var splitter = new C(SUPPORTS_Y ? rx : '^(?:' + rx.source + ')', flags); + var lim = limit === undefined ? MAX_UINT32 : limit >>> 0; + if (lim === 0) return []; + if (S.length === 0) return callRegExpExec(splitter, S) === null ? [S] : []; + var p = 0; + var q = 0; + var A = []; + while (q < S.length) { + splitter.lastIndex = SUPPORTS_Y ? q : 0; + var z = callRegExpExec(splitter, SUPPORTS_Y ? S : S.slice(q)); + var e; + if ( + z === null || + (e = $min(toLength(splitter.lastIndex + (SUPPORTS_Y ? 0 : q)), S.length)) === p + ) { + q = advanceStringIndex(S, q, unicodeMatching); + } else { + A.push(S.slice(p, q)); + if (A.length === lim) return A; + for (var i = 1; i <= z.length - 1; i++) { + A.push(z[i]); + if (A.length === lim) return A; + } + q = p = e; + } + } + A.push(S.slice(p)); + return A; + }, + ]; + }); + + /***/ + }, + /* 380 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var LIBRARY = __webpack_require__(41); + var global = __webpack_require__(3); + var ctx = __webpack_require__(24); + var classof = __webpack_require__(65); + var $export = __webpack_require__(0); + var isObject = __webpack_require__(5); + var aFunction = __webpack_require__(12); + var anInstance = __webpack_require__(56); + var forOf = __webpack_require__(57); + var speciesConstructor = __webpack_require__(77); + var task = __webpack_require__(135).set; + var microtask = __webpack_require__(136)(); + var newPromiseCapabilityModule = __webpack_require__(137); + var perform = __webpack_require__(195); + var userAgent = __webpack_require__(94); + var promiseResolve = __webpack_require__(196); + var PROMISE = 'Promise'; + var TypeError = global.TypeError; + var process = global.process; + var versions = process && process.versions; + var v8 = (versions && versions.v8) || ''; + var $Promise = global[PROMISE]; + var isNode = classof(process) == 'process'; + var empty = function () { + /* empty */ + }; + var Internal, newGenericPromiseCapability, OwnPromiseCapability, Wrapper; + var newPromiseCapability = (newGenericPromiseCapability = newPromiseCapabilityModule.f); + + var USE_NATIVE = !!(function () { + try { + // correct subclassing with @@species support + var promise = $Promise.resolve(1); + var FakePromise = ((promise.constructor = {})[__webpack_require__(6)('species')] = function (exec) { + exec(empty, empty); + }); + // unhandled rejections tracking support, NodeJS Promise without it fails @@species test + return ( + (isNode || typeof PromiseRejectionEvent == 'function') && + promise.then(empty) instanceof FakePromise && + // v8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables + // https://bugs.chromium.org/p/chromium/issues/detail?id=830565 + // we can't detect it synchronously, so just check versions + v8.indexOf('6.6') !== 0 && + userAgent.indexOf('Chrome/66') === -1 + ); + } catch (e) { + /* empty */ + } + })(); + + // helpers + var isThenable = function (it) { + var then; + return isObject(it) && typeof (then = it.then) == 'function' ? then : false; + }; + var notify = function (promise, isReject) { + if (promise._n) return; + promise._n = true; + var chain = promise._c; + microtask(function () { + var value = promise._v; + var ok = promise._s == 1; + var i = 0; + var run = function (reaction) { + var handler = ok ? reaction.ok : reaction.fail; + var resolve = reaction.resolve; + var reject = reaction.reject; + var domain = reaction.domain; + var result, then, exited; + try { + if (handler) { + if (!ok) { + if (promise._h == 2) onHandleUnhandled(promise); + promise._h = 1; + } + if (handler === true) result = value; + else { + if (domain) domain.enter(); + result = handler(value); // may throw + if (domain) { + domain.exit(); + exited = true; + } + } + if (result === reaction.promise) { + reject(TypeError('Promise-chain cycle')); + } else if ((then = isThenable(result))) { + then.call(result, resolve, reject); + } else resolve(result); + } else reject(value); + } catch (e) { + if (domain && !exited) domain.exit(); + reject(e); + } + }; + while (chain.length > i) run(chain[i++]); // variable length - can't use forEach + promise._c = []; + promise._n = false; + if (isReject && !promise._h) onUnhandled(promise); + }); + }; + var onUnhandled = function (promise) { + task.call(global, function () { + var value = promise._v; + var unhandled = isUnhandled(promise); + var result, handler, console; + if (unhandled) { + result = perform(function () { + if (isNode) { + process.emit('unhandledRejection', value, promise); + } else if ((handler = global.onunhandledrejection)) { + handler({ promise: promise, reason: value }); + } else if ((console = global.console) && console.error) { + console.error('Unhandled promise rejection', value); + } + }); + // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should + promise._h = isNode || isUnhandled(promise) ? 2 : 1; + } + promise._a = undefined; + if (unhandled && result.e) throw result.v; + }); + }; + var isUnhandled = function (promise) { + return promise._h !== 1 && (promise._a || promise._c).length === 0; + }; + var onHandleUnhandled = function (promise) { + task.call(global, function () { + var handler; + if (isNode) { + process.emit('rejectionHandled', promise); + } else if ((handler = global.onrejectionhandled)) { + handler({ promise: promise, reason: promise._v }); + } + }); + }; + var $reject = function (value) { + var promise = this; + if (promise._d) return; + promise._d = true; + promise = promise._w || promise; // unwrap + promise._v = value; + promise._s = 2; + if (!promise._a) promise._a = promise._c.slice(); + notify(promise, true); + }; + var $resolve = function (value) { + var promise = this; + var then; + if (promise._d) return; + promise._d = true; + promise = promise._w || promise; // unwrap + try { + if (promise === value) throw TypeError("Promise can't be resolved itself"); + if ((then = isThenable(value))) { + microtask(function () { + var wrapper = { _w: promise, _d: false }; // wrap + try { + then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1)); + } catch (e) { + $reject.call(wrapper, e); + } + }); + } else { + promise._v = value; + promise._s = 1; + notify(promise, false); + } + } catch (e) { + $reject.call({ _w: promise, _d: false }, e); // wrap + } + }; + + // constructor polyfill + if (!USE_NATIVE) { + // 25.4.3.1 Promise(executor) + $Promise = function Promise(executor) { + anInstance(this, $Promise, PROMISE, '_h'); + aFunction(executor); + Internal.call(this); + try { + executor(ctx($resolve, this, 1), ctx($reject, this, 1)); + } catch (err) { + $reject.call(this, err); + } + }; + // eslint-disable-next-line no-unused-vars + Internal = function Promise(executor) { + this._c = []; // <- awaiting reactions + this._a = undefined; // <- checked in isUnhandled reactions + this._s = 0; // <- state + this._d = false; // <- done + this._v = undefined; // <- value + this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled + this._n = false; // <- notify + }; + Internal.prototype = __webpack_require__(58)($Promise.prototype, { + // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected) + then: function then(onFulfilled, onRejected) { + var reaction = newPromiseCapability(speciesConstructor(this, $Promise)); + reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true; + reaction.fail = typeof onRejected == 'function' && onRejected; + reaction.domain = isNode ? process.domain : undefined; + this._c.push(reaction); + if (this._a) this._a.push(reaction); + if (this._s) notify(this, false); + return reaction.promise; + }, + // 25.4.5.1 Promise.prototype.catch(onRejected) + catch: function (onRejected) { + return this.then(undefined, onRejected); + }, + }); + OwnPromiseCapability = function () { + var promise = new Internal(); + this.promise = promise; + this.resolve = ctx($resolve, promise, 1); + this.reject = ctx($reject, promise, 1); + }; + newPromiseCapabilityModule.f = newPromiseCapability = function (C) { + return C === $Promise || C === Wrapper + ? new OwnPromiseCapability(C) + : newGenericPromiseCapability(C); + }; + } + + $export($export.G + $export.W + $export.F * !USE_NATIVE, { Promise: $Promise }); + __webpack_require__(64)($Promise, PROMISE); + __webpack_require__(55)(PROMISE); + Wrapper = __webpack_require__(23)[PROMISE]; + + // statics + $export($export.S + $export.F * !USE_NATIVE, PROMISE, { + // 25.4.4.5 Promise.reject(r) + reject: function reject(r) { + var capability = newPromiseCapability(this); + var $$reject = capability.reject; + $$reject(r); + return capability.promise; + }, + }); + $export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, { + // 25.4.4.6 Promise.resolve(x) + resolve: function resolve(x) { + return promiseResolve(LIBRARY && this === Wrapper ? $Promise : this, x); + }, + }); + $export( + $export.S + + $export.F * + !( + USE_NATIVE && + __webpack_require__(91)(function (iter) { + $Promise.all(iter)['catch'](empty); + }) + ), + PROMISE, + { + // 25.4.4.1 Promise.all(iterable) + all: function all(iterable) { + var C = this; + var capability = newPromiseCapability(C); + var resolve = capability.resolve; + var reject = capability.reject; + var result = perform(function () { + var values = []; + var index = 0; + var remaining = 1; + forOf(iterable, false, function (promise) { + var $index = index++; + var alreadyCalled = false; + values.push(undefined); + remaining++; + C.resolve(promise).then(function (value) { + if (alreadyCalled) return; + alreadyCalled = true; + values[$index] = value; + --remaining || resolve(values); + }, reject); + }); + --remaining || resolve(values); + }); + if (result.e) reject(result.v); + return capability.promise; + }, + // 25.4.4.4 Promise.race(iterable) + race: function race(iterable) { + var C = this; + var capability = newPromiseCapability(C); + var reject = capability.reject; + var result = perform(function () { + forOf(iterable, false, function (promise) { + C.resolve(promise).then(capability.resolve, reject); + }); + }); + if (result.e) reject(result.v); + return capability.promise; + }, + }, + ); + + /***/ + }, + /* 381 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var weak = __webpack_require__(201); + var validate = __webpack_require__(59); + var WEAK_SET = 'WeakSet'; + + // 23.4 WeakSet Objects + __webpack_require__(95)( + WEAK_SET, + function (get) { + return function WeakSet() { + return get(this, arguments.length > 0 ? arguments[0] : undefined); + }; + }, + { + // 23.4.3.1 WeakSet.prototype.add(value) + add: function add(value) { + return weak.def(validate(this, WEAK_SET), value, true); + }, + }, + weak, + false, + true, + ); + + /***/ + }, + /* 382 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0); + var $typed = __webpack_require__(96); + var buffer = __webpack_require__(138); + var anObject = __webpack_require__(2); + var toAbsoluteIndex = __webpack_require__(52); + var toLength = __webpack_require__(7); + var isObject = __webpack_require__(5); + var ArrayBuffer = __webpack_require__(3).ArrayBuffer; + var speciesConstructor = __webpack_require__(77); + var $ArrayBuffer = buffer.ArrayBuffer; + var $DataView = buffer.DataView; + var $isView = $typed.ABV && ArrayBuffer.isView; + var $slice = $ArrayBuffer.prototype.slice; + var VIEW = $typed.VIEW; + var ARRAY_BUFFER = 'ArrayBuffer'; + + $export($export.G + $export.W + $export.F * (ArrayBuffer !== $ArrayBuffer), { + ArrayBuffer: $ArrayBuffer, + }); + + $export($export.S + $export.F * !$typed.CONSTR, ARRAY_BUFFER, { + // 24.1.3.1 ArrayBuffer.isView(arg) + isView: function isView(it) { + return ($isView && $isView(it)) || (isObject(it) && VIEW in it); + }, + }); + + $export( + $export.P + + $export.U + + $export.F * + __webpack_require__(4)(function () { + return !new $ArrayBuffer(2).slice(1, undefined).byteLength; + }), + ARRAY_BUFFER, + { + // 24.1.4.3 ArrayBuffer.prototype.slice(start, end) + slice: function slice(start, end) { + if ($slice !== undefined && end === undefined) return $slice.call(anObject(this), start); // FF fix + var len = anObject(this).byteLength; + var first = toAbsoluteIndex(start, len); + var fin = toAbsoluteIndex(end === undefined ? len : end, len); + var result = new (speciesConstructor(this, $ArrayBuffer))(toLength(fin - first)); + var viewS = new $DataView(this); + var viewT = new $DataView(result); + var index = 0; + while (first < fin) { + viewT.setUint8(index++, viewS.getUint8(first++)); + } + return result; + }, + }, + ); + + __webpack_require__(55)(ARRAY_BUFFER); + + /***/ + }, + /* 383 */ + /***/ function (module, exports, __webpack_require__) { + var $export = __webpack_require__(0); + $export($export.G + $export.W + $export.F * !__webpack_require__(96).ABV, { + DataView: __webpack_require__(138).DataView, + }); + + /***/ + }, + /* 384 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(38)('Int8', 1, function (init) { + return function Int8Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; + }); + + /***/ + }, + /* 385 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(38)('Uint8', 1, function (init) { + return function Uint8Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; + }); + + /***/ + }, + /* 386 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(38)( + 'Uint8', + 1, + function (init) { + return function Uint8ClampedArray(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; + }, + true, + ); + + /***/ + }, + /* 387 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(38)('Int16', 2, function (init) { + return function Int16Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; + }); + + /***/ + }, + /* 388 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(38)('Uint16', 2, function (init) { + return function Uint16Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; + }); + + /***/ + }, + /* 389 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(38)('Int32', 4, function (init) { + return function Int32Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; + }); + + /***/ + }, + /* 390 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(38)('Uint32', 4, function (init) { + return function Uint32Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; + }); + + /***/ + }, + /* 391 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(38)('Float32', 4, function (init) { + return function Float32Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; + }); + + /***/ + }, + /* 392 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(38)('Float64', 8, function (init) { + return function Float64Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; + }); + + /***/ + }, + /* 393 */ + /***/ function (module, exports, __webpack_require__) { + // 26.1.1 Reflect.apply(target, thisArgument, argumentsList) + var $export = __webpack_require__(0); + var aFunction = __webpack_require__(12); + var anObject = __webpack_require__(2); + var rApply = (__webpack_require__(3).Reflect || {}).apply; + var fApply = Function.apply; + // MS Edge argumentsList argument is optional + $export( + $export.S + + $export.F * + !__webpack_require__(4)(function () { + rApply(function () { + /* empty */ + }); + }), + 'Reflect', + { + apply: function apply(target, thisArgument, argumentsList) { + var T = aFunction(target); + var L = anObject(argumentsList); + return rApply ? rApply(T, thisArgument, L) : fApply.call(T, thisArgument, L); + }, + }, + ); + + /***/ + }, + /* 394 */ + /***/ function (module, exports, __webpack_require__) { + // 26.1.2 Reflect.construct(target, argumentsList [, newTarget]) + var $export = __webpack_require__(0); + var create = __webpack_require__(53); + var aFunction = __webpack_require__(12); + var anObject = __webpack_require__(2); + var isObject = __webpack_require__(5); + var fails = __webpack_require__(4); + var bind = __webpack_require__(181); + var rConstruct = (__webpack_require__(3).Reflect || {}).construct; + + // MS Edge supports only 2 arguments and argumentsList argument is optional + // FF Nightly sets third argument as `new.target`, but does not create `this` from it + var NEW_TARGET_BUG = fails(function () { + function F() { + /* empty */ + } + return !( + rConstruct( + function () { + /* empty */ + }, + [], + F, + ) instanceof F + ); + }); + var ARGS_BUG = !fails(function () { + rConstruct(function () { + /* empty */ + }); + }); + + $export($export.S + $export.F * (NEW_TARGET_BUG || ARGS_BUG), 'Reflect', { + construct: function construct(Target, args /* , newTarget */) { + aFunction(Target); + anObject(args); + var newTarget = arguments.length < 3 ? Target : aFunction(arguments[2]); + if (ARGS_BUG && !NEW_TARGET_BUG) return rConstruct(Target, args, newTarget); + if (Target == newTarget) { + // w/o altered newTarget, optimization for 0-4 arguments + switch (args.length) { + case 0: + return new Target(); + case 1: + return new Target(args[0]); + case 2: + return new Target(args[0], args[1]); + case 3: + return new Target(args[0], args[1], args[2]); + case 4: + return new Target(args[0], args[1], args[2], args[3]); + } + // w/o altered newTarget, lot of arguments case + var $args = [null]; + $args.push.apply($args, args); + return new (bind.apply(Target, $args))(); + } + // with altered newTarget, not support built-in constructors + var proto = newTarget.prototype; + var instance = create(isObject(proto) ? proto : Object.prototype); + var result = Function.apply.call(Target, instance, args); + return isObject(result) ? result : instance; + }, + }); + + /***/ + }, + /* 395 */ + /***/ function (module, exports, __webpack_require__) { + // 26.1.3 Reflect.defineProperty(target, propertyKey, attributes) + var dP = __webpack_require__(9); + var $export = __webpack_require__(0); + var anObject = __webpack_require__(2); + var toPrimitive = __webpack_require__(31); + + // MS Edge has broken Reflect.defineProperty - throwing instead of returning false + $export( + $export.S + + $export.F * + __webpack_require__(4)(function () { + // eslint-disable-next-line no-undef + Reflect.defineProperty(dP.f({}, 1, { value: 1 }), 1, { value: 2 }); + }), + 'Reflect', + { + defineProperty: function defineProperty(target, propertyKey, attributes) { + anObject(target); + propertyKey = toPrimitive(propertyKey, true); + anObject(attributes); + try { + dP.f(target, propertyKey, attributes); + return true; + } catch (e) { + return false; + } + }, + }, + ); + + /***/ + }, + /* 396 */ + /***/ function (module, exports, __webpack_require__) { + // 26.1.4 Reflect.deleteProperty(target, propertyKey) + var $export = __webpack_require__(0); + var gOPD = __webpack_require__(20).f; + var anObject = __webpack_require__(2); + + $export($export.S, 'Reflect', { + deleteProperty: function deleteProperty(target, propertyKey) { + var desc = gOPD(anObject(target), propertyKey); + return desc && !desc.configurable ? false : delete target[propertyKey]; + }, + }); + + /***/ + }, + /* 397 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // 26.1.5 Reflect.enumerate(target) + var $export = __webpack_require__(0); + var anObject = __webpack_require__(2); + var Enumerate = function (iterated) { + this._t = anObject(iterated); // target + this._i = 0; // next index + var keys = (this._k = []); // keys + var key; + for (key in iterated) keys.push(key); + }; + __webpack_require__(124)(Enumerate, 'Object', function () { + var that = this; + var keys = that._k; + var key; + do { + if (that._i >= keys.length) return { value: undefined, done: true }; + } while (!((key = keys[that._i++]) in that._t)); + return { value: key, done: false }; + }); + + $export($export.S, 'Reflect', { + enumerate: function enumerate(target) { + return new Enumerate(target); + }, + }); + + /***/ + }, + /* 398 */ + /***/ function (module, exports, __webpack_require__) { + // 26.1.6 Reflect.get(target, propertyKey [, receiver]) + var gOPD = __webpack_require__(20); + var getPrototypeOf = __webpack_require__(21); + var has = __webpack_require__(18); + var $export = __webpack_require__(0); + var isObject = __webpack_require__(5); + var anObject = __webpack_require__(2); + + function get(target, propertyKey /* , receiver */) { + var receiver = arguments.length < 3 ? target : arguments[2]; + var desc, proto; + if (anObject(target) === receiver) return target[propertyKey]; + if ((desc = gOPD.f(target, propertyKey))) + return has(desc, 'value') + ? desc.value + : desc.get !== undefined + ? desc.get.call(receiver) + : undefined; + if (isObject((proto = getPrototypeOf(target)))) return get(proto, propertyKey, receiver); + } + + $export($export.S, 'Reflect', { get: get }); + + /***/ + }, + /* 399 */ + /***/ function (module, exports, __webpack_require__) { + // 26.1.7 Reflect.getOwnPropertyDescriptor(target, propertyKey) + var gOPD = __webpack_require__(20); + var $export = __webpack_require__(0); + var anObject = __webpack_require__(2); + + $export($export.S, 'Reflect', { + getOwnPropertyDescriptor: function getOwnPropertyDescriptor(target, propertyKey) { + return gOPD.f(anObject(target), propertyKey); + }, + }); + + /***/ + }, + /* 400 */ + /***/ function (module, exports, __webpack_require__) { + // 26.1.8 Reflect.getPrototypeOf(target) + var $export = __webpack_require__(0); + var getProto = __webpack_require__(21); + var anObject = __webpack_require__(2); + + $export($export.S, 'Reflect', { + getPrototypeOf: function getPrototypeOf(target) { + return getProto(anObject(target)); + }, + }); + + /***/ + }, + /* 401 */ + /***/ function (module, exports, __webpack_require__) { + // 26.1.9 Reflect.has(target, propertyKey) + var $export = __webpack_require__(0); + + $export($export.S, 'Reflect', { + has: function has(target, propertyKey) { + return propertyKey in target; + }, + }); + + /***/ + }, + /* 402 */ + /***/ function (module, exports, __webpack_require__) { + // 26.1.10 Reflect.isExtensible(target) + var $export = __webpack_require__(0); + var anObject = __webpack_require__(2); + var $isExtensible = Object.isExtensible; + + $export($export.S, 'Reflect', { + isExtensible: function isExtensible(target) { + anObject(target); + return $isExtensible ? $isExtensible(target) : true; + }, + }); + + /***/ + }, + /* 403 */ + /***/ function (module, exports, __webpack_require__) { + // 26.1.11 Reflect.ownKeys(target) + var $export = __webpack_require__(0); + + $export($export.S, 'Reflect', { ownKeys: __webpack_require__(203) }); + + /***/ + }, + /* 404 */ + /***/ function (module, exports, __webpack_require__) { + // 26.1.12 Reflect.preventExtensions(target) + var $export = __webpack_require__(0); + var anObject = __webpack_require__(2); + var $preventExtensions = Object.preventExtensions; + + $export($export.S, 'Reflect', { + preventExtensions: function preventExtensions(target) { + anObject(target); + try { + if ($preventExtensions) $preventExtensions(target); + return true; + } catch (e) { + return false; + } + }, + }); + + /***/ + }, + /* 405 */ + /***/ function (module, exports, __webpack_require__) { + // 26.1.13 Reflect.set(target, propertyKey, V [, receiver]) + var dP = __webpack_require__(9); + var gOPD = __webpack_require__(20); + var getPrototypeOf = __webpack_require__(21); + var has = __webpack_require__(18); + var $export = __webpack_require__(0); + var createDesc = __webpack_require__(49); + var anObject = __webpack_require__(2); + var isObject = __webpack_require__(5); + + function set(target, propertyKey, V /* , receiver */) { + var receiver = arguments.length < 4 ? target : arguments[3]; + var ownDesc = gOPD.f(anObject(target), propertyKey); + var existingDescriptor, proto; + if (!ownDesc) { + if (isObject((proto = getPrototypeOf(target)))) { + return set(proto, propertyKey, V, receiver); + } + ownDesc = createDesc(0); + } + if (has(ownDesc, 'value')) { + if (ownDesc.writable === false || !isObject(receiver)) return false; + if ((existingDescriptor = gOPD.f(receiver, propertyKey))) { + if (existingDescriptor.get || existingDescriptor.set || existingDescriptor.writable === false) + return false; + existingDescriptor.value = V; + dP.f(receiver, propertyKey, existingDescriptor); + } else dP.f(receiver, propertyKey, createDesc(0, V)); + return true; + } + return ownDesc.set === undefined ? false : (ownDesc.set.call(receiver, V), true); + } + + $export($export.S, 'Reflect', { set: set }); + + /***/ + }, + /* 406 */ + /***/ function (module, exports, __webpack_require__) { + // 26.1.14 Reflect.setPrototypeOf(target, proto) + var $export = __webpack_require__(0); + var setProto = __webpack_require__(117); + + if (setProto) + $export($export.S, 'Reflect', { + setPrototypeOf: function setPrototypeOf(target, proto) { + setProto.check(target, proto); + try { + setProto.set(target, proto); + return true; + } catch (e) { + return false; + } + }, + }); + + /***/ + }, + /* 407 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // https://github.com/tc39/Array.prototype.includes + var $export = __webpack_require__(0); + var $includes = __webpack_require__(86)(true); + + $export($export.P, 'Array', { + includes: function includes(el /* , fromIndex = 0 */) { + return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined); + }, + }); + + __webpack_require__(43)('includes'); + + /***/ + }, + /* 408 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // https://tc39.github.io/proposal-flatMap/#sec-Array.prototype.flatMap + var $export = __webpack_require__(0); + var flattenIntoArray = __webpack_require__(204); + var toObject = __webpack_require__(11); + var toLength = __webpack_require__(7); + var aFunction = __webpack_require__(12); + var arraySpeciesCreate = __webpack_require__(130); + + $export($export.P, 'Array', { + flatMap: function flatMap(callbackfn /* , thisArg */) { + var O = toObject(this); + var sourceLen, A; + aFunction(callbackfn); + sourceLen = toLength(O.length); + A = arraySpeciesCreate(O, 0); + flattenIntoArray(A, O, O, sourceLen, 0, 1, callbackfn, arguments[1]); + return A; + }, + }); + + __webpack_require__(43)('flatMap'); + + /***/ + }, + /* 409 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // https://tc39.github.io/proposal-flatMap/#sec-Array.prototype.flatten + var $export = __webpack_require__(0); + var flattenIntoArray = __webpack_require__(204); + var toObject = __webpack_require__(11); + var toLength = __webpack_require__(7); + var toInteger = __webpack_require__(26); + var arraySpeciesCreate = __webpack_require__(130); + + $export($export.P, 'Array', { + flatten: function flatten(/* depthArg = 1 */) { + var depthArg = arguments[0]; + var O = toObject(this); + var sourceLen = toLength(O.length); + var A = arraySpeciesCreate(O, 0); + flattenIntoArray(A, O, O, sourceLen, 0, depthArg === undefined ? 1 : toInteger(depthArg)); + return A; + }, + }); + + __webpack_require__(43)('flatten'); + + /***/ + }, + /* 410 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // https://github.com/mathiasbynens/String.prototype.at + var $export = __webpack_require__(0); + var $at = __webpack_require__(89)(true); + + $export($export.P, 'String', { + at: function at(pos) { + return $at(this, pos); + }, + }); + + /***/ + }, + /* 411 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // https://github.com/tc39/proposal-string-pad-start-end + var $export = __webpack_require__(0); + var $pad = __webpack_require__(205); + var userAgent = __webpack_require__(94); + + // https://github.com/zloirock/core-js/issues/280 + var WEBKIT_BUG = /Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(userAgent); + + $export($export.P + $export.F * WEBKIT_BUG, 'String', { + padStart: function padStart(maxLength /* , fillString = ' ' */) { + return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, true); + }, + }); + + /***/ + }, + /* 412 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // https://github.com/tc39/proposal-string-pad-start-end + var $export = __webpack_require__(0); + var $pad = __webpack_require__(205); + var userAgent = __webpack_require__(94); + + // https://github.com/zloirock/core-js/issues/280 + var WEBKIT_BUG = /Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(userAgent); + + $export($export.P + $export.F * WEBKIT_BUG, 'String', { + padEnd: function padEnd(maxLength /* , fillString = ' ' */) { + return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, false); + }, + }); + + /***/ + }, + /* 413 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // https://github.com/sebmarkbage/ecmascript-string-left-right-trim + __webpack_require__(66)( + 'trimLeft', + function ($trim) { + return function trimLeft() { + return $trim(this, 1); + }; + }, + 'trimStart', + ); + + /***/ + }, + /* 414 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // https://github.com/sebmarkbage/ecmascript-string-left-right-trim + __webpack_require__(66)( + 'trimRight', + function ($trim) { + return function trimRight() { + return $trim(this, 2); + }; + }, + 'trimEnd', + ); + + /***/ + }, + /* 415 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // https://tc39.github.io/String.prototype.matchAll/ + var $export = __webpack_require__(0); + var defined = __webpack_require__(32); + var toLength = __webpack_require__(7); + var isRegExp = __webpack_require__(90); + var getFlags = __webpack_require__(76); + var RegExpProto = RegExp.prototype; + + var $RegExpStringIterator = function (regexp, string) { + this._r = regexp; + this._s = string; + }; + + __webpack_require__(124)($RegExpStringIterator, 'RegExp String', function next() { + var match = this._r.exec(this._s); + return { value: match, done: match === null }; + }); + + $export($export.P, 'String', { + matchAll: function matchAll(regexp) { + defined(this); + if (!isRegExp(regexp)) throw TypeError(regexp + ' is not a regexp!'); + var S = String(this); + var flags = 'flags' in RegExpProto ? String(regexp.flags) : getFlags.call(regexp); + var rx = new RegExp(regexp.source, ~flags.indexOf('g') ? flags : 'g' + flags); + rx.lastIndex = toLength(regexp.lastIndex); + return new $RegExpStringIterator(rx, S); + }, + }); + + /***/ + }, + /* 416 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(113)('asyncIterator'); + + /***/ + }, + /* 417 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(113)('observable'); + + /***/ + }, + /* 418 */ + /***/ function (module, exports, __webpack_require__) { + // https://github.com/tc39/proposal-object-getownpropertydescriptors + var $export = __webpack_require__(0); + var ownKeys = __webpack_require__(203); + var toIObject = __webpack_require__(19); + var gOPD = __webpack_require__(20); + var createProperty = __webpack_require__(128); + + $export($export.S, 'Object', { + getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object) { + var O = toIObject(object); + var getDesc = gOPD.f; + var keys = ownKeys(O); + var result = {}; + var i = 0; + var key, desc; + while (keys.length > i) { + desc = getDesc(O, (key = keys[i++])); + if (desc !== undefined) createProperty(result, key, desc); + } + return result; + }, + }); + + /***/ + }, + /* 419 */ + /***/ function (module, exports, __webpack_require__) { + // https://github.com/tc39/proposal-object-values-entries + var $export = __webpack_require__(0); + var $values = __webpack_require__(206)(false); + + $export($export.S, 'Object', { + values: function values(it) { + return $values(it); + }, + }); + + /***/ + }, + /* 420 */ + /***/ function (module, exports, __webpack_require__) { + // https://github.com/tc39/proposal-object-values-entries + var $export = __webpack_require__(0); + var $entries = __webpack_require__(206)(true); + + $export($export.S, 'Object', { + entries: function entries(it) { + return $entries(it); + }, + }); + + /***/ + }, + /* 421 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0); + var toObject = __webpack_require__(11); + var aFunction = __webpack_require__(12); + var $defineProperty = __webpack_require__(9); + + // B.2.2.2 Object.prototype.__defineGetter__(P, getter) + __webpack_require__(8) && + $export($export.P + __webpack_require__(97), 'Object', { + __defineGetter__: function __defineGetter__(P, getter) { + $defineProperty.f(toObject(this), P, { + get: aFunction(getter), + enumerable: true, + configurable: true, + }); + }, + }); + + /***/ + }, + /* 422 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0); + var toObject = __webpack_require__(11); + var aFunction = __webpack_require__(12); + var $defineProperty = __webpack_require__(9); + + // B.2.2.3 Object.prototype.__defineSetter__(P, setter) + __webpack_require__(8) && + $export($export.P + __webpack_require__(97), 'Object', { + __defineSetter__: function __defineSetter__(P, setter) { + $defineProperty.f(toObject(this), P, { + set: aFunction(setter), + enumerable: true, + configurable: true, + }); + }, + }); + + /***/ + }, + /* 423 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0); + var toObject = __webpack_require__(11); + var toPrimitive = __webpack_require__(31); + var getPrototypeOf = __webpack_require__(21); + var getOwnPropertyDescriptor = __webpack_require__(20).f; + + // B.2.2.4 Object.prototype.__lookupGetter__(P) + __webpack_require__(8) && + $export($export.P + __webpack_require__(97), 'Object', { + __lookupGetter__: function __lookupGetter__(P) { + var O = toObject(this); + var K = toPrimitive(P, true); + var D; + do { + if ((D = getOwnPropertyDescriptor(O, K))) return D.get; + } while ((O = getPrototypeOf(O))); + }, + }); + + /***/ + }, + /* 424 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0); + var toObject = __webpack_require__(11); + var toPrimitive = __webpack_require__(31); + var getPrototypeOf = __webpack_require__(21); + var getOwnPropertyDescriptor = __webpack_require__(20).f; + + // B.2.2.5 Object.prototype.__lookupSetter__(P) + __webpack_require__(8) && + $export($export.P + __webpack_require__(97), 'Object', { + __lookupSetter__: function __lookupSetter__(P) { + var O = toObject(this); + var K = toPrimitive(P, true); + var D; + do { + if ((D = getOwnPropertyDescriptor(O, K))) return D.set; + } while ((O = getPrototypeOf(O))); + }, + }); + + /***/ + }, + /* 425 */ + /***/ function (module, exports, __webpack_require__) { + // https://github.com/DavidBruant/Map-Set.prototype.toJSON + var $export = __webpack_require__(0); + + $export($export.P + $export.R, 'Map', { toJSON: __webpack_require__(207)('Map') }); + + /***/ + }, + /* 426 */ + /***/ function (module, exports, __webpack_require__) { + // https://github.com/DavidBruant/Map-Set.prototype.toJSON + var $export = __webpack_require__(0); + + $export($export.P + $export.R, 'Set', { toJSON: __webpack_require__(207)('Set') }); + + /***/ + }, + /* 427 */ + /***/ function (module, exports, __webpack_require__) { + // https://tc39.github.io/proposal-setmap-offrom/#sec-map.of + __webpack_require__(98)('Map'); + + /***/ + }, + /* 428 */ + /***/ function (module, exports, __webpack_require__) { + // https://tc39.github.io/proposal-setmap-offrom/#sec-set.of + __webpack_require__(98)('Set'); + + /***/ + }, + /* 429 */ + /***/ function (module, exports, __webpack_require__) { + // https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.of + __webpack_require__(98)('WeakMap'); + + /***/ + }, + /* 430 */ + /***/ function (module, exports, __webpack_require__) { + // https://tc39.github.io/proposal-setmap-offrom/#sec-weakset.of + __webpack_require__(98)('WeakSet'); + + /***/ + }, + /* 431 */ + /***/ function (module, exports, __webpack_require__) { + // https://tc39.github.io/proposal-setmap-offrom/#sec-map.from + __webpack_require__(99)('Map'); + + /***/ + }, + /* 432 */ + /***/ function (module, exports, __webpack_require__) { + // https://tc39.github.io/proposal-setmap-offrom/#sec-set.from + __webpack_require__(99)('Set'); + + /***/ + }, + /* 433 */ + /***/ function (module, exports, __webpack_require__) { + // https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.from + __webpack_require__(99)('WeakMap'); + + /***/ + }, + /* 434 */ + /***/ function (module, exports, __webpack_require__) { + // https://tc39.github.io/proposal-setmap-offrom/#sec-weakset.from + __webpack_require__(99)('WeakSet'); + + /***/ + }, + /* 435 */ + /***/ function (module, exports, __webpack_require__) { + // https://github.com/tc39/proposal-global + var $export = __webpack_require__(0); + + $export($export.G, { global: __webpack_require__(3) }); + + /***/ + }, + /* 436 */ + /***/ function (module, exports, __webpack_require__) { + // https://github.com/tc39/proposal-global + var $export = __webpack_require__(0); + + $export($export.S, 'System', { global: __webpack_require__(3) }); + + /***/ + }, + /* 437 */ + /***/ function (module, exports, __webpack_require__) { + // https://github.com/ljharb/proposal-is-error + var $export = __webpack_require__(0); + var cof = __webpack_require__(25); + + $export($export.S, 'Error', { + isError: function isError(it) { + return cof(it) === 'Error'; + }, + }); + + /***/ + }, + /* 438 */ + /***/ function (module, exports, __webpack_require__) { + // https://rwaldron.github.io/proposal-math-extensions/ + var $export = __webpack_require__(0); + + $export($export.S, 'Math', { + clamp: function clamp(x, lower, upper) { + return Math.min(upper, Math.max(lower, x)); + }, + }); + + /***/ + }, + /* 439 */ + /***/ function (module, exports, __webpack_require__) { + // https://rwaldron.github.io/proposal-math-extensions/ + var $export = __webpack_require__(0); + + $export($export.S, 'Math', { DEG_PER_RAD: Math.PI / 180 }); + + /***/ + }, + /* 440 */ + /***/ function (module, exports, __webpack_require__) { + // https://rwaldron.github.io/proposal-math-extensions/ + var $export = __webpack_require__(0); + var RAD_PER_DEG = 180 / Math.PI; + + $export($export.S, 'Math', { + degrees: function degrees(radians) { + return radians * RAD_PER_DEG; + }, + }); + + /***/ + }, + /* 441 */ + /***/ function (module, exports, __webpack_require__) { + // https://rwaldron.github.io/proposal-math-extensions/ + var $export = __webpack_require__(0); + var scale = __webpack_require__(209); + var fround = __webpack_require__(188); + + $export($export.S, 'Math', { + fscale: function fscale(x, inLow, inHigh, outLow, outHigh) { + return fround(scale(x, inLow, inHigh, outLow, outHigh)); + }, + }); + + /***/ + }, + /* 442 */ + /***/ function (module, exports, __webpack_require__) { + // https://gist.github.com/BrendanEich/4294d5c212a6d2254703 + var $export = __webpack_require__(0); + + $export($export.S, 'Math', { + iaddh: function iaddh(x0, x1, y0, y1) { + var $x0 = x0 >>> 0; + var $x1 = x1 >>> 0; + var $y0 = y0 >>> 0; + return ($x1 + (y1 >>> 0) + ((($x0 & $y0) | (($x0 | $y0) & ~(($x0 + $y0) >>> 0))) >>> 31)) | 0; + }, + }); + + /***/ + }, + /* 443 */ + /***/ function (module, exports, __webpack_require__) { + // https://gist.github.com/BrendanEich/4294d5c212a6d2254703 + var $export = __webpack_require__(0); + + $export($export.S, 'Math', { + isubh: function isubh(x0, x1, y0, y1) { + var $x0 = x0 >>> 0; + var $x1 = x1 >>> 0; + var $y0 = y0 >>> 0; + return ($x1 - (y1 >>> 0) - (((~$x0 & $y0) | (~($x0 ^ $y0) & (($x0 - $y0) >>> 0))) >>> 31)) | 0; + }, + }); + + /***/ + }, + /* 444 */ + /***/ function (module, exports, __webpack_require__) { + // https://gist.github.com/BrendanEich/4294d5c212a6d2254703 + var $export = __webpack_require__(0); + + $export($export.S, 'Math', { + imulh: function imulh(u, v) { + var UINT16 = 0xffff; + var $u = +u; + var $v = +v; + var u0 = $u & UINT16; + var v0 = $v & UINT16; + var u1 = $u >> 16; + var v1 = $v >> 16; + var t = ((u1 * v0) >>> 0) + ((u0 * v0) >>> 16); + return u1 * v1 + (t >> 16) + ((((u0 * v1) >>> 0) + (t & UINT16)) >> 16); + }, + }); + + /***/ + }, + /* 445 */ + /***/ function (module, exports, __webpack_require__) { + // https://rwaldron.github.io/proposal-math-extensions/ + var $export = __webpack_require__(0); + + $export($export.S, 'Math', { RAD_PER_DEG: 180 / Math.PI }); + + /***/ + }, + /* 446 */ + /***/ function (module, exports, __webpack_require__) { + // https://rwaldron.github.io/proposal-math-extensions/ + var $export = __webpack_require__(0); + var DEG_PER_RAD = Math.PI / 180; + + $export($export.S, 'Math', { + radians: function radians(degrees) { + return degrees * DEG_PER_RAD; + }, + }); + + /***/ + }, + /* 447 */ + /***/ function (module, exports, __webpack_require__) { + // https://rwaldron.github.io/proposal-math-extensions/ + var $export = __webpack_require__(0); + + $export($export.S, 'Math', { scale: __webpack_require__(209) }); + + /***/ + }, + /* 448 */ + /***/ function (module, exports, __webpack_require__) { + // https://gist.github.com/BrendanEich/4294d5c212a6d2254703 + var $export = __webpack_require__(0); + + $export($export.S, 'Math', { + umulh: function umulh(u, v) { + var UINT16 = 0xffff; + var $u = +u; + var $v = +v; + var u0 = $u & UINT16; + var v0 = $v & UINT16; + var u1 = $u >>> 16; + var v1 = $v >>> 16; + var t = ((u1 * v0) >>> 0) + ((u0 * v0) >>> 16); + return u1 * v1 + (t >>> 16) + ((((u0 * v1) >>> 0) + (t & UINT16)) >>> 16); + }, + }); + + /***/ + }, + /* 449 */ + /***/ function (module, exports, __webpack_require__) { + // http://jfbastien.github.io/papers/Math.signbit.html + var $export = __webpack_require__(0); + + $export($export.S, 'Math', { + signbit: function signbit(x) { + // eslint-disable-next-line no-self-compare + return (x = +x) != x ? x : x == 0 ? 1 / x == Infinity : x > 0; + }, + }); + + /***/ + }, + /* 450 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + // https://github.com/tc39/proposal-promise-finally + + var $export = __webpack_require__(0); + var core = __webpack_require__(23); + var global = __webpack_require__(3); + var speciesConstructor = __webpack_require__(77); + var promiseResolve = __webpack_require__(196); + + $export($export.P + $export.R, 'Promise', { + finally: function (onFinally) { + var C = speciesConstructor(this, core.Promise || global.Promise); + var isFunction = typeof onFinally == 'function'; + return this.then( + isFunction + ? function (x) { + return promiseResolve(C, onFinally()).then(function () { + return x; + }); + } + : onFinally, + isFunction + ? function (e) { + return promiseResolve(C, onFinally()).then(function () { + throw e; + }); + } + : onFinally, + ); + }, + }); + + /***/ + }, + /* 451 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // https://github.com/tc39/proposal-promise-try + var $export = __webpack_require__(0); + var newPromiseCapability = __webpack_require__(137); + var perform = __webpack_require__(195); + + $export($export.S, 'Promise', { + try: function (callbackfn) { + var promiseCapability = newPromiseCapability.f(this); + var result = perform(callbackfn); + (result.e ? promiseCapability.reject : promiseCapability.resolve)(result.v); + return promiseCapability.promise; + }, + }); + + /***/ + }, + /* 452 */ + /***/ function (module, exports, __webpack_require__) { + var metadata = __webpack_require__(39); + var anObject = __webpack_require__(2); + var toMetaKey = metadata.key; + var ordinaryDefineOwnMetadata = metadata.set; + + metadata.exp({ + defineMetadata: function defineMetadata(metadataKey, metadataValue, target, targetKey) { + ordinaryDefineOwnMetadata(metadataKey, metadataValue, anObject(target), toMetaKey(targetKey)); + }, + }); + + /***/ + }, + /* 453 */ + /***/ function (module, exports, __webpack_require__) { + var metadata = __webpack_require__(39); + var anObject = __webpack_require__(2); + var toMetaKey = metadata.key; + var getOrCreateMetadataMap = metadata.map; + var store = metadata.store; + + metadata.exp({ + deleteMetadata: function deleteMetadata(metadataKey, target /* , targetKey */) { + var targetKey = arguments.length < 3 ? undefined : toMetaKey(arguments[2]); + var metadataMap = getOrCreateMetadataMap(anObject(target), targetKey, false); + if (metadataMap === undefined || !metadataMap['delete'](metadataKey)) return false; + if (metadataMap.size) return true; + var targetMetadata = store.get(target); + targetMetadata['delete'](targetKey); + return !!targetMetadata.size || store['delete'](target); + }, + }); + + /***/ + }, + /* 454 */ + /***/ function (module, exports, __webpack_require__) { + var metadata = __webpack_require__(39); + var anObject = __webpack_require__(2); + var getPrototypeOf = __webpack_require__(21); + var ordinaryHasOwnMetadata = metadata.has; + var ordinaryGetOwnMetadata = metadata.get; + var toMetaKey = metadata.key; + + var ordinaryGetMetadata = function (MetadataKey, O, P) { + var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P); + if (hasOwn) return ordinaryGetOwnMetadata(MetadataKey, O, P); + var parent = getPrototypeOf(O); + return parent !== null ? ordinaryGetMetadata(MetadataKey, parent, P) : undefined; + }; + + metadata.exp({ + getMetadata: function getMetadata(metadataKey, target /* , targetKey */) { + return ordinaryGetMetadata( + metadataKey, + anObject(target), + arguments.length < 3 ? undefined : toMetaKey(arguments[2]), + ); + }, + }); + + /***/ + }, + /* 455 */ + /***/ function (module, exports, __webpack_require__) { + var Set = __webpack_require__(199); + var from = __webpack_require__(208); + var metadata = __webpack_require__(39); + var anObject = __webpack_require__(2); + var getPrototypeOf = __webpack_require__(21); + var ordinaryOwnMetadataKeys = metadata.keys; + var toMetaKey = metadata.key; + + var ordinaryMetadataKeys = function (O, P) { + var oKeys = ordinaryOwnMetadataKeys(O, P); + var parent = getPrototypeOf(O); + if (parent === null) return oKeys; + var pKeys = ordinaryMetadataKeys(parent, P); + return pKeys.length ? (oKeys.length ? from(new Set(oKeys.concat(pKeys))) : pKeys) : oKeys; + }; + + metadata.exp({ + getMetadataKeys: function getMetadataKeys(target /* , targetKey */) { + return ordinaryMetadataKeys( + anObject(target), + arguments.length < 2 ? undefined : toMetaKey(arguments[1]), + ); + }, + }); + + /***/ + }, + /* 456 */ + /***/ function (module, exports, __webpack_require__) { + var metadata = __webpack_require__(39); + var anObject = __webpack_require__(2); + var ordinaryGetOwnMetadata = metadata.get; + var toMetaKey = metadata.key; + + metadata.exp({ + getOwnMetadata: function getOwnMetadata(metadataKey, target /* , targetKey */) { + return ordinaryGetOwnMetadata( + metadataKey, + anObject(target), + arguments.length < 3 ? undefined : toMetaKey(arguments[2]), + ); + }, + }); + + /***/ + }, + /* 457 */ + /***/ function (module, exports, __webpack_require__) { + var metadata = __webpack_require__(39); + var anObject = __webpack_require__(2); + var ordinaryOwnMetadataKeys = metadata.keys; + var toMetaKey = metadata.key; + + metadata.exp({ + getOwnMetadataKeys: function getOwnMetadataKeys(target /* , targetKey */) { + return ordinaryOwnMetadataKeys( + anObject(target), + arguments.length < 2 ? undefined : toMetaKey(arguments[1]), + ); + }, + }); + + /***/ + }, + /* 458 */ + /***/ function (module, exports, __webpack_require__) { + var metadata = __webpack_require__(39); + var anObject = __webpack_require__(2); + var getPrototypeOf = __webpack_require__(21); + var ordinaryHasOwnMetadata = metadata.has; + var toMetaKey = metadata.key; + + var ordinaryHasMetadata = function (MetadataKey, O, P) { + var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P); + if (hasOwn) return true; + var parent = getPrototypeOf(O); + return parent !== null ? ordinaryHasMetadata(MetadataKey, parent, P) : false; + }; + + metadata.exp({ + hasMetadata: function hasMetadata(metadataKey, target /* , targetKey */) { + return ordinaryHasMetadata( + metadataKey, + anObject(target), + arguments.length < 3 ? undefined : toMetaKey(arguments[2]), + ); + }, + }); + + /***/ + }, + /* 459 */ + /***/ function (module, exports, __webpack_require__) { + var metadata = __webpack_require__(39); + var anObject = __webpack_require__(2); + var ordinaryHasOwnMetadata = metadata.has; + var toMetaKey = metadata.key; + + metadata.exp({ + hasOwnMetadata: function hasOwnMetadata(metadataKey, target /* , targetKey */) { + return ordinaryHasOwnMetadata( + metadataKey, + anObject(target), + arguments.length < 3 ? undefined : toMetaKey(arguments[2]), + ); + }, + }); + + /***/ + }, + /* 460 */ + /***/ function (module, exports, __webpack_require__) { + var $metadata = __webpack_require__(39); + var anObject = __webpack_require__(2); + var aFunction = __webpack_require__(12); + var toMetaKey = $metadata.key; + var ordinaryDefineOwnMetadata = $metadata.set; + + $metadata.exp({ + metadata: function metadata(metadataKey, metadataValue) { + return function decorator(target, targetKey) { + ordinaryDefineOwnMetadata( + metadataKey, + metadataValue, + (targetKey !== undefined ? anObject : aFunction)(target), + toMetaKey(targetKey), + ); + }; + }, + }); + + /***/ + }, + /* 461 */ + /***/ function (module, exports, __webpack_require__) { + // https://github.com/rwaldron/tc39-notes/blob/master/es6/2014-09/sept-25.md#510-globalasap-for-enqueuing-a-microtask + var $export = __webpack_require__(0); + var microtask = __webpack_require__(136)(); + var process = __webpack_require__(3).process; + var isNode = __webpack_require__(25)(process) == 'process'; + + $export($export.G, { + asap: function asap(fn) { + var domain = isNode && process.domain; + microtask(domain ? domain.bind(fn) : fn); + }, + }); + + /***/ + }, + /* 462 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // https://github.com/zenparsing/es-observable + var $export = __webpack_require__(0); + var global = __webpack_require__(3); + var core = __webpack_require__(23); + var microtask = __webpack_require__(136)(); + var OBSERVABLE = __webpack_require__(6)('observable'); + var aFunction = __webpack_require__(12); + var anObject = __webpack_require__(2); + var anInstance = __webpack_require__(56); + var redefineAll = __webpack_require__(58); + var hide = __webpack_require__(15); + var forOf = __webpack_require__(57); + var RETURN = forOf.RETURN; + + var getMethod = function (fn) { + return fn == null ? undefined : aFunction(fn); + }; + + var cleanupSubscription = function (subscription) { + var cleanup = subscription._c; + if (cleanup) { + subscription._c = undefined; + cleanup(); + } + }; + + var subscriptionClosed = function (subscription) { + return subscription._o === undefined; + }; + + var closeSubscription = function (subscription) { + if (!subscriptionClosed(subscription)) { + subscription._o = undefined; + cleanupSubscription(subscription); + } + }; + + var Subscription = function (observer, subscriber) { + anObject(observer); + this._c = undefined; + this._o = observer; + observer = new SubscriptionObserver(this); + try { + var cleanup = subscriber(observer); + var subscription = cleanup; + if (cleanup != null) { + if (typeof cleanup.unsubscribe === 'function') + cleanup = function () { + subscription.unsubscribe(); + }; + else aFunction(cleanup); + this._c = cleanup; + } + } catch (e) { + observer.error(e); + return; + } + if (subscriptionClosed(this)) cleanupSubscription(this); + }; + + Subscription.prototype = redefineAll( + {}, + { + unsubscribe: function unsubscribe() { + closeSubscription(this); + }, + }, + ); + + var SubscriptionObserver = function (subscription) { + this._s = subscription; + }; + + SubscriptionObserver.prototype = redefineAll( + {}, + { + next: function next(value) { + var subscription = this._s; + if (!subscriptionClosed(subscription)) { + var observer = subscription._o; + try { + var m = getMethod(observer.next); + if (m) return m.call(observer, value); + } catch (e) { + try { + closeSubscription(subscription); + } finally { + throw e; + } + } + } + }, + error: function error(value) { + var subscription = this._s; + if (subscriptionClosed(subscription)) throw value; + var observer = subscription._o; + subscription._o = undefined; + try { + var m = getMethod(observer.error); + if (!m) throw value; + value = m.call(observer, value); + } catch (e) { + try { + cleanupSubscription(subscription); + } finally { + throw e; + } + } + cleanupSubscription(subscription); + return value; + }, + complete: function complete(value) { + var subscription = this._s; + if (!subscriptionClosed(subscription)) { + var observer = subscription._o; + subscription._o = undefined; + try { + var m = getMethod(observer.complete); + value = m ? m.call(observer, value) : undefined; + } catch (e) { + try { + cleanupSubscription(subscription); + } finally { + throw e; + } + } + cleanupSubscription(subscription); + return value; + } + }, + }, + ); + + var $Observable = function Observable(subscriber) { + anInstance(this, $Observable, 'Observable', '_f')._f = aFunction(subscriber); + }; + + redefineAll($Observable.prototype, { + subscribe: function subscribe(observer) { + return new Subscription(observer, this._f); + }, + forEach: function forEach(fn) { + var that = this; + return new (core.Promise || global.Promise)(function (resolve, reject) { + aFunction(fn); + var subscription = that.subscribe({ + next: function (value) { + try { + return fn(value); + } catch (e) { + reject(e); + subscription.unsubscribe(); + } + }, + error: reject, + complete: resolve, + }); + }); + }, + }); + + redefineAll($Observable, { + from: function from(x) { + var C = typeof this === 'function' ? this : $Observable; + var method = getMethod(anObject(x)[OBSERVABLE]); + if (method) { + var observable = anObject(method.call(x)); + return observable.constructor === C + ? observable + : new C(function (observer) { + return observable.subscribe(observer); + }); + } + return new C(function (observer) { + var done = false; + microtask(function () { + if (!done) { + try { + if ( + forOf(x, false, function (it) { + observer.next(it); + if (done) return RETURN; + }) === RETURN + ) + return; + } catch (e) { + if (done) throw e; + observer.error(e); + return; + } + observer.complete(); + } + }); + return function () { + done = true; + }; + }); + }, + of: function of() { + for (var i = 0, l = arguments.length, items = new Array(l); i < l; ) items[i] = arguments[i++]; + return new (typeof this === 'function' ? this : $Observable)(function (observer) { + var done = false; + microtask(function () { + if (!done) { + for (var j = 0; j < items.length; ++j) { + observer.next(items[j]); + if (done) return; + } + observer.complete(); + } + }); + return function () { + done = true; + }; + }); + }, + }); + + hide($Observable.prototype, OBSERVABLE, function () { + return this; + }); + + $export($export.G, { Observable: $Observable }); + + __webpack_require__(55)('Observable'); + + /***/ + }, + /* 463 */ + /***/ function (module, exports, __webpack_require__) { + // ie9- setTimeout & setInterval additional parameters fix + var global = __webpack_require__(3); + var $export = __webpack_require__(0); + var userAgent = __webpack_require__(94); + var slice = [].slice; + var MSIE = /MSIE .\./.test(userAgent); // <- dirty ie9- check + var wrap = function (set) { + return function (fn, time /* , ...args */) { + var boundArgs = arguments.length > 2; + var args = boundArgs ? slice.call(arguments, 2) : false; + return set( + boundArgs + ? function () { + // eslint-disable-next-line no-new-func + (typeof fn == 'function' ? fn : Function(fn)).apply(this, args); + } + : fn, + time, + ); + }; + }; + $export($export.G + $export.B + $export.F * MSIE, { + setTimeout: wrap(global.setTimeout), + setInterval: wrap(global.setInterval), + }); + + /***/ + }, + /* 464 */ + /***/ function (module, exports, __webpack_require__) { + var $export = __webpack_require__(0); + var $task = __webpack_require__(135); + $export($export.G + $export.B, { + setImmediate: $task.set, + clearImmediate: $task.clear, + }); + + /***/ + }, + /* 465 */ + /***/ function (module, exports, __webpack_require__) { + var $iterators = __webpack_require__(132); + var getKeys = __webpack_require__(51); + var redefine = __webpack_require__(16); + var global = __webpack_require__(3); + var hide = __webpack_require__(15); + var Iterators = __webpack_require__(67); + var wks = __webpack_require__(6); + var ITERATOR = wks('iterator'); + var TO_STRING_TAG = wks('toStringTag'); + var ArrayValues = Iterators.Array; + + var DOMIterables = { + CSSRuleList: true, // TODO: Not spec compliant, should be false. + CSSStyleDeclaration: false, + CSSValueList: false, + ClientRectList: false, + DOMRectList: false, + DOMStringList: false, + DOMTokenList: true, + DataTransferItemList: false, + FileList: false, + HTMLAllCollection: false, + HTMLCollection: false, + HTMLFormElement: false, + HTMLSelectElement: false, + MediaList: true, // TODO: Not spec compliant, should be false. + MimeTypeArray: false, + NamedNodeMap: false, + NodeList: true, + PaintRequestList: false, + Plugin: false, + PluginArray: false, + SVGLengthList: false, + SVGNumberList: false, + SVGPathSegList: false, + SVGPointList: false, + SVGStringList: false, + SVGTransformList: false, + SourceBufferList: false, + StyleSheetList: true, // TODO: Not spec compliant, should be false. + TextTrackCueList: false, + TextTrackList: false, + TouchList: false, + }; + + for (var collections = getKeys(DOMIterables), i = 0; i < collections.length; i++) { + var NAME = collections[i]; + var explicit = DOMIterables[NAME]; + var Collection = global[NAME]; + var proto = Collection && Collection.prototype; + var key; + if (proto) { + if (!proto[ITERATOR]) hide(proto, ITERATOR, ArrayValues); + if (!proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME); + Iterators[NAME] = ArrayValues; + if (explicit) for (key in $iterators) if (!proto[key]) redefine(proto, key, $iterators[key], true); + } + } + + /***/ + }, + /* 466 */ + /***/ function (module, exports) { + /** + * Copyright (c) 2014, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * https://raw.github.com/facebook/regenerator/master/LICENSE file. An + * additional grant of patent rights can be found in the PATENTS file in + * the same directory. + */ + + !(function (global) { + 'use strict'; + + var Op = Object.prototype; + var hasOwn = Op.hasOwnProperty; + var undefined; // More compressible than void 0. + var $Symbol = typeof Symbol === 'function' ? Symbol : {}; + var iteratorSymbol = $Symbol.iterator || '@@iterator'; + var asyncIteratorSymbol = $Symbol.asyncIterator || '@@asyncIterator'; + var toStringTagSymbol = $Symbol.toStringTag || '@@toStringTag'; + + var inModule = typeof module === 'object'; + var runtime = global.regeneratorRuntime; + if (runtime) { + if (inModule) { + // If regeneratorRuntime is defined globally and we're in a module, + // make the exports object identical to regeneratorRuntime. + module.exports = runtime; + } + // Don't bother evaluating the rest of this file if the runtime was + // already defined globally. + return; + } + + // Define the runtime globally (as expected by generated code) as either + // module.exports (if we're in a module) or a new, empty object. + runtime = global.regeneratorRuntime = inModule ? module.exports : {}; + + function wrap(innerFn, outerFn, self, tryLocsList) { + // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator. + var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator; + var generator = Object.create(protoGenerator.prototype); + var context = new Context(tryLocsList || []); + + // The ._invoke method unifies the implementations of the .next, + // .throw, and .return methods. + generator._invoke = makeInvokeMethod(innerFn, self, context); + + return generator; + } + runtime.wrap = wrap; + + // Try/catch helper to minimize deoptimizations. Returns a completion + // record like context.tryEntries[i].completion. This interface could + // have been (and was previously) designed to take a closure to be + // invoked without arguments, but in all the cases we care about we + // already have an existing method we want to call, so there's no need + // to create a new function object. We can even get away with assuming + // the method takes exactly one argument, since that happens to be true + // in every case, so we don't have to touch the arguments object. The + // only additional allocation required is the completion record, which + // has a stable shape and so hopefully should be cheap to allocate. + function tryCatch(fn, obj, arg) { + try { + return { type: 'normal', arg: fn.call(obj, arg) }; + } catch (err) { + return { type: 'throw', arg: err }; + } + } + + var GenStateSuspendedStart = 'suspendedStart'; + var GenStateSuspendedYield = 'suspendedYield'; + var GenStateExecuting = 'executing'; + var GenStateCompleted = 'completed'; + + // Returning this object from the innerFn has the same effect as + // breaking out of the dispatch switch statement. + var ContinueSentinel = {}; + + // Dummy constructor functions that we use as the .constructor and + // .constructor.prototype properties for functions that return Generator + // objects. For full spec compliance, you may wish to configure your + // minifier not to mangle the names of these two functions. + function Generator() {} + function GeneratorFunction() {} + function GeneratorFunctionPrototype() {} + + // This is a polyfill for %IteratorPrototype% for environments that + // don't natively support it. + var IteratorPrototype = {}; + IteratorPrototype[iteratorSymbol] = function () { + return this; + }; + + var getProto = Object.getPrototypeOf; + var NativeIteratorPrototype = getProto && getProto(getProto(values([]))); + if ( + NativeIteratorPrototype && + NativeIteratorPrototype !== Op && + hasOwn.call(NativeIteratorPrototype, iteratorSymbol) + ) { + // This environment has a native %IteratorPrototype%; use it instead + // of the polyfill. + IteratorPrototype = NativeIteratorPrototype; + } + + var Gp = + (GeneratorFunctionPrototype.prototype = + Generator.prototype = + Object.create(IteratorPrototype)); + GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype; + GeneratorFunctionPrototype.constructor = GeneratorFunction; + GeneratorFunctionPrototype[toStringTagSymbol] = GeneratorFunction.displayName = 'GeneratorFunction'; + + // Helper for defining the .next, .throw, and .return methods of the + // Iterator interface in terms of a single ._invoke method. + function defineIteratorMethods(prototype) { + ['next', 'throw', 'return'].forEach(function (method) { + prototype[method] = function (arg) { + return this._invoke(method, arg); + }; + }); + } + + runtime.isGeneratorFunction = function (genFun) { + var ctor = typeof genFun === 'function' && genFun.constructor; + return ctor + ? ctor === GeneratorFunction || + // For the native GeneratorFunction constructor, the best we can + // do is to check its .name property. + (ctor.displayName || ctor.name) === 'GeneratorFunction' + : false; + }; + + runtime.mark = function (genFun) { + if (Object.setPrototypeOf) { + Object.setPrototypeOf(genFun, GeneratorFunctionPrototype); + } else { + genFun.__proto__ = GeneratorFunctionPrototype; + if (!(toStringTagSymbol in genFun)) { + genFun[toStringTagSymbol] = 'GeneratorFunction'; + } + } + genFun.prototype = Object.create(Gp); + return genFun; + }; + + // Within the body of any async function, `await x` is transformed to + // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test + // `hasOwn.call(value, "__await")` to determine if the yielded value is + // meant to be awaited. + runtime.awrap = function (arg) { + return { __await: arg }; + }; + + function AsyncIterator(generator) { + function invoke(method, arg, resolve, reject) { + var record = tryCatch(generator[method], generator, arg); + if (record.type === 'throw') { + reject(record.arg); + } else { + var result = record.arg; + var value = result.value; + if (value && typeof value === 'object' && hasOwn.call(value, '__await')) { + return Promise.resolve(value.__await).then( + function (value) { + invoke('next', value, resolve, reject); + }, + function (err) { + invoke('throw', err, resolve, reject); + }, + ); + } + + return Promise.resolve(value).then(function (unwrapped) { + // When a yielded Promise is resolved, its final value becomes + // the .value of the Promise<{value,done}> result for the + // current iteration. If the Promise is rejected, however, the + // result for this iteration will be rejected with the same + // reason. Note that rejections of yielded Promises are not + // thrown back into the generator function, as is the case + // when an awaited Promise is rejected. This difference in + // behavior between yield and await is important, because it + // allows the consumer to decide what to do with the yielded + // rejection (swallow it and continue, manually .throw it back + // into the generator, abandon iteration, whatever). With + // await, by contrast, there is no opportunity to examine the + // rejection reason outside the generator function, so the + // only option is to throw it from the await expression, and + // let the generator function handle the exception. + result.value = unwrapped; + resolve(result); + }, reject); + } + } + + if (typeof global.process === 'object' && global.process.domain) { + invoke = global.process.domain.bind(invoke); + } + + var previousPromise; + + function enqueue(method, arg) { + function callInvokeWithMethodAndArg() { + return new Promise(function (resolve, reject) { + invoke(method, arg, resolve, reject); + }); + } + + return (previousPromise = + // If enqueue has been called before, then we want to wait until + // all previous Promises have been resolved before calling invoke, + // so that results are always delivered in the correct order. If + // enqueue has not been called before, then it is important to + // call invoke immediately, without waiting on a callback to fire, + // so that the async generator function has the opportunity to do + // any necessary setup in a predictable way. This predictability + // is why the Promise constructor synchronously invokes its + // executor callback, and why async functions synchronously + // execute code before the first await. Since we implement simple + // async functions in terms of async generators, it is especially + // important to get this right, even though it requires care. + previousPromise + ? previousPromise.then( + callInvokeWithMethodAndArg, + // Avoid propagating failures to Promises returned by later + // invocations of the iterator. + callInvokeWithMethodAndArg, + ) + : callInvokeWithMethodAndArg()); + } + + // Define the unified helper method that is used to implement .next, + // .throw, and .return (see defineIteratorMethods). + this._invoke = enqueue; + } + + defineIteratorMethods(AsyncIterator.prototype); + AsyncIterator.prototype[asyncIteratorSymbol] = function () { + return this; + }; + runtime.AsyncIterator = AsyncIterator; + + // Note that simple async functions are implemented on top of + // AsyncIterator objects; they just return a Promise for the value of + // the final result produced by the iterator. + runtime.async = function (innerFn, outerFn, self, tryLocsList) { + var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList)); + + return runtime.isGeneratorFunction(outerFn) + ? iter // If outerFn is a generator, return the full iterator. + : iter.next().then(function (result) { + return result.done ? result.value : iter.next(); + }); + }; + + function makeInvokeMethod(innerFn, self, context) { + var state = GenStateSuspendedStart; + + return function invoke(method, arg) { + if (state === GenStateExecuting) { + throw new Error('Generator is already running'); + } + + if (state === GenStateCompleted) { + if (method === 'throw') { + throw arg; + } + + // Be forgiving, per 25.3.3.3.3 of the spec: + // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume + return doneResult(); + } + + context.method = method; + context.arg = arg; + + while (true) { + var delegate = context.delegate; + if (delegate) { + var delegateResult = maybeInvokeDelegate(delegate, context); + if (delegateResult) { + if (delegateResult === ContinueSentinel) continue; + return delegateResult; + } + } + + if (context.method === 'next') { + // Setting context._sent for legacy support of Babel's + // function.sent implementation. + context.sent = context._sent = context.arg; + } else if (context.method === 'throw') { + if (state === GenStateSuspendedStart) { + state = GenStateCompleted; + throw context.arg; + } + + context.dispatchException(context.arg); + } else if (context.method === 'return') { + context.abrupt('return', context.arg); + } + + state = GenStateExecuting; + + var record = tryCatch(innerFn, self, context); + if (record.type === 'normal') { + // If an exception is thrown from innerFn, we leave state === + // GenStateExecuting and loop back for another invocation. + state = context.done ? GenStateCompleted : GenStateSuspendedYield; + + if (record.arg === ContinueSentinel) { + continue; + } + + return { + value: record.arg, + done: context.done, + }; + } else if (record.type === 'throw') { + state = GenStateCompleted; + // Dispatch the exception by looping back around to the + // context.dispatchException(context.arg) call above. + context.method = 'throw'; + context.arg = record.arg; + } + } + }; + } + + // Call delegate.iterator[context.method](context.arg) and handle the + // result, either by returning a { value, done } result from the + // delegate iterator, or by modifying context.method and context.arg, + // setting context.delegate to null, and returning the ContinueSentinel. + function maybeInvokeDelegate(delegate, context) { + var method = delegate.iterator[context.method]; + if (method === undefined) { + // A .throw or .return when the delegate iterator has no .throw + // method always terminates the yield* loop. + context.delegate = null; + + if (context.method === 'throw') { + if (delegate.iterator.return) { + // If the delegate iterator has a return method, give it a + // chance to clean up. + context.method = 'return'; + context.arg = undefined; + maybeInvokeDelegate(delegate, context); + + if (context.method === 'throw') { + // If maybeInvokeDelegate(context) changed context.method from + // "return" to "throw", let that override the TypeError below. + return ContinueSentinel; + } + } + + context.method = 'throw'; + context.arg = new TypeError("The iterator does not provide a 'throw' method"); + } + + return ContinueSentinel; + } + + var record = tryCatch(method, delegate.iterator, context.arg); + + if (record.type === 'throw') { + context.method = 'throw'; + context.arg = record.arg; + context.delegate = null; + return ContinueSentinel; + } + + var info = record.arg; + + if (!info) { + context.method = 'throw'; + context.arg = new TypeError('iterator result is not an object'); + context.delegate = null; + return ContinueSentinel; + } + + if (info.done) { + // Assign the result of the finished delegate to the temporary + // variable specified by delegate.resultName (see delegateYield). + context[delegate.resultName] = info.value; + + // Resume execution at the desired location (see delegateYield). + context.next = delegate.nextLoc; + + // If context.method was "throw" but the delegate handled the + // exception, let the outer generator proceed normally. If + // context.method was "next", forget context.arg since it has been + // "consumed" by the delegate iterator. If context.method was + // "return", allow the original .return call to continue in the + // outer generator. + if (context.method !== 'return') { + context.method = 'next'; + context.arg = undefined; + } + } else { + // Re-yield the result returned by the delegate method. + return info; + } + + // The delegate iterator is finished, so forget it and continue with + // the outer generator. + context.delegate = null; + return ContinueSentinel; + } + + // Define Generator.prototype.{next,throw,return} in terms of the + // unified ._invoke helper method. + defineIteratorMethods(Gp); + + Gp[toStringTagSymbol] = 'Generator'; + + // A Generator should always return itself as the iterator object when the + // @@iterator function is called on it. Some browsers' implementations of the + // iterator prototype chain incorrectly implement this, causing the Generator + // object to not be returned from this call. This ensures that doesn't happen. + // See https://github.com/facebook/regenerator/issues/274 for more details. + Gp[iteratorSymbol] = function () { + return this; + }; + + Gp.toString = function () { + return '[object Generator]'; + }; + + function pushTryEntry(locs) { + var entry = { tryLoc: locs[0] }; + + if (1 in locs) { + entry.catchLoc = locs[1]; + } + + if (2 in locs) { + entry.finallyLoc = locs[2]; + entry.afterLoc = locs[3]; + } + + this.tryEntries.push(entry); + } + + function resetTryEntry(entry) { + var record = entry.completion || {}; + record.type = 'normal'; + delete record.arg; + entry.completion = record; + } + + function Context(tryLocsList) { + // The root entry object (effectively a try statement without a catch + // or a finally block) gives us a place to store values thrown from + // locations where there is no enclosing try statement. + this.tryEntries = [{ tryLoc: 'root' }]; + tryLocsList.forEach(pushTryEntry, this); + this.reset(true); + } + + runtime.keys = function (object) { + var keys = []; + for (var key in object) { + keys.push(key); + } + keys.reverse(); + + // Rather than returning an object with a next method, we keep + // things simple and return the next function itself. + return function next() { + while (keys.length) { + var key = keys.pop(); + if (key in object) { + next.value = key; + next.done = false; + return next; + } + } + + // To avoid creating an additional object, we just hang the .value + // and .done properties off the next function object itself. This + // also ensures that the minifier will not anonymize the function. + next.done = true; + return next; + }; + }; + + function values(iterable) { + if (iterable) { + var iteratorMethod = iterable[iteratorSymbol]; + if (iteratorMethod) { + return iteratorMethod.call(iterable); + } + + if (typeof iterable.next === 'function') { + return iterable; + } + + if (!isNaN(iterable.length)) { + var i = -1, + next = function next() { + while (++i < iterable.length) { + if (hasOwn.call(iterable, i)) { + next.value = iterable[i]; + next.done = false; + return next; + } + } + + next.value = undefined; + next.done = true; + + return next; + }; + + return (next.next = next); + } + } + + // Return an iterator with no values. + return { next: doneResult }; + } + runtime.values = values; + + function doneResult() { + return { value: undefined, done: true }; + } + + Context.prototype = { + constructor: Context, + + reset: function (skipTempReset) { + this.prev = 0; + this.next = 0; + // Resetting context._sent for legacy support of Babel's + // function.sent implementation. + this.sent = this._sent = undefined; + this.done = false; + this.delegate = null; + + this.method = 'next'; + this.arg = undefined; + + this.tryEntries.forEach(resetTryEntry); + + if (!skipTempReset) { + for (var name in this) { + // Not sure about the optimal order of these conditions: + if (name.charAt(0) === 't' && hasOwn.call(this, name) && !isNaN(+name.slice(1))) { + this[name] = undefined; + } + } + } + }, + + stop: function () { + this.done = true; + + var rootEntry = this.tryEntries[0]; + var rootRecord = rootEntry.completion; + if (rootRecord.type === 'throw') { + throw rootRecord.arg; + } + + return this.rval; + }, + + dispatchException: function (exception) { + if (this.done) { + throw exception; + } + + var context = this; + function handle(loc, caught) { + record.type = 'throw'; + record.arg = exception; + context.next = loc; + + if (caught) { + // If the dispatched exception was caught by a catch block, + // then let that catch block handle the exception normally. + context.method = 'next'; + context.arg = undefined; + } + + return !!caught; + } + + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + var record = entry.completion; + + if (entry.tryLoc === 'root') { + // Exception thrown outside of any try block that could handle + // it, so set the completion value of the entire function to + // throw the exception. + return handle('end'); + } + + if (entry.tryLoc <= this.prev) { + var hasCatch = hasOwn.call(entry, 'catchLoc'); + var hasFinally = hasOwn.call(entry, 'finallyLoc'); + + if (hasCatch && hasFinally) { + if (this.prev < entry.catchLoc) { + return handle(entry.catchLoc, true); + } else if (this.prev < entry.finallyLoc) { + return handle(entry.finallyLoc); + } + } else if (hasCatch) { + if (this.prev < entry.catchLoc) { + return handle(entry.catchLoc, true); + } + } else if (hasFinally) { + if (this.prev < entry.finallyLoc) { + return handle(entry.finallyLoc); + } + } else { + throw new Error('try statement without catch or finally'); + } + } + } + }, + + abrupt: function (type, arg) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + if ( + entry.tryLoc <= this.prev && + hasOwn.call(entry, 'finallyLoc') && + this.prev < entry.finallyLoc + ) { + var finallyEntry = entry; + break; + } + } + + if ( + finallyEntry && + (type === 'break' || type === 'continue') && + finallyEntry.tryLoc <= arg && + arg <= finallyEntry.finallyLoc + ) { + // Ignore the finally entry if control is not jumping to a + // location outside the try/catch block. + finallyEntry = null; + } + + var record = finallyEntry ? finallyEntry.completion : {}; + record.type = type; + record.arg = arg; + + if (finallyEntry) { + this.method = 'next'; + this.next = finallyEntry.finallyLoc; + return ContinueSentinel; + } + + return this.complete(record); + }, + + complete: function (record, afterLoc) { + if (record.type === 'throw') { + throw record.arg; + } + + if (record.type === 'break' || record.type === 'continue') { + this.next = record.arg; + } else if (record.type === 'return') { + this.rval = this.arg = record.arg; + this.method = 'return'; + this.next = 'end'; + } else if (record.type === 'normal' && afterLoc) { + this.next = afterLoc; + } + + return ContinueSentinel; + }, + + finish: function (finallyLoc) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + if (entry.finallyLoc === finallyLoc) { + this.complete(entry.completion, entry.afterLoc); + resetTryEntry(entry); + return ContinueSentinel; + } + } + }, + + catch: function (tryLoc) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + if (entry.tryLoc === tryLoc) { + var record = entry.completion; + if (record.type === 'throw') { + var thrown = record.arg; + resetTryEntry(entry); + } + return thrown; + } + } + + // The context.catch method must only be called with a location + // argument that corresponds to a known catch block. + throw new Error('illegal catch attempt'); + }, + + delegateYield: function (iterable, resultName, nextLoc) { + this.delegate = { + iterator: values(iterable), + resultName: resultName, + nextLoc: nextLoc, + }; + + if (this.method === 'next') { + // Deliberately forget the last sent value so that we don't + // accidentally pass it on to the delegate. + this.arg = undefined; + } + + return ContinueSentinel; + }, + }; + })( + // Among the various tricks for obtaining a reference to the global + // object, this seems to be the most reliable technique that does not + // use indirect eval (which violates Content Security Policy). + typeof global === 'object' + ? global + : typeof window === 'object' + ? window + : typeof self === 'object' + ? self + : this, + ); + + /***/ + }, + /* 467 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(468); + module.exports = __webpack_require__(23).RegExp.escape; + + /***/ + }, + /* 468 */ + /***/ function (module, exports, __webpack_require__) { + // https://github.com/benjamingr/RexExp.escape + var $export = __webpack_require__(0); + var $re = __webpack_require__(469)(/[\\^$*+?.()|[\]{}]/g, '\\$&'); + + $export($export.S, 'RegExp', { + escape: function escape(it) { + return $re(it); + }, + }); + + /***/ + }, + /* 469 */ + /***/ function (module, exports) { + module.exports = function (regExp, replace) { + var replacer = + replace === Object(replace) + ? function (part) { + return replace[part]; + } + : replace; + return function (it) { + return String(it).replace(regExp, replacer); + }; + }; + + /***/ + }, + /* 470 */ + /***/ function (module, exports, __webpack_require__) { + var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__; /*! + * https://github.com/es-shims/es5-shim + * @license es5-shim Copyright 2009-2015 by contributors, MIT License + * see https://github.com/es-shims/es5-shim/blob/master/LICENSE + */ + + // vim: ts=4 sts=4 sw=4 expandtab + + // Add semicolon to prevent IIFE from being passed as argument to concatenated code. + // UMD (Universal Module Definition) + // see https://github.com/umdjs/umd/blob/master/templates/returnExports.js + (function (root, factory) { + 'use strict'; + + /* global define, exports, module */ + if (true) { + // AMD. Register as an anonymous module. + !((__WEBPACK_AMD_DEFINE_FACTORY__ = factory), + (__WEBPACK_AMD_DEFINE_RESULT__ = + typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' + ? __WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module) + : __WEBPACK_AMD_DEFINE_FACTORY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else if (typeof exports === 'object') { + // Node. Does not work with strict CommonJS, but + // only CommonJS-like enviroments that support module.exports, + // like Node. + module.exports = factory(); + } else { + // Browser globals (root is window) + root.returnExports = factory(); + } + })(this, function () { + /** + * Brings an environment as close to ECMAScript 5 compliance + * as is possible with the facilities of erstwhile engines. + * + * Annotated ES5: http://es5.github.com/ (specific links below) + * ES5 Spec: http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf + * Required reading: http://javascriptweblog.wordpress.com/2011/12/05/extending-javascript-natives/ + */ + + // Shortcut to an often accessed properties, in order to avoid multiple + // dereference that costs universally. This also holds a reference to known-good + // functions. + var $Array = Array; + var ArrayPrototype = $Array.prototype; + var $Object = Object; + var ObjectPrototype = $Object.prototype; + var $Function = Function; + var FunctionPrototype = $Function.prototype; + var $String = String; + var StringPrototype = $String.prototype; + var $Number = Number; + var NumberPrototype = $Number.prototype; + var array_slice = ArrayPrototype.slice; + var array_splice = ArrayPrototype.splice; + var array_push = ArrayPrototype.push; + var array_unshift = ArrayPrototype.unshift; + var array_concat = ArrayPrototype.concat; + var array_join = ArrayPrototype.join; + var call = FunctionPrototype.call; + var apply = FunctionPrototype.apply; + var max = Math.max; + var min = Math.min; + + // Having a toString local variable name breaks in Opera so use to_string. + var to_string = ObjectPrototype.toString; + + /* global Symbol */ + /* eslint-disable one-var-declaration-per-line, no-redeclare, max-statements-per-line */ + var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol'; + var isCallable; + /* inlined from https://npmjs.com/is-callable */ var fnToStr = Function.prototype.toString, + constructorRegex = /^\s*class /, + isES6ClassFn = function isES6ClassFn(value) { + try { + var fnStr = fnToStr.call(value); + var singleStripped = fnStr.replace(/\/\/.*\n/g, ''); + var multiStripped = singleStripped.replace(/\/\*[.\s\S]*\*\//g, ''); + var spaceStripped = multiStripped.replace(/\n/gm, ' ').replace(/ {2}/g, ' '); + return constructorRegex.test(spaceStripped); + } catch (e) { + return false; /* not a function */ + } + }, + tryFunctionObject = function tryFunctionObject(value) { + try { + if (isES6ClassFn(value)) { + return false; + } + fnToStr.call(value); + return true; + } catch (e) { + return false; + } + }, + fnClass = '[object Function]', + genClass = '[object GeneratorFunction]', + isCallable = function isCallable(value) { + if (!value) { + return false; + } + if (typeof value !== 'function' && typeof value !== 'object') { + return false; + } + if (hasToStringTag) { + return tryFunctionObject(value); + } + if (isES6ClassFn(value)) { + return false; + } + var strClass = to_string.call(value); + return strClass === fnClass || strClass === genClass; + }; + + var isRegex; + /* inlined from https://npmjs.com/is-regex */ var regexExec = RegExp.prototype.exec, + tryRegexExec = function tryRegexExec(value) { + try { + regexExec.call(value); + return true; + } catch (e) { + return false; + } + }, + regexClass = '[object RegExp]'; + isRegex = function isRegex(value) { + if (typeof value !== 'object') { + return false; + } + return hasToStringTag ? tryRegexExec(value) : to_string.call(value) === regexClass; + }; + var isString; + /* inlined from https://npmjs.com/is-string */ var strValue = String.prototype.valueOf, + tryStringObject = function tryStringObject(value) { + try { + strValue.call(value); + return true; + } catch (e) { + return false; + } + }, + stringClass = '[object String]'; + isString = function isString(value) { + if (typeof value === 'string') { + return true; + } + if (typeof value !== 'object') { + return false; + } + return hasToStringTag ? tryStringObject(value) : to_string.call(value) === stringClass; + }; + /* eslint-enable one-var-declaration-per-line, no-redeclare, max-statements-per-line */ + + /* inlined from http://npmjs.com/define-properties */ + var supportsDescriptors = + $Object.defineProperty && + (function () { + try { + var obj = {}; + $Object.defineProperty(obj, 'x', { enumerable: false, value: obj }); + for (var _ in obj) { + // jscs:ignore disallowUnusedVariables + return false; + } + return obj.x === obj; + } catch (e) { + /* this is ES3 */ + return false; + } + })(); + var defineProperties = (function (has) { + // Define configurable, writable, and non-enumerable props + // if they don't exist. + var defineProperty; + if (supportsDescriptors) { + defineProperty = function (object, name, method, forceAssign) { + if (!forceAssign && name in object) { + return; + } + $Object.defineProperty(object, name, { + configurable: true, + enumerable: false, + writable: true, + value: method, + }); + }; + } else { + defineProperty = function (object, name, method, forceAssign) { + if (!forceAssign && name in object) { + return; + } + object[name] = method; + }; + } + return function defineProperties(object, map, forceAssign) { + for (var name in map) { + if (has.call(map, name)) { + defineProperty(object, name, map[name], forceAssign); + } + } + }; + })(ObjectPrototype.hasOwnProperty); + + // + // Util + // ====== + // + + /* replaceable with https://npmjs.com/package/es-abstract /helpers/isPrimitive */ + var isPrimitive = function isPrimitive(input) { + var type = typeof input; + return input === null || (type !== 'object' && type !== 'function'); + }; + + var isActualNaN = + $Number.isNaN || + function isActualNaN(x) { + return x !== x; + }; + + var ES = { + // ES5 9.4 + // http://es5.github.com/#x9.4 + // http://jsperf.com/to-integer + /* replaceable with https://npmjs.com/package/es-abstract ES5.ToInteger */ + ToInteger: function ToInteger(num) { + var n = +num; + if (isActualNaN(n)) { + n = 0; + } else if (n !== 0 && n !== 1 / 0 && n !== -(1 / 0)) { + n = (n > 0 || -1) * Math.floor(Math.abs(n)); + } + return n; + }, + + /* replaceable with https://npmjs.com/package/es-abstract ES5.ToPrimitive */ + ToPrimitive: function ToPrimitive(input) { + var val, valueOf, toStr; + if (isPrimitive(input)) { + return input; + } + valueOf = input.valueOf; + if (isCallable(valueOf)) { + val = valueOf.call(input); + if (isPrimitive(val)) { + return val; + } + } + toStr = input.toString; + if (isCallable(toStr)) { + val = toStr.call(input); + if (isPrimitive(val)) { + return val; + } + } + throw new TypeError(); + }, + + // ES5 9.9 + // http://es5.github.com/#x9.9 + /* replaceable with https://npmjs.com/package/es-abstract ES5.ToObject */ + ToObject: function (o) { + if (o == null) { + // this matches both null and undefined + throw new TypeError("can't convert " + o + ' to object'); + } + return $Object(o); + }, + + /* replaceable with https://npmjs.com/package/es-abstract ES5.ToUint32 */ + ToUint32: function ToUint32(x) { + return x >>> 0; + }, + }; + + // + // Function + // ======== + // + + // ES-5 15.3.4.5 + // http://es5.github.com/#x15.3.4.5 + + var Empty = function Empty() {}; + + defineProperties(FunctionPrototype, { + bind: function bind(that) { + // .length is 1 + // 1. Let Target be the this value. + var target = this; + // 2. If IsCallable(Target) is false, throw a TypeError exception. + if (!isCallable(target)) { + throw new TypeError('Function.prototype.bind called on incompatible ' + target); + } + // 3. Let A be a new (possibly empty) internal list of all of the + // argument values provided after thisArg (arg1, arg2 etc), in order. + // XXX slicedArgs will stand in for "A" if used + var args = array_slice.call(arguments, 1); // for normal call + // 4. Let F be a new native ECMAScript object. + // 11. Set the [[Prototype]] internal property of F to the standard + // built-in Function prototype object as specified in 15.3.3.1. + // 12. Set the [[Call]] internal property of F as described in + // 15.3.4.5.1. + // 13. Set the [[Construct]] internal property of F as described in + // 15.3.4.5.2. + // 14. Set the [[HasInstance]] internal property of F as described in + // 15.3.4.5.3. + var bound; + var binder = function () { + if (this instanceof bound) { + // 15.3.4.5.2 [[Construct]] + // When the [[Construct]] internal method of a function object, + // F that was created using the bind function is called with a + // list of arguments ExtraArgs, the following steps are taken: + // 1. Let target be the value of F's [[TargetFunction]] + // internal property. + // 2. If target has no [[Construct]] internal method, a + // TypeError exception is thrown. + // 3. Let boundArgs be the value of F's [[BoundArgs]] internal + // property. + // 4. Let args be a new list containing the same values as the + // list boundArgs in the same order followed by the same + // values as the list ExtraArgs in the same order. + // 5. Return the result of calling the [[Construct]] internal + // method of target providing args as the arguments. + + var result = apply.call(target, this, array_concat.call(args, array_slice.call(arguments))); + if ($Object(result) === result) { + return result; + } + return this; + } else { + // 15.3.4.5.1 [[Call]] + // When the [[Call]] internal method of a function object, F, + // which was created using the bind function is called with a + // this value and a list of arguments ExtraArgs, the following + // steps are taken: + // 1. Let boundArgs be the value of F's [[BoundArgs]] internal + // property. + // 2. Let boundThis be the value of F's [[BoundThis]] internal + // property. + // 3. Let target be the value of F's [[TargetFunction]] internal + // property. + // 4. Let args be a new list containing the same values as the + // list boundArgs in the same order followed by the same + // values as the list ExtraArgs in the same order. + // 5. Return the result of calling the [[Call]] internal method + // of target providing boundThis as the this value and + // providing args as the arguments. + + // equiv: target.call(this, ...boundArgs, ...args) + return apply.call(target, that, array_concat.call(args, array_slice.call(arguments))); + } + }; + + // 15. If the [[Class]] internal property of Target is "Function", then + // a. Let L be the length property of Target minus the length of A. + // b. Set the length own property of F to either 0 or L, whichever is + // larger. + // 16. Else set the length own property of F to 0. + + var boundLength = max(0, target.length - args.length); + + // 17. Set the attributes of the length own property of F to the values + // specified in 15.3.5.1. + var boundArgs = []; + for (var i = 0; i < boundLength; i++) { + array_push.call(boundArgs, '$' + i); + } + + // XXX Build a dynamic function with desired amount of arguments is the only + // way to set the length property of a function. + // In environments where Content Security Policies enabled (Chrome extensions, + // for ex.) all use of eval or Function costructor throws an exception. + // However in all of these environments Function.prototype.bind exists + // and so this code will never be executed. + bound = $Function( + 'binder', + 'return function (' + + array_join.call(boundArgs, ',') + + '){ return binder.apply(this, arguments); }', + )(binder); + + if (target.prototype) { + Empty.prototype = target.prototype; + bound.prototype = new Empty(); + // Clean up dangling references. + Empty.prototype = null; + } + + // TODO + // 18. Set the [[Extensible]] internal property of F to true. + + // TODO + // 19. Let thrower be the [[ThrowTypeError]] function Object (13.2.3). + // 20. Call the [[DefineOwnProperty]] internal method of F with + // arguments "caller", PropertyDescriptor {[[Get]]: thrower, [[Set]]: + // thrower, [[Enumerable]]: false, [[Configurable]]: false}, and + // false. + // 21. Call the [[DefineOwnProperty]] internal method of F with + // arguments "arguments", PropertyDescriptor {[[Get]]: thrower, + // [[Set]]: thrower, [[Enumerable]]: false, [[Configurable]]: false}, + // and false. + + // TODO + // NOTE Function objects created using Function.prototype.bind do not + // have a prototype property or the [[Code]], [[FormalParameters]], and + // [[Scope]] internal properties. + // XXX can't delete prototype in pure-js. + + // 22. Return F. + return bound; + }, + }); + + // _Please note: Shortcuts are defined after `Function.prototype.bind` as we + // use it in defining shortcuts. + var owns = call.bind(ObjectPrototype.hasOwnProperty); + var toStr = call.bind(ObjectPrototype.toString); + var arraySlice = call.bind(array_slice); + var arraySliceApply = apply.bind(array_slice); + /* globals document */ + if (typeof document === 'object' && document && document.documentElement) { + try { + arraySlice(document.documentElement.childNodes); + } catch (e) { + var origArraySlice = arraySlice; + var origArraySliceApply = arraySliceApply; + arraySlice = function arraySliceIE(arr) { + var r = []; + var i = arr.length; + while (i-- > 0) { + r[i] = arr[i]; + } + return origArraySliceApply(r, origArraySlice(arguments, 1)); + }; + arraySliceApply = function arraySliceApplyIE(arr, args) { + return origArraySliceApply(arraySlice(arr), args); + }; + } + } + var strSlice = call.bind(StringPrototype.slice); + var strSplit = call.bind(StringPrototype.split); + var strIndexOf = call.bind(StringPrototype.indexOf); + var pushCall = call.bind(array_push); + var isEnum = call.bind(ObjectPrototype.propertyIsEnumerable); + var arraySort = call.bind(ArrayPrototype.sort); + + // + // Array + // ===== + // + + var isArray = + $Array.isArray || + function isArray(obj) { + return toStr(obj) === '[object Array]'; + }; + + // ES5 15.4.4.12 + // http://es5.github.com/#x15.4.4.13 + // Return len+argCount. + // [bugfix, ielt8] + // IE < 8 bug: [].unshift(0) === undefined but should be "1" + var hasUnshiftReturnValueBug = [].unshift(0) !== 1; + defineProperties( + ArrayPrototype, + { + unshift: function () { + array_unshift.apply(this, arguments); + return this.length; + }, + }, + hasUnshiftReturnValueBug, + ); + + // ES5 15.4.3.2 + // http://es5.github.com/#x15.4.3.2 + // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/isArray + defineProperties($Array, { isArray: isArray }); + + // The IsCallable() check in the Array functions + // has been replaced with a strict check on the + // internal class of the object to trap cases where + // the provided function was actually a regular + // expression literal, which in V8 and + // JavaScriptCore is a typeof "function". Only in + // V8 are regular expression literals permitted as + // reduce parameters, so it is desirable in the + // general case for the shim to match the more + // strict and common behavior of rejecting regular + // expressions. + + // ES5 15.4.4.18 + // http://es5.github.com/#x15.4.4.18 + // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/array/forEach + + // Check failure of by-index access of string characters (IE < 9) + // and failure of `0 in boxedString` (Rhino) + var boxedString = $Object('a'); + var splitString = boxedString[0] !== 'a' || !(0 in boxedString); + + var properlyBoxesContext = function properlyBoxed(method) { + // Check node 0.6.21 bug where third parameter is not boxed + var properlyBoxesNonStrict = true; + var properlyBoxesStrict = true; + var threwException = false; + if (method) { + try { + method.call('foo', function (_, __, context) { + if (typeof context !== 'object') { + properlyBoxesNonStrict = false; + } + }); + + method.call( + [1], + function () { + 'use strict'; + + properlyBoxesStrict = typeof this === 'string'; + }, + 'x', + ); + } catch (e) { + threwException = true; + } + } + return !!method && !threwException && properlyBoxesNonStrict && properlyBoxesStrict; + }; + + defineProperties( + ArrayPrototype, + { + forEach: function forEach(callbackfn /*, thisArg*/) { + var object = ES.ToObject(this); + var self = splitString && isString(this) ? strSplit(this, '') : object; + var i = -1; + var length = ES.ToUint32(self.length); + var T; + if (arguments.length > 1) { + T = arguments[1]; + } + + // If no callback function or if callback is not a callable function + if (!isCallable(callbackfn)) { + throw new TypeError('Array.prototype.forEach callback must be a function'); + } + + while (++i < length) { + if (i in self) { + // Invoke the callback function with call, passing arguments: + // context, property value, property key, thisArg object + if (typeof T === 'undefined') { + callbackfn(self[i], i, object); + } else { + callbackfn.call(T, self[i], i, object); + } + } + } + }, + }, + !properlyBoxesContext(ArrayPrototype.forEach), + ); + + // ES5 15.4.4.19 + // http://es5.github.com/#x15.4.4.19 + // https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/map + defineProperties( + ArrayPrototype, + { + map: function map(callbackfn /*, thisArg*/) { + var object = ES.ToObject(this); + var self = splitString && isString(this) ? strSplit(this, '') : object; + var length = ES.ToUint32(self.length); + var result = $Array(length); + var T; + if (arguments.length > 1) { + T = arguments[1]; + } + + // If no callback function or if callback is not a callable function + if (!isCallable(callbackfn)) { + throw new TypeError('Array.prototype.map callback must be a function'); + } + + for (var i = 0; i < length; i++) { + if (i in self) { + if (typeof T === 'undefined') { + result[i] = callbackfn(self[i], i, object); + } else { + result[i] = callbackfn.call(T, self[i], i, object); + } + } + } + return result; + }, + }, + !properlyBoxesContext(ArrayPrototype.map), + ); + + // ES5 15.4.4.20 + // http://es5.github.com/#x15.4.4.20 + // https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/filter + defineProperties( + ArrayPrototype, + { + filter: function filter(callbackfn /*, thisArg*/) { + var object = ES.ToObject(this); + var self = splitString && isString(this) ? strSplit(this, '') : object; + var length = ES.ToUint32(self.length); + var result = []; + var value; + var T; + if (arguments.length > 1) { + T = arguments[1]; + } + + // If no callback function or if callback is not a callable function + if (!isCallable(callbackfn)) { + throw new TypeError('Array.prototype.filter callback must be a function'); + } + + for (var i = 0; i < length; i++) { + if (i in self) { + value = self[i]; + if ( + typeof T === 'undefined' + ? callbackfn(value, i, object) + : callbackfn.call(T, value, i, object) + ) { + pushCall(result, value); + } + } + } + return result; + }, + }, + !properlyBoxesContext(ArrayPrototype.filter), + ); + + // ES5 15.4.4.16 + // http://es5.github.com/#x15.4.4.16 + // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/every + defineProperties( + ArrayPrototype, + { + every: function every(callbackfn /*, thisArg*/) { + var object = ES.ToObject(this); + var self = splitString && isString(this) ? strSplit(this, '') : object; + var length = ES.ToUint32(self.length); + var T; + if (arguments.length > 1) { + T = arguments[1]; + } + + // If no callback function or if callback is not a callable function + if (!isCallable(callbackfn)) { + throw new TypeError('Array.prototype.every callback must be a function'); + } + + for (var i = 0; i < length; i++) { + if ( + i in self && + !(typeof T === 'undefined' + ? callbackfn(self[i], i, object) + : callbackfn.call(T, self[i], i, object)) + ) { + return false; + } + } + return true; + }, + }, + !properlyBoxesContext(ArrayPrototype.every), + ); + + // ES5 15.4.4.17 + // http://es5.github.com/#x15.4.4.17 + // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/some + defineProperties( + ArrayPrototype, + { + some: function some(callbackfn /*, thisArg */) { + var object = ES.ToObject(this); + var self = splitString && isString(this) ? strSplit(this, '') : object; + var length = ES.ToUint32(self.length); + var T; + if (arguments.length > 1) { + T = arguments[1]; + } + + // If no callback function or if callback is not a callable function + if (!isCallable(callbackfn)) { + throw new TypeError('Array.prototype.some callback must be a function'); + } + + for (var i = 0; i < length; i++) { + if ( + i in self && + (typeof T === 'undefined' + ? callbackfn(self[i], i, object) + : callbackfn.call(T, self[i], i, object)) + ) { + return true; + } + } + return false; + }, + }, + !properlyBoxesContext(ArrayPrototype.some), + ); + + // ES5 15.4.4.21 + // http://es5.github.com/#x15.4.4.21 + // https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/reduce + var reduceCoercesToObject = false; + if (ArrayPrototype.reduce) { + reduceCoercesToObject = + typeof ArrayPrototype.reduce.call('es5', function (_, __, ___, list) { + return list; + }) === 'object'; + } + defineProperties( + ArrayPrototype, + { + reduce: function reduce(callbackfn /*, initialValue*/) { + var object = ES.ToObject(this); + var self = splitString && isString(this) ? strSplit(this, '') : object; + var length = ES.ToUint32(self.length); + + // If no callback function or if callback is not a callable function + if (!isCallable(callbackfn)) { + throw new TypeError('Array.prototype.reduce callback must be a function'); + } + + // no value to return if no initial value and an empty array + if (length === 0 && arguments.length === 1) { + throw new TypeError('reduce of empty array with no initial value'); + } + + var i = 0; + var result; + if (arguments.length >= 2) { + result = arguments[1]; + } else { + do { + if (i in self) { + result = self[i++]; + break; + } + + // if array contains no values, no initial value to return + if (++i >= length) { + throw new TypeError('reduce of empty array with no initial value'); + } + } while (true); + } + + for (; i < length; i++) { + if (i in self) { + result = callbackfn(result, self[i], i, object); + } + } + + return result; + }, + }, + !reduceCoercesToObject, + ); + + // ES5 15.4.4.22 + // http://es5.github.com/#x15.4.4.22 + // https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/reduceRight + var reduceRightCoercesToObject = false; + if (ArrayPrototype.reduceRight) { + reduceRightCoercesToObject = + typeof ArrayPrototype.reduceRight.call('es5', function (_, __, ___, list) { + return list; + }) === 'object'; + } + defineProperties( + ArrayPrototype, + { + reduceRight: function reduceRight(callbackfn /*, initial*/) { + var object = ES.ToObject(this); + var self = splitString && isString(this) ? strSplit(this, '') : object; + var length = ES.ToUint32(self.length); + + // If no callback function or if callback is not a callable function + if (!isCallable(callbackfn)) { + throw new TypeError('Array.prototype.reduceRight callback must be a function'); + } + + // no value to return if no initial value, empty array + if (length === 0 && arguments.length === 1) { + throw new TypeError('reduceRight of empty array with no initial value'); + } + + var result; + var i = length - 1; + if (arguments.length >= 2) { + result = arguments[1]; + } else { + do { + if (i in self) { + result = self[i--]; + break; + } + + // if array contains no values, no initial value to return + if (--i < 0) { + throw new TypeError('reduceRight of empty array with no initial value'); + } + } while (true); + } + + if (i < 0) { + return result; + } + + do { + if (i in self) { + result = callbackfn(result, self[i], i, object); + } + } while (i--); + + return result; + }, + }, + !reduceRightCoercesToObject, + ); + + // ES5 15.4.4.14 + // http://es5.github.com/#x15.4.4.14 + // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/indexOf + var hasFirefox2IndexOfBug = ArrayPrototype.indexOf && [0, 1].indexOf(1, 2) !== -1; + defineProperties( + ArrayPrototype, + { + indexOf: function indexOf(searchElement /*, fromIndex */) { + var self = splitString && isString(this) ? strSplit(this, '') : ES.ToObject(this); + var length = ES.ToUint32(self.length); + + if (length === 0) { + return -1; + } + + var i = 0; + if (arguments.length > 1) { + i = ES.ToInteger(arguments[1]); + } + + // handle negative indices + i = i >= 0 ? i : max(0, length + i); + for (; i < length; i++) { + if (i in self && self[i] === searchElement) { + return i; + } + } + return -1; + }, + }, + hasFirefox2IndexOfBug, + ); + + // ES5 15.4.4.15 + // http://es5.github.com/#x15.4.4.15 + // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/lastIndexOf + var hasFirefox2LastIndexOfBug = ArrayPrototype.lastIndexOf && [0, 1].lastIndexOf(0, -3) !== -1; + defineProperties( + ArrayPrototype, + { + lastIndexOf: function lastIndexOf(searchElement /*, fromIndex */) { + var self = splitString && isString(this) ? strSplit(this, '') : ES.ToObject(this); + var length = ES.ToUint32(self.length); + + if (length === 0) { + return -1; + } + var i = length - 1; + if (arguments.length > 1) { + i = min(i, ES.ToInteger(arguments[1])); + } + // handle negative indices + i = i >= 0 ? i : length - Math.abs(i); + for (; i >= 0; i--) { + if (i in self && searchElement === self[i]) { + return i; + } + } + return -1; + }, + }, + hasFirefox2LastIndexOfBug, + ); + + // ES5 15.4.4.12 + // http://es5.github.com/#x15.4.4.12 + var spliceNoopReturnsEmptyArray = (function () { + var a = [1, 2]; + var result = a.splice(); + return a.length === 2 && isArray(result) && result.length === 0; + })(); + defineProperties( + ArrayPrototype, + { + // Safari 5.0 bug where .splice() returns undefined + splice: function splice(start, deleteCount) { + if (arguments.length === 0) { + return []; + } else { + return array_splice.apply(this, arguments); + } + }, + }, + !spliceNoopReturnsEmptyArray, + ); + + var spliceWorksWithEmptyObject = (function () { + var obj = {}; + ArrayPrototype.splice.call(obj, 0, 0, 1); + return obj.length === 1; + })(); + defineProperties( + ArrayPrototype, + { + splice: function splice(start, deleteCount) { + if (arguments.length === 0) { + return []; + } + var args = arguments; + this.length = max(ES.ToInteger(this.length), 0); + if (arguments.length > 0 && typeof deleteCount !== 'number') { + args = arraySlice(arguments); + if (args.length < 2) { + pushCall(args, this.length - start); + } else { + args[1] = ES.ToInteger(deleteCount); + } + } + return array_splice.apply(this, args); + }, + }, + !spliceWorksWithEmptyObject, + ); + var spliceWorksWithLargeSparseArrays = (function () { + // Per https://github.com/es-shims/es5-shim/issues/295 + // Safari 7/8 breaks with sparse arrays of size 1e5 or greater + var arr = new $Array(1e5); + // note: the index MUST be 8 or larger or the test will false pass + arr[8] = 'x'; + arr.splice(1, 1); + // note: this test must be defined *after* the indexOf shim + // per https://github.com/es-shims/es5-shim/issues/313 + return arr.indexOf('x') === 7; + })(); + var spliceWorksWithSmallSparseArrays = (function () { + // Per https://github.com/es-shims/es5-shim/issues/295 + // Opera 12.15 breaks on this, no idea why. + var n = 256; + var arr = []; + arr[n] = 'a'; + arr.splice(n + 1, 0, 'b'); + return arr[n] === 'a'; + })(); + defineProperties( + ArrayPrototype, + { + splice: function splice(start, deleteCount) { + var O = ES.ToObject(this); + var A = []; + var len = ES.ToUint32(O.length); + var relativeStart = ES.ToInteger(start); + var actualStart = relativeStart < 0 ? max(len + relativeStart, 0) : min(relativeStart, len); + var actualDeleteCount = min(max(ES.ToInteger(deleteCount), 0), len - actualStart); + + var k = 0; + var from; + while (k < actualDeleteCount) { + from = $String(actualStart + k); + if (owns(O, from)) { + A[k] = O[from]; + } + k += 1; + } + + var items = arraySlice(arguments, 2); + var itemCount = items.length; + var to; + if (itemCount < actualDeleteCount) { + k = actualStart; + var maxK = len - actualDeleteCount; + while (k < maxK) { + from = $String(k + actualDeleteCount); + to = $String(k + itemCount); + if (owns(O, from)) { + O[to] = O[from]; + } else { + delete O[to]; + } + k += 1; + } + k = len; + var minK = len - actualDeleteCount + itemCount; + while (k > minK) { + delete O[k - 1]; + k -= 1; + } + } else if (itemCount > actualDeleteCount) { + k = len - actualDeleteCount; + while (k > actualStart) { + from = $String(k + actualDeleteCount - 1); + to = $String(k + itemCount - 1); + if (owns(O, from)) { + O[to] = O[from]; + } else { + delete O[to]; + } + k -= 1; + } + } + k = actualStart; + for (var i = 0; i < items.length; ++i) { + O[k] = items[i]; + k += 1; + } + O.length = len - actualDeleteCount + itemCount; + + return A; + }, + }, + !spliceWorksWithLargeSparseArrays || !spliceWorksWithSmallSparseArrays, + ); + + var originalJoin = ArrayPrototype.join; + var hasStringJoinBug; + try { + hasStringJoinBug = Array.prototype.join.call('123', ',') !== '1,2,3'; + } catch (e) { + hasStringJoinBug = true; + } + if (hasStringJoinBug) { + defineProperties( + ArrayPrototype, + { + join: function join(separator) { + var sep = typeof separator === 'undefined' ? ',' : separator; + return originalJoin.call(isString(this) ? strSplit(this, '') : this, sep); + }, + }, + hasStringJoinBug, + ); + } + + var hasJoinUndefinedBug = [1, 2].join(undefined) !== '1,2'; + if (hasJoinUndefinedBug) { + defineProperties( + ArrayPrototype, + { + join: function join(separator) { + var sep = typeof separator === 'undefined' ? ',' : separator; + return originalJoin.call(this, sep); + }, + }, + hasJoinUndefinedBug, + ); + } + + var pushShim = function push(item) { + var O = ES.ToObject(this); + var n = ES.ToUint32(O.length); + var i = 0; + while (i < arguments.length) { + O[n + i] = arguments[i]; + i += 1; + } + O.length = n + i; + return n + i; + }; + + var pushIsNotGeneric = (function () { + var obj = {}; + var result = Array.prototype.push.call(obj, undefined); + return result !== 1 || obj.length !== 1 || typeof obj[0] !== 'undefined' || !owns(obj, 0); + })(); + defineProperties( + ArrayPrototype, + { + push: function push(item) { + if (isArray(this)) { + return array_push.apply(this, arguments); + } + return pushShim.apply(this, arguments); + }, + }, + pushIsNotGeneric, + ); + + // This fixes a very weird bug in Opera 10.6 when pushing `undefined + var pushUndefinedIsWeird = (function () { + var arr = []; + var result = arr.push(undefined); + return result !== 1 || arr.length !== 1 || typeof arr[0] !== 'undefined' || !owns(arr, 0); + })(); + defineProperties(ArrayPrototype, { push: pushShim }, pushUndefinedIsWeird); + + // ES5 15.2.3.14 + // http://es5.github.io/#x15.4.4.10 + // Fix boxed string bug + defineProperties( + ArrayPrototype, + { + slice: function (start, end) { + var arr = isString(this) ? strSplit(this, '') : this; + return arraySliceApply(arr, arguments); + }, + }, + splitString, + ); + + var sortIgnoresNonFunctions = (function () { + try { + [1, 2].sort(null); + } catch (e) { + try { + [1, 2].sort({}); + } catch (e2) { + return false; + } + } + return true; + })(); + var sortThrowsOnRegex = (function () { + // this is a problem in Firefox 4, in which `typeof /a/ === 'function'` + try { + [1, 2].sort(/a/); + return false; + } catch (e) {} + return true; + })(); + var sortIgnoresUndefined = (function () { + // applies in IE 8, for one. + try { + [1, 2].sort(undefined); + return true; + } catch (e) {} + return false; + })(); + defineProperties( + ArrayPrototype, + { + sort: function sort(compareFn) { + if (typeof compareFn === 'undefined') { + return arraySort(this); + } + if (!isCallable(compareFn)) { + throw new TypeError('Array.prototype.sort callback must be a function'); + } + return arraySort(this, compareFn); + }, + }, + sortIgnoresNonFunctions || !sortIgnoresUndefined || !sortThrowsOnRegex, + ); + + // + // Object + // ====== + // + + // ES5 15.2.3.14 + // http://es5.github.com/#x15.2.3.14 + + // http://whattheheadsaid.com/2010/10/a-safer-object-keys-compatibility-implementation + var hasDontEnumBug = !isEnum({ toString: null }, 'toString'); // jscs:ignore disallowQuotedKeysInObjects + var hasProtoEnumBug = isEnum(function () {}, 'prototype'); + var hasStringEnumBug = !owns('x', '0'); + var equalsConstructorPrototype = function (o) { + var ctor = o.constructor; + return ctor && ctor.prototype === o; + }; + var excludedKeys = { + $applicationCache: true, + $console: true, + $external: true, + $frame: true, + $frameElement: true, + $frames: true, + $innerHeight: true, + $innerWidth: true, + $onmozfullscreenchange: true, + $onmozfullscreenerror: true, + $outerHeight: true, + $outerWidth: true, + $pageXOffset: true, + $pageYOffset: true, + $parent: true, + $scrollLeft: true, + $scrollTop: true, + $scrollX: true, + $scrollY: true, + $self: true, + $webkitIndexedDB: true, + $webkitStorageInfo: true, + $window: true, + + $width: true, + $height: true, + $top: true, + $localStorage: true, + }; + var hasAutomationEqualityBug = (function () { + /* globals window */ + if (typeof window === 'undefined') { + return false; + } + for (var k in window) { + try { + if ( + !excludedKeys['$' + k] && + owns(window, k) && + window[k] !== null && + typeof window[k] === 'object' + ) { + equalsConstructorPrototype(window[k]); + } + } catch (e) { + return true; + } + } + return false; + })(); + var equalsConstructorPrototypeIfNotBuggy = function (object) { + if (typeof window === 'undefined' || !hasAutomationEqualityBug) { + return equalsConstructorPrototype(object); + } + try { + return equalsConstructorPrototype(object); + } catch (e) { + return false; + } + }; + var dontEnums = [ + 'toString', + 'toLocaleString', + 'valueOf', + 'hasOwnProperty', + 'isPrototypeOf', + 'propertyIsEnumerable', + 'constructor', + ]; + var dontEnumsLength = dontEnums.length; + + // taken directly from https://github.com/ljharb/is-arguments/blob/master/index.js + // can be replaced with require('is-arguments') if we ever use a build process instead + var isStandardArguments = function isArguments(value) { + return toStr(value) === '[object Arguments]'; + }; + var isLegacyArguments = function isArguments(value) { + return ( + value !== null && + typeof value === 'object' && + typeof value.length === 'number' && + value.length >= 0 && + !isArray(value) && + isCallable(value.callee) + ); + }; + var isArguments = isStandardArguments(arguments) ? isStandardArguments : isLegacyArguments; + + defineProperties($Object, { + keys: function keys(object) { + var isFn = isCallable(object); + var isArgs = isArguments(object); + var isObject = object !== null && typeof object === 'object'; + var isStr = isObject && isString(object); + + if (!isObject && !isFn && !isArgs) { + throw new TypeError('Object.keys called on a non-object'); + } + + var theKeys = []; + var skipProto = hasProtoEnumBug && isFn; + if ((isStr && hasStringEnumBug) || isArgs) { + for (var i = 0; i < object.length; ++i) { + pushCall(theKeys, $String(i)); + } + } + + if (!isArgs) { + for (var name in object) { + if (!(skipProto && name === 'prototype') && owns(object, name)) { + pushCall(theKeys, $String(name)); + } + } + } + + if (hasDontEnumBug) { + var skipConstructor = equalsConstructorPrototypeIfNotBuggy(object); + for (var j = 0; j < dontEnumsLength; j++) { + var dontEnum = dontEnums[j]; + if (!(skipConstructor && dontEnum === 'constructor') && owns(object, dontEnum)) { + pushCall(theKeys, dontEnum); + } + } + } + return theKeys; + }, + }); + + var keysWorksWithArguments = + $Object.keys && + (function () { + // Safari 5.0 bug + return $Object.keys(arguments).length === 2; + })(1, 2); + var keysHasArgumentsLengthBug = + $Object.keys && + (function () { + var argKeys = $Object.keys(arguments); + return arguments.length !== 1 || argKeys.length !== 1 || argKeys[0] !== 1; + })(1); + var originalKeys = $Object.keys; + defineProperties( + $Object, + { + keys: function keys(object) { + if (isArguments(object)) { + return originalKeys(arraySlice(object)); + } else { + return originalKeys(object); + } + }, + }, + !keysWorksWithArguments || keysHasArgumentsLengthBug, + ); + + // + // Date + // ==== + // + + var hasNegativeMonthYearBug = new Date(-3509827329600292).getUTCMonth() !== 0; + var aNegativeTestDate = new Date(-1509842289600292); + var aPositiveTestDate = new Date(1449662400000); + var hasToUTCStringFormatBug = aNegativeTestDate.toUTCString() !== 'Mon, 01 Jan -45875 11:59:59 GMT'; + var hasToDateStringFormatBug; + var hasToStringFormatBug; + var timeZoneOffset = aNegativeTestDate.getTimezoneOffset(); + if (timeZoneOffset < -720) { + hasToDateStringFormatBug = aNegativeTestDate.toDateString() !== 'Tue Jan 02 -45875'; + hasToStringFormatBug = !/^Thu Dec 10 2015 \d\d:\d\d:\d\d GMT[-+]\d\d\d\d(?: |$)/.test( + String(aPositiveTestDate), + ); + } else { + hasToDateStringFormatBug = aNegativeTestDate.toDateString() !== 'Mon Jan 01 -45875'; + hasToStringFormatBug = !/^Wed Dec 09 2015 \d\d:\d\d:\d\d GMT[-+]\d\d\d\d(?: |$)/.test( + String(aPositiveTestDate), + ); + } + + var originalGetFullYear = call.bind(Date.prototype.getFullYear); + var originalGetMonth = call.bind(Date.prototype.getMonth); + var originalGetDate = call.bind(Date.prototype.getDate); + var originalGetUTCFullYear = call.bind(Date.prototype.getUTCFullYear); + var originalGetUTCMonth = call.bind(Date.prototype.getUTCMonth); + var originalGetUTCDate = call.bind(Date.prototype.getUTCDate); + var originalGetUTCDay = call.bind(Date.prototype.getUTCDay); + var originalGetUTCHours = call.bind(Date.prototype.getUTCHours); + var originalGetUTCMinutes = call.bind(Date.prototype.getUTCMinutes); + var originalGetUTCSeconds = call.bind(Date.prototype.getUTCSeconds); + var originalGetUTCMilliseconds = call.bind(Date.prototype.getUTCMilliseconds); + var dayName = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']; + var monthName = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']; + var daysInMonth = function daysInMonth(month, year) { + return originalGetDate(new Date(year, month, 0)); + }; + + defineProperties( + Date.prototype, + { + getFullYear: function getFullYear() { + if (!this || !(this instanceof Date)) { + throw new TypeError('this is not a Date object.'); + } + var year = originalGetFullYear(this); + if (year < 0 && originalGetMonth(this) > 11) { + return year + 1; + } + return year; + }, + getMonth: function getMonth() { + if (!this || !(this instanceof Date)) { + throw new TypeError('this is not a Date object.'); + } + var year = originalGetFullYear(this); + var month = originalGetMonth(this); + if (year < 0 && month > 11) { + return 0; + } + return month; + }, + getDate: function getDate() { + if (!this || !(this instanceof Date)) { + throw new TypeError('this is not a Date object.'); + } + var year = originalGetFullYear(this); + var month = originalGetMonth(this); + var date = originalGetDate(this); + if (year < 0 && month > 11) { + if (month === 12) { + return date; + } + var days = daysInMonth(0, year + 1); + return days - date + 1; + } + return date; + }, + getUTCFullYear: function getUTCFullYear() { + if (!this || !(this instanceof Date)) { + throw new TypeError('this is not a Date object.'); + } + var year = originalGetUTCFullYear(this); + if (year < 0 && originalGetUTCMonth(this) > 11) { + return year + 1; + } + return year; + }, + getUTCMonth: function getUTCMonth() { + if (!this || !(this instanceof Date)) { + throw new TypeError('this is not a Date object.'); + } + var year = originalGetUTCFullYear(this); + var month = originalGetUTCMonth(this); + if (year < 0 && month > 11) { + return 0; + } + return month; + }, + getUTCDate: function getUTCDate() { + if (!this || !(this instanceof Date)) { + throw new TypeError('this is not a Date object.'); + } + var year = originalGetUTCFullYear(this); + var month = originalGetUTCMonth(this); + var date = originalGetUTCDate(this); + if (year < 0 && month > 11) { + if (month === 12) { + return date; + } + var days = daysInMonth(0, year + 1); + return days - date + 1; + } + return date; + }, + }, + hasNegativeMonthYearBug, + ); + + defineProperties( + Date.prototype, + { + toUTCString: function toUTCString() { + if (!this || !(this instanceof Date)) { + throw new TypeError('this is not a Date object.'); + } + var day = originalGetUTCDay(this); + var date = originalGetUTCDate(this); + var month = originalGetUTCMonth(this); + var year = originalGetUTCFullYear(this); + var hour = originalGetUTCHours(this); + var minute = originalGetUTCMinutes(this); + var second = originalGetUTCSeconds(this); + return ( + dayName[day] + + ', ' + + (date < 10 ? '0' + date : date) + + ' ' + + monthName[month] + + ' ' + + year + + ' ' + + (hour < 10 ? '0' + hour : hour) + + ':' + + (minute < 10 ? '0' + minute : minute) + + ':' + + (second < 10 ? '0' + second : second) + + ' GMT' + ); + }, + }, + hasNegativeMonthYearBug || hasToUTCStringFormatBug, + ); + + // Opera 12 has `,` + defineProperties( + Date.prototype, + { + toDateString: function toDateString() { + if (!this || !(this instanceof Date)) { + throw new TypeError('this is not a Date object.'); + } + var day = this.getDay(); + var date = this.getDate(); + var month = this.getMonth(); + var year = this.getFullYear(); + return ( + dayName[day] + ' ' + monthName[month] + ' ' + (date < 10 ? '0' + date : date) + ' ' + year + ); + }, + }, + hasNegativeMonthYearBug || hasToDateStringFormatBug, + ); + + // can't use defineProperties here because of toString enumeration issue in IE <= 8 + if (hasNegativeMonthYearBug || hasToStringFormatBug) { + Date.prototype.toString = function toString() { + if (!this || !(this instanceof Date)) { + throw new TypeError('this is not a Date object.'); + } + var day = this.getDay(); + var date = this.getDate(); + var month = this.getMonth(); + var year = this.getFullYear(); + var hour = this.getHours(); + var minute = this.getMinutes(); + var second = this.getSeconds(); + var timezoneOffset = this.getTimezoneOffset(); + var hoursOffset = Math.floor(Math.abs(timezoneOffset) / 60); + var minutesOffset = Math.floor(Math.abs(timezoneOffset) % 60); + return ( + dayName[day] + + ' ' + + monthName[month] + + ' ' + + (date < 10 ? '0' + date : date) + + ' ' + + year + + ' ' + + (hour < 10 ? '0' + hour : hour) + + ':' + + (minute < 10 ? '0' + minute : minute) + + ':' + + (second < 10 ? '0' + second : second) + + ' GMT' + + (timezoneOffset > 0 ? '-' : '+') + + (hoursOffset < 10 ? '0' + hoursOffset : hoursOffset) + + (minutesOffset < 10 ? '0' + minutesOffset : minutesOffset) + ); + }; + if (supportsDescriptors) { + $Object.defineProperty(Date.prototype, 'toString', { + configurable: true, + enumerable: false, + writable: true, + }); + } + } + + // ES5 15.9.5.43 + // http://es5.github.com/#x15.9.5.43 + // This function returns a String value represent the instance in time + // represented by this Date object. The format of the String is the Date Time + // string format defined in 15.9.1.15. All fields are present in the String. + // The time zone is always UTC, denoted by the suffix Z. If the time value of + // this object is not a finite Number a RangeError exception is thrown. + var negativeDate = -62198755200000; + var negativeYearString = '-000001'; + var hasNegativeDateBug = + Date.prototype.toISOString && + new Date(negativeDate).toISOString().indexOf(negativeYearString) === -1; // eslint-disable-line max-len + var hasSafari51DateBug = + Date.prototype.toISOString && new Date(-1).toISOString() !== '1969-12-31T23:59:59.999Z'; + + var getTime = call.bind(Date.prototype.getTime); + + defineProperties( + Date.prototype, + { + toISOString: function toISOString() { + if (!isFinite(this) || !isFinite(getTime(this))) { + // Adope Photoshop requires the second check. + throw new RangeError('Date.prototype.toISOString called on non-finite value.'); + } + + var year = originalGetUTCFullYear(this); + + var month = originalGetUTCMonth(this); + // see https://github.com/es-shims/es5-shim/issues/111 + year += Math.floor(month / 12); + month = ((month % 12) + 12) % 12; + + // the date time string format is specified in 15.9.1.15. + var result = [ + month + 1, + originalGetUTCDate(this), + originalGetUTCHours(this), + originalGetUTCMinutes(this), + originalGetUTCSeconds(this), + ]; + year = + (year < 0 ? '-' : year > 9999 ? '+' : '') + + strSlice('00000' + Math.abs(year), 0 <= year && year <= 9999 ? -4 : -6); + + for (var i = 0; i < result.length; ++i) { + // pad months, days, hours, minutes, and seconds to have two digits. + result[i] = strSlice('00' + result[i], -2); + } + // pad milliseconds to have three digits. + return ( + year + + '-' + + arraySlice(result, 0, 2).join('-') + + 'T' + + arraySlice(result, 2).join(':') + + '.' + + strSlice('000' + originalGetUTCMilliseconds(this), -3) + + 'Z' + ); + }, + }, + hasNegativeDateBug || hasSafari51DateBug, + ); + + // ES5 15.9.5.44 + // http://es5.github.com/#x15.9.5.44 + // This function provides a String representation of a Date object for use by + // JSON.stringify (15.12.3). + var dateToJSONIsSupported = (function () { + try { + return ( + Date.prototype.toJSON && + new Date(NaN).toJSON() === null && + new Date(negativeDate).toJSON().indexOf(negativeYearString) !== -1 && + Date.prototype.toJSON.call({ + // generic + toISOString: function () { + return true; + }, + }) + ); + } catch (e) { + return false; + } + })(); + if (!dateToJSONIsSupported) { + Date.prototype.toJSON = function toJSON(key) { + // When the toJSON method is called with argument key, the following + // steps are taken: + + // 1. Let O be the result of calling ToObject, giving it the this + // value as its argument. + // 2. Let tv be ES.ToPrimitive(O, hint Number). + var O = $Object(this); + var tv = ES.ToPrimitive(O); + // 3. If tv is a Number and is not finite, return null. + if (typeof tv === 'number' && !isFinite(tv)) { + return null; + } + // 4. Let toISO be the result of calling the [[Get]] internal method of + // O with argument "toISOString". + var toISO = O.toISOString; + // 5. If IsCallable(toISO) is false, throw a TypeError exception. + if (!isCallable(toISO)) { + throw new TypeError('toISOString property is not callable'); + } + // 6. Return the result of calling the [[Call]] internal method of + // toISO with O as the this value and an empty argument list. + return toISO.call(O); + + // NOTE 1 The argument is ignored. + + // NOTE 2 The toJSON function is intentionally generic; it does not + // require that its this value be a Date object. Therefore, it can be + // transferred to other kinds of objects for use as a method. However, + // it does require that any such object have a toISOString method. An + // object is free to use the argument key to filter its + // stringification. + }; + } + + // ES5 15.9.4.2 + // http://es5.github.com/#x15.9.4.2 + // based on work shared by Daniel Friesen (dantman) + // http://gist.github.com/303249 + var supportsExtendedYears = Date.parse('+033658-09-27T01:46:40.000Z') === 1e15; + var acceptsInvalidDates = + !isNaN(Date.parse('2012-04-04T24:00:00.500Z')) || + !isNaN(Date.parse('2012-11-31T23:59:59.000Z')) || + !isNaN(Date.parse('2012-12-31T23:59:60.000Z')); + var doesNotParseY2KNewYear = isNaN(Date.parse('2000-01-01T00:00:00.000Z')); + if (doesNotParseY2KNewYear || acceptsInvalidDates || !supportsExtendedYears) { + // XXX global assignment won't work in embeddings that use + // an alternate object for the context. + /* global Date: true */ + var maxSafeUnsigned32Bit = Math.pow(2, 31) - 1; + var hasSafariSignedIntBug = isActualNaN( + new Date(1970, 0, 1, 0, 0, 0, maxSafeUnsigned32Bit + 1).getTime(), + ); + // eslint-disable-next-line no-implicit-globals, no-global-assign + Date = (function (NativeDate) { + // Date.length === 7 + var DateShim = function Date(Y, M, D, h, m, s, ms) { + var length = arguments.length; + var date; + if (this instanceof NativeDate) { + var seconds = s; + var millis = ms; + if (hasSafariSignedIntBug && length >= 7 && ms > maxSafeUnsigned32Bit) { + // work around a Safari 8/9 bug where it treats the seconds as signed + var msToShift = Math.floor(ms / maxSafeUnsigned32Bit) * maxSafeUnsigned32Bit; + var sToShift = Math.floor(msToShift / 1e3); + seconds += sToShift; + millis -= sToShift * 1e3; + } + date = + length === 1 && $String(Y) === Y // isString(Y) + ? // We explicitly pass it through parse: + new NativeDate(DateShim.parse(Y)) + : // We have to manually make calls depending on argument + // length here + length >= 7 + ? new NativeDate(Y, M, D, h, m, seconds, millis) + : length >= 6 + ? new NativeDate(Y, M, D, h, m, seconds) + : length >= 5 + ? new NativeDate(Y, M, D, h, m) + : length >= 4 + ? new NativeDate(Y, M, D, h) + : length >= 3 + ? new NativeDate(Y, M, D) + : length >= 2 + ? new NativeDate(Y, M) + : length >= 1 + ? new NativeDate(Y instanceof NativeDate ? +Y : Y) + : new NativeDate(); + } else { + date = NativeDate.apply(this, arguments); + } + if (!isPrimitive(date)) { + // Prevent mixups with unfixed Date object + defineProperties(date, { constructor: DateShim }, true); + } + return date; + }; + + // 15.9.1.15 Date Time String Format. + var isoDateExpression = new RegExp( + '^' + + '(\\d{4}|[+-]\\d{6})' + // four-digit year capture or sign + 6-digit extended year + '(?:-(\\d{2})' + // optional month capture + '(?:-(\\d{2})' + // optional day capture + '(?:' + // capture hours:minutes:seconds.milliseconds + 'T(\\d{2})' + // hours capture + ':(\\d{2})' + // minutes capture + '(?:' + // optional :seconds.milliseconds + ':(\\d{2})' + // seconds capture + '(?:(\\.\\d{1,}))?' + // milliseconds capture + ')?' + + '(' + // capture UTC offset component + 'Z|' + // UTC capture + '(?:' + // offset specifier +/-hours:minutes + '([-+])' + // sign capture + '(\\d{2})' + // hours offset capture + ':(\\d{2})' + // minutes offset capture + ')' + + ')?)?)?)?' + + '$', + ); + + var months = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365]; + + var dayFromMonth = function dayFromMonth(year, month) { + var t = month > 1 ? 1 : 0; + return ( + months[month] + + Math.floor((year - 1969 + t) / 4) - + Math.floor((year - 1901 + t) / 100) + + Math.floor((year - 1601 + t) / 400) + + 365 * (year - 1970) + ); + }; + + var toUTC = function toUTC(t) { + var s = 0; + var ms = t; + if (hasSafariSignedIntBug && ms > maxSafeUnsigned32Bit) { + // work around a Safari 8/9 bug where it treats the seconds as signed + var msToShift = Math.floor(ms / maxSafeUnsigned32Bit) * maxSafeUnsigned32Bit; + var sToShift = Math.floor(msToShift / 1e3); + s += sToShift; + ms -= sToShift * 1e3; + } + return $Number(new NativeDate(1970, 0, 1, 0, 0, s, ms)); + }; + + // Copy any custom methods a 3rd party library may have added + for (var key in NativeDate) { + if (owns(NativeDate, key)) { + DateShim[key] = NativeDate[key]; + } + } + + // Copy "native" methods explicitly; they may be non-enumerable + defineProperties( + DateShim, + { + now: NativeDate.now, + UTC: NativeDate.UTC, + }, + true, + ); + DateShim.prototype = NativeDate.prototype; + defineProperties(DateShim.prototype, { constructor: DateShim }, true); + + // Upgrade Date.parse to handle simplified ISO 8601 strings + var parseShim = function parse(string) { + var match = isoDateExpression.exec(string); + if (match) { + // parse months, days, hours, minutes, seconds, and milliseconds + // provide default values if necessary + // parse the UTC offset component + var year = $Number(match[1]), + month = $Number(match[2] || 1) - 1, + day = $Number(match[3] || 1) - 1, + hour = $Number(match[4] || 0), + minute = $Number(match[5] || 0), + second = $Number(match[6] || 0), + millisecond = Math.floor($Number(match[7] || 0) * 1000), + // When time zone is missed, local offset should be used + // (ES 5.1 bug) + // see https://bugs.ecmascript.org/show_bug.cgi?id=112 + isLocalTime = Boolean(match[4] && !match[8]), + signOffset = match[9] === '-' ? 1 : -1, + hourOffset = $Number(match[10] || 0), + minuteOffset = $Number(match[11] || 0), + result; + var hasMinutesOrSecondsOrMilliseconds = minute > 0 || second > 0 || millisecond > 0; + if ( + hour < (hasMinutesOrSecondsOrMilliseconds ? 24 : 25) && + minute < 60 && + second < 60 && + millisecond < 1000 && + month > -1 && + month < 12 && + hourOffset < 24 && + minuteOffset < 60 && // detect invalid offsets + day > -1 && + day < dayFromMonth(year, month + 1) - dayFromMonth(year, month) + ) { + result = ((dayFromMonth(year, month) + day) * 24 + hour + hourOffset * signOffset) * 60; + result = ((result + minute + minuteOffset * signOffset) * 60 + second) * 1000 + millisecond; + if (isLocalTime) { + result = toUTC(result); + } + if (-8.64e15 <= result && result <= 8.64e15) { + return result; + } + } + return NaN; + } + return NativeDate.parse.apply(this, arguments); + }; + defineProperties(DateShim, { parse: parseShim }); + + return DateShim; + })(Date); + /* global Date: false */ + } + + // ES5 15.9.4.4 + // http://es5.github.com/#x15.9.4.4 + if (!Date.now) { + Date.now = function now() { + return new Date().getTime(); + }; + } + + // + // Number + // ====== + // + + // ES5.1 15.7.4.5 + // http://es5.github.com/#x15.7.4.5 + var hasToFixedBugs = + NumberPrototype.toFixed && + ((0.00008).toFixed(3) !== '0.000' || + (0.9).toFixed(0) !== '1' || + (1.255).toFixed(2) !== '1.25' || + (1000000000000000128).toFixed(0) !== '1000000000000000128'); + + var toFixedHelpers = { + base: 1e7, + size: 6, + data: [0, 0, 0, 0, 0, 0], + multiply: function multiply(n, c) { + var i = -1; + var c2 = c; + while (++i < toFixedHelpers.size) { + c2 += n * toFixedHelpers.data[i]; + toFixedHelpers.data[i] = c2 % toFixedHelpers.base; + c2 = Math.floor(c2 / toFixedHelpers.base); + } + }, + divide: function divide(n) { + var i = toFixedHelpers.size; + var c = 0; + while (--i >= 0) { + c += toFixedHelpers.data[i]; + toFixedHelpers.data[i] = Math.floor(c / n); + c = (c % n) * toFixedHelpers.base; + } + }, + numToString: function numToString() { + var i = toFixedHelpers.size; + var s = ''; + while (--i >= 0) { + if (s !== '' || i === 0 || toFixedHelpers.data[i] !== 0) { + var t = $String(toFixedHelpers.data[i]); + if (s === '') { + s = t; + } else { + s += strSlice('0000000', 0, 7 - t.length) + t; + } + } + } + return s; + }, + pow: function pow(x, n, acc) { + return n === 0 ? acc : n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc); + }, + log: function log(x) { + var n = 0; + var x2 = x; + while (x2 >= 4096) { + n += 12; + x2 /= 4096; + } + while (x2 >= 2) { + n += 1; + x2 /= 2; + } + return n; + }, + }; + + var toFixedShim = function toFixed(fractionDigits) { + var f, x, s, m, e, z, j, k; + + // Test for NaN and round fractionDigits down + f = $Number(fractionDigits); + f = isActualNaN(f) ? 0 : Math.floor(f); + + if (f < 0 || f > 20) { + throw new RangeError('Number.toFixed called with invalid number of decimals'); + } + + x = $Number(this); + + if (isActualNaN(x)) { + return 'NaN'; + } + + // If it is too big or small, return the string value of the number + if (x <= -1e21 || x >= 1e21) { + return $String(x); + } + + s = ''; + + if (x < 0) { + s = '-'; + x = -x; + } + + m = '0'; + + if (x > 1e-21) { + // 1e-21 < x < 1e21 + // -70 < log2(x) < 70 + e = toFixedHelpers.log(x * toFixedHelpers.pow(2, 69, 1)) - 69; + z = e < 0 ? x * toFixedHelpers.pow(2, -e, 1) : x / toFixedHelpers.pow(2, e, 1); + z *= 0x10000000000000; // Math.pow(2, 52); + e = 52 - e; + + // -18 < e < 122 + // x = z / 2 ^ e + if (e > 0) { + toFixedHelpers.multiply(0, z); + j = f; + + while (j >= 7) { + toFixedHelpers.multiply(1e7, 0); + j -= 7; + } + + toFixedHelpers.multiply(toFixedHelpers.pow(10, j, 1), 0); + j = e - 1; + + while (j >= 23) { + toFixedHelpers.divide(1 << 23); + j -= 23; + } + + toFixedHelpers.divide(1 << j); + toFixedHelpers.multiply(1, 1); + toFixedHelpers.divide(2); + m = toFixedHelpers.numToString(); + } else { + toFixedHelpers.multiply(0, z); + toFixedHelpers.multiply(1 << -e, 0); + m = toFixedHelpers.numToString() + strSlice('0.00000000000000000000', 2, 2 + f); + } + } + + if (f > 0) { + k = m.length; + + if (k <= f) { + m = s + strSlice('0.0000000000000000000', 0, f - k + 2) + m; + } else { + m = s + strSlice(m, 0, k - f) + '.' + strSlice(m, k - f); + } + } else { + m = s + m; + } + + return m; + }; + defineProperties(NumberPrototype, { toFixed: toFixedShim }, hasToFixedBugs); + + var hasToPrecisionUndefinedBug = (function () { + try { + return (1.0).toPrecision(undefined) === '1'; + } catch (e) { + return true; + } + })(); + var originalToPrecision = NumberPrototype.toPrecision; + defineProperties( + NumberPrototype, + { + toPrecision: function toPrecision(precision) { + return typeof precision === 'undefined' + ? originalToPrecision.call(this) + : originalToPrecision.call(this, precision); + }, + }, + hasToPrecisionUndefinedBug, + ); + + // + // String + // ====== + // + + // ES5 15.5.4.14 + // http://es5.github.com/#x15.5.4.14 + + // [bugfix, IE lt 9, firefox 4, Konqueror, Opera, obscure browsers] + // Many browsers do not split properly with regular expressions or they + // do not perform the split correctly under obscure conditions. + // See http://blog.stevenlevithan.com/archives/cross-browser-split + // I've tested in many browsers and this seems to cover the deviant ones: + // 'ab'.split(/(?:ab)*/) should be ["", ""], not [""] + // '.'.split(/(.?)(.?)/) should be ["", ".", "", ""], not ["", ""] + // 'tesst'.split(/(s)*/) should be ["t", undefined, "e", "s", "t"], not + // [undefined, "t", undefined, "e", ...] + // ''.split(/.?/) should be [], not [""] + // '.'.split(/()()/) should be ["."], not ["", "", "."] + + if ( + 'ab'.split(/(?:ab)*/).length !== 2 || + '.'.split(/(.?)(.?)/).length !== 4 || + 'tesst'.split(/(s)*/)[1] === 't' || + 'test'.split(/(?:)/, -1).length !== 4 || + ''.split(/.?/).length || + '.'.split(/()()/).length > 1 + ) { + (function () { + var compliantExecNpcg = typeof /()??/.exec('')[1] === 'undefined'; // NPCG: nonparticipating capturing group + var maxSafe32BitInt = Math.pow(2, 32) - 1; + + StringPrototype.split = function (separator, limit) { + var string = String(this); + if (typeof separator === 'undefined' && limit === 0) { + return []; + } + + // If `separator` is not a regex, use native split + if (!isRegex(separator)) { + return strSplit(this, separator, limit); + } + + var output = []; + var flags = + (separator.ignoreCase ? 'i' : '') + + (separator.multiline ? 'm' : '') + + (separator.unicode ? 'u' : '') + // in ES6 + (separator.sticky ? 'y' : ''), // Firefox 3+ and ES6 + lastLastIndex = 0, + // Make `global` and avoid `lastIndex` issues by working with a copy + separator2, + match, + lastIndex, + lastLength; + var separatorCopy = new RegExp(separator.source, flags + 'g'); + if (!compliantExecNpcg) { + // Doesn't need flags gy, but they don't hurt + separator2 = new RegExp('^' + separatorCopy.source + '$(?!\\s)', flags); + } + /* Values for `limit`, per the spec: + * If undefined: 4294967295 // maxSafe32BitInt + * If 0, Infinity, or NaN: 0 + * If positive number: limit = Math.floor(limit); if (limit > 4294967295) limit -= 4294967296; + * If negative number: 4294967296 - Math.floor(Math.abs(limit)) + * If other: Type-convert, then use the above rules + */ + var splitLimit = typeof limit === 'undefined' ? maxSafe32BitInt : ES.ToUint32(limit); + match = separatorCopy.exec(string); + while (match) { + // `separatorCopy.lastIndex` is not reliable cross-browser + lastIndex = match.index + match[0].length; + if (lastIndex > lastLastIndex) { + pushCall(output, strSlice(string, lastLastIndex, match.index)); + // Fix browsers whose `exec` methods don't consistently return `undefined` for + // nonparticipating capturing groups + if (!compliantExecNpcg && match.length > 1) { + /* eslint-disable no-loop-func */ + match[0].replace(separator2, function () { + for (var i = 1; i < arguments.length - 2; i++) { + if (typeof arguments[i] === 'undefined') { + match[i] = void 0; + } + } + }); + /* eslint-enable no-loop-func */ + } + if (match.length > 1 && match.index < string.length) { + array_push.apply(output, arraySlice(match, 1)); + } + lastLength = match[0].length; + lastLastIndex = lastIndex; + if (output.length >= splitLimit) { + break; + } + } + if (separatorCopy.lastIndex === match.index) { + separatorCopy.lastIndex++; // Avoid an infinite loop + } + match = separatorCopy.exec(string); + } + if (lastLastIndex === string.length) { + if (lastLength || !separatorCopy.test('')) { + pushCall(output, ''); + } + } else { + pushCall(output, strSlice(string, lastLastIndex)); + } + return output.length > splitLimit ? arraySlice(output, 0, splitLimit) : output; + }; + })(); + + // [bugfix, chrome] + // If separator is undefined, then the result array contains just one String, + // which is the this value (converted to a String). If limit is not undefined, + // then the output array is truncated so that it contains no more than limit + // elements. + // "0".split(undefined, 0) -> [] + } else if ('0'.split(void 0, 0).length) { + StringPrototype.split = function split(separator, limit) { + if (typeof separator === 'undefined' && limit === 0) { + return []; + } + return strSplit(this, separator, limit); + }; + } + + var str_replace = StringPrototype.replace; + var replaceReportsGroupsCorrectly = (function () { + var groups = []; + 'x'.replace(/x(.)?/g, function (match, group) { + pushCall(groups, group); + }); + return groups.length === 1 && typeof groups[0] === 'undefined'; + })(); + + if (!replaceReportsGroupsCorrectly) { + StringPrototype.replace = function replace(searchValue, replaceValue) { + var isFn = isCallable(replaceValue); + var hasCapturingGroups = isRegex(searchValue) && /\)[*?]/.test(searchValue.source); + if (!isFn || !hasCapturingGroups) { + return str_replace.call(this, searchValue, replaceValue); + } else { + var wrappedReplaceValue = function (match) { + var length = arguments.length; + var originalLastIndex = searchValue.lastIndex; + searchValue.lastIndex = 0; + var args = searchValue.exec(match) || []; + searchValue.lastIndex = originalLastIndex; + pushCall(args, arguments[length - 2], arguments[length - 1]); + return replaceValue.apply(this, args); + }; + return str_replace.call(this, searchValue, wrappedReplaceValue); + } + }; + } + + // ECMA-262, 3rd B.2.3 + // Not an ECMAScript standard, although ECMAScript 3rd Edition has a + // non-normative section suggesting uniform semantics and it should be + // normalized across all browsers + // [bugfix, IE lt 9] IE < 9 substr() with negative value not working in IE + var string_substr = StringPrototype.substr; + var hasNegativeSubstrBug = ''.substr && '0b'.substr(-1) !== 'b'; + defineProperties( + StringPrototype, + { + substr: function substr(start, length) { + var normalizedStart = start; + if (start < 0) { + normalizedStart = max(this.length + start, 0); + } + return string_substr.call(this, normalizedStart, length); + }, + }, + hasNegativeSubstrBug, + ); + + // ES5 15.5.4.20 + // whitespace from: http://es5.github.io/#x15.5.4.20 + var ws = + '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' + + '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028' + + '\u2029\uFEFF'; + var zeroWidth = '\u200b'; + var wsRegexChars = '[' + ws + ']'; + var trimBeginRegexp = new RegExp('^' + wsRegexChars + wsRegexChars + '*'); + var trimEndRegexp = new RegExp(wsRegexChars + wsRegexChars + '*$'); + var hasTrimWhitespaceBug = StringPrototype.trim && (ws.trim() || !zeroWidth.trim()); + defineProperties( + StringPrototype, + { + // http://blog.stevenlevithan.com/archives/faster-trim-javascript + // http://perfectionkills.com/whitespace-deviations/ + trim: function trim() { + if (typeof this === 'undefined' || this === null) { + throw new TypeError("can't convert " + this + ' to object'); + } + return $String(this).replace(trimBeginRegexp, '').replace(trimEndRegexp, ''); + }, + }, + hasTrimWhitespaceBug, + ); + var trim = call.bind(String.prototype.trim); + + var hasLastIndexBug = StringPrototype.lastIndexOf && 'abcあい'.lastIndexOf('あい', 2) !== -1; + defineProperties( + StringPrototype, + { + lastIndexOf: function lastIndexOf(searchString) { + if (typeof this === 'undefined' || this === null) { + throw new TypeError("can't convert " + this + ' to object'); + } + var S = $String(this); + var searchStr = $String(searchString); + var numPos = arguments.length > 1 ? $Number(arguments[1]) : NaN; + var pos = isActualNaN(numPos) ? Infinity : ES.ToInteger(numPos); + var start = min(max(pos, 0), S.length); + var searchLen = searchStr.length; + var k = start + searchLen; + while (k > 0) { + k = max(0, k - searchLen); + var index = strIndexOf(strSlice(S, k, start + searchLen), searchStr); + if (index !== -1) { + return k + index; + } + } + return -1; + }, + }, + hasLastIndexBug, + ); + + var originalLastIndexOf = StringPrototype.lastIndexOf; + defineProperties( + StringPrototype, + { + lastIndexOf: function lastIndexOf(searchString) { + return originalLastIndexOf.apply(this, arguments); + }, + }, + StringPrototype.lastIndexOf.length !== 1, + ); + + // ES-5 15.1.2.2 + // eslint-disable-next-line radix + if (parseInt(ws + '08') !== 8 || parseInt(ws + '0x16') !== 22) { + /* global parseInt: true */ + parseInt = (function (origParseInt) { + var hexRegex = /^[-+]?0[xX]/; + return function parseInt(str, radix) { + if (typeof str === 'symbol') { + // handle Symbols in node 8.3/8.4 + // eslint-disable-next-line no-implicit-coercion, no-unused-expressions + '' + str; // jscs:ignore disallowImplicitTypeConversion + } + + var string = trim(String(str)); + var defaultedRadix = $Number(radix) || (hexRegex.test(string) ? 16 : 10); + return origParseInt(string, defaultedRadix); + }; + })(parseInt); + } + + // https://es5.github.io/#x15.1.2.3 + if (1 / parseFloat('-0') !== -Infinity) { + /* global parseFloat: true */ + parseFloat = (function (origParseFloat) { + return function parseFloat(string) { + var inputString = trim(String(string)); + var result = origParseFloat(inputString); + return result === 0 && strSlice(inputString, 0, 1) === '-' ? -0 : result; + }; + })(parseFloat); + } + + if (String(new RangeError('test')) !== 'RangeError: test') { + var errorToStringShim = function toString() { + if (typeof this === 'undefined' || this === null) { + throw new TypeError("can't convert " + this + ' to object'); + } + var name = this.name; + if (typeof name === 'undefined') { + name = 'Error'; + } else if (typeof name !== 'string') { + name = $String(name); + } + var msg = this.message; + if (typeof msg === 'undefined') { + msg = ''; + } else if (typeof msg !== 'string') { + msg = $String(msg); + } + if (!name) { + return msg; + } + if (!msg) { + return name; + } + return name + ': ' + msg; + }; + // can't use defineProperties here because of toString enumeration issue in IE <= 8 + Error.prototype.toString = errorToStringShim; + } + + if (supportsDescriptors) { + var ensureNonEnumerable = function (obj, prop) { + if (isEnum(obj, prop)) { + var desc = Object.getOwnPropertyDescriptor(obj, prop); + if (desc.configurable) { + desc.enumerable = false; + Object.defineProperty(obj, prop, desc); + } + } + }; + ensureNonEnumerable(Error.prototype, 'message'); + if (Error.prototype.message !== '') { + Error.prototype.message = ''; + } + ensureNonEnumerable(Error.prototype, 'name'); + } + + if (String(/a/gim) !== '/a/gim') { + var regexToString = function toString() { + var str = '/' + this.source + '/'; + if (this.global) { + str += 'g'; + } + if (this.ignoreCase) { + str += 'i'; + } + if (this.multiline) { + str += 'm'; + } + return str; + }; + // can't use defineProperties here because of toString enumeration issue in IE <= 8 + RegExp.prototype.toString = regexToString; + } + }); + + /***/ + }, + /* 471 */ + /***/ function (module, exports, __webpack_require__) { + var _Object$getOwnPropertyDescriptor = __webpack_require__(472); + + var _Object$defineProperty = __webpack_require__(475); + + var _typeof = __webpack_require__(478); + + var _WeakMap = __webpack_require__(497); + + function _getRequireWildcardCache() { + if (typeof _WeakMap !== 'function') return null; + var cache = new _WeakMap(); + + _getRequireWildcardCache = function _getRequireWildcardCache() { + return cache; + }; + + return cache; + } + + function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } + + if (obj === null || (_typeof(obj) !== 'object' && typeof obj !== 'function')) { + return { + default: obj, + }; + } + + var cache = _getRequireWildcardCache(); + + if (cache && cache.has(obj)) { + return cache.get(obj); + } + + var newObj = {}; + var hasPropertyDescriptor = _Object$defineProperty && _Object$getOwnPropertyDescriptor; + + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + var desc = hasPropertyDescriptor ? _Object$getOwnPropertyDescriptor(obj, key) : null; + + if (desc && (desc.get || desc.set)) { + _Object$defineProperty(newObj, key, desc); + } else { + newObj[key] = obj[key]; + } + } + } + + newObj['default'] = obj; + + if (cache) { + cache.set(obj, newObj); + } + + return newObj; + } + + module.exports = _interopRequireWildcard; + + /***/ + }, + /* 472 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = __webpack_require__(473); + + /***/ + }, + /* 473 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(474); + var $Object = __webpack_require__(13).Object; + module.exports = function getOwnPropertyDescriptor(it, key) { + return $Object.getOwnPropertyDescriptor(it, key); + }; + + /***/ + }, + /* 474 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) + var toIObject = __webpack_require__(60); + var $getOwnPropertyDescriptor = __webpack_require__(211).f; + + __webpack_require__(214)('getOwnPropertyDescriptor', function () { + return function getOwnPropertyDescriptor(it, key) { + return $getOwnPropertyDescriptor(toIObject(it), key); + }; + }); + + /***/ + }, + /* 475 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = __webpack_require__(476); + + /***/ + }, + /* 476 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(477); + var $Object = __webpack_require__(13).Object; + module.exports = function defineProperty(it, key, desc) { + return $Object.defineProperty(it, key, desc); + }; + + /***/ + }, + /* 477 */ + /***/ function (module, exports, __webpack_require__) { + var $export = __webpack_require__(36); + // 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes) + $export($export.S + $export.F * !__webpack_require__(28), 'Object', { + defineProperty: __webpack_require__(30).f, + }); + + /***/ + }, + /* 478 */ + /***/ function (module, exports, __webpack_require__) { + var _Symbol$iterator = __webpack_require__(479); + + var _Symbol = __webpack_require__(490); + + function _typeof(obj) { + '@babel/helpers - typeof'; + + if (typeof _Symbol === 'function' && typeof _Symbol$iterator === 'symbol') { + module.exports = _typeof = function _typeof(obj) { + return typeof obj; + }; + } else { + module.exports = _typeof = function _typeof(obj) { + return obj && + typeof _Symbol === 'function' && + obj.constructor === _Symbol && + obj !== _Symbol.prototype + ? 'symbol' + : typeof obj; + }; + } + + return _typeof(obj); + } + + module.exports = _typeof; + + /***/ + }, + /* 479 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = __webpack_require__(480); + + /***/ + }, + /* 480 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(143); + __webpack_require__(151); + module.exports = __webpack_require__(152).f('iterator'); + + /***/ + }, + /* 481 */ + /***/ function (module, exports, __webpack_require__) { + var toInteger = __webpack_require__(144); + var defined = __webpack_require__(141); + // true -> String#at + // false -> String#codePointAt + module.exports = function (TO_STRING) { + return function (that, pos) { + var s = String(defined(that)); + var i = toInteger(pos); + var l = s.length; + var a, b; + if (i < 0 || i >= l) return TO_STRING ? '' : undefined; + a = s.charCodeAt(i); + return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff + ? TO_STRING + ? s.charAt(i) + : a + : TO_STRING + ? s.slice(i, i + 2) + : ((a - 0xd800) << 10) + (b - 0xdc00) + 0x10000; + }; + }; + + /***/ + }, + /* 482 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var create = __webpack_require__(147); + var descriptor = __webpack_require__(78); + var setToStringTag = __webpack_require__(104); + var IteratorPrototype = {}; + + // 25.1.2.1.1 %IteratorPrototype%[@@iterator]() + __webpack_require__(45)(IteratorPrototype, __webpack_require__(22)('iterator'), function () { + return this; + }); + + module.exports = function (Constructor, NAME, next) { + Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) }); + setToStringTag(Constructor, NAME + ' Iterator'); + }; + + /***/ + }, + /* 483 */ + /***/ function (module, exports, __webpack_require__) { + var dP = __webpack_require__(30); + var anObject = __webpack_require__(62); + var getKeys = __webpack_require__(80); + + module.exports = __webpack_require__(28) + ? Object.defineProperties + : function defineProperties(O, Properties) { + anObject(O); + var keys = getKeys(Properties); + var length = keys.length; + var i = 0; + var P; + while (length > i) dP.f(O, (P = keys[i++]), Properties[P]); + return O; + }; + + /***/ + }, + /* 484 */ + /***/ function (module, exports, __webpack_require__) { + // false -> Array#indexOf + // true -> Array#includes + var toIObject = __webpack_require__(60); + var toLength = __webpack_require__(102); + var toAbsoluteIndex = __webpack_require__(485); + module.exports = function (IS_INCLUDES) { + return function ($this, el, fromIndex) { + var O = toIObject($this); + var length = toLength(O.length); + var index = toAbsoluteIndex(fromIndex, length); + var value; + // Array#includes uses SameValueZero equality algorithm + // eslint-disable-next-line no-self-compare + if (IS_INCLUDES && el != el) + while (length > index) { + value = O[index++]; + // eslint-disable-next-line no-self-compare + if (value != value) return true; + // Array#indexOf ignores holes, Array#includes - not + } + else + for (; length > index; index++) + if (IS_INCLUDES || index in O) { + if (O[index] === el) return IS_INCLUDES || index || 0; + } + return !IS_INCLUDES && -1; + }; + }; + + /***/ + }, + /* 485 */ + /***/ function (module, exports, __webpack_require__) { + var toInteger = __webpack_require__(144); + var max = Math.max; + var min = Math.min; + module.exports = function (index, length) { + index = toInteger(index); + return index < 0 ? max(index + length, 0) : min(index, length); + }; + + /***/ + }, + /* 486 */ + /***/ function (module, exports, __webpack_require__) { + var document = __webpack_require__(29).document; + module.exports = document && document.documentElement; + + /***/ + }, + /* 487 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) + var has = __webpack_require__(44); + var toObject = __webpack_require__(69); + var IE_PROTO = __webpack_require__(148)('IE_PROTO'); + var ObjectProto = Object.prototype; + + module.exports = + Object.getPrototypeOf || + function (O) { + O = toObject(O); + if (has(O, IE_PROTO)) return O[IE_PROTO]; + if (typeof O.constructor == 'function' && O instanceof O.constructor) { + return O.constructor.prototype; + } + return O instanceof Object ? ObjectProto : null; + }; + + /***/ + }, + /* 488 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var addToUnscopables = __webpack_require__(489); + var step = __webpack_require__(217); + var Iterators = __webpack_require__(79); + var toIObject = __webpack_require__(60); + + // 22.1.3.4 Array.prototype.entries() + // 22.1.3.13 Array.prototype.keys() + // 22.1.3.29 Array.prototype.values() + // 22.1.3.30 Array.prototype[@@iterator]() + module.exports = __webpack_require__(145)( + Array, + 'Array', + function (iterated, kind) { + this._t = toIObject(iterated); // target + this._i = 0; // next index + this._k = kind; // kind + // 22.1.5.2.1 %ArrayIteratorPrototype%.next() + }, + function () { + var O = this._t; + var kind = this._k; + var index = this._i++; + if (!O || index >= O.length) { + this._t = undefined; + return step(1); + } + if (kind == 'keys') return step(0, index); + if (kind == 'values') return step(0, O[index]); + return step(0, [index, O[index]]); + }, + 'values', + ); + + // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) + Iterators.Arguments = Iterators.Array; + + addToUnscopables('keys'); + addToUnscopables('values'); + addToUnscopables('entries'); + + /***/ + }, + /* 489 */ + /***/ function (module, exports) { + module.exports = function () { + /* empty */ + }; + + /***/ + }, + /* 490 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = __webpack_require__(491); + + /***/ + }, + /* 491 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(492); + __webpack_require__(155); + __webpack_require__(495); + __webpack_require__(496); + module.exports = __webpack_require__(13).Symbol; + + /***/ + }, + /* 492 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // ECMAScript 6 symbols shim + var global = __webpack_require__(29); + var has = __webpack_require__(44); + var DESCRIPTORS = __webpack_require__(28); + var $export = __webpack_require__(36); + var redefine = __webpack_require__(146); + var META = __webpack_require__(81).KEY; + var $fails = __webpack_require__(61); + var shared = __webpack_require__(149); + var setToStringTag = __webpack_require__(104); + var uid = __webpack_require__(103); + var wks = __webpack_require__(22); + var wksExt = __webpack_require__(152); + var wksDefine = __webpack_require__(153); + var enumKeys = __webpack_require__(493); + var isArray = __webpack_require__(218); + var anObject = __webpack_require__(62); + var isObject = __webpack_require__(35); + var toObject = __webpack_require__(69); + var toIObject = __webpack_require__(60); + var toPrimitive = __webpack_require__(142); + var createDesc = __webpack_require__(78); + var _create = __webpack_require__(147); + var gOPNExt = __webpack_require__(494); + var $GOPD = __webpack_require__(211); + var $GOPS = __webpack_require__(154); + var $DP = __webpack_require__(30); + var $keys = __webpack_require__(80); + var gOPD = $GOPD.f; + var dP = $DP.f; + var gOPN = gOPNExt.f; + var $Symbol = global.Symbol; + var $JSON = global.JSON; + var _stringify = $JSON && $JSON.stringify; + var PROTOTYPE = 'prototype'; + var HIDDEN = wks('_hidden'); + var TO_PRIMITIVE = wks('toPrimitive'); + var isEnum = {}.propertyIsEnumerable; + var SymbolRegistry = shared('symbol-registry'); + var AllSymbols = shared('symbols'); + var OPSymbols = shared('op-symbols'); + var ObjectProto = Object[PROTOTYPE]; + var USE_NATIVE = typeof $Symbol == 'function' && !!$GOPS.f; + var QObject = global.QObject; + // Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173 + var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild; + + // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687 + var setSymbolDesc = + DESCRIPTORS && + $fails(function () { + return ( + _create( + dP({}, 'a', { + get: function () { + return dP(this, 'a', { value: 7 }).a; + }, + }), + ).a != 7 + ); + }) + ? function (it, key, D) { + var protoDesc = gOPD(ObjectProto, key); + if (protoDesc) delete ObjectProto[key]; + dP(it, key, D); + if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc); + } + : dP; + + var wrap = function (tag) { + var sym = (AllSymbols[tag] = _create($Symbol[PROTOTYPE])); + sym._k = tag; + return sym; + }; + + var isSymbol = + USE_NATIVE && typeof $Symbol.iterator == 'symbol' + ? function (it) { + return typeof it == 'symbol'; + } + : function (it) { + return it instanceof $Symbol; + }; + + var $defineProperty = function defineProperty(it, key, D) { + if (it === ObjectProto) $defineProperty(OPSymbols, key, D); + anObject(it); + key = toPrimitive(key, true); + anObject(D); + if (has(AllSymbols, key)) { + if (!D.enumerable) { + if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {})); + it[HIDDEN][key] = true; + } else { + if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false; + D = _create(D, { enumerable: createDesc(0, false) }); + } + return setSymbolDesc(it, key, D); + } + return dP(it, key, D); + }; + var $defineProperties = function defineProperties(it, P) { + anObject(it); + var keys = enumKeys((P = toIObject(P))); + var i = 0; + var l = keys.length; + var key; + while (l > i) $defineProperty(it, (key = keys[i++]), P[key]); + return it; + }; + var $create = function create(it, P) { + return P === undefined ? _create(it) : $defineProperties(_create(it), P); + }; + var $propertyIsEnumerable = function propertyIsEnumerable(key) { + var E = isEnum.call(this, (key = toPrimitive(key, true))); + if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false; + return E || !has(this, key) || !has(AllSymbols, key) || (has(this, HIDDEN) && this[HIDDEN][key]) + ? E + : true; + }; + var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) { + it = toIObject(it); + key = toPrimitive(key, true); + if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return; + var D = gOPD(it, key); + if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true; + return D; + }; + var $getOwnPropertyNames = function getOwnPropertyNames(it) { + var names = gOPN(toIObject(it)); + var result = []; + var i = 0; + var key; + while (names.length > i) { + if (!has(AllSymbols, (key = names[i++])) && key != HIDDEN && key != META) result.push(key); + } + return result; + }; + var $getOwnPropertySymbols = function getOwnPropertySymbols(it) { + var IS_OP = it === ObjectProto; + var names = gOPN(IS_OP ? OPSymbols : toIObject(it)); + var result = []; + var i = 0; + var key; + while (names.length > i) { + if (has(AllSymbols, (key = names[i++])) && (IS_OP ? has(ObjectProto, key) : true)) + result.push(AllSymbols[key]); + } + return result; + }; + + // 19.4.1.1 Symbol([description]) + if (!USE_NATIVE) { + $Symbol = function Symbol() { + if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!'); + var tag = uid(arguments.length > 0 ? arguments[0] : undefined); + var $set = function (value) { + if (this === ObjectProto) $set.call(OPSymbols, value); + if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false; + setSymbolDesc(this, tag, createDesc(1, value)); + }; + if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set }); + return wrap(tag); + }; + redefine($Symbol[PROTOTYPE], 'toString', function toString() { + return this._k; + }); + + $GOPD.f = $getOwnPropertyDescriptor; + $DP.f = $defineProperty; + __webpack_require__(219).f = gOPNExt.f = $getOwnPropertyNames; + __webpack_require__(100).f = $propertyIsEnumerable; + $GOPS.f = $getOwnPropertySymbols; + + if (DESCRIPTORS && !__webpack_require__(101)) { + redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true); + } + + wksExt.f = function (name) { + return wrap(wks(name)); + }; + } + + $export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol }); + + for ( + var es6Symbols = + // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14 + 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'.split( + ',', + ), + j = 0; + es6Symbols.length > j; + + ) + wks(es6Symbols[j++]); + + for (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k; ) + wksDefine(wellKnownSymbols[k++]); + + $export($export.S + $export.F * !USE_NATIVE, 'Symbol', { + // 19.4.2.1 Symbol.for(key) + for: function (key) { + return has(SymbolRegistry, (key += '')) + ? SymbolRegistry[key] + : (SymbolRegistry[key] = $Symbol(key)); + }, + // 19.4.2.5 Symbol.keyFor(sym) + keyFor: function keyFor(sym) { + if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!'); + for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key; + }, + useSetter: function () { + setter = true; + }, + useSimple: function () { + setter = false; + }, + }); + + $export($export.S + $export.F * !USE_NATIVE, 'Object', { + // 19.1.2.2 Object.create(O [, Properties]) + create: $create, + // 19.1.2.4 Object.defineProperty(O, P, Attributes) + defineProperty: $defineProperty, + // 19.1.2.3 Object.defineProperties(O, Properties) + defineProperties: $defineProperties, + // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) + getOwnPropertyDescriptor: $getOwnPropertyDescriptor, + // 19.1.2.7 Object.getOwnPropertyNames(O) + getOwnPropertyNames: $getOwnPropertyNames, + // 19.1.2.8 Object.getOwnPropertySymbols(O) + getOwnPropertySymbols: $getOwnPropertySymbols, + }); + + // Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives + // https://bugs.chromium.org/p/v8/issues/detail?id=3443 + var FAILS_ON_PRIMITIVES = $fails(function () { + $GOPS.f(1); + }); + + $export($export.S + $export.F * FAILS_ON_PRIMITIVES, 'Object', { + getOwnPropertySymbols: function getOwnPropertySymbols(it) { + return $GOPS.f(toObject(it)); + }, + }); + + // 24.3.2 JSON.stringify(value [, replacer [, space]]) + $JSON && + $export( + $export.S + + $export.F * + (!USE_NATIVE || + $fails(function () { + var S = $Symbol(); + // MS Edge converts symbol values to JSON as {} + // WebKit converts symbol values to JSON as null + // V8 throws on boxed symbols + return ( + _stringify([S]) != '[null]' || + _stringify({ a: S }) != '{}' || + _stringify(Object(S)) != '{}' + ); + })), + 'JSON', + { + stringify: function stringify(it) { + var args = [it]; + var i = 1; + var replacer, $replacer; + while (arguments.length > i) args.push(arguments[i++]); + $replacer = replacer = args[1]; + if ((!isObject(replacer) && it === undefined) || isSymbol(it)) return; // IE8 returns string on undefined + if (!isArray(replacer)) + replacer = function (key, value) { + if (typeof $replacer == 'function') value = $replacer.call(this, key, value); + if (!isSymbol(value)) return value; + }; + args[1] = replacer; + return _stringify.apply($JSON, args); + }, + }, + ); + + // 19.4.3.4 Symbol.prototype[@@toPrimitive](hint) + $Symbol[PROTOTYPE][TO_PRIMITIVE] || + __webpack_require__(45)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf); + // 19.4.3.5 Symbol.prototype[@@toStringTag] + setToStringTag($Symbol, 'Symbol'); + // 20.2.1.9 Math[@@toStringTag] + setToStringTag(Math, 'Math', true); + // 24.3.3 JSON[@@toStringTag] + setToStringTag(global.JSON, 'JSON', true); + + /***/ + }, + /* 493 */ + /***/ function (module, exports, __webpack_require__) { + // all enumerable object keys, includes symbols + var getKeys = __webpack_require__(80); + var gOPS = __webpack_require__(154); + var pIE = __webpack_require__(100); + module.exports = function (it) { + var result = getKeys(it); + var getSymbols = gOPS.f; + if (getSymbols) { + var symbols = getSymbols(it); + var isEnum = pIE.f; + var i = 0; + var key; + while (symbols.length > i) if (isEnum.call(it, (key = symbols[i++]))) result.push(key); + } + return result; + }; + + /***/ + }, + /* 494 */ + /***/ function (module, exports, __webpack_require__) { + // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window + var toIObject = __webpack_require__(60); + var gOPN = __webpack_require__(219).f; + var toString = {}.toString; + + var windowNames = + typeof window == 'object' && window && Object.getOwnPropertyNames + ? Object.getOwnPropertyNames(window) + : []; + + var getWindowNames = function (it) { + try { + return gOPN(it); + } catch (e) { + return windowNames.slice(); + } + }; + + module.exports.f = function getOwnPropertyNames(it) { + return windowNames && toString.call(it) == '[object Window]' + ? getWindowNames(it) + : gOPN(toIObject(it)); + }; + + /***/ + }, + /* 495 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(153)('asyncIterator'); + + /***/ + }, + /* 496 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(153)('observable'); + + /***/ + }, + /* 497 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = __webpack_require__(498); + + /***/ + }, + /* 498 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(155); + __webpack_require__(151); + __webpack_require__(499); + __webpack_require__(503); + __webpack_require__(504); + module.exports = __webpack_require__(13).WeakMap; + + /***/ + }, + /* 499 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var global = __webpack_require__(29); + var each = __webpack_require__(156)(0); + var redefine = __webpack_require__(146); + var meta = __webpack_require__(81); + var assign = __webpack_require__(220); + var weak = __webpack_require__(502); + var isObject = __webpack_require__(35); + var validate = __webpack_require__(83); + var NATIVE_WEAK_MAP = __webpack_require__(83); + var IS_IE11 = !global.ActiveXObject && 'ActiveXObject' in global; + var WEAK_MAP = 'WeakMap'; + var getWeak = meta.getWeak; + var isExtensible = Object.isExtensible; + var uncaughtFrozenStore = weak.ufstore; + var InternalMap; + + var wrapper = function (get) { + return function WeakMap() { + return get(this, arguments.length > 0 ? arguments[0] : undefined); + }; + }; + + var methods = { + // 23.3.3.3 WeakMap.prototype.get(key) + get: function get(key) { + if (isObject(key)) { + var data = getWeak(key); + if (data === true) return uncaughtFrozenStore(validate(this, WEAK_MAP)).get(key); + return data ? data[this._i] : undefined; + } + }, + // 23.3.3.5 WeakMap.prototype.set(key, value) + set: function set(key, value) { + return weak.def(validate(this, WEAK_MAP), key, value); + }, + }; + + // 23.3 WeakMap Objects + var $WeakMap = (module.exports = __webpack_require__(225)( + WEAK_MAP, + wrapper, + methods, + weak, + true, + true, + )); + + // IE11 WeakMap frozen keys fix + if (NATIVE_WEAK_MAP && IS_IE11) { + InternalMap = weak.getConstructor(wrapper, WEAK_MAP); + assign(InternalMap.prototype, methods); + meta.NEED = true; + each(['delete', 'has', 'get', 'set'], function (key) { + var proto = $WeakMap.prototype; + var method = proto[key]; + redefine(proto, key, function (a, b) { + // store frozen objects on internal weakmap shim + if (isObject(a) && !isExtensible(a)) { + if (!this._f) this._f = new InternalMap(); + var result = this._f[key](a, b); + return key == 'set' ? this : result; + // store all the rest on native weakmap + } + return method.call(this, a, b); + }); + }); + } + + /***/ + }, + /* 500 */ + /***/ function (module, exports, __webpack_require__) { + // 9.4.2.3 ArraySpeciesCreate(originalArray, length) + var speciesConstructor = __webpack_require__(501); + + module.exports = function (original, length) { + return new (speciesConstructor(original))(length); + }; + + /***/ + }, + /* 501 */ + /***/ function (module, exports, __webpack_require__) { + var isObject = __webpack_require__(35); + var isArray = __webpack_require__(218); + var SPECIES = __webpack_require__(22)('species'); + + module.exports = function (original) { + var C; + if (isArray(original)) { + C = original.constructor; + // cross-realm fallback + if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined; + if (isObject(C)) { + C = C[SPECIES]; + if (C === null) C = undefined; + } + } + return C === undefined ? Array : C; + }; + + /***/ + }, + /* 502 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var redefineAll = __webpack_require__(157); + var getWeak = __webpack_require__(81).getWeak; + var anObject = __webpack_require__(62); + var isObject = __webpack_require__(35); + var anInstance = __webpack_require__(158); + var forOf = __webpack_require__(82); + var createArrayMethod = __webpack_require__(156); + var $has = __webpack_require__(44); + var validate = __webpack_require__(83); + var arrayFind = createArrayMethod(5); + var arrayFindIndex = createArrayMethod(6); + var id = 0; + + // fallback for uncaught frozen keys + var uncaughtFrozenStore = function (that) { + return that._l || (that._l = new UncaughtFrozenStore()); + }; + var UncaughtFrozenStore = function () { + this.a = []; + }; + var findUncaughtFrozen = function (store, key) { + return arrayFind(store.a, function (it) { + return it[0] === key; + }); + }; + UncaughtFrozenStore.prototype = { + get: function (key) { + var entry = findUncaughtFrozen(this, key); + if (entry) return entry[1]; + }, + has: function (key) { + return !!findUncaughtFrozen(this, key); + }, + set: function (key, value) { + var entry = findUncaughtFrozen(this, key); + if (entry) entry[1] = value; + else this.a.push([key, value]); + }, + delete: function (key) { + var index = arrayFindIndex(this.a, function (it) { + return it[0] === key; + }); + if (~index) this.a.splice(index, 1); + return !!~index; + }, + }; + + module.exports = { + getConstructor: function (wrapper, NAME, IS_MAP, ADDER) { + var C = wrapper(function (that, iterable) { + anInstance(that, C, NAME, '_i'); + that._t = NAME; // collection type + that._i = id++; // collection id + that._l = undefined; // leak store for uncaught frozen objects + if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that); + }); + redefineAll(C.prototype, { + // 23.3.3.2 WeakMap.prototype.delete(key) + // 23.4.3.3 WeakSet.prototype.delete(value) + delete: function (key) { + if (!isObject(key)) return false; + var data = getWeak(key); + if (data === true) return uncaughtFrozenStore(validate(this, NAME))['delete'](key); + return data && $has(data, this._i) && delete data[this._i]; + }, + // 23.3.3.4 WeakMap.prototype.has(key) + // 23.4.3.4 WeakSet.prototype.has(value) + has: function has(key) { + if (!isObject(key)) return false; + var data = getWeak(key); + if (data === true) return uncaughtFrozenStore(validate(this, NAME)).has(key); + return data && $has(data, this._i); + }, + }); + return C; + }, + def: function (that, key, value) { + var data = getWeak(anObject(key), true); + if (data === true) uncaughtFrozenStore(that).set(key, value); + else data[that._i] = value; + return that; + }, + ufstore: uncaughtFrozenStore, + }; + + /***/ + }, + /* 503 */ + /***/ function (module, exports, __webpack_require__) { + // https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.of + __webpack_require__(226)('WeakMap'); + + /***/ + }, + /* 504 */ + /***/ function (module, exports, __webpack_require__) { + // https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.from + __webpack_require__(227)('WeakMap'); + + /***/ + }, + /* 505 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(506); + module.exports = __webpack_require__(13).Object.assign; + + /***/ + }, + /* 506 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.3.1 Object.assign(target, source) + var $export = __webpack_require__(36); + + $export($export.S + $export.F, 'Object', { assign: __webpack_require__(220) }); + + /***/ + }, + /* 507 */ + /***/ function (module, exports, __webpack_require__) { + var core = __webpack_require__(13); + var $JSON = core.JSON || (core.JSON = { stringify: JSON.stringify }); + module.exports = function stringify(it) { + // eslint-disable-line no-unused-vars + return $JSON.stringify.apply($JSON, arguments); + }; + + /***/ + }, + /* 508 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(509); + module.exports = __webpack_require__(13).Object.keys; + + /***/ + }, + /* 509 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.14 Object.keys(O) + var toObject = __webpack_require__(69); + var $keys = __webpack_require__(80); + + __webpack_require__(214)('keys', function () { + return function keys(it) { + return $keys(toObject(it)); + }; + }); + + /***/ + }, + /* 510 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** @license React v16.12.0 + * react-dom.development.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + + if (true) { + (function () { + 'use strict'; + + var React = __webpack_require__(1); + var _assign = __webpack_require__(63); + var Scheduler = __webpack_require__(512); + var checkPropTypes = __webpack_require__(106); + var tracing = __webpack_require__(514); + + // Do not require this module directly! Use normal `invariant` calls with + // template literal strings. The messages will be replaced with error codes + // during build. + + /** + * Use invariant() to assert state which your program assumes to be true. + * + * Provide sprintf-style format (only %s is supported) and arguments + * to provide information about what broke and what you were + * expecting. + * + * The invariant message will be stripped in production, but the invariant + * will remain to ensure logic does not differ in production. + */ + + if (!React) { + { + throw Error( + 'ReactDOM was loaded before React. Make sure you load the React package before loading ReactDOM.', + ); + } + } + + /** + * Injectable ordering of event plugins. + */ + var eventPluginOrder = null; + /** + * Injectable mapping from names to event plugin modules. + */ + + var namesToPlugins = {}; + /** + * Recomputes the plugin list using the injected plugins and plugin ordering. + * + * @private + */ + + function recomputePluginOrdering() { + if (!eventPluginOrder) { + // Wait until an `eventPluginOrder` is injected. + return; + } + + for (var pluginName in namesToPlugins) { + var pluginModule = namesToPlugins[pluginName]; + var pluginIndex = eventPluginOrder.indexOf(pluginName); + + if (!(pluginIndex > -1)) { + { + throw Error( + 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `' + + pluginName + + '`.', + ); + } + } + + if (plugins[pluginIndex]) { + continue; + } + + if (!pluginModule.extractEvents) { + { + throw Error( + 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `' + + pluginName + + '` does not.', + ); + } + } + + plugins[pluginIndex] = pluginModule; + var publishedEvents = pluginModule.eventTypes; + + for (var eventName in publishedEvents) { + if (!publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName)) { + { + throw Error( + 'EventPluginRegistry: Failed to publish event `' + + eventName + + '` for plugin `' + + pluginName + + '`.', + ); + } + } + } + } + } + /** + * Publishes an event so that it can be dispatched by the supplied plugin. + * + * @param {object} dispatchConfig Dispatch configuration for the event. + * @param {object} PluginModule Plugin publishing the event. + * @return {boolean} True if the event was successfully published. + * @private + */ + + function publishEventForPlugin(dispatchConfig, pluginModule, eventName) { + if (!!eventNameDispatchConfigs.hasOwnProperty(eventName)) { + { + throw Error( + 'EventPluginHub: More than one plugin attempted to publish the same event name, `' + + eventName + + '`.', + ); + } + } + + eventNameDispatchConfigs[eventName] = dispatchConfig; + var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames; + + if (phasedRegistrationNames) { + for (var phaseName in phasedRegistrationNames) { + if (phasedRegistrationNames.hasOwnProperty(phaseName)) { + var phasedRegistrationName = phasedRegistrationNames[phaseName]; + publishRegistrationName(phasedRegistrationName, pluginModule, eventName); + } + } + + return true; + } else if (dispatchConfig.registrationName) { + publishRegistrationName(dispatchConfig.registrationName, pluginModule, eventName); + return true; + } + + return false; + } + /** + * Publishes a registration name that is used to identify dispatched events. + * + * @param {string} registrationName Registration name to add. + * @param {object} PluginModule Plugin publishing the event. + * @private + */ + + function publishRegistrationName(registrationName, pluginModule, eventName) { + if (!!registrationNameModules[registrationName]) { + { + throw Error( + 'EventPluginHub: More than one plugin attempted to publish the same registration name, `' + + registrationName + + '`.', + ); + } + } + + registrationNameModules[registrationName] = pluginModule; + registrationNameDependencies[registrationName] = pluginModule.eventTypes[eventName].dependencies; + + { + var lowerCasedName = registrationName.toLowerCase(); + possibleRegistrationNames[lowerCasedName] = registrationName; + + if (registrationName === 'onDoubleClick') { + possibleRegistrationNames.ondblclick = registrationName; + } + } + } + /** + * Registers plugins so that they can extract and dispatch events. + * + * @see {EventPluginHub} + */ + + /** + * Ordered list of injected plugins. + */ + + var plugins = []; + /** + * Mapping from event name to dispatch config + */ + + var eventNameDispatchConfigs = {}; + /** + * Mapping from registration name to plugin module + */ + + var registrationNameModules = {}; + /** + * Mapping from registration name to event name + */ + + var registrationNameDependencies = {}; + /** + * Mapping from lowercase registration names to the properly cased version, + * used to warn in the case of missing event handlers. Available + * only in true. + * @type {Object} + */ + + var possibleRegistrationNames = {}; // Trust the developer to only use possibleRegistrationNames in true + + /** + * Injects an ordering of plugins (by plugin name). This allows the ordering + * to be decoupled from injection of the actual plugins so that ordering is + * always deterministic regardless of packaging, on-the-fly injection, etc. + * + * @param {array} InjectedEventPluginOrder + * @internal + * @see {EventPluginHub.injection.injectEventPluginOrder} + */ + + function injectEventPluginOrder(injectedEventPluginOrder) { + if (!!eventPluginOrder) { + { + throw Error( + 'EventPluginRegistry: Cannot inject event plugin ordering more than once. You are likely trying to load more than one copy of React.', + ); + } + } // Clone the ordering so it cannot be dynamically mutated. + + eventPluginOrder = Array.prototype.slice.call(injectedEventPluginOrder); + recomputePluginOrdering(); + } + /** + * Injects plugins to be used by `EventPluginHub`. The plugin names must be + * in the ordering injected by `injectEventPluginOrder`. + * + * Plugins can be injected as part of page initialization or on-the-fly. + * + * @param {object} injectedNamesToPlugins Map from names to plugin modules. + * @internal + * @see {EventPluginHub.injection.injectEventPluginsByName} + */ + + function injectEventPluginsByName(injectedNamesToPlugins) { + var isOrderingDirty = false; + + for (var pluginName in injectedNamesToPlugins) { + if (!injectedNamesToPlugins.hasOwnProperty(pluginName)) { + continue; + } + + var pluginModule = injectedNamesToPlugins[pluginName]; + + if (!namesToPlugins.hasOwnProperty(pluginName) || namesToPlugins[pluginName] !== pluginModule) { + if (!!namesToPlugins[pluginName]) { + { + throw Error( + 'EventPluginRegistry: Cannot inject two different event plugins using the same name, `' + + pluginName + + '`.', + ); + } + } + + namesToPlugins[pluginName] = pluginModule; + isOrderingDirty = true; + } + } + + if (isOrderingDirty) { + recomputePluginOrdering(); + } + } + + var invokeGuardedCallbackImpl = function (name, func, context, a, b, c, d, e, f) { + var funcArgs = Array.prototype.slice.call(arguments, 3); + + try { + func.apply(context, funcArgs); + } catch (error) { + this.onError(error); + } + }; + + { + // In DEV mode, we swap out invokeGuardedCallback for a special version + // that plays more nicely with the browser's DevTools. The idea is to preserve + // "Pause on exceptions" behavior. Because React wraps all user-provided + // functions in invokeGuardedCallback, and the production version of + // invokeGuardedCallback uses a try-catch, all user exceptions are treated + // like caught exceptions, and the DevTools won't pause unless the developer + // takes the extra step of enabling pause on caught exceptions. This is + // unintuitive, though, because even though React has caught the error, from + // the developer's perspective, the error is uncaught. + // + // To preserve the expected "Pause on exceptions" behavior, we don't use a + // try-catch in DEV. Instead, we synchronously dispatch a fake event to a fake + // DOM node, and call the user-provided callback from inside an event handler + // for that fake event. If the callback throws, the error is "captured" using + // a global event handler. But because the error happens in a different + // event loop context, it does not interrupt the normal program flow. + // Effectively, this gives us try-catch behavior without actually using + // try-catch. Neat! + // Check that the browser supports the APIs we need to implement our special + // DEV version of invokeGuardedCallback + if ( + typeof window !== 'undefined' && + typeof window.dispatchEvent === 'function' && + typeof document !== 'undefined' && + typeof document.createEvent === 'function' + ) { + var fakeNode = document.createElement('react'); + + var invokeGuardedCallbackDev = function (name, func, context, a, b, c, d, e, f) { + // If document doesn't exist we know for sure we will crash in this method + // when we call document.createEvent(). However this can cause confusing + // errors: https://github.com/facebookincubator/create-react-app/issues/3482 + // So we preemptively throw with a better message instead. + if (!(typeof document !== 'undefined')) { + { + throw Error( + 'The `document` global was defined when React was initialized, but is not defined anymore. This can happen in a test environment if a component schedules an update from an asynchronous callback, but the test has already finished running. To solve this, you can either unmount the component at the end of your test (and ensure that any asynchronous operations get canceled in `componentWillUnmount`), or you can change the test itself to be asynchronous.', + ); + } + } + + var evt = document.createEvent('Event'); // Keeps track of whether the user-provided callback threw an error. We + // set this to true at the beginning, then set it to false right after + // calling the function. If the function errors, `didError` will never be + // set to false. This strategy works even if the browser is flaky and + // fails to call our global error handler, because it doesn't rely on + // the error event at all. + + var didError = true; // Keeps track of the value of window.event so that we can reset it + // during the callback to let user code access window.event in the + // browsers that support it. + + var windowEvent = window.event; // Keeps track of the descriptor of window.event to restore it after event + // dispatching: https://github.com/facebook/react/issues/13688 + + var windowEventDescriptor = Object.getOwnPropertyDescriptor(window, 'event'); // Create an event handler for our fake event. We will synchronously + // dispatch our fake event using `dispatchEvent`. Inside the handler, we + // call the user-provided callback. + + var funcArgs = Array.prototype.slice.call(arguments, 3); + + function callCallback() { + // We immediately remove the callback from event listeners so that + // nested `invokeGuardedCallback` calls do not clash. Otherwise, a + // nested call would trigger the fake event handlers of any call higher + // in the stack. + fakeNode.removeEventListener(evtType, callCallback, false); // We check for window.hasOwnProperty('event') to prevent the + // window.event assignment in both IE <= 10 as they throw an error + // "Member not found" in strict mode, and in Firefox which does not + // support window.event. + + if (typeof window.event !== 'undefined' && window.hasOwnProperty('event')) { + window.event = windowEvent; + } + + func.apply(context, funcArgs); + didError = false; + } // Create a global error event handler. We use this to capture the value + // that was thrown. It's possible that this error handler will fire more + // than once; for example, if non-React code also calls `dispatchEvent` + // and a handler for that event throws. We should be resilient to most of + // those cases. Even if our error event handler fires more than once, the + // last error event is always used. If the callback actually does error, + // we know that the last error event is the correct one, because it's not + // possible for anything else to have happened in between our callback + // erroring and the code that follows the `dispatchEvent` call below. If + // the callback doesn't error, but the error event was fired, we know to + // ignore it because `didError` will be false, as described above. + + var error; // Use this to track whether the error event is ever called. + + var didSetError = false; + var isCrossOriginError = false; + + function handleWindowError(event) { + error = event.error; + didSetError = true; + + if (error === null && event.colno === 0 && event.lineno === 0) { + isCrossOriginError = true; + } + + if (event.defaultPrevented) { + // Some other error handler has prevented default. + // Browsers silence the error report if this happens. + // We'll remember this to later decide whether to log it or not. + if (error != null && typeof error === 'object') { + try { + error._suppressLogging = true; + } catch (inner) { + // Ignore. + } + } + } + } // Create a fake event type. + + var evtType = 'react-' + (name ? name : 'invokeguardedcallback'); // Attach our event handlers + + window.addEventListener('error', handleWindowError); + fakeNode.addEventListener(evtType, callCallback, false); // Synchronously dispatch our fake event. If the user-provided function + // errors, it will trigger our global error handler. + + evt.initEvent(evtType, false, false); + fakeNode.dispatchEvent(evt); + + if (windowEventDescriptor) { + Object.defineProperty(window, 'event', windowEventDescriptor); + } + + if (didError) { + if (!didSetError) { + // The callback errored, but the error event never fired. + error = new Error( + 'An error was thrown inside one of your components, but React ' + + "doesn't know what it was. This is likely due to browser " + + 'flakiness. React does its best to preserve the "Pause on ' + + 'exceptions" behavior of the DevTools, which requires some ' + + "DEV-mode only tricks. It's possible that these don't work in " + + 'your browser. Try triggering the error in production mode, ' + + 'or switching to a modern browser. If you suspect that this is ' + + 'actually an issue with React, please file an issue.', + ); + } else if (isCrossOriginError) { + error = new Error( + "A cross-origin error was thrown. React doesn't have access to " + + 'the actual error object in development. ' + + 'See https://fb.me/react-crossorigin-error for more information.', + ); + } + + this.onError(error); + } // Remove our event listeners + + window.removeEventListener('error', handleWindowError); + }; + + invokeGuardedCallbackImpl = invokeGuardedCallbackDev; + } + } + + var invokeGuardedCallbackImpl$1 = invokeGuardedCallbackImpl; + + var hasError = false; + var caughtError = null; // Used by event system to capture/rethrow the first error. + + var hasRethrowError = false; + var rethrowError = null; + var reporter = { + onError: function (error) { + hasError = true; + caughtError = error; + }, + }; + /** + * Call a function while guarding against errors that happens within it. + * Returns an error if it throws, otherwise null. + * + * In production, this is implemented using a try-catch. The reason we don't + * use a try-catch directly is so that we can swap out a different + * implementation in DEV mode. + * + * @param {String} name of the guard to use for logging or debugging + * @param {Function} func The function to invoke + * @param {*} context The context to use when calling the function + * @param {...*} args Arguments for function + */ + + function invokeGuardedCallback(name, func, context, a, b, c, d, e, f) { + hasError = false; + caughtError = null; + invokeGuardedCallbackImpl$1.apply(reporter, arguments); + } + /** + * Same as invokeGuardedCallback, but instead of returning an error, it stores + * it in a global so it can be rethrown by `rethrowCaughtError` later. + * TODO: See if caughtError and rethrowError can be unified. + * + * @param {String} name of the guard to use for logging or debugging + * @param {Function} func The function to invoke + * @param {*} context The context to use when calling the function + * @param {...*} args Arguments for function + */ + + function invokeGuardedCallbackAndCatchFirstError(name, func, context, a, b, c, d, e, f) { + invokeGuardedCallback.apply(this, arguments); + + if (hasError) { + var error = clearCaughtError(); + + if (!hasRethrowError) { + hasRethrowError = true; + rethrowError = error; + } + } + } + /** + * During execution of guarded functions we will capture the first error which + * we will rethrow to be handled by the top level error handler. + */ + + function rethrowCaughtError() { + if (hasRethrowError) { + var error = rethrowError; + hasRethrowError = false; + rethrowError = null; + throw error; + } + } + function hasCaughtError() { + return hasError; + } + function clearCaughtError() { + if (hasError) { + var error = caughtError; + hasError = false; + caughtError = null; + return error; + } else { + { + { + throw Error( + 'clearCaughtError was called but no error was captured. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + } + } + + /** + * Similar to invariant but only logs a warning if the condition is not met. + * This can be used to log issues in development environments in critical + * paths. Removing the logging code for production environments will keep the + * same logic and follow the same code paths. + */ + var warningWithoutStack = function () {}; + + { + warningWithoutStack = function (condition, format) { + for ( + var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; + _key < _len; + _key++ + ) { + args[_key - 2] = arguments[_key]; + } + + if (format === undefined) { + throw new Error( + '`warningWithoutStack(condition, format, ...args)` requires a warning ' + + 'message argument', + ); + } + + if (args.length > 8) { + // Check before the condition to catch violations early. + throw new Error('warningWithoutStack() currently supports at most 8 arguments.'); + } + + if (condition) { + return; + } + + if (typeof console !== 'undefined') { + var argsWithFormat = args.map(function (item) { + return '' + item; + }); + argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it + // breaks IE9: https://github.com/facebook/react/issues/13610 + + Function.prototype.apply.call(console.error, console, argsWithFormat); + } + + try { + // --- Welcome to debugging React --- + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + var argIndex = 0; + var message = + 'Warning: ' + + format.replace(/%s/g, function () { + return args[argIndex++]; + }); + throw new Error(message); + } catch (x) {} + }; + } + + var warningWithoutStack$1 = warningWithoutStack; + + var getFiberCurrentPropsFromNode = null; + var getInstanceFromNode = null; + var getNodeFromInstance = null; + function setComponentTree( + getFiberCurrentPropsFromNodeImpl, + getInstanceFromNodeImpl, + getNodeFromInstanceImpl, + ) { + getFiberCurrentPropsFromNode = getFiberCurrentPropsFromNodeImpl; + getInstanceFromNode = getInstanceFromNodeImpl; + getNodeFromInstance = getNodeFromInstanceImpl; + + { + !(getNodeFromInstance && getInstanceFromNode) + ? warningWithoutStack$1( + false, + 'EventPluginUtils.setComponentTree(...): Injected ' + + 'module is missing getNodeFromInstance or getInstanceFromNode.', + ) + : void 0; + } + } + var validateEventDispatches; + + { + validateEventDispatches = function (event) { + var dispatchListeners = event._dispatchListeners; + var dispatchInstances = event._dispatchInstances; + var listenersIsArr = Array.isArray(dispatchListeners); + var listenersLen = listenersIsArr ? dispatchListeners.length : dispatchListeners ? 1 : 0; + var instancesIsArr = Array.isArray(dispatchInstances); + var instancesLen = instancesIsArr ? dispatchInstances.length : dispatchInstances ? 1 : 0; + !(instancesIsArr === listenersIsArr && instancesLen === listenersLen) + ? warningWithoutStack$1(false, 'EventPluginUtils: Invalid `event`.') + : void 0; + }; + } + /** + * Dispatch the event to the listener. + * @param {SyntheticEvent} event SyntheticEvent to handle + * @param {function} listener Application-level callback + * @param {*} inst Internal component instance + */ + + function executeDispatch(event, listener, inst) { + var type = event.type || 'unknown-event'; + event.currentTarget = getNodeFromInstance(inst); + invokeGuardedCallbackAndCatchFirstError(type, listener, undefined, event); + event.currentTarget = null; + } + /** + * Standard/simple iteration through an event's collected dispatches. + */ + + function executeDispatchesInOrder(event) { + var dispatchListeners = event._dispatchListeners; + var dispatchInstances = event._dispatchInstances; + + { + validateEventDispatches(event); + } + + if (Array.isArray(dispatchListeners)) { + for (var i = 0; i < dispatchListeners.length; i++) { + if (event.isPropagationStopped()) { + break; + } // Listeners and Instances are two parallel arrays that are always in sync. + + executeDispatch(event, dispatchListeners[i], dispatchInstances[i]); + } + } else if (dispatchListeners) { + executeDispatch(event, dispatchListeners, dispatchInstances); + } + + event._dispatchListeners = null; + event._dispatchInstances = null; + } + /** + * @see executeDispatchesInOrderStopAtTrueImpl + */ + + /** + * Execution of a "direct" dispatch - there must be at most one dispatch + * accumulated on the event or it is considered an error. It doesn't really make + * sense for an event with multiple dispatches (bubbled) to keep track of the + * return values at each dispatch execution, but it does tend to make sense when + * dealing with "direct" dispatches. + * + * @return {*} The return value of executing the single dispatch. + */ + + /** + * @param {SyntheticEvent} event + * @return {boolean} True iff number of dispatches accumulated is greater than 0. + */ + + /** + * Accumulates items that must not be null or undefined into the first one. This + * is used to conserve memory by avoiding array allocations, and thus sacrifices + * API cleanness. Since `current` can be null before being passed in and not + * null after this function, make sure to assign it back to `current`: + * + * `a = accumulateInto(a, b);` + * + * This API should be sparingly used. Try `accumulate` for something cleaner. + * + * @return {*|array<*>} An accumulation of items. + */ + + function accumulateInto(current, next) { + if (!(next != null)) { + { + throw Error('accumulateInto(...): Accumulated items must not be null or undefined.'); + } + } + + if (current == null) { + return next; + } // Both are not empty. Warning: Never call x.concat(y) when you are not + // certain that x is an Array (x could be a string with concat method). + + if (Array.isArray(current)) { + if (Array.isArray(next)) { + current.push.apply(current, next); + return current; + } + + current.push(next); + return current; + } + + if (Array.isArray(next)) { + // A bit too dangerous to mutate `next`. + return [current].concat(next); + } + + return [current, next]; + } + + /** + * @param {array} arr an "accumulation" of items which is either an Array or + * a single item. Useful when paired with the `accumulate` module. This is a + * simple utility that allows us to reason about a collection of items, but + * handling the case when there is exactly one item (and we do not need to + * allocate an array). + * @param {function} cb Callback invoked with each element or a collection. + * @param {?} [scope] Scope used as `this` in a callback. + */ + function forEachAccumulated(arr, cb, scope) { + if (Array.isArray(arr)) { + arr.forEach(cb, scope); + } else if (arr) { + cb.call(scope, arr); + } + } + + /** + * Internal queue of events that have accumulated their dispatches and are + * waiting to have their dispatches executed. + */ + + var eventQueue = null; + /** + * Dispatches an event and releases it back into the pool, unless persistent. + * + * @param {?object} event Synthetic event to be dispatched. + * @private + */ + + var executeDispatchesAndRelease = function (event) { + if (event) { + executeDispatchesInOrder(event); + + if (!event.isPersistent()) { + event.constructor.release(event); + } + } + }; + + var executeDispatchesAndReleaseTopLevel = function (e) { + return executeDispatchesAndRelease(e); + }; + + function runEventsInBatch(events) { + if (events !== null) { + eventQueue = accumulateInto(eventQueue, events); + } // Set `eventQueue` to null before processing it so that we can tell if more + // events get enqueued while processing. + + var processingEventQueue = eventQueue; + eventQueue = null; + + if (!processingEventQueue) { + return; + } + + forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseTopLevel); + + if (!!eventQueue) { + { + throw Error( + 'processEventQueue(): Additional events were enqueued while processing an event queue. Support for this has not yet been implemented.', + ); + } + } // This would be a good time to rethrow if any of the event handlers threw. + + rethrowCaughtError(); + } + + function isInteractive(tag) { + return tag === 'button' || tag === 'input' || tag === 'select' || tag === 'textarea'; + } + + function shouldPreventMouseEvent(name, type, props) { + switch (name) { + case 'onClick': + case 'onClickCapture': + case 'onDoubleClick': + case 'onDoubleClickCapture': + case 'onMouseDown': + case 'onMouseDownCapture': + case 'onMouseMove': + case 'onMouseMoveCapture': + case 'onMouseUp': + case 'onMouseUpCapture': + return !!(props.disabled && isInteractive(type)); + + default: + return false; + } + } + /** + * This is a unified interface for event plugins to be installed and configured. + * + * Event plugins can implement the following properties: + * + * `extractEvents` {function(string, DOMEventTarget, string, object): *} + * Required. When a top-level event is fired, this method is expected to + * extract synthetic events that will in turn be queued and dispatched. + * + * `eventTypes` {object} + * Optional, plugins that fire events must publish a mapping of registration + * names that are used to register listeners. Values of this mapping must + * be objects that contain `registrationName` or `phasedRegistrationNames`. + * + * `executeDispatch` {function(object, function, string)} + * Optional, allows plugins to override how an event gets dispatched. By + * default, the listener is simply invoked. + * + * Each plugin that is injected into `EventsPluginHub` is immediately operable. + * + * @public + */ + + /** + * Methods for injecting dependencies. + */ + + var injection = { + /** + * @param {array} InjectedEventPluginOrder + * @public + */ + injectEventPluginOrder: injectEventPluginOrder, + + /** + * @param {object} injectedNamesToPlugins Map from names to plugin modules. + */ + injectEventPluginsByName: injectEventPluginsByName, + }; + /** + * @param {object} inst The instance, which is the source of events. + * @param {string} registrationName Name of listener (e.g. `onClick`). + * @return {?function} The stored callback. + */ + + function getListener(inst, registrationName) { + var listener; // TODO: shouldPreventMouseEvent is DOM-specific and definitely should not + // live here; needs to be moved to a better place soon + + var stateNode = inst.stateNode; + + if (!stateNode) { + // Work in progress (ex: onload events in incremental mode). + return null; + } + + var props = getFiberCurrentPropsFromNode(stateNode); + + if (!props) { + // Work in progress. + return null; + } + + listener = props[registrationName]; + + if (shouldPreventMouseEvent(registrationName, inst.type, props)) { + return null; + } + + if (!(!listener || typeof listener === 'function')) { + { + throw Error( + 'Expected `' + + registrationName + + '` listener to be a function, instead got a value of `' + + typeof listener + + '` type.', + ); + } + } + + return listener; + } + /** + * Allows registered plugins an opportunity to extract events from top-level + * native browser events. + * + * @return {*} An accumulation of synthetic events. + * @internal + */ + + function extractPluginEvents( + topLevelType, + targetInst, + nativeEvent, + nativeEventTarget, + eventSystemFlags, + ) { + var events = null; + + for (var i = 0; i < plugins.length; i++) { + // Not every plugin in the ordering may be loaded at runtime. + var possiblePlugin = plugins[i]; + + if (possiblePlugin) { + var extractedEvents = possiblePlugin.extractEvents( + topLevelType, + targetInst, + nativeEvent, + nativeEventTarget, + eventSystemFlags, + ); + + if (extractedEvents) { + events = accumulateInto(events, extractedEvents); + } + } + } + + return events; + } + + function runExtractedPluginEventsInBatch( + topLevelType, + targetInst, + nativeEvent, + nativeEventTarget, + eventSystemFlags, + ) { + var events = extractPluginEvents( + topLevelType, + targetInst, + nativeEvent, + nativeEventTarget, + eventSystemFlags, + ); + runEventsInBatch(events); + } + + var FunctionComponent = 0; + var ClassComponent = 1; + var IndeterminateComponent = 2; // Before we know whether it is function or class + + var HostRoot = 3; // Root of a host tree. Could be nested inside another node. + + var HostPortal = 4; // A subtree. Could be an entry point to a different renderer. + + var HostComponent = 5; + var HostText = 6; + var Fragment = 7; + var Mode = 8; + var ContextConsumer = 9; + var ContextProvider = 10; + var ForwardRef = 11; + var Profiler = 12; + var SuspenseComponent = 13; + var MemoComponent = 14; + var SimpleMemoComponent = 15; + var LazyComponent = 16; + var IncompleteClassComponent = 17; + var DehydratedFragment = 18; + var SuspenseListComponent = 19; + var FundamentalComponent = 20; + var ScopeComponent = 21; + + var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; // Prevent newer renderers from RTE when used with older react package versions. + // Current owner and dispatcher used to share the same ref, + // but PR #14548 split them out to better support the react-debug-tools package. + + if (!ReactSharedInternals.hasOwnProperty('ReactCurrentDispatcher')) { + ReactSharedInternals.ReactCurrentDispatcher = { + current: null, + }; + } + + if (!ReactSharedInternals.hasOwnProperty('ReactCurrentBatchConfig')) { + ReactSharedInternals.ReactCurrentBatchConfig = { + suspense: null, + }; + } + + var BEFORE_SLASH_RE = /^(.*)[\\\/]/; + var describeComponentFrame = function (name, source, ownerName) { + var sourceInfo = ''; + + if (source) { + var path = source.fileName; + var fileName = path.replace(BEFORE_SLASH_RE, ''); + + { + // In DEV, include code for a common special case: + // prefer "folder/index.js" instead of just "index.js". + if (/^index\./.test(fileName)) { + var match = path.match(BEFORE_SLASH_RE); + + if (match) { + var pathBeforeSlash = match[1]; + + if (pathBeforeSlash) { + var folderName = pathBeforeSlash.replace(BEFORE_SLASH_RE, ''); + fileName = folderName + '/' + fileName; + } + } + } + } + + sourceInfo = ' (at ' + fileName + ':' + source.lineNumber + ')'; + } else if (ownerName) { + sourceInfo = ' (created by ' + ownerName + ')'; + } + + return '\n in ' + (name || 'Unknown') + sourceInfo; + }; + + // The Symbol used to tag the ReactElement-like types. If there is no native Symbol + // nor polyfill, then a plain number is used for performance. + var hasSymbol = typeof Symbol === 'function' && Symbol.for; + var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7; + var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca; + var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb; + var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc; + var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2; + var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd; + var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary + // (unstable) APIs that have been removed. Can we remove the symbols? + + var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf; + var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0; + var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1; + var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8; + var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3; + var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4; + var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5; + var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6; + var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7; + var MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; + var FAUX_ITERATOR_SYMBOL = '@@iterator'; + function getIteratorFn(maybeIterable) { + if (maybeIterable === null || typeof maybeIterable !== 'object') { + return null; + } + + var maybeIterator = + (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) || + maybeIterable[FAUX_ITERATOR_SYMBOL]; + + if (typeof maybeIterator === 'function') { + return maybeIterator; + } + + return null; + } + + /** + * Similar to invariant but only logs a warning if the condition is not met. + * This can be used to log issues in development environments in critical + * paths. Removing the logging code for production environments will keep the + * same logic and follow the same code paths. + */ + + var warning = warningWithoutStack$1; + + { + warning = function (condition, format) { + if (condition) { + return; + } + + var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; + var stack = ReactDebugCurrentFrame.getStackAddendum(); // eslint-disable-next-line react-internal/warning-and-invariant-args + + for ( + var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; + _key < _len; + _key++ + ) { + args[_key - 2] = arguments[_key]; + } + + warningWithoutStack$1.apply(void 0, [false, format + '%s'].concat(args, [stack])); + }; + } + + var warning$1 = warning; + + var Uninitialized = -1; + var Pending = 0; + var Resolved = 1; + var Rejected = 2; + function refineResolvedLazyComponent(lazyComponent) { + return lazyComponent._status === Resolved ? lazyComponent._result : null; + } + function initializeLazyComponentType(lazyComponent) { + if (lazyComponent._status === Uninitialized) { + lazyComponent._status = Pending; + var ctor = lazyComponent._ctor; + var thenable = ctor(); + lazyComponent._result = thenable; + thenable.then( + function (moduleObject) { + if (lazyComponent._status === Pending) { + var defaultExport = moduleObject.default; + + { + if (defaultExport === undefined) { + warning$1( + false, + 'lazy: Expected the result of a dynamic import() call. ' + + 'Instead received: %s\n\nYour code should look like: \n ' + + "const MyComponent = lazy(() => import('./MyComponent'))", + moduleObject, + ); + } + } + + lazyComponent._status = Resolved; + lazyComponent._result = defaultExport; + } + }, + function (error) { + if (lazyComponent._status === Pending) { + lazyComponent._status = Rejected; + lazyComponent._result = error; + } + }, + ); + } + } + + function getWrappedName(outerType, innerType, wrapperName) { + var functionName = innerType.displayName || innerType.name || ''; + return ( + outerType.displayName || + (functionName !== '' ? wrapperName + '(' + functionName + ')' : wrapperName) + ); + } + + function getComponentName(type) { + if (type == null) { + // Host root, text node or just invalid type. + return null; + } + + { + if (typeof type.tag === 'number') { + warningWithoutStack$1( + false, + 'Received an unexpected object in getComponentName(). ' + + 'This is likely a bug in React. Please file an issue.', + ); + } + } + + if (typeof type === 'function') { + return type.displayName || type.name || null; + } + + if (typeof type === 'string') { + return type; + } + + switch (type) { + case REACT_FRAGMENT_TYPE: + return 'Fragment'; + + case REACT_PORTAL_TYPE: + return 'Portal'; + + case REACT_PROFILER_TYPE: + return 'Profiler'; + + case REACT_STRICT_MODE_TYPE: + return 'StrictMode'; + + case REACT_SUSPENSE_TYPE: + return 'Suspense'; + + case REACT_SUSPENSE_LIST_TYPE: + return 'SuspenseList'; + } + + if (typeof type === 'object') { + switch (type.$$typeof) { + case REACT_CONTEXT_TYPE: + return 'Context.Consumer'; + + case REACT_PROVIDER_TYPE: + return 'Context.Provider'; + + case REACT_FORWARD_REF_TYPE: + return getWrappedName(type, type.render, 'ForwardRef'); + + case REACT_MEMO_TYPE: + return getComponentName(type.type); + + case REACT_LAZY_TYPE: { + var thenable = type; + var resolvedThenable = refineResolvedLazyComponent(thenable); + + if (resolvedThenable) { + return getComponentName(resolvedThenable); + } + + break; + } + } + } + + return null; + } + + var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; + + function describeFiber(fiber) { + switch (fiber.tag) { + case HostRoot: + case HostPortal: + case HostText: + case Fragment: + case ContextProvider: + case ContextConsumer: + return ''; + + default: + var owner = fiber._debugOwner; + var source = fiber._debugSource; + var name = getComponentName(fiber.type); + var ownerName = null; + + if (owner) { + ownerName = getComponentName(owner.type); + } + + return describeComponentFrame(name, source, ownerName); + } + } + + function getStackByFiberInDevAndProd(workInProgress) { + var info = ''; + var node = workInProgress; + + do { + info += describeFiber(node); + node = node.return; + } while (node); + + return info; + } + var current = null; + var phase = null; + function getCurrentFiberOwnerNameInDevOrNull() { + { + if (current === null) { + return null; + } + + var owner = current._debugOwner; + + if (owner !== null && typeof owner !== 'undefined') { + return getComponentName(owner.type); + } + } + + return null; + } + function getCurrentFiberStackInDev() { + { + if (current === null) { + return ''; + } // Safe because if current fiber exists, we are reconciling, + // and it is guaranteed to be the work-in-progress version. + + return getStackByFiberInDevAndProd(current); + } + + return ''; + } + function resetCurrentFiber() { + { + ReactDebugCurrentFrame.getCurrentStack = null; + current = null; + phase = null; + } + } + function setCurrentFiber(fiber) { + { + ReactDebugCurrentFrame.getCurrentStack = getCurrentFiberStackInDev; + current = fiber; + phase = null; + } + } + function setCurrentPhase(lifeCyclePhase) { + { + phase = lifeCyclePhase; + } + } + + var canUseDOM = !!( + typeof window !== 'undefined' && + typeof window.document !== 'undefined' && + typeof window.document.createElement !== 'undefined' + ); + + function endsWith(subject, search) { + var length = subject.length; + return subject.substring(length - search.length, length) === search; + } + + var PLUGIN_EVENT_SYSTEM = 1; + var RESPONDER_EVENT_SYSTEM = 1 << 1; + var IS_PASSIVE = 1 << 2; + var IS_ACTIVE = 1 << 3; + var PASSIVE_NOT_SUPPORTED = 1 << 4; + var IS_REPLAYED = 1 << 5; + + var restoreImpl = null; + var restoreTarget = null; + var restoreQueue = null; + + function restoreStateOfTarget(target) { + // We perform this translation at the end of the event loop so that we + // always receive the correct fiber here + var internalInstance = getInstanceFromNode(target); + + if (!internalInstance) { + // Unmounted + return; + } + + if (!(typeof restoreImpl === 'function')) { + { + throw Error( + 'setRestoreImplementation() needs to be called to handle a target for controlled events. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + + var props = getFiberCurrentPropsFromNode(internalInstance.stateNode); + restoreImpl(internalInstance.stateNode, internalInstance.type, props); + } + + function setRestoreImplementation(impl) { + restoreImpl = impl; + } + function enqueueStateRestore(target) { + if (restoreTarget) { + if (restoreQueue) { + restoreQueue.push(target); + } else { + restoreQueue = [target]; + } + } else { + restoreTarget = target; + } + } + function needsStateRestore() { + return restoreTarget !== null || restoreQueue !== null; + } + function restoreStateIfNeeded() { + if (!restoreTarget) { + return; + } + + var target = restoreTarget; + var queuedTargets = restoreQueue; + restoreTarget = null; + restoreQueue = null; + restoreStateOfTarget(target); + + if (queuedTargets) { + for (var i = 0; i < queuedTargets.length; i++) { + restoreStateOfTarget(queuedTargets[i]); + } + } + } + + var enableUserTimingAPI = true; // Helps identify side effects in render-phase lifecycle hooks and setState + // reducers by double invoking them in Strict Mode. + + var debugRenderPhaseSideEffectsForStrictMode = true; // To preserve the "Pause on caught exceptions" behavior of the debugger, we + // replay the begin phase of a failed component inside invokeGuardedCallback. + + var replayFailedUnitOfWorkWithInvokeGuardedCallback = true; // Warn about deprecated, async-unsafe lifecycles; relates to RFC #6: + + var warnAboutDeprecatedLifecycles = true; // Gather advanced timing metrics for Profiler subtrees. + + var enableProfilerTimer = true; // Trace which interactions trigger each commit. + + var enableSchedulerTracing = true; // SSR experiments + + var enableSuspenseServerRenderer = false; + var enableSelectiveHydration = false; // Only used in www builds. + + // Only used in www builds. + + // Disable javascript: URL strings in href for XSS protection. + + var disableJavaScriptURLs = false; // React Fire: prevent the value and checked attributes from syncing + // with their related DOM properties + + var disableInputAttributeSyncing = false; // These APIs will no longer be "unstable" in the upcoming 16.7 release, + // Control this behavior with a flag to support 16.6 minor releases in the meanwhile. + + var exposeConcurrentModeAPIs = false; + var warnAboutShorthandPropertyCollision = false; // Experimental React Flare event system and event components support. + + var enableFlareAPI = false; // Experimental Host Component support. + + var enableFundamentalAPI = false; // Experimental Scope support. + + var enableScopeAPI = false; // New API for JSX transforms to target - https://github.com/reactjs/rfcs/pull/107 + + // We will enforce mocking scheduler with scheduler/unstable_mock at some point. (v17?) + // Till then, we warn about the missing mock, but still fallback to a legacy mode compatible version + + var warnAboutUnmockedScheduler = false; // For tests, we flush suspense fallbacks in an act scope; + // *except* in some of our own tests, where we test incremental loading states. + + var flushSuspenseFallbacksInTests = true; // Add a callback property to suspense to notify which promises are currently + // in the update queue. This allows reporting and tracing of what is causing + // the user to see a loading state. + // Also allows hydration callbacks to fire when a dehydrated boundary gets + // hydrated or deleted. + + var enableSuspenseCallback = false; // Part of the simplification of React.createElement so we can eventually move + // from React.createElement to React.jsx + // https://github.com/reactjs/rfcs/blob/createlement-rfc/text/0000-create-element-changes.md + + var warnAboutDefaultPropsOnFunctionComponents = false; + var warnAboutStringRefs = false; + var disableLegacyContext = false; + var disableSchedulerTimeoutBasedOnReactExpirationTime = false; + var enableTrustedTypesIntegration = false; // Flag to turn event.target and event.currentTarget in ReactNative from a reactTag to a component instance + + // the renderer. Such as when we're dispatching events or if third party + // libraries need to call batchedUpdates. Eventually, this API will go away when + // everything is batched by default. We'll then have a similar API to opt-out of + // scheduled work and instead do synchronous work. + // Defaults + + var batchedUpdatesImpl = function (fn, bookkeeping) { + return fn(bookkeeping); + }; + + var discreteUpdatesImpl = function (fn, a, b, c) { + return fn(a, b, c); + }; + + var flushDiscreteUpdatesImpl = function () {}; + + var batchedEventUpdatesImpl = batchedUpdatesImpl; + var isInsideEventHandler = false; + var isBatchingEventUpdates = false; + + function finishEventHandler() { + // Here we wait until all updates have propagated, which is important + // when using controlled components within layers: + // https://github.com/facebook/react/issues/1698 + // Then we restore state of any controlled component. + var controlledComponentsHavePendingUpdates = needsStateRestore(); + + if (controlledComponentsHavePendingUpdates) { + // If a controlled event was fired, we may need to restore the state of + // the DOM node back to the controlled value. This is necessary when React + // bails out of the update without touching the DOM. + flushDiscreteUpdatesImpl(); + restoreStateIfNeeded(); + } + } + + function batchedUpdates(fn, bookkeeping) { + if (isInsideEventHandler) { + // If we are currently inside another batch, we need to wait until it + // fully completes before restoring state. + return fn(bookkeeping); + } + + isInsideEventHandler = true; + + try { + return batchedUpdatesImpl(fn, bookkeeping); + } finally { + isInsideEventHandler = false; + finishEventHandler(); + } + } + function batchedEventUpdates(fn, a, b) { + if (isBatchingEventUpdates) { + // If we are currently inside another batch, we need to wait until it + // fully completes before restoring state. + return fn(a, b); + } + + isBatchingEventUpdates = true; + + try { + return batchedEventUpdatesImpl(fn, a, b); + } finally { + isBatchingEventUpdates = false; + finishEventHandler(); + } + } // This is for the React Flare event system + + function executeUserEventHandler(fn, value) { + var previouslyInEventHandler = isInsideEventHandler; + + try { + isInsideEventHandler = true; + var type = typeof value === 'object' && value !== null ? value.type : ''; + invokeGuardedCallbackAndCatchFirstError(type, fn, undefined, value); + } finally { + isInsideEventHandler = previouslyInEventHandler; + } + } + function discreteUpdates(fn, a, b, c) { + var prevIsInsideEventHandler = isInsideEventHandler; + isInsideEventHandler = true; + + try { + return discreteUpdatesImpl(fn, a, b, c); + } finally { + isInsideEventHandler = prevIsInsideEventHandler; + + if (!isInsideEventHandler) { + finishEventHandler(); + } + } + } + var lastFlushedEventTimeStamp = 0; + function flushDiscreteUpdatesIfNeeded(timeStamp) { + // event.timeStamp isn't overly reliable due to inconsistencies in + // how different browsers have historically provided the time stamp. + // Some browsers provide high-resolution time stamps for all events, + // some provide low-resolution time stamps for all events. FF < 52 + // even mixes both time stamps together. Some browsers even report + // negative time stamps or time stamps that are 0 (iOS9) in some cases. + // Given we are only comparing two time stamps with equality (!==), + // we are safe from the resolution differences. If the time stamp is 0 + // we bail-out of preventing the flush, which can affect semantics, + // such as if an earlier flush removes or adds event listeners that + // are fired in the subsequent flush. However, this is the same + // behaviour as we had before this change, so the risks are low. + if ( + !isInsideEventHandler && + (!enableFlareAPI || timeStamp === 0 || lastFlushedEventTimeStamp !== timeStamp) + ) { + lastFlushedEventTimeStamp = timeStamp; + flushDiscreteUpdatesImpl(); + } + } + function setBatchingImplementation( + _batchedUpdatesImpl, + _discreteUpdatesImpl, + _flushDiscreteUpdatesImpl, + _batchedEventUpdatesImpl, + ) { + batchedUpdatesImpl = _batchedUpdatesImpl; + discreteUpdatesImpl = _discreteUpdatesImpl; + flushDiscreteUpdatesImpl = _flushDiscreteUpdatesImpl; + batchedEventUpdatesImpl = _batchedEventUpdatesImpl; + } + + var DiscreteEvent = 0; + var UserBlockingEvent = 1; + var ContinuousEvent = 2; + + // CommonJS interop named imports. + + var UserBlockingPriority = Scheduler.unstable_UserBlockingPriority; + var runWithPriority = Scheduler.unstable_runWithPriority; + var listenToResponderEventTypesImpl; + function setListenToResponderEventTypes(_listenToResponderEventTypesImpl) { + listenToResponderEventTypesImpl = _listenToResponderEventTypesImpl; + } + var rootEventTypesToEventResponderInstances = new Map(); + var DoNotPropagateToNextResponder = 0; + var PropagateToNextResponder = 1; + var currentTimeStamp = 0; + var currentInstance = null; + var currentDocument = null; + var currentPropagationBehavior = DoNotPropagateToNextResponder; + var eventResponderContext = { + dispatchEvent: function (eventValue, eventListener, eventPriority) { + validateResponderContext(); + validateEventValue(eventValue); + + switch (eventPriority) { + case DiscreteEvent: { + flushDiscreteUpdatesIfNeeded(currentTimeStamp); + discreteUpdates(function () { + return executeUserEventHandler(eventListener, eventValue); + }); + break; + } + + case UserBlockingEvent: { + runWithPriority(UserBlockingPriority, function () { + return executeUserEventHandler(eventListener, eventValue); + }); + break; + } + + case ContinuousEvent: { + executeUserEventHandler(eventListener, eventValue); + break; + } + } + }, + isTargetWithinResponder: function (target) { + validateResponderContext(); + + if (target != null) { + var fiber = getClosestInstanceFromNode(target); + var responderFiber = currentInstance.fiber; + + while (fiber !== null) { + if (fiber === responderFiber || fiber.alternate === responderFiber) { + return true; + } + + fiber = fiber.return; + } + } + + return false; + }, + isTargetWithinResponderScope: function (target) { + validateResponderContext(); + var componentInstance = currentInstance; + var responder = componentInstance.responder; + + if (target != null) { + var fiber = getClosestInstanceFromNode(target); + var responderFiber = currentInstance.fiber; + + while (fiber !== null) { + if (fiber === responderFiber || fiber.alternate === responderFiber) { + return true; + } + + if (doesFiberHaveResponder(fiber, responder)) { + return false; + } + + fiber = fiber.return; + } + } + + return false; + }, + isTargetWithinNode: function (childTarget, parentTarget) { + validateResponderContext(); + var childFiber = getClosestInstanceFromNode(childTarget); + var parentFiber = getClosestInstanceFromNode(parentTarget); + + if (childFiber != null && parentFiber != null) { + var parentAlternateFiber = parentFiber.alternate; + var node = childFiber; + + while (node !== null) { + if (node === parentFiber || node === parentAlternateFiber) { + return true; + } + + node = node.return; + } + + return false; + } // Fallback to DOM APIs + + return parentTarget.contains(childTarget); + }, + addRootEventTypes: function (rootEventTypes) { + validateResponderContext(); + listenToResponderEventTypesImpl(rootEventTypes, currentDocument); + + for (var i = 0; i < rootEventTypes.length; i++) { + var rootEventType = rootEventTypes[i]; + var eventResponderInstance = currentInstance; + registerRootEventType(rootEventType, eventResponderInstance); + } + }, + removeRootEventTypes: function (rootEventTypes) { + validateResponderContext(); + + for (var i = 0; i < rootEventTypes.length; i++) { + var rootEventType = rootEventTypes[i]; + var rootEventResponders = rootEventTypesToEventResponderInstances.get(rootEventType); + var rootEventTypesSet = currentInstance.rootEventTypes; + + if (rootEventTypesSet !== null) { + rootEventTypesSet.delete(rootEventType); + } + + if (rootEventResponders !== undefined) { + rootEventResponders.delete(currentInstance); + } + } + }, + getActiveDocument: getActiveDocument, + objectAssign: _assign, + getTimeStamp: function () { + validateResponderContext(); + return currentTimeStamp; + }, + isTargetWithinHostComponent: function (target, elementType) { + validateResponderContext(); + var fiber = getClosestInstanceFromNode(target); + + while (fiber !== null) { + if (fiber.tag === HostComponent && fiber.type === elementType) { + return true; + } + + fiber = fiber.return; + } + + return false; + }, + continuePropagation: function () { + currentPropagationBehavior = PropagateToNextResponder; + }, + enqueueStateRestore: enqueueStateRestore, + getResponderNode: function () { + validateResponderContext(); + var responderFiber = currentInstance.fiber; + + if (responderFiber.tag === ScopeComponent) { + return null; + } + + return responderFiber.stateNode; + }, + }; + + function validateEventValue(eventValue) { + if (typeof eventValue === 'object' && eventValue !== null) { + var target = eventValue.target, + type = eventValue.type, + timeStamp = eventValue.timeStamp; + + if (target == null || type == null || timeStamp == null) { + throw new Error( + 'context.dispatchEvent: "target", "timeStamp", and "type" fields on event object are required.', + ); + } + + var showWarning = function (name) { + { + warning$1( + false, + '%s is not available on event objects created from event responder modules (React Flare). ' + + 'Try wrapping in a conditional, i.e. `if (event.type !== "press") { event.%s }`', + name, + name, + ); + } + }; + + eventValue.isDefaultPrevented = function () { + { + showWarning('isDefaultPrevented()'); + } + }; + + eventValue.isPropagationStopped = function () { + { + showWarning('isPropagationStopped()'); + } + }; // $FlowFixMe: we don't need value, Flow thinks we do + + Object.defineProperty(eventValue, 'nativeEvent', { + get: function () { + { + showWarning('nativeEvent'); + } + }, + }); + } + } + + function doesFiberHaveResponder(fiber, responder) { + var tag = fiber.tag; + + if (tag === HostComponent || tag === ScopeComponent) { + var dependencies = fiber.dependencies; + + if (dependencies !== null) { + var respondersMap = dependencies.responders; + + if (respondersMap !== null && respondersMap.has(responder)) { + return true; + } + } + } + + return false; + } + + function getActiveDocument() { + return currentDocument; + } + + function createDOMResponderEvent( + topLevelType, + nativeEvent, + nativeEventTarget, + passive, + passiveSupported, + ) { + var _ref = nativeEvent, + buttons = _ref.buttons, + pointerType = _ref.pointerType; + var eventPointerType = ''; + + if (pointerType !== undefined) { + eventPointerType = pointerType; + } else if (nativeEvent.key !== undefined) { + eventPointerType = 'keyboard'; + } else if (buttons !== undefined) { + eventPointerType = 'mouse'; + } else if (nativeEvent.changedTouches !== undefined) { + eventPointerType = 'touch'; + } + + return { + nativeEvent: nativeEvent, + passive: passive, + passiveSupported: passiveSupported, + pointerType: eventPointerType, + target: nativeEventTarget, + type: topLevelType, + }; + } + + function responderEventTypesContainType(eventTypes, type) { + for (var i = 0, len = eventTypes.length; i < len; i++) { + if (eventTypes[i] === type) { + return true; + } + } + + return false; + } + + function validateResponderTargetEventTypes(eventType, responder) { + var targetEventTypes = responder.targetEventTypes; // Validate the target event type exists on the responder + + if (targetEventTypes !== null) { + return responderEventTypesContainType(targetEventTypes, eventType); + } + + return false; + } + + function traverseAndHandleEventResponderInstances( + topLevelType, + targetFiber, + nativeEvent, + nativeEventTarget, + eventSystemFlags, + ) { + var isPassiveEvent = (eventSystemFlags & IS_PASSIVE) !== 0; + var isPassiveSupported = (eventSystemFlags & PASSIVE_NOT_SUPPORTED) === 0; + var isPassive = isPassiveEvent || !isPassiveSupported; + var eventType = isPassive ? topLevelType : topLevelType + '_active'; // Trigger event responders in this order: + // - Bubble target responder phase + // - Root responder phase + + var visitedResponders = new Set(); + var responderEvent = createDOMResponderEvent( + topLevelType, + nativeEvent, + nativeEventTarget, + isPassiveEvent, + isPassiveSupported, + ); + var node = targetFiber; + var insidePortal = false; + + while (node !== null) { + var _node = node, + dependencies = _node.dependencies, + tag = _node.tag; + + if (tag === HostPortal) { + insidePortal = true; + } else if ((tag === HostComponent || tag === ScopeComponent) && dependencies !== null) { + var respondersMap = dependencies.responders; + + if (respondersMap !== null) { + var responderInstances = Array.from(respondersMap.values()); + + for (var i = 0, length = responderInstances.length; i < length; i++) { + var responderInstance = responderInstances[i]; + var props = responderInstance.props, + responder = responderInstance.responder, + state = responderInstance.state; + + if ( + !visitedResponders.has(responder) && + validateResponderTargetEventTypes(eventType, responder) && + (!insidePortal || responder.targetPortalPropagation) + ) { + visitedResponders.add(responder); + var onEvent = responder.onEvent; + + if (onEvent !== null) { + currentInstance = responderInstance; + onEvent(responderEvent, eventResponderContext, props, state); + + if (currentPropagationBehavior === PropagateToNextResponder) { + visitedResponders.delete(responder); + currentPropagationBehavior = DoNotPropagateToNextResponder; + } + } + } + } + } + } + + node = node.return; + } // Root phase + + var rootEventResponderInstances = rootEventTypesToEventResponderInstances.get(eventType); + + if (rootEventResponderInstances !== undefined) { + var _responderInstances = Array.from(rootEventResponderInstances); + + for (var _i = 0; _i < _responderInstances.length; _i++) { + var _responderInstance = _responderInstances[_i]; + var props = _responderInstance.props, + responder = _responderInstance.responder, + state = _responderInstance.state; + var onRootEvent = responder.onRootEvent; + + if (onRootEvent !== null) { + currentInstance = _responderInstance; + onRootEvent(responderEvent, eventResponderContext, props, state); + } + } + } + } + + function mountEventResponder(responder, responderInstance, props, state) { + var onMount = responder.onMount; + + if (onMount !== null) { + var previousInstance = currentInstance; + currentInstance = responderInstance; + + try { + batchedEventUpdates(function () { + onMount(eventResponderContext, props, state); + }); + } finally { + currentInstance = previousInstance; + } + } + } + function unmountEventResponder(responderInstance) { + var responder = responderInstance.responder; + var onUnmount = responder.onUnmount; + + if (onUnmount !== null) { + var props = responderInstance.props, + state = responderInstance.state; + var previousInstance = currentInstance; + currentInstance = responderInstance; + + try { + batchedEventUpdates(function () { + onUnmount(eventResponderContext, props, state); + }); + } finally { + currentInstance = previousInstance; + } + } + + var rootEventTypesSet = responderInstance.rootEventTypes; + + if (rootEventTypesSet !== null) { + var rootEventTypes = Array.from(rootEventTypesSet); + + for (var i = 0; i < rootEventTypes.length; i++) { + var topLevelEventType = rootEventTypes[i]; + var rootEventResponderInstances = + rootEventTypesToEventResponderInstances.get(topLevelEventType); + + if (rootEventResponderInstances !== undefined) { + rootEventResponderInstances.delete(responderInstance); + } + } + } + } + + function validateResponderContext() { + if (!(currentInstance !== null)) { + { + throw Error('An event responder context was used outside of an event cycle.'); + } + } + } + + function dispatchEventForResponderEventSystem( + topLevelType, + targetFiber, + nativeEvent, + nativeEventTarget, + eventSystemFlags, + ) { + if (enableFlareAPI) { + var previousInstance = currentInstance; + var previousTimeStamp = currentTimeStamp; + var previousDocument = currentDocument; + var previousPropagationBehavior = currentPropagationBehavior; + currentPropagationBehavior = DoNotPropagateToNextResponder; // nodeType 9 is DOCUMENT_NODE + + currentDocument = + nativeEventTarget.nodeType === 9 ? nativeEventTarget : nativeEventTarget.ownerDocument; // We might want to control timeStamp another way here + + currentTimeStamp = nativeEvent.timeStamp; + + try { + batchedEventUpdates(function () { + traverseAndHandleEventResponderInstances( + topLevelType, + targetFiber, + nativeEvent, + nativeEventTarget, + eventSystemFlags, + ); + }); + } finally { + currentInstance = previousInstance; + currentTimeStamp = previousTimeStamp; + currentDocument = previousDocument; + currentPropagationBehavior = previousPropagationBehavior; + } + } + } + function addRootEventTypesForResponderInstance(responderInstance, rootEventTypes) { + for (var i = 0; i < rootEventTypes.length; i++) { + var rootEventType = rootEventTypes[i]; + registerRootEventType(rootEventType, responderInstance); + } + } + + function registerRootEventType(rootEventType, eventResponderInstance) { + var rootEventResponderInstances = rootEventTypesToEventResponderInstances.get(rootEventType); + + if (rootEventResponderInstances === undefined) { + rootEventResponderInstances = new Set(); + rootEventTypesToEventResponderInstances.set(rootEventType, rootEventResponderInstances); + } + + var rootEventTypesSet = eventResponderInstance.rootEventTypes; + + if (rootEventTypesSet === null) { + rootEventTypesSet = eventResponderInstance.rootEventTypes = new Set(); + } + + if (!!rootEventTypesSet.has(rootEventType)) { + { + throw Error( + 'addRootEventTypes() found a duplicate root event type of "' + + rootEventType + + '". This might be because the event type exists in the event responder "rootEventTypes" array or because of a previous addRootEventTypes() using this root event type.', + ); + } + } + + rootEventTypesSet.add(rootEventType); + rootEventResponderInstances.add(eventResponderInstance); + } + + // A reserved attribute. + // It is handled by React separately and shouldn't be written to the DOM. + var RESERVED = 0; // A simple string attribute. + // Attributes that aren't in the whitelist are presumed to have this type. + + var STRING = 1; // A string attribute that accepts booleans in React. In HTML, these are called + // "enumerated" attributes with "true" and "false" as possible values. + // When true, it should be set to a "true" string. + // When false, it should be set to a "false" string. + + var BOOLEANISH_STRING = 2; // A real boolean attribute. + // When true, it should be present (set either to an empty string or its name). + // When false, it should be omitted. + + var BOOLEAN = 3; // An attribute that can be used as a flag as well as with a value. + // When true, it should be present (set either to an empty string or its name). + // When false, it should be omitted. + // For any other value, should be present with that value. + + var OVERLOADED_BOOLEAN = 4; // An attribute that must be numeric or parse as a numeric. + // When falsy, it should be removed. + + var NUMERIC = 5; // An attribute that must be positive numeric or parse as a positive numeric. + // When falsy, it should be removed. + + var POSITIVE_NUMERIC = 6; + + /* eslint-disable max-len */ + var ATTRIBUTE_NAME_START_CHAR = + ':A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD'; + /* eslint-enable max-len */ + + var ATTRIBUTE_NAME_CHAR = + ATTRIBUTE_NAME_START_CHAR + '\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040'; + + var ROOT_ATTRIBUTE_NAME = 'data-reactroot'; + var VALID_ATTRIBUTE_NAME_REGEX = new RegExp( + '^[' + ATTRIBUTE_NAME_START_CHAR + '][' + ATTRIBUTE_NAME_CHAR + ']*$', + ); + var hasOwnProperty = Object.prototype.hasOwnProperty; + var illegalAttributeNameCache = {}; + var validatedAttributeNameCache = {}; + function isAttributeNameSafe(attributeName) { + if (hasOwnProperty.call(validatedAttributeNameCache, attributeName)) { + return true; + } + + if (hasOwnProperty.call(illegalAttributeNameCache, attributeName)) { + return false; + } + + if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) { + validatedAttributeNameCache[attributeName] = true; + return true; + } + + illegalAttributeNameCache[attributeName] = true; + + { + warning$1(false, 'Invalid attribute name: `%s`', attributeName); + } + + return false; + } + function shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag) { + if (propertyInfo !== null) { + return propertyInfo.type === RESERVED; + } + + if (isCustomComponentTag) { + return false; + } + + if ( + name.length > 2 && + (name[0] === 'o' || name[0] === 'O') && + (name[1] === 'n' || name[1] === 'N') + ) { + return true; + } + + return false; + } + function shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag) { + if (propertyInfo !== null && propertyInfo.type === RESERVED) { + return false; + } + + switch (typeof value) { + case 'function': // $FlowIssue symbol is perfectly valid here + + case 'symbol': + // eslint-disable-line + return true; + + case 'boolean': { + if (isCustomComponentTag) { + return false; + } + + if (propertyInfo !== null) { + return !propertyInfo.acceptsBooleans; + } else { + var prefix = name.toLowerCase().slice(0, 5); + return prefix !== 'data-' && prefix !== 'aria-'; + } + } + + default: + return false; + } + } + function shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag) { + if (value === null || typeof value === 'undefined') { + return true; + } + + if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag)) { + return true; + } + + if (isCustomComponentTag) { + return false; + } + + if (propertyInfo !== null) { + switch (propertyInfo.type) { + case BOOLEAN: + return !value; + + case OVERLOADED_BOOLEAN: + return value === false; + + case NUMERIC: + return isNaN(value); + + case POSITIVE_NUMERIC: + return isNaN(value) || value < 1; + } + } + + return false; + } + function getPropertyInfo(name) { + return properties.hasOwnProperty(name) ? properties[name] : null; + } + + function PropertyInfoRecord( + name, + type, + mustUseProperty, + attributeName, + attributeNamespace, + sanitizeURL, + ) { + this.acceptsBooleans = + type === BOOLEANISH_STRING || type === BOOLEAN || type === OVERLOADED_BOOLEAN; + this.attributeName = attributeName; + this.attributeNamespace = attributeNamespace; + this.mustUseProperty = mustUseProperty; + this.propertyName = name; + this.type = type; + this.sanitizeURL = sanitizeURL; + } // When adding attributes to this list, be sure to also add them to + // the `possibleStandardNames` module to ensure casing and incorrect + // name warnings. + + var properties = {}; // These props are reserved by React. They shouldn't be written to the DOM. + + [ + 'children', + 'dangerouslySetInnerHTML', // TODO: This prevents the assignment of defaultValue to regular + // elements (not just inputs). Now that ReactDOMInput assigns to the + // defaultValue property -- do we need this? + 'defaultValue', + 'defaultChecked', + 'innerHTML', + 'suppressContentEditableWarning', + 'suppressHydrationWarning', + 'style', + ].forEach(function (name) { + properties[name] = new PropertyInfoRecord( + name, + RESERVED, + false, // mustUseProperty + name, // attributeName + null, // attributeNamespace + false, + ); + }); // A few React string attributes have a different name. + // This is a mapping from React prop names to the attribute names. + + [ + ['acceptCharset', 'accept-charset'], + ['className', 'class'], + ['htmlFor', 'for'], + ['httpEquiv', 'http-equiv'], + ].forEach(function (_ref) { + var name = _ref[0], + attributeName = _ref[1]; + properties[name] = new PropertyInfoRecord( + name, + STRING, + false, // mustUseProperty + attributeName, // attributeName + null, // attributeNamespace + false, + ); + }); // These are "enumerated" HTML attributes that accept "true" and "false". + // In React, we let users pass `true` and `false` even though technically + // these aren't boolean attributes (they are coerced to strings). + + ['contentEditable', 'draggable', 'spellCheck', 'value'].forEach(function (name) { + properties[name] = new PropertyInfoRecord( + name, + BOOLEANISH_STRING, + false, // mustUseProperty + name.toLowerCase(), // attributeName + null, // attributeNamespace + false, + ); + }); // These are "enumerated" SVG attributes that accept "true" and "false". + // In React, we let users pass `true` and `false` even though technically + // these aren't boolean attributes (they are coerced to strings). + // Since these are SVG attributes, their attribute names are case-sensitive. + + ['autoReverse', 'externalResourcesRequired', 'focusable', 'preserveAlpha'].forEach(function (name) { + properties[name] = new PropertyInfoRecord( + name, + BOOLEANISH_STRING, + false, // mustUseProperty + name, // attributeName + null, // attributeNamespace + false, + ); + }); // These are HTML boolean attributes. + + [ + 'allowFullScreen', + 'async', // Note: there is a special case that prevents it from being written to the DOM + // on the client side because the browsers are inconsistent. Instead we call focus(). + 'autoFocus', + 'autoPlay', + 'controls', + 'default', + 'defer', + 'disabled', + 'disablePictureInPicture', + 'formNoValidate', + 'hidden', + 'loop', + 'noModule', + 'noValidate', + 'open', + 'playsInline', + 'readOnly', + 'required', + 'reversed', + 'scoped', + 'seamless', // Microdata + 'itemScope', + ].forEach(function (name) { + properties[name] = new PropertyInfoRecord( + name, + BOOLEAN, + false, // mustUseProperty + name.toLowerCase(), // attributeName + null, // attributeNamespace + false, + ); + }); // These are the few React props that we set as DOM properties + // rather than attributes. These are all booleans. + + [ + 'checked', // Note: `option.selected` is not updated if `select.multiple` is + // disabled with `removeAttribute`. We have special logic for handling this. + 'multiple', + 'muted', + 'selected', + ].forEach(function (name) { + properties[name] = new PropertyInfoRecord( + name, + BOOLEAN, + true, // mustUseProperty + name, // attributeName + null, // attributeNamespace + false, + ); + }); // These are HTML attributes that are "overloaded booleans": they behave like + // booleans, but can also accept a string value. + + ['capture', 'download'].forEach(function (name) { + properties[name] = new PropertyInfoRecord( + name, + OVERLOADED_BOOLEAN, + false, // mustUseProperty + name, // attributeName + null, // attributeNamespace + false, + ); + }); // These are HTML attributes that must be positive numbers. + + ['cols', 'rows', 'size', 'span'].forEach(function (name) { + properties[name] = new PropertyInfoRecord( + name, + POSITIVE_NUMERIC, + false, // mustUseProperty + name, // attributeName + null, // attributeNamespace + false, + ); + }); // These are HTML attributes that must be numbers. + + ['rowSpan', 'start'].forEach(function (name) { + properties[name] = new PropertyInfoRecord( + name, + NUMERIC, + false, // mustUseProperty + name.toLowerCase(), // attributeName + null, // attributeNamespace + false, + ); + }); + var CAMELIZE = /[\-\:]([a-z])/g; + + var capitalize = function (token) { + return token[1].toUpperCase(); + }; // This is a list of all SVG attributes that need special casing, namespacing, + // or boolean value assignment. Regular attributes that just accept strings + // and have the same names are omitted, just like in the HTML whitelist. + // Some of these attributes can be hard to find. This list was created by + // scrapping the MDN documentation. + + [ + 'accent-height', + 'alignment-baseline', + 'arabic-form', + 'baseline-shift', + 'cap-height', + 'clip-path', + 'clip-rule', + 'color-interpolation', + 'color-interpolation-filters', + 'color-profile', + 'color-rendering', + 'dominant-baseline', + 'enable-background', + 'fill-opacity', + 'fill-rule', + 'flood-color', + 'flood-opacity', + 'font-family', + 'font-size', + 'font-size-adjust', + 'font-stretch', + 'font-style', + 'font-variant', + 'font-weight', + 'glyph-name', + 'glyph-orientation-horizontal', + 'glyph-orientation-vertical', + 'horiz-adv-x', + 'horiz-origin-x', + 'image-rendering', + 'letter-spacing', + 'lighting-color', + 'marker-end', + 'marker-mid', + 'marker-start', + 'overline-position', + 'overline-thickness', + 'paint-order', + 'panose-1', + 'pointer-events', + 'rendering-intent', + 'shape-rendering', + 'stop-color', + 'stop-opacity', + 'strikethrough-position', + 'strikethrough-thickness', + 'stroke-dasharray', + 'stroke-dashoffset', + 'stroke-linecap', + 'stroke-linejoin', + 'stroke-miterlimit', + 'stroke-opacity', + 'stroke-width', + 'text-anchor', + 'text-decoration', + 'text-rendering', + 'underline-position', + 'underline-thickness', + 'unicode-bidi', + 'unicode-range', + 'units-per-em', + 'v-alphabetic', + 'v-hanging', + 'v-ideographic', + 'v-mathematical', + 'vector-effect', + 'vert-adv-y', + 'vert-origin-x', + 'vert-origin-y', + 'word-spacing', + 'writing-mode', + 'xmlns:xlink', + 'x-height', + ].forEach(function (attributeName) { + var name = attributeName.replace(CAMELIZE, capitalize); + properties[name] = new PropertyInfoRecord( + name, + STRING, + false, // mustUseProperty + attributeName, + null, // attributeNamespace + false, + ); + }); // String SVG attributes with the xlink namespace. + + ['xlink:actuate', 'xlink:arcrole', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type'].forEach( + function (attributeName) { + var name = attributeName.replace(CAMELIZE, capitalize); + properties[name] = new PropertyInfoRecord( + name, + STRING, + false, // mustUseProperty + attributeName, + 'http://www.w3.org/1999/xlink', + false, + ); + }, + ); // String SVG attributes with the xml namespace. + + ['xml:base', 'xml:lang', 'xml:space'].forEach(function (attributeName) { + var name = attributeName.replace(CAMELIZE, capitalize); + properties[name] = new PropertyInfoRecord( + name, + STRING, + false, // mustUseProperty + attributeName, + 'http://www.w3.org/XML/1998/namespace', + false, + ); + }); // These attribute exists both in HTML and SVG. + // The attribute name is case-sensitive in SVG so we can't just use + // the React name like we do for attributes that exist only in HTML. + + ['tabIndex', 'crossOrigin'].forEach(function (attributeName) { + properties[attributeName] = new PropertyInfoRecord( + attributeName, + STRING, + false, // mustUseProperty + attributeName.toLowerCase(), // attributeName + null, // attributeNamespace + false, + ); + }); // These attributes accept URLs. These must not allow javascript: URLS. + // These will also need to accept Trusted Types object in the future. + + var xlinkHref = 'xlinkHref'; + properties[xlinkHref] = new PropertyInfoRecord( + 'xlinkHref', + STRING, + false, // mustUseProperty + 'xlink:href', + 'http://www.w3.org/1999/xlink', + true, + ); + ['src', 'href', 'action', 'formAction'].forEach(function (attributeName) { + properties[attributeName] = new PropertyInfoRecord( + attributeName, + STRING, + false, // mustUseProperty + attributeName.toLowerCase(), // attributeName + null, // attributeNamespace + true, + ); + }); + + var ReactDebugCurrentFrame$1 = null; + + { + ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame; + } // A javascript: URL can contain leading C0 control or \u0020 SPACE, + // and any newline or tab are filtered out as if they're not part of the URL. + // https://url.spec.whatwg.org/#url-parsing + // Tab or newline are defined as \r\n\t: + // https://infra.spec.whatwg.org/#ascii-tab-or-newline + // A C0 control is a code point in the range \u0000 NULL to \u001F + // INFORMATION SEPARATOR ONE, inclusive: + // https://infra.spec.whatwg.org/#c0-control-or-space + + /* eslint-disable max-len */ + + var isJavaScriptProtocol = + /^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i; + var didWarn = false; + + function sanitizeURL(url) { + if (disableJavaScriptURLs) { + if (!!isJavaScriptProtocol.test(url)) { + { + throw Error( + 'React has blocked a javascript: URL as a security precaution.' + + ReactDebugCurrentFrame$1.getStackAddendum(), + ); + } + } + } else if (true && !didWarn && isJavaScriptProtocol.test(url)) { + didWarn = true; + warning$1( + false, + 'A future version of React will block javascript: URLs as a security precaution. ' + + 'Use event handlers instead if you can. If you need to generate unsafe HTML try ' + + 'using dangerouslySetInnerHTML instead. React was passed %s.', + JSON.stringify(url), + ); + } + } + + // Flow does not allow string concatenation of most non-string types. To work + // around this limitation, we use an opaque type that can only be obtained by + // passing the value through getToStringValue first. + function toString(value) { + return '' + value; + } + function getToStringValue(value) { + switch (typeof value) { + case 'boolean': + case 'number': + case 'object': + case 'string': + case 'undefined': + return value; + + default: + // function, symbol are assigned as empty strings + return ''; + } + } + /** Trusted value is a wrapper for "safe" values which can be assigned to DOM execution sinks. */ + + /** + * We allow passing objects with toString method as element attributes or in dangerouslySetInnerHTML + * and we do validations that the value is safe. Once we do validation we want to use the validated + * value instead of the object (because object.toString may return something else on next call). + * + * If application uses Trusted Types we don't stringify trusted values, but preserve them as objects. + */ + var toStringOrTrustedType = toString; + + if (enableTrustedTypesIntegration && typeof trustedTypes !== 'undefined') { + toStringOrTrustedType = function (value) { + if ( + typeof value === 'object' && + (trustedTypes.isHTML(value) || + trustedTypes.isScript(value) || + trustedTypes.isScriptURL(value) || + /* TrustedURLs are deprecated and will be removed soon: https://github.com/WICG/trusted-types/pull/204 */ + (trustedTypes.isURL && trustedTypes.isURL(value))) + ) { + // Pass Trusted Types through. + return value; + } + + return toString(value); + }; + } + + /** + * Set attribute for a node. The attribute value can be either string or + * Trusted value (if application uses Trusted Types). + */ + function setAttribute(node, attributeName, attributeValue) { + node.setAttribute(attributeName, attributeValue); + } + /** + * Set attribute with namespace for a node. The attribute value can be either string or + * Trusted value (if application uses Trusted Types). + */ + + function setAttributeNS(node, attributeNamespace, attributeName, attributeValue) { + node.setAttributeNS(attributeNamespace, attributeName, attributeValue); + } + + /** + * Get the value for a property on a node. Only used in DEV for SSR validation. + * The "expected" argument is used as a hint of what the expected value is. + * Some properties have multiple equivalent values. + */ + function getValueForProperty(node, name, expected, propertyInfo) { + { + if (propertyInfo.mustUseProperty) { + var propertyName = propertyInfo.propertyName; + return node[propertyName]; + } else { + if (!disableJavaScriptURLs && propertyInfo.sanitizeURL) { + // If we haven't fully disabled javascript: URLs, and if + // the hydration is successful of a javascript: URL, we + // still want to warn on the client. + sanitizeURL('' + expected); + } + + var attributeName = propertyInfo.attributeName; + var stringValue = null; + + if (propertyInfo.type === OVERLOADED_BOOLEAN) { + if (node.hasAttribute(attributeName)) { + var value = node.getAttribute(attributeName); + + if (value === '') { + return true; + } + + if (shouldRemoveAttribute(name, expected, propertyInfo, false)) { + return value; + } + + if (value === '' + expected) { + return expected; + } + + return value; + } + } else if (node.hasAttribute(attributeName)) { + if (shouldRemoveAttribute(name, expected, propertyInfo, false)) { + // We had an attribute but shouldn't have had one, so read it + // for the error message. + return node.getAttribute(attributeName); + } + + if (propertyInfo.type === BOOLEAN) { + // If this was a boolean, it doesn't matter what the value is + // the fact that we have it is the same as the expected. + return expected; + } // Even if this property uses a namespace we use getAttribute + // because we assume its namespaced name is the same as our config. + // To use getAttributeNS we need the local name which we don't have + // in our config atm. + + stringValue = node.getAttribute(attributeName); + } + + if (shouldRemoveAttribute(name, expected, propertyInfo, false)) { + return stringValue === null ? expected : stringValue; + } else if (stringValue === '' + expected) { + return expected; + } else { + return stringValue; + } + } + } + } + /** + * Get the value for a attribute on a node. Only used in DEV for SSR validation. + * The third argument is used as a hint of what the expected value is. Some + * attributes have multiple equivalent values. + */ + + function getValueForAttribute(node, name, expected) { + { + if (!isAttributeNameSafe(name)) { + return; + } + + if (!node.hasAttribute(name)) { + return expected === undefined ? undefined : null; + } + + var value = node.getAttribute(name); + + if (value === '' + expected) { + return expected; + } + + return value; + } + } + /** + * Sets the value for a property on a node. + * + * @param {DOMElement} node + * @param {string} name + * @param {*} value + */ + + function setValueForProperty(node, name, value, isCustomComponentTag) { + var propertyInfo = getPropertyInfo(name); + + if (shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag)) { + return; + } + + if (shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag)) { + value = null; + } // If the prop isn't in the special list, treat it as a simple attribute. + + if (isCustomComponentTag || propertyInfo === null) { + if (isAttributeNameSafe(name)) { + var _attributeName = name; + + if (value === null) { + node.removeAttribute(_attributeName); + } else { + setAttribute(node, _attributeName, toStringOrTrustedType(value)); + } + } + + return; + } + + var mustUseProperty = propertyInfo.mustUseProperty; + + if (mustUseProperty) { + var propertyName = propertyInfo.propertyName; + + if (value === null) { + var type = propertyInfo.type; + node[propertyName] = type === BOOLEAN ? false : ''; + } else { + // Contrary to `setAttribute`, object properties are properly + // `toString`ed by IE8/9. + node[propertyName] = value; + } + + return; + } // The rest are treated as attributes with special cases. + + var attributeName = propertyInfo.attributeName, + attributeNamespace = propertyInfo.attributeNamespace; + + if (value === null) { + node.removeAttribute(attributeName); + } else { + var _type = propertyInfo.type; + var attributeValue; + + if (_type === BOOLEAN || (_type === OVERLOADED_BOOLEAN && value === true)) { + // If attribute type is boolean, we know for sure it won't be an execution sink + // and we won't require Trusted Type here. + attributeValue = ''; + } else { + // `setAttribute` with objects becomes only `[object]` in IE8/9, + // ('' + value) makes it output the correct toString()-value. + attributeValue = toStringOrTrustedType(value); + + if (propertyInfo.sanitizeURL) { + sanitizeURL(attributeValue.toString()); + } + } + + if (attributeNamespace) { + setAttributeNS(node, attributeNamespace, attributeName, attributeValue); + } else { + setAttribute(node, attributeName, attributeValue); + } + } + } + + var ReactDebugCurrentFrame$2 = null; + var ReactControlledValuePropTypes = { + checkPropTypes: null, + }; + + { + ReactDebugCurrentFrame$2 = ReactSharedInternals.ReactDebugCurrentFrame; + var hasReadOnlyValue = { + button: true, + checkbox: true, + image: true, + hidden: true, + radio: true, + reset: true, + submit: true, + }; + var propTypes = { + value: function (props, propName, componentName) { + if ( + hasReadOnlyValue[props.type] || + props.onChange || + props.readOnly || + props.disabled || + props[propName] == null || + (enableFlareAPI && props.listeners) + ) { + return null; + } + + return new Error( + 'You provided a `value` prop to a form field without an ' + + '`onChange` handler. This will render a read-only field. If ' + + 'the field should be mutable use `defaultValue`. Otherwise, ' + + 'set either `onChange` or `readOnly`.', + ); + }, + checked: function (props, propName, componentName) { + if ( + props.onChange || + props.readOnly || + props.disabled || + props[propName] == null || + (enableFlareAPI && props.listeners) + ) { + return null; + } + + return new Error( + 'You provided a `checked` prop to a form field without an ' + + '`onChange` handler. This will render a read-only field. If ' + + 'the field should be mutable use `defaultChecked`. Otherwise, ' + + 'set either `onChange` or `readOnly`.', + ); + }, + }; + /** + * Provide a linked `value` attribute for controlled forms. You should not use + * this outside of the ReactDOM controlled form components. + */ + + ReactControlledValuePropTypes.checkPropTypes = function (tagName, props) { + checkPropTypes(propTypes, props, 'prop', tagName, ReactDebugCurrentFrame$2.getStackAddendum); + }; + } + + function isCheckable(elem) { + var type = elem.type; + var nodeName = elem.nodeName; + return ( + nodeName && nodeName.toLowerCase() === 'input' && (type === 'checkbox' || type === 'radio') + ); + } + + function getTracker(node) { + return node._valueTracker; + } + + function detachTracker(node) { + node._valueTracker = null; + } + + function getValueFromNode(node) { + var value = ''; + + if (!node) { + return value; + } + + if (isCheckable(node)) { + value = node.checked ? 'true' : 'false'; + } else { + value = node.value; + } + + return value; + } + + function trackValueOnNode(node) { + var valueField = isCheckable(node) ? 'checked' : 'value'; + var descriptor = Object.getOwnPropertyDescriptor(node.constructor.prototype, valueField); + var currentValue = '' + node[valueField]; // if someone has already defined a value or Safari, then bail + // and don't track value will cause over reporting of changes, + // but it's better then a hard failure + // (needed for certain tests that spyOn input values and Safari) + + if ( + node.hasOwnProperty(valueField) || + typeof descriptor === 'undefined' || + typeof descriptor.get !== 'function' || + typeof descriptor.set !== 'function' + ) { + return; + } + + var get = descriptor.get, + set = descriptor.set; + Object.defineProperty(node, valueField, { + configurable: true, + get: function () { + return get.call(this); + }, + set: function (value) { + currentValue = '' + value; + set.call(this, value); + }, + }); // We could've passed this the first time + // but it triggers a bug in IE11 and Edge 14/15. + // Calling defineProperty() again should be equivalent. + // https://github.com/facebook/react/issues/11768 + + Object.defineProperty(node, valueField, { + enumerable: descriptor.enumerable, + }); + var tracker = { + getValue: function () { + return currentValue; + }, + setValue: function (value) { + currentValue = '' + value; + }, + stopTracking: function () { + detachTracker(node); + delete node[valueField]; + }, + }; + return tracker; + } + + function track(node) { + if (getTracker(node)) { + return; + } // TODO: Once it's just Fiber we can move this to node._wrapperState + + node._valueTracker = trackValueOnNode(node); + } + function updateValueIfChanged(node) { + if (!node) { + return false; + } + + var tracker = getTracker(node); // if there is no tracker at this point it's unlikely + // that trying again will succeed + + if (!tracker) { + return true; + } + + var lastValue = tracker.getValue(); + var nextValue = getValueFromNode(node); + + if (nextValue !== lastValue) { + tracker.setValue(nextValue); + return true; + } + + return false; + } + + // TODO: direct imports like some-package/src/* are bad. Fix me. + var didWarnValueDefaultValue = false; + var didWarnCheckedDefaultChecked = false; + var didWarnControlledToUncontrolled = false; + var didWarnUncontrolledToControlled = false; + + function isControlled(props) { + var usesChecked = props.type === 'checkbox' || props.type === 'radio'; + return usesChecked ? props.checked != null : props.value != null; + } + /** + * Implements an <input> host component that allows setting these optional + * props: `checked`, `value`, `defaultChecked`, and `defaultValue`. + * + * If `checked` or `value` are not supplied (or null/undefined), user actions + * that affect the checked state or value will trigger updates to the element. + * + * If they are supplied (and not null/undefined), the rendered element will not + * trigger updates to the element. Instead, the props must change in order for + * the rendered element to be updated. + * + * The rendered element will be initialized as unchecked (or `defaultChecked`) + * with an empty value (or `defaultValue`). + * + * See http://www.w3.org/TR/2012/WD-html5-20121025/the-input-element.html + */ + + function getHostProps(element, props) { + var node = element; + var checked = props.checked; + + var hostProps = _assign({}, props, { + defaultChecked: undefined, + defaultValue: undefined, + value: undefined, + checked: checked != null ? checked : node._wrapperState.initialChecked, + }); + + return hostProps; + } + function initWrapperState(element, props) { + { + ReactControlledValuePropTypes.checkPropTypes('input', props); + + if ( + props.checked !== undefined && + props.defaultChecked !== undefined && + !didWarnCheckedDefaultChecked + ) { + warning$1( + false, + '%s contains an input of type %s with both checked and defaultChecked props. ' + + 'Input elements must be either controlled or uncontrolled ' + + '(specify either the checked prop, or the defaultChecked prop, but not ' + + 'both). Decide between using a controlled or uncontrolled input ' + + 'element and remove one of these props. More info: ' + + 'https://fb.me/react-controlled-components', + getCurrentFiberOwnerNameInDevOrNull() || 'A component', + props.type, + ); + didWarnCheckedDefaultChecked = true; + } + + if ( + props.value !== undefined && + props.defaultValue !== undefined && + !didWarnValueDefaultValue + ) { + warning$1( + false, + '%s contains an input of type %s with both value and defaultValue props. ' + + 'Input elements must be either controlled or uncontrolled ' + + '(specify either the value prop, or the defaultValue prop, but not ' + + 'both). Decide between using a controlled or uncontrolled input ' + + 'element and remove one of these props. More info: ' + + 'https://fb.me/react-controlled-components', + getCurrentFiberOwnerNameInDevOrNull() || 'A component', + props.type, + ); + didWarnValueDefaultValue = true; + } + } + + var node = element; + var defaultValue = props.defaultValue == null ? '' : props.defaultValue; + node._wrapperState = { + initialChecked: props.checked != null ? props.checked : props.defaultChecked, + initialValue: getToStringValue(props.value != null ? props.value : defaultValue), + controlled: isControlled(props), + }; + } + function updateChecked(element, props) { + var node = element; + var checked = props.checked; + + if (checked != null) { + setValueForProperty(node, 'checked', checked, false); + } + } + function updateWrapper(element, props) { + var node = element; + + { + var controlled = isControlled(props); + + if (!node._wrapperState.controlled && controlled && !didWarnUncontrolledToControlled) { + warning$1( + false, + 'A component is changing an uncontrolled input of type %s to be controlled. ' + + 'Input elements should not switch from uncontrolled to controlled (or vice versa). ' + + 'Decide between using a controlled or uncontrolled input ' + + 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components', + props.type, + ); + didWarnUncontrolledToControlled = true; + } + + if (node._wrapperState.controlled && !controlled && !didWarnControlledToUncontrolled) { + warning$1( + false, + 'A component is changing a controlled input of type %s to be uncontrolled. ' + + 'Input elements should not switch from controlled to uncontrolled (or vice versa). ' + + 'Decide between using a controlled or uncontrolled input ' + + 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components', + props.type, + ); + didWarnControlledToUncontrolled = true; + } + } + + updateChecked(element, props); + var value = getToStringValue(props.value); + var type = props.type; + + if (value != null) { + if (type === 'number') { + if ( + (value === 0 && node.value === '') || // We explicitly want to coerce to number here if possible. + // eslint-disable-next-line + node.value != value + ) { + node.value = toString(value); + } + } else if (node.value !== toString(value)) { + node.value = toString(value); + } + } else if (type === 'submit' || type === 'reset') { + // Submit/reset inputs need the attribute removed completely to avoid + // blank-text buttons. + node.removeAttribute('value'); + return; + } + + if (disableInputAttributeSyncing) { + // When not syncing the value attribute, React only assigns a new value + // whenever the defaultValue React prop has changed. When not present, + // React does nothing + if (props.hasOwnProperty('defaultValue')) { + setDefaultValue(node, props.type, getToStringValue(props.defaultValue)); + } + } else { + // When syncing the value attribute, the value comes from a cascade of + // properties: + // 1. The value React property + // 2. The defaultValue React property + // 3. Otherwise there should be no change + if (props.hasOwnProperty('value')) { + setDefaultValue(node, props.type, value); + } else if (props.hasOwnProperty('defaultValue')) { + setDefaultValue(node, props.type, getToStringValue(props.defaultValue)); + } + } + + if (disableInputAttributeSyncing) { + // When not syncing the checked attribute, the attribute is directly + // controllable from the defaultValue React property. It needs to be + // updated as new props come in. + if (props.defaultChecked == null) { + node.removeAttribute('checked'); + } else { + node.defaultChecked = !!props.defaultChecked; + } + } else { + // When syncing the checked attribute, it only changes when it needs + // to be removed, such as transitioning from a checkbox into a text input + if (props.checked == null && props.defaultChecked != null) { + node.defaultChecked = !!props.defaultChecked; + } + } + } + function postMountWrapper(element, props, isHydrating) { + var node = element; // Do not assign value if it is already set. This prevents user text input + // from being lost during SSR hydration. + + if (props.hasOwnProperty('value') || props.hasOwnProperty('defaultValue')) { + var type = props.type; + var isButton = type === 'submit' || type === 'reset'; // Avoid setting value attribute on submit/reset inputs as it overrides the + // default value provided by the browser. See: #12872 + + if (isButton && (props.value === undefined || props.value === null)) { + return; + } + + var initialValue = toString(node._wrapperState.initialValue); // Do not assign value if it is already set. This prevents user text input + // from being lost during SSR hydration. + + if (!isHydrating) { + if (disableInputAttributeSyncing) { + var value = getToStringValue(props.value); // When not syncing the value attribute, the value property points + // directly to the React prop. Only assign it if it exists. + + if (value != null) { + // Always assign on buttons so that it is possible to assign an + // empty string to clear button text. + // + // Otherwise, do not re-assign the value property if is empty. This + // potentially avoids a DOM write and prevents Firefox (~60.0.1) from + // prematurely marking required inputs as invalid. Equality is compared + // to the current value in case the browser provided value is not an + // empty string. + if (isButton || value !== node.value) { + node.value = toString(value); + } + } + } else { + // When syncing the value attribute, the value property should use + // the wrapperState._initialValue property. This uses: + // + // 1. The value React property when present + // 2. The defaultValue React property when present + // 3. An empty string + if (initialValue !== node.value) { + node.value = initialValue; + } + } + } + + if (disableInputAttributeSyncing) { + // When not syncing the value attribute, assign the value attribute + // directly from the defaultValue React property (when present) + var defaultValue = getToStringValue(props.defaultValue); + + if (defaultValue != null) { + node.defaultValue = toString(defaultValue); + } + } else { + // Otherwise, the value attribute is synchronized to the property, + // so we assign defaultValue to the same thing as the value property + // assignment step above. + node.defaultValue = initialValue; + } + } // Normally, we'd just do `node.checked = node.checked` upon initial mount, less this bug + // this is needed to work around a chrome bug where setting defaultChecked + // will sometimes influence the value of checked (even after detachment). + // Reference: https://bugs.chromium.org/p/chromium/issues/detail?id=608416 + // We need to temporarily unset name to avoid disrupting radio button groups. + + var name = node.name; + + if (name !== '') { + node.name = ''; + } + + if (disableInputAttributeSyncing) { + // When not syncing the checked attribute, the checked property + // never gets assigned. It must be manually set. We don't want + // to do this when hydrating so that existing user input isn't + // modified + if (!isHydrating) { + updateChecked(element, props); + } // Only assign the checked attribute if it is defined. This saves + // a DOM write when controlling the checked attribute isn't needed + // (text inputs, submit/reset) + + if (props.hasOwnProperty('defaultChecked')) { + node.defaultChecked = !node.defaultChecked; + node.defaultChecked = !!props.defaultChecked; + } + } else { + // When syncing the checked attribute, both the checked property and + // attribute are assigned at the same time using defaultChecked. This uses: + // + // 1. The checked React property when present + // 2. The defaultChecked React property when present + // 3. Otherwise, false + node.defaultChecked = !node.defaultChecked; + node.defaultChecked = !!node._wrapperState.initialChecked; + } + + if (name !== '') { + node.name = name; + } + } + function restoreControlledState$1(element, props) { + var node = element; + updateWrapper(node, props); + updateNamedCousins(node, props); + } + + function updateNamedCousins(rootNode, props) { + var name = props.name; + + if (props.type === 'radio' && name != null) { + var queryRoot = rootNode; + + while (queryRoot.parentNode) { + queryRoot = queryRoot.parentNode; + } // If `rootNode.form` was non-null, then we could try `form.elements`, + // but that sometimes behaves strangely in IE8. We could also try using + // `form.getElementsByName`, but that will only return direct children + // and won't include inputs that use the HTML5 `form=` attribute. Since + // the input might not even be in a form. It might not even be in the + // document. Let's just use the local `querySelectorAll` to ensure we don't + // miss anything. + + var group = queryRoot.querySelectorAll( + 'input[name=' + JSON.stringify('' + name) + '][type="radio"]', + ); + + for (var i = 0; i < group.length; i++) { + var otherNode = group[i]; + + if (otherNode === rootNode || otherNode.form !== rootNode.form) { + continue; + } // This will throw if radio buttons rendered by different copies of React + // and the same name are rendered into the same form (same as #1939). + // That's probably okay; we don't support it just as we don't support + // mixing React radio buttons with non-React ones. + + var otherProps = getFiberCurrentPropsFromNode$1(otherNode); + + if (!otherProps) { + { + throw Error( + 'ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.', + ); + } + } // We need update the tracked value on the named cousin since the value + // was changed but the input saw no event or value set + + updateValueIfChanged(otherNode); // If this is a controlled radio button group, forcing the input that + // was previously checked to update will cause it to be come re-checked + // as appropriate. + + updateWrapper(otherNode, otherProps); + } + } + } // In Chrome, assigning defaultValue to certain input types triggers input validation. + // For number inputs, the display value loses trailing decimal points. For email inputs, + // Chrome raises "The specified value <x> is not a valid email address". + // + // Here we check to see if the defaultValue has actually changed, avoiding these problems + // when the user is inputting text + // + // https://github.com/facebook/react/issues/7253 + + function setDefaultValue(node, type, value) { + if ( + // Focused number inputs synchronize on blur. See ChangeEventPlugin.js + type !== 'number' || + node.ownerDocument.activeElement !== node + ) { + if (value == null) { + node.defaultValue = toString(node._wrapperState.initialValue); + } else if (node.defaultValue !== toString(value)) { + node.defaultValue = toString(value); + } + } + } + + var didWarnSelectedSetOnOption = false; + var didWarnInvalidChild = false; + + function flattenChildren(children) { + var content = ''; // Flatten children. We'll warn if they are invalid + // during validateProps() which runs for hydration too. + // Note that this would throw on non-element objects. + // Elements are stringified (which is normally irrelevant + // but matters for <fbt>). + + React.Children.forEach(children, function (child) { + if (child == null) { + return; + } + + content += child; // Note: we don't warn about invalid children here. + // Instead, this is done separately below so that + // it happens during the hydration codepath too. + }); + return content; + } + /** + * Implements an <option> host component that warns when `selected` is set. + */ + + function validateProps(element, props) { + { + // This mirrors the codepath above, but runs for hydration too. + // Warn about invalid children here so that client and hydration are consistent. + // TODO: this seems like it could cause a DEV-only throw for hydration + // if children contains a non-element object. We should try to avoid that. + if (typeof props.children === 'object' && props.children !== null) { + React.Children.forEach(props.children, function (child) { + if (child == null) { + return; + } + + if (typeof child === 'string' || typeof child === 'number') { + return; + } + + if (typeof child.type !== 'string') { + return; + } + + if (!didWarnInvalidChild) { + didWarnInvalidChild = true; + warning$1(false, 'Only strings and numbers are supported as <option> children.'); + } + }); + } // TODO: Remove support for `selected` in <option>. + + if (props.selected != null && !didWarnSelectedSetOnOption) { + warning$1( + false, + 'Use the `defaultValue` or `value` props on <select> instead of ' + + 'setting `selected` on <option>.', + ); + didWarnSelectedSetOnOption = true; + } + } + } + function postMountWrapper$1(element, props) { + // value="" should make a value attribute (#6219) + if (props.value != null) { + element.setAttribute('value', toString(getToStringValue(props.value))); + } + } + function getHostProps$1(element, props) { + var hostProps = _assign( + { + children: undefined, + }, + props, + ); + + var content = flattenChildren(props.children); + + if (content) { + hostProps.children = content; + } + + return hostProps; + } + + // TODO: direct imports like some-package/src/* are bad. Fix me. + var didWarnValueDefaultValue$1; + + { + didWarnValueDefaultValue$1 = false; + } + + function getDeclarationErrorAddendum() { + var ownerName = getCurrentFiberOwnerNameInDevOrNull(); + + if (ownerName) { + return '\n\nCheck the render method of `' + ownerName + '`.'; + } + + return ''; + } + + var valuePropNames = ['value', 'defaultValue']; + /** + * Validation function for `value` and `defaultValue`. + */ + + function checkSelectPropTypes(props) { + ReactControlledValuePropTypes.checkPropTypes('select', props); + + for (var i = 0; i < valuePropNames.length; i++) { + var propName = valuePropNames[i]; + + if (props[propName] == null) { + continue; + } + + var isArray = Array.isArray(props[propName]); + + if (props.multiple && !isArray) { + warning$1( + false, + 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', + propName, + getDeclarationErrorAddendum(), + ); + } else if (!props.multiple && isArray) { + warning$1( + false, + 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', + propName, + getDeclarationErrorAddendum(), + ); + } + } + } + + function updateOptions(node, multiple, propValue, setDefaultSelected) { + var options = node.options; + + if (multiple) { + var selectedValues = propValue; + var selectedValue = {}; + + for (var i = 0; i < selectedValues.length; i++) { + // Prefix to avoid chaos with special keys. + selectedValue['$' + selectedValues[i]] = true; + } + + for (var _i = 0; _i < options.length; _i++) { + var selected = selectedValue.hasOwnProperty('$' + options[_i].value); + + if (options[_i].selected !== selected) { + options[_i].selected = selected; + } + + if (selected && setDefaultSelected) { + options[_i].defaultSelected = true; + } + } + } else { + // Do not set `select.value` as exact behavior isn't consistent across all + // browsers for all cases. + var _selectedValue = toString(getToStringValue(propValue)); + + var defaultSelected = null; + + for (var _i2 = 0; _i2 < options.length; _i2++) { + if (options[_i2].value === _selectedValue) { + options[_i2].selected = true; + + if (setDefaultSelected) { + options[_i2].defaultSelected = true; + } + + return; + } + + if (defaultSelected === null && !options[_i2].disabled) { + defaultSelected = options[_i2]; + } + } + + if (defaultSelected !== null) { + defaultSelected.selected = true; + } + } + } + /** + * Implements a <select> host component that allows optionally setting the + * props `value` and `defaultValue`. If `multiple` is false, the prop must be a + * stringable. If `multiple` is true, the prop must be an array of stringables. + * + * If `value` is not supplied (or null/undefined), user actions that change the + * selected option will trigger updates to the rendered options. + * + * If it is supplied (and not null/undefined), the rendered options will not + * update in response to user actions. Instead, the `value` prop must change in + * order for the rendered options to update. + * + * If `defaultValue` is provided, any options with the supplied values will be + * selected. + */ + + function getHostProps$2(element, props) { + return _assign({}, props, { + value: undefined, + }); + } + function initWrapperState$1(element, props) { + var node = element; + + { + checkSelectPropTypes(props); + } + + node._wrapperState = { + wasMultiple: !!props.multiple, + }; + + { + if ( + props.value !== undefined && + props.defaultValue !== undefined && + !didWarnValueDefaultValue$1 + ) { + warning$1( + false, + 'Select elements must be either controlled or uncontrolled ' + + '(specify either the value prop, or the defaultValue prop, but not ' + + 'both). Decide between using a controlled or uncontrolled select ' + + 'element and remove one of these props. More info: ' + + 'https://fb.me/react-controlled-components', + ); + didWarnValueDefaultValue$1 = true; + } + } + } + function postMountWrapper$2(element, props) { + var node = element; + node.multiple = !!props.multiple; + var value = props.value; + + if (value != null) { + updateOptions(node, !!props.multiple, value, false); + } else if (props.defaultValue != null) { + updateOptions(node, !!props.multiple, props.defaultValue, true); + } + } + function postUpdateWrapper(element, props) { + var node = element; + var wasMultiple = node._wrapperState.wasMultiple; + node._wrapperState.wasMultiple = !!props.multiple; + var value = props.value; + + if (value != null) { + updateOptions(node, !!props.multiple, value, false); + } else if (wasMultiple !== !!props.multiple) { + // For simplicity, reapply `defaultValue` if `multiple` is toggled. + if (props.defaultValue != null) { + updateOptions(node, !!props.multiple, props.defaultValue, true); + } else { + // Revert the select back to its default unselected state. + updateOptions(node, !!props.multiple, props.multiple ? [] : '', false); + } + } + } + function restoreControlledState$2(element, props) { + var node = element; + var value = props.value; + + if (value != null) { + updateOptions(node, !!props.multiple, value, false); + } + } + + var didWarnValDefaultVal = false; + + /** + * Implements a <textarea> host component that allows setting `value`, and + * `defaultValue`. This differs from the traditional DOM API because value is + * usually set as PCDATA children. + * + * If `value` is not supplied (or null/undefined), user actions that affect the + * value will trigger updates to the element. + * + * If `value` is supplied (and not null/undefined), the rendered element will + * not trigger updates to the element. Instead, the `value` prop must change in + * order for the rendered element to be updated. + * + * The rendered element will be initialized with an empty value, the prop + * `defaultValue` if specified, or the children content (deprecated). + */ + function getHostProps$3(element, props) { + var node = element; + + if (!(props.dangerouslySetInnerHTML == null)) { + { + throw Error('`dangerouslySetInnerHTML` does not make sense on <textarea>.'); + } + } // Always set children to the same thing. In IE9, the selection range will + // get reset if `textContent` is mutated. We could add a check in setTextContent + // to only set the value if/when the value differs from the node value (which would + // completely solve this IE9 bug), but Sebastian+Sophie seemed to like this + // solution. The value can be a boolean or object so that's why it's forced + // to be a string. + + var hostProps = _assign({}, props, { + value: undefined, + defaultValue: undefined, + children: toString(node._wrapperState.initialValue), + }); + + return hostProps; + } + function initWrapperState$2(element, props) { + var node = element; + + { + ReactControlledValuePropTypes.checkPropTypes('textarea', props); + + if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValDefaultVal) { + warning$1( + false, + '%s contains a textarea with both value and defaultValue props. ' + + 'Textarea elements must be either controlled or uncontrolled ' + + '(specify either the value prop, or the defaultValue prop, but not ' + + 'both). Decide between using a controlled or uncontrolled textarea ' + + 'and remove one of these props. More info: ' + + 'https://fb.me/react-controlled-components', + getCurrentFiberOwnerNameInDevOrNull() || 'A component', + ); + didWarnValDefaultVal = true; + } + } + + var initialValue = props.value; // Only bother fetching default value if we're going to use it + + if (initialValue == null) { + var defaultValue = props.defaultValue; // TODO (yungsters): Remove support for children content in <textarea>. + + var children = props.children; + + if (children != null) { + { + warning$1( + false, + 'Use the `defaultValue` or `value` props instead of setting ' + 'children on <textarea>.', + ); + } + + if (!(defaultValue == null)) { + { + throw Error('If you supply `defaultValue` on a <textarea>, do not pass children.'); + } + } + + if (Array.isArray(children)) { + if (!(children.length <= 1)) { + { + throw Error('<textarea> can only have at most one child.'); + } + } + + children = children[0]; + } + + defaultValue = children; + } + + if (defaultValue == null) { + defaultValue = ''; + } + + initialValue = defaultValue; + } + + node._wrapperState = { + initialValue: getToStringValue(initialValue), + }; + } + function updateWrapper$1(element, props) { + var node = element; + var value = getToStringValue(props.value); + var defaultValue = getToStringValue(props.defaultValue); + + if (value != null) { + // Cast `value` to a string to ensure the value is set correctly. While + // browsers typically do this as necessary, jsdom doesn't. + var newValue = toString(value); // To avoid side effects (such as losing text selection), only set value if changed + + if (newValue !== node.value) { + node.value = newValue; + } + + if (props.defaultValue == null && node.defaultValue !== newValue) { + node.defaultValue = newValue; + } + } + + if (defaultValue != null) { + node.defaultValue = toString(defaultValue); + } + } + function postMountWrapper$3(element, props) { + var node = element; // This is in postMount because we need access to the DOM node, which is not + // available until after the component has mounted. + + var textContent = node.textContent; // Only set node.value if textContent is equal to the expected + // initial value. In IE10/IE11 there is a bug where the placeholder attribute + // will populate textContent as well. + // https://developer.microsoft.com/microsoft-edge/platform/issues/101525/ + + if (textContent === node._wrapperState.initialValue) { + if (textContent !== '' && textContent !== null) { + node.value = textContent; + } + } + } + function restoreControlledState$3(element, props) { + // DOM component is still mounted; update + updateWrapper$1(element, props); + } + + var HTML_NAMESPACE$1 = 'http://www.w3.org/1999/xhtml'; + var MATH_NAMESPACE = 'http://www.w3.org/1998/Math/MathML'; + var SVG_NAMESPACE = 'http://www.w3.org/2000/svg'; + var Namespaces = { + html: HTML_NAMESPACE$1, + mathml: MATH_NAMESPACE, + svg: SVG_NAMESPACE, + }; // Assumes there is no parent namespace. + + function getIntrinsicNamespace(type) { + switch (type) { + case 'svg': + return SVG_NAMESPACE; + + case 'math': + return MATH_NAMESPACE; + + default: + return HTML_NAMESPACE$1; + } + } + function getChildNamespace(parentNamespace, type) { + if (parentNamespace == null || parentNamespace === HTML_NAMESPACE$1) { + // No (or default) parent namespace: potential entry point. + return getIntrinsicNamespace(type); + } + + if (parentNamespace === SVG_NAMESPACE && type === 'foreignObject') { + // We're leaving SVG. + return HTML_NAMESPACE$1; + } // By default, pass namespace below. + + return parentNamespace; + } + + /* globals MSApp */ + + /** + * Create a function which has 'unsafe' privileges (required by windows8 apps) + */ + var createMicrosoftUnsafeLocalFunction = function (func) { + if (typeof MSApp !== 'undefined' && MSApp.execUnsafeLocalFunction) { + return function (arg0, arg1, arg2, arg3) { + MSApp.execUnsafeLocalFunction(function () { + return func(arg0, arg1, arg2, arg3); + }); + }; + } else { + return func; + } + }; + + var reusableSVGContainer; + /** + * Set the innerHTML property of a node + * + * @param {DOMElement} node + * @param {string} html + * @internal + */ + + var setInnerHTML = createMicrosoftUnsafeLocalFunction(function (node, html) { + if (node.namespaceURI === Namespaces.svg) { + { + if (enableTrustedTypesIntegration) { + // TODO: reconsider the text of this warning and when it should show + // before enabling the feature flag. + !(typeof trustedTypes === 'undefined') + ? warning$1( + false, + "Using 'dangerouslySetInnerHTML' in an svg element with " + + 'Trusted Types enabled in an Internet Explorer will cause ' + + 'the trusted value to be converted to string. Assigning string ' + + "to 'innerHTML' will throw an error if Trusted Types are enforced. " + + "You can try to wrap your svg element inside a div and use 'dangerouslySetInnerHTML' " + + 'on the enclosing div instead.', + ) + : void 0; + } + } + + if (!('innerHTML' in node)) { + // IE does not have innerHTML for SVG nodes, so instead we inject the + // new markup in a temp node and then move the child nodes across into + // the target node + reusableSVGContainer = reusableSVGContainer || document.createElement('div'); + reusableSVGContainer.innerHTML = '<svg>' + html.valueOf().toString() + '</svg>'; + var svgNode = reusableSVGContainer.firstChild; + + while (node.firstChild) { + node.removeChild(node.firstChild); + } + + while (svgNode.firstChild) { + node.appendChild(svgNode.firstChild); + } + + return; + } + } + + node.innerHTML = html; + }); + + /** + * HTML nodeType values that represent the type of the node + */ + var ELEMENT_NODE = 1; + var TEXT_NODE = 3; + var COMMENT_NODE = 8; + var DOCUMENT_NODE = 9; + var DOCUMENT_FRAGMENT_NODE = 11; + + /** + * Set the textContent property of a node. For text updates, it's faster + * to set the `nodeValue` of the Text node directly instead of using + * `.textContent` which will remove the existing node and create a new one. + * + * @param {DOMElement} node + * @param {string} text + * @internal + */ + + var setTextContent = function (node, text) { + if (text) { + var firstChild = node.firstChild; + + if (firstChild && firstChild === node.lastChild && firstChild.nodeType === TEXT_NODE) { + firstChild.nodeValue = text; + return; + } + } + + node.textContent = text; + }; + + // Do not use the below two methods directly! + // Instead use constants exported from DOMTopLevelEventTypes in ReactDOM. + // (It is the only module that is allowed to access these methods.) + function unsafeCastStringToDOMTopLevelType(topLevelType) { + return topLevelType; + } + function unsafeCastDOMTopLevelTypeToString(topLevelType) { + return topLevelType; + } + + /** + * Generate a mapping of standard vendor prefixes using the defined style property and event name. + * + * @param {string} styleProp + * @param {string} eventName + * @returns {object} + */ + + function makePrefixMap(styleProp, eventName) { + var prefixes = {}; + prefixes[styleProp.toLowerCase()] = eventName.toLowerCase(); + prefixes['Webkit' + styleProp] = 'webkit' + eventName; + prefixes['Moz' + styleProp] = 'moz' + eventName; + return prefixes; + } + /** + * A list of event names to a configurable list of vendor prefixes. + */ + + var vendorPrefixes = { + animationend: makePrefixMap('Animation', 'AnimationEnd'), + animationiteration: makePrefixMap('Animation', 'AnimationIteration'), + animationstart: makePrefixMap('Animation', 'AnimationStart'), + transitionend: makePrefixMap('Transition', 'TransitionEnd'), + }; + /** + * Event names that have already been detected and prefixed (if applicable). + */ + + var prefixedEventNames = {}; + /** + * Element to check for prefixes on. + */ + + var style = {}; + /** + * Bootstrap if a DOM exists. + */ + + if (canUseDOM) { + style = document.createElement('div').style; // On some platforms, in particular some releases of Android 4.x, + // the un-prefixed "animation" and "transition" properties are defined on the + // style object but the events that fire will still be prefixed, so we need + // to check if the un-prefixed events are usable, and if not remove them from the map. + + if (!('AnimationEvent' in window)) { + delete vendorPrefixes.animationend.animation; + delete vendorPrefixes.animationiteration.animation; + delete vendorPrefixes.animationstart.animation; + } // Same as above + + if (!('TransitionEvent' in window)) { + delete vendorPrefixes.transitionend.transition; + } + } + /** + * Attempts to determine the correct vendor prefixed event name. + * + * @param {string} eventName + * @returns {string} + */ + + function getVendorPrefixedEventName(eventName) { + if (prefixedEventNames[eventName]) { + return prefixedEventNames[eventName]; + } else if (!vendorPrefixes[eventName]) { + return eventName; + } + + var prefixMap = vendorPrefixes[eventName]; + + for (var styleProp in prefixMap) { + if (prefixMap.hasOwnProperty(styleProp) && styleProp in style) { + return (prefixedEventNames[eventName] = prefixMap[styleProp]); + } + } + + return eventName; + } + + /** + * To identify top level events in ReactDOM, we use constants defined by this + * module. This is the only module that uses the unsafe* methods to express + * that the constants actually correspond to the browser event names. This lets + * us save some bundle size by avoiding a top level type -> event name map. + * The rest of ReactDOM code should import top level types from this file. + */ + + var TOP_ABORT = unsafeCastStringToDOMTopLevelType('abort'); + var TOP_ANIMATION_END = unsafeCastStringToDOMTopLevelType( + getVendorPrefixedEventName('animationend'), + ); + var TOP_ANIMATION_ITERATION = unsafeCastStringToDOMTopLevelType( + getVendorPrefixedEventName('animationiteration'), + ); + var TOP_ANIMATION_START = unsafeCastStringToDOMTopLevelType( + getVendorPrefixedEventName('animationstart'), + ); + var TOP_BLUR = unsafeCastStringToDOMTopLevelType('blur'); + var TOP_CAN_PLAY = unsafeCastStringToDOMTopLevelType('canplay'); + var TOP_CAN_PLAY_THROUGH = unsafeCastStringToDOMTopLevelType('canplaythrough'); + var TOP_CANCEL = unsafeCastStringToDOMTopLevelType('cancel'); + var TOP_CHANGE = unsafeCastStringToDOMTopLevelType('change'); + var TOP_CLICK = unsafeCastStringToDOMTopLevelType('click'); + var TOP_CLOSE = unsafeCastStringToDOMTopLevelType('close'); + var TOP_COMPOSITION_END = unsafeCastStringToDOMTopLevelType('compositionend'); + var TOP_COMPOSITION_START = unsafeCastStringToDOMTopLevelType('compositionstart'); + var TOP_COMPOSITION_UPDATE = unsafeCastStringToDOMTopLevelType('compositionupdate'); + var TOP_CONTEXT_MENU = unsafeCastStringToDOMTopLevelType('contextmenu'); + var TOP_COPY = unsafeCastStringToDOMTopLevelType('copy'); + var TOP_CUT = unsafeCastStringToDOMTopLevelType('cut'); + var TOP_DOUBLE_CLICK = unsafeCastStringToDOMTopLevelType('dblclick'); + var TOP_AUX_CLICK = unsafeCastStringToDOMTopLevelType('auxclick'); + var TOP_DRAG = unsafeCastStringToDOMTopLevelType('drag'); + var TOP_DRAG_END = unsafeCastStringToDOMTopLevelType('dragend'); + var TOP_DRAG_ENTER = unsafeCastStringToDOMTopLevelType('dragenter'); + var TOP_DRAG_EXIT = unsafeCastStringToDOMTopLevelType('dragexit'); + var TOP_DRAG_LEAVE = unsafeCastStringToDOMTopLevelType('dragleave'); + var TOP_DRAG_OVER = unsafeCastStringToDOMTopLevelType('dragover'); + var TOP_DRAG_START = unsafeCastStringToDOMTopLevelType('dragstart'); + var TOP_DROP = unsafeCastStringToDOMTopLevelType('drop'); + var TOP_DURATION_CHANGE = unsafeCastStringToDOMTopLevelType('durationchange'); + var TOP_EMPTIED = unsafeCastStringToDOMTopLevelType('emptied'); + var TOP_ENCRYPTED = unsafeCastStringToDOMTopLevelType('encrypted'); + var TOP_ENDED = unsafeCastStringToDOMTopLevelType('ended'); + var TOP_ERROR = unsafeCastStringToDOMTopLevelType('error'); + var TOP_FOCUS = unsafeCastStringToDOMTopLevelType('focus'); + var TOP_GOT_POINTER_CAPTURE = unsafeCastStringToDOMTopLevelType('gotpointercapture'); + var TOP_INPUT = unsafeCastStringToDOMTopLevelType('input'); + var TOP_INVALID = unsafeCastStringToDOMTopLevelType('invalid'); + var TOP_KEY_DOWN = unsafeCastStringToDOMTopLevelType('keydown'); + var TOP_KEY_PRESS = unsafeCastStringToDOMTopLevelType('keypress'); + var TOP_KEY_UP = unsafeCastStringToDOMTopLevelType('keyup'); + var TOP_LOAD = unsafeCastStringToDOMTopLevelType('load'); + var TOP_LOAD_START = unsafeCastStringToDOMTopLevelType('loadstart'); + var TOP_LOADED_DATA = unsafeCastStringToDOMTopLevelType('loadeddata'); + var TOP_LOADED_METADATA = unsafeCastStringToDOMTopLevelType('loadedmetadata'); + var TOP_LOST_POINTER_CAPTURE = unsafeCastStringToDOMTopLevelType('lostpointercapture'); + var TOP_MOUSE_DOWN = unsafeCastStringToDOMTopLevelType('mousedown'); + var TOP_MOUSE_MOVE = unsafeCastStringToDOMTopLevelType('mousemove'); + var TOP_MOUSE_OUT = unsafeCastStringToDOMTopLevelType('mouseout'); + var TOP_MOUSE_OVER = unsafeCastStringToDOMTopLevelType('mouseover'); + var TOP_MOUSE_UP = unsafeCastStringToDOMTopLevelType('mouseup'); + var TOP_PASTE = unsafeCastStringToDOMTopLevelType('paste'); + var TOP_PAUSE = unsafeCastStringToDOMTopLevelType('pause'); + var TOP_PLAY = unsafeCastStringToDOMTopLevelType('play'); + var TOP_PLAYING = unsafeCastStringToDOMTopLevelType('playing'); + var TOP_POINTER_CANCEL = unsafeCastStringToDOMTopLevelType('pointercancel'); + var TOP_POINTER_DOWN = unsafeCastStringToDOMTopLevelType('pointerdown'); + + var TOP_POINTER_MOVE = unsafeCastStringToDOMTopLevelType('pointermove'); + var TOP_POINTER_OUT = unsafeCastStringToDOMTopLevelType('pointerout'); + var TOP_POINTER_OVER = unsafeCastStringToDOMTopLevelType('pointerover'); + var TOP_POINTER_UP = unsafeCastStringToDOMTopLevelType('pointerup'); + var TOP_PROGRESS = unsafeCastStringToDOMTopLevelType('progress'); + var TOP_RATE_CHANGE = unsafeCastStringToDOMTopLevelType('ratechange'); + var TOP_RESET = unsafeCastStringToDOMTopLevelType('reset'); + var TOP_SCROLL = unsafeCastStringToDOMTopLevelType('scroll'); + var TOP_SEEKED = unsafeCastStringToDOMTopLevelType('seeked'); + var TOP_SEEKING = unsafeCastStringToDOMTopLevelType('seeking'); + var TOP_SELECTION_CHANGE = unsafeCastStringToDOMTopLevelType('selectionchange'); + var TOP_STALLED = unsafeCastStringToDOMTopLevelType('stalled'); + var TOP_SUBMIT = unsafeCastStringToDOMTopLevelType('submit'); + var TOP_SUSPEND = unsafeCastStringToDOMTopLevelType('suspend'); + var TOP_TEXT_INPUT = unsafeCastStringToDOMTopLevelType('textInput'); + var TOP_TIME_UPDATE = unsafeCastStringToDOMTopLevelType('timeupdate'); + var TOP_TOGGLE = unsafeCastStringToDOMTopLevelType('toggle'); + var TOP_TOUCH_CANCEL = unsafeCastStringToDOMTopLevelType('touchcancel'); + var TOP_TOUCH_END = unsafeCastStringToDOMTopLevelType('touchend'); + var TOP_TOUCH_MOVE = unsafeCastStringToDOMTopLevelType('touchmove'); + var TOP_TOUCH_START = unsafeCastStringToDOMTopLevelType('touchstart'); + var TOP_TRANSITION_END = unsafeCastStringToDOMTopLevelType( + getVendorPrefixedEventName('transitionend'), + ); + var TOP_VOLUME_CHANGE = unsafeCastStringToDOMTopLevelType('volumechange'); + var TOP_WAITING = unsafeCastStringToDOMTopLevelType('waiting'); + var TOP_WHEEL = unsafeCastStringToDOMTopLevelType('wheel'); // List of events that need to be individually attached to media elements. + // Note that events in this list will *not* be listened to at the top level + // unless they're explicitly whitelisted in `ReactBrowserEventEmitter.listenTo`. + + var mediaEventTypes = [ + TOP_ABORT, + TOP_CAN_PLAY, + TOP_CAN_PLAY_THROUGH, + TOP_DURATION_CHANGE, + TOP_EMPTIED, + TOP_ENCRYPTED, + TOP_ENDED, + TOP_ERROR, + TOP_LOADED_DATA, + TOP_LOADED_METADATA, + TOP_LOAD_START, + TOP_PAUSE, + TOP_PLAY, + TOP_PLAYING, + TOP_PROGRESS, + TOP_RATE_CHANGE, + TOP_SEEKED, + TOP_SEEKING, + TOP_STALLED, + TOP_SUSPEND, + TOP_TIME_UPDATE, + TOP_VOLUME_CHANGE, + TOP_WAITING, + ]; + function getRawEventName(topLevelType) { + return unsafeCastDOMTopLevelTypeToString(topLevelType); + } + + /** + * `ReactInstanceMap` maintains a mapping from a public facing stateful + * instance (key) and the internal representation (value). This allows public + * methods to accept the user facing instance as an argument and map them back + * to internal methods. + * + * Note that this module is currently shared and assumed to be stateless. + * If this becomes an actual Map, that will break. + */ + + /** + * This API should be called `delete` but we'd have to make sure to always + * transform these to strings for IE support. When this transform is fully + * supported we can rename it. + */ + + function get(key) { + return key._reactInternalFiber; + } + function has(key) { + return key._reactInternalFiber !== undefined; + } + function set(key, value) { + key._reactInternalFiber = value; + } + + // Don't change these two values. They're used by React Dev Tools. + var NoEffect = + /* */ + 0; + var PerformedWork = + /* */ + 1; // You can change the rest (and add more). + + var Placement = + /* */ + 2; + var Update = + /* */ + 4; + var PlacementAndUpdate = + /* */ + 6; + var Deletion = + /* */ + 8; + var ContentReset = + /* */ + 16; + var Callback = + /* */ + 32; + var DidCapture = + /* */ + 64; + var Ref = + /* */ + 128; + var Snapshot = + /* */ + 256; + var Passive = + /* */ + 512; + var Hydrating = + /* */ + 1024; + var HydratingAndUpdate = + /* */ + 1028; // Passive & Update & Callback & Ref & Snapshot + + var LifecycleEffectMask = + /* */ + 932; // Union of all host effects + + var HostEffectMask = + /* */ + 2047; + var Incomplete = + /* */ + 2048; + var ShouldCapture = + /* */ + 4096; + + var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner; + function getNearestMountedFiber(fiber) { + var node = fiber; + var nearestMounted = fiber; + + if (!fiber.alternate) { + // If there is no alternate, this might be a new tree that isn't inserted + // yet. If it is, then it will have a pending insertion effect on it. + var nextNode = node; + + do { + node = nextNode; + + if ((node.effectTag & (Placement | Hydrating)) !== NoEffect) { + // This is an insertion or in-progress hydration. The nearest possible + // mounted fiber is the parent but we need to continue to figure out + // if that one is still mounted. + nearestMounted = node.return; + } + + nextNode = node.return; + } while (nextNode); + } else { + while (node.return) { + node = node.return; + } + } + + if (node.tag === HostRoot) { + // TODO: Check if this was a nested HostRoot when used with + // renderContainerIntoSubtree. + return nearestMounted; + } // If we didn't hit the root, that means that we're in an disconnected tree + // that has been unmounted. + + return null; + } + function getSuspenseInstanceFromFiber(fiber) { + if (fiber.tag === SuspenseComponent) { + var suspenseState = fiber.memoizedState; + + if (suspenseState === null) { + var current = fiber.alternate; + + if (current !== null) { + suspenseState = current.memoizedState; + } + } + + if (suspenseState !== null) { + return suspenseState.dehydrated; + } + } + + return null; + } + function getContainerFromFiber(fiber) { + return fiber.tag === HostRoot ? fiber.stateNode.containerInfo : null; + } + function isFiberMounted(fiber) { + return getNearestMountedFiber(fiber) === fiber; + } + function isMounted(component) { + { + var owner = ReactCurrentOwner.current; + + if (owner !== null && owner.tag === ClassComponent) { + var ownerFiber = owner; + var instance = ownerFiber.stateNode; + !instance._warnedAboutRefsInRender + ? warningWithoutStack$1( + false, + '%s is accessing isMounted inside its render() function. ' + + 'render() should be a pure function of props and state. It should ' + + 'never access something that requires stale data from the previous ' + + 'render, such as refs. Move this logic to componentDidMount and ' + + 'componentDidUpdate instead.', + getComponentName(ownerFiber.type) || 'A component', + ) + : void 0; + instance._warnedAboutRefsInRender = true; + } + } + + var fiber = get(component); + + if (!fiber) { + return false; + } + + return getNearestMountedFiber(fiber) === fiber; + } + + function assertIsMounted(fiber) { + if (!(getNearestMountedFiber(fiber) === fiber)) { + { + throw Error('Unable to find node on an unmounted component.'); + } + } + } + + function findCurrentFiberUsingSlowPath(fiber) { + var alternate = fiber.alternate; + + if (!alternate) { + // If there is no alternate, then we only need to check if it is mounted. + var nearestMounted = getNearestMountedFiber(fiber); + + if (!(nearestMounted !== null)) { + { + throw Error('Unable to find node on an unmounted component.'); + } + } + + if (nearestMounted !== fiber) { + return null; + } + + return fiber; + } // If we have two possible branches, we'll walk backwards up to the root + // to see what path the root points to. On the way we may hit one of the + // special cases and we'll deal with them. + + var a = fiber; + var b = alternate; + + while (true) { + var parentA = a.return; + + if (parentA === null) { + // We're at the root. + break; + } + + var parentB = parentA.alternate; + + if (parentB === null) { + // There is no alternate. This is an unusual case. Currently, it only + // happens when a Suspense component is hidden. An extra fragment fiber + // is inserted in between the Suspense fiber and its children. Skip + // over this extra fragment fiber and proceed to the next parent. + var nextParent = parentA.return; + + if (nextParent !== null) { + a = b = nextParent; + continue; + } // If there's no parent, we're at the root. + + break; + } // If both copies of the parent fiber point to the same child, we can + // assume that the child is current. This happens when we bailout on low + // priority: the bailed out fiber's child reuses the current child. + + if (parentA.child === parentB.child) { + var child = parentA.child; + + while (child) { + if (child === a) { + // We've determined that A is the current branch. + assertIsMounted(parentA); + return fiber; + } + + if (child === b) { + // We've determined that B is the current branch. + assertIsMounted(parentA); + return alternate; + } + + child = child.sibling; + } // We should never have an alternate for any mounting node. So the only + // way this could possibly happen is if this was unmounted, if at all. + + { + { + throw Error('Unable to find node on an unmounted component.'); + } + } + } + + if (a.return !== b.return) { + // The return pointer of A and the return pointer of B point to different + // fibers. We assume that return pointers never criss-cross, so A must + // belong to the child set of A.return, and B must belong to the child + // set of B.return. + a = parentA; + b = parentB; + } else { + // The return pointers point to the same fiber. We'll have to use the + // default, slow path: scan the child sets of each parent alternate to see + // which child belongs to which set. + // + // Search parent A's child set + var didFindChild = false; + var _child = parentA.child; + + while (_child) { + if (_child === a) { + didFindChild = true; + a = parentA; + b = parentB; + break; + } + + if (_child === b) { + didFindChild = true; + b = parentA; + a = parentB; + break; + } + + _child = _child.sibling; + } + + if (!didFindChild) { + // Search parent B's child set + _child = parentB.child; + + while (_child) { + if (_child === a) { + didFindChild = true; + a = parentB; + b = parentA; + break; + } + + if (_child === b) { + didFindChild = true; + b = parentB; + a = parentA; + break; + } + + _child = _child.sibling; + } + + if (!didFindChild) { + { + throw Error( + 'Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue.', + ); + } + } + } + } + + if (!(a.alternate === b)) { + { + throw Error( + "Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue.", + ); + } + } + } // If the root is not a host container, we're in a disconnected tree. I.e. + // unmounted. + + if (!(a.tag === HostRoot)) { + { + throw Error('Unable to find node on an unmounted component.'); + } + } + + if (a.stateNode.current === a) { + // We've determined that A is the current branch. + return fiber; + } // Otherwise B has to be current branch. + + return alternate; + } + function findCurrentHostFiber(parent) { + var currentParent = findCurrentFiberUsingSlowPath(parent); + + if (!currentParent) { + return null; + } // Next we'll drill down this component to find the first HostComponent/Text. + + var node = currentParent; + + while (true) { + if (node.tag === HostComponent || node.tag === HostText) { + return node; + } else if (node.child) { + node.child.return = node; + node = node.child; + continue; + } + + if (node === currentParent) { + return null; + } + + while (!node.sibling) { + if (!node.return || node.return === currentParent) { + return null; + } + + node = node.return; + } + + node.sibling.return = node.return; + node = node.sibling; + } // Flow needs the return null here, but ESLint complains about it. + // eslint-disable-next-line no-unreachable + + return null; + } + function findCurrentHostFiberWithNoPortals(parent) { + var currentParent = findCurrentFiberUsingSlowPath(parent); + + if (!currentParent) { + return null; + } // Next we'll drill down this component to find the first HostComponent/Text. + + var node = currentParent; + + while (true) { + if ( + node.tag === HostComponent || + node.tag === HostText || + (enableFundamentalAPI && node.tag === FundamentalComponent) + ) { + return node; + } else if (node.child && node.tag !== HostPortal) { + node.child.return = node; + node = node.child; + continue; + } + + if (node === currentParent) { + return null; + } + + while (!node.sibling) { + if (!node.return || node.return === currentParent) { + return null; + } + + node = node.return; + } + + node.sibling.return = node.return; + node = node.sibling; + } // Flow needs the return null here, but ESLint complains about it. + // eslint-disable-next-line no-unreachable + + return null; + } + + var attemptSynchronousHydration; + function setAttemptSynchronousHydration(fn) { + attemptSynchronousHydration = fn; + } + var attemptUserBlockingHydration; + function setAttemptUserBlockingHydration(fn) { + attemptUserBlockingHydration = fn; + } + var attemptContinuousHydration; + function setAttemptContinuousHydration(fn) { + attemptContinuousHydration = fn; + } + var attemptHydrationAtCurrentPriority; + function setAttemptHydrationAtCurrentPriority(fn) { + attemptHydrationAtCurrentPriority = fn; + } // TODO: Upgrade this definition once we're on a newer version of Flow that + // has this definition built-in. + + var hasScheduledReplayAttempt = false; // The queue of discrete events to be replayed. + + var queuedDiscreteEvents = []; // Indicates if any continuous event targets are non-null for early bailout. + + // if the last target was dehydrated. + + var queuedFocus = null; + var queuedDrag = null; + var queuedMouse = null; // For pointer events there can be one latest event per pointerId. + + var queuedPointers = new Map(); + var queuedPointerCaptures = new Map(); // We could consider replaying selectionchange and touchmoves too. + + var queuedExplicitHydrationTargets = []; + function hasQueuedDiscreteEvents() { + return queuedDiscreteEvents.length > 0; + } + + var discreteReplayableEvents = [ + TOP_MOUSE_DOWN, + TOP_MOUSE_UP, + TOP_TOUCH_CANCEL, + TOP_TOUCH_END, + TOP_TOUCH_START, + TOP_AUX_CLICK, + TOP_DOUBLE_CLICK, + TOP_POINTER_CANCEL, + TOP_POINTER_DOWN, + TOP_POINTER_UP, + TOP_DRAG_END, + TOP_DRAG_START, + TOP_DROP, + TOP_COMPOSITION_END, + TOP_COMPOSITION_START, + TOP_KEY_DOWN, + TOP_KEY_PRESS, + TOP_KEY_UP, + TOP_INPUT, + TOP_TEXT_INPUT, + TOP_CLOSE, + TOP_CANCEL, + TOP_COPY, + TOP_CUT, + TOP_PASTE, + TOP_CLICK, + TOP_CHANGE, + TOP_CONTEXT_MENU, + TOP_RESET, + TOP_SUBMIT, + ]; + var continuousReplayableEvents = [ + TOP_FOCUS, + TOP_BLUR, + TOP_DRAG_ENTER, + TOP_DRAG_LEAVE, + TOP_MOUSE_OVER, + TOP_MOUSE_OUT, + TOP_POINTER_OVER, + TOP_POINTER_OUT, + TOP_GOT_POINTER_CAPTURE, + TOP_LOST_POINTER_CAPTURE, + ]; + function isReplayableDiscreteEvent(eventType) { + return discreteReplayableEvents.indexOf(eventType) > -1; + } + + function trapReplayableEvent(topLevelType, document, listeningSet) { + listenToTopLevel(topLevelType, document, listeningSet); + + if (enableFlareAPI) { + // Trap events for the responder system. + var passiveEventKey = unsafeCastDOMTopLevelTypeToString(topLevelType) + '_passive'; + + if (!listeningSet.has(passiveEventKey)) { + trapEventForResponderEventSystem(document, topLevelType, true); + listeningSet.add(passiveEventKey); + } // TODO: This listens to all events as active which might have + // undesirable effects. It's also unnecessary to have both + // passive and active listeners. Instead, we could start with + // a passive and upgrade it to an active one if needed. + // For replaying purposes the active is never needed since we + // currently don't preventDefault. + + var activeEventKey = unsafeCastDOMTopLevelTypeToString(topLevelType) + '_active'; + + if (!listeningSet.has(activeEventKey)) { + trapEventForResponderEventSystem(document, topLevelType, false); + listeningSet.add(activeEventKey); + } + } + } + + function eagerlyTrapReplayableEvents(document) { + var listeningSet = getListeningSetForElement(document); // Discrete + + discreteReplayableEvents.forEach(function (topLevelType) { + trapReplayableEvent(topLevelType, document, listeningSet); + }); // Continuous + + continuousReplayableEvents.forEach(function (topLevelType) { + trapReplayableEvent(topLevelType, document, listeningSet); + }); + } + + function createQueuedReplayableEvent(blockedOn, topLevelType, eventSystemFlags, nativeEvent) { + return { + blockedOn: blockedOn, + topLevelType: topLevelType, + eventSystemFlags: eventSystemFlags | IS_REPLAYED, + nativeEvent: nativeEvent, + }; + } + + function queueDiscreteEvent(blockedOn, topLevelType, eventSystemFlags, nativeEvent) { + var queuedEvent = createQueuedReplayableEvent( + blockedOn, + topLevelType, + eventSystemFlags, + nativeEvent, + ); + queuedDiscreteEvents.push(queuedEvent); + + if (enableSelectiveHydration) { + if (queuedDiscreteEvents.length === 1) { + // If this was the first discrete event, we might be able to + // synchronously unblock it so that preventDefault still works. + while (queuedEvent.blockedOn !== null) { + var _fiber = getInstanceFromNode$1(queuedEvent.blockedOn); + + if (_fiber === null) { + break; + } + + attemptSynchronousHydration(_fiber); + + if (queuedEvent.blockedOn === null) { + // We got unblocked by hydration. Let's try again. + replayUnblockedEvents(); // If we're reblocked, on an inner boundary, we might need + // to attempt hydrating that one. + + continue; + } else { + // We're still blocked from hydation, we have to give up + // and replay later. + break; + } + } + } + } + } // Resets the replaying for this type of continuous event to no event. + + function clearIfContinuousEvent(topLevelType, nativeEvent) { + switch (topLevelType) { + case TOP_FOCUS: + case TOP_BLUR: + queuedFocus = null; + break; + + case TOP_DRAG_ENTER: + case TOP_DRAG_LEAVE: + queuedDrag = null; + break; + + case TOP_MOUSE_OVER: + case TOP_MOUSE_OUT: + queuedMouse = null; + break; + + case TOP_POINTER_OVER: + case TOP_POINTER_OUT: { + var pointerId = nativeEvent.pointerId; + queuedPointers.delete(pointerId); + break; + } + + case TOP_GOT_POINTER_CAPTURE: + case TOP_LOST_POINTER_CAPTURE: { + var _pointerId = nativeEvent.pointerId; + queuedPointerCaptures.delete(_pointerId); + break; + } + } + } + + function accumulateOrCreateContinuousQueuedReplayableEvent( + existingQueuedEvent, + blockedOn, + topLevelType, + eventSystemFlags, + nativeEvent, + ) { + if (existingQueuedEvent === null || existingQueuedEvent.nativeEvent !== nativeEvent) { + var queuedEvent = createQueuedReplayableEvent( + blockedOn, + topLevelType, + eventSystemFlags, + nativeEvent, + ); + + if (blockedOn !== null) { + var _fiber2 = getInstanceFromNode$1(blockedOn); + + if (_fiber2 !== null) { + // Attempt to increase the priority of this target. + attemptContinuousHydration(_fiber2); + } + } + + return queuedEvent; + } // If we have already queued this exact event, then it's because + // the different event systems have different DOM event listeners. + // We can accumulate the flags and store a single event to be + // replayed. + + existingQueuedEvent.eventSystemFlags |= eventSystemFlags; + return existingQueuedEvent; + } + + function queueIfContinuousEvent(blockedOn, topLevelType, eventSystemFlags, nativeEvent) { + // These set relatedTarget to null because the replayed event will be treated as if we + // moved from outside the window (no target) onto the target once it hydrates. + // Instead of mutating we could clone the event. + switch (topLevelType) { + case TOP_FOCUS: { + var focusEvent = nativeEvent; + queuedFocus = accumulateOrCreateContinuousQueuedReplayableEvent( + queuedFocus, + blockedOn, + topLevelType, + eventSystemFlags, + focusEvent, + ); + return true; + } + + case TOP_DRAG_ENTER: { + var dragEvent = nativeEvent; + queuedDrag = accumulateOrCreateContinuousQueuedReplayableEvent( + queuedDrag, + blockedOn, + topLevelType, + eventSystemFlags, + dragEvent, + ); + return true; + } + + case TOP_MOUSE_OVER: { + var mouseEvent = nativeEvent; + queuedMouse = accumulateOrCreateContinuousQueuedReplayableEvent( + queuedMouse, + blockedOn, + topLevelType, + eventSystemFlags, + mouseEvent, + ); + return true; + } + + case TOP_POINTER_OVER: { + var pointerEvent = nativeEvent; + var pointerId = pointerEvent.pointerId; + queuedPointers.set( + pointerId, + accumulateOrCreateContinuousQueuedReplayableEvent( + queuedPointers.get(pointerId) || null, + blockedOn, + topLevelType, + eventSystemFlags, + pointerEvent, + ), + ); + return true; + } + + case TOP_GOT_POINTER_CAPTURE: { + var _pointerEvent = nativeEvent; + var _pointerId2 = _pointerEvent.pointerId; + queuedPointerCaptures.set( + _pointerId2, + accumulateOrCreateContinuousQueuedReplayableEvent( + queuedPointerCaptures.get(_pointerId2) || null, + blockedOn, + topLevelType, + eventSystemFlags, + _pointerEvent, + ), + ); + return true; + } + } + + return false; + } // Check if this target is unblocked. Returns true if it's unblocked. + + function attemptExplicitHydrationTarget(queuedTarget) { + // TODO: This function shares a lot of logic with attemptToDispatchEvent. + // Try to unify them. It's a bit tricky since it would require two return + // values. + var targetInst = getClosestInstanceFromNode(queuedTarget.target); + + if (targetInst !== null) { + var nearestMounted = getNearestMountedFiber(targetInst); + + if (nearestMounted !== null) { + var tag = nearestMounted.tag; + + if (tag === SuspenseComponent) { + var instance = getSuspenseInstanceFromFiber(nearestMounted); + + if (instance !== null) { + // We're blocked on hydrating this boundary. + // Increase its priority. + queuedTarget.blockedOn = instance; + Scheduler.unstable_runWithPriority(queuedTarget.priority, function () { + attemptHydrationAtCurrentPriority(nearestMounted); + }); + return; + } + } else if (tag === HostRoot) { + var root = nearestMounted.stateNode; + + if (root.hydrate) { + queuedTarget.blockedOn = getContainerFromFiber(nearestMounted); // We don't currently have a way to increase the priority of + // a root other than sync. + + return; + } + } + } + } + + queuedTarget.blockedOn = null; + } + + function queueExplicitHydrationTarget(target) { + if (enableSelectiveHydration) { + var priority = Scheduler.unstable_getCurrentPriorityLevel(); + var queuedTarget = { + blockedOn: null, + target: target, + priority: priority, + }; + var i = 0; + + for (; i < queuedExplicitHydrationTargets.length; i++) { + if (priority <= queuedExplicitHydrationTargets[i].priority) { + break; + } + } + + queuedExplicitHydrationTargets.splice(i, 0, queuedTarget); + + if (i === 0) { + attemptExplicitHydrationTarget(queuedTarget); + } + } + } + + function attemptReplayContinuousQueuedEvent(queuedEvent) { + if (queuedEvent.blockedOn !== null) { + return false; + } + + var nextBlockedOn = attemptToDispatchEvent( + queuedEvent.topLevelType, + queuedEvent.eventSystemFlags, + queuedEvent.nativeEvent, + ); + + if (nextBlockedOn !== null) { + // We're still blocked. Try again later. + var _fiber3 = getInstanceFromNode$1(nextBlockedOn); + + if (_fiber3 !== null) { + attemptContinuousHydration(_fiber3); + } + + queuedEvent.blockedOn = nextBlockedOn; + return false; + } + + return true; + } + + function attemptReplayContinuousQueuedEventInMap(queuedEvent, key, map) { + if (attemptReplayContinuousQueuedEvent(queuedEvent)) { + map.delete(key); + } + } + + function replayUnblockedEvents() { + hasScheduledReplayAttempt = false; // First replay discrete events. + + while (queuedDiscreteEvents.length > 0) { + var nextDiscreteEvent = queuedDiscreteEvents[0]; + + if (nextDiscreteEvent.blockedOn !== null) { + // We're still blocked. + // Increase the priority of this boundary to unblock + // the next discrete event. + var _fiber4 = getInstanceFromNode$1(nextDiscreteEvent.blockedOn); + + if (_fiber4 !== null) { + attemptUserBlockingHydration(_fiber4); + } + + break; + } + + var nextBlockedOn = attemptToDispatchEvent( + nextDiscreteEvent.topLevelType, + nextDiscreteEvent.eventSystemFlags, + nextDiscreteEvent.nativeEvent, + ); + + if (nextBlockedOn !== null) { + // We're still blocked. Try again later. + nextDiscreteEvent.blockedOn = nextBlockedOn; + } else { + // We've successfully replayed the first event. Let's try the next one. + queuedDiscreteEvents.shift(); + } + } // Next replay any continuous events. + + if (queuedFocus !== null && attemptReplayContinuousQueuedEvent(queuedFocus)) { + queuedFocus = null; + } + + if (queuedDrag !== null && attemptReplayContinuousQueuedEvent(queuedDrag)) { + queuedDrag = null; + } + + if (queuedMouse !== null && attemptReplayContinuousQueuedEvent(queuedMouse)) { + queuedMouse = null; + } + + queuedPointers.forEach(attemptReplayContinuousQueuedEventInMap); + queuedPointerCaptures.forEach(attemptReplayContinuousQueuedEventInMap); + } + + function scheduleCallbackIfUnblocked(queuedEvent, unblocked) { + if (queuedEvent.blockedOn === unblocked) { + queuedEvent.blockedOn = null; + + if (!hasScheduledReplayAttempt) { + hasScheduledReplayAttempt = true; // Schedule a callback to attempt replaying as many events as are + // now unblocked. This first might not actually be unblocked yet. + // We could check it early to avoid scheduling an unnecessary callback. + + Scheduler.unstable_scheduleCallback(Scheduler.unstable_NormalPriority, replayUnblockedEvents); + } + } + } + + function retryIfBlockedOn(unblocked) { + // Mark anything that was blocked on this as no longer blocked + // and eligible for a replay. + if (queuedDiscreteEvents.length > 0) { + scheduleCallbackIfUnblocked(queuedDiscreteEvents[0], unblocked); // This is a exponential search for each boundary that commits. I think it's + // worth it because we expect very few discrete events to queue up and once + // we are actually fully unblocked it will be fast to replay them. + + for (var i = 1; i < queuedDiscreteEvents.length; i++) { + var queuedEvent = queuedDiscreteEvents[i]; + + if (queuedEvent.blockedOn === unblocked) { + queuedEvent.blockedOn = null; + } + } + } + + if (queuedFocus !== null) { + scheduleCallbackIfUnblocked(queuedFocus, unblocked); + } + + if (queuedDrag !== null) { + scheduleCallbackIfUnblocked(queuedDrag, unblocked); + } + + if (queuedMouse !== null) { + scheduleCallbackIfUnblocked(queuedMouse, unblocked); + } + + var unblock = function (queuedEvent) { + return scheduleCallbackIfUnblocked(queuedEvent, unblocked); + }; + + queuedPointers.forEach(unblock); + queuedPointerCaptures.forEach(unblock); + + for (var _i = 0; _i < queuedExplicitHydrationTargets.length; _i++) { + var queuedTarget = queuedExplicitHydrationTargets[_i]; + + if (queuedTarget.blockedOn === unblocked) { + queuedTarget.blockedOn = null; + } + } + + while (queuedExplicitHydrationTargets.length > 0) { + var nextExplicitTarget = queuedExplicitHydrationTargets[0]; + + if (nextExplicitTarget.blockedOn !== null) { + // We're still blocked. + break; + } else { + attemptExplicitHydrationTarget(nextExplicitTarget); + + if (nextExplicitTarget.blockedOn === null) { + // We're unblocked. + queuedExplicitHydrationTargets.shift(); + } + } + } + } + + function addEventBubbleListener(element, eventType, listener) { + element.addEventListener(eventType, listener, false); + } + function addEventCaptureListener(element, eventType, listener) { + element.addEventListener(eventType, listener, true); + } + function addEventCaptureListenerWithPassiveFlag(element, eventType, listener, passive) { + element.addEventListener(eventType, listener, { + capture: true, + passive: passive, + }); + } + + /** + * Gets the target node from a native browser event by accounting for + * inconsistencies in browser DOM APIs. + * + * @param {object} nativeEvent Native browser event. + * @return {DOMEventTarget} Target node. + */ + + function getEventTarget(nativeEvent) { + // Fallback to nativeEvent.srcElement for IE9 + // https://github.com/facebook/react/issues/12506 + var target = nativeEvent.target || nativeEvent.srcElement || window; // Normalize SVG <use> element events #4963 + + if (target.correspondingUseElement) { + target = target.correspondingUseElement; + } // Safari may fire events on text nodes (Node.TEXT_NODE is 3). + // @see http://www.quirksmode.org/js/events_properties.html + + return target.nodeType === TEXT_NODE ? target.parentNode : target; + } + + function getParent(inst) { + do { + inst = inst.return; // TODO: If this is a HostRoot we might want to bail out. + // That is depending on if we want nested subtrees (layers) to bubble + // events to their parent. We could also go through parentNode on the + // host node but that wouldn't work for React Native and doesn't let us + // do the portal feature. + } while (inst && inst.tag !== HostComponent); + + if (inst) { + return inst; + } + + return null; + } + /** + * Return the lowest common ancestor of A and B, or null if they are in + * different trees. + */ + + function getLowestCommonAncestor(instA, instB) { + var depthA = 0; + + for (var tempA = instA; tempA; tempA = getParent(tempA)) { + depthA++; + } + + var depthB = 0; + + for (var tempB = instB; tempB; tempB = getParent(tempB)) { + depthB++; + } // If A is deeper, crawl up. + + while (depthA - depthB > 0) { + instA = getParent(instA); + depthA--; + } // If B is deeper, crawl up. + + while (depthB - depthA > 0) { + instB = getParent(instB); + depthB--; + } // Walk in lockstep until we find a match. + + var depth = depthA; + + while (depth--) { + if (instA === instB || instA === instB.alternate) { + return instA; + } + + instA = getParent(instA); + instB = getParent(instB); + } + + return null; + } + /** + * Return if A is an ancestor of B. + */ + + /** + * Return the parent instance of the passed-in instance. + */ + + /** + * Simulates the traversal of a two-phase, capture/bubble event dispatch. + */ + + function traverseTwoPhase(inst, fn, arg) { + var path = []; + + while (inst) { + path.push(inst); + inst = getParent(inst); + } + + var i; + + for (i = path.length; i-- > 0; ) { + fn(path[i], 'captured', arg); + } + + for (i = 0; i < path.length; i++) { + fn(path[i], 'bubbled', arg); + } + } + /** + * Traverses the ID hierarchy and invokes the supplied `cb` on any IDs that + * should would receive a `mouseEnter` or `mouseLeave` event. + * + * Does not invoke the callback on the nearest common ancestor because nothing + * "entered" or "left" that element. + */ + + function traverseEnterLeave(from, to, fn, argFrom, argTo) { + var common = from && to ? getLowestCommonAncestor(from, to) : null; + var pathFrom = []; + + while (true) { + if (!from) { + break; + } + + if (from === common) { + break; + } + + var alternate = from.alternate; + + if (alternate !== null && alternate === common) { + break; + } + + pathFrom.push(from); + from = getParent(from); + } + + var pathTo = []; + + while (true) { + if (!to) { + break; + } + + if (to === common) { + break; + } + + var _alternate = to.alternate; + + if (_alternate !== null && _alternate === common) { + break; + } + + pathTo.push(to); + to = getParent(to); + } + + for (var i = 0; i < pathFrom.length; i++) { + fn(pathFrom[i], 'bubbled', argFrom); + } + + for (var _i = pathTo.length; _i-- > 0; ) { + fn(pathTo[_i], 'captured', argTo); + } + } + + /** + * Some event types have a notion of different registration names for different + * "phases" of propagation. This finds listeners by a given phase. + */ + function listenerAtPhase(inst, event, propagationPhase) { + var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase]; + return getListener(inst, registrationName); + } + /** + * A small set of propagation patterns, each of which will accept a small amount + * of information, and generate a set of "dispatch ready event objects" - which + * are sets of events that have already been annotated with a set of dispatched + * listener functions/ids. The API is designed this way to discourage these + * propagation strategies from actually executing the dispatches, since we + * always want to collect the entire set of dispatches before executing even a + * single one. + */ + + /** + * Tags a `SyntheticEvent` with dispatched listeners. Creating this function + * here, allows us to not have to bind or create functions for each event. + * Mutating the event's members allows us to not have to create a wrapping + * "dispatch" object that pairs the event with the listener. + */ + + function accumulateDirectionalDispatches(inst, phase, event) { + { + !inst ? warningWithoutStack$1(false, 'Dispatching inst must not be null') : void 0; + } + + var listener = listenerAtPhase(inst, event, phase); + + if (listener) { + event._dispatchListeners = accumulateInto(event._dispatchListeners, listener); + event._dispatchInstances = accumulateInto(event._dispatchInstances, inst); + } + } + /** + * Collect dispatches (must be entirely collected before dispatching - see unit + * tests). Lazily allocate the array to conserve memory. We must loop through + * each event and perform the traversal for each one. We cannot perform a + * single traversal for the entire collection of events because each event may + * have a different target. + */ + + function accumulateTwoPhaseDispatchesSingle(event) { + if (event && event.dispatchConfig.phasedRegistrationNames) { + traverseTwoPhase(event._targetInst, accumulateDirectionalDispatches, event); + } + } + /** + * Accumulates without regard to direction, does not look for phased + * registration names. Same as `accumulateDirectDispatchesSingle` but without + * requiring that the `dispatchMarker` be the same as the dispatched ID. + */ + + function accumulateDispatches(inst, ignoredDirection, event) { + if (inst && event && event.dispatchConfig.registrationName) { + var registrationName = event.dispatchConfig.registrationName; + var listener = getListener(inst, registrationName); + + if (listener) { + event._dispatchListeners = accumulateInto(event._dispatchListeners, listener); + event._dispatchInstances = accumulateInto(event._dispatchInstances, inst); + } + } + } + /** + * Accumulates dispatches on an `SyntheticEvent`, but only for the + * `dispatchMarker`. + * @param {SyntheticEvent} event + */ + + function accumulateDirectDispatchesSingle(event) { + if (event && event.dispatchConfig.registrationName) { + accumulateDispatches(event._targetInst, null, event); + } + } + + function accumulateTwoPhaseDispatches(events) { + forEachAccumulated(events, accumulateTwoPhaseDispatchesSingle); + } + + function accumulateEnterLeaveDispatches(leave, enter, from, to) { + traverseEnterLeave(from, to, accumulateDispatches, leave, enter); + } + function accumulateDirectDispatches(events) { + forEachAccumulated(events, accumulateDirectDispatchesSingle); + } + + /* eslint valid-typeof: 0 */ + var EVENT_POOL_SIZE = 10; + /** + * @interface Event + * @see http://www.w3.org/TR/DOM-Level-3-Events/ + */ + + var EventInterface = { + type: null, + target: null, + // currentTarget is set when dispatching; no use in copying it here + currentTarget: function () { + return null; + }, + eventPhase: null, + bubbles: null, + cancelable: null, + timeStamp: function (event) { + return event.timeStamp || Date.now(); + }, + defaultPrevented: null, + isTrusted: null, + }; + + function functionThatReturnsTrue() { + return true; + } + + function functionThatReturnsFalse() { + return false; + } + /** + * Synthetic events are dispatched by event plugins, typically in response to a + * top-level event delegation handler. + * + * These systems should generally use pooling to reduce the frequency of garbage + * collection. The system should check `isPersistent` to determine whether the + * event should be released into the pool after being dispatched. Users that + * need a persisted event should invoke `persist`. + * + * Synthetic events (and subclasses) implement the DOM Level 3 Events API by + * normalizing browser quirks. Subclasses do not necessarily have to implement a + * DOM interface; custom application-specific events can also subclass this. + * + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {*} targetInst Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @param {DOMEventTarget} nativeEventTarget Target node. + */ + + function SyntheticEvent(dispatchConfig, targetInst, nativeEvent, nativeEventTarget) { + { + // these have a getter/setter for warnings + delete this.nativeEvent; + delete this.preventDefault; + delete this.stopPropagation; + delete this.isDefaultPrevented; + delete this.isPropagationStopped; + } + + this.dispatchConfig = dispatchConfig; + this._targetInst = targetInst; + this.nativeEvent = nativeEvent; + var Interface = this.constructor.Interface; + + for (var propName in Interface) { + if (!Interface.hasOwnProperty(propName)) { + continue; + } + + { + delete this[propName]; // this has a getter/setter for warnings + } + + var normalize = Interface[propName]; + + if (normalize) { + this[propName] = normalize(nativeEvent); + } else { + if (propName === 'target') { + this.target = nativeEventTarget; + } else { + this[propName] = nativeEvent[propName]; + } + } + } + + var defaultPrevented = + nativeEvent.defaultPrevented != null + ? nativeEvent.defaultPrevented + : nativeEvent.returnValue === false; + + if (defaultPrevented) { + this.isDefaultPrevented = functionThatReturnsTrue; + } else { + this.isDefaultPrevented = functionThatReturnsFalse; + } + + this.isPropagationStopped = functionThatReturnsFalse; + return this; + } + + _assign(SyntheticEvent.prototype, { + preventDefault: function () { + this.defaultPrevented = true; + var event = this.nativeEvent; + + if (!event) { + return; + } + + if (event.preventDefault) { + event.preventDefault(); + } else if (typeof event.returnValue !== 'unknown') { + event.returnValue = false; + } + + this.isDefaultPrevented = functionThatReturnsTrue; + }, + stopPropagation: function () { + var event = this.nativeEvent; + + if (!event) { + return; + } + + if (event.stopPropagation) { + event.stopPropagation(); + } else if (typeof event.cancelBubble !== 'unknown') { + // The ChangeEventPlugin registers a "propertychange" event for + // IE. This event does not support bubbling or cancelling, and + // any references to cancelBubble throw "Member not found". A + // typeof check of "unknown" circumvents this issue (and is also + // IE specific). + event.cancelBubble = true; + } + + this.isPropagationStopped = functionThatReturnsTrue; + }, + + /** + * We release all dispatched `SyntheticEvent`s after each event loop, adding + * them back into the pool. This allows a way to hold onto a reference that + * won't be added back into the pool. + */ + persist: function () { + this.isPersistent = functionThatReturnsTrue; + }, + + /** + * Checks if this event should be released back into the pool. + * + * @return {boolean} True if this should not be released, false otherwise. + */ + isPersistent: functionThatReturnsFalse, + + /** + * `PooledClass` looks for `destructor` on each instance it releases. + */ + destructor: function () { + var Interface = this.constructor.Interface; + + for (var propName in Interface) { + { + Object.defineProperty( + this, + propName, + getPooledWarningPropertyDefinition(propName, Interface[propName]), + ); + } + } + + this.dispatchConfig = null; + this._targetInst = null; + this.nativeEvent = null; + this.isDefaultPrevented = functionThatReturnsFalse; + this.isPropagationStopped = functionThatReturnsFalse; + this._dispatchListeners = null; + this._dispatchInstances = null; + + { + Object.defineProperty( + this, + 'nativeEvent', + getPooledWarningPropertyDefinition('nativeEvent', null), + ); + Object.defineProperty( + this, + 'isDefaultPrevented', + getPooledWarningPropertyDefinition('isDefaultPrevented', functionThatReturnsFalse), + ); + Object.defineProperty( + this, + 'isPropagationStopped', + getPooledWarningPropertyDefinition('isPropagationStopped', functionThatReturnsFalse), + ); + Object.defineProperty( + this, + 'preventDefault', + getPooledWarningPropertyDefinition('preventDefault', function () {}), + ); + Object.defineProperty( + this, + 'stopPropagation', + getPooledWarningPropertyDefinition('stopPropagation', function () {}), + ); + } + }, + }); + + SyntheticEvent.Interface = EventInterface; + /** + * Helper to reduce boilerplate when creating subclasses. + */ + + SyntheticEvent.extend = function (Interface) { + var Super = this; + + var E = function () {}; + + E.prototype = Super.prototype; + var prototype = new E(); + + function Class() { + return Super.apply(this, arguments); + } + + _assign(prototype, Class.prototype); + + Class.prototype = prototype; + Class.prototype.constructor = Class; + Class.Interface = _assign({}, Super.Interface, Interface); + Class.extend = Super.extend; + addEventPoolingTo(Class); + return Class; + }; + + addEventPoolingTo(SyntheticEvent); + /** + * Helper to nullify syntheticEvent instance properties when destructing + * + * @param {String} propName + * @param {?object} getVal + * @return {object} defineProperty object + */ + + function getPooledWarningPropertyDefinition(propName, getVal) { + var isFunction = typeof getVal === 'function'; + return { + configurable: true, + set: set, + get: get, + }; + + function set(val) { + var action = isFunction ? 'setting the method' : 'setting the property'; + warn(action, 'This is effectively a no-op'); + return val; + } + + function get() { + var action = isFunction ? 'accessing the method' : 'accessing the property'; + var result = isFunction ? 'This is a no-op function' : 'This is set to null'; + warn(action, result); + return getVal; + } + + function warn(action, result) { + var warningCondition = false; + !warningCondition + ? warningWithoutStack$1( + false, + "This synthetic event is reused for performance reasons. If you're seeing this, " + + "you're %s `%s` on a released/nullified synthetic event. %s. " + + 'If you must keep the original synthetic event around, use event.persist(). ' + + 'See https://fb.me/react-event-pooling for more information.', + action, + propName, + result, + ) + : void 0; + } + } + + function getPooledEvent(dispatchConfig, targetInst, nativeEvent, nativeInst) { + var EventConstructor = this; + + if (EventConstructor.eventPool.length) { + var instance = EventConstructor.eventPool.pop(); + EventConstructor.call(instance, dispatchConfig, targetInst, nativeEvent, nativeInst); + return instance; + } + + return new EventConstructor(dispatchConfig, targetInst, nativeEvent, nativeInst); + } + + function releasePooledEvent(event) { + var EventConstructor = this; + + if (!(event instanceof EventConstructor)) { + { + throw Error('Trying to release an event instance into a pool of a different type.'); + } + } + + event.destructor(); + + if (EventConstructor.eventPool.length < EVENT_POOL_SIZE) { + EventConstructor.eventPool.push(event); + } + } + + function addEventPoolingTo(EventConstructor) { + EventConstructor.eventPool = []; + EventConstructor.getPooled = getPooledEvent; + EventConstructor.release = releasePooledEvent; + } + + /** + * @interface Event + * @see http://www.w3.org/TR/css3-animations/#AnimationEvent-interface + * @see https://developer.mozilla.org/en-US/docs/Web/API/AnimationEvent + */ + + var SyntheticAnimationEvent = SyntheticEvent.extend({ + animationName: null, + elapsedTime: null, + pseudoElement: null, + }); + + /** + * @interface Event + * @see http://www.w3.org/TR/clipboard-apis/ + */ + + var SyntheticClipboardEvent = SyntheticEvent.extend({ + clipboardData: function (event) { + return 'clipboardData' in event ? event.clipboardData : window.clipboardData; + }, + }); + + var SyntheticUIEvent = SyntheticEvent.extend({ + view: null, + detail: null, + }); + + /** + * @interface FocusEvent + * @see http://www.w3.org/TR/DOM-Level-3-Events/ + */ + + var SyntheticFocusEvent = SyntheticUIEvent.extend({ + relatedTarget: null, + }); + + /** + * `charCode` represents the actual "character code" and is safe to use with + * `String.fromCharCode`. As such, only keys that correspond to printable + * characters produce a valid `charCode`, the only exception to this is Enter. + * The Tab-key is considered non-printable and does not have a `charCode`, + * presumably because it does not produce a tab-character in browsers. + * + * @param {object} nativeEvent Native browser event. + * @return {number} Normalized `charCode` property. + */ + function getEventCharCode(nativeEvent) { + var charCode; + var keyCode = nativeEvent.keyCode; + + if ('charCode' in nativeEvent) { + charCode = nativeEvent.charCode; // FF does not set `charCode` for the Enter-key, check against `keyCode`. + + if (charCode === 0 && keyCode === 13) { + charCode = 13; + } + } else { + // IE8 does not implement `charCode`, but `keyCode` has the correct value. + charCode = keyCode; + } // IE and Edge (on Windows) and Chrome / Safari (on Windows and Linux) + // report Enter as charCode 10 when ctrl is pressed. + + if (charCode === 10) { + charCode = 13; + } // Some non-printable keys are reported in `charCode`/`keyCode`, discard them. + // Must not discard the (non-)printable Enter-key. + + if (charCode >= 32 || charCode === 13) { + return charCode; + } + + return 0; + } + + /** + * Normalization of deprecated HTML5 `key` values + * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names + */ + + var normalizeKey = { + Esc: 'Escape', + Spacebar: ' ', + Left: 'ArrowLeft', + Up: 'ArrowUp', + Right: 'ArrowRight', + Down: 'ArrowDown', + Del: 'Delete', + Win: 'OS', + Menu: 'ContextMenu', + Apps: 'ContextMenu', + Scroll: 'ScrollLock', + MozPrintableKey: 'Unidentified', + }; + /** + * Translation from legacy `keyCode` to HTML5 `key` + * Only special keys supported, all others depend on keyboard layout or browser + * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names + */ + + var translateToKey = { + 8: 'Backspace', + 9: 'Tab', + 12: 'Clear', + 13: 'Enter', + 16: 'Shift', + 17: 'Control', + 18: 'Alt', + 19: 'Pause', + 20: 'CapsLock', + 27: 'Escape', + 32: ' ', + 33: 'PageUp', + 34: 'PageDown', + 35: 'End', + 36: 'Home', + 37: 'ArrowLeft', + 38: 'ArrowUp', + 39: 'ArrowRight', + 40: 'ArrowDown', + 45: 'Insert', + 46: 'Delete', + 112: 'F1', + 113: 'F2', + 114: 'F3', + 115: 'F4', + 116: 'F5', + 117: 'F6', + 118: 'F7', + 119: 'F8', + 120: 'F9', + 121: 'F10', + 122: 'F11', + 123: 'F12', + 144: 'NumLock', + 145: 'ScrollLock', + 224: 'Meta', + }; + /** + * @param {object} nativeEvent Native browser event. + * @return {string} Normalized `key` property. + */ + + function getEventKey(nativeEvent) { + if (nativeEvent.key) { + // Normalize inconsistent values reported by browsers due to + // implementations of a working draft specification. + // FireFox implements `key` but returns `MozPrintableKey` for all + // printable characters (normalized to `Unidentified`), ignore it. + var key = normalizeKey[nativeEvent.key] || nativeEvent.key; + + if (key !== 'Unidentified') { + return key; + } + } // Browser does not implement `key`, polyfill as much of it as we can. + + if (nativeEvent.type === 'keypress') { + var charCode = getEventCharCode(nativeEvent); // The enter-key is technically both printable and non-printable and can + // thus be captured by `keypress`, no other non-printable key should. + + return charCode === 13 ? 'Enter' : String.fromCharCode(charCode); + } + + if (nativeEvent.type === 'keydown' || nativeEvent.type === 'keyup') { + // While user keyboard layout determines the actual meaning of each + // `keyCode` value, almost all function keys have a universal value. + return translateToKey[nativeEvent.keyCode] || 'Unidentified'; + } + + return ''; + } + + /** + * Translation from modifier key to the associated property in the event. + * @see http://www.w3.org/TR/DOM-Level-3-Events/#keys-Modifiers + */ + var modifierKeyToProp = { + Alt: 'altKey', + Control: 'ctrlKey', + Meta: 'metaKey', + Shift: 'shiftKey', + }; // Older browsers (Safari <= 10, iOS Safari <= 10.2) do not support + // getModifierState. If getModifierState is not supported, we map it to a set of + // modifier keys exposed by the event. In this case, Lock-keys are not supported. + + function modifierStateGetter(keyArg) { + var syntheticEvent = this; + var nativeEvent = syntheticEvent.nativeEvent; + + if (nativeEvent.getModifierState) { + return nativeEvent.getModifierState(keyArg); + } + + var keyProp = modifierKeyToProp[keyArg]; + return keyProp ? !!nativeEvent[keyProp] : false; + } + + function getEventModifierState(nativeEvent) { + return modifierStateGetter; + } + + /** + * @interface KeyboardEvent + * @see http://www.w3.org/TR/DOM-Level-3-Events/ + */ + + var SyntheticKeyboardEvent = SyntheticUIEvent.extend({ + key: getEventKey, + location: null, + ctrlKey: null, + shiftKey: null, + altKey: null, + metaKey: null, + repeat: null, + locale: null, + getModifierState: getEventModifierState, + // Legacy Interface + charCode: function (event) { + // `charCode` is the result of a KeyPress event and represents the value of + // the actual printable character. + // KeyPress is deprecated, but its replacement is not yet final and not + // implemented in any major browser. Only KeyPress has charCode. + if (event.type === 'keypress') { + return getEventCharCode(event); + } + + return 0; + }, + keyCode: function (event) { + // `keyCode` is the result of a KeyDown/Up event and represents the value of + // physical keyboard key. + // The actual meaning of the value depends on the users' keyboard layout + // which cannot be detected. Assuming that it is a US keyboard layout + // provides a surprisingly accurate mapping for US and European users. + // Due to this, it is left to the user to implement at this time. + if (event.type === 'keydown' || event.type === 'keyup') { + return event.keyCode; + } + + return 0; + }, + which: function (event) { + // `which` is an alias for either `keyCode` or `charCode` depending on the + // type of the event. + if (event.type === 'keypress') { + return getEventCharCode(event); + } + + if (event.type === 'keydown' || event.type === 'keyup') { + return event.keyCode; + } + + return 0; + }, + }); + + var previousScreenX = 0; + var previousScreenY = 0; // Use flags to signal movementX/Y has already been set + + var isMovementXSet = false; + var isMovementYSet = false; + /** + * @interface MouseEvent + * @see http://www.w3.org/TR/DOM-Level-3-Events/ + */ + + var SyntheticMouseEvent = SyntheticUIEvent.extend({ + screenX: null, + screenY: null, + clientX: null, + clientY: null, + pageX: null, + pageY: null, + ctrlKey: null, + shiftKey: null, + altKey: null, + metaKey: null, + getModifierState: getEventModifierState, + button: null, + buttons: null, + relatedTarget: function (event) { + return ( + event.relatedTarget || + (event.fromElement === event.srcElement ? event.toElement : event.fromElement) + ); + }, + movementX: function (event) { + if ('movementX' in event) { + return event.movementX; + } + + var screenX = previousScreenX; + previousScreenX = event.screenX; + + if (!isMovementXSet) { + isMovementXSet = true; + return 0; + } + + return event.type === 'mousemove' ? event.screenX - screenX : 0; + }, + movementY: function (event) { + if ('movementY' in event) { + return event.movementY; + } + + var screenY = previousScreenY; + previousScreenY = event.screenY; + + if (!isMovementYSet) { + isMovementYSet = true; + return 0; + } + + return event.type === 'mousemove' ? event.screenY - screenY : 0; + }, + }); + + /** + * @interface PointerEvent + * @see http://www.w3.org/TR/pointerevents/ + */ + + var SyntheticPointerEvent = SyntheticMouseEvent.extend({ + pointerId: null, + width: null, + height: null, + pressure: null, + tangentialPressure: null, + tiltX: null, + tiltY: null, + twist: null, + pointerType: null, + isPrimary: null, + }); + + /** + * @interface DragEvent + * @see http://www.w3.org/TR/DOM-Level-3-Events/ + */ + + var SyntheticDragEvent = SyntheticMouseEvent.extend({ + dataTransfer: null, + }); + + /** + * @interface TouchEvent + * @see http://www.w3.org/TR/touch-events/ + */ + + var SyntheticTouchEvent = SyntheticUIEvent.extend({ + touches: null, + targetTouches: null, + changedTouches: null, + altKey: null, + metaKey: null, + ctrlKey: null, + shiftKey: null, + getModifierState: getEventModifierState, + }); + + /** + * @interface Event + * @see http://www.w3.org/TR/2009/WD-css3-transitions-20090320/#transition-events- + * @see https://developer.mozilla.org/en-US/docs/Web/API/TransitionEvent + */ + + var SyntheticTransitionEvent = SyntheticEvent.extend({ + propertyName: null, + elapsedTime: null, + pseudoElement: null, + }); + + /** + * @interface WheelEvent + * @see http://www.w3.org/TR/DOM-Level-3-Events/ + */ + + var SyntheticWheelEvent = SyntheticMouseEvent.extend({ + deltaX: function (event) { + return 'deltaX' in event + ? event.deltaX // Fallback to `wheelDeltaX` for Webkit and normalize (right is positive). + : 'wheelDeltaX' in event + ? -event.wheelDeltaX + : 0; + }, + deltaY: function (event) { + return 'deltaY' in event + ? event.deltaY // Fallback to `wheelDeltaY` for Webkit and normalize (down is positive). + : 'wheelDeltaY' in event + ? -event.wheelDeltaY // Fallback to `wheelDelta` for IE<9 and normalize (down is positive). + : 'wheelDelta' in event + ? -event.wheelDelta + : 0; + }, + deltaZ: null, + // Browsers without "deltaMode" is reporting in raw wheel delta where one + // notch on the scroll is always +/- 120, roughly equivalent to pixels. + // A good approximation of DOM_DELTA_LINE (1) is 5% of viewport size or + // ~40 pixels, for DOM_DELTA_SCREEN (2) it is 87.5% of viewport size. + deltaMode: null, + }); + + /** + * Turns + * ['abort', ...] + * into + * eventTypes = { + * 'abort': { + * phasedRegistrationNames: { + * bubbled: 'onAbort', + * captured: 'onAbortCapture', + * }, + * dependencies: [TOP_ABORT], + * }, + * ... + * }; + * topLevelEventsToDispatchConfig = new Map([ + * [TOP_ABORT, { sameConfig }], + * ]); + */ + + var eventTuples = [ + // Discrete events + [TOP_BLUR, 'blur', DiscreteEvent], + [TOP_CANCEL, 'cancel', DiscreteEvent], + [TOP_CLICK, 'click', DiscreteEvent], + [TOP_CLOSE, 'close', DiscreteEvent], + [TOP_CONTEXT_MENU, 'contextMenu', DiscreteEvent], + [TOP_COPY, 'copy', DiscreteEvent], + [TOP_CUT, 'cut', DiscreteEvent], + [TOP_AUX_CLICK, 'auxClick', DiscreteEvent], + [TOP_DOUBLE_CLICK, 'doubleClick', DiscreteEvent], + [TOP_DRAG_END, 'dragEnd', DiscreteEvent], + [TOP_DRAG_START, 'dragStart', DiscreteEvent], + [TOP_DROP, 'drop', DiscreteEvent], + [TOP_FOCUS, 'focus', DiscreteEvent], + [TOP_INPUT, 'input', DiscreteEvent], + [TOP_INVALID, 'invalid', DiscreteEvent], + [TOP_KEY_DOWN, 'keyDown', DiscreteEvent], + [TOP_KEY_PRESS, 'keyPress', DiscreteEvent], + [TOP_KEY_UP, 'keyUp', DiscreteEvent], + [TOP_MOUSE_DOWN, 'mouseDown', DiscreteEvent], + [TOP_MOUSE_UP, 'mouseUp', DiscreteEvent], + [TOP_PASTE, 'paste', DiscreteEvent], + [TOP_PAUSE, 'pause', DiscreteEvent], + [TOP_PLAY, 'play', DiscreteEvent], + [TOP_POINTER_CANCEL, 'pointerCancel', DiscreteEvent], + [TOP_POINTER_DOWN, 'pointerDown', DiscreteEvent], + [TOP_POINTER_UP, 'pointerUp', DiscreteEvent], + [TOP_RATE_CHANGE, 'rateChange', DiscreteEvent], + [TOP_RESET, 'reset', DiscreteEvent], + [TOP_SEEKED, 'seeked', DiscreteEvent], + [TOP_SUBMIT, 'submit', DiscreteEvent], + [TOP_TOUCH_CANCEL, 'touchCancel', DiscreteEvent], + [TOP_TOUCH_END, 'touchEnd', DiscreteEvent], + [TOP_TOUCH_START, 'touchStart', DiscreteEvent], + [TOP_VOLUME_CHANGE, 'volumeChange', DiscreteEvent], // User-blocking events + [TOP_DRAG, 'drag', UserBlockingEvent], + [TOP_DRAG_ENTER, 'dragEnter', UserBlockingEvent], + [TOP_DRAG_EXIT, 'dragExit', UserBlockingEvent], + [TOP_DRAG_LEAVE, 'dragLeave', UserBlockingEvent], + [TOP_DRAG_OVER, 'dragOver', UserBlockingEvent], + [TOP_MOUSE_MOVE, 'mouseMove', UserBlockingEvent], + [TOP_MOUSE_OUT, 'mouseOut', UserBlockingEvent], + [TOP_MOUSE_OVER, 'mouseOver', UserBlockingEvent], + [TOP_POINTER_MOVE, 'pointerMove', UserBlockingEvent], + [TOP_POINTER_OUT, 'pointerOut', UserBlockingEvent], + [TOP_POINTER_OVER, 'pointerOver', UserBlockingEvent], + [TOP_SCROLL, 'scroll', UserBlockingEvent], + [TOP_TOGGLE, 'toggle', UserBlockingEvent], + [TOP_TOUCH_MOVE, 'touchMove', UserBlockingEvent], + [TOP_WHEEL, 'wheel', UserBlockingEvent], // Continuous events + [TOP_ABORT, 'abort', ContinuousEvent], + [TOP_ANIMATION_END, 'animationEnd', ContinuousEvent], + [TOP_ANIMATION_ITERATION, 'animationIteration', ContinuousEvent], + [TOP_ANIMATION_START, 'animationStart', ContinuousEvent], + [TOP_CAN_PLAY, 'canPlay', ContinuousEvent], + [TOP_CAN_PLAY_THROUGH, 'canPlayThrough', ContinuousEvent], + [TOP_DURATION_CHANGE, 'durationChange', ContinuousEvent], + [TOP_EMPTIED, 'emptied', ContinuousEvent], + [TOP_ENCRYPTED, 'encrypted', ContinuousEvent], + [TOP_ENDED, 'ended', ContinuousEvent], + [TOP_ERROR, 'error', ContinuousEvent], + [TOP_GOT_POINTER_CAPTURE, 'gotPointerCapture', ContinuousEvent], + [TOP_LOAD, 'load', ContinuousEvent], + [TOP_LOADED_DATA, 'loadedData', ContinuousEvent], + [TOP_LOADED_METADATA, 'loadedMetadata', ContinuousEvent], + [TOP_LOAD_START, 'loadStart', ContinuousEvent], + [TOP_LOST_POINTER_CAPTURE, 'lostPointerCapture', ContinuousEvent], + [TOP_PLAYING, 'playing', ContinuousEvent], + [TOP_PROGRESS, 'progress', ContinuousEvent], + [TOP_SEEKING, 'seeking', ContinuousEvent], + [TOP_STALLED, 'stalled', ContinuousEvent], + [TOP_SUSPEND, 'suspend', ContinuousEvent], + [TOP_TIME_UPDATE, 'timeUpdate', ContinuousEvent], + [TOP_TRANSITION_END, 'transitionEnd', ContinuousEvent], + [TOP_WAITING, 'waiting', ContinuousEvent], + ]; + var eventTypes = {}; + var topLevelEventsToDispatchConfig = {}; + + for (var i = 0; i < eventTuples.length; i++) { + var eventTuple = eventTuples[i]; + var topEvent = eventTuple[0]; + var event = eventTuple[1]; + var eventPriority = eventTuple[2]; + var capitalizedEvent = event[0].toUpperCase() + event.slice(1); + var onEvent = 'on' + capitalizedEvent; + var config = { + phasedRegistrationNames: { + bubbled: onEvent, + captured: onEvent + 'Capture', + }, + dependencies: [topEvent], + eventPriority: eventPriority, + }; + eventTypes[event] = config; + topLevelEventsToDispatchConfig[topEvent] = config; + } // Only used in DEV for exhaustiveness validation. + + var knownHTMLTopLevelTypes = [ + TOP_ABORT, + TOP_CANCEL, + TOP_CAN_PLAY, + TOP_CAN_PLAY_THROUGH, + TOP_CLOSE, + TOP_DURATION_CHANGE, + TOP_EMPTIED, + TOP_ENCRYPTED, + TOP_ENDED, + TOP_ERROR, + TOP_INPUT, + TOP_INVALID, + TOP_LOAD, + TOP_LOADED_DATA, + TOP_LOADED_METADATA, + TOP_LOAD_START, + TOP_PAUSE, + TOP_PLAY, + TOP_PLAYING, + TOP_PROGRESS, + TOP_RATE_CHANGE, + TOP_RESET, + TOP_SEEKED, + TOP_SEEKING, + TOP_STALLED, + TOP_SUBMIT, + TOP_SUSPEND, + TOP_TIME_UPDATE, + TOP_TOGGLE, + TOP_VOLUME_CHANGE, + TOP_WAITING, + ]; + var SimpleEventPlugin = { + eventTypes: eventTypes, + getEventPriority: function (topLevelType) { + var config = topLevelEventsToDispatchConfig[topLevelType]; + return config !== undefined ? config.eventPriority : ContinuousEvent; + }, + extractEvents: function ( + topLevelType, + targetInst, + nativeEvent, + nativeEventTarget, + eventSystemFlags, + ) { + var dispatchConfig = topLevelEventsToDispatchConfig[topLevelType]; + + if (!dispatchConfig) { + return null; + } + + var EventConstructor; + + switch (topLevelType) { + case TOP_KEY_PRESS: + // Firefox creates a keypress event for function keys too. This removes + // the unwanted keypress events. Enter is however both printable and + // non-printable. One would expect Tab to be as well (but it isn't). + if (getEventCharCode(nativeEvent) === 0) { + return null; + } + + /* falls through */ + + case TOP_KEY_DOWN: + case TOP_KEY_UP: + EventConstructor = SyntheticKeyboardEvent; + break; + + case TOP_BLUR: + case TOP_FOCUS: + EventConstructor = SyntheticFocusEvent; + break; + + case TOP_CLICK: + // Firefox creates a click event on right mouse clicks. This removes the + // unwanted click events. + if (nativeEvent.button === 2) { + return null; + } + + /* falls through */ + + case TOP_AUX_CLICK: + case TOP_DOUBLE_CLICK: + case TOP_MOUSE_DOWN: + case TOP_MOUSE_MOVE: + case TOP_MOUSE_UP: // TODO: Disabled elements should not respond to mouse events + + /* falls through */ + + case TOP_MOUSE_OUT: + case TOP_MOUSE_OVER: + case TOP_CONTEXT_MENU: + EventConstructor = SyntheticMouseEvent; + break; + + case TOP_DRAG: + case TOP_DRAG_END: + case TOP_DRAG_ENTER: + case TOP_DRAG_EXIT: + case TOP_DRAG_LEAVE: + case TOP_DRAG_OVER: + case TOP_DRAG_START: + case TOP_DROP: + EventConstructor = SyntheticDragEvent; + break; + + case TOP_TOUCH_CANCEL: + case TOP_TOUCH_END: + case TOP_TOUCH_MOVE: + case TOP_TOUCH_START: + EventConstructor = SyntheticTouchEvent; + break; + + case TOP_ANIMATION_END: + case TOP_ANIMATION_ITERATION: + case TOP_ANIMATION_START: + EventConstructor = SyntheticAnimationEvent; + break; + + case TOP_TRANSITION_END: + EventConstructor = SyntheticTransitionEvent; + break; + + case TOP_SCROLL: + EventConstructor = SyntheticUIEvent; + break; + + case TOP_WHEEL: + EventConstructor = SyntheticWheelEvent; + break; + + case TOP_COPY: + case TOP_CUT: + case TOP_PASTE: + EventConstructor = SyntheticClipboardEvent; + break; + + case TOP_GOT_POINTER_CAPTURE: + case TOP_LOST_POINTER_CAPTURE: + case TOP_POINTER_CANCEL: + case TOP_POINTER_DOWN: + case TOP_POINTER_MOVE: + case TOP_POINTER_OUT: + case TOP_POINTER_OVER: + case TOP_POINTER_UP: + EventConstructor = SyntheticPointerEvent; + break; + + default: + { + if (knownHTMLTopLevelTypes.indexOf(topLevelType) === -1) { + warningWithoutStack$1( + false, + 'SimpleEventPlugin: Unhandled event type, `%s`. This warning ' + + 'is likely caused by a bug in React. Please file an issue.', + topLevelType, + ); + } + } // HTML Events + // @see http://www.w3.org/TR/html5/index.html#events-0 + + EventConstructor = SyntheticEvent; + break; + } + + var event = EventConstructor.getPooled( + dispatchConfig, + targetInst, + nativeEvent, + nativeEventTarget, + ); + accumulateTwoPhaseDispatches(event); + return event; + }, + }; + + var passiveBrowserEventsSupported = false; // Check if browser support events with passive listeners + // https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#Safely_detecting_option_support + + if (enableFlareAPI && canUseDOM) { + try { + var options = {}; // $FlowFixMe: Ignore Flow complaining about needing a value + + Object.defineProperty(options, 'passive', { + get: function () { + passiveBrowserEventsSupported = true; + }, + }); + window.addEventListener('test', options, options); + window.removeEventListener('test', options, options); + } catch (e) { + passiveBrowserEventsSupported = false; + } + } + + // Intentionally not named imports because Rollup would use dynamic dispatch for + // CommonJS interop named imports. + var UserBlockingPriority$1 = Scheduler.unstable_UserBlockingPriority; + var runWithPriority$1 = Scheduler.unstable_runWithPriority; + var getEventPriority = SimpleEventPlugin.getEventPriority; + var CALLBACK_BOOKKEEPING_POOL_SIZE = 10; + var callbackBookkeepingPool = []; + + /** + * Find the deepest React component completely containing the root of the + * passed-in instance (for use when entire React trees are nested within each + * other). If React trees are not nested, returns null. + */ + function findRootContainerNode(inst) { + if (inst.tag === HostRoot) { + return inst.stateNode.containerInfo; + } // TODO: It may be a good idea to cache this to prevent unnecessary DOM + // traversal, but caching is difficult to do correctly without using a + // mutation observer to listen for all DOM changes. + + while (inst.return) { + inst = inst.return; + } + + if (inst.tag !== HostRoot) { + // This can happen if we're in a detached tree. + return null; + } + + return inst.stateNode.containerInfo; + } // Used to store ancestor hierarchy in top level callback + + function getTopLevelCallbackBookKeeping(topLevelType, nativeEvent, targetInst, eventSystemFlags) { + if (callbackBookkeepingPool.length) { + var instance = callbackBookkeepingPool.pop(); + instance.topLevelType = topLevelType; + instance.eventSystemFlags = eventSystemFlags; + instance.nativeEvent = nativeEvent; + instance.targetInst = targetInst; + return instance; + } + + return { + topLevelType: topLevelType, + eventSystemFlags: eventSystemFlags, + nativeEvent: nativeEvent, + targetInst: targetInst, + ancestors: [], + }; + } + + function releaseTopLevelCallbackBookKeeping(instance) { + instance.topLevelType = null; + instance.nativeEvent = null; + instance.targetInst = null; + instance.ancestors.length = 0; + + if (callbackBookkeepingPool.length < CALLBACK_BOOKKEEPING_POOL_SIZE) { + callbackBookkeepingPool.push(instance); + } + } + + function handleTopLevel(bookKeeping) { + var targetInst = bookKeeping.targetInst; // Loop through the hierarchy, in case there's any nested components. + // It's important that we build the array of ancestors before calling any + // event handlers, because event handlers can modify the DOM, leading to + // inconsistencies with ReactMount's node cache. See #1105. + + var ancestor = targetInst; + + do { + if (!ancestor) { + var ancestors = bookKeeping.ancestors; + ancestors.push(ancestor); + break; + } + + var root = findRootContainerNode(ancestor); + + if (!root) { + break; + } + + var tag = ancestor.tag; + + if (tag === HostComponent || tag === HostText) { + bookKeeping.ancestors.push(ancestor); + } + + ancestor = getClosestInstanceFromNode(root); + } while (ancestor); + + for (var i = 0; i < bookKeeping.ancestors.length; i++) { + targetInst = bookKeeping.ancestors[i]; + var eventTarget = getEventTarget(bookKeeping.nativeEvent); + var topLevelType = bookKeeping.topLevelType; + var nativeEvent = bookKeeping.nativeEvent; + runExtractedPluginEventsInBatch( + topLevelType, + targetInst, + nativeEvent, + eventTarget, + bookKeeping.eventSystemFlags, + ); + } + } // TODO: can we stop exporting these? + + var _enabled = true; + function setEnabled(enabled) { + _enabled = !!enabled; + } + function isEnabled() { + return _enabled; + } + function trapBubbledEvent(topLevelType, element) { + trapEventForPluginEventSystem(element, topLevelType, false); + } + function trapCapturedEvent(topLevelType, element) { + trapEventForPluginEventSystem(element, topLevelType, true); + } + function trapEventForResponderEventSystem(element, topLevelType, passive) { + if (enableFlareAPI) { + var rawEventName = getRawEventName(topLevelType); + var eventFlags = RESPONDER_EVENT_SYSTEM; // If passive option is not supported, then the event will be + // active and not passive, but we flag it as using not being + // supported too. This way the responder event plugins know, + // and can provide polyfills if needed. + + if (passive) { + if (passiveBrowserEventsSupported) { + eventFlags |= IS_PASSIVE; + } else { + eventFlags |= IS_ACTIVE; + eventFlags |= PASSIVE_NOT_SUPPORTED; + passive = false; + } + } else { + eventFlags |= IS_ACTIVE; + } // Check if interactive and wrap in discreteUpdates + + var listener = dispatchEvent.bind(null, topLevelType, eventFlags); + + if (passiveBrowserEventsSupported) { + addEventCaptureListenerWithPassiveFlag(element, rawEventName, listener, passive); + } else { + addEventCaptureListener(element, rawEventName, listener); + } + } + } + + function trapEventForPluginEventSystem(element, topLevelType, capture) { + var listener; + + switch (getEventPriority(topLevelType)) { + case DiscreteEvent: + listener = dispatchDiscreteEvent.bind(null, topLevelType, PLUGIN_EVENT_SYSTEM); + break; + + case UserBlockingEvent: + listener = dispatchUserBlockingUpdate.bind(null, topLevelType, PLUGIN_EVENT_SYSTEM); + break; + + case ContinuousEvent: + default: + listener = dispatchEvent.bind(null, topLevelType, PLUGIN_EVENT_SYSTEM); + break; + } + + var rawEventName = getRawEventName(topLevelType); + + if (capture) { + addEventCaptureListener(element, rawEventName, listener); + } else { + addEventBubbleListener(element, rawEventName, listener); + } + } + + function dispatchDiscreteEvent(topLevelType, eventSystemFlags, nativeEvent) { + flushDiscreteUpdatesIfNeeded(nativeEvent.timeStamp); + discreteUpdates(dispatchEvent, topLevelType, eventSystemFlags, nativeEvent); + } + + function dispatchUserBlockingUpdate(topLevelType, eventSystemFlags, nativeEvent) { + runWithPriority$1( + UserBlockingPriority$1, + dispatchEvent.bind(null, topLevelType, eventSystemFlags, nativeEvent), + ); + } + + function dispatchEventForPluginEventSystem( + topLevelType, + eventSystemFlags, + nativeEvent, + targetInst, + ) { + var bookKeeping = getTopLevelCallbackBookKeeping( + topLevelType, + nativeEvent, + targetInst, + eventSystemFlags, + ); + + try { + // Event queue being processed in the same cycle allows + // `preventDefault`. + batchedEventUpdates(handleTopLevel, bookKeeping); + } finally { + releaseTopLevelCallbackBookKeeping(bookKeeping); + } + } + + function dispatchEvent(topLevelType, eventSystemFlags, nativeEvent) { + if (!_enabled) { + return; + } + + if (hasQueuedDiscreteEvents() && isReplayableDiscreteEvent(topLevelType)) { + // If we already have a queue of discrete events, and this is another discrete + // event, then we can't dispatch it regardless of its target, since they + // need to dispatch in order. + queueDiscreteEvent( + null, // Flags that we're not actually blocked on anything as far as we know. + topLevelType, + eventSystemFlags, + nativeEvent, + ); + return; + } + + var blockedOn = attemptToDispatchEvent(topLevelType, eventSystemFlags, nativeEvent); + + if (blockedOn === null) { + // We successfully dispatched this event. + clearIfContinuousEvent(topLevelType, nativeEvent); + return; + } + + if (isReplayableDiscreteEvent(topLevelType)) { + // This this to be replayed later once the target is available. + queueDiscreteEvent(blockedOn, topLevelType, eventSystemFlags, nativeEvent); + return; + } + + if (queueIfContinuousEvent(blockedOn, topLevelType, eventSystemFlags, nativeEvent)) { + return; + } // We need to clear only if we didn't queue because + // queueing is accummulative. + + clearIfContinuousEvent(topLevelType, nativeEvent); // This is not replayable so we'll invoke it but without a target, + // in case the event system needs to trace it. + + if (enableFlareAPI) { + if (eventSystemFlags & PLUGIN_EVENT_SYSTEM) { + dispatchEventForPluginEventSystem(topLevelType, eventSystemFlags, nativeEvent, null); + } + + if (eventSystemFlags & RESPONDER_EVENT_SYSTEM) { + // React Flare event system + dispatchEventForResponderEventSystem( + topLevelType, + null, + nativeEvent, + getEventTarget(nativeEvent), + eventSystemFlags, + ); + } + } else { + dispatchEventForPluginEventSystem(topLevelType, eventSystemFlags, nativeEvent, null); + } + } // Attempt dispatching an event. Returns a SuspenseInstance or Container if it's blocked. + + function attemptToDispatchEvent(topLevelType, eventSystemFlags, nativeEvent) { + // TODO: Warn if _enabled is false. + var nativeEventTarget = getEventTarget(nativeEvent); + var targetInst = getClosestInstanceFromNode(nativeEventTarget); + + if (targetInst !== null) { + var nearestMounted = getNearestMountedFiber(targetInst); + + if (nearestMounted === null) { + // This tree has been unmounted already. Dispatch without a target. + targetInst = null; + } else { + var tag = nearestMounted.tag; + + if (tag === SuspenseComponent) { + var instance = getSuspenseInstanceFromFiber(nearestMounted); + + if (instance !== null) { + // Queue the event to be replayed later. Abort dispatching since we + // don't want this event dispatched twice through the event system. + // TODO: If this is the first discrete event in the queue. Schedule an increased + // priority for this boundary. + return instance; + } // This shouldn't happen, something went wrong but to avoid blocking + // the whole system, dispatch the event without a target. + // TODO: Warn. + + targetInst = null; + } else if (tag === HostRoot) { + var root = nearestMounted.stateNode; + + if (root.hydrate) { + // If this happens during a replay something went wrong and it might block + // the whole system. + return getContainerFromFiber(nearestMounted); + } + + targetInst = null; + } else if (nearestMounted !== targetInst) { + // If we get an event (ex: img onload) before committing that + // component's mount, ignore it for now (that is, treat it as if it was an + // event on a non-React tree). We might also consider queueing events and + // dispatching them after the mount. + targetInst = null; + } + } + } + + if (enableFlareAPI) { + if (eventSystemFlags & PLUGIN_EVENT_SYSTEM) { + dispatchEventForPluginEventSystem(topLevelType, eventSystemFlags, nativeEvent, targetInst); + } + + if (eventSystemFlags & RESPONDER_EVENT_SYSTEM) { + // React Flare event system + dispatchEventForResponderEventSystem( + topLevelType, + targetInst, + nativeEvent, + nativeEventTarget, + eventSystemFlags, + ); + } + } else { + dispatchEventForPluginEventSystem(topLevelType, eventSystemFlags, nativeEvent, targetInst); + } // We're not blocked on anything. + + return null; + } + + /** + * Checks if an event is supported in the current execution environment. + * + * NOTE: This will not work correctly for non-generic events such as `change`, + * `reset`, `load`, `error`, and `select`. + * + * Borrows from Modernizr. + * + * @param {string} eventNameSuffix Event name, e.g. "click". + * @return {boolean} True if the event is supported. + * @internal + * @license Modernizr 3.0.0pre (Custom Build) | MIT + */ + + function isEventSupported(eventNameSuffix) { + if (!canUseDOM) { + return false; + } + + var eventName = 'on' + eventNameSuffix; + var isSupported = eventName in document; + + if (!isSupported) { + var element = document.createElement('div'); + element.setAttribute(eventName, 'return;'); + isSupported = typeof element[eventName] === 'function'; + } + + return isSupported; + } + + /** + * Summary of `ReactBrowserEventEmitter` event handling: + * + * - Top-level delegation is used to trap most native browser events. This + * may only occur in the main thread and is the responsibility of + * ReactDOMEventListener, which is injected and can therefore support + * pluggable event sources. This is the only work that occurs in the main + * thread. + * + * - We normalize and de-duplicate events to account for browser quirks. This + * may be done in the worker thread. + * + * - Forward these native events (with the associated top-level type used to + * trap it) to `EventPluginHub`, which in turn will ask plugins if they want + * to extract any synthetic events. + * + * - The `EventPluginHub` will then process each event by annotating them with + * "dispatches", a sequence of listeners and IDs that care about that event. + * + * - The `EventPluginHub` then dispatches the events. + * + * Overview of React and the event system: + * + * +------------+ . + * | DOM | . + * +------------+ . + * | . + * v . + * +------------+ . + * | ReactEvent | . + * | Listener | . + * +------------+ . +-----------+ + * | . +--------+|SimpleEvent| + * | . | |Plugin | + * +-----|------+ . v +-----------+ + * | | | . +--------------+ +------------+ + * | +-----------.--->|EventPluginHub| | Event | + * | | . | | +-----------+ | Propagators| + * | ReactEvent | . | | |TapEvent | |------------| + * | Emitter | . | |<---+|Plugin | |other plugin| + * | | . | | +-----------+ | utilities | + * | +-----------.--->| | +------------+ + * | | | . +--------------+ + * +-----|------+ . ^ +-----------+ + * | . | |Enter/Leave| + * + . +-------+|Plugin | + * +-------------+ . +-----------+ + * | application | . + * |-------------| . + * | | . + * | | . + * +-------------+ . + * . + * React Core . General Purpose Event Plugin System + */ + + var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map; + var elementListeningSets = new PossiblyWeakMap(); + function getListeningSetForElement(element) { + var listeningSet = elementListeningSets.get(element); + + if (listeningSet === undefined) { + listeningSet = new Set(); + elementListeningSets.set(element, listeningSet); + } + + return listeningSet; + } + /** + * We listen for bubbled touch events on the document object. + * + * Firefox v8.01 (and possibly others) exhibited strange behavior when + * mounting `onmousemove` events at some node that was not the document + * element. The symptoms were that if your mouse is not moving over something + * contained within that mount point (for example on the background) the + * top-level listeners for `onmousemove` won't be called. However, if you + * register the `mousemove` on the document object, then it will of course + * catch all `mousemove`s. This along with iOS quirks, justifies restricting + * top-level listeners to the document object only, at least for these + * movement types of events and possibly all events. + * + * @see http://www.quirksmode.org/blog/archives/2010/09/click_event_del.html + * + * Also, `keyup`/`keypress`/`keydown` do not bubble to the window on IE, but + * they bubble to document. + * + * @param {string} registrationName Name of listener (e.g. `onClick`). + * @param {object} mountAt Container where to mount the listener + */ + + function listenTo(registrationName, mountAt) { + var listeningSet = getListeningSetForElement(mountAt); + var dependencies = registrationNameDependencies[registrationName]; + + for (var i = 0; i < dependencies.length; i++) { + var dependency = dependencies[i]; + listenToTopLevel(dependency, mountAt, listeningSet); + } + } + function listenToTopLevel(topLevelType, mountAt, listeningSet) { + if (!listeningSet.has(topLevelType)) { + switch (topLevelType) { + case TOP_SCROLL: + trapCapturedEvent(TOP_SCROLL, mountAt); + break; + + case TOP_FOCUS: + case TOP_BLUR: + trapCapturedEvent(TOP_FOCUS, mountAt); + trapCapturedEvent(TOP_BLUR, mountAt); // We set the flag for a single dependency later in this function, + // but this ensures we mark both as attached rather than just one. + + listeningSet.add(TOP_BLUR); + listeningSet.add(TOP_FOCUS); + break; + + case TOP_CANCEL: + case TOP_CLOSE: + if (isEventSupported(getRawEventName(topLevelType))) { + trapCapturedEvent(topLevelType, mountAt); + } + + break; + + case TOP_INVALID: + case TOP_SUBMIT: + case TOP_RESET: + // We listen to them on the target DOM elements. + // Some of them bubble so we don't want them to fire twice. + break; + + default: + // By default, listen on the top level to all non-media events. + // Media events don't bubble so adding the listener wouldn't do anything. + var isMediaEvent = mediaEventTypes.indexOf(topLevelType) !== -1; + + if (!isMediaEvent) { + trapBubbledEvent(topLevelType, mountAt); + } + + break; + } + + listeningSet.add(topLevelType); + } + } + function isListeningToAllDependencies(registrationName, mountAt) { + var listeningSet = getListeningSetForElement(mountAt); + var dependencies = registrationNameDependencies[registrationName]; + + for (var i = 0; i < dependencies.length; i++) { + var dependency = dependencies[i]; + + if (!listeningSet.has(dependency)) { + return false; + } + } + + return true; + } + + // List derived from Gecko source code: + // https://github.com/mozilla/gecko-dev/blob/4e638efc71/layout/style/test/property_database.js + var shorthandToLonghand = { + animation: [ + 'animationDelay', + 'animationDirection', + 'animationDuration', + 'animationFillMode', + 'animationIterationCount', + 'animationName', + 'animationPlayState', + 'animationTimingFunction', + ], + background: [ + 'backgroundAttachment', + 'backgroundClip', + 'backgroundColor', + 'backgroundImage', + 'backgroundOrigin', + 'backgroundPositionX', + 'backgroundPositionY', + 'backgroundRepeat', + 'backgroundSize', + ], + backgroundPosition: ['backgroundPositionX', 'backgroundPositionY'], + border: [ + 'borderBottomColor', + 'borderBottomStyle', + 'borderBottomWidth', + 'borderImageOutset', + 'borderImageRepeat', + 'borderImageSlice', + 'borderImageSource', + 'borderImageWidth', + 'borderLeftColor', + 'borderLeftStyle', + 'borderLeftWidth', + 'borderRightColor', + 'borderRightStyle', + 'borderRightWidth', + 'borderTopColor', + 'borderTopStyle', + 'borderTopWidth', + ], + borderBlockEnd: ['borderBlockEndColor', 'borderBlockEndStyle', 'borderBlockEndWidth'], + borderBlockStart: ['borderBlockStartColor', 'borderBlockStartStyle', 'borderBlockStartWidth'], + borderBottom: ['borderBottomColor', 'borderBottomStyle', 'borderBottomWidth'], + borderColor: ['borderBottomColor', 'borderLeftColor', 'borderRightColor', 'borderTopColor'], + borderImage: [ + 'borderImageOutset', + 'borderImageRepeat', + 'borderImageSlice', + 'borderImageSource', + 'borderImageWidth', + ], + borderInlineEnd: ['borderInlineEndColor', 'borderInlineEndStyle', 'borderInlineEndWidth'], + borderInlineStart: ['borderInlineStartColor', 'borderInlineStartStyle', 'borderInlineStartWidth'], + borderLeft: ['borderLeftColor', 'borderLeftStyle', 'borderLeftWidth'], + borderRadius: [ + 'borderBottomLeftRadius', + 'borderBottomRightRadius', + 'borderTopLeftRadius', + 'borderTopRightRadius', + ], + borderRight: ['borderRightColor', 'borderRightStyle', 'borderRightWidth'], + borderStyle: ['borderBottomStyle', 'borderLeftStyle', 'borderRightStyle', 'borderTopStyle'], + borderTop: ['borderTopColor', 'borderTopStyle', 'borderTopWidth'], + borderWidth: ['borderBottomWidth', 'borderLeftWidth', 'borderRightWidth', 'borderTopWidth'], + columnRule: ['columnRuleColor', 'columnRuleStyle', 'columnRuleWidth'], + columns: ['columnCount', 'columnWidth'], + flex: ['flexBasis', 'flexGrow', 'flexShrink'], + flexFlow: ['flexDirection', 'flexWrap'], + font: [ + 'fontFamily', + 'fontFeatureSettings', + 'fontKerning', + 'fontLanguageOverride', + 'fontSize', + 'fontSizeAdjust', + 'fontStretch', + 'fontStyle', + 'fontVariant', + 'fontVariantAlternates', + 'fontVariantCaps', + 'fontVariantEastAsian', + 'fontVariantLigatures', + 'fontVariantNumeric', + 'fontVariantPosition', + 'fontWeight', + 'lineHeight', + ], + fontVariant: [ + 'fontVariantAlternates', + 'fontVariantCaps', + 'fontVariantEastAsian', + 'fontVariantLigatures', + 'fontVariantNumeric', + 'fontVariantPosition', + ], + gap: ['columnGap', 'rowGap'], + grid: [ + 'gridAutoColumns', + 'gridAutoFlow', + 'gridAutoRows', + 'gridTemplateAreas', + 'gridTemplateColumns', + 'gridTemplateRows', + ], + gridArea: ['gridColumnEnd', 'gridColumnStart', 'gridRowEnd', 'gridRowStart'], + gridColumn: ['gridColumnEnd', 'gridColumnStart'], + gridColumnGap: ['columnGap'], + gridGap: ['columnGap', 'rowGap'], + gridRow: ['gridRowEnd', 'gridRowStart'], + gridRowGap: ['rowGap'], + gridTemplate: ['gridTemplateAreas', 'gridTemplateColumns', 'gridTemplateRows'], + listStyle: ['listStyleImage', 'listStylePosition', 'listStyleType'], + margin: ['marginBottom', 'marginLeft', 'marginRight', 'marginTop'], + marker: ['markerEnd', 'markerMid', 'markerStart'], + mask: [ + 'maskClip', + 'maskComposite', + 'maskImage', + 'maskMode', + 'maskOrigin', + 'maskPositionX', + 'maskPositionY', + 'maskRepeat', + 'maskSize', + ], + maskPosition: ['maskPositionX', 'maskPositionY'], + outline: ['outlineColor', 'outlineStyle', 'outlineWidth'], + overflow: ['overflowX', 'overflowY'], + padding: ['paddingBottom', 'paddingLeft', 'paddingRight', 'paddingTop'], + placeContent: ['alignContent', 'justifyContent'], + placeItems: ['alignItems', 'justifyItems'], + placeSelf: ['alignSelf', 'justifySelf'], + textDecoration: ['textDecorationColor', 'textDecorationLine', 'textDecorationStyle'], + textEmphasis: ['textEmphasisColor', 'textEmphasisStyle'], + transition: [ + 'transitionDelay', + 'transitionDuration', + 'transitionProperty', + 'transitionTimingFunction', + ], + wordWrap: ['overflowWrap'], + }; + + /** + * CSS properties which accept numbers but are not in units of "px". + */ + var isUnitlessNumber = { + animationIterationCount: true, + borderImageOutset: true, + borderImageSlice: true, + borderImageWidth: true, + boxFlex: true, + boxFlexGroup: true, + boxOrdinalGroup: true, + columnCount: true, + columns: true, + flex: true, + flexGrow: true, + flexPositive: true, + flexShrink: true, + flexNegative: true, + flexOrder: true, + gridArea: true, + gridRow: true, + gridRowEnd: true, + gridRowSpan: true, + gridRowStart: true, + gridColumn: true, + gridColumnEnd: true, + gridColumnSpan: true, + gridColumnStart: true, + fontWeight: true, + lineClamp: true, + lineHeight: true, + opacity: true, + order: true, + orphans: true, + tabSize: true, + widows: true, + zIndex: true, + zoom: true, + // SVG-related properties + fillOpacity: true, + floodOpacity: true, + stopOpacity: true, + strokeDasharray: true, + strokeDashoffset: true, + strokeMiterlimit: true, + strokeOpacity: true, + strokeWidth: true, + }; + /** + * @param {string} prefix vendor-specific prefix, eg: Webkit + * @param {string} key style name, eg: transitionDuration + * @return {string} style name prefixed with `prefix`, properly camelCased, eg: + * WebkitTransitionDuration + */ + + function prefixKey(prefix, key) { + return prefix + key.charAt(0).toUpperCase() + key.substring(1); + } + /** + * Support style names that may come passed in prefixed by adding permutations + * of vendor prefixes. + */ + + var prefixes = ['Webkit', 'ms', 'Moz', 'O']; // Using Object.keys here, or else the vanilla for-in loop makes IE8 go into an + // infinite loop, because it iterates over the newly added props too. + + Object.keys(isUnitlessNumber).forEach(function (prop) { + prefixes.forEach(function (prefix) { + isUnitlessNumber[prefixKey(prefix, prop)] = isUnitlessNumber[prop]; + }); + }); + + /** + * Convert a value into the proper css writable value. The style name `name` + * should be logical (no hyphens), as specified + * in `CSSProperty.isUnitlessNumber`. + * + * @param {string} name CSS property name such as `topMargin`. + * @param {*} value CSS property value such as `10px`. + * @return {string} Normalized style value with dimensions applied. + */ + + function dangerousStyleValue(name, value, isCustomProperty) { + // Note that we've removed escapeTextForBrowser() calls here since the + // whole string will be escaped when the attribute is injected into + // the markup. If you provide unsafe user data here they can inject + // arbitrary CSS which may be problematic (I couldn't repro this): + // https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet + // http://www.thespanner.co.uk/2007/11/26/ultimate-xss-css-injection/ + // This is not an XSS hole but instead a potential CSS injection issue + // which has lead to a greater discussion about how we're going to + // trust URLs moving forward. See #2115901 + var isEmpty = value == null || typeof value === 'boolean' || value === ''; + + if (isEmpty) { + return ''; + } + + if ( + !isCustomProperty && + typeof value === 'number' && + value !== 0 && + !(isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name]) + ) { + return value + 'px'; // Presumes implicit 'px' suffix for unitless numbers + } + + return ('' + value).trim(); + } + + var uppercasePattern = /([A-Z])/g; + var msPattern = /^ms-/; + /** + * Hyphenates a camelcased CSS property name, for example: + * + * > hyphenateStyleName('backgroundColor') + * < "background-color" + * > hyphenateStyleName('MozTransition') + * < "-moz-transition" + * > hyphenateStyleName('msTransition') + * < "-ms-transition" + * + * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix + * is converted to `-ms-`. + */ + + function hyphenateStyleName(name) { + return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-'); + } + + var warnValidStyle = function () {}; + + { + // 'msTransform' is correct, but the other prefixes should be capitalized + var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/; + var msPattern$1 = /^-ms-/; + var hyphenPattern = /-(.)/g; // style values shouldn't contain a semicolon + + var badStyleValueWithSemicolonPattern = /;\s*$/; + var warnedStyleNames = {}; + var warnedStyleValues = {}; + var warnedForNaNValue = false; + var warnedForInfinityValue = false; + + var camelize = function (string) { + return string.replace(hyphenPattern, function (_, character) { + return character.toUpperCase(); + }); + }; + + var warnHyphenatedStyleName = function (name) { + if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) { + return; + } + + warnedStyleNames[name] = true; + warning$1( + false, + 'Unsupported style property %s. Did you mean %s?', + name, // As Andi Smith suggests + // (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix + // is converted to lowercase `ms`. + camelize(name.replace(msPattern$1, 'ms-')), + ); + }; + + var warnBadVendoredStyleName = function (name) { + if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) { + return; + } + + warnedStyleNames[name] = true; + warning$1( + false, + 'Unsupported vendor-prefixed style property %s. Did you mean %s?', + name, + name.charAt(0).toUpperCase() + name.slice(1), + ); + }; + + var warnStyleValueWithSemicolon = function (name, value) { + if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) { + return; + } + + warnedStyleValues[value] = true; + warning$1( + false, + "Style property values shouldn't contain a semicolon. " + 'Try "%s: %s" instead.', + name, + value.replace(badStyleValueWithSemicolonPattern, ''), + ); + }; + + var warnStyleValueIsNaN = function (name, value) { + if (warnedForNaNValue) { + return; + } + + warnedForNaNValue = true; + warning$1(false, '`NaN` is an invalid value for the `%s` css style property.', name); + }; + + var warnStyleValueIsInfinity = function (name, value) { + if (warnedForInfinityValue) { + return; + } + + warnedForInfinityValue = true; + warning$1(false, '`Infinity` is an invalid value for the `%s` css style property.', name); + }; + + warnValidStyle = function (name, value) { + if (name.indexOf('-') > -1) { + warnHyphenatedStyleName(name); + } else if (badVendoredStyleNamePattern.test(name)) { + warnBadVendoredStyleName(name); + } else if (badStyleValueWithSemicolonPattern.test(value)) { + warnStyleValueWithSemicolon(name, value); + } + + if (typeof value === 'number') { + if (isNaN(value)) { + warnStyleValueIsNaN(name, value); + } else if (!isFinite(value)) { + warnStyleValueIsInfinity(name, value); + } + } + }; + } + + var warnValidStyle$1 = warnValidStyle; + + /** + * Operations for dealing with CSS properties. + */ + + /** + * This creates a string that is expected to be equivalent to the style + * attribute generated by server-side rendering. It by-passes warnings and + * security checks so it's not safe to use this value for anything other than + * comparison. It is only used in DEV for SSR validation. + */ + + function createDangerousStringForStyles(styles) { + { + var serialized = ''; + var delimiter = ''; + + for (var styleName in styles) { + if (!styles.hasOwnProperty(styleName)) { + continue; + } + + var styleValue = styles[styleName]; + + if (styleValue != null) { + var isCustomProperty = styleName.indexOf('--') === 0; + serialized += + delimiter + (isCustomProperty ? styleName : hyphenateStyleName(styleName)) + ':'; + serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty); + delimiter = ';'; + } + } + + return serialized || null; + } + } + /** + * Sets the value for multiple styles on a node. If a value is specified as + * '' (empty string), the corresponding style property will be unset. + * + * @param {DOMElement} node + * @param {object} styles + */ + + function setValueForStyles(node, styles) { + var style = node.style; + + for (var styleName in styles) { + if (!styles.hasOwnProperty(styleName)) { + continue; + } + + var isCustomProperty = styleName.indexOf('--') === 0; + + { + if (!isCustomProperty) { + warnValidStyle$1(styleName, styles[styleName]); + } + } + + var styleValue = dangerousStyleValue(styleName, styles[styleName], isCustomProperty); + + if (styleName === 'float') { + styleName = 'cssFloat'; + } + + if (isCustomProperty) { + style.setProperty(styleName, styleValue); + } else { + style[styleName] = styleValue; + } + } + } + + function isValueEmpty(value) { + return value == null || typeof value === 'boolean' || value === ''; + } + /** + * Given {color: 'red', overflow: 'hidden'} returns { + * color: 'color', + * overflowX: 'overflow', + * overflowY: 'overflow', + * }. This can be read as "the overflowY property was set by the overflow + * shorthand". That is, the values are the property that each was derived from. + */ + + function expandShorthandMap(styles) { + var expanded = {}; + + for (var key in styles) { + var longhands = shorthandToLonghand[key] || [key]; + + for (var i = 0; i < longhands.length; i++) { + expanded[longhands[i]] = key; + } + } + + return expanded; + } + /** + * When mixing shorthand and longhand property names, we warn during updates if + * we expect an incorrect result to occur. In particular, we warn for: + * + * Updating a shorthand property (longhand gets overwritten): + * {font: 'foo', fontVariant: 'bar'} -> {font: 'baz', fontVariant: 'bar'} + * becomes .style.font = 'baz' + * Removing a shorthand property (longhand gets lost too): + * {font: 'foo', fontVariant: 'bar'} -> {fontVariant: 'bar'} + * becomes .style.font = '' + * Removing a longhand property (should revert to shorthand; doesn't): + * {font: 'foo', fontVariant: 'bar'} -> {font: 'foo'} + * becomes .style.fontVariant = '' + */ + + function validateShorthandPropertyCollisionInDev(styleUpdates, nextStyles) { + if (!warnAboutShorthandPropertyCollision) { + return; + } + + if (!nextStyles) { + return; + } + + var expandedUpdates = expandShorthandMap(styleUpdates); + var expandedStyles = expandShorthandMap(nextStyles); + var warnedAbout = {}; + + for (var key in expandedUpdates) { + var originalKey = expandedUpdates[key]; + var correctOriginalKey = expandedStyles[key]; + + if (correctOriginalKey && originalKey !== correctOriginalKey) { + var warningKey = originalKey + ',' + correctOriginalKey; + + if (warnedAbout[warningKey]) { + continue; + } + + warnedAbout[warningKey] = true; + warning$1( + false, + '%s a style property during rerender (%s) when a ' + + 'conflicting property is set (%s) can lead to styling bugs. To ' + + "avoid this, don't mix shorthand and non-shorthand properties " + + 'for the same value; instead, replace the shorthand with ' + + 'separate values.', + isValueEmpty(styleUpdates[originalKey]) ? 'Removing' : 'Updating', + originalKey, + correctOriginalKey, + ); + } + } + } + + // For HTML, certain tags should omit their close tag. We keep a whitelist for + // those special-case tags. + var omittedCloseTags = { + area: true, + base: true, + br: true, + col: true, + embed: true, + hr: true, + img: true, + input: true, + keygen: true, + link: true, + meta: true, + param: true, + source: true, + track: true, + wbr: true, // NOTE: menuitem's close tag should be omitted, but that causes problems. + }; + + // `omittedCloseTags` except that `menuitem` should still have its closing tag. + + var voidElementTags = _assign( + { + menuitem: true, + }, + omittedCloseTags, + ); + + // or add stack by default to invariants where possible. + + var HTML$1 = '__html'; + var ReactDebugCurrentFrame$3 = null; + + { + ReactDebugCurrentFrame$3 = ReactSharedInternals.ReactDebugCurrentFrame; + } + + function assertValidProps(tag, props) { + if (!props) { + return; + } // Note the use of `==` which checks for null or undefined. + + if (voidElementTags[tag]) { + if (!(props.children == null && props.dangerouslySetInnerHTML == null)) { + { + throw Error( + tag + + ' is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.' + + ReactDebugCurrentFrame$3.getStackAddendum(), + ); + } + } + } + + if (props.dangerouslySetInnerHTML != null) { + if (!(props.children == null)) { + { + throw Error('Can only set one of `children` or `props.dangerouslySetInnerHTML`.'); + } + } + + if ( + !( + typeof props.dangerouslySetInnerHTML === 'object' && HTML$1 in props.dangerouslySetInnerHTML + ) + ) { + { + throw Error( + '`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://fb.me/react-invariant-dangerously-set-inner-html for more information.', + ); + } + } + } + + { + !(props.suppressContentEditableWarning || !props.contentEditable || props.children == null) + ? warning$1( + false, + 'A component is `contentEditable` and contains `children` managed by ' + + 'React. It is now your responsibility to guarantee that none of ' + + 'those nodes are unexpectedly modified or duplicated. This is ' + + 'probably not intentional.', + ) + : void 0; + } + + if (!(props.style == null || typeof props.style === 'object')) { + { + throw Error( + "The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX." + + ReactDebugCurrentFrame$3.getStackAddendum(), + ); + } + } + } + + function isCustomComponent(tagName, props) { + if (tagName.indexOf('-') === -1) { + return typeof props.is === 'string'; + } + + switch (tagName) { + // These are reserved SVG and MathML elements. + // We don't mind this whitelist too much because we expect it to never grow. + // The alternative is to track the namespace in a few places which is convoluted. + // https://w3c.github.io/webcomponents/spec/custom/#custom-elements-core-concepts + case 'annotation-xml': + case 'color-profile': + case 'font-face': + case 'font-face-src': + case 'font-face-uri': + case 'font-face-format': + case 'font-face-name': + case 'missing-glyph': + return false; + + default: + return true; + } + } + + // When adding attributes to the HTML or SVG whitelist, be sure to + // also add them to this module to ensure casing and incorrect name + // warnings. + var possibleStandardNames = { + // HTML + accept: 'accept', + acceptcharset: 'acceptCharset', + 'accept-charset': 'acceptCharset', + accesskey: 'accessKey', + action: 'action', + allowfullscreen: 'allowFullScreen', + alt: 'alt', + as: 'as', + async: 'async', + autocapitalize: 'autoCapitalize', + autocomplete: 'autoComplete', + autocorrect: 'autoCorrect', + autofocus: 'autoFocus', + autoplay: 'autoPlay', + autosave: 'autoSave', + capture: 'capture', + cellpadding: 'cellPadding', + cellspacing: 'cellSpacing', + challenge: 'challenge', + charset: 'charSet', + checked: 'checked', + children: 'children', + cite: 'cite', + class: 'className', + classid: 'classID', + classname: 'className', + cols: 'cols', + colspan: 'colSpan', + content: 'content', + contenteditable: 'contentEditable', + contextmenu: 'contextMenu', + controls: 'controls', + controlslist: 'controlsList', + coords: 'coords', + crossorigin: 'crossOrigin', + dangerouslysetinnerhtml: 'dangerouslySetInnerHTML', + data: 'data', + datetime: 'dateTime', + default: 'default', + defaultchecked: 'defaultChecked', + defaultvalue: 'defaultValue', + defer: 'defer', + dir: 'dir', + disabled: 'disabled', + disablepictureinpicture: 'disablePictureInPicture', + download: 'download', + draggable: 'draggable', + enctype: 'encType', + for: 'htmlFor', + form: 'form', + formmethod: 'formMethod', + formaction: 'formAction', + formenctype: 'formEncType', + formnovalidate: 'formNoValidate', + formtarget: 'formTarget', + frameborder: 'frameBorder', + headers: 'headers', + height: 'height', + hidden: 'hidden', + high: 'high', + href: 'href', + hreflang: 'hrefLang', + htmlfor: 'htmlFor', + httpequiv: 'httpEquiv', + 'http-equiv': 'httpEquiv', + icon: 'icon', + id: 'id', + innerhtml: 'innerHTML', + inputmode: 'inputMode', + integrity: 'integrity', + is: 'is', + itemid: 'itemID', + itemprop: 'itemProp', + itemref: 'itemRef', + itemscope: 'itemScope', + itemtype: 'itemType', + keyparams: 'keyParams', + keytype: 'keyType', + kind: 'kind', + label: 'label', + lang: 'lang', + list: 'list', + loop: 'loop', + low: 'low', + manifest: 'manifest', + marginwidth: 'marginWidth', + marginheight: 'marginHeight', + max: 'max', + maxlength: 'maxLength', + media: 'media', + mediagroup: 'mediaGroup', + method: 'method', + min: 'min', + minlength: 'minLength', + multiple: 'multiple', + muted: 'muted', + name: 'name', + nomodule: 'noModule', + nonce: 'nonce', + novalidate: 'noValidate', + open: 'open', + optimum: 'optimum', + pattern: 'pattern', + placeholder: 'placeholder', + playsinline: 'playsInline', + poster: 'poster', + preload: 'preload', + profile: 'profile', + radiogroup: 'radioGroup', + readonly: 'readOnly', + referrerpolicy: 'referrerPolicy', + rel: 'rel', + required: 'required', + reversed: 'reversed', + role: 'role', + rows: 'rows', + rowspan: 'rowSpan', + sandbox: 'sandbox', + scope: 'scope', + scoped: 'scoped', + scrolling: 'scrolling', + seamless: 'seamless', + selected: 'selected', + shape: 'shape', + size: 'size', + sizes: 'sizes', + span: 'span', + spellcheck: 'spellCheck', + src: 'src', + srcdoc: 'srcDoc', + srclang: 'srcLang', + srcset: 'srcSet', + start: 'start', + step: 'step', + style: 'style', + summary: 'summary', + tabindex: 'tabIndex', + target: 'target', + title: 'title', + type: 'type', + usemap: 'useMap', + value: 'value', + width: 'width', + wmode: 'wmode', + wrap: 'wrap', + // SVG + about: 'about', + accentheight: 'accentHeight', + 'accent-height': 'accentHeight', + accumulate: 'accumulate', + additive: 'additive', + alignmentbaseline: 'alignmentBaseline', + 'alignment-baseline': 'alignmentBaseline', + allowreorder: 'allowReorder', + alphabetic: 'alphabetic', + amplitude: 'amplitude', + arabicform: 'arabicForm', + 'arabic-form': 'arabicForm', + ascent: 'ascent', + attributename: 'attributeName', + attributetype: 'attributeType', + autoreverse: 'autoReverse', + azimuth: 'azimuth', + basefrequency: 'baseFrequency', + baselineshift: 'baselineShift', + 'baseline-shift': 'baselineShift', + baseprofile: 'baseProfile', + bbox: 'bbox', + begin: 'begin', + bias: 'bias', + by: 'by', + calcmode: 'calcMode', + capheight: 'capHeight', + 'cap-height': 'capHeight', + clip: 'clip', + clippath: 'clipPath', + 'clip-path': 'clipPath', + clippathunits: 'clipPathUnits', + cliprule: 'clipRule', + 'clip-rule': 'clipRule', + color: 'color', + colorinterpolation: 'colorInterpolation', + 'color-interpolation': 'colorInterpolation', + colorinterpolationfilters: 'colorInterpolationFilters', + 'color-interpolation-filters': 'colorInterpolationFilters', + colorprofile: 'colorProfile', + 'color-profile': 'colorProfile', + colorrendering: 'colorRendering', + 'color-rendering': 'colorRendering', + contentscripttype: 'contentScriptType', + contentstyletype: 'contentStyleType', + cursor: 'cursor', + cx: 'cx', + cy: 'cy', + d: 'd', + datatype: 'datatype', + decelerate: 'decelerate', + descent: 'descent', + diffuseconstant: 'diffuseConstant', + direction: 'direction', + display: 'display', + divisor: 'divisor', + dominantbaseline: 'dominantBaseline', + 'dominant-baseline': 'dominantBaseline', + dur: 'dur', + dx: 'dx', + dy: 'dy', + edgemode: 'edgeMode', + elevation: 'elevation', + enablebackground: 'enableBackground', + 'enable-background': 'enableBackground', + end: 'end', + exponent: 'exponent', + externalresourcesrequired: 'externalResourcesRequired', + fill: 'fill', + fillopacity: 'fillOpacity', + 'fill-opacity': 'fillOpacity', + fillrule: 'fillRule', + 'fill-rule': 'fillRule', + filter: 'filter', + filterres: 'filterRes', + filterunits: 'filterUnits', + floodopacity: 'floodOpacity', + 'flood-opacity': 'floodOpacity', + floodcolor: 'floodColor', + 'flood-color': 'floodColor', + focusable: 'focusable', + fontfamily: 'fontFamily', + 'font-family': 'fontFamily', + fontsize: 'fontSize', + 'font-size': 'fontSize', + fontsizeadjust: 'fontSizeAdjust', + 'font-size-adjust': 'fontSizeAdjust', + fontstretch: 'fontStretch', + 'font-stretch': 'fontStretch', + fontstyle: 'fontStyle', + 'font-style': 'fontStyle', + fontvariant: 'fontVariant', + 'font-variant': 'fontVariant', + fontweight: 'fontWeight', + 'font-weight': 'fontWeight', + format: 'format', + from: 'from', + fx: 'fx', + fy: 'fy', + g1: 'g1', + g2: 'g2', + glyphname: 'glyphName', + 'glyph-name': 'glyphName', + glyphorientationhorizontal: 'glyphOrientationHorizontal', + 'glyph-orientation-horizontal': 'glyphOrientationHorizontal', + glyphorientationvertical: 'glyphOrientationVertical', + 'glyph-orientation-vertical': 'glyphOrientationVertical', + glyphref: 'glyphRef', + gradienttransform: 'gradientTransform', + gradientunits: 'gradientUnits', + hanging: 'hanging', + horizadvx: 'horizAdvX', + 'horiz-adv-x': 'horizAdvX', + horizoriginx: 'horizOriginX', + 'horiz-origin-x': 'horizOriginX', + ideographic: 'ideographic', + imagerendering: 'imageRendering', + 'image-rendering': 'imageRendering', + in2: 'in2', + in: 'in', + inlist: 'inlist', + intercept: 'intercept', + k1: 'k1', + k2: 'k2', + k3: 'k3', + k4: 'k4', + k: 'k', + kernelmatrix: 'kernelMatrix', + kernelunitlength: 'kernelUnitLength', + kerning: 'kerning', + keypoints: 'keyPoints', + keysplines: 'keySplines', + keytimes: 'keyTimes', + lengthadjust: 'lengthAdjust', + letterspacing: 'letterSpacing', + 'letter-spacing': 'letterSpacing', + lightingcolor: 'lightingColor', + 'lighting-color': 'lightingColor', + limitingconeangle: 'limitingConeAngle', + local: 'local', + markerend: 'markerEnd', + 'marker-end': 'markerEnd', + markerheight: 'markerHeight', + markermid: 'markerMid', + 'marker-mid': 'markerMid', + markerstart: 'markerStart', + 'marker-start': 'markerStart', + markerunits: 'markerUnits', + markerwidth: 'markerWidth', + mask: 'mask', + maskcontentunits: 'maskContentUnits', + maskunits: 'maskUnits', + mathematical: 'mathematical', + mode: 'mode', + numoctaves: 'numOctaves', + offset: 'offset', + opacity: 'opacity', + operator: 'operator', + order: 'order', + orient: 'orient', + orientation: 'orientation', + origin: 'origin', + overflow: 'overflow', + overlineposition: 'overlinePosition', + 'overline-position': 'overlinePosition', + overlinethickness: 'overlineThickness', + 'overline-thickness': 'overlineThickness', + paintorder: 'paintOrder', + 'paint-order': 'paintOrder', + panose1: 'panose1', + 'panose-1': 'panose1', + pathlength: 'pathLength', + patterncontentunits: 'patternContentUnits', + patterntransform: 'patternTransform', + patternunits: 'patternUnits', + pointerevents: 'pointerEvents', + 'pointer-events': 'pointerEvents', + points: 'points', + pointsatx: 'pointsAtX', + pointsaty: 'pointsAtY', + pointsatz: 'pointsAtZ', + prefix: 'prefix', + preservealpha: 'preserveAlpha', + preserveaspectratio: 'preserveAspectRatio', + primitiveunits: 'primitiveUnits', + property: 'property', + r: 'r', + radius: 'radius', + refx: 'refX', + refy: 'refY', + renderingintent: 'renderingIntent', + 'rendering-intent': 'renderingIntent', + repeatcount: 'repeatCount', + repeatdur: 'repeatDur', + requiredextensions: 'requiredExtensions', + requiredfeatures: 'requiredFeatures', + resource: 'resource', + restart: 'restart', + result: 'result', + results: 'results', + rotate: 'rotate', + rx: 'rx', + ry: 'ry', + scale: 'scale', + security: 'security', + seed: 'seed', + shaperendering: 'shapeRendering', + 'shape-rendering': 'shapeRendering', + slope: 'slope', + spacing: 'spacing', + specularconstant: 'specularConstant', + specularexponent: 'specularExponent', + speed: 'speed', + spreadmethod: 'spreadMethod', + startoffset: 'startOffset', + stddeviation: 'stdDeviation', + stemh: 'stemh', + stemv: 'stemv', + stitchtiles: 'stitchTiles', + stopcolor: 'stopColor', + 'stop-color': 'stopColor', + stopopacity: 'stopOpacity', + 'stop-opacity': 'stopOpacity', + strikethroughposition: 'strikethroughPosition', + 'strikethrough-position': 'strikethroughPosition', + strikethroughthickness: 'strikethroughThickness', + 'strikethrough-thickness': 'strikethroughThickness', + string: 'string', + stroke: 'stroke', + strokedasharray: 'strokeDasharray', + 'stroke-dasharray': 'strokeDasharray', + strokedashoffset: 'strokeDashoffset', + 'stroke-dashoffset': 'strokeDashoffset', + strokelinecap: 'strokeLinecap', + 'stroke-linecap': 'strokeLinecap', + strokelinejoin: 'strokeLinejoin', + 'stroke-linejoin': 'strokeLinejoin', + strokemiterlimit: 'strokeMiterlimit', + 'stroke-miterlimit': 'strokeMiterlimit', + strokewidth: 'strokeWidth', + 'stroke-width': 'strokeWidth', + strokeopacity: 'strokeOpacity', + 'stroke-opacity': 'strokeOpacity', + suppresscontenteditablewarning: 'suppressContentEditableWarning', + suppresshydrationwarning: 'suppressHydrationWarning', + surfacescale: 'surfaceScale', + systemlanguage: 'systemLanguage', + tablevalues: 'tableValues', + targetx: 'targetX', + targety: 'targetY', + textanchor: 'textAnchor', + 'text-anchor': 'textAnchor', + textdecoration: 'textDecoration', + 'text-decoration': 'textDecoration', + textlength: 'textLength', + textrendering: 'textRendering', + 'text-rendering': 'textRendering', + to: 'to', + transform: 'transform', + typeof: 'typeof', + u1: 'u1', + u2: 'u2', + underlineposition: 'underlinePosition', + 'underline-position': 'underlinePosition', + underlinethickness: 'underlineThickness', + 'underline-thickness': 'underlineThickness', + unicode: 'unicode', + unicodebidi: 'unicodeBidi', + 'unicode-bidi': 'unicodeBidi', + unicoderange: 'unicodeRange', + 'unicode-range': 'unicodeRange', + unitsperem: 'unitsPerEm', + 'units-per-em': 'unitsPerEm', + unselectable: 'unselectable', + valphabetic: 'vAlphabetic', + 'v-alphabetic': 'vAlphabetic', + values: 'values', + vectoreffect: 'vectorEffect', + 'vector-effect': 'vectorEffect', + version: 'version', + vertadvy: 'vertAdvY', + 'vert-adv-y': 'vertAdvY', + vertoriginx: 'vertOriginX', + 'vert-origin-x': 'vertOriginX', + vertoriginy: 'vertOriginY', + 'vert-origin-y': 'vertOriginY', + vhanging: 'vHanging', + 'v-hanging': 'vHanging', + videographic: 'vIdeographic', + 'v-ideographic': 'vIdeographic', + viewbox: 'viewBox', + viewtarget: 'viewTarget', + visibility: 'visibility', + vmathematical: 'vMathematical', + 'v-mathematical': 'vMathematical', + vocab: 'vocab', + widths: 'widths', + wordspacing: 'wordSpacing', + 'word-spacing': 'wordSpacing', + writingmode: 'writingMode', + 'writing-mode': 'writingMode', + x1: 'x1', + x2: 'x2', + x: 'x', + xchannelselector: 'xChannelSelector', + xheight: 'xHeight', + 'x-height': 'xHeight', + xlinkactuate: 'xlinkActuate', + 'xlink:actuate': 'xlinkActuate', + xlinkarcrole: 'xlinkArcrole', + 'xlink:arcrole': 'xlinkArcrole', + xlinkhref: 'xlinkHref', + 'xlink:href': 'xlinkHref', + xlinkrole: 'xlinkRole', + 'xlink:role': 'xlinkRole', + xlinkshow: 'xlinkShow', + 'xlink:show': 'xlinkShow', + xlinktitle: 'xlinkTitle', + 'xlink:title': 'xlinkTitle', + xlinktype: 'xlinkType', + 'xlink:type': 'xlinkType', + xmlbase: 'xmlBase', + 'xml:base': 'xmlBase', + xmllang: 'xmlLang', + 'xml:lang': 'xmlLang', + xmlns: 'xmlns', + 'xml:space': 'xmlSpace', + xmlnsxlink: 'xmlnsXlink', + 'xmlns:xlink': 'xmlnsXlink', + xmlspace: 'xmlSpace', + y1: 'y1', + y2: 'y2', + y: 'y', + ychannelselector: 'yChannelSelector', + z: 'z', + zoomandpan: 'zoomAndPan', + }; + + var ariaProperties = { + 'aria-current': 0, + // state + 'aria-details': 0, + 'aria-disabled': 0, + // state + 'aria-hidden': 0, + // state + 'aria-invalid': 0, + // state + 'aria-keyshortcuts': 0, + 'aria-label': 0, + 'aria-roledescription': 0, + // Widget Attributes + 'aria-autocomplete': 0, + 'aria-checked': 0, + 'aria-expanded': 0, + 'aria-haspopup': 0, + 'aria-level': 0, + 'aria-modal': 0, + 'aria-multiline': 0, + 'aria-multiselectable': 0, + 'aria-orientation': 0, + 'aria-placeholder': 0, + 'aria-pressed': 0, + 'aria-readonly': 0, + 'aria-required': 0, + 'aria-selected': 0, + 'aria-sort': 0, + 'aria-valuemax': 0, + 'aria-valuemin': 0, + 'aria-valuenow': 0, + 'aria-valuetext': 0, + // Live Region Attributes + 'aria-atomic': 0, + 'aria-busy': 0, + 'aria-live': 0, + 'aria-relevant': 0, + // Drag-and-Drop Attributes + 'aria-dropeffect': 0, + 'aria-grabbed': 0, + // Relationship Attributes + 'aria-activedescendant': 0, + 'aria-colcount': 0, + 'aria-colindex': 0, + 'aria-colspan': 0, + 'aria-controls': 0, + 'aria-describedby': 0, + 'aria-errormessage': 0, + 'aria-flowto': 0, + 'aria-labelledby': 0, + 'aria-owns': 0, + 'aria-posinset': 0, + 'aria-rowcount': 0, + 'aria-rowindex': 0, + 'aria-rowspan': 0, + 'aria-setsize': 0, + }; + + var warnedProperties = {}; + var rARIA = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$'); + var rARIACamel = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$'); + var hasOwnProperty$1 = Object.prototype.hasOwnProperty; + + function validateProperty(tagName, name) { + if (hasOwnProperty$1.call(warnedProperties, name) && warnedProperties[name]) { + return true; + } + + if (rARIACamel.test(name)) { + var ariaName = 'aria-' + name.slice(4).toLowerCase(); + var correctName = ariaProperties.hasOwnProperty(ariaName) ? ariaName : null; // If this is an aria-* attribute, but is not listed in the known DOM + // DOM properties, then it is an invalid aria-* attribute. + + if (correctName == null) { + warning$1( + false, + 'Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.', + name, + ); + warnedProperties[name] = true; + return true; + } // aria-* attributes should be lowercase; suggest the lowercase version. + + if (name !== correctName) { + warning$1(false, 'Invalid ARIA attribute `%s`. Did you mean `%s`?', name, correctName); + warnedProperties[name] = true; + return true; + } + } + + if (rARIA.test(name)) { + var lowerCasedName = name.toLowerCase(); + var standardName = ariaProperties.hasOwnProperty(lowerCasedName) ? lowerCasedName : null; // If this is an aria-* attribute, but is not listed in the known DOM + // DOM properties, then it is an invalid aria-* attribute. + + if (standardName == null) { + warnedProperties[name] = true; + return false; + } // aria-* attributes should be lowercase; suggest the lowercase version. + + if (name !== standardName) { + warning$1(false, 'Unknown ARIA attribute `%s`. Did you mean `%s`?', name, standardName); + warnedProperties[name] = true; + return true; + } + } + + return true; + } + + function warnInvalidARIAProps(type, props) { + var invalidProps = []; + + for (var key in props) { + var isValid = validateProperty(type, key); + + if (!isValid) { + invalidProps.push(key); + } + } + + var unknownPropString = invalidProps + .map(function (prop) { + return '`' + prop + '`'; + }) + .join(', '); + + if (invalidProps.length === 1) { + warning$1( + false, + 'Invalid aria prop %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop', + unknownPropString, + type, + ); + } else if (invalidProps.length > 1) { + warning$1( + false, + 'Invalid aria props %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop', + unknownPropString, + type, + ); + } + } + + function validateProperties(type, props) { + if (isCustomComponent(type, props)) { + return; + } + + warnInvalidARIAProps(type, props); + } + + var didWarnValueNull = false; + function validateProperties$1(type, props) { + if (type !== 'input' && type !== 'textarea' && type !== 'select') { + return; + } + + if (props != null && props.value === null && !didWarnValueNull) { + didWarnValueNull = true; + + if (type === 'select' && props.multiple) { + warning$1( + false, + '`value` prop on `%s` should not be null. ' + + 'Consider using an empty array when `multiple` is set to `true` ' + + 'to clear the component or `undefined` for uncontrolled components.', + type, + ); + } else { + warning$1( + false, + '`value` prop on `%s` should not be null. ' + + 'Consider using an empty string to clear the component or `undefined` ' + + 'for uncontrolled components.', + type, + ); + } + } + } + + var validateProperty$1 = function () {}; + + { + var warnedProperties$1 = {}; + var _hasOwnProperty = Object.prototype.hasOwnProperty; + var EVENT_NAME_REGEX = /^on./; + var INVALID_EVENT_NAME_REGEX = /^on[^A-Z]/; + var rARIA$1 = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$'); + var rARIACamel$1 = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$'); + + validateProperty$1 = function (tagName, name, value, canUseEventSystem) { + if (_hasOwnProperty.call(warnedProperties$1, name) && warnedProperties$1[name]) { + return true; + } + + var lowerCasedName = name.toLowerCase(); + + if (lowerCasedName === 'onfocusin' || lowerCasedName === 'onfocusout') { + warning$1( + false, + 'React uses onFocus and onBlur instead of onFocusIn and onFocusOut. ' + + 'All React events are normalized to bubble, so onFocusIn and onFocusOut ' + + 'are not needed/supported by React.', + ); + warnedProperties$1[name] = true; + return true; + } // We can't rely on the event system being injected on the server. + + if (canUseEventSystem) { + if (registrationNameModules.hasOwnProperty(name)) { + return true; + } + + var registrationName = possibleRegistrationNames.hasOwnProperty(lowerCasedName) + ? possibleRegistrationNames[lowerCasedName] + : null; + + if (registrationName != null) { + warning$1( + false, + 'Invalid event handler property `%s`. Did you mean `%s`?', + name, + registrationName, + ); + warnedProperties$1[name] = true; + return true; + } + + if (EVENT_NAME_REGEX.test(name)) { + warning$1(false, 'Unknown event handler property `%s`. It will be ignored.', name); + warnedProperties$1[name] = true; + return true; + } + } else if (EVENT_NAME_REGEX.test(name)) { + // If no event plugins have been injected, we are in a server environment. + // So we can't tell if the event name is correct for sure, but we can filter + // out known bad ones like `onclick`. We can't suggest a specific replacement though. + if (INVALID_EVENT_NAME_REGEX.test(name)) { + warning$1( + false, + 'Invalid event handler property `%s`. ' + + 'React events use the camelCase naming convention, for example `onClick`.', + name, + ); + } + + warnedProperties$1[name] = true; + return true; + } // Let the ARIA attribute hook validate ARIA attributes + + if (rARIA$1.test(name) || rARIACamel$1.test(name)) { + return true; + } + + if (lowerCasedName === 'innerhtml') { + warning$1( + false, + 'Directly setting property `innerHTML` is not permitted. ' + + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.', + ); + warnedProperties$1[name] = true; + return true; + } + + if (lowerCasedName === 'aria') { + warning$1( + false, + 'The `aria` attribute is reserved for future use in React. ' + + 'Pass individual `aria-` attributes instead.', + ); + warnedProperties$1[name] = true; + return true; + } + + if ( + lowerCasedName === 'is' && + value !== null && + value !== undefined && + typeof value !== 'string' + ) { + warning$1( + false, + 'Received a `%s` for a string attribute `is`. If this is expected, cast ' + + 'the value to a string.', + typeof value, + ); + warnedProperties$1[name] = true; + return true; + } + + if (typeof value === 'number' && isNaN(value)) { + warning$1( + false, + 'Received NaN for the `%s` attribute. If this is expected, cast ' + + 'the value to a string.', + name, + ); + warnedProperties$1[name] = true; + return true; + } + + var propertyInfo = getPropertyInfo(name); + var isReserved = propertyInfo !== null && propertyInfo.type === RESERVED; // Known attributes should match the casing specified in the property config. + + if (possibleStandardNames.hasOwnProperty(lowerCasedName)) { + var standardName = possibleStandardNames[lowerCasedName]; + + if (standardName !== name) { + warning$1(false, 'Invalid DOM property `%s`. Did you mean `%s`?', name, standardName); + warnedProperties$1[name] = true; + return true; + } + } else if (!isReserved && name !== lowerCasedName) { + // Unknown attributes should have lowercase casing since that's how they + // will be cased anyway with server rendering. + warning$1( + false, + 'React does not recognize the `%s` prop on a DOM element. If you ' + + 'intentionally want it to appear in the DOM as a custom ' + + 'attribute, spell it as lowercase `%s` instead. ' + + 'If you accidentally passed it from a parent component, remove ' + + 'it from the DOM element.', + name, + lowerCasedName, + ); + warnedProperties$1[name] = true; + return true; + } + + if ( + typeof value === 'boolean' && + shouldRemoveAttributeWithWarning(name, value, propertyInfo, false) + ) { + if (value) { + warning$1( + false, + 'Received `%s` for a non-boolean attribute `%s`.\n\n' + + 'If you want to write it to the DOM, pass a string instead: ' + + '%s="%s" or %s={value.toString()}.', + value, + name, + name, + value, + name, + ); + } else { + warning$1( + false, + 'Received `%s` for a non-boolean attribute `%s`.\n\n' + + 'If you want to write it to the DOM, pass a string instead: ' + + '%s="%s" or %s={value.toString()}.\n\n' + + 'If you used to conditionally omit it with %s={condition && value}, ' + + 'pass %s={condition ? value : undefined} instead.', + value, + name, + name, + value, + name, + name, + name, + ); + } + + warnedProperties$1[name] = true; + return true; + } // Now that we've validated casing, do not validate + // data types for reserved props + + if (isReserved) { + return true; + } // Warn when a known attribute is a bad type + + if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, false)) { + warnedProperties$1[name] = true; + return false; + } // Warn when passing the strings 'false' or 'true' into a boolean prop + + if ( + (value === 'false' || value === 'true') && + propertyInfo !== null && + propertyInfo.type === BOOLEAN + ) { + warning$1( + false, + 'Received the string `%s` for the boolean attribute `%s`. ' + + '%s ' + + 'Did you mean %s={%s}?', + value, + name, + value === 'false' + ? 'The browser will interpret it as a truthy value.' + : 'Although this works, it will not work as expected if you pass the string "false".', + name, + value, + ); + warnedProperties$1[name] = true; + return true; + } + + return true; + }; + } + + var warnUnknownProperties = function (type, props, canUseEventSystem) { + var unknownProps = []; + + for (var key in props) { + var isValid = validateProperty$1(type, key, props[key], canUseEventSystem); + + if (!isValid) { + unknownProps.push(key); + } + } + + var unknownPropString = unknownProps + .map(function (prop) { + return '`' + prop + '`'; + }) + .join(', '); + + if (unknownProps.length === 1) { + warning$1( + false, + 'Invalid value for prop %s on <%s> tag. Either remove it from the element, ' + + 'or pass a string or number value to keep it in the DOM. ' + + 'For details, see https://fb.me/react-attribute-behavior', + unknownPropString, + type, + ); + } else if (unknownProps.length > 1) { + warning$1( + false, + 'Invalid values for props %s on <%s> tag. Either remove them from the element, ' + + 'or pass a string or number value to keep them in the DOM. ' + + 'For details, see https://fb.me/react-attribute-behavior', + unknownPropString, + type, + ); + } + }; + + function validateProperties$2(type, props, canUseEventSystem) { + if (isCustomComponent(type, props)) { + return; + } + + warnUnknownProperties(type, props, canUseEventSystem); + } + + // TODO: direct imports like some-package/src/* are bad. Fix me. + var didWarnInvalidHydration = false; + var didWarnShadyDOM = false; + var didWarnScriptTags = false; + var DANGEROUSLY_SET_INNER_HTML = 'dangerouslySetInnerHTML'; + var SUPPRESS_CONTENT_EDITABLE_WARNING = 'suppressContentEditableWarning'; + var SUPPRESS_HYDRATION_WARNING$1 = 'suppressHydrationWarning'; + var AUTOFOCUS = 'autoFocus'; + var CHILDREN = 'children'; + var STYLE$1 = 'style'; + var HTML = '__html'; + var LISTENERS = 'listeners'; + var HTML_NAMESPACE = Namespaces.html; + var warnedUnknownTags; + var suppressHydrationWarning; + var validatePropertiesInDevelopment; + var warnForTextDifference; + var warnForPropDifference; + var warnForExtraAttributes; + var warnForInvalidEventListener; + var canDiffStyleForHydrationWarning; + var normalizeMarkupForTextOrAttribute; + var normalizeHTML; + + { + warnedUnknownTags = { + // Chrome is the only major browser not shipping <time>. But as of July + // 2017 it intends to ship it due to widespread usage. We intentionally + // *don't* warn for <time> even if it's unrecognized by Chrome because + // it soon will be, and many apps have been using it anyway. + time: true, + // There are working polyfills for <dialog>. Let people use it. + dialog: true, + // Electron ships a custom <webview> tag to display external web content in + // an isolated frame and process. + // This tag is not present in non Electron environments such as JSDom which + // is often used for testing purposes. + // @see https://electronjs.org/docs/api/webview-tag + webview: true, + }; + + validatePropertiesInDevelopment = function (type, props) { + validateProperties(type, props); + validateProperties$1(type, props); + validateProperties$2( + type, + props, + /* canUseEventSystem */ + true, + ); + }; // IE 11 parses & normalizes the style attribute as opposed to other + // browsers. It adds spaces and sorts the properties in some + // non-alphabetical order. Handling that would require sorting CSS + // properties in the client & server versions or applying + // `expectedStyle` to a temporary DOM node to read its `style` attribute + // normalized. Since it only affects IE, we're skipping style warnings + // in that browser completely in favor of doing all that work. + // See https://github.com/facebook/react/issues/11807 + + canDiffStyleForHydrationWarning = canUseDOM && !document.documentMode; // HTML parsing normalizes CR and CRLF to LF. + // It also can turn \u0000 into \uFFFD inside attributes. + // https://www.w3.org/TR/html5/single-page.html#preprocessing-the-input-stream + // If we have a mismatch, it might be caused by that. + // We will still patch up in this case but not fire the warning. + + var NORMALIZE_NEWLINES_REGEX = /\r\n?/g; + var NORMALIZE_NULL_AND_REPLACEMENT_REGEX = /\u0000|\uFFFD/g; + + normalizeMarkupForTextOrAttribute = function (markup) { + var markupString = typeof markup === 'string' ? markup : '' + markup; + return markupString + .replace(NORMALIZE_NEWLINES_REGEX, '\n') + .replace(NORMALIZE_NULL_AND_REPLACEMENT_REGEX, ''); + }; + + warnForTextDifference = function (serverText, clientText) { + if (didWarnInvalidHydration) { + return; + } + + var normalizedClientText = normalizeMarkupForTextOrAttribute(clientText); + var normalizedServerText = normalizeMarkupForTextOrAttribute(serverText); + + if (normalizedServerText === normalizedClientText) { + return; + } + + didWarnInvalidHydration = true; + warningWithoutStack$1( + false, + 'Text content did not match. Server: "%s" Client: "%s"', + normalizedServerText, + normalizedClientText, + ); + }; + + warnForPropDifference = function (propName, serverValue, clientValue) { + if (didWarnInvalidHydration) { + return; + } + + var normalizedClientValue = normalizeMarkupForTextOrAttribute(clientValue); + var normalizedServerValue = normalizeMarkupForTextOrAttribute(serverValue); + + if (normalizedServerValue === normalizedClientValue) { + return; + } + + didWarnInvalidHydration = true; + warningWithoutStack$1( + false, + 'Prop `%s` did not match. Server: %s Client: %s', + propName, + JSON.stringify(normalizedServerValue), + JSON.stringify(normalizedClientValue), + ); + }; + + warnForExtraAttributes = function (attributeNames) { + if (didWarnInvalidHydration) { + return; + } + + didWarnInvalidHydration = true; + var names = []; + attributeNames.forEach(function (name) { + names.push(name); + }); + warningWithoutStack$1(false, 'Extra attributes from the server: %s', names); + }; + + warnForInvalidEventListener = function (registrationName, listener) { + if (listener === false) { + warning$1( + false, + 'Expected `%s` listener to be a function, instead got `false`.\n\n' + + 'If you used to conditionally omit it with %s={condition && value}, ' + + 'pass %s={condition ? value : undefined} instead.', + registrationName, + registrationName, + registrationName, + ); + } else { + warning$1( + false, + 'Expected `%s` listener to be a function, instead got a value of `%s` type.', + registrationName, + typeof listener, + ); + } + }; // Parse the HTML and read it back to normalize the HTML string so that it + // can be used for comparison. + + normalizeHTML = function (parent, html) { + // We could have created a separate document here to avoid + // re-initializing custom elements if they exist. But this breaks + // how <noscript> is being handled. So we use the same document. + // See the discussion in https://github.com/facebook/react/pull/11157. + var testElement = + parent.namespaceURI === HTML_NAMESPACE + ? parent.ownerDocument.createElement(parent.tagName) + : parent.ownerDocument.createElementNS(parent.namespaceURI, parent.tagName); + testElement.innerHTML = html; + return testElement.innerHTML; + }; + } + + function ensureListeningTo(rootContainerElement, registrationName) { + var isDocumentOrFragment = + rootContainerElement.nodeType === DOCUMENT_NODE || + rootContainerElement.nodeType === DOCUMENT_FRAGMENT_NODE; + var doc = isDocumentOrFragment ? rootContainerElement : rootContainerElement.ownerDocument; + listenTo(registrationName, doc); + } + + function getOwnerDocumentFromRootContainer(rootContainerElement) { + return rootContainerElement.nodeType === DOCUMENT_NODE + ? rootContainerElement + : rootContainerElement.ownerDocument; + } + + function noop() {} + + function trapClickOnNonInteractiveElement(node) { + // Mobile Safari does not fire properly bubble click events on + // non-interactive elements, which means delegated click listeners do not + // fire. The workaround for this bug involves attaching an empty click + // listener on the target node. + // http://www.quirksmode.org/blog/archives/2010/09/click_event_del.html + // Just set it using the onclick property so that we don't have to manage any + // bookkeeping for it. Not sure if we need to clear it when the listener is + // removed. + // TODO: Only do this for the relevant Safaris maybe? + node.onclick = noop; + } + + function setInitialDOMProperties( + tag, + domElement, + rootContainerElement, + nextProps, + isCustomComponentTag, + ) { + for (var propKey in nextProps) { + if (!nextProps.hasOwnProperty(propKey)) { + continue; + } + + var nextProp = nextProps[propKey]; + + if (propKey === STYLE$1) { + { + if (nextProp) { + // Freeze the next style object so that we can assume it won't be + // mutated. We have already warned for this in the past. + Object.freeze(nextProp); + } + } // Relies on `updateStylesByID` not mutating `styleUpdates`. + + setValueForStyles(domElement, nextProp); + } else if (propKey === DANGEROUSLY_SET_INNER_HTML) { + var nextHtml = nextProp ? nextProp[HTML] : undefined; + + if (nextHtml != null) { + setInnerHTML(domElement, nextHtml); + } + } else if (propKey === CHILDREN) { + if (typeof nextProp === 'string') { + // Avoid setting initial textContent when the text is empty. In IE11 setting + // textContent on a <textarea> will cause the placeholder to not + // show within the <textarea> until it has been focused and blurred again. + // https://github.com/facebook/react/issues/6731#issuecomment-254874553 + var canSetTextContent = tag !== 'textarea' || nextProp !== ''; + + if (canSetTextContent) { + setTextContent(domElement, nextProp); + } + } else if (typeof nextProp === 'number') { + setTextContent(domElement, '' + nextProp); + } + } else if ( + (enableFlareAPI && propKey === LISTENERS) || + propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || + propKey === SUPPRESS_HYDRATION_WARNING$1 + ) { + // Noop + } else if (propKey === AUTOFOCUS) { + // We polyfill it separately on the client during commit. + // We could have excluded it in the property list instead of + // adding a special case here, but then it wouldn't be emitted + // on server rendering (but we *do* want to emit it in SSR). + } else if (registrationNameModules.hasOwnProperty(propKey)) { + if (nextProp != null) { + if (true && typeof nextProp !== 'function') { + warnForInvalidEventListener(propKey, nextProp); + } + + ensureListeningTo(rootContainerElement, propKey); + } + } else if (nextProp != null) { + setValueForProperty(domElement, propKey, nextProp, isCustomComponentTag); + } + } + } + + function updateDOMProperties( + domElement, + updatePayload, + wasCustomComponentTag, + isCustomComponentTag, + ) { + // TODO: Handle wasCustomComponentTag + for (var i = 0; i < updatePayload.length; i += 2) { + var propKey = updatePayload[i]; + var propValue = updatePayload[i + 1]; + + if (propKey === STYLE$1) { + setValueForStyles(domElement, propValue); + } else if (propKey === DANGEROUSLY_SET_INNER_HTML) { + setInnerHTML(domElement, propValue); + } else if (propKey === CHILDREN) { + setTextContent(domElement, propValue); + } else { + setValueForProperty(domElement, propKey, propValue, isCustomComponentTag); + } + } + } + + function createElement(type, props, rootContainerElement, parentNamespace) { + var isCustomComponentTag; // We create tags in the namespace of their parent container, except HTML + // tags get no namespace. + + var ownerDocument = getOwnerDocumentFromRootContainer(rootContainerElement); + var domElement; + var namespaceURI = parentNamespace; + + if (namespaceURI === HTML_NAMESPACE) { + namespaceURI = getIntrinsicNamespace(type); + } + + if (namespaceURI === HTML_NAMESPACE) { + { + isCustomComponentTag = isCustomComponent(type, props); // Should this check be gated by parent namespace? Not sure we want to + // allow <SVG> or <mATH>. + + !(isCustomComponentTag || type === type.toLowerCase()) + ? warning$1( + false, + '<%s /> is using incorrect casing. ' + + 'Use PascalCase for React components, ' + + 'or lowercase for HTML elements.', + type, + ) + : void 0; + } + + if (type === 'script') { + // Create the script via .innerHTML so its "parser-inserted" flag is + // set to true and it does not execute + var div = ownerDocument.createElement('div'); + + { + if (enableTrustedTypesIntegration && !didWarnScriptTags) { + warning$1( + false, + 'Encountered a script tag while rendering React component. ' + + 'Scripts inside React components are never executed when rendering ' + + 'on the client. Consider using template tag instead ' + + '(https://developer.mozilla.org/en-US/docs/Web/HTML/Element/template).', + ); + didWarnScriptTags = true; + } + } + + div.innerHTML = '<script><' + '/script>'; // eslint-disable-line + // This is guaranteed to yield a script element. + + var firstChild = div.firstChild; + domElement = div.removeChild(firstChild); + } else if (typeof props.is === 'string') { + // $FlowIssue `createElement` should be updated for Web Components + domElement = ownerDocument.createElement(type, { + is: props.is, + }); + } else { + // Separate else branch instead of using `props.is || undefined` above because of a Firefox bug. + // See discussion in https://github.com/facebook/react/pull/6896 + // and discussion in https://bugzilla.mozilla.org/show_bug.cgi?id=1276240 + domElement = ownerDocument.createElement(type); // Normally attributes are assigned in `setInitialDOMProperties`, however the `multiple` and `size` + // attributes on `select`s needs to be added before `option`s are inserted. + // This prevents: + // - a bug where the `select` does not scroll to the correct option because singular + // `select` elements automatically pick the first item #13222 + // - a bug where the `select` set the first item as selected despite the `size` attribute #14239 + // See https://github.com/facebook/react/issues/13222 + // and https://github.com/facebook/react/issues/14239 + + if (type === 'select') { + var node = domElement; + + if (props.multiple) { + node.multiple = true; + } else if (props.size) { + // Setting a size greater than 1 causes a select to behave like `multiple=true`, where + // it is possible that no option is selected. + // + // This is only necessary when a select in "single selection mode". + node.size = props.size; + } + } + } + } else { + domElement = ownerDocument.createElementNS(namespaceURI, type); + } + + { + if (namespaceURI === HTML_NAMESPACE) { + if ( + !isCustomComponentTag && + Object.prototype.toString.call(domElement) === '[object HTMLUnknownElement]' && + !Object.prototype.hasOwnProperty.call(warnedUnknownTags, type) + ) { + warnedUnknownTags[type] = true; + warning$1( + false, + 'The tag <%s> is unrecognized in this browser. ' + + 'If you meant to render a React component, start its name with ' + + 'an uppercase letter.', + type, + ); + } + } + } + + return domElement; + } + function createTextNode(text, rootContainerElement) { + return getOwnerDocumentFromRootContainer(rootContainerElement).createTextNode(text); + } + function setInitialProperties(domElement, tag, rawProps, rootContainerElement) { + var isCustomComponentTag = isCustomComponent(tag, rawProps); + + { + validatePropertiesInDevelopment(tag, rawProps); + + if (isCustomComponentTag && !didWarnShadyDOM && domElement.shadyRoot) { + warning$1( + false, + '%s is using shady DOM. Using shady DOM with React can ' + 'cause things to break subtly.', + getCurrentFiberOwnerNameInDevOrNull() || 'A component', + ); + didWarnShadyDOM = true; + } + } // TODO: Make sure that we check isMounted before firing any of these events. + + var props; + + switch (tag) { + case 'iframe': + case 'object': + case 'embed': + trapBubbledEvent(TOP_LOAD, domElement); + props = rawProps; + break; + + case 'video': + case 'audio': + // Create listener for each media event + for (var i = 0; i < mediaEventTypes.length; i++) { + trapBubbledEvent(mediaEventTypes[i], domElement); + } + + props = rawProps; + break; + + case 'source': + trapBubbledEvent(TOP_ERROR, domElement); + props = rawProps; + break; + + case 'img': + case 'image': + case 'link': + trapBubbledEvent(TOP_ERROR, domElement); + trapBubbledEvent(TOP_LOAD, domElement); + props = rawProps; + break; + + case 'form': + trapBubbledEvent(TOP_RESET, domElement); + trapBubbledEvent(TOP_SUBMIT, domElement); + props = rawProps; + break; + + case 'details': + trapBubbledEvent(TOP_TOGGLE, domElement); + props = rawProps; + break; + + case 'input': + initWrapperState(domElement, rawProps); + props = getHostProps(domElement, rawProps); + trapBubbledEvent(TOP_INVALID, domElement); // For controlled components we always need to ensure we're listening + // to onChange. Even if there is no listener. + + ensureListeningTo(rootContainerElement, 'onChange'); + break; + + case 'option': + validateProps(domElement, rawProps); + props = getHostProps$1(domElement, rawProps); + break; + + case 'select': + initWrapperState$1(domElement, rawProps); + props = getHostProps$2(domElement, rawProps); + trapBubbledEvent(TOP_INVALID, domElement); // For controlled components we always need to ensure we're listening + // to onChange. Even if there is no listener. + + ensureListeningTo(rootContainerElement, 'onChange'); + break; + + case 'textarea': + initWrapperState$2(domElement, rawProps); + props = getHostProps$3(domElement, rawProps); + trapBubbledEvent(TOP_INVALID, domElement); // For controlled components we always need to ensure we're listening + // to onChange. Even if there is no listener. + + ensureListeningTo(rootContainerElement, 'onChange'); + break; + + default: + props = rawProps; + } + + assertValidProps(tag, props); + setInitialDOMProperties(tag, domElement, rootContainerElement, props, isCustomComponentTag); + + switch (tag) { + case 'input': + // TODO: Make sure we check if this is still unmounted or do any clean + // up necessary since we never stop tracking anymore. + track(domElement); + postMountWrapper(domElement, rawProps, false); + break; + + case 'textarea': + // TODO: Make sure we check if this is still unmounted or do any clean + // up necessary since we never stop tracking anymore. + track(domElement); + postMountWrapper$3(domElement, rawProps); + break; + + case 'option': + postMountWrapper$1(domElement, rawProps); + break; + + case 'select': + postMountWrapper$2(domElement, rawProps); + break; + + default: + if (typeof props.onClick === 'function') { + // TODO: This cast may not be sound for SVG, MathML or custom elements. + trapClickOnNonInteractiveElement(domElement); + } + + break; + } + } // Calculate the diff between the two objects. + + function diffProperties(domElement, tag, lastRawProps, nextRawProps, rootContainerElement) { + { + validatePropertiesInDevelopment(tag, nextRawProps); + } + + var updatePayload = null; + var lastProps; + var nextProps; + + switch (tag) { + case 'input': + lastProps = getHostProps(domElement, lastRawProps); + nextProps = getHostProps(domElement, nextRawProps); + updatePayload = []; + break; + + case 'option': + lastProps = getHostProps$1(domElement, lastRawProps); + nextProps = getHostProps$1(domElement, nextRawProps); + updatePayload = []; + break; + + case 'select': + lastProps = getHostProps$2(domElement, lastRawProps); + nextProps = getHostProps$2(domElement, nextRawProps); + updatePayload = []; + break; + + case 'textarea': + lastProps = getHostProps$3(domElement, lastRawProps); + nextProps = getHostProps$3(domElement, nextRawProps); + updatePayload = []; + break; + + default: + lastProps = lastRawProps; + nextProps = nextRawProps; + + if (typeof lastProps.onClick !== 'function' && typeof nextProps.onClick === 'function') { + // TODO: This cast may not be sound for SVG, MathML or custom elements. + trapClickOnNonInteractiveElement(domElement); + } + + break; + } + + assertValidProps(tag, nextProps); + var propKey; + var styleName; + var styleUpdates = null; + + for (propKey in lastProps) { + if ( + nextProps.hasOwnProperty(propKey) || + !lastProps.hasOwnProperty(propKey) || + lastProps[propKey] == null + ) { + continue; + } + + if (propKey === STYLE$1) { + var lastStyle = lastProps[propKey]; + + for (styleName in lastStyle) { + if (lastStyle.hasOwnProperty(styleName)) { + if (!styleUpdates) { + styleUpdates = {}; + } + + styleUpdates[styleName] = ''; + } + } + } else if (propKey === DANGEROUSLY_SET_INNER_HTML || propKey === CHILDREN) { + // Noop. This is handled by the clear text mechanism. + } else if ( + (enableFlareAPI && propKey === LISTENERS) || + propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || + propKey === SUPPRESS_HYDRATION_WARNING$1 + ) { + // Noop + } else if (propKey === AUTOFOCUS) { + // Noop. It doesn't work on updates anyway. + } else if (registrationNameModules.hasOwnProperty(propKey)) { + // This is a special case. If any listener updates we need to ensure + // that the "current" fiber pointer gets updated so we need a commit + // to update this element. + if (!updatePayload) { + updatePayload = []; + } + } else { + // For all other deleted properties we add it to the queue. We use + // the whitelist in the commit phase instead. + (updatePayload = updatePayload || []).push(propKey, null); + } + } + + for (propKey in nextProps) { + var nextProp = nextProps[propKey]; + var lastProp = lastProps != null ? lastProps[propKey] : undefined; + + if ( + !nextProps.hasOwnProperty(propKey) || + nextProp === lastProp || + (nextProp == null && lastProp == null) + ) { + continue; + } + + if (propKey === STYLE$1) { + { + if (nextProp) { + // Freeze the next style object so that we can assume it won't be + // mutated. We have already warned for this in the past. + Object.freeze(nextProp); + } + } + + if (lastProp) { + // Unset styles on `lastProp` but not on `nextProp`. + for (styleName in lastProp) { + if ( + lastProp.hasOwnProperty(styleName) && + (!nextProp || !nextProp.hasOwnProperty(styleName)) + ) { + if (!styleUpdates) { + styleUpdates = {}; + } + + styleUpdates[styleName] = ''; + } + } // Update styles that changed since `lastProp`. + + for (styleName in nextProp) { + if (nextProp.hasOwnProperty(styleName) && lastProp[styleName] !== nextProp[styleName]) { + if (!styleUpdates) { + styleUpdates = {}; + } + + styleUpdates[styleName] = nextProp[styleName]; + } + } + } else { + // Relies on `updateStylesByID` not mutating `styleUpdates`. + if (!styleUpdates) { + if (!updatePayload) { + updatePayload = []; + } + + updatePayload.push(propKey, styleUpdates); + } + + styleUpdates = nextProp; + } + } else if (propKey === DANGEROUSLY_SET_INNER_HTML) { + var nextHtml = nextProp ? nextProp[HTML] : undefined; + var lastHtml = lastProp ? lastProp[HTML] : undefined; + + if (nextHtml != null) { + if (lastHtml !== nextHtml) { + (updatePayload = updatePayload || []).push(propKey, toStringOrTrustedType(nextHtml)); + } + } else { + // TODO: It might be too late to clear this if we have children + // inserted already. + } + } else if (propKey === CHILDREN) { + if (lastProp !== nextProp && (typeof nextProp === 'string' || typeof nextProp === 'number')) { + (updatePayload = updatePayload || []).push(propKey, '' + nextProp); + } + } else if ( + (enableFlareAPI && propKey === LISTENERS) || + propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || + propKey === SUPPRESS_HYDRATION_WARNING$1 + ) { + // Noop + } else if (registrationNameModules.hasOwnProperty(propKey)) { + if (nextProp != null) { + // We eagerly listen to this even though we haven't committed yet. + if (true && typeof nextProp !== 'function') { + warnForInvalidEventListener(propKey, nextProp); + } + + ensureListeningTo(rootContainerElement, propKey); + } + + if (!updatePayload && lastProp !== nextProp) { + // This is a special case. If any listener updates we need to ensure + // that the "current" props pointer gets updated so we need a commit + // to update this element. + updatePayload = []; + } + } else { + // For any other property we always add it to the queue and then we + // filter it out using the whitelist during the commit. + (updatePayload = updatePayload || []).push(propKey, nextProp); + } + } + + if (styleUpdates) { + { + validateShorthandPropertyCollisionInDev(styleUpdates, nextProps[STYLE$1]); + } + + (updatePayload = updatePayload || []).push(STYLE$1, styleUpdates); + } + + return updatePayload; + } // Apply the diff. + + function updateProperties(domElement, updatePayload, tag, lastRawProps, nextRawProps) { + // Update checked *before* name. + // In the middle of an update, it is possible to have multiple checked. + // When a checked radio tries to change name, browser makes another radio's checked false. + if (tag === 'input' && nextRawProps.type === 'radio' && nextRawProps.name != null) { + updateChecked(domElement, nextRawProps); + } + + var wasCustomComponentTag = isCustomComponent(tag, lastRawProps); + var isCustomComponentTag = isCustomComponent(tag, nextRawProps); // Apply the diff. + + updateDOMProperties(domElement, updatePayload, wasCustomComponentTag, isCustomComponentTag); // TODO: Ensure that an update gets scheduled if any of the special props + // changed. + + switch (tag) { + case 'input': + // Update the wrapper around inputs *after* updating props. This has to + // happen after `updateDOMProperties`. Otherwise HTML5 input validations + // raise warnings and prevent the new value from being assigned. + updateWrapper(domElement, nextRawProps); + break; + + case 'textarea': + updateWrapper$1(domElement, nextRawProps); + break; + + case 'select': + // <select> value update needs to occur after <option> children + // reconciliation + postUpdateWrapper(domElement, nextRawProps); + break; + } + } + + function getPossibleStandardName(propName) { + { + var lowerCasedName = propName.toLowerCase(); + + if (!possibleStandardNames.hasOwnProperty(lowerCasedName)) { + return null; + } + + return possibleStandardNames[lowerCasedName] || null; + } + + return null; + } + + function diffHydratedProperties(domElement, tag, rawProps, parentNamespace, rootContainerElement) { + var isCustomComponentTag; + var extraAttributeNames; + + { + suppressHydrationWarning = rawProps[SUPPRESS_HYDRATION_WARNING$1] === true; + isCustomComponentTag = isCustomComponent(tag, rawProps); + validatePropertiesInDevelopment(tag, rawProps); + + if (isCustomComponentTag && !didWarnShadyDOM && domElement.shadyRoot) { + warning$1( + false, + '%s is using shady DOM. Using shady DOM with React can ' + 'cause things to break subtly.', + getCurrentFiberOwnerNameInDevOrNull() || 'A component', + ); + didWarnShadyDOM = true; + } + } // TODO: Make sure that we check isMounted before firing any of these events. + + switch (tag) { + case 'iframe': + case 'object': + case 'embed': + trapBubbledEvent(TOP_LOAD, domElement); + break; + + case 'video': + case 'audio': + // Create listener for each media event + for (var i = 0; i < mediaEventTypes.length; i++) { + trapBubbledEvent(mediaEventTypes[i], domElement); + } + + break; + + case 'source': + trapBubbledEvent(TOP_ERROR, domElement); + break; + + case 'img': + case 'image': + case 'link': + trapBubbledEvent(TOP_ERROR, domElement); + trapBubbledEvent(TOP_LOAD, domElement); + break; + + case 'form': + trapBubbledEvent(TOP_RESET, domElement); + trapBubbledEvent(TOP_SUBMIT, domElement); + break; + + case 'details': + trapBubbledEvent(TOP_TOGGLE, domElement); + break; + + case 'input': + initWrapperState(domElement, rawProps); + trapBubbledEvent(TOP_INVALID, domElement); // For controlled components we always need to ensure we're listening + // to onChange. Even if there is no listener. + + ensureListeningTo(rootContainerElement, 'onChange'); + break; + + case 'option': + validateProps(domElement, rawProps); + break; + + case 'select': + initWrapperState$1(domElement, rawProps); + trapBubbledEvent(TOP_INVALID, domElement); // For controlled components we always need to ensure we're listening + // to onChange. Even if there is no listener. + + ensureListeningTo(rootContainerElement, 'onChange'); + break; + + case 'textarea': + initWrapperState$2(domElement, rawProps); + trapBubbledEvent(TOP_INVALID, domElement); // For controlled components we always need to ensure we're listening + // to onChange. Even if there is no listener. + + ensureListeningTo(rootContainerElement, 'onChange'); + break; + } + + assertValidProps(tag, rawProps); + + { + extraAttributeNames = new Set(); + var attributes = domElement.attributes; + + for (var _i = 0; _i < attributes.length; _i++) { + var name = attributes[_i].name.toLowerCase(); + + switch (name) { + // Built-in SSR attribute is whitelisted + case 'data-reactroot': + break; + // Controlled attributes are not validated + // TODO: Only ignore them on controlled tags. + + case 'value': + break; + + case 'checked': + break; + + case 'selected': + break; + + default: + // Intentionally use the original name. + // See discussion in https://github.com/facebook/react/pull/10676. + extraAttributeNames.add(attributes[_i].name); + } + } + } + + var updatePayload = null; + + for (var propKey in rawProps) { + if (!rawProps.hasOwnProperty(propKey)) { + continue; + } + + var nextProp = rawProps[propKey]; + + if (propKey === CHILDREN) { + // For text content children we compare against textContent. This + // might match additional HTML that is hidden when we read it using + // textContent. E.g. "foo" will match "f<span>oo</span>" but that still + // satisfies our requirement. Our requirement is not to produce perfect + // HTML and attributes. Ideally we should preserve structure but it's + // ok not to if the visible content is still enough to indicate what + // even listeners these nodes might be wired up to. + // TODO: Warn if there is more than a single textNode as a child. + // TODO: Should we use domElement.firstChild.nodeValue to compare? + if (typeof nextProp === 'string') { + if (domElement.textContent !== nextProp) { + if (true && !suppressHydrationWarning) { + warnForTextDifference(domElement.textContent, nextProp); + } + + updatePayload = [CHILDREN, nextProp]; + } + } else if (typeof nextProp === 'number') { + if (domElement.textContent !== '' + nextProp) { + if (true && !suppressHydrationWarning) { + warnForTextDifference(domElement.textContent, nextProp); + } + + updatePayload = [CHILDREN, '' + nextProp]; + } + } + } else if (registrationNameModules.hasOwnProperty(propKey)) { + if (nextProp != null) { + if (true && typeof nextProp !== 'function') { + warnForInvalidEventListener(propKey, nextProp); + } + + ensureListeningTo(rootContainerElement, propKey); + } + } else if ( + true && // Convince Flow we've calculated it (it's DEV-only in this method.) + typeof isCustomComponentTag === 'boolean' + ) { + // Validate that the properties correspond to their expected values. + var serverValue = void 0; + var propertyInfo = getPropertyInfo(propKey); + + if (suppressHydrationWarning) { + // Don't bother comparing. We're ignoring all these warnings. + } else if ( + (enableFlareAPI && propKey === LISTENERS) || + propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || + propKey === SUPPRESS_HYDRATION_WARNING$1 || // Controlled attributes are not validated + // TODO: Only ignore them on controlled tags. + propKey === 'value' || + propKey === 'checked' || + propKey === 'selected' + ) { + // Noop + } else if (propKey === DANGEROUSLY_SET_INNER_HTML) { + var serverHTML = domElement.innerHTML; + var nextHtml = nextProp ? nextProp[HTML] : undefined; + var expectedHTML = normalizeHTML(domElement, nextHtml != null ? nextHtml : ''); + + if (expectedHTML !== serverHTML) { + warnForPropDifference(propKey, serverHTML, expectedHTML); + } + } else if (propKey === STYLE$1) { + // $FlowFixMe - Should be inferred as not undefined. + extraAttributeNames.delete(propKey); + + if (canDiffStyleForHydrationWarning) { + var expectedStyle = createDangerousStringForStyles(nextProp); + serverValue = domElement.getAttribute('style'); + + if (expectedStyle !== serverValue) { + warnForPropDifference(propKey, serverValue, expectedStyle); + } + } + } else if (isCustomComponentTag) { + // $FlowFixMe - Should be inferred as not undefined. + extraAttributeNames.delete(propKey.toLowerCase()); + serverValue = getValueForAttribute(domElement, propKey, nextProp); + + if (nextProp !== serverValue) { + warnForPropDifference(propKey, serverValue, nextProp); + } + } else if ( + !shouldIgnoreAttribute(propKey, propertyInfo, isCustomComponentTag) && + !shouldRemoveAttribute(propKey, nextProp, propertyInfo, isCustomComponentTag) + ) { + var isMismatchDueToBadCasing = false; + + if (propertyInfo !== null) { + // $FlowFixMe - Should be inferred as not undefined. + extraAttributeNames.delete(propertyInfo.attributeName); + serverValue = getValueForProperty(domElement, propKey, nextProp, propertyInfo); + } else { + var ownNamespace = parentNamespace; + + if (ownNamespace === HTML_NAMESPACE) { + ownNamespace = getIntrinsicNamespace(tag); + } + + if (ownNamespace === HTML_NAMESPACE) { + // $FlowFixMe - Should be inferred as not undefined. + extraAttributeNames.delete(propKey.toLowerCase()); + } else { + var standardName = getPossibleStandardName(propKey); + + if (standardName !== null && standardName !== propKey) { + // If an SVG prop is supplied with bad casing, it will + // be successfully parsed from HTML, but will produce a mismatch + // (and would be incorrectly rendered on the client). + // However, we already warn about bad casing elsewhere. + // So we'll skip the misleading extra mismatch warning in this case. + isMismatchDueToBadCasing = true; // $FlowFixMe - Should be inferred as not undefined. + + extraAttributeNames.delete(standardName); + } // $FlowFixMe - Should be inferred as not undefined. + + extraAttributeNames.delete(propKey); + } + + serverValue = getValueForAttribute(domElement, propKey, nextProp); + } + + if (nextProp !== serverValue && !isMismatchDueToBadCasing) { + warnForPropDifference(propKey, serverValue, nextProp); + } + } + } + } + + { + // $FlowFixMe - Should be inferred as not undefined. + if (extraAttributeNames.size > 0 && !suppressHydrationWarning) { + // $FlowFixMe - Should be inferred as not undefined. + warnForExtraAttributes(extraAttributeNames); + } + } + + switch (tag) { + case 'input': + // TODO: Make sure we check if this is still unmounted or do any clean + // up necessary since we never stop tracking anymore. + track(domElement); + postMountWrapper(domElement, rawProps, true); + break; + + case 'textarea': + // TODO: Make sure we check if this is still unmounted or do any clean + // up necessary since we never stop tracking anymore. + track(domElement); + postMountWrapper$3(domElement, rawProps); + break; + + case 'select': + case 'option': + // For input and textarea we current always set the value property at + // post mount to force it to diverge from attributes. However, for + // option and select we don't quite do the same thing and select + // is not resilient to the DOM state changing so we don't do that here. + // TODO: Consider not doing this for input and textarea. + break; + + default: + if (typeof rawProps.onClick === 'function') { + // TODO: This cast may not be sound for SVG, MathML or custom elements. + trapClickOnNonInteractiveElement(domElement); + } + + break; + } + + return updatePayload; + } + function diffHydratedText(textNode, text) { + var isDifferent = textNode.nodeValue !== text; + return isDifferent; + } + function warnForUnmatchedText(textNode, text) { + { + warnForTextDifference(textNode.nodeValue, text); + } + } + function warnForDeletedHydratableElement(parentNode, child) { + { + if (didWarnInvalidHydration) { + return; + } + + didWarnInvalidHydration = true; + warningWithoutStack$1( + false, + 'Did not expect server HTML to contain a <%s> in <%s>.', + child.nodeName.toLowerCase(), + parentNode.nodeName.toLowerCase(), + ); + } + } + function warnForDeletedHydratableText(parentNode, child) { + { + if (didWarnInvalidHydration) { + return; + } + + didWarnInvalidHydration = true; + warningWithoutStack$1( + false, + 'Did not expect server HTML to contain the text node "%s" in <%s>.', + child.nodeValue, + parentNode.nodeName.toLowerCase(), + ); + } + } + function warnForInsertedHydratedElement(parentNode, tag, props) { + { + if (didWarnInvalidHydration) { + return; + } + + didWarnInvalidHydration = true; + warningWithoutStack$1( + false, + 'Expected server HTML to contain a matching <%s> in <%s>.', + tag, + parentNode.nodeName.toLowerCase(), + ); + } + } + function warnForInsertedHydratedText(parentNode, text) { + { + if (text === '') { + // We expect to insert empty text nodes since they're not represented in + // the HTML. + // TODO: Remove this special case if we can just avoid inserting empty + // text nodes. + return; + } + + if (didWarnInvalidHydration) { + return; + } + + didWarnInvalidHydration = true; + warningWithoutStack$1( + false, + 'Expected server HTML to contain a matching text node for "%s" in <%s>.', + text, + parentNode.nodeName.toLowerCase(), + ); + } + } + function restoreControlledState$$1(domElement, tag, props) { + switch (tag) { + case 'input': + restoreControlledState$1(domElement, props); + return; + + case 'textarea': + restoreControlledState$3(domElement, props); + return; + + case 'select': + restoreControlledState$2(domElement, props); + return; + } + } + function listenToEventResponderEventTypes(eventTypes, element) { + if (enableFlareAPI) { + // Get the listening Set for this element. We use this to track + // what events we're listening to. + var listeningSet = getListeningSetForElement(element); // Go through each target event type of the event responder + + for (var i = 0, length = eventTypes.length; i < length; ++i) { + var eventType = eventTypes[i]; + var isPassive = !endsWith(eventType, '_active'); + var eventKey = isPassive ? eventType + '_passive' : eventType; + var targetEventType = isPassive ? eventType : eventType.substring(0, eventType.length - 7); + + if (!listeningSet.has(eventKey)) { + trapEventForResponderEventSystem(element, targetEventType, isPassive); + listeningSet.add(eventKey); + } + } + } + } // We can remove this once the event API is stable and out of a flag + + if (enableFlareAPI) { + setListenToResponderEventTypes(listenToEventResponderEventTypes); + } + + function getActiveElement(doc) { + doc = doc || (typeof document !== 'undefined' ? document : undefined); + + if (typeof doc === 'undefined') { + return null; + } + + try { + return doc.activeElement || doc.body; + } catch (e) { + return doc.body; + } + } + + /** + * Given any node return the first leaf node without children. + * + * @param {DOMElement|DOMTextNode} node + * @return {DOMElement|DOMTextNode} + */ + + function getLeafNode(node) { + while (node && node.firstChild) { + node = node.firstChild; + } + + return node; + } + /** + * Get the next sibling within a container. This will walk up the + * DOM if a node's siblings have been exhausted. + * + * @param {DOMElement|DOMTextNode} node + * @return {?DOMElement|DOMTextNode} + */ + + function getSiblingNode(node) { + while (node) { + if (node.nextSibling) { + return node.nextSibling; + } + + node = node.parentNode; + } + } + /** + * Get object describing the nodes which contain characters at offset. + * + * @param {DOMElement|DOMTextNode} root + * @param {number} offset + * @return {?object} + */ + + function getNodeForCharacterOffset(root, offset) { + var node = getLeafNode(root); + var nodeStart = 0; + var nodeEnd = 0; + + while (node) { + if (node.nodeType === TEXT_NODE) { + nodeEnd = nodeStart + node.textContent.length; + + if (nodeStart <= offset && nodeEnd >= offset) { + return { + node: node, + offset: offset - nodeStart, + }; + } + + nodeStart = nodeEnd; + } + + node = getLeafNode(getSiblingNode(node)); + } + } + + /** + * @param {DOMElement} outerNode + * @return {?object} + */ + + function getOffsets(outerNode) { + var ownerDocument = outerNode.ownerDocument; + var win = (ownerDocument && ownerDocument.defaultView) || window; + var selection = win.getSelection && win.getSelection(); + + if (!selection || selection.rangeCount === 0) { + return null; + } + + var anchorNode = selection.anchorNode, + anchorOffset = selection.anchorOffset, + focusNode = selection.focusNode, + focusOffset = selection.focusOffset; // In Firefox, anchorNode and focusNode can be "anonymous divs", e.g. the + // up/down buttons on an <input type="number">. Anonymous divs do not seem to + // expose properties, triggering a "Permission denied error" if any of its + // properties are accessed. The only seemingly possible way to avoid erroring + // is to access a property that typically works for non-anonymous divs and + // catch any error that may otherwise arise. See + // https://bugzilla.mozilla.org/show_bug.cgi?id=208427 + + try { + /* eslint-disable no-unused-expressions */ + anchorNode.nodeType; + focusNode.nodeType; + /* eslint-enable no-unused-expressions */ + } catch (e) { + return null; + } + + return getModernOffsetsFromPoints(outerNode, anchorNode, anchorOffset, focusNode, focusOffset); + } + /** + * Returns {start, end} where `start` is the character/codepoint index of + * (anchorNode, anchorOffset) within the textContent of `outerNode`, and + * `end` is the index of (focusNode, focusOffset). + * + * Returns null if you pass in garbage input but we should probably just crash. + * + * Exported only for testing. + */ + + function getModernOffsetsFromPoints(outerNode, anchorNode, anchorOffset, focusNode, focusOffset) { + var length = 0; + var start = -1; + var end = -1; + var indexWithinAnchor = 0; + var indexWithinFocus = 0; + var node = outerNode; + var parentNode = null; + + outer: while (true) { + var next = null; + + while (true) { + if (node === anchorNode && (anchorOffset === 0 || node.nodeType === TEXT_NODE)) { + start = length + anchorOffset; + } + + if (node === focusNode && (focusOffset === 0 || node.nodeType === TEXT_NODE)) { + end = length + focusOffset; + } + + if (node.nodeType === TEXT_NODE) { + length += node.nodeValue.length; + } + + if ((next = node.firstChild) === null) { + break; + } // Moving from `node` to its first child `next`. + + parentNode = node; + node = next; + } + + while (true) { + if (node === outerNode) { + // If `outerNode` has children, this is always the second time visiting + // it. If it has no children, this is still the first loop, and the only + // valid selection is anchorNode and focusNode both equal to this node + // and both offsets 0, in which case we will have handled above. + break outer; + } + + if (parentNode === anchorNode && ++indexWithinAnchor === anchorOffset) { + start = length; + } + + if (parentNode === focusNode && ++indexWithinFocus === focusOffset) { + end = length; + } + + if ((next = node.nextSibling) !== null) { + break; + } + + node = parentNode; + parentNode = node.parentNode; + } // Moving from `node` to its next sibling `next`. + + node = next; + } + + if (start === -1 || end === -1) { + // This should never happen. (Would happen if the anchor/focus nodes aren't + // actually inside the passed-in node.) + return null; + } + + return { + start: start, + end: end, + }; + } + /** + * In modern non-IE browsers, we can support both forward and backward + * selections. + * + * Note: IE10+ supports the Selection object, but it does not support + * the `extend` method, which means that even in modern IE, it's not possible + * to programmatically create a backward selection. Thus, for all IE + * versions, we use the old IE API to create our selections. + * + * @param {DOMElement|DOMTextNode} node + * @param {object} offsets + */ + + function setOffsets(node, offsets) { + var doc = node.ownerDocument || document; + var win = (doc && doc.defaultView) || window; // Edge fails with "Object expected" in some scenarios. + // (For instance: TinyMCE editor used in a list component that supports pasting to add more, + // fails when pasting 100+ items) + + if (!win.getSelection) { + return; + } + + var selection = win.getSelection(); + var length = node.textContent.length; + var start = Math.min(offsets.start, length); + var end = offsets.end === undefined ? start : Math.min(offsets.end, length); // IE 11 uses modern selection, but doesn't support the extend method. + // Flip backward selections, so we can set with a single range. + + if (!selection.extend && start > end) { + var temp = end; + end = start; + start = temp; + } + + var startMarker = getNodeForCharacterOffset(node, start); + var endMarker = getNodeForCharacterOffset(node, end); + + if (startMarker && endMarker) { + if ( + selection.rangeCount === 1 && + selection.anchorNode === startMarker.node && + selection.anchorOffset === startMarker.offset && + selection.focusNode === endMarker.node && + selection.focusOffset === endMarker.offset + ) { + return; + } + + var range = doc.createRange(); + range.setStart(startMarker.node, startMarker.offset); + selection.removeAllRanges(); + + if (start > end) { + selection.addRange(range); + selection.extend(endMarker.node, endMarker.offset); + } else { + range.setEnd(endMarker.node, endMarker.offset); + selection.addRange(range); + } + } + } + + function isTextNode(node) { + return node && node.nodeType === TEXT_NODE; + } + + function containsNode(outerNode, innerNode) { + if (!outerNode || !innerNode) { + return false; + } else if (outerNode === innerNode) { + return true; + } else if (isTextNode(outerNode)) { + return false; + } else if (isTextNode(innerNode)) { + return containsNode(outerNode, innerNode.parentNode); + } else if ('contains' in outerNode) { + return outerNode.contains(innerNode); + } else if (outerNode.compareDocumentPosition) { + return !!(outerNode.compareDocumentPosition(innerNode) & 16); + } else { + return false; + } + } + + function isInDocument(node) { + return node && node.ownerDocument && containsNode(node.ownerDocument.documentElement, node); + } + + function isSameOriginFrame(iframe) { + try { + // Accessing the contentDocument of a HTMLIframeElement can cause the browser + // to throw, e.g. if it has a cross-origin src attribute. + // Safari will show an error in the console when the access results in "Blocked a frame with origin". e.g: + // iframe.contentDocument.defaultView; + // A safety way is to access one of the cross origin properties: Window or Location + // Which might result in "SecurityError" DOM Exception and it is compatible to Safari. + // https://html.spec.whatwg.org/multipage/browsers.html#integration-with-idl + return typeof iframe.contentWindow.location.href === 'string'; + } catch (err) { + return false; + } + } + + function getActiveElementDeep() { + var win = window; + var element = getActiveElement(); + + while (element instanceof win.HTMLIFrameElement) { + if (isSameOriginFrame(element)) { + win = element.contentWindow; + } else { + return element; + } + + element = getActiveElement(win.document); + } + + return element; + } + /** + * @ReactInputSelection: React input selection module. Based on Selection.js, + * but modified to be suitable for react and has a couple of bug fixes (doesn't + * assume buttons have range selections allowed). + * Input selection module for React. + */ + + /** + * @hasSelectionCapabilities: we get the element types that support selection + * from https://html.spec.whatwg.org/#do-not-apply, looking at `selectionStart` + * and `selectionEnd` rows. + */ + + function hasSelectionCapabilities(elem) { + var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase(); + return ( + nodeName && + ((nodeName === 'input' && + (elem.type === 'text' || + elem.type === 'search' || + elem.type === 'tel' || + elem.type === 'url' || + elem.type === 'password')) || + nodeName === 'textarea' || + elem.contentEditable === 'true') + ); + } + function getSelectionInformation() { + var focusedElem = getActiveElementDeep(); + return { + focusedElem: focusedElem, + selectionRange: hasSelectionCapabilities(focusedElem) ? getSelection(focusedElem) : null, + }; + } + /** + * @restoreSelection: If any selection information was potentially lost, + * restore it. This is useful when performing operations that could remove dom + * nodes and place them back in, resulting in focus being lost. + */ + + function restoreSelection(priorSelectionInformation) { + var curFocusedElem = getActiveElementDeep(); + var priorFocusedElem = priorSelectionInformation.focusedElem; + var priorSelectionRange = priorSelectionInformation.selectionRange; + + if (curFocusedElem !== priorFocusedElem && isInDocument(priorFocusedElem)) { + if (priorSelectionRange !== null && hasSelectionCapabilities(priorFocusedElem)) { + setSelection(priorFocusedElem, priorSelectionRange); + } // Focusing a node can change the scroll position, which is undesirable + + var ancestors = []; + var ancestor = priorFocusedElem; + + while ((ancestor = ancestor.parentNode)) { + if (ancestor.nodeType === ELEMENT_NODE) { + ancestors.push({ + element: ancestor, + left: ancestor.scrollLeft, + top: ancestor.scrollTop, + }); + } + } + + if (typeof priorFocusedElem.focus === 'function') { + priorFocusedElem.focus(); + } + + for (var i = 0; i < ancestors.length; i++) { + var info = ancestors[i]; + info.element.scrollLeft = info.left; + info.element.scrollTop = info.top; + } + } + } + /** + * @getSelection: Gets the selection bounds of a focused textarea, input or + * contentEditable node. + * -@input: Look up selection bounds of this input + * -@return {start: selectionStart, end: selectionEnd} + */ + + function getSelection(input) { + var selection; + + if ('selectionStart' in input) { + // Modern browser with input or textarea. + selection = { + start: input.selectionStart, + end: input.selectionEnd, + }; + } else { + // Content editable or old IE textarea. + selection = getOffsets(input); + } + + return ( + selection || { + start: 0, + end: 0, + } + ); + } + /** + * @setSelection: Sets the selection bounds of a textarea or input and focuses + * the input. + * -@input Set selection bounds of this input or textarea + * -@offsets Object of same form that is returned from get* + */ + + function setSelection(input, offsets) { + var start = offsets.start, + end = offsets.end; + + if (end === undefined) { + end = start; + } + + if ('selectionStart' in input) { + input.selectionStart = start; + input.selectionEnd = Math.min(end, input.value.length); + } else { + setOffsets(input, offsets); + } + } + + var validateDOMNesting = function () {}; + + var updatedAncestorInfo = function () {}; + + { + // This validation code was written based on the HTML5 parsing spec: + // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope + // + // Note: this does not catch all invalid nesting, nor does it try to (as it's + // not clear what practical benefit doing so provides); instead, we warn only + // for cases where the parser will give a parse tree differing from what React + // intended. For example, <b><div></div></b> is invalid but we don't warn + // because it still parses correctly; we do warn for other cases like nested + // <p> tags where the beginning of the second element implicitly closes the + // first, causing a confusing mess. + // https://html.spec.whatwg.org/multipage/syntax.html#special + var specialTags = [ + 'address', + 'applet', + 'area', + 'article', + 'aside', + 'base', + 'basefont', + 'bgsound', + 'blockquote', + 'body', + 'br', + 'button', + 'caption', + 'center', + 'col', + 'colgroup', + 'dd', + 'details', + 'dir', + 'div', + 'dl', + 'dt', + 'embed', + 'fieldset', + 'figcaption', + 'figure', + 'footer', + 'form', + 'frame', + 'frameset', + 'h1', + 'h2', + 'h3', + 'h4', + 'h5', + 'h6', + 'head', + 'header', + 'hgroup', + 'hr', + 'html', + 'iframe', + 'img', + 'input', + 'isindex', + 'li', + 'link', + 'listing', + 'main', + 'marquee', + 'menu', + 'menuitem', + 'meta', + 'nav', + 'noembed', + 'noframes', + 'noscript', + 'object', + 'ol', + 'p', + 'param', + 'plaintext', + 'pre', + 'script', + 'section', + 'select', + 'source', + 'style', + 'summary', + 'table', + 'tbody', + 'td', + 'template', + 'textarea', + 'tfoot', + 'th', + 'thead', + 'title', + 'tr', + 'track', + 'ul', + 'wbr', + 'xmp', + ]; // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope + + var inScopeTags = [ + 'applet', + 'caption', + 'html', + 'table', + 'td', + 'th', + 'marquee', + 'object', + 'template', // https://html.spec.whatwg.org/multipage/syntax.html#html-integration-point + // TODO: Distinguish by namespace here -- for <title>, including it here + // errs on the side of fewer warnings + 'foreignObject', + 'desc', + 'title', + ]; // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-button-scope + + var buttonScopeTags = inScopeTags.concat(['button']); // https://html.spec.whatwg.org/multipage/syntax.html#generate-implied-end-tags + + var impliedEndTags = ['dd', 'dt', 'li', 'option', 'optgroup', 'p', 'rp', 'rt']; + var emptyAncestorInfo = { + current: null, + formTag: null, + aTagInScope: null, + buttonTagInScope: null, + nobrTagInScope: null, + pTagInButtonScope: null, + listItemTagAutoclosing: null, + dlItemTagAutoclosing: null, + }; + + updatedAncestorInfo = function (oldInfo, tag) { + var ancestorInfo = _assign({}, oldInfo || emptyAncestorInfo); + + var info = { + tag: tag, + }; + + if (inScopeTags.indexOf(tag) !== -1) { + ancestorInfo.aTagInScope = null; + ancestorInfo.buttonTagInScope = null; + ancestorInfo.nobrTagInScope = null; + } + + if (buttonScopeTags.indexOf(tag) !== -1) { + ancestorInfo.pTagInButtonScope = null; + } // See rules for 'li', 'dd', 'dt' start tags in + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody + + if (specialTags.indexOf(tag) !== -1 && tag !== 'address' && tag !== 'div' && tag !== 'p') { + ancestorInfo.listItemTagAutoclosing = null; + ancestorInfo.dlItemTagAutoclosing = null; + } + + ancestorInfo.current = info; + + if (tag === 'form') { + ancestorInfo.formTag = info; + } + + if (tag === 'a') { + ancestorInfo.aTagInScope = info; + } + + if (tag === 'button') { + ancestorInfo.buttonTagInScope = info; + } + + if (tag === 'nobr') { + ancestorInfo.nobrTagInScope = info; + } + + if (tag === 'p') { + ancestorInfo.pTagInButtonScope = info; + } + + if (tag === 'li') { + ancestorInfo.listItemTagAutoclosing = info; + } + + if (tag === 'dd' || tag === 'dt') { + ancestorInfo.dlItemTagAutoclosing = info; + } + + return ancestorInfo; + }; + /** + * Returns whether + */ + + var isTagValidWithParent = function (tag, parentTag) { + // First, let's check if we're in an unusual parsing mode... + switch (parentTag) { + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inselect + case 'select': + return tag === 'option' || tag === 'optgroup' || tag === '#text'; + + case 'optgroup': + return tag === 'option' || tag === '#text'; + // Strictly speaking, seeing an <option> doesn't mean we're in a <select> + // but + + case 'option': + return tag === '#text'; + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intd + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incaption + // No special behavior since these rules fall back to "in body" mode for + // all except special table nodes which cause bad parsing behavior anyway. + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intr + + case 'tr': + return ( + tag === 'th' || tag === 'td' || tag === 'style' || tag === 'script' || tag === 'template' + ); + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intbody + + case 'tbody': + case 'thead': + case 'tfoot': + return tag === 'tr' || tag === 'style' || tag === 'script' || tag === 'template'; + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incolgroup + + case 'colgroup': + return tag === 'col' || tag === 'template'; + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intable + + case 'table': + return ( + tag === 'caption' || + tag === 'colgroup' || + tag === 'tbody' || + tag === 'tfoot' || + tag === 'thead' || + tag === 'style' || + tag === 'script' || + tag === 'template' + ); + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inhead + + case 'head': + return ( + tag === 'base' || + tag === 'basefont' || + tag === 'bgsound' || + tag === 'link' || + tag === 'meta' || + tag === 'title' || + tag === 'noscript' || + tag === 'noframes' || + tag === 'style' || + tag === 'script' || + tag === 'template' + ); + // https://html.spec.whatwg.org/multipage/semantics.html#the-html-element + + case 'html': + return tag === 'head' || tag === 'body' || tag === 'frameset'; + + case 'frameset': + return tag === 'frame'; + + case '#document': + return tag === 'html'; + } // Probably in the "in body" parsing mode, so we outlaw only tag combos + // where the parsing rules cause implicit opens or closes to be added. + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody + + switch (tag) { + case 'h1': + case 'h2': + case 'h3': + case 'h4': + case 'h5': + case 'h6': + return ( + parentTag !== 'h1' && + parentTag !== 'h2' && + parentTag !== 'h3' && + parentTag !== 'h4' && + parentTag !== 'h5' && + parentTag !== 'h6' + ); + + case 'rp': + case 'rt': + return impliedEndTags.indexOf(parentTag) === -1; + + case 'body': + case 'caption': + case 'col': + case 'colgroup': + case 'frameset': + case 'frame': + case 'head': + case 'html': + case 'tbody': + case 'td': + case 'tfoot': + case 'th': + case 'thead': + case 'tr': + // These tags are only valid with a few parents that have special child + // parsing rules -- if we're down here, then none of those matched and + // so we allow it only if we don't know what the parent is, as all other + // cases are invalid. + return parentTag == null; + } + + return true; + }; + /** + * Returns whether + */ + + var findInvalidAncestorForTag = function (tag, ancestorInfo) { + switch (tag) { + case 'address': + case 'article': + case 'aside': + case 'blockquote': + case 'center': + case 'details': + case 'dialog': + case 'dir': + case 'div': + case 'dl': + case 'fieldset': + case 'figcaption': + case 'figure': + case 'footer': + case 'header': + case 'hgroup': + case 'main': + case 'menu': + case 'nav': + case 'ol': + case 'p': + case 'section': + case 'summary': + case 'ul': + case 'pre': + case 'listing': + case 'table': + case 'hr': + case 'xmp': + case 'h1': + case 'h2': + case 'h3': + case 'h4': + case 'h5': + case 'h6': + return ancestorInfo.pTagInButtonScope; + + case 'form': + return ancestorInfo.formTag || ancestorInfo.pTagInButtonScope; + + case 'li': + return ancestorInfo.listItemTagAutoclosing; + + case 'dd': + case 'dt': + return ancestorInfo.dlItemTagAutoclosing; + + case 'button': + return ancestorInfo.buttonTagInScope; + + case 'a': + // Spec says something about storing a list of markers, but it sounds + // equivalent to this check. + return ancestorInfo.aTagInScope; + + case 'nobr': + return ancestorInfo.nobrTagInScope; + } + + return null; + }; + + var didWarn$1 = {}; + + validateDOMNesting = function (childTag, childText, ancestorInfo) { + ancestorInfo = ancestorInfo || emptyAncestorInfo; + var parentInfo = ancestorInfo.current; + var parentTag = parentInfo && parentInfo.tag; + + if (childText != null) { + !(childTag == null) + ? warningWithoutStack$1( + false, + 'validateDOMNesting: when childText is passed, childTag should be null', + ) + : void 0; + childTag = '#text'; + } + + var invalidParent = isTagValidWithParent(childTag, parentTag) ? null : parentInfo; + var invalidAncestor = invalidParent ? null : findInvalidAncestorForTag(childTag, ancestorInfo); + var invalidParentOrAncestor = invalidParent || invalidAncestor; + + if (!invalidParentOrAncestor) { + return; + } + + var ancestorTag = invalidParentOrAncestor.tag; + var addendum = getCurrentFiberStackInDev(); + var warnKey = !!invalidParent + '|' + childTag + '|' + ancestorTag + '|' + addendum; + + if (didWarn$1[warnKey]) { + return; + } + + didWarn$1[warnKey] = true; + var tagDisplayName = childTag; + var whitespaceInfo = ''; + + if (childTag === '#text') { + if (/\S/.test(childText)) { + tagDisplayName = 'Text nodes'; + } else { + tagDisplayName = 'Whitespace text nodes'; + whitespaceInfo = + " Make sure you don't have any extra whitespace between tags on " + + 'each line of your source code.'; + } + } else { + tagDisplayName = '<' + childTag + '>'; + } + + if (invalidParent) { + var info = ''; + + if (ancestorTag === 'table' && childTag === 'tr') { + info += + ' Add a <tbody>, <thead> or <tfoot> to your code to match the DOM tree generated by ' + + 'the browser.'; + } + + warningWithoutStack$1( + false, + 'validateDOMNesting(...): %s cannot appear as a child of <%s>.%s%s%s', + tagDisplayName, + ancestorTag, + whitespaceInfo, + info, + addendum, + ); + } else { + warningWithoutStack$1( + false, + 'validateDOMNesting(...): %s cannot appear as a descendant of ' + '<%s>.%s', + tagDisplayName, + ancestorTag, + addendum, + ); + } + }; + } + + // can re-export everything from this module. + + function shim() { + { + { + throw Error( + 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + } // Persistence (when unsupported) + + var supportsPersistence = false; + var cloneInstance = shim; + var cloneFundamentalInstance = shim; + var createContainerChildSet = shim; + var appendChildToContainerChildSet = shim; + var finalizeContainerChildren = shim; + var replaceContainerChildren = shim; + var cloneHiddenInstance = shim; + var cloneHiddenTextInstance = shim; + + var SUPPRESS_HYDRATION_WARNING; + + { + SUPPRESS_HYDRATION_WARNING = 'suppressHydrationWarning'; + } + + var SUSPENSE_START_DATA = '$'; + var SUSPENSE_END_DATA = '/$'; + var SUSPENSE_PENDING_START_DATA = '$?'; + var SUSPENSE_FALLBACK_START_DATA = '$!'; + var STYLE = 'style'; + var eventsEnabled = null; + var selectionInformation = null; + + function shouldAutoFocusHostComponent(type, props) { + switch (type) { + case 'button': + case 'input': + case 'select': + case 'textarea': + return !!props.autoFocus; + } + + return false; + } + + function getRootHostContext(rootContainerInstance) { + var type; + var namespace; + var nodeType = rootContainerInstance.nodeType; + + switch (nodeType) { + case DOCUMENT_NODE: + case DOCUMENT_FRAGMENT_NODE: { + type = nodeType === DOCUMENT_NODE ? '#document' : '#fragment'; + var root = rootContainerInstance.documentElement; + namespace = root ? root.namespaceURI : getChildNamespace(null, ''); + break; + } + + default: { + var container = + nodeType === COMMENT_NODE ? rootContainerInstance.parentNode : rootContainerInstance; + var ownNamespace = container.namespaceURI || null; + type = container.tagName; + namespace = getChildNamespace(ownNamespace, type); + break; + } + } + + { + var validatedTag = type.toLowerCase(); + var ancestorInfo = updatedAncestorInfo(null, validatedTag); + return { + namespace: namespace, + ancestorInfo: ancestorInfo, + }; + } + + return namespace; + } + function getChildHostContext(parentHostContext, type, rootContainerInstance) { + { + var parentHostContextDev = parentHostContext; + var namespace = getChildNamespace(parentHostContextDev.namespace, type); + var ancestorInfo = updatedAncestorInfo(parentHostContextDev.ancestorInfo, type); + return { + namespace: namespace, + ancestorInfo: ancestorInfo, + }; + } + + var parentNamespace = parentHostContext; + return getChildNamespace(parentNamespace, type); + } + function getPublicInstance(instance) { + return instance; + } + function prepareForCommit(containerInfo) { + eventsEnabled = isEnabled(); + selectionInformation = getSelectionInformation(); + setEnabled(false); + } + function resetAfterCommit(containerInfo) { + restoreSelection(selectionInformation); + selectionInformation = null; + setEnabled(eventsEnabled); + eventsEnabled = null; + } + function createInstance(type, props, rootContainerInstance, hostContext, internalInstanceHandle) { + var parentNamespace; + + { + // TODO: take namespace into account when validating. + var hostContextDev = hostContext; + validateDOMNesting(type, null, hostContextDev.ancestorInfo); + + if (typeof props.children === 'string' || typeof props.children === 'number') { + var string = '' + props.children; + var ownAncestorInfo = updatedAncestorInfo(hostContextDev.ancestorInfo, type); + validateDOMNesting(null, string, ownAncestorInfo); + } + + parentNamespace = hostContextDev.namespace; + } + + var domElement = createElement(type, props, rootContainerInstance, parentNamespace); + precacheFiberNode(internalInstanceHandle, domElement); + updateFiberProps(domElement, props); + return domElement; + } + function appendInitialChild(parentInstance, child) { + parentInstance.appendChild(child); + } + function finalizeInitialChildren(domElement, type, props, rootContainerInstance, hostContext) { + setInitialProperties(domElement, type, props, rootContainerInstance); + return shouldAutoFocusHostComponent(type, props); + } + function prepareUpdate(domElement, type, oldProps, newProps, rootContainerInstance, hostContext) { + { + var hostContextDev = hostContext; + + if ( + typeof newProps.children !== typeof oldProps.children && + (typeof newProps.children === 'string' || typeof newProps.children === 'number') + ) { + var string = '' + newProps.children; + var ownAncestorInfo = updatedAncestorInfo(hostContextDev.ancestorInfo, type); + validateDOMNesting(null, string, ownAncestorInfo); + } + } + + return diffProperties(domElement, type, oldProps, newProps, rootContainerInstance); + } + function shouldSetTextContent(type, props) { + return ( + type === 'textarea' || + type === 'option' || + type === 'noscript' || + typeof props.children === 'string' || + typeof props.children === 'number' || + (typeof props.dangerouslySetInnerHTML === 'object' && + props.dangerouslySetInnerHTML !== null && + props.dangerouslySetInnerHTML.__html != null) + ); + } + function shouldDeprioritizeSubtree(type, props) { + return !!props.hidden; + } + function createTextInstance(text, rootContainerInstance, hostContext, internalInstanceHandle) { + { + var hostContextDev = hostContext; + validateDOMNesting(null, text, hostContextDev.ancestorInfo); + } + + var textNode = createTextNode(text, rootContainerInstance); + precacheFiberNode(internalInstanceHandle, textNode); + return textNode; + } + var isPrimaryRenderer = true; + var warnsIfNotActing = true; // This initialization code may run even on server environments + // if a component just imports ReactDOM (e.g. for findDOMNode). + // Some environments might not have setTimeout or clearTimeout. + + var scheduleTimeout = typeof setTimeout === 'function' ? setTimeout : undefined; + var cancelTimeout = typeof clearTimeout === 'function' ? clearTimeout : undefined; + var noTimeout = -1; // ------------------- + // Mutation + // ------------------- + + var supportsMutation = true; + function commitMount(domElement, type, newProps, internalInstanceHandle) { + // Despite the naming that might imply otherwise, this method only + // fires if there is an `Update` effect scheduled during mounting. + // This happens if `finalizeInitialChildren` returns `true` (which it + // does to implement the `autoFocus` attribute on the client). But + // there are also other cases when this might happen (such as patching + // up text content during hydration mismatch). So we'll check this again. + if (shouldAutoFocusHostComponent(type, newProps)) { + domElement.focus(); + } + } + function commitUpdate(domElement, updatePayload, type, oldProps, newProps, internalInstanceHandle) { + // Update the props handle so that we know which props are the ones with + // with current event handlers. + updateFiberProps(domElement, newProps); // Apply the diff to the DOM node. + + updateProperties(domElement, updatePayload, type, oldProps, newProps); + } + function resetTextContent(domElement) { + setTextContent(domElement, ''); + } + function commitTextUpdate(textInstance, oldText, newText) { + textInstance.nodeValue = newText; + } + function appendChild(parentInstance, child) { + parentInstance.appendChild(child); + } + function appendChildToContainer(container, child) { + var parentNode; + + if (container.nodeType === COMMENT_NODE) { + parentNode = container.parentNode; + parentNode.insertBefore(child, container); + } else { + parentNode = container; + parentNode.appendChild(child); + } // This container might be used for a portal. + // If something inside a portal is clicked, that click should bubble + // through the React tree. However, on Mobile Safari the click would + // never bubble through the *DOM* tree unless an ancestor with onclick + // event exists. So we wouldn't see it and dispatch it. + // This is why we ensure that non React root containers have inline onclick + // defined. + // https://github.com/facebook/react/issues/11918 + + var reactRootContainer = container._reactRootContainer; + + if ( + (reactRootContainer === null || reactRootContainer === undefined) && + parentNode.onclick === null + ) { + // TODO: This cast may not be sound for SVG, MathML or custom elements. + trapClickOnNonInteractiveElement(parentNode); + } + } + function insertBefore(parentInstance, child, beforeChild) { + parentInstance.insertBefore(child, beforeChild); + } + function insertInContainerBefore(container, child, beforeChild) { + if (container.nodeType === COMMENT_NODE) { + container.parentNode.insertBefore(child, beforeChild); + } else { + container.insertBefore(child, beforeChild); + } + } // This is a specific event for the React Flare + // event system, so event responders can act + // accordingly to a DOM node being unmounted that + // previously had active document focus. + + function dispatchDetachedVisibleNodeEvent(child) { + if (enableFlareAPI && selectionInformation && child === selectionInformation.focusedElem) { + var targetFiber = getClosestInstanceFromNode(child); // Simlulate a blur event to the React Flare responder system. + + dispatchEventForResponderEventSystem( + 'detachedvisiblenode', + targetFiber, + { + target: child, + timeStamp: Date.now(), + }, + child, + RESPONDER_EVENT_SYSTEM | IS_PASSIVE, + ); + } + } + + function removeChild(parentInstance, child) { + dispatchDetachedVisibleNodeEvent(child); + parentInstance.removeChild(child); + } + function removeChildFromContainer(container, child) { + if (container.nodeType === COMMENT_NODE) { + container.parentNode.removeChild(child); + } else { + dispatchDetachedVisibleNodeEvent(child); + container.removeChild(child); + } + } + function clearSuspenseBoundary(parentInstance, suspenseInstance) { + var node = suspenseInstance; // Delete all nodes within this suspense boundary. + // There might be nested nodes so we need to keep track of how + // deep we are and only break out when we're back on top. + + var depth = 0; + + do { + var nextNode = node.nextSibling; + parentInstance.removeChild(node); + + if (nextNode && nextNode.nodeType === COMMENT_NODE) { + var data = nextNode.data; + + if (data === SUSPENSE_END_DATA) { + if (depth === 0) { + parentInstance.removeChild(nextNode); // Retry if any event replaying was blocked on this. + + retryIfBlockedOn(suspenseInstance); + return; + } else { + depth--; + } + } else if ( + data === SUSPENSE_START_DATA || + data === SUSPENSE_PENDING_START_DATA || + data === SUSPENSE_FALLBACK_START_DATA + ) { + depth++; + } + } + + node = nextNode; + } while (node); // TODO: Warn, we didn't find the end comment boundary. + // Retry if any event replaying was blocked on this. + + retryIfBlockedOn(suspenseInstance); + } + function clearSuspenseBoundaryFromContainer(container, suspenseInstance) { + if (container.nodeType === COMMENT_NODE) { + clearSuspenseBoundary(container.parentNode, suspenseInstance); + } else if (container.nodeType === ELEMENT_NODE) { + clearSuspenseBoundary(container, suspenseInstance); + } else { + } // Document nodes should never contain suspense boundaries. + // Retry if any event replaying was blocked on this. + + retryIfBlockedOn(container); + } + function hideInstance(instance) { + // TODO: Does this work for all element types? What about MathML? Should we + // pass host context to this method? + instance = instance; + var style = instance.style; + + if (typeof style.setProperty === 'function') { + style.setProperty('display', 'none', 'important'); + } else { + style.display = 'none'; + } + } + function hideTextInstance(textInstance) { + textInstance.nodeValue = ''; + } + function unhideInstance(instance, props) { + instance = instance; + var styleProp = props[STYLE]; + var display = + styleProp !== undefined && styleProp !== null && styleProp.hasOwnProperty('display') + ? styleProp.display + : null; + instance.style.display = dangerousStyleValue('display', display); + } + function unhideTextInstance(textInstance, text) { + textInstance.nodeValue = text; + } // ------------------- + // Hydration + // ------------------- + + var supportsHydration = true; + function canHydrateInstance(instance, type, props) { + if ( + instance.nodeType !== ELEMENT_NODE || + type.toLowerCase() !== instance.nodeName.toLowerCase() + ) { + return null; + } // This has now been refined to an element node. + + return instance; + } + function canHydrateTextInstance(instance, text) { + if (text === '' || instance.nodeType !== TEXT_NODE) { + // Empty strings are not parsed by HTML so there won't be a correct match here. + return null; + } // This has now been refined to a text node. + + return instance; + } + function canHydrateSuspenseInstance(instance) { + if (instance.nodeType !== COMMENT_NODE) { + // Empty strings are not parsed by HTML so there won't be a correct match here. + return null; + } // This has now been refined to a suspense node. + + return instance; + } + function isSuspenseInstancePending(instance) { + return instance.data === SUSPENSE_PENDING_START_DATA; + } + function isSuspenseInstanceFallback(instance) { + return instance.data === SUSPENSE_FALLBACK_START_DATA; + } + function registerSuspenseInstanceRetry(instance, callback) { + instance._reactRetry = callback; + } + + function getNextHydratable(node) { + // Skip non-hydratable nodes. + for (; node != null; node = node.nextSibling) { + var nodeType = node.nodeType; + + if (nodeType === ELEMENT_NODE || nodeType === TEXT_NODE) { + break; + } + + if (enableSuspenseServerRenderer) { + if (nodeType === COMMENT_NODE) { + var nodeData = node.data; + + if ( + nodeData === SUSPENSE_START_DATA || + nodeData === SUSPENSE_FALLBACK_START_DATA || + nodeData === SUSPENSE_PENDING_START_DATA + ) { + break; + } + } + } + } + + return node; + } + + function getNextHydratableSibling(instance) { + return getNextHydratable(instance.nextSibling); + } + function getFirstHydratableChild(parentInstance) { + return getNextHydratable(parentInstance.firstChild); + } + function hydrateInstance( + instance, + type, + props, + rootContainerInstance, + hostContext, + internalInstanceHandle, + ) { + precacheFiberNode(internalInstanceHandle, instance); // TODO: Possibly defer this until the commit phase where all the events + // get attached. + + updateFiberProps(instance, props); + var parentNamespace; + + { + var hostContextDev = hostContext; + parentNamespace = hostContextDev.namespace; + } + + return diffHydratedProperties(instance, type, props, parentNamespace, rootContainerInstance); + } + function hydrateTextInstance(textInstance, text, internalInstanceHandle) { + precacheFiberNode(internalInstanceHandle, textInstance); + return diffHydratedText(textInstance, text); + } + function hydrateSuspenseInstance(suspenseInstance, internalInstanceHandle) { + precacheFiberNode(internalInstanceHandle, suspenseInstance); + } + function getNextHydratableInstanceAfterSuspenseInstance(suspenseInstance) { + var node = suspenseInstance.nextSibling; // Skip past all nodes within this suspense boundary. + // There might be nested nodes so we need to keep track of how + // deep we are and only break out when we're back on top. + + var depth = 0; + + while (node) { + if (node.nodeType === COMMENT_NODE) { + var data = node.data; + + if (data === SUSPENSE_END_DATA) { + if (depth === 0) { + return getNextHydratableSibling(node); + } else { + depth--; + } + } else if ( + data === SUSPENSE_START_DATA || + data === SUSPENSE_FALLBACK_START_DATA || + data === SUSPENSE_PENDING_START_DATA + ) { + depth++; + } + } + + node = node.nextSibling; + } // TODO: Warn, we didn't find the end comment boundary. + + return null; + } // Returns the SuspenseInstance if this node is a direct child of a + // SuspenseInstance. I.e. if its previous sibling is a Comment with + // SUSPENSE_x_START_DATA. Otherwise, null. + + function getParentSuspenseInstance(targetInstance) { + var node = targetInstance.previousSibling; // Skip past all nodes within this suspense boundary. + // There might be nested nodes so we need to keep track of how + // deep we are and only break out when we're back on top. + + var depth = 0; + + while (node) { + if (node.nodeType === COMMENT_NODE) { + var data = node.data; + + if ( + data === SUSPENSE_START_DATA || + data === SUSPENSE_FALLBACK_START_DATA || + data === SUSPENSE_PENDING_START_DATA + ) { + if (depth === 0) { + return node; + } else { + depth--; + } + } else if (data === SUSPENSE_END_DATA) { + depth++; + } + } + + node = node.previousSibling; + } + + return null; + } + function commitHydratedContainer(container) { + // Retry if any event replaying was blocked on this. + retryIfBlockedOn(container); + } + function commitHydratedSuspenseInstance(suspenseInstance) { + // Retry if any event replaying was blocked on this. + retryIfBlockedOn(suspenseInstance); + } + function didNotMatchHydratedContainerTextInstance(parentContainer, textInstance, text) { + { + warnForUnmatchedText(textInstance, text); + } + } + function didNotMatchHydratedTextInstance( + parentType, + parentProps, + parentInstance, + textInstance, + text, + ) { + if (true && parentProps[SUPPRESS_HYDRATION_WARNING] !== true) { + warnForUnmatchedText(textInstance, text); + } + } + function didNotHydrateContainerInstance(parentContainer, instance) { + { + if (instance.nodeType === ELEMENT_NODE) { + warnForDeletedHydratableElement(parentContainer, instance); + } else if (instance.nodeType === COMMENT_NODE) { + // TODO: warnForDeletedHydratableSuspenseBoundary + } else { + warnForDeletedHydratableText(parentContainer, instance); + } + } + } + function didNotHydrateInstance(parentType, parentProps, parentInstance, instance) { + if (true && parentProps[SUPPRESS_HYDRATION_WARNING] !== true) { + if (instance.nodeType === ELEMENT_NODE) { + warnForDeletedHydratableElement(parentInstance, instance); + } else if (instance.nodeType === COMMENT_NODE) { + // TODO: warnForDeletedHydratableSuspenseBoundary + } else { + warnForDeletedHydratableText(parentInstance, instance); + } + } + } + function didNotFindHydratableContainerInstance(parentContainer, type, props) { + { + warnForInsertedHydratedElement(parentContainer, type, props); + } + } + function didNotFindHydratableContainerTextInstance(parentContainer, text) { + { + warnForInsertedHydratedText(parentContainer, text); + } + } + + function didNotFindHydratableInstance(parentType, parentProps, parentInstance, type, props) { + if (true && parentProps[SUPPRESS_HYDRATION_WARNING] !== true) { + warnForInsertedHydratedElement(parentInstance, type, props); + } + } + function didNotFindHydratableTextInstance(parentType, parentProps, parentInstance, text) { + if (true && parentProps[SUPPRESS_HYDRATION_WARNING] !== true) { + warnForInsertedHydratedText(parentInstance, text); + } + } + function didNotFindHydratableSuspenseInstance(parentType, parentProps, parentInstance) { + if (true && parentProps[SUPPRESS_HYDRATION_WARNING] !== true) { + // TODO: warnForInsertedHydratedSuspense(parentInstance); + } + } + function mountResponderInstance( + responder, + responderInstance, + responderProps, + responderState, + instance, + ) { + // Listen to events + var doc = instance.ownerDocument; + var _ref = responder, + rootEventTypes = _ref.rootEventTypes, + targetEventTypes = _ref.targetEventTypes; + + if (targetEventTypes !== null) { + listenToEventResponderEventTypes(targetEventTypes, doc); + } + + if (rootEventTypes !== null) { + addRootEventTypesForResponderInstance(responderInstance, rootEventTypes); + listenToEventResponderEventTypes(rootEventTypes, doc); + } + + mountEventResponder(responder, responderInstance, responderProps, responderState); + return responderInstance; + } + function unmountResponderInstance(responderInstance) { + if (enableFlareAPI) { + // TODO stop listening to targetEventTypes + unmountEventResponder(responderInstance); + } + } + function getFundamentalComponentInstance(fundamentalInstance) { + if (enableFundamentalAPI) { + var currentFiber = fundamentalInstance.currentFiber, + impl = fundamentalInstance.impl, + props = fundamentalInstance.props, + state = fundamentalInstance.state; + var instance = impl.getInstance(null, props, state); + precacheFiberNode(currentFiber, instance); + return instance; + } // Because of the flag above, this gets around the Flow error; + + return null; + } + function mountFundamentalComponent(fundamentalInstance) { + if (enableFundamentalAPI) { + var impl = fundamentalInstance.impl, + instance = fundamentalInstance.instance, + props = fundamentalInstance.props, + state = fundamentalInstance.state; + var onMount = impl.onMount; + + if (onMount !== undefined) { + onMount(null, instance, props, state); + } + } + } + function shouldUpdateFundamentalComponent(fundamentalInstance) { + if (enableFundamentalAPI) { + var impl = fundamentalInstance.impl, + prevProps = fundamentalInstance.prevProps, + props = fundamentalInstance.props, + state = fundamentalInstance.state; + var shouldUpdate = impl.shouldUpdate; + + if (shouldUpdate !== undefined) { + return shouldUpdate(null, prevProps, props, state); + } + } + + return true; + } + function updateFundamentalComponent(fundamentalInstance) { + if (enableFundamentalAPI) { + var impl = fundamentalInstance.impl, + instance = fundamentalInstance.instance, + prevProps = fundamentalInstance.prevProps, + props = fundamentalInstance.props, + state = fundamentalInstance.state; + var onUpdate = impl.onUpdate; + + if (onUpdate !== undefined) { + onUpdate(null, instance, prevProps, props, state); + } + } + } + function unmountFundamentalComponent(fundamentalInstance) { + if (enableFundamentalAPI) { + var impl = fundamentalInstance.impl, + instance = fundamentalInstance.instance, + props = fundamentalInstance.props, + state = fundamentalInstance.state; + var onUnmount = impl.onUnmount; + + if (onUnmount !== undefined) { + onUnmount(null, instance, props, state); + } + } + } + function getInstanceFromNode$2(node) { + return getClosestInstanceFromNode(node) || null; + } + + var randomKey = Math.random().toString(36).slice(2); + var internalInstanceKey = '__reactInternalInstance$' + randomKey; + var internalEventHandlersKey = '__reactEventHandlers$' + randomKey; + var internalContainerInstanceKey = '__reactContainere$' + randomKey; + function precacheFiberNode(hostInst, node) { + node[internalInstanceKey] = hostInst; + } + function markContainerAsRoot(hostRoot, node) { + node[internalContainerInstanceKey] = hostRoot; + } + function unmarkContainerAsRoot(node) { + node[internalContainerInstanceKey] = null; + } + function isContainerMarkedAsRoot(node) { + return !!node[internalContainerInstanceKey]; + } // Given a DOM node, return the closest HostComponent or HostText fiber ancestor. + // If the target node is part of a hydrated or not yet rendered subtree, then + // this may also return a SuspenseComponent or HostRoot to indicate that. + // Conceptually the HostRoot fiber is a child of the Container node. So if you + // pass the Container node as the targetNode, you will not actually get the + // HostRoot back. To get to the HostRoot, you need to pass a child of it. + // The same thing applies to Suspense boundaries. + + function getClosestInstanceFromNode(targetNode) { + var targetInst = targetNode[internalInstanceKey]; + + if (targetInst) { + // Don't return HostRoot or SuspenseComponent here. + return targetInst; + } // If the direct event target isn't a React owned DOM node, we need to look + // to see if one of its parents is a React owned DOM node. + + var parentNode = targetNode.parentNode; + + while (parentNode) { + // We'll check if this is a container root that could include + // React nodes in the future. We need to check this first because + // if we're a child of a dehydrated container, we need to first + // find that inner container before moving on to finding the parent + // instance. Note that we don't check this field on the targetNode + // itself because the fibers are conceptually between the container + // node and the first child. It isn't surrounding the container node. + // If it's not a container, we check if it's an instance. + targetInst = parentNode[internalContainerInstanceKey] || parentNode[internalInstanceKey]; + + if (targetInst) { + // Since this wasn't the direct target of the event, we might have + // stepped past dehydrated DOM nodes to get here. However they could + // also have been non-React nodes. We need to answer which one. + // If we the instance doesn't have any children, then there can't be + // a nested suspense boundary within it. So we can use this as a fast + // bailout. Most of the time, when people add non-React children to + // the tree, it is using a ref to a child-less DOM node. + // Normally we'd only need to check one of the fibers because if it + // has ever gone from having children to deleting them or vice versa + // it would have deleted the dehydrated boundary nested inside already. + // However, since the HostRoot starts out with an alternate it might + // have one on the alternate so we need to check in case this was a + // root. + var alternate = targetInst.alternate; + + if (targetInst.child !== null || (alternate !== null && alternate.child !== null)) { + // Next we need to figure out if the node that skipped past is + // nested within a dehydrated boundary and if so, which one. + var suspenseInstance = getParentSuspenseInstance(targetNode); + + while (suspenseInstance !== null) { + // We found a suspense instance. That means that we haven't + // hydrated it yet. Even though we leave the comments in the + // DOM after hydrating, and there are boundaries in the DOM + // that could already be hydrated, we wouldn't have found them + // through this pass since if the target is hydrated it would + // have had an internalInstanceKey on it. + // Let's get the fiber associated with the SuspenseComponent + // as the deepest instance. + var targetSuspenseInst = suspenseInstance[internalInstanceKey]; + + if (targetSuspenseInst) { + return targetSuspenseInst; + } // If we don't find a Fiber on the comment, it might be because + // we haven't gotten to hydrate it yet. There might still be a + // parent boundary that hasn't above this one so we need to find + // the outer most that is known. + + suspenseInstance = getParentSuspenseInstance(suspenseInstance); // If we don't find one, then that should mean that the parent + // host component also hasn't hydrated yet. We can return it + // below since it will bail out on the isMounted check later. + } + } + + return targetInst; + } + + targetNode = parentNode; + parentNode = targetNode.parentNode; + } + + return null; + } + /** + * Given a DOM node, return the ReactDOMComponent or ReactDOMTextComponent + * instance, or null if the node was not rendered by this React. + */ + + function getInstanceFromNode$1(node) { + var inst = node[internalInstanceKey] || node[internalContainerInstanceKey]; + + if (inst) { + if ( + inst.tag === HostComponent || + inst.tag === HostText || + inst.tag === SuspenseComponent || + inst.tag === HostRoot + ) { + return inst; + } else { + return null; + } + } + + return null; + } + /** + * Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding + * DOM node. + */ + + function getNodeFromInstance$1(inst) { + if (inst.tag === HostComponent || inst.tag === HostText) { + // In Fiber this, is just the state node right now. We assume it will be + // a host component or host text. + return inst.stateNode; + } // Without this first invariant, passing a non-DOM-component triggers the next + // invariant for a missing parent, which is super confusing. + + { + { + throw Error('getNodeFromInstance: Invalid argument.'); + } + } + } + function getFiberCurrentPropsFromNode$1(node) { + return node[internalEventHandlersKey] || null; + } + function updateFiberProps(node, props) { + node[internalEventHandlersKey] = props; + } + + /** + * These variables store information about text content of a target node, + * allowing comparison of content before and after a given event. + * + * Identify the node where selection currently begins, then observe + * both its text content and its current position in the DOM. Since the + * browser may natively replace the target node during composition, we can + * use its position to find its replacement. + * + * + */ + var root = null; + var startText = null; + var fallbackText = null; + function initialize(nativeEventTarget) { + root = nativeEventTarget; + startText = getText(); + return true; + } + function reset() { + root = null; + startText = null; + fallbackText = null; + } + function getData() { + if (fallbackText) { + return fallbackText; + } + + var start; + var startValue = startText; + var startLength = startValue.length; + var end; + var endValue = getText(); + var endLength = endValue.length; + + for (start = 0; start < startLength; start++) { + if (startValue[start] !== endValue[start]) { + break; + } + } + + var minEnd = startLength - start; + + for (end = 1; end <= minEnd; end++) { + if (startValue[startLength - end] !== endValue[endLength - end]) { + break; + } + } + + var sliceTail = end > 1 ? 1 - end : undefined; + fallbackText = endValue.slice(start, sliceTail); + return fallbackText; + } + function getText() { + if ('value' in root) { + return root.value; + } + + return root.textContent; + } + + /** + * @interface Event + * @see http://www.w3.org/TR/DOM-Level-3-Events/#events-compositionevents + */ + + var SyntheticCompositionEvent = SyntheticEvent.extend({ + data: null, + }); + + /** + * @interface Event + * @see http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105 + * /#events-inputevents + */ + + var SyntheticInputEvent = SyntheticEvent.extend({ + data: null, + }); + + var END_KEYCODES = [9, 13, 27, 32]; // Tab, Return, Esc, Space + + var START_KEYCODE = 229; + var canUseCompositionEvent = canUseDOM && 'CompositionEvent' in window; + var documentMode = null; + + if (canUseDOM && 'documentMode' in document) { + documentMode = document.documentMode; + } // Webkit offers a very useful `textInput` event that can be used to + // directly represent `beforeInput`. The IE `textinput` event is not as + // useful, so we don't use it. + + var canUseTextInputEvent = canUseDOM && 'TextEvent' in window && !documentMode; // In IE9+, we have access to composition events, but the data supplied + // by the native compositionend event may be incorrect. Japanese ideographic + // spaces, for instance (\u3000) are not recorded correctly. + + var useFallbackCompositionData = + canUseDOM && + (!canUseCompositionEvent || (documentMode && documentMode > 8 && documentMode <= 11)); + var SPACEBAR_CODE = 32; + var SPACEBAR_CHAR = String.fromCharCode(SPACEBAR_CODE); // Events and their corresponding property names. + + var eventTypes$1 = { + beforeInput: { + phasedRegistrationNames: { + bubbled: 'onBeforeInput', + captured: 'onBeforeInputCapture', + }, + dependencies: [TOP_COMPOSITION_END, TOP_KEY_PRESS, TOP_TEXT_INPUT, TOP_PASTE], + }, + compositionEnd: { + phasedRegistrationNames: { + bubbled: 'onCompositionEnd', + captured: 'onCompositionEndCapture', + }, + dependencies: [ + TOP_BLUR, + TOP_COMPOSITION_END, + TOP_KEY_DOWN, + TOP_KEY_PRESS, + TOP_KEY_UP, + TOP_MOUSE_DOWN, + ], + }, + compositionStart: { + phasedRegistrationNames: { + bubbled: 'onCompositionStart', + captured: 'onCompositionStartCapture', + }, + dependencies: [ + TOP_BLUR, + TOP_COMPOSITION_START, + TOP_KEY_DOWN, + TOP_KEY_PRESS, + TOP_KEY_UP, + TOP_MOUSE_DOWN, + ], + }, + compositionUpdate: { + phasedRegistrationNames: { + bubbled: 'onCompositionUpdate', + captured: 'onCompositionUpdateCapture', + }, + dependencies: [ + TOP_BLUR, + TOP_COMPOSITION_UPDATE, + TOP_KEY_DOWN, + TOP_KEY_PRESS, + TOP_KEY_UP, + TOP_MOUSE_DOWN, + ], + }, + }; // Track whether we've ever handled a keypress on the space key. + + var hasSpaceKeypress = false; + /** + * Return whether a native keypress event is assumed to be a command. + * This is required because Firefox fires `keypress` events for key commands + * (cut, copy, select-all, etc.) even though no character is inserted. + */ + + function isKeypressCommand(nativeEvent) { + return ( + (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) && // ctrlKey && altKey is equivalent to AltGr, and is not a command. + !(nativeEvent.ctrlKey && nativeEvent.altKey) + ); + } + /** + * Translate native top level events into event types. + * + * @param {string} topLevelType + * @return {object} + */ + + function getCompositionEventType(topLevelType) { + switch (topLevelType) { + case TOP_COMPOSITION_START: + return eventTypes$1.compositionStart; + + case TOP_COMPOSITION_END: + return eventTypes$1.compositionEnd; + + case TOP_COMPOSITION_UPDATE: + return eventTypes$1.compositionUpdate; + } + } + /** + * Does our fallback best-guess model think this event signifies that + * composition has begun? + * + * @param {string} topLevelType + * @param {object} nativeEvent + * @return {boolean} + */ + + function isFallbackCompositionStart(topLevelType, nativeEvent) { + return topLevelType === TOP_KEY_DOWN && nativeEvent.keyCode === START_KEYCODE; + } + /** + * Does our fallback mode think that this event is the end of composition? + * + * @param {string} topLevelType + * @param {object} nativeEvent + * @return {boolean} + */ + + function isFallbackCompositionEnd(topLevelType, nativeEvent) { + switch (topLevelType) { + case TOP_KEY_UP: + // Command keys insert or clear IME input. + return END_KEYCODES.indexOf(nativeEvent.keyCode) !== -1; + + case TOP_KEY_DOWN: + // Expect IME keyCode on each keydown. If we get any other + // code we must have exited earlier. + return nativeEvent.keyCode !== START_KEYCODE; + + case TOP_KEY_PRESS: + case TOP_MOUSE_DOWN: + case TOP_BLUR: + // Events are not possible without cancelling IME. + return true; + + default: + return false; + } + } + /** + * Google Input Tools provides composition data via a CustomEvent, + * with the `data` property populated in the `detail` object. If this + * is available on the event object, use it. If not, this is a plain + * composition event and we have nothing special to extract. + * + * @param {object} nativeEvent + * @return {?string} + */ + + function getDataFromCustomEvent(nativeEvent) { + var detail = nativeEvent.detail; + + if (typeof detail === 'object' && 'data' in detail) { + return detail.data; + } + + return null; + } + /** + * Check if a composition event was triggered by Korean IME. + * Our fallback mode does not work well with IE's Korean IME, + * so just use native composition events when Korean IME is used. + * Although CompositionEvent.locale property is deprecated, + * it is available in IE, where our fallback mode is enabled. + * + * @param {object} nativeEvent + * @return {boolean} + */ + + function isUsingKoreanIME(nativeEvent) { + return nativeEvent.locale === 'ko'; + } // Track the current IME composition status, if any. + + var isComposing = false; + /** + * @return {?object} A SyntheticCompositionEvent. + */ + + function extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) { + var eventType; + var fallbackData; + + if (canUseCompositionEvent) { + eventType = getCompositionEventType(topLevelType); + } else if (!isComposing) { + if (isFallbackCompositionStart(topLevelType, nativeEvent)) { + eventType = eventTypes$1.compositionStart; + } + } else if (isFallbackCompositionEnd(topLevelType, nativeEvent)) { + eventType = eventTypes$1.compositionEnd; + } + + if (!eventType) { + return null; + } + + if (useFallbackCompositionData && !isUsingKoreanIME(nativeEvent)) { + // The current composition is stored statically and must not be + // overwritten while composition continues. + if (!isComposing && eventType === eventTypes$1.compositionStart) { + isComposing = initialize(nativeEventTarget); + } else if (eventType === eventTypes$1.compositionEnd) { + if (isComposing) { + fallbackData = getData(); + } + } + } + + var event = SyntheticCompositionEvent.getPooled( + eventType, + targetInst, + nativeEvent, + nativeEventTarget, + ); + + if (fallbackData) { + // Inject data generated from fallback path into the synthetic event. + // This matches the property of native CompositionEventInterface. + event.data = fallbackData; + } else { + var customData = getDataFromCustomEvent(nativeEvent); + + if (customData !== null) { + event.data = customData; + } + } + + accumulateTwoPhaseDispatches(event); + return event; + } + /** + * @param {TopLevelType} topLevelType Number from `TopLevelType`. + * @param {object} nativeEvent Native browser event. + * @return {?string} The string corresponding to this `beforeInput` event. + */ + + function getNativeBeforeInputChars(topLevelType, nativeEvent) { + switch (topLevelType) { + case TOP_COMPOSITION_END: + return getDataFromCustomEvent(nativeEvent); + + case TOP_KEY_PRESS: + /** + * If native `textInput` events are available, our goal is to make + * use of them. However, there is a special case: the spacebar key. + * In Webkit, preventing default on a spacebar `textInput` event + * cancels character insertion, but it *also* causes the browser + * to fall back to its default spacebar behavior of scrolling the + * page. + * + * Tracking at: + * https://code.google.com/p/chromium/issues/detail?id=355103 + * + * To avoid this issue, use the keypress event as if no `textInput` + * event is available. + */ + var which = nativeEvent.which; + + if (which !== SPACEBAR_CODE) { + return null; + } + + hasSpaceKeypress = true; + return SPACEBAR_CHAR; + + case TOP_TEXT_INPUT: + // Record the characters to be added to the DOM. + var chars = nativeEvent.data; // If it's a spacebar character, assume that we have already handled + // it at the keypress level and bail immediately. Android Chrome + // doesn't give us keycodes, so we need to ignore it. + + if (chars === SPACEBAR_CHAR && hasSpaceKeypress) { + return null; + } + + return chars; + + default: + // For other native event types, do nothing. + return null; + } + } + /** + * For browsers that do not provide the `textInput` event, extract the + * appropriate string to use for SyntheticInputEvent. + * + * @param {number} topLevelType Number from `TopLevelEventTypes`. + * @param {object} nativeEvent Native browser event. + * @return {?string} The fallback string for this `beforeInput` event. + */ + + function getFallbackBeforeInputChars(topLevelType, nativeEvent) { + // If we are currently composing (IME) and using a fallback to do so, + // try to extract the composed characters from the fallback object. + // If composition event is available, we extract a string only at + // compositionevent, otherwise extract it at fallback events. + if (isComposing) { + if ( + topLevelType === TOP_COMPOSITION_END || + (!canUseCompositionEvent && isFallbackCompositionEnd(topLevelType, nativeEvent)) + ) { + var chars = getData(); + reset(); + isComposing = false; + return chars; + } + + return null; + } + + switch (topLevelType) { + case TOP_PASTE: + // If a paste event occurs after a keypress, throw out the input + // chars. Paste events should not lead to BeforeInput events. + return null; + + case TOP_KEY_PRESS: + /** + * As of v27, Firefox may fire keypress events even when no character + * will be inserted. A few possibilities: + * + * - `which` is `0`. Arrow keys, Esc key, etc. + * + * - `which` is the pressed key code, but no char is available. + * Ex: 'AltGr + d` in Polish. There is no modified character for + * this key combination and no character is inserted into the + * document, but FF fires the keypress for char code `100` anyway. + * No `input` event will occur. + * + * - `which` is the pressed key code, but a command combination is + * being used. Ex: `Cmd+C`. No character is inserted, and no + * `input` event will occur. + */ + if (!isKeypressCommand(nativeEvent)) { + // IE fires the `keypress` event when a user types an emoji via + // Touch keyboard of Windows. In such a case, the `char` property + // holds an emoji character like `\uD83D\uDE0A`. Because its length + // is 2, the property `which` does not represent an emoji correctly. + // In such a case, we directly return the `char` property instead of + // using `which`. + if (nativeEvent.char && nativeEvent.char.length > 1) { + return nativeEvent.char; + } else if (nativeEvent.which) { + return String.fromCharCode(nativeEvent.which); + } + } + + return null; + + case TOP_COMPOSITION_END: + return useFallbackCompositionData && !isUsingKoreanIME(nativeEvent) ? null : nativeEvent.data; + + default: + return null; + } + } + /** + * Extract a SyntheticInputEvent for `beforeInput`, based on either native + * `textInput` or fallback behavior. + * + * @return {?object} A SyntheticInputEvent. + */ + + function extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) { + var chars; + + if (canUseTextInputEvent) { + chars = getNativeBeforeInputChars(topLevelType, nativeEvent); + } else { + chars = getFallbackBeforeInputChars(topLevelType, nativeEvent); + } // If no characters are being inserted, no BeforeInput event should + // be fired. + + if (!chars) { + return null; + } + + var event = SyntheticInputEvent.getPooled( + eventTypes$1.beforeInput, + targetInst, + nativeEvent, + nativeEventTarget, + ); + event.data = chars; + accumulateTwoPhaseDispatches(event); + return event; + } + /** + * Create an `onBeforeInput` event to match + * http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105/#events-inputevents. + * + * This event plugin is based on the native `textInput` event + * available in Chrome, Safari, Opera, and IE. This event fires after + * `onKeyPress` and `onCompositionEnd`, but before `onInput`. + * + * `beforeInput` is spec'd but not implemented in any browsers, and + * the `input` event does not provide any useful information about what has + * actually been added, contrary to the spec. Thus, `textInput` is the best + * available event to identify the characters that have actually been inserted + * into the target node. + * + * This plugin is also responsible for emitting `composition` events, thus + * allowing us to share composition fallback code for both `beforeInput` and + * `composition` event types. + */ + + var BeforeInputEventPlugin = { + eventTypes: eventTypes$1, + extractEvents: function ( + topLevelType, + targetInst, + nativeEvent, + nativeEventTarget, + eventSystemFlags, + ) { + var composition = extractCompositionEvent( + topLevelType, + targetInst, + nativeEvent, + nativeEventTarget, + ); + var beforeInput = extractBeforeInputEvent( + topLevelType, + targetInst, + nativeEvent, + nativeEventTarget, + ); + + if (composition === null) { + return beforeInput; + } + + if (beforeInput === null) { + return composition; + } + + return [composition, beforeInput]; + }, + }; + + /** + * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary + */ + var supportedInputTypes = { + color: true, + date: true, + datetime: true, + 'datetime-local': true, + email: true, + month: true, + number: true, + password: true, + range: true, + search: true, + tel: true, + text: true, + time: true, + url: true, + week: true, + }; + + function isTextInputElement(elem) { + var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase(); + + if (nodeName === 'input') { + return !!supportedInputTypes[elem.type]; + } + + if (nodeName === 'textarea') { + return true; + } + + return false; + } + + var eventTypes$2 = { + change: { + phasedRegistrationNames: { + bubbled: 'onChange', + captured: 'onChangeCapture', + }, + dependencies: [ + TOP_BLUR, + TOP_CHANGE, + TOP_CLICK, + TOP_FOCUS, + TOP_INPUT, + TOP_KEY_DOWN, + TOP_KEY_UP, + TOP_SELECTION_CHANGE, + ], + }, + }; + + function createAndAccumulateChangeEvent(inst, nativeEvent, target) { + var event = SyntheticEvent.getPooled(eventTypes$2.change, inst, nativeEvent, target); + event.type = 'change'; // Flag this event loop as needing state restore. + + enqueueStateRestore(target); + accumulateTwoPhaseDispatches(event); + return event; + } + /** + * For IE shims + */ + + var activeElement = null; + var activeElementInst = null; + /** + * SECTION: handle `change` event + */ + + function shouldUseChangeEvent(elem) { + var nodeName = elem.nodeName && elem.nodeName.toLowerCase(); + return nodeName === 'select' || (nodeName === 'input' && elem.type === 'file'); + } + + function manualDispatchChangeEvent(nativeEvent) { + var event = createAndAccumulateChangeEvent( + activeElementInst, + nativeEvent, + getEventTarget(nativeEvent), + ); // If change and propertychange bubbled, we'd just bind to it like all the + // other events and have it go through ReactBrowserEventEmitter. Since it + // doesn't, we manually listen for the events and so we have to enqueue and + // process the abstract event manually. + // + // Batching is necessary here in order to ensure that all event handlers run + // before the next rerender (including event handlers attached to ancestor + // elements instead of directly on the input). Without this, controlled + // components don't work properly in conjunction with event bubbling because + // the component is rerendered and the value reverted before all the event + // handlers can run. See https://github.com/facebook/react/issues/708. + + batchedUpdates(runEventInBatch, event); + } + + function runEventInBatch(event) { + runEventsInBatch(event); + } + + function getInstIfValueChanged(targetInst) { + var targetNode = getNodeFromInstance$1(targetInst); + + if (updateValueIfChanged(targetNode)) { + return targetInst; + } + } + + function getTargetInstForChangeEvent(topLevelType, targetInst) { + if (topLevelType === TOP_CHANGE) { + return targetInst; + } + } + /** + * SECTION: handle `input` event + */ + + var isInputEventSupported = false; + + if (canUseDOM) { + // IE9 claims to support the input event but fails to trigger it when + // deleting text, so we ignore its input events. + isInputEventSupported = + isEventSupported('input') && (!document.documentMode || document.documentMode > 9); + } + /** + * (For IE <=9) Starts tracking propertychange events on the passed-in element + * and override the value property so that we can distinguish user events from + * value changes in JS. + */ + + function startWatchingForValueChange(target, targetInst) { + activeElement = target; + activeElementInst = targetInst; + activeElement.attachEvent('onpropertychange', handlePropertyChange); + } + /** + * (For IE <=9) Removes the event listeners from the currently-tracked element, + * if any exists. + */ + + function stopWatchingForValueChange() { + if (!activeElement) { + return; + } + + activeElement.detachEvent('onpropertychange', handlePropertyChange); + activeElement = null; + activeElementInst = null; + } + /** + * (For IE <=9) Handles a propertychange event, sending a `change` event if + * the value of the active element has changed. + */ + + function handlePropertyChange(nativeEvent) { + if (nativeEvent.propertyName !== 'value') { + return; + } + + if (getInstIfValueChanged(activeElementInst)) { + manualDispatchChangeEvent(nativeEvent); + } + } + + function handleEventsForInputEventPolyfill(topLevelType, target, targetInst) { + if (topLevelType === TOP_FOCUS) { + // In IE9, propertychange fires for most input events but is buggy and + // doesn't fire when text is deleted, but conveniently, selectionchange + // appears to fire in all of the remaining cases so we catch those and + // forward the event if the value has changed + // In either case, we don't want to call the event handler if the value + // is changed from JS so we redefine a setter for `.value` that updates + // our activeElementValue variable, allowing us to ignore those changes + // + // stopWatching() should be a noop here but we call it just in case we + // missed a blur event somehow. + stopWatchingForValueChange(); + startWatchingForValueChange(target, targetInst); + } else if (topLevelType === TOP_BLUR) { + stopWatchingForValueChange(); + } + } // For IE8 and IE9. + + function getTargetInstForInputEventPolyfill(topLevelType, targetInst) { + if ( + topLevelType === TOP_SELECTION_CHANGE || + topLevelType === TOP_KEY_UP || + topLevelType === TOP_KEY_DOWN + ) { + // On the selectionchange event, the target is just document which isn't + // helpful for us so just check activeElement instead. + // + // 99% of the time, keydown and keyup aren't necessary. IE8 fails to fire + // propertychange on the first input event after setting `value` from a + // script and fires only keydown, keypress, keyup. Catching keyup usually + // gets it and catching keydown lets us fire an event for the first + // keystroke if user does a key repeat (it'll be a little delayed: right + // before the second keystroke). Other input methods (e.g., paste) seem to + // fire selectionchange normally. + return getInstIfValueChanged(activeElementInst); + } + } + /** + * SECTION: handle `click` event + */ + + function shouldUseClickEvent(elem) { + // Use the `click` event to detect changes to checkbox and radio inputs. + // This approach works across all browsers, whereas `change` does not fire + // until `blur` in IE8. + var nodeName = elem.nodeName; + return ( + nodeName && + nodeName.toLowerCase() === 'input' && + (elem.type === 'checkbox' || elem.type === 'radio') + ); + } + + function getTargetInstForClickEvent(topLevelType, targetInst) { + if (topLevelType === TOP_CLICK) { + return getInstIfValueChanged(targetInst); + } + } + + function getTargetInstForInputOrChangeEvent(topLevelType, targetInst) { + if (topLevelType === TOP_INPUT || topLevelType === TOP_CHANGE) { + return getInstIfValueChanged(targetInst); + } + } + + function handleControlledInputBlur(node) { + var state = node._wrapperState; + + if (!state || !state.controlled || node.type !== 'number') { + return; + } + + if (!disableInputAttributeSyncing) { + // If controlled, assign the value attribute to the current value on blur + setDefaultValue(node, 'number', node.value); + } + } + /** + * This plugin creates an `onChange` event that normalizes change events + * across form elements. This event fires at a time when it's possible to + * change the element's value without seeing a flicker. + * + * Supported elements are: + * - input (see `isTextInputElement`) + * - textarea + * - select + */ + + var ChangeEventPlugin = { + eventTypes: eventTypes$2, + _isInputEventSupported: isInputEventSupported, + extractEvents: function ( + topLevelType, + targetInst, + nativeEvent, + nativeEventTarget, + eventSystemFlags, + ) { + var targetNode = targetInst ? getNodeFromInstance$1(targetInst) : window; + var getTargetInstFunc, handleEventFunc; + + if (shouldUseChangeEvent(targetNode)) { + getTargetInstFunc = getTargetInstForChangeEvent; + } else if (isTextInputElement(targetNode)) { + if (isInputEventSupported) { + getTargetInstFunc = getTargetInstForInputOrChangeEvent; + } else { + getTargetInstFunc = getTargetInstForInputEventPolyfill; + handleEventFunc = handleEventsForInputEventPolyfill; + } + } else if (shouldUseClickEvent(targetNode)) { + getTargetInstFunc = getTargetInstForClickEvent; + } + + if (getTargetInstFunc) { + var inst = getTargetInstFunc(topLevelType, targetInst); + + if (inst) { + var event = createAndAccumulateChangeEvent(inst, nativeEvent, nativeEventTarget); + return event; + } + } + + if (handleEventFunc) { + handleEventFunc(topLevelType, targetNode, targetInst); + } // When blurring, set the value attribute for number inputs + + if (topLevelType === TOP_BLUR) { + handleControlledInputBlur(targetNode); + } + }, + }; + + /** + * Module that is injectable into `EventPluginHub`, that specifies a + * deterministic ordering of `EventPlugin`s. A convenient way to reason about + * plugins, without having to package every one of them. This is better than + * having plugins be ordered in the same order that they are injected because + * that ordering would be influenced by the packaging order. + * `ResponderEventPlugin` must occur before `SimpleEventPlugin` so that + * preventing default on events is convenient in `SimpleEventPlugin` handlers. + */ + var DOMEventPluginOrder = [ + 'ResponderEventPlugin', + 'SimpleEventPlugin', + 'EnterLeaveEventPlugin', + 'ChangeEventPlugin', + 'SelectEventPlugin', + 'BeforeInputEventPlugin', + ]; + + var eventTypes$3 = { + mouseEnter: { + registrationName: 'onMouseEnter', + dependencies: [TOP_MOUSE_OUT, TOP_MOUSE_OVER], + }, + mouseLeave: { + registrationName: 'onMouseLeave', + dependencies: [TOP_MOUSE_OUT, TOP_MOUSE_OVER], + }, + pointerEnter: { + registrationName: 'onPointerEnter', + dependencies: [TOP_POINTER_OUT, TOP_POINTER_OVER], + }, + pointerLeave: { + registrationName: 'onPointerLeave', + dependencies: [TOP_POINTER_OUT, TOP_POINTER_OVER], + }, + }; // We track the lastNativeEvent to ensure that when we encounter + // cases where we process the same nativeEvent multiple times, + // which can happen when have multiple ancestors, that we don't + // duplicate enter + + var lastNativeEvent; + var EnterLeaveEventPlugin = { + eventTypes: eventTypes$3, + + /** + * For almost every interaction we care about, there will be both a top-level + * `mouseover` and `mouseout` event that occurs. Only use `mouseout` so that + * we do not extract duplicate events. However, moving the mouse into the + * browser from outside will not fire a `mouseout` event. In this case, we use + * the `mouseover` top-level event. + */ + extractEvents: function ( + topLevelType, + targetInst, + nativeEvent, + nativeEventTarget, + eventSystemFlags, + ) { + var isOverEvent = topLevelType === TOP_MOUSE_OVER || topLevelType === TOP_POINTER_OVER; + var isOutEvent = topLevelType === TOP_MOUSE_OUT || topLevelType === TOP_POINTER_OUT; + + if ( + isOverEvent && + (eventSystemFlags & IS_REPLAYED) === 0 && + (nativeEvent.relatedTarget || nativeEvent.fromElement) + ) { + // If this is an over event with a target, then we've already dispatched + // the event in the out event of the other target. If this is replayed, + // then it's because we couldn't dispatch against this target previously + // so we have to do it now instead. + return null; + } + + if (!isOutEvent && !isOverEvent) { + // Must not be a mouse or pointer in or out - ignoring. + return null; + } + + var win; + + if (nativeEventTarget.window === nativeEventTarget) { + // `nativeEventTarget` is probably a window object. + win = nativeEventTarget; + } else { + // TODO: Figure out why `ownerDocument` is sometimes undefined in IE8. + var doc = nativeEventTarget.ownerDocument; + + if (doc) { + win = doc.defaultView || doc.parentWindow; + } else { + win = window; + } + } + + var from; + var to; + + if (isOutEvent) { + from = targetInst; + var related = nativeEvent.relatedTarget || nativeEvent.toElement; + to = related ? getClosestInstanceFromNode(related) : null; + + if (to !== null) { + var nearestMounted = getNearestMountedFiber(to); + + if (to !== nearestMounted || (to.tag !== HostComponent && to.tag !== HostText)) { + to = null; + } + } + } else { + // Moving to a node from outside the window. + from = null; + to = targetInst; + } + + if (from === to) { + // Nothing pertains to our managed components. + return null; + } + + var eventInterface, leaveEventType, enterEventType, eventTypePrefix; + + if (topLevelType === TOP_MOUSE_OUT || topLevelType === TOP_MOUSE_OVER) { + eventInterface = SyntheticMouseEvent; + leaveEventType = eventTypes$3.mouseLeave; + enterEventType = eventTypes$3.mouseEnter; + eventTypePrefix = 'mouse'; + } else if (topLevelType === TOP_POINTER_OUT || topLevelType === TOP_POINTER_OVER) { + eventInterface = SyntheticPointerEvent; + leaveEventType = eventTypes$3.pointerLeave; + enterEventType = eventTypes$3.pointerEnter; + eventTypePrefix = 'pointer'; + } + + var fromNode = from == null ? win : getNodeFromInstance$1(from); + var toNode = to == null ? win : getNodeFromInstance$1(to); + var leave = eventInterface.getPooled(leaveEventType, from, nativeEvent, nativeEventTarget); + leave.type = eventTypePrefix + 'leave'; + leave.target = fromNode; + leave.relatedTarget = toNode; + var enter = eventInterface.getPooled(enterEventType, to, nativeEvent, nativeEventTarget); + enter.type = eventTypePrefix + 'enter'; + enter.target = toNode; + enter.relatedTarget = fromNode; + accumulateEnterLeaveDispatches(leave, enter, from, to); + + if (nativeEvent === lastNativeEvent) { + lastNativeEvent = null; + return [leave]; + } + + lastNativeEvent = nativeEvent; + return [leave, enter]; + }, + }; + + /** + * inlined Object.is polyfill to avoid requiring consumers ship their own + * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is + */ + function is(x, y) { + return ( + (x === y && (x !== 0 || 1 / x === 1 / y)) || (x !== x && y !== y) // eslint-disable-line no-self-compare + ); + } + + var is$1 = typeof Object.is === 'function' ? Object.is : is; + + var hasOwnProperty$2 = Object.prototype.hasOwnProperty; + /** + * Performs equality by iterating through keys on an object and returning false + * when any key has values which are not strictly equal between the arguments. + * Returns true when the values of all keys are strictly equal. + */ + + function shallowEqual(objA, objB) { + if (is$1(objA, objB)) { + return true; + } + + if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) { + return false; + } + + var keysA = Object.keys(objA); + var keysB = Object.keys(objB); + + if (keysA.length !== keysB.length) { + return false; + } // Test for A's keys different from B. + + for (var i = 0; i < keysA.length; i++) { + if (!hasOwnProperty$2.call(objB, keysA[i]) || !is$1(objA[keysA[i]], objB[keysA[i]])) { + return false; + } + } + + return true; + } + + var skipSelectionChangeEvent = + canUseDOM && 'documentMode' in document && document.documentMode <= 11; + var eventTypes$4 = { + select: { + phasedRegistrationNames: { + bubbled: 'onSelect', + captured: 'onSelectCapture', + }, + dependencies: [ + TOP_BLUR, + TOP_CONTEXT_MENU, + TOP_DRAG_END, + TOP_FOCUS, + TOP_KEY_DOWN, + TOP_KEY_UP, + TOP_MOUSE_DOWN, + TOP_MOUSE_UP, + TOP_SELECTION_CHANGE, + ], + }, + }; + var activeElement$1 = null; + var activeElementInst$1 = null; + var lastSelection = null; + var mouseDown = false; + /** + * Get an object which is a unique representation of the current selection. + * + * The return value will not be consistent across nodes or browsers, but + * two identical selections on the same node will return identical objects. + * + * @param {DOMElement} node + * @return {object} + */ + + function getSelection$1(node) { + if ('selectionStart' in node && hasSelectionCapabilities(node)) { + return { + start: node.selectionStart, + end: node.selectionEnd, + }; + } else { + var win = (node.ownerDocument && node.ownerDocument.defaultView) || window; + var selection = win.getSelection(); + return { + anchorNode: selection.anchorNode, + anchorOffset: selection.anchorOffset, + focusNode: selection.focusNode, + focusOffset: selection.focusOffset, + }; + } + } + /** + * Get document associated with the event target. + * + * @param {object} nativeEventTarget + * @return {Document} + */ + + function getEventTargetDocument(eventTarget) { + return eventTarget.window === eventTarget + ? eventTarget.document + : eventTarget.nodeType === DOCUMENT_NODE + ? eventTarget + : eventTarget.ownerDocument; + } + /** + * Poll selection to see whether it's changed. + * + * @param {object} nativeEvent + * @param {object} nativeEventTarget + * @return {?SyntheticEvent} + */ + + function constructSelectEvent(nativeEvent, nativeEventTarget) { + // Ensure we have the right element, and that the user is not dragging a + // selection (this matches native `select` event behavior). In HTML5, select + // fires only on input and textarea thus if there's no focused element we + // won't dispatch. + var doc = getEventTargetDocument(nativeEventTarget); + + if (mouseDown || activeElement$1 == null || activeElement$1 !== getActiveElement(doc)) { + return null; + } // Only fire when selection has actually changed. + + var currentSelection = getSelection$1(activeElement$1); + + if (!lastSelection || !shallowEqual(lastSelection, currentSelection)) { + lastSelection = currentSelection; + var syntheticEvent = SyntheticEvent.getPooled( + eventTypes$4.select, + activeElementInst$1, + nativeEvent, + nativeEventTarget, + ); + syntheticEvent.type = 'select'; + syntheticEvent.target = activeElement$1; + accumulateTwoPhaseDispatches(syntheticEvent); + return syntheticEvent; + } + + return null; + } + /** + * This plugin creates an `onSelect` event that normalizes select events + * across form elements. + * + * Supported elements are: + * - input (see `isTextInputElement`) + * - textarea + * - contentEditable + * + * This differs from native browser implementations in the following ways: + * - Fires on contentEditable fields as well as inputs. + * - Fires for collapsed selection. + * - Fires after user input. + */ + + var SelectEventPlugin = { + eventTypes: eventTypes$4, + extractEvents: function ( + topLevelType, + targetInst, + nativeEvent, + nativeEventTarget, + eventSystemFlags, + ) { + var doc = getEventTargetDocument(nativeEventTarget); // Track whether all listeners exists for this plugin. If none exist, we do + // not extract events. See #3639. + + if (!doc || !isListeningToAllDependencies('onSelect', doc)) { + return null; + } + + var targetNode = targetInst ? getNodeFromInstance$1(targetInst) : window; + + switch (topLevelType) { + // Track the input node that has focus. + case TOP_FOCUS: + if (isTextInputElement(targetNode) || targetNode.contentEditable === 'true') { + activeElement$1 = targetNode; + activeElementInst$1 = targetInst; + lastSelection = null; + } + + break; + + case TOP_BLUR: + activeElement$1 = null; + activeElementInst$1 = null; + lastSelection = null; + break; + // Don't fire the event while the user is dragging. This matches the + // semantics of the native select event. + + case TOP_MOUSE_DOWN: + mouseDown = true; + break; + + case TOP_CONTEXT_MENU: + case TOP_MOUSE_UP: + case TOP_DRAG_END: + mouseDown = false; + return constructSelectEvent(nativeEvent, nativeEventTarget); + // Chrome and IE fire non-standard event when selection is changed (and + // sometimes when it hasn't). IE's event fires out of order with respect + // to key and input events on deletion, so we discard it. + // + // Firefox doesn't support selectionchange, so check selection status + // after each key entry. The selection changes after keydown and before + // keyup, but we check on keydown as well in the case of holding down a + // key, when multiple keydown events are fired but only one keyup is. + // This is also our approach for IE handling, for the reason above. + + case TOP_SELECTION_CHANGE: + if (skipSelectionChangeEvent) { + break; + } + + // falls through + + case TOP_KEY_DOWN: + case TOP_KEY_UP: + return constructSelectEvent(nativeEvent, nativeEventTarget); + } + + return null; + }, + }; + + /** + * Inject modules for resolving DOM hierarchy and plugin ordering. + */ + + injection.injectEventPluginOrder(DOMEventPluginOrder); + setComponentTree(getFiberCurrentPropsFromNode$1, getInstanceFromNode$1, getNodeFromInstance$1); + /** + * Some important event plugins included by default (without having to require + * them). + */ + + injection.injectEventPluginsByName({ + SimpleEventPlugin: SimpleEventPlugin, + EnterLeaveEventPlugin: EnterLeaveEventPlugin, + ChangeEventPlugin: ChangeEventPlugin, + SelectEventPlugin: SelectEventPlugin, + BeforeInputEventPlugin: BeforeInputEventPlugin, + }); + + // Prefix measurements so that it's possible to filter them. + // Longer prefixes are hard to read in DevTools. + var reactEmoji = '\u269B'; + var warningEmoji = '\u26D4'; + var supportsUserTiming = + typeof performance !== 'undefined' && + typeof performance.mark === 'function' && + typeof performance.clearMarks === 'function' && + typeof performance.measure === 'function' && + typeof performance.clearMeasures === 'function'; // Keep track of current fiber so that we know the path to unwind on pause. + // TODO: this looks the same as nextUnitOfWork in scheduler. Can we unify them? + + var currentFiber = null; // If we're in the middle of user code, which fiber and method is it? + // Reusing `currentFiber` would be confusing for this because user code fiber + // can change during commit phase too, but we don't need to unwind it (since + // lifecycles in the commit phase don't resemble a tree). + + var currentPhase = null; + var currentPhaseFiber = null; // Did lifecycle hook schedule an update? This is often a performance problem, + // so we will keep track of it, and include it in the report. + // Track commits caused by cascading updates. + + var isCommitting = false; + var hasScheduledUpdateInCurrentCommit = false; + var hasScheduledUpdateInCurrentPhase = false; + var commitCountInCurrentWorkLoop = 0; + var effectCountInCurrentCommit = 0; + // to avoid stretch the commit phase with measurement overhead. + + var labelsInCurrentCommit = new Set(); + + var formatMarkName = function (markName) { + return reactEmoji + ' ' + markName; + }; + + var formatLabel = function (label, warning) { + var prefix = warning ? warningEmoji + ' ' : reactEmoji + ' '; + var suffix = warning ? ' Warning: ' + warning : ''; + return '' + prefix + label + suffix; + }; + + var beginMark = function (markName) { + performance.mark(formatMarkName(markName)); + }; + + var clearMark = function (markName) { + performance.clearMarks(formatMarkName(markName)); + }; + + var endMark = function (label, markName, warning) { + var formattedMarkName = formatMarkName(markName); + var formattedLabel = formatLabel(label, warning); + + try { + performance.measure(formattedLabel, formattedMarkName); + } catch (err) {} // If previous mark was missing for some reason, this will throw. + // This could only happen if React crashed in an unexpected place earlier. + // Don't pile on with more errors. + // Clear marks immediately to avoid growing buffer. + + performance.clearMarks(formattedMarkName); + performance.clearMeasures(formattedLabel); + }; + + var getFiberMarkName = function (label, debugID) { + return label + ' (#' + debugID + ')'; + }; + + var getFiberLabel = function (componentName, isMounted, phase) { + if (phase === null) { + // These are composite component total time measurements. + return componentName + ' [' + (isMounted ? 'update' : 'mount') + ']'; + } else { + // Composite component methods. + return componentName + '.' + phase; + } + }; + + var beginFiberMark = function (fiber, phase) { + var componentName = getComponentName(fiber.type) || 'Unknown'; + var debugID = fiber._debugID; + var isMounted = fiber.alternate !== null; + var label = getFiberLabel(componentName, isMounted, phase); + + if (isCommitting && labelsInCurrentCommit.has(label)) { + // During the commit phase, we don't show duplicate labels because + // there is a fixed overhead for every measurement, and we don't + // want to stretch the commit phase beyond necessary. + return false; + } + + labelsInCurrentCommit.add(label); + var markName = getFiberMarkName(label, debugID); + beginMark(markName); + return true; + }; + + var clearFiberMark = function (fiber, phase) { + var componentName = getComponentName(fiber.type) || 'Unknown'; + var debugID = fiber._debugID; + var isMounted = fiber.alternate !== null; + var label = getFiberLabel(componentName, isMounted, phase); + var markName = getFiberMarkName(label, debugID); + clearMark(markName); + }; + + var endFiberMark = function (fiber, phase, warning) { + var componentName = getComponentName(fiber.type) || 'Unknown'; + var debugID = fiber._debugID; + var isMounted = fiber.alternate !== null; + var label = getFiberLabel(componentName, isMounted, phase); + var markName = getFiberMarkName(label, debugID); + endMark(label, markName, warning); + }; + + var shouldIgnoreFiber = function (fiber) { + // Host components should be skipped in the timeline. + // We could check typeof fiber.type, but does this work with RN? + switch (fiber.tag) { + case HostRoot: + case HostComponent: + case HostText: + case HostPortal: + case Fragment: + case ContextProvider: + case ContextConsumer: + case Mode: + return true; + + default: + return false; + } + }; + + var clearPendingPhaseMeasurement = function () { + if (currentPhase !== null && currentPhaseFiber !== null) { + clearFiberMark(currentPhaseFiber, currentPhase); + } + + currentPhaseFiber = null; + currentPhase = null; + hasScheduledUpdateInCurrentPhase = false; + }; + + var pauseTimers = function () { + // Stops all currently active measurements so that they can be resumed + // if we continue in a later deferred loop from the same unit of work. + var fiber = currentFiber; + + while (fiber) { + if (fiber._debugIsCurrentlyTiming) { + endFiberMark(fiber, null, null); + } + + fiber = fiber.return; + } + }; + + var resumeTimersRecursively = function (fiber) { + if (fiber.return !== null) { + resumeTimersRecursively(fiber.return); + } + + if (fiber._debugIsCurrentlyTiming) { + beginFiberMark(fiber, null); + } + }; + + var resumeTimers = function () { + // Resumes all measurements that were active during the last deferred loop. + if (currentFiber !== null) { + resumeTimersRecursively(currentFiber); + } + }; + + function recordEffect() { + if (enableUserTimingAPI) { + effectCountInCurrentCommit++; + } + } + function recordScheduleUpdate() { + if (enableUserTimingAPI) { + if (isCommitting) { + hasScheduledUpdateInCurrentCommit = true; + } + + if ( + currentPhase !== null && + currentPhase !== 'componentWillMount' && + currentPhase !== 'componentWillReceiveProps' + ) { + hasScheduledUpdateInCurrentPhase = true; + } + } + } + + function startWorkTimer(fiber) { + if (enableUserTimingAPI) { + if (!supportsUserTiming || shouldIgnoreFiber(fiber)) { + return; + } // If we pause, this is the fiber to unwind from. + + currentFiber = fiber; + + if (!beginFiberMark(fiber, null)) { + return; + } + + fiber._debugIsCurrentlyTiming = true; + } + } + function cancelWorkTimer(fiber) { + if (enableUserTimingAPI) { + if (!supportsUserTiming || shouldIgnoreFiber(fiber)) { + return; + } // Remember we shouldn't complete measurement for this fiber. + // Otherwise flamechart will be deep even for small updates. + + fiber._debugIsCurrentlyTiming = false; + clearFiberMark(fiber, null); + } + } + function stopWorkTimer(fiber) { + if (enableUserTimingAPI) { + if (!supportsUserTiming || shouldIgnoreFiber(fiber)) { + return; + } // If we pause, its parent is the fiber to unwind from. + + currentFiber = fiber.return; + + if (!fiber._debugIsCurrentlyTiming) { + return; + } + + fiber._debugIsCurrentlyTiming = false; + endFiberMark(fiber, null, null); + } + } + function stopFailedWorkTimer(fiber) { + if (enableUserTimingAPI) { + if (!supportsUserTiming || shouldIgnoreFiber(fiber)) { + return; + } // If we pause, its parent is the fiber to unwind from. + + currentFiber = fiber.return; + + if (!fiber._debugIsCurrentlyTiming) { + return; + } + + fiber._debugIsCurrentlyTiming = false; + var warning = + fiber.tag === SuspenseComponent + ? 'Rendering was suspended' + : 'An error was thrown inside this error boundary'; + endFiberMark(fiber, null, warning); + } + } + function startPhaseTimer(fiber, phase) { + if (enableUserTimingAPI) { + if (!supportsUserTiming) { + return; + } + + clearPendingPhaseMeasurement(); + + if (!beginFiberMark(fiber, phase)) { + return; + } + + currentPhaseFiber = fiber; + currentPhase = phase; + } + } + function stopPhaseTimer() { + if (enableUserTimingAPI) { + if (!supportsUserTiming) { + return; + } + + if (currentPhase !== null && currentPhaseFiber !== null) { + var warning = hasScheduledUpdateInCurrentPhase ? 'Scheduled a cascading update' : null; + endFiberMark(currentPhaseFiber, currentPhase, warning); + } + + currentPhase = null; + currentPhaseFiber = null; + } + } + function startWorkLoopTimer(nextUnitOfWork) { + if (enableUserTimingAPI) { + currentFiber = nextUnitOfWork; + + if (!supportsUserTiming) { + return; + } + + commitCountInCurrentWorkLoop = 0; // This is top level call. + // Any other measurements are performed within. + + beginMark('(React Tree Reconciliation)'); // Resume any measurements that were in progress during the last loop. + + resumeTimers(); + } + } + function stopWorkLoopTimer(interruptedBy, didCompleteRoot) { + if (enableUserTimingAPI) { + if (!supportsUserTiming) { + return; + } + + var warning = null; + + if (interruptedBy !== null) { + if (interruptedBy.tag === HostRoot) { + warning = 'A top-level update interrupted the previous render'; + } else { + var componentName = getComponentName(interruptedBy.type) || 'Unknown'; + warning = 'An update to ' + componentName + ' interrupted the previous render'; + } + } else if (commitCountInCurrentWorkLoop > 1) { + warning = 'There were cascading updates'; + } + + commitCountInCurrentWorkLoop = 0; + var label = didCompleteRoot + ? '(React Tree Reconciliation: Completed Root)' + : '(React Tree Reconciliation: Yielded)'; // Pause any measurements until the next loop. + + pauseTimers(); + endMark(label, '(React Tree Reconciliation)', warning); + } + } + function startCommitTimer() { + if (enableUserTimingAPI) { + if (!supportsUserTiming) { + return; + } + + isCommitting = true; + hasScheduledUpdateInCurrentCommit = false; + labelsInCurrentCommit.clear(); + beginMark('(Committing Changes)'); + } + } + function stopCommitTimer() { + if (enableUserTimingAPI) { + if (!supportsUserTiming) { + return; + } + + var warning = null; + + if (hasScheduledUpdateInCurrentCommit) { + warning = 'Lifecycle hook scheduled a cascading update'; + } else if (commitCountInCurrentWorkLoop > 0) { + warning = 'Caused by a cascading update in earlier commit'; + } + + hasScheduledUpdateInCurrentCommit = false; + commitCountInCurrentWorkLoop++; + isCommitting = false; + labelsInCurrentCommit.clear(); + endMark('(Committing Changes)', '(Committing Changes)', warning); + } + } + function startCommitSnapshotEffectsTimer() { + if (enableUserTimingAPI) { + if (!supportsUserTiming) { + return; + } + + effectCountInCurrentCommit = 0; + beginMark('(Committing Snapshot Effects)'); + } + } + function stopCommitSnapshotEffectsTimer() { + if (enableUserTimingAPI) { + if (!supportsUserTiming) { + return; + } + + var count = effectCountInCurrentCommit; + effectCountInCurrentCommit = 0; + endMark( + '(Committing Snapshot Effects: ' + count + ' Total)', + '(Committing Snapshot Effects)', + null, + ); + } + } + function startCommitHostEffectsTimer() { + if (enableUserTimingAPI) { + if (!supportsUserTiming) { + return; + } + + effectCountInCurrentCommit = 0; + beginMark('(Committing Host Effects)'); + } + } + function stopCommitHostEffectsTimer() { + if (enableUserTimingAPI) { + if (!supportsUserTiming) { + return; + } + + var count = effectCountInCurrentCommit; + effectCountInCurrentCommit = 0; + endMark('(Committing Host Effects: ' + count + ' Total)', '(Committing Host Effects)', null); + } + } + function startCommitLifeCyclesTimer() { + if (enableUserTimingAPI) { + if (!supportsUserTiming) { + return; + } + + effectCountInCurrentCommit = 0; + beginMark('(Calling Lifecycle Methods)'); + } + } + function stopCommitLifeCyclesTimer() { + if (enableUserTimingAPI) { + if (!supportsUserTiming) { + return; + } + + var count = effectCountInCurrentCommit; + effectCountInCurrentCommit = 0; + endMark( + '(Calling Lifecycle Methods: ' + count + ' Total)', + '(Calling Lifecycle Methods)', + null, + ); + } + } + + var valueStack = []; + var fiberStack; + + { + fiberStack = []; + } + + var index = -1; + + function createCursor(defaultValue) { + return { + current: defaultValue, + }; + } + + function pop(cursor, fiber) { + if (index < 0) { + { + warningWithoutStack$1(false, 'Unexpected pop.'); + } + + return; + } + + { + if (fiber !== fiberStack[index]) { + warningWithoutStack$1(false, 'Unexpected Fiber popped.'); + } + } + + cursor.current = valueStack[index]; + valueStack[index] = null; + + { + fiberStack[index] = null; + } + + index--; + } + + function push(cursor, value, fiber) { + index++; + valueStack[index] = cursor.current; + + { + fiberStack[index] = fiber; + } + + cursor.current = value; + } + + var warnedAboutMissingGetChildContext; + + { + warnedAboutMissingGetChildContext = {}; + } + + var emptyContextObject = {}; + + { + Object.freeze(emptyContextObject); + } // A cursor to the current merged context object on the stack. + + var contextStackCursor = createCursor(emptyContextObject); // A cursor to a boolean indicating whether the context has changed. + + var didPerformWorkStackCursor = createCursor(false); // Keep track of the previous context object that was on the stack. + // We use this to get access to the parent context after we have already + // pushed the next context provider, and now need to merge their contexts. + + var previousContext = emptyContextObject; + + function getUnmaskedContext(workInProgress, Component, didPushOwnContextIfProvider) { + if (disableLegacyContext) { + return emptyContextObject; + } else { + if (didPushOwnContextIfProvider && isContextProvider(Component)) { + // If the fiber is a context provider itself, when we read its context + // we may have already pushed its own child context on the stack. A context + // provider should not "see" its own child context. Therefore we read the + // previous (parent) context instead for a context provider. + return previousContext; + } + + return contextStackCursor.current; + } + } + + function cacheContext(workInProgress, unmaskedContext, maskedContext) { + if (disableLegacyContext) { + return; + } else { + var instance = workInProgress.stateNode; + instance.__reactInternalMemoizedUnmaskedChildContext = unmaskedContext; + instance.__reactInternalMemoizedMaskedChildContext = maskedContext; + } + } + + function getMaskedContext(workInProgress, unmaskedContext) { + if (disableLegacyContext) { + return emptyContextObject; + } else { + var type = workInProgress.type; + var contextTypes = type.contextTypes; + + if (!contextTypes) { + return emptyContextObject; + } // Avoid recreating masked context unless unmasked context has changed. + // Failing to do this will result in unnecessary calls to componentWillReceiveProps. + // This may trigger infinite loops if componentWillReceiveProps calls setState. + + var instance = workInProgress.stateNode; + + if (instance && instance.__reactInternalMemoizedUnmaskedChildContext === unmaskedContext) { + return instance.__reactInternalMemoizedMaskedChildContext; + } + + var context = {}; + + for (var key in contextTypes) { + context[key] = unmaskedContext[key]; + } + + { + var name = getComponentName(type) || 'Unknown'; + checkPropTypes(contextTypes, context, 'context', name, getCurrentFiberStackInDev); + } // Cache unmasked context so we can avoid recreating masked context unless necessary. + // Context is created before the class component is instantiated so check for instance. + + if (instance) { + cacheContext(workInProgress, unmaskedContext, context); + } + + return context; + } + } + + function hasContextChanged() { + if (disableLegacyContext) { + return false; + } else { + return didPerformWorkStackCursor.current; + } + } + + function isContextProvider(type) { + if (disableLegacyContext) { + return false; + } else { + var childContextTypes = type.childContextTypes; + return childContextTypes !== null && childContextTypes !== undefined; + } + } + + function popContext(fiber) { + if (disableLegacyContext) { + return; + } else { + pop(didPerformWorkStackCursor, fiber); + pop(contextStackCursor, fiber); + } + } + + function popTopLevelContextObject(fiber) { + if (disableLegacyContext) { + return; + } else { + pop(didPerformWorkStackCursor, fiber); + pop(contextStackCursor, fiber); + } + } + + function pushTopLevelContextObject(fiber, context, didChange) { + if (disableLegacyContext) { + return; + } else { + if (!(contextStackCursor.current === emptyContextObject)) { + { + throw Error( + 'Unexpected context found on stack. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + + push(contextStackCursor, context, fiber); + push(didPerformWorkStackCursor, didChange, fiber); + } + } + + function processChildContext(fiber, type, parentContext) { + if (disableLegacyContext) { + return parentContext; + } else { + var instance = fiber.stateNode; + var childContextTypes = type.childContextTypes; // TODO (bvaughn) Replace this behavior with an invariant() in the future. + // It has only been added in Fiber to match the (unintentional) behavior in Stack. + + if (typeof instance.getChildContext !== 'function') { + { + var componentName = getComponentName(type) || 'Unknown'; + + if (!warnedAboutMissingGetChildContext[componentName]) { + warnedAboutMissingGetChildContext[componentName] = true; + warningWithoutStack$1( + false, + '%s.childContextTypes is specified but there is no getChildContext() method ' + + 'on the instance. You can either define getChildContext() on %s or remove ' + + 'childContextTypes from it.', + componentName, + componentName, + ); + } + } + + return parentContext; + } + + var childContext; + + { + setCurrentPhase('getChildContext'); + } + + startPhaseTimer(fiber, 'getChildContext'); + childContext = instance.getChildContext(); + stopPhaseTimer(); + + { + setCurrentPhase(null); + } + + for (var contextKey in childContext) { + if (!(contextKey in childContextTypes)) { + { + throw Error( + (getComponentName(type) || 'Unknown') + + '.getChildContext(): key "' + + contextKey + + '" is not defined in childContextTypes.', + ); + } + } + } + + { + var name = getComponentName(type) || 'Unknown'; + checkPropTypes( + childContextTypes, + childContext, + 'child context', + name, // In practice, there is one case in which we won't get a stack. It's when + // somebody calls unstable_renderSubtreeIntoContainer() and we process + // context from the parent component instance. The stack will be missing + // because it's outside of the reconciliation, and so the pointer has not + // been set. This is rare and doesn't matter. We'll also remove that API. + getCurrentFiberStackInDev, + ); + } + + return _assign({}, parentContext, {}, childContext); + } + } + + function pushContextProvider(workInProgress) { + if (disableLegacyContext) { + return false; + } else { + var instance = workInProgress.stateNode; // We push the context as early as possible to ensure stack integrity. + // If the instance does not exist yet, we will push null at first, + // and replace it on the stack later when invalidating the context. + + var memoizedMergedChildContext = + (instance && instance.__reactInternalMemoizedMergedChildContext) || emptyContextObject; // Remember the parent context so we can merge with it later. + // Inherit the parent's did-perform-work value to avoid inadvertently blocking updates. + + previousContext = contextStackCursor.current; + push(contextStackCursor, memoizedMergedChildContext, workInProgress); + push(didPerformWorkStackCursor, didPerformWorkStackCursor.current, workInProgress); + return true; + } + } + + function invalidateContextProvider(workInProgress, type, didChange) { + if (disableLegacyContext) { + return; + } else { + var instance = workInProgress.stateNode; + + if (!instance) { + { + throw Error( + 'Expected to have an instance by this point. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + + if (didChange) { + // Merge parent and own context. + // Skip this if we're not updating due to sCU. + // This avoids unnecessarily recomputing memoized values. + var mergedContext = processChildContext(workInProgress, type, previousContext); + instance.__reactInternalMemoizedMergedChildContext = mergedContext; // Replace the old (or empty) context with the new one. + // It is important to unwind the context in the reverse order. + + pop(didPerformWorkStackCursor, workInProgress); + pop(contextStackCursor, workInProgress); // Now push the new context and mark that it has changed. + + push(contextStackCursor, mergedContext, workInProgress); + push(didPerformWorkStackCursor, didChange, workInProgress); + } else { + pop(didPerformWorkStackCursor, workInProgress); + push(didPerformWorkStackCursor, didChange, workInProgress); + } + } + } + + function findCurrentUnmaskedContext(fiber) { + if (disableLegacyContext) { + return emptyContextObject; + } else { + // Currently this is only used with renderSubtreeIntoContainer; not sure if it + // makes sense elsewhere + if (!(isFiberMounted(fiber) && fiber.tag === ClassComponent)) { + { + throw Error( + 'Expected subtree parent to be a mounted class component. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + + var node = fiber; + + do { + switch (node.tag) { + case HostRoot: + return node.stateNode.context; + + case ClassComponent: { + var Component = node.type; + + if (isContextProvider(Component)) { + return node.stateNode.__reactInternalMemoizedMergedChildContext; + } + + break; + } + } + + node = node.return; + } while (node !== null); + + { + { + throw Error( + 'Found unexpected detached subtree parent. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + } + } + + var LegacyRoot = 0; + var BlockingRoot = 1; + var ConcurrentRoot = 2; + + // Intentionally not named imports because Rollup would use dynamic dispatch for + // CommonJS interop named imports. + var Scheduler_runWithPriority = Scheduler.unstable_runWithPriority; + var Scheduler_scheduleCallback = Scheduler.unstable_scheduleCallback; + var Scheduler_cancelCallback = Scheduler.unstable_cancelCallback; + var Scheduler_shouldYield = Scheduler.unstable_shouldYield; + var Scheduler_requestPaint = Scheduler.unstable_requestPaint; + var Scheduler_now = Scheduler.unstable_now; + var Scheduler_getCurrentPriorityLevel = Scheduler.unstable_getCurrentPriorityLevel; + var Scheduler_ImmediatePriority = Scheduler.unstable_ImmediatePriority; + var Scheduler_UserBlockingPriority = Scheduler.unstable_UserBlockingPriority; + var Scheduler_NormalPriority = Scheduler.unstable_NormalPriority; + var Scheduler_LowPriority = Scheduler.unstable_LowPriority; + var Scheduler_IdlePriority = Scheduler.unstable_IdlePriority; + + if (enableSchedulerTracing) { + // Provide explicit error message when production+profiling bundle of e.g. + // react-dom is used with production (non-profiling) bundle of + // scheduler/tracing + if (!(tracing.__interactionsRef != null && tracing.__interactionsRef.current != null)) { + { + throw Error( + 'It is not supported to run the profiling version of a renderer (for example, `react-dom/profiling`) without also replacing the `scheduler/tracing` module with `scheduler/tracing-profiling`. Your bundler might have a setting for aliasing both modules. Learn more at http://fb.me/react-profiling', + ); + } + } + } + + var fakeCallbackNode = {}; // Except for NoPriority, these correspond to Scheduler priorities. We use + // ascending numbers so we can compare them like numbers. They start at 90 to + // avoid clashing with Scheduler's priorities. + + var ImmediatePriority = 99; + var UserBlockingPriority$2 = 98; + var NormalPriority = 97; + var LowPriority = 96; + var IdlePriority = 95; // NoPriority is the absence of priority. Also React-only. + + var NoPriority = 90; + var shouldYield = Scheduler_shouldYield; + var requestPaint = Scheduler_requestPaint !== undefined ? Scheduler_requestPaint : function () {}; // Fall back gracefully if we're running an older version of Scheduler. + var syncQueue = null; + var immediateQueueCallbackNode = null; + var isFlushingSyncQueue = false; + var initialTimeMs = Scheduler_now(); // If the initial timestamp is reasonably small, use Scheduler's `now` directly. + // This will be the case for modern browsers that support `performance.now`. In + // older browsers, Scheduler falls back to `Date.now`, which returns a Unix + // timestamp. In that case, subtract the module initialization time to simulate + // the behavior of performance.now and keep our times small enough to fit + // within 32 bits. + // TODO: Consider lifting this into Scheduler. + + var now = + initialTimeMs < 10000 + ? Scheduler_now + : function () { + return Scheduler_now() - initialTimeMs; + }; + function getCurrentPriorityLevel() { + switch (Scheduler_getCurrentPriorityLevel()) { + case Scheduler_ImmediatePriority: + return ImmediatePriority; + + case Scheduler_UserBlockingPriority: + return UserBlockingPriority$2; + + case Scheduler_NormalPriority: + return NormalPriority; + + case Scheduler_LowPriority: + return LowPriority; + + case Scheduler_IdlePriority: + return IdlePriority; + + default: { + { + throw Error('Unknown priority level.'); + } + } + } + } + + function reactPriorityToSchedulerPriority(reactPriorityLevel) { + switch (reactPriorityLevel) { + case ImmediatePriority: + return Scheduler_ImmediatePriority; + + case UserBlockingPriority$2: + return Scheduler_UserBlockingPriority; + + case NormalPriority: + return Scheduler_NormalPriority; + + case LowPriority: + return Scheduler_LowPriority; + + case IdlePriority: + return Scheduler_IdlePriority; + + default: { + { + throw Error('Unknown priority level.'); + } + } + } + } + + function runWithPriority$2(reactPriorityLevel, fn) { + var priorityLevel = reactPriorityToSchedulerPriority(reactPriorityLevel); + return Scheduler_runWithPriority(priorityLevel, fn); + } + function scheduleCallback(reactPriorityLevel, callback, options) { + var priorityLevel = reactPriorityToSchedulerPriority(reactPriorityLevel); + return Scheduler_scheduleCallback(priorityLevel, callback, options); + } + function scheduleSyncCallback(callback) { + // Push this callback into an internal queue. We'll flush these either in + // the next tick, or earlier if something calls `flushSyncCallbackQueue`. + if (syncQueue === null) { + syncQueue = [callback]; // Flush the queue in the next tick, at the earliest. + + immediateQueueCallbackNode = Scheduler_scheduleCallback( + Scheduler_ImmediatePriority, + flushSyncCallbackQueueImpl, + ); + } else { + // Push onto existing queue. Don't need to schedule a callback because + // we already scheduled one when we created the queue. + syncQueue.push(callback); + } + + return fakeCallbackNode; + } + function cancelCallback(callbackNode) { + if (callbackNode !== fakeCallbackNode) { + Scheduler_cancelCallback(callbackNode); + } + } + function flushSyncCallbackQueue() { + if (immediateQueueCallbackNode !== null) { + var node = immediateQueueCallbackNode; + immediateQueueCallbackNode = null; + Scheduler_cancelCallback(node); + } + + flushSyncCallbackQueueImpl(); + } + + function flushSyncCallbackQueueImpl() { + if (!isFlushingSyncQueue && syncQueue !== null) { + // Prevent re-entrancy. + isFlushingSyncQueue = true; + var i = 0; + + try { + var _isSync = true; + var queue = syncQueue; + runWithPriority$2(ImmediatePriority, function () { + for (; i < queue.length; i++) { + var callback = queue[i]; + + do { + callback = callback(_isSync); + } while (callback !== null); + } + }); + syncQueue = null; + } catch (error) { + // If something throws, leave the remaining callbacks on the queue. + if (syncQueue !== null) { + syncQueue = syncQueue.slice(i + 1); + } // Resume flushing in the next tick + + Scheduler_scheduleCallback(Scheduler_ImmediatePriority, flushSyncCallbackQueue); + throw error; + } finally { + isFlushingSyncQueue = false; + } + } + } + + var NoMode = 0; + var StrictMode = 1; // TODO: Remove BlockingMode and ConcurrentMode by reading from the root + // tag instead + + var BlockingMode = 2; + var ConcurrentMode = 4; + var ProfileMode = 8; + + // Max 31 bit integer. The max integer size in V8 for 32-bit systems. + // Math.pow(2, 30) - 1 + // 0b111111111111111111111111111111 + var MAX_SIGNED_31_BIT_INT = 1073741823; + + var NoWork = 0; // TODO: Think of a better name for Never. The key difference with Idle is that + // Never work can be committed in an inconsistent state without tearing the UI. + // The main example is offscreen content, like a hidden subtree. So one possible + // name is Offscreen. However, it also includes dehydrated Suspense boundaries, + // which are inconsistent in the sense that they haven't finished yet, but + // aren't visibly inconsistent because the server rendered HTML matches what the + // hydrated tree would look like. + + var Never = 1; // Idle is slightly higher priority than Never. It must completely finish in + // order to be consistent. + + var Idle = 2; // Continuous Hydration is a moving priority. It is slightly higher than Idle + // and is used to increase priority of hover targets. It is increasing with + // each usage so that last always wins. + + var ContinuousHydration = 3; + var Sync = MAX_SIGNED_31_BIT_INT; + var Batched = Sync - 1; + var UNIT_SIZE = 10; + var MAGIC_NUMBER_OFFSET = Batched - 1; // 1 unit of expiration time represents 10ms. + + function msToExpirationTime(ms) { + // Always add an offset so that we don't clash with the magic number for NoWork. + return MAGIC_NUMBER_OFFSET - ((ms / UNIT_SIZE) | 0); + } + function expirationTimeToMs(expirationTime) { + return (MAGIC_NUMBER_OFFSET - expirationTime) * UNIT_SIZE; + } + + function ceiling(num, precision) { + return (((num / precision) | 0) + 1) * precision; + } + + function computeExpirationBucket(currentTime, expirationInMs, bucketSizeMs) { + return ( + MAGIC_NUMBER_OFFSET - + ceiling( + MAGIC_NUMBER_OFFSET - currentTime + expirationInMs / UNIT_SIZE, + bucketSizeMs / UNIT_SIZE, + ) + ); + } // TODO: This corresponds to Scheduler's NormalPriority, not LowPriority. Update + // the names to reflect. + + var LOW_PRIORITY_EXPIRATION = 5000; + var LOW_PRIORITY_BATCH_SIZE = 250; + function computeAsyncExpiration(currentTime) { + return computeExpirationBucket(currentTime, LOW_PRIORITY_EXPIRATION, LOW_PRIORITY_BATCH_SIZE); + } + function computeSuspenseExpiration(currentTime, timeoutMs) { + // TODO: Should we warn if timeoutMs is lower than the normal pri expiration time? + return computeExpirationBucket(currentTime, timeoutMs, LOW_PRIORITY_BATCH_SIZE); + } // We intentionally set a higher expiration time for interactive updates in + // dev than in production. + // + // If the main thread is being blocked so long that you hit the expiration, + // it's a problem that could be solved with better scheduling. + // + // People will be more likely to notice this and fix it with the long + // expiration time in development. + // + // In production we opt for better UX at the risk of masking scheduling + // problems, by expiring fast. + + var HIGH_PRIORITY_EXPIRATION = 500; + var HIGH_PRIORITY_BATCH_SIZE = 100; + function computeInteractiveExpiration(currentTime) { + return computeExpirationBucket(currentTime, HIGH_PRIORITY_EXPIRATION, HIGH_PRIORITY_BATCH_SIZE); + } + function computeContinuousHydrationExpiration(currentTime) { + // Each time we ask for a new one of these we increase the priority. + // This ensures that the last one always wins since we can't deprioritize + // once we've scheduled work already. + return ContinuousHydration++; + } + function inferPriorityFromExpirationTime(currentTime, expirationTime) { + if (expirationTime === Sync) { + return ImmediatePriority; + } + + if (expirationTime === Never || expirationTime === Idle) { + return IdlePriority; + } + + var msUntil = expirationTimeToMs(expirationTime) - expirationTimeToMs(currentTime); + + if (msUntil <= 0) { + return ImmediatePriority; + } + + if (msUntil <= HIGH_PRIORITY_EXPIRATION + HIGH_PRIORITY_BATCH_SIZE) { + return UserBlockingPriority$2; + } + + if (msUntil <= LOW_PRIORITY_EXPIRATION + LOW_PRIORITY_BATCH_SIZE) { + return NormalPriority; + } // TODO: Handle LowPriority + // Assume anything lower has idle priority + + return IdlePriority; + } + + /** + * Forked from fbjs/warning: + * https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js + * + * Only change is we use console.warn instead of console.error, + * and do nothing when 'console' is not supported. + * This really simplifies the code. + * --- + * Similar to invariant but only logs a warning if the condition is not met. + * This can be used to log issues in development environments in critical + * paths. Removing the logging code for production environments will keep the + * same logic and follow the same code paths. + */ + var lowPriorityWarningWithoutStack = function () {}; + + { + var printWarning = function (format) { + for ( + var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; + _key < _len; + _key++ + ) { + args[_key - 1] = arguments[_key]; + } + + var argIndex = 0; + var message = + 'Warning: ' + + format.replace(/%s/g, function () { + return args[argIndex++]; + }); + + if (typeof console !== 'undefined') { + console.warn(message); + } + + try { + // --- Welcome to debugging React --- + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + throw new Error(message); + } catch (x) {} + }; + + lowPriorityWarningWithoutStack = function (condition, format) { + if (format === undefined) { + throw new Error( + '`lowPriorityWarningWithoutStack(condition, format, ...args)` requires a warning ' + + 'message argument', + ); + } + + if (!condition) { + for ( + var _len2 = arguments.length, args = new Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; + _key2 < _len2; + _key2++ + ) { + args[_key2 - 2] = arguments[_key2]; + } + + printWarning.apply(void 0, [format].concat(args)); + } + }; + } + + var lowPriorityWarningWithoutStack$1 = lowPriorityWarningWithoutStack; + + var ReactStrictModeWarnings = { + recordUnsafeLifecycleWarnings: function (fiber, instance) {}, + flushPendingUnsafeLifecycleWarnings: function () {}, + recordLegacyContextWarning: function (fiber, instance) {}, + flushLegacyContextWarning: function () {}, + discardPendingWarnings: function () {}, + }; + + { + var findStrictRoot = function (fiber) { + var maybeStrictRoot = null; + var node = fiber; + + while (node !== null) { + if (node.mode & StrictMode) { + maybeStrictRoot = node; + } + + node = node.return; + } + + return maybeStrictRoot; + }; + + var setToSortedString = function (set) { + var array = []; + set.forEach(function (value) { + array.push(value); + }); + return array.sort().join(', '); + }; + + var pendingComponentWillMountWarnings = []; + var pendingUNSAFE_ComponentWillMountWarnings = []; + var pendingComponentWillReceivePropsWarnings = []; + var pendingUNSAFE_ComponentWillReceivePropsWarnings = []; + var pendingComponentWillUpdateWarnings = []; + var pendingUNSAFE_ComponentWillUpdateWarnings = []; // Tracks components we have already warned about. + + var didWarnAboutUnsafeLifecycles = new Set(); + + ReactStrictModeWarnings.recordUnsafeLifecycleWarnings = function (fiber, instance) { + // Dedup strategy: Warn once per component. + if (didWarnAboutUnsafeLifecycles.has(fiber.type)) { + return; + } + + if ( + typeof instance.componentWillMount === 'function' && // Don't warn about react-lifecycles-compat polyfilled components. + instance.componentWillMount.__suppressDeprecationWarning !== true + ) { + pendingComponentWillMountWarnings.push(fiber); + } + + if (fiber.mode & StrictMode && typeof instance.UNSAFE_componentWillMount === 'function') { + pendingUNSAFE_ComponentWillMountWarnings.push(fiber); + } + + if ( + typeof instance.componentWillReceiveProps === 'function' && + instance.componentWillReceiveProps.__suppressDeprecationWarning !== true + ) { + pendingComponentWillReceivePropsWarnings.push(fiber); + } + + if ( + fiber.mode & StrictMode && + typeof instance.UNSAFE_componentWillReceiveProps === 'function' + ) { + pendingUNSAFE_ComponentWillReceivePropsWarnings.push(fiber); + } + + if ( + typeof instance.componentWillUpdate === 'function' && + instance.componentWillUpdate.__suppressDeprecationWarning !== true + ) { + pendingComponentWillUpdateWarnings.push(fiber); + } + + if (fiber.mode & StrictMode && typeof instance.UNSAFE_componentWillUpdate === 'function') { + pendingUNSAFE_ComponentWillUpdateWarnings.push(fiber); + } + }; + + ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings = function () { + // We do an initial pass to gather component names + var componentWillMountUniqueNames = new Set(); + + if (pendingComponentWillMountWarnings.length > 0) { + pendingComponentWillMountWarnings.forEach(function (fiber) { + componentWillMountUniqueNames.add(getComponentName(fiber.type) || 'Component'); + didWarnAboutUnsafeLifecycles.add(fiber.type); + }); + pendingComponentWillMountWarnings = []; + } + + var UNSAFE_componentWillMountUniqueNames = new Set(); + + if (pendingUNSAFE_ComponentWillMountWarnings.length > 0) { + pendingUNSAFE_ComponentWillMountWarnings.forEach(function (fiber) { + UNSAFE_componentWillMountUniqueNames.add(getComponentName(fiber.type) || 'Component'); + didWarnAboutUnsafeLifecycles.add(fiber.type); + }); + pendingUNSAFE_ComponentWillMountWarnings = []; + } + + var componentWillReceivePropsUniqueNames = new Set(); + + if (pendingComponentWillReceivePropsWarnings.length > 0) { + pendingComponentWillReceivePropsWarnings.forEach(function (fiber) { + componentWillReceivePropsUniqueNames.add(getComponentName(fiber.type) || 'Component'); + didWarnAboutUnsafeLifecycles.add(fiber.type); + }); + pendingComponentWillReceivePropsWarnings = []; + } + + var UNSAFE_componentWillReceivePropsUniqueNames = new Set(); + + if (pendingUNSAFE_ComponentWillReceivePropsWarnings.length > 0) { + pendingUNSAFE_ComponentWillReceivePropsWarnings.forEach(function (fiber) { + UNSAFE_componentWillReceivePropsUniqueNames.add( + getComponentName(fiber.type) || 'Component', + ); + didWarnAboutUnsafeLifecycles.add(fiber.type); + }); + pendingUNSAFE_ComponentWillReceivePropsWarnings = []; + } + + var componentWillUpdateUniqueNames = new Set(); + + if (pendingComponentWillUpdateWarnings.length > 0) { + pendingComponentWillUpdateWarnings.forEach(function (fiber) { + componentWillUpdateUniqueNames.add(getComponentName(fiber.type) || 'Component'); + didWarnAboutUnsafeLifecycles.add(fiber.type); + }); + pendingComponentWillUpdateWarnings = []; + } + + var UNSAFE_componentWillUpdateUniqueNames = new Set(); + + if (pendingUNSAFE_ComponentWillUpdateWarnings.length > 0) { + pendingUNSAFE_ComponentWillUpdateWarnings.forEach(function (fiber) { + UNSAFE_componentWillUpdateUniqueNames.add(getComponentName(fiber.type) || 'Component'); + didWarnAboutUnsafeLifecycles.add(fiber.type); + }); + pendingUNSAFE_ComponentWillUpdateWarnings = []; + } // Finally, we flush all the warnings + // UNSAFE_ ones before the deprecated ones, since they'll be 'louder' + + if (UNSAFE_componentWillMountUniqueNames.size > 0) { + var sortedNames = setToSortedString(UNSAFE_componentWillMountUniqueNames); + warningWithoutStack$1( + false, + 'Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. ' + + 'See https://fb.me/react-unsafe-component-lifecycles for details.\n\n' + + '* Move code with side effects to componentDidMount, and set initial state in the constructor.\n' + + '\nPlease update the following components: %s', + sortedNames, + ); + } + + if (UNSAFE_componentWillReceivePropsUniqueNames.size > 0) { + var _sortedNames = setToSortedString(UNSAFE_componentWillReceivePropsUniqueNames); + + warningWithoutStack$1( + false, + 'Using UNSAFE_componentWillReceiveProps in strict mode is not recommended ' + + 'and may indicate bugs in your code. ' + + 'See https://fb.me/react-unsafe-component-lifecycles for details.\n\n' + + '* Move data fetching code or side effects to componentDidUpdate.\n' + + "* If you're updating state whenever props change, " + + 'refactor your code to use memoization techniques or move it to ' + + 'static getDerivedStateFromProps. Learn more at: https://fb.me/react-derived-state\n' + + '\nPlease update the following components: %s', + _sortedNames, + ); + } + + if (UNSAFE_componentWillUpdateUniqueNames.size > 0) { + var _sortedNames2 = setToSortedString(UNSAFE_componentWillUpdateUniqueNames); + + warningWithoutStack$1( + false, + 'Using UNSAFE_componentWillUpdate in strict mode is not recommended ' + + 'and may indicate bugs in your code. ' + + 'See https://fb.me/react-unsafe-component-lifecycles for details.\n\n' + + '* Move data fetching code or side effects to componentDidUpdate.\n' + + '\nPlease update the following components: %s', + _sortedNames2, + ); + } + + if (componentWillMountUniqueNames.size > 0) { + var _sortedNames3 = setToSortedString(componentWillMountUniqueNames); + + lowPriorityWarningWithoutStack$1( + false, + 'componentWillMount has been renamed, and is not recommended for use. ' + + 'See https://fb.me/react-unsafe-component-lifecycles for details.\n\n' + + '* Move code with side effects to componentDidMount, and set initial state in the constructor.\n' + + '* Rename componentWillMount to UNSAFE_componentWillMount to suppress ' + + 'this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. ' + + 'To rename all deprecated lifecycles to their new names, you can run ' + + '`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n' + + '\nPlease update the following components: %s', + _sortedNames3, + ); + } + + if (componentWillReceivePropsUniqueNames.size > 0) { + var _sortedNames4 = setToSortedString(componentWillReceivePropsUniqueNames); + + lowPriorityWarningWithoutStack$1( + false, + 'componentWillReceiveProps has been renamed, and is not recommended for use. ' + + 'See https://fb.me/react-unsafe-component-lifecycles for details.\n\n' + + '* Move data fetching code or side effects to componentDidUpdate.\n' + + "* If you're updating state whenever props change, refactor your " + + 'code to use memoization techniques or move it to ' + + 'static getDerivedStateFromProps. Learn more at: https://fb.me/react-derived-state\n' + + '* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress ' + + 'this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. ' + + 'To rename all deprecated lifecycles to their new names, you can run ' + + '`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n' + + '\nPlease update the following components: %s', + _sortedNames4, + ); + } + + if (componentWillUpdateUniqueNames.size > 0) { + var _sortedNames5 = setToSortedString(componentWillUpdateUniqueNames); + + lowPriorityWarningWithoutStack$1( + false, + 'componentWillUpdate has been renamed, and is not recommended for use. ' + + 'See https://fb.me/react-unsafe-component-lifecycles for details.\n\n' + + '* Move data fetching code or side effects to componentDidUpdate.\n' + + '* Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress ' + + 'this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. ' + + 'To rename all deprecated lifecycles to their new names, you can run ' + + '`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n' + + '\nPlease update the following components: %s', + _sortedNames5, + ); + } + }; + + var pendingLegacyContextWarning = new Map(); // Tracks components we have already warned about. + + var didWarnAboutLegacyContext = new Set(); + + ReactStrictModeWarnings.recordLegacyContextWarning = function (fiber, instance) { + var strictRoot = findStrictRoot(fiber); + + if (strictRoot === null) { + warningWithoutStack$1( + false, + 'Expected to find a StrictMode component in a strict mode tree. ' + + 'This error is likely caused by a bug in React. Please file an issue.', + ); + return; + } // Dedup strategy: Warn once per component. + + if (didWarnAboutLegacyContext.has(fiber.type)) { + return; + } + + var warningsForRoot = pendingLegacyContextWarning.get(strictRoot); + + if ( + fiber.type.contextTypes != null || + fiber.type.childContextTypes != null || + (instance !== null && typeof instance.getChildContext === 'function') + ) { + if (warningsForRoot === undefined) { + warningsForRoot = []; + pendingLegacyContextWarning.set(strictRoot, warningsForRoot); + } + + warningsForRoot.push(fiber); + } + }; + + ReactStrictModeWarnings.flushLegacyContextWarning = function () { + pendingLegacyContextWarning.forEach(function (fiberArray, strictRoot) { + var uniqueNames = new Set(); + fiberArray.forEach(function (fiber) { + uniqueNames.add(getComponentName(fiber.type) || 'Component'); + didWarnAboutLegacyContext.add(fiber.type); + }); + var sortedNames = setToSortedString(uniqueNames); + var strictRootComponentStack = getStackByFiberInDevAndProd(strictRoot); + warningWithoutStack$1( + false, + 'Legacy context API has been detected within a strict-mode tree.' + + '\n\nThe old API will be supported in all 16.x releases, but applications ' + + 'using it should migrate to the new version.' + + '\n\nPlease update the following components: %s' + + '\n\nLearn more about this warning here: https://fb.me/react-legacy-context' + + '%s', + sortedNames, + strictRootComponentStack, + ); + }); + }; + + ReactStrictModeWarnings.discardPendingWarnings = function () { + pendingComponentWillMountWarnings = []; + pendingUNSAFE_ComponentWillMountWarnings = []; + pendingComponentWillReceivePropsWarnings = []; + pendingUNSAFE_ComponentWillReceivePropsWarnings = []; + pendingComponentWillUpdateWarnings = []; + pendingUNSAFE_ComponentWillUpdateWarnings = []; + pendingLegacyContextWarning = new Map(); + }; + } + + var resolveFamily = null; // $FlowFixMe Flow gets confused by a WeakSet feature check below. + + var failedBoundaries = null; + var setRefreshHandler = function (handler) { + { + resolveFamily = handler; + } + }; + function resolveFunctionForHotReloading(type) { + { + if (resolveFamily === null) { + // Hot reloading is disabled. + return type; + } + + var family = resolveFamily(type); + + if (family === undefined) { + return type; + } // Use the latest known implementation. + + return family.current; + } + } + function resolveClassForHotReloading(type) { + // No implementation differences. + return resolveFunctionForHotReloading(type); + } + function resolveForwardRefForHotReloading(type) { + { + if (resolveFamily === null) { + // Hot reloading is disabled. + return type; + } + + var family = resolveFamily(type); + + if (family === undefined) { + // Check if we're dealing with a real forwardRef. Don't want to crash early. + if (type !== null && type !== undefined && typeof type.render === 'function') { + // ForwardRef is special because its resolved .type is an object, + // but it's possible that we only have its inner render function in the map. + // If that inner render function is different, we'll build a new forwardRef type. + var currentRender = resolveFunctionForHotReloading(type.render); + + if (type.render !== currentRender) { + var syntheticType = { + $$typeof: REACT_FORWARD_REF_TYPE, + render: currentRender, + }; + + if (type.displayName !== undefined) { + syntheticType.displayName = type.displayName; + } + + return syntheticType; + } + } + + return type; + } // Use the latest known implementation. + + return family.current; + } + } + function isCompatibleFamilyForHotReloading(fiber, element) { + { + if (resolveFamily === null) { + // Hot reloading is disabled. + return false; + } + + var prevType = fiber.elementType; + var nextType = element.type; // If we got here, we know types aren't === equal. + + var needsCompareFamilies = false; + var $$typeofNextType = + typeof nextType === 'object' && nextType !== null ? nextType.$$typeof : null; + + switch (fiber.tag) { + case ClassComponent: { + if (typeof nextType === 'function') { + needsCompareFamilies = true; + } + + break; + } + + case FunctionComponent: { + if (typeof nextType === 'function') { + needsCompareFamilies = true; + } else if ($$typeofNextType === REACT_LAZY_TYPE) { + // We don't know the inner type yet. + // We're going to assume that the lazy inner type is stable, + // and so it is sufficient to avoid reconciling it away. + // We're not going to unwrap or actually use the new lazy type. + needsCompareFamilies = true; + } + + break; + } + + case ForwardRef: { + if ($$typeofNextType === REACT_FORWARD_REF_TYPE) { + needsCompareFamilies = true; + } else if ($$typeofNextType === REACT_LAZY_TYPE) { + needsCompareFamilies = true; + } + + break; + } + + case MemoComponent: + case SimpleMemoComponent: { + if ($$typeofNextType === REACT_MEMO_TYPE) { + // TODO: if it was but can no longer be simple, + // we shouldn't set this. + needsCompareFamilies = true; + } else if ($$typeofNextType === REACT_LAZY_TYPE) { + needsCompareFamilies = true; + } + + break; + } + + default: + return false; + } // Check if both types have a family and it's the same one. + + if (needsCompareFamilies) { + // Note: memo() and forwardRef() we'll compare outer rather than inner type. + // This means both of them need to be registered to preserve state. + // If we unwrapped and compared the inner types for wrappers instead, + // then we would risk falsely saying two separate memo(Foo) + // calls are equivalent because they wrap the same Foo function. + var prevFamily = resolveFamily(prevType); + + if (prevFamily !== undefined && prevFamily === resolveFamily(nextType)) { + return true; + } + } + + return false; + } + } + function markFailedErrorBoundaryForHotReloading(fiber) { + { + if (resolveFamily === null) { + // Hot reloading is disabled. + return; + } + + if (typeof WeakSet !== 'function') { + return; + } + + if (failedBoundaries === null) { + failedBoundaries = new WeakSet(); + } + + failedBoundaries.add(fiber); + } + } + var scheduleRefresh = function (root, update) { + { + if (resolveFamily === null) { + // Hot reloading is disabled. + return; + } + + var staleFamilies = update.staleFamilies, + updatedFamilies = update.updatedFamilies; + flushPassiveEffects(); + flushSync(function () { + scheduleFibersWithFamiliesRecursively(root.current, updatedFamilies, staleFamilies); + }); + } + }; + var scheduleRoot = function (root, element) { + { + if (root.context !== emptyContextObject) { + // Super edge case: root has a legacy _renderSubtree context + // but we don't know the parentComponent so we can't pass it. + // Just ignore. We'll delete this with _renderSubtree code path later. + return; + } + + flushPassiveEffects(); + syncUpdates(function () { + updateContainer(element, root, null, null); + }); + } + }; + + function scheduleFibersWithFamiliesRecursively(fiber, updatedFamilies, staleFamilies) { + { + var alternate = fiber.alternate, + child = fiber.child, + sibling = fiber.sibling, + tag = fiber.tag, + type = fiber.type; + var candidateType = null; + + switch (tag) { + case FunctionComponent: + case SimpleMemoComponent: + case ClassComponent: + candidateType = type; + break; + + case ForwardRef: + candidateType = type.render; + break; + + default: + break; + } + + if (resolveFamily === null) { + throw new Error('Expected resolveFamily to be set during hot reload.'); + } + + var needsRender = false; + var needsRemount = false; + + if (candidateType !== null) { + var family = resolveFamily(candidateType); + + if (family !== undefined) { + if (staleFamilies.has(family)) { + needsRemount = true; + } else if (updatedFamilies.has(family)) { + if (tag === ClassComponent) { + needsRemount = true; + } else { + needsRender = true; + } + } + } + } + + if (failedBoundaries !== null) { + if (failedBoundaries.has(fiber) || (alternate !== null && failedBoundaries.has(alternate))) { + needsRemount = true; + } + } + + if (needsRemount) { + fiber._debugNeedsRemount = true; + } + + if (needsRemount || needsRender) { + scheduleWork(fiber, Sync); + } + + if (child !== null && !needsRemount) { + scheduleFibersWithFamiliesRecursively(child, updatedFamilies, staleFamilies); + } + + if (sibling !== null) { + scheduleFibersWithFamiliesRecursively(sibling, updatedFamilies, staleFamilies); + } + } + } + + var findHostInstancesForRefresh = function (root, families) { + { + var hostInstances = new Set(); + var types = new Set( + families.map(function (family) { + return family.current; + }), + ); + findHostInstancesForMatchingFibersRecursively(root.current, types, hostInstances); + return hostInstances; + } + }; + + function findHostInstancesForMatchingFibersRecursively(fiber, types, hostInstances) { + { + var child = fiber.child, + sibling = fiber.sibling, + tag = fiber.tag, + type = fiber.type; + var candidateType = null; + + switch (tag) { + case FunctionComponent: + case SimpleMemoComponent: + case ClassComponent: + candidateType = type; + break; + + case ForwardRef: + candidateType = type.render; + break; + + default: + break; + } + + var didMatch = false; + + if (candidateType !== null) { + if (types.has(candidateType)) { + didMatch = true; + } + } + + if (didMatch) { + // We have a match. This only drills down to the closest host components. + // There's no need to search deeper because for the purpose of giving + // visual feedback, "flashing" outermost parent rectangles is sufficient. + findHostInstancesForFiberShallowly(fiber, hostInstances); + } else { + // If there's no match, maybe there will be one further down in the child tree. + if (child !== null) { + findHostInstancesForMatchingFibersRecursively(child, types, hostInstances); + } + } + + if (sibling !== null) { + findHostInstancesForMatchingFibersRecursively(sibling, types, hostInstances); + } + } + } + + function findHostInstancesForFiberShallowly(fiber, hostInstances) { + { + var foundHostInstances = findChildHostInstancesForFiberShallowly(fiber, hostInstances); + + if (foundHostInstances) { + return; + } // If we didn't find any host children, fallback to closest host parent. + + var node = fiber; + + while (true) { + switch (node.tag) { + case HostComponent: + hostInstances.add(node.stateNode); + return; + + case HostPortal: + hostInstances.add(node.stateNode.containerInfo); + return; + + case HostRoot: + hostInstances.add(node.stateNode.containerInfo); + return; + } + + if (node.return === null) { + throw new Error('Expected to reach root first.'); + } + + node = node.return; + } + } + } + + function findChildHostInstancesForFiberShallowly(fiber, hostInstances) { + { + var node = fiber; + var foundHostInstances = false; + + while (true) { + if (node.tag === HostComponent) { + // We got a match. + foundHostInstances = true; + hostInstances.add(node.stateNode); // There may still be more, so keep searching. + } else if (node.child !== null) { + node.child.return = node; + node = node.child; + continue; + } + + if (node === fiber) { + return foundHostInstances; + } + + while (node.sibling === null) { + if (node.return === null || node.return === fiber) { + return foundHostInstances; + } + + node = node.return; + } + + node.sibling.return = node.return; + node = node.sibling; + } + } + + return false; + } + + function resolveDefaultProps(Component, baseProps) { + if (Component && Component.defaultProps) { + // Resolve default props. Taken from ReactElement + var props = _assign({}, baseProps); + + var defaultProps = Component.defaultProps; + + for (var propName in defaultProps) { + if (props[propName] === undefined) { + props[propName] = defaultProps[propName]; + } + } + + return props; + } + + return baseProps; + } + function readLazyComponentType(lazyComponent) { + initializeLazyComponentType(lazyComponent); + + if (lazyComponent._status !== Resolved) { + throw lazyComponent._result; + } + + return lazyComponent._result; + } + + var valueCursor = createCursor(null); + var rendererSigil; + + { + // Use this to detect multiple renderers using the same context + rendererSigil = {}; + } + + var currentlyRenderingFiber = null; + var lastContextDependency = null; + var lastContextWithAllBitsObserved = null; + var isDisallowedContextReadInDEV = false; + function resetContextDependencies() { + // This is called right before React yields execution, to ensure `readContext` + // cannot be called outside the render phase. + currentlyRenderingFiber = null; + lastContextDependency = null; + lastContextWithAllBitsObserved = null; + + { + isDisallowedContextReadInDEV = false; + } + } + function enterDisallowedContextReadInDEV() { + { + isDisallowedContextReadInDEV = true; + } + } + function exitDisallowedContextReadInDEV() { + { + isDisallowedContextReadInDEV = false; + } + } + function pushProvider(providerFiber, nextValue) { + var context = providerFiber.type._context; + + if (isPrimaryRenderer) { + push(valueCursor, context._currentValue, providerFiber); + context._currentValue = nextValue; + + { + !( + context._currentRenderer === undefined || + context._currentRenderer === null || + context._currentRenderer === rendererSigil + ) + ? warningWithoutStack$1( + false, + 'Detected multiple renderers concurrently rendering the ' + + 'same context provider. This is currently unsupported.', + ) + : void 0; + context._currentRenderer = rendererSigil; + } + } else { + push(valueCursor, context._currentValue2, providerFiber); + context._currentValue2 = nextValue; + + { + !( + context._currentRenderer2 === undefined || + context._currentRenderer2 === null || + context._currentRenderer2 === rendererSigil + ) + ? warningWithoutStack$1( + false, + 'Detected multiple renderers concurrently rendering the ' + + 'same context provider. This is currently unsupported.', + ) + : void 0; + context._currentRenderer2 = rendererSigil; + } + } + } + function popProvider(providerFiber) { + var currentValue = valueCursor.current; + pop(valueCursor, providerFiber); + var context = providerFiber.type._context; + + if (isPrimaryRenderer) { + context._currentValue = currentValue; + } else { + context._currentValue2 = currentValue; + } + } + function calculateChangedBits(context, newValue, oldValue) { + if (is$1(oldValue, newValue)) { + // No change + return 0; + } else { + var changedBits = + typeof context._calculateChangedBits === 'function' + ? context._calculateChangedBits(oldValue, newValue) + : MAX_SIGNED_31_BIT_INT; + + { + !((changedBits & MAX_SIGNED_31_BIT_INT) === changedBits) + ? warning$1( + false, + 'calculateChangedBits: Expected the return value to be a ' + + '31-bit integer. Instead received: %s', + changedBits, + ) + : void 0; + } + + return changedBits | 0; + } + } + function scheduleWorkOnParentPath(parent, renderExpirationTime) { + // Update the child expiration time of all the ancestors, including + // the alternates. + var node = parent; + + while (node !== null) { + var alternate = node.alternate; + + if (node.childExpirationTime < renderExpirationTime) { + node.childExpirationTime = renderExpirationTime; + + if (alternate !== null && alternate.childExpirationTime < renderExpirationTime) { + alternate.childExpirationTime = renderExpirationTime; + } + } else if (alternate !== null && alternate.childExpirationTime < renderExpirationTime) { + alternate.childExpirationTime = renderExpirationTime; + } else { + // Neither alternate was updated, which means the rest of the + // ancestor path already has sufficient priority. + break; + } + + node = node.return; + } + } + function propagateContextChange(workInProgress, context, changedBits, renderExpirationTime) { + var fiber = workInProgress.child; + + if (fiber !== null) { + // Set the return pointer of the child to the work-in-progress fiber. + fiber.return = workInProgress; + } + + while (fiber !== null) { + var nextFiber = void 0; // Visit this fiber. + + var list = fiber.dependencies; + + if (list !== null) { + nextFiber = fiber.child; + var dependency = list.firstContext; + + while (dependency !== null) { + // Check if the context matches. + if (dependency.context === context && (dependency.observedBits & changedBits) !== 0) { + // Match! Schedule an update on this fiber. + if (fiber.tag === ClassComponent) { + // Schedule a force update on the work-in-progress. + var update = createUpdate(renderExpirationTime, null); + update.tag = ForceUpdate; // TODO: Because we don't have a work-in-progress, this will add the + // update to the current fiber, too, which means it will persist even if + // this render is thrown away. Since it's a race condition, not sure it's + // worth fixing. + + enqueueUpdate(fiber, update); + } + + if (fiber.expirationTime < renderExpirationTime) { + fiber.expirationTime = renderExpirationTime; + } + + var alternate = fiber.alternate; + + if (alternate !== null && alternate.expirationTime < renderExpirationTime) { + alternate.expirationTime = renderExpirationTime; + } + + scheduleWorkOnParentPath(fiber.return, renderExpirationTime); // Mark the expiration time on the list, too. + + if (list.expirationTime < renderExpirationTime) { + list.expirationTime = renderExpirationTime; + } // Since we already found a match, we can stop traversing the + // dependency list. + + break; + } + + dependency = dependency.next; + } + } else if (fiber.tag === ContextProvider) { + // Don't scan deeper if this is a matching provider + nextFiber = fiber.type === workInProgress.type ? null : fiber.child; + } else if (enableSuspenseServerRenderer && fiber.tag === DehydratedFragment) { + // If a dehydrated suspense bounudary is in this subtree, we don't know + // if it will have any context consumers in it. The best we can do is + // mark it as having updates. + var parentSuspense = fiber.return; + + if (!(parentSuspense !== null)) { + { + throw Error( + 'We just came from a parent so we must have had a parent. This is a bug in React.', + ); + } + } + + if (parentSuspense.expirationTime < renderExpirationTime) { + parentSuspense.expirationTime = renderExpirationTime; + } + + var _alternate = parentSuspense.alternate; + + if (_alternate !== null && _alternate.expirationTime < renderExpirationTime) { + _alternate.expirationTime = renderExpirationTime; + } // This is intentionally passing this fiber as the parent + // because we want to schedule this fiber as having work + // on its children. We'll use the childExpirationTime on + // this fiber to indicate that a context has changed. + + scheduleWorkOnParentPath(parentSuspense, renderExpirationTime); + nextFiber = fiber.sibling; + } else { + // Traverse down. + nextFiber = fiber.child; + } + + if (nextFiber !== null) { + // Set the return pointer of the child to the work-in-progress fiber. + nextFiber.return = fiber; + } else { + // No child. Traverse to next sibling. + nextFiber = fiber; + + while (nextFiber !== null) { + if (nextFiber === workInProgress) { + // We're back to the root of this subtree. Exit. + nextFiber = null; + break; + } + + var sibling = nextFiber.sibling; + + if (sibling !== null) { + // Set the return pointer of the sibling to the work-in-progress fiber. + sibling.return = nextFiber.return; + nextFiber = sibling; + break; + } // No more siblings. Traverse up. + + nextFiber = nextFiber.return; + } + } + + fiber = nextFiber; + } + } + function prepareToReadContext(workInProgress, renderExpirationTime) { + currentlyRenderingFiber = workInProgress; + lastContextDependency = null; + lastContextWithAllBitsObserved = null; + var dependencies = workInProgress.dependencies; + + if (dependencies !== null) { + var firstContext = dependencies.firstContext; + + if (firstContext !== null) { + if (dependencies.expirationTime >= renderExpirationTime) { + // Context list has a pending update. Mark that this fiber performed work. + markWorkInProgressReceivedUpdate(); + } // Reset the work-in-progress list + + dependencies.firstContext = null; + } + } + } + function readContext(context, observedBits) { + { + // This warning would fire if you read context inside a Hook like useMemo. + // Unlike the class check below, it's not enforced in production for perf. + !!isDisallowedContextReadInDEV + ? warning$1( + false, + 'Context can only be read while React is rendering. ' + + 'In classes, you can read it in the render method or getDerivedStateFromProps. ' + + 'In function components, you can read it directly in the function body, but not ' + + 'inside Hooks like useReducer() or useMemo().', + ) + : void 0; + } + + if (lastContextWithAllBitsObserved === context) { + // Nothing to do. We already observe everything in this context. + } else if (observedBits === false || observedBits === 0) { + // Do not observe any updates. + } else { + var resolvedObservedBits; // Avoid deopting on observable arguments or heterogeneous types. + + if (typeof observedBits !== 'number' || observedBits === MAX_SIGNED_31_BIT_INT) { + // Observe all updates. + lastContextWithAllBitsObserved = context; + resolvedObservedBits = MAX_SIGNED_31_BIT_INT; + } else { + resolvedObservedBits = observedBits; + } + + var contextItem = { + context: context, + observedBits: resolvedObservedBits, + next: null, + }; + + if (lastContextDependency === null) { + if (!(currentlyRenderingFiber !== null)) { + { + throw Error( + 'Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().', + ); + } + } // This is the first dependency for this component. Create a new list. + + lastContextDependency = contextItem; + currentlyRenderingFiber.dependencies = { + expirationTime: NoWork, + firstContext: contextItem, + responders: null, + }; + } else { + // Append a new context item. + lastContextDependency = lastContextDependency.next = contextItem; + } + } + + return isPrimaryRenderer ? context._currentValue : context._currentValue2; + } + + // UpdateQueue is a linked list of prioritized updates. + // + // Like fibers, update queues come in pairs: a current queue, which represents + // the visible state of the screen, and a work-in-progress queue, which can be + // mutated and processed asynchronously before it is committed — a form of + // double buffering. If a work-in-progress render is discarded before finishing, + // we create a new work-in-progress by cloning the current queue. + // + // Both queues share a persistent, singly-linked list structure. To schedule an + // update, we append it to the end of both queues. Each queue maintains a + // pointer to first update in the persistent list that hasn't been processed. + // The work-in-progress pointer always has a position equal to or greater than + // the current queue, since we always work on that one. The current queue's + // pointer is only updated during the commit phase, when we swap in the + // work-in-progress. + // + // For example: + // + // Current pointer: A - B - C - D - E - F + // Work-in-progress pointer: D - E - F + // ^ + // The work-in-progress queue has + // processed more updates than current. + // + // The reason we append to both queues is because otherwise we might drop + // updates without ever processing them. For example, if we only add updates to + // the work-in-progress queue, some updates could be lost whenever a work-in + // -progress render restarts by cloning from current. Similarly, if we only add + // updates to the current queue, the updates will be lost whenever an already + // in-progress queue commits and swaps with the current queue. However, by + // adding to both queues, we guarantee that the update will be part of the next + // work-in-progress. (And because the work-in-progress queue becomes the + // current queue once it commits, there's no danger of applying the same + // update twice.) + // + // Prioritization + // -------------- + // + // Updates are not sorted by priority, but by insertion; new updates are always + // appended to the end of the list. + // + // The priority is still important, though. When processing the update queue + // during the render phase, only the updates with sufficient priority are + // included in the result. If we skip an update because it has insufficient + // priority, it remains in the queue to be processed later, during a lower + // priority render. Crucially, all updates subsequent to a skipped update also + // remain in the queue *regardless of their priority*. That means high priority + // updates are sometimes processed twice, at two separate priorities. We also + // keep track of a base state, that represents the state before the first + // update in the queue is applied. + // + // For example: + // + // Given a base state of '', and the following queue of updates + // + // A1 - B2 - C1 - D2 + // + // where the number indicates the priority, and the update is applied to the + // previous state by appending a letter, React will process these updates as + // two separate renders, one per distinct priority level: + // + // First render, at priority 1: + // Base state: '' + // Updates: [A1, C1] + // Result state: 'AC' + // + // Second render, at priority 2: + // Base state: 'A' <- The base state does not include C1, + // because B2 was skipped. + // Updates: [B2, C1, D2] <- C1 was rebased on top of B2 + // Result state: 'ABCD' + // + // Because we process updates in insertion order, and rebase high priority + // updates when preceding updates are skipped, the final result is deterministic + // regardless of priority. Intermediate state may vary according to system + // resources, but the final state is always the same. + var UpdateState = 0; + var ReplaceState = 1; + var ForceUpdate = 2; + var CaptureUpdate = 3; // Global state that is reset at the beginning of calling `processUpdateQueue`. + // It should only be read right after calling `processUpdateQueue`, via + // `checkHasForceUpdateAfterProcessing`. + + var hasForceUpdate = false; + var didWarnUpdateInsideUpdate; + var currentlyProcessingQueue; + + { + didWarnUpdateInsideUpdate = false; + currentlyProcessingQueue = null; + } + + function createUpdateQueue(baseState) { + var queue = { + baseState: baseState, + firstUpdate: null, + lastUpdate: null, + firstCapturedUpdate: null, + lastCapturedUpdate: null, + firstEffect: null, + lastEffect: null, + firstCapturedEffect: null, + lastCapturedEffect: null, + }; + return queue; + } + + function cloneUpdateQueue(currentQueue) { + var queue = { + baseState: currentQueue.baseState, + firstUpdate: currentQueue.firstUpdate, + lastUpdate: currentQueue.lastUpdate, + // TODO: With resuming, if we bail out and resuse the child tree, we should + // keep these effects. + firstCapturedUpdate: null, + lastCapturedUpdate: null, + firstEffect: null, + lastEffect: null, + firstCapturedEffect: null, + lastCapturedEffect: null, + }; + return queue; + } + + function createUpdate(expirationTime, suspenseConfig) { + var update = { + expirationTime: expirationTime, + suspenseConfig: suspenseConfig, + tag: UpdateState, + payload: null, + callback: null, + next: null, + nextEffect: null, + }; + + { + update.priority = getCurrentPriorityLevel(); + } + + return update; + } + + function appendUpdateToQueue(queue, update) { + // Append the update to the end of the list. + if (queue.lastUpdate === null) { + // Queue is empty + queue.firstUpdate = queue.lastUpdate = update; + } else { + queue.lastUpdate.next = update; + queue.lastUpdate = update; + } + } + + function enqueueUpdate(fiber, update) { + // Update queues are created lazily. + var alternate = fiber.alternate; + var queue1; + var queue2; + + if (alternate === null) { + // There's only one fiber. + queue1 = fiber.updateQueue; + queue2 = null; + + if (queue1 === null) { + queue1 = fiber.updateQueue = createUpdateQueue(fiber.memoizedState); + } + } else { + // There are two owners. + queue1 = fiber.updateQueue; + queue2 = alternate.updateQueue; + + if (queue1 === null) { + if (queue2 === null) { + // Neither fiber has an update queue. Create new ones. + queue1 = fiber.updateQueue = createUpdateQueue(fiber.memoizedState); + queue2 = alternate.updateQueue = createUpdateQueue(alternate.memoizedState); + } else { + // Only one fiber has an update queue. Clone to create a new one. + queue1 = fiber.updateQueue = cloneUpdateQueue(queue2); + } + } else { + if (queue2 === null) { + // Only one fiber has an update queue. Clone to create a new one. + queue2 = alternate.updateQueue = cloneUpdateQueue(queue1); + } else { + // Both owners have an update queue. + } + } + } + + if (queue2 === null || queue1 === queue2) { + // There's only a single queue. + appendUpdateToQueue(queue1, update); + } else { + // There are two queues. We need to append the update to both queues, + // while accounting for the persistent structure of the list — we don't + // want the same update to be added multiple times. + if (queue1.lastUpdate === null || queue2.lastUpdate === null) { + // One of the queues is not empty. We must add the update to both queues. + appendUpdateToQueue(queue1, update); + appendUpdateToQueue(queue2, update); + } else { + // Both queues are non-empty. The last update is the same in both lists, + // because of structural sharing. So, only append to one of the lists. + appendUpdateToQueue(queue1, update); // But we still need to update the `lastUpdate` pointer of queue2. + + queue2.lastUpdate = update; + } + } + + { + if ( + fiber.tag === ClassComponent && + (currentlyProcessingQueue === queue1 || + (queue2 !== null && currentlyProcessingQueue === queue2)) && + !didWarnUpdateInsideUpdate + ) { + warningWithoutStack$1( + false, + 'An update (setState, replaceState, or forceUpdate) was scheduled ' + + 'from inside an update function. Update functions should be pure, ' + + 'with zero side-effects. Consider using componentDidUpdate or a ' + + 'callback.', + ); + didWarnUpdateInsideUpdate = true; + } + } + } + function enqueueCapturedUpdate(workInProgress, update) { + // Captured updates go into a separate list, and only on the work-in- + // progress queue. + var workInProgressQueue = workInProgress.updateQueue; + + if (workInProgressQueue === null) { + workInProgressQueue = workInProgress.updateQueue = createUpdateQueue( + workInProgress.memoizedState, + ); + } else { + // TODO: I put this here rather than createWorkInProgress so that we don't + // clone the queue unnecessarily. There's probably a better way to + // structure this. + workInProgressQueue = ensureWorkInProgressQueueIsAClone(workInProgress, workInProgressQueue); + } // Append the update to the end of the list. + + if (workInProgressQueue.lastCapturedUpdate === null) { + // This is the first render phase update + workInProgressQueue.firstCapturedUpdate = workInProgressQueue.lastCapturedUpdate = update; + } else { + workInProgressQueue.lastCapturedUpdate.next = update; + workInProgressQueue.lastCapturedUpdate = update; + } + } + + function ensureWorkInProgressQueueIsAClone(workInProgress, queue) { + var current = workInProgress.alternate; + + if (current !== null) { + // If the work-in-progress queue is equal to the current queue, + // we need to clone it first. + if (queue === current.updateQueue) { + queue = workInProgress.updateQueue = cloneUpdateQueue(queue); + } + } + + return queue; + } + + function getStateFromUpdate(workInProgress, queue, update, prevState, nextProps, instance) { + switch (update.tag) { + case ReplaceState: { + var payload = update.payload; + + if (typeof payload === 'function') { + // Updater function + { + enterDisallowedContextReadInDEV(); + + if (debugRenderPhaseSideEffectsForStrictMode && workInProgress.mode & StrictMode) { + payload.call(instance, prevState, nextProps); + } + } + + var nextState = payload.call(instance, prevState, nextProps); + + { + exitDisallowedContextReadInDEV(); + } + + return nextState; + } // State object + + return payload; + } + + case CaptureUpdate: { + workInProgress.effectTag = (workInProgress.effectTag & ~ShouldCapture) | DidCapture; + } + // Intentional fallthrough + + case UpdateState: { + var _payload = update.payload; + var partialState; + + if (typeof _payload === 'function') { + // Updater function + { + enterDisallowedContextReadInDEV(); + + if (debugRenderPhaseSideEffectsForStrictMode && workInProgress.mode & StrictMode) { + _payload.call(instance, prevState, nextProps); + } + } + + partialState = _payload.call(instance, prevState, nextProps); + + { + exitDisallowedContextReadInDEV(); + } + } else { + // Partial state object + partialState = _payload; + } + + if (partialState === null || partialState === undefined) { + // Null and undefined are treated as no-ops. + return prevState; + } // Merge the partial state and the previous state. + + return _assign({}, prevState, partialState); + } + + case ForceUpdate: { + hasForceUpdate = true; + return prevState; + } + } + + return prevState; + } + + function processUpdateQueue(workInProgress, queue, props, instance, renderExpirationTime) { + hasForceUpdate = false; + queue = ensureWorkInProgressQueueIsAClone(workInProgress, queue); + + { + currentlyProcessingQueue = queue; + } // These values may change as we process the queue. + + var newBaseState = queue.baseState; + var newFirstUpdate = null; + var newExpirationTime = NoWork; // Iterate through the list of updates to compute the result. + + var update = queue.firstUpdate; + var resultState = newBaseState; + + while (update !== null) { + var updateExpirationTime = update.expirationTime; + + if (updateExpirationTime < renderExpirationTime) { + // This update does not have sufficient priority. Skip it. + if (newFirstUpdate === null) { + // This is the first skipped update. It will be the first update in + // the new list. + newFirstUpdate = update; // Since this is the first update that was skipped, the current result + // is the new base state. + + newBaseState = resultState; + } // Since this update will remain in the list, update the remaining + // expiration time. + + if (newExpirationTime < updateExpirationTime) { + newExpirationTime = updateExpirationTime; + } + } else { + // This update does have sufficient priority. + // Mark the event time of this update as relevant to this render pass. + // TODO: This should ideally use the true event time of this update rather than + // its priority which is a derived and not reverseable value. + // TODO: We should skip this update if it was already committed but currently + // we have no way of detecting the difference between a committed and suspended + // update here. + markRenderEventTimeAndConfig(updateExpirationTime, update.suspenseConfig); // Process it and compute a new result. + + resultState = getStateFromUpdate(workInProgress, queue, update, resultState, props, instance); + var callback = update.callback; + + if (callback !== null) { + workInProgress.effectTag |= Callback; // Set this to null, in case it was mutated during an aborted render. + + update.nextEffect = null; + + if (queue.lastEffect === null) { + queue.firstEffect = queue.lastEffect = update; + } else { + queue.lastEffect.nextEffect = update; + queue.lastEffect = update; + } + } + } // Continue to the next update. + + update = update.next; + } // Separately, iterate though the list of captured updates. + + var newFirstCapturedUpdate = null; + update = queue.firstCapturedUpdate; + + while (update !== null) { + var _updateExpirationTime = update.expirationTime; + + if (_updateExpirationTime < renderExpirationTime) { + // This update does not have sufficient priority. Skip it. + if (newFirstCapturedUpdate === null) { + // This is the first skipped captured update. It will be the first + // update in the new list. + newFirstCapturedUpdate = update; // If this is the first update that was skipped, the current result is + // the new base state. + + if (newFirstUpdate === null) { + newBaseState = resultState; + } + } // Since this update will remain in the list, update the remaining + // expiration time. + + if (newExpirationTime < _updateExpirationTime) { + newExpirationTime = _updateExpirationTime; + } + } else { + // This update does have sufficient priority. Process it and compute + // a new result. + resultState = getStateFromUpdate(workInProgress, queue, update, resultState, props, instance); + var _callback = update.callback; + + if (_callback !== null) { + workInProgress.effectTag |= Callback; // Set this to null, in case it was mutated during an aborted render. + + update.nextEffect = null; + + if (queue.lastCapturedEffect === null) { + queue.firstCapturedEffect = queue.lastCapturedEffect = update; + } else { + queue.lastCapturedEffect.nextEffect = update; + queue.lastCapturedEffect = update; + } + } + } + + update = update.next; + } + + if (newFirstUpdate === null) { + queue.lastUpdate = null; + } + + if (newFirstCapturedUpdate === null) { + queue.lastCapturedUpdate = null; + } else { + workInProgress.effectTag |= Callback; + } + + if (newFirstUpdate === null && newFirstCapturedUpdate === null) { + // We processed every update, without skipping. That means the new base + // state is the same as the result state. + newBaseState = resultState; + } + + queue.baseState = newBaseState; + queue.firstUpdate = newFirstUpdate; + queue.firstCapturedUpdate = newFirstCapturedUpdate; // Set the remaining expiration time to be whatever is remaining in the queue. + // This should be fine because the only two other things that contribute to + // expiration time are props and context. We're already in the middle of the + // begin phase by the time we start processing the queue, so we've already + // dealt with the props. Context in components that specify + // shouldComponentUpdate is tricky; but we'll have to account for + // that regardless. + + markUnprocessedUpdateTime(newExpirationTime); + workInProgress.expirationTime = newExpirationTime; + workInProgress.memoizedState = resultState; + + { + currentlyProcessingQueue = null; + } + } + + function callCallback(callback, context) { + if (!(typeof callback === 'function')) { + { + throw Error( + 'Invalid argument passed as callback. Expected a function. Instead received: ' + callback, + ); + } + } + + callback.call(context); + } + + function resetHasForceUpdateBeforeProcessing() { + hasForceUpdate = false; + } + function checkHasForceUpdateAfterProcessing() { + return hasForceUpdate; + } + function commitUpdateQueue(finishedWork, finishedQueue, instance, renderExpirationTime) { + // If the finished render included captured updates, and there are still + // lower priority updates left over, we need to keep the captured updates + // in the queue so that they are rebased and not dropped once we process the + // queue again at the lower priority. + if (finishedQueue.firstCapturedUpdate !== null) { + // Join the captured update list to the end of the normal list. + if (finishedQueue.lastUpdate !== null) { + finishedQueue.lastUpdate.next = finishedQueue.firstCapturedUpdate; + finishedQueue.lastUpdate = finishedQueue.lastCapturedUpdate; + } // Clear the list of captured updates. + + finishedQueue.firstCapturedUpdate = finishedQueue.lastCapturedUpdate = null; + } // Commit the effects + + commitUpdateEffects(finishedQueue.firstEffect, instance); + finishedQueue.firstEffect = finishedQueue.lastEffect = null; + commitUpdateEffects(finishedQueue.firstCapturedEffect, instance); + finishedQueue.firstCapturedEffect = finishedQueue.lastCapturedEffect = null; + } + + function commitUpdateEffects(effect, instance) { + while (effect !== null) { + var callback = effect.callback; + + if (callback !== null) { + effect.callback = null; + callCallback(callback, instance); + } + + effect = effect.nextEffect; + } + } + + var ReactCurrentBatchConfig = ReactSharedInternals.ReactCurrentBatchConfig; + function requestCurrentSuspenseConfig() { + return ReactCurrentBatchConfig.suspense; + } + + var fakeInternalInstance = {}; + var isArray$1 = Array.isArray; // React.Component uses a shared frozen object by default. + // We'll use it to determine whether we need to initialize legacy refs. + + var emptyRefsObject = new React.Component().refs; + var didWarnAboutStateAssignmentForComponent; + var didWarnAboutUninitializedState; + var didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate; + var didWarnAboutLegacyLifecyclesAndDerivedState; + var didWarnAboutUndefinedDerivedState; + var warnOnUndefinedDerivedState; + var warnOnInvalidCallback$1; + var didWarnAboutDirectlyAssigningPropsToState; + var didWarnAboutContextTypeAndContextTypes; + var didWarnAboutInvalidateContextType; + + { + didWarnAboutStateAssignmentForComponent = new Set(); + didWarnAboutUninitializedState = new Set(); + didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate = new Set(); + didWarnAboutLegacyLifecyclesAndDerivedState = new Set(); + didWarnAboutDirectlyAssigningPropsToState = new Set(); + didWarnAboutUndefinedDerivedState = new Set(); + didWarnAboutContextTypeAndContextTypes = new Set(); + didWarnAboutInvalidateContextType = new Set(); + var didWarnOnInvalidCallback = new Set(); + + warnOnInvalidCallback$1 = function (callback, callerName) { + if (callback === null || typeof callback === 'function') { + return; + } + + var key = callerName + '_' + callback; + + if (!didWarnOnInvalidCallback.has(key)) { + didWarnOnInvalidCallback.add(key); + warningWithoutStack$1( + false, + '%s(...): Expected the last optional `callback` argument to be a ' + + 'function. Instead received: %s.', + callerName, + callback, + ); + } + }; + + warnOnUndefinedDerivedState = function (type, partialState) { + if (partialState === undefined) { + var componentName = getComponentName(type) || 'Component'; + + if (!didWarnAboutUndefinedDerivedState.has(componentName)) { + didWarnAboutUndefinedDerivedState.add(componentName); + warningWithoutStack$1( + false, + '%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. ' + + 'You have returned undefined.', + componentName, + ); + } + } + }; // This is so gross but it's at least non-critical and can be removed if + // it causes problems. This is meant to give a nicer error message for + // ReactDOM15.unstable_renderSubtreeIntoContainer(reactDOM16Component, + // ...)) which otherwise throws a "_processChildContext is not a function" + // exception. + + Object.defineProperty(fakeInternalInstance, '_processChildContext', { + enumerable: false, + value: function () { + { + { + throw Error( + "_processChildContext is not available in React 16+. This likely means you have multiple copies of React and are attempting to nest a React 15 tree inside a React 16 tree using unstable_renderSubtreeIntoContainer, which isn't supported. Try to make sure you have only one copy of React (and ideally, switch to ReactDOM.createPortal).", + ); + } + } + }, + }); + Object.freeze(fakeInternalInstance); + } + + function applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, nextProps) { + var prevState = workInProgress.memoizedState; + + { + if (debugRenderPhaseSideEffectsForStrictMode && workInProgress.mode & StrictMode) { + // Invoke the function an extra time to help detect side-effects. + getDerivedStateFromProps(nextProps, prevState); + } + } + + var partialState = getDerivedStateFromProps(nextProps, prevState); + + { + warnOnUndefinedDerivedState(ctor, partialState); + } // Merge the partial state and the previous state. + + var memoizedState = + partialState === null || partialState === undefined + ? prevState + : _assign({}, prevState, partialState); + workInProgress.memoizedState = memoizedState; // Once the update queue is empty, persist the derived state onto the + // base state. + + var updateQueue = workInProgress.updateQueue; + + if (updateQueue !== null && workInProgress.expirationTime === NoWork) { + updateQueue.baseState = memoizedState; + } + } + var classComponentUpdater = { + isMounted: isMounted, + enqueueSetState: function (inst, payload, callback) { + var fiber = get(inst); + var currentTime = requestCurrentTimeForUpdate(); + var suspenseConfig = requestCurrentSuspenseConfig(); + var expirationTime = computeExpirationForFiber(currentTime, fiber, suspenseConfig); + var update = createUpdate(expirationTime, suspenseConfig); + update.payload = payload; + + if (callback !== undefined && callback !== null) { + { + warnOnInvalidCallback$1(callback, 'setState'); + } + + update.callback = callback; + } + + enqueueUpdate(fiber, update); + scheduleWork(fiber, expirationTime); + }, + enqueueReplaceState: function (inst, payload, callback) { + var fiber = get(inst); + var currentTime = requestCurrentTimeForUpdate(); + var suspenseConfig = requestCurrentSuspenseConfig(); + var expirationTime = computeExpirationForFiber(currentTime, fiber, suspenseConfig); + var update = createUpdate(expirationTime, suspenseConfig); + update.tag = ReplaceState; + update.payload = payload; + + if (callback !== undefined && callback !== null) { + { + warnOnInvalidCallback$1(callback, 'replaceState'); + } + + update.callback = callback; + } + + enqueueUpdate(fiber, update); + scheduleWork(fiber, expirationTime); + }, + enqueueForceUpdate: function (inst, callback) { + var fiber = get(inst); + var currentTime = requestCurrentTimeForUpdate(); + var suspenseConfig = requestCurrentSuspenseConfig(); + var expirationTime = computeExpirationForFiber(currentTime, fiber, suspenseConfig); + var update = createUpdate(expirationTime, suspenseConfig); + update.tag = ForceUpdate; + + if (callback !== undefined && callback !== null) { + { + warnOnInvalidCallback$1(callback, 'forceUpdate'); + } + + update.callback = callback; + } + + enqueueUpdate(fiber, update); + scheduleWork(fiber, expirationTime); + }, + }; + + function checkShouldComponentUpdate( + workInProgress, + ctor, + oldProps, + newProps, + oldState, + newState, + nextContext, + ) { + var instance = workInProgress.stateNode; + + if (typeof instance.shouldComponentUpdate === 'function') { + startPhaseTimer(workInProgress, 'shouldComponentUpdate'); + var shouldUpdate = instance.shouldComponentUpdate(newProps, newState, nextContext); + stopPhaseTimer(); + + { + !(shouldUpdate !== undefined) + ? warningWithoutStack$1( + false, + '%s.shouldComponentUpdate(): Returned undefined instead of a ' + + 'boolean value. Make sure to return true or false.', + getComponentName(ctor) || 'Component', + ) + : void 0; + } + + return shouldUpdate; + } + + if (ctor.prototype && ctor.prototype.isPureReactComponent) { + return !shallowEqual(oldProps, newProps) || !shallowEqual(oldState, newState); + } + + return true; + } + + function checkClassInstance(workInProgress, ctor, newProps) { + var instance = workInProgress.stateNode; + + { + var name = getComponentName(ctor) || 'Component'; + var renderPresent = instance.render; + + if (!renderPresent) { + if (ctor.prototype && typeof ctor.prototype.render === 'function') { + warningWithoutStack$1( + false, + '%s(...): No `render` method found on the returned component ' + + 'instance: did you accidentally return an object from the constructor?', + name, + ); + } else { + warningWithoutStack$1( + false, + '%s(...): No `render` method found on the returned component ' + + 'instance: you may have forgotten to define `render`.', + name, + ); + } + } + + var noGetInitialStateOnES6 = + !instance.getInitialState || instance.getInitialState.isReactClassApproved || instance.state; + !noGetInitialStateOnES6 + ? warningWithoutStack$1( + false, + 'getInitialState was defined on %s, a plain JavaScript class. ' + + 'This is only supported for classes created using React.createClass. ' + + 'Did you mean to define a state property instead?', + name, + ) + : void 0; + var noGetDefaultPropsOnES6 = + !instance.getDefaultProps || instance.getDefaultProps.isReactClassApproved; + !noGetDefaultPropsOnES6 + ? warningWithoutStack$1( + false, + 'getDefaultProps was defined on %s, a plain JavaScript class. ' + + 'This is only supported for classes created using React.createClass. ' + + 'Use a static property to define defaultProps instead.', + name, + ) + : void 0; + var noInstancePropTypes = !instance.propTypes; + !noInstancePropTypes + ? warningWithoutStack$1( + false, + 'propTypes was defined as an instance property on %s. Use a static ' + + 'property to define propTypes instead.', + name, + ) + : void 0; + var noInstanceContextType = !instance.contextType; + !noInstanceContextType + ? warningWithoutStack$1( + false, + 'contextType was defined as an instance property on %s. Use a static ' + + 'property to define contextType instead.', + name, + ) + : void 0; + + if (disableLegacyContext) { + if (ctor.childContextTypes) { + warningWithoutStack$1( + false, + '%s uses the legacy childContextTypes API which is no longer supported. ' + + 'Use React.createContext() instead.', + name, + ); + } + + if (ctor.contextTypes) { + warningWithoutStack$1( + false, + '%s uses the legacy contextTypes API which is no longer supported. ' + + 'Use React.createContext() with static contextType instead.', + name, + ); + } + } else { + var noInstanceContextTypes = !instance.contextTypes; + !noInstanceContextTypes + ? warningWithoutStack$1( + false, + 'contextTypes was defined as an instance property on %s. Use a static ' + + 'property to define contextTypes instead.', + name, + ) + : void 0; + + if ( + ctor.contextType && + ctor.contextTypes && + !didWarnAboutContextTypeAndContextTypes.has(ctor) + ) { + didWarnAboutContextTypeAndContextTypes.add(ctor); + warningWithoutStack$1( + false, + '%s declares both contextTypes and contextType static properties. ' + + 'The legacy contextTypes property will be ignored.', + name, + ); + } + } + + var noComponentShouldUpdate = typeof instance.componentShouldUpdate !== 'function'; + !noComponentShouldUpdate + ? warningWithoutStack$1( + false, + '%s has a method called ' + + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + + 'The name is phrased as a question because the function is ' + + 'expected to return a value.', + name, + ) + : void 0; + + if ( + ctor.prototype && + ctor.prototype.isPureReactComponent && + typeof instance.shouldComponentUpdate !== 'undefined' + ) { + warningWithoutStack$1( + false, + '%s has a method called shouldComponentUpdate(). ' + + 'shouldComponentUpdate should not be used when extending React.PureComponent. ' + + 'Please extend React.Component if shouldComponentUpdate is used.', + getComponentName(ctor) || 'A pure component', + ); + } + + var noComponentDidUnmount = typeof instance.componentDidUnmount !== 'function'; + !noComponentDidUnmount + ? warningWithoutStack$1( + false, + '%s has a method called ' + + 'componentDidUnmount(). But there is no such lifecycle method. ' + + 'Did you mean componentWillUnmount()?', + name, + ) + : void 0; + var noComponentDidReceiveProps = typeof instance.componentDidReceiveProps !== 'function'; + !noComponentDidReceiveProps + ? warningWithoutStack$1( + false, + '%s has a method called ' + + 'componentDidReceiveProps(). But there is no such lifecycle method. ' + + 'If you meant to update the state in response to changing props, ' + + 'use componentWillReceiveProps(). If you meant to fetch data or ' + + 'run side-effects or mutations after React has updated the UI, use componentDidUpdate().', + name, + ) + : void 0; + var noComponentWillRecieveProps = typeof instance.componentWillRecieveProps !== 'function'; + !noComponentWillRecieveProps + ? warningWithoutStack$1( + false, + '%s has a method called ' + + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', + name, + ) + : void 0; + var noUnsafeComponentWillRecieveProps = + typeof instance.UNSAFE_componentWillRecieveProps !== 'function'; + !noUnsafeComponentWillRecieveProps + ? warningWithoutStack$1( + false, + '%s has a method called ' + + 'UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?', + name, + ) + : void 0; + var hasMutatedProps = instance.props !== newProps; + !(instance.props === undefined || !hasMutatedProps) + ? warningWithoutStack$1( + false, + '%s(...): When calling super() in `%s`, make sure to pass ' + + "up the same props that your component's constructor was passed.", + name, + name, + ) + : void 0; + var noInstanceDefaultProps = !instance.defaultProps; + !noInstanceDefaultProps + ? warningWithoutStack$1( + false, + 'Setting defaultProps as an instance property on %s is not supported and will be ignored.' + + ' Instead, define defaultProps as a static property on %s.', + name, + name, + ) + : void 0; + + if ( + typeof instance.getSnapshotBeforeUpdate === 'function' && + typeof instance.componentDidUpdate !== 'function' && + !didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.has(ctor) + ) { + didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.add(ctor); + warningWithoutStack$1( + false, + '%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). ' + + 'This component defines getSnapshotBeforeUpdate() only.', + getComponentName(ctor), + ); + } + + var noInstanceGetDerivedStateFromProps = + typeof instance.getDerivedStateFromProps !== 'function'; + !noInstanceGetDerivedStateFromProps + ? warningWithoutStack$1( + false, + '%s: getDerivedStateFromProps() is defined as an instance method ' + + 'and will be ignored. Instead, declare it as a static method.', + name, + ) + : void 0; + var noInstanceGetDerivedStateFromCatch = + typeof instance.getDerivedStateFromError !== 'function'; + !noInstanceGetDerivedStateFromCatch + ? warningWithoutStack$1( + false, + '%s: getDerivedStateFromError() is defined as an instance method ' + + 'and will be ignored. Instead, declare it as a static method.', + name, + ) + : void 0; + var noStaticGetSnapshotBeforeUpdate = typeof ctor.getSnapshotBeforeUpdate !== 'function'; + !noStaticGetSnapshotBeforeUpdate + ? warningWithoutStack$1( + false, + '%s: getSnapshotBeforeUpdate() is defined as a static method ' + + 'and will be ignored. Instead, declare it as an instance method.', + name, + ) + : void 0; + var _state = instance.state; + + if (_state && (typeof _state !== 'object' || isArray$1(_state))) { + warningWithoutStack$1(false, '%s.state: must be set to an object or null', name); + } + + if (typeof instance.getChildContext === 'function') { + !(typeof ctor.childContextTypes === 'object') + ? warningWithoutStack$1( + false, + '%s.getChildContext(): childContextTypes must be defined in order to ' + + 'use getChildContext().', + name, + ) + : void 0; + } + } + } + + function adoptClassInstance(workInProgress, instance) { + instance.updater = classComponentUpdater; + workInProgress.stateNode = instance; // The instance needs access to the fiber so that it can schedule updates + + set(instance, workInProgress); + + { + instance._reactInternalInstance = fakeInternalInstance; + } + } + + function constructClassInstance(workInProgress, ctor, props, renderExpirationTime) { + var isLegacyContextConsumer = false; + var unmaskedContext = emptyContextObject; + var context = emptyContextObject; + var contextType = ctor.contextType; + + { + if ('contextType' in ctor) { + var isValid = // Allow null for conditional declaration + contextType === null || + (contextType !== undefined && + contextType.$$typeof === REACT_CONTEXT_TYPE && + contextType._context === undefined); // Not a <Context.Consumer> + + if (!isValid && !didWarnAboutInvalidateContextType.has(ctor)) { + didWarnAboutInvalidateContextType.add(ctor); + var addendum = ''; + + if (contextType === undefined) { + addendum = + ' However, it is set to undefined. ' + + 'This can be caused by a typo or by mixing up named and default imports. ' + + 'This can also happen due to a circular dependency, so ' + + 'try moving the createContext() call to a separate file.'; + } else if (typeof contextType !== 'object') { + addendum = ' However, it is set to a ' + typeof contextType + '.'; + } else if (contextType.$$typeof === REACT_PROVIDER_TYPE) { + addendum = ' Did you accidentally pass the Context.Provider instead?'; + } else if (contextType._context !== undefined) { + // <Context.Consumer> + addendum = ' Did you accidentally pass the Context.Consumer instead?'; + } else { + addendum = + ' However, it is set to an object with keys {' + + Object.keys(contextType).join(', ') + + '}.'; + } + + warningWithoutStack$1( + false, + '%s defines an invalid contextType. ' + + 'contextType should point to the Context object returned by React.createContext().%s', + getComponentName(ctor) || 'Component', + addendum, + ); + } + } + } + + if (typeof contextType === 'object' && contextType !== null) { + context = readContext(contextType); + } else if (!disableLegacyContext) { + unmaskedContext = getUnmaskedContext(workInProgress, ctor, true); + var contextTypes = ctor.contextTypes; + isLegacyContextConsumer = contextTypes !== null && contextTypes !== undefined; + context = isLegacyContextConsumer + ? getMaskedContext(workInProgress, unmaskedContext) + : emptyContextObject; + } // Instantiate twice to help detect side-effects. + + { + if (debugRenderPhaseSideEffectsForStrictMode && workInProgress.mode & StrictMode) { + new ctor(props, context); // eslint-disable-line no-new + } + } + + var instance = new ctor(props, context); + var state = (workInProgress.memoizedState = + instance.state !== null && instance.state !== undefined ? instance.state : null); + adoptClassInstance(workInProgress, instance); + + { + if (typeof ctor.getDerivedStateFromProps === 'function' && state === null) { + var componentName = getComponentName(ctor) || 'Component'; + + if (!didWarnAboutUninitializedState.has(componentName)) { + didWarnAboutUninitializedState.add(componentName); + warningWithoutStack$1( + false, + '`%s` uses `getDerivedStateFromProps` but its initial state is ' + + '%s. This is not recommended. Instead, define the initial state by ' + + 'assigning an object to `this.state` in the constructor of `%s`. ' + + 'This ensures that `getDerivedStateFromProps` arguments have a consistent shape.', + componentName, + instance.state === null ? 'null' : 'undefined', + componentName, + ); + } + } // If new component APIs are defined, "unsafe" lifecycles won't be called. + // Warn about these lifecycles if they are present. + // Don't warn about react-lifecycles-compat polyfilled methods though. + + if ( + typeof ctor.getDerivedStateFromProps === 'function' || + typeof instance.getSnapshotBeforeUpdate === 'function' + ) { + var foundWillMountName = null; + var foundWillReceivePropsName = null; + var foundWillUpdateName = null; + + if ( + typeof instance.componentWillMount === 'function' && + instance.componentWillMount.__suppressDeprecationWarning !== true + ) { + foundWillMountName = 'componentWillMount'; + } else if (typeof instance.UNSAFE_componentWillMount === 'function') { + foundWillMountName = 'UNSAFE_componentWillMount'; + } + + if ( + typeof instance.componentWillReceiveProps === 'function' && + instance.componentWillReceiveProps.__suppressDeprecationWarning !== true + ) { + foundWillReceivePropsName = 'componentWillReceiveProps'; + } else if (typeof instance.UNSAFE_componentWillReceiveProps === 'function') { + foundWillReceivePropsName = 'UNSAFE_componentWillReceiveProps'; + } + + if ( + typeof instance.componentWillUpdate === 'function' && + instance.componentWillUpdate.__suppressDeprecationWarning !== true + ) { + foundWillUpdateName = 'componentWillUpdate'; + } else if (typeof instance.UNSAFE_componentWillUpdate === 'function') { + foundWillUpdateName = 'UNSAFE_componentWillUpdate'; + } + + if ( + foundWillMountName !== null || + foundWillReceivePropsName !== null || + foundWillUpdateName !== null + ) { + var _componentName = getComponentName(ctor) || 'Component'; + + var newApiName = + typeof ctor.getDerivedStateFromProps === 'function' + ? 'getDerivedStateFromProps()' + : 'getSnapshotBeforeUpdate()'; + + if (!didWarnAboutLegacyLifecyclesAndDerivedState.has(_componentName)) { + didWarnAboutLegacyLifecyclesAndDerivedState.add(_componentName); + warningWithoutStack$1( + false, + 'Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n' + + '%s uses %s but also contains the following legacy lifecycles:%s%s%s\n\n' + + 'The above lifecycles should be removed. Learn more about this warning here:\n' + + 'https://fb.me/react-unsafe-component-lifecycles', + _componentName, + newApiName, + foundWillMountName !== null ? '\n ' + foundWillMountName : '', + foundWillReceivePropsName !== null ? '\n ' + foundWillReceivePropsName : '', + foundWillUpdateName !== null ? '\n ' + foundWillUpdateName : '', + ); + } + } + } + } // Cache unmasked context so we can avoid recreating masked context unless necessary. + // ReactFiberContext usually updates this cache but can't for newly-created instances. + + if (isLegacyContextConsumer) { + cacheContext(workInProgress, unmaskedContext, context); + } + + return instance; + } + + function callComponentWillMount(workInProgress, instance) { + startPhaseTimer(workInProgress, 'componentWillMount'); + var oldState = instance.state; + + if (typeof instance.componentWillMount === 'function') { + instance.componentWillMount(); + } + + if (typeof instance.UNSAFE_componentWillMount === 'function') { + instance.UNSAFE_componentWillMount(); + } + + stopPhaseTimer(); + + if (oldState !== instance.state) { + { + warningWithoutStack$1( + false, + '%s.componentWillMount(): Assigning directly to this.state is ' + + "deprecated (except inside a component's " + + 'constructor). Use setState instead.', + getComponentName(workInProgress.type) || 'Component', + ); + } + + classComponentUpdater.enqueueReplaceState(instance, instance.state, null); + } + } + + function callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext) { + var oldState = instance.state; + startPhaseTimer(workInProgress, 'componentWillReceiveProps'); + + if (typeof instance.componentWillReceiveProps === 'function') { + instance.componentWillReceiveProps(newProps, nextContext); + } + + if (typeof instance.UNSAFE_componentWillReceiveProps === 'function') { + instance.UNSAFE_componentWillReceiveProps(newProps, nextContext); + } + + stopPhaseTimer(); + + if (instance.state !== oldState) { + { + var componentName = getComponentName(workInProgress.type) || 'Component'; + + if (!didWarnAboutStateAssignmentForComponent.has(componentName)) { + didWarnAboutStateAssignmentForComponent.add(componentName); + warningWithoutStack$1( + false, + '%s.componentWillReceiveProps(): Assigning directly to ' + + "this.state is deprecated (except inside a component's " + + 'constructor). Use setState instead.', + componentName, + ); + } + } + + classComponentUpdater.enqueueReplaceState(instance, instance.state, null); + } + } // Invokes the mount life-cycles on a previously never rendered instance. + + function mountClassInstance(workInProgress, ctor, newProps, renderExpirationTime) { + { + checkClassInstance(workInProgress, ctor, newProps); + } + + var instance = workInProgress.stateNode; + instance.props = newProps; + instance.state = workInProgress.memoizedState; + instance.refs = emptyRefsObject; + var contextType = ctor.contextType; + + if (typeof contextType === 'object' && contextType !== null) { + instance.context = readContext(contextType); + } else if (disableLegacyContext) { + instance.context = emptyContextObject; + } else { + var unmaskedContext = getUnmaskedContext(workInProgress, ctor, true); + instance.context = getMaskedContext(workInProgress, unmaskedContext); + } + + { + if (instance.state === newProps) { + var componentName = getComponentName(ctor) || 'Component'; + + if (!didWarnAboutDirectlyAssigningPropsToState.has(componentName)) { + didWarnAboutDirectlyAssigningPropsToState.add(componentName); + warningWithoutStack$1( + false, + '%s: It is not recommended to assign props directly to state ' + + "because updates to props won't be reflected in state. " + + 'In most cases, it is better to use props directly.', + componentName, + ); + } + } + + if (workInProgress.mode & StrictMode) { + ReactStrictModeWarnings.recordLegacyContextWarning(workInProgress, instance); + } + + if (warnAboutDeprecatedLifecycles) { + ReactStrictModeWarnings.recordUnsafeLifecycleWarnings(workInProgress, instance); + } + } + + var updateQueue = workInProgress.updateQueue; + + if (updateQueue !== null) { + processUpdateQueue(workInProgress, updateQueue, newProps, instance, renderExpirationTime); + instance.state = workInProgress.memoizedState; + } + + var getDerivedStateFromProps = ctor.getDerivedStateFromProps; + + if (typeof getDerivedStateFromProps === 'function') { + applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps); + instance.state = workInProgress.memoizedState; + } // In order to support react-lifecycles-compat polyfilled components, + // Unsafe lifecycles should not be invoked for components using the new APIs. + + if ( + typeof ctor.getDerivedStateFromProps !== 'function' && + typeof instance.getSnapshotBeforeUpdate !== 'function' && + (typeof instance.UNSAFE_componentWillMount === 'function' || + typeof instance.componentWillMount === 'function') + ) { + callComponentWillMount(workInProgress, instance); // If we had additional state updates during this life-cycle, let's + // process them now. + + updateQueue = workInProgress.updateQueue; + + if (updateQueue !== null) { + processUpdateQueue(workInProgress, updateQueue, newProps, instance, renderExpirationTime); + instance.state = workInProgress.memoizedState; + } + } + + if (typeof instance.componentDidMount === 'function') { + workInProgress.effectTag |= Update; + } + } + + function resumeMountClassInstance(workInProgress, ctor, newProps, renderExpirationTime) { + var instance = workInProgress.stateNode; + var oldProps = workInProgress.memoizedProps; + instance.props = oldProps; + var oldContext = instance.context; + var contextType = ctor.contextType; + var nextContext = emptyContextObject; + + if (typeof contextType === 'object' && contextType !== null) { + nextContext = readContext(contextType); + } else if (!disableLegacyContext) { + var nextLegacyUnmaskedContext = getUnmaskedContext(workInProgress, ctor, true); + nextContext = getMaskedContext(workInProgress, nextLegacyUnmaskedContext); + } + + var getDerivedStateFromProps = ctor.getDerivedStateFromProps; + var hasNewLifecycles = + typeof getDerivedStateFromProps === 'function' || + typeof instance.getSnapshotBeforeUpdate === 'function'; // Note: During these life-cycles, instance.props/instance.state are what + // ever the previously attempted to render - not the "current". However, + // during componentDidUpdate we pass the "current" props. + // In order to support react-lifecycles-compat polyfilled components, + // Unsafe lifecycles should not be invoked for components using the new APIs. + + if ( + !hasNewLifecycles && + (typeof instance.UNSAFE_componentWillReceiveProps === 'function' || + typeof instance.componentWillReceiveProps === 'function') + ) { + if (oldProps !== newProps || oldContext !== nextContext) { + callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext); + } + } + + resetHasForceUpdateBeforeProcessing(); + var oldState = workInProgress.memoizedState; + var newState = (instance.state = oldState); + var updateQueue = workInProgress.updateQueue; + + if (updateQueue !== null) { + processUpdateQueue(workInProgress, updateQueue, newProps, instance, renderExpirationTime); + newState = workInProgress.memoizedState; + } + + if ( + oldProps === newProps && + oldState === newState && + !hasContextChanged() && + !checkHasForceUpdateAfterProcessing() + ) { + // If an update was already in progress, we should schedule an Update + // effect even though we're bailing out, so that cWU/cDU are called. + if (typeof instance.componentDidMount === 'function') { + workInProgress.effectTag |= Update; + } + + return false; + } + + if (typeof getDerivedStateFromProps === 'function') { + applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps); + newState = workInProgress.memoizedState; + } + + var shouldUpdate = + checkHasForceUpdateAfterProcessing() || + checkShouldComponentUpdate( + workInProgress, + ctor, + oldProps, + newProps, + oldState, + newState, + nextContext, + ); + + if (shouldUpdate) { + // In order to support react-lifecycles-compat polyfilled components, + // Unsafe lifecycles should not be invoked for components using the new APIs. + if ( + !hasNewLifecycles && + (typeof instance.UNSAFE_componentWillMount === 'function' || + typeof instance.componentWillMount === 'function') + ) { + startPhaseTimer(workInProgress, 'componentWillMount'); + + if (typeof instance.componentWillMount === 'function') { + instance.componentWillMount(); + } + + if (typeof instance.UNSAFE_componentWillMount === 'function') { + instance.UNSAFE_componentWillMount(); + } + + stopPhaseTimer(); + } + + if (typeof instance.componentDidMount === 'function') { + workInProgress.effectTag |= Update; + } + } else { + // If an update was already in progress, we should schedule an Update + // effect even though we're bailing out, so that cWU/cDU are called. + if (typeof instance.componentDidMount === 'function') { + workInProgress.effectTag |= Update; + } // If shouldComponentUpdate returned false, we should still update the + // memoized state to indicate that this work can be reused. + + workInProgress.memoizedProps = newProps; + workInProgress.memoizedState = newState; + } // Update the existing instance's state, props, and context pointers even + // if shouldComponentUpdate returns false. + + instance.props = newProps; + instance.state = newState; + instance.context = nextContext; + return shouldUpdate; + } // Invokes the update life-cycles and returns false if it shouldn't rerender. + + function updateClassInstance(current, workInProgress, ctor, newProps, renderExpirationTime) { + var instance = workInProgress.stateNode; + var oldProps = workInProgress.memoizedProps; + instance.props = + workInProgress.type === workInProgress.elementType + ? oldProps + : resolveDefaultProps(workInProgress.type, oldProps); + var oldContext = instance.context; + var contextType = ctor.contextType; + var nextContext = emptyContextObject; + + if (typeof contextType === 'object' && contextType !== null) { + nextContext = readContext(contextType); + } else if (!disableLegacyContext) { + var nextUnmaskedContext = getUnmaskedContext(workInProgress, ctor, true); + nextContext = getMaskedContext(workInProgress, nextUnmaskedContext); + } + + var getDerivedStateFromProps = ctor.getDerivedStateFromProps; + var hasNewLifecycles = + typeof getDerivedStateFromProps === 'function' || + typeof instance.getSnapshotBeforeUpdate === 'function'; // Note: During these life-cycles, instance.props/instance.state are what + // ever the previously attempted to render - not the "current". However, + // during componentDidUpdate we pass the "current" props. + // In order to support react-lifecycles-compat polyfilled components, + // Unsafe lifecycles should not be invoked for components using the new APIs. + + if ( + !hasNewLifecycles && + (typeof instance.UNSAFE_componentWillReceiveProps === 'function' || + typeof instance.componentWillReceiveProps === 'function') + ) { + if (oldProps !== newProps || oldContext !== nextContext) { + callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext); + } + } + + resetHasForceUpdateBeforeProcessing(); + var oldState = workInProgress.memoizedState; + var newState = (instance.state = oldState); + var updateQueue = workInProgress.updateQueue; + + if (updateQueue !== null) { + processUpdateQueue(workInProgress, updateQueue, newProps, instance, renderExpirationTime); + newState = workInProgress.memoizedState; + } + + if ( + oldProps === newProps && + oldState === newState && + !hasContextChanged() && + !checkHasForceUpdateAfterProcessing() + ) { + // If an update was already in progress, we should schedule an Update + // effect even though we're bailing out, so that cWU/cDU are called. + if (typeof instance.componentDidUpdate === 'function') { + if (oldProps !== current.memoizedProps || oldState !== current.memoizedState) { + workInProgress.effectTag |= Update; + } + } + + if (typeof instance.getSnapshotBeforeUpdate === 'function') { + if (oldProps !== current.memoizedProps || oldState !== current.memoizedState) { + workInProgress.effectTag |= Snapshot; + } + } + + return false; + } + + if (typeof getDerivedStateFromProps === 'function') { + applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps); + newState = workInProgress.memoizedState; + } + + var shouldUpdate = + checkHasForceUpdateAfterProcessing() || + checkShouldComponentUpdate( + workInProgress, + ctor, + oldProps, + newProps, + oldState, + newState, + nextContext, + ); + + if (shouldUpdate) { + // In order to support react-lifecycles-compat polyfilled components, + // Unsafe lifecycles should not be invoked for components using the new APIs. + if ( + !hasNewLifecycles && + (typeof instance.UNSAFE_componentWillUpdate === 'function' || + typeof instance.componentWillUpdate === 'function') + ) { + startPhaseTimer(workInProgress, 'componentWillUpdate'); + + if (typeof instance.componentWillUpdate === 'function') { + instance.componentWillUpdate(newProps, newState, nextContext); + } + + if (typeof instance.UNSAFE_componentWillUpdate === 'function') { + instance.UNSAFE_componentWillUpdate(newProps, newState, nextContext); + } + + stopPhaseTimer(); + } + + if (typeof instance.componentDidUpdate === 'function') { + workInProgress.effectTag |= Update; + } + + if (typeof instance.getSnapshotBeforeUpdate === 'function') { + workInProgress.effectTag |= Snapshot; + } + } else { + // If an update was already in progress, we should schedule an Update + // effect even though we're bailing out, so that cWU/cDU are called. + if (typeof instance.componentDidUpdate === 'function') { + if (oldProps !== current.memoizedProps || oldState !== current.memoizedState) { + workInProgress.effectTag |= Update; + } + } + + if (typeof instance.getSnapshotBeforeUpdate === 'function') { + if (oldProps !== current.memoizedProps || oldState !== current.memoizedState) { + workInProgress.effectTag |= Snapshot; + } + } // If shouldComponentUpdate returned false, we should still update the + // memoized props/state to indicate that this work can be reused. + + workInProgress.memoizedProps = newProps; + workInProgress.memoizedState = newState; + } // Update the existing instance's state, props, and context pointers even + // if shouldComponentUpdate returns false. + + instance.props = newProps; + instance.state = newState; + instance.context = nextContext; + return shouldUpdate; + } + + var didWarnAboutMaps; + var didWarnAboutGenerators; + var didWarnAboutStringRefs; + var ownerHasKeyUseWarning; + var ownerHasFunctionTypeWarning; + + var warnForMissingKey = function (child) {}; + + { + didWarnAboutMaps = false; + didWarnAboutGenerators = false; + didWarnAboutStringRefs = {}; + /** + * Warn if there's no key explicitly set on dynamic arrays of children or + * object keys are not valid. This allows us to keep track of children between + * updates. + */ + + ownerHasKeyUseWarning = {}; + ownerHasFunctionTypeWarning = {}; + + warnForMissingKey = function (child) { + if (child === null || typeof child !== 'object') { + return; + } + + if (!child._store || child._store.validated || child.key != null) { + return; + } + + if (!(typeof child._store === 'object')) { + { + throw Error( + 'React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + + child._store.validated = true; + var currentComponentErrorInfo = + 'Each child in a list should have a unique ' + + '"key" prop. See https://fb.me/react-warning-keys for ' + + 'more information.' + + getCurrentFiberStackInDev(); + + if (ownerHasKeyUseWarning[currentComponentErrorInfo]) { + return; + } + + ownerHasKeyUseWarning[currentComponentErrorInfo] = true; + warning$1( + false, + 'Each child in a list should have a unique ' + + '"key" prop. See https://fb.me/react-warning-keys for ' + + 'more information.', + ); + }; + } + + var isArray = Array.isArray; + + function coerceRef(returnFiber, current$$1, element) { + var mixedRef = element.ref; + + if (mixedRef !== null && typeof mixedRef !== 'function' && typeof mixedRef !== 'object') { + { + // TODO: Clean this up once we turn on the string ref warning for + // everyone, because the strict mode case will no longer be relevant + if (returnFiber.mode & StrictMode || warnAboutStringRefs) { + var componentName = getComponentName(returnFiber.type) || 'Component'; + + if (!didWarnAboutStringRefs[componentName]) { + if (warnAboutStringRefs) { + warningWithoutStack$1( + false, + 'Component "%s" contains the string ref "%s". Support for string refs ' + + 'will be removed in a future major release. We recommend using ' + + 'useRef() or createRef() instead. ' + + 'Learn more about using refs safely here: ' + + 'https://fb.me/react-strict-mode-string-ref%s', + componentName, + mixedRef, + getStackByFiberInDevAndProd(returnFiber), + ); + } else { + warningWithoutStack$1( + false, + 'A string ref, "%s", has been found within a strict mode tree. ' + + 'String refs are a source of potential bugs and should be avoided. ' + + 'We recommend using useRef() or createRef() instead. ' + + 'Learn more about using refs safely here: ' + + 'https://fb.me/react-strict-mode-string-ref%s', + mixedRef, + getStackByFiberInDevAndProd(returnFiber), + ); + } + + didWarnAboutStringRefs[componentName] = true; + } + } + } + + if (element._owner) { + var owner = element._owner; + var inst; + + if (owner) { + var ownerFiber = owner; + + if (!(ownerFiber.tag === ClassComponent)) { + { + throw Error( + 'Function components cannot have refs. Did you mean to use React.forwardRef()?', + ); + } + } + + inst = ownerFiber.stateNode; + } + + if (!inst) { + { + throw Error( + 'Missing owner for string ref ' + + mixedRef + + '. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + + var stringRef = '' + mixedRef; // Check if previous string ref matches new string ref + + if ( + current$$1 !== null && + current$$1.ref !== null && + typeof current$$1.ref === 'function' && + current$$1.ref._stringRef === stringRef + ) { + return current$$1.ref; + } + + var ref = function (value) { + var refs = inst.refs; + + if (refs === emptyRefsObject) { + // This is a lazy pooled frozen object, so we need to initialize. + refs = inst.refs = {}; + } + + if (value === null) { + delete refs[stringRef]; + } else { + refs[stringRef] = value; + } + }; + + ref._stringRef = stringRef; + return ref; + } else { + if (!(typeof mixedRef === 'string')) { + { + throw Error( + 'Expected ref to be a function, a string, an object returned by React.createRef(), or null.', + ); + } + } + + if (!element._owner) { + { + throw Error( + 'Element ref was specified as a string (' + + mixedRef + + ") but no owner was set. This could happen for one of the following reasons:\n1. You may be adding a ref to a function component\n2. You may be adding a ref to a component that was not created inside a component's render method\n3. You have multiple copies of React loaded\nSee https://fb.me/react-refs-must-have-owner for more information.", + ); + } + } + } + } + + return mixedRef; + } + + function throwOnInvalidObjectType(returnFiber, newChild) { + if (returnFiber.type !== 'textarea') { + var addendum = ''; + + { + addendum = + ' If you meant to render a collection of children, use an array ' + + 'instead.' + + getCurrentFiberStackInDev(); + } + + { + { + throw Error( + 'Objects are not valid as a React child (found: ' + + (Object.prototype.toString.call(newChild) === '[object Object]' + ? 'object with keys {' + Object.keys(newChild).join(', ') + '}' + : newChild) + + ').' + + addendum, + ); + } + } + } + } + + function warnOnFunctionType() { + var currentComponentErrorInfo = + 'Functions are not valid as a React child. This may happen if ' + + 'you return a Component instead of <Component /> from render. ' + + 'Or maybe you meant to call this function rather than return it.' + + getCurrentFiberStackInDev(); + + if (ownerHasFunctionTypeWarning[currentComponentErrorInfo]) { + return; + } + + ownerHasFunctionTypeWarning[currentComponentErrorInfo] = true; + warning$1( + false, + 'Functions are not valid as a React child. This may happen if ' + + 'you return a Component instead of <Component /> from render. ' + + 'Or maybe you meant to call this function rather than return it.', + ); + } // This wrapper function exists because I expect to clone the code in each path + // to be able to optimize each path individually by branching early. This needs + // a compiler or we can do it manually. Helpers that don't need this branching + // live outside of this function. + + function ChildReconciler(shouldTrackSideEffects) { + function deleteChild(returnFiber, childToDelete) { + if (!shouldTrackSideEffects) { + // Noop. + return; + } // Deletions are added in reversed order so we add it to the front. + // At this point, the return fiber's effect list is empty except for + // deletions, so we can just append the deletion to the list. The remaining + // effects aren't added until the complete phase. Once we implement + // resuming, this may not be true. + + var last = returnFiber.lastEffect; + + if (last !== null) { + last.nextEffect = childToDelete; + returnFiber.lastEffect = childToDelete; + } else { + returnFiber.firstEffect = returnFiber.lastEffect = childToDelete; + } + + childToDelete.nextEffect = null; + childToDelete.effectTag = Deletion; + } + + function deleteRemainingChildren(returnFiber, currentFirstChild) { + if (!shouldTrackSideEffects) { + // Noop. + return null; + } // TODO: For the shouldClone case, this could be micro-optimized a bit by + // assuming that after the first child we've already added everything. + + var childToDelete = currentFirstChild; + + while (childToDelete !== null) { + deleteChild(returnFiber, childToDelete); + childToDelete = childToDelete.sibling; + } + + return null; + } + + function mapRemainingChildren(returnFiber, currentFirstChild) { + // Add the remaining children to a temporary map so that we can find them by + // keys quickly. Implicit (null) keys get added to this set with their index + // instead. + var existingChildren = new Map(); + var existingChild = currentFirstChild; + + while (existingChild !== null) { + if (existingChild.key !== null) { + existingChildren.set(existingChild.key, existingChild); + } else { + existingChildren.set(existingChild.index, existingChild); + } + + existingChild = existingChild.sibling; + } + + return existingChildren; + } + + function useFiber(fiber, pendingProps, expirationTime) { + // We currently set sibling to null and index to 0 here because it is easy + // to forget to do before returning it. E.g. for the single child case. + var clone = createWorkInProgress(fiber, pendingProps, expirationTime); + clone.index = 0; + clone.sibling = null; + return clone; + } + + function placeChild(newFiber, lastPlacedIndex, newIndex) { + newFiber.index = newIndex; + + if (!shouldTrackSideEffects) { + // Noop. + return lastPlacedIndex; + } + + var current$$1 = newFiber.alternate; + + if (current$$1 !== null) { + var oldIndex = current$$1.index; + + if (oldIndex < lastPlacedIndex) { + // This is a move. + newFiber.effectTag = Placement; + return lastPlacedIndex; + } else { + // This item can stay in place. + return oldIndex; + } + } else { + // This is an insertion. + newFiber.effectTag = Placement; + return lastPlacedIndex; + } + } + + function placeSingleChild(newFiber) { + // This is simpler for the single child case. We only need to do a + // placement for inserting new children. + if (shouldTrackSideEffects && newFiber.alternate === null) { + newFiber.effectTag = Placement; + } + + return newFiber; + } + + function updateTextNode(returnFiber, current$$1, textContent, expirationTime) { + if (current$$1 === null || current$$1.tag !== HostText) { + // Insert + var created = createFiberFromText(textContent, returnFiber.mode, expirationTime); + created.return = returnFiber; + return created; + } else { + // Update + var existing = useFiber(current$$1, textContent, expirationTime); + existing.return = returnFiber; + return existing; + } + } + + function updateElement(returnFiber, current$$1, element, expirationTime) { + if ( + current$$1 !== null && + (current$$1.elementType === element.type || // Keep this check inline so it only runs on the false path: + isCompatibleFamilyForHotReloading(current$$1, element)) + ) { + // Move based on index + var existing = useFiber(current$$1, element.props, expirationTime); + existing.ref = coerceRef(returnFiber, current$$1, element); + existing.return = returnFiber; + + { + existing._debugSource = element._source; + existing._debugOwner = element._owner; + } + + return existing; + } else { + // Insert + var created = createFiberFromElement(element, returnFiber.mode, expirationTime); + created.ref = coerceRef(returnFiber, current$$1, element); + created.return = returnFiber; + return created; + } + } + + function updatePortal(returnFiber, current$$1, portal, expirationTime) { + if ( + current$$1 === null || + current$$1.tag !== HostPortal || + current$$1.stateNode.containerInfo !== portal.containerInfo || + current$$1.stateNode.implementation !== portal.implementation + ) { + // Insert + var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime); + created.return = returnFiber; + return created; + } else { + // Update + var existing = useFiber(current$$1, portal.children || [], expirationTime); + existing.return = returnFiber; + return existing; + } + } + + function updateFragment(returnFiber, current$$1, fragment, expirationTime, key) { + if (current$$1 === null || current$$1.tag !== Fragment) { + // Insert + var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key); + created.return = returnFiber; + return created; + } else { + // Update + var existing = useFiber(current$$1, fragment, expirationTime); + existing.return = returnFiber; + return existing; + } + } + + function createChild(returnFiber, newChild, expirationTime) { + if (typeof newChild === 'string' || typeof newChild === 'number') { + // Text nodes don't have keys. If the previous node is implicitly keyed + // we can continue to replace it without aborting even if it is not a text + // node. + var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime); + created.return = returnFiber; + return created; + } + + if (typeof newChild === 'object' && newChild !== null) { + switch (newChild.$$typeof) { + case REACT_ELEMENT_TYPE: { + var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime); + + _created.ref = coerceRef(returnFiber, null, newChild); + _created.return = returnFiber; + return _created; + } + + case REACT_PORTAL_TYPE: { + var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime); + + _created2.return = returnFiber; + return _created2; + } + } + + if (isArray(newChild) || getIteratorFn(newChild)) { + var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null); + + _created3.return = returnFiber; + return _created3; + } + + throwOnInvalidObjectType(returnFiber, newChild); + } + + { + if (typeof newChild === 'function') { + warnOnFunctionType(); + } + } + + return null; + } + + function updateSlot(returnFiber, oldFiber, newChild, expirationTime) { + // Update the fiber if the keys match, otherwise return null. + var key = oldFiber !== null ? oldFiber.key : null; + + if (typeof newChild === 'string' || typeof newChild === 'number') { + // Text nodes don't have keys. If the previous node is implicitly keyed + // we can continue to replace it without aborting even if it is not a text + // node. + if (key !== null) { + return null; + } + + return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime); + } + + if (typeof newChild === 'object' && newChild !== null) { + switch (newChild.$$typeof) { + case REACT_ELEMENT_TYPE: { + if (newChild.key === key) { + if (newChild.type === REACT_FRAGMENT_TYPE) { + return updateFragment( + returnFiber, + oldFiber, + newChild.props.children, + expirationTime, + key, + ); + } + + return updateElement(returnFiber, oldFiber, newChild, expirationTime); + } else { + return null; + } + } + + case REACT_PORTAL_TYPE: { + if (newChild.key === key) { + return updatePortal(returnFiber, oldFiber, newChild, expirationTime); + } else { + return null; + } + } + } + + if (isArray(newChild) || getIteratorFn(newChild)) { + if (key !== null) { + return null; + } + + return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null); + } + + throwOnInvalidObjectType(returnFiber, newChild); + } + + { + if (typeof newChild === 'function') { + warnOnFunctionType(); + } + } + + return null; + } + + function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) { + if (typeof newChild === 'string' || typeof newChild === 'number') { + // Text nodes don't have keys, so we neither have to check the old nor + // new node for the key. If both are text nodes, they match. + var matchedFiber = existingChildren.get(newIdx) || null; + return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime); + } + + if (typeof newChild === 'object' && newChild !== null) { + switch (newChild.$$typeof) { + case REACT_ELEMENT_TYPE: { + var _matchedFiber = + existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null; + + if (newChild.type === REACT_FRAGMENT_TYPE) { + return updateFragment( + returnFiber, + _matchedFiber, + newChild.props.children, + expirationTime, + newChild.key, + ); + } + + return updateElement(returnFiber, _matchedFiber, newChild, expirationTime); + } + + case REACT_PORTAL_TYPE: { + var _matchedFiber2 = + existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null; + + return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime); + } + } + + if (isArray(newChild) || getIteratorFn(newChild)) { + var _matchedFiber3 = existingChildren.get(newIdx) || null; + + return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null); + } + + throwOnInvalidObjectType(returnFiber, newChild); + } + + { + if (typeof newChild === 'function') { + warnOnFunctionType(); + } + } + + return null; + } + /** + * Warns if there is a duplicate or missing key + */ + + function warnOnInvalidKey(child, knownKeys) { + { + if (typeof child !== 'object' || child === null) { + return knownKeys; + } + + switch (child.$$typeof) { + case REACT_ELEMENT_TYPE: + case REACT_PORTAL_TYPE: + warnForMissingKey(child); + var key = child.key; + + if (typeof key !== 'string') { + break; + } + + if (knownKeys === null) { + knownKeys = new Set(); + knownKeys.add(key); + break; + } + + if (!knownKeys.has(key)) { + knownKeys.add(key); + break; + } + + warning$1( + false, + 'Encountered two children with the same key, `%s`. ' + + 'Keys should be unique so that components maintain their identity ' + + 'across updates. Non-unique keys may cause children to be ' + + 'duplicated and/or omitted — the behavior is unsupported and ' + + 'could change in a future version.', + key, + ); + break; + + default: + break; + } + } + + return knownKeys; + } + + function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) { + // This algorithm can't optimize by searching from both ends since we + // don't have backpointers on fibers. I'm trying to see how far we can get + // with that model. If it ends up not being worth the tradeoffs, we can + // add it later. + // Even with a two ended optimization, we'd want to optimize for the case + // where there are few changes and brute force the comparison instead of + // going for the Map. It'd like to explore hitting that path first in + // forward-only mode and only go for the Map once we notice that we need + // lots of look ahead. This doesn't handle reversal as well as two ended + // search but that's unusual. Besides, for the two ended optimization to + // work on Iterables, we'd need to copy the whole set. + // In this first iteration, we'll just live with hitting the bad case + // (adding everything to a Map) in for every insert/move. + // If you change this code, also update reconcileChildrenIterator() which + // uses the same algorithm. + { + // First, validate keys. + var knownKeys = null; + + for (var i = 0; i < newChildren.length; i++) { + var child = newChildren[i]; + knownKeys = warnOnInvalidKey(child, knownKeys); + } + } + + var resultingFirstChild = null; + var previousNewFiber = null; + var oldFiber = currentFirstChild; + var lastPlacedIndex = 0; + var newIdx = 0; + var nextOldFiber = null; + + for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) { + if (oldFiber.index > newIdx) { + nextOldFiber = oldFiber; + oldFiber = null; + } else { + nextOldFiber = oldFiber.sibling; + } + + var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime); + + if (newFiber === null) { + // TODO: This breaks on empty slots like null children. That's + // unfortunate because it triggers the slow path all the time. We need + // a better way to communicate whether this was a miss or null, + // boolean, undefined, etc. + if (oldFiber === null) { + oldFiber = nextOldFiber; + } + + break; + } + + if (shouldTrackSideEffects) { + if (oldFiber && newFiber.alternate === null) { + // We matched the slot, but we didn't reuse the existing fiber, so we + // need to delete the existing child. + deleteChild(returnFiber, oldFiber); + } + } + + lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx); + + if (previousNewFiber === null) { + // TODO: Move out of the loop. This only happens for the first run. + resultingFirstChild = newFiber; + } else { + // TODO: Defer siblings if we're not at the right index for this slot. + // I.e. if we had null values before, then we want to defer this + // for each null value. However, we also don't want to call updateSlot + // with the previous one. + previousNewFiber.sibling = newFiber; + } + + previousNewFiber = newFiber; + oldFiber = nextOldFiber; + } + + if (newIdx === newChildren.length) { + // We've reached the end of the new children. We can delete the rest. + deleteRemainingChildren(returnFiber, oldFiber); + return resultingFirstChild; + } + + if (oldFiber === null) { + // If we don't have any more existing children we can choose a fast path + // since the rest will all be insertions. + for (; newIdx < newChildren.length; newIdx++) { + var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime); + + if (_newFiber === null) { + continue; + } + + lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx); + + if (previousNewFiber === null) { + // TODO: Move out of the loop. This only happens for the first run. + resultingFirstChild = _newFiber; + } else { + previousNewFiber.sibling = _newFiber; + } + + previousNewFiber = _newFiber; + } + + return resultingFirstChild; + } // Add all children to a key map for quick lookups. + + var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves. + + for (; newIdx < newChildren.length; newIdx++) { + var _newFiber2 = updateFromMap( + existingChildren, + returnFiber, + newIdx, + newChildren[newIdx], + expirationTime, + ); + + if (_newFiber2 !== null) { + if (shouldTrackSideEffects) { + if (_newFiber2.alternate !== null) { + // The new fiber is a work in progress, but if there exists a + // current, that means that we reused the fiber. We need to delete + // it from the child list so that we don't add it to the deletion + // list. + existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key); + } + } + + lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx); + + if (previousNewFiber === null) { + resultingFirstChild = _newFiber2; + } else { + previousNewFiber.sibling = _newFiber2; + } + + previousNewFiber = _newFiber2; + } + } + + if (shouldTrackSideEffects) { + // Any existing children that weren't consumed above were deleted. We need + // to add them to the deletion list. + existingChildren.forEach(function (child) { + return deleteChild(returnFiber, child); + }); + } + + return resultingFirstChild; + } + + function reconcileChildrenIterator( + returnFiber, + currentFirstChild, + newChildrenIterable, + expirationTime, + ) { + // This is the same implementation as reconcileChildrenArray(), + // but using the iterator instead. + var iteratorFn = getIteratorFn(newChildrenIterable); + + if (!(typeof iteratorFn === 'function')) { + { + throw Error( + 'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + + { + // We don't support rendering Generators because it's a mutation. + // See https://github.com/facebook/react/issues/12995 + if ( + typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag + newChildrenIterable[Symbol.toStringTag] === 'Generator' + ) { + !didWarnAboutGenerators + ? warning$1( + false, + 'Using Generators as children is unsupported and will likely yield ' + + 'unexpected results because enumerating a generator mutates it. ' + + 'You may convert it to an array with `Array.from()` or the ' + + '`[...spread]` operator before rendering. Keep in mind ' + + 'you might need to polyfill these features for older browsers.', + ) + : void 0; + didWarnAboutGenerators = true; + } // Warn about using Maps as children + + if (newChildrenIterable.entries === iteratorFn) { + !didWarnAboutMaps + ? warning$1( + false, + 'Using Maps as children is unsupported and will likely yield ' + + 'unexpected results. Convert it to a sequence/iterable of keyed ' + + 'ReactElements instead.', + ) + : void 0; + didWarnAboutMaps = true; + } // First, validate keys. + // We'll get a different iterator later for the main pass. + + var _newChildren = iteratorFn.call(newChildrenIterable); + + if (_newChildren) { + var knownKeys = null; + + var _step = _newChildren.next(); + + for (; !_step.done; _step = _newChildren.next()) { + var child = _step.value; + knownKeys = warnOnInvalidKey(child, knownKeys); + } + } + } + + var newChildren = iteratorFn.call(newChildrenIterable); + + if (!(newChildren != null)) { + { + throw Error('An iterable object provided no iterator.'); + } + } + + var resultingFirstChild = null; + var previousNewFiber = null; + var oldFiber = currentFirstChild; + var lastPlacedIndex = 0; + var newIdx = 0; + var nextOldFiber = null; + var step = newChildren.next(); + + for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) { + if (oldFiber.index > newIdx) { + nextOldFiber = oldFiber; + oldFiber = null; + } else { + nextOldFiber = oldFiber.sibling; + } + + var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime); + + if (newFiber === null) { + // TODO: This breaks on empty slots like null children. That's + // unfortunate because it triggers the slow path all the time. We need + // a better way to communicate whether this was a miss or null, + // boolean, undefined, etc. + if (oldFiber === null) { + oldFiber = nextOldFiber; + } + + break; + } + + if (shouldTrackSideEffects) { + if (oldFiber && newFiber.alternate === null) { + // We matched the slot, but we didn't reuse the existing fiber, so we + // need to delete the existing child. + deleteChild(returnFiber, oldFiber); + } + } + + lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx); + + if (previousNewFiber === null) { + // TODO: Move out of the loop. This only happens for the first run. + resultingFirstChild = newFiber; + } else { + // TODO: Defer siblings if we're not at the right index for this slot. + // I.e. if we had null values before, then we want to defer this + // for each null value. However, we also don't want to call updateSlot + // with the previous one. + previousNewFiber.sibling = newFiber; + } + + previousNewFiber = newFiber; + oldFiber = nextOldFiber; + } + + if (step.done) { + // We've reached the end of the new children. We can delete the rest. + deleteRemainingChildren(returnFiber, oldFiber); + return resultingFirstChild; + } + + if (oldFiber === null) { + // If we don't have any more existing children we can choose a fast path + // since the rest will all be insertions. + for (; !step.done; newIdx++, step = newChildren.next()) { + var _newFiber3 = createChild(returnFiber, step.value, expirationTime); + + if (_newFiber3 === null) { + continue; + } + + lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx); + + if (previousNewFiber === null) { + // TODO: Move out of the loop. This only happens for the first run. + resultingFirstChild = _newFiber3; + } else { + previousNewFiber.sibling = _newFiber3; + } + + previousNewFiber = _newFiber3; + } + + return resultingFirstChild; + } // Add all children to a key map for quick lookups. + + var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves. + + for (; !step.done; newIdx++, step = newChildren.next()) { + var _newFiber4 = updateFromMap( + existingChildren, + returnFiber, + newIdx, + step.value, + expirationTime, + ); + + if (_newFiber4 !== null) { + if (shouldTrackSideEffects) { + if (_newFiber4.alternate !== null) { + // The new fiber is a work in progress, but if there exists a + // current, that means that we reused the fiber. We need to delete + // it from the child list so that we don't add it to the deletion + // list. + existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key); + } + } + + lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx); + + if (previousNewFiber === null) { + resultingFirstChild = _newFiber4; + } else { + previousNewFiber.sibling = _newFiber4; + } + + previousNewFiber = _newFiber4; + } + } + + if (shouldTrackSideEffects) { + // Any existing children that weren't consumed above were deleted. We need + // to add them to the deletion list. + existingChildren.forEach(function (child) { + return deleteChild(returnFiber, child); + }); + } + + return resultingFirstChild; + } + + function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) { + // There's no need to check for keys on text nodes since we don't have a + // way to define them. + if (currentFirstChild !== null && currentFirstChild.tag === HostText) { + // We already have an existing node so let's just update it and delete + // the rest. + deleteRemainingChildren(returnFiber, currentFirstChild.sibling); + var existing = useFiber(currentFirstChild, textContent, expirationTime); + existing.return = returnFiber; + return existing; + } // The existing first child is not a text node so we need to create one + // and delete the existing ones. + + deleteRemainingChildren(returnFiber, currentFirstChild); + var created = createFiberFromText(textContent, returnFiber.mode, expirationTime); + created.return = returnFiber; + return created; + } + + function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) { + var key = element.key; + var child = currentFirstChild; + + while (child !== null) { + // TODO: If key === null and child.key === null, then this only applies to + // the first item in the list. + if (child.key === key) { + if ( + child.tag === Fragment + ? element.type === REACT_FRAGMENT_TYPE + : child.elementType === element.type || // Keep this check inline so it only runs on the false path: + isCompatibleFamilyForHotReloading(child, element) + ) { + deleteRemainingChildren(returnFiber, child.sibling); + var existing = useFiber( + child, + element.type === REACT_FRAGMENT_TYPE ? element.props.children : element.props, + expirationTime, + ); + existing.ref = coerceRef(returnFiber, child, element); + existing.return = returnFiber; + + { + existing._debugSource = element._source; + existing._debugOwner = element._owner; + } + + return existing; + } else { + deleteRemainingChildren(returnFiber, child); + break; + } + } else { + deleteChild(returnFiber, child); + } + + child = child.sibling; + } + + if (element.type === REACT_FRAGMENT_TYPE) { + var created = createFiberFromFragment( + element.props.children, + returnFiber.mode, + expirationTime, + element.key, + ); + created.return = returnFiber; + return created; + } else { + var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime); + + _created4.ref = coerceRef(returnFiber, currentFirstChild, element); + _created4.return = returnFiber; + return _created4; + } + } + + function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) { + var key = portal.key; + var child = currentFirstChild; + + while (child !== null) { + // TODO: If key === null and child.key === null, then this only applies to + // the first item in the list. + if (child.key === key) { + if ( + child.tag === HostPortal && + child.stateNode.containerInfo === portal.containerInfo && + child.stateNode.implementation === portal.implementation + ) { + deleteRemainingChildren(returnFiber, child.sibling); + var existing = useFiber(child, portal.children || [], expirationTime); + existing.return = returnFiber; + return existing; + } else { + deleteRemainingChildren(returnFiber, child); + break; + } + } else { + deleteChild(returnFiber, child); + } + + child = child.sibling; + } + + var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime); + created.return = returnFiber; + return created; + } // This API will tag the children with the side-effect of the reconciliation + // itself. They will be added to the side-effect list as we pass through the + // children and the parent. + + function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) { + // This function is not recursive. + // If the top level item is an array, we treat it as a set of children, + // not as a fragment. Nested arrays on the other hand will be treated as + // fragment nodes. Recursion happens at the normal flow. + // Handle top level unkeyed fragments as if they were arrays. + // This leads to an ambiguity between <>{[...]}</> and <>...</>. + // We treat the ambiguous cases above the same. + var isUnkeyedTopLevelFragment = + typeof newChild === 'object' && + newChild !== null && + newChild.type === REACT_FRAGMENT_TYPE && + newChild.key === null; + + if (isUnkeyedTopLevelFragment) { + newChild = newChild.props.children; + } // Handle object types + + var isObject = typeof newChild === 'object' && newChild !== null; + + if (isObject) { + switch (newChild.$$typeof) { + case REACT_ELEMENT_TYPE: + return placeSingleChild( + reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime), + ); + + case REACT_PORTAL_TYPE: + return placeSingleChild( + reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime), + ); + } + } + + if (typeof newChild === 'string' || typeof newChild === 'number') { + return placeSingleChild( + reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime), + ); + } + + if (isArray(newChild)) { + return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime); + } + + if (getIteratorFn(newChild)) { + return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime); + } + + if (isObject) { + throwOnInvalidObjectType(returnFiber, newChild); + } + + { + if (typeof newChild === 'function') { + warnOnFunctionType(); + } + } + + if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) { + // If the new child is undefined, and the return fiber is a composite + // component, throw an error. If Fiber return types are disabled, + // we already threw above. + switch (returnFiber.tag) { + case ClassComponent: { + { + var instance = returnFiber.stateNode; + + if (instance.render._isMockFunction) { + // We allow auto-mocks to proceed as if they're returning null. + break; + } + } + } + // Intentionally fall through to the next case, which handles both + // functions and classes + // eslint-disable-next-lined no-fallthrough + + case FunctionComponent: { + var Component = returnFiber.type; + + { + { + throw Error( + (Component.displayName || Component.name || 'Component') + + '(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.', + ); + } + } + } + } + } // Remaining cases are all treated as empty. + + return deleteRemainingChildren(returnFiber, currentFirstChild); + } + + return reconcileChildFibers; + } + + var reconcileChildFibers = ChildReconciler(true); + var mountChildFibers = ChildReconciler(false); + function cloneChildFibers(current$$1, workInProgress) { + if (!(current$$1 === null || workInProgress.child === current$$1.child)) { + { + throw Error('Resuming work not yet implemented.'); + } + } + + if (workInProgress.child === null) { + return; + } + + var currentChild = workInProgress.child; + var newChild = createWorkInProgress( + currentChild, + currentChild.pendingProps, + currentChild.expirationTime, + ); + workInProgress.child = newChild; + newChild.return = workInProgress; + + while (currentChild.sibling !== null) { + currentChild = currentChild.sibling; + newChild = newChild.sibling = createWorkInProgress( + currentChild, + currentChild.pendingProps, + currentChild.expirationTime, + ); + newChild.return = workInProgress; + } + + newChild.sibling = null; + } // Reset a workInProgress child set to prepare it for a second pass. + + function resetChildFibers(workInProgress, renderExpirationTime) { + var child = workInProgress.child; + + while (child !== null) { + resetWorkInProgress(child, renderExpirationTime); + child = child.sibling; + } + } + + var NO_CONTEXT = {}; + var contextStackCursor$1 = createCursor(NO_CONTEXT); + var contextFiberStackCursor = createCursor(NO_CONTEXT); + var rootInstanceStackCursor = createCursor(NO_CONTEXT); + + function requiredContext(c) { + if (!(c !== NO_CONTEXT)) { + { + throw Error( + 'Expected host context to exist. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + + return c; + } + + function getRootHostContainer() { + var rootInstance = requiredContext(rootInstanceStackCursor.current); + return rootInstance; + } + + function pushHostContainer(fiber, nextRootInstance) { + // Push current root instance onto the stack; + // This allows us to reset root when portals are popped. + push(rootInstanceStackCursor, nextRootInstance, fiber); // Track the context and the Fiber that provided it. + // This enables us to pop only Fibers that provide unique contexts. + + push(contextFiberStackCursor, fiber, fiber); // Finally, we need to push the host context to the stack. + // However, we can't just call getRootHostContext() and push it because + // we'd have a different number of entries on the stack depending on + // whether getRootHostContext() throws somewhere in renderer code or not. + // So we push an empty value first. This lets us safely unwind on errors. + + push(contextStackCursor$1, NO_CONTEXT, fiber); + var nextRootContext = getRootHostContext(nextRootInstance); // Now that we know this function doesn't throw, replace it. + + pop(contextStackCursor$1, fiber); + push(contextStackCursor$1, nextRootContext, fiber); + } + + function popHostContainer(fiber) { + pop(contextStackCursor$1, fiber); + pop(contextFiberStackCursor, fiber); + pop(rootInstanceStackCursor, fiber); + } + + function getHostContext() { + var context = requiredContext(contextStackCursor$1.current); + return context; + } + + function pushHostContext(fiber) { + var rootInstance = requiredContext(rootInstanceStackCursor.current); + var context = requiredContext(contextStackCursor$1.current); + var nextContext = getChildHostContext(context, fiber.type, rootInstance); // Don't push this Fiber's context unless it's unique. + + if (context === nextContext) { + return; + } // Track the context and the Fiber that provided it. + // This enables us to pop only Fibers that provide unique contexts. + + push(contextFiberStackCursor, fiber, fiber); + push(contextStackCursor$1, nextContext, fiber); + } + + function popHostContext(fiber) { + // Do not pop unless this Fiber provided the current context. + // pushHostContext() only pushes Fibers that provide unique contexts. + if (contextFiberStackCursor.current !== fiber) { + return; + } + + pop(contextStackCursor$1, fiber); + pop(contextFiberStackCursor, fiber); + } + + var DefaultSuspenseContext = 0; // The Suspense Context is split into two parts. The lower bits is + // inherited deeply down the subtree. The upper bits only affect + // this immediate suspense boundary and gets reset each new + // boundary or suspense list. + + var SubtreeSuspenseContextMask = 1; // Subtree Flags: + // InvisibleParentSuspenseContext indicates that one of our parent Suspense + // boundaries is not currently showing visible main content. + // Either because it is already showing a fallback or is not mounted at all. + // We can use this to determine if it is desirable to trigger a fallback at + // the parent. If not, then we might need to trigger undesirable boundaries + // and/or suspend the commit to avoid hiding the parent content. + + var InvisibleParentSuspenseContext = 1; // Shallow Flags: + // ForceSuspenseFallback can be used by SuspenseList to force newly added + // items into their fallback state during one of the render passes. + + var ForceSuspenseFallback = 2; + var suspenseStackCursor = createCursor(DefaultSuspenseContext); + function hasSuspenseContext(parentContext, flag) { + return (parentContext & flag) !== 0; + } + function setDefaultShallowSuspenseContext(parentContext) { + return parentContext & SubtreeSuspenseContextMask; + } + function setShallowSuspenseContext(parentContext, shallowContext) { + return (parentContext & SubtreeSuspenseContextMask) | shallowContext; + } + function addSubtreeSuspenseContext(parentContext, subtreeContext) { + return parentContext | subtreeContext; + } + function pushSuspenseContext(fiber, newContext) { + push(suspenseStackCursor, newContext, fiber); + } + function popSuspenseContext(fiber) { + pop(suspenseStackCursor, fiber); + } + + function shouldCaptureSuspense(workInProgress, hasInvisibleParent) { + // If it was the primary children that just suspended, capture and render the + // fallback. Otherwise, don't capture and bubble to the next boundary. + var nextState = workInProgress.memoizedState; + + if (nextState !== null) { + if (nextState.dehydrated !== null) { + // A dehydrated boundary always captures. + return true; + } + + return false; + } + + var props = workInProgress.memoizedProps; // In order to capture, the Suspense component must have a fallback prop. + + if (props.fallback === undefined) { + return false; + } // Regular boundaries always capture. + + if (props.unstable_avoidThisFallback !== true) { + return true; + } // If it's a boundary we should avoid, then we prefer to bubble up to the + // parent boundary if it is currently invisible. + + if (hasInvisibleParent) { + return false; + } // If the parent is not able to handle it, we must handle it. + + return true; + } + function findFirstSuspended(row) { + var node = row; + + while (node !== null) { + if (node.tag === SuspenseComponent) { + var state = node.memoizedState; + + if (state !== null) { + var dehydrated = state.dehydrated; + + if ( + dehydrated === null || + isSuspenseInstancePending(dehydrated) || + isSuspenseInstanceFallback(dehydrated) + ) { + return node; + } + } + } else if ( + node.tag === SuspenseListComponent && // revealOrder undefined can't be trusted because it don't + // keep track of whether it suspended or not. + node.memoizedProps.revealOrder !== undefined + ) { + var didSuspend = (node.effectTag & DidCapture) !== NoEffect; + + if (didSuspend) { + return node; + } + } else if (node.child !== null) { + node.child.return = node; + node = node.child; + continue; + } + + if (node === row) { + return null; + } + + while (node.sibling === null) { + if (node.return === null || node.return === row) { + return null; + } + + node = node.return; + } + + node.sibling.return = node.return; + node = node.sibling; + } + + return null; + } + + var emptyObject = {}; + var isArray$2 = Array.isArray; + function createResponderInstance(responder, responderProps, responderState, fiber) { + return { + fiber: fiber, + props: responderProps, + responder: responder, + rootEventTypes: null, + state: responderState, + }; + } + + function mountEventResponder$1( + responder, + responderProps, + fiber, + respondersMap, + rootContainerInstance, + ) { + var responderState = emptyObject; + var getInitialState = responder.getInitialState; + + if (getInitialState !== null) { + responderState = getInitialState(responderProps); + } + + var responderInstance = createResponderInstance(responder, responderProps, responderState, fiber); + + if (!rootContainerInstance) { + var node = fiber; + + while (node !== null) { + var tag = node.tag; + + if (tag === HostComponent) { + rootContainerInstance = node.stateNode; + break; + } else if (tag === HostRoot) { + rootContainerInstance = node.stateNode.containerInfo; + break; + } + + node = node.return; + } + } + + mountResponderInstance( + responder, + responderInstance, + responderProps, + responderState, + rootContainerInstance, + ); + respondersMap.set(responder, responderInstance); + } + + function updateEventListener( + listener, + fiber, + visistedResponders, + respondersMap, + rootContainerInstance, + ) { + var responder; + var props; + + if (listener) { + responder = listener.responder; + props = listener.props; + } + + if (!(responder && responder.$$typeof === REACT_RESPONDER_TYPE)) { + { + throw Error( + 'An invalid value was used as an event listener. Expect one or many event listeners created via React.unstable_useResponder().', + ); + } + } + + var listenerProps = props; + + if (visistedResponders.has(responder)) { + // show warning + { + warning$1( + false, + 'Duplicate event responder "%s" found in event listeners. ' + + 'Event listeners passed to elements cannot use the same event responder more than once.', + responder.displayName, + ); + } + + return; + } + + visistedResponders.add(responder); + var responderInstance = respondersMap.get(responder); + + if (responderInstance === undefined) { + // Mount (happens in either complete or commit phase) + mountEventResponder$1(responder, listenerProps, fiber, respondersMap, rootContainerInstance); + } else { + // Update (happens during commit phase only) + responderInstance.props = listenerProps; + responderInstance.fiber = fiber; + } + } + + function updateEventListeners(listeners, fiber, rootContainerInstance) { + var visistedResponders = new Set(); + var dependencies = fiber.dependencies; + + if (listeners != null) { + if (dependencies === null) { + dependencies = fiber.dependencies = { + expirationTime: NoWork, + firstContext: null, + responders: new Map(), + }; + } + + var respondersMap = dependencies.responders; + + if (respondersMap === null) { + respondersMap = new Map(); + } + + if (isArray$2(listeners)) { + for (var i = 0, length = listeners.length; i < length; i++) { + var listener = listeners[i]; + updateEventListener( + listener, + fiber, + visistedResponders, + respondersMap, + rootContainerInstance, + ); + } + } else { + updateEventListener( + listeners, + fiber, + visistedResponders, + respondersMap, + rootContainerInstance, + ); + } + } + + if (dependencies !== null) { + var _respondersMap = dependencies.responders; + + if (_respondersMap !== null) { + // Unmount + var mountedResponders = Array.from(_respondersMap.keys()); + + for (var _i = 0, _length = mountedResponders.length; _i < _length; _i++) { + var mountedResponder = mountedResponders[_i]; + + if (!visistedResponders.has(mountedResponder)) { + var responderInstance = _respondersMap.get(mountedResponder); + + unmountResponderInstance(responderInstance); + + _respondersMap.delete(mountedResponder); + } + } + } + } + } + function createResponderListener(responder, props) { + var eventResponderListener = { + responder: responder, + props: props, + }; + + { + Object.freeze(eventResponderListener); + } + + return eventResponderListener; + } + + var NoEffect$1 = + /* */ + 0; + var UnmountSnapshot = + /* */ + 2; + var UnmountMutation = + /* */ + 4; + var MountMutation = + /* */ + 8; + var UnmountLayout = + /* */ + 16; + var MountLayout = + /* */ + 32; + var MountPassive = + /* */ + 64; + var UnmountPassive = + /* */ + 128; + + var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher; + var ReactCurrentBatchConfig$1 = ReactSharedInternals.ReactCurrentBatchConfig; + var didWarnAboutMismatchedHooksForComponent; + + { + didWarnAboutMismatchedHooksForComponent = new Set(); + } + + // These are set right before calling the component. + var renderExpirationTime$1 = NoWork; // The work-in-progress fiber. I've named it differently to distinguish it from + // the work-in-progress hook. + + var currentlyRenderingFiber$1 = null; // Hooks are stored as a linked list on the fiber's memoizedState field. The + // current hook list is the list that belongs to the current fiber. The + // work-in-progress hook list is a new list that will be added to the + // work-in-progress fiber. + + var currentHook = null; + var nextCurrentHook = null; + var firstWorkInProgressHook = null; + var workInProgressHook = null; + var nextWorkInProgressHook = null; + var remainingExpirationTime = NoWork; + var componentUpdateQueue = null; + var sideEffectTag = 0; // Updates scheduled during render will trigger an immediate re-render at the + // end of the current pass. We can't store these updates on the normal queue, + // because if the work is aborted, they should be discarded. Because this is + // a relatively rare case, we also don't want to add an additional field to + // either the hook or queue object types. So we store them in a lazily create + // map of queue -> render-phase updates, which are discarded once the component + // completes without re-rendering. + // Whether an update was scheduled during the currently executing render pass. + + var didScheduleRenderPhaseUpdate = false; // Lazily created map of render-phase updates + + var renderPhaseUpdates = null; // Counter to prevent infinite loops. + + var numberOfReRenders = 0; + var RE_RENDER_LIMIT = 25; // In DEV, this is the name of the currently executing primitive hook + + var currentHookNameInDev = null; // In DEV, this list ensures that hooks are called in the same order between renders. + // The list stores the order of hooks used during the initial render (mount). + // Subsequent renders (updates) reference this list. + + var hookTypesDev = null; + var hookTypesUpdateIndexDev = -1; // In DEV, this tracks whether currently rendering component needs to ignore + // the dependencies for Hooks that need them (e.g. useEffect or useMemo). + // When true, such Hooks will always be "remounted". Only used during hot reload. + + var ignorePreviousDependencies = false; + + function mountHookTypesDev() { + { + var hookName = currentHookNameInDev; + + if (hookTypesDev === null) { + hookTypesDev = [hookName]; + } else { + hookTypesDev.push(hookName); + } + } + } + + function updateHookTypesDev() { + { + var hookName = currentHookNameInDev; + + if (hookTypesDev !== null) { + hookTypesUpdateIndexDev++; + + if (hookTypesDev[hookTypesUpdateIndexDev] !== hookName) { + warnOnHookMismatchInDev(hookName); + } + } + } + } + + function checkDepsAreArrayDev(deps) { + { + if (deps !== undefined && deps !== null && !Array.isArray(deps)) { + // Verify deps, but only on mount to avoid extra checks. + // It's unlikely their type would change as usually you define them inline. + warning$1( + false, + '%s received a final argument that is not an array (instead, received `%s`). When ' + + 'specified, the final argument must be an array.', + currentHookNameInDev, + typeof deps, + ); + } + } + } + + function warnOnHookMismatchInDev(currentHookName) { + { + var componentName = getComponentName(currentlyRenderingFiber$1.type); + + if (!didWarnAboutMismatchedHooksForComponent.has(componentName)) { + didWarnAboutMismatchedHooksForComponent.add(componentName); + + if (hookTypesDev !== null) { + var table = ''; + var secondColumnStart = 30; + + for (var i = 0; i <= hookTypesUpdateIndexDev; i++) { + var oldHookName = hookTypesDev[i]; + var newHookName = i === hookTypesUpdateIndexDev ? currentHookName : oldHookName; + var row = i + 1 + '. ' + oldHookName; // Extra space so second column lines up + // lol @ IE not supporting String#repeat + + while (row.length < secondColumnStart) { + row += ' '; + } + + row += newHookName + '\n'; + table += row; + } + + warning$1( + false, + 'React has detected a change in the order of Hooks called by %s. ' + + 'This will lead to bugs and errors if not fixed. ' + + 'For more information, read the Rules of Hooks: https://fb.me/rules-of-hooks\n\n' + + ' Previous render Next render\n' + + ' ------------------------------------------------------\n' + + '%s' + + ' ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', + componentName, + table, + ); + } + } + } + } + + function throwInvalidHookError() { + { + { + throw Error( + 'Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.', + ); + } + } + } + + function areHookInputsEqual(nextDeps, prevDeps) { + { + if (ignorePreviousDependencies) { + // Only true when this component is being hot reloaded. + return false; + } + } + + if (prevDeps === null) { + { + warning$1( + false, + '%s received a final argument during this render, but not during ' + + 'the previous render. Even though the final argument is optional, ' + + 'its type cannot change between renders.', + currentHookNameInDev, + ); + } + + return false; + } + + { + // Don't bother comparing lengths in prod because these arrays should be + // passed inline. + if (nextDeps.length !== prevDeps.length) { + warning$1( + false, + 'The final argument passed to %s changed size between renders. The ' + + 'order and size of this array must remain constant.\n\n' + + 'Previous: %s\n' + + 'Incoming: %s', + currentHookNameInDev, + '[' + prevDeps.join(', ') + ']', + '[' + nextDeps.join(', ') + ']', + ); + } + } + + for (var i = 0; i < prevDeps.length && i < nextDeps.length; i++) { + if (is$1(nextDeps[i], prevDeps[i])) { + continue; + } + + return false; + } + + return true; + } + + function renderWithHooks( + current, + workInProgress, + Component, + props, + refOrContext, + nextRenderExpirationTime, + ) { + renderExpirationTime$1 = nextRenderExpirationTime; + currentlyRenderingFiber$1 = workInProgress; + nextCurrentHook = current !== null ? current.memoizedState : null; + + { + hookTypesDev = current !== null ? current._debugHookTypes : null; + hookTypesUpdateIndexDev = -1; // Used for hot reloading: + + ignorePreviousDependencies = current !== null && current.type !== workInProgress.type; + } // The following should have already been reset + // currentHook = null; + // workInProgressHook = null; + // remainingExpirationTime = NoWork; + // componentUpdateQueue = null; + // didScheduleRenderPhaseUpdate = false; + // renderPhaseUpdates = null; + // numberOfReRenders = 0; + // sideEffectTag = 0; + // TODO Warn if no hooks are used at all during mount, then some are used during update. + // Currently we will identify the update render as a mount because nextCurrentHook === null. + // This is tricky because it's valid for certain types of components (e.g. React.lazy) + // Using nextCurrentHook to differentiate between mount/update only works if at least one stateful hook is used. + // Non-stateful hooks (e.g. context) don't get added to memoizedState, + // so nextCurrentHook would be null during updates and mounts. + + { + if (nextCurrentHook !== null) { + ReactCurrentDispatcher$1.current = HooksDispatcherOnUpdateInDEV; + } else if (hookTypesDev !== null) { + // This dispatcher handles an edge case where a component is updating, + // but no stateful hooks have been used. + // We want to match the production code behavior (which will use HooksDispatcherOnMount), + // but with the extra DEV validation to ensure hooks ordering hasn't changed. + // This dispatcher does that. + ReactCurrentDispatcher$1.current = HooksDispatcherOnMountWithHookTypesInDEV; + } else { + ReactCurrentDispatcher$1.current = HooksDispatcherOnMountInDEV; + } + } + + var children = Component(props, refOrContext); + + if (didScheduleRenderPhaseUpdate) { + do { + didScheduleRenderPhaseUpdate = false; + numberOfReRenders += 1; + + { + // Even when hot reloading, allow dependencies to stabilize + // after first render to prevent infinite render phase updates. + ignorePreviousDependencies = false; + } // Start over from the beginning of the list + + nextCurrentHook = current !== null ? current.memoizedState : null; + nextWorkInProgressHook = firstWorkInProgressHook; + currentHook = null; + workInProgressHook = null; + componentUpdateQueue = null; + + { + // Also validate hook order for cascading updates. + hookTypesUpdateIndexDev = -1; + } + + ReactCurrentDispatcher$1.current = HooksDispatcherOnUpdateInDEV; + children = Component(props, refOrContext); + } while (didScheduleRenderPhaseUpdate); + + renderPhaseUpdates = null; + numberOfReRenders = 0; + } // We can assume the previous dispatcher is always this one, since we set it + // at the beginning of the render phase and there's no re-entrancy. + + ReactCurrentDispatcher$1.current = ContextOnlyDispatcher; + var renderedWork = currentlyRenderingFiber$1; + renderedWork.memoizedState = firstWorkInProgressHook; + renderedWork.expirationTime = remainingExpirationTime; + renderedWork.updateQueue = componentUpdateQueue; + renderedWork.effectTag |= sideEffectTag; + + { + renderedWork._debugHookTypes = hookTypesDev; + } // This check uses currentHook so that it works the same in DEV and prod bundles. + // hookTypesDev could catch more cases (e.g. context) but only in DEV bundles. + + var didRenderTooFewHooks = currentHook !== null && currentHook.next !== null; + renderExpirationTime$1 = NoWork; + currentlyRenderingFiber$1 = null; + currentHook = null; + nextCurrentHook = null; + firstWorkInProgressHook = null; + workInProgressHook = null; + nextWorkInProgressHook = null; + + { + currentHookNameInDev = null; + hookTypesDev = null; + hookTypesUpdateIndexDev = -1; + } + + remainingExpirationTime = NoWork; + componentUpdateQueue = null; + sideEffectTag = 0; // These were reset above + // didScheduleRenderPhaseUpdate = false; + // renderPhaseUpdates = null; + // numberOfReRenders = 0; + + if (!!didRenderTooFewHooks) { + { + throw Error( + 'Rendered fewer hooks than expected. This may be caused by an accidental early return statement.', + ); + } + } + + return children; + } + function bailoutHooks(current, workInProgress, expirationTime) { + workInProgress.updateQueue = current.updateQueue; + workInProgress.effectTag &= ~(Passive | Update); + + if (current.expirationTime <= expirationTime) { + current.expirationTime = NoWork; + } + } + function resetHooks() { + // We can assume the previous dispatcher is always this one, since we set it + // at the beginning of the render phase and there's no re-entrancy. + ReactCurrentDispatcher$1.current = ContextOnlyDispatcher; // This is used to reset the state of this module when a component throws. + // It's also called inside mountIndeterminateComponent if we determine the + // component is a module-style component. + + renderExpirationTime$1 = NoWork; + currentlyRenderingFiber$1 = null; + currentHook = null; + nextCurrentHook = null; + firstWorkInProgressHook = null; + workInProgressHook = null; + nextWorkInProgressHook = null; + + { + hookTypesDev = null; + hookTypesUpdateIndexDev = -1; + currentHookNameInDev = null; + } + + remainingExpirationTime = NoWork; + componentUpdateQueue = null; + sideEffectTag = 0; + didScheduleRenderPhaseUpdate = false; + renderPhaseUpdates = null; + numberOfReRenders = 0; + } + + function mountWorkInProgressHook() { + var hook = { + memoizedState: null, + baseState: null, + queue: null, + baseUpdate: null, + next: null, + }; + + if (workInProgressHook === null) { + // This is the first hook in the list + firstWorkInProgressHook = workInProgressHook = hook; + } else { + // Append to the end of the list + workInProgressHook = workInProgressHook.next = hook; + } + + return workInProgressHook; + } + + function updateWorkInProgressHook() { + // This function is used both for updates and for re-renders triggered by a + // render phase update. It assumes there is either a current hook we can + // clone, or a work-in-progress hook from a previous render pass that we can + // use as a base. When we reach the end of the base list, we must switch to + // the dispatcher used for mounts. + if (nextWorkInProgressHook !== null) { + // There's already a work-in-progress. Reuse it. + workInProgressHook = nextWorkInProgressHook; + nextWorkInProgressHook = workInProgressHook.next; + currentHook = nextCurrentHook; + nextCurrentHook = currentHook !== null ? currentHook.next : null; + } else { + // Clone from the current hook. + if (!(nextCurrentHook !== null)) { + { + throw Error('Rendered more hooks than during the previous render.'); + } + } + + currentHook = nextCurrentHook; + var newHook = { + memoizedState: currentHook.memoizedState, + baseState: currentHook.baseState, + queue: currentHook.queue, + baseUpdate: currentHook.baseUpdate, + next: null, + }; + + if (workInProgressHook === null) { + // This is the first hook in the list. + workInProgressHook = firstWorkInProgressHook = newHook; + } else { + // Append to the end of the list. + workInProgressHook = workInProgressHook.next = newHook; + } + + nextCurrentHook = currentHook.next; + } + + return workInProgressHook; + } + + function createFunctionComponentUpdateQueue() { + return { + lastEffect: null, + }; + } + + function basicStateReducer(state, action) { + return typeof action === 'function' ? action(state) : action; + } + + function mountReducer(reducer, initialArg, init) { + var hook = mountWorkInProgressHook(); + var initialState; + + if (init !== undefined) { + initialState = init(initialArg); + } else { + initialState = initialArg; + } + + hook.memoizedState = hook.baseState = initialState; + var queue = (hook.queue = { + last: null, + dispatch: null, + lastRenderedReducer: reducer, + lastRenderedState: initialState, + }); + var dispatch = (queue.dispatch = dispatchAction.bind( + null, // Flow doesn't know this is non-null, but we do. + currentlyRenderingFiber$1, + queue, + )); + return [hook.memoizedState, dispatch]; + } + + function updateReducer(reducer, initialArg, init) { + var hook = updateWorkInProgressHook(); + var queue = hook.queue; + + if (!(queue !== null)) { + { + throw Error('Should have a queue. This is likely a bug in React. Please file an issue.'); + } + } + + queue.lastRenderedReducer = reducer; + + if (numberOfReRenders > 0) { + // This is a re-render. Apply the new render phase updates to the previous + // work-in-progress hook. + var _dispatch = queue.dispatch; + + if (renderPhaseUpdates !== null) { + // Render phase updates are stored in a map of queue -> linked list + var firstRenderPhaseUpdate = renderPhaseUpdates.get(queue); + + if (firstRenderPhaseUpdate !== undefined) { + renderPhaseUpdates.delete(queue); + var newState = hook.memoizedState; + var update = firstRenderPhaseUpdate; + + do { + // Process this render phase update. We don't have to check the + // priority because it will always be the same as the current + // render's. + var action = update.action; + newState = reducer(newState, action); + update = update.next; + } while (update !== null); // Mark that the fiber performed work, but only if the new state is + // different from the current state. + + if (!is$1(newState, hook.memoizedState)) { + markWorkInProgressReceivedUpdate(); + } + + hook.memoizedState = newState; // Don't persist the state accumulated from the render phase updates to + // the base state unless the queue is empty. + // TODO: Not sure if this is the desired semantics, but it's what we + // do for gDSFP. I can't remember why. + + if (hook.baseUpdate === queue.last) { + hook.baseState = newState; + } + + queue.lastRenderedState = newState; + return [newState, _dispatch]; + } + } + + return [hook.memoizedState, _dispatch]; + } // The last update in the entire queue + + var last = queue.last; // The last update that is part of the base state. + + var baseUpdate = hook.baseUpdate; + var baseState = hook.baseState; // Find the first unprocessed update. + + var first; + + if (baseUpdate !== null) { + if (last !== null) { + // For the first update, the queue is a circular linked list where + // `queue.last.next = queue.first`. Once the first update commits, and + // the `baseUpdate` is no longer empty, we can unravel the list. + last.next = null; + } + + first = baseUpdate.next; + } else { + first = last !== null ? last.next : null; + } + + if (first !== null) { + var _newState = baseState; + var newBaseState = null; + var newBaseUpdate = null; + var prevUpdate = baseUpdate; + var _update = first; + var didSkip = false; + + do { + var updateExpirationTime = _update.expirationTime; + + if (updateExpirationTime < renderExpirationTime$1) { + // Priority is insufficient. Skip this update. If this is the first + // skipped update, the previous update/state is the new base + // update/state. + if (!didSkip) { + didSkip = true; + newBaseUpdate = prevUpdate; + newBaseState = _newState; + } // Update the remaining priority in the queue. + + if (updateExpirationTime > remainingExpirationTime) { + remainingExpirationTime = updateExpirationTime; + markUnprocessedUpdateTime(remainingExpirationTime); + } + } else { + // This update does have sufficient priority. + // Mark the event time of this update as relevant to this render pass. + // TODO: This should ideally use the true event time of this update rather than + // its priority which is a derived and not reverseable value. + // TODO: We should skip this update if it was already committed but currently + // we have no way of detecting the difference between a committed and suspended + // update here. + markRenderEventTimeAndConfig(updateExpirationTime, _update.suspenseConfig); // Process this update. + + if (_update.eagerReducer === reducer) { + // If this update was processed eagerly, and its reducer matches the + // current reducer, we can use the eagerly computed state. + _newState = _update.eagerState; + } else { + var _action = _update.action; + _newState = reducer(_newState, _action); + } + } + + prevUpdate = _update; + _update = _update.next; + } while (_update !== null && _update !== first); + + if (!didSkip) { + newBaseUpdate = prevUpdate; + newBaseState = _newState; + } // Mark that the fiber performed work, but only if the new state is + // different from the current state. + + if (!is$1(_newState, hook.memoizedState)) { + markWorkInProgressReceivedUpdate(); + } + + hook.memoizedState = _newState; + hook.baseUpdate = newBaseUpdate; + hook.baseState = newBaseState; + queue.lastRenderedState = _newState; + } + + var dispatch = queue.dispatch; + return [hook.memoizedState, dispatch]; + } + + function mountState(initialState) { + var hook = mountWorkInProgressHook(); + + if (typeof initialState === 'function') { + initialState = initialState(); + } + + hook.memoizedState = hook.baseState = initialState; + var queue = (hook.queue = { + last: null, + dispatch: null, + lastRenderedReducer: basicStateReducer, + lastRenderedState: initialState, + }); + var dispatch = (queue.dispatch = dispatchAction.bind( + null, // Flow doesn't know this is non-null, but we do. + currentlyRenderingFiber$1, + queue, + )); + return [hook.memoizedState, dispatch]; + } + + function updateState(initialState) { + return updateReducer(basicStateReducer, initialState); + } + + function pushEffect(tag, create, destroy, deps) { + var effect = { + tag: tag, + create: create, + destroy: destroy, + deps: deps, + // Circular + next: null, + }; + + if (componentUpdateQueue === null) { + componentUpdateQueue = createFunctionComponentUpdateQueue(); + componentUpdateQueue.lastEffect = effect.next = effect; + } else { + var lastEffect = componentUpdateQueue.lastEffect; + + if (lastEffect === null) { + componentUpdateQueue.lastEffect = effect.next = effect; + } else { + var firstEffect = lastEffect.next; + lastEffect.next = effect; + effect.next = firstEffect; + componentUpdateQueue.lastEffect = effect; + } + } + + return effect; + } + + function mountRef(initialValue) { + var hook = mountWorkInProgressHook(); + var ref = { + current: initialValue, + }; + + { + Object.seal(ref); + } + + hook.memoizedState = ref; + return ref; + } + + function updateRef(initialValue) { + var hook = updateWorkInProgressHook(); + return hook.memoizedState; + } + + function mountEffectImpl(fiberEffectTag, hookEffectTag, create, deps) { + var hook = mountWorkInProgressHook(); + var nextDeps = deps === undefined ? null : deps; + sideEffectTag |= fiberEffectTag; + hook.memoizedState = pushEffect(hookEffectTag, create, undefined, nextDeps); + } + + function updateEffectImpl(fiberEffectTag, hookEffectTag, create, deps) { + var hook = updateWorkInProgressHook(); + var nextDeps = deps === undefined ? null : deps; + var destroy = undefined; + + if (currentHook !== null) { + var prevEffect = currentHook.memoizedState; + destroy = prevEffect.destroy; + + if (nextDeps !== null) { + var prevDeps = prevEffect.deps; + + if (areHookInputsEqual(nextDeps, prevDeps)) { + pushEffect(NoEffect$1, create, destroy, nextDeps); + return; + } + } + } + + sideEffectTag |= fiberEffectTag; + hook.memoizedState = pushEffect(hookEffectTag, create, destroy, nextDeps); + } + + function mountEffect(create, deps) { + { + // $FlowExpectedError - jest isn't a global, and isn't recognized outside of tests + if ('undefined' !== typeof jest) { + warnIfNotCurrentlyActingEffectsInDEV(currentlyRenderingFiber$1); + } + } + + return mountEffectImpl(Update | Passive, UnmountPassive | MountPassive, create, deps); + } + + function updateEffect(create, deps) { + { + // $FlowExpectedError - jest isn't a global, and isn't recognized outside of tests + if ('undefined' !== typeof jest) { + warnIfNotCurrentlyActingEffectsInDEV(currentlyRenderingFiber$1); + } + } + + return updateEffectImpl(Update | Passive, UnmountPassive | MountPassive, create, deps); + } + + function mountLayoutEffect(create, deps) { + return mountEffectImpl(Update, UnmountMutation | MountLayout, create, deps); + } + + function updateLayoutEffect(create, deps) { + return updateEffectImpl(Update, UnmountMutation | MountLayout, create, deps); + } + + function imperativeHandleEffect(create, ref) { + if (typeof ref === 'function') { + var refCallback = ref; + + var _inst = create(); + + refCallback(_inst); + return function () { + refCallback(null); + }; + } else if (ref !== null && ref !== undefined) { + var refObject = ref; + + { + !refObject.hasOwnProperty('current') + ? warning$1( + false, + 'Expected useImperativeHandle() first argument to either be a ' + + 'ref callback or React.createRef() object. Instead received: %s.', + 'an object with keys {' + Object.keys(refObject).join(', ') + '}', + ) + : void 0; + } + + var _inst2 = create(); + + refObject.current = _inst2; + return function () { + refObject.current = null; + }; + } + } + + function mountImperativeHandle(ref, create, deps) { + { + !(typeof create === 'function') + ? warning$1( + false, + 'Expected useImperativeHandle() second argument to be a function ' + + 'that creates a handle. Instead received: %s.', + create !== null ? typeof create : 'null', + ) + : void 0; + } // TODO: If deps are provided, should we skip comparing the ref itself? + + var effectDeps = deps !== null && deps !== undefined ? deps.concat([ref]) : null; + return mountEffectImpl( + Update, + UnmountMutation | MountLayout, + imperativeHandleEffect.bind(null, create, ref), + effectDeps, + ); + } + + function updateImperativeHandle(ref, create, deps) { + { + !(typeof create === 'function') + ? warning$1( + false, + 'Expected useImperativeHandle() second argument to be a function ' + + 'that creates a handle. Instead received: %s.', + create !== null ? typeof create : 'null', + ) + : void 0; + } // TODO: If deps are provided, should we skip comparing the ref itself? + + var effectDeps = deps !== null && deps !== undefined ? deps.concat([ref]) : null; + return updateEffectImpl( + Update, + UnmountMutation | MountLayout, + imperativeHandleEffect.bind(null, create, ref), + effectDeps, + ); + } + + function mountDebugValue(value, formatterFn) { + // This hook is normally a no-op. + // The react-debug-hooks package injects its own implementation + // so that e.g. DevTools can display custom hook values. + } + + var updateDebugValue = mountDebugValue; + + function mountCallback(callback, deps) { + var hook = mountWorkInProgressHook(); + var nextDeps = deps === undefined ? null : deps; + hook.memoizedState = [callback, nextDeps]; + return callback; + } + + function updateCallback(callback, deps) { + var hook = updateWorkInProgressHook(); + var nextDeps = deps === undefined ? null : deps; + var prevState = hook.memoizedState; + + if (prevState !== null) { + if (nextDeps !== null) { + var prevDeps = prevState[1]; + + if (areHookInputsEqual(nextDeps, prevDeps)) { + return prevState[0]; + } + } + } + + hook.memoizedState = [callback, nextDeps]; + return callback; + } + + function mountMemo(nextCreate, deps) { + var hook = mountWorkInProgressHook(); + var nextDeps = deps === undefined ? null : deps; + var nextValue = nextCreate(); + hook.memoizedState = [nextValue, nextDeps]; + return nextValue; + } + + function updateMemo(nextCreate, deps) { + var hook = updateWorkInProgressHook(); + var nextDeps = deps === undefined ? null : deps; + var prevState = hook.memoizedState; + + if (prevState !== null) { + // Assume these are defined. If they're not, areHookInputsEqual will warn. + if (nextDeps !== null) { + var prevDeps = prevState[1]; + + if (areHookInputsEqual(nextDeps, prevDeps)) { + return prevState[0]; + } + } + } + + var nextValue = nextCreate(); + hook.memoizedState = [nextValue, nextDeps]; + return nextValue; + } + + function mountDeferredValue(value, config) { + var _mountState = mountState(value), + prevValue = _mountState[0], + setValue = _mountState[1]; + + mountEffect( + function () { + Scheduler.unstable_next(function () { + var previousConfig = ReactCurrentBatchConfig$1.suspense; + ReactCurrentBatchConfig$1.suspense = config === undefined ? null : config; + + try { + setValue(value); + } finally { + ReactCurrentBatchConfig$1.suspense = previousConfig; + } + }); + }, + [value, config], + ); + return prevValue; + } + + function updateDeferredValue(value, config) { + var _updateState = updateState(value), + prevValue = _updateState[0], + setValue = _updateState[1]; + + updateEffect( + function () { + Scheduler.unstable_next(function () { + var previousConfig = ReactCurrentBatchConfig$1.suspense; + ReactCurrentBatchConfig$1.suspense = config === undefined ? null : config; + + try { + setValue(value); + } finally { + ReactCurrentBatchConfig$1.suspense = previousConfig; + } + }); + }, + [value, config], + ); + return prevValue; + } + + function mountTransition(config) { + var _mountState2 = mountState(false), + isPending = _mountState2[0], + setPending = _mountState2[1]; + + var startTransition = mountCallback( + function (callback) { + setPending(true); + Scheduler.unstable_next(function () { + var previousConfig = ReactCurrentBatchConfig$1.suspense; + ReactCurrentBatchConfig$1.suspense = config === undefined ? null : config; + + try { + setPending(false); + callback(); + } finally { + ReactCurrentBatchConfig$1.suspense = previousConfig; + } + }); + }, + [config, isPending], + ); + return [startTransition, isPending]; + } + + function updateTransition(config) { + var _updateState2 = updateState(false), + isPending = _updateState2[0], + setPending = _updateState2[1]; + + var startTransition = updateCallback( + function (callback) { + setPending(true); + Scheduler.unstable_next(function () { + var previousConfig = ReactCurrentBatchConfig$1.suspense; + ReactCurrentBatchConfig$1.suspense = config === undefined ? null : config; + + try { + setPending(false); + callback(); + } finally { + ReactCurrentBatchConfig$1.suspense = previousConfig; + } + }); + }, + [config, isPending], + ); + return [startTransition, isPending]; + } + + function dispatchAction(fiber, queue, action) { + if (!(numberOfReRenders < RE_RENDER_LIMIT)) { + { + throw Error( + 'Too many re-renders. React limits the number of renders to prevent an infinite loop.', + ); + } + } + + { + !(typeof arguments[3] !== 'function') + ? warning$1( + false, + "State updates from the useState() and useReducer() Hooks don't support the " + + 'second callback argument. To execute a side effect after ' + + 'rendering, declare it in the component body with useEffect().', + ) + : void 0; + } + + var alternate = fiber.alternate; + + if ( + fiber === currentlyRenderingFiber$1 || + (alternate !== null && alternate === currentlyRenderingFiber$1) + ) { + // This is a render phase update. Stash it in a lazily-created map of + // queue -> linked list of updates. After this render pass, we'll restart + // and apply the stashed updates on top of the work-in-progress hook. + didScheduleRenderPhaseUpdate = true; + var update = { + expirationTime: renderExpirationTime$1, + suspenseConfig: null, + action: action, + eagerReducer: null, + eagerState: null, + next: null, + }; + + { + update.priority = getCurrentPriorityLevel(); + } + + if (renderPhaseUpdates === null) { + renderPhaseUpdates = new Map(); + } + + var firstRenderPhaseUpdate = renderPhaseUpdates.get(queue); + + if (firstRenderPhaseUpdate === undefined) { + renderPhaseUpdates.set(queue, update); + } else { + // Append the update to the end of the list. + var lastRenderPhaseUpdate = firstRenderPhaseUpdate; + + while (lastRenderPhaseUpdate.next !== null) { + lastRenderPhaseUpdate = lastRenderPhaseUpdate.next; + } + + lastRenderPhaseUpdate.next = update; + } + } else { + var currentTime = requestCurrentTimeForUpdate(); + var suspenseConfig = requestCurrentSuspenseConfig(); + var expirationTime = computeExpirationForFiber(currentTime, fiber, suspenseConfig); + var _update2 = { + expirationTime: expirationTime, + suspenseConfig: suspenseConfig, + action: action, + eagerReducer: null, + eagerState: null, + next: null, + }; + + { + _update2.priority = getCurrentPriorityLevel(); + } // Append the update to the end of the list. + + var last = queue.last; + + if (last === null) { + // This is the first update. Create a circular list. + _update2.next = _update2; + } else { + var first = last.next; + + if (first !== null) { + // Still circular. + _update2.next = first; + } + + last.next = _update2; + } + + queue.last = _update2; + + if ( + fiber.expirationTime === NoWork && + (alternate === null || alternate.expirationTime === NoWork) + ) { + // The queue is currently empty, which means we can eagerly compute the + // next state before entering the render phase. If the new state is the + // same as the current state, we may be able to bail out entirely. + var lastRenderedReducer = queue.lastRenderedReducer; + + if (lastRenderedReducer !== null) { + var prevDispatcher; + + { + prevDispatcher = ReactCurrentDispatcher$1.current; + ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV; + } + + try { + var currentState = queue.lastRenderedState; + var eagerState = lastRenderedReducer(currentState, action); // Stash the eagerly computed state, and the reducer used to compute + // it, on the update object. If the reducer hasn't changed by the + // time we enter the render phase, then the eager state can be used + // without calling the reducer again. + + _update2.eagerReducer = lastRenderedReducer; + _update2.eagerState = eagerState; + + if (is$1(eagerState, currentState)) { + // Fast path. We can bail out without scheduling React to re-render. + // It's still possible that we'll need to rebase this update later, + // if the component re-renders for a different reason and by that + // time the reducer has changed. + return; + } + } catch (error) { + // Suppress the error. It will throw again in the render phase. + } finally { + { + ReactCurrentDispatcher$1.current = prevDispatcher; + } + } + } + } + + { + // $FlowExpectedError - jest isn't a global, and isn't recognized outside of tests + if ('undefined' !== typeof jest) { + warnIfNotScopedWithMatchingAct(fiber); + warnIfNotCurrentlyActingUpdatesInDev(fiber); + } + } + + scheduleWork(fiber, expirationTime); + } + } + + var ContextOnlyDispatcher = { + readContext: readContext, + useCallback: throwInvalidHookError, + useContext: throwInvalidHookError, + useEffect: throwInvalidHookError, + useImperativeHandle: throwInvalidHookError, + useLayoutEffect: throwInvalidHookError, + useMemo: throwInvalidHookError, + useReducer: throwInvalidHookError, + useRef: throwInvalidHookError, + useState: throwInvalidHookError, + useDebugValue: throwInvalidHookError, + useResponder: throwInvalidHookError, + useDeferredValue: throwInvalidHookError, + useTransition: throwInvalidHookError, + }; + var HooksDispatcherOnMountInDEV = null; + var HooksDispatcherOnMountWithHookTypesInDEV = null; + var HooksDispatcherOnUpdateInDEV = null; + var InvalidNestedHooksDispatcherOnMountInDEV = null; + var InvalidNestedHooksDispatcherOnUpdateInDEV = null; + + { + var warnInvalidContextAccess = function () { + warning$1( + false, + 'Context can only be read while React is rendering. ' + + 'In classes, you can read it in the render method or getDerivedStateFromProps. ' + + 'In function components, you can read it directly in the function body, but not ' + + 'inside Hooks like useReducer() or useMemo().', + ); + }; + + var warnInvalidHookAccess = function () { + warning$1( + false, + 'Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. ' + + 'You can only call Hooks at the top level of your React function. ' + + 'For more information, see ' + + 'https://fb.me/rules-of-hooks', + ); + }; + + HooksDispatcherOnMountInDEV = { + readContext: function (context, observedBits) { + return readContext(context, observedBits); + }, + useCallback: function (callback, deps) { + currentHookNameInDev = 'useCallback'; + mountHookTypesDev(); + checkDepsAreArrayDev(deps); + return mountCallback(callback, deps); + }, + useContext: function (context, observedBits) { + currentHookNameInDev = 'useContext'; + mountHookTypesDev(); + return readContext(context, observedBits); + }, + useEffect: function (create, deps) { + currentHookNameInDev = 'useEffect'; + mountHookTypesDev(); + checkDepsAreArrayDev(deps); + return mountEffect(create, deps); + }, + useImperativeHandle: function (ref, create, deps) { + currentHookNameInDev = 'useImperativeHandle'; + mountHookTypesDev(); + checkDepsAreArrayDev(deps); + return mountImperativeHandle(ref, create, deps); + }, + useLayoutEffect: function (create, deps) { + currentHookNameInDev = 'useLayoutEffect'; + mountHookTypesDev(); + checkDepsAreArrayDev(deps); + return mountLayoutEffect(create, deps); + }, + useMemo: function (create, deps) { + currentHookNameInDev = 'useMemo'; + mountHookTypesDev(); + checkDepsAreArrayDev(deps); + var prevDispatcher = ReactCurrentDispatcher$1.current; + ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV; + + try { + return mountMemo(create, deps); + } finally { + ReactCurrentDispatcher$1.current = prevDispatcher; + } + }, + useReducer: function (reducer, initialArg, init) { + currentHookNameInDev = 'useReducer'; + mountHookTypesDev(); + var prevDispatcher = ReactCurrentDispatcher$1.current; + ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV; + + try { + return mountReducer(reducer, initialArg, init); + } finally { + ReactCurrentDispatcher$1.current = prevDispatcher; + } + }, + useRef: function (initialValue) { + currentHookNameInDev = 'useRef'; + mountHookTypesDev(); + return mountRef(initialValue); + }, + useState: function (initialState) { + currentHookNameInDev = 'useState'; + mountHookTypesDev(); + var prevDispatcher = ReactCurrentDispatcher$1.current; + ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV; + + try { + return mountState(initialState); + } finally { + ReactCurrentDispatcher$1.current = prevDispatcher; + } + }, + useDebugValue: function (value, formatterFn) { + currentHookNameInDev = 'useDebugValue'; + mountHookTypesDev(); + return mountDebugValue(value, formatterFn); + }, + useResponder: function (responder, props) { + currentHookNameInDev = 'useResponder'; + mountHookTypesDev(); + return createResponderListener(responder, props); + }, + useDeferredValue: function (value, config) { + currentHookNameInDev = 'useDeferredValue'; + mountHookTypesDev(); + return mountDeferredValue(value, config); + }, + useTransition: function (config) { + currentHookNameInDev = 'useTransition'; + mountHookTypesDev(); + return mountTransition(config); + }, + }; + HooksDispatcherOnMountWithHookTypesInDEV = { + readContext: function (context, observedBits) { + return readContext(context, observedBits); + }, + useCallback: function (callback, deps) { + currentHookNameInDev = 'useCallback'; + updateHookTypesDev(); + return mountCallback(callback, deps); + }, + useContext: function (context, observedBits) { + currentHookNameInDev = 'useContext'; + updateHookTypesDev(); + return readContext(context, observedBits); + }, + useEffect: function (create, deps) { + currentHookNameInDev = 'useEffect'; + updateHookTypesDev(); + return mountEffect(create, deps); + }, + useImperativeHandle: function (ref, create, deps) { + currentHookNameInDev = 'useImperativeHandle'; + updateHookTypesDev(); + return mountImperativeHandle(ref, create, deps); + }, + useLayoutEffect: function (create, deps) { + currentHookNameInDev = 'useLayoutEffect'; + updateHookTypesDev(); + return mountLayoutEffect(create, deps); + }, + useMemo: function (create, deps) { + currentHookNameInDev = 'useMemo'; + updateHookTypesDev(); + var prevDispatcher = ReactCurrentDispatcher$1.current; + ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV; + + try { + return mountMemo(create, deps); + } finally { + ReactCurrentDispatcher$1.current = prevDispatcher; + } + }, + useReducer: function (reducer, initialArg, init) { + currentHookNameInDev = 'useReducer'; + updateHookTypesDev(); + var prevDispatcher = ReactCurrentDispatcher$1.current; + ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV; + + try { + return mountReducer(reducer, initialArg, init); + } finally { + ReactCurrentDispatcher$1.current = prevDispatcher; + } + }, + useRef: function (initialValue) { + currentHookNameInDev = 'useRef'; + updateHookTypesDev(); + return mountRef(initialValue); + }, + useState: function (initialState) { + currentHookNameInDev = 'useState'; + updateHookTypesDev(); + var prevDispatcher = ReactCurrentDispatcher$1.current; + ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV; + + try { + return mountState(initialState); + } finally { + ReactCurrentDispatcher$1.current = prevDispatcher; + } + }, + useDebugValue: function (value, formatterFn) { + currentHookNameInDev = 'useDebugValue'; + updateHookTypesDev(); + return mountDebugValue(value, formatterFn); + }, + useResponder: function (responder, props) { + currentHookNameInDev = 'useResponder'; + updateHookTypesDev(); + return createResponderListener(responder, props); + }, + useDeferredValue: function (value, config) { + currentHookNameInDev = 'useDeferredValue'; + updateHookTypesDev(); + return mountDeferredValue(value, config); + }, + useTransition: function (config) { + currentHookNameInDev = 'useTransition'; + updateHookTypesDev(); + return mountTransition(config); + }, + }; + HooksDispatcherOnUpdateInDEV = { + readContext: function (context, observedBits) { + return readContext(context, observedBits); + }, + useCallback: function (callback, deps) { + currentHookNameInDev = 'useCallback'; + updateHookTypesDev(); + return updateCallback(callback, deps); + }, + useContext: function (context, observedBits) { + currentHookNameInDev = 'useContext'; + updateHookTypesDev(); + return readContext(context, observedBits); + }, + useEffect: function (create, deps) { + currentHookNameInDev = 'useEffect'; + updateHookTypesDev(); + return updateEffect(create, deps); + }, + useImperativeHandle: function (ref, create, deps) { + currentHookNameInDev = 'useImperativeHandle'; + updateHookTypesDev(); + return updateImperativeHandle(ref, create, deps); + }, + useLayoutEffect: function (create, deps) { + currentHookNameInDev = 'useLayoutEffect'; + updateHookTypesDev(); + return updateLayoutEffect(create, deps); + }, + useMemo: function (create, deps) { + currentHookNameInDev = 'useMemo'; + updateHookTypesDev(); + var prevDispatcher = ReactCurrentDispatcher$1.current; + ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV; + + try { + return updateMemo(create, deps); + } finally { + ReactCurrentDispatcher$1.current = prevDispatcher; + } + }, + useReducer: function (reducer, initialArg, init) { + currentHookNameInDev = 'useReducer'; + updateHookTypesDev(); + var prevDispatcher = ReactCurrentDispatcher$1.current; + ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV; + + try { + return updateReducer(reducer, initialArg, init); + } finally { + ReactCurrentDispatcher$1.current = prevDispatcher; + } + }, + useRef: function (initialValue) { + currentHookNameInDev = 'useRef'; + updateHookTypesDev(); + return updateRef(initialValue); + }, + useState: function (initialState) { + currentHookNameInDev = 'useState'; + updateHookTypesDev(); + var prevDispatcher = ReactCurrentDispatcher$1.current; + ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV; + + try { + return updateState(initialState); + } finally { + ReactCurrentDispatcher$1.current = prevDispatcher; + } + }, + useDebugValue: function (value, formatterFn) { + currentHookNameInDev = 'useDebugValue'; + updateHookTypesDev(); + return updateDebugValue(value, formatterFn); + }, + useResponder: function (responder, props) { + currentHookNameInDev = 'useResponder'; + updateHookTypesDev(); + return createResponderListener(responder, props); + }, + useDeferredValue: function (value, config) { + currentHookNameInDev = 'useDeferredValue'; + updateHookTypesDev(); + return updateDeferredValue(value, config); + }, + useTransition: function (config) { + currentHookNameInDev = 'useTransition'; + updateHookTypesDev(); + return updateTransition(config); + }, + }; + InvalidNestedHooksDispatcherOnMountInDEV = { + readContext: function (context, observedBits) { + warnInvalidContextAccess(); + return readContext(context, observedBits); + }, + useCallback: function (callback, deps) { + currentHookNameInDev = 'useCallback'; + warnInvalidHookAccess(); + mountHookTypesDev(); + return mountCallback(callback, deps); + }, + useContext: function (context, observedBits) { + currentHookNameInDev = 'useContext'; + warnInvalidHookAccess(); + mountHookTypesDev(); + return readContext(context, observedBits); + }, + useEffect: function (create, deps) { + currentHookNameInDev = 'useEffect'; + warnInvalidHookAccess(); + mountHookTypesDev(); + return mountEffect(create, deps); + }, + useImperativeHandle: function (ref, create, deps) { + currentHookNameInDev = 'useImperativeHandle'; + warnInvalidHookAccess(); + mountHookTypesDev(); + return mountImperativeHandle(ref, create, deps); + }, + useLayoutEffect: function (create, deps) { + currentHookNameInDev = 'useLayoutEffect'; + warnInvalidHookAccess(); + mountHookTypesDev(); + return mountLayoutEffect(create, deps); + }, + useMemo: function (create, deps) { + currentHookNameInDev = 'useMemo'; + warnInvalidHookAccess(); + mountHookTypesDev(); + var prevDispatcher = ReactCurrentDispatcher$1.current; + ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV; + + try { + return mountMemo(create, deps); + } finally { + ReactCurrentDispatcher$1.current = prevDispatcher; + } + }, + useReducer: function (reducer, initialArg, init) { + currentHookNameInDev = 'useReducer'; + warnInvalidHookAccess(); + mountHookTypesDev(); + var prevDispatcher = ReactCurrentDispatcher$1.current; + ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV; + + try { + return mountReducer(reducer, initialArg, init); + } finally { + ReactCurrentDispatcher$1.current = prevDispatcher; + } + }, + useRef: function (initialValue) { + currentHookNameInDev = 'useRef'; + warnInvalidHookAccess(); + mountHookTypesDev(); + return mountRef(initialValue); + }, + useState: function (initialState) { + currentHookNameInDev = 'useState'; + warnInvalidHookAccess(); + mountHookTypesDev(); + var prevDispatcher = ReactCurrentDispatcher$1.current; + ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV; + + try { + return mountState(initialState); + } finally { + ReactCurrentDispatcher$1.current = prevDispatcher; + } + }, + useDebugValue: function (value, formatterFn) { + currentHookNameInDev = 'useDebugValue'; + warnInvalidHookAccess(); + mountHookTypesDev(); + return mountDebugValue(value, formatterFn); + }, + useResponder: function (responder, props) { + currentHookNameInDev = 'useResponder'; + warnInvalidHookAccess(); + mountHookTypesDev(); + return createResponderListener(responder, props); + }, + useDeferredValue: function (value, config) { + currentHookNameInDev = 'useDeferredValue'; + warnInvalidHookAccess(); + mountHookTypesDev(); + return mountDeferredValue(value, config); + }, + useTransition: function (config) { + currentHookNameInDev = 'useTransition'; + warnInvalidHookAccess(); + mountHookTypesDev(); + return mountTransition(config); + }, + }; + InvalidNestedHooksDispatcherOnUpdateInDEV = { + readContext: function (context, observedBits) { + warnInvalidContextAccess(); + return readContext(context, observedBits); + }, + useCallback: function (callback, deps) { + currentHookNameInDev = 'useCallback'; + warnInvalidHookAccess(); + updateHookTypesDev(); + return updateCallback(callback, deps); + }, + useContext: function (context, observedBits) { + currentHookNameInDev = 'useContext'; + warnInvalidHookAccess(); + updateHookTypesDev(); + return readContext(context, observedBits); + }, + useEffect: function (create, deps) { + currentHookNameInDev = 'useEffect'; + warnInvalidHookAccess(); + updateHookTypesDev(); + return updateEffect(create, deps); + }, + useImperativeHandle: function (ref, create, deps) { + currentHookNameInDev = 'useImperativeHandle'; + warnInvalidHookAccess(); + updateHookTypesDev(); + return updateImperativeHandle(ref, create, deps); + }, + useLayoutEffect: function (create, deps) { + currentHookNameInDev = 'useLayoutEffect'; + warnInvalidHookAccess(); + updateHookTypesDev(); + return updateLayoutEffect(create, deps); + }, + useMemo: function (create, deps) { + currentHookNameInDev = 'useMemo'; + warnInvalidHookAccess(); + updateHookTypesDev(); + var prevDispatcher = ReactCurrentDispatcher$1.current; + ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV; + + try { + return updateMemo(create, deps); + } finally { + ReactCurrentDispatcher$1.current = prevDispatcher; + } + }, + useReducer: function (reducer, initialArg, init) { + currentHookNameInDev = 'useReducer'; + warnInvalidHookAccess(); + updateHookTypesDev(); + var prevDispatcher = ReactCurrentDispatcher$1.current; + ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV; + + try { + return updateReducer(reducer, initialArg, init); + } finally { + ReactCurrentDispatcher$1.current = prevDispatcher; + } + }, + useRef: function (initialValue) { + currentHookNameInDev = 'useRef'; + warnInvalidHookAccess(); + updateHookTypesDev(); + return updateRef(initialValue); + }, + useState: function (initialState) { + currentHookNameInDev = 'useState'; + warnInvalidHookAccess(); + updateHookTypesDev(); + var prevDispatcher = ReactCurrentDispatcher$1.current; + ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV; + + try { + return updateState(initialState); + } finally { + ReactCurrentDispatcher$1.current = prevDispatcher; + } + }, + useDebugValue: function (value, formatterFn) { + currentHookNameInDev = 'useDebugValue'; + warnInvalidHookAccess(); + updateHookTypesDev(); + return updateDebugValue(value, formatterFn); + }, + useResponder: function (responder, props) { + currentHookNameInDev = 'useResponder'; + warnInvalidHookAccess(); + updateHookTypesDev(); + return createResponderListener(responder, props); + }, + useDeferredValue: function (value, config) { + currentHookNameInDev = 'useDeferredValue'; + warnInvalidHookAccess(); + updateHookTypesDev(); + return updateDeferredValue(value, config); + }, + useTransition: function (config) { + currentHookNameInDev = 'useTransition'; + warnInvalidHookAccess(); + updateHookTypesDev(); + return updateTransition(config); + }, + }; + } + + // CommonJS interop named imports. + + var now$1 = Scheduler.unstable_now; + var commitTime = 0; + var profilerStartTime = -1; + + function getCommitTime() { + return commitTime; + } + + function recordCommitTime() { + if (!enableProfilerTimer) { + return; + } + + commitTime = now$1(); + } + + function startProfilerTimer(fiber) { + if (!enableProfilerTimer) { + return; + } + + profilerStartTime = now$1(); + + if (fiber.actualStartTime < 0) { + fiber.actualStartTime = now$1(); + } + } + + function stopProfilerTimerIfRunning(fiber) { + if (!enableProfilerTimer) { + return; + } + + profilerStartTime = -1; + } + + function stopProfilerTimerIfRunningAndRecordDelta(fiber, overrideBaseTime) { + if (!enableProfilerTimer) { + return; + } + + if (profilerStartTime >= 0) { + var elapsedTime = now$1() - profilerStartTime; + fiber.actualDuration += elapsedTime; + + if (overrideBaseTime) { + fiber.selfBaseDuration = elapsedTime; + } + + profilerStartTime = -1; + } + } + + // This may have been an insertion or a hydration. + + var hydrationParentFiber = null; + var nextHydratableInstance = null; + var isHydrating = false; + + function warnIfHydrating() { + { + !!isHydrating + ? warning$1( + false, + 'We should not be hydrating here. This is a bug in React. Please file a bug.', + ) + : void 0; + } + } + + function enterHydrationState(fiber) { + if (!supportsHydration) { + return false; + } + + var parentInstance = fiber.stateNode.containerInfo; + nextHydratableInstance = getFirstHydratableChild(parentInstance); + hydrationParentFiber = fiber; + isHydrating = true; + return true; + } + + function reenterHydrationStateFromDehydratedSuspenseInstance(fiber, suspenseInstance) { + if (!supportsHydration) { + return false; + } + + nextHydratableInstance = getNextHydratableSibling(suspenseInstance); + popToNextHostParent(fiber); + isHydrating = true; + return true; + } + + function deleteHydratableInstance(returnFiber, instance) { + { + switch (returnFiber.tag) { + case HostRoot: + didNotHydrateContainerInstance(returnFiber.stateNode.containerInfo, instance); + break; + + case HostComponent: + didNotHydrateInstance( + returnFiber.type, + returnFiber.memoizedProps, + returnFiber.stateNode, + instance, + ); + break; + } + } + + var childToDelete = createFiberFromHostInstanceForDeletion(); + childToDelete.stateNode = instance; + childToDelete.return = returnFiber; + childToDelete.effectTag = Deletion; // This might seem like it belongs on progressedFirstDeletion. However, + // these children are not part of the reconciliation list of children. + // Even if we abort and rereconcile the children, that will try to hydrate + // again and the nodes are still in the host tree so these will be + // recreated. + + if (returnFiber.lastEffect !== null) { + returnFiber.lastEffect.nextEffect = childToDelete; + returnFiber.lastEffect = childToDelete; + } else { + returnFiber.firstEffect = returnFiber.lastEffect = childToDelete; + } + } + + function insertNonHydratedInstance(returnFiber, fiber) { + fiber.effectTag = (fiber.effectTag & ~Hydrating) | Placement; + + { + switch (returnFiber.tag) { + case HostRoot: { + var parentContainer = returnFiber.stateNode.containerInfo; + + switch (fiber.tag) { + case HostComponent: + var type = fiber.type; + var props = fiber.pendingProps; + didNotFindHydratableContainerInstance(parentContainer, type, props); + break; + + case HostText: + var text = fiber.pendingProps; + didNotFindHydratableContainerTextInstance(parentContainer, text); + break; + + case SuspenseComponent: + break; + } + + break; + } + + case HostComponent: { + var parentType = returnFiber.type; + var parentProps = returnFiber.memoizedProps; + var parentInstance = returnFiber.stateNode; + + switch (fiber.tag) { + case HostComponent: + var _type = fiber.type; + var _props = fiber.pendingProps; + didNotFindHydratableInstance(parentType, parentProps, parentInstance, _type, _props); + break; + + case HostText: + var _text = fiber.pendingProps; + didNotFindHydratableTextInstance(parentType, parentProps, parentInstance, _text); + break; + + case SuspenseComponent: + didNotFindHydratableSuspenseInstance(parentType, parentProps, parentInstance); + break; + } + + break; + } + + default: + return; + } + } + } + + function tryHydrate(fiber, nextInstance) { + switch (fiber.tag) { + case HostComponent: { + var type = fiber.type; + var props = fiber.pendingProps; + var instance = canHydrateInstance(nextInstance, type, props); + + if (instance !== null) { + fiber.stateNode = instance; + return true; + } + + return false; + } + + case HostText: { + var text = fiber.pendingProps; + var textInstance = canHydrateTextInstance(nextInstance, text); + + if (textInstance !== null) { + fiber.stateNode = textInstance; + return true; + } + + return false; + } + + case SuspenseComponent: { + if (enableSuspenseServerRenderer) { + var suspenseInstance = canHydrateSuspenseInstance(nextInstance); + + if (suspenseInstance !== null) { + var suspenseState = { + dehydrated: suspenseInstance, + retryTime: Never, + }; + fiber.memoizedState = suspenseState; // Store the dehydrated fragment as a child fiber. + // This simplifies the code for getHostSibling and deleting nodes, + // since it doesn't have to consider all Suspense boundaries and + // check if they're dehydrated ones or not. + + var dehydratedFragment = createFiberFromDehydratedFragment(suspenseInstance); + dehydratedFragment.return = fiber; + fiber.child = dehydratedFragment; + return true; + } + } + + return false; + } + + default: + return false; + } + } + + function tryToClaimNextHydratableInstance(fiber) { + if (!isHydrating) { + return; + } + + var nextInstance = nextHydratableInstance; + + if (!nextInstance) { + // Nothing to hydrate. Make it an insertion. + insertNonHydratedInstance(hydrationParentFiber, fiber); + isHydrating = false; + hydrationParentFiber = fiber; + return; + } + + var firstAttemptedInstance = nextInstance; + + if (!tryHydrate(fiber, nextInstance)) { + // If we can't hydrate this instance let's try the next one. + // We use this as a heuristic. It's based on intuition and not data so it + // might be flawed or unnecessary. + nextInstance = getNextHydratableSibling(firstAttemptedInstance); + + if (!nextInstance || !tryHydrate(fiber, nextInstance)) { + // Nothing to hydrate. Make it an insertion. + insertNonHydratedInstance(hydrationParentFiber, fiber); + isHydrating = false; + hydrationParentFiber = fiber; + return; + } // We matched the next one, we'll now assume that the first one was + // superfluous and we'll delete it. Since we can't eagerly delete it + // we'll have to schedule a deletion. To do that, this node needs a dummy + // fiber associated with it. + + deleteHydratableInstance(hydrationParentFiber, firstAttemptedInstance); + } + + hydrationParentFiber = fiber; + nextHydratableInstance = getFirstHydratableChild(nextInstance); + } + + function prepareToHydrateHostInstance(fiber, rootContainerInstance, hostContext) { + if (!supportsHydration) { + { + { + throw Error( + 'Expected prepareToHydrateHostInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + } + + var instance = fiber.stateNode; + var updatePayload = hydrateInstance( + instance, + fiber.type, + fiber.memoizedProps, + rootContainerInstance, + hostContext, + fiber, + ); // TODO: Type this specific to this type of component. + + fiber.updateQueue = updatePayload; // If the update payload indicates that there is a change or if there + // is a new ref we mark this as an update. + + if (updatePayload !== null) { + return true; + } + + return false; + } + + function prepareToHydrateHostTextInstance(fiber) { + if (!supportsHydration) { + { + { + throw Error( + 'Expected prepareToHydrateHostTextInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + } + + var textInstance = fiber.stateNode; + var textContent = fiber.memoizedProps; + var shouldUpdate = hydrateTextInstance(textInstance, textContent, fiber); + + { + if (shouldUpdate) { + // We assume that prepareToHydrateHostTextInstance is called in a context where the + // hydration parent is the parent host component of this host text. + var returnFiber = hydrationParentFiber; + + if (returnFiber !== null) { + switch (returnFiber.tag) { + case HostRoot: { + var parentContainer = returnFiber.stateNode.containerInfo; + didNotMatchHydratedContainerTextInstance(parentContainer, textInstance, textContent); + break; + } + + case HostComponent: { + var parentType = returnFiber.type; + var parentProps = returnFiber.memoizedProps; + var parentInstance = returnFiber.stateNode; + didNotMatchHydratedTextInstance( + parentType, + parentProps, + parentInstance, + textInstance, + textContent, + ); + break; + } + } + } + } + } + + return shouldUpdate; + } + + function prepareToHydrateHostSuspenseInstance(fiber) { + if (!supportsHydration) { + { + { + throw Error( + 'Expected prepareToHydrateHostSuspenseInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + } + + var suspenseState = fiber.memoizedState; + var suspenseInstance = suspenseState !== null ? suspenseState.dehydrated : null; + + if (!suspenseInstance) { + { + throw Error( + 'Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + + hydrateSuspenseInstance(suspenseInstance, fiber); + } + + function skipPastDehydratedSuspenseInstance(fiber) { + if (!supportsHydration) { + { + { + throw Error( + 'Expected skipPastDehydratedSuspenseInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + } + + var suspenseState = fiber.memoizedState; + var suspenseInstance = suspenseState !== null ? suspenseState.dehydrated : null; + + if (!suspenseInstance) { + { + throw Error( + 'Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + + return getNextHydratableInstanceAfterSuspenseInstance(suspenseInstance); + } + + function popToNextHostParent(fiber) { + var parent = fiber.return; + + while ( + parent !== null && + parent.tag !== HostComponent && + parent.tag !== HostRoot && + parent.tag !== SuspenseComponent + ) { + parent = parent.return; + } + + hydrationParentFiber = parent; + } + + function popHydrationState(fiber) { + if (!supportsHydration) { + return false; + } + + if (fiber !== hydrationParentFiber) { + // We're deeper than the current hydration context, inside an inserted + // tree. + return false; + } + + if (!isHydrating) { + // If we're not currently hydrating but we're in a hydration context, then + // we were an insertion and now need to pop up reenter hydration of our + // siblings. + popToNextHostParent(fiber); + isHydrating = true; + return false; + } + + var type = fiber.type; // If we have any remaining hydratable nodes, we need to delete them now. + // We only do this deeper than head and body since they tend to have random + // other nodes in them. We also ignore components with pure text content in + // side of them. + // TODO: Better heuristic. + + if ( + fiber.tag !== HostComponent || + (type !== 'head' && type !== 'body' && !shouldSetTextContent(type, fiber.memoizedProps)) + ) { + var nextInstance = nextHydratableInstance; + + while (nextInstance) { + deleteHydratableInstance(fiber, nextInstance); + nextInstance = getNextHydratableSibling(nextInstance); + } + } + + popToNextHostParent(fiber); + + if (fiber.tag === SuspenseComponent) { + nextHydratableInstance = skipPastDehydratedSuspenseInstance(fiber); + } else { + nextHydratableInstance = hydrationParentFiber + ? getNextHydratableSibling(fiber.stateNode) + : null; + } + + return true; + } + + function resetHydrationState() { + if (!supportsHydration) { + return; + } + + hydrationParentFiber = null; + nextHydratableInstance = null; + isHydrating = false; + } + + var ReactCurrentOwner$3 = ReactSharedInternals.ReactCurrentOwner; + var didReceiveUpdate = false; + var didWarnAboutBadClass; + var didWarnAboutModulePatternComponent; + var didWarnAboutContextTypeOnFunctionComponent; + var didWarnAboutGetDerivedStateOnFunctionComponent; + var didWarnAboutFunctionRefs; + var didWarnAboutReassigningProps; + var didWarnAboutMaxDuration; + var didWarnAboutRevealOrder; + var didWarnAboutTailOptions; + var didWarnAboutDefaultPropsOnFunctionComponent; + + { + didWarnAboutBadClass = {}; + didWarnAboutModulePatternComponent = {}; + didWarnAboutContextTypeOnFunctionComponent = {}; + didWarnAboutGetDerivedStateOnFunctionComponent = {}; + didWarnAboutFunctionRefs = {}; + didWarnAboutReassigningProps = false; + didWarnAboutMaxDuration = false; + didWarnAboutRevealOrder = {}; + didWarnAboutTailOptions = {}; + didWarnAboutDefaultPropsOnFunctionComponent = {}; + } + + function reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime) { + if (current$$1 === null) { + // If this is a fresh new component that hasn't been rendered yet, we + // won't update its child set by applying minimal side-effects. Instead, + // we will add them all to the child before it gets rendered. That means + // we can optimize this reconciliation pass by not tracking side-effects. + workInProgress.child = mountChildFibers( + workInProgress, + null, + nextChildren, + renderExpirationTime, + ); + } else { + // If the current child is the same as the work in progress, it means that + // we haven't yet started any work on these children. Therefore, we use + // the clone algorithm to create a copy of all the current children. + // If we had any progressed work already, that is invalid at this point so + // let's throw it out. + workInProgress.child = reconcileChildFibers( + workInProgress, + current$$1.child, + nextChildren, + renderExpirationTime, + ); + } + } + + function forceUnmountCurrentAndReconcile( + current$$1, + workInProgress, + nextChildren, + renderExpirationTime, + ) { + // This function is fork of reconcileChildren. It's used in cases where we + // want to reconcile without matching against the existing set. This has the + // effect of all current children being unmounted; even if the type and key + // are the same, the old child is unmounted and a new child is created. + // + // To do this, we're going to go through the reconcile algorithm twice. In + // the first pass, we schedule a deletion for all the current children by + // passing null. + workInProgress.child = reconcileChildFibers( + workInProgress, + current$$1.child, + null, + renderExpirationTime, + ); // In the second pass, we mount the new children. The trick here is that we + // pass null in place of where we usually pass the current child set. This has + // the effect of remounting all children regardless of whether their their + // identity matches. + + workInProgress.child = reconcileChildFibers( + workInProgress, + null, + nextChildren, + renderExpirationTime, + ); + } + + function updateForwardRef(current$$1, workInProgress, Component, nextProps, renderExpirationTime) { + // TODO: current can be non-null here even if the component + // hasn't yet mounted. This happens after the first render suspends. + // We'll need to figure out if this is fine or can cause issues. + { + if (workInProgress.type !== workInProgress.elementType) { + // Lazy component props can't be validated in createElement + // because they're only guaranteed to be resolved here. + var innerPropTypes = Component.propTypes; + + if (innerPropTypes) { + checkPropTypes( + innerPropTypes, + nextProps, // Resolved props + 'prop', + getComponentName(Component), + getCurrentFiberStackInDev, + ); + } + } + } + + var render = Component.render; + var ref = workInProgress.ref; // The rest is a fork of updateFunctionComponent + + var nextChildren; + prepareToReadContext(workInProgress, renderExpirationTime); + + { + ReactCurrentOwner$3.current = workInProgress; + setCurrentPhase('render'); + nextChildren = renderWithHooks( + current$$1, + workInProgress, + render, + nextProps, + ref, + renderExpirationTime, + ); + + if (debugRenderPhaseSideEffectsForStrictMode && workInProgress.mode & StrictMode) { + // Only double-render components with Hooks + if (workInProgress.memoizedState !== null) { + nextChildren = renderWithHooks( + current$$1, + workInProgress, + render, + nextProps, + ref, + renderExpirationTime, + ); + } + } + + setCurrentPhase(null); + } + + if (current$$1 !== null && !didReceiveUpdate) { + bailoutHooks(current$$1, workInProgress, renderExpirationTime); + return bailoutOnAlreadyFinishedWork(current$$1, workInProgress, renderExpirationTime); + } // React DevTools reads this flag. + + workInProgress.effectTag |= PerformedWork; + reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime); + return workInProgress.child; + } + + function updateMemoComponent( + current$$1, + workInProgress, + Component, + nextProps, + updateExpirationTime, + renderExpirationTime, + ) { + if (current$$1 === null) { + var type = Component.type; + + if ( + isSimpleFunctionComponent(type) && + Component.compare === null && // SimpleMemoComponent codepath doesn't resolve outer props either. + Component.defaultProps === undefined + ) { + var resolvedType = type; + + { + resolvedType = resolveFunctionForHotReloading(type); + } // If this is a plain function component without default props, + // and with only the default shallow comparison, we upgrade it + // to a SimpleMemoComponent to allow fast path updates. + + workInProgress.tag = SimpleMemoComponent; + workInProgress.type = resolvedType; + + { + validateFunctionComponentInDev(workInProgress, type); + } + + return updateSimpleMemoComponent( + current$$1, + workInProgress, + resolvedType, + nextProps, + updateExpirationTime, + renderExpirationTime, + ); + } + + { + var innerPropTypes = type.propTypes; + + if (innerPropTypes) { + // Inner memo component props aren't currently validated in createElement. + // We could move it there, but we'd still need this for lazy code path. + checkPropTypes( + innerPropTypes, + nextProps, // Resolved props + 'prop', + getComponentName(type), + getCurrentFiberStackInDev, + ); + } + } + + var child = createFiberFromTypeAndProps( + Component.type, + null, + nextProps, + null, + workInProgress.mode, + renderExpirationTime, + ); + child.ref = workInProgress.ref; + child.return = workInProgress; + workInProgress.child = child; + return child; + } + + { + var _type = Component.type; + var _innerPropTypes = _type.propTypes; + + if (_innerPropTypes) { + // Inner memo component props aren't currently validated in createElement. + // We could move it there, but we'd still need this for lazy code path. + checkPropTypes( + _innerPropTypes, + nextProps, // Resolved props + 'prop', + getComponentName(_type), + getCurrentFiberStackInDev, + ); + } + } + + var currentChild = current$$1.child; // This is always exactly one child + + if (updateExpirationTime < renderExpirationTime) { + // This will be the props with resolved defaultProps, + // unlike current.memoizedProps which will be the unresolved ones. + var prevProps = currentChild.memoizedProps; // Default to shallow comparison + + var compare = Component.compare; + compare = compare !== null ? compare : shallowEqual; + + if (compare(prevProps, nextProps) && current$$1.ref === workInProgress.ref) { + return bailoutOnAlreadyFinishedWork(current$$1, workInProgress, renderExpirationTime); + } + } // React DevTools reads this flag. + + workInProgress.effectTag |= PerformedWork; + var newChild = createWorkInProgress(currentChild, nextProps, renderExpirationTime); + newChild.ref = workInProgress.ref; + newChild.return = workInProgress; + workInProgress.child = newChild; + return newChild; + } + + function updateSimpleMemoComponent( + current$$1, + workInProgress, + Component, + nextProps, + updateExpirationTime, + renderExpirationTime, + ) { + // TODO: current can be non-null here even if the component + // hasn't yet mounted. This happens when the inner render suspends. + // We'll need to figure out if this is fine or can cause issues. + { + if (workInProgress.type !== workInProgress.elementType) { + // Lazy component props can't be validated in createElement + // because they're only guaranteed to be resolved here. + var outerMemoType = workInProgress.elementType; + + if (outerMemoType.$$typeof === REACT_LAZY_TYPE) { + // We warn when you define propTypes on lazy() + // so let's just skip over it to find memo() outer wrapper. + // Inner props for memo are validated later. + outerMemoType = refineResolvedLazyComponent(outerMemoType); + } + + var outerPropTypes = outerMemoType && outerMemoType.propTypes; + + if (outerPropTypes) { + checkPropTypes( + outerPropTypes, + nextProps, // Resolved (SimpleMemoComponent has no defaultProps) + 'prop', + getComponentName(outerMemoType), + getCurrentFiberStackInDev, + ); + } // Inner propTypes will be validated in the function component path. + } + } + + if (current$$1 !== null) { + var prevProps = current$$1.memoizedProps; + + if ( + shallowEqual(prevProps, nextProps) && + current$$1.ref === workInProgress.ref && // Prevent bailout if the implementation changed due to hot reload: + workInProgress.type === current$$1.type + ) { + didReceiveUpdate = false; + + if (updateExpirationTime < renderExpirationTime) { + return bailoutOnAlreadyFinishedWork(current$$1, workInProgress, renderExpirationTime); + } + } + } + + return updateFunctionComponent( + current$$1, + workInProgress, + Component, + nextProps, + renderExpirationTime, + ); + } + + function updateFragment(current$$1, workInProgress, renderExpirationTime) { + var nextChildren = workInProgress.pendingProps; + reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime); + return workInProgress.child; + } + + function updateMode(current$$1, workInProgress, renderExpirationTime) { + var nextChildren = workInProgress.pendingProps.children; + reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime); + return workInProgress.child; + } + + function updateProfiler(current$$1, workInProgress, renderExpirationTime) { + if (enableProfilerTimer) { + workInProgress.effectTag |= Update; + } + + var nextProps = workInProgress.pendingProps; + var nextChildren = nextProps.children; + reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime); + return workInProgress.child; + } + + function markRef(current$$1, workInProgress) { + var ref = workInProgress.ref; + + if ((current$$1 === null && ref !== null) || (current$$1 !== null && current$$1.ref !== ref)) { + // Schedule a Ref effect + workInProgress.effectTag |= Ref; + } + } + + function updateFunctionComponent( + current$$1, + workInProgress, + Component, + nextProps, + renderExpirationTime, + ) { + { + if (workInProgress.type !== workInProgress.elementType) { + // Lazy component props can't be validated in createElement + // because they're only guaranteed to be resolved here. + var innerPropTypes = Component.propTypes; + + if (innerPropTypes) { + checkPropTypes( + innerPropTypes, + nextProps, // Resolved props + 'prop', + getComponentName(Component), + getCurrentFiberStackInDev, + ); + } + } + } + + var context; + + if (!disableLegacyContext) { + var unmaskedContext = getUnmaskedContext(workInProgress, Component, true); + context = getMaskedContext(workInProgress, unmaskedContext); + } + + var nextChildren; + prepareToReadContext(workInProgress, renderExpirationTime); + + { + ReactCurrentOwner$3.current = workInProgress; + setCurrentPhase('render'); + nextChildren = renderWithHooks( + current$$1, + workInProgress, + Component, + nextProps, + context, + renderExpirationTime, + ); + + if (debugRenderPhaseSideEffectsForStrictMode && workInProgress.mode & StrictMode) { + // Only double-render components with Hooks + if (workInProgress.memoizedState !== null) { + nextChildren = renderWithHooks( + current$$1, + workInProgress, + Component, + nextProps, + context, + renderExpirationTime, + ); + } + } + + setCurrentPhase(null); + } + + if (current$$1 !== null && !didReceiveUpdate) { + bailoutHooks(current$$1, workInProgress, renderExpirationTime); + return bailoutOnAlreadyFinishedWork(current$$1, workInProgress, renderExpirationTime); + } // React DevTools reads this flag. + + workInProgress.effectTag |= PerformedWork; + reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime); + return workInProgress.child; + } + + function updateClassComponent( + current$$1, + workInProgress, + Component, + nextProps, + renderExpirationTime, + ) { + { + if (workInProgress.type !== workInProgress.elementType) { + // Lazy component props can't be validated in createElement + // because they're only guaranteed to be resolved here. + var innerPropTypes = Component.propTypes; + + if (innerPropTypes) { + checkPropTypes( + innerPropTypes, + nextProps, // Resolved props + 'prop', + getComponentName(Component), + getCurrentFiberStackInDev, + ); + } + } + } // Push context providers early to prevent context stack mismatches. + // During mounting we don't know the child context yet as the instance doesn't exist. + // We will invalidate the child context in finishClassComponent() right after rendering. + + var hasContext; + + if (isContextProvider(Component)) { + hasContext = true; + pushContextProvider(workInProgress); + } else { + hasContext = false; + } + + prepareToReadContext(workInProgress, renderExpirationTime); + var instance = workInProgress.stateNode; + var shouldUpdate; + + if (instance === null) { + if (current$$1 !== null) { + // An class component without an instance only mounts if it suspended + // inside a non- concurrent tree, in an inconsistent state. We want to + // tree it like a new mount, even though an empty version of it already + // committed. Disconnect the alternate pointers. + current$$1.alternate = null; + workInProgress.alternate = null; // Since this is conceptually a new fiber, schedule a Placement effect + + workInProgress.effectTag |= Placement; + } // In the initial pass we might need to construct the instance. + + constructClassInstance(workInProgress, Component, nextProps, renderExpirationTime); + mountClassInstance(workInProgress, Component, nextProps, renderExpirationTime); + shouldUpdate = true; + } else if (current$$1 === null) { + // In a resume, we'll already have an instance we can reuse. + shouldUpdate = resumeMountClassInstance( + workInProgress, + Component, + nextProps, + renderExpirationTime, + ); + } else { + shouldUpdate = updateClassInstance( + current$$1, + workInProgress, + Component, + nextProps, + renderExpirationTime, + ); + } + + var nextUnitOfWork = finishClassComponent( + current$$1, + workInProgress, + Component, + shouldUpdate, + hasContext, + renderExpirationTime, + ); + + { + var inst = workInProgress.stateNode; + + if (inst.props !== nextProps) { + !didWarnAboutReassigningProps + ? warning$1( + false, + 'It looks like %s is reassigning its own `this.props` while rendering. ' + + 'This is not supported and can lead to confusing bugs.', + getComponentName(workInProgress.type) || 'a component', + ) + : void 0; + didWarnAboutReassigningProps = true; + } + } + + return nextUnitOfWork; + } + + function finishClassComponent( + current$$1, + workInProgress, + Component, + shouldUpdate, + hasContext, + renderExpirationTime, + ) { + // Refs should update even if shouldComponentUpdate returns false + markRef(current$$1, workInProgress); + var didCaptureError = (workInProgress.effectTag & DidCapture) !== NoEffect; + + if (!shouldUpdate && !didCaptureError) { + // Context providers should defer to sCU for rendering + if (hasContext) { + invalidateContextProvider(workInProgress, Component, false); + } + + return bailoutOnAlreadyFinishedWork(current$$1, workInProgress, renderExpirationTime); + } + + var instance = workInProgress.stateNode; // Rerender + + ReactCurrentOwner$3.current = workInProgress; + var nextChildren; + + if (didCaptureError && typeof Component.getDerivedStateFromError !== 'function') { + // If we captured an error, but getDerivedStateFrom catch is not defined, + // unmount all the children. componentDidCatch will schedule an update to + // re-render a fallback. This is temporary until we migrate everyone to + // the new API. + // TODO: Warn in a future release. + nextChildren = null; + + if (enableProfilerTimer) { + stopProfilerTimerIfRunning(workInProgress); + } + } else { + { + setCurrentPhase('render'); + nextChildren = instance.render(); + + if (debugRenderPhaseSideEffectsForStrictMode && workInProgress.mode & StrictMode) { + instance.render(); + } + + setCurrentPhase(null); + } + } // React DevTools reads this flag. + + workInProgress.effectTag |= PerformedWork; + + if (current$$1 !== null && didCaptureError) { + // If we're recovering from an error, reconcile without reusing any of + // the existing children. Conceptually, the normal children and the children + // that are shown on error are two different sets, so we shouldn't reuse + // normal children even if their identities match. + forceUnmountCurrentAndReconcile(current$$1, workInProgress, nextChildren, renderExpirationTime); + } else { + reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime); + } // Memoize state using the values we just used to render. + // TODO: Restructure so we never read values from the instance. + + workInProgress.memoizedState = instance.state; // The context might have changed so we need to recalculate it. + + if (hasContext) { + invalidateContextProvider(workInProgress, Component, true); + } + + return workInProgress.child; + } + + function pushHostRootContext(workInProgress) { + var root = workInProgress.stateNode; + + if (root.pendingContext) { + pushTopLevelContextObject( + workInProgress, + root.pendingContext, + root.pendingContext !== root.context, + ); + } else if (root.context) { + // Should always be set + pushTopLevelContextObject(workInProgress, root.context, false); + } + + pushHostContainer(workInProgress, root.containerInfo); + } + + function updateHostRoot(current$$1, workInProgress, renderExpirationTime) { + pushHostRootContext(workInProgress); + var updateQueue = workInProgress.updateQueue; + + if (!(updateQueue !== null)) { + { + throw Error( + 'If the root does not have an updateQueue, we should have already bailed out. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + + var nextProps = workInProgress.pendingProps; + var prevState = workInProgress.memoizedState; + var prevChildren = prevState !== null ? prevState.element : null; + processUpdateQueue(workInProgress, updateQueue, nextProps, null, renderExpirationTime); + var nextState = workInProgress.memoizedState; // Caution: React DevTools currently depends on this property + // being called "element". + + var nextChildren = nextState.element; + + if (nextChildren === prevChildren) { + // If the state is the same as before, that's a bailout because we had + // no work that expires at this time. + resetHydrationState(); + return bailoutOnAlreadyFinishedWork(current$$1, workInProgress, renderExpirationTime); + } + + var root = workInProgress.stateNode; + + if (root.hydrate && enterHydrationState(workInProgress)) { + // If we don't have any current children this might be the first pass. + // We always try to hydrate. If this isn't a hydration pass there won't + // be any children to hydrate which is effectively the same thing as + // not hydrating. + var child = mountChildFibers(workInProgress, null, nextChildren, renderExpirationTime); + workInProgress.child = child; + var node = child; + + while (node) { + // Mark each child as hydrating. This is a fast path to know whether this + // tree is part of a hydrating tree. This is used to determine if a child + // node has fully mounted yet, and for scheduling event replaying. + // Conceptually this is similar to Placement in that a new subtree is + // inserted into the React tree here. It just happens to not need DOM + // mutations because it already exists. + node.effectTag = (node.effectTag & ~Placement) | Hydrating; + node = node.sibling; + } + } else { + // Otherwise reset hydration state in case we aborted and resumed another + // root. + reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime); + resetHydrationState(); + } + + return workInProgress.child; + } + + function updateHostComponent(current$$1, workInProgress, renderExpirationTime) { + pushHostContext(workInProgress); + + if (current$$1 === null) { + tryToClaimNextHydratableInstance(workInProgress); + } + + var type = workInProgress.type; + var nextProps = workInProgress.pendingProps; + var prevProps = current$$1 !== null ? current$$1.memoizedProps : null; + var nextChildren = nextProps.children; + var isDirectTextChild = shouldSetTextContent(type, nextProps); + + if (isDirectTextChild) { + // We special case a direct text child of a host node. This is a common + // case. We won't handle it as a reified child. We will instead handle + // this in the host environment that also have access to this prop. That + // avoids allocating another HostText fiber and traversing it. + nextChildren = null; + } else if (prevProps !== null && shouldSetTextContent(type, prevProps)) { + // If we're switching from a direct text child to a normal child, or to + // empty, we need to schedule the text content to be reset. + workInProgress.effectTag |= ContentReset; + } + + markRef(current$$1, workInProgress); // Check the host config to see if the children are offscreen/hidden. + + if ( + workInProgress.mode & ConcurrentMode && + renderExpirationTime !== Never && + shouldDeprioritizeSubtree(type, nextProps) + ) { + if (enableSchedulerTracing) { + markSpawnedWork(Never); + } // Schedule this fiber to re-render at offscreen priority. Then bailout. + + workInProgress.expirationTime = workInProgress.childExpirationTime = Never; + return null; + } + + reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime); + return workInProgress.child; + } + + function updateHostText(current$$1, workInProgress) { + if (current$$1 === null) { + tryToClaimNextHydratableInstance(workInProgress); + } // Nothing to do here. This is terminal. We'll do the completion step + // immediately after. + + return null; + } + + function mountLazyComponent( + _current, + workInProgress, + elementType, + updateExpirationTime, + renderExpirationTime, + ) { + if (_current !== null) { + // An lazy component only mounts if it suspended inside a non- + // concurrent tree, in an inconsistent state. We want to treat it like + // a new mount, even though an empty version of it already committed. + // Disconnect the alternate pointers. + _current.alternate = null; + workInProgress.alternate = null; // Since this is conceptually a new fiber, schedule a Placement effect + + workInProgress.effectTag |= Placement; + } + + var props = workInProgress.pendingProps; // We can't start a User Timing measurement with correct label yet. + // Cancel and resume right after we know the tag. + + cancelWorkTimer(workInProgress); + var Component = readLazyComponentType(elementType); // Store the unwrapped component in the type. + + workInProgress.type = Component; + var resolvedTag = (workInProgress.tag = resolveLazyComponentTag(Component)); + startWorkTimer(workInProgress); + var resolvedProps = resolveDefaultProps(Component, props); + var child; + + switch (resolvedTag) { + case FunctionComponent: { + { + validateFunctionComponentInDev(workInProgress, Component); + workInProgress.type = Component = resolveFunctionForHotReloading(Component); + } + + child = updateFunctionComponent( + null, + workInProgress, + Component, + resolvedProps, + renderExpirationTime, + ); + break; + } + + case ClassComponent: { + { + workInProgress.type = Component = resolveClassForHotReloading(Component); + } + + child = updateClassComponent( + null, + workInProgress, + Component, + resolvedProps, + renderExpirationTime, + ); + break; + } + + case ForwardRef: { + { + workInProgress.type = Component = resolveForwardRefForHotReloading(Component); + } + + child = updateForwardRef( + null, + workInProgress, + Component, + resolvedProps, + renderExpirationTime, + ); + break; + } + + case MemoComponent: { + { + if (workInProgress.type !== workInProgress.elementType) { + var outerPropTypes = Component.propTypes; + + if (outerPropTypes) { + checkPropTypes( + outerPropTypes, + resolvedProps, // Resolved for outer only + 'prop', + getComponentName(Component), + getCurrentFiberStackInDev, + ); + } + } + } + + child = updateMemoComponent( + null, + workInProgress, + Component, + resolveDefaultProps(Component.type, resolvedProps), // The inner type can have defaults too + updateExpirationTime, + renderExpirationTime, + ); + break; + } + + default: { + var hint = ''; + + { + if ( + Component !== null && + typeof Component === 'object' && + Component.$$typeof === REACT_LAZY_TYPE + ) { + hint = ' Did you wrap a component in React.lazy() more than once?'; + } + } // This message intentionally doesn't mention ForwardRef or MemoComponent + // because the fact that it's a separate type of work is an + // implementation detail. + + { + { + throw Error( + 'Element type is invalid. Received a promise that resolves to: ' + + Component + + '. Lazy element type must resolve to a class or function.' + + hint, + ); + } + } + } + } + + return child; + } + + function mountIncompleteClassComponent( + _current, + workInProgress, + Component, + nextProps, + renderExpirationTime, + ) { + if (_current !== null) { + // An incomplete component only mounts if it suspended inside a non- + // concurrent tree, in an inconsistent state. We want to treat it like + // a new mount, even though an empty version of it already committed. + // Disconnect the alternate pointers. + _current.alternate = null; + workInProgress.alternate = null; // Since this is conceptually a new fiber, schedule a Placement effect + + workInProgress.effectTag |= Placement; + } // Promote the fiber to a class and try rendering again. + + workInProgress.tag = ClassComponent; // The rest of this function is a fork of `updateClassComponent` + // Push context providers early to prevent context stack mismatches. + // During mounting we don't know the child context yet as the instance doesn't exist. + // We will invalidate the child context in finishClassComponent() right after rendering. + + var hasContext; + + if (isContextProvider(Component)) { + hasContext = true; + pushContextProvider(workInProgress); + } else { + hasContext = false; + } + + prepareToReadContext(workInProgress, renderExpirationTime); + constructClassInstance(workInProgress, Component, nextProps, renderExpirationTime); + mountClassInstance(workInProgress, Component, nextProps, renderExpirationTime); + return finishClassComponent( + null, + workInProgress, + Component, + true, + hasContext, + renderExpirationTime, + ); + } + + function mountIndeterminateComponent(_current, workInProgress, Component, renderExpirationTime) { + if (_current !== null) { + // An indeterminate component only mounts if it suspended inside a non- + // concurrent tree, in an inconsistent state. We want to treat it like + // a new mount, even though an empty version of it already committed. + // Disconnect the alternate pointers. + _current.alternate = null; + workInProgress.alternate = null; // Since this is conceptually a new fiber, schedule a Placement effect + + workInProgress.effectTag |= Placement; + } + + var props = workInProgress.pendingProps; + var context; + + if (!disableLegacyContext) { + var unmaskedContext = getUnmaskedContext(workInProgress, Component, false); + context = getMaskedContext(workInProgress, unmaskedContext); + } + + prepareToReadContext(workInProgress, renderExpirationTime); + var value; + + { + if (Component.prototype && typeof Component.prototype.render === 'function') { + var componentName = getComponentName(Component) || 'Unknown'; + + if (!didWarnAboutBadClass[componentName]) { + warningWithoutStack$1( + false, + "The <%s /> component appears to have a render method, but doesn't extend React.Component. " + + 'This is likely to cause errors. Change %s to extend React.Component instead.', + componentName, + componentName, + ); + didWarnAboutBadClass[componentName] = true; + } + } + + if (workInProgress.mode & StrictMode) { + ReactStrictModeWarnings.recordLegacyContextWarning(workInProgress, null); + } + + ReactCurrentOwner$3.current = workInProgress; + value = renderWithHooks(null, workInProgress, Component, props, context, renderExpirationTime); + } // React DevTools reads this flag. + + workInProgress.effectTag |= PerformedWork; + + if ( + typeof value === 'object' && + value !== null && + typeof value.render === 'function' && + value.$$typeof === undefined + ) { + { + var _componentName = getComponentName(Component) || 'Unknown'; + + if (!didWarnAboutModulePatternComponent[_componentName]) { + warningWithoutStack$1( + false, + 'The <%s /> component appears to be a function component that returns a class instance. ' + + 'Change %s to a class that extends React.Component instead. ' + + "If you can't use a class try assigning the prototype on the function as a workaround. " + + "`%s.prototype = React.Component.prototype`. Don't use an arrow function since it " + + 'cannot be called with `new` by React.', + _componentName, + _componentName, + _componentName, + ); + didWarnAboutModulePatternComponent[_componentName] = true; + } + } // Proceed under the assumption that this is a class instance + + workInProgress.tag = ClassComponent; // Throw out any hooks that were used. + + resetHooks(); // Push context providers early to prevent context stack mismatches. + // During mounting we don't know the child context yet as the instance doesn't exist. + // We will invalidate the child context in finishClassComponent() right after rendering. + + var hasContext = false; + + if (isContextProvider(Component)) { + hasContext = true; + pushContextProvider(workInProgress); + } else { + hasContext = false; + } + + workInProgress.memoizedState = + value.state !== null && value.state !== undefined ? value.state : null; + var getDerivedStateFromProps = Component.getDerivedStateFromProps; + + if (typeof getDerivedStateFromProps === 'function') { + applyDerivedStateFromProps(workInProgress, Component, getDerivedStateFromProps, props); + } + + adoptClassInstance(workInProgress, value); + mountClassInstance(workInProgress, Component, props, renderExpirationTime); + return finishClassComponent( + null, + workInProgress, + Component, + true, + hasContext, + renderExpirationTime, + ); + } else { + // Proceed under the assumption that this is a function component + workInProgress.tag = FunctionComponent; + + { + if (disableLegacyContext && Component.contextTypes) { + warningWithoutStack$1( + false, + '%s uses the legacy contextTypes API which is no longer supported. ' + + 'Use React.createContext() with React.useContext() instead.', + getComponentName(Component) || 'Unknown', + ); + } + + if (debugRenderPhaseSideEffectsForStrictMode && workInProgress.mode & StrictMode) { + // Only double-render components with Hooks + if (workInProgress.memoizedState !== null) { + value = renderWithHooks( + null, + workInProgress, + Component, + props, + context, + renderExpirationTime, + ); + } + } + } + + reconcileChildren(null, workInProgress, value, renderExpirationTime); + + { + validateFunctionComponentInDev(workInProgress, Component); + } + + return workInProgress.child; + } + } + + function validateFunctionComponentInDev(workInProgress, Component) { + if (Component) { + !!Component.childContextTypes + ? warningWithoutStack$1( + false, + '%s(...): childContextTypes cannot be defined on a function component.', + Component.displayName || Component.name || 'Component', + ) + : void 0; + } + + if (workInProgress.ref !== null) { + var info = ''; + var ownerName = getCurrentFiberOwnerNameInDevOrNull(); + + if (ownerName) { + info += '\n\nCheck the render method of `' + ownerName + '`.'; + } + + var warningKey = ownerName || workInProgress._debugID || ''; + var debugSource = workInProgress._debugSource; + + if (debugSource) { + warningKey = debugSource.fileName + ':' + debugSource.lineNumber; + } + + if (!didWarnAboutFunctionRefs[warningKey]) { + didWarnAboutFunctionRefs[warningKey] = true; + warning$1( + false, + 'Function components cannot be given refs. ' + + 'Attempts to access this ref will fail. ' + + 'Did you mean to use React.forwardRef()?%s', + info, + ); + } + } + + if (warnAboutDefaultPropsOnFunctionComponents && Component.defaultProps !== undefined) { + var componentName = getComponentName(Component) || 'Unknown'; + + if (!didWarnAboutDefaultPropsOnFunctionComponent[componentName]) { + warningWithoutStack$1( + false, + '%s: Support for defaultProps will be removed from function components ' + + 'in a future major release. Use JavaScript default parameters instead.', + componentName, + ); + didWarnAboutDefaultPropsOnFunctionComponent[componentName] = true; + } + } + + if (typeof Component.getDerivedStateFromProps === 'function') { + var _componentName2 = getComponentName(Component) || 'Unknown'; + + if (!didWarnAboutGetDerivedStateOnFunctionComponent[_componentName2]) { + warningWithoutStack$1( + false, + '%s: Function components do not support getDerivedStateFromProps.', + _componentName2, + ); + didWarnAboutGetDerivedStateOnFunctionComponent[_componentName2] = true; + } + } + + if (typeof Component.contextType === 'object' && Component.contextType !== null) { + var _componentName3 = getComponentName(Component) || 'Unknown'; + + if (!didWarnAboutContextTypeOnFunctionComponent[_componentName3]) { + warningWithoutStack$1( + false, + '%s: Function components do not support contextType.', + _componentName3, + ); + didWarnAboutContextTypeOnFunctionComponent[_componentName3] = true; + } + } + } + + var SUSPENDED_MARKER = { + dehydrated: null, + retryTime: NoWork, + }; + + function shouldRemainOnFallback(suspenseContext, current$$1, workInProgress) { + // If the context is telling us that we should show a fallback, and we're not + // already showing content, then we should show the fallback instead. + return ( + hasSuspenseContext(suspenseContext, ForceSuspenseFallback) && + (current$$1 === null || current$$1.memoizedState !== null) + ); + } + + function updateSuspenseComponent(current$$1, workInProgress, renderExpirationTime) { + var mode = workInProgress.mode; + var nextProps = workInProgress.pendingProps; // This is used by DevTools to force a boundary to suspend. + + { + if (shouldSuspend(workInProgress)) { + workInProgress.effectTag |= DidCapture; + } + } + + var suspenseContext = suspenseStackCursor.current; + var nextDidTimeout = false; + var didSuspend = (workInProgress.effectTag & DidCapture) !== NoEffect; + + if (didSuspend || shouldRemainOnFallback(suspenseContext, current$$1, workInProgress)) { + // Something in this boundary's subtree already suspended. Switch to + // rendering the fallback children. + nextDidTimeout = true; + workInProgress.effectTag &= ~DidCapture; + } else { + // Attempting the main content + if (current$$1 === null || current$$1.memoizedState !== null) { + // This is a new mount or this boundary is already showing a fallback state. + // Mark this subtree context as having at least one invisible parent that could + // handle the fallback state. + // Boundaries without fallbacks or should be avoided are not considered since + // they cannot handle preferred fallback states. + if (nextProps.fallback !== undefined && nextProps.unstable_avoidThisFallback !== true) { + suspenseContext = addSubtreeSuspenseContext( + suspenseContext, + InvisibleParentSuspenseContext, + ); + } + } + } + + suspenseContext = setDefaultShallowSuspenseContext(suspenseContext); + pushSuspenseContext(workInProgress, suspenseContext); + + { + if ('maxDuration' in nextProps) { + if (!didWarnAboutMaxDuration) { + didWarnAboutMaxDuration = true; + warning$1( + false, + 'maxDuration has been removed from React. ' + 'Remove the maxDuration prop.', + ); + } + } + } // This next part is a bit confusing. If the children timeout, we switch to + // showing the fallback children in place of the "primary" children. + // However, we don't want to delete the primary children because then their + // state will be lost (both the React state and the host state, e.g. + // uncontrolled form inputs). Instead we keep them mounted and hide them. + // Both the fallback children AND the primary children are rendered at the + // same time. Once the primary children are un-suspended, we can delete + // the fallback children — don't need to preserve their state. + // + // The two sets of children are siblings in the host environment, but + // semantically, for purposes of reconciliation, they are two separate sets. + // So we store them using two fragment fibers. + // + // However, we want to avoid allocating extra fibers for every placeholder. + // They're only necessary when the children time out, because that's the + // only time when both sets are mounted. + // + // So, the extra fragment fibers are only used if the children time out. + // Otherwise, we render the primary children directly. This requires some + // custom reconciliation logic to preserve the state of the primary + // children. It's essentially a very basic form of re-parenting. + + if (current$$1 === null) { + // If we're currently hydrating, try to hydrate this boundary. + // But only if this has a fallback. + if (nextProps.fallback !== undefined) { + tryToClaimNextHydratableInstance(workInProgress); // This could've been a dehydrated suspense component. + + if (enableSuspenseServerRenderer) { + var suspenseState = workInProgress.memoizedState; + + if (suspenseState !== null) { + var dehydrated = suspenseState.dehydrated; + + if (dehydrated !== null) { + return mountDehydratedSuspenseComponent( + workInProgress, + dehydrated, + renderExpirationTime, + ); + } + } + } + } // This is the initial mount. This branch is pretty simple because there's + // no previous state that needs to be preserved. + + if (nextDidTimeout) { + // Mount separate fragments for primary and fallback children. + var nextFallbackChildren = nextProps.fallback; + var primaryChildFragment = createFiberFromFragment(null, mode, NoWork, null); + primaryChildFragment.return = workInProgress; + + if ((workInProgress.mode & BlockingMode) === NoMode) { + // Outside of blocking mode, we commit the effects from the + // partially completed, timed-out tree, too. + var progressedState = workInProgress.memoizedState; + var progressedPrimaryChild = + progressedState !== null ? workInProgress.child.child : workInProgress.child; + primaryChildFragment.child = progressedPrimaryChild; + var progressedChild = progressedPrimaryChild; + + while (progressedChild !== null) { + progressedChild.return = primaryChildFragment; + progressedChild = progressedChild.sibling; + } + } + + var fallbackChildFragment = createFiberFromFragment( + nextFallbackChildren, + mode, + renderExpirationTime, + null, + ); + fallbackChildFragment.return = workInProgress; + primaryChildFragment.sibling = fallbackChildFragment; // Skip the primary children, and continue working on the + // fallback children. + + workInProgress.memoizedState = SUSPENDED_MARKER; + workInProgress.child = primaryChildFragment; + return fallbackChildFragment; + } else { + // Mount the primary children without an intermediate fragment fiber. + var nextPrimaryChildren = nextProps.children; + workInProgress.memoizedState = null; + return (workInProgress.child = mountChildFibers( + workInProgress, + null, + nextPrimaryChildren, + renderExpirationTime, + )); + } + } else { + // This is an update. This branch is more complicated because we need to + // ensure the state of the primary children is preserved. + var prevState = current$$1.memoizedState; + + if (prevState !== null) { + if (enableSuspenseServerRenderer) { + var _dehydrated = prevState.dehydrated; + + if (_dehydrated !== null) { + if (!didSuspend) { + return updateDehydratedSuspenseComponent( + current$$1, + workInProgress, + _dehydrated, + prevState, + renderExpirationTime, + ); + } else if (workInProgress.memoizedState !== null) { + // Something suspended and we should still be in dehydrated mode. + // Leave the existing child in place. + workInProgress.child = current$$1.child; // The dehydrated completion pass expects this flag to be there + // but the normal suspense pass doesn't. + + workInProgress.effectTag |= DidCapture; + return null; + } else { + // Suspended but we should no longer be in dehydrated mode. + // Therefore we now have to render the fallback. Wrap the children + // in a fragment fiber to keep them separate from the fallback + // children. + var _nextFallbackChildren = nextProps.fallback; + + var _primaryChildFragment = createFiberFromFragment( + // It shouldn't matter what the pending props are because we aren't + // going to render this fragment. + null, + mode, + NoWork, + null, + ); + + _primaryChildFragment.return = workInProgress; // This is always null since we never want the previous child + // that we're not going to hydrate. + + _primaryChildFragment.child = null; + + if ((workInProgress.mode & BlockingMode) === NoMode) { + // Outside of blocking mode, we commit the effects from the + // partially completed, timed-out tree, too. + var _progressedChild = (_primaryChildFragment.child = workInProgress.child); + + while (_progressedChild !== null) { + _progressedChild.return = _primaryChildFragment; + _progressedChild = _progressedChild.sibling; + } + } else { + // We will have dropped the effect list which contains the deletion. + // We need to reconcile to delete the current child. + reconcileChildFibers(workInProgress, current$$1.child, null, renderExpirationTime); + } // Because primaryChildFragment is a new fiber that we're inserting as the + // parent of a new tree, we need to set its treeBaseDuration. + + if (enableProfilerTimer && workInProgress.mode & ProfileMode) { + // treeBaseDuration is the sum of all the child tree base durations. + var treeBaseDuration = 0; + var hiddenChild = _primaryChildFragment.child; + + while (hiddenChild !== null) { + treeBaseDuration += hiddenChild.treeBaseDuration; + hiddenChild = hiddenChild.sibling; + } + + _primaryChildFragment.treeBaseDuration = treeBaseDuration; + } // Create a fragment from the fallback children, too. + + var _fallbackChildFragment = createFiberFromFragment( + _nextFallbackChildren, + mode, + renderExpirationTime, + null, + ); + + _fallbackChildFragment.return = workInProgress; + _primaryChildFragment.sibling = _fallbackChildFragment; + _fallbackChildFragment.effectTag |= Placement; + _primaryChildFragment.childExpirationTime = NoWork; + workInProgress.memoizedState = SUSPENDED_MARKER; + workInProgress.child = _primaryChildFragment; // Skip the primary children, and continue working on the + // fallback children. + + return _fallbackChildFragment; + } + } + } // The current tree already timed out. That means each child set is + // wrapped in a fragment fiber. + + var currentPrimaryChildFragment = current$$1.child; + var currentFallbackChildFragment = currentPrimaryChildFragment.sibling; + + if (nextDidTimeout) { + // Still timed out. Reuse the current primary children by cloning + // its fragment. We're going to skip over these entirely. + var _nextFallbackChildren2 = nextProps.fallback; + + var _primaryChildFragment2 = createWorkInProgress( + currentPrimaryChildFragment, + currentPrimaryChildFragment.pendingProps, + NoWork, + ); + + _primaryChildFragment2.return = workInProgress; + + if ((workInProgress.mode & BlockingMode) === NoMode) { + // Outside of blocking mode, we commit the effects from the + // partially completed, timed-out tree, too. + var _progressedState = workInProgress.memoizedState; + + var _progressedPrimaryChild = + _progressedState !== null ? workInProgress.child.child : workInProgress.child; + + if (_progressedPrimaryChild !== currentPrimaryChildFragment.child) { + _primaryChildFragment2.child = _progressedPrimaryChild; + var _progressedChild2 = _progressedPrimaryChild; + + while (_progressedChild2 !== null) { + _progressedChild2.return = _primaryChildFragment2; + _progressedChild2 = _progressedChild2.sibling; + } + } + } // Because primaryChildFragment is a new fiber that we're inserting as the + // parent of a new tree, we need to set its treeBaseDuration. + + if (enableProfilerTimer && workInProgress.mode & ProfileMode) { + // treeBaseDuration is the sum of all the child tree base durations. + var _treeBaseDuration = 0; + var _hiddenChild = _primaryChildFragment2.child; + + while (_hiddenChild !== null) { + _treeBaseDuration += _hiddenChild.treeBaseDuration; + _hiddenChild = _hiddenChild.sibling; + } + + _primaryChildFragment2.treeBaseDuration = _treeBaseDuration; + } // Clone the fallback child fragment, too. These we'll continue + // working on. + + var _fallbackChildFragment2 = createWorkInProgress( + currentFallbackChildFragment, + _nextFallbackChildren2, + currentFallbackChildFragment.expirationTime, + ); + + _fallbackChildFragment2.return = workInProgress; + _primaryChildFragment2.sibling = _fallbackChildFragment2; + _primaryChildFragment2.childExpirationTime = NoWork; // Skip the primary children, and continue working on the + // fallback children. + + workInProgress.memoizedState = SUSPENDED_MARKER; + workInProgress.child = _primaryChildFragment2; + return _fallbackChildFragment2; + } else { + // No longer suspended. Switch back to showing the primary children, + // and remove the intermediate fragment fiber. + var _nextPrimaryChildren = nextProps.children; + var currentPrimaryChild = currentPrimaryChildFragment.child; + var primaryChild = reconcileChildFibers( + workInProgress, + currentPrimaryChild, + _nextPrimaryChildren, + renderExpirationTime, + ); // If this render doesn't suspend, we need to delete the fallback + // children. Wait until the complete phase, after we've confirmed the + // fallback is no longer needed. + // TODO: Would it be better to store the fallback fragment on + // the stateNode? + // Continue rendering the children, like we normally do. + + workInProgress.memoizedState = null; + return (workInProgress.child = primaryChild); + } + } else { + // The current tree has not already timed out. That means the primary + // children are not wrapped in a fragment fiber. + var _currentPrimaryChild = current$$1.child; + + if (nextDidTimeout) { + // Timed out. Wrap the children in a fragment fiber to keep them + // separate from the fallback children. + var _nextFallbackChildren3 = nextProps.fallback; + + var _primaryChildFragment3 = createFiberFromFragment( + // It shouldn't matter what the pending props are because we aren't + // going to render this fragment. + null, + mode, + NoWork, + null, + ); + + _primaryChildFragment3.return = workInProgress; + _primaryChildFragment3.child = _currentPrimaryChild; + + if (_currentPrimaryChild !== null) { + _currentPrimaryChild.return = _primaryChildFragment3; + } // Even though we're creating a new fiber, there are no new children, + // because we're reusing an already mounted tree. So we don't need to + // schedule a placement. + // primaryChildFragment.effectTag |= Placement; + + if ((workInProgress.mode & BlockingMode) === NoMode) { + // Outside of blocking mode, we commit the effects from the + // partially completed, timed-out tree, too. + var _progressedState2 = workInProgress.memoizedState; + + var _progressedPrimaryChild2 = + _progressedState2 !== null ? workInProgress.child.child : workInProgress.child; + + _primaryChildFragment3.child = _progressedPrimaryChild2; + var _progressedChild3 = _progressedPrimaryChild2; + + while (_progressedChild3 !== null) { + _progressedChild3.return = _primaryChildFragment3; + _progressedChild3 = _progressedChild3.sibling; + } + } // Because primaryChildFragment is a new fiber that we're inserting as the + // parent of a new tree, we need to set its treeBaseDuration. + + if (enableProfilerTimer && workInProgress.mode & ProfileMode) { + // treeBaseDuration is the sum of all the child tree base durations. + var _treeBaseDuration2 = 0; + var _hiddenChild2 = _primaryChildFragment3.child; + + while (_hiddenChild2 !== null) { + _treeBaseDuration2 += _hiddenChild2.treeBaseDuration; + _hiddenChild2 = _hiddenChild2.sibling; + } + + _primaryChildFragment3.treeBaseDuration = _treeBaseDuration2; + } // Create a fragment from the fallback children, too. + + var _fallbackChildFragment3 = createFiberFromFragment( + _nextFallbackChildren3, + mode, + renderExpirationTime, + null, + ); + + _fallbackChildFragment3.return = workInProgress; + _primaryChildFragment3.sibling = _fallbackChildFragment3; + _fallbackChildFragment3.effectTag |= Placement; + _primaryChildFragment3.childExpirationTime = NoWork; // Skip the primary children, and continue working on the + // fallback children. + + workInProgress.memoizedState = SUSPENDED_MARKER; + workInProgress.child = _primaryChildFragment3; + return _fallbackChildFragment3; + } else { + // Still haven't timed out. Continue rendering the children, like we + // normally do. + workInProgress.memoizedState = null; + var _nextPrimaryChildren2 = nextProps.children; + return (workInProgress.child = reconcileChildFibers( + workInProgress, + _currentPrimaryChild, + _nextPrimaryChildren2, + renderExpirationTime, + )); + } + } + } + } + + function retrySuspenseComponentWithoutHydrating(current$$1, workInProgress, renderExpirationTime) { + // We're now not suspended nor dehydrated. + workInProgress.memoizedState = null; // Retry with the full children. + + var nextProps = workInProgress.pendingProps; + var nextChildren = nextProps.children; // This will ensure that the children get Placement effects and + // that the old child gets a Deletion effect. + // We could also call forceUnmountCurrentAndReconcile. + + reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime); + return workInProgress.child; + } + + function mountDehydratedSuspenseComponent(workInProgress, suspenseInstance, renderExpirationTime) { + // During the first pass, we'll bail out and not drill into the children. + // Instead, we'll leave the content in place and try to hydrate it later. + if ((workInProgress.mode & BlockingMode) === NoMode) { + { + warning$1( + false, + 'Cannot hydrate Suspense in legacy mode. Switch from ' + + 'ReactDOM.hydrate(element, container) to ' + + 'ReactDOM.createBlockingRoot(container, { hydrate: true })' + + '.render(element) or remove the Suspense components from ' + + 'the server rendered components.', + ); + } + + workInProgress.expirationTime = Sync; + } else if (isSuspenseInstanceFallback(suspenseInstance)) { + // This is a client-only boundary. Since we won't get any content from the server + // for this, we need to schedule that at a higher priority based on when it would + // have timed out. In theory we could render it in this pass but it would have the + // wrong priority associated with it and will prevent hydration of parent path. + // Instead, we'll leave work left on it to render it in a separate commit. + // TODO This time should be the time at which the server rendered response that is + // a parent to this boundary was displayed. However, since we currently don't have + // a protocol to transfer that time, we'll just estimate it by using the current + // time. This will mean that Suspense timeouts are slightly shifted to later than + // they should be. + var serverDisplayTime = requestCurrentTimeForUpdate(); // Schedule a normal pri update to render this content. + + var newExpirationTime = computeAsyncExpiration(serverDisplayTime); + + if (enableSchedulerTracing) { + markSpawnedWork(newExpirationTime); + } + + workInProgress.expirationTime = newExpirationTime; + } else { + // We'll continue hydrating the rest at offscreen priority since we'll already + // be showing the right content coming from the server, it is no rush. + workInProgress.expirationTime = Never; + + if (enableSchedulerTracing) { + markSpawnedWork(Never); + } + } + + return null; + } + + function updateDehydratedSuspenseComponent( + current$$1, + workInProgress, + suspenseInstance, + suspenseState, + renderExpirationTime, + ) { + // We should never be hydrating at this point because it is the first pass, + // but after we've already committed once. + warnIfHydrating(); + + if ((workInProgress.mode & BlockingMode) === NoMode) { + return retrySuspenseComponentWithoutHydrating(current$$1, workInProgress, renderExpirationTime); + } + + if (isSuspenseInstanceFallback(suspenseInstance)) { + // This boundary is in a permanent fallback state. In this case, we'll never + // get an update and we'll never be able to hydrate the final content. Let's just try the + // client side render instead. + return retrySuspenseComponentWithoutHydrating(current$$1, workInProgress, renderExpirationTime); + } // We use childExpirationTime to indicate that a child might depend on context, so if + // any context has changed, we need to treat is as if the input might have changed. + + var hasContextChanged$$1 = current$$1.childExpirationTime >= renderExpirationTime; + + if (didReceiveUpdate || hasContextChanged$$1) { + // This boundary has changed since the first render. This means that we are now unable to + // hydrate it. We might still be able to hydrate it using an earlier expiration time, if + // we are rendering at lower expiration than sync. + if (renderExpirationTime < Sync) { + if (suspenseState.retryTime <= renderExpirationTime) { + // This render is even higher pri than we've seen before, let's try again + // at even higher pri. + var attemptHydrationAtExpirationTime = renderExpirationTime + 1; + suspenseState.retryTime = attemptHydrationAtExpirationTime; + scheduleWork(current$$1, attemptHydrationAtExpirationTime); // TODO: Early abort this render. + } else { + // We have already tried to ping at a higher priority than we're rendering with + // so if we got here, we must have failed to hydrate at those levels. We must + // now give up. Instead, we're going to delete the whole subtree and instead inject + // a new real Suspense boundary to take its place, which may render content + // or fallback. This might suspend for a while and if it does we might still have + // an opportunity to hydrate before this pass commits. + } + } // If we have scheduled higher pri work above, this will probably just abort the render + // since we now have higher priority work, but in case it doesn't, we need to prepare to + // render something, if we time out. Even if that requires us to delete everything and + // skip hydration. + // Delay having to do this as long as the suspense timeout allows us. + + renderDidSuspendDelayIfPossible(); + return retrySuspenseComponentWithoutHydrating(current$$1, workInProgress, renderExpirationTime); + } else if (isSuspenseInstancePending(suspenseInstance)) { + // This component is still pending more data from the server, so we can't hydrate its + // content. We treat it as if this component suspended itself. It might seem as if + // we could just try to render it client-side instead. However, this will perform a + // lot of unnecessary work and is unlikely to complete since it often will suspend + // on missing data anyway. Additionally, the server might be able to render more + // than we can on the client yet. In that case we'd end up with more fallback states + // on the client than if we just leave it alone. If the server times out or errors + // these should update this boundary to the permanent Fallback state instead. + // Mark it as having captured (i.e. suspended). + workInProgress.effectTag |= DidCapture; // Leave the child in place. I.e. the dehydrated fragment. + + workInProgress.child = current$$1.child; // Register a callback to retry this boundary once the server has sent the result. + + registerSuspenseInstanceRetry( + suspenseInstance, + retryDehydratedSuspenseBoundary.bind(null, current$$1), + ); + return null; + } else { + // This is the first attempt. + reenterHydrationStateFromDehydratedSuspenseInstance(workInProgress, suspenseInstance); + var nextProps = workInProgress.pendingProps; + var nextChildren = nextProps.children; + var child = mountChildFibers(workInProgress, null, nextChildren, renderExpirationTime); + var node = child; + + while (node) { + // Mark each child as hydrating. This is a fast path to know whether this + // tree is part of a hydrating tree. This is used to determine if a child + // node has fully mounted yet, and for scheduling event replaying. + // Conceptually this is similar to Placement in that a new subtree is + // inserted into the React tree here. It just happens to not need DOM + // mutations because it already exists. + node.effectTag |= Hydrating; + node = node.sibling; + } + + workInProgress.child = child; + return workInProgress.child; + } + } + + function scheduleWorkOnFiber(fiber, renderExpirationTime) { + if (fiber.expirationTime < renderExpirationTime) { + fiber.expirationTime = renderExpirationTime; + } + + var alternate = fiber.alternate; + + if (alternate !== null && alternate.expirationTime < renderExpirationTime) { + alternate.expirationTime = renderExpirationTime; + } + + scheduleWorkOnParentPath(fiber.return, renderExpirationTime); + } + + function propagateSuspenseContextChange(workInProgress, firstChild, renderExpirationTime) { + // Mark any Suspense boundaries with fallbacks as having work to do. + // If they were previously forced into fallbacks, they may now be able + // to unblock. + var node = firstChild; + + while (node !== null) { + if (node.tag === SuspenseComponent) { + var state = node.memoizedState; + + if (state !== null) { + scheduleWorkOnFiber(node, renderExpirationTime); + } + } else if (node.tag === SuspenseListComponent) { + // If the tail is hidden there might not be an Suspense boundaries + // to schedule work on. In this case we have to schedule it on the + // list itself. + // We don't have to traverse to the children of the list since + // the list will propagate the change when it rerenders. + scheduleWorkOnFiber(node, renderExpirationTime); + } else if (node.child !== null) { + node.child.return = node; + node = node.child; + continue; + } + + if (node === workInProgress) { + return; + } + + while (node.sibling === null) { + if (node.return === null || node.return === workInProgress) { + return; + } + + node = node.return; + } + + node.sibling.return = node.return; + node = node.sibling; + } + } + + function findLastContentRow(firstChild) { + // This is going to find the last row among these children that is already + // showing content on the screen, as opposed to being in fallback state or + // new. If a row has multiple Suspense boundaries, any of them being in the + // fallback state, counts as the whole row being in a fallback state. + // Note that the "rows" will be workInProgress, but any nested children + // will still be current since we haven't rendered them yet. The mounted + // order may not be the same as the new order. We use the new order. + var row = firstChild; + var lastContentRow = null; + + while (row !== null) { + var currentRow = row.alternate; // New rows can't be content rows. + + if (currentRow !== null && findFirstSuspended(currentRow) === null) { + lastContentRow = row; + } + + row = row.sibling; + } + + return lastContentRow; + } + + function validateRevealOrder(revealOrder) { + { + if ( + revealOrder !== undefined && + revealOrder !== 'forwards' && + revealOrder !== 'backwards' && + revealOrder !== 'together' && + !didWarnAboutRevealOrder[revealOrder] + ) { + didWarnAboutRevealOrder[revealOrder] = true; + + if (typeof revealOrder === 'string') { + switch (revealOrder.toLowerCase()) { + case 'together': + case 'forwards': + case 'backwards': { + warning$1( + false, + '"%s" is not a valid value for revealOrder on <SuspenseList />. ' + + 'Use lowercase "%s" instead.', + revealOrder, + revealOrder.toLowerCase(), + ); + break; + } + + case 'forward': + case 'backward': { + warning$1( + false, + '"%s" is not a valid value for revealOrder on <SuspenseList />. ' + + 'React uses the -s suffix in the spelling. Use "%ss" instead.', + revealOrder, + revealOrder.toLowerCase(), + ); + break; + } + + default: + warning$1( + false, + '"%s" is not a supported revealOrder on <SuspenseList />. ' + + 'Did you mean "together", "forwards" or "backwards"?', + revealOrder, + ); + break; + } + } else { + warning$1( + false, + '%s is not a supported value for revealOrder on <SuspenseList />. ' + + 'Did you mean "together", "forwards" or "backwards"?', + revealOrder, + ); + } + } + } + } + + function validateTailOptions(tailMode, revealOrder) { + { + if (tailMode !== undefined && !didWarnAboutTailOptions[tailMode]) { + if (tailMode !== 'collapsed' && tailMode !== 'hidden') { + didWarnAboutTailOptions[tailMode] = true; + warning$1( + false, + '"%s" is not a supported value for tail on <SuspenseList />. ' + + 'Did you mean "collapsed" or "hidden"?', + tailMode, + ); + } else if (revealOrder !== 'forwards' && revealOrder !== 'backwards') { + didWarnAboutTailOptions[tailMode] = true; + warning$1( + false, + '<SuspenseList tail="%s" /> is only valid if revealOrder is ' + + '"forwards" or "backwards". ' + + 'Did you mean to specify revealOrder="forwards"?', + tailMode, + ); + } + } + } + } + + function validateSuspenseListNestedChild(childSlot, index) { + { + var isArray = Array.isArray(childSlot); + var isIterable = !isArray && typeof getIteratorFn(childSlot) === 'function'; + + if (isArray || isIterable) { + var type = isArray ? 'array' : 'iterable'; + warning$1( + false, + 'A nested %s was passed to row #%s in <SuspenseList />. Wrap it in ' + + 'an additional SuspenseList to configure its revealOrder: ' + + '<SuspenseList revealOrder=...> ... ' + + '<SuspenseList revealOrder=...>{%s}</SuspenseList> ... ' + + '</SuspenseList>', + type, + index, + type, + ); + return false; + } + } + + return true; + } + + function validateSuspenseListChildren(children, revealOrder) { + { + if ( + (revealOrder === 'forwards' || revealOrder === 'backwards') && + children !== undefined && + children !== null && + children !== false + ) { + if (Array.isArray(children)) { + for (var i = 0; i < children.length; i++) { + if (!validateSuspenseListNestedChild(children[i], i)) { + return; + } + } + } else { + var iteratorFn = getIteratorFn(children); + + if (typeof iteratorFn === 'function') { + var childrenIterator = iteratorFn.call(children); + + if (childrenIterator) { + var step = childrenIterator.next(); + var _i = 0; + + for (; !step.done; step = childrenIterator.next()) { + if (!validateSuspenseListNestedChild(step.value, _i)) { + return; + } + + _i++; + } + } + } else { + warning$1( + false, + 'A single row was passed to a <SuspenseList revealOrder="%s" />. ' + + 'This is not useful since it needs multiple rows. ' + + 'Did you mean to pass multiple children or an array?', + revealOrder, + ); + } + } + } + } + } + + function initSuspenseListRenderState( + workInProgress, + isBackwards, + tail, + lastContentRow, + tailMode, + lastEffectBeforeRendering, + ) { + var renderState = workInProgress.memoizedState; + + if (renderState === null) { + workInProgress.memoizedState = { + isBackwards: isBackwards, + rendering: null, + last: lastContentRow, + tail: tail, + tailExpiration: 0, + tailMode: tailMode, + lastEffect: lastEffectBeforeRendering, + }; + } else { + // We can reuse the existing object from previous renders. + renderState.isBackwards = isBackwards; + renderState.rendering = null; + renderState.last = lastContentRow; + renderState.tail = tail; + renderState.tailExpiration = 0; + renderState.tailMode = tailMode; + renderState.lastEffect = lastEffectBeforeRendering; + } + } // This can end up rendering this component multiple passes. + // The first pass splits the children fibers into two sets. A head and tail. + // We first render the head. If anything is in fallback state, we do another + // pass through beginWork to rerender all children (including the tail) with + // the force suspend context. If the first render didn't have anything in + // in fallback state. Then we render each row in the tail one-by-one. + // That happens in the completeWork phase without going back to beginWork. + + function updateSuspenseListComponent(current$$1, workInProgress, renderExpirationTime) { + var nextProps = workInProgress.pendingProps; + var revealOrder = nextProps.revealOrder; + var tailMode = nextProps.tail; + var newChildren = nextProps.children; + validateRevealOrder(revealOrder); + validateTailOptions(tailMode, revealOrder); + validateSuspenseListChildren(newChildren, revealOrder); + reconcileChildren(current$$1, workInProgress, newChildren, renderExpirationTime); + var suspenseContext = suspenseStackCursor.current; + var shouldForceFallback = hasSuspenseContext(suspenseContext, ForceSuspenseFallback); + + if (shouldForceFallback) { + suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback); + workInProgress.effectTag |= DidCapture; + } else { + var didSuspendBefore = current$$1 !== null && (current$$1.effectTag & DidCapture) !== NoEffect; + + if (didSuspendBefore) { + // If we previously forced a fallback, we need to schedule work + // on any nested boundaries to let them know to try to render + // again. This is the same as context updating. + propagateSuspenseContextChange(workInProgress, workInProgress.child, renderExpirationTime); + } + + suspenseContext = setDefaultShallowSuspenseContext(suspenseContext); + } + + pushSuspenseContext(workInProgress, suspenseContext); + + if ((workInProgress.mode & BlockingMode) === NoMode) { + // Outside of blocking mode, SuspenseList doesn't work so we just + // use make it a noop by treating it as the default revealOrder. + workInProgress.memoizedState = null; + } else { + switch (revealOrder) { + case 'forwards': { + var lastContentRow = findLastContentRow(workInProgress.child); + var tail; + + if (lastContentRow === null) { + // The whole list is part of the tail. + // TODO: We could fast path by just rendering the tail now. + tail = workInProgress.child; + workInProgress.child = null; + } else { + // Disconnect the tail rows after the content row. + // We're going to render them separately later. + tail = lastContentRow.sibling; + lastContentRow.sibling = null; + } + + initSuspenseListRenderState( + workInProgress, + false, // isBackwards + tail, + lastContentRow, + tailMode, + workInProgress.lastEffect, + ); + break; + } + + case 'backwards': { + // We're going to find the first row that has existing content. + // At the same time we're going to reverse the list of everything + // we pass in the meantime. That's going to be our tail in reverse + // order. + var _tail = null; + var row = workInProgress.child; + workInProgress.child = null; + + while (row !== null) { + var currentRow = row.alternate; // New rows can't be content rows. + + if (currentRow !== null && findFirstSuspended(currentRow) === null) { + // This is the beginning of the main content. + workInProgress.child = row; + break; + } + + var nextRow = row.sibling; + row.sibling = _tail; + _tail = row; + row = nextRow; + } // TODO: If workInProgress.child is null, we can continue on the tail immediately. + + initSuspenseListRenderState( + workInProgress, + true, // isBackwards + _tail, + null, // last + tailMode, + workInProgress.lastEffect, + ); + break; + } + + case 'together': { + initSuspenseListRenderState( + workInProgress, + false, // isBackwards + null, // tail + null, // last + undefined, + workInProgress.lastEffect, + ); + break; + } + + default: { + // The default reveal order is the same as not having + // a boundary. + workInProgress.memoizedState = null; + } + } + } + + return workInProgress.child; + } + + function updatePortalComponent(current$$1, workInProgress, renderExpirationTime) { + pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo); + var nextChildren = workInProgress.pendingProps; + + if (current$$1 === null) { + // Portals are special because we don't append the children during mount + // but at commit. Therefore we need to track insertions which the normal + // flow doesn't do during mount. This doesn't happen at the root because + // the root always starts with a "current" with a null child. + // TODO: Consider unifying this with how the root works. + workInProgress.child = reconcileChildFibers( + workInProgress, + null, + nextChildren, + renderExpirationTime, + ); + } else { + reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime); + } + + return workInProgress.child; + } + + function updateContextProvider(current$$1, workInProgress, renderExpirationTime) { + var providerType = workInProgress.type; + var context = providerType._context; + var newProps = workInProgress.pendingProps; + var oldProps = workInProgress.memoizedProps; + var newValue = newProps.value; + + { + var providerPropTypes = workInProgress.type.propTypes; + + if (providerPropTypes) { + checkPropTypes( + providerPropTypes, + newProps, + 'prop', + 'Context.Provider', + getCurrentFiberStackInDev, + ); + } + } + + pushProvider(workInProgress, newValue); + + if (oldProps !== null) { + var oldValue = oldProps.value; + var changedBits = calculateChangedBits(context, newValue, oldValue); + + if (changedBits === 0) { + // No change. Bailout early if children are the same. + if (oldProps.children === newProps.children && !hasContextChanged()) { + return bailoutOnAlreadyFinishedWork(current$$1, workInProgress, renderExpirationTime); + } + } else { + // The context value changed. Search for matching consumers and schedule + // them to update. + propagateContextChange(workInProgress, context, changedBits, renderExpirationTime); + } + } + + var newChildren = newProps.children; + reconcileChildren(current$$1, workInProgress, newChildren, renderExpirationTime); + return workInProgress.child; + } + + var hasWarnedAboutUsingContextAsConsumer = false; + + function updateContextConsumer(current$$1, workInProgress, renderExpirationTime) { + var context = workInProgress.type; // The logic below for Context differs depending on PROD or DEV mode. In + // DEV mode, we create a separate object for Context.Consumer that acts + // like a proxy to Context. This proxy object adds unnecessary code in PROD + // so we use the old behaviour (Context.Consumer references Context) to + // reduce size and overhead. The separate object references context via + // a property called "_context", which also gives us the ability to check + // in DEV mode if this property exists or not and warn if it does not. + + { + if (context._context === undefined) { + // This may be because it's a Context (rather than a Consumer). + // Or it may be because it's older React where they're the same thing. + // We only want to warn if we're sure it's a new React. + if (context !== context.Consumer) { + if (!hasWarnedAboutUsingContextAsConsumer) { + hasWarnedAboutUsingContextAsConsumer = true; + warning$1( + false, + 'Rendering <Context> directly is not supported and will be removed in ' + + 'a future major release. Did you mean to render <Context.Consumer> instead?', + ); + } + } + } else { + context = context._context; + } + } + + var newProps = workInProgress.pendingProps; + var render = newProps.children; + + { + !(typeof render === 'function') + ? warningWithoutStack$1( + false, + 'A context consumer was rendered with multiple children, or a child ' + + "that isn't a function. A context consumer expects a single child " + + 'that is a function. If you did pass a function, make sure there ' + + 'is no trailing or leading whitespace around it.', + ) + : void 0; + } + + prepareToReadContext(workInProgress, renderExpirationTime); + var newValue = readContext(context, newProps.unstable_observedBits); + var newChildren; + + { + ReactCurrentOwner$3.current = workInProgress; + setCurrentPhase('render'); + newChildren = render(newValue); + setCurrentPhase(null); + } // React DevTools reads this flag. + + workInProgress.effectTag |= PerformedWork; + reconcileChildren(current$$1, workInProgress, newChildren, renderExpirationTime); + return workInProgress.child; + } + + function updateFundamentalComponent$1(current$$1, workInProgress, renderExpirationTime) { + var fundamentalImpl = workInProgress.type.impl; + + if (fundamentalImpl.reconcileChildren === false) { + return null; + } + + var nextProps = workInProgress.pendingProps; + var nextChildren = nextProps.children; + reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime); + return workInProgress.child; + } + + function updateScopeComponent(current$$1, workInProgress, renderExpirationTime) { + var nextProps = workInProgress.pendingProps; + var nextChildren = nextProps.children; + reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime); + return workInProgress.child; + } + + function markWorkInProgressReceivedUpdate() { + didReceiveUpdate = true; + } + + function bailoutOnAlreadyFinishedWork(current$$1, workInProgress, renderExpirationTime) { + cancelWorkTimer(workInProgress); + + if (current$$1 !== null) { + // Reuse previous dependencies + workInProgress.dependencies = current$$1.dependencies; + } + + if (enableProfilerTimer) { + // Don't update "base" render times for bailouts. + stopProfilerTimerIfRunning(workInProgress); + } + + var updateExpirationTime = workInProgress.expirationTime; + + if (updateExpirationTime !== NoWork) { + markUnprocessedUpdateTime(updateExpirationTime); + } // Check if the children have any pending work. + + var childExpirationTime = workInProgress.childExpirationTime; + + if (childExpirationTime < renderExpirationTime) { + // The children don't have any work either. We can skip them. + // TODO: Once we add back resuming, we should check if the children are + // a work-in-progress set. If so, we need to transfer their effects. + return null; + } else { + // This fiber doesn't have work, but its subtree does. Clone the child + // fibers and continue. + cloneChildFibers(current$$1, workInProgress); + return workInProgress.child; + } + } + + function remountFiber(current$$1, oldWorkInProgress, newWorkInProgress) { + { + var returnFiber = oldWorkInProgress.return; + + if (returnFiber === null) { + throw new Error('Cannot swap the root fiber.'); + } // Disconnect from the old current. + // It will get deleted. + + current$$1.alternate = null; + oldWorkInProgress.alternate = null; // Connect to the new tree. + + newWorkInProgress.index = oldWorkInProgress.index; + newWorkInProgress.sibling = oldWorkInProgress.sibling; + newWorkInProgress.return = oldWorkInProgress.return; + newWorkInProgress.ref = oldWorkInProgress.ref; // Replace the child/sibling pointers above it. + + if (oldWorkInProgress === returnFiber.child) { + returnFiber.child = newWorkInProgress; + } else { + var prevSibling = returnFiber.child; + + if (prevSibling === null) { + throw new Error('Expected parent to have a child.'); + } + + while (prevSibling.sibling !== oldWorkInProgress) { + prevSibling = prevSibling.sibling; + + if (prevSibling === null) { + throw new Error('Expected to find the previous sibling.'); + } + } + + prevSibling.sibling = newWorkInProgress; + } // Delete the old fiber and place the new one. + // Since the old fiber is disconnected, we have to schedule it manually. + + var last = returnFiber.lastEffect; + + if (last !== null) { + last.nextEffect = current$$1; + returnFiber.lastEffect = current$$1; + } else { + returnFiber.firstEffect = returnFiber.lastEffect = current$$1; + } + + current$$1.nextEffect = null; + current$$1.effectTag = Deletion; + newWorkInProgress.effectTag |= Placement; // Restart work from the new fiber. + + return newWorkInProgress; + } + } + + function beginWork$1(current$$1, workInProgress, renderExpirationTime) { + var updateExpirationTime = workInProgress.expirationTime; + + { + if (workInProgress._debugNeedsRemount && current$$1 !== null) { + // This will restart the begin phase with a new fiber. + return remountFiber( + current$$1, + workInProgress, + createFiberFromTypeAndProps( + workInProgress.type, + workInProgress.key, + workInProgress.pendingProps, + workInProgress._debugOwner || null, + workInProgress.mode, + workInProgress.expirationTime, + ), + ); + } + } + + if (current$$1 !== null) { + var oldProps = current$$1.memoizedProps; + var newProps = workInProgress.pendingProps; + + if ( + oldProps !== newProps || + hasContextChanged() || // Force a re-render if the implementation changed due to hot reload: + workInProgress.type !== current$$1.type + ) { + // If props or context changed, mark the fiber as having performed work. + // This may be unset if the props are determined to be equal later (memo). + didReceiveUpdate = true; + } else if (updateExpirationTime < renderExpirationTime) { + didReceiveUpdate = false; // This fiber does not have any pending work. Bailout without entering + // the begin phase. There's still some bookkeeping we that needs to be done + // in this optimized path, mostly pushing stuff onto the stack. + + switch (workInProgress.tag) { + case HostRoot: + pushHostRootContext(workInProgress); + resetHydrationState(); + break; + + case HostComponent: + pushHostContext(workInProgress); + + if ( + workInProgress.mode & ConcurrentMode && + renderExpirationTime !== Never && + shouldDeprioritizeSubtree(workInProgress.type, newProps) + ) { + if (enableSchedulerTracing) { + markSpawnedWork(Never); + } // Schedule this fiber to re-render at offscreen priority. Then bailout. + + workInProgress.expirationTime = workInProgress.childExpirationTime = Never; + return null; + } + + break; + + case ClassComponent: { + var Component = workInProgress.type; + + if (isContextProvider(Component)) { + pushContextProvider(workInProgress); + } + + break; + } + + case HostPortal: + pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo); + break; + + case ContextProvider: { + var newValue = workInProgress.memoizedProps.value; + pushProvider(workInProgress, newValue); + break; + } + + case Profiler: + if (enableProfilerTimer) { + // Profiler should only call onRender when one of its descendants actually rendered. + var hasChildWork = workInProgress.childExpirationTime >= renderExpirationTime; + + if (hasChildWork) { + workInProgress.effectTag |= Update; + } + } + + break; + + case SuspenseComponent: { + var state = workInProgress.memoizedState; + + if (state !== null) { + if (enableSuspenseServerRenderer) { + if (state.dehydrated !== null) { + pushSuspenseContext( + workInProgress, + setDefaultShallowSuspenseContext(suspenseStackCursor.current), + ); // We know that this component will suspend again because if it has + // been unsuspended it has committed as a resolved Suspense component. + // If it needs to be retried, it should have work scheduled on it. + + workInProgress.effectTag |= DidCapture; + break; + } + } // If this boundary is currently timed out, we need to decide + // whether to retry the primary children, or to skip over it and + // go straight to the fallback. Check the priority of the primary + // child fragment. + + var primaryChildFragment = workInProgress.child; + var primaryChildExpirationTime = primaryChildFragment.childExpirationTime; + + if ( + primaryChildExpirationTime !== NoWork && + primaryChildExpirationTime >= renderExpirationTime + ) { + // The primary children have pending work. Use the normal path + // to attempt to render the primary children again. + return updateSuspenseComponent(current$$1, workInProgress, renderExpirationTime); + } else { + pushSuspenseContext( + workInProgress, + setDefaultShallowSuspenseContext(suspenseStackCursor.current), + ); // The primary children do not have pending work with sufficient + // priority. Bailout. + + var child = bailoutOnAlreadyFinishedWork( + current$$1, + workInProgress, + renderExpirationTime, + ); + + if (child !== null) { + // The fallback children have pending work. Skip over the + // primary children and work on the fallback. + return child.sibling; + } else { + return null; + } + } + } else { + pushSuspenseContext( + workInProgress, + setDefaultShallowSuspenseContext(suspenseStackCursor.current), + ); + } + + break; + } + + case SuspenseListComponent: { + var didSuspendBefore = (current$$1.effectTag & DidCapture) !== NoEffect; + + var _hasChildWork = workInProgress.childExpirationTime >= renderExpirationTime; + + if (didSuspendBefore) { + if (_hasChildWork) { + // If something was in fallback state last time, and we have all the + // same children then we're still in progressive loading state. + // Something might get unblocked by state updates or retries in the + // tree which will affect the tail. So we need to use the normal + // path to compute the correct tail. + return updateSuspenseListComponent(current$$1, workInProgress, renderExpirationTime); + } // If none of the children had any work, that means that none of + // them got retried so they'll still be blocked in the same way + // as before. We can fast bail out. + + workInProgress.effectTag |= DidCapture; + } // If nothing suspended before and we're rendering the same children, + // then the tail doesn't matter. Anything new that suspends will work + // in the "together" mode, so we can continue from the state we had. + + var renderState = workInProgress.memoizedState; + + if (renderState !== null) { + // Reset to the "together" mode in case we've started a different + // update in the past but didn't complete it. + renderState.rendering = null; + renderState.tail = null; + } + + pushSuspenseContext(workInProgress, suspenseStackCursor.current); + + if (_hasChildWork) { + break; + } else { + // If none of the children had any work, that means that none of + // them got retried so they'll still be blocked in the same way + // as before. We can fast bail out. + return null; + } + } + } + + return bailoutOnAlreadyFinishedWork(current$$1, workInProgress, renderExpirationTime); + } else { + // An update was scheduled on this fiber, but there are no new props + // nor legacy context. Set this to false. If an update queue or context + // consumer produces a changed value, it will set this to true. Otherwise, + // the component will assume the children have not changed and bail out. + didReceiveUpdate = false; + } + } else { + didReceiveUpdate = false; + } // Before entering the begin phase, clear the expiration time. + + workInProgress.expirationTime = NoWork; + + switch (workInProgress.tag) { + case IndeterminateComponent: { + return mountIndeterminateComponent( + current$$1, + workInProgress, + workInProgress.type, + renderExpirationTime, + ); + } + + case LazyComponent: { + var elementType = workInProgress.elementType; + return mountLazyComponent( + current$$1, + workInProgress, + elementType, + updateExpirationTime, + renderExpirationTime, + ); + } + + case FunctionComponent: { + var _Component = workInProgress.type; + var unresolvedProps = workInProgress.pendingProps; + var resolvedProps = + workInProgress.elementType === _Component + ? unresolvedProps + : resolveDefaultProps(_Component, unresolvedProps); + return updateFunctionComponent( + current$$1, + workInProgress, + _Component, + resolvedProps, + renderExpirationTime, + ); + } + + case ClassComponent: { + var _Component2 = workInProgress.type; + var _unresolvedProps = workInProgress.pendingProps; + + var _resolvedProps = + workInProgress.elementType === _Component2 + ? _unresolvedProps + : resolveDefaultProps(_Component2, _unresolvedProps); + + return updateClassComponent( + current$$1, + workInProgress, + _Component2, + _resolvedProps, + renderExpirationTime, + ); + } + + case HostRoot: + return updateHostRoot(current$$1, workInProgress, renderExpirationTime); + + case HostComponent: + return updateHostComponent(current$$1, workInProgress, renderExpirationTime); + + case HostText: + return updateHostText(current$$1, workInProgress); + + case SuspenseComponent: + return updateSuspenseComponent(current$$1, workInProgress, renderExpirationTime); + + case HostPortal: + return updatePortalComponent(current$$1, workInProgress, renderExpirationTime); + + case ForwardRef: { + var type = workInProgress.type; + var _unresolvedProps2 = workInProgress.pendingProps; + + var _resolvedProps2 = + workInProgress.elementType === type + ? _unresolvedProps2 + : resolveDefaultProps(type, _unresolvedProps2); + + return updateForwardRef( + current$$1, + workInProgress, + type, + _resolvedProps2, + renderExpirationTime, + ); + } + + case Fragment: + return updateFragment(current$$1, workInProgress, renderExpirationTime); + + case Mode: + return updateMode(current$$1, workInProgress, renderExpirationTime); + + case Profiler: + return updateProfiler(current$$1, workInProgress, renderExpirationTime); + + case ContextProvider: + return updateContextProvider(current$$1, workInProgress, renderExpirationTime); + + case ContextConsumer: + return updateContextConsumer(current$$1, workInProgress, renderExpirationTime); + + case MemoComponent: { + var _type2 = workInProgress.type; + var _unresolvedProps3 = workInProgress.pendingProps; // Resolve outer props first, then resolve inner props. + + var _resolvedProps3 = resolveDefaultProps(_type2, _unresolvedProps3); + + { + if (workInProgress.type !== workInProgress.elementType) { + var outerPropTypes = _type2.propTypes; + + if (outerPropTypes) { + checkPropTypes( + outerPropTypes, + _resolvedProps3, // Resolved for outer only + 'prop', + getComponentName(_type2), + getCurrentFiberStackInDev, + ); + } + } + } + + _resolvedProps3 = resolveDefaultProps(_type2.type, _resolvedProps3); + return updateMemoComponent( + current$$1, + workInProgress, + _type2, + _resolvedProps3, + updateExpirationTime, + renderExpirationTime, + ); + } + + case SimpleMemoComponent: { + return updateSimpleMemoComponent( + current$$1, + workInProgress, + workInProgress.type, + workInProgress.pendingProps, + updateExpirationTime, + renderExpirationTime, + ); + } + + case IncompleteClassComponent: { + var _Component3 = workInProgress.type; + var _unresolvedProps4 = workInProgress.pendingProps; + + var _resolvedProps4 = + workInProgress.elementType === _Component3 + ? _unresolvedProps4 + : resolveDefaultProps(_Component3, _unresolvedProps4); + + return mountIncompleteClassComponent( + current$$1, + workInProgress, + _Component3, + _resolvedProps4, + renderExpirationTime, + ); + } + + case SuspenseListComponent: { + return updateSuspenseListComponent(current$$1, workInProgress, renderExpirationTime); + } + + case FundamentalComponent: { + if (enableFundamentalAPI) { + return updateFundamentalComponent$1(current$$1, workInProgress, renderExpirationTime); + } + + break; + } + + case ScopeComponent: { + if (enableScopeAPI) { + return updateScopeComponent(current$$1, workInProgress, renderExpirationTime); + } + + break; + } + } + + { + { + throw Error( + 'Unknown unit of work tag (' + + workInProgress.tag + + '). This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + } + + function createFundamentalStateInstance(currentFiber, props, impl, state) { + return { + currentFiber: currentFiber, + impl: impl, + instance: null, + prevProps: null, + props: props, + state: state, + }; + } + + function isFiberSuspenseAndTimedOut(fiber) { + return fiber.tag === SuspenseComponent && fiber.memoizedState !== null; + } + + function getSuspenseFallbackChild(fiber) { + return fiber.child.sibling.child; + } + + var emptyObject$1 = {}; + + function collectScopedNodes(node, fn, scopedNodes) { + if (enableScopeAPI) { + if (node.tag === HostComponent) { + var _type = node.type, + memoizedProps = node.memoizedProps, + stateNode = node.stateNode; + + var _instance = getPublicInstance(stateNode); + + if (_instance !== null && fn(_type, memoizedProps || emptyObject$1, _instance) === true) { + scopedNodes.push(_instance); + } + } + + var child = node.child; + + if (isFiberSuspenseAndTimedOut(node)) { + child = getSuspenseFallbackChild(node); + } + + if (child !== null) { + collectScopedNodesFromChildren(child, fn, scopedNodes); + } + } + } + + function collectFirstScopedNode(node, fn) { + if (enableScopeAPI) { + if (node.tag === HostComponent) { + var _type2 = node.type, + memoizedProps = node.memoizedProps, + stateNode = node.stateNode; + + var _instance2 = getPublicInstance(stateNode); + + if (_instance2 !== null && fn(_type2, memoizedProps, _instance2) === true) { + return _instance2; + } + } + + var child = node.child; + + if (isFiberSuspenseAndTimedOut(node)) { + child = getSuspenseFallbackChild(node); + } + + if (child !== null) { + return collectFirstScopedNodeFromChildren(child, fn); + } + } + + return null; + } + + function collectScopedNodesFromChildren(startingChild, fn, scopedNodes) { + var child = startingChild; + + while (child !== null) { + collectScopedNodes(child, fn, scopedNodes); + child = child.sibling; + } + } + + function collectFirstScopedNodeFromChildren(startingChild, fn) { + var child = startingChild; + + while (child !== null) { + var scopedNode = collectFirstScopedNode(child, fn); + + if (scopedNode !== null) { + return scopedNode; + } + + child = child.sibling; + } + + return null; + } + + function collectNearestScopeMethods(node, scope, childrenScopes) { + if (isValidScopeNode(node, scope)) { + childrenScopes.push(node.stateNode.methods); + } else { + var child = node.child; + + if (isFiberSuspenseAndTimedOut(node)) { + child = getSuspenseFallbackChild(node); + } + + if (child !== null) { + collectNearestChildScopeMethods(child, scope, childrenScopes); + } + } + } + + function collectNearestChildScopeMethods(startingChild, scope, childrenScopes) { + var child = startingChild; + + while (child !== null) { + collectNearestScopeMethods(child, scope, childrenScopes); + child = child.sibling; + } + } + + function isValidScopeNode(node, scope) { + return node.tag === ScopeComponent && node.type === scope && node.stateNode !== null; + } + + function createScopeMethods(scope, instance) { + return { + getChildren: function () { + var currentFiber = instance.fiber; + var child = currentFiber.child; + var childrenScopes = []; + + if (child !== null) { + collectNearestChildScopeMethods(child, scope, childrenScopes); + } + + return childrenScopes.length === 0 ? null : childrenScopes; + }, + getChildrenFromRoot: function () { + var currentFiber = instance.fiber; + var node = currentFiber; + + while (node !== null) { + var parent = node.return; + + if (parent === null) { + break; + } + + node = parent; + + if (node.tag === ScopeComponent && node.type === scope) { + break; + } + } + + var childrenScopes = []; + collectNearestChildScopeMethods(node.child, scope, childrenScopes); + return childrenScopes.length === 0 ? null : childrenScopes; + }, + getParent: function () { + var node = instance.fiber.return; + + while (node !== null) { + if (node.tag === ScopeComponent && node.type === scope) { + return node.stateNode.methods; + } + + node = node.return; + } + + return null; + }, + getProps: function () { + var currentFiber = instance.fiber; + return currentFiber.memoizedProps; + }, + queryAllNodes: function (fn) { + var currentFiber = instance.fiber; + var child = currentFiber.child; + var scopedNodes = []; + + if (child !== null) { + collectScopedNodesFromChildren(child, fn, scopedNodes); + } + + return scopedNodes.length === 0 ? null : scopedNodes; + }, + queryFirstNode: function (fn) { + var currentFiber = instance.fiber; + var child = currentFiber.child; + + if (child !== null) { + return collectFirstScopedNodeFromChildren(child, fn); + } + + return null; + }, + containsNode: function (node) { + var fiber = getInstanceFromNode$2(node); + + while (fiber !== null) { + if (fiber.tag === ScopeComponent && fiber.type === scope && fiber.stateNode === instance) { + return true; + } + + fiber = fiber.return; + } + + return false; + }, + }; + } + + function markUpdate(workInProgress) { + // Tag the fiber with an update effect. This turns a Placement into + // a PlacementAndUpdate. + workInProgress.effectTag |= Update; + } + + function markRef$1(workInProgress) { + workInProgress.effectTag |= Ref; + } + + var appendAllChildren; + var updateHostContainer; + var updateHostComponent$1; + var updateHostText$1; + + if (supportsMutation) { + // Mutation mode + appendAllChildren = function (parent, workInProgress, needsVisibilityToggle, isHidden) { + // We only have the top Fiber that was created but we need recurse down its + // children to find all the terminal nodes. + var node = workInProgress.child; + + while (node !== null) { + if (node.tag === HostComponent || node.tag === HostText) { + appendInitialChild(parent, node.stateNode); + } else if (enableFundamentalAPI && node.tag === FundamentalComponent) { + appendInitialChild(parent, node.stateNode.instance); + } else if (node.tag === HostPortal) { + // If we have a portal child, then we don't want to traverse + // down its children. Instead, we'll get insertions from each child in + // the portal directly. + } else if (node.child !== null) { + node.child.return = node; + node = node.child; + continue; + } + + if (node === workInProgress) { + return; + } + + while (node.sibling === null) { + if (node.return === null || node.return === workInProgress) { + return; + } + + node = node.return; + } + + node.sibling.return = node.return; + node = node.sibling; + } + }; + + updateHostContainer = function (workInProgress) { + // Noop + }; + + updateHostComponent$1 = function ( + current, + workInProgress, + type, + newProps, + rootContainerInstance, + ) { + // If we have an alternate, that means this is an update and we need to + // schedule a side-effect to do the updates. + var oldProps = current.memoizedProps; + + if (oldProps === newProps) { + // In mutation mode, this is sufficient for a bailout because + // we won't touch this node even if children changed. + return; + } // If we get updated because one of our children updated, we don't + // have newProps so we'll have to reuse them. + // TODO: Split the update API as separate for the props vs. children. + // Even better would be if children weren't special cased at all tho. + + var instance = workInProgress.stateNode; + var currentHostContext = getHostContext(); // TODO: Experiencing an error where oldProps is null. Suggests a host + // component is hitting the resume path. Figure out why. Possibly + // related to `hidden`. + + var updatePayload = prepareUpdate( + instance, + type, + oldProps, + newProps, + rootContainerInstance, + currentHostContext, + ); // TODO: Type this specific to this type of component. + + workInProgress.updateQueue = updatePayload; // If the update payload indicates that there is a change or if there + // is a new ref we mark this as an update. All the work is done in commitWork. + + if (updatePayload) { + markUpdate(workInProgress); + } + }; + + updateHostText$1 = function (current, workInProgress, oldText, newText) { + // If the text differs, mark it as an update. All the work in done in commitWork. + if (oldText !== newText) { + markUpdate(workInProgress); + } + }; + } else if (supportsPersistence) { + // Persistent host tree mode + appendAllChildren = function (parent, workInProgress, needsVisibilityToggle, isHidden) { + // We only have the top Fiber that was created but we need recurse down its + // children to find all the terminal nodes. + var node = workInProgress.child; + + while (node !== null) { + // eslint-disable-next-line no-labels + branches: if (node.tag === HostComponent) { + var instance = node.stateNode; + + if (needsVisibilityToggle && isHidden) { + // This child is inside a timed out tree. Hide it. + var props = node.memoizedProps; + var type = node.type; + instance = cloneHiddenInstance(instance, type, props, node); + } + + appendInitialChild(parent, instance); + } else if (node.tag === HostText) { + var _instance = node.stateNode; + + if (needsVisibilityToggle && isHidden) { + // This child is inside a timed out tree. Hide it. + var text = node.memoizedProps; + _instance = cloneHiddenTextInstance(_instance, text, node); + } + + appendInitialChild(parent, _instance); + } else if (enableFundamentalAPI && node.tag === FundamentalComponent) { + var _instance2 = node.stateNode.instance; + + if (needsVisibilityToggle && isHidden) { + // This child is inside a timed out tree. Hide it. + var _props = node.memoizedProps; + var _type = node.type; + _instance2 = cloneHiddenInstance(_instance2, _type, _props, node); + } + + appendInitialChild(parent, _instance2); + } else if (node.tag === HostPortal) { + // If we have a portal child, then we don't want to traverse + // down its children. Instead, we'll get insertions from each child in + // the portal directly. + } else if (node.tag === SuspenseComponent) { + if ((node.effectTag & Update) !== NoEffect) { + // Need to toggle the visibility of the primary children. + var newIsHidden = node.memoizedState !== null; + + if (newIsHidden) { + var primaryChildParent = node.child; + + if (primaryChildParent !== null) { + if (primaryChildParent.child !== null) { + primaryChildParent.child.return = primaryChildParent; + appendAllChildren(parent, primaryChildParent, true, newIsHidden); + } + + var fallbackChildParent = primaryChildParent.sibling; + + if (fallbackChildParent !== null) { + fallbackChildParent.return = node; + node = fallbackChildParent; + continue; + } + } + } + } + + if (node.child !== null) { + // Continue traversing like normal + node.child.return = node; + node = node.child; + continue; + } + } else if (node.child !== null) { + node.child.return = node; + node = node.child; + continue; + } // $FlowFixMe This is correct but Flow is confused by the labeled break. + + node = node; + + if (node === workInProgress) { + return; + } + + while (node.sibling === null) { + if (node.return === null || node.return === workInProgress) { + return; + } + + node = node.return; + } + + node.sibling.return = node.return; + node = node.sibling; + } + }; // An unfortunate fork of appendAllChildren because we have two different parent types. + + var appendAllChildrenToContainer = function ( + containerChildSet, + workInProgress, + needsVisibilityToggle, + isHidden, + ) { + // We only have the top Fiber that was created but we need recurse down its + // children to find all the terminal nodes. + var node = workInProgress.child; + + while (node !== null) { + // eslint-disable-next-line no-labels + branches: if (node.tag === HostComponent) { + var instance = node.stateNode; + + if (needsVisibilityToggle && isHidden) { + // This child is inside a timed out tree. Hide it. + var props = node.memoizedProps; + var type = node.type; + instance = cloneHiddenInstance(instance, type, props, node); + } + + appendChildToContainerChildSet(containerChildSet, instance); + } else if (node.tag === HostText) { + var _instance3 = node.stateNode; + + if (needsVisibilityToggle && isHidden) { + // This child is inside a timed out tree. Hide it. + var text = node.memoizedProps; + _instance3 = cloneHiddenTextInstance(_instance3, text, node); + } + + appendChildToContainerChildSet(containerChildSet, _instance3); + } else if (enableFundamentalAPI && node.tag === FundamentalComponent) { + var _instance4 = node.stateNode.instance; + + if (needsVisibilityToggle && isHidden) { + // This child is inside a timed out tree. Hide it. + var _props2 = node.memoizedProps; + var _type2 = node.type; + _instance4 = cloneHiddenInstance(_instance4, _type2, _props2, node); + } + + appendChildToContainerChildSet(containerChildSet, _instance4); + } else if (node.tag === HostPortal) { + // If we have a portal child, then we don't want to traverse + // down its children. Instead, we'll get insertions from each child in + // the portal directly. + } else if (node.tag === SuspenseComponent) { + if ((node.effectTag & Update) !== NoEffect) { + // Need to toggle the visibility of the primary children. + var newIsHidden = node.memoizedState !== null; + + if (newIsHidden) { + var primaryChildParent = node.child; + + if (primaryChildParent !== null) { + if (primaryChildParent.child !== null) { + primaryChildParent.child.return = primaryChildParent; + appendAllChildrenToContainer( + containerChildSet, + primaryChildParent, + true, + newIsHidden, + ); + } + + var fallbackChildParent = primaryChildParent.sibling; + + if (fallbackChildParent !== null) { + fallbackChildParent.return = node; + node = fallbackChildParent; + continue; + } + } + } + } + + if (node.child !== null) { + // Continue traversing like normal + node.child.return = node; + node = node.child; + continue; + } + } else if (node.child !== null) { + node.child.return = node; + node = node.child; + continue; + } // $FlowFixMe This is correct but Flow is confused by the labeled break. + + node = node; + + if (node === workInProgress) { + return; + } + + while (node.sibling === null) { + if (node.return === null || node.return === workInProgress) { + return; + } + + node = node.return; + } + + node.sibling.return = node.return; + node = node.sibling; + } + }; + + updateHostContainer = function (workInProgress) { + var portalOrRoot = workInProgress.stateNode; + var childrenUnchanged = workInProgress.firstEffect === null; + + if (childrenUnchanged) { + // No changes, just reuse the existing instance. + } else { + var container = portalOrRoot.containerInfo; + var newChildSet = createContainerChildSet(container); // If children might have changed, we have to add them all to the set. + + appendAllChildrenToContainer(newChildSet, workInProgress, false, false); + portalOrRoot.pendingChildren = newChildSet; // Schedule an update on the container to swap out the container. + + markUpdate(workInProgress); + finalizeContainerChildren(container, newChildSet); + } + }; + + updateHostComponent$1 = function ( + current, + workInProgress, + type, + newProps, + rootContainerInstance, + ) { + var currentInstance = current.stateNode; + var oldProps = current.memoizedProps; // If there are no effects associated with this node, then none of our children had any updates. + // This guarantees that we can reuse all of them. + + var childrenUnchanged = workInProgress.firstEffect === null; + + if (childrenUnchanged && oldProps === newProps) { + // No changes, just reuse the existing instance. + // Note that this might release a previous clone. + workInProgress.stateNode = currentInstance; + return; + } + + var recyclableInstance = workInProgress.stateNode; + var currentHostContext = getHostContext(); + var updatePayload = null; + + if (oldProps !== newProps) { + updatePayload = prepareUpdate( + recyclableInstance, + type, + oldProps, + newProps, + rootContainerInstance, + currentHostContext, + ); + } + + if (childrenUnchanged && updatePayload === null) { + // No changes, just reuse the existing instance. + // Note that this might release a previous clone. + workInProgress.stateNode = currentInstance; + return; + } + + var newInstance = cloneInstance( + currentInstance, + updatePayload, + type, + oldProps, + newProps, + workInProgress, + childrenUnchanged, + recyclableInstance, + ); + + if ( + finalizeInitialChildren( + newInstance, + type, + newProps, + rootContainerInstance, + currentHostContext, + ) + ) { + markUpdate(workInProgress); + } + + workInProgress.stateNode = newInstance; + + if (childrenUnchanged) { + // If there are no other effects in this tree, we need to flag this node as having one. + // Even though we're not going to use it for anything. + // Otherwise parents won't know that there are new children to propagate upwards. + markUpdate(workInProgress); + } else { + // If children might have changed, we have to add them all to the set. + appendAllChildren(newInstance, workInProgress, false, false); + } + }; + + updateHostText$1 = function (current, workInProgress, oldText, newText) { + if (oldText !== newText) { + // If the text content differs, we'll create a new text instance for it. + var rootContainerInstance = getRootHostContainer(); + var currentHostContext = getHostContext(); + workInProgress.stateNode = createTextInstance( + newText, + rootContainerInstance, + currentHostContext, + workInProgress, + ); // We'll have to mark it as having an effect, even though we won't use the effect for anything. + // This lets the parents know that at least one of their children has changed. + + markUpdate(workInProgress); + } + }; + } else { + // No host operations + updateHostContainer = function (workInProgress) { + // Noop + }; + + updateHostComponent$1 = function ( + current, + workInProgress, + type, + newProps, + rootContainerInstance, + ) { + // Noop + }; + + updateHostText$1 = function (current, workInProgress, oldText, newText) { + // Noop + }; + } + + function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { + switch (renderState.tailMode) { + case 'hidden': { + // Any insertions at the end of the tail list after this point + // should be invisible. If there are already mounted boundaries + // anything before them are not considered for collapsing. + // Therefore we need to go through the whole tail to find if + // there are any. + var tailNode = renderState.tail; + var lastTailNode = null; + + while (tailNode !== null) { + if (tailNode.alternate !== null) { + lastTailNode = tailNode; + } + + tailNode = tailNode.sibling; + } // Next we're simply going to delete all insertions after the + // last rendered item. + + if (lastTailNode === null) { + // All remaining items in the tail are insertions. + renderState.tail = null; + } else { + // Detach the insertion after the last node that was already + // inserted. + lastTailNode.sibling = null; + } + + break; + } + + case 'collapsed': { + // Any insertions at the end of the tail list after this point + // should be invisible. If there are already mounted boundaries + // anything before them are not considered for collapsing. + // Therefore we need to go through the whole tail to find if + // there are any. + var _tailNode = renderState.tail; + var _lastTailNode = null; + + while (_tailNode !== null) { + if (_tailNode.alternate !== null) { + _lastTailNode = _tailNode; + } + + _tailNode = _tailNode.sibling; + } // Next we're simply going to delete all insertions after the + // last rendered item. + + if (_lastTailNode === null) { + // All remaining items in the tail are insertions. + if (!hasRenderedATailFallback && renderState.tail !== null) { + // We suspended during the head. We want to show at least one + // row at the tail. So we'll keep on and cut off the rest. + renderState.tail.sibling = null; + } else { + renderState.tail = null; + } + } else { + // Detach the insertion after the last node that was already + // inserted. + _lastTailNode.sibling = null; + } + + break; + } + } + } + + function completeWork(current, workInProgress, renderExpirationTime) { + var newProps = workInProgress.pendingProps; + + switch (workInProgress.tag) { + case IndeterminateComponent: + break; + + case LazyComponent: + break; + + case SimpleMemoComponent: + case FunctionComponent: + break; + + case ClassComponent: { + var Component = workInProgress.type; + + if (isContextProvider(Component)) { + popContext(workInProgress); + } + + break; + } + + case HostRoot: { + popHostContainer(workInProgress); + popTopLevelContextObject(workInProgress); + var fiberRoot = workInProgress.stateNode; + + if (fiberRoot.pendingContext) { + fiberRoot.context = fiberRoot.pendingContext; + fiberRoot.pendingContext = null; + } + + if (current === null || current.child === null) { + // If we hydrated, pop so that we can delete any remaining children + // that weren't hydrated. + var wasHydrated = popHydrationState(workInProgress); + + if (wasHydrated) { + // If we hydrated, then we'll need to schedule an update for + // the commit side-effects on the root. + markUpdate(workInProgress); + } + } + + updateHostContainer(workInProgress); + break; + } + + case HostComponent: { + popHostContext(workInProgress); + var rootContainerInstance = getRootHostContainer(); + var type = workInProgress.type; + + if (current !== null && workInProgress.stateNode != null) { + updateHostComponent$1(current, workInProgress, type, newProps, rootContainerInstance); + + if (enableFlareAPI) { + var prevListeners = current.memoizedProps.listeners; + var nextListeners = newProps.listeners; + + if (prevListeners !== nextListeners) { + markUpdate(workInProgress); + } + } + + if (current.ref !== workInProgress.ref) { + markRef$1(workInProgress); + } + } else { + if (!newProps) { + if (!(workInProgress.stateNode !== null)) { + { + throw Error( + 'We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } // This can happen when we abort work. + + break; + } + + var currentHostContext = getHostContext(); // TODO: Move createInstance to beginWork and keep it on a context + // "stack" as the parent. Then append children as we go in beginWork + // or completeWork depending on we want to add then top->down or + // bottom->up. Top->down is faster in IE11. + + var _wasHydrated = popHydrationState(workInProgress); + + if (_wasHydrated) { + // TODO: Move this and createInstance step into the beginPhase + // to consolidate. + if ( + prepareToHydrateHostInstance(workInProgress, rootContainerInstance, currentHostContext) + ) { + // If changes to the hydrated node needs to be applied at the + // commit-phase we mark this as such. + markUpdate(workInProgress); + } + + if (enableFlareAPI) { + var listeners = newProps.listeners; + + if (listeners != null) { + updateEventListeners(listeners, workInProgress, rootContainerInstance); + } + } + } else { + var instance = createInstance( + type, + newProps, + rootContainerInstance, + currentHostContext, + workInProgress, + ); + appendAllChildren(instance, workInProgress, false, false); // This needs to be set before we mount Flare event listeners + + workInProgress.stateNode = instance; + + if (enableFlareAPI) { + var _listeners = newProps.listeners; + + if (_listeners != null) { + updateEventListeners(_listeners, workInProgress, rootContainerInstance); + } + } // Certain renderers require commit-time effects for initial mount. + // (eg DOM renderer supports auto-focus for certain elements). + // Make sure such renderers get scheduled for later work. + + if ( + finalizeInitialChildren( + instance, + type, + newProps, + rootContainerInstance, + currentHostContext, + ) + ) { + markUpdate(workInProgress); + } + } + + if (workInProgress.ref !== null) { + // If there is a ref on a host node we need to schedule a callback + markRef$1(workInProgress); + } + } + + break; + } + + case HostText: { + var newText = newProps; + + if (current && workInProgress.stateNode != null) { + var oldText = current.memoizedProps; // If we have an alternate, that means this is an update and we need + // to schedule a side-effect to do the updates. + + updateHostText$1(current, workInProgress, oldText, newText); + } else { + if (typeof newText !== 'string') { + if (!(workInProgress.stateNode !== null)) { + { + throw Error( + 'We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } // This can happen when we abort work. + } + + var _rootContainerInstance = getRootHostContainer(); + + var _currentHostContext = getHostContext(); + + var _wasHydrated2 = popHydrationState(workInProgress); + + if (_wasHydrated2) { + if (prepareToHydrateHostTextInstance(workInProgress)) { + markUpdate(workInProgress); + } + } else { + workInProgress.stateNode = createTextInstance( + newText, + _rootContainerInstance, + _currentHostContext, + workInProgress, + ); + } + } + + break; + } + + case ForwardRef: + break; + + case SuspenseComponent: { + popSuspenseContext(workInProgress); + var nextState = workInProgress.memoizedState; + + if (enableSuspenseServerRenderer) { + if (nextState !== null && nextState.dehydrated !== null) { + if (current === null) { + var _wasHydrated3 = popHydrationState(workInProgress); + + if (!_wasHydrated3) { + { + throw Error( + 'A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.', + ); + } + } + + prepareToHydrateHostSuspenseInstance(workInProgress); + + if (enableSchedulerTracing) { + markSpawnedWork(Never); + } + + return null; + } else { + // We should never have been in a hydration state if we didn't have a current. + // However, in some of those paths, we might have reentered a hydration state + // and then we might be inside a hydration state. In that case, we'll need to + // exit out of it. + resetHydrationState(); + + if ((workInProgress.effectTag & DidCapture) === NoEffect) { + // This boundary did not suspend so it's now hydrated and unsuspended. + workInProgress.memoizedState = null; + } // If nothing suspended, we need to schedule an effect to mark this boundary + // as having hydrated so events know that they're free be invoked. + // It's also a signal to replay events and the suspense callback. + // If something suspended, schedule an effect to attach retry listeners. + // So we might as well always mark this. + + workInProgress.effectTag |= Update; + return null; + } + } + } + + if ((workInProgress.effectTag & DidCapture) !== NoEffect) { + // Something suspended. Re-render with the fallback children. + workInProgress.expirationTime = renderExpirationTime; // Do not reset the effect list. + + return workInProgress; + } + + var nextDidTimeout = nextState !== null; + var prevDidTimeout = false; + + if (current === null) { + if (workInProgress.memoizedProps.fallback !== undefined) { + popHydrationState(workInProgress); + } + } else { + var prevState = current.memoizedState; + prevDidTimeout = prevState !== null; + + if (!nextDidTimeout && prevState !== null) { + // We just switched from the fallback to the normal children. + // Delete the fallback. + // TODO: Would it be better to store the fallback fragment on + // the stateNode during the begin phase? + var currentFallbackChild = current.child.sibling; + + if (currentFallbackChild !== null) { + // Deletions go at the beginning of the return fiber's effect list + var first = workInProgress.firstEffect; + + if (first !== null) { + workInProgress.firstEffect = currentFallbackChild; + currentFallbackChild.nextEffect = first; + } else { + workInProgress.firstEffect = workInProgress.lastEffect = currentFallbackChild; + currentFallbackChild.nextEffect = null; + } + + currentFallbackChild.effectTag = Deletion; + } + } + } + + if (nextDidTimeout && !prevDidTimeout) { + // If this subtreee is running in blocking mode we can suspend, + // otherwise we won't suspend. + // TODO: This will still suspend a synchronous tree if anything + // in the concurrent tree already suspended during this render. + // This is a known bug. + if ((workInProgress.mode & BlockingMode) !== NoMode) { + // TODO: Move this back to throwException because this is too late + // if this is a large tree which is common for initial loads. We + // don't know if we should restart a render or not until we get + // this marker, and this is too late. + // If this render already had a ping or lower pri updates, + // and this is the first time we know we're going to suspend we + // should be able to immediately restart from within throwException. + var hasInvisibleChildContext = + current === null && workInProgress.memoizedProps.unstable_avoidThisFallback !== true; + + if ( + hasInvisibleChildContext || + hasSuspenseContext(suspenseStackCursor.current, InvisibleParentSuspenseContext) + ) { + // If this was in an invisible tree or a new render, then showing + // this boundary is ok. + renderDidSuspend(); + } else { + // Otherwise, we're going to have to hide content so we should + // suspend for longer if possible. + renderDidSuspendDelayIfPossible(); + } + } + } + + if (supportsPersistence) { + // TODO: Only schedule updates if not prevDidTimeout. + if (nextDidTimeout) { + // If this boundary just timed out, schedule an effect to attach a + // retry listener to the proimse. This flag is also used to hide the + // primary children. + workInProgress.effectTag |= Update; + } + } + + if (supportsMutation) { + // TODO: Only schedule updates if these values are non equal, i.e. it changed. + if (nextDidTimeout || prevDidTimeout) { + // If this boundary just timed out, schedule an effect to attach a + // retry listener to the proimse. This flag is also used to hide the + // primary children. In mutation mode, we also need the flag to + // *unhide* children that were previously hidden, so check if the + // is currently timed out, too. + workInProgress.effectTag |= Update; + } + } + + if ( + enableSuspenseCallback && + workInProgress.updateQueue !== null && + workInProgress.memoizedProps.suspenseCallback != null + ) { + // Always notify the callback + workInProgress.effectTag |= Update; + } + + break; + } + + case Fragment: + break; + + case Mode: + break; + + case Profiler: + break; + + case HostPortal: + popHostContainer(workInProgress); + updateHostContainer(workInProgress); + break; + + case ContextProvider: + // Pop provider fiber + popProvider(workInProgress); + break; + + case ContextConsumer: + break; + + case MemoComponent: + break; + + case IncompleteClassComponent: { + // Same as class component case. I put it down here so that the tags are + // sequential to ensure this switch is compiled to a jump table. + var _Component = workInProgress.type; + + if (isContextProvider(_Component)) { + popContext(workInProgress); + } + + break; + } + + case SuspenseListComponent: { + popSuspenseContext(workInProgress); + var renderState = workInProgress.memoizedState; + + if (renderState === null) { + // We're running in the default, "independent" mode. We don't do anything + // in this mode. + break; + } + + var didSuspendAlready = (workInProgress.effectTag & DidCapture) !== NoEffect; + var renderedTail = renderState.rendering; + + if (renderedTail === null) { + // We just rendered the head. + if (!didSuspendAlready) { + // This is the first pass. We need to figure out if anything is still + // suspended in the rendered set. + // If new content unsuspended, but there's still some content that + // didn't. Then we need to do a second pass that forces everything + // to keep showing their fallbacks. + // We might be suspended if something in this render pass suspended, or + // something in the previous committed pass suspended. Otherwise, + // there's no chance so we can skip the expensive call to + // findFirstSuspended. + var cannotBeSuspended = + renderHasNotSuspendedYet() && + (current === null || (current.effectTag & DidCapture) === NoEffect); + + if (!cannotBeSuspended) { + var row = workInProgress.child; + + while (row !== null) { + var suspended = findFirstSuspended(row); + + if (suspended !== null) { + didSuspendAlready = true; + workInProgress.effectTag |= DidCapture; + cutOffTailIfNeeded(renderState, false); // If this is a newly suspended tree, it might not get committed as + // part of the second pass. In that case nothing will subscribe to + // its thennables. Instead, we'll transfer its thennables to the + // SuspenseList so that it can retry if they resolve. + // There might be multiple of these in the list but since we're + // going to wait for all of them anyway, it doesn't really matter + // which ones gets to ping. In theory we could get clever and keep + // track of how many dependencies remain but it gets tricky because + // in the meantime, we can add/remove/change items and dependencies. + // We might bail out of the loop before finding any but that + // doesn't matter since that means that the other boundaries that + // we did find already has their listeners attached. + + var newThennables = suspended.updateQueue; + + if (newThennables !== null) { + workInProgress.updateQueue = newThennables; + workInProgress.effectTag |= Update; + } // Rerender the whole list, but this time, we'll force fallbacks + // to stay in place. + // Reset the effect list before doing the second pass since that's now invalid. + + if (renderState.lastEffect === null) { + workInProgress.firstEffect = null; + } + + workInProgress.lastEffect = renderState.lastEffect; // Reset the child fibers to their original state. + + resetChildFibers(workInProgress, renderExpirationTime); // Set up the Suspense Context to force suspense and immediately + // rerender the children. + + pushSuspenseContext( + workInProgress, + setShallowSuspenseContext(suspenseStackCursor.current, ForceSuspenseFallback), + ); + return workInProgress.child; + } + + row = row.sibling; + } + } + } else { + cutOffTailIfNeeded(renderState, false); + } // Next we're going to render the tail. + } else { + // Append the rendered row to the child list. + if (!didSuspendAlready) { + var _suspended = findFirstSuspended(renderedTail); + + if (_suspended !== null) { + workInProgress.effectTag |= DidCapture; + didSuspendAlready = true; // Ensure we transfer the update queue to the parent so that it doesn't + // get lost if this row ends up dropped during a second pass. + + var _newThennables = _suspended.updateQueue; + + if (_newThennables !== null) { + workInProgress.updateQueue = _newThennables; + workInProgress.effectTag |= Update; + } + + cutOffTailIfNeeded(renderState, true); // This might have been modified. + + if ( + renderState.tail === null && + renderState.tailMode === 'hidden' && + !renderedTail.alternate + ) { + // We need to delete the row we just rendered. + // Reset the effect list to what it was before we rendered this + // child. The nested children have already appended themselves. + var lastEffect = (workInProgress.lastEffect = renderState.lastEffect); // Remove any effects that were appended after this point. + + if (lastEffect !== null) { + lastEffect.nextEffect = null; + } // We're done. + + return null; + } + } else if (now() > renderState.tailExpiration && renderExpirationTime > Never) { + // We have now passed our CPU deadline and we'll just give up further + // attempts to render the main content and only render fallbacks. + // The assumption is that this is usually faster. + workInProgress.effectTag |= DidCapture; + didSuspendAlready = true; + cutOffTailIfNeeded(renderState, false); // Since nothing actually suspended, there will nothing to ping this + // to get it started back up to attempt the next item. If we can show + // them, then they really have the same priority as this render. + // So we'll pick it back up the very next render pass once we've had + // an opportunity to yield for paint. + + var nextPriority = renderExpirationTime - 1; + workInProgress.expirationTime = workInProgress.childExpirationTime = nextPriority; + + if (enableSchedulerTracing) { + markSpawnedWork(nextPriority); + } + } + } + + if (renderState.isBackwards) { + // The effect list of the backwards tail will have been added + // to the end. This breaks the guarantee that life-cycles fire in + // sibling order but that isn't a strong guarantee promised by React. + // Especially since these might also just pop in during future commits. + // Append to the beginning of the list. + renderedTail.sibling = workInProgress.child; + workInProgress.child = renderedTail; + } else { + var previousSibling = renderState.last; + + if (previousSibling !== null) { + previousSibling.sibling = renderedTail; + } else { + workInProgress.child = renderedTail; + } + + renderState.last = renderedTail; + } + } + + if (renderState.tail !== null) { + // We still have tail rows to render. + if (renderState.tailExpiration === 0) { + // Heuristic for how long we're willing to spend rendering rows + // until we just give up and show what we have so far. + var TAIL_EXPIRATION_TIMEOUT_MS = 500; + renderState.tailExpiration = now() + TAIL_EXPIRATION_TIMEOUT_MS; + } // Pop a row. + + var next = renderState.tail; + renderState.rendering = next; + renderState.tail = next.sibling; + renderState.lastEffect = workInProgress.lastEffect; + next.sibling = null; // Restore the context. + // TODO: We can probably just avoid popping it instead and only + // setting it the first time we go from not suspended to suspended. + + var suspenseContext = suspenseStackCursor.current; + + if (didSuspendAlready) { + suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback); + } else { + suspenseContext = setDefaultShallowSuspenseContext(suspenseContext); + } + + pushSuspenseContext(workInProgress, suspenseContext); // Do a pass over the next row. + + return next; + } + + break; + } + + case FundamentalComponent: { + if (enableFundamentalAPI) { + var fundamentalImpl = workInProgress.type.impl; + var fundamentalInstance = workInProgress.stateNode; + + if (fundamentalInstance === null) { + var getInitialState = fundamentalImpl.getInitialState; + var fundamentalState; + + if (getInitialState !== undefined) { + fundamentalState = getInitialState(newProps); + } + + fundamentalInstance = workInProgress.stateNode = createFundamentalStateInstance( + workInProgress, + newProps, + fundamentalImpl, + fundamentalState || {}, + ); + + var _instance5 = getFundamentalComponentInstance(fundamentalInstance); + + fundamentalInstance.instance = _instance5; + + if (fundamentalImpl.reconcileChildren === false) { + return null; + } + + appendAllChildren(_instance5, workInProgress, false, false); + mountFundamentalComponent(fundamentalInstance); + } else { + // We fire update in commit phase + var prevProps = fundamentalInstance.props; + fundamentalInstance.prevProps = prevProps; + fundamentalInstance.props = newProps; + fundamentalInstance.currentFiber = workInProgress; + + if (supportsPersistence) { + var _instance6 = cloneFundamentalInstance(fundamentalInstance); + + fundamentalInstance.instance = _instance6; + appendAllChildren(_instance6, workInProgress, false, false); + } + + var shouldUpdate = shouldUpdateFundamentalComponent(fundamentalInstance); + + if (shouldUpdate) { + markUpdate(workInProgress); + } + } + } + + break; + } + + case ScopeComponent: { + if (enableScopeAPI) { + if (current === null) { + var _type3 = workInProgress.type; + var scopeInstance = { + fiber: workInProgress, + methods: null, + }; + workInProgress.stateNode = scopeInstance; + scopeInstance.methods = createScopeMethods(_type3, scopeInstance); + + if (enableFlareAPI) { + var _listeners2 = newProps.listeners; + + if (_listeners2 != null) { + var _rootContainerInstance2 = getRootHostContainer(); + + updateEventListeners(_listeners2, workInProgress, _rootContainerInstance2); + } + } + + if (workInProgress.ref !== null) { + markRef$1(workInProgress); + markUpdate(workInProgress); + } + } else { + if (enableFlareAPI) { + var _prevListeners = current.memoizedProps.listeners; + var _nextListeners = newProps.listeners; + + if (_prevListeners !== _nextListeners || workInProgress.ref !== null) { + markUpdate(workInProgress); + } + } else { + if (workInProgress.ref !== null) { + markUpdate(workInProgress); + } + } + + if (current.ref !== workInProgress.ref) { + markRef$1(workInProgress); + } + } + } + + break; + } + + default: { + { + throw Error( + 'Unknown unit of work tag (' + + workInProgress.tag + + '). This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + } + + return null; + } + + function unwindWork(workInProgress, renderExpirationTime) { + switch (workInProgress.tag) { + case ClassComponent: { + var Component = workInProgress.type; + + if (isContextProvider(Component)) { + popContext(workInProgress); + } + + var effectTag = workInProgress.effectTag; + + if (effectTag & ShouldCapture) { + workInProgress.effectTag = (effectTag & ~ShouldCapture) | DidCapture; + return workInProgress; + } + + return null; + } + + case HostRoot: { + popHostContainer(workInProgress); + popTopLevelContextObject(workInProgress); + var _effectTag = workInProgress.effectTag; + + if (!((_effectTag & DidCapture) === NoEffect)) { + { + throw Error( + 'The root failed to unmount after an error. This is likely a bug in React. Please file an issue.', + ); + } + } + + workInProgress.effectTag = (_effectTag & ~ShouldCapture) | DidCapture; + return workInProgress; + } + + case HostComponent: { + // TODO: popHydrationState + popHostContext(workInProgress); + return null; + } + + case SuspenseComponent: { + popSuspenseContext(workInProgress); + + if (enableSuspenseServerRenderer) { + var suspenseState = workInProgress.memoizedState; + + if (suspenseState !== null && suspenseState.dehydrated !== null) { + if (!(workInProgress.alternate !== null)) { + { + throw Error( + 'Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue.', + ); + } + } + + resetHydrationState(); + } + } + + var _effectTag2 = workInProgress.effectTag; + + if (_effectTag2 & ShouldCapture) { + workInProgress.effectTag = (_effectTag2 & ~ShouldCapture) | DidCapture; // Captured a suspense effect. Re-render the boundary. + + return workInProgress; + } + + return null; + } + + case SuspenseListComponent: { + popSuspenseContext(workInProgress); // SuspenseList doesn't actually catch anything. It should've been + // caught by a nested boundary. If not, it should bubble through. + + return null; + } + + case HostPortal: + popHostContainer(workInProgress); + return null; + + case ContextProvider: + popProvider(workInProgress); + return null; + + default: + return null; + } + } + + function unwindInterruptedWork(interruptedWork) { + switch (interruptedWork.tag) { + case ClassComponent: { + var childContextTypes = interruptedWork.type.childContextTypes; + + if (childContextTypes !== null && childContextTypes !== undefined) { + popContext(interruptedWork); + } + + break; + } + + case HostRoot: { + popHostContainer(interruptedWork); + popTopLevelContextObject(interruptedWork); + break; + } + + case HostComponent: { + popHostContext(interruptedWork); + break; + } + + case HostPortal: + popHostContainer(interruptedWork); + break; + + case SuspenseComponent: + popSuspenseContext(interruptedWork); + break; + + case SuspenseListComponent: + popSuspenseContext(interruptedWork); + break; + + case ContextProvider: + popProvider(interruptedWork); + break; + + default: + break; + } + } + + function createCapturedValue(value, source) { + // If the value is an error, call this function immediately after it is thrown + // so the stack is accurate. + return { + value: value, + source: source, + stack: getStackByFiberInDevAndProd(source), + }; + } + + // This module is forked in different environments. + // By default, return `true` to log errors to the console. + // Forks can return `false` if this isn't desirable. + function showErrorDialog(capturedError) { + return true; + } + + function logCapturedError(capturedError) { + var logError = showErrorDialog(capturedError); // Allow injected showErrorDialog() to prevent default console.error logging. + // This enables renderers like ReactNative to better manage redbox behavior. + + if (logError === false) { + return; + } + + var error = capturedError.error; + + { + var componentName = capturedError.componentName, + componentStack = capturedError.componentStack, + errorBoundaryName = capturedError.errorBoundaryName, + errorBoundaryFound = capturedError.errorBoundaryFound, + willRetry = capturedError.willRetry; // Browsers support silencing uncaught errors by calling + // `preventDefault()` in window `error` handler. + // We record this information as an expando on the error. + + if (error != null && error._suppressLogging) { + if (errorBoundaryFound && willRetry) { + // The error is recoverable and was silenced. + // Ignore it and don't print the stack addendum. + // This is handy for testing error boundaries without noise. + return; + } // The error is fatal. Since the silencing might have + // been accidental, we'll surface it anyway. + // However, the browser would have silenced the original error + // so we'll print it first, and then print the stack addendum. + + console.error(error); // For a more detailed description of this block, see: + // https://github.com/facebook/react/pull/13384 + } + + var componentNameMessage = componentName + ? 'The above error occurred in the <' + componentName + '> component:' + : 'The above error occurred in one of your React components:'; + var errorBoundaryMessage; // errorBoundaryFound check is sufficient; errorBoundaryName check is to satisfy Flow. + + if (errorBoundaryFound && errorBoundaryName) { + if (willRetry) { + errorBoundaryMessage = + 'React will try to recreate this component tree from scratch ' + + ('using the error boundary you provided, ' + errorBoundaryName + '.'); + } else { + errorBoundaryMessage = + 'This error was initially handled by the error boundary ' + + errorBoundaryName + + '.\n' + + 'Recreating the tree from scratch failed so React will unmount the tree.'; + } + } else { + errorBoundaryMessage = + 'Consider adding an error boundary to your tree to customize error handling behavior.\n' + + 'Visit https://fb.me/react-error-boundaries to learn more about error boundaries.'; + } + + var combinedMessage = + '' + componentNameMessage + componentStack + '\n\n' + ('' + errorBoundaryMessage); // In development, we provide our own message with just the component stack. + // We don't include the original error message and JS stack because the browser + // has already printed it. Even if the application swallows the error, it is still + // displayed by the browser thanks to the DEV-only fake event trick in ReactErrorUtils. + + console.error(combinedMessage); + } + } + + var didWarnAboutUndefinedSnapshotBeforeUpdate = null; + + { + didWarnAboutUndefinedSnapshotBeforeUpdate = new Set(); + } + + var PossiblyWeakSet = typeof WeakSet === 'function' ? WeakSet : Set; + function logError(boundary, errorInfo) { + var source = errorInfo.source; + var stack = errorInfo.stack; + + if (stack === null && source !== null) { + stack = getStackByFiberInDevAndProd(source); + } + + var capturedError = { + componentName: source !== null ? getComponentName(source.type) : null, + componentStack: stack !== null ? stack : '', + error: errorInfo.value, + errorBoundary: null, + errorBoundaryName: null, + errorBoundaryFound: false, + willRetry: false, + }; + + if (boundary !== null && boundary.tag === ClassComponent) { + capturedError.errorBoundary = boundary.stateNode; + capturedError.errorBoundaryName = getComponentName(boundary.type); + capturedError.errorBoundaryFound = true; + capturedError.willRetry = true; + } + + try { + logCapturedError(capturedError); + } catch (e) { + // This method must not throw, or React internal state will get messed up. + // If console.error is overridden, or logCapturedError() shows a dialog that throws, + // we want to report this error outside of the normal stack as a last resort. + // https://github.com/facebook/react/issues/13188 + setTimeout(function () { + throw e; + }); + } + } + + var callComponentWillUnmountWithTimer = function (current$$1, instance) { + startPhaseTimer(current$$1, 'componentWillUnmount'); + instance.props = current$$1.memoizedProps; + instance.state = current$$1.memoizedState; + instance.componentWillUnmount(); + stopPhaseTimer(); + }; // Capture errors so they don't interrupt unmounting. + + function safelyCallComponentWillUnmount(current$$1, instance) { + { + invokeGuardedCallback(null, callComponentWillUnmountWithTimer, null, current$$1, instance); + + if (hasCaughtError()) { + var unmountError = clearCaughtError(); + captureCommitPhaseError(current$$1, unmountError); + } + } + } + + function safelyDetachRef(current$$1) { + var ref = current$$1.ref; + + if (ref !== null) { + if (typeof ref === 'function') { + { + invokeGuardedCallback(null, ref, null, null); + + if (hasCaughtError()) { + var refError = clearCaughtError(); + captureCommitPhaseError(current$$1, refError); + } + } + } else { + ref.current = null; + } + } + } + + function safelyCallDestroy(current$$1, destroy) { + { + invokeGuardedCallback(null, destroy, null); + + if (hasCaughtError()) { + var error = clearCaughtError(); + captureCommitPhaseError(current$$1, error); + } + } + } + + function commitBeforeMutationLifeCycles(current$$1, finishedWork) { + switch (finishedWork.tag) { + case FunctionComponent: + case ForwardRef: + case SimpleMemoComponent: { + commitHookEffectList(UnmountSnapshot, NoEffect$1, finishedWork); + return; + } + + case ClassComponent: { + if (finishedWork.effectTag & Snapshot) { + if (current$$1 !== null) { + var prevProps = current$$1.memoizedProps; + var prevState = current$$1.memoizedState; + startPhaseTimer(finishedWork, 'getSnapshotBeforeUpdate'); + var instance = finishedWork.stateNode; // We could update instance props and state here, + // but instead we rely on them being set during last render. + // TODO: revisit this when we implement resuming. + + { + if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) { + !(instance.props === finishedWork.memoizedProps) + ? warning$1( + false, + 'Expected %s props to match memoized props before ' + + 'getSnapshotBeforeUpdate. ' + + 'This might either be because of a bug in React, or because ' + + 'a component reassigns its own `this.props`. ' + + 'Please file an issue.', + getComponentName(finishedWork.type) || 'instance', + ) + : void 0; + !(instance.state === finishedWork.memoizedState) + ? warning$1( + false, + 'Expected %s state to match memoized state before ' + + 'getSnapshotBeforeUpdate. ' + + 'This might either be because of a bug in React, or because ' + + 'a component reassigns its own `this.props`. ' + + 'Please file an issue.', + getComponentName(finishedWork.type) || 'instance', + ) + : void 0; + } + } + + var snapshot = instance.getSnapshotBeforeUpdate( + finishedWork.elementType === finishedWork.type + ? prevProps + : resolveDefaultProps(finishedWork.type, prevProps), + prevState, + ); + + { + var didWarnSet = didWarnAboutUndefinedSnapshotBeforeUpdate; + + if (snapshot === undefined && !didWarnSet.has(finishedWork.type)) { + didWarnSet.add(finishedWork.type); + warningWithoutStack$1( + false, + '%s.getSnapshotBeforeUpdate(): A snapshot value (or null) ' + + 'must be returned. You have returned undefined.', + getComponentName(finishedWork.type), + ); + } + } + + instance.__reactInternalSnapshotBeforeUpdate = snapshot; + stopPhaseTimer(); + } + } + + return; + } + + case HostRoot: + case HostComponent: + case HostText: + case HostPortal: + case IncompleteClassComponent: + // Nothing to do for these component types + return; + + default: { + { + { + throw Error( + 'This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + } + } + } + + function commitHookEffectList(unmountTag, mountTag, finishedWork) { + var updateQueue = finishedWork.updateQueue; + var lastEffect = updateQueue !== null ? updateQueue.lastEffect : null; + + if (lastEffect !== null) { + var firstEffect = lastEffect.next; + var effect = firstEffect; + + do { + if ((effect.tag & unmountTag) !== NoEffect$1) { + // Unmount + var destroy = effect.destroy; + effect.destroy = undefined; + + if (destroy !== undefined) { + destroy(); + } + } + + if ((effect.tag & mountTag) !== NoEffect$1) { + // Mount + var create = effect.create; + effect.destroy = create(); + + { + var _destroy = effect.destroy; + + if (_destroy !== undefined && typeof _destroy !== 'function') { + var addendum = void 0; + + if (_destroy === null) { + addendum = + ' You returned null. If your effect does not require clean ' + + 'up, return undefined (or nothing).'; + } else if (typeof _destroy.then === 'function') { + addendum = + '\n\nIt looks like you wrote useEffect(async () => ...) or returned a Promise. ' + + 'Instead, write the async function inside your effect ' + + 'and call it immediately:\n\n' + + 'useEffect(() => {\n' + + ' async function fetchData() {\n' + + ' // You can await here\n' + + ' const response = await MyAPI.getData(someId);\n' + + ' // ...\n' + + ' }\n' + + ' fetchData();\n' + + "}, [someId]); // Or [] if effect doesn't need props or state\n\n" + + 'Learn more about data fetching with Hooks: https://fb.me/react-hooks-data-fetching'; + } else { + addendum = ' You returned: ' + _destroy; + } + + warningWithoutStack$1( + false, + 'An effect function must not return anything besides a function, ' + + 'which is used for clean-up.%s%s', + addendum, + getStackByFiberInDevAndProd(finishedWork), + ); + } + } + } + + effect = effect.next; + } while (effect !== firstEffect); + } + } + + function commitPassiveHookEffects(finishedWork) { + if ((finishedWork.effectTag & Passive) !== NoEffect) { + switch (finishedWork.tag) { + case FunctionComponent: + case ForwardRef: + case SimpleMemoComponent: { + commitHookEffectList(UnmountPassive, NoEffect$1, finishedWork); + commitHookEffectList(NoEffect$1, MountPassive, finishedWork); + break; + } + + default: + break; + } + } + } + + function commitLifeCycles(finishedRoot, current$$1, finishedWork, committedExpirationTime) { + switch (finishedWork.tag) { + case FunctionComponent: + case ForwardRef: + case SimpleMemoComponent: { + commitHookEffectList(UnmountLayout, MountLayout, finishedWork); + break; + } + + case ClassComponent: { + var instance = finishedWork.stateNode; + + if (finishedWork.effectTag & Update) { + if (current$$1 === null) { + startPhaseTimer(finishedWork, 'componentDidMount'); // We could update instance props and state here, + // but instead we rely on them being set during last render. + // TODO: revisit this when we implement resuming. + + { + if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) { + !(instance.props === finishedWork.memoizedProps) + ? warning$1( + false, + 'Expected %s props to match memoized props before ' + + 'componentDidMount. ' + + 'This might either be because of a bug in React, or because ' + + 'a component reassigns its own `this.props`. ' + + 'Please file an issue.', + getComponentName(finishedWork.type) || 'instance', + ) + : void 0; + !(instance.state === finishedWork.memoizedState) + ? warning$1( + false, + 'Expected %s state to match memoized state before ' + + 'componentDidMount. ' + + 'This might either be because of a bug in React, or because ' + + 'a component reassigns its own `this.props`. ' + + 'Please file an issue.', + getComponentName(finishedWork.type) || 'instance', + ) + : void 0; + } + } + + instance.componentDidMount(); + stopPhaseTimer(); + } else { + var prevProps = + finishedWork.elementType === finishedWork.type + ? current$$1.memoizedProps + : resolveDefaultProps(finishedWork.type, current$$1.memoizedProps); + var prevState = current$$1.memoizedState; + startPhaseTimer(finishedWork, 'componentDidUpdate'); // We could update instance props and state here, + // but instead we rely on them being set during last render. + // TODO: revisit this when we implement resuming. + + { + if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) { + !(instance.props === finishedWork.memoizedProps) + ? warning$1( + false, + 'Expected %s props to match memoized props before ' + + 'componentDidUpdate. ' + + 'This might either be because of a bug in React, or because ' + + 'a component reassigns its own `this.props`. ' + + 'Please file an issue.', + getComponentName(finishedWork.type) || 'instance', + ) + : void 0; + !(instance.state === finishedWork.memoizedState) + ? warning$1( + false, + 'Expected %s state to match memoized state before ' + + 'componentDidUpdate. ' + + 'This might either be because of a bug in React, or because ' + + 'a component reassigns its own `this.props`. ' + + 'Please file an issue.', + getComponentName(finishedWork.type) || 'instance', + ) + : void 0; + } + } + + instance.componentDidUpdate( + prevProps, + prevState, + instance.__reactInternalSnapshotBeforeUpdate, + ); + stopPhaseTimer(); + } + } + + var updateQueue = finishedWork.updateQueue; + + if (updateQueue !== null) { + { + if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) { + !(instance.props === finishedWork.memoizedProps) + ? warning$1( + false, + 'Expected %s props to match memoized props before ' + + 'processing the update queue. ' + + 'This might either be because of a bug in React, or because ' + + 'a component reassigns its own `this.props`. ' + + 'Please file an issue.', + getComponentName(finishedWork.type) || 'instance', + ) + : void 0; + !(instance.state === finishedWork.memoizedState) + ? warning$1( + false, + 'Expected %s state to match memoized state before ' + + 'processing the update queue. ' + + 'This might either be because of a bug in React, or because ' + + 'a component reassigns its own `this.props`. ' + + 'Please file an issue.', + getComponentName(finishedWork.type) || 'instance', + ) + : void 0; + } + } // We could update instance props and state here, + // but instead we rely on them being set during last render. + // TODO: revisit this when we implement resuming. + + commitUpdateQueue(finishedWork, updateQueue, instance, committedExpirationTime); + } + + return; + } + + case HostRoot: { + var _updateQueue = finishedWork.updateQueue; + + if (_updateQueue !== null) { + var _instance = null; + + if (finishedWork.child !== null) { + switch (finishedWork.child.tag) { + case HostComponent: + _instance = getPublicInstance(finishedWork.child.stateNode); + break; + + case ClassComponent: + _instance = finishedWork.child.stateNode; + break; + } + } + + commitUpdateQueue(finishedWork, _updateQueue, _instance, committedExpirationTime); + } + + return; + } + + case HostComponent: { + var _instance2 = finishedWork.stateNode; // Renderers may schedule work to be done after host components are mounted + // (eg DOM renderer may schedule auto-focus for inputs and form controls). + // These effects should only be committed when components are first mounted, + // aka when there is no current/alternate. + + if (current$$1 === null && finishedWork.effectTag & Update) { + var type = finishedWork.type; + var props = finishedWork.memoizedProps; + commitMount(_instance2, type, props, finishedWork); + } + + return; + } + + case HostText: { + // We have no life-cycles associated with text. + return; + } + + case HostPortal: { + // We have no life-cycles associated with portals. + return; + } + + case Profiler: { + if (enableProfilerTimer) { + var onRender = finishedWork.memoizedProps.onRender; + + if (typeof onRender === 'function') { + if (enableSchedulerTracing) { + onRender( + finishedWork.memoizedProps.id, + current$$1 === null ? 'mount' : 'update', + finishedWork.actualDuration, + finishedWork.treeBaseDuration, + finishedWork.actualStartTime, + getCommitTime(), + finishedRoot.memoizedInteractions, + ); + } else { + onRender( + finishedWork.memoizedProps.id, + current$$1 === null ? 'mount' : 'update', + finishedWork.actualDuration, + finishedWork.treeBaseDuration, + finishedWork.actualStartTime, + getCommitTime(), + ); + } + } + } + + return; + } + + case SuspenseComponent: { + commitSuspenseHydrationCallbacks(finishedRoot, finishedWork); + return; + } + + case SuspenseListComponent: + case IncompleteClassComponent: + case FundamentalComponent: + case ScopeComponent: + return; + + default: { + { + { + throw Error( + 'This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + } + } + } + + function hideOrUnhideAllChildren(finishedWork, isHidden) { + if (supportsMutation) { + // We only have the top Fiber that was inserted but we need to recurse down its + // children to find all the terminal nodes. + var node = finishedWork; + + while (true) { + if (node.tag === HostComponent) { + var instance = node.stateNode; + + if (isHidden) { + hideInstance(instance); + } else { + unhideInstance(node.stateNode, node.memoizedProps); + } + } else if (node.tag === HostText) { + var _instance3 = node.stateNode; + + if (isHidden) { + hideTextInstance(_instance3); + } else { + unhideTextInstance(_instance3, node.memoizedProps); + } + } else if ( + node.tag === SuspenseComponent && + node.memoizedState !== null && + node.memoizedState.dehydrated === null + ) { + // Found a nested Suspense component that timed out. Skip over the + // primary child fragment, which should remain hidden. + var fallbackChildFragment = node.child.sibling; + fallbackChildFragment.return = node; + node = fallbackChildFragment; + continue; + } else if (node.child !== null) { + node.child.return = node; + node = node.child; + continue; + } + + if (node === finishedWork) { + return; + } + + while (node.sibling === null) { + if (node.return === null || node.return === finishedWork) { + return; + } + + node = node.return; + } + + node.sibling.return = node.return; + node = node.sibling; + } + } + } + + function commitAttachRef(finishedWork) { + var ref = finishedWork.ref; + + if (ref !== null) { + var instance = finishedWork.stateNode; + var instanceToUse; + + switch (finishedWork.tag) { + case HostComponent: + instanceToUse = getPublicInstance(instance); + break; + + default: + instanceToUse = instance; + } // Moved outside to ensure DCE works with this flag + + if (enableScopeAPI && finishedWork.tag === ScopeComponent) { + instanceToUse = instance.methods; + } + + if (typeof ref === 'function') { + ref(instanceToUse); + } else { + { + if (!ref.hasOwnProperty('current')) { + warningWithoutStack$1( + false, + 'Unexpected ref object provided for %s. ' + + 'Use either a ref-setter function or React.createRef().%s', + getComponentName(finishedWork.type), + getStackByFiberInDevAndProd(finishedWork), + ); + } + } + + ref.current = instanceToUse; + } + } + } + + function commitDetachRef(current$$1) { + var currentRef = current$$1.ref; + + if (currentRef !== null) { + if (typeof currentRef === 'function') { + currentRef(null); + } else { + currentRef.current = null; + } + } + } // User-originating errors (lifecycles and refs) should not interrupt + // deletion, so don't let them throw. Host-originating errors should + // interrupt deletion, so it's okay + + function commitUnmount(finishedRoot, current$$1, renderPriorityLevel) { + onCommitUnmount(current$$1); + + switch (current$$1.tag) { + case FunctionComponent: + case ForwardRef: + case MemoComponent: + case SimpleMemoComponent: { + var updateQueue = current$$1.updateQueue; + + if (updateQueue !== null) { + var lastEffect = updateQueue.lastEffect; + + if (lastEffect !== null) { + var firstEffect = lastEffect.next; // When the owner fiber is deleted, the destroy function of a passive + // effect hook is called during the synchronous commit phase. This is + // a concession to implementation complexity. Calling it in the + // passive effect phase (like they usually are, when dependencies + // change during an update) would require either traversing the + // children of the deleted fiber again, or including unmount effects + // as part of the fiber effect list. + // + // Because this is during the sync commit phase, we need to change + // the priority. + // + // TODO: Reconsider this implementation trade off. + + var priorityLevel = + renderPriorityLevel > NormalPriority ? NormalPriority : renderPriorityLevel; + runWithPriority$2(priorityLevel, function () { + var effect = firstEffect; + + do { + var destroy = effect.destroy; + + if (destroy !== undefined) { + safelyCallDestroy(current$$1, destroy); + } + + effect = effect.next; + } while (effect !== firstEffect); + }); + } + } + + break; + } + + case ClassComponent: { + safelyDetachRef(current$$1); + var instance = current$$1.stateNode; + + if (typeof instance.componentWillUnmount === 'function') { + safelyCallComponentWillUnmount(current$$1, instance); + } + + return; + } + + case HostComponent: { + if (enableFlareAPI) { + var dependencies = current$$1.dependencies; + + if (dependencies !== null) { + var respondersMap = dependencies.responders; + + if (respondersMap !== null) { + var responderInstances = Array.from(respondersMap.values()); + + for (var i = 0, length = responderInstances.length; i < length; i++) { + var responderInstance = responderInstances[i]; + unmountResponderInstance(responderInstance); + } + + dependencies.responders = null; + } + } + } + + safelyDetachRef(current$$1); + return; + } + + case HostPortal: { + // TODO: this is recursive. + // We are also not using this parent because + // the portal will get pushed immediately. + if (supportsMutation) { + unmountHostComponents(finishedRoot, current$$1, renderPriorityLevel); + } else if (supportsPersistence) { + emptyPortalContainer(current$$1); + } + + return; + } + + case FundamentalComponent: { + if (enableFundamentalAPI) { + var fundamentalInstance = current$$1.stateNode; + + if (fundamentalInstance !== null) { + unmountFundamentalComponent(fundamentalInstance); + current$$1.stateNode = null; + } + } + + return; + } + + case DehydratedFragment: { + if (enableSuspenseCallback) { + var hydrationCallbacks = finishedRoot.hydrationCallbacks; + + if (hydrationCallbacks !== null) { + var onDeleted = hydrationCallbacks.onDeleted; + + if (onDeleted) { + onDeleted(current$$1.stateNode); + } + } + } + + return; + } + + case ScopeComponent: { + if (enableScopeAPI) { + safelyDetachRef(current$$1); + } + } + } + } + + function commitNestedUnmounts(finishedRoot, root, renderPriorityLevel) { + // While we're inside a removed host node we don't want to call + // removeChild on the inner nodes because they're removed by the top + // call anyway. We also want to call componentWillUnmount on all + // composites before this host node is removed from the tree. Therefore + // we do an inner loop while we're still inside the host node. + var node = root; + + while (true) { + commitUnmount(finishedRoot, node, renderPriorityLevel); // Visit children because they may contain more composite or host nodes. + // Skip portals because commitUnmount() currently visits them recursively. + + if ( + node.child !== null && // If we use mutation we drill down into portals using commitUnmount above. + // If we don't use mutation we drill down into portals here instead. + (!supportsMutation || node.tag !== HostPortal) + ) { + node.child.return = node; + node = node.child; + continue; + } + + if (node === root) { + return; + } + + while (node.sibling === null) { + if (node.return === null || node.return === root) { + return; + } + + node = node.return; + } + + node.sibling.return = node.return; + node = node.sibling; + } + } + + function detachFiber(current$$1) { + var alternate = current$$1.alternate; // Cut off the return pointers to disconnect it from the tree. Ideally, we + // should clear the child pointer of the parent alternate to let this + // get GC:ed but we don't know which for sure which parent is the current + // one so we'll settle for GC:ing the subtree of this child. This child + // itself will be GC:ed when the parent updates the next time. + + current$$1.return = null; + current$$1.child = null; + current$$1.memoizedState = null; + current$$1.updateQueue = null; + current$$1.dependencies = null; + current$$1.alternate = null; + current$$1.firstEffect = null; + current$$1.lastEffect = null; + current$$1.pendingProps = null; + current$$1.memoizedProps = null; + + if (alternate !== null) { + detachFiber(alternate); + } + } + + function emptyPortalContainer(current$$1) { + if (!supportsPersistence) { + return; + } + + var portal = current$$1.stateNode; + var containerInfo = portal.containerInfo; + var emptyChildSet = createContainerChildSet(containerInfo); + replaceContainerChildren(containerInfo, emptyChildSet); + } + + function commitContainer(finishedWork) { + if (!supportsPersistence) { + return; + } + + switch (finishedWork.tag) { + case ClassComponent: + case HostComponent: + case HostText: + case FundamentalComponent: { + return; + } + + case HostRoot: + case HostPortal: { + var portalOrRoot = finishedWork.stateNode; + var containerInfo = portalOrRoot.containerInfo, + pendingChildren = portalOrRoot.pendingChildren; + replaceContainerChildren(containerInfo, pendingChildren); + return; + } + + default: { + { + { + throw Error( + 'This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + } + } + } + + function getHostParentFiber(fiber) { + var parent = fiber.return; + + while (parent !== null) { + if (isHostParent(parent)) { + return parent; + } + + parent = parent.return; + } + + { + { + throw Error( + 'Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + } + + function isHostParent(fiber) { + return fiber.tag === HostComponent || fiber.tag === HostRoot || fiber.tag === HostPortal; + } + + function getHostSibling(fiber) { + // We're going to search forward into the tree until we find a sibling host + // node. Unfortunately, if multiple insertions are done in a row we have to + // search past them. This leads to exponential search for the next sibling. + // TODO: Find a more efficient way to do this. + var node = fiber; + + siblings: while (true) { + // If we didn't find anything, let's try the next sibling. + while (node.sibling === null) { + if (node.return === null || isHostParent(node.return)) { + // If we pop out of the root or hit the parent the fiber we are the + // last sibling. + return null; + } + + node = node.return; + } + + node.sibling.return = node.return; + node = node.sibling; + + while (node.tag !== HostComponent && node.tag !== HostText && node.tag !== DehydratedFragment) { + // If it is not host node and, we might have a host node inside it. + // Try to search down until we find one. + if (node.effectTag & Placement) { + // If we don't have a child, try the siblings instead. + continue siblings; + } // If we don't have a child, try the siblings instead. + // We also skip portals because they are not part of this host tree. + + if (node.child === null || node.tag === HostPortal) { + continue siblings; + } else { + node.child.return = node; + node = node.child; + } + } // Check if this host node is stable or about to be placed. + + if (!(node.effectTag & Placement)) { + // Found it! + return node.stateNode; + } + } + } + + function commitPlacement(finishedWork) { + if (!supportsMutation) { + return; + } // Recursively insert all host nodes into the parent. + + var parentFiber = getHostParentFiber(finishedWork); // Note: these two variables *must* always be updated together. + + var parent; + var isContainer; + var parentStateNode = parentFiber.stateNode; + + switch (parentFiber.tag) { + case HostComponent: + parent = parentStateNode; + isContainer = false; + break; + + case HostRoot: + parent = parentStateNode.containerInfo; + isContainer = true; + break; + + case HostPortal: + parent = parentStateNode.containerInfo; + isContainer = true; + break; + + case FundamentalComponent: + if (enableFundamentalAPI) { + parent = parentStateNode.instance; + isContainer = false; + } + + // eslint-disable-next-line-no-fallthrough + + default: { + { + throw Error( + 'Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + } + + if (parentFiber.effectTag & ContentReset) { + // Reset the text content of the parent before doing any insertions + resetTextContent(parent); // Clear ContentReset from the effect tag + + parentFiber.effectTag &= ~ContentReset; + } + + var before = getHostSibling(finishedWork); // We only have the top Fiber that was inserted but we need to recurse down its + // children to find all the terminal nodes. + + var node = finishedWork; + + while (true) { + var isHost = node.tag === HostComponent || node.tag === HostText; + + if (isHost || (enableFundamentalAPI && node.tag === FundamentalComponent)) { + var stateNode = isHost ? node.stateNode : node.stateNode.instance; + + if (before) { + if (isContainer) { + insertInContainerBefore(parent, stateNode, before); + } else { + insertBefore(parent, stateNode, before); + } + } else { + if (isContainer) { + appendChildToContainer(parent, stateNode); + } else { + appendChild(parent, stateNode); + } + } + } else if (node.tag === HostPortal) { + // If the insertion itself is a portal, then we don't want to traverse + // down its children. Instead, we'll get insertions from each child in + // the portal directly. + } else if (node.child !== null) { + node.child.return = node; + node = node.child; + continue; + } + + if (node === finishedWork) { + return; + } + + while (node.sibling === null) { + if (node.return === null || node.return === finishedWork) { + return; + } + + node = node.return; + } + + node.sibling.return = node.return; + node = node.sibling; + } + } + + function unmountHostComponents(finishedRoot, current$$1, renderPriorityLevel) { + // We only have the top Fiber that was deleted but we need to recurse down its + // children to find all the terminal nodes. + var node = current$$1; // Each iteration, currentParent is populated with node's host parent if not + // currentParentIsValid. + + var currentParentIsValid = false; // Note: these two variables *must* always be updated together. + + var currentParent; + var currentParentIsContainer; + + while (true) { + if (!currentParentIsValid) { + var parent = node.return; + + findParent: while (true) { + if (!(parent !== null)) { + { + throw Error( + 'Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + + var parentStateNode = parent.stateNode; + + switch (parent.tag) { + case HostComponent: + currentParent = parentStateNode; + currentParentIsContainer = false; + break findParent; + + case HostRoot: + currentParent = parentStateNode.containerInfo; + currentParentIsContainer = true; + break findParent; + + case HostPortal: + currentParent = parentStateNode.containerInfo; + currentParentIsContainer = true; + break findParent; + + case FundamentalComponent: + if (enableFundamentalAPI) { + currentParent = parentStateNode.instance; + currentParentIsContainer = false; + } + } + + parent = parent.return; + } + + currentParentIsValid = true; + } + + if (node.tag === HostComponent || node.tag === HostText) { + commitNestedUnmounts(finishedRoot, node, renderPriorityLevel); // After all the children have unmounted, it is now safe to remove the + // node from the tree. + + if (currentParentIsContainer) { + removeChildFromContainer(currentParent, node.stateNode); + } else { + removeChild(currentParent, node.stateNode); + } // Don't visit children because we already visited them. + } else if (enableFundamentalAPI && node.tag === FundamentalComponent) { + var fundamentalNode = node.stateNode.instance; + commitNestedUnmounts(finishedRoot, node, renderPriorityLevel); // After all the children have unmounted, it is now safe to remove the + // node from the tree. + + if (currentParentIsContainer) { + removeChildFromContainer(currentParent, fundamentalNode); + } else { + removeChild(currentParent, fundamentalNode); + } + } else if (enableSuspenseServerRenderer && node.tag === DehydratedFragment) { + if (enableSuspenseCallback) { + var hydrationCallbacks = finishedRoot.hydrationCallbacks; + + if (hydrationCallbacks !== null) { + var onDeleted = hydrationCallbacks.onDeleted; + + if (onDeleted) { + onDeleted(node.stateNode); + } + } + } // Delete the dehydrated suspense boundary and all of its content. + + if (currentParentIsContainer) { + clearSuspenseBoundaryFromContainer(currentParent, node.stateNode); + } else { + clearSuspenseBoundary(currentParent, node.stateNode); + } + } else if (node.tag === HostPortal) { + if (node.child !== null) { + // When we go into a portal, it becomes the parent to remove from. + // We will reassign it back when we pop the portal on the way up. + currentParent = node.stateNode.containerInfo; + currentParentIsContainer = true; // Visit children because portals might contain host components. + + node.child.return = node; + node = node.child; + continue; + } + } else { + commitUnmount(finishedRoot, node, renderPriorityLevel); // Visit children because we may find more host components below. + + if (node.child !== null) { + node.child.return = node; + node = node.child; + continue; + } + } + + if (node === current$$1) { + return; + } + + while (node.sibling === null) { + if (node.return === null || node.return === current$$1) { + return; + } + + node = node.return; + + if (node.tag === HostPortal) { + // When we go out of the portal, we need to restore the parent. + // Since we don't keep a stack of them, we will search for it. + currentParentIsValid = false; + } + } + + node.sibling.return = node.return; + node = node.sibling; + } + } + + function commitDeletion(finishedRoot, current$$1, renderPriorityLevel) { + if (supportsMutation) { + // Recursively delete all host nodes from the parent. + // Detach refs and call componentWillUnmount() on the whole subtree. + unmountHostComponents(finishedRoot, current$$1, renderPriorityLevel); + } else { + // Detach refs and call componentWillUnmount() on the whole subtree. + commitNestedUnmounts(finishedRoot, current$$1, renderPriorityLevel); + } + + detachFiber(current$$1); + } + + function commitWork(current$$1, finishedWork) { + if (!supportsMutation) { + switch (finishedWork.tag) { + case FunctionComponent: + case ForwardRef: + case MemoComponent: + case SimpleMemoComponent: { + // Note: We currently never use MountMutation, but useLayout uses + // UnmountMutation. + commitHookEffectList(UnmountMutation, MountMutation, finishedWork); + return; + } + + case Profiler: { + return; + } + + case SuspenseComponent: { + commitSuspenseComponent(finishedWork); + attachSuspenseRetryListeners(finishedWork); + return; + } + + case SuspenseListComponent: { + attachSuspenseRetryListeners(finishedWork); + return; + } + + case HostRoot: { + if (supportsHydration) { + var root = finishedWork.stateNode; + + if (root.hydrate) { + // We've just hydrated. No need to hydrate again. + root.hydrate = false; + commitHydratedContainer(root.containerInfo); + } + } + + break; + } + } + + commitContainer(finishedWork); + return; + } + + switch (finishedWork.tag) { + case FunctionComponent: + case ForwardRef: + case MemoComponent: + case SimpleMemoComponent: { + // Note: We currently never use MountMutation, but useLayout uses + // UnmountMutation. + commitHookEffectList(UnmountMutation, MountMutation, finishedWork); + return; + } + + case ClassComponent: { + return; + } + + case HostComponent: { + var instance = finishedWork.stateNode; + + if (instance != null) { + // Commit the work prepared earlier. + var newProps = finishedWork.memoizedProps; // For hydration we reuse the update path but we treat the oldProps + // as the newProps. The updatePayload will contain the real change in + // this case. + + var oldProps = current$$1 !== null ? current$$1.memoizedProps : newProps; + var type = finishedWork.type; // TODO: Type the updateQueue to be specific to host components. + + var updatePayload = finishedWork.updateQueue; + finishedWork.updateQueue = null; + + if (updatePayload !== null) { + commitUpdate(instance, updatePayload, type, oldProps, newProps, finishedWork); + } + + if (enableFlareAPI) { + var prevListeners = oldProps.listeners; + var nextListeners = newProps.listeners; + + if (prevListeners !== nextListeners) { + updateEventListeners(nextListeners, finishedWork, null); + } + } + } + + return; + } + + case HostText: { + if (!(finishedWork.stateNode !== null)) { + { + throw Error( + 'This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + + var textInstance = finishedWork.stateNode; + var newText = finishedWork.memoizedProps; // For hydration we reuse the update path but we treat the oldProps + // as the newProps. The updatePayload will contain the real change in + // this case. + + var oldText = current$$1 !== null ? current$$1.memoizedProps : newText; + commitTextUpdate(textInstance, oldText, newText); + return; + } + + case HostRoot: { + if (supportsHydration) { + var _root = finishedWork.stateNode; + + if (_root.hydrate) { + // We've just hydrated. No need to hydrate again. + _root.hydrate = false; + commitHydratedContainer(_root.containerInfo); + } + } + + return; + } + + case Profiler: { + return; + } + + case SuspenseComponent: { + commitSuspenseComponent(finishedWork); + attachSuspenseRetryListeners(finishedWork); + return; + } + + case SuspenseListComponent: { + attachSuspenseRetryListeners(finishedWork); + return; + } + + case IncompleteClassComponent: { + return; + } + + case FundamentalComponent: { + if (enableFundamentalAPI) { + var fundamentalInstance = finishedWork.stateNode; + updateFundamentalComponent(fundamentalInstance); + } + + return; + } + + case ScopeComponent: { + if (enableScopeAPI) { + var scopeInstance = finishedWork.stateNode; + scopeInstance.fiber = finishedWork; + + if (enableFlareAPI) { + var _newProps = finishedWork.memoizedProps; + + var _oldProps = current$$1 !== null ? current$$1.memoizedProps : _newProps; + + var _prevListeners = _oldProps.listeners; + var _nextListeners = _newProps.listeners; + + if (_prevListeners !== _nextListeners) { + updateEventListeners(_nextListeners, finishedWork, null); + } + } + } + + return; + } + + default: { + { + { + throw Error( + 'This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + } + } + } + + function commitSuspenseComponent(finishedWork) { + var newState = finishedWork.memoizedState; + var newDidTimeout; + var primaryChildParent = finishedWork; + + if (newState === null) { + newDidTimeout = false; + } else { + newDidTimeout = true; + primaryChildParent = finishedWork.child; + markCommitTimeOfFallback(); + } + + if (supportsMutation && primaryChildParent !== null) { + hideOrUnhideAllChildren(primaryChildParent, newDidTimeout); + } + + if (enableSuspenseCallback && newState !== null) { + var suspenseCallback = finishedWork.memoizedProps.suspenseCallback; + + if (typeof suspenseCallback === 'function') { + var thenables = finishedWork.updateQueue; + + if (thenables !== null) { + suspenseCallback(new Set(thenables)); + } + } else { + if (suspenseCallback !== undefined) { + warning$1(false, 'Unexpected type for suspenseCallback.'); + } + } + } + } + + function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) { + if (!supportsHydration) { + return; + } + + var newState = finishedWork.memoizedState; + + if (newState === null) { + var current$$1 = finishedWork.alternate; + + if (current$$1 !== null) { + var prevState = current$$1.memoizedState; + + if (prevState !== null) { + var suspenseInstance = prevState.dehydrated; + + if (suspenseInstance !== null) { + commitHydratedSuspenseInstance(suspenseInstance); + + if (enableSuspenseCallback) { + var hydrationCallbacks = finishedRoot.hydrationCallbacks; + + if (hydrationCallbacks !== null) { + var onHydrated = hydrationCallbacks.onHydrated; + + if (onHydrated) { + onHydrated(suspenseInstance); + } + } + } + } + } + } + } + } + + function attachSuspenseRetryListeners(finishedWork) { + // If this boundary just timed out, then it will have a set of thenables. + // For each thenable, attach a listener so that when it resolves, React + // attempts to re-render the boundary in the primary (pre-timeout) state. + var thenables = finishedWork.updateQueue; + + if (thenables !== null) { + finishedWork.updateQueue = null; + var retryCache = finishedWork.stateNode; + + if (retryCache === null) { + retryCache = finishedWork.stateNode = new PossiblyWeakSet(); + } + + thenables.forEach(function (thenable) { + // Memoize using the boundary fiber to prevent redundant listeners. + var retry = resolveRetryThenable.bind(null, finishedWork, thenable); + + if (!retryCache.has(thenable)) { + if (enableSchedulerTracing) { + if (thenable.__reactDoNotTraceInteractions !== true) { + retry = tracing.unstable_wrap(retry); + } + } + + retryCache.add(thenable); + thenable.then(retry, retry); + } + }); + } + } + + function commitResetTextContent(current$$1) { + if (!supportsMutation) { + return; + } + + resetTextContent(current$$1.stateNode); + } + + var PossiblyWeakMap$1 = typeof WeakMap === 'function' ? WeakMap : Map; + + function createRootErrorUpdate(fiber, errorInfo, expirationTime) { + var update = createUpdate(expirationTime, null); // Unmount the root by rendering null. + + update.tag = CaptureUpdate; // Caution: React DevTools currently depends on this property + // being called "element". + + update.payload = { + element: null, + }; + var error = errorInfo.value; + + update.callback = function () { + onUncaughtError(error); + logError(fiber, errorInfo); + }; + + return update; + } + + function createClassErrorUpdate(fiber, errorInfo, expirationTime) { + var update = createUpdate(expirationTime, null); + update.tag = CaptureUpdate; + var getDerivedStateFromError = fiber.type.getDerivedStateFromError; + + if (typeof getDerivedStateFromError === 'function') { + var error = errorInfo.value; + + update.payload = function () { + logError(fiber, errorInfo); + return getDerivedStateFromError(error); + }; + } + + var inst = fiber.stateNode; + + if (inst !== null && typeof inst.componentDidCatch === 'function') { + update.callback = function callback() { + { + markFailedErrorBoundaryForHotReloading(fiber); + } + + if (typeof getDerivedStateFromError !== 'function') { + // To preserve the preexisting retry behavior of error boundaries, + // we keep track of which ones already failed during this batch. + // This gets reset before we yield back to the browser. + // TODO: Warn in strict mode if getDerivedStateFromError is + // not defined. + markLegacyErrorBoundaryAsFailed(this); // Only log here if componentDidCatch is the only error boundary method defined + + logError(fiber, errorInfo); + } + + var error = errorInfo.value; + var stack = errorInfo.stack; + this.componentDidCatch(error, { + componentStack: stack !== null ? stack : '', + }); + + { + if (typeof getDerivedStateFromError !== 'function') { + // If componentDidCatch is the only error boundary method defined, + // then it needs to call setState to recover from errors. + // If no state update is scheduled then the boundary will swallow the error. + !(fiber.expirationTime === Sync) + ? warningWithoutStack$1( + false, + '%s: Error boundaries should implement getDerivedStateFromError(). ' + + 'In that method, return a state update to display an error message or fallback UI.', + getComponentName(fiber.type) || 'Unknown', + ) + : void 0; + } + } + }; + } else { + update.callback = function () { + markFailedErrorBoundaryForHotReloading(fiber); + }; + } + + return update; + } + + function attachPingListener(root, renderExpirationTime, thenable) { + // Attach a listener to the promise to "ping" the root and retry. But + // only if one does not already exist for the current render expiration + // time (which acts like a "thread ID" here). + var pingCache = root.pingCache; + var threadIDs; + + if (pingCache === null) { + pingCache = root.pingCache = new PossiblyWeakMap$1(); + threadIDs = new Set(); + pingCache.set(thenable, threadIDs); + } else { + threadIDs = pingCache.get(thenable); + + if (threadIDs === undefined) { + threadIDs = new Set(); + pingCache.set(thenable, threadIDs); + } + } + + if (!threadIDs.has(renderExpirationTime)) { + // Memoize using the thread ID to prevent redundant listeners. + threadIDs.add(renderExpirationTime); + var ping = pingSuspendedRoot.bind(null, root, thenable, renderExpirationTime); + thenable.then(ping, ping); + } + } + + function throwException(root, returnFiber, sourceFiber, value, renderExpirationTime) { + // The source fiber did not complete. + sourceFiber.effectTag |= Incomplete; // Its effect list is no longer valid. + + sourceFiber.firstEffect = sourceFiber.lastEffect = null; + + if (value !== null && typeof value === 'object' && typeof value.then === 'function') { + // This is a thenable. + var thenable = value; + checkForWrongSuspensePriorityInDEV(sourceFiber); + var hasInvisibleParentBoundary = hasSuspenseContext( + suspenseStackCursor.current, + InvisibleParentSuspenseContext, + ); // Schedule the nearest Suspense to re-render the timed out view. + + var _workInProgress = returnFiber; + + do { + if ( + _workInProgress.tag === SuspenseComponent && + shouldCaptureSuspense(_workInProgress, hasInvisibleParentBoundary) + ) { + // Found the nearest boundary. + // Stash the promise on the boundary fiber. If the boundary times out, we'll + // attach another listener to flip the boundary back to its normal state. + var thenables = _workInProgress.updateQueue; + + if (thenables === null) { + var updateQueue = new Set(); + updateQueue.add(thenable); + _workInProgress.updateQueue = updateQueue; + } else { + thenables.add(thenable); + } // If the boundary is outside of blocking mode, we should *not* + // suspend the commit. Pretend as if the suspended component rendered + // null and keep rendering. In the commit phase, we'll schedule a + // subsequent synchronous update to re-render the Suspense. + // + // Note: It doesn't matter whether the component that suspended was + // inside a blocking mode tree. If the Suspense is outside of it, we + // should *not* suspend the commit. + + if ((_workInProgress.mode & BlockingMode) === NoMode) { + _workInProgress.effectTag |= DidCapture; // We're going to commit this fiber even though it didn't complete. + // But we shouldn't call any lifecycle methods or callbacks. Remove + // all lifecycle effect tags. + + sourceFiber.effectTag &= ~(LifecycleEffectMask | Incomplete); + + if (sourceFiber.tag === ClassComponent) { + var currentSourceFiber = sourceFiber.alternate; + + if (currentSourceFiber === null) { + // This is a new mount. Change the tag so it's not mistaken for a + // completed class component. For example, we should not call + // componentWillUnmount if it is deleted. + sourceFiber.tag = IncompleteClassComponent; + } else { + // When we try rendering again, we should not reuse the current fiber, + // since it's known to be in an inconsistent state. Use a force update to + // prevent a bail out. + var update = createUpdate(Sync, null); + update.tag = ForceUpdate; + enqueueUpdate(sourceFiber, update); + } + } // The source fiber did not complete. Mark it with Sync priority to + // indicate that it still has pending work. + + sourceFiber.expirationTime = Sync; // Exit without suspending. + + return; + } // Confirmed that the boundary is in a concurrent mode tree. Continue + // with the normal suspend path. + // + // After this we'll use a set of heuristics to determine whether this + // render pass will run to completion or restart or "suspend" the commit. + // The actual logic for this is spread out in different places. + // + // This first principle is that if we're going to suspend when we complete + // a root, then we should also restart if we get an update or ping that + // might unsuspend it, and vice versa. The only reason to suspend is + // because you think you might want to restart before committing. However, + // it doesn't make sense to restart only while in the period we're suspended. + // + // Restarting too aggressively is also not good because it starves out any + // intermediate loading state. So we use heuristics to determine when. + // Suspense Heuristics + // + // If nothing threw a Promise or all the same fallbacks are already showing, + // then don't suspend/restart. + // + // If this is an initial render of a new tree of Suspense boundaries and + // those trigger a fallback, then don't suspend/restart. We want to ensure + // that we can show the initial loading state as quickly as possible. + // + // If we hit a "Delayed" case, such as when we'd switch from content back into + // a fallback, then we should always suspend/restart. SuspenseConfig applies to + // this case. If none is defined, JND is used instead. + // + // If we're already showing a fallback and it gets "retried", allowing us to show + // another level, but there's still an inner boundary that would show a fallback, + // then we suspend/restart for 500ms since the last time we showed a fallback + // anywhere in the tree. This effectively throttles progressive loading into a + // consistent train of commits. This also gives us an opportunity to restart to + // get to the completed state slightly earlier. + // + // If there's ambiguity due to batching it's resolved in preference of: + // 1) "delayed", 2) "initial render", 3) "retry". + // + // We want to ensure that a "busy" state doesn't get force committed. We want to + // ensure that new initial loading states can commit as soon as possible. + + attachPingListener(root, renderExpirationTime, thenable); + _workInProgress.effectTag |= ShouldCapture; + _workInProgress.expirationTime = renderExpirationTime; + return; + } // This boundary already captured during this render. Continue to the next + // boundary. + + _workInProgress = _workInProgress.return; + } while (_workInProgress !== null); // No boundary was found. Fallthrough to error mode. + // TODO: Use invariant so the message is stripped in prod? + + value = new Error( + (getComponentName(sourceFiber.type) || 'A React component') + + ' suspended while rendering, but no fallback UI was specified.\n' + + '\n' + + 'Add a <Suspense fallback=...> component higher in the tree to ' + + 'provide a loading indicator or placeholder to display.' + + getStackByFiberInDevAndProd(sourceFiber), + ); + } // We didn't find a boundary that could handle this type of exception. Start + // over and traverse parent path again, this time treating the exception + // as an error. + + renderDidError(); + value = createCapturedValue(value, sourceFiber); + var workInProgress = returnFiber; + + do { + switch (workInProgress.tag) { + case HostRoot: { + var _errorInfo = value; + workInProgress.effectTag |= ShouldCapture; + workInProgress.expirationTime = renderExpirationTime; + + var _update = createRootErrorUpdate(workInProgress, _errorInfo, renderExpirationTime); + + enqueueCapturedUpdate(workInProgress, _update); + return; + } + + case ClassComponent: + // Capture and retry + var errorInfo = value; + var ctor = workInProgress.type; + var instance = workInProgress.stateNode; + + if ( + (workInProgress.effectTag & DidCapture) === NoEffect && + (typeof ctor.getDerivedStateFromError === 'function' || + (instance !== null && + typeof instance.componentDidCatch === 'function' && + !isAlreadyFailedLegacyErrorBoundary(instance))) + ) { + workInProgress.effectTag |= ShouldCapture; + workInProgress.expirationTime = renderExpirationTime; // Schedule the error boundary to re-render using updated state + + var _update2 = createClassErrorUpdate(workInProgress, errorInfo, renderExpirationTime); + + enqueueCapturedUpdate(workInProgress, _update2); + return; + } + + break; + + default: + break; + } + + workInProgress = workInProgress.return; + } while (workInProgress !== null); + } + + var ceil = Math.ceil; + var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher; + var ReactCurrentOwner$2 = ReactSharedInternals.ReactCurrentOwner; + var IsSomeRendererActing = ReactSharedInternals.IsSomeRendererActing; + var NoContext = + /* */ + 0; + var BatchedContext = + /* */ + 1; + var EventContext = + /* */ + 2; + var DiscreteEventContext = + /* */ + 4; + var LegacyUnbatchedContext = + /* */ + 8; + var RenderContext = + /* */ + 16; + var CommitContext = + /* */ + 32; + var RootIncomplete = 0; + var RootFatalErrored = 1; + var RootErrored = 2; + var RootSuspended = 3; + var RootSuspendedWithDelay = 4; + var RootCompleted = 5; + // Describes where we are in the React execution stack + var executionContext = NoContext; // The root we're working on + + var workInProgressRoot = null; // The fiber we're working on + + var workInProgress = null; // The expiration time we're rendering + + var renderExpirationTime = NoWork; // Whether to root completed, errored, suspended, etc. + + var workInProgressRootExitStatus = RootIncomplete; // A fatal error, if one is thrown + + var workInProgressRootFatalError = null; // Most recent event time among processed updates during this render. + // This is conceptually a time stamp but expressed in terms of an ExpirationTime + // because we deal mostly with expiration times in the hot path, so this avoids + // the conversion happening in the hot path. + + var workInProgressRootLatestProcessedExpirationTime = Sync; + var workInProgressRootLatestSuspenseTimeout = Sync; + var workInProgressRootCanSuspendUsingConfig = null; // The work left over by components that were visited during this render. Only + // includes unprocessed updates, not work in bailed out children. + + var workInProgressRootNextUnprocessedUpdateTime = NoWork; // If we're pinged while rendering we don't always restart immediately. + // This flag determines if it might be worthwhile to restart if an opportunity + // happens latere. + + var workInProgressRootHasPendingPing = false; // The most recent time we committed a fallback. This lets us ensure a train + // model where we don't commit new loading states in too quick succession. + + var globalMostRecentFallbackTime = 0; + var FALLBACK_THROTTLE_MS = 500; + var nextEffect = null; + var hasUncaughtError = false; + var firstUncaughtError = null; + var legacyErrorBoundariesThatAlreadyFailed = null; + var rootDoesHavePassiveEffects = false; + var rootWithPendingPassiveEffects = null; + var pendingPassiveEffectsRenderPriority = NoPriority; + var pendingPassiveEffectsExpirationTime = NoWork; + var rootsWithPendingDiscreteUpdates = null; // Use these to prevent an infinite loop of nested updates + + var NESTED_UPDATE_LIMIT = 50; + var nestedUpdateCount = 0; + var rootWithNestedUpdates = null; + var NESTED_PASSIVE_UPDATE_LIMIT = 50; + var nestedPassiveUpdateCount = 0; + var interruptedBy = null; // Marks the need to reschedule pending interactions at these expiration times + // during the commit phase. This enables them to be traced across components + // that spawn new work during render. E.g. hidden boundaries, suspended SSR + // hydration or SuspenseList. + + var spawnedWorkDuringRender = null; // Expiration times are computed by adding to the current time (the start + // time). However, if two updates are scheduled within the same event, we + // should treat their start times as simultaneous, even if the actual clock + // time has advanced between the first and second call. + // In other words, because expiration times determine how updates are batched, + // we want all updates of like priority that occur within the same event to + // receive the same expiration time. Otherwise we get tearing. + + var currentEventTime = NoWork; + function requestCurrentTimeForUpdate() { + if ((executionContext & (RenderContext | CommitContext)) !== NoContext) { + // We're inside React, so it's fine to read the actual time. + return msToExpirationTime(now()); + } // We're not inside React, so we may be in the middle of a browser event. + + if (currentEventTime !== NoWork) { + // Use the same start time for all updates until we enter React again. + return currentEventTime; + } // This is the first update since React yielded. Compute a new start time. + + currentEventTime = msToExpirationTime(now()); + return currentEventTime; + } + function getCurrentTime() { + return msToExpirationTime(now()); + } + function computeExpirationForFiber(currentTime, fiber, suspenseConfig) { + var mode = fiber.mode; + + if ((mode & BlockingMode) === NoMode) { + return Sync; + } + + var priorityLevel = getCurrentPriorityLevel(); + + if ((mode & ConcurrentMode) === NoMode) { + return priorityLevel === ImmediatePriority ? Sync : Batched; + } + + if ((executionContext & RenderContext) !== NoContext) { + // Use whatever time we're already rendering + // TODO: Should there be a way to opt out, like with `runWithPriority`? + return renderExpirationTime; + } + + var expirationTime; + + if (suspenseConfig !== null) { + // Compute an expiration time based on the Suspense timeout. + expirationTime = computeSuspenseExpiration( + currentTime, + suspenseConfig.timeoutMs | 0 || LOW_PRIORITY_EXPIRATION, + ); + } else { + // Compute an expiration time based on the Scheduler priority. + switch (priorityLevel) { + case ImmediatePriority: + expirationTime = Sync; + break; + + case UserBlockingPriority$2: + // TODO: Rename this to computeUserBlockingExpiration + expirationTime = computeInteractiveExpiration(currentTime); + break; + + case NormalPriority: + case LowPriority: + // TODO: Handle LowPriority + // TODO: Rename this to... something better. + expirationTime = computeAsyncExpiration(currentTime); + break; + + case IdlePriority: + expirationTime = Idle; + break; + + default: { + { + throw Error('Expected a valid priority level'); + } + } + } + } // If we're in the middle of rendering a tree, do not update at the same + // expiration time that is already rendering. + // TODO: We shouldn't have to do this if the update is on a different root. + // Refactor computeExpirationForFiber + scheduleUpdate so we have access to + // the root when we check for this condition. + + if (workInProgressRoot !== null && expirationTime === renderExpirationTime) { + // This is a trick to move this update into a separate batch + expirationTime -= 1; + } + + return expirationTime; + } + function scheduleUpdateOnFiber(fiber, expirationTime) { + checkForNestedUpdates(); + warnAboutInvalidUpdatesOnClassComponentsInDEV(fiber); + var root = markUpdateTimeFromFiberToRoot(fiber, expirationTime); + + if (root === null) { + warnAboutUpdateOnUnmountedFiberInDEV(fiber); + return; + } + + checkForInterruption(fiber, expirationTime); + recordScheduleUpdate(); // TODO: computeExpirationForFiber also reads the priority. Pass the + // priority as an argument to that function and this one. + + var priorityLevel = getCurrentPriorityLevel(); + + if (expirationTime === Sync) { + if ( + // Check if we're inside unbatchedUpdates + (executionContext & LegacyUnbatchedContext) !== NoContext && // Check if we're not already rendering + (executionContext & (RenderContext | CommitContext)) === NoContext + ) { + // Register pending interactions on the root to avoid losing traced interaction data. + schedulePendingInteractions(root, expirationTime); // This is a legacy edge case. The initial mount of a ReactDOM.render-ed + // root inside of batchedUpdates should be synchronous, but layout updates + // should be deferred until the end of the batch. + + performSyncWorkOnRoot(root); + } else { + ensureRootIsScheduled(root); + schedulePendingInteractions(root, expirationTime); + + if (executionContext === NoContext) { + // Flush the synchronous work now, unless we're already working or inside + // a batch. This is intentionally inside scheduleUpdateOnFiber instead of + // scheduleCallbackForFiber to preserve the ability to schedule a callback + // without immediately flushing it. We only do this for user-initiated + // updates, to preserve historical behavior of legacy mode. + flushSyncCallbackQueue(); + } + } + } else { + ensureRootIsScheduled(root); + schedulePendingInteractions(root, expirationTime); + } + + if ( + (executionContext & DiscreteEventContext) !== NoContext && // Only updates at user-blocking priority or greater are considered + // discrete, even inside a discrete event. + (priorityLevel === UserBlockingPriority$2 || priorityLevel === ImmediatePriority) + ) { + // This is the result of a discrete event. Track the lowest priority + // discrete update per root so we can flush them early, if needed. + if (rootsWithPendingDiscreteUpdates === null) { + rootsWithPendingDiscreteUpdates = new Map([[root, expirationTime]]); + } else { + var lastDiscreteTime = rootsWithPendingDiscreteUpdates.get(root); + + if (lastDiscreteTime === undefined || lastDiscreteTime > expirationTime) { + rootsWithPendingDiscreteUpdates.set(root, expirationTime); + } + } + } + } + var scheduleWork = scheduleUpdateOnFiber; // This is split into a separate function so we can mark a fiber with pending + // work without treating it as a typical update that originates from an event; + // e.g. retrying a Suspense boundary isn't an update, but it does schedule work + // on a fiber. + + function markUpdateTimeFromFiberToRoot(fiber, expirationTime) { + // Update the source fiber's expiration time + if (fiber.expirationTime < expirationTime) { + fiber.expirationTime = expirationTime; + } + + var alternate = fiber.alternate; + + if (alternate !== null && alternate.expirationTime < expirationTime) { + alternate.expirationTime = expirationTime; + } // Walk the parent path to the root and update the child expiration time. + + var node = fiber.return; + var root = null; + + if (node === null && fiber.tag === HostRoot) { + root = fiber.stateNode; + } else { + while (node !== null) { + alternate = node.alternate; + + if (node.childExpirationTime < expirationTime) { + node.childExpirationTime = expirationTime; + + if (alternate !== null && alternate.childExpirationTime < expirationTime) { + alternate.childExpirationTime = expirationTime; + } + } else if (alternate !== null && alternate.childExpirationTime < expirationTime) { + alternate.childExpirationTime = expirationTime; + } + + if (node.return === null && node.tag === HostRoot) { + root = node.stateNode; + break; + } + + node = node.return; + } + } + + if (root !== null) { + if (workInProgressRoot === root) { + // Received an update to a tree that's in the middle of rendering. Mark + // that's unprocessed work on this root. + markUnprocessedUpdateTime(expirationTime); + + if (workInProgressRootExitStatus === RootSuspendedWithDelay) { + // The root already suspended with a delay, which means this render + // definitely won't finish. Since we have a new update, let's mark it as + // suspended now, right before marking the incoming update. This has the + // effect of interrupting the current render and switching to the update. + // TODO: This happens to work when receiving an update during the render + // phase, because of the trick inside computeExpirationForFiber to + // subtract 1 from `renderExpirationTime` to move it into a + // separate bucket. But we should probably model it with an exception, + // using the same mechanism we use to force hydration of a subtree. + // TODO: This does not account for low pri updates that were already + // scheduled before the root started rendering. Need to track the next + // pending expiration time (perhaps by backtracking the return path) and + // then trigger a restart in the `renderDidSuspendDelayIfPossible` path. + markRootSuspendedAtTime(root, renderExpirationTime); + } + } // Mark that the root has a pending update. + + markRootUpdatedAtTime(root, expirationTime); + } + + return root; + } + + function getNextRootExpirationTimeToWorkOn(root) { + // Determines the next expiration time that the root should render, taking + // into account levels that may be suspended, or levels that may have + // received a ping. + var lastExpiredTime = root.lastExpiredTime; + + if (lastExpiredTime !== NoWork) { + return lastExpiredTime; + } // "Pending" refers to any update that hasn't committed yet, including if it + // suspended. The "suspended" range is therefore a subset. + + var firstPendingTime = root.firstPendingTime; + + if (!isRootSuspendedAtTime(root, firstPendingTime)) { + // The highest priority pending time is not suspended. Let's work on that. + return firstPendingTime; + } // If the first pending time is suspended, check if there's a lower priority + // pending level that we know about. Or check if we received a ping. Work + // on whichever is higher priority. + + var lastPingedTime = root.lastPingedTime; + var nextKnownPendingLevel = root.nextKnownPendingLevel; + return lastPingedTime > nextKnownPendingLevel ? lastPingedTime : nextKnownPendingLevel; + } // Use this function to schedule a task for a root. There's only one task per + // root; if a task was already scheduled, we'll check to make sure the + // expiration time of the existing task is the same as the expiration time of + // the next level that the root has work on. This function is called on every + // update, and right before exiting a task. + + function ensureRootIsScheduled(root) { + var lastExpiredTime = root.lastExpiredTime; + + if (lastExpiredTime !== NoWork) { + // Special case: Expired work should flush synchronously. + root.callbackExpirationTime = Sync; + root.callbackPriority = ImmediatePriority; + root.callbackNode = scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root)); + return; + } + + var expirationTime = getNextRootExpirationTimeToWorkOn(root); + var existingCallbackNode = root.callbackNode; + + if (expirationTime === NoWork) { + // There's nothing to work on. + if (existingCallbackNode !== null) { + root.callbackNode = null; + root.callbackExpirationTime = NoWork; + root.callbackPriority = NoPriority; + } + + return; + } // TODO: If this is an update, we already read the current time. Pass the + // time as an argument. + + var currentTime = requestCurrentTimeForUpdate(); + var priorityLevel = inferPriorityFromExpirationTime(currentTime, expirationTime); // If there's an existing render task, confirm it has the correct priority and + // expiration time. Otherwise, we'll cancel it and schedule a new one. + + if (existingCallbackNode !== null) { + var existingCallbackPriority = root.callbackPriority; + var existingCallbackExpirationTime = root.callbackExpirationTime; + + if ( + // Callback must have the exact same expiration time. + existingCallbackExpirationTime === expirationTime && // Callback must have greater or equal priority. + existingCallbackPriority >= priorityLevel + ) { + // Existing callback is sufficient. + return; + } // Need to schedule a new task. + // TODO: Instead of scheduling a new task, we should be able to change the + // priority of the existing one. + + cancelCallback(existingCallbackNode); + } + + root.callbackExpirationTime = expirationTime; + root.callbackPriority = priorityLevel; + var callbackNode; + + if (expirationTime === Sync) { + // Sync React callbacks are scheduled on a special internal queue + callbackNode = scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root)); + } else if (disableSchedulerTimeoutBasedOnReactExpirationTime) { + callbackNode = scheduleCallback(priorityLevel, performConcurrentWorkOnRoot.bind(null, root)); + } else { + callbackNode = scheduleCallback( + priorityLevel, + performConcurrentWorkOnRoot.bind(null, root), // Compute a task timeout based on the expiration time. This also affects + // ordering because tasks are processed in timeout order. + { + timeout: expirationTimeToMs(expirationTime) - now(), + }, + ); + } + + root.callbackNode = callbackNode; + } // This is the entry point for every concurrent task, i.e. anything that + // goes through Scheduler. + + function performConcurrentWorkOnRoot(root, didTimeout) { + // Since we know we're in a React event, we can clear the current + // event time. The next update will compute a new event time. + currentEventTime = NoWork; + + if (didTimeout) { + // The render task took too long to complete. Mark the current time as + // expired to synchronously render all expired work in a single batch. + var currentTime = requestCurrentTimeForUpdate(); + markRootExpiredAtTime(root, currentTime); // This will schedule a synchronous callback. + + ensureRootIsScheduled(root); + return null; + } // Determine the next expiration time to work on, using the fields stored + // on the root. + + var expirationTime = getNextRootExpirationTimeToWorkOn(root); + + if (expirationTime !== NoWork) { + var originalCallbackNode = root.callbackNode; + + if (!((executionContext & (RenderContext | CommitContext)) === NoContext)) { + { + throw Error('Should not already be working.'); + } + } + + flushPassiveEffects(); // If the root or expiration time have changed, throw out the existing stack + // and prepare a fresh one. Otherwise we'll continue where we left off. + + if (root !== workInProgressRoot || expirationTime !== renderExpirationTime) { + prepareFreshStack(root, expirationTime); + startWorkOnPendingInteractions(root, expirationTime); + } // If we have a work-in-progress fiber, it means there's still work to do + // in this root. + + if (workInProgress !== null) { + var prevExecutionContext = executionContext; + executionContext |= RenderContext; + var prevDispatcher = pushDispatcher(root); + var prevInteractions = pushInteractions(root); + startWorkLoopTimer(workInProgress); + + do { + try { + workLoopConcurrent(); + break; + } catch (thrownValue) { + handleError(root, thrownValue); + } + } while (true); + + resetContextDependencies(); + executionContext = prevExecutionContext; + popDispatcher(prevDispatcher); + + if (enableSchedulerTracing) { + popInteractions(prevInteractions); + } + + if (workInProgressRootExitStatus === RootFatalErrored) { + var fatalError = workInProgressRootFatalError; + stopInterruptedWorkLoopTimer(); + prepareFreshStack(root, expirationTime); + markRootSuspendedAtTime(root, expirationTime); + ensureRootIsScheduled(root); + throw fatalError; + } + + if (workInProgress !== null) { + // There's still work left over. Exit without committing. + stopInterruptedWorkLoopTimer(); + } else { + // We now have a consistent tree. The next step is either to commit it, + // or, if something suspended, wait to commit it after a timeout. + stopFinishedWorkLoopTimer(); + var finishedWork = (root.finishedWork = root.current.alternate); + root.finishedExpirationTime = expirationTime; + finishConcurrentRender(root, finishedWork, workInProgressRootExitStatus, expirationTime); + } + + ensureRootIsScheduled(root); + + if (root.callbackNode === originalCallbackNode) { + // The task node scheduled for this root is the same one that's + // currently executed. Need to return a continuation. + return performConcurrentWorkOnRoot.bind(null, root); + } + } + } + + return null; + } + + function finishConcurrentRender(root, finishedWork, exitStatus, expirationTime) { + // Set this to null to indicate there's no in-progress render. + workInProgressRoot = null; + + switch (exitStatus) { + case RootIncomplete: + case RootFatalErrored: { + { + { + throw Error('Root did not complete. This is a bug in React.'); + } + } + } + // Flow knows about invariant, so it complains if I add a break + // statement, but eslint doesn't know about invariant, so it complains + // if I do. eslint-disable-next-line no-fallthrough + + case RootErrored: { + // If this was an async render, the error may have happened due to + // a mutation in a concurrent event. Try rendering one more time, + // synchronously, to see if the error goes away. If there are + // lower priority updates, let's include those, too, in case they + // fix the inconsistency. Render at Idle to include all updates. + // If it was Idle or Never or some not-yet-invented time, render + // at that time. + markRootExpiredAtTime(root, expirationTime > Idle ? Idle : expirationTime); // We assume that this second render pass will be synchronous + // and therefore not hit this path again. + + break; + } + + case RootSuspended: { + markRootSuspendedAtTime(root, expirationTime); + var lastSuspendedTime = root.lastSuspendedTime; + + if (expirationTime === lastSuspendedTime) { + root.nextKnownPendingLevel = getRemainingExpirationTime(finishedWork); + } + + flushSuspensePriorityWarningInDEV(); // We have an acceptable loading state. We need to figure out if we + // should immediately commit it or wait a bit. + // If we have processed new updates during this render, we may now + // have a new loading state ready. We want to ensure that we commit + // that as soon as possible. + + var hasNotProcessedNewUpdates = workInProgressRootLatestProcessedExpirationTime === Sync; + + if ( + hasNotProcessedNewUpdates && // do not delay if we're inside an act() scope + !(true && flushSuspenseFallbacksInTests && IsThisRendererActing.current) + ) { + // If we have not processed any new updates during this pass, then + // this is either a retry of an existing fallback state or a + // hidden tree. Hidden trees shouldn't be batched with other work + // and after that's fixed it can only be a retry. We're going to + // throttle committing retries so that we don't show too many + // loading states too quickly. + var msUntilTimeout = globalMostRecentFallbackTime + FALLBACK_THROTTLE_MS - now(); // Don't bother with a very short suspense time. + + if (msUntilTimeout > 10) { + if (workInProgressRootHasPendingPing) { + var lastPingedTime = root.lastPingedTime; + + if (lastPingedTime === NoWork || lastPingedTime >= expirationTime) { + // This render was pinged but we didn't get to restart + // earlier so try restarting now instead. + root.lastPingedTime = expirationTime; + prepareFreshStack(root, expirationTime); + break; + } + } + + var nextTime = getNextRootExpirationTimeToWorkOn(root); + + if (nextTime !== NoWork && nextTime !== expirationTime) { + // There's additional work on this root. + break; + } + + if (lastSuspendedTime !== NoWork && lastSuspendedTime !== expirationTime) { + // We should prefer to render the fallback of at the last + // suspended level. Ping the last suspended level to try + // rendering it again. + root.lastPingedTime = lastSuspendedTime; + break; + } // The render is suspended, it hasn't timed out, and there's no + // lower priority work to do. Instead of committing the fallback + // immediately, wait for more data to arrive. + + root.timeoutHandle = scheduleTimeout(commitRoot.bind(null, root), msUntilTimeout); + break; + } + } // The work expired. Commit immediately. + + commitRoot(root); + break; + } + + case RootSuspendedWithDelay: { + markRootSuspendedAtTime(root, expirationTime); + var _lastSuspendedTime = root.lastSuspendedTime; + + if (expirationTime === _lastSuspendedTime) { + root.nextKnownPendingLevel = getRemainingExpirationTime(finishedWork); + } + + flushSuspensePriorityWarningInDEV(); + + if ( + // do not delay if we're inside an act() scope + !(true && flushSuspenseFallbacksInTests && IsThisRendererActing.current) + ) { + // We're suspended in a state that should be avoided. We'll try to + // avoid committing it for as long as the timeouts let us. + if (workInProgressRootHasPendingPing) { + var _lastPingedTime = root.lastPingedTime; + + if (_lastPingedTime === NoWork || _lastPingedTime >= expirationTime) { + // This render was pinged but we didn't get to restart earlier + // so try restarting now instead. + root.lastPingedTime = expirationTime; + prepareFreshStack(root, expirationTime); + break; + } + } + + var _nextTime = getNextRootExpirationTimeToWorkOn(root); + + if (_nextTime !== NoWork && _nextTime !== expirationTime) { + // There's additional work on this root. + break; + } + + if (_lastSuspendedTime !== NoWork && _lastSuspendedTime !== expirationTime) { + // We should prefer to render the fallback of at the last + // suspended level. Ping the last suspended level to try + // rendering it again. + root.lastPingedTime = _lastSuspendedTime; + break; + } + + var _msUntilTimeout; + + if (workInProgressRootLatestSuspenseTimeout !== Sync) { + // We have processed a suspense config whose expiration time we + // can use as the timeout. + _msUntilTimeout = expirationTimeToMs(workInProgressRootLatestSuspenseTimeout) - now(); + } else if (workInProgressRootLatestProcessedExpirationTime === Sync) { + // This should never normally happen because only new updates + // cause delayed states, so we should have processed something. + // However, this could also happen in an offscreen tree. + _msUntilTimeout = 0; + } else { + // If we don't have a suspense config, we're going to use a + // heuristic to determine how long we can suspend. + var eventTimeMs = inferTimeFromExpirationTime( + workInProgressRootLatestProcessedExpirationTime, + ); + var currentTimeMs = now(); + var timeUntilExpirationMs = expirationTimeToMs(expirationTime) - currentTimeMs; + var timeElapsed = currentTimeMs - eventTimeMs; + + if (timeElapsed < 0) { + // We get this wrong some time since we estimate the time. + timeElapsed = 0; + } + + _msUntilTimeout = jnd(timeElapsed) - timeElapsed; // Clamp the timeout to the expiration time. TODO: Once the + // event time is exact instead of inferred from expiration time + // we don't need this. + + if (timeUntilExpirationMs < _msUntilTimeout) { + _msUntilTimeout = timeUntilExpirationMs; + } + } // Don't bother with a very short suspense time. + + if (_msUntilTimeout > 10) { + // The render is suspended, it hasn't timed out, and there's no + // lower priority work to do. Instead of committing the fallback + // immediately, wait for more data to arrive. + root.timeoutHandle = scheduleTimeout(commitRoot.bind(null, root), _msUntilTimeout); + break; + } + } // The work expired. Commit immediately. + + commitRoot(root); + break; + } + + case RootCompleted: { + // The work completed. Ready to commit. + if ( + // do not delay if we're inside an act() scope + !(true && flushSuspenseFallbacksInTests && IsThisRendererActing.current) && + workInProgressRootLatestProcessedExpirationTime !== Sync && + workInProgressRootCanSuspendUsingConfig !== null + ) { + // If we have exceeded the minimum loading delay, which probably + // means we have shown a spinner already, we might have to suspend + // a bit longer to ensure that the spinner is shown for + // enough time. + var _msUntilTimeout2 = computeMsUntilSuspenseLoadingDelay( + workInProgressRootLatestProcessedExpirationTime, + expirationTime, + workInProgressRootCanSuspendUsingConfig, + ); + + if (_msUntilTimeout2 > 10) { + markRootSuspendedAtTime(root, expirationTime); + root.timeoutHandle = scheduleTimeout(commitRoot.bind(null, root), _msUntilTimeout2); + break; + } + } + + commitRoot(root); + break; + } + + default: { + { + { + throw Error('Unknown root exit status.'); + } + } + } + } + } // This is the entry point for synchronous tasks that don't go + // through Scheduler + + function performSyncWorkOnRoot(root) { + // Check if there's expired work on this root. Otherwise, render at Sync. + var lastExpiredTime = root.lastExpiredTime; + var expirationTime = lastExpiredTime !== NoWork ? lastExpiredTime : Sync; + + if (root.finishedExpirationTime === expirationTime) { + // There's already a pending commit at this expiration time. + // TODO: This is poorly factored. This case only exists for the + // batch.commit() API. + commitRoot(root); + } else { + if (!((executionContext & (RenderContext | CommitContext)) === NoContext)) { + { + throw Error('Should not already be working.'); + } + } + + flushPassiveEffects(); // If the root or expiration time have changed, throw out the existing stack + // and prepare a fresh one. Otherwise we'll continue where we left off. + + if (root !== workInProgressRoot || expirationTime !== renderExpirationTime) { + prepareFreshStack(root, expirationTime); + startWorkOnPendingInteractions(root, expirationTime); + } // If we have a work-in-progress fiber, it means there's still work to do + // in this root. + + if (workInProgress !== null) { + var prevExecutionContext = executionContext; + executionContext |= RenderContext; + var prevDispatcher = pushDispatcher(root); + var prevInteractions = pushInteractions(root); + startWorkLoopTimer(workInProgress); + + do { + try { + workLoopSync(); + break; + } catch (thrownValue) { + handleError(root, thrownValue); + } + } while (true); + + resetContextDependencies(); + executionContext = prevExecutionContext; + popDispatcher(prevDispatcher); + + if (enableSchedulerTracing) { + popInteractions(prevInteractions); + } + + if (workInProgressRootExitStatus === RootFatalErrored) { + var fatalError = workInProgressRootFatalError; + stopInterruptedWorkLoopTimer(); + prepareFreshStack(root, expirationTime); + markRootSuspendedAtTime(root, expirationTime); + ensureRootIsScheduled(root); + throw fatalError; + } + + if (workInProgress !== null) { + // This is a sync render, so we should have finished the whole tree. + { + { + throw Error( + 'Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + } else { + // We now have a consistent tree. Because this is a sync render, we + // will commit it even if something suspended. + stopFinishedWorkLoopTimer(); + root.finishedWork = root.current.alternate; + root.finishedExpirationTime = expirationTime; + finishSyncRender(root, workInProgressRootExitStatus, expirationTime); + } // Before exiting, make sure there's a callback scheduled for the next + // pending level. + + ensureRootIsScheduled(root); + } + } + + return null; + } + + function finishSyncRender(root, exitStatus, expirationTime) { + // Set this to null to indicate there's no in-progress render. + workInProgressRoot = null; + + { + if (exitStatus === RootSuspended || exitStatus === RootSuspendedWithDelay) { + flushSuspensePriorityWarningInDEV(); + } + } + + commitRoot(root); + } + + function flushRoot(root, expirationTime) { + markRootExpiredAtTime(root, expirationTime); + ensureRootIsScheduled(root); + + if ((executionContext & (RenderContext | CommitContext)) === NoContext) { + flushSyncCallbackQueue(); + } + } + function flushDiscreteUpdates() { + // TODO: Should be able to flush inside batchedUpdates, but not inside `act`. + // However, `act` uses `batchedUpdates`, so there's no way to distinguish + // those two cases. Need to fix this before exposing flushDiscreteUpdates + // as a public API. + if ((executionContext & (BatchedContext | RenderContext | CommitContext)) !== NoContext) { + if (true && (executionContext & RenderContext) !== NoContext) { + warning$1( + false, + 'unstable_flushDiscreteUpdates: Cannot flush updates when React is ' + 'already rendering.', + ); + } // We're already rendering, so we can't synchronously flush pending work. + // This is probably a nested event dispatch triggered by a lifecycle/effect, + // like `el.focus()`. Exit. + + return; + } + + flushPendingDiscreteUpdates(); // If the discrete updates scheduled passive effects, flush them now so that + // they fire before the next serial event. + + flushPassiveEffects(); + } + + function syncUpdates(fn, a, b, c) { + return runWithPriority$2(ImmediatePriority, fn.bind(null, a, b, c)); + } + + function flushPendingDiscreteUpdates() { + if (rootsWithPendingDiscreteUpdates !== null) { + // For each root with pending discrete updates, schedule a callback to + // immediately flush them. + var roots = rootsWithPendingDiscreteUpdates; + rootsWithPendingDiscreteUpdates = null; + roots.forEach(function (expirationTime, root) { + markRootExpiredAtTime(root, expirationTime); + ensureRootIsScheduled(root); + }); // Now flush the immediate queue. + + flushSyncCallbackQueue(); + } + } + + function batchedUpdates$1(fn, a) { + var prevExecutionContext = executionContext; + executionContext |= BatchedContext; + + try { + return fn(a); + } finally { + executionContext = prevExecutionContext; + + if (executionContext === NoContext) { + // Flush the immediate callbacks that were scheduled during this batch + flushSyncCallbackQueue(); + } + } + } + function batchedEventUpdates$1(fn, a) { + var prevExecutionContext = executionContext; + executionContext |= EventContext; + + try { + return fn(a); + } finally { + executionContext = prevExecutionContext; + + if (executionContext === NoContext) { + // Flush the immediate callbacks that were scheduled during this batch + flushSyncCallbackQueue(); + } + } + } + function discreteUpdates$1(fn, a, b, c) { + var prevExecutionContext = executionContext; + executionContext |= DiscreteEventContext; + + try { + // Should this + return runWithPriority$2(UserBlockingPriority$2, fn.bind(null, a, b, c)); + } finally { + executionContext = prevExecutionContext; + + if (executionContext === NoContext) { + // Flush the immediate callbacks that were scheduled during this batch + flushSyncCallbackQueue(); + } + } + } + function unbatchedUpdates(fn, a) { + var prevExecutionContext = executionContext; + executionContext &= ~BatchedContext; + executionContext |= LegacyUnbatchedContext; + + try { + return fn(a); + } finally { + executionContext = prevExecutionContext; + + if (executionContext === NoContext) { + // Flush the immediate callbacks that were scheduled during this batch + flushSyncCallbackQueue(); + } + } + } + function flushSync(fn, a) { + if ((executionContext & (RenderContext | CommitContext)) !== NoContext) { + { + { + throw Error( + 'flushSync was called from inside a lifecycle method. It cannot be called when React is already rendering.', + ); + } + } + } + + var prevExecutionContext = executionContext; + executionContext |= BatchedContext; + + try { + return runWithPriority$2(ImmediatePriority, fn.bind(null, a)); + } finally { + executionContext = prevExecutionContext; // Flush the immediate callbacks that were scheduled during this batch. + // Note that this will happen even if batchedUpdates is higher up + // the stack. + + flushSyncCallbackQueue(); + } + } + function flushControlled(fn) { + var prevExecutionContext = executionContext; + executionContext |= BatchedContext; + + try { + runWithPriority$2(ImmediatePriority, fn); + } finally { + executionContext = prevExecutionContext; + + if (executionContext === NoContext) { + // Flush the immediate callbacks that were scheduled during this batch + flushSyncCallbackQueue(); + } + } + } + + function prepareFreshStack(root, expirationTime) { + root.finishedWork = null; + root.finishedExpirationTime = NoWork; + var timeoutHandle = root.timeoutHandle; + + if (timeoutHandle !== noTimeout) { + // The root previous suspended and scheduled a timeout to commit a fallback + // state. Now that we have additional work, cancel the timeout. + root.timeoutHandle = noTimeout; // $FlowFixMe Complains noTimeout is not a TimeoutID, despite the check above + + cancelTimeout(timeoutHandle); + } + + if (workInProgress !== null) { + var interruptedWork = workInProgress.return; + + while (interruptedWork !== null) { + unwindInterruptedWork(interruptedWork); + interruptedWork = interruptedWork.return; + } + } + + workInProgressRoot = root; + workInProgress = createWorkInProgress(root.current, null, expirationTime); + renderExpirationTime = expirationTime; + workInProgressRootExitStatus = RootIncomplete; + workInProgressRootFatalError = null; + workInProgressRootLatestProcessedExpirationTime = Sync; + workInProgressRootLatestSuspenseTimeout = Sync; + workInProgressRootCanSuspendUsingConfig = null; + workInProgressRootNextUnprocessedUpdateTime = NoWork; + workInProgressRootHasPendingPing = false; + + if (enableSchedulerTracing) { + spawnedWorkDuringRender = null; + } + + { + ReactStrictModeWarnings.discardPendingWarnings(); + componentsThatTriggeredHighPriSuspend = null; + } + } + + function handleError(root, thrownValue) { + do { + try { + // Reset module-level state that was set during the render phase. + resetContextDependencies(); + resetHooks(); + resetCurrentFiber(); + + if (workInProgress === null || workInProgress.return === null) { + // Expected to be working on a non-root fiber. This is a fatal error + // because there's no ancestor that can handle it; the root is + // supposed to capture all errors that weren't caught by an error + // boundary. + workInProgressRootExitStatus = RootFatalErrored; + workInProgressRootFatalError = thrownValue; + return null; + } + + if (enableProfilerTimer && workInProgress.mode & ProfileMode) { + // Record the time spent rendering before an error was thrown. This + // avoids inaccurate Profiler durations in the case of a + // suspended render. + stopProfilerTimerIfRunningAndRecordDelta(workInProgress, true); + } + + throwException( + root, + workInProgress.return, + workInProgress, + thrownValue, + renderExpirationTime, + ); + workInProgress = completeUnitOfWork(workInProgress); + } catch (yetAnotherThrownValue) { + // Something in the return path also threw. + thrownValue = yetAnotherThrownValue; + continue; + } // Return to the normal work loop. + + return; + } while (true); + } + + function pushDispatcher(root) { + var prevDispatcher = ReactCurrentDispatcher.current; + ReactCurrentDispatcher.current = ContextOnlyDispatcher; + + if (prevDispatcher === null) { + // The React isomorphic package does not include a default dispatcher. + // Instead the first renderer will lazily attach one, in order to give + // nicer error messages. + return ContextOnlyDispatcher; + } else { + return prevDispatcher; + } + } + + function popDispatcher(prevDispatcher) { + ReactCurrentDispatcher.current = prevDispatcher; + } + + function pushInteractions(root) { + if (enableSchedulerTracing) { + var prevInteractions = tracing.__interactionsRef.current; + tracing.__interactionsRef.current = root.memoizedInteractions; + return prevInteractions; + } + + return null; + } + + function popInteractions(prevInteractions) { + if (enableSchedulerTracing) { + tracing.__interactionsRef.current = prevInteractions; + } + } + + function markCommitTimeOfFallback() { + globalMostRecentFallbackTime = now(); + } + function markRenderEventTimeAndConfig(expirationTime, suspenseConfig) { + if (expirationTime < workInProgressRootLatestProcessedExpirationTime && expirationTime > Idle) { + workInProgressRootLatestProcessedExpirationTime = expirationTime; + } + + if (suspenseConfig !== null) { + if (expirationTime < workInProgressRootLatestSuspenseTimeout && expirationTime > Idle) { + workInProgressRootLatestSuspenseTimeout = expirationTime; // Most of the time we only have one config and getting wrong is not bad. + + workInProgressRootCanSuspendUsingConfig = suspenseConfig; + } + } + } + function markUnprocessedUpdateTime(expirationTime) { + if (expirationTime > workInProgressRootNextUnprocessedUpdateTime) { + workInProgressRootNextUnprocessedUpdateTime = expirationTime; + } + } + function renderDidSuspend() { + if (workInProgressRootExitStatus === RootIncomplete) { + workInProgressRootExitStatus = RootSuspended; + } + } + function renderDidSuspendDelayIfPossible() { + if ( + workInProgressRootExitStatus === RootIncomplete || + workInProgressRootExitStatus === RootSuspended + ) { + workInProgressRootExitStatus = RootSuspendedWithDelay; + } // Check if there's a lower priority update somewhere else in the tree. + + if (workInProgressRootNextUnprocessedUpdateTime !== NoWork && workInProgressRoot !== null) { + // Mark the current render as suspended, and then mark that there's a + // pending update. + // TODO: This should immediately interrupt the current render, instead + // of waiting until the next time we yield. + markRootSuspendedAtTime(workInProgressRoot, renderExpirationTime); + markRootUpdatedAtTime(workInProgressRoot, workInProgressRootNextUnprocessedUpdateTime); + } + } + function renderDidError() { + if (workInProgressRootExitStatus !== RootCompleted) { + workInProgressRootExitStatus = RootErrored; + } + } // Called during render to determine if anything has suspended. + // Returns false if we're not sure. + + function renderHasNotSuspendedYet() { + // If something errored or completed, we can't really be sure, + // so those are false. + return workInProgressRootExitStatus === RootIncomplete; + } + + function inferTimeFromExpirationTime(expirationTime) { + // We don't know exactly when the update was scheduled, but we can infer an + // approximate start time from the expiration time. + var earliestExpirationTimeMs = expirationTimeToMs(expirationTime); + return earliestExpirationTimeMs - LOW_PRIORITY_EXPIRATION; + } + + function inferTimeFromExpirationTimeWithSuspenseConfig(expirationTime, suspenseConfig) { + // We don't know exactly when the update was scheduled, but we can infer an + // approximate start time from the expiration time by subtracting the timeout + // that was added to the event time. + var earliestExpirationTimeMs = expirationTimeToMs(expirationTime); + return earliestExpirationTimeMs - (suspenseConfig.timeoutMs | 0 || LOW_PRIORITY_EXPIRATION); + } // The work loop is an extremely hot path. Tell Closure not to inline it. + + /** @noinline */ + + function workLoopSync() { + // Already timed out, so perform work without checking if we need to yield. + while (workInProgress !== null) { + workInProgress = performUnitOfWork(workInProgress); + } + } + /** @noinline */ + + function workLoopConcurrent() { + // Perform work until Scheduler asks us to yield + while (workInProgress !== null && !shouldYield()) { + workInProgress = performUnitOfWork(workInProgress); + } + } + + function performUnitOfWork(unitOfWork) { + // The current, flushed, state of this fiber is the alternate. Ideally + // nothing should rely on this, but relying on it here means that we don't + // need an additional field on the work in progress. + var current$$1 = unitOfWork.alternate; + startWorkTimer(unitOfWork); + setCurrentFiber(unitOfWork); + var next; + + if (enableProfilerTimer && (unitOfWork.mode & ProfileMode) !== NoMode) { + startProfilerTimer(unitOfWork); + next = beginWork$$1(current$$1, unitOfWork, renderExpirationTime); + stopProfilerTimerIfRunningAndRecordDelta(unitOfWork, true); + } else { + next = beginWork$$1(current$$1, unitOfWork, renderExpirationTime); + } + + resetCurrentFiber(); + unitOfWork.memoizedProps = unitOfWork.pendingProps; + + if (next === null) { + // If this doesn't spawn new work, complete the current work. + next = completeUnitOfWork(unitOfWork); + } + + ReactCurrentOwner$2.current = null; + return next; + } + + function completeUnitOfWork(unitOfWork) { + // Attempt to complete the current unit of work, then move to the next + // sibling. If there are no more siblings, return to the parent fiber. + workInProgress = unitOfWork; + + do { + // The current, flushed, state of this fiber is the alternate. Ideally + // nothing should rely on this, but relying on it here means that we don't + // need an additional field on the work in progress. + var current$$1 = workInProgress.alternate; + var returnFiber = workInProgress.return; // Check if the work completed or if something threw. + + if ((workInProgress.effectTag & Incomplete) === NoEffect) { + setCurrentFiber(workInProgress); + var next = void 0; + + if (!enableProfilerTimer || (workInProgress.mode & ProfileMode) === NoMode) { + next = completeWork(current$$1, workInProgress, renderExpirationTime); + } else { + startProfilerTimer(workInProgress); + next = completeWork(current$$1, workInProgress, renderExpirationTime); // Update render duration assuming we didn't error. + + stopProfilerTimerIfRunningAndRecordDelta(workInProgress, false); + } + + stopWorkTimer(workInProgress); + resetCurrentFiber(); + resetChildExpirationTime(workInProgress); + + if (next !== null) { + // Completing this fiber spawned new work. Work on that next. + return next; + } + + if ( + returnFiber !== null && // Do not append effects to parents if a sibling failed to complete + (returnFiber.effectTag & Incomplete) === NoEffect + ) { + // Append all the effects of the subtree and this fiber onto the effect + // list of the parent. The completion order of the children affects the + // side-effect order. + if (returnFiber.firstEffect === null) { + returnFiber.firstEffect = workInProgress.firstEffect; + } + + if (workInProgress.lastEffect !== null) { + if (returnFiber.lastEffect !== null) { + returnFiber.lastEffect.nextEffect = workInProgress.firstEffect; + } + + returnFiber.lastEffect = workInProgress.lastEffect; + } // If this fiber had side-effects, we append it AFTER the children's + // side-effects. We can perform certain side-effects earlier if needed, + // by doing multiple passes over the effect list. We don't want to + // schedule our own side-effect on our own list because if end up + // reusing children we'll schedule this effect onto itself since we're + // at the end. + + var effectTag = workInProgress.effectTag; // Skip both NoWork and PerformedWork tags when creating the effect + // list. PerformedWork effect is read by React DevTools but shouldn't be + // committed. + + if (effectTag > PerformedWork) { + if (returnFiber.lastEffect !== null) { + returnFiber.lastEffect.nextEffect = workInProgress; + } else { + returnFiber.firstEffect = workInProgress; + } + + returnFiber.lastEffect = workInProgress; + } + } + } else { + // This fiber did not complete because something threw. Pop values off + // the stack without entering the complete phase. If this is a boundary, + // capture values if possible. + var _next = unwindWork(workInProgress, renderExpirationTime); // Because this fiber did not complete, don't reset its expiration time. + + if (enableProfilerTimer && (workInProgress.mode & ProfileMode) !== NoMode) { + // Record the render duration for the fiber that errored. + stopProfilerTimerIfRunningAndRecordDelta(workInProgress, false); // Include the time spent working on failed children before continuing. + + var actualDuration = workInProgress.actualDuration; + var child = workInProgress.child; + + while (child !== null) { + actualDuration += child.actualDuration; + child = child.sibling; + } + + workInProgress.actualDuration = actualDuration; + } + + if (_next !== null) { + // If completing this work spawned new work, do that next. We'll come + // back here again. + // Since we're restarting, remove anything that is not a host effect + // from the effect tag. + // TODO: The name stopFailedWorkTimer is misleading because Suspense + // also captures and restarts. + stopFailedWorkTimer(workInProgress); + _next.effectTag &= HostEffectMask; + return _next; + } + + stopWorkTimer(workInProgress); + + if (returnFiber !== null) { + // Mark the parent fiber as incomplete and clear its effect list. + returnFiber.firstEffect = returnFiber.lastEffect = null; + returnFiber.effectTag |= Incomplete; + } + } + + var siblingFiber = workInProgress.sibling; + + if (siblingFiber !== null) { + // If there is more work to do in this returnFiber, do that next. + return siblingFiber; + } // Otherwise, return to the parent + + workInProgress = returnFiber; + } while (workInProgress !== null); // We've reached the root. + + if (workInProgressRootExitStatus === RootIncomplete) { + workInProgressRootExitStatus = RootCompleted; + } + + return null; + } + + function getRemainingExpirationTime(fiber) { + var updateExpirationTime = fiber.expirationTime; + var childExpirationTime = fiber.childExpirationTime; + return updateExpirationTime > childExpirationTime ? updateExpirationTime : childExpirationTime; + } + + function resetChildExpirationTime(completedWork) { + if (renderExpirationTime !== Never && completedWork.childExpirationTime === Never) { + // The children of this component are hidden. Don't bubble their + // expiration times. + return; + } + + var newChildExpirationTime = NoWork; // Bubble up the earliest expiration time. + + if (enableProfilerTimer && (completedWork.mode & ProfileMode) !== NoMode) { + // In profiling mode, resetChildExpirationTime is also used to reset + // profiler durations. + var actualDuration = completedWork.actualDuration; + var treeBaseDuration = completedWork.selfBaseDuration; // When a fiber is cloned, its actualDuration is reset to 0. This value will + // only be updated if work is done on the fiber (i.e. it doesn't bailout). + // When work is done, it should bubble to the parent's actualDuration. If + // the fiber has not been cloned though, (meaning no work was done), then + // this value will reflect the amount of time spent working on a previous + // render. In that case it should not bubble. We determine whether it was + // cloned by comparing the child pointer. + + var shouldBubbleActualDurations = + completedWork.alternate === null || completedWork.child !== completedWork.alternate.child; + var child = completedWork.child; + + while (child !== null) { + var childUpdateExpirationTime = child.expirationTime; + var childChildExpirationTime = child.childExpirationTime; + + if (childUpdateExpirationTime > newChildExpirationTime) { + newChildExpirationTime = childUpdateExpirationTime; + } + + if (childChildExpirationTime > newChildExpirationTime) { + newChildExpirationTime = childChildExpirationTime; + } + + if (shouldBubbleActualDurations) { + actualDuration += child.actualDuration; + } + + treeBaseDuration += child.treeBaseDuration; + child = child.sibling; + } + + completedWork.actualDuration = actualDuration; + completedWork.treeBaseDuration = treeBaseDuration; + } else { + var _child = completedWork.child; + + while (_child !== null) { + var _childUpdateExpirationTime = _child.expirationTime; + var _childChildExpirationTime = _child.childExpirationTime; + + if (_childUpdateExpirationTime > newChildExpirationTime) { + newChildExpirationTime = _childUpdateExpirationTime; + } + + if (_childChildExpirationTime > newChildExpirationTime) { + newChildExpirationTime = _childChildExpirationTime; + } + + _child = _child.sibling; + } + } + + completedWork.childExpirationTime = newChildExpirationTime; + } + + function commitRoot(root) { + var renderPriorityLevel = getCurrentPriorityLevel(); + runWithPriority$2(ImmediatePriority, commitRootImpl.bind(null, root, renderPriorityLevel)); + return null; + } + + function commitRootImpl(root, renderPriorityLevel) { + do { + // `flushPassiveEffects` will call `flushSyncUpdateQueue` at the end, which + // means `flushPassiveEffects` will sometimes result in additional + // passive effects. So we need to keep flushing in a loop until there are + // no more pending effects. + // TODO: Might be better if `flushPassiveEffects` did not automatically + // flush synchronous work at the end, to avoid factoring hazards like this. + flushPassiveEffects(); + } while (rootWithPendingPassiveEffects !== null); + + flushRenderPhaseStrictModeWarningsInDEV(); + + if (!((executionContext & (RenderContext | CommitContext)) === NoContext)) { + { + throw Error('Should not already be working.'); + } + } + + var finishedWork = root.finishedWork; + var expirationTime = root.finishedExpirationTime; + + if (finishedWork === null) { + return null; + } + + root.finishedWork = null; + root.finishedExpirationTime = NoWork; + + if (!(finishedWork !== root.current)) { + { + throw Error( + 'Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } // commitRoot never returns a continuation; it always finishes synchronously. + // So we can clear these now to allow a new callback to be scheduled. + + root.callbackNode = null; + root.callbackExpirationTime = NoWork; + root.callbackPriority = NoPriority; + root.nextKnownPendingLevel = NoWork; + startCommitTimer(); // Update the first and last pending times on this root. The new first + // pending time is whatever is left on the root fiber. + + var remainingExpirationTimeBeforeCommit = getRemainingExpirationTime(finishedWork); + markRootFinishedAtTime(root, expirationTime, remainingExpirationTimeBeforeCommit); + + if (root === workInProgressRoot) { + // We can reset these now that they are finished. + workInProgressRoot = null; + workInProgress = null; + renderExpirationTime = NoWork; + } else { + } // This indicates that the last root we worked on is not the same one that + // we're committing now. This most commonly happens when a suspended root + // times out. + // Get the list of effects. + + var firstEffect; + + if (finishedWork.effectTag > PerformedWork) { + // A fiber's effect list consists only of its children, not itself. So if + // the root has an effect, we need to add it to the end of the list. The + // resulting list is the set that would belong to the root's parent, if it + // had one; that is, all the effects in the tree including the root. + if (finishedWork.lastEffect !== null) { + finishedWork.lastEffect.nextEffect = finishedWork; + firstEffect = finishedWork.firstEffect; + } else { + firstEffect = finishedWork; + } + } else { + // There is no effect on the root. + firstEffect = finishedWork.firstEffect; + } + + if (firstEffect !== null) { + var prevExecutionContext = executionContext; + executionContext |= CommitContext; + var prevInteractions = pushInteractions(root); // Reset this to null before calling lifecycles + + ReactCurrentOwner$2.current = null; // The commit phase is broken into several sub-phases. We do a separate pass + // of the effect list for each phase: all mutation effects come before all + // layout effects, and so on. + // The first phase a "before mutation" phase. We use this phase to read the + // state of the host tree right before we mutate it. This is where + // getSnapshotBeforeUpdate is called. + + startCommitSnapshotEffectsTimer(); + prepareForCommit(root.containerInfo); + nextEffect = firstEffect; + + do { + { + invokeGuardedCallback(null, commitBeforeMutationEffects, null); + + if (hasCaughtError()) { + if (!(nextEffect !== null)) { + { + throw Error('Should be working on an effect.'); + } + } + + var error = clearCaughtError(); + captureCommitPhaseError(nextEffect, error); + nextEffect = nextEffect.nextEffect; + } + } + } while (nextEffect !== null); + + stopCommitSnapshotEffectsTimer(); + + if (enableProfilerTimer) { + // Mark the current commit time to be shared by all Profilers in this + // batch. This enables them to be grouped later. + recordCommitTime(); + } // The next phase is the mutation phase, where we mutate the host tree. + + startCommitHostEffectsTimer(); + nextEffect = firstEffect; + + do { + { + invokeGuardedCallback(null, commitMutationEffects, null, root, renderPriorityLevel); + + if (hasCaughtError()) { + if (!(nextEffect !== null)) { + { + throw Error('Should be working on an effect.'); + } + } + + var _error = clearCaughtError(); + + captureCommitPhaseError(nextEffect, _error); + nextEffect = nextEffect.nextEffect; + } + } + } while (nextEffect !== null); + + stopCommitHostEffectsTimer(); + resetAfterCommit(root.containerInfo); // The work-in-progress tree is now the current tree. This must come after + // the mutation phase, so that the previous tree is still current during + // componentWillUnmount, but before the layout phase, so that the finished + // work is current during componentDidMount/Update. + + root.current = finishedWork; // The next phase is the layout phase, where we call effects that read + // the host tree after it's been mutated. The idiomatic use case for this is + // layout, but class component lifecycles also fire here for legacy reasons. + + startCommitLifeCyclesTimer(); + nextEffect = firstEffect; + + do { + { + invokeGuardedCallback(null, commitLayoutEffects, null, root, expirationTime); + + if (hasCaughtError()) { + if (!(nextEffect !== null)) { + { + throw Error('Should be working on an effect.'); + } + } + + var _error2 = clearCaughtError(); + + captureCommitPhaseError(nextEffect, _error2); + nextEffect = nextEffect.nextEffect; + } + } + } while (nextEffect !== null); + + stopCommitLifeCyclesTimer(); + nextEffect = null; // Tell Scheduler to yield at the end of the frame, so the browser has an + // opportunity to paint. + + requestPaint(); + + if (enableSchedulerTracing) { + popInteractions(prevInteractions); + } + + executionContext = prevExecutionContext; + } else { + // No effects. + root.current = finishedWork; // Measure these anyway so the flamegraph explicitly shows that there were + // no effects. + // TODO: Maybe there's a better way to report this. + + startCommitSnapshotEffectsTimer(); + stopCommitSnapshotEffectsTimer(); + + if (enableProfilerTimer) { + recordCommitTime(); + } + + startCommitHostEffectsTimer(); + stopCommitHostEffectsTimer(); + startCommitLifeCyclesTimer(); + stopCommitLifeCyclesTimer(); + } + + stopCommitTimer(); + var rootDidHavePassiveEffects = rootDoesHavePassiveEffects; + + if (rootDoesHavePassiveEffects) { + // This commit has passive effects. Stash a reference to them. But don't + // schedule a callback until after flushing layout work. + rootDoesHavePassiveEffects = false; + rootWithPendingPassiveEffects = root; + pendingPassiveEffectsExpirationTime = expirationTime; + pendingPassiveEffectsRenderPriority = renderPriorityLevel; + } else { + // We are done with the effect chain at this point so let's clear the + // nextEffect pointers to assist with GC. If we have passive effects, we'll + // clear this in flushPassiveEffects. + nextEffect = firstEffect; + + while (nextEffect !== null) { + var nextNextEffect = nextEffect.nextEffect; + nextEffect.nextEffect = null; + nextEffect = nextNextEffect; + } + } // Check if there's remaining work on this root + + var remainingExpirationTime = root.firstPendingTime; + + if (remainingExpirationTime !== NoWork) { + if (enableSchedulerTracing) { + if (spawnedWorkDuringRender !== null) { + var expirationTimes = spawnedWorkDuringRender; + spawnedWorkDuringRender = null; + + for (var i = 0; i < expirationTimes.length; i++) { + scheduleInteractions(root, expirationTimes[i], root.memoizedInteractions); + } + } + + schedulePendingInteractions(root, remainingExpirationTime); + } + } else { + // If there's no remaining work, we can clear the set of already failed + // error boundaries. + legacyErrorBoundariesThatAlreadyFailed = null; + } + + if (enableSchedulerTracing) { + if (!rootDidHavePassiveEffects) { + // If there are no passive effects, then we can complete the pending interactions. + // Otherwise, we'll wait until after the passive effects are flushed. + // Wait to do this until after remaining work has been scheduled, + // so that we don't prematurely signal complete for interactions when there's e.g. hidden work. + finishPendingInteractions(root, expirationTime); + } + } + + if (remainingExpirationTime === Sync) { + // Count the number of times the root synchronously re-renders without + // finishing. If there are too many, it indicates an infinite update loop. + if (root === rootWithNestedUpdates) { + nestedUpdateCount++; + } else { + nestedUpdateCount = 0; + rootWithNestedUpdates = root; + } + } else { + nestedUpdateCount = 0; + } + + onCommitRoot(finishedWork.stateNode, expirationTime); // Always call this before exiting `commitRoot`, to ensure that any + // additional work on this root is scheduled. + + ensureRootIsScheduled(root); + + if (hasUncaughtError) { + hasUncaughtError = false; + var _error3 = firstUncaughtError; + firstUncaughtError = null; + throw _error3; + } + + if ((executionContext & LegacyUnbatchedContext) !== NoContext) { + // This is a legacy edge case. We just committed the initial mount of + // a ReactDOM.render-ed root inside of batchedUpdates. The commit fired + // synchronously, but layout updates should be deferred until the end + // of the batch. + return null; + } // If layout work was scheduled, flush it now. + + flushSyncCallbackQueue(); + return null; + } + + function commitBeforeMutationEffects() { + while (nextEffect !== null) { + var effectTag = nextEffect.effectTag; + + if ((effectTag & Snapshot) !== NoEffect) { + setCurrentFiber(nextEffect); + recordEffect(); + var current$$1 = nextEffect.alternate; + commitBeforeMutationLifeCycles(current$$1, nextEffect); + resetCurrentFiber(); + } + + if ((effectTag & Passive) !== NoEffect) { + // If there are passive effects, schedule a callback to flush at + // the earliest opportunity. + if (!rootDoesHavePassiveEffects) { + rootDoesHavePassiveEffects = true; + scheduleCallback(NormalPriority, function () { + flushPassiveEffects(); + return null; + }); + } + } + + nextEffect = nextEffect.nextEffect; + } + } + + function commitMutationEffects(root, renderPriorityLevel) { + // TODO: Should probably move the bulk of this function to commitWork. + while (nextEffect !== null) { + setCurrentFiber(nextEffect); + var effectTag = nextEffect.effectTag; + + if (effectTag & ContentReset) { + commitResetTextContent(nextEffect); + } + + if (effectTag & Ref) { + var current$$1 = nextEffect.alternate; + + if (current$$1 !== null) { + commitDetachRef(current$$1); + } + } // The following switch statement is only concerned about placement, + // updates, and deletions. To avoid needing to add a case for every possible + // bitmap value, we remove the secondary effects from the effect tag and + // switch on that value. + + var primaryEffectTag = effectTag & (Placement | Update | Deletion | Hydrating); + + switch (primaryEffectTag) { + case Placement: { + commitPlacement(nextEffect); // Clear the "placement" from effect tag so that we know that this is + // inserted, before any life-cycles like componentDidMount gets called. + // TODO: findDOMNode doesn't rely on this any more but isMounted does + // and isMounted is deprecated anyway so we should be able to kill this. + + nextEffect.effectTag &= ~Placement; + break; + } + + case PlacementAndUpdate: { + // Placement + commitPlacement(nextEffect); // Clear the "placement" from effect tag so that we know that this is + // inserted, before any life-cycles like componentDidMount gets called. + + nextEffect.effectTag &= ~Placement; // Update + + var _current = nextEffect.alternate; + commitWork(_current, nextEffect); + break; + } + + case Hydrating: { + nextEffect.effectTag &= ~Hydrating; + break; + } + + case HydratingAndUpdate: { + nextEffect.effectTag &= ~Hydrating; // Update + + var _current2 = nextEffect.alternate; + commitWork(_current2, nextEffect); + break; + } + + case Update: { + var _current3 = nextEffect.alternate; + commitWork(_current3, nextEffect); + break; + } + + case Deletion: { + commitDeletion(root, nextEffect, renderPriorityLevel); + break; + } + } // TODO: Only record a mutation effect if primaryEffectTag is non-zero. + + recordEffect(); + resetCurrentFiber(); + nextEffect = nextEffect.nextEffect; + } + } + + function commitLayoutEffects(root, committedExpirationTime) { + // TODO: Should probably move the bulk of this function to commitWork. + while (nextEffect !== null) { + setCurrentFiber(nextEffect); + var effectTag = nextEffect.effectTag; + + if (effectTag & (Update | Callback)) { + recordEffect(); + var current$$1 = nextEffect.alternate; + commitLifeCycles(root, current$$1, nextEffect, committedExpirationTime); + } + + if (effectTag & Ref) { + recordEffect(); + commitAttachRef(nextEffect); + } + + resetCurrentFiber(); + nextEffect = nextEffect.nextEffect; + } + } + + function flushPassiveEffects() { + if (pendingPassiveEffectsRenderPriority !== NoPriority) { + var priorityLevel = + pendingPassiveEffectsRenderPriority > NormalPriority + ? NormalPriority + : pendingPassiveEffectsRenderPriority; + pendingPassiveEffectsRenderPriority = NoPriority; + return runWithPriority$2(priorityLevel, flushPassiveEffectsImpl); + } + } + + function flushPassiveEffectsImpl() { + if (rootWithPendingPassiveEffects === null) { + return false; + } + + var root = rootWithPendingPassiveEffects; + var expirationTime = pendingPassiveEffectsExpirationTime; + rootWithPendingPassiveEffects = null; + pendingPassiveEffectsExpirationTime = NoWork; + + if (!((executionContext & (RenderContext | CommitContext)) === NoContext)) { + { + throw Error('Cannot flush passive effects while already rendering.'); + } + } + + var prevExecutionContext = executionContext; + executionContext |= CommitContext; + var prevInteractions = pushInteractions(root); // Note: This currently assumes there are no passive effects on the root + // fiber, because the root is not part of its own effect list. This could + // change in the future. + + var effect = root.current.firstEffect; + + while (effect !== null) { + { + setCurrentFiber(effect); + invokeGuardedCallback(null, commitPassiveHookEffects, null, effect); + + if (hasCaughtError()) { + if (!(effect !== null)) { + { + throw Error('Should be working on an effect.'); + } + } + + var error = clearCaughtError(); + captureCommitPhaseError(effect, error); + } + + resetCurrentFiber(); + } + + var nextNextEffect = effect.nextEffect; // Remove nextEffect pointer to assist GC + + effect.nextEffect = null; + effect = nextNextEffect; + } + + if (enableSchedulerTracing) { + popInteractions(prevInteractions); + finishPendingInteractions(root, expirationTime); + } + + executionContext = prevExecutionContext; + flushSyncCallbackQueue(); // If additional passive effects were scheduled, increment a counter. If this + // exceeds the limit, we'll fire a warning. + + nestedPassiveUpdateCount = + rootWithPendingPassiveEffects === null ? 0 : nestedPassiveUpdateCount + 1; + return true; + } + + function isAlreadyFailedLegacyErrorBoundary(instance) { + return ( + legacyErrorBoundariesThatAlreadyFailed !== null && + legacyErrorBoundariesThatAlreadyFailed.has(instance) + ); + } + function markLegacyErrorBoundaryAsFailed(instance) { + if (legacyErrorBoundariesThatAlreadyFailed === null) { + legacyErrorBoundariesThatAlreadyFailed = new Set([instance]); + } else { + legacyErrorBoundariesThatAlreadyFailed.add(instance); + } + } + + function prepareToThrowUncaughtError(error) { + if (!hasUncaughtError) { + hasUncaughtError = true; + firstUncaughtError = error; + } + } + + var onUncaughtError = prepareToThrowUncaughtError; + + function captureCommitPhaseErrorOnRoot(rootFiber, sourceFiber, error) { + var errorInfo = createCapturedValue(error, sourceFiber); + var update = createRootErrorUpdate(rootFiber, errorInfo, Sync); + enqueueUpdate(rootFiber, update); + var root = markUpdateTimeFromFiberToRoot(rootFiber, Sync); + + if (root !== null) { + ensureRootIsScheduled(root); + schedulePendingInteractions(root, Sync); + } + } + + function captureCommitPhaseError(sourceFiber, error) { + if (sourceFiber.tag === HostRoot) { + // Error was thrown at the root. There is no parent, so the root + // itself should capture it. + captureCommitPhaseErrorOnRoot(sourceFiber, sourceFiber, error); + return; + } + + var fiber = sourceFiber.return; + + while (fiber !== null) { + if (fiber.tag === HostRoot) { + captureCommitPhaseErrorOnRoot(fiber, sourceFiber, error); + return; + } else if (fiber.tag === ClassComponent) { + var ctor = fiber.type; + var instance = fiber.stateNode; + + if ( + typeof ctor.getDerivedStateFromError === 'function' || + (typeof instance.componentDidCatch === 'function' && + !isAlreadyFailedLegacyErrorBoundary(instance)) + ) { + var errorInfo = createCapturedValue(error, sourceFiber); + var update = createClassErrorUpdate( + fiber, + errorInfo, // TODO: This is always sync + Sync, + ); + enqueueUpdate(fiber, update); + var root = markUpdateTimeFromFiberToRoot(fiber, Sync); + + if (root !== null) { + ensureRootIsScheduled(root); + schedulePendingInteractions(root, Sync); + } + + return; + } + } + + fiber = fiber.return; + } + } + function pingSuspendedRoot(root, thenable, suspendedTime) { + var pingCache = root.pingCache; + + if (pingCache !== null) { + // The thenable resolved, so we no longer need to memoize, because it will + // never be thrown again. + pingCache.delete(thenable); + } + + if (workInProgressRoot === root && renderExpirationTime === suspendedTime) { + // Received a ping at the same priority level at which we're currently + // rendering. We might want to restart this render. This should mirror + // the logic of whether or not a root suspends once it completes. + // TODO: If we're rendering sync either due to Sync, Batched or expired, + // we should probably never restart. + // If we're suspended with delay, we'll always suspend so we can always + // restart. If we're suspended without any updates, it might be a retry. + // If it's early in the retry we can restart. We can't know for sure + // whether we'll eventually process an update during this render pass, + // but it's somewhat unlikely that we get to a ping before that, since + // getting to the root most update is usually very fast. + if ( + workInProgressRootExitStatus === RootSuspendedWithDelay || + (workInProgressRootExitStatus === RootSuspended && + workInProgressRootLatestProcessedExpirationTime === Sync && + now() - globalMostRecentFallbackTime < FALLBACK_THROTTLE_MS) + ) { + // Restart from the root. Don't need to schedule a ping because + // we're already working on this tree. + prepareFreshStack(root, renderExpirationTime); + } else { + // Even though we can't restart right now, we might get an + // opportunity later. So we mark this render as having a ping. + workInProgressRootHasPendingPing = true; + } + + return; + } + + if (!isRootSuspendedAtTime(root, suspendedTime)) { + // The root is no longer suspended at this time. + return; + } + + var lastPingedTime = root.lastPingedTime; + + if (lastPingedTime !== NoWork && lastPingedTime < suspendedTime) { + // There's already a lower priority ping scheduled. + return; + } // Mark the time at which this ping was scheduled. + + root.lastPingedTime = suspendedTime; + + if (root.finishedExpirationTime === suspendedTime) { + // If there's a pending fallback waiting to commit, throw it away. + root.finishedExpirationTime = NoWork; + root.finishedWork = null; + } + + ensureRootIsScheduled(root); + schedulePendingInteractions(root, suspendedTime); + } + + function retryTimedOutBoundary(boundaryFiber, retryTime) { + // The boundary fiber (a Suspense component or SuspenseList component) + // previously was rendered in its fallback state. One of the promises that + // suspended it has resolved, which means at least part of the tree was + // likely unblocked. Try rendering again, at a new expiration time. + if (retryTime === NoWork) { + var suspenseConfig = null; // Retries don't carry over the already committed update. + + var currentTime = requestCurrentTimeForUpdate(); + retryTime = computeExpirationForFiber(currentTime, boundaryFiber, suspenseConfig); + } // TODO: Special case idle priority? + + var root = markUpdateTimeFromFiberToRoot(boundaryFiber, retryTime); + + if (root !== null) { + ensureRootIsScheduled(root); + schedulePendingInteractions(root, retryTime); + } + } + + function retryDehydratedSuspenseBoundary(boundaryFiber) { + var suspenseState = boundaryFiber.memoizedState; + var retryTime = NoWork; + + if (suspenseState !== null) { + retryTime = suspenseState.retryTime; + } + + retryTimedOutBoundary(boundaryFiber, retryTime); + } + function resolveRetryThenable(boundaryFiber, thenable) { + var retryTime = NoWork; // Default + + var retryCache; + + if (enableSuspenseServerRenderer) { + switch (boundaryFiber.tag) { + case SuspenseComponent: + retryCache = boundaryFiber.stateNode; + var suspenseState = boundaryFiber.memoizedState; + + if (suspenseState !== null) { + retryTime = suspenseState.retryTime; + } + + break; + + case SuspenseListComponent: + retryCache = boundaryFiber.stateNode; + break; + + default: { + { + throw Error('Pinged unknown suspense boundary type. This is probably a bug in React.'); + } + } + } + } else { + retryCache = boundaryFiber.stateNode; + } + + if (retryCache !== null) { + // The thenable resolved, so we no longer need to memoize, because it will + // never be thrown again. + retryCache.delete(thenable); + } + + retryTimedOutBoundary(boundaryFiber, retryTime); + } // Computes the next Just Noticeable Difference (JND) boundary. + // The theory is that a person can't tell the difference between small differences in time. + // Therefore, if we wait a bit longer than necessary that won't translate to a noticeable + // difference in the experience. However, waiting for longer might mean that we can avoid + // showing an intermediate loading state. The longer we have already waited, the harder it + // is to tell small differences in time. Therefore, the longer we've already waited, + // the longer we can wait additionally. At some point we have to give up though. + // We pick a train model where the next boundary commits at a consistent schedule. + // These particular numbers are vague estimates. We expect to adjust them based on research. + + function jnd(timeElapsed) { + return timeElapsed < 120 + ? 120 + : timeElapsed < 480 + ? 480 + : timeElapsed < 1080 + ? 1080 + : timeElapsed < 1920 + ? 1920 + : timeElapsed < 3000 + ? 3000 + : timeElapsed < 4320 + ? 4320 + : ceil(timeElapsed / 1960) * 1960; + } + + function computeMsUntilSuspenseLoadingDelay( + mostRecentEventTime, + committedExpirationTime, + suspenseConfig, + ) { + var busyMinDurationMs = suspenseConfig.busyMinDurationMs | 0; + + if (busyMinDurationMs <= 0) { + return 0; + } + + var busyDelayMs = suspenseConfig.busyDelayMs | 0; // Compute the time until this render pass would expire. + + var currentTimeMs = now(); + var eventTimeMs = inferTimeFromExpirationTimeWithSuspenseConfig( + mostRecentEventTime, + suspenseConfig, + ); + var timeElapsed = currentTimeMs - eventTimeMs; + + if (timeElapsed <= busyDelayMs) { + // If we haven't yet waited longer than the initial delay, we don't + // have to wait any additional time. + return 0; + } + + var msUntilTimeout = busyDelayMs + busyMinDurationMs - timeElapsed; // This is the value that is passed to `setTimeout`. + + return msUntilTimeout; + } + + function checkForNestedUpdates() { + if (nestedUpdateCount > NESTED_UPDATE_LIMIT) { + nestedUpdateCount = 0; + rootWithNestedUpdates = null; + + { + { + throw Error( + 'Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.', + ); + } + } + } + + { + if (nestedPassiveUpdateCount > NESTED_PASSIVE_UPDATE_LIMIT) { + nestedPassiveUpdateCount = 0; + warning$1( + false, + 'Maximum update depth exceeded. This can happen when a component ' + + "calls setState inside useEffect, but useEffect either doesn't " + + 'have a dependency array, or one of the dependencies changes on ' + + 'every render.', + ); + } + } + } + + function flushRenderPhaseStrictModeWarningsInDEV() { + { + ReactStrictModeWarnings.flushLegacyContextWarning(); + + if (warnAboutDeprecatedLifecycles) { + ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings(); + } + } + } + + function stopFinishedWorkLoopTimer() { + var didCompleteRoot = true; + stopWorkLoopTimer(interruptedBy, didCompleteRoot); + interruptedBy = null; + } + + function stopInterruptedWorkLoopTimer() { + // TODO: Track which fiber caused the interruption. + var didCompleteRoot = false; + stopWorkLoopTimer(interruptedBy, didCompleteRoot); + interruptedBy = null; + } + + function checkForInterruption(fiberThatReceivedUpdate, updateExpirationTime) { + if ( + enableUserTimingAPI && + workInProgressRoot !== null && + updateExpirationTime > renderExpirationTime + ) { + interruptedBy = fiberThatReceivedUpdate; + } + } + + var didWarnStateUpdateForUnmountedComponent = null; + + function warnAboutUpdateOnUnmountedFiberInDEV(fiber) { + { + var tag = fiber.tag; + + if ( + tag !== HostRoot && + tag !== ClassComponent && + tag !== FunctionComponent && + tag !== ForwardRef && + tag !== MemoComponent && + tag !== SimpleMemoComponent + ) { + // Only warn for user-defined components, not internal ones like Suspense. + return; + } // We show the whole stack but dedupe on the top component's name because + // the problematic code almost always lies inside that component. + + var componentName = getComponentName(fiber.type) || 'ReactComponent'; + + if (didWarnStateUpdateForUnmountedComponent !== null) { + if (didWarnStateUpdateForUnmountedComponent.has(componentName)) { + return; + } + + didWarnStateUpdateForUnmountedComponent.add(componentName); + } else { + didWarnStateUpdateForUnmountedComponent = new Set([componentName]); + } + + warningWithoutStack$1( + false, + "Can't perform a React state update on an unmounted component. This " + + 'is a no-op, but it indicates a memory leak in your application. To ' + + 'fix, cancel all subscriptions and asynchronous tasks in %s.%s', + tag === ClassComponent ? 'the componentWillUnmount method' : 'a useEffect cleanup function', + getStackByFiberInDevAndProd(fiber), + ); + } + } + + var beginWork$$1; + + if (true && replayFailedUnitOfWorkWithInvokeGuardedCallback) { + var dummyFiber = null; + + beginWork$$1 = function (current$$1, unitOfWork, expirationTime) { + // If a component throws an error, we replay it again in a synchronously + // dispatched event, so that the debugger will treat it as an uncaught + // error See ReactErrorUtils for more information. + // Before entering the begin phase, copy the work-in-progress onto a dummy + // fiber. If beginWork throws, we'll use this to reset the state. + var originalWorkInProgressCopy = assignFiberPropertiesInDEV(dummyFiber, unitOfWork); + + try { + return beginWork$1(current$$1, unitOfWork, expirationTime); + } catch (originalError) { + if ( + originalError !== null && + typeof originalError === 'object' && + typeof originalError.then === 'function' + ) { + // Don't replay promises. Treat everything else like an error. + throw originalError; + } // Keep this code in sync with handleError; any changes here must have + // corresponding changes there. + + resetContextDependencies(); + resetHooks(); // Don't reset current debug fiber, since we're about to work on the + // same fiber again. + // Unwind the failed stack frame + + unwindInterruptedWork(unitOfWork); // Restore the original properties of the fiber. + + assignFiberPropertiesInDEV(unitOfWork, originalWorkInProgressCopy); + + if (enableProfilerTimer && unitOfWork.mode & ProfileMode) { + // Reset the profiler timer. + startProfilerTimer(unitOfWork); + } // Run beginWork again. + + invokeGuardedCallback(null, beginWork$1, null, current$$1, unitOfWork, expirationTime); + + if (hasCaughtError()) { + var replayError = clearCaughtError(); // `invokeGuardedCallback` sometimes sets an expando `_suppressLogging`. + // Rethrow this error instead of the original one. + + throw replayError; + } else { + // This branch is reachable if the render phase is impure. + throw originalError; + } + } + }; + } else { + beginWork$$1 = beginWork$1; + } + + var didWarnAboutUpdateInRender = false; + var didWarnAboutUpdateInGetChildContext = false; + + function warnAboutInvalidUpdatesOnClassComponentsInDEV(fiber) { + { + if (fiber.tag === ClassComponent) { + switch (phase) { + case 'getChildContext': + if (didWarnAboutUpdateInGetChildContext) { + return; + } + + warningWithoutStack$1( + false, + 'setState(...): Cannot call setState() inside getChildContext()', + ); + didWarnAboutUpdateInGetChildContext = true; + break; + + case 'render': + if (didWarnAboutUpdateInRender) { + return; + } + + warningWithoutStack$1( + false, + 'Cannot update during an existing state transition (such as ' + + 'within `render`). Render methods should be a pure function of ' + + 'props and state.', + ); + didWarnAboutUpdateInRender = true; + break; + } + } + } + } // a 'shared' variable that changes when act() opens/closes in tests. + + var IsThisRendererActing = { + current: false, + }; + function warnIfNotScopedWithMatchingAct(fiber) { + { + if ( + warnsIfNotActing === true && + IsSomeRendererActing.current === true && + IsThisRendererActing.current !== true + ) { + warningWithoutStack$1( + false, + "It looks like you're using the wrong act() around your test interactions.\n" + + 'Be sure to use the matching version of act() corresponding to your renderer:\n\n' + + '// for react-dom:\n' + + "import {act} from 'react-dom/test-utils';\n" + + '// ...\n' + + 'act(() => ...);\n\n' + + '// for react-test-renderer:\n' + + "import TestRenderer from 'react-test-renderer';\n" + + 'const {act} = TestRenderer;\n' + + '// ...\n' + + 'act(() => ...);' + + '%s', + getStackByFiberInDevAndProd(fiber), + ); + } + } + } + function warnIfNotCurrentlyActingEffectsInDEV(fiber) { + { + if ( + warnsIfNotActing === true && + (fiber.mode & StrictMode) !== NoMode && + IsSomeRendererActing.current === false && + IsThisRendererActing.current === false + ) { + warningWithoutStack$1( + false, + 'An update to %s ran an effect, but was not wrapped in act(...).\n\n' + + 'When testing, code that causes React state updates should be ' + + 'wrapped into act(...):\n\n' + + 'act(() => {\n' + + ' /* fire events that update state */\n' + + '});\n' + + '/* assert on the output */\n\n' + + "This ensures that you're testing the behavior the user would see " + + 'in the browser.' + + ' Learn more at https://fb.me/react-wrap-tests-with-act' + + '%s', + getComponentName(fiber.type), + getStackByFiberInDevAndProd(fiber), + ); + } + } + } + + function warnIfNotCurrentlyActingUpdatesInDEV(fiber) { + { + if ( + warnsIfNotActing === true && + executionContext === NoContext && + IsSomeRendererActing.current === false && + IsThisRendererActing.current === false + ) { + warningWithoutStack$1( + false, + 'An update to %s inside a test was not wrapped in act(...).\n\n' + + 'When testing, code that causes React state updates should be ' + + 'wrapped into act(...):\n\n' + + 'act(() => {\n' + + ' /* fire events that update state */\n' + + '});\n' + + '/* assert on the output */\n\n' + + "This ensures that you're testing the behavior the user would see " + + 'in the browser.' + + ' Learn more at https://fb.me/react-wrap-tests-with-act' + + '%s', + getComponentName(fiber.type), + getStackByFiberInDevAndProd(fiber), + ); + } + } + } + + var warnIfNotCurrentlyActingUpdatesInDev = warnIfNotCurrentlyActingUpdatesInDEV; // In tests, we want to enforce a mocked scheduler. + + var didWarnAboutUnmockedScheduler = false; // TODO Before we release concurrent mode, revisit this and decide whether a mocked + // scheduler is the actual recommendation. The alternative could be a testing build, + // a new lib, or whatever; we dunno just yet. This message is for early adopters + // to get their tests right. + + function warnIfUnmockedScheduler(fiber) { + { + if ( + didWarnAboutUnmockedScheduler === false && + Scheduler.unstable_flushAllWithoutAsserting === undefined + ) { + if (fiber.mode & BlockingMode || fiber.mode & ConcurrentMode) { + didWarnAboutUnmockedScheduler = true; + warningWithoutStack$1( + false, + 'In Concurrent or Sync modes, the "scheduler" module needs to be mocked ' + + 'to guarantee consistent behaviour across tests and browsers. ' + + 'For example, with jest: \n' + + "jest.mock('scheduler', () => require('scheduler/unstable_mock'));\n\n" + + 'For more info, visit https://fb.me/react-mock-scheduler', + ); + } else if (warnAboutUnmockedScheduler === true) { + didWarnAboutUnmockedScheduler = true; + warningWithoutStack$1( + false, + 'Starting from React v17, the "scheduler" module will need to be mocked ' + + 'to guarantee consistent behaviour across tests and browsers. ' + + 'For example, with jest: \n' + + "jest.mock('scheduler', () => require('scheduler/unstable_mock'));\n\n" + + 'For more info, visit https://fb.me/react-mock-scheduler', + ); + } + } + } + } + var componentsThatTriggeredHighPriSuspend = null; + function checkForWrongSuspensePriorityInDEV(sourceFiber) { + { + var currentPriorityLevel = getCurrentPriorityLevel(); + + if ( + (sourceFiber.mode & ConcurrentMode) !== NoEffect && + (currentPriorityLevel === UserBlockingPriority$2 || + currentPriorityLevel === ImmediatePriority) + ) { + var workInProgressNode = sourceFiber; + + while (workInProgressNode !== null) { + // Add the component that triggered the suspense + var current$$1 = workInProgressNode.alternate; + + if (current$$1 !== null) { + // TODO: warn component that triggers the high priority + // suspend is the HostRoot + switch (workInProgressNode.tag) { + case ClassComponent: + // Loop through the component's update queue and see whether the component + // has triggered any high priority updates + var updateQueue = current$$1.updateQueue; + + if (updateQueue !== null) { + var update = updateQueue.firstUpdate; + + while (update !== null) { + var priorityLevel = update.priority; + + if ( + priorityLevel === UserBlockingPriority$2 || + priorityLevel === ImmediatePriority + ) { + if (componentsThatTriggeredHighPriSuspend === null) { + componentsThatTriggeredHighPriSuspend = new Set([ + getComponentName(workInProgressNode.type), + ]); + } else { + componentsThatTriggeredHighPriSuspend.add( + getComponentName(workInProgressNode.type), + ); + } + + break; + } + + update = update.next; + } + } + + break; + + case FunctionComponent: + case ForwardRef: + case SimpleMemoComponent: + if ( + workInProgressNode.memoizedState !== null && + workInProgressNode.memoizedState.baseUpdate !== null + ) { + var _update = workInProgressNode.memoizedState.baseUpdate; // Loop through the functional component's memoized state to see whether + // the component has triggered any high pri updates + + while (_update !== null) { + var priority = _update.priority; + + if (priority === UserBlockingPriority$2 || priority === ImmediatePriority) { + if (componentsThatTriggeredHighPriSuspend === null) { + componentsThatTriggeredHighPriSuspend = new Set([ + getComponentName(workInProgressNode.type), + ]); + } else { + componentsThatTriggeredHighPriSuspend.add( + getComponentName(workInProgressNode.type), + ); + } + + break; + } + + if (_update.next === workInProgressNode.memoizedState.baseUpdate) { + break; + } + + _update = _update.next; + } + } + + break; + + default: + break; + } + } + + workInProgressNode = workInProgressNode.return; + } + } + } + } + + function flushSuspensePriorityWarningInDEV() { + { + if (componentsThatTriggeredHighPriSuspend !== null) { + var componentNames = []; + componentsThatTriggeredHighPriSuspend.forEach(function (name) { + return componentNames.push(name); + }); + componentsThatTriggeredHighPriSuspend = null; + + if (componentNames.length > 0) { + warningWithoutStack$1( + false, + '%s triggered a user-blocking update that suspended.' + + '\n\n' + + 'The fix is to split the update into multiple parts: a user-blocking ' + + 'update to provide immediate feedback, and another update that ' + + 'triggers the bulk of the changes.' + + '\n\n' + + 'Refer to the documentation for useTransition to learn how ' + + 'to implement this pattern.', // TODO: Add link to React docs with more information, once it exists + componentNames.sort().join(', '), + ); + } + } + } + } + + function computeThreadID(root, expirationTime) { + // Interaction threads are unique per root and expiration time. + return expirationTime * 1000 + root.interactionThreadID; + } + + function markSpawnedWork(expirationTime) { + if (!enableSchedulerTracing) { + return; + } + + if (spawnedWorkDuringRender === null) { + spawnedWorkDuringRender = [expirationTime]; + } else { + spawnedWorkDuringRender.push(expirationTime); + } + } + + function scheduleInteractions(root, expirationTime, interactions) { + if (!enableSchedulerTracing) { + return; + } + + if (interactions.size > 0) { + var pendingInteractionMap = root.pendingInteractionMap; + var pendingInteractions = pendingInteractionMap.get(expirationTime); + + if (pendingInteractions != null) { + interactions.forEach(function (interaction) { + if (!pendingInteractions.has(interaction)) { + // Update the pending async work count for previously unscheduled interaction. + interaction.__count++; + } + + pendingInteractions.add(interaction); + }); + } else { + pendingInteractionMap.set(expirationTime, new Set(interactions)); // Update the pending async work count for the current interactions. + + interactions.forEach(function (interaction) { + interaction.__count++; + }); + } + + var subscriber = tracing.__subscriberRef.current; + + if (subscriber !== null) { + var threadID = computeThreadID(root, expirationTime); + subscriber.onWorkScheduled(interactions, threadID); + } + } + } + + function schedulePendingInteractions(root, expirationTime) { + // This is called when work is scheduled on a root. + // It associates the current interactions with the newly-scheduled expiration. + // They will be restored when that expiration is later committed. + if (!enableSchedulerTracing) { + return; + } + + scheduleInteractions(root, expirationTime, tracing.__interactionsRef.current); + } + + function startWorkOnPendingInteractions(root, expirationTime) { + // This is called when new work is started on a root. + if (!enableSchedulerTracing) { + return; + } // Determine which interactions this batch of work currently includes, So that + // we can accurately attribute time spent working on it, And so that cascading + // work triggered during the render phase will be associated with it. + + var interactions = new Set(); + root.pendingInteractionMap.forEach(function (scheduledInteractions, scheduledExpirationTime) { + if (scheduledExpirationTime >= expirationTime) { + scheduledInteractions.forEach(function (interaction) { + return interactions.add(interaction); + }); + } + }); // Store the current set of interactions on the FiberRoot for a few reasons: + // We can re-use it in hot functions like performConcurrentWorkOnRoot() + // without having to recalculate it. We will also use it in commitWork() to + // pass to any Profiler onRender() hooks. This also provides DevTools with a + // way to access it when the onCommitRoot() hook is called. + + root.memoizedInteractions = interactions; + + if (interactions.size > 0) { + var subscriber = tracing.__subscriberRef.current; + + if (subscriber !== null) { + var threadID = computeThreadID(root, expirationTime); + + try { + subscriber.onWorkStarted(interactions, threadID); + } catch (error) { + // If the subscriber throws, rethrow it in a separate task + scheduleCallback(ImmediatePriority, function () { + throw error; + }); + } + } + } + } + + function finishPendingInteractions(root, committedExpirationTime) { + if (!enableSchedulerTracing) { + return; + } + + var earliestRemainingTimeAfterCommit = root.firstPendingTime; + var subscriber; + + try { + subscriber = tracing.__subscriberRef.current; + + if (subscriber !== null && root.memoizedInteractions.size > 0) { + var threadID = computeThreadID(root, committedExpirationTime); + subscriber.onWorkStopped(root.memoizedInteractions, threadID); + } + } catch (error) { + // If the subscriber throws, rethrow it in a separate task + scheduleCallback(ImmediatePriority, function () { + throw error; + }); + } finally { + // Clear completed interactions from the pending Map. + // Unless the render was suspended or cascading work was scheduled, + // In which case– leave pending interactions until the subsequent render. + var pendingInteractionMap = root.pendingInteractionMap; + pendingInteractionMap.forEach(function (scheduledInteractions, scheduledExpirationTime) { + // Only decrement the pending interaction count if we're done. + // If there's still work at the current priority, + // That indicates that we are waiting for suspense data. + if (scheduledExpirationTime > earliestRemainingTimeAfterCommit) { + pendingInteractionMap.delete(scheduledExpirationTime); + scheduledInteractions.forEach(function (interaction) { + interaction.__count--; + + if (subscriber !== null && interaction.__count === 0) { + try { + subscriber.onInteractionScheduledWorkCompleted(interaction); + } catch (error) { + // If the subscriber throws, rethrow it in a separate task + scheduleCallback(ImmediatePriority, function () { + throw error; + }); + } + } + }); + } + }); + } + } + + var onCommitFiberRoot = null; + var onCommitFiberUnmount = null; + var hasLoggedError = false; + var isDevToolsPresent = typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined'; + function injectInternals(internals) { + if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined') { + // No DevTools + return false; + } + + var hook = __REACT_DEVTOOLS_GLOBAL_HOOK__; + + if (hook.isDisabled) { + // This isn't a real property on the hook, but it can be set to opt out + // of DevTools integration and associated warnings and logs. + // https://github.com/facebook/react/issues/3877 + return true; + } + + if (!hook.supportsFiber) { + { + warningWithoutStack$1( + false, + 'The installed version of React DevTools is too old and will not work ' + + 'with the current version of React. Please update React DevTools. ' + + 'https://fb.me/react-devtools', + ); + } // DevTools exists, even though it doesn't support Fiber. + + return true; + } + + try { + var rendererID = hook.inject(internals); // We have successfully injected, so now it is safe to set up hooks. + + onCommitFiberRoot = function (root, expirationTime) { + try { + var didError = (root.current.effectTag & DidCapture) === DidCapture; + + if (enableProfilerTimer) { + var currentTime = getCurrentTime(); + var priorityLevel = inferPriorityFromExpirationTime(currentTime, expirationTime); + hook.onCommitFiberRoot(rendererID, root, priorityLevel, didError); + } else { + hook.onCommitFiberRoot(rendererID, root, undefined, didError); + } + } catch (err) { + if (true && !hasLoggedError) { + hasLoggedError = true; + warningWithoutStack$1(false, 'React DevTools encountered an error: %s', err); + } + } + }; + + onCommitFiberUnmount = function (fiber) { + try { + hook.onCommitFiberUnmount(rendererID, fiber); + } catch (err) { + if (true && !hasLoggedError) { + hasLoggedError = true; + warningWithoutStack$1(false, 'React DevTools encountered an error: %s', err); + } + } + }; + } catch (err) { + // Catch all errors because it is unsafe to throw during initialization. + { + warningWithoutStack$1(false, 'React DevTools encountered an error: %s.', err); + } + } // DevTools exists + + return true; + } + function onCommitRoot(root, expirationTime) { + if (typeof onCommitFiberRoot === 'function') { + onCommitFiberRoot(root, expirationTime); + } + } + function onCommitUnmount(fiber) { + if (typeof onCommitFiberUnmount === 'function') { + onCommitFiberUnmount(fiber); + } + } + + var hasBadMapPolyfill; + + { + hasBadMapPolyfill = false; + + try { + var nonExtensibleObject = Object.preventExtensions({}); + var testMap = new Map([[nonExtensibleObject, null]]); + var testSet = new Set([nonExtensibleObject]); // This is necessary for Rollup to not consider these unused. + // https://github.com/rollup/rollup/issues/1771 + // TODO: we can remove these if Rollup fixes the bug. + + testMap.set(0, 0); + testSet.add(0); + } catch (e) { + // TODO: Consider warning about bad polyfills + hasBadMapPolyfill = true; + } + } + + var debugCounter = 1; + + function FiberNode(tag, pendingProps, key, mode) { + // Instance + this.tag = tag; + this.key = key; + this.elementType = null; + this.type = null; + this.stateNode = null; // Fiber + + this.return = null; + this.child = null; + this.sibling = null; + this.index = 0; + this.ref = null; + this.pendingProps = pendingProps; + this.memoizedProps = null; + this.updateQueue = null; + this.memoizedState = null; + this.dependencies = null; + this.mode = mode; // Effects + + this.effectTag = NoEffect; + this.nextEffect = null; + this.firstEffect = null; + this.lastEffect = null; + this.expirationTime = NoWork; + this.childExpirationTime = NoWork; + this.alternate = null; + + if (enableProfilerTimer) { + // Note: The following is done to avoid a v8 performance cliff. + // + // Initializing the fields below to smis and later updating them with + // double values will cause Fibers to end up having separate shapes. + // This behavior/bug has something to do with Object.preventExtension(). + // Fortunately this only impacts DEV builds. + // Unfortunately it makes React unusably slow for some applications. + // To work around this, initialize the fields below with doubles. + // + // Learn more about this here: + // https://github.com/facebook/react/issues/14365 + // https://bugs.chromium.org/p/v8/issues/detail?id=8538 + this.actualDuration = Number.NaN; + this.actualStartTime = Number.NaN; + this.selfBaseDuration = Number.NaN; + this.treeBaseDuration = Number.NaN; // It's okay to replace the initial doubles with smis after initialization. + // This won't trigger the performance cliff mentioned above, + // and it simplifies other profiler code (including DevTools). + + this.actualDuration = 0; + this.actualStartTime = -1; + this.selfBaseDuration = 0; + this.treeBaseDuration = 0; + } // This is normally DEV-only except www when it adds listeners. + // TODO: remove the User Timing integration in favor of Root Events. + + if (enableUserTimingAPI) { + this._debugID = debugCounter++; + this._debugIsCurrentlyTiming = false; + } + + { + this._debugSource = null; + this._debugOwner = null; + this._debugNeedsRemount = false; + this._debugHookTypes = null; + + if (!hasBadMapPolyfill && typeof Object.preventExtensions === 'function') { + Object.preventExtensions(this); + } + } + } // This is a constructor function, rather than a POJO constructor, still + // please ensure we do the following: + // 1) Nobody should add any instance methods on this. Instance methods can be + // more difficult to predict when they get optimized and they are almost + // never inlined properly in static compilers. + // 2) Nobody should rely on `instanceof Fiber` for type testing. We should + // always know when it is a fiber. + // 3) We might want to experiment with using numeric keys since they are easier + // to optimize in a non-JIT environment. + // 4) We can easily go from a constructor to a createFiber object literal if that + // is faster. + // 5) It should be easy to port this to a C struct and keep a C implementation + // compatible. + + var createFiber = function (tag, pendingProps, key, mode) { + // $FlowFixMe: the shapes are exact here but Flow doesn't like constructors + return new FiberNode(tag, pendingProps, key, mode); + }; + + function shouldConstruct(Component) { + var prototype = Component.prototype; + return !!(prototype && prototype.isReactComponent); + } + + function isSimpleFunctionComponent(type) { + return typeof type === 'function' && !shouldConstruct(type) && type.defaultProps === undefined; + } + function resolveLazyComponentTag(Component) { + if (typeof Component === 'function') { + return shouldConstruct(Component) ? ClassComponent : FunctionComponent; + } else if (Component !== undefined && Component !== null) { + var $$typeof = Component.$$typeof; + + if ($$typeof === REACT_FORWARD_REF_TYPE) { + return ForwardRef; + } + + if ($$typeof === REACT_MEMO_TYPE) { + return MemoComponent; + } + } + + return IndeterminateComponent; + } // This is used to create an alternate fiber to do work on. + + function createWorkInProgress(current, pendingProps, expirationTime) { + var workInProgress = current.alternate; + + if (workInProgress === null) { + // We use a double buffering pooling technique because we know that we'll + // only ever need at most two versions of a tree. We pool the "other" unused + // node that we're free to reuse. This is lazily created to avoid allocating + // extra objects for things that are never updated. It also allow us to + // reclaim the extra memory if needed. + workInProgress = createFiber(current.tag, pendingProps, current.key, current.mode); + workInProgress.elementType = current.elementType; + workInProgress.type = current.type; + workInProgress.stateNode = current.stateNode; + + { + // DEV-only fields + workInProgress._debugID = current._debugID; + workInProgress._debugSource = current._debugSource; + workInProgress._debugOwner = current._debugOwner; + workInProgress._debugHookTypes = current._debugHookTypes; + } + + workInProgress.alternate = current; + current.alternate = workInProgress; + } else { + workInProgress.pendingProps = pendingProps; // We already have an alternate. + // Reset the effect tag. + + workInProgress.effectTag = NoEffect; // The effect list is no longer valid. + + workInProgress.nextEffect = null; + workInProgress.firstEffect = null; + workInProgress.lastEffect = null; + + if (enableProfilerTimer) { + // We intentionally reset, rather than copy, actualDuration & actualStartTime. + // This prevents time from endlessly accumulating in new commits. + // This has the downside of resetting values for different priority renders, + // But works for yielding (the common case) and should support resuming. + workInProgress.actualDuration = 0; + workInProgress.actualStartTime = -1; + } + } + + workInProgress.childExpirationTime = current.childExpirationTime; + workInProgress.expirationTime = current.expirationTime; + workInProgress.child = current.child; + workInProgress.memoizedProps = current.memoizedProps; + workInProgress.memoizedState = current.memoizedState; + workInProgress.updateQueue = current.updateQueue; // Clone the dependencies object. This is mutated during the render phase, so + // it cannot be shared with the current fiber. + + var currentDependencies = current.dependencies; + workInProgress.dependencies = + currentDependencies === null + ? null + : { + expirationTime: currentDependencies.expirationTime, + firstContext: currentDependencies.firstContext, + responders: currentDependencies.responders, + }; // These will be overridden during the parent's reconciliation + + workInProgress.sibling = current.sibling; + workInProgress.index = current.index; + workInProgress.ref = current.ref; + + if (enableProfilerTimer) { + workInProgress.selfBaseDuration = current.selfBaseDuration; + workInProgress.treeBaseDuration = current.treeBaseDuration; + } + + { + workInProgress._debugNeedsRemount = current._debugNeedsRemount; + + switch (workInProgress.tag) { + case IndeterminateComponent: + case FunctionComponent: + case SimpleMemoComponent: + workInProgress.type = resolveFunctionForHotReloading(current.type); + break; + + case ClassComponent: + workInProgress.type = resolveClassForHotReloading(current.type); + break; + + case ForwardRef: + workInProgress.type = resolveForwardRefForHotReloading(current.type); + break; + + default: + break; + } + } + + return workInProgress; + } // Used to reuse a Fiber for a second pass. + + function resetWorkInProgress(workInProgress, renderExpirationTime) { + // This resets the Fiber to what createFiber or createWorkInProgress would + // have set the values to before during the first pass. Ideally this wouldn't + // be necessary but unfortunately many code paths reads from the workInProgress + // when they should be reading from current and writing to workInProgress. + // We assume pendingProps, index, key, ref, return are still untouched to + // avoid doing another reconciliation. + // Reset the effect tag but keep any Placement tags, since that's something + // that child fiber is setting, not the reconciliation. + workInProgress.effectTag &= Placement; // The effect list is no longer valid. + + workInProgress.nextEffect = null; + workInProgress.firstEffect = null; + workInProgress.lastEffect = null; + var current = workInProgress.alternate; + + if (current === null) { + // Reset to createFiber's initial values. + workInProgress.childExpirationTime = NoWork; + workInProgress.expirationTime = renderExpirationTime; + workInProgress.child = null; + workInProgress.memoizedProps = null; + workInProgress.memoizedState = null; + workInProgress.updateQueue = null; + workInProgress.dependencies = null; + + if (enableProfilerTimer) { + // Note: We don't reset the actualTime counts. It's useful to accumulate + // actual time across multiple render passes. + workInProgress.selfBaseDuration = 0; + workInProgress.treeBaseDuration = 0; + } + } else { + // Reset to the cloned values that createWorkInProgress would've. + workInProgress.childExpirationTime = current.childExpirationTime; + workInProgress.expirationTime = current.expirationTime; + workInProgress.child = current.child; + workInProgress.memoizedProps = current.memoizedProps; + workInProgress.memoizedState = current.memoizedState; + workInProgress.updateQueue = current.updateQueue; // Clone the dependencies object. This is mutated during the render phase, so + // it cannot be shared with the current fiber. + + var currentDependencies = current.dependencies; + workInProgress.dependencies = + currentDependencies === null + ? null + : { + expirationTime: currentDependencies.expirationTime, + firstContext: currentDependencies.firstContext, + responders: currentDependencies.responders, + }; + + if (enableProfilerTimer) { + // Note: We don't reset the actualTime counts. It's useful to accumulate + // actual time across multiple render passes. + workInProgress.selfBaseDuration = current.selfBaseDuration; + workInProgress.treeBaseDuration = current.treeBaseDuration; + } + } + + return workInProgress; + } + function createHostRootFiber(tag) { + var mode; + + if (tag === ConcurrentRoot) { + mode = ConcurrentMode | BlockingMode | StrictMode; + } else if (tag === BlockingRoot) { + mode = BlockingMode | StrictMode; + } else { + mode = NoMode; + } + + if (enableProfilerTimer && isDevToolsPresent) { + // Always collect profile timings when DevTools are present. + // This enables DevTools to start capturing timing at any point– + // Without some nodes in the tree having empty base times. + mode |= ProfileMode; + } + + return createFiber(HostRoot, null, null, mode); + } + function createFiberFromTypeAndProps( + type, // React$ElementType + key, + pendingProps, + owner, + mode, + expirationTime, + ) { + var fiber; + var fiberTag = IndeterminateComponent; // The resolved type is set if we know what the final type will be. I.e. it's not lazy. + + var resolvedType = type; + + if (typeof type === 'function') { + if (shouldConstruct(type)) { + fiberTag = ClassComponent; + + { + resolvedType = resolveClassForHotReloading(resolvedType); + } + } else { + { + resolvedType = resolveFunctionForHotReloading(resolvedType); + } + } + } else if (typeof type === 'string') { + fiberTag = HostComponent; + } else { + getTag: switch (type) { + case REACT_FRAGMENT_TYPE: + return createFiberFromFragment(pendingProps.children, mode, expirationTime, key); + + case REACT_CONCURRENT_MODE_TYPE: + fiberTag = Mode; + mode |= ConcurrentMode | BlockingMode | StrictMode; + break; + + case REACT_STRICT_MODE_TYPE: + fiberTag = Mode; + mode |= StrictMode; + break; + + case REACT_PROFILER_TYPE: + return createFiberFromProfiler(pendingProps, mode, expirationTime, key); + + case REACT_SUSPENSE_TYPE: + return createFiberFromSuspense(pendingProps, mode, expirationTime, key); + + case REACT_SUSPENSE_LIST_TYPE: + return createFiberFromSuspenseList(pendingProps, mode, expirationTime, key); + + default: { + if (typeof type === 'object' && type !== null) { + switch (type.$$typeof) { + case REACT_PROVIDER_TYPE: + fiberTag = ContextProvider; + break getTag; + + case REACT_CONTEXT_TYPE: + // This is a consumer + fiberTag = ContextConsumer; + break getTag; + + case REACT_FORWARD_REF_TYPE: + fiberTag = ForwardRef; + + { + resolvedType = resolveForwardRefForHotReloading(resolvedType); + } + + break getTag; + + case REACT_MEMO_TYPE: + fiberTag = MemoComponent; + break getTag; + + case REACT_LAZY_TYPE: + fiberTag = LazyComponent; + resolvedType = null; + break getTag; + + case REACT_FUNDAMENTAL_TYPE: + if (enableFundamentalAPI) { + return createFiberFromFundamental(type, pendingProps, mode, expirationTime, key); + } + + break; + + case REACT_SCOPE_TYPE: + if (enableScopeAPI) { + return createFiberFromScope(type, pendingProps, mode, expirationTime, key); + } + } + } + + var info = ''; + + { + if ( + type === undefined || + (typeof type === 'object' && type !== null && Object.keys(type).length === 0) + ) { + info += + ' You likely forgot to export your component from the file ' + + "it's defined in, or you might have mixed up default and " + + 'named imports.'; + } + + var ownerName = owner ? getComponentName(owner.type) : null; + + if (ownerName) { + info += '\n\nCheck the render method of `' + ownerName + '`.'; + } + } + + { + { + throw Error( + 'Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: ' + + (type == null ? type : typeof type) + + '.' + + info, + ); + } + } + } + } + } + + fiber = createFiber(fiberTag, pendingProps, key, mode); + fiber.elementType = type; + fiber.type = resolvedType; + fiber.expirationTime = expirationTime; + return fiber; + } + function createFiberFromElement(element, mode, expirationTime) { + var owner = null; + + { + owner = element._owner; + } + + var type = element.type; + var key = element.key; + var pendingProps = element.props; + var fiber = createFiberFromTypeAndProps(type, key, pendingProps, owner, mode, expirationTime); + + { + fiber._debugSource = element._source; + fiber._debugOwner = element._owner; + } + + return fiber; + } + function createFiberFromFragment(elements, mode, expirationTime, key) { + var fiber = createFiber(Fragment, elements, key, mode); + fiber.expirationTime = expirationTime; + return fiber; + } + function createFiberFromFundamental(fundamentalComponent, pendingProps, mode, expirationTime, key) { + var fiber = createFiber(FundamentalComponent, pendingProps, key, mode); + fiber.elementType = fundamentalComponent; + fiber.type = fundamentalComponent; + fiber.expirationTime = expirationTime; + return fiber; + } + + function createFiberFromScope(scope, pendingProps, mode, expirationTime, key) { + var fiber = createFiber(ScopeComponent, pendingProps, key, mode); + fiber.type = scope; + fiber.elementType = scope; + fiber.expirationTime = expirationTime; + return fiber; + } + + function createFiberFromProfiler(pendingProps, mode, expirationTime, key) { + { + if (typeof pendingProps.id !== 'string' || typeof pendingProps.onRender !== 'function') { + warningWithoutStack$1( + false, + 'Profiler must specify an "id" string and "onRender" function as props', + ); + } + } + + var fiber = createFiber(Profiler, pendingProps, key, mode | ProfileMode); // TODO: The Profiler fiber shouldn't have a type. It has a tag. + + fiber.elementType = REACT_PROFILER_TYPE; + fiber.type = REACT_PROFILER_TYPE; + fiber.expirationTime = expirationTime; + return fiber; + } + + function createFiberFromSuspense(pendingProps, mode, expirationTime, key) { + var fiber = createFiber(SuspenseComponent, pendingProps, key, mode); // TODO: The SuspenseComponent fiber shouldn't have a type. It has a tag. + // This needs to be fixed in getComponentName so that it relies on the tag + // instead. + + fiber.type = REACT_SUSPENSE_TYPE; + fiber.elementType = REACT_SUSPENSE_TYPE; + fiber.expirationTime = expirationTime; + return fiber; + } + function createFiberFromSuspenseList(pendingProps, mode, expirationTime, key) { + var fiber = createFiber(SuspenseListComponent, pendingProps, key, mode); + + { + // TODO: The SuspenseListComponent fiber shouldn't have a type. It has a tag. + // This needs to be fixed in getComponentName so that it relies on the tag + // instead. + fiber.type = REACT_SUSPENSE_LIST_TYPE; + } + + fiber.elementType = REACT_SUSPENSE_LIST_TYPE; + fiber.expirationTime = expirationTime; + return fiber; + } + function createFiberFromText(content, mode, expirationTime) { + var fiber = createFiber(HostText, content, null, mode); + fiber.expirationTime = expirationTime; + return fiber; + } + function createFiberFromHostInstanceForDeletion() { + var fiber = createFiber(HostComponent, null, null, NoMode); // TODO: These should not need a type. + + fiber.elementType = 'DELETED'; + fiber.type = 'DELETED'; + return fiber; + } + function createFiberFromDehydratedFragment(dehydratedNode) { + var fiber = createFiber(DehydratedFragment, null, null, NoMode); + fiber.stateNode = dehydratedNode; + return fiber; + } + function createFiberFromPortal(portal, mode, expirationTime) { + var pendingProps = portal.children !== null ? portal.children : []; + var fiber = createFiber(HostPortal, pendingProps, portal.key, mode); + fiber.expirationTime = expirationTime; + fiber.stateNode = { + containerInfo: portal.containerInfo, + pendingChildren: null, + // Used by persistent updates + implementation: portal.implementation, + }; + return fiber; + } // Used for stashing WIP properties to replay failed work in DEV. + + function assignFiberPropertiesInDEV(target, source) { + if (target === null) { + // This Fiber's initial properties will always be overwritten. + // We only use a Fiber to ensure the same hidden class so DEV isn't slow. + target = createFiber(IndeterminateComponent, null, null, NoMode); + } // This is intentionally written as a list of all properties. + // We tried to use Object.assign() instead but this is called in + // the hottest path, and Object.assign() was too slow: + // https://github.com/facebook/react/issues/12502 + // This code is DEV-only so size is not a concern. + + target.tag = source.tag; + target.key = source.key; + target.elementType = source.elementType; + target.type = source.type; + target.stateNode = source.stateNode; + target.return = source.return; + target.child = source.child; + target.sibling = source.sibling; + target.index = source.index; + target.ref = source.ref; + target.pendingProps = source.pendingProps; + target.memoizedProps = source.memoizedProps; + target.updateQueue = source.updateQueue; + target.memoizedState = source.memoizedState; + target.dependencies = source.dependencies; + target.mode = source.mode; + target.effectTag = source.effectTag; + target.nextEffect = source.nextEffect; + target.firstEffect = source.firstEffect; + target.lastEffect = source.lastEffect; + target.expirationTime = source.expirationTime; + target.childExpirationTime = source.childExpirationTime; + target.alternate = source.alternate; + + if (enableProfilerTimer) { + target.actualDuration = source.actualDuration; + target.actualStartTime = source.actualStartTime; + target.selfBaseDuration = source.selfBaseDuration; + target.treeBaseDuration = source.treeBaseDuration; + } + + target._debugID = source._debugID; + target._debugSource = source._debugSource; + target._debugOwner = source._debugOwner; + target._debugIsCurrentlyTiming = source._debugIsCurrentlyTiming; + target._debugNeedsRemount = source._debugNeedsRemount; + target._debugHookTypes = source._debugHookTypes; + return target; + } + + function FiberRootNode(containerInfo, tag, hydrate) { + this.tag = tag; + this.current = null; + this.containerInfo = containerInfo; + this.pendingChildren = null; + this.pingCache = null; + this.finishedExpirationTime = NoWork; + this.finishedWork = null; + this.timeoutHandle = noTimeout; + this.context = null; + this.pendingContext = null; + this.hydrate = hydrate; + this.callbackNode = null; + this.callbackPriority = NoPriority; + this.firstPendingTime = NoWork; + this.firstSuspendedTime = NoWork; + this.lastSuspendedTime = NoWork; + this.nextKnownPendingLevel = NoWork; + this.lastPingedTime = NoWork; + this.lastExpiredTime = NoWork; + + if (enableSchedulerTracing) { + this.interactionThreadID = tracing.unstable_getThreadID(); + this.memoizedInteractions = new Set(); + this.pendingInteractionMap = new Map(); + } + + if (enableSuspenseCallback) { + this.hydrationCallbacks = null; + } + } + + function createFiberRoot(containerInfo, tag, hydrate, hydrationCallbacks) { + var root = new FiberRootNode(containerInfo, tag, hydrate); + + if (enableSuspenseCallback) { + root.hydrationCallbacks = hydrationCallbacks; + } // Cyclic construction. This cheats the type system right now because + // stateNode is any. + + var uninitializedFiber = createHostRootFiber(tag); + root.current = uninitializedFiber; + uninitializedFiber.stateNode = root; + return root; + } + function isRootSuspendedAtTime(root, expirationTime) { + var firstSuspendedTime = root.firstSuspendedTime; + var lastSuspendedTime = root.lastSuspendedTime; + return ( + firstSuspendedTime !== NoWork && + firstSuspendedTime >= expirationTime && + lastSuspendedTime <= expirationTime + ); + } + function markRootSuspendedAtTime(root, expirationTime) { + var firstSuspendedTime = root.firstSuspendedTime; + var lastSuspendedTime = root.lastSuspendedTime; + + if (firstSuspendedTime < expirationTime) { + root.firstSuspendedTime = expirationTime; + } + + if (lastSuspendedTime > expirationTime || firstSuspendedTime === NoWork) { + root.lastSuspendedTime = expirationTime; + } + + if (expirationTime <= root.lastPingedTime) { + root.lastPingedTime = NoWork; + } + + if (expirationTime <= root.lastExpiredTime) { + root.lastExpiredTime = NoWork; + } + } + function markRootUpdatedAtTime(root, expirationTime) { + // Update the range of pending times + var firstPendingTime = root.firstPendingTime; + + if (expirationTime > firstPendingTime) { + root.firstPendingTime = expirationTime; + } // Update the range of suspended times. Treat everything lower priority or + // equal to this update as unsuspended. + + var firstSuspendedTime = root.firstSuspendedTime; + + if (firstSuspendedTime !== NoWork) { + if (expirationTime >= firstSuspendedTime) { + // The entire suspended range is now unsuspended. + root.firstSuspendedTime = root.lastSuspendedTime = root.nextKnownPendingLevel = NoWork; + } else if (expirationTime >= root.lastSuspendedTime) { + root.lastSuspendedTime = expirationTime + 1; + } // This is a pending level. Check if it's higher priority than the next + // known pending level. + + if (expirationTime > root.nextKnownPendingLevel) { + root.nextKnownPendingLevel = expirationTime; + } + } + } + function markRootFinishedAtTime(root, finishedExpirationTime, remainingExpirationTime) { + // Update the range of pending times + root.firstPendingTime = remainingExpirationTime; // Update the range of suspended times. Treat everything higher priority or + // equal to this update as unsuspended. + + if (finishedExpirationTime <= root.lastSuspendedTime) { + // The entire suspended range is now unsuspended. + root.firstSuspendedTime = root.lastSuspendedTime = root.nextKnownPendingLevel = NoWork; + } else if (finishedExpirationTime <= root.firstSuspendedTime) { + // Part of the suspended range is now unsuspended. Narrow the range to + // include everything between the unsuspended time (non-inclusive) and the + // last suspended time. + root.firstSuspendedTime = finishedExpirationTime - 1; + } + + if (finishedExpirationTime <= root.lastPingedTime) { + // Clear the pinged time + root.lastPingedTime = NoWork; + } + + if (finishedExpirationTime <= root.lastExpiredTime) { + // Clear the expired time + root.lastExpiredTime = NoWork; + } + } + function markRootExpiredAtTime(root, expirationTime) { + var lastExpiredTime = root.lastExpiredTime; + + if (lastExpiredTime === NoWork || lastExpiredTime > expirationTime) { + root.lastExpiredTime = expirationTime; + } + } + + // This lets us hook into Fiber to debug what it's doing. + // See https://github.com/facebook/react/pull/8033. + // This is not part of the public API, not even for React DevTools. + // You may only inject a debugTool if you work on React Fiber itself. + var ReactFiberInstrumentation = { + debugTool: null, + }; + var ReactFiberInstrumentation_1 = ReactFiberInstrumentation; + + var didWarnAboutNestedUpdates; + var didWarnAboutFindNodeInStrictMode; + + { + didWarnAboutNestedUpdates = false; + didWarnAboutFindNodeInStrictMode = {}; + } + + function getContextForSubtree(parentComponent) { + if (!parentComponent) { + return emptyContextObject; + } + + var fiber = get(parentComponent); + var parentContext = findCurrentUnmaskedContext(fiber); + + if (fiber.tag === ClassComponent) { + var Component = fiber.type; + + if (isContextProvider(Component)) { + return processChildContext(fiber, Component, parentContext); + } + } + + return parentContext; + } + + function findHostInstance(component) { + var fiber = get(component); + + if (fiber === undefined) { + if (typeof component.render === 'function') { + { + { + throw Error('Unable to find node on an unmounted component.'); + } + } + } else { + { + { + throw Error( + 'Argument appears to not be a ReactComponent. Keys: ' + Object.keys(component), + ); + } + } + } + } + + var hostFiber = findCurrentHostFiber(fiber); + + if (hostFiber === null) { + return null; + } + + return hostFiber.stateNode; + } + + function findHostInstanceWithWarning(component, methodName) { + { + var fiber = get(component); + + if (fiber === undefined) { + if (typeof component.render === 'function') { + { + { + throw Error('Unable to find node on an unmounted component.'); + } + } + } else { + { + { + throw Error( + 'Argument appears to not be a ReactComponent. Keys: ' + Object.keys(component), + ); + } + } + } + } + + var hostFiber = findCurrentHostFiber(fiber); + + if (hostFiber === null) { + return null; + } + + if (hostFiber.mode & StrictMode) { + var componentName = getComponentName(fiber.type) || 'Component'; + + if (!didWarnAboutFindNodeInStrictMode[componentName]) { + didWarnAboutFindNodeInStrictMode[componentName] = true; + + if (fiber.mode & StrictMode) { + warningWithoutStack$1( + false, + '%s is deprecated in StrictMode. ' + + '%s was passed an instance of %s which is inside StrictMode. ' + + 'Instead, add a ref directly to the element you want to reference. ' + + 'Learn more about using refs safely here: ' + + 'https://fb.me/react-strict-mode-find-node%s', + methodName, + methodName, + componentName, + getStackByFiberInDevAndProd(hostFiber), + ); + } else { + warningWithoutStack$1( + false, + '%s is deprecated in StrictMode. ' + + '%s was passed an instance of %s which renders StrictMode children. ' + + 'Instead, add a ref directly to the element you want to reference. ' + + 'Learn more about using refs safely here: ' + + 'https://fb.me/react-strict-mode-find-node%s', + methodName, + methodName, + componentName, + getStackByFiberInDevAndProd(hostFiber), + ); + } + } + } + + return hostFiber.stateNode; + } + + return findHostInstance(component); + } + + function createContainer(containerInfo, tag, hydrate, hydrationCallbacks) { + return createFiberRoot(containerInfo, tag, hydrate, hydrationCallbacks); + } + function updateContainer(element, container, parentComponent, callback) { + var current$$1 = container.current; + var currentTime = requestCurrentTimeForUpdate(); + + { + // $FlowExpectedError - jest isn't a global, and isn't recognized outside of tests + if ('undefined' !== typeof jest) { + warnIfUnmockedScheduler(current$$1); + warnIfNotScopedWithMatchingAct(current$$1); + } + } + + var suspenseConfig = requestCurrentSuspenseConfig(); + var expirationTime = computeExpirationForFiber(currentTime, current$$1, suspenseConfig); + + { + if (ReactFiberInstrumentation_1.debugTool) { + if (current$$1.alternate === null) { + ReactFiberInstrumentation_1.debugTool.onMountContainer(container); + } else if (element === null) { + ReactFiberInstrumentation_1.debugTool.onUnmountContainer(container); + } else { + ReactFiberInstrumentation_1.debugTool.onUpdateContainer(container); + } + } + } + + var context = getContextForSubtree(parentComponent); + + if (container.context === null) { + container.context = context; + } else { + container.pendingContext = context; + } + + { + if (phase === 'render' && current !== null && !didWarnAboutNestedUpdates) { + didWarnAboutNestedUpdates = true; + warningWithoutStack$1( + false, + 'Render methods should be a pure function of props and state; ' + + 'triggering nested component updates from render is not allowed. ' + + 'If necessary, trigger nested updates in componentDidUpdate.\n\n' + + 'Check the render method of %s.', + getComponentName(current.type) || 'Unknown', + ); + } + } + + var update = createUpdate(expirationTime, suspenseConfig); // Caution: React DevTools currently depends on this property + // being called "element". + + update.payload = { + element: element, + }; + callback = callback === undefined ? null : callback; + + if (callback !== null) { + !(typeof callback === 'function') + ? warningWithoutStack$1( + false, + 'render(...): Expected the last optional `callback` argument to be a ' + + 'function. Instead received: %s.', + callback, + ) + : void 0; + update.callback = callback; + } + + enqueueUpdate(current$$1, update); + scheduleWork(current$$1, expirationTime); + return expirationTime; + } + function getPublicRootInstance(container) { + var containerFiber = container.current; + + if (!containerFiber.child) { + return null; + } + + switch (containerFiber.child.tag) { + case HostComponent: + return getPublicInstance(containerFiber.child.stateNode); + + default: + return containerFiber.child.stateNode; + } + } + function attemptSynchronousHydration$1(fiber) { + switch (fiber.tag) { + case HostRoot: + var root = fiber.stateNode; + + if (root.hydrate) { + // Flush the first scheduled "update". + flushRoot(root, root.firstPendingTime); + } + + break; + + case SuspenseComponent: + flushSync(function () { + return scheduleWork(fiber, Sync); + }); // If we're still blocked after this, we need to increase + // the priority of any promises resolving within this + // boundary so that they next attempt also has higher pri. + + var retryExpTime = computeInteractiveExpiration(requestCurrentTimeForUpdate()); + markRetryTimeIfNotHydrated(fiber, retryExpTime); + break; + } + } + + function markRetryTimeImpl(fiber, retryTime) { + var suspenseState = fiber.memoizedState; + + if (suspenseState !== null && suspenseState.dehydrated !== null) { + if (suspenseState.retryTime < retryTime) { + suspenseState.retryTime = retryTime; + } + } + } // Increases the priority of thennables when they resolve within this boundary. + + function markRetryTimeIfNotHydrated(fiber, retryTime) { + markRetryTimeImpl(fiber, retryTime); + var alternate = fiber.alternate; + + if (alternate) { + markRetryTimeImpl(alternate, retryTime); + } + } + + function attemptUserBlockingHydration$1(fiber) { + if (fiber.tag !== SuspenseComponent) { + // We ignore HostRoots here because we can't increase + // their priority and they should not suspend on I/O, + // since you have to wrap anything that might suspend in + // Suspense. + return; + } + + var expTime = computeInteractiveExpiration(requestCurrentTimeForUpdate()); + scheduleWork(fiber, expTime); + markRetryTimeIfNotHydrated(fiber, expTime); + } + function attemptContinuousHydration$1(fiber) { + if (fiber.tag !== SuspenseComponent) { + // We ignore HostRoots here because we can't increase + // their priority and they should not suspend on I/O, + // since you have to wrap anything that might suspend in + // Suspense. + return; + } + + var expTime = computeContinuousHydrationExpiration(requestCurrentTimeForUpdate()); + scheduleWork(fiber, expTime); + markRetryTimeIfNotHydrated(fiber, expTime); + } + function attemptHydrationAtCurrentPriority$1(fiber) { + if (fiber.tag !== SuspenseComponent) { + // We ignore HostRoots here because we can't increase + // their priority other than synchronously flush it. + return; + } + + var currentTime = requestCurrentTimeForUpdate(); + var expTime = computeExpirationForFiber(currentTime, fiber, null); + scheduleWork(fiber, expTime); + markRetryTimeIfNotHydrated(fiber, expTime); + } + function findHostInstanceWithNoPortals(fiber) { + var hostFiber = findCurrentHostFiberWithNoPortals(fiber); + + if (hostFiber === null) { + return null; + } + + if (hostFiber.tag === FundamentalComponent) { + return hostFiber.stateNode.instance; + } + + return hostFiber.stateNode; + } + + var shouldSuspendImpl = function (fiber) { + return false; + }; + + function shouldSuspend(fiber) { + return shouldSuspendImpl(fiber); + } + var overrideHookState = null; + var overrideProps = null; + var scheduleUpdate = null; + var setSuspenseHandler = null; + + { + var copyWithSetImpl = function (obj, path, idx, value) { + if (idx >= path.length) { + return value; + } + + var key = path[idx]; + var updated = Array.isArray(obj) ? obj.slice() : _assign({}, obj); // $FlowFixMe number or string is fine here + + updated[key] = copyWithSetImpl(obj[key], path, idx + 1, value); + return updated; + }; + + var copyWithSet = function (obj, path, value) { + return copyWithSetImpl(obj, path, 0, value); + }; // Support DevTools editable values for useState and useReducer. + + overrideHookState = function (fiber, id, path, value) { + // For now, the "id" of stateful hooks is just the stateful hook index. + // This may change in the future with e.g. nested hooks. + var currentHook = fiber.memoizedState; + + while (currentHook !== null && id > 0) { + currentHook = currentHook.next; + id--; + } + + if (currentHook !== null) { + var newState = copyWithSet(currentHook.memoizedState, path, value); + currentHook.memoizedState = newState; + currentHook.baseState = newState; // We aren't actually adding an update to the queue, + // because there is no update we can add for useReducer hooks that won't trigger an error. + // (There's no appropriate action type for DevTools overrides.) + // As a result though, React will see the scheduled update as a noop and bailout. + // Shallow cloning props works as a workaround for now to bypass the bailout check. + + fiber.memoizedProps = _assign({}, fiber.memoizedProps); + scheduleWork(fiber, Sync); + } + }; // Support DevTools props for function components, forwardRef, memo, host components, etc. + + overrideProps = function (fiber, path, value) { + fiber.pendingProps = copyWithSet(fiber.memoizedProps, path, value); + + if (fiber.alternate) { + fiber.alternate.pendingProps = fiber.pendingProps; + } + + scheduleWork(fiber, Sync); + }; + + scheduleUpdate = function (fiber) { + scheduleWork(fiber, Sync); + }; + + setSuspenseHandler = function (newShouldSuspendImpl) { + shouldSuspendImpl = newShouldSuspendImpl; + }; + } + + function injectIntoDevTools(devToolsConfig) { + var findFiberByHostInstance = devToolsConfig.findFiberByHostInstance; + var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher; + return injectInternals( + _assign({}, devToolsConfig, { + overrideHookState: overrideHookState, + overrideProps: overrideProps, + setSuspenseHandler: setSuspenseHandler, + scheduleUpdate: scheduleUpdate, + currentDispatcherRef: ReactCurrentDispatcher, + findHostInstanceByFiber: function (fiber) { + var hostFiber = findCurrentHostFiber(fiber); + + if (hostFiber === null) { + return null; + } + + return hostFiber.stateNode; + }, + findFiberByHostInstance: function (instance) { + if (!findFiberByHostInstance) { + // Might not be implemented by the renderer. + return null; + } + + return findFiberByHostInstance(instance); + }, + // React Refresh + findHostInstancesForRefresh: findHostInstancesForRefresh, + scheduleRefresh: scheduleRefresh, + scheduleRoot: scheduleRoot, + setRefreshHandler: setRefreshHandler, + // Enables DevTools to append owner stacks to error messages in DEV mode. + getCurrentFiber: function () { + return current; + }, + }), + ); + } + + // This file intentionally does *not* have the Flow annotation. + // Don't add it. See `./inline-typed.js` for an explanation. + + // TODO: This type is shared between the reconciler and ReactDOM, but will + // eventually be lifted out to the renderer. + function ReactDOMRoot(container, options) { + this._internalRoot = createRootImpl(container, ConcurrentRoot, options); + } + + function ReactDOMBlockingRoot(container, tag, options) { + this._internalRoot = createRootImpl(container, tag, options); + } + + ReactDOMRoot.prototype.render = ReactDOMBlockingRoot.prototype.render = function ( + children, + callback, + ) { + var root = this._internalRoot; + var cb = callback === undefined ? null : callback; + + { + warnOnInvalidCallback(cb, 'render'); + } + + updateContainer(children, root, null, cb); + }; + + ReactDOMRoot.prototype.unmount = ReactDOMBlockingRoot.prototype.unmount = function (callback) { + var root = this._internalRoot; + var cb = callback === undefined ? null : callback; + + { + warnOnInvalidCallback(cb, 'render'); + } + + var container = root.containerInfo; + updateContainer(null, root, null, function () { + unmarkContainerAsRoot(container); + + if (cb !== null) { + cb(); + } + }); + }; + + function createRootImpl(container, tag, options) { + // Tag is either LegacyRoot or Concurrent Root + var hydrate = options != null && options.hydrate === true; + var hydrationCallbacks = (options != null && options.hydrationOptions) || null; + var root = createContainer(container, tag, hydrate, hydrationCallbacks); + markContainerAsRoot(root.current, container); + + if (hydrate && tag !== LegacyRoot) { + var doc = container.nodeType === DOCUMENT_NODE ? container : container.ownerDocument; + eagerlyTrapReplayableEvents(doc); + } + + return root; + } + + function createRoot(container, options) { + if (!isValidContainer(container)) { + { + throw Error('createRoot(...): Target container is not a DOM element.'); + } + } + + warnIfReactDOMContainerInDEV(container); + return new ReactDOMRoot(container, options); + } + function createBlockingRoot(container, options) { + if (!isValidContainer(container)) { + { + throw Error('createRoot(...): Target container is not a DOM element.'); + } + } + + warnIfReactDOMContainerInDEV(container); + return new ReactDOMBlockingRoot(container, BlockingRoot, options); + } + function createLegacyRoot(container, options) { + return new ReactDOMBlockingRoot(container, LegacyRoot, options); + } + function isValidContainer(node) { + return !!( + node && + (node.nodeType === ELEMENT_NODE || + node.nodeType === DOCUMENT_NODE || + node.nodeType === DOCUMENT_FRAGMENT_NODE || + (node.nodeType === COMMENT_NODE && node.nodeValue === ' react-mount-point-unstable ')) + ); + } + function warnOnInvalidCallback(callback, callerName) { + { + !(callback === null || typeof callback === 'function') + ? warningWithoutStack$1( + false, + '%s(...): Expected the last optional `callback` argument to be a ' + + 'function. Instead received: %s.', + callerName, + callback, + ) + : void 0; + } + } + + function warnIfReactDOMContainerInDEV(container) { + { + if (isContainerMarkedAsRoot(container)) { + if (container._reactRootContainer) { + warningWithoutStack$1( + false, + 'You are calling ReactDOM.createRoot() on a container that was previously ' + + 'passed to ReactDOM.render(). This is not supported.', + ); + } else { + warningWithoutStack$1( + false, + 'You are calling ReactDOM.createRoot() on a container that ' + + 'has already been passed to createRoot() before. Instead, call ' + + 'root.render() on the existing root instead if you want to update it.', + ); + } + } + } + } + + var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner; + var topLevelUpdateWarnings; + var warnedAboutHydrateAPI = false; + + { + topLevelUpdateWarnings = function (container) { + if (container._reactRootContainer && container.nodeType !== COMMENT_NODE) { + var hostInstance = findHostInstanceWithNoPortals( + container._reactRootContainer._internalRoot.current, + ); + + if (hostInstance) { + !(hostInstance.parentNode === container) + ? warningWithoutStack$1( + false, + 'render(...): It looks like the React-rendered content of this ' + + 'container was removed without using React. This is not ' + + 'supported and will cause errors. Instead, call ' + + 'ReactDOM.unmountComponentAtNode to empty a container.', + ) + : void 0; + } + } + + var isRootRenderedBySomeReact = !!container._reactRootContainer; + var rootEl = getReactRootElementInContainer(container); + var hasNonRootReactChild = !!(rootEl && getInstanceFromNode$1(rootEl)); + !(!hasNonRootReactChild || isRootRenderedBySomeReact) + ? warningWithoutStack$1( + false, + 'render(...): Replacing React-rendered children with a new root ' + + 'component. If you intended to update the children of this node, ' + + 'you should instead have the existing children update their state ' + + 'and render the new components instead of calling ReactDOM.render.', + ) + : void 0; + !( + container.nodeType !== ELEMENT_NODE || + !container.tagName || + container.tagName.toUpperCase() !== 'BODY' + ) + ? warningWithoutStack$1( + false, + 'render(): Rendering components directly into document.body is ' + + 'discouraged, since its children are often manipulated by third-party ' + + 'scripts and browser extensions. This may lead to subtle ' + + 'reconciliation issues. Try rendering into a container element created ' + + 'for your app.', + ) + : void 0; + }; + } + + function getReactRootElementInContainer(container) { + if (!container) { + return null; + } + + if (container.nodeType === DOCUMENT_NODE) { + return container.documentElement; + } else { + return container.firstChild; + } + } + + function shouldHydrateDueToLegacyHeuristic(container) { + var rootElement = getReactRootElementInContainer(container); + return !!( + rootElement && + rootElement.nodeType === ELEMENT_NODE && + rootElement.hasAttribute(ROOT_ATTRIBUTE_NAME) + ); + } + + function legacyCreateRootFromDOMContainer(container, forceHydrate) { + var shouldHydrate = forceHydrate || shouldHydrateDueToLegacyHeuristic(container); // First clear any existing content. + + if (!shouldHydrate) { + var warned = false; + var rootSibling; + + while ((rootSibling = container.lastChild)) { + { + if ( + !warned && + rootSibling.nodeType === ELEMENT_NODE && + rootSibling.hasAttribute(ROOT_ATTRIBUTE_NAME) + ) { + warned = true; + warningWithoutStack$1( + false, + 'render(): Target node has markup rendered by React, but there ' + + 'are unrelated nodes as well. This is most commonly caused by ' + + 'white-space inserted around server-rendered markup.', + ); + } + } + + container.removeChild(rootSibling); + } + } + + { + if (shouldHydrate && !forceHydrate && !warnedAboutHydrateAPI) { + warnedAboutHydrateAPI = true; + lowPriorityWarningWithoutStack$1( + false, + 'render(): Calling ReactDOM.render() to hydrate server-rendered markup ' + + 'will stop working in React v17. Replace the ReactDOM.render() call ' + + 'with ReactDOM.hydrate() if you want React to attach to the server HTML.', + ); + } + } + + return createLegacyRoot( + container, + shouldHydrate + ? { + hydrate: true, + } + : undefined, + ); + } + + function legacyRenderSubtreeIntoContainer( + parentComponent, + children, + container, + forceHydrate, + callback, + ) { + { + topLevelUpdateWarnings(container); + warnOnInvalidCallback(callback === undefined ? null : callback, 'render'); + } // TODO: Without `any` type, Flow says "Property cannot be accessed on any + // member of intersection type." Whyyyyyy. + + var root = container._reactRootContainer; + var fiberRoot; + + if (!root) { + // Initial mount + root = container._reactRootContainer = legacyCreateRootFromDOMContainer( + container, + forceHydrate, + ); + fiberRoot = root._internalRoot; + + if (typeof callback === 'function') { + var originalCallback = callback; + + callback = function () { + var instance = getPublicRootInstance(fiberRoot); + originalCallback.call(instance); + }; + } // Initial mount should not be batched. + + unbatchedUpdates(function () { + updateContainer(children, fiberRoot, parentComponent, callback); + }); + } else { + fiberRoot = root._internalRoot; + + if (typeof callback === 'function') { + var _originalCallback = callback; + + callback = function () { + var instance = getPublicRootInstance(fiberRoot); + + _originalCallback.call(instance); + }; + } // Update + + updateContainer(children, fiberRoot, parentComponent, callback); + } + + return getPublicRootInstance(fiberRoot); + } + + function findDOMNode(componentOrElement) { + { + var owner = ReactCurrentOwner$1.current; + + if (owner !== null && owner.stateNode !== null) { + var warnedAboutRefsInRender = owner.stateNode._warnedAboutRefsInRender; + !warnedAboutRefsInRender + ? warningWithoutStack$1( + false, + '%s is accessing findDOMNode inside its render(). ' + + 'render() should be a pure function of props and state. It should ' + + 'never access something that requires stale data from the previous ' + + 'render, such as refs. Move this logic to componentDidMount and ' + + 'componentDidUpdate instead.', + getComponentName(owner.type) || 'A component', + ) + : void 0; + owner.stateNode._warnedAboutRefsInRender = true; + } + } + + if (componentOrElement == null) { + return null; + } + + if (componentOrElement.nodeType === ELEMENT_NODE) { + return componentOrElement; + } + + { + return findHostInstanceWithWarning(componentOrElement, 'findDOMNode'); + } + + return findHostInstance(componentOrElement); + } + function hydrate(element, container, callback) { + if (!isValidContainer(container)) { + { + throw Error('Target container is not a DOM element.'); + } + } + + { + var isModernRoot = + isContainerMarkedAsRoot(container) && container._reactRootContainer === undefined; + + if (isModernRoot) { + warningWithoutStack$1( + false, + 'You are calling ReactDOM.hydrate() on a container that was previously ' + + 'passed to ReactDOM.createRoot(). This is not supported. ' + + 'Did you mean to call createRoot(container, {hydrate: true}).render(element)?', + ); + } + } // TODO: throw or warn if we couldn't hydrate? + + return legacyRenderSubtreeIntoContainer(null, element, container, true, callback); + } + function render(element, container, callback) { + if (!isValidContainer(container)) { + { + throw Error('Target container is not a DOM element.'); + } + } + + { + var isModernRoot = + isContainerMarkedAsRoot(container) && container._reactRootContainer === undefined; + + if (isModernRoot) { + warningWithoutStack$1( + false, + 'You are calling ReactDOM.render() on a container that was previously ' + + 'passed to ReactDOM.createRoot(). This is not supported. ' + + 'Did you mean to call root.render(element)?', + ); + } + } + + return legacyRenderSubtreeIntoContainer(null, element, container, false, callback); + } + function unstable_renderSubtreeIntoContainer(parentComponent, element, containerNode, callback) { + if (!isValidContainer(containerNode)) { + { + throw Error('Target container is not a DOM element.'); + } + } + + if (!(parentComponent != null && has(parentComponent))) { + { + throw Error('parentComponent must be a valid React Component'); + } + } + + return legacyRenderSubtreeIntoContainer(parentComponent, element, containerNode, false, callback); + } + function unmountComponentAtNode(container) { + if (!isValidContainer(container)) { + { + throw Error('unmountComponentAtNode(...): Target container is not a DOM element.'); + } + } + + { + var isModernRoot = + isContainerMarkedAsRoot(container) && container._reactRootContainer === undefined; + + if (isModernRoot) { + warningWithoutStack$1( + false, + 'You are calling ReactDOM.unmountComponentAtNode() on a container that was previously ' + + 'passed to ReactDOM.createRoot(). This is not supported. Did you mean to call root.unmount()?', + ); + } + } + + if (container._reactRootContainer) { + { + var rootEl = getReactRootElementInContainer(container); + var renderedByDifferentReact = rootEl && !getInstanceFromNode$1(rootEl); + !!renderedByDifferentReact + ? warningWithoutStack$1( + false, + "unmountComponentAtNode(): The node you're attempting to unmount " + + 'was rendered by another copy of React.', + ) + : void 0; + } // Unmount should not be batched. + + unbatchedUpdates(function () { + legacyRenderSubtreeIntoContainer(null, null, container, false, function () { + container._reactRootContainer = null; + unmarkContainerAsRoot(container); + }); + }); // If you call unmountComponentAtNode twice in quick succession, you'll + // get `true` twice. That's probably fine? + + return true; + } else { + { + var _rootEl = getReactRootElementInContainer(container); + + var hasNonRootReactChild = !!(_rootEl && getInstanceFromNode$1(_rootEl)); // Check if the container itself is a React root node. + + var isContainerReactRoot = + container.nodeType === ELEMENT_NODE && + isValidContainer(container.parentNode) && + !!container.parentNode._reactRootContainer; + !!hasNonRootReactChild + ? warningWithoutStack$1( + false, + "unmountComponentAtNode(): The node you're attempting to unmount " + + 'was rendered by React and is not a top-level container. %s', + isContainerReactRoot + ? 'You may have accidentally passed in a React root node instead ' + + 'of its container.' + : 'Instead, have the parent component update its state and ' + + 'rerender in order to remove this component.', + ) + : void 0; + } + + return false; + } + } + + function createPortal$1( + children, + containerInfo, // TODO: figure out the API for cross-renderer implementation. + implementation, + ) { + var key = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null; + return { + // This tag allow us to uniquely identify this as a React Portal + $$typeof: REACT_PORTAL_TYPE, + key: key == null ? null : '' + key, + children: children, + containerInfo: containerInfo, + implementation: implementation, + }; + } + + // TODO: this is special because it gets imported during build. + + var ReactVersion = '16.12.0'; + + setAttemptSynchronousHydration(attemptSynchronousHydration$1); + setAttemptUserBlockingHydration(attemptUserBlockingHydration$1); + setAttemptContinuousHydration(attemptContinuousHydration$1); + setAttemptHydrationAtCurrentPriority(attemptHydrationAtCurrentPriority$1); + var didWarnAboutUnstableCreatePortal = false; + + { + if ( + typeof Map !== 'function' || // $FlowIssue Flow incorrectly thinks Map has no prototype + Map.prototype == null || + typeof Map.prototype.forEach !== 'function' || + typeof Set !== 'function' || // $FlowIssue Flow incorrectly thinks Set has no prototype + Set.prototype == null || + typeof Set.prototype.clear !== 'function' || + typeof Set.prototype.forEach !== 'function' + ) { + warningWithoutStack$1( + false, + 'React depends on Map and Set built-in types. Make sure that you load a ' + + 'polyfill in older browsers. https://fb.me/react-polyfills', + ); + } + } + + setRestoreImplementation(restoreControlledState$$1); + setBatchingImplementation( + batchedUpdates$1, + discreteUpdates$1, + flushDiscreteUpdates, + batchedEventUpdates$1, + ); + + function createPortal$$1(children, container) { + var key = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null; + + if (!isValidContainer(container)) { + { + throw Error('Target container is not a DOM element.'); + } + } // TODO: pass ReactDOM portal implementation as third argument + + return createPortal$1(children, container, null, key); + } + + var ReactDOM = { + createPortal: createPortal$$1, + // Legacy + findDOMNode: findDOMNode, + hydrate: hydrate, + render: render, + unstable_renderSubtreeIntoContainer: unstable_renderSubtreeIntoContainer, + unmountComponentAtNode: unmountComponentAtNode, + // Temporary alias since we already shipped React 16 RC with it. + // TODO: remove in React 17. + unstable_createPortal: function () { + if (!didWarnAboutUnstableCreatePortal) { + didWarnAboutUnstableCreatePortal = true; + lowPriorityWarningWithoutStack$1( + false, + 'The ReactDOM.unstable_createPortal() alias has been deprecated, ' + + 'and will be removed in React 17+. Update your code to use ' + + 'ReactDOM.createPortal() instead. It has the exact same API, ' + + 'but without the "unstable_" prefix.', + ); + } + + return createPortal$$1.apply(void 0, arguments); + }, + unstable_batchedUpdates: batchedUpdates$1, + flushSync: flushSync, + __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: { + // Keep in sync with ReactDOMUnstableNativeDependencies.js + // ReactTestUtils.js, and ReactTestUtilsAct.js. This is an array for better minification. + Events: [ + getInstanceFromNode$1, + getNodeFromInstance$1, + getFiberCurrentPropsFromNode$1, + injection.injectEventPluginsByName, + eventNameDispatchConfigs, + accumulateTwoPhaseDispatches, + accumulateDirectDispatches, + enqueueStateRestore, + restoreStateIfNeeded, + dispatchEvent, + runEventsInBatch, + flushPassiveEffects, + IsThisRendererActing, + ], + }, + }; + + if (exposeConcurrentModeAPIs) { + ReactDOM.createRoot = createRoot; + ReactDOM.createBlockingRoot = createBlockingRoot; + ReactDOM.unstable_discreteUpdates = discreteUpdates$1; + ReactDOM.unstable_flushDiscreteUpdates = flushDiscreteUpdates; + ReactDOM.unstable_flushControlled = flushControlled; + + ReactDOM.unstable_scheduleHydration = function (target) { + if (target) { + queueExplicitHydrationTarget(target); + } + }; + } + + var foundDevTools = injectIntoDevTools({ + findFiberByHostInstance: getClosestInstanceFromNode, + bundleType: 1, + version: ReactVersion, + rendererPackageName: 'react-dom', + }); + + { + if (!foundDevTools && canUseDOM && window.top === window.self) { + // If we're in Chrome or Firefox, provide a download link if not installed. + if ( + (navigator.userAgent.indexOf('Chrome') > -1 && navigator.userAgent.indexOf('Edge') === -1) || + navigator.userAgent.indexOf('Firefox') > -1 + ) { + var protocol = window.location.protocol; // Don't warn in exotic cases like chrome-extension://. + + if (/^(https?|file):$/.test(protocol)) { + console.info( + '%cDownload the React DevTools ' + + 'for a better development experience: ' + + 'https://fb.me/react-devtools' + + (protocol === 'file:' + ? '\nYou might need to use a local HTTP server (instead of file://): ' + + 'https://fb.me/react-devtools-faq' + : ''), + 'font-weight:bold', + ); + } + } + } + } + + var ReactDOM$2 = Object.freeze({ + default: ReactDOM, + }); + + var ReactDOM$3 = (ReactDOM$2 && ReactDOM) || ReactDOM$2; + + // TODO: decide on the top-level export form. + // This is hacky but makes it work with both Rollup and Jest. + + var reactDom = ReactDOM$3.default || ReactDOM$3; + + module.exports = reactDom; + })(); + } + + /***/ + }, + /* 511 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** @license React v16.12.0 + * react.development.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + + if (true) { + (function () { + 'use strict'; + + var _assign = __webpack_require__(63); + var checkPropTypes = __webpack_require__(106); + + // TODO: this is special because it gets imported during build. + + var ReactVersion = '16.12.0'; + + // The Symbol used to tag the ReactElement-like types. If there is no native Symbol + // nor polyfill, then a plain number is used for performance. + var hasSymbol = typeof Symbol === 'function' && Symbol.for; + var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7; + var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca; + var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb; + var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc; + var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2; + var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd; + var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary + // (unstable) APIs that have been removed. Can we remove the symbols? + + var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf; + var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0; + var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1; + var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8; + var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3; + var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4; + var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5; + var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6; + var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7; + var MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; + var FAUX_ITERATOR_SYMBOL = '@@iterator'; + function getIteratorFn(maybeIterable) { + if (maybeIterable === null || typeof maybeIterable !== 'object') { + return null; + } + + var maybeIterator = + (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) || + maybeIterable[FAUX_ITERATOR_SYMBOL]; + + if (typeof maybeIterator === 'function') { + return maybeIterator; + } + + return null; + } + + // Do not require this module directly! Use normal `invariant` calls with + // template literal strings. The messages will be replaced with error codes + // during build. + + /** + * Use invariant() to assert state which your program assumes to be true. + * + * Provide sprintf-style format (only %s is supported) and arguments + * to provide information about what broke and what you were + * expecting. + * + * The invariant message will be stripped in production, but the invariant + * will remain to ensure logic does not differ in production. + */ + + /** + * Forked from fbjs/warning: + * https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js + * + * Only change is we use console.warn instead of console.error, + * and do nothing when 'console' is not supported. + * This really simplifies the code. + * --- + * Similar to invariant but only logs a warning if the condition is not met. + * This can be used to log issues in development environments in critical + * paths. Removing the logging code for production environments will keep the + * same logic and follow the same code paths. + */ + var lowPriorityWarningWithoutStack = function () {}; + + { + var printWarning = function (format) { + for ( + var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; + _key < _len; + _key++ + ) { + args[_key - 1] = arguments[_key]; + } + + var argIndex = 0; + var message = + 'Warning: ' + + format.replace(/%s/g, function () { + return args[argIndex++]; + }); + + if (typeof console !== 'undefined') { + console.warn(message); + } + + try { + // --- Welcome to debugging React --- + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + throw new Error(message); + } catch (x) {} + }; + + lowPriorityWarningWithoutStack = function (condition, format) { + if (format === undefined) { + throw new Error( + '`lowPriorityWarningWithoutStack(condition, format, ...args)` requires a warning ' + + 'message argument', + ); + } + + if (!condition) { + for ( + var _len2 = arguments.length, args = new Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; + _key2 < _len2; + _key2++ + ) { + args[_key2 - 2] = arguments[_key2]; + } + + printWarning.apply(void 0, [format].concat(args)); + } + }; + } + + var lowPriorityWarningWithoutStack$1 = lowPriorityWarningWithoutStack; + + /** + * Similar to invariant but only logs a warning if the condition is not met. + * This can be used to log issues in development environments in critical + * paths. Removing the logging code for production environments will keep the + * same logic and follow the same code paths. + */ + var warningWithoutStack = function () {}; + + { + warningWithoutStack = function (condition, format) { + for ( + var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; + _key < _len; + _key++ + ) { + args[_key - 2] = arguments[_key]; + } + + if (format === undefined) { + throw new Error( + '`warningWithoutStack(condition, format, ...args)` requires a warning ' + + 'message argument', + ); + } + + if (args.length > 8) { + // Check before the condition to catch violations early. + throw new Error('warningWithoutStack() currently supports at most 8 arguments.'); + } + + if (condition) { + return; + } + + if (typeof console !== 'undefined') { + var argsWithFormat = args.map(function (item) { + return '' + item; + }); + argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it + // breaks IE9: https://github.com/facebook/react/issues/13610 + + Function.prototype.apply.call(console.error, console, argsWithFormat); + } + + try { + // --- Welcome to debugging React --- + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + var argIndex = 0; + var message = + 'Warning: ' + + format.replace(/%s/g, function () { + return args[argIndex++]; + }); + throw new Error(message); + } catch (x) {} + }; + } + + var warningWithoutStack$1 = warningWithoutStack; + + var didWarnStateUpdateForUnmountedComponent = {}; + + function warnNoop(publicInstance, callerName) { + { + var _constructor = publicInstance.constructor; + var componentName = + (_constructor && (_constructor.displayName || _constructor.name)) || 'ReactClass'; + var warningKey = componentName + '.' + callerName; + + if (didWarnStateUpdateForUnmountedComponent[warningKey]) { + return; + } + + warningWithoutStack$1( + false, + "Can't call %s on a component that is not yet mounted. " + + 'This is a no-op, but it might indicate a bug in your application. ' + + 'Instead, assign to `this.state` directly or define a `state = {};` ' + + 'class property with the desired state in the %s component.', + callerName, + componentName, + ); + didWarnStateUpdateForUnmountedComponent[warningKey] = true; + } + } + /** + * This is the abstract API for an update queue. + */ + + var ReactNoopUpdateQueue = { + /** + * Checks whether or not this composite component is mounted. + * @param {ReactClass} publicInstance The instance we want to test. + * @return {boolean} True if mounted, false otherwise. + * @protected + * @final + */ + isMounted: function (publicInstance) { + return false; + }, + + /** + * Forces an update. This should only be invoked when it is known with + * certainty that we are **not** in a DOM transaction. + * + * You may want to call this when you know that some deeper aspect of the + * component's state has changed but `setState` was not called. + * + * This will not invoke `shouldComponentUpdate`, but it will invoke + * `componentWillUpdate` and `componentDidUpdate`. + * + * @param {ReactClass} publicInstance The instance that should rerender. + * @param {?function} callback Called after component is updated. + * @param {?string} callerName name of the calling function in the public API. + * @internal + */ + enqueueForceUpdate: function (publicInstance, callback, callerName) { + warnNoop(publicInstance, 'forceUpdate'); + }, + + /** + * Replaces all of the state. Always use this or `setState` to mutate state. + * You should treat `this.state` as immutable. + * + * There is no guarantee that `this.state` will be immediately updated, so + * accessing `this.state` after calling this method may return the old value. + * + * @param {ReactClass} publicInstance The instance that should rerender. + * @param {object} completeState Next state. + * @param {?function} callback Called after component is updated. + * @param {?string} callerName name of the calling function in the public API. + * @internal + */ + enqueueReplaceState: function (publicInstance, completeState, callback, callerName) { + warnNoop(publicInstance, 'replaceState'); + }, + + /** + * Sets a subset of the state. This only exists because _pendingState is + * internal. This provides a merging strategy that is not available to deep + * properties which is confusing. TODO: Expose pendingState or don't use it + * during the merge. + * + * @param {ReactClass} publicInstance The instance that should rerender. + * @param {object} partialState Next partial state to be merged with state. + * @param {?function} callback Called after component is updated. + * @param {?string} Name of the calling function in the public API. + * @internal + */ + enqueueSetState: function (publicInstance, partialState, callback, callerName) { + warnNoop(publicInstance, 'setState'); + }, + }; + + var emptyObject = {}; + + { + Object.freeze(emptyObject); + } + /** + * Base class helpers for the updating state of a component. + */ + + function Component(props, context, updater) { + this.props = props; + this.context = context; // If a component has string refs, we will assign a different object later. + + this.refs = emptyObject; // We initialize the default updater but the real one gets injected by the + // renderer. + + this.updater = updater || ReactNoopUpdateQueue; + } + + Component.prototype.isReactComponent = {}; + /** + * Sets a subset of the state. Always use this to mutate + * state. You should treat `this.state` as immutable. + * + * There is no guarantee that `this.state` will be immediately updated, so + * accessing `this.state` after calling this method may return the old value. + * + * There is no guarantee that calls to `setState` will run synchronously, + * as they may eventually be batched together. You can provide an optional + * callback that will be executed when the call to setState is actually + * completed. + * + * When a function is provided to setState, it will be called at some point in + * the future (not synchronously). It will be called with the up to date + * component arguments (state, props, context). These values can be different + * from this.* because your function may be called after receiveProps but before + * shouldComponentUpdate, and this new state, props, and context will not yet be + * assigned to this. + * + * @param {object|function} partialState Next partial state or function to + * produce next partial state to be merged with current state. + * @param {?function} callback Called after state is updated. + * @final + * @protected + */ + + Component.prototype.setState = function (partialState, callback) { + if ( + !( + typeof partialState === 'object' || + typeof partialState === 'function' || + partialState == null + ) + ) { + { + throw Error( + 'setState(...): takes an object of state variables to update or a function which returns an object of state variables.', + ); + } + } + + this.updater.enqueueSetState(this, partialState, callback, 'setState'); + }; + /** + * Forces an update. This should only be invoked when it is known with + * certainty that we are **not** in a DOM transaction. + * + * You may want to call this when you know that some deeper aspect of the + * component's state has changed but `setState` was not called. + * + * This will not invoke `shouldComponentUpdate`, but it will invoke + * `componentWillUpdate` and `componentDidUpdate`. + * + * @param {?function} callback Called after update is complete. + * @final + * @protected + */ + + Component.prototype.forceUpdate = function (callback) { + this.updater.enqueueForceUpdate(this, callback, 'forceUpdate'); + }; + /** + * Deprecated APIs. These APIs used to exist on classic React classes but since + * we would like to deprecate them, we're not going to move them over to this + * modern base class. Instead, we define a getter that warns if it's accessed. + */ + + { + var deprecatedAPIs = { + isMounted: [ + 'isMounted', + 'Instead, make sure to clean up subscriptions and pending requests in ' + + 'componentWillUnmount to prevent memory leaks.', + ], + replaceState: [ + 'replaceState', + 'Refactor your code to use setState instead (see ' + + 'https://github.com/facebook/react/issues/3236).', + ], + }; + + var defineDeprecationWarning = function (methodName, info) { + Object.defineProperty(Component.prototype, methodName, { + get: function () { + lowPriorityWarningWithoutStack$1( + false, + '%s(...) is deprecated in plain JavaScript React classes. %s', + info[0], + info[1], + ); + return undefined; + }, + }); + }; + + for (var fnName in deprecatedAPIs) { + if (deprecatedAPIs.hasOwnProperty(fnName)) { + defineDeprecationWarning(fnName, deprecatedAPIs[fnName]); + } + } + } + + function ComponentDummy() {} + + ComponentDummy.prototype = Component.prototype; + /** + * Convenience component with default shallow equality check for sCU. + */ + + function PureComponent(props, context, updater) { + this.props = props; + this.context = context; // If a component has string refs, we will assign a different object later. + + this.refs = emptyObject; + this.updater = updater || ReactNoopUpdateQueue; + } + + var pureComponentPrototype = (PureComponent.prototype = new ComponentDummy()); + pureComponentPrototype.constructor = PureComponent; // Avoid an extra prototype jump for these methods. + + _assign(pureComponentPrototype, Component.prototype); + + pureComponentPrototype.isPureReactComponent = true; + + // an immutable object with a single mutable value + function createRef() { + var refObject = { + current: null, + }; + + { + Object.seal(refObject); + } + + return refObject; + } + + /** + * Keeps track of the current dispatcher. + */ + var ReactCurrentDispatcher = { + /** + * @internal + * @type {ReactComponent} + */ + current: null, + }; + + /** + * Keeps track of the current batch's configuration such as how long an update + * should suspend for if it needs to. + */ + var ReactCurrentBatchConfig = { + suspense: null, + }; + + /** + * Keeps track of the current owner. + * + * The current owner is the component who should own any components that are + * currently being constructed. + */ + var ReactCurrentOwner = { + /** + * @internal + * @type {ReactComponent} + */ + current: null, + }; + + var BEFORE_SLASH_RE = /^(.*)[\\\/]/; + var describeComponentFrame = function (name, source, ownerName) { + var sourceInfo = ''; + + if (source) { + var path = source.fileName; + var fileName = path.replace(BEFORE_SLASH_RE, ''); + + { + // In DEV, include code for a common special case: + // prefer "folder/index.js" instead of just "index.js". + if (/^index\./.test(fileName)) { + var match = path.match(BEFORE_SLASH_RE); + + if (match) { + var pathBeforeSlash = match[1]; + + if (pathBeforeSlash) { + var folderName = pathBeforeSlash.replace(BEFORE_SLASH_RE, ''); + fileName = folderName + '/' + fileName; + } + } + } + } + + sourceInfo = ' (at ' + fileName + ':' + source.lineNumber + ')'; + } else if (ownerName) { + sourceInfo = ' (created by ' + ownerName + ')'; + } + + return '\n in ' + (name || 'Unknown') + sourceInfo; + }; + + var Resolved = 1; + + function refineResolvedLazyComponent(lazyComponent) { + return lazyComponent._status === Resolved ? lazyComponent._result : null; + } + + function getWrappedName(outerType, innerType, wrapperName) { + var functionName = innerType.displayName || innerType.name || ''; + return ( + outerType.displayName || + (functionName !== '' ? wrapperName + '(' + functionName + ')' : wrapperName) + ); + } + + function getComponentName(type) { + if (type == null) { + // Host root, text node or just invalid type. + return null; + } + + { + if (typeof type.tag === 'number') { + warningWithoutStack$1( + false, + 'Received an unexpected object in getComponentName(). ' + + 'This is likely a bug in React. Please file an issue.', + ); + } + } + + if (typeof type === 'function') { + return type.displayName || type.name || null; + } + + if (typeof type === 'string') { + return type; + } + + switch (type) { + case REACT_FRAGMENT_TYPE: + return 'Fragment'; + + case REACT_PORTAL_TYPE: + return 'Portal'; + + case REACT_PROFILER_TYPE: + return 'Profiler'; + + case REACT_STRICT_MODE_TYPE: + return 'StrictMode'; + + case REACT_SUSPENSE_TYPE: + return 'Suspense'; + + case REACT_SUSPENSE_LIST_TYPE: + return 'SuspenseList'; + } + + if (typeof type === 'object') { + switch (type.$$typeof) { + case REACT_CONTEXT_TYPE: + return 'Context.Consumer'; + + case REACT_PROVIDER_TYPE: + return 'Context.Provider'; + + case REACT_FORWARD_REF_TYPE: + return getWrappedName(type, type.render, 'ForwardRef'); + + case REACT_MEMO_TYPE: + return getComponentName(type.type); + + case REACT_LAZY_TYPE: { + var thenable = type; + var resolvedThenable = refineResolvedLazyComponent(thenable); + + if (resolvedThenable) { + return getComponentName(resolvedThenable); + } + + break; + } + } + } + + return null; + } + + var ReactDebugCurrentFrame = {}; + var currentlyValidatingElement = null; + function setCurrentlyValidatingElement(element) { + { + currentlyValidatingElement = element; + } + } + + { + // Stack implementation injected by the current renderer. + ReactDebugCurrentFrame.getCurrentStack = null; + + ReactDebugCurrentFrame.getStackAddendum = function () { + var stack = ''; // Add an extra top frame while an element is being validated + + if (currentlyValidatingElement) { + var name = getComponentName(currentlyValidatingElement.type); + var owner = currentlyValidatingElement._owner; + stack += describeComponentFrame( + name, + currentlyValidatingElement._source, + owner && getComponentName(owner.type), + ); + } // Delegate to the injected renderer-specific implementation + + var impl = ReactDebugCurrentFrame.getCurrentStack; + + if (impl) { + stack += impl() || ''; + } + + return stack; + }; + } + + /** + * Used by act() to track whether you're inside an act() scope. + */ + var IsSomeRendererActing = { + current: false, + }; + + var ReactSharedInternals = { + ReactCurrentDispatcher: ReactCurrentDispatcher, + ReactCurrentBatchConfig: ReactCurrentBatchConfig, + ReactCurrentOwner: ReactCurrentOwner, + IsSomeRendererActing: IsSomeRendererActing, + // Used by renderers to avoid bundling object-assign twice in UMD bundles: + assign: _assign, + }; + + { + _assign(ReactSharedInternals, { + // These should not be included in production. + ReactDebugCurrentFrame: ReactDebugCurrentFrame, + // Shim for React DOM 16.0.0 which still destructured (but not used) this. + // TODO: remove in React 17.0. + ReactComponentTreeHook: {}, + }); + } + + /** + * Similar to invariant but only logs a warning if the condition is not met. + * This can be used to log issues in development environments in critical + * paths. Removing the logging code for production environments will keep the + * same logic and follow the same code paths. + */ + + var warning = warningWithoutStack$1; + + { + warning = function (condition, format) { + if (condition) { + return; + } + + var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; + var stack = ReactDebugCurrentFrame.getStackAddendum(); // eslint-disable-next-line react-internal/warning-and-invariant-args + + for ( + var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; + _key < _len; + _key++ + ) { + args[_key - 2] = arguments[_key]; + } + + warningWithoutStack$1.apply(void 0, [false, format + '%s'].concat(args, [stack])); + }; + } + + var warning$1 = warning; + + var hasOwnProperty = Object.prototype.hasOwnProperty; + var RESERVED_PROPS = { + key: true, + ref: true, + __self: true, + __source: true, + }; + var specialPropKeyWarningShown; + var specialPropRefWarningShown; + + function hasValidRef(config) { + { + if (hasOwnProperty.call(config, 'ref')) { + var getter = Object.getOwnPropertyDescriptor(config, 'ref').get; + + if (getter && getter.isReactWarning) { + return false; + } + } + } + + return config.ref !== undefined; + } + + function hasValidKey(config) { + { + if (hasOwnProperty.call(config, 'key')) { + var getter = Object.getOwnPropertyDescriptor(config, 'key').get; + + if (getter && getter.isReactWarning) { + return false; + } + } + } + + return config.key !== undefined; + } + + function defineKeyPropWarningGetter(props, displayName) { + var warnAboutAccessingKey = function () { + if (!specialPropKeyWarningShown) { + specialPropKeyWarningShown = true; + warningWithoutStack$1( + false, + '%s: `key` is not a prop. Trying to access it will result ' + + 'in `undefined` being returned. If you need to access the same ' + + 'value within the child component, you should pass it as a different ' + + 'prop. (https://fb.me/react-special-props)', + displayName, + ); + } + }; + + warnAboutAccessingKey.isReactWarning = true; + Object.defineProperty(props, 'key', { + get: warnAboutAccessingKey, + configurable: true, + }); + } + + function defineRefPropWarningGetter(props, displayName) { + var warnAboutAccessingRef = function () { + if (!specialPropRefWarningShown) { + specialPropRefWarningShown = true; + warningWithoutStack$1( + false, + '%s: `ref` is not a prop. Trying to access it will result ' + + 'in `undefined` being returned. If you need to access the same ' + + 'value within the child component, you should pass it as a different ' + + 'prop. (https://fb.me/react-special-props)', + displayName, + ); + } + }; + + warnAboutAccessingRef.isReactWarning = true; + Object.defineProperty(props, 'ref', { + get: warnAboutAccessingRef, + configurable: true, + }); + } + /** + * Factory method to create a new React element. This no longer adheres to + * the class pattern, so do not use new to call it. Also, instanceof check + * will not work. Instead test $$typeof field against Symbol.for('react.element') to check + * if something is a React Element. + * + * @param {*} type + * @param {*} props + * @param {*} key + * @param {string|object} ref + * @param {*} owner + * @param {*} self A *temporary* helper to detect places where `this` is + * different from the `owner` when React.createElement is called, so that we + * can warn. We want to get rid of owner and replace string `ref`s with arrow + * functions, and as long as `this` and owner are the same, there will be no + * change in behavior. + * @param {*} source An annotation object (added by a transpiler or otherwise) + * indicating filename, line number, and/or other information. + * @internal + */ + + var ReactElement = function (type, key, ref, self, source, owner, props) { + var element = { + // This tag allows us to uniquely identify this as a React Element + $$typeof: REACT_ELEMENT_TYPE, + // Built-in properties that belong on the element + type: type, + key: key, + ref: ref, + props: props, + // Record the component responsible for creating this element. + _owner: owner, + }; + + { + // The validation flag is currently mutative. We put it on + // an external backing store so that we can freeze the whole object. + // This can be replaced with a WeakMap once they are implemented in + // commonly used development environments. + element._store = {}; // To make comparing ReactElements easier for testing purposes, we make + // the validation flag non-enumerable (where possible, which should + // include every environment we run tests in), so the test framework + // ignores it. + + Object.defineProperty(element._store, 'validated', { + configurable: false, + enumerable: false, + writable: true, + value: false, + }); // self and source are DEV only properties. + + Object.defineProperty(element, '_self', { + configurable: false, + enumerable: false, + writable: false, + value: self, + }); // Two elements created in two different places should be considered + // equal for testing purposes and therefore we hide it from enumeration. + + Object.defineProperty(element, '_source', { + configurable: false, + enumerable: false, + writable: false, + value: source, + }); + + if (Object.freeze) { + Object.freeze(element.props); + Object.freeze(element); + } + } + + return element; + }; + /** + * https://github.com/reactjs/rfcs/pull/107 + * @param {*} type + * @param {object} props + * @param {string} key + */ + + /** + * https://github.com/reactjs/rfcs/pull/107 + * @param {*} type + * @param {object} props + * @param {string} key + */ + + function jsxDEV(type, config, maybeKey, source, self) { + var propName; // Reserved names are extracted + + var props = {}; + var key = null; + var ref = null; // Currently, key can be spread in as a prop. This causes a potential + // issue if key is also explicitly declared (ie. <div {...props} key="Hi" /> + // or <div key="Hi" {...props} /> ). We want to deprecate key spread, + // but as an intermediary step, we will use jsxDEV for everything except + // <div {...props} key="Hi" />, because we aren't currently able to tell if + // key is explicitly declared to be undefined or not. + + if (maybeKey !== undefined) { + key = '' + maybeKey; + } + + if (hasValidKey(config)) { + key = '' + config.key; + } + + if (hasValidRef(config)) { + ref = config.ref; + } // Remaining properties are added to a new props object + + for (propName in config) { + if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { + props[propName] = config[propName]; + } + } // Resolve default props + + if (type && type.defaultProps) { + var defaultProps = type.defaultProps; + + for (propName in defaultProps) { + if (props[propName] === undefined) { + props[propName] = defaultProps[propName]; + } + } + } + + if (key || ref) { + var displayName = + typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type; + + if (key) { + defineKeyPropWarningGetter(props, displayName); + } + + if (ref) { + defineRefPropWarningGetter(props, displayName); + } + } + + return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props); + } + /** + * Create and return a new ReactElement of the given type. + * See https://reactjs.org/docs/react-api.html#createelement + */ + + function createElement(type, config, children) { + var propName; // Reserved names are extracted + + var props = {}; + var key = null; + var ref = null; + var self = null; + var source = null; + + if (config != null) { + if (hasValidRef(config)) { + ref = config.ref; + } + + if (hasValidKey(config)) { + key = '' + config.key; + } + + self = config.__self === undefined ? null : config.__self; + source = config.__source === undefined ? null : config.__source; // Remaining properties are added to a new props object + + for (propName in config) { + if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { + props[propName] = config[propName]; + } + } + } // Children can be more than one argument, and those are transferred onto + // the newly allocated props object. + + var childrenLength = arguments.length - 2; + + if (childrenLength === 1) { + props.children = children; + } else if (childrenLength > 1) { + var childArray = Array(childrenLength); + + for (var i = 0; i < childrenLength; i++) { + childArray[i] = arguments[i + 2]; + } + + { + if (Object.freeze) { + Object.freeze(childArray); + } + } + + props.children = childArray; + } // Resolve default props + + if (type && type.defaultProps) { + var defaultProps = type.defaultProps; + + for (propName in defaultProps) { + if (props[propName] === undefined) { + props[propName] = defaultProps[propName]; + } + } + } + + { + if (key || ref) { + var displayName = + typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type; + + if (key) { + defineKeyPropWarningGetter(props, displayName); + } + + if (ref) { + defineRefPropWarningGetter(props, displayName); + } + } + } + + return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props); + } + /** + * Return a function that produces ReactElements of a given type. + * See https://reactjs.org/docs/react-api.html#createfactory + */ + + function cloneAndReplaceKey(oldElement, newKey) { + var newElement = ReactElement( + oldElement.type, + newKey, + oldElement.ref, + oldElement._self, + oldElement._source, + oldElement._owner, + oldElement.props, + ); + return newElement; + } + /** + * Clone and return a new ReactElement using element as the starting point. + * See https://reactjs.org/docs/react-api.html#cloneelement + */ + + function cloneElement(element, config, children) { + if (!!(element === null || element === undefined)) { + { + throw Error( + 'React.cloneElement(...): The argument must be a React element, but you passed ' + + element + + '.', + ); + } + } + + var propName; // Original props are copied + + var props = _assign({}, element.props); // Reserved names are extracted + + var key = element.key; + var ref = element.ref; // Self is preserved since the owner is preserved. + + var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a + // transpiler, and the original source is probably a better indicator of the + // true owner. + + var source = element._source; // Owner will be preserved, unless ref is overridden + + var owner = element._owner; + + if (config != null) { + if (hasValidRef(config)) { + // Silently steal the ref from the parent. + ref = config.ref; + owner = ReactCurrentOwner.current; + } + + if (hasValidKey(config)) { + key = '' + config.key; + } // Remaining properties override existing props + + var defaultProps; + + if (element.type && element.type.defaultProps) { + defaultProps = element.type.defaultProps; + } + + for (propName in config) { + if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { + if (config[propName] === undefined && defaultProps !== undefined) { + // Resolve default props + props[propName] = defaultProps[propName]; + } else { + props[propName] = config[propName]; + } + } + } + } // Children can be more than one argument, and those are transferred onto + // the newly allocated props object. + + var childrenLength = arguments.length - 2; + + if (childrenLength === 1) { + props.children = children; + } else if (childrenLength > 1) { + var childArray = Array(childrenLength); + + for (var i = 0; i < childrenLength; i++) { + childArray[i] = arguments[i + 2]; + } + + props.children = childArray; + } + + return ReactElement(element.type, key, ref, self, source, owner, props); + } + /** + * Verifies the object is a ReactElement. + * See https://reactjs.org/docs/react-api.html#isvalidelement + * @param {?object} object + * @return {boolean} True if `object` is a ReactElement. + * @final + */ + + function isValidElement(object) { + return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; + } + + var SEPARATOR = '.'; + var SUBSEPARATOR = ':'; + /** + * Escape and wrap key so it is safe to use as a reactid + * + * @param {string} key to be escaped. + * @return {string} the escaped key. + */ + + function escape(key) { + var escapeRegex = /[=:]/g; + var escaperLookup = { + '=': '=0', + ':': '=2', + }; + var escapedString = ('' + key).replace(escapeRegex, function (match) { + return escaperLookup[match]; + }); + return '$' + escapedString; + } + /** + * TODO: Test that a single child and an array with one item have the same key + * pattern. + */ + + var didWarnAboutMaps = false; + var userProvidedKeyEscapeRegex = /\/+/g; + + function escapeUserProvidedKey(text) { + return ('' + text).replace(userProvidedKeyEscapeRegex, '$&/'); + } + + var POOL_SIZE = 10; + var traverseContextPool = []; + + function getPooledTraverseContext(mapResult, keyPrefix, mapFunction, mapContext) { + if (traverseContextPool.length) { + var traverseContext = traverseContextPool.pop(); + traverseContext.result = mapResult; + traverseContext.keyPrefix = keyPrefix; + traverseContext.func = mapFunction; + traverseContext.context = mapContext; + traverseContext.count = 0; + return traverseContext; + } else { + return { + result: mapResult, + keyPrefix: keyPrefix, + func: mapFunction, + context: mapContext, + count: 0, + }; + } + } + + function releaseTraverseContext(traverseContext) { + traverseContext.result = null; + traverseContext.keyPrefix = null; + traverseContext.func = null; + traverseContext.context = null; + traverseContext.count = 0; + + if (traverseContextPool.length < POOL_SIZE) { + traverseContextPool.push(traverseContext); + } + } + /** + * @param {?*} children Children tree container. + * @param {!string} nameSoFar Name of the key path so far. + * @param {!function} callback Callback to invoke with each child found. + * @param {?*} traverseContext Used to pass information throughout the traversal + * process. + * @return {!number} The number of children in this subtree. + */ + + function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) { + var type = typeof children; + + if (type === 'undefined' || type === 'boolean') { + // All of the above are perceived as null. + children = null; + } + + var invokeCallback = false; + + if (children === null) { + invokeCallback = true; + } else { + switch (type) { + case 'string': + case 'number': + invokeCallback = true; + break; + + case 'object': + switch (children.$$typeof) { + case REACT_ELEMENT_TYPE: + case REACT_PORTAL_TYPE: + invokeCallback = true; + } + } + } + + if (invokeCallback) { + callback( + traverseContext, + children, // If it's the only child, treat the name as if it was wrapped in an array + // so that it's consistent if the number of children grows. + nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar, + ); + return 1; + } + + var child; + var nextName; + var subtreeCount = 0; // Count of children found in the current subtree. + + var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR; + + if (Array.isArray(children)) { + for (var i = 0; i < children.length; i++) { + child = children[i]; + nextName = nextNamePrefix + getComponentKey(child, i); + subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext); + } + } else { + var iteratorFn = getIteratorFn(children); + + if (typeof iteratorFn === 'function') { + { + // Warn about using Maps as children + if (iteratorFn === children.entries) { + !didWarnAboutMaps + ? warning$1( + false, + 'Using Maps as children is unsupported and will likely yield ' + + 'unexpected results. Convert it to a sequence/iterable of keyed ' + + 'ReactElements instead.', + ) + : void 0; + didWarnAboutMaps = true; + } + } + + var iterator = iteratorFn.call(children); + var step; + var ii = 0; + + while (!(step = iterator.next()).done) { + child = step.value; + nextName = nextNamePrefix + getComponentKey(child, ii++); + subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext); + } + } else if (type === 'object') { + var addendum = ''; + + { + addendum = + ' If you meant to render a collection of children, use an array ' + + 'instead.' + + ReactDebugCurrentFrame.getStackAddendum(); + } + + var childrenString = '' + children; + + { + { + throw Error( + 'Objects are not valid as a React child (found: ' + + (childrenString === '[object Object]' + ? 'object with keys {' + Object.keys(children).join(', ') + '}' + : childrenString) + + ').' + + addendum, + ); + } + } + } + } + + return subtreeCount; + } + /** + * Traverses children that are typically specified as `props.children`, but + * might also be specified through attributes: + * + * - `traverseAllChildren(this.props.children, ...)` + * - `traverseAllChildren(this.props.leftPanelChildren, ...)` + * + * The `traverseContext` is an optional argument that is passed through the + * entire traversal. It can be used to store accumulations or anything else that + * the callback might find relevant. + * + * @param {?*} children Children tree object. + * @param {!function} callback To invoke upon traversing each child. + * @param {?*} traverseContext Context for traversal. + * @return {!number} The number of children in this subtree. + */ + + function traverseAllChildren(children, callback, traverseContext) { + if (children == null) { + return 0; + } + + return traverseAllChildrenImpl(children, '', callback, traverseContext); + } + /** + * Generate a key string that identifies a component within a set. + * + * @param {*} component A component that could contain a manual key. + * @param {number} index Index that is used if a manual key is not provided. + * @return {string} + */ + + function getComponentKey(component, index) { + // Do some typechecking here since we call this blindly. We want to ensure + // that we don't block potential future ES APIs. + if (typeof component === 'object' && component !== null && component.key != null) { + // Explicit key + return escape(component.key); + } // Implicit key determined by the index in the set + + return index.toString(36); + } + + function forEachSingleChild(bookKeeping, child, name) { + var func = bookKeeping.func, + context = bookKeeping.context; + func.call(context, child, bookKeeping.count++); + } + /** + * Iterates through children that are typically specified as `props.children`. + * + * See https://reactjs.org/docs/react-api.html#reactchildrenforeach + * + * The provided forEachFunc(child, index) will be called for each + * leaf child. + * + * @param {?*} children Children tree container. + * @param {function(*, int)} forEachFunc + * @param {*} forEachContext Context for forEachContext. + */ + + function forEachChildren(children, forEachFunc, forEachContext) { + if (children == null) { + return children; + } + + var traverseContext = getPooledTraverseContext(null, null, forEachFunc, forEachContext); + traverseAllChildren(children, forEachSingleChild, traverseContext); + releaseTraverseContext(traverseContext); + } + + function mapSingleChildIntoContext(bookKeeping, child, childKey) { + var result = bookKeeping.result, + keyPrefix = bookKeeping.keyPrefix, + func = bookKeeping.func, + context = bookKeeping.context; + var mappedChild = func.call(context, child, bookKeeping.count++); + + if (Array.isArray(mappedChild)) { + mapIntoWithKeyPrefixInternal(mappedChild, result, childKey, function (c) { + return c; + }); + } else if (mappedChild != null) { + if (isValidElement(mappedChild)) { + mappedChild = cloneAndReplaceKey( + mappedChild, // Keep both the (mapped) and old keys if they differ, just as + // traverseAllChildren used to do for objects as children + keyPrefix + + (mappedChild.key && (!child || child.key !== mappedChild.key) + ? escapeUserProvidedKey(mappedChild.key) + '/' + : '') + + childKey, + ); + } + + result.push(mappedChild); + } + } + + function mapIntoWithKeyPrefixInternal(children, array, prefix, func, context) { + var escapedPrefix = ''; + + if (prefix != null) { + escapedPrefix = escapeUserProvidedKey(prefix) + '/'; + } + + var traverseContext = getPooledTraverseContext(array, escapedPrefix, func, context); + traverseAllChildren(children, mapSingleChildIntoContext, traverseContext); + releaseTraverseContext(traverseContext); + } + /** + * Maps children that are typically specified as `props.children`. + * + * See https://reactjs.org/docs/react-api.html#reactchildrenmap + * + * The provided mapFunction(child, key, index) will be called for each + * leaf child. + * + * @param {?*} children Children tree container. + * @param {function(*, int)} func The map function. + * @param {*} context Context for mapFunction. + * @return {object} Object containing the ordered map of results. + */ + + function mapChildren(children, func, context) { + if (children == null) { + return children; + } + + var result = []; + mapIntoWithKeyPrefixInternal(children, result, null, func, context); + return result; + } + /** + * Count the number of children that are typically specified as + * `props.children`. + * + * See https://reactjs.org/docs/react-api.html#reactchildrencount + * + * @param {?*} children Children tree container. + * @return {number} The number of children. + */ + + function countChildren(children) { + return traverseAllChildren( + children, + function () { + return null; + }, + null, + ); + } + /** + * Flatten a children object (typically specified as `props.children`) and + * return an array with appropriately re-keyed children. + * + * See https://reactjs.org/docs/react-api.html#reactchildrentoarray + */ + + function toArray(children) { + var result = []; + mapIntoWithKeyPrefixInternal(children, result, null, function (child) { + return child; + }); + return result; + } + /** + * Returns the first child in a collection of children and verifies that there + * is only one child in the collection. + * + * See https://reactjs.org/docs/react-api.html#reactchildrenonly + * + * The current implementation of this function assumes that a single child gets + * passed without a wrapper, but the purpose of this helper function is to + * abstract away the particular structure of children. + * + * @param {?object} children Child collection structure. + * @return {ReactElement} The first and only `ReactElement` contained in the + * structure. + */ + + function onlyChild(children) { + if (!isValidElement(children)) { + { + throw Error('React.Children.only expected to receive a single React element child.'); + } + } + + return children; + } + + function createContext(defaultValue, calculateChangedBits) { + if (calculateChangedBits === undefined) { + calculateChangedBits = null; + } else { + { + !(calculateChangedBits === null || typeof calculateChangedBits === 'function') + ? warningWithoutStack$1( + false, + 'createContext: Expected the optional second argument to be a ' + + 'function. Instead received: %s', + calculateChangedBits, + ) + : void 0; + } + } + + var context = { + $$typeof: REACT_CONTEXT_TYPE, + _calculateChangedBits: calculateChangedBits, + // As a workaround to support multiple concurrent renderers, we categorize + // some renderers as primary and others as secondary. We only expect + // there to be two concurrent renderers at most: React Native (primary) and + // Fabric (secondary); React DOM (primary) and React ART (secondary). + // Secondary renderers store their context values on separate fields. + _currentValue: defaultValue, + _currentValue2: defaultValue, + // Used to track how many concurrent renderers this context currently + // supports within in a single renderer. Such as parallel server rendering. + _threadCount: 0, + // These are circular + Provider: null, + Consumer: null, + }; + context.Provider = { + $$typeof: REACT_PROVIDER_TYPE, + _context: context, + }; + var hasWarnedAboutUsingNestedContextConsumers = false; + var hasWarnedAboutUsingConsumerProvider = false; + + { + // A separate object, but proxies back to the original context object for + // backwards compatibility. It has a different $$typeof, so we can properly + // warn for the incorrect usage of Context as a Consumer. + var Consumer = { + $$typeof: REACT_CONTEXT_TYPE, + _context: context, + _calculateChangedBits: context._calculateChangedBits, + }; // $FlowFixMe: Flow complains about not setting a value, which is intentional here + + Object.defineProperties(Consumer, { + Provider: { + get: function () { + if (!hasWarnedAboutUsingConsumerProvider) { + hasWarnedAboutUsingConsumerProvider = true; + warning$1( + false, + 'Rendering <Context.Consumer.Provider> is not supported and will be removed in ' + + 'a future major release. Did you mean to render <Context.Provider> instead?', + ); + } + + return context.Provider; + }, + set: function (_Provider) { + context.Provider = _Provider; + }, + }, + _currentValue: { + get: function () { + return context._currentValue; + }, + set: function (_currentValue) { + context._currentValue = _currentValue; + }, + }, + _currentValue2: { + get: function () { + return context._currentValue2; + }, + set: function (_currentValue2) { + context._currentValue2 = _currentValue2; + }, + }, + _threadCount: { + get: function () { + return context._threadCount; + }, + set: function (_threadCount) { + context._threadCount = _threadCount; + }, + }, + Consumer: { + get: function () { + if (!hasWarnedAboutUsingNestedContextConsumers) { + hasWarnedAboutUsingNestedContextConsumers = true; + warning$1( + false, + 'Rendering <Context.Consumer.Consumer> is not supported and will be removed in ' + + 'a future major release. Did you mean to render <Context.Consumer> instead?', + ); + } + + return context.Consumer; + }, + }, + }); // $FlowFixMe: Flow complains about missing properties because it doesn't understand defineProperty + + context.Consumer = Consumer; + } + + { + context._currentRenderer = null; + context._currentRenderer2 = null; + } + + return context; + } + + function lazy(ctor) { + var lazyType = { + $$typeof: REACT_LAZY_TYPE, + _ctor: ctor, + // React uses these fields to store the result. + _status: -1, + _result: null, + }; + + { + // In production, this would just set it on the object. + var defaultProps; + var propTypes; + Object.defineProperties(lazyType, { + defaultProps: { + configurable: true, + get: function () { + return defaultProps; + }, + set: function (newDefaultProps) { + warning$1( + false, + 'React.lazy(...): It is not supported to assign `defaultProps` to ' + + 'a lazy component import. Either specify them where the component ' + + 'is defined, or create a wrapping component around it.', + ); + defaultProps = newDefaultProps; // Match production behavior more closely: + + Object.defineProperty(lazyType, 'defaultProps', { + enumerable: true, + }); + }, + }, + propTypes: { + configurable: true, + get: function () { + return propTypes; + }, + set: function (newPropTypes) { + warning$1( + false, + 'React.lazy(...): It is not supported to assign `propTypes` to ' + + 'a lazy component import. Either specify them where the component ' + + 'is defined, or create a wrapping component around it.', + ); + propTypes = newPropTypes; // Match production behavior more closely: + + Object.defineProperty(lazyType, 'propTypes', { + enumerable: true, + }); + }, + }, + }); + } + + return lazyType; + } + + function forwardRef(render) { + { + if (render != null && render.$$typeof === REACT_MEMO_TYPE) { + warningWithoutStack$1( + false, + 'forwardRef requires a render function but received a `memo` ' + + 'component. Instead of forwardRef(memo(...)), use ' + + 'memo(forwardRef(...)).', + ); + } else if (typeof render !== 'function') { + warningWithoutStack$1( + false, + 'forwardRef requires a render function but was given %s.', + render === null ? 'null' : typeof render, + ); + } else { + !( + // Do not warn for 0 arguments because it could be due to usage of the 'arguments' object + (render.length === 0 || render.length === 2) + ) + ? warningWithoutStack$1( + false, + 'forwardRef render functions accept exactly two parameters: props and ref. %s', + render.length === 1 + ? 'Did you forget to use the ref parameter?' + : 'Any additional parameter will be undefined.', + ) + : void 0; + } + + if (render != null) { + !(render.defaultProps == null && render.propTypes == null) + ? warningWithoutStack$1( + false, + 'forwardRef render functions do not support propTypes or defaultProps. ' + + 'Did you accidentally pass a React component?', + ) + : void 0; + } + } + + return { + $$typeof: REACT_FORWARD_REF_TYPE, + render: render, + }; + } + + function isValidElementType(type) { + return ( + typeof type === 'string' || + typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill. + type === REACT_FRAGMENT_TYPE || + type === REACT_CONCURRENT_MODE_TYPE || + type === REACT_PROFILER_TYPE || + type === REACT_STRICT_MODE_TYPE || + type === REACT_SUSPENSE_TYPE || + type === REACT_SUSPENSE_LIST_TYPE || + (typeof type === 'object' && + type !== null && + (type.$$typeof === REACT_LAZY_TYPE || + type.$$typeof === REACT_MEMO_TYPE || + type.$$typeof === REACT_PROVIDER_TYPE || + type.$$typeof === REACT_CONTEXT_TYPE || + type.$$typeof === REACT_FORWARD_REF_TYPE || + type.$$typeof === REACT_FUNDAMENTAL_TYPE || + type.$$typeof === REACT_RESPONDER_TYPE || + type.$$typeof === REACT_SCOPE_TYPE)) + ); + } + + function memo(type, compare) { + { + if (!isValidElementType(type)) { + warningWithoutStack$1( + false, + 'memo: The first argument must be a component. Instead ' + 'received: %s', + type === null ? 'null' : typeof type, + ); + } + } + + return { + $$typeof: REACT_MEMO_TYPE, + type: type, + compare: compare === undefined ? null : compare, + }; + } + + function resolveDispatcher() { + var dispatcher = ReactCurrentDispatcher.current; + + if (!(dispatcher !== null)) { + { + throw Error( + 'Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.', + ); + } + } + + return dispatcher; + } + + function useContext(Context, unstable_observedBits) { + var dispatcher = resolveDispatcher(); + + { + !(unstable_observedBits === undefined) + ? warning$1( + false, + 'useContext() second argument is reserved for future ' + + 'use in React. Passing it is not supported. ' + + 'You passed: %s.%s', + unstable_observedBits, + typeof unstable_observedBits === 'number' && Array.isArray(arguments[2]) + ? '\n\nDid you call array.map(useContext)? ' + + 'Calling Hooks inside a loop is not supported. ' + + 'Learn more at https://fb.me/rules-of-hooks' + : '', + ) + : void 0; // TODO: add a more generic warning for invalid values. + + if (Context._context !== undefined) { + var realContext = Context._context; // Don't deduplicate because this legitimately causes bugs + // and nobody should be using this in existing code. + + if (realContext.Consumer === Context) { + warning$1( + false, + 'Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be ' + + 'removed in a future major release. Did you mean to call useContext(Context) instead?', + ); + } else if (realContext.Provider === Context) { + warning$1( + false, + 'Calling useContext(Context.Provider) is not supported. ' + + 'Did you mean to call useContext(Context) instead?', + ); + } + } + } + + return dispatcher.useContext(Context, unstable_observedBits); + } + function useState(initialState) { + var dispatcher = resolveDispatcher(); + return dispatcher.useState(initialState); + } + function useReducer(reducer, initialArg, init) { + var dispatcher = resolveDispatcher(); + return dispatcher.useReducer(reducer, initialArg, init); + } + function useRef(initialValue) { + var dispatcher = resolveDispatcher(); + return dispatcher.useRef(initialValue); + } + function useEffect(create, inputs) { + var dispatcher = resolveDispatcher(); + return dispatcher.useEffect(create, inputs); + } + function useLayoutEffect(create, inputs) { + var dispatcher = resolveDispatcher(); + return dispatcher.useLayoutEffect(create, inputs); + } + function useCallback(callback, inputs) { + var dispatcher = resolveDispatcher(); + return dispatcher.useCallback(callback, inputs); + } + function useMemo(create, inputs) { + var dispatcher = resolveDispatcher(); + return dispatcher.useMemo(create, inputs); + } + function useImperativeHandle(ref, create, inputs) { + var dispatcher = resolveDispatcher(); + return dispatcher.useImperativeHandle(ref, create, inputs); + } + function useDebugValue(value, formatterFn) { + { + var dispatcher = resolveDispatcher(); + return dispatcher.useDebugValue(value, formatterFn); + } + } + var emptyObject$1 = {}; + function useResponder(responder, listenerProps) { + var dispatcher = resolveDispatcher(); + + { + if (responder == null || responder.$$typeof !== REACT_RESPONDER_TYPE) { + warning$1( + false, + 'useResponder: invalid first argument. Expected an event responder, but instead got %s', + responder, + ); + return; + } + } + + return dispatcher.useResponder(responder, listenerProps || emptyObject$1); + } + function useTransition(config) { + var dispatcher = resolveDispatcher(); + return dispatcher.useTransition(config); + } + function useDeferredValue(value, config) { + var dispatcher = resolveDispatcher(); + return dispatcher.useDeferredValue(value, config); + } + + function withSuspenseConfig(scope, config) { + var previousConfig = ReactCurrentBatchConfig.suspense; + ReactCurrentBatchConfig.suspense = config === undefined ? null : config; + + try { + scope(); + } finally { + ReactCurrentBatchConfig.suspense = previousConfig; + } + } + + /** + * ReactElementValidator provides a wrapper around a element factory + * which validates the props passed to the element. This is intended to be + * used only in DEV and could be replaced by a static type checker for languages + * that support it. + */ + var propTypesMisspellWarningShown; + + { + propTypesMisspellWarningShown = false; + } + + var hasOwnProperty$1 = Object.prototype.hasOwnProperty; + + function getDeclarationErrorAddendum() { + if (ReactCurrentOwner.current) { + var name = getComponentName(ReactCurrentOwner.current.type); + + if (name) { + return '\n\nCheck the render method of `' + name + '`.'; + } + } + + return ''; + } + + function getSourceInfoErrorAddendum(source) { + if (source !== undefined) { + var fileName = source.fileName.replace(/^.*[\\\/]/, ''); + var lineNumber = source.lineNumber; + return '\n\nCheck your code at ' + fileName + ':' + lineNumber + '.'; + } + + return ''; + } + + function getSourceInfoErrorAddendumForProps(elementProps) { + if (elementProps !== null && elementProps !== undefined) { + return getSourceInfoErrorAddendum(elementProps.__source); + } + + return ''; + } + /** + * Warn if there's no key explicitly set on dynamic arrays of children or + * object keys are not valid. This allows us to keep track of children between + * updates. + */ + + var ownerHasKeyUseWarning = {}; + + function getCurrentComponentErrorInfo(parentType) { + var info = getDeclarationErrorAddendum(); + + if (!info) { + var parentName = + typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name; + + if (parentName) { + info = '\n\nCheck the top-level render call using <' + parentName + '>.'; + } + } + + return info; + } + /** + * Warn if the element doesn't have an explicit key assigned to it. + * This element is in an array. The array could grow and shrink or be + * reordered. All children that haven't already been validated are required to + * have a "key" property assigned to it. Error statuses are cached so a warning + * will only be shown once. + * + * @internal + * @param {ReactElement} element Element that requires a key. + * @param {*} parentType element's parent's type. + */ + + function validateExplicitKey(element, parentType) { + if (!element._store || element._store.validated || element.key != null) { + return; + } + + element._store.validated = true; + var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType); + + if (ownerHasKeyUseWarning[currentComponentErrorInfo]) { + return; + } + + ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a + // property, it may be the creator of the child that's responsible for + // assigning it a key. + + var childOwner = ''; + + if (element && element._owner && element._owner !== ReactCurrentOwner.current) { + // Give the component that originally created this child. + childOwner = ' It was passed a child from ' + getComponentName(element._owner.type) + '.'; + } + + setCurrentlyValidatingElement(element); + + { + warning$1( + false, + 'Each child in a list should have a unique "key" prop.' + + '%s%s See https://fb.me/react-warning-keys for more information.', + currentComponentErrorInfo, + childOwner, + ); + } + + setCurrentlyValidatingElement(null); + } + /** + * Ensure that every element either is passed in a static location, in an + * array with an explicit keys property defined, or in an object literal + * with valid key property. + * + * @internal + * @param {ReactNode} node Statically passed child of any type. + * @param {*} parentType node's parent's type. + */ + + function validateChildKeys(node, parentType) { + if (typeof node !== 'object') { + return; + } + + if (Array.isArray(node)) { + for (var i = 0; i < node.length; i++) { + var child = node[i]; + + if (isValidElement(child)) { + validateExplicitKey(child, parentType); + } + } + } else if (isValidElement(node)) { + // This element was passed in a valid location. + if (node._store) { + node._store.validated = true; + } + } else if (node) { + var iteratorFn = getIteratorFn(node); + + if (typeof iteratorFn === 'function') { + // Entry iterators used to provide implicit keys, + // but now we print a separate warning for them later. + if (iteratorFn !== node.entries) { + var iterator = iteratorFn.call(node); + var step; + + while (!(step = iterator.next()).done) { + if (isValidElement(step.value)) { + validateExplicitKey(step.value, parentType); + } + } + } + } + } + } + /** + * Given an element, validate that its props follow the propTypes definition, + * provided by the type. + * + * @param {ReactElement} element + */ + + function validatePropTypes(element) { + var type = element.type; + + if (type === null || type === undefined || typeof type === 'string') { + return; + } + + var name = getComponentName(type); + var propTypes; + + if (typeof type === 'function') { + propTypes = type.propTypes; + } else if ( + typeof type === 'object' && + (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here. + // Inner props are checked in the reconciler. + type.$$typeof === REACT_MEMO_TYPE) + ) { + propTypes = type.propTypes; + } else { + return; + } + + if (propTypes) { + setCurrentlyValidatingElement(element); + checkPropTypes(propTypes, element.props, 'prop', name, ReactDebugCurrentFrame.getStackAddendum); + setCurrentlyValidatingElement(null); + } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) { + propTypesMisspellWarningShown = true; + warningWithoutStack$1( + false, + 'Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', + name || 'Unknown', + ); + } + + if (typeof type.getDefaultProps === 'function') { + !type.getDefaultProps.isReactClassApproved + ? warningWithoutStack$1( + false, + 'getDefaultProps is only used on classic React.createClass ' + + 'definitions. Use a static property named `defaultProps` instead.', + ) + : void 0; + } + } + /** + * Given a fragment, validate that it can only be provided with fragment props + * @param {ReactElement} fragment + */ + + function validateFragmentProps(fragment) { + setCurrentlyValidatingElement(fragment); + var keys = Object.keys(fragment.props); + + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + + if (key !== 'children' && key !== 'key') { + warning$1( + false, + 'Invalid prop `%s` supplied to `React.Fragment`. ' + + 'React.Fragment can only have `key` and `children` props.', + key, + ); + break; + } + } + + if (fragment.ref !== null) { + warning$1(false, 'Invalid attribute `ref` supplied to `React.Fragment`.'); + } + + setCurrentlyValidatingElement(null); + } + + function jsxWithValidation(type, props, key, isStaticChildren, source, self) { + var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to + // succeed and there will likely be errors in render. + + if (!validType) { + var info = ''; + + if ( + type === undefined || + (typeof type === 'object' && type !== null && Object.keys(type).length === 0) + ) { + info += + ' You likely forgot to export your component from the file ' + + "it's defined in, or you might have mixed up default and named imports."; + } + + var sourceInfo = getSourceInfoErrorAddendum(source); + + if (sourceInfo) { + info += sourceInfo; + } else { + info += getDeclarationErrorAddendum(); + } + + var typeString; + + if (type === null) { + typeString = 'null'; + } else if (Array.isArray(type)) { + typeString = 'array'; + } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) { + typeString = '<' + (getComponentName(type.type) || 'Unknown') + ' />'; + info = ' Did you accidentally export a JSX literal instead of a component?'; + } else { + typeString = typeof type; + } + + warning$1( + false, + 'React.jsx: type is invalid -- expected a string (for ' + + 'built-in components) or a class/function (for composite ' + + 'components) but got: %s.%s', + typeString, + info, + ); + } + + var element = jsxDEV(type, props, key, source, self); // The result can be nullish if a mock or a custom function is used. + // TODO: Drop this when these are no longer allowed as the type argument. + + if (element == null) { + return element; + } // Skip key warning if the type isn't valid since our key validation logic + // doesn't expect a non-string/function type and can throw confusing errors. + // We don't want exception behavior to differ between dev and prod. + // (Rendering will throw with a helpful message and as soon as the type is + // fixed, the key warnings will appear.) + + if (validType) { + var children = props.children; + + if (children !== undefined) { + if (isStaticChildren) { + if (Array.isArray(children)) { + for (var i = 0; i < children.length; i++) { + validateChildKeys(children[i], type); + } + + if (Object.freeze) { + Object.freeze(children); + } + } else { + warning$1( + false, + 'React.jsx: Static children should always be an array. ' + + 'You are likely explicitly calling React.jsxs or React.jsxDEV. ' + + 'Use the Babel transform instead.', + ); + } + } else { + validateChildKeys(children, type); + } + } + } + + if (hasOwnProperty$1.call(props, 'key')) { + warning$1( + false, + 'React.jsx: Spreading a key to JSX is a deprecated pattern. ' + + 'Explicitly pass a key after spreading props in your JSX call. ' + + 'E.g. <ComponentName {...props} key={key} />', + ); + } + + if (type === REACT_FRAGMENT_TYPE) { + validateFragmentProps(element); + } else { + validatePropTypes(element); + } + + return element; + } // These two functions exist to still get child warnings in dev + // even with the prod transform. This means that jsxDEV is purely + // opt-in behavior for better messages but that we won't stop + // giving you warnings if you use production apis. + + function jsxWithValidationStatic(type, props, key) { + return jsxWithValidation(type, props, key, true); + } + function jsxWithValidationDynamic(type, props, key) { + return jsxWithValidation(type, props, key, false); + } + function createElementWithValidation(type, props, children) { + var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to + // succeed and there will likely be errors in render. + + if (!validType) { + var info = ''; + + if ( + type === undefined || + (typeof type === 'object' && type !== null && Object.keys(type).length === 0) + ) { + info += + ' You likely forgot to export your component from the file ' + + "it's defined in, or you might have mixed up default and named imports."; + } + + var sourceInfo = getSourceInfoErrorAddendumForProps(props); + + if (sourceInfo) { + info += sourceInfo; + } else { + info += getDeclarationErrorAddendum(); + } + + var typeString; + + if (type === null) { + typeString = 'null'; + } else if (Array.isArray(type)) { + typeString = 'array'; + } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) { + typeString = '<' + (getComponentName(type.type) || 'Unknown') + ' />'; + info = ' Did you accidentally export a JSX literal instead of a component?'; + } else { + typeString = typeof type; + } + + warning$1( + false, + 'React.createElement: type is invalid -- expected a string (for ' + + 'built-in components) or a class/function (for composite ' + + 'components) but got: %s.%s', + typeString, + info, + ); + } + + var element = createElement.apply(this, arguments); // The result can be nullish if a mock or a custom function is used. + // TODO: Drop this when these are no longer allowed as the type argument. + + if (element == null) { + return element; + } // Skip key warning if the type isn't valid since our key validation logic + // doesn't expect a non-string/function type and can throw confusing errors. + // We don't want exception behavior to differ between dev and prod. + // (Rendering will throw with a helpful message and as soon as the type is + // fixed, the key warnings will appear.) + + if (validType) { + for (var i = 2; i < arguments.length; i++) { + validateChildKeys(arguments[i], type); + } + } + + if (type === REACT_FRAGMENT_TYPE) { + validateFragmentProps(element); + } else { + validatePropTypes(element); + } + + return element; + } + function createFactoryWithValidation(type) { + var validatedFactory = createElementWithValidation.bind(null, type); + validatedFactory.type = type; // Legacy hook: remove it + + { + Object.defineProperty(validatedFactory, 'type', { + enumerable: false, + get: function () { + lowPriorityWarningWithoutStack$1( + false, + 'Factory.type is deprecated. Access the class directly ' + + 'before passing it to createFactory.', + ); + Object.defineProperty(this, 'type', { + value: type, + }); + return type; + }, + }); + } + + return validatedFactory; + } + function cloneElementWithValidation(element, props, children) { + var newElement = cloneElement.apply(this, arguments); + + for (var i = 2; i < arguments.length; i++) { + validateChildKeys(arguments[i], newElement.type); + } + + validatePropTypes(newElement); + return newElement; + } + + var hasBadMapPolyfill; + + { + hasBadMapPolyfill = false; + + try { + var frozenObject = Object.freeze({}); + var testMap = new Map([[frozenObject, null]]); + var testSet = new Set([frozenObject]); // This is necessary for Rollup to not consider these unused. + // https://github.com/rollup/rollup/issues/1771 + // TODO: we can remove these if Rollup fixes the bug. + + testMap.set(0, 0); + testSet.add(0); + } catch (e) { + // TODO: Consider warning about bad polyfills + hasBadMapPolyfill = true; + } + } + + function createFundamentalComponent(impl) { + // We use responder as a Map key later on. When we have a bad + // polyfill, then we can't use it as a key as the polyfill tries + // to add a property to the object. + if (true && !hasBadMapPolyfill) { + Object.freeze(impl); + } + + var fundamantalComponent = { + $$typeof: REACT_FUNDAMENTAL_TYPE, + impl: impl, + }; + + { + Object.freeze(fundamantalComponent); + } + + return fundamantalComponent; + } + + function createEventResponder(displayName, responderConfig) { + var getInitialState = responderConfig.getInitialState, + onEvent = responderConfig.onEvent, + onMount = responderConfig.onMount, + onUnmount = responderConfig.onUnmount, + onRootEvent = responderConfig.onRootEvent, + rootEventTypes = responderConfig.rootEventTypes, + targetEventTypes = responderConfig.targetEventTypes, + targetPortalPropagation = responderConfig.targetPortalPropagation; + var eventResponder = { + $$typeof: REACT_RESPONDER_TYPE, + displayName: displayName, + getInitialState: getInitialState || null, + onEvent: onEvent || null, + onMount: onMount || null, + onRootEvent: onRootEvent || null, + onUnmount: onUnmount || null, + rootEventTypes: rootEventTypes || null, + targetEventTypes: targetEventTypes || null, + targetPortalPropagation: targetPortalPropagation || false, + }; // We use responder as a Map key later on. When we have a bad + // polyfill, then we can't use it as a key as the polyfill tries + // to add a property to the object. + + if (true && !hasBadMapPolyfill) { + Object.freeze(eventResponder); + } + + return eventResponder; + } + + function createScope() { + var scopeComponent = { + $$typeof: REACT_SCOPE_TYPE, + }; + + { + Object.freeze(scopeComponent); + } + + return scopeComponent; + } + + // Helps identify side effects in render-phase lifecycle hooks and setState + // reducers by double invoking them in Strict Mode. + + // To preserve the "Pause on caught exceptions" behavior of the debugger, we + // replay the begin phase of a failed component inside invokeGuardedCallback. + + // Warn about deprecated, async-unsafe lifecycles; relates to RFC #6: + + // Gather advanced timing metrics for Profiler subtrees. + + // Trace which interactions trigger each commit. + + // SSR experiments + + // Only used in www builds. + + // Only used in www builds. + + // Disable javascript: URL strings in href for XSS protection. + + // React Fire: prevent the value and checked attributes from syncing + // with their related DOM properties + + // These APIs will no longer be "unstable" in the upcoming 16.7 release, + // Control this behavior with a flag to support 16.6 minor releases in the meanwhile. + + var exposeConcurrentModeAPIs = false; + // Experimental React Flare event system and event components support. + + var enableFlareAPI = false; // Experimental Host Component support. + + var enableFundamentalAPI = false; // Experimental Scope support. + + var enableScopeAPI = false; // New API for JSX transforms to target - https://github.com/reactjs/rfcs/pull/107 + + var enableJSXTransformAPI = false; // We will enforce mocking scheduler with scheduler/unstable_mock at some point. (v17?) + // Till then, we warn about the missing mock, but still fallback to a legacy mode compatible version + + // For tests, we flush suspense fallbacks in an act scope; + // *except* in some of our own tests, where we test incremental loading states. + + // Add a callback property to suspense to notify which promises are currently + // in the update queue. This allows reporting and tracing of what is causing + // the user to see a loading state. + // Also allows hydration callbacks to fire when a dehydrated boundary gets + // hydrated or deleted. + + // Part of the simplification of React.createElement so we can eventually move + // from React.createElement to React.jsx + // https://github.com/reactjs/rfcs/blob/createlement-rfc/text/0000-create-element-changes.md + + // Flag to turn event.target and event.currentTarget in ReactNative from a reactTag to a component instance + + var React = { + Children: { + map: mapChildren, + forEach: forEachChildren, + count: countChildren, + toArray: toArray, + only: onlyChild, + }, + createRef: createRef, + Component: Component, + PureComponent: PureComponent, + createContext: createContext, + forwardRef: forwardRef, + lazy: lazy, + memo: memo, + useCallback: useCallback, + useContext: useContext, + useEffect: useEffect, + useImperativeHandle: useImperativeHandle, + useDebugValue: useDebugValue, + useLayoutEffect: useLayoutEffect, + useMemo: useMemo, + useReducer: useReducer, + useRef: useRef, + useState: useState, + Fragment: REACT_FRAGMENT_TYPE, + Profiler: REACT_PROFILER_TYPE, + StrictMode: REACT_STRICT_MODE_TYPE, + Suspense: REACT_SUSPENSE_TYPE, + createElement: createElementWithValidation, + cloneElement: cloneElementWithValidation, + createFactory: createFactoryWithValidation, + isValidElement: isValidElement, + version: ReactVersion, + __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: ReactSharedInternals, + }; + + if (exposeConcurrentModeAPIs) { + React.useTransition = useTransition; + React.useDeferredValue = useDeferredValue; + React.SuspenseList = REACT_SUSPENSE_LIST_TYPE; + React.unstable_withSuspenseConfig = withSuspenseConfig; + } + + if (enableFlareAPI) { + React.unstable_useResponder = useResponder; + React.unstable_createResponder = createEventResponder; + } + + if (enableFundamentalAPI) { + React.unstable_createFundamental = createFundamentalComponent; + } + + if (enableScopeAPI) { + React.unstable_createScope = createScope; + } // Note: some APIs are added with feature flags. + // Make sure that stable builds for open source + // don't modify the React object to avoid deopts. + // Also let's not expose their names in stable builds. + + if (enableJSXTransformAPI) { + { + React.jsxDEV = jsxWithValidation; + React.jsx = jsxWithValidationDynamic; + React.jsxs = jsxWithValidationStatic; + } + } + + var React$2 = Object.freeze({ + default: React, + }); + + var React$3 = (React$2 && React) || React$2; + + // TODO: decide on the top-level export form. + // This is hacky but makes it work with both Rollup and Jest. + + var react = React$3.default || React$3; + + module.exports = react; + })(); + } + + /***/ + }, + /* 512 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + if (false) { + module.exports = require('./cjs/scheduler.production.min.js'); + } else { + module.exports = __webpack_require__(513); + } + + /***/ + }, + /* 513 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** @license React v0.18.0 + * scheduler.development.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + + if (true) { + (function () { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { value: true }); + + var enableSchedulerDebugging = false; + var enableIsInputPending = false; + var enableProfiling = true; + + var requestHostCallback; + + var requestHostTimeout; + var cancelHostTimeout; + var shouldYieldToHost; + var requestPaint; + + if ( + // If Scheduler runs in a non-DOM environment, it falls back to a naive + // implementation using setTimeout. + typeof window === 'undefined' || // Check if MessageChannel is supported, too. + typeof MessageChannel !== 'function' + ) { + // If this accidentally gets imported in a non-browser environment, e.g. JavaScriptCore, + // fallback to a naive implementation. + var _callback = null; + var _timeoutID = null; + + var _flushCallback = function () { + if (_callback !== null) { + try { + var currentTime = exports.unstable_now(); + var hasRemainingTime = true; + + _callback(hasRemainingTime, currentTime); + + _callback = null; + } catch (e) { + setTimeout(_flushCallback, 0); + throw e; + } + } + }; + + var initialTime = Date.now(); + + exports.unstable_now = function () { + return Date.now() - initialTime; + }; + + requestHostCallback = function (cb) { + if (_callback !== null) { + // Protect against re-entrancy. + setTimeout(requestHostCallback, 0, cb); + } else { + _callback = cb; + setTimeout(_flushCallback, 0); + } + }; + + requestHostTimeout = function (cb, ms) { + _timeoutID = setTimeout(cb, ms); + }; + + cancelHostTimeout = function () { + clearTimeout(_timeoutID); + }; + + shouldYieldToHost = function () { + return false; + }; + + requestPaint = exports.unstable_forceFrameRate = function () {}; + } else { + // Capture local references to native APIs, in case a polyfill overrides them. + var performance = window.performance; + var _Date = window.Date; + var _setTimeout = window.setTimeout; + var _clearTimeout = window.clearTimeout; + + if (typeof console !== 'undefined') { + // TODO: Scheduler no longer requires these methods to be polyfilled. But + // maybe we want to continue warning if they don't exist, to preserve the + // option to rely on it in the future? + var requestAnimationFrame = window.requestAnimationFrame; + var cancelAnimationFrame = window.cancelAnimationFrame; // TODO: Remove fb.me link + + if (typeof requestAnimationFrame !== 'function') { + console.error( + "This browser doesn't support requestAnimationFrame. " + + 'Make sure that you load a ' + + 'polyfill in older browsers. https://fb.me/react-polyfills', + ); + } + + if (typeof cancelAnimationFrame !== 'function') { + console.error( + "This browser doesn't support cancelAnimationFrame. " + + 'Make sure that you load a ' + + 'polyfill in older browsers. https://fb.me/react-polyfills', + ); + } + } + + if (typeof performance === 'object' && typeof performance.now === 'function') { + exports.unstable_now = function () { + return performance.now(); + }; + } else { + var _initialTime = _Date.now(); + + exports.unstable_now = function () { + return _Date.now() - _initialTime; + }; + } + + var isMessageLoopRunning = false; + var scheduledHostCallback = null; + var taskTimeoutID = -1; // Scheduler periodically yields in case there is other work on the main + // thread, like user events. By default, it yields multiple times per frame. + // It does not attempt to align with frame boundaries, since most tasks don't + // need to be frame aligned; for those that do, use requestAnimationFrame. + + var yieldInterval = 5; + var deadline = 0; // TODO: Make this configurable + // TODO: Adjust this based on priority? + + var maxYieldInterval = 300; + var needsPaint = false; + + if ( + enableIsInputPending && + navigator !== undefined && + navigator.scheduling !== undefined && + navigator.scheduling.isInputPending !== undefined + ) { + var scheduling = navigator.scheduling; + + shouldYieldToHost = function () { + var currentTime = exports.unstable_now(); + + if (currentTime >= deadline) { + // There's no time left. We may want to yield control of the main + // thread, so the browser can perform high priority tasks. The main ones + // are painting and user input. If there's a pending paint or a pending + // input, then we should yield. But if there's neither, then we can + // yield less often while remaining responsive. We'll eventually yield + // regardless, since there could be a pending paint that wasn't + // accompanied by a call to `requestPaint`, or other main thread tasks + // like network events. + if (needsPaint || scheduling.isInputPending()) { + // There is either a pending paint or a pending input. + return true; + } // There's no pending input. Only yield if we've reached the max + // yield interval. + + return currentTime >= maxYieldInterval; + } else { + // There's still time left in the frame. + return false; + } + }; + + requestPaint = function () { + needsPaint = true; + }; + } else { + // `isInputPending` is not available. Since we have no way of knowing if + // there's pending input, always yield at the end of the frame. + shouldYieldToHost = function () { + return exports.unstable_now() >= deadline; + }; // Since we yield every frame regardless, `requestPaint` has no effect. + + requestPaint = function () {}; + } + + exports.unstable_forceFrameRate = function (fps) { + if (fps < 0 || fps > 125) { + console.error( + 'forceFrameRate takes a positive int between 0 and 125, ' + + 'forcing framerates higher than 125 fps is not unsupported', + ); + return; + } + + if (fps > 0) { + yieldInterval = Math.floor(1000 / fps); + } else { + // reset the framerate + yieldInterval = 5; + } + }; + + var performWorkUntilDeadline = function () { + if (scheduledHostCallback !== null) { + var currentTime = exports.unstable_now(); // Yield after `yieldInterval` ms, regardless of where we are in the vsync + // cycle. This means there's always time remaining at the beginning of + // the message event. + + deadline = currentTime + yieldInterval; + var hasTimeRemaining = true; + + try { + var hasMoreWork = scheduledHostCallback(hasTimeRemaining, currentTime); + + if (!hasMoreWork) { + isMessageLoopRunning = false; + scheduledHostCallback = null; + } else { + // If there's more work, schedule the next message event at the end + // of the preceding one. + port.postMessage(null); + } + } catch (error) { + // If a scheduler task throws, exit the current browser task so the + // error can be observed. + port.postMessage(null); + throw error; + } + } else { + isMessageLoopRunning = false; + } // Yielding to the browser will give it a chance to paint, so we can + // reset this. + + needsPaint = false; + }; + + var channel = new MessageChannel(); + var port = channel.port2; + channel.port1.onmessage = performWorkUntilDeadline; + + requestHostCallback = function (callback) { + scheduledHostCallback = callback; + + if (!isMessageLoopRunning) { + isMessageLoopRunning = true; + port.postMessage(null); + } + }; + + requestHostTimeout = function (callback, ms) { + taskTimeoutID = _setTimeout(function () { + callback(exports.unstable_now()); + }, ms); + }; + + cancelHostTimeout = function () { + _clearTimeout(taskTimeoutID); + + taskTimeoutID = -1; + }; + } + + function push(heap, node) { + var index = heap.length; + heap.push(node); + siftUp(heap, node, index); + } + function peek(heap) { + var first = heap[0]; + return first === undefined ? null : first; + } + function pop(heap) { + var first = heap[0]; + + if (first !== undefined) { + var last = heap.pop(); + + if (last !== first) { + heap[0] = last; + siftDown(heap, last, 0); + } + + return first; + } else { + return null; + } + } + + function siftUp(heap, node, i) { + var index = i; + + while (true) { + var parentIndex = Math.floor((index - 1) / 2); + var parent = heap[parentIndex]; + + if (parent !== undefined && compare(parent, node) > 0) { + // The parent is larger. Swap positions. + heap[parentIndex] = node; + heap[index] = parent; + index = parentIndex; + } else { + // The parent is smaller. Exit. + return; + } + } + } + + function siftDown(heap, node, i) { + var index = i; + var length = heap.length; + + while (index < length) { + var leftIndex = (index + 1) * 2 - 1; + var left = heap[leftIndex]; + var rightIndex = leftIndex + 1; + var right = heap[rightIndex]; // If the left or right node is smaller, swap with the smaller of those. + + if (left !== undefined && compare(left, node) < 0) { + if (right !== undefined && compare(right, left) < 0) { + heap[index] = right; + heap[rightIndex] = node; + index = rightIndex; + } else { + heap[index] = left; + heap[leftIndex] = node; + index = leftIndex; + } + } else if (right !== undefined && compare(right, node) < 0) { + heap[index] = right; + heap[rightIndex] = node; + index = rightIndex; + } else { + // Neither child is smaller. Exit. + return; + } + } + } + + function compare(a, b) { + // Compare sort index first, then task id. + var diff = a.sortIndex - b.sortIndex; + return diff !== 0 ? diff : a.id - b.id; + } + + // TODO: Use symbols? + var NoPriority = 0; + var ImmediatePriority = 1; + var UserBlockingPriority = 2; + var NormalPriority = 3; + var LowPriority = 4; + var IdlePriority = 5; + + var runIdCounter = 0; + var mainThreadIdCounter = 0; + var profilingStateSize = 4; + var sharedProfilingBuffer = enableProfiling // $FlowFixMe Flow doesn't know about SharedArrayBuffer + ? typeof SharedArrayBuffer === 'function' + ? new SharedArrayBuffer(profilingStateSize * Int32Array.BYTES_PER_ELEMENT) // $FlowFixMe Flow doesn't know about ArrayBuffer + : typeof ArrayBuffer === 'function' + ? new ArrayBuffer(profilingStateSize * Int32Array.BYTES_PER_ELEMENT) + : null // Don't crash the init path on IE9 + : null; + var profilingState = + enableProfiling && sharedProfilingBuffer !== null ? new Int32Array(sharedProfilingBuffer) : []; // We can't read this but it helps save bytes for null checks + + var PRIORITY = 0; + var CURRENT_TASK_ID = 1; + var CURRENT_RUN_ID = 2; + var QUEUE_SIZE = 3; + + if (enableProfiling) { + profilingState[PRIORITY] = NoPriority; // This is maintained with a counter, because the size of the priority queue + // array might include canceled tasks. + + profilingState[QUEUE_SIZE] = 0; + profilingState[CURRENT_TASK_ID] = 0; + } // Bytes per element is 4 + + var INITIAL_EVENT_LOG_SIZE = 131072; + var MAX_EVENT_LOG_SIZE = 524288; // Equivalent to 2 megabytes + + var eventLogSize = 0; + var eventLogBuffer = null; + var eventLog = null; + var eventLogIndex = 0; + var TaskStartEvent = 1; + var TaskCompleteEvent = 2; + var TaskErrorEvent = 3; + var TaskCancelEvent = 4; + var TaskRunEvent = 5; + var TaskYieldEvent = 6; + var SchedulerSuspendEvent = 7; + var SchedulerResumeEvent = 8; + + function logEvent(entries) { + if (eventLog !== null) { + var offset = eventLogIndex; + eventLogIndex += entries.length; + + if (eventLogIndex + 1 > eventLogSize) { + eventLogSize *= 2; + + if (eventLogSize > MAX_EVENT_LOG_SIZE) { + console.error( + "Scheduler Profiling: Event log exceeded maximum size. Don't " + + 'forget to call `stopLoggingProfilingEvents()`.', + ); + stopLoggingProfilingEvents(); + return; + } + + var newEventLog = new Int32Array(eventLogSize * 4); + newEventLog.set(eventLog); + eventLogBuffer = newEventLog.buffer; + eventLog = newEventLog; + } + + eventLog.set(entries, offset); + } + } + + function startLoggingProfilingEvents() { + eventLogSize = INITIAL_EVENT_LOG_SIZE; + eventLogBuffer = new ArrayBuffer(eventLogSize * 4); + eventLog = new Int32Array(eventLogBuffer); + eventLogIndex = 0; + } + function stopLoggingProfilingEvents() { + var buffer = eventLogBuffer; + eventLogSize = 0; + eventLogBuffer = null; + eventLog = null; + eventLogIndex = 0; + return buffer; + } + function markTaskStart(task, ms) { + if (enableProfiling) { + profilingState[QUEUE_SIZE]++; + + if (eventLog !== null) { + // performance.now returns a float, representing milliseconds. When the + // event is logged, it's coerced to an int. Convert to microseconds to + // maintain extra degrees of precision. + logEvent([TaskStartEvent, ms * 1000, task.id, task.priorityLevel]); + } + } + } + function markTaskCompleted(task, ms) { + if (enableProfiling) { + profilingState[PRIORITY] = NoPriority; + profilingState[CURRENT_TASK_ID] = 0; + profilingState[QUEUE_SIZE]--; + + if (eventLog !== null) { + logEvent([TaskCompleteEvent, ms * 1000, task.id]); + } + } + } + function markTaskCanceled(task, ms) { + if (enableProfiling) { + profilingState[QUEUE_SIZE]--; + + if (eventLog !== null) { + logEvent([TaskCancelEvent, ms * 1000, task.id]); + } + } + } + function markTaskErrored(task, ms) { + if (enableProfiling) { + profilingState[PRIORITY] = NoPriority; + profilingState[CURRENT_TASK_ID] = 0; + profilingState[QUEUE_SIZE]--; + + if (eventLog !== null) { + logEvent([TaskErrorEvent, ms * 1000, task.id]); + } + } + } + function markTaskRun(task, ms) { + if (enableProfiling) { + runIdCounter++; + profilingState[PRIORITY] = task.priorityLevel; + profilingState[CURRENT_TASK_ID] = task.id; + profilingState[CURRENT_RUN_ID] = runIdCounter; + + if (eventLog !== null) { + logEvent([TaskRunEvent, ms * 1000, task.id, runIdCounter]); + } + } + } + function markTaskYield(task, ms) { + if (enableProfiling) { + profilingState[PRIORITY] = NoPriority; + profilingState[CURRENT_TASK_ID] = 0; + profilingState[CURRENT_RUN_ID] = 0; + + if (eventLog !== null) { + logEvent([TaskYieldEvent, ms * 1000, task.id, runIdCounter]); + } + } + } + function markSchedulerSuspended(ms) { + if (enableProfiling) { + mainThreadIdCounter++; + + if (eventLog !== null) { + logEvent([SchedulerSuspendEvent, ms * 1000, mainThreadIdCounter]); + } + } + } + function markSchedulerUnsuspended(ms) { + if (enableProfiling) { + if (eventLog !== null) { + logEvent([SchedulerResumeEvent, ms * 1000, mainThreadIdCounter]); + } + } + } + + /* eslint-disable no-var */ + // Math.pow(2, 30) - 1 + // 0b111111111111111111111111111111 + + var maxSigned31BitInt = 1073741823; // Times out immediately + + var IMMEDIATE_PRIORITY_TIMEOUT = -1; // Eventually times out + + var USER_BLOCKING_PRIORITY = 250; + var NORMAL_PRIORITY_TIMEOUT = 5000; + var LOW_PRIORITY_TIMEOUT = 10000; // Never times out + + var IDLE_PRIORITY = maxSigned31BitInt; // Tasks are stored on a min heap + + var taskQueue = []; + var timerQueue = []; // Incrementing id counter. Used to maintain insertion order. + + var taskIdCounter = 1; // Pausing the scheduler is useful for debugging. + + var isSchedulerPaused = false; + var currentTask = null; + var currentPriorityLevel = NormalPriority; // This is set while performing work, to prevent re-entrancy. + + var isPerformingWork = false; + var isHostCallbackScheduled = false; + var isHostTimeoutScheduled = false; + + function advanceTimers(currentTime) { + // Check for tasks that are no longer delayed and add them to the queue. + var timer = peek(timerQueue); + + while (timer !== null) { + if (timer.callback === null) { + // Timer was cancelled. + pop(timerQueue); + } else if (timer.startTime <= currentTime) { + // Timer fired. Transfer to the task queue. + pop(timerQueue); + timer.sortIndex = timer.expirationTime; + push(taskQueue, timer); + + if (enableProfiling) { + markTaskStart(timer, currentTime); + timer.isQueued = true; + } + } else { + // Remaining timers are pending. + return; + } + + timer = peek(timerQueue); + } + } + + function handleTimeout(currentTime) { + isHostTimeoutScheduled = false; + advanceTimers(currentTime); + + if (!isHostCallbackScheduled) { + if (peek(taskQueue) !== null) { + isHostCallbackScheduled = true; + requestHostCallback(flushWork); + } else { + var firstTimer = peek(timerQueue); + + if (firstTimer !== null) { + requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime); + } + } + } + } + + function flushWork(hasTimeRemaining, initialTime) { + if (enableProfiling) { + markSchedulerUnsuspended(initialTime); + } // We'll need a host callback the next time work is scheduled. + + isHostCallbackScheduled = false; + + if (isHostTimeoutScheduled) { + // We scheduled a timeout but it's no longer needed. Cancel it. + isHostTimeoutScheduled = false; + cancelHostTimeout(); + } + + isPerformingWork = true; + var previousPriorityLevel = currentPriorityLevel; + + try { + if (enableProfiling) { + try { + return workLoop(hasTimeRemaining, initialTime); + } catch (error) { + if (currentTask !== null) { + var currentTime = exports.unstable_now(); + markTaskErrored(currentTask, currentTime); + currentTask.isQueued = false; + } + + throw error; + } + } else { + // No catch in prod codepath. + return workLoop(hasTimeRemaining, initialTime); + } + } finally { + currentTask = null; + currentPriorityLevel = previousPriorityLevel; + isPerformingWork = false; + + if (enableProfiling) { + var _currentTime = exports.unstable_now(); + + markSchedulerSuspended(_currentTime); + } + } + } + + function workLoop(hasTimeRemaining, initialTime) { + var currentTime = initialTime; + advanceTimers(currentTime); + currentTask = peek(taskQueue); + + while (currentTask !== null && !(enableSchedulerDebugging && isSchedulerPaused)) { + if (currentTask.expirationTime > currentTime && (!hasTimeRemaining || shouldYieldToHost())) { + // This currentTask hasn't expired, and we've reached the deadline. + break; + } + + var callback = currentTask.callback; + + if (callback !== null) { + currentTask.callback = null; + currentPriorityLevel = currentTask.priorityLevel; + var didUserCallbackTimeout = currentTask.expirationTime <= currentTime; + markTaskRun(currentTask, currentTime); + var continuationCallback = callback(didUserCallbackTimeout); + currentTime = exports.unstable_now(); + + if (typeof continuationCallback === 'function') { + currentTask.callback = continuationCallback; + markTaskYield(currentTask, currentTime); + } else { + if (enableProfiling) { + markTaskCompleted(currentTask, currentTime); + currentTask.isQueued = false; + } + + if (currentTask === peek(taskQueue)) { + pop(taskQueue); + } + } + + advanceTimers(currentTime); + } else { + pop(taskQueue); + } + + currentTask = peek(taskQueue); + } // Return whether there's additional work + + if (currentTask !== null) { + return true; + } else { + var firstTimer = peek(timerQueue); + + if (firstTimer !== null) { + requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime); + } + + return false; + } + } + + function unstable_runWithPriority(priorityLevel, eventHandler) { + switch (priorityLevel) { + case ImmediatePriority: + case UserBlockingPriority: + case NormalPriority: + case LowPriority: + case IdlePriority: + break; + + default: + priorityLevel = NormalPriority; + } + + var previousPriorityLevel = currentPriorityLevel; + currentPriorityLevel = priorityLevel; + + try { + return eventHandler(); + } finally { + currentPriorityLevel = previousPriorityLevel; + } + } + + function unstable_next(eventHandler) { + var priorityLevel; + + switch (currentPriorityLevel) { + case ImmediatePriority: + case UserBlockingPriority: + case NormalPriority: + // Shift down to normal priority + priorityLevel = NormalPriority; + break; + + default: + // Anything lower than normal priority should remain at the current level. + priorityLevel = currentPriorityLevel; + break; + } + + var previousPriorityLevel = currentPriorityLevel; + currentPriorityLevel = priorityLevel; + + try { + return eventHandler(); + } finally { + currentPriorityLevel = previousPriorityLevel; + } + } + + function unstable_wrapCallback(callback) { + var parentPriorityLevel = currentPriorityLevel; + return function () { + // This is a fork of runWithPriority, inlined for performance. + var previousPriorityLevel = currentPriorityLevel; + currentPriorityLevel = parentPriorityLevel; + + try { + return callback.apply(this, arguments); + } finally { + currentPriorityLevel = previousPriorityLevel; + } + }; + } + + function timeoutForPriorityLevel(priorityLevel) { + switch (priorityLevel) { + case ImmediatePriority: + return IMMEDIATE_PRIORITY_TIMEOUT; + + case UserBlockingPriority: + return USER_BLOCKING_PRIORITY; + + case IdlePriority: + return IDLE_PRIORITY; + + case LowPriority: + return LOW_PRIORITY_TIMEOUT; + + case NormalPriority: + default: + return NORMAL_PRIORITY_TIMEOUT; + } + } + + function unstable_scheduleCallback(priorityLevel, callback, options) { + var currentTime = exports.unstable_now(); + var startTime; + var timeout; + + if (typeof options === 'object' && options !== null) { + var delay = options.delay; + + if (typeof delay === 'number' && delay > 0) { + startTime = currentTime + delay; + } else { + startTime = currentTime; + } + + timeout = + typeof options.timeout === 'number' + ? options.timeout + : timeoutForPriorityLevel(priorityLevel); + } else { + timeout = timeoutForPriorityLevel(priorityLevel); + startTime = currentTime; + } + + var expirationTime = startTime + timeout; + var newTask = { + id: taskIdCounter++, + callback: callback, + priorityLevel: priorityLevel, + startTime: startTime, + expirationTime: expirationTime, + sortIndex: -1, + }; + + if (enableProfiling) { + newTask.isQueued = false; + } + + if (startTime > currentTime) { + // This is a delayed task. + newTask.sortIndex = startTime; + push(timerQueue, newTask); + + if (peek(taskQueue) === null && newTask === peek(timerQueue)) { + // All tasks are delayed, and this is the task with the earliest delay. + if (isHostTimeoutScheduled) { + // Cancel an existing timeout. + cancelHostTimeout(); + } else { + isHostTimeoutScheduled = true; + } // Schedule a timeout. + + requestHostTimeout(handleTimeout, startTime - currentTime); + } + } else { + newTask.sortIndex = expirationTime; + push(taskQueue, newTask); + + if (enableProfiling) { + markTaskStart(newTask, currentTime); + newTask.isQueued = true; + } // Schedule a host callback, if needed. If we're already performing work, + // wait until the next time we yield. + + if (!isHostCallbackScheduled && !isPerformingWork) { + isHostCallbackScheduled = true; + requestHostCallback(flushWork); + } + } + + return newTask; + } + + function unstable_pauseExecution() { + isSchedulerPaused = true; + } + + function unstable_continueExecution() { + isSchedulerPaused = false; + + if (!isHostCallbackScheduled && !isPerformingWork) { + isHostCallbackScheduled = true; + requestHostCallback(flushWork); + } + } + + function unstable_getFirstCallbackNode() { + return peek(taskQueue); + } + + function unstable_cancelCallback(task) { + if (enableProfiling) { + if (task.isQueued) { + var currentTime = exports.unstable_now(); + markTaskCanceled(task, currentTime); + task.isQueued = false; + } + } // Null out the callback to indicate the task has been canceled. (Can't + // remove from the queue because you can't remove arbitrary nodes from an + // array based heap, only the first one.) + + task.callback = null; + } + + function unstable_getCurrentPriorityLevel() { + return currentPriorityLevel; + } + + function unstable_shouldYield() { + var currentTime = exports.unstable_now(); + advanceTimers(currentTime); + var firstTask = peek(taskQueue); + return ( + (firstTask !== currentTask && + currentTask !== null && + firstTask !== null && + firstTask.callback !== null && + firstTask.startTime <= currentTime && + firstTask.expirationTime < currentTask.expirationTime) || + shouldYieldToHost() + ); + } + + var unstable_requestPaint = requestPaint; + var unstable_Profiling = enableProfiling + ? { + startLoggingProfilingEvents: startLoggingProfilingEvents, + stopLoggingProfilingEvents: stopLoggingProfilingEvents, + sharedProfilingBuffer: sharedProfilingBuffer, + } + : null; + + exports.unstable_ImmediatePriority = ImmediatePriority; + exports.unstable_UserBlockingPriority = UserBlockingPriority; + exports.unstable_NormalPriority = NormalPriority; + exports.unstable_IdlePriority = IdlePriority; + exports.unstable_LowPriority = LowPriority; + exports.unstable_runWithPriority = unstable_runWithPriority; + exports.unstable_next = unstable_next; + exports.unstable_scheduleCallback = unstable_scheduleCallback; + exports.unstable_cancelCallback = unstable_cancelCallback; + exports.unstable_wrapCallback = unstable_wrapCallback; + exports.unstable_getCurrentPriorityLevel = unstable_getCurrentPriorityLevel; + exports.unstable_shouldYield = unstable_shouldYield; + exports.unstable_requestPaint = unstable_requestPaint; + exports.unstable_continueExecution = unstable_continueExecution; + exports.unstable_pauseExecution = unstable_pauseExecution; + exports.unstable_getFirstCallbackNode = unstable_getFirstCallbackNode; + exports.unstable_Profiling = unstable_Profiling; + })(); + } + + /***/ + }, + /* 514 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + if (false) { + module.exports = require('./cjs/scheduler-tracing.production.min.js'); + } else { + module.exports = __webpack_require__(515); + } + + /***/ + }, + /* 515 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** @license React v0.18.0 + * scheduler-tracing.development.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + + if (true) { + (function () { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { value: true }); + + // Helps identify side effects in render-phase lifecycle hooks and setState + // reducers by double invoking them in Strict Mode. + + // To preserve the "Pause on caught exceptions" behavior of the debugger, we + // replay the begin phase of a failed component inside invokeGuardedCallback. + + // Warn about deprecated, async-unsafe lifecycles; relates to RFC #6: + + // Gather advanced timing metrics for Profiler subtrees. + + // Trace which interactions trigger each commit. + + var enableSchedulerTracing = true; // SSR experiments + + // Only used in www builds. + + // Only used in www builds. + + // Disable javascript: URL strings in href for XSS protection. + + // React Fire: prevent the value and checked attributes from syncing + // with their related DOM properties + + // These APIs will no longer be "unstable" in the upcoming 16.7 release, + // Control this behavior with a flag to support 16.6 minor releases in the meanwhile. + + // Experimental React Flare event system and event components support. + + // Experimental Host Component support. + + // Experimental Scope support. + + // New API for JSX transforms to target - https://github.com/reactjs/rfcs/pull/107 + + // We will enforce mocking scheduler with scheduler/unstable_mock at some point. (v17?) + // Till then, we warn about the missing mock, but still fallback to a legacy mode compatible version + + // For tests, we flush suspense fallbacks in an act scope; + // *except* in some of our own tests, where we test incremental loading states. + + // Add a callback property to suspense to notify which promises are currently + // in the update queue. This allows reporting and tracing of what is causing + // the user to see a loading state. + // Also allows hydration callbacks to fire when a dehydrated boundary gets + // hydrated or deleted. + + // Part of the simplification of React.createElement so we can eventually move + // from React.createElement to React.jsx + // https://github.com/reactjs/rfcs/blob/createlement-rfc/text/0000-create-element-changes.md + + // Flag to turn event.target and event.currentTarget in ReactNative from a reactTag to a component instance + + var DEFAULT_THREAD_ID = 0; // Counters used to generate unique IDs. + + var interactionIDCounter = 0; + var threadIDCounter = 0; // Set of currently traced interactions. + // Interactions "stack"– + // Meaning that newly traced interactions are appended to the previously active set. + // When an interaction goes out of scope, the previous set (if any) is restored. + + exports.__interactionsRef = null; // Listener(s) to notify when interactions begin and end. + + exports.__subscriberRef = null; + + if (enableSchedulerTracing) { + exports.__interactionsRef = { + current: new Set(), + }; + exports.__subscriberRef = { + current: null, + }; + } + + function unstable_clear(callback) { + if (!enableSchedulerTracing) { + return callback(); + } + + var prevInteractions = exports.__interactionsRef.current; + exports.__interactionsRef.current = new Set(); + + try { + return callback(); + } finally { + exports.__interactionsRef.current = prevInteractions; + } + } + function unstable_getCurrent() { + if (!enableSchedulerTracing) { + return null; + } else { + return exports.__interactionsRef.current; + } + } + function unstable_getThreadID() { + return ++threadIDCounter; + } + function unstable_trace(name, timestamp, callback) { + var threadID = + arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : DEFAULT_THREAD_ID; + + if (!enableSchedulerTracing) { + return callback(); + } + + var interaction = { + __count: 1, + id: interactionIDCounter++, + name: name, + timestamp: timestamp, + }; + var prevInteractions = exports.__interactionsRef.current; // Traced interactions should stack/accumulate. + // To do that, clone the current interactions. + // The previous set will be restored upon completion. + + var interactions = new Set(prevInteractions); + interactions.add(interaction); + exports.__interactionsRef.current = interactions; + var subscriber = exports.__subscriberRef.current; + var returnValue; + + try { + if (subscriber !== null) { + subscriber.onInteractionTraced(interaction); + } + } finally { + try { + if (subscriber !== null) { + subscriber.onWorkStarted(interactions, threadID); + } + } finally { + try { + returnValue = callback(); + } finally { + exports.__interactionsRef.current = prevInteractions; + + try { + if (subscriber !== null) { + subscriber.onWorkStopped(interactions, threadID); + } + } finally { + interaction.__count--; // If no async work was scheduled for this interaction, + // Notify subscribers that it's completed. + + if (subscriber !== null && interaction.__count === 0) { + subscriber.onInteractionScheduledWorkCompleted(interaction); + } + } + } + } + } + + return returnValue; + } + function unstable_wrap(callback) { + var threadID = + arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEFAULT_THREAD_ID; + + if (!enableSchedulerTracing) { + return callback; + } + + var wrappedInteractions = exports.__interactionsRef.current; + var subscriber = exports.__subscriberRef.current; + + if (subscriber !== null) { + subscriber.onWorkScheduled(wrappedInteractions, threadID); + } // Update the pending async work count for the current interactions. + // Update after calling subscribers in case of error. + + wrappedInteractions.forEach(function (interaction) { + interaction.__count++; + }); + var hasRun = false; + + function wrapped() { + var prevInteractions = exports.__interactionsRef.current; + exports.__interactionsRef.current = wrappedInteractions; + subscriber = exports.__subscriberRef.current; + + try { + var returnValue; + + try { + if (subscriber !== null) { + subscriber.onWorkStarted(wrappedInteractions, threadID); + } + } finally { + try { + returnValue = callback.apply(undefined, arguments); + } finally { + exports.__interactionsRef.current = prevInteractions; + + if (subscriber !== null) { + subscriber.onWorkStopped(wrappedInteractions, threadID); + } + } + } + + return returnValue; + } finally { + if (!hasRun) { + // We only expect a wrapped function to be executed once, + // But in the event that it's executed more than once– + // Only decrement the outstanding interaction counts once. + hasRun = true; // Update pending async counts for all wrapped interactions. + // If this was the last scheduled async work for any of them, + // Mark them as completed. + + wrappedInteractions.forEach(function (interaction) { + interaction.__count--; + + if (subscriber !== null && interaction.__count === 0) { + subscriber.onInteractionScheduledWorkCompleted(interaction); + } + }); + } + } + } + + wrapped.cancel = function cancel() { + subscriber = exports.__subscriberRef.current; + + try { + if (subscriber !== null) { + subscriber.onWorkCanceled(wrappedInteractions, threadID); + } + } finally { + // Update pending async counts for all wrapped interactions. + // If this was the last scheduled async work for any of them, + // Mark them as completed. + wrappedInteractions.forEach(function (interaction) { + interaction.__count--; + + if (subscriber && interaction.__count === 0) { + subscriber.onInteractionScheduledWorkCompleted(interaction); + } + }); + } + }; + + return wrapped; + } + + var subscribers = null; + + if (enableSchedulerTracing) { + subscribers = new Set(); + } + + function unstable_subscribe(subscriber) { + if (enableSchedulerTracing) { + subscribers.add(subscriber); + + if (subscribers.size === 1) { + exports.__subscriberRef.current = { + onInteractionScheduledWorkCompleted: onInteractionScheduledWorkCompleted, + onInteractionTraced: onInteractionTraced, + onWorkCanceled: onWorkCanceled, + onWorkScheduled: onWorkScheduled, + onWorkStarted: onWorkStarted, + onWorkStopped: onWorkStopped, + }; + } + } + } + function unstable_unsubscribe(subscriber) { + if (enableSchedulerTracing) { + subscribers.delete(subscriber); + + if (subscribers.size === 0) { + exports.__subscriberRef.current = null; + } + } + } + + function onInteractionTraced(interaction) { + var didCatchError = false; + var caughtError = null; + subscribers.forEach(function (subscriber) { + try { + subscriber.onInteractionTraced(interaction); + } catch (error) { + if (!didCatchError) { + didCatchError = true; + caughtError = error; + } + } + }); + + if (didCatchError) { + throw caughtError; + } + } + + function onInteractionScheduledWorkCompleted(interaction) { + var didCatchError = false; + var caughtError = null; + subscribers.forEach(function (subscriber) { + try { + subscriber.onInteractionScheduledWorkCompleted(interaction); + } catch (error) { + if (!didCatchError) { + didCatchError = true; + caughtError = error; + } + } + }); + + if (didCatchError) { + throw caughtError; + } + } + + function onWorkScheduled(interactions, threadID) { + var didCatchError = false; + var caughtError = null; + subscribers.forEach(function (subscriber) { + try { + subscriber.onWorkScheduled(interactions, threadID); + } catch (error) { + if (!didCatchError) { + didCatchError = true; + caughtError = error; + } + } + }); + + if (didCatchError) { + throw caughtError; + } + } + + function onWorkStarted(interactions, threadID) { + var didCatchError = false; + var caughtError = null; + subscribers.forEach(function (subscriber) { + try { + subscriber.onWorkStarted(interactions, threadID); + } catch (error) { + if (!didCatchError) { + didCatchError = true; + caughtError = error; + } + } + }); + + if (didCatchError) { + throw caughtError; + } + } + + function onWorkStopped(interactions, threadID) { + var didCatchError = false; + var caughtError = null; + subscribers.forEach(function (subscriber) { + try { + subscriber.onWorkStopped(interactions, threadID); + } catch (error) { + if (!didCatchError) { + didCatchError = true; + caughtError = error; + } + } + }); + + if (didCatchError) { + throw caughtError; + } + } + + function onWorkCanceled(interactions, threadID) { + var didCatchError = false; + var caughtError = null; + subscribers.forEach(function (subscriber) { + try { + subscriber.onWorkCanceled(interactions, threadID); + } catch (error) { + if (!didCatchError) { + didCatchError = true; + caughtError = error; + } + } + }); + + if (didCatchError) { + throw caughtError; + } + } + + exports.unstable_clear = unstable_clear; + exports.unstable_getCurrent = unstable_getCurrent; + exports.unstable_getThreadID = unstable_getThreadID; + exports.unstable_trace = unstable_trace; + exports.unstable_wrap = unstable_wrap; + exports.unstable_subscribe = unstable_subscribe; + exports.unstable_unsubscribe = unstable_unsubscribe; + })(); + } + + /***/ + }, + /* 516 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var _interopRequireDefault = __webpack_require__(40); + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.reactOnRailsPageLoaded = reactOnRailsPageLoaded; + exports.clientStartup = clientStartup; + + var _stringify = _interopRequireDefault(__webpack_require__(105)); + + var _reactDom = _interopRequireDefault(__webpack_require__(229)); + + var _createReactElement = _interopRequireDefault(__webpack_require__(160)); + + var _isCreateReactElementResultNonReactComponent = _interopRequireDefault(__webpack_require__(231)); + + /* global ReactOnRails Turbolinks */ + var REACT_ON_RAILS_STORE_ATTRIBUTE = 'data-js-react-on-rails-store'; + + function findContext() { + if (typeof window.ReactOnRails !== 'undefined') { + return window; + } else if (typeof ReactOnRails !== 'undefined') { + return global; + } + + throw new Error('ReactOnRails is undefined in both global and window namespaces.\n '); + } + + function debugTurbolinks() { + if (!window) { + return; + } + + var context = findContext(); + + if (context.ReactOnRails.option('traceTurbolinks')) { + var _console; + + for (var _len = arguments.length, msg = new Array(_len), _key = 0; _key < _len; _key++) { + msg[_key] = arguments[_key]; + } + + (_console = console).log.apply(_console, ['TURBO:'].concat(msg)); + } + } + + function turbolinksInstalled() { + return typeof Turbolinks !== 'undefined'; + } + + function forEach(fn, className, railsContext) { + var els = document.getElementsByClassName(className); + + for (var i = 0; i < els.length; i += 1) { + fn(els[i], railsContext); + } + } + + function forEachByAttribute(fn, attributeName, railsContext) { + var els = document.querySelectorAll('['.concat(attributeName, ']')); + + for (var i = 0; i < els.length; i += 1) { + fn(els[i], railsContext); + } + } + + function forEachComponent(fn, railsContext) { + forEach(fn, 'js-react-on-rails-component', railsContext); + } + + function initializeStore(el, railsContext) { + var context = findContext(); + var name = el.getAttribute(REACT_ON_RAILS_STORE_ATTRIBUTE); + var props = JSON.parse(el.textContent); + var storeGenerator = context.ReactOnRails.getStoreGenerator(name); + var store = storeGenerator(props, railsContext); + context.ReactOnRails.setStore(name, store); + } + + function forEachStore(railsContext) { + forEachByAttribute(initializeStore, REACT_ON_RAILS_STORE_ATTRIBUTE, railsContext); + } + + function turbolinksVersion5() { + return typeof Turbolinks.controller !== 'undefined'; + } + + function turbolinksSupported() { + return Turbolinks.supported; + } + + function delegateToRenderer(componentObj, props, railsContext, domNodeId, trace) { + var name = componentObj.name, + component = componentObj.component, + isRenderer = componentObj.isRenderer; + + if (isRenderer) { + if (trace) { + console.log( + 'DELEGATING TO RENDERER ' + .concat(name, ' for dom node with id: ') + .concat(domNodeId, ' with props, railsContext:'), + props, + railsContext, + ); + } + + component(props, railsContext, domNodeId); + return true; + } + + return false; + } + + function domNodeIdForEl(el) { + return el.getAttribute('data-dom-id'); + } + /** + * Used for client rendering by ReactOnRails. Either calls ReactDOM.hydrate, ReactDOM.render, or + * delegates to a renderer registered by the user. + * @param el + */ + + function render(el, railsContext) { + var context = findContext(); // This must match lib/react_on_rails/helper.rb + + var name = el.getAttribute('data-component-name'); + var domNodeId = domNodeIdForEl(el); + var props = JSON.parse(el.textContent); + var trace = el.getAttribute('data-trace'); + + try { + var domNode = document.getElementById(domNodeId); + + if (domNode) { + var componentObj = context.ReactOnRails.getComponent(name); + + if (delegateToRenderer(componentObj, props, railsContext, domNodeId, trace)) { + return; + } // Hydrate if available and was server rendered + + var shouldHydrate = !!_reactDom.default.hydrate && !!domNode.innerHTML; + var reactElementOrRouterResult = (0, _createReactElement.default)({ + componentObj: componentObj, + props: props, + domNodeId: domNodeId, + trace: trace, + railsContext: railsContext, + shouldHydrate: shouldHydrate, + }); + + if ((0, _isCreateReactElementResultNonReactComponent.default)(reactElementOrRouterResult)) { + throw new Error( + 'You returned a server side type of react-router error: '.concat( + (0, _stringify.default)(reactElementOrRouterResult), + '\nYou should return a React.Component always for the client side entry point.', + ), + ); + } else if (shouldHydrate) { + _reactDom.default.hydrate(reactElementOrRouterResult, domNode); + } else { + _reactDom.default.render(reactElementOrRouterResult, domNode); + } + } + } catch (e) { + e.message = + 'ReactOnRails encountered an error while rendering component: '.concat(name, '.\n') + + 'Original message: '.concat(e.message); + throw e; + } + } + + function parseRailsContext() { + var el = document.getElementById('js-react-on-rails-context'); + + if (el) { + return JSON.parse(el.textContent); + } + + return null; + } + + function reactOnRailsPageLoaded() { + debugTurbolinks('reactOnRailsPageLoaded'); + var railsContext = parseRailsContext(); + forEachStore(railsContext); + forEachComponent(render, railsContext); + } + + function unmount(el) { + var domNodeId = domNodeIdForEl(el); + var domNode = document.getElementById(domNodeId); + + try { + _reactDom.default.unmountComponentAtNode(domNode); + } catch (e) { + console.info( + 'Caught error calling unmountComponentAtNode: '.concat(e.message, ' for domNode'), + domNode, + e, + ); + } + } + + function reactOnRailsPageUnloaded() { + debugTurbolinks('reactOnRailsPageUnloaded'); + forEachComponent(unmount); + } + + function renderInit() { + // Install listeners when running on the client (browser). + // We must do this check for turbolinks AFTER the document is loaded because we load the + // Webpack bundles first. + if (!turbolinksInstalled() || !turbolinksSupported()) { + debugTurbolinks('NOT USING TURBOLINKS: calling reactOnRailsPageLoaded'); + reactOnRailsPageLoaded(); + return; + } + + if (turbolinksVersion5()) { + debugTurbolinks( + 'USING TURBOLINKS 5: document added event listeners ' + + 'turbolinks:before-render and turbolinks:render.', + ); + document.addEventListener('turbolinks:before-render', reactOnRailsPageUnloaded); + document.addEventListener('turbolinks:render', reactOnRailsPageLoaded); + reactOnRailsPageLoaded(); + } else { + debugTurbolinks( + 'USING TURBOLINKS 2: document added event listeners page:before-unload and ' + 'page:change.', + ); + document.addEventListener('page:before-unload', reactOnRailsPageUnloaded); + document.addEventListener('page:change', reactOnRailsPageLoaded); + } + } + + function clientStartup(context) { + var document = context.document; // Check if server rendering + + if (!document) { + return; + } // Tried with a file local variable, but the install handler gets called twice. + // eslint-disable-next-line no-underscore-dangle + + if (context.__REACT_ON_RAILS_EVENT_HANDLERS_RAN_ONCE__) { + return; + } // eslint-disable-next-line no-underscore-dangle, no-param-reassign + + context.__REACT_ON_RAILS_EVENT_HANDLERS_RAN_ONCE__ = true; + debugTurbolinks('Adding DOMContentLoaded event to install event listeners.'); + + if (document.readyState === 'complete') { + window.setTimeout(renderInit); + } else { + document.addEventListener('DOMContentLoaded', renderInit); + } + } + + /***/ + }, + /* 517 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + if (false) { + module.exports = require('./cjs/react-dom-server.node.production.min.js'); + } else { + module.exports = __webpack_require__(518); + } + + /***/ + }, + /* 518 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** @license React v16.12.0 + * react-dom-server.node.development.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + + if (true) { + (function () { + 'use strict'; + + var _assign = __webpack_require__(63); + var React = __webpack_require__(1); + var checkPropTypes = __webpack_require__(106); + var stream = __webpack_require__(519); + + // TODO: this is special because it gets imported during build. + + var ReactVersion = '16.12.0'; + + // Do not require this module directly! Use normal `invariant` calls with + // template literal strings. The messages will be replaced with error codes + // during build. + + /** + * Use invariant() to assert state which your program assumes to be true. + * + * Provide sprintf-style format (only %s is supported) and arguments + * to provide information about what broke and what you were + * expecting. + * + * The invariant message will be stripped in production, but the invariant + * will remain to ensure logic does not differ in production. + */ + + /** + * Similar to invariant but only logs a warning if the condition is not met. + * This can be used to log issues in development environments in critical + * paths. Removing the logging code for production environments will keep the + * same logic and follow the same code paths. + */ + var warningWithoutStack = function () {}; + + { + warningWithoutStack = function (condition, format) { + for ( + var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; + _key < _len; + _key++ + ) { + args[_key - 2] = arguments[_key]; + } + + if (format === undefined) { + throw new Error( + '`warningWithoutStack(condition, format, ...args)` requires a warning ' + + 'message argument', + ); + } + + if (args.length > 8) { + // Check before the condition to catch violations early. + throw new Error('warningWithoutStack() currently supports at most 8 arguments.'); + } + + if (condition) { + return; + } + + if (typeof console !== 'undefined') { + var argsWithFormat = args.map(function (item) { + return '' + item; + }); + argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it + // breaks IE9: https://github.com/facebook/react/issues/13610 + + Function.prototype.apply.call(console.error, console, argsWithFormat); + } + + try { + // --- Welcome to debugging React --- + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + var argIndex = 0; + var message = + 'Warning: ' + + format.replace(/%s/g, function () { + return args[argIndex++]; + }); + throw new Error(message); + } catch (x) {} + }; + } + + var warningWithoutStack$1 = warningWithoutStack; + + // The Symbol used to tag the ReactElement-like types. If there is no native Symbol + // nor polyfill, then a plain number is used for performance. + var hasSymbol = typeof Symbol === 'function' && Symbol.for; + + var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca; + var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb; + var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc; + var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2; + var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd; + var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary + // (unstable) APIs that have been removed. Can we remove the symbols? + + var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf; + var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0; + var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1; + var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8; + var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3; + var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4; + var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5; + + var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7; + + var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; // Prevent newer renderers from RTE when used with older react package versions. + // Current owner and dispatcher used to share the same ref, + // but PR #14548 split them out to better support the react-debug-tools package. + + if (!ReactSharedInternals.hasOwnProperty('ReactCurrentDispatcher')) { + ReactSharedInternals.ReactCurrentDispatcher = { + current: null, + }; + } + + if (!ReactSharedInternals.hasOwnProperty('ReactCurrentBatchConfig')) { + ReactSharedInternals.ReactCurrentBatchConfig = { + suspense: null, + }; + } + + /** + * Similar to invariant but only logs a warning if the condition is not met. + * This can be used to log issues in development environments in critical + * paths. Removing the logging code for production environments will keep the + * same logic and follow the same code paths. + */ + + var warning = warningWithoutStack$1; + + { + warning = function (condition, format) { + if (condition) { + return; + } + + var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; + var stack = ReactDebugCurrentFrame.getStackAddendum(); // eslint-disable-next-line react-internal/warning-and-invariant-args + + for ( + var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; + _key < _len; + _key++ + ) { + args[_key - 2] = arguments[_key]; + } + + warningWithoutStack$1.apply(void 0, [false, format + '%s'].concat(args, [stack])); + }; + } + + var warning$1 = warning; + + var Uninitialized = -1; + var Pending = 0; + var Resolved = 1; + var Rejected = 2; + function refineResolvedLazyComponent(lazyComponent) { + return lazyComponent._status === Resolved ? lazyComponent._result : null; + } + function initializeLazyComponentType(lazyComponent) { + if (lazyComponent._status === Uninitialized) { + lazyComponent._status = Pending; + var ctor = lazyComponent._ctor; + var thenable = ctor(); + lazyComponent._result = thenable; + thenable.then( + function (moduleObject) { + if (lazyComponent._status === Pending) { + var defaultExport = moduleObject.default; + + { + if (defaultExport === undefined) { + warning$1( + false, + 'lazy: Expected the result of a dynamic import() call. ' + + 'Instead received: %s\n\nYour code should look like: \n ' + + "const MyComponent = lazy(() => import('./MyComponent'))", + moduleObject, + ); + } + } + + lazyComponent._status = Resolved; + lazyComponent._result = defaultExport; + } + }, + function (error) { + if (lazyComponent._status === Pending) { + lazyComponent._status = Rejected; + lazyComponent._result = error; + } + }, + ); + } + } + + function getWrappedName(outerType, innerType, wrapperName) { + var functionName = innerType.displayName || innerType.name || ''; + return ( + outerType.displayName || + (functionName !== '' ? wrapperName + '(' + functionName + ')' : wrapperName) + ); + } + + function getComponentName(type) { + if (type == null) { + // Host root, text node or just invalid type. + return null; + } + + { + if (typeof type.tag === 'number') { + warningWithoutStack$1( + false, + 'Received an unexpected object in getComponentName(). ' + + 'This is likely a bug in React. Please file an issue.', + ); + } + } + + if (typeof type === 'function') { + return type.displayName || type.name || null; + } + + if (typeof type === 'string') { + return type; + } + + switch (type) { + case REACT_FRAGMENT_TYPE: + return 'Fragment'; + + case REACT_PORTAL_TYPE: + return 'Portal'; + + case REACT_PROFILER_TYPE: + return 'Profiler'; + + case REACT_STRICT_MODE_TYPE: + return 'StrictMode'; + + case REACT_SUSPENSE_TYPE: + return 'Suspense'; + + case REACT_SUSPENSE_LIST_TYPE: + return 'SuspenseList'; + } + + if (typeof type === 'object') { + switch (type.$$typeof) { + case REACT_CONTEXT_TYPE: + return 'Context.Consumer'; + + case REACT_PROVIDER_TYPE: + return 'Context.Provider'; + + case REACT_FORWARD_REF_TYPE: + return getWrappedName(type, type.render, 'ForwardRef'); + + case REACT_MEMO_TYPE: + return getComponentName(type.type); + + case REACT_LAZY_TYPE: { + var thenable = type; + var resolvedThenable = refineResolvedLazyComponent(thenable); + + if (resolvedThenable) { + return getComponentName(resolvedThenable); + } + + break; + } + } + } + + return null; + } + + /** + * Forked from fbjs/warning: + * https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js + * + * Only change is we use console.warn instead of console.error, + * and do nothing when 'console' is not supported. + * This really simplifies the code. + * --- + * Similar to invariant but only logs a warning if the condition is not met. + * This can be used to log issues in development environments in critical + * paths. Removing the logging code for production environments will keep the + * same logic and follow the same code paths. + */ + var lowPriorityWarningWithoutStack = function () {}; + + { + var printWarning = function (format) { + for ( + var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; + _key < _len; + _key++ + ) { + args[_key - 1] = arguments[_key]; + } + + var argIndex = 0; + var message = + 'Warning: ' + + format.replace(/%s/g, function () { + return args[argIndex++]; + }); + + if (typeof console !== 'undefined') { + console.warn(message); + } + + try { + // --- Welcome to debugging React --- + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + throw new Error(message); + } catch (x) {} + }; + + lowPriorityWarningWithoutStack = function (condition, format) { + if (format === undefined) { + throw new Error( + '`lowPriorityWarningWithoutStack(condition, format, ...args)` requires a warning ' + + 'message argument', + ); + } + + if (!condition) { + for ( + var _len2 = arguments.length, args = new Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; + _key2 < _len2; + _key2++ + ) { + args[_key2 - 2] = arguments[_key2]; + } + + printWarning.apply(void 0, [format].concat(args)); + } + }; + } + + var lowPriorityWarningWithoutStack$1 = lowPriorityWarningWithoutStack; + + var BEFORE_SLASH_RE = /^(.*)[\\\/]/; + var describeComponentFrame = function (name, source, ownerName) { + var sourceInfo = ''; + + if (source) { + var path = source.fileName; + var fileName = path.replace(BEFORE_SLASH_RE, ''); + + { + // In DEV, include code for a common special case: + // prefer "folder/index.js" instead of just "index.js". + if (/^index\./.test(fileName)) { + var match = path.match(BEFORE_SLASH_RE); + + if (match) { + var pathBeforeSlash = match[1]; + + if (pathBeforeSlash) { + var folderName = pathBeforeSlash.replace(BEFORE_SLASH_RE, ''); + fileName = folderName + '/' + fileName; + } + } + } + } + + sourceInfo = ' (at ' + fileName + ':' + source.lineNumber + ')'; + } else if (ownerName) { + sourceInfo = ' (created by ' + ownerName + ')'; + } + + return '\n in ' + (name || 'Unknown') + sourceInfo; + }; + + // Helps identify side effects in render-phase lifecycle hooks and setState + // reducers by double invoking them in Strict Mode. + + // To preserve the "Pause on caught exceptions" behavior of the debugger, we + // replay the begin phase of a failed component inside invokeGuardedCallback. + + // Warn about deprecated, async-unsafe lifecycles; relates to RFC #6: + + var warnAboutDeprecatedLifecycles = true; // Gather advanced timing metrics for Profiler subtrees. + + // Trace which interactions trigger each commit. + + // SSR experiments + + var enableSuspenseServerRenderer = false; + // Only used in www builds. + + // Only used in www builds. + + // Disable javascript: URL strings in href for XSS protection. + + var disableJavaScriptURLs = false; // React Fire: prevent the value and checked attributes from syncing + // with their related DOM properties + + // These APIs will no longer be "unstable" in the upcoming 16.7 release, + // Control this behavior with a flag to support 16.6 minor releases in the meanwhile. + + // Experimental React Flare event system and event components support. + + var enableFlareAPI = false; // Experimental Host Component support. + + var enableFundamentalAPI = false; // Experimental Scope support. + + var enableScopeAPI = false; // New API for JSX transforms to target - https://github.com/reactjs/rfcs/pull/107 + + // We will enforce mocking scheduler with scheduler/unstable_mock at some point. (v17?) + // Till then, we warn about the missing mock, but still fallback to a legacy mode compatible version + + // For tests, we flush suspense fallbacks in an act scope; + // *except* in some of our own tests, where we test incremental loading states. + + // Add a callback property to suspense to notify which promises are currently + // in the update queue. This allows reporting and tracing of what is causing + // the user to see a loading state. + // Also allows hydration callbacks to fire when a dehydrated boundary gets + // hydrated or deleted. + + // Part of the simplification of React.createElement so we can eventually move + // from React.createElement to React.jsx + // https://github.com/reactjs/rfcs/blob/createlement-rfc/text/0000-create-element-changes.md + + var disableLegacyContext = false; + + // Flag to turn event.target and event.currentTarget in ReactNative from a reactTag to a component instance + + var ReactDebugCurrentFrame$1; + var didWarnAboutInvalidateContextType; + + { + ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame; + didWarnAboutInvalidateContextType = new Set(); + } + + var emptyObject = {}; + + { + Object.freeze(emptyObject); + } + + function maskContext(type, context) { + var contextTypes = type.contextTypes; + + if (!contextTypes) { + return emptyObject; + } + + var maskedContext = {}; + + for (var contextName in contextTypes) { + maskedContext[contextName] = context[contextName]; + } + + return maskedContext; + } + + function checkContextTypes(typeSpecs, values, location) { + { + checkPropTypes( + typeSpecs, + values, + location, + 'Component', + ReactDebugCurrentFrame$1.getCurrentStack, + ); + } + } + + function validateContextBounds(context, threadID) { + // If we don't have enough slots in this context to store this threadID, + // fill it in without leaving any holes to ensure that the VM optimizes + // this as non-holey index properties. + // (Note: If `react` package is < 16.6, _threadCount is undefined.) + for (var i = context._threadCount | 0; i <= threadID; i++) { + // We assume that this is the same as the defaultValue which might not be + // true if we're rendering inside a secondary renderer but they are + // secondary because these use cases are very rare. + context[i] = context._currentValue2; + context._threadCount = i + 1; + } + } + function processContext(type, context, threadID, isClass) { + if (isClass) { + var contextType = type.contextType; + + { + if ('contextType' in type) { + var isValid = // Allow null for conditional declaration + contextType === null || + (contextType !== undefined && + contextType.$$typeof === REACT_CONTEXT_TYPE && + contextType._context === undefined); // Not a <Context.Consumer> + + if (!isValid && !didWarnAboutInvalidateContextType.has(type)) { + didWarnAboutInvalidateContextType.add(type); + var addendum = ''; + + if (contextType === undefined) { + addendum = + ' However, it is set to undefined. ' + + 'This can be caused by a typo or by mixing up named and default imports. ' + + 'This can also happen due to a circular dependency, so ' + + 'try moving the createContext() call to a separate file.'; + } else if (typeof contextType !== 'object') { + addendum = ' However, it is set to a ' + typeof contextType + '.'; + } else if (contextType.$$typeof === REACT_PROVIDER_TYPE) { + addendum = ' Did you accidentally pass the Context.Provider instead?'; + } else if (contextType._context !== undefined) { + // <Context.Consumer> + addendum = ' Did you accidentally pass the Context.Consumer instead?'; + } else { + addendum = + ' However, it is set to an object with keys {' + + Object.keys(contextType).join(', ') + + '}.'; + } + + warningWithoutStack$1( + false, + '%s defines an invalid contextType. ' + + 'contextType should point to the Context object returned by React.createContext().%s', + getComponentName(type) || 'Component', + addendum, + ); + } + } + } + + if (typeof contextType === 'object' && contextType !== null) { + validateContextBounds(contextType, threadID); + return contextType[threadID]; + } + + if (disableLegacyContext) { + { + if (type.contextTypes) { + warningWithoutStack$1( + false, + '%s uses the legacy contextTypes API which is no longer supported. ' + + 'Use React.createContext() with static contextType instead.', + getComponentName(type) || 'Unknown', + ); + } + } + + return emptyObject; + } else { + var maskedContext = maskContext(type, context); + + { + if (type.contextTypes) { + checkContextTypes(type.contextTypes, maskedContext, 'context'); + } + } + + return maskedContext; + } + } else { + if (disableLegacyContext) { + { + if (type.contextTypes) { + warningWithoutStack$1( + false, + '%s uses the legacy contextTypes API which is no longer supported. ' + + 'Use React.createContext() with React.useContext() instead.', + getComponentName(type) || 'Unknown', + ); + } + } + + return undefined; + } else { + var _maskedContext = maskContext(type, context); + + { + if (type.contextTypes) { + checkContextTypes(type.contextTypes, _maskedContext, 'context'); + } + } + + return _maskedContext; + } + } + } + + // Allocates a new index for each request. Tries to stay as compact as possible so that these + // indices can be used to reference a tightly packed array. As opposed to being used in a Map. + // The first allocated index is 1. + var nextAvailableThreadIDs = new Uint16Array(16); + + for (var i = 0; i < 15; i++) { + nextAvailableThreadIDs[i] = i + 1; + } + + nextAvailableThreadIDs[15] = 0; + + function growThreadCountAndReturnNextAvailable() { + var oldArray = nextAvailableThreadIDs; + var oldSize = oldArray.length; + var newSize = oldSize * 2; + + if (!(newSize <= 0x10000)) { + { + throw Error( + 'Maximum number of concurrent React renderers exceeded. This can happen if you are not properly destroying the Readable provided by React. Ensure that you call .destroy() on it if you no longer want to read from it, and did not read to the end. If you use .pipe() this should be automatic.', + ); + } + } + + var newArray = new Uint16Array(newSize); + newArray.set(oldArray); + nextAvailableThreadIDs = newArray; + nextAvailableThreadIDs[0] = oldSize + 1; + + for (var _i = oldSize; _i < newSize - 1; _i++) { + nextAvailableThreadIDs[_i] = _i + 1; + } + + nextAvailableThreadIDs[newSize - 1] = 0; + return oldSize; + } + + function allocThreadID() { + var nextID = nextAvailableThreadIDs[0]; + + if (nextID === 0) { + return growThreadCountAndReturnNextAvailable(); + } + + nextAvailableThreadIDs[0] = nextAvailableThreadIDs[nextID]; + return nextID; + } + function freeThreadID(id) { + nextAvailableThreadIDs[id] = nextAvailableThreadIDs[0]; + nextAvailableThreadIDs[0] = id; + } + + // A reserved attribute. + // It is handled by React separately and shouldn't be written to the DOM. + var RESERVED = 0; // A simple string attribute. + // Attributes that aren't in the whitelist are presumed to have this type. + + var STRING = 1; // A string attribute that accepts booleans in React. In HTML, these are called + // "enumerated" attributes with "true" and "false" as possible values. + // When true, it should be set to a "true" string. + // When false, it should be set to a "false" string. + + var BOOLEANISH_STRING = 2; // A real boolean attribute. + // When true, it should be present (set either to an empty string or its name). + // When false, it should be omitted. + + var BOOLEAN = 3; // An attribute that can be used as a flag as well as with a value. + // When true, it should be present (set either to an empty string or its name). + // When false, it should be omitted. + // For any other value, should be present with that value. + + var OVERLOADED_BOOLEAN = 4; // An attribute that must be numeric or parse as a numeric. + // When falsy, it should be removed. + + var NUMERIC = 5; // An attribute that must be positive numeric or parse as a positive numeric. + // When falsy, it should be removed. + + var POSITIVE_NUMERIC = 6; + + /* eslint-disable max-len */ + var ATTRIBUTE_NAME_START_CHAR = + ':A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD'; + /* eslint-enable max-len */ + + var ATTRIBUTE_NAME_CHAR = + ATTRIBUTE_NAME_START_CHAR + '\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040'; + + var ROOT_ATTRIBUTE_NAME = 'data-reactroot'; + var VALID_ATTRIBUTE_NAME_REGEX = new RegExp( + '^[' + ATTRIBUTE_NAME_START_CHAR + '][' + ATTRIBUTE_NAME_CHAR + ']*$', + ); + var hasOwnProperty$1 = Object.prototype.hasOwnProperty; + var illegalAttributeNameCache = {}; + var validatedAttributeNameCache = {}; + function isAttributeNameSafe(attributeName) { + if (hasOwnProperty$1.call(validatedAttributeNameCache, attributeName)) { + return true; + } + + if (hasOwnProperty$1.call(illegalAttributeNameCache, attributeName)) { + return false; + } + + if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) { + validatedAttributeNameCache[attributeName] = true; + return true; + } + + illegalAttributeNameCache[attributeName] = true; + + { + warning$1(false, 'Invalid attribute name: `%s`', attributeName); + } + + return false; + } + function shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag) { + if (propertyInfo !== null) { + return propertyInfo.type === RESERVED; + } + + if (isCustomComponentTag) { + return false; + } + + if ( + name.length > 2 && + (name[0] === 'o' || name[0] === 'O') && + (name[1] === 'n' || name[1] === 'N') + ) { + return true; + } + + return false; + } + function shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag) { + if (propertyInfo !== null && propertyInfo.type === RESERVED) { + return false; + } + + switch (typeof value) { + case 'function': // $FlowIssue symbol is perfectly valid here + + case 'symbol': + // eslint-disable-line + return true; + + case 'boolean': { + if (isCustomComponentTag) { + return false; + } + + if (propertyInfo !== null) { + return !propertyInfo.acceptsBooleans; + } else { + var prefix = name.toLowerCase().slice(0, 5); + return prefix !== 'data-' && prefix !== 'aria-'; + } + } + + default: + return false; + } + } + function shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag) { + if (value === null || typeof value === 'undefined') { + return true; + } + + if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag)) { + return true; + } + + if (isCustomComponentTag) { + return false; + } + + if (propertyInfo !== null) { + switch (propertyInfo.type) { + case BOOLEAN: + return !value; + + case OVERLOADED_BOOLEAN: + return value === false; + + case NUMERIC: + return isNaN(value); + + case POSITIVE_NUMERIC: + return isNaN(value) || value < 1; + } + } + + return false; + } + function getPropertyInfo(name) { + return properties.hasOwnProperty(name) ? properties[name] : null; + } + + function PropertyInfoRecord( + name, + type, + mustUseProperty, + attributeName, + attributeNamespace, + sanitizeURL, + ) { + this.acceptsBooleans = + type === BOOLEANISH_STRING || type === BOOLEAN || type === OVERLOADED_BOOLEAN; + this.attributeName = attributeName; + this.attributeNamespace = attributeNamespace; + this.mustUseProperty = mustUseProperty; + this.propertyName = name; + this.type = type; + this.sanitizeURL = sanitizeURL; + } // When adding attributes to this list, be sure to also add them to + // the `possibleStandardNames` module to ensure casing and incorrect + // name warnings. + + var properties = {}; // These props are reserved by React. They shouldn't be written to the DOM. + + [ + 'children', + 'dangerouslySetInnerHTML', // TODO: This prevents the assignment of defaultValue to regular + // elements (not just inputs). Now that ReactDOMInput assigns to the + // defaultValue property -- do we need this? + 'defaultValue', + 'defaultChecked', + 'innerHTML', + 'suppressContentEditableWarning', + 'suppressHydrationWarning', + 'style', + ].forEach(function (name) { + properties[name] = new PropertyInfoRecord( + name, + RESERVED, + false, // mustUseProperty + name, // attributeName + null, // attributeNamespace + false, + ); + }); // A few React string attributes have a different name. + // This is a mapping from React prop names to the attribute names. + + [ + ['acceptCharset', 'accept-charset'], + ['className', 'class'], + ['htmlFor', 'for'], + ['httpEquiv', 'http-equiv'], + ].forEach(function (_ref) { + var name = _ref[0], + attributeName = _ref[1]; + properties[name] = new PropertyInfoRecord( + name, + STRING, + false, // mustUseProperty + attributeName, // attributeName + null, // attributeNamespace + false, + ); + }); // These are "enumerated" HTML attributes that accept "true" and "false". + // In React, we let users pass `true` and `false` even though technically + // these aren't boolean attributes (they are coerced to strings). + + ['contentEditable', 'draggable', 'spellCheck', 'value'].forEach(function (name) { + properties[name] = new PropertyInfoRecord( + name, + BOOLEANISH_STRING, + false, // mustUseProperty + name.toLowerCase(), // attributeName + null, // attributeNamespace + false, + ); + }); // These are "enumerated" SVG attributes that accept "true" and "false". + // In React, we let users pass `true` and `false` even though technically + // these aren't boolean attributes (they are coerced to strings). + // Since these are SVG attributes, their attribute names are case-sensitive. + + ['autoReverse', 'externalResourcesRequired', 'focusable', 'preserveAlpha'].forEach(function (name) { + properties[name] = new PropertyInfoRecord( + name, + BOOLEANISH_STRING, + false, // mustUseProperty + name, // attributeName + null, // attributeNamespace + false, + ); + }); // These are HTML boolean attributes. + + [ + 'allowFullScreen', + 'async', // Note: there is a special case that prevents it from being written to the DOM + // on the client side because the browsers are inconsistent. Instead we call focus(). + 'autoFocus', + 'autoPlay', + 'controls', + 'default', + 'defer', + 'disabled', + 'disablePictureInPicture', + 'formNoValidate', + 'hidden', + 'loop', + 'noModule', + 'noValidate', + 'open', + 'playsInline', + 'readOnly', + 'required', + 'reversed', + 'scoped', + 'seamless', // Microdata + 'itemScope', + ].forEach(function (name) { + properties[name] = new PropertyInfoRecord( + name, + BOOLEAN, + false, // mustUseProperty + name.toLowerCase(), // attributeName + null, // attributeNamespace + false, + ); + }); // These are the few React props that we set as DOM properties + // rather than attributes. These are all booleans. + + [ + 'checked', // Note: `option.selected` is not updated if `select.multiple` is + // disabled with `removeAttribute`. We have special logic for handling this. + 'multiple', + 'muted', + 'selected', + ].forEach(function (name) { + properties[name] = new PropertyInfoRecord( + name, + BOOLEAN, + true, // mustUseProperty + name, // attributeName + null, // attributeNamespace + false, + ); + }); // These are HTML attributes that are "overloaded booleans": they behave like + // booleans, but can also accept a string value. + + ['capture', 'download'].forEach(function (name) { + properties[name] = new PropertyInfoRecord( + name, + OVERLOADED_BOOLEAN, + false, // mustUseProperty + name, // attributeName + null, // attributeNamespace + false, + ); + }); // These are HTML attributes that must be positive numbers. + + ['cols', 'rows', 'size', 'span'].forEach(function (name) { + properties[name] = new PropertyInfoRecord( + name, + POSITIVE_NUMERIC, + false, // mustUseProperty + name, // attributeName + null, // attributeNamespace + false, + ); + }); // These are HTML attributes that must be numbers. + + ['rowSpan', 'start'].forEach(function (name) { + properties[name] = new PropertyInfoRecord( + name, + NUMERIC, + false, // mustUseProperty + name.toLowerCase(), // attributeName + null, // attributeNamespace + false, + ); + }); + var CAMELIZE = /[\-\:]([a-z])/g; + + var capitalize = function (token) { + return token[1].toUpperCase(); + }; // This is a list of all SVG attributes that need special casing, namespacing, + // or boolean value assignment. Regular attributes that just accept strings + // and have the same names are omitted, just like in the HTML whitelist. + // Some of these attributes can be hard to find. This list was created by + // scrapping the MDN documentation. + + [ + 'accent-height', + 'alignment-baseline', + 'arabic-form', + 'baseline-shift', + 'cap-height', + 'clip-path', + 'clip-rule', + 'color-interpolation', + 'color-interpolation-filters', + 'color-profile', + 'color-rendering', + 'dominant-baseline', + 'enable-background', + 'fill-opacity', + 'fill-rule', + 'flood-color', + 'flood-opacity', + 'font-family', + 'font-size', + 'font-size-adjust', + 'font-stretch', + 'font-style', + 'font-variant', + 'font-weight', + 'glyph-name', + 'glyph-orientation-horizontal', + 'glyph-orientation-vertical', + 'horiz-adv-x', + 'horiz-origin-x', + 'image-rendering', + 'letter-spacing', + 'lighting-color', + 'marker-end', + 'marker-mid', + 'marker-start', + 'overline-position', + 'overline-thickness', + 'paint-order', + 'panose-1', + 'pointer-events', + 'rendering-intent', + 'shape-rendering', + 'stop-color', + 'stop-opacity', + 'strikethrough-position', + 'strikethrough-thickness', + 'stroke-dasharray', + 'stroke-dashoffset', + 'stroke-linecap', + 'stroke-linejoin', + 'stroke-miterlimit', + 'stroke-opacity', + 'stroke-width', + 'text-anchor', + 'text-decoration', + 'text-rendering', + 'underline-position', + 'underline-thickness', + 'unicode-bidi', + 'unicode-range', + 'units-per-em', + 'v-alphabetic', + 'v-hanging', + 'v-ideographic', + 'v-mathematical', + 'vector-effect', + 'vert-adv-y', + 'vert-origin-x', + 'vert-origin-y', + 'word-spacing', + 'writing-mode', + 'xmlns:xlink', + 'x-height', + ].forEach(function (attributeName) { + var name = attributeName.replace(CAMELIZE, capitalize); + properties[name] = new PropertyInfoRecord( + name, + STRING, + false, // mustUseProperty + attributeName, + null, // attributeNamespace + false, + ); + }); // String SVG attributes with the xlink namespace. + + ['xlink:actuate', 'xlink:arcrole', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type'].forEach( + function (attributeName) { + var name = attributeName.replace(CAMELIZE, capitalize); + properties[name] = new PropertyInfoRecord( + name, + STRING, + false, // mustUseProperty + attributeName, + 'http://www.w3.org/1999/xlink', + false, + ); + }, + ); // String SVG attributes with the xml namespace. + + ['xml:base', 'xml:lang', 'xml:space'].forEach(function (attributeName) { + var name = attributeName.replace(CAMELIZE, capitalize); + properties[name] = new PropertyInfoRecord( + name, + STRING, + false, // mustUseProperty + attributeName, + 'http://www.w3.org/XML/1998/namespace', + false, + ); + }); // These attribute exists both in HTML and SVG. + // The attribute name is case-sensitive in SVG so we can't just use + // the React name like we do for attributes that exist only in HTML. + + ['tabIndex', 'crossOrigin'].forEach(function (attributeName) { + properties[attributeName] = new PropertyInfoRecord( + attributeName, + STRING, + false, // mustUseProperty + attributeName.toLowerCase(), // attributeName + null, // attributeNamespace + false, + ); + }); // These attributes accept URLs. These must not allow javascript: URLS. + // These will also need to accept Trusted Types object in the future. + + var xlinkHref = 'xlinkHref'; + properties[xlinkHref] = new PropertyInfoRecord( + 'xlinkHref', + STRING, + false, // mustUseProperty + 'xlink:href', + 'http://www.w3.org/1999/xlink', + true, + ); + ['src', 'href', 'action', 'formAction'].forEach(function (attributeName) { + properties[attributeName] = new PropertyInfoRecord( + attributeName, + STRING, + false, // mustUseProperty + attributeName.toLowerCase(), // attributeName + null, // attributeNamespace + true, + ); + }); + + var ReactDebugCurrentFrame$2 = null; + + { + ReactDebugCurrentFrame$2 = ReactSharedInternals.ReactDebugCurrentFrame; + } // A javascript: URL can contain leading C0 control or \u0020 SPACE, + // and any newline or tab are filtered out as if they're not part of the URL. + // https://url.spec.whatwg.org/#url-parsing + // Tab or newline are defined as \r\n\t: + // https://infra.spec.whatwg.org/#ascii-tab-or-newline + // A C0 control is a code point in the range \u0000 NULL to \u001F + // INFORMATION SEPARATOR ONE, inclusive: + // https://infra.spec.whatwg.org/#c0-control-or-space + + /* eslint-disable max-len */ + + var isJavaScriptProtocol = + /^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i; + var didWarn = false; + + function sanitizeURL(url) { + if (disableJavaScriptURLs) { + if (!!isJavaScriptProtocol.test(url)) { + { + throw Error( + 'React has blocked a javascript: URL as a security precaution.' + + ReactDebugCurrentFrame$2.getStackAddendum(), + ); + } + } + } else if (true && !didWarn && isJavaScriptProtocol.test(url)) { + didWarn = true; + warning$1( + false, + 'A future version of React will block javascript: URLs as a security precaution. ' + + 'Use event handlers instead if you can. If you need to generate unsafe HTML try ' + + 'using dangerouslySetInnerHTML instead. React was passed %s.', + JSON.stringify(url), + ); + } + } + + // code copied and modified from escape-html + + /** + * Module variables. + * @private + */ + var matchHtmlRegExp = /["'&<>]/; + /** + * Escapes special characters and HTML entities in a given html string. + * + * @param {string} string HTML string to escape for later insertion + * @return {string} + * @public + */ + + function escapeHtml(string) { + var str = '' + string; + var match = matchHtmlRegExp.exec(str); + + if (!match) { + return str; + } + + var escape; + var html = ''; + var index; + var lastIndex = 0; + + for (index = match.index; index < str.length; index++) { + switch (str.charCodeAt(index)) { + case 34: + // " + escape = '"'; + break; + + case 38: + // & + escape = '&'; + break; + + case 39: + // ' + escape = '''; // modified from escape-html; used to be ''' + + break; + + case 60: + // < + escape = '<'; + break; + + case 62: + // > + escape = '>'; + break; + + default: + continue; + } + + if (lastIndex !== index) { + html += str.substring(lastIndex, index); + } + + lastIndex = index + 1; + html += escape; + } + + return lastIndex !== index ? html + str.substring(lastIndex, index) : html; + } // end code copied and modified from escape-html + + /** + * Escapes text to prevent scripting attacks. + * + * @param {*} text Text value to escape. + * @return {string} An escaped string. + */ + + function escapeTextForBrowser(text) { + if (typeof text === 'boolean' || typeof text === 'number') { + // this shortcircuit helps perf for types that we know will never have + // special characters, especially given that this function is used often + // for numeric dom ids. + return '' + text; + } + + return escapeHtml(text); + } + + /** + * Escapes attribute value to prevent scripting attacks. + * + * @param {*} value Value to escape. + * @return {string} An escaped string. + */ + + function quoteAttributeValueForBrowser(value) { + return '"' + escapeTextForBrowser(value) + '"'; + } + + /** + * Operations for dealing with DOM properties. + */ + + /** + * Creates markup for the ID property. + * + * @param {string} id Unescaped ID. + * @return {string} Markup string. + */ + + function createMarkupForRoot() { + return ROOT_ATTRIBUTE_NAME + '=""'; + } + /** + * Creates markup for a property. + * + * @param {string} name + * @param {*} value + * @return {?string} Markup string, or null if the property was invalid. + */ + + function createMarkupForProperty(name, value) { + var propertyInfo = getPropertyInfo(name); + + if (name !== 'style' && shouldIgnoreAttribute(name, propertyInfo, false)) { + return ''; + } + + if (shouldRemoveAttribute(name, value, propertyInfo, false)) { + return ''; + } + + if (propertyInfo !== null) { + var attributeName = propertyInfo.attributeName; + var type = propertyInfo.type; + + if (type === BOOLEAN || (type === OVERLOADED_BOOLEAN && value === true)) { + return attributeName + '=""'; + } else { + if (propertyInfo.sanitizeURL) { + value = '' + value; + sanitizeURL(value); + } + + return attributeName + '=' + quoteAttributeValueForBrowser(value); + } + } else if (isAttributeNameSafe(name)) { + return name + '=' + quoteAttributeValueForBrowser(value); + } + + return ''; + } + /** + * Creates markup for a custom property. + * + * @param {string} name + * @param {*} value + * @return {string} Markup string, or empty string if the property was invalid. + */ + + function createMarkupForCustomAttribute(name, value) { + if (!isAttributeNameSafe(name) || value == null) { + return ''; + } + + return name + '=' + quoteAttributeValueForBrowser(value); + } + + /** + * inlined Object.is polyfill to avoid requiring consumers ship their own + * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is + */ + function is(x, y) { + return ( + (x === y && (x !== 0 || 1 / x === 1 / y)) || (x !== x && y !== y) // eslint-disable-line no-self-compare + ); + } + + var is$1 = typeof Object.is === 'function' ? Object.is : is; + + var currentlyRenderingComponent = null; + var firstWorkInProgressHook = null; + var workInProgressHook = null; // Whether the work-in-progress hook is a re-rendered hook + + var isReRender = false; // Whether an update was scheduled during the currently executing render pass. + + var didScheduleRenderPhaseUpdate = false; // Lazily created map of render-phase updates + + var renderPhaseUpdates = null; // Counter to prevent infinite loops. + + var numberOfReRenders = 0; + var RE_RENDER_LIMIT = 25; + var isInHookUserCodeInDev = false; // In DEV, this is the name of the currently executing primitive hook + + var currentHookNameInDev; + + function resolveCurrentlyRenderingComponent() { + if (!(currentlyRenderingComponent !== null)) { + { + throw Error( + 'Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.', + ); + } + } + + { + !!isInHookUserCodeInDev + ? warning$1( + false, + 'Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. ' + + 'You can only call Hooks at the top level of your React function. ' + + 'For more information, see ' + + 'https://fb.me/rules-of-hooks', + ) + : void 0; + } + + return currentlyRenderingComponent; + } + + function areHookInputsEqual(nextDeps, prevDeps) { + if (prevDeps === null) { + { + warning$1( + false, + '%s received a final argument during this render, but not during ' + + 'the previous render. Even though the final argument is optional, ' + + 'its type cannot change between renders.', + currentHookNameInDev, + ); + } + + return false; + } + + { + // Don't bother comparing lengths in prod because these arrays should be + // passed inline. + if (nextDeps.length !== prevDeps.length) { + warning$1( + false, + 'The final argument passed to %s changed size between renders. The ' + + 'order and size of this array must remain constant.\n\n' + + 'Previous: %s\n' + + 'Incoming: %s', + currentHookNameInDev, + '[' + nextDeps.join(', ') + ']', + '[' + prevDeps.join(', ') + ']', + ); + } + } + + for (var i = 0; i < prevDeps.length && i < nextDeps.length; i++) { + if (is$1(nextDeps[i], prevDeps[i])) { + continue; + } + + return false; + } + + return true; + } + + function createHook() { + if (numberOfReRenders > 0) { + { + { + throw Error('Rendered more hooks than during the previous render'); + } + } + } + + return { + memoizedState: null, + queue: null, + next: null, + }; + } + + function createWorkInProgressHook() { + if (workInProgressHook === null) { + // This is the first hook in the list + if (firstWorkInProgressHook === null) { + isReRender = false; + firstWorkInProgressHook = workInProgressHook = createHook(); + } else { + // There's already a work-in-progress. Reuse it. + isReRender = true; + workInProgressHook = firstWorkInProgressHook; + } + } else { + if (workInProgressHook.next === null) { + isReRender = false; // Append to the end of the list + + workInProgressHook = workInProgressHook.next = createHook(); + } else { + // There's already a work-in-progress. Reuse it. + isReRender = true; + workInProgressHook = workInProgressHook.next; + } + } + + return workInProgressHook; + } + + function prepareToUseHooks(componentIdentity) { + currentlyRenderingComponent = componentIdentity; + + { + isInHookUserCodeInDev = false; + } // The following should have already been reset + // didScheduleRenderPhaseUpdate = false; + // firstWorkInProgressHook = null; + // numberOfReRenders = 0; + // renderPhaseUpdates = null; + // workInProgressHook = null; + } + function finishHooks(Component, props, children, refOrContext) { + // This must be called after every function component to prevent hooks from + // being used in classes. + while (didScheduleRenderPhaseUpdate) { + // Updates were scheduled during the render phase. They are stored in + // the `renderPhaseUpdates` map. Call the component again, reusing the + // work-in-progress hooks and applying the additional updates on top. Keep + // restarting until no more updates are scheduled. + didScheduleRenderPhaseUpdate = false; + numberOfReRenders += 1; // Start over from the beginning of the list + + workInProgressHook = null; + children = Component(props, refOrContext); + } + + currentlyRenderingComponent = null; + firstWorkInProgressHook = null; + numberOfReRenders = 0; + renderPhaseUpdates = null; + workInProgressHook = null; + + { + isInHookUserCodeInDev = false; + } // These were reset above + // currentlyRenderingComponent = null; + // didScheduleRenderPhaseUpdate = false; + // firstWorkInProgressHook = null; + // numberOfReRenders = 0; + // renderPhaseUpdates = null; + // workInProgressHook = null; + + return children; + } + + function readContext(context, observedBits) { + var threadID = currentThreadID; + validateContextBounds(context, threadID); + + { + !!isInHookUserCodeInDev + ? warning$1( + false, + 'Context can only be read while React is rendering. ' + + 'In classes, you can read it in the render method or getDerivedStateFromProps. ' + + 'In function components, you can read it directly in the function body, but not ' + + 'inside Hooks like useReducer() or useMemo().', + ) + : void 0; + } + + return context[threadID]; + } + + function useContext(context, observedBits) { + { + currentHookNameInDev = 'useContext'; + } + + resolveCurrentlyRenderingComponent(); + var threadID = currentThreadID; + validateContextBounds(context, threadID); + return context[threadID]; + } + + function basicStateReducer(state, action) { + return typeof action === 'function' ? action(state) : action; + } + + function useState(initialState) { + { + currentHookNameInDev = 'useState'; + } + + return useReducer( + basicStateReducer, // useReducer has a special case to support lazy useState initializers + initialState, + ); + } + function useReducer(reducer, initialArg, init) { + { + if (reducer !== basicStateReducer) { + currentHookNameInDev = 'useReducer'; + } + } + + currentlyRenderingComponent = resolveCurrentlyRenderingComponent(); + workInProgressHook = createWorkInProgressHook(); + + if (isReRender) { + // This is a re-render. Apply the new render phase updates to the previous + // current hook. + var queue = workInProgressHook.queue; + var dispatch = queue.dispatch; + + if (renderPhaseUpdates !== null) { + // Render phase updates are stored in a map of queue -> linked list + var firstRenderPhaseUpdate = renderPhaseUpdates.get(queue); + + if (firstRenderPhaseUpdate !== undefined) { + renderPhaseUpdates.delete(queue); + var newState = workInProgressHook.memoizedState; + var update = firstRenderPhaseUpdate; + + do { + // Process this render phase update. We don't have to check the + // priority because it will always be the same as the current + // render's. + var action = update.action; + + { + isInHookUserCodeInDev = true; + } + + newState = reducer(newState, action); + + { + isInHookUserCodeInDev = false; + } + + update = update.next; + } while (update !== null); + + workInProgressHook.memoizedState = newState; + return [newState, dispatch]; + } + } + + return [workInProgressHook.memoizedState, dispatch]; + } else { + { + isInHookUserCodeInDev = true; + } + + var initialState; + + if (reducer === basicStateReducer) { + // Special case for `useState`. + initialState = typeof initialArg === 'function' ? initialArg() : initialArg; + } else { + initialState = init !== undefined ? init(initialArg) : initialArg; + } + + { + isInHookUserCodeInDev = false; + } + + workInProgressHook.memoizedState = initialState; + + var _queue = (workInProgressHook.queue = { + last: null, + dispatch: null, + }); + + var _dispatch = (_queue.dispatch = dispatchAction.bind( + null, + currentlyRenderingComponent, + _queue, + )); + + return [workInProgressHook.memoizedState, _dispatch]; + } + } + + function useMemo(nextCreate, deps) { + currentlyRenderingComponent = resolveCurrentlyRenderingComponent(); + workInProgressHook = createWorkInProgressHook(); + var nextDeps = deps === undefined ? null : deps; + + if (workInProgressHook !== null) { + var prevState = workInProgressHook.memoizedState; + + if (prevState !== null) { + if (nextDeps !== null) { + var prevDeps = prevState[1]; + + if (areHookInputsEqual(nextDeps, prevDeps)) { + return prevState[0]; + } + } + } + } + + { + isInHookUserCodeInDev = true; + } + + var nextValue = nextCreate(); + + { + isInHookUserCodeInDev = false; + } + + workInProgressHook.memoizedState = [nextValue, nextDeps]; + return nextValue; + } + + function useRef(initialValue) { + currentlyRenderingComponent = resolveCurrentlyRenderingComponent(); + workInProgressHook = createWorkInProgressHook(); + var previousRef = workInProgressHook.memoizedState; + + if (previousRef === null) { + var ref = { + current: initialValue, + }; + + { + Object.seal(ref); + } + + workInProgressHook.memoizedState = ref; + return ref; + } else { + return previousRef; + } + } + + function useLayoutEffect(create, inputs) { + { + currentHookNameInDev = 'useLayoutEffect'; + } + + warning$1( + false, + 'useLayoutEffect does nothing on the server, because its effect cannot ' + + "be encoded into the server renderer's output format. This will lead " + + 'to a mismatch between the initial, non-hydrated UI and the intended ' + + 'UI. To avoid this, useLayoutEffect should only be used in ' + + 'components that render exclusively on the client. ' + + 'See https://fb.me/react-uselayouteffect-ssr for common fixes.', + ); + } + + function dispatchAction(componentIdentity, queue, action) { + if (!(numberOfReRenders < RE_RENDER_LIMIT)) { + { + throw Error( + 'Too many re-renders. React limits the number of renders to prevent an infinite loop.', + ); + } + } + + if (componentIdentity === currentlyRenderingComponent) { + // This is a render phase update. Stash it in a lazily-created map of + // queue -> linked list of updates. After this render pass, we'll restart + // and apply the stashed updates on top of the work-in-progress hook. + didScheduleRenderPhaseUpdate = true; + var update = { + action: action, + next: null, + }; + + if (renderPhaseUpdates === null) { + renderPhaseUpdates = new Map(); + } + + var firstRenderPhaseUpdate = renderPhaseUpdates.get(queue); + + if (firstRenderPhaseUpdate === undefined) { + renderPhaseUpdates.set(queue, update); + } else { + // Append the update to the end of the list. + var lastRenderPhaseUpdate = firstRenderPhaseUpdate; + + while (lastRenderPhaseUpdate.next !== null) { + lastRenderPhaseUpdate = lastRenderPhaseUpdate.next; + } + + lastRenderPhaseUpdate.next = update; + } + } else { + // This means an update has happened after the function component has + // returned. On the server this is a no-op. In React Fiber, the update + // would be scheduled for a future render. + } + } + + function useCallback(callback, deps) { + // Callbacks are passed as they are in the server environment. + return callback; + } + + function useResponder(responder, props) { + return { + props: props, + responder: responder, + }; + } + + function useDeferredValue(value, config) { + resolveCurrentlyRenderingComponent(); + return value; + } + + function useTransition(config) { + resolveCurrentlyRenderingComponent(); + + var startTransition = function (callback) { + callback(); + }; + + return [startTransition, false]; + } + + function noop() {} + + var currentThreadID = 0; + function setCurrentThreadID(threadID) { + currentThreadID = threadID; + } + var Dispatcher = { + readContext: readContext, + useContext: useContext, + useMemo: useMemo, + useReducer: useReducer, + useRef: useRef, + useState: useState, + useLayoutEffect: useLayoutEffect, + useCallback: useCallback, + // useImperativeHandle is not run in the server environment + useImperativeHandle: noop, + // Effects are not run in the server environment. + useEffect: noop, + // Debugging effect + useDebugValue: noop, + useResponder: useResponder, + useDeferredValue: useDeferredValue, + useTransition: useTransition, + }; + + var HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml'; + var MATH_NAMESPACE = 'http://www.w3.org/1998/Math/MathML'; + var SVG_NAMESPACE = 'http://www.w3.org/2000/svg'; + var Namespaces = { + html: HTML_NAMESPACE, + mathml: MATH_NAMESPACE, + svg: SVG_NAMESPACE, + }; // Assumes there is no parent namespace. + + function getIntrinsicNamespace(type) { + switch (type) { + case 'svg': + return SVG_NAMESPACE; + + case 'math': + return MATH_NAMESPACE; + + default: + return HTML_NAMESPACE; + } + } + function getChildNamespace(parentNamespace, type) { + if (parentNamespace == null || parentNamespace === HTML_NAMESPACE) { + // No (or default) parent namespace: potential entry point. + return getIntrinsicNamespace(type); + } + + if (parentNamespace === SVG_NAMESPACE && type === 'foreignObject') { + // We're leaving SVG. + return HTML_NAMESPACE; + } // By default, pass namespace below. + + return parentNamespace; + } + + var ReactDebugCurrentFrame$3 = null; + var ReactControlledValuePropTypes = { + checkPropTypes: null, + }; + + { + ReactDebugCurrentFrame$3 = ReactSharedInternals.ReactDebugCurrentFrame; + var hasReadOnlyValue = { + button: true, + checkbox: true, + image: true, + hidden: true, + radio: true, + reset: true, + submit: true, + }; + var propTypes = { + value: function (props, propName, componentName) { + if ( + hasReadOnlyValue[props.type] || + props.onChange || + props.readOnly || + props.disabled || + props[propName] == null || + (enableFlareAPI && props.listeners) + ) { + return null; + } + + return new Error( + 'You provided a `value` prop to a form field without an ' + + '`onChange` handler. This will render a read-only field. If ' + + 'the field should be mutable use `defaultValue`. Otherwise, ' + + 'set either `onChange` or `readOnly`.', + ); + }, + checked: function (props, propName, componentName) { + if ( + props.onChange || + props.readOnly || + props.disabled || + props[propName] == null || + (enableFlareAPI && props.listeners) + ) { + return null; + } + + return new Error( + 'You provided a `checked` prop to a form field without an ' + + '`onChange` handler. This will render a read-only field. If ' + + 'the field should be mutable use `defaultChecked`. Otherwise, ' + + 'set either `onChange` or `readOnly`.', + ); + }, + }; + /** + * Provide a linked `value` attribute for controlled forms. You should not use + * this outside of the ReactDOM controlled form components. + */ + + ReactControlledValuePropTypes.checkPropTypes = function (tagName, props) { + checkPropTypes(propTypes, props, 'prop', tagName, ReactDebugCurrentFrame$3.getStackAddendum); + }; + } + + // For HTML, certain tags should omit their close tag. We keep a whitelist for + // those special-case tags. + var omittedCloseTags = { + area: true, + base: true, + br: true, + col: true, + embed: true, + hr: true, + img: true, + input: true, + keygen: true, + link: true, + meta: true, + param: true, + source: true, + track: true, + wbr: true, // NOTE: menuitem's close tag should be omitted, but that causes problems. + }; + + // `omittedCloseTags` except that `menuitem` should still have its closing tag. + + var voidElementTags = _assign( + { + menuitem: true, + }, + omittedCloseTags, + ); + + // or add stack by default to invariants where possible. + + var HTML = '__html'; + var ReactDebugCurrentFrame$4 = null; + + { + ReactDebugCurrentFrame$4 = ReactSharedInternals.ReactDebugCurrentFrame; + } + + function assertValidProps(tag, props) { + if (!props) { + return; + } // Note the use of `==` which checks for null or undefined. + + if (voidElementTags[tag]) { + if (!(props.children == null && props.dangerouslySetInnerHTML == null)) { + { + throw Error( + tag + + ' is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.' + + ReactDebugCurrentFrame$4.getStackAddendum(), + ); + } + } + } + + if (props.dangerouslySetInnerHTML != null) { + if (!(props.children == null)) { + { + throw Error('Can only set one of `children` or `props.dangerouslySetInnerHTML`.'); + } + } + + if ( + !(typeof props.dangerouslySetInnerHTML === 'object' && HTML in props.dangerouslySetInnerHTML) + ) { + { + throw Error( + '`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://fb.me/react-invariant-dangerously-set-inner-html for more information.', + ); + } + } + } + + { + !(props.suppressContentEditableWarning || !props.contentEditable || props.children == null) + ? warning$1( + false, + 'A component is `contentEditable` and contains `children` managed by ' + + 'React. It is now your responsibility to guarantee that none of ' + + 'those nodes are unexpectedly modified or duplicated. This is ' + + 'probably not intentional.', + ) + : void 0; + } + + if (!(props.style == null || typeof props.style === 'object')) { + { + throw Error( + "The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX." + + ReactDebugCurrentFrame$4.getStackAddendum(), + ); + } + } + } + + /** + * CSS properties which accept numbers but are not in units of "px". + */ + var isUnitlessNumber = { + animationIterationCount: true, + borderImageOutset: true, + borderImageSlice: true, + borderImageWidth: true, + boxFlex: true, + boxFlexGroup: true, + boxOrdinalGroup: true, + columnCount: true, + columns: true, + flex: true, + flexGrow: true, + flexPositive: true, + flexShrink: true, + flexNegative: true, + flexOrder: true, + gridArea: true, + gridRow: true, + gridRowEnd: true, + gridRowSpan: true, + gridRowStart: true, + gridColumn: true, + gridColumnEnd: true, + gridColumnSpan: true, + gridColumnStart: true, + fontWeight: true, + lineClamp: true, + lineHeight: true, + opacity: true, + order: true, + orphans: true, + tabSize: true, + widows: true, + zIndex: true, + zoom: true, + // SVG-related properties + fillOpacity: true, + floodOpacity: true, + stopOpacity: true, + strokeDasharray: true, + strokeDashoffset: true, + strokeMiterlimit: true, + strokeOpacity: true, + strokeWidth: true, + }; + /** + * @param {string} prefix vendor-specific prefix, eg: Webkit + * @param {string} key style name, eg: transitionDuration + * @return {string} style name prefixed with `prefix`, properly camelCased, eg: + * WebkitTransitionDuration + */ + + function prefixKey(prefix, key) { + return prefix + key.charAt(0).toUpperCase() + key.substring(1); + } + /** + * Support style names that may come passed in prefixed by adding permutations + * of vendor prefixes. + */ + + var prefixes = ['Webkit', 'ms', 'Moz', 'O']; // Using Object.keys here, or else the vanilla for-in loop makes IE8 go into an + // infinite loop, because it iterates over the newly added props too. + + Object.keys(isUnitlessNumber).forEach(function (prop) { + prefixes.forEach(function (prefix) { + isUnitlessNumber[prefixKey(prefix, prop)] = isUnitlessNumber[prop]; + }); + }); + + /** + * Convert a value into the proper css writable value. The style name `name` + * should be logical (no hyphens), as specified + * in `CSSProperty.isUnitlessNumber`. + * + * @param {string} name CSS property name such as `topMargin`. + * @param {*} value CSS property value such as `10px`. + * @return {string} Normalized style value with dimensions applied. + */ + + function dangerousStyleValue(name, value, isCustomProperty) { + // Note that we've removed escapeTextForBrowser() calls here since the + // whole string will be escaped when the attribute is injected into + // the markup. If you provide unsafe user data here they can inject + // arbitrary CSS which may be problematic (I couldn't repro this): + // https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet + // http://www.thespanner.co.uk/2007/11/26/ultimate-xss-css-injection/ + // This is not an XSS hole but instead a potential CSS injection issue + // which has lead to a greater discussion about how we're going to + // trust URLs moving forward. See #2115901 + var isEmpty = value == null || typeof value === 'boolean' || value === ''; + + if (isEmpty) { + return ''; + } + + if ( + !isCustomProperty && + typeof value === 'number' && + value !== 0 && + !(isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name]) + ) { + return value + 'px'; // Presumes implicit 'px' suffix for unitless numbers + } + + return ('' + value).trim(); + } + + var uppercasePattern = /([A-Z])/g; + var msPattern = /^ms-/; + /** + * Hyphenates a camelcased CSS property name, for example: + * + * > hyphenateStyleName('backgroundColor') + * < "background-color" + * > hyphenateStyleName('MozTransition') + * < "-moz-transition" + * > hyphenateStyleName('msTransition') + * < "-ms-transition" + * + * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix + * is converted to `-ms-`. + */ + + function hyphenateStyleName(name) { + return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-'); + } + + function isCustomComponent(tagName, props) { + if (tagName.indexOf('-') === -1) { + return typeof props.is === 'string'; + } + + switch (tagName) { + // These are reserved SVG and MathML elements. + // We don't mind this whitelist too much because we expect it to never grow. + // The alternative is to track the namespace in a few places which is convoluted. + // https://w3c.github.io/webcomponents/spec/custom/#custom-elements-core-concepts + case 'annotation-xml': + case 'color-profile': + case 'font-face': + case 'font-face-src': + case 'font-face-uri': + case 'font-face-format': + case 'font-face-name': + case 'missing-glyph': + return false; + + default: + return true; + } + } + + var warnValidStyle = function () {}; + + { + // 'msTransform' is correct, but the other prefixes should be capitalized + var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/; + var msPattern$1 = /^-ms-/; + var hyphenPattern = /-(.)/g; // style values shouldn't contain a semicolon + + var badStyleValueWithSemicolonPattern = /;\s*$/; + var warnedStyleNames = {}; + var warnedStyleValues = {}; + var warnedForNaNValue = false; + var warnedForInfinityValue = false; + + var camelize = function (string) { + return string.replace(hyphenPattern, function (_, character) { + return character.toUpperCase(); + }); + }; + + var warnHyphenatedStyleName = function (name) { + if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) { + return; + } + + warnedStyleNames[name] = true; + warning$1( + false, + 'Unsupported style property %s. Did you mean %s?', + name, // As Andi Smith suggests + // (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix + // is converted to lowercase `ms`. + camelize(name.replace(msPattern$1, 'ms-')), + ); + }; + + var warnBadVendoredStyleName = function (name) { + if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) { + return; + } + + warnedStyleNames[name] = true; + warning$1( + false, + 'Unsupported vendor-prefixed style property %s. Did you mean %s?', + name, + name.charAt(0).toUpperCase() + name.slice(1), + ); + }; + + var warnStyleValueWithSemicolon = function (name, value) { + if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) { + return; + } + + warnedStyleValues[value] = true; + warning$1( + false, + "Style property values shouldn't contain a semicolon. " + 'Try "%s: %s" instead.', + name, + value.replace(badStyleValueWithSemicolonPattern, ''), + ); + }; + + var warnStyleValueIsNaN = function (name, value) { + if (warnedForNaNValue) { + return; + } + + warnedForNaNValue = true; + warning$1(false, '`NaN` is an invalid value for the `%s` css style property.', name); + }; + + var warnStyleValueIsInfinity = function (name, value) { + if (warnedForInfinityValue) { + return; + } + + warnedForInfinityValue = true; + warning$1(false, '`Infinity` is an invalid value for the `%s` css style property.', name); + }; + + warnValidStyle = function (name, value) { + if (name.indexOf('-') > -1) { + warnHyphenatedStyleName(name); + } else if (badVendoredStyleNamePattern.test(name)) { + warnBadVendoredStyleName(name); + } else if (badStyleValueWithSemicolonPattern.test(value)) { + warnStyleValueWithSemicolon(name, value); + } + + if (typeof value === 'number') { + if (isNaN(value)) { + warnStyleValueIsNaN(name, value); + } else if (!isFinite(value)) { + warnStyleValueIsInfinity(name, value); + } + } + }; + } + + var warnValidStyle$1 = warnValidStyle; + + var ariaProperties = { + 'aria-current': 0, + // state + 'aria-details': 0, + 'aria-disabled': 0, + // state + 'aria-hidden': 0, + // state + 'aria-invalid': 0, + // state + 'aria-keyshortcuts': 0, + 'aria-label': 0, + 'aria-roledescription': 0, + // Widget Attributes + 'aria-autocomplete': 0, + 'aria-checked': 0, + 'aria-expanded': 0, + 'aria-haspopup': 0, + 'aria-level': 0, + 'aria-modal': 0, + 'aria-multiline': 0, + 'aria-multiselectable': 0, + 'aria-orientation': 0, + 'aria-placeholder': 0, + 'aria-pressed': 0, + 'aria-readonly': 0, + 'aria-required': 0, + 'aria-selected': 0, + 'aria-sort': 0, + 'aria-valuemax': 0, + 'aria-valuemin': 0, + 'aria-valuenow': 0, + 'aria-valuetext': 0, + // Live Region Attributes + 'aria-atomic': 0, + 'aria-busy': 0, + 'aria-live': 0, + 'aria-relevant': 0, + // Drag-and-Drop Attributes + 'aria-dropeffect': 0, + 'aria-grabbed': 0, + // Relationship Attributes + 'aria-activedescendant': 0, + 'aria-colcount': 0, + 'aria-colindex': 0, + 'aria-colspan': 0, + 'aria-controls': 0, + 'aria-describedby': 0, + 'aria-errormessage': 0, + 'aria-flowto': 0, + 'aria-labelledby': 0, + 'aria-owns': 0, + 'aria-posinset': 0, + 'aria-rowcount': 0, + 'aria-rowindex': 0, + 'aria-rowspan': 0, + 'aria-setsize': 0, + }; + + var warnedProperties = {}; + var rARIA = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$'); + var rARIACamel = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$'); + var hasOwnProperty$2 = Object.prototype.hasOwnProperty; + + function validateProperty(tagName, name) { + if (hasOwnProperty$2.call(warnedProperties, name) && warnedProperties[name]) { + return true; + } + + if (rARIACamel.test(name)) { + var ariaName = 'aria-' + name.slice(4).toLowerCase(); + var correctName = ariaProperties.hasOwnProperty(ariaName) ? ariaName : null; // If this is an aria-* attribute, but is not listed in the known DOM + // DOM properties, then it is an invalid aria-* attribute. + + if (correctName == null) { + warning$1( + false, + 'Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.', + name, + ); + warnedProperties[name] = true; + return true; + } // aria-* attributes should be lowercase; suggest the lowercase version. + + if (name !== correctName) { + warning$1(false, 'Invalid ARIA attribute `%s`. Did you mean `%s`?', name, correctName); + warnedProperties[name] = true; + return true; + } + } + + if (rARIA.test(name)) { + var lowerCasedName = name.toLowerCase(); + var standardName = ariaProperties.hasOwnProperty(lowerCasedName) ? lowerCasedName : null; // If this is an aria-* attribute, but is not listed in the known DOM + // DOM properties, then it is an invalid aria-* attribute. + + if (standardName == null) { + warnedProperties[name] = true; + return false; + } // aria-* attributes should be lowercase; suggest the lowercase version. + + if (name !== standardName) { + warning$1(false, 'Unknown ARIA attribute `%s`. Did you mean `%s`?', name, standardName); + warnedProperties[name] = true; + return true; + } + } + + return true; + } + + function warnInvalidARIAProps(type, props) { + var invalidProps = []; + + for (var key in props) { + var isValid = validateProperty(type, key); + + if (!isValid) { + invalidProps.push(key); + } + } + + var unknownPropString = invalidProps + .map(function (prop) { + return '`' + prop + '`'; + }) + .join(', '); + + if (invalidProps.length === 1) { + warning$1( + false, + 'Invalid aria prop %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop', + unknownPropString, + type, + ); + } else if (invalidProps.length > 1) { + warning$1( + false, + 'Invalid aria props %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop', + unknownPropString, + type, + ); + } + } + + function validateProperties(type, props) { + if (isCustomComponent(type, props)) { + return; + } + + warnInvalidARIAProps(type, props); + } + + var didWarnValueNull = false; + function validateProperties$1(type, props) { + if (type !== 'input' && type !== 'textarea' && type !== 'select') { + return; + } + + if (props != null && props.value === null && !didWarnValueNull) { + didWarnValueNull = true; + + if (type === 'select' && props.multiple) { + warning$1( + false, + '`value` prop on `%s` should not be null. ' + + 'Consider using an empty array when `multiple` is set to `true` ' + + 'to clear the component or `undefined` for uncontrolled components.', + type, + ); + } else { + warning$1( + false, + '`value` prop on `%s` should not be null. ' + + 'Consider using an empty string to clear the component or `undefined` ' + + 'for uncontrolled components.', + type, + ); + } + } + } + + /** + * Registers plugins so that they can extract and dispatch events. + * + * @see {EventPluginHub} + */ + + /** + * Ordered list of injected plugins. + */ + + /** + * Mapping from event name to dispatch config + */ + + /** + * Mapping from registration name to plugin module + */ + + var registrationNameModules = {}; + /** + * Mapping from registration name to event name + */ + + /** + * Mapping from lowercase registration names to the properly cased version, + * used to warn in the case of missing event handlers. Available + * only in true. + * @type {Object} + */ + + var possibleRegistrationNames = {}; // Trust the developer to only use possibleRegistrationNames in true + + /** + * Injects an ordering of plugins (by plugin name). This allows the ordering + * to be decoupled from injection of the actual plugins so that ordering is + * always deterministic regardless of packaging, on-the-fly injection, etc. + * + * @param {array} InjectedEventPluginOrder + * @internal + * @see {EventPluginHub.injection.injectEventPluginOrder} + */ + + /** + * Injects plugins to be used by `EventPluginHub`. The plugin names must be + * in the ordering injected by `injectEventPluginOrder`. + * + * Plugins can be injected as part of page initialization or on-the-fly. + * + * @param {object} injectedNamesToPlugins Map from names to plugin modules. + * @internal + * @see {EventPluginHub.injection.injectEventPluginsByName} + */ + + // When adding attributes to the HTML or SVG whitelist, be sure to + // also add them to this module to ensure casing and incorrect name + // warnings. + var possibleStandardNames = { + // HTML + accept: 'accept', + acceptcharset: 'acceptCharset', + 'accept-charset': 'acceptCharset', + accesskey: 'accessKey', + action: 'action', + allowfullscreen: 'allowFullScreen', + alt: 'alt', + as: 'as', + async: 'async', + autocapitalize: 'autoCapitalize', + autocomplete: 'autoComplete', + autocorrect: 'autoCorrect', + autofocus: 'autoFocus', + autoplay: 'autoPlay', + autosave: 'autoSave', + capture: 'capture', + cellpadding: 'cellPadding', + cellspacing: 'cellSpacing', + challenge: 'challenge', + charset: 'charSet', + checked: 'checked', + children: 'children', + cite: 'cite', + class: 'className', + classid: 'classID', + classname: 'className', + cols: 'cols', + colspan: 'colSpan', + content: 'content', + contenteditable: 'contentEditable', + contextmenu: 'contextMenu', + controls: 'controls', + controlslist: 'controlsList', + coords: 'coords', + crossorigin: 'crossOrigin', + dangerouslysetinnerhtml: 'dangerouslySetInnerHTML', + data: 'data', + datetime: 'dateTime', + default: 'default', + defaultchecked: 'defaultChecked', + defaultvalue: 'defaultValue', + defer: 'defer', + dir: 'dir', + disabled: 'disabled', + disablepictureinpicture: 'disablePictureInPicture', + download: 'download', + draggable: 'draggable', + enctype: 'encType', + for: 'htmlFor', + form: 'form', + formmethod: 'formMethod', + formaction: 'formAction', + formenctype: 'formEncType', + formnovalidate: 'formNoValidate', + formtarget: 'formTarget', + frameborder: 'frameBorder', + headers: 'headers', + height: 'height', + hidden: 'hidden', + high: 'high', + href: 'href', + hreflang: 'hrefLang', + htmlfor: 'htmlFor', + httpequiv: 'httpEquiv', + 'http-equiv': 'httpEquiv', + icon: 'icon', + id: 'id', + innerhtml: 'innerHTML', + inputmode: 'inputMode', + integrity: 'integrity', + is: 'is', + itemid: 'itemID', + itemprop: 'itemProp', + itemref: 'itemRef', + itemscope: 'itemScope', + itemtype: 'itemType', + keyparams: 'keyParams', + keytype: 'keyType', + kind: 'kind', + label: 'label', + lang: 'lang', + list: 'list', + loop: 'loop', + low: 'low', + manifest: 'manifest', + marginwidth: 'marginWidth', + marginheight: 'marginHeight', + max: 'max', + maxlength: 'maxLength', + media: 'media', + mediagroup: 'mediaGroup', + method: 'method', + min: 'min', + minlength: 'minLength', + multiple: 'multiple', + muted: 'muted', + name: 'name', + nomodule: 'noModule', + nonce: 'nonce', + novalidate: 'noValidate', + open: 'open', + optimum: 'optimum', + pattern: 'pattern', + placeholder: 'placeholder', + playsinline: 'playsInline', + poster: 'poster', + preload: 'preload', + profile: 'profile', + radiogroup: 'radioGroup', + readonly: 'readOnly', + referrerpolicy: 'referrerPolicy', + rel: 'rel', + required: 'required', + reversed: 'reversed', + role: 'role', + rows: 'rows', + rowspan: 'rowSpan', + sandbox: 'sandbox', + scope: 'scope', + scoped: 'scoped', + scrolling: 'scrolling', + seamless: 'seamless', + selected: 'selected', + shape: 'shape', + size: 'size', + sizes: 'sizes', + span: 'span', + spellcheck: 'spellCheck', + src: 'src', + srcdoc: 'srcDoc', + srclang: 'srcLang', + srcset: 'srcSet', + start: 'start', + step: 'step', + style: 'style', + summary: 'summary', + tabindex: 'tabIndex', + target: 'target', + title: 'title', + type: 'type', + usemap: 'useMap', + value: 'value', + width: 'width', + wmode: 'wmode', + wrap: 'wrap', + // SVG + about: 'about', + accentheight: 'accentHeight', + 'accent-height': 'accentHeight', + accumulate: 'accumulate', + additive: 'additive', + alignmentbaseline: 'alignmentBaseline', + 'alignment-baseline': 'alignmentBaseline', + allowreorder: 'allowReorder', + alphabetic: 'alphabetic', + amplitude: 'amplitude', + arabicform: 'arabicForm', + 'arabic-form': 'arabicForm', + ascent: 'ascent', + attributename: 'attributeName', + attributetype: 'attributeType', + autoreverse: 'autoReverse', + azimuth: 'azimuth', + basefrequency: 'baseFrequency', + baselineshift: 'baselineShift', + 'baseline-shift': 'baselineShift', + baseprofile: 'baseProfile', + bbox: 'bbox', + begin: 'begin', + bias: 'bias', + by: 'by', + calcmode: 'calcMode', + capheight: 'capHeight', + 'cap-height': 'capHeight', + clip: 'clip', + clippath: 'clipPath', + 'clip-path': 'clipPath', + clippathunits: 'clipPathUnits', + cliprule: 'clipRule', + 'clip-rule': 'clipRule', + color: 'color', + colorinterpolation: 'colorInterpolation', + 'color-interpolation': 'colorInterpolation', + colorinterpolationfilters: 'colorInterpolationFilters', + 'color-interpolation-filters': 'colorInterpolationFilters', + colorprofile: 'colorProfile', + 'color-profile': 'colorProfile', + colorrendering: 'colorRendering', + 'color-rendering': 'colorRendering', + contentscripttype: 'contentScriptType', + contentstyletype: 'contentStyleType', + cursor: 'cursor', + cx: 'cx', + cy: 'cy', + d: 'd', + datatype: 'datatype', + decelerate: 'decelerate', + descent: 'descent', + diffuseconstant: 'diffuseConstant', + direction: 'direction', + display: 'display', + divisor: 'divisor', + dominantbaseline: 'dominantBaseline', + 'dominant-baseline': 'dominantBaseline', + dur: 'dur', + dx: 'dx', + dy: 'dy', + edgemode: 'edgeMode', + elevation: 'elevation', + enablebackground: 'enableBackground', + 'enable-background': 'enableBackground', + end: 'end', + exponent: 'exponent', + externalresourcesrequired: 'externalResourcesRequired', + fill: 'fill', + fillopacity: 'fillOpacity', + 'fill-opacity': 'fillOpacity', + fillrule: 'fillRule', + 'fill-rule': 'fillRule', + filter: 'filter', + filterres: 'filterRes', + filterunits: 'filterUnits', + floodopacity: 'floodOpacity', + 'flood-opacity': 'floodOpacity', + floodcolor: 'floodColor', + 'flood-color': 'floodColor', + focusable: 'focusable', + fontfamily: 'fontFamily', + 'font-family': 'fontFamily', + fontsize: 'fontSize', + 'font-size': 'fontSize', + fontsizeadjust: 'fontSizeAdjust', + 'font-size-adjust': 'fontSizeAdjust', + fontstretch: 'fontStretch', + 'font-stretch': 'fontStretch', + fontstyle: 'fontStyle', + 'font-style': 'fontStyle', + fontvariant: 'fontVariant', + 'font-variant': 'fontVariant', + fontweight: 'fontWeight', + 'font-weight': 'fontWeight', + format: 'format', + from: 'from', + fx: 'fx', + fy: 'fy', + g1: 'g1', + g2: 'g2', + glyphname: 'glyphName', + 'glyph-name': 'glyphName', + glyphorientationhorizontal: 'glyphOrientationHorizontal', + 'glyph-orientation-horizontal': 'glyphOrientationHorizontal', + glyphorientationvertical: 'glyphOrientationVertical', + 'glyph-orientation-vertical': 'glyphOrientationVertical', + glyphref: 'glyphRef', + gradienttransform: 'gradientTransform', + gradientunits: 'gradientUnits', + hanging: 'hanging', + horizadvx: 'horizAdvX', + 'horiz-adv-x': 'horizAdvX', + horizoriginx: 'horizOriginX', + 'horiz-origin-x': 'horizOriginX', + ideographic: 'ideographic', + imagerendering: 'imageRendering', + 'image-rendering': 'imageRendering', + in2: 'in2', + in: 'in', + inlist: 'inlist', + intercept: 'intercept', + k1: 'k1', + k2: 'k2', + k3: 'k3', + k4: 'k4', + k: 'k', + kernelmatrix: 'kernelMatrix', + kernelunitlength: 'kernelUnitLength', + kerning: 'kerning', + keypoints: 'keyPoints', + keysplines: 'keySplines', + keytimes: 'keyTimes', + lengthadjust: 'lengthAdjust', + letterspacing: 'letterSpacing', + 'letter-spacing': 'letterSpacing', + lightingcolor: 'lightingColor', + 'lighting-color': 'lightingColor', + limitingconeangle: 'limitingConeAngle', + local: 'local', + markerend: 'markerEnd', + 'marker-end': 'markerEnd', + markerheight: 'markerHeight', + markermid: 'markerMid', + 'marker-mid': 'markerMid', + markerstart: 'markerStart', + 'marker-start': 'markerStart', + markerunits: 'markerUnits', + markerwidth: 'markerWidth', + mask: 'mask', + maskcontentunits: 'maskContentUnits', + maskunits: 'maskUnits', + mathematical: 'mathematical', + mode: 'mode', + numoctaves: 'numOctaves', + offset: 'offset', + opacity: 'opacity', + operator: 'operator', + order: 'order', + orient: 'orient', + orientation: 'orientation', + origin: 'origin', + overflow: 'overflow', + overlineposition: 'overlinePosition', + 'overline-position': 'overlinePosition', + overlinethickness: 'overlineThickness', + 'overline-thickness': 'overlineThickness', + paintorder: 'paintOrder', + 'paint-order': 'paintOrder', + panose1: 'panose1', + 'panose-1': 'panose1', + pathlength: 'pathLength', + patterncontentunits: 'patternContentUnits', + patterntransform: 'patternTransform', + patternunits: 'patternUnits', + pointerevents: 'pointerEvents', + 'pointer-events': 'pointerEvents', + points: 'points', + pointsatx: 'pointsAtX', + pointsaty: 'pointsAtY', + pointsatz: 'pointsAtZ', + prefix: 'prefix', + preservealpha: 'preserveAlpha', + preserveaspectratio: 'preserveAspectRatio', + primitiveunits: 'primitiveUnits', + property: 'property', + r: 'r', + radius: 'radius', + refx: 'refX', + refy: 'refY', + renderingintent: 'renderingIntent', + 'rendering-intent': 'renderingIntent', + repeatcount: 'repeatCount', + repeatdur: 'repeatDur', + requiredextensions: 'requiredExtensions', + requiredfeatures: 'requiredFeatures', + resource: 'resource', + restart: 'restart', + result: 'result', + results: 'results', + rotate: 'rotate', + rx: 'rx', + ry: 'ry', + scale: 'scale', + security: 'security', + seed: 'seed', + shaperendering: 'shapeRendering', + 'shape-rendering': 'shapeRendering', + slope: 'slope', + spacing: 'spacing', + specularconstant: 'specularConstant', + specularexponent: 'specularExponent', + speed: 'speed', + spreadmethod: 'spreadMethod', + startoffset: 'startOffset', + stddeviation: 'stdDeviation', + stemh: 'stemh', + stemv: 'stemv', + stitchtiles: 'stitchTiles', + stopcolor: 'stopColor', + 'stop-color': 'stopColor', + stopopacity: 'stopOpacity', + 'stop-opacity': 'stopOpacity', + strikethroughposition: 'strikethroughPosition', + 'strikethrough-position': 'strikethroughPosition', + strikethroughthickness: 'strikethroughThickness', + 'strikethrough-thickness': 'strikethroughThickness', + string: 'string', + stroke: 'stroke', + strokedasharray: 'strokeDasharray', + 'stroke-dasharray': 'strokeDasharray', + strokedashoffset: 'strokeDashoffset', + 'stroke-dashoffset': 'strokeDashoffset', + strokelinecap: 'strokeLinecap', + 'stroke-linecap': 'strokeLinecap', + strokelinejoin: 'strokeLinejoin', + 'stroke-linejoin': 'strokeLinejoin', + strokemiterlimit: 'strokeMiterlimit', + 'stroke-miterlimit': 'strokeMiterlimit', + strokewidth: 'strokeWidth', + 'stroke-width': 'strokeWidth', + strokeopacity: 'strokeOpacity', + 'stroke-opacity': 'strokeOpacity', + suppresscontenteditablewarning: 'suppressContentEditableWarning', + suppresshydrationwarning: 'suppressHydrationWarning', + surfacescale: 'surfaceScale', + systemlanguage: 'systemLanguage', + tablevalues: 'tableValues', + targetx: 'targetX', + targety: 'targetY', + textanchor: 'textAnchor', + 'text-anchor': 'textAnchor', + textdecoration: 'textDecoration', + 'text-decoration': 'textDecoration', + textlength: 'textLength', + textrendering: 'textRendering', + 'text-rendering': 'textRendering', + to: 'to', + transform: 'transform', + typeof: 'typeof', + u1: 'u1', + u2: 'u2', + underlineposition: 'underlinePosition', + 'underline-position': 'underlinePosition', + underlinethickness: 'underlineThickness', + 'underline-thickness': 'underlineThickness', + unicode: 'unicode', + unicodebidi: 'unicodeBidi', + 'unicode-bidi': 'unicodeBidi', + unicoderange: 'unicodeRange', + 'unicode-range': 'unicodeRange', + unitsperem: 'unitsPerEm', + 'units-per-em': 'unitsPerEm', + unselectable: 'unselectable', + valphabetic: 'vAlphabetic', + 'v-alphabetic': 'vAlphabetic', + values: 'values', + vectoreffect: 'vectorEffect', + 'vector-effect': 'vectorEffect', + version: 'version', + vertadvy: 'vertAdvY', + 'vert-adv-y': 'vertAdvY', + vertoriginx: 'vertOriginX', + 'vert-origin-x': 'vertOriginX', + vertoriginy: 'vertOriginY', + 'vert-origin-y': 'vertOriginY', + vhanging: 'vHanging', + 'v-hanging': 'vHanging', + videographic: 'vIdeographic', + 'v-ideographic': 'vIdeographic', + viewbox: 'viewBox', + viewtarget: 'viewTarget', + visibility: 'visibility', + vmathematical: 'vMathematical', + 'v-mathematical': 'vMathematical', + vocab: 'vocab', + widths: 'widths', + wordspacing: 'wordSpacing', + 'word-spacing': 'wordSpacing', + writingmode: 'writingMode', + 'writing-mode': 'writingMode', + x1: 'x1', + x2: 'x2', + x: 'x', + xchannelselector: 'xChannelSelector', + xheight: 'xHeight', + 'x-height': 'xHeight', + xlinkactuate: 'xlinkActuate', + 'xlink:actuate': 'xlinkActuate', + xlinkarcrole: 'xlinkArcrole', + 'xlink:arcrole': 'xlinkArcrole', + xlinkhref: 'xlinkHref', + 'xlink:href': 'xlinkHref', + xlinkrole: 'xlinkRole', + 'xlink:role': 'xlinkRole', + xlinkshow: 'xlinkShow', + 'xlink:show': 'xlinkShow', + xlinktitle: 'xlinkTitle', + 'xlink:title': 'xlinkTitle', + xlinktype: 'xlinkType', + 'xlink:type': 'xlinkType', + xmlbase: 'xmlBase', + 'xml:base': 'xmlBase', + xmllang: 'xmlLang', + 'xml:lang': 'xmlLang', + xmlns: 'xmlns', + 'xml:space': 'xmlSpace', + xmlnsxlink: 'xmlnsXlink', + 'xmlns:xlink': 'xmlnsXlink', + xmlspace: 'xmlSpace', + y1: 'y1', + y2: 'y2', + y: 'y', + ychannelselector: 'yChannelSelector', + z: 'z', + zoomandpan: 'zoomAndPan', + }; + + var validateProperty$1 = function () {}; + + { + var warnedProperties$1 = {}; + var _hasOwnProperty = Object.prototype.hasOwnProperty; + var EVENT_NAME_REGEX = /^on./; + var INVALID_EVENT_NAME_REGEX = /^on[^A-Z]/; + var rARIA$1 = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$'); + var rARIACamel$1 = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$'); + + validateProperty$1 = function (tagName, name, value, canUseEventSystem) { + if (_hasOwnProperty.call(warnedProperties$1, name) && warnedProperties$1[name]) { + return true; + } + + var lowerCasedName = name.toLowerCase(); + + if (lowerCasedName === 'onfocusin' || lowerCasedName === 'onfocusout') { + warning$1( + false, + 'React uses onFocus and onBlur instead of onFocusIn and onFocusOut. ' + + 'All React events are normalized to bubble, so onFocusIn and onFocusOut ' + + 'are not needed/supported by React.', + ); + warnedProperties$1[name] = true; + return true; + } // We can't rely on the event system being injected on the server. + + if (canUseEventSystem) { + if (registrationNameModules.hasOwnProperty(name)) { + return true; + } + + var registrationName = possibleRegistrationNames.hasOwnProperty(lowerCasedName) + ? possibleRegistrationNames[lowerCasedName] + : null; + + if (registrationName != null) { + warning$1( + false, + 'Invalid event handler property `%s`. Did you mean `%s`?', + name, + registrationName, + ); + warnedProperties$1[name] = true; + return true; + } + + if (EVENT_NAME_REGEX.test(name)) { + warning$1(false, 'Unknown event handler property `%s`. It will be ignored.', name); + warnedProperties$1[name] = true; + return true; + } + } else if (EVENT_NAME_REGEX.test(name)) { + // If no event plugins have been injected, we are in a server environment. + // So we can't tell if the event name is correct for sure, but we can filter + // out known bad ones like `onclick`. We can't suggest a specific replacement though. + if (INVALID_EVENT_NAME_REGEX.test(name)) { + warning$1( + false, + 'Invalid event handler property `%s`. ' + + 'React events use the camelCase naming convention, for example `onClick`.', + name, + ); + } + + warnedProperties$1[name] = true; + return true; + } // Let the ARIA attribute hook validate ARIA attributes + + if (rARIA$1.test(name) || rARIACamel$1.test(name)) { + return true; + } + + if (lowerCasedName === 'innerhtml') { + warning$1( + false, + 'Directly setting property `innerHTML` is not permitted. ' + + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.', + ); + warnedProperties$1[name] = true; + return true; + } + + if (lowerCasedName === 'aria') { + warning$1( + false, + 'The `aria` attribute is reserved for future use in React. ' + + 'Pass individual `aria-` attributes instead.', + ); + warnedProperties$1[name] = true; + return true; + } + + if ( + lowerCasedName === 'is' && + value !== null && + value !== undefined && + typeof value !== 'string' + ) { + warning$1( + false, + 'Received a `%s` for a string attribute `is`. If this is expected, cast ' + + 'the value to a string.', + typeof value, + ); + warnedProperties$1[name] = true; + return true; + } + + if (typeof value === 'number' && isNaN(value)) { + warning$1( + false, + 'Received NaN for the `%s` attribute. If this is expected, cast ' + + 'the value to a string.', + name, + ); + warnedProperties$1[name] = true; + return true; + } + + var propertyInfo = getPropertyInfo(name); + var isReserved = propertyInfo !== null && propertyInfo.type === RESERVED; // Known attributes should match the casing specified in the property config. + + if (possibleStandardNames.hasOwnProperty(lowerCasedName)) { + var standardName = possibleStandardNames[lowerCasedName]; + + if (standardName !== name) { + warning$1(false, 'Invalid DOM property `%s`. Did you mean `%s`?', name, standardName); + warnedProperties$1[name] = true; + return true; + } + } else if (!isReserved && name !== lowerCasedName) { + // Unknown attributes should have lowercase casing since that's how they + // will be cased anyway with server rendering. + warning$1( + false, + 'React does not recognize the `%s` prop on a DOM element. If you ' + + 'intentionally want it to appear in the DOM as a custom ' + + 'attribute, spell it as lowercase `%s` instead. ' + + 'If you accidentally passed it from a parent component, remove ' + + 'it from the DOM element.', + name, + lowerCasedName, + ); + warnedProperties$1[name] = true; + return true; + } + + if ( + typeof value === 'boolean' && + shouldRemoveAttributeWithWarning(name, value, propertyInfo, false) + ) { + if (value) { + warning$1( + false, + 'Received `%s` for a non-boolean attribute `%s`.\n\n' + + 'If you want to write it to the DOM, pass a string instead: ' + + '%s="%s" or %s={value.toString()}.', + value, + name, + name, + value, + name, + ); + } else { + warning$1( + false, + 'Received `%s` for a non-boolean attribute `%s`.\n\n' + + 'If you want to write it to the DOM, pass a string instead: ' + + '%s="%s" or %s={value.toString()}.\n\n' + + 'If you used to conditionally omit it with %s={condition && value}, ' + + 'pass %s={condition ? value : undefined} instead.', + value, + name, + name, + value, + name, + name, + name, + ); + } + + warnedProperties$1[name] = true; + return true; + } // Now that we've validated casing, do not validate + // data types for reserved props + + if (isReserved) { + return true; + } // Warn when a known attribute is a bad type + + if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, false)) { + warnedProperties$1[name] = true; + return false; + } // Warn when passing the strings 'false' or 'true' into a boolean prop + + if ( + (value === 'false' || value === 'true') && + propertyInfo !== null && + propertyInfo.type === BOOLEAN + ) { + warning$1( + false, + 'Received the string `%s` for the boolean attribute `%s`. ' + + '%s ' + + 'Did you mean %s={%s}?', + value, + name, + value === 'false' + ? 'The browser will interpret it as a truthy value.' + : 'Although this works, it will not work as expected if you pass the string "false".', + name, + value, + ); + warnedProperties$1[name] = true; + return true; + } + + return true; + }; + } + + var warnUnknownProperties = function (type, props, canUseEventSystem) { + var unknownProps = []; + + for (var key in props) { + var isValid = validateProperty$1(type, key, props[key], canUseEventSystem); + + if (!isValid) { + unknownProps.push(key); + } + } + + var unknownPropString = unknownProps + .map(function (prop) { + return '`' + prop + '`'; + }) + .join(', '); + + if (unknownProps.length === 1) { + warning$1( + false, + 'Invalid value for prop %s on <%s> tag. Either remove it from the element, ' + + 'or pass a string or number value to keep it in the DOM. ' + + 'For details, see https://fb.me/react-attribute-behavior', + unknownPropString, + type, + ); + } else if (unknownProps.length > 1) { + warning$1( + false, + 'Invalid values for props %s on <%s> tag. Either remove them from the element, ' + + 'or pass a string or number value to keep them in the DOM. ' + + 'For details, see https://fb.me/react-attribute-behavior', + unknownPropString, + type, + ); + } + }; + + function validateProperties$2(type, props, canUseEventSystem) { + if (isCustomComponent(type, props)) { + return; + } + + warnUnknownProperties(type, props, canUseEventSystem); + } + + var toArray = React.Children.toArray; // This is only used in DEV. + // Each entry is `this.stack` from a currently executing renderer instance. + // (There may be more than one because ReactDOMServer is reentrant). + // Each stack is an array of frames which may contain nested stacks of elements. + + var currentDebugStacks = []; + var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher; + var ReactDebugCurrentFrame; + var prevGetCurrentStackImpl = null; + + var getCurrentServerStackImpl = function () { + return ''; + }; + + var describeStackFrame = function (element) { + return ''; + }; + + var validatePropertiesInDevelopment = function (type, props) {}; + + var pushCurrentDebugStack = function (stack) {}; + + var pushElementToDebugStack = function (element) {}; + + var popCurrentDebugStack = function () {}; + + var hasWarnedAboutUsingContextAsConsumer = false; + + { + ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; + + validatePropertiesInDevelopment = function (type, props) { + validateProperties(type, props); + validateProperties$1(type, props); + validateProperties$2( + type, + props, + /* canUseEventSystem */ + false, + ); + }; + + describeStackFrame = function (element) { + var source = element._source; + var type = element.type; + var name = getComponentName(type); + var ownerName = null; + return describeComponentFrame(name, source, ownerName); + }; + + pushCurrentDebugStack = function (stack) { + currentDebugStacks.push(stack); + + if (currentDebugStacks.length === 1) { + // We are entering a server renderer. + // Remember the previous (e.g. client) global stack implementation. + prevGetCurrentStackImpl = ReactDebugCurrentFrame.getCurrentStack; + ReactDebugCurrentFrame.getCurrentStack = getCurrentServerStackImpl; + } + }; + + pushElementToDebugStack = function (element) { + // For the innermost executing ReactDOMServer call, + var stack = currentDebugStacks[currentDebugStacks.length - 1]; // Take the innermost executing frame (e.g. <Foo>), + + var frame = stack[stack.length - 1]; // and record that it has one more element associated with it. + + frame.debugElementStack.push(element); // We only need this because we tail-optimize single-element + // children and directly handle them in an inner loop instead of + // creating separate frames for them. + }; + + popCurrentDebugStack = function () { + currentDebugStacks.pop(); + + if (currentDebugStacks.length === 0) { + // We are exiting the server renderer. + // Restore the previous (e.g. client) global stack implementation. + ReactDebugCurrentFrame.getCurrentStack = prevGetCurrentStackImpl; + prevGetCurrentStackImpl = null; + } + }; + + getCurrentServerStackImpl = function () { + if (currentDebugStacks.length === 0) { + // Nothing is currently rendering. + return ''; + } // ReactDOMServer is reentrant so there may be multiple calls at the same time. + // Take the frames from the innermost call which is the last in the array. + + var frames = currentDebugStacks[currentDebugStacks.length - 1]; + var stack = ''; // Go through every frame in the stack from the innermost one. + + for (var i = frames.length - 1; i >= 0; i--) { + var frame = frames[i]; // Every frame might have more than one debug element stack entry associated with it. + // This is because single-child nesting doesn't create materialized frames. + // Instead it would push them through `pushElementToDebugStack()`. + + var debugElementStack = frame.debugElementStack; + + for (var ii = debugElementStack.length - 1; ii >= 0; ii--) { + stack += describeStackFrame(debugElementStack[ii]); + } + } + + return stack; + }; + } + + var didWarnDefaultInputValue = false; + var didWarnDefaultChecked = false; + var didWarnDefaultSelectValue = false; + var didWarnDefaultTextareaValue = false; + var didWarnInvalidOptionChildren = false; + var didWarnAboutNoopUpdateForComponent = {}; + var didWarnAboutBadClass = {}; + var didWarnAboutModulePatternComponent = {}; + var didWarnAboutDeprecatedWillMount = {}; + var didWarnAboutUndefinedDerivedState = {}; + var didWarnAboutUninitializedState = {}; + var valuePropNames = ['value', 'defaultValue']; + var newlineEatingTags = { + listing: true, + pre: true, + textarea: true, + }; // We accept any tag to be rendered but since this gets injected into arbitrary + // HTML, we want to make sure that it's a safe tag. + // http://www.w3.org/TR/REC-xml/#NT-Name + + var VALID_TAG_REGEX = /^[a-zA-Z][a-zA-Z:_\.\-\d]*$/; // Simplified subset + + var validatedTagCache = {}; + + function validateDangerousTag(tag) { + if (!validatedTagCache.hasOwnProperty(tag)) { + if (!VALID_TAG_REGEX.test(tag)) { + { + throw Error('Invalid tag: ' + tag); + } + } + + validatedTagCache[tag] = true; + } + } + + var styleNameCache = {}; + + var processStyleName = function (styleName) { + if (styleNameCache.hasOwnProperty(styleName)) { + return styleNameCache[styleName]; + } + + var result = hyphenateStyleName(styleName); + styleNameCache[styleName] = result; + return result; + }; + + function createMarkupForStyles(styles) { + var serialized = ''; + var delimiter = ''; + + for (var styleName in styles) { + if (!styles.hasOwnProperty(styleName)) { + continue; + } + + var isCustomProperty = styleName.indexOf('--') === 0; + var styleValue = styles[styleName]; + + { + if (!isCustomProperty) { + warnValidStyle$1(styleName, styleValue); + } + } + + if (styleValue != null) { + serialized += delimiter + (isCustomProperty ? styleName : processStyleName(styleName)) + ':'; + serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty); + delimiter = ';'; + } + } + + return serialized || null; + } + + function warnNoop(publicInstance, callerName) { + { + var _constructor = publicInstance.constructor; + var componentName = (_constructor && getComponentName(_constructor)) || 'ReactClass'; + var warningKey = componentName + '.' + callerName; + + if (didWarnAboutNoopUpdateForComponent[warningKey]) { + return; + } + + warningWithoutStack$1( + false, + '%s(...): Can only update a mounting component. ' + + 'This usually means you called %s() outside componentWillMount() on the server. ' + + 'This is a no-op.\n\nPlease check the code for the %s component.', + callerName, + callerName, + componentName, + ); + didWarnAboutNoopUpdateForComponent[warningKey] = true; + } + } + + function shouldConstruct(Component) { + return Component.prototype && Component.prototype.isReactComponent; + } + + function getNonChildrenInnerMarkup(props) { + var innerHTML = props.dangerouslySetInnerHTML; + + if (innerHTML != null) { + if (innerHTML.__html != null) { + return innerHTML.__html; + } + } else { + var content = props.children; + + if (typeof content === 'string' || typeof content === 'number') { + return escapeTextForBrowser(content); + } + } + + return null; + } + + function flattenTopLevelChildren(children) { + if (!React.isValidElement(children)) { + return toArray(children); + } + + var element = children; + + if (element.type !== REACT_FRAGMENT_TYPE) { + return [element]; + } + + var fragmentChildren = element.props.children; + + if (!React.isValidElement(fragmentChildren)) { + return toArray(fragmentChildren); + } + + var fragmentChildElement = fragmentChildren; + return [fragmentChildElement]; + } + + function flattenOptionChildren(children) { + if (children === undefined || children === null) { + return children; + } + + var content = ''; // Flatten children and warn if they aren't strings or numbers; + // invalid types are ignored. + + React.Children.forEach(children, function (child) { + if (child == null) { + return; + } + + content += child; + + { + if (!didWarnInvalidOptionChildren && typeof child !== 'string' && typeof child !== 'number') { + didWarnInvalidOptionChildren = true; + warning$1(false, 'Only strings and numbers are supported as <option> children.'); + } + } + }); + return content; + } + + var hasOwnProperty = Object.prototype.hasOwnProperty; + var STYLE = 'style'; + var RESERVED_PROPS = { + children: null, + dangerouslySetInnerHTML: null, + suppressContentEditableWarning: null, + suppressHydrationWarning: null, + }; + + function createOpenTagMarkup( + tagVerbatim, + tagLowercase, + props, + namespace, + makeStaticMarkup, + isRootElement, + ) { + var ret = '<' + tagVerbatim; + + for (var propKey in props) { + if (!hasOwnProperty.call(props, propKey)) { + continue; + } + + if (enableFlareAPI && propKey === 'listeners') { + continue; + } + + var propValue = props[propKey]; + + if (propValue == null) { + continue; + } + + if (propKey === STYLE) { + propValue = createMarkupForStyles(propValue); + } + + var markup = null; + + if (isCustomComponent(tagLowercase, props)) { + if (!RESERVED_PROPS.hasOwnProperty(propKey)) { + markup = createMarkupForCustomAttribute(propKey, propValue); + } + } else { + markup = createMarkupForProperty(propKey, propValue); + } + + if (markup) { + ret += ' ' + markup; + } + } // For static pages, no need to put React ID and checksum. Saves lots of + // bytes. + + if (makeStaticMarkup) { + return ret; + } + + if (isRootElement) { + ret += ' ' + createMarkupForRoot(); + } + + return ret; + } + + function validateRenderResult(child, type) { + if (child === undefined) { + { + { + throw Error( + (getComponentName(type) || 'Component') + + '(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.', + ); + } + } + } + } + + function resolve(child, context, threadID) { + while (React.isValidElement(child)) { + // Safe because we just checked it's an element. + var element = child; + var Component = element.type; + + { + pushElementToDebugStack(element); + } + + if (typeof Component !== 'function') { + break; + } + + processChild(element, Component); + } // Extra closure so queue and replace can be captured properly + + function processChild(element, Component) { + var isClass = shouldConstruct(Component); + var publicContext = processContext(Component, context, threadID, isClass); + var queue = []; + var replace = false; + var updater = { + isMounted: function (publicInstance) { + return false; + }, + enqueueForceUpdate: function (publicInstance) { + if (queue === null) { + warnNoop(publicInstance, 'forceUpdate'); + return null; + } + }, + enqueueReplaceState: function (publicInstance, completeState) { + replace = true; + queue = [completeState]; + }, + enqueueSetState: function (publicInstance, currentPartialState) { + if (queue === null) { + warnNoop(publicInstance, 'setState'); + return null; + } + + queue.push(currentPartialState); + }, + }; + var inst; + + if (isClass) { + inst = new Component(element.props, publicContext, updater); + + if (typeof Component.getDerivedStateFromProps === 'function') { + { + if (inst.state === null || inst.state === undefined) { + var componentName = getComponentName(Component) || 'Unknown'; + + if (!didWarnAboutUninitializedState[componentName]) { + warningWithoutStack$1( + false, + '`%s` uses `getDerivedStateFromProps` but its initial state is ' + + '%s. This is not recommended. Instead, define the initial state by ' + + 'assigning an object to `this.state` in the constructor of `%s`. ' + + 'This ensures that `getDerivedStateFromProps` arguments have a consistent shape.', + componentName, + inst.state === null ? 'null' : 'undefined', + componentName, + ); + didWarnAboutUninitializedState[componentName] = true; + } + } + } + + var partialState = Component.getDerivedStateFromProps.call(null, element.props, inst.state); + + { + if (partialState === undefined) { + var _componentName = getComponentName(Component) || 'Unknown'; + + if (!didWarnAboutUndefinedDerivedState[_componentName]) { + warningWithoutStack$1( + false, + '%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. ' + + 'You have returned undefined.', + _componentName, + ); + didWarnAboutUndefinedDerivedState[_componentName] = true; + } + } + } + + if (partialState != null) { + inst.state = _assign({}, inst.state, partialState); + } + } + } else { + { + if (Component.prototype && typeof Component.prototype.render === 'function') { + var _componentName2 = getComponentName(Component) || 'Unknown'; + + if (!didWarnAboutBadClass[_componentName2]) { + warningWithoutStack$1( + false, + "The <%s /> component appears to have a render method, but doesn't extend React.Component. " + + 'This is likely to cause errors. Change %s to extend React.Component instead.', + _componentName2, + _componentName2, + ); + didWarnAboutBadClass[_componentName2] = true; + } + } + } + + var componentIdentity = {}; + prepareToUseHooks(componentIdentity); + inst = Component(element.props, publicContext, updater); + inst = finishHooks(Component, element.props, inst, publicContext); + + if (inst == null || inst.render == null) { + child = inst; + validateRenderResult(child, Component); + return; + } + + { + var _componentName3 = getComponentName(Component) || 'Unknown'; + + if (!didWarnAboutModulePatternComponent[_componentName3]) { + warningWithoutStack$1( + false, + 'The <%s /> component appears to be a function component that returns a class instance. ' + + 'Change %s to a class that extends React.Component instead. ' + + "If you can't use a class try assigning the prototype on the function as a workaround. " + + "`%s.prototype = React.Component.prototype`. Don't use an arrow function since it " + + 'cannot be called with `new` by React.', + _componentName3, + _componentName3, + _componentName3, + ); + didWarnAboutModulePatternComponent[_componentName3] = true; + } + } + } + + inst.props = element.props; + inst.context = publicContext; + inst.updater = updater; + var initialState = inst.state; + + if (initialState === undefined) { + inst.state = initialState = null; + } + + if ( + typeof inst.UNSAFE_componentWillMount === 'function' || + typeof inst.componentWillMount === 'function' + ) { + if (typeof inst.componentWillMount === 'function') { + { + if ( + warnAboutDeprecatedLifecycles && + inst.componentWillMount.__suppressDeprecationWarning !== true + ) { + var _componentName4 = getComponentName(Component) || 'Unknown'; + + if (!didWarnAboutDeprecatedWillMount[_componentName4]) { + lowPriorityWarningWithoutStack$1( + false, // keep this warning in sync with ReactStrictModeWarning.js + 'componentWillMount has been renamed, and is not recommended for use. ' + + 'See https://fb.me/react-unsafe-component-lifecycles for details.\n\n' + + '* Move code from componentWillMount to componentDidMount (preferred in most cases) ' + + 'or the constructor.\n' + + '\nPlease update the following components: %s', + _componentName4, + ); + didWarnAboutDeprecatedWillMount[_componentName4] = true; + } + } + } // In order to support react-lifecycles-compat polyfilled components, + // Unsafe lifecycles should not be invoked for any component with the new gDSFP. + + if (typeof Component.getDerivedStateFromProps !== 'function') { + inst.componentWillMount(); + } + } + + if ( + typeof inst.UNSAFE_componentWillMount === 'function' && + typeof Component.getDerivedStateFromProps !== 'function' + ) { + // In order to support react-lifecycles-compat polyfilled components, + // Unsafe lifecycles should not be invoked for any component with the new gDSFP. + inst.UNSAFE_componentWillMount(); + } + + if (queue.length) { + var oldQueue = queue; + var oldReplace = replace; + queue = null; + replace = false; + + if (oldReplace && oldQueue.length === 1) { + inst.state = oldQueue[0]; + } else { + var nextState = oldReplace ? oldQueue[0] : inst.state; + var dontMutate = true; + + for (var i = oldReplace ? 1 : 0; i < oldQueue.length; i++) { + var partial = oldQueue[i]; + + var _partialState = + typeof partial === 'function' + ? partial.call(inst, nextState, element.props, publicContext) + : partial; + + if (_partialState != null) { + if (dontMutate) { + dontMutate = false; + nextState = _assign({}, nextState, _partialState); + } else { + _assign(nextState, _partialState); + } + } + } + + inst.state = nextState; + } + } else { + queue = null; + } + } + + child = inst.render(); + + { + if (child === undefined && inst.render._isMockFunction) { + // This is probably bad practice. Consider warning here and + // deprecating this convenience. + child = null; + } + } + + validateRenderResult(child, Component); + var childContext; + + if (disableLegacyContext) { + { + var childContextTypes = Component.childContextTypes; + + if (childContextTypes !== undefined) { + warningWithoutStack$1( + false, + '%s uses the legacy childContextTypes API which is no longer supported. ' + + 'Use React.createContext() instead.', + getComponentName(Component) || 'Unknown', + ); + } + } + } else { + if (typeof inst.getChildContext === 'function') { + var _childContextTypes = Component.childContextTypes; + + if (typeof _childContextTypes === 'object') { + childContext = inst.getChildContext(); + + for (var contextKey in childContext) { + if (!(contextKey in _childContextTypes)) { + { + throw Error( + (getComponentName(Component) || 'Unknown') + + '.getChildContext(): key "' + + contextKey + + '" is not defined in childContextTypes.', + ); + } + } + } + } else { + warningWithoutStack$1( + false, + '%s.getChildContext(): childContextTypes must be defined in order to ' + + 'use getChildContext().', + getComponentName(Component) || 'Unknown', + ); + } + } + + if (childContext) { + context = _assign({}, context, childContext); + } + } + } + + return { + child: child, + context: context, + }; + } + + var ReactDOMServerRenderer = + /*#__PURE__*/ + (function () { + // TODO: type this more strictly: + // DEV-only + function ReactDOMServerRenderer(children, makeStaticMarkup) { + var flatChildren = flattenTopLevelChildren(children); + var topFrame = { + type: null, + // Assume all trees start in the HTML namespace (not totally true, but + // this is what we did historically) + domNamespace: Namespaces.html, + children: flatChildren, + childIndex: 0, + context: emptyObject, + footer: '', + }; + + { + topFrame.debugElementStack = []; + } + + this.threadID = allocThreadID(); + this.stack = [topFrame]; + this.exhausted = false; + this.currentSelectValue = null; + this.previousWasTextNode = false; + this.makeStaticMarkup = makeStaticMarkup; + this.suspenseDepth = 0; // Context (new API) + + this.contextIndex = -1; + this.contextStack = []; + this.contextValueStack = []; + + { + this.contextProviderStack = []; + } + } + + var _proto = ReactDOMServerRenderer.prototype; + + _proto.destroy = function destroy() { + if (!this.exhausted) { + this.exhausted = true; + this.clearProviders(); + freeThreadID(this.threadID); + } + }; + /** + * Note: We use just two stacks regardless of how many context providers you have. + * Providers are always popped in the reverse order to how they were pushed + * so we always know on the way down which provider you'll encounter next on the way up. + * On the way down, we push the current provider, and its context value *before* + * we mutated it, onto the stacks. Therefore, on the way up, we always know which + * provider needs to be "restored" to which value. + * https://github.com/facebook/react/pull/12985#issuecomment-396301248 + */ + + _proto.pushProvider = function pushProvider(provider) { + var index = ++this.contextIndex; + var context = provider.type._context; + var threadID = this.threadID; + validateContextBounds(context, threadID); + var previousValue = context[threadID]; // Remember which value to restore this context to on our way up. + + this.contextStack[index] = context; + this.contextValueStack[index] = previousValue; + + { + // Only used for push/pop mismatch warnings. + this.contextProviderStack[index] = provider; + } // Mutate the current value. + + context[threadID] = provider.props.value; + }; + + _proto.popProvider = function popProvider(provider) { + var index = this.contextIndex; + + { + !(index > -1 && provider === this.contextProviderStack[index]) + ? warningWithoutStack$1(false, 'Unexpected pop.') + : void 0; + } + + var context = this.contextStack[index]; + var previousValue = this.contextValueStack[index]; // "Hide" these null assignments from Flow by using `any` + // because conceptually they are deletions--as long as we + // promise to never access values beyond `this.contextIndex`. + + this.contextStack[index] = null; + this.contextValueStack[index] = null; + + { + this.contextProviderStack[index] = null; + } + + this.contextIndex--; // Restore to the previous value we stored as we were walking down. + // We've already verified that this context has been expanded to accommodate + // this thread id, so we don't need to do it again. + + context[this.threadID] = previousValue; + }; + + _proto.clearProviders = function clearProviders() { + // Restore any remaining providers on the stack to previous values + for (var index = this.contextIndex; index >= 0; index--) { + var context = this.contextStack[index]; + var previousValue = this.contextValueStack[index]; + context[this.threadID] = previousValue; + } + }; + + _proto.read = function read(bytes) { + if (this.exhausted) { + return null; + } + + var prevThreadID = currentThreadID; + setCurrentThreadID(this.threadID); + var prevDispatcher = ReactCurrentDispatcher.current; + ReactCurrentDispatcher.current = Dispatcher; + + try { + // Markup generated within <Suspense> ends up buffered until we know + // nothing in that boundary suspended + var out = ['']; + var suspended = false; + + while (out[0].length < bytes) { + if (this.stack.length === 0) { + this.exhausted = true; + freeThreadID(this.threadID); + break; + } + + var frame = this.stack[this.stack.length - 1]; + + if (suspended || frame.childIndex >= frame.children.length) { + var footer = frame.footer; + + if (footer !== '') { + this.previousWasTextNode = false; + } + + this.stack.pop(); + + if (frame.type === 'select') { + this.currentSelectValue = null; + } else if ( + frame.type != null && + frame.type.type != null && + frame.type.type.$$typeof === REACT_PROVIDER_TYPE + ) { + var provider = frame.type; + this.popProvider(provider); + } else if (frame.type === REACT_SUSPENSE_TYPE) { + this.suspenseDepth--; + var buffered = out.pop(); + + if (suspended) { + suspended = false; // If rendering was suspended at this boundary, render the fallbackFrame + + var fallbackFrame = frame.fallbackFrame; + + if (!fallbackFrame) { + { + throw Error( + 'ReactDOMServer did not find an internal fallback frame for Suspense. This is a bug in React. Please file an issue.', + ); + } + } + + this.stack.push(fallbackFrame); + out[this.suspenseDepth] += '<!--$!-->'; // Skip flushing output since we're switching to the fallback + + continue; + } else { + out[this.suspenseDepth] += buffered; + } + } // Flush output + + out[this.suspenseDepth] += footer; + continue; + } + + var child = frame.children[frame.childIndex++]; + var outBuffer = ''; + + { + pushCurrentDebugStack(this.stack); // We're starting work on this frame, so reset its inner stack. + + frame.debugElementStack.length = 0; + } + + try { + outBuffer += this.render(child, frame.context, frame.domNamespace); + } catch (err) { + if (err != null && typeof err.then === 'function') { + if (enableSuspenseServerRenderer) { + if (!(this.suspenseDepth > 0)) { + { + throw Error( + 'A React component suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.', + ); + } + } + + suspended = true; + } else { + { + { + throw Error('ReactDOMServer does not yet support Suspense.'); + } + } + } + } else { + throw err; + } + } finally { + { + popCurrentDebugStack(); + } + } + + if (out.length <= this.suspenseDepth) { + out.push(''); + } + + out[this.suspenseDepth] += outBuffer; + } + + return out[0]; + } finally { + ReactCurrentDispatcher.current = prevDispatcher; + setCurrentThreadID(prevThreadID); + } + }; + + _proto.render = function render(child, context, parentNamespace) { + if (typeof child === 'string' || typeof child === 'number') { + var text = '' + child; + + if (text === '') { + return ''; + } + + if (this.makeStaticMarkup) { + return escapeTextForBrowser(text); + } + + if (this.previousWasTextNode) { + return '<!-- -->' + escapeTextForBrowser(text); + } + + this.previousWasTextNode = true; + return escapeTextForBrowser(text); + } else { + var nextChild; + + var _resolve = resolve(child, context, this.threadID); + + nextChild = _resolve.child; + context = _resolve.context; + + if (nextChild === null || nextChild === false) { + return ''; + } else if (!React.isValidElement(nextChild)) { + if (nextChild != null && nextChild.$$typeof != null) { + // Catch unexpected special types early. + var $$typeof = nextChild.$$typeof; + + if (!($$typeof !== REACT_PORTAL_TYPE)) { + { + throw Error( + 'Portals are not currently supported by the server renderer. Render them conditionally so that they only appear on the client render.', + ); + } + } // Catch-all to prevent an infinite loop if React.Children.toArray() supports some new type. + + { + { + throw Error( + 'Unknown element-like object type: ' + + $$typeof.toString() + + '. This is likely a bug in React. Please file an issue.', + ); + } + } + } + + var nextChildren = toArray(nextChild); + var frame = { + type: null, + domNamespace: parentNamespace, + children: nextChildren, + childIndex: 0, + context: context, + footer: '', + }; + + { + frame.debugElementStack = []; + } + + this.stack.push(frame); + return ''; + } // Safe because we just checked it's an element. + + var nextElement = nextChild; + var elementType = nextElement.type; + + if (typeof elementType === 'string') { + return this.renderDOM(nextElement, context, parentNamespace); + } + + switch (elementType) { + case REACT_STRICT_MODE_TYPE: + case REACT_CONCURRENT_MODE_TYPE: + case REACT_PROFILER_TYPE: + case REACT_SUSPENSE_LIST_TYPE: + case REACT_FRAGMENT_TYPE: { + var _nextChildren = toArray(nextChild.props.children); + + var _frame = { + type: null, + domNamespace: parentNamespace, + children: _nextChildren, + childIndex: 0, + context: context, + footer: '', + }; + + { + _frame.debugElementStack = []; + } + + this.stack.push(_frame); + return ''; + } + + case REACT_SUSPENSE_TYPE: { + if (enableSuspenseServerRenderer) { + var fallback = nextChild.props.fallback; + + if (fallback === undefined) { + // If there is no fallback, then this just behaves as a fragment. + var _nextChildren3 = toArray(nextChild.props.children); + + var _frame3 = { + type: null, + domNamespace: parentNamespace, + children: _nextChildren3, + childIndex: 0, + context: context, + footer: '', + }; + + { + _frame3.debugElementStack = []; + } + + this.stack.push(_frame3); + return ''; + } + + var fallbackChildren = toArray(fallback); + + var _nextChildren2 = toArray(nextChild.props.children); + + var fallbackFrame = { + type: null, + domNamespace: parentNamespace, + children: fallbackChildren, + childIndex: 0, + context: context, + footer: '<!--/$-->', + }; + var _frame2 = { + fallbackFrame: fallbackFrame, + type: REACT_SUSPENSE_TYPE, + domNamespace: parentNamespace, + children: _nextChildren2, + childIndex: 0, + context: context, + footer: '<!--/$-->', + }; + + { + _frame2.debugElementStack = []; + fallbackFrame.debugElementStack = []; + } + + this.stack.push(_frame2); + this.suspenseDepth++; + return '<!--$-->'; + } else { + { + { + throw Error('ReactDOMServer does not yet support Suspense.'); + } + } + } + } + // eslint-disable-next-line-no-fallthrough + + default: + break; + } + + if (typeof elementType === 'object' && elementType !== null) { + switch (elementType.$$typeof) { + case REACT_FORWARD_REF_TYPE: { + var element = nextChild; + + var _nextChildren4; + + var componentIdentity = {}; + prepareToUseHooks(componentIdentity); + _nextChildren4 = elementType.render(element.props, element.ref); + _nextChildren4 = finishHooks( + elementType.render, + element.props, + _nextChildren4, + element.ref, + ); + _nextChildren4 = toArray(_nextChildren4); + var _frame4 = { + type: null, + domNamespace: parentNamespace, + children: _nextChildren4, + childIndex: 0, + context: context, + footer: '', + }; + + { + _frame4.debugElementStack = []; + } + + this.stack.push(_frame4); + return ''; + } + + case REACT_MEMO_TYPE: { + var _element = nextChild; + var _nextChildren5 = [ + React.createElement( + elementType.type, + _assign( + { + ref: _element.ref, + }, + _element.props, + ), + ), + ]; + var _frame5 = { + type: null, + domNamespace: parentNamespace, + children: _nextChildren5, + childIndex: 0, + context: context, + footer: '', + }; + + { + _frame5.debugElementStack = []; + } + + this.stack.push(_frame5); + return ''; + } + + case REACT_PROVIDER_TYPE: { + var provider = nextChild; + var nextProps = provider.props; + + var _nextChildren6 = toArray(nextProps.children); + + var _frame6 = { + type: provider, + domNamespace: parentNamespace, + children: _nextChildren6, + childIndex: 0, + context: context, + footer: '', + }; + + { + _frame6.debugElementStack = []; + } + + this.pushProvider(provider); + this.stack.push(_frame6); + return ''; + } + + case REACT_CONTEXT_TYPE: { + var reactContext = nextChild.type; // The logic below for Context differs depending on PROD or DEV mode. In + // DEV mode, we create a separate object for Context.Consumer that acts + // like a proxy to Context. This proxy object adds unnecessary code in PROD + // so we use the old behaviour (Context.Consumer references Context) to + // reduce size and overhead. The separate object references context via + // a property called "_context", which also gives us the ability to check + // in DEV mode if this property exists or not and warn if it does not. + + { + if (reactContext._context === undefined) { + // This may be because it's a Context (rather than a Consumer). + // Or it may be because it's older React where they're the same thing. + // We only want to warn if we're sure it's a new React. + if (reactContext !== reactContext.Consumer) { + if (!hasWarnedAboutUsingContextAsConsumer) { + hasWarnedAboutUsingContextAsConsumer = true; + warning$1( + false, + 'Rendering <Context> directly is not supported and will be removed in ' + + 'a future major release. Did you mean to render <Context.Consumer> instead?', + ); + } + } + } else { + reactContext = reactContext._context; + } + } + + var _nextProps = nextChild.props; + var threadID = this.threadID; + validateContextBounds(reactContext, threadID); + var nextValue = reactContext[threadID]; + + var _nextChildren7 = toArray(_nextProps.children(nextValue)); + + var _frame7 = { + type: nextChild, + domNamespace: parentNamespace, + children: _nextChildren7, + childIndex: 0, + context: context, + footer: '', + }; + + { + _frame7.debugElementStack = []; + } + + this.stack.push(_frame7); + return ''; + } + // eslint-disable-next-line-no-fallthrough + + case REACT_FUNDAMENTAL_TYPE: { + if (enableFundamentalAPI) { + var fundamentalImpl = elementType.impl; + var open = fundamentalImpl.getServerSideString(null, nextElement.props); + var getServerSideStringClose = fundamentalImpl.getServerSideStringClose; + var close = + getServerSideStringClose !== undefined + ? getServerSideStringClose(null, nextElement.props) + : ''; + + var _nextChildren8 = + fundamentalImpl.reconcileChildren !== false + ? toArray(nextChild.props.children) + : []; + + var _frame8 = { + type: null, + domNamespace: parentNamespace, + children: _nextChildren8, + childIndex: 0, + context: context, + footer: close, + }; + + { + _frame8.debugElementStack = []; + } + + this.stack.push(_frame8); + return open; + } + + { + { + throw Error('ReactDOMServer does not yet support the fundamental API.'); + } + } + } + // eslint-disable-next-line-no-fallthrough + + case REACT_LAZY_TYPE: { + var _element2 = nextChild; + var lazyComponent = nextChild.type; // Attempt to initialize lazy component regardless of whether the + // suspense server-side renderer is enabled so synchronously + // resolved constructors are supported. + + initializeLazyComponentType(lazyComponent); + + switch (lazyComponent._status) { + case Resolved: { + var _nextChildren9 = [ + React.createElement( + lazyComponent._result, + _assign( + { + ref: _element2.ref, + }, + _element2.props, + ), + ), + ]; + var _frame9 = { + type: null, + domNamespace: parentNamespace, + children: _nextChildren9, + childIndex: 0, + context: context, + footer: '', + }; + + { + _frame9.debugElementStack = []; + } + + this.stack.push(_frame9); + return ''; + } + + case Rejected: + throw lazyComponent._result; + + case Pending: + default: { + { + throw Error('ReactDOMServer does not yet support lazy-loaded components.'); + } + } + } + } + // eslint-disable-next-line-no-fallthrough + + case REACT_SCOPE_TYPE: { + if (enableScopeAPI) { + var _nextChildren10 = toArray(nextChild.props.children); + + var _frame10 = { + type: null, + domNamespace: parentNamespace, + children: _nextChildren10, + childIndex: 0, + context: context, + footer: '', + }; + + { + _frame10.debugElementStack = []; + } + + this.stack.push(_frame10); + return ''; + } + + { + { + throw Error('ReactDOMServer does not yet support scope components.'); + } + } + } + } + } + + var info = ''; + + { + var owner = nextElement._owner; + + if ( + elementType === undefined || + (typeof elementType === 'object' && + elementType !== null && + Object.keys(elementType).length === 0) + ) { + info += + ' You likely forgot to export your component from the file ' + + "it's defined in, or you might have mixed up default and " + + 'named imports.'; + } + + var ownerName = owner ? getComponentName(owner) : null; + + if (ownerName) { + info += '\n\nCheck the render method of `' + ownerName + '`.'; + } + } + + { + { + throw Error( + 'Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: ' + + (elementType == null ? elementType : typeof elementType) + + '.' + + info, + ); + } + } + } + }; + + _proto.renderDOM = function renderDOM(element, context, parentNamespace) { + var tag = element.type.toLowerCase(); + var namespace = parentNamespace; + + if (parentNamespace === Namespaces.html) { + namespace = getIntrinsicNamespace(tag); + } + + { + if (namespace === Namespaces.html) { + // Should this check be gated by parent namespace? Not sure we want to + // allow <SVG> or <mATH>. + !(tag === element.type) + ? warning$1( + false, + '<%s /> is using incorrect casing. ' + + 'Use PascalCase for React components, ' + + 'or lowercase for HTML elements.', + element.type, + ) + : void 0; + } + } + + validateDangerousTag(tag); + var props = element.props; + + if (tag === 'input') { + { + ReactControlledValuePropTypes.checkPropTypes('input', props); + + if ( + props.checked !== undefined && + props.defaultChecked !== undefined && + !didWarnDefaultChecked + ) { + warning$1( + false, + '%s contains an input of type %s with both checked and defaultChecked props. ' + + 'Input elements must be either controlled or uncontrolled ' + + '(specify either the checked prop, or the defaultChecked prop, but not ' + + 'both). Decide between using a controlled or uncontrolled input ' + + 'element and remove one of these props. More info: ' + + 'https://fb.me/react-controlled-components', + 'A component', + props.type, + ); + didWarnDefaultChecked = true; + } + + if ( + props.value !== undefined && + props.defaultValue !== undefined && + !didWarnDefaultInputValue + ) { + warning$1( + false, + '%s contains an input of type %s with both value and defaultValue props. ' + + 'Input elements must be either controlled or uncontrolled ' + + '(specify either the value prop, or the defaultValue prop, but not ' + + 'both). Decide between using a controlled or uncontrolled input ' + + 'element and remove one of these props. More info: ' + + 'https://fb.me/react-controlled-components', + 'A component', + props.type, + ); + didWarnDefaultInputValue = true; + } + } + + props = _assign( + { + type: undefined, + }, + props, + { + defaultChecked: undefined, + defaultValue: undefined, + value: props.value != null ? props.value : props.defaultValue, + checked: props.checked != null ? props.checked : props.defaultChecked, + }, + ); + } else if (tag === 'textarea') { + { + ReactControlledValuePropTypes.checkPropTypes('textarea', props); + + if ( + props.value !== undefined && + props.defaultValue !== undefined && + !didWarnDefaultTextareaValue + ) { + warning$1( + false, + 'Textarea elements must be either controlled or uncontrolled ' + + '(specify either the value prop, or the defaultValue prop, but not ' + + 'both). Decide between using a controlled or uncontrolled textarea ' + + 'and remove one of these props. More info: ' + + 'https://fb.me/react-controlled-components', + ); + didWarnDefaultTextareaValue = true; + } + } + + var initialValue = props.value; + + if (initialValue == null) { + var defaultValue = props.defaultValue; // TODO (yungsters): Remove support for children content in <textarea>. + + var textareaChildren = props.children; + + if (textareaChildren != null) { + { + warning$1( + false, + 'Use the `defaultValue` or `value` props instead of setting ' + + 'children on <textarea>.', + ); + } + + if (!(defaultValue == null)) { + { + throw Error('If you supply `defaultValue` on a <textarea>, do not pass children.'); + } + } + + if (Array.isArray(textareaChildren)) { + if (!(textareaChildren.length <= 1)) { + { + throw Error('<textarea> can only have at most one child.'); + } + } + + textareaChildren = textareaChildren[0]; + } + + defaultValue = '' + textareaChildren; + } + + if (defaultValue == null) { + defaultValue = ''; + } + + initialValue = defaultValue; + } + + props = _assign({}, props, { + value: undefined, + children: '' + initialValue, + }); + } else if (tag === 'select') { + { + ReactControlledValuePropTypes.checkPropTypes('select', props); + + for (var i = 0; i < valuePropNames.length; i++) { + var propName = valuePropNames[i]; + + if (props[propName] == null) { + continue; + } + + var isArray = Array.isArray(props[propName]); + + if (props.multiple && !isArray) { + warning$1( + false, + 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.', + propName, + ); + } else if (!props.multiple && isArray) { + warning$1( + false, + 'The `%s` prop supplied to <select> must be a scalar ' + + 'value if `multiple` is false.', + propName, + ); + } + } + + if ( + props.value !== undefined && + props.defaultValue !== undefined && + !didWarnDefaultSelectValue + ) { + warning$1( + false, + 'Select elements must be either controlled or uncontrolled ' + + '(specify either the value prop, or the defaultValue prop, but not ' + + 'both). Decide between using a controlled or uncontrolled select ' + + 'element and remove one of these props. More info: ' + + 'https://fb.me/react-controlled-components', + ); + didWarnDefaultSelectValue = true; + } + } + + this.currentSelectValue = props.value != null ? props.value : props.defaultValue; + props = _assign({}, props, { + value: undefined, + }); + } else if (tag === 'option') { + var selected = null; + var selectValue = this.currentSelectValue; + var optionChildren = flattenOptionChildren(props.children); + + if (selectValue != null) { + var value; + + if (props.value != null) { + value = props.value + ''; + } else { + value = optionChildren; + } + + selected = false; + + if (Array.isArray(selectValue)) { + // multiple + for (var j = 0; j < selectValue.length; j++) { + if ('' + selectValue[j] === value) { + selected = true; + break; + } + } + } else { + selected = '' + selectValue === value; + } + + props = _assign( + { + selected: undefined, + children: undefined, + }, + props, + { + selected: selected, + children: optionChildren, + }, + ); + } + } + + { + validatePropertiesInDevelopment(tag, props); + } + + assertValidProps(tag, props); + var out = createOpenTagMarkup( + element.type, + tag, + props, + namespace, + this.makeStaticMarkup, + this.stack.length === 1, + ); + var footer = ''; + + if (omittedCloseTags.hasOwnProperty(tag)) { + out += '/>'; + } else { + out += '>'; + footer = '</' + element.type + '>'; + } + + var children; + var innerMarkup = getNonChildrenInnerMarkup(props); + + if (innerMarkup != null) { + children = []; + + if (newlineEatingTags[tag] && innerMarkup.charAt(0) === '\n') { + // text/html ignores the first character in these tags if it's a newline + // Prefer to break application/xml over text/html (for now) by adding + // a newline specifically to get eaten by the parser. (Alternately for + // textareas, replacing "^\n" with "\r\n" doesn't get eaten, and the first + // \r is normalized out by HTMLTextAreaElement#value.) + // See: <http://www.w3.org/TR/html-polyglot/#newlines-in-textarea-and-pre> + // See: <http://www.w3.org/TR/html5/syntax.html#element-restrictions> + // See: <http://www.w3.org/TR/html5/syntax.html#newlines> + // See: Parsing of "textarea" "listing" and "pre" elements + // from <http://www.w3.org/TR/html5/syntax.html#parsing-main-inbody> + out += '\n'; + } + + out += innerMarkup; + } else { + children = toArray(props.children); + } + + var frame = { + domNamespace: getChildNamespace(parentNamespace, element.type), + type: tag, + children: children, + childIndex: 0, + context: context, + footer: footer, + }; + + { + frame.debugElementStack = []; + } + + this.stack.push(frame); + this.previousWasTextNode = false; + return out; + }; + + return ReactDOMServerRenderer; + })(); + + /** + * Render a ReactElement to its initial HTML. This should only be used on the + * server. + * See https://reactjs.org/docs/react-dom-server.html#rendertostring + */ + + function renderToString(element) { + var renderer = new ReactDOMServerRenderer(element, false); + + try { + var markup = renderer.read(Infinity); + return markup; + } finally { + renderer.destroy(); + } + } + /** + * Similar to renderToString, except this doesn't create extra DOM attributes + * such as data-react-id that React uses internally. + * See https://reactjs.org/docs/react-dom-server.html#rendertostaticmarkup + */ + + function renderToStaticMarkup(element) { + var renderer = new ReactDOMServerRenderer(element, true); + + try { + var markup = renderer.read(Infinity); + return markup; + } finally { + renderer.destroy(); + } + } + + function _inheritsLoose(subClass, superClass) { + subClass.prototype = Object.create(superClass.prototype); + subClass.prototype.constructor = subClass; + subClass.__proto__ = superClass; + } + + var ReactMarkupReadableStream = + /*#__PURE__*/ + (function (_Readable) { + _inheritsLoose(ReactMarkupReadableStream, _Readable); + + function ReactMarkupReadableStream(element, makeStaticMarkup) { + var _this; + + // Calls the stream.Readable(options) constructor. Consider exposing built-in + // features like highWaterMark in the future. + _this = _Readable.call(this, {}) || this; + _this.partialRenderer = new ReactDOMServerRenderer(element, makeStaticMarkup); + return _this; + } + + var _proto = ReactMarkupReadableStream.prototype; + + _proto._destroy = function _destroy(err, callback) { + this.partialRenderer.destroy(); + callback(err); + }; + + _proto._read = function _read(size) { + try { + this.push(this.partialRenderer.read(size)); + } catch (err) { + this.destroy(err); + } + }; + + return ReactMarkupReadableStream; + })(stream.Readable); + /** + * Render a ReactElement to its initial HTML. This should only be used on the + * server. + * See https://reactjs.org/docs/react-dom-server.html#rendertonodestream + */ + + function renderToNodeStream(element) { + return new ReactMarkupReadableStream(element, false); + } + /** + * Similar to renderToNodeStream, except this doesn't create extra DOM attributes + * such as data-react-id that React uses internally. + * See https://reactjs.org/docs/react-dom-server.html#rendertostaticnodestream + */ + + function renderToStaticNodeStream(element) { + return new ReactMarkupReadableStream(element, true); + } + + var ReactDOMServerNode = { + renderToString: renderToString, + renderToStaticMarkup: renderToStaticMarkup, + renderToNodeStream: renderToNodeStream, + renderToStaticNodeStream: renderToStaticNodeStream, + version: ReactVersion, + }; + + var ReactDOMServerNode$1 = Object.freeze({ + default: ReactDOMServerNode, + }); + + var ReactDOMServer = (ReactDOMServerNode$1 && ReactDOMServerNode) || ReactDOMServerNode$1; + + // TODO: decide on the top-level export form. + // This is hacky but makes it work with both Rollup and Jest + + var server_node = ReactDOMServer.default || ReactDOMServer; + + module.exports = server_node; + })(); + } + + /***/ + }, + /* 519 */ + /***/ function (module, exports) { + module.exports = require('stream'); + + /***/ + }, + /* 520 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(143); + __webpack_require__(521); + module.exports = __webpack_require__(13).Array.from; + + /***/ + }, + /* 521 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var ctx = __webpack_require__(68); + var $export = __webpack_require__(36); + var toObject = __webpack_require__(69); + var call = __webpack_require__(221); + var isArrayIter = __webpack_require__(222); + var toLength = __webpack_require__(102); + var createProperty = __webpack_require__(522); + var getIterFn = __webpack_require__(223); + + $export( + $export.S + + $export.F * + !__webpack_require__(523)(function (iter) { + Array.from(iter); + }), + 'Array', + { + // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined) + from: function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) { + var O = toObject(arrayLike); + var C = typeof this == 'function' ? this : Array; + var aLen = arguments.length; + var mapfn = aLen > 1 ? arguments[1] : undefined; + var mapping = mapfn !== undefined; + var index = 0; + var iterFn = getIterFn(O); + var length, result, step, iterator; + if (mapping) mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2); + // if object isn't iterable or it's array with default iterator - use simple case + if (iterFn != undefined && !(C == Array && isArrayIter(iterFn))) { + for (iterator = iterFn.call(O), result = new C(); !(step = iterator.next()).done; index++) { + createProperty( + result, + index, + mapping ? call(iterator, mapfn, [step.value, index], true) : step.value, + ); + } + } else { + length = toLength(O.length); + for (result = new C(length); length > index; index++) { + createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]); + } + } + result.length = index; + return result; + }, + }, + ); + + /***/ + }, + /* 522 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $defineProperty = __webpack_require__(30); + var createDesc = __webpack_require__(78); + + module.exports = function (object, index, value) { + if (index in object) $defineProperty.f(object, index, createDesc(0, value)); + else object[index] = value; + }; + + /***/ + }, + /* 523 */ + /***/ function (module, exports, __webpack_require__) { + var ITERATOR = __webpack_require__(22)('iterator'); + var SAFE_CLOSING = false; + + try { + var riter = [7][ITERATOR](); + riter['return'] = function () { + SAFE_CLOSING = true; + }; + // eslint-disable-next-line no-throw-literal + Array.from(riter, function () { + throw 2; + }); + } catch (e) { + /* empty */ + } + + module.exports = function (exec, skipClosing) { + if (!skipClosing && !SAFE_CLOSING) return false; + var safe = false; + try { + var arr = [7]; + var iter = arr[ITERATOR](); + iter.next = function () { + return { done: (safe = true) }; + }; + arr[ITERATOR] = function () { + return iter; + }; + exec(arr); + } catch (e) { + /* empty */ + } + return safe; + }; + + /***/ + }, + /* 524 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(155); + __webpack_require__(143); + __webpack_require__(151); + __webpack_require__(525); + __webpack_require__(528); + __webpack_require__(531); + __webpack_require__(532); + module.exports = __webpack_require__(13).Map; + + /***/ + }, + /* 525 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var strong = __webpack_require__(526); + var validate = __webpack_require__(83); + var MAP = 'Map'; + + // 23.1 Map Objects + module.exports = __webpack_require__(225)( + MAP, + function (get) { + return function Map() { + return get(this, arguments.length > 0 ? arguments[0] : undefined); + }; + }, + { + // 23.1.3.6 Map.prototype.get(key) + get: function get(key) { + var entry = strong.getEntry(validate(this, MAP), key); + return entry && entry.v; + }, + // 23.1.3.9 Map.prototype.set(key, value) + set: function set(key, value) { + return strong.def(validate(this, MAP), key === 0 ? 0 : key, value); + }, + }, + strong, + true, + ); + + /***/ + }, + /* 526 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var dP = __webpack_require__(30).f; + var create = __webpack_require__(147); + var redefineAll = __webpack_require__(157); + var ctx = __webpack_require__(68); + var anInstance = __webpack_require__(158); + var forOf = __webpack_require__(82); + var $iterDefine = __webpack_require__(145); + var step = __webpack_require__(217); + var setSpecies = __webpack_require__(527); + var DESCRIPTORS = __webpack_require__(28); + var fastKey = __webpack_require__(81).fastKey; + var validate = __webpack_require__(83); + var SIZE = DESCRIPTORS ? '_s' : 'size'; + + var getEntry = function (that, key) { + // fast case + var index = fastKey(key); + var entry; + if (index !== 'F') return that._i[index]; + // frozen object case + for (entry = that._f; entry; entry = entry.n) { + if (entry.k == key) return entry; + } + }; + + module.exports = { + getConstructor: function (wrapper, NAME, IS_MAP, ADDER) { + var C = wrapper(function (that, iterable) { + anInstance(that, C, NAME, '_i'); + that._t = NAME; // collection type + that._i = create(null); // index + that._f = undefined; // first entry + that._l = undefined; // last entry + that[SIZE] = 0; // size + if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that); + }); + redefineAll(C.prototype, { + // 23.1.3.1 Map.prototype.clear() + // 23.2.3.2 Set.prototype.clear() + clear: function clear() { + for (var that = validate(this, NAME), data = that._i, entry = that._f; entry; entry = entry.n) { + entry.r = true; + if (entry.p) entry.p = entry.p.n = undefined; + delete data[entry.i]; + } + that._f = that._l = undefined; + that[SIZE] = 0; + }, + // 23.1.3.3 Map.prototype.delete(key) + // 23.2.3.4 Set.prototype.delete(value) + delete: function (key) { + var that = validate(this, NAME); + var entry = getEntry(that, key); + if (entry) { + var next = entry.n; + var prev = entry.p; + delete that._i[entry.i]; + entry.r = true; + if (prev) prev.n = next; + if (next) next.p = prev; + if (that._f == entry) that._f = next; + if (that._l == entry) that._l = prev; + that[SIZE]--; + } + return !!entry; + }, + // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined) + // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined) + forEach: function forEach(callbackfn /* , that = undefined */) { + validate(this, NAME); + var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3); + var entry; + while ((entry = entry ? entry.n : this._f)) { + f(entry.v, entry.k, this); + // revert to the last existing entry + while (entry && entry.r) entry = entry.p; + } + }, + // 23.1.3.7 Map.prototype.has(key) + // 23.2.3.7 Set.prototype.has(value) + has: function has(key) { + return !!getEntry(validate(this, NAME), key); + }, + }); + if (DESCRIPTORS) + dP(C.prototype, 'size', { + get: function () { + return validate(this, NAME)[SIZE]; + }, + }); + return C; + }, + def: function (that, key, value) { + var entry = getEntry(that, key); + var prev, index; + // change existing entry + if (entry) { + entry.v = value; + // create new entry + } else { + that._l = entry = { + i: (index = fastKey(key, true)), // <- index + k: key, // <- key + v: value, // <- value + p: (prev = that._l), // <- previous entry + n: undefined, // <- next entry + r: false, // <- removed + }; + if (!that._f) that._f = entry; + if (prev) prev.n = entry; + that[SIZE]++; + // add to index + if (index !== 'F') that._i[index] = entry; + } + return that; + }, + getEntry: getEntry, + setStrong: function (C, NAME, IS_MAP) { + // add .keys, .values, .entries, [@@iterator] + // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11 + $iterDefine( + C, + NAME, + function (iterated, kind) { + this._t = validate(iterated, NAME); // target + this._k = kind; // kind + this._l = undefined; // previous + }, + function () { + var that = this; + var kind = that._k; + var entry = that._l; + // revert to the last existing entry + while (entry && entry.r) entry = entry.p; + // get next entry + if (!that._t || !(that._l = entry = entry ? entry.n : that._t._f)) { + // or finish the iteration + that._t = undefined; + return step(1); + } + // return step by kind + if (kind == 'keys') return step(0, entry.k); + if (kind == 'values') return step(0, entry.v); + return step(0, [entry.k, entry.v]); + }, + IS_MAP ? 'entries' : 'values', + !IS_MAP, + true, + ); + + // add [@@species], 23.1.2.2, 23.2.2.2 + setSpecies(NAME); + }, + }; + + /***/ + }, + /* 527 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var global = __webpack_require__(29); + var core = __webpack_require__(13); + var dP = __webpack_require__(30); + var DESCRIPTORS = __webpack_require__(28); + var SPECIES = __webpack_require__(22)('species'); + + module.exports = function (KEY) { + var C = typeof core[KEY] == 'function' ? core[KEY] : global[KEY]; + if (DESCRIPTORS && C && !C[SPECIES]) + dP.f(C, SPECIES, { + configurable: true, + get: function () { + return this; + }, + }); + }; + + /***/ + }, + /* 528 */ + /***/ function (module, exports, __webpack_require__) { + // https://github.com/DavidBruant/Map-Set.prototype.toJSON + var $export = __webpack_require__(36); + + $export($export.P + $export.R, 'Map', { toJSON: __webpack_require__(529)('Map') }); + + /***/ + }, + /* 529 */ + /***/ function (module, exports, __webpack_require__) { + // https://github.com/DavidBruant/Map-Set.prototype.toJSON + var classof = __webpack_require__(224); + var from = __webpack_require__(530); + module.exports = function (NAME) { + return function toJSON() { + if (classof(this) != NAME) throw TypeError(NAME + "#toJSON isn't generic"); + return from(this); + }; + }; + + /***/ + }, + /* 530 */ + /***/ function (module, exports, __webpack_require__) { + var forOf = __webpack_require__(82); + + module.exports = function (iter, ITERATOR) { + var result = []; + forOf(iter, false, result.push, result, ITERATOR); + return result; + }; + + /***/ + }, + /* 531 */ + /***/ function (module, exports, __webpack_require__) { + // https://tc39.github.io/proposal-setmap-offrom/#sec-map.of + __webpack_require__(226)('Map'); + + /***/ + }, + /* 532 */ + /***/ function (module, exports, __webpack_require__) { + // https://tc39.github.io/proposal-setmap-offrom/#sec-map.from + __webpack_require__(227)('Map'); + + /***/ + }, + /* 533 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.default = generatorFunction; + + // See discussion: + // https://discuss.reactjs.org/t/how-to-determine-if-js-object-is-react-component/2825/2 + + /** + * Used to determine we'll call be calling React.createElement on the component of if this is a + * generator function used return a function that takes props to return a React element + * @param component + * @returns {boolean} + */ + function generatorFunction(component) { + if (!component.prototype) { + return false; + } // es5 or es6 React Component + + return !component.prototype.isReactComponent; + } + + /***/ + }, + /* 534 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var _interopRequireDefault = __webpack_require__(40); + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.default = void 0; + + var _from = _interopRequireDefault(__webpack_require__(234)); + + var _keys = _interopRequireDefault(__webpack_require__(159)); + + var _map = _interopRequireDefault(__webpack_require__(235)); + + // key = name used by react_on_rails to identify the store + // value = redux store creator, which is a function that takes props and returns a store + var registeredStoreGenerators = new _map.default(); + var hydratedStores = new _map.default(); + var _default = { + /** + * Register a store generator, a function that takes props and returns a store. + * @param storeGenerators { name1: storeGenerator1, name2: storeGenerator2 } + */ + register: function register(storeGenerators) { + (0, _keys.default)(storeGenerators).forEach(function (name) { + if (registeredStoreGenerators.has(name)) { + console.warn('Called registerStore for store that is already registered', name); + } + + var store = storeGenerators[name]; + + if (!store) { + throw new Error( + 'Called ReactOnRails.registerStores with a null or undefined as a value ' + + 'for the store generator with key '.concat(name, '.'), + ); + } + + registeredStoreGenerators.set(name, store); + }); + }, + + /** + * Used by components to get the hydrated store which contains props. + * @param name + * @param throwIfMissing Defaults to true. Set to false to have this call return undefined if + * there is no store with the given name. + * @returns Redux Store, possibly hydrated + */ + getStore: function getStore(name) { + var throwIfMissing = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + + if (hydratedStores.has(name)) { + return hydratedStores.get(name); + } + + var storeKeys = (0, _from.default)(hydratedStores.keys()).join(', '); + + if (storeKeys.length === 0) { + var msg = 'There are no stores hydrated and you are requesting the store '.concat( + name, + ".\nThis can happen if you are server rendering and either:\n1. You do not call redux_store near the top of your controller action's view (not the layout)\n and before any call to react_component.\n2. You do not render redux_store_hydration_data anywhere on your page.", + ); + throw new Error(msg); + } + + if (throwIfMissing) { + console.log('storeKeys', storeKeys); + throw new Error( + "Could not find hydrated store with name '".concat(name, "'. ") + + 'Hydrated store names include ['.concat(storeKeys, '].'), + ); + } + + return undefined; + }, + + /** + * Internally used function to get the store creator that was passed to `register`. + * @param name + * @returns storeCreator with given name + */ + getStoreGenerator: function getStoreGenerator(name) { + if (registeredStoreGenerators.has(name)) { + return registeredStoreGenerators.get(name); + } + + var storeKeys = (0, _from.default)(registeredStoreGenerators.keys()).join(', '); + throw new Error( + "Could not find store registered with name '".concat(name, "'. Registered store ") + + 'names include [ '.concat(storeKeys, ' ]. Maybe you forgot to register the store?'), + ); + }, + + /** + * Internally used function to set the hydrated store after a Rails page is loaded. + * @param name + * @param store (not the storeGenerator, but the hydrated store) + */ + setStore: function setStore(name, store) { + hydratedStores.set(name, store); + }, + + /** + * Internally used function to completely clear hydratedStores Map. + */ + clearHydratedStores: function clearHydratedStores() { + hydratedStores.clear(); + }, + + /** + * Get a Map containing all registered store generators. Useful for debugging. + * @returns Map where key is the component name and values are the store generators. + */ + storeGenerators: function storeGenerators() { + return registeredStoreGenerators; + }, + + /** + * Get a Map containing all hydrated stores. Useful for debugging. + * @returns Map where key is the component name and values are the hydrated stores. + */ + stores: function stores() { + return hydratedStores; + }, + }; + exports.default = _default; + + /***/ + }, + /* 535 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var _interopRequireDefault = __webpack_require__(40); + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.default = serverRenderReactComponent; + + var _stringify = _interopRequireDefault(__webpack_require__(105)); + + var _server = _interopRequireDefault(__webpack_require__(107)); + + var _ComponentRegistry = _interopRequireDefault(__webpack_require__(233)); + + var _createReactElement = _interopRequireDefault(__webpack_require__(160)); + + var _isCreateReactElementResultNonReactComponent = _interopRequireDefault(__webpack_require__(231)); + + var _buildConsoleReplay = _interopRequireDefault(__webpack_require__(236)); + + var _handleError = _interopRequireDefault(__webpack_require__(232)); + + function serverRenderReactComponent(options) { + var name = options.name, + domNodeId = options.domNodeId, + trace = options.trace, + props = options.props, + railsContext = options.railsContext; + var htmlResult = ''; + var hasErrors = false; + + try { + var componentObj = _ComponentRegistry.default.get(name); + + if (componentObj.isRenderer) { + throw new Error( + "Detected a renderer while server rendering component '".concat( + name, + "'. See https://github.com/shakacode/react_on_rails#renderer-functions", + ), + ); + } + + var reactElementOrRouterResult = (0, _createReactElement.default)({ + componentObj: componentObj, + domNodeId: domNodeId, + trace: trace, + props: props, + railsContext: railsContext, + }); + + if ((0, _isCreateReactElementResultNonReactComponent.default)(reactElementOrRouterResult)) { + // We let the client side handle any redirect + // Set hasErrors in case we want to throw a Rails exception + hasErrors = !!reactElementOrRouterResult.routeError; + + if (hasErrors) { + console.error( + 'React Router ERROR: '.concat((0, _stringify.default)(reactElementOrRouterResult.routeError)), + ); + } + + if (reactElementOrRouterResult.redirectLocation) { + if (trace) { + var redirectLocation = reactElementOrRouterResult.redirectLocation; + var redirectPath = redirectLocation.pathname + redirectLocation.search; + console.log( + 'ROUTER REDIRECT: ' + .concat(name, ' to dom node with id: ') + .concat(domNodeId, ', redirect to ') + .concat(redirectPath), + ); + } // For redirects on server rendering, we can't stop Rails from returning the same result. + // Possibly, someday, we could have the rails server redirect. + } else { + htmlResult = reactElementOrRouterResult.renderedHtml; + } + } else { + htmlResult = _server.default.renderToString(reactElementOrRouterResult); + } + } catch (e) { + hasErrors = true; + htmlResult = (0, _handleError.default)({ + e: e, + name: name, + serverSide: true, + }); + } + + var consoleReplayScript = (0, _buildConsoleReplay.default)(); + return (0, _stringify.default)({ + html: htmlResult, + consoleReplayScript: consoleReplayScript, + hasErrors: hasErrors, + }); + } + + /***/ + }, + /* 536 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.default = void 0; + var _default = { + wrapInScriptTags: function wrapInScriptTags(scriptId, scriptBody) { + if (!scriptBody) { + return ''; + } + + return '\n<script id="'.concat(scriptId, '">\n').concat(scriptBody, '\n</script>'); + }, + }; + exports.default = _default; + + /***/ + }, + /* 537 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.default = void 0; + + var _default = function _default(val) { + // Replace closing + var re = /<\/\W*script/gi; + return val.replace(re, '(/script'); + }; + + exports.default = _default; + + /***/ + }, + /* 538 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var _interopRequireDefault = __webpack_require__(40); + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.default = void 0; + + var _assign = _interopRequireDefault(__webpack_require__(228)); + + var _default = { + authenticityToken: function authenticityToken() { + var token = document.querySelector('meta[name="csrf-token"]'); + + if (token && token instanceof window.HTMLMetaElement) { + return token.content; + } + + return null; + }, + authenticityHeaders: function authenticityHeaders() { + var otherHeaders = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + return (0, _assign.default)(otherHeaders, { + 'X-CSRF-Token': this.authenticityToken(), + 'X-Requested-With': 'XMLHttpRequest', + }); + }, + }; + exports.default = _default; + + /***/ + }, + /* 539 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.default = context; + + /** + * Get the context, be it window or global + * @returns {boolean|Window|*|context} + */ + function context() { + return (typeof window !== 'undefined' && window) || (typeof global !== 'undefined' && global) || this; + } + + /***/ + }, + /* 540 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + // Super simple example without using React. + // This shows you can server side render any JS code. + + var HelloString = { + world: function world() { + return 'Hello WORLD! Will this work?? YES! Time to visit Maui'; + }, + }; + + var _default = HelloString; + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + HelloString, + 'HelloString', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/non_react/HelloString.js', + ); + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/non_react/HelloString.js', + ); + })(); + + /***/ + }, + /* 541 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** @license React v16.12.0 + * react-is.development.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + + if (true) { + (function () { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { value: true }); + + // The Symbol used to tag the ReactElement-like types. If there is no native Symbol + // nor polyfill, then a plain number is used for performance. + var hasSymbol = typeof Symbol === 'function' && Symbol.for; + var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7; + var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca; + var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb; + var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc; + var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2; + var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd; + var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary + // (unstable) APIs that have been removed. Can we remove the symbols? + + var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf; + var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf; + var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0; + var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1; + var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8; + var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3; + var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4; + var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5; + var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6; + var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7; + + function isValidElementType(type) { + return ( + typeof type === 'string' || + typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill. + type === REACT_FRAGMENT_TYPE || + type === REACT_CONCURRENT_MODE_TYPE || + type === REACT_PROFILER_TYPE || + type === REACT_STRICT_MODE_TYPE || + type === REACT_SUSPENSE_TYPE || + type === REACT_SUSPENSE_LIST_TYPE || + (typeof type === 'object' && + type !== null && + (type.$$typeof === REACT_LAZY_TYPE || + type.$$typeof === REACT_MEMO_TYPE || + type.$$typeof === REACT_PROVIDER_TYPE || + type.$$typeof === REACT_CONTEXT_TYPE || + type.$$typeof === REACT_FORWARD_REF_TYPE || + type.$$typeof === REACT_FUNDAMENTAL_TYPE || + type.$$typeof === REACT_RESPONDER_TYPE || + type.$$typeof === REACT_SCOPE_TYPE)) + ); + } + + /** + * Forked from fbjs/warning: + * https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js + * + * Only change is we use console.warn instead of console.error, + * and do nothing when 'console' is not supported. + * This really simplifies the code. + * --- + * Similar to invariant but only logs a warning if the condition is not met. + * This can be used to log issues in development environments in critical + * paths. Removing the logging code for production environments will keep the + * same logic and follow the same code paths. + */ + var lowPriorityWarningWithoutStack = function () {}; + + { + var printWarning = function (format) { + for ( + var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; + _key < _len; + _key++ + ) { + args[_key - 1] = arguments[_key]; + } + + var argIndex = 0; + var message = + 'Warning: ' + + format.replace(/%s/g, function () { + return args[argIndex++]; + }); + + if (typeof console !== 'undefined') { + console.warn(message); + } + + try { + // --- Welcome to debugging React --- + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + throw new Error(message); + } catch (x) {} + }; + + lowPriorityWarningWithoutStack = function (condition, format) { + if (format === undefined) { + throw new Error( + '`lowPriorityWarningWithoutStack(condition, format, ...args)` requires a warning ' + + 'message argument', + ); + } + + if (!condition) { + for ( + var _len2 = arguments.length, args = new Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; + _key2 < _len2; + _key2++ + ) { + args[_key2 - 2] = arguments[_key2]; + } + + printWarning.apply(void 0, [format].concat(args)); + } + }; + } + + var lowPriorityWarningWithoutStack$1 = lowPriorityWarningWithoutStack; + + function typeOf(object) { + if (typeof object === 'object' && object !== null) { + var $$typeof = object.$$typeof; + + switch ($$typeof) { + case REACT_ELEMENT_TYPE: + var type = object.type; + + switch (type) { + case REACT_ASYNC_MODE_TYPE: + case REACT_CONCURRENT_MODE_TYPE: + case REACT_FRAGMENT_TYPE: + case REACT_PROFILER_TYPE: + case REACT_STRICT_MODE_TYPE: + case REACT_SUSPENSE_TYPE: + return type; + + default: + var $$typeofType = type && type.$$typeof; + + switch ($$typeofType) { + case REACT_CONTEXT_TYPE: + case REACT_FORWARD_REF_TYPE: + case REACT_LAZY_TYPE: + case REACT_MEMO_TYPE: + case REACT_PROVIDER_TYPE: + return $$typeofType; + + default: + return $$typeof; + } + } + + case REACT_PORTAL_TYPE: + return $$typeof; + } + } + + return undefined; + } // AsyncMode is deprecated along with isAsyncMode + + var AsyncMode = REACT_ASYNC_MODE_TYPE; + var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE; + var ContextConsumer = REACT_CONTEXT_TYPE; + var ContextProvider = REACT_PROVIDER_TYPE; + var Element = REACT_ELEMENT_TYPE; + var ForwardRef = REACT_FORWARD_REF_TYPE; + var Fragment = REACT_FRAGMENT_TYPE; + var Lazy = REACT_LAZY_TYPE; + var Memo = REACT_MEMO_TYPE; + var Portal = REACT_PORTAL_TYPE; + var Profiler = REACT_PROFILER_TYPE; + var StrictMode = REACT_STRICT_MODE_TYPE; + var Suspense = REACT_SUSPENSE_TYPE; + var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated + + function isAsyncMode(object) { + { + if (!hasWarnedAboutDeprecatedIsAsyncMode) { + hasWarnedAboutDeprecatedIsAsyncMode = true; + lowPriorityWarningWithoutStack$1( + false, + 'The ReactIs.isAsyncMode() alias has been deprecated, ' + + 'and will be removed in React 17+. Update your code to use ' + + 'ReactIs.isConcurrentMode() instead. It has the exact same API.', + ); + } + } + + return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE; + } + function isConcurrentMode(object) { + return typeOf(object) === REACT_CONCURRENT_MODE_TYPE; + } + function isContextConsumer(object) { + return typeOf(object) === REACT_CONTEXT_TYPE; + } + function isContextProvider(object) { + return typeOf(object) === REACT_PROVIDER_TYPE; + } + function isElement(object) { + return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; + } + function isForwardRef(object) { + return typeOf(object) === REACT_FORWARD_REF_TYPE; + } + function isFragment(object) { + return typeOf(object) === REACT_FRAGMENT_TYPE; + } + function isLazy(object) { + return typeOf(object) === REACT_LAZY_TYPE; + } + function isMemo(object) { + return typeOf(object) === REACT_MEMO_TYPE; + } + function isPortal(object) { + return typeOf(object) === REACT_PORTAL_TYPE; + } + function isProfiler(object) { + return typeOf(object) === REACT_PROFILER_TYPE; + } + function isStrictMode(object) { + return typeOf(object) === REACT_STRICT_MODE_TYPE; + } + function isSuspense(object) { + return typeOf(object) === REACT_SUSPENSE_TYPE; + } + + exports.typeOf = typeOf; + exports.AsyncMode = AsyncMode; + exports.ConcurrentMode = ConcurrentMode; + exports.ContextConsumer = ContextConsumer; + exports.ContextProvider = ContextProvider; + exports.Element = Element; + exports.ForwardRef = ForwardRef; + exports.Fragment = Fragment; + exports.Lazy = Lazy; + exports.Memo = Memo; + exports.Portal = Portal; + exports.Profiler = Profiler; + exports.StrictMode = StrictMode; + exports.Suspense = Suspense; + exports.isValidElementType = isValidElementType; + exports.isAsyncMode = isAsyncMode; + exports.isConcurrentMode = isConcurrentMode; + exports.isContextConsumer = isContextConsumer; + exports.isContextProvider = isContextProvider; + exports.isElement = isElement; + exports.isForwardRef = isForwardRef; + exports.isFragment = isFragment; + exports.isLazy = isLazy; + exports.isMemo = isMemo; + exports.isPortal = isPortal; + exports.isProfiler = isProfiler; + exports.isStrictMode = isStrictMode; + exports.isSuspense = isSuspense; + })(); + } + + /***/ + }, + /* 542 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + + var ReactIs = __webpack_require__(108); + var assign = __webpack_require__(63); + + var ReactPropTypesSecret = __webpack_require__(230); + var checkPropTypes = __webpack_require__(106); + + var has = Function.call.bind(Object.prototype.hasOwnProperty); + var printWarning = function () {}; + + if (true) { + printWarning = function (text) { + var message = 'Warning: ' + text; + if (typeof console !== 'undefined') { + console.error(message); + } + try { + // --- Welcome to debugging React --- + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + throw new Error(message); + } catch (x) {} + }; + } + + function emptyFunctionThatReturnsNull() { + return null; + } + + module.exports = function (isValidElement, throwOnDirectAccess) { + /* global Symbol */ + var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; + var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec. + + /** + * Returns the iterator method function contained on the iterable object. + * + * Be sure to invoke the function with the iterable as context: + * + * var iteratorFn = getIteratorFn(myIterable); + * if (iteratorFn) { + * var iterator = iteratorFn.call(myIterable); + * ... + * } + * + * @param {?object} maybeIterable + * @return {?function} + */ + function getIteratorFn(maybeIterable) { + var iteratorFn = + maybeIterable && + ((ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL]) || maybeIterable[FAUX_ITERATOR_SYMBOL]); + if (typeof iteratorFn === 'function') { + return iteratorFn; + } + } + + /** + * Collection of methods that allow declaration and validation of props that are + * supplied to React components. Example usage: + * + * var Props = require('ReactPropTypes'); + * var MyArticle = React.createClass({ + * propTypes: { + * // An optional string prop named "description". + * description: Props.string, + * + * // A required enum prop named "category". + * category: Props.oneOf(['News','Photos']).isRequired, + * + * // A prop named "dialog" that requires an instance of Dialog. + * dialog: Props.instanceOf(Dialog).isRequired + * }, + * render: function() { ... } + * }); + * + * A more formal specification of how these methods are used: + * + * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...) + * decl := ReactPropTypes.{type}(.isRequired)? + * + * Each and every declaration produces a function with the same signature. This + * allows the creation of custom validation functions. For example: + * + * var MyLink = React.createClass({ + * propTypes: { + * // An optional string or URI prop named "href". + * href: function(props, propName, componentName) { + * var propValue = props[propName]; + * if (propValue != null && typeof propValue !== 'string' && + * !(propValue instanceof URI)) { + * return new Error( + * 'Expected a string or an URI for ' + propName + ' in ' + + * componentName + * ); + * } + * } + * }, + * render: function() {...} + * }); + * + * @internal + */ + + var ANONYMOUS = '<<anonymous>>'; + + // Important! + // Keep this list in sync with production version in `./factoryWithThrowingShims.js`. + var ReactPropTypes = { + array: createPrimitiveTypeChecker('array'), + bool: createPrimitiveTypeChecker('boolean'), + func: createPrimitiveTypeChecker('function'), + number: createPrimitiveTypeChecker('number'), + object: createPrimitiveTypeChecker('object'), + string: createPrimitiveTypeChecker('string'), + symbol: createPrimitiveTypeChecker('symbol'), + + any: createAnyTypeChecker(), + arrayOf: createArrayOfTypeChecker, + element: createElementTypeChecker(), + elementType: createElementTypeTypeChecker(), + instanceOf: createInstanceTypeChecker, + node: createNodeChecker(), + objectOf: createObjectOfTypeChecker, + oneOf: createEnumTypeChecker, + oneOfType: createUnionTypeChecker, + shape: createShapeTypeChecker, + exact: createStrictShapeTypeChecker, + }; + + /** + * inlined Object.is polyfill to avoid requiring consumers ship their own + * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is + */ + /*eslint-disable no-self-compare*/ + function is(x, y) { + // SameValue algorithm + if (x === y) { + // Steps 1-5, 7-10 + // Steps 6.b-6.e: +0 != -0 + return x !== 0 || 1 / x === 1 / y; + } else { + // Step 6.a: NaN == NaN + return x !== x && y !== y; + } + } + /*eslint-enable no-self-compare*/ + + /** + * We use an Error-like object for backward compatibility as people may call + * PropTypes directly and inspect their output. However, we don't use real + * Errors anymore. We don't inspect their stack anyway, and creating them + * is prohibitively expensive if they are created too often, such as what + * happens in oneOfType() for any type before the one that matched. + */ + function PropTypeError(message) { + this.message = message; + this.stack = ''; + } + // Make `instanceof Error` still work for returned errors. + PropTypeError.prototype = Error.prototype; + + function createChainableTypeChecker(validate) { + if (true) { + var manualPropTypeCallCache = {}; + var manualPropTypeWarningCount = 0; + } + function checkType(isRequired, props, propName, componentName, location, propFullName, secret) { + componentName = componentName || ANONYMOUS; + propFullName = propFullName || propName; + + if (secret !== ReactPropTypesSecret) { + if (throwOnDirectAccess) { + // New behavior only for users of `prop-types` package + var err = new Error( + 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' + + 'Use `PropTypes.checkPropTypes()` to call them. ' + + 'Read more at http://fb.me/use-check-prop-types', + ); + err.name = 'Invariant Violation'; + throw err; + } else if ('development' !== 'production' && typeof console !== 'undefined') { + // Old behavior for people using React.PropTypes + var cacheKey = componentName + ':' + propName; + if ( + !manualPropTypeCallCache[cacheKey] && + // Avoid spamming the console because they are often not actionable except for lib authors + manualPropTypeWarningCount < 3 + ) { + printWarning( + 'You are manually calling a React.PropTypes validation ' + + 'function for the `' + + propFullName + + '` prop on `' + + componentName + + '`. This is deprecated ' + + 'and will throw in the standalone `prop-types` package. ' + + 'You may be seeing this warning due to a third-party PropTypes ' + + 'library. See https://fb.me/react-warning-dont-call-proptypes ' + + 'for details.', + ); + manualPropTypeCallCache[cacheKey] = true; + manualPropTypeWarningCount++; + } + } + } + if (props[propName] == null) { + if (isRequired) { + if (props[propName] === null) { + return new PropTypeError( + 'The ' + + location + + ' `' + + propFullName + + '` is marked as required ' + + ('in `' + componentName + '`, but its value is `null`.'), + ); + } + return new PropTypeError( + 'The ' + + location + + ' `' + + propFullName + + '` is marked as required in ' + + ('`' + componentName + '`, but its value is `undefined`.'), + ); + } + return null; + } else { + return validate(props, propName, componentName, location, propFullName); + } + } + + var chainedCheckType = checkType.bind(null, false); + chainedCheckType.isRequired = checkType.bind(null, true); + + return chainedCheckType; + } + + function createPrimitiveTypeChecker(expectedType) { + function validate(props, propName, componentName, location, propFullName, secret) { + var propValue = props[propName]; + var propType = getPropType(propValue); + if (propType !== expectedType) { + // `propValue` being instance of, say, date/regexp, pass the 'object' + // check, but we can offer a more precise error message here rather than + // 'of type `object`'. + var preciseType = getPreciseType(propValue); + + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` of type ' + + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + + ('`' + expectedType + '`.'), + ); + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createAnyTypeChecker() { + return createChainableTypeChecker(emptyFunctionThatReturnsNull); + } + + function createArrayOfTypeChecker(typeChecker) { + function validate(props, propName, componentName, location, propFullName) { + if (typeof typeChecker !== 'function') { + return new PropTypeError( + 'Property `' + + propFullName + + '` of component `' + + componentName + + '` has invalid PropType notation inside arrayOf.', + ); + } + var propValue = props[propName]; + if (!Array.isArray(propValue)) { + var propType = getPropType(propValue); + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` of type ' + + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'), + ); + } + for (var i = 0; i < propValue.length; i++) { + var error = typeChecker( + propValue, + i, + componentName, + location, + propFullName + '[' + i + ']', + ReactPropTypesSecret, + ); + if (error instanceof Error) { + return error; + } + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createElementTypeChecker() { + function validate(props, propName, componentName, location, propFullName) { + var propValue = props[propName]; + if (!isValidElement(propValue)) { + var propType = getPropType(propValue); + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` of type ' + + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'), + ); + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createElementTypeTypeChecker() { + function validate(props, propName, componentName, location, propFullName) { + var propValue = props[propName]; + if (!ReactIs.isValidElementType(propValue)) { + var propType = getPropType(propValue); + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` of type ' + + ('`' + + propType + + '` supplied to `' + + componentName + + '`, expected a single ReactElement type.'), + ); + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createInstanceTypeChecker(expectedClass) { + function validate(props, propName, componentName, location, propFullName) { + if (!(props[propName] instanceof expectedClass)) { + var expectedClassName = expectedClass.name || ANONYMOUS; + var actualClassName = getClassName(props[propName]); + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` of type ' + + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + + ('instance of `' + expectedClassName + '`.'), + ); + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createEnumTypeChecker(expectedValues) { + if (!Array.isArray(expectedValues)) { + if (true) { + if (arguments.length > 1) { + printWarning( + 'Invalid arguments supplied to oneOf, expected an array, got ' + + arguments.length + + ' arguments. ' + + 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).', + ); + } else { + printWarning('Invalid argument supplied to oneOf, expected an array.'); + } + } + return emptyFunctionThatReturnsNull; + } + + function validate(props, propName, componentName, location, propFullName) { + var propValue = props[propName]; + for (var i = 0; i < expectedValues.length; i++) { + if (is(propValue, expectedValues[i])) { + return null; + } + } + + var valuesString = JSON.stringify(expectedValues, function replacer(key, value) { + var type = getPreciseType(value); + if (type === 'symbol') { + return String(value); + } + return value; + }); + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` of value `' + + String(propValue) + + '` ' + + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'), + ); + } + return createChainableTypeChecker(validate); + } + + function createObjectOfTypeChecker(typeChecker) { + function validate(props, propName, componentName, location, propFullName) { + if (typeof typeChecker !== 'function') { + return new PropTypeError( + 'Property `' + + propFullName + + '` of component `' + + componentName + + '` has invalid PropType notation inside objectOf.', + ); + } + var propValue = props[propName]; + var propType = getPropType(propValue); + if (propType !== 'object') { + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` of type ' + + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'), + ); + } + for (var key in propValue) { + if (has(propValue, key)) { + var error = typeChecker( + propValue, + key, + componentName, + location, + propFullName + '.' + key, + ReactPropTypesSecret, + ); + if (error instanceof Error) { + return error; + } + } + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createUnionTypeChecker(arrayOfTypeCheckers) { + if (!Array.isArray(arrayOfTypeCheckers)) { + true + ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') + : void 0; + return emptyFunctionThatReturnsNull; + } + + for (var i = 0; i < arrayOfTypeCheckers.length; i++) { + var checker = arrayOfTypeCheckers[i]; + if (typeof checker !== 'function') { + printWarning( + 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' + + 'received ' + + getPostfixForTypeWarning(checker) + + ' at index ' + + i + + '.', + ); + return emptyFunctionThatReturnsNull; + } + } + + function validate(props, propName, componentName, location, propFullName) { + for (var i = 0; i < arrayOfTypeCheckers.length; i++) { + var checker = arrayOfTypeCheckers[i]; + if ( + checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null + ) { + return null; + } + } + + return new PropTypeError( + 'Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'), + ); + } + return createChainableTypeChecker(validate); + } + + function createNodeChecker() { + function validate(props, propName, componentName, location, propFullName) { + if (!isNode(props[propName])) { + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` supplied to ' + + ('`' + componentName + '`, expected a ReactNode.'), + ); + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createShapeTypeChecker(shapeTypes) { + function validate(props, propName, componentName, location, propFullName) { + var propValue = props[propName]; + var propType = getPropType(propValue); + if (propType !== 'object') { + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` of type `' + + propType + + '` ' + + ('supplied to `' + componentName + '`, expected `object`.'), + ); + } + for (var key in shapeTypes) { + var checker = shapeTypes[key]; + if (!checker) { + continue; + } + var error = checker( + propValue, + key, + componentName, + location, + propFullName + '.' + key, + ReactPropTypesSecret, + ); + if (error) { + return error; + } + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createStrictShapeTypeChecker(shapeTypes) { + function validate(props, propName, componentName, location, propFullName) { + var propValue = props[propName]; + var propType = getPropType(propValue); + if (propType !== 'object') { + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` of type `' + + propType + + '` ' + + ('supplied to `' + componentName + '`, expected `object`.'), + ); + } + // We need to check all keys in case some are required but missing from + // props. + var allKeys = assign({}, props[propName], shapeTypes); + for (var key in allKeys) { + var checker = shapeTypes[key]; + if (!checker) { + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` key `' + + key + + '` supplied to `' + + componentName + + '`.' + + '\nBad object: ' + + JSON.stringify(props[propName], null, ' ') + + '\nValid keys: ' + + JSON.stringify(Object.keys(shapeTypes), null, ' '), + ); + } + var error = checker( + propValue, + key, + componentName, + location, + propFullName + '.' + key, + ReactPropTypesSecret, + ); + if (error) { + return error; + } + } + return null; + } + + return createChainableTypeChecker(validate); + } + + function isNode(propValue) { + switch (typeof propValue) { + case 'number': + case 'string': + case 'undefined': + return true; + case 'boolean': + return !propValue; + case 'object': + if (Array.isArray(propValue)) { + return propValue.every(isNode); + } + if (propValue === null || isValidElement(propValue)) { + return true; + } + + var iteratorFn = getIteratorFn(propValue); + if (iteratorFn) { + var iterator = iteratorFn.call(propValue); + var step; + if (iteratorFn !== propValue.entries) { + while (!(step = iterator.next()).done) { + if (!isNode(step.value)) { + return false; + } + } + } else { + // Iterator will provide entry [k,v] tuples rather than values. + while (!(step = iterator.next()).done) { + var entry = step.value; + if (entry) { + if (!isNode(entry[1])) { + return false; + } + } + } + } + } else { + return false; + } + + return true; + default: + return false; + } + } + + function isSymbol(propType, propValue) { + // Native Symbol. + if (propType === 'symbol') { + return true; + } + + // falsy value can't be a Symbol + if (!propValue) { + return false; + } + + // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol' + if (propValue['@@toStringTag'] === 'Symbol') { + return true; + } + + // Fallback for non-spec compliant Symbols which are polyfilled. + if (typeof Symbol === 'function' && propValue instanceof Symbol) { + return true; + } + + return false; + } + + // Equivalent of `typeof` but with special handling for array and regexp. + function getPropType(propValue) { + var propType = typeof propValue; + if (Array.isArray(propValue)) { + return 'array'; + } + if (propValue instanceof RegExp) { + // Old webkits (at least until Android 4.0) return 'function' rather than + // 'object' for typeof a RegExp. We'll normalize this here so that /bla/ + // passes PropTypes.object. + return 'object'; + } + if (isSymbol(propType, propValue)) { + return 'symbol'; + } + return propType; + } + + // This handles more types than `getPropType`. Only used for error messages. + // See `createPrimitiveTypeChecker`. + function getPreciseType(propValue) { + if (typeof propValue === 'undefined' || propValue === null) { + return '' + propValue; + } + var propType = getPropType(propValue); + if (propType === 'object') { + if (propValue instanceof Date) { + return 'date'; + } else if (propValue instanceof RegExp) { + return 'regexp'; + } + } + return propType; + } + + // Returns a string that is postfixed to a warning about an invalid type. + // For example, "undefined" or "of type array" + function getPostfixForTypeWarning(value) { + var type = getPreciseType(value); + switch (type) { + case 'array': + case 'object': + return 'an ' + type; + case 'boolean': + case 'date': + case 'regexp': + return 'a ' + type; + default: + return type; + } + } + + // Returns class name of the object, if any. + function getClassName(propValue) { + if (!propValue.constructor || !propValue.constructor.name) { + return ANONYMOUS; + } + return propValue.constructor.name; + } + + ReactPropTypes.checkPropTypes = checkPropTypes; + ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache; + ReactPropTypes.PropTypes = ReactPropTypes; + + return ReactPropTypes; + }; + + /***/ + }, + /* 543 */ + /***/ function (module, exports, __webpack_require__) { + /* WEBPACK VAR INJECTION */ (function (module) { + var __WEBPACK_AMD_DEFINE_RESULT__; /** + * @license + * Lodash <https://lodash.com/> + * Copyright OpenJS Foundation and other contributors <https://openjsf.org/> + * Released under MIT license <https://lodash.com/license> + * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ + (function () { + /** Used as a safe reference for `undefined` in pre-ES5 environments. */ + var undefined; + + /** Used as the semantic version number. */ + var VERSION = '4.17.15'; + + /** Used as the size to enable large array optimizations. */ + var LARGE_ARRAY_SIZE = 200; + + /** Error message constants. */ + var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.', + FUNC_ERROR_TEXT = 'Expected a function'; + + /** Used to stand-in for `undefined` hash values. */ + var HASH_UNDEFINED = '__lodash_hash_undefined__'; + + /** Used as the maximum memoize cache size. */ + var MAX_MEMOIZE_SIZE = 500; + + /** Used as the internal argument placeholder. */ + var PLACEHOLDER = '__lodash_placeholder__'; + + /** Used to compose bitmasks for cloning. */ + var CLONE_DEEP_FLAG = 1, + CLONE_FLAT_FLAG = 2, + CLONE_SYMBOLS_FLAG = 4; + + /** Used to compose bitmasks for value comparisons. */ + var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; + + /** Used to compose bitmasks for function metadata. */ + var WRAP_BIND_FLAG = 1, + WRAP_BIND_KEY_FLAG = 2, + WRAP_CURRY_BOUND_FLAG = 4, + WRAP_CURRY_FLAG = 8, + WRAP_CURRY_RIGHT_FLAG = 16, + WRAP_PARTIAL_FLAG = 32, + WRAP_PARTIAL_RIGHT_FLAG = 64, + WRAP_ARY_FLAG = 128, + WRAP_REARG_FLAG = 256, + WRAP_FLIP_FLAG = 512; + + /** Used as default options for `_.truncate`. */ + var DEFAULT_TRUNC_LENGTH = 30, + DEFAULT_TRUNC_OMISSION = '...'; + + /** Used to detect hot functions by number of calls within a span of milliseconds. */ + var HOT_COUNT = 800, + HOT_SPAN = 16; + + /** Used to indicate the type of lazy iteratees. */ + var LAZY_FILTER_FLAG = 1, + LAZY_MAP_FLAG = 2, + LAZY_WHILE_FLAG = 3; + + /** Used as references for various `Number` constants. */ + var INFINITY = 1 / 0, + MAX_SAFE_INTEGER = 9007199254740991, + MAX_INTEGER = 1.7976931348623157e308, + NAN = 0 / 0; + + /** Used as references for the maximum length and index of an array. */ + var MAX_ARRAY_LENGTH = 4294967295, + MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1, + HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1; + + /** Used to associate wrap methods with their bit flags. */ + var wrapFlags = [ + ['ary', WRAP_ARY_FLAG], + ['bind', WRAP_BIND_FLAG], + ['bindKey', WRAP_BIND_KEY_FLAG], + ['curry', WRAP_CURRY_FLAG], + ['curryRight', WRAP_CURRY_RIGHT_FLAG], + ['flip', WRAP_FLIP_FLAG], + ['partial', WRAP_PARTIAL_FLAG], + ['partialRight', WRAP_PARTIAL_RIGHT_FLAG], + ['rearg', WRAP_REARG_FLAG], + ]; + + /** `Object#toString` result references. */ + var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + asyncTag = '[object AsyncFunction]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + domExcTag = '[object DOMException]', + errorTag = '[object Error]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + mapTag = '[object Map]', + numberTag = '[object Number]', + nullTag = '[object Null]', + objectTag = '[object Object]', + promiseTag = '[object Promise]', + proxyTag = '[object Proxy]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]', + undefinedTag = '[object Undefined]', + weakMapTag = '[object WeakMap]', + weakSetTag = '[object WeakSet]'; + + var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + + /** Used to match empty string literals in compiled template source. */ + var reEmptyStringLeading = /\b__p \+= '';/g, + reEmptyStringMiddle = /\b(__p \+=) '' \+/g, + reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g; + + /** Used to match HTML entities and HTML characters. */ + var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g, + reUnescapedHtml = /[&<>"']/g, + reHasEscapedHtml = RegExp(reEscapedHtml.source), + reHasUnescapedHtml = RegExp(reUnescapedHtml.source); + + /** Used to match template delimiters. */ + var reEscape = /<%-([\s\S]+?)%>/g, + reEvaluate = /<%([\s\S]+?)%>/g, + reInterpolate = /<%=([\s\S]+?)%>/g; + + /** Used to match property names within property paths. */ + var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, + reIsPlainProp = /^\w*$/, + rePropName = + /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; + + /** + * Used to match `RegExp` + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). + */ + var reRegExpChar = /[\\^$.*+?()[\]{}|]/g, + reHasRegExpChar = RegExp(reRegExpChar.source); + + /** Used to match leading and trailing whitespace. */ + var reTrim = /^\s+|\s+$/g, + reTrimStart = /^\s+/, + reTrimEnd = /\s+$/; + + /** Used to match wrap detail comments. */ + var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, + reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/, + reSplitDetails = /,? & /; + + /** Used to match words composed of alphanumeric characters. */ + var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g; + + /** Used to match backslashes in property paths. */ + var reEscapeChar = /\\(\\)?/g; + + /** + * Used to match + * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components). + */ + var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g; + + /** Used to match `RegExp` flags from their coerced string values. */ + var reFlags = /\w*$/; + + /** Used to detect bad signed hexadecimal string values. */ + var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; + + /** Used to detect binary string values. */ + var reIsBinary = /^0b[01]+$/i; + + /** Used to detect host constructors (Safari). */ + var reIsHostCtor = /^\[object .+?Constructor\]$/; + + /** Used to detect octal string values. */ + var reIsOctal = /^0o[0-7]+$/i; + + /** Used to detect unsigned integer values. */ + var reIsUint = /^(?:0|[1-9]\d*)$/; + + /** Used to match Latin Unicode letters (excluding mathematical operators). */ + var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g; + + /** Used to ensure capturing order of template delimiters. */ + var reNoMatch = /($^)/; + + /** Used to match unescaped characters in compiled string literals. */ + var reUnescapedString = /['\n\r\u2028\u2029\\]/g; + + /** Used to compose unicode character classes. */ + var rsAstralRange = '\\ud800-\\udfff', + rsComboMarksRange = '\\u0300-\\u036f', + reComboHalfMarksRange = '\\ufe20-\\ufe2f', + rsComboSymbolsRange = '\\u20d0-\\u20ff', + rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, + rsDingbatRange = '\\u2700-\\u27bf', + rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff', + rsMathOpRange = '\\xac\\xb1\\xd7\\xf7', + rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf', + rsPunctuationRange = '\\u2000-\\u206f', + rsSpaceRange = + ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000', + rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde', + rsVarRange = '\\ufe0e\\ufe0f', + rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange; + + /** Used to compose unicode capture groups. */ + var rsApos = "['\u2019]", + rsAstral = '[' + rsAstralRange + ']', + rsBreak = '[' + rsBreakRange + ']', + rsCombo = '[' + rsComboRange + ']', + rsDigits = '\\d+', + rsDingbat = '[' + rsDingbatRange + ']', + rsLower = '[' + rsLowerRange + ']', + rsMisc = + '[^' + + rsAstralRange + + rsBreakRange + + rsDigits + + rsDingbatRange + + rsLowerRange + + rsUpperRange + + ']', + rsFitz = '\\ud83c[\\udffb-\\udfff]', + rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', + rsNonAstral = '[^' + rsAstralRange + ']', + rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', + rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', + rsUpper = '[' + rsUpperRange + ']', + rsZWJ = '\\u200d'; + + /** Used to compose unicode regexes. */ + var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')', + rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')', + rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?', + rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?', + reOptMod = rsModifier + '?', + rsOptVar = '[' + rsVarRange + ']?', + rsOptJoin = + '(?:' + + rsZWJ + + '(?:' + + [rsNonAstral, rsRegional, rsSurrPair].join('|') + + ')' + + rsOptVar + + reOptMod + + ')*', + rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])', + rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])', + rsSeq = rsOptVar + reOptMod + rsOptJoin, + rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq, + rsSymbol = + '(?:' + + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + + ')'; + + /** Used to match apostrophes. */ + var reApos = RegExp(rsApos, 'g'); + + /** + * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and + * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols). + */ + var reComboMark = RegExp(rsCombo, 'g'); + + /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ + var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); + + /** Used to match complex or compound words. */ + var reUnicodeWord = RegExp( + [ + rsUpper + + '?' + + rsLower + + '+' + + rsOptContrLower + + '(?=' + + [rsBreak, rsUpper, '$'].join('|') + + ')', + rsMiscUpper + + '+' + + rsOptContrUpper + + '(?=' + + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + + ')', + rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower, + rsUpper + '+' + rsOptContrUpper, + rsOrdUpper, + rsOrdLower, + rsDigits, + rsEmoji, + ].join('|'), + 'g', + ); + + /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */ + var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']'); + + /** Used to detect strings that need a more robust regexp to match words. */ + var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/; + + /** Used to assign default `context` object properties. */ + var contextProps = [ + 'Array', + 'Buffer', + 'DataView', + 'Date', + 'Error', + 'Float32Array', + 'Float64Array', + 'Function', + 'Int8Array', + 'Int16Array', + 'Int32Array', + 'Map', + 'Math', + 'Object', + 'Promise', + 'RegExp', + 'Set', + 'String', + 'Symbol', + 'TypeError', + 'Uint8Array', + 'Uint8ClampedArray', + 'Uint16Array', + 'Uint32Array', + 'WeakMap', + '_', + 'clearTimeout', + 'isFinite', + 'parseInt', + 'setTimeout', + ]; + + /** Used to make template sourceURLs easier to identify. */ + var templateCounter = -1; + + /** Used to identify `toStringTag` values of typed arrays. */ + var typedArrayTags = {}; + typedArrayTags[float32Tag] = + typedArrayTags[float64Tag] = + typedArrayTags[int8Tag] = + typedArrayTags[int16Tag] = + typedArrayTags[int32Tag] = + typedArrayTags[uint8Tag] = + typedArrayTags[uint8ClampedTag] = + typedArrayTags[uint16Tag] = + typedArrayTags[uint32Tag] = + true; + typedArrayTags[argsTag] = + typedArrayTags[arrayTag] = + typedArrayTags[arrayBufferTag] = + typedArrayTags[boolTag] = + typedArrayTags[dataViewTag] = + typedArrayTags[dateTag] = + typedArrayTags[errorTag] = + typedArrayTags[funcTag] = + typedArrayTags[mapTag] = + typedArrayTags[numberTag] = + typedArrayTags[objectTag] = + typedArrayTags[regexpTag] = + typedArrayTags[setTag] = + typedArrayTags[stringTag] = + typedArrayTags[weakMapTag] = + false; + + /** Used to identify `toStringTag` values supported by `_.clone`. */ + var cloneableTags = {}; + cloneableTags[argsTag] = + cloneableTags[arrayTag] = + cloneableTags[arrayBufferTag] = + cloneableTags[dataViewTag] = + cloneableTags[boolTag] = + cloneableTags[dateTag] = + cloneableTags[float32Tag] = + cloneableTags[float64Tag] = + cloneableTags[int8Tag] = + cloneableTags[int16Tag] = + cloneableTags[int32Tag] = + cloneableTags[mapTag] = + cloneableTags[numberTag] = + cloneableTags[objectTag] = + cloneableTags[regexpTag] = + cloneableTags[setTag] = + cloneableTags[stringTag] = + cloneableTags[symbolTag] = + cloneableTags[uint8Tag] = + cloneableTags[uint8ClampedTag] = + cloneableTags[uint16Tag] = + cloneableTags[uint32Tag] = + true; + cloneableTags[errorTag] = cloneableTags[funcTag] = cloneableTags[weakMapTag] = false; + + /** Used to map Latin Unicode letters to basic Latin letters. */ + var deburredLetters = { + // Latin-1 Supplement block. + '\xc0': 'A', + '\xc1': 'A', + '\xc2': 'A', + '\xc3': 'A', + '\xc4': 'A', + '\xc5': 'A', + '\xe0': 'a', + '\xe1': 'a', + '\xe2': 'a', + '\xe3': 'a', + '\xe4': 'a', + '\xe5': 'a', + '\xc7': 'C', + '\xe7': 'c', + '\xd0': 'D', + '\xf0': 'd', + '\xc8': 'E', + '\xc9': 'E', + '\xca': 'E', + '\xcb': 'E', + '\xe8': 'e', + '\xe9': 'e', + '\xea': 'e', + '\xeb': 'e', + '\xcc': 'I', + '\xcd': 'I', + '\xce': 'I', + '\xcf': 'I', + '\xec': 'i', + '\xed': 'i', + '\xee': 'i', + '\xef': 'i', + '\xd1': 'N', + '\xf1': 'n', + '\xd2': 'O', + '\xd3': 'O', + '\xd4': 'O', + '\xd5': 'O', + '\xd6': 'O', + '\xd8': 'O', + '\xf2': 'o', + '\xf3': 'o', + '\xf4': 'o', + '\xf5': 'o', + '\xf6': 'o', + '\xf8': 'o', + '\xd9': 'U', + '\xda': 'U', + '\xdb': 'U', + '\xdc': 'U', + '\xf9': 'u', + '\xfa': 'u', + '\xfb': 'u', + '\xfc': 'u', + '\xdd': 'Y', + '\xfd': 'y', + '\xff': 'y', + '\xc6': 'Ae', + '\xe6': 'ae', + '\xde': 'Th', + '\xfe': 'th', + '\xdf': 'ss', + // Latin Extended-A block. + '\u0100': 'A', + '\u0102': 'A', + '\u0104': 'A', + '\u0101': 'a', + '\u0103': 'a', + '\u0105': 'a', + '\u0106': 'C', + '\u0108': 'C', + '\u010a': 'C', + '\u010c': 'C', + '\u0107': 'c', + '\u0109': 'c', + '\u010b': 'c', + '\u010d': 'c', + '\u010e': 'D', + '\u0110': 'D', + '\u010f': 'd', + '\u0111': 'd', + '\u0112': 'E', + '\u0114': 'E', + '\u0116': 'E', + '\u0118': 'E', + '\u011a': 'E', + '\u0113': 'e', + '\u0115': 'e', + '\u0117': 'e', + '\u0119': 'e', + '\u011b': 'e', + '\u011c': 'G', + '\u011e': 'G', + '\u0120': 'G', + '\u0122': 'G', + '\u011d': 'g', + '\u011f': 'g', + '\u0121': 'g', + '\u0123': 'g', + '\u0124': 'H', + '\u0126': 'H', + '\u0125': 'h', + '\u0127': 'h', + '\u0128': 'I', + '\u012a': 'I', + '\u012c': 'I', + '\u012e': 'I', + '\u0130': 'I', + '\u0129': 'i', + '\u012b': 'i', + '\u012d': 'i', + '\u012f': 'i', + '\u0131': 'i', + '\u0134': 'J', + '\u0135': 'j', + '\u0136': 'K', + '\u0137': 'k', + '\u0138': 'k', + '\u0139': 'L', + '\u013b': 'L', + '\u013d': 'L', + '\u013f': 'L', + '\u0141': 'L', + '\u013a': 'l', + '\u013c': 'l', + '\u013e': 'l', + '\u0140': 'l', + '\u0142': 'l', + '\u0143': 'N', + '\u0145': 'N', + '\u0147': 'N', + '\u014a': 'N', + '\u0144': 'n', + '\u0146': 'n', + '\u0148': 'n', + '\u014b': 'n', + '\u014c': 'O', + '\u014e': 'O', + '\u0150': 'O', + '\u014d': 'o', + '\u014f': 'o', + '\u0151': 'o', + '\u0154': 'R', + '\u0156': 'R', + '\u0158': 'R', + '\u0155': 'r', + '\u0157': 'r', + '\u0159': 'r', + '\u015a': 'S', + '\u015c': 'S', + '\u015e': 'S', + '\u0160': 'S', + '\u015b': 's', + '\u015d': 's', + '\u015f': 's', + '\u0161': 's', + '\u0162': 'T', + '\u0164': 'T', + '\u0166': 'T', + '\u0163': 't', + '\u0165': 't', + '\u0167': 't', + '\u0168': 'U', + '\u016a': 'U', + '\u016c': 'U', + '\u016e': 'U', + '\u0170': 'U', + '\u0172': 'U', + '\u0169': 'u', + '\u016b': 'u', + '\u016d': 'u', + '\u016f': 'u', + '\u0171': 'u', + '\u0173': 'u', + '\u0174': 'W', + '\u0175': 'w', + '\u0176': 'Y', + '\u0177': 'y', + '\u0178': 'Y', + '\u0179': 'Z', + '\u017b': 'Z', + '\u017d': 'Z', + '\u017a': 'z', + '\u017c': 'z', + '\u017e': 'z', + '\u0132': 'IJ', + '\u0133': 'ij', + '\u0152': 'Oe', + '\u0153': 'oe', + '\u0149': "'n", + '\u017f': 's', + }; + + /** Used to map characters to HTML entities. */ + var htmlEscapes = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''', + }; + + /** Used to map HTML entities to characters. */ + var htmlUnescapes = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + ''': "'", + }; + + /** Used to escape characters for inclusion in compiled string literals. */ + var stringEscapes = { + '\\': '\\', + "'": "'", + '\n': 'n', + '\r': 'r', + '\u2028': 'u2028', + '\u2029': 'u2029', + }; + + /** Built-in method references without a dependency on `root`. */ + var freeParseFloat = parseFloat, + freeParseInt = parseInt; + + /** Detect free variable `global` from Node.js. */ + var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + + /** Detect free variable `self`. */ + var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + + /** Used as a reference to the global object. */ + var root = freeGlobal || freeSelf || Function('return this')(); + + /** Detect free variable `exports`. */ + var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; + + /** Detect free variable `module`. */ + var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + + /** Detect the popular CommonJS extension `module.exports`. */ + var moduleExports = freeModule && freeModule.exports === freeExports; + + /** Detect free variable `process` from Node.js. */ + var freeProcess = moduleExports && freeGlobal.process; + + /** Used to access faster Node.js helpers. */ + var nodeUtil = (function () { + try { + // Use `util.types` for Node.js 10+. + var types = freeModule && freeModule.require && freeModule.require('util').types; + + if (types) { + return types; + } + + // Legacy `process.binding('util')` for Node.js < 10. + return freeProcess && freeProcess.binding && freeProcess.binding('util'); + } catch (e) {} + })(); + + /* Node.js helper references. */ + var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer, + nodeIsDate = nodeUtil && nodeUtil.isDate, + nodeIsMap = nodeUtil && nodeUtil.isMap, + nodeIsRegExp = nodeUtil && nodeUtil.isRegExp, + nodeIsSet = nodeUtil && nodeUtil.isSet, + nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; + + /*--------------------------------------------------------------------------*/ + + /** + * A faster alternative to `Function#apply`, this function invokes `func` + * with the `this` binding of `thisArg` and the arguments of `args`. + * + * @private + * @param {Function} func The function to invoke. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} args The arguments to invoke `func` with. + * @returns {*} Returns the result of `func`. + */ + function apply(func, thisArg, args) { + switch (args.length) { + case 0: + return func.call(thisArg); + case 1: + return func.call(thisArg, args[0]); + case 2: + return func.call(thisArg, args[0], args[1]); + case 3: + return func.call(thisArg, args[0], args[1], args[2]); + } + return func.apply(thisArg, args); + } + + /** + * A specialized version of `baseAggregator` for arrays. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} setter The function to set `accumulator` values. + * @param {Function} iteratee The iteratee to transform keys. + * @param {Object} accumulator The initial aggregated object. + * @returns {Function} Returns `accumulator`. + */ + function arrayAggregator(array, setter, iteratee, accumulator) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + var value = array[index]; + setter(accumulator, value, iteratee(value), array); + } + return accumulator; + } + + /** + * A specialized version of `_.forEach` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ + function arrayEach(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (iteratee(array[index], index, array) === false) { + break; + } + } + return array; + } + + /** + * A specialized version of `_.forEachRight` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ + function arrayEachRight(array, iteratee) { + var length = array == null ? 0 : array.length; + + while (length--) { + if (iteratee(array[length], length, array) === false) { + break; + } + } + return array; + } + + /** + * A specialized version of `_.every` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false`. + */ + function arrayEvery(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (!predicate(array[index], index, array)) { + return false; + } + } + return true; + } + + /** + * A specialized version of `_.filter` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ + function arrayFilter(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result[resIndex++] = value; + } + } + return result; + } + + /** + * A specialized version of `_.includes` for arrays without support for + * specifying an index to search from. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ + function arrayIncludes(array, value) { + var length = array == null ? 0 : array.length; + return !!length && baseIndexOf(array, value, 0) > -1; + } + + /** + * This function is like `arrayIncludes` except that it accepts a comparator. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @param {Function} comparator The comparator invoked per element. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ + function arrayIncludesWith(array, value, comparator) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (comparator(value, array[index])) { + return true; + } + } + return false; + } + + /** + * A specialized version of `_.map` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ + function arrayMap(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length, + result = Array(length); + + while (++index < length) { + result[index] = iteratee(array[index], index, array); + } + return result; + } + + /** + * Appends the elements of `values` to `array`. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to append. + * @returns {Array} Returns `array`. + */ + function arrayPush(array, values) { + var index = -1, + length = values.length, + offset = array.length; + + while (++index < length) { + array[offset + index] = values[index]; + } + return array; + } + + /** + * A specialized version of `_.reduce` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {boolean} [initAccum] Specify using the first element of `array` as + * the initial value. + * @returns {*} Returns the accumulated value. + */ + function arrayReduce(array, iteratee, accumulator, initAccum) { + var index = -1, + length = array == null ? 0 : array.length; + + if (initAccum && length) { + accumulator = array[++index]; + } + while (++index < length) { + accumulator = iteratee(accumulator, array[index], index, array); + } + return accumulator; + } + + /** + * A specialized version of `_.reduceRight` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {boolean} [initAccum] Specify using the last element of `array` as + * the initial value. + * @returns {*} Returns the accumulated value. + */ + function arrayReduceRight(array, iteratee, accumulator, initAccum) { + var length = array == null ? 0 : array.length; + if (initAccum && length) { + accumulator = array[--length]; + } + while (length--) { + accumulator = iteratee(accumulator, array[length], length, array); + } + return accumulator; + } + + /** + * A specialized version of `_.some` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ + function arraySome(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (predicate(array[index], index, array)) { + return true; + } + } + return false; + } + + /** + * Gets the size of an ASCII `string`. + * + * @private + * @param {string} string The string inspect. + * @returns {number} Returns the string size. + */ + var asciiSize = baseProperty('length'); + + /** + * Converts an ASCII `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ + function asciiToArray(string) { + return string.split(''); + } + + /** + * Splits an ASCII `string` into an array of its words. + * + * @private + * @param {string} The string to inspect. + * @returns {Array} Returns the words of `string`. + */ + function asciiWords(string) { + return string.match(reAsciiWord) || []; + } + + /** + * The base implementation of methods like `_.findKey` and `_.findLastKey`, + * without support for iteratee shorthands, which iterates over `collection` + * using `eachFunc`. + * + * @private + * @param {Array|Object} collection The collection to inspect. + * @param {Function} predicate The function invoked per iteration. + * @param {Function} eachFunc The function to iterate over `collection`. + * @returns {*} Returns the found element or its key, else `undefined`. + */ + function baseFindKey(collection, predicate, eachFunc) { + var result; + eachFunc(collection, function (value, key, collection) { + if (predicate(value, key, collection)) { + result = key; + return false; + } + }); + return result; + } + + /** + * The base implementation of `_.findIndex` and `_.findLastIndex` without + * support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} predicate The function invoked per iteration. + * @param {number} fromIndex The index to search from. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function baseFindIndex(array, predicate, fromIndex, fromRight) { + var length = array.length, + index = fromIndex + (fromRight ? 1 : -1); + + while (fromRight ? index-- : ++index < length) { + if (predicate(array[index], index, array)) { + return index; + } + } + return -1; + } + + /** + * The base implementation of `_.indexOf` without `fromIndex` bounds checks. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function baseIndexOf(array, value, fromIndex) { + return value === value + ? strictIndexOf(array, value, fromIndex) + : baseFindIndex(array, baseIsNaN, fromIndex); + } + + /** + * This function is like `baseIndexOf` except that it accepts a comparator. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @param {Function} comparator The comparator invoked per element. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function baseIndexOfWith(array, value, fromIndex, comparator) { + var index = fromIndex - 1, + length = array.length; + + while (++index < length) { + if (comparator(array[index], value)) { + return index; + } + } + return -1; + } + + /** + * The base implementation of `_.isNaN` without support for number objects. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + */ + function baseIsNaN(value) { + return value !== value; + } + + /** + * The base implementation of `_.mean` and `_.meanBy` without support for + * iteratee shorthands. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {number} Returns the mean. + */ + function baseMean(array, iteratee) { + var length = array == null ? 0 : array.length; + return length ? baseSum(array, iteratee) / length : NAN; + } + + /** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new accessor function. + */ + function baseProperty(key) { + return function (object) { + return object == null ? undefined : object[key]; + }; + } + + /** + * The base implementation of `_.propertyOf` without support for deep paths. + * + * @private + * @param {Object} object The object to query. + * @returns {Function} Returns the new accessor function. + */ + function basePropertyOf(object) { + return function (key) { + return object == null ? undefined : object[key]; + }; + } + + /** + * The base implementation of `_.reduce` and `_.reduceRight`, without support + * for iteratee shorthands, which iterates over `collection` using `eachFunc`. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} accumulator The initial value. + * @param {boolean} initAccum Specify using the first or last element of + * `collection` as the initial value. + * @param {Function} eachFunc The function to iterate over `collection`. + * @returns {*} Returns the accumulated value. + */ + function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) { + eachFunc(collection, function (value, index, collection) { + accumulator = initAccum + ? ((initAccum = false), value) + : iteratee(accumulator, value, index, collection); + }); + return accumulator; + } + + /** + * The base implementation of `_.sortBy` which uses `comparer` to define the + * sort order of `array` and replaces criteria objects with their corresponding + * values. + * + * @private + * @param {Array} array The array to sort. + * @param {Function} comparer The function to define sort order. + * @returns {Array} Returns `array`. + */ + function baseSortBy(array, comparer) { + var length = array.length; + + array.sort(comparer); + while (length--) { + array[length] = array[length].value; + } + return array; + } + + /** + * The base implementation of `_.sum` and `_.sumBy` without support for + * iteratee shorthands. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {number} Returns the sum. + */ + function baseSum(array, iteratee) { + var result, + index = -1, + length = array.length; + + while (++index < length) { + var current = iteratee(array[index]); + if (current !== undefined) { + result = result === undefined ? current : result + current; + } + } + return result; + } + + /** + * The base implementation of `_.times` without support for iteratee shorthands + * or max array length checks. + * + * @private + * @param {number} n The number of times to invoke `iteratee`. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the array of results. + */ + function baseTimes(n, iteratee) { + var index = -1, + result = Array(n); + + while (++index < n) { + result[index] = iteratee(index); + } + return result; + } + + /** + * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array + * of key-value pairs for `object` corresponding to the property names of `props`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} props The property names to get values for. + * @returns {Object} Returns the key-value pairs. + */ + function baseToPairs(object, props) { + return arrayMap(props, function (key) { + return [key, object[key]]; + }); + } + + /** + * The base implementation of `_.unary` without support for storing metadata. + * + * @private + * @param {Function} func The function to cap arguments for. + * @returns {Function} Returns the new capped function. + */ + function baseUnary(func) { + return function (value) { + return func(value); + }; + } + + /** + * The base implementation of `_.values` and `_.valuesIn` which creates an + * array of `object` property values corresponding to the property names + * of `props`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} props The property names to get values for. + * @returns {Object} Returns the array of property values. + */ + function baseValues(object, props) { + return arrayMap(props, function (key) { + return object[key]; + }); + } + + /** + * Checks if a `cache` value for `key` exists. + * + * @private + * @param {Object} cache The cache to query. + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function cacheHas(cache, key) { + return cache.has(key); + } + + /** + * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol + * that is not found in the character symbols. + * + * @private + * @param {Array} strSymbols The string symbols to inspect. + * @param {Array} chrSymbols The character symbols to find. + * @returns {number} Returns the index of the first unmatched string symbol. + */ + function charsStartIndex(strSymbols, chrSymbols) { + var index = -1, + length = strSymbols.length; + + while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} + return index; + } + + /** + * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol + * that is not found in the character symbols. + * + * @private + * @param {Array} strSymbols The string symbols to inspect. + * @param {Array} chrSymbols The character symbols to find. + * @returns {number} Returns the index of the last unmatched string symbol. + */ + function charsEndIndex(strSymbols, chrSymbols) { + var index = strSymbols.length; + + while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} + return index; + } + + /** + * Gets the number of `placeholder` occurrences in `array`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} placeholder The placeholder to search for. + * @returns {number} Returns the placeholder count. + */ + function countHolders(array, placeholder) { + var length = array.length, + result = 0; + + while (length--) { + if (array[length] === placeholder) { + ++result; + } + } + return result; + } + + /** + * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A + * letters to basic Latin letters. + * + * @private + * @param {string} letter The matched letter to deburr. + * @returns {string} Returns the deburred letter. + */ + var deburrLetter = basePropertyOf(deburredLetters); + + /** + * Used by `_.escape` to convert characters to HTML entities. + * + * @private + * @param {string} chr The matched character to escape. + * @returns {string} Returns the escaped character. + */ + var escapeHtmlChar = basePropertyOf(htmlEscapes); + + /** + * Used by `_.template` to escape characters for inclusion in compiled string literals. + * + * @private + * @param {string} chr The matched character to escape. + * @returns {string} Returns the escaped character. + */ + function escapeStringChar(chr) { + return '\\' + stringEscapes[chr]; + } + + /** + * Gets the value at `key` of `object`. + * + * @private + * @param {Object} [object] The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ + function getValue(object, key) { + return object == null ? undefined : object[key]; + } + + /** + * Checks if `string` contains Unicode symbols. + * + * @private + * @param {string} string The string to inspect. + * @returns {boolean} Returns `true` if a symbol is found, else `false`. + */ + function hasUnicode(string) { + return reHasUnicode.test(string); + } + + /** + * Checks if `string` contains a word composed of Unicode symbols. + * + * @private + * @param {string} string The string to inspect. + * @returns {boolean} Returns `true` if a word is found, else `false`. + */ + function hasUnicodeWord(string) { + return reHasUnicodeWord.test(string); + } + + /** + * Converts `iterator` to an array. + * + * @private + * @param {Object} iterator The iterator to convert. + * @returns {Array} Returns the converted array. + */ + function iteratorToArray(iterator) { + var data, + result = []; + + while (!(data = iterator.next()).done) { + result.push(data.value); + } + return result; + } + + /** + * Converts `map` to its key-value pairs. + * + * @private + * @param {Object} map The map to convert. + * @returns {Array} Returns the key-value pairs. + */ + function mapToArray(map) { + var index = -1, + result = Array(map.size); + + map.forEach(function (value, key) { + result[++index] = [key, value]; + }); + return result; + } + + /** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ + function overArg(func, transform) { + return function (arg) { + return func(transform(arg)); + }; + } + + /** + * Replaces all `placeholder` elements in `array` with an internal placeholder + * and returns an array of their indexes. + * + * @private + * @param {Array} array The array to modify. + * @param {*} placeholder The placeholder to replace. + * @returns {Array} Returns the new array of placeholder indexes. + */ + function replaceHolders(array, placeholder) { + var index = -1, + length = array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (value === placeholder || value === PLACEHOLDER) { + array[index] = PLACEHOLDER; + result[resIndex++] = index; + } + } + return result; + } + + /** + * Converts `set` to an array of its values. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the values. + */ + function setToArray(set) { + var index = -1, + result = Array(set.size); + + set.forEach(function (value) { + result[++index] = value; + }); + return result; + } + + /** + * Converts `set` to its value-value pairs. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the value-value pairs. + */ + function setToPairs(set) { + var index = -1, + result = Array(set.size); + + set.forEach(function (value) { + result[++index] = [value, value]; + }); + return result; + } + + /** + * A specialized version of `_.indexOf` which performs strict equality + * comparisons of values, i.e. `===`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function strictIndexOf(array, value, fromIndex) { + var index = fromIndex - 1, + length = array.length; + + while (++index < length) { + if (array[index] === value) { + return index; + } + } + return -1; + } + + /** + * A specialized version of `_.lastIndexOf` which performs strict equality + * comparisons of values, i.e. `===`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function strictLastIndexOf(array, value, fromIndex) { + var index = fromIndex + 1; + while (index--) { + if (array[index] === value) { + return index; + } + } + return index; + } + + /** + * Gets the number of symbols in `string`. + * + * @private + * @param {string} string The string to inspect. + * @returns {number} Returns the string size. + */ + function stringSize(string) { + return hasUnicode(string) ? unicodeSize(string) : asciiSize(string); + } + + /** + * Converts `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ + function stringToArray(string) { + return hasUnicode(string) ? unicodeToArray(string) : asciiToArray(string); + } + + /** + * Used by `_.unescape` to convert HTML entities to characters. + * + * @private + * @param {string} chr The matched character to unescape. + * @returns {string} Returns the unescaped character. + */ + var unescapeHtmlChar = basePropertyOf(htmlUnescapes); + + /** + * Gets the size of a Unicode `string`. + * + * @private + * @param {string} string The string inspect. + * @returns {number} Returns the string size. + */ + function unicodeSize(string) { + var result = (reUnicode.lastIndex = 0); + while (reUnicode.test(string)) { + ++result; + } + return result; + } + + /** + * Converts a Unicode `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ + function unicodeToArray(string) { + return string.match(reUnicode) || []; + } + + /** + * Splits a Unicode `string` into an array of its words. + * + * @private + * @param {string} The string to inspect. + * @returns {Array} Returns the words of `string`. + */ + function unicodeWords(string) { + return string.match(reUnicodeWord) || []; + } + + /*--------------------------------------------------------------------------*/ + + /** + * Create a new pristine `lodash` function using the `context` object. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category Util + * @param {Object} [context=root] The context object. + * @returns {Function} Returns a new `lodash` function. + * @example + * + * _.mixin({ 'foo': _.constant('foo') }); + * + * var lodash = _.runInContext(); + * lodash.mixin({ 'bar': lodash.constant('bar') }); + * + * _.isFunction(_.foo); + * // => true + * _.isFunction(_.bar); + * // => false + * + * lodash.isFunction(lodash.foo); + * // => false + * lodash.isFunction(lodash.bar); + * // => true + * + * // Create a suped-up `defer` in Node.js. + * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer; + */ + var runInContext = function runInContext(context) { + context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps)); + + /** Built-in constructor references. */ + var Array = context.Array, + Date = context.Date, + Error = context.Error, + Function = context.Function, + Math = context.Math, + Object = context.Object, + RegExp = context.RegExp, + String = context.String, + TypeError = context.TypeError; + + /** Used for built-in method references. */ + var arrayProto = Array.prototype, + funcProto = Function.prototype, + objectProto = Object.prototype; + + /** Used to detect overreaching core-js shims. */ + var coreJsData = context['__core-js_shared__']; + + /** Used to resolve the decompiled source of functions. */ + var funcToString = funcProto.toString; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** Used to generate unique IDs. */ + var idCounter = 0; + + /** Used to detect methods masquerading as native. */ + var maskSrcKey = (function () { + var uid = /[^.]+$/.exec((coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO) || ''); + return uid ? 'Symbol(src)_1.' + uid : ''; + })(); + + /** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ + var nativeObjectToString = objectProto.toString; + + /** Used to infer the `Object` constructor. */ + var objectCtorString = funcToString.call(Object); + + /** Used to restore the original `_` reference in `_.noConflict`. */ + var oldDash = root._; + + /** Used to detect if a method is native. */ + var reIsNative = RegExp( + '^' + + funcToString + .call(hasOwnProperty) + .replace(reRegExpChar, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + + '$', + ); + + /** Built-in value references. */ + var Buffer = moduleExports ? context.Buffer : undefined, + Symbol = context.Symbol, + Uint8Array = context.Uint8Array, + allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined, + getPrototype = overArg(Object.getPrototypeOf, Object), + objectCreate = Object.create, + propertyIsEnumerable = objectProto.propertyIsEnumerable, + splice = arrayProto.splice, + spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined, + symIterator = Symbol ? Symbol.iterator : undefined, + symToStringTag = Symbol ? Symbol.toStringTag : undefined; + + var defineProperty = (function () { + try { + var func = getNative(Object, 'defineProperty'); + func({}, '', {}); + return func; + } catch (e) {} + })(); + + /** Mocked built-ins. */ + var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout, + ctxNow = Date && Date.now !== root.Date.now && Date.now, + ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout; + + /* Built-in method references for those with the same name as other `lodash` methods. */ + var nativeCeil = Math.ceil, + nativeFloor = Math.floor, + nativeGetSymbols = Object.getOwnPropertySymbols, + nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined, + nativeIsFinite = context.isFinite, + nativeJoin = arrayProto.join, + nativeKeys = overArg(Object.keys, Object), + nativeMax = Math.max, + nativeMin = Math.min, + nativeNow = Date.now, + nativeParseInt = context.parseInt, + nativeRandom = Math.random, + nativeReverse = arrayProto.reverse; + + /* Built-in method references that are verified to be native. */ + var DataView = getNative(context, 'DataView'), + Map = getNative(context, 'Map'), + Promise = getNative(context, 'Promise'), + Set = getNative(context, 'Set'), + WeakMap = getNative(context, 'WeakMap'), + nativeCreate = getNative(Object, 'create'); + + /** Used to store function metadata. */ + var metaMap = WeakMap && new WeakMap(); + + /** Used to lookup unminified function names. */ + var realNames = {}; + + /** Used to detect maps, sets, and weakmaps. */ + var dataViewCtorString = toSource(DataView), + mapCtorString = toSource(Map), + promiseCtorString = toSource(Promise), + setCtorString = toSource(Set), + weakMapCtorString = toSource(WeakMap); + + /** Used to convert symbols to primitives and strings. */ + var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolValueOf = symbolProto ? symbolProto.valueOf : undefined, + symbolToString = symbolProto ? symbolProto.toString : undefined; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a `lodash` object which wraps `value` to enable implicit method + * chain sequences. Methods that operate on and return arrays, collections, + * and functions can be chained together. Methods that retrieve a single value + * or may return a primitive value will automatically end the chain sequence + * and return the unwrapped value. Otherwise, the value must be unwrapped + * with `_#value`. + * + * Explicit chain sequences, which must be unwrapped with `_#value`, may be + * enabled using `_.chain`. + * + * The execution of chained methods is lazy, that is, it's deferred until + * `_#value` is implicitly or explicitly called. + * + * Lazy evaluation allows several methods to support shortcut fusion. + * Shortcut fusion is an optimization to merge iteratee calls; this avoids + * the creation of intermediate arrays and can greatly reduce the number of + * iteratee executions. Sections of a chain sequence qualify for shortcut + * fusion if the section is applied to an array and iteratees accept only + * one argument. The heuristic for whether a section qualifies for shortcut + * fusion is subject to change. + * + * Chaining is supported in custom builds as long as the `_#value` method is + * directly or indirectly included in the build. + * + * In addition to lodash methods, wrappers have `Array` and `String` methods. + * + * The wrapper `Array` methods are: + * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift` + * + * The wrapper `String` methods are: + * `replace` and `split` + * + * The wrapper methods that support shortcut fusion are: + * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`, + * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`, + * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray` + * + * The chainable wrapper methods are: + * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`, + * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`, + * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`, + * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`, + * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`, + * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`, + * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`, + * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`, + * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`, + * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`, + * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`, + * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`, + * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`, + * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`, + * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`, + * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`, + * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`, + * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`, + * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`, + * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`, + * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`, + * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`, + * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`, + * `zipObject`, `zipObjectDeep`, and `zipWith` + * + * The wrapper methods that are **not** chainable by default are: + * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`, + * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`, + * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`, + * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`, + * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`, + * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`, + * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`, + * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`, + * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`, + * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`, + * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`, + * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`, + * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`, + * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`, + * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`, + * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`, + * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`, + * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`, + * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`, + * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`, + * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`, + * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`, + * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`, + * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`, + * `upperFirst`, `value`, and `words` + * + * @name _ + * @constructor + * @category Seq + * @param {*} value The value to wrap in a `lodash` instance. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * function square(n) { + * return n * n; + * } + * + * var wrapped = _([1, 2, 3]); + * + * // Returns an unwrapped value. + * wrapped.reduce(_.add); + * // => 6 + * + * // Returns a wrapped value. + * var squares = wrapped.map(square); + * + * _.isArray(squares); + * // => false + * + * _.isArray(squares.value()); + * // => true + */ + function lodash(value) { + if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) { + if (value instanceof LodashWrapper) { + return value; + } + if (hasOwnProperty.call(value, '__wrapped__')) { + return wrapperClone(value); + } + } + return new LodashWrapper(value); + } + + /** + * The base implementation of `_.create` without support for assigning + * properties to the created object. + * + * @private + * @param {Object} proto The object to inherit from. + * @returns {Object} Returns the new object. + */ + var baseCreate = (function () { + function object() {} + return function (proto) { + if (!isObject(proto)) { + return {}; + } + if (objectCreate) { + return objectCreate(proto); + } + object.prototype = proto; + var result = new object(); + object.prototype = undefined; + return result; + }; + })(); + + /** + * The function whose prototype chain sequence wrappers inherit from. + * + * @private + */ + function baseLodash() { + // No operation performed. + } + + /** + * The base constructor for creating `lodash` wrapper objects. + * + * @private + * @param {*} value The value to wrap. + * @param {boolean} [chainAll] Enable explicit method chain sequences. + */ + function LodashWrapper(value, chainAll) { + this.__wrapped__ = value; + this.__actions__ = []; + this.__chain__ = !!chainAll; + this.__index__ = 0; + this.__values__ = undefined; + } + + /** + * By default, the template delimiters used by lodash are like those in + * embedded Ruby (ERB) as well as ES2015 template strings. Change the + * following template settings to use alternative delimiters. + * + * @static + * @memberOf _ + * @type {Object} + */ + lodash.templateSettings = { + /** + * Used to detect `data` property values to be HTML-escaped. + * + * @memberOf _.templateSettings + * @type {RegExp} + */ + escape: reEscape, + + /** + * Used to detect code to be evaluated. + * + * @memberOf _.templateSettings + * @type {RegExp} + */ + evaluate: reEvaluate, + + /** + * Used to detect `data` property values to inject. + * + * @memberOf _.templateSettings + * @type {RegExp} + */ + interpolate: reInterpolate, + + /** + * Used to reference the data object in the template text. + * + * @memberOf _.templateSettings + * @type {string} + */ + variable: '', + + /** + * Used to import variables into the compiled template. + * + * @memberOf _.templateSettings + * @type {Object} + */ + imports: { + /** + * A reference to the `lodash` function. + * + * @memberOf _.templateSettings.imports + * @type {Function} + */ + _: lodash, + }, + }; + + // Ensure wrappers are instances of `baseLodash`. + lodash.prototype = baseLodash.prototype; + lodash.prototype.constructor = lodash; + + LodashWrapper.prototype = baseCreate(baseLodash.prototype); + LodashWrapper.prototype.constructor = LodashWrapper; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation. + * + * @private + * @constructor + * @param {*} value The value to wrap. + */ + function LazyWrapper(value) { + this.__wrapped__ = value; + this.__actions__ = []; + this.__dir__ = 1; + this.__filtered__ = false; + this.__iteratees__ = []; + this.__takeCount__ = MAX_ARRAY_LENGTH; + this.__views__ = []; + } + + /** + * Creates a clone of the lazy wrapper object. + * + * @private + * @name clone + * @memberOf LazyWrapper + * @returns {Object} Returns the cloned `LazyWrapper` object. + */ + function lazyClone() { + var result = new LazyWrapper(this.__wrapped__); + result.__actions__ = copyArray(this.__actions__); + result.__dir__ = this.__dir__; + result.__filtered__ = this.__filtered__; + result.__iteratees__ = copyArray(this.__iteratees__); + result.__takeCount__ = this.__takeCount__; + result.__views__ = copyArray(this.__views__); + return result; + } + + /** + * Reverses the direction of lazy iteration. + * + * @private + * @name reverse + * @memberOf LazyWrapper + * @returns {Object} Returns the new reversed `LazyWrapper` object. + */ + function lazyReverse() { + if (this.__filtered__) { + var result = new LazyWrapper(this); + result.__dir__ = -1; + result.__filtered__ = true; + } else { + result = this.clone(); + result.__dir__ *= -1; + } + return result; + } + + /** + * Extracts the unwrapped value from its lazy wrapper. + * + * @private + * @name value + * @memberOf LazyWrapper + * @returns {*} Returns the unwrapped value. + */ + function lazyValue() { + var array = this.__wrapped__.value(), + dir = this.__dir__, + isArr = isArray(array), + isRight = dir < 0, + arrLength = isArr ? array.length : 0, + view = getView(0, arrLength, this.__views__), + start = view.start, + end = view.end, + length = end - start, + index = isRight ? end : start - 1, + iteratees = this.__iteratees__, + iterLength = iteratees.length, + resIndex = 0, + takeCount = nativeMin(length, this.__takeCount__); + + if (!isArr || (!isRight && arrLength == length && takeCount == length)) { + return baseWrapperValue(array, this.__actions__); + } + var result = []; + + outer: while (length-- && resIndex < takeCount) { + index += dir; + + var iterIndex = -1, + value = array[index]; + + while (++iterIndex < iterLength) { + var data = iteratees[iterIndex], + iteratee = data.iteratee, + type = data.type, + computed = iteratee(value); + + if (type == LAZY_MAP_FLAG) { + value = computed; + } else if (!computed) { + if (type == LAZY_FILTER_FLAG) { + continue outer; + } else { + break outer; + } + } + } + result[resIndex++] = value; + } + return result; + } + + // Ensure `LazyWrapper` is an instance of `baseLodash`. + LazyWrapper.prototype = baseCreate(baseLodash.prototype); + LazyWrapper.prototype.constructor = LazyWrapper; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a hash object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function Hash(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + + /** + * Removes all key-value entries from the hash. + * + * @private + * @name clear + * @memberOf Hash + */ + function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; + this.size = 0; + } + + /** + * Removes `key` and its value from the hash. + * + * @private + * @name delete + * @memberOf Hash + * @param {Object} hash The hash to modify. + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function hashDelete(key) { + var result = this.has(key) && delete this.__data__[key]; + this.size -= result ? 1 : 0; + return result; + } + + /** + * Gets the hash value for `key`. + * + * @private + * @name get + * @memberOf Hash + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function hashGet(key) { + var data = this.__data__; + if (nativeCreate) { + var result = data[key]; + return result === HASH_UNDEFINED ? undefined : result; + } + return hasOwnProperty.call(data, key) ? data[key] : undefined; + } + + /** + * Checks if a hash value for `key` exists. + * + * @private + * @name has + * @memberOf Hash + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function hashHas(key) { + var data = this.__data__; + return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key); + } + + /** + * Sets the hash `key` to `value`. + * + * @private + * @name set + * @memberOf Hash + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the hash instance. + */ + function hashSet(key, value) { + var data = this.__data__; + this.size += this.has(key) ? 0 : 1; + data[key] = nativeCreate && value === undefined ? HASH_UNDEFINED : value; + return this; + } + + // Add methods to `Hash`. + Hash.prototype.clear = hashClear; + Hash.prototype['delete'] = hashDelete; + Hash.prototype.get = hashGet; + Hash.prototype.has = hashHas; + Hash.prototype.set = hashSet; + + /*------------------------------------------------------------------------*/ + + /** + * Creates an list cache object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function ListCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + + /** + * Removes all key-value entries from the list cache. + * + * @private + * @name clear + * @memberOf ListCache + */ + function listCacheClear() { + this.__data__ = []; + this.size = 0; + } + + /** + * Removes `key` and its value from the list cache. + * + * @private + * @name delete + * @memberOf ListCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function listCacheDelete(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + return false; + } + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + --this.size; + return true; + } + + /** + * Gets the list cache value for `key`. + * + * @private + * @name get + * @memberOf ListCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function listCacheGet(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + return index < 0 ? undefined : data[index][1]; + } + + /** + * Checks if a list cache value for `key` exists. + * + * @private + * @name has + * @memberOf ListCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; + } + + /** + * Sets the list cache `key` to `value`. + * + * @private + * @name set + * @memberOf ListCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the list cache instance. + */ + function listCacheSet(key, value) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + ++this.size; + data.push([key, value]); + } else { + data[index][1] = value; + } + return this; + } + + // Add methods to `ListCache`. + ListCache.prototype.clear = listCacheClear; + ListCache.prototype['delete'] = listCacheDelete; + ListCache.prototype.get = listCacheGet; + ListCache.prototype.has = listCacheHas; + ListCache.prototype.set = listCacheSet; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a map cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function MapCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + + /** + * Removes all key-value entries from the map. + * + * @private + * @name clear + * @memberOf MapCache + */ + function mapCacheClear() { + this.size = 0; + this.__data__ = { + hash: new Hash(), + map: new (Map || ListCache)(), + string: new Hash(), + }; + } + + /** + * Removes `key` and its value from the map. + * + * @private + * @name delete + * @memberOf MapCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function mapCacheDelete(key) { + var result = getMapData(this, key)['delete'](key); + this.size -= result ? 1 : 0; + return result; + } + + /** + * Gets the map value for `key`. + * + * @private + * @name get + * @memberOf MapCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function mapCacheGet(key) { + return getMapData(this, key).get(key); + } + + /** + * Checks if a map value for `key` exists. + * + * @private + * @name has + * @memberOf MapCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function mapCacheHas(key) { + return getMapData(this, key).has(key); + } + + /** + * Sets the map `key` to `value`. + * + * @private + * @name set + * @memberOf MapCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the map cache instance. + */ + function mapCacheSet(key, value) { + var data = getMapData(this, key), + size = data.size; + + data.set(key, value); + this.size += data.size == size ? 0 : 1; + return this; + } + + // Add methods to `MapCache`. + MapCache.prototype.clear = mapCacheClear; + MapCache.prototype['delete'] = mapCacheDelete; + MapCache.prototype.get = mapCacheGet; + MapCache.prototype.has = mapCacheHas; + MapCache.prototype.set = mapCacheSet; + + /*------------------------------------------------------------------------*/ + + /** + * + * Creates an array cache object to store unique values. + * + * @private + * @constructor + * @param {Array} [values] The values to cache. + */ + function SetCache(values) { + var index = -1, + length = values == null ? 0 : values.length; + + this.__data__ = new MapCache(); + while (++index < length) { + this.add(values[index]); + } + } + + /** + * Adds `value` to the array cache. + * + * @private + * @name add + * @memberOf SetCache + * @alias push + * @param {*} value The value to cache. + * @returns {Object} Returns the cache instance. + */ + function setCacheAdd(value) { + this.__data__.set(value, HASH_UNDEFINED); + return this; + } + + /** + * Checks if `value` is in the array cache. + * + * @private + * @name has + * @memberOf SetCache + * @param {*} value The value to search for. + * @returns {number} Returns `true` if `value` is found, else `false`. + */ + function setCacheHas(value) { + return this.__data__.has(value); + } + + // Add methods to `SetCache`. + SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; + SetCache.prototype.has = setCacheHas; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a stack cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function Stack(entries) { + var data = (this.__data__ = new ListCache(entries)); + this.size = data.size; + } + + /** + * Removes all key-value entries from the stack. + * + * @private + * @name clear + * @memberOf Stack + */ + function stackClear() { + this.__data__ = new ListCache(); + this.size = 0; + } + + /** + * Removes `key` and its value from the stack. + * + * @private + * @name delete + * @memberOf Stack + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function stackDelete(key) { + var data = this.__data__, + result = data['delete'](key); + + this.size = data.size; + return result; + } + + /** + * Gets the stack value for `key`. + * + * @private + * @name get + * @memberOf Stack + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function stackGet(key) { + return this.__data__.get(key); + } + + /** + * Checks if a stack value for `key` exists. + * + * @private + * @name has + * @memberOf Stack + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function stackHas(key) { + return this.__data__.has(key); + } + + /** + * Sets the stack `key` to `value`. + * + * @private + * @name set + * @memberOf Stack + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the stack cache instance. + */ + function stackSet(key, value) { + var data = this.__data__; + if (data instanceof ListCache) { + var pairs = data.__data__; + if (!Map || pairs.length < LARGE_ARRAY_SIZE - 1) { + pairs.push([key, value]); + this.size = ++data.size; + return this; + } + data = this.__data__ = new MapCache(pairs); + } + data.set(key, value); + this.size = data.size; + return this; + } + + // Add methods to `Stack`. + Stack.prototype.clear = stackClear; + Stack.prototype['delete'] = stackDelete; + Stack.prototype.get = stackGet; + Stack.prototype.has = stackHas; + Stack.prototype.set = stackSet; + + /*------------------------------------------------------------------------*/ + + /** + * Creates an array of the enumerable property names of the array-like `value`. + * + * @private + * @param {*} value The value to query. + * @param {boolean} inherited Specify returning inherited property names. + * @returns {Array} Returns the array of property names. + */ + function arrayLikeKeys(value, inherited) { + var isArr = isArray(value), + isArg = !isArr && isArguments(value), + isBuff = !isArr && !isArg && isBuffer(value), + isType = !isArr && !isArg && !isBuff && isTypedArray(value), + skipIndexes = isArr || isArg || isBuff || isType, + result = skipIndexes ? baseTimes(value.length, String) : [], + length = result.length; + + for (var key in value) { + if ( + (inherited || hasOwnProperty.call(value, key)) && + !( + skipIndexes && + // Safari 9 has enumerable `arguments.length` in strict mode. + (key == 'length' || + // Node.js 0.10 has enumerable non-index properties on buffers. + (isBuff && (key == 'offset' || key == 'parent')) || + // PhantomJS 2 has enumerable non-index properties on typed arrays. + (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) || + // Skip index properties. + isIndex(key, length)) + ) + ) { + result.push(key); + } + } + return result; + } + + /** + * A specialized version of `_.sample` for arrays. + * + * @private + * @param {Array} array The array to sample. + * @returns {*} Returns the random element. + */ + function arraySample(array) { + var length = array.length; + return length ? array[baseRandom(0, length - 1)] : undefined; + } + + /** + * A specialized version of `_.sampleSize` for arrays. + * + * @private + * @param {Array} array The array to sample. + * @param {number} n The number of elements to sample. + * @returns {Array} Returns the random elements. + */ + function arraySampleSize(array, n) { + return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length)); + } + + /** + * A specialized version of `_.shuffle` for arrays. + * + * @private + * @param {Array} array The array to shuffle. + * @returns {Array} Returns the new shuffled array. + */ + function arrayShuffle(array) { + return shuffleSelf(copyArray(array)); + } + + /** + * This function is like `assignValue` except that it doesn't assign + * `undefined` values. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ + function assignMergeValue(object, key, value) { + if ( + (value !== undefined && !eq(object[key], value)) || + (value === undefined && !(key in object)) + ) { + baseAssignValue(object, key, value); + } + } + + /** + * Assigns `value` to `key` of `object` if the existing value is not equivalent + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ + function assignValue(object, key, value) { + var objValue = object[key]; + if ( + !(hasOwnProperty.call(object, key) && eq(objValue, value)) || + (value === undefined && !(key in object)) + ) { + baseAssignValue(object, key, value); + } + } + + /** + * Gets the index at which the `key` is found in `array` of key-value pairs. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} key The key to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + return -1; + } + + /** + * Aggregates elements of `collection` on `accumulator` with keys transformed + * by `iteratee` and values set by `setter`. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} setter The function to set `accumulator` values. + * @param {Function} iteratee The iteratee to transform keys. + * @param {Object} accumulator The initial aggregated object. + * @returns {Function} Returns `accumulator`. + */ + function baseAggregator(collection, setter, iteratee, accumulator) { + baseEach(collection, function (value, key, collection) { + setter(accumulator, value, iteratee(value), collection); + }); + return accumulator; + } + + /** + * The base implementation of `_.assign` without support for multiple sources + * or `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ + function baseAssign(object, source) { + return object && copyObject(source, keys(source), object); + } + + /** + * The base implementation of `_.assignIn` without support for multiple sources + * or `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ + function baseAssignIn(object, source) { + return object && copyObject(source, keysIn(source), object); + } + + /** + * The base implementation of `assignValue` and `assignMergeValue` without + * value checks. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ + function baseAssignValue(object, key, value) { + if (key == '__proto__' && defineProperty) { + defineProperty(object, key, { + configurable: true, + enumerable: true, + value: value, + writable: true, + }); + } else { + object[key] = value; + } + } + + /** + * The base implementation of `_.at` without support for individual paths. + * + * @private + * @param {Object} object The object to iterate over. + * @param {string[]} paths The property paths to pick. + * @returns {Array} Returns the picked elements. + */ + function baseAt(object, paths) { + var index = -1, + length = paths.length, + result = Array(length), + skip = object == null; + + while (++index < length) { + result[index] = skip ? undefined : get(object, paths[index]); + } + return result; + } + + /** + * The base implementation of `_.clamp` which doesn't coerce arguments. + * + * @private + * @param {number} number The number to clamp. + * @param {number} [lower] The lower bound. + * @param {number} upper The upper bound. + * @returns {number} Returns the clamped number. + */ + function baseClamp(number, lower, upper) { + if (number === number) { + if (upper !== undefined) { + number = number <= upper ? number : upper; + } + if (lower !== undefined) { + number = number >= lower ? number : lower; + } + } + return number; + } + + /** + * The base implementation of `_.clone` and `_.cloneDeep` which tracks + * traversed objects. + * + * @private + * @param {*} value The value to clone. + * @param {boolean} bitmask The bitmask flags. + * 1 - Deep clone + * 2 - Flatten inherited properties + * 4 - Clone symbols + * @param {Function} [customizer] The function to customize cloning. + * @param {string} [key] The key of `value`. + * @param {Object} [object] The parent object of `value`. + * @param {Object} [stack] Tracks traversed objects and their clone counterparts. + * @returns {*} Returns the cloned value. + */ + function baseClone(value, bitmask, customizer, key, object, stack) { + var result, + isDeep = bitmask & CLONE_DEEP_FLAG, + isFlat = bitmask & CLONE_FLAT_FLAG, + isFull = bitmask & CLONE_SYMBOLS_FLAG; + + if (customizer) { + result = object ? customizer(value, key, object, stack) : customizer(value); + } + if (result !== undefined) { + return result; + } + if (!isObject(value)) { + return value; + } + var isArr = isArray(value); + if (isArr) { + result = initCloneArray(value); + if (!isDeep) { + return copyArray(value, result); + } + } else { + var tag = getTag(value), + isFunc = tag == funcTag || tag == genTag; + + if (isBuffer(value)) { + return cloneBuffer(value, isDeep); + } + if (tag == objectTag || tag == argsTag || (isFunc && !object)) { + result = isFlat || isFunc ? {} : initCloneObject(value); + if (!isDeep) { + return isFlat + ? copySymbolsIn(value, baseAssignIn(result, value)) + : copySymbols(value, baseAssign(result, value)); + } + } else { + if (!cloneableTags[tag]) { + return object ? value : {}; + } + result = initCloneByTag(value, tag, isDeep); + } + } + // Check for circular references and return its corresponding clone. + stack || (stack = new Stack()); + var stacked = stack.get(value); + if (stacked) { + return stacked; + } + stack.set(value, result); + + if (isSet(value)) { + value.forEach(function (subValue) { + result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack)); + }); + } else if (isMap(value)) { + value.forEach(function (subValue, key) { + result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack)); + }); + } + + var keysFunc = isFull ? (isFlat ? getAllKeysIn : getAllKeys) : isFlat ? keysIn : keys; + + var props = isArr ? undefined : keysFunc(value); + arrayEach(props || value, function (subValue, key) { + if (props) { + key = subValue; + subValue = value[key]; + } + // Recursively populate clone (susceptible to call stack limits). + assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack)); + }); + return result; + } + + /** + * The base implementation of `_.conforms` which doesn't clone `source`. + * + * @private + * @param {Object} source The object of property predicates to conform to. + * @returns {Function} Returns the new spec function. + */ + function baseConforms(source) { + var props = keys(source); + return function (object) { + return baseConformsTo(object, source, props); + }; + } + + /** + * The base implementation of `_.conformsTo` which accepts `props` to check. + * + * @private + * @param {Object} object The object to inspect. + * @param {Object} source The object of property predicates to conform to. + * @returns {boolean} Returns `true` if `object` conforms, else `false`. + */ + function baseConformsTo(object, source, props) { + var length = props.length; + if (object == null) { + return !length; + } + object = Object(object); + while (length--) { + var key = props[length], + predicate = source[key], + value = object[key]; + + if ((value === undefined && !(key in object)) || !predicate(value)) { + return false; + } + } + return true; + } + + /** + * The base implementation of `_.delay` and `_.defer` which accepts `args` + * to provide to `func`. + * + * @private + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @param {Array} args The arguments to provide to `func`. + * @returns {number|Object} Returns the timer id or timeout object. + */ + function baseDelay(func, wait, args) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + return setTimeout(function () { + func.apply(undefined, args); + }, wait); + } + + /** + * The base implementation of methods like `_.difference` without support + * for excluding multiple arrays or iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Array} values The values to exclude. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of filtered values. + */ + function baseDifference(array, values, iteratee, comparator) { + var index = -1, + includes = arrayIncludes, + isCommon = true, + length = array.length, + result = [], + valuesLength = values.length; + + if (!length) { + return result; + } + if (iteratee) { + values = arrayMap(values, baseUnary(iteratee)); + } + if (comparator) { + includes = arrayIncludesWith; + isCommon = false; + } else if (values.length >= LARGE_ARRAY_SIZE) { + includes = cacheHas; + isCommon = false; + values = new SetCache(values); + } + outer: while (++index < length) { + var value = array[index], + computed = iteratee == null ? value : iteratee(value); + + value = comparator || value !== 0 ? value : 0; + if (isCommon && computed === computed) { + var valuesIndex = valuesLength; + while (valuesIndex--) { + if (values[valuesIndex] === computed) { + continue outer; + } + } + result.push(value); + } else if (!includes(values, computed, comparator)) { + result.push(value); + } + } + return result; + } + + /** + * The base implementation of `_.forEach` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + */ + var baseEach = createBaseEach(baseForOwn); + + /** + * The base implementation of `_.forEachRight` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + */ + var baseEachRight = createBaseEach(baseForOwnRight, true); + + /** + * The base implementation of `_.every` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false` + */ + function baseEvery(collection, predicate) { + var result = true; + baseEach(collection, function (value, index, collection) { + result = !!predicate(value, index, collection); + return result; + }); + return result; + } + + /** + * The base implementation of methods like `_.max` and `_.min` which accepts a + * `comparator` to determine the extremum value. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The iteratee invoked per iteration. + * @param {Function} comparator The comparator used to compare values. + * @returns {*} Returns the extremum value. + */ + function baseExtremum(array, iteratee, comparator) { + var index = -1, + length = array.length; + + while (++index < length) { + var value = array[index], + current = iteratee(value); + + if ( + current != null && + (computed === undefined + ? current === current && !isSymbol(current) + : comparator(current, computed)) + ) { + var computed = current, + result = value; + } + } + return result; + } + + /** + * The base implementation of `_.fill` without an iteratee call guard. + * + * @private + * @param {Array} array The array to fill. + * @param {*} value The value to fill `array` with. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns `array`. + */ + function baseFill(array, value, start, end) { + var length = array.length; + + start = toInteger(start); + if (start < 0) { + start = -start > length ? 0 : length + start; + } + end = end === undefined || end > length ? length : toInteger(end); + if (end < 0) { + end += length; + } + end = start > end ? 0 : toLength(end); + while (start < end) { + array[start++] = value; + } + return array; + } + + /** + * The base implementation of `_.filter` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ + function baseFilter(collection, predicate) { + var result = []; + baseEach(collection, function (value, index, collection) { + if (predicate(value, index, collection)) { + result.push(value); + } + }); + return result; + } + + /** + * The base implementation of `_.flatten` with support for restricting flattening. + * + * @private + * @param {Array} array The array to flatten. + * @param {number} depth The maximum recursion depth. + * @param {boolean} [predicate=isFlattenable] The function invoked per iteration. + * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks. + * @param {Array} [result=[]] The initial result value. + * @returns {Array} Returns the new flattened array. + */ + function baseFlatten(array, depth, predicate, isStrict, result) { + var index = -1, + length = array.length; + + predicate || (predicate = isFlattenable); + result || (result = []); + + while (++index < length) { + var value = array[index]; + if (depth > 0 && predicate(value)) { + if (depth > 1) { + // Recursively flatten arrays (susceptible to call stack limits). + baseFlatten(value, depth - 1, predicate, isStrict, result); + } else { + arrayPush(result, value); + } + } else if (!isStrict) { + result[result.length] = value; + } + } + return result; + } + + /** + * The base implementation of `baseForOwn` which iterates over `object` + * properties returned by `keysFunc` and invokes `iteratee` for each property. + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ + var baseFor = createBaseFor(); + + /** + * This function is like `baseFor` except that it iterates over properties + * in the opposite order. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ + var baseForRight = createBaseFor(true); + + /** + * The base implementation of `_.forOwn` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ + function baseForOwn(object, iteratee) { + return object && baseFor(object, iteratee, keys); + } + + /** + * The base implementation of `_.forOwnRight` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ + function baseForOwnRight(object, iteratee) { + return object && baseForRight(object, iteratee, keys); + } + + /** + * The base implementation of `_.functions` which creates an array of + * `object` function property names filtered from `props`. + * + * @private + * @param {Object} object The object to inspect. + * @param {Array} props The property names to filter. + * @returns {Array} Returns the function names. + */ + function baseFunctions(object, props) { + return arrayFilter(props, function (key) { + return isFunction(object[key]); + }); + } + + /** + * The base implementation of `_.get` without support for default values. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @returns {*} Returns the resolved value. + */ + function baseGet(object, path) { + path = castPath(path, object); + + var index = 0, + length = path.length; + + while (object != null && index < length) { + object = object[toKey(path[index++])]; + } + return index && index == length ? object : undefined; + } + + /** + * The base implementation of `getAllKeys` and `getAllKeysIn` which uses + * `keysFunc` and `symbolsFunc` to get the enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Function} keysFunc The function to get the keys of `object`. + * @param {Function} symbolsFunc The function to get the symbols of `object`. + * @returns {Array} Returns the array of property names and symbols. + */ + function baseGetAllKeys(object, keysFunc, symbolsFunc) { + var result = keysFunc(object); + return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); + } + + /** + * The base implementation of `getTag` without fallbacks for buggy environments. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ + function baseGetTag(value) { + if (value == null) { + return value === undefined ? undefinedTag : nullTag; + } + return symToStringTag && symToStringTag in Object(value) + ? getRawTag(value) + : objectToString(value); + } + + /** + * The base implementation of `_.gt` which doesn't coerce arguments. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than `other`, + * else `false`. + */ + function baseGt(value, other) { + return value > other; + } + + /** + * The base implementation of `_.has` without support for deep paths. + * + * @private + * @param {Object} [object] The object to query. + * @param {Array|string} key The key to check. + * @returns {boolean} Returns `true` if `key` exists, else `false`. + */ + function baseHas(object, key) { + return object != null && hasOwnProperty.call(object, key); + } + + /** + * The base implementation of `_.hasIn` without support for deep paths. + * + * @private + * @param {Object} [object] The object to query. + * @param {Array|string} key The key to check. + * @returns {boolean} Returns `true` if `key` exists, else `false`. + */ + function baseHasIn(object, key) { + return object != null && key in Object(object); + } + + /** + * The base implementation of `_.inRange` which doesn't coerce arguments. + * + * @private + * @param {number} number The number to check. + * @param {number} start The start of the range. + * @param {number} end The end of the range. + * @returns {boolean} Returns `true` if `number` is in the range, else `false`. + */ + function baseInRange(number, start, end) { + return number >= nativeMin(start, end) && number < nativeMax(start, end); + } + + /** + * The base implementation of methods like `_.intersection`, without support + * for iteratee shorthands, that accepts an array of arrays to inspect. + * + * @private + * @param {Array} arrays The arrays to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of shared values. + */ + function baseIntersection(arrays, iteratee, comparator) { + var includes = comparator ? arrayIncludesWith : arrayIncludes, + length = arrays[0].length, + othLength = arrays.length, + othIndex = othLength, + caches = Array(othLength), + maxLength = Infinity, + result = []; + + while (othIndex--) { + var array = arrays[othIndex]; + if (othIndex && iteratee) { + array = arrayMap(array, baseUnary(iteratee)); + } + maxLength = nativeMin(array.length, maxLength); + caches[othIndex] = + !comparator && (iteratee || (length >= 120 && array.length >= 120)) + ? new SetCache(othIndex && array) + : undefined; + } + array = arrays[0]; + + var index = -1, + seen = caches[0]; + + outer: while (++index < length && result.length < maxLength) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + value = comparator || value !== 0 ? value : 0; + if (!(seen ? cacheHas(seen, computed) : includes(result, computed, comparator))) { + othIndex = othLength; + while (--othIndex) { + var cache = caches[othIndex]; + if ( + !(cache ? cacheHas(cache, computed) : includes(arrays[othIndex], computed, comparator)) + ) { + continue outer; + } + } + if (seen) { + seen.push(computed); + } + result.push(value); + } + } + return result; + } + + /** + * The base implementation of `_.invert` and `_.invertBy` which inverts + * `object` with values transformed by `iteratee` and set by `setter`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} setter The function to set `accumulator` values. + * @param {Function} iteratee The iteratee to transform values. + * @param {Object} accumulator The initial inverted object. + * @returns {Function} Returns `accumulator`. + */ + function baseInverter(object, setter, iteratee, accumulator) { + baseForOwn(object, function (value, key, object) { + setter(accumulator, iteratee(value), key, object); + }); + return accumulator; + } + + /** + * The base implementation of `_.invoke` without support for individual + * method arguments. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path of the method to invoke. + * @param {Array} args The arguments to invoke the method with. + * @returns {*} Returns the result of the invoked method. + */ + function baseInvoke(object, path, args) { + path = castPath(path, object); + object = parent(object, path); + var func = object == null ? object : object[toKey(last(path))]; + return func == null ? undefined : apply(func, object, args); + } + + /** + * The base implementation of `_.isArguments`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + */ + function baseIsArguments(value) { + return isObjectLike(value) && baseGetTag(value) == argsTag; + } + + /** + * The base implementation of `_.isArrayBuffer` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`. + */ + function baseIsArrayBuffer(value) { + return isObjectLike(value) && baseGetTag(value) == arrayBufferTag; + } + + /** + * The base implementation of `_.isDate` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a date object, else `false`. + */ + function baseIsDate(value) { + return isObjectLike(value) && baseGetTag(value) == dateTag; + } + + /** + * The base implementation of `_.isEqual` which supports partial comparisons + * and tracks traversed objects. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {boolean} bitmask The bitmask flags. + * 1 - Unordered comparison + * 2 - Partial comparison + * @param {Function} [customizer] The function to customize comparisons. + * @param {Object} [stack] Tracks traversed `value` and `other` objects. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + */ + function baseIsEqual(value, other, bitmask, customizer, stack) { + if (value === other) { + return true; + } + if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) { + return value !== value && other !== other; + } + return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); + } + + /** + * A specialized version of `baseIsEqual` for arrays and objects which performs + * deep comparisons and tracks traversed objects enabling objects with circular + * references to be compared. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} [stack] Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { + var objIsArr = isArray(object), + othIsArr = isArray(other), + objTag = objIsArr ? arrayTag : getTag(object), + othTag = othIsArr ? arrayTag : getTag(other); + + objTag = objTag == argsTag ? objectTag : objTag; + othTag = othTag == argsTag ? objectTag : othTag; + + var objIsObj = objTag == objectTag, + othIsObj = othTag == objectTag, + isSameTag = objTag == othTag; + + if (isSameTag && isBuffer(object)) { + if (!isBuffer(other)) { + return false; + } + objIsArr = true; + objIsObj = false; + } + if (isSameTag && !objIsObj) { + stack || (stack = new Stack()); + return objIsArr || isTypedArray(object) + ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) + : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); + } + if (!(bitmask & COMPARE_PARTIAL_FLAG)) { + var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), + othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); + + if (objIsWrapped || othIsWrapped) { + var objUnwrapped = objIsWrapped ? object.value() : object, + othUnwrapped = othIsWrapped ? other.value() : other; + + stack || (stack = new Stack()); + return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); + } + } + if (!isSameTag) { + return false; + } + stack || (stack = new Stack()); + return equalObjects(object, other, bitmask, customizer, equalFunc, stack); + } + + /** + * The base implementation of `_.isMap` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a map, else `false`. + */ + function baseIsMap(value) { + return isObjectLike(value) && getTag(value) == mapTag; + } + + /** + * The base implementation of `_.isMatch` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @param {Array} matchData The property names, values, and compare flags to match. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + */ + function baseIsMatch(object, source, matchData, customizer) { + var index = matchData.length, + length = index, + noCustomizer = !customizer; + + if (object == null) { + return !length; + } + object = Object(object); + while (index--) { + var data = matchData[index]; + if (noCustomizer && data[2] ? data[1] !== object[data[0]] : !(data[0] in object)) { + return false; + } + } + while (++index < length) { + data = matchData[index]; + var key = data[0], + objValue = object[key], + srcValue = data[1]; + + if (noCustomizer && data[2]) { + if (objValue === undefined && !(key in object)) { + return false; + } + } else { + var stack = new Stack(); + if (customizer) { + var result = customizer(objValue, srcValue, key, object, source, stack); + } + if ( + !(result === undefined + ? baseIsEqual( + srcValue, + objValue, + COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, + customizer, + stack, + ) + : result) + ) { + return false; + } + } + } + return true; + } + + /** + * The base implementation of `_.isNative` without bad shim checks. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + */ + function baseIsNative(value) { + if (!isObject(value) || isMasked(value)) { + return false; + } + var pattern = isFunction(value) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); + } + + /** + * The base implementation of `_.isRegExp` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. + */ + function baseIsRegExp(value) { + return isObjectLike(value) && baseGetTag(value) == regexpTag; + } + + /** + * The base implementation of `_.isSet` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a set, else `false`. + */ + function baseIsSet(value) { + return isObjectLike(value) && getTag(value) == setTag; + } + + /** + * The base implementation of `_.isTypedArray` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + */ + function baseIsTypedArray(value) { + return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; + } + + /** + * The base implementation of `_.iteratee`. + * + * @private + * @param {*} [value=_.identity] The value to convert to an iteratee. + * @returns {Function} Returns the iteratee. + */ + function baseIteratee(value) { + // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9. + // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details. + if (typeof value == 'function') { + return value; + } + if (value == null) { + return identity; + } + if (typeof value == 'object') { + return isArray(value) ? baseMatchesProperty(value[0], value[1]) : baseMatches(value); + } + return property(value); + } + + /** + * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + function baseKeys(object) { + if (!isPrototype(object)) { + return nativeKeys(object); + } + var result = []; + for (var key in Object(object)) { + if (hasOwnProperty.call(object, key) && key != 'constructor') { + result.push(key); + } + } + return result; + } + + /** + * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + function baseKeysIn(object) { + if (!isObject(object)) { + return nativeKeysIn(object); + } + var isProto = isPrototype(object), + result = []; + + for (var key in object) { + if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { + result.push(key); + } + } + return result; + } + + /** + * The base implementation of `_.lt` which doesn't coerce arguments. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than `other`, + * else `false`. + */ + function baseLt(value, other) { + return value < other; + } + + /** + * The base implementation of `_.map` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ + function baseMap(collection, iteratee) { + var index = -1, + result = isArrayLike(collection) ? Array(collection.length) : []; + + baseEach(collection, function (value, key, collection) { + result[++index] = iteratee(value, key, collection); + }); + return result; + } + + /** + * The base implementation of `_.matches` which doesn't clone `source`. + * + * @private + * @param {Object} source The object of property values to match. + * @returns {Function} Returns the new spec function. + */ + function baseMatches(source) { + var matchData = getMatchData(source); + if (matchData.length == 1 && matchData[0][2]) { + return matchesStrictComparable(matchData[0][0], matchData[0][1]); + } + return function (object) { + return object === source || baseIsMatch(object, source, matchData); + }; + } + + /** + * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`. + * + * @private + * @param {string} path The path of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + */ + function baseMatchesProperty(path, srcValue) { + if (isKey(path) && isStrictComparable(srcValue)) { + return matchesStrictComparable(toKey(path), srcValue); + } + return function (object) { + var objValue = get(object, path); + return objValue === undefined && objValue === srcValue + ? hasIn(object, path) + : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG); + }; + } + + /** + * The base implementation of `_.merge` without support for multiple sources. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {number} srcIndex The index of `source`. + * @param {Function} [customizer] The function to customize merged values. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + */ + function baseMerge(object, source, srcIndex, customizer, stack) { + if (object === source) { + return; + } + baseFor( + source, + function (srcValue, key) { + stack || (stack = new Stack()); + if (isObject(srcValue)) { + baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack); + } else { + var newValue = customizer + ? customizer(safeGet(object, key), srcValue, key + '', object, source, stack) + : undefined; + + if (newValue === undefined) { + newValue = srcValue; + } + assignMergeValue(object, key, newValue); + } + }, + keysIn, + ); + } + + /** + * A specialized version of `baseMerge` for arrays and objects which performs + * deep merges and tracks traversed objects enabling objects with circular + * references to be merged. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {string} key The key of the value to merge. + * @param {number} srcIndex The index of `source`. + * @param {Function} mergeFunc The function to merge values. + * @param {Function} [customizer] The function to customize assigned values. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + */ + function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) { + var objValue = safeGet(object, key), + srcValue = safeGet(source, key), + stacked = stack.get(srcValue); + + if (stacked) { + assignMergeValue(object, key, stacked); + return; + } + var newValue = customizer + ? customizer(objValue, srcValue, key + '', object, source, stack) + : undefined; + + var isCommon = newValue === undefined; + + if (isCommon) { + var isArr = isArray(srcValue), + isBuff = !isArr && isBuffer(srcValue), + isTyped = !isArr && !isBuff && isTypedArray(srcValue); + + newValue = srcValue; + if (isArr || isBuff || isTyped) { + if (isArray(objValue)) { + newValue = objValue; + } else if (isArrayLikeObject(objValue)) { + newValue = copyArray(objValue); + } else if (isBuff) { + isCommon = false; + newValue = cloneBuffer(srcValue, true); + } else if (isTyped) { + isCommon = false; + newValue = cloneTypedArray(srcValue, true); + } else { + newValue = []; + } + } else if (isPlainObject(srcValue) || isArguments(srcValue)) { + newValue = objValue; + if (isArguments(objValue)) { + newValue = toPlainObject(objValue); + } else if (!isObject(objValue) || isFunction(objValue)) { + newValue = initCloneObject(srcValue); + } + } else { + isCommon = false; + } + } + if (isCommon) { + // Recursively merge objects and arrays (susceptible to call stack limits). + stack.set(srcValue, newValue); + mergeFunc(newValue, srcValue, srcIndex, customizer, stack); + stack['delete'](srcValue); + } + assignMergeValue(object, key, newValue); + } + + /** + * The base implementation of `_.nth` which doesn't coerce arguments. + * + * @private + * @param {Array} array The array to query. + * @param {number} n The index of the element to return. + * @returns {*} Returns the nth element of `array`. + */ + function baseNth(array, n) { + var length = array.length; + if (!length) { + return; + } + n += n < 0 ? length : 0; + return isIndex(n, length) ? array[n] : undefined; + } + + /** + * The base implementation of `_.orderBy` without param guards. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by. + * @param {string[]} orders The sort orders of `iteratees`. + * @returns {Array} Returns the new sorted array. + */ + function baseOrderBy(collection, iteratees, orders) { + var index = -1; + iteratees = arrayMap(iteratees.length ? iteratees : [identity], baseUnary(getIteratee())); + + var result = baseMap(collection, function (value, key, collection) { + var criteria = arrayMap(iteratees, function (iteratee) { + return iteratee(value); + }); + return { criteria: criteria, index: ++index, value: value }; + }); + + return baseSortBy(result, function (object, other) { + return compareMultiple(object, other, orders); + }); + } + + /** + * The base implementation of `_.pick` without support for individual + * property identifiers. + * + * @private + * @param {Object} object The source object. + * @param {string[]} paths The property paths to pick. + * @returns {Object} Returns the new object. + */ + function basePick(object, paths) { + return basePickBy(object, paths, function (value, path) { + return hasIn(object, path); + }); + } + + /** + * The base implementation of `_.pickBy` without support for iteratee shorthands. + * + * @private + * @param {Object} object The source object. + * @param {string[]} paths The property paths to pick. + * @param {Function} predicate The function invoked per property. + * @returns {Object} Returns the new object. + */ + function basePickBy(object, paths, predicate) { + var index = -1, + length = paths.length, + result = {}; + + while (++index < length) { + var path = paths[index], + value = baseGet(object, path); + + if (predicate(value, path)) { + baseSet(result, castPath(path, object), value); + } + } + return result; + } + + /** + * A specialized version of `baseProperty` which supports deep paths. + * + * @private + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new accessor function. + */ + function basePropertyDeep(path) { + return function (object) { + return baseGet(object, path); + }; + } + + /** + * The base implementation of `_.pullAllBy` without support for iteratee + * shorthands. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns `array`. + */ + function basePullAll(array, values, iteratee, comparator) { + var indexOf = comparator ? baseIndexOfWith : baseIndexOf, + index = -1, + length = values.length, + seen = array; + + if (array === values) { + values = copyArray(values); + } + if (iteratee) { + seen = arrayMap(array, baseUnary(iteratee)); + } + while (++index < length) { + var fromIndex = 0, + value = values[index], + computed = iteratee ? iteratee(value) : value; + + while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) { + if (seen !== array) { + splice.call(seen, fromIndex, 1); + } + splice.call(array, fromIndex, 1); + } + } + return array; + } + + /** + * The base implementation of `_.pullAt` without support for individual + * indexes or capturing the removed elements. + * + * @private + * @param {Array} array The array to modify. + * @param {number[]} indexes The indexes of elements to remove. + * @returns {Array} Returns `array`. + */ + function basePullAt(array, indexes) { + var length = array ? indexes.length : 0, + lastIndex = length - 1; + + while (length--) { + var index = indexes[length]; + if (length == lastIndex || index !== previous) { + var previous = index; + if (isIndex(index)) { + splice.call(array, index, 1); + } else { + baseUnset(array, index); + } + } + } + return array; + } + + /** + * The base implementation of `_.random` without support for returning + * floating-point numbers. + * + * @private + * @param {number} lower The lower bound. + * @param {number} upper The upper bound. + * @returns {number} Returns the random number. + */ + function baseRandom(lower, upper) { + return lower + nativeFloor(nativeRandom() * (upper - lower + 1)); + } + + /** + * The base implementation of `_.range` and `_.rangeRight` which doesn't + * coerce arguments. + * + * @private + * @param {number} start The start of the range. + * @param {number} end The end of the range. + * @param {number} step The value to increment or decrement by. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Array} Returns the range of numbers. + */ + function baseRange(start, end, step, fromRight) { + var index = -1, + length = nativeMax(nativeCeil((end - start) / (step || 1)), 0), + result = Array(length); + + while (length--) { + result[fromRight ? length : ++index] = start; + start += step; + } + return result; + } + + /** + * The base implementation of `_.repeat` which doesn't coerce arguments. + * + * @private + * @param {string} string The string to repeat. + * @param {number} n The number of times to repeat the string. + * @returns {string} Returns the repeated string. + */ + function baseRepeat(string, n) { + var result = ''; + if (!string || n < 1 || n > MAX_SAFE_INTEGER) { + return result; + } + // Leverage the exponentiation by squaring algorithm for a faster repeat. + // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details. + do { + if (n % 2) { + result += string; + } + n = nativeFloor(n / 2); + if (n) { + string += string; + } + } while (n); + + return result; + } + + /** + * The base implementation of `_.rest` which doesn't validate or coerce arguments. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + */ + function baseRest(func, start) { + return setToString(overRest(func, start, identity), func + ''); + } + + /** + * The base implementation of `_.sample`. + * + * @private + * @param {Array|Object} collection The collection to sample. + * @returns {*} Returns the random element. + */ + function baseSample(collection) { + return arraySample(values(collection)); + } + + /** + * The base implementation of `_.sampleSize` without param guards. + * + * @private + * @param {Array|Object} collection The collection to sample. + * @param {number} n The number of elements to sample. + * @returns {Array} Returns the random elements. + */ + function baseSampleSize(collection, n) { + var array = values(collection); + return shuffleSelf(array, baseClamp(n, 0, array.length)); + } + + /** + * The base implementation of `_.set`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @param {Function} [customizer] The function to customize path creation. + * @returns {Object} Returns `object`. + */ + function baseSet(object, path, value, customizer) { + if (!isObject(object)) { + return object; + } + path = castPath(path, object); + + var index = -1, + length = path.length, + lastIndex = length - 1, + nested = object; + + while (nested != null && ++index < length) { + var key = toKey(path[index]), + newValue = value; + + if (index != lastIndex) { + var objValue = nested[key]; + newValue = customizer ? customizer(objValue, key, nested) : undefined; + if (newValue === undefined) { + newValue = isObject(objValue) ? objValue : isIndex(path[index + 1]) ? [] : {}; + } + } + assignValue(nested, key, newValue); + nested = nested[key]; + } + return object; + } + + /** + * The base implementation of `setData` without support for hot loop shorting. + * + * @private + * @param {Function} func The function to associate metadata with. + * @param {*} data The metadata. + * @returns {Function} Returns `func`. + */ + var baseSetData = !metaMap + ? identity + : function (func, data) { + metaMap.set(func, data); + return func; + }; + + /** + * The base implementation of `setToString` without support for hot loop shorting. + * + * @private + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. + */ + var baseSetToString = !defineProperty + ? identity + : function (func, string) { + return defineProperty(func, 'toString', { + configurable: true, + enumerable: false, + value: constant(string), + writable: true, + }); + }; + + /** + * The base implementation of `_.shuffle`. + * + * @private + * @param {Array|Object} collection The collection to shuffle. + * @returns {Array} Returns the new shuffled array. + */ + function baseShuffle(collection) { + return shuffleSelf(values(collection)); + } + + /** + * The base implementation of `_.slice` without an iteratee call guard. + * + * @private + * @param {Array} array The array to slice. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the slice of `array`. + */ + function baseSlice(array, start, end) { + var index = -1, + length = array.length; + + if (start < 0) { + start = -start > length ? 0 : length + start; + } + end = end > length ? length : end; + if (end < 0) { + end += length; + } + length = start > end ? 0 : (end - start) >>> 0; + start >>>= 0; + + var result = Array(length); + while (++index < length) { + result[index] = array[index + start]; + } + return result; + } + + /** + * The base implementation of `_.some` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ + function baseSome(collection, predicate) { + var result; + + baseEach(collection, function (value, index, collection) { + result = predicate(value, index, collection); + return !result; + }); + return !!result; + } + + /** + * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which + * performs a binary search of `array` to determine the index at which `value` + * should be inserted into `array` in order to maintain its sort order. + * + * @private + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {boolean} [retHighest] Specify returning the highest qualified index. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + */ + function baseSortedIndex(array, value, retHighest) { + var low = 0, + high = array == null ? low : array.length; + + if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) { + while (low < high) { + var mid = (low + high) >>> 1, + computed = array[mid]; + + if ( + computed !== null && + !isSymbol(computed) && + (retHighest ? computed <= value : computed < value) + ) { + low = mid + 1; + } else { + high = mid; + } + } + return high; + } + return baseSortedIndexBy(array, value, identity, retHighest); + } + + /** + * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy` + * which invokes `iteratee` for `value` and each element of `array` to compute + * their sort ranking. The iteratee is invoked with one argument; (value). + * + * @private + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function} iteratee The iteratee invoked per element. + * @param {boolean} [retHighest] Specify returning the highest qualified index. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + */ + function baseSortedIndexBy(array, value, iteratee, retHighest) { + value = iteratee(value); + + var low = 0, + high = array == null ? 0 : array.length, + valIsNaN = value !== value, + valIsNull = value === null, + valIsSymbol = isSymbol(value), + valIsUndefined = value === undefined; + + while (low < high) { + var mid = nativeFloor((low + high) / 2), + computed = iteratee(array[mid]), + othIsDefined = computed !== undefined, + othIsNull = computed === null, + othIsReflexive = computed === computed, + othIsSymbol = isSymbol(computed); + + if (valIsNaN) { + var setLow = retHighest || othIsReflexive; + } else if (valIsUndefined) { + setLow = othIsReflexive && (retHighest || othIsDefined); + } else if (valIsNull) { + setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull); + } else if (valIsSymbol) { + setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol); + } else if (othIsNull || othIsSymbol) { + setLow = false; + } else { + setLow = retHighest ? computed <= value : computed < value; + } + if (setLow) { + low = mid + 1; + } else { + high = mid; + } + } + return nativeMin(high, MAX_ARRAY_INDEX); + } + + /** + * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without + * support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @returns {Array} Returns the new duplicate free array. + */ + function baseSortedUniq(array, iteratee) { + var index = -1, + length = array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + if (!index || !eq(computed, seen)) { + var seen = computed; + result[resIndex++] = value === 0 ? 0 : value; + } + } + return result; + } + + /** + * The base implementation of `_.toNumber` which doesn't ensure correct + * conversions of binary, hexadecimal, or octal string values. + * + * @private + * @param {*} value The value to process. + * @returns {number} Returns the number. + */ + function baseToNumber(value) { + if (typeof value == 'number') { + return value; + } + if (isSymbol(value)) { + return NAN; + } + return +value; + } + + /** + * The base implementation of `_.toString` which doesn't convert nullish + * values to empty strings. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ + function baseToString(value) { + // Exit early for strings to avoid a performance hit in some environments. + if (typeof value == 'string') { + return value; + } + if (isArray(value)) { + // Recursively convert values (susceptible to call stack limits). + return arrayMap(value, baseToString) + ''; + } + if (isSymbol(value)) { + return symbolToString ? symbolToString.call(value) : ''; + } + var result = value + ''; + return result == '0' && 1 / value == -INFINITY ? '-0' : result; + } + + /** + * The base implementation of `_.uniqBy` without support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new duplicate free array. + */ + function baseUniq(array, iteratee, comparator) { + var index = -1, + includes = arrayIncludes, + length = array.length, + isCommon = true, + result = [], + seen = result; + + if (comparator) { + isCommon = false; + includes = arrayIncludesWith; + } else if (length >= LARGE_ARRAY_SIZE) { + var set = iteratee ? null : createSet(array); + if (set) { + return setToArray(set); + } + isCommon = false; + includes = cacheHas; + seen = new SetCache(); + } else { + seen = iteratee ? [] : result; + } + outer: while (++index < length) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + value = comparator || value !== 0 ? value : 0; + if (isCommon && computed === computed) { + var seenIndex = seen.length; + while (seenIndex--) { + if (seen[seenIndex] === computed) { + continue outer; + } + } + if (iteratee) { + seen.push(computed); + } + result.push(value); + } else if (!includes(seen, computed, comparator)) { + if (seen !== result) { + seen.push(computed); + } + result.push(value); + } + } + return result; + } + + /** + * The base implementation of `_.unset`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The property path to unset. + * @returns {boolean} Returns `true` if the property is deleted, else `false`. + */ + function baseUnset(object, path) { + path = castPath(path, object); + object = parent(object, path); + return object == null || delete object[toKey(last(path))]; + } + + /** + * The base implementation of `_.update`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to update. + * @param {Function} updater The function to produce the updated value. + * @param {Function} [customizer] The function to customize path creation. + * @returns {Object} Returns `object`. + */ + function baseUpdate(object, path, updater, customizer) { + return baseSet(object, path, updater(baseGet(object, path)), customizer); + } + + /** + * The base implementation of methods like `_.dropWhile` and `_.takeWhile` + * without support for iteratee shorthands. + * + * @private + * @param {Array} array The array to query. + * @param {Function} predicate The function invoked per iteration. + * @param {boolean} [isDrop] Specify dropping elements instead of taking them. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Array} Returns the slice of `array`. + */ + function baseWhile(array, predicate, isDrop, fromRight) { + var length = array.length, + index = fromRight ? length : -1; + + while ((fromRight ? index-- : ++index < length) && predicate(array[index], index, array)) {} + + return isDrop + ? baseSlice(array, fromRight ? 0 : index, fromRight ? index + 1 : length) + : baseSlice(array, fromRight ? index + 1 : 0, fromRight ? length : index); + } + + /** + * The base implementation of `wrapperValue` which returns the result of + * performing a sequence of actions on the unwrapped `value`, where each + * successive action is supplied the return value of the previous. + * + * @private + * @param {*} value The unwrapped value. + * @param {Array} actions Actions to perform to resolve the unwrapped value. + * @returns {*} Returns the resolved value. + */ + function baseWrapperValue(value, actions) { + var result = value; + if (result instanceof LazyWrapper) { + result = result.value(); + } + return arrayReduce( + actions, + function (result, action) { + return action.func.apply(action.thisArg, arrayPush([result], action.args)); + }, + result, + ); + } + + /** + * The base implementation of methods like `_.xor`, without support for + * iteratee shorthands, that accepts an array of arrays to inspect. + * + * @private + * @param {Array} arrays The arrays to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of values. + */ + function baseXor(arrays, iteratee, comparator) { + var length = arrays.length; + if (length < 2) { + return length ? baseUniq(arrays[0]) : []; + } + var index = -1, + result = Array(length); + + while (++index < length) { + var array = arrays[index], + othIndex = -1; + + while (++othIndex < length) { + if (othIndex != index) { + result[index] = baseDifference( + result[index] || array, + arrays[othIndex], + iteratee, + comparator, + ); + } + } + } + return baseUniq(baseFlatten(result, 1), iteratee, comparator); + } + + /** + * This base implementation of `_.zipObject` which assigns values using `assignFunc`. + * + * @private + * @param {Array} props The property identifiers. + * @param {Array} values The property values. + * @param {Function} assignFunc The function to assign values. + * @returns {Object} Returns the new object. + */ + function baseZipObject(props, values, assignFunc) { + var index = -1, + length = props.length, + valsLength = values.length, + result = {}; + + while (++index < length) { + var value = index < valsLength ? values[index] : undefined; + assignFunc(result, props[index], value); + } + return result; + } + + /** + * Casts `value` to an empty array if it's not an array like object. + * + * @private + * @param {*} value The value to inspect. + * @returns {Array|Object} Returns the cast array-like object. + */ + function castArrayLikeObject(value) { + return isArrayLikeObject(value) ? value : []; + } + + /** + * Casts `value` to `identity` if it's not a function. + * + * @private + * @param {*} value The value to inspect. + * @returns {Function} Returns cast function. + */ + function castFunction(value) { + return typeof value == 'function' ? value : identity; + } + + /** + * Casts `value` to a path array if it's not one. + * + * @private + * @param {*} value The value to inspect. + * @param {Object} [object] The object to query keys on. + * @returns {Array} Returns the cast property path array. + */ + function castPath(value, object) { + if (isArray(value)) { + return value; + } + return isKey(value, object) ? [value] : stringToPath(toString(value)); + } + + /** + * A `baseRest` alias which can be replaced with `identity` by module + * replacement plugins. + * + * @private + * @type {Function} + * @param {Function} func The function to apply a rest parameter to. + * @returns {Function} Returns the new function. + */ + var castRest = baseRest; + + /** + * Casts `array` to a slice if it's needed. + * + * @private + * @param {Array} array The array to inspect. + * @param {number} start The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the cast slice. + */ + function castSlice(array, start, end) { + var length = array.length; + end = end === undefined ? length : end; + return !start && end >= length ? array : baseSlice(array, start, end); + } + + /** + * A simple wrapper around the global [`clearTimeout`](https://mdn.io/clearTimeout). + * + * @private + * @param {number|Object} id The timer id or timeout object of the timer to clear. + */ + var clearTimeout = + ctxClearTimeout || + function (id) { + return root.clearTimeout(id); + }; + + /** + * Creates a clone of `buffer`. + * + * @private + * @param {Buffer} buffer The buffer to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Buffer} Returns the cloned buffer. + */ + function cloneBuffer(buffer, isDeep) { + if (isDeep) { + return buffer.slice(); + } + var length = buffer.length, + result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length); + + buffer.copy(result); + return result; + } + + /** + * Creates a clone of `arrayBuffer`. + * + * @private + * @param {ArrayBuffer} arrayBuffer The array buffer to clone. + * @returns {ArrayBuffer} Returns the cloned array buffer. + */ + function cloneArrayBuffer(arrayBuffer) { + var result = new arrayBuffer.constructor(arrayBuffer.byteLength); + new Uint8Array(result).set(new Uint8Array(arrayBuffer)); + return result; + } + + /** + * Creates a clone of `dataView`. + * + * @private + * @param {Object} dataView The data view to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned data view. + */ + function cloneDataView(dataView, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer; + return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); + } + + /** + * Creates a clone of `regexp`. + * + * @private + * @param {Object} regexp The regexp to clone. + * @returns {Object} Returns the cloned regexp. + */ + function cloneRegExp(regexp) { + var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); + result.lastIndex = regexp.lastIndex; + return result; + } + + /** + * Creates a clone of the `symbol` object. + * + * @private + * @param {Object} symbol The symbol object to clone. + * @returns {Object} Returns the cloned symbol object. + */ + function cloneSymbol(symbol) { + return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; + } + + /** + * Creates a clone of `typedArray`. + * + * @private + * @param {Object} typedArray The typed array to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned typed array. + */ + function cloneTypedArray(typedArray, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; + return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); + } + + /** + * Compares values to sort them in ascending order. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {number} Returns the sort order indicator for `value`. + */ + function compareAscending(value, other) { + if (value !== other) { + var valIsDefined = value !== undefined, + valIsNull = value === null, + valIsReflexive = value === value, + valIsSymbol = isSymbol(value); + + var othIsDefined = other !== undefined, + othIsNull = other === null, + othIsReflexive = other === other, + othIsSymbol = isSymbol(other); + + if ( + (!othIsNull && !othIsSymbol && !valIsSymbol && value > other) || + (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) || + (valIsNull && othIsDefined && othIsReflexive) || + (!valIsDefined && othIsReflexive) || + !valIsReflexive + ) { + return 1; + } + if ( + (!valIsNull && !valIsSymbol && !othIsSymbol && value < other) || + (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) || + (othIsNull && valIsDefined && valIsReflexive) || + (!othIsDefined && valIsReflexive) || + !othIsReflexive + ) { + return -1; + } + } + return 0; + } + + /** + * Used by `_.orderBy` to compare multiple properties of a value to another + * and stable sort them. + * + * If `orders` is unspecified, all values are sorted in ascending order. Otherwise, + * specify an order of "desc" for descending or "asc" for ascending sort order + * of corresponding values. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {boolean[]|string[]} orders The order to sort by for each property. + * @returns {number} Returns the sort order indicator for `object`. + */ + function compareMultiple(object, other, orders) { + var index = -1, + objCriteria = object.criteria, + othCriteria = other.criteria, + length = objCriteria.length, + ordersLength = orders.length; + + while (++index < length) { + var result = compareAscending(objCriteria[index], othCriteria[index]); + if (result) { + if (index >= ordersLength) { + return result; + } + var order = orders[index]; + return result * (order == 'desc' ? -1 : 1); + } + } + // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications + // that causes it, under certain circumstances, to provide the same value for + // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247 + // for more details. + // + // This also ensures a stable sort in V8 and other engines. + // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details. + return object.index - other.index; + } + + /** + * Creates an array that is the composition of partially applied arguments, + * placeholders, and provided arguments into a single array of arguments. + * + * @private + * @param {Array} args The provided arguments. + * @param {Array} partials The arguments to prepend to those provided. + * @param {Array} holders The `partials` placeholder indexes. + * @params {boolean} [isCurried] Specify composing for a curried function. + * @returns {Array} Returns the new array of composed arguments. + */ + function composeArgs(args, partials, holders, isCurried) { + var argsIndex = -1, + argsLength = args.length, + holdersLength = holders.length, + leftIndex = -1, + leftLength = partials.length, + rangeLength = nativeMax(argsLength - holdersLength, 0), + result = Array(leftLength + rangeLength), + isUncurried = !isCurried; + + while (++leftIndex < leftLength) { + result[leftIndex] = partials[leftIndex]; + } + while (++argsIndex < holdersLength) { + if (isUncurried || argsIndex < argsLength) { + result[holders[argsIndex]] = args[argsIndex]; + } + } + while (rangeLength--) { + result[leftIndex++] = args[argsIndex++]; + } + return result; + } + + /** + * This function is like `composeArgs` except that the arguments composition + * is tailored for `_.partialRight`. + * + * @private + * @param {Array} args The provided arguments. + * @param {Array} partials The arguments to append to those provided. + * @param {Array} holders The `partials` placeholder indexes. + * @params {boolean} [isCurried] Specify composing for a curried function. + * @returns {Array} Returns the new array of composed arguments. + */ + function composeArgsRight(args, partials, holders, isCurried) { + var argsIndex = -1, + argsLength = args.length, + holdersIndex = -1, + holdersLength = holders.length, + rightIndex = -1, + rightLength = partials.length, + rangeLength = nativeMax(argsLength - holdersLength, 0), + result = Array(rangeLength + rightLength), + isUncurried = !isCurried; + + while (++argsIndex < rangeLength) { + result[argsIndex] = args[argsIndex]; + } + var offset = argsIndex; + while (++rightIndex < rightLength) { + result[offset + rightIndex] = partials[rightIndex]; + } + while (++holdersIndex < holdersLength) { + if (isUncurried || argsIndex < argsLength) { + result[offset + holders[holdersIndex]] = args[argsIndex++]; + } + } + return result; + } + + /** + * Copies the values of `source` to `array`. + * + * @private + * @param {Array} source The array to copy values from. + * @param {Array} [array=[]] The array to copy values to. + * @returns {Array} Returns `array`. + */ + function copyArray(source, array) { + var index = -1, + length = source.length; + + array || (array = Array(length)); + while (++index < length) { + array[index] = source[index]; + } + return array; + } + + /** + * Copies properties of `source` to `object`. + * + * @private + * @param {Object} source The object to copy properties from. + * @param {Array} props The property identifiers to copy. + * @param {Object} [object={}] The object to copy properties to. + * @param {Function} [customizer] The function to customize copied values. + * @returns {Object} Returns `object`. + */ + function copyObject(source, props, object, customizer) { + var isNew = !object; + object || (object = {}); + + var index = -1, + length = props.length; + + while (++index < length) { + var key = props[index]; + + var newValue = customizer + ? customizer(object[key], source[key], key, object, source) + : undefined; + + if (newValue === undefined) { + newValue = source[key]; + } + if (isNew) { + baseAssignValue(object, key, newValue); + } else { + assignValue(object, key, newValue); + } + } + return object; + } + + /** + * Copies own symbols of `source` to `object`. + * + * @private + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. + */ + function copySymbols(source, object) { + return copyObject(source, getSymbols(source), object); + } + + /** + * Copies own and inherited symbols of `source` to `object`. + * + * @private + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. + */ + function copySymbolsIn(source, object) { + return copyObject(source, getSymbolsIn(source), object); + } + + /** + * Creates a function like `_.groupBy`. + * + * @private + * @param {Function} setter The function to set accumulator values. + * @param {Function} [initializer] The accumulator object initializer. + * @returns {Function} Returns the new aggregator function. + */ + function createAggregator(setter, initializer) { + return function (collection, iteratee) { + var func = isArray(collection) ? arrayAggregator : baseAggregator, + accumulator = initializer ? initializer() : {}; + + return func(collection, setter, getIteratee(iteratee, 2), accumulator); + }; + } + + /** + * Creates a function like `_.assign`. + * + * @private + * @param {Function} assigner The function to assign values. + * @returns {Function} Returns the new assigner function. + */ + function createAssigner(assigner) { + return baseRest(function (object, sources) { + var index = -1, + length = sources.length, + customizer = length > 1 ? sources[length - 1] : undefined, + guard = length > 2 ? sources[2] : undefined; + + customizer = + assigner.length > 3 && typeof customizer == 'function' ? (length--, customizer) : undefined; + + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + customizer = length < 3 ? undefined : customizer; + length = 1; + } + object = Object(object); + while (++index < length) { + var source = sources[index]; + if (source) { + assigner(object, source, index, customizer); + } + } + return object; + }); + } + + /** + * Creates a `baseEach` or `baseEachRight` function. + * + * @private + * @param {Function} eachFunc The function to iterate over a collection. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ + function createBaseEach(eachFunc, fromRight) { + return function (collection, iteratee) { + if (collection == null) { + return collection; + } + if (!isArrayLike(collection)) { + return eachFunc(collection, iteratee); + } + var length = collection.length, + index = fromRight ? length : -1, + iterable = Object(collection); + + while (fromRight ? index-- : ++index < length) { + if (iteratee(iterable[index], index, iterable) === false) { + break; + } + } + return collection; + }; + } + + /** + * Creates a base function for methods like `_.forIn` and `_.forOwn`. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ + function createBaseFor(fromRight) { + return function (object, iteratee, keysFunc) { + var index = -1, + iterable = Object(object), + props = keysFunc(object), + length = props.length; + + while (length--) { + var key = props[fromRight ? length : ++index]; + if (iteratee(iterable[key], key, iterable) === false) { + break; + } + } + return object; + }; + } + + /** + * Creates a function that wraps `func` to invoke it with the optional `this` + * binding of `thisArg`. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {*} [thisArg] The `this` binding of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createBind(func, bitmask, thisArg) { + var isBind = bitmask & WRAP_BIND_FLAG, + Ctor = createCtor(func); + + function wrapper() { + var fn = this && this !== root && this instanceof wrapper ? Ctor : func; + return fn.apply(isBind ? thisArg : this, arguments); + } + return wrapper; + } + + /** + * Creates a function like `_.lowerFirst`. + * + * @private + * @param {string} methodName The name of the `String` case method to use. + * @returns {Function} Returns the new case function. + */ + function createCaseFirst(methodName) { + return function (string) { + string = toString(string); + + var strSymbols = hasUnicode(string) ? stringToArray(string) : undefined; + + var chr = strSymbols ? strSymbols[0] : string.charAt(0); + + var trailing = strSymbols ? castSlice(strSymbols, 1).join('') : string.slice(1); + + return chr[methodName]() + trailing; + }; + } + + /** + * Creates a function like `_.camelCase`. + * + * @private + * @param {Function} callback The function to combine each word. + * @returns {Function} Returns the new compounder function. + */ + function createCompounder(callback) { + return function (string) { + return arrayReduce(words(deburr(string).replace(reApos, '')), callback, ''); + }; + } + + /** + * Creates a function that produces an instance of `Ctor` regardless of + * whether it was invoked as part of a `new` expression or by `call` or `apply`. + * + * @private + * @param {Function} Ctor The constructor to wrap. + * @returns {Function} Returns the new wrapped function. + */ + function createCtor(Ctor) { + return function () { + // Use a `switch` statement to work with class constructors. See + // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist + // for more details. + var args = arguments; + switch (args.length) { + case 0: + return new Ctor(); + case 1: + return new Ctor(args[0]); + case 2: + return new Ctor(args[0], args[1]); + case 3: + return new Ctor(args[0], args[1], args[2]); + case 4: + return new Ctor(args[0], args[1], args[2], args[3]); + case 5: + return new Ctor(args[0], args[1], args[2], args[3], args[4]); + case 6: + return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]); + case 7: + return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]); + } + var thisBinding = baseCreate(Ctor.prototype), + result = Ctor.apply(thisBinding, args); + + // Mimic the constructor's `return` behavior. + // See https://es5.github.io/#x13.2.2 for more details. + return isObject(result) ? result : thisBinding; + }; + } + + /** + * Creates a function that wraps `func` to enable currying. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {number} arity The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createCurry(func, bitmask, arity) { + var Ctor = createCtor(func); + + function wrapper() { + var length = arguments.length, + args = Array(length), + index = length, + placeholder = getHolder(wrapper); + + while (index--) { + args[index] = arguments[index]; + } + var holders = + length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder + ? [] + : replaceHolders(args, placeholder); + + length -= holders.length; + if (length < arity) { + return createRecurry( + func, + bitmask, + createHybrid, + wrapper.placeholder, + undefined, + args, + holders, + undefined, + undefined, + arity - length, + ); + } + var fn = this && this !== root && this instanceof wrapper ? Ctor : func; + return apply(fn, this, args); + } + return wrapper; + } + + /** + * Creates a `_.find` or `_.findLast` function. + * + * @private + * @param {Function} findIndexFunc The function to find the collection index. + * @returns {Function} Returns the new find function. + */ + function createFind(findIndexFunc) { + return function (collection, predicate, fromIndex) { + var iterable = Object(collection); + if (!isArrayLike(collection)) { + var iteratee = getIteratee(predicate, 3); + collection = keys(collection); + predicate = function (key) { + return iteratee(iterable[key], key, iterable); + }; + } + var index = findIndexFunc(collection, predicate, fromIndex); + return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined; + }; + } + + /** + * Creates a `_.flow` or `_.flowRight` function. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new flow function. + */ + function createFlow(fromRight) { + return flatRest(function (funcs) { + var length = funcs.length, + index = length, + prereq = LodashWrapper.prototype.thru; + + if (fromRight) { + funcs.reverse(); + } + while (index--) { + var func = funcs[index]; + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + if (prereq && !wrapper && getFuncName(func) == 'wrapper') { + var wrapper = new LodashWrapper([], true); + } + } + index = wrapper ? index : length; + while (++index < length) { + func = funcs[index]; + + var funcName = getFuncName(func), + data = funcName == 'wrapper' ? getData(func) : undefined; + + if ( + data && + isLaziable(data[0]) && + data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) && + !data[4].length && + data[9] == 1 + ) { + wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]); + } else { + wrapper = func.length == 1 && isLaziable(func) ? wrapper[funcName]() : wrapper.thru(func); + } + } + return function () { + var args = arguments, + value = args[0]; + + if (wrapper && args.length == 1 && isArray(value)) { + return wrapper.plant(value).value(); + } + var index = 0, + result = length ? funcs[index].apply(this, args) : value; + + while (++index < length) { + result = funcs[index].call(this, result); + } + return result; + }; + }); + } + + /** + * Creates a function that wraps `func` to invoke it with optional `this` + * binding of `thisArg`, partial application, and currying. + * + * @private + * @param {Function|string} func The function or method name to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to prepend to those provided to + * the new function. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [partialsRight] The arguments to append to those provided + * to the new function. + * @param {Array} [holdersRight] The `partialsRight` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createHybrid( + func, + bitmask, + thisArg, + partials, + holders, + partialsRight, + holdersRight, + argPos, + ary, + arity, + ) { + var isAry = bitmask & WRAP_ARY_FLAG, + isBind = bitmask & WRAP_BIND_FLAG, + isBindKey = bitmask & WRAP_BIND_KEY_FLAG, + isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG), + isFlip = bitmask & WRAP_FLIP_FLAG, + Ctor = isBindKey ? undefined : createCtor(func); + + function wrapper() { + var length = arguments.length, + args = Array(length), + index = length; + + while (index--) { + args[index] = arguments[index]; + } + if (isCurried) { + var placeholder = getHolder(wrapper), + holdersCount = countHolders(args, placeholder); + } + if (partials) { + args = composeArgs(args, partials, holders, isCurried); + } + if (partialsRight) { + args = composeArgsRight(args, partialsRight, holdersRight, isCurried); + } + length -= holdersCount; + if (isCurried && length < arity) { + var newHolders = replaceHolders(args, placeholder); + return createRecurry( + func, + bitmask, + createHybrid, + wrapper.placeholder, + thisArg, + args, + newHolders, + argPos, + ary, + arity - length, + ); + } + var thisBinding = isBind ? thisArg : this, + fn = isBindKey ? thisBinding[func] : func; + + length = args.length; + if (argPos) { + args = reorder(args, argPos); + } else if (isFlip && length > 1) { + args.reverse(); + } + if (isAry && ary < length) { + args.length = ary; + } + if (this && this !== root && this instanceof wrapper) { + fn = Ctor || createCtor(fn); + } + return fn.apply(thisBinding, args); + } + return wrapper; + } + + /** + * Creates a function like `_.invertBy`. + * + * @private + * @param {Function} setter The function to set accumulator values. + * @param {Function} toIteratee The function to resolve iteratees. + * @returns {Function} Returns the new inverter function. + */ + function createInverter(setter, toIteratee) { + return function (object, iteratee) { + return baseInverter(object, setter, toIteratee(iteratee), {}); + }; + } + + /** + * Creates a function that performs a mathematical operation on two values. + * + * @private + * @param {Function} operator The function to perform the operation. + * @param {number} [defaultValue] The value used for `undefined` arguments. + * @returns {Function} Returns the new mathematical operation function. + */ + function createMathOperation(operator, defaultValue) { + return function (value, other) { + var result; + if (value === undefined && other === undefined) { + return defaultValue; + } + if (value !== undefined) { + result = value; + } + if (other !== undefined) { + if (result === undefined) { + return other; + } + if (typeof value == 'string' || typeof other == 'string') { + value = baseToString(value); + other = baseToString(other); + } else { + value = baseToNumber(value); + other = baseToNumber(other); + } + result = operator(value, other); + } + return result; + }; + } + + /** + * Creates a function like `_.over`. + * + * @private + * @param {Function} arrayFunc The function to iterate over iteratees. + * @returns {Function} Returns the new over function. + */ + function createOver(arrayFunc) { + return flatRest(function (iteratees) { + iteratees = arrayMap(iteratees, baseUnary(getIteratee())); + return baseRest(function (args) { + var thisArg = this; + return arrayFunc(iteratees, function (iteratee) { + return apply(iteratee, thisArg, args); + }); + }); + }); + } + + /** + * Creates the padding for `string` based on `length`. The `chars` string + * is truncated if the number of characters exceeds `length`. + * + * @private + * @param {number} length The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padding for `string`. + */ + function createPadding(length, chars) { + chars = chars === undefined ? ' ' : baseToString(chars); + + var charsLength = chars.length; + if (charsLength < 2) { + return charsLength ? baseRepeat(chars, length) : chars; + } + var result = baseRepeat(chars, nativeCeil(length / stringSize(chars))); + return hasUnicode(chars) + ? castSlice(stringToArray(result), 0, length).join('') + : result.slice(0, length); + } + + /** + * Creates a function that wraps `func` to invoke it with the `this` binding + * of `thisArg` and `partials` prepended to the arguments it receives. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} partials The arguments to prepend to those provided to + * the new function. + * @returns {Function} Returns the new wrapped function. + */ + function createPartial(func, bitmask, thisArg, partials) { + var isBind = bitmask & WRAP_BIND_FLAG, + Ctor = createCtor(func); + + function wrapper() { + var argsIndex = -1, + argsLength = arguments.length, + leftIndex = -1, + leftLength = partials.length, + args = Array(leftLength + argsLength), + fn = this && this !== root && this instanceof wrapper ? Ctor : func; + + while (++leftIndex < leftLength) { + args[leftIndex] = partials[leftIndex]; + } + while (argsLength--) { + args[leftIndex++] = arguments[++argsIndex]; + } + return apply(fn, isBind ? thisArg : this, args); + } + return wrapper; + } + + /** + * Creates a `_.range` or `_.rangeRight` function. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new range function. + */ + function createRange(fromRight) { + return function (start, end, step) { + if (step && typeof step != 'number' && isIterateeCall(start, end, step)) { + end = step = undefined; + } + // Ensure the sign of `-0` is preserved. + start = toFinite(start); + if (end === undefined) { + end = start; + start = 0; + } else { + end = toFinite(end); + } + step = step === undefined ? (start < end ? 1 : -1) : toFinite(step); + return baseRange(start, end, step, fromRight); + }; + } + + /** + * Creates a function that performs a relational operation on two values. + * + * @private + * @param {Function} operator The function to perform the operation. + * @returns {Function} Returns the new relational operation function. + */ + function createRelationalOperation(operator) { + return function (value, other) { + if (!(typeof value == 'string' && typeof other == 'string')) { + value = toNumber(value); + other = toNumber(other); + } + return operator(value, other); + }; + } + + /** + * Creates a function that wraps `func` to continue currying. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {Function} wrapFunc The function to create the `func` wrapper. + * @param {*} placeholder The placeholder value. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to prepend to those provided to + * the new function. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createRecurry( + func, + bitmask, + wrapFunc, + placeholder, + thisArg, + partials, + holders, + argPos, + ary, + arity, + ) { + var isCurry = bitmask & WRAP_CURRY_FLAG, + newHolders = isCurry ? holders : undefined, + newHoldersRight = isCurry ? undefined : holders, + newPartials = isCurry ? partials : undefined, + newPartialsRight = isCurry ? undefined : partials; + + bitmask |= isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG; + bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG); + + if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) { + bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG); + } + var newData = [ + func, + bitmask, + thisArg, + newPartials, + newHolders, + newPartialsRight, + newHoldersRight, + argPos, + ary, + arity, + ]; + + var result = wrapFunc.apply(undefined, newData); + if (isLaziable(func)) { + setData(result, newData); + } + result.placeholder = placeholder; + return setWrapToString(result, func, bitmask); + } + + /** + * Creates a function like `_.round`. + * + * @private + * @param {string} methodName The name of the `Math` method to use when rounding. + * @returns {Function} Returns the new round function. + */ + function createRound(methodName) { + var func = Math[methodName]; + return function (number, precision) { + number = toNumber(number); + precision = precision == null ? 0 : nativeMin(toInteger(precision), 292); + if (precision && nativeIsFinite(number)) { + // Shift with exponential notation to avoid floating-point issues. + // See [MDN](https://mdn.io/round#Examples) for more details. + var pair = (toString(number) + 'e').split('e'), + value = func(pair[0] + 'e' + (+pair[1] + precision)); + + pair = (toString(value) + 'e').split('e'); + return +(pair[0] + 'e' + (+pair[1] - precision)); + } + return func(number); + }; + } + + /** + * Creates a set object of `values`. + * + * @private + * @param {Array} values The values to add to the set. + * @returns {Object} Returns the new set. + */ + var createSet = !(Set && 1 / setToArray(new Set([, -0]))[1] == INFINITY) + ? noop + : function (values) { + return new Set(values); + }; + + /** + * Creates a `_.toPairs` or `_.toPairsIn` function. + * + * @private + * @param {Function} keysFunc The function to get the keys of a given object. + * @returns {Function} Returns the new pairs function. + */ + function createToPairs(keysFunc) { + return function (object) { + var tag = getTag(object); + if (tag == mapTag) { + return mapToArray(object); + } + if (tag == setTag) { + return setToPairs(object); + } + return baseToPairs(object, keysFunc(object)); + }; + } + + /** + * Creates a function that either curries or invokes `func` with optional + * `this` binding and partially applied arguments. + * + * @private + * @param {Function|string} func The function or method name to wrap. + * @param {number} bitmask The bitmask flags. + * 1 - `_.bind` + * 2 - `_.bindKey` + * 4 - `_.curry` or `_.curryRight` of a bound function + * 8 - `_.curry` + * 16 - `_.curryRight` + * 32 - `_.partial` + * 64 - `_.partialRight` + * 128 - `_.rearg` + * 256 - `_.ary` + * 512 - `_.flip` + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to be partially applied. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) { + var isBindKey = bitmask & WRAP_BIND_KEY_FLAG; + if (!isBindKey && typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + var length = partials ? partials.length : 0; + if (!length) { + bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG); + partials = holders = undefined; + } + ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0); + arity = arity === undefined ? arity : toInteger(arity); + length -= holders ? holders.length : 0; + + if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) { + var partialsRight = partials, + holdersRight = holders; + + partials = holders = undefined; + } + var data = isBindKey ? undefined : getData(func); + + var newData = [ + func, + bitmask, + thisArg, + partials, + holders, + partialsRight, + holdersRight, + argPos, + ary, + arity, + ]; + + if (data) { + mergeData(newData, data); + } + func = newData[0]; + bitmask = newData[1]; + thisArg = newData[2]; + partials = newData[3]; + holders = newData[4]; + arity = newData[9] = + newData[9] === undefined ? (isBindKey ? 0 : func.length) : nativeMax(newData[9] - length, 0); + + if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) { + bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG); + } + if (!bitmask || bitmask == WRAP_BIND_FLAG) { + var result = createBind(func, bitmask, thisArg); + } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) { + result = createCurry(func, bitmask, arity); + } else if ( + (bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && + !holders.length + ) { + result = createPartial(func, bitmask, thisArg, partials); + } else { + result = createHybrid.apply(undefined, newData); + } + var setter = data ? baseSetData : setData; + return setWrapToString(setter(result, newData), func, bitmask); + } + + /** + * Used by `_.defaults` to customize its `_.assignIn` use to assign properties + * of source objects to the destination object for all destination properties + * that resolve to `undefined`. + * + * @private + * @param {*} objValue The destination value. + * @param {*} srcValue The source value. + * @param {string} key The key of the property to assign. + * @param {Object} object The parent object of `objValue`. + * @returns {*} Returns the value to assign. + */ + function customDefaultsAssignIn(objValue, srcValue, key, object) { + if ( + objValue === undefined || + (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key)) + ) { + return srcValue; + } + return objValue; + } + + /** + * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source + * objects into destination objects that are passed thru. + * + * @private + * @param {*} objValue The destination value. + * @param {*} srcValue The source value. + * @param {string} key The key of the property to merge. + * @param {Object} object The parent object of `objValue`. + * @param {Object} source The parent object of `srcValue`. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + * @returns {*} Returns the value to assign. + */ + function customDefaultsMerge(objValue, srcValue, key, object, source, stack) { + if (isObject(objValue) && isObject(srcValue)) { + // Recursively merge objects and arrays (susceptible to call stack limits). + stack.set(srcValue, objValue); + baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack); + stack['delete'](srcValue); + } + return objValue; + } + + /** + * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain + * objects. + * + * @private + * @param {*} value The value to inspect. + * @param {string} key The key of the property to inspect. + * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`. + */ + function customOmitClone(value) { + return isPlainObject(value) ? undefined : value; + } + + /** + * A specialized version of `baseIsEqualDeep` for arrays with support for + * partial deep comparisons. + * + * @private + * @param {Array} array The array to compare. + * @param {Array} other The other array to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `array` and `other` objects. + * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. + */ + function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + arrLength = array.length, + othLength = other.length; + + if (arrLength != othLength && !(isPartial && othLength > arrLength)) { + return false; + } + // Assume cyclic values are equal. + var stacked = stack.get(array); + if (stacked && stack.get(other)) { + return stacked == other; + } + var index = -1, + result = true, + seen = bitmask & COMPARE_UNORDERED_FLAG ? new SetCache() : undefined; + + stack.set(array, other); + stack.set(other, array); + + // Ignore non-index properties. + while (++index < arrLength) { + var arrValue = array[index], + othValue = other[index]; + + if (customizer) { + var compared = isPartial + ? customizer(othValue, arrValue, index, other, array, stack) + : customizer(arrValue, othValue, index, array, other, stack); + } + if (compared !== undefined) { + if (compared) { + continue; + } + result = false; + break; + } + // Recursively compare arrays (susceptible to call stack limits). + if (seen) { + if ( + !arraySome(other, function (othValue, othIndex) { + if ( + !cacheHas(seen, othIndex) && + (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack)) + ) { + return seen.push(othIndex); + } + }) + ) { + result = false; + break; + } + } else if ( + !(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack)) + ) { + result = false; + break; + } + } + stack['delete'](array); + stack['delete'](other); + return result; + } + + /** + * A specialized version of `baseIsEqualDeep` for comparing objects of + * the same `toStringTag`. + * + * **Note:** This function only supports comparing values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {string} tag The `toStringTag` of the objects to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { + switch (tag) { + case dataViewTag: + if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) { + return false; + } + object = object.buffer; + other = other.buffer; + + case arrayBufferTag: + if ( + object.byteLength != other.byteLength || + !equalFunc(new Uint8Array(object), new Uint8Array(other)) + ) { + return false; + } + return true; + + case boolTag: + case dateTag: + case numberTag: + // Coerce booleans to `1` or `0` and dates to milliseconds. + // Invalid dates are coerced to `NaN`. + return eq(+object, +other); + + case errorTag: + return object.name == other.name && object.message == other.message; + + case regexpTag: + case stringTag: + // Coerce regexes to strings and treat strings, primitives and objects, + // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring + // for more details. + return object == other + ''; + + case mapTag: + var convert = mapToArray; + + case setTag: + var isPartial = bitmask & COMPARE_PARTIAL_FLAG; + convert || (convert = setToArray); + + if (object.size != other.size && !isPartial) { + return false; + } + // Assume cyclic values are equal. + var stacked = stack.get(object); + if (stacked) { + return stacked == other; + } + bitmask |= COMPARE_UNORDERED_FLAG; + + // Recursively compare objects (susceptible to call stack limits). + stack.set(object, other); + var result = equalArrays( + convert(object), + convert(other), + bitmask, + customizer, + equalFunc, + stack, + ); + stack['delete'](object); + return result; + + case symbolTag: + if (symbolValueOf) { + return symbolValueOf.call(object) == symbolValueOf.call(other); + } + } + return false; + } + + /** + * A specialized version of `baseIsEqualDeep` for objects with support for + * partial deep comparisons. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + objProps = getAllKeys(object), + objLength = objProps.length, + othProps = getAllKeys(other), + othLength = othProps.length; + + if (objLength != othLength && !isPartial) { + return false; + } + var index = objLength; + while (index--) { + var key = objProps[index]; + if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { + return false; + } + } + // Assume cyclic values are equal. + var stacked = stack.get(object); + if (stacked && stack.get(other)) { + return stacked == other; + } + var result = true; + stack.set(object, other); + stack.set(other, object); + + var skipCtor = isPartial; + while (++index < objLength) { + key = objProps[index]; + var objValue = object[key], + othValue = other[key]; + + if (customizer) { + var compared = isPartial + ? customizer(othValue, objValue, key, other, object, stack) + : customizer(objValue, othValue, key, object, other, stack); + } + // Recursively compare objects (susceptible to call stack limits). + if ( + !(compared === undefined + ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) + : compared) + ) { + result = false; + break; + } + skipCtor || (skipCtor = key == 'constructor'); + } + if (result && !skipCtor) { + var objCtor = object.constructor, + othCtor = other.constructor; + + // Non `Object` object instances with different constructors are not equal. + if ( + objCtor != othCtor && + 'constructor' in object && + 'constructor' in other && + !( + typeof objCtor == 'function' && + objCtor instanceof objCtor && + typeof othCtor == 'function' && + othCtor instanceof othCtor + ) + ) { + result = false; + } + } + stack['delete'](object); + stack['delete'](other); + return result; + } + + /** + * A specialized version of `baseRest` which flattens the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @returns {Function} Returns the new function. + */ + function flatRest(func) { + return setToString(overRest(func, undefined, flatten), func + ''); + } + + /** + * Creates an array of own enumerable property names and symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ + function getAllKeys(object) { + return baseGetAllKeys(object, keys, getSymbols); + } + + /** + * Creates an array of own and inherited enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ + function getAllKeysIn(object) { + return baseGetAllKeys(object, keysIn, getSymbolsIn); + } + + /** + * Gets metadata for `func`. + * + * @private + * @param {Function} func The function to query. + * @returns {*} Returns the metadata for `func`. + */ + var getData = !metaMap + ? noop + : function (func) { + return metaMap.get(func); + }; + + /** + * Gets the name of `func`. + * + * @private + * @param {Function} func The function to query. + * @returns {string} Returns the function name. + */ + function getFuncName(func) { + var result = func.name + '', + array = realNames[result], + length = hasOwnProperty.call(realNames, result) ? array.length : 0; + + while (length--) { + var data = array[length], + otherFunc = data.func; + if (otherFunc == null || otherFunc == func) { + return data.name; + } + } + return result; + } + + /** + * Gets the argument placeholder value for `func`. + * + * @private + * @param {Function} func The function to inspect. + * @returns {*} Returns the placeholder value. + */ + function getHolder(func) { + var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func; + return object.placeholder; + } + + /** + * Gets the appropriate "iteratee" function. If `_.iteratee` is customized, + * this function returns the custom method, otherwise it returns `baseIteratee`. + * If arguments are provided, the chosen function is invoked with them and + * its result is returned. + * + * @private + * @param {*} [value] The value to convert to an iteratee. + * @param {number} [arity] The arity of the created iteratee. + * @returns {Function} Returns the chosen function or its result. + */ + function getIteratee() { + var result = lodash.iteratee || iteratee; + result = result === iteratee ? baseIteratee : result; + return arguments.length ? result(arguments[0], arguments[1]) : result; + } + + /** + * Gets the data for `map`. + * + * @private + * @param {Object} map The map to query. + * @param {string} key The reference key. + * @returns {*} Returns the map data. + */ + function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) ? data[typeof key == 'string' ? 'string' : 'hash'] : data.map; + } + + /** + * Gets the property names, values, and compare flags of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the match data of `object`. + */ + function getMatchData(object) { + var result = keys(object), + length = result.length; + + while (length--) { + var key = result[length], + value = object[key]; + + result[length] = [key, value, isStrictComparable(value)]; + } + return result; + } + + /** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ + function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : undefined; + } + + /** + * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the raw `toStringTag`. + */ + function getRawTag(value) { + var isOwn = hasOwnProperty.call(value, symToStringTag), + tag = value[symToStringTag]; + + try { + value[symToStringTag] = undefined; + var unmasked = true; + } catch (e) {} + + var result = nativeObjectToString.call(value); + if (unmasked) { + if (isOwn) { + value[symToStringTag] = tag; + } else { + delete value[symToStringTag]; + } + } + return result; + } + + /** + * Creates an array of the own enumerable symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ + var getSymbols = !nativeGetSymbols + ? stubArray + : function (object) { + if (object == null) { + return []; + } + object = Object(object); + return arrayFilter(nativeGetSymbols(object), function (symbol) { + return propertyIsEnumerable.call(object, symbol); + }); + }; + + /** + * Creates an array of the own and inherited enumerable symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ + var getSymbolsIn = !nativeGetSymbols + ? stubArray + : function (object) { + var result = []; + while (object) { + arrayPush(result, getSymbols(object)); + object = getPrototype(object); + } + return result; + }; + + /** + * Gets the `toStringTag` of `value`. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ + var getTag = baseGetTag; + + // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6. + if ( + (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || + (Map && getTag(new Map()) != mapTag) || + (Promise && getTag(Promise.resolve()) != promiseTag) || + (Set && getTag(new Set()) != setTag) || + (WeakMap && getTag(new WeakMap()) != weakMapTag) + ) { + getTag = function (value) { + var result = baseGetTag(value), + Ctor = result == objectTag ? value.constructor : undefined, + ctorString = Ctor ? toSource(Ctor) : ''; + + if (ctorString) { + switch (ctorString) { + case dataViewCtorString: + return dataViewTag; + case mapCtorString: + return mapTag; + case promiseCtorString: + return promiseTag; + case setCtorString: + return setTag; + case weakMapCtorString: + return weakMapTag; + } + } + return result; + }; + } + + /** + * Gets the view, applying any `transforms` to the `start` and `end` positions. + * + * @private + * @param {number} start The start of the view. + * @param {number} end The end of the view. + * @param {Array} transforms The transformations to apply to the view. + * @returns {Object} Returns an object containing the `start` and `end` + * positions of the view. + */ + function getView(start, end, transforms) { + var index = -1, + length = transforms.length; + + while (++index < length) { + var data = transforms[index], + size = data.size; + + switch (data.type) { + case 'drop': + start += size; + break; + case 'dropRight': + end -= size; + break; + case 'take': + end = nativeMin(end, start + size); + break; + case 'takeRight': + start = nativeMax(start, end - size); + break; + } + } + return { start: start, end: end }; + } + + /** + * Extracts wrapper details from the `source` body comment. + * + * @private + * @param {string} source The source to inspect. + * @returns {Array} Returns the wrapper details. + */ + function getWrapDetails(source) { + var match = source.match(reWrapDetails); + return match ? match[1].split(reSplitDetails) : []; + } + + /** + * Checks if `path` exists on `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @param {Function} hasFunc The function to check properties. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + */ + function hasPath(object, path, hasFunc) { + path = castPath(path, object); + + var index = -1, + length = path.length, + result = false; + + while (++index < length) { + var key = toKey(path[index]); + if (!(result = object != null && hasFunc(object, key))) { + break; + } + object = object[key]; + } + if (result || ++index != length) { + return result; + } + length = object == null ? 0 : object.length; + return ( + !!length && + isLength(length) && + isIndex(key, length) && + (isArray(object) || isArguments(object)) + ); + } + + /** + * Initializes an array clone. + * + * @private + * @param {Array} array The array to clone. + * @returns {Array} Returns the initialized clone. + */ + function initCloneArray(array) { + var length = array.length, + result = new array.constructor(length); + + // Add properties assigned by `RegExp#exec`. + if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) { + result.index = array.index; + result.input = array.input; + } + return result; + } + + /** + * Initializes an object clone. + * + * @private + * @param {Object} object The object to clone. + * @returns {Object} Returns the initialized clone. + */ + function initCloneObject(object) { + return typeof object.constructor == 'function' && !isPrototype(object) + ? baseCreate(getPrototype(object)) + : {}; + } + + /** + * Initializes an object clone based on its `toStringTag`. + * + * **Note:** This function only supports cloning values with tags of + * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`. + * + * @private + * @param {Object} object The object to clone. + * @param {string} tag The `toStringTag` of the object to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the initialized clone. + */ + function initCloneByTag(object, tag, isDeep) { + var Ctor = object.constructor; + switch (tag) { + case arrayBufferTag: + return cloneArrayBuffer(object); + + case boolTag: + case dateTag: + return new Ctor(+object); + + case dataViewTag: + return cloneDataView(object, isDeep); + + case float32Tag: + case float64Tag: + case int8Tag: + case int16Tag: + case int32Tag: + case uint8Tag: + case uint8ClampedTag: + case uint16Tag: + case uint32Tag: + return cloneTypedArray(object, isDeep); + + case mapTag: + return new Ctor(); + + case numberTag: + case stringTag: + return new Ctor(object); + + case regexpTag: + return cloneRegExp(object); + + case setTag: + return new Ctor(); + + case symbolTag: + return cloneSymbol(object); + } + } + + /** + * Inserts wrapper `details` in a comment at the top of the `source` body. + * + * @private + * @param {string} source The source to modify. + * @returns {Array} details The details to insert. + * @returns {string} Returns the modified source. + */ + function insertWrapDetails(source, details) { + var length = details.length; + if (!length) { + return source; + } + var lastIndex = length - 1; + details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex]; + details = details.join(length > 2 ? ', ' : ' '); + return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n'); + } + + /** + * Checks if `value` is a flattenable `arguments` object or array. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. + */ + function isFlattenable(value) { + return ( + isArray(value) || + isArguments(value) || + !!(spreadableSymbol && value && value[spreadableSymbol]) + ); + } + + /** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ + function isIndex(value, length) { + var type = typeof value; + length = length == null ? MAX_SAFE_INTEGER : length; + + return ( + !!length && + (type == 'number' || (type != 'symbol' && reIsUint.test(value))) && + value > -1 && + value % 1 == 0 && + value < length + ); + } + + /** + * Checks if the given arguments are from an iteratee call. + * + * @private + * @param {*} value The potential iteratee value argument. + * @param {*} index The potential iteratee index or key argument. + * @param {*} object The potential iteratee object argument. + * @returns {boolean} Returns `true` if the arguments are from an iteratee call, + * else `false`. + */ + function isIterateeCall(value, index, object) { + if (!isObject(object)) { + return false; + } + var type = typeof index; + if ( + type == 'number' + ? isArrayLike(object) && isIndex(index, object.length) + : type == 'string' && index in object + ) { + return eq(object[index], value); + } + return false; + } + + /** + * Checks if `value` is a property name and not a property path. + * + * @private + * @param {*} value The value to check. + * @param {Object} [object] The object to query keys on. + * @returns {boolean} Returns `true` if `value` is a property name, else `false`. + */ + function isKey(value, object) { + if (isArray(value)) { + return false; + } + var type = typeof value; + if ( + type == 'number' || + type == 'symbol' || + type == 'boolean' || + value == null || + isSymbol(value) + ) { + return true; + } + return ( + reIsPlainProp.test(value) || + !reIsDeepProp.test(value) || + (object != null && value in Object(object)) + ); + } + + /** + * Checks if `value` is suitable for use as unique object key. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is suitable, else `false`. + */ + function isKeyable(value) { + var type = typeof value; + return type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean' + ? value !== '__proto__' + : value === null; + } + + /** + * Checks if `func` has a lazy counterpart. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` has a lazy counterpart, + * else `false`. + */ + function isLaziable(func) { + var funcName = getFuncName(func), + other = lodash[funcName]; + + if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) { + return false; + } + if (func === other) { + return true; + } + var data = getData(other); + return !!data && func === data[0]; + } + + /** + * Checks if `func` has its source masked. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` is masked, else `false`. + */ + function isMasked(func) { + return !!maskSrcKey && maskSrcKey in func; + } + + /** + * Checks if `func` is capable of being masked. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `func` is maskable, else `false`. + */ + var isMaskable = coreJsData ? isFunction : stubFalse; + + /** + * Checks if `value` is likely a prototype object. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. + */ + function isPrototype(value) { + var Ctor = value && value.constructor, + proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; + + return value === proto; + } + + /** + * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` if suitable for strict + * equality comparisons, else `false`. + */ + function isStrictComparable(value) { + return value === value && !isObject(value); + } + + /** + * A specialized version of `matchesProperty` for source values suitable + * for strict equality comparisons, i.e. `===`. + * + * @private + * @param {string} key The key of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + */ + function matchesStrictComparable(key, srcValue) { + return function (object) { + if (object == null) { + return false; + } + return object[key] === srcValue && (srcValue !== undefined || key in Object(object)); + }; + } + + /** + * A specialized version of `_.memoize` which clears the memoized function's + * cache when it exceeds `MAX_MEMOIZE_SIZE`. + * + * @private + * @param {Function} func The function to have its output memoized. + * @returns {Function} Returns the new memoized function. + */ + function memoizeCapped(func) { + var result = memoize(func, function (key) { + if (cache.size === MAX_MEMOIZE_SIZE) { + cache.clear(); + } + return key; + }); + + var cache = result.cache; + return result; + } + + /** + * Merges the function metadata of `source` into `data`. + * + * Merging metadata reduces the number of wrappers used to invoke a function. + * This is possible because methods like `_.bind`, `_.curry`, and `_.partial` + * may be applied regardless of execution order. Methods like `_.ary` and + * `_.rearg` modify function arguments, making the order in which they are + * executed important, preventing the merging of metadata. However, we make + * an exception for a safe combined case where curried functions have `_.ary` + * and or `_.rearg` applied. + * + * @private + * @param {Array} data The destination metadata. + * @param {Array} source The source metadata. + * @returns {Array} Returns `data`. + */ + function mergeData(data, source) { + var bitmask = data[1], + srcBitmask = source[1], + newBitmask = bitmask | srcBitmask, + isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG); + + var isCombo = + (srcBitmask == WRAP_ARY_FLAG && bitmask == WRAP_CURRY_FLAG) || + (srcBitmask == WRAP_ARY_FLAG && bitmask == WRAP_REARG_FLAG && data[7].length <= source[8]) || + (srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG) && + source[7].length <= source[8] && + bitmask == WRAP_CURRY_FLAG); + + // Exit early if metadata can't be merged. + if (!(isCommon || isCombo)) { + return data; + } + // Use source `thisArg` if available. + if (srcBitmask & WRAP_BIND_FLAG) { + data[2] = source[2]; + // Set when currying a bound function. + newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG; + } + // Compose partial arguments. + var value = source[3]; + if (value) { + var partials = data[3]; + data[3] = partials ? composeArgs(partials, value, source[4]) : value; + data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4]; + } + // Compose partial right arguments. + value = source[5]; + if (value) { + partials = data[5]; + data[5] = partials ? composeArgsRight(partials, value, source[6]) : value; + data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6]; + } + // Use source `argPos` if available. + value = source[7]; + if (value) { + data[7] = value; + } + // Use source `ary` if it's smaller. + if (srcBitmask & WRAP_ARY_FLAG) { + data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]); + } + // Use source `arity` if one is not provided. + if (data[9] == null) { + data[9] = source[9]; + } + // Use source `func` and merge bitmasks. + data[0] = source[0]; + data[1] = newBitmask; + + return data; + } + + /** + * This function is like + * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * except that it includes inherited enumerable properties. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + function nativeKeysIn(object) { + var result = []; + if (object != null) { + for (var key in Object(object)) { + result.push(key); + } + } + return result; + } + + /** + * Converts `value` to a string using `Object.prototype.toString`. + * + * @private + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + */ + function objectToString(value) { + return nativeObjectToString.call(value); + } + + /** + * A specialized version of `baseRest` which transforms the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @param {Function} transform The rest array transform. + * @returns {Function} Returns the new function. + */ + function overRest(func, start, transform) { + start = nativeMax(start === undefined ? func.length - 1 : start, 0); + return function () { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + array = Array(length); + + while (++index < length) { + array[index] = args[start + index]; + } + index = -1; + var otherArgs = Array(start + 1); + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = transform(array); + return apply(func, this, otherArgs); + }; + } + + /** + * Gets the parent value at `path` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} path The path to get the parent value of. + * @returns {*} Returns the parent value. + */ + function parent(object, path) { + return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1)); + } + + /** + * Reorder `array` according to the specified indexes where the element at + * the first index is assigned as the first element, the element at + * the second index is assigned as the second element, and so on. + * + * @private + * @param {Array} array The array to reorder. + * @param {Array} indexes The arranged array indexes. + * @returns {Array} Returns `array`. + */ + function reorder(array, indexes) { + var arrLength = array.length, + length = nativeMin(indexes.length, arrLength), + oldArray = copyArray(array); + + while (length--) { + var index = indexes[length]; + array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined; + } + return array; + } + + /** + * Gets the value at `key`, unless `key` is "__proto__" or "constructor". + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ + function safeGet(object, key) { + if (key === 'constructor' && typeof object[key] === 'function') { + return; + } + + if (key == '__proto__') { + return; + } + + return object[key]; + } + + /** + * Sets metadata for `func`. + * + * **Note:** If this function becomes hot, i.e. is invoked a lot in a short + * period of time, it will trip its breaker and transition to an identity + * function to avoid garbage collection pauses in V8. See + * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070) + * for more details. + * + * @private + * @param {Function} func The function to associate metadata with. + * @param {*} data The metadata. + * @returns {Function} Returns `func`. + */ + var setData = shortOut(baseSetData); + + /** + * A simple wrapper around the global [`setTimeout`](https://mdn.io/setTimeout). + * + * @private + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @returns {number|Object} Returns the timer id or timeout object. + */ + var setTimeout = + ctxSetTimeout || + function (func, wait) { + return root.setTimeout(func, wait); + }; + + /** + * Sets the `toString` method of `func` to return `string`. + * + * @private + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. + */ + var setToString = shortOut(baseSetToString); + + /** + * Sets the `toString` method of `wrapper` to mimic the source of `reference` + * with wrapper details in a comment at the top of the source body. + * + * @private + * @param {Function} wrapper The function to modify. + * @param {Function} reference The reference function. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @returns {Function} Returns `wrapper`. + */ + function setWrapToString(wrapper, reference, bitmask) { + var source = reference + ''; + return setToString( + wrapper, + insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)), + ); + } + + /** + * Creates a function that'll short out and invoke `identity` instead + * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN` + * milliseconds. + * + * @private + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new shortable function. + */ + function shortOut(func) { + var count = 0, + lastCalled = 0; + + return function () { + var stamp = nativeNow(), + remaining = HOT_SPAN - (stamp - lastCalled); + + lastCalled = stamp; + if (remaining > 0) { + if (++count >= HOT_COUNT) { + return arguments[0]; + } + } else { + count = 0; + } + return func.apply(undefined, arguments); + }; + } + + /** + * A specialized version of `_.shuffle` which mutates and sets the size of `array`. + * + * @private + * @param {Array} array The array to shuffle. + * @param {number} [size=array.length] The size of `array`. + * @returns {Array} Returns `array`. + */ + function shuffleSelf(array, size) { + var index = -1, + length = array.length, + lastIndex = length - 1; + + size = size === undefined ? length : size; + while (++index < size) { + var rand = baseRandom(index, lastIndex), + value = array[rand]; + + array[rand] = array[index]; + array[index] = value; + } + array.length = size; + return array; + } + + /** + * Converts `string` to a property path array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the property path array. + */ + var stringToPath = memoizeCapped(function (string) { + var result = []; + if (string.charCodeAt(0) === 46 /* . */) { + result.push(''); + } + string.replace(rePropName, function (match, number, quote, subString) { + result.push(quote ? subString.replace(reEscapeChar, '$1') : number || match); + }); + return result; + }); + + /** + * Converts `value` to a string key if it's not a string or symbol. + * + * @private + * @param {*} value The value to inspect. + * @returns {string|symbol} Returns the key. + */ + function toKey(value) { + if (typeof value == 'string' || isSymbol(value)) { + return value; + } + var result = value + ''; + return result == '0' && 1 / value == -INFINITY ? '-0' : result; + } + + /** + * Converts `func` to its source code. + * + * @private + * @param {Function} func The function to convert. + * @returns {string} Returns the source code. + */ + function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) {} + try { + return func + ''; + } catch (e) {} + } + return ''; + } + + /** + * Updates wrapper `details` based on `bitmask` flags. + * + * @private + * @returns {Array} details The details to modify. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @returns {Array} Returns `details`. + */ + function updateWrapDetails(details, bitmask) { + arrayEach(wrapFlags, function (pair) { + var value = '_.' + pair[0]; + if (bitmask & pair[1] && !arrayIncludes(details, value)) { + details.push(value); + } + }); + return details.sort(); + } + + /** + * Creates a clone of `wrapper`. + * + * @private + * @param {Object} wrapper The wrapper to clone. + * @returns {Object} Returns the cloned wrapper. + */ + function wrapperClone(wrapper) { + if (wrapper instanceof LazyWrapper) { + return wrapper.clone(); + } + var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__); + result.__actions__ = copyArray(wrapper.__actions__); + result.__index__ = wrapper.__index__; + result.__values__ = wrapper.__values__; + return result; + } + + /*------------------------------------------------------------------------*/ + + /** + * Creates an array of elements split into groups the length of `size`. + * If `array` can't be split evenly, the final chunk will be the remaining + * elements. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to process. + * @param {number} [size=1] The length of each chunk + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the new array of chunks. + * @example + * + * _.chunk(['a', 'b', 'c', 'd'], 2); + * // => [['a', 'b'], ['c', 'd']] + * + * _.chunk(['a', 'b', 'c', 'd'], 3); + * // => [['a', 'b', 'c'], ['d']] + */ + function chunk(array, size, guard) { + if (guard ? isIterateeCall(array, size, guard) : size === undefined) { + size = 1; + } else { + size = nativeMax(toInteger(size), 0); + } + var length = array == null ? 0 : array.length; + if (!length || size < 1) { + return []; + } + var index = 0, + resIndex = 0, + result = Array(nativeCeil(length / size)); + + while (index < length) { + result[resIndex++] = baseSlice(array, index, (index += size)); + } + return result; + } + + /** + * Creates an array with all falsey values removed. The values `false`, `null`, + * `0`, `""`, `undefined`, and `NaN` are falsey. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to compact. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.compact([0, 1, false, 2, '', 3]); + * // => [1, 2, 3] + */ + function compact(array) { + var index = -1, + length = array == null ? 0 : array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (value) { + result[resIndex++] = value; + } + } + return result; + } + + /** + * Creates a new array concatenating `array` with any additional arrays + * and/or values. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to concatenate. + * @param {...*} [values] The values to concatenate. + * @returns {Array} Returns the new concatenated array. + * @example + * + * var array = [1]; + * var other = _.concat(array, 2, [3], [[4]]); + * + * console.log(other); + * // => [1, 2, 3, [4]] + * + * console.log(array); + * // => [1] + */ + function concat() { + var length = arguments.length; + if (!length) { + return []; + } + var args = Array(length - 1), + array = arguments[0], + index = length; + + while (index--) { + args[index - 1] = arguments[index]; + } + return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1)); + } + + /** + * Creates an array of `array` values not included in the other given arrays + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. The order and references of result values are + * determined by the first array. + * + * **Note:** Unlike `_.pullAll`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The values to exclude. + * @returns {Array} Returns the new array of filtered values. + * @see _.without, _.xor + * @example + * + * _.difference([2, 1], [2, 3]); + * // => [1] + */ + var difference = baseRest(function (array, values) { + return isArrayLikeObject(array) + ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true)) + : []; + }); + + /** + * This method is like `_.difference` except that it accepts `iteratee` which + * is invoked for each element of `array` and `values` to generate the criterion + * by which they're compared. The order and references of result values are + * determined by the first array. The iteratee is invoked with one argument: + * (value). + * + * **Note:** Unlike `_.pullAllBy`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The values to exclude. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor); + * // => [1.2] + * + * // The `_.property` iteratee shorthand. + * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x'); + * // => [{ 'x': 2 }] + */ + var differenceBy = baseRest(function (array, values) { + var iteratee = last(values); + if (isArrayLikeObject(iteratee)) { + iteratee = undefined; + } + return isArrayLikeObject(array) + ? baseDifference( + array, + baseFlatten(values, 1, isArrayLikeObject, true), + getIteratee(iteratee, 2), + ) + : []; + }); + + /** + * This method is like `_.difference` except that it accepts `comparator` + * which is invoked to compare elements of `array` to `values`. The order and + * references of result values are determined by the first array. The comparator + * is invoked with two arguments: (arrVal, othVal). + * + * **Note:** Unlike `_.pullAllWith`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The values to exclude. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * + * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual); + * // => [{ 'x': 2, 'y': 1 }] + */ + var differenceWith = baseRest(function (array, values) { + var comparator = last(values); + if (isArrayLikeObject(comparator)) { + comparator = undefined; + } + return isArrayLikeObject(array) + ? baseDifference( + array, + baseFlatten(values, 1, isArrayLikeObject, true), + undefined, + comparator, + ) + : []; + }); + + /** + * Creates a slice of `array` with `n` elements dropped from the beginning. + * + * @static + * @memberOf _ + * @since 0.5.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to drop. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.drop([1, 2, 3]); + * // => [2, 3] + * + * _.drop([1, 2, 3], 2); + * // => [3] + * + * _.drop([1, 2, 3], 5); + * // => [] + * + * _.drop([1, 2, 3], 0); + * // => [1, 2, 3] + */ + function drop(array, n, guard) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + n = guard || n === undefined ? 1 : toInteger(n); + return baseSlice(array, n < 0 ? 0 : n, length); + } + + /** + * Creates a slice of `array` with `n` elements dropped from the end. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to drop. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.dropRight([1, 2, 3]); + * // => [1, 2] + * + * _.dropRight([1, 2, 3], 2); + * // => [1] + * + * _.dropRight([1, 2, 3], 5); + * // => [] + * + * _.dropRight([1, 2, 3], 0); + * // => [1, 2, 3] + */ + function dropRight(array, n, guard) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + n = guard || n === undefined ? 1 : toInteger(n); + n = length - n; + return baseSlice(array, 0, n < 0 ? 0 : n); + } + + /** + * Creates a slice of `array` excluding elements dropped from the end. + * Elements are dropped until `predicate` returns falsey. The predicate is + * invoked with three arguments: (value, index, array). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * _.dropRightWhile(users, function(o) { return !o.active; }); + * // => objects for ['barney'] + * + * // The `_.matches` iteratee shorthand. + * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false }); + * // => objects for ['barney', 'fred'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.dropRightWhile(users, ['active', false]); + * // => objects for ['barney'] + * + * // The `_.property` iteratee shorthand. + * _.dropRightWhile(users, 'active'); + * // => objects for ['barney', 'fred', 'pebbles'] + */ + function dropRightWhile(array, predicate) { + return array && array.length ? baseWhile(array, getIteratee(predicate, 3), true, true) : []; + } + + /** + * Creates a slice of `array` excluding elements dropped from the beginning. + * Elements are dropped until `predicate` returns falsey. The predicate is + * invoked with three arguments: (value, index, array). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.dropWhile(users, function(o) { return !o.active; }); + * // => objects for ['pebbles'] + * + * // The `_.matches` iteratee shorthand. + * _.dropWhile(users, { 'user': 'barney', 'active': false }); + * // => objects for ['fred', 'pebbles'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.dropWhile(users, ['active', false]); + * // => objects for ['pebbles'] + * + * // The `_.property` iteratee shorthand. + * _.dropWhile(users, 'active'); + * // => objects for ['barney', 'fred', 'pebbles'] + */ + function dropWhile(array, predicate) { + return array && array.length ? baseWhile(array, getIteratee(predicate, 3), true) : []; + } + + /** + * Fills elements of `array` with `value` from `start` up to, but not + * including, `end`. + * + * **Note:** This method mutates `array`. + * + * @static + * @memberOf _ + * @since 3.2.0 + * @category Array + * @param {Array} array The array to fill. + * @param {*} value The value to fill `array` with. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns `array`. + * @example + * + * var array = [1, 2, 3]; + * + * _.fill(array, 'a'); + * console.log(array); + * // => ['a', 'a', 'a'] + * + * _.fill(Array(3), 2); + * // => [2, 2, 2] + * + * _.fill([4, 6, 8, 10], '*', 1, 3); + * // => [4, '*', '*', 10] + */ + function fill(array, value, start, end) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + if (start && typeof start != 'number' && isIterateeCall(array, value, start)) { + start = 0; + end = length; + } + return baseFill(array, value, start, end); + } + + /** + * This method is like `_.find` except that it returns the index of the first + * element `predicate` returns truthy for instead of the element itself. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.findIndex(users, function(o) { return o.user == 'barney'; }); + * // => 0 + * + * // The `_.matches` iteratee shorthand. + * _.findIndex(users, { 'user': 'fred', 'active': false }); + * // => 1 + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findIndex(users, ['active', false]); + * // => 0 + * + * // The `_.property` iteratee shorthand. + * _.findIndex(users, 'active'); + * // => 2 + */ + function findIndex(array, predicate, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = fromIndex == null ? 0 : toInteger(fromIndex); + if (index < 0) { + index = nativeMax(length + index, 0); + } + return baseFindIndex(array, getIteratee(predicate, 3), index); + } + + /** + * This method is like `_.findIndex` except that it iterates over elements + * of `collection` from right to left. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=array.length-1] The index to search from. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; }); + * // => 2 + * + * // The `_.matches` iteratee shorthand. + * _.findLastIndex(users, { 'user': 'barney', 'active': true }); + * // => 0 + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findLastIndex(users, ['active', false]); + * // => 2 + * + * // The `_.property` iteratee shorthand. + * _.findLastIndex(users, 'active'); + * // => 0 + */ + function findLastIndex(array, predicate, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = length - 1; + if (fromIndex !== undefined) { + index = toInteger(fromIndex); + index = fromIndex < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1); + } + return baseFindIndex(array, getIteratee(predicate, 3), index, true); + } + + /** + * Flattens `array` a single level deep. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to flatten. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flatten([1, [2, [3, [4]], 5]]); + * // => [1, 2, [3, [4]], 5] + */ + function flatten(array) { + var length = array == null ? 0 : array.length; + return length ? baseFlatten(array, 1) : []; + } + + /** + * Recursively flattens `array`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to flatten. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flattenDeep([1, [2, [3, [4]], 5]]); + * // => [1, 2, 3, 4, 5] + */ + function flattenDeep(array) { + var length = array == null ? 0 : array.length; + return length ? baseFlatten(array, INFINITY) : []; + } + + /** + * Recursively flatten `array` up to `depth` times. + * + * @static + * @memberOf _ + * @since 4.4.0 + * @category Array + * @param {Array} array The array to flatten. + * @param {number} [depth=1] The maximum recursion depth. + * @returns {Array} Returns the new flattened array. + * @example + * + * var array = [1, [2, [3, [4]], 5]]; + * + * _.flattenDepth(array, 1); + * // => [1, 2, [3, [4]], 5] + * + * _.flattenDepth(array, 2); + * // => [1, 2, 3, [4], 5] + */ + function flattenDepth(array, depth) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + depth = depth === undefined ? 1 : toInteger(depth); + return baseFlatten(array, depth); + } + + /** + * The inverse of `_.toPairs`; this method returns an object composed + * from key-value `pairs`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} pairs The key-value pairs. + * @returns {Object} Returns the new object. + * @example + * + * _.fromPairs([['a', 1], ['b', 2]]); + * // => { 'a': 1, 'b': 2 } + */ + function fromPairs(pairs) { + var index = -1, + length = pairs == null ? 0 : pairs.length, + result = {}; + + while (++index < length) { + var pair = pairs[index]; + result[pair[0]] = pair[1]; + } + return result; + } + + /** + * Gets the first element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @alias first + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the first element of `array`. + * @example + * + * _.head([1, 2, 3]); + * // => 1 + * + * _.head([]); + * // => undefined + */ + function head(array) { + return array && array.length ? array[0] : undefined; + } + + /** + * Gets the index at which the first occurrence of `value` is found in `array` + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. If `fromIndex` is negative, it's used as the + * offset from the end of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.indexOf([1, 2, 1, 2], 2); + * // => 1 + * + * // Search from the `fromIndex`. + * _.indexOf([1, 2, 1, 2], 2, 2); + * // => 3 + */ + function indexOf(array, value, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = fromIndex == null ? 0 : toInteger(fromIndex); + if (index < 0) { + index = nativeMax(length + index, 0); + } + return baseIndexOf(array, value, index); + } + + /** + * Gets all but the last element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.initial([1, 2, 3]); + * // => [1, 2] + */ + function initial(array) { + var length = array == null ? 0 : array.length; + return length ? baseSlice(array, 0, -1) : []; + } + + /** + * Creates an array of unique values that are included in all given arrays + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. The order and references of result values are + * determined by the first array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of intersecting values. + * @example + * + * _.intersection([2, 1], [2, 3]); + * // => [2] + */ + var intersection = baseRest(function (arrays) { + var mapped = arrayMap(arrays, castArrayLikeObject); + return mapped.length && mapped[0] === arrays[0] ? baseIntersection(mapped) : []; + }); + + /** + * This method is like `_.intersection` except that it accepts `iteratee` + * which is invoked for each element of each `arrays` to generate the criterion + * by which they're compared. The order and references of result values are + * determined by the first array. The iteratee is invoked with one argument: + * (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of intersecting values. + * @example + * + * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor); + * // => [2.1] + * + * // The `_.property` iteratee shorthand. + * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }] + */ + var intersectionBy = baseRest(function (arrays) { + var iteratee = last(arrays), + mapped = arrayMap(arrays, castArrayLikeObject); + + if (iteratee === last(mapped)) { + iteratee = undefined; + } else { + mapped.pop(); + } + return mapped.length && mapped[0] === arrays[0] + ? baseIntersection(mapped, getIteratee(iteratee, 2)) + : []; + }); + + /** + * This method is like `_.intersection` except that it accepts `comparator` + * which is invoked to compare elements of `arrays`. The order and references + * of result values are determined by the first array. The comparator is + * invoked with two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of intersecting values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.intersectionWith(objects, others, _.isEqual); + * // => [{ 'x': 1, 'y': 2 }] + */ + var intersectionWith = baseRest(function (arrays) { + var comparator = last(arrays), + mapped = arrayMap(arrays, castArrayLikeObject); + + comparator = typeof comparator == 'function' ? comparator : undefined; + if (comparator) { + mapped.pop(); + } + return mapped.length && mapped[0] === arrays[0] + ? baseIntersection(mapped, undefined, comparator) + : []; + }); + + /** + * Converts all elements in `array` into a string separated by `separator`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to convert. + * @param {string} [separator=','] The element separator. + * @returns {string} Returns the joined string. + * @example + * + * _.join(['a', 'b', 'c'], '~'); + * // => 'a~b~c' + */ + function join(array, separator) { + return array == null ? '' : nativeJoin.call(array, separator); + } + + /** + * Gets the last element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the last element of `array`. + * @example + * + * _.last([1, 2, 3]); + * // => 3 + */ + function last(array) { + var length = array == null ? 0 : array.length; + return length ? array[length - 1] : undefined; + } + + /** + * This method is like `_.indexOf` except that it iterates over elements of + * `array` from right to left. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} [fromIndex=array.length-1] The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.lastIndexOf([1, 2, 1, 2], 2); + * // => 3 + * + * // Search from the `fromIndex`. + * _.lastIndexOf([1, 2, 1, 2], 2, 2); + * // => 1 + */ + function lastIndexOf(array, value, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = length; + if (fromIndex !== undefined) { + index = toInteger(fromIndex); + index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1); + } + return value === value + ? strictLastIndexOf(array, value, index) + : baseFindIndex(array, baseIsNaN, index, true); + } + + /** + * Gets the element at index `n` of `array`. If `n` is negative, the nth + * element from the end is returned. + * + * @static + * @memberOf _ + * @since 4.11.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=0] The index of the element to return. + * @returns {*} Returns the nth element of `array`. + * @example + * + * var array = ['a', 'b', 'c', 'd']; + * + * _.nth(array, 1); + * // => 'b' + * + * _.nth(array, -2); + * // => 'c'; + */ + function nth(array, n) { + return array && array.length ? baseNth(array, toInteger(n)) : undefined; + } + + /** + * Removes all given values from `array` using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove` + * to remove elements from an array by predicate. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {...*} [values] The values to remove. + * @returns {Array} Returns `array`. + * @example + * + * var array = ['a', 'b', 'c', 'a', 'b', 'c']; + * + * _.pull(array, 'a', 'c'); + * console.log(array); + * // => ['b', 'b'] + */ + var pull = baseRest(pullAll); + + /** + * This method is like `_.pull` except that it accepts an array of values to remove. + * + * **Note:** Unlike `_.difference`, this method mutates `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @returns {Array} Returns `array`. + * @example + * + * var array = ['a', 'b', 'c', 'a', 'b', 'c']; + * + * _.pullAll(array, ['a', 'c']); + * console.log(array); + * // => ['b', 'b'] + */ + function pullAll(array, values) { + return array && array.length && values && values.length ? basePullAll(array, values) : array; + } + + /** + * This method is like `_.pullAll` except that it accepts `iteratee` which is + * invoked for each element of `array` and `values` to generate the criterion + * by which they're compared. The iteratee is invoked with one argument: (value). + * + * **Note:** Unlike `_.differenceBy`, this method mutates `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns `array`. + * @example + * + * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }]; + * + * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x'); + * console.log(array); + * // => [{ 'x': 2 }] + */ + function pullAllBy(array, values, iteratee) { + return array && array.length && values && values.length + ? basePullAll(array, values, getIteratee(iteratee, 2)) + : array; + } + + /** + * This method is like `_.pullAll` except that it accepts `comparator` which + * is invoked to compare elements of `array` to `values`. The comparator is + * invoked with two arguments: (arrVal, othVal). + * + * **Note:** Unlike `_.differenceWith`, this method mutates `array`. + * + * @static + * @memberOf _ + * @since 4.6.0 + * @category Array + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns `array`. + * @example + * + * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }]; + * + * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual); + * console.log(array); + * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }] + */ + function pullAllWith(array, values, comparator) { + return array && array.length && values && values.length + ? basePullAll(array, values, undefined, comparator) + : array; + } + + /** + * Removes elements from `array` corresponding to `indexes` and returns an + * array of removed elements. + * + * **Note:** Unlike `_.at`, this method mutates `array`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {...(number|number[])} [indexes] The indexes of elements to remove. + * @returns {Array} Returns the new array of removed elements. + * @example + * + * var array = ['a', 'b', 'c', 'd']; + * var pulled = _.pullAt(array, [1, 3]); + * + * console.log(array); + * // => ['a', 'c'] + * + * console.log(pulled); + * // => ['b', 'd'] + */ + var pullAt = flatRest(function (array, indexes) { + var length = array == null ? 0 : array.length, + result = baseAt(array, indexes); + + basePullAt( + array, + arrayMap(indexes, function (index) { + return isIndex(index, length) ? +index : index; + }).sort(compareAscending), + ); + + return result; + }); + + /** + * Removes all elements from `array` that `predicate` returns truthy for + * and returns an array of the removed elements. The predicate is invoked + * with three arguments: (value, index, array). + * + * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull` + * to pull elements from an array by value. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new array of removed elements. + * @example + * + * var array = [1, 2, 3, 4]; + * var evens = _.remove(array, function(n) { + * return n % 2 == 0; + * }); + * + * console.log(array); + * // => [1, 3] + * + * console.log(evens); + * // => [2, 4] + */ + function remove(array, predicate) { + var result = []; + if (!(array && array.length)) { + return result; + } + var index = -1, + indexes = [], + length = array.length; + + predicate = getIteratee(predicate, 3); + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result.push(value); + indexes.push(index); + } + } + basePullAt(array, indexes); + return result; + } + + /** + * Reverses `array` so that the first element becomes the last, the second + * element becomes the second to last, and so on. + * + * **Note:** This method mutates `array` and is based on + * [`Array#reverse`](https://mdn.io/Array/reverse). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to modify. + * @returns {Array} Returns `array`. + * @example + * + * var array = [1, 2, 3]; + * + * _.reverse(array); + * // => [3, 2, 1] + * + * console.log(array); + * // => [3, 2, 1] + */ + function reverse(array) { + return array == null ? array : nativeReverse.call(array); + } + + /** + * Creates a slice of `array` from `start` up to, but not including, `end`. + * + * **Note:** This method is used instead of + * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are + * returned. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to slice. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the slice of `array`. + */ + function slice(array, start, end) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + if (end && typeof end != 'number' && isIterateeCall(array, start, end)) { + start = 0; + end = length; + } else { + start = start == null ? 0 : toInteger(start); + end = end === undefined ? length : toInteger(end); + } + return baseSlice(array, start, end); + } + + /** + * Uses a binary search to determine the lowest index at which `value` + * should be inserted into `array` in order to maintain its sort order. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * _.sortedIndex([30, 50], 40); + * // => 1 + */ + function sortedIndex(array, value) { + return baseSortedIndex(array, value); + } + + /** + * This method is like `_.sortedIndex` except that it accepts `iteratee` + * which is invoked for `value` and each element of `array` to compute their + * sort ranking. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * var objects = [{ 'x': 4 }, { 'x': 5 }]; + * + * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; }); + * // => 0 + * + * // The `_.property` iteratee shorthand. + * _.sortedIndexBy(objects, { 'x': 4 }, 'x'); + * // => 0 + */ + function sortedIndexBy(array, value, iteratee) { + return baseSortedIndexBy(array, value, getIteratee(iteratee, 2)); + } + + /** + * This method is like `_.indexOf` except that it performs a binary + * search on a sorted `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.sortedIndexOf([4, 5, 5, 5, 6], 5); + * // => 1 + */ + function sortedIndexOf(array, value) { + var length = array == null ? 0 : array.length; + if (length) { + var index = baseSortedIndex(array, value); + if (index < length && eq(array[index], value)) { + return index; + } + } + return -1; + } + + /** + * This method is like `_.sortedIndex` except that it returns the highest + * index at which `value` should be inserted into `array` in order to + * maintain its sort order. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * _.sortedLastIndex([4, 5, 5, 5, 6], 5); + * // => 4 + */ + function sortedLastIndex(array, value) { + return baseSortedIndex(array, value, true); + } + + /** + * This method is like `_.sortedLastIndex` except that it accepts `iteratee` + * which is invoked for `value` and each element of `array` to compute their + * sort ranking. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * var objects = [{ 'x': 4 }, { 'x': 5 }]; + * + * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; }); + * // => 1 + * + * // The `_.property` iteratee shorthand. + * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x'); + * // => 1 + */ + function sortedLastIndexBy(array, value, iteratee) { + return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true); + } + + /** + * This method is like `_.lastIndexOf` except that it performs a binary + * search on a sorted `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5); + * // => 3 + */ + function sortedLastIndexOf(array, value) { + var length = array == null ? 0 : array.length; + if (length) { + var index = baseSortedIndex(array, value, true) - 1; + if (eq(array[index], value)) { + return index; + } + } + return -1; + } + + /** + * This method is like `_.uniq` except that it's designed and optimized + * for sorted arrays. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.sortedUniq([1, 1, 2]); + * // => [1, 2] + */ + function sortedUniq(array) { + return array && array.length ? baseSortedUniq(array) : []; + } + + /** + * This method is like `_.uniqBy` except that it's designed and optimized + * for sorted arrays. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor); + * // => [1.1, 2.3] + */ + function sortedUniqBy(array, iteratee) { + return array && array.length ? baseSortedUniq(array, getIteratee(iteratee, 2)) : []; + } + + /** + * Gets all but the first element of `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to query. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.tail([1, 2, 3]); + * // => [2, 3] + */ + function tail(array) { + var length = array == null ? 0 : array.length; + return length ? baseSlice(array, 1, length) : []; + } + + /** + * Creates a slice of `array` with `n` elements taken from the beginning. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to take. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.take([1, 2, 3]); + * // => [1] + * + * _.take([1, 2, 3], 2); + * // => [1, 2] + * + * _.take([1, 2, 3], 5); + * // => [1, 2, 3] + * + * _.take([1, 2, 3], 0); + * // => [] + */ + function take(array, n, guard) { + if (!(array && array.length)) { + return []; + } + n = guard || n === undefined ? 1 : toInteger(n); + return baseSlice(array, 0, n < 0 ? 0 : n); + } + + /** + * Creates a slice of `array` with `n` elements taken from the end. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to take. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.takeRight([1, 2, 3]); + * // => [3] + * + * _.takeRight([1, 2, 3], 2); + * // => [2, 3] + * + * _.takeRight([1, 2, 3], 5); + * // => [1, 2, 3] + * + * _.takeRight([1, 2, 3], 0); + * // => [] + */ + function takeRight(array, n, guard) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + n = guard || n === undefined ? 1 : toInteger(n); + n = length - n; + return baseSlice(array, n < 0 ? 0 : n, length); + } + + /** + * Creates a slice of `array` with elements taken from the end. Elements are + * taken until `predicate` returns falsey. The predicate is invoked with + * three arguments: (value, index, array). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * _.takeRightWhile(users, function(o) { return !o.active; }); + * // => objects for ['fred', 'pebbles'] + * + * // The `_.matches` iteratee shorthand. + * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false }); + * // => objects for ['pebbles'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.takeRightWhile(users, ['active', false]); + * // => objects for ['fred', 'pebbles'] + * + * // The `_.property` iteratee shorthand. + * _.takeRightWhile(users, 'active'); + * // => [] + */ + function takeRightWhile(array, predicate) { + return array && array.length ? baseWhile(array, getIteratee(predicate, 3), false, true) : []; + } + + /** + * Creates a slice of `array` with elements taken from the beginning. Elements + * are taken until `predicate` returns falsey. The predicate is invoked with + * three arguments: (value, index, array). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.takeWhile(users, function(o) { return !o.active; }); + * // => objects for ['barney', 'fred'] + * + * // The `_.matches` iteratee shorthand. + * _.takeWhile(users, { 'user': 'barney', 'active': false }); + * // => objects for ['barney'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.takeWhile(users, ['active', false]); + * // => objects for ['barney', 'fred'] + * + * // The `_.property` iteratee shorthand. + * _.takeWhile(users, 'active'); + * // => [] + */ + function takeWhile(array, predicate) { + return array && array.length ? baseWhile(array, getIteratee(predicate, 3)) : []; + } + + /** + * Creates an array of unique values, in order, from all given arrays using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of combined values. + * @example + * + * _.union([2], [1, 2]); + * // => [2, 1] + */ + var union = baseRest(function (arrays) { + return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true)); + }); + + /** + * This method is like `_.union` except that it accepts `iteratee` which is + * invoked for each element of each `arrays` to generate the criterion by + * which uniqueness is computed. Result values are chosen from the first + * array in which the value occurs. The iteratee is invoked with one argument: + * (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of combined values. + * @example + * + * _.unionBy([2.1], [1.2, 2.3], Math.floor); + * // => [2.1, 1.2] + * + * // The `_.property` iteratee shorthand. + * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }, { 'x': 2 }] + */ + var unionBy = baseRest(function (arrays) { + var iteratee = last(arrays); + if (isArrayLikeObject(iteratee)) { + iteratee = undefined; + } + return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2)); + }); + + /** + * This method is like `_.union` except that it accepts `comparator` which + * is invoked to compare elements of `arrays`. Result values are chosen from + * the first array in which the value occurs. The comparator is invoked + * with two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of combined values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.unionWith(objects, others, _.isEqual); + * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }] + */ + var unionWith = baseRest(function (arrays) { + var comparator = last(arrays); + comparator = typeof comparator == 'function' ? comparator : undefined; + return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator); + }); + + /** + * Creates a duplicate-free version of an array, using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons, in which only the first occurrence of each element + * is kept. The order of result values is determined by the order they occur + * in the array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.uniq([2, 1, 2]); + * // => [2, 1] + */ + function uniq(array) { + return array && array.length ? baseUniq(array) : []; + } + + /** + * This method is like `_.uniq` except that it accepts `iteratee` which is + * invoked for each element in `array` to generate the criterion by which + * uniqueness is computed. The order of result values is determined by the + * order they occur in the array. The iteratee is invoked with one argument: + * (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.uniqBy([2.1, 1.2, 2.3], Math.floor); + * // => [2.1, 1.2] + * + * // The `_.property` iteratee shorthand. + * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }, { 'x': 2 }] + */ + function uniqBy(array, iteratee) { + return array && array.length ? baseUniq(array, getIteratee(iteratee, 2)) : []; + } + + /** + * This method is like `_.uniq` except that it accepts `comparator` which + * is invoked to compare elements of `array`. The order of result values is + * determined by the order they occur in the array.The comparator is invoked + * with two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.uniqWith(objects, _.isEqual); + * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }] + */ + function uniqWith(array, comparator) { + comparator = typeof comparator == 'function' ? comparator : undefined; + return array && array.length ? baseUniq(array, undefined, comparator) : []; + } + + /** + * This method is like `_.zip` except that it accepts an array of grouped + * elements and creates an array regrouping the elements to their pre-zip + * configuration. + * + * @static + * @memberOf _ + * @since 1.2.0 + * @category Array + * @param {Array} array The array of grouped elements to process. + * @returns {Array} Returns the new array of regrouped elements. + * @example + * + * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]); + * // => [['a', 1, true], ['b', 2, false]] + * + * _.unzip(zipped); + * // => [['a', 'b'], [1, 2], [true, false]] + */ + function unzip(array) { + if (!(array && array.length)) { + return []; + } + var length = 0; + array = arrayFilter(array, function (group) { + if (isArrayLikeObject(group)) { + length = nativeMax(group.length, length); + return true; + } + }); + return baseTimes(length, function (index) { + return arrayMap(array, baseProperty(index)); + }); + } + + /** + * This method is like `_.unzip` except that it accepts `iteratee` to specify + * how regrouped values should be combined. The iteratee is invoked with the + * elements of each group: (...group). + * + * @static + * @memberOf _ + * @since 3.8.0 + * @category Array + * @param {Array} array The array of grouped elements to process. + * @param {Function} [iteratee=_.identity] The function to combine + * regrouped values. + * @returns {Array} Returns the new array of regrouped elements. + * @example + * + * var zipped = _.zip([1, 2], [10, 20], [100, 200]); + * // => [[1, 10, 100], [2, 20, 200]] + * + * _.unzipWith(zipped, _.add); + * // => [3, 30, 300] + */ + function unzipWith(array, iteratee) { + if (!(array && array.length)) { + return []; + } + var result = unzip(array); + if (iteratee == null) { + return result; + } + return arrayMap(result, function (group) { + return apply(iteratee, undefined, group); + }); + } + + /** + * Creates an array excluding all given values using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * **Note:** Unlike `_.pull`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...*} [values] The values to exclude. + * @returns {Array} Returns the new array of filtered values. + * @see _.difference, _.xor + * @example + * + * _.without([2, 1, 2, 3], 1, 2); + * // => [3] + */ + var without = baseRest(function (array, values) { + return isArrayLikeObject(array) ? baseDifference(array, values) : []; + }); + + /** + * Creates an array of unique values that is the + * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference) + * of the given arrays. The order of result values is determined by the order + * they occur in the arrays. + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of filtered values. + * @see _.difference, _.without + * @example + * + * _.xor([2, 1], [2, 3]); + * // => [1, 3] + */ + var xor = baseRest(function (arrays) { + return baseXor(arrayFilter(arrays, isArrayLikeObject)); + }); + + /** + * This method is like `_.xor` except that it accepts `iteratee` which is + * invoked for each element of each `arrays` to generate the criterion by + * which by which they're compared. The order of result values is determined + * by the order they occur in the arrays. The iteratee is invoked with one + * argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor); + * // => [1.2, 3.4] + * + * // The `_.property` iteratee shorthand. + * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 2 }] + */ + var xorBy = baseRest(function (arrays) { + var iteratee = last(arrays); + if (isArrayLikeObject(iteratee)) { + iteratee = undefined; + } + return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2)); + }); + + /** + * This method is like `_.xor` except that it accepts `comparator` which is + * invoked to compare elements of `arrays`. The order of result values is + * determined by the order they occur in the arrays. The comparator is invoked + * with two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.xorWith(objects, others, _.isEqual); + * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }] + */ + var xorWith = baseRest(function (arrays) { + var comparator = last(arrays); + comparator = typeof comparator == 'function' ? comparator : undefined; + return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator); + }); + + /** + * Creates an array of grouped elements, the first of which contains the + * first elements of the given arrays, the second of which contains the + * second elements of the given arrays, and so on. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {...Array} [arrays] The arrays to process. + * @returns {Array} Returns the new array of grouped elements. + * @example + * + * _.zip(['a', 'b'], [1, 2], [true, false]); + * // => [['a', 1, true], ['b', 2, false]] + */ + var zip = baseRest(unzip); + + /** + * This method is like `_.fromPairs` except that it accepts two arrays, + * one of property identifiers and one of corresponding values. + * + * @static + * @memberOf _ + * @since 0.4.0 + * @category Array + * @param {Array} [props=[]] The property identifiers. + * @param {Array} [values=[]] The property values. + * @returns {Object} Returns the new object. + * @example + * + * _.zipObject(['a', 'b'], [1, 2]); + * // => { 'a': 1, 'b': 2 } + */ + function zipObject(props, values) { + return baseZipObject(props || [], values || [], assignValue); + } + + /** + * This method is like `_.zipObject` except that it supports property paths. + * + * @static + * @memberOf _ + * @since 4.1.0 + * @category Array + * @param {Array} [props=[]] The property identifiers. + * @param {Array} [values=[]] The property values. + * @returns {Object} Returns the new object. + * @example + * + * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]); + * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } } + */ + function zipObjectDeep(props, values) { + return baseZipObject(props || [], values || [], baseSet); + } + + /** + * This method is like `_.zip` except that it accepts `iteratee` to specify + * how grouped values should be combined. The iteratee is invoked with the + * elements of each group: (...group). + * + * @static + * @memberOf _ + * @since 3.8.0 + * @category Array + * @param {...Array} [arrays] The arrays to process. + * @param {Function} [iteratee=_.identity] The function to combine + * grouped values. + * @returns {Array} Returns the new array of grouped elements. + * @example + * + * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) { + * return a + b + c; + * }); + * // => [111, 222] + */ + var zipWith = baseRest(function (arrays) { + var length = arrays.length, + iteratee = length > 1 ? arrays[length - 1] : undefined; + + iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined; + return unzipWith(arrays, iteratee); + }); + + /*------------------------------------------------------------------------*/ + + /** + * Creates a `lodash` wrapper instance that wraps `value` with explicit method + * chain sequences enabled. The result of such sequences must be unwrapped + * with `_#value`. + * + * @static + * @memberOf _ + * @since 1.3.0 + * @category Seq + * @param {*} value The value to wrap. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 }, + * { 'user': 'pebbles', 'age': 1 } + * ]; + * + * var youngest = _ + * .chain(users) + * .sortBy('age') + * .map(function(o) { + * return o.user + ' is ' + o.age; + * }) + * .head() + * .value(); + * // => 'pebbles is 1' + */ + function chain(value) { + var result = lodash(value); + result.__chain__ = true; + return result; + } + + /** + * This method invokes `interceptor` and returns `value`. The interceptor + * is invoked with one argument; (value). The purpose of this method is to + * "tap into" a method chain sequence in order to modify intermediate results. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Seq + * @param {*} value The value to provide to `interceptor`. + * @param {Function} interceptor The function to invoke. + * @returns {*} Returns `value`. + * @example + * + * _([1, 2, 3]) + * .tap(function(array) { + * // Mutate input array. + * array.pop(); + * }) + * .reverse() + * .value(); + * // => [2, 1] + */ + function tap(value, interceptor) { + interceptor(value); + return value; + } + + /** + * This method is like `_.tap` except that it returns the result of `interceptor`. + * The purpose of this method is to "pass thru" values replacing intermediate + * results in a method chain sequence. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Seq + * @param {*} value The value to provide to `interceptor`. + * @param {Function} interceptor The function to invoke. + * @returns {*} Returns the result of `interceptor`. + * @example + * + * _(' abc ') + * .chain() + * .trim() + * .thru(function(value) { + * return [value]; + * }) + * .value(); + * // => ['abc'] + */ + function thru(value, interceptor) { + return interceptor(value); + } + + /** + * This method is the wrapper version of `_.at`. + * + * @name at + * @memberOf _ + * @since 1.0.0 + * @category Seq + * @param {...(string|string[])} [paths] The property paths to pick. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] }; + * + * _(object).at(['a[0].b.c', 'a[1]']).value(); + * // => [3, 4] + */ + var wrapperAt = flatRest(function (paths) { + var length = paths.length, + start = length ? paths[0] : 0, + value = this.__wrapped__, + interceptor = function (object) { + return baseAt(object, paths); + }; + + if ( + length > 1 || + this.__actions__.length || + !(value instanceof LazyWrapper) || + !isIndex(start) + ) { + return this.thru(interceptor); + } + value = value.slice(start, +start + (length ? 1 : 0)); + value.__actions__.push({ + func: thru, + args: [interceptor], + thisArg: undefined, + }); + return new LodashWrapper(value, this.__chain__).thru(function (array) { + if (length && !array.length) { + array.push(undefined); + } + return array; + }); + }); + + /** + * Creates a `lodash` wrapper instance with explicit method chain sequences enabled. + * + * @name chain + * @memberOf _ + * @since 0.1.0 + * @category Seq + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 } + * ]; + * + * // A sequence without explicit chaining. + * _(users).head(); + * // => { 'user': 'barney', 'age': 36 } + * + * // A sequence with explicit chaining. + * _(users) + * .chain() + * .head() + * .pick('user') + * .value(); + * // => { 'user': 'barney' } + */ + function wrapperChain() { + return chain(this); + } + + /** + * Executes the chain sequence and returns the wrapped result. + * + * @name commit + * @memberOf _ + * @since 3.2.0 + * @category Seq + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var array = [1, 2]; + * var wrapped = _(array).push(3); + * + * console.log(array); + * // => [1, 2] + * + * wrapped = wrapped.commit(); + * console.log(array); + * // => [1, 2, 3] + * + * wrapped.last(); + * // => 3 + * + * console.log(array); + * // => [1, 2, 3] + */ + function wrapperCommit() { + return new LodashWrapper(this.value(), this.__chain__); + } + + /** + * Gets the next value on a wrapped object following the + * [iterator protocol](https://mdn.io/iteration_protocols#iterator). + * + * @name next + * @memberOf _ + * @since 4.0.0 + * @category Seq + * @returns {Object} Returns the next iterator value. + * @example + * + * var wrapped = _([1, 2]); + * + * wrapped.next(); + * // => { 'done': false, 'value': 1 } + * + * wrapped.next(); + * // => { 'done': false, 'value': 2 } + * + * wrapped.next(); + * // => { 'done': true, 'value': undefined } + */ + function wrapperNext() { + if (this.__values__ === undefined) { + this.__values__ = toArray(this.value()); + } + var done = this.__index__ >= this.__values__.length, + value = done ? undefined : this.__values__[this.__index__++]; + + return { done: done, value: value }; + } + + /** + * Enables the wrapper to be iterable. + * + * @name Symbol.iterator + * @memberOf _ + * @since 4.0.0 + * @category Seq + * @returns {Object} Returns the wrapper object. + * @example + * + * var wrapped = _([1, 2]); + * + * wrapped[Symbol.iterator]() === wrapped; + * // => true + * + * Array.from(wrapped); + * // => [1, 2] + */ + function wrapperToIterator() { + return this; + } + + /** + * Creates a clone of the chain sequence planting `value` as the wrapped value. + * + * @name plant + * @memberOf _ + * @since 3.2.0 + * @category Seq + * @param {*} value The value to plant. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * function square(n) { + * return n * n; + * } + * + * var wrapped = _([1, 2]).map(square); + * var other = wrapped.plant([3, 4]); + * + * other.value(); + * // => [9, 16] + * + * wrapped.value(); + * // => [1, 4] + */ + function wrapperPlant(value) { + var result, + parent = this; + + while (parent instanceof baseLodash) { + var clone = wrapperClone(parent); + clone.__index__ = 0; + clone.__values__ = undefined; + if (result) { + previous.__wrapped__ = clone; + } else { + result = clone; + } + var previous = clone; + parent = parent.__wrapped__; + } + previous.__wrapped__ = value; + return result; + } + + /** + * This method is the wrapper version of `_.reverse`. + * + * **Note:** This method mutates the wrapped array. + * + * @name reverse + * @memberOf _ + * @since 0.1.0 + * @category Seq + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var array = [1, 2, 3]; + * + * _(array).reverse().value() + * // => [3, 2, 1] + * + * console.log(array); + * // => [3, 2, 1] + */ + function wrapperReverse() { + var value = this.__wrapped__; + if (value instanceof LazyWrapper) { + var wrapped = value; + if (this.__actions__.length) { + wrapped = new LazyWrapper(this); + } + wrapped = wrapped.reverse(); + wrapped.__actions__.push({ + func: thru, + args: [reverse], + thisArg: undefined, + }); + return new LodashWrapper(wrapped, this.__chain__); + } + return this.thru(reverse); + } + + /** + * Executes the chain sequence to resolve the unwrapped value. + * + * @name value + * @memberOf _ + * @since 0.1.0 + * @alias toJSON, valueOf + * @category Seq + * @returns {*} Returns the resolved unwrapped value. + * @example + * + * _([1, 2, 3]).value(); + * // => [1, 2, 3] + */ + function wrapperValue() { + return baseWrapperValue(this.__wrapped__, this.__actions__); + } + + /*------------------------------------------------------------------------*/ + + /** + * Creates an object composed of keys generated from the results of running + * each element of `collection` thru `iteratee`. The corresponding value of + * each key is the number of times the key was returned by `iteratee`. The + * iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 0.5.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee to transform keys. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * _.countBy([6.1, 4.2, 6.3], Math.floor); + * // => { '4': 1, '6': 2 } + * + * // The `_.property` iteratee shorthand. + * _.countBy(['one', 'two', 'three'], 'length'); + * // => { '3': 2, '5': 1 } + */ + var countBy = createAggregator(function (result, value, key) { + if (hasOwnProperty.call(result, key)) { + ++result[key]; + } else { + baseAssignValue(result, key, 1); + } + }); + + /** + * Checks if `predicate` returns truthy for **all** elements of `collection`. + * Iteration is stopped once `predicate` returns falsey. The predicate is + * invoked with three arguments: (value, index|key, collection). + * + * **Note:** This method returns `true` for + * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because + * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of + * elements of empty collections. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false`. + * @example + * + * _.every([true, 1, null, 'yes'], Boolean); + * // => false + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * // The `_.matches` iteratee shorthand. + * _.every(users, { 'user': 'barney', 'active': false }); + * // => false + * + * // The `_.matchesProperty` iteratee shorthand. + * _.every(users, ['active', false]); + * // => true + * + * // The `_.property` iteratee shorthand. + * _.every(users, 'active'); + * // => false + */ + function every(collection, predicate, guard) { + var func = isArray(collection) ? arrayEvery : baseEvery; + if (guard && isIterateeCall(collection, predicate, guard)) { + predicate = undefined; + } + return func(collection, getIteratee(predicate, 3)); + } + + /** + * Iterates over elements of `collection`, returning an array of all elements + * `predicate` returns truthy for. The predicate is invoked with three + * arguments: (value, index|key, collection). + * + * **Note:** Unlike `_.remove`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + * @see _.reject + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * _.filter(users, function(o) { return !o.active; }); + * // => objects for ['fred'] + * + * // The `_.matches` iteratee shorthand. + * _.filter(users, { 'age': 36, 'active': true }); + * // => objects for ['barney'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.filter(users, ['active', false]); + * // => objects for ['fred'] + * + * // The `_.property` iteratee shorthand. + * _.filter(users, 'active'); + * // => objects for ['barney'] + */ + function filter(collection, predicate) { + var func = isArray(collection) ? arrayFilter : baseFilter; + return func(collection, getIteratee(predicate, 3)); + } + + /** + * Iterates over elements of `collection`, returning the first element + * `predicate` returns truthy for. The predicate is invoked with three + * arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. + * @returns {*} Returns the matched element, else `undefined`. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false }, + * { 'user': 'pebbles', 'age': 1, 'active': true } + * ]; + * + * _.find(users, function(o) { return o.age < 40; }); + * // => object for 'barney' + * + * // The `_.matches` iteratee shorthand. + * _.find(users, { 'age': 1, 'active': true }); + * // => object for 'pebbles' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.find(users, ['active', false]); + * // => object for 'fred' + * + * // The `_.property` iteratee shorthand. + * _.find(users, 'active'); + * // => object for 'barney' + */ + var find = createFind(findIndex); + + /** + * This method is like `_.find` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Collection + * @param {Array|Object} collection The collection to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=collection.length-1] The index to search from. + * @returns {*} Returns the matched element, else `undefined`. + * @example + * + * _.findLast([1, 2, 3, 4], function(n) { + * return n % 2 == 1; + * }); + * // => 3 + */ + var findLast = createFind(findLastIndex); + + /** + * Creates a flattened array of values by running each element in `collection` + * thru `iteratee` and flattening the mapped results. The iteratee is invoked + * with three arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new flattened array. + * @example + * + * function duplicate(n) { + * return [n, n]; + * } + * + * _.flatMap([1, 2], duplicate); + * // => [1, 1, 2, 2] + */ + function flatMap(collection, iteratee) { + return baseFlatten(map(collection, iteratee), 1); + } + + /** + * This method is like `_.flatMap` except that it recursively flattens the + * mapped results. + * + * @static + * @memberOf _ + * @since 4.7.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new flattened array. + * @example + * + * function duplicate(n) { + * return [[[n, n]]]; + * } + * + * _.flatMapDeep([1, 2], duplicate); + * // => [1, 1, 2, 2] + */ + function flatMapDeep(collection, iteratee) { + return baseFlatten(map(collection, iteratee), INFINITY); + } + + /** + * This method is like `_.flatMap` except that it recursively flattens the + * mapped results up to `depth` times. + * + * @static + * @memberOf _ + * @since 4.7.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {number} [depth=1] The maximum recursion depth. + * @returns {Array} Returns the new flattened array. + * @example + * + * function duplicate(n) { + * return [[[n, n]]]; + * } + * + * _.flatMapDepth([1, 2], duplicate, 2); + * // => [[1, 1], [2, 2]] + */ + function flatMapDepth(collection, iteratee, depth) { + depth = depth === undefined ? 1 : toInteger(depth); + return baseFlatten(map(collection, iteratee), depth); + } + + /** + * Iterates over elements of `collection` and invokes `iteratee` for each element. + * The iteratee is invoked with three arguments: (value, index|key, collection). + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * **Note:** As with other "Collections" methods, objects with a "length" + * property are iterated like arrays. To avoid this behavior use `_.forIn` + * or `_.forOwn` for object iteration. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @alias each + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + * @see _.forEachRight + * @example + * + * _.forEach([1, 2], function(value) { + * console.log(value); + * }); + * // => Logs `1` then `2`. + * + * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a' then 'b' (iteration order is not guaranteed). + */ + function forEach(collection, iteratee) { + var func = isArray(collection) ? arrayEach : baseEach; + return func(collection, getIteratee(iteratee, 3)); + } + + /** + * This method is like `_.forEach` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @alias eachRight + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + * @see _.forEach + * @example + * + * _.forEachRight([1, 2], function(value) { + * console.log(value); + * }); + * // => Logs `2` then `1`. + */ + function forEachRight(collection, iteratee) { + var func = isArray(collection) ? arrayEachRight : baseEachRight; + return func(collection, getIteratee(iteratee, 3)); + } + + /** + * Creates an object composed of keys generated from the results of running + * each element of `collection` thru `iteratee`. The order of grouped values + * is determined by the order they occur in `collection`. The corresponding + * value of each key is an array of elements responsible for generating the + * key. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee to transform keys. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * _.groupBy([6.1, 4.2, 6.3], Math.floor); + * // => { '4': [4.2], '6': [6.1, 6.3] } + * + * // The `_.property` iteratee shorthand. + * _.groupBy(['one', 'two', 'three'], 'length'); + * // => { '3': ['one', 'two'], '5': ['three'] } + */ + var groupBy = createAggregator(function (result, value, key) { + if (hasOwnProperty.call(result, key)) { + result[key].push(value); + } else { + baseAssignValue(result, key, [value]); + } + }); + + /** + * Checks if `value` is in `collection`. If `collection` is a string, it's + * checked for a substring of `value`, otherwise + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * is used for equality comparisons. If `fromIndex` is negative, it's used as + * the offset from the end of `collection`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object|string} collection The collection to inspect. + * @param {*} value The value to search for. + * @param {number} [fromIndex=0] The index to search from. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`. + * @returns {boolean} Returns `true` if `value` is found, else `false`. + * @example + * + * _.includes([1, 2, 3], 1); + * // => true + * + * _.includes([1, 2, 3], 1, 2); + * // => false + * + * _.includes({ 'a': 1, 'b': 2 }, 1); + * // => true + * + * _.includes('abcd', 'bc'); + * // => true + */ + function includes(collection, value, fromIndex, guard) { + collection = isArrayLike(collection) ? collection : values(collection); + fromIndex = fromIndex && !guard ? toInteger(fromIndex) : 0; + + var length = collection.length; + if (fromIndex < 0) { + fromIndex = nativeMax(length + fromIndex, 0); + } + return isString(collection) + ? fromIndex <= length && collection.indexOf(value, fromIndex) > -1 + : !!length && baseIndexOf(collection, value, fromIndex) > -1; + } + + /** + * Invokes the method at `path` of each element in `collection`, returning + * an array of the results of each invoked method. Any additional arguments + * are provided to each invoked method. If `path` is a function, it's invoked + * for, and `this` bound to, each element in `collection`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Array|Function|string} path The path of the method to invoke or + * the function invoked per iteration. + * @param {...*} [args] The arguments to invoke each method with. + * @returns {Array} Returns the array of results. + * @example + * + * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort'); + * // => [[1, 5, 7], [1, 2, 3]] + * + * _.invokeMap([123, 456], String.prototype.split, ''); + * // => [['1', '2', '3'], ['4', '5', '6']] + */ + var invokeMap = baseRest(function (collection, path, args) { + var index = -1, + isFunc = typeof path == 'function', + result = isArrayLike(collection) ? Array(collection.length) : []; + + baseEach(collection, function (value) { + result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args); + }); + return result; + }); + + /** + * Creates an object composed of keys generated from the results of running + * each element of `collection` thru `iteratee`. The corresponding value of + * each key is the last element responsible for generating the key. The + * iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee to transform keys. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * var array = [ + * { 'dir': 'left', 'code': 97 }, + * { 'dir': 'right', 'code': 100 } + * ]; + * + * _.keyBy(array, function(o) { + * return String.fromCharCode(o.code); + * }); + * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } } + * + * _.keyBy(array, 'dir'); + * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } } + */ + var keyBy = createAggregator(function (result, value, key) { + baseAssignValue(result, key, value); + }); + + /** + * Creates an array of values by running each element in `collection` thru + * `iteratee`. The iteratee is invoked with three arguments: + * (value, index|key, collection). + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. + * + * The guarded methods are: + * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`, + * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`, + * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`, + * `template`, `trim`, `trimEnd`, `trimStart`, and `words` + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + * @example + * + * function square(n) { + * return n * n; + * } + * + * _.map([4, 8], square); + * // => [16, 64] + * + * _.map({ 'a': 4, 'b': 8 }, square); + * // => [16, 64] (iteration order is not guaranteed) + * + * var users = [ + * { 'user': 'barney' }, + * { 'user': 'fred' } + * ]; + * + * // The `_.property` iteratee shorthand. + * _.map(users, 'user'); + * // => ['barney', 'fred'] + */ + function map(collection, iteratee) { + var func = isArray(collection) ? arrayMap : baseMap; + return func(collection, getIteratee(iteratee, 3)); + } + + /** + * This method is like `_.sortBy` except that it allows specifying the sort + * orders of the iteratees to sort by. If `orders` is unspecified, all values + * are sorted in ascending order. Otherwise, specify an order of "desc" for + * descending or "asc" for ascending sort order of corresponding values. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]] + * The iteratees to sort by. + * @param {string[]} [orders] The sort orders of `iteratees`. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`. + * @returns {Array} Returns the new sorted array. + * @example + * + * var users = [ + * { 'user': 'fred', 'age': 48 }, + * { 'user': 'barney', 'age': 34 }, + * { 'user': 'fred', 'age': 40 }, + * { 'user': 'barney', 'age': 36 } + * ]; + * + * // Sort by `user` in ascending order and by `age` in descending order. + * _.orderBy(users, ['user', 'age'], ['asc', 'desc']); + * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]] + */ + function orderBy(collection, iteratees, orders, guard) { + if (collection == null) { + return []; + } + if (!isArray(iteratees)) { + iteratees = iteratees == null ? [] : [iteratees]; + } + orders = guard ? undefined : orders; + if (!isArray(orders)) { + orders = orders == null ? [] : [orders]; + } + return baseOrderBy(collection, iteratees, orders); + } + + /** + * Creates an array of elements split into two groups, the first of which + * contains elements `predicate` returns truthy for, the second of which + * contains elements `predicate` returns falsey for. The predicate is + * invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the array of grouped elements. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false }, + * { 'user': 'fred', 'age': 40, 'active': true }, + * { 'user': 'pebbles', 'age': 1, 'active': false } + * ]; + * + * _.partition(users, function(o) { return o.active; }); + * // => objects for [['fred'], ['barney', 'pebbles']] + * + * // The `_.matches` iteratee shorthand. + * _.partition(users, { 'age': 1, 'active': false }); + * // => objects for [['pebbles'], ['barney', 'fred']] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.partition(users, ['active', false]); + * // => objects for [['barney', 'pebbles'], ['fred']] + * + * // The `_.property` iteratee shorthand. + * _.partition(users, 'active'); + * // => objects for [['fred'], ['barney', 'pebbles']] + */ + var partition = createAggregator( + function (result, value, key) { + result[key ? 0 : 1].push(value); + }, + function () { + return [[], []]; + }, + ); + + /** + * Reduces `collection` to a value which is the accumulated result of running + * each element in `collection` thru `iteratee`, where each successive + * invocation is supplied the return value of the previous. If `accumulator` + * is not given, the first element of `collection` is used as the initial + * value. The iteratee is invoked with four arguments: + * (accumulator, value, index|key, collection). + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.reduce`, `_.reduceRight`, and `_.transform`. + * + * The guarded methods are: + * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`, + * and `sortBy` + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @returns {*} Returns the accumulated value. + * @see _.reduceRight + * @example + * + * _.reduce([1, 2], function(sum, n) { + * return sum + n; + * }, 0); + * // => 3 + * + * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { + * (result[value] || (result[value] = [])).push(key); + * return result; + * }, {}); + * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed) + */ + function reduce(collection, iteratee, accumulator) { + var func = isArray(collection) ? arrayReduce : baseReduce, + initAccum = arguments.length < 3; + + return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach); + } + + /** + * This method is like `_.reduce` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @returns {*} Returns the accumulated value. + * @see _.reduce + * @example + * + * var array = [[0, 1], [2, 3], [4, 5]]; + * + * _.reduceRight(array, function(flattened, other) { + * return flattened.concat(other); + * }, []); + * // => [4, 5, 2, 3, 0, 1] + */ + function reduceRight(collection, iteratee, accumulator) { + var func = isArray(collection) ? arrayReduceRight : baseReduce, + initAccum = arguments.length < 3; + + return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight); + } + + /** + * The opposite of `_.filter`; this method returns the elements of `collection` + * that `predicate` does **not** return truthy for. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + * @see _.filter + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false }, + * { 'user': 'fred', 'age': 40, 'active': true } + * ]; + * + * _.reject(users, function(o) { return !o.active; }); + * // => objects for ['fred'] + * + * // The `_.matches` iteratee shorthand. + * _.reject(users, { 'age': 40, 'active': true }); + * // => objects for ['barney'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.reject(users, ['active', false]); + * // => objects for ['fred'] + * + * // The `_.property` iteratee shorthand. + * _.reject(users, 'active'); + * // => objects for ['barney'] + */ + function reject(collection, predicate) { + var func = isArray(collection) ? arrayFilter : baseFilter; + return func(collection, negate(getIteratee(predicate, 3))); + } + + /** + * Gets a random element from `collection`. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Collection + * @param {Array|Object} collection The collection to sample. + * @returns {*} Returns the random element. + * @example + * + * _.sample([1, 2, 3, 4]); + * // => 2 + */ + function sample(collection) { + var func = isArray(collection) ? arraySample : baseSample; + return func(collection); + } + + /** + * Gets `n` random elements at unique keys from `collection` up to the + * size of `collection`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to sample. + * @param {number} [n=1] The number of elements to sample. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the random elements. + * @example + * + * _.sampleSize([1, 2, 3], 2); + * // => [3, 1] + * + * _.sampleSize([1, 2, 3], 4); + * // => [2, 3, 1] + */ + function sampleSize(collection, n, guard) { + if (guard ? isIterateeCall(collection, n, guard) : n === undefined) { + n = 1; + } else { + n = toInteger(n); + } + var func = isArray(collection) ? arraySampleSize : baseSampleSize; + return func(collection, n); + } + + /** + * Creates an array of shuffled values, using a version of the + * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to shuffle. + * @returns {Array} Returns the new shuffled array. + * @example + * + * _.shuffle([1, 2, 3, 4]); + * // => [4, 1, 3, 2] + */ + function shuffle(collection) { + var func = isArray(collection) ? arrayShuffle : baseShuffle; + return func(collection); + } + + /** + * Gets the size of `collection` by returning its length for array-like + * values or the number of own enumerable string keyed properties for objects. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object|string} collection The collection to inspect. + * @returns {number} Returns the collection size. + * @example + * + * _.size([1, 2, 3]); + * // => 3 + * + * _.size({ 'a': 1, 'b': 2 }); + * // => 2 + * + * _.size('pebbles'); + * // => 7 + */ + function size(collection) { + if (collection == null) { + return 0; + } + if (isArrayLike(collection)) { + return isString(collection) ? stringSize(collection) : collection.length; + } + var tag = getTag(collection); + if (tag == mapTag || tag == setTag) { + return collection.size; + } + return baseKeys(collection).length; + } + + /** + * Checks if `predicate` returns truthy for **any** element of `collection`. + * Iteration is stopped once `predicate` returns truthy. The predicate is + * invoked with three arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + * @example + * + * _.some([null, 0, 'yes', false], Boolean); + * // => true + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false } + * ]; + * + * // The `_.matches` iteratee shorthand. + * _.some(users, { 'user': 'barney', 'active': false }); + * // => false + * + * // The `_.matchesProperty` iteratee shorthand. + * _.some(users, ['active', false]); + * // => true + * + * // The `_.property` iteratee shorthand. + * _.some(users, 'active'); + * // => true + */ + function some(collection, predicate, guard) { + var func = isArray(collection) ? arraySome : baseSome; + if (guard && isIterateeCall(collection, predicate, guard)) { + predicate = undefined; + } + return func(collection, getIteratee(predicate, 3)); + } + + /** + * Creates an array of elements, sorted in ascending order by the results of + * running each element in a collection thru each iteratee. This method + * performs a stable sort, that is, it preserves the original sort order of + * equal elements. The iteratees are invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {...(Function|Function[])} [iteratees=[_.identity]] + * The iteratees to sort by. + * @returns {Array} Returns the new sorted array. + * @example + * + * var users = [ + * { 'user': 'fred', 'age': 48 }, + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 }, + * { 'user': 'barney', 'age': 34 } + * ]; + * + * _.sortBy(users, [function(o) { return o.user; }]); + * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]] + * + * _.sortBy(users, ['user', 'age']); + * // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]] + */ + var sortBy = baseRest(function (collection, iteratees) { + if (collection == null) { + return []; + } + var length = iteratees.length; + if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) { + iteratees = []; + } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) { + iteratees = [iteratees[0]]; + } + return baseOrderBy(collection, baseFlatten(iteratees, 1), []); + }); + + /*------------------------------------------------------------------------*/ + + /** + * Gets the timestamp of the number of milliseconds that have elapsed since + * the Unix epoch (1 January 1970 00:00:00 UTC). + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Date + * @returns {number} Returns the timestamp. + * @example + * + * _.defer(function(stamp) { + * console.log(_.now() - stamp); + * }, _.now()); + * // => Logs the number of milliseconds it took for the deferred invocation. + */ + var now = + ctxNow || + function () { + return root.Date.now(); + }; + + /*------------------------------------------------------------------------*/ + + /** + * The opposite of `_.before`; this method creates a function that invokes + * `func` once it's called `n` or more times. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {number} n The number of calls before `func` is invoked. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * var saves = ['profile', 'settings']; + * + * var done = _.after(saves.length, function() { + * console.log('done saving!'); + * }); + * + * _.forEach(saves, function(type) { + * asyncSave({ 'type': type, 'complete': done }); + * }); + * // => Logs 'done saving!' after the two async saves have completed. + */ + function after(n, func) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + n = toInteger(n); + return function () { + if (--n < 1) { + return func.apply(this, arguments); + } + }; + } + + /** + * Creates a function that invokes `func`, with up to `n` arguments, + * ignoring any additional arguments. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} func The function to cap arguments for. + * @param {number} [n=func.length] The arity cap. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the new capped function. + * @example + * + * _.map(['6', '8', '10'], _.ary(parseInt, 1)); + * // => [6, 8, 10] + */ + function ary(func, n, guard) { + n = guard ? undefined : n; + n = func && n == null ? func.length : n; + return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n); + } + + /** + * Creates a function that invokes `func`, with the `this` binding and arguments + * of the created function, while it's called less than `n` times. Subsequent + * calls to the created function return the result of the last `func` invocation. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {number} n The number of calls at which `func` is no longer invoked. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * jQuery(element).on('click', _.before(5, addContactToList)); + * // => Allows adding up to 4 contacts to the list. + */ + function before(n, func) { + var result; + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + n = toInteger(n); + return function () { + if (--n > 0) { + result = func.apply(this, arguments); + } + if (n <= 1) { + func = undefined; + } + return result; + }; + } + + /** + * Creates a function that invokes `func` with the `this` binding of `thisArg` + * and `partials` prepended to the arguments it receives. + * + * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds, + * may be used as a placeholder for partially applied arguments. + * + * **Note:** Unlike native `Function#bind`, this method doesn't set the "length" + * property of bound functions. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to bind. + * @param {*} thisArg The `this` binding of `func`. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new bound function. + * @example + * + * function greet(greeting, punctuation) { + * return greeting + ' ' + this.user + punctuation; + * } + * + * var object = { 'user': 'fred' }; + * + * var bound = _.bind(greet, object, 'hi'); + * bound('!'); + * // => 'hi fred!' + * + * // Bound with placeholders. + * var bound = _.bind(greet, object, _, '!'); + * bound('hi'); + * // => 'hi fred!' + */ + var bind = baseRest(function (func, thisArg, partials) { + var bitmask = WRAP_BIND_FLAG; + if (partials.length) { + var holders = replaceHolders(partials, getHolder(bind)); + bitmask |= WRAP_PARTIAL_FLAG; + } + return createWrap(func, bitmask, thisArg, partials, holders); + }); + + /** + * Creates a function that invokes the method at `object[key]` with `partials` + * prepended to the arguments it receives. + * + * This method differs from `_.bind` by allowing bound functions to reference + * methods that may be redefined or don't yet exist. See + * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern) + * for more details. + * + * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for partially applied arguments. + * + * @static + * @memberOf _ + * @since 0.10.0 + * @category Function + * @param {Object} object The object to invoke the method on. + * @param {string} key The key of the method. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new bound function. + * @example + * + * var object = { + * 'user': 'fred', + * 'greet': function(greeting, punctuation) { + * return greeting + ' ' + this.user + punctuation; + * } + * }; + * + * var bound = _.bindKey(object, 'greet', 'hi'); + * bound('!'); + * // => 'hi fred!' + * + * object.greet = function(greeting, punctuation) { + * return greeting + 'ya ' + this.user + punctuation; + * }; + * + * bound('!'); + * // => 'hiya fred!' + * + * // Bound with placeholders. + * var bound = _.bindKey(object, 'greet', _, '!'); + * bound('hi'); + * // => 'hiya fred!' + */ + var bindKey = baseRest(function (object, key, partials) { + var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG; + if (partials.length) { + var holders = replaceHolders(partials, getHolder(bindKey)); + bitmask |= WRAP_PARTIAL_FLAG; + } + return createWrap(key, bitmask, object, partials, holders); + }); + + /** + * Creates a function that accepts arguments of `func` and either invokes + * `func` returning its result, if at least `arity` number of arguments have + * been provided, or returns a function that accepts the remaining `func` + * arguments, and so on. The arity of `func` may be specified if `func.length` + * is not sufficient. + * + * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds, + * may be used as a placeholder for provided arguments. + * + * **Note:** This method doesn't set the "length" property of curried functions. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Function + * @param {Function} func The function to curry. + * @param {number} [arity=func.length] The arity of `func`. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the new curried function. + * @example + * + * var abc = function(a, b, c) { + * return [a, b, c]; + * }; + * + * var curried = _.curry(abc); + * + * curried(1)(2)(3); + * // => [1, 2, 3] + * + * curried(1, 2)(3); + * // => [1, 2, 3] + * + * curried(1, 2, 3); + * // => [1, 2, 3] + * + * // Curried with placeholders. + * curried(1)(_, 3)(2); + * // => [1, 2, 3] + */ + function curry(func, arity, guard) { + arity = guard ? undefined : arity; + var result = createWrap( + func, + WRAP_CURRY_FLAG, + undefined, + undefined, + undefined, + undefined, + undefined, + arity, + ); + result.placeholder = curry.placeholder; + return result; + } + + /** + * This method is like `_.curry` except that arguments are applied to `func` + * in the manner of `_.partialRight` instead of `_.partial`. + * + * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for provided arguments. + * + * **Note:** This method doesn't set the "length" property of curried functions. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} func The function to curry. + * @param {number} [arity=func.length] The arity of `func`. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the new curried function. + * @example + * + * var abc = function(a, b, c) { + * return [a, b, c]; + * }; + * + * var curried = _.curryRight(abc); + * + * curried(3)(2)(1); + * // => [1, 2, 3] + * + * curried(2, 3)(1); + * // => [1, 2, 3] + * + * curried(1, 2, 3); + * // => [1, 2, 3] + * + * // Curried with placeholders. + * curried(3)(1, _)(2); + * // => [1, 2, 3] + */ + function curryRight(func, arity, guard) { + arity = guard ? undefined : arity; + var result = createWrap( + func, + WRAP_CURRY_RIGHT_FLAG, + undefined, + undefined, + undefined, + undefined, + undefined, + arity, + ); + result.placeholder = curryRight.placeholder; + return result; + } + + /** + * Creates a debounced function that delays invoking `func` until after `wait` + * milliseconds have elapsed since the last time the debounced function was + * invoked. The debounced function comes with a `cancel` method to cancel + * delayed `func` invocations and a `flush` method to immediately invoke them. + * Provide `options` to indicate whether `func` should be invoked on the + * leading and/or trailing edge of the `wait` timeout. The `func` is invoked + * with the last arguments provided to the debounced function. Subsequent + * calls to the debounced function return the result of the last `func` + * invocation. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is + * invoked on the trailing edge of the timeout only if the debounced function + * is invoked more than once during the `wait` timeout. + * + * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred + * until to the next tick, similar to `setTimeout` with a timeout of `0`. + * + * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) + * for details over the differences between `_.debounce` and `_.throttle`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to debounce. + * @param {number} [wait=0] The number of milliseconds to delay. + * @param {Object} [options={}] The options object. + * @param {boolean} [options.leading=false] + * Specify invoking on the leading edge of the timeout. + * @param {number} [options.maxWait] + * The maximum time `func` is allowed to be delayed before it's invoked. + * @param {boolean} [options.trailing=true] + * Specify invoking on the trailing edge of the timeout. + * @returns {Function} Returns the new debounced function. + * @example + * + * // Avoid costly calculations while the window size is in flux. + * jQuery(window).on('resize', _.debounce(calculateLayout, 150)); + * + * // Invoke `sendMail` when clicked, debouncing subsequent calls. + * jQuery(element).on('click', _.debounce(sendMail, 300, { + * 'leading': true, + * 'trailing': false + * })); + * + * // Ensure `batchLog` is invoked once after 1 second of debounced calls. + * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 }); + * var source = new EventSource('/stream'); + * jQuery(source).on('message', debounced); + * + * // Cancel the trailing debounced invocation. + * jQuery(window).on('popstate', debounced.cancel); + */ + function debounce(func, wait, options) { + var lastArgs, + lastThis, + maxWait, + result, + timerId, + lastCallTime, + lastInvokeTime = 0, + leading = false, + maxing = false, + trailing = true; + + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + wait = toNumber(wait) || 0; + if (isObject(options)) { + leading = !!options.leading; + maxing = 'maxWait' in options; + maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait; + trailing = 'trailing' in options ? !!options.trailing : trailing; + } + + function invokeFunc(time) { + var args = lastArgs, + thisArg = lastThis; + + lastArgs = lastThis = undefined; + lastInvokeTime = time; + result = func.apply(thisArg, args); + return result; + } + + function leadingEdge(time) { + // Reset any `maxWait` timer. + lastInvokeTime = time; + // Start the timer for the trailing edge. + timerId = setTimeout(timerExpired, wait); + // Invoke the leading edge. + return leading ? invokeFunc(time) : result; + } + + function remainingWait(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime, + timeWaiting = wait - timeSinceLastCall; + + return maxing ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) : timeWaiting; + } + + function shouldInvoke(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime; + + // Either this is the first call, activity has stopped and we're at the + // trailing edge, the system time has gone backwards and we're treating + // it as the trailing edge, or we've hit the `maxWait` limit. + return ( + lastCallTime === undefined || + timeSinceLastCall >= wait || + timeSinceLastCall < 0 || + (maxing && timeSinceLastInvoke >= maxWait) + ); + } + + function timerExpired() { + var time = now(); + if (shouldInvoke(time)) { + return trailingEdge(time); + } + // Restart the timer. + timerId = setTimeout(timerExpired, remainingWait(time)); + } + + function trailingEdge(time) { + timerId = undefined; + + // Only invoke if we have `lastArgs` which means `func` has been + // debounced at least once. + if (trailing && lastArgs) { + return invokeFunc(time); + } + lastArgs = lastThis = undefined; + return result; + } + + function cancel() { + if (timerId !== undefined) { + clearTimeout(timerId); + } + lastInvokeTime = 0; + lastArgs = lastCallTime = lastThis = timerId = undefined; + } + + function flush() { + return timerId === undefined ? result : trailingEdge(now()); + } + + function debounced() { + var time = now(), + isInvoking = shouldInvoke(time); + + lastArgs = arguments; + lastThis = this; + lastCallTime = time; + + if (isInvoking) { + if (timerId === undefined) { + return leadingEdge(lastCallTime); + } + if (maxing) { + // Handle invocations in a tight loop. + clearTimeout(timerId); + timerId = setTimeout(timerExpired, wait); + return invokeFunc(lastCallTime); + } + } + if (timerId === undefined) { + timerId = setTimeout(timerExpired, wait); + } + return result; + } + debounced.cancel = cancel; + debounced.flush = flush; + return debounced; + } + + /** + * Defers invoking the `func` until the current call stack has cleared. Any + * additional arguments are provided to `func` when it's invoked. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to defer. + * @param {...*} [args] The arguments to invoke `func` with. + * @returns {number} Returns the timer id. + * @example + * + * _.defer(function(text) { + * console.log(text); + * }, 'deferred'); + * // => Logs 'deferred' after one millisecond. + */ + var defer = baseRest(function (func, args) { + return baseDelay(func, 1, args); + }); + + /** + * Invokes `func` after `wait` milliseconds. Any additional arguments are + * provided to `func` when it's invoked. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @param {...*} [args] The arguments to invoke `func` with. + * @returns {number} Returns the timer id. + * @example + * + * _.delay(function(text) { + * console.log(text); + * }, 1000, 'later'); + * // => Logs 'later' after one second. + */ + var delay = baseRest(function (func, wait, args) { + return baseDelay(func, toNumber(wait) || 0, args); + }); + + /** + * Creates a function that invokes `func` with arguments reversed. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Function + * @param {Function} func The function to flip arguments for. + * @returns {Function} Returns the new flipped function. + * @example + * + * var flipped = _.flip(function() { + * return _.toArray(arguments); + * }); + * + * flipped('a', 'b', 'c', 'd'); + * // => ['d', 'c', 'b', 'a'] + */ + function flip(func) { + return createWrap(func, WRAP_FLIP_FLAG); + } + + /** + * Creates a function that memoizes the result of `func`. If `resolver` is + * provided, it determines the cache key for storing the result based on the + * arguments provided to the memoized function. By default, the first argument + * provided to the memoized function is used as the map cache key. The `func` + * is invoked with the `this` binding of the memoized function. + * + * **Note:** The cache is exposed as the `cache` property on the memoized + * function. Its creation may be customized by replacing the `_.memoize.Cache` + * constructor with one whose instances implement the + * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object) + * method interface of `clear`, `delete`, `get`, `has`, and `set`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to have its output memoized. + * @param {Function} [resolver] The function to resolve the cache key. + * @returns {Function} Returns the new memoized function. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * var other = { 'c': 3, 'd': 4 }; + * + * var values = _.memoize(_.values); + * values(object); + * // => [1, 2] + * + * values(other); + * // => [3, 4] + * + * object.a = 2; + * values(object); + * // => [1, 2] + * + * // Modify the result cache. + * values.cache.set(object, ['a', 'b']); + * values(object); + * // => ['a', 'b'] + * + * // Replace `_.memoize.Cache`. + * _.memoize.Cache = WeakMap; + */ + function memoize(func, resolver) { + if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) { + throw new TypeError(FUNC_ERROR_TEXT); + } + var memoized = function () { + var args = arguments, + key = resolver ? resolver.apply(this, args) : args[0], + cache = memoized.cache; + + if (cache.has(key)) { + return cache.get(key); + } + var result = func.apply(this, args); + memoized.cache = cache.set(key, result) || cache; + return result; + }; + memoized.cache = new (memoize.Cache || MapCache)(); + return memoized; + } + + // Expose `MapCache`. + memoize.Cache = MapCache; + + /** + * Creates a function that negates the result of the predicate `func`. The + * `func` predicate is invoked with the `this` binding and arguments of the + * created function. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} predicate The predicate to negate. + * @returns {Function} Returns the new negated function. + * @example + * + * function isEven(n) { + * return n % 2 == 0; + * } + * + * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven)); + * // => [1, 3, 5] + */ + function negate(predicate) { + if (typeof predicate != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + return function () { + var args = arguments; + switch (args.length) { + case 0: + return !predicate.call(this); + case 1: + return !predicate.call(this, args[0]); + case 2: + return !predicate.call(this, args[0], args[1]); + case 3: + return !predicate.call(this, args[0], args[1], args[2]); + } + return !predicate.apply(this, args); + }; + } + + /** + * Creates a function that is restricted to invoking `func` once. Repeat calls + * to the function return the value of the first invocation. The `func` is + * invoked with the `this` binding and arguments of the created function. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * var initialize = _.once(createApplication); + * initialize(); + * initialize(); + * // => `createApplication` is invoked once + */ + function once(func) { + return before(2, func); + } + + /** + * Creates a function that invokes `func` with its arguments transformed. + * + * @static + * @since 4.0.0 + * @memberOf _ + * @category Function + * @param {Function} func The function to wrap. + * @param {...(Function|Function[])} [transforms=[_.identity]] + * The argument transforms. + * @returns {Function} Returns the new function. + * @example + * + * function doubled(n) { + * return n * 2; + * } + * + * function square(n) { + * return n * n; + * } + * + * var func = _.overArgs(function(x, y) { + * return [x, y]; + * }, [square, doubled]); + * + * func(9, 3); + * // => [81, 6] + * + * func(10, 5); + * // => [100, 10] + */ + var overArgs = castRest(function (func, transforms) { + transforms = + transforms.length == 1 && isArray(transforms[0]) + ? arrayMap(transforms[0], baseUnary(getIteratee())) + : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee())); + + var funcsLength = transforms.length; + return baseRest(function (args) { + var index = -1, + length = nativeMin(args.length, funcsLength); + + while (++index < length) { + args[index] = transforms[index].call(this, args[index]); + } + return apply(func, this, args); + }); + }); + + /** + * Creates a function that invokes `func` with `partials` prepended to the + * arguments it receives. This method is like `_.bind` except it does **not** + * alter the `this` binding. + * + * The `_.partial.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for partially applied arguments. + * + * **Note:** This method doesn't set the "length" property of partially + * applied functions. + * + * @static + * @memberOf _ + * @since 0.2.0 + * @category Function + * @param {Function} func The function to partially apply arguments to. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new partially applied function. + * @example + * + * function greet(greeting, name) { + * return greeting + ' ' + name; + * } + * + * var sayHelloTo = _.partial(greet, 'hello'); + * sayHelloTo('fred'); + * // => 'hello fred' + * + * // Partially applied with placeholders. + * var greetFred = _.partial(greet, _, 'fred'); + * greetFred('hi'); + * // => 'hi fred' + */ + var partial = baseRest(function (func, partials) { + var holders = replaceHolders(partials, getHolder(partial)); + return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders); + }); + + /** + * This method is like `_.partial` except that partially applied arguments + * are appended to the arguments it receives. + * + * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for partially applied arguments. + * + * **Note:** This method doesn't set the "length" property of partially + * applied functions. + * + * @static + * @memberOf _ + * @since 1.0.0 + * @category Function + * @param {Function} func The function to partially apply arguments to. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new partially applied function. + * @example + * + * function greet(greeting, name) { + * return greeting + ' ' + name; + * } + * + * var greetFred = _.partialRight(greet, 'fred'); + * greetFred('hi'); + * // => 'hi fred' + * + * // Partially applied with placeholders. + * var sayHelloTo = _.partialRight(greet, 'hello', _); + * sayHelloTo('fred'); + * // => 'hello fred' + */ + var partialRight = baseRest(function (func, partials) { + var holders = replaceHolders(partials, getHolder(partialRight)); + return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders); + }); + + /** + * Creates a function that invokes `func` with arguments arranged according + * to the specified `indexes` where the argument value at the first index is + * provided as the first argument, the argument value at the second index is + * provided as the second argument, and so on. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} func The function to rearrange arguments for. + * @param {...(number|number[])} indexes The arranged argument indexes. + * @returns {Function} Returns the new function. + * @example + * + * var rearged = _.rearg(function(a, b, c) { + * return [a, b, c]; + * }, [2, 0, 1]); + * + * rearged('b', 'c', 'a') + * // => ['a', 'b', 'c'] + */ + var rearg = flatRest(function (func, indexes) { + return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes); + }); + + /** + * Creates a function that invokes `func` with the `this` binding of the + * created function and arguments from `start` and beyond provided as + * an array. + * + * **Note:** This method is based on the + * [rest parameter](https://mdn.io/rest_parameters). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Function + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + * @example + * + * var say = _.rest(function(what, names) { + * return what + ' ' + _.initial(names).join(', ') + + * (_.size(names) > 1 ? ', & ' : '') + _.last(names); + * }); + * + * say('hello', 'fred', 'barney', 'pebbles'); + * // => 'hello fred, barney, & pebbles' + */ + function rest(func, start) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + start = start === undefined ? start : toInteger(start); + return baseRest(func, start); + } + + /** + * Creates a function that invokes `func` with the `this` binding of the + * create function and an array of arguments much like + * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply). + * + * **Note:** This method is based on the + * [spread operator](https://mdn.io/spread_operator). + * + * @static + * @memberOf _ + * @since 3.2.0 + * @category Function + * @param {Function} func The function to spread arguments over. + * @param {number} [start=0] The start position of the spread. + * @returns {Function} Returns the new function. + * @example + * + * var say = _.spread(function(who, what) { + * return who + ' says ' + what; + * }); + * + * say(['fred', 'hello']); + * // => 'fred says hello' + * + * var numbers = Promise.all([ + * Promise.resolve(40), + * Promise.resolve(36) + * ]); + * + * numbers.then(_.spread(function(x, y) { + * return x + y; + * })); + * // => a Promise of 76 + */ + function spread(func, start) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + start = start == null ? 0 : nativeMax(toInteger(start), 0); + return baseRest(function (args) { + var array = args[start], + otherArgs = castSlice(args, 0, start); + + if (array) { + arrayPush(otherArgs, array); + } + return apply(func, this, otherArgs); + }); + } + + /** + * Creates a throttled function that only invokes `func` at most once per + * every `wait` milliseconds. The throttled function comes with a `cancel` + * method to cancel delayed `func` invocations and a `flush` method to + * immediately invoke them. Provide `options` to indicate whether `func` + * should be invoked on the leading and/or trailing edge of the `wait` + * timeout. The `func` is invoked with the last arguments provided to the + * throttled function. Subsequent calls to the throttled function return the + * result of the last `func` invocation. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is + * invoked on the trailing edge of the timeout only if the throttled function + * is invoked more than once during the `wait` timeout. + * + * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred + * until to the next tick, similar to `setTimeout` with a timeout of `0`. + * + * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) + * for details over the differences between `_.throttle` and `_.debounce`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to throttle. + * @param {number} [wait=0] The number of milliseconds to throttle invocations to. + * @param {Object} [options={}] The options object. + * @param {boolean} [options.leading=true] + * Specify invoking on the leading edge of the timeout. + * @param {boolean} [options.trailing=true] + * Specify invoking on the trailing edge of the timeout. + * @returns {Function} Returns the new throttled function. + * @example + * + * // Avoid excessively updating the position while scrolling. + * jQuery(window).on('scroll', _.throttle(updatePosition, 100)); + * + * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes. + * var throttled = _.throttle(renewToken, 300000, { 'trailing': false }); + * jQuery(element).on('click', throttled); + * + * // Cancel the trailing throttled invocation. + * jQuery(window).on('popstate', throttled.cancel); + */ + function throttle(func, wait, options) { + var leading = true, + trailing = true; + + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + if (isObject(options)) { + leading = 'leading' in options ? !!options.leading : leading; + trailing = 'trailing' in options ? !!options.trailing : trailing; + } + return debounce(func, wait, { + leading: leading, + maxWait: wait, + trailing: trailing, + }); + } + + /** + * Creates a function that accepts up to one argument, ignoring any + * additional arguments. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Function + * @param {Function} func The function to cap arguments for. + * @returns {Function} Returns the new capped function. + * @example + * + * _.map(['6', '8', '10'], _.unary(parseInt)); + * // => [6, 8, 10] + */ + function unary(func) { + return ary(func, 1); + } + + /** + * Creates a function that provides `value` to `wrapper` as its first + * argument. Any additional arguments provided to the function are appended + * to those provided to the `wrapper`. The wrapper is invoked with the `this` + * binding of the created function. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {*} value The value to wrap. + * @param {Function} [wrapper=identity] The wrapper function. + * @returns {Function} Returns the new function. + * @example + * + * var p = _.wrap(_.escape, function(func, text) { + * return '<p>' + func(text) + '</p>'; + * }); + * + * p('fred, barney, & pebbles'); + * // => '<p>fred, barney, & pebbles</p>' + */ + function wrap(value, wrapper) { + return partial(castFunction(wrapper), value); + } + + /*------------------------------------------------------------------------*/ + + /** + * Casts `value` as an array if it's not one. + * + * @static + * @memberOf _ + * @since 4.4.0 + * @category Lang + * @param {*} value The value to inspect. + * @returns {Array} Returns the cast array. + * @example + * + * _.castArray(1); + * // => [1] + * + * _.castArray({ 'a': 1 }); + * // => [{ 'a': 1 }] + * + * _.castArray('abc'); + * // => ['abc'] + * + * _.castArray(null); + * // => [null] + * + * _.castArray(undefined); + * // => [undefined] + * + * _.castArray(); + * // => [] + * + * var array = [1, 2, 3]; + * console.log(_.castArray(array) === array); + * // => true + */ + function castArray() { + if (!arguments.length) { + return []; + } + var value = arguments[0]; + return isArray(value) ? value : [value]; + } + + /** + * Creates a shallow clone of `value`. + * + * **Note:** This method is loosely based on the + * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm) + * and supports cloning arrays, array buffers, booleans, date objects, maps, + * numbers, `Object` objects, regexes, sets, strings, symbols, and typed + * arrays. The own enumerable properties of `arguments` objects are cloned + * as plain objects. An empty object is returned for uncloneable values such + * as error objects, functions, DOM nodes, and WeakMaps. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to clone. + * @returns {*} Returns the cloned value. + * @see _.cloneDeep + * @example + * + * var objects = [{ 'a': 1 }, { 'b': 2 }]; + * + * var shallow = _.clone(objects); + * console.log(shallow[0] === objects[0]); + * // => true + */ + function clone(value) { + return baseClone(value, CLONE_SYMBOLS_FLAG); + } + + /** + * This method is like `_.clone` except that it accepts `customizer` which + * is invoked to produce the cloned value. If `customizer` returns `undefined`, + * cloning is handled by the method instead. The `customizer` is invoked with + * up to four arguments; (value [, index|key, object, stack]). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to clone. + * @param {Function} [customizer] The function to customize cloning. + * @returns {*} Returns the cloned value. + * @see _.cloneDeepWith + * @example + * + * function customizer(value) { + * if (_.isElement(value)) { + * return value.cloneNode(false); + * } + * } + * + * var el = _.cloneWith(document.body, customizer); + * + * console.log(el === document.body); + * // => false + * console.log(el.nodeName); + * // => 'BODY' + * console.log(el.childNodes.length); + * // => 0 + */ + function cloneWith(value, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return baseClone(value, CLONE_SYMBOLS_FLAG, customizer); + } + + /** + * This method is like `_.clone` except that it recursively clones `value`. + * + * @static + * @memberOf _ + * @since 1.0.0 + * @category Lang + * @param {*} value The value to recursively clone. + * @returns {*} Returns the deep cloned value. + * @see _.clone + * @example + * + * var objects = [{ 'a': 1 }, { 'b': 2 }]; + * + * var deep = _.cloneDeep(objects); + * console.log(deep[0] === objects[0]); + * // => false + */ + function cloneDeep(value) { + return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG); + } + + /** + * This method is like `_.cloneWith` except that it recursively clones `value`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to recursively clone. + * @param {Function} [customizer] The function to customize cloning. + * @returns {*} Returns the deep cloned value. + * @see _.cloneWith + * @example + * + * function customizer(value) { + * if (_.isElement(value)) { + * return value.cloneNode(true); + * } + * } + * + * var el = _.cloneDeepWith(document.body, customizer); + * + * console.log(el === document.body); + * // => false + * console.log(el.nodeName); + * // => 'BODY' + * console.log(el.childNodes.length); + * // => 20 + */ + function cloneDeepWith(value, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer); + } + + /** + * Checks if `object` conforms to `source` by invoking the predicate + * properties of `source` with the corresponding property values of `object`. + * + * **Note:** This method is equivalent to `_.conforms` when `source` is + * partially applied. + * + * @static + * @memberOf _ + * @since 4.14.0 + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property predicates to conform to. + * @returns {boolean} Returns `true` if `object` conforms, else `false`. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * + * _.conformsTo(object, { 'b': function(n) { return n > 1; } }); + * // => true + * + * _.conformsTo(object, { 'b': function(n) { return n > 2; } }); + * // => false + */ + function conformsTo(object, source) { + return source == null || baseConformsTo(object, source, keys(source)); + } + + /** + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ + function eq(value, other) { + return value === other || (value !== value && other !== other); + } + + /** + * Checks if `value` is greater than `other`. + * + * @static + * @memberOf _ + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than `other`, + * else `false`. + * @see _.lt + * @example + * + * _.gt(3, 1); + * // => true + * + * _.gt(3, 3); + * // => false + * + * _.gt(1, 3); + * // => false + */ + var gt = createRelationalOperation(baseGt); + + /** + * Checks if `value` is greater than or equal to `other`. + * + * @static + * @memberOf _ + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than or equal to + * `other`, else `false`. + * @see _.lte + * @example + * + * _.gte(3, 1); + * // => true + * + * _.gte(3, 3); + * // => true + * + * _.gte(1, 3); + * // => false + */ + var gte = createRelationalOperation(function (value, other) { + return value >= other; + }); + + /** + * Checks if `value` is likely an `arguments` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + * else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ + var isArguments = baseIsArguments( + (function () { + return arguments; + })(), + ) + ? baseIsArguments + : function (value) { + return ( + isObjectLike(value) && + hasOwnProperty.call(value, 'callee') && + !propertyIsEnumerable.call(value, 'callee') + ); + }; + + /** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ + var isArray = Array.isArray; + + /** + * Checks if `value` is classified as an `ArrayBuffer` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`. + * @example + * + * _.isArrayBuffer(new ArrayBuffer(2)); + * // => true + * + * _.isArrayBuffer(new Array(2)); + * // => false + */ + var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer; + + /** + * Checks if `value` is array-like. A value is considered array-like if it's + * not a function and has a `value.length` that's an integer greater than or + * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + * @example + * + * _.isArrayLike([1, 2, 3]); + * // => true + * + * _.isArrayLike(document.body.children); + * // => true + * + * _.isArrayLike('abc'); + * // => true + * + * _.isArrayLike(_.noop); + * // => false + */ + function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); + } + + /** + * This method is like `_.isArrayLike` except that it also checks if `value` + * is an object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array-like object, + * else `false`. + * @example + * + * _.isArrayLikeObject([1, 2, 3]); + * // => true + * + * _.isArrayLikeObject(document.body.children); + * // => true + * + * _.isArrayLikeObject('abc'); + * // => false + * + * _.isArrayLikeObject(_.noop); + * // => false + */ + function isArrayLikeObject(value) { + return isObjectLike(value) && isArrayLike(value); + } + + /** + * Checks if `value` is classified as a boolean primitive or object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a boolean, else `false`. + * @example + * + * _.isBoolean(false); + * // => true + * + * _.isBoolean(null); + * // => false + */ + function isBoolean(value) { + return ( + value === true || value === false || (isObjectLike(value) && baseGetTag(value) == boolTag) + ); + } + + /** + * Checks if `value` is a buffer. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. + * @example + * + * _.isBuffer(new Buffer(2)); + * // => true + * + * _.isBuffer(new Uint8Array(2)); + * // => false + */ + var isBuffer = nativeIsBuffer || stubFalse; + + /** + * Checks if `value` is classified as a `Date` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a date object, else `false`. + * @example + * + * _.isDate(new Date); + * // => true + * + * _.isDate('Mon April 23 2012'); + * // => false + */ + var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate; + + /** + * Checks if `value` is likely a DOM element. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`. + * @example + * + * _.isElement(document.body); + * // => true + * + * _.isElement('<body>'); + * // => false + */ + function isElement(value) { + return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value); + } + + /** + * Checks if `value` is an empty object, collection, map, or set. + * + * Objects are considered empty if they have no own enumerable string keyed + * properties. + * + * Array-like values such as `arguments` objects, arrays, buffers, strings, or + * jQuery-like collections are considered empty if they have a `length` of `0`. + * Similarly, maps and sets are considered empty if they have a `size` of `0`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is empty, else `false`. + * @example + * + * _.isEmpty(null); + * // => true + * + * _.isEmpty(true); + * // => true + * + * _.isEmpty(1); + * // => true + * + * _.isEmpty([1, 2, 3]); + * // => false + * + * _.isEmpty({ 'a': 1 }); + * // => false + */ + function isEmpty(value) { + if (value == null) { + return true; + } + if ( + isArrayLike(value) && + (isArray(value) || + typeof value == 'string' || + typeof value.splice == 'function' || + isBuffer(value) || + isTypedArray(value) || + isArguments(value)) + ) { + return !value.length; + } + var tag = getTag(value); + if (tag == mapTag || tag == setTag) { + return !value.size; + } + if (isPrototype(value)) { + return !baseKeys(value).length; + } + for (var key in value) { + if (hasOwnProperty.call(value, key)) { + return false; + } + } + return true; + } + + /** + * Performs a deep comparison between two values to determine if they are + * equivalent. + * + * **Note:** This method supports comparing arrays, array buffers, booleans, + * date objects, error objects, maps, numbers, `Object` objects, regexes, + * sets, strings, symbols, and typed arrays. `Object` objects are compared + * by their own, not inherited, enumerable properties. Functions and DOM + * nodes are compared by strict equality, i.e. `===`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.isEqual(object, other); + * // => true + * + * object === other; + * // => false + */ + function isEqual(value, other) { + return baseIsEqual(value, other); + } + + /** + * This method is like `_.isEqual` except that it accepts `customizer` which + * is invoked to compare values. If `customizer` returns `undefined`, comparisons + * are handled by the method instead. The `customizer` is invoked with up to + * six arguments: (objValue, othValue [, index|key, object, other, stack]). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * function isGreeting(value) { + * return /^h(?:i|ello)$/.test(value); + * } + * + * function customizer(objValue, othValue) { + * if (isGreeting(objValue) && isGreeting(othValue)) { + * return true; + * } + * } + * + * var array = ['hello', 'goodbye']; + * var other = ['hi', 'goodbye']; + * + * _.isEqualWith(array, other, customizer); + * // => true + */ + function isEqualWith(value, other, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + var result = customizer ? customizer(value, other) : undefined; + return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result; + } + + /** + * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`, + * `SyntaxError`, `TypeError`, or `URIError` object. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an error object, else `false`. + * @example + * + * _.isError(new Error); + * // => true + * + * _.isError(Error); + * // => false + */ + function isError(value) { + if (!isObjectLike(value)) { + return false; + } + var tag = baseGetTag(value); + return ( + tag == errorTag || + tag == domExcTag || + (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value)) + ); + } + + /** + * Checks if `value` is a finite primitive number. + * + * **Note:** This method is based on + * [`Number.isFinite`](https://mdn.io/Number/isFinite). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a finite number, else `false`. + * @example + * + * _.isFinite(3); + * // => true + * + * _.isFinite(Number.MIN_VALUE); + * // => true + * + * _.isFinite(Infinity); + * // => false + * + * _.isFinite('3'); + * // => false + */ + function isFinite(value) { + return typeof value == 'number' && nativeIsFinite(value); + } + + /** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ + function isFunction(value) { + if (!isObject(value)) { + return false; + } + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 9 which returns 'object' for typed arrays and other constructors. + var tag = baseGetTag(value); + return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; + } + + /** + * Checks if `value` is an integer. + * + * **Note:** This method is based on + * [`Number.isInteger`](https://mdn.io/Number/isInteger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an integer, else `false`. + * @example + * + * _.isInteger(3); + * // => true + * + * _.isInteger(Number.MIN_VALUE); + * // => false + * + * _.isInteger(Infinity); + * // => false + * + * _.isInteger('3'); + * // => false + */ + function isInteger(value) { + return typeof value == 'number' && value == toInteger(value); + } + + /** + * Checks if `value` is a valid array-like length. + * + * **Note:** This method is loosely based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @example + * + * _.isLength(3); + * // => true + * + * _.isLength(Number.MIN_VALUE); + * // => false + * + * _.isLength(Infinity); + * // => false + * + * _.isLength('3'); + * // => false + */ + function isLength(value) { + return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + + /** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ + function isObject(value) { + var type = typeof value; + return value != null && (type == 'object' || type == 'function'); + } + + /** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ + function isObjectLike(value) { + return value != null && typeof value == 'object'; + } + + /** + * Checks if `value` is classified as a `Map` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a map, else `false`. + * @example + * + * _.isMap(new Map); + * // => true + * + * _.isMap(new WeakMap); + * // => false + */ + var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap; + + /** + * Performs a partial deep comparison between `object` and `source` to + * determine if `object` contains equivalent property values. + * + * **Note:** This method is equivalent to `_.matches` when `source` is + * partially applied. + * + * Partial comparisons will match empty array and empty object `source` + * values against any array or object value, respectively. See `_.isEqual` + * for a list of supported value comparisons. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * + * _.isMatch(object, { 'b': 2 }); + * // => true + * + * _.isMatch(object, { 'b': 1 }); + * // => false + */ + function isMatch(object, source) { + return object === source || baseIsMatch(object, source, getMatchData(source)); + } + + /** + * This method is like `_.isMatch` except that it accepts `customizer` which + * is invoked to compare values. If `customizer` returns `undefined`, comparisons + * are handled by the method instead. The `customizer` is invoked with five + * arguments: (objValue, srcValue, index|key, object, source). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + * @example + * + * function isGreeting(value) { + * return /^h(?:i|ello)$/.test(value); + * } + * + * function customizer(objValue, srcValue) { + * if (isGreeting(objValue) && isGreeting(srcValue)) { + * return true; + * } + * } + * + * var object = { 'greeting': 'hello' }; + * var source = { 'greeting': 'hi' }; + * + * _.isMatchWith(object, source, customizer); + * // => true + */ + function isMatchWith(object, source, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return baseIsMatch(object, source, getMatchData(source), customizer); + } + + /** + * Checks if `value` is `NaN`. + * + * **Note:** This method is based on + * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as + * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for + * `undefined` and other non-number values. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + * @example + * + * _.isNaN(NaN); + * // => true + * + * _.isNaN(new Number(NaN)); + * // => true + * + * isNaN(undefined); + * // => true + * + * _.isNaN(undefined); + * // => false + */ + function isNaN(value) { + // An `NaN` primitive is the only value that is not equal to itself. + // Perform the `toStringTag` check first to avoid errors with some + // ActiveX objects in IE. + return isNumber(value) && value != +value; + } + + /** + * Checks if `value` is a pristine native function. + * + * **Note:** This method can't reliably detect native functions in the presence + * of the core-js package because core-js circumvents this kind of detection. + * Despite multiple requests, the core-js maintainer has made it clear: any + * attempt to fix the detection will be obstructed. As a result, we're left + * with little choice but to throw an error. Unfortunately, this also affects + * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill), + * which rely on core-js. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + * @example + * + * _.isNative(Array.prototype.push); + * // => true + * + * _.isNative(_); + * // => false + */ + function isNative(value) { + if (isMaskable(value)) { + throw new Error(CORE_ERROR_TEXT); + } + return baseIsNative(value); + } + + /** + * Checks if `value` is `null`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `null`, else `false`. + * @example + * + * _.isNull(null); + * // => true + * + * _.isNull(void 0); + * // => false + */ + function isNull(value) { + return value === null; + } + + /** + * Checks if `value` is `null` or `undefined`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is nullish, else `false`. + * @example + * + * _.isNil(null); + * // => true + * + * _.isNil(void 0); + * // => true + * + * _.isNil(NaN); + * // => false + */ + function isNil(value) { + return value == null; + } + + /** + * Checks if `value` is classified as a `Number` primitive or object. + * + * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are + * classified as numbers, use the `_.isFinite` method. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a number, else `false`. + * @example + * + * _.isNumber(3); + * // => true + * + * _.isNumber(Number.MIN_VALUE); + * // => true + * + * _.isNumber(Infinity); + * // => true + * + * _.isNumber('3'); + * // => false + */ + function isNumber(value) { + return typeof value == 'number' || (isObjectLike(value) && baseGetTag(value) == numberTag); + } + + /** + * Checks if `value` is a plain object, that is, an object created by the + * `Object` constructor or one with a `[[Prototype]]` of `null`. + * + * @static + * @memberOf _ + * @since 0.8.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * _.isPlainObject(new Foo); + * // => false + * + * _.isPlainObject([1, 2, 3]); + * // => false + * + * _.isPlainObject({ 'x': 0, 'y': 0 }); + * // => true + * + * _.isPlainObject(Object.create(null)); + * // => true + */ + function isPlainObject(value) { + if (!isObjectLike(value) || baseGetTag(value) != objectTag) { + return false; + } + var proto = getPrototype(value); + if (proto === null) { + return true; + } + var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; + return ( + typeof Ctor == 'function' && + Ctor instanceof Ctor && + funcToString.call(Ctor) == objectCtorString + ); + } + + /** + * Checks if `value` is classified as a `RegExp` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. + * @example + * + * _.isRegExp(/abc/); + * // => true + * + * _.isRegExp('/abc/'); + * // => false + */ + var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp; + + /** + * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754 + * double precision number which isn't the result of a rounded unsafe integer. + * + * **Note:** This method is based on + * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`. + * @example + * + * _.isSafeInteger(3); + * // => true + * + * _.isSafeInteger(Number.MIN_VALUE); + * // => false + * + * _.isSafeInteger(Infinity); + * // => false + * + * _.isSafeInteger('3'); + * // => false + */ + function isSafeInteger(value) { + return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER; + } + + /** + * Checks if `value` is classified as a `Set` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a set, else `false`. + * @example + * + * _.isSet(new Set); + * // => true + * + * _.isSet(new WeakSet); + * // => false + */ + var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet; + + /** + * Checks if `value` is classified as a `String` primitive or object. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a string, else `false`. + * @example + * + * _.isString('abc'); + * // => true + * + * _.isString(1); + * // => false + */ + function isString(value) { + return ( + typeof value == 'string' || + (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag) + ); + } + + /** + * Checks if `value` is classified as a `Symbol` primitive or object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ + function isSymbol(value) { + return typeof value == 'symbol' || (isObjectLike(value) && baseGetTag(value) == symbolTag); + } + + /** + * Checks if `value` is classified as a typed array. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + * @example + * + * _.isTypedArray(new Uint8Array); + * // => true + * + * _.isTypedArray([]); + * // => false + */ + var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; + + /** + * Checks if `value` is `undefined`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`. + * @example + * + * _.isUndefined(void 0); + * // => true + * + * _.isUndefined(null); + * // => false + */ + function isUndefined(value) { + return value === undefined; + } + + /** + * Checks if `value` is classified as a `WeakMap` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a weak map, else `false`. + * @example + * + * _.isWeakMap(new WeakMap); + * // => true + * + * _.isWeakMap(new Map); + * // => false + */ + function isWeakMap(value) { + return isObjectLike(value) && getTag(value) == weakMapTag; + } + + /** + * Checks if `value` is classified as a `WeakSet` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a weak set, else `false`. + * @example + * + * _.isWeakSet(new WeakSet); + * // => true + * + * _.isWeakSet(new Set); + * // => false + */ + function isWeakSet(value) { + return isObjectLike(value) && baseGetTag(value) == weakSetTag; + } + + /** + * Checks if `value` is less than `other`. + * + * @static + * @memberOf _ + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than `other`, + * else `false`. + * @see _.gt + * @example + * + * _.lt(1, 3); + * // => true + * + * _.lt(3, 3); + * // => false + * + * _.lt(3, 1); + * // => false + */ + var lt = createRelationalOperation(baseLt); + + /** + * Checks if `value` is less than or equal to `other`. + * + * @static + * @memberOf _ + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than or equal to + * `other`, else `false`. + * @see _.gte + * @example + * + * _.lte(1, 3); + * // => true + * + * _.lte(3, 3); + * // => true + * + * _.lte(3, 1); + * // => false + */ + var lte = createRelationalOperation(function (value, other) { + return value <= other; + }); + + /** + * Converts `value` to an array. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to convert. + * @returns {Array} Returns the converted array. + * @example + * + * _.toArray({ 'a': 1, 'b': 2 }); + * // => [1, 2] + * + * _.toArray('abc'); + * // => ['a', 'b', 'c'] + * + * _.toArray(1); + * // => [] + * + * _.toArray(null); + * // => [] + */ + function toArray(value) { + if (!value) { + return []; + } + if (isArrayLike(value)) { + return isString(value) ? stringToArray(value) : copyArray(value); + } + if (symIterator && value[symIterator]) { + return iteratorToArray(value[symIterator]()); + } + var tag = getTag(value), + func = tag == mapTag ? mapToArray : tag == setTag ? setToArray : values; + + return func(value); + } + + /** + * Converts `value` to a finite number. + * + * @static + * @memberOf _ + * @since 4.12.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted number. + * @example + * + * _.toFinite(3.2); + * // => 3.2 + * + * _.toFinite(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toFinite(Infinity); + * // => 1.7976931348623157e+308 + * + * _.toFinite('3.2'); + * // => 3.2 + */ + function toFinite(value) { + if (!value) { + return value === 0 ? value : 0; + } + value = toNumber(value); + if (value === INFINITY || value === -INFINITY) { + var sign = value < 0 ? -1 : 1; + return sign * MAX_INTEGER; + } + return value === value ? value : 0; + } + + /** + * Converts `value` to an integer. + * + * **Note:** This method is loosely based on + * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted integer. + * @example + * + * _.toInteger(3.2); + * // => 3 + * + * _.toInteger(Number.MIN_VALUE); + * // => 0 + * + * _.toInteger(Infinity); + * // => 1.7976931348623157e+308 + * + * _.toInteger('3.2'); + * // => 3 + */ + function toInteger(value) { + var result = toFinite(value), + remainder = result % 1; + + return result === result ? (remainder ? result - remainder : result) : 0; + } + + /** + * Converts `value` to an integer suitable for use as the length of an + * array-like object. + * + * **Note:** This method is based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted integer. + * @example + * + * _.toLength(3.2); + * // => 3 + * + * _.toLength(Number.MIN_VALUE); + * // => 0 + * + * _.toLength(Infinity); + * // => 4294967295 + * + * _.toLength('3.2'); + * // => 3 + */ + function toLength(value) { + return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0; + } + + /** + * Converts `value` to a number. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to process. + * @returns {number} Returns the number. + * @example + * + * _.toNumber(3.2); + * // => 3.2 + * + * _.toNumber(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toNumber(Infinity); + * // => Infinity + * + * _.toNumber('3.2'); + * // => 3.2 + */ + function toNumber(value) { + if (typeof value == 'number') { + return value; + } + if (isSymbol(value)) { + return NAN; + } + if (isObject(value)) { + var other = typeof value.valueOf == 'function' ? value.valueOf() : value; + value = isObject(other) ? other + '' : other; + } + if (typeof value != 'string') { + return value === 0 ? value : +value; + } + value = value.replace(reTrim, ''); + var isBinary = reIsBinary.test(value); + return isBinary || reIsOctal.test(value) + ? freeParseInt(value.slice(2), isBinary ? 2 : 8) + : reIsBadHex.test(value) + ? NAN + : +value; + } + + /** + * Converts `value` to a plain object flattening inherited enumerable string + * keyed properties of `value` to own properties of the plain object. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {Object} Returns the converted plain object. + * @example + * + * function Foo() { + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.assign({ 'a': 1 }, new Foo); + * // => { 'a': 1, 'b': 2 } + * + * _.assign({ 'a': 1 }, _.toPlainObject(new Foo)); + * // => { 'a': 1, 'b': 2, 'c': 3 } + */ + function toPlainObject(value) { + return copyObject(value, keysIn(value)); + } + + /** + * Converts `value` to a safe integer. A safe integer can be compared and + * represented correctly. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted integer. + * @example + * + * _.toSafeInteger(3.2); + * // => 3 + * + * _.toSafeInteger(Number.MIN_VALUE); + * // => 0 + * + * _.toSafeInteger(Infinity); + * // => 9007199254740991 + * + * _.toSafeInteger('3.2'); + * // => 3 + */ + function toSafeInteger(value) { + return value + ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER) + : value === 0 + ? value + : 0; + } + + /** + * Converts `value` to a string. An empty string is returned for `null` + * and `undefined` values. The sign of `-0` is preserved. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + * @example + * + * _.toString(null); + * // => '' + * + * _.toString(-0); + * // => '-0' + * + * _.toString([1, 2, 3]); + * // => '1,2,3' + */ + function toString(value) { + return value == null ? '' : baseToString(value); + } + + /*------------------------------------------------------------------------*/ + + /** + * Assigns own enumerable string keyed properties of source objects to the + * destination object. Source objects are applied from left to right. + * Subsequent sources overwrite property assignments of previous sources. + * + * **Note:** This method mutates `object` and is loosely based on + * [`Object.assign`](https://mdn.io/Object/assign). + * + * @static + * @memberOf _ + * @since 0.10.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.assignIn + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * function Bar() { + * this.c = 3; + * } + * + * Foo.prototype.b = 2; + * Bar.prototype.d = 4; + * + * _.assign({ 'a': 0 }, new Foo, new Bar); + * // => { 'a': 1, 'c': 3 } + */ + var assign = createAssigner(function (object, source) { + if (isPrototype(source) || isArrayLike(source)) { + copyObject(source, keys(source), object); + return; + } + for (var key in source) { + if (hasOwnProperty.call(source, key)) { + assignValue(object, key, source[key]); + } + } + }); + + /** + * This method is like `_.assign` except that it iterates over own and + * inherited source properties. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias extend + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.assign + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * function Bar() { + * this.c = 3; + * } + * + * Foo.prototype.b = 2; + * Bar.prototype.d = 4; + * + * _.assignIn({ 'a': 0 }, new Foo, new Bar); + * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 } + */ + var assignIn = createAssigner(function (object, source) { + copyObject(source, keysIn(source), object); + }); + + /** + * This method is like `_.assignIn` except that it accepts `customizer` + * which is invoked to produce the assigned values. If `customizer` returns + * `undefined`, assignment is handled by the method instead. The `customizer` + * is invoked with five arguments: (objValue, srcValue, key, object, source). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias extendWith + * @category Object + * @param {Object} object The destination object. + * @param {...Object} sources The source objects. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @see _.assignWith + * @example + * + * function customizer(objValue, srcValue) { + * return _.isUndefined(objValue) ? srcValue : objValue; + * } + * + * var defaults = _.partialRight(_.assignInWith, customizer); + * + * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ + var assignInWith = createAssigner(function (object, source, srcIndex, customizer) { + copyObject(source, keysIn(source), object, customizer); + }); + + /** + * This method is like `_.assign` except that it accepts `customizer` + * which is invoked to produce the assigned values. If `customizer` returns + * `undefined`, assignment is handled by the method instead. The `customizer` + * is invoked with five arguments: (objValue, srcValue, key, object, source). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} sources The source objects. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @see _.assignInWith + * @example + * + * function customizer(objValue, srcValue) { + * return _.isUndefined(objValue) ? srcValue : objValue; + * } + * + * var defaults = _.partialRight(_.assignWith, customizer); + * + * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ + var assignWith = createAssigner(function (object, source, srcIndex, customizer) { + copyObject(source, keys(source), object, customizer); + }); + + /** + * Creates an array of values corresponding to `paths` of `object`. + * + * @static + * @memberOf _ + * @since 1.0.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {...(string|string[])} [paths] The property paths to pick. + * @returns {Array} Returns the picked values. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] }; + * + * _.at(object, ['a[0].b.c', 'a[1]']); + * // => [3, 4] + */ + var at = flatRest(baseAt); + + /** + * Creates an object that inherits from the `prototype` object. If a + * `properties` object is given, its own enumerable string keyed properties + * are assigned to the created object. + * + * @static + * @memberOf _ + * @since 2.3.0 + * @category Object + * @param {Object} prototype The object to inherit from. + * @param {Object} [properties] The properties to assign to the object. + * @returns {Object} Returns the new object. + * @example + * + * function Shape() { + * this.x = 0; + * this.y = 0; + * } + * + * function Circle() { + * Shape.call(this); + * } + * + * Circle.prototype = _.create(Shape.prototype, { + * 'constructor': Circle + * }); + * + * var circle = new Circle; + * circle instanceof Circle; + * // => true + * + * circle instanceof Shape; + * // => true + */ + function create(prototype, properties) { + var result = baseCreate(prototype); + return properties == null ? result : baseAssign(result, properties); + } + + /** + * Assigns own and inherited enumerable string keyed properties of source + * objects to the destination object for all destination properties that + * resolve to `undefined`. Source objects are applied from left to right. + * Once a property is set, additional values of the same property are ignored. + * + * **Note:** This method mutates `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.defaultsDeep + * @example + * + * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ + var defaults = baseRest(function (object, sources) { + object = Object(object); + + var index = -1; + var length = sources.length; + var guard = length > 2 ? sources[2] : undefined; + + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + length = 1; + } + + while (++index < length) { + var source = sources[index]; + var props = keysIn(source); + var propsIndex = -1; + var propsLength = props.length; + + while (++propsIndex < propsLength) { + var key = props[propsIndex]; + var value = object[key]; + + if ( + value === undefined || + (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key)) + ) { + object[key] = source[key]; + } + } + } + + return object; + }); + + /** + * This method is like `_.defaults` except that it recursively assigns + * default properties. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 3.10.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.defaults + * @example + * + * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } }); + * // => { 'a': { 'b': 2, 'c': 3 } } + */ + var defaultsDeep = baseRest(function (args) { + args.push(undefined, customDefaultsMerge); + return apply(mergeWith, undefined, args); + }); + + /** + * This method is like `_.find` except that it returns the key of the first + * element `predicate` returns truthy for instead of the element itself. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category Object + * @param {Object} object The object to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {string|undefined} Returns the key of the matched element, + * else `undefined`. + * @example + * + * var users = { + * 'barney': { 'age': 36, 'active': true }, + * 'fred': { 'age': 40, 'active': false }, + * 'pebbles': { 'age': 1, 'active': true } + * }; + * + * _.findKey(users, function(o) { return o.age < 40; }); + * // => 'barney' (iteration order is not guaranteed) + * + * // The `_.matches` iteratee shorthand. + * _.findKey(users, { 'age': 1, 'active': true }); + * // => 'pebbles' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findKey(users, ['active', false]); + * // => 'fred' + * + * // The `_.property` iteratee shorthand. + * _.findKey(users, 'active'); + * // => 'barney' + */ + function findKey(object, predicate) { + return baseFindKey(object, getIteratee(predicate, 3), baseForOwn); + } + + /** + * This method is like `_.findKey` except that it iterates over elements of + * a collection in the opposite order. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Object + * @param {Object} object The object to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {string|undefined} Returns the key of the matched element, + * else `undefined`. + * @example + * + * var users = { + * 'barney': { 'age': 36, 'active': true }, + * 'fred': { 'age': 40, 'active': false }, + * 'pebbles': { 'age': 1, 'active': true } + * }; + * + * _.findLastKey(users, function(o) { return o.age < 40; }); + * // => returns 'pebbles' assuming `_.findKey` returns 'barney' + * + * // The `_.matches` iteratee shorthand. + * _.findLastKey(users, { 'age': 36, 'active': true }); + * // => 'barney' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findLastKey(users, ['active', false]); + * // => 'fred' + * + * // The `_.property` iteratee shorthand. + * _.findLastKey(users, 'active'); + * // => 'pebbles' + */ + function findLastKey(object, predicate) { + return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight); + } + + /** + * Iterates over own and inherited enumerable string keyed properties of an + * object and invokes `iteratee` for each property. The iteratee is invoked + * with three arguments: (value, key, object). Iteratee functions may exit + * iteration early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @since 0.3.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forInRight + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forIn(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed). + */ + function forIn(object, iteratee) { + return object == null ? object : baseFor(object, getIteratee(iteratee, 3), keysIn); + } + + /** + * This method is like `_.forIn` except that it iterates over properties of + * `object` in the opposite order. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forIn + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forInRight(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'. + */ + function forInRight(object, iteratee) { + return object == null ? object : baseForRight(object, getIteratee(iteratee, 3), keysIn); + } + + /** + * Iterates over own enumerable string keyed properties of an object and + * invokes `iteratee` for each property. The iteratee is invoked with three + * arguments: (value, key, object). Iteratee functions may exit iteration + * early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @since 0.3.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forOwnRight + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forOwn(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a' then 'b' (iteration order is not guaranteed). + */ + function forOwn(object, iteratee) { + return object && baseForOwn(object, getIteratee(iteratee, 3)); + } + + /** + * This method is like `_.forOwn` except that it iterates over properties of + * `object` in the opposite order. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forOwn + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forOwnRight(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'. + */ + function forOwnRight(object, iteratee) { + return object && baseForOwnRight(object, getIteratee(iteratee, 3)); + } + + /** + * Creates an array of function property names from own enumerable properties + * of `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to inspect. + * @returns {Array} Returns the function names. + * @see _.functionsIn + * @example + * + * function Foo() { + * this.a = _.constant('a'); + * this.b = _.constant('b'); + * } + * + * Foo.prototype.c = _.constant('c'); + * + * _.functions(new Foo); + * // => ['a', 'b'] + */ + function functions(object) { + return object == null ? [] : baseFunctions(object, keys(object)); + } + + /** + * Creates an array of function property names from own and inherited + * enumerable properties of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to inspect. + * @returns {Array} Returns the function names. + * @see _.functions + * @example + * + * function Foo() { + * this.a = _.constant('a'); + * this.b = _.constant('b'); + * } + * + * Foo.prototype.c = _.constant('c'); + * + * _.functionsIn(new Foo); + * // => ['a', 'b', 'c'] + */ + function functionsIn(object) { + return object == null ? [] : baseFunctions(object, keysIn(object)); + } + + /** + * Gets the value at `path` of `object`. If the resolved value is + * `undefined`, the `defaultValue` is returned in its place. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @param {*} [defaultValue] The value returned for `undefined` resolved values. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.get(object, 'a[0].b.c'); + * // => 3 + * + * _.get(object, ['a', '0', 'b', 'c']); + * // => 3 + * + * _.get(object, 'a.b.c', 'default'); + * // => 'default' + */ + function get(object, path, defaultValue) { + var result = object == null ? undefined : baseGet(object, path); + return result === undefined ? defaultValue : result; + } + + /** + * Checks if `path` is a direct property of `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = { 'a': { 'b': 2 } }; + * var other = _.create({ 'a': _.create({ 'b': 2 }) }); + * + * _.has(object, 'a'); + * // => true + * + * _.has(object, 'a.b'); + * // => true + * + * _.has(object, ['a', 'b']); + * // => true + * + * _.has(other, 'a'); + * // => false + */ + function has(object, path) { + return object != null && hasPath(object, path, baseHas); + } + + /** + * Checks if `path` is a direct or inherited property of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = _.create({ 'a': _.create({ 'b': 2 }) }); + * + * _.hasIn(object, 'a'); + * // => true + * + * _.hasIn(object, 'a.b'); + * // => true + * + * _.hasIn(object, ['a', 'b']); + * // => true + * + * _.hasIn(object, 'b'); + * // => false + */ + function hasIn(object, path) { + return object != null && hasPath(object, path, baseHasIn); + } + + /** + * Creates an object composed of the inverted keys and values of `object`. + * If `object` contains duplicate values, subsequent values overwrite + * property assignments of previous values. + * + * @static + * @memberOf _ + * @since 0.7.0 + * @category Object + * @param {Object} object The object to invert. + * @returns {Object} Returns the new inverted object. + * @example + * + * var object = { 'a': 1, 'b': 2, 'c': 1 }; + * + * _.invert(object); + * // => { '1': 'c', '2': 'b' } + */ + var invert = createInverter(function (result, value, key) { + if (value != null && typeof value.toString != 'function') { + value = nativeObjectToString.call(value); + } + + result[value] = key; + }, constant(identity)); + + /** + * This method is like `_.invert` except that the inverted object is generated + * from the results of running each element of `object` thru `iteratee`. The + * corresponding inverted value of each inverted key is an array of keys + * responsible for generating the inverted value. The iteratee is invoked + * with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.1.0 + * @category Object + * @param {Object} object The object to invert. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Object} Returns the new inverted object. + * @example + * + * var object = { 'a': 1, 'b': 2, 'c': 1 }; + * + * _.invertBy(object); + * // => { '1': ['a', 'c'], '2': ['b'] } + * + * _.invertBy(object, function(value) { + * return 'group' + value; + * }); + * // => { 'group1': ['a', 'c'], 'group2': ['b'] } + */ + var invertBy = createInverter(function (result, value, key) { + if (value != null && typeof value.toString != 'function') { + value = nativeObjectToString.call(value); + } + + if (hasOwnProperty.call(result, value)) { + result[value].push(key); + } else { + result[value] = [key]; + } + }, getIteratee); + + /** + * Invokes the method at `path` of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the method to invoke. + * @param {...*} [args] The arguments to invoke the method with. + * @returns {*} Returns the result of the invoked method. + * @example + * + * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] }; + * + * _.invoke(object, 'a[0].b.c.slice', 1, 3); + * // => [2, 3] + */ + var invoke = baseRest(baseInvoke); + + /** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * for more details. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ + function keys(object) { + return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); + } + + /** + * Creates an array of the own and inherited enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keysIn(new Foo); + * // => ['a', 'b', 'c'] (iteration order is not guaranteed) + */ + function keysIn(object) { + return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); + } + + /** + * The opposite of `_.mapValues`; this method creates an object with the + * same values as `object` and keys generated by running each own enumerable + * string keyed property of `object` thru `iteratee`. The iteratee is invoked + * with three arguments: (value, key, object). + * + * @static + * @memberOf _ + * @since 3.8.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns the new mapped object. + * @see _.mapValues + * @example + * + * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) { + * return key + value; + * }); + * // => { 'a1': 1, 'b2': 2 } + */ + function mapKeys(object, iteratee) { + var result = {}; + iteratee = getIteratee(iteratee, 3); + + baseForOwn(object, function (value, key, object) { + baseAssignValue(result, iteratee(value, key, object), value); + }); + return result; + } + + /** + * Creates an object with the same keys as `object` and values generated + * by running each own enumerable string keyed property of `object` thru + * `iteratee`. The iteratee is invoked with three arguments: + * (value, key, object). + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns the new mapped object. + * @see _.mapKeys + * @example + * + * var users = { + * 'fred': { 'user': 'fred', 'age': 40 }, + * 'pebbles': { 'user': 'pebbles', 'age': 1 } + * }; + * + * _.mapValues(users, function(o) { return o.age; }); + * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) + * + * // The `_.property` iteratee shorthand. + * _.mapValues(users, 'age'); + * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) + */ + function mapValues(object, iteratee) { + var result = {}; + iteratee = getIteratee(iteratee, 3); + + baseForOwn(object, function (value, key, object) { + baseAssignValue(result, key, iteratee(value, key, object)); + }); + return result; + } + + /** + * This method is like `_.assign` except that it recursively merges own and + * inherited enumerable string keyed properties of source objects into the + * destination object. Source properties that resolve to `undefined` are + * skipped if a destination value exists. Array and plain object properties + * are merged recursively. Other objects and value types are overridden by + * assignment. Source objects are applied from left to right. Subsequent + * sources overwrite property assignments of previous sources. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 0.5.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @example + * + * var object = { + * 'a': [{ 'b': 2 }, { 'd': 4 }] + * }; + * + * var other = { + * 'a': [{ 'c': 3 }, { 'e': 5 }] + * }; + * + * _.merge(object, other); + * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] } + */ + var merge = createAssigner(function (object, source, srcIndex) { + baseMerge(object, source, srcIndex); + }); + + /** + * This method is like `_.merge` except that it accepts `customizer` which + * is invoked to produce the merged values of the destination and source + * properties. If `customizer` returns `undefined`, merging is handled by the + * method instead. The `customizer` is invoked with six arguments: + * (objValue, srcValue, key, object, source, stack). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} sources The source objects. + * @param {Function} customizer The function to customize assigned values. + * @returns {Object} Returns `object`. + * @example + * + * function customizer(objValue, srcValue) { + * if (_.isArray(objValue)) { + * return objValue.concat(srcValue); + * } + * } + * + * var object = { 'a': [1], 'b': [2] }; + * var other = { 'a': [3], 'b': [4] }; + * + * _.mergeWith(object, other, customizer); + * // => { 'a': [1, 3], 'b': [2, 4] } + */ + var mergeWith = createAssigner(function (object, source, srcIndex, customizer) { + baseMerge(object, source, srcIndex, customizer); + }); + + /** + * The opposite of `_.pick`; this method creates an object composed of the + * own and inherited enumerable property paths of `object` that are not omitted. + * + * **Note:** This method is considerably slower than `_.pick`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The source object. + * @param {...(string|string[])} [paths] The property paths to omit. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.omit(object, ['a', 'c']); + * // => { 'b': '2' } + */ + var omit = flatRest(function (object, paths) { + var result = {}; + if (object == null) { + return result; + } + var isDeep = false; + paths = arrayMap(paths, function (path) { + path = castPath(path, object); + isDeep || (isDeep = path.length > 1); + return path; + }); + copyObject(object, getAllKeysIn(object), result); + if (isDeep) { + result = baseClone( + result, + CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, + customOmitClone, + ); + } + var length = paths.length; + while (length--) { + baseUnset(result, paths[length]); + } + return result; + }); + + /** + * The opposite of `_.pickBy`; this method creates an object composed of + * the own and inherited enumerable string keyed properties of `object` that + * `predicate` doesn't return truthy for. The predicate is invoked with two + * arguments: (value, key). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The source object. + * @param {Function} [predicate=_.identity] The function invoked per property. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.omitBy(object, _.isNumber); + * // => { 'b': '2' } + */ + function omitBy(object, predicate) { + return pickBy(object, negate(getIteratee(predicate))); + } + + /** + * Creates an object composed of the picked `object` properties. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The source object. + * @param {...(string|string[])} [paths] The property paths to pick. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.pick(object, ['a', 'c']); + * // => { 'a': 1, 'c': 3 } + */ + var pick = flatRest(function (object, paths) { + return object == null ? {} : basePick(object, paths); + }); + + /** + * Creates an object composed of the `object` properties `predicate` returns + * truthy for. The predicate is invoked with two arguments: (value, key). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The source object. + * @param {Function} [predicate=_.identity] The function invoked per property. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.pickBy(object, _.isNumber); + * // => { 'a': 1, 'c': 3 } + */ + function pickBy(object, predicate) { + if (object == null) { + return {}; + } + var props = arrayMap(getAllKeysIn(object), function (prop) { + return [prop]; + }); + predicate = getIteratee(predicate); + return basePickBy(object, props, function (value, path) { + return predicate(value, path[0]); + }); + } + + /** + * This method is like `_.get` except that if the resolved value is a + * function it's invoked with the `this` binding of its parent object and + * its result is returned. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to resolve. + * @param {*} [defaultValue] The value returned for `undefined` resolved values. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] }; + * + * _.result(object, 'a[0].b.c1'); + * // => 3 + * + * _.result(object, 'a[0].b.c2'); + * // => 4 + * + * _.result(object, 'a[0].b.c3', 'default'); + * // => 'default' + * + * _.result(object, 'a[0].b.c3', _.constant('default')); + * // => 'default' + */ + function result(object, path, defaultValue) { + path = castPath(path, object); + + var index = -1, + length = path.length; + + // Ensure the loop is entered when path is empty. + if (!length) { + length = 1; + object = undefined; + } + while (++index < length) { + var value = object == null ? undefined : object[toKey(path[index])]; + if (value === undefined) { + index = length; + value = defaultValue; + } + object = isFunction(value) ? value.call(object) : value; + } + return object; + } + + /** + * Sets the value at `path` of `object`. If a portion of `path` doesn't exist, + * it's created. Arrays are created for missing index properties while objects + * are created for all other missing properties. Use `_.setWith` to customize + * `path` creation. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @returns {Object} Returns `object`. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.set(object, 'a[0].b.c', 4); + * console.log(object.a[0].b.c); + * // => 4 + * + * _.set(object, ['x', '0', 'y', 'z'], 5); + * console.log(object.x[0].y.z); + * // => 5 + */ + function set(object, path, value) { + return object == null ? object : baseSet(object, path, value); + } + + /** + * This method is like `_.set` except that it accepts `customizer` which is + * invoked to produce the objects of `path`. If `customizer` returns `undefined` + * path creation is handled by the method instead. The `customizer` is invoked + * with three arguments: (nsValue, key, nsObject). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @example + * + * var object = {}; + * + * _.setWith(object, '[0][1]', 'a', Object); + * // => { '0': { '1': 'a' } } + */ + function setWith(object, path, value, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return object == null ? object : baseSet(object, path, value, customizer); + } + + /** + * Creates an array of own enumerable string keyed-value pairs for `object` + * which can be consumed by `_.fromPairs`. If `object` is a map or set, its + * entries are returned. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias entries + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the key-value pairs. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.toPairs(new Foo); + * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed) + */ + var toPairs = createToPairs(keys); + + /** + * Creates an array of own and inherited enumerable string keyed-value pairs + * for `object` which can be consumed by `_.fromPairs`. If `object` is a map + * or set, its entries are returned. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias entriesIn + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the key-value pairs. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.toPairsIn(new Foo); + * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed) + */ + var toPairsIn = createToPairs(keysIn); + + /** + * An alternative to `_.reduce`; this method transforms `object` to a new + * `accumulator` object which is the result of running each of its own + * enumerable string keyed properties thru `iteratee`, with each invocation + * potentially mutating the `accumulator` object. If `accumulator` is not + * provided, a new object with the same `[[Prototype]]` will be used. The + * iteratee is invoked with four arguments: (accumulator, value, key, object). + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @since 1.3.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The custom accumulator value. + * @returns {*} Returns the accumulated value. + * @example + * + * _.transform([2, 3, 4], function(result, n) { + * result.push(n *= n); + * return n % 2 == 0; + * }, []); + * // => [4, 9] + * + * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { + * (result[value] || (result[value] = [])).push(key); + * }, {}); + * // => { '1': ['a', 'c'], '2': ['b'] } + */ + function transform(object, iteratee, accumulator) { + var isArr = isArray(object), + isArrLike = isArr || isBuffer(object) || isTypedArray(object); + + iteratee = getIteratee(iteratee, 4); + if (accumulator == null) { + var Ctor = object && object.constructor; + if (isArrLike) { + accumulator = isArr ? new Ctor() : []; + } else if (isObject(object)) { + accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {}; + } else { + accumulator = {}; + } + } + (isArrLike ? arrayEach : baseForOwn)(object, function (value, index, object) { + return iteratee(accumulator, value, index, object); + }); + return accumulator; + } + + /** + * Removes the property at `path` of `object`. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to unset. + * @returns {boolean} Returns `true` if the property is deleted, else `false`. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 7 } }] }; + * _.unset(object, 'a[0].b.c'); + * // => true + * + * console.log(object); + * // => { 'a': [{ 'b': {} }] }; + * + * _.unset(object, ['a', '0', 'b', 'c']); + * // => true + * + * console.log(object); + * // => { 'a': [{ 'b': {} }] }; + */ + function unset(object, path) { + return object == null ? true : baseUnset(object, path); + } + + /** + * This method is like `_.set` except that accepts `updater` to produce the + * value to set. Use `_.updateWith` to customize `path` creation. The `updater` + * is invoked with one argument: (value). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.6.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {Function} updater The function to produce the updated value. + * @returns {Object} Returns `object`. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.update(object, 'a[0].b.c', function(n) { return n * n; }); + * console.log(object.a[0].b.c); + * // => 9 + * + * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; }); + * console.log(object.x[0].y.z); + * // => 0 + */ + function update(object, path, updater) { + return object == null ? object : baseUpdate(object, path, castFunction(updater)); + } + + /** + * This method is like `_.update` except that it accepts `customizer` which is + * invoked to produce the objects of `path`. If `customizer` returns `undefined` + * path creation is handled by the method instead. The `customizer` is invoked + * with three arguments: (nsValue, key, nsObject). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.6.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {Function} updater The function to produce the updated value. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @example + * + * var object = {}; + * + * _.updateWith(object, '[0][1]', _.constant('a'), Object); + * // => { '0': { '1': 'a' } } + */ + function updateWith(object, path, updater, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer); + } + + /** + * Creates an array of the own enumerable string keyed property values of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property values. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.values(new Foo); + * // => [1, 2] (iteration order is not guaranteed) + * + * _.values('hi'); + * // => ['h', 'i'] + */ + function values(object) { + return object == null ? [] : baseValues(object, keys(object)); + } + + /** + * Creates an array of the own and inherited enumerable string keyed property + * values of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property values. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.valuesIn(new Foo); + * // => [1, 2, 3] (iteration order is not guaranteed) + */ + function valuesIn(object) { + return object == null ? [] : baseValues(object, keysIn(object)); + } + + /*------------------------------------------------------------------------*/ + + /** + * Clamps `number` within the inclusive `lower` and `upper` bounds. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Number + * @param {number} number The number to clamp. + * @param {number} [lower] The lower bound. + * @param {number} upper The upper bound. + * @returns {number} Returns the clamped number. + * @example + * + * _.clamp(-10, -5, 5); + * // => -5 + * + * _.clamp(10, -5, 5); + * // => 5 + */ + function clamp(number, lower, upper) { + if (upper === undefined) { + upper = lower; + lower = undefined; + } + if (upper !== undefined) { + upper = toNumber(upper); + upper = upper === upper ? upper : 0; + } + if (lower !== undefined) { + lower = toNumber(lower); + lower = lower === lower ? lower : 0; + } + return baseClamp(toNumber(number), lower, upper); + } + + /** + * Checks if `n` is between `start` and up to, but not including, `end`. If + * `end` is not specified, it's set to `start` with `start` then set to `0`. + * If `start` is greater than `end` the params are swapped to support + * negative ranges. + * + * @static + * @memberOf _ + * @since 3.3.0 + * @category Number + * @param {number} number The number to check. + * @param {number} [start=0] The start of the range. + * @param {number} end The end of the range. + * @returns {boolean} Returns `true` if `number` is in the range, else `false`. + * @see _.range, _.rangeRight + * @example + * + * _.inRange(3, 2, 4); + * // => true + * + * _.inRange(4, 8); + * // => true + * + * _.inRange(4, 2); + * // => false + * + * _.inRange(2, 2); + * // => false + * + * _.inRange(1.2, 2); + * // => true + * + * _.inRange(5.2, 4); + * // => false + * + * _.inRange(-3, -2, -6); + * // => true + */ + function inRange(number, start, end) { + start = toFinite(start); + if (end === undefined) { + end = start; + start = 0; + } else { + end = toFinite(end); + } + number = toNumber(number); + return baseInRange(number, start, end); + } + + /** + * Produces a random number between the inclusive `lower` and `upper` bounds. + * If only one argument is provided a number between `0` and the given number + * is returned. If `floating` is `true`, or either `lower` or `upper` are + * floats, a floating-point number is returned instead of an integer. + * + * **Note:** JavaScript follows the IEEE-754 standard for resolving + * floating-point values which can produce unexpected results. + * + * @static + * @memberOf _ + * @since 0.7.0 + * @category Number + * @param {number} [lower=0] The lower bound. + * @param {number} [upper=1] The upper bound. + * @param {boolean} [floating] Specify returning a floating-point number. + * @returns {number} Returns the random number. + * @example + * + * _.random(0, 5); + * // => an integer between 0 and 5 + * + * _.random(5); + * // => also an integer between 0 and 5 + * + * _.random(5, true); + * // => a floating-point number between 0 and 5 + * + * _.random(1.2, 5.2); + * // => a floating-point number between 1.2 and 5.2 + */ + function random(lower, upper, floating) { + if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) { + upper = floating = undefined; + } + if (floating === undefined) { + if (typeof upper == 'boolean') { + floating = upper; + upper = undefined; + } else if (typeof lower == 'boolean') { + floating = lower; + lower = undefined; + } + } + if (lower === undefined && upper === undefined) { + lower = 0; + upper = 1; + } else { + lower = toFinite(lower); + if (upper === undefined) { + upper = lower; + lower = 0; + } else { + upper = toFinite(upper); + } + } + if (lower > upper) { + var temp = lower; + lower = upper; + upper = temp; + } + if (floating || lower % 1 || upper % 1) { + var rand = nativeRandom(); + return nativeMin( + lower + rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1))), + upper, + ); + } + return baseRandom(lower, upper); + } + + /*------------------------------------------------------------------------*/ + + /** + * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the camel cased string. + * @example + * + * _.camelCase('Foo Bar'); + * // => 'fooBar' + * + * _.camelCase('--foo-bar--'); + * // => 'fooBar' + * + * _.camelCase('__FOO_BAR__'); + * // => 'fooBar' + */ + var camelCase = createCompounder(function (result, word, index) { + word = word.toLowerCase(); + return result + (index ? capitalize(word) : word); + }); + + /** + * Converts the first character of `string` to upper case and the remaining + * to lower case. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to capitalize. + * @returns {string} Returns the capitalized string. + * @example + * + * _.capitalize('FRED'); + * // => 'Fred' + */ + function capitalize(string) { + return upperFirst(toString(string).toLowerCase()); + } + + /** + * Deburrs `string` by converting + * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table) + * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A) + * letters to basic Latin letters and removing + * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to deburr. + * @returns {string} Returns the deburred string. + * @example + * + * _.deburr('déjà vu'); + * // => 'deja vu' + */ + function deburr(string) { + string = toString(string); + return string && string.replace(reLatin, deburrLetter).replace(reComboMark, ''); + } + + /** + * Checks if `string` ends with the given target string. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to inspect. + * @param {string} [target] The string to search for. + * @param {number} [position=string.length] The position to search up to. + * @returns {boolean} Returns `true` if `string` ends with `target`, + * else `false`. + * @example + * + * _.endsWith('abc', 'c'); + * // => true + * + * _.endsWith('abc', 'b'); + * // => false + * + * _.endsWith('abc', 'b', 2); + * // => true + */ + function endsWith(string, target, position) { + string = toString(string); + target = baseToString(target); + + var length = string.length; + position = position === undefined ? length : baseClamp(toInteger(position), 0, length); + + var end = position; + position -= target.length; + return position >= 0 && string.slice(position, end) == target; + } + + /** + * Converts the characters "&", "<", ">", '"', and "'" in `string` to their + * corresponding HTML entities. + * + * **Note:** No other characters are escaped. To escape additional + * characters use a third-party library like [_he_](https://mths.be/he). + * + * Though the ">" character is escaped for symmetry, characters like + * ">" and "/" don't need escaping in HTML and have no special meaning + * unless they're part of a tag or unquoted attribute value. See + * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands) + * (under "semi-related fun fact") for more details. + * + * When working with HTML you should always + * [quote attribute values](http://wonko.com/post/html-escaping) to reduce + * XSS vectors. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category String + * @param {string} [string=''] The string to escape. + * @returns {string} Returns the escaped string. + * @example + * + * _.escape('fred, barney, & pebbles'); + * // => 'fred, barney, & pebbles' + */ + function escape(string) { + string = toString(string); + return string && reHasUnescapedHtml.test(string) + ? string.replace(reUnescapedHtml, escapeHtmlChar) + : string; + } + + /** + * Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+", + * "?", "(", ")", "[", "]", "{", "}", and "|" in `string`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to escape. + * @returns {string} Returns the escaped string. + * @example + * + * _.escapeRegExp('[lodash](https://lodash.com/)'); + * // => '\[lodash\]\(https://lodash\.com/\)' + */ + function escapeRegExp(string) { + string = toString(string); + return string && reHasRegExpChar.test(string) ? string.replace(reRegExpChar, '\\$&') : string; + } + + /** + * Converts `string` to + * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the kebab cased string. + * @example + * + * _.kebabCase('Foo Bar'); + * // => 'foo-bar' + * + * _.kebabCase('fooBar'); + * // => 'foo-bar' + * + * _.kebabCase('__FOO_BAR__'); + * // => 'foo-bar' + */ + var kebabCase = createCompounder(function (result, word, index) { + return result + (index ? '-' : '') + word.toLowerCase(); + }); + + /** + * Converts `string`, as space separated words, to lower case. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the lower cased string. + * @example + * + * _.lowerCase('--Foo-Bar--'); + * // => 'foo bar' + * + * _.lowerCase('fooBar'); + * // => 'foo bar' + * + * _.lowerCase('__FOO_BAR__'); + * // => 'foo bar' + */ + var lowerCase = createCompounder(function (result, word, index) { + return result + (index ? ' ' : '') + word.toLowerCase(); + }); + + /** + * Converts the first character of `string` to lower case. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the converted string. + * @example + * + * _.lowerFirst('Fred'); + * // => 'fred' + * + * _.lowerFirst('FRED'); + * // => 'fRED' + */ + var lowerFirst = createCaseFirst('toLowerCase'); + + /** + * Pads `string` on the left and right sides if it's shorter than `length`. + * Padding characters are truncated if they can't be evenly divided by `length`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to pad. + * @param {number} [length=0] The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padded string. + * @example + * + * _.pad('abc', 8); + * // => ' abc ' + * + * _.pad('abc', 8, '_-'); + * // => '_-abc_-_' + * + * _.pad('abc', 3); + * // => 'abc' + */ + function pad(string, length, chars) { + string = toString(string); + length = toInteger(length); + + var strLength = length ? stringSize(string) : 0; + if (!length || strLength >= length) { + return string; + } + var mid = (length - strLength) / 2; + return createPadding(nativeFloor(mid), chars) + string + createPadding(nativeCeil(mid), chars); + } + + /** + * Pads `string` on the right side if it's shorter than `length`. Padding + * characters are truncated if they exceed `length`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to pad. + * @param {number} [length=0] The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padded string. + * @example + * + * _.padEnd('abc', 6); + * // => 'abc ' + * + * _.padEnd('abc', 6, '_-'); + * // => 'abc_-_' + * + * _.padEnd('abc', 3); + * // => 'abc' + */ + function padEnd(string, length, chars) { + string = toString(string); + length = toInteger(length); + + var strLength = length ? stringSize(string) : 0; + return length && strLength < length + ? string + createPadding(length - strLength, chars) + : string; + } + + /** + * Pads `string` on the left side if it's shorter than `length`. Padding + * characters are truncated if they exceed `length`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to pad. + * @param {number} [length=0] The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padded string. + * @example + * + * _.padStart('abc', 6); + * // => ' abc' + * + * _.padStart('abc', 6, '_-'); + * // => '_-_abc' + * + * _.padStart('abc', 3); + * // => 'abc' + */ + function padStart(string, length, chars) { + string = toString(string); + length = toInteger(length); + + var strLength = length ? stringSize(string) : 0; + return length && strLength < length + ? createPadding(length - strLength, chars) + string + : string; + } + + /** + * Converts `string` to an integer of the specified radix. If `radix` is + * `undefined` or `0`, a `radix` of `10` is used unless `value` is a + * hexadecimal, in which case a `radix` of `16` is used. + * + * **Note:** This method aligns with the + * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category String + * @param {string} string The string to convert. + * @param {number} [radix=10] The radix to interpret `value` by. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {number} Returns the converted integer. + * @example + * + * _.parseInt('08'); + * // => 8 + * + * _.map(['6', '08', '10'], _.parseInt); + * // => [6, 8, 10] + */ + function parseInt(string, radix, guard) { + if (guard || radix == null) { + radix = 0; + } else if (radix) { + radix = +radix; + } + return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0); + } + + /** + * Repeats the given string `n` times. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to repeat. + * @param {number} [n=1] The number of times to repeat the string. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {string} Returns the repeated string. + * @example + * + * _.repeat('*', 3); + * // => '***' + * + * _.repeat('abc', 2); + * // => 'abcabc' + * + * _.repeat('abc', 0); + * // => '' + */ + function repeat(string, n, guard) { + if (guard ? isIterateeCall(string, n, guard) : n === undefined) { + n = 1; + } else { + n = toInteger(n); + } + return baseRepeat(toString(string), n); + } + + /** + * Replaces matches for `pattern` in `string` with `replacement`. + * + * **Note:** This method is based on + * [`String#replace`](https://mdn.io/String/replace). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to modify. + * @param {RegExp|string} pattern The pattern to replace. + * @param {Function|string} replacement The match replacement. + * @returns {string} Returns the modified string. + * @example + * + * _.replace('Hi Fred', 'Fred', 'Barney'); + * // => 'Hi Barney' + */ + function replace() { + var args = arguments, + string = toString(args[0]); + + return args.length < 3 ? string : string.replace(args[1], args[2]); + } + + /** + * Converts `string` to + * [snake case](https://en.wikipedia.org/wiki/Snake_case). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the snake cased string. + * @example + * + * _.snakeCase('Foo Bar'); + * // => 'foo_bar' + * + * _.snakeCase('fooBar'); + * // => 'foo_bar' + * + * _.snakeCase('--FOO-BAR--'); + * // => 'foo_bar' + */ + var snakeCase = createCompounder(function (result, word, index) { + return result + (index ? '_' : '') + word.toLowerCase(); + }); + + /** + * Splits `string` by `separator`. + * + * **Note:** This method is based on + * [`String#split`](https://mdn.io/String/split). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to split. + * @param {RegExp|string} separator The separator pattern to split by. + * @param {number} [limit] The length to truncate results to. + * @returns {Array} Returns the string segments. + * @example + * + * _.split('a-b-c', '-', 2); + * // => ['a', 'b'] + */ + function split(string, separator, limit) { + if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) { + separator = limit = undefined; + } + limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0; + if (!limit) { + return []; + } + string = toString(string); + if (string && (typeof separator == 'string' || (separator != null && !isRegExp(separator)))) { + separator = baseToString(separator); + if (!separator && hasUnicode(string)) { + return castSlice(stringToArray(string), 0, limit); + } + } + return string.split(separator, limit); + } + + /** + * Converts `string` to + * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage). + * + * @static + * @memberOf _ + * @since 3.1.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the start cased string. + * @example + * + * _.startCase('--foo-bar--'); + * // => 'Foo Bar' + * + * _.startCase('fooBar'); + * // => 'Foo Bar' + * + * _.startCase('__FOO_BAR__'); + * // => 'FOO BAR' + */ + var startCase = createCompounder(function (result, word, index) { + return result + (index ? ' ' : '') + upperFirst(word); + }); + + /** + * Checks if `string` starts with the given target string. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to inspect. + * @param {string} [target] The string to search for. + * @param {number} [position=0] The position to search from. + * @returns {boolean} Returns `true` if `string` starts with `target`, + * else `false`. + * @example + * + * _.startsWith('abc', 'a'); + * // => true + * + * _.startsWith('abc', 'b'); + * // => false + * + * _.startsWith('abc', 'b', 1); + * // => true + */ + function startsWith(string, target, position) { + string = toString(string); + position = position == null ? 0 : baseClamp(toInteger(position), 0, string.length); + + target = baseToString(target); + return string.slice(position, position + target.length) == target; + } + + /** + * Creates a compiled template function that can interpolate data properties + * in "interpolate" delimiters, HTML-escape interpolated data properties in + * "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data + * properties may be accessed as free variables in the template. If a setting + * object is given, it takes precedence over `_.templateSettings` values. + * + * **Note:** In the development build `_.template` utilizes + * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl) + * for easier debugging. + * + * For more information on precompiling templates see + * [lodash's custom builds documentation](https://lodash.com/custom-builds). + * + * For more information on Chrome extension sandboxes see + * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval). + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category String + * @param {string} [string=''] The template string. + * @param {Object} [options={}] The options object. + * @param {RegExp} [options.escape=_.templateSettings.escape] + * The HTML "escape" delimiter. + * @param {RegExp} [options.evaluate=_.templateSettings.evaluate] + * The "evaluate" delimiter. + * @param {Object} [options.imports=_.templateSettings.imports] + * An object to import into the template as free variables. + * @param {RegExp} [options.interpolate=_.templateSettings.interpolate] + * The "interpolate" delimiter. + * @param {string} [options.sourceURL='lodash.templateSources[n]'] + * The sourceURL of the compiled template. + * @param {string} [options.variable='obj'] + * The data object variable name. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the compiled template function. + * @example + * + * // Use the "interpolate" delimiter to create a compiled template. + * var compiled = _.template('hello <%= user %>!'); + * compiled({ 'user': 'fred' }); + * // => 'hello fred!' + * + * // Use the HTML "escape" delimiter to escape data property values. + * var compiled = _.template('<b><%- value %></b>'); + * compiled({ 'value': '<script>' }); + * // => '<b><script></b>' + * + * // Use the "evaluate" delimiter to execute JavaScript and generate HTML. + * var compiled = _.template('<% _.forEach(users, function(user) { %><li><%- user %></li><% }); %>'); + * compiled({ 'users': ['fred', 'barney'] }); + * // => '<li>fred</li><li>barney</li>' + * + * // Use the internal `print` function in "evaluate" delimiters. + * var compiled = _.template('<% print("hello " + user); %>!'); + * compiled({ 'user': 'barney' }); + * // => 'hello barney!' + * + * // Use the ES template literal delimiter as an "interpolate" delimiter. + * // Disable support by replacing the "interpolate" delimiter. + * var compiled = _.template('hello ${ user }!'); + * compiled({ 'user': 'pebbles' }); + * // => 'hello pebbles!' + * + * // Use backslashes to treat delimiters as plain text. + * var compiled = _.template('<%= "\\<%- value %\\>" %>'); + * compiled({ 'value': 'ignored' }); + * // => '<%- value %>' + * + * // Use the `imports` option to import `jQuery` as `jq`. + * var text = '<% jq.each(users, function(user) { %><li><%- user %></li><% }); %>'; + * var compiled = _.template(text, { 'imports': { 'jq': jQuery } }); + * compiled({ 'users': ['fred', 'barney'] }); + * // => '<li>fred</li><li>barney</li>' + * + * // Use the `sourceURL` option to specify a custom sourceURL for the template. + * var compiled = _.template('hello <%= user %>!', { 'sourceURL': '/basic/greeting.jst' }); + * compiled(data); + * // => Find the source of "greeting.jst" under the Sources tab or Resources panel of the web inspector. + * + * // Use the `variable` option to ensure a with-statement isn't used in the compiled template. + * var compiled = _.template('hi <%= data.user %>!', { 'variable': 'data' }); + * compiled.source; + * // => function(data) { + * // var __t, __p = ''; + * // __p += 'hi ' + ((__t = ( data.user )) == null ? '' : __t) + '!'; + * // return __p; + * // } + * + * // Use custom template delimiters. + * _.templateSettings.interpolate = /{{([\s\S]+?)}}/g; + * var compiled = _.template('hello {{ user }}!'); + * compiled({ 'user': 'mustache' }); + * // => 'hello mustache!' + * + * // Use the `source` property to inline compiled templates for meaningful + * // line numbers in error messages and stack traces. + * fs.writeFileSync(path.join(process.cwd(), 'jst.js'), '\ + * var JST = {\ + * "main": ' + _.template(mainText).source + '\ + * };\ + * '); + */ + function template(string, options, guard) { + // Based on John Resig's `tmpl` implementation + // (http://ejohn.org/blog/javascript-micro-templating/) + // and Laura Doktorova's doT.js (https://github.com/olado/doT). + var settings = lodash.templateSettings; + + if (guard && isIterateeCall(string, options, guard)) { + options = undefined; + } + string = toString(string); + options = assignInWith({}, options, settings, customDefaultsAssignIn); + + var imports = assignInWith({}, options.imports, settings.imports, customDefaultsAssignIn), + importsKeys = keys(imports), + importsValues = baseValues(imports, importsKeys); + + var isEscaping, + isEvaluating, + index = 0, + interpolate = options.interpolate || reNoMatch, + source = "__p += '"; + + // Compile the regexp to match each delimiter. + var reDelimiters = RegExp( + (options.escape || reNoMatch).source + + '|' + + interpolate.source + + '|' + + (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + + '|' + + (options.evaluate || reNoMatch).source + + '|$', + 'g', + ); + + // Use a sourceURL for easier debugging. + // The sourceURL gets injected into the source that's eval-ed, so be careful + // with lookup (in case of e.g. prototype pollution), and strip newlines if any. + // A newline wouldn't be a valid sourceURL anyway, and it'd enable code injection. + var sourceURL = + '//# sourceURL=' + + (hasOwnProperty.call(options, 'sourceURL') + ? (options.sourceURL + '').replace(/[\r\n]/g, ' ') + : 'lodash.templateSources[' + ++templateCounter + ']') + + '\n'; + + string.replace( + reDelimiters, + function (match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) { + interpolateValue || (interpolateValue = esTemplateValue); + + // Escape characters that can't be included in string literals. + source += string.slice(index, offset).replace(reUnescapedString, escapeStringChar); + + // Replace delimiters with snippets. + if (escapeValue) { + isEscaping = true; + source += "' +\n__e(" + escapeValue + ") +\n'"; + } + if (evaluateValue) { + isEvaluating = true; + source += "';\n" + evaluateValue + ";\n__p += '"; + } + if (interpolateValue) { + source += "' +\n((__t = (" + interpolateValue + ")) == null ? '' : __t) +\n'"; + } + index = offset + match.length; + + // The JS engine embedded in Adobe products needs `match` returned in + // order to produce the correct `offset` value. + return match; + }, + ); + + source += "';\n"; + + // If `variable` is not specified wrap a with-statement around the generated + // code to add the data object to the top of the scope chain. + // Like with sourceURL, we take care to not check the option's prototype, + // as this configuration is a code injection vector. + var variable = hasOwnProperty.call(options, 'variable') && options.variable; + if (!variable) { + source = 'with (obj) {\n' + source + '\n}\n'; + } + // Cleanup code by stripping empty strings. + source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source) + .replace(reEmptyStringMiddle, '$1') + .replace(reEmptyStringTrailing, '$1;'); + + // Frame code as the function body. + source = + 'function(' + + (variable || 'obj') + + ') {\n' + + (variable ? '' : 'obj || (obj = {});\n') + + "var __t, __p = ''" + + (isEscaping ? ', __e = _.escape' : '') + + (isEvaluating + ? ', __j = Array.prototype.join;\n' + + "function print() { __p += __j.call(arguments, '') }\n" + : ';\n') + + source + + 'return __p\n}'; + + var result = attempt(function () { + return Function(importsKeys, sourceURL + 'return ' + source).apply(undefined, importsValues); + }); + + // Provide the compiled function's source by its `toString` method or + // the `source` property as a convenience for inlining compiled templates. + result.source = source; + if (isError(result)) { + throw result; + } + return result; + } + + /** + * Converts `string`, as a whole, to lower case just like + * [String#toLowerCase](https://mdn.io/toLowerCase). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the lower cased string. + * @example + * + * _.toLower('--Foo-Bar--'); + * // => '--foo-bar--' + * + * _.toLower('fooBar'); + * // => 'foobar' + * + * _.toLower('__FOO_BAR__'); + * // => '__foo_bar__' + */ + function toLower(value) { + return toString(value).toLowerCase(); + } + + /** + * Converts `string`, as a whole, to upper case just like + * [String#toUpperCase](https://mdn.io/toUpperCase). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the upper cased string. + * @example + * + * _.toUpper('--foo-bar--'); + * // => '--FOO-BAR--' + * + * _.toUpper('fooBar'); + * // => 'FOOBAR' + * + * _.toUpper('__foo_bar__'); + * // => '__FOO_BAR__' + */ + function toUpper(value) { + return toString(value).toUpperCase(); + } + + /** + * Removes leading and trailing whitespace or specified characters from `string`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to trim. + * @param {string} [chars=whitespace] The characters to trim. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {string} Returns the trimmed string. + * @example + * + * _.trim(' abc '); + * // => 'abc' + * + * _.trim('-_-abc-_-', '_-'); + * // => 'abc' + * + * _.map([' foo ', ' bar '], _.trim); + * // => ['foo', 'bar'] + */ + function trim(string, chars, guard) { + string = toString(string); + if (string && (guard || chars === undefined)) { + return string.replace(reTrim, ''); + } + if (!string || !(chars = baseToString(chars))) { + return string; + } + var strSymbols = stringToArray(string), + chrSymbols = stringToArray(chars), + start = charsStartIndex(strSymbols, chrSymbols), + end = charsEndIndex(strSymbols, chrSymbols) + 1; + + return castSlice(strSymbols, start, end).join(''); + } + + /** + * Removes trailing whitespace or specified characters from `string`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to trim. + * @param {string} [chars=whitespace] The characters to trim. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {string} Returns the trimmed string. + * @example + * + * _.trimEnd(' abc '); + * // => ' abc' + * + * _.trimEnd('-_-abc-_-', '_-'); + * // => '-_-abc' + */ + function trimEnd(string, chars, guard) { + string = toString(string); + if (string && (guard || chars === undefined)) { + return string.replace(reTrimEnd, ''); + } + if (!string || !(chars = baseToString(chars))) { + return string; + } + var strSymbols = stringToArray(string), + end = charsEndIndex(strSymbols, stringToArray(chars)) + 1; + + return castSlice(strSymbols, 0, end).join(''); + } + + /** + * Removes leading whitespace or specified characters from `string`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to trim. + * @param {string} [chars=whitespace] The characters to trim. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {string} Returns the trimmed string. + * @example + * + * _.trimStart(' abc '); + * // => 'abc ' + * + * _.trimStart('-_-abc-_-', '_-'); + * // => 'abc-_-' + */ + function trimStart(string, chars, guard) { + string = toString(string); + if (string && (guard || chars === undefined)) { + return string.replace(reTrimStart, ''); + } + if (!string || !(chars = baseToString(chars))) { + return string; + } + var strSymbols = stringToArray(string), + start = charsStartIndex(strSymbols, stringToArray(chars)); + + return castSlice(strSymbols, start).join(''); + } + + /** + * Truncates `string` if it's longer than the given maximum string length. + * The last characters of the truncated string are replaced with the omission + * string which defaults to "...". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to truncate. + * @param {Object} [options={}] The options object. + * @param {number} [options.length=30] The maximum string length. + * @param {string} [options.omission='...'] The string to indicate text is omitted. + * @param {RegExp|string} [options.separator] The separator pattern to truncate to. + * @returns {string} Returns the truncated string. + * @example + * + * _.truncate('hi-diddly-ho there, neighborino'); + * // => 'hi-diddly-ho there, neighbo...' + * + * _.truncate('hi-diddly-ho there, neighborino', { + * 'length': 24, + * 'separator': ' ' + * }); + * // => 'hi-diddly-ho there,...' + * + * _.truncate('hi-diddly-ho there, neighborino', { + * 'length': 24, + * 'separator': /,? +/ + * }); + * // => 'hi-diddly-ho there...' + * + * _.truncate('hi-diddly-ho there, neighborino', { + * 'omission': ' [...]' + * }); + * // => 'hi-diddly-ho there, neig [...]' + */ + function truncate(string, options) { + var length = DEFAULT_TRUNC_LENGTH, + omission = DEFAULT_TRUNC_OMISSION; + + if (isObject(options)) { + var separator = 'separator' in options ? options.separator : separator; + length = 'length' in options ? toInteger(options.length) : length; + omission = 'omission' in options ? baseToString(options.omission) : omission; + } + string = toString(string); + + var strLength = string.length; + if (hasUnicode(string)) { + var strSymbols = stringToArray(string); + strLength = strSymbols.length; + } + if (length >= strLength) { + return string; + } + var end = length - stringSize(omission); + if (end < 1) { + return omission; + } + var result = strSymbols ? castSlice(strSymbols, 0, end).join('') : string.slice(0, end); + + if (separator === undefined) { + return result + omission; + } + if (strSymbols) { + end += result.length - end; + } + if (isRegExp(separator)) { + if (string.slice(end).search(separator)) { + var match, + substring = result; + + if (!separator.global) { + separator = RegExp(separator.source, toString(reFlags.exec(separator)) + 'g'); + } + separator.lastIndex = 0; + while ((match = separator.exec(substring))) { + var newEnd = match.index; + } + result = result.slice(0, newEnd === undefined ? end : newEnd); + } + } else if (string.indexOf(baseToString(separator), end) != end) { + var index = result.lastIndexOf(separator); + if (index > -1) { + result = result.slice(0, index); + } + } + return result + omission; + } + + /** + * The inverse of `_.escape`; this method converts the HTML entities + * `&`, `<`, `>`, `"`, and `'` in `string` to + * their corresponding characters. + * + * **Note:** No other HTML entities are unescaped. To unescape additional + * HTML entities use a third-party library like [_he_](https://mths.be/he). + * + * @static + * @memberOf _ + * @since 0.6.0 + * @category String + * @param {string} [string=''] The string to unescape. + * @returns {string} Returns the unescaped string. + * @example + * + * _.unescape('fred, barney, & pebbles'); + * // => 'fred, barney, & pebbles' + */ + function unescape(string) { + string = toString(string); + return string && reHasEscapedHtml.test(string) + ? string.replace(reEscapedHtml, unescapeHtmlChar) + : string; + } + + /** + * Converts `string`, as space separated words, to upper case. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the upper cased string. + * @example + * + * _.upperCase('--foo-bar'); + * // => 'FOO BAR' + * + * _.upperCase('fooBar'); + * // => 'FOO BAR' + * + * _.upperCase('__foo_bar__'); + * // => 'FOO BAR' + */ + var upperCase = createCompounder(function (result, word, index) { + return result + (index ? ' ' : '') + word.toUpperCase(); + }); + + /** + * Converts the first character of `string` to upper case. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the converted string. + * @example + * + * _.upperFirst('fred'); + * // => 'Fred' + * + * _.upperFirst('FRED'); + * // => 'FRED' + */ + var upperFirst = createCaseFirst('toUpperCase'); + + /** + * Splits `string` into an array of its words. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to inspect. + * @param {RegExp|string} [pattern] The pattern to match words. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the words of `string`. + * @example + * + * _.words('fred, barney, & pebbles'); + * // => ['fred', 'barney', 'pebbles'] + * + * _.words('fred, barney, & pebbles', /[^, ]+/g); + * // => ['fred', 'barney', '&', 'pebbles'] + */ + function words(string, pattern, guard) { + string = toString(string); + pattern = guard ? undefined : pattern; + + if (pattern === undefined) { + return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string); + } + return string.match(pattern) || []; + } + + /*------------------------------------------------------------------------*/ + + /** + * Attempts to invoke `func`, returning either the result or the caught error + * object. Any additional arguments are provided to `func` when it's invoked. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Util + * @param {Function} func The function to attempt. + * @param {...*} [args] The arguments to invoke `func` with. + * @returns {*} Returns the `func` result or error object. + * @example + * + * // Avoid throwing errors for invalid selectors. + * var elements = _.attempt(function(selector) { + * return document.querySelectorAll(selector); + * }, '>_>'); + * + * if (_.isError(elements)) { + * elements = []; + * } + */ + var attempt = baseRest(function (func, args) { + try { + return apply(func, undefined, args); + } catch (e) { + return isError(e) ? e : new Error(e); + } + }); + + /** + * Binds methods of an object to the object itself, overwriting the existing + * method. + * + * **Note:** This method doesn't set the "length" property of bound functions. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {Object} object The object to bind and assign the bound methods to. + * @param {...(string|string[])} methodNames The object method names to bind. + * @returns {Object} Returns `object`. + * @example + * + * var view = { + * 'label': 'docs', + * 'click': function() { + * console.log('clicked ' + this.label); + * } + * }; + * + * _.bindAll(view, ['click']); + * jQuery(element).on('click', view.click); + * // => Logs 'clicked docs' when clicked. + */ + var bindAll = flatRest(function (object, methodNames) { + arrayEach(methodNames, function (key) { + key = toKey(key); + baseAssignValue(object, key, bind(object[key], object)); + }); + return object; + }); + + /** + * Creates a function that iterates over `pairs` and invokes the corresponding + * function of the first predicate to return truthy. The predicate-function + * pairs are invoked with the `this` binding and arguments of the created + * function. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Util + * @param {Array} pairs The predicate-function pairs. + * @returns {Function} Returns the new composite function. + * @example + * + * var func = _.cond([ + * [_.matches({ 'a': 1 }), _.constant('matches A')], + * [_.conforms({ 'b': _.isNumber }), _.constant('matches B')], + * [_.stubTrue, _.constant('no match')] + * ]); + * + * func({ 'a': 1, 'b': 2 }); + * // => 'matches A' + * + * func({ 'a': 0, 'b': 1 }); + * // => 'matches B' + * + * func({ 'a': '1', 'b': '2' }); + * // => 'no match' + */ + function cond(pairs) { + var length = pairs == null ? 0 : pairs.length, + toIteratee = getIteratee(); + + pairs = !length + ? [] + : arrayMap(pairs, function (pair) { + if (typeof pair[1] != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + return [toIteratee(pair[0]), pair[1]]; + }); + + return baseRest(function (args) { + var index = -1; + while (++index < length) { + var pair = pairs[index]; + if (apply(pair[0], this, args)) { + return apply(pair[1], this, args); + } + } + }); + } + + /** + * Creates a function that invokes the predicate properties of `source` with + * the corresponding property values of a given object, returning `true` if + * all predicates return truthy, else `false`. + * + * **Note:** The created function is equivalent to `_.conformsTo` with + * `source` partially applied. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Util + * @param {Object} source The object of property predicates to conform to. + * @returns {Function} Returns the new spec function. + * @example + * + * var objects = [ + * { 'a': 2, 'b': 1 }, + * { 'a': 1, 'b': 2 } + * ]; + * + * _.filter(objects, _.conforms({ 'b': function(n) { return n > 1; } })); + * // => [{ 'a': 1, 'b': 2 }] + */ + function conforms(source) { + return baseConforms(baseClone(source, CLONE_DEEP_FLAG)); + } + + /** + * Creates a function that returns `value`. + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Util + * @param {*} value The value to return from the new function. + * @returns {Function} Returns the new constant function. + * @example + * + * var objects = _.times(2, _.constant({ 'a': 1 })); + * + * console.log(objects); + * // => [{ 'a': 1 }, { 'a': 1 }] + * + * console.log(objects[0] === objects[1]); + * // => true + */ + function constant(value) { + return function () { + return value; + }; + } + + /** + * Checks `value` to determine whether a default value should be returned in + * its place. The `defaultValue` is returned if `value` is `NaN`, `null`, + * or `undefined`. + * + * @static + * @memberOf _ + * @since 4.14.0 + * @category Util + * @param {*} value The value to check. + * @param {*} defaultValue The default value. + * @returns {*} Returns the resolved value. + * @example + * + * _.defaultTo(1, 10); + * // => 1 + * + * _.defaultTo(undefined, 10); + * // => 10 + */ + function defaultTo(value, defaultValue) { + return value == null || value !== value ? defaultValue : value; + } + + /** + * Creates a function that returns the result of invoking the given functions + * with the `this` binding of the created function, where each successive + * invocation is supplied the return value of the previous. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Util + * @param {...(Function|Function[])} [funcs] The functions to invoke. + * @returns {Function} Returns the new composite function. + * @see _.flowRight + * @example + * + * function square(n) { + * return n * n; + * } + * + * var addSquare = _.flow([_.add, square]); + * addSquare(1, 2); + * // => 9 + */ + var flow = createFlow(); + + /** + * This method is like `_.flow` except that it creates a function that + * invokes the given functions from right to left. + * + * @static + * @since 3.0.0 + * @memberOf _ + * @category Util + * @param {...(Function|Function[])} [funcs] The functions to invoke. + * @returns {Function} Returns the new composite function. + * @see _.flow + * @example + * + * function square(n) { + * return n * n; + * } + * + * var addSquare = _.flowRight([square, _.add]); + * addSquare(1, 2); + * // => 9 + */ + var flowRight = createFlow(true); + + /** + * This method returns the first argument it receives. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {*} value Any value. + * @returns {*} Returns `value`. + * @example + * + * var object = { 'a': 1 }; + * + * console.log(_.identity(object) === object); + * // => true + */ + function identity(value) { + return value; + } + + /** + * Creates a function that invokes `func` with the arguments of the created + * function. If `func` is a property name, the created function returns the + * property value for a given element. If `func` is an array or object, the + * created function returns `true` for elements that contain the equivalent + * source properties, otherwise it returns `false`. + * + * @static + * @since 4.0.0 + * @memberOf _ + * @category Util + * @param {*} [func=_.identity] The value to convert to a callback. + * @returns {Function} Returns the callback. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * // The `_.matches` iteratee shorthand. + * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true })); + * // => [{ 'user': 'barney', 'age': 36, 'active': true }] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.filter(users, _.iteratee(['user', 'fred'])); + * // => [{ 'user': 'fred', 'age': 40 }] + * + * // The `_.property` iteratee shorthand. + * _.map(users, _.iteratee('user')); + * // => ['barney', 'fred'] + * + * // Create custom iteratee shorthands. + * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) { + * return !_.isRegExp(func) ? iteratee(func) : function(string) { + * return func.test(string); + * }; + * }); + * + * _.filter(['abc', 'def'], /ef/); + * // => ['def'] + */ + function iteratee(func) { + return baseIteratee(typeof func == 'function' ? func : baseClone(func, CLONE_DEEP_FLAG)); + } + + /** + * Creates a function that performs a partial deep comparison between a given + * object and `source`, returning `true` if the given object has equivalent + * property values, else `false`. + * + * **Note:** The created function is equivalent to `_.isMatch` with `source` + * partially applied. + * + * Partial comparisons will match empty array and empty object `source` + * values against any array or object value, respectively. See `_.isEqual` + * for a list of supported value comparisons. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Util + * @param {Object} source The object of property values to match. + * @returns {Function} Returns the new spec function. + * @example + * + * var objects = [ + * { 'a': 1, 'b': 2, 'c': 3 }, + * { 'a': 4, 'b': 5, 'c': 6 } + * ]; + * + * _.filter(objects, _.matches({ 'a': 4, 'c': 6 })); + * // => [{ 'a': 4, 'b': 5, 'c': 6 }] + */ + function matches(source) { + return baseMatches(baseClone(source, CLONE_DEEP_FLAG)); + } + + /** + * Creates a function that performs a partial deep comparison between the + * value at `path` of a given object to `srcValue`, returning `true` if the + * object value is equivalent, else `false`. + * + * **Note:** Partial comparisons will match empty array and empty object + * `srcValue` values against any array or object value, respectively. See + * `_.isEqual` for a list of supported value comparisons. + * + * @static + * @memberOf _ + * @since 3.2.0 + * @category Util + * @param {Array|string} path The path of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + * @example + * + * var objects = [ + * { 'a': 1, 'b': 2, 'c': 3 }, + * { 'a': 4, 'b': 5, 'c': 6 } + * ]; + * + * _.find(objects, _.matchesProperty('a', 4)); + * // => { 'a': 4, 'b': 5, 'c': 6 } + */ + function matchesProperty(path, srcValue) { + return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG)); + } + + /** + * Creates a function that invokes the method at `path` of a given object. + * Any additional arguments are provided to the invoked method. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Util + * @param {Array|string} path The path of the method to invoke. + * @param {...*} [args] The arguments to invoke the method with. + * @returns {Function} Returns the new invoker function. + * @example + * + * var objects = [ + * { 'a': { 'b': _.constant(2) } }, + * { 'a': { 'b': _.constant(1) } } + * ]; + * + * _.map(objects, _.method('a.b')); + * // => [2, 1] + * + * _.map(objects, _.method(['a', 'b'])); + * // => [2, 1] + */ + var method = baseRest(function (path, args) { + return function (object) { + return baseInvoke(object, path, args); + }; + }); + + /** + * The opposite of `_.method`; this method creates a function that invokes + * the method at a given path of `object`. Any additional arguments are + * provided to the invoked method. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Util + * @param {Object} object The object to query. + * @param {...*} [args] The arguments to invoke the method with. + * @returns {Function} Returns the new invoker function. + * @example + * + * var array = _.times(3, _.constant), + * object = { 'a': array, 'b': array, 'c': array }; + * + * _.map(['a[2]', 'c[0]'], _.methodOf(object)); + * // => [2, 0] + * + * _.map([['a', '2'], ['c', '0']], _.methodOf(object)); + * // => [2, 0] + */ + var methodOf = baseRest(function (object, args) { + return function (path) { + return baseInvoke(object, path, args); + }; + }); + + /** + * Adds all own enumerable string keyed function properties of a source + * object to the destination object. If `object` is a function, then methods + * are added to its prototype as well. + * + * **Note:** Use `_.runInContext` to create a pristine `lodash` function to + * avoid conflicts caused by modifying the original. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {Function|Object} [object=lodash] The destination object. + * @param {Object} source The object of functions to add. + * @param {Object} [options={}] The options object. + * @param {boolean} [options.chain=true] Specify whether mixins are chainable. + * @returns {Function|Object} Returns `object`. + * @example + * + * function vowels(string) { + * return _.filter(string, function(v) { + * return /[aeiou]/i.test(v); + * }); + * } + * + * _.mixin({ 'vowels': vowels }); + * _.vowels('fred'); + * // => ['e'] + * + * _('fred').vowels().value(); + * // => ['e'] + * + * _.mixin({ 'vowels': vowels }, { 'chain': false }); + * _('fred').vowels(); + * // => ['e'] + */ + function mixin(object, source, options) { + var props = keys(source), + methodNames = baseFunctions(source, props); + + if (options == null && !(isObject(source) && (methodNames.length || !props.length))) { + options = source; + source = object; + object = this; + methodNames = baseFunctions(source, keys(source)); + } + var chain = !(isObject(options) && 'chain' in options) || !!options.chain, + isFunc = isFunction(object); + + arrayEach(methodNames, function (methodName) { + var func = source[methodName]; + object[methodName] = func; + if (isFunc) { + object.prototype[methodName] = function () { + var chainAll = this.__chain__; + if (chain || chainAll) { + var result = object(this.__wrapped__), + actions = (result.__actions__ = copyArray(this.__actions__)); + + actions.push({ func: func, args: arguments, thisArg: object }); + result.__chain__ = chainAll; + return result; + } + return func.apply(object, arrayPush([this.value()], arguments)); + }; + } + }); + + return object; + } + + /** + * Reverts the `_` variable to its previous value and returns a reference to + * the `lodash` function. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @returns {Function} Returns the `lodash` function. + * @example + * + * var lodash = _.noConflict(); + */ + function noConflict() { + if (root._ === this) { + root._ = oldDash; + } + return this; + } + + /** + * This method returns `undefined`. + * + * @static + * @memberOf _ + * @since 2.3.0 + * @category Util + * @example + * + * _.times(2, _.noop); + * // => [undefined, undefined] + */ + function noop() { + // No operation performed. + } + + /** + * Creates a function that gets the argument at index `n`. If `n` is negative, + * the nth argument from the end is returned. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Util + * @param {number} [n=0] The index of the argument to return. + * @returns {Function} Returns the new pass-thru function. + * @example + * + * var func = _.nthArg(1); + * func('a', 'b', 'c', 'd'); + * // => 'b' + * + * var func = _.nthArg(-2); + * func('a', 'b', 'c', 'd'); + * // => 'c' + */ + function nthArg(n) { + n = toInteger(n); + return baseRest(function (args) { + return baseNth(args, n); + }); + } + + /** + * Creates a function that invokes `iteratees` with the arguments it receives + * and returns their results. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Util + * @param {...(Function|Function[])} [iteratees=[_.identity]] + * The iteratees to invoke. + * @returns {Function} Returns the new function. + * @example + * + * var func = _.over([Math.max, Math.min]); + * + * func(1, 2, 3, 4); + * // => [4, 1] + */ + var over = createOver(arrayMap); + + /** + * Creates a function that checks if **all** of the `predicates` return + * truthy when invoked with the arguments it receives. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Util + * @param {...(Function|Function[])} [predicates=[_.identity]] + * The predicates to check. + * @returns {Function} Returns the new function. + * @example + * + * var func = _.overEvery([Boolean, isFinite]); + * + * func('1'); + * // => true + * + * func(null); + * // => false + * + * func(NaN); + * // => false + */ + var overEvery = createOver(arrayEvery); + + /** + * Creates a function that checks if **any** of the `predicates` return + * truthy when invoked with the arguments it receives. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Util + * @param {...(Function|Function[])} [predicates=[_.identity]] + * The predicates to check. + * @returns {Function} Returns the new function. + * @example + * + * var func = _.overSome([Boolean, isFinite]); + * + * func('1'); + * // => true + * + * func(null); + * // => true + * + * func(NaN); + * // => false + */ + var overSome = createOver(arraySome); + + /** + * Creates a function that returns the value at `path` of a given object. + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Util + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new accessor function. + * @example + * + * var objects = [ + * { 'a': { 'b': 2 } }, + * { 'a': { 'b': 1 } } + * ]; + * + * _.map(objects, _.property('a.b')); + * // => [2, 1] + * + * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b'); + * // => [1, 2] + */ + function property(path) { + return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path); + } + + /** + * The opposite of `_.property`; this method creates a function that returns + * the value at a given path of `object`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Util + * @param {Object} object The object to query. + * @returns {Function} Returns the new accessor function. + * @example + * + * var array = [0, 1, 2], + * object = { 'a': array, 'b': array, 'c': array }; + * + * _.map(['a[2]', 'c[0]'], _.propertyOf(object)); + * // => [2, 0] + * + * _.map([['a', '2'], ['c', '0']], _.propertyOf(object)); + * // => [2, 0] + */ + function propertyOf(object) { + return function (path) { + return object == null ? undefined : baseGet(object, path); + }; + } + + /** + * Creates an array of numbers (positive and/or negative) progressing from + * `start` up to, but not including, `end`. A step of `-1` is used if a negative + * `start` is specified without an `end` or `step`. If `end` is not specified, + * it's set to `start` with `start` then set to `0`. + * + * **Note:** JavaScript follows the IEEE-754 standard for resolving + * floating-point values which can produce unexpected results. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {number} [start=0] The start of the range. + * @param {number} end The end of the range. + * @param {number} [step=1] The value to increment or decrement by. + * @returns {Array} Returns the range of numbers. + * @see _.inRange, _.rangeRight + * @example + * + * _.range(4); + * // => [0, 1, 2, 3] + * + * _.range(-4); + * // => [0, -1, -2, -3] + * + * _.range(1, 5); + * // => [1, 2, 3, 4] + * + * _.range(0, 20, 5); + * // => [0, 5, 10, 15] + * + * _.range(0, -4, -1); + * // => [0, -1, -2, -3] + * + * _.range(1, 4, 0); + * // => [1, 1, 1] + * + * _.range(0); + * // => [] + */ + var range = createRange(); + + /** + * This method is like `_.range` except that it populates values in + * descending order. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Util + * @param {number} [start=0] The start of the range. + * @param {number} end The end of the range. + * @param {number} [step=1] The value to increment or decrement by. + * @returns {Array} Returns the range of numbers. + * @see _.inRange, _.range + * @example + * + * _.rangeRight(4); + * // => [3, 2, 1, 0] + * + * _.rangeRight(-4); + * // => [-3, -2, -1, 0] + * + * _.rangeRight(1, 5); + * // => [4, 3, 2, 1] + * + * _.rangeRight(0, 20, 5); + * // => [15, 10, 5, 0] + * + * _.rangeRight(0, -4, -1); + * // => [-3, -2, -1, 0] + * + * _.rangeRight(1, 4, 0); + * // => [1, 1, 1] + * + * _.rangeRight(0); + * // => [] + */ + var rangeRight = createRange(true); + + /** + * This method returns a new empty array. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {Array} Returns the new empty array. + * @example + * + * var arrays = _.times(2, _.stubArray); + * + * console.log(arrays); + * // => [[], []] + * + * console.log(arrays[0] === arrays[1]); + * // => false + */ + function stubArray() { + return []; + } + + /** + * This method returns `false`. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {boolean} Returns `false`. + * @example + * + * _.times(2, _.stubFalse); + * // => [false, false] + */ + function stubFalse() { + return false; + } + + /** + * This method returns a new empty object. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {Object} Returns the new empty object. + * @example + * + * var objects = _.times(2, _.stubObject); + * + * console.log(objects); + * // => [{}, {}] + * + * console.log(objects[0] === objects[1]); + * // => false + */ + function stubObject() { + return {}; + } + + /** + * This method returns an empty string. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {string} Returns the empty string. + * @example + * + * _.times(2, _.stubString); + * // => ['', ''] + */ + function stubString() { + return ''; + } + + /** + * This method returns `true`. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {boolean} Returns `true`. + * @example + * + * _.times(2, _.stubTrue); + * // => [true, true] + */ + function stubTrue() { + return true; + } + + /** + * Invokes the iteratee `n` times, returning an array of the results of + * each invocation. The iteratee is invoked with one argument; (index). + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {number} n The number of times to invoke `iteratee`. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the array of results. + * @example + * + * _.times(3, String); + * // => ['0', '1', '2'] + * + * _.times(4, _.constant(0)); + * // => [0, 0, 0, 0] + */ + function times(n, iteratee) { + n = toInteger(n); + if (n < 1 || n > MAX_SAFE_INTEGER) { + return []; + } + var index = MAX_ARRAY_LENGTH, + length = nativeMin(n, MAX_ARRAY_LENGTH); + + iteratee = getIteratee(iteratee); + n -= MAX_ARRAY_LENGTH; + + var result = baseTimes(length, iteratee); + while (++index < n) { + iteratee(index); + } + return result; + } + + /** + * Converts `value` to a property path array. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Util + * @param {*} value The value to convert. + * @returns {Array} Returns the new property path array. + * @example + * + * _.toPath('a.b.c'); + * // => ['a', 'b', 'c'] + * + * _.toPath('a[0].b.c'); + * // => ['a', '0', 'b', 'c'] + */ + function toPath(value) { + if (isArray(value)) { + return arrayMap(value, toKey); + } + return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value))); + } + + /** + * Generates a unique ID. If `prefix` is given, the ID is appended to it. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {string} [prefix=''] The value to prefix the ID with. + * @returns {string} Returns the unique ID. + * @example + * + * _.uniqueId('contact_'); + * // => 'contact_104' + * + * _.uniqueId(); + * // => '105' + */ + function uniqueId(prefix) { + var id = ++idCounter; + return toString(prefix) + id; + } + + /*------------------------------------------------------------------------*/ + + /** + * Adds two numbers. + * + * @static + * @memberOf _ + * @since 3.4.0 + * @category Math + * @param {number} augend The first number in an addition. + * @param {number} addend The second number in an addition. + * @returns {number} Returns the total. + * @example + * + * _.add(6, 4); + * // => 10 + */ + var add = createMathOperation(function (augend, addend) { + return augend + addend; + }, 0); + + /** + * Computes `number` rounded up to `precision`. + * + * @static + * @memberOf _ + * @since 3.10.0 + * @category Math + * @param {number} number The number to round up. + * @param {number} [precision=0] The precision to round up to. + * @returns {number} Returns the rounded up number. + * @example + * + * _.ceil(4.006); + * // => 5 + * + * _.ceil(6.004, 2); + * // => 6.01 + * + * _.ceil(6040, -2); + * // => 6100 + */ + var ceil = createRound('ceil'); + + /** + * Divide two numbers. + * + * @static + * @memberOf _ + * @since 4.7.0 + * @category Math + * @param {number} dividend The first number in a division. + * @param {number} divisor The second number in a division. + * @returns {number} Returns the quotient. + * @example + * + * _.divide(6, 4); + * // => 1.5 + */ + var divide = createMathOperation(function (dividend, divisor) { + return dividend / divisor; + }, 1); + + /** + * Computes `number` rounded down to `precision`. + * + * @static + * @memberOf _ + * @since 3.10.0 + * @category Math + * @param {number} number The number to round down. + * @param {number} [precision=0] The precision to round down to. + * @returns {number} Returns the rounded down number. + * @example + * + * _.floor(4.006); + * // => 4 + * + * _.floor(0.046, 2); + * // => 0.04 + * + * _.floor(4060, -2); + * // => 4000 + */ + var floor = createRound('floor'); + + /** + * Computes the maximum value of `array`. If `array` is empty or falsey, + * `undefined` is returned. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Math + * @param {Array} array The array to iterate over. + * @returns {*} Returns the maximum value. + * @example + * + * _.max([4, 2, 8, 6]); + * // => 8 + * + * _.max([]); + * // => undefined + */ + function max(array) { + return array && array.length ? baseExtremum(array, identity, baseGt) : undefined; + } + + /** + * This method is like `_.max` except that it accepts `iteratee` which is + * invoked for each element in `array` to generate the criterion by which + * the value is ranked. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Math + * @param {Array} array The array to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {*} Returns the maximum value. + * @example + * + * var objects = [{ 'n': 1 }, { 'n': 2 }]; + * + * _.maxBy(objects, function(o) { return o.n; }); + * // => { 'n': 2 } + * + * // The `_.property` iteratee shorthand. + * _.maxBy(objects, 'n'); + * // => { 'n': 2 } + */ + function maxBy(array, iteratee) { + return array && array.length + ? baseExtremum(array, getIteratee(iteratee, 2), baseGt) + : undefined; + } + + /** + * Computes the mean of the values in `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Math + * @param {Array} array The array to iterate over. + * @returns {number} Returns the mean. + * @example + * + * _.mean([4, 2, 8, 6]); + * // => 5 + */ + function mean(array) { + return baseMean(array, identity); + } + + /** + * This method is like `_.mean` except that it accepts `iteratee` which is + * invoked for each element in `array` to generate the value to be averaged. + * The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.7.0 + * @category Math + * @param {Array} array The array to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {number} Returns the mean. + * @example + * + * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }]; + * + * _.meanBy(objects, function(o) { return o.n; }); + * // => 5 + * + * // The `_.property` iteratee shorthand. + * _.meanBy(objects, 'n'); + * // => 5 + */ + function meanBy(array, iteratee) { + return baseMean(array, getIteratee(iteratee, 2)); + } + + /** + * Computes the minimum value of `array`. If `array` is empty or falsey, + * `undefined` is returned. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Math + * @param {Array} array The array to iterate over. + * @returns {*} Returns the minimum value. + * @example + * + * _.min([4, 2, 8, 6]); + * // => 2 + * + * _.min([]); + * // => undefined + */ + function min(array) { + return array && array.length ? baseExtremum(array, identity, baseLt) : undefined; + } + + /** + * This method is like `_.min` except that it accepts `iteratee` which is + * invoked for each element in `array` to generate the criterion by which + * the value is ranked. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Math + * @param {Array} array The array to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {*} Returns the minimum value. + * @example + * + * var objects = [{ 'n': 1 }, { 'n': 2 }]; + * + * _.minBy(objects, function(o) { return o.n; }); + * // => { 'n': 1 } + * + * // The `_.property` iteratee shorthand. + * _.minBy(objects, 'n'); + * // => { 'n': 1 } + */ + function minBy(array, iteratee) { + return array && array.length + ? baseExtremum(array, getIteratee(iteratee, 2), baseLt) + : undefined; + } + + /** + * Multiply two numbers. + * + * @static + * @memberOf _ + * @since 4.7.0 + * @category Math + * @param {number} multiplier The first number in a multiplication. + * @param {number} multiplicand The second number in a multiplication. + * @returns {number} Returns the product. + * @example + * + * _.multiply(6, 4); + * // => 24 + */ + var multiply = createMathOperation(function (multiplier, multiplicand) { + return multiplier * multiplicand; + }, 1); + + /** + * Computes `number` rounded to `precision`. + * + * @static + * @memberOf _ + * @since 3.10.0 + * @category Math + * @param {number} number The number to round. + * @param {number} [precision=0] The precision to round to. + * @returns {number} Returns the rounded number. + * @example + * + * _.round(4.006); + * // => 4 + * + * _.round(4.006, 2); + * // => 4.01 + * + * _.round(4060, -2); + * // => 4100 + */ + var round = createRound('round'); + + /** + * Subtract two numbers. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Math + * @param {number} minuend The first number in a subtraction. + * @param {number} subtrahend The second number in a subtraction. + * @returns {number} Returns the difference. + * @example + * + * _.subtract(6, 4); + * // => 2 + */ + var subtract = createMathOperation(function (minuend, subtrahend) { + return minuend - subtrahend; + }, 0); + + /** + * Computes the sum of the values in `array`. + * + * @static + * @memberOf _ + * @since 3.4.0 + * @category Math + * @param {Array} array The array to iterate over. + * @returns {number} Returns the sum. + * @example + * + * _.sum([4, 2, 8, 6]); + * // => 20 + */ + function sum(array) { + return array && array.length ? baseSum(array, identity) : 0; + } + + /** + * This method is like `_.sum` except that it accepts `iteratee` which is + * invoked for each element in `array` to generate the value to be summed. + * The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Math + * @param {Array} array The array to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {number} Returns the sum. + * @example + * + * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }]; + * + * _.sumBy(objects, function(o) { return o.n; }); + * // => 20 + * + * // The `_.property` iteratee shorthand. + * _.sumBy(objects, 'n'); + * // => 20 + */ + function sumBy(array, iteratee) { + return array && array.length ? baseSum(array, getIteratee(iteratee, 2)) : 0; + } + + /*------------------------------------------------------------------------*/ + + // Add methods that return wrapped values in chain sequences. + lodash.after = after; + lodash.ary = ary; + lodash.assign = assign; + lodash.assignIn = assignIn; + lodash.assignInWith = assignInWith; + lodash.assignWith = assignWith; + lodash.at = at; + lodash.before = before; + lodash.bind = bind; + lodash.bindAll = bindAll; + lodash.bindKey = bindKey; + lodash.castArray = castArray; + lodash.chain = chain; + lodash.chunk = chunk; + lodash.compact = compact; + lodash.concat = concat; + lodash.cond = cond; + lodash.conforms = conforms; + lodash.constant = constant; + lodash.countBy = countBy; + lodash.create = create; + lodash.curry = curry; + lodash.curryRight = curryRight; + lodash.debounce = debounce; + lodash.defaults = defaults; + lodash.defaultsDeep = defaultsDeep; + lodash.defer = defer; + lodash.delay = delay; + lodash.difference = difference; + lodash.differenceBy = differenceBy; + lodash.differenceWith = differenceWith; + lodash.drop = drop; + lodash.dropRight = dropRight; + lodash.dropRightWhile = dropRightWhile; + lodash.dropWhile = dropWhile; + lodash.fill = fill; + lodash.filter = filter; + lodash.flatMap = flatMap; + lodash.flatMapDeep = flatMapDeep; + lodash.flatMapDepth = flatMapDepth; + lodash.flatten = flatten; + lodash.flattenDeep = flattenDeep; + lodash.flattenDepth = flattenDepth; + lodash.flip = flip; + lodash.flow = flow; + lodash.flowRight = flowRight; + lodash.fromPairs = fromPairs; + lodash.functions = functions; + lodash.functionsIn = functionsIn; + lodash.groupBy = groupBy; + lodash.initial = initial; + lodash.intersection = intersection; + lodash.intersectionBy = intersectionBy; + lodash.intersectionWith = intersectionWith; + lodash.invert = invert; + lodash.invertBy = invertBy; + lodash.invokeMap = invokeMap; + lodash.iteratee = iteratee; + lodash.keyBy = keyBy; + lodash.keys = keys; + lodash.keysIn = keysIn; + lodash.map = map; + lodash.mapKeys = mapKeys; + lodash.mapValues = mapValues; + lodash.matches = matches; + lodash.matchesProperty = matchesProperty; + lodash.memoize = memoize; + lodash.merge = merge; + lodash.mergeWith = mergeWith; + lodash.method = method; + lodash.methodOf = methodOf; + lodash.mixin = mixin; + lodash.negate = negate; + lodash.nthArg = nthArg; + lodash.omit = omit; + lodash.omitBy = omitBy; + lodash.once = once; + lodash.orderBy = orderBy; + lodash.over = over; + lodash.overArgs = overArgs; + lodash.overEvery = overEvery; + lodash.overSome = overSome; + lodash.partial = partial; + lodash.partialRight = partialRight; + lodash.partition = partition; + lodash.pick = pick; + lodash.pickBy = pickBy; + lodash.property = property; + lodash.propertyOf = propertyOf; + lodash.pull = pull; + lodash.pullAll = pullAll; + lodash.pullAllBy = pullAllBy; + lodash.pullAllWith = pullAllWith; + lodash.pullAt = pullAt; + lodash.range = range; + lodash.rangeRight = rangeRight; + lodash.rearg = rearg; + lodash.reject = reject; + lodash.remove = remove; + lodash.rest = rest; + lodash.reverse = reverse; + lodash.sampleSize = sampleSize; + lodash.set = set; + lodash.setWith = setWith; + lodash.shuffle = shuffle; + lodash.slice = slice; + lodash.sortBy = sortBy; + lodash.sortedUniq = sortedUniq; + lodash.sortedUniqBy = sortedUniqBy; + lodash.split = split; + lodash.spread = spread; + lodash.tail = tail; + lodash.take = take; + lodash.takeRight = takeRight; + lodash.takeRightWhile = takeRightWhile; + lodash.takeWhile = takeWhile; + lodash.tap = tap; + lodash.throttle = throttle; + lodash.thru = thru; + lodash.toArray = toArray; + lodash.toPairs = toPairs; + lodash.toPairsIn = toPairsIn; + lodash.toPath = toPath; + lodash.toPlainObject = toPlainObject; + lodash.transform = transform; + lodash.unary = unary; + lodash.union = union; + lodash.unionBy = unionBy; + lodash.unionWith = unionWith; + lodash.uniq = uniq; + lodash.uniqBy = uniqBy; + lodash.uniqWith = uniqWith; + lodash.unset = unset; + lodash.unzip = unzip; + lodash.unzipWith = unzipWith; + lodash.update = update; + lodash.updateWith = updateWith; + lodash.values = values; + lodash.valuesIn = valuesIn; + lodash.without = without; + lodash.words = words; + lodash.wrap = wrap; + lodash.xor = xor; + lodash.xorBy = xorBy; + lodash.xorWith = xorWith; + lodash.zip = zip; + lodash.zipObject = zipObject; + lodash.zipObjectDeep = zipObjectDeep; + lodash.zipWith = zipWith; + + // Add aliases. + lodash.entries = toPairs; + lodash.entriesIn = toPairsIn; + lodash.extend = assignIn; + lodash.extendWith = assignInWith; + + // Add methods to `lodash.prototype`. + mixin(lodash, lodash); + + /*------------------------------------------------------------------------*/ + + // Add methods that return unwrapped values in chain sequences. + lodash.add = add; + lodash.attempt = attempt; + lodash.camelCase = camelCase; + lodash.capitalize = capitalize; + lodash.ceil = ceil; + lodash.clamp = clamp; + lodash.clone = clone; + lodash.cloneDeep = cloneDeep; + lodash.cloneDeepWith = cloneDeepWith; + lodash.cloneWith = cloneWith; + lodash.conformsTo = conformsTo; + lodash.deburr = deburr; + lodash.defaultTo = defaultTo; + lodash.divide = divide; + lodash.endsWith = endsWith; + lodash.eq = eq; + lodash.escape = escape; + lodash.escapeRegExp = escapeRegExp; + lodash.every = every; + lodash.find = find; + lodash.findIndex = findIndex; + lodash.findKey = findKey; + lodash.findLast = findLast; + lodash.findLastIndex = findLastIndex; + lodash.findLastKey = findLastKey; + lodash.floor = floor; + lodash.forEach = forEach; + lodash.forEachRight = forEachRight; + lodash.forIn = forIn; + lodash.forInRight = forInRight; + lodash.forOwn = forOwn; + lodash.forOwnRight = forOwnRight; + lodash.get = get; + lodash.gt = gt; + lodash.gte = gte; + lodash.has = has; + lodash.hasIn = hasIn; + lodash.head = head; + lodash.identity = identity; + lodash.includes = includes; + lodash.indexOf = indexOf; + lodash.inRange = inRange; + lodash.invoke = invoke; + lodash.isArguments = isArguments; + lodash.isArray = isArray; + lodash.isArrayBuffer = isArrayBuffer; + lodash.isArrayLike = isArrayLike; + lodash.isArrayLikeObject = isArrayLikeObject; + lodash.isBoolean = isBoolean; + lodash.isBuffer = isBuffer; + lodash.isDate = isDate; + lodash.isElement = isElement; + lodash.isEmpty = isEmpty; + lodash.isEqual = isEqual; + lodash.isEqualWith = isEqualWith; + lodash.isError = isError; + lodash.isFinite = isFinite; + lodash.isFunction = isFunction; + lodash.isInteger = isInteger; + lodash.isLength = isLength; + lodash.isMap = isMap; + lodash.isMatch = isMatch; + lodash.isMatchWith = isMatchWith; + lodash.isNaN = isNaN; + lodash.isNative = isNative; + lodash.isNil = isNil; + lodash.isNull = isNull; + lodash.isNumber = isNumber; + lodash.isObject = isObject; + lodash.isObjectLike = isObjectLike; + lodash.isPlainObject = isPlainObject; + lodash.isRegExp = isRegExp; + lodash.isSafeInteger = isSafeInteger; + lodash.isSet = isSet; + lodash.isString = isString; + lodash.isSymbol = isSymbol; + lodash.isTypedArray = isTypedArray; + lodash.isUndefined = isUndefined; + lodash.isWeakMap = isWeakMap; + lodash.isWeakSet = isWeakSet; + lodash.join = join; + lodash.kebabCase = kebabCase; + lodash.last = last; + lodash.lastIndexOf = lastIndexOf; + lodash.lowerCase = lowerCase; + lodash.lowerFirst = lowerFirst; + lodash.lt = lt; + lodash.lte = lte; + lodash.max = max; + lodash.maxBy = maxBy; + lodash.mean = mean; + lodash.meanBy = meanBy; + lodash.min = min; + lodash.minBy = minBy; + lodash.stubArray = stubArray; + lodash.stubFalse = stubFalse; + lodash.stubObject = stubObject; + lodash.stubString = stubString; + lodash.stubTrue = stubTrue; + lodash.multiply = multiply; + lodash.nth = nth; + lodash.noConflict = noConflict; + lodash.noop = noop; + lodash.now = now; + lodash.pad = pad; + lodash.padEnd = padEnd; + lodash.padStart = padStart; + lodash.parseInt = parseInt; + lodash.random = random; + lodash.reduce = reduce; + lodash.reduceRight = reduceRight; + lodash.repeat = repeat; + lodash.replace = replace; + lodash.result = result; + lodash.round = round; + lodash.runInContext = runInContext; + lodash.sample = sample; + lodash.size = size; + lodash.snakeCase = snakeCase; + lodash.some = some; + lodash.sortedIndex = sortedIndex; + lodash.sortedIndexBy = sortedIndexBy; + lodash.sortedIndexOf = sortedIndexOf; + lodash.sortedLastIndex = sortedLastIndex; + lodash.sortedLastIndexBy = sortedLastIndexBy; + lodash.sortedLastIndexOf = sortedLastIndexOf; + lodash.startCase = startCase; + lodash.startsWith = startsWith; + lodash.subtract = subtract; + lodash.sum = sum; + lodash.sumBy = sumBy; + lodash.template = template; + lodash.times = times; + lodash.toFinite = toFinite; + lodash.toInteger = toInteger; + lodash.toLength = toLength; + lodash.toLower = toLower; + lodash.toNumber = toNumber; + lodash.toSafeInteger = toSafeInteger; + lodash.toString = toString; + lodash.toUpper = toUpper; + lodash.trim = trim; + lodash.trimEnd = trimEnd; + lodash.trimStart = trimStart; + lodash.truncate = truncate; + lodash.unescape = unescape; + lodash.uniqueId = uniqueId; + lodash.upperCase = upperCase; + lodash.upperFirst = upperFirst; + + // Add aliases. + lodash.each = forEach; + lodash.eachRight = forEachRight; + lodash.first = head; + + mixin( + lodash, + (function () { + var source = {}; + baseForOwn(lodash, function (func, methodName) { + if (!hasOwnProperty.call(lodash.prototype, methodName)) { + source[methodName] = func; + } + }); + return source; + })(), + { chain: false }, + ); + + /*------------------------------------------------------------------------*/ + + /** + * The semantic version number. + * + * @static + * @memberOf _ + * @type {string} + */ + lodash.VERSION = VERSION; + + // Assign default placeholders. + arrayEach( + ['bind', 'bindKey', 'curry', 'curryRight', 'partial', 'partialRight'], + function (methodName) { + lodash[methodName].placeholder = lodash; + }, + ); + + // Add `LazyWrapper` methods for `_.drop` and `_.take` variants. + arrayEach(['drop', 'take'], function (methodName, index) { + LazyWrapper.prototype[methodName] = function (n) { + n = n === undefined ? 1 : nativeMax(toInteger(n), 0); + + var result = this.__filtered__ && !index ? new LazyWrapper(this) : this.clone(); + + if (result.__filtered__) { + result.__takeCount__ = nativeMin(n, result.__takeCount__); + } else { + result.__views__.push({ + size: nativeMin(n, MAX_ARRAY_LENGTH), + type: methodName + (result.__dir__ < 0 ? 'Right' : ''), + }); + } + return result; + }; + + LazyWrapper.prototype[methodName + 'Right'] = function (n) { + return this.reverse()[methodName](n).reverse(); + }; + }); + + // Add `LazyWrapper` methods that accept an `iteratee` value. + arrayEach(['filter', 'map', 'takeWhile'], function (methodName, index) { + var type = index + 1, + isFilter = type == LAZY_FILTER_FLAG || type == LAZY_WHILE_FLAG; + + LazyWrapper.prototype[methodName] = function (iteratee) { + var result = this.clone(); + result.__iteratees__.push({ + iteratee: getIteratee(iteratee, 3), + type: type, + }); + result.__filtered__ = result.__filtered__ || isFilter; + return result; + }; + }); + + // Add `LazyWrapper` methods for `_.head` and `_.last`. + arrayEach(['head', 'last'], function (methodName, index) { + var takeName = 'take' + (index ? 'Right' : ''); + + LazyWrapper.prototype[methodName] = function () { + return this[takeName](1).value()[0]; + }; + }); + + // Add `LazyWrapper` methods for `_.initial` and `_.tail`. + arrayEach(['initial', 'tail'], function (methodName, index) { + var dropName = 'drop' + (index ? '' : 'Right'); + + LazyWrapper.prototype[methodName] = function () { + return this.__filtered__ ? new LazyWrapper(this) : this[dropName](1); + }; + }); + + LazyWrapper.prototype.compact = function () { + return this.filter(identity); + }; + + LazyWrapper.prototype.find = function (predicate) { + return this.filter(predicate).head(); + }; + + LazyWrapper.prototype.findLast = function (predicate) { + return this.reverse().find(predicate); + }; + + LazyWrapper.prototype.invokeMap = baseRest(function (path, args) { + if (typeof path == 'function') { + return new LazyWrapper(this); + } + return this.map(function (value) { + return baseInvoke(value, path, args); + }); + }); + + LazyWrapper.prototype.reject = function (predicate) { + return this.filter(negate(getIteratee(predicate))); + }; + + LazyWrapper.prototype.slice = function (start, end) { + start = toInteger(start); + + var result = this; + if (result.__filtered__ && (start > 0 || end < 0)) { + return new LazyWrapper(result); + } + if (start < 0) { + result = result.takeRight(-start); + } else if (start) { + result = result.drop(start); + } + if (end !== undefined) { + end = toInteger(end); + result = end < 0 ? result.dropRight(-end) : result.take(end - start); + } + return result; + }; + + LazyWrapper.prototype.takeRightWhile = function (predicate) { + return this.reverse().takeWhile(predicate).reverse(); + }; + + LazyWrapper.prototype.toArray = function () { + return this.take(MAX_ARRAY_LENGTH); + }; + + // Add `LazyWrapper` methods to `lodash.prototype`. + baseForOwn(LazyWrapper.prototype, function (func, methodName) { + var checkIteratee = /^(?:filter|find|map|reject)|While$/.test(methodName), + isTaker = /^(?:head|last)$/.test(methodName), + lodashFunc = lodash[isTaker ? 'take' + (methodName == 'last' ? 'Right' : '') : methodName], + retUnwrapped = isTaker || /^find/.test(methodName); + + if (!lodashFunc) { + return; + } + lodash.prototype[methodName] = function () { + var value = this.__wrapped__, + args = isTaker ? [1] : arguments, + isLazy = value instanceof LazyWrapper, + iteratee = args[0], + useLazy = isLazy || isArray(value); + + var interceptor = function (value) { + var result = lodashFunc.apply(lodash, arrayPush([value], args)); + return isTaker && chainAll ? result[0] : result; + }; + + if (useLazy && checkIteratee && typeof iteratee == 'function' && iteratee.length != 1) { + // Avoid lazy use if the iteratee has a "length" value other than `1`. + isLazy = useLazy = false; + } + var chainAll = this.__chain__, + isHybrid = !!this.__actions__.length, + isUnwrapped = retUnwrapped && !chainAll, + onlyLazy = isLazy && !isHybrid; + + if (!retUnwrapped && useLazy) { + value = onlyLazy ? value : new LazyWrapper(this); + var result = func.apply(value, args); + result.__actions__.push({ func: thru, args: [interceptor], thisArg: undefined }); + return new LodashWrapper(result, chainAll); + } + if (isUnwrapped && onlyLazy) { + return func.apply(this, args); + } + result = this.thru(interceptor); + return isUnwrapped ? (isTaker ? result.value()[0] : result.value()) : result; + }; + }); + + // Add `Array` methods to `lodash.prototype`. + arrayEach(['pop', 'push', 'shift', 'sort', 'splice', 'unshift'], function (methodName) { + var func = arrayProto[methodName], + chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru', + retUnwrapped = /^(?:pop|shift)$/.test(methodName); + + lodash.prototype[methodName] = function () { + var args = arguments; + if (retUnwrapped && !this.__chain__) { + var value = this.value(); + return func.apply(isArray(value) ? value : [], args); + } + return this[chainName](function (value) { + return func.apply(isArray(value) ? value : [], args); + }); + }; + }); + + // Map minified method names to their real names. + baseForOwn(LazyWrapper.prototype, function (func, methodName) { + var lodashFunc = lodash[methodName]; + if (lodashFunc) { + var key = lodashFunc.name + ''; + if (!hasOwnProperty.call(realNames, key)) { + realNames[key] = []; + } + realNames[key].push({ name: methodName, func: lodashFunc }); + } + }); + + realNames[createHybrid(undefined, WRAP_BIND_KEY_FLAG).name] = [ + { + name: 'wrapper', + func: undefined, + }, + ]; + + // Add methods to `LazyWrapper`. + LazyWrapper.prototype.clone = lazyClone; + LazyWrapper.prototype.reverse = lazyReverse; + LazyWrapper.prototype.value = lazyValue; + + // Add chain sequence methods to the `lodash` wrapper. + lodash.prototype.at = wrapperAt; + lodash.prototype.chain = wrapperChain; + lodash.prototype.commit = wrapperCommit; + lodash.prototype.next = wrapperNext; + lodash.prototype.plant = wrapperPlant; + lodash.prototype.reverse = wrapperReverse; + lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue; + + // Add lazy aliases. + lodash.prototype.first = lodash.prototype.head; + + if (symIterator) { + lodash.prototype[symIterator] = wrapperToIterator; + } + return lodash; + }; + + /*--------------------------------------------------------------------------*/ + + // Export lodash. + var _ = runInContext(); + + // Some AMD build optimizers, like r.js, check for condition patterns like: + if (true) { + // Expose Lodash on the global object to prevent errors when Lodash is + // loaded by a script tag in the presence of an AMD loader. + // See http://requirejs.org/docs/errors.html#mismatch for more details. + // Use `_.noConflict` to remove Lodash from the global object. + root._ = _; + + // Define as an anonymous module so, through path mapping, it can be + // referenced as the "underscore" module. + !((__WEBPACK_AMD_DEFINE_RESULT__ = function () { + return _; + }.call(exports, __webpack_require__, exports, module)), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } + // Check for `exports` after `define` in case a build optimizer adds it. + else if (freeModule) { + // Export for Node.js. + (freeModule.exports = _)._ = _; + // Export for CommonJS support. + freeExports._ = _; + } else { + // Export to the global object. + root._ = _; + } + }).call(this); + + /* WEBPACK VAR INJECTION */ + }).call(exports, __webpack_require__(238)(module)); + + /***/ + }, + /* 544 */ + /***/ function (module, exports) { + module.exports = { + brightColor: 'HelloWorld__brightColor__1M8yw', + }; + + /***/ + }, + /* 545 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(10); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_create_react_class__ = __webpack_require__(37); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_create_react_class___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_create_react_class__); + /* eslint-disable react/prefer-es6-class */ + + // Super simple example of React component using React.createClass + var HelloWorldES5 = __WEBPACK_IMPORTED_MODULE_2_create_react_class___default()({ + displayName: 'HelloWorldES5', + + propTypes: { + helloWorldData: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object, + }, + + getInitialState: function getInitialState() { + return this.props.helloWorldData; + }, + setNameDomRef: function setNameDomRef(nameDomNode) { + this.nameDomRef = nameDomNode; + }, + handleChange: function handleChange() { + var name = this.nameDomRef.value; + this.setState({ name: name }); + }, + render: function render() { + var name = this.state.name; + + return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'div', + null, + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('h3', null, 'Hello ES5, ', name, '!'), + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'p', + null, + 'Say hello to:', + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('input', { + type: 'text', + ref: this.setNameDomRef, + defaultValue: name, + onChange: this.handleChange, + }), + ), + ); + }, + }); + + var _default = HelloWorldES5; + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + HelloWorldES5, + 'HelloWorldES5', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/HelloWorldES5.jsx', + ); + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/HelloWorldES5.jsx', + ); + })(); + + /***/ + }, + /* 546 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + */ + + var _assign = __webpack_require__(63); + + var emptyObject = __webpack_require__(547); + var _invariant = __webpack_require__(548); + + if (true) { + var warning = __webpack_require__(549); + } + + var MIXINS_KEY = 'mixins'; + + // Helper function to allow the creation of anonymous functions which do not + // have .name set to the name of the variable being assigned to. + function identity(fn) { + return fn; + } + + var ReactPropTypeLocationNames; + if (true) { + ReactPropTypeLocationNames = { + prop: 'prop', + context: 'context', + childContext: 'child context', + }; + } else { + ReactPropTypeLocationNames = {}; + } + + function factory(ReactComponent, isValidElement, ReactNoopUpdateQueue) { + /** + * Policies that describe methods in `ReactClassInterface`. + */ + + var injectedMixins = []; + + /** + * Composite components are higher-level components that compose other composite + * or host components. + * + * To create a new type of `ReactClass`, pass a specification of + * your new class to `React.createClass`. The only requirement of your class + * specification is that you implement a `render` method. + * + * var MyComponent = React.createClass({ + * render: function() { + * return <div>Hello World</div>; + * } + * }); + * + * The class specification supports a specific protocol of methods that have + * special meaning (e.g. `render`). See `ReactClassInterface` for + * more the comprehensive protocol. Any other properties and methods in the + * class specification will be available on the prototype. + * + * @interface ReactClassInterface + * @internal + */ + var ReactClassInterface = { + /** + * An array of Mixin objects to include when defining your component. + * + * @type {array} + * @optional + */ + mixins: 'DEFINE_MANY', + + /** + * An object containing properties and methods that should be defined on + * the component's constructor instead of its prototype (static methods). + * + * @type {object} + * @optional + */ + statics: 'DEFINE_MANY', + + /** + * Definition of prop types for this component. + * + * @type {object} + * @optional + */ + propTypes: 'DEFINE_MANY', + + /** + * Definition of context types for this component. + * + * @type {object} + * @optional + */ + contextTypes: 'DEFINE_MANY', + + /** + * Definition of context types this component sets for its children. + * + * @type {object} + * @optional + */ + childContextTypes: 'DEFINE_MANY', + + // ==== Definition methods ==== + + /** + * Invoked when the component is mounted. Values in the mapping will be set on + * `this.props` if that prop is not specified (i.e. using an `in` check). + * + * This method is invoked before `getInitialState` and therefore cannot rely + * on `this.state` or use `this.setState`. + * + * @return {object} + * @optional + */ + getDefaultProps: 'DEFINE_MANY_MERGED', + + /** + * Invoked once before the component is mounted. The return value will be used + * as the initial value of `this.state`. + * + * getInitialState: function() { + * return { + * isOn: false, + * fooBaz: new BazFoo() + * } + * } + * + * @return {object} + * @optional + */ + getInitialState: 'DEFINE_MANY_MERGED', + + /** + * @return {object} + * @optional + */ + getChildContext: 'DEFINE_MANY_MERGED', + + /** + * Uses props from `this.props` and state from `this.state` to render the + * structure of the component. + * + * No guarantees are made about when or how often this method is invoked, so + * it must not have side effects. + * + * render: function() { + * var name = this.props.name; + * return <div>Hello, {name}!</div>; + * } + * + * @return {ReactComponent} + * @required + */ + render: 'DEFINE_ONCE', + + // ==== Delegate methods ==== + + /** + * Invoked when the component is initially created and about to be mounted. + * This may have side effects, but any external subscriptions or data created + * by this method must be cleaned up in `componentWillUnmount`. + * + * @optional + */ + componentWillMount: 'DEFINE_MANY', + + /** + * Invoked when the component has been mounted and has a DOM representation. + * However, there is no guarantee that the DOM node is in the document. + * + * Use this as an opportunity to operate on the DOM when the component has + * been mounted (initialized and rendered) for the first time. + * + * @param {DOMElement} rootNode DOM element representing the component. + * @optional + */ + componentDidMount: 'DEFINE_MANY', + + /** + * Invoked before the component receives new props. + * + * Use this as an opportunity to react to a prop transition by updating the + * state using `this.setState`. Current props are accessed via `this.props`. + * + * componentWillReceiveProps: function(nextProps, nextContext) { + * this.setState({ + * likesIncreasing: nextProps.likeCount > this.props.likeCount + * }); + * } + * + * NOTE: There is no equivalent `componentWillReceiveState`. An incoming prop + * transition may cause a state change, but the opposite is not true. If you + * need it, you are probably looking for `componentWillUpdate`. + * + * @param {object} nextProps + * @optional + */ + componentWillReceiveProps: 'DEFINE_MANY', + + /** + * Invoked while deciding if the component should be updated as a result of + * receiving new props, state and/or context. + * + * Use this as an opportunity to `return false` when you're certain that the + * transition to the new props/state/context will not require a component + * update. + * + * shouldComponentUpdate: function(nextProps, nextState, nextContext) { + * return !equal(nextProps, this.props) || + * !equal(nextState, this.state) || + * !equal(nextContext, this.context); + * } + * + * @param {object} nextProps + * @param {?object} nextState + * @param {?object} nextContext + * @return {boolean} True if the component should update. + * @optional + */ + shouldComponentUpdate: 'DEFINE_ONCE', + + /** + * Invoked when the component is about to update due to a transition from + * `this.props`, `this.state` and `this.context` to `nextProps`, `nextState` + * and `nextContext`. + * + * Use this as an opportunity to perform preparation before an update occurs. + * + * NOTE: You **cannot** use `this.setState()` in this method. + * + * @param {object} nextProps + * @param {?object} nextState + * @param {?object} nextContext + * @param {ReactReconcileTransaction} transaction + * @optional + */ + componentWillUpdate: 'DEFINE_MANY', + + /** + * Invoked when the component's DOM representation has been updated. + * + * Use this as an opportunity to operate on the DOM when the component has + * been updated. + * + * @param {object} prevProps + * @param {?object} prevState + * @param {?object} prevContext + * @param {DOMElement} rootNode DOM element representing the component. + * @optional + */ + componentDidUpdate: 'DEFINE_MANY', + + /** + * Invoked when the component is about to be removed from its parent and have + * its DOM representation destroyed. + * + * Use this as an opportunity to deallocate any external resources. + * + * NOTE: There is no `componentDidUnmount` since your component will have been + * destroyed by that point. + * + * @optional + */ + componentWillUnmount: 'DEFINE_MANY', + + /** + * Replacement for (deprecated) `componentWillMount`. + * + * @optional + */ + UNSAFE_componentWillMount: 'DEFINE_MANY', + + /** + * Replacement for (deprecated) `componentWillReceiveProps`. + * + * @optional + */ + UNSAFE_componentWillReceiveProps: 'DEFINE_MANY', + + /** + * Replacement for (deprecated) `componentWillUpdate`. + * + * @optional + */ + UNSAFE_componentWillUpdate: 'DEFINE_MANY', + + // ==== Advanced methods ==== + + /** + * Updates the component's currently mounted DOM representation. + * + * By default, this implements React's rendering and reconciliation algorithm. + * Sophisticated clients may wish to override this. + * + * @param {ReactReconcileTransaction} transaction + * @internal + * @overridable + */ + updateComponent: 'OVERRIDE_BASE', + }; + + /** + * Similar to ReactClassInterface but for static methods. + */ + var ReactClassStaticInterface = { + /** + * This method is invoked after a component is instantiated and when it + * receives new props. Return an object to update state in response to + * prop changes. Return null to indicate no change to state. + * + * If an object is returned, its keys will be merged into the existing state. + * + * @return {object || null} + * @optional + */ + getDerivedStateFromProps: 'DEFINE_MANY_MERGED', + }; + + /** + * Mapping from class specification keys to special processing functions. + * + * Although these are declared like instance properties in the specification + * when defining classes using `React.createClass`, they are actually static + * and are accessible on the constructor instead of the prototype. Despite + * being static, they must be defined outside of the "statics" key under + * which all other static methods are defined. + */ + var RESERVED_SPEC_KEYS = { + displayName: function (Constructor, displayName) { + Constructor.displayName = displayName; + }, + mixins: function (Constructor, mixins) { + if (mixins) { + for (var i = 0; i < mixins.length; i++) { + mixSpecIntoComponent(Constructor, mixins[i]); + } + } + }, + childContextTypes: function (Constructor, childContextTypes) { + if (true) { + validateTypeDef(Constructor, childContextTypes, 'childContext'); + } + Constructor.childContextTypes = _assign({}, Constructor.childContextTypes, childContextTypes); + }, + contextTypes: function (Constructor, contextTypes) { + if (true) { + validateTypeDef(Constructor, contextTypes, 'context'); + } + Constructor.contextTypes = _assign({}, Constructor.contextTypes, contextTypes); + }, + /** + * Special case getDefaultProps which should move into statics but requires + * automatic merging. + */ + getDefaultProps: function (Constructor, getDefaultProps) { + if (Constructor.getDefaultProps) { + Constructor.getDefaultProps = createMergedResultFunction( + Constructor.getDefaultProps, + getDefaultProps, + ); + } else { + Constructor.getDefaultProps = getDefaultProps; + } + }, + propTypes: function (Constructor, propTypes) { + if (true) { + validateTypeDef(Constructor, propTypes, 'prop'); + } + Constructor.propTypes = _assign({}, Constructor.propTypes, propTypes); + }, + statics: function (Constructor, statics) { + mixStaticSpecIntoComponent(Constructor, statics); + }, + autobind: function () {}, + }; + + function validateTypeDef(Constructor, typeDef, location) { + for (var propName in typeDef) { + if (typeDef.hasOwnProperty(propName)) { + // use a warning instead of an _invariant so components + // don't show up in prod but only in __DEV__ + if (true) { + warning( + typeof typeDef[propName] === 'function', + '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', + Constructor.displayName || 'ReactClass', + ReactPropTypeLocationNames[location], + propName, + ); + } + } + } + } + + function validateMethodOverride(isAlreadyDefined, name) { + var specPolicy = ReactClassInterface.hasOwnProperty(name) ? ReactClassInterface[name] : null; + + // Disallow overriding of base class methods unless explicitly allowed. + if (ReactClassMixin.hasOwnProperty(name)) { + _invariant( + specPolicy === 'OVERRIDE_BASE', + 'ReactClassInterface: You are attempting to override ' + + '`%s` from your class specification. Ensure that your method names ' + + 'do not overlap with React methods.', + name, + ); + } + + // Disallow defining methods more than once unless explicitly allowed. + if (isAlreadyDefined) { + _invariant( + specPolicy === 'DEFINE_MANY' || specPolicy === 'DEFINE_MANY_MERGED', + 'ReactClassInterface: You are attempting to define ' + + '`%s` on your component more than once. This conflict may be due ' + + 'to a mixin.', + name, + ); + } + } + + /** + * Mixin helper which handles policy validation and reserved + * specification keys when building React classes. + */ + function mixSpecIntoComponent(Constructor, spec) { + if (!spec) { + if (true) { + var typeofSpec = typeof spec; + var isMixinValid = typeofSpec === 'object' && spec !== null; + + if (true) { + warning( + isMixinValid, + "%s: You're attempting to include a mixin that is either null " + + 'or not an object. Check the mixins included by the component, ' + + 'as well as any mixins they include themselves. ' + + 'Expected object but got %s.', + Constructor.displayName || 'ReactClass', + spec === null ? null : typeofSpec, + ); + } + } + + return; + } + + _invariant( + typeof spec !== 'function', + "ReactClass: You're attempting to " + + 'use a component class or function as a mixin. Instead, just use a ' + + 'regular object.', + ); + _invariant( + !isValidElement(spec), + "ReactClass: You're attempting to " + + 'use a component as a mixin. Instead, just use a regular object.', + ); + + var proto = Constructor.prototype; + var autoBindPairs = proto.__reactAutoBindPairs; + + // By handling mixins before any other properties, we ensure the same + // chaining order is applied to methods with DEFINE_MANY policy, whether + // mixins are listed before or after these methods in the spec. + if (spec.hasOwnProperty(MIXINS_KEY)) { + RESERVED_SPEC_KEYS.mixins(Constructor, spec.mixins); + } + + for (var name in spec) { + if (!spec.hasOwnProperty(name)) { + continue; + } + + if (name === MIXINS_KEY) { + // We have already handled mixins in a special case above. + continue; + } + + var property = spec[name]; + var isAlreadyDefined = proto.hasOwnProperty(name); + validateMethodOverride(isAlreadyDefined, name); + + if (RESERVED_SPEC_KEYS.hasOwnProperty(name)) { + RESERVED_SPEC_KEYS[name](Constructor, property); + } else { + // Setup methods on prototype: + // The following member methods should not be automatically bound: + // 1. Expected ReactClass methods (in the "interface"). + // 2. Overridden methods (that were mixed in). + var isReactClassMethod = ReactClassInterface.hasOwnProperty(name); + var isFunction = typeof property === 'function'; + var shouldAutoBind = + isFunction && !isReactClassMethod && !isAlreadyDefined && spec.autobind !== false; + + if (shouldAutoBind) { + autoBindPairs.push(name, property); + proto[name] = property; + } else { + if (isAlreadyDefined) { + var specPolicy = ReactClassInterface[name]; + + // These cases should already be caught by validateMethodOverride. + _invariant( + isReactClassMethod && + (specPolicy === 'DEFINE_MANY_MERGED' || specPolicy === 'DEFINE_MANY'), + 'ReactClass: Unexpected spec policy %s for key %s ' + 'when mixing in component specs.', + specPolicy, + name, + ); + + // For methods which are defined more than once, call the existing + // methods before calling the new property, merging if appropriate. + if (specPolicy === 'DEFINE_MANY_MERGED') { + proto[name] = createMergedResultFunction(proto[name], property); + } else if (specPolicy === 'DEFINE_MANY') { + proto[name] = createChainedFunction(proto[name], property); + } + } else { + proto[name] = property; + if (true) { + // Add verbose displayName to the function, which helps when looking + // at profiling tools. + if (typeof property === 'function' && spec.displayName) { + proto[name].displayName = spec.displayName + '_' + name; + } + } + } + } + } + } + } + + function mixStaticSpecIntoComponent(Constructor, statics) { + if (!statics) { + return; + } + + for (var name in statics) { + var property = statics[name]; + if (!statics.hasOwnProperty(name)) { + continue; + } + + var isReserved = name in RESERVED_SPEC_KEYS; + _invariant( + !isReserved, + 'ReactClass: You are attempting to define a reserved ' + + 'property, `%s`, that shouldn\'t be on the "statics" key. Define it ' + + 'as an instance property instead; it will still be accessible on the ' + + 'constructor.', + name, + ); + + var isAlreadyDefined = name in Constructor; + if (isAlreadyDefined) { + var specPolicy = ReactClassStaticInterface.hasOwnProperty(name) + ? ReactClassStaticInterface[name] + : null; + + _invariant( + specPolicy === 'DEFINE_MANY_MERGED', + 'ReactClass: You are attempting to define ' + + '`%s` on your component more than once. This conflict may be ' + + 'due to a mixin.', + name, + ); + + Constructor[name] = createMergedResultFunction(Constructor[name], property); + + return; + } + + Constructor[name] = property; + } + } + + /** + * Merge two objects, but throw if both contain the same key. + * + * @param {object} one The first object, which is mutated. + * @param {object} two The second object + * @return {object} one after it has been mutated to contain everything in two. + */ + function mergeIntoWithNoDuplicateKeys(one, two) { + _invariant( + one && two && typeof one === 'object' && typeof two === 'object', + 'mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.', + ); + + for (var key in two) { + if (two.hasOwnProperty(key)) { + _invariant( + one[key] === undefined, + 'mergeIntoWithNoDuplicateKeys(): ' + + 'Tried to merge two objects with the same key: `%s`. This conflict ' + + 'may be due to a mixin; in particular, this may be caused by two ' + + 'getInitialState() or getDefaultProps() methods returning objects ' + + 'with clashing keys.', + key, + ); + one[key] = two[key]; + } + } + return one; + } + + /** + * Creates a function that invokes two functions and merges their return values. + * + * @param {function} one Function to invoke first. + * @param {function} two Function to invoke second. + * @return {function} Function that invokes the two argument functions. + * @private + */ + function createMergedResultFunction(one, two) { + return function mergedResult() { + var a = one.apply(this, arguments); + var b = two.apply(this, arguments); + if (a == null) { + return b; + } else if (b == null) { + return a; + } + var c = {}; + mergeIntoWithNoDuplicateKeys(c, a); + mergeIntoWithNoDuplicateKeys(c, b); + return c; + }; + } + + /** + * Creates a function that invokes two functions and ignores their return vales. + * + * @param {function} one Function to invoke first. + * @param {function} two Function to invoke second. + * @return {function} Function that invokes the two argument functions. + * @private + */ + function createChainedFunction(one, two) { + return function chainedFunction() { + one.apply(this, arguments); + two.apply(this, arguments); + }; + } + + /** + * Binds a method to the component. + * + * @param {object} component Component whose method is going to be bound. + * @param {function} method Method to be bound. + * @return {function} The bound method. + */ + function bindAutoBindMethod(component, method) { + var boundMethod = method.bind(component); + if (true) { + boundMethod.__reactBoundContext = component; + boundMethod.__reactBoundMethod = method; + boundMethod.__reactBoundArguments = null; + var componentName = component.constructor.displayName; + var _bind = boundMethod.bind; + boundMethod.bind = function (newThis) { + for ( + var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; + _key < _len; + _key++ + ) { + args[_key - 1] = arguments[_key]; + } + + // User is trying to bind() an autobound method; we effectively will + // ignore the value of "this" that the user is trying to use, so + // let's warn. + if (newThis !== component && newThis !== null) { + if (true) { + warning( + false, + 'bind(): React component methods may only be bound to the ' + + 'component instance. See %s', + componentName, + ); + } + } else if (!args.length) { + if (true) { + warning( + false, + 'bind(): You are binding a component method to the component. ' + + 'React does this for you automatically in a high-performance ' + + 'way, so you can safely remove this call. See %s', + componentName, + ); + } + return boundMethod; + } + var reboundMethod = _bind.apply(boundMethod, arguments); + reboundMethod.__reactBoundContext = component; + reboundMethod.__reactBoundMethod = method; + reboundMethod.__reactBoundArguments = args; + return reboundMethod; + }; + } + return boundMethod; + } + + /** + * Binds all auto-bound methods in a component. + * + * @param {object} component Component whose method is going to be bound. + */ + function bindAutoBindMethods(component) { + var pairs = component.__reactAutoBindPairs; + for (var i = 0; i < pairs.length; i += 2) { + var autoBindKey = pairs[i]; + var method = pairs[i + 1]; + component[autoBindKey] = bindAutoBindMethod(component, method); + } + } + + var IsMountedPreMixin = { + componentDidMount: function () { + this.__isMounted = true; + }, + }; + + var IsMountedPostMixin = { + componentWillUnmount: function () { + this.__isMounted = false; + }, + }; + + /** + * Add more to the ReactClass base class. These are all legacy features and + * therefore not already part of the modern ReactComponent. + */ + var ReactClassMixin = { + /** + * TODO: This will be deprecated because state should always keep a consistent + * type signature and the only use case for this, is to avoid that. + */ + replaceState: function (newState, callback) { + this.updater.enqueueReplaceState(this, newState, callback); + }, + + /** + * Checks whether or not this composite component is mounted. + * @return {boolean} True if mounted, false otherwise. + * @protected + * @final + */ + isMounted: function () { + if (true) { + warning( + this.__didWarnIsMounted, + '%s: isMounted is deprecated. Instead, make sure to clean up ' + + 'subscriptions and pending requests in componentWillUnmount to ' + + 'prevent memory leaks.', + (this.constructor && this.constructor.displayName) || this.name || 'Component', + ); + this.__didWarnIsMounted = true; + } + return !!this.__isMounted; + }, + }; + + var ReactClassComponent = function () {}; + _assign(ReactClassComponent.prototype, ReactComponent.prototype, ReactClassMixin); + + /** + * Creates a composite component class given a class specification. + * See https://facebook.github.io/react/docs/top-level-api.html#react.createclass + * + * @param {object} spec Class specification (which must define `render`). + * @return {function} Component constructor function. + * @public + */ + function createClass(spec) { + // To keep our warnings more understandable, we'll use a little hack here to + // ensure that Constructor.name !== 'Constructor'. This makes sure we don't + // unnecessarily identify a class without displayName as 'Constructor'. + var Constructor = identity(function (props, context, updater) { + // This constructor gets overridden by mocks. The argument is used + // by mocks to assert on what gets mounted. + + if (true) { + warning( + this instanceof Constructor, + 'Something is calling a React component directly. Use a factory or ' + + 'JSX instead. See: https://fb.me/react-legacyfactory', + ); + } + + // Wire up auto-binding + if (this.__reactAutoBindPairs.length) { + bindAutoBindMethods(this); + } + + this.props = props; + this.context = context; + this.refs = emptyObject; + this.updater = updater || ReactNoopUpdateQueue; + + this.state = null; + + // ReactClasses doesn't have constructors. Instead, they use the + // getInitialState and componentWillMount methods for initialization. + + var initialState = this.getInitialState ? this.getInitialState() : null; + if (true) { + // We allow auto-mocks to proceed as if they're returning null. + if (initialState === undefined && this.getInitialState._isMockFunction) { + // This is probably bad practice. Consider warning here and + // deprecating this convenience. + initialState = null; + } + } + _invariant( + typeof initialState === 'object' && !Array.isArray(initialState), + '%s.getInitialState(): must return an object or null', + Constructor.displayName || 'ReactCompositeComponent', + ); + + this.state = initialState; + }); + Constructor.prototype = new ReactClassComponent(); + Constructor.prototype.constructor = Constructor; + Constructor.prototype.__reactAutoBindPairs = []; + + injectedMixins.forEach(mixSpecIntoComponent.bind(null, Constructor)); + + mixSpecIntoComponent(Constructor, IsMountedPreMixin); + mixSpecIntoComponent(Constructor, spec); + mixSpecIntoComponent(Constructor, IsMountedPostMixin); + + // Initialize the defaultProps property after all mixins have been merged. + if (Constructor.getDefaultProps) { + Constructor.defaultProps = Constructor.getDefaultProps(); + } + + if (true) { + // This is a tag to indicate that the use of these method names is ok, + // since it's used with createClass. If it's not, then it's likely a + // mistake so we'll warn you to use the static property, property + // initializer or constructor respectively. + if (Constructor.getDefaultProps) { + Constructor.getDefaultProps.isReactClassApproved = {}; + } + if (Constructor.prototype.getInitialState) { + Constructor.prototype.getInitialState.isReactClassApproved = {}; + } + } + + _invariant( + Constructor.prototype.render, + 'createClass(...): Class specification must implement a `render` method.', + ); + + if (true) { + warning( + !Constructor.prototype.componentShouldUpdate, + '%s has a method called ' + + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + + 'The name is phrased as a question because the function is ' + + 'expected to return a value.', + spec.displayName || 'A component', + ); + warning( + !Constructor.prototype.componentWillRecieveProps, + '%s has a method called ' + + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', + spec.displayName || 'A component', + ); + warning( + !Constructor.prototype.UNSAFE_componentWillRecieveProps, + '%s has a method called UNSAFE_componentWillRecieveProps(). ' + + 'Did you mean UNSAFE_componentWillReceiveProps()?', + spec.displayName || 'A component', + ); + } + + // Reduce time spent doing lookups by setting these on the prototype. + for (var methodName in ReactClassInterface) { + if (!Constructor.prototype[methodName]) { + Constructor.prototype[methodName] = null; + } + } + + return Constructor; + } + + return createClass; + } + + module.exports = factory; + + /***/ + }, + /* 547 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + */ + + var emptyObject = {}; + + if (true) { + Object.freeze(emptyObject); + } + + module.exports = emptyObject; + + /***/ + }, + /* 548 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + */ + + /** + * Use invariant() to assert state which your program assumes to be true. + * + * Provide sprintf-style format (only %s is supported) and arguments + * to provide information about what broke and what you were + * expecting. + * + * The invariant message will be stripped in production, but the invariant + * will remain to ensure logic does not differ in production. + */ + + var validateFormat = function validateFormat(format) {}; + + if (true) { + validateFormat = function validateFormat(format) { + if (format === undefined) { + throw new Error('invariant requires an error message argument'); + } + }; + } + + function invariant(condition, format, a, b, c, d, e, f) { + validateFormat(format); + + if (!condition) { + var error; + if (format === undefined) { + error = new Error( + 'Minified exception occurred; use the non-minified dev environment ' + + 'for the full error message and additional helpful warnings.', + ); + } else { + var args = [a, b, c, d, e, f]; + var argIndex = 0; + error = new Error( + format.replace(/%s/g, function () { + return args[argIndex++]; + }), + ); + error.name = 'Invariant Violation'; + } + + error.framesToPop = 1; // we don't care about invariant's own frame + throw error; + } + } + + module.exports = invariant; + + /***/ + }, + /* 549 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright (c) 2014-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + */ + + var emptyFunction = __webpack_require__(550); + + /** + * Similar to invariant but only logs a warning if the condition is not met. + * This can be used to log issues in development environments in critical + * paths. Removing the logging code for production environments will keep the + * same logic and follow the same code paths. + */ + + var warning = emptyFunction; + + if (true) { + var printWarning = function printWarning(format) { + for ( + var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; + _key < _len; + _key++ + ) { + args[_key - 1] = arguments[_key]; + } + + var argIndex = 0; + var message = + 'Warning: ' + + format.replace(/%s/g, function () { + return args[argIndex++]; + }); + if (typeof console !== 'undefined') { + console.error(message); + } + try { + // --- Welcome to debugging React --- + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + throw new Error(message); + } catch (x) {} + }; + + warning = function warning(condition, format) { + if (format === undefined) { + throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument'); + } + + if (format.indexOf('Failed Composite propType: ') === 0) { + return; // Ignore CompositeComponent proptype check. + } + + if (!condition) { + for ( + var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; + _key2 < _len2; + _key2++ + ) { + args[_key2 - 2] = arguments[_key2]; + } + + printWarning.apply(undefined, [format].concat(args)); + } + }; + } + + module.exports = warning; + + /***/ + }, + /* 550 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + /** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * + */ + + function makeEmptyFunction(arg) { + return function () { + return arg; + }; + } + + /** + * This function accepts and discards inputs; it has no side effects. This is + * primarily useful idiomatically for overridable function endpoints which + * always need to be callable, since JS lacks a null-call idiom ala Cocoa. + */ + var emptyFunction = function emptyFunction() {}; + + emptyFunction.thatReturns = makeEmptyFunction; + emptyFunction.thatReturnsFalse = makeEmptyFunction(false); + emptyFunction.thatReturnsTrue = makeEmptyFunction(true); + emptyFunction.thatReturnsNull = makeEmptyFunction(null); + emptyFunction.thatReturnsThis = function () { + return this; + }; + emptyFunction.thatReturnsArgument = function (arg) { + return arg; + }; + + module.exports = emptyFunction; + + /***/ + }, + /* 551 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + /* eslint-disable no-unused-vars */ + + // Example of logging and throw error handling + + var HelloWorldWithLogAndThrow = function HelloWorldWithLogAndThrow(props, context) { + /* eslint-disable no-console */ + console.log('console.log in HelloWorld'); + console.warn('console.warn in HelloWorld'); + console.error('console.error in HelloWorld'); + throw new Error('throw in HelloWorldWithLogAndThrow'); + }; + + var _default = HelloWorldWithLogAndThrow; + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + HelloWorldWithLogAndThrow, + 'HelloWorldWithLogAndThrow', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/HelloWorldWithLogAndThrow.jsx', + ); + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/HelloWorldWithLogAndThrow.jsx', + ); + })(); + + /***/ + }, + /* 552 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__components_HelloWorld__ = + __webpack_require__(161); + // Top level component for simple client side only rendering + + /* + * Export a function that takes the props and returns a ReactComponent. + * This is used for the client rendering hook after the page html is rendered. + * React will see that the state is the same and not do anything. + * Note, this is imported as "HelloWorldApp" by "clientRegistration.jsx" + * + * Note, this is a fictional example, as you'd only use a generator function if you wanted to run + * some extra code, such as setting up Redux and React-Router. + */ + + var _default = function _default(props) { + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_1__components_HelloWorld__['a' /* default */], + props, + ); + }; + + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/startup/HelloWorldApp.jsx', + ); + })(); + + /***/ + }, + /* 553 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + // Top level component for simple client side only rendering + + /* + * Just an example of what can go wrong while coding. No import. Whoops! + */ + + var _default = function _default(props) { + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(HelloWorld, props); + }; + + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/startup/BrokenApp.jsx', + ); + })(); + + /***/ + }, + /* 554 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_redux__ = __webpack_require__(109); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_redux__ = __webpack_require__(162); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_redux_thunk__ = __webpack_require__(249); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__reducers_reducersIndex__ = + __webpack_require__(250); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__store_composeInitialState__ = + __webpack_require__(583); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__components_HelloWorldContainer__ = + __webpack_require__(252); + // This is loaded by execJs and Rails to generate the HTML used for server rendering. + // Compare this file to ./ClientApp.jsx + // This module should export one default method that take props and returns the react component to + // render. + + // Uses the index + + /* + * Export a function that takes the props and returns a ReactComponent. + * This is used for the server rendering. + * In the client, React will see that the state is the same and not do anything. + */ + + var _default = function _default(props, railsContext) { + var combinedReducer = Object(__WEBPACK_IMPORTED_MODULE_1_redux__['c' /* combineReducers */])( + __WEBPACK_IMPORTED_MODULE_4__reducers_reducersIndex__['a' /* default */], + ); + var combinedProps = Object( + __WEBPACK_IMPORTED_MODULE_5__store_composeInitialState__['a' /* default */], + )(props, railsContext); + + // This is where we'll put in the middleware for the async function. Placeholder. + // store will have helloWorldData as a top level property + var store = Object(__WEBPACK_IMPORTED_MODULE_1_redux__['a' /* applyMiddleware */])( + __WEBPACK_IMPORTED_MODULE_3_redux_thunk__['a' /* default */], + )(__WEBPACK_IMPORTED_MODULE_1_redux__['d' /* createStore */])(combinedReducer, combinedProps); + + // Provider uses the this.props.children, so we're not typical React syntax. + // This allows redux to add additional props to the HelloWorldContainer. + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_2_react_redux__['a' /* Provider */], + { store: store }, + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_6__components_HelloWorldContainer__['a' /* default */], + null, + ), + ); + }; + + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/startup/ServerReduxApp.jsx', + ); + })(); + + /***/ + }, + /* 555 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Symbol_js__ = __webpack_require__(241); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getRawTag_js__ = __webpack_require__(558); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__objectToString_js__ = __webpack_require__(559); + + /** `Object#toString` result references. */ + var nullTag = '[object Null]', + undefinedTag = '[object Undefined]'; + + /** Built-in value references. */ + var symToStringTag = __WEBPACK_IMPORTED_MODULE_0__Symbol_js__['a' /* default */] + ? __WEBPACK_IMPORTED_MODULE_0__Symbol_js__['a' /* default */].toStringTag + : undefined; + + /** + * The base implementation of `getTag` without fallbacks for buggy environments. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ + function baseGetTag(value) { + if (value == null) { + return value === undefined ? undefinedTag : nullTag; + } + return symToStringTag && symToStringTag in Object(value) + ? Object(__WEBPACK_IMPORTED_MODULE_1__getRawTag_js__['a' /* default */])(value) + : Object(__WEBPACK_IMPORTED_MODULE_2__objectToString_js__['a' /* default */])(value); + } + + /* harmony default export */ __webpack_exports__['a'] = baseGetTag; + + /***/ + }, + /* 556 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__freeGlobal_js__ = __webpack_require__(557); + + /** Detect free variable `self`. */ + var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + + /** Used as a reference to the global object. */ + var root = + __WEBPACK_IMPORTED_MODULE_0__freeGlobal_js__['a' /* default */] || + freeSelf || + Function('return this')(); + + /* harmony default export */ __webpack_exports__['a'] = root; + + /***/ + }, + /* 557 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /** Detect free variable `global` from Node.js. */ + var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + + /* harmony default export */ __webpack_exports__['a'] = freeGlobal; + + /***/ + }, + /* 558 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Symbol_js__ = __webpack_require__(241); + + /** Used for built-in method references. */ + var objectProto = Object.prototype; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ + var nativeObjectToString = objectProto.toString; + + /** Built-in value references. */ + var symToStringTag = __WEBPACK_IMPORTED_MODULE_0__Symbol_js__['a' /* default */] + ? __WEBPACK_IMPORTED_MODULE_0__Symbol_js__['a' /* default */].toStringTag + : undefined; + + /** + * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the raw `toStringTag`. + */ + function getRawTag(value) { + var isOwn = hasOwnProperty.call(value, symToStringTag), + tag = value[symToStringTag]; + + try { + value[symToStringTag] = undefined; + var unmasked = true; + } catch (e) {} + + var result = nativeObjectToString.call(value); + if (unmasked) { + if (isOwn) { + value[symToStringTag] = tag; + } else { + delete value[symToStringTag]; + } + } + return result; + } + + /* harmony default export */ __webpack_exports__['a'] = getRawTag; + + /***/ + }, + /* 559 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /** Used for built-in method references. */ + var objectProto = Object.prototype; + + /** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ + var nativeObjectToString = objectProto.toString; + + /** + * Converts `value` to a string using `Object.prototype.toString`. + * + * @private + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + */ + function objectToString(value) { + return nativeObjectToString.call(value); + } + + /* harmony default export */ __webpack_exports__['a'] = objectToString; + + /***/ + }, + /* 560 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__overArg_js__ = __webpack_require__(561); + + /** Built-in value references. */ + var getPrototype = Object(__WEBPACK_IMPORTED_MODULE_0__overArg_js__['a' /* default */])( + Object.getPrototypeOf, + Object, + ); + + /* harmony default export */ __webpack_exports__['a'] = getPrototype; + + /***/ + }, + /* 561 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ + function overArg(func, transform) { + return function (arg) { + return func(transform(arg)); + }; + } + + /* harmony default export */ __webpack_exports__['a'] = overArg; + + /***/ + }, + /* 562 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ + function isObjectLike(value) { + return value != null && typeof value == 'object'; + } + + /* harmony default export */ __webpack_exports__['a'] = isObjectLike; + + /***/ + }, + /* 563 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (module) { + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__ponyfill_js__ = __webpack_require__(565); + /* global window */ + + var root; + + if (typeof self !== 'undefined') { + root = self; + } else if (typeof window !== 'undefined') { + root = window; + } else if (typeof global !== 'undefined') { + root = global; + } else if (true) { + root = module; + } else { + root = Function('return this')(); + } + + var result = Object(__WEBPACK_IMPORTED_MODULE_0__ponyfill_js__['a' /* default */])(root); + /* harmony default export */ __webpack_exports__['a'] = result; + + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(564)(module)); + + /***/ + }, + /* 564 */ + /***/ function (module, exports) { + module.exports = function (originalModule) { + if (!originalModule.webpackPolyfill) { + var module = Object.create(originalModule); + // module.parent = undefined by default + if (!module.children) module.children = []; + Object.defineProperty(module, 'loaded', { + enumerable: true, + get: function () { + return module.l; + }, + }); + Object.defineProperty(module, 'id', { + enumerable: true, + get: function () { + return module.i; + }, + }); + Object.defineProperty(module, 'exports', { + enumerable: true, + }); + module.webpackPolyfill = 1; + } + return module; + }; + + /***/ + }, + /* 565 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = symbolObservablePonyfill; + function symbolObservablePonyfill(root) { + var result; + var Symbol = root.Symbol; + + if (typeof Symbol === 'function') { + if (Symbol.observable) { + result = Symbol.observable; + } else { + result = Symbol('observable'); + Symbol.observable = result; + } + } else { + result = '@@observable'; + } + + return result; + } + + /***/ + }, + /* 566 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = combineReducers; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createStore__ = __webpack_require__(239); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_es_isPlainObject__ = + __webpack_require__(240); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_warning__ = __webpack_require__(242); + + function getUndefinedStateErrorMessage(key, action) { + var actionType = action && action.type; + var actionName = (actionType && '"' + actionType.toString() + '"') || 'an action'; + + return ( + 'Given action ' + + actionName + + ', reducer "' + + key + + '" returned undefined. ' + + 'To ignore an action, you must explicitly return the previous state. ' + + 'If you want this reducer to hold no value, you can return null instead of undefined.' + ); + } + + function getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) { + var reducerKeys = Object.keys(reducers); + var argumentName = + action && action.type === __WEBPACK_IMPORTED_MODULE_0__createStore__['a' /* ActionTypes */].INIT + ? 'preloadedState argument passed to createStore' + : 'previous state received by the reducer'; + + if (reducerKeys.length === 0) { + return ( + 'Store does not have a valid reducer. Make sure the argument passed ' + + 'to combineReducers is an object whose values are reducers.' + ); + } + + if (!Object(__WEBPACK_IMPORTED_MODULE_1_lodash_es_isPlainObject__['a' /* default */])(inputState)) { + return ( + 'The ' + + argumentName + + ' has unexpected type of "' + + {}.toString.call(inputState).match(/\s([a-z|A-Z]+)/)[1] + + '". Expected argument to be an object with the following ' + + ('keys: "' + reducerKeys.join('", "') + '"') + ); + } + + var unexpectedKeys = Object.keys(inputState).filter(function (key) { + return !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key]; + }); + + unexpectedKeys.forEach(function (key) { + unexpectedKeyCache[key] = true; + }); + + if (unexpectedKeys.length > 0) { + return ( + 'Unexpected ' + + (unexpectedKeys.length > 1 ? 'keys' : 'key') + + ' ' + + ('"' + unexpectedKeys.join('", "') + '" found in ' + argumentName + '. ') + + 'Expected to find one of the known reducer keys instead: ' + + ('"' + reducerKeys.join('", "') + '". Unexpected keys will be ignored.') + ); + } + } + + function assertReducerShape(reducers) { + Object.keys(reducers).forEach(function (key) { + var reducer = reducers[key]; + var initialState = reducer(undefined, { + type: __WEBPACK_IMPORTED_MODULE_0__createStore__['a' /* ActionTypes */].INIT, + }); + + if (typeof initialState === 'undefined') { + throw new Error( + 'Reducer "' + + key + + '" returned undefined during initialization. ' + + 'If the state passed to the reducer is undefined, you must ' + + 'explicitly return the initial state. The initial state may ' + + "not be undefined. If you don't want to set a value for this reducer, " + + 'you can use null instead of undefined.', + ); + } + + var type = + '@@redux/PROBE_UNKNOWN_ACTION_' + Math.random().toString(36).substring(7).split('').join('.'); + if (typeof reducer(undefined, { type: type }) === 'undefined') { + throw new Error( + 'Reducer "' + + key + + '" returned undefined when probed with a random type. ' + + ("Don't try to handle " + + __WEBPACK_IMPORTED_MODULE_0__createStore__['a' /* ActionTypes */].INIT + + ' or other actions in "redux/*" ') + + 'namespace. They are considered private. Instead, you must return the ' + + 'current state for any unknown actions, unless it is undefined, ' + + 'in which case you must return the initial state, regardless of the ' + + 'action type. The initial state may not be undefined, but can be null.', + ); + } + }); + } + + /** + * Turns an object whose values are different reducer functions, into a single + * reducer function. It will call every child reducer, and gather their results + * into a single state object, whose keys correspond to the keys of the passed + * reducer functions. + * + * @param {Object} reducers An object whose values correspond to different + * reducer functions that need to be combined into one. One handy way to obtain + * it is to use ES6 `import * as reducers` syntax. The reducers may never return + * undefined for any action. Instead, they should return their initial state + * if the state passed to them was undefined, and the current state for any + * unrecognized action. + * + * @returns {Function} A reducer function that invokes every reducer inside the + * passed object, and builds a state object with the same shape. + */ + function combineReducers(reducers) { + var reducerKeys = Object.keys(reducers); + var finalReducers = {}; + for (var i = 0; i < reducerKeys.length; i++) { + var key = reducerKeys[i]; + + if (true) { + if (typeof reducers[key] === 'undefined') { + Object(__WEBPACK_IMPORTED_MODULE_2__utils_warning__['a' /* default */])( + 'No reducer provided for key "' + key + '"', + ); + } + } + + if (typeof reducers[key] === 'function') { + finalReducers[key] = reducers[key]; + } + } + var finalReducerKeys = Object.keys(finalReducers); + + var unexpectedKeyCache = void 0; + if (true) { + unexpectedKeyCache = {}; + } + + var shapeAssertionError = void 0; + try { + assertReducerShape(finalReducers); + } catch (e) { + shapeAssertionError = e; + } + + return function combination() { + var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + var action = arguments[1]; + + if (shapeAssertionError) { + throw shapeAssertionError; + } + + if (true) { + var warningMessage = getUnexpectedStateShapeWarningMessage( + state, + finalReducers, + action, + unexpectedKeyCache, + ); + if (warningMessage) { + Object(__WEBPACK_IMPORTED_MODULE_2__utils_warning__['a' /* default */])(warningMessage); + } + } + + var hasChanged = false; + var nextState = {}; + for (var _i = 0; _i < finalReducerKeys.length; _i++) { + var _key = finalReducerKeys[_i]; + var reducer = finalReducers[_key]; + var previousStateForKey = state[_key]; + var nextStateForKey = reducer(previousStateForKey, action); + if (typeof nextStateForKey === 'undefined') { + var errorMessage = getUndefinedStateErrorMessage(_key, action); + throw new Error(errorMessage); + } + nextState[_key] = nextStateForKey; + hasChanged = hasChanged || nextStateForKey !== previousStateForKey; + } + return hasChanged ? nextState : state; + }; + } + + /***/ + }, + /* 567 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = bindActionCreators; + function bindActionCreator(actionCreator, dispatch) { + return function () { + return dispatch(actionCreator.apply(undefined, arguments)); + }; + } + + /** + * Turns an object whose values are action creators, into an object with the + * same keys, but with every function wrapped into a `dispatch` call so they + * may be invoked directly. This is just a convenience method, as you can call + * `store.dispatch(MyActionCreators.doSomething())` yourself just fine. + * + * For convenience, you can also pass a single function as the first argument, + * and get a function in return. + * + * @param {Function|Object} actionCreators An object whose values are action + * creator functions. One handy way to obtain it is to use ES6 `import * as` + * syntax. You may also pass a single function. + * + * @param {Function} dispatch The `dispatch` function available on your Redux + * store. + * + * @returns {Function|Object} The object mimicking the original object, but with + * every action creator wrapped into the `dispatch` call. If you passed a + * function as `actionCreators`, the return value will also be a single + * function. + */ + function bindActionCreators(actionCreators, dispatch) { + if (typeof actionCreators === 'function') { + return bindActionCreator(actionCreators, dispatch); + } + + if (typeof actionCreators !== 'object' || actionCreators === null) { + throw new Error( + 'bindActionCreators expected an object or a function, instead received ' + + (actionCreators === null ? 'null' : typeof actionCreators) + + '. ' + + 'Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?', + ); + } + + var keys = Object.keys(actionCreators); + var boundActionCreators = {}; + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + var actionCreator = actionCreators[key]; + if (typeof actionCreator === 'function') { + boundActionCreators[key] = bindActionCreator(actionCreator, dispatch); + } + } + return boundActionCreators; + } + + /***/ + }, + /* 568 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = applyMiddleware; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__compose__ = __webpack_require__(243); + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + /** + * Creates a store enhancer that applies middleware to the dispatch method + * of the Redux store. This is handy for a variety of tasks, such as expressing + * asynchronous actions in a concise manner, or logging every action payload. + * + * See `redux-thunk` package as an example of the Redux middleware. + * + * Because middleware is potentially asynchronous, this should be the first + * store enhancer in the composition chain. + * + * Note that each middleware will be given the `dispatch` and `getState` functions + * as named arguments. + * + * @param {...Function} middlewares The middleware chain to be applied. + * @returns {Function} A store enhancer applying the middleware. + */ + function applyMiddleware() { + for (var _len = arguments.length, middlewares = Array(_len), _key = 0; _key < _len; _key++) { + middlewares[_key] = arguments[_key]; + } + + return function (createStore) { + return function (reducer, preloadedState, enhancer) { + var store = createStore(reducer, preloadedState, enhancer); + var _dispatch = store.dispatch; + var chain = []; + + var middlewareAPI = { + getState: store.getState, + dispatch: function dispatch(action) { + return _dispatch(action); + }, + }; + chain = middlewares.map(function (middleware) { + return middleware(middlewareAPI); + }); + _dispatch = __WEBPACK_IMPORTED_MODULE_0__compose__['a' /* default */].apply( + undefined, + chain, + )(store.dispatch); + + return _extends({}, store, { + dispatch: _dispatch, + }); + }; + }; + } + + /***/ + }, + /* 569 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* unused harmony export createProvider */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_inheritsLoose__ = + __webpack_require__(244); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types__ = __webpack_require__(10); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_2_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__utils_PropTypes__ = __webpack_require__(245); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__utils_warning__ = __webpack_require__(163); + + var prefixUnsafeLifecycleMethods = + typeof __WEBPACK_IMPORTED_MODULE_1_react___default.a.forwardRef !== 'undefined'; + var didWarnAboutReceivingStore = false; + + function warnAboutReceivingStore() { + if (didWarnAboutReceivingStore) { + return; + } + + didWarnAboutReceivingStore = true; + Object(__WEBPACK_IMPORTED_MODULE_4__utils_warning__['a' /* default */])( + '<Provider> does not support changing `store` on the fly. ' + + 'It is most likely that you see this error because you updated to ' + + 'Redux 2.x and React Redux 2.x which no longer hot reload reducers ' + + 'automatically. See https://github.com/reduxjs/react-redux/releases/' + + 'tag/v2.0.0 for the migration instructions.', + ); + } + + function createProvider(storeKey) { + var _Provider$childContex; + + if (storeKey === void 0) { + storeKey = 'store'; + } + + var subscriptionKey = storeKey + 'Subscription'; + + var Provider = + /*#__PURE__*/ + (function (_Component) { + Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_inheritsLoose__['a' /* default */])( + Provider, + _Component, + ); + + var _proto = Provider.prototype; + + _proto.getChildContext = function getChildContext() { + var _ref; + + return (_ref = {}), (_ref[storeKey] = this[storeKey]), (_ref[subscriptionKey] = null), _ref; + }; + + function Provider(props, context) { + var _this; + + _this = _Component.call(this, props, context) || this; + _this[storeKey] = props.store; + return _this; + } + + _proto.render = function render() { + return __WEBPACK_IMPORTED_MODULE_1_react__['Children'].only(this.props.children); + }; + + return Provider; + })(__WEBPACK_IMPORTED_MODULE_1_react__['Component']); + + if (true) { + // Use UNSAFE_ event name where supported + var eventName = prefixUnsafeLifecycleMethods + ? 'UNSAFE_componentWillReceiveProps' + : 'componentWillReceiveProps'; + + Provider.prototype[eventName] = function (nextProps) { + if (this[storeKey] !== nextProps.store) { + warnAboutReceivingStore(); + } + }; + } + + Provider.propTypes = { + store: __WEBPACK_IMPORTED_MODULE_3__utils_PropTypes__['a' /* storeShape */].isRequired, + children: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.element.isRequired, + }; + Provider.childContextTypes = + ((_Provider$childContex = {}), + (_Provider$childContex[storeKey] = + __WEBPACK_IMPORTED_MODULE_3__utils_PropTypes__['a' /* storeShape */].isRequired), + (_Provider$childContex[subscriptionKey] = + __WEBPACK_IMPORTED_MODULE_3__utils_PropTypes__['b' /* subscriptionShape */]), + _Provider$childContex); + return Provider; + } + /* harmony default export */ __webpack_exports__['a'] = createProvider(); + + /***/ + }, + /* 570 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = _assertThisInitialized; + function _assertThisInitialized(self) { + if (self === void 0) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return self; + } + + /***/ + }, + /* 571 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var reactIs = __webpack_require__(108); + + /** + * Copyright 2015, Yahoo! Inc. + * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. + */ + var REACT_STATICS = { + childContextTypes: true, + contextType: true, + contextTypes: true, + defaultProps: true, + displayName: true, + getDefaultProps: true, + getDerivedStateFromError: true, + getDerivedStateFromProps: true, + mixins: true, + propTypes: true, + type: true, + }; + var KNOWN_STATICS = { + name: true, + length: true, + prototype: true, + caller: true, + callee: true, + arguments: true, + arity: true, + }; + var FORWARD_REF_STATICS = { + $$typeof: true, + render: true, + defaultProps: true, + displayName: true, + propTypes: true, + }; + var MEMO_STATICS = { + $$typeof: true, + compare: true, + defaultProps: true, + displayName: true, + propTypes: true, + type: true, + }; + var TYPE_STATICS = {}; + TYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS; + TYPE_STATICS[reactIs.Memo] = MEMO_STATICS; + + function getStatics(component) { + // React v16.11 and below + if (reactIs.isMemo(component)) { + return MEMO_STATICS; + } // React v16.12 and above + + return TYPE_STATICS[component['$$typeof']] || REACT_STATICS; + } + + var defineProperty = Object.defineProperty; + var getOwnPropertyNames = Object.getOwnPropertyNames; + var getOwnPropertySymbols = Object.getOwnPropertySymbols; + var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; + var getPrototypeOf = Object.getPrototypeOf; + var objectPrototype = Object.prototype; + function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) { + if (typeof sourceComponent !== 'string') { + // don't hoist over string (html) components + if (objectPrototype) { + var inheritedComponent = getPrototypeOf(sourceComponent); + + if (inheritedComponent && inheritedComponent !== objectPrototype) { + hoistNonReactStatics(targetComponent, inheritedComponent, blacklist); + } + } + + var keys = getOwnPropertyNames(sourceComponent); + + if (getOwnPropertySymbols) { + keys = keys.concat(getOwnPropertySymbols(sourceComponent)); + } + + var targetStatics = getStatics(targetComponent); + var sourceStatics = getStatics(sourceComponent); + + for (var i = 0; i < keys.length; ++i) { + var key = keys[i]; + + if ( + !KNOWN_STATICS[key] && + !(blacklist && blacklist[key]) && + !(sourceStatics && sourceStatics[key]) && + !(targetStatics && targetStatics[key]) + ) { + var descriptor = getOwnPropertyDescriptor(sourceComponent, key); + + try { + // Avoid failures from read-only properties + defineProperty(targetComponent, key, descriptor); + } catch (e) {} + } + } + } + + return targetComponent; + } + + module.exports = hoistNonReactStatics; + + /***/ + }, + /* 572 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'a', function () { + return Subscription; + }); + // encapsulates the subscription logic for connecting a component to the redux store, as + // well as nesting subscriptions of descendant components, so that we can ensure the + // ancestor components re-render before descendants + var CLEARED = null; + var nullListeners = { + notify: function notify() {}, + }; + + function createListenerCollection() { + // the current/next pattern is copied from redux's createStore code. + // TODO: refactor+expose that code to be reusable here? + var current = []; + var next = []; + return { + clear: function clear() { + next = CLEARED; + current = CLEARED; + }, + notify: function notify() { + var listeners = (current = next); + + for (var i = 0; i < listeners.length; i++) { + listeners[i](); + } + }, + get: function get() { + return next; + }, + subscribe: function subscribe(listener) { + var isSubscribed = true; + if (next === current) next = current.slice(); + next.push(listener); + return function unsubscribe() { + if (!isSubscribed || current === CLEARED) return; + isSubscribed = false; + if (next === current) next = current.slice(); + next.splice(next.indexOf(listener), 1); + }; + }, + }; + } + + var Subscription = + /*#__PURE__*/ + (function () { + function Subscription(store, parentSub, onStateChange) { + this.store = store; + this.parentSub = parentSub; + this.onStateChange = onStateChange; + this.unsubscribe = null; + this.listeners = nullListeners; + } + + var _proto = Subscription.prototype; + + _proto.addNestedSub = function addNestedSub(listener) { + this.trySubscribe(); + return this.listeners.subscribe(listener); + }; + + _proto.notifyNestedSubs = function notifyNestedSubs() { + this.listeners.notify(); + }; + + _proto.isSubscribed = function isSubscribed() { + return Boolean(this.unsubscribe); + }; + + _proto.trySubscribe = function trySubscribe() { + if (!this.unsubscribe) { + this.unsubscribe = this.parentSub + ? this.parentSub.addNestedSub(this.onStateChange) + : this.store.subscribe(this.onStateChange); + this.listeners = createListenerCollection(); + } + }; + + _proto.tryUnsubscribe = function tryUnsubscribe() { + if (this.unsubscribe) { + this.unsubscribe(); + this.unsubscribe = null; + this.listeners.clear(); + this.listeners = nullListeners; + } + }; + + return Subscription; + })(); + + /***/ + }, + /* 573 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* unused harmony export createConnect */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_extends__ = + __webpack_require__(164); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_esm_objectWithoutPropertiesLoose__ = + __webpack_require__(165); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__components_connectAdvanced__ = + __webpack_require__(246); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__utils_shallowEqual__ = __webpack_require__(574); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__mapDispatchToProps__ = __webpack_require__(575); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__mapStateToProps__ = __webpack_require__(577); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__mergeProps__ = __webpack_require__(578); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__selectorFactory__ = __webpack_require__(579); + + /* + connect is a facade over connectAdvanced. It turns its args into a compatible + selectorFactory, which has the signature: + + (dispatch, options) => (nextState, nextOwnProps) => nextFinalProps + + connect passes its args to connectAdvanced as options, which will in turn pass them to + selectorFactory each time a Connect component instance is instantiated or hot reloaded. + + selectorFactory returns a final props selector from its mapStateToProps, + mapStateToPropsFactories, mapDispatchToProps, mapDispatchToPropsFactories, mergeProps, + mergePropsFactories, and pure args. + + The resulting final props selector is called by the Connect component instance whenever + it receives new props or store state. + */ + + function match(arg, factories, name) { + for (var i = factories.length - 1; i >= 0; i--) { + var result = factories[i](arg); + if (result) return result; + } + + return function (dispatch, options) { + throw new Error( + 'Invalid value of type ' + + typeof arg + + ' for ' + + name + + ' argument when connecting component ' + + options.wrappedComponentName + + '.', + ); + }; + } + + function strictEqual(a, b) { + return a === b; + } // createConnect with default args builds the 'official' connect behavior. Calling it with + // different options opens up some testing and extensibility scenarios + + function createConnect(_temp) { + var _ref = _temp === void 0 ? {} : _temp, + _ref$connectHOC = _ref.connectHOC, + connectHOC = + _ref$connectHOC === void 0 + ? __WEBPACK_IMPORTED_MODULE_2__components_connectAdvanced__['a' /* default */] + : _ref$connectHOC, + _ref$mapStateToPropsF = _ref.mapStateToPropsFactories, + mapStateToPropsFactories = + _ref$mapStateToPropsF === void 0 + ? __WEBPACK_IMPORTED_MODULE_5__mapStateToProps__['a' /* default */] + : _ref$mapStateToPropsF, + _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories, + mapDispatchToPropsFactories = + _ref$mapDispatchToPro === void 0 + ? __WEBPACK_IMPORTED_MODULE_4__mapDispatchToProps__['a' /* default */] + : _ref$mapDispatchToPro, + _ref$mergePropsFactor = _ref.mergePropsFactories, + mergePropsFactories = + _ref$mergePropsFactor === void 0 + ? __WEBPACK_IMPORTED_MODULE_6__mergeProps__['a' /* default */] + : _ref$mergePropsFactor, + _ref$selectorFactory = _ref.selectorFactory, + selectorFactory = + _ref$selectorFactory === void 0 + ? __WEBPACK_IMPORTED_MODULE_7__selectorFactory__['a' /* default */] + : _ref$selectorFactory; + + return function connect(mapStateToProps, mapDispatchToProps, mergeProps, _ref2) { + if (_ref2 === void 0) { + _ref2 = {}; + } + + var _ref3 = _ref2, + _ref3$pure = _ref3.pure, + pure = _ref3$pure === void 0 ? true : _ref3$pure, + _ref3$areStatesEqual = _ref3.areStatesEqual, + areStatesEqual = _ref3$areStatesEqual === void 0 ? strictEqual : _ref3$areStatesEqual, + _ref3$areOwnPropsEqua = _ref3.areOwnPropsEqual, + areOwnPropsEqual = + _ref3$areOwnPropsEqua === void 0 + ? __WEBPACK_IMPORTED_MODULE_3__utils_shallowEqual__['a' /* default */] + : _ref3$areOwnPropsEqua, + _ref3$areStatePropsEq = _ref3.areStatePropsEqual, + areStatePropsEqual = + _ref3$areStatePropsEq === void 0 + ? __WEBPACK_IMPORTED_MODULE_3__utils_shallowEqual__['a' /* default */] + : _ref3$areStatePropsEq, + _ref3$areMergedPropsE = _ref3.areMergedPropsEqual, + areMergedPropsEqual = + _ref3$areMergedPropsE === void 0 + ? __WEBPACK_IMPORTED_MODULE_3__utils_shallowEqual__['a' /* default */] + : _ref3$areMergedPropsE, + extraOptions = Object( + __WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_esm_objectWithoutPropertiesLoose__[ + 'a' /* default */ + ], + )(_ref3, [ + 'pure', + 'areStatesEqual', + 'areOwnPropsEqual', + 'areStatePropsEqual', + 'areMergedPropsEqual', + ]); + + var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps'); + var initMapDispatchToProps = match( + mapDispatchToProps, + mapDispatchToPropsFactories, + 'mapDispatchToProps', + ); + var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps'); + return connectHOC( + selectorFactory, + Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_extends__['a' /* default */])( + { + // used in error messages + methodName: 'connect', + // used to compute Connect's displayName from the wrapped component's displayName. + getDisplayName: function getDisplayName(name) { + return 'Connect(' + name + ')'; + }, + // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes + shouldHandleStateChanges: Boolean(mapStateToProps), + // passed through to selectorFactory + initMapStateToProps: initMapStateToProps, + initMapDispatchToProps: initMapDispatchToProps, + initMergeProps: initMergeProps, + pure: pure, + areStatesEqual: areStatesEqual, + areOwnPropsEqual: areOwnPropsEqual, + areStatePropsEqual: areStatePropsEqual, + areMergedPropsEqual: areMergedPropsEqual, + }, + extraOptions, + ), + ); + }; + } + /* harmony default export */ __webpack_exports__['a'] = createConnect(); + + /***/ + }, + /* 574 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = shallowEqual; + var hasOwn = Object.prototype.hasOwnProperty; + + function is(x, y) { + if (x === y) { + return x !== 0 || y !== 0 || 1 / x === 1 / y; + } else { + return x !== x && y !== y; + } + } + + function shallowEqual(objA, objB) { + if (is(objA, objB)) return true; + + if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) { + return false; + } + + var keysA = Object.keys(objA); + var keysB = Object.keys(objB); + if (keysA.length !== keysB.length) return false; + + for (var i = 0; i < keysA.length; i++) { + if (!hasOwn.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) { + return false; + } + } + + return true; + } + + /***/ + }, + /* 575 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* unused harmony export whenMapDispatchToPropsIsFunction */ + /* unused harmony export whenMapDispatchToPropsIsMissing */ + /* unused harmony export whenMapDispatchToPropsIsObject */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_redux__ = __webpack_require__(109); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__wrapMapToProps__ = __webpack_require__(247); + + function whenMapDispatchToPropsIsFunction(mapDispatchToProps) { + return typeof mapDispatchToProps === 'function' + ? Object(__WEBPACK_IMPORTED_MODULE_1__wrapMapToProps__['b' /* wrapMapToPropsFunc */])( + mapDispatchToProps, + 'mapDispatchToProps', + ) + : undefined; + } + function whenMapDispatchToPropsIsMissing(mapDispatchToProps) { + return !mapDispatchToProps + ? Object(__WEBPACK_IMPORTED_MODULE_1__wrapMapToProps__['a' /* wrapMapToPropsConstant */])( + function (dispatch) { + return { + dispatch: dispatch, + }; + }, + ) + : undefined; + } + function whenMapDispatchToPropsIsObject(mapDispatchToProps) { + return mapDispatchToProps && typeof mapDispatchToProps === 'object' + ? Object(__WEBPACK_IMPORTED_MODULE_1__wrapMapToProps__['a' /* wrapMapToPropsConstant */])( + function (dispatch) { + return Object(__WEBPACK_IMPORTED_MODULE_0_redux__['b' /* bindActionCreators */])( + mapDispatchToProps, + dispatch, + ); + }, + ) + : undefined; + } + /* harmony default export */ __webpack_exports__['a'] = [ + whenMapDispatchToPropsIsFunction, + whenMapDispatchToPropsIsMissing, + whenMapDispatchToPropsIsObject, + ]; + + /***/ + }, + /* 576 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = isPlainObject; + /** + * @param {any} obj The object to inspect. + * @returns {boolean} True if the argument appears to be a plain object. + */ + function isPlainObject(obj) { + if (typeof obj !== 'object' || obj === null) return false; + var proto = Object.getPrototypeOf(obj); + if (proto === null) return true; + var baseProto = proto; + + while (Object.getPrototypeOf(baseProto) !== null) { + baseProto = Object.getPrototypeOf(baseProto); + } + + return proto === baseProto; + } + + /***/ + }, + /* 577 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* unused harmony export whenMapStateToPropsIsFunction */ + /* unused harmony export whenMapStateToPropsIsMissing */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__wrapMapToProps__ = __webpack_require__(247); + + function whenMapStateToPropsIsFunction(mapStateToProps) { + return typeof mapStateToProps === 'function' + ? Object(__WEBPACK_IMPORTED_MODULE_0__wrapMapToProps__['b' /* wrapMapToPropsFunc */])( + mapStateToProps, + 'mapStateToProps', + ) + : undefined; + } + function whenMapStateToPropsIsMissing(mapStateToProps) { + return !mapStateToProps + ? Object(__WEBPACK_IMPORTED_MODULE_0__wrapMapToProps__['a' /* wrapMapToPropsConstant */])( + function () { + return {}; + }, + ) + : undefined; + } + /* harmony default export */ __webpack_exports__['a'] = [ + whenMapStateToPropsIsFunction, + whenMapStateToPropsIsMissing, + ]; + + /***/ + }, + /* 578 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* unused harmony export defaultMergeProps */ + /* unused harmony export wrapMergePropsFunc */ + /* unused harmony export whenMergePropsIsFunction */ + /* unused harmony export whenMergePropsIsOmitted */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_extends__ = + __webpack_require__(164); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__utils_verifyPlainObject__ = + __webpack_require__(248); + + function defaultMergeProps(stateProps, dispatchProps, ownProps) { + return Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_extends__['a' /* default */])( + {}, + ownProps, + stateProps, + dispatchProps, + ); + } + function wrapMergePropsFunc(mergeProps) { + return function initMergePropsProxy(dispatch, _ref) { + var displayName = _ref.displayName, + pure = _ref.pure, + areMergedPropsEqual = _ref.areMergedPropsEqual; + var hasRunOnce = false; + var mergedProps; + return function mergePropsProxy(stateProps, dispatchProps, ownProps) { + var nextMergedProps = mergeProps(stateProps, dispatchProps, ownProps); + + if (hasRunOnce) { + if (!pure || !areMergedPropsEqual(nextMergedProps, mergedProps)) mergedProps = nextMergedProps; + } else { + hasRunOnce = true; + mergedProps = nextMergedProps; + if (true) + Object(__WEBPACK_IMPORTED_MODULE_1__utils_verifyPlainObject__['a' /* default */])( + mergedProps, + displayName, + 'mergeProps', + ); + } + + return mergedProps; + }; + }; + } + function whenMergePropsIsFunction(mergeProps) { + return typeof mergeProps === 'function' ? wrapMergePropsFunc(mergeProps) : undefined; + } + function whenMergePropsIsOmitted(mergeProps) { + return !mergeProps + ? function () { + return defaultMergeProps; + } + : undefined; + } + /* harmony default export */ __webpack_exports__['a'] = [ + whenMergePropsIsFunction, + whenMergePropsIsOmitted, + ]; + + /***/ + }, + /* 579 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* unused harmony export impureFinalPropsSelectorFactory */ + /* unused harmony export pureFinalPropsSelectorFactory */ + /* harmony export (immutable) */ __webpack_exports__['a'] = finalPropsSelectorFactory; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_objectWithoutPropertiesLoose__ = + __webpack_require__(165); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__verifySubselectors__ = __webpack_require__(580); + + function impureFinalPropsSelectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch) { + return function impureFinalPropsSelector(state, ownProps) { + return mergeProps( + mapStateToProps(state, ownProps), + mapDispatchToProps(dispatch, ownProps), + ownProps, + ); + }; + } + function pureFinalPropsSelectorFactory( + mapStateToProps, + mapDispatchToProps, + mergeProps, + dispatch, + _ref, + ) { + var areStatesEqual = _ref.areStatesEqual, + areOwnPropsEqual = _ref.areOwnPropsEqual, + areStatePropsEqual = _ref.areStatePropsEqual; + var hasRunAtLeastOnce = false; + var state; + var ownProps; + var stateProps; + var dispatchProps; + var mergedProps; + + function handleFirstCall(firstState, firstOwnProps) { + state = firstState; + ownProps = firstOwnProps; + stateProps = mapStateToProps(state, ownProps); + dispatchProps = mapDispatchToProps(dispatch, ownProps); + mergedProps = mergeProps(stateProps, dispatchProps, ownProps); + hasRunAtLeastOnce = true; + return mergedProps; + } + + function handleNewPropsAndNewState() { + stateProps = mapStateToProps(state, ownProps); + if (mapDispatchToProps.dependsOnOwnProps) dispatchProps = mapDispatchToProps(dispatch, ownProps); + mergedProps = mergeProps(stateProps, dispatchProps, ownProps); + return mergedProps; + } + + function handleNewProps() { + if (mapStateToProps.dependsOnOwnProps) stateProps = mapStateToProps(state, ownProps); + if (mapDispatchToProps.dependsOnOwnProps) dispatchProps = mapDispatchToProps(dispatch, ownProps); + mergedProps = mergeProps(stateProps, dispatchProps, ownProps); + return mergedProps; + } + + function handleNewState() { + var nextStateProps = mapStateToProps(state, ownProps); + var statePropsChanged = !areStatePropsEqual(nextStateProps, stateProps); + stateProps = nextStateProps; + if (statePropsChanged) mergedProps = mergeProps(stateProps, dispatchProps, ownProps); + return mergedProps; + } + + function handleSubsequentCalls(nextState, nextOwnProps) { + var propsChanged = !areOwnPropsEqual(nextOwnProps, ownProps); + var stateChanged = !areStatesEqual(nextState, state); + state = nextState; + ownProps = nextOwnProps; + if (propsChanged && stateChanged) return handleNewPropsAndNewState(); + if (propsChanged) return handleNewProps(); + if (stateChanged) return handleNewState(); + return mergedProps; + } + + return function pureFinalPropsSelector(nextState, nextOwnProps) { + return hasRunAtLeastOnce + ? handleSubsequentCalls(nextState, nextOwnProps) + : handleFirstCall(nextState, nextOwnProps); + }; + } // TODO: Add more comments + // If pure is true, the selector returned by selectorFactory will memoize its results, + // allowing connectAdvanced's shouldComponentUpdate to return false if final + // props have not changed. If false, the selector will always return a new + // object and shouldComponentUpdate will always return true. + + function finalPropsSelectorFactory(dispatch, _ref2) { + var initMapStateToProps = _ref2.initMapStateToProps, + initMapDispatchToProps = _ref2.initMapDispatchToProps, + initMergeProps = _ref2.initMergeProps, + options = Object( + __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_objectWithoutPropertiesLoose__[ + 'a' /* default */ + ], + )(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']); + + var mapStateToProps = initMapStateToProps(dispatch, options); + var mapDispatchToProps = initMapDispatchToProps(dispatch, options); + var mergeProps = initMergeProps(dispatch, options); + + if (true) { + Object(__WEBPACK_IMPORTED_MODULE_1__verifySubselectors__['a' /* default */])( + mapStateToProps, + mapDispatchToProps, + mergeProps, + options.displayName, + ); + } + + var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory; + return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options); + } + + /***/ + }, + /* 580 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = verifySubselectors; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils_warning__ = __webpack_require__(163); + + function verify(selector, methodName, displayName) { + if (!selector) { + throw new Error('Unexpected value for ' + methodName + ' in ' + displayName + '.'); + } else if (methodName === 'mapStateToProps' || methodName === 'mapDispatchToProps') { + if (!selector.hasOwnProperty('dependsOnOwnProps')) { + Object(__WEBPACK_IMPORTED_MODULE_0__utils_warning__['a' /* default */])( + 'The selector for ' + + methodName + + ' of ' + + displayName + + ' did not specify a value for dependsOnOwnProps.', + ); + } + } + } + + function verifySubselectors(mapStateToProps, mapDispatchToProps, mergeProps, displayName) { + verify(mapStateToProps, 'mapStateToProps', displayName); + verify(mapDispatchToProps, 'mapDispatchToProps', displayName); + verify(mergeProps, 'mergeProps', displayName); + } + + /***/ + }, + /* 581 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = helloWorldReducer; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__constants_HelloWorldConstants__ = + __webpack_require__(251); + + var initialState = { + lastActionType: null, + name: 'Alex', + }; + + // Why name function the same as the reducer? + // https://github.com/gaearon/redux/issues/428#issuecomment-129223274 + // Naming the function will help with debugging! + function helloWorldReducer() { + var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState; + var action = arguments[1]; + var type = action.type, + name = action.name; + + switch (type) { + case __WEBPACK_IMPORTED_MODULE_0__constants_HelloWorldConstants__[ + 'a' /* HELLO_WORLD_NAME_UPDATE */ + ]: + return { + lastActionType: type, + name: name, + }; + default: + return state; + } + } + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + initialState, + 'initialState', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/reducers/HelloWorldReducer.jsx', + ); + + __REACT_HOT_LOADER__.register( + helloWorldReducer, + 'helloWorldReducer', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/reducers/HelloWorldReducer.jsx', + ); + })(); + + /***/ + }, + /* 582 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = railsContextReducer; + // This will always get set + var initialState = {}; + + // Why name function the same as the reducer? + // https://github.com/gaearon/redux/issues/428#issuecomment-129223274 + // Naming the function will help with debugging! + /* eslint-disable no-unused-vars */ + function railsContextReducer() { + var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState; + var action = arguments[1]; + + return state; + } + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + initialState, + 'initialState', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/reducers/RailsContextReducer.jsx', + ); + + __REACT_HOT_LOADER__.register( + railsContextReducer, + 'railsContextReducer', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/reducers/RailsContextReducer.jsx', + ); + })(); + + /***/ + }, + /* 583 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + var _default = function _default(props, railsContext) { + return Object.assign({}, props, { railsContext: railsContext }); + }; + + // Real world is that you'll want to do lots of manipulations of the data you get back from Rails + // to coerce it into exactly what you want your initial redux state. + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/store/composeInitialState.js', + ); + })(); + + /***/ + }, + /* 584 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(10); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__RailsContext__ = __webpack_require__(237); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + // Super simple example of the simplest possible React component + + var HelloWorldRedux = (function (_React$Component) { + _inherits(HelloWorldRedux, _React$Component); + + // Not necessary if we only call super, but we'll need to initialize state, etc. + function HelloWorldRedux(props) { + _classCallCheck(this, HelloWorldRedux); + + var _this = _possibleConstructorReturn( + this, + (HelloWorldRedux.__proto__ || Object.getPrototypeOf(HelloWorldRedux)).call(this, props), + ); + + _this.setNameDomRef = _this.setNameDomRef.bind(_this); + _this.handleChange = _this.handleChange.bind(_this); + return _this; + } + + _createClass(HelloWorldRedux, [ + { + key: 'setNameDomRef', + value: function setNameDomRef(nameDomNode) { + this.nameDomRef = nameDomNode; + }, + }, + { + key: 'handleChange', + value: function handleChange() { + var name = this.nameDomRef.value; + this.props.actions.updateName(name); + }, + }, + { + key: 'render', + value: function render() { + var _props = this.props, + data = _props.data, + railsContext = _props.railsContext; + var name = data.name; + + // If this creates an alert, we have a problem! + // see file packages/node-renderer/src/scriptSanitizedVal.js for the fix to this prior issue. + + /* eslint-disable no-console */ + + console.log('This is a script:"</div>"</script> <script>alert(\'WTF1\')</script>'); + console.log('Script2:"</div>"</script xx> <script>alert(\'WTF2\')</script xx>'); + console.log('Script3:"</div>"</ SCRIPT xx> <script>alert(\'WTF3\')</script xx>'); + console.log('Script4"</div>"</script <script>alert(\'WTF4\')</script>'); + console.log('Script5:"</div>"</ script> <script>alert(\'WTF5\')</script>'); + + return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'div', + null, + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'h3', + null, + 'Redux Hello, ', + name, + '!', + ), + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'p', + null, + 'With Redux, say hello to:', + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('input', { + type: 'text', + ref: this.setNameDomRef, + value: name || '', + onChange: this.handleChange, + }), + ), + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_2__RailsContext__['a' /* default */], + { railsContext: railsContext }, + ), + ); + }, + }, + ]); + + return HelloWorldRedux; + })(__WEBPACK_IMPORTED_MODULE_1_react___default.a.Component); + + HelloWorldRedux.propTypes = { + actions: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object.isRequired, + data: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object.isRequired, + railsContext: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object.isRequired, + }; + var _default = HelloWorldRedux; + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + HelloWorldRedux, + 'HelloWorldRedux', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/HelloWorldRedux.jsx', + ); + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/HelloWorldRedux.jsx', + ); + })(); + + /***/ + }, + /* 585 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + Object.defineProperty(__webpack_exports__, '__esModule', { value: true }); + /* harmony export (immutable) */ __webpack_exports__['updateName'] = updateName; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__constants_HelloWorldConstants__ = + __webpack_require__(251); + + /* eslint-disable import/prefer-default-export */ + function updateName(name) { + return { + type: __WEBPACK_IMPORTED_MODULE_0__constants_HelloWorldConstants__[ + 'a' /* HELLO_WORLD_NAME_UPDATE */ + ], + name: name, + }; + } + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + updateName, + 'updateName', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/actions/HelloWorldActions.jsx', + ); + })(); + + /***/ + }, + /* 586 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_on_rails__ = __webpack_require__(210); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_on_rails___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_react_on_rails__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_redux__ = __webpack_require__(162); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__components_HelloWorldContainer__ = + __webpack_require__(252); + // Top level component for serer side. + // Compare this to the ./ClientReduxSharedStoreApp.jsx file which is used for client side rendering. + + /* + * Export a function that returns a ReactComponent, depending on a store named SharedReduxStore. + * This is used for the server rendering. + * React will see that the state is the same and not do anything. + */ + + var _default = function _default() { + // This is where we get the existing store. + var store = __WEBPACK_IMPORTED_MODULE_1_react_on_rails___default.a.getStore('SharedReduxStore'); + + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_2_react_redux__['a' /* Provider */], + { store: store }, + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_3__components_HelloWorldContainer__['a' /* default */], + null, + ), + ); + }; + + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/startup/ServerReduxSharedStoreApp.jsx', + ); + })(); + + /***/ + }, + /* 587 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_router__ = __webpack_require__(84); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__routes_routes__ = __webpack_require__(613); + + var _default = function _default(_props, railsContext) { + var error = void 0; + var redirectLocation = void 0; + var routeProps = void 0; + + var location = railsContext.location; + + // See https://github.com/reactjs/react-router/blob/master/docs/guides/ServerRendering.md + + Object(__WEBPACK_IMPORTED_MODULE_1_react_router__['d' /* match */])( + { routes: __WEBPACK_IMPORTED_MODULE_2__routes_routes__['a' /* default */], location: location }, + function (_error, _redirectLocation, _routeProps) { + error = _error; + redirectLocation = _redirectLocation; + routeProps = _routeProps; + }, + ); + + // This tell react_on_rails to skip server rendering any HTML. Note, client rendering + // will handle the redirect. What's key is that we don't try to render. + // Critical to return the Object properties to match this { error, redirectLocation } + if (error || redirectLocation) { + return { error: error, redirectLocation: redirectLocation }; + } + + // Important that you don't do this if you are redirecting or have an error. + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_1_react_router__['c' /* RouterContext */], + routeProps, + ); + }; + + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/startup/ServerRouterApp.jsx', + ); + })(); + + /***/ + }, + /* 588 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant__ = __webpack_require__(14); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_invariant__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_create_react_class__ = __webpack_require__(37); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_create_react_class___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_create_react_class__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types__ = __webpack_require__(10); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_3_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__createTransitionManager__ = + __webpack_require__(253); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__ = __webpack_require__(85); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__RouterContext__ = __webpack_require__(167); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__RouteUtils__ = __webpack_require__(47); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__RouterUtils__ = __webpack_require__(255); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__routerWarning__ = __webpack_require__(70); + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + function _objectWithoutProperties(obj, keys) { + var target = {}; + for (var i in obj) { + if (keys.indexOf(i) >= 0) continue; + if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; + target[i] = obj[i]; + } + return target; + } + + var propTypes = { + history: __WEBPACK_IMPORTED_MODULE_3_prop_types__['object'], + children: __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__['d' /* routes */], + routes: __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__['d' /* routes */], // alias for children + render: __WEBPACK_IMPORTED_MODULE_3_prop_types__['func'], + createElement: __WEBPACK_IMPORTED_MODULE_3_prop_types__['func'], + onError: __WEBPACK_IMPORTED_MODULE_3_prop_types__['func'], + onUpdate: __WEBPACK_IMPORTED_MODULE_3_prop_types__['func'], + + // PRIVATE: For client-side rehydration of server match. + matchContext: __WEBPACK_IMPORTED_MODULE_3_prop_types__['object'], + }; + + /** + * A <Router> is a high-level API for automatically setting up + * a router that renders a <RouterContext> with all the props + * it needs each time the URL changes. + */ + var Router = __WEBPACK_IMPORTED_MODULE_2_create_react_class___default()({ + displayName: 'Router', + + propTypes: propTypes, + + getDefaultProps: function getDefaultProps() { + return { + render: function render(props) { + return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_6__RouterContext__['a' /* default */], + props, + ); + }, + }; + }, + getInitialState: function getInitialState() { + return { + location: null, + routes: null, + params: null, + components: null, + }; + }, + handleError: function handleError(error) { + if (this.props.onError) { + this.props.onError.call(this, error); + } else { + // Throw errors by default so we don't silently swallow them! + throw error; // This error probably occurred in getChildRoutes or getComponents. + } + }, + createRouterObject: function createRouterObject(state) { + var matchContext = this.props.matchContext; + + if (matchContext) { + return matchContext.router; + } + + var history = this.props.history; + + return Object(__WEBPACK_IMPORTED_MODULE_8__RouterUtils__['b' /* createRouterObject */])( + history, + this.transitionManager, + state, + ); + }, + createTransitionManager: function createTransitionManager() { + var matchContext = this.props.matchContext; + + if (matchContext) { + return matchContext.transitionManager; + } + + var history = this.props.history; + var _props = this.props, + routes = _props.routes, + children = _props.children; + + !history.getCurrentLocation + ? true + ? __WEBPACK_IMPORTED_MODULE_0_invariant___default()( + false, + 'You have provided a history object created with history v4.x or v2.x ' + + 'and earlier. This version of React Router is only compatible with v3 ' + + 'history objects. Please change to history v3.x.', + ) + : invariant(false) + : void 0; + + return Object(__WEBPACK_IMPORTED_MODULE_4__createTransitionManager__['a' /* default */])( + history, + Object(__WEBPACK_IMPORTED_MODULE_7__RouteUtils__['b' /* createRoutes */])(routes || children), + ); + }, + componentWillMount: function componentWillMount() { + var _this = this; + + this.transitionManager = this.createTransitionManager(); + this.router = this.createRouterObject(this.state); + + this._unlisten = this.transitionManager.listen(function (error, state) { + if (error) { + _this.handleError(error); + } else { + // Keep the identity of this.router because of a caveat in ContextUtils: + // they only work if the object identity is preserved. + Object(__WEBPACK_IMPORTED_MODULE_8__RouterUtils__['a' /* assignRouterState */])( + _this.router, + state, + ); + _this.setState(state, _this.props.onUpdate); + } + }); + }, + + /* istanbul ignore next: sanity check */ + componentWillReceiveProps: function componentWillReceiveProps(nextProps) { + true + ? Object(__WEBPACK_IMPORTED_MODULE_9__routerWarning__['a' /* default */])( + nextProps.history === this.props.history, + 'You cannot change <Router history>; it will be ignored', + ) + : void 0; + + true + ? Object(__WEBPACK_IMPORTED_MODULE_9__routerWarning__['a' /* default */])( + (nextProps.routes || nextProps.children) === (this.props.routes || this.props.children), + 'You cannot change <Router routes>; it will be ignored', + ) + : void 0; + }, + componentWillUnmount: function componentWillUnmount() { + if (this._unlisten) this._unlisten(); + }, + render: function render() { + var _state = this.state, + location = _state.location, + routes = _state.routes, + params = _state.params, + components = _state.components; + + var _props2 = this.props, + createElement = _props2.createElement, + render = _props2.render, + props = _objectWithoutProperties(_props2, ['createElement', 'render']); + + if (location == null) return null; // Async match + + // Only forward non-Router-specific props to routing context, as those are + // the only ones that might be custom routing context props. + Object.keys(propTypes).forEach(function (propType) { + return delete props[propType]; + }); + + return render( + _extends({}, props, { + router: this.router, + location: location, + routes: routes, + params: params, + components: components, + createElement: createElement, + }), + ); + }, + }); + + /* unused harmony default export */ var _unused_webpack_default_export = Router; + + /***/ + }, + /* 589 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__PatternUtils__ = __webpack_require__(71); + + function routeParamsChanged(route, prevState, nextState) { + if (!route.path) return false; + + var paramNames = Object(__WEBPACK_IMPORTED_MODULE_0__PatternUtils__['b' /* getParamNames */])( + route.path, + ); + + return paramNames.some(function (paramName) { + return prevState.params[paramName] !== nextState.params[paramName]; + }); + } + + /** + * Returns an object of { leaveRoutes, changeRoutes, enterRoutes } determined by + * the change from prevState to nextState. We leave routes if either + * 1) they are not in the next state or 2) they are in the next state + * but their params have changed (i.e. /users/123 => /users/456). + * + * leaveRoutes are ordered starting at the leaf route of the tree + * we're leaving up to the common parent route. enterRoutes are ordered + * from the top of the tree we're entering down to the leaf route. + * + * changeRoutes are any routes that didn't leave or enter during + * the transition. + */ + function computeChangedRoutes(prevState, nextState) { + var prevRoutes = prevState && prevState.routes; + var nextRoutes = nextState.routes; + + var leaveRoutes = void 0, + changeRoutes = void 0, + enterRoutes = void 0; + if (prevRoutes) { + var parentIsLeaving = false; + leaveRoutes = prevRoutes.filter(function (route) { + if (parentIsLeaving) { + return true; + } else { + var isLeaving = + nextRoutes.indexOf(route) === -1 || routeParamsChanged(route, prevState, nextState); + if (isLeaving) parentIsLeaving = true; + return isLeaving; + } + }); + + // onLeave hooks start at the leaf route. + leaveRoutes.reverse(); + + enterRoutes = []; + changeRoutes = []; + + nextRoutes.forEach(function (route) { + var isNew = prevRoutes.indexOf(route) === -1; + var paramsChanged = leaveRoutes.indexOf(route) !== -1; + + if (isNew || paramsChanged) enterRoutes.push(route); + else changeRoutes.push(route); + }); + } else { + leaveRoutes = []; + changeRoutes = []; + enterRoutes = nextRoutes; + } + + return { + leaveRoutes: leaveRoutes, + changeRoutes: changeRoutes, + enterRoutes: enterRoutes, + }; + } + + /* harmony default export */ __webpack_exports__['a'] = computeChangedRoutes; + + /***/ + }, + /* 590 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = getTransitionUtils; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__AsyncUtils__ = __webpack_require__(166); + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + var PendingHooks = function PendingHooks() { + var _this = this; + + _classCallCheck(this, PendingHooks); + + this.hooks = []; + + this.add = function (hook) { + return _this.hooks.push(hook); + }; + + this.remove = function (hook) { + return (_this.hooks = _this.hooks.filter(function (h) { + return h !== hook; + })); + }; + + this.has = function (hook) { + return _this.hooks.indexOf(hook) !== -1; + }; + + this.clear = function () { + return (_this.hooks = []); + }; + }; + + function getTransitionUtils() { + var enterHooks = new PendingHooks(); + var changeHooks = new PendingHooks(); + + function createTransitionHook(hook, route, asyncArity, pendingHooks) { + var isSync = hook.length < asyncArity; + + var transitionHook = function transitionHook() { + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + hook.apply(route, args); + + if (isSync) { + var callback = args[args.length - 1]; + // Assume hook executes synchronously and + // automatically call the callback. + callback(); + } + }; + + pendingHooks.add(transitionHook); + + return transitionHook; + } + + function getEnterHooks(routes) { + return routes.reduce(function (hooks, route) { + if (route.onEnter) hooks.push(createTransitionHook(route.onEnter, route, 3, enterHooks)); + return hooks; + }, []); + } + + function getChangeHooks(routes) { + return routes.reduce(function (hooks, route) { + if (route.onChange) hooks.push(createTransitionHook(route.onChange, route, 4, changeHooks)); + return hooks; + }, []); + } + + function runTransitionHooks(length, iter, callback) { + if (!length) { + callback(); + return; + } + + var redirectInfo = void 0; + function replace(location) { + redirectInfo = location; + } + + Object(__WEBPACK_IMPORTED_MODULE_0__AsyncUtils__['a' /* loopAsync */])( + length, + function (index, next, done) { + iter(index, replace, function (error) { + if (error || redirectInfo) { + done(error, redirectInfo); // No need to continue. + } else { + next(); + } + }); + }, + callback, + ); + } + + /** + * Runs all onEnter hooks in the given array of routes in order + * with onEnter(nextState, replace, callback) and calls + * callback(error, redirectInfo) when finished. The first hook + * to use replace short-circuits the loop. + * + * If a hook needs to run asynchronously, it may use the callback + * function. However, doing so will cause the transition to pause, + * which could lead to a non-responsive UI if the hook is slow. + */ + function runEnterHooks(routes, nextState, callback) { + enterHooks.clear(); + var hooks = getEnterHooks(routes); + return runTransitionHooks( + hooks.length, + function (index, replace, next) { + var wrappedNext = function wrappedNext() { + if (enterHooks.has(hooks[index])) { + next.apply(undefined, arguments); + enterHooks.remove(hooks[index]); + } + }; + hooks[index](nextState, replace, wrappedNext); + }, + callback, + ); + } + + /** + * Runs all onChange hooks in the given array of routes in order + * with onChange(prevState, nextState, replace, callback) and calls + * callback(error, redirectInfo) when finished. The first hook + * to use replace short-circuits the loop. + * + * If a hook needs to run asynchronously, it may use the callback + * function. However, doing so will cause the transition to pause, + * which could lead to a non-responsive UI if the hook is slow. + */ + function runChangeHooks(routes, state, nextState, callback) { + changeHooks.clear(); + var hooks = getChangeHooks(routes); + return runTransitionHooks( + hooks.length, + function (index, replace, next) { + var wrappedNext = function wrappedNext() { + if (changeHooks.has(hooks[index])) { + next.apply(undefined, arguments); + changeHooks.remove(hooks[index]); + } + }; + hooks[index](state, nextState, replace, wrappedNext); + }, + callback, + ); + } + + /** + * Runs all onLeave hooks in the given array of routes in order. + */ + function runLeaveHooks(routes, prevState) { + for (var i = 0, len = routes.length; i < len; ++i) { + if (routes[i].onLeave) routes[i].onLeave.call(routes[i], prevState); + } + } + + return { + runEnterHooks: runEnterHooks, + runChangeHooks: runChangeHooks, + runLeaveHooks: runLeaveHooks, + }; + } + + /***/ + }, + /* 591 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = isActive; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__PatternUtils__ = __webpack_require__(71); + var _typeof = + typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' + ? function (obj) { + return typeof obj; + } + : function (obj) { + return obj && + typeof Symbol === 'function' && + obj.constructor === Symbol && + obj !== Symbol.prototype + ? 'symbol' + : typeof obj; + }; + + function deepEqual(a, b) { + if (a == b) return true; + + if (a == null || b == null) return false; + + if (Array.isArray(a)) { + return ( + Array.isArray(b) && + a.length === b.length && + a.every(function (item, index) { + return deepEqual(item, b[index]); + }) + ); + } + + if ((typeof a === 'undefined' ? 'undefined' : _typeof(a)) === 'object') { + for (var p in a) { + if (!Object.prototype.hasOwnProperty.call(a, p)) { + continue; + } + + if (a[p] === undefined) { + if (b[p] !== undefined) { + return false; + } + } else if (!Object.prototype.hasOwnProperty.call(b, p)) { + return false; + } else if (!deepEqual(a[p], b[p])) { + return false; + } + } + + return true; + } + + return String(a) === String(b); + } + + /** + * Returns true if the current pathname matches the supplied one, net of + * leading and trailing slash normalization. This is sufficient for an + * indexOnly route match. + */ + function pathIsActive(pathname, currentPathname) { + // Normalize leading slash for consistency. Leading slash on pathname has + // already been normalized in isActive. See caveat there. + if (currentPathname.charAt(0) !== '/') { + currentPathname = '/' + currentPathname; + } + + // Normalize the end of both path names too. Maybe `/foo/` shouldn't show + // `/foo` as active, but in this case, we would already have failed the + // match. + if (pathname.charAt(pathname.length - 1) !== '/') { + pathname += '/'; + } + if (currentPathname.charAt(currentPathname.length - 1) !== '/') { + currentPathname += '/'; + } + + return currentPathname === pathname; + } + + /** + * Returns true if the given pathname matches the active routes and params. + */ + function routeIsActive(pathname, routes, params) { + var remainingPathname = pathname, + paramNames = [], + paramValues = []; + + // for...of would work here but it's probably slower post-transpilation. + for (var i = 0, len = routes.length; i < len; ++i) { + var route = routes[i]; + var pattern = route.path || ''; + + if (pattern.charAt(0) === '/') { + remainingPathname = pathname; + paramNames = []; + paramValues = []; + } + + if (remainingPathname !== null && pattern) { + var matched = Object(__WEBPACK_IMPORTED_MODULE_0__PatternUtils__['c' /* matchPattern */])( + pattern, + remainingPathname, + ); + if (matched) { + remainingPathname = matched.remainingPathname; + paramNames = [].concat(paramNames, matched.paramNames); + paramValues = [].concat(paramValues, matched.paramValues); + } else { + remainingPathname = null; + } + + if (remainingPathname === '') { + // We have an exact match on the route. Just check that all the params + // match. + // FIXME: This doesn't work on repeated params. + return paramNames.every(function (paramName, index) { + return String(paramValues[index]) === String(params[paramName]); + }); + } + } + } + + return false; + } + + /** + * Returns true if all key/value pairs in the given query are + * currently active. + */ + function queryIsActive(query, activeQuery) { + if (activeQuery == null) return query == null; + + if (query == null) return true; + + return deepEqual(query, activeQuery); + } + + /** + * Returns true if a <Link> to the given pathname/query combination is + * currently active. + */ + function isActive(_ref, indexOnly, currentLocation, routes, params) { + var pathname = _ref.pathname, + query = _ref.query; + + if (currentLocation == null) return false; + + // TODO: This is a bit ugly. It keeps around support for treating pathnames + // without preceding slashes as absolute paths, but possibly also works + // around the same quirks with basenames as in matchRoutes. + if (pathname.charAt(0) !== '/') { + pathname = '/' + pathname; + } + + if (!pathIsActive(pathname, currentLocation.pathname)) { + // The path check is necessary and sufficient for indexOnly, but otherwise + // we still need to check the routes. + if (indexOnly || !routeIsActive(pathname, routes, params)) { + return false; + } + } + + return queryIsActive(query, currentLocation.query); + } + + /***/ + }, + /* 592 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__AsyncUtils__ = __webpack_require__(166); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__PromiseUtils__ = __webpack_require__(254); + + function getComponentsForRoute(nextState, route, callback) { + if (route.component || route.components) { + callback(null, route.component || route.components); + return; + } + + var getComponent = route.getComponent || route.getComponents; + if (getComponent) { + var componentReturn = getComponent.call(route, nextState, callback); + if (Object(__WEBPACK_IMPORTED_MODULE_1__PromiseUtils__['a' /* isPromise */])(componentReturn)) + componentReturn.then(function (component) { + return callback(null, component); + }, callback); + } else { + callback(); + } + } + + /** + * Asynchronously fetches all components needed for the given router + * state and calls callback(error, components) when finished. + * + * Note: This operation may finish synchronously if no routes have an + * asynchronous getComponents method. + */ + function getComponents(nextState, callback) { + Object(__WEBPACK_IMPORTED_MODULE_0__AsyncUtils__['b' /* mapAsync */])( + nextState.routes, + function (route, index, callback) { + getComponentsForRoute(nextState, route, callback); + }, + callback, + ); + } + + /* harmony default export */ __webpack_exports__['a'] = getComponents; + + /***/ + }, + /* 593 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = matchRoutes; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__AsyncUtils__ = __webpack_require__(166); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__PromiseUtils__ = __webpack_require__(254); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__PatternUtils__ = __webpack_require__(71); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__routerWarning__ = __webpack_require__(70); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__RouteUtils__ = __webpack_require__(47); + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + function getChildRoutes(route, location, paramNames, paramValues, callback) { + if (route.childRoutes) { + return [null, route.childRoutes]; + } + if (!route.getChildRoutes) { + return []; + } + + var sync = true, + result = void 0; + + var partialNextState = { + location: location, + params: createParams(paramNames, paramValues), + }; + + var childRoutesReturn = route.getChildRoutes(partialNextState, function (error, childRoutes) { + childRoutes = + !error && Object(__WEBPACK_IMPORTED_MODULE_4__RouteUtils__['b' /* createRoutes */])(childRoutes); + if (sync) { + result = [error, childRoutes]; + return; + } + + callback(error, childRoutes); + }); + + if (Object(__WEBPACK_IMPORTED_MODULE_1__PromiseUtils__['a' /* isPromise */])(childRoutesReturn)) + childRoutesReturn.then(function (childRoutes) { + return callback( + null, + Object(__WEBPACK_IMPORTED_MODULE_4__RouteUtils__['b' /* createRoutes */])(childRoutes), + ); + }, callback); + + sync = false; + return result; // Might be undefined. + } + + function getIndexRoute(route, location, paramNames, paramValues, callback) { + if (route.indexRoute) { + callback(null, route.indexRoute); + } else if (route.getIndexRoute) { + var partialNextState = { + location: location, + params: createParams(paramNames, paramValues), + }; + + var indexRoutesReturn = route.getIndexRoute(partialNextState, function (error, indexRoute) { + callback( + error, + !error && + Object(__WEBPACK_IMPORTED_MODULE_4__RouteUtils__['b' /* createRoutes */])(indexRoute)[0], + ); + }); + + if (Object(__WEBPACK_IMPORTED_MODULE_1__PromiseUtils__['a' /* isPromise */])(indexRoutesReturn)) + indexRoutesReturn.then(function (indexRoute) { + return callback( + null, + Object(__WEBPACK_IMPORTED_MODULE_4__RouteUtils__['b' /* createRoutes */])(indexRoute)[0], + ); + }, callback); + } else if (route.childRoutes || route.getChildRoutes) { + var onChildRoutes = function onChildRoutes(error, childRoutes) { + if (error) { + callback(error); + return; + } + + var pathless = childRoutes.filter(function (childRoute) { + return !childRoute.path; + }); + + Object(__WEBPACK_IMPORTED_MODULE_0__AsyncUtils__['a' /* loopAsync */])( + pathless.length, + function (index, next, done) { + getIndexRoute( + pathless[index], + location, + paramNames, + paramValues, + function (error, indexRoute) { + if (error || indexRoute) { + var routes = [pathless[index]].concat( + Array.isArray(indexRoute) ? indexRoute : [indexRoute], + ); + done(error, routes); + } else { + next(); + } + }, + ); + }, + function (err, routes) { + callback(null, routes); + }, + ); + }; + + var result = getChildRoutes(route, location, paramNames, paramValues, onChildRoutes); + if (result) { + onChildRoutes.apply(undefined, result); + } + } else { + callback(); + } + } + + function assignParams(params, paramNames, paramValues) { + return paramNames.reduce(function (params, paramName, index) { + var paramValue = paramValues && paramValues[index]; + + if (Array.isArray(params[paramName])) { + params[paramName].push(paramValue); + } else if (paramName in params) { + params[paramName] = [params[paramName], paramValue]; + } else { + params[paramName] = paramValue; + } + + return params; + }, params); + } + + function createParams(paramNames, paramValues) { + return assignParams({}, paramNames, paramValues); + } + + function matchRouteDeep(route, location, remainingPathname, paramNames, paramValues, callback) { + var pattern = route.path || ''; + + if (pattern.charAt(0) === '/') { + remainingPathname = location.pathname; + paramNames = []; + paramValues = []; + } + + // Only try to match the path if the route actually has a pattern, and if + // we're not just searching for potential nested absolute paths. + if (remainingPathname !== null && pattern) { + try { + var matched = Object(__WEBPACK_IMPORTED_MODULE_2__PatternUtils__['c' /* matchPattern */])( + pattern, + remainingPathname, + ); + if (matched) { + remainingPathname = matched.remainingPathname; + paramNames = [].concat(paramNames, matched.paramNames); + paramValues = [].concat(paramValues, matched.paramValues); + } else { + remainingPathname = null; + } + } catch (error) { + callback(error); + } + + // By assumption, pattern is non-empty here, which is the prerequisite for + // actually terminating a match. + if (remainingPathname === '') { + var match = { + routes: [route], + params: createParams(paramNames, paramValues), + }; + + getIndexRoute(route, location, paramNames, paramValues, function (error, indexRoute) { + if (error) { + callback(error); + } else { + if (Array.isArray(indexRoute)) { + var _match$routes; + + true + ? Object(__WEBPACK_IMPORTED_MODULE_3__routerWarning__['a' /* default */])( + indexRoute.every(function (route) { + return !route.path; + }), + 'Index routes should not have paths', + ) + : void 0; + (_match$routes = match.routes).push.apply(_match$routes, indexRoute); + } else if (indexRoute) { + true + ? Object(__WEBPACK_IMPORTED_MODULE_3__routerWarning__['a' /* default */])( + !indexRoute.path, + 'Index routes should not have paths', + ) + : void 0; + match.routes.push(indexRoute); + } + + callback(null, match); + } + }); + + return; + } + } + + if (remainingPathname != null || route.childRoutes) { + // Either a) this route matched at least some of the path or b) + // we don't have to load this route's children asynchronously. In + // either case continue checking for matches in the subtree. + var onChildRoutes = function onChildRoutes(error, childRoutes) { + if (error) { + callback(error); + } else if (childRoutes) { + // Check the child routes to see if any of them match. + matchRoutes( + childRoutes, + location, + function (error, match) { + if (error) { + callback(error); + } else if (match) { + // A child route matched! Augment the match and pass it up the stack. + match.routes.unshift(route); + callback(null, match); + } else { + callback(); + } + }, + remainingPathname, + paramNames, + paramValues, + ); + } else { + callback(); + } + }; + + var result = getChildRoutes(route, location, paramNames, paramValues, onChildRoutes); + if (result) { + onChildRoutes.apply(undefined, result); + } + } else { + callback(); + } + } + + /** + * Asynchronously matches the given location to a set of routes and calls + * callback(error, state) when finished. The state object will have the + * following properties: + * + * - routes An array of routes that matched, in hierarchical order + * - params An object of URL parameters + * + * Note: This operation may finish synchronously if no routes have an + * asynchronous getChildRoutes method. + */ + function matchRoutes(routes, location, callback, remainingPathname) { + var paramNames = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : []; + var paramValues = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : []; + + if (remainingPathname === undefined) { + // TODO: This is a little bit ugly, but it works around a quirk in history + // that strips the leading slash from pathnames when using basenames with + // trailing slashes. + if (location.pathname.charAt(0) !== '/') { + location = _extends({}, location, { + pathname: '/' + location.pathname, + }); + } + remainingPathname = location.pathname; + } + + Object(__WEBPACK_IMPORTED_MODULE_0__AsyncUtils__['a' /* loopAsync */])( + routes.length, + function (index, next, done) { + matchRouteDeep( + routes[index], + location, + remainingPathname, + paramNames, + paramValues, + function (error, match) { + if (error || match) { + done(error, match); + } else { + next(); + } + }, + ); + }, + callback, + ); + } + + /***/ + }, + /* 594 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__PatternUtils__ = __webpack_require__(71); + + /** + * Extracts an object of params the given route cares about from + * the given params object. + */ + function getRouteParams(route, params) { + var routeParams = {}; + + if (!route.path) return routeParams; + + Object(__WEBPACK_IMPORTED_MODULE_0__PatternUtils__['b' /* getParamNames */])(route.path).forEach( + function (p) { + if (Object.prototype.hasOwnProperty.call(params, p)) { + routeParams[p] = params[p]; + } + }, + ); + + return routeParams; + } + + /* harmony default export */ __webpack_exports__['a'] = getRouteParams; + + /***/ + }, + /* 595 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_create_react_class__ = __webpack_require__(37); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_create_react_class___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_create_react_class__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Link__ = __webpack_require__(256); + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + /** + * An <IndexLink> is used to link to an <IndexRoute>. + */ + var IndexLink = __WEBPACK_IMPORTED_MODULE_1_create_react_class___default()({ + displayName: 'IndexLink', + + render: function render() { + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_2__Link__['a' /* default */], + _extends({}, this.props, { onlyActiveOnIndex: true }), + ); + }, + }); + + /* unused harmony default export */ var _unused_webpack_default_export = IndexLink; + + /***/ + }, + /* 596 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* unused harmony export default */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant__ = __webpack_require__(14); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_invariant__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_create_react_class__ = __webpack_require__(37); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_create_react_class___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_create_react_class__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_hoist_non_react_statics__ = + __webpack_require__(597); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_hoist_non_react_statics___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_hoist_non_react_statics__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__ContextUtils__ = __webpack_require__(168); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__PropTypes__ = __webpack_require__(169); + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + function getDisplayName(WrappedComponent) { + return WrappedComponent.displayName || WrappedComponent.name || 'Component'; + } + + function withRouter(WrappedComponent, options) { + var withRef = options && options.withRef; + + var WithRouter = __WEBPACK_IMPORTED_MODULE_2_create_react_class___default()({ + displayName: 'WithRouter', + + mixins: [ + Object(__WEBPACK_IMPORTED_MODULE_4__ContextUtils__['b' /* ContextSubscriber */])('router'), + ], + + contextTypes: { router: __WEBPACK_IMPORTED_MODULE_5__PropTypes__['a' /* routerShape */] }, + propTypes: { router: __WEBPACK_IMPORTED_MODULE_5__PropTypes__['a' /* routerShape */] }, + + getWrappedInstance: function getWrappedInstance() { + !withRef + ? true + ? __WEBPACK_IMPORTED_MODULE_0_invariant___default()( + false, + 'To access the wrapped instance, you need to specify ' + + '`{ withRef: true }` as the second argument of the withRouter() call.', + ) + : invariant(false) + : void 0; + + return this.wrappedInstance; + }, + render: function render() { + var _this = this; + + var router = this.props.router || this.context.router; + if (!router) { + return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + WrappedComponent, + this.props, + ); + } + + var params = router.params, + location = router.location, + routes = router.routes; + + var props = _extends({}, this.props, { + router: router, + params: params, + location: location, + routes: routes, + }); + + if (withRef) { + props.ref = function (c) { + _this.wrappedInstance = c; + }; + } + + return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(WrappedComponent, props); + }, + }); + + WithRouter.displayName = 'withRouter(' + getDisplayName(WrappedComponent) + ')'; + WithRouter.WrappedComponent = WrappedComponent; + + return __WEBPACK_IMPORTED_MODULE_3_hoist_non_react_statics___default()(WithRouter, WrappedComponent); + } + + /***/ + }, + /* 597 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2015, Yahoo! Inc. + * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. + */ + + var REACT_STATICS = { + childContextTypes: true, + contextTypes: true, + defaultProps: true, + displayName: true, + getDefaultProps: true, + mixins: true, + propTypes: true, + type: true, + }; + + var KNOWN_STATICS = { + name: true, + length: true, + prototype: true, + caller: true, + arguments: true, + arity: true, + }; + + var isGetOwnPropertySymbolsAvailable = typeof Object.getOwnPropertySymbols === 'function'; + + module.exports = function hoistNonReactStatics(targetComponent, sourceComponent, customStatics) { + if (typeof sourceComponent !== 'string') { + // don't hoist over string (html) components + var keys = Object.getOwnPropertyNames(sourceComponent); + + /* istanbul ignore else */ + if (isGetOwnPropertySymbolsAvailable) { + keys = keys.concat(Object.getOwnPropertySymbols(sourceComponent)); + } + + for (var i = 0; i < keys.length; ++i) { + if ( + !REACT_STATICS[keys[i]] && + !KNOWN_STATICS[keys[i]] && + (!customStatics || !customStatics[keys[i]]) + ) { + try { + targetComponent[keys[i]] = sourceComponent[keys[i]]; + } catch (error) {} + } + } + } + + return targetComponent; + }; + + /***/ + }, + /* 598 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_create_react_class__ = __webpack_require__(37); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_create_react_class___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_create_react_class__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(10); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__routerWarning__ = __webpack_require__(70); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_invariant__ = __webpack_require__(14); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_invariant___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_3_invariant__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Redirect__ = __webpack_require__(257); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__ = __webpack_require__(85); + + /** + * An <IndexRedirect> is used to redirect from an indexRoute. + */ + /* eslint-disable react/require-render-return */ + var IndexRedirect = __WEBPACK_IMPORTED_MODULE_0_create_react_class___default()({ + displayName: 'IndexRedirect', + + statics: { + createRouteFromReactElement: function createRouteFromReactElement(element, parentRoute) { + /* istanbul ignore else: sanity check */ + if (parentRoute) { + parentRoute.indexRoute = + __WEBPACK_IMPORTED_MODULE_4__Redirect__['a' /* default */].createRouteFromReactElement( + element, + ); + } else { + true + ? Object(__WEBPACK_IMPORTED_MODULE_2__routerWarning__['a' /* default */])( + false, + 'An <IndexRedirect> does not make sense at the root of your route config', + ) + : void 0; + } + }, + }, + + propTypes: { + to: __WEBPACK_IMPORTED_MODULE_1_prop_types__['string'].isRequired, + query: __WEBPACK_IMPORTED_MODULE_1_prop_types__['object'], + state: __WEBPACK_IMPORTED_MODULE_1_prop_types__['object'], + onEnter: __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__['c' /* falsy */], + children: __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__['c' /* falsy */], + }, + + /* istanbul ignore next: sanity check */ + render: function render() { + true + ? true + ? __WEBPACK_IMPORTED_MODULE_3_invariant___default()( + false, + '<IndexRedirect> elements are for router configuration only and should not be rendered', + ) + : invariant(false) + : void 0; + }, + }); + + /* unused harmony default export */ var _unused_webpack_default_export = IndexRedirect; + + /***/ + }, + /* 599 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_create_react_class__ = __webpack_require__(37); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_create_react_class___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_create_react_class__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(10); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__routerWarning__ = __webpack_require__(70); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_invariant__ = __webpack_require__(14); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_invariant___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_3_invariant__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__RouteUtils__ = __webpack_require__(47); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__ = __webpack_require__(85); + + /** + * An <IndexRoute> is used to specify its parent's <Route indexRoute> in + * a JSX route config. + */ + /* eslint-disable react/require-render-return */ + var IndexRoute = __WEBPACK_IMPORTED_MODULE_0_create_react_class___default()({ + displayName: 'IndexRoute', + + statics: { + createRouteFromReactElement: function createRouteFromReactElement(element, parentRoute) { + /* istanbul ignore else: sanity check */ + if (parentRoute) { + parentRoute.indexRoute = Object( + __WEBPACK_IMPORTED_MODULE_4__RouteUtils__['a' /* createRouteFromReactElement */], + )(element); + } else { + true + ? Object(__WEBPACK_IMPORTED_MODULE_2__routerWarning__['a' /* default */])( + false, + 'An <IndexRoute> does not make sense at the root of your route config', + ) + : void 0; + } + }, + }, + + propTypes: { + path: __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__['c' /* falsy */], + component: __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__['a' /* component */], + components: __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__['b' /* components */], + getComponent: __WEBPACK_IMPORTED_MODULE_1_prop_types__['func'], + getComponents: __WEBPACK_IMPORTED_MODULE_1_prop_types__['func'], + }, + + /* istanbul ignore next: sanity check */ + render: function render() { + true + ? true + ? __WEBPACK_IMPORTED_MODULE_3_invariant___default()( + false, + '<IndexRoute> elements are for router configuration only and should not be rendered', + ) + : invariant(false) + : void 0; + }, + }); + + /* unused harmony default export */ var _unused_webpack_default_export = IndexRoute; + + /***/ + }, + /* 600 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_create_react_class__ = __webpack_require__(37); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_create_react_class___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_create_react_class__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(10); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant__ = __webpack_require__(14); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_2_invariant__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__RouteUtils__ = __webpack_require__(47); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__InternalPropTypes__ = __webpack_require__(85); + + /** + * A <Route> is used to declare which components are rendered to the + * page when the URL matches a given pattern. + * + * Routes are arranged in a nested tree structure. When a new URL is + * requested, the tree is searched depth-first to find a route whose + * path matches the URL. When one is found, all routes in the tree + * that lead to it are considered "active" and their components are + * rendered into the DOM, nested in the same order as in the tree. + */ + /* eslint-disable react/require-render-return */ + var Route = __WEBPACK_IMPORTED_MODULE_0_create_react_class___default()({ + displayName: 'Route', + + statics: { + createRouteFromReactElement: + __WEBPACK_IMPORTED_MODULE_3__RouteUtils__['a' /* createRouteFromReactElement */], + }, + + propTypes: { + path: __WEBPACK_IMPORTED_MODULE_1_prop_types__['string'], + component: __WEBPACK_IMPORTED_MODULE_4__InternalPropTypes__['a' /* component */], + components: __WEBPACK_IMPORTED_MODULE_4__InternalPropTypes__['b' /* components */], + getComponent: __WEBPACK_IMPORTED_MODULE_1_prop_types__['func'], + getComponents: __WEBPACK_IMPORTED_MODULE_1_prop_types__['func'], + }, + + /* istanbul ignore next: sanity check */ + render: function render() { + true + ? true + ? __WEBPACK_IMPORTED_MODULE_2_invariant___default()( + false, + '<Route> elements are for router configuration only and should not be rendered', + ) + : invariant(false) + : void 0; + }, + }); + + /* harmony default export */ __webpack_exports__['a'] = Route; + + /***/ + }, + /* 601 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_Actions__ = __webpack_require__(110); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_Actions___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_history_lib_Actions__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(14); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_invariant__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__createMemoryHistory__ = __webpack_require__(258); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__createTransitionManager__ = + __webpack_require__(253); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__RouteUtils__ = __webpack_require__(47); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__RouterUtils__ = __webpack_require__(255); + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + function _objectWithoutProperties(obj, keys) { + var target = {}; + for (var i in obj) { + if (keys.indexOf(i) >= 0) continue; + if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; + target[i] = obj[i]; + } + return target; + } + + /** + * A high-level API to be used for server-side rendering. + * + * This function matches a location to a set of routes and calls + * callback(error, redirectLocation, renderProps) when finished. + * + * Note: You probably don't want to use this in a browser unless you're using + * server-side rendering with async routes. + */ + function match(_ref, callback) { + var history = _ref.history, + routes = _ref.routes, + location = _ref.location, + options = _objectWithoutProperties(_ref, ['history', 'routes', 'location']); + + !(history || location) + ? true + ? __WEBPACK_IMPORTED_MODULE_1_invariant___default()(false, 'match needs a history or a location') + : invariant(false) + : void 0; + + history = history + ? history + : Object(__WEBPACK_IMPORTED_MODULE_2__createMemoryHistory__['a' /* default */])(options); + var transitionManager = Object( + __WEBPACK_IMPORTED_MODULE_3__createTransitionManager__['a' /* default */], + )(history, Object(__WEBPACK_IMPORTED_MODULE_4__RouteUtils__['b' /* createRoutes */])(routes)); + + if (location) { + // Allow match({ location: '/the/path', ... }) + location = history.createLocation(location); + } else { + location = history.getCurrentLocation(); + } + + transitionManager.match(location, function (error, redirectLocation, nextState) { + var renderProps = void 0; + + if (nextState) { + var router = Object(__WEBPACK_IMPORTED_MODULE_5__RouterUtils__['b' /* createRouterObject */])( + history, + transitionManager, + nextState, + ); + renderProps = _extends({}, nextState, { + router: router, + matchContext: { transitionManager: transitionManager, router: router }, + }); + } + + callback( + error, + redirectLocation && + history.createLocation( + redirectLocation, + __WEBPACK_IMPORTED_MODULE_0_history_lib_Actions__['REPLACE'], + ), + renderProps, + ); + }); + } + + /* harmony default export */ __webpack_exports__['a'] = match; + + /***/ + }, + /* 602 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var strictUriEncode = __webpack_require__(603); + var objectAssign = __webpack_require__(63); + + function encoderForArrayFormat(opts) { + switch (opts.arrayFormat) { + case 'index': + return function (key, value, index) { + return value === null + ? [encode(key, opts), '[', index, ']'].join('') + : [encode(key, opts), '[', encode(index, opts), ']=', encode(value, opts)].join(''); + }; + + case 'bracket': + return function (key, value) { + return value === null + ? encode(key, opts) + : [encode(key, opts), '[]=', encode(value, opts)].join(''); + }; + + default: + return function (key, value) { + return value === null + ? encode(key, opts) + : [encode(key, opts), '=', encode(value, opts)].join(''); + }; + } + } + + function parserForArrayFormat(opts) { + var result; + + switch (opts.arrayFormat) { + case 'index': + return function (key, value, accumulator) { + result = /\[(\d*)\]$/.exec(key); + + key = key.replace(/\[\d*\]$/, ''); + + if (!result) { + accumulator[key] = value; + return; + } + + if (accumulator[key] === undefined) { + accumulator[key] = {}; + } + + accumulator[key][result[1]] = value; + }; + + case 'bracket': + return function (key, value, accumulator) { + result = /(\[\])$/.exec(key); + key = key.replace(/\[\]$/, ''); + + if (!result) { + accumulator[key] = value; + return; + } else if (accumulator[key] === undefined) { + accumulator[key] = [value]; + return; + } + + accumulator[key] = [].concat(accumulator[key], value); + }; + + default: + return function (key, value, accumulator) { + if (accumulator[key] === undefined) { + accumulator[key] = value; + return; + } + + accumulator[key] = [].concat(accumulator[key], value); + }; + } + } + + function encode(value, opts) { + if (opts.encode) { + return opts.strict ? strictUriEncode(value) : encodeURIComponent(value); + } + + return value; + } + + function keysSorter(input) { + if (Array.isArray(input)) { + return input.sort(); + } else if (typeof input === 'object') { + return keysSorter(Object.keys(input)) + .sort(function (a, b) { + return Number(a) - Number(b); + }) + .map(function (key) { + return input[key]; + }); + } + + return input; + } + + exports.extract = function (str) { + return str.split('?')[1] || ''; + }; + + exports.parse = function (str, opts) { + opts = objectAssign({ arrayFormat: 'none' }, opts); + + var formatter = parserForArrayFormat(opts); + + // Create an object with no prototype + // https://github.com/sindresorhus/query-string/issues/47 + var ret = Object.create(null); + + if (typeof str !== 'string') { + return ret; + } + + str = str.trim().replace(/^(\?|#|&)/, ''); + + if (!str) { + return ret; + } + + str.split('&').forEach(function (param) { + var parts = param.replace(/\+/g, ' ').split('='); + // Firefox (pre 40) decodes `%3D` to `=` + // https://github.com/sindresorhus/query-string/pull/37 + var key = parts.shift(); + var val = parts.length > 0 ? parts.join('=') : undefined; + + // missing `=` should be `null`: + // http://w3.org/TR/2012/WD-url-20120524/#collect-url-parameters + val = val === undefined ? null : decodeURIComponent(val); + + formatter(decodeURIComponent(key), val, ret); + }); + + return Object.keys(ret) + .sort() + .reduce(function (result, key) { + var val = ret[key]; + if (Boolean(val) && typeof val === 'object' && !Array.isArray(val)) { + // Sort object keys, not values + result[key] = keysSorter(val); + } else { + result[key] = val; + } + + return result; + }, Object.create(null)); + }; + + exports.stringify = function (obj, opts) { + var defaults = { + encode: true, + strict: true, + arrayFormat: 'none', + }; + + opts = objectAssign(defaults, opts); + + var formatter = encoderForArrayFormat(opts); + + return obj + ? Object.keys(obj) + .sort() + .map(function (key) { + var val = obj[key]; + + if (val === undefined) { + return ''; + } + + if (val === null) { + return encode(key, opts); + } + + if (Array.isArray(val)) { + var result = []; + + val.slice().forEach(function (val2) { + if (val2 === undefined) { + return; + } + + result.push(formatter(key, val2, result.length)); + }); + + return result.join('&'); + } + + return encode(key, opts) + '=' + encode(val, opts); + }) + .filter(function (x) { + return x.length > 0; + }) + .join('&') + : ''; + }; + + /***/ + }, + /* 603 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + module.exports = function (str) { + return encodeURIComponent(str).replace(/[!'()*]/g, function (c) { + return '%' + c.charCodeAt(0).toString(16).toUpperCase(); + }); + }; + + /***/ + }, + /* 604 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + var _warning = __webpack_require__(46); + + var _warning2 = _interopRequireDefault(_warning); + + var _invariant = __webpack_require__(14); + + var _invariant2 = _interopRequireDefault(_invariant); + + var _LocationUtils = __webpack_require__(72); + + var _PathUtils = __webpack_require__(48); + + var _createHistory = __webpack_require__(171); + + var _createHistory2 = _interopRequireDefault(_createHistory); + + var _Actions = __webpack_require__(110); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + var createStateStorage = function createStateStorage(entries) { + return entries + .filter(function (entry) { + return entry.state; + }) + .reduce(function (memo, entry) { + memo[entry.key] = entry.state; + return memo; + }, {}); + }; + + var createMemoryHistory = function createMemoryHistory() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + + if (Array.isArray(options)) { + options = { entries: options }; + } else if (typeof options === 'string') { + options = { entries: [options] }; + } + + var getCurrentLocation = function getCurrentLocation() { + var entry = entries[current]; + var path = (0, _PathUtils.createPath)(entry); + + var key = void 0, + state = void 0; + if (entry.key) { + key = entry.key; + state = readState(key); + } + + var init = (0, _PathUtils.parsePath)(path); + + return (0, _LocationUtils.createLocation)(_extends({}, init, { state: state }), undefined, key); + }; + + var canGo = function canGo(n) { + var index = current + n; + return index >= 0 && index < entries.length; + }; + + var go = function go(n) { + if (!n) return; + + if (!canGo(n)) { + true ? (0, _warning2.default)(false, 'Cannot go(%s) there is not enough history', n) : void 0; + + return; + } + + current += n; + var currentLocation = getCurrentLocation(); + + // Change action to POP + history.transitionTo(_extends({}, currentLocation, { action: _Actions.POP })); + }; + + var pushLocation = function pushLocation(location) { + current += 1; + + if (current < entries.length) entries.splice(current); + + entries.push(location); + + saveState(location.key, location.state); + }; + + var replaceLocation = function replaceLocation(location) { + entries[current] = location; + saveState(location.key, location.state); + }; + + var history = (0, _createHistory2.default)( + _extends({}, options, { + getCurrentLocation: getCurrentLocation, + pushLocation: pushLocation, + replaceLocation: replaceLocation, + go: go, + }), + ); + + var _options = options, + entries = _options.entries, + current = _options.current; + + if (typeof entries === 'string') { + entries = [entries]; + } else if (!Array.isArray(entries)) { + entries = ['/']; + } + + entries = entries.map(function (entry) { + return (0, _LocationUtils.createLocation)(entry); + }); + + if (current == null) { + current = entries.length - 1; + } else { + !(current >= 0 && current < entries.length) + ? true + ? (0, _invariant2.default)( + false, + 'Current index must be >= 0 and < %s, was %s', + entries.length, + current, + ) + : (0, _invariant2.default)(false) + : void 0; + } + + var storage = createStateStorage(entries); + + var saveState = function saveState(key, state) { + return (storage[key] = state); + }; + + var readState = function readState(key) { + return storage[key]; + }; + + return _extends({}, history, { + canGo: canGo, + }); + }; + + exports.default = createMemoryHistory; + + /***/ + }, + /* 605 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + var loopAsync = (exports.loopAsync = function loopAsync(turns, work, callback) { + var currentTurn = 0, + isDone = false; + var isSync = false, + hasNext = false, + doneArgs = void 0; + + var done = function done() { + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + isDone = true; + + if (isSync) { + // Iterate instead of recursing if possible. + doneArgs = args; + return; + } + + callback.apply(undefined, args); + }; + + var next = function next() { + if (isDone) return; + + hasNext = true; + + if (isSync) return; // Iterate instead of recursing if possible. + + isSync = true; + + while (!isDone && currentTurn < turns && hasNext) { + hasNext = false; + work(currentTurn++, next, done); + } + + isSync = false; + + if (isDone) { + // This means the loop finished synchronously. + callback.apply(undefined, doneArgs); + return; + } + + if (currentTurn >= turns && hasNext) { + isDone = true; + callback(); + } + }; + + next(); + }); + + /***/ + }, + /* 606 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__RouterContext__ = __webpack_require__(167); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__routerWarning__ = __webpack_require__(70); + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + /* unused harmony default export */ var _unused_webpack_default_export = function () { + for (var _len = arguments.length, middlewares = Array(_len), _key = 0; _key < _len; _key++) { + middlewares[_key] = arguments[_key]; + } + + if (true) { + middlewares.forEach(function (middleware, index) { + true + ? Object(__WEBPACK_IMPORTED_MODULE_2__routerWarning__['a' /* default */])( + middleware.renderRouterContext || middleware.renderRouteComponent, + 'The middleware specified at index ' + + index + + ' does not appear to be ' + + 'a valid React Router middleware.', + ) + : void 0; + }); + } + + var withContext = middlewares + .map(function (middleware) { + return middleware.renderRouterContext; + }) + .filter(Boolean); + var withComponent = middlewares + .map(function (middleware) { + return middleware.renderRouteComponent; + }) + .filter(Boolean); + + var makeCreateElement = function makeCreateElement() { + var baseCreateElement = + arguments.length > 0 && arguments[0] !== undefined + ? arguments[0] + : __WEBPACK_IMPORTED_MODULE_0_react__['createElement']; + return function (Component, props) { + return withComponent.reduceRight( + function (previous, renderRouteComponent) { + return renderRouteComponent(previous, props); + }, + baseCreateElement(Component, props), + ); + }; + }; + + return function (renderProps) { + return withContext.reduceRight( + function (previous, renderRouterContext) { + return renderRouterContext(previous, renderProps); + }, + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_1__RouterContext__['a' /* default */], + _extends({}, renderProps, { + createElement: makeCreateElement(renderProps.createElement), + }), + ), + ); + }; + }; + + /***/ + }, + /* 607 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_createBrowserHistory__ = + __webpack_require__(608); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_createBrowserHistory___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_history_lib_createBrowserHistory__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__createRouterHistory__ = __webpack_require__(263); + + /* unused harmony default export */ var _unused_webpack_default_export = Object( + __WEBPACK_IMPORTED_MODULE_1__createRouterHistory__['a' /* default */], + )(__WEBPACK_IMPORTED_MODULE_0_history_lib_createBrowserHistory___default.a); + + /***/ + }, + /* 608 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + var _invariant = __webpack_require__(14); + + var _invariant2 = _interopRequireDefault(_invariant); + + var _ExecutionEnvironment = __webpack_require__(172); + + var _BrowserProtocol = __webpack_require__(173); + + var BrowserProtocol = _interopRequireWildcard(_BrowserProtocol); + + var _RefreshProtocol = __webpack_require__(609); + + var RefreshProtocol = _interopRequireWildcard(_RefreshProtocol); + + var _DOMUtils = __webpack_require__(111); + + var _createHistory = __webpack_require__(171); + + var _createHistory2 = _interopRequireDefault(_createHistory); + + function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; + } + } + newObj.default = obj; + return newObj; + } + } + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + /** + * Creates and returns a history object that uses HTML5's history API + * (pushState, replaceState, and the popstate event) to manage history. + * This is the recommended method of managing history in browsers because + * it provides the cleanest URLs. + * + * Note: In browsers that do not support the HTML5 history API full + * page reloads will be used to preserve clean URLs. You can force this + * behavior using { forceRefresh: true } in options. + */ + var createBrowserHistory = function createBrowserHistory() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + + !_ExecutionEnvironment.canUseDOM + ? true + ? (0, _invariant2.default)(false, 'Browser history needs a DOM') + : (0, _invariant2.default)(false) + : void 0; + + var useRefresh = options.forceRefresh || !(0, _DOMUtils.supportsHistory)(); + var Protocol = useRefresh ? RefreshProtocol : BrowserProtocol; + + var getUserConfirmation = Protocol.getUserConfirmation, + getCurrentLocation = Protocol.getCurrentLocation, + pushLocation = Protocol.pushLocation, + replaceLocation = Protocol.replaceLocation, + go = Protocol.go; + + var history = (0, _createHistory2.default)( + _extends( + { + getUserConfirmation: getUserConfirmation, + }, + options, + { + getCurrentLocation: getCurrentLocation, + pushLocation: pushLocation, + replaceLocation: replaceLocation, + go: go, + }, + ), + ); + + var listenerCount = 0, + stopListener = void 0; + + var startListener = function startListener(listener, before) { + if (++listenerCount === 1) stopListener = BrowserProtocol.startListener(history.transitionTo); + + var unlisten = before ? history.listenBefore(listener) : history.listen(listener); + + return function () { + unlisten(); + + if (--listenerCount === 0) stopListener(); + }; + }; + + var listenBefore = function listenBefore(listener) { + return startListener(listener, true); + }; + + var listen = function listen(listener) { + return startListener(listener, false); + }; + + return _extends({}, history, { + listenBefore: listenBefore, + listen: listen, + }); + }; + + exports.default = createBrowserHistory; + + /***/ + }, + /* 609 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + exports.replaceLocation = + exports.pushLocation = + exports.getCurrentLocation = + exports.go = + exports.getUserConfirmation = + undefined; + + var _BrowserProtocol = __webpack_require__(173); + + Object.defineProperty(exports, 'getUserConfirmation', { + enumerable: true, + get: function get() { + return _BrowserProtocol.getUserConfirmation; + }, + }); + Object.defineProperty(exports, 'go', { + enumerable: true, + get: function get() { + return _BrowserProtocol.go; + }, + }); + + var _LocationUtils = __webpack_require__(72); + + var _PathUtils = __webpack_require__(48); + + var getCurrentLocation = (exports.getCurrentLocation = function getCurrentLocation() { + return (0, _LocationUtils.createLocation)(window.location); + }); + + var pushLocation = (exports.pushLocation = function pushLocation(location) { + window.location.href = (0, _PathUtils.createPath)(location); + return false; // Don't update location + }); + + var replaceLocation = (exports.replaceLocation = function replaceLocation(location) { + window.location.replace((0, _PathUtils.createPath)(location)); + return false; // Don't update location + }); + + /***/ + }, + /* 610 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_createHashHistory__ = + __webpack_require__(611); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_createHashHistory___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_history_lib_createHashHistory__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__createRouterHistory__ = __webpack_require__(263); + + /* unused harmony default export */ var _unused_webpack_default_export = Object( + __WEBPACK_IMPORTED_MODULE_1__createRouterHistory__['a' /* default */], + )(__WEBPACK_IMPORTED_MODULE_0_history_lib_createHashHistory___default.a); + + /***/ + }, + /* 611 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + var _warning = __webpack_require__(46); + + var _warning2 = _interopRequireDefault(_warning); + + var _invariant = __webpack_require__(14); + + var _invariant2 = _interopRequireDefault(_invariant); + + var _ExecutionEnvironment = __webpack_require__(172); + + var _DOMUtils = __webpack_require__(111); + + var _HashProtocol = __webpack_require__(612); + + var HashProtocol = _interopRequireWildcard(_HashProtocol); + + var _createHistory = __webpack_require__(171); + + var _createHistory2 = _interopRequireDefault(_createHistory); + + function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; + } + } + newObj.default = obj; + return newObj; + } + } + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + var DefaultQueryKey = '_k'; + + var addLeadingSlash = function addLeadingSlash(path) { + return path.charAt(0) === '/' ? path : '/' + path; + }; + + var HashPathCoders = { + hashbang: { + encodePath: function encodePath(path) { + return path.charAt(0) === '!' ? path : '!' + path; + }, + decodePath: function decodePath(path) { + return path.charAt(0) === '!' ? path.substring(1) : path; + }, + }, + noslash: { + encodePath: function encodePath(path) { + return path.charAt(0) === '/' ? path.substring(1) : path; + }, + decodePath: addLeadingSlash, + }, + slash: { + encodePath: addLeadingSlash, + decodePath: addLeadingSlash, + }, + }; + + var createHashHistory = function createHashHistory() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + + !_ExecutionEnvironment.canUseDOM + ? true + ? (0, _invariant2.default)(false, 'Hash history needs a DOM') + : (0, _invariant2.default)(false) + : void 0; + + var queryKey = options.queryKey, + hashType = options.hashType; + + true + ? (0, _warning2.default)( + queryKey !== false, + "Using { queryKey: false } no longer works. Instead, just don't " + + "use location state if you don't want a key in your URL query string", + ) + : void 0; + + if (typeof queryKey !== 'string') queryKey = DefaultQueryKey; + + if (hashType == null) hashType = 'slash'; + + if (!(hashType in HashPathCoders)) { + true ? (0, _warning2.default)(false, 'Invalid hash type: %s', hashType) : void 0; + + hashType = 'slash'; + } + + var pathCoder = HashPathCoders[hashType]; + + var getUserConfirmation = HashProtocol.getUserConfirmation; + + var getCurrentLocation = function getCurrentLocation() { + return HashProtocol.getCurrentLocation(pathCoder, queryKey); + }; + + var pushLocation = function pushLocation(location) { + return HashProtocol.pushLocation(location, pathCoder, queryKey); + }; + + var replaceLocation = function replaceLocation(location) { + return HashProtocol.replaceLocation(location, pathCoder, queryKey); + }; + + var history = (0, _createHistory2.default)( + _extends( + { + getUserConfirmation: getUserConfirmation, + }, + options, + { + getCurrentLocation: getCurrentLocation, + pushLocation: pushLocation, + replaceLocation: replaceLocation, + go: HashProtocol.go, + }, + ), + ); + + var listenerCount = 0, + stopListener = void 0; + + var startListener = function startListener(listener, before) { + if (++listenerCount === 1) + stopListener = HashProtocol.startListener(history.transitionTo, pathCoder, queryKey); + + var unlisten = before ? history.listenBefore(listener) : history.listen(listener); + + return function () { + unlisten(); + + if (--listenerCount === 0) stopListener(); + }; + }; + + var listenBefore = function listenBefore(listener) { + return startListener(listener, true); + }; + + var listen = function listen(listener) { + return startListener(listener, false); + }; + + var goIsSupportedWithoutReload = (0, _DOMUtils.supportsGoWithoutReloadUsingHash)(); + + var go = function go(n) { + true + ? (0, _warning2.default)( + goIsSupportedWithoutReload, + 'Hash history go(n) causes a full page reload in this browser', + ) + : void 0; + + history.go(n); + }; + + var createHref = function createHref(path) { + return '#' + pathCoder.encodePath(history.createHref(path)); + }; + + return _extends({}, history, { + listenBefore: listenBefore, + listen: listen, + go: go, + createHref: createHref, + }); + }; + + exports.default = createHashHistory; + + /***/ + }, + /* 612 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + exports.replaceLocation = + exports.pushLocation = + exports.startListener = + exports.getCurrentLocation = + exports.go = + exports.getUserConfirmation = + undefined; + + var _BrowserProtocol = __webpack_require__(173); + + Object.defineProperty(exports, 'getUserConfirmation', { + enumerable: true, + get: function get() { + return _BrowserProtocol.getUserConfirmation; + }, + }); + Object.defineProperty(exports, 'go', { + enumerable: true, + get: function get() { + return _BrowserProtocol.go; + }, + }); + + var _warning = __webpack_require__(46); + + var _warning2 = _interopRequireDefault(_warning); + + var _LocationUtils = __webpack_require__(72); + + var _DOMUtils = __webpack_require__(111); + + var _DOMStateStorage = __webpack_require__(262); + + var _PathUtils = __webpack_require__(48); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + var HashChangeEvent = 'hashchange'; + + var getHashPath = function getHashPath() { + // We can't use window.location.hash here because it's not + // consistent across browsers - Firefox will pre-decode it! + var href = window.location.href; + var hashIndex = href.indexOf('#'); + return hashIndex === -1 ? '' : href.substring(hashIndex + 1); + }; + + var pushHashPath = function pushHashPath(path) { + return (window.location.hash = path); + }; + + var replaceHashPath = function replaceHashPath(path) { + var hashIndex = window.location.href.indexOf('#'); + + window.location.replace(window.location.href.slice(0, hashIndex >= 0 ? hashIndex : 0) + '#' + path); + }; + + var getCurrentLocation = (exports.getCurrentLocation = function getCurrentLocation( + pathCoder, + queryKey, + ) { + var path = pathCoder.decodePath(getHashPath()); + var key = (0, _PathUtils.getQueryStringValueFromPath)(path, queryKey); + + var state = void 0; + if (key) { + path = (0, _PathUtils.stripQueryStringValueFromPath)(path, queryKey); + state = (0, _DOMStateStorage.readState)(key); + } + + var init = (0, _PathUtils.parsePath)(path); + init.state = state; + + return (0, _LocationUtils.createLocation)(init, undefined, key); + }); + + var prevLocation = void 0; + + var startListener = (exports.startListener = function startListener(listener, pathCoder, queryKey) { + var handleHashChange = function handleHashChange() { + var path = getHashPath(); + var encodedPath = pathCoder.encodePath(path); + + if (path !== encodedPath) { + // Always be sure we have a properly-encoded hash. + replaceHashPath(encodedPath); + } else { + var currentLocation = getCurrentLocation(pathCoder, queryKey); + + if (prevLocation && currentLocation.key && prevLocation.key === currentLocation.key) return; // Ignore extraneous hashchange events + + prevLocation = currentLocation; + + listener(currentLocation); + } + }; + + // Ensure the hash is encoded properly. + var path = getHashPath(); + var encodedPath = pathCoder.encodePath(path); + + if (path !== encodedPath) replaceHashPath(encodedPath); + + (0, _DOMUtils.addEventListener)(window, HashChangeEvent, handleHashChange); + + return function () { + return (0, _DOMUtils.removeEventListener)(window, HashChangeEvent, handleHashChange); + }; + }); + + var updateLocation = function updateLocation(location, pathCoder, queryKey, updateHash) { + var state = location.state, + key = location.key; + + var path = pathCoder.encodePath((0, _PathUtils.createPath)(location)); + + if (state !== undefined) { + path = (0, _PathUtils.addQueryStringValueToPath)(path, queryKey, key); + (0, _DOMStateStorage.saveState)(key, state); + } + + prevLocation = location; + + updateHash(path); + }; + + var pushLocation = (exports.pushLocation = function pushLocation(location, pathCoder, queryKey) { + return updateLocation(location, pathCoder, queryKey, function (path) { + if (getHashPath() !== path) { + pushHashPath(path); + } else { + true ? (0, _warning2.default)(false, 'You cannot PUSH the same path using hash history') : void 0; + } + }); + }); + + var replaceLocation = (exports.replaceLocation = function replaceLocation( + location, + pathCoder, + queryKey, + ) { + return updateLocation(location, pathCoder, queryKey, function (path) { + if (getHashPath() !== path) replaceHashPath(path); + }); + }); + + /***/ + }, + /* 613 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_router__ = __webpack_require__(84); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__components_RouterLayout__ = + __webpack_require__(614); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__components_RouterFirstPage__ = + __webpack_require__(615); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__components_RouterSecondPage__ = + __webpack_require__(616); + + var _default = __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_1_react_router__['b' /* Route */], + { + path: 'react_router', + component: __WEBPACK_IMPORTED_MODULE_2__components_RouterLayout__['a' /* default */], + }, + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_1_react_router__['b' /* Route */], + { + path: 'first_page', + component: __WEBPACK_IMPORTED_MODULE_3__components_RouterFirstPage__['a' /* default */], + }, + ), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_1_react_router__['b' /* Route */], + { + path: 'second_page', + component: __WEBPACK_IMPORTED_MODULE_4__components_RouterSecondPage__['a' /* default */], + }, + ), + ); + + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/routes/routes.jsx', + ); + })(); + + /***/ + }, + /* 614 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(10); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_router__ = __webpack_require__(84); + + var RouterLayout = function RouterLayout(_ref) { + var children = _ref.children; + return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'div', + { className: 'container' }, + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('h1', null, 'React Router is working!'), + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'p', + null, + 'Woohoo, we can use ', + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('code', null, 'react-router'), + ' here!', + ), + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'ul', + null, + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'li', + null, + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_2_react_router__['a' /* Link */], + { to: '/react_router' }, + 'React Router Layout Only', + ), + ), + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'li', + null, + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_2_react_router__['a' /* Link */], + { to: '/react_router/first_page' }, + 'Router First Page', + ), + ), + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'li', + null, + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_2_react_router__['a' /* Link */], + { to: '/react_router/second_page' }, + 'Router Second Page', + ), + ), + ), + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('hr', null), + children, + ); + }; + + RouterLayout.propTypes = { + children: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object, + }; + + var _default = RouterLayout; + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + RouterLayout, + 'RouterLayout', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/RouterLayout.jsx', + ); + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/RouterLayout.jsx', + ); + })(); + + /***/ + }, + /* 615 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + + var RouterFirstPage = function RouterFirstPage() { + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'div', + { className: 'container' }, + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('h2', null, 'React Router First Page'), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'p', + null, + 'This page brought to you by React Router', + ), + ); + }; + + var _default = RouterFirstPage; + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + RouterFirstPage, + 'RouterFirstPage', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/RouterFirstPage.jsx', + ); + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/RouterFirstPage.jsx', + ); + })(); + + /***/ + }, + /* 616 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + + var RouterSecondPage = function RouterSecondPage() { + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'div', + { className: 'container' }, + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('h2', null, 'React Router Second Page'), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'p', + null, + 'This page brought to you by React Router', + ), + ); + }; + + var _default = RouterSecondPage; + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + RouterSecondPage, + 'RouterSecondPage', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/RouterSecondPage.jsx', + ); + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/RouterSecondPage.jsx', + ); + })(); + + /***/ + }, + /* 617 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + /* eslint-disable react/prop-types */ + + var _default = function _default(props) { + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('h1', null, props.title); + }; + + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/PureComponent.jsx', + ); + })(); + + /***/ + }, + /* 618 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__CssModulesImagesFontsExample_scss__ = + __webpack_require__(619); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__CssModulesImagesFontsExample_scss___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__CssModulesImagesFontsExample_scss__); + /* eslint-disable react/prop-types */ + + var _default = function _default(_props, _railsContext) { + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'div', + null, + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'h1', + { className: __WEBPACK_IMPORTED_MODULE_1__CssModulesImagesFontsExample_scss___default.a.heading }, + 'This should be open sans light', + ), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'div', + null, + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'h2', + null, + 'Last Call (relative path)', + ), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div', { + className: __WEBPACK_IMPORTED_MODULE_1__CssModulesImagesFontsExample_scss___default.a.lastCall, + }), + ), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'div', + null, + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('h2', null, 'Check (URL encoded)'), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div', { + className: __WEBPACK_IMPORTED_MODULE_1__CssModulesImagesFontsExample_scss___default.a.check, + }), + ), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'div', + null, + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'h2', + null, + 'Rails on Maui Logo (absolute path)', + ), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div', { + className: + __WEBPACK_IMPORTED_MODULE_1__CssModulesImagesFontsExample_scss___default.a.railsOnMaui, + }), + ), + ); + }; + + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/CssModulesImagesFontsExample.jsx', + ); + })(); + + /***/ + }, + /* 619 */ + /***/ function (module, exports) { + module.exports = { + heading: 'CssModulesImagesFontsExample__heading__2GwOW', + check: 'CssModulesImagesFontsExample__check__Fa5t1', + lastCall: 'CssModulesImagesFontsExample__lastCall__2o_LE', + railsOnMaui: 'CssModulesImagesFontsExample__railsOnMaui__3s9ht', + }; + + /***/ + }, + /* 620 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_redux__ = __webpack_require__(109); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_redux_thunk__ = __webpack_require__(249); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__reducers_reducersIndex__ = + __webpack_require__(250); + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + /* + * Export a function that takes the props and returns a Redux store + * This is used so that 2 components can have the same store. + */ + + var _default = function _default(props, railsContext) { + var combinedReducer = Object(__WEBPACK_IMPORTED_MODULE_0_redux__['c' /* combineReducers */])( + __WEBPACK_IMPORTED_MODULE_2__reducers_reducersIndex__['a' /* default */], + ); + var newProps = _extends({}, props, { railsContext: railsContext }); + return Object(__WEBPACK_IMPORTED_MODULE_0_redux__['a' /* applyMiddleware */])( + __WEBPACK_IMPORTED_MODULE_1_redux_thunk__['a' /* default */], + )(__WEBPACK_IMPORTED_MODULE_0_redux__['d' /* createStore */])(combinedReducer, newProps); + }; + + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/stores/SharedReduxStore.jsx', + ); + })(); + + /***/ + }, + /* 621 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_router__ = __webpack_require__(84); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__components_DeferredRender__ = + __webpack_require__(622); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__components_DeferredRenderAsyncPage__ = + __webpack_require__(623); + + var DeferredRenderAppServer = function DeferredRenderAppServer(_props, railsContext) { + var error = void 0; + var redirectLocation = void 0; + var routerProps = void 0; + + var location = railsContext.location; + + var routes = { + path: '/deferred_render_with_server_rendering', + component: __WEBPACK_IMPORTED_MODULE_2__components_DeferredRender__['a' /* default */], + childRoutes: [ + { + path: '/deferred_render_with_server_rendering/async_page', + component: __WEBPACK_IMPORTED_MODULE_3__components_DeferredRenderAsyncPage__['a' /* default */], + }, + ], + }; + + // Unlike the match in DeferredRenderAppRenderer, this match is always + // syncronous because we directly require all the routes. Do not do anything + // asyncronous in code that will run on the server. + Object(__WEBPACK_IMPORTED_MODULE_1_react_router__['d' /* match */])( + { location: location, routes: routes }, + function (_error, _redirectLocation, _routerProps) { + error = _error; + redirectLocation = _redirectLocation; + routerProps = _routerProps; + }, + ); + + if (error || redirectLocation) { + return { error: error, redirectLocation: redirectLocation }; + } + + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_1_react_router__['c' /* RouterContext */], + routerProps, + ); + }; + + var _default = DeferredRenderAppServer; + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + DeferredRenderAppServer, + 'DeferredRenderAppServer', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/startup/DeferredRenderAppServer.jsx', + ); + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/startup/DeferredRenderAppServer.jsx', + ); + })(); + + /***/ + }, + /* 622 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(10); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_router__ = __webpack_require__(84); + + var DeferredRender = function DeferredRender(_ref) { + var children = _ref.children; + return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'div', + null, + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('h1', null, 'Deferred Rendering'), + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'p', + null, + "Here, we're testing async routes with server rendering. By deferring the initial render, we can prevent a client/server checksum mismatch error.", + ), + children || + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'p', + null, + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_2_react_router__['a' /* Link */], + { to: '/deferred_render_with_server_rendering/async_page' }, + 'Test Async Route', + ), + ), + ); + }; + + DeferredRender.propTypes = { + children: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.node, + }; + + var _default = DeferredRender; + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + DeferredRender, + 'DeferredRender', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/DeferredRender.jsx', + ); + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/DeferredRender.jsx', + ); + })(); + + /***/ + }, + /* 623 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + + var DeferredRenderAsyncPage = function DeferredRenderAsyncPage() { + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'div', + null, + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('p', null, 'Noice! It works.'), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'p', + null, + "Now, try reloading this page and looking at the developer console. There shouldn't be any client/server mismatch error from React.", + ), + ); + }; + + var _default = DeferredRenderAsyncPage; + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + DeferredRenderAsyncPage, + 'DeferredRenderAsyncPage', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/DeferredRenderAsyncPage.jsx', + ); + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/DeferredRenderAsyncPage.jsx', + ); + })(); + + /***/ + }, + /* 624 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_dom_server__ = __webpack_require__(107); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_dom_server___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_react_dom_server__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__components_EchoProps__ = __webpack_require__(625); + // Top level component for simple client side only rendering + + /* + * Export a function that takes the props and returns an object with { renderedHtml } + * Note, this is imported as "RenderedHtml" by "serverRegistration.jsx" + * + * Note, this is a fictional example, as you'd only use a generator function if you wanted to run + * some extra code, such as setting up Redux and React-Router. + * + * And the use of renderToString would probably be done with react-router v4 + * + */ + + var _default = function _default(props, _railsContext) { + var renderedHtml = Object(__WEBPACK_IMPORTED_MODULE_1_react_dom_server__['renderToString'])( + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_2__components_EchoProps__['a' /* default */], + props, + ), + ); + return { renderedHtml: renderedHtml }; + }; + + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/startup/ServerRenderedHtml.jsx', + ); + })(); + + /***/ + }, + /* 625 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + + var EchoProps = function EchoProps(props) { + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'div', + null, + 'Props: ', + JSON.stringify(props), + ); + }; + + var _default = EchoProps; + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + EchoProps, + 'EchoProps', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/EchoProps.jsx', + ); + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/EchoProps.jsx', + ); + })(); + + /***/ + }, + /* 626 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_dom_server__ = __webpack_require__(107); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_dom_server___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_react_dom_server__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_helmet__ = __webpack_require__(264); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_helmet___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_2_react_helmet__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__components_ReactHelmet__ = + __webpack_require__(631); + // Top level component for simple client side only rendering + + /* + * Export a function that takes the props and returns an object with { renderedHtml } + * This example shows returning renderedHtml as an object itself that contains rendered + * component markup and additional HTML strings. + * + * This is imported as "ReactHelmetApp" by "serverRegistration.jsx". Note that rendered + * component markup must go under "componentHtml" key. + */ + + var _default = function _default(props, _railsContext) { + var componentHtml = Object(__WEBPACK_IMPORTED_MODULE_1_react_dom_server__['renderToString'])( + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_3__components_ReactHelmet__['a' /* default */], + props, + ), + ); + var helmet = __WEBPACK_IMPORTED_MODULE_2_react_helmet__['Helmet'].renderStatic(); + + var renderedHtml = { + componentHtml: componentHtml, + title: helmet.title.toString(), + }; + return { renderedHtml: renderedHtml }; + }; + + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/startup/ReactHelmetServerApp.jsx', + ); + })(); + + /***/ + }, + /* 627 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + function _interopDefault(ex) { + return ex && typeof ex === 'object' && 'default' in ex ? ex['default'] : ex; + } + + var React = __webpack_require__(1); + var React__default = _interopDefault(React); + var shallowEqual = _interopDefault(__webpack_require__(628)); + + 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 _inheritsLoose(subClass, superClass) { + subClass.prototype = Object.create(superClass.prototype); + subClass.prototype.constructor = subClass; + subClass.__proto__ = superClass; + } + + var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement); + function withSideEffect(reducePropsToState, handleStateChangeOnClient, mapStateOnServer) { + if (typeof reducePropsToState !== 'function') { + throw new Error('Expected reducePropsToState to be a function.'); + } + + if (typeof handleStateChangeOnClient !== 'function') { + throw new Error('Expected handleStateChangeOnClient to be a function.'); + } + + if (typeof mapStateOnServer !== 'undefined' && typeof mapStateOnServer !== 'function') { + throw new Error('Expected mapStateOnServer to either be undefined or a function.'); + } + + function getDisplayName(WrappedComponent) { + return WrappedComponent.displayName || WrappedComponent.name || 'Component'; + } + + return function wrap(WrappedComponent) { + if (typeof WrappedComponent !== 'function') { + throw new Error('Expected WrappedComponent to be a React component.'); + } + + var mountedInstances = []; + var state; + + function emitChange() { + state = reducePropsToState( + mountedInstances.map(function (instance) { + return instance.props; + }), + ); + + if (SideEffect.canUseDOM) { + handleStateChangeOnClient(state); + } else if (mapStateOnServer) { + state = mapStateOnServer(state); + } + } + + var SideEffect = + /*#__PURE__*/ + (function (_Component) { + _inheritsLoose(SideEffect, _Component); + + function SideEffect() { + return _Component.apply(this, arguments) || this; + } + + // Try to use displayName of wrapped component + // Expose canUseDOM so tests can monkeypatch it + SideEffect.peek = function peek() { + return state; + }; + + SideEffect.rewind = function rewind() { + if (SideEffect.canUseDOM) { + throw new Error( + 'You may only call rewind() on the server. Call peek() to read the current state.', + ); + } + + var recordedState = state; + state = undefined; + mountedInstances = []; + return recordedState; + }; + + var _proto = SideEffect.prototype; + + _proto.shouldComponentUpdate = function shouldComponentUpdate(nextProps) { + return !shallowEqual(nextProps, this.props); + }; + + _proto.componentWillMount = function componentWillMount() { + mountedInstances.push(this); + emitChange(); + }; + + _proto.componentDidUpdate = function componentDidUpdate() { + emitChange(); + }; + + _proto.componentWillUnmount = function componentWillUnmount() { + var index = mountedInstances.indexOf(this); + mountedInstances.splice(index, 1); + emitChange(); + }; + + _proto.render = function render() { + return React__default.createElement(WrappedComponent, this.props); + }; + + return SideEffect; + })(React.Component); + + _defineProperty(SideEffect, 'displayName', 'SideEffect(' + getDisplayName(WrappedComponent) + ')'); + + _defineProperty(SideEffect, 'canUseDOM', canUseDOM); + + return SideEffect; + }; + } + + module.exports = withSideEffect; + + /***/ + }, + /* 628 */ + /***/ function (module, exports) { + // + + module.exports = function shallowEqual(objA, objB, compare, compareContext) { + var ret = compare ? compare.call(compareContext, objA, objB) : void 0; + + if (ret !== void 0) { + return !!ret; + } + + if (objA === objB) { + return true; + } + + if (typeof objA !== 'object' || !objA || typeof objB !== 'object' || !objB) { + return false; + } + + var keysA = Object.keys(objA); + var keysB = Object.keys(objB); + + if (keysA.length !== keysB.length) { + return false; + } + + var bHasOwnProperty = Object.prototype.hasOwnProperty.bind(objB); + + // Test for A's keys different from B. + for (var idx = 0; idx < keysA.length; idx++) { + var key = keysA[idx]; + + if (!bHasOwnProperty(key)) { + return false; + } + + var valueA = objA[key]; + var valueB = objB[key]; + + ret = compare ? compare.call(compareContext, valueA, valueB, key) : void 0; + + if (ret === false || (ret === void 0 && valueA !== valueB)) { + return false; + } + } + + return true; + }; + + /***/ + }, + /* 629 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var isArray = Array.isArray; + var keyList = Object.keys; + var hasProp = Object.prototype.hasOwnProperty; + var hasElementType = typeof Element !== 'undefined'; + + function equal(a, b) { + // fast-deep-equal index.js 2.0.1 + if (a === b) return true; + + if (a && b && typeof a == 'object' && typeof b == 'object') { + var arrA = isArray(a), + arrB = isArray(b), + i, + length, + key; + + if (arrA && arrB) { + length = a.length; + if (length != b.length) return false; + for (i = length; i-- !== 0; ) if (!equal(a[i], b[i])) return false; + return true; + } + + if (arrA != arrB) return false; + + var dateA = a instanceof Date, + dateB = b instanceof Date; + if (dateA != dateB) return false; + if (dateA && dateB) return a.getTime() == b.getTime(); + + var regexpA = a instanceof RegExp, + regexpB = b instanceof RegExp; + if (regexpA != regexpB) return false; + if (regexpA && regexpB) return a.toString() == b.toString(); + + var keys = keyList(a); + length = keys.length; + + if (length !== keyList(b).length) return false; + + for (i = length; i-- !== 0; ) if (!hasProp.call(b, keys[i])) return false; + // end fast-deep-equal + + // start react-fast-compare + // custom handling for DOM elements + if (hasElementType && a instanceof Element && b instanceof Element) return a === b; + + // custom handling for React + for (i = length; i-- !== 0; ) { + key = keys[i]; + if (key === '_owner' && a.$$typeof) { + // React-specific: avoid traversing React elements' _owner. + // _owner contains circular references + // and is not needed when comparing the actual elements (and not their owners) + // .$$typeof and ._store on just reasonable markers of a react element + continue; + } else { + // all other properties should be traversed as usual + if (!equal(a[key], b[key])) return false; + } + } + // end react-fast-compare + + // fast-deep-equal index.js 2.0.1 + return true; + } + + return a !== a && b !== b; + } + // end fast-deep-equal + + module.exports = function exportedEqual(a, b) { + try { + return equal(a, b); + } catch (error) { + if ((error.message && error.message.match(/stack|recursion/i)) || error.number === -2146828260) { + // warn on circular references, don't crash + // browsers give this different errors name and messages: + // chrome/safari: "RangeError", "Maximum call stack size exceeded" + // firefox: "InternalError", too much recursion" + // edge: "Error", "Out of stack space" + console.warn( + 'Warning: react-fast-compare does not handle circular references.', + error.name, + error.message, + ); + return false; + } + // some other error. we should definitely know about these + throw error; + } + }; + + /***/ + }, + /* 630 */ + /***/ function (module, exports, __webpack_require__) { + exports.__esModule = true; + exports.warn = + exports.requestAnimationFrame = + exports.reducePropsToState = + exports.mapStateOnServer = + exports.handleClientStateChange = + exports.convertReactPropstoHtmlAttributes = + undefined; + + var _typeof = + typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' + ? function (obj) { + return typeof obj; + } + : function (obj) { + return obj && + typeof Symbol === 'function' && + obj.constructor === Symbol && + obj !== Symbol.prototype + ? 'symbol' + : typeof obj; + }; + + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + var _react = __webpack_require__(1); + + var _react2 = _interopRequireDefault(_react); + + var _objectAssign = __webpack_require__(63); + + var _objectAssign2 = _interopRequireDefault(_objectAssign); + + var _HelmetConstants = __webpack_require__(265); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + var encodeSpecialCharacters = function encodeSpecialCharacters(str) { + var encode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + + if (encode === false) { + return String(str); + } + + return String(str) + .replace(/&/g, '&') + .replace(/</g, '<') + .replace(/>/g, '>') + .replace(/"/g, '"') + .replace(/'/g, '''); + }; + + var getTitleFromPropsList = function getTitleFromPropsList(propsList) { + var innermostTitle = getInnermostProperty(propsList, _HelmetConstants.TAG_NAMES.TITLE); + var innermostTemplate = getInnermostProperty(propsList, _HelmetConstants.HELMET_PROPS.TITLE_TEMPLATE); + + if (innermostTemplate && innermostTitle) { + // use function arg to avoid need to escape $ characters + return innermostTemplate.replace(/%s/g, function () { + return innermostTitle; + }); + } + + var innermostDefaultTitle = getInnermostProperty( + propsList, + _HelmetConstants.HELMET_PROPS.DEFAULT_TITLE, + ); + + return innermostTitle || innermostDefaultTitle || undefined; + }; + + var getOnChangeClientState = function getOnChangeClientState(propsList) { + return ( + getInnermostProperty(propsList, _HelmetConstants.HELMET_PROPS.ON_CHANGE_CLIENT_STATE) || + function () {} + ); + }; + + var getAttributesFromPropsList = function getAttributesFromPropsList(tagType, propsList) { + return propsList + .filter(function (props) { + return typeof props[tagType] !== 'undefined'; + }) + .map(function (props) { + return props[tagType]; + }) + .reduce(function (tagAttrs, current) { + return _extends({}, tagAttrs, current); + }, {}); + }; + + var getBaseTagFromPropsList = function getBaseTagFromPropsList(primaryAttributes, propsList) { + return propsList + .filter(function (props) { + return typeof props[_HelmetConstants.TAG_NAMES.BASE] !== 'undefined'; + }) + .map(function (props) { + return props[_HelmetConstants.TAG_NAMES.BASE]; + }) + .reverse() + .reduce(function (innermostBaseTag, tag) { + if (!innermostBaseTag.length) { + var keys = Object.keys(tag); + + for (var i = 0; i < keys.length; i++) { + var attributeKey = keys[i]; + var lowerCaseAttributeKey = attributeKey.toLowerCase(); + + if (primaryAttributes.indexOf(lowerCaseAttributeKey) !== -1 && tag[lowerCaseAttributeKey]) { + return innermostBaseTag.concat(tag); + } + } + } + + return innermostBaseTag; + }, []); + }; + + var getTagsFromPropsList = function getTagsFromPropsList(tagName, primaryAttributes, propsList) { + // Calculate list of tags, giving priority innermost component (end of the propslist) + var approvedSeenTags = {}; + + return propsList + .filter(function (props) { + if (Array.isArray(props[tagName])) { + return true; + } + if (typeof props[tagName] !== 'undefined') { + warn( + 'Helmet: ' + + tagName + + ' should be of type "Array". Instead found type "' + + _typeof(props[tagName]) + + '"', + ); + } + return false; + }) + .map(function (props) { + return props[tagName]; + }) + .reverse() + .reduce(function (approvedTags, instanceTags) { + var instanceSeenTags = {}; + + instanceTags + .filter(function (tag) { + var primaryAttributeKey = void 0; + var keys = Object.keys(tag); + for (var i = 0; i < keys.length; i++) { + var attributeKey = keys[i]; + var lowerCaseAttributeKey = attributeKey.toLowerCase(); + + // Special rule with link tags, since rel and href are both primary tags, rel takes priority + if ( + primaryAttributes.indexOf(lowerCaseAttributeKey) !== -1 && + !( + primaryAttributeKey === _HelmetConstants.TAG_PROPERTIES.REL && + tag[primaryAttributeKey].toLowerCase() === 'canonical' + ) && + !( + lowerCaseAttributeKey === _HelmetConstants.TAG_PROPERTIES.REL && + tag[lowerCaseAttributeKey].toLowerCase() === 'stylesheet' + ) + ) { + primaryAttributeKey = lowerCaseAttributeKey; + } + // Special case for innerHTML which doesn't work lowercased + if ( + primaryAttributes.indexOf(attributeKey) !== -1 && + (attributeKey === _HelmetConstants.TAG_PROPERTIES.INNER_HTML || + attributeKey === _HelmetConstants.TAG_PROPERTIES.CSS_TEXT || + attributeKey === _HelmetConstants.TAG_PROPERTIES.ITEM_PROP) + ) { + primaryAttributeKey = attributeKey; + } + } + + if (!primaryAttributeKey || !tag[primaryAttributeKey]) { + return false; + } + + var value = tag[primaryAttributeKey].toLowerCase(); + + if (!approvedSeenTags[primaryAttributeKey]) { + approvedSeenTags[primaryAttributeKey] = {}; + } + + if (!instanceSeenTags[primaryAttributeKey]) { + instanceSeenTags[primaryAttributeKey] = {}; + } + + if (!approvedSeenTags[primaryAttributeKey][value]) { + instanceSeenTags[primaryAttributeKey][value] = true; + return true; + } + + return false; + }) + .reverse() + .forEach(function (tag) { + return approvedTags.push(tag); + }); + + // Update seen tags with tags from this instance + var keys = Object.keys(instanceSeenTags); + for (var i = 0; i < keys.length; i++) { + var attributeKey = keys[i]; + var tagUnion = (0, _objectAssign2.default)( + {}, + approvedSeenTags[attributeKey], + instanceSeenTags[attributeKey], + ); + + approvedSeenTags[attributeKey] = tagUnion; + } + + return approvedTags; + }, []) + .reverse(); + }; + + var getInnermostProperty = function getInnermostProperty(propsList, property) { + for (var i = propsList.length - 1; i >= 0; i--) { + var props = propsList[i]; + + if (props.hasOwnProperty(property)) { + return props[property]; + } + } + + return null; + }; + + var reducePropsToState = function reducePropsToState(propsList) { + return { + baseTag: getBaseTagFromPropsList([_HelmetConstants.TAG_PROPERTIES.HREF], propsList), + bodyAttributes: getAttributesFromPropsList(_HelmetConstants.ATTRIBUTE_NAMES.BODY, propsList), + defer: getInnermostProperty(propsList, _HelmetConstants.HELMET_PROPS.DEFER), + encode: getInnermostProperty(propsList, _HelmetConstants.HELMET_PROPS.ENCODE_SPECIAL_CHARACTERS), + htmlAttributes: getAttributesFromPropsList(_HelmetConstants.ATTRIBUTE_NAMES.HTML, propsList), + linkTags: getTagsFromPropsList( + _HelmetConstants.TAG_NAMES.LINK, + [_HelmetConstants.TAG_PROPERTIES.REL, _HelmetConstants.TAG_PROPERTIES.HREF], + propsList, + ), + metaTags: getTagsFromPropsList( + _HelmetConstants.TAG_NAMES.META, + [ + _HelmetConstants.TAG_PROPERTIES.NAME, + _HelmetConstants.TAG_PROPERTIES.CHARSET, + _HelmetConstants.TAG_PROPERTIES.HTTPEQUIV, + _HelmetConstants.TAG_PROPERTIES.PROPERTY, + _HelmetConstants.TAG_PROPERTIES.ITEM_PROP, + ], + propsList, + ), + noscriptTags: getTagsFromPropsList( + _HelmetConstants.TAG_NAMES.NOSCRIPT, + [_HelmetConstants.TAG_PROPERTIES.INNER_HTML], + propsList, + ), + onChangeClientState: getOnChangeClientState(propsList), + scriptTags: getTagsFromPropsList( + _HelmetConstants.TAG_NAMES.SCRIPT, + [_HelmetConstants.TAG_PROPERTIES.SRC, _HelmetConstants.TAG_PROPERTIES.INNER_HTML], + propsList, + ), + styleTags: getTagsFromPropsList( + _HelmetConstants.TAG_NAMES.STYLE, + [_HelmetConstants.TAG_PROPERTIES.CSS_TEXT], + propsList, + ), + title: getTitleFromPropsList(propsList), + titleAttributes: getAttributesFromPropsList(_HelmetConstants.ATTRIBUTE_NAMES.TITLE, propsList), + }; + }; + + var rafPolyfill = (function () { + var clock = Date.now(); + + return function (callback) { + var currentTime = Date.now(); + + if (currentTime - clock > 16) { + clock = currentTime; + callback(currentTime); + } else { + setTimeout(function () { + rafPolyfill(callback); + }, 0); + } + }; + })(); + + var cafPolyfill = function cafPolyfill(id) { + return clearTimeout(id); + }; + + var requestAnimationFrame = + typeof window !== 'undefined' + ? window.requestAnimationFrame || + window.webkitRequestAnimationFrame || + window.mozRequestAnimationFrame || + rafPolyfill + : global.requestAnimationFrame || rafPolyfill; + + var cancelAnimationFrame = + typeof window !== 'undefined' + ? window.cancelAnimationFrame || + window.webkitCancelAnimationFrame || + window.mozCancelAnimationFrame || + cafPolyfill + : global.cancelAnimationFrame || cafPolyfill; + + var warn = function warn(msg) { + return console && typeof console.warn === 'function' && console.warn(msg); + }; + + var _helmetCallback = null; + + var handleClientStateChange = function handleClientStateChange(newState) { + if (_helmetCallback) { + cancelAnimationFrame(_helmetCallback); + } + + if (newState.defer) { + _helmetCallback = requestAnimationFrame(function () { + commitTagChanges(newState, function () { + _helmetCallback = null; + }); + }); + } else { + commitTagChanges(newState); + _helmetCallback = null; + } + }; + + var commitTagChanges = function commitTagChanges(newState, cb) { + var baseTag = newState.baseTag, + bodyAttributes = newState.bodyAttributes, + htmlAttributes = newState.htmlAttributes, + linkTags = newState.linkTags, + metaTags = newState.metaTags, + noscriptTags = newState.noscriptTags, + onChangeClientState = newState.onChangeClientState, + scriptTags = newState.scriptTags, + styleTags = newState.styleTags, + title = newState.title, + titleAttributes = newState.titleAttributes; + + updateAttributes(_HelmetConstants.TAG_NAMES.BODY, bodyAttributes); + updateAttributes(_HelmetConstants.TAG_NAMES.HTML, htmlAttributes); + + updateTitle(title, titleAttributes); + + var tagUpdates = { + baseTag: updateTags(_HelmetConstants.TAG_NAMES.BASE, baseTag), + linkTags: updateTags(_HelmetConstants.TAG_NAMES.LINK, linkTags), + metaTags: updateTags(_HelmetConstants.TAG_NAMES.META, metaTags), + noscriptTags: updateTags(_HelmetConstants.TAG_NAMES.NOSCRIPT, noscriptTags), + scriptTags: updateTags(_HelmetConstants.TAG_NAMES.SCRIPT, scriptTags), + styleTags: updateTags(_HelmetConstants.TAG_NAMES.STYLE, styleTags), + }; + + var addedTags = {}; + var removedTags = {}; + + Object.keys(tagUpdates).forEach(function (tagType) { + var _tagUpdates$tagType = tagUpdates[tagType], + newTags = _tagUpdates$tagType.newTags, + oldTags = _tagUpdates$tagType.oldTags; + + if (newTags.length) { + addedTags[tagType] = newTags; + } + if (oldTags.length) { + removedTags[tagType] = tagUpdates[tagType].oldTags; + } + }); + + cb && cb(); + + onChangeClientState(newState, addedTags, removedTags); + }; + + var flattenArray = function flattenArray(possibleArray) { + return Array.isArray(possibleArray) ? possibleArray.join('') : possibleArray; + }; + + var updateTitle = function updateTitle(title, attributes) { + if (typeof title !== 'undefined' && document.title !== title) { + document.title = flattenArray(title); + } + + updateAttributes(_HelmetConstants.TAG_NAMES.TITLE, attributes); + }; + + var updateAttributes = function updateAttributes(tagName, attributes) { + var elementTag = document.getElementsByTagName(tagName)[0]; + + if (!elementTag) { + return; + } + + var helmetAttributeString = elementTag.getAttribute(_HelmetConstants.HELMET_ATTRIBUTE); + var helmetAttributes = helmetAttributeString ? helmetAttributeString.split(',') : []; + var attributesToRemove = [].concat(helmetAttributes); + var attributeKeys = Object.keys(attributes); + + for (var i = 0; i < attributeKeys.length; i++) { + var attribute = attributeKeys[i]; + var value = attributes[attribute] || ''; + + if (elementTag.getAttribute(attribute) !== value) { + elementTag.setAttribute(attribute, value); + } + + if (helmetAttributes.indexOf(attribute) === -1) { + helmetAttributes.push(attribute); + } + + var indexToSave = attributesToRemove.indexOf(attribute); + if (indexToSave !== -1) { + attributesToRemove.splice(indexToSave, 1); + } + } + + for (var _i = attributesToRemove.length - 1; _i >= 0; _i--) { + elementTag.removeAttribute(attributesToRemove[_i]); + } + + if (helmetAttributes.length === attributesToRemove.length) { + elementTag.removeAttribute(_HelmetConstants.HELMET_ATTRIBUTE); + } else if (elementTag.getAttribute(_HelmetConstants.HELMET_ATTRIBUTE) !== attributeKeys.join(',')) { + elementTag.setAttribute(_HelmetConstants.HELMET_ATTRIBUTE, attributeKeys.join(',')); + } + }; + + var updateTags = function updateTags(type, tags) { + var headElement = document.head || document.querySelector(_HelmetConstants.TAG_NAMES.HEAD); + var tagNodes = headElement.querySelectorAll(type + '[' + _HelmetConstants.HELMET_ATTRIBUTE + ']'); + var oldTags = Array.prototype.slice.call(tagNodes); + var newTags = []; + var indexToDelete = void 0; + + if (tags && tags.length) { + tags.forEach(function (tag) { + var newElement = document.createElement(type); + + for (var attribute in tag) { + if (tag.hasOwnProperty(attribute)) { + if (attribute === _HelmetConstants.TAG_PROPERTIES.INNER_HTML) { + newElement.innerHTML = tag.innerHTML; + } else if (attribute === _HelmetConstants.TAG_PROPERTIES.CSS_TEXT) { + if (newElement.styleSheet) { + newElement.styleSheet.cssText = tag.cssText; + } else { + newElement.appendChild(document.createTextNode(tag.cssText)); + } + } else { + var value = typeof tag[attribute] === 'undefined' ? '' : tag[attribute]; + newElement.setAttribute(attribute, value); + } + } + } + + newElement.setAttribute(_HelmetConstants.HELMET_ATTRIBUTE, 'true'); + + // Remove a duplicate tag from domTagstoRemove, so it isn't cleared. + if ( + oldTags.some(function (existingTag, index) { + indexToDelete = index; + return newElement.isEqualNode(existingTag); + }) + ) { + oldTags.splice(indexToDelete, 1); + } else { + newTags.push(newElement); + } + }); + } + + oldTags.forEach(function (tag) { + return tag.parentNode.removeChild(tag); + }); + newTags.forEach(function (tag) { + return headElement.appendChild(tag); + }); + + return { + oldTags: oldTags, + newTags: newTags, + }; + }; + + var generateElementAttributesAsString = function generateElementAttributesAsString(attributes) { + return Object.keys(attributes).reduce(function (str, key) { + var attr = typeof attributes[key] !== 'undefined' ? key + '="' + attributes[key] + '"' : '' + key; + return str ? str + ' ' + attr : attr; + }, ''); + }; + + var generateTitleAsString = function generateTitleAsString(type, title, attributes, encode) { + var attributeString = generateElementAttributesAsString(attributes); + var flattenedTitle = flattenArray(title); + return attributeString + ? '<' + + type + + ' ' + + _HelmetConstants.HELMET_ATTRIBUTE + + '="true" ' + + attributeString + + '>' + + encodeSpecialCharacters(flattenedTitle, encode) + + '</' + + type + + '>' + : '<' + + type + + ' ' + + _HelmetConstants.HELMET_ATTRIBUTE + + '="true">' + + encodeSpecialCharacters(flattenedTitle, encode) + + '</' + + type + + '>'; + }; + + var generateTagsAsString = function generateTagsAsString(type, tags, encode) { + return tags.reduce(function (str, tag) { + var attributeHtml = Object.keys(tag) + .filter(function (attribute) { + return !( + attribute === _HelmetConstants.TAG_PROPERTIES.INNER_HTML || + attribute === _HelmetConstants.TAG_PROPERTIES.CSS_TEXT + ); + }) + .reduce(function (string, attribute) { + var attr = + typeof tag[attribute] === 'undefined' + ? attribute + : attribute + '="' + encodeSpecialCharacters(tag[attribute], encode) + '"'; + return string ? string + ' ' + attr : attr; + }, ''); + + var tagContent = tag.innerHTML || tag.cssText || ''; + + var isSelfClosing = _HelmetConstants.SELF_CLOSING_TAGS.indexOf(type) === -1; + + return ( + str + + '<' + + type + + ' ' + + _HelmetConstants.HELMET_ATTRIBUTE + + '="true" ' + + attributeHtml + + (isSelfClosing ? '/>' : '>' + tagContent + '</' + type + '>') + ); + }, ''); + }; + + var convertElementAttributestoReactProps = function convertElementAttributestoReactProps(attributes) { + var initProps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + return Object.keys(attributes).reduce(function (obj, key) { + obj[_HelmetConstants.REACT_TAG_MAP[key] || key] = attributes[key]; + return obj; + }, initProps); + }; + + var convertReactPropstoHtmlAttributes = function convertReactPropstoHtmlAttributes(props) { + var initAttributes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + return Object.keys(props).reduce(function (obj, key) { + obj[_HelmetConstants.HTML_TAG_MAP[key] || key] = props[key]; + return obj; + }, initAttributes); + }; + + var generateTitleAsReactComponent = function generateTitleAsReactComponent(type, title, attributes) { + var _initProps; + + // assigning into an array to define toString function on it + var initProps = + ((_initProps = { + key: title, + }), + (_initProps[_HelmetConstants.HELMET_ATTRIBUTE] = true), + _initProps); + var props = convertElementAttributestoReactProps(attributes, initProps); + + return [_react2.default.createElement(_HelmetConstants.TAG_NAMES.TITLE, props, title)]; + }; + + var generateTagsAsReactComponent = function generateTagsAsReactComponent(type, tags) { + return tags.map(function (tag, i) { + var _mappedTag; + + var mappedTag = + ((_mappedTag = { + key: i, + }), + (_mappedTag[_HelmetConstants.HELMET_ATTRIBUTE] = true), + _mappedTag); + + Object.keys(tag).forEach(function (attribute) { + var mappedAttribute = _HelmetConstants.REACT_TAG_MAP[attribute] || attribute; + + if ( + mappedAttribute === _HelmetConstants.TAG_PROPERTIES.INNER_HTML || + mappedAttribute === _HelmetConstants.TAG_PROPERTIES.CSS_TEXT + ) { + var content = tag.innerHTML || tag.cssText; + mappedTag.dangerouslySetInnerHTML = { __html: content }; + } else { + mappedTag[mappedAttribute] = tag[attribute]; + } + }); + + return _react2.default.createElement(type, mappedTag); + }); + }; + + var getMethodsForTag = function getMethodsForTag(type, tags, encode) { + switch (type) { + case _HelmetConstants.TAG_NAMES.TITLE: + return { + toComponent: function toComponent() { + return generateTitleAsReactComponent(type, tags.title, tags.titleAttributes, encode); + }, + toString: function toString() { + return generateTitleAsString(type, tags.title, tags.titleAttributes, encode); + }, + }; + case _HelmetConstants.ATTRIBUTE_NAMES.BODY: + case _HelmetConstants.ATTRIBUTE_NAMES.HTML: + return { + toComponent: function toComponent() { + return convertElementAttributestoReactProps(tags); + }, + toString: function toString() { + return generateElementAttributesAsString(tags); + }, + }; + default: + return { + toComponent: function toComponent() { + return generateTagsAsReactComponent(type, tags); + }, + toString: function toString() { + return generateTagsAsString(type, tags, encode); + }, + }; + } + }; + + var mapStateOnServer = function mapStateOnServer(_ref) { + var baseTag = _ref.baseTag, + bodyAttributes = _ref.bodyAttributes, + encode = _ref.encode, + htmlAttributes = _ref.htmlAttributes, + linkTags = _ref.linkTags, + metaTags = _ref.metaTags, + noscriptTags = _ref.noscriptTags, + scriptTags = _ref.scriptTags, + styleTags = _ref.styleTags, + _ref$title = _ref.title, + title = _ref$title === undefined ? '' : _ref$title, + titleAttributes = _ref.titleAttributes; + return { + base: getMethodsForTag(_HelmetConstants.TAG_NAMES.BASE, baseTag, encode), + bodyAttributes: getMethodsForTag(_HelmetConstants.ATTRIBUTE_NAMES.BODY, bodyAttributes, encode), + htmlAttributes: getMethodsForTag(_HelmetConstants.ATTRIBUTE_NAMES.HTML, htmlAttributes, encode), + link: getMethodsForTag(_HelmetConstants.TAG_NAMES.LINK, linkTags, encode), + meta: getMethodsForTag(_HelmetConstants.TAG_NAMES.META, metaTags, encode), + noscript: getMethodsForTag(_HelmetConstants.TAG_NAMES.NOSCRIPT, noscriptTags, encode), + script: getMethodsForTag(_HelmetConstants.TAG_NAMES.SCRIPT, scriptTags, encode), + style: getMethodsForTag(_HelmetConstants.TAG_NAMES.STYLE, styleTags, encode), + title: getMethodsForTag( + _HelmetConstants.TAG_NAMES.TITLE, + { title: title, titleAttributes: titleAttributes }, + encode, + ), + }; + }; + + exports.convertReactPropstoHtmlAttributes = convertReactPropstoHtmlAttributes; + exports.handleClientStateChange = handleClientStateChange; + exports.mapStateOnServer = mapStateOnServer; + exports.reducePropsToState = reducePropsToState; + exports.requestAnimationFrame = requestAnimationFrame; + exports.warn = warn; + + /***/ + }, + /* 631 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_helmet__ = __webpack_require__(264); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_helmet___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_react_helmet__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__HelloWorld__ = __webpack_require__(161); + + var EchoProps = function EchoProps(props) { + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'div', + null, + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_1_react_helmet__['Helmet'], + null, + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('title', null, 'Custom page title'), + ), + 'Props: ', + JSON.stringify(props), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_2__HelloWorld__['a' /* default */], + props, + ), + ); + }; + + var _default = EchoProps; + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + EchoProps, + 'EchoProps', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/ReactHelmet.jsx', + ); + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/ReactHelmet.jsx', + ); + })(); + + /***/ + }, + /* 632 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__ImageExample__ = __webpack_require__(633); + /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, 'a', function () { + return __WEBPACK_IMPORTED_MODULE_0__ImageExample__['a']; + }); + + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + })(); + + /***/ + }, + /* 633 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(10); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__ImageExample_scss__ = __webpack_require__(634); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__ImageExample_scss___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__ImageExample_scss__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_images_256egghead_png__ = __webpack_require__(635); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_images_256egghead_png___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_images_256egghead_png__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__bower_png__ = __webpack_require__(636); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__bower_png___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_4__bower_png__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__blueprint_icon_svg__ = __webpack_require__(637); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__blueprint_icon_svg___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5__blueprint_icon_svg__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_images_lego_icon_svg__ = __webpack_require__(638); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_images_lego_icon_svg___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_images_lego_icon_svg__); + + // Note the global alias for images + + var TestComponent = function TestComponent(props) { + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'div', + null, + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'h1', + { className: __WEBPACK_IMPORTED_MODULE_2__ImageExample_scss___default.a.red }, + 'This is a test of CSS module color red.', + ), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('hr', null), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'h1', + { className: __WEBPACK_IMPORTED_MODULE_2__ImageExample_scss___default.a.background }, + 'Here is a label with a background-image from the CSS modules imported', + ), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('img', { + src: __WEBPACK_IMPORTED_MODULE_3_images_256egghead_png___default.a, + }), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('hr', null), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'h1', + { className: __WEBPACK_IMPORTED_MODULE_2__ImageExample_scss___default.a.backgroundSameDirectory }, + 'This label has a background image from the same directory. Below is an img tag in the same directory', + ), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('img', { + src: __WEBPACK_IMPORTED_MODULE_4__bower_png___default.a, + }), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('hr', null), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'h1', + null, + ' Below is an img tag of a svg in the same directory', + ), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('img', { + src: __WEBPACK_IMPORTED_MODULE_5__blueprint_icon_svg___default.a, + }), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('hr', null), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'h1', + null, + 'Below is a div with a background svg', + ), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div', { + className: __WEBPACK_IMPORTED_MODULE_2__ImageExample_scss___default.a.googleLogo, + }), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('hr', null), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'h1', + null, + 'SVG lego icon img tag with global path', + ), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('img', { + src: __WEBPACK_IMPORTED_MODULE_6_images_lego_icon_svg___default.a, + }), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('hr', null), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'h1', + null, + 'SVG lego icon with background image to global path', + ), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div', { + className: __WEBPACK_IMPORTED_MODULE_2__ImageExample_scss___default.a.legoIcon, + }), + ); + }; + + TestComponent.propTypes = { + message: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string, + }; + + var _default = TestComponent; + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + TestComponent, + 'TestComponent', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/ImageExample/ImageExample.js', + ); + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/ImageExample/ImageExample.js', + ); + })(); + + /***/ + }, + /* 634 */ + /***/ function (module, exports) { + module.exports = { + red: 'ImageExample__red__3ax2T', + background: 'ImageExample__background__2X-y3', + backgroundSameDirectory: 'ImageExample__backgroundSameDirectory__2Sn4F', + googleLogo: 'ImageExample__googleLogo__DoneW', + legoIcon: 'ImageExample__legoIcon__1AnHH', + }; + + /***/ + }, + /* 635 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = __webpack_require__.p + 'images/256egghead-0a0d6f5484f79e0ea2c2666cde44588c.png'; + + /***/ + }, + /* 636 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = __webpack_require__.p + 'images/bower-57ad2e565a98cf71ab6b0925ea211ea2.png'; + + /***/ + }, + /* 637 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = __webpack_require__.p + 'images/blueprint_icon-8e2f62bdd4e1cce1884907f5fafb6c61.svg'; + + /***/ + }, + /* 638 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = __webpack_require__.p + 'images/lego_icon-431dba39c343f8a5f0d8a7b890de4ad9.svg'; + + /***/ + }, + /* 639 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + + var SetTimeoutLoggingApp = function SetTimeoutLoggingApp(props) { + setTimeout(function () { + return console.error('*****TIMEOUT DONE!*****'); + }, 5000); + + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div', null, 'Called setTimeout.'); + }; + + var _default = SetTimeoutLoggingApp; + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + SetTimeoutLoggingApp, + 'SetTimeoutLoggingApp', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/startup/SetTimeoutLoggingApp.jsx', + ); + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/startup/SetTimeoutLoggingApp.jsx', + ); + })(); + + /***/ + }, + /* 640 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__components_ComponentWithLodash__ = + __webpack_require__(641); + + /* + * Export a function that returns a ReactComponent, depending on a store named SharedReduxStore. + * This is used for the client rendering hook after the page html is rendered. + * React will see that the state is the same and not do anything. + */ + + var _default = function _default() { + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_1__components_ComponentWithLodash__['a' /* default */], + null, + ); + }; + + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/startup/ComponentWithLodashApp.jsx', + ); + })(); + + /***/ + }, + /* 641 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_fp__ = __webpack_require__(642); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_fp___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_lodash_fp__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__index_scss__ = __webpack_require__(647); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__index_scss___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_2__index_scss__, + ); + + var _default = function _default() { + var paddedWord = __WEBPACK_IMPORTED_MODULE_1_lodash_fp___default.a.padStart(7)('works!'); + + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'div', + null, + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'h3', + { className: __WEBPACK_IMPORTED_MODULE_2__index_scss___default.a.message }, + 'Lodash still', + paddedWord, + ), + ); + }; + + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/ComponentWithLodash/index.jsx', + ); + })(); + + /***/ + }, + /* 642 */ + /***/ function (module, exports, __webpack_require__) { + var _ = __webpack_require__(643).runInContext(); + module.exports = __webpack_require__(644)(_, _); + + /***/ + }, + /* 643 */ + /***/ function (module, exports, __webpack_require__) { + /* WEBPACK VAR INJECTION */ (function (module) { + var __WEBPACK_AMD_DEFINE_RESULT__; /** + * @license + * Lodash lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE + */ + (function () { + function n(n, t, r) { + switch (r.length) { + case 0: + return n.call(t); + case 1: + return n.call(t, r[0]); + case 2: + return n.call(t, r[0], r[1]); + case 3: + return n.call(t, r[0], r[1], r[2]); + } + return n.apply(t, r); + } + function t(n, t, r, e) { + for (var u = -1, i = null == n ? 0 : n.length; ++u < i; ) { + var o = n[u]; + t(e, o, r(o), n); + } + return e; + } + function r(n, t) { + for (var r = -1, e = null == n ? 0 : n.length; ++r < e && false !== t(n[r], r, n); ); + return n; + } + function e(n, t) { + for (var r = null == n ? 0 : n.length; r-- && false !== t(n[r], r, n); ); + return n; + } + function u(n, t) { + for (var r = -1, e = null == n ? 0 : n.length; ++r < e; ) if (!t(n[r], r, n)) return false; + return true; + } + function i(n, t) { + for (var r = -1, e = null == n ? 0 : n.length, u = 0, i = []; ++r < e; ) { + var o = n[r]; + t(o, r, n) && (i[u++] = o); + } + return i; + } + function o(n, t) { + return !(null == n || !n.length) && -1 < v(n, t, 0); + } + function f(n, t, r) { + for (var e = -1, u = null == n ? 0 : n.length; ++e < u; ) if (r(t, n[e])) return true; + return false; + } + function c(n, t) { + for (var r = -1, e = null == n ? 0 : n.length, u = Array(e); ++r < e; ) u[r] = t(n[r], r, n); + return u; + } + function a(n, t) { + for (var r = -1, e = t.length, u = n.length; ++r < e; ) n[u + r] = t[r]; + return n; + } + function l(n, t, r, e) { + var u = -1, + i = null == n ? 0 : n.length; + for (e && i && (r = n[++u]); ++u < i; ) r = t(r, n[u], u, n); + return r; + } + function s(n, t, r, e) { + var u = null == n ? 0 : n.length; + for (e && u && (r = n[--u]); u--; ) r = t(r, n[u], u, n); + return r; + } + function h(n, t) { + for (var r = -1, e = null == n ? 0 : n.length; ++r < e; ) if (t(n[r], r, n)) return true; + return false; + } + function p(n, t, r) { + var e; + return ( + r(n, function (n, r, u) { + if (t(n, r, u)) return (e = r), false; + }), + e + ); + } + function _(n, t, r, e) { + var u = n.length; + for (r += e ? 1 : -1; e ? r-- : ++r < u; ) if (t(n[r], r, n)) return r; + return -1; + } + function v(n, t, r) { + if (t === t) + n: { + --r; + for (var e = n.length; ++r < e; ) + if (n[r] === t) { + n = r; + break n; + } + n = -1; + } + else n = _(n, d, r); + return n; + } + function g(n, t, r, e) { + --r; + for (var u = n.length; ++r < u; ) if (e(n[r], t)) return r; + return -1; + } + function d(n) { + return n !== n; + } + function y(n, t) { + var r = null == n ? 0 : n.length; + return r ? m(n, t) / r : F; + } + function b(n) { + return function (t) { + return null == t ? T : t[n]; + }; + } + function x(n) { + return function (t) { + return null == n ? T : n[t]; + }; + } + function j(n, t, r, e, u) { + return ( + u(n, function (n, u, i) { + r = e ? ((e = false), n) : t(r, n, u, i); + }), + r + ); + } + function w(n, t) { + var r = n.length; + for (n.sort(t); r--; ) n[r] = n[r].c; + return n; + } + function m(n, t) { + for (var r, e = -1, u = n.length; ++e < u; ) { + var i = t(n[e]); + i !== T && (r = r === T ? i : r + i); + } + return r; + } + function A(n, t) { + for (var r = -1, e = Array(n); ++r < n; ) e[r] = t(r); + return e; + } + function E(n, t) { + return c(t, function (t) { + return [t, n[t]]; + }); + } + function k(n) { + return function (t) { + return n(t); + }; + } + function S(n, t) { + return c(t, function (t) { + return n[t]; + }); + } + function O(n, t) { + return n.has(t); + } + function I(n, t) { + for (var r = -1, e = n.length; ++r < e && -1 < v(t, n[r], 0); ); + return r; + } + function R(n, t) { + for (var r = n.length; r-- && -1 < v(t, n[r], 0); ); + return r; + } + function z(n) { + return '\\' + Un[n]; + } + function W(n) { + var t = -1, + r = Array(n.size); + return ( + n.forEach(function (n, e) { + r[++t] = [e, n]; + }), + r + ); + } + function B(n, t) { + return function (r) { + return n(t(r)); + }; + } + function L(n, t) { + for (var r = -1, e = n.length, u = 0, i = []; ++r < e; ) { + var o = n[r]; + (o !== t && '__lodash_placeholder__' !== o) || + ((n[r] = '__lodash_placeholder__'), (i[u++] = r)); + } + return i; + } + function U(n) { + var t = -1, + r = Array(n.size); + return ( + n.forEach(function (n) { + r[++t] = n; + }), + r + ); + } + function C(n) { + var t = -1, + r = Array(n.size); + return ( + n.forEach(function (n) { + r[++t] = [n, n]; + }), + r + ); + } + function D(n) { + if (Rn.test(n)) { + for (var t = (On.lastIndex = 0); On.test(n); ) ++t; + n = t; + } else n = Qn(n); + return n; + } + function M(n) { + return Rn.test(n) ? n.match(On) || [] : n.split(''); + } + var T, + $ = 1 / 0, + F = NaN, + N = [ + ['ary', 128], + ['bind', 1], + ['bindKey', 2], + ['curry', 8], + ['curryRight', 16], + ['flip', 512], + ['partial', 32], + ['partialRight', 64], + ['rearg', 256], + ], + P = /\b__p\+='';/g, + Z = /\b(__p\+=)''\+/g, + q = /(__e\(.*?\)|\b__t\))\+'';/g, + V = /&(?:amp|lt|gt|quot|#39);/g, + K = /[&<>"']/g, + G = RegExp(V.source), + H = RegExp(K.source), + J = /<%-([\s\S]+?)%>/g, + Y = /<%([\s\S]+?)%>/g, + Q = /<%=([\s\S]+?)%>/g, + X = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, + nn = /^\w*$/, + tn = + /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, + rn = /[\\^$.*+?()[\]{}|]/g, + en = RegExp(rn.source), + un = /^\s+|\s+$/g, + on = /^\s+/, + fn = /\s+$/, + cn = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, + an = /\{\n\/\* \[wrapped with (.+)\] \*/, + ln = /,? & /, + sn = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g, + hn = /\\(\\)?/g, + pn = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g, + _n = /\w*$/, + vn = /^[-+]0x[0-9a-f]+$/i, + gn = /^0b[01]+$/i, + dn = /^\[object .+?Constructor\]$/, + yn = /^0o[0-7]+$/i, + bn = /^(?:0|[1-9]\d*)$/, + xn = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g, + jn = /($^)/, + wn = /['\n\r\u2028\u2029\\]/g, + mn = + '[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?(?:\\u200d(?:[^\\ud800-\\udfff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?)*', + An = + '(?:[\\u2700-\\u27bf]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])' + mn, + En = + '(?:[^\\ud800-\\udfff][\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]?|[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\ud800-\\udfff])', + kn = RegExp("['\u2019]", 'g'), + Sn = RegExp('[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]', 'g'), + On = RegExp('\\ud83c[\\udffb-\\udfff](?=\\ud83c[\\udffb-\\udfff])|' + En + mn, 'g'), + In = RegExp( + [ + "[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+(?:['\u2019](?:d|ll|m|re|s|t|ve))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde]|$)|(?:[A-Z\\xc0-\\xd6\\xd8-\\xde]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde](?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])|$)|[A-Z\\xc0-\\xd6\\xd8-\\xde]?(?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['\u2019](?:d|ll|m|re|s|t|ve))?|[A-Z\\xc0-\\xd6\\xd8-\\xde]+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?|\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])|\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])|\\d+", + An, + ].join('|'), + 'g', + ), + Rn = RegExp( + '[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]', + ), + zn = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/, + Wn = + 'Array Buffer DataView Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Map Math Object Promise RegExp Set String Symbol TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array WeakMap _ clearTimeout isFinite parseInt setTimeout'.split( + ' ', + ), + Bn = {}; + (Bn['[object Float32Array]'] = + Bn['[object Float64Array]'] = + Bn['[object Int8Array]'] = + Bn['[object Int16Array]'] = + Bn['[object Int32Array]'] = + Bn['[object Uint8Array]'] = + Bn['[object Uint8ClampedArray]'] = + Bn['[object Uint16Array]'] = + Bn['[object Uint32Array]'] = + true), + (Bn['[object Arguments]'] = + Bn['[object Array]'] = + Bn['[object ArrayBuffer]'] = + Bn['[object Boolean]'] = + Bn['[object DataView]'] = + Bn['[object Date]'] = + Bn['[object Error]'] = + Bn['[object Function]'] = + Bn['[object Map]'] = + Bn['[object Number]'] = + Bn['[object Object]'] = + Bn['[object RegExp]'] = + Bn['[object Set]'] = + Bn['[object String]'] = + Bn['[object WeakMap]'] = + false); + var Ln = {}; + (Ln['[object Arguments]'] = + Ln['[object Array]'] = + Ln['[object ArrayBuffer]'] = + Ln['[object DataView]'] = + Ln['[object Boolean]'] = + Ln['[object Date]'] = + Ln['[object Float32Array]'] = + Ln['[object Float64Array]'] = + Ln['[object Int8Array]'] = + Ln['[object Int16Array]'] = + Ln['[object Int32Array]'] = + Ln['[object Map]'] = + Ln['[object Number]'] = + Ln['[object Object]'] = + Ln['[object RegExp]'] = + Ln['[object Set]'] = + Ln['[object String]'] = + Ln['[object Symbol]'] = + Ln['[object Uint8Array]'] = + Ln['[object Uint8ClampedArray]'] = + Ln['[object Uint16Array]'] = + Ln['[object Uint32Array]'] = + true), + (Ln['[object Error]'] = Ln['[object Function]'] = Ln['[object WeakMap]'] = false); + var Un = { '\\': '\\', "'": "'", '\n': 'n', '\r': 'r', '\u2028': 'u2028', '\u2029': 'u2029' }, + Cn = parseFloat, + Dn = parseInt, + Mn = typeof global == 'object' && global && global.Object === Object && global, + Tn = typeof self == 'object' && self && self.Object === Object && self, + $n = Mn || Tn || Function('return this')(), + Fn = typeof exports == 'object' && exports && !exports.nodeType && exports, + Nn = Fn && typeof module == 'object' && module && !module.nodeType && module, + Pn = Nn && Nn.exports === Fn, + Zn = Pn && Mn.process, + qn = (function () { + try { + var n = Nn && Nn.f && Nn.f('util').types; + return n ? n : Zn && Zn.binding && Zn.binding('util'); + } catch (n) {} + })(), + Vn = qn && qn.isArrayBuffer, + Kn = qn && qn.isDate, + Gn = qn && qn.isMap, + Hn = qn && qn.isRegExp, + Jn = qn && qn.isSet, + Yn = qn && qn.isTypedArray, + Qn = b('length'), + Xn = x({ + '\xc0': 'A', + '\xc1': 'A', + '\xc2': 'A', + '\xc3': 'A', + '\xc4': 'A', + '\xc5': 'A', + '\xe0': 'a', + '\xe1': 'a', + '\xe2': 'a', + '\xe3': 'a', + '\xe4': 'a', + '\xe5': 'a', + '\xc7': 'C', + '\xe7': 'c', + '\xd0': 'D', + '\xf0': 'd', + '\xc8': 'E', + '\xc9': 'E', + '\xca': 'E', + '\xcb': 'E', + '\xe8': 'e', + '\xe9': 'e', + '\xea': 'e', + '\xeb': 'e', + '\xcc': 'I', + '\xcd': 'I', + '\xce': 'I', + '\xcf': 'I', + '\xec': 'i', + '\xed': 'i', + '\xee': 'i', + '\xef': 'i', + '\xd1': 'N', + '\xf1': 'n', + '\xd2': 'O', + '\xd3': 'O', + '\xd4': 'O', + '\xd5': 'O', + '\xd6': 'O', + '\xd8': 'O', + '\xf2': 'o', + '\xf3': 'o', + '\xf4': 'o', + '\xf5': 'o', + '\xf6': 'o', + '\xf8': 'o', + '\xd9': 'U', + '\xda': 'U', + '\xdb': 'U', + '\xdc': 'U', + '\xf9': 'u', + '\xfa': 'u', + '\xfb': 'u', + '\xfc': 'u', + '\xdd': 'Y', + '\xfd': 'y', + '\xff': 'y', + '\xc6': 'Ae', + '\xe6': 'ae', + '\xde': 'Th', + '\xfe': 'th', + '\xdf': 'ss', + '\u0100': 'A', + '\u0102': 'A', + '\u0104': 'A', + '\u0101': 'a', + '\u0103': 'a', + '\u0105': 'a', + '\u0106': 'C', + '\u0108': 'C', + '\u010a': 'C', + '\u010c': 'C', + '\u0107': 'c', + '\u0109': 'c', + '\u010b': 'c', + '\u010d': 'c', + '\u010e': 'D', + '\u0110': 'D', + '\u010f': 'd', + '\u0111': 'd', + '\u0112': 'E', + '\u0114': 'E', + '\u0116': 'E', + '\u0118': 'E', + '\u011a': 'E', + '\u0113': 'e', + '\u0115': 'e', + '\u0117': 'e', + '\u0119': 'e', + '\u011b': 'e', + '\u011c': 'G', + '\u011e': 'G', + '\u0120': 'G', + '\u0122': 'G', + '\u011d': 'g', + '\u011f': 'g', + '\u0121': 'g', + '\u0123': 'g', + '\u0124': 'H', + '\u0126': 'H', + '\u0125': 'h', + '\u0127': 'h', + '\u0128': 'I', + '\u012a': 'I', + '\u012c': 'I', + '\u012e': 'I', + '\u0130': 'I', + '\u0129': 'i', + '\u012b': 'i', + '\u012d': 'i', + '\u012f': 'i', + '\u0131': 'i', + '\u0134': 'J', + '\u0135': 'j', + '\u0136': 'K', + '\u0137': 'k', + '\u0138': 'k', + '\u0139': 'L', + '\u013b': 'L', + '\u013d': 'L', + '\u013f': 'L', + '\u0141': 'L', + '\u013a': 'l', + '\u013c': 'l', + '\u013e': 'l', + '\u0140': 'l', + '\u0142': 'l', + '\u0143': 'N', + '\u0145': 'N', + '\u0147': 'N', + '\u014a': 'N', + '\u0144': 'n', + '\u0146': 'n', + '\u0148': 'n', + '\u014b': 'n', + '\u014c': 'O', + '\u014e': 'O', + '\u0150': 'O', + '\u014d': 'o', + '\u014f': 'o', + '\u0151': 'o', + '\u0154': 'R', + '\u0156': 'R', + '\u0158': 'R', + '\u0155': 'r', + '\u0157': 'r', + '\u0159': 'r', + '\u015a': 'S', + '\u015c': 'S', + '\u015e': 'S', + '\u0160': 'S', + '\u015b': 's', + '\u015d': 's', + '\u015f': 's', + '\u0161': 's', + '\u0162': 'T', + '\u0164': 'T', + '\u0166': 'T', + '\u0163': 't', + '\u0165': 't', + '\u0167': 't', + '\u0168': 'U', + '\u016a': 'U', + '\u016c': 'U', + '\u016e': 'U', + '\u0170': 'U', + '\u0172': 'U', + '\u0169': 'u', + '\u016b': 'u', + '\u016d': 'u', + '\u016f': 'u', + '\u0171': 'u', + '\u0173': 'u', + '\u0174': 'W', + '\u0175': 'w', + '\u0176': 'Y', + '\u0177': 'y', + '\u0178': 'Y', + '\u0179': 'Z', + '\u017b': 'Z', + '\u017d': 'Z', + '\u017a': 'z', + '\u017c': 'z', + '\u017e': 'z', + '\u0132': 'IJ', + '\u0133': 'ij', + '\u0152': 'Oe', + '\u0153': 'oe', + '\u0149': "'n", + '\u017f': 's', + }), + nt = x({ '&': '&', '<': '<', '>': '>', '"': '"', "'": ''' }), + tt = x({ '&': '&', '<': '<', '>': '>', '"': '"', ''': "'" }), + rt = (function x(mn) { + function An(n) { + if (yu(n) && !ff(n) && !(n instanceof Un)) { + if (n instanceof On) return n; + if (oi.call(n, '__wrapped__')) return Fe(n); + } + return new On(n); + } + function En() {} + function On(n, t) { + (this.__wrapped__ = n), + (this.__actions__ = []), + (this.__chain__ = !!t), + (this.__index__ = 0), + (this.__values__ = T); + } + function Un(n) { + (this.__wrapped__ = n), + (this.__actions__ = []), + (this.__dir__ = 1), + (this.__filtered__ = false), + (this.__iteratees__ = []), + (this.__takeCount__ = 4294967295), + (this.__views__ = []); + } + function Mn(n) { + var t = -1, + r = null == n ? 0 : n.length; + for (this.clear(); ++t < r; ) { + var e = n[t]; + this.set(e[0], e[1]); + } + } + function Tn(n) { + var t = -1, + r = null == n ? 0 : n.length; + for (this.clear(); ++t < r; ) { + var e = n[t]; + this.set(e[0], e[1]); + } + } + function Fn(n) { + var t = -1, + r = null == n ? 0 : n.length; + for (this.clear(); ++t < r; ) { + var e = n[t]; + this.set(e[0], e[1]); + } + } + function Nn(n) { + var t = -1, + r = null == n ? 0 : n.length; + for (this.__data__ = new Fn(); ++t < r; ) this.add(n[t]); + } + function Zn(n) { + this.size = (this.__data__ = new Tn(n)).size; + } + function qn(n, t) { + var r, + e = ff(n), + u = !e && of(n), + i = !e && !u && af(n), + o = !e && !u && !i && _f(n), + u = (e = e || u || i || o) ? A(n.length, ni) : [], + f = u.length; + for (r in n) + (!t && !oi.call(n, r)) || + (e && + ('length' == r || + (i && ('offset' == r || 'parent' == r)) || + (o && ('buffer' == r || 'byteLength' == r || 'byteOffset' == r)) || + Se(r, f))) || + u.push(r); + return u; + } + function Qn(n) { + var t = n.length; + return t ? n[ir(0, t - 1)] : T; + } + function et(n, t) { + return De(Ur(n), pt(t, 0, n.length)); + } + function ut(n) { + return De(Ur(n)); + } + function it(n, t, r) { + ((r === T || lu(n[t], r)) && (r !== T || t in n)) || st(n, t, r); + } + function ot(n, t, r) { + var e = n[t]; + (oi.call(n, t) && lu(e, r) && (r !== T || t in n)) || st(n, t, r); + } + function ft(n, t) { + for (var r = n.length; r--; ) if (lu(n[r][0], t)) return r; + return -1; + } + function ct(n, t, r, e) { + return ( + uo(n, function (n, u, i) { + t(e, n, r(n), i); + }), + e + ); + } + function at(n, t) { + return n && Cr(t, Wu(t), n); + } + function lt(n, t) { + return n && Cr(t, Bu(t), n); + } + function st(n, t, r) { + '__proto__' == t && Ai + ? Ai(n, t, { configurable: true, enumerable: true, value: r, writable: true }) + : (n[t] = r); + } + function ht(n, t) { + for (var r = -1, e = t.length, u = Ku(e), i = null == n; ++r < e; ) + u[r] = i ? T : Ru(n, t[r]); + return u; + } + function pt(n, t, r) { + return n === n && (r !== T && (n = n <= r ? n : r), t !== T && (n = n >= t ? n : t)), n; + } + function _t(n, t, e, u, i, o) { + var f, + c = 1 & t, + a = 2 & t, + l = 4 & t; + if ((e && (f = i ? e(n, u, i, o) : e(n)), f !== T)) return f; + if (!du(n)) return n; + if ((u = ff(n))) { + if (((f = me(n)), !c)) return Ur(n, f); + } else { + var s = vo(n), + h = '[object Function]' == s || '[object GeneratorFunction]' == s; + if (af(n)) return Ir(n, c); + if ('[object Object]' == s || '[object Arguments]' == s || (h && !i)) { + if (((f = a || h ? {} : Ae(n)), !c)) return a ? Mr(n, lt(f, n)) : Dr(n, at(f, n)); + } else { + if (!Ln[s]) return i ? n : {}; + f = Ee(n, s, c); + } + } + if ((o || (o = new Zn()), (i = o.get(n)))) return i; + o.set(n, f), + pf(n) + ? n.forEach(function (r) { + f.add(_t(r, t, e, r, n, o)); + }) + : sf(n) && + n.forEach(function (r, u) { + f.set(u, _t(r, t, e, u, n, o)); + }); + var a = l ? (a ? ve : _e) : a ? Bu : Wu, + p = u ? T : a(n); + return ( + r(p || n, function (r, u) { + p && ((u = r), (r = n[u])), ot(f, u, _t(r, t, e, u, n, o)); + }), + f + ); + } + function vt(n) { + var t = Wu(n); + return function (r) { + return gt(r, n, t); + }; + } + function gt(n, t, r) { + var e = r.length; + if (null == n) return !e; + for (n = Qu(n); e--; ) { + var u = r[e], + i = t[u], + o = n[u]; + if ((o === T && !(u in n)) || !i(o)) return false; + } + return true; + } + function dt(n, t, r) { + if (typeof n != 'function') throw new ti('Expected a function'); + return bo(function () { + n.apply(T, r); + }, t); + } + function yt(n, t, r, e) { + var u = -1, + i = o, + a = true, + l = n.length, + s = [], + h = t.length; + if (!l) return s; + r && (t = c(t, k(r))), + e ? ((i = f), (a = false)) : 200 <= t.length && ((i = O), (a = false), (t = new Nn(t))); + n: for (; ++u < l; ) { + var p = n[u], + _ = null == r ? p : r(p), + p = e || 0 !== p ? p : 0; + if (a && _ === _) { + for (var v = h; v--; ) if (t[v] === _) continue n; + s.push(p); + } else i(t, _, e) || s.push(p); + } + return s; + } + function bt(n, t) { + var r = true; + return ( + uo(n, function (n, e, u) { + return (r = !!t(n, e, u)); + }), + r + ); + } + function xt(n, t, r) { + for (var e = -1, u = n.length; ++e < u; ) { + var i = n[e], + o = t(i); + if (null != o && (f === T ? o === o && !wu(o) : r(o, f))) + var f = o, + c = i; + } + return c; + } + function jt(n, t) { + var r = []; + return ( + uo(n, function (n, e, u) { + t(n, e, u) && r.push(n); + }), + r + ); + } + function wt(n, t, r, e, u) { + var i = -1, + o = n.length; + for (r || (r = ke), u || (u = []); ++i < o; ) { + var f = n[i]; + 0 < t && r(f) ? (1 < t ? wt(f, t - 1, r, e, u) : a(u, f)) : e || (u[u.length] = f); + } + return u; + } + function mt(n, t) { + return n && oo(n, t, Wu); + } + function At(n, t) { + return n && fo(n, t, Wu); + } + function Et(n, t) { + return i(t, function (t) { + return _u(n[t]); + }); + } + function kt(n, t) { + t = Sr(t, n); + for (var r = 0, e = t.length; null != n && r < e; ) n = n[Me(t[r++])]; + return r && r == e ? n : T; + } + function St(n, t, r) { + return (t = t(n)), ff(n) ? t : a(t, r(n)); + } + function Ot(n) { + if (null == n) n = n === T ? '[object Undefined]' : '[object Null]'; + else if (mi && mi in Qu(n)) { + var t = oi.call(n, mi), + r = n[mi]; + try { + n[mi] = T; + var e = true; + } catch (n) {} + var u = ai.call(n); + e && (t ? (n[mi] = r) : delete n[mi]), (n = u); + } else n = ai.call(n); + return n; + } + function It(n, t) { + return n > t; + } + function Rt(n, t) { + return null != n && oi.call(n, t); + } + function zt(n, t) { + return null != n && t in Qu(n); + } + function Wt(n, t, r) { + for ( + var e = r ? f : o, u = n[0].length, i = n.length, a = i, l = Ku(i), s = 1 / 0, h = []; + a--; + + ) { + var p = n[a]; + a && t && (p = c(p, k(t))), + (s = Ci(p.length, s)), + (l[a] = !r && (t || (120 <= u && 120 <= p.length)) ? new Nn(a && p) : T); + } + var p = n[0], + _ = -1, + v = l[0]; + n: for (; ++_ < u && h.length < s; ) { + var g = p[_], + d = t ? t(g) : g, + g = r || 0 !== g ? g : 0; + if (v ? !O(v, d) : !e(h, d, r)) { + for (a = i; --a; ) { + var y = l[a]; + if (y ? !O(y, d) : !e(n[a], d, r)) continue n; + } + v && v.push(d), h.push(g); + } + } + return h; + } + function Bt(n, t, r) { + var e = {}; + return ( + mt(n, function (n, u, i) { + t(e, r(n), u, i); + }), + e + ); + } + function Lt(t, r, e) { + return ( + (r = Sr(r, t)), + (t = 2 > r.length ? t : kt(t, hr(r, 0, -1))), + (r = null == t ? t : t[Me(Ve(r))]), + null == r ? T : n(r, t, e) + ); + } + function Ut(n) { + return yu(n) && '[object Arguments]' == Ot(n); + } + function Ct(n) { + return yu(n) && '[object ArrayBuffer]' == Ot(n); + } + function Dt(n) { + return yu(n) && '[object Date]' == Ot(n); + } + function Mt(n, t, r, e, u) { + if (n === t) t = true; + else if (null == n || null == t || (!yu(n) && !yu(t))) t = n !== n && t !== t; + else + n: { + var i = ff(n), + o = ff(t), + f = i ? '[object Array]' : vo(n), + c = o ? '[object Array]' : vo(t), + f = '[object Arguments]' == f ? '[object Object]' : f, + c = '[object Arguments]' == c ? '[object Object]' : c, + a = '[object Object]' == f, + o = '[object Object]' == c; + if ((c = f == c) && af(n)) { + if (!af(t)) { + t = false; + break n; + } + (i = true), (a = false); + } + if (c && !a) + u || (u = new Zn()), + (t = i || _f(n) ? se(n, t, r, e, Mt, u) : he(n, t, f, r, e, Mt, u)); + else { + if ( + !(1 & r) && + ((i = a && oi.call(n, '__wrapped__')), (f = o && oi.call(t, '__wrapped__')), i || f) + ) { + (n = i ? n.value() : n), + (t = f ? t.value() : t), + u || (u = new Zn()), + (t = Mt(n, t, r, e, u)); + break n; + } + if (c) + t: if ( + (u || (u = new Zn()), + (i = 1 & r), + (f = _e(n)), + (o = f.length), + (c = _e(t).length), + o == c || i) + ) { + for (a = o; a--; ) { + var l = f[a]; + if (!(i ? l in t : oi.call(t, l))) { + t = false; + break t; + } + } + if ((c = u.get(n)) && u.get(t)) t = c == t; + else { + (c = true), u.set(n, t), u.set(t, n); + for (var s = i; ++a < o; ) { + var l = f[a], + h = n[l], + p = t[l]; + if (e) var _ = i ? e(p, h, l, t, n, u) : e(h, p, l, n, t, u); + if (_ === T ? h !== p && !Mt(h, p, r, e, u) : !_) { + c = false; + break; + } + s || (s = 'constructor' == l); + } + c && + !s && + ((r = n.constructor), + (e = t.constructor), + r != e && + 'constructor' in n && + 'constructor' in t && + !( + typeof r == 'function' && + r instanceof r && + typeof e == 'function' && + e instanceof e + ) && + (c = false)), + u.delete(n), + u.delete(t), + (t = c); + } + } else t = false; + else t = false; + } + } + return t; + } + function Tt(n) { + return yu(n) && '[object Map]' == vo(n); + } + function $t(n, t, r, e) { + var u = r.length, + i = u, + o = !e; + if (null == n) return !i; + for (n = Qu(n); u--; ) { + var f = r[u]; + if (o && f[2] ? f[1] !== n[f[0]] : !(f[0] in n)) return false; + } + for (; ++u < i; ) { + var f = r[u], + c = f[0], + a = n[c], + l = f[1]; + if (o && f[2]) { + if (a === T && !(c in n)) return false; + } else { + if (((f = new Zn()), e)) var s = e(a, l, c, n, t, f); + if (s === T ? !Mt(l, a, 3, e, f) : !s) return false; + } + } + return true; + } + function Ft(n) { + return !(!du(n) || (ci && ci in n)) && (_u(n) ? hi : dn).test(Te(n)); + } + function Nt(n) { + return yu(n) && '[object RegExp]' == Ot(n); + } + function Pt(n) { + return yu(n) && '[object Set]' == vo(n); + } + function Zt(n) { + return yu(n) && gu(n.length) && !!Bn[Ot(n)]; + } + function qt(n) { + return typeof n == 'function' + ? n + : null == n + ? $u + : typeof n == 'object' + ? ff(n) + ? Jt(n[0], n[1]) + : Ht(n) + : Zu(n); + } + function Vt(n) { + if (!ze(n)) return Li(n); + var t, + r = []; + for (t in Qu(n)) oi.call(n, t) && 'constructor' != t && r.push(t); + return r; + } + function Kt(n, t) { + return n < t; + } + function Gt(n, t) { + var r = -1, + e = su(n) ? Ku(n.length) : []; + return ( + uo(n, function (n, u, i) { + e[++r] = t(n, u, i); + }), + e + ); + } + function Ht(n) { + var t = xe(n); + return 1 == t.length && t[0][2] + ? We(t[0][0], t[0][1]) + : function (r) { + return r === n || $t(r, n, t); + }; + } + function Jt(n, t) { + return Ie(n) && t === t && !du(t) + ? We(Me(n), t) + : function (r) { + var e = Ru(r, n); + return e === T && e === t ? zu(r, n) : Mt(t, e, 3); + }; + } + function Yt(n, t, r, e, u) { + n !== t && + oo( + t, + function (i, o) { + if ((u || (u = new Zn()), du(i))) { + var f = u, + c = Le(n, o), + a = Le(t, o), + l = f.get(a); + if (l) it(n, o, l); + else { + var l = e ? e(c, a, o + '', n, t, f) : T, + s = l === T; + if (s) { + var h = ff(a), + p = !h && af(a), + _ = !h && !p && _f(a), + l = a; + h || p || _ + ? ff(c) + ? (l = c) + : hu(c) + ? (l = Ur(c)) + : p + ? ((s = false), (l = Ir(a, true))) + : _ + ? ((s = false), (l = zr(a, true))) + : (l = []) + : xu(a) || of(a) + ? ((l = c), of(c) ? (l = Ou(c)) : (du(c) && !_u(c)) || (l = Ae(a))) + : (s = false); + } + s && (f.set(a, l), Yt(l, a, r, e, f), f.delete(a)), it(n, o, l); + } + } else (f = e ? e(Le(n, o), i, o + '', n, t, u) : T), f === T && (f = i), it(n, o, f); + }, + Bu, + ); + } + function Qt(n, t) { + var r = n.length; + if (r) return (t += 0 > t ? r : 0), Se(t, r) ? n[t] : T; + } + function Xt(n, t, r) { + var e = -1; + return ( + (t = c(t.length ? t : [$u], k(ye()))), + (n = Gt(n, function (n) { + return { + a: c(t, function (t) { + return t(n); + }), + b: ++e, + c: n, + }; + })), + w(n, function (n, t) { + var e; + n: { + e = -1; + for (var u = n.a, i = t.a, o = u.length, f = r.length; ++e < o; ) { + var c = Wr(u[e], i[e]); + if (c) { + e = e >= f ? c : c * ('desc' == r[e] ? -1 : 1); + break n; + } + } + e = n.b - t.b; + } + return e; + }) + ); + } + function nr(n, t) { + return tr(n, t, function (t, r) { + return zu(n, r); + }); + } + function tr(n, t, r) { + for (var e = -1, u = t.length, i = {}; ++e < u; ) { + var o = t[e], + f = kt(n, o); + r(f, o) && lr(i, Sr(o, n), f); + } + return i; + } + function rr(n) { + return function (t) { + return kt(t, n); + }; + } + function er(n, t, r, e) { + var u = e ? g : v, + i = -1, + o = t.length, + f = n; + for (n === t && (t = Ur(t)), r && (f = c(n, k(r))); ++i < o; ) + for (var a = 0, l = t[i], l = r ? r(l) : l; -1 < (a = u(f, l, a, e)); ) + f !== n && xi.call(f, a, 1), xi.call(n, a, 1); + return n; + } + function ur(n, t) { + for (var r = n ? t.length : 0, e = r - 1; r--; ) { + var u = t[r]; + if (r == e || u !== i) { + var i = u; + Se(u) ? xi.call(n, u, 1) : xr(n, u); + } + } + } + function ir(n, t) { + return n + Ii(Ti() * (t - n + 1)); + } + function or(n, t) { + var r = ''; + if (!n || 1 > t || 9007199254740991 < t) return r; + do t % 2 && (r += n), (t = Ii(t / 2)) && (n += n); + while (t); + return r; + } + function fr(n, t) { + return xo(Be(n, t, $u), n + ''); + } + function cr(n) { + return Qn(Uu(n)); + } + function ar(n, t) { + var r = Uu(n); + return De(r, pt(t, 0, r.length)); + } + function lr(n, t, r, e) { + if (!du(n)) return n; + t = Sr(t, n); + for (var u = -1, i = t.length, o = i - 1, f = n; null != f && ++u < i; ) { + var c = Me(t[u]), + a = r; + if (u != o) { + var l = f[c], + a = e ? e(l, c, f) : T; + a === T && (a = du(l) ? l : Se(t[u + 1]) ? [] : {}); + } + ot(f, c, a), (f = f[c]); + } + return n; + } + function sr(n) { + return De(Uu(n)); + } + function hr(n, t, r) { + var e = -1, + u = n.length; + for ( + 0 > t && (t = -t > u ? 0 : u + t), + r = r > u ? u : r, + 0 > r && (r += u), + u = t > r ? 0 : (r - t) >>> 0, + t >>>= 0, + r = Ku(u); + ++e < u; + + ) + r[e] = n[e + t]; + return r; + } + function pr(n, t) { + var r; + return ( + uo(n, function (n, e, u) { + return (r = t(n, e, u)), !r; + }), + !!r + ); + } + function _r(n, t, r) { + var e = 0, + u = null == n ? e : n.length; + if (typeof t == 'number' && t === t && 2147483647 >= u) { + for (; e < u; ) { + var i = (e + u) >>> 1, + o = n[i]; + null !== o && !wu(o) && (r ? o <= t : o < t) ? (e = i + 1) : (u = i); + } + return u; + } + return vr(n, t, $u, r); + } + function vr(n, t, r, e) { + t = r(t); + for ( + var u = 0, + i = null == n ? 0 : n.length, + o = t !== t, + f = null === t, + c = wu(t), + a = t === T; + u < i; + + ) { + var l = Ii((u + i) / 2), + s = r(n[l]), + h = s !== T, + p = null === s, + _ = s === s, + v = wu(s); + ( + o + ? e || _ + : a + ? _ && (e || h) + : f + ? _ && h && (e || !p) + : c + ? _ && h && !p && (e || !v) + : p || v + ? 0 + : e + ? s <= t + : s < t + ) + ? (u = l + 1) + : (i = l); + } + return Ci(i, 4294967294); + } + function gr(n, t) { + for (var r = -1, e = n.length, u = 0, i = []; ++r < e; ) { + var o = n[r], + f = t ? t(o) : o; + if (!r || !lu(f, c)) { + var c = f; + i[u++] = 0 === o ? 0 : o; + } + } + return i; + } + function dr(n) { + return typeof n == 'number' ? n : wu(n) ? F : +n; + } + function yr(n) { + if (typeof n == 'string') return n; + if (ff(n)) return c(n, yr) + ''; + if (wu(n)) return ro ? ro.call(n) : ''; + var t = n + ''; + return '0' == t && 1 / n == -$ ? '-0' : t; + } + function br(n, t, r) { + var e = -1, + u = o, + i = n.length, + c = true, + a = [], + l = a; + if (r) (c = false), (u = f); + else if (200 <= i) { + if ((u = t ? null : so(n))) return U(u); + (c = false), (u = O), (l = new Nn()); + } else l = t ? [] : a; + n: for (; ++e < i; ) { + var s = n[e], + h = t ? t(s) : s, + s = r || 0 !== s ? s : 0; + if (c && h === h) { + for (var p = l.length; p--; ) if (l[p] === h) continue n; + t && l.push(h), a.push(s); + } else u(l, h, r) || (l !== a && l.push(h), a.push(s)); + } + return a; + } + function xr(n, t) { + return ( + (t = Sr(t, n)), + (n = 2 > t.length ? n : kt(n, hr(t, 0, -1))), + null == n || delete n[Me(Ve(t))] + ); + } + function jr(n, t, r, e) { + for (var u = n.length, i = e ? u : -1; (e ? i-- : ++i < u) && t(n[i], i, n); ); + return r ? hr(n, e ? 0 : i, e ? i + 1 : u) : hr(n, e ? i + 1 : 0, e ? u : i); + } + function wr(n, t) { + var r = n; + return ( + r instanceof Un && (r = r.value()), + l( + t, + function (n, t) { + return t.func.apply(t.thisArg, a([n], t.args)); + }, + r, + ) + ); + } + function mr(n, t, r) { + var e = n.length; + if (2 > e) return e ? br(n[0]) : []; + for (var u = -1, i = Ku(e); ++u < e; ) + for (var o = n[u], f = -1; ++f < e; ) f != u && (i[u] = yt(i[u] || o, n[f], t, r)); + return br(wt(i, 1), t, r); + } + function Ar(n, t, r) { + for (var e = -1, u = n.length, i = t.length, o = {}; ++e < u; ) r(o, n[e], e < i ? t[e] : T); + return o; + } + function Er(n) { + return hu(n) ? n : []; + } + function kr(n) { + return typeof n == 'function' ? n : $u; + } + function Sr(n, t) { + return ff(n) ? n : Ie(n, t) ? [n] : jo(Iu(n)); + } + function Or(n, t, r) { + var e = n.length; + return (r = r === T ? e : r), !t && r >= e ? n : hr(n, t, r); + } + function Ir(n, t) { + if (t) return n.slice(); + var r = n.length, + r = gi ? gi(r) : new n.constructor(r); + return n.copy(r), r; + } + function Rr(n) { + var t = new n.constructor(n.byteLength); + return new vi(t).set(new vi(n)), t; + } + function zr(n, t) { + return new n.constructor(t ? Rr(n.buffer) : n.buffer, n.byteOffset, n.length); + } + function Wr(n, t) { + if (n !== t) { + var r = n !== T, + e = null === n, + u = n === n, + i = wu(n), + o = t !== T, + f = null === t, + c = t === t, + a = wu(t); + if ( + (!f && !a && !i && n > t) || + (i && o && c && !f && !a) || + (e && o && c) || + (!r && c) || + !u + ) + return 1; + if ( + (!e && !i && !a && n < t) || + (a && r && u && !e && !i) || + (f && r && u) || + (!o && u) || + !c + ) + return -1; + } + return 0; + } + function Br(n, t, r, e) { + var u = -1, + i = n.length, + o = r.length, + f = -1, + c = t.length, + a = Ui(i - o, 0), + l = Ku(c + a); + for (e = !e; ++f < c; ) l[f] = t[f]; + for (; ++u < o; ) (e || u < i) && (l[r[u]] = n[u]); + for (; a--; ) l[f++] = n[u++]; + return l; + } + function Lr(n, t, r, e) { + var u = -1, + i = n.length, + o = -1, + f = r.length, + c = -1, + a = t.length, + l = Ui(i - f, 0), + s = Ku(l + a); + for (e = !e; ++u < l; ) s[u] = n[u]; + for (l = u; ++c < a; ) s[l + c] = t[c]; + for (; ++o < f; ) (e || u < i) && (s[l + r[o]] = n[u++]); + return s; + } + function Ur(n, t) { + var r = -1, + e = n.length; + for (t || (t = Ku(e)); ++r < e; ) t[r] = n[r]; + return t; + } + function Cr(n, t, r, e) { + var u = !r; + r || (r = {}); + for (var i = -1, o = t.length; ++i < o; ) { + var f = t[i], + c = e ? e(r[f], n[f], f, r, n) : T; + c === T && (c = n[f]), u ? st(r, f, c) : ot(r, f, c); + } + return r; + } + function Dr(n, t) { + return Cr(n, po(n), t); + } + function Mr(n, t) { + return Cr(n, _o(n), t); + } + function Tr(n, r) { + return function (e, u) { + var i = ff(e) ? t : ct, + o = r ? r() : {}; + return i(e, n, ye(u, 2), o); + }; + } + function $r(n) { + return fr(function (t, r) { + var e = -1, + u = r.length, + i = 1 < u ? r[u - 1] : T, + o = 2 < u ? r[2] : T, + i = 3 < n.length && typeof i == 'function' ? (u--, i) : T; + for (o && Oe(r[0], r[1], o) && ((i = 3 > u ? T : i), (u = 1)), t = Qu(t); ++e < u; ) + (o = r[e]) && n(t, o, e, i); + return t; + }); + } + function Fr(n, t) { + return function (r, e) { + if (null == r) return r; + if (!su(r)) return n(r, e); + for ( + var u = r.length, i = t ? u : -1, o = Qu(r); + (t ? i-- : ++i < u) && false !== e(o[i], i, o); + + ); + return r; + }; + } + function Nr(n) { + return function (t, r, e) { + var u = -1, + i = Qu(t); + e = e(t); + for (var o = e.length; o--; ) { + var f = e[n ? o : ++u]; + if (false === r(i[f], f, i)) break; + } + return t; + }; + } + function Pr(n, t, r) { + function e() { + return (this && this !== $n && this instanceof e ? i : n).apply(u ? r : this, arguments); + } + var u = 1 & t, + i = Vr(n); + return e; + } + function Zr(n) { + return function (t) { + t = Iu(t); + var r = Rn.test(t) ? M(t) : T, + e = r ? r[0] : t.charAt(0); + return (t = r ? Or(r, 1).join('') : t.slice(1)), e[n]() + t; + }; + } + function qr(n) { + return function (t) { + return l(Mu(Du(t).replace(kn, '')), n, ''); + }; + } + function Vr(n) { + return function () { + var t = arguments; + switch (t.length) { + case 0: + return new n(); + case 1: + return new n(t[0]); + case 2: + return new n(t[0], t[1]); + case 3: + return new n(t[0], t[1], t[2]); + case 4: + return new n(t[0], t[1], t[2], t[3]); + case 5: + return new n(t[0], t[1], t[2], t[3], t[4]); + case 6: + return new n(t[0], t[1], t[2], t[3], t[4], t[5]); + case 7: + return new n(t[0], t[1], t[2], t[3], t[4], t[5], t[6]); + } + var r = eo(n.prototype), + t = n.apply(r, t); + return du(t) ? t : r; + }; + } + function Kr(t, r, e) { + function u() { + for (var o = arguments.length, f = Ku(o), c = o, a = de(u); c--; ) f[c] = arguments[c]; + return ( + (c = 3 > o && f[0] !== a && f[o - 1] !== a ? [] : L(f, a)), + (o -= c.length), + o < e + ? ue(t, r, Jr, u.placeholder, T, f, c, T, T, e - o) + : n(this && this !== $n && this instanceof u ? i : t, this, f) + ); + } + var i = Vr(t); + return u; + } + function Gr(n) { + return function (t, r, e) { + var u = Qu(t); + if (!su(t)) { + var i = ye(r, 3); + (t = Wu(t)), + (r = function (n) { + return i(u[n], n, u); + }); + } + return (r = n(t, r, e)), -1 < r ? u[i ? t[r] : r] : T; + }; + } + function Hr(n) { + return pe(function (t) { + var r = t.length, + e = r, + u = On.prototype.thru; + for (n && t.reverse(); e--; ) { + var i = t[e]; + if (typeof i != 'function') throw new ti('Expected a function'); + if (u && !o && 'wrapper' == ge(i)) var o = new On([], true); + } + for (e = o ? e : r; ++e < r; ) + var i = t[e], + u = ge(i), + f = 'wrapper' == u ? ho(i) : T, + o = + f && Re(f[0]) && 424 == f[1] && !f[4].length && 1 == f[9] + ? o[ge(f[0])].apply(o, f[3]) + : 1 == i.length && Re(i) + ? o[u]() + : o.thru(i); + return function () { + var n = arguments, + e = n[0]; + if (o && 1 == n.length && ff(e)) return o.plant(e).value(); + for (var u = 0, n = r ? t[u].apply(this, n) : e; ++u < r; ) n = t[u].call(this, n); + return n; + }; + }); + } + function Jr(n, t, r, e, u, i, o, f, c, a) { + function l() { + for (var d = arguments.length, y = Ku(d), b = d; b--; ) y[b] = arguments[b]; + if (_) { + var x, + j = de(l), + b = y.length; + for (x = 0; b--; ) y[b] === j && ++x; + } + if ((e && (y = Br(y, e, u, _)), i && (y = Lr(y, i, o, _)), (d -= x), _ && d < a)) + return (j = L(y, j)), ue(n, t, Jr, l.placeholder, r, y, j, f, c, a - d); + if (((j = h ? r : this), (b = p ? j[n] : n), (d = y.length), f)) { + x = y.length; + for (var w = Ci(f.length, x), m = Ur(y); w--; ) { + var A = f[w]; + y[w] = Se(A, x) ? m[A] : T; + } + } else v && 1 < d && y.reverse(); + return ( + s && c < d && (y.length = c), + this && this !== $n && this instanceof l && (b = g || Vr(b)), + b.apply(j, y) + ); + } + var s = 128 & t, + h = 1 & t, + p = 2 & t, + _ = 24 & t, + v = 512 & t, + g = p ? T : Vr(n); + return l; + } + function Yr(n, t) { + return function (r, e) { + return Bt(r, n, t(e)); + }; + } + function Qr(n, t) { + return function (r, e) { + var u; + if (r === T && e === T) return t; + if ((r !== T && (u = r), e !== T)) { + if (u === T) return e; + typeof r == 'string' || typeof e == 'string' + ? ((r = yr(r)), (e = yr(e))) + : ((r = dr(r)), (e = dr(e))), + (u = n(r, e)); + } + return u; + }; + } + function Xr(t) { + return pe(function (r) { + return ( + (r = c(r, k(ye()))), + fr(function (e) { + var u = this; + return t(r, function (t) { + return n(t, u, e); + }); + }) + ); + }); + } + function ne(n, t) { + t = t === T ? ' ' : yr(t); + var r = t.length; + return 2 > r + ? r + ? or(t, n) + : t + : ((r = or(t, Oi(n / D(t)))), Rn.test(t) ? Or(M(r), 0, n).join('') : r.slice(0, n)); + } + function te(t, r, e, u) { + function i() { + for ( + var r = -1, + c = arguments.length, + a = -1, + l = u.length, + s = Ku(l + c), + h = this && this !== $n && this instanceof i ? f : t; + ++a < l; + + ) + s[a] = u[a]; + for (; c--; ) s[a++] = arguments[++r]; + return n(h, o ? e : this, s); + } + var o = 1 & r, + f = Vr(t); + return i; + } + function re(n) { + return function (t, r, e) { + e && typeof e != 'number' && Oe(t, r, e) && (r = e = T), + (t = Au(t)), + r === T ? ((r = t), (t = 0)) : (r = Au(r)), + (e = e === T ? (t < r ? 1 : -1) : Au(e)); + var u = -1; + r = Ui(Oi((r - t) / (e || 1)), 0); + for (var i = Ku(r); r--; ) (i[n ? r : ++u] = t), (t += e); + return i; + }; + } + function ee(n) { + return function (t, r) { + return ( + (typeof t == 'string' && typeof r == 'string') || ((t = Su(t)), (r = Su(r))), n(t, r) + ); + }; + } + function ue(n, t, r, e, u, i, o, f, c, a) { + var l = 8 & t, + s = l ? o : T; + o = l ? T : o; + var h = l ? i : T; + return ( + (i = l ? T : i), + (t = (t | (l ? 32 : 64)) & ~(l ? 64 : 32)), + 4 & t || (t &= -4), + (u = [n, t, u, h, s, i, o, f, c, a]), + (r = r.apply(T, u)), + Re(n) && yo(r, u), + (r.placeholder = e), + Ue(r, n, t) + ); + } + function ie(n) { + var t = Yu[n]; + return function (n, r) { + if (((n = Su(n)), (r = null == r ? 0 : Ci(Eu(r), 292)) && Wi(n))) { + var e = (Iu(n) + 'e').split('e'), + e = t(e[0] + 'e' + (+e[1] + r)), + e = (Iu(e) + 'e').split('e'); + return +(e[0] + 'e' + (+e[1] - r)); + } + return t(n); + }; + } + function oe(n) { + return function (t) { + var r = vo(t); + return '[object Map]' == r ? W(t) : '[object Set]' == r ? C(t) : E(t, n(t)); + }; + } + function fe(n, t, r, e, u, i, o, f) { + var c = 2 & t; + if (!c && typeof n != 'function') throw new ti('Expected a function'); + var a = e ? e.length : 0; + if ( + (a || ((t &= -97), (e = u = T)), + (o = o === T ? o : Ui(Eu(o), 0)), + (f = f === T ? f : Eu(f)), + (a -= u ? u.length : 0), + 64 & t) + ) { + var l = e, + s = u; + e = u = T; + } + var h = c ? T : ho(n); + return ( + (i = [n, t, r, e, u, l, s, i, o, f]), + h && + ((r = i[1]), + (n = h[1]), + (t = r | n), + (e = + (128 == n && 8 == r) || + (128 == n && 256 == r && i[7].length <= h[8]) || + (384 == n && h[7].length <= h[8] && 8 == r)), + 131 > t || e) && + (1 & n && ((i[2] = h[2]), (t |= 1 & r ? 0 : 4)), + (r = h[3]) && + ((e = i[3]), + (i[3] = e ? Br(e, r, h[4]) : r), + (i[4] = e ? L(i[3], '__lodash_placeholder__') : h[4])), + (r = h[5]) && + ((e = i[5]), + (i[5] = e ? Lr(e, r, h[6]) : r), + (i[6] = e ? L(i[5], '__lodash_placeholder__') : h[6])), + (r = h[7]) && (i[7] = r), + 128 & n && (i[8] = null == i[8] ? h[8] : Ci(i[8], h[8])), + null == i[9] && (i[9] = h[9]), + (i[0] = h[0]), + (i[1] = t)), + (n = i[0]), + (t = i[1]), + (r = i[2]), + (e = i[3]), + (u = i[4]), + (f = i[9] = i[9] === T ? (c ? 0 : n.length) : Ui(i[9] - a, 0)), + !f && 24 & t && (t &= -25), + Ue( + (h ? co : yo)( + t && 1 != t + ? 8 == t || 16 == t + ? Kr(n, t, f) + : (32 != t && 33 != t) || u.length + ? Jr.apply(T, i) + : te(n, t, r, e) + : Pr(n, t, r), + i, + ), + n, + t, + ) + ); + } + function ce(n, t, r, e) { + return n === T || (lu(n, ei[r]) && !oi.call(e, r)) ? t : n; + } + function ae(n, t, r, e, u, i) { + return du(n) && du(t) && (i.set(t, n), Yt(n, t, T, ae, i), i.delete(t)), n; + } + function le(n) { + return xu(n) ? T : n; + } + function se(n, t, r, e, u, i) { + var o = 1 & r, + f = n.length, + c = t.length; + if (f != c && !(o && c > f)) return false; + if ((c = i.get(n)) && i.get(t)) return c == t; + var c = -1, + a = true, + l = 2 & r ? new Nn() : T; + for (i.set(n, t), i.set(t, n); ++c < f; ) { + var s = n[c], + p = t[c]; + if (e) var _ = o ? e(p, s, c, t, n, i) : e(s, p, c, n, t, i); + if (_ !== T) { + if (_) continue; + a = false; + break; + } + if (l) { + if ( + !h(t, function (n, t) { + if (!O(l, t) && (s === n || u(s, n, r, e, i))) return l.push(t); + }) + ) { + a = false; + break; + } + } else if (s !== p && !u(s, p, r, e, i)) { + a = false; + break; + } + } + return i.delete(n), i.delete(t), a; + } + function he(n, t, r, e, u, i, o) { + switch (r) { + case '[object DataView]': + if (n.byteLength != t.byteLength || n.byteOffset != t.byteOffset) break; + (n = n.buffer), (t = t.buffer); + case '[object ArrayBuffer]': + if (n.byteLength != t.byteLength || !i(new vi(n), new vi(t))) break; + return true; + case '[object Boolean]': + case '[object Date]': + case '[object Number]': + return lu(+n, +t); + case '[object Error]': + return n.name == t.name && n.message == t.message; + case '[object RegExp]': + case '[object String]': + return n == t + ''; + case '[object Map]': + var f = W; + case '[object Set]': + if ((f || (f = U), n.size != t.size && !(1 & e))) break; + return (r = o.get(n)) + ? r == t + : ((e |= 2), o.set(n, t), (t = se(f(n), f(t), e, u, i, o)), o.delete(n), t); + case '[object Symbol]': + if (to) return to.call(n) == to.call(t); + } + return false; + } + function pe(n) { + return xo(Be(n, T, Ze), n + ''); + } + function _e(n) { + return St(n, Wu, po); + } + function ve(n) { + return St(n, Bu, _o); + } + function ge(n) { + for (var t = n.name + '', r = Gi[t], e = oi.call(Gi, t) ? r.length : 0; e--; ) { + var u = r[e], + i = u.func; + if (null == i || i == n) return u.name; + } + return t; + } + function de(n) { + return (oi.call(An, 'placeholder') ? An : n).placeholder; + } + function ye() { + var n = An.iteratee || Fu, + n = n === Fu ? qt : n; + return arguments.length ? n(arguments[0], arguments[1]) : n; + } + function be(n, t) { + var r = n.__data__, + e = typeof t; + return ( + 'string' == e || 'number' == e || 'symbol' == e || 'boolean' == e + ? '__proto__' !== t + : null === t + ) + ? r[typeof t == 'string' ? 'string' : 'hash'] + : r.map; + } + function xe(n) { + for (var t = Wu(n), r = t.length; r--; ) { + var e = t[r], + u = n[e]; + t[r] = [e, u, u === u && !du(u)]; + } + return t; + } + function je(n, t) { + var r = null == n ? T : n[t]; + return Ft(r) ? r : T; + } + function we(n, t, r) { + t = Sr(t, n); + for (var e = -1, u = t.length, i = false; ++e < u; ) { + var o = Me(t[e]); + if (!(i = null != n && r(n, o))) break; + n = n[o]; + } + return i || ++e != u + ? i + : ((u = null == n ? 0 : n.length), !!u && gu(u) && Se(o, u) && (ff(n) || of(n))); + } + function me(n) { + var t = n.length, + r = new n.constructor(t); + return ( + t && + 'string' == typeof n[0] && + oi.call(n, 'index') && + ((r.index = n.index), (r.input = n.input)), + r + ); + } + function Ae(n) { + return typeof n.constructor != 'function' || ze(n) ? {} : eo(di(n)); + } + function Ee(n, t, r) { + var e = n.constructor; + switch (t) { + case '[object ArrayBuffer]': + return Rr(n); + case '[object Boolean]': + case '[object Date]': + return new e(+n); + case '[object DataView]': + return ( + (t = r ? Rr(n.buffer) : n.buffer), new n.constructor(t, n.byteOffset, n.byteLength) + ); + case '[object Float32Array]': + case '[object Float64Array]': + case '[object Int8Array]': + case '[object Int16Array]': + case '[object Int32Array]': + case '[object Uint8Array]': + case '[object Uint8ClampedArray]': + case '[object Uint16Array]': + case '[object Uint32Array]': + return zr(n, r); + case '[object Map]': + return new e(); + case '[object Number]': + case '[object String]': + return new e(n); + case '[object RegExp]': + return (t = new n.constructor(n.source, _n.exec(n))), (t.lastIndex = n.lastIndex), t; + case '[object Set]': + return new e(); + case '[object Symbol]': + return to ? Qu(to.call(n)) : {}; + } + } + function ke(n) { + return ff(n) || of(n) || !!(ji && n && n[ji]); + } + function Se(n, t) { + var r = typeof n; + return ( + (t = null == t ? 9007199254740991 : t), + !!t && ('number' == r || ('symbol' != r && bn.test(n))) && -1 < n && 0 == n % 1 && n < t + ); + } + function Oe(n, t, r) { + if (!du(r)) return false; + var e = typeof t; + return !!('number' == e ? su(r) && Se(t, r.length) : 'string' == e && t in r) && lu(r[t], n); + } + function Ie(n, t) { + if (ff(n)) return false; + var r = typeof n; + return ( + !('number' != r && 'symbol' != r && 'boolean' != r && null != n && !wu(n)) || + nn.test(n) || + !X.test(n) || + (null != t && n in Qu(t)) + ); + } + function Re(n) { + var t = ge(n), + r = An[t]; + return ( + typeof r == 'function' && t in Un.prototype && (n === r || ((t = ho(r)), !!t && n === t[0])) + ); + } + function ze(n) { + var t = n && n.constructor; + return n === ((typeof t == 'function' && t.prototype) || ei); + } + function We(n, t) { + return function (r) { + return null != r && r[n] === t && (t !== T || n in Qu(r)); + }; + } + function Be(t, r, e) { + return ( + (r = Ui(r === T ? t.length - 1 : r, 0)), + function () { + for (var u = arguments, i = -1, o = Ui(u.length - r, 0), f = Ku(o); ++i < o; ) + f[i] = u[r + i]; + for (i = -1, o = Ku(r + 1); ++i < r; ) o[i] = u[i]; + return (o[r] = e(f)), n(t, this, o); + } + ); + } + function Le(n, t) { + if (('constructor' !== t || 'function' != typeof n[t]) && '__proto__' != t) return n[t]; + } + function Ue(n, t, r) { + var e = t + ''; + t = xo; + var u, + i = $e; + return ( + (u = (u = e.match(an)) ? u[1].split(ln) : []), + (r = i(u, r)), + (i = r.length) && + ((u = i - 1), + (r[u] = (1 < i ? '& ' : '') + r[u]), + (r = r.join(2 < i ? ', ' : ' ')), + (e = e.replace(cn, '{\n/* [wrapped with ' + r + '] */\n'))), + t(n, e) + ); + } + function Ce(n) { + var t = 0, + r = 0; + return function () { + var e = Di(), + u = 16 - (e - r); + if (((r = e), 0 < u)) { + if (800 <= ++t) return arguments[0]; + } else t = 0; + return n.apply(T, arguments); + }; + } + function De(n, t) { + var r = -1, + e = n.length, + u = e - 1; + for (t = t === T ? e : t; ++r < t; ) { + var e = ir(r, u), + i = n[e]; + (n[e] = n[r]), (n[r] = i); + } + return (n.length = t), n; + } + function Me(n) { + if (typeof n == 'string' || wu(n)) return n; + var t = n + ''; + return '0' == t && 1 / n == -$ ? '-0' : t; + } + function Te(n) { + if (null != n) { + try { + return ii.call(n); + } catch (n) {} + return n + ''; + } + return ''; + } + function $e(n, t) { + return ( + r(N, function (r) { + var e = '_.' + r[0]; + t & r[1] && !o(n, e) && n.push(e); + }), + n.sort() + ); + } + function Fe(n) { + if (n instanceof Un) return n.clone(); + var t = new On(n.__wrapped__, n.__chain__); + return ( + (t.__actions__ = Ur(n.__actions__)), + (t.__index__ = n.__index__), + (t.__values__ = n.__values__), + t + ); + } + function Ne(n, t, r) { + var e = null == n ? 0 : n.length; + return e ? ((r = null == r ? 0 : Eu(r)), 0 > r && (r = Ui(e + r, 0)), _(n, ye(t, 3), r)) : -1; + } + function Pe(n, t, r) { + var e = null == n ? 0 : n.length; + if (!e) return -1; + var u = e - 1; + return ( + r !== T && ((u = Eu(r)), (u = 0 > r ? Ui(e + u, 0) : Ci(u, e - 1))), _(n, ye(t, 3), u, true) + ); + } + function Ze(n) { + return (null == n ? 0 : n.length) ? wt(n, 1) : []; + } + function qe(n) { + return n && n.length ? n[0] : T; + } + function Ve(n) { + var t = null == n ? 0 : n.length; + return t ? n[t - 1] : T; + } + function Ke(n, t) { + return n && n.length && t && t.length ? er(n, t) : n; + } + function Ge(n) { + return null == n ? n : $i.call(n); + } + function He(n) { + if (!n || !n.length) return []; + var t = 0; + return ( + (n = i(n, function (n) { + if (hu(n)) return (t = Ui(n.length, t)), true; + })), + A(t, function (t) { + return c(n, b(t)); + }) + ); + } + function Je(t, r) { + if (!t || !t.length) return []; + var e = He(t); + return null == r + ? e + : c(e, function (t) { + return n(r, T, t); + }); + } + function Ye(n) { + return (n = An(n)), (n.__chain__ = true), n; + } + function Qe(n, t) { + return t(n); + } + function Xe() { + return this; + } + function nu(n, t) { + return (ff(n) ? r : uo)(n, ye(t, 3)); + } + function tu(n, t) { + return (ff(n) ? e : io)(n, ye(t, 3)); + } + function ru(n, t) { + return (ff(n) ? c : Gt)(n, ye(t, 3)); + } + function eu(n, t, r) { + return (t = r ? T : t), (t = n && null == t ? n.length : t), fe(n, 128, T, T, T, T, t); + } + function uu(n, t) { + var r; + if (typeof t != 'function') throw new ti('Expected a function'); + return ( + (n = Eu(n)), + function () { + return 0 < --n && (r = t.apply(this, arguments)), 1 >= n && (t = T), r; + } + ); + } + function iu(n, t, r) { + return (t = r ? T : t), (n = fe(n, 8, T, T, T, T, T, t)), (n.placeholder = iu.placeholder), n; + } + function ou(n, t, r) { + return ( + (t = r ? T : t), (n = fe(n, 16, T, T, T, T, T, t)), (n.placeholder = ou.placeholder), n + ); + } + function fu(n, t, r) { + function e(t) { + var r = c, + e = a; + return (c = a = T), (_ = t), (s = n.apply(e, r)); + } + function u(n) { + var r = n - p; + return (n -= _), p === T || r >= t || 0 > r || (g && n >= l); + } + function i() { + var n = Go(); + if (u(n)) return o(n); + var r, + e = bo; + (r = n - _), (n = t - (n - p)), (r = g ? Ci(n, l - r) : n), (h = e(i, r)); + } + function o(n) { + return (h = T), d && c ? e(n) : ((c = a = T), s); + } + function f() { + var n = Go(), + r = u(n); + if (((c = arguments), (a = this), (p = n), r)) { + if (h === T) return (_ = n = p), (h = bo(i, t)), v ? e(n) : s; + if (g) return lo(h), (h = bo(i, t)), e(p); + } + return h === T && (h = bo(i, t)), s; + } + var c, + a, + l, + s, + h, + p, + _ = 0, + v = false, + g = false, + d = true; + if (typeof n != 'function') throw new ti('Expected a function'); + return ( + (t = Su(t) || 0), + du(r) && + ((v = !!r.leading), + (l = (g = 'maxWait' in r) ? Ui(Su(r.maxWait) || 0, t) : l), + (d = 'trailing' in r ? !!r.trailing : d)), + (f.cancel = function () { + h !== T && lo(h), (_ = 0), (c = p = a = h = T); + }), + (f.flush = function () { + return h === T ? s : o(Go()); + }), + f + ); + } + function cu(n, t) { + function r() { + var e = arguments, + u = t ? t.apply(this, e) : e[0], + i = r.cache; + return i.has(u) ? i.get(u) : ((e = n.apply(this, e)), (r.cache = i.set(u, e) || i), e); + } + if (typeof n != 'function' || (null != t && typeof t != 'function')) + throw new ti('Expected a function'); + return (r.cache = new (cu.Cache || Fn)()), r; + } + function au(n) { + if (typeof n != 'function') throw new ti('Expected a function'); + return function () { + var t = arguments; + switch (t.length) { + case 0: + return !n.call(this); + case 1: + return !n.call(this, t[0]); + case 2: + return !n.call(this, t[0], t[1]); + case 3: + return !n.call(this, t[0], t[1], t[2]); + } + return !n.apply(this, t); + }; + } + function lu(n, t) { + return n === t || (n !== n && t !== t); + } + function su(n) { + return null != n && gu(n.length) && !_u(n); + } + function hu(n) { + return yu(n) && su(n); + } + function pu(n) { + if (!yu(n)) return false; + var t = Ot(n); + return ( + '[object Error]' == t || + '[object DOMException]' == t || + (typeof n.message == 'string' && typeof n.name == 'string' && !xu(n)) + ); + } + function _u(n) { + return ( + !!du(n) && + ((n = Ot(n)), + '[object Function]' == n || + '[object GeneratorFunction]' == n || + '[object AsyncFunction]' == n || + '[object Proxy]' == n) + ); + } + function vu(n) { + return typeof n == 'number' && n == Eu(n); + } + function gu(n) { + return typeof n == 'number' && -1 < n && 0 == n % 1 && 9007199254740991 >= n; + } + function du(n) { + var t = typeof n; + return null != n && ('object' == t || 'function' == t); + } + function yu(n) { + return null != n && typeof n == 'object'; + } + function bu(n) { + return typeof n == 'number' || (yu(n) && '[object Number]' == Ot(n)); + } + function xu(n) { + return ( + !(!yu(n) || '[object Object]' != Ot(n)) && + ((n = di(n)), + null === n || + ((n = oi.call(n, 'constructor') && n.constructor), + typeof n == 'function' && n instanceof n && ii.call(n) == li)) + ); + } + function ju(n) { + return typeof n == 'string' || (!ff(n) && yu(n) && '[object String]' == Ot(n)); + } + function wu(n) { + return typeof n == 'symbol' || (yu(n) && '[object Symbol]' == Ot(n)); + } + function mu(n) { + if (!n) return []; + if (su(n)) return ju(n) ? M(n) : Ur(n); + if (wi && n[wi]) { + n = n[wi](); + for (var t, r = []; !(t = n.next()).done; ) r.push(t.value); + return r; + } + return (t = vo(n)), ('[object Map]' == t ? W : '[object Set]' == t ? U : Uu)(n); + } + function Au(n) { + return n + ? ((n = Su(n)), + n === $ || n === -$ ? 1.7976931348623157e308 * (0 > n ? -1 : 1) : n === n ? n : 0) + : 0 === n + ? n + : 0; + } + function Eu(n) { + n = Au(n); + var t = n % 1; + return n === n ? (t ? n - t : n) : 0; + } + function ku(n) { + return n ? pt(Eu(n), 0, 4294967295) : 0; + } + function Su(n) { + if (typeof n == 'number') return n; + if (wu(n)) return F; + if ( + (du(n) && + ((n = typeof n.valueOf == 'function' ? n.valueOf() : n), (n = du(n) ? n + '' : n)), + typeof n != 'string') + ) + return 0 === n ? n : +n; + n = n.replace(un, ''); + var t = gn.test(n); + return t || yn.test(n) ? Dn(n.slice(2), t ? 2 : 8) : vn.test(n) ? F : +n; + } + function Ou(n) { + return Cr(n, Bu(n)); + } + function Iu(n) { + return null == n ? '' : yr(n); + } + function Ru(n, t, r) { + return (n = null == n ? T : kt(n, t)), n === T ? r : n; + } + function zu(n, t) { + return null != n && we(n, t, zt); + } + function Wu(n) { + return su(n) ? qn(n) : Vt(n); + } + function Bu(n) { + if (su(n)) n = qn(n, true); + else if (du(n)) { + var t, + r = ze(n), + e = []; + for (t in n) ('constructor' != t || (!r && oi.call(n, t))) && e.push(t); + n = e; + } else { + if (((t = []), null != n)) for (r in Qu(n)) t.push(r); + n = t; + } + return n; + } + function Lu(n, t) { + if (null == n) return {}; + var r = c(ve(n), function (n) { + return [n]; + }); + return ( + (t = ye(t)), + tr(n, r, function (n, r) { + return t(n, r[0]); + }) + ); + } + function Uu(n) { + return null == n ? [] : S(n, Wu(n)); + } + function Cu(n) { + return $f(Iu(n).toLowerCase()); + } + function Du(n) { + return (n = Iu(n)) && n.replace(xn, Xn).replace(Sn, ''); + } + function Mu(n, t, r) { + return ( + (n = Iu(n)), + (t = r ? T : t), + t === T ? (zn.test(n) ? n.match(In) || [] : n.match(sn) || []) : n.match(t) || [] + ); + } + function Tu(n) { + return function () { + return n; + }; + } + function $u(n) { + return n; + } + function Fu(n) { + return qt(typeof n == 'function' ? n : _t(n, 1)); + } + function Nu(n, t, e) { + var u = Wu(t), + i = Et(t, u); + null != e || + (du(t) && (i.length || !u.length)) || + ((e = t), (t = n), (n = this), (i = Et(t, Wu(t)))); + var o = !(du(e) && 'chain' in e && !e.chain), + f = _u(n); + return ( + r(i, function (r) { + var e = t[r]; + (n[r] = e), + f && + (n.prototype[r] = function () { + var t = this.__chain__; + if (o || t) { + var r = n(this.__wrapped__); + return ( + (r.__actions__ = Ur(this.__actions__)).push({ + func: e, + args: arguments, + thisArg: n, + }), + (r.__chain__ = t), + r + ); + } + return e.apply(n, a([this.value()], arguments)); + }); + }), + n + ); + } + function Pu() {} + function Zu(n) { + return Ie(n) ? b(Me(n)) : rr(n); + } + function qu() { + return []; + } + function Vu() { + return false; + } + mn = null == mn ? $n : rt.defaults($n.Object(), mn, rt.pick($n, Wn)); + var Ku = mn.Array, + Gu = mn.Date, + Hu = mn.Error, + Ju = mn.Function, + Yu = mn.Math, + Qu = mn.Object, + Xu = mn.RegExp, + ni = mn.String, + ti = mn.TypeError, + ri = Ku.prototype, + ei = Qu.prototype, + ui = mn['__core-js_shared__'], + ii = Ju.prototype.toString, + oi = ei.hasOwnProperty, + fi = 0, + ci = (function () { + var n = /[^.]+$/.exec((ui && ui.keys && ui.keys.IE_PROTO) || ''); + return n ? 'Symbol(src)_1.' + n : ''; + })(), + ai = ei.toString, + li = ii.call(Qu), + si = $n._, + hi = Xu( + '^' + + ii + .call(oi) + .replace(rn, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + + '$', + ), + pi = Pn ? mn.Buffer : T, + _i = mn.Symbol, + vi = mn.Uint8Array, + gi = pi ? pi.g : T, + di = B(Qu.getPrototypeOf, Qu), + yi = Qu.create, + bi = ei.propertyIsEnumerable, + xi = ri.splice, + ji = _i ? _i.isConcatSpreadable : T, + wi = _i ? _i.iterator : T, + mi = _i ? _i.toStringTag : T, + Ai = (function () { + try { + var n = je(Qu, 'defineProperty'); + return n({}, '', {}), n; + } catch (n) {} + })(), + Ei = mn.clearTimeout !== $n.clearTimeout && mn.clearTimeout, + ki = Gu && Gu.now !== $n.Date.now && Gu.now, + Si = mn.setTimeout !== $n.setTimeout && mn.setTimeout, + Oi = Yu.ceil, + Ii = Yu.floor, + Ri = Qu.getOwnPropertySymbols, + zi = pi ? pi.isBuffer : T, + Wi = mn.isFinite, + Bi = ri.join, + Li = B(Qu.keys, Qu), + Ui = Yu.max, + Ci = Yu.min, + Di = Gu.now, + Mi = mn.parseInt, + Ti = Yu.random, + $i = ri.reverse, + Fi = je(mn, 'DataView'), + Ni = je(mn, 'Map'), + Pi = je(mn, 'Promise'), + Zi = je(mn, 'Set'), + qi = je(mn, 'WeakMap'), + Vi = je(Qu, 'create'), + Ki = qi && new qi(), + Gi = {}, + Hi = Te(Fi), + Ji = Te(Ni), + Yi = Te(Pi), + Qi = Te(Zi), + Xi = Te(qi), + no = _i ? _i.prototype : T, + to = no ? no.valueOf : T, + ro = no ? no.toString : T, + eo = (function () { + function n() {} + return function (t) { + return du(t) + ? yi + ? yi(t) + : ((n.prototype = t), (t = new n()), (n.prototype = T), t) + : {}; + }; + })(); + (An.templateSettings = { + escape: J, + evaluate: Y, + interpolate: Q, + variable: '', + imports: { _: An }, + }), + (An.prototype = En.prototype), + (An.prototype.constructor = An), + (On.prototype = eo(En.prototype)), + (On.prototype.constructor = On), + (Un.prototype = eo(En.prototype)), + (Un.prototype.constructor = Un), + (Mn.prototype.clear = function () { + (this.__data__ = Vi ? Vi(null) : {}), (this.size = 0); + }), + (Mn.prototype.delete = function (n) { + return (n = this.has(n) && delete this.__data__[n]), (this.size -= n ? 1 : 0), n; + }), + (Mn.prototype.get = function (n) { + var t = this.__data__; + return Vi + ? ((n = t[n]), '__lodash_hash_undefined__' === n ? T : n) + : oi.call(t, n) + ? t[n] + : T; + }), + (Mn.prototype.has = function (n) { + var t = this.__data__; + return Vi ? t[n] !== T : oi.call(t, n); + }), + (Mn.prototype.set = function (n, t) { + var r = this.__data__; + return ( + (this.size += this.has(n) ? 0 : 1), + (r[n] = Vi && t === T ? '__lodash_hash_undefined__' : t), + this + ); + }), + (Tn.prototype.clear = function () { + (this.__data__ = []), (this.size = 0); + }), + (Tn.prototype.delete = function (n) { + var t = this.__data__; + return ( + (n = ft(t, n)), + !(0 > n) && (n == t.length - 1 ? t.pop() : xi.call(t, n, 1), --this.size, true) + ); + }), + (Tn.prototype.get = function (n) { + var t = this.__data__; + return (n = ft(t, n)), 0 > n ? T : t[n][1]; + }), + (Tn.prototype.has = function (n) { + return -1 < ft(this.__data__, n); + }), + (Tn.prototype.set = function (n, t) { + var r = this.__data__, + e = ft(r, n); + return 0 > e ? (++this.size, r.push([n, t])) : (r[e][1] = t), this; + }), + (Fn.prototype.clear = function () { + (this.size = 0), + (this.__data__ = { hash: new Mn(), map: new (Ni || Tn)(), string: new Mn() }); + }), + (Fn.prototype.delete = function (n) { + return (n = be(this, n).delete(n)), (this.size -= n ? 1 : 0), n; + }), + (Fn.prototype.get = function (n) { + return be(this, n).get(n); + }), + (Fn.prototype.has = function (n) { + return be(this, n).has(n); + }), + (Fn.prototype.set = function (n, t) { + var r = be(this, n), + e = r.size; + return r.set(n, t), (this.size += r.size == e ? 0 : 1), this; + }), + (Nn.prototype.add = Nn.prototype.push = + function (n) { + return this.__data__.set(n, '__lodash_hash_undefined__'), this; + }), + (Nn.prototype.has = function (n) { + return this.__data__.has(n); + }), + (Zn.prototype.clear = function () { + (this.__data__ = new Tn()), (this.size = 0); + }), + (Zn.prototype.delete = function (n) { + var t = this.__data__; + return (n = t.delete(n)), (this.size = t.size), n; + }), + (Zn.prototype.get = function (n) { + return this.__data__.get(n); + }), + (Zn.prototype.has = function (n) { + return this.__data__.has(n); + }), + (Zn.prototype.set = function (n, t) { + var r = this.__data__; + if (r instanceof Tn) { + var e = r.__data__; + if (!Ni || 199 > e.length) return e.push([n, t]), (this.size = ++r.size), this; + r = this.__data__ = new Fn(e); + } + return r.set(n, t), (this.size = r.size), this; + }); + var uo = Fr(mt), + io = Fr(At, true), + oo = Nr(), + fo = Nr(true), + co = Ki + ? function (n, t) { + return Ki.set(n, t), n; + } + : $u, + ao = Ai + ? function (n, t) { + return Ai(n, 'toString', { + configurable: true, + enumerable: false, + value: Tu(t), + writable: true, + }); + } + : $u, + lo = + Ei || + function (n) { + return $n.clearTimeout(n); + }, + so = + Zi && 1 / U(new Zi([, -0]))[1] == $ + ? function (n) { + return new Zi(n); + } + : Pu, + ho = Ki + ? function (n) { + return Ki.get(n); + } + : Pu, + po = Ri + ? function (n) { + return null == n + ? [] + : ((n = Qu(n)), + i(Ri(n), function (t) { + return bi.call(n, t); + })); + } + : qu, + _o = Ri + ? function (n) { + for (var t = []; n; ) a(t, po(n)), (n = di(n)); + return t; + } + : qu, + vo = Ot; + ((Fi && '[object DataView]' != vo(new Fi(new ArrayBuffer(1)))) || + (Ni && '[object Map]' != vo(new Ni())) || + (Pi && '[object Promise]' != vo(Pi.resolve())) || + (Zi && '[object Set]' != vo(new Zi())) || + (qi && '[object WeakMap]' != vo(new qi()))) && + (vo = function (n) { + var t = Ot(n); + if ((n = (n = '[object Object]' == t ? n.constructor : T) ? Te(n) : '')) + switch (n) { + case Hi: + return '[object DataView]'; + case Ji: + return '[object Map]'; + case Yi: + return '[object Promise]'; + case Qi: + return '[object Set]'; + case Xi: + return '[object WeakMap]'; + } + return t; + }); + var go = ui ? _u : Vu, + yo = Ce(co), + bo = + Si || + function (n, t) { + return $n.setTimeout(n, t); + }, + xo = Ce(ao), + jo = (function (n) { + n = cu(n, function (n) { + return 500 === t.size && t.clear(), n; + }); + var t = n.cache; + return n; + })(function (n) { + var t = []; + return ( + 46 === n.charCodeAt(0) && t.push(''), + n.replace(tn, function (n, r, e, u) { + t.push(e ? u.replace(hn, '$1') : r || n); + }), + t + ); + }), + wo = fr(function (n, t) { + return hu(n) ? yt(n, wt(t, 1, hu, true)) : []; + }), + mo = fr(function (n, t) { + var r = Ve(t); + return hu(r) && (r = T), hu(n) ? yt(n, wt(t, 1, hu, true), ye(r, 2)) : []; + }), + Ao = fr(function (n, t) { + var r = Ve(t); + return hu(r) && (r = T), hu(n) ? yt(n, wt(t, 1, hu, true), T, r) : []; + }), + Eo = fr(function (n) { + var t = c(n, Er); + return t.length && t[0] === n[0] ? Wt(t) : []; + }), + ko = fr(function (n) { + var t = Ve(n), + r = c(n, Er); + return t === Ve(r) ? (t = T) : r.pop(), r.length && r[0] === n[0] ? Wt(r, ye(t, 2)) : []; + }), + So = fr(function (n) { + var t = Ve(n), + r = c(n, Er); + return ( + (t = typeof t == 'function' ? t : T) && r.pop(), + r.length && r[0] === n[0] ? Wt(r, T, t) : [] + ); + }), + Oo = fr(Ke), + Io = pe(function (n, t) { + var r = null == n ? 0 : n.length, + e = ht(n, t); + return ( + ur( + n, + c(t, function (n) { + return Se(n, r) ? +n : n; + }).sort(Wr), + ), + e + ); + }), + Ro = fr(function (n) { + return br(wt(n, 1, hu, true)); + }), + zo = fr(function (n) { + var t = Ve(n); + return hu(t) && (t = T), br(wt(n, 1, hu, true), ye(t, 2)); + }), + Wo = fr(function (n) { + var t = Ve(n), + t = typeof t == 'function' ? t : T; + return br(wt(n, 1, hu, true), T, t); + }), + Bo = fr(function (n, t) { + return hu(n) ? yt(n, t) : []; + }), + Lo = fr(function (n) { + return mr(i(n, hu)); + }), + Uo = fr(function (n) { + var t = Ve(n); + return hu(t) && (t = T), mr(i(n, hu), ye(t, 2)); + }), + Co = fr(function (n) { + var t = Ve(n), + t = typeof t == 'function' ? t : T; + return mr(i(n, hu), T, t); + }), + Do = fr(He), + Mo = fr(function (n) { + var t = n.length, + t = 1 < t ? n[t - 1] : T, + t = typeof t == 'function' ? (n.pop(), t) : T; + return Je(n, t); + }), + To = pe(function (n) { + function t(t) { + return ht(t, n); + } + var r = n.length, + e = r ? n[0] : 0, + u = this.__wrapped__; + return !(1 < r || this.__actions__.length) && u instanceof Un && Se(e) + ? ((u = u.slice(e, +e + (r ? 1 : 0))), + u.__actions__.push({ func: Qe, args: [t], thisArg: T }), + new On(u, this.__chain__).thru(function (n) { + return r && !n.length && n.push(T), n; + })) + : this.thru(t); + }), + $o = Tr(function (n, t, r) { + oi.call(n, r) ? ++n[r] : st(n, r, 1); + }), + Fo = Gr(Ne), + No = Gr(Pe), + Po = Tr(function (n, t, r) { + oi.call(n, r) ? n[r].push(t) : st(n, r, [t]); + }), + Zo = fr(function (t, r, e) { + var u = -1, + i = typeof r == 'function', + o = su(t) ? Ku(t.length) : []; + return ( + uo(t, function (t) { + o[++u] = i ? n(r, t, e) : Lt(t, r, e); + }), + o + ); + }), + qo = Tr(function (n, t, r) { + st(n, r, t); + }), + Vo = Tr( + function (n, t, r) { + n[r ? 0 : 1].push(t); + }, + function () { + return [[], []]; + }, + ), + Ko = fr(function (n, t) { + if (null == n) return []; + var r = t.length; + return ( + 1 < r && Oe(n, t[0], t[1]) ? (t = []) : 2 < r && Oe(t[0], t[1], t[2]) && (t = [t[0]]), + Xt(n, wt(t, 1), []) + ); + }), + Go = + ki || + function () { + return $n.Date.now(); + }, + Ho = fr(function (n, t, r) { + var e = 1; + if (r.length) + var u = L(r, de(Ho)), + e = 32 | e; + return fe(n, e, t, r, u); + }), + Jo = fr(function (n, t, r) { + var e = 3; + if (r.length) + var u = L(r, de(Jo)), + e = 32 | e; + return fe(t, e, n, r, u); + }), + Yo = fr(function (n, t) { + return dt(n, 1, t); + }), + Qo = fr(function (n, t, r) { + return dt(n, Su(t) || 0, r); + }); + cu.Cache = Fn; + var Xo = fr(function (t, r) { + r = 1 == r.length && ff(r[0]) ? c(r[0], k(ye())) : c(wt(r, 1), k(ye())); + var e = r.length; + return fr(function (u) { + for (var i = -1, o = Ci(u.length, e); ++i < o; ) u[i] = r[i].call(this, u[i]); + return n(t, this, u); + }); + }), + nf = fr(function (n, t) { + return fe(n, 32, T, t, L(t, de(nf))); + }), + tf = fr(function (n, t) { + return fe(n, 64, T, t, L(t, de(tf))); + }), + rf = pe(function (n, t) { + return fe(n, 256, T, T, T, t); + }), + ef = ee(It), + uf = ee(function (n, t) { + return n >= t; + }), + of = Ut( + (function () { + return arguments; + })(), + ) + ? Ut + : function (n) { + return yu(n) && oi.call(n, 'callee') && !bi.call(n, 'callee'); + }, + ff = Ku.isArray, + cf = Vn ? k(Vn) : Ct, + af = zi || Vu, + lf = Kn ? k(Kn) : Dt, + sf = Gn ? k(Gn) : Tt, + hf = Hn ? k(Hn) : Nt, + pf = Jn ? k(Jn) : Pt, + _f = Yn ? k(Yn) : Zt, + vf = ee(Kt), + gf = ee(function (n, t) { + return n <= t; + }), + df = $r(function (n, t) { + if (ze(t) || su(t)) Cr(t, Wu(t), n); + else for (var r in t) oi.call(t, r) && ot(n, r, t[r]); + }), + yf = $r(function (n, t) { + Cr(t, Bu(t), n); + }), + bf = $r(function (n, t, r, e) { + Cr(t, Bu(t), n, e); + }), + xf = $r(function (n, t, r, e) { + Cr(t, Wu(t), n, e); + }), + jf = pe(ht), + wf = fr(function (n, t) { + n = Qu(n); + var r = -1, + e = t.length, + u = 2 < e ? t[2] : T; + for (u && Oe(t[0], t[1], u) && (e = 1); ++r < e; ) + for (var u = t[r], i = Bu(u), o = -1, f = i.length; ++o < f; ) { + var c = i[o], + a = n[c]; + (a === T || (lu(a, ei[c]) && !oi.call(n, c))) && (n[c] = u[c]); + } + return n; + }), + mf = fr(function (t) { + return t.push(T, ae), n(Of, T, t); + }), + Af = Yr(function (n, t, r) { + null != t && typeof t.toString != 'function' && (t = ai.call(t)), (n[t] = r); + }, Tu($u)), + Ef = Yr(function (n, t, r) { + null != t && typeof t.toString != 'function' && (t = ai.call(t)), + oi.call(n, t) ? n[t].push(r) : (n[t] = [r]); + }, ye), + kf = fr(Lt), + Sf = $r(function (n, t, r) { + Yt(n, t, r); + }), + Of = $r(function (n, t, r, e) { + Yt(n, t, r, e); + }), + If = pe(function (n, t) { + var r = {}; + if (null == n) return r; + var e = false; + (t = c(t, function (t) { + return (t = Sr(t, n)), e || (e = 1 < t.length), t; + })), + Cr(n, ve(n), r), + e && (r = _t(r, 7, le)); + for (var u = t.length; u--; ) xr(r, t[u]); + return r; + }), + Rf = pe(function (n, t) { + return null == n ? {} : nr(n, t); + }), + zf = oe(Wu), + Wf = oe(Bu), + Bf = qr(function (n, t, r) { + return (t = t.toLowerCase()), n + (r ? Cu(t) : t); + }), + Lf = qr(function (n, t, r) { + return n + (r ? '-' : '') + t.toLowerCase(); + }), + Uf = qr(function (n, t, r) { + return n + (r ? ' ' : '') + t.toLowerCase(); + }), + Cf = Zr('toLowerCase'), + Df = qr(function (n, t, r) { + return n + (r ? '_' : '') + t.toLowerCase(); + }), + Mf = qr(function (n, t, r) { + return n + (r ? ' ' : '') + $f(t); + }), + Tf = qr(function (n, t, r) { + return n + (r ? ' ' : '') + t.toUpperCase(); + }), + $f = Zr('toUpperCase'), + Ff = fr(function (t, r) { + try { + return n(t, T, r); + } catch (n) { + return pu(n) ? n : new Hu(n); + } + }), + Nf = pe(function (n, t) { + return ( + r(t, function (t) { + (t = Me(t)), st(n, t, Ho(n[t], n)); + }), + n + ); + }), + Pf = Hr(), + Zf = Hr(true), + qf = fr(function (n, t) { + return function (r) { + return Lt(r, n, t); + }; + }), + Vf = fr(function (n, t) { + return function (r) { + return Lt(n, r, t); + }; + }), + Kf = Xr(c), + Gf = Xr(u), + Hf = Xr(h), + Jf = re(), + Yf = re(true), + Qf = Qr(function (n, t) { + return n + t; + }, 0), + Xf = ie('ceil'), + nc = Qr(function (n, t) { + return n / t; + }, 1), + tc = ie('floor'), + rc = Qr(function (n, t) { + return n * t; + }, 1), + ec = ie('round'), + uc = Qr(function (n, t) { + return n - t; + }, 0); + return ( + (An.after = function (n, t) { + if (typeof t != 'function') throw new ti('Expected a function'); + return ( + (n = Eu(n)), + function () { + if (1 > --n) return t.apply(this, arguments); + } + ); + }), + (An.ary = eu), + (An.assign = df), + (An.assignIn = yf), + (An.assignInWith = bf), + (An.assignWith = xf), + (An.at = jf), + (An.before = uu), + (An.bind = Ho), + (An.bindAll = Nf), + (An.bindKey = Jo), + (An.castArray = function () { + if (!arguments.length) return []; + var n = arguments[0]; + return ff(n) ? n : [n]; + }), + (An.chain = Ye), + (An.chunk = function (n, t, r) { + if ( + ((t = (r ? Oe(n, t, r) : t === T) ? 1 : Ui(Eu(t), 0)), + (r = null == n ? 0 : n.length), + !r || 1 > t) + ) + return []; + for (var e = 0, u = 0, i = Ku(Oi(r / t)); e < r; ) i[u++] = hr(n, e, (e += t)); + return i; + }), + (An.compact = function (n) { + for (var t = -1, r = null == n ? 0 : n.length, e = 0, u = []; ++t < r; ) { + var i = n[t]; + i && (u[e++] = i); + } + return u; + }), + (An.concat = function () { + var n = arguments.length; + if (!n) return []; + for (var t = Ku(n - 1), r = arguments[0]; n--; ) t[n - 1] = arguments[n]; + return a(ff(r) ? Ur(r) : [r], wt(t, 1)); + }), + (An.cond = function (t) { + var r = null == t ? 0 : t.length, + e = ye(); + return ( + (t = r + ? c(t, function (n) { + if ('function' != typeof n[1]) throw new ti('Expected a function'); + return [e(n[0]), n[1]]; + }) + : []), + fr(function (e) { + for (var u = -1; ++u < r; ) { + var i = t[u]; + if (n(i[0], this, e)) return n(i[1], this, e); + } + }) + ); + }), + (An.conforms = function (n) { + return vt(_t(n, 1)); + }), + (An.constant = Tu), + (An.countBy = $o), + (An.create = function (n, t) { + var r = eo(n); + return null == t ? r : at(r, t); + }), + (An.curry = iu), + (An.curryRight = ou), + (An.debounce = fu), + (An.defaults = wf), + (An.defaultsDeep = mf), + (An.defer = Yo), + (An.delay = Qo), + (An.difference = wo), + (An.differenceBy = mo), + (An.differenceWith = Ao), + (An.drop = function (n, t, r) { + var e = null == n ? 0 : n.length; + return e ? ((t = r || t === T ? 1 : Eu(t)), hr(n, 0 > t ? 0 : t, e)) : []; + }), + (An.dropRight = function (n, t, r) { + var e = null == n ? 0 : n.length; + return e ? ((t = r || t === T ? 1 : Eu(t)), (t = e - t), hr(n, 0, 0 > t ? 0 : t)) : []; + }), + (An.dropRightWhile = function (n, t) { + return n && n.length ? jr(n, ye(t, 3), true, true) : []; + }), + (An.dropWhile = function (n, t) { + return n && n.length ? jr(n, ye(t, 3), true) : []; + }), + (An.fill = function (n, t, r, e) { + var u = null == n ? 0 : n.length; + if (!u) return []; + for ( + r && typeof r != 'number' && Oe(n, t, r) && ((r = 0), (e = u)), + u = n.length, + r = Eu(r), + 0 > r && (r = -r > u ? 0 : u + r), + e = e === T || e > u ? u : Eu(e), + 0 > e && (e += u), + e = r > e ? 0 : ku(e); + r < e; + + ) + n[r++] = t; + return n; + }), + (An.filter = function (n, t) { + return (ff(n) ? i : jt)(n, ye(t, 3)); + }), + (An.flatMap = function (n, t) { + return wt(ru(n, t), 1); + }), + (An.flatMapDeep = function (n, t) { + return wt(ru(n, t), $); + }), + (An.flatMapDepth = function (n, t, r) { + return (r = r === T ? 1 : Eu(r)), wt(ru(n, t), r); + }), + (An.flatten = Ze), + (An.flattenDeep = function (n) { + return (null == n ? 0 : n.length) ? wt(n, $) : []; + }), + (An.flattenDepth = function (n, t) { + return null != n && n.length ? ((t = t === T ? 1 : Eu(t)), wt(n, t)) : []; + }), + (An.flip = function (n) { + return fe(n, 512); + }), + (An.flow = Pf), + (An.flowRight = Zf), + (An.fromPairs = function (n) { + for (var t = -1, r = null == n ? 0 : n.length, e = {}; ++t < r; ) { + var u = n[t]; + e[u[0]] = u[1]; + } + return e; + }), + (An.functions = function (n) { + return null == n ? [] : Et(n, Wu(n)); + }), + (An.functionsIn = function (n) { + return null == n ? [] : Et(n, Bu(n)); + }), + (An.groupBy = Po), + (An.initial = function (n) { + return (null == n ? 0 : n.length) ? hr(n, 0, -1) : []; + }), + (An.intersection = Eo), + (An.intersectionBy = ko), + (An.intersectionWith = So), + (An.invert = Af), + (An.invertBy = Ef), + (An.invokeMap = Zo), + (An.iteratee = Fu), + (An.keyBy = qo), + (An.keys = Wu), + (An.keysIn = Bu), + (An.map = ru), + (An.mapKeys = function (n, t) { + var r = {}; + return ( + (t = ye(t, 3)), + mt(n, function (n, e, u) { + st(r, t(n, e, u), n); + }), + r + ); + }), + (An.mapValues = function (n, t) { + var r = {}; + return ( + (t = ye(t, 3)), + mt(n, function (n, e, u) { + st(r, e, t(n, e, u)); + }), + r + ); + }), + (An.matches = function (n) { + return Ht(_t(n, 1)); + }), + (An.matchesProperty = function (n, t) { + return Jt(n, _t(t, 1)); + }), + (An.memoize = cu), + (An.merge = Sf), + (An.mergeWith = Of), + (An.method = qf), + (An.methodOf = Vf), + (An.mixin = Nu), + (An.negate = au), + (An.nthArg = function (n) { + return ( + (n = Eu(n)), + fr(function (t) { + return Qt(t, n); + }) + ); + }), + (An.omit = If), + (An.omitBy = function (n, t) { + return Lu(n, au(ye(t))); + }), + (An.once = function (n) { + return uu(2, n); + }), + (An.orderBy = function (n, t, r, e) { + return null == n + ? [] + : (ff(t) || (t = null == t ? [] : [t]), + (r = e ? T : r), + ff(r) || (r = null == r ? [] : [r]), + Xt(n, t, r)); + }), + (An.over = Kf), + (An.overArgs = Xo), + (An.overEvery = Gf), + (An.overSome = Hf), + (An.partial = nf), + (An.partialRight = tf), + (An.partition = Vo), + (An.pick = Rf), + (An.pickBy = Lu), + (An.property = Zu), + (An.propertyOf = function (n) { + return function (t) { + return null == n ? T : kt(n, t); + }; + }), + (An.pull = Oo), + (An.pullAll = Ke), + (An.pullAllBy = function (n, t, r) { + return n && n.length && t && t.length ? er(n, t, ye(r, 2)) : n; + }), + (An.pullAllWith = function (n, t, r) { + return n && n.length && t && t.length ? er(n, t, T, r) : n; + }), + (An.pullAt = Io), + (An.range = Jf), + (An.rangeRight = Yf), + (An.rearg = rf), + (An.reject = function (n, t) { + return (ff(n) ? i : jt)(n, au(ye(t, 3))); + }), + (An.remove = function (n, t) { + var r = []; + if (!n || !n.length) return r; + var e = -1, + u = [], + i = n.length; + for (t = ye(t, 3); ++e < i; ) { + var o = n[e]; + t(o, e, n) && (r.push(o), u.push(e)); + } + return ur(n, u), r; + }), + (An.rest = function (n, t) { + if (typeof n != 'function') throw new ti('Expected a function'); + return (t = t === T ? t : Eu(t)), fr(n, t); + }), + (An.reverse = Ge), + (An.sampleSize = function (n, t, r) { + return (t = (r ? Oe(n, t, r) : t === T) ? 1 : Eu(t)), (ff(n) ? et : ar)(n, t); + }), + (An.set = function (n, t, r) { + return null == n ? n : lr(n, t, r); + }), + (An.setWith = function (n, t, r, e) { + return (e = typeof e == 'function' ? e : T), null == n ? n : lr(n, t, r, e); + }), + (An.shuffle = function (n) { + return (ff(n) ? ut : sr)(n); + }), + (An.slice = function (n, t, r) { + var e = null == n ? 0 : n.length; + return e + ? (r && typeof r != 'number' && Oe(n, t, r) + ? ((t = 0), (r = e)) + : ((t = null == t ? 0 : Eu(t)), (r = r === T ? e : Eu(r))), + hr(n, t, r)) + : []; + }), + (An.sortBy = Ko), + (An.sortedUniq = function (n) { + return n && n.length ? gr(n) : []; + }), + (An.sortedUniqBy = function (n, t) { + return n && n.length ? gr(n, ye(t, 2)) : []; + }), + (An.split = function (n, t, r) { + return ( + r && typeof r != 'number' && Oe(n, t, r) && (t = r = T), + (r = r === T ? 4294967295 : r >>> 0), + r + ? (n = Iu(n)) && + (typeof t == 'string' || (null != t && !hf(t))) && + ((t = yr(t)), !t && Rn.test(n)) + ? Or(M(n), 0, r) + : n.split(t, r) + : [] + ); + }), + (An.spread = function (t, r) { + if (typeof t != 'function') throw new ti('Expected a function'); + return ( + (r = null == r ? 0 : Ui(Eu(r), 0)), + fr(function (e) { + var u = e[r]; + return (e = Or(e, 0, r)), u && a(e, u), n(t, this, e); + }) + ); + }), + (An.tail = function (n) { + var t = null == n ? 0 : n.length; + return t ? hr(n, 1, t) : []; + }), + (An.take = function (n, t, r) { + return n && n.length ? ((t = r || t === T ? 1 : Eu(t)), hr(n, 0, 0 > t ? 0 : t)) : []; + }), + (An.takeRight = function (n, t, r) { + var e = null == n ? 0 : n.length; + return e ? ((t = r || t === T ? 1 : Eu(t)), (t = e - t), hr(n, 0 > t ? 0 : t, e)) : []; + }), + (An.takeRightWhile = function (n, t) { + return n && n.length ? jr(n, ye(t, 3), false, true) : []; + }), + (An.takeWhile = function (n, t) { + return n && n.length ? jr(n, ye(t, 3)) : []; + }), + (An.tap = function (n, t) { + return t(n), n; + }), + (An.throttle = function (n, t, r) { + var e = true, + u = true; + if (typeof n != 'function') throw new ti('Expected a function'); + return ( + du(r) && + ((e = 'leading' in r ? !!r.leading : e), (u = 'trailing' in r ? !!r.trailing : u)), + fu(n, t, { leading: e, maxWait: t, trailing: u }) + ); + }), + (An.thru = Qe), + (An.toArray = mu), + (An.toPairs = zf), + (An.toPairsIn = Wf), + (An.toPath = function (n) { + return ff(n) ? c(n, Me) : wu(n) ? [n] : Ur(jo(Iu(n))); + }), + (An.toPlainObject = Ou), + (An.transform = function (n, t, e) { + var u = ff(n), + i = u || af(n) || _f(n); + if (((t = ye(t, 4)), null == e)) { + var o = n && n.constructor; + e = i ? (u ? new o() : []) : du(n) && _u(o) ? eo(di(n)) : {}; + } + return ( + (i ? r : mt)(n, function (n, r, u) { + return t(e, n, r, u); + }), + e + ); + }), + (An.unary = function (n) { + return eu(n, 1); + }), + (An.union = Ro), + (An.unionBy = zo), + (An.unionWith = Wo), + (An.uniq = function (n) { + return n && n.length ? br(n) : []; + }), + (An.uniqBy = function (n, t) { + return n && n.length ? br(n, ye(t, 2)) : []; + }), + (An.uniqWith = function (n, t) { + return (t = typeof t == 'function' ? t : T), n && n.length ? br(n, T, t) : []; + }), + (An.unset = function (n, t) { + return null == n || xr(n, t); + }), + (An.unzip = He), + (An.unzipWith = Je), + (An.update = function (n, t, r) { + return null == n ? n : lr(n, t, kr(r)(kt(n, t)), void 0); + }), + (An.updateWith = function (n, t, r, e) { + return ( + (e = typeof e == 'function' ? e : T), null != n && (n = lr(n, t, kr(r)(kt(n, t)), e)), n + ); + }), + (An.values = Uu), + (An.valuesIn = function (n) { + return null == n ? [] : S(n, Bu(n)); + }), + (An.without = Bo), + (An.words = Mu), + (An.wrap = function (n, t) { + return nf(kr(t), n); + }), + (An.xor = Lo), + (An.xorBy = Uo), + (An.xorWith = Co), + (An.zip = Do), + (An.zipObject = function (n, t) { + return Ar(n || [], t || [], ot); + }), + (An.zipObjectDeep = function (n, t) { + return Ar(n || [], t || [], lr); + }), + (An.zipWith = Mo), + (An.entries = zf), + (An.entriesIn = Wf), + (An.extend = yf), + (An.extendWith = bf), + Nu(An, An), + (An.add = Qf), + (An.attempt = Ff), + (An.camelCase = Bf), + (An.capitalize = Cu), + (An.ceil = Xf), + (An.clamp = function (n, t, r) { + return ( + r === T && ((r = t), (t = T)), + r !== T && ((r = Su(r)), (r = r === r ? r : 0)), + t !== T && ((t = Su(t)), (t = t === t ? t : 0)), + pt(Su(n), t, r) + ); + }), + (An.clone = function (n) { + return _t(n, 4); + }), + (An.cloneDeep = function (n) { + return _t(n, 5); + }), + (An.cloneDeepWith = function (n, t) { + return (t = typeof t == 'function' ? t : T), _t(n, 5, t); + }), + (An.cloneWith = function (n, t) { + return (t = typeof t == 'function' ? t : T), _t(n, 4, t); + }), + (An.conformsTo = function (n, t) { + return null == t || gt(n, t, Wu(t)); + }), + (An.deburr = Du), + (An.defaultTo = function (n, t) { + return null == n || n !== n ? t : n; + }), + (An.divide = nc), + (An.endsWith = function (n, t, r) { + (n = Iu(n)), (t = yr(t)); + var e = n.length, + e = (r = r === T ? e : pt(Eu(r), 0, e)); + return (r -= t.length), 0 <= r && n.slice(r, e) == t; + }), + (An.eq = lu), + (An.escape = function (n) { + return (n = Iu(n)) && H.test(n) ? n.replace(K, nt) : n; + }), + (An.escapeRegExp = function (n) { + return (n = Iu(n)) && en.test(n) ? n.replace(rn, '\\$&') : n; + }), + (An.every = function (n, t, r) { + var e = ff(n) ? u : bt; + return r && Oe(n, t, r) && (t = T), e(n, ye(t, 3)); + }), + (An.find = Fo), + (An.findIndex = Ne), + (An.findKey = function (n, t) { + return p(n, ye(t, 3), mt); + }), + (An.findLast = No), + (An.findLastIndex = Pe), + (An.findLastKey = function (n, t) { + return p(n, ye(t, 3), At); + }), + (An.floor = tc), + (An.forEach = nu), + (An.forEachRight = tu), + (An.forIn = function (n, t) { + return null == n ? n : oo(n, ye(t, 3), Bu); + }), + (An.forInRight = function (n, t) { + return null == n ? n : fo(n, ye(t, 3), Bu); + }), + (An.forOwn = function (n, t) { + return n && mt(n, ye(t, 3)); + }), + (An.forOwnRight = function (n, t) { + return n && At(n, ye(t, 3)); + }), + (An.get = Ru), + (An.gt = ef), + (An.gte = uf), + (An.has = function (n, t) { + return null != n && we(n, t, Rt); + }), + (An.hasIn = zu), + (An.head = qe), + (An.identity = $u), + (An.includes = function (n, t, r, e) { + return ( + (n = su(n) ? n : Uu(n)), + (r = r && !e ? Eu(r) : 0), + (e = n.length), + 0 > r && (r = Ui(e + r, 0)), + ju(n) ? r <= e && -1 < n.indexOf(t, r) : !!e && -1 < v(n, t, r) + ); + }), + (An.indexOf = function (n, t, r) { + var e = null == n ? 0 : n.length; + return e ? ((r = null == r ? 0 : Eu(r)), 0 > r && (r = Ui(e + r, 0)), v(n, t, r)) : -1; + }), + (An.inRange = function (n, t, r) { + return ( + (t = Au(t)), + r === T ? ((r = t), (t = 0)) : (r = Au(r)), + (n = Su(n)), + n >= Ci(t, r) && n < Ui(t, r) + ); + }), + (An.invoke = kf), + (An.isArguments = of), + (An.isArray = ff), + (An.isArrayBuffer = cf), + (An.isArrayLike = su), + (An.isArrayLikeObject = hu), + (An.isBoolean = function (n) { + return true === n || false === n || (yu(n) && '[object Boolean]' == Ot(n)); + }), + (An.isBuffer = af), + (An.isDate = lf), + (An.isElement = function (n) { + return yu(n) && 1 === n.nodeType && !xu(n); + }), + (An.isEmpty = function (n) { + if (null == n) return true; + if ( + su(n) && + (ff(n) || + typeof n == 'string' || + typeof n.splice == 'function' || + af(n) || + _f(n) || + of(n)) + ) + return !n.length; + var t = vo(n); + if ('[object Map]' == t || '[object Set]' == t) return !n.size; + if (ze(n)) return !Vt(n).length; + for (var r in n) if (oi.call(n, r)) return false; + return true; + }), + (An.isEqual = function (n, t) { + return Mt(n, t); + }), + (An.isEqualWith = function (n, t, r) { + var e = (r = typeof r == 'function' ? r : T) ? r(n, t) : T; + return e === T ? Mt(n, t, T, r) : !!e; + }), + (An.isError = pu), + (An.isFinite = function (n) { + return typeof n == 'number' && Wi(n); + }), + (An.isFunction = _u), + (An.isInteger = vu), + (An.isLength = gu), + (An.isMap = sf), + (An.isMatch = function (n, t) { + return n === t || $t(n, t, xe(t)); + }), + (An.isMatchWith = function (n, t, r) { + return (r = typeof r == 'function' ? r : T), $t(n, t, xe(t), r); + }), + (An.isNaN = function (n) { + return bu(n) && n != +n; + }), + (An.isNative = function (n) { + if (go(n)) throw new Hu('Unsupported core-js use. Try https://npms.io/search?q=ponyfill.'); + return Ft(n); + }), + (An.isNil = function (n) { + return null == n; + }), + (An.isNull = function (n) { + return null === n; + }), + (An.isNumber = bu), + (An.isObject = du), + (An.isObjectLike = yu), + (An.isPlainObject = xu), + (An.isRegExp = hf), + (An.isSafeInteger = function (n) { + return vu(n) && -9007199254740991 <= n && 9007199254740991 >= n; + }), + (An.isSet = pf), + (An.isString = ju), + (An.isSymbol = wu), + (An.isTypedArray = _f), + (An.isUndefined = function (n) { + return n === T; + }), + (An.isWeakMap = function (n) { + return yu(n) && '[object WeakMap]' == vo(n); + }), + (An.isWeakSet = function (n) { + return yu(n) && '[object WeakSet]' == Ot(n); + }), + (An.join = function (n, t) { + return null == n ? '' : Bi.call(n, t); + }), + (An.kebabCase = Lf), + (An.last = Ve), + (An.lastIndexOf = function (n, t, r) { + var e = null == n ? 0 : n.length; + if (!e) return -1; + var u = e; + if ((r !== T && ((u = Eu(r)), (u = 0 > u ? Ui(e + u, 0) : Ci(u, e - 1))), t === t)) { + for (r = u + 1; r-- && n[r] !== t; ); + n = r; + } else n = _(n, d, u, true); + return n; + }), + (An.lowerCase = Uf), + (An.lowerFirst = Cf), + (An.lt = vf), + (An.lte = gf), + (An.max = function (n) { + return n && n.length ? xt(n, $u, It) : T; + }), + (An.maxBy = function (n, t) { + return n && n.length ? xt(n, ye(t, 2), It) : T; + }), + (An.mean = function (n) { + return y(n, $u); + }), + (An.meanBy = function (n, t) { + return y(n, ye(t, 2)); + }), + (An.min = function (n) { + return n && n.length ? xt(n, $u, Kt) : T; + }), + (An.minBy = function (n, t) { + return n && n.length ? xt(n, ye(t, 2), Kt) : T; + }), + (An.stubArray = qu), + (An.stubFalse = Vu), + (An.stubObject = function () { + return {}; + }), + (An.stubString = function () { + return ''; + }), + (An.stubTrue = function () { + return true; + }), + (An.multiply = rc), + (An.nth = function (n, t) { + return n && n.length ? Qt(n, Eu(t)) : T; + }), + (An.noConflict = function () { + return $n._ === this && ($n._ = si), this; + }), + (An.noop = Pu), + (An.now = Go), + (An.pad = function (n, t, r) { + n = Iu(n); + var e = (t = Eu(t)) ? D(n) : 0; + return !t || e >= t ? n : ((t = (t - e) / 2), ne(Ii(t), r) + n + ne(Oi(t), r)); + }), + (An.padEnd = function (n, t, r) { + n = Iu(n); + var e = (t = Eu(t)) ? D(n) : 0; + return t && e < t ? n + ne(t - e, r) : n; + }), + (An.padStart = function (n, t, r) { + n = Iu(n); + var e = (t = Eu(t)) ? D(n) : 0; + return t && e < t ? ne(t - e, r) + n : n; + }), + (An.parseInt = function (n, t, r) { + return r || null == t ? (t = 0) : t && (t = +t), Mi(Iu(n).replace(on, ''), t || 0); + }), + (An.random = function (n, t, r) { + if ( + (r && typeof r != 'boolean' && Oe(n, t, r) && (t = r = T), + r === T && + (typeof t == 'boolean' + ? ((r = t), (t = T)) + : typeof n == 'boolean' && ((r = n), (n = T))), + n === T && t === T + ? ((n = 0), (t = 1)) + : ((n = Au(n)), t === T ? ((t = n), (n = 0)) : (t = Au(t))), + n > t) + ) { + var e = n; + (n = t), (t = e); + } + return r || n % 1 || t % 1 + ? ((r = Ti()), Ci(n + r * (t - n + Cn('1e-' + ((r + '').length - 1))), t)) + : ir(n, t); + }), + (An.reduce = function (n, t, r) { + var e = ff(n) ? l : j, + u = 3 > arguments.length; + return e(n, ye(t, 4), r, u, uo); + }), + (An.reduceRight = function (n, t, r) { + var e = ff(n) ? s : j, + u = 3 > arguments.length; + return e(n, ye(t, 4), r, u, io); + }), + (An.repeat = function (n, t, r) { + return (t = (r ? Oe(n, t, r) : t === T) ? 1 : Eu(t)), or(Iu(n), t); + }), + (An.replace = function () { + var n = arguments, + t = Iu(n[0]); + return 3 > n.length ? t : t.replace(n[1], n[2]); + }), + (An.result = function (n, t, r) { + t = Sr(t, n); + var e = -1, + u = t.length; + for (u || ((u = 1), (n = T)); ++e < u; ) { + var i = null == n ? T : n[Me(t[e])]; + i === T && ((e = u), (i = r)), (n = _u(i) ? i.call(n) : i); + } + return n; + }), + (An.round = ec), + (An.runInContext = x), + (An.sample = function (n) { + return (ff(n) ? Qn : cr)(n); + }), + (An.size = function (n) { + if (null == n) return 0; + if (su(n)) return ju(n) ? D(n) : n.length; + var t = vo(n); + return '[object Map]' == t || '[object Set]' == t ? n.size : Vt(n).length; + }), + (An.snakeCase = Df), + (An.some = function (n, t, r) { + var e = ff(n) ? h : pr; + return r && Oe(n, t, r) && (t = T), e(n, ye(t, 3)); + }), + (An.sortedIndex = function (n, t) { + return _r(n, t); + }), + (An.sortedIndexBy = function (n, t, r) { + return vr(n, t, ye(r, 2)); + }), + (An.sortedIndexOf = function (n, t) { + var r = null == n ? 0 : n.length; + if (r) { + var e = _r(n, t); + if (e < r && lu(n[e], t)) return e; + } + return -1; + }), + (An.sortedLastIndex = function (n, t) { + return _r(n, t, true); + }), + (An.sortedLastIndexBy = function (n, t, r) { + return vr(n, t, ye(r, 2), true); + }), + (An.sortedLastIndexOf = function (n, t) { + if (null == n ? 0 : n.length) { + var r = _r(n, t, true) - 1; + if (lu(n[r], t)) return r; + } + return -1; + }), + (An.startCase = Mf), + (An.startsWith = function (n, t, r) { + return ( + (n = Iu(n)), + (r = null == r ? 0 : pt(Eu(r), 0, n.length)), + (t = yr(t)), + n.slice(r, r + t.length) == t + ); + }), + (An.subtract = uc), + (An.sum = function (n) { + return n && n.length ? m(n, $u) : 0; + }), + (An.sumBy = function (n, t) { + return n && n.length ? m(n, ye(t, 2)) : 0; + }), + (An.template = function (n, t, r) { + var e = An.templateSettings; + r && Oe(n, t, r) && (t = T), + (n = Iu(n)), + (t = bf({}, t, e, ce)), + (r = bf({}, t.imports, e.imports, ce)); + var u, + i, + o = Wu(r), + f = S(r, o), + c = 0; + r = t.interpolate || jn; + var a = "__p+='"; + r = Xu( + (t.escape || jn).source + + '|' + + r.source + + '|' + + (r === Q ? pn : jn).source + + '|' + + (t.evaluate || jn).source + + '|$', + 'g', + ); + var l = oi.call(t, 'sourceURL') + ? '//# sourceURL=' + (t.sourceURL + '').replace(/[\r\n]/g, ' ') + '\n' + : ''; + if ( + (n.replace(r, function (t, r, e, o, f, l) { + return ( + e || (e = o), + (a += n.slice(c, l).replace(wn, z)), + r && ((u = true), (a += "'+__e(" + r + ")+'")), + f && ((i = true), (a += "';" + f + ";\n__p+='")), + e && (a += "'+((__t=(" + e + "))==null?'':__t)+'"), + (c = l + t.length), + t + ); + }), + (a += "';"), + (t = oi.call(t, 'variable') && t.variable) || (a = 'with(obj){' + a + '}'), + (a = (i ? a.replace(P, '') : a).replace(Z, '$1').replace(q, '$1;')), + (a = + 'function(' + + (t || 'obj') + + '){' + + (t ? '' : 'obj||(obj={});') + + "var __t,__p=''" + + (u ? ',__e=_.escape' : '') + + (i ? ",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}" : ';') + + a + + 'return __p}'), + (t = Ff(function () { + return Ju(o, l + 'return ' + a).apply(T, f); + })), + (t.source = a), + pu(t)) + ) + throw t; + return t; + }), + (An.times = function (n, t) { + if (((n = Eu(n)), 1 > n || 9007199254740991 < n)) return []; + var r = 4294967295, + e = Ci(n, 4294967295); + for (t = ye(t), n -= 4294967295, e = A(e, t); ++r < n; ) t(r); + return e; + }), + (An.toFinite = Au), + (An.toInteger = Eu), + (An.toLength = ku), + (An.toLower = function (n) { + return Iu(n).toLowerCase(); + }), + (An.toNumber = Su), + (An.toSafeInteger = function (n) { + return n ? pt(Eu(n), -9007199254740991, 9007199254740991) : 0 === n ? n : 0; + }), + (An.toString = Iu), + (An.toUpper = function (n) { + return Iu(n).toUpperCase(); + }), + (An.trim = function (n, t, r) { + return (n = Iu(n)) && (r || t === T) + ? n.replace(un, '') + : n && (t = yr(t)) + ? ((n = M(n)), (r = M(t)), (t = I(n, r)), (r = R(n, r) + 1), Or(n, t, r).join('')) + : n; + }), + (An.trimEnd = function (n, t, r) { + return (n = Iu(n)) && (r || t === T) + ? n.replace(fn, '') + : n && (t = yr(t)) + ? ((n = M(n)), (t = R(n, M(t)) + 1), Or(n, 0, t).join('')) + : n; + }), + (An.trimStart = function (n, t, r) { + return (n = Iu(n)) && (r || t === T) + ? n.replace(on, '') + : n && (t = yr(t)) + ? ((n = M(n)), (t = I(n, M(t))), Or(n, t).join('')) + : n; + }), + (An.truncate = function (n, t) { + var r = 30, + e = '...'; + if (du(t)) + var u = 'separator' in t ? t.separator : u, + r = 'length' in t ? Eu(t.length) : r, + e = 'omission' in t ? yr(t.omission) : e; + n = Iu(n); + var i = n.length; + if (Rn.test(n)) + var o = M(n), + i = o.length; + if (r >= i) return n; + if (((i = r - D(e)), 1 > i)) return e; + if (((r = o ? Or(o, 0, i).join('') : n.slice(0, i)), u === T)) return r + e; + if ((o && (i += r.length - i), hf(u))) { + if (n.slice(i).search(u)) { + var f = r; + for ( + u.global || (u = Xu(u.source, Iu(_n.exec(u)) + 'g')), u.lastIndex = 0; + (o = u.exec(f)); + + ) + var c = o.index; + r = r.slice(0, c === T ? i : c); + } + } else n.indexOf(yr(u), i) != i && ((u = r.lastIndexOf(u)), -1 < u && (r = r.slice(0, u))); + return r + e; + }), + (An.unescape = function (n) { + return (n = Iu(n)) && G.test(n) ? n.replace(V, tt) : n; + }), + (An.uniqueId = function (n) { + var t = ++fi; + return Iu(n) + t; + }), + (An.upperCase = Tf), + (An.upperFirst = $f), + (An.each = nu), + (An.eachRight = tu), + (An.first = qe), + Nu( + An, + (function () { + var n = {}; + return ( + mt(An, function (t, r) { + oi.call(An.prototype, r) || (n[r] = t); + }), + n + ); + })(), + { chain: false }, + ), + (An.VERSION = '4.17.15'), + r('bind bindKey curry curryRight partial partialRight'.split(' '), function (n) { + An[n].placeholder = An; + }), + r(['drop', 'take'], function (n, t) { + (Un.prototype[n] = function (r) { + r = r === T ? 1 : Ui(Eu(r), 0); + var e = this.__filtered__ && !t ? new Un(this) : this.clone(); + return ( + e.__filtered__ + ? (e.__takeCount__ = Ci(r, e.__takeCount__)) + : e.__views__.push({ + size: Ci(r, 4294967295), + type: n + (0 > e.__dir__ ? 'Right' : ''), + }), + e + ); + }), + (Un.prototype[n + 'Right'] = function (t) { + return this.reverse()[n](t).reverse(); + }); + }), + r(['filter', 'map', 'takeWhile'], function (n, t) { + var r = t + 1, + e = 1 == r || 3 == r; + Un.prototype[n] = function (n) { + var t = this.clone(); + return ( + t.__iteratees__.push({ iteratee: ye(n, 3), type: r }), + (t.__filtered__ = t.__filtered__ || e), + t + ); + }; + }), + r(['head', 'last'], function (n, t) { + var r = 'take' + (t ? 'Right' : ''); + Un.prototype[n] = function () { + return this[r](1).value()[0]; + }; + }), + r(['initial', 'tail'], function (n, t) { + var r = 'drop' + (t ? '' : 'Right'); + Un.prototype[n] = function () { + return this.__filtered__ ? new Un(this) : this[r](1); + }; + }), + (Un.prototype.compact = function () { + return this.filter($u); + }), + (Un.prototype.find = function (n) { + return this.filter(n).head(); + }), + (Un.prototype.findLast = function (n) { + return this.reverse().find(n); + }), + (Un.prototype.invokeMap = fr(function (n, t) { + return typeof n == 'function' + ? new Un(this) + : this.map(function (r) { + return Lt(r, n, t); + }); + })), + (Un.prototype.reject = function (n) { + return this.filter(au(ye(n))); + }), + (Un.prototype.slice = function (n, t) { + n = Eu(n); + var r = this; + return r.__filtered__ && (0 < n || 0 > t) + ? new Un(r) + : (0 > n ? (r = r.takeRight(-n)) : n && (r = r.drop(n)), + t !== T && ((t = Eu(t)), (r = 0 > t ? r.dropRight(-t) : r.take(t - n))), + r); + }), + (Un.prototype.takeRightWhile = function (n) { + return this.reverse().takeWhile(n).reverse(); + }), + (Un.prototype.toArray = function () { + return this.take(4294967295); + }), + mt(Un.prototype, function (n, t) { + var r = /^(?:filter|find|map|reject)|While$/.test(t), + e = /^(?:head|last)$/.test(t), + u = An[e ? 'take' + ('last' == t ? 'Right' : '') : t], + i = e || /^find/.test(t); + u && + (An.prototype[t] = function () { + function t(n) { + return (n = u.apply(An, a([n], f))), e && h ? n[0] : n; + } + var o = this.__wrapped__, + f = e ? [1] : arguments, + c = o instanceof Un, + l = f[0], + s = c || ff(o); + s && r && typeof l == 'function' && 1 != l.length && (c = s = false); + var h = this.__chain__, + p = !!this.__actions__.length, + l = i && !h, + c = c && !p; + return !i && s + ? ((o = c ? o : new Un(this)), + (o = n.apply(o, f)), + o.__actions__.push({ func: Qe, args: [t], thisArg: T }), + new On(o, h)) + : l && c + ? n.apply(this, f) + : ((o = this.thru(t)), l ? (e ? o.value()[0] : o.value()) : o); + }); + }), + r('pop push shift sort splice unshift'.split(' '), function (n) { + var t = ri[n], + r = /^(?:push|sort|unshift)$/.test(n) ? 'tap' : 'thru', + e = /^(?:pop|shift)$/.test(n); + An.prototype[n] = function () { + var n = arguments; + if (e && !this.__chain__) { + var u = this.value(); + return t.apply(ff(u) ? u : [], n); + } + return this[r](function (r) { + return t.apply(ff(r) ? r : [], n); + }); + }; + }), + mt(Un.prototype, function (n, t) { + var r = An[t]; + if (r) { + var e = r.name + ''; + oi.call(Gi, e) || (Gi[e] = []), Gi[e].push({ name: t, func: r }); + } + }), + (Gi[Jr(T, 2).name] = [{ name: 'wrapper', func: T }]), + (Un.prototype.clone = function () { + var n = new Un(this.__wrapped__); + return ( + (n.__actions__ = Ur(this.__actions__)), + (n.__dir__ = this.__dir__), + (n.__filtered__ = this.__filtered__), + (n.__iteratees__ = Ur(this.__iteratees__)), + (n.__takeCount__ = this.__takeCount__), + (n.__views__ = Ur(this.__views__)), + n + ); + }), + (Un.prototype.reverse = function () { + if (this.__filtered__) { + var n = new Un(this); + (n.__dir__ = -1), (n.__filtered__ = true); + } else (n = this.clone()), (n.__dir__ *= -1); + return n; + }), + (Un.prototype.value = function () { + var n, + t = this.__wrapped__.value(), + r = this.__dir__, + e = ff(t), + u = 0 > r, + i = e ? t.length : 0; + n = i; + for (var o = this.__views__, f = 0, c = -1, a = o.length; ++c < a; ) { + var l = o[c], + s = l.size; + switch (l.type) { + case 'drop': + f += s; + break; + case 'dropRight': + n -= s; + break; + case 'take': + n = Ci(n, f + s); + break; + case 'takeRight': + f = Ui(f, n - s); + } + } + if ( + ((n = { start: f, end: n }), + (o = n.start), + (f = n.end), + (n = f - o), + (o = u ? f : o - 1), + (f = this.__iteratees__), + (c = f.length), + (a = 0), + (l = Ci(n, this.__takeCount__)), + !e || (!u && i == n && l == n)) + ) + return wr(t, this.__actions__); + e = []; + n: for (; n-- && a < l; ) { + for (o += r, u = -1, i = t[o]; ++u < c; ) { + var h = f[u], + s = h.type, + h = (0, h.iteratee)(i); + if (2 == s) i = h; + else if (!h) { + if (1 == s) continue n; + break n; + } + } + e[a++] = i; + } + return e; + }), + (An.prototype.at = To), + (An.prototype.chain = function () { + return Ye(this); + }), + (An.prototype.commit = function () { + return new On(this.value(), this.__chain__); + }), + (An.prototype.next = function () { + this.__values__ === T && (this.__values__ = mu(this.value())); + var n = this.__index__ >= this.__values__.length; + return { done: n, value: n ? T : this.__values__[this.__index__++] }; + }), + (An.prototype.plant = function (n) { + for (var t, r = this; r instanceof En; ) { + var e = Fe(r); + (e.__index__ = 0), (e.__values__ = T), t ? (u.__wrapped__ = e) : (t = e); + var u = e, + r = r.__wrapped__; + } + return (u.__wrapped__ = n), t; + }), + (An.prototype.reverse = function () { + var n = this.__wrapped__; + return n instanceof Un + ? (this.__actions__.length && (n = new Un(this)), + (n = n.reverse()), + n.__actions__.push({ func: Qe, args: [Ge], thisArg: T }), + new On(n, this.__chain__)) + : this.thru(Ge); + }), + (An.prototype.toJSON = + An.prototype.valueOf = + An.prototype.value = + function () { + return wr(this.__wrapped__, this.__actions__); + }), + (An.prototype.first = An.prototype.head), + wi && (An.prototype[wi] = Xe), + An + ); + })(); + true + ? (($n._ = rt), + !((__WEBPACK_AMD_DEFINE_RESULT__ = function () { + return rt; + }.call(exports, __webpack_require__, exports, module)), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && + (module.exports = __WEBPACK_AMD_DEFINE_RESULT__))) + : Nn + ? (((Nn.exports = rt)._ = rt), (Fn._ = rt)) + : ($n._ = rt); + }).call(this); + /* WEBPACK VAR INJECTION */ + }).call(exports, __webpack_require__(238)(module)); + + /***/ + }, + /* 644 */ + /***/ function (module, exports, __webpack_require__) { + var mapping = __webpack_require__(645), + fallbackHolder = __webpack_require__(646); + + /** Built-in value reference. */ + var push = Array.prototype.push; + + /** + * Creates a function, with an arity of `n`, that invokes `func` with the + * arguments it receives. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} n The arity of the new function. + * @returns {Function} Returns the new function. + */ + function baseArity(func, n) { + return n == 2 + ? function (a, b) { + return func.apply(undefined, arguments); + } + : function (a) { + return func.apply(undefined, arguments); + }; + } + + /** + * Creates a function that invokes `func`, with up to `n` arguments, ignoring + * any additional arguments. + * + * @private + * @param {Function} func The function to cap arguments for. + * @param {number} n The arity cap. + * @returns {Function} Returns the new function. + */ + function baseAry(func, n) { + return n == 2 + ? function (a, b) { + return func(a, b); + } + : function (a) { + return func(a); + }; + } + + /** + * Creates a clone of `array`. + * + * @private + * @param {Array} array The array to clone. + * @returns {Array} Returns the cloned array. + */ + function cloneArray(array) { + var length = array ? array.length : 0, + result = Array(length); + + while (length--) { + result[length] = array[length]; + } + return result; + } + + /** + * Creates a function that clones a given object using the assignment `func`. + * + * @private + * @param {Function} func The assignment function. + * @returns {Function} Returns the new cloner function. + */ + function createCloner(func) { + return function (object) { + return func({}, object); + }; + } + + /** + * A specialized version of `_.spread` which flattens the spread array into + * the arguments of the invoked `func`. + * + * @private + * @param {Function} func The function to spread arguments over. + * @param {number} start The start position of the spread. + * @returns {Function} Returns the new function. + */ + function flatSpread(func, start) { + return function () { + var length = arguments.length, + lastIndex = length - 1, + args = Array(length); + + while (length--) { + args[length] = arguments[length]; + } + var array = args[start], + otherArgs = args.slice(0, start); + + if (array) { + push.apply(otherArgs, array); + } + if (start != lastIndex) { + push.apply(otherArgs, args.slice(start + 1)); + } + return func.apply(this, otherArgs); + }; + } + + /** + * Creates a function that wraps `func` and uses `cloner` to clone the first + * argument it receives. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} cloner The function to clone arguments. + * @returns {Function} Returns the new immutable function. + */ + function wrapImmutable(func, cloner) { + return function () { + var length = arguments.length; + if (!length) { + return; + } + var args = Array(length); + while (length--) { + args[length] = arguments[length]; + } + var result = (args[0] = cloner.apply(undefined, args)); + func.apply(undefined, args); + return result; + }; + } + + /** + * The base implementation of `convert` which accepts a `util` object of methods + * required to perform conversions. + * + * @param {Object} util The util object. + * @param {string} name The name of the function to convert. + * @param {Function} func The function to convert. + * @param {Object} [options] The options object. + * @param {boolean} [options.cap=true] Specify capping iteratee arguments. + * @param {boolean} [options.curry=true] Specify currying. + * @param {boolean} [options.fixed=true] Specify fixed arity. + * @param {boolean} [options.immutable=true] Specify immutable operations. + * @param {boolean} [options.rearg=true] Specify rearranging arguments. + * @returns {Function|Object} Returns the converted function or object. + */ + function baseConvert(util, name, func, options) { + var isLib = typeof name == 'function', + isObj = name === Object(name); + + if (isObj) { + options = func; + func = name; + name = undefined; + } + if (func == null) { + throw new TypeError(); + } + options || (options = {}); + + var config = { + cap: 'cap' in options ? options.cap : true, + curry: 'curry' in options ? options.curry : true, + fixed: 'fixed' in options ? options.fixed : true, + immutable: 'immutable' in options ? options.immutable : true, + rearg: 'rearg' in options ? options.rearg : true, + }; + + var defaultHolder = isLib ? func : fallbackHolder, + forceCurry = 'curry' in options && options.curry, + forceFixed = 'fixed' in options && options.fixed, + forceRearg = 'rearg' in options && options.rearg, + pristine = isLib ? func.runInContext() : undefined; + + var helpers = isLib + ? func + : { + ary: util.ary, + assign: util.assign, + clone: util.clone, + curry: util.curry, + forEach: util.forEach, + isArray: util.isArray, + isError: util.isError, + isFunction: util.isFunction, + isWeakMap: util.isWeakMap, + iteratee: util.iteratee, + keys: util.keys, + rearg: util.rearg, + toInteger: util.toInteger, + toPath: util.toPath, + }; + + var ary = helpers.ary, + assign = helpers.assign, + clone = helpers.clone, + curry = helpers.curry, + each = helpers.forEach, + isArray = helpers.isArray, + isError = helpers.isError, + isFunction = helpers.isFunction, + isWeakMap = helpers.isWeakMap, + keys = helpers.keys, + rearg = helpers.rearg, + toInteger = helpers.toInteger, + toPath = helpers.toPath; + + var aryMethodKeys = keys(mapping.aryMethod); + + var wrappers = { + castArray: function (castArray) { + return function () { + var value = arguments[0]; + return isArray(value) ? castArray(cloneArray(value)) : castArray.apply(undefined, arguments); + }; + }, + iteratee: function (iteratee) { + return function () { + var func = arguments[0], + arity = arguments[1], + result = iteratee(func, arity), + length = result.length; + + if (config.cap && typeof arity == 'number') { + arity = arity > 2 ? arity - 2 : 1; + return length && length <= arity ? result : baseAry(result, arity); + } + return result; + }; + }, + mixin: function (mixin) { + return function (source) { + var func = this; + if (!isFunction(func)) { + return mixin(func, Object(source)); + } + var pairs = []; + each(keys(source), function (key) { + if (isFunction(source[key])) { + pairs.push([key, func.prototype[key]]); + } + }); + + mixin(func, Object(source)); + + each(pairs, function (pair) { + var value = pair[1]; + if (isFunction(value)) { + func.prototype[pair[0]] = value; + } else { + delete func.prototype[pair[0]]; + } + }); + return func; + }; + }, + nthArg: function (nthArg) { + return function (n) { + var arity = n < 0 ? 1 : toInteger(n) + 1; + return curry(nthArg(n), arity); + }; + }, + rearg: function (rearg) { + return function (func, indexes) { + var arity = indexes ? indexes.length : 0; + return curry(rearg(func, indexes), arity); + }; + }, + runInContext: function (runInContext) { + return function (context) { + return baseConvert(util, runInContext(context), options); + }; + }, + }; + + /*--------------------------------------------------------------------------*/ + + /** + * Casts `func` to a function with an arity capped iteratee if needed. + * + * @private + * @param {string} name The name of the function to inspect. + * @param {Function} func The function to inspect. + * @returns {Function} Returns the cast function. + */ + function castCap(name, func) { + if (config.cap) { + var indexes = mapping.iterateeRearg[name]; + if (indexes) { + return iterateeRearg(func, indexes); + } + var n = !isLib && mapping.iterateeAry[name]; + if (n) { + return iterateeAry(func, n); + } + } + return func; + } + + /** + * Casts `func` to a curried function if needed. + * + * @private + * @param {string} name The name of the function to inspect. + * @param {Function} func The function to inspect. + * @param {number} n The arity of `func`. + * @returns {Function} Returns the cast function. + */ + function castCurry(name, func, n) { + return forceCurry || (config.curry && n > 1) ? curry(func, n) : func; + } + + /** + * Casts `func` to a fixed arity function if needed. + * + * @private + * @param {string} name The name of the function to inspect. + * @param {Function} func The function to inspect. + * @param {number} n The arity cap. + * @returns {Function} Returns the cast function. + */ + function castFixed(name, func, n) { + if (config.fixed && (forceFixed || !mapping.skipFixed[name])) { + var data = mapping.methodSpread[name], + start = data && data.start; + + return start === undefined ? ary(func, n) : flatSpread(func, start); + } + return func; + } + + /** + * Casts `func` to an rearged function if needed. + * + * @private + * @param {string} name The name of the function to inspect. + * @param {Function} func The function to inspect. + * @param {number} n The arity of `func`. + * @returns {Function} Returns the cast function. + */ + function castRearg(name, func, n) { + return config.rearg && n > 1 && (forceRearg || !mapping.skipRearg[name]) + ? rearg(func, mapping.methodRearg[name] || mapping.aryRearg[n]) + : func; + } + + /** + * Creates a clone of `object` by `path`. + * + * @private + * @param {Object} object The object to clone. + * @param {Array|string} path The path to clone by. + * @returns {Object} Returns the cloned object. + */ + function cloneByPath(object, path) { + path = toPath(path); + + var index = -1, + length = path.length, + lastIndex = length - 1, + result = clone(Object(object)), + nested = result; + + while (nested != null && ++index < length) { + var key = path[index], + value = nested[key]; + + if (value != null && !(isFunction(value) || isError(value) || isWeakMap(value))) { + nested[key] = clone(index == lastIndex ? value : Object(value)); + } + nested = nested[key]; + } + return result; + } + + /** + * Converts `lodash` to an immutable auto-curried iteratee-first data-last + * version with conversion `options` applied. + * + * @param {Object} [options] The options object. See `baseConvert` for more details. + * @returns {Function} Returns the converted `lodash`. + */ + function convertLib(options) { + return _.runInContext.convert(options)(undefined); + } + + /** + * Create a converter function for `func` of `name`. + * + * @param {string} name The name of the function to convert. + * @param {Function} func The function to convert. + * @returns {Function} Returns the new converter function. + */ + function createConverter(name, func) { + var realName = mapping.aliasToReal[name] || name, + methodName = mapping.remap[realName] || realName, + oldOptions = options; + + return function (options) { + var newUtil = isLib ? pristine : helpers, + newFunc = isLib ? pristine[methodName] : func, + newOptions = assign(assign({}, oldOptions), options); + + return baseConvert(newUtil, realName, newFunc, newOptions); + }; + } + + /** + * Creates a function that wraps `func` to invoke its iteratee, with up to `n` + * arguments, ignoring any additional arguments. + * + * @private + * @param {Function} func The function to cap iteratee arguments for. + * @param {number} n The arity cap. + * @returns {Function} Returns the new function. + */ + function iterateeAry(func, n) { + return overArg(func, function (func) { + return typeof func == 'function' ? baseAry(func, n) : func; + }); + } + + /** + * Creates a function that wraps `func` to invoke its iteratee with arguments + * arranged according to the specified `indexes` where the argument value at + * the first index is provided as the first argument, the argument value at + * the second index is provided as the second argument, and so on. + * + * @private + * @param {Function} func The function to rearrange iteratee arguments for. + * @param {number[]} indexes The arranged argument indexes. + * @returns {Function} Returns the new function. + */ + function iterateeRearg(func, indexes) { + return overArg(func, function (func) { + var n = indexes.length; + return baseArity(rearg(baseAry(func, n), indexes), n); + }); + } + + /** + * Creates a function that invokes `func` with its first argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ + function overArg(func, transform) { + return function () { + var length = arguments.length; + if (!length) { + return func(); + } + var args = Array(length); + while (length--) { + args[length] = arguments[length]; + } + var index = config.rearg ? 0 : length - 1; + args[index] = transform(args[index]); + return func.apply(undefined, args); + }; + } + + /** + * Creates a function that wraps `func` and applys the conversions + * rules by `name`. + * + * @private + * @param {string} name The name of the function to wrap. + * @param {Function} func The function to wrap. + * @returns {Function} Returns the converted function. + */ + function wrap(name, func, placeholder) { + var result, + realName = mapping.aliasToReal[name] || name, + wrapped = func, + wrapper = wrappers[realName]; + + if (wrapper) { + wrapped = wrapper(func); + } else if (config.immutable) { + if (mapping.mutate.array[realName]) { + wrapped = wrapImmutable(func, cloneArray); + } else if (mapping.mutate.object[realName]) { + wrapped = wrapImmutable(func, createCloner(func)); + } else if (mapping.mutate.set[realName]) { + wrapped = wrapImmutable(func, cloneByPath); + } + } + each(aryMethodKeys, function (aryKey) { + each(mapping.aryMethod[aryKey], function (otherName) { + if (realName == otherName) { + var data = mapping.methodSpread[realName], + afterRearg = data && data.afterRearg; + + result = afterRearg + ? castFixed(realName, castRearg(realName, wrapped, aryKey), aryKey) + : castRearg(realName, castFixed(realName, wrapped, aryKey), aryKey); + + result = castCap(realName, result); + result = castCurry(realName, result, aryKey); + return false; + } + }); + return !result; + }); + + result || (result = wrapped); + if (result == func) { + result = forceCurry + ? curry(result, 1) + : function () { + return func.apply(this, arguments); + }; + } + result.convert = createConverter(realName, func); + result.placeholder = func.placeholder = placeholder; + + return result; + } + + /*--------------------------------------------------------------------------*/ + + if (!isObj) { + return wrap(name, func, defaultHolder); + } + var _ = func; + + // Convert methods by ary cap. + var pairs = []; + each(aryMethodKeys, function (aryKey) { + each(mapping.aryMethod[aryKey], function (key) { + var func = _[mapping.remap[key] || key]; + if (func) { + pairs.push([key, wrap(key, func, _)]); + } + }); + }); + + // Convert remaining methods. + each(keys(_), function (key) { + var func = _[key]; + if (typeof func == 'function') { + var length = pairs.length; + while (length--) { + if (pairs[length][0] == key) { + return; + } + } + func.convert = createConverter(key, func); + pairs.push([key, func]); + } + }); + + // Assign to `_` leaving `_.prototype` unchanged to allow chaining. + each(pairs, function (pair) { + _[pair[0]] = pair[1]; + }); + + _.convert = convertLib; + _.placeholder = _; + + // Assign aliases. + each(keys(_), function (key) { + each(mapping.realToAlias[key] || [], function (alias) { + _[alias] = _[key]; + }); + }); + + return _; + } + + module.exports = baseConvert; + + /***/ + }, + /* 645 */ + /***/ function (module, exports) { + /** Used to map aliases to their real names. */ + exports.aliasToReal = { + // Lodash aliases. + each: 'forEach', + eachRight: 'forEachRight', + entries: 'toPairs', + entriesIn: 'toPairsIn', + extend: 'assignIn', + extendAll: 'assignInAll', + extendAllWith: 'assignInAllWith', + extendWith: 'assignInWith', + first: 'head', + + // Methods that are curried variants of others. + conforms: 'conformsTo', + matches: 'isMatch', + property: 'get', + + // Ramda aliases. + __: 'placeholder', + F: 'stubFalse', + T: 'stubTrue', + all: 'every', + allPass: 'overEvery', + always: 'constant', + any: 'some', + anyPass: 'overSome', + apply: 'spread', + assoc: 'set', + assocPath: 'set', + complement: 'negate', + compose: 'flowRight', + contains: 'includes', + dissoc: 'unset', + dissocPath: 'unset', + dropLast: 'dropRight', + dropLastWhile: 'dropRightWhile', + equals: 'isEqual', + identical: 'eq', + indexBy: 'keyBy', + init: 'initial', + invertObj: 'invert', + juxt: 'over', + omitAll: 'omit', + nAry: 'ary', + path: 'get', + pathEq: 'matchesProperty', + pathOr: 'getOr', + paths: 'at', + pickAll: 'pick', + pipe: 'flow', + pluck: 'map', + prop: 'get', + propEq: 'matchesProperty', + propOr: 'getOr', + props: 'at', + symmetricDifference: 'xor', + symmetricDifferenceBy: 'xorBy', + symmetricDifferenceWith: 'xorWith', + takeLast: 'takeRight', + takeLastWhile: 'takeRightWhile', + unapply: 'rest', + unnest: 'flatten', + useWith: 'overArgs', + where: 'conformsTo', + whereEq: 'isMatch', + zipObj: 'zipObject', + }; + + /** Used to map ary to method names. */ + exports.aryMethod = { + 1: [ + 'assignAll', + 'assignInAll', + 'attempt', + 'castArray', + 'ceil', + 'create', + 'curry', + 'curryRight', + 'defaultsAll', + 'defaultsDeepAll', + 'floor', + 'flow', + 'flowRight', + 'fromPairs', + 'invert', + 'iteratee', + 'memoize', + 'method', + 'mergeAll', + 'methodOf', + 'mixin', + 'nthArg', + 'over', + 'overEvery', + 'overSome', + 'rest', + 'reverse', + 'round', + 'runInContext', + 'spread', + 'template', + 'trim', + 'trimEnd', + 'trimStart', + 'uniqueId', + 'words', + 'zipAll', + ], + 2: [ + 'add', + 'after', + 'ary', + 'assign', + 'assignAllWith', + 'assignIn', + 'assignInAllWith', + 'at', + 'before', + 'bind', + 'bindAll', + 'bindKey', + 'chunk', + 'cloneDeepWith', + 'cloneWith', + 'concat', + 'conformsTo', + 'countBy', + 'curryN', + 'curryRightN', + 'debounce', + 'defaults', + 'defaultsDeep', + 'defaultTo', + 'delay', + 'difference', + 'divide', + 'drop', + 'dropRight', + 'dropRightWhile', + 'dropWhile', + 'endsWith', + 'eq', + 'every', + 'filter', + 'find', + 'findIndex', + 'findKey', + 'findLast', + 'findLastIndex', + 'findLastKey', + 'flatMap', + 'flatMapDeep', + 'flattenDepth', + 'forEach', + 'forEachRight', + 'forIn', + 'forInRight', + 'forOwn', + 'forOwnRight', + 'get', + 'groupBy', + 'gt', + 'gte', + 'has', + 'hasIn', + 'includes', + 'indexOf', + 'intersection', + 'invertBy', + 'invoke', + 'invokeMap', + 'isEqual', + 'isMatch', + 'join', + 'keyBy', + 'lastIndexOf', + 'lt', + 'lte', + 'map', + 'mapKeys', + 'mapValues', + 'matchesProperty', + 'maxBy', + 'meanBy', + 'merge', + 'mergeAllWith', + 'minBy', + 'multiply', + 'nth', + 'omit', + 'omitBy', + 'overArgs', + 'pad', + 'padEnd', + 'padStart', + 'parseInt', + 'partial', + 'partialRight', + 'partition', + 'pick', + 'pickBy', + 'propertyOf', + 'pull', + 'pullAll', + 'pullAt', + 'random', + 'range', + 'rangeRight', + 'rearg', + 'reject', + 'remove', + 'repeat', + 'restFrom', + 'result', + 'sampleSize', + 'some', + 'sortBy', + 'sortedIndex', + 'sortedIndexOf', + 'sortedLastIndex', + 'sortedLastIndexOf', + 'sortedUniqBy', + 'split', + 'spreadFrom', + 'startsWith', + 'subtract', + 'sumBy', + 'take', + 'takeRight', + 'takeRightWhile', + 'takeWhile', + 'tap', + 'throttle', + 'thru', + 'times', + 'trimChars', + 'trimCharsEnd', + 'trimCharsStart', + 'truncate', + 'union', + 'uniqBy', + 'uniqWith', + 'unset', + 'unzipWith', + 'without', + 'wrap', + 'xor', + 'zip', + 'zipObject', + 'zipObjectDeep', + ], + 3: [ + 'assignInWith', + 'assignWith', + 'clamp', + 'differenceBy', + 'differenceWith', + 'findFrom', + 'findIndexFrom', + 'findLastFrom', + 'findLastIndexFrom', + 'getOr', + 'includesFrom', + 'indexOfFrom', + 'inRange', + 'intersectionBy', + 'intersectionWith', + 'invokeArgs', + 'invokeArgsMap', + 'isEqualWith', + 'isMatchWith', + 'flatMapDepth', + 'lastIndexOfFrom', + 'mergeWith', + 'orderBy', + 'padChars', + 'padCharsEnd', + 'padCharsStart', + 'pullAllBy', + 'pullAllWith', + 'rangeStep', + 'rangeStepRight', + 'reduce', + 'reduceRight', + 'replace', + 'set', + 'slice', + 'sortedIndexBy', + 'sortedLastIndexBy', + 'transform', + 'unionBy', + 'unionWith', + 'update', + 'xorBy', + 'xorWith', + 'zipWith', + ], + 4: ['fill', 'setWith', 'updateWith'], + }; + + /** Used to map ary to rearg configs. */ + exports.aryRearg = { + 2: [1, 0], + 3: [2, 0, 1], + 4: [3, 2, 0, 1], + }; + + /** Used to map method names to their iteratee ary. */ + exports.iterateeAry = { + dropRightWhile: 1, + dropWhile: 1, + every: 1, + filter: 1, + find: 1, + findFrom: 1, + findIndex: 1, + findIndexFrom: 1, + findKey: 1, + findLast: 1, + findLastFrom: 1, + findLastIndex: 1, + findLastIndexFrom: 1, + findLastKey: 1, + flatMap: 1, + flatMapDeep: 1, + flatMapDepth: 1, + forEach: 1, + forEachRight: 1, + forIn: 1, + forInRight: 1, + forOwn: 1, + forOwnRight: 1, + map: 1, + mapKeys: 1, + mapValues: 1, + partition: 1, + reduce: 2, + reduceRight: 2, + reject: 1, + remove: 1, + some: 1, + takeRightWhile: 1, + takeWhile: 1, + times: 1, + transform: 2, + }; + + /** Used to map method names to iteratee rearg configs. */ + exports.iterateeRearg = { + mapKeys: [1], + reduceRight: [1, 0], + }; + + /** Used to map method names to rearg configs. */ + exports.methodRearg = { + assignInAllWith: [1, 0], + assignInWith: [1, 2, 0], + assignAllWith: [1, 0], + assignWith: [1, 2, 0], + differenceBy: [1, 2, 0], + differenceWith: [1, 2, 0], + getOr: [2, 1, 0], + intersectionBy: [1, 2, 0], + intersectionWith: [1, 2, 0], + isEqualWith: [1, 2, 0], + isMatchWith: [2, 1, 0], + mergeAllWith: [1, 0], + mergeWith: [1, 2, 0], + padChars: [2, 1, 0], + padCharsEnd: [2, 1, 0], + padCharsStart: [2, 1, 0], + pullAllBy: [2, 1, 0], + pullAllWith: [2, 1, 0], + rangeStep: [1, 2, 0], + rangeStepRight: [1, 2, 0], + setWith: [3, 1, 2, 0], + sortedIndexBy: [2, 1, 0], + sortedLastIndexBy: [2, 1, 0], + unionBy: [1, 2, 0], + unionWith: [1, 2, 0], + updateWith: [3, 1, 2, 0], + xorBy: [1, 2, 0], + xorWith: [1, 2, 0], + zipWith: [1, 2, 0], + }; + + /** Used to map method names to spread configs. */ + exports.methodSpread = { + assignAll: { start: 0 }, + assignAllWith: { start: 0 }, + assignInAll: { start: 0 }, + assignInAllWith: { start: 0 }, + defaultsAll: { start: 0 }, + defaultsDeepAll: { start: 0 }, + invokeArgs: { start: 2 }, + invokeArgsMap: { start: 2 }, + mergeAll: { start: 0 }, + mergeAllWith: { start: 0 }, + partial: { start: 1 }, + partialRight: { start: 1 }, + without: { start: 1 }, + zipAll: { start: 0 }, + }; + + /** Used to identify methods which mutate arrays or objects. */ + exports.mutate = { + array: { + fill: true, + pull: true, + pullAll: true, + pullAllBy: true, + pullAllWith: true, + pullAt: true, + remove: true, + reverse: true, + }, + object: { + assign: true, + assignAll: true, + assignAllWith: true, + assignIn: true, + assignInAll: true, + assignInAllWith: true, + assignInWith: true, + assignWith: true, + defaults: true, + defaultsAll: true, + defaultsDeep: true, + defaultsDeepAll: true, + merge: true, + mergeAll: true, + mergeAllWith: true, + mergeWith: true, + }, + set: { + set: true, + setWith: true, + unset: true, + update: true, + updateWith: true, + }, + }; + + /** Used to map real names to their aliases. */ + exports.realToAlias = (function () { + var hasOwnProperty = Object.prototype.hasOwnProperty, + object = exports.aliasToReal, + result = {}; + + for (var key in object) { + var value = object[key]; + if (hasOwnProperty.call(result, value)) { + result[value].push(key); + } else { + result[value] = [key]; + } + } + return result; + })(); + + /** Used to map method names to other names. */ + exports.remap = { + assignAll: 'assign', + assignAllWith: 'assignWith', + assignInAll: 'assignIn', + assignInAllWith: 'assignInWith', + curryN: 'curry', + curryRightN: 'curryRight', + defaultsAll: 'defaults', + defaultsDeepAll: 'defaultsDeep', + findFrom: 'find', + findIndexFrom: 'findIndex', + findLastFrom: 'findLast', + findLastIndexFrom: 'findLastIndex', + getOr: 'get', + includesFrom: 'includes', + indexOfFrom: 'indexOf', + invokeArgs: 'invoke', + invokeArgsMap: 'invokeMap', + lastIndexOfFrom: 'lastIndexOf', + mergeAll: 'merge', + mergeAllWith: 'mergeWith', + padChars: 'pad', + padCharsEnd: 'padEnd', + padCharsStart: 'padStart', + propertyOf: 'get', + rangeStep: 'range', + rangeStepRight: 'rangeRight', + restFrom: 'rest', + spreadFrom: 'spread', + trimChars: 'trim', + trimCharsEnd: 'trimEnd', + trimCharsStart: 'trimStart', + zipAll: 'zip', + }; + + /** Used to track methods that skip fixing their arity. */ + exports.skipFixed = { + castArray: true, + flow: true, + flowRight: true, + iteratee: true, + mixin: true, + rearg: true, + runInContext: true, + }; + + /** Used to track methods that skip rearranging arguments. */ + exports.skipRearg = { + add: true, + assign: true, + assignIn: true, + bind: true, + bindKey: true, + concat: true, + difference: true, + divide: true, + eq: true, + gt: true, + gte: true, + isEqual: true, + lt: true, + lte: true, + matchesProperty: true, + merge: true, + multiply: true, + overArgs: true, + partial: true, + partialRight: true, + propertyOf: true, + random: true, + range: true, + rangeRight: true, + subtract: true, + zip: true, + zipObject: true, + zipObjectDeep: true, + }; + + /***/ + }, + /* 646 */ + /***/ function (module, exports) { + /** + * The default argument placeholder value for methods. + * + * @type {Object} + */ + module.exports = {}; + + /***/ + }, + /* 647 */ + /***/ function (module, exports) { + module.exports = { + message: 'index__message__2coBI', + }; + + /***/ + }, + /******/ + ], +); diff --git a/packages/react-on-rails-pro-node-renderer/tests/fixtures/projects/spec-dummy-web-target/9fa89f7 /server-bundle-web-target.js b/packages/react-on-rails-pro-node-renderer/tests/fixtures/projects/spec-dummy-web-target/9fa89f7 /server-bundle-web-target.js new file mode 100644 index 0000000000..9629817bd1 --- /dev/null +++ b/packages/react-on-rails-pro-node-renderer/tests/fixtures/projects/spec-dummy-web-target/9fa89f7 /server-bundle-web-target.js @@ -0,0 +1,94304 @@ +/******/ (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, { + /******/ configurable: false, + /******/ enumerable: true, + /******/ get: getter, + /******/ + }); + /******/ + } + /******/ + }; + /******/ + /******/ // 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 = '/webpack/development/'; + /******/ + /******/ // Load entry module and return exports + /******/ return __webpack_require__((__webpack_require__.s = 267)); + /******/ +})( + /************************************************************************/ + /******/ [ + /* 0 */ + /***/ function (module, exports, __webpack_require__) { + var global = __webpack_require__(3); + var core = __webpack_require__(23); + var hide = __webpack_require__(15); + var redefine = __webpack_require__(16); + var ctx = __webpack_require__(24); + var PROTOTYPE = 'prototype'; + + var $export = function (type, name, source) { + var IS_FORCED = type & $export.F; + var IS_GLOBAL = type & $export.G; + var IS_STATIC = type & $export.S; + var IS_PROTO = type & $export.P; + var IS_BIND = type & $export.B; + var target = IS_GLOBAL + ? global + : IS_STATIC + ? global[name] || (global[name] = {}) + : (global[name] || {})[PROTOTYPE]; + var exports = IS_GLOBAL ? core : core[name] || (core[name] = {}); + var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {}); + var key, own, out, exp; + if (IS_GLOBAL) source = name; + for (key in source) { + // contains in native + own = !IS_FORCED && target && target[key] !== undefined; + // export native or passed + out = (own ? target : source)[key]; + // bind timers to global for call from export context + exp = + IS_BIND && own + ? ctx(out, global) + : IS_PROTO && typeof out == 'function' + ? ctx(Function.call, out) + : out; + // extend global + if (target) redefine(target, key, out, type & $export.U); + // export + if (exports[key] != out) hide(exports, key, exp); + if (IS_PROTO && expProto[key] != out) expProto[key] = out; + } + }; + global.core = core; + // type bitmap + $export.F = 1; // forced + $export.G = 2; // global + $export.S = 4; // static + $export.P = 8; // proto + $export.B = 16; // bind + $export.W = 32; // wrap + $export.U = 64; // safe + $export.R = 128; // real proto method for `library` + module.exports = $export; + + /***/ + }, + /* 1 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + if (false) { + module.exports = require('./cjs/react.production.min.js'); + } else { + module.exports = __webpack_require__(512); + } + + /***/ + }, + /* 2 */ + /***/ function (module, exports, __webpack_require__) { + var isObject = __webpack_require__(5); + module.exports = function (it) { + if (!isObject(it)) throw TypeError(it + ' is not an object!'); + return it; + }; + + /***/ + }, + /* 3 */ + /***/ function (module, exports) { + // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 + var global = (module.exports = + typeof window != 'undefined' && window.Math == Math + ? window + : typeof self != 'undefined' && self.Math == Math + ? self + : // eslint-disable-next-line no-new-func + Function('return this')()); + if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef + + /***/ + }, + /* 4 */ + /***/ function (module, exports) { + module.exports = function (exec) { + try { + return !!exec(); + } catch (e) { + return true; + } + }; + + /***/ + }, + /* 5 */ + /***/ function (module, exports) { + module.exports = function (it) { + return typeof it === 'object' ? it !== null : typeof it === 'function'; + }; + + /***/ + }, + /* 6 */ + /***/ function (module, exports, __webpack_require__) { + var store = __webpack_require__(74)('wks'); + var uid = __webpack_require__(51); + var Symbol = __webpack_require__(3).Symbol; + var USE_SYMBOL = typeof Symbol == 'function'; + + var $exports = (module.exports = function (name) { + return ( + store[name] || + (store[name] = (USE_SYMBOL && Symbol[name]) || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)) + ); + }); + + $exports.store = store; + + /***/ + }, + /* 7 */ + /***/ function (module, exports, __webpack_require__) { + // 7.1.15 ToLength + var toInteger = __webpack_require__(26); + var min = Math.min; + module.exports = function (it) { + return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 + }; + + /***/ + }, + /* 8 */ + /***/ function (module, exports, __webpack_require__) { + // Thank's IE8 for his funny defineProperty + module.exports = !__webpack_require__(4)(function () { + return ( + Object.defineProperty({}, 'a', { + get: function () { + return 7; + }, + }).a != 7 + ); + }); + + /***/ + }, + /* 9 */ + /***/ function (module, exports, __webpack_require__) { + var anObject = __webpack_require__(2); + var IE8_DOM_DEFINE = __webpack_require__(175); + var toPrimitive = __webpack_require__(31); + var dP = Object.defineProperty; + + exports.f = __webpack_require__(8) + ? Object.defineProperty + : function defineProperty(O, P, Attributes) { + anObject(O); + P = toPrimitive(P, true); + anObject(Attributes); + if (IE8_DOM_DEFINE) + try { + return dP(O, P, Attributes); + } catch (e) { + /* empty */ + } + if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!'); + if ('value' in Attributes) O[P] = Attributes.value; + return O; + }; + + /***/ + }, + /* 10 */ + /***/ function (module, exports, __webpack_require__) { + /** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + + if (true) { + var ReactIs = __webpack_require__(109); + + // By explicitly using `prop-types` you are opting into new development behavior. + // http://fb.me/prop-types-in-prod + var throwOnDirectAccess = true; + module.exports = __webpack_require__(541)(ReactIs.isElement, throwOnDirectAccess); + } else { + // By explicitly using `prop-types` you are opting into new production behavior. + // http://fb.me/prop-types-in-prod + module.exports = require('./factoryWithThrowingShims')(); + } + + /***/ + }, + /* 11 */ + /***/ function (module, exports, __webpack_require__) { + // 7.1.13 ToObject(argument) + var defined = __webpack_require__(32); + module.exports = function (it) { + return Object(defined(it)); + }; + + /***/ + }, + /* 12 */ + /***/ function (module, exports) { + module.exports = function (it) { + if (typeof it != 'function') throw TypeError(it + ' is not a function!'); + return it; + }; + + /***/ + }, + /* 13 */ + /***/ function (module, exports) { + var core = (module.exports = { version: '2.6.11' }); + if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef + + /***/ + }, + /* 14 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + + /** + * Use invariant() to assert state which your program assumes to be true. + * + * Provide sprintf-style format (only %s is supported) and arguments + * to provide information about what broke and what you were + * expecting. + * + * The invariant message will be stripped in production, but the invariant + * will remain to ensure logic does not differ in production. + */ + + var invariant = function (condition, format, a, b, c, d, e, f) { + if (true) { + if (format === undefined) { + throw new Error('invariant requires an error message argument'); + } + } + + if (!condition) { + var error; + if (format === undefined) { + error = new Error( + 'Minified exception occurred; use the non-minified dev environment ' + + 'for the full error message and additional helpful warnings.', + ); + } else { + var args = [a, b, c, d, e, f]; + var argIndex = 0; + error = new Error( + format.replace(/%s/g, function () { + return args[argIndex++]; + }), + ); + error.name = 'Invariant Violation'; + } + + error.framesToPop = 1; // we don't care about invariant's own frame + throw error; + } + }; + + module.exports = invariant; + + /***/ + }, + /* 15 */ + /***/ function (module, exports, __webpack_require__) { + var dP = __webpack_require__(9); + var createDesc = __webpack_require__(50); + module.exports = __webpack_require__(8) + ? function (object, key, value) { + return dP.f(object, key, createDesc(1, value)); + } + : function (object, key, value) { + object[key] = value; + return object; + }; + + /***/ + }, + /* 16 */ + /***/ function (module, exports, __webpack_require__) { + var global = __webpack_require__(3); + var hide = __webpack_require__(15); + var has = __webpack_require__(18); + var SRC = __webpack_require__(51)('src'); + var $toString = __webpack_require__(272); + var TO_STRING = 'toString'; + var TPL = ('' + $toString).split(TO_STRING); + + __webpack_require__(23).inspectSource = function (it) { + return $toString.call(it); + }; + + (module.exports = function (O, key, val, safe) { + var isFunction = typeof val == 'function'; + if (isFunction) has(val, 'name') || hide(val, 'name', key); + if (O[key] === val) return; + if (isFunction) has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key))); + if (O === global) { + O[key] = val; + } else if (!safe) { + delete O[key]; + hide(O, key, val); + } else if (O[key]) { + O[key] = val; + } else { + hide(O, key, val); + } + // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative + })(Function.prototype, TO_STRING, function toString() { + return (typeof this == 'function' && this[SRC]) || $toString.call(this); + }); + + /***/ + }, + /* 17 */ + /***/ function (module, exports, __webpack_require__) { + var $export = __webpack_require__(0); + var fails = __webpack_require__(4); + var defined = __webpack_require__(32); + var quot = /"/g; + // B.2.3.2.1 CreateHTML(string, tag, attribute, value) + var createHTML = function (string, tag, attribute, value) { + var S = String(defined(string)); + var p1 = '<' + tag; + if (attribute !== '') p1 += ' ' + attribute + '="' + String(value).replace(quot, '"') + '"'; + return p1 + '>' + S + '</' + tag + '>'; + }; + module.exports = function (NAME, exec) { + var O = {}; + O[NAME] = exec(createHTML); + $export( + $export.P + + $export.F * + fails(function () { + var test = ''[NAME]('"'); + return test !== test.toLowerCase() || test.split('"').length > 3; + }), + 'String', + O, + ); + }; + + /***/ + }, + /* 18 */ + /***/ function (module, exports) { + var hasOwnProperty = {}.hasOwnProperty; + module.exports = function (it, key) { + return hasOwnProperty.call(it, key); + }; + + /***/ + }, + /* 19 */ + /***/ function (module, exports, __webpack_require__) { + // to indexed object, toObject with fallback for non-array-like ES3 strings + var IObject = __webpack_require__(75); + var defined = __webpack_require__(32); + module.exports = function (it) { + return IObject(defined(it)); + }; + + /***/ + }, + /* 20 */ + /***/ function (module, exports, __webpack_require__) { + var pIE = __webpack_require__(76); + var createDesc = __webpack_require__(50); + var toIObject = __webpack_require__(19); + var toPrimitive = __webpack_require__(31); + var has = __webpack_require__(18); + var IE8_DOM_DEFINE = __webpack_require__(175); + var gOPD = Object.getOwnPropertyDescriptor; + + exports.f = __webpack_require__(8) + ? gOPD + : function getOwnPropertyDescriptor(O, P) { + O = toIObject(O); + P = toPrimitive(P, true); + if (IE8_DOM_DEFINE) + try { + return gOPD(O, P); + } catch (e) { + /* empty */ + } + if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]); + }; + + /***/ + }, + /* 21 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) + var has = __webpack_require__(18); + var toObject = __webpack_require__(11); + var IE_PROTO = __webpack_require__(115)('IE_PROTO'); + var ObjectProto = Object.prototype; + + module.exports = + Object.getPrototypeOf || + function (O) { + O = toObject(O); + if (has(O, IE_PROTO)) return O[IE_PROTO]; + if (typeof O.constructor == 'function' && O instanceof O.constructor) { + return O.constructor.prototype; + } + return O instanceof Object ? ObjectProto : null; + }; + + /***/ + }, + /* 22 */ + /***/ function (module, exports, __webpack_require__) { + var store = __webpack_require__(150)('wks'); + var uid = __webpack_require__(104); + var Symbol = __webpack_require__(29).Symbol; + var USE_SYMBOL = typeof Symbol == 'function'; + + var $exports = (module.exports = function (name) { + return ( + store[name] || + (store[name] = (USE_SYMBOL && Symbol[name]) || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)) + ); + }); + + $exports.store = store; + + /***/ + }, + /* 23 */ + /***/ function (module, exports) { + var core = (module.exports = { version: '2.6.11' }); + if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef + + /***/ + }, + /* 24 */ + /***/ function (module, exports, __webpack_require__) { + // optional / simple context binding + var aFunction = __webpack_require__(12); + module.exports = function (fn, that, length) { + aFunction(fn); + if (that === undefined) return fn; + switch (length) { + case 1: + return function (a) { + return fn.call(that, a); + }; + case 2: + return function (a, b) { + return fn.call(that, a, b); + }; + case 3: + return function (a, b, c) { + return fn.call(that, a, b, c); + }; + } + return function (/* ...args */) { + return fn.apply(that, arguments); + }; + }; + + /***/ + }, + /* 25 */ + /***/ function (module, exports) { + var toString = {}.toString; + + module.exports = function (it) { + return toString.call(it).slice(8, -1); + }; + + /***/ + }, + /* 26 */ + /***/ function (module, exports) { + // 7.1.4 ToInteger + var ceil = Math.ceil; + var floor = Math.floor; + module.exports = function (it) { + return isNaN((it = +it)) ? 0 : (it > 0 ? floor : ceil)(it); + }; + + /***/ + }, + /* 27 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var fails = __webpack_require__(4); + + module.exports = function (method, arg) { + return ( + !!method && + fails(function () { + // eslint-disable-next-line no-useless-call + arg + ? method.call( + null, + function () { + /* empty */ + }, + 1, + ) + : method.call(null); + }) + ); + }; + + /***/ + }, + /* 28 */ + /***/ function (module, exports, __webpack_require__) { + // Thank's IE8 for his funny defineProperty + module.exports = !__webpack_require__(62)(function () { + return ( + Object.defineProperty({}, 'a', { + get: function () { + return 7; + }, + }).a != 7 + ); + }); + + /***/ + }, + /* 29 */ + /***/ function (module, exports) { + // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 + var global = (module.exports = + typeof window != 'undefined' && window.Math == Math + ? window + : typeof self != 'undefined' && self.Math == Math + ? self + : // eslint-disable-next-line no-new-func + Function('return this')()); + if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef + + /***/ + }, + /* 30 */ + /***/ function (module, exports, __webpack_require__) { + var anObject = __webpack_require__(63); + var IE8_DOM_DEFINE = __webpack_require__(213); + var toPrimitive = __webpack_require__(143); + var dP = Object.defineProperty; + + exports.f = __webpack_require__(28) + ? Object.defineProperty + : function defineProperty(O, P, Attributes) { + anObject(O); + P = toPrimitive(P, true); + anObject(Attributes); + if (IE8_DOM_DEFINE) + try { + return dP(O, P, Attributes); + } catch (e) { + /* empty */ + } + if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!'); + if ('value' in Attributes) O[P] = Attributes.value; + return O; + }; + + /***/ + }, + /* 31 */ + /***/ function (module, exports, __webpack_require__) { + // 7.1.1 ToPrimitive(input [, PreferredType]) + var isObject = __webpack_require__(5); + // instead of the ES6 spec version, we didn't implement @@toPrimitive case + // and the second argument - flag - preferred type is a string + module.exports = function (it, S) { + if (!isObject(it)) return it; + var fn, val; + if (S && typeof (fn = it.toString) == 'function' && !isObject((val = fn.call(it)))) return val; + if (typeof (fn = it.valueOf) == 'function' && !isObject((val = fn.call(it)))) return val; + if (!S && typeof (fn = it.toString) == 'function' && !isObject((val = fn.call(it)))) return val; + throw TypeError("Can't convert object to primitive value"); + }; + + /***/ + }, + /* 32 */ + /***/ function (module, exports) { + // 7.2.1 RequireObjectCoercible(argument) + module.exports = function (it) { + if (it == undefined) throw TypeError("Can't call method on " + it); + return it; + }; + + /***/ + }, + /* 33 */ + /***/ function (module, exports, __webpack_require__) { + // most Object methods by ES6 should accept primitives + var $export = __webpack_require__(0); + var core = __webpack_require__(23); + var fails = __webpack_require__(4); + module.exports = function (KEY, exec) { + var fn = (core.Object || {})[KEY] || Object[KEY]; + var exp = {}; + exp[KEY] = exec(fn); + $export( + $export.S + + $export.F * + fails(function () { + fn(1); + }), + 'Object', + exp, + ); + }; + + /***/ + }, + /* 34 */ + /***/ function (module, exports, __webpack_require__) { + // 0 -> Array#forEach + // 1 -> Array#map + // 2 -> Array#filter + // 3 -> Array#some + // 4 -> Array#every + // 5 -> Array#find + // 6 -> Array#findIndex + var ctx = __webpack_require__(24); + var IObject = __webpack_require__(75); + var toObject = __webpack_require__(11); + var toLength = __webpack_require__(7); + var asc = __webpack_require__(131); + module.exports = function (TYPE, $create) { + var IS_MAP = TYPE == 1; + var IS_FILTER = TYPE == 2; + var IS_SOME = TYPE == 3; + var IS_EVERY = TYPE == 4; + var IS_FIND_INDEX = TYPE == 6; + var NO_HOLES = TYPE == 5 || IS_FIND_INDEX; + var create = $create || asc; + return function ($this, callbackfn, that) { + var O = toObject($this); + var self = IObject(O); + var f = ctx(callbackfn, that, 3); + var length = toLength(self.length); + var index = 0; + var result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined; + var val, res; + for (; length > index; index++) + if (NO_HOLES || index in self) { + val = self[index]; + res = f(val, index, O); + if (TYPE) { + if (IS_MAP) + result[index] = res; // map + else if (res) + switch (TYPE) { + case 3: + return true; // some + case 5: + return val; // find + case 6: + return index; // findIndex + case 2: + result.push(val); // filter + } + else if (IS_EVERY) return false; // every + } + } + return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result; + }; + }; + + /***/ + }, + /* 35 */ + /***/ function (module, exports) { + module.exports = function (it) { + return typeof it === 'object' ? it !== null : typeof it === 'function'; + }; + + /***/ + }, + /* 36 */ + /***/ function (module, exports, __webpack_require__) { + var global = __webpack_require__(29); + var core = __webpack_require__(13); + var ctx = __webpack_require__(69); + var hide = __webpack_require__(46); + var has = __webpack_require__(45); + var PROTOTYPE = 'prototype'; + + var $export = function (type, name, source) { + var IS_FORCED = type & $export.F; + var IS_GLOBAL = type & $export.G; + var IS_STATIC = type & $export.S; + var IS_PROTO = type & $export.P; + var IS_BIND = type & $export.B; + var IS_WRAP = type & $export.W; + var exports = IS_GLOBAL ? core : core[name] || (core[name] = {}); + var expProto = exports[PROTOTYPE]; + var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]; + var key, own, out; + if (IS_GLOBAL) source = name; + for (key in source) { + // contains in native + own = !IS_FORCED && target && target[key] !== undefined; + if (own && has(exports, key)) continue; + // export native or passed + out = own ? target[key] : source[key]; + // prevent global pollution for namespaces + exports[key] = + IS_GLOBAL && typeof target[key] != 'function' + ? source[key] + : // bind timers to global for call from export context + IS_BIND && own + ? ctx(out, global) + : // wrap global constructors for prevent change them in library + IS_WRAP && target[key] == out + ? (function (C) { + var F = function (a, b, c) { + if (this instanceof C) { + switch (arguments.length) { + case 0: + return new C(); + case 1: + return new C(a); + case 2: + return new C(a, b); + } + return new C(a, b, c); + } + return C.apply(this, arguments); + }; + F[PROTOTYPE] = C[PROTOTYPE]; + return F; + // make static versions for prototype methods + })(out) + : IS_PROTO && typeof out == 'function' + ? ctx(Function.call, out) + : out; + // export proto methods to core.%CONSTRUCTOR%.methods.%NAME% + if (IS_PROTO) { + (exports.virtual || (exports.virtual = {}))[key] = out; + // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME% + if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out); + } + } + }; + // type bitmap + $export.F = 1; // forced + $export.G = 2; // global + $export.S = 4; // static + $export.P = 8; // proto + $export.B = 16; // bind + $export.W = 32; // wrap + $export.U = 64; // safe + $export.R = 128; // real proto method for `library` + module.exports = $export; + + /***/ + }, + /* 37 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + */ + + var React = __webpack_require__(1); + var factory = __webpack_require__(545); + + if (typeof React === 'undefined') { + throw Error( + 'create-react-class could not find the React object. If you are using script tags, ' + + 'make sure that React is being loaded before create-react-class.', + ); + } + + // Hack to grab NoopUpdateQueue from isomorphic React + var ReactNoopUpdateQueue = new React.Component().updater; + + module.exports = factory(React.Component, React.isValidElement, ReactNoopUpdateQueue); + + /***/ + }, + /* 38 */ + /***/ function (module, exports) { + var g; + + // This works in non-strict mode + g = (function () { + return this; + })(); + + try { + // This works if eval is allowed (see CSP) + g = g || Function('return this')() || (1, eval)('this'); + } catch (e) { + // This works if the window reference is available + if (typeof window === 'object') g = window; + } + + // g can still be undefined, but nothing to do about it... + // We return undefined, instead of nothing here, so it's + // easier to handle this case. if(!global) { ...} + + module.exports = g; + + /***/ + }, + /* 39 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + if (__webpack_require__(8)) { + var LIBRARY = __webpack_require__(42); + var global = __webpack_require__(3); + var fails = __webpack_require__(4); + var $export = __webpack_require__(0); + var $typed = __webpack_require__(97); + var $buffer = __webpack_require__(139); + var ctx = __webpack_require__(24); + var anInstance = __webpack_require__(57); + var propertyDesc = __webpack_require__(50); + var hide = __webpack_require__(15); + var redefineAll = __webpack_require__(59); + var toInteger = __webpack_require__(26); + var toLength = __webpack_require__(7); + var toIndex = __webpack_require__(203); + var toAbsoluteIndex = __webpack_require__(53); + var toPrimitive = __webpack_require__(31); + var has = __webpack_require__(18); + var classof = __webpack_require__(66); + var isObject = __webpack_require__(5); + var toObject = __webpack_require__(11); + var isArrayIter = __webpack_require__(128); + var create = __webpack_require__(54); + var getPrototypeOf = __webpack_require__(21); + var gOPN = __webpack_require__(55).f; + var getIterFn = __webpack_require__(130); + var uid = __webpack_require__(51); + var wks = __webpack_require__(6); + var createArrayMethod = __webpack_require__(34); + var createArrayIncludes = __webpack_require__(87); + var speciesConstructor = __webpack_require__(78); + var ArrayIterators = __webpack_require__(133); + var Iterators = __webpack_require__(68); + var $iterDetect = __webpack_require__(92); + var setSpecies = __webpack_require__(56); + var arrayFill = __webpack_require__(132); + var arrayCopyWithin = __webpack_require__(192); + var $DP = __webpack_require__(9); + var $GOPD = __webpack_require__(20); + var dP = $DP.f; + var gOPD = $GOPD.f; + var RangeError = global.RangeError; + var TypeError = global.TypeError; + var Uint8Array = global.Uint8Array; + var ARRAY_BUFFER = 'ArrayBuffer'; + var SHARED_BUFFER = 'Shared' + ARRAY_BUFFER; + var BYTES_PER_ELEMENT = 'BYTES_PER_ELEMENT'; + var PROTOTYPE = 'prototype'; + var ArrayProto = Array[PROTOTYPE]; + var $ArrayBuffer = $buffer.ArrayBuffer; + var $DataView = $buffer.DataView; + var arrayForEach = createArrayMethod(0); + var arrayFilter = createArrayMethod(2); + var arraySome = createArrayMethod(3); + var arrayEvery = createArrayMethod(4); + var arrayFind = createArrayMethod(5); + var arrayFindIndex = createArrayMethod(6); + var arrayIncludes = createArrayIncludes(true); + var arrayIndexOf = createArrayIncludes(false); + var arrayValues = ArrayIterators.values; + var arrayKeys = ArrayIterators.keys; + var arrayEntries = ArrayIterators.entries; + var arrayLastIndexOf = ArrayProto.lastIndexOf; + var arrayReduce = ArrayProto.reduce; + var arrayReduceRight = ArrayProto.reduceRight; + var arrayJoin = ArrayProto.join; + var arraySort = ArrayProto.sort; + var arraySlice = ArrayProto.slice; + var arrayToString = ArrayProto.toString; + var arrayToLocaleString = ArrayProto.toLocaleString; + var ITERATOR = wks('iterator'); + var TAG = wks('toStringTag'); + var TYPED_CONSTRUCTOR = uid('typed_constructor'); + var DEF_CONSTRUCTOR = uid('def_constructor'); + var ALL_CONSTRUCTORS = $typed.CONSTR; + var TYPED_ARRAY = $typed.TYPED; + var VIEW = $typed.VIEW; + var WRONG_LENGTH = 'Wrong length!'; + + var $map = createArrayMethod(1, function (O, length) { + return allocate(speciesConstructor(O, O[DEF_CONSTRUCTOR]), length); + }); + + var LITTLE_ENDIAN = fails(function () { + // eslint-disable-next-line no-undef + return new Uint8Array(new Uint16Array([1]).buffer)[0] === 1; + }); + + var FORCED_SET = + !!Uint8Array && + !!Uint8Array[PROTOTYPE].set && + fails(function () { + new Uint8Array(1).set({}); + }); + + var toOffset = function (it, BYTES) { + var offset = toInteger(it); + if (offset < 0 || offset % BYTES) throw RangeError('Wrong offset!'); + return offset; + }; + + var validate = function (it) { + if (isObject(it) && TYPED_ARRAY in it) return it; + throw TypeError(it + ' is not a typed array!'); + }; + + var allocate = function (C, length) { + if (!(isObject(C) && TYPED_CONSTRUCTOR in C)) { + throw TypeError('It is not a typed array constructor!'); + } + return new C(length); + }; + + var speciesFromList = function (O, list) { + return fromList(speciesConstructor(O, O[DEF_CONSTRUCTOR]), list); + }; + + var fromList = function (C, list) { + var index = 0; + var length = list.length; + var result = allocate(C, length); + while (length > index) result[index] = list[index++]; + return result; + }; + + var addGetter = function (it, key, internal) { + dP(it, key, { + get: function () { + return this._d[internal]; + }, + }); + }; + + var $from = function from(source /* , mapfn, thisArg */) { + var O = toObject(source); + var aLen = arguments.length; + var mapfn = aLen > 1 ? arguments[1] : undefined; + var mapping = mapfn !== undefined; + var iterFn = getIterFn(O); + var i, length, values, result, step, iterator; + if (iterFn != undefined && !isArrayIter(iterFn)) { + for (iterator = iterFn.call(O), values = [], i = 0; !(step = iterator.next()).done; i++) { + values.push(step.value); + } + O = values; + } + if (mapping && aLen > 2) mapfn = ctx(mapfn, arguments[2], 2); + for (i = 0, length = toLength(O.length), result = allocate(this, length); length > i; i++) { + result[i] = mapping ? mapfn(O[i], i) : O[i]; + } + return result; + }; + + var $of = function of(/* ...items */) { + var index = 0; + var length = arguments.length; + var result = allocate(this, length); + while (length > index) result[index] = arguments[index++]; + return result; + }; + + // iOS Safari 6.x fails here + var TO_LOCALE_BUG = + !!Uint8Array && + fails(function () { + arrayToLocaleString.call(new Uint8Array(1)); + }); + + var $toLocaleString = function toLocaleString() { + return arrayToLocaleString.apply( + TO_LOCALE_BUG ? arraySlice.call(validate(this)) : validate(this), + arguments, + ); + }; + + var proto = { + copyWithin: function copyWithin(target, start /* , end */) { + return arrayCopyWithin.call( + validate(this), + target, + start, + arguments.length > 2 ? arguments[2] : undefined, + ); + }, + every: function every(callbackfn /* , thisArg */) { + return arrayEvery(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); + }, + fill: function fill(value /* , start, end */) { + // eslint-disable-line no-unused-vars + return arrayFill.apply(validate(this), arguments); + }, + filter: function filter(callbackfn /* , thisArg */) { + return speciesFromList( + this, + arrayFilter(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined), + ); + }, + find: function find(predicate /* , thisArg */) { + return arrayFind(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined); + }, + findIndex: function findIndex(predicate /* , thisArg */) { + return arrayFindIndex(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined); + }, + forEach: function forEach(callbackfn /* , thisArg */) { + arrayForEach(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); + }, + indexOf: function indexOf(searchElement /* , fromIndex */) { + return arrayIndexOf( + validate(this), + searchElement, + arguments.length > 1 ? arguments[1] : undefined, + ); + }, + includes: function includes(searchElement /* , fromIndex */) { + return arrayIncludes( + validate(this), + searchElement, + arguments.length > 1 ? arguments[1] : undefined, + ); + }, + join: function join(separator) { + // eslint-disable-line no-unused-vars + return arrayJoin.apply(validate(this), arguments); + }, + lastIndexOf: function lastIndexOf(searchElement /* , fromIndex */) { + // eslint-disable-line no-unused-vars + return arrayLastIndexOf.apply(validate(this), arguments); + }, + map: function map(mapfn /* , thisArg */) { + return $map(validate(this), mapfn, arguments.length > 1 ? arguments[1] : undefined); + }, + reduce: function reduce(callbackfn /* , initialValue */) { + // eslint-disable-line no-unused-vars + return arrayReduce.apply(validate(this), arguments); + }, + reduceRight: function reduceRight(callbackfn /* , initialValue */) { + // eslint-disable-line no-unused-vars + return arrayReduceRight.apply(validate(this), arguments); + }, + reverse: function reverse() { + var that = this; + var length = validate(that).length; + var middle = Math.floor(length / 2); + var index = 0; + var value; + while (index < middle) { + value = that[index]; + that[index++] = that[--length]; + that[length] = value; + } + return that; + }, + some: function some(callbackfn /* , thisArg */) { + return arraySome(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); + }, + sort: function sort(comparefn) { + return arraySort.call(validate(this), comparefn); + }, + subarray: function subarray(begin, end) { + var O = validate(this); + var length = O.length; + var $begin = toAbsoluteIndex(begin, length); + return new (speciesConstructor(O, O[DEF_CONSTRUCTOR]))( + O.buffer, + O.byteOffset + $begin * O.BYTES_PER_ELEMENT, + toLength((end === undefined ? length : toAbsoluteIndex(end, length)) - $begin), + ); + }, + }; + + var $slice = function slice(start, end) { + return speciesFromList(this, arraySlice.call(validate(this), start, end)); + }; + + var $set = function set(arrayLike /* , offset */) { + validate(this); + var offset = toOffset(arguments[1], 1); + var length = this.length; + var src = toObject(arrayLike); + var len = toLength(src.length); + var index = 0; + if (len + offset > length) throw RangeError(WRONG_LENGTH); + while (index < len) this[offset + index] = src[index++]; + }; + + var $iterators = { + entries: function entries() { + return arrayEntries.call(validate(this)); + }, + keys: function keys() { + return arrayKeys.call(validate(this)); + }, + values: function values() { + return arrayValues.call(validate(this)); + }, + }; + + var isTAIndex = function (target, key) { + return ( + isObject(target) && + target[TYPED_ARRAY] && + typeof key != 'symbol' && + key in target && + String(+key) == String(key) + ); + }; + var $getDesc = function getOwnPropertyDescriptor(target, key) { + return isTAIndex(target, (key = toPrimitive(key, true))) + ? propertyDesc(2, target[key]) + : gOPD(target, key); + }; + var $setDesc = function defineProperty(target, key, desc) { + if ( + isTAIndex(target, (key = toPrimitive(key, true))) && + isObject(desc) && + has(desc, 'value') && + !has(desc, 'get') && + !has(desc, 'set') && + // TODO: add validation descriptor w/o calling accessors + !desc.configurable && + (!has(desc, 'writable') || desc.writable) && + (!has(desc, 'enumerable') || desc.enumerable) + ) { + target[key] = desc.value; + return target; + } + return dP(target, key, desc); + }; + + if (!ALL_CONSTRUCTORS) { + $GOPD.f = $getDesc; + $DP.f = $setDesc; + } + + $export($export.S + $export.F * !ALL_CONSTRUCTORS, 'Object', { + getOwnPropertyDescriptor: $getDesc, + defineProperty: $setDesc, + }); + + if ( + fails(function () { + arrayToString.call({}); + }) + ) { + arrayToString = arrayToLocaleString = function toString() { + return arrayJoin.call(this); + }; + } + + var $TypedArrayPrototype$ = redefineAll({}, proto); + redefineAll($TypedArrayPrototype$, $iterators); + hide($TypedArrayPrototype$, ITERATOR, $iterators.values); + redefineAll($TypedArrayPrototype$, { + slice: $slice, + set: $set, + constructor: function () { + /* noop */ + }, + toString: arrayToString, + toLocaleString: $toLocaleString, + }); + addGetter($TypedArrayPrototype$, 'buffer', 'b'); + addGetter($TypedArrayPrototype$, 'byteOffset', 'o'); + addGetter($TypedArrayPrototype$, 'byteLength', 'l'); + addGetter($TypedArrayPrototype$, 'length', 'e'); + dP($TypedArrayPrototype$, TAG, { + get: function () { + return this[TYPED_ARRAY]; + }, + }); + + // eslint-disable-next-line max-statements + module.exports = function (KEY, BYTES, wrapper, CLAMPED) { + CLAMPED = !!CLAMPED; + var NAME = KEY + (CLAMPED ? 'Clamped' : '') + 'Array'; + var GETTER = 'get' + KEY; + var SETTER = 'set' + KEY; + var TypedArray = global[NAME]; + var Base = TypedArray || {}; + var TAC = TypedArray && getPrototypeOf(TypedArray); + var FORCED = !TypedArray || !$typed.ABV; + var O = {}; + var TypedArrayPrototype = TypedArray && TypedArray[PROTOTYPE]; + var getter = function (that, index) { + var data = that._d; + return data.v[GETTER](index * BYTES + data.o, LITTLE_ENDIAN); + }; + var setter = function (that, index, value) { + var data = that._d; + if (CLAMPED) value = (value = Math.round(value)) < 0 ? 0 : value > 0xff ? 0xff : value & 0xff; + data.v[SETTER](index * BYTES + data.o, value, LITTLE_ENDIAN); + }; + var addElement = function (that, index) { + dP(that, index, { + get: function () { + return getter(this, index); + }, + set: function (value) { + return setter(this, index, value); + }, + enumerable: true, + }); + }; + if (FORCED) { + TypedArray = wrapper(function (that, data, $offset, $length) { + anInstance(that, TypedArray, NAME, '_d'); + var index = 0; + var offset = 0; + var buffer, byteLength, length, klass; + if (!isObject(data)) { + length = toIndex(data); + byteLength = length * BYTES; + buffer = new $ArrayBuffer(byteLength); + } else if ( + data instanceof $ArrayBuffer || + (klass = classof(data)) == ARRAY_BUFFER || + klass == SHARED_BUFFER + ) { + buffer = data; + offset = toOffset($offset, BYTES); + var $len = data.byteLength; + if ($length === undefined) { + if ($len % BYTES) throw RangeError(WRONG_LENGTH); + byteLength = $len - offset; + if (byteLength < 0) throw RangeError(WRONG_LENGTH); + } else { + byteLength = toLength($length) * BYTES; + if (byteLength + offset > $len) throw RangeError(WRONG_LENGTH); + } + length = byteLength / BYTES; + } else if (TYPED_ARRAY in data) { + return fromList(TypedArray, data); + } else { + return $from.call(TypedArray, data); + } + hide(that, '_d', { + b: buffer, + o: offset, + l: byteLength, + e: length, + v: new $DataView(buffer), + }); + while (index < length) addElement(that, index++); + }); + TypedArrayPrototype = TypedArray[PROTOTYPE] = create($TypedArrayPrototype$); + hide(TypedArrayPrototype, 'constructor', TypedArray); + } else if ( + !fails(function () { + TypedArray(1); + }) || + !fails(function () { + new TypedArray(-1); // eslint-disable-line no-new + }) || + !$iterDetect(function (iter) { + new TypedArray(); // eslint-disable-line no-new + new TypedArray(null); // eslint-disable-line no-new + new TypedArray(1.5); // eslint-disable-line no-new + new TypedArray(iter); // eslint-disable-line no-new + }, true) + ) { + TypedArray = wrapper(function (that, data, $offset, $length) { + anInstance(that, TypedArray, NAME); + var klass; + // `ws` module bug, temporarily remove validation length for Uint8Array + // https://github.com/websockets/ws/pull/645 + if (!isObject(data)) return new Base(toIndex(data)); + if ( + data instanceof $ArrayBuffer || + (klass = classof(data)) == ARRAY_BUFFER || + klass == SHARED_BUFFER + ) { + return $length !== undefined + ? new Base(data, toOffset($offset, BYTES), $length) + : $offset !== undefined + ? new Base(data, toOffset($offset, BYTES)) + : new Base(data); + } + if (TYPED_ARRAY in data) return fromList(TypedArray, data); + return $from.call(TypedArray, data); + }); + arrayForEach( + TAC !== Function.prototype ? gOPN(Base).concat(gOPN(TAC)) : gOPN(Base), + function (key) { + if (!(key in TypedArray)) hide(TypedArray, key, Base[key]); + }, + ); + TypedArray[PROTOTYPE] = TypedArrayPrototype; + if (!LIBRARY) TypedArrayPrototype.constructor = TypedArray; + } + var $nativeIterator = TypedArrayPrototype[ITERATOR]; + var CORRECT_ITER_NAME = + !!$nativeIterator && ($nativeIterator.name == 'values' || $nativeIterator.name == undefined); + var $iterator = $iterators.values; + hide(TypedArray, TYPED_CONSTRUCTOR, true); + hide(TypedArrayPrototype, TYPED_ARRAY, NAME); + hide(TypedArrayPrototype, VIEW, true); + hide(TypedArrayPrototype, DEF_CONSTRUCTOR, TypedArray); + + if (CLAMPED ? new TypedArray(1)[TAG] != NAME : !(TAG in TypedArrayPrototype)) { + dP(TypedArrayPrototype, TAG, { + get: function () { + return NAME; + }, + }); + } + + O[NAME] = TypedArray; + + $export($export.G + $export.W + $export.F * (TypedArray != Base), O); + + $export($export.S, NAME, { + BYTES_PER_ELEMENT: BYTES, + }); + + $export( + $export.S + + $export.F * + fails(function () { + Base.of.call(TypedArray, 1); + }), + NAME, + { + from: $from, + of: $of, + }, + ); + + if (!(BYTES_PER_ELEMENT in TypedArrayPrototype)) + hide(TypedArrayPrototype, BYTES_PER_ELEMENT, BYTES); + + $export($export.P, NAME, proto); + + setSpecies(NAME); + + $export($export.P + $export.F * FORCED_SET, NAME, { set: $set }); + + $export($export.P + $export.F * !CORRECT_ITER_NAME, NAME, $iterators); + + if (!LIBRARY && TypedArrayPrototype.toString != arrayToString) + TypedArrayPrototype.toString = arrayToString; + + $export( + $export.P + + $export.F * + fails(function () { + new TypedArray(1).slice(); + }), + NAME, + { slice: $slice }, + ); + + $export( + $export.P + + $export.F * + (fails(function () { + return [1, 2].toLocaleString() != new TypedArray([1, 2]).toLocaleString(); + }) || + !fails(function () { + TypedArrayPrototype.toLocaleString.call([1, 2]); + })), + NAME, + { toLocaleString: $toLocaleString }, + ); + + Iterators[NAME] = CORRECT_ITER_NAME ? $nativeIterator : $iterator; + if (!LIBRARY && !CORRECT_ITER_NAME) hide(TypedArrayPrototype, ITERATOR, $iterator); + }; + } else + module.exports = function () { + /* empty */ + }; + + /***/ + }, + /* 40 */ + /***/ function (module, exports, __webpack_require__) { + var Map = __webpack_require__(198); + var $export = __webpack_require__(0); + var shared = __webpack_require__(74)('metadata'); + var store = shared.store || (shared.store = new (__webpack_require__(201))()); + + var getOrCreateMetadataMap = function (target, targetKey, create) { + var targetMetadata = store.get(target); + if (!targetMetadata) { + if (!create) return undefined; + store.set(target, (targetMetadata = new Map())); + } + var keyMetadata = targetMetadata.get(targetKey); + if (!keyMetadata) { + if (!create) return undefined; + targetMetadata.set(targetKey, (keyMetadata = new Map())); + } + return keyMetadata; + }; + var ordinaryHasOwnMetadata = function (MetadataKey, O, P) { + var metadataMap = getOrCreateMetadataMap(O, P, false); + return metadataMap === undefined ? false : metadataMap.has(MetadataKey); + }; + var ordinaryGetOwnMetadata = function (MetadataKey, O, P) { + var metadataMap = getOrCreateMetadataMap(O, P, false); + return metadataMap === undefined ? undefined : metadataMap.get(MetadataKey); + }; + var ordinaryDefineOwnMetadata = function (MetadataKey, MetadataValue, O, P) { + getOrCreateMetadataMap(O, P, true).set(MetadataKey, MetadataValue); + }; + var ordinaryOwnMetadataKeys = function (target, targetKey) { + var metadataMap = getOrCreateMetadataMap(target, targetKey, false); + var keys = []; + if (metadataMap) + metadataMap.forEach(function (_, key) { + keys.push(key); + }); + return keys; + }; + var toMetaKey = function (it) { + return it === undefined || typeof it == 'symbol' ? it : String(it); + }; + var exp = function (O) { + $export($export.S, 'Reflect', O); + }; + + module.exports = { + store: store, + map: getOrCreateMetadataMap, + has: ordinaryHasOwnMetadata, + get: ordinaryGetOwnMetadata, + set: ordinaryDefineOwnMetadata, + keys: ordinaryOwnMetadataKeys, + key: toMetaKey, + exp: exp, + }; + + /***/ + }, + /* 41 */ + /***/ function (module, exports) { + function _interopRequireDefault(obj) { + return obj && obj.__esModule + ? obj + : { + default: obj, + }; + } + + module.exports = _interopRequireDefault; + + /***/ + }, + /* 42 */ + /***/ function (module, exports) { + module.exports = false; + + /***/ + }, + /* 43 */ + /***/ function (module, exports, __webpack_require__) { + var META = __webpack_require__(51)('meta'); + var isObject = __webpack_require__(5); + var has = __webpack_require__(18); + var setDesc = __webpack_require__(9).f; + var id = 0; + var isExtensible = + Object.isExtensible || + function () { + return true; + }; + var FREEZE = !__webpack_require__(4)(function () { + return isExtensible(Object.preventExtensions({})); + }); + var setMeta = function (it) { + setDesc(it, META, { + value: { + i: 'O' + ++id, // object ID + w: {}, // weak collections IDs + }, + }); + }; + var fastKey = function (it, create) { + // return primitive with prefix + if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; + if (!has(it, META)) { + // can't set metadata to uncaught frozen object + if (!isExtensible(it)) return 'F'; + // not necessary to add metadata + if (!create) return 'E'; + // add missing metadata + setMeta(it); + // return object ID + } + return it[META].i; + }; + var getWeak = function (it, create) { + if (!has(it, META)) { + // can't set metadata to uncaught frozen object + if (!isExtensible(it)) return true; + // not necessary to add metadata + if (!create) return false; + // add missing metadata + setMeta(it); + // return hash weak collections IDs + } + return it[META].w; + }; + // add metadata on freeze-family methods calling + var onFreeze = function (it) { + if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it); + return it; + }; + var meta = (module.exports = { + KEY: META, + NEED: false, + fastKey: fastKey, + getWeak: getWeak, + onFreeze: onFreeze, + }); + + /***/ + }, + /* 44 */ + /***/ function (module, exports, __webpack_require__) { + // 22.1.3.31 Array.prototype[@@unscopables] + var UNSCOPABLES = __webpack_require__(6)('unscopables'); + var ArrayProto = Array.prototype; + if (ArrayProto[UNSCOPABLES] == undefined) __webpack_require__(15)(ArrayProto, UNSCOPABLES, {}); + module.exports = function (key) { + ArrayProto[UNSCOPABLES][key] = true; + }; + + /***/ + }, + /* 45 */ + /***/ function (module, exports) { + var hasOwnProperty = {}.hasOwnProperty; + module.exports = function (it, key) { + return hasOwnProperty.call(it, key); + }; + + /***/ + }, + /* 46 */ + /***/ function (module, exports, __webpack_require__) { + var dP = __webpack_require__(30); + var createDesc = __webpack_require__(79); + module.exports = __webpack_require__(28) + ? function (object, key, value) { + return dP.f(object, key, createDesc(1, value)); + } + : function (object, key, value) { + object[key] = value; + return object; + }; + + /***/ + }, + /* 47 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2014-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + + /** + * Similar to invariant but only logs a warning if the condition is not met. + * This can be used to log issues in development environments in critical + * paths. Removing the logging code for production environments will keep the + * same logic and follow the same code paths. + */ + + var warning = function () {}; + + if (true) { + warning = function (condition, format, args) { + var len = arguments.length; + args = new Array(len > 2 ? len - 2 : 0); + for (var key = 2; key < len; key++) { + args[key - 2] = arguments[key]; + } + if (format === undefined) { + throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument'); + } + + if (format.length < 10 || /^[s\W]*$/.test(format)) { + throw new Error( + 'The warning format should be able to uniquely identify this ' + + 'warning. Please, use a more descriptive format than: ' + + format, + ); + } + + if (!condition) { + var argIndex = 0; + var message = + 'Warning: ' + + format.replace(/%s/g, function () { + return args[argIndex++]; + }); + if (typeof console !== 'undefined') { + console.error(message); + } + try { + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + throw new Error(message); + } catch (x) {} + } + }; + } + + module.exports = warning; + + /***/ + }, + /* 48 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['c'] = isReactChildren; + /* harmony export (immutable) */ __webpack_exports__['a'] = createRouteFromReactElement; + /* unused harmony export createRoutesFromReactChildren */ + /* harmony export (immutable) */ __webpack_exports__['b'] = createRoutes; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + function isValidChild(object) { + return object == null || __WEBPACK_IMPORTED_MODULE_0_react___default.a.isValidElement(object); + } + + function isReactChildren(object) { + return isValidChild(object) || (Array.isArray(object) && object.every(isValidChild)); + } + + function createRoute(defaultProps, props) { + return _extends({}, defaultProps, props); + } + + function createRouteFromReactElement(element) { + var type = element.type; + var route = createRoute(type.defaultProps, element.props); + + if (route.children) { + var childRoutes = createRoutesFromReactChildren(route.children, route); + + if (childRoutes.length) route.childRoutes = childRoutes; + + delete route.children; + } + + return route; + } + + /** + * Creates and returns a routes object from the given ReactChildren. JSX + * provides a convenient way to visualize how routes in the hierarchy are + * nested. + * + * import { Route, createRoutesFromReactChildren } from 'react-router' + * + * const routes = createRoutesFromReactChildren( + * <Route component={App}> + * <Route path="home" component={Dashboard}/> + * <Route path="news" component={NewsFeed}/> + * </Route> + * ) + * + * Note: This method is automatically used when you provide <Route> children + * to a <Router> component. + */ + function createRoutesFromReactChildren(children, parentRoute) { + var routes = []; + + __WEBPACK_IMPORTED_MODULE_0_react___default.a.Children.forEach(children, function (element) { + if (__WEBPACK_IMPORTED_MODULE_0_react___default.a.isValidElement(element)) { + // Component classes may have a static create* method. + if (element.type.createRouteFromReactElement) { + var route = element.type.createRouteFromReactElement(element, parentRoute); + + if (route) routes.push(route); + } else { + routes.push(createRouteFromReactElement(element)); + } + } + }); + + return routes; + } + + /** + * Creates and returns an array of routes from the given object which + * may be a JSX route, a plain object route, or an array of either. + */ + function createRoutes(routes) { + if (isReactChildren(routes)) { + routes = createRoutesFromReactChildren(routes); + } else if (routes && !Array.isArray(routes)) { + routes = [routes]; + } + + return routes; + } + + /***/ + }, + /* 49 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + exports.createPath = + exports.parsePath = + exports.getQueryStringValueFromPath = + exports.stripQueryStringValueFromPath = + exports.addQueryStringValueToPath = + undefined; + + var _warning = __webpack_require__(47); + + var _warning2 = _interopRequireDefault(_warning); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + var addQueryStringValueToPath = (exports.addQueryStringValueToPath = function addQueryStringValueToPath( + path, + key, + value, + ) { + var _parsePath = parsePath(path), + pathname = _parsePath.pathname, + search = _parsePath.search, + hash = _parsePath.hash; + + return createPath({ + pathname: pathname, + search: search + (search.indexOf('?') === -1 ? '?' : '&') + key + '=' + value, + hash: hash, + }); + }); + + var stripQueryStringValueFromPath = (exports.stripQueryStringValueFromPath = + function stripQueryStringValueFromPath(path, key) { + var _parsePath2 = parsePath(path), + pathname = _parsePath2.pathname, + search = _parsePath2.search, + hash = _parsePath2.hash; + + return createPath({ + pathname: pathname, + search: search.replace( + new RegExp('([?&])' + key + '=[a-zA-Z0-9]+(&?)'), + function (match, prefix, suffix) { + return prefix === '?' ? prefix : suffix; + }, + ), + hash: hash, + }); + }); + + var getQueryStringValueFromPath = (exports.getQueryStringValueFromPath = + function getQueryStringValueFromPath(path, key) { + var _parsePath3 = parsePath(path), + search = _parsePath3.search; + + var match = search.match(new RegExp('[?&]' + key + '=([a-zA-Z0-9]+)')); + return match && match[1]; + }); + + var extractPath = function extractPath(string) { + var match = string.match(/^(https?:)?\/\/[^\/]*/); + return match == null ? string : string.substring(match[0].length); + }; + + var parsePath = (exports.parsePath = function parsePath(path) { + var pathname = extractPath(path); + var search = ''; + var hash = ''; + + true + ? (0, _warning2.default)( + path === pathname, + 'A path must be pathname + search + hash only, not a full URL like "%s"', + path, + ) + : void 0; + + var hashIndex = pathname.indexOf('#'); + if (hashIndex !== -1) { + hash = pathname.substring(hashIndex); + pathname = pathname.substring(0, hashIndex); + } + + var searchIndex = pathname.indexOf('?'); + if (searchIndex !== -1) { + search = pathname.substring(searchIndex); + pathname = pathname.substring(0, searchIndex); + } + + if (pathname === '') pathname = '/'; + + return { + pathname: pathname, + search: search, + hash: hash, + }; + }); + + var createPath = (exports.createPath = function createPath(location) { + if (location == null || typeof location === 'string') return location; + + var basename = location.basename, + pathname = location.pathname, + search = location.search, + hash = location.hash; + + var path = (basename || '') + pathname; + + if (search && search !== '?') path += search; + + if (hash) path += hash; + + return path; + }); + + /***/ + }, + /* 50 */ + /***/ function (module, exports) { + module.exports = function (bitmap, value) { + return { + enumerable: !(bitmap & 1), + configurable: !(bitmap & 2), + writable: !(bitmap & 4), + value: value, + }; + }; + + /***/ + }, + /* 51 */ + /***/ function (module, exports) { + var id = 0; + var px = Math.random(); + module.exports = function (key) { + return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); + }; + + /***/ + }, + /* 52 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.14 / 15.2.3.14 Object.keys(O) + var $keys = __webpack_require__(177); + var enumBugKeys = __webpack_require__(116); + + module.exports = + Object.keys || + function keys(O) { + return $keys(O, enumBugKeys); + }; + + /***/ + }, + /* 53 */ + /***/ function (module, exports, __webpack_require__) { + var toInteger = __webpack_require__(26); + var max = Math.max; + var min = Math.min; + module.exports = function (index, length) { + index = toInteger(index); + return index < 0 ? max(index + length, 0) : min(index, length); + }; + + /***/ + }, + /* 54 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) + var anObject = __webpack_require__(2); + var dPs = __webpack_require__(178); + var enumBugKeys = __webpack_require__(116); + var IE_PROTO = __webpack_require__(115)('IE_PROTO'); + var Empty = function () { + /* empty */ + }; + var PROTOTYPE = 'prototype'; + + // Create object with fake `null` prototype: use iframe Object with cleared prototype + var createDict = function () { + // Thrash, waste and sodomy: IE GC bug + var iframe = __webpack_require__(113)('iframe'); + var i = enumBugKeys.length; + var lt = '<'; + var gt = '>'; + var iframeDocument; + iframe.style.display = 'none'; + __webpack_require__(117).appendChild(iframe); + iframe.src = 'javascript:'; // eslint-disable-line no-script-url + // createDict = iframe.contentWindow.Object; + // html.removeChild(iframe); + iframeDocument = iframe.contentWindow.document; + iframeDocument.open(); + iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); + iframeDocument.close(); + createDict = iframeDocument.F; + while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]]; + return createDict(); + }; + + module.exports = + Object.create || + function create(O, Properties) { + var result; + if (O !== null) { + Empty[PROTOTYPE] = anObject(O); + result = new Empty(); + Empty[PROTOTYPE] = null; + // add "__proto__" for Object.getPrototypeOf polyfill + result[IE_PROTO] = O; + } else result = createDict(); + return Properties === undefined ? result : dPs(result, Properties); + }; + + /***/ + }, + /* 55 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) + var $keys = __webpack_require__(177); + var hiddenKeys = __webpack_require__(116).concat('length', 'prototype'); + + exports.f = + Object.getOwnPropertyNames || + function getOwnPropertyNames(O) { + return $keys(O, hiddenKeys); + }; + + /***/ + }, + /* 56 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var global = __webpack_require__(3); + var dP = __webpack_require__(9); + var DESCRIPTORS = __webpack_require__(8); + var SPECIES = __webpack_require__(6)('species'); + + module.exports = function (KEY) { + var C = global[KEY]; + if (DESCRIPTORS && C && !C[SPECIES]) + dP.f(C, SPECIES, { + configurable: true, + get: function () { + return this; + }, + }); + }; + + /***/ + }, + /* 57 */ + /***/ function (module, exports) { + module.exports = function (it, Constructor, name, forbiddenField) { + if (!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)) { + throw TypeError(name + ': incorrect invocation!'); + } + return it; + }; + + /***/ + }, + /* 58 */ + /***/ function (module, exports, __webpack_require__) { + var ctx = __webpack_require__(24); + var call = __webpack_require__(190); + var isArrayIter = __webpack_require__(128); + var anObject = __webpack_require__(2); + var toLength = __webpack_require__(7); + var getIterFn = __webpack_require__(130); + var BREAK = {}; + var RETURN = {}; + var exports = (module.exports = function (iterable, entries, fn, that, ITERATOR) { + var iterFn = ITERATOR + ? function () { + return iterable; + } + : getIterFn(iterable); + var f = ctx(fn, that, entries ? 2 : 1); + var index = 0; + var length, step, iterator, result; + if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!'); + // fast case for arrays with default iterator + if (isArrayIter(iterFn)) + for (length = toLength(iterable.length); length > index; index++) { + result = entries ? f(anObject((step = iterable[index]))[0], step[1]) : f(iterable[index]); + if (result === BREAK || result === RETURN) return result; + } + else + for (iterator = iterFn.call(iterable); !(step = iterator.next()).done; ) { + result = call(iterator, f, step.value, entries); + if (result === BREAK || result === RETURN) return result; + } + }); + exports.BREAK = BREAK; + exports.RETURN = RETURN; + + /***/ + }, + /* 59 */ + /***/ function (module, exports, __webpack_require__) { + var redefine = __webpack_require__(16); + module.exports = function (target, src, safe) { + for (var key in src) redefine(target, key, src[key], safe); + return target; + }; + + /***/ + }, + /* 60 */ + /***/ function (module, exports, __webpack_require__) { + var isObject = __webpack_require__(5); + module.exports = function (it, TYPE) { + if (!isObject(it) || it._t !== TYPE) throw TypeError('Incompatible receiver, ' + TYPE + ' required!'); + return it; + }; + + /***/ + }, + /* 61 */ + /***/ function (module, exports, __webpack_require__) { + // to indexed object, toObject with fallback for non-array-like ES3 strings + var IObject = __webpack_require__(140); + var defined = __webpack_require__(142); + module.exports = function (it) { + return IObject(defined(it)); + }; + + /***/ + }, + /* 62 */ + /***/ function (module, exports) { + module.exports = function (exec) { + try { + return !!exec(); + } catch (e) { + return true; + } + }; + + /***/ + }, + /* 63 */ + /***/ function (module, exports, __webpack_require__) { + var isObject = __webpack_require__(35); + module.exports = function (it) { + if (!isObject(it)) throw TypeError(it + ' is not an object!'); + return it; + }; + + /***/ + }, + /* 64 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /* +object-assign +(c) Sindre Sorhus +@license MIT +*/ + + /* eslint-disable no-unused-vars */ + var getOwnPropertySymbols = Object.getOwnPropertySymbols; + var hasOwnProperty = Object.prototype.hasOwnProperty; + var propIsEnumerable = Object.prototype.propertyIsEnumerable; + + function toObject(val) { + if (val === null || val === undefined) { + throw new TypeError('Object.assign cannot be called with null or undefined'); + } + + return Object(val); + } + + function shouldUseNative() { + try { + if (!Object.assign) { + return false; + } + + // Detect buggy property enumeration order in older V8 versions. + + // https://bugs.chromium.org/p/v8/issues/detail?id=4118 + var test1 = new String('abc'); // eslint-disable-line no-new-wrappers + test1[5] = 'de'; + if (Object.getOwnPropertyNames(test1)[0] === '5') { + return false; + } + + // https://bugs.chromium.org/p/v8/issues/detail?id=3056 + var test2 = {}; + for (var i = 0; i < 10; i++) { + test2['_' + String.fromCharCode(i)] = i; + } + var order2 = Object.getOwnPropertyNames(test2).map(function (n) { + return test2[n]; + }); + if (order2.join('') !== '0123456789') { + return false; + } + + // https://bugs.chromium.org/p/v8/issues/detail?id=3056 + var test3 = {}; + 'abcdefghijklmnopqrst'.split('').forEach(function (letter) { + test3[letter] = letter; + }); + if (Object.keys(Object.assign({}, test3)).join('') !== 'abcdefghijklmnopqrst') { + return false; + } + + return true; + } catch (err) { + // We don't expect any of the above to throw, but better to be safe. + return false; + } + } + + module.exports = shouldUseNative() + ? Object.assign + : function (target, source) { + var from; + var to = toObject(target); + var symbols; + + for (var s = 1; s < arguments.length; s++) { + from = Object(arguments[s]); + + for (var key in from) { + if (hasOwnProperty.call(from, key)) { + to[key] = from[key]; + } + } + + if (getOwnPropertySymbols) { + symbols = getOwnPropertySymbols(from); + for (var i = 0; i < symbols.length; i++) { + if (propIsEnumerable.call(from, symbols[i])) { + to[symbols[i]] = from[symbols[i]]; + } + } + } + } + + return to; + }; + + /***/ + }, + /* 65 */ + /***/ function (module, exports, __webpack_require__) { + var def = __webpack_require__(9).f; + var has = __webpack_require__(18); + var TAG = __webpack_require__(6)('toStringTag'); + + module.exports = function (it, tag, stat) { + if (it && !has((it = stat ? it : it.prototype), TAG)) + def(it, TAG, { configurable: true, value: tag }); + }; + + /***/ + }, + /* 66 */ + /***/ function (module, exports, __webpack_require__) { + // getting tag from 19.1.3.6 Object.prototype.toString() + var cof = __webpack_require__(25); + var TAG = __webpack_require__(6)('toStringTag'); + // ES3 wrong here + var ARG = + cof( + (function () { + return arguments; + })(), + ) == 'Arguments'; + + // fallback for IE11 Script Access Denied error + var tryGet = function (it, key) { + try { + return it[key]; + } catch (e) { + /* empty */ + } + }; + + module.exports = function (it) { + var O, T, B; + return it === undefined + ? 'Undefined' + : it === null + ? 'Null' + : // @@toStringTag case + typeof (T = tryGet((O = Object(it)), TAG)) == 'string' + ? T + : // builtinTag case + ARG + ? cof(O) + : // ES3 arguments fallback + (B = cof(O)) == 'Object' && typeof O.callee == 'function' + ? 'Arguments' + : B; + }; + + /***/ + }, + /* 67 */ + /***/ function (module, exports, __webpack_require__) { + var $export = __webpack_require__(0); + var defined = __webpack_require__(32); + var fails = __webpack_require__(4); + var spaces = __webpack_require__(119); + var space = '[' + spaces + ']'; + var non = '\u200b\u0085'; + var ltrim = RegExp('^' + space + space + '*'); + var rtrim = RegExp(space + space + '*$'); + + var exporter = function (KEY, exec, ALIAS) { + var exp = {}; + var FORCE = fails(function () { + return !!spaces[KEY]() || non[KEY]() != non; + }); + var fn = (exp[KEY] = FORCE ? exec(trim) : spaces[KEY]); + if (ALIAS) exp[ALIAS] = fn; + $export($export.P + $export.F * FORCE, 'String', exp); + }; + + // 1 -> String#trimLeft + // 2 -> String#trimRight + // 3 -> String#trim + var trim = (exporter.trim = function (string, TYPE) { + string = String(defined(string)); + if (TYPE & 1) string = string.replace(ltrim, ''); + if (TYPE & 2) string = string.replace(rtrim, ''); + return string; + }); + + module.exports = exporter; + + /***/ + }, + /* 68 */ + /***/ function (module, exports) { + module.exports = {}; + + /***/ + }, + /* 69 */ + /***/ function (module, exports, __webpack_require__) { + // optional / simple context binding + var aFunction = __webpack_require__(216); + module.exports = function (fn, that, length) { + aFunction(fn); + if (that === undefined) return fn; + switch (length) { + case 1: + return function (a) { + return fn.call(that, a); + }; + case 2: + return function (a, b) { + return fn.call(that, a, b); + }; + case 3: + return function (a, b, c) { + return fn.call(that, a, b, c); + }; + } + return function (/* ...args */) { + return fn.apply(that, arguments); + }; + }; + + /***/ + }, + /* 70 */ + /***/ function (module, exports, __webpack_require__) { + // 7.1.13 ToObject(argument) + var defined = __webpack_require__(142); + module.exports = function (it) { + return Object(defined(it)); + }; + + /***/ + }, + /* 71 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = routerWarning; + /* unused harmony export _resetWarned */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(47); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_warning__, + ); + + var warned = {}; + + function routerWarning(falseToWarn, message) { + // Only issue deprecation warnings once. + if (message.indexOf('deprecated') !== -1) { + if (warned[message]) { + return; + } + + warned[message] = true; + } + + message = '[react-router] ' + message; + + for ( + var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; + _key < _len; + _key++ + ) { + args[_key - 2] = arguments[_key]; + } + + __WEBPACK_IMPORTED_MODULE_0_warning___default.a.apply(undefined, [falseToWarn, message].concat(args)); + } + + function _resetWarned() { + warned = {}; + } + + /***/ + }, + /* 72 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* unused harmony export compilePattern */ + /* harmony export (immutable) */ __webpack_exports__['c'] = matchPattern; + /* harmony export (immutable) */ __webpack_exports__['b'] = getParamNames; + /* unused harmony export getParams */ + /* harmony export (immutable) */ __webpack_exports__['a'] = formatPattern; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant__ = __webpack_require__(14); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_invariant__, + ); + + function escapeRegExp(string) { + return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); + } + + function _compilePattern(pattern) { + var regexpSource = ''; + var paramNames = []; + var tokens = []; + + var match = void 0, + lastIndex = 0, + matcher = /:([a-zA-Z_$][a-zA-Z0-9_$]*)|\*\*|\*|\(|\)|\\\(|\\\)/g; + while ((match = matcher.exec(pattern))) { + if (match.index !== lastIndex) { + tokens.push(pattern.slice(lastIndex, match.index)); + regexpSource += escapeRegExp(pattern.slice(lastIndex, match.index)); + } + + if (match[1]) { + regexpSource += '([^/]+)'; + paramNames.push(match[1]); + } else if (match[0] === '**') { + regexpSource += '(.*)'; + paramNames.push('splat'); + } else if (match[0] === '*') { + regexpSource += '(.*?)'; + paramNames.push('splat'); + } else if (match[0] === '(') { + regexpSource += '(?:'; + } else if (match[0] === ')') { + regexpSource += ')?'; + } else if (match[0] === '\\(') { + regexpSource += '\\('; + } else if (match[0] === '\\)') { + regexpSource += '\\)'; + } + + tokens.push(match[0]); + + lastIndex = matcher.lastIndex; + } + + if (lastIndex !== pattern.length) { + tokens.push(pattern.slice(lastIndex, pattern.length)); + regexpSource += escapeRegExp(pattern.slice(lastIndex, pattern.length)); + } + + return { + pattern: pattern, + regexpSource: regexpSource, + paramNames: paramNames, + tokens: tokens, + }; + } + + var CompiledPatternsCache = Object.create(null); + + function compilePattern(pattern) { + if (!CompiledPatternsCache[pattern]) CompiledPatternsCache[pattern] = _compilePattern(pattern); + + return CompiledPatternsCache[pattern]; + } + + /** + * Attempts to match a pattern on the given pathname. Patterns may use + * the following special characters: + * + * - :paramName Matches a URL segment up to the next /, ?, or #. The + * captured string is considered a "param" + * - () Wraps a segment of the URL that is optional + * - * Consumes (non-greedy) all characters up to the next + * character in the pattern, or to the end of the URL if + * there is none + * - ** Consumes (greedy) all characters up to the next character + * in the pattern, or to the end of the URL if there is none + * + * The function calls callback(error, matched) when finished. + * The return value is an object with the following properties: + * + * - remainingPathname + * - paramNames + * - paramValues + */ + function matchPattern(pattern, pathname) { + // Ensure pattern starts with leading slash for consistency with pathname. + if (pattern.charAt(0) !== '/') { + pattern = '/' + pattern; + } + + var _compilePattern2 = compilePattern(pattern), + regexpSource = _compilePattern2.regexpSource, + paramNames = _compilePattern2.paramNames, + tokens = _compilePattern2.tokens; + + if (pattern.charAt(pattern.length - 1) !== '/') { + regexpSource += '/?'; // Allow optional path separator at end. + } + + // Special-case patterns like '*' for catch-all routes. + if (tokens[tokens.length - 1] === '*') { + regexpSource += '$'; + } + + var match = pathname.match(new RegExp('^' + regexpSource, 'i')); + if (match == null) { + return null; + } + + var matchedPath = match[0]; + var remainingPathname = pathname.substr(matchedPath.length); + + if (remainingPathname) { + // Require that the match ends at a path separator, if we didn't match + // the full path, so any remaining pathname is a new path segment. + if (matchedPath.charAt(matchedPath.length - 1) !== '/') { + return null; + } + + // If there is a remaining pathname, treat the path separator as part of + // the remaining pathname for properly continuing the match. + remainingPathname = '/' + remainingPathname; + } + + return { + remainingPathname: remainingPathname, + paramNames: paramNames, + paramValues: match.slice(1).map(function (v) { + return v && decodeURIComponent(v); + }), + }; + } + + function getParamNames(pattern) { + return compilePattern(pattern).paramNames; + } + + function getParams(pattern, pathname) { + var match = matchPattern(pattern, pathname); + if (!match) { + return null; + } + + var paramNames = match.paramNames, + paramValues = match.paramValues; + + var params = {}; + + paramNames.forEach(function (paramName, index) { + params[paramName] = paramValues[index]; + }); + + return params; + } + + /** + * Returns a version of the given pattern with params interpolated. Throws + * if there is a dynamic segment of the pattern for which there is no param. + */ + function formatPattern(pattern, params) { + params = params || {}; + + var _compilePattern3 = compilePattern(pattern), + tokens = _compilePattern3.tokens; + + var parenCount = 0, + pathname = '', + splatIndex = 0, + parenHistory = []; + + var token = void 0, + paramName = void 0, + paramValue = void 0; + for (var i = 0, len = tokens.length; i < len; ++i) { + token = tokens[i]; + + if (token === '*' || token === '**') { + paramValue = Array.isArray(params.splat) ? params.splat[splatIndex++] : params.splat; + + !(paramValue != null || parenCount > 0) + ? true + ? __WEBPACK_IMPORTED_MODULE_0_invariant___default()( + false, + 'Missing splat #%s for path "%s"', + splatIndex, + pattern, + ) + : invariant(false) + : void 0; + + if (paramValue != null) pathname += encodeURI(paramValue); + } else if (token === '(') { + parenHistory[parenCount] = ''; + parenCount += 1; + } else if (token === ')') { + var parenText = parenHistory.pop(); + parenCount -= 1; + + if (parenCount) parenHistory[parenCount - 1] += parenText; + else pathname += parenText; + } else if (token === '\\(') { + pathname += '('; + } else if (token === '\\)') { + pathname += ')'; + } else if (token.charAt(0) === ':') { + paramName = token.substring(1); + paramValue = params[paramName]; + + !(paramValue != null || parenCount > 0) + ? true + ? __WEBPACK_IMPORTED_MODULE_0_invariant___default()( + false, + 'Missing "%s" parameter for path "%s"', + paramName, + pattern, + ) + : invariant(false) + : void 0; + + if (paramValue == null) { + if (parenCount) { + parenHistory[parenCount - 1] = ''; + + var curTokenIdx = tokens.indexOf(token); + var tokensSubset = tokens.slice(curTokenIdx, tokens.length); + var nextParenIdx = -1; + + for (var _i = 0; _i < tokensSubset.length; _i++) { + if (tokensSubset[_i] == ')') { + nextParenIdx = _i; + break; + } + } + + !(nextParenIdx > 0) + ? true + ? __WEBPACK_IMPORTED_MODULE_0_invariant___default()( + false, + 'Path "%s" is missing end paren at segment "%s"', + pattern, + tokensSubset.join(''), + ) + : invariant(false) + : void 0; + + // jump to ending paren + i = curTokenIdx + nextParenIdx - 1; + } + } else if (parenCount) parenHistory[parenCount - 1] += encodeURIComponent(paramValue); + else pathname += encodeURIComponent(paramValue); + } else { + if (parenCount) parenHistory[parenCount - 1] += token; + else pathname += token; + } + } + + !(parenCount <= 0) + ? true + ? __WEBPACK_IMPORTED_MODULE_0_invariant___default()( + false, + 'Path "%s" is missing end paren', + pattern, + ) + : invariant(false) + : void 0; + + return pathname.replace(/\/+/g, '/'); + } + + /***/ + }, + /* 73 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + exports.locationsAreEqual = + exports.statesAreEqual = + exports.createLocation = + exports.createQuery = + undefined; + + var _typeof = + typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' + ? function (obj) { + return typeof obj; + } + : function (obj) { + return obj && + typeof Symbol === 'function' && + obj.constructor === Symbol && + obj !== Symbol.prototype + ? 'symbol' + : typeof obj; + }; + + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + var _invariant = __webpack_require__(14); + + var _invariant2 = _interopRequireDefault(_invariant); + + var _warning = __webpack_require__(47); + + var _warning2 = _interopRequireDefault(_warning); + + var _PathUtils = __webpack_require__(49); + + var _Actions = __webpack_require__(111); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + var createQuery = (exports.createQuery = function createQuery(props) { + return _extends(Object.create(null), props); + }); + + var createLocation = (exports.createLocation = function createLocation() { + var input = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '/'; + var action = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _Actions.POP; + var key = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null; + + var object = typeof input === 'string' ? (0, _PathUtils.parsePath)(input) : input; + + true + ? (0, _warning2.default)( + !object.path, + 'Location descriptor objects should have a `pathname`, not a `path`.', + ) + : void 0; + + var pathname = object.pathname || '/'; + var search = object.search || ''; + var hash = object.hash || ''; + var state = object.state; + + return { + pathname: pathname, + search: search, + hash: hash, + state: state, + action: action, + key: key, + }; + }); + + var isDate = function isDate(object) { + return Object.prototype.toString.call(object) === '[object Date]'; + }; + + var statesAreEqual = (exports.statesAreEqual = function statesAreEqual(a, b) { + if (a === b) return true; + + var typeofA = typeof a === 'undefined' ? 'undefined' : _typeof(a); + var typeofB = typeof b === 'undefined' ? 'undefined' : _typeof(b); + + if (typeofA !== typeofB) return false; + + !(typeofA !== 'function') + ? true + ? (0, _invariant2.default)(false, 'You must not store functions in location state') + : (0, _invariant2.default)(false) + : void 0; + + // Not the same object, but same type. + if (typeofA === 'object') { + !!(isDate(a) && isDate(b)) + ? true + ? (0, _invariant2.default)(false, 'You must not store Date objects in location state') + : (0, _invariant2.default)(false) + : void 0; + + if (!Array.isArray(a)) { + var keysofA = Object.keys(a); + var keysofB = Object.keys(b); + return ( + keysofA.length === keysofB.length && + keysofA.every(function (key) { + return statesAreEqual(a[key], b[key]); + }) + ); + } + + return ( + Array.isArray(b) && + a.length === b.length && + a.every(function (item, index) { + return statesAreEqual(item, b[index]); + }) + ); + } + + // All other serializable types (string, number, boolean) + // should be strict equal. + return false; + }); + + var locationsAreEqual = (exports.locationsAreEqual = function locationsAreEqual(a, b) { + return ( + a.key === b.key && + // a.action === b.action && // Different action !== location change. + a.pathname === b.pathname && + a.search === b.search && + a.hash === b.hash && + statesAreEqual(a.state, b.state) + ); + }); + + /***/ + }, + /* 74 */ + /***/ function (module, exports, __webpack_require__) { + var core = __webpack_require__(23); + var global = __webpack_require__(3); + var SHARED = '__core-js_shared__'; + var store = global[SHARED] || (global[SHARED] = {}); + + (module.exports = function (key, value) { + return store[key] || (store[key] = value !== undefined ? value : {}); + })('versions', []).push({ + version: core.version, + mode: __webpack_require__(42) ? 'pure' : 'global', + copyright: '© 2019 Denis Pushkarev (zloirock.ru)', + }); + + /***/ + }, + /* 75 */ + /***/ function (module, exports, __webpack_require__) { + // fallback for non-array-like ES3 and non-enumerable old V8 strings + var cof = __webpack_require__(25); + // eslint-disable-next-line no-prototype-builtins + module.exports = Object('z').propertyIsEnumerable(0) + ? Object + : function (it) { + return cof(it) == 'String' ? it.split('') : Object(it); + }; + + /***/ + }, + /* 76 */ + /***/ function (module, exports) { + exports.f = {}.propertyIsEnumerable; + + /***/ + }, + /* 77 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // 21.2.5.3 get RegExp.prototype.flags + var anObject = __webpack_require__(2); + module.exports = function () { + var that = anObject(this); + var result = ''; + if (that.global) result += 'g'; + if (that.ignoreCase) result += 'i'; + if (that.multiline) result += 'm'; + if (that.unicode) result += 'u'; + if (that.sticky) result += 'y'; + return result; + }; + + /***/ + }, + /* 78 */ + /***/ function (module, exports, __webpack_require__) { + // 7.3.20 SpeciesConstructor(O, defaultConstructor) + var anObject = __webpack_require__(2); + var aFunction = __webpack_require__(12); + var SPECIES = __webpack_require__(6)('species'); + module.exports = function (O, D) { + var C = anObject(O).constructor; + var S; + return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S); + }; + + /***/ + }, + /* 79 */ + /***/ function (module, exports) { + module.exports = function (bitmap, value) { + return { + enumerable: !(bitmap & 1), + configurable: !(bitmap & 2), + writable: !(bitmap & 4), + value: value, + }; + }; + + /***/ + }, + /* 80 */ + /***/ function (module, exports) { + module.exports = {}; + + /***/ + }, + /* 81 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.14 / 15.2.3.14 Object.keys(O) + var $keys = __webpack_require__(217); + var enumBugKeys = __webpack_require__(151); + + module.exports = + Object.keys || + function keys(O) { + return $keys(O, enumBugKeys); + }; + + /***/ + }, + /* 82 */ + /***/ function (module, exports, __webpack_require__) { + var META = __webpack_require__(104)('meta'); + var isObject = __webpack_require__(35); + var has = __webpack_require__(45); + var setDesc = __webpack_require__(30).f; + var id = 0; + var isExtensible = + Object.isExtensible || + function () { + return true; + }; + var FREEZE = !__webpack_require__(62)(function () { + return isExtensible(Object.preventExtensions({})); + }); + var setMeta = function (it) { + setDesc(it, META, { + value: { + i: 'O' + ++id, // object ID + w: {}, // weak collections IDs + }, + }); + }; + var fastKey = function (it, create) { + // return primitive with prefix + if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; + if (!has(it, META)) { + // can't set metadata to uncaught frozen object + if (!isExtensible(it)) return 'F'; + // not necessary to add metadata + if (!create) return 'E'; + // add missing metadata + setMeta(it); + // return object ID + } + return it[META].i; + }; + var getWeak = function (it, create) { + if (!has(it, META)) { + // can't set metadata to uncaught frozen object + if (!isExtensible(it)) return true; + // not necessary to add metadata + if (!create) return false; + // add missing metadata + setMeta(it); + // return hash weak collections IDs + } + return it[META].w; + }; + // add metadata on freeze-family methods calling + var onFreeze = function (it) { + if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it); + return it; + }; + var meta = (module.exports = { + KEY: META, + NEED: false, + fastKey: fastKey, + getWeak: getWeak, + onFreeze: onFreeze, + }); + + /***/ + }, + /* 83 */ + /***/ function (module, exports, __webpack_require__) { + var ctx = __webpack_require__(69); + var call = __webpack_require__(222); + var isArrayIter = __webpack_require__(223); + var anObject = __webpack_require__(63); + var toLength = __webpack_require__(103); + var getIterFn = __webpack_require__(224); + var BREAK = {}; + var RETURN = {}; + var exports = (module.exports = function (iterable, entries, fn, that, ITERATOR) { + var iterFn = ITERATOR + ? function () { + return iterable; + } + : getIterFn(iterable); + var f = ctx(fn, that, entries ? 2 : 1); + var index = 0; + var length, step, iterator, result; + if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!'); + // fast case for arrays with default iterator + if (isArrayIter(iterFn)) + for (length = toLength(iterable.length); length > index; index++) { + result = entries ? f(anObject((step = iterable[index]))[0], step[1]) : f(iterable[index]); + if (result === BREAK || result === RETURN) return result; + } + else + for (iterator = iterFn.call(iterable); !(step = iterator.next()).done; ) { + result = call(iterator, f, step.value, entries); + if (result === BREAK || result === RETURN) return result; + } + }); + exports.BREAK = BREAK; + exports.RETURN = RETURN; + + /***/ + }, + /* 84 */ + /***/ function (module, exports, __webpack_require__) { + var isObject = __webpack_require__(35); + module.exports = function (it, TYPE) { + if (!isObject(it) || it._t !== TYPE) throw TypeError('Incompatible receiver, ' + TYPE + ' required!'); + return it; + }; + + /***/ + }, + /* 85 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Router__ = __webpack_require__(587); + /* unused harmony reexport Router */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Link__ = __webpack_require__(257); + /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, 'a', function () { + return __WEBPACK_IMPORTED_MODULE_1__Link__['a']; + }); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__IndexLink__ = __webpack_require__(594); + /* unused harmony reexport IndexLink */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__withRouter__ = __webpack_require__(595); + /* unused harmony reexport withRouter */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__IndexRedirect__ = __webpack_require__(597); + /* unused harmony reexport IndexRedirect */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__IndexRoute__ = __webpack_require__(598); + /* unused harmony reexport IndexRoute */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__Redirect__ = __webpack_require__(258); + /* unused harmony reexport Redirect */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__Route__ = __webpack_require__(599); + /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, 'b', function () { + return __WEBPACK_IMPORTED_MODULE_7__Route__['a']; + }); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__RouteUtils__ = __webpack_require__(48); + /* unused harmony reexport createRoutes */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__RouterContext__ = __webpack_require__(168); + /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, 'c', function () { + return __WEBPACK_IMPORTED_MODULE_9__RouterContext__['a']; + }); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__PropTypes__ = __webpack_require__(170); + /* unused harmony reexport locationShape */ + /* unused harmony reexport routerShape */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__match__ = __webpack_require__(600); + /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, 'd', function () { + return __WEBPACK_IMPORTED_MODULE_11__match__['a']; + }); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__useRouterHistory__ = __webpack_require__(262); + /* unused harmony reexport useRouterHistory */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__PatternUtils__ = __webpack_require__(72); + /* unused harmony reexport formatPattern */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__applyRouterMiddleware__ = + __webpack_require__(605); + /* unused harmony reexport applyRouterMiddleware */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__browserHistory__ = __webpack_require__(606); + /* unused harmony reexport browserHistory */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__hashHistory__ = __webpack_require__(609); + /* unused harmony reexport hashHistory */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__createMemoryHistory__ = __webpack_require__(259); + /* unused harmony reexport createMemoryHistory */ + /* components */ + + /* components (configuration) */ + + /* utils */ + + /* histories */ + + /***/ + }, + /* 86 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['c'] = falsy; + /* unused harmony export history */ + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'a', function () { + return component; + }); + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'b', function () { + return components; + }); + /* unused harmony export route */ + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'd', function () { + return routes; + }); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(10); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + + function falsy(props, propName, componentName) { + if (props[propName]) + return new Error('<' + componentName + '> should not have a "' + propName + '" prop'); + } + + var history = Object(__WEBPACK_IMPORTED_MODULE_0_prop_types__['shape'])({ + listen: __WEBPACK_IMPORTED_MODULE_0_prop_types__['func'].isRequired, + push: __WEBPACK_IMPORTED_MODULE_0_prop_types__['func'].isRequired, + replace: __WEBPACK_IMPORTED_MODULE_0_prop_types__['func'].isRequired, + go: __WEBPACK_IMPORTED_MODULE_0_prop_types__['func'].isRequired, + goBack: __WEBPACK_IMPORTED_MODULE_0_prop_types__['func'].isRequired, + goForward: __WEBPACK_IMPORTED_MODULE_0_prop_types__['func'].isRequired, + }); + + var component = Object(__WEBPACK_IMPORTED_MODULE_0_prop_types__['oneOfType'])([ + __WEBPACK_IMPORTED_MODULE_0_prop_types__['func'], + __WEBPACK_IMPORTED_MODULE_0_prop_types__['string'], + ]); + var components = Object(__WEBPACK_IMPORTED_MODULE_0_prop_types__['oneOfType'])([ + component, + __WEBPACK_IMPORTED_MODULE_0_prop_types__['object'], + ]); + var route = Object(__WEBPACK_IMPORTED_MODULE_0_prop_types__['oneOfType'])([ + __WEBPACK_IMPORTED_MODULE_0_prop_types__['object'], + __WEBPACK_IMPORTED_MODULE_0_prop_types__['element'], + ]); + var routes = Object(__WEBPACK_IMPORTED_MODULE_0_prop_types__['oneOfType'])([ + route, + Object(__WEBPACK_IMPORTED_MODULE_0_prop_types__['arrayOf'])(route), + ]); + + /***/ + }, + /* 87 */ + /***/ function (module, exports, __webpack_require__) { + // false -> Array#indexOf + // true -> Array#includes + var toIObject = __webpack_require__(19); + var toLength = __webpack_require__(7); + var toAbsoluteIndex = __webpack_require__(53); + module.exports = function (IS_INCLUDES) { + return function ($this, el, fromIndex) { + var O = toIObject($this); + var length = toLength(O.length); + var index = toAbsoluteIndex(fromIndex, length); + var value; + // Array#includes uses SameValueZero equality algorithm + // eslint-disable-next-line no-self-compare + if (IS_INCLUDES && el != el) + while (length > index) { + value = O[index++]; + // eslint-disable-next-line no-self-compare + if (value != value) return true; + // Array#indexOf ignores holes, Array#includes - not + } + else + for (; length > index; index++) + if (IS_INCLUDES || index in O) { + if (O[index] === el) return IS_INCLUDES || index || 0; + } + return !IS_INCLUDES && -1; + }; + }; + + /***/ + }, + /* 88 */ + /***/ function (module, exports) { + exports.f = Object.getOwnPropertySymbols; + + /***/ + }, + /* 89 */ + /***/ function (module, exports, __webpack_require__) { + // 7.2.2 IsArray(argument) + var cof = __webpack_require__(25); + module.exports = + Array.isArray || + function isArray(arg) { + return cof(arg) == 'Array'; + }; + + /***/ + }, + /* 90 */ + /***/ function (module, exports, __webpack_require__) { + var toInteger = __webpack_require__(26); + var defined = __webpack_require__(32); + // true -> String#at + // false -> String#codePointAt + module.exports = function (TO_STRING) { + return function (that, pos) { + var s = String(defined(that)); + var i = toInteger(pos); + var l = s.length; + var a, b; + if (i < 0 || i >= l) return TO_STRING ? '' : undefined; + a = s.charCodeAt(i); + return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff + ? TO_STRING + ? s.charAt(i) + : a + : TO_STRING + ? s.slice(i, i + 2) + : ((a - 0xd800) << 10) + (b - 0xdc00) + 0x10000; + }; + }; + + /***/ + }, + /* 91 */ + /***/ function (module, exports, __webpack_require__) { + // 7.2.8 IsRegExp(argument) + var isObject = __webpack_require__(5); + var cof = __webpack_require__(25); + var MATCH = __webpack_require__(6)('match'); + module.exports = function (it) { + var isRegExp; + return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp'); + }; + + /***/ + }, + /* 92 */ + /***/ function (module, exports, __webpack_require__) { + var ITERATOR = __webpack_require__(6)('iterator'); + var SAFE_CLOSING = false; + + try { + var riter = [7][ITERATOR](); + riter['return'] = function () { + SAFE_CLOSING = true; + }; + // eslint-disable-next-line no-throw-literal + Array.from(riter, function () { + throw 2; + }); + } catch (e) { + /* empty */ + } + + module.exports = function (exec, skipClosing) { + if (!skipClosing && !SAFE_CLOSING) return false; + var safe = false; + try { + var arr = [7]; + var iter = arr[ITERATOR](); + iter.next = function () { + return { done: (safe = true) }; + }; + arr[ITERATOR] = function () { + return iter; + }; + exec(arr); + } catch (e) { + /* empty */ + } + return safe; + }; + + /***/ + }, + /* 93 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var classof = __webpack_require__(66); + var builtinExec = RegExp.prototype.exec; + + // `RegExpExec` abstract operation + // https://tc39.github.io/ecma262/#sec-regexpexec + module.exports = function (R, S) { + var exec = R.exec; + if (typeof exec === 'function') { + var result = exec.call(R, S); + if (typeof result !== 'object') { + throw new TypeError('RegExp exec method returned something other than an Object or null'); + } + return result; + } + if (classof(R) !== 'RegExp') { + throw new TypeError('RegExp#exec called on incompatible receiver'); + } + return builtinExec.call(R, S); + }; + + /***/ + }, + /* 94 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + __webpack_require__(194); + var redefine = __webpack_require__(16); + var hide = __webpack_require__(15); + var fails = __webpack_require__(4); + var defined = __webpack_require__(32); + var wks = __webpack_require__(6); + var regexpExec = __webpack_require__(134); + + var SPECIES = wks('species'); + + var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () { + // #replace needs built-in support for named groups. + // #match works fine because it just return the exec results, even if it has + // a "grops" property. + var re = /./; + re.exec = function () { + var result = []; + result.groups = { a: '7' }; + return result; + }; + return ''.replace(re, '$<a>') !== '7'; + }); + + var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = (function () { + // Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec + var re = /(?:)/; + var originalExec = re.exec; + re.exec = function () { + return originalExec.apply(this, arguments); + }; + var result = 'ab'.split(re); + return result.length === 2 && result[0] === 'a' && result[1] === 'b'; + })(); + + module.exports = function (KEY, length, exec) { + var SYMBOL = wks(KEY); + + var DELEGATES_TO_SYMBOL = !fails(function () { + // String methods call symbol-named RegEp methods + var O = {}; + O[SYMBOL] = function () { + return 7; + }; + return ''[KEY](O) != 7; + }); + + var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL + ? !fails(function () { + // Symbol-named RegExp methods call .exec + var execCalled = false; + var re = /a/; + re.exec = function () { + execCalled = true; + return null; + }; + if (KEY === 'split') { + // RegExp[@@split] doesn't call the regex's exec method, but first creates + // a new one. We need to return the patched regex when creating the new one. + re.constructor = {}; + re.constructor[SPECIES] = function () { + return re; + }; + } + re[SYMBOL](''); + return !execCalled; + }) + : undefined; + + if ( + !DELEGATES_TO_SYMBOL || + !DELEGATES_TO_EXEC || + (KEY === 'replace' && !REPLACE_SUPPORTS_NAMED_GROUPS) || + (KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC) + ) { + var nativeRegExpMethod = /./[SYMBOL]; + var fns = exec( + defined, + SYMBOL, + ''[KEY], + function maybeCallNative(nativeMethod, regexp, str, arg2, forceStringMethod) { + if (regexp.exec === regexpExec) { + if (DELEGATES_TO_SYMBOL && !forceStringMethod) { + // The native String method already delegates to @@method (this + // polyfilled function), leasing to infinite recursion. + // We avoid it by directly calling the native @@method method. + return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) }; + } + return { done: true, value: nativeMethod.call(str, regexp, arg2) }; + } + return { done: false }; + }, + ); + var strfn = fns[0]; + var rxfn = fns[1]; + + redefine(String.prototype, KEY, strfn); + hide( + RegExp.prototype, + SYMBOL, + length == 2 + ? // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue) + // 21.2.5.11 RegExp.prototype[@@split](string, limit) + function (string, arg) { + return rxfn.call(string, this, arg); + } + : // 21.2.5.6 RegExp.prototype[@@match](string) + // 21.2.5.9 RegExp.prototype[@@search](string) + function (string) { + return rxfn.call(string, this); + }, + ); + } + }; + + /***/ + }, + /* 95 */ + /***/ function (module, exports, __webpack_require__) { + var global = __webpack_require__(3); + var navigator = global.navigator; + + module.exports = (navigator && navigator.userAgent) || ''; + + /***/ + }, + /* 96 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var global = __webpack_require__(3); + var $export = __webpack_require__(0); + var redefine = __webpack_require__(16); + var redefineAll = __webpack_require__(59); + var meta = __webpack_require__(43); + var forOf = __webpack_require__(58); + var anInstance = __webpack_require__(57); + var isObject = __webpack_require__(5); + var fails = __webpack_require__(4); + var $iterDetect = __webpack_require__(92); + var setToStringTag = __webpack_require__(65); + var inheritIfRequired = __webpack_require__(120); + + module.exports = function (NAME, wrapper, methods, common, IS_MAP, IS_WEAK) { + var Base = global[NAME]; + var C = Base; + var ADDER = IS_MAP ? 'set' : 'add'; + var proto = C && C.prototype; + var O = {}; + var fixMethod = function (KEY) { + var fn = proto[KEY]; + redefine( + proto, + KEY, + KEY == 'delete' + ? function (a) { + return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a); + } + : KEY == 'has' + ? function has(a) { + return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a); + } + : KEY == 'get' + ? function get(a) { + return IS_WEAK && !isObject(a) ? undefined : fn.call(this, a === 0 ? 0 : a); + } + : KEY == 'add' + ? function add(a) { + fn.call(this, a === 0 ? 0 : a); + return this; + } + : function set(a, b) { + fn.call(this, a === 0 ? 0 : a, b); + return this; + }, + ); + }; + if ( + typeof C != 'function' || + !( + IS_WEAK || + (proto.forEach && + !fails(function () { + new C().entries().next(); + })) + ) + ) { + // create collection constructor + C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER); + redefineAll(C.prototype, methods); + meta.NEED = true; + } else { + var instance = new C(); + // early implementations not supports chaining + var HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance; + // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false + var THROWS_ON_PRIMITIVES = fails(function () { + instance.has(1); + }); + // most early implementations doesn't supports iterables, most modern - not close it correctly + var ACCEPT_ITERABLES = $iterDetect(function (iter) { + new C(iter); + }); // eslint-disable-line no-new + // for early implementations -0 and +0 not the same + var BUGGY_ZERO = + !IS_WEAK && + fails(function () { + // V8 ~ Chromium 42- fails only with 5+ elements + var $instance = new C(); + var index = 5; + while (index--) $instance[ADDER](index, index); + return !$instance.has(-0); + }); + if (!ACCEPT_ITERABLES) { + C = wrapper(function (target, iterable) { + anInstance(target, C, NAME); + var that = inheritIfRequired(new Base(), target, C); + if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that); + return that; + }); + C.prototype = proto; + proto.constructor = C; + } + if (THROWS_ON_PRIMITIVES || BUGGY_ZERO) { + fixMethod('delete'); + fixMethod('has'); + IS_MAP && fixMethod('get'); + } + if (BUGGY_ZERO || HASNT_CHAINING) fixMethod(ADDER); + // weak collections should not contains .clear method + if (IS_WEAK && proto.clear) delete proto.clear; + } + + setToStringTag(C, NAME); + + O[NAME] = C; + $export($export.G + $export.W + $export.F * (C != Base), O); + + if (!IS_WEAK) common.setStrong(C, NAME, IS_MAP); + + return C; + }; + + /***/ + }, + /* 97 */ + /***/ function (module, exports, __webpack_require__) { + var global = __webpack_require__(3); + var hide = __webpack_require__(15); + var uid = __webpack_require__(51); + var TYPED = uid('typed_array'); + var VIEW = uid('view'); + var ABV = !!(global.ArrayBuffer && global.DataView); + var CONSTR = ABV; + var i = 0; + var l = 9; + var Typed; + + var TypedArrayConstructors = + 'Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array'.split( + ',', + ); + + while (i < l) { + if ((Typed = global[TypedArrayConstructors[i++]])) { + hide(Typed.prototype, TYPED, true); + hide(Typed.prototype, VIEW, true); + } else CONSTR = false; + } + + module.exports = { + ABV: ABV, + CONSTR: CONSTR, + TYPED: TYPED, + VIEW: VIEW, + }; + + /***/ + }, + /* 98 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // Forced replacement prototype accessors methods + module.exports = + __webpack_require__(42) || + !__webpack_require__(4)(function () { + var K = Math.random(); + // In FF throws only define methods + // eslint-disable-next-line no-undef, no-useless-call + __defineSetter__.call(null, K, function () { + /* empty */ + }); + delete __webpack_require__(3)[K]; + }); + + /***/ + }, + /* 99 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // https://tc39.github.io/proposal-setmap-offrom/ + var $export = __webpack_require__(0); + + module.exports = function (COLLECTION) { + $export($export.S, COLLECTION, { + of: function of() { + var length = arguments.length; + var A = new Array(length); + while (length--) A[length] = arguments[length]; + return new this(A); + }, + }); + }; + + /***/ + }, + /* 100 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // https://tc39.github.io/proposal-setmap-offrom/ + var $export = __webpack_require__(0); + var aFunction = __webpack_require__(12); + var ctx = __webpack_require__(24); + var forOf = __webpack_require__(58); + + module.exports = function (COLLECTION) { + $export($export.S, COLLECTION, { + from: function from(source /* , mapFn, thisArg */) { + var mapFn = arguments[1]; + var mapping, A, n, cb; + aFunction(this); + mapping = mapFn !== undefined; + if (mapping) aFunction(mapFn); + if (source == undefined) return new this(); + A = []; + if (mapping) { + n = 0; + cb = ctx(mapFn, arguments[2], 2); + forOf(source, false, function (nextItem) { + A.push(cb(nextItem, n++)); + }); + } else { + forOf(source, false, A.push, A); + } + return new this(A); + }, + }); + }; + + /***/ + }, + /* 101 */ + /***/ function (module, exports) { + exports.f = {}.propertyIsEnumerable; + + /***/ + }, + /* 102 */ + /***/ function (module, exports) { + module.exports = true; + + /***/ + }, + /* 103 */ + /***/ function (module, exports, __webpack_require__) { + // 7.1.15 ToLength + var toInteger = __webpack_require__(145); + var min = Math.min; + module.exports = function (it) { + return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 + }; + + /***/ + }, + /* 104 */ + /***/ function (module, exports) { + var id = 0; + var px = Math.random(); + module.exports = function (key) { + return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); + }; + + /***/ + }, + /* 105 */ + /***/ function (module, exports, __webpack_require__) { + var def = __webpack_require__(30).f; + var has = __webpack_require__(45); + var TAG = __webpack_require__(22)('toStringTag'); + + module.exports = function (it, tag, stat) { + if (it && !has((it = stat ? it : it.prototype), TAG)) + def(it, TAG, { configurable: true, value: tag }); + }; + + /***/ + }, + /* 106 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = __webpack_require__(508); + + /***/ + }, + /* 107 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + + var printWarning = function () {}; + + if (true) { + var ReactPropTypesSecret = __webpack_require__(231); + var loggedTypeFailures = {}; + var has = Function.call.bind(Object.prototype.hasOwnProperty); + + printWarning = function (text) { + var message = 'Warning: ' + text; + if (typeof console !== 'undefined') { + console.error(message); + } + try { + // --- Welcome to debugging React --- + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + throw new Error(message); + } catch (x) {} + }; + } + + /** + * Assert that the values match with the type specs. + * Error messages are memorized and will only be shown once. + * + * @param {object} typeSpecs Map of name to a ReactPropType + * @param {object} values Runtime values that need to be type-checked + * @param {string} location e.g. "prop", "context", "child context" + * @param {string} componentName Name of the component for error messages. + * @param {?Function} getStack Returns the component stack. + * @private + */ + function checkPropTypes(typeSpecs, values, location, componentName, getStack) { + if (true) { + for (var typeSpecName in typeSpecs) { + if (has(typeSpecs, typeSpecName)) { + var error; + // Prop type validation may throw. In case they do, we don't want to + // fail the render phase where it didn't fail before. So we log it. + // After these have been cleaned up, we'll let them throw. + try { + // This is intentionally an invariant that gets caught. It's the same + // behavior as without this statement except with a better message. + if (typeof typeSpecs[typeSpecName] !== 'function') { + var err = Error( + (componentName || 'React class') + + ': ' + + location + + ' type `' + + typeSpecName + + '` is invalid; ' + + 'it must be a function, usually from the `prop-types` package, but received `' + + typeof typeSpecs[typeSpecName] + + '`.', + ); + err.name = 'Invariant Violation'; + throw err; + } + error = typeSpecs[typeSpecName]( + values, + typeSpecName, + componentName, + location, + null, + ReactPropTypesSecret, + ); + } catch (ex) { + error = ex; + } + if (error && !(error instanceof Error)) { + printWarning( + (componentName || 'React class') + + ': type specification of ' + + location + + ' `' + + typeSpecName + + '` is invalid; the type checker ' + + 'function must return `null` or an `Error` but returned a ' + + typeof error + + '. ' + + 'You may have forgotten to pass an argument to the type checker ' + + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + + 'shape all require an argument).', + ); + } + if (error instanceof Error && !(error.message in loggedTypeFailures)) { + // Only monitor this failure once because there tends to be a lot of the + // same error. + loggedTypeFailures[error.message] = true; + + var stack = getStack ? getStack() : ''; + + printWarning('Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')); + } + } + } + } + } + + /** + * Resets warning cache when testing. + * + * @private + */ + checkPropTypes.resetWarningCache = function () { + if (true) { + loggedTypeFailures = {}; + } + }; + + module.exports = checkPropTypes; + + /***/ + }, + /* 108 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + if (false) { + module.exports = require('./cjs/react-dom-server.browser.production.min.js'); + } else { + module.exports = __webpack_require__(518); + } + + /***/ + }, + /* 109 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + if (false) { + module.exports = require('./cjs/react-is.production.min.js'); + } else { + module.exports = __webpack_require__(540); + } + + /***/ + }, + /* 110 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createStore__ = __webpack_require__(240); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__combineReducers__ = __webpack_require__(565); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__bindActionCreators__ = __webpack_require__(566); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__applyMiddleware__ = __webpack_require__(567); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__compose__ = __webpack_require__(244); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__utils_warning__ = __webpack_require__(243); + /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, 'd', function () { + return __WEBPACK_IMPORTED_MODULE_0__createStore__['b']; + }); + /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, 'c', function () { + return __WEBPACK_IMPORTED_MODULE_1__combineReducers__['a']; + }); + /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, 'b', function () { + return __WEBPACK_IMPORTED_MODULE_2__bindActionCreators__['a']; + }); + /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, 'a', function () { + return __WEBPACK_IMPORTED_MODULE_3__applyMiddleware__['a']; + }); + /* unused harmony reexport compose */ + + /* + * This is a dummy function to check if the function name has been altered by minification. + * If the function has been minified and NODE_ENV !== 'production', warn the user. + */ + function isCrushed() {} + + if ( + 'development' !== 'production' && + typeof isCrushed.name === 'string' && + isCrushed.name !== 'isCrushed' + ) { + Object(__WEBPACK_IMPORTED_MODULE_5__utils_warning__['a' /* default */])( + "You are currently using minified code outside of NODE_ENV === 'production'. " + + 'This means that you are running a slower development build of Redux. ' + + 'You can use loose-envify (https://github.com/zertosh/loose-envify) for browserify ' + + 'or DefinePlugin for webpack (http://stackoverflow.com/questions/30030031) ' + + 'to ensure you have the correct code for your production build.', + ); + } + + /***/ + }, + /* 111 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + /** + * Indicates that navigation was caused by a call to history.push. + */ + var PUSH = (exports.PUSH = 'PUSH'); + + /** + * Indicates that navigation was caused by a call to history.replace. + */ + var REPLACE = (exports.REPLACE = 'REPLACE'); + + /** + * Indicates that navigation was caused by some other action such + * as using a browser's back/forward buttons and/or manually manipulating + * the URL in a browser's location bar. This is the default. + * + * See https://developer.mozilla.org/en-US/docs/Web/API/WindowEventHandlers/onpopstate + * for more information. + */ + var POP = (exports.POP = 'POP'); + + /***/ + }, + /* 112 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + var addEventListener = (exports.addEventListener = function addEventListener(node, event, listener) { + return node.addEventListener + ? node.addEventListener(event, listener, false) + : node.attachEvent('on' + event, listener); + }); + + var removeEventListener = (exports.removeEventListener = function removeEventListener( + node, + event, + listener, + ) { + return node.removeEventListener + ? node.removeEventListener(event, listener, false) + : node.detachEvent('on' + event, listener); + }); + + /** + * Returns true if the HTML5 history API is supported. Taken from Modernizr. + * + * https://github.com/Modernizr/Modernizr/blob/master/LICENSE + * https://github.com/Modernizr/Modernizr/blob/master/feature-detects/history.js + * changed to avoid false negatives for Windows Phones: https://github.com/reactjs/react-router/issues/586 + */ + var supportsHistory = (exports.supportsHistory = function supportsHistory() { + var ua = window.navigator.userAgent; + + if ( + (ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && + ua.indexOf('Mobile Safari') !== -1 && + ua.indexOf('Chrome') === -1 && + ua.indexOf('Windows Phone') === -1 + ) + return false; + + return window.history && 'pushState' in window.history; + }); + + /** + * Returns false if using go(n) with hash history causes a full page reload. + */ + var supportsGoWithoutReloadUsingHash = (exports.supportsGoWithoutReloadUsingHash = + function supportsGoWithoutReloadUsingHash() { + return window.navigator.userAgent.indexOf('Firefox') === -1; + }); + + /** + * Returns true if browser fires popstate on hash change. + * IE10 and IE11 do not. + */ + var supportsPopstateOnHashchange = (exports.supportsPopstateOnHashchange = + function supportsPopstateOnHashchange() { + return window.navigator.userAgent.indexOf('Trident') === -1; + }); + + /** + * Returns true if a given popstate event is an extraneous WebKit event. + * Accounts for the fact that Chrome on iOS fires real popstate events + * containing undefined state when pressing the back button. + */ + var isExtraneousPopstateEvent = (exports.isExtraneousPopstateEvent = function isExtraneousPopstateEvent( + event, + ) { + return event.state === undefined && navigator.userAgent.indexOf('CriOS') === -1; + }); + + /***/ + }, + /* 113 */ + /***/ function (module, exports, __webpack_require__) { + var isObject = __webpack_require__(5); + var document = __webpack_require__(3).document; + // typeof document.createElement is 'object' in old IE + var is = isObject(document) && isObject(document.createElement); + module.exports = function (it) { + return is ? document.createElement(it) : {}; + }; + + /***/ + }, + /* 114 */ + /***/ function (module, exports, __webpack_require__) { + var global = __webpack_require__(3); + var core = __webpack_require__(23); + var LIBRARY = __webpack_require__(42); + var wksExt = __webpack_require__(176); + var defineProperty = __webpack_require__(9).f; + module.exports = function (name) { + var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {}); + if (name.charAt(0) != '_' && !(name in $Symbol)) + defineProperty($Symbol, name, { value: wksExt.f(name) }); + }; + + /***/ + }, + /* 115 */ + /***/ function (module, exports, __webpack_require__) { + var shared = __webpack_require__(74)('keys'); + var uid = __webpack_require__(51); + module.exports = function (key) { + return shared[key] || (shared[key] = uid(key)); + }; + + /***/ + }, + /* 116 */ + /***/ function (module, exports) { + // IE 8- don't enum bug keys + module.exports = + 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'.split( + ',', + ); + + /***/ + }, + /* 117 */ + /***/ function (module, exports, __webpack_require__) { + var document = __webpack_require__(3).document; + module.exports = document && document.documentElement; + + /***/ + }, + /* 118 */ + /***/ function (module, exports, __webpack_require__) { + // Works with __proto__ only. Old v8 can't work with null proto objects. + /* eslint-disable no-proto */ + var isObject = __webpack_require__(5); + var anObject = __webpack_require__(2); + var check = function (O, proto) { + anObject(O); + if (!isObject(proto) && proto !== null) throw TypeError(proto + ": can't set as prototype!"); + }; + module.exports = { + set: + Object.setPrototypeOf || + ('__proto__' in {} // eslint-disable-line + ? (function (test, buggy, set) { + try { + set = __webpack_require__(24)( + Function.call, + __webpack_require__(20).f(Object.prototype, '__proto__').set, + 2, + ); + set(test, []); + buggy = !(test instanceof Array); + } catch (e) { + buggy = true; + } + return function setPrototypeOf(O, proto) { + check(O, proto); + if (buggy) O.__proto__ = proto; + else set(O, proto); + return O; + }; + })({}, false) + : undefined), + check: check, + }; + + /***/ + }, + /* 119 */ + /***/ function (module, exports) { + module.exports = + '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' + + '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'; + + /***/ + }, + /* 120 */ + /***/ function (module, exports, __webpack_require__) { + var isObject = __webpack_require__(5); + var setPrototypeOf = __webpack_require__(118).set; + module.exports = function (that, target, C) { + var S = target.constructor; + var P; + if ( + S !== C && + typeof S == 'function' && + (P = S.prototype) !== C.prototype && + isObject(P) && + setPrototypeOf + ) { + setPrototypeOf(that, P); + } + return that; + }; + + /***/ + }, + /* 121 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var toInteger = __webpack_require__(26); + var defined = __webpack_require__(32); + + module.exports = function repeat(count) { + var str = String(defined(this)); + var res = ''; + var n = toInteger(count); + if (n < 0 || n == Infinity) throw RangeError("Count can't be negative"); + for (; n > 0; (n >>>= 1) && (str += str)) if (n & 1) res += str; + return res; + }; + + /***/ + }, + /* 122 */ + /***/ function (module, exports) { + // 20.2.2.28 Math.sign(x) + module.exports = + Math.sign || + function sign(x) { + // eslint-disable-next-line no-self-compare + return (x = +x) == 0 || x != x ? x : x < 0 ? -1 : 1; + }; + + /***/ + }, + /* 123 */ + /***/ function (module, exports) { + // 20.2.2.14 Math.expm1(x) + var $expm1 = Math.expm1; + module.exports = + !$expm1 || + // Old FF bug + $expm1(10) > 22025.465794806719 || + $expm1(10) < 22025.4657948067165168 || + // Tor Browser bug + $expm1(-2e-17) != -2e-17 + ? function expm1(x) { + return (x = +x) == 0 ? x : x > -1e-6 && x < 1e-6 ? x + (x * x) / 2 : Math.exp(x) - 1; + } + : $expm1; + + /***/ + }, + /* 124 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var LIBRARY = __webpack_require__(42); + var $export = __webpack_require__(0); + var redefine = __webpack_require__(16); + var hide = __webpack_require__(15); + var Iterators = __webpack_require__(68); + var $iterCreate = __webpack_require__(125); + var setToStringTag = __webpack_require__(65); + var getPrototypeOf = __webpack_require__(21); + var ITERATOR = __webpack_require__(6)('iterator'); + var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next` + var FF_ITERATOR = '@@iterator'; + var KEYS = 'keys'; + var VALUES = 'values'; + + var returnThis = function () { + return this; + }; + + module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) { + $iterCreate(Constructor, NAME, next); + var getMethod = function (kind) { + if (!BUGGY && kind in proto) return proto[kind]; + switch (kind) { + case KEYS: + return function keys() { + return new Constructor(this, kind); + }; + case VALUES: + return function values() { + return new Constructor(this, kind); + }; + } + return function entries() { + return new Constructor(this, kind); + }; + }; + var TAG = NAME + ' Iterator'; + var DEF_VALUES = DEFAULT == VALUES; + var VALUES_BUG = false; + var proto = Base.prototype; + var $native = proto[ITERATOR] || proto[FF_ITERATOR] || (DEFAULT && proto[DEFAULT]); + var $default = $native || getMethod(DEFAULT); + var $entries = DEFAULT ? (!DEF_VALUES ? $default : getMethod('entries')) : undefined; + var $anyNative = NAME == 'Array' ? proto.entries || $native : $native; + var methods, key, IteratorPrototype; + // Fix native + if ($anyNative) { + IteratorPrototype = getPrototypeOf($anyNative.call(new Base())); + if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) { + // Set @@toStringTag to native iterators + setToStringTag(IteratorPrototype, TAG, true); + // fix for some old engines + if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') + hide(IteratorPrototype, ITERATOR, returnThis); + } + } + // fix Array#{values, @@iterator}.name in V8 / FF + if (DEF_VALUES && $native && $native.name !== VALUES) { + VALUES_BUG = true; + $default = function values() { + return $native.call(this); + }; + } + // Define iterator + if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) { + hide(proto, ITERATOR, $default); + } + // Plug for library + Iterators[NAME] = $default; + Iterators[TAG] = returnThis; + if (DEFAULT) { + methods = { + values: DEF_VALUES ? $default : getMethod(VALUES), + keys: IS_SET ? $default : getMethod(KEYS), + entries: $entries, + }; + if (FORCED) + for (key in methods) { + if (!(key in proto)) redefine(proto, key, methods[key]); + } + else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); + } + return methods; + }; + + /***/ + }, + /* 125 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var create = __webpack_require__(54); + var descriptor = __webpack_require__(50); + var setToStringTag = __webpack_require__(65); + var IteratorPrototype = {}; + + // 25.1.2.1.1 %IteratorPrototype%[@@iterator]() + __webpack_require__(15)(IteratorPrototype, __webpack_require__(6)('iterator'), function () { + return this; + }); + + module.exports = function (Constructor, NAME, next) { + Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) }); + setToStringTag(Constructor, NAME + ' Iterator'); + }; + + /***/ + }, + /* 126 */ + /***/ function (module, exports, __webpack_require__) { + // helper for String#{startsWith, endsWith, includes} + var isRegExp = __webpack_require__(91); + var defined = __webpack_require__(32); + + module.exports = function (that, searchString, NAME) { + if (isRegExp(searchString)) throw TypeError('String#' + NAME + " doesn't accept regex!"); + return String(defined(that)); + }; + + /***/ + }, + /* 127 */ + /***/ function (module, exports, __webpack_require__) { + var MATCH = __webpack_require__(6)('match'); + module.exports = function (KEY) { + var re = /./; + try { + '/./'[KEY](re); + } catch (e) { + try { + re[MATCH] = false; + return !'/./'[KEY](re); + } catch (f) { + /* empty */ + } + } + return true; + }; + + /***/ + }, + /* 128 */ + /***/ function (module, exports, __webpack_require__) { + // check on default Array iterator + var Iterators = __webpack_require__(68); + var ITERATOR = __webpack_require__(6)('iterator'); + var ArrayProto = Array.prototype; + + module.exports = function (it) { + return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it); + }; + + /***/ + }, + /* 129 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $defineProperty = __webpack_require__(9); + var createDesc = __webpack_require__(50); + + module.exports = function (object, index, value) { + if (index in object) $defineProperty.f(object, index, createDesc(0, value)); + else object[index] = value; + }; + + /***/ + }, + /* 130 */ + /***/ function (module, exports, __webpack_require__) { + var classof = __webpack_require__(66); + var ITERATOR = __webpack_require__(6)('iterator'); + var Iterators = __webpack_require__(68); + module.exports = __webpack_require__(23).getIteratorMethod = function (it) { + if (it != undefined) return it[ITERATOR] || it['@@iterator'] || Iterators[classof(it)]; + }; + + /***/ + }, + /* 131 */ + /***/ function (module, exports, __webpack_require__) { + // 9.4.2.3 ArraySpeciesCreate(originalArray, length) + var speciesConstructor = __webpack_require__(361); + + module.exports = function (original, length) { + return new (speciesConstructor(original))(length); + }; + + /***/ + }, + /* 132 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + // 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length) + + var toObject = __webpack_require__(11); + var toAbsoluteIndex = __webpack_require__(53); + var toLength = __webpack_require__(7); + module.exports = function fill(value /* , start = 0, end = @length */) { + var O = toObject(this); + var length = toLength(O.length); + var aLen = arguments.length; + var index = toAbsoluteIndex(aLen > 1 ? arguments[1] : undefined, length); + var end = aLen > 2 ? arguments[2] : undefined; + var endPos = end === undefined ? length : toAbsoluteIndex(end, length); + while (endPos > index) O[index++] = value; + return O; + }; + + /***/ + }, + /* 133 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var addToUnscopables = __webpack_require__(44); + var step = __webpack_require__(193); + var Iterators = __webpack_require__(68); + var toIObject = __webpack_require__(19); + + // 22.1.3.4 Array.prototype.entries() + // 22.1.3.13 Array.prototype.keys() + // 22.1.3.29 Array.prototype.values() + // 22.1.3.30 Array.prototype[@@iterator]() + module.exports = __webpack_require__(124)( + Array, + 'Array', + function (iterated, kind) { + this._t = toIObject(iterated); // target + this._i = 0; // next index + this._k = kind; // kind + // 22.1.5.2.1 %ArrayIteratorPrototype%.next() + }, + function () { + var O = this._t; + var kind = this._k; + var index = this._i++; + if (!O || index >= O.length) { + this._t = undefined; + return step(1); + } + if (kind == 'keys') return step(0, index); + if (kind == 'values') return step(0, O[index]); + return step(0, [index, O[index]]); + }, + 'values', + ); + + // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) + Iterators.Arguments = Iterators.Array; + + addToUnscopables('keys'); + addToUnscopables('values'); + addToUnscopables('entries'); + + /***/ + }, + /* 134 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var regexpFlags = __webpack_require__(77); + + var nativeExec = RegExp.prototype.exec; + // This always refers to the native implementation, because the + // String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js, + // which loads this file before patching the method. + var nativeReplace = String.prototype.replace; + + var patchedExec = nativeExec; + + var LAST_INDEX = 'lastIndex'; + + var UPDATES_LAST_INDEX_WRONG = (function () { + var re1 = /a/, + re2 = /b*/g; + nativeExec.call(re1, 'a'); + nativeExec.call(re2, 'a'); + return re1[LAST_INDEX] !== 0 || re2[LAST_INDEX] !== 0; + })(); + + // nonparticipating capturing group, copied from es5-shim's String#split patch. + var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined; + + var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED; + + if (PATCH) { + patchedExec = function exec(str) { + var re = this; + var lastIndex, reCopy, match, i; + + if (NPCG_INCLUDED) { + reCopy = new RegExp('^' + re.source + '$(?!\\s)', regexpFlags.call(re)); + } + if (UPDATES_LAST_INDEX_WRONG) lastIndex = re[LAST_INDEX]; + + match = nativeExec.call(re, str); + + if (UPDATES_LAST_INDEX_WRONG && match) { + re[LAST_INDEX] = re.global ? match.index + match[0].length : lastIndex; + } + if (NPCG_INCLUDED && match && match.length > 1) { + // Fix browsers whose `exec` methods don't consistently return `undefined` + // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/ + // eslint-disable-next-line no-loop-func + nativeReplace.call(match[0], reCopy, function () { + for (i = 1; i < arguments.length - 2; i++) { + if (arguments[i] === undefined) match[i] = undefined; + } + }); + } + + return match; + }; + } + + module.exports = patchedExec; + + /***/ + }, + /* 135 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var at = __webpack_require__(90)(true); + + // `AdvanceStringIndex` abstract operation + // https://tc39.github.io/ecma262/#sec-advancestringindex + module.exports = function (S, index, unicode) { + return index + (unicode ? at(S, index).length : 1); + }; + + /***/ + }, + /* 136 */ + /***/ function (module, exports, __webpack_require__) { + var ctx = __webpack_require__(24); + var invoke = __webpack_require__(183); + var html = __webpack_require__(117); + var cel = __webpack_require__(113); + var global = __webpack_require__(3); + var process = global.process; + var setTask = global.setImmediate; + var clearTask = global.clearImmediate; + var MessageChannel = global.MessageChannel; + var Dispatch = global.Dispatch; + var counter = 0; + var queue = {}; + var ONREADYSTATECHANGE = 'onreadystatechange'; + var defer, channel, port; + var run = function () { + var id = +this; + // eslint-disable-next-line no-prototype-builtins + if (queue.hasOwnProperty(id)) { + var fn = queue[id]; + delete queue[id]; + fn(); + } + }; + var listener = function (event) { + run.call(event.data); + }; + // Node.js 0.9+ & IE10+ has setImmediate, otherwise: + if (!setTask || !clearTask) { + setTask = function setImmediate(fn) { + var args = []; + var i = 1; + while (arguments.length > i) args.push(arguments[i++]); + queue[++counter] = function () { + // eslint-disable-next-line no-new-func + invoke(typeof fn == 'function' ? fn : Function(fn), args); + }; + defer(counter); + return counter; + }; + clearTask = function clearImmediate(id) { + delete queue[id]; + }; + // Node.js 0.8- + if (__webpack_require__(25)(process) == 'process') { + defer = function (id) { + process.nextTick(ctx(run, id, 1)); + }; + // Sphere (JS game engine) Dispatch API + } else if (Dispatch && Dispatch.now) { + defer = function (id) { + Dispatch.now(ctx(run, id, 1)); + }; + // Browsers with MessageChannel, includes WebWorkers + } else if (MessageChannel) { + channel = new MessageChannel(); + port = channel.port2; + channel.port1.onmessage = listener; + defer = ctx(port.postMessage, port, 1); + // Browsers with postMessage, skip WebWorkers + // IE8 has postMessage, but it's sync & typeof its postMessage is 'object' + } else if (global.addEventListener && typeof postMessage == 'function' && !global.importScripts) { + defer = function (id) { + global.postMessage(id + '', '*'); + }; + global.addEventListener('message', listener, false); + // IE8- + } else if (ONREADYSTATECHANGE in cel('script')) { + defer = function (id) { + html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function () { + html.removeChild(this); + run.call(id); + }; + }; + // Rest old browsers + } else { + defer = function (id) { + setTimeout(ctx(run, id, 1), 0); + }; + } + } + module.exports = { + set: setTask, + clear: clearTask, + }; + + /***/ + }, + /* 137 */ + /***/ function (module, exports, __webpack_require__) { + var global = __webpack_require__(3); + var macrotask = __webpack_require__(136).set; + var Observer = global.MutationObserver || global.WebKitMutationObserver; + var process = global.process; + var Promise = global.Promise; + var isNode = __webpack_require__(25)(process) == 'process'; + + module.exports = function () { + var head, last, notify; + + var flush = function () { + var parent, fn; + if (isNode && (parent = process.domain)) parent.exit(); + while (head) { + fn = head.fn; + head = head.next; + try { + fn(); + } catch (e) { + if (head) notify(); + else last = undefined; + throw e; + } + } + last = undefined; + if (parent) parent.enter(); + }; + + // Node.js + if (isNode) { + notify = function () { + process.nextTick(flush); + }; + // browsers with MutationObserver, except iOS Safari - https://github.com/zloirock/core-js/issues/339 + } else if (Observer && !(global.navigator && global.navigator.standalone)) { + var toggle = true; + var node = document.createTextNode(''); + new Observer(flush).observe(node, { characterData: true }); // eslint-disable-line no-new + notify = function () { + node.data = toggle = !toggle; + }; + // environments with maybe non-completely correct, but existent Promise + } else if (Promise && Promise.resolve) { + // Promise.resolve without an argument throws an error in LG WebOS 2 + var promise = Promise.resolve(undefined); + notify = function () { + promise.then(flush); + }; + // for other environments - macrotask based on: + // - setImmediate + // - MessageChannel + // - window.postMessag + // - onreadystatechange + // - setTimeout + } else { + notify = function () { + // strange IE + webpack dev server bug - use .call(global) + macrotask.call(global, flush); + }; + } + + return function (fn) { + var task = { fn: fn, next: undefined }; + if (last) last.next = task; + if (!head) { + head = task; + notify(); + } + last = task; + }; + }; + + /***/ + }, + /* 138 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // 25.4.1.5 NewPromiseCapability(C) + var aFunction = __webpack_require__(12); + + function PromiseCapability(C) { + var resolve, reject; + this.promise = new C(function ($$resolve, $$reject) { + if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor'); + resolve = $$resolve; + reject = $$reject; + }); + this.resolve = aFunction(resolve); + this.reject = aFunction(reject); + } + + module.exports.f = function (C) { + return new PromiseCapability(C); + }; + + /***/ + }, + /* 139 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var global = __webpack_require__(3); + var DESCRIPTORS = __webpack_require__(8); + var LIBRARY = __webpack_require__(42); + var $typed = __webpack_require__(97); + var hide = __webpack_require__(15); + var redefineAll = __webpack_require__(59); + var fails = __webpack_require__(4); + var anInstance = __webpack_require__(57); + var toInteger = __webpack_require__(26); + var toLength = __webpack_require__(7); + var toIndex = __webpack_require__(203); + var gOPN = __webpack_require__(55).f; + var dP = __webpack_require__(9).f; + var arrayFill = __webpack_require__(132); + var setToStringTag = __webpack_require__(65); + var ARRAY_BUFFER = 'ArrayBuffer'; + var DATA_VIEW = 'DataView'; + var PROTOTYPE = 'prototype'; + var WRONG_LENGTH = 'Wrong length!'; + var WRONG_INDEX = 'Wrong index!'; + var $ArrayBuffer = global[ARRAY_BUFFER]; + var $DataView = global[DATA_VIEW]; + var Math = global.Math; + var RangeError = global.RangeError; + // eslint-disable-next-line no-shadow-restricted-names + var Infinity = global.Infinity; + var BaseBuffer = $ArrayBuffer; + var abs = Math.abs; + var pow = Math.pow; + var floor = Math.floor; + var log = Math.log; + var LN2 = Math.LN2; + var BUFFER = 'buffer'; + var BYTE_LENGTH = 'byteLength'; + var BYTE_OFFSET = 'byteOffset'; + var $BUFFER = DESCRIPTORS ? '_b' : BUFFER; + var $LENGTH = DESCRIPTORS ? '_l' : BYTE_LENGTH; + var $OFFSET = DESCRIPTORS ? '_o' : BYTE_OFFSET; + + // IEEE754 conversions based on https://github.com/feross/ieee754 + function packIEEE754(value, mLen, nBytes) { + var buffer = new Array(nBytes); + var eLen = nBytes * 8 - mLen - 1; + var eMax = (1 << eLen) - 1; + var eBias = eMax >> 1; + var rt = mLen === 23 ? pow(2, -24) - pow(2, -77) : 0; + var i = 0; + var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0; + var e, m, c; + value = abs(value); + // eslint-disable-next-line no-self-compare + if (value != value || value === Infinity) { + // eslint-disable-next-line no-self-compare + m = value != value ? 1 : 0; + e = eMax; + } else { + e = floor(log(value) / LN2); + if (value * (c = pow(2, -e)) < 1) { + e--; + c *= 2; + } + if (e + eBias >= 1) { + value += rt / c; + } else { + value += rt * pow(2, 1 - eBias); + } + if (value * c >= 2) { + e++; + c /= 2; + } + if (e + eBias >= eMax) { + m = 0; + e = eMax; + } else if (e + eBias >= 1) { + m = (value * c - 1) * pow(2, mLen); + e = e + eBias; + } else { + m = value * pow(2, eBias - 1) * pow(2, mLen); + e = 0; + } + } + for (; mLen >= 8; buffer[i++] = m & 255, m /= 256, mLen -= 8); + e = (e << mLen) | m; + eLen += mLen; + for (; eLen > 0; buffer[i++] = e & 255, e /= 256, eLen -= 8); + buffer[--i] |= s * 128; + return buffer; + } + function unpackIEEE754(buffer, mLen, nBytes) { + var eLen = nBytes * 8 - mLen - 1; + var eMax = (1 << eLen) - 1; + var eBias = eMax >> 1; + var nBits = eLen - 7; + var i = nBytes - 1; + var s = buffer[i--]; + var e = s & 127; + var m; + s >>= 7; + for (; nBits > 0; e = e * 256 + buffer[i], i--, nBits -= 8); + m = e & ((1 << -nBits) - 1); + e >>= -nBits; + nBits += mLen; + for (; nBits > 0; m = m * 256 + buffer[i], i--, nBits -= 8); + if (e === 0) { + e = 1 - eBias; + } else if (e === eMax) { + return m ? NaN : s ? -Infinity : Infinity; + } else { + m = m + pow(2, mLen); + e = e - eBias; + } + return (s ? -1 : 1) * m * pow(2, e - mLen); + } + + function unpackI32(bytes) { + return (bytes[3] << 24) | (bytes[2] << 16) | (bytes[1] << 8) | bytes[0]; + } + function packI8(it) { + return [it & 0xff]; + } + function packI16(it) { + return [it & 0xff, (it >> 8) & 0xff]; + } + function packI32(it) { + return [it & 0xff, (it >> 8) & 0xff, (it >> 16) & 0xff, (it >> 24) & 0xff]; + } + function packF64(it) { + return packIEEE754(it, 52, 8); + } + function packF32(it) { + return packIEEE754(it, 23, 4); + } + + function addGetter(C, key, internal) { + dP(C[PROTOTYPE], key, { + get: function () { + return this[internal]; + }, + }); + } + + function get(view, bytes, index, isLittleEndian) { + var numIndex = +index; + var intIndex = toIndex(numIndex); + if (intIndex + bytes > view[$LENGTH]) throw RangeError(WRONG_INDEX); + var store = view[$BUFFER]._b; + var start = intIndex + view[$OFFSET]; + var pack = store.slice(start, start + bytes); + return isLittleEndian ? pack : pack.reverse(); + } + function set(view, bytes, index, conversion, value, isLittleEndian) { + var numIndex = +index; + var intIndex = toIndex(numIndex); + if (intIndex + bytes > view[$LENGTH]) throw RangeError(WRONG_INDEX); + var store = view[$BUFFER]._b; + var start = intIndex + view[$OFFSET]; + var pack = conversion(+value); + for (var i = 0; i < bytes; i++) store[start + i] = pack[isLittleEndian ? i : bytes - i - 1]; + } + + if (!$typed.ABV) { + $ArrayBuffer = function ArrayBuffer(length) { + anInstance(this, $ArrayBuffer, ARRAY_BUFFER); + var byteLength = toIndex(length); + this._b = arrayFill.call(new Array(byteLength), 0); + this[$LENGTH] = byteLength; + }; + + $DataView = function DataView(buffer, byteOffset, byteLength) { + anInstance(this, $DataView, DATA_VIEW); + anInstance(buffer, $ArrayBuffer, DATA_VIEW); + var bufferLength = buffer[$LENGTH]; + var offset = toInteger(byteOffset); + if (offset < 0 || offset > bufferLength) throw RangeError('Wrong offset!'); + byteLength = byteLength === undefined ? bufferLength - offset : toLength(byteLength); + if (offset + byteLength > bufferLength) throw RangeError(WRONG_LENGTH); + this[$BUFFER] = buffer; + this[$OFFSET] = offset; + this[$LENGTH] = byteLength; + }; + + if (DESCRIPTORS) { + addGetter($ArrayBuffer, BYTE_LENGTH, '_l'); + addGetter($DataView, BUFFER, '_b'); + addGetter($DataView, BYTE_LENGTH, '_l'); + addGetter($DataView, BYTE_OFFSET, '_o'); + } + + redefineAll($DataView[PROTOTYPE], { + getInt8: function getInt8(byteOffset) { + return (get(this, 1, byteOffset)[0] << 24) >> 24; + }, + getUint8: function getUint8(byteOffset) { + return get(this, 1, byteOffset)[0]; + }, + getInt16: function getInt16(byteOffset /* , littleEndian */) { + var bytes = get(this, 2, byteOffset, arguments[1]); + return (((bytes[1] << 8) | bytes[0]) << 16) >> 16; + }, + getUint16: function getUint16(byteOffset /* , littleEndian */) { + var bytes = get(this, 2, byteOffset, arguments[1]); + return (bytes[1] << 8) | bytes[0]; + }, + getInt32: function getInt32(byteOffset /* , littleEndian */) { + return unpackI32(get(this, 4, byteOffset, arguments[1])); + }, + getUint32: function getUint32(byteOffset /* , littleEndian */) { + return unpackI32(get(this, 4, byteOffset, arguments[1])) >>> 0; + }, + getFloat32: function getFloat32(byteOffset /* , littleEndian */) { + return unpackIEEE754(get(this, 4, byteOffset, arguments[1]), 23, 4); + }, + getFloat64: function getFloat64(byteOffset /* , littleEndian */) { + return unpackIEEE754(get(this, 8, byteOffset, arguments[1]), 52, 8); + }, + setInt8: function setInt8(byteOffset, value) { + set(this, 1, byteOffset, packI8, value); + }, + setUint8: function setUint8(byteOffset, value) { + set(this, 1, byteOffset, packI8, value); + }, + setInt16: function setInt16(byteOffset, value /* , littleEndian */) { + set(this, 2, byteOffset, packI16, value, arguments[2]); + }, + setUint16: function setUint16(byteOffset, value /* , littleEndian */) { + set(this, 2, byteOffset, packI16, value, arguments[2]); + }, + setInt32: function setInt32(byteOffset, value /* , littleEndian */) { + set(this, 4, byteOffset, packI32, value, arguments[2]); + }, + setUint32: function setUint32(byteOffset, value /* , littleEndian */) { + set(this, 4, byteOffset, packI32, value, arguments[2]); + }, + setFloat32: function setFloat32(byteOffset, value /* , littleEndian */) { + set(this, 4, byteOffset, packF32, value, arguments[2]); + }, + setFloat64: function setFloat64(byteOffset, value /* , littleEndian */) { + set(this, 8, byteOffset, packF64, value, arguments[2]); + }, + }); + } else { + if ( + !fails(function () { + $ArrayBuffer(1); + }) || + !fails(function () { + new $ArrayBuffer(-1); // eslint-disable-line no-new + }) || + fails(function () { + new $ArrayBuffer(); // eslint-disable-line no-new + new $ArrayBuffer(1.5); // eslint-disable-line no-new + new $ArrayBuffer(NaN); // eslint-disable-line no-new + return $ArrayBuffer.name != ARRAY_BUFFER; + }) + ) { + $ArrayBuffer = function ArrayBuffer(length) { + anInstance(this, $ArrayBuffer); + return new BaseBuffer(toIndex(length)); + }; + var ArrayBufferProto = ($ArrayBuffer[PROTOTYPE] = BaseBuffer[PROTOTYPE]); + for (var keys = gOPN(BaseBuffer), j = 0, key; keys.length > j; ) { + if (!((key = keys[j++]) in $ArrayBuffer)) hide($ArrayBuffer, key, BaseBuffer[key]); + } + if (!LIBRARY) ArrayBufferProto.constructor = $ArrayBuffer; + } + // iOS Safari 7.x bug + var view = new $DataView(new $ArrayBuffer(2)); + var $setInt8 = $DataView[PROTOTYPE].setInt8; + view.setInt8(0, 2147483648); + view.setInt8(1, 2147483649); + if (view.getInt8(0) || !view.getInt8(1)) + redefineAll( + $DataView[PROTOTYPE], + { + setInt8: function setInt8(byteOffset, value) { + $setInt8.call(this, byteOffset, (value << 24) >> 24); + }, + setUint8: function setUint8(byteOffset, value) { + $setInt8.call(this, byteOffset, (value << 24) >> 24); + }, + }, + true, + ); + } + setToStringTag($ArrayBuffer, ARRAY_BUFFER); + setToStringTag($DataView, DATA_VIEW); + hide($DataView[PROTOTYPE], $typed.VIEW, true); + exports[ARRAY_BUFFER] = $ArrayBuffer; + exports[DATA_VIEW] = $DataView; + + /***/ + }, + /* 140 */ + /***/ function (module, exports, __webpack_require__) { + // fallback for non-array-like ES3 and non-enumerable old V8 strings + var cof = __webpack_require__(141); + // eslint-disable-next-line no-prototype-builtins + module.exports = Object('z').propertyIsEnumerable(0) + ? Object + : function (it) { + return cof(it) == 'String' ? it.split('') : Object(it); + }; + + /***/ + }, + /* 141 */ + /***/ function (module, exports) { + var toString = {}.toString; + + module.exports = function (it) { + return toString.call(it).slice(8, -1); + }; + + /***/ + }, + /* 142 */ + /***/ function (module, exports) { + // 7.2.1 RequireObjectCoercible(argument) + module.exports = function (it) { + if (it == undefined) throw TypeError("Can't call method on " + it); + return it; + }; + + /***/ + }, + /* 143 */ + /***/ function (module, exports, __webpack_require__) { + // 7.1.1 ToPrimitive(input [, PreferredType]) + var isObject = __webpack_require__(35); + // instead of the ES6 spec version, we didn't implement @@toPrimitive case + // and the second argument - flag - preferred type is a string + module.exports = function (it, S) { + if (!isObject(it)) return it; + var fn, val; + if (S && typeof (fn = it.toString) == 'function' && !isObject((val = fn.call(it)))) return val; + if (typeof (fn = it.valueOf) == 'function' && !isObject((val = fn.call(it)))) return val; + if (!S && typeof (fn = it.toString) == 'function' && !isObject((val = fn.call(it)))) return val; + throw TypeError("Can't convert object to primitive value"); + }; + + /***/ + }, + /* 144 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $at = __webpack_require__(482)(true); + + // 21.1.3.27 String.prototype[@@iterator]() + __webpack_require__(146)( + String, + 'String', + function (iterated) { + this._t = String(iterated); // target + this._i = 0; // next index + // 21.1.5.2.1 %StringIteratorPrototype%.next() + }, + function () { + var O = this._t; + var index = this._i; + var point; + if (index >= O.length) return { value: undefined, done: true }; + point = $at(O, index); + this._i += point.length; + return { value: point, done: false }; + }, + ); + + /***/ + }, + /* 145 */ + /***/ function (module, exports) { + // 7.1.4 ToInteger + var ceil = Math.ceil; + var floor = Math.floor; + module.exports = function (it) { + return isNaN((it = +it)) ? 0 : (it > 0 ? floor : ceil)(it); + }; + + /***/ + }, + /* 146 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var LIBRARY = __webpack_require__(102); + var $export = __webpack_require__(36); + var redefine = __webpack_require__(147); + var hide = __webpack_require__(46); + var Iterators = __webpack_require__(80); + var $iterCreate = __webpack_require__(483); + var setToStringTag = __webpack_require__(105); + var getPrototypeOf = __webpack_require__(488); + var ITERATOR = __webpack_require__(22)('iterator'); + var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next` + var FF_ITERATOR = '@@iterator'; + var KEYS = 'keys'; + var VALUES = 'values'; + + var returnThis = function () { + return this; + }; + + module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) { + $iterCreate(Constructor, NAME, next); + var getMethod = function (kind) { + if (!BUGGY && kind in proto) return proto[kind]; + switch (kind) { + case KEYS: + return function keys() { + return new Constructor(this, kind); + }; + case VALUES: + return function values() { + return new Constructor(this, kind); + }; + } + return function entries() { + return new Constructor(this, kind); + }; + }; + var TAG = NAME + ' Iterator'; + var DEF_VALUES = DEFAULT == VALUES; + var VALUES_BUG = false; + var proto = Base.prototype; + var $native = proto[ITERATOR] || proto[FF_ITERATOR] || (DEFAULT && proto[DEFAULT]); + var $default = $native || getMethod(DEFAULT); + var $entries = DEFAULT ? (!DEF_VALUES ? $default : getMethod('entries')) : undefined; + var $anyNative = NAME == 'Array' ? proto.entries || $native : $native; + var methods, key, IteratorPrototype; + // Fix native + if ($anyNative) { + IteratorPrototype = getPrototypeOf($anyNative.call(new Base())); + if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) { + // Set @@toStringTag to native iterators + setToStringTag(IteratorPrototype, TAG, true); + // fix for some old engines + if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') + hide(IteratorPrototype, ITERATOR, returnThis); + } + } + // fix Array#{values, @@iterator}.name in V8 / FF + if (DEF_VALUES && $native && $native.name !== VALUES) { + VALUES_BUG = true; + $default = function values() { + return $native.call(this); + }; + } + // Define iterator + if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) { + hide(proto, ITERATOR, $default); + } + // Plug for library + Iterators[NAME] = $default; + Iterators[TAG] = returnThis; + if (DEFAULT) { + methods = { + values: DEF_VALUES ? $default : getMethod(VALUES), + keys: IS_SET ? $default : getMethod(KEYS), + entries: $entries, + }; + if (FORCED) + for (key in methods) { + if (!(key in proto)) redefine(proto, key, methods[key]); + } + else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); + } + return methods; + }; + + /***/ + }, + /* 147 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = __webpack_require__(46); + + /***/ + }, + /* 148 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) + var anObject = __webpack_require__(63); + var dPs = __webpack_require__(484); + var enumBugKeys = __webpack_require__(151); + var IE_PROTO = __webpack_require__(149)('IE_PROTO'); + var Empty = function () { + /* empty */ + }; + var PROTOTYPE = 'prototype'; + + // Create object with fake `null` prototype: use iframe Object with cleared prototype + var createDict = function () { + // Thrash, waste and sodomy: IE GC bug + var iframe = __webpack_require__(214)('iframe'); + var i = enumBugKeys.length; + var lt = '<'; + var gt = '>'; + var iframeDocument; + iframe.style.display = 'none'; + __webpack_require__(487).appendChild(iframe); + iframe.src = 'javascript:'; // eslint-disable-line no-script-url + // createDict = iframe.contentWindow.Object; + // html.removeChild(iframe); + iframeDocument = iframe.contentWindow.document; + iframeDocument.open(); + iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); + iframeDocument.close(); + createDict = iframeDocument.F; + while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]]; + return createDict(); + }; + + module.exports = + Object.create || + function create(O, Properties) { + var result; + if (O !== null) { + Empty[PROTOTYPE] = anObject(O); + result = new Empty(); + Empty[PROTOTYPE] = null; + // add "__proto__" for Object.getPrototypeOf polyfill + result[IE_PROTO] = O; + } else result = createDict(); + return Properties === undefined ? result : dPs(result, Properties); + }; + + /***/ + }, + /* 149 */ + /***/ function (module, exports, __webpack_require__) { + var shared = __webpack_require__(150)('keys'); + var uid = __webpack_require__(104); + module.exports = function (key) { + return shared[key] || (shared[key] = uid(key)); + }; + + /***/ + }, + /* 150 */ + /***/ function (module, exports, __webpack_require__) { + var core = __webpack_require__(13); + var global = __webpack_require__(29); + var SHARED = '__core-js_shared__'; + var store = global[SHARED] || (global[SHARED] = {}); + + (module.exports = function (key, value) { + return store[key] || (store[key] = value !== undefined ? value : {}); + })('versions', []).push({ + version: core.version, + mode: __webpack_require__(102) ? 'pure' : 'global', + copyright: '© 2019 Denis Pushkarev (zloirock.ru)', + }); + + /***/ + }, + /* 151 */ + /***/ function (module, exports) { + // IE 8- don't enum bug keys + module.exports = + 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'.split( + ',', + ); + + /***/ + }, + /* 152 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(489); + var global = __webpack_require__(29); + var hide = __webpack_require__(46); + var Iterators = __webpack_require__(80); + var TO_STRING_TAG = __webpack_require__(22)('toStringTag'); + + var DOMIterables = ( + 'CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,' + + 'DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,' + + 'MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,' + + 'SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,' + + 'TextTrackList,TouchList' + ).split(','); + + for (var i = 0; i < DOMIterables.length; i++) { + var NAME = DOMIterables[i]; + var Collection = global[NAME]; + var proto = Collection && Collection.prototype; + if (proto && !proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME); + Iterators[NAME] = Iterators.Array; + } + + /***/ + }, + /* 153 */ + /***/ function (module, exports, __webpack_require__) { + exports.f = __webpack_require__(22); + + /***/ + }, + /* 154 */ + /***/ function (module, exports, __webpack_require__) { + var global = __webpack_require__(29); + var core = __webpack_require__(13); + var LIBRARY = __webpack_require__(102); + var wksExt = __webpack_require__(153); + var defineProperty = __webpack_require__(30).f; + module.exports = function (name) { + var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {}); + if (name.charAt(0) != '_' && !(name in $Symbol)) + defineProperty($Symbol, name, { value: wksExt.f(name) }); + }; + + /***/ + }, + /* 155 */ + /***/ function (module, exports) { + exports.f = Object.getOwnPropertySymbols; + + /***/ + }, + /* 156 */ + /***/ function (module, exports) { + /***/ + }, + /* 157 */ + /***/ function (module, exports, __webpack_require__) { + // 0 -> Array#forEach + // 1 -> Array#map + // 2 -> Array#filter + // 3 -> Array#some + // 4 -> Array#every + // 5 -> Array#find + // 6 -> Array#findIndex + var ctx = __webpack_require__(69); + var IObject = __webpack_require__(140); + var toObject = __webpack_require__(70); + var toLength = __webpack_require__(103); + var asc = __webpack_require__(501); + module.exports = function (TYPE, $create) { + var IS_MAP = TYPE == 1; + var IS_FILTER = TYPE == 2; + var IS_SOME = TYPE == 3; + var IS_EVERY = TYPE == 4; + var IS_FIND_INDEX = TYPE == 6; + var NO_HOLES = TYPE == 5 || IS_FIND_INDEX; + var create = $create || asc; + return function ($this, callbackfn, that) { + var O = toObject($this); + var self = IObject(O); + var f = ctx(callbackfn, that, 3); + var length = toLength(self.length); + var index = 0; + var result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined; + var val, res; + for (; length > index; index++) + if (NO_HOLES || index in self) { + val = self[index]; + res = f(val, index, O); + if (TYPE) { + if (IS_MAP) + result[index] = res; // map + else if (res) + switch (TYPE) { + case 3: + return true; // some + case 5: + return val; // find + case 6: + return index; // findIndex + case 2: + result.push(val); // filter + } + else if (IS_EVERY) return false; // every + } + } + return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result; + }; + }; + + /***/ + }, + /* 158 */ + /***/ function (module, exports, __webpack_require__) { + var hide = __webpack_require__(46); + module.exports = function (target, src, safe) { + for (var key in src) { + if (safe && target[key]) target[key] = src[key]; + else hide(target, key, src[key]); + } + return target; + }; + + /***/ + }, + /* 159 */ + /***/ function (module, exports) { + module.exports = function (it, Constructor, name, forbiddenField) { + if (!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)) { + throw TypeError(name + ': incorrect invocation!'); + } + return it; + }; + + /***/ + }, + /* 160 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = __webpack_require__(509); + + /***/ + }, + /* 161 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var _interopRequireDefault = __webpack_require__(41); + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.default = createReactElement; + + var _react = _interopRequireDefault(__webpack_require__(1)); + + /* eslint-disable react/prop-types */ + + /** + * Logic to either call the generatorFunction or call React.createElement to get the + * React.Component + * @param options + * @param options.componentObj + * @param options.props + * @param options.domNodeId + * @param options.trace + * @param options.location + * @returns {Element} + */ + function createReactElement(_ref) { + var componentObj = _ref.componentObj, + props = _ref.props, + railsContext = _ref.railsContext, + domNodeId = _ref.domNodeId, + trace = _ref.trace, + shouldHydrate = _ref.shouldHydrate; + var name = componentObj.name, + component = componentObj.component, + generatorFunction = componentObj.generatorFunction; + + if (trace) { + if (railsContext && railsContext.serverSide) { + console.log('RENDERED '.concat(name, ' to dom node with id: ').concat(domNodeId)); + } else if (shouldHydrate) { + console.log( + 'HYDRATED ' + .concat(name, ' in dom node with id: ') + .concat(domNodeId, ' using props, railsContext:'), + props, + railsContext, + ); + } else { + console.log( + 'RENDERED ' + .concat(name, ' to dom node with id: ') + .concat(domNodeId, ' with props, railsContext:'), + props, + railsContext, + ); + } + } + + if (generatorFunction) { + return component(props, railsContext); + } + + return _react.default.createElement(component, props); + } + + /***/ + }, + /* 162 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(10); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__RailsContext__ = __webpack_require__(238); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__HelloWorld_scss__ = __webpack_require__(543); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__HelloWorld_scss___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_3__HelloWorld_scss__, + ); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + // Example of CSS modules. + + // Super simple example of the simplest possible React component + + var HelloWorld = (function (_React$Component) { + _inherits(HelloWorld, _React$Component); + + // Not necessary if we only call super, but we'll need to initialize state, etc. + function HelloWorld(props) { + _classCallCheck(this, HelloWorld); + + var _this = _possibleConstructorReturn( + this, + (HelloWorld.__proto__ || Object.getPrototypeOf(HelloWorld)).call(this, props), + ); + + _this.state = props.helloWorldData; + _this.setNameDomRef = _this.setNameDomRef.bind(_this); + _this.handleChange = _this.handleChange.bind(_this); + return _this; + } + + _createClass(HelloWorld, [ + { + key: 'setNameDomRef', + value: function setNameDomRef(nameDomNode) { + this.nameDomRef = nameDomNode; + }, + }, + { + key: 'handleChange', + value: function handleChange() { + var name = this.nameDomRef.value; + this.setState({ name: name }); + }, + }, + { + key: 'render', + value: function render() { + // eslint-disable-next-line no-console + console.log( + 'HelloWorld demonstrating a call to console.log in ' + + 'spec/dummy/client/app/components/HelloWorld.jsx:18', + ); + + var name = this.state.name; + var railsContext = this.props.railsContext; + + return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'div', + null, + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'h3', + { className: __WEBPACK_IMPORTED_MODULE_3__HelloWorld_scss___default.a.brightColor }, + 'Hello, ', + name, + '!', + ), + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'p', + null, + 'Say hello to:', + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('input', { + type: 'text', + ref: this.setNameDomRef, + defaultValue: name, + onChange: this.handleChange, + }), + ), + railsContext && + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_2__RailsContext__['a' /* default */], + { railsContext: railsContext }, + ), + ); + }, + }, + ]); + + return HelloWorld; + })(__WEBPACK_IMPORTED_MODULE_1_react___default.a.Component); + + HelloWorld.propTypes = { + helloWorldData: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.shape({ + name: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string, + }).isRequired, + railsContext: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object, + }; + var _default = HelloWorld; + + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + HelloWorld, + 'HelloWorld', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/HelloWorld.jsx', + ); + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/HelloWorld.jsx', + ); + })(); + + /***/ + }, + /* 163 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__components_Provider__ = __webpack_require__(568); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__components_connectAdvanced__ = + __webpack_require__(247); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__connect_connect__ = __webpack_require__(572); + /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, 'a', function () { + return __WEBPACK_IMPORTED_MODULE_0__components_Provider__['a']; + }); + /* unused harmony reexport createProvider */ + /* unused harmony reexport connectAdvanced */ + /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, 'b', function () { + return __WEBPACK_IMPORTED_MODULE_2__connect_connect__['a']; + }); + + /***/ + }, + /* 164 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = warning; + /** + * Prints a warning in the console if it exists. + * + * @param {String} message The warning message. + * @returns {void} + */ + function warning(message) { + /* eslint-disable no-console */ + if (typeof console !== 'undefined' && typeof console.error === 'function') { + console.error(message); + } + /* eslint-enable no-console */ + + try { + // This error was thrown as a convenience so that if you enable + // "break on all exceptions" in your console, + // it would pause the execution at this line. + throw new Error(message); + /* eslint-disable no-empty */ + } catch (e) {} + /* eslint-enable no-empty */ + } + + /***/ + }, + /* 165 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = _extends; + function _extends() { + _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + + return target; + }; + + return _extends.apply(this, arguments); + } + + /***/ + }, + /* 166 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = _objectWithoutPropertiesLoose; + function _objectWithoutPropertiesLoose(source, excluded) { + if (source == null) return {}; + var target = {}; + var sourceKeys = Object.keys(source); + var key, i; + + for (i = 0; i < sourceKeys.length; i++) { + key = sourceKeys[i]; + if (excluded.indexOf(key) >= 0) continue; + target[key] = source[key]; + } + + return target; + } + + /***/ + }, + /* 167 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = loopAsync; + /* harmony export (immutable) */ __webpack_exports__['b'] = mapAsync; + function loopAsync(turns, work, callback) { + var currentTurn = 0, + isDone = false; + var sync = false, + hasNext = false, + doneArgs = void 0; + + function done() { + isDone = true; + if (sync) { + // Iterate instead of recursing if possible. + doneArgs = [].concat(Array.prototype.slice.call(arguments)); + return; + } + + callback.apply(this, arguments); + } + + function next() { + if (isDone) { + return; + } + + hasNext = true; + if (sync) { + // Iterate instead of recursing if possible. + return; + } + + sync = true; + + while (!isDone && currentTurn < turns && hasNext) { + hasNext = false; + work.call(this, currentTurn++, next, done); + } + + sync = false; + + if (isDone) { + // This means the loop finished synchronously. + callback.apply(this, doneArgs); + return; + } + + if (currentTurn >= turns && hasNext) { + isDone = true; + callback(); + } + } + + next(); + } + + function mapAsync(array, work, callback) { + var length = array.length; + var values = []; + + if (length === 0) return callback(null, values); + + var isDone = false, + doneCount = 0; + + function done(index, error, value) { + if (isDone) return; + + if (error) { + isDone = true; + callback(error); + } else { + values[index] = value; + + isDone = ++doneCount === length; + + if (isDone) callback(null, values); + } + } + + array.forEach(function (item, index) { + work(item, index, function (error, value) { + done(index, error, value); + }); + }); + } + + /***/ + }, + /* 168 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant__ = __webpack_require__(14); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_invariant__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_create_react_class__ = __webpack_require__(37); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_create_react_class___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_create_react_class__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types__ = __webpack_require__(10); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_3_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__getRouteParams__ = __webpack_require__(593); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__ContextUtils__ = __webpack_require__(169); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__RouteUtils__ = __webpack_require__(48); + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + var _typeof = + typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' + ? function (obj) { + return typeof obj; + } + : function (obj) { + return obj && + typeof Symbol === 'function' && + obj.constructor === Symbol && + obj !== Symbol.prototype + ? 'symbol' + : typeof obj; + }; + + /** + * A <RouterContext> renders the component tree for a given router state + * and sets the history object and the current location in context. + */ + var RouterContext = __WEBPACK_IMPORTED_MODULE_2_create_react_class___default()({ + displayName: 'RouterContext', + + mixins: [Object(__WEBPACK_IMPORTED_MODULE_5__ContextUtils__['a' /* ContextProvider */])('router')], + + propTypes: { + router: __WEBPACK_IMPORTED_MODULE_3_prop_types__['object'].isRequired, + location: __WEBPACK_IMPORTED_MODULE_3_prop_types__['object'].isRequired, + routes: __WEBPACK_IMPORTED_MODULE_3_prop_types__['array'].isRequired, + params: __WEBPACK_IMPORTED_MODULE_3_prop_types__['object'].isRequired, + components: __WEBPACK_IMPORTED_MODULE_3_prop_types__['array'].isRequired, + createElement: __WEBPACK_IMPORTED_MODULE_3_prop_types__['func'].isRequired, + }, + + getDefaultProps: function getDefaultProps() { + return { + createElement: __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement, + }; + }, + + childContextTypes: { + router: __WEBPACK_IMPORTED_MODULE_3_prop_types__['object'].isRequired, + }, + + getChildContext: function getChildContext() { + return { + router: this.props.router, + }; + }, + createElement: function createElement(component, props) { + return component == null ? null : this.props.createElement(component, props); + }, + render: function render() { + var _this = this; + + var _props = this.props, + location = _props.location, + routes = _props.routes, + params = _props.params, + components = _props.components, + router = _props.router; + + var element = null; + + if (components) { + element = components.reduceRight(function (element, components, index) { + if (components == null) return element; // Don't create new children; use the grandchildren. + + var route = routes[index]; + var routeParams = Object(__WEBPACK_IMPORTED_MODULE_4__getRouteParams__['a' /* default */])( + route, + params, + ); + var props = { + location: location, + params: params, + route: route, + router: router, + routeParams: routeParams, + routes: routes, + }; + + if (Object(__WEBPACK_IMPORTED_MODULE_6__RouteUtils__['c' /* isReactChildren */])(element)) { + props.children = element; + } else if (element) { + for (var prop in element) { + if (Object.prototype.hasOwnProperty.call(element, prop)) props[prop] = element[prop]; + } + } + + if ((typeof components === 'undefined' ? 'undefined' : _typeof(components)) === 'object') { + var elements = {}; + + for (var key in components) { + if (Object.prototype.hasOwnProperty.call(components, key)) { + // Pass through the key as a prop to createElement to allow + // custom createElement functions to know which named component + // they're rendering, for e.g. matching up to fetched data. + elements[key] = _this.createElement( + components[key], + _extends( + { + key: key, + }, + props, + ), + ); + } + } + + return elements; + } + + return _this.createElement(components, props); + }, element); + } + + !( + element === null || + element === false || + __WEBPACK_IMPORTED_MODULE_1_react___default.a.isValidElement(element) + ) + ? true + ? __WEBPACK_IMPORTED_MODULE_0_invariant___default()( + false, + 'The root route must render a single element', + ) + : invariant(false) + : void 0; + + return element; + }, + }); + + /* harmony default export */ __webpack_exports__['a'] = RouterContext; + + /***/ + }, + /* 169 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = ContextProvider; + /* harmony export (immutable) */ __webpack_exports__['b'] = ContextSubscriber; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(10); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + + // Works around issues with context updates failing to propagate. + // Caveat: the context value is expected to never change its identity. + // https://github.com/facebook/react/issues/2517 + // https://github.com/reactjs/react-router/issues/470 + + var contextProviderShape = __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.shape({ + subscribe: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired, + eventIndex: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number.isRequired, + }); + + function makeContextName(name) { + return '@@contextSubscriber/' + name; + } + + function ContextProvider(name) { + var _childContextTypes, _ref2; + + var contextName = makeContextName(name); + var listenersKey = contextName + '/listeners'; + var eventIndexKey = contextName + '/eventIndex'; + var subscribeKey = contextName + '/subscribe'; + + return ( + (_ref2 = { + childContextTypes: + ((_childContextTypes = {}), + (_childContextTypes[contextName] = contextProviderShape.isRequired), + _childContextTypes), + + getChildContext: function getChildContext() { + var _ref; + + return ( + (_ref = {}), + (_ref[contextName] = { + eventIndex: this[eventIndexKey], + subscribe: this[subscribeKey], + }), + _ref + ); + }, + componentWillMount: function componentWillMount() { + this[listenersKey] = []; + this[eventIndexKey] = 0; + }, + componentWillReceiveProps: function componentWillReceiveProps() { + this[eventIndexKey]++; + }, + componentDidUpdate: function componentDidUpdate() { + var _this = this; + + this[listenersKey].forEach(function (listener) { + return listener(_this[eventIndexKey]); + }); + }, + }), + (_ref2[subscribeKey] = function (listener) { + var _this2 = this; + + // No need to immediately call listener here. + this[listenersKey].push(listener); + + return function () { + _this2[listenersKey] = _this2[listenersKey].filter(function (item) { + return item !== listener; + }); + }; + }), + _ref2 + ); + } + + function ContextSubscriber(name) { + var _contextTypes, _ref4; + + var contextName = makeContextName(name); + var lastRenderedEventIndexKey = contextName + '/lastRenderedEventIndex'; + var handleContextUpdateKey = contextName + '/handleContextUpdate'; + var unsubscribeKey = contextName + '/unsubscribe'; + + return ( + (_ref4 = { + contextTypes: + ((_contextTypes = {}), (_contextTypes[contextName] = contextProviderShape), _contextTypes), + + getInitialState: function getInitialState() { + var _ref3; + + if (!this.context[contextName]) { + return {}; + } + + return ( + (_ref3 = {}), (_ref3[lastRenderedEventIndexKey] = this.context[contextName].eventIndex), _ref3 + ); + }, + componentDidMount: function componentDidMount() { + if (!this.context[contextName]) { + return; + } + + this[unsubscribeKey] = this.context[contextName].subscribe(this[handleContextUpdateKey]); + }, + componentWillReceiveProps: function componentWillReceiveProps() { + var _setState; + + if (!this.context[contextName]) { + return; + } + + this.setState( + ((_setState = {}), + (_setState[lastRenderedEventIndexKey] = this.context[contextName].eventIndex), + _setState), + ); + }, + componentWillUnmount: function componentWillUnmount() { + if (!this[unsubscribeKey]) { + return; + } + + this[unsubscribeKey](); + this[unsubscribeKey] = null; + }, + }), + (_ref4[handleContextUpdateKey] = function (eventIndex) { + if (eventIndex !== this.state[lastRenderedEventIndexKey]) { + var _setState2; + + this.setState( + ((_setState2 = {}), (_setState2[lastRenderedEventIndexKey] = eventIndex), _setState2), + ); + } + }), + _ref4 + ); + } + + /***/ + }, + /* 170 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'a', function () { + return routerShape; + }); + /* unused harmony export locationShape */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(10); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + + var routerShape = Object(__WEBPACK_IMPORTED_MODULE_0_prop_types__['shape'])({ + push: __WEBPACK_IMPORTED_MODULE_0_prop_types__['func'].isRequired, + replace: __WEBPACK_IMPORTED_MODULE_0_prop_types__['func'].isRequired, + go: __WEBPACK_IMPORTED_MODULE_0_prop_types__['func'].isRequired, + goBack: __WEBPACK_IMPORTED_MODULE_0_prop_types__['func'].isRequired, + goForward: __WEBPACK_IMPORTED_MODULE_0_prop_types__['func'].isRequired, + setRouteLeaveHook: __WEBPACK_IMPORTED_MODULE_0_prop_types__['func'].isRequired, + isActive: __WEBPACK_IMPORTED_MODULE_0_prop_types__['func'].isRequired, + }); + + var locationShape = Object(__WEBPACK_IMPORTED_MODULE_0_prop_types__['shape'])({ + pathname: __WEBPACK_IMPORTED_MODULE_0_prop_types__['string'].isRequired, + search: __WEBPACK_IMPORTED_MODULE_0_prop_types__['string'].isRequired, + state: __WEBPACK_IMPORTED_MODULE_0_prop_types__['object'], + action: __WEBPACK_IMPORTED_MODULE_0_prop_types__['string'].isRequired, + key: __WEBPACK_IMPORTED_MODULE_0_prop_types__['string'], + }); + + /***/ + }, + /* 171 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + + var _warning = __webpack_require__(47); + + var _warning2 = _interopRequireDefault(_warning); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + var runTransitionHook = function runTransitionHook(hook, location, callback) { + var result = hook(location, callback); + + if (hook.length < 2) { + // Assume the hook runs synchronously and automatically + // call the callback with the return value. + callback(result); + } else { + true + ? (0, _warning2.default)( + result === undefined, + 'You should not "return" in a transition hook with a callback argument; ' + + 'call the callback instead', + ) + : void 0; + } + }; + + exports.default = runTransitionHook; + + /***/ + }, + /* 172 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + + var _AsyncUtils = __webpack_require__(604); + + var _PathUtils = __webpack_require__(49); + + var _runTransitionHook = __webpack_require__(171); + + var _runTransitionHook2 = _interopRequireDefault(_runTransitionHook); + + var _Actions = __webpack_require__(111); + + var _LocationUtils = __webpack_require__(73); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + var createHistory = function createHistory() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + var getCurrentLocation = options.getCurrentLocation, + getUserConfirmation = options.getUserConfirmation, + pushLocation = options.pushLocation, + replaceLocation = options.replaceLocation, + go = options.go, + keyLength = options.keyLength; + + var currentLocation = void 0; + var pendingLocation = void 0; + var beforeListeners = []; + var listeners = []; + var allKeys = []; + + var getCurrentIndex = function getCurrentIndex() { + if (pendingLocation && pendingLocation.action === _Actions.POP) + return allKeys.indexOf(pendingLocation.key); + + if (currentLocation) return allKeys.indexOf(currentLocation.key); + + return -1; + }; + + var updateLocation = function updateLocation(nextLocation) { + var currentIndex = getCurrentIndex(); + + currentLocation = nextLocation; + + if (currentLocation.action === _Actions.PUSH) { + allKeys = [].concat(allKeys.slice(0, currentIndex + 1), [currentLocation.key]); + } else if (currentLocation.action === _Actions.REPLACE) { + allKeys[currentIndex] = currentLocation.key; + } + + listeners.forEach(function (listener) { + return listener(currentLocation); + }); + }; + + var listenBefore = function listenBefore(listener) { + beforeListeners.push(listener); + + return function () { + return (beforeListeners = beforeListeners.filter(function (item) { + return item !== listener; + })); + }; + }; + + var listen = function listen(listener) { + listeners.push(listener); + + return function () { + return (listeners = listeners.filter(function (item) { + return item !== listener; + })); + }; + }; + + var confirmTransitionTo = function confirmTransitionTo(location, callback) { + (0, _AsyncUtils.loopAsync)( + beforeListeners.length, + function (index, next, done) { + (0, _runTransitionHook2.default)(beforeListeners[index], location, function (result) { + return result != null ? done(result) : next(); + }); + }, + function (message) { + if (getUserConfirmation && typeof message === 'string') { + getUserConfirmation(message, function (ok) { + return callback(ok !== false); + }); + } else { + callback(message !== false); + } + }, + ); + }; + + var transitionTo = function transitionTo(nextLocation) { + if ( + (currentLocation && (0, _LocationUtils.locationsAreEqual)(currentLocation, nextLocation)) || + (pendingLocation && (0, _LocationUtils.locationsAreEqual)(pendingLocation, nextLocation)) + ) + return; // Nothing to do + + pendingLocation = nextLocation; + + confirmTransitionTo(nextLocation, function (ok) { + if (pendingLocation !== nextLocation) return; // Transition was interrupted during confirmation + + pendingLocation = null; + + if (ok) { + // Treat PUSH to same path like REPLACE to be consistent with browsers + if (nextLocation.action === _Actions.PUSH) { + var prevPath = (0, _PathUtils.createPath)(currentLocation); + var nextPath = (0, _PathUtils.createPath)(nextLocation); + + if ( + nextPath === prevPath && + (0, _LocationUtils.statesAreEqual)(currentLocation.state, nextLocation.state) + ) + nextLocation.action = _Actions.REPLACE; + } + + if (nextLocation.action === _Actions.POP) { + updateLocation(nextLocation); + } else if (nextLocation.action === _Actions.PUSH) { + if (pushLocation(nextLocation) !== false) updateLocation(nextLocation); + } else if (nextLocation.action === _Actions.REPLACE) { + if (replaceLocation(nextLocation) !== false) updateLocation(nextLocation); + } + } else if (currentLocation && nextLocation.action === _Actions.POP) { + var prevIndex = allKeys.indexOf(currentLocation.key); + var nextIndex = allKeys.indexOf(nextLocation.key); + + if (prevIndex !== -1 && nextIndex !== -1) go(prevIndex - nextIndex); // Restore the URL + } + }); + }; + + var push = function push(input) { + return transitionTo(createLocation(input, _Actions.PUSH)); + }; + + var replace = function replace(input) { + return transitionTo(createLocation(input, _Actions.REPLACE)); + }; + + var goBack = function goBack() { + return go(-1); + }; + + var goForward = function goForward() { + return go(1); + }; + + var createKey = function createKey() { + return Math.random() + .toString(36) + .substr(2, keyLength || 6); + }; + + var createHref = function createHref(location) { + return (0, _PathUtils.createPath)(location); + }; + + var createLocation = function createLocation(location, action) { + var key = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : createKey(); + return (0, _LocationUtils.createLocation)(location, action, key); + }; + + return { + getCurrentLocation: getCurrentLocation, + listenBefore: listenBefore, + listen: listen, + transitionTo: transitionTo, + push: push, + replace: replace, + go: go, + goBack: goBack, + goForward: goForward, + createKey: createKey, + createPath: _PathUtils.createPath, + createHref: createHref, + createLocation: createLocation, + }; + }; + + exports.default = createHistory; + + /***/ + }, + /* 173 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + var canUseDOM = (exports.canUseDOM = !!( + typeof window !== 'undefined' && + window.document && + window.document.createElement + )); + + /***/ + }, + /* 174 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + exports.go = + exports.replaceLocation = + exports.pushLocation = + exports.startListener = + exports.getUserConfirmation = + exports.getCurrentLocation = + undefined; + + var _LocationUtils = __webpack_require__(73); + + var _DOMUtils = __webpack_require__(112); + + var _DOMStateStorage = __webpack_require__(263); + + var _PathUtils = __webpack_require__(49); + + var _ExecutionEnvironment = __webpack_require__(173); + + var PopStateEvent = 'popstate'; + var HashChangeEvent = 'hashchange'; + + var needsHashchangeListener = + _ExecutionEnvironment.canUseDOM && !(0, _DOMUtils.supportsPopstateOnHashchange)(); + + var _createLocation = function _createLocation(historyState) { + var key = historyState && historyState.key; + + return (0, _LocationUtils.createLocation)( + { + pathname: window.location.pathname, + search: window.location.search, + hash: window.location.hash, + state: key ? (0, _DOMStateStorage.readState)(key) : undefined, + }, + undefined, + key, + ); + }; + + var getCurrentLocation = (exports.getCurrentLocation = function getCurrentLocation() { + var historyState = void 0; + try { + historyState = window.history.state || {}; + } catch (error) { + // IE 11 sometimes throws when accessing window.history.state + // See https://github.com/ReactTraining/history/pull/289 + historyState = {}; + } + + return _createLocation(historyState); + }); + + var getUserConfirmation = (exports.getUserConfirmation = function getUserConfirmation( + message, + callback, + ) { + return callback(window.confirm(message)); + }); // eslint-disable-line no-alert + + var startListener = (exports.startListener = function startListener(listener) { + var handlePopState = function handlePopState(event) { + if ((0, _DOMUtils.isExtraneousPopstateEvent)(event)) + // Ignore extraneous popstate events in WebKit + return; + listener(_createLocation(event.state)); + }; + + (0, _DOMUtils.addEventListener)(window, PopStateEvent, handlePopState); + + var handleUnpoppedHashChange = function handleUnpoppedHashChange() { + return listener(getCurrentLocation()); + }; + + if (needsHashchangeListener) { + (0, _DOMUtils.addEventListener)(window, HashChangeEvent, handleUnpoppedHashChange); + } + + return function () { + (0, _DOMUtils.removeEventListener)(window, PopStateEvent, handlePopState); + + if (needsHashchangeListener) { + (0, _DOMUtils.removeEventListener)(window, HashChangeEvent, handleUnpoppedHashChange); + } + }; + }); + + var updateLocation = function updateLocation(location, updateState) { + var state = location.state, + key = location.key; + + if (state !== undefined) (0, _DOMStateStorage.saveState)(key, state); + + updateState({ key: key }, (0, _PathUtils.createPath)(location)); + }; + + var pushLocation = (exports.pushLocation = function pushLocation(location) { + return updateLocation(location, function (state, path) { + return window.history.pushState(state, null, path); + }); + }); + + var replaceLocation = (exports.replaceLocation = function replaceLocation(location) { + return updateLocation(location, function (state, path) { + return window.history.replaceState(state, null, path); + }); + }); + + var go = (exports.go = function go(n) { + if (n) window.history.go(n); + }); + + /***/ + }, + /* 175 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = + !__webpack_require__(8) && + !__webpack_require__(4)(function () { + return ( + Object.defineProperty(__webpack_require__(113)('div'), 'a', { + get: function () { + return 7; + }, + }).a != 7 + ); + }); + + /***/ + }, + /* 176 */ + /***/ function (module, exports, __webpack_require__) { + exports.f = __webpack_require__(6); + + /***/ + }, + /* 177 */ + /***/ function (module, exports, __webpack_require__) { + var has = __webpack_require__(18); + var toIObject = __webpack_require__(19); + var arrayIndexOf = __webpack_require__(87)(false); + var IE_PROTO = __webpack_require__(115)('IE_PROTO'); + + module.exports = function (object, names) { + var O = toIObject(object); + var i = 0; + var result = []; + var key; + for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key); + // Don't enum bug & hidden keys + while (names.length > i) + if (has(O, (key = names[i++]))) { + ~arrayIndexOf(result, key) || result.push(key); + } + return result; + }; + + /***/ + }, + /* 178 */ + /***/ function (module, exports, __webpack_require__) { + var dP = __webpack_require__(9); + var anObject = __webpack_require__(2); + var getKeys = __webpack_require__(52); + + module.exports = __webpack_require__(8) + ? Object.defineProperties + : function defineProperties(O, Properties) { + anObject(O); + var keys = getKeys(Properties); + var length = keys.length; + var i = 0; + var P; + while (length > i) dP.f(O, (P = keys[i++]), Properties[P]); + return O; + }; + + /***/ + }, + /* 179 */ + /***/ function (module, exports, __webpack_require__) { + // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window + var toIObject = __webpack_require__(19); + var gOPN = __webpack_require__(55).f; + var toString = {}.toString; + + var windowNames = + typeof window == 'object' && window && Object.getOwnPropertyNames + ? Object.getOwnPropertyNames(window) + : []; + + var getWindowNames = function (it) { + try { + return gOPN(it); + } catch (e) { + return windowNames.slice(); + } + }; + + module.exports.f = function getOwnPropertyNames(it) { + return windowNames && toString.call(it) == '[object Window]' + ? getWindowNames(it) + : gOPN(toIObject(it)); + }; + + /***/ + }, + /* 180 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // 19.1.2.1 Object.assign(target, source, ...) + var DESCRIPTORS = __webpack_require__(8); + var getKeys = __webpack_require__(52); + var gOPS = __webpack_require__(88); + var pIE = __webpack_require__(76); + var toObject = __webpack_require__(11); + var IObject = __webpack_require__(75); + var $assign = Object.assign; + + // should work with symbols and should have deterministic property order (V8 bug) + module.exports = + !$assign || + __webpack_require__(4)(function () { + var A = {}; + var B = {}; + // eslint-disable-next-line no-undef + var S = Symbol(); + var K = 'abcdefghijklmnopqrst'; + A[S] = 7; + K.split('').forEach(function (k) { + B[k] = k; + }); + return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K; + }) + ? function assign(target, source) { + // eslint-disable-line no-unused-vars + var T = toObject(target); + var aLen = arguments.length; + var index = 1; + var getSymbols = gOPS.f; + var isEnum = pIE.f; + while (aLen > index) { + var S = IObject(arguments[index++]); + var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S); + var length = keys.length; + var j = 0; + var key; + while (length > j) { + key = keys[j++]; + if (!DESCRIPTORS || isEnum.call(S, key)) T[key] = S[key]; + } + } + return T; + } + : $assign; + + /***/ + }, + /* 181 */ + /***/ function (module, exports) { + // 7.2.9 SameValue(x, y) + module.exports = + Object.is || + function is(x, y) { + // eslint-disable-next-line no-self-compare + return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y; + }; + + /***/ + }, + /* 182 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var aFunction = __webpack_require__(12); + var isObject = __webpack_require__(5); + var invoke = __webpack_require__(183); + var arraySlice = [].slice; + var factories = {}; + + var construct = function (F, len, args) { + if (!(len in factories)) { + for (var n = [], i = 0; i < len; i++) n[i] = 'a[' + i + ']'; + // eslint-disable-next-line no-new-func + factories[len] = Function('F,a', 'return new F(' + n.join(',') + ')'); + } + return factories[len](F, args); + }; + + module.exports = + Function.bind || + function bind(that /* , ...args */) { + var fn = aFunction(this); + var partArgs = arraySlice.call(arguments, 1); + var bound = function (/* args... */) { + var args = partArgs.concat(arraySlice.call(arguments)); + return this instanceof bound ? construct(fn, args.length, args) : invoke(fn, args, that); + }; + if (isObject(fn.prototype)) bound.prototype = fn.prototype; + return bound; + }; + + /***/ + }, + /* 183 */ + /***/ function (module, exports) { + // fast apply, http://jsperf.lnkit.com/fast-apply/5 + module.exports = function (fn, args, that) { + var un = that === undefined; + switch (args.length) { + case 0: + return un ? fn() : fn.call(that); + case 1: + return un ? fn(args[0]) : fn.call(that, args[0]); + case 2: + return un ? fn(args[0], args[1]) : fn.call(that, args[0], args[1]); + case 3: + return un ? fn(args[0], args[1], args[2]) : fn.call(that, args[0], args[1], args[2]); + case 4: + return un + ? fn(args[0], args[1], args[2], args[3]) + : fn.call(that, args[0], args[1], args[2], args[3]); + } + return fn.apply(that, args); + }; + + /***/ + }, + /* 184 */ + /***/ function (module, exports, __webpack_require__) { + var $parseInt = __webpack_require__(3).parseInt; + var $trim = __webpack_require__(67).trim; + var ws = __webpack_require__(119); + var hex = /^[-+]?0[xX]/; + + module.exports = + $parseInt(ws + '08') !== 8 || $parseInt(ws + '0x16') !== 22 + ? function parseInt(str, radix) { + var string = $trim(String(str), 3); + return $parseInt(string, radix >>> 0 || (hex.test(string) ? 16 : 10)); + } + : $parseInt; + + /***/ + }, + /* 185 */ + /***/ function (module, exports, __webpack_require__) { + var $parseFloat = __webpack_require__(3).parseFloat; + var $trim = __webpack_require__(67).trim; + + module.exports = + 1 / $parseFloat(__webpack_require__(119) + '-0') !== -Infinity + ? function parseFloat(str) { + var string = $trim(String(str), 3); + var result = $parseFloat(string); + return result === 0 && string.charAt(0) == '-' ? -0 : result; + } + : $parseFloat; + + /***/ + }, + /* 186 */ + /***/ function (module, exports, __webpack_require__) { + var cof = __webpack_require__(25); + module.exports = function (it, msg) { + if (typeof it != 'number' && cof(it) != 'Number') throw TypeError(msg); + return +it; + }; + + /***/ + }, + /* 187 */ + /***/ function (module, exports, __webpack_require__) { + // 20.1.2.3 Number.isInteger(number) + var isObject = __webpack_require__(5); + var floor = Math.floor; + module.exports = function isInteger(it) { + return !isObject(it) && isFinite(it) && floor(it) === it; + }; + + /***/ + }, + /* 188 */ + /***/ function (module, exports) { + // 20.2.2.20 Math.log1p(x) + module.exports = + Math.log1p || + function log1p(x) { + return (x = +x) > -1e-8 && x < 1e-8 ? x - (x * x) / 2 : Math.log(1 + x); + }; + + /***/ + }, + /* 189 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.16 Math.fround(x) + var sign = __webpack_require__(122); + var pow = Math.pow; + var EPSILON = pow(2, -52); + var EPSILON32 = pow(2, -23); + var MAX32 = pow(2, 127) * (2 - EPSILON32); + var MIN32 = pow(2, -126); + + var roundTiesToEven = function (n) { + return n + 1 / EPSILON - 1 / EPSILON; + }; + + module.exports = + Math.fround || + function fround(x) { + var $abs = Math.abs(x); + var $sign = sign(x); + var a, result; + if ($abs < MIN32) return $sign * roundTiesToEven($abs / MIN32 / EPSILON32) * MIN32 * EPSILON32; + a = (1 + EPSILON32 / EPSILON) * $abs; + result = a - (a - $abs); + // eslint-disable-next-line no-self-compare + if (result > MAX32 || result != result) return $sign * Infinity; + return $sign * result; + }; + + /***/ + }, + /* 190 */ + /***/ function (module, exports, __webpack_require__) { + // call something on iterator step with safe closing on error + var anObject = __webpack_require__(2); + module.exports = function (iterator, fn, value, entries) { + try { + return entries ? fn(anObject(value)[0], value[1]) : fn(value); + // 7.4.6 IteratorClose(iterator, completion) + } catch (e) { + var ret = iterator['return']; + if (ret !== undefined) anObject(ret.call(iterator)); + throw e; + } + }; + + /***/ + }, + /* 191 */ + /***/ function (module, exports, __webpack_require__) { + var aFunction = __webpack_require__(12); + var toObject = __webpack_require__(11); + var IObject = __webpack_require__(75); + var toLength = __webpack_require__(7); + + module.exports = function (that, callbackfn, aLen, memo, isRight) { + aFunction(callbackfn); + var O = toObject(that); + var self = IObject(O); + var length = toLength(O.length); + var index = isRight ? length - 1 : 0; + var i = isRight ? -1 : 1; + if (aLen < 2) + for (;;) { + if (index in self) { + memo = self[index]; + index += i; + break; + } + index += i; + if (isRight ? index < 0 : length <= index) { + throw TypeError('Reduce of empty array with no initial value'); + } + } + for (; isRight ? index >= 0 : length > index; index += i) + if (index in self) { + memo = callbackfn(memo, self[index], index, O); + } + return memo; + }; + + /***/ + }, + /* 192 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + // 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length) + + var toObject = __webpack_require__(11); + var toAbsoluteIndex = __webpack_require__(53); + var toLength = __webpack_require__(7); + + module.exports = + [].copyWithin || + function copyWithin(target /* = 0 */, start /* = 0, end = @length */) { + var O = toObject(this); + var len = toLength(O.length); + var to = toAbsoluteIndex(target, len); + var from = toAbsoluteIndex(start, len); + var end = arguments.length > 2 ? arguments[2] : undefined; + var count = Math.min((end === undefined ? len : toAbsoluteIndex(end, len)) - from, len - to); + var inc = 1; + if (from < to && to < from + count) { + inc = -1; + from += count - 1; + to += count - 1; + } + while (count-- > 0) { + if (from in O) O[to] = O[from]; + else delete O[to]; + to += inc; + from += inc; + } + return O; + }; + + /***/ + }, + /* 193 */ + /***/ function (module, exports) { + module.exports = function (done, value) { + return { value: value, done: !!done }; + }; + + /***/ + }, + /* 194 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var regexpExec = __webpack_require__(134); + __webpack_require__(0)( + { + target: 'RegExp', + proto: true, + forced: regexpExec !== /./.exec, + }, + { + exec: regexpExec, + }, + ); + + /***/ + }, + /* 195 */ + /***/ function (module, exports, __webpack_require__) { + // 21.2.5.3 get RegExp.prototype.flags() + if (__webpack_require__(8) && /./g.flags != 'g') + __webpack_require__(9).f(RegExp.prototype, 'flags', { + configurable: true, + get: __webpack_require__(77), + }); + + /***/ + }, + /* 196 */ + /***/ function (module, exports) { + module.exports = function (exec) { + try { + return { e: false, v: exec() }; + } catch (e) { + return { e: true, v: e }; + } + }; + + /***/ + }, + /* 197 */ + /***/ function (module, exports, __webpack_require__) { + var anObject = __webpack_require__(2); + var isObject = __webpack_require__(5); + var newPromiseCapability = __webpack_require__(138); + + module.exports = function (C, x) { + anObject(C); + if (isObject(x) && x.constructor === C) return x; + var promiseCapability = newPromiseCapability.f(C); + var resolve = promiseCapability.resolve; + resolve(x); + return promiseCapability.promise; + }; + + /***/ + }, + /* 198 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var strong = __webpack_require__(199); + var validate = __webpack_require__(60); + var MAP = 'Map'; + + // 23.1 Map Objects + module.exports = __webpack_require__(96)( + MAP, + function (get) { + return function Map() { + return get(this, arguments.length > 0 ? arguments[0] : undefined); + }; + }, + { + // 23.1.3.6 Map.prototype.get(key) + get: function get(key) { + var entry = strong.getEntry(validate(this, MAP), key); + return entry && entry.v; + }, + // 23.1.3.9 Map.prototype.set(key, value) + set: function set(key, value) { + return strong.def(validate(this, MAP), key === 0 ? 0 : key, value); + }, + }, + strong, + true, + ); + + /***/ + }, + /* 199 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var dP = __webpack_require__(9).f; + var create = __webpack_require__(54); + var redefineAll = __webpack_require__(59); + var ctx = __webpack_require__(24); + var anInstance = __webpack_require__(57); + var forOf = __webpack_require__(58); + var $iterDefine = __webpack_require__(124); + var step = __webpack_require__(193); + var setSpecies = __webpack_require__(56); + var DESCRIPTORS = __webpack_require__(8); + var fastKey = __webpack_require__(43).fastKey; + var validate = __webpack_require__(60); + var SIZE = DESCRIPTORS ? '_s' : 'size'; + + var getEntry = function (that, key) { + // fast case + var index = fastKey(key); + var entry; + if (index !== 'F') return that._i[index]; + // frozen object case + for (entry = that._f; entry; entry = entry.n) { + if (entry.k == key) return entry; + } + }; + + module.exports = { + getConstructor: function (wrapper, NAME, IS_MAP, ADDER) { + var C = wrapper(function (that, iterable) { + anInstance(that, C, NAME, '_i'); + that._t = NAME; // collection type + that._i = create(null); // index + that._f = undefined; // first entry + that._l = undefined; // last entry + that[SIZE] = 0; // size + if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that); + }); + redefineAll(C.prototype, { + // 23.1.3.1 Map.prototype.clear() + // 23.2.3.2 Set.prototype.clear() + clear: function clear() { + for (var that = validate(this, NAME), data = that._i, entry = that._f; entry; entry = entry.n) { + entry.r = true; + if (entry.p) entry.p = entry.p.n = undefined; + delete data[entry.i]; + } + that._f = that._l = undefined; + that[SIZE] = 0; + }, + // 23.1.3.3 Map.prototype.delete(key) + // 23.2.3.4 Set.prototype.delete(value) + delete: function (key) { + var that = validate(this, NAME); + var entry = getEntry(that, key); + if (entry) { + var next = entry.n; + var prev = entry.p; + delete that._i[entry.i]; + entry.r = true; + if (prev) prev.n = next; + if (next) next.p = prev; + if (that._f == entry) that._f = next; + if (that._l == entry) that._l = prev; + that[SIZE]--; + } + return !!entry; + }, + // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined) + // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined) + forEach: function forEach(callbackfn /* , that = undefined */) { + validate(this, NAME); + var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3); + var entry; + while ((entry = entry ? entry.n : this._f)) { + f(entry.v, entry.k, this); + // revert to the last existing entry + while (entry && entry.r) entry = entry.p; + } + }, + // 23.1.3.7 Map.prototype.has(key) + // 23.2.3.7 Set.prototype.has(value) + has: function has(key) { + return !!getEntry(validate(this, NAME), key); + }, + }); + if (DESCRIPTORS) + dP(C.prototype, 'size', { + get: function () { + return validate(this, NAME)[SIZE]; + }, + }); + return C; + }, + def: function (that, key, value) { + var entry = getEntry(that, key); + var prev, index; + // change existing entry + if (entry) { + entry.v = value; + // create new entry + } else { + that._l = entry = { + i: (index = fastKey(key, true)), // <- index + k: key, // <- key + v: value, // <- value + p: (prev = that._l), // <- previous entry + n: undefined, // <- next entry + r: false, // <- removed + }; + if (!that._f) that._f = entry; + if (prev) prev.n = entry; + that[SIZE]++; + // add to index + if (index !== 'F') that._i[index] = entry; + } + return that; + }, + getEntry: getEntry, + setStrong: function (C, NAME, IS_MAP) { + // add .keys, .values, .entries, [@@iterator] + // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11 + $iterDefine( + C, + NAME, + function (iterated, kind) { + this._t = validate(iterated, NAME); // target + this._k = kind; // kind + this._l = undefined; // previous + }, + function () { + var that = this; + var kind = that._k; + var entry = that._l; + // revert to the last existing entry + while (entry && entry.r) entry = entry.p; + // get next entry + if (!that._t || !(that._l = entry = entry ? entry.n : that._t._f)) { + // or finish the iteration + that._t = undefined; + return step(1); + } + // return step by kind + if (kind == 'keys') return step(0, entry.k); + if (kind == 'values') return step(0, entry.v); + return step(0, [entry.k, entry.v]); + }, + IS_MAP ? 'entries' : 'values', + !IS_MAP, + true, + ); + + // add [@@species], 23.1.2.2, 23.2.2.2 + setSpecies(NAME); + }, + }; + + /***/ + }, + /* 200 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var strong = __webpack_require__(199); + var validate = __webpack_require__(60); + var SET = 'Set'; + + // 23.2 Set Objects + module.exports = __webpack_require__(96)( + SET, + function (get) { + return function Set() { + return get(this, arguments.length > 0 ? arguments[0] : undefined); + }; + }, + { + // 23.2.3.1 Set.prototype.add(value) + add: function add(value) { + return strong.def(validate(this, SET), (value = value === 0 ? 0 : value), value); + }, + }, + strong, + ); + + /***/ + }, + /* 201 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var global = __webpack_require__(3); + var each = __webpack_require__(34)(0); + var redefine = __webpack_require__(16); + var meta = __webpack_require__(43); + var assign = __webpack_require__(180); + var weak = __webpack_require__(202); + var isObject = __webpack_require__(5); + var validate = __webpack_require__(60); + var NATIVE_WEAK_MAP = __webpack_require__(60); + var IS_IE11 = !global.ActiveXObject && 'ActiveXObject' in global; + var WEAK_MAP = 'WeakMap'; + var getWeak = meta.getWeak; + var isExtensible = Object.isExtensible; + var uncaughtFrozenStore = weak.ufstore; + var InternalMap; + + var wrapper = function (get) { + return function WeakMap() { + return get(this, arguments.length > 0 ? arguments[0] : undefined); + }; + }; + + var methods = { + // 23.3.3.3 WeakMap.prototype.get(key) + get: function get(key) { + if (isObject(key)) { + var data = getWeak(key); + if (data === true) return uncaughtFrozenStore(validate(this, WEAK_MAP)).get(key); + return data ? data[this._i] : undefined; + } + }, + // 23.3.3.5 WeakMap.prototype.set(key, value) + set: function set(key, value) { + return weak.def(validate(this, WEAK_MAP), key, value); + }, + }; + + // 23.3 WeakMap Objects + var $WeakMap = (module.exports = __webpack_require__(96)(WEAK_MAP, wrapper, methods, weak, true, true)); + + // IE11 WeakMap frozen keys fix + if (NATIVE_WEAK_MAP && IS_IE11) { + InternalMap = weak.getConstructor(wrapper, WEAK_MAP); + assign(InternalMap.prototype, methods); + meta.NEED = true; + each(['delete', 'has', 'get', 'set'], function (key) { + var proto = $WeakMap.prototype; + var method = proto[key]; + redefine(proto, key, function (a, b) { + // store frozen objects on internal weakmap shim + if (isObject(a) && !isExtensible(a)) { + if (!this._f) this._f = new InternalMap(); + var result = this._f[key](a, b); + return key == 'set' ? this : result; + // store all the rest on native weakmap + } + return method.call(this, a, b); + }); + }); + } + + /***/ + }, + /* 202 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var redefineAll = __webpack_require__(59); + var getWeak = __webpack_require__(43).getWeak; + var anObject = __webpack_require__(2); + var isObject = __webpack_require__(5); + var anInstance = __webpack_require__(57); + var forOf = __webpack_require__(58); + var createArrayMethod = __webpack_require__(34); + var $has = __webpack_require__(18); + var validate = __webpack_require__(60); + var arrayFind = createArrayMethod(5); + var arrayFindIndex = createArrayMethod(6); + var id = 0; + + // fallback for uncaught frozen keys + var uncaughtFrozenStore = function (that) { + return that._l || (that._l = new UncaughtFrozenStore()); + }; + var UncaughtFrozenStore = function () { + this.a = []; + }; + var findUncaughtFrozen = function (store, key) { + return arrayFind(store.a, function (it) { + return it[0] === key; + }); + }; + UncaughtFrozenStore.prototype = { + get: function (key) { + var entry = findUncaughtFrozen(this, key); + if (entry) return entry[1]; + }, + has: function (key) { + return !!findUncaughtFrozen(this, key); + }, + set: function (key, value) { + var entry = findUncaughtFrozen(this, key); + if (entry) entry[1] = value; + else this.a.push([key, value]); + }, + delete: function (key) { + var index = arrayFindIndex(this.a, function (it) { + return it[0] === key; + }); + if (~index) this.a.splice(index, 1); + return !!~index; + }, + }; + + module.exports = { + getConstructor: function (wrapper, NAME, IS_MAP, ADDER) { + var C = wrapper(function (that, iterable) { + anInstance(that, C, NAME, '_i'); + that._t = NAME; // collection type + that._i = id++; // collection id + that._l = undefined; // leak store for uncaught frozen objects + if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that); + }); + redefineAll(C.prototype, { + // 23.3.3.2 WeakMap.prototype.delete(key) + // 23.4.3.3 WeakSet.prototype.delete(value) + delete: function (key) { + if (!isObject(key)) return false; + var data = getWeak(key); + if (data === true) return uncaughtFrozenStore(validate(this, NAME))['delete'](key); + return data && $has(data, this._i) && delete data[this._i]; + }, + // 23.3.3.4 WeakMap.prototype.has(key) + // 23.4.3.4 WeakSet.prototype.has(value) + has: function has(key) { + if (!isObject(key)) return false; + var data = getWeak(key); + if (data === true) return uncaughtFrozenStore(validate(this, NAME)).has(key); + return data && $has(data, this._i); + }, + }); + return C; + }, + def: function (that, key, value) { + var data = getWeak(anObject(key), true); + if (data === true) uncaughtFrozenStore(that).set(key, value); + else data[that._i] = value; + return that; + }, + ufstore: uncaughtFrozenStore, + }; + + /***/ + }, + /* 203 */ + /***/ function (module, exports, __webpack_require__) { + // https://tc39.github.io/ecma262/#sec-toindex + var toInteger = __webpack_require__(26); + var toLength = __webpack_require__(7); + module.exports = function (it) { + if (it === undefined) return 0; + var number = toInteger(it); + var length = toLength(number); + if (number !== length) throw RangeError('Wrong length!'); + return length; + }; + + /***/ + }, + /* 204 */ + /***/ function (module, exports, __webpack_require__) { + // all object keys, includes non-enumerable and symbols + var gOPN = __webpack_require__(55); + var gOPS = __webpack_require__(88); + var anObject = __webpack_require__(2); + var Reflect = __webpack_require__(3).Reflect; + module.exports = + (Reflect && Reflect.ownKeys) || + function ownKeys(it) { + var keys = gOPN.f(anObject(it)); + var getSymbols = gOPS.f; + return getSymbols ? keys.concat(getSymbols(it)) : keys; + }; + + /***/ + }, + /* 205 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray + var isArray = __webpack_require__(89); + var isObject = __webpack_require__(5); + var toLength = __webpack_require__(7); + var ctx = __webpack_require__(24); + var IS_CONCAT_SPREADABLE = __webpack_require__(6)('isConcatSpreadable'); + + function flattenIntoArray(target, original, source, sourceLen, start, depth, mapper, thisArg) { + var targetIndex = start; + var sourceIndex = 0; + var mapFn = mapper ? ctx(mapper, thisArg, 3) : false; + var element, spreadable; + + while (sourceIndex < sourceLen) { + if (sourceIndex in source) { + element = mapFn ? mapFn(source[sourceIndex], sourceIndex, original) : source[sourceIndex]; + + spreadable = false; + if (isObject(element)) { + spreadable = element[IS_CONCAT_SPREADABLE]; + spreadable = spreadable !== undefined ? !!spreadable : isArray(element); + } + + if (spreadable && depth > 0) { + targetIndex = + flattenIntoArray( + target, + original, + element, + toLength(element.length), + targetIndex, + depth - 1, + ) - 1; + } else { + if (targetIndex >= 0x1fffffffffffff) throw TypeError(); + target[targetIndex] = element; + } + + targetIndex++; + } + sourceIndex++; + } + return targetIndex; + } + + module.exports = flattenIntoArray; + + /***/ + }, + /* 206 */ + /***/ function (module, exports, __webpack_require__) { + // https://github.com/tc39/proposal-string-pad-start-end + var toLength = __webpack_require__(7); + var repeat = __webpack_require__(121); + var defined = __webpack_require__(32); + + module.exports = function (that, maxLength, fillString, left) { + var S = String(defined(that)); + var stringLength = S.length; + var fillStr = fillString === undefined ? ' ' : String(fillString); + var intMaxLength = toLength(maxLength); + if (intMaxLength <= stringLength || fillStr == '') return S; + var fillLen = intMaxLength - stringLength; + var stringFiller = repeat.call(fillStr, Math.ceil(fillLen / fillStr.length)); + if (stringFiller.length > fillLen) stringFiller = stringFiller.slice(0, fillLen); + return left ? stringFiller + S : S + stringFiller; + }; + + /***/ + }, + /* 207 */ + /***/ function (module, exports, __webpack_require__) { + var DESCRIPTORS = __webpack_require__(8); + var getKeys = __webpack_require__(52); + var toIObject = __webpack_require__(19); + var isEnum = __webpack_require__(76).f; + module.exports = function (isEntries) { + return function (it) { + var O = toIObject(it); + var keys = getKeys(O); + var length = keys.length; + var i = 0; + var result = []; + var key; + while (length > i) { + key = keys[i++]; + if (!DESCRIPTORS || isEnum.call(O, key)) { + result.push(isEntries ? [key, O[key]] : O[key]); + } + } + return result; + }; + }; + + /***/ + }, + /* 208 */ + /***/ function (module, exports, __webpack_require__) { + // https://github.com/DavidBruant/Map-Set.prototype.toJSON + var classof = __webpack_require__(66); + var from = __webpack_require__(209); + module.exports = function (NAME) { + return function toJSON() { + if (classof(this) != NAME) throw TypeError(NAME + "#toJSON isn't generic"); + return from(this); + }; + }; + + /***/ + }, + /* 209 */ + /***/ function (module, exports, __webpack_require__) { + var forOf = __webpack_require__(58); + + module.exports = function (iter, ITERATOR) { + var result = []; + forOf(iter, false, result.push, result, ITERATOR); + return result; + }; + + /***/ + }, + /* 210 */ + /***/ function (module, exports) { + // https://rwaldron.github.io/proposal-math-extensions/ + module.exports = + Math.scale || + function scale(x, inLow, inHigh, outLow, outHigh) { + if ( + arguments.length === 0 || + // eslint-disable-next-line no-self-compare + x != x || + // eslint-disable-next-line no-self-compare + inLow != inLow || + // eslint-disable-next-line no-self-compare + inHigh != inHigh || + // eslint-disable-next-line no-self-compare + outLow != outLow || + // eslint-disable-next-line no-self-compare + outHigh != outHigh + ) + return NaN; + if (x === Infinity || x === -Infinity) return x; + return ((x - inLow) * (outHigh - outLow)) / (inHigh - inLow) + outLow; + }; + + /***/ + }, + /* 211 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var _interopRequireWildcard = __webpack_require__(472); + + var _interopRequireDefault = __webpack_require__(41); + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.default = void 0; + + var _assign = _interopRequireDefault(__webpack_require__(229)); + + var _stringify = _interopRequireDefault(__webpack_require__(106)); + + var _keys = _interopRequireDefault(__webpack_require__(160)); + + var _reactDom = _interopRequireDefault(__webpack_require__(230)); + + var ClientStartup = _interopRequireWildcard(__webpack_require__(517)); + + var _handleError2 = _interopRequireDefault(__webpack_require__(233)); + + var _ComponentRegistry = _interopRequireDefault(__webpack_require__(234)); + + var _StoreRegistry = _interopRequireDefault(__webpack_require__(533)); + + var _serverRenderReactComponent2 = _interopRequireDefault(__webpack_require__(534)); + + var _buildConsoleReplay2 = _interopRequireDefault(__webpack_require__(237)); + + var _createReactElement = _interopRequireDefault(__webpack_require__(161)); + + var _Authenticity = _interopRequireDefault(__webpack_require__(537)); + + var _context = _interopRequireDefault(__webpack_require__(538)); + + var ctx = (0, _context.default)(); + var DEFAULT_OPTIONS = { + traceTurbolinks: false, + }; + ctx.ReactOnRails = { + /** + * Main entry point to using the react-on-rails npm package. This is how Rails will be able to + * find you components for rendering. + * @param components (key is component name, value is component) + */ + register: function register(components) { + _ComponentRegistry.default.register(components); + }, + + /** + * Allows registration of store generators to be used by multiple react components on one Rails + * view. store generators are functions that take one arg, props, and return a store. Note that + * the setStore API is different in that it's the actual store hydrated with props. + * @param stores (keys are store names, values are the store generators) + */ + registerStore: function registerStore(stores) { + if (!stores) { + throw new Error( + 'Called ReactOnRails.registerStores with a null or undefined, rather than ' + + 'an Object with keys being the store names and the values are the store generators.', + ); + } + + _StoreRegistry.default.register(stores); + }, + + /** + * Allows retrieval of the store by name. This store will be hydrated by any Rails form props. + * Pass optional param throwIfMissing = false if you want to use this call to get back null if the + * store with name is not registered. + * @param name + * @param throwIfMissing Defaults to true. Set to false to have this call return undefined if + * there is no store with the given name. + * @returns Redux Store, possibly hydrated + */ + getStore: function getStore(name) { + var throwIfMissing = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + return _StoreRegistry.default.getStore(name, throwIfMissing); + }, + + /** + * Set options for ReactOnRails, typically before you call ReactOnRails.register + * Available Options: + * `traceTurbolinks: true|false Gives you debugging messages on Turbolinks events + */ + setOptions: function setOptions(newOptions) { + if ('traceTurbolinks' in newOptions) { + this.options.traceTurbolinks = newOptions.traceTurbolinks; // eslint-disable-next-line no-param-reassign + + delete newOptions.traceTurbolinks; + } + + if ((0, _keys.default)(newOptions).length > 0) { + throw new Error( + 'Invalid options passed to ReactOnRails.options: ', + (0, _stringify.default)(newOptions), + ); + } + }, + + /** + * Allow directly calling the page loaded script in case the default events that trigger react + * rendering are not sufficient, such as when loading JavaScript asynchronously with TurboLinks: + * More details can be found here: + * https://github.com/shakacode/react_on_rails/blob/master/docs/additional-reading/turbolinks.md + */ + reactOnRailsPageLoaded: function reactOnRailsPageLoaded() { + ClientStartup.reactOnRailsPageLoaded(); + }, + + /** + * Returns CSRF authenticity token inserted by Rails csrf_meta_tags + * @returns String or null + */ + authenticityToken: function authenticityToken() { + return _Authenticity.default.authenticityToken(); + }, + + /** + * Returns header with csrf authenticity token and XMLHttpRequest + * @param {*} other headers + * @returns {*} header + */ + authenticityHeaders: function authenticityHeaders() { + var otherHeaders = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + return _Authenticity.default.authenticityHeaders(otherHeaders); + }, + // ///////////////////////////////////////////////////////////////////////////// + // INTERNALLY USED APIs + // ///////////////////////////////////////////////////////////////////////////// + + /** + * Retrieve an option by key. + * @param key + * @returns option value + */ + option: function option(key) { + return this.options[key]; + }, + + /** + * Allows retrieval of the store generator by name. This is used internally by ReactOnRails after + * a rails form loads to prepare stores. + * @param name + * @returns Redux Store generator function + */ + getStoreGenerator: function getStoreGenerator(name) { + return _StoreRegistry.default.getStoreGenerator(name); + }, + + /** + * Allows saving the store populated by Rails form props. Used internally by ReactOnRails. + * @param name + * @returns Redux Store, possibly hydrated + */ + setStore: function setStore(name, store) { + return _StoreRegistry.default.setStore(name, store); + }, + + /** + * Clears hydratedStores to avoid accidental usage of wrong store hydrated in previous/parallel + * request. + */ + clearHydratedStores: function clearHydratedStores() { + _StoreRegistry.default.clearHydratedStores(); + }, + + /** + * ReactOnRails.render("HelloWorldApp", {name: "Stranger"}, 'app'); + * + * Does this: + * ReactDOM.render(React.createElement(HelloWorldApp, {name: "Stranger"}), + * document.getElementById('app')) + * + * @param name Name of your registered component + * @param props Props to pass to your component + * @param domNodeId + * @param hydrate Pass truthy to update server rendered html. Default is falsy + * @returns {virtualDomElement} Reference to your component's backing instance + */ + render: function render(name, props, domNodeId, hydrate) { + var componentObj = _ComponentRegistry.default.get(name); + + var reactElement = (0, _createReactElement.default)({ + componentObj: componentObj, + props: props, + domNodeId: domNodeId, + }); + var render = hydrate ? _reactDom.default.hydrate : _reactDom.default.render; // eslint-disable-next-line react/no-render-return-value + + return render(reactElement, document.getElementById(domNodeId)); + }, + + /** + * Get the component that you registered + * @param name + * @returns {name, component, generatorFunction, isRenderer} + */ + getComponent: function getComponent(name) { + return _ComponentRegistry.default.get(name); + }, + + /** + * Used by server rendering by Rails + * @param options + */ + serverRenderReactComponent: function serverRenderReactComponent(options) { + return (0, _serverRenderReactComponent2.default)(options); + }, + + /** + * Used by Rails to catch errors in rendering + * @param options + */ + handleError: function handleError(options) { + return (0, _handleError2.default)(options); + }, + + /** + * Used by Rails server rendering to replay console messages. + */ + buildConsoleReplay: function buildConsoleReplay() { + return (0, _buildConsoleReplay2.default)(); + }, + + /** + * Get an Object containing all registered components. Useful for debugging. + * @returns {*} + */ + registeredComponents: function registeredComponents() { + return _ComponentRegistry.default.components(); + }, + + /** + * Get an Object containing all registered store generators. Useful for debugging. + * @returns {*} + */ + storeGenerators: function storeGenerators() { + return _StoreRegistry.default.storeGenerators(); + }, + + /** + * Get an Object containing all hydrated stores. Useful for debugging. + * @returns {*} + */ + stores: function stores() { + return _StoreRegistry.default.stores(); + }, + resetOptions: function resetOptions() { + this.options = (0, _assign.default)({}, DEFAULT_OPTIONS); + }, + }; + ctx.ReactOnRails.resetOptions(); + ClientStartup.clientStartup(ctx); + var _default = ctx.ReactOnRails; + exports.default = _default; + + /***/ + }, + /* 212 */ + /***/ function (module, exports, __webpack_require__) { + var pIE = __webpack_require__(101); + var createDesc = __webpack_require__(79); + var toIObject = __webpack_require__(61); + var toPrimitive = __webpack_require__(143); + var has = __webpack_require__(45); + var IE8_DOM_DEFINE = __webpack_require__(213); + var gOPD = Object.getOwnPropertyDescriptor; + + exports.f = __webpack_require__(28) + ? gOPD + : function getOwnPropertyDescriptor(O, P) { + O = toIObject(O); + P = toPrimitive(P, true); + if (IE8_DOM_DEFINE) + try { + return gOPD(O, P); + } catch (e) { + /* empty */ + } + if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]); + }; + + /***/ + }, + /* 213 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = + !__webpack_require__(28) && + !__webpack_require__(62)(function () { + return ( + Object.defineProperty(__webpack_require__(214)('div'), 'a', { + get: function () { + return 7; + }, + }).a != 7 + ); + }); + + /***/ + }, + /* 214 */ + /***/ function (module, exports, __webpack_require__) { + var isObject = __webpack_require__(35); + var document = __webpack_require__(29).document; + // typeof document.createElement is 'object' in old IE + var is = isObject(document) && isObject(document.createElement); + module.exports = function (it) { + return is ? document.createElement(it) : {}; + }; + + /***/ + }, + /* 215 */ + /***/ function (module, exports, __webpack_require__) { + // most Object methods by ES6 should accept primitives + var $export = __webpack_require__(36); + var core = __webpack_require__(13); + var fails = __webpack_require__(62); + module.exports = function (KEY, exec) { + var fn = (core.Object || {})[KEY] || Object[KEY]; + var exp = {}; + exp[KEY] = exec(fn); + $export( + $export.S + + $export.F * + fails(function () { + fn(1); + }), + 'Object', + exp, + ); + }; + + /***/ + }, + /* 216 */ + /***/ function (module, exports) { + module.exports = function (it) { + if (typeof it != 'function') throw TypeError(it + ' is not a function!'); + return it; + }; + + /***/ + }, + /* 217 */ + /***/ function (module, exports, __webpack_require__) { + var has = __webpack_require__(45); + var toIObject = __webpack_require__(61); + var arrayIndexOf = __webpack_require__(485)(false); + var IE_PROTO = __webpack_require__(149)('IE_PROTO'); + + module.exports = function (object, names) { + var O = toIObject(object); + var i = 0; + var result = []; + var key; + for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key); + // Don't enum bug & hidden keys + while (names.length > i) + if (has(O, (key = names[i++]))) { + ~arrayIndexOf(result, key) || result.push(key); + } + return result; + }; + + /***/ + }, + /* 218 */ + /***/ function (module, exports) { + module.exports = function (done, value) { + return { value: value, done: !!done }; + }; + + /***/ + }, + /* 219 */ + /***/ function (module, exports, __webpack_require__) { + // 7.2.2 IsArray(argument) + var cof = __webpack_require__(141); + module.exports = + Array.isArray || + function isArray(arg) { + return cof(arg) == 'Array'; + }; + + /***/ + }, + /* 220 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) + var $keys = __webpack_require__(217); + var hiddenKeys = __webpack_require__(151).concat('length', 'prototype'); + + exports.f = + Object.getOwnPropertyNames || + function getOwnPropertyNames(O) { + return $keys(O, hiddenKeys); + }; + + /***/ + }, + /* 221 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // 19.1.2.1 Object.assign(target, source, ...) + var DESCRIPTORS = __webpack_require__(28); + var getKeys = __webpack_require__(81); + var gOPS = __webpack_require__(155); + var pIE = __webpack_require__(101); + var toObject = __webpack_require__(70); + var IObject = __webpack_require__(140); + var $assign = Object.assign; + + // should work with symbols and should have deterministic property order (V8 bug) + module.exports = + !$assign || + __webpack_require__(62)(function () { + var A = {}; + var B = {}; + // eslint-disable-next-line no-undef + var S = Symbol(); + var K = 'abcdefghijklmnopqrst'; + A[S] = 7; + K.split('').forEach(function (k) { + B[k] = k; + }); + return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K; + }) + ? function assign(target, source) { + // eslint-disable-line no-unused-vars + var T = toObject(target); + var aLen = arguments.length; + var index = 1; + var getSymbols = gOPS.f; + var isEnum = pIE.f; + while (aLen > index) { + var S = IObject(arguments[index++]); + var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S); + var length = keys.length; + var j = 0; + var key; + while (length > j) { + key = keys[j++]; + if (!DESCRIPTORS || isEnum.call(S, key)) T[key] = S[key]; + } + } + return T; + } + : $assign; + + /***/ + }, + /* 222 */ + /***/ function (module, exports, __webpack_require__) { + // call something on iterator step with safe closing on error + var anObject = __webpack_require__(63); + module.exports = function (iterator, fn, value, entries) { + try { + return entries ? fn(anObject(value)[0], value[1]) : fn(value); + // 7.4.6 IteratorClose(iterator, completion) + } catch (e) { + var ret = iterator['return']; + if (ret !== undefined) anObject(ret.call(iterator)); + throw e; + } + }; + + /***/ + }, + /* 223 */ + /***/ function (module, exports, __webpack_require__) { + // check on default Array iterator + var Iterators = __webpack_require__(80); + var ITERATOR = __webpack_require__(22)('iterator'); + var ArrayProto = Array.prototype; + + module.exports = function (it) { + return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it); + }; + + /***/ + }, + /* 224 */ + /***/ function (module, exports, __webpack_require__) { + var classof = __webpack_require__(225); + var ITERATOR = __webpack_require__(22)('iterator'); + var Iterators = __webpack_require__(80); + module.exports = __webpack_require__(13).getIteratorMethod = function (it) { + if (it != undefined) return it[ITERATOR] || it['@@iterator'] || Iterators[classof(it)]; + }; + + /***/ + }, + /* 225 */ + /***/ function (module, exports, __webpack_require__) { + // getting tag from 19.1.3.6 Object.prototype.toString() + var cof = __webpack_require__(141); + var TAG = __webpack_require__(22)('toStringTag'); + // ES3 wrong here + var ARG = + cof( + (function () { + return arguments; + })(), + ) == 'Arguments'; + + // fallback for IE11 Script Access Denied error + var tryGet = function (it, key) { + try { + return it[key]; + } catch (e) { + /* empty */ + } + }; + + module.exports = function (it) { + var O, T, B; + return it === undefined + ? 'Undefined' + : it === null + ? 'Null' + : // @@toStringTag case + typeof (T = tryGet((O = Object(it)), TAG)) == 'string' + ? T + : // builtinTag case + ARG + ? cof(O) + : // ES3 arguments fallback + (B = cof(O)) == 'Object' && typeof O.callee == 'function' + ? 'Arguments' + : B; + }; + + /***/ + }, + /* 226 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var global = __webpack_require__(29); + var $export = __webpack_require__(36); + var meta = __webpack_require__(82); + var fails = __webpack_require__(62); + var hide = __webpack_require__(46); + var redefineAll = __webpack_require__(158); + var forOf = __webpack_require__(83); + var anInstance = __webpack_require__(159); + var isObject = __webpack_require__(35); + var setToStringTag = __webpack_require__(105); + var dP = __webpack_require__(30).f; + var each = __webpack_require__(157)(0); + var DESCRIPTORS = __webpack_require__(28); + + module.exports = function (NAME, wrapper, methods, common, IS_MAP, IS_WEAK) { + var Base = global[NAME]; + var C = Base; + var ADDER = IS_MAP ? 'set' : 'add'; + var proto = C && C.prototype; + var O = {}; + if ( + !DESCRIPTORS || + typeof C != 'function' || + !( + IS_WEAK || + (proto.forEach && + !fails(function () { + new C().entries().next(); + })) + ) + ) { + // create collection constructor + C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER); + redefineAll(C.prototype, methods); + meta.NEED = true; + } else { + C = wrapper(function (target, iterable) { + anInstance(target, C, NAME, '_c'); + target._c = new Base(); + if (iterable != undefined) forOf(iterable, IS_MAP, target[ADDER], target); + }); + each('add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON'.split(','), function (KEY) { + var IS_ADDER = KEY == 'add' || KEY == 'set'; + if (KEY in proto && !(IS_WEAK && KEY == 'clear')) + hide(C.prototype, KEY, function (a, b) { + anInstance(this, C, KEY); + if (!IS_ADDER && IS_WEAK && !isObject(a)) return KEY == 'get' ? undefined : false; + var result = this._c[KEY](a === 0 ? 0 : a, b); + return IS_ADDER ? this : result; + }); + }); + IS_WEAK || + dP(C.prototype, 'size', { + get: function () { + return this._c.size; + }, + }); + } + + setToStringTag(C, NAME); + + O[NAME] = C; + $export($export.G + $export.W + $export.F, O); + + if (!IS_WEAK) common.setStrong(C, NAME, IS_MAP); + + return C; + }; + + /***/ + }, + /* 227 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // https://tc39.github.io/proposal-setmap-offrom/ + var $export = __webpack_require__(36); + + module.exports = function (COLLECTION) { + $export($export.S, COLLECTION, { + of: function of() { + var length = arguments.length; + var A = new Array(length); + while (length--) A[length] = arguments[length]; + return new this(A); + }, + }); + }; + + /***/ + }, + /* 228 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // https://tc39.github.io/proposal-setmap-offrom/ + var $export = __webpack_require__(36); + var aFunction = __webpack_require__(216); + var ctx = __webpack_require__(69); + var forOf = __webpack_require__(83); + + module.exports = function (COLLECTION) { + $export($export.S, COLLECTION, { + from: function from(source /* , mapFn, thisArg */) { + var mapFn = arguments[1]; + var mapping, A, n, cb; + aFunction(this); + mapping = mapFn !== undefined; + if (mapping) aFunction(mapFn); + if (source == undefined) return new this(); + A = []; + if (mapping) { + n = 0; + cb = ctx(mapFn, arguments[2], 2); + forOf(source, false, function (nextItem) { + A.push(cb(nextItem, n++)); + }); + } else { + forOf(source, false, A.push, A); + } + return new this(A); + }, + }); + }; + + /***/ + }, + /* 229 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = __webpack_require__(506); + + /***/ + }, + /* 230 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + function checkDCE() { + /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */ + if ( + typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined' || + typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== 'function' + ) { + return; + } + if (true) { + // This branch is unreachable because this function is only called + // in production, but the condition is true only in development. + // Therefore if the branch is still here, dead code elimination wasn't + // properly applied. + // Don't change the message. React DevTools relies on it. Also make sure + // this message doesn't occur elsewhere in this function, or it will cause + // a false positive. + throw new Error('^_^'); + } + try { + // Verify that the code above has been dead code eliminated (DCE'd). + __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE); + } catch (err) { + // DevTools shouldn't crash React, no matter what. + // We should still report in case we break this code. + console.error(err); + } + } + + if (false) { + // DCE check should happen before ReactDOM bundle executes so that + // DevTools can report bad minification during injection. + checkDCE(); + module.exports = require('./cjs/react-dom.production.min.js'); + } else { + module.exports = __webpack_require__(511); + } + + /***/ + }, + /* 231 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + + var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; + + module.exports = ReactPropTypesSecret; + + /***/ + }, + /* 232 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.default = isResultNonReactComponent; + + function isResultNonReactComponent(reactElementOrRouterResult) { + return !!( + reactElementOrRouterResult.renderedHtml || + reactElementOrRouterResult.redirectLocation || + reactElementOrRouterResult.error + ); + } + + /***/ + }, + /* 233 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var _interopRequireDefault = __webpack_require__(41); + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.default = void 0; + + var _react = _interopRequireDefault(__webpack_require__(1)); + + var _server = _interopRequireDefault(__webpack_require__(108)); + + function handleGeneratorFunctionIssue(options) { + var e = options.e, + name = options.name; + var msg = ''; + + if (name) { + var lastLine = + 'A generator function takes a single arg of props (and the location for react-router) ' + + 'and returns a ReactElement.'; + var shouldBeGeneratorError = + "ERROR: ReactOnRails is incorrectly detecting generator function to be false. The React\ncomponent '" + .concat(name, "' seems to be a generator function.\n") + .concat(lastLine); + var reMatchShouldBeGeneratorError = /Can't add property context, object is not extensible/; + + if (reMatchShouldBeGeneratorError.test(e.message)) { + msg += ''.concat(shouldBeGeneratorError, '\n\n'); + console.error(shouldBeGeneratorError); + } + + shouldBeGeneratorError = + "ERROR: ReactOnRails is incorrectly detecting generatorFunction to be true, but the React\ncomponent '" + .concat(name, "' is not a generator function.\n") + .concat(lastLine); + var reMatchShouldNotBeGeneratorError = /Cannot call a class as a function/; + + if (reMatchShouldNotBeGeneratorError.test(e.message)) { + msg += ''.concat(shouldBeGeneratorError, '\n\n'); + console.error(shouldBeGeneratorError); + } + } + + return msg; + } + + var handleError = function handleError(options) { + var e = options.e, + jsCode = options.jsCode, + serverSide = options.serverSide; + console.error('Exception in rendering!'); + var msg = handleGeneratorFunctionIssue(options); + + if (jsCode) { + console.error('JS code was: '.concat(jsCode)); + } + + if (e.fileName) { + console.error('location: '.concat(e.fileName, ':').concat(e.lineNumber)); + } + + console.error('message: '.concat(e.message)); + console.error('stack: '.concat(e.stack)); + + if (serverSide) { + msg += 'Exception in rendering!\n' + .concat( + e.fileName ? '\nlocation: '.concat(e.fileName, ':').concat(e.lineNumber) : '', + '\nMessage: ', + ) + .concat(e.message, '\n\n') + .concat(e.stack); + + var reactElement = _react.default.createElement('pre', null, msg); + + return _server.default.renderToString(reactElement); + } + + return undefined; + }; + + var _default = handleError; + exports.default = _default; + + /***/ + }, + /* 234 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var _interopRequireDefault = __webpack_require__(41); + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.default = void 0; + + var _from = _interopRequireDefault(__webpack_require__(235)); + + var _keys = _interopRequireDefault(__webpack_require__(160)); + + var _map = _interopRequireDefault(__webpack_require__(236)); + + var _generatorFunction = _interopRequireDefault(__webpack_require__(532)); + + // key = name used by react_on_rails + // value = { name, component, generatorFunction: boolean, isRenderer: boolean } + var registeredComponents = new _map.default(); + var _default = { + /** + * @param components { component1: component1, component2: component2, etc. } + */ + register: function register(components) { + (0, _keys.default)(components).forEach(function (name) { + if (registeredComponents.has(name)) { + console.warn('Called register for component that is already registered', name); + } + + var component = components[name]; + + if (!component) { + throw new Error('Called register with null component named '.concat(name)); + } + + var isGeneratorFunction = (0, _generatorFunction.default)(component); + var isRenderer = isGeneratorFunction && component.length === 3; + registeredComponents.set(name, { + name: name, + component: component, + generatorFunction: isGeneratorFunction, + isRenderer: isRenderer, + }); + }); + }, + + /** + * @param name + * @returns { name, component, generatorFunction } + */ + get: function get(name) { + if (registeredComponents.has(name)) { + return registeredComponents.get(name); + } + + var keys = (0, _from.default)(registeredComponents.keys()).join(', '); + throw new Error( + 'Could not find component registered with name ' + .concat(name, '. Registered component names include [ ') + .concat(keys, ' ]. Maybe you forgot to register the component?'), + ); + }, + + /** + * Get a Map containing all registered components. Useful for debugging. + * @returns Map where key is the component name and values are the + * { name, component, generatorFunction} + */ + components: function components() { + return registeredComponents; + }, + }; + exports.default = _default; + + /***/ + }, + /* 235 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = __webpack_require__(519); + + /***/ + }, + /* 236 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = __webpack_require__(523); + + /***/ + }, + /* 237 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var _interopRequireDefault = __webpack_require__(41); + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.consoleReplay = consoleReplay; + exports.default = buildConsoleReplay; + + var _stringify = _interopRequireDefault(__webpack_require__(106)); + + var _RenderUtils = _interopRequireDefault(__webpack_require__(535)); + + var _scriptSanitizedVal = _interopRequireDefault(__webpack_require__(536)); + + function consoleReplay() { + // console.history is a global polyfill used in server rendering. + // $FlowFixMe + if (!(console.history instanceof Array)) { + return ''; + } + + var lines = console.history.map(function (msg) { + var stringifiedList = msg.arguments.map(function (arg) { + var val; + + try { + val = typeof arg === 'string' || arg instanceof String ? arg : (0, _stringify.default)(arg); + } catch (e) { + val = ''.concat(e.message, ': ').concat(arg); + } + + return (0, _scriptSanitizedVal.default)(val); + }); + return 'console.' + .concat(msg.level, '.apply(console, ') + .concat((0, _stringify.default)(stringifiedList), ');'); + }); + return lines.join('\n'); + } + + function buildConsoleReplay() { + return _RenderUtils.default.wrapInScriptTags('consoleReplayLog', consoleReplay()); + } + + /***/ + }, + /* 238 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(10); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash__ = __webpack_require__(542); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_2_lodash__, + ); + + function renderContextRows(railsContext) { + // eslint-disable-next-line no-console + console.log('railsContext.serverSide is ', railsContext.serverSide); + return __WEBPACK_IMPORTED_MODULE_2_lodash___default.a.transform( + railsContext, + function (accum, value, key) { + if (key !== 'serverSide') { + var className = 'js-' + key; + accum.push( + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'tr', + { key: className }, + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'td', + null, + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('strong', null, key, ':\xA0'), + ), + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'td', + { className: className }, + '' + value, + ), + ), + ); + } + }, + [], + ); + } + + var RailsContext = function RailsContext(props) { + return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'table', + null, + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'thead', + null, + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'tr', + null, + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'th', + null, + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('i', null, 'key'), + ), + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'th', + null, + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('i', null, 'value'), + ), + ), + ), + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'tbody', + null, + renderContextRows(props.railsContext), + ), + ); + }; + + RailsContext.propTypes = { + railsContext: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object.isRequired, + }; + + var _default = RailsContext; + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + renderContextRows, + 'renderContextRows', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/RailsContext.jsx', + ); + + __REACT_HOT_LOADER__.register( + RailsContext, + 'RailsContext', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/RailsContext.jsx', + ); + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/RailsContext.jsx', + ); + })(); + + /***/ + }, + /* 239 */ + /***/ function (module, exports) { + module.exports = function (module) { + if (!module.webpackPolyfill) { + module.deprecate = function () {}; + module.paths = []; + // module.parent = undefined by default + if (!module.children) module.children = []; + Object.defineProperty(module, 'loaded', { + enumerable: true, + get: function () { + return module.l; + }, + }); + Object.defineProperty(module, 'id', { + enumerable: true, + get: function () { + return module.i; + }, + }); + module.webpackPolyfill = 1; + } + return module; + }; + + /***/ + }, + /* 240 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'a', function () { + return ActionTypes; + }); + /* harmony export (immutable) */ __webpack_exports__['b'] = createStore; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_isPlainObject__ = + __webpack_require__(241); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_symbol_observable__ = __webpack_require__(562); + + /** + * These are private action types reserved by Redux. + * For any unknown actions, you must return the current state. + * If the current state is undefined, you must return the initial state. + * Do not reference these action types directly in your code. + */ + var ActionTypes = { + INIT: '@@redux/INIT', + + /** + * Creates a Redux store that holds the state tree. + * The only way to change the data in the store is to call `dispatch()` on it. + * + * There should only be a single store in your app. To specify how different + * parts of the state tree respond to actions, you may combine several reducers + * into a single reducer function by using `combineReducers`. + * + * @param {Function} reducer A function that returns the next state tree, given + * the current state tree and the action to handle. + * + * @param {any} [preloadedState] The initial state. You may optionally specify it + * to hydrate the state from the server in universal apps, or to restore a + * previously serialized user session. + * If you use `combineReducers` to produce the root reducer function, this must be + * an object with the same shape as `combineReducers` keys. + * + * @param {Function} [enhancer] The store enhancer. You may optionally specify it + * to enhance the store with third-party capabilities such as middleware, + * time travel, persistence, etc. The only store enhancer that ships with Redux + * is `applyMiddleware()`. + * + * @returns {Store} A Redux store that lets you read the state, dispatch actions + * and subscribe to changes. + */ + }; + function createStore(reducer, preloadedState, enhancer) { + var _ref2; + + if (typeof preloadedState === 'function' && typeof enhancer === 'undefined') { + enhancer = preloadedState; + preloadedState = undefined; + } + + if (typeof enhancer !== 'undefined') { + if (typeof enhancer !== 'function') { + throw new Error('Expected the enhancer to be a function.'); + } + + return enhancer(createStore)(reducer, preloadedState); + } + + if (typeof reducer !== 'function') { + throw new Error('Expected the reducer to be a function.'); + } + + var currentReducer = reducer; + var currentState = preloadedState; + var currentListeners = []; + var nextListeners = currentListeners; + var isDispatching = false; + + function ensureCanMutateNextListeners() { + if (nextListeners === currentListeners) { + nextListeners = currentListeners.slice(); + } + } + + /** + * Reads the state tree managed by the store. + * + * @returns {any} The current state tree of your application. + */ + function getState() { + return currentState; + } + + /** + * Adds a change listener. It will be called any time an action is dispatched, + * and some part of the state tree may potentially have changed. You may then + * call `getState()` to read the current state tree inside the callback. + * + * You may call `dispatch()` from a change listener, with the following + * caveats: + * + * 1. The subscriptions are snapshotted just before every `dispatch()` call. + * If you subscribe or unsubscribe while the listeners are being invoked, this + * will not have any effect on the `dispatch()` that is currently in progress. + * However, the next `dispatch()` call, whether nested or not, will use a more + * recent snapshot of the subscription list. + * + * 2. The listener should not expect to see all state changes, as the state + * might have been updated multiple times during a nested `dispatch()` before + * the listener is called. It is, however, guaranteed that all subscribers + * registered before the `dispatch()` started will be called with the latest + * state by the time it exits. + * + * @param {Function} listener A callback to be invoked on every dispatch. + * @returns {Function} A function to remove this change listener. + */ + function subscribe(listener) { + if (typeof listener !== 'function') { + throw new Error('Expected listener to be a function.'); + } + + var isSubscribed = true; + + ensureCanMutateNextListeners(); + nextListeners.push(listener); + + return function unsubscribe() { + if (!isSubscribed) { + return; + } + + isSubscribed = false; + + ensureCanMutateNextListeners(); + var index = nextListeners.indexOf(listener); + nextListeners.splice(index, 1); + }; + } + + /** + * Dispatches an action. It is the only way to trigger a state change. + * + * The `reducer` function, used to create the store, will be called with the + * current state tree and the given `action`. Its return value will + * be considered the **next** state of the tree, and the change listeners + * will be notified. + * + * The base implementation only supports plain object actions. If you want to + * dispatch a Promise, an Observable, a thunk, or something else, you need to + * wrap your store creating function into the corresponding middleware. For + * example, see the documentation for the `redux-thunk` package. Even the + * middleware will eventually dispatch plain object actions using this method. + * + * @param {Object} action A plain object representing “what changed”. It is + * a good idea to keep actions serializable so you can record and replay user + * sessions, or use the time travelling `redux-devtools`. An action must have + * a `type` property which may not be `undefined`. It is a good idea to use + * string constants for action types. + * + * @returns {Object} For convenience, the same action object you dispatched. + * + * Note that, if you use a custom middleware, it may wrap `dispatch()` to + * return something else (for example, a Promise you can await). + */ + function dispatch(action) { + if (!Object(__WEBPACK_IMPORTED_MODULE_0_lodash_es_isPlainObject__['a' /* default */])(action)) { + throw new Error('Actions must be plain objects. ' + 'Use custom middleware for async actions.'); + } + + if (typeof action.type === 'undefined') { + throw new Error( + 'Actions may not have an undefined "type" property. ' + 'Have you misspelled a constant?', + ); + } + + if (isDispatching) { + throw new Error('Reducers may not dispatch actions.'); + } + + try { + isDispatching = true; + currentState = currentReducer(currentState, action); + } finally { + isDispatching = false; + } + + var listeners = (currentListeners = nextListeners); + for (var i = 0; i < listeners.length; i++) { + var listener = listeners[i]; + listener(); + } + + return action; + } + + /** + * Replaces the reducer currently used by the store to calculate the state. + * + * You might need this if your app implements code splitting and you want to + * load some of the reducers dynamically. You might also need this if you + * implement a hot reloading mechanism for Redux. + * + * @param {Function} nextReducer The reducer for the store to use instead. + * @returns {void} + */ + function replaceReducer(nextReducer) { + if (typeof nextReducer !== 'function') { + throw new Error('Expected the nextReducer to be a function.'); + } + + currentReducer = nextReducer; + dispatch({ type: ActionTypes.INIT }); + } + + /** + * Interoperability point for observable/reactive libraries. + * @returns {observable} A minimal observable of state changes. + * For more information, see the observable proposal: + * https://github.com/tc39/proposal-observable + */ + function observable() { + var _ref; + + var outerSubscribe = subscribe; + return ( + (_ref = { + /** + * The minimal observable subscription method. + * @param {Object} observer Any object that can be used as an observer. + * The observer object should have a `next` method. + * @returns {subscription} An object with an `unsubscribe` method that can + * be used to unsubscribe the observable from the store, and prevent further + * emission of values from the observable. + */ + subscribe: function subscribe(observer) { + if (typeof observer !== 'object') { + throw new TypeError('Expected the observer to be an object.'); + } + + function observeState() { + if (observer.next) { + observer.next(getState()); + } + } + + observeState(); + var unsubscribe = outerSubscribe(observeState); + return { unsubscribe: unsubscribe }; + }, + }), + (_ref[__WEBPACK_IMPORTED_MODULE_1_symbol_observable__['a' /* default */]] = function () { + return this; + }), + _ref + ); + } + + // When a store is created, an "INIT" action is dispatched so that every + // reducer returns their initial state. This effectively populates + // the initial state tree. + dispatch({ type: ActionTypes.INIT }); + + return ( + (_ref2 = { + dispatch: dispatch, + subscribe: subscribe, + getState: getState, + replaceReducer: replaceReducer, + }), + (_ref2[__WEBPACK_IMPORTED_MODULE_1_symbol_observable__['a' /* default */]] = observable), + _ref2 + ); + } + + /***/ + }, + /* 241 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__ = __webpack_require__(554); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getPrototype_js__ = __webpack_require__(559); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isObjectLike_js__ = __webpack_require__(561); + + /** `Object#toString` result references. */ + var objectTag = '[object Object]'; + + /** Used for built-in method references. */ + var funcProto = Function.prototype, + objectProto = Object.prototype; + + /** Used to resolve the decompiled source of functions. */ + var funcToString = funcProto.toString; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** Used to infer the `Object` constructor. */ + var objectCtorString = funcToString.call(Object); + + /** + * Checks if `value` is a plain object, that is, an object created by the + * `Object` constructor or one with a `[[Prototype]]` of `null`. + * + * @static + * @memberOf _ + * @since 0.8.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * _.isPlainObject(new Foo); + * // => false + * + * _.isPlainObject([1, 2, 3]); + * // => false + * + * _.isPlainObject({ 'x': 0, 'y': 0 }); + * // => true + * + * _.isPlainObject(Object.create(null)); + * // => true + */ + function isPlainObject(value) { + if ( + !Object(__WEBPACK_IMPORTED_MODULE_2__isObjectLike_js__['a' /* default */])(value) || + Object(__WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__['a' /* default */])(value) != objectTag + ) { + return false; + } + var proto = Object(__WEBPACK_IMPORTED_MODULE_1__getPrototype_js__['a' /* default */])(value); + if (proto === null) { + return true; + } + var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; + return ( + typeof Ctor == 'function' && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString + ); + } + + /* harmony default export */ __webpack_exports__['a'] = isPlainObject; + + /***/ + }, + /* 242 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__root_js__ = __webpack_require__(555); + + /** Built-in value references. */ + var Symbol = __WEBPACK_IMPORTED_MODULE_0__root_js__['a' /* default */].Symbol; + + /* harmony default export */ __webpack_exports__['a'] = Symbol; + + /***/ + }, + /* 243 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = warning; + /** + * Prints a warning in the console if it exists. + * + * @param {String} message The warning message. + * @returns {void} + */ + function warning(message) { + /* eslint-disable no-console */ + if (typeof console !== 'undefined' && typeof console.error === 'function') { + console.error(message); + } + /* eslint-enable no-console */ + try { + // This error was thrown as a convenience so that if you enable + // "break on all exceptions" in your console, + // it would pause the execution at this line. + throw new Error(message); + /* eslint-disable no-empty */ + } catch (e) {} + /* eslint-enable no-empty */ + } + + /***/ + }, + /* 244 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = compose; + /** + * Composes single-argument functions from right to left. The rightmost + * function can take multiple arguments as it provides the signature for + * the resulting composite function. + * + * @param {...Function} funcs The functions to compose. + * @returns {Function} A function obtained by composing the argument functions + * from right to left. For example, compose(f, g, h) is identical to doing + * (...args) => f(g(h(...args))). + */ + + function compose() { + for (var _len = arguments.length, funcs = Array(_len), _key = 0; _key < _len; _key++) { + funcs[_key] = arguments[_key]; + } + + if (funcs.length === 0) { + return function (arg) { + return arg; + }; + } + + if (funcs.length === 1) { + return funcs[0]; + } + + return funcs.reduce(function (a, b) { + return function () { + return a(b.apply(undefined, arguments)); + }; + }); + } + + /***/ + }, + /* 245 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = _inheritsLoose; + function _inheritsLoose(subClass, superClass) { + subClass.prototype = Object.create(superClass.prototype); + subClass.prototype.constructor = subClass; + subClass.__proto__ = superClass; + } + + /***/ + }, + /* 246 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'b', function () { + return subscriptionShape; + }); + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'a', function () { + return storeShape; + }); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(10); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + + var subscriptionShape = __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.shape({ + trySubscribe: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired, + tryUnsubscribe: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired, + notifyNestedSubs: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired, + isSubscribed: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired, + }); + var storeShape = __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.shape({ + subscribe: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired, + dispatch: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired, + getState: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired, + }); + + /***/ + }, + /* 247 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = connectAdvanced; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_inheritsLoose__ = + __webpack_require__(245); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_esm_assertThisInitialized__ = + __webpack_require__(569); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__babel_runtime_helpers_esm_extends__ = + __webpack_require__(165); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__babel_runtime_helpers_esm_objectWithoutPropertiesLoose__ = + __webpack_require__(166); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_hoist_non_react_statics__ = + __webpack_require__(570); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_hoist_non_react_statics___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_hoist_non_react_statics__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_invariant__ = __webpack_require__(14); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_invariant___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_5_invariant__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_6_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react_is__ = __webpack_require__(109); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react_is___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_7_react_is__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__utils_Subscription__ = __webpack_require__(571); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__utils_PropTypes__ = __webpack_require__(246); + + var prefixUnsafeLifecycleMethods = + typeof __WEBPACK_IMPORTED_MODULE_6_react___default.a.forwardRef !== 'undefined'; + var hotReloadingVersion = 0; + var dummyState = {}; + + function noop() {} + + function makeSelectorStateful(sourceSelector, store) { + // wrap the selector in an object that tracks its results between runs. + var selector = { + run: function runComponentSelector(props) { + try { + var nextProps = sourceSelector(store.getState(), props); + + if (nextProps !== selector.props || selector.error) { + selector.shouldComponentUpdate = true; + selector.props = nextProps; + selector.error = null; + } + } catch (error) { + selector.shouldComponentUpdate = true; + selector.error = error; + } + }, + }; + return selector; + } + + function connectAdvanced( + /* + selectorFactory is a func that is responsible for returning the selector function used to + compute new props from state, props, and dispatch. For example: + export default connectAdvanced((dispatch, options) => (state, props) => ({ + thing: state.things[props.thingId], + saveThing: fields => dispatch(actionCreators.saveThing(props.thingId, fields)), + }))(YourComponent) + Access to dispatch is provided to the factory so selectorFactories can bind actionCreators + outside of their selector as an optimization. Options passed to connectAdvanced are passed to + the selectorFactory, along with displayName and WrappedComponent, as the second argument. + Note that selectorFactory is responsible for all caching/memoization of inbound and outbound + props. Do not use connectAdvanced directly without memoizing results between calls to your + selector, otherwise the Connect component will re-render on every state or props change. +*/ + selectorFactory, // options object: + _ref, + ) { + var _contextTypes, _childContextTypes; + + if (_ref === void 0) { + _ref = {}; + } + + var _ref2 = _ref, + _ref2$getDisplayName = _ref2.getDisplayName, + getDisplayName = + _ref2$getDisplayName === void 0 + ? function (name) { + return 'ConnectAdvanced(' + name + ')'; + } + : _ref2$getDisplayName, + _ref2$methodName = _ref2.methodName, + methodName = _ref2$methodName === void 0 ? 'connectAdvanced' : _ref2$methodName, + _ref2$renderCountProp = _ref2.renderCountProp, + renderCountProp = _ref2$renderCountProp === void 0 ? undefined : _ref2$renderCountProp, + _ref2$shouldHandleSta = _ref2.shouldHandleStateChanges, + shouldHandleStateChanges = _ref2$shouldHandleSta === void 0 ? true : _ref2$shouldHandleSta, + _ref2$storeKey = _ref2.storeKey, + storeKey = _ref2$storeKey === void 0 ? 'store' : _ref2$storeKey, + _ref2$withRef = _ref2.withRef, + withRef = _ref2$withRef === void 0 ? false : _ref2$withRef, + connectOptions = Object( + __WEBPACK_IMPORTED_MODULE_3__babel_runtime_helpers_esm_objectWithoutPropertiesLoose__[ + 'a' /* default */ + ], + )(_ref2, [ + 'getDisplayName', + 'methodName', + 'renderCountProp', + 'shouldHandleStateChanges', + 'storeKey', + 'withRef', + ]); + + var subscriptionKey = storeKey + 'Subscription'; + var version = hotReloadingVersion++; + var contextTypes = + ((_contextTypes = {}), + (_contextTypes[storeKey] = __WEBPACK_IMPORTED_MODULE_9__utils_PropTypes__['a' /* storeShape */]), + (_contextTypes[subscriptionKey] = + __WEBPACK_IMPORTED_MODULE_9__utils_PropTypes__['b' /* subscriptionShape */]), + _contextTypes); + var childContextTypes = + ((_childContextTypes = {}), + (_childContextTypes[subscriptionKey] = + __WEBPACK_IMPORTED_MODULE_9__utils_PropTypes__['b' /* subscriptionShape */]), + _childContextTypes); + return function wrapWithConnect(WrappedComponent) { + __WEBPACK_IMPORTED_MODULE_5_invariant___default()( + Object(__WEBPACK_IMPORTED_MODULE_7_react_is__['isValidElementType'])(WrappedComponent), + 'You must pass a component to the function returned by ' + + (methodName + '. Instead received ' + JSON.stringify(WrappedComponent)), + ); + var wrappedComponentName = WrappedComponent.displayName || WrappedComponent.name || 'Component'; + var displayName = getDisplayName(wrappedComponentName); + + var selectorFactoryOptions = Object( + __WEBPACK_IMPORTED_MODULE_2__babel_runtime_helpers_esm_extends__['a' /* default */], + )({}, connectOptions, { + getDisplayName: getDisplayName, + methodName: methodName, + renderCountProp: renderCountProp, + shouldHandleStateChanges: shouldHandleStateChanges, + storeKey: storeKey, + withRef: withRef, + displayName: displayName, + wrappedComponentName: wrappedComponentName, + WrappedComponent: WrappedComponent, // TODO Actually fix our use of componentWillReceiveProps + + /* eslint-disable react/no-deprecated */ + }); + + var Connect = + /*#__PURE__*/ + (function (_Component) { + Object( + __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_inheritsLoose__['a' /* default */], + )(Connect, _Component); + + function Connect(props, context) { + var _this; + + _this = _Component.call(this, props, context) || this; + _this.version = version; + _this.state = {}; + _this.renderCount = 0; + _this.store = props[storeKey] || context[storeKey]; + _this.propsMode = Boolean(props[storeKey]); + _this.setWrappedInstance = _this.setWrappedInstance.bind( + Object( + __WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_esm_assertThisInitialized__[ + 'a' /* default */ + ], + )( + Object( + __WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_esm_assertThisInitialized__[ + 'a' /* default */ + ], + )(_this), + ), + ); + __WEBPACK_IMPORTED_MODULE_5_invariant___default()( + _this.store, + 'Could not find "' + + storeKey + + '" in either the context or props of ' + + ('"' + displayName + '". Either wrap the root component in a <Provider>, ') + + ('or explicitly pass "' + storeKey + '" as a prop to "' + displayName + '".'), + ); + + _this.initSelector(); + + _this.initSubscription(); + + return _this; + } + + var _proto = Connect.prototype; + + _proto.getChildContext = function getChildContext() { + var _ref3; + + // If this component received store from props, its subscription should be transparent + // to any descendants receiving store+subscription from context; it passes along + // subscription passed to it. Otherwise, it shadows the parent subscription, which allows + // Connect to control ordering of notifications to flow top-down. + var subscription = this.propsMode ? null : this.subscription; + return ( + (_ref3 = {}), + (_ref3[subscriptionKey] = subscription || this.context[subscriptionKey]), + _ref3 + ); + }; + + _proto.componentDidMount = function componentDidMount() { + if (!shouldHandleStateChanges) return; // componentWillMount fires during server side rendering, but componentDidMount and + // componentWillUnmount do not. Because of this, trySubscribe happens during ...didMount. + // Otherwise, unsubscription would never take place during SSR, causing a memory leak. + // To handle the case where a child component may have triggered a state change by + // dispatching an action in its componentWillMount, we have to re-run the select and maybe + // re-render. + + this.subscription.trySubscribe(); + this.selector.run(this.props); + if (this.selector.shouldComponentUpdate) this.forceUpdate(); + }; // Note: this is renamed below to the UNSAFE_ version in React >=16.3.0 + + _proto.componentWillReceiveProps = function componentWillReceiveProps(nextProps) { + this.selector.run(nextProps); + }; + + _proto.shouldComponentUpdate = function shouldComponentUpdate() { + return this.selector.shouldComponentUpdate; + }; + + _proto.componentWillUnmount = function componentWillUnmount() { + if (this.subscription) this.subscription.tryUnsubscribe(); + this.subscription = null; + this.notifyNestedSubs = noop; + this.store = null; + this.selector.run = noop; + this.selector.shouldComponentUpdate = false; + }; + + _proto.getWrappedInstance = function getWrappedInstance() { + __WEBPACK_IMPORTED_MODULE_5_invariant___default()( + withRef, + 'To access the wrapped instance, you need to specify ' + + ('{ withRef: true } in the options argument of the ' + methodName + '() call.'), + ); + return this.wrappedInstance; + }; + + _proto.setWrappedInstance = function setWrappedInstance(ref) { + this.wrappedInstance = ref; + }; + + _proto.initSelector = function initSelector() { + var sourceSelector = selectorFactory(this.store.dispatch, selectorFactoryOptions); + this.selector = makeSelectorStateful(sourceSelector, this.store); + this.selector.run(this.props); + }; + + _proto.initSubscription = function initSubscription() { + if (!shouldHandleStateChanges) return; // parentSub's source should match where store came from: props vs. context. A component + // connected to the store via props shouldn't use subscription from context, or vice versa. + + var parentSub = (this.propsMode ? this.props : this.context)[subscriptionKey]; + this.subscription = new __WEBPACK_IMPORTED_MODULE_8__utils_Subscription__['a' /* default */]( + this.store, + parentSub, + this.onStateChange.bind(this), + ); // `notifyNestedSubs` is duplicated to handle the case where the component is unmounted in + // the middle of the notification loop, where `this.subscription` will then be null. An + // extra null check every change can be avoided by copying the method onto `this` and then + // replacing it with a no-op on unmount. This can probably be avoided if Subscription's + // listeners logic is changed to not call listeners that have been unsubscribed in the + // middle of the notification loop. + + this.notifyNestedSubs = this.subscription.notifyNestedSubs.bind(this.subscription); + }; + + _proto.onStateChange = function onStateChange() { + this.selector.run(this.props); + + if (!this.selector.shouldComponentUpdate) { + this.notifyNestedSubs(); + } else { + this.componentDidUpdate = this.notifyNestedSubsOnComponentDidUpdate; + this.setState(dummyState); + } + }; + + _proto.notifyNestedSubsOnComponentDidUpdate = function notifyNestedSubsOnComponentDidUpdate() { + // `componentDidUpdate` is conditionally implemented when `onStateChange` determines it + // needs to notify nested subs. Once called, it unimplements itself until further state + // changes occur. Doing it this way vs having a permanent `componentDidUpdate` that does + // a boolean check every time avoids an extra method call most of the time, resulting + // in some perf boost. + this.componentDidUpdate = undefined; + this.notifyNestedSubs(); + }; + + _proto.isSubscribed = function isSubscribed() { + return Boolean(this.subscription) && this.subscription.isSubscribed(); + }; + + _proto.addExtraProps = function addExtraProps(props) { + if (!withRef && !renderCountProp && !(this.propsMode && this.subscription)) return props; // make a shallow copy so that fields added don't leak to the original selector. + // this is especially important for 'ref' since that's a reference back to the component + // instance. a singleton memoized selector would then be holding a reference to the + // instance, preventing the instance from being garbage collected, and that would be bad + + var withExtras = Object( + __WEBPACK_IMPORTED_MODULE_2__babel_runtime_helpers_esm_extends__['a' /* default */], + )({}, props); + + if (withRef) withExtras.ref = this.setWrappedInstance; + if (renderCountProp) withExtras[renderCountProp] = this.renderCount++; + if (this.propsMode && this.subscription) withExtras[subscriptionKey] = this.subscription; + return withExtras; + }; + + _proto.render = function render() { + var selector = this.selector; + selector.shouldComponentUpdate = false; + + if (selector.error) { + throw selector.error; + } else { + return Object(__WEBPACK_IMPORTED_MODULE_6_react__['createElement'])( + WrappedComponent, + this.addExtraProps(selector.props), + ); + } + }; + + return Connect; + })(__WEBPACK_IMPORTED_MODULE_6_react__['Component']); + + if (prefixUnsafeLifecycleMethods) { + // Use UNSAFE_ event name where supported + Connect.prototype.UNSAFE_componentWillReceiveProps = Connect.prototype.componentWillReceiveProps; + delete Connect.prototype.componentWillReceiveProps; + } + /* eslint-enable react/no-deprecated */ + + Connect.WrappedComponent = WrappedComponent; + Connect.displayName = displayName; + Connect.childContextTypes = childContextTypes; + Connect.contextTypes = contextTypes; + Connect.propTypes = contextTypes; + + if (true) { + // Use UNSAFE_ event name where supported + var eventName = prefixUnsafeLifecycleMethods + ? 'UNSAFE_componentWillUpdate' + : 'componentWillUpdate'; + + Connect.prototype[eventName] = function componentWillUpdate() { + var _this2 = this; + + // We are hot reloading! + if (this.version !== version) { + this.version = version; + this.initSelector(); // If any connected descendants don't hot reload (and resubscribe in the process), their + // listeners will be lost when we unsubscribe. Unfortunately, by copying over all + // listeners, this does mean that the old versions of connected descendants will still be + // notified of state changes; however, their onStateChange function is a no-op so this + // isn't a huge deal. + + var oldListeners = []; + + if (this.subscription) { + oldListeners = this.subscription.listeners.get(); + this.subscription.tryUnsubscribe(); + } + + this.initSubscription(); + + if (shouldHandleStateChanges) { + this.subscription.trySubscribe(); + oldListeners.forEach(function (listener) { + return _this2.subscription.listeners.subscribe(listener); + }); + } + } + }; + } + + return __WEBPACK_IMPORTED_MODULE_4_hoist_non_react_statics___default()(Connect, WrappedComponent); + }; + } + + /***/ + }, + /* 248 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = wrapMapToPropsConstant; + /* unused harmony export getDependsOnOwnProps */ + /* harmony export (immutable) */ __webpack_exports__['b'] = wrapMapToPropsFunc; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils_verifyPlainObject__ = + __webpack_require__(249); + + function wrapMapToPropsConstant(getConstant) { + return function initConstantSelector(dispatch, options) { + var constant = getConstant(dispatch, options); + + function constantSelector() { + return constant; + } + + constantSelector.dependsOnOwnProps = false; + return constantSelector; + }; + } // dependsOnOwnProps is used by createMapToPropsProxy to determine whether to pass props as args + // to the mapToProps function being wrapped. It is also used by makePurePropsSelector to determine + // whether mapToProps needs to be invoked when props have changed. + // + // A length of one signals that mapToProps does not depend on props from the parent component. + // A length of zero is assumed to mean mapToProps is getting args via arguments or ...args and + // therefore not reporting its length accurately.. + + function getDependsOnOwnProps(mapToProps) { + return mapToProps.dependsOnOwnProps !== null && mapToProps.dependsOnOwnProps !== undefined + ? Boolean(mapToProps.dependsOnOwnProps) + : mapToProps.length !== 1; + } // Used by whenMapStateToPropsIsFunction and whenMapDispatchToPropsIsFunction, + // this function wraps mapToProps in a proxy function which does several things: + // + // * Detects whether the mapToProps function being called depends on props, which + // is used by selectorFactory to decide if it should reinvoke on props changes. + // + // * On first call, handles mapToProps if returns another function, and treats that + // new function as the true mapToProps for subsequent calls. + // + // * On first call, verifies the first result is a plain object, in order to warn + // the developer that their mapToProps function is not returning a valid result. + // + + function wrapMapToPropsFunc(mapToProps, methodName) { + return function initProxySelector(dispatch, _ref) { + var displayName = _ref.displayName; + + var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) { + return proxy.dependsOnOwnProps + ? proxy.mapToProps(stateOrDispatch, ownProps) + : proxy.mapToProps(stateOrDispatch); + }; // allow detectFactoryAndVerify to get ownProps + + proxy.dependsOnOwnProps = true; + + proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) { + proxy.mapToProps = mapToProps; + proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps); + var props = proxy(stateOrDispatch, ownProps); + + if (typeof props === 'function') { + proxy.mapToProps = props; + proxy.dependsOnOwnProps = getDependsOnOwnProps(props); + props = proxy(stateOrDispatch, ownProps); + } + + if (true) + Object(__WEBPACK_IMPORTED_MODULE_0__utils_verifyPlainObject__['a' /* default */])( + props, + displayName, + methodName, + ); + return props; + }; + + return proxy; + }; + } + + /***/ + }, + /* 249 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = verifyPlainObject; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isPlainObject__ = __webpack_require__(575); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__warning__ = __webpack_require__(164); + + function verifyPlainObject(value, displayName, methodName) { + if (!Object(__WEBPACK_IMPORTED_MODULE_0__isPlainObject__['a' /* default */])(value)) { + Object(__WEBPACK_IMPORTED_MODULE_1__warning__['a' /* default */])( + methodName + + '() in ' + + displayName + + ' must return a plain object. Instead received ' + + value + + '.', + ); + } + } + + /***/ + }, + /* 250 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + function createThunkMiddleware(extraArgument) { + return function (_ref) { + var dispatch = _ref.dispatch, + getState = _ref.getState; + return function (next) { + return function (action) { + if (typeof action === 'function') { + return action(dispatch, getState, extraArgument); + } + + return next(action); + }; + }; + }; + } + + var thunk = createThunkMiddleware(); + thunk.withExtraArgument = createThunkMiddleware; + + /* harmony default export */ __webpack_exports__['a'] = thunk; + + /***/ + }, + /* 251 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__HelloWorldReducer__ = __webpack_require__(580); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__RailsContextReducer__ = __webpack_require__(581); + + // This is how you do a directory of reducers. + // The `import * as reducers` does not work for a directory, but only with a single file + var _default = { + helloWorldData: __WEBPACK_IMPORTED_MODULE_0__HelloWorldReducer__['a' /* default */], + railsContext: __WEBPACK_IMPORTED_MODULE_1__RailsContextReducer__['a' /* default */], + }; + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/reducers/reducersIndex.jsx', + ); + })(); + + /***/ + }, + /* 252 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'a', function () { + return HELLO_WORLD_NAME_UPDATE; + }); + /* eslint-disable import/prefer-default-export */ + var HELLO_WORLD_NAME_UPDATE = 'HELLO_WORLD_NAME_UPDATE'; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + HELLO_WORLD_NAME_UPDATE, + 'HELLO_WORLD_NAME_UPDATE', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/constants/HelloWorldConstants.jsx', + ); + })(); + + /***/ + }, + /* 253 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(10); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_redux__ = __webpack_require__(163); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_redux__ = __webpack_require__(110); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__HelloWorldRedux__ = __webpack_require__(583); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__actions_HelloWorldActions__ = + __webpack_require__(584); + + var HelloWorldContainer = function HelloWorldContainer(_ref) { + var actions = _ref.actions, + data = _ref.data, + railsContext = _ref.railsContext; + return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_4__HelloWorldRedux__['a' /* default */], + { actions: actions, data: data, railsContext: railsContext }, + ); + }; + HelloWorldContainer.propTypes = { + actions: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object.isRequired, + data: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object.isRequired, + railsContext: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object.isRequired, + }; + + function mapStateToProps(state) { + return { + data: state.helloWorldData, + railsContext: state.railsContext, + }; + } + + function mapDispatchToProps(dispatch) { + return { + actions: Object(__WEBPACK_IMPORTED_MODULE_3_redux__['b' /* bindActionCreators */])( + __WEBPACK_IMPORTED_MODULE_5__actions_HelloWorldActions__, + dispatch, + ), + }; + } + + // Don't forget to actually use connect! + + var _default = Object(__WEBPACK_IMPORTED_MODULE_2_react_redux__['b' /* connect */])( + mapStateToProps, + mapDispatchToProps, + )(HelloWorldContainer); + + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + HelloWorldContainer, + 'HelloWorldContainer', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/HelloWorldContainer.jsx', + ); + + __REACT_HOT_LOADER__.register( + mapStateToProps, + 'mapStateToProps', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/HelloWorldContainer.jsx', + ); + + __REACT_HOT_LOADER__.register( + mapDispatchToProps, + 'mapDispatchToProps', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/HelloWorldContainer.jsx', + ); + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/HelloWorldContainer.jsx', + ); + })(); + + /***/ + }, + /* 254 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = createTransitionManager; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__routerWarning__ = __webpack_require__(71); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__computeChangedRoutes__ = __webpack_require__(588); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__TransitionUtils__ = __webpack_require__(589); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isActive__ = __webpack_require__(590); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__getComponents__ = __webpack_require__(591); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__matchRoutes__ = __webpack_require__(592); + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + function hasAnyProperties(object) { + for (var p in object) { + if (Object.prototype.hasOwnProperty.call(object, p)) return true; + } + return false; + } + + function createTransitionManager(history, routes) { + var state = {}; + + var _getTransitionUtils = Object(__WEBPACK_IMPORTED_MODULE_2__TransitionUtils__['a' /* default */])(), + runEnterHooks = _getTransitionUtils.runEnterHooks, + runChangeHooks = _getTransitionUtils.runChangeHooks, + runLeaveHooks = _getTransitionUtils.runLeaveHooks; + + // Signature should be (location, indexOnly), but needs to support (path, + // query, indexOnly) + + function isActive(location, indexOnly) { + location = history.createLocation(location); + + return Object(__WEBPACK_IMPORTED_MODULE_3__isActive__['a' /* default */])( + location, + indexOnly, + state.location, + state.routes, + state.params, + ); + } + + var partialNextState = void 0; + + function match(location, callback) { + if (partialNextState && partialNextState.location === location) { + // Continue from where we left off. + finishMatch(partialNextState, callback); + } else { + Object(__WEBPACK_IMPORTED_MODULE_5__matchRoutes__['a' /* default */])( + routes, + location, + function (error, nextState) { + if (error) { + callback(error); + } else if (nextState) { + finishMatch(_extends({}, nextState, { location: location }), callback); + } else { + callback(); + } + }, + ); + } + } + + function finishMatch(nextState, callback) { + var _computeChangedRoutes = Object( + __WEBPACK_IMPORTED_MODULE_1__computeChangedRoutes__['a' /* default */], + )(state, nextState), + leaveRoutes = _computeChangedRoutes.leaveRoutes, + changeRoutes = _computeChangedRoutes.changeRoutes, + enterRoutes = _computeChangedRoutes.enterRoutes; + + runLeaveHooks(leaveRoutes, state); + + // Tear down confirmation hooks for left routes + leaveRoutes + .filter(function (route) { + return enterRoutes.indexOf(route) === -1; + }) + .forEach(removeListenBeforeHooksForRoute); + + // change and enter hooks are run in series + runChangeHooks(changeRoutes, state, nextState, function (error, redirectInfo) { + if (error || redirectInfo) return handleErrorOrRedirect(error, redirectInfo); + + runEnterHooks(enterRoutes, nextState, finishEnterHooks); + }); + + function finishEnterHooks(error, redirectInfo) { + if (error || redirectInfo) return handleErrorOrRedirect(error, redirectInfo); + + // TODO: Fetch components after state is updated. + Object(__WEBPACK_IMPORTED_MODULE_4__getComponents__['a' /* default */])( + nextState, + function (error, components) { + if (error) { + callback(error); + } else { + // TODO: Make match a pure function and have some other API + // for "match and update state". + callback(null, null, (state = _extends({}, nextState, { components: components }))); + } + }, + ); + } + + function handleErrorOrRedirect(error, redirectInfo) { + if (error) callback(error); + else callback(null, redirectInfo); + } + } + + var RouteGuid = 1; + + function getRouteID(route) { + var create = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + + return route.__id__ || (create && (route.__id__ = RouteGuid++)); + } + + var RouteHooks = Object.create(null); + + function getRouteHooksForRoutes(routes) { + return routes + .map(function (route) { + return RouteHooks[getRouteID(route)]; + }) + .filter(function (hook) { + return hook; + }); + } + + function transitionHook(location, callback) { + Object(__WEBPACK_IMPORTED_MODULE_5__matchRoutes__['a' /* default */])( + routes, + location, + function (error, nextState) { + if (nextState == null) { + // TODO: We didn't actually match anything, but hang + // onto error/nextState so we don't have to matchRoutes + // again in the listen callback. + callback(); + return; + } + + // Cache some state here so we don't have to + // matchRoutes() again in the listen callback. + partialNextState = _extends({}, nextState, { location: location }); + + var hooks = getRouteHooksForRoutes( + Object(__WEBPACK_IMPORTED_MODULE_1__computeChangedRoutes__['a' /* default */])( + state, + partialNextState, + ).leaveRoutes, + ); + + var result = void 0; + for (var i = 0, len = hooks.length; result == null && i < len; ++i) { + // Passing the location arg here indicates to + // the user that this is a transition hook. + result = hooks[i](location); + } + + callback(result); + }, + ); + } + + /* istanbul ignore next: untestable with Karma */ + function beforeUnloadHook() { + // Synchronously check to see if any route hooks want + // to prevent the current window/tab from closing. + if (state.routes) { + var hooks = getRouteHooksForRoutes(state.routes); + + var message = void 0; + for (var i = 0, len = hooks.length; typeof message !== 'string' && i < len; ++i) { + // Passing no args indicates to the user that this is a + // beforeunload hook. We don't know the next location. + message = hooks[i](); + } + + return message; + } + } + + var unlistenBefore = void 0, + unlistenBeforeUnload = void 0; + + function removeListenBeforeHooksForRoute(route) { + var routeID = getRouteID(route); + if (!routeID) { + return; + } + + delete RouteHooks[routeID]; + + if (!hasAnyProperties(RouteHooks)) { + // teardown transition & beforeunload hooks + if (unlistenBefore) { + unlistenBefore(); + unlistenBefore = null; + } + + if (unlistenBeforeUnload) { + unlistenBeforeUnload(); + unlistenBeforeUnload = null; + } + } + } + + /** + * Registers the given hook function to run before leaving the given route. + * + * During a normal transition, the hook function receives the next location + * as its only argument and can return either a prompt message (string) to show the user, + * to make sure they want to leave the page; or `false`, to prevent the transition. + * Any other return value will have no effect. + * + * During the beforeunload event (in browsers) the hook receives no arguments. + * In this case it must return a prompt message to prevent the transition. + * + * Returns a function that may be used to unbind the listener. + */ + function listenBeforeLeavingRoute(route, hook) { + var thereWereNoRouteHooks = !hasAnyProperties(RouteHooks); + var routeID = getRouteID(route, true); + + RouteHooks[routeID] = hook; + + if (thereWereNoRouteHooks) { + // setup transition & beforeunload hooks + unlistenBefore = history.listenBefore(transitionHook); + + if (history.listenBeforeUnload) + unlistenBeforeUnload = history.listenBeforeUnload(beforeUnloadHook); + } + + return function () { + removeListenBeforeHooksForRoute(route); + }; + } + + /** + * This is the API for stateful environments. As the location + * changes, we update state and call the listener. We can also + * gracefully handle errors and redirects. + */ + function listen(listener) { + function historyListener(location) { + if (state.location === location) { + listener(null, state); + } else { + match(location, function (error, redirectLocation, nextState) { + if (error) { + listener(error); + } else if (redirectLocation) { + history.replace(redirectLocation); + } else if (nextState) { + listener(null, nextState); + } else { + true + ? Object(__WEBPACK_IMPORTED_MODULE_0__routerWarning__['a' /* default */])( + false, + 'Location "%s" did not match any routes', + location.pathname + location.search + location.hash, + ) + : void 0; + } + }); + } + } + + // TODO: Only use a single history listener. Otherwise we'll end up with + // multiple concurrent calls to match. + + // Set up the history listener first in case the initial match redirects. + var unsubscribe = history.listen(historyListener); + + if (state.location) { + // Picking up on a matchContext. + listener(null, state); + } else { + historyListener(history.getCurrentLocation()); + } + + return unsubscribe; + } + + return { + isActive: isActive, + match: match, + listenBeforeLeavingRoute: listenBeforeLeavingRoute, + listen: listen, + }; + } + + /***/ + }, + /* 255 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = isPromise; + function isPromise(obj) { + return obj && typeof obj.then === 'function'; + } + + /***/ + }, + /* 256 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['b'] = createRouterObject; + /* harmony export (immutable) */ __webpack_exports__['a'] = assignRouterState; + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + function createRouterObject(history, transitionManager, state) { + var router = _extends({}, history, { + setRouteLeaveHook: transitionManager.listenBeforeLeavingRoute, + isActive: transitionManager.isActive, + }); + + return assignRouterState(router, state); + } + + function assignRouterState(router, _ref) { + var location = _ref.location, + params = _ref.params, + routes = _ref.routes; + + router.location = location; + router.params = params; + router.routes = routes; + + return router; + } + + /***/ + }, + /* 257 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_create_react_class__ = __webpack_require__(37); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_create_react_class___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_create_react_class__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types__ = __webpack_require__(10); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_2_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_invariant__ = __webpack_require__(14); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_invariant___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_3_invariant__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__PropTypes__ = __webpack_require__(170); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__ContextUtils__ = __webpack_require__(169); + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + function _objectWithoutProperties(obj, keys) { + var target = {}; + for (var i in obj) { + if (keys.indexOf(i) >= 0) continue; + if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; + target[i] = obj[i]; + } + return target; + } + + function isLeftClickEvent(event) { + return event.button === 0; + } + + function isModifiedEvent(event) { + return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey); + } + + // TODO: De-duplicate against hasAnyProperties in createTransitionManager. + function isEmptyObject(object) { + for (var p in object) { + if (Object.prototype.hasOwnProperty.call(object, p)) return false; + } + return true; + } + + function resolveToLocation(to, router) { + return typeof to === 'function' ? to(router.location) : to; + } + + /** + * A <Link> is used to create an <a> element that links to a route. + * When that route is active, the link gets the value of its + * activeClassName prop. + * + * For example, assuming you have the following route: + * + * <Route path="/posts/:postID" component={Post} /> + * + * You could use the following component to link to that route: + * + * <Link to={`/posts/${post.id}`} /> + */ + var Link = __WEBPACK_IMPORTED_MODULE_1_create_react_class___default()({ + displayName: 'Link', + + mixins: [Object(__WEBPACK_IMPORTED_MODULE_5__ContextUtils__['b' /* ContextSubscriber */])('router')], + + contextTypes: { + router: __WEBPACK_IMPORTED_MODULE_4__PropTypes__['a' /* routerShape */], + }, + + propTypes: { + to: Object(__WEBPACK_IMPORTED_MODULE_2_prop_types__['oneOfType'])([ + __WEBPACK_IMPORTED_MODULE_2_prop_types__['string'], + __WEBPACK_IMPORTED_MODULE_2_prop_types__['object'], + __WEBPACK_IMPORTED_MODULE_2_prop_types__['func'], + ]), + activeStyle: __WEBPACK_IMPORTED_MODULE_2_prop_types__['object'], + activeClassName: __WEBPACK_IMPORTED_MODULE_2_prop_types__['string'], + onlyActiveOnIndex: __WEBPACK_IMPORTED_MODULE_2_prop_types__['bool'].isRequired, + onClick: __WEBPACK_IMPORTED_MODULE_2_prop_types__['func'], + target: __WEBPACK_IMPORTED_MODULE_2_prop_types__['string'], + }, + + getDefaultProps: function getDefaultProps() { + return { + onlyActiveOnIndex: false, + style: {}, + }; + }, + handleClick: function handleClick(event) { + if (this.props.onClick) this.props.onClick(event); + + if (event.defaultPrevented) return; + + var router = this.context.router; + + !router + ? true + ? __WEBPACK_IMPORTED_MODULE_3_invariant___default()( + false, + '<Link>s rendered outside of a router context cannot navigate.', + ) + : invariant(false) + : void 0; + + if (isModifiedEvent(event) || !isLeftClickEvent(event)) return; + + // If target prop is set (e.g. to "_blank"), let browser handle link. + /* istanbul ignore if: untestable with Karma */ + if (this.props.target) return; + + event.preventDefault(); + + router.push(resolveToLocation(this.props.to, router)); + }, + render: function render() { + var _props = this.props, + to = _props.to, + activeClassName = _props.activeClassName, + activeStyle = _props.activeStyle, + onlyActiveOnIndex = _props.onlyActiveOnIndex, + props = _objectWithoutProperties(_props, [ + 'to', + 'activeClassName', + 'activeStyle', + 'onlyActiveOnIndex', + ]); + + // Ignore if rendered outside the context of router to simplify unit testing. + + var router = this.context.router; + + if (router) { + // If user does not specify a `to` prop, return an empty anchor tag. + if (!to) { + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('a', props); + } + + var toLocation = resolveToLocation(to, router); + props.href = router.createHref(toLocation); + + if (activeClassName || (activeStyle != null && !isEmptyObject(activeStyle))) { + if (router.isActive(toLocation, onlyActiveOnIndex)) { + if (activeClassName) { + if (props.className) { + props.className += ' ' + activeClassName; + } else { + props.className = activeClassName; + } + } + + if (activeStyle) props.style = _extends({}, props.style, activeStyle); + } + } + } + + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'a', + _extends({}, props, { onClick: this.handleClick }), + ); + }, + }); + + /* harmony default export */ __webpack_exports__['a'] = Link; + + /***/ + }, + /* 258 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_create_react_class__ = __webpack_require__(37); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_create_react_class___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_create_react_class__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(10); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant__ = __webpack_require__(14); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_2_invariant__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__RouteUtils__ = __webpack_require__(48); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__PatternUtils__ = __webpack_require__(72); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__ = __webpack_require__(86); + + /** + * A <Redirect> is used to declare another URL path a client should + * be sent to when they request a given URL. + * + * Redirects are placed alongside routes in the route configuration + * and are traversed in the same manner. + */ + /* eslint-disable react/require-render-return */ + var Redirect = __WEBPACK_IMPORTED_MODULE_0_create_react_class___default()({ + displayName: 'Redirect', + + statics: { + createRouteFromReactElement: function createRouteFromReactElement(element) { + var route = Object( + __WEBPACK_IMPORTED_MODULE_3__RouteUtils__['a' /* createRouteFromReactElement */], + )(element); + + if (route.from) route.path = route.from; + + route.onEnter = function (nextState, replace) { + var location = nextState.location, + params = nextState.params; + + var pathname = void 0; + if (route.to.charAt(0) === '/') { + pathname = Object(__WEBPACK_IMPORTED_MODULE_4__PatternUtils__['a' /* formatPattern */])( + route.to, + params, + ); + } else if (!route.to) { + pathname = location.pathname; + } else { + var routeIndex = nextState.routes.indexOf(route); + var parentPattern = Redirect.getRoutePattern(nextState.routes, routeIndex - 1); + var pattern = parentPattern.replace(/\/*$/, '/') + route.to; + pathname = Object(__WEBPACK_IMPORTED_MODULE_4__PatternUtils__['a' /* formatPattern */])( + pattern, + params, + ); + } + + replace({ + pathname: pathname, + query: route.query || location.query, + state: route.state || location.state, + }); + }; + + return route; + }, + getRoutePattern: function getRoutePattern(routes, routeIndex) { + var parentPattern = ''; + + for (var i = routeIndex; i >= 0; i--) { + var route = routes[i]; + var pattern = route.path || ''; + + parentPattern = pattern.replace(/\/*$/, '/') + parentPattern; + + if (pattern.indexOf('/') === 0) break; + } + + return '/' + parentPattern; + }, + }, + + propTypes: { + path: __WEBPACK_IMPORTED_MODULE_1_prop_types__['string'], + from: __WEBPACK_IMPORTED_MODULE_1_prop_types__['string'], // Alias for path + to: __WEBPACK_IMPORTED_MODULE_1_prop_types__['string'].isRequired, + query: __WEBPACK_IMPORTED_MODULE_1_prop_types__['object'], + state: __WEBPACK_IMPORTED_MODULE_1_prop_types__['object'], + onEnter: __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__['c' /* falsy */], + children: __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__['c' /* falsy */], + }, + + /* istanbul ignore next: sanity check */ + render: function render() { + true + ? true + ? __WEBPACK_IMPORTED_MODULE_2_invariant___default()( + false, + '<Redirect> elements are for router configuration only and should not be rendered', + ) + : invariant(false) + : void 0; + }, + }); + + /* harmony default export */ __webpack_exports__['a'] = Redirect; + + /***/ + }, + /* 259 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = createMemoryHistory; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries__ = + __webpack_require__(260); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename__ = + __webpack_require__(261); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_history_lib_createMemoryHistory__ = + __webpack_require__(603); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_history_lib_createMemoryHistory___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_history_lib_createMemoryHistory__); + + function createMemoryHistory(options) { + // signatures and type checking differ between `useQueries` and + // `createMemoryHistory`, have to create `memoryHistory` first because + // `useQueries` doesn't understand the signature + var memoryHistory = __WEBPACK_IMPORTED_MODULE_2_history_lib_createMemoryHistory___default()(options); + var createHistory = function createHistory() { + return memoryHistory; + }; + var history = __WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries___default()( + __WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename___default()(createHistory), + )(options); + return history; + } + + /***/ + }, + /* 260 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + var _queryString = __webpack_require__(601); + + var _runTransitionHook = __webpack_require__(171); + + var _runTransitionHook2 = _interopRequireDefault(_runTransitionHook); + + var _LocationUtils = __webpack_require__(73); + + var _PathUtils = __webpack_require__(49); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + var defaultStringifyQuery = function defaultStringifyQuery(query) { + return (0, _queryString.stringify)(query).replace(/%20/g, '+'); + }; + + var defaultParseQueryString = _queryString.parse; + + /** + * Returns a new createHistory function that may be used to create + * history objects that know how to handle URL queries. + */ + var useQueries = function useQueries(createHistory) { + return function () { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + + var history = createHistory(options); + var stringifyQuery = options.stringifyQuery, + parseQueryString = options.parseQueryString; + + if (typeof stringifyQuery !== 'function') stringifyQuery = defaultStringifyQuery; + + if (typeof parseQueryString !== 'function') parseQueryString = defaultParseQueryString; + + var decodeQuery = function decodeQuery(location) { + if (!location) return location; + + if (location.query == null) location.query = parseQueryString(location.search.substring(1)); + + return location; + }; + + var encodeQuery = function encodeQuery(location, query) { + if (query == null) return location; + + var object = typeof location === 'string' ? (0, _PathUtils.parsePath)(location) : location; + var queryString = stringifyQuery(query); + var search = queryString ? '?' + queryString : ''; + + return _extends({}, object, { + search: search, + }); + }; + + // Override all read methods with query-aware versions. + var getCurrentLocation = function getCurrentLocation() { + return decodeQuery(history.getCurrentLocation()); + }; + + var listenBefore = function listenBefore(hook) { + return history.listenBefore(function (location, callback) { + return (0, _runTransitionHook2.default)(hook, decodeQuery(location), callback); + }); + }; + + var listen = function listen(listener) { + return history.listen(function (location) { + return listener(decodeQuery(location)); + }); + }; + + // Override all write methods with query-aware versions. + var push = function push(location) { + return history.push(encodeQuery(location, location.query)); + }; + + var replace = function replace(location) { + return history.replace(encodeQuery(location, location.query)); + }; + + var createPath = function createPath(location) { + return history.createPath(encodeQuery(location, location.query)); + }; + + var createHref = function createHref(location) { + return history.createHref(encodeQuery(location, location.query)); + }; + + var createLocation = function createLocation(location) { + for ( + var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; + _key < _len; + _key++ + ) { + args[_key - 1] = arguments[_key]; + } + + var newLocation = history.createLocation.apply( + history, + [encodeQuery(location, location.query)].concat(args), + ); + + if (location.query) newLocation.query = (0, _LocationUtils.createQuery)(location.query); + + return decodeQuery(newLocation); + }; + + return _extends({}, history, { + getCurrentLocation: getCurrentLocation, + listenBefore: listenBefore, + listen: listen, + push: push, + replace: replace, + createPath: createPath, + createHref: createHref, + createLocation: createLocation, + }); + }; + }; + + exports.default = useQueries; + + /***/ + }, + /* 261 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + var _runTransitionHook = __webpack_require__(171); + + var _runTransitionHook2 = _interopRequireDefault(_runTransitionHook); + + var _PathUtils = __webpack_require__(49); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + var useBasename = function useBasename(createHistory) { + return function () { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + + var history = createHistory(options); + var basename = options.basename; + + var addBasename = function addBasename(location) { + if (!location) return location; + + if (basename && location.basename == null) { + if (location.pathname.toLowerCase().indexOf(basename.toLowerCase()) === 0) { + location.pathname = location.pathname.substring(basename.length); + location.basename = basename; + + if (location.pathname === '') location.pathname = '/'; + } else { + location.basename = ''; + } + } + + return location; + }; + + var prependBasename = function prependBasename(location) { + if (!basename) return location; + + var object = typeof location === 'string' ? (0, _PathUtils.parsePath)(location) : location; + var pname = object.pathname; + var normalizedBasename = basename.slice(-1) === '/' ? basename : basename + '/'; + var normalizedPathname = pname.charAt(0) === '/' ? pname.slice(1) : pname; + var pathname = normalizedBasename + normalizedPathname; + + return _extends({}, object, { + pathname: pathname, + }); + }; + + // Override all read methods with basename-aware versions. + var getCurrentLocation = function getCurrentLocation() { + return addBasename(history.getCurrentLocation()); + }; + + var listenBefore = function listenBefore(hook) { + return history.listenBefore(function (location, callback) { + return (0, _runTransitionHook2.default)(hook, addBasename(location), callback); + }); + }; + + var listen = function listen(listener) { + return history.listen(function (location) { + return listener(addBasename(location)); + }); + }; + + // Override all write methods with basename-aware versions. + var push = function push(location) { + return history.push(prependBasename(location)); + }; + + var replace = function replace(location) { + return history.replace(prependBasename(location)); + }; + + var createPath = function createPath(location) { + return history.createPath(prependBasename(location)); + }; + + var createHref = function createHref(location) { + return history.createHref(prependBasename(location)); + }; + + var createLocation = function createLocation(location) { + for ( + var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; + _key < _len; + _key++ + ) { + args[_key - 1] = arguments[_key]; + } + + return addBasename( + history.createLocation.apply(history, [prependBasename(location)].concat(args)), + ); + }; + + return _extends({}, history, { + getCurrentLocation: getCurrentLocation, + listenBefore: listenBefore, + listen: listen, + push: push, + replace: replace, + createPath: createPath, + createHref: createHref, + createLocation: createLocation, + }); + }; + }; + + exports.default = useBasename; + + /***/ + }, + /* 262 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = useRouterHistory; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries__ = + __webpack_require__(260); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename__ = + __webpack_require__(261); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename__); + + function useRouterHistory(createHistory) { + return function (options) { + var history = __WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries___default()( + __WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename___default()(createHistory), + )(options); + return history; + }; + } + + /***/ + }, + /* 263 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + exports.readState = exports.saveState = undefined; + + var _warning = __webpack_require__(47); + + var _warning2 = _interopRequireDefault(_warning); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + var QuotaExceededErrors = { + QuotaExceededError: true, + QUOTA_EXCEEDED_ERR: true, + }; + + var SecurityErrors = { + SecurityError: true, + }; + + var KeyPrefix = '@@History/'; + + var createKey = function createKey(key) { + return KeyPrefix + key; + }; + + var saveState = (exports.saveState = function saveState(key, state) { + if (!window.sessionStorage) { + // Session storage is not available or hidden. + // sessionStorage is undefined in Internet Explorer when served via file protocol. + true + ? (0, _warning2.default)(false, '[history] Unable to save state; sessionStorage is not available') + : void 0; + + return; + } + + try { + if (state == null) { + window.sessionStorage.removeItem(createKey(key)); + } else { + window.sessionStorage.setItem(createKey(key), JSON.stringify(state)); + } + } catch (error) { + if (SecurityErrors[error.name]) { + // Blocking cookies in Chrome/Firefox/Safari throws SecurityError on any + // attempt to access window.sessionStorage. + true + ? (0, _warning2.default)( + false, + '[history] Unable to save state; sessionStorage is not available due to security settings', + ) + : void 0; + + return; + } + + if (QuotaExceededErrors[error.name] && window.sessionStorage.length === 0) { + // Safari "private mode" throws QuotaExceededError. + true + ? (0, _warning2.default)( + false, + '[history] Unable to save state; sessionStorage is not available in Safari private mode', + ) + : void 0; + + return; + } + + throw error; + } + }); + + var readState = (exports.readState = function readState(key) { + var json = void 0; + try { + json = window.sessionStorage.getItem(createKey(key)); + } catch (error) { + if (SecurityErrors[error.name]) { + // Blocking cookies in Chrome/Firefox/Safari throws SecurityError on any + // attempt to access window.sessionStorage. + true + ? (0, _warning2.default)( + false, + '[history] Unable to read state; sessionStorage is not available due to security settings', + ) + : void 0; + + return undefined; + } + } + + if (json) { + try { + return JSON.parse(json); + } catch (error) { + // Ignore invalid JSON. + } + } + + return undefined; + }); + + /***/ + }, + /* 264 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = createRouterHistory; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__useRouterHistory__ = __webpack_require__(262); + + var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement); + + function createRouterHistory(createHistory) { + var history = void 0; + if (canUseDOM) + history = Object(__WEBPACK_IMPORTED_MODULE_0__useRouterHistory__['a' /* default */])( + createHistory, + )(); + return history; + } + + /***/ + }, + /* 265 */ + /***/ function (module, exports, __webpack_require__) { + exports.__esModule = true; + exports.Helmet = undefined; + + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + var _react = __webpack_require__(1); + + var _react2 = _interopRequireDefault(_react); + + var _propTypes = __webpack_require__(10); + + var _propTypes2 = _interopRequireDefault(_propTypes); + + var _reactSideEffect = __webpack_require__(626); + + var _reactSideEffect2 = _interopRequireDefault(_reactSideEffect); + + var _reactFastCompare = __webpack_require__(628); + + var _reactFastCompare2 = _interopRequireDefault(_reactFastCompare); + + var _HelmetUtils = __webpack_require__(629); + + var _HelmetConstants = __webpack_require__(266); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + function _objectWithoutProperties(obj, keys) { + var target = {}; + for (var i in obj) { + if (keys.indexOf(i) >= 0) continue; + if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; + target[i] = obj[i]; + } + return target; + } + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + var Helmet = function Helmet(Component) { + var _class, _temp; + + return ( + (_temp = _class = + (function (_React$Component) { + _inherits(HelmetWrapper, _React$Component); + + function HelmetWrapper() { + _classCallCheck(this, HelmetWrapper); + + return _possibleConstructorReturn(this, _React$Component.apply(this, arguments)); + } + + HelmetWrapper.prototype.shouldComponentUpdate = function shouldComponentUpdate(nextProps) { + return !(0, _reactFastCompare2.default)(this.props, nextProps); + }; + + HelmetWrapper.prototype.mapNestedChildrenToProps = function mapNestedChildrenToProps( + child, + nestedChildren, + ) { + if (!nestedChildren) { + return null; + } + + switch (child.type) { + case _HelmetConstants.TAG_NAMES.SCRIPT: + case _HelmetConstants.TAG_NAMES.NOSCRIPT: + return { + innerHTML: nestedChildren, + }; + + case _HelmetConstants.TAG_NAMES.STYLE: + return { + cssText: nestedChildren, + }; + } + + throw new Error( + '<' + + child.type + + ' /> elements are self-closing and can not contain children. Refer to our API for more information.', + ); + }; + + HelmetWrapper.prototype.flattenArrayTypeChildren = function flattenArrayTypeChildren(_ref) { + var _extends2; + + var child = _ref.child, + arrayTypeChildren = _ref.arrayTypeChildren, + newChildProps = _ref.newChildProps, + nestedChildren = _ref.nestedChildren; + + return _extends( + {}, + arrayTypeChildren, + ((_extends2 = {}), + (_extends2[child.type] = [].concat(arrayTypeChildren[child.type] || [], [ + _extends({}, newChildProps, this.mapNestedChildrenToProps(child, nestedChildren)), + ])), + _extends2), + ); + }; + + HelmetWrapper.prototype.mapObjectTypeChildren = function mapObjectTypeChildren(_ref2) { + var _extends3, _extends4; + + var child = _ref2.child, + newProps = _ref2.newProps, + newChildProps = _ref2.newChildProps, + nestedChildren = _ref2.nestedChildren; + + switch (child.type) { + case _HelmetConstants.TAG_NAMES.TITLE: + return _extends( + {}, + newProps, + ((_extends3 = {}), + (_extends3[child.type] = nestedChildren), + (_extends3.titleAttributes = _extends({}, newChildProps)), + _extends3), + ); + + case _HelmetConstants.TAG_NAMES.BODY: + return _extends({}, newProps, { + bodyAttributes: _extends({}, newChildProps), + }); + + case _HelmetConstants.TAG_NAMES.HTML: + return _extends({}, newProps, { + htmlAttributes: _extends({}, newChildProps), + }); + } + + return _extends( + {}, + newProps, + ((_extends4 = {}), (_extends4[child.type] = _extends({}, newChildProps)), _extends4), + ); + }; + + HelmetWrapper.prototype.mapArrayTypeChildrenToProps = function mapArrayTypeChildrenToProps( + arrayTypeChildren, + newProps, + ) { + var newFlattenedProps = _extends({}, newProps); + + Object.keys(arrayTypeChildren).forEach(function (arrayChildName) { + var _extends5; + + newFlattenedProps = _extends( + {}, + newFlattenedProps, + ((_extends5 = {}), + (_extends5[arrayChildName] = arrayTypeChildren[arrayChildName]), + _extends5), + ); + }); + + return newFlattenedProps; + }; + + HelmetWrapper.prototype.warnOnInvalidChildren = function warnOnInvalidChildren( + child, + nestedChildren, + ) { + if (true) { + if ( + !_HelmetConstants.VALID_TAG_NAMES.some(function (name) { + return child.type === name; + }) + ) { + if (typeof child.type === 'function') { + return (0, _HelmetUtils.warn)( + 'You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information.', + ); + } + + return (0, _HelmetUtils.warn)( + 'Only elements types ' + + _HelmetConstants.VALID_TAG_NAMES.join(', ') + + ' are allowed. Helmet does not support rendering <' + + child.type + + '> elements. Refer to our API for more information.', + ); + } + + if ( + nestedChildren && + typeof nestedChildren !== 'string' && + (!Array.isArray(nestedChildren) || + nestedChildren.some(function (nestedChild) { + return typeof nestedChild !== 'string'; + })) + ) { + throw new Error( + 'Helmet expects a string as a child of <' + + child.type + + '>. Did you forget to wrap your children in braces? ( <' + + child.type + + '>{``}</' + + child.type + + '> ) Refer to our API for more information.', + ); + } + } + + return true; + }; + + HelmetWrapper.prototype.mapChildrenToProps = function mapChildrenToProps(children, newProps) { + var _this2 = this; + + var arrayTypeChildren = {}; + + _react2.default.Children.forEach(children, function (child) { + if (!child || !child.props) { + return; + } + + var _child$props = child.props, + nestedChildren = _child$props.children, + childProps = _objectWithoutProperties(_child$props, ['children']); + + var newChildProps = (0, _HelmetUtils.convertReactPropstoHtmlAttributes)(childProps); + + _this2.warnOnInvalidChildren(child, nestedChildren); + + switch (child.type) { + case _HelmetConstants.TAG_NAMES.LINK: + case _HelmetConstants.TAG_NAMES.META: + case _HelmetConstants.TAG_NAMES.NOSCRIPT: + case _HelmetConstants.TAG_NAMES.SCRIPT: + case _HelmetConstants.TAG_NAMES.STYLE: + arrayTypeChildren = _this2.flattenArrayTypeChildren({ + child: child, + arrayTypeChildren: arrayTypeChildren, + newChildProps: newChildProps, + nestedChildren: nestedChildren, + }); + break; + + default: + newProps = _this2.mapObjectTypeChildren({ + child: child, + newProps: newProps, + newChildProps: newChildProps, + nestedChildren: nestedChildren, + }); + break; + } + }); + + newProps = this.mapArrayTypeChildrenToProps(arrayTypeChildren, newProps); + return newProps; + }; + + HelmetWrapper.prototype.render = function render() { + var _props = this.props, + children = _props.children, + props = _objectWithoutProperties(_props, ['children']); + + var newProps = _extends({}, props); + + if (children) { + newProps = this.mapChildrenToProps(children, newProps); + } + + return _react2.default.createElement(Component, newProps); + }; + + _createClass(HelmetWrapper, null, [ + { + key: 'canUseDOM', + + // Component.peek comes from react-side-effect: + // For testing, you may use a static peek() method available on the returned component. + // It lets you get the current state without resetting the mounted instance stack. + // Don’t use it for anything other than testing. + + /** + * @param {Object} base: {"target": "_blank", "href": "http://mysite.com/"} + * @param {Object} bodyAttributes: {"className": "root"} + * @param {String} defaultTitle: "Default Title" + * @param {Boolean} defer: true + * @param {Boolean} encodeSpecialCharacters: true + * @param {Object} htmlAttributes: {"lang": "en", "amp": undefined} + * @param {Array} link: [{"rel": "canonical", "href": "http://mysite.com/example"}] + * @param {Array} meta: [{"name": "description", "content": "Test description"}] + * @param {Array} noscript: [{"innerHTML": "<img src='http://mysite.com/js/test.js'"}] + * @param {Function} onChangeClientState: "(newState) => console.log(newState)" + * @param {Array} script: [{"type": "text/javascript", "src": "http://mysite.com/js/test.js"}] + * @param {Array} style: [{"type": "text/css", "cssText": "div { display: block; color: blue; }"}] + * @param {String} title: "Title" + * @param {Object} titleAttributes: {"itemprop": "name"} + * @param {String} titleTemplate: "MySite.com - %s" + */ + set: function set(canUseDOM) { + Component.canUseDOM = canUseDOM; + }, + }, + ]); + + return HelmetWrapper; + })(_react2.default.Component)), + (_class.propTypes = { + base: _propTypes2.default.object, + bodyAttributes: _propTypes2.default.object, + children: _propTypes2.default.oneOfType([ + _propTypes2.default.arrayOf(_propTypes2.default.node), + _propTypes2.default.node, + ]), + defaultTitle: _propTypes2.default.string, + defer: _propTypes2.default.bool, + encodeSpecialCharacters: _propTypes2.default.bool, + htmlAttributes: _propTypes2.default.object, + link: _propTypes2.default.arrayOf(_propTypes2.default.object), + meta: _propTypes2.default.arrayOf(_propTypes2.default.object), + noscript: _propTypes2.default.arrayOf(_propTypes2.default.object), + onChangeClientState: _propTypes2.default.func, + script: _propTypes2.default.arrayOf(_propTypes2.default.object), + style: _propTypes2.default.arrayOf(_propTypes2.default.object), + title: _propTypes2.default.string, + titleAttributes: _propTypes2.default.object, + titleTemplate: _propTypes2.default.string, + }), + (_class.defaultProps = { + defer: true, + encodeSpecialCharacters: true, + }), + (_class.peek = Component.peek), + (_class.rewind = function () { + var mappedState = Component.rewind(); + if (!mappedState) { + // provide fallback if mappedState is undefined + mappedState = (0, _HelmetUtils.mapStateOnServer)({ + baseTag: [], + bodyAttributes: {}, + encodeSpecialCharacters: true, + htmlAttributes: {}, + linkTags: [], + metaTags: [], + noscriptTags: [], + scriptTags: [], + styleTags: [], + title: '', + titleAttributes: {}, + }); + } + + return mappedState; + }), + _temp + ); + }; + + var NullComponent = function NullComponent() { + return null; + }; + + var HelmetSideEffects = (0, _reactSideEffect2.default)( + _HelmetUtils.reducePropsToState, + _HelmetUtils.handleClientStateChange, + _HelmetUtils.mapStateOnServer, + )(NullComponent); + + var HelmetExport = Helmet(HelmetSideEffects); + HelmetExport.renderStatic = HelmetExport.rewind; + + exports.Helmet = HelmetExport; + exports.default = HelmetExport; + + /***/ + }, + /* 266 */ + /***/ function (module, exports) { + exports.__esModule = true; + var ATTRIBUTE_NAMES = (exports.ATTRIBUTE_NAMES = { + BODY: 'bodyAttributes', + HTML: 'htmlAttributes', + TITLE: 'titleAttributes', + }); + + var TAG_NAMES = (exports.TAG_NAMES = { + BASE: 'base', + BODY: 'body', + HEAD: 'head', + HTML: 'html', + LINK: 'link', + META: 'meta', + NOSCRIPT: 'noscript', + SCRIPT: 'script', + STYLE: 'style', + TITLE: 'title', + }); + + var VALID_TAG_NAMES = (exports.VALID_TAG_NAMES = Object.keys(TAG_NAMES).map(function (name) { + return TAG_NAMES[name]; + })); + + var TAG_PROPERTIES = (exports.TAG_PROPERTIES = { + CHARSET: 'charset', + CSS_TEXT: 'cssText', + HREF: 'href', + HTTPEQUIV: 'http-equiv', + INNER_HTML: 'innerHTML', + ITEM_PROP: 'itemprop', + NAME: 'name', + PROPERTY: 'property', + REL: 'rel', + SRC: 'src', + }); + + var REACT_TAG_MAP = (exports.REACT_TAG_MAP = { + accesskey: 'accessKey', + charset: 'charSet', + class: 'className', + contenteditable: 'contentEditable', + contextmenu: 'contextMenu', + 'http-equiv': 'httpEquiv', + itemprop: 'itemProp', + tabindex: 'tabIndex', + }); + + var HELMET_PROPS = (exports.HELMET_PROPS = { + DEFAULT_TITLE: 'defaultTitle', + DEFER: 'defer', + ENCODE_SPECIAL_CHARACTERS: 'encodeSpecialCharacters', + ON_CHANGE_CLIENT_STATE: 'onChangeClientState', + TITLE_TEMPLATE: 'titleTemplate', + }); + + var HTML_TAG_MAP = (exports.HTML_TAG_MAP = Object.keys(REACT_TAG_MAP).reduce(function (obj, key) { + obj[REACT_TAG_MAP[key]] = key; + return obj; + }, {})); + + var SELF_CLOSING_TAGS = (exports.SELF_CLOSING_TAGS = [ + TAG_NAMES.NOSCRIPT, + TAG_NAMES.SCRIPT, + TAG_NAMES.STYLE, + ]); + + var HELMET_ATTRIBUTE = (exports.HELMET_ATTRIBUTE = 'data-react-helmet'); + + /***/ + }, + /* 267 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = __webpack_require__(268); + + /***/ + }, + /* 268 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + Object.defineProperty(__webpack_exports__, '__esModule', { value: true }); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_polyfill__ = __webpack_require__(269); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_polyfill___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_babel_polyfill__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_es5_shim__ = __webpack_require__(471); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_es5_shim___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_es5_shim__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_on_rails__ = __webpack_require__(211); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_on_rails___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_2_react_on_rails__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__non_react_HelloString__ = + __webpack_require__(539); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__components_HelloWorld__ = + __webpack_require__(162); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__components_HelloWorldES5__ = + __webpack_require__(544); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__components_HelloWorldWithLogAndThrow__ = + __webpack_require__(550); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__HelloWorldApp__ = __webpack_require__(551); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__BrokenApp__ = __webpack_require__(552); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__ServerReduxApp__ = __webpack_require__(553); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__ServerReduxSharedStoreApp__ = + __webpack_require__(585); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__ServerRouterApp__ = __webpack_require__(586); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__components_PureComponent__ = + __webpack_require__(616); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__components_CssModulesImagesFontsExample__ = + __webpack_require__(617); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__stores_SharedReduxStore__ = + __webpack_require__(619); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__DeferredRenderAppServer__ = + __webpack_require__(620); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__ServerRenderedHtml__ = __webpack_require__(623); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__ReactHelmetServerApp__ = + __webpack_require__(625); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__components_ImageExample__ = + __webpack_require__(631); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_19__SetTimeoutLoggingApp__ = + __webpack_require__(638); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_20__ComponentWithLodashApp__ = + __webpack_require__(639); + + // Shows the mapping from the exported object to the name used by the server rendering. + + // Example of server rendering with no React + + // React components + + // Generator function + + // Example of React + Redux + + // Example of 2 React components sharing the same store + + // Example of React Router with Server Rendering + + // Deferred render on the client side w/ server render + + // Deferred render on the client side w/ server render + + // Deferred render on the client side w/ server render with additional HTML strings: + + // Demonstrate using Images + + __WEBPACK_IMPORTED_MODULE_2_react_on_rails___default.a.register({ + BrokenApp: __WEBPACK_IMPORTED_MODULE_8__BrokenApp__['a' /* default */], + HelloWorld: __WEBPACK_IMPORTED_MODULE_4__components_HelloWorld__['a' /* default */], + HelloWorldWithLogAndThrow: + __WEBPACK_IMPORTED_MODULE_6__components_HelloWorldWithLogAndThrow__['a' /* default */], + HelloWorldES5: __WEBPACK_IMPORTED_MODULE_5__components_HelloWorldES5__['a' /* default */], + ReduxApp: __WEBPACK_IMPORTED_MODULE_9__ServerReduxApp__['a' /* default */], + ReduxSharedStoreApp: __WEBPACK_IMPORTED_MODULE_10__ServerReduxSharedStoreApp__['a' /* default */], + HelloWorldApp: __WEBPACK_IMPORTED_MODULE_7__HelloWorldApp__['a' /* default */], + RouterApp: __WEBPACK_IMPORTED_MODULE_11__ServerRouterApp__['a' /* default */], + HelloString: __WEBPACK_IMPORTED_MODULE_3__non_react_HelloString__['a' /* default */], + PureComponent: __WEBPACK_IMPORTED_MODULE_12__components_PureComponent__['a' /* default */], + CssModulesImagesFontsExample: + __WEBPACK_IMPORTED_MODULE_13__components_CssModulesImagesFontsExample__['a' /* default */], + DeferredRenderApp: __WEBPACK_IMPORTED_MODULE_15__DeferredRenderAppServer__['a' /* default */], + RenderedHtml: __WEBPACK_IMPORTED_MODULE_16__ServerRenderedHtml__['a' /* default */], + ReactHelmetApp: __WEBPACK_IMPORTED_MODULE_17__ReactHelmetServerApp__['a' /* default */], + ImageExample: __WEBPACK_IMPORTED_MODULE_18__components_ImageExample__['a' /* default */], + SetTimeoutLoggingApp: __WEBPACK_IMPORTED_MODULE_19__SetTimeoutLoggingApp__['a' /* default */], + ComponentWithLodashApp: __WEBPACK_IMPORTED_MODULE_20__ComponentWithLodashApp__['a' /* default */], + }); + + __WEBPACK_IMPORTED_MODULE_2_react_on_rails___default.a.registerStore({ + SharedReduxStore: __WEBPACK_IMPORTED_MODULE_14__stores_SharedReduxStore__['a' /* default */], + }); + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + })(); + + /***/ + }, + /* 269 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (global) { + __webpack_require__(270); + + __webpack_require__(467); + + __webpack_require__(468); + + if (global._babelPolyfill) { + throw new Error('only one instance of babel-polyfill is allowed'); + } + global._babelPolyfill = true; + + var DEFINE_PROPERTY = 'defineProperty'; + function define(O, key, value) { + O[key] || + Object[DEFINE_PROPERTY](O, key, { + writable: true, + configurable: true, + value: value, + }); + } + + define(String.prototype, 'padLeft', ''.padStart); + define(String.prototype, 'padRight', ''.padEnd); + + 'pop,reverse,shift,keys,values,entries,indexOf,every,some,forEach,map,filter,find,findIndex,includes,join,slice,concat,push,splice,unshift,sort,lastIndexOf,reduce,reduceRight,copyWithin,fill' + .split(',') + .forEach(function (key) { + [][key] && define(Array, key, Function.call.bind([][key])); + }); + /* WEBPACK VAR INJECTION */ + }).call(exports, __webpack_require__(38)); + + /***/ + }, + /* 270 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(271); + __webpack_require__(274); + __webpack_require__(275); + __webpack_require__(276); + __webpack_require__(277); + __webpack_require__(278); + __webpack_require__(279); + __webpack_require__(280); + __webpack_require__(281); + __webpack_require__(282); + __webpack_require__(283); + __webpack_require__(284); + __webpack_require__(285); + __webpack_require__(286); + __webpack_require__(287); + __webpack_require__(288); + __webpack_require__(289); + __webpack_require__(290); + __webpack_require__(291); + __webpack_require__(292); + __webpack_require__(293); + __webpack_require__(294); + __webpack_require__(295); + __webpack_require__(296); + __webpack_require__(297); + __webpack_require__(298); + __webpack_require__(299); + __webpack_require__(300); + __webpack_require__(301); + __webpack_require__(302); + __webpack_require__(303); + __webpack_require__(304); + __webpack_require__(305); + __webpack_require__(306); + __webpack_require__(307); + __webpack_require__(308); + __webpack_require__(309); + __webpack_require__(310); + __webpack_require__(311); + __webpack_require__(312); + __webpack_require__(313); + __webpack_require__(314); + __webpack_require__(315); + __webpack_require__(316); + __webpack_require__(317); + __webpack_require__(318); + __webpack_require__(319); + __webpack_require__(320); + __webpack_require__(321); + __webpack_require__(322); + __webpack_require__(323); + __webpack_require__(324); + __webpack_require__(325); + __webpack_require__(326); + __webpack_require__(327); + __webpack_require__(328); + __webpack_require__(329); + __webpack_require__(330); + __webpack_require__(331); + __webpack_require__(332); + __webpack_require__(333); + __webpack_require__(334); + __webpack_require__(335); + __webpack_require__(336); + __webpack_require__(337); + __webpack_require__(338); + __webpack_require__(339); + __webpack_require__(340); + __webpack_require__(341); + __webpack_require__(342); + __webpack_require__(343); + __webpack_require__(344); + __webpack_require__(345); + __webpack_require__(346); + __webpack_require__(347); + __webpack_require__(348); + __webpack_require__(349); + __webpack_require__(351); + __webpack_require__(352); + __webpack_require__(354); + __webpack_require__(355); + __webpack_require__(356); + __webpack_require__(357); + __webpack_require__(358); + __webpack_require__(359); + __webpack_require__(360); + __webpack_require__(362); + __webpack_require__(363); + __webpack_require__(364); + __webpack_require__(365); + __webpack_require__(366); + __webpack_require__(367); + __webpack_require__(368); + __webpack_require__(369); + __webpack_require__(370); + __webpack_require__(371); + __webpack_require__(372); + __webpack_require__(373); + __webpack_require__(374); + __webpack_require__(133); + __webpack_require__(375); + __webpack_require__(194); + __webpack_require__(376); + __webpack_require__(195); + __webpack_require__(377); + __webpack_require__(378); + __webpack_require__(379); + __webpack_require__(380); + __webpack_require__(381); + __webpack_require__(198); + __webpack_require__(200); + __webpack_require__(201); + __webpack_require__(382); + __webpack_require__(383); + __webpack_require__(384); + __webpack_require__(385); + __webpack_require__(386); + __webpack_require__(387); + __webpack_require__(388); + __webpack_require__(389); + __webpack_require__(390); + __webpack_require__(391); + __webpack_require__(392); + __webpack_require__(393); + __webpack_require__(394); + __webpack_require__(395); + __webpack_require__(396); + __webpack_require__(397); + __webpack_require__(398); + __webpack_require__(399); + __webpack_require__(400); + __webpack_require__(401); + __webpack_require__(402); + __webpack_require__(403); + __webpack_require__(404); + __webpack_require__(405); + __webpack_require__(406); + __webpack_require__(407); + __webpack_require__(408); + __webpack_require__(409); + __webpack_require__(410); + __webpack_require__(411); + __webpack_require__(412); + __webpack_require__(413); + __webpack_require__(414); + __webpack_require__(415); + __webpack_require__(416); + __webpack_require__(417); + __webpack_require__(418); + __webpack_require__(419); + __webpack_require__(420); + __webpack_require__(421); + __webpack_require__(422); + __webpack_require__(423); + __webpack_require__(424); + __webpack_require__(425); + __webpack_require__(426); + __webpack_require__(427); + __webpack_require__(428); + __webpack_require__(429); + __webpack_require__(430); + __webpack_require__(431); + __webpack_require__(432); + __webpack_require__(433); + __webpack_require__(434); + __webpack_require__(435); + __webpack_require__(436); + __webpack_require__(437); + __webpack_require__(438); + __webpack_require__(439); + __webpack_require__(440); + __webpack_require__(441); + __webpack_require__(442); + __webpack_require__(443); + __webpack_require__(444); + __webpack_require__(445); + __webpack_require__(446); + __webpack_require__(447); + __webpack_require__(448); + __webpack_require__(449); + __webpack_require__(450); + __webpack_require__(451); + __webpack_require__(452); + __webpack_require__(453); + __webpack_require__(454); + __webpack_require__(455); + __webpack_require__(456); + __webpack_require__(457); + __webpack_require__(458); + __webpack_require__(459); + __webpack_require__(460); + __webpack_require__(461); + __webpack_require__(462); + __webpack_require__(463); + __webpack_require__(464); + __webpack_require__(465); + __webpack_require__(466); + module.exports = __webpack_require__(23); + + /***/ + }, + /* 271 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // ECMAScript 6 symbols shim + var global = __webpack_require__(3); + var has = __webpack_require__(18); + var DESCRIPTORS = __webpack_require__(8); + var $export = __webpack_require__(0); + var redefine = __webpack_require__(16); + var META = __webpack_require__(43).KEY; + var $fails = __webpack_require__(4); + var shared = __webpack_require__(74); + var setToStringTag = __webpack_require__(65); + var uid = __webpack_require__(51); + var wks = __webpack_require__(6); + var wksExt = __webpack_require__(176); + var wksDefine = __webpack_require__(114); + var enumKeys = __webpack_require__(273); + var isArray = __webpack_require__(89); + var anObject = __webpack_require__(2); + var isObject = __webpack_require__(5); + var toObject = __webpack_require__(11); + var toIObject = __webpack_require__(19); + var toPrimitive = __webpack_require__(31); + var createDesc = __webpack_require__(50); + var _create = __webpack_require__(54); + var gOPNExt = __webpack_require__(179); + var $GOPD = __webpack_require__(20); + var $GOPS = __webpack_require__(88); + var $DP = __webpack_require__(9); + var $keys = __webpack_require__(52); + var gOPD = $GOPD.f; + var dP = $DP.f; + var gOPN = gOPNExt.f; + var $Symbol = global.Symbol; + var $JSON = global.JSON; + var _stringify = $JSON && $JSON.stringify; + var PROTOTYPE = 'prototype'; + var HIDDEN = wks('_hidden'); + var TO_PRIMITIVE = wks('toPrimitive'); + var isEnum = {}.propertyIsEnumerable; + var SymbolRegistry = shared('symbol-registry'); + var AllSymbols = shared('symbols'); + var OPSymbols = shared('op-symbols'); + var ObjectProto = Object[PROTOTYPE]; + var USE_NATIVE = typeof $Symbol == 'function' && !!$GOPS.f; + var QObject = global.QObject; + // Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173 + var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild; + + // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687 + var setSymbolDesc = + DESCRIPTORS && + $fails(function () { + return ( + _create( + dP({}, 'a', { + get: function () { + return dP(this, 'a', { value: 7 }).a; + }, + }), + ).a != 7 + ); + }) + ? function (it, key, D) { + var protoDesc = gOPD(ObjectProto, key); + if (protoDesc) delete ObjectProto[key]; + dP(it, key, D); + if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc); + } + : dP; + + var wrap = function (tag) { + var sym = (AllSymbols[tag] = _create($Symbol[PROTOTYPE])); + sym._k = tag; + return sym; + }; + + var isSymbol = + USE_NATIVE && typeof $Symbol.iterator == 'symbol' + ? function (it) { + return typeof it == 'symbol'; + } + : function (it) { + return it instanceof $Symbol; + }; + + var $defineProperty = function defineProperty(it, key, D) { + if (it === ObjectProto) $defineProperty(OPSymbols, key, D); + anObject(it); + key = toPrimitive(key, true); + anObject(D); + if (has(AllSymbols, key)) { + if (!D.enumerable) { + if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {})); + it[HIDDEN][key] = true; + } else { + if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false; + D = _create(D, { enumerable: createDesc(0, false) }); + } + return setSymbolDesc(it, key, D); + } + return dP(it, key, D); + }; + var $defineProperties = function defineProperties(it, P) { + anObject(it); + var keys = enumKeys((P = toIObject(P))); + var i = 0; + var l = keys.length; + var key; + while (l > i) $defineProperty(it, (key = keys[i++]), P[key]); + return it; + }; + var $create = function create(it, P) { + return P === undefined ? _create(it) : $defineProperties(_create(it), P); + }; + var $propertyIsEnumerable = function propertyIsEnumerable(key) { + var E = isEnum.call(this, (key = toPrimitive(key, true))); + if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false; + return E || !has(this, key) || !has(AllSymbols, key) || (has(this, HIDDEN) && this[HIDDEN][key]) + ? E + : true; + }; + var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) { + it = toIObject(it); + key = toPrimitive(key, true); + if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return; + var D = gOPD(it, key); + if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true; + return D; + }; + var $getOwnPropertyNames = function getOwnPropertyNames(it) { + var names = gOPN(toIObject(it)); + var result = []; + var i = 0; + var key; + while (names.length > i) { + if (!has(AllSymbols, (key = names[i++])) && key != HIDDEN && key != META) result.push(key); + } + return result; + }; + var $getOwnPropertySymbols = function getOwnPropertySymbols(it) { + var IS_OP = it === ObjectProto; + var names = gOPN(IS_OP ? OPSymbols : toIObject(it)); + var result = []; + var i = 0; + var key; + while (names.length > i) { + if (has(AllSymbols, (key = names[i++])) && (IS_OP ? has(ObjectProto, key) : true)) + result.push(AllSymbols[key]); + } + return result; + }; + + // 19.4.1.1 Symbol([description]) + if (!USE_NATIVE) { + $Symbol = function Symbol() { + if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!'); + var tag = uid(arguments.length > 0 ? arguments[0] : undefined); + var $set = function (value) { + if (this === ObjectProto) $set.call(OPSymbols, value); + if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false; + setSymbolDesc(this, tag, createDesc(1, value)); + }; + if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set }); + return wrap(tag); + }; + redefine($Symbol[PROTOTYPE], 'toString', function toString() { + return this._k; + }); + + $GOPD.f = $getOwnPropertyDescriptor; + $DP.f = $defineProperty; + __webpack_require__(55).f = gOPNExt.f = $getOwnPropertyNames; + __webpack_require__(76).f = $propertyIsEnumerable; + $GOPS.f = $getOwnPropertySymbols; + + if (DESCRIPTORS && !__webpack_require__(42)) { + redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true); + } + + wksExt.f = function (name) { + return wrap(wks(name)); + }; + } + + $export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol }); + + for ( + var es6Symbols = + // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14 + 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'.split( + ',', + ), + j = 0; + es6Symbols.length > j; + + ) + wks(es6Symbols[j++]); + + for (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k; ) + wksDefine(wellKnownSymbols[k++]); + + $export($export.S + $export.F * !USE_NATIVE, 'Symbol', { + // 19.4.2.1 Symbol.for(key) + for: function (key) { + return has(SymbolRegistry, (key += '')) + ? SymbolRegistry[key] + : (SymbolRegistry[key] = $Symbol(key)); + }, + // 19.4.2.5 Symbol.keyFor(sym) + keyFor: function keyFor(sym) { + if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!'); + for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key; + }, + useSetter: function () { + setter = true; + }, + useSimple: function () { + setter = false; + }, + }); + + $export($export.S + $export.F * !USE_NATIVE, 'Object', { + // 19.1.2.2 Object.create(O [, Properties]) + create: $create, + // 19.1.2.4 Object.defineProperty(O, P, Attributes) + defineProperty: $defineProperty, + // 19.1.2.3 Object.defineProperties(O, Properties) + defineProperties: $defineProperties, + // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) + getOwnPropertyDescriptor: $getOwnPropertyDescriptor, + // 19.1.2.7 Object.getOwnPropertyNames(O) + getOwnPropertyNames: $getOwnPropertyNames, + // 19.1.2.8 Object.getOwnPropertySymbols(O) + getOwnPropertySymbols: $getOwnPropertySymbols, + }); + + // Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives + // https://bugs.chromium.org/p/v8/issues/detail?id=3443 + var FAILS_ON_PRIMITIVES = $fails(function () { + $GOPS.f(1); + }); + + $export($export.S + $export.F * FAILS_ON_PRIMITIVES, 'Object', { + getOwnPropertySymbols: function getOwnPropertySymbols(it) { + return $GOPS.f(toObject(it)); + }, + }); + + // 24.3.2 JSON.stringify(value [, replacer [, space]]) + $JSON && + $export( + $export.S + + $export.F * + (!USE_NATIVE || + $fails(function () { + var S = $Symbol(); + // MS Edge converts symbol values to JSON as {} + // WebKit converts symbol values to JSON as null + // V8 throws on boxed symbols + return ( + _stringify([S]) != '[null]' || + _stringify({ a: S }) != '{}' || + _stringify(Object(S)) != '{}' + ); + })), + 'JSON', + { + stringify: function stringify(it) { + var args = [it]; + var i = 1; + var replacer, $replacer; + while (arguments.length > i) args.push(arguments[i++]); + $replacer = replacer = args[1]; + if ((!isObject(replacer) && it === undefined) || isSymbol(it)) return; // IE8 returns string on undefined + if (!isArray(replacer)) + replacer = function (key, value) { + if (typeof $replacer == 'function') value = $replacer.call(this, key, value); + if (!isSymbol(value)) return value; + }; + args[1] = replacer; + return _stringify.apply($JSON, args); + }, + }, + ); + + // 19.4.3.4 Symbol.prototype[@@toPrimitive](hint) + $Symbol[PROTOTYPE][TO_PRIMITIVE] || + __webpack_require__(15)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf); + // 19.4.3.5 Symbol.prototype[@@toStringTag] + setToStringTag($Symbol, 'Symbol'); + // 20.2.1.9 Math[@@toStringTag] + setToStringTag(Math, 'Math', true); + // 24.3.3 JSON[@@toStringTag] + setToStringTag(global.JSON, 'JSON', true); + + /***/ + }, + /* 272 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = __webpack_require__(74)('native-function-to-string', Function.toString); + + /***/ + }, + /* 273 */ + /***/ function (module, exports, __webpack_require__) { + // all enumerable object keys, includes symbols + var getKeys = __webpack_require__(52); + var gOPS = __webpack_require__(88); + var pIE = __webpack_require__(76); + module.exports = function (it) { + var result = getKeys(it); + var getSymbols = gOPS.f; + if (getSymbols) { + var symbols = getSymbols(it); + var isEnum = pIE.f; + var i = 0; + var key; + while (symbols.length > i) if (isEnum.call(it, (key = symbols[i++]))) result.push(key); + } + return result; + }; + + /***/ + }, + /* 274 */ + /***/ function (module, exports, __webpack_require__) { + var $export = __webpack_require__(0); + // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) + $export($export.S, 'Object', { create: __webpack_require__(54) }); + + /***/ + }, + /* 275 */ + /***/ function (module, exports, __webpack_require__) { + var $export = __webpack_require__(0); + // 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes) + $export($export.S + $export.F * !__webpack_require__(8), 'Object', { + defineProperty: __webpack_require__(9).f, + }); + + /***/ + }, + /* 276 */ + /***/ function (module, exports, __webpack_require__) { + var $export = __webpack_require__(0); + // 19.1.2.3 / 15.2.3.7 Object.defineProperties(O, Properties) + $export($export.S + $export.F * !__webpack_require__(8), 'Object', { + defineProperties: __webpack_require__(178), + }); + + /***/ + }, + /* 277 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) + var toIObject = __webpack_require__(19); + var $getOwnPropertyDescriptor = __webpack_require__(20).f; + + __webpack_require__(33)('getOwnPropertyDescriptor', function () { + return function getOwnPropertyDescriptor(it, key) { + return $getOwnPropertyDescriptor(toIObject(it), key); + }; + }); + + /***/ + }, + /* 278 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.9 Object.getPrototypeOf(O) + var toObject = __webpack_require__(11); + var $getPrototypeOf = __webpack_require__(21); + + __webpack_require__(33)('getPrototypeOf', function () { + return function getPrototypeOf(it) { + return $getPrototypeOf(toObject(it)); + }; + }); + + /***/ + }, + /* 279 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.14 Object.keys(O) + var toObject = __webpack_require__(11); + var $keys = __webpack_require__(52); + + __webpack_require__(33)('keys', function () { + return function keys(it) { + return $keys(toObject(it)); + }; + }); + + /***/ + }, + /* 280 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.7 Object.getOwnPropertyNames(O) + __webpack_require__(33)('getOwnPropertyNames', function () { + return __webpack_require__(179).f; + }); + + /***/ + }, + /* 281 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.5 Object.freeze(O) + var isObject = __webpack_require__(5); + var meta = __webpack_require__(43).onFreeze; + + __webpack_require__(33)('freeze', function ($freeze) { + return function freeze(it) { + return $freeze && isObject(it) ? $freeze(meta(it)) : it; + }; + }); + + /***/ + }, + /* 282 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.17 Object.seal(O) + var isObject = __webpack_require__(5); + var meta = __webpack_require__(43).onFreeze; + + __webpack_require__(33)('seal', function ($seal) { + return function seal(it) { + return $seal && isObject(it) ? $seal(meta(it)) : it; + }; + }); + + /***/ + }, + /* 283 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.15 Object.preventExtensions(O) + var isObject = __webpack_require__(5); + var meta = __webpack_require__(43).onFreeze; + + __webpack_require__(33)('preventExtensions', function ($preventExtensions) { + return function preventExtensions(it) { + return $preventExtensions && isObject(it) ? $preventExtensions(meta(it)) : it; + }; + }); + + /***/ + }, + /* 284 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.12 Object.isFrozen(O) + var isObject = __webpack_require__(5); + + __webpack_require__(33)('isFrozen', function ($isFrozen) { + return function isFrozen(it) { + return isObject(it) ? ($isFrozen ? $isFrozen(it) : false) : true; + }; + }); + + /***/ + }, + /* 285 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.13 Object.isSealed(O) + var isObject = __webpack_require__(5); + + __webpack_require__(33)('isSealed', function ($isSealed) { + return function isSealed(it) { + return isObject(it) ? ($isSealed ? $isSealed(it) : false) : true; + }; + }); + + /***/ + }, + /* 286 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.11 Object.isExtensible(O) + var isObject = __webpack_require__(5); + + __webpack_require__(33)('isExtensible', function ($isExtensible) { + return function isExtensible(it) { + return isObject(it) ? ($isExtensible ? $isExtensible(it) : true) : false; + }; + }); + + /***/ + }, + /* 287 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.3.1 Object.assign(target, source) + var $export = __webpack_require__(0); + + $export($export.S + $export.F, 'Object', { assign: __webpack_require__(180) }); + + /***/ + }, + /* 288 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.3.10 Object.is(value1, value2) + var $export = __webpack_require__(0); + $export($export.S, 'Object', { is: __webpack_require__(181) }); + + /***/ + }, + /* 289 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.3.19 Object.setPrototypeOf(O, proto) + var $export = __webpack_require__(0); + $export($export.S, 'Object', { setPrototypeOf: __webpack_require__(118).set }); + + /***/ + }, + /* 290 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // 19.1.3.6 Object.prototype.toString() + var classof = __webpack_require__(66); + var test = {}; + test[__webpack_require__(6)('toStringTag')] = 'z'; + if (test + '' != '[object z]') { + __webpack_require__(16)( + Object.prototype, + 'toString', + function toString() { + return '[object ' + classof(this) + ']'; + }, + true, + ); + } + + /***/ + }, + /* 291 */ + /***/ function (module, exports, __webpack_require__) { + // 19.2.3.2 / 15.3.4.5 Function.prototype.bind(thisArg, args...) + var $export = __webpack_require__(0); + + $export($export.P, 'Function', { bind: __webpack_require__(182) }); + + /***/ + }, + /* 292 */ + /***/ function (module, exports, __webpack_require__) { + var dP = __webpack_require__(9).f; + var FProto = Function.prototype; + var nameRE = /^\s*function ([^ (]*)/; + var NAME = 'name'; + + // 19.2.4.2 name + NAME in FProto || + (__webpack_require__(8) && + dP(FProto, NAME, { + configurable: true, + get: function () { + try { + return ('' + this).match(nameRE)[1]; + } catch (e) { + return ''; + } + }, + })); + + /***/ + }, + /* 293 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var isObject = __webpack_require__(5); + var getPrototypeOf = __webpack_require__(21); + var HAS_INSTANCE = __webpack_require__(6)('hasInstance'); + var FunctionProto = Function.prototype; + // 19.2.3.6 Function.prototype[@@hasInstance](V) + if (!(HAS_INSTANCE in FunctionProto)) + __webpack_require__(9).f(FunctionProto, HAS_INSTANCE, { + value: function (O) { + if (typeof this != 'function' || !isObject(O)) return false; + if (!isObject(this.prototype)) return O instanceof this; + // for environment w/o native `@@hasInstance` logic enough `instanceof`, but add this: + while ((O = getPrototypeOf(O))) if (this.prototype === O) return true; + return false; + }, + }); + + /***/ + }, + /* 294 */ + /***/ function (module, exports, __webpack_require__) { + var $export = __webpack_require__(0); + var $parseInt = __webpack_require__(184); + // 18.2.5 parseInt(string, radix) + $export($export.G + $export.F * (parseInt != $parseInt), { parseInt: $parseInt }); + + /***/ + }, + /* 295 */ + /***/ function (module, exports, __webpack_require__) { + var $export = __webpack_require__(0); + var $parseFloat = __webpack_require__(185); + // 18.2.4 parseFloat(string) + $export($export.G + $export.F * (parseFloat != $parseFloat), { parseFloat: $parseFloat }); + + /***/ + }, + /* 296 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var global = __webpack_require__(3); + var has = __webpack_require__(18); + var cof = __webpack_require__(25); + var inheritIfRequired = __webpack_require__(120); + var toPrimitive = __webpack_require__(31); + var fails = __webpack_require__(4); + var gOPN = __webpack_require__(55).f; + var gOPD = __webpack_require__(20).f; + var dP = __webpack_require__(9).f; + var $trim = __webpack_require__(67).trim; + var NUMBER = 'Number'; + var $Number = global[NUMBER]; + var Base = $Number; + var proto = $Number.prototype; + // Opera ~12 has broken Object#toString + var BROKEN_COF = cof(__webpack_require__(54)(proto)) == NUMBER; + var TRIM = 'trim' in String.prototype; + + // 7.1.3 ToNumber(argument) + var toNumber = function (argument) { + var it = toPrimitive(argument, false); + if (typeof it == 'string' && it.length > 2) { + it = TRIM ? it.trim() : $trim(it, 3); + var first = it.charCodeAt(0); + var third, radix, maxCode; + if (first === 43 || first === 45) { + third = it.charCodeAt(2); + if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix + } else if (first === 48) { + switch (it.charCodeAt(1)) { + case 66: + case 98: + radix = 2; + maxCode = 49; + break; // fast equal /^0b[01]+$/i + case 79: + case 111: + radix = 8; + maxCode = 55; + break; // fast equal /^0o[0-7]+$/i + default: + return +it; + } + for (var digits = it.slice(2), i = 0, l = digits.length, code; i < l; i++) { + code = digits.charCodeAt(i); + // parseInt parses a string to a first unavailable symbol + // but ToNumber should return NaN if a string contains unavailable symbols + if (code < 48 || code > maxCode) return NaN; + } + return parseInt(digits, radix); + } + } + return +it; + }; + + if (!$Number(' 0o1') || !$Number('0b1') || $Number('+0x1')) { + $Number = function Number(value) { + var it = arguments.length < 1 ? 0 : value; + var that = this; + return that instanceof $Number && + // check on 1..constructor(foo) case + (BROKEN_COF + ? fails(function () { + proto.valueOf.call(that); + }) + : cof(that) != NUMBER) + ? inheritIfRequired(new Base(toNumber(it)), that, $Number) + : toNumber(it); + }; + for ( + var keys = __webpack_require__(8) + ? gOPN(Base) + : // ES3: + ( + 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' + + // ES6 (in case, if modules with ES6 Number statics required before): + 'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' + + 'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger' + ).split(','), + j = 0, + key; + keys.length > j; + j++ + ) { + if (has(Base, (key = keys[j])) && !has($Number, key)) { + dP($Number, key, gOPD(Base, key)); + } + } + $Number.prototype = proto; + proto.constructor = $Number; + __webpack_require__(16)(global, NUMBER, $Number); + } + + /***/ + }, + /* 297 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0); + var toInteger = __webpack_require__(26); + var aNumberValue = __webpack_require__(186); + var repeat = __webpack_require__(121); + var $toFixed = (1.0).toFixed; + var floor = Math.floor; + var data = [0, 0, 0, 0, 0, 0]; + var ERROR = 'Number.toFixed: incorrect invocation!'; + var ZERO = '0'; + + var multiply = function (n, c) { + var i = -1; + var c2 = c; + while (++i < 6) { + c2 += n * data[i]; + data[i] = c2 % 1e7; + c2 = floor(c2 / 1e7); + } + }; + var divide = function (n) { + var i = 6; + var c = 0; + while (--i >= 0) { + c += data[i]; + data[i] = floor(c / n); + c = (c % n) * 1e7; + } + }; + var numToString = function () { + var i = 6; + var s = ''; + while (--i >= 0) { + if (s !== '' || i === 0 || data[i] !== 0) { + var t = String(data[i]); + s = s === '' ? t : s + repeat.call(ZERO, 7 - t.length) + t; + } + } + return s; + }; + var pow = function (x, n, acc) { + return n === 0 ? acc : n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc); + }; + var log = function (x) { + var n = 0; + var x2 = x; + while (x2 >= 4096) { + n += 12; + x2 /= 4096; + } + while (x2 >= 2) { + n += 1; + x2 /= 2; + } + return n; + }; + + $export( + $export.P + + $export.F * + ((!!$toFixed && + ((0.00008).toFixed(3) !== '0.000' || + (0.9).toFixed(0) !== '1' || + (1.255).toFixed(2) !== '1.25' || + (1000000000000000128.0).toFixed(0) !== '1000000000000000128')) || + !__webpack_require__(4)(function () { + // V8 ~ Android 4.3- + $toFixed.call({}); + })), + 'Number', + { + toFixed: function toFixed(fractionDigits) { + var x = aNumberValue(this, ERROR); + var f = toInteger(fractionDigits); + var s = ''; + var m = ZERO; + var e, z, j, k; + if (f < 0 || f > 20) throw RangeError(ERROR); + // eslint-disable-next-line no-self-compare + if (x != x) return 'NaN'; + if (x <= -1e21 || x >= 1e21) return String(x); + if (x < 0) { + s = '-'; + x = -x; + } + if (x > 1e-21) { + e = log(x * pow(2, 69, 1)) - 69; + z = e < 0 ? x * pow(2, -e, 1) : x / pow(2, e, 1); + z *= 0x10000000000000; + e = 52 - e; + if (e > 0) { + multiply(0, z); + j = f; + while (j >= 7) { + multiply(1e7, 0); + j -= 7; + } + multiply(pow(10, j, 1), 0); + j = e - 1; + while (j >= 23) { + divide(1 << 23); + j -= 23; + } + divide(1 << j); + multiply(1, 1); + divide(2); + m = numToString(); + } else { + multiply(0, z); + multiply(1 << -e, 0); + m = numToString() + repeat.call(ZERO, f); + } + } + if (f > 0) { + k = m.length; + m = + s + (k <= f ? '0.' + repeat.call(ZERO, f - k) + m : m.slice(0, k - f) + '.' + m.slice(k - f)); + } else { + m = s + m; + } + return m; + }, + }, + ); + + /***/ + }, + /* 298 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0); + var $fails = __webpack_require__(4); + var aNumberValue = __webpack_require__(186); + var $toPrecision = (1.0).toPrecision; + + $export( + $export.P + + $export.F * + ($fails(function () { + // IE7- + return $toPrecision.call(1, undefined) !== '1'; + }) || + !$fails(function () { + // V8 ~ Android 4.3- + $toPrecision.call({}); + })), + 'Number', + { + toPrecision: function toPrecision(precision) { + var that = aNumberValue(this, 'Number#toPrecision: incorrect invocation!'); + return precision === undefined ? $toPrecision.call(that) : $toPrecision.call(that, precision); + }, + }, + ); + + /***/ + }, + /* 299 */ + /***/ function (module, exports, __webpack_require__) { + // 20.1.2.1 Number.EPSILON + var $export = __webpack_require__(0); + + $export($export.S, 'Number', { EPSILON: Math.pow(2, -52) }); + + /***/ + }, + /* 300 */ + /***/ function (module, exports, __webpack_require__) { + // 20.1.2.2 Number.isFinite(number) + var $export = __webpack_require__(0); + var _isFinite = __webpack_require__(3).isFinite; + + $export($export.S, 'Number', { + isFinite: function isFinite(it) { + return typeof it == 'number' && _isFinite(it); + }, + }); + + /***/ + }, + /* 301 */ + /***/ function (module, exports, __webpack_require__) { + // 20.1.2.3 Number.isInteger(number) + var $export = __webpack_require__(0); + + $export($export.S, 'Number', { isInteger: __webpack_require__(187) }); + + /***/ + }, + /* 302 */ + /***/ function (module, exports, __webpack_require__) { + // 20.1.2.4 Number.isNaN(number) + var $export = __webpack_require__(0); + + $export($export.S, 'Number', { + isNaN: function isNaN(number) { + // eslint-disable-next-line no-self-compare + return number != number; + }, + }); + + /***/ + }, + /* 303 */ + /***/ function (module, exports, __webpack_require__) { + // 20.1.2.5 Number.isSafeInteger(number) + var $export = __webpack_require__(0); + var isInteger = __webpack_require__(187); + var abs = Math.abs; + + $export($export.S, 'Number', { + isSafeInteger: function isSafeInteger(number) { + return isInteger(number) && abs(number) <= 0x1fffffffffffff; + }, + }); + + /***/ + }, + /* 304 */ + /***/ function (module, exports, __webpack_require__) { + // 20.1.2.6 Number.MAX_SAFE_INTEGER + var $export = __webpack_require__(0); + + $export($export.S, 'Number', { MAX_SAFE_INTEGER: 0x1fffffffffffff }); + + /***/ + }, + /* 305 */ + /***/ function (module, exports, __webpack_require__) { + // 20.1.2.10 Number.MIN_SAFE_INTEGER + var $export = __webpack_require__(0); + + $export($export.S, 'Number', { MIN_SAFE_INTEGER: -0x1fffffffffffff }); + + /***/ + }, + /* 306 */ + /***/ function (module, exports, __webpack_require__) { + var $export = __webpack_require__(0); + var $parseFloat = __webpack_require__(185); + // 20.1.2.12 Number.parseFloat(string) + $export($export.S + $export.F * (Number.parseFloat != $parseFloat), 'Number', { + parseFloat: $parseFloat, + }); + + /***/ + }, + /* 307 */ + /***/ function (module, exports, __webpack_require__) { + var $export = __webpack_require__(0); + var $parseInt = __webpack_require__(184); + // 20.1.2.13 Number.parseInt(string, radix) + $export($export.S + $export.F * (Number.parseInt != $parseInt), 'Number', { parseInt: $parseInt }); + + /***/ + }, + /* 308 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.3 Math.acosh(x) + var $export = __webpack_require__(0); + var log1p = __webpack_require__(188); + var sqrt = Math.sqrt; + var $acosh = Math.acosh; + + $export( + $export.S + + $export.F * + !( + $acosh && + // V8 bug: https://code.google.com/p/v8/issues/detail?id=3509 + Math.floor($acosh(Number.MAX_VALUE)) == 710 && + // Tor Browser bug: Math.acosh(Infinity) -> NaN + $acosh(Infinity) == Infinity + ), + 'Math', + { + acosh: function acosh(x) { + return (x = +x) < 1 + ? NaN + : x > 94906265.62425156 + ? Math.log(x) + Math.LN2 + : log1p(x - 1 + sqrt(x - 1) * sqrt(x + 1)); + }, + }, + ); + + /***/ + }, + /* 309 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.5 Math.asinh(x) + var $export = __webpack_require__(0); + var $asinh = Math.asinh; + + function asinh(x) { + return !isFinite((x = +x)) || x == 0 ? x : x < 0 ? -asinh(-x) : Math.log(x + Math.sqrt(x * x + 1)); + } + + // Tor Browser bug: Math.asinh(0) -> -0 + $export($export.S + $export.F * !($asinh && 1 / $asinh(0) > 0), 'Math', { asinh: asinh }); + + /***/ + }, + /* 310 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.7 Math.atanh(x) + var $export = __webpack_require__(0); + var $atanh = Math.atanh; + + // Tor Browser bug: Math.atanh(-0) -> 0 + $export($export.S + $export.F * !($atanh && 1 / $atanh(-0) < 0), 'Math', { + atanh: function atanh(x) { + return (x = +x) == 0 ? x : Math.log((1 + x) / (1 - x)) / 2; + }, + }); + + /***/ + }, + /* 311 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.9 Math.cbrt(x) + var $export = __webpack_require__(0); + var sign = __webpack_require__(122); + + $export($export.S, 'Math', { + cbrt: function cbrt(x) { + return sign((x = +x)) * Math.pow(Math.abs(x), 1 / 3); + }, + }); + + /***/ + }, + /* 312 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.11 Math.clz32(x) + var $export = __webpack_require__(0); + + $export($export.S, 'Math', { + clz32: function clz32(x) { + return (x >>>= 0) ? 31 - Math.floor(Math.log(x + 0.5) * Math.LOG2E) : 32; + }, + }); + + /***/ + }, + /* 313 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.12 Math.cosh(x) + var $export = __webpack_require__(0); + var exp = Math.exp; + + $export($export.S, 'Math', { + cosh: function cosh(x) { + return (exp((x = +x)) + exp(-x)) / 2; + }, + }); + + /***/ + }, + /* 314 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.14 Math.expm1(x) + var $export = __webpack_require__(0); + var $expm1 = __webpack_require__(123); + + $export($export.S + $export.F * ($expm1 != Math.expm1), 'Math', { expm1: $expm1 }); + + /***/ + }, + /* 315 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.16 Math.fround(x) + var $export = __webpack_require__(0); + + $export($export.S, 'Math', { fround: __webpack_require__(189) }); + + /***/ + }, + /* 316 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.17 Math.hypot([value1[, value2[, … ]]]) + var $export = __webpack_require__(0); + var abs = Math.abs; + + $export($export.S, 'Math', { + hypot: function hypot(value1, value2) { + // eslint-disable-line no-unused-vars + var sum = 0; + var i = 0; + var aLen = arguments.length; + var larg = 0; + var arg, div; + while (i < aLen) { + arg = abs(arguments[i++]); + if (larg < arg) { + div = larg / arg; + sum = sum * div * div + 1; + larg = arg; + } else if (arg > 0) { + div = arg / larg; + sum += div * div; + } else sum += arg; + } + return larg === Infinity ? Infinity : larg * Math.sqrt(sum); + }, + }); + + /***/ + }, + /* 317 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.18 Math.imul(x, y) + var $export = __webpack_require__(0); + var $imul = Math.imul; + + // some WebKit versions fails with big numbers, some has wrong arity + $export( + $export.S + + $export.F * + __webpack_require__(4)(function () { + return $imul(0xffffffff, 5) != -5 || $imul.length != 2; + }), + 'Math', + { + imul: function imul(x, y) { + var UINT16 = 0xffff; + var xn = +x; + var yn = +y; + var xl = UINT16 & xn; + var yl = UINT16 & yn; + return ( + 0 | (xl * yl + ((((UINT16 & (xn >>> 16)) * yl + xl * (UINT16 & (yn >>> 16))) << 16) >>> 0)) + ); + }, + }, + ); + + /***/ + }, + /* 318 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.21 Math.log10(x) + var $export = __webpack_require__(0); + + $export($export.S, 'Math', { + log10: function log10(x) { + return Math.log(x) * Math.LOG10E; + }, + }); + + /***/ + }, + /* 319 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.20 Math.log1p(x) + var $export = __webpack_require__(0); + + $export($export.S, 'Math', { log1p: __webpack_require__(188) }); + + /***/ + }, + /* 320 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.22 Math.log2(x) + var $export = __webpack_require__(0); + + $export($export.S, 'Math', { + log2: function log2(x) { + return Math.log(x) / Math.LN2; + }, + }); + + /***/ + }, + /* 321 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.28 Math.sign(x) + var $export = __webpack_require__(0); + + $export($export.S, 'Math', { sign: __webpack_require__(122) }); + + /***/ + }, + /* 322 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.30 Math.sinh(x) + var $export = __webpack_require__(0); + var expm1 = __webpack_require__(123); + var exp = Math.exp; + + // V8 near Chromium 38 has a problem with very small numbers + $export( + $export.S + + $export.F * + __webpack_require__(4)(function () { + return !Math.sinh(-2e-17) != -2e-17; + }), + 'Math', + { + sinh: function sinh(x) { + return Math.abs((x = +x)) < 1 + ? (expm1(x) - expm1(-x)) / 2 + : (exp(x - 1) - exp(-x - 1)) * (Math.E / 2); + }, + }, + ); + + /***/ + }, + /* 323 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.33 Math.tanh(x) + var $export = __webpack_require__(0); + var expm1 = __webpack_require__(123); + var exp = Math.exp; + + $export($export.S, 'Math', { + tanh: function tanh(x) { + var a = expm1((x = +x)); + var b = expm1(-x); + return a == Infinity ? 1 : b == Infinity ? -1 : (a - b) / (exp(x) + exp(-x)); + }, + }); + + /***/ + }, + /* 324 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.34 Math.trunc(x) + var $export = __webpack_require__(0); + + $export($export.S, 'Math', { + trunc: function trunc(it) { + return (it > 0 ? Math.floor : Math.ceil)(it); + }, + }); + + /***/ + }, + /* 325 */ + /***/ function (module, exports, __webpack_require__) { + var $export = __webpack_require__(0); + var toAbsoluteIndex = __webpack_require__(53); + var fromCharCode = String.fromCharCode; + var $fromCodePoint = String.fromCodePoint; + + // length should be 1, old FF problem + $export($export.S + $export.F * (!!$fromCodePoint && $fromCodePoint.length != 1), 'String', { + // 21.1.2.2 String.fromCodePoint(...codePoints) + fromCodePoint: function fromCodePoint(x) { + // eslint-disable-line no-unused-vars + var res = []; + var aLen = arguments.length; + var i = 0; + var code; + while (aLen > i) { + code = +arguments[i++]; + if (toAbsoluteIndex(code, 0x10ffff) !== code) + throw RangeError(code + ' is not a valid code point'); + res.push( + code < 0x10000 + ? fromCharCode(code) + : fromCharCode(((code -= 0x10000) >> 10) + 0xd800, (code % 0x400) + 0xdc00), + ); + } + return res.join(''); + }, + }); + + /***/ + }, + /* 326 */ + /***/ function (module, exports, __webpack_require__) { + var $export = __webpack_require__(0); + var toIObject = __webpack_require__(19); + var toLength = __webpack_require__(7); + + $export($export.S, 'String', { + // 21.1.2.4 String.raw(callSite, ...substitutions) + raw: function raw(callSite) { + var tpl = toIObject(callSite.raw); + var len = toLength(tpl.length); + var aLen = arguments.length; + var res = []; + var i = 0; + while (len > i) { + res.push(String(tpl[i++])); + if (i < aLen) res.push(String(arguments[i])); + } + return res.join(''); + }, + }); + + /***/ + }, + /* 327 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // 21.1.3.25 String.prototype.trim() + __webpack_require__(67)('trim', function ($trim) { + return function trim() { + return $trim(this, 3); + }; + }); + + /***/ + }, + /* 328 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $at = __webpack_require__(90)(true); + + // 21.1.3.27 String.prototype[@@iterator]() + __webpack_require__(124)( + String, + 'String', + function (iterated) { + this._t = String(iterated); // target + this._i = 0; // next index + // 21.1.5.2.1 %StringIteratorPrototype%.next() + }, + function () { + var O = this._t; + var index = this._i; + var point; + if (index >= O.length) return { value: undefined, done: true }; + point = $at(O, index); + this._i += point.length; + return { value: point, done: false }; + }, + ); + + /***/ + }, + /* 329 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0); + var $at = __webpack_require__(90)(false); + $export($export.P, 'String', { + // 21.1.3.3 String.prototype.codePointAt(pos) + codePointAt: function codePointAt(pos) { + return $at(this, pos); + }, + }); + + /***/ + }, + /* 330 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + // 21.1.3.6 String.prototype.endsWith(searchString [, endPosition]) + + var $export = __webpack_require__(0); + var toLength = __webpack_require__(7); + var context = __webpack_require__(126); + var ENDS_WITH = 'endsWith'; + var $endsWith = ''[ENDS_WITH]; + + $export($export.P + $export.F * __webpack_require__(127)(ENDS_WITH), 'String', { + endsWith: function endsWith(searchString /* , endPosition = @length */) { + var that = context(this, searchString, ENDS_WITH); + var endPosition = arguments.length > 1 ? arguments[1] : undefined; + var len = toLength(that.length); + var end = endPosition === undefined ? len : Math.min(toLength(endPosition), len); + var search = String(searchString); + return $endsWith + ? $endsWith.call(that, search, end) + : that.slice(end - search.length, end) === search; + }, + }); + + /***/ + }, + /* 331 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + // 21.1.3.7 String.prototype.includes(searchString, position = 0) + + var $export = __webpack_require__(0); + var context = __webpack_require__(126); + var INCLUDES = 'includes'; + + $export($export.P + $export.F * __webpack_require__(127)(INCLUDES), 'String', { + includes: function includes(searchString /* , position = 0 */) { + return !!~context(this, searchString, INCLUDES).indexOf( + searchString, + arguments.length > 1 ? arguments[1] : undefined, + ); + }, + }); + + /***/ + }, + /* 332 */ + /***/ function (module, exports, __webpack_require__) { + var $export = __webpack_require__(0); + + $export($export.P, 'String', { + // 21.1.3.13 String.prototype.repeat(count) + repeat: __webpack_require__(121), + }); + + /***/ + }, + /* 333 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + // 21.1.3.18 String.prototype.startsWith(searchString [, position ]) + + var $export = __webpack_require__(0); + var toLength = __webpack_require__(7); + var context = __webpack_require__(126); + var STARTS_WITH = 'startsWith'; + var $startsWith = ''[STARTS_WITH]; + + $export($export.P + $export.F * __webpack_require__(127)(STARTS_WITH), 'String', { + startsWith: function startsWith(searchString /* , position = 0 */) { + var that = context(this, searchString, STARTS_WITH); + var index = toLength(Math.min(arguments.length > 1 ? arguments[1] : undefined, that.length)); + var search = String(searchString); + return $startsWith + ? $startsWith.call(that, search, index) + : that.slice(index, index + search.length) === search; + }, + }); + + /***/ + }, + /* 334 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // B.2.3.2 String.prototype.anchor(name) + __webpack_require__(17)('anchor', function (createHTML) { + return function anchor(name) { + return createHTML(this, 'a', 'name', name); + }; + }); + + /***/ + }, + /* 335 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // B.2.3.3 String.prototype.big() + __webpack_require__(17)('big', function (createHTML) { + return function big() { + return createHTML(this, 'big', '', ''); + }; + }); + + /***/ + }, + /* 336 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // B.2.3.4 String.prototype.blink() + __webpack_require__(17)('blink', function (createHTML) { + return function blink() { + return createHTML(this, 'blink', '', ''); + }; + }); + + /***/ + }, + /* 337 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // B.2.3.5 String.prototype.bold() + __webpack_require__(17)('bold', function (createHTML) { + return function bold() { + return createHTML(this, 'b', '', ''); + }; + }); + + /***/ + }, + /* 338 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // B.2.3.6 String.prototype.fixed() + __webpack_require__(17)('fixed', function (createHTML) { + return function fixed() { + return createHTML(this, 'tt', '', ''); + }; + }); + + /***/ + }, + /* 339 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // B.2.3.7 String.prototype.fontcolor(color) + __webpack_require__(17)('fontcolor', function (createHTML) { + return function fontcolor(color) { + return createHTML(this, 'font', 'color', color); + }; + }); + + /***/ + }, + /* 340 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // B.2.3.8 String.prototype.fontsize(size) + __webpack_require__(17)('fontsize', function (createHTML) { + return function fontsize(size) { + return createHTML(this, 'font', 'size', size); + }; + }); + + /***/ + }, + /* 341 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // B.2.3.9 String.prototype.italics() + __webpack_require__(17)('italics', function (createHTML) { + return function italics() { + return createHTML(this, 'i', '', ''); + }; + }); + + /***/ + }, + /* 342 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // B.2.3.10 String.prototype.link(url) + __webpack_require__(17)('link', function (createHTML) { + return function link(url) { + return createHTML(this, 'a', 'href', url); + }; + }); + + /***/ + }, + /* 343 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // B.2.3.11 String.prototype.small() + __webpack_require__(17)('small', function (createHTML) { + return function small() { + return createHTML(this, 'small', '', ''); + }; + }); + + /***/ + }, + /* 344 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // B.2.3.12 String.prototype.strike() + __webpack_require__(17)('strike', function (createHTML) { + return function strike() { + return createHTML(this, 'strike', '', ''); + }; + }); + + /***/ + }, + /* 345 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // B.2.3.13 String.prototype.sub() + __webpack_require__(17)('sub', function (createHTML) { + return function sub() { + return createHTML(this, 'sub', '', ''); + }; + }); + + /***/ + }, + /* 346 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // B.2.3.14 String.prototype.sup() + __webpack_require__(17)('sup', function (createHTML) { + return function sup() { + return createHTML(this, 'sup', '', ''); + }; + }); + + /***/ + }, + /* 347 */ + /***/ function (module, exports, __webpack_require__) { + // 20.3.3.1 / 15.9.4.4 Date.now() + var $export = __webpack_require__(0); + + $export($export.S, 'Date', { + now: function () { + return new Date().getTime(); + }, + }); + + /***/ + }, + /* 348 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0); + var toObject = __webpack_require__(11); + var toPrimitive = __webpack_require__(31); + + $export( + $export.P + + $export.F * + __webpack_require__(4)(function () { + return ( + new Date(NaN).toJSON() !== null || + Date.prototype.toJSON.call({ + toISOString: function () { + return 1; + }, + }) !== 1 + ); + }), + 'Date', + { + // eslint-disable-next-line no-unused-vars + toJSON: function toJSON(key) { + var O = toObject(this); + var pv = toPrimitive(O); + return typeof pv == 'number' && !isFinite(pv) ? null : O.toISOString(); + }, + }, + ); + + /***/ + }, + /* 349 */ + /***/ function (module, exports, __webpack_require__) { + // 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString() + var $export = __webpack_require__(0); + var toISOString = __webpack_require__(350); + + // PhantomJS / old WebKit has a broken implementations + $export($export.P + $export.F * (Date.prototype.toISOString !== toISOString), 'Date', { + toISOString: toISOString, + }); + + /***/ + }, + /* 350 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString() + var fails = __webpack_require__(4); + var getTime = Date.prototype.getTime; + var $toISOString = Date.prototype.toISOString; + + var lz = function (num) { + return num > 9 ? num : '0' + num; + }; + + // PhantomJS / old WebKit has a broken implementations + module.exports = + fails(function () { + return $toISOString.call(new Date(-5e13 - 1)) != '0385-07-25T07:06:39.999Z'; + }) || + !fails(function () { + $toISOString.call(new Date(NaN)); + }) + ? function toISOString() { + if (!isFinite(getTime.call(this))) throw RangeError('Invalid time value'); + var d = this; + var y = d.getUTCFullYear(); + var m = d.getUTCMilliseconds(); + var s = y < 0 ? '-' : y > 9999 ? '+' : ''; + return ( + s + + ('00000' + Math.abs(y)).slice(s ? -6 : -4) + + '-' + + lz(d.getUTCMonth() + 1) + + '-' + + lz(d.getUTCDate()) + + 'T' + + lz(d.getUTCHours()) + + ':' + + lz(d.getUTCMinutes()) + + ':' + + lz(d.getUTCSeconds()) + + '.' + + (m > 99 ? m : '0' + lz(m)) + + 'Z' + ); + } + : $toISOString; + + /***/ + }, + /* 351 */ + /***/ function (module, exports, __webpack_require__) { + var DateProto = Date.prototype; + var INVALID_DATE = 'Invalid Date'; + var TO_STRING = 'toString'; + var $toString = DateProto[TO_STRING]; + var getTime = DateProto.getTime; + if (new Date(NaN) + '' != INVALID_DATE) { + __webpack_require__(16)(DateProto, TO_STRING, function toString() { + var value = getTime.call(this); + // eslint-disable-next-line no-self-compare + return value === value ? $toString.call(this) : INVALID_DATE; + }); + } + + /***/ + }, + /* 352 */ + /***/ function (module, exports, __webpack_require__) { + var TO_PRIMITIVE = __webpack_require__(6)('toPrimitive'); + var proto = Date.prototype; + + if (!(TO_PRIMITIVE in proto)) __webpack_require__(15)(proto, TO_PRIMITIVE, __webpack_require__(353)); + + /***/ + }, + /* 353 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var anObject = __webpack_require__(2); + var toPrimitive = __webpack_require__(31); + var NUMBER = 'number'; + + module.exports = function (hint) { + if (hint !== 'string' && hint !== NUMBER && hint !== 'default') throw TypeError('Incorrect hint'); + return toPrimitive(anObject(this), hint != NUMBER); + }; + + /***/ + }, + /* 354 */ + /***/ function (module, exports, __webpack_require__) { + // 22.1.2.2 / 15.4.3.2 Array.isArray(arg) + var $export = __webpack_require__(0); + + $export($export.S, 'Array', { isArray: __webpack_require__(89) }); + + /***/ + }, + /* 355 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var ctx = __webpack_require__(24); + var $export = __webpack_require__(0); + var toObject = __webpack_require__(11); + var call = __webpack_require__(190); + var isArrayIter = __webpack_require__(128); + var toLength = __webpack_require__(7); + var createProperty = __webpack_require__(129); + var getIterFn = __webpack_require__(130); + + $export( + $export.S + + $export.F * + !__webpack_require__(92)(function (iter) { + Array.from(iter); + }), + 'Array', + { + // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined) + from: function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) { + var O = toObject(arrayLike); + var C = typeof this == 'function' ? this : Array; + var aLen = arguments.length; + var mapfn = aLen > 1 ? arguments[1] : undefined; + var mapping = mapfn !== undefined; + var index = 0; + var iterFn = getIterFn(O); + var length, result, step, iterator; + if (mapping) mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2); + // if object isn't iterable or it's array with default iterator - use simple case + if (iterFn != undefined && !(C == Array && isArrayIter(iterFn))) { + for (iterator = iterFn.call(O), result = new C(); !(step = iterator.next()).done; index++) { + createProperty( + result, + index, + mapping ? call(iterator, mapfn, [step.value, index], true) : step.value, + ); + } + } else { + length = toLength(O.length); + for (result = new C(length); length > index; index++) { + createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]); + } + } + result.length = index; + return result; + }, + }, + ); + + /***/ + }, + /* 356 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0); + var createProperty = __webpack_require__(129); + + // WebKit Array.of isn't generic + $export( + $export.S + + $export.F * + __webpack_require__(4)(function () { + function F() { + /* empty */ + } + return !(Array.of.call(F) instanceof F); + }), + 'Array', + { + // 22.1.2.3 Array.of( ...items) + of: function of(/* ...args */) { + var index = 0; + var aLen = arguments.length; + var result = new (typeof this == 'function' ? this : Array)(aLen); + while (aLen > index) createProperty(result, index, arguments[index++]); + result.length = aLen; + return result; + }, + }, + ); + + /***/ + }, + /* 357 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // 22.1.3.13 Array.prototype.join(separator) + var $export = __webpack_require__(0); + var toIObject = __webpack_require__(19); + var arrayJoin = [].join; + + // fallback for not array-like strings + $export( + $export.P + $export.F * (__webpack_require__(75) != Object || !__webpack_require__(27)(arrayJoin)), + 'Array', + { + join: function join(separator) { + return arrayJoin.call(toIObject(this), separator === undefined ? ',' : separator); + }, + }, + ); + + /***/ + }, + /* 358 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0); + var html = __webpack_require__(117); + var cof = __webpack_require__(25); + var toAbsoluteIndex = __webpack_require__(53); + var toLength = __webpack_require__(7); + var arraySlice = [].slice; + + // fallback for not array-like ES3 strings and DOM objects + $export( + $export.P + + $export.F * + __webpack_require__(4)(function () { + if (html) arraySlice.call(html); + }), + 'Array', + { + slice: function slice(begin, end) { + var len = toLength(this.length); + var klass = cof(this); + end = end === undefined ? len : end; + if (klass == 'Array') return arraySlice.call(this, begin, end); + var start = toAbsoluteIndex(begin, len); + var upTo = toAbsoluteIndex(end, len); + var size = toLength(upTo - start); + var cloned = new Array(size); + var i = 0; + for (; i < size; i++) cloned[i] = klass == 'String' ? this.charAt(start + i) : this[start + i]; + return cloned; + }, + }, + ); + + /***/ + }, + /* 359 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0); + var aFunction = __webpack_require__(12); + var toObject = __webpack_require__(11); + var fails = __webpack_require__(4); + var $sort = [].sort; + var test = [1, 2, 3]; + + $export( + $export.P + + $export.F * + (fails(function () { + // IE8- + test.sort(undefined); + }) || + !fails(function () { + // V8 bug + test.sort(null); + // Old WebKit + }) || + !__webpack_require__(27)($sort)), + 'Array', + { + // 22.1.3.25 Array.prototype.sort(comparefn) + sort: function sort(comparefn) { + return comparefn === undefined + ? $sort.call(toObject(this)) + : $sort.call(toObject(this), aFunction(comparefn)); + }, + }, + ); + + /***/ + }, + /* 360 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0); + var $forEach = __webpack_require__(34)(0); + var STRICT = __webpack_require__(27)([].forEach, true); + + $export($export.P + $export.F * !STRICT, 'Array', { + // 22.1.3.10 / 15.4.4.18 Array.prototype.forEach(callbackfn [, thisArg]) + forEach: function forEach(callbackfn /* , thisArg */) { + return $forEach(this, callbackfn, arguments[1]); + }, + }); + + /***/ + }, + /* 361 */ + /***/ function (module, exports, __webpack_require__) { + var isObject = __webpack_require__(5); + var isArray = __webpack_require__(89); + var SPECIES = __webpack_require__(6)('species'); + + module.exports = function (original) { + var C; + if (isArray(original)) { + C = original.constructor; + // cross-realm fallback + if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined; + if (isObject(C)) { + C = C[SPECIES]; + if (C === null) C = undefined; + } + } + return C === undefined ? Array : C; + }; + + /***/ + }, + /* 362 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0); + var $map = __webpack_require__(34)(1); + + $export($export.P + $export.F * !__webpack_require__(27)([].map, true), 'Array', { + // 22.1.3.15 / 15.4.4.19 Array.prototype.map(callbackfn [, thisArg]) + map: function map(callbackfn /* , thisArg */) { + return $map(this, callbackfn, arguments[1]); + }, + }); + + /***/ + }, + /* 363 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0); + var $filter = __webpack_require__(34)(2); + + $export($export.P + $export.F * !__webpack_require__(27)([].filter, true), 'Array', { + // 22.1.3.7 / 15.4.4.20 Array.prototype.filter(callbackfn [, thisArg]) + filter: function filter(callbackfn /* , thisArg */) { + return $filter(this, callbackfn, arguments[1]); + }, + }); + + /***/ + }, + /* 364 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0); + var $some = __webpack_require__(34)(3); + + $export($export.P + $export.F * !__webpack_require__(27)([].some, true), 'Array', { + // 22.1.3.23 / 15.4.4.17 Array.prototype.some(callbackfn [, thisArg]) + some: function some(callbackfn /* , thisArg */) { + return $some(this, callbackfn, arguments[1]); + }, + }); + + /***/ + }, + /* 365 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0); + var $every = __webpack_require__(34)(4); + + $export($export.P + $export.F * !__webpack_require__(27)([].every, true), 'Array', { + // 22.1.3.5 / 15.4.4.16 Array.prototype.every(callbackfn [, thisArg]) + every: function every(callbackfn /* , thisArg */) { + return $every(this, callbackfn, arguments[1]); + }, + }); + + /***/ + }, + /* 366 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0); + var $reduce = __webpack_require__(191); + + $export($export.P + $export.F * !__webpack_require__(27)([].reduce, true), 'Array', { + // 22.1.3.18 / 15.4.4.21 Array.prototype.reduce(callbackfn [, initialValue]) + reduce: function reduce(callbackfn /* , initialValue */) { + return $reduce(this, callbackfn, arguments.length, arguments[1], false); + }, + }); + + /***/ + }, + /* 367 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0); + var $reduce = __webpack_require__(191); + + $export($export.P + $export.F * !__webpack_require__(27)([].reduceRight, true), 'Array', { + // 22.1.3.19 / 15.4.4.22 Array.prototype.reduceRight(callbackfn [, initialValue]) + reduceRight: function reduceRight(callbackfn /* , initialValue */) { + return $reduce(this, callbackfn, arguments.length, arguments[1], true); + }, + }); + + /***/ + }, + /* 368 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0); + var $indexOf = __webpack_require__(87)(false); + var $native = [].indexOf; + var NEGATIVE_ZERO = !!$native && 1 / [1].indexOf(1, -0) < 0; + + $export($export.P + $export.F * (NEGATIVE_ZERO || !__webpack_require__(27)($native)), 'Array', { + // 22.1.3.11 / 15.4.4.14 Array.prototype.indexOf(searchElement [, fromIndex]) + indexOf: function indexOf(searchElement /* , fromIndex = 0 */) { + return NEGATIVE_ZERO + ? // convert -0 to +0 + $native.apply(this, arguments) || 0 + : $indexOf(this, searchElement, arguments[1]); + }, + }); + + /***/ + }, + /* 369 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0); + var toIObject = __webpack_require__(19); + var toInteger = __webpack_require__(26); + var toLength = __webpack_require__(7); + var $native = [].lastIndexOf; + var NEGATIVE_ZERO = !!$native && 1 / [1].lastIndexOf(1, -0) < 0; + + $export($export.P + $export.F * (NEGATIVE_ZERO || !__webpack_require__(27)($native)), 'Array', { + // 22.1.3.14 / 15.4.4.15 Array.prototype.lastIndexOf(searchElement [, fromIndex]) + lastIndexOf: function lastIndexOf(searchElement /* , fromIndex = @[*-1] */) { + // convert -0 to +0 + if (NEGATIVE_ZERO) return $native.apply(this, arguments) || 0; + var O = toIObject(this); + var length = toLength(O.length); + var index = length - 1; + if (arguments.length > 1) index = Math.min(index, toInteger(arguments[1])); + if (index < 0) index = length + index; + for (; index >= 0; index--) if (index in O) if (O[index] === searchElement) return index || 0; + return -1; + }, + }); + + /***/ + }, + /* 370 */ + /***/ function (module, exports, __webpack_require__) { + // 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length) + var $export = __webpack_require__(0); + + $export($export.P, 'Array', { copyWithin: __webpack_require__(192) }); + + __webpack_require__(44)('copyWithin'); + + /***/ + }, + /* 371 */ + /***/ function (module, exports, __webpack_require__) { + // 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length) + var $export = __webpack_require__(0); + + $export($export.P, 'Array', { fill: __webpack_require__(132) }); + + __webpack_require__(44)('fill'); + + /***/ + }, + /* 372 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // 22.1.3.8 Array.prototype.find(predicate, thisArg = undefined) + var $export = __webpack_require__(0); + var $find = __webpack_require__(34)(5); + var KEY = 'find'; + var forced = true; + // Shouldn't skip holes + if (KEY in []) + Array(1)[KEY](function () { + forced = false; + }); + $export($export.P + $export.F * forced, 'Array', { + find: function find(callbackfn /* , that = undefined */) { + return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); + }, + }); + __webpack_require__(44)(KEY); + + /***/ + }, + /* 373 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // 22.1.3.9 Array.prototype.findIndex(predicate, thisArg = undefined) + var $export = __webpack_require__(0); + var $find = __webpack_require__(34)(6); + var KEY = 'findIndex'; + var forced = true; + // Shouldn't skip holes + if (KEY in []) + Array(1)[KEY](function () { + forced = false; + }); + $export($export.P + $export.F * forced, 'Array', { + findIndex: function findIndex(callbackfn /* , that = undefined */) { + return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); + }, + }); + __webpack_require__(44)(KEY); + + /***/ + }, + /* 374 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(56)('Array'); + + /***/ + }, + /* 375 */ + /***/ function (module, exports, __webpack_require__) { + var global = __webpack_require__(3); + var inheritIfRequired = __webpack_require__(120); + var dP = __webpack_require__(9).f; + var gOPN = __webpack_require__(55).f; + var isRegExp = __webpack_require__(91); + var $flags = __webpack_require__(77); + var $RegExp = global.RegExp; + var Base = $RegExp; + var proto = $RegExp.prototype; + var re1 = /a/g; + var re2 = /a/g; + // "new" creates a new object, old webkit buggy here + var CORRECT_NEW = new $RegExp(re1) !== re1; + + if ( + __webpack_require__(8) && + (!CORRECT_NEW || + __webpack_require__(4)(function () { + re2[__webpack_require__(6)('match')] = false; + // RegExp constructor can alter flags and IsRegExp works correct with @@match + return $RegExp(re1) != re1 || $RegExp(re2) == re2 || $RegExp(re1, 'i') != '/a/i'; + })) + ) { + $RegExp = function RegExp(p, f) { + var tiRE = this instanceof $RegExp; + var piRE = isRegExp(p); + var fiU = f === undefined; + return !tiRE && piRE && p.constructor === $RegExp && fiU + ? p + : inheritIfRequired( + CORRECT_NEW + ? new Base(piRE && !fiU ? p.source : p, f) + : Base((piRE = p instanceof $RegExp) ? p.source : p, piRE && fiU ? $flags.call(p) : f), + tiRE ? this : proto, + $RegExp, + ); + }; + var proxy = function (key) { + key in $RegExp || + dP($RegExp, key, { + configurable: true, + get: function () { + return Base[key]; + }, + set: function (it) { + Base[key] = it; + }, + }); + }; + for (var keys = gOPN(Base), i = 0; keys.length > i; ) proxy(keys[i++]); + proto.constructor = $RegExp; + $RegExp.prototype = proto; + __webpack_require__(16)(global, 'RegExp', $RegExp); + } + + __webpack_require__(56)('RegExp'); + + /***/ + }, + /* 376 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + __webpack_require__(195); + var anObject = __webpack_require__(2); + var $flags = __webpack_require__(77); + var DESCRIPTORS = __webpack_require__(8); + var TO_STRING = 'toString'; + var $toString = /./[TO_STRING]; + + var define = function (fn) { + __webpack_require__(16)(RegExp.prototype, TO_STRING, fn, true); + }; + + // 21.2.5.14 RegExp.prototype.toString() + if ( + __webpack_require__(4)(function () { + return $toString.call({ source: 'a', flags: 'b' }) != '/a/b'; + }) + ) { + define(function toString() { + var R = anObject(this); + return '/'.concat( + R.source, + '/', + 'flags' in R ? R.flags : !DESCRIPTORS && R instanceof RegExp ? $flags.call(R) : undefined, + ); + }); + // FF44- RegExp#toString has a wrong name + } else if ($toString.name != TO_STRING) { + define(function toString() { + return $toString.call(this); + }); + } + + /***/ + }, + /* 377 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var anObject = __webpack_require__(2); + var toLength = __webpack_require__(7); + var advanceStringIndex = __webpack_require__(135); + var regExpExec = __webpack_require__(93); + + // @@match logic + __webpack_require__(94)('match', 1, function (defined, MATCH, $match, maybeCallNative) { + return [ + // `String.prototype.match` method + // https://tc39.github.io/ecma262/#sec-string.prototype.match + function match(regexp) { + var O = defined(this); + var fn = regexp == undefined ? undefined : regexp[MATCH]; + return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[MATCH](String(O)); + }, + // `RegExp.prototype[@@match]` method + // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@match + function (regexp) { + var res = maybeCallNative($match, regexp, this); + if (res.done) return res.value; + var rx = anObject(regexp); + var S = String(this); + if (!rx.global) return regExpExec(rx, S); + var fullUnicode = rx.unicode; + rx.lastIndex = 0; + var A = []; + var n = 0; + var result; + while ((result = regExpExec(rx, S)) !== null) { + var matchStr = String(result[0]); + A[n] = matchStr; + if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode); + n++; + } + return n === 0 ? null : A; + }, + ]; + }); + + /***/ + }, + /* 378 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var anObject = __webpack_require__(2); + var toObject = __webpack_require__(11); + var toLength = __webpack_require__(7); + var toInteger = __webpack_require__(26); + var advanceStringIndex = __webpack_require__(135); + var regExpExec = __webpack_require__(93); + var max = Math.max; + var min = Math.min; + var floor = Math.floor; + var SUBSTITUTION_SYMBOLS = /\$([$&`']|\d\d?|<[^>]*>)/g; + var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&`']|\d\d?)/g; + + var maybeToString = function (it) { + return it === undefined ? it : String(it); + }; + + // @@replace logic + __webpack_require__(94)('replace', 2, function (defined, REPLACE, $replace, maybeCallNative) { + return [ + // `String.prototype.replace` method + // https://tc39.github.io/ecma262/#sec-string.prototype.replace + function replace(searchValue, replaceValue) { + var O = defined(this); + var fn = searchValue == undefined ? undefined : searchValue[REPLACE]; + return fn !== undefined + ? fn.call(searchValue, O, replaceValue) + : $replace.call(String(O), searchValue, replaceValue); + }, + // `RegExp.prototype[@@replace]` method + // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@replace + function (regexp, replaceValue) { + var res = maybeCallNative($replace, regexp, this, replaceValue); + if (res.done) return res.value; + + var rx = anObject(regexp); + var S = String(this); + var functionalReplace = typeof replaceValue === 'function'; + if (!functionalReplace) replaceValue = String(replaceValue); + var global = rx.global; + if (global) { + var fullUnicode = rx.unicode; + rx.lastIndex = 0; + } + var results = []; + while (true) { + var result = regExpExec(rx, S); + if (result === null) break; + results.push(result); + if (!global) break; + var matchStr = String(result[0]); + if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode); + } + var accumulatedResult = ''; + var nextSourcePosition = 0; + for (var i = 0; i < results.length; i++) { + result = results[i]; + var matched = String(result[0]); + var position = max(min(toInteger(result.index), S.length), 0); + var captures = []; + // NOTE: This is equivalent to + // captures = result.slice(1).map(maybeToString) + // but for some reason `nativeSlice.call(result, 1, result.length)` (called in + // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and + // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it. + for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j])); + var namedCaptures = result.groups; + if (functionalReplace) { + var replacerArgs = [matched].concat(captures, position, S); + if (namedCaptures !== undefined) replacerArgs.push(namedCaptures); + var replacement = String(replaceValue.apply(undefined, replacerArgs)); + } else { + replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue); + } + if (position >= nextSourcePosition) { + accumulatedResult += S.slice(nextSourcePosition, position) + replacement; + nextSourcePosition = position + matched.length; + } + } + return accumulatedResult + S.slice(nextSourcePosition); + }, + ]; + + // https://tc39.github.io/ecma262/#sec-getsubstitution + function getSubstitution(matched, str, position, captures, namedCaptures, replacement) { + var tailPos = position + matched.length; + var m = captures.length; + var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED; + if (namedCaptures !== undefined) { + namedCaptures = toObject(namedCaptures); + symbols = SUBSTITUTION_SYMBOLS; + } + return $replace.call(replacement, symbols, function (match, ch) { + var capture; + switch (ch.charAt(0)) { + case '$': + return '$'; + case '&': + return matched; + case '`': + return str.slice(0, position); + case "'": + return str.slice(tailPos); + case '<': + capture = namedCaptures[ch.slice(1, -1)]; + break; + default: // \d\d? + var n = +ch; + if (n === 0) return match; + if (n > m) { + var f = floor(n / 10); + if (f === 0) return match; + if (f <= m) + return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1); + return match; + } + capture = captures[n - 1]; + } + return capture === undefined ? '' : capture; + }); + } + }); + + /***/ + }, + /* 379 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var anObject = __webpack_require__(2); + var sameValue = __webpack_require__(181); + var regExpExec = __webpack_require__(93); + + // @@search logic + __webpack_require__(94)('search', 1, function (defined, SEARCH, $search, maybeCallNative) { + return [ + // `String.prototype.search` method + // https://tc39.github.io/ecma262/#sec-string.prototype.search + function search(regexp) { + var O = defined(this); + var fn = regexp == undefined ? undefined : regexp[SEARCH]; + return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O)); + }, + // `RegExp.prototype[@@search]` method + // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@search + function (regexp) { + var res = maybeCallNative($search, regexp, this); + if (res.done) return res.value; + var rx = anObject(regexp); + var S = String(this); + var previousLastIndex = rx.lastIndex; + if (!sameValue(previousLastIndex, 0)) rx.lastIndex = 0; + var result = regExpExec(rx, S); + if (!sameValue(rx.lastIndex, previousLastIndex)) rx.lastIndex = previousLastIndex; + return result === null ? -1 : result.index; + }, + ]; + }); + + /***/ + }, + /* 380 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var isRegExp = __webpack_require__(91); + var anObject = __webpack_require__(2); + var speciesConstructor = __webpack_require__(78); + var advanceStringIndex = __webpack_require__(135); + var toLength = __webpack_require__(7); + var callRegExpExec = __webpack_require__(93); + var regexpExec = __webpack_require__(134); + var fails = __webpack_require__(4); + var $min = Math.min; + var $push = [].push; + var $SPLIT = 'split'; + var LENGTH = 'length'; + var LAST_INDEX = 'lastIndex'; + var MAX_UINT32 = 0xffffffff; + + // babel-minify transpiles RegExp('x', 'y') -> /x/y and it causes SyntaxError + var SUPPORTS_Y = !fails(function () { + RegExp(MAX_UINT32, 'y'); + }); + + // @@split logic + __webpack_require__(94)('split', 2, function (defined, SPLIT, $split, maybeCallNative) { + var internalSplit; + if ( + 'abbc'[$SPLIT](/(b)*/)[1] == 'c' || + 'test'[$SPLIT](/(?:)/, -1)[LENGTH] != 4 || + 'ab'[$SPLIT](/(?:ab)*/)[LENGTH] != 2 || + '.'[$SPLIT](/(.?)(.?)/)[LENGTH] != 4 || + '.'[$SPLIT](/()()/)[LENGTH] > 1 || + ''[$SPLIT](/.?/)[LENGTH] + ) { + // based on es5-shim implementation, need to rework it + internalSplit = function (separator, limit) { + var string = String(this); + if (separator === undefined && limit === 0) return []; + // If `separator` is not a regex, use native split + if (!isRegExp(separator)) return $split.call(string, separator, limit); + var output = []; + var flags = + (separator.ignoreCase ? 'i' : '') + + (separator.multiline ? 'm' : '') + + (separator.unicode ? 'u' : '') + + (separator.sticky ? 'y' : ''); + var lastLastIndex = 0; + var splitLimit = limit === undefined ? MAX_UINT32 : limit >>> 0; + // Make `global` and avoid `lastIndex` issues by working with a copy + var separatorCopy = new RegExp(separator.source, flags + 'g'); + var match, lastIndex, lastLength; + while ((match = regexpExec.call(separatorCopy, string))) { + lastIndex = separatorCopy[LAST_INDEX]; + if (lastIndex > lastLastIndex) { + output.push(string.slice(lastLastIndex, match.index)); + if (match[LENGTH] > 1 && match.index < string[LENGTH]) $push.apply(output, match.slice(1)); + lastLength = match[0][LENGTH]; + lastLastIndex = lastIndex; + if (output[LENGTH] >= splitLimit) break; + } + if (separatorCopy[LAST_INDEX] === match.index) separatorCopy[LAST_INDEX]++; // Avoid an infinite loop + } + if (lastLastIndex === string[LENGTH]) { + if (lastLength || !separatorCopy.test('')) output.push(''); + } else output.push(string.slice(lastLastIndex)); + return output[LENGTH] > splitLimit ? output.slice(0, splitLimit) : output; + }; + // Chakra, V8 + } else if ('0'[$SPLIT](undefined, 0)[LENGTH]) { + internalSplit = function (separator, limit) { + return separator === undefined && limit === 0 ? [] : $split.call(this, separator, limit); + }; + } else { + internalSplit = $split; + } + + return [ + // `String.prototype.split` method + // https://tc39.github.io/ecma262/#sec-string.prototype.split + function split(separator, limit) { + var O = defined(this); + var splitter = separator == undefined ? undefined : separator[SPLIT]; + return splitter !== undefined + ? splitter.call(separator, O, limit) + : internalSplit.call(String(O), separator, limit); + }, + // `RegExp.prototype[@@split]` method + // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@split + // + // NOTE: This cannot be properly polyfilled in engines that don't support + // the 'y' flag. + function (regexp, limit) { + var res = maybeCallNative(internalSplit, regexp, this, limit, internalSplit !== $split); + if (res.done) return res.value; + + var rx = anObject(regexp); + var S = String(this); + var C = speciesConstructor(rx, RegExp); + + var unicodeMatching = rx.unicode; + var flags = + (rx.ignoreCase ? 'i' : '') + + (rx.multiline ? 'm' : '') + + (rx.unicode ? 'u' : '') + + (SUPPORTS_Y ? 'y' : 'g'); + + // ^(? + rx + ) is needed, in combination with some S slicing, to + // simulate the 'y' flag. + var splitter = new C(SUPPORTS_Y ? rx : '^(?:' + rx.source + ')', flags); + var lim = limit === undefined ? MAX_UINT32 : limit >>> 0; + if (lim === 0) return []; + if (S.length === 0) return callRegExpExec(splitter, S) === null ? [S] : []; + var p = 0; + var q = 0; + var A = []; + while (q < S.length) { + splitter.lastIndex = SUPPORTS_Y ? q : 0; + var z = callRegExpExec(splitter, SUPPORTS_Y ? S : S.slice(q)); + var e; + if ( + z === null || + (e = $min(toLength(splitter.lastIndex + (SUPPORTS_Y ? 0 : q)), S.length)) === p + ) { + q = advanceStringIndex(S, q, unicodeMatching); + } else { + A.push(S.slice(p, q)); + if (A.length === lim) return A; + for (var i = 1; i <= z.length - 1; i++) { + A.push(z[i]); + if (A.length === lim) return A; + } + q = p = e; + } + } + A.push(S.slice(p)); + return A; + }, + ]; + }); + + /***/ + }, + /* 381 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var LIBRARY = __webpack_require__(42); + var global = __webpack_require__(3); + var ctx = __webpack_require__(24); + var classof = __webpack_require__(66); + var $export = __webpack_require__(0); + var isObject = __webpack_require__(5); + var aFunction = __webpack_require__(12); + var anInstance = __webpack_require__(57); + var forOf = __webpack_require__(58); + var speciesConstructor = __webpack_require__(78); + var task = __webpack_require__(136).set; + var microtask = __webpack_require__(137)(); + var newPromiseCapabilityModule = __webpack_require__(138); + var perform = __webpack_require__(196); + var userAgent = __webpack_require__(95); + var promiseResolve = __webpack_require__(197); + var PROMISE = 'Promise'; + var TypeError = global.TypeError; + var process = global.process; + var versions = process && process.versions; + var v8 = (versions && versions.v8) || ''; + var $Promise = global[PROMISE]; + var isNode = classof(process) == 'process'; + var empty = function () { + /* empty */ + }; + var Internal, newGenericPromiseCapability, OwnPromiseCapability, Wrapper; + var newPromiseCapability = (newGenericPromiseCapability = newPromiseCapabilityModule.f); + + var USE_NATIVE = !!(function () { + try { + // correct subclassing with @@species support + var promise = $Promise.resolve(1); + var FakePromise = ((promise.constructor = {})[__webpack_require__(6)('species')] = function (exec) { + exec(empty, empty); + }); + // unhandled rejections tracking support, NodeJS Promise without it fails @@species test + return ( + (isNode || typeof PromiseRejectionEvent == 'function') && + promise.then(empty) instanceof FakePromise && + // v8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables + // https://bugs.chromium.org/p/chromium/issues/detail?id=830565 + // we can't detect it synchronously, so just check versions + v8.indexOf('6.6') !== 0 && + userAgent.indexOf('Chrome/66') === -1 + ); + } catch (e) { + /* empty */ + } + })(); + + // helpers + var isThenable = function (it) { + var then; + return isObject(it) && typeof (then = it.then) == 'function' ? then : false; + }; + var notify = function (promise, isReject) { + if (promise._n) return; + promise._n = true; + var chain = promise._c; + microtask(function () { + var value = promise._v; + var ok = promise._s == 1; + var i = 0; + var run = function (reaction) { + var handler = ok ? reaction.ok : reaction.fail; + var resolve = reaction.resolve; + var reject = reaction.reject; + var domain = reaction.domain; + var result, then, exited; + try { + if (handler) { + if (!ok) { + if (promise._h == 2) onHandleUnhandled(promise); + promise._h = 1; + } + if (handler === true) result = value; + else { + if (domain) domain.enter(); + result = handler(value); // may throw + if (domain) { + domain.exit(); + exited = true; + } + } + if (result === reaction.promise) { + reject(TypeError('Promise-chain cycle')); + } else if ((then = isThenable(result))) { + then.call(result, resolve, reject); + } else resolve(result); + } else reject(value); + } catch (e) { + if (domain && !exited) domain.exit(); + reject(e); + } + }; + while (chain.length > i) run(chain[i++]); // variable length - can't use forEach + promise._c = []; + promise._n = false; + if (isReject && !promise._h) onUnhandled(promise); + }); + }; + var onUnhandled = function (promise) { + task.call(global, function () { + var value = promise._v; + var unhandled = isUnhandled(promise); + var result, handler, console; + if (unhandled) { + result = perform(function () { + if (isNode) { + process.emit('unhandledRejection', value, promise); + } else if ((handler = global.onunhandledrejection)) { + handler({ promise: promise, reason: value }); + } else if ((console = global.console) && console.error) { + console.error('Unhandled promise rejection', value); + } + }); + // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should + promise._h = isNode || isUnhandled(promise) ? 2 : 1; + } + promise._a = undefined; + if (unhandled && result.e) throw result.v; + }); + }; + var isUnhandled = function (promise) { + return promise._h !== 1 && (promise._a || promise._c).length === 0; + }; + var onHandleUnhandled = function (promise) { + task.call(global, function () { + var handler; + if (isNode) { + process.emit('rejectionHandled', promise); + } else if ((handler = global.onrejectionhandled)) { + handler({ promise: promise, reason: promise._v }); + } + }); + }; + var $reject = function (value) { + var promise = this; + if (promise._d) return; + promise._d = true; + promise = promise._w || promise; // unwrap + promise._v = value; + promise._s = 2; + if (!promise._a) promise._a = promise._c.slice(); + notify(promise, true); + }; + var $resolve = function (value) { + var promise = this; + var then; + if (promise._d) return; + promise._d = true; + promise = promise._w || promise; // unwrap + try { + if (promise === value) throw TypeError("Promise can't be resolved itself"); + if ((then = isThenable(value))) { + microtask(function () { + var wrapper = { _w: promise, _d: false }; // wrap + try { + then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1)); + } catch (e) { + $reject.call(wrapper, e); + } + }); + } else { + promise._v = value; + promise._s = 1; + notify(promise, false); + } + } catch (e) { + $reject.call({ _w: promise, _d: false }, e); // wrap + } + }; + + // constructor polyfill + if (!USE_NATIVE) { + // 25.4.3.1 Promise(executor) + $Promise = function Promise(executor) { + anInstance(this, $Promise, PROMISE, '_h'); + aFunction(executor); + Internal.call(this); + try { + executor(ctx($resolve, this, 1), ctx($reject, this, 1)); + } catch (err) { + $reject.call(this, err); + } + }; + // eslint-disable-next-line no-unused-vars + Internal = function Promise(executor) { + this._c = []; // <- awaiting reactions + this._a = undefined; // <- checked in isUnhandled reactions + this._s = 0; // <- state + this._d = false; // <- done + this._v = undefined; // <- value + this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled + this._n = false; // <- notify + }; + Internal.prototype = __webpack_require__(59)($Promise.prototype, { + // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected) + then: function then(onFulfilled, onRejected) { + var reaction = newPromiseCapability(speciesConstructor(this, $Promise)); + reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true; + reaction.fail = typeof onRejected == 'function' && onRejected; + reaction.domain = isNode ? process.domain : undefined; + this._c.push(reaction); + if (this._a) this._a.push(reaction); + if (this._s) notify(this, false); + return reaction.promise; + }, + // 25.4.5.1 Promise.prototype.catch(onRejected) + catch: function (onRejected) { + return this.then(undefined, onRejected); + }, + }); + OwnPromiseCapability = function () { + var promise = new Internal(); + this.promise = promise; + this.resolve = ctx($resolve, promise, 1); + this.reject = ctx($reject, promise, 1); + }; + newPromiseCapabilityModule.f = newPromiseCapability = function (C) { + return C === $Promise || C === Wrapper + ? new OwnPromiseCapability(C) + : newGenericPromiseCapability(C); + }; + } + + $export($export.G + $export.W + $export.F * !USE_NATIVE, { Promise: $Promise }); + __webpack_require__(65)($Promise, PROMISE); + __webpack_require__(56)(PROMISE); + Wrapper = __webpack_require__(23)[PROMISE]; + + // statics + $export($export.S + $export.F * !USE_NATIVE, PROMISE, { + // 25.4.4.5 Promise.reject(r) + reject: function reject(r) { + var capability = newPromiseCapability(this); + var $$reject = capability.reject; + $$reject(r); + return capability.promise; + }, + }); + $export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, { + // 25.4.4.6 Promise.resolve(x) + resolve: function resolve(x) { + return promiseResolve(LIBRARY && this === Wrapper ? $Promise : this, x); + }, + }); + $export( + $export.S + + $export.F * + !( + USE_NATIVE && + __webpack_require__(92)(function (iter) { + $Promise.all(iter)['catch'](empty); + }) + ), + PROMISE, + { + // 25.4.4.1 Promise.all(iterable) + all: function all(iterable) { + var C = this; + var capability = newPromiseCapability(C); + var resolve = capability.resolve; + var reject = capability.reject; + var result = perform(function () { + var values = []; + var index = 0; + var remaining = 1; + forOf(iterable, false, function (promise) { + var $index = index++; + var alreadyCalled = false; + values.push(undefined); + remaining++; + C.resolve(promise).then(function (value) { + if (alreadyCalled) return; + alreadyCalled = true; + values[$index] = value; + --remaining || resolve(values); + }, reject); + }); + --remaining || resolve(values); + }); + if (result.e) reject(result.v); + return capability.promise; + }, + // 25.4.4.4 Promise.race(iterable) + race: function race(iterable) { + var C = this; + var capability = newPromiseCapability(C); + var reject = capability.reject; + var result = perform(function () { + forOf(iterable, false, function (promise) { + C.resolve(promise).then(capability.resolve, reject); + }); + }); + if (result.e) reject(result.v); + return capability.promise; + }, + }, + ); + + /***/ + }, + /* 382 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var weak = __webpack_require__(202); + var validate = __webpack_require__(60); + var WEAK_SET = 'WeakSet'; + + // 23.4 WeakSet Objects + __webpack_require__(96)( + WEAK_SET, + function (get) { + return function WeakSet() { + return get(this, arguments.length > 0 ? arguments[0] : undefined); + }; + }, + { + // 23.4.3.1 WeakSet.prototype.add(value) + add: function add(value) { + return weak.def(validate(this, WEAK_SET), value, true); + }, + }, + weak, + false, + true, + ); + + /***/ + }, + /* 383 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0); + var $typed = __webpack_require__(97); + var buffer = __webpack_require__(139); + var anObject = __webpack_require__(2); + var toAbsoluteIndex = __webpack_require__(53); + var toLength = __webpack_require__(7); + var isObject = __webpack_require__(5); + var ArrayBuffer = __webpack_require__(3).ArrayBuffer; + var speciesConstructor = __webpack_require__(78); + var $ArrayBuffer = buffer.ArrayBuffer; + var $DataView = buffer.DataView; + var $isView = $typed.ABV && ArrayBuffer.isView; + var $slice = $ArrayBuffer.prototype.slice; + var VIEW = $typed.VIEW; + var ARRAY_BUFFER = 'ArrayBuffer'; + + $export($export.G + $export.W + $export.F * (ArrayBuffer !== $ArrayBuffer), { + ArrayBuffer: $ArrayBuffer, + }); + + $export($export.S + $export.F * !$typed.CONSTR, ARRAY_BUFFER, { + // 24.1.3.1 ArrayBuffer.isView(arg) + isView: function isView(it) { + return ($isView && $isView(it)) || (isObject(it) && VIEW in it); + }, + }); + + $export( + $export.P + + $export.U + + $export.F * + __webpack_require__(4)(function () { + return !new $ArrayBuffer(2).slice(1, undefined).byteLength; + }), + ARRAY_BUFFER, + { + // 24.1.4.3 ArrayBuffer.prototype.slice(start, end) + slice: function slice(start, end) { + if ($slice !== undefined && end === undefined) return $slice.call(anObject(this), start); // FF fix + var len = anObject(this).byteLength; + var first = toAbsoluteIndex(start, len); + var fin = toAbsoluteIndex(end === undefined ? len : end, len); + var result = new (speciesConstructor(this, $ArrayBuffer))(toLength(fin - first)); + var viewS = new $DataView(this); + var viewT = new $DataView(result); + var index = 0; + while (first < fin) { + viewT.setUint8(index++, viewS.getUint8(first++)); + } + return result; + }, + }, + ); + + __webpack_require__(56)(ARRAY_BUFFER); + + /***/ + }, + /* 384 */ + /***/ function (module, exports, __webpack_require__) { + var $export = __webpack_require__(0); + $export($export.G + $export.W + $export.F * !__webpack_require__(97).ABV, { + DataView: __webpack_require__(139).DataView, + }); + + /***/ + }, + /* 385 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(39)('Int8', 1, function (init) { + return function Int8Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; + }); + + /***/ + }, + /* 386 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(39)('Uint8', 1, function (init) { + return function Uint8Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; + }); + + /***/ + }, + /* 387 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(39)( + 'Uint8', + 1, + function (init) { + return function Uint8ClampedArray(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; + }, + true, + ); + + /***/ + }, + /* 388 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(39)('Int16', 2, function (init) { + return function Int16Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; + }); + + /***/ + }, + /* 389 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(39)('Uint16', 2, function (init) { + return function Uint16Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; + }); + + /***/ + }, + /* 390 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(39)('Int32', 4, function (init) { + return function Int32Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; + }); + + /***/ + }, + /* 391 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(39)('Uint32', 4, function (init) { + return function Uint32Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; + }); + + /***/ + }, + /* 392 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(39)('Float32', 4, function (init) { + return function Float32Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; + }); + + /***/ + }, + /* 393 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(39)('Float64', 8, function (init) { + return function Float64Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; + }); + + /***/ + }, + /* 394 */ + /***/ function (module, exports, __webpack_require__) { + // 26.1.1 Reflect.apply(target, thisArgument, argumentsList) + var $export = __webpack_require__(0); + var aFunction = __webpack_require__(12); + var anObject = __webpack_require__(2); + var rApply = (__webpack_require__(3).Reflect || {}).apply; + var fApply = Function.apply; + // MS Edge argumentsList argument is optional + $export( + $export.S + + $export.F * + !__webpack_require__(4)(function () { + rApply(function () { + /* empty */ + }); + }), + 'Reflect', + { + apply: function apply(target, thisArgument, argumentsList) { + var T = aFunction(target); + var L = anObject(argumentsList); + return rApply ? rApply(T, thisArgument, L) : fApply.call(T, thisArgument, L); + }, + }, + ); + + /***/ + }, + /* 395 */ + /***/ function (module, exports, __webpack_require__) { + // 26.1.2 Reflect.construct(target, argumentsList [, newTarget]) + var $export = __webpack_require__(0); + var create = __webpack_require__(54); + var aFunction = __webpack_require__(12); + var anObject = __webpack_require__(2); + var isObject = __webpack_require__(5); + var fails = __webpack_require__(4); + var bind = __webpack_require__(182); + var rConstruct = (__webpack_require__(3).Reflect || {}).construct; + + // MS Edge supports only 2 arguments and argumentsList argument is optional + // FF Nightly sets third argument as `new.target`, but does not create `this` from it + var NEW_TARGET_BUG = fails(function () { + function F() { + /* empty */ + } + return !( + rConstruct( + function () { + /* empty */ + }, + [], + F, + ) instanceof F + ); + }); + var ARGS_BUG = !fails(function () { + rConstruct(function () { + /* empty */ + }); + }); + + $export($export.S + $export.F * (NEW_TARGET_BUG || ARGS_BUG), 'Reflect', { + construct: function construct(Target, args /* , newTarget */) { + aFunction(Target); + anObject(args); + var newTarget = arguments.length < 3 ? Target : aFunction(arguments[2]); + if (ARGS_BUG && !NEW_TARGET_BUG) return rConstruct(Target, args, newTarget); + if (Target == newTarget) { + // w/o altered newTarget, optimization for 0-4 arguments + switch (args.length) { + case 0: + return new Target(); + case 1: + return new Target(args[0]); + case 2: + return new Target(args[0], args[1]); + case 3: + return new Target(args[0], args[1], args[2]); + case 4: + return new Target(args[0], args[1], args[2], args[3]); + } + // w/o altered newTarget, lot of arguments case + var $args = [null]; + $args.push.apply($args, args); + return new (bind.apply(Target, $args))(); + } + // with altered newTarget, not support built-in constructors + var proto = newTarget.prototype; + var instance = create(isObject(proto) ? proto : Object.prototype); + var result = Function.apply.call(Target, instance, args); + return isObject(result) ? result : instance; + }, + }); + + /***/ + }, + /* 396 */ + /***/ function (module, exports, __webpack_require__) { + // 26.1.3 Reflect.defineProperty(target, propertyKey, attributes) + var dP = __webpack_require__(9); + var $export = __webpack_require__(0); + var anObject = __webpack_require__(2); + var toPrimitive = __webpack_require__(31); + + // MS Edge has broken Reflect.defineProperty - throwing instead of returning false + $export( + $export.S + + $export.F * + __webpack_require__(4)(function () { + // eslint-disable-next-line no-undef + Reflect.defineProperty(dP.f({}, 1, { value: 1 }), 1, { value: 2 }); + }), + 'Reflect', + { + defineProperty: function defineProperty(target, propertyKey, attributes) { + anObject(target); + propertyKey = toPrimitive(propertyKey, true); + anObject(attributes); + try { + dP.f(target, propertyKey, attributes); + return true; + } catch (e) { + return false; + } + }, + }, + ); + + /***/ + }, + /* 397 */ + /***/ function (module, exports, __webpack_require__) { + // 26.1.4 Reflect.deleteProperty(target, propertyKey) + var $export = __webpack_require__(0); + var gOPD = __webpack_require__(20).f; + var anObject = __webpack_require__(2); + + $export($export.S, 'Reflect', { + deleteProperty: function deleteProperty(target, propertyKey) { + var desc = gOPD(anObject(target), propertyKey); + return desc && !desc.configurable ? false : delete target[propertyKey]; + }, + }); + + /***/ + }, + /* 398 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // 26.1.5 Reflect.enumerate(target) + var $export = __webpack_require__(0); + var anObject = __webpack_require__(2); + var Enumerate = function (iterated) { + this._t = anObject(iterated); // target + this._i = 0; // next index + var keys = (this._k = []); // keys + var key; + for (key in iterated) keys.push(key); + }; + __webpack_require__(125)(Enumerate, 'Object', function () { + var that = this; + var keys = that._k; + var key; + do { + if (that._i >= keys.length) return { value: undefined, done: true }; + } while (!((key = keys[that._i++]) in that._t)); + return { value: key, done: false }; + }); + + $export($export.S, 'Reflect', { + enumerate: function enumerate(target) { + return new Enumerate(target); + }, + }); + + /***/ + }, + /* 399 */ + /***/ function (module, exports, __webpack_require__) { + // 26.1.6 Reflect.get(target, propertyKey [, receiver]) + var gOPD = __webpack_require__(20); + var getPrototypeOf = __webpack_require__(21); + var has = __webpack_require__(18); + var $export = __webpack_require__(0); + var isObject = __webpack_require__(5); + var anObject = __webpack_require__(2); + + function get(target, propertyKey /* , receiver */) { + var receiver = arguments.length < 3 ? target : arguments[2]; + var desc, proto; + if (anObject(target) === receiver) return target[propertyKey]; + if ((desc = gOPD.f(target, propertyKey))) + return has(desc, 'value') + ? desc.value + : desc.get !== undefined + ? desc.get.call(receiver) + : undefined; + if (isObject((proto = getPrototypeOf(target)))) return get(proto, propertyKey, receiver); + } + + $export($export.S, 'Reflect', { get: get }); + + /***/ + }, + /* 400 */ + /***/ function (module, exports, __webpack_require__) { + // 26.1.7 Reflect.getOwnPropertyDescriptor(target, propertyKey) + var gOPD = __webpack_require__(20); + var $export = __webpack_require__(0); + var anObject = __webpack_require__(2); + + $export($export.S, 'Reflect', { + getOwnPropertyDescriptor: function getOwnPropertyDescriptor(target, propertyKey) { + return gOPD.f(anObject(target), propertyKey); + }, + }); + + /***/ + }, + /* 401 */ + /***/ function (module, exports, __webpack_require__) { + // 26.1.8 Reflect.getPrototypeOf(target) + var $export = __webpack_require__(0); + var getProto = __webpack_require__(21); + var anObject = __webpack_require__(2); + + $export($export.S, 'Reflect', { + getPrototypeOf: function getPrototypeOf(target) { + return getProto(anObject(target)); + }, + }); + + /***/ + }, + /* 402 */ + /***/ function (module, exports, __webpack_require__) { + // 26.1.9 Reflect.has(target, propertyKey) + var $export = __webpack_require__(0); + + $export($export.S, 'Reflect', { + has: function has(target, propertyKey) { + return propertyKey in target; + }, + }); + + /***/ + }, + /* 403 */ + /***/ function (module, exports, __webpack_require__) { + // 26.1.10 Reflect.isExtensible(target) + var $export = __webpack_require__(0); + var anObject = __webpack_require__(2); + var $isExtensible = Object.isExtensible; + + $export($export.S, 'Reflect', { + isExtensible: function isExtensible(target) { + anObject(target); + return $isExtensible ? $isExtensible(target) : true; + }, + }); + + /***/ + }, + /* 404 */ + /***/ function (module, exports, __webpack_require__) { + // 26.1.11 Reflect.ownKeys(target) + var $export = __webpack_require__(0); + + $export($export.S, 'Reflect', { ownKeys: __webpack_require__(204) }); + + /***/ + }, + /* 405 */ + /***/ function (module, exports, __webpack_require__) { + // 26.1.12 Reflect.preventExtensions(target) + var $export = __webpack_require__(0); + var anObject = __webpack_require__(2); + var $preventExtensions = Object.preventExtensions; + + $export($export.S, 'Reflect', { + preventExtensions: function preventExtensions(target) { + anObject(target); + try { + if ($preventExtensions) $preventExtensions(target); + return true; + } catch (e) { + return false; + } + }, + }); + + /***/ + }, + /* 406 */ + /***/ function (module, exports, __webpack_require__) { + // 26.1.13 Reflect.set(target, propertyKey, V [, receiver]) + var dP = __webpack_require__(9); + var gOPD = __webpack_require__(20); + var getPrototypeOf = __webpack_require__(21); + var has = __webpack_require__(18); + var $export = __webpack_require__(0); + var createDesc = __webpack_require__(50); + var anObject = __webpack_require__(2); + var isObject = __webpack_require__(5); + + function set(target, propertyKey, V /* , receiver */) { + var receiver = arguments.length < 4 ? target : arguments[3]; + var ownDesc = gOPD.f(anObject(target), propertyKey); + var existingDescriptor, proto; + if (!ownDesc) { + if (isObject((proto = getPrototypeOf(target)))) { + return set(proto, propertyKey, V, receiver); + } + ownDesc = createDesc(0); + } + if (has(ownDesc, 'value')) { + if (ownDesc.writable === false || !isObject(receiver)) return false; + if ((existingDescriptor = gOPD.f(receiver, propertyKey))) { + if (existingDescriptor.get || existingDescriptor.set || existingDescriptor.writable === false) + return false; + existingDescriptor.value = V; + dP.f(receiver, propertyKey, existingDescriptor); + } else dP.f(receiver, propertyKey, createDesc(0, V)); + return true; + } + return ownDesc.set === undefined ? false : (ownDesc.set.call(receiver, V), true); + } + + $export($export.S, 'Reflect', { set: set }); + + /***/ + }, + /* 407 */ + /***/ function (module, exports, __webpack_require__) { + // 26.1.14 Reflect.setPrototypeOf(target, proto) + var $export = __webpack_require__(0); + var setProto = __webpack_require__(118); + + if (setProto) + $export($export.S, 'Reflect', { + setPrototypeOf: function setPrototypeOf(target, proto) { + setProto.check(target, proto); + try { + setProto.set(target, proto); + return true; + } catch (e) { + return false; + } + }, + }); + + /***/ + }, + /* 408 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // https://github.com/tc39/Array.prototype.includes + var $export = __webpack_require__(0); + var $includes = __webpack_require__(87)(true); + + $export($export.P, 'Array', { + includes: function includes(el /* , fromIndex = 0 */) { + return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined); + }, + }); + + __webpack_require__(44)('includes'); + + /***/ + }, + /* 409 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // https://tc39.github.io/proposal-flatMap/#sec-Array.prototype.flatMap + var $export = __webpack_require__(0); + var flattenIntoArray = __webpack_require__(205); + var toObject = __webpack_require__(11); + var toLength = __webpack_require__(7); + var aFunction = __webpack_require__(12); + var arraySpeciesCreate = __webpack_require__(131); + + $export($export.P, 'Array', { + flatMap: function flatMap(callbackfn /* , thisArg */) { + var O = toObject(this); + var sourceLen, A; + aFunction(callbackfn); + sourceLen = toLength(O.length); + A = arraySpeciesCreate(O, 0); + flattenIntoArray(A, O, O, sourceLen, 0, 1, callbackfn, arguments[1]); + return A; + }, + }); + + __webpack_require__(44)('flatMap'); + + /***/ + }, + /* 410 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // https://tc39.github.io/proposal-flatMap/#sec-Array.prototype.flatten + var $export = __webpack_require__(0); + var flattenIntoArray = __webpack_require__(205); + var toObject = __webpack_require__(11); + var toLength = __webpack_require__(7); + var toInteger = __webpack_require__(26); + var arraySpeciesCreate = __webpack_require__(131); + + $export($export.P, 'Array', { + flatten: function flatten(/* depthArg = 1 */) { + var depthArg = arguments[0]; + var O = toObject(this); + var sourceLen = toLength(O.length); + var A = arraySpeciesCreate(O, 0); + flattenIntoArray(A, O, O, sourceLen, 0, depthArg === undefined ? 1 : toInteger(depthArg)); + return A; + }, + }); + + __webpack_require__(44)('flatten'); + + /***/ + }, + /* 411 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // https://github.com/mathiasbynens/String.prototype.at + var $export = __webpack_require__(0); + var $at = __webpack_require__(90)(true); + + $export($export.P, 'String', { + at: function at(pos) { + return $at(this, pos); + }, + }); + + /***/ + }, + /* 412 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // https://github.com/tc39/proposal-string-pad-start-end + var $export = __webpack_require__(0); + var $pad = __webpack_require__(206); + var userAgent = __webpack_require__(95); + + // https://github.com/zloirock/core-js/issues/280 + var WEBKIT_BUG = /Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(userAgent); + + $export($export.P + $export.F * WEBKIT_BUG, 'String', { + padStart: function padStart(maxLength /* , fillString = ' ' */) { + return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, true); + }, + }); + + /***/ + }, + /* 413 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // https://github.com/tc39/proposal-string-pad-start-end + var $export = __webpack_require__(0); + var $pad = __webpack_require__(206); + var userAgent = __webpack_require__(95); + + // https://github.com/zloirock/core-js/issues/280 + var WEBKIT_BUG = /Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(userAgent); + + $export($export.P + $export.F * WEBKIT_BUG, 'String', { + padEnd: function padEnd(maxLength /* , fillString = ' ' */) { + return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, false); + }, + }); + + /***/ + }, + /* 414 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // https://github.com/sebmarkbage/ecmascript-string-left-right-trim + __webpack_require__(67)( + 'trimLeft', + function ($trim) { + return function trimLeft() { + return $trim(this, 1); + }; + }, + 'trimStart', + ); + + /***/ + }, + /* 415 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // https://github.com/sebmarkbage/ecmascript-string-left-right-trim + __webpack_require__(67)( + 'trimRight', + function ($trim) { + return function trimRight() { + return $trim(this, 2); + }; + }, + 'trimEnd', + ); + + /***/ + }, + /* 416 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // https://tc39.github.io/String.prototype.matchAll/ + var $export = __webpack_require__(0); + var defined = __webpack_require__(32); + var toLength = __webpack_require__(7); + var isRegExp = __webpack_require__(91); + var getFlags = __webpack_require__(77); + var RegExpProto = RegExp.prototype; + + var $RegExpStringIterator = function (regexp, string) { + this._r = regexp; + this._s = string; + }; + + __webpack_require__(125)($RegExpStringIterator, 'RegExp String', function next() { + var match = this._r.exec(this._s); + return { value: match, done: match === null }; + }); + + $export($export.P, 'String', { + matchAll: function matchAll(regexp) { + defined(this); + if (!isRegExp(regexp)) throw TypeError(regexp + ' is not a regexp!'); + var S = String(this); + var flags = 'flags' in RegExpProto ? String(regexp.flags) : getFlags.call(regexp); + var rx = new RegExp(regexp.source, ~flags.indexOf('g') ? flags : 'g' + flags); + rx.lastIndex = toLength(regexp.lastIndex); + return new $RegExpStringIterator(rx, S); + }, + }); + + /***/ + }, + /* 417 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(114)('asyncIterator'); + + /***/ + }, + /* 418 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(114)('observable'); + + /***/ + }, + /* 419 */ + /***/ function (module, exports, __webpack_require__) { + // https://github.com/tc39/proposal-object-getownpropertydescriptors + var $export = __webpack_require__(0); + var ownKeys = __webpack_require__(204); + var toIObject = __webpack_require__(19); + var gOPD = __webpack_require__(20); + var createProperty = __webpack_require__(129); + + $export($export.S, 'Object', { + getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object) { + var O = toIObject(object); + var getDesc = gOPD.f; + var keys = ownKeys(O); + var result = {}; + var i = 0; + var key, desc; + while (keys.length > i) { + desc = getDesc(O, (key = keys[i++])); + if (desc !== undefined) createProperty(result, key, desc); + } + return result; + }, + }); + + /***/ + }, + /* 420 */ + /***/ function (module, exports, __webpack_require__) { + // https://github.com/tc39/proposal-object-values-entries + var $export = __webpack_require__(0); + var $values = __webpack_require__(207)(false); + + $export($export.S, 'Object', { + values: function values(it) { + return $values(it); + }, + }); + + /***/ + }, + /* 421 */ + /***/ function (module, exports, __webpack_require__) { + // https://github.com/tc39/proposal-object-values-entries + var $export = __webpack_require__(0); + var $entries = __webpack_require__(207)(true); + + $export($export.S, 'Object', { + entries: function entries(it) { + return $entries(it); + }, + }); + + /***/ + }, + /* 422 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0); + var toObject = __webpack_require__(11); + var aFunction = __webpack_require__(12); + var $defineProperty = __webpack_require__(9); + + // B.2.2.2 Object.prototype.__defineGetter__(P, getter) + __webpack_require__(8) && + $export($export.P + __webpack_require__(98), 'Object', { + __defineGetter__: function __defineGetter__(P, getter) { + $defineProperty.f(toObject(this), P, { + get: aFunction(getter), + enumerable: true, + configurable: true, + }); + }, + }); + + /***/ + }, + /* 423 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0); + var toObject = __webpack_require__(11); + var aFunction = __webpack_require__(12); + var $defineProperty = __webpack_require__(9); + + // B.2.2.3 Object.prototype.__defineSetter__(P, setter) + __webpack_require__(8) && + $export($export.P + __webpack_require__(98), 'Object', { + __defineSetter__: function __defineSetter__(P, setter) { + $defineProperty.f(toObject(this), P, { + set: aFunction(setter), + enumerable: true, + configurable: true, + }); + }, + }); + + /***/ + }, + /* 424 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0); + var toObject = __webpack_require__(11); + var toPrimitive = __webpack_require__(31); + var getPrototypeOf = __webpack_require__(21); + var getOwnPropertyDescriptor = __webpack_require__(20).f; + + // B.2.2.4 Object.prototype.__lookupGetter__(P) + __webpack_require__(8) && + $export($export.P + __webpack_require__(98), 'Object', { + __lookupGetter__: function __lookupGetter__(P) { + var O = toObject(this); + var K = toPrimitive(P, true); + var D; + do { + if ((D = getOwnPropertyDescriptor(O, K))) return D.get; + } while ((O = getPrototypeOf(O))); + }, + }); + + /***/ + }, + /* 425 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0); + var toObject = __webpack_require__(11); + var toPrimitive = __webpack_require__(31); + var getPrototypeOf = __webpack_require__(21); + var getOwnPropertyDescriptor = __webpack_require__(20).f; + + // B.2.2.5 Object.prototype.__lookupSetter__(P) + __webpack_require__(8) && + $export($export.P + __webpack_require__(98), 'Object', { + __lookupSetter__: function __lookupSetter__(P) { + var O = toObject(this); + var K = toPrimitive(P, true); + var D; + do { + if ((D = getOwnPropertyDescriptor(O, K))) return D.set; + } while ((O = getPrototypeOf(O))); + }, + }); + + /***/ + }, + /* 426 */ + /***/ function (module, exports, __webpack_require__) { + // https://github.com/DavidBruant/Map-Set.prototype.toJSON + var $export = __webpack_require__(0); + + $export($export.P + $export.R, 'Map', { toJSON: __webpack_require__(208)('Map') }); + + /***/ + }, + /* 427 */ + /***/ function (module, exports, __webpack_require__) { + // https://github.com/DavidBruant/Map-Set.prototype.toJSON + var $export = __webpack_require__(0); + + $export($export.P + $export.R, 'Set', { toJSON: __webpack_require__(208)('Set') }); + + /***/ + }, + /* 428 */ + /***/ function (module, exports, __webpack_require__) { + // https://tc39.github.io/proposal-setmap-offrom/#sec-map.of + __webpack_require__(99)('Map'); + + /***/ + }, + /* 429 */ + /***/ function (module, exports, __webpack_require__) { + // https://tc39.github.io/proposal-setmap-offrom/#sec-set.of + __webpack_require__(99)('Set'); + + /***/ + }, + /* 430 */ + /***/ function (module, exports, __webpack_require__) { + // https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.of + __webpack_require__(99)('WeakMap'); + + /***/ + }, + /* 431 */ + /***/ function (module, exports, __webpack_require__) { + // https://tc39.github.io/proposal-setmap-offrom/#sec-weakset.of + __webpack_require__(99)('WeakSet'); + + /***/ + }, + /* 432 */ + /***/ function (module, exports, __webpack_require__) { + // https://tc39.github.io/proposal-setmap-offrom/#sec-map.from + __webpack_require__(100)('Map'); + + /***/ + }, + /* 433 */ + /***/ function (module, exports, __webpack_require__) { + // https://tc39.github.io/proposal-setmap-offrom/#sec-set.from + __webpack_require__(100)('Set'); + + /***/ + }, + /* 434 */ + /***/ function (module, exports, __webpack_require__) { + // https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.from + __webpack_require__(100)('WeakMap'); + + /***/ + }, + /* 435 */ + /***/ function (module, exports, __webpack_require__) { + // https://tc39.github.io/proposal-setmap-offrom/#sec-weakset.from + __webpack_require__(100)('WeakSet'); + + /***/ + }, + /* 436 */ + /***/ function (module, exports, __webpack_require__) { + // https://github.com/tc39/proposal-global + var $export = __webpack_require__(0); + + $export($export.G, { global: __webpack_require__(3) }); + + /***/ + }, + /* 437 */ + /***/ function (module, exports, __webpack_require__) { + // https://github.com/tc39/proposal-global + var $export = __webpack_require__(0); + + $export($export.S, 'System', { global: __webpack_require__(3) }); + + /***/ + }, + /* 438 */ + /***/ function (module, exports, __webpack_require__) { + // https://github.com/ljharb/proposal-is-error + var $export = __webpack_require__(0); + var cof = __webpack_require__(25); + + $export($export.S, 'Error', { + isError: function isError(it) { + return cof(it) === 'Error'; + }, + }); + + /***/ + }, + /* 439 */ + /***/ function (module, exports, __webpack_require__) { + // https://rwaldron.github.io/proposal-math-extensions/ + var $export = __webpack_require__(0); + + $export($export.S, 'Math', { + clamp: function clamp(x, lower, upper) { + return Math.min(upper, Math.max(lower, x)); + }, + }); + + /***/ + }, + /* 440 */ + /***/ function (module, exports, __webpack_require__) { + // https://rwaldron.github.io/proposal-math-extensions/ + var $export = __webpack_require__(0); + + $export($export.S, 'Math', { DEG_PER_RAD: Math.PI / 180 }); + + /***/ + }, + /* 441 */ + /***/ function (module, exports, __webpack_require__) { + // https://rwaldron.github.io/proposal-math-extensions/ + var $export = __webpack_require__(0); + var RAD_PER_DEG = 180 / Math.PI; + + $export($export.S, 'Math', { + degrees: function degrees(radians) { + return radians * RAD_PER_DEG; + }, + }); + + /***/ + }, + /* 442 */ + /***/ function (module, exports, __webpack_require__) { + // https://rwaldron.github.io/proposal-math-extensions/ + var $export = __webpack_require__(0); + var scale = __webpack_require__(210); + var fround = __webpack_require__(189); + + $export($export.S, 'Math', { + fscale: function fscale(x, inLow, inHigh, outLow, outHigh) { + return fround(scale(x, inLow, inHigh, outLow, outHigh)); + }, + }); + + /***/ + }, + /* 443 */ + /***/ function (module, exports, __webpack_require__) { + // https://gist.github.com/BrendanEich/4294d5c212a6d2254703 + var $export = __webpack_require__(0); + + $export($export.S, 'Math', { + iaddh: function iaddh(x0, x1, y0, y1) { + var $x0 = x0 >>> 0; + var $x1 = x1 >>> 0; + var $y0 = y0 >>> 0; + return ($x1 + (y1 >>> 0) + ((($x0 & $y0) | (($x0 | $y0) & ~(($x0 + $y0) >>> 0))) >>> 31)) | 0; + }, + }); + + /***/ + }, + /* 444 */ + /***/ function (module, exports, __webpack_require__) { + // https://gist.github.com/BrendanEich/4294d5c212a6d2254703 + var $export = __webpack_require__(0); + + $export($export.S, 'Math', { + isubh: function isubh(x0, x1, y0, y1) { + var $x0 = x0 >>> 0; + var $x1 = x1 >>> 0; + var $y0 = y0 >>> 0; + return ($x1 - (y1 >>> 0) - (((~$x0 & $y0) | (~($x0 ^ $y0) & (($x0 - $y0) >>> 0))) >>> 31)) | 0; + }, + }); + + /***/ + }, + /* 445 */ + /***/ function (module, exports, __webpack_require__) { + // https://gist.github.com/BrendanEich/4294d5c212a6d2254703 + var $export = __webpack_require__(0); + + $export($export.S, 'Math', { + imulh: function imulh(u, v) { + var UINT16 = 0xffff; + var $u = +u; + var $v = +v; + var u0 = $u & UINT16; + var v0 = $v & UINT16; + var u1 = $u >> 16; + var v1 = $v >> 16; + var t = ((u1 * v0) >>> 0) + ((u0 * v0) >>> 16); + return u1 * v1 + (t >> 16) + ((((u0 * v1) >>> 0) + (t & UINT16)) >> 16); + }, + }); + + /***/ + }, + /* 446 */ + /***/ function (module, exports, __webpack_require__) { + // https://rwaldron.github.io/proposal-math-extensions/ + var $export = __webpack_require__(0); + + $export($export.S, 'Math', { RAD_PER_DEG: 180 / Math.PI }); + + /***/ + }, + /* 447 */ + /***/ function (module, exports, __webpack_require__) { + // https://rwaldron.github.io/proposal-math-extensions/ + var $export = __webpack_require__(0); + var DEG_PER_RAD = Math.PI / 180; + + $export($export.S, 'Math', { + radians: function radians(degrees) { + return degrees * DEG_PER_RAD; + }, + }); + + /***/ + }, + /* 448 */ + /***/ function (module, exports, __webpack_require__) { + // https://rwaldron.github.io/proposal-math-extensions/ + var $export = __webpack_require__(0); + + $export($export.S, 'Math', { scale: __webpack_require__(210) }); + + /***/ + }, + /* 449 */ + /***/ function (module, exports, __webpack_require__) { + // https://gist.github.com/BrendanEich/4294d5c212a6d2254703 + var $export = __webpack_require__(0); + + $export($export.S, 'Math', { + umulh: function umulh(u, v) { + var UINT16 = 0xffff; + var $u = +u; + var $v = +v; + var u0 = $u & UINT16; + var v0 = $v & UINT16; + var u1 = $u >>> 16; + var v1 = $v >>> 16; + var t = ((u1 * v0) >>> 0) + ((u0 * v0) >>> 16); + return u1 * v1 + (t >>> 16) + ((((u0 * v1) >>> 0) + (t & UINT16)) >>> 16); + }, + }); + + /***/ + }, + /* 450 */ + /***/ function (module, exports, __webpack_require__) { + // http://jfbastien.github.io/papers/Math.signbit.html + var $export = __webpack_require__(0); + + $export($export.S, 'Math', { + signbit: function signbit(x) { + // eslint-disable-next-line no-self-compare + return (x = +x) != x ? x : x == 0 ? 1 / x == Infinity : x > 0; + }, + }); + + /***/ + }, + /* 451 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + // https://github.com/tc39/proposal-promise-finally + + var $export = __webpack_require__(0); + var core = __webpack_require__(23); + var global = __webpack_require__(3); + var speciesConstructor = __webpack_require__(78); + var promiseResolve = __webpack_require__(197); + + $export($export.P + $export.R, 'Promise', { + finally: function (onFinally) { + var C = speciesConstructor(this, core.Promise || global.Promise); + var isFunction = typeof onFinally == 'function'; + return this.then( + isFunction + ? function (x) { + return promiseResolve(C, onFinally()).then(function () { + return x; + }); + } + : onFinally, + isFunction + ? function (e) { + return promiseResolve(C, onFinally()).then(function () { + throw e; + }); + } + : onFinally, + ); + }, + }); + + /***/ + }, + /* 452 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // https://github.com/tc39/proposal-promise-try + var $export = __webpack_require__(0); + var newPromiseCapability = __webpack_require__(138); + var perform = __webpack_require__(196); + + $export($export.S, 'Promise', { + try: function (callbackfn) { + var promiseCapability = newPromiseCapability.f(this); + var result = perform(callbackfn); + (result.e ? promiseCapability.reject : promiseCapability.resolve)(result.v); + return promiseCapability.promise; + }, + }); + + /***/ + }, + /* 453 */ + /***/ function (module, exports, __webpack_require__) { + var metadata = __webpack_require__(40); + var anObject = __webpack_require__(2); + var toMetaKey = metadata.key; + var ordinaryDefineOwnMetadata = metadata.set; + + metadata.exp({ + defineMetadata: function defineMetadata(metadataKey, metadataValue, target, targetKey) { + ordinaryDefineOwnMetadata(metadataKey, metadataValue, anObject(target), toMetaKey(targetKey)); + }, + }); + + /***/ + }, + /* 454 */ + /***/ function (module, exports, __webpack_require__) { + var metadata = __webpack_require__(40); + var anObject = __webpack_require__(2); + var toMetaKey = metadata.key; + var getOrCreateMetadataMap = metadata.map; + var store = metadata.store; + + metadata.exp({ + deleteMetadata: function deleteMetadata(metadataKey, target /* , targetKey */) { + var targetKey = arguments.length < 3 ? undefined : toMetaKey(arguments[2]); + var metadataMap = getOrCreateMetadataMap(anObject(target), targetKey, false); + if (metadataMap === undefined || !metadataMap['delete'](metadataKey)) return false; + if (metadataMap.size) return true; + var targetMetadata = store.get(target); + targetMetadata['delete'](targetKey); + return !!targetMetadata.size || store['delete'](target); + }, + }); + + /***/ + }, + /* 455 */ + /***/ function (module, exports, __webpack_require__) { + var metadata = __webpack_require__(40); + var anObject = __webpack_require__(2); + var getPrototypeOf = __webpack_require__(21); + var ordinaryHasOwnMetadata = metadata.has; + var ordinaryGetOwnMetadata = metadata.get; + var toMetaKey = metadata.key; + + var ordinaryGetMetadata = function (MetadataKey, O, P) { + var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P); + if (hasOwn) return ordinaryGetOwnMetadata(MetadataKey, O, P); + var parent = getPrototypeOf(O); + return parent !== null ? ordinaryGetMetadata(MetadataKey, parent, P) : undefined; + }; + + metadata.exp({ + getMetadata: function getMetadata(metadataKey, target /* , targetKey */) { + return ordinaryGetMetadata( + metadataKey, + anObject(target), + arguments.length < 3 ? undefined : toMetaKey(arguments[2]), + ); + }, + }); + + /***/ + }, + /* 456 */ + /***/ function (module, exports, __webpack_require__) { + var Set = __webpack_require__(200); + var from = __webpack_require__(209); + var metadata = __webpack_require__(40); + var anObject = __webpack_require__(2); + var getPrototypeOf = __webpack_require__(21); + var ordinaryOwnMetadataKeys = metadata.keys; + var toMetaKey = metadata.key; + + var ordinaryMetadataKeys = function (O, P) { + var oKeys = ordinaryOwnMetadataKeys(O, P); + var parent = getPrototypeOf(O); + if (parent === null) return oKeys; + var pKeys = ordinaryMetadataKeys(parent, P); + return pKeys.length ? (oKeys.length ? from(new Set(oKeys.concat(pKeys))) : pKeys) : oKeys; + }; + + metadata.exp({ + getMetadataKeys: function getMetadataKeys(target /* , targetKey */) { + return ordinaryMetadataKeys( + anObject(target), + arguments.length < 2 ? undefined : toMetaKey(arguments[1]), + ); + }, + }); + + /***/ + }, + /* 457 */ + /***/ function (module, exports, __webpack_require__) { + var metadata = __webpack_require__(40); + var anObject = __webpack_require__(2); + var ordinaryGetOwnMetadata = metadata.get; + var toMetaKey = metadata.key; + + metadata.exp({ + getOwnMetadata: function getOwnMetadata(metadataKey, target /* , targetKey */) { + return ordinaryGetOwnMetadata( + metadataKey, + anObject(target), + arguments.length < 3 ? undefined : toMetaKey(arguments[2]), + ); + }, + }); + + /***/ + }, + /* 458 */ + /***/ function (module, exports, __webpack_require__) { + var metadata = __webpack_require__(40); + var anObject = __webpack_require__(2); + var ordinaryOwnMetadataKeys = metadata.keys; + var toMetaKey = metadata.key; + + metadata.exp({ + getOwnMetadataKeys: function getOwnMetadataKeys(target /* , targetKey */) { + return ordinaryOwnMetadataKeys( + anObject(target), + arguments.length < 2 ? undefined : toMetaKey(arguments[1]), + ); + }, + }); + + /***/ + }, + /* 459 */ + /***/ function (module, exports, __webpack_require__) { + var metadata = __webpack_require__(40); + var anObject = __webpack_require__(2); + var getPrototypeOf = __webpack_require__(21); + var ordinaryHasOwnMetadata = metadata.has; + var toMetaKey = metadata.key; + + var ordinaryHasMetadata = function (MetadataKey, O, P) { + var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P); + if (hasOwn) return true; + var parent = getPrototypeOf(O); + return parent !== null ? ordinaryHasMetadata(MetadataKey, parent, P) : false; + }; + + metadata.exp({ + hasMetadata: function hasMetadata(metadataKey, target /* , targetKey */) { + return ordinaryHasMetadata( + metadataKey, + anObject(target), + arguments.length < 3 ? undefined : toMetaKey(arguments[2]), + ); + }, + }); + + /***/ + }, + /* 460 */ + /***/ function (module, exports, __webpack_require__) { + var metadata = __webpack_require__(40); + var anObject = __webpack_require__(2); + var ordinaryHasOwnMetadata = metadata.has; + var toMetaKey = metadata.key; + + metadata.exp({ + hasOwnMetadata: function hasOwnMetadata(metadataKey, target /* , targetKey */) { + return ordinaryHasOwnMetadata( + metadataKey, + anObject(target), + arguments.length < 3 ? undefined : toMetaKey(arguments[2]), + ); + }, + }); + + /***/ + }, + /* 461 */ + /***/ function (module, exports, __webpack_require__) { + var $metadata = __webpack_require__(40); + var anObject = __webpack_require__(2); + var aFunction = __webpack_require__(12); + var toMetaKey = $metadata.key; + var ordinaryDefineOwnMetadata = $metadata.set; + + $metadata.exp({ + metadata: function metadata(metadataKey, metadataValue) { + return function decorator(target, targetKey) { + ordinaryDefineOwnMetadata( + metadataKey, + metadataValue, + (targetKey !== undefined ? anObject : aFunction)(target), + toMetaKey(targetKey), + ); + }; + }, + }); + + /***/ + }, + /* 462 */ + /***/ function (module, exports, __webpack_require__) { + // https://github.com/rwaldron/tc39-notes/blob/master/es6/2014-09/sept-25.md#510-globalasap-for-enqueuing-a-microtask + var $export = __webpack_require__(0); + var microtask = __webpack_require__(137)(); + var process = __webpack_require__(3).process; + var isNode = __webpack_require__(25)(process) == 'process'; + + $export($export.G, { + asap: function asap(fn) { + var domain = isNode && process.domain; + microtask(domain ? domain.bind(fn) : fn); + }, + }); + + /***/ + }, + /* 463 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // https://github.com/zenparsing/es-observable + var $export = __webpack_require__(0); + var global = __webpack_require__(3); + var core = __webpack_require__(23); + var microtask = __webpack_require__(137)(); + var OBSERVABLE = __webpack_require__(6)('observable'); + var aFunction = __webpack_require__(12); + var anObject = __webpack_require__(2); + var anInstance = __webpack_require__(57); + var redefineAll = __webpack_require__(59); + var hide = __webpack_require__(15); + var forOf = __webpack_require__(58); + var RETURN = forOf.RETURN; + + var getMethod = function (fn) { + return fn == null ? undefined : aFunction(fn); + }; + + var cleanupSubscription = function (subscription) { + var cleanup = subscription._c; + if (cleanup) { + subscription._c = undefined; + cleanup(); + } + }; + + var subscriptionClosed = function (subscription) { + return subscription._o === undefined; + }; + + var closeSubscription = function (subscription) { + if (!subscriptionClosed(subscription)) { + subscription._o = undefined; + cleanupSubscription(subscription); + } + }; + + var Subscription = function (observer, subscriber) { + anObject(observer); + this._c = undefined; + this._o = observer; + observer = new SubscriptionObserver(this); + try { + var cleanup = subscriber(observer); + var subscription = cleanup; + if (cleanup != null) { + if (typeof cleanup.unsubscribe === 'function') + cleanup = function () { + subscription.unsubscribe(); + }; + else aFunction(cleanup); + this._c = cleanup; + } + } catch (e) { + observer.error(e); + return; + } + if (subscriptionClosed(this)) cleanupSubscription(this); + }; + + Subscription.prototype = redefineAll( + {}, + { + unsubscribe: function unsubscribe() { + closeSubscription(this); + }, + }, + ); + + var SubscriptionObserver = function (subscription) { + this._s = subscription; + }; + + SubscriptionObserver.prototype = redefineAll( + {}, + { + next: function next(value) { + var subscription = this._s; + if (!subscriptionClosed(subscription)) { + var observer = subscription._o; + try { + var m = getMethod(observer.next); + if (m) return m.call(observer, value); + } catch (e) { + try { + closeSubscription(subscription); + } finally { + throw e; + } + } + } + }, + error: function error(value) { + var subscription = this._s; + if (subscriptionClosed(subscription)) throw value; + var observer = subscription._o; + subscription._o = undefined; + try { + var m = getMethod(observer.error); + if (!m) throw value; + value = m.call(observer, value); + } catch (e) { + try { + cleanupSubscription(subscription); + } finally { + throw e; + } + } + cleanupSubscription(subscription); + return value; + }, + complete: function complete(value) { + var subscription = this._s; + if (!subscriptionClosed(subscription)) { + var observer = subscription._o; + subscription._o = undefined; + try { + var m = getMethod(observer.complete); + value = m ? m.call(observer, value) : undefined; + } catch (e) { + try { + cleanupSubscription(subscription); + } finally { + throw e; + } + } + cleanupSubscription(subscription); + return value; + } + }, + }, + ); + + var $Observable = function Observable(subscriber) { + anInstance(this, $Observable, 'Observable', '_f')._f = aFunction(subscriber); + }; + + redefineAll($Observable.prototype, { + subscribe: function subscribe(observer) { + return new Subscription(observer, this._f); + }, + forEach: function forEach(fn) { + var that = this; + return new (core.Promise || global.Promise)(function (resolve, reject) { + aFunction(fn); + var subscription = that.subscribe({ + next: function (value) { + try { + return fn(value); + } catch (e) { + reject(e); + subscription.unsubscribe(); + } + }, + error: reject, + complete: resolve, + }); + }); + }, + }); + + redefineAll($Observable, { + from: function from(x) { + var C = typeof this === 'function' ? this : $Observable; + var method = getMethod(anObject(x)[OBSERVABLE]); + if (method) { + var observable = anObject(method.call(x)); + return observable.constructor === C + ? observable + : new C(function (observer) { + return observable.subscribe(observer); + }); + } + return new C(function (observer) { + var done = false; + microtask(function () { + if (!done) { + try { + if ( + forOf(x, false, function (it) { + observer.next(it); + if (done) return RETURN; + }) === RETURN + ) + return; + } catch (e) { + if (done) throw e; + observer.error(e); + return; + } + observer.complete(); + } + }); + return function () { + done = true; + }; + }); + }, + of: function of() { + for (var i = 0, l = arguments.length, items = new Array(l); i < l; ) items[i] = arguments[i++]; + return new (typeof this === 'function' ? this : $Observable)(function (observer) { + var done = false; + microtask(function () { + if (!done) { + for (var j = 0; j < items.length; ++j) { + observer.next(items[j]); + if (done) return; + } + observer.complete(); + } + }); + return function () { + done = true; + }; + }); + }, + }); + + hide($Observable.prototype, OBSERVABLE, function () { + return this; + }); + + $export($export.G, { Observable: $Observable }); + + __webpack_require__(56)('Observable'); + + /***/ + }, + /* 464 */ + /***/ function (module, exports, __webpack_require__) { + // ie9- setTimeout & setInterval additional parameters fix + var global = __webpack_require__(3); + var $export = __webpack_require__(0); + var userAgent = __webpack_require__(95); + var slice = [].slice; + var MSIE = /MSIE .\./.test(userAgent); // <- dirty ie9- check + var wrap = function (set) { + return function (fn, time /* , ...args */) { + var boundArgs = arguments.length > 2; + var args = boundArgs ? slice.call(arguments, 2) : false; + return set( + boundArgs + ? function () { + // eslint-disable-next-line no-new-func + (typeof fn == 'function' ? fn : Function(fn)).apply(this, args); + } + : fn, + time, + ); + }; + }; + $export($export.G + $export.B + $export.F * MSIE, { + setTimeout: wrap(global.setTimeout), + setInterval: wrap(global.setInterval), + }); + + /***/ + }, + /* 465 */ + /***/ function (module, exports, __webpack_require__) { + var $export = __webpack_require__(0); + var $task = __webpack_require__(136); + $export($export.G + $export.B, { + setImmediate: $task.set, + clearImmediate: $task.clear, + }); + + /***/ + }, + /* 466 */ + /***/ function (module, exports, __webpack_require__) { + var $iterators = __webpack_require__(133); + var getKeys = __webpack_require__(52); + var redefine = __webpack_require__(16); + var global = __webpack_require__(3); + var hide = __webpack_require__(15); + var Iterators = __webpack_require__(68); + var wks = __webpack_require__(6); + var ITERATOR = wks('iterator'); + var TO_STRING_TAG = wks('toStringTag'); + var ArrayValues = Iterators.Array; + + var DOMIterables = { + CSSRuleList: true, // TODO: Not spec compliant, should be false. + CSSStyleDeclaration: false, + CSSValueList: false, + ClientRectList: false, + DOMRectList: false, + DOMStringList: false, + DOMTokenList: true, + DataTransferItemList: false, + FileList: false, + HTMLAllCollection: false, + HTMLCollection: false, + HTMLFormElement: false, + HTMLSelectElement: false, + MediaList: true, // TODO: Not spec compliant, should be false. + MimeTypeArray: false, + NamedNodeMap: false, + NodeList: true, + PaintRequestList: false, + Plugin: false, + PluginArray: false, + SVGLengthList: false, + SVGNumberList: false, + SVGPathSegList: false, + SVGPointList: false, + SVGStringList: false, + SVGTransformList: false, + SourceBufferList: false, + StyleSheetList: true, // TODO: Not spec compliant, should be false. + TextTrackCueList: false, + TextTrackList: false, + TouchList: false, + }; + + for (var collections = getKeys(DOMIterables), i = 0; i < collections.length; i++) { + var NAME = collections[i]; + var explicit = DOMIterables[NAME]; + var Collection = global[NAME]; + var proto = Collection && Collection.prototype; + var key; + if (proto) { + if (!proto[ITERATOR]) hide(proto, ITERATOR, ArrayValues); + if (!proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME); + Iterators[NAME] = ArrayValues; + if (explicit) for (key in $iterators) if (!proto[key]) redefine(proto, key, $iterators[key], true); + } + } + + /***/ + }, + /* 467 */ + /***/ function (module, exports, __webpack_require__) { + /* WEBPACK VAR INJECTION */ (function (global) { + /** + * Copyright (c) 2014, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * https://raw.github.com/facebook/regenerator/master/LICENSE file. An + * additional grant of patent rights can be found in the PATENTS file in + * the same directory. + */ + + !(function (global) { + 'use strict'; + + var Op = Object.prototype; + var hasOwn = Op.hasOwnProperty; + var undefined; // More compressible than void 0. + var $Symbol = typeof Symbol === 'function' ? Symbol : {}; + var iteratorSymbol = $Symbol.iterator || '@@iterator'; + var asyncIteratorSymbol = $Symbol.asyncIterator || '@@asyncIterator'; + var toStringTagSymbol = $Symbol.toStringTag || '@@toStringTag'; + + var inModule = typeof module === 'object'; + var runtime = global.regeneratorRuntime; + if (runtime) { + if (inModule) { + // If regeneratorRuntime is defined globally and we're in a module, + // make the exports object identical to regeneratorRuntime. + module.exports = runtime; + } + // Don't bother evaluating the rest of this file if the runtime was + // already defined globally. + return; + } + + // Define the runtime globally (as expected by generated code) as either + // module.exports (if we're in a module) or a new, empty object. + runtime = global.regeneratorRuntime = inModule ? module.exports : {}; + + function wrap(innerFn, outerFn, self, tryLocsList) { + // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator. + var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator; + var generator = Object.create(protoGenerator.prototype); + var context = new Context(tryLocsList || []); + + // The ._invoke method unifies the implementations of the .next, + // .throw, and .return methods. + generator._invoke = makeInvokeMethod(innerFn, self, context); + + return generator; + } + runtime.wrap = wrap; + + // Try/catch helper to minimize deoptimizations. Returns a completion + // record like context.tryEntries[i].completion. This interface could + // have been (and was previously) designed to take a closure to be + // invoked without arguments, but in all the cases we care about we + // already have an existing method we want to call, so there's no need + // to create a new function object. We can even get away with assuming + // the method takes exactly one argument, since that happens to be true + // in every case, so we don't have to touch the arguments object. The + // only additional allocation required is the completion record, which + // has a stable shape and so hopefully should be cheap to allocate. + function tryCatch(fn, obj, arg) { + try { + return { type: 'normal', arg: fn.call(obj, arg) }; + } catch (err) { + return { type: 'throw', arg: err }; + } + } + + var GenStateSuspendedStart = 'suspendedStart'; + var GenStateSuspendedYield = 'suspendedYield'; + var GenStateExecuting = 'executing'; + var GenStateCompleted = 'completed'; + + // Returning this object from the innerFn has the same effect as + // breaking out of the dispatch switch statement. + var ContinueSentinel = {}; + + // Dummy constructor functions that we use as the .constructor and + // .constructor.prototype properties for functions that return Generator + // objects. For full spec compliance, you may wish to configure your + // minifier not to mangle the names of these two functions. + function Generator() {} + function GeneratorFunction() {} + function GeneratorFunctionPrototype() {} + + // This is a polyfill for %IteratorPrototype% for environments that + // don't natively support it. + var IteratorPrototype = {}; + IteratorPrototype[iteratorSymbol] = function () { + return this; + }; + + var getProto = Object.getPrototypeOf; + var NativeIteratorPrototype = getProto && getProto(getProto(values([]))); + if ( + NativeIteratorPrototype && + NativeIteratorPrototype !== Op && + hasOwn.call(NativeIteratorPrototype, iteratorSymbol) + ) { + // This environment has a native %IteratorPrototype%; use it instead + // of the polyfill. + IteratorPrototype = NativeIteratorPrototype; + } + + var Gp = + (GeneratorFunctionPrototype.prototype = + Generator.prototype = + Object.create(IteratorPrototype)); + GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype; + GeneratorFunctionPrototype.constructor = GeneratorFunction; + GeneratorFunctionPrototype[toStringTagSymbol] = GeneratorFunction.displayName = 'GeneratorFunction'; + + // Helper for defining the .next, .throw, and .return methods of the + // Iterator interface in terms of a single ._invoke method. + function defineIteratorMethods(prototype) { + ['next', 'throw', 'return'].forEach(function (method) { + prototype[method] = function (arg) { + return this._invoke(method, arg); + }; + }); + } + + runtime.isGeneratorFunction = function (genFun) { + var ctor = typeof genFun === 'function' && genFun.constructor; + return ctor + ? ctor === GeneratorFunction || + // For the native GeneratorFunction constructor, the best we can + // do is to check its .name property. + (ctor.displayName || ctor.name) === 'GeneratorFunction' + : false; + }; + + runtime.mark = function (genFun) { + if (Object.setPrototypeOf) { + Object.setPrototypeOf(genFun, GeneratorFunctionPrototype); + } else { + genFun.__proto__ = GeneratorFunctionPrototype; + if (!(toStringTagSymbol in genFun)) { + genFun[toStringTagSymbol] = 'GeneratorFunction'; + } + } + genFun.prototype = Object.create(Gp); + return genFun; + }; + + // Within the body of any async function, `await x` is transformed to + // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test + // `hasOwn.call(value, "__await")` to determine if the yielded value is + // meant to be awaited. + runtime.awrap = function (arg) { + return { __await: arg }; + }; + + function AsyncIterator(generator) { + function invoke(method, arg, resolve, reject) { + var record = tryCatch(generator[method], generator, arg); + if (record.type === 'throw') { + reject(record.arg); + } else { + var result = record.arg; + var value = result.value; + if (value && typeof value === 'object' && hasOwn.call(value, '__await')) { + return Promise.resolve(value.__await).then( + function (value) { + invoke('next', value, resolve, reject); + }, + function (err) { + invoke('throw', err, resolve, reject); + }, + ); + } + + return Promise.resolve(value).then(function (unwrapped) { + // When a yielded Promise is resolved, its final value becomes + // the .value of the Promise<{value,done}> result for the + // current iteration. If the Promise is rejected, however, the + // result for this iteration will be rejected with the same + // reason. Note that rejections of yielded Promises are not + // thrown back into the generator function, as is the case + // when an awaited Promise is rejected. This difference in + // behavior between yield and await is important, because it + // allows the consumer to decide what to do with the yielded + // rejection (swallow it and continue, manually .throw it back + // into the generator, abandon iteration, whatever). With + // await, by contrast, there is no opportunity to examine the + // rejection reason outside the generator function, so the + // only option is to throw it from the await expression, and + // let the generator function handle the exception. + result.value = unwrapped; + resolve(result); + }, reject); + } + } + + if (typeof global.process === 'object' && global.process.domain) { + invoke = global.process.domain.bind(invoke); + } + + var previousPromise; + + function enqueue(method, arg) { + function callInvokeWithMethodAndArg() { + return new Promise(function (resolve, reject) { + invoke(method, arg, resolve, reject); + }); + } + + return (previousPromise = + // If enqueue has been called before, then we want to wait until + // all previous Promises have been resolved before calling invoke, + // so that results are always delivered in the correct order. If + // enqueue has not been called before, then it is important to + // call invoke immediately, without waiting on a callback to fire, + // so that the async generator function has the opportunity to do + // any necessary setup in a predictable way. This predictability + // is why the Promise constructor synchronously invokes its + // executor callback, and why async functions synchronously + // execute code before the first await. Since we implement simple + // async functions in terms of async generators, it is especially + // important to get this right, even though it requires care. + previousPromise + ? previousPromise.then( + callInvokeWithMethodAndArg, + // Avoid propagating failures to Promises returned by later + // invocations of the iterator. + callInvokeWithMethodAndArg, + ) + : callInvokeWithMethodAndArg()); + } + + // Define the unified helper method that is used to implement .next, + // .throw, and .return (see defineIteratorMethods). + this._invoke = enqueue; + } + + defineIteratorMethods(AsyncIterator.prototype); + AsyncIterator.prototype[asyncIteratorSymbol] = function () { + return this; + }; + runtime.AsyncIterator = AsyncIterator; + + // Note that simple async functions are implemented on top of + // AsyncIterator objects; they just return a Promise for the value of + // the final result produced by the iterator. + runtime.async = function (innerFn, outerFn, self, tryLocsList) { + var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList)); + + return runtime.isGeneratorFunction(outerFn) + ? iter // If outerFn is a generator, return the full iterator. + : iter.next().then(function (result) { + return result.done ? result.value : iter.next(); + }); + }; + + function makeInvokeMethod(innerFn, self, context) { + var state = GenStateSuspendedStart; + + return function invoke(method, arg) { + if (state === GenStateExecuting) { + throw new Error('Generator is already running'); + } + + if (state === GenStateCompleted) { + if (method === 'throw') { + throw arg; + } + + // Be forgiving, per 25.3.3.3.3 of the spec: + // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume + return doneResult(); + } + + context.method = method; + context.arg = arg; + + while (true) { + var delegate = context.delegate; + if (delegate) { + var delegateResult = maybeInvokeDelegate(delegate, context); + if (delegateResult) { + if (delegateResult === ContinueSentinel) continue; + return delegateResult; + } + } + + if (context.method === 'next') { + // Setting context._sent for legacy support of Babel's + // function.sent implementation. + context.sent = context._sent = context.arg; + } else if (context.method === 'throw') { + if (state === GenStateSuspendedStart) { + state = GenStateCompleted; + throw context.arg; + } + + context.dispatchException(context.arg); + } else if (context.method === 'return') { + context.abrupt('return', context.arg); + } + + state = GenStateExecuting; + + var record = tryCatch(innerFn, self, context); + if (record.type === 'normal') { + // If an exception is thrown from innerFn, we leave state === + // GenStateExecuting and loop back for another invocation. + state = context.done ? GenStateCompleted : GenStateSuspendedYield; + + if (record.arg === ContinueSentinel) { + continue; + } + + return { + value: record.arg, + done: context.done, + }; + } else if (record.type === 'throw') { + state = GenStateCompleted; + // Dispatch the exception by looping back around to the + // context.dispatchException(context.arg) call above. + context.method = 'throw'; + context.arg = record.arg; + } + } + }; + } + + // Call delegate.iterator[context.method](context.arg) and handle the + // result, either by returning a { value, done } result from the + // delegate iterator, or by modifying context.method and context.arg, + // setting context.delegate to null, and returning the ContinueSentinel. + function maybeInvokeDelegate(delegate, context) { + var method = delegate.iterator[context.method]; + if (method === undefined) { + // A .throw or .return when the delegate iterator has no .throw + // method always terminates the yield* loop. + context.delegate = null; + + if (context.method === 'throw') { + if (delegate.iterator.return) { + // If the delegate iterator has a return method, give it a + // chance to clean up. + context.method = 'return'; + context.arg = undefined; + maybeInvokeDelegate(delegate, context); + + if (context.method === 'throw') { + // If maybeInvokeDelegate(context) changed context.method from + // "return" to "throw", let that override the TypeError below. + return ContinueSentinel; + } + } + + context.method = 'throw'; + context.arg = new TypeError("The iterator does not provide a 'throw' method"); + } + + return ContinueSentinel; + } + + var record = tryCatch(method, delegate.iterator, context.arg); + + if (record.type === 'throw') { + context.method = 'throw'; + context.arg = record.arg; + context.delegate = null; + return ContinueSentinel; + } + + var info = record.arg; + + if (!info) { + context.method = 'throw'; + context.arg = new TypeError('iterator result is not an object'); + context.delegate = null; + return ContinueSentinel; + } + + if (info.done) { + // Assign the result of the finished delegate to the temporary + // variable specified by delegate.resultName (see delegateYield). + context[delegate.resultName] = info.value; + + // Resume execution at the desired location (see delegateYield). + context.next = delegate.nextLoc; + + // If context.method was "throw" but the delegate handled the + // exception, let the outer generator proceed normally. If + // context.method was "next", forget context.arg since it has been + // "consumed" by the delegate iterator. If context.method was + // "return", allow the original .return call to continue in the + // outer generator. + if (context.method !== 'return') { + context.method = 'next'; + context.arg = undefined; + } + } else { + // Re-yield the result returned by the delegate method. + return info; + } + + // The delegate iterator is finished, so forget it and continue with + // the outer generator. + context.delegate = null; + return ContinueSentinel; + } + + // Define Generator.prototype.{next,throw,return} in terms of the + // unified ._invoke helper method. + defineIteratorMethods(Gp); + + Gp[toStringTagSymbol] = 'Generator'; + + // A Generator should always return itself as the iterator object when the + // @@iterator function is called on it. Some browsers' implementations of the + // iterator prototype chain incorrectly implement this, causing the Generator + // object to not be returned from this call. This ensures that doesn't happen. + // See https://github.com/facebook/regenerator/issues/274 for more details. + Gp[iteratorSymbol] = function () { + return this; + }; + + Gp.toString = function () { + return '[object Generator]'; + }; + + function pushTryEntry(locs) { + var entry = { tryLoc: locs[0] }; + + if (1 in locs) { + entry.catchLoc = locs[1]; + } + + if (2 in locs) { + entry.finallyLoc = locs[2]; + entry.afterLoc = locs[3]; + } + + this.tryEntries.push(entry); + } + + function resetTryEntry(entry) { + var record = entry.completion || {}; + record.type = 'normal'; + delete record.arg; + entry.completion = record; + } + + function Context(tryLocsList) { + // The root entry object (effectively a try statement without a catch + // or a finally block) gives us a place to store values thrown from + // locations where there is no enclosing try statement. + this.tryEntries = [{ tryLoc: 'root' }]; + tryLocsList.forEach(pushTryEntry, this); + this.reset(true); + } + + runtime.keys = function (object) { + var keys = []; + for (var key in object) { + keys.push(key); + } + keys.reverse(); + + // Rather than returning an object with a next method, we keep + // things simple and return the next function itself. + return function next() { + while (keys.length) { + var key = keys.pop(); + if (key in object) { + next.value = key; + next.done = false; + return next; + } + } + + // To avoid creating an additional object, we just hang the .value + // and .done properties off the next function object itself. This + // also ensures that the minifier will not anonymize the function. + next.done = true; + return next; + }; + }; + + function values(iterable) { + if (iterable) { + var iteratorMethod = iterable[iteratorSymbol]; + if (iteratorMethod) { + return iteratorMethod.call(iterable); + } + + if (typeof iterable.next === 'function') { + return iterable; + } + + if (!isNaN(iterable.length)) { + var i = -1, + next = function next() { + while (++i < iterable.length) { + if (hasOwn.call(iterable, i)) { + next.value = iterable[i]; + next.done = false; + return next; + } + } + + next.value = undefined; + next.done = true; + + return next; + }; + + return (next.next = next); + } + } + + // Return an iterator with no values. + return { next: doneResult }; + } + runtime.values = values; + + function doneResult() { + return { value: undefined, done: true }; + } + + Context.prototype = { + constructor: Context, + + reset: function (skipTempReset) { + this.prev = 0; + this.next = 0; + // Resetting context._sent for legacy support of Babel's + // function.sent implementation. + this.sent = this._sent = undefined; + this.done = false; + this.delegate = null; + + this.method = 'next'; + this.arg = undefined; + + this.tryEntries.forEach(resetTryEntry); + + if (!skipTempReset) { + for (var name in this) { + // Not sure about the optimal order of these conditions: + if (name.charAt(0) === 't' && hasOwn.call(this, name) && !isNaN(+name.slice(1))) { + this[name] = undefined; + } + } + } + }, + + stop: function () { + this.done = true; + + var rootEntry = this.tryEntries[0]; + var rootRecord = rootEntry.completion; + if (rootRecord.type === 'throw') { + throw rootRecord.arg; + } + + return this.rval; + }, + + dispatchException: function (exception) { + if (this.done) { + throw exception; + } + + var context = this; + function handle(loc, caught) { + record.type = 'throw'; + record.arg = exception; + context.next = loc; + + if (caught) { + // If the dispatched exception was caught by a catch block, + // then let that catch block handle the exception normally. + context.method = 'next'; + context.arg = undefined; + } + + return !!caught; + } + + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + var record = entry.completion; + + if (entry.tryLoc === 'root') { + // Exception thrown outside of any try block that could handle + // it, so set the completion value of the entire function to + // throw the exception. + return handle('end'); + } + + if (entry.tryLoc <= this.prev) { + var hasCatch = hasOwn.call(entry, 'catchLoc'); + var hasFinally = hasOwn.call(entry, 'finallyLoc'); + + if (hasCatch && hasFinally) { + if (this.prev < entry.catchLoc) { + return handle(entry.catchLoc, true); + } else if (this.prev < entry.finallyLoc) { + return handle(entry.finallyLoc); + } + } else if (hasCatch) { + if (this.prev < entry.catchLoc) { + return handle(entry.catchLoc, true); + } + } else if (hasFinally) { + if (this.prev < entry.finallyLoc) { + return handle(entry.finallyLoc); + } + } else { + throw new Error('try statement without catch or finally'); + } + } + } + }, + + abrupt: function (type, arg) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + if ( + entry.tryLoc <= this.prev && + hasOwn.call(entry, 'finallyLoc') && + this.prev < entry.finallyLoc + ) { + var finallyEntry = entry; + break; + } + } + + if ( + finallyEntry && + (type === 'break' || type === 'continue') && + finallyEntry.tryLoc <= arg && + arg <= finallyEntry.finallyLoc + ) { + // Ignore the finally entry if control is not jumping to a + // location outside the try/catch block. + finallyEntry = null; + } + + var record = finallyEntry ? finallyEntry.completion : {}; + record.type = type; + record.arg = arg; + + if (finallyEntry) { + this.method = 'next'; + this.next = finallyEntry.finallyLoc; + return ContinueSentinel; + } + + return this.complete(record); + }, + + complete: function (record, afterLoc) { + if (record.type === 'throw') { + throw record.arg; + } + + if (record.type === 'break' || record.type === 'continue') { + this.next = record.arg; + } else if (record.type === 'return') { + this.rval = this.arg = record.arg; + this.method = 'return'; + this.next = 'end'; + } else if (record.type === 'normal' && afterLoc) { + this.next = afterLoc; + } + + return ContinueSentinel; + }, + + finish: function (finallyLoc) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + if (entry.finallyLoc === finallyLoc) { + this.complete(entry.completion, entry.afterLoc); + resetTryEntry(entry); + return ContinueSentinel; + } + } + }, + + catch: function (tryLoc) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + if (entry.tryLoc === tryLoc) { + var record = entry.completion; + if (record.type === 'throw') { + var thrown = record.arg; + resetTryEntry(entry); + } + return thrown; + } + } + + // The context.catch method must only be called with a location + // argument that corresponds to a known catch block. + throw new Error('illegal catch attempt'); + }, + + delegateYield: function (iterable, resultName, nextLoc) { + this.delegate = { + iterator: values(iterable), + resultName: resultName, + nextLoc: nextLoc, + }; + + if (this.method === 'next') { + // Deliberately forget the last sent value so that we don't + // accidentally pass it on to the delegate. + this.arg = undefined; + } + + return ContinueSentinel; + }, + }; + })( + // Among the various tricks for obtaining a reference to the global + // object, this seems to be the most reliable technique that does not + // use indirect eval (which violates Content Security Policy). + typeof global === 'object' + ? global + : typeof window === 'object' + ? window + : typeof self === 'object' + ? self + : this, + ); + + /* WEBPACK VAR INJECTION */ + }).call(exports, __webpack_require__(38)); + + /***/ + }, + /* 468 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(469); + module.exports = __webpack_require__(23).RegExp.escape; + + /***/ + }, + /* 469 */ + /***/ function (module, exports, __webpack_require__) { + // https://github.com/benjamingr/RexExp.escape + var $export = __webpack_require__(0); + var $re = __webpack_require__(470)(/[\\^$*+?.()|[\]{}]/g, '\\$&'); + + $export($export.S, 'RegExp', { + escape: function escape(it) { + return $re(it); + }, + }); + + /***/ + }, + /* 470 */ + /***/ function (module, exports) { + module.exports = function (regExp, replace) { + var replacer = + replace === Object(replace) + ? function (part) { + return replace[part]; + } + : replace; + return function (it) { + return String(it).replace(regExp, replacer); + }; + }; + + /***/ + }, + /* 471 */ + /***/ function (module, exports, __webpack_require__) { + var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__; /*! + * https://github.com/es-shims/es5-shim + * @license es5-shim Copyright 2009-2015 by contributors, MIT License + * see https://github.com/es-shims/es5-shim/blob/master/LICENSE + */ + + // vim: ts=4 sts=4 sw=4 expandtab + + // Add semicolon to prevent IIFE from being passed as argument to concatenated code. + // UMD (Universal Module Definition) + // see https://github.com/umdjs/umd/blob/master/templates/returnExports.js + (function (root, factory) { + 'use strict'; + + /* global define, exports, module */ + if (true) { + // AMD. Register as an anonymous module. + !((__WEBPACK_AMD_DEFINE_FACTORY__ = factory), + (__WEBPACK_AMD_DEFINE_RESULT__ = + typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' + ? __WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module) + : __WEBPACK_AMD_DEFINE_FACTORY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else if (typeof exports === 'object') { + // Node. Does not work with strict CommonJS, but + // only CommonJS-like enviroments that support module.exports, + // like Node. + module.exports = factory(); + } else { + // Browser globals (root is window) + root.returnExports = factory(); + } + })(this, function () { + /** + * Brings an environment as close to ECMAScript 5 compliance + * as is possible with the facilities of erstwhile engines. + * + * Annotated ES5: http://es5.github.com/ (specific links below) + * ES5 Spec: http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf + * Required reading: http://javascriptweblog.wordpress.com/2011/12/05/extending-javascript-natives/ + */ + + // Shortcut to an often accessed properties, in order to avoid multiple + // dereference that costs universally. This also holds a reference to known-good + // functions. + var $Array = Array; + var ArrayPrototype = $Array.prototype; + var $Object = Object; + var ObjectPrototype = $Object.prototype; + var $Function = Function; + var FunctionPrototype = $Function.prototype; + var $String = String; + var StringPrototype = $String.prototype; + var $Number = Number; + var NumberPrototype = $Number.prototype; + var array_slice = ArrayPrototype.slice; + var array_splice = ArrayPrototype.splice; + var array_push = ArrayPrototype.push; + var array_unshift = ArrayPrototype.unshift; + var array_concat = ArrayPrototype.concat; + var array_join = ArrayPrototype.join; + var call = FunctionPrototype.call; + var apply = FunctionPrototype.apply; + var max = Math.max; + var min = Math.min; + + // Having a toString local variable name breaks in Opera so use to_string. + var to_string = ObjectPrototype.toString; + + /* global Symbol */ + /* eslint-disable one-var-declaration-per-line, no-redeclare, max-statements-per-line */ + var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol'; + var isCallable; + /* inlined from https://npmjs.com/is-callable */ var fnToStr = Function.prototype.toString, + constructorRegex = /^\s*class /, + isES6ClassFn = function isES6ClassFn(value) { + try { + var fnStr = fnToStr.call(value); + var singleStripped = fnStr.replace(/\/\/.*\n/g, ''); + var multiStripped = singleStripped.replace(/\/\*[.\s\S]*\*\//g, ''); + var spaceStripped = multiStripped.replace(/\n/gm, ' ').replace(/ {2}/g, ' '); + return constructorRegex.test(spaceStripped); + } catch (e) { + return false; /* not a function */ + } + }, + tryFunctionObject = function tryFunctionObject(value) { + try { + if (isES6ClassFn(value)) { + return false; + } + fnToStr.call(value); + return true; + } catch (e) { + return false; + } + }, + fnClass = '[object Function]', + genClass = '[object GeneratorFunction]', + isCallable = function isCallable(value) { + if (!value) { + return false; + } + if (typeof value !== 'function' && typeof value !== 'object') { + return false; + } + if (hasToStringTag) { + return tryFunctionObject(value); + } + if (isES6ClassFn(value)) { + return false; + } + var strClass = to_string.call(value); + return strClass === fnClass || strClass === genClass; + }; + + var isRegex; + /* inlined from https://npmjs.com/is-regex */ var regexExec = RegExp.prototype.exec, + tryRegexExec = function tryRegexExec(value) { + try { + regexExec.call(value); + return true; + } catch (e) { + return false; + } + }, + regexClass = '[object RegExp]'; + isRegex = function isRegex(value) { + if (typeof value !== 'object') { + return false; + } + return hasToStringTag ? tryRegexExec(value) : to_string.call(value) === regexClass; + }; + var isString; + /* inlined from https://npmjs.com/is-string */ var strValue = String.prototype.valueOf, + tryStringObject = function tryStringObject(value) { + try { + strValue.call(value); + return true; + } catch (e) { + return false; + } + }, + stringClass = '[object String]'; + isString = function isString(value) { + if (typeof value === 'string') { + return true; + } + if (typeof value !== 'object') { + return false; + } + return hasToStringTag ? tryStringObject(value) : to_string.call(value) === stringClass; + }; + /* eslint-enable one-var-declaration-per-line, no-redeclare, max-statements-per-line */ + + /* inlined from http://npmjs.com/define-properties */ + var supportsDescriptors = + $Object.defineProperty && + (function () { + try { + var obj = {}; + $Object.defineProperty(obj, 'x', { enumerable: false, value: obj }); + for (var _ in obj) { + // jscs:ignore disallowUnusedVariables + return false; + } + return obj.x === obj; + } catch (e) { + /* this is ES3 */ + return false; + } + })(); + var defineProperties = (function (has) { + // Define configurable, writable, and non-enumerable props + // if they don't exist. + var defineProperty; + if (supportsDescriptors) { + defineProperty = function (object, name, method, forceAssign) { + if (!forceAssign && name in object) { + return; + } + $Object.defineProperty(object, name, { + configurable: true, + enumerable: false, + writable: true, + value: method, + }); + }; + } else { + defineProperty = function (object, name, method, forceAssign) { + if (!forceAssign && name in object) { + return; + } + object[name] = method; + }; + } + return function defineProperties(object, map, forceAssign) { + for (var name in map) { + if (has.call(map, name)) { + defineProperty(object, name, map[name], forceAssign); + } + } + }; + })(ObjectPrototype.hasOwnProperty); + + // + // Util + // ====== + // + + /* replaceable with https://npmjs.com/package/es-abstract /helpers/isPrimitive */ + var isPrimitive = function isPrimitive(input) { + var type = typeof input; + return input === null || (type !== 'object' && type !== 'function'); + }; + + var isActualNaN = + $Number.isNaN || + function isActualNaN(x) { + return x !== x; + }; + + var ES = { + // ES5 9.4 + // http://es5.github.com/#x9.4 + // http://jsperf.com/to-integer + /* replaceable with https://npmjs.com/package/es-abstract ES5.ToInteger */ + ToInteger: function ToInteger(num) { + var n = +num; + if (isActualNaN(n)) { + n = 0; + } else if (n !== 0 && n !== 1 / 0 && n !== -(1 / 0)) { + n = (n > 0 || -1) * Math.floor(Math.abs(n)); + } + return n; + }, + + /* replaceable with https://npmjs.com/package/es-abstract ES5.ToPrimitive */ + ToPrimitive: function ToPrimitive(input) { + var val, valueOf, toStr; + if (isPrimitive(input)) { + return input; + } + valueOf = input.valueOf; + if (isCallable(valueOf)) { + val = valueOf.call(input); + if (isPrimitive(val)) { + return val; + } + } + toStr = input.toString; + if (isCallable(toStr)) { + val = toStr.call(input); + if (isPrimitive(val)) { + return val; + } + } + throw new TypeError(); + }, + + // ES5 9.9 + // http://es5.github.com/#x9.9 + /* replaceable with https://npmjs.com/package/es-abstract ES5.ToObject */ + ToObject: function (o) { + if (o == null) { + // this matches both null and undefined + throw new TypeError("can't convert " + o + ' to object'); + } + return $Object(o); + }, + + /* replaceable with https://npmjs.com/package/es-abstract ES5.ToUint32 */ + ToUint32: function ToUint32(x) { + return x >>> 0; + }, + }; + + // + // Function + // ======== + // + + // ES-5 15.3.4.5 + // http://es5.github.com/#x15.3.4.5 + + var Empty = function Empty() {}; + + defineProperties(FunctionPrototype, { + bind: function bind(that) { + // .length is 1 + // 1. Let Target be the this value. + var target = this; + // 2. If IsCallable(Target) is false, throw a TypeError exception. + if (!isCallable(target)) { + throw new TypeError('Function.prototype.bind called on incompatible ' + target); + } + // 3. Let A be a new (possibly empty) internal list of all of the + // argument values provided after thisArg (arg1, arg2 etc), in order. + // XXX slicedArgs will stand in for "A" if used + var args = array_slice.call(arguments, 1); // for normal call + // 4. Let F be a new native ECMAScript object. + // 11. Set the [[Prototype]] internal property of F to the standard + // built-in Function prototype object as specified in 15.3.3.1. + // 12. Set the [[Call]] internal property of F as described in + // 15.3.4.5.1. + // 13. Set the [[Construct]] internal property of F as described in + // 15.3.4.5.2. + // 14. Set the [[HasInstance]] internal property of F as described in + // 15.3.4.5.3. + var bound; + var binder = function () { + if (this instanceof bound) { + // 15.3.4.5.2 [[Construct]] + // When the [[Construct]] internal method of a function object, + // F that was created using the bind function is called with a + // list of arguments ExtraArgs, the following steps are taken: + // 1. Let target be the value of F's [[TargetFunction]] + // internal property. + // 2. If target has no [[Construct]] internal method, a + // TypeError exception is thrown. + // 3. Let boundArgs be the value of F's [[BoundArgs]] internal + // property. + // 4. Let args be a new list containing the same values as the + // list boundArgs in the same order followed by the same + // values as the list ExtraArgs in the same order. + // 5. Return the result of calling the [[Construct]] internal + // method of target providing args as the arguments. + + var result = apply.call(target, this, array_concat.call(args, array_slice.call(arguments))); + if ($Object(result) === result) { + return result; + } + return this; + } else { + // 15.3.4.5.1 [[Call]] + // When the [[Call]] internal method of a function object, F, + // which was created using the bind function is called with a + // this value and a list of arguments ExtraArgs, the following + // steps are taken: + // 1. Let boundArgs be the value of F's [[BoundArgs]] internal + // property. + // 2. Let boundThis be the value of F's [[BoundThis]] internal + // property. + // 3. Let target be the value of F's [[TargetFunction]] internal + // property. + // 4. Let args be a new list containing the same values as the + // list boundArgs in the same order followed by the same + // values as the list ExtraArgs in the same order. + // 5. Return the result of calling the [[Call]] internal method + // of target providing boundThis as the this value and + // providing args as the arguments. + + // equiv: target.call(this, ...boundArgs, ...args) + return apply.call(target, that, array_concat.call(args, array_slice.call(arguments))); + } + }; + + // 15. If the [[Class]] internal property of Target is "Function", then + // a. Let L be the length property of Target minus the length of A. + // b. Set the length own property of F to either 0 or L, whichever is + // larger. + // 16. Else set the length own property of F to 0. + + var boundLength = max(0, target.length - args.length); + + // 17. Set the attributes of the length own property of F to the values + // specified in 15.3.5.1. + var boundArgs = []; + for (var i = 0; i < boundLength; i++) { + array_push.call(boundArgs, '$' + i); + } + + // XXX Build a dynamic function with desired amount of arguments is the only + // way to set the length property of a function. + // In environments where Content Security Policies enabled (Chrome extensions, + // for ex.) all use of eval or Function costructor throws an exception. + // However in all of these environments Function.prototype.bind exists + // and so this code will never be executed. + bound = $Function( + 'binder', + 'return function (' + + array_join.call(boundArgs, ',') + + '){ return binder.apply(this, arguments); }', + )(binder); + + if (target.prototype) { + Empty.prototype = target.prototype; + bound.prototype = new Empty(); + // Clean up dangling references. + Empty.prototype = null; + } + + // TODO + // 18. Set the [[Extensible]] internal property of F to true. + + // TODO + // 19. Let thrower be the [[ThrowTypeError]] function Object (13.2.3). + // 20. Call the [[DefineOwnProperty]] internal method of F with + // arguments "caller", PropertyDescriptor {[[Get]]: thrower, [[Set]]: + // thrower, [[Enumerable]]: false, [[Configurable]]: false}, and + // false. + // 21. Call the [[DefineOwnProperty]] internal method of F with + // arguments "arguments", PropertyDescriptor {[[Get]]: thrower, + // [[Set]]: thrower, [[Enumerable]]: false, [[Configurable]]: false}, + // and false. + + // TODO + // NOTE Function objects created using Function.prototype.bind do not + // have a prototype property or the [[Code]], [[FormalParameters]], and + // [[Scope]] internal properties. + // XXX can't delete prototype in pure-js. + + // 22. Return F. + return bound; + }, + }); + + // _Please note: Shortcuts are defined after `Function.prototype.bind` as we + // use it in defining shortcuts. + var owns = call.bind(ObjectPrototype.hasOwnProperty); + var toStr = call.bind(ObjectPrototype.toString); + var arraySlice = call.bind(array_slice); + var arraySliceApply = apply.bind(array_slice); + /* globals document */ + if (typeof document === 'object' && document && document.documentElement) { + try { + arraySlice(document.documentElement.childNodes); + } catch (e) { + var origArraySlice = arraySlice; + var origArraySliceApply = arraySliceApply; + arraySlice = function arraySliceIE(arr) { + var r = []; + var i = arr.length; + while (i-- > 0) { + r[i] = arr[i]; + } + return origArraySliceApply(r, origArraySlice(arguments, 1)); + }; + arraySliceApply = function arraySliceApplyIE(arr, args) { + return origArraySliceApply(arraySlice(arr), args); + }; + } + } + var strSlice = call.bind(StringPrototype.slice); + var strSplit = call.bind(StringPrototype.split); + var strIndexOf = call.bind(StringPrototype.indexOf); + var pushCall = call.bind(array_push); + var isEnum = call.bind(ObjectPrototype.propertyIsEnumerable); + var arraySort = call.bind(ArrayPrototype.sort); + + // + // Array + // ===== + // + + var isArray = + $Array.isArray || + function isArray(obj) { + return toStr(obj) === '[object Array]'; + }; + + // ES5 15.4.4.12 + // http://es5.github.com/#x15.4.4.13 + // Return len+argCount. + // [bugfix, ielt8] + // IE < 8 bug: [].unshift(0) === undefined but should be "1" + var hasUnshiftReturnValueBug = [].unshift(0) !== 1; + defineProperties( + ArrayPrototype, + { + unshift: function () { + array_unshift.apply(this, arguments); + return this.length; + }, + }, + hasUnshiftReturnValueBug, + ); + + // ES5 15.4.3.2 + // http://es5.github.com/#x15.4.3.2 + // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/isArray + defineProperties($Array, { isArray: isArray }); + + // The IsCallable() check in the Array functions + // has been replaced with a strict check on the + // internal class of the object to trap cases where + // the provided function was actually a regular + // expression literal, which in V8 and + // JavaScriptCore is a typeof "function". Only in + // V8 are regular expression literals permitted as + // reduce parameters, so it is desirable in the + // general case for the shim to match the more + // strict and common behavior of rejecting regular + // expressions. + + // ES5 15.4.4.18 + // http://es5.github.com/#x15.4.4.18 + // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/array/forEach + + // Check failure of by-index access of string characters (IE < 9) + // and failure of `0 in boxedString` (Rhino) + var boxedString = $Object('a'); + var splitString = boxedString[0] !== 'a' || !(0 in boxedString); + + var properlyBoxesContext = function properlyBoxed(method) { + // Check node 0.6.21 bug where third parameter is not boxed + var properlyBoxesNonStrict = true; + var properlyBoxesStrict = true; + var threwException = false; + if (method) { + try { + method.call('foo', function (_, __, context) { + if (typeof context !== 'object') { + properlyBoxesNonStrict = false; + } + }); + + method.call( + [1], + function () { + 'use strict'; + + properlyBoxesStrict = typeof this === 'string'; + }, + 'x', + ); + } catch (e) { + threwException = true; + } + } + return !!method && !threwException && properlyBoxesNonStrict && properlyBoxesStrict; + }; + + defineProperties( + ArrayPrototype, + { + forEach: function forEach(callbackfn /*, thisArg*/) { + var object = ES.ToObject(this); + var self = splitString && isString(this) ? strSplit(this, '') : object; + var i = -1; + var length = ES.ToUint32(self.length); + var T; + if (arguments.length > 1) { + T = arguments[1]; + } + + // If no callback function or if callback is not a callable function + if (!isCallable(callbackfn)) { + throw new TypeError('Array.prototype.forEach callback must be a function'); + } + + while (++i < length) { + if (i in self) { + // Invoke the callback function with call, passing arguments: + // context, property value, property key, thisArg object + if (typeof T === 'undefined') { + callbackfn(self[i], i, object); + } else { + callbackfn.call(T, self[i], i, object); + } + } + } + }, + }, + !properlyBoxesContext(ArrayPrototype.forEach), + ); + + // ES5 15.4.4.19 + // http://es5.github.com/#x15.4.4.19 + // https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/map + defineProperties( + ArrayPrototype, + { + map: function map(callbackfn /*, thisArg*/) { + var object = ES.ToObject(this); + var self = splitString && isString(this) ? strSplit(this, '') : object; + var length = ES.ToUint32(self.length); + var result = $Array(length); + var T; + if (arguments.length > 1) { + T = arguments[1]; + } + + // If no callback function or if callback is not a callable function + if (!isCallable(callbackfn)) { + throw new TypeError('Array.prototype.map callback must be a function'); + } + + for (var i = 0; i < length; i++) { + if (i in self) { + if (typeof T === 'undefined') { + result[i] = callbackfn(self[i], i, object); + } else { + result[i] = callbackfn.call(T, self[i], i, object); + } + } + } + return result; + }, + }, + !properlyBoxesContext(ArrayPrototype.map), + ); + + // ES5 15.4.4.20 + // http://es5.github.com/#x15.4.4.20 + // https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/filter + defineProperties( + ArrayPrototype, + { + filter: function filter(callbackfn /*, thisArg*/) { + var object = ES.ToObject(this); + var self = splitString && isString(this) ? strSplit(this, '') : object; + var length = ES.ToUint32(self.length); + var result = []; + var value; + var T; + if (arguments.length > 1) { + T = arguments[1]; + } + + // If no callback function or if callback is not a callable function + if (!isCallable(callbackfn)) { + throw new TypeError('Array.prototype.filter callback must be a function'); + } + + for (var i = 0; i < length; i++) { + if (i in self) { + value = self[i]; + if ( + typeof T === 'undefined' + ? callbackfn(value, i, object) + : callbackfn.call(T, value, i, object) + ) { + pushCall(result, value); + } + } + } + return result; + }, + }, + !properlyBoxesContext(ArrayPrototype.filter), + ); + + // ES5 15.4.4.16 + // http://es5.github.com/#x15.4.4.16 + // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/every + defineProperties( + ArrayPrototype, + { + every: function every(callbackfn /*, thisArg*/) { + var object = ES.ToObject(this); + var self = splitString && isString(this) ? strSplit(this, '') : object; + var length = ES.ToUint32(self.length); + var T; + if (arguments.length > 1) { + T = arguments[1]; + } + + // If no callback function or if callback is not a callable function + if (!isCallable(callbackfn)) { + throw new TypeError('Array.prototype.every callback must be a function'); + } + + for (var i = 0; i < length; i++) { + if ( + i in self && + !(typeof T === 'undefined' + ? callbackfn(self[i], i, object) + : callbackfn.call(T, self[i], i, object)) + ) { + return false; + } + } + return true; + }, + }, + !properlyBoxesContext(ArrayPrototype.every), + ); + + // ES5 15.4.4.17 + // http://es5.github.com/#x15.4.4.17 + // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/some + defineProperties( + ArrayPrototype, + { + some: function some(callbackfn /*, thisArg */) { + var object = ES.ToObject(this); + var self = splitString && isString(this) ? strSplit(this, '') : object; + var length = ES.ToUint32(self.length); + var T; + if (arguments.length > 1) { + T = arguments[1]; + } + + // If no callback function or if callback is not a callable function + if (!isCallable(callbackfn)) { + throw new TypeError('Array.prototype.some callback must be a function'); + } + + for (var i = 0; i < length; i++) { + if ( + i in self && + (typeof T === 'undefined' + ? callbackfn(self[i], i, object) + : callbackfn.call(T, self[i], i, object)) + ) { + return true; + } + } + return false; + }, + }, + !properlyBoxesContext(ArrayPrototype.some), + ); + + // ES5 15.4.4.21 + // http://es5.github.com/#x15.4.4.21 + // https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/reduce + var reduceCoercesToObject = false; + if (ArrayPrototype.reduce) { + reduceCoercesToObject = + typeof ArrayPrototype.reduce.call('es5', function (_, __, ___, list) { + return list; + }) === 'object'; + } + defineProperties( + ArrayPrototype, + { + reduce: function reduce(callbackfn /*, initialValue*/) { + var object = ES.ToObject(this); + var self = splitString && isString(this) ? strSplit(this, '') : object; + var length = ES.ToUint32(self.length); + + // If no callback function or if callback is not a callable function + if (!isCallable(callbackfn)) { + throw new TypeError('Array.prototype.reduce callback must be a function'); + } + + // no value to return if no initial value and an empty array + if (length === 0 && arguments.length === 1) { + throw new TypeError('reduce of empty array with no initial value'); + } + + var i = 0; + var result; + if (arguments.length >= 2) { + result = arguments[1]; + } else { + do { + if (i in self) { + result = self[i++]; + break; + } + + // if array contains no values, no initial value to return + if (++i >= length) { + throw new TypeError('reduce of empty array with no initial value'); + } + } while (true); + } + + for (; i < length; i++) { + if (i in self) { + result = callbackfn(result, self[i], i, object); + } + } + + return result; + }, + }, + !reduceCoercesToObject, + ); + + // ES5 15.4.4.22 + // http://es5.github.com/#x15.4.4.22 + // https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/reduceRight + var reduceRightCoercesToObject = false; + if (ArrayPrototype.reduceRight) { + reduceRightCoercesToObject = + typeof ArrayPrototype.reduceRight.call('es5', function (_, __, ___, list) { + return list; + }) === 'object'; + } + defineProperties( + ArrayPrototype, + { + reduceRight: function reduceRight(callbackfn /*, initial*/) { + var object = ES.ToObject(this); + var self = splitString && isString(this) ? strSplit(this, '') : object; + var length = ES.ToUint32(self.length); + + // If no callback function or if callback is not a callable function + if (!isCallable(callbackfn)) { + throw new TypeError('Array.prototype.reduceRight callback must be a function'); + } + + // no value to return if no initial value, empty array + if (length === 0 && arguments.length === 1) { + throw new TypeError('reduceRight of empty array with no initial value'); + } + + var result; + var i = length - 1; + if (arguments.length >= 2) { + result = arguments[1]; + } else { + do { + if (i in self) { + result = self[i--]; + break; + } + + // if array contains no values, no initial value to return + if (--i < 0) { + throw new TypeError('reduceRight of empty array with no initial value'); + } + } while (true); + } + + if (i < 0) { + return result; + } + + do { + if (i in self) { + result = callbackfn(result, self[i], i, object); + } + } while (i--); + + return result; + }, + }, + !reduceRightCoercesToObject, + ); + + // ES5 15.4.4.14 + // http://es5.github.com/#x15.4.4.14 + // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/indexOf + var hasFirefox2IndexOfBug = ArrayPrototype.indexOf && [0, 1].indexOf(1, 2) !== -1; + defineProperties( + ArrayPrototype, + { + indexOf: function indexOf(searchElement /*, fromIndex */) { + var self = splitString && isString(this) ? strSplit(this, '') : ES.ToObject(this); + var length = ES.ToUint32(self.length); + + if (length === 0) { + return -1; + } + + var i = 0; + if (arguments.length > 1) { + i = ES.ToInteger(arguments[1]); + } + + // handle negative indices + i = i >= 0 ? i : max(0, length + i); + for (; i < length; i++) { + if (i in self && self[i] === searchElement) { + return i; + } + } + return -1; + }, + }, + hasFirefox2IndexOfBug, + ); + + // ES5 15.4.4.15 + // http://es5.github.com/#x15.4.4.15 + // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/lastIndexOf + var hasFirefox2LastIndexOfBug = ArrayPrototype.lastIndexOf && [0, 1].lastIndexOf(0, -3) !== -1; + defineProperties( + ArrayPrototype, + { + lastIndexOf: function lastIndexOf(searchElement /*, fromIndex */) { + var self = splitString && isString(this) ? strSplit(this, '') : ES.ToObject(this); + var length = ES.ToUint32(self.length); + + if (length === 0) { + return -1; + } + var i = length - 1; + if (arguments.length > 1) { + i = min(i, ES.ToInteger(arguments[1])); + } + // handle negative indices + i = i >= 0 ? i : length - Math.abs(i); + for (; i >= 0; i--) { + if (i in self && searchElement === self[i]) { + return i; + } + } + return -1; + }, + }, + hasFirefox2LastIndexOfBug, + ); + + // ES5 15.4.4.12 + // http://es5.github.com/#x15.4.4.12 + var spliceNoopReturnsEmptyArray = (function () { + var a = [1, 2]; + var result = a.splice(); + return a.length === 2 && isArray(result) && result.length === 0; + })(); + defineProperties( + ArrayPrototype, + { + // Safari 5.0 bug where .splice() returns undefined + splice: function splice(start, deleteCount) { + if (arguments.length === 0) { + return []; + } else { + return array_splice.apply(this, arguments); + } + }, + }, + !spliceNoopReturnsEmptyArray, + ); + + var spliceWorksWithEmptyObject = (function () { + var obj = {}; + ArrayPrototype.splice.call(obj, 0, 0, 1); + return obj.length === 1; + })(); + defineProperties( + ArrayPrototype, + { + splice: function splice(start, deleteCount) { + if (arguments.length === 0) { + return []; + } + var args = arguments; + this.length = max(ES.ToInteger(this.length), 0); + if (arguments.length > 0 && typeof deleteCount !== 'number') { + args = arraySlice(arguments); + if (args.length < 2) { + pushCall(args, this.length - start); + } else { + args[1] = ES.ToInteger(deleteCount); + } + } + return array_splice.apply(this, args); + }, + }, + !spliceWorksWithEmptyObject, + ); + var spliceWorksWithLargeSparseArrays = (function () { + // Per https://github.com/es-shims/es5-shim/issues/295 + // Safari 7/8 breaks with sparse arrays of size 1e5 or greater + var arr = new $Array(1e5); + // note: the index MUST be 8 or larger or the test will false pass + arr[8] = 'x'; + arr.splice(1, 1); + // note: this test must be defined *after* the indexOf shim + // per https://github.com/es-shims/es5-shim/issues/313 + return arr.indexOf('x') === 7; + })(); + var spliceWorksWithSmallSparseArrays = (function () { + // Per https://github.com/es-shims/es5-shim/issues/295 + // Opera 12.15 breaks on this, no idea why. + var n = 256; + var arr = []; + arr[n] = 'a'; + arr.splice(n + 1, 0, 'b'); + return arr[n] === 'a'; + })(); + defineProperties( + ArrayPrototype, + { + splice: function splice(start, deleteCount) { + var O = ES.ToObject(this); + var A = []; + var len = ES.ToUint32(O.length); + var relativeStart = ES.ToInteger(start); + var actualStart = relativeStart < 0 ? max(len + relativeStart, 0) : min(relativeStart, len); + var actualDeleteCount = min(max(ES.ToInteger(deleteCount), 0), len - actualStart); + + var k = 0; + var from; + while (k < actualDeleteCount) { + from = $String(actualStart + k); + if (owns(O, from)) { + A[k] = O[from]; + } + k += 1; + } + + var items = arraySlice(arguments, 2); + var itemCount = items.length; + var to; + if (itemCount < actualDeleteCount) { + k = actualStart; + var maxK = len - actualDeleteCount; + while (k < maxK) { + from = $String(k + actualDeleteCount); + to = $String(k + itemCount); + if (owns(O, from)) { + O[to] = O[from]; + } else { + delete O[to]; + } + k += 1; + } + k = len; + var minK = len - actualDeleteCount + itemCount; + while (k > minK) { + delete O[k - 1]; + k -= 1; + } + } else if (itemCount > actualDeleteCount) { + k = len - actualDeleteCount; + while (k > actualStart) { + from = $String(k + actualDeleteCount - 1); + to = $String(k + itemCount - 1); + if (owns(O, from)) { + O[to] = O[from]; + } else { + delete O[to]; + } + k -= 1; + } + } + k = actualStart; + for (var i = 0; i < items.length; ++i) { + O[k] = items[i]; + k += 1; + } + O.length = len - actualDeleteCount + itemCount; + + return A; + }, + }, + !spliceWorksWithLargeSparseArrays || !spliceWorksWithSmallSparseArrays, + ); + + var originalJoin = ArrayPrototype.join; + var hasStringJoinBug; + try { + hasStringJoinBug = Array.prototype.join.call('123', ',') !== '1,2,3'; + } catch (e) { + hasStringJoinBug = true; + } + if (hasStringJoinBug) { + defineProperties( + ArrayPrototype, + { + join: function join(separator) { + var sep = typeof separator === 'undefined' ? ',' : separator; + return originalJoin.call(isString(this) ? strSplit(this, '') : this, sep); + }, + }, + hasStringJoinBug, + ); + } + + var hasJoinUndefinedBug = [1, 2].join(undefined) !== '1,2'; + if (hasJoinUndefinedBug) { + defineProperties( + ArrayPrototype, + { + join: function join(separator) { + var sep = typeof separator === 'undefined' ? ',' : separator; + return originalJoin.call(this, sep); + }, + }, + hasJoinUndefinedBug, + ); + } + + var pushShim = function push(item) { + var O = ES.ToObject(this); + var n = ES.ToUint32(O.length); + var i = 0; + while (i < arguments.length) { + O[n + i] = arguments[i]; + i += 1; + } + O.length = n + i; + return n + i; + }; + + var pushIsNotGeneric = (function () { + var obj = {}; + var result = Array.prototype.push.call(obj, undefined); + return result !== 1 || obj.length !== 1 || typeof obj[0] !== 'undefined' || !owns(obj, 0); + })(); + defineProperties( + ArrayPrototype, + { + push: function push(item) { + if (isArray(this)) { + return array_push.apply(this, arguments); + } + return pushShim.apply(this, arguments); + }, + }, + pushIsNotGeneric, + ); + + // This fixes a very weird bug in Opera 10.6 when pushing `undefined + var pushUndefinedIsWeird = (function () { + var arr = []; + var result = arr.push(undefined); + return result !== 1 || arr.length !== 1 || typeof arr[0] !== 'undefined' || !owns(arr, 0); + })(); + defineProperties(ArrayPrototype, { push: pushShim }, pushUndefinedIsWeird); + + // ES5 15.2.3.14 + // http://es5.github.io/#x15.4.4.10 + // Fix boxed string bug + defineProperties( + ArrayPrototype, + { + slice: function (start, end) { + var arr = isString(this) ? strSplit(this, '') : this; + return arraySliceApply(arr, arguments); + }, + }, + splitString, + ); + + var sortIgnoresNonFunctions = (function () { + try { + [1, 2].sort(null); + } catch (e) { + try { + [1, 2].sort({}); + } catch (e2) { + return false; + } + } + return true; + })(); + var sortThrowsOnRegex = (function () { + // this is a problem in Firefox 4, in which `typeof /a/ === 'function'` + try { + [1, 2].sort(/a/); + return false; + } catch (e) {} + return true; + })(); + var sortIgnoresUndefined = (function () { + // applies in IE 8, for one. + try { + [1, 2].sort(undefined); + return true; + } catch (e) {} + return false; + })(); + defineProperties( + ArrayPrototype, + { + sort: function sort(compareFn) { + if (typeof compareFn === 'undefined') { + return arraySort(this); + } + if (!isCallable(compareFn)) { + throw new TypeError('Array.prototype.sort callback must be a function'); + } + return arraySort(this, compareFn); + }, + }, + sortIgnoresNonFunctions || !sortIgnoresUndefined || !sortThrowsOnRegex, + ); + + // + // Object + // ====== + // + + // ES5 15.2.3.14 + // http://es5.github.com/#x15.2.3.14 + + // http://whattheheadsaid.com/2010/10/a-safer-object-keys-compatibility-implementation + var hasDontEnumBug = !isEnum({ toString: null }, 'toString'); // jscs:ignore disallowQuotedKeysInObjects + var hasProtoEnumBug = isEnum(function () {}, 'prototype'); + var hasStringEnumBug = !owns('x', '0'); + var equalsConstructorPrototype = function (o) { + var ctor = o.constructor; + return ctor && ctor.prototype === o; + }; + var excludedKeys = { + $applicationCache: true, + $console: true, + $external: true, + $frame: true, + $frameElement: true, + $frames: true, + $innerHeight: true, + $innerWidth: true, + $onmozfullscreenchange: true, + $onmozfullscreenerror: true, + $outerHeight: true, + $outerWidth: true, + $pageXOffset: true, + $pageYOffset: true, + $parent: true, + $scrollLeft: true, + $scrollTop: true, + $scrollX: true, + $scrollY: true, + $self: true, + $webkitIndexedDB: true, + $webkitStorageInfo: true, + $window: true, + + $width: true, + $height: true, + $top: true, + $localStorage: true, + }; + var hasAutomationEqualityBug = (function () { + /* globals window */ + if (typeof window === 'undefined') { + return false; + } + for (var k in window) { + try { + if ( + !excludedKeys['$' + k] && + owns(window, k) && + window[k] !== null && + typeof window[k] === 'object' + ) { + equalsConstructorPrototype(window[k]); + } + } catch (e) { + return true; + } + } + return false; + })(); + var equalsConstructorPrototypeIfNotBuggy = function (object) { + if (typeof window === 'undefined' || !hasAutomationEqualityBug) { + return equalsConstructorPrototype(object); + } + try { + return equalsConstructorPrototype(object); + } catch (e) { + return false; + } + }; + var dontEnums = [ + 'toString', + 'toLocaleString', + 'valueOf', + 'hasOwnProperty', + 'isPrototypeOf', + 'propertyIsEnumerable', + 'constructor', + ]; + var dontEnumsLength = dontEnums.length; + + // taken directly from https://github.com/ljharb/is-arguments/blob/master/index.js + // can be replaced with require('is-arguments') if we ever use a build process instead + var isStandardArguments = function isArguments(value) { + return toStr(value) === '[object Arguments]'; + }; + var isLegacyArguments = function isArguments(value) { + return ( + value !== null && + typeof value === 'object' && + typeof value.length === 'number' && + value.length >= 0 && + !isArray(value) && + isCallable(value.callee) + ); + }; + var isArguments = isStandardArguments(arguments) ? isStandardArguments : isLegacyArguments; + + defineProperties($Object, { + keys: function keys(object) { + var isFn = isCallable(object); + var isArgs = isArguments(object); + var isObject = object !== null && typeof object === 'object'; + var isStr = isObject && isString(object); + + if (!isObject && !isFn && !isArgs) { + throw new TypeError('Object.keys called on a non-object'); + } + + var theKeys = []; + var skipProto = hasProtoEnumBug && isFn; + if ((isStr && hasStringEnumBug) || isArgs) { + for (var i = 0; i < object.length; ++i) { + pushCall(theKeys, $String(i)); + } + } + + if (!isArgs) { + for (var name in object) { + if (!(skipProto && name === 'prototype') && owns(object, name)) { + pushCall(theKeys, $String(name)); + } + } + } + + if (hasDontEnumBug) { + var skipConstructor = equalsConstructorPrototypeIfNotBuggy(object); + for (var j = 0; j < dontEnumsLength; j++) { + var dontEnum = dontEnums[j]; + if (!(skipConstructor && dontEnum === 'constructor') && owns(object, dontEnum)) { + pushCall(theKeys, dontEnum); + } + } + } + return theKeys; + }, + }); + + var keysWorksWithArguments = + $Object.keys && + (function () { + // Safari 5.0 bug + return $Object.keys(arguments).length === 2; + })(1, 2); + var keysHasArgumentsLengthBug = + $Object.keys && + (function () { + var argKeys = $Object.keys(arguments); + return arguments.length !== 1 || argKeys.length !== 1 || argKeys[0] !== 1; + })(1); + var originalKeys = $Object.keys; + defineProperties( + $Object, + { + keys: function keys(object) { + if (isArguments(object)) { + return originalKeys(arraySlice(object)); + } else { + return originalKeys(object); + } + }, + }, + !keysWorksWithArguments || keysHasArgumentsLengthBug, + ); + + // + // Date + // ==== + // + + var hasNegativeMonthYearBug = new Date(-3509827329600292).getUTCMonth() !== 0; + var aNegativeTestDate = new Date(-1509842289600292); + var aPositiveTestDate = new Date(1449662400000); + var hasToUTCStringFormatBug = aNegativeTestDate.toUTCString() !== 'Mon, 01 Jan -45875 11:59:59 GMT'; + var hasToDateStringFormatBug; + var hasToStringFormatBug; + var timeZoneOffset = aNegativeTestDate.getTimezoneOffset(); + if (timeZoneOffset < -720) { + hasToDateStringFormatBug = aNegativeTestDate.toDateString() !== 'Tue Jan 02 -45875'; + hasToStringFormatBug = !/^Thu Dec 10 2015 \d\d:\d\d:\d\d GMT[-+]\d\d\d\d(?: |$)/.test( + String(aPositiveTestDate), + ); + } else { + hasToDateStringFormatBug = aNegativeTestDate.toDateString() !== 'Mon Jan 01 -45875'; + hasToStringFormatBug = !/^Wed Dec 09 2015 \d\d:\d\d:\d\d GMT[-+]\d\d\d\d(?: |$)/.test( + String(aPositiveTestDate), + ); + } + + var originalGetFullYear = call.bind(Date.prototype.getFullYear); + var originalGetMonth = call.bind(Date.prototype.getMonth); + var originalGetDate = call.bind(Date.prototype.getDate); + var originalGetUTCFullYear = call.bind(Date.prototype.getUTCFullYear); + var originalGetUTCMonth = call.bind(Date.prototype.getUTCMonth); + var originalGetUTCDate = call.bind(Date.prototype.getUTCDate); + var originalGetUTCDay = call.bind(Date.prototype.getUTCDay); + var originalGetUTCHours = call.bind(Date.prototype.getUTCHours); + var originalGetUTCMinutes = call.bind(Date.prototype.getUTCMinutes); + var originalGetUTCSeconds = call.bind(Date.prototype.getUTCSeconds); + var originalGetUTCMilliseconds = call.bind(Date.prototype.getUTCMilliseconds); + var dayName = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']; + var monthName = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']; + var daysInMonth = function daysInMonth(month, year) { + return originalGetDate(new Date(year, month, 0)); + }; + + defineProperties( + Date.prototype, + { + getFullYear: function getFullYear() { + if (!this || !(this instanceof Date)) { + throw new TypeError('this is not a Date object.'); + } + var year = originalGetFullYear(this); + if (year < 0 && originalGetMonth(this) > 11) { + return year + 1; + } + return year; + }, + getMonth: function getMonth() { + if (!this || !(this instanceof Date)) { + throw new TypeError('this is not a Date object.'); + } + var year = originalGetFullYear(this); + var month = originalGetMonth(this); + if (year < 0 && month > 11) { + return 0; + } + return month; + }, + getDate: function getDate() { + if (!this || !(this instanceof Date)) { + throw new TypeError('this is not a Date object.'); + } + var year = originalGetFullYear(this); + var month = originalGetMonth(this); + var date = originalGetDate(this); + if (year < 0 && month > 11) { + if (month === 12) { + return date; + } + var days = daysInMonth(0, year + 1); + return days - date + 1; + } + return date; + }, + getUTCFullYear: function getUTCFullYear() { + if (!this || !(this instanceof Date)) { + throw new TypeError('this is not a Date object.'); + } + var year = originalGetUTCFullYear(this); + if (year < 0 && originalGetUTCMonth(this) > 11) { + return year + 1; + } + return year; + }, + getUTCMonth: function getUTCMonth() { + if (!this || !(this instanceof Date)) { + throw new TypeError('this is not a Date object.'); + } + var year = originalGetUTCFullYear(this); + var month = originalGetUTCMonth(this); + if (year < 0 && month > 11) { + return 0; + } + return month; + }, + getUTCDate: function getUTCDate() { + if (!this || !(this instanceof Date)) { + throw new TypeError('this is not a Date object.'); + } + var year = originalGetUTCFullYear(this); + var month = originalGetUTCMonth(this); + var date = originalGetUTCDate(this); + if (year < 0 && month > 11) { + if (month === 12) { + return date; + } + var days = daysInMonth(0, year + 1); + return days - date + 1; + } + return date; + }, + }, + hasNegativeMonthYearBug, + ); + + defineProperties( + Date.prototype, + { + toUTCString: function toUTCString() { + if (!this || !(this instanceof Date)) { + throw new TypeError('this is not a Date object.'); + } + var day = originalGetUTCDay(this); + var date = originalGetUTCDate(this); + var month = originalGetUTCMonth(this); + var year = originalGetUTCFullYear(this); + var hour = originalGetUTCHours(this); + var minute = originalGetUTCMinutes(this); + var second = originalGetUTCSeconds(this); + return ( + dayName[day] + + ', ' + + (date < 10 ? '0' + date : date) + + ' ' + + monthName[month] + + ' ' + + year + + ' ' + + (hour < 10 ? '0' + hour : hour) + + ':' + + (minute < 10 ? '0' + minute : minute) + + ':' + + (second < 10 ? '0' + second : second) + + ' GMT' + ); + }, + }, + hasNegativeMonthYearBug || hasToUTCStringFormatBug, + ); + + // Opera 12 has `,` + defineProperties( + Date.prototype, + { + toDateString: function toDateString() { + if (!this || !(this instanceof Date)) { + throw new TypeError('this is not a Date object.'); + } + var day = this.getDay(); + var date = this.getDate(); + var month = this.getMonth(); + var year = this.getFullYear(); + return ( + dayName[day] + ' ' + monthName[month] + ' ' + (date < 10 ? '0' + date : date) + ' ' + year + ); + }, + }, + hasNegativeMonthYearBug || hasToDateStringFormatBug, + ); + + // can't use defineProperties here because of toString enumeration issue in IE <= 8 + if (hasNegativeMonthYearBug || hasToStringFormatBug) { + Date.prototype.toString = function toString() { + if (!this || !(this instanceof Date)) { + throw new TypeError('this is not a Date object.'); + } + var day = this.getDay(); + var date = this.getDate(); + var month = this.getMonth(); + var year = this.getFullYear(); + var hour = this.getHours(); + var minute = this.getMinutes(); + var second = this.getSeconds(); + var timezoneOffset = this.getTimezoneOffset(); + var hoursOffset = Math.floor(Math.abs(timezoneOffset) / 60); + var minutesOffset = Math.floor(Math.abs(timezoneOffset) % 60); + return ( + dayName[day] + + ' ' + + monthName[month] + + ' ' + + (date < 10 ? '0' + date : date) + + ' ' + + year + + ' ' + + (hour < 10 ? '0' + hour : hour) + + ':' + + (minute < 10 ? '0' + minute : minute) + + ':' + + (second < 10 ? '0' + second : second) + + ' GMT' + + (timezoneOffset > 0 ? '-' : '+') + + (hoursOffset < 10 ? '0' + hoursOffset : hoursOffset) + + (minutesOffset < 10 ? '0' + minutesOffset : minutesOffset) + ); + }; + if (supportsDescriptors) { + $Object.defineProperty(Date.prototype, 'toString', { + configurable: true, + enumerable: false, + writable: true, + }); + } + } + + // ES5 15.9.5.43 + // http://es5.github.com/#x15.9.5.43 + // This function returns a String value represent the instance in time + // represented by this Date object. The format of the String is the Date Time + // string format defined in 15.9.1.15. All fields are present in the String. + // The time zone is always UTC, denoted by the suffix Z. If the time value of + // this object is not a finite Number a RangeError exception is thrown. + var negativeDate = -62198755200000; + var negativeYearString = '-000001'; + var hasNegativeDateBug = + Date.prototype.toISOString && + new Date(negativeDate).toISOString().indexOf(negativeYearString) === -1; // eslint-disable-line max-len + var hasSafari51DateBug = + Date.prototype.toISOString && new Date(-1).toISOString() !== '1969-12-31T23:59:59.999Z'; + + var getTime = call.bind(Date.prototype.getTime); + + defineProperties( + Date.prototype, + { + toISOString: function toISOString() { + if (!isFinite(this) || !isFinite(getTime(this))) { + // Adope Photoshop requires the second check. + throw new RangeError('Date.prototype.toISOString called on non-finite value.'); + } + + var year = originalGetUTCFullYear(this); + + var month = originalGetUTCMonth(this); + // see https://github.com/es-shims/es5-shim/issues/111 + year += Math.floor(month / 12); + month = ((month % 12) + 12) % 12; + + // the date time string format is specified in 15.9.1.15. + var result = [ + month + 1, + originalGetUTCDate(this), + originalGetUTCHours(this), + originalGetUTCMinutes(this), + originalGetUTCSeconds(this), + ]; + year = + (year < 0 ? '-' : year > 9999 ? '+' : '') + + strSlice('00000' + Math.abs(year), 0 <= year && year <= 9999 ? -4 : -6); + + for (var i = 0; i < result.length; ++i) { + // pad months, days, hours, minutes, and seconds to have two digits. + result[i] = strSlice('00' + result[i], -2); + } + // pad milliseconds to have three digits. + return ( + year + + '-' + + arraySlice(result, 0, 2).join('-') + + 'T' + + arraySlice(result, 2).join(':') + + '.' + + strSlice('000' + originalGetUTCMilliseconds(this), -3) + + 'Z' + ); + }, + }, + hasNegativeDateBug || hasSafari51DateBug, + ); + + // ES5 15.9.5.44 + // http://es5.github.com/#x15.9.5.44 + // This function provides a String representation of a Date object for use by + // JSON.stringify (15.12.3). + var dateToJSONIsSupported = (function () { + try { + return ( + Date.prototype.toJSON && + new Date(NaN).toJSON() === null && + new Date(negativeDate).toJSON().indexOf(negativeYearString) !== -1 && + Date.prototype.toJSON.call({ + // generic + toISOString: function () { + return true; + }, + }) + ); + } catch (e) { + return false; + } + })(); + if (!dateToJSONIsSupported) { + Date.prototype.toJSON = function toJSON(key) { + // When the toJSON method is called with argument key, the following + // steps are taken: + + // 1. Let O be the result of calling ToObject, giving it the this + // value as its argument. + // 2. Let tv be ES.ToPrimitive(O, hint Number). + var O = $Object(this); + var tv = ES.ToPrimitive(O); + // 3. If tv is a Number and is not finite, return null. + if (typeof tv === 'number' && !isFinite(tv)) { + return null; + } + // 4. Let toISO be the result of calling the [[Get]] internal method of + // O with argument "toISOString". + var toISO = O.toISOString; + // 5. If IsCallable(toISO) is false, throw a TypeError exception. + if (!isCallable(toISO)) { + throw new TypeError('toISOString property is not callable'); + } + // 6. Return the result of calling the [[Call]] internal method of + // toISO with O as the this value and an empty argument list. + return toISO.call(O); + + // NOTE 1 The argument is ignored. + + // NOTE 2 The toJSON function is intentionally generic; it does not + // require that its this value be a Date object. Therefore, it can be + // transferred to other kinds of objects for use as a method. However, + // it does require that any such object have a toISOString method. An + // object is free to use the argument key to filter its + // stringification. + }; + } + + // ES5 15.9.4.2 + // http://es5.github.com/#x15.9.4.2 + // based on work shared by Daniel Friesen (dantman) + // http://gist.github.com/303249 + var supportsExtendedYears = Date.parse('+033658-09-27T01:46:40.000Z') === 1e15; + var acceptsInvalidDates = + !isNaN(Date.parse('2012-04-04T24:00:00.500Z')) || + !isNaN(Date.parse('2012-11-31T23:59:59.000Z')) || + !isNaN(Date.parse('2012-12-31T23:59:60.000Z')); + var doesNotParseY2KNewYear = isNaN(Date.parse('2000-01-01T00:00:00.000Z')); + if (doesNotParseY2KNewYear || acceptsInvalidDates || !supportsExtendedYears) { + // XXX global assignment won't work in embeddings that use + // an alternate object for the context. + /* global Date: true */ + var maxSafeUnsigned32Bit = Math.pow(2, 31) - 1; + var hasSafariSignedIntBug = isActualNaN( + new Date(1970, 0, 1, 0, 0, 0, maxSafeUnsigned32Bit + 1).getTime(), + ); + // eslint-disable-next-line no-implicit-globals, no-global-assign + Date = (function (NativeDate) { + // Date.length === 7 + var DateShim = function Date(Y, M, D, h, m, s, ms) { + var length = arguments.length; + var date; + if (this instanceof NativeDate) { + var seconds = s; + var millis = ms; + if (hasSafariSignedIntBug && length >= 7 && ms > maxSafeUnsigned32Bit) { + // work around a Safari 8/9 bug where it treats the seconds as signed + var msToShift = Math.floor(ms / maxSafeUnsigned32Bit) * maxSafeUnsigned32Bit; + var sToShift = Math.floor(msToShift / 1e3); + seconds += sToShift; + millis -= sToShift * 1e3; + } + date = + length === 1 && $String(Y) === Y // isString(Y) + ? // We explicitly pass it through parse: + new NativeDate(DateShim.parse(Y)) + : // We have to manually make calls depending on argument + // length here + length >= 7 + ? new NativeDate(Y, M, D, h, m, seconds, millis) + : length >= 6 + ? new NativeDate(Y, M, D, h, m, seconds) + : length >= 5 + ? new NativeDate(Y, M, D, h, m) + : length >= 4 + ? new NativeDate(Y, M, D, h) + : length >= 3 + ? new NativeDate(Y, M, D) + : length >= 2 + ? new NativeDate(Y, M) + : length >= 1 + ? new NativeDate(Y instanceof NativeDate ? +Y : Y) + : new NativeDate(); + } else { + date = NativeDate.apply(this, arguments); + } + if (!isPrimitive(date)) { + // Prevent mixups with unfixed Date object + defineProperties(date, { constructor: DateShim }, true); + } + return date; + }; + + // 15.9.1.15 Date Time String Format. + var isoDateExpression = new RegExp( + '^' + + '(\\d{4}|[+-]\\d{6})' + // four-digit year capture or sign + 6-digit extended year + '(?:-(\\d{2})' + // optional month capture + '(?:-(\\d{2})' + // optional day capture + '(?:' + // capture hours:minutes:seconds.milliseconds + 'T(\\d{2})' + // hours capture + ':(\\d{2})' + // minutes capture + '(?:' + // optional :seconds.milliseconds + ':(\\d{2})' + // seconds capture + '(?:(\\.\\d{1,}))?' + // milliseconds capture + ')?' + + '(' + // capture UTC offset component + 'Z|' + // UTC capture + '(?:' + // offset specifier +/-hours:minutes + '([-+])' + // sign capture + '(\\d{2})' + // hours offset capture + ':(\\d{2})' + // minutes offset capture + ')' + + ')?)?)?)?' + + '$', + ); + + var months = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365]; + + var dayFromMonth = function dayFromMonth(year, month) { + var t = month > 1 ? 1 : 0; + return ( + months[month] + + Math.floor((year - 1969 + t) / 4) - + Math.floor((year - 1901 + t) / 100) + + Math.floor((year - 1601 + t) / 400) + + 365 * (year - 1970) + ); + }; + + var toUTC = function toUTC(t) { + var s = 0; + var ms = t; + if (hasSafariSignedIntBug && ms > maxSafeUnsigned32Bit) { + // work around a Safari 8/9 bug where it treats the seconds as signed + var msToShift = Math.floor(ms / maxSafeUnsigned32Bit) * maxSafeUnsigned32Bit; + var sToShift = Math.floor(msToShift / 1e3); + s += sToShift; + ms -= sToShift * 1e3; + } + return $Number(new NativeDate(1970, 0, 1, 0, 0, s, ms)); + }; + + // Copy any custom methods a 3rd party library may have added + for (var key in NativeDate) { + if (owns(NativeDate, key)) { + DateShim[key] = NativeDate[key]; + } + } + + // Copy "native" methods explicitly; they may be non-enumerable + defineProperties( + DateShim, + { + now: NativeDate.now, + UTC: NativeDate.UTC, + }, + true, + ); + DateShim.prototype = NativeDate.prototype; + defineProperties(DateShim.prototype, { constructor: DateShim }, true); + + // Upgrade Date.parse to handle simplified ISO 8601 strings + var parseShim = function parse(string) { + var match = isoDateExpression.exec(string); + if (match) { + // parse months, days, hours, minutes, seconds, and milliseconds + // provide default values if necessary + // parse the UTC offset component + var year = $Number(match[1]), + month = $Number(match[2] || 1) - 1, + day = $Number(match[3] || 1) - 1, + hour = $Number(match[4] || 0), + minute = $Number(match[5] || 0), + second = $Number(match[6] || 0), + millisecond = Math.floor($Number(match[7] || 0) * 1000), + // When time zone is missed, local offset should be used + // (ES 5.1 bug) + // see https://bugs.ecmascript.org/show_bug.cgi?id=112 + isLocalTime = Boolean(match[4] && !match[8]), + signOffset = match[9] === '-' ? 1 : -1, + hourOffset = $Number(match[10] || 0), + minuteOffset = $Number(match[11] || 0), + result; + var hasMinutesOrSecondsOrMilliseconds = minute > 0 || second > 0 || millisecond > 0; + if ( + hour < (hasMinutesOrSecondsOrMilliseconds ? 24 : 25) && + minute < 60 && + second < 60 && + millisecond < 1000 && + month > -1 && + month < 12 && + hourOffset < 24 && + minuteOffset < 60 && // detect invalid offsets + day > -1 && + day < dayFromMonth(year, month + 1) - dayFromMonth(year, month) + ) { + result = ((dayFromMonth(year, month) + day) * 24 + hour + hourOffset * signOffset) * 60; + result = ((result + minute + minuteOffset * signOffset) * 60 + second) * 1000 + millisecond; + if (isLocalTime) { + result = toUTC(result); + } + if (-8.64e15 <= result && result <= 8.64e15) { + return result; + } + } + return NaN; + } + return NativeDate.parse.apply(this, arguments); + }; + defineProperties(DateShim, { parse: parseShim }); + + return DateShim; + })(Date); + /* global Date: false */ + } + + // ES5 15.9.4.4 + // http://es5.github.com/#x15.9.4.4 + if (!Date.now) { + Date.now = function now() { + return new Date().getTime(); + }; + } + + // + // Number + // ====== + // + + // ES5.1 15.7.4.5 + // http://es5.github.com/#x15.7.4.5 + var hasToFixedBugs = + NumberPrototype.toFixed && + ((0.00008).toFixed(3) !== '0.000' || + (0.9).toFixed(0) !== '1' || + (1.255).toFixed(2) !== '1.25' || + (1000000000000000128).toFixed(0) !== '1000000000000000128'); + + var toFixedHelpers = { + base: 1e7, + size: 6, + data: [0, 0, 0, 0, 0, 0], + multiply: function multiply(n, c) { + var i = -1; + var c2 = c; + while (++i < toFixedHelpers.size) { + c2 += n * toFixedHelpers.data[i]; + toFixedHelpers.data[i] = c2 % toFixedHelpers.base; + c2 = Math.floor(c2 / toFixedHelpers.base); + } + }, + divide: function divide(n) { + var i = toFixedHelpers.size; + var c = 0; + while (--i >= 0) { + c += toFixedHelpers.data[i]; + toFixedHelpers.data[i] = Math.floor(c / n); + c = (c % n) * toFixedHelpers.base; + } + }, + numToString: function numToString() { + var i = toFixedHelpers.size; + var s = ''; + while (--i >= 0) { + if (s !== '' || i === 0 || toFixedHelpers.data[i] !== 0) { + var t = $String(toFixedHelpers.data[i]); + if (s === '') { + s = t; + } else { + s += strSlice('0000000', 0, 7 - t.length) + t; + } + } + } + return s; + }, + pow: function pow(x, n, acc) { + return n === 0 ? acc : n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc); + }, + log: function log(x) { + var n = 0; + var x2 = x; + while (x2 >= 4096) { + n += 12; + x2 /= 4096; + } + while (x2 >= 2) { + n += 1; + x2 /= 2; + } + return n; + }, + }; + + var toFixedShim = function toFixed(fractionDigits) { + var f, x, s, m, e, z, j, k; + + // Test for NaN and round fractionDigits down + f = $Number(fractionDigits); + f = isActualNaN(f) ? 0 : Math.floor(f); + + if (f < 0 || f > 20) { + throw new RangeError('Number.toFixed called with invalid number of decimals'); + } + + x = $Number(this); + + if (isActualNaN(x)) { + return 'NaN'; + } + + // If it is too big or small, return the string value of the number + if (x <= -1e21 || x >= 1e21) { + return $String(x); + } + + s = ''; + + if (x < 0) { + s = '-'; + x = -x; + } + + m = '0'; + + if (x > 1e-21) { + // 1e-21 < x < 1e21 + // -70 < log2(x) < 70 + e = toFixedHelpers.log(x * toFixedHelpers.pow(2, 69, 1)) - 69; + z = e < 0 ? x * toFixedHelpers.pow(2, -e, 1) : x / toFixedHelpers.pow(2, e, 1); + z *= 0x10000000000000; // Math.pow(2, 52); + e = 52 - e; + + // -18 < e < 122 + // x = z / 2 ^ e + if (e > 0) { + toFixedHelpers.multiply(0, z); + j = f; + + while (j >= 7) { + toFixedHelpers.multiply(1e7, 0); + j -= 7; + } + + toFixedHelpers.multiply(toFixedHelpers.pow(10, j, 1), 0); + j = e - 1; + + while (j >= 23) { + toFixedHelpers.divide(1 << 23); + j -= 23; + } + + toFixedHelpers.divide(1 << j); + toFixedHelpers.multiply(1, 1); + toFixedHelpers.divide(2); + m = toFixedHelpers.numToString(); + } else { + toFixedHelpers.multiply(0, z); + toFixedHelpers.multiply(1 << -e, 0); + m = toFixedHelpers.numToString() + strSlice('0.00000000000000000000', 2, 2 + f); + } + } + + if (f > 0) { + k = m.length; + + if (k <= f) { + m = s + strSlice('0.0000000000000000000', 0, f - k + 2) + m; + } else { + m = s + strSlice(m, 0, k - f) + '.' + strSlice(m, k - f); + } + } else { + m = s + m; + } + + return m; + }; + defineProperties(NumberPrototype, { toFixed: toFixedShim }, hasToFixedBugs); + + var hasToPrecisionUndefinedBug = (function () { + try { + return (1.0).toPrecision(undefined) === '1'; + } catch (e) { + return true; + } + })(); + var originalToPrecision = NumberPrototype.toPrecision; + defineProperties( + NumberPrototype, + { + toPrecision: function toPrecision(precision) { + return typeof precision === 'undefined' + ? originalToPrecision.call(this) + : originalToPrecision.call(this, precision); + }, + }, + hasToPrecisionUndefinedBug, + ); + + // + // String + // ====== + // + + // ES5 15.5.4.14 + // http://es5.github.com/#x15.5.4.14 + + // [bugfix, IE lt 9, firefox 4, Konqueror, Opera, obscure browsers] + // Many browsers do not split properly with regular expressions or they + // do not perform the split correctly under obscure conditions. + // See http://blog.stevenlevithan.com/archives/cross-browser-split + // I've tested in many browsers and this seems to cover the deviant ones: + // 'ab'.split(/(?:ab)*/) should be ["", ""], not [""] + // '.'.split(/(.?)(.?)/) should be ["", ".", "", ""], not ["", ""] + // 'tesst'.split(/(s)*/) should be ["t", undefined, "e", "s", "t"], not + // [undefined, "t", undefined, "e", ...] + // ''.split(/.?/) should be [], not [""] + // '.'.split(/()()/) should be ["."], not ["", "", "."] + + if ( + 'ab'.split(/(?:ab)*/).length !== 2 || + '.'.split(/(.?)(.?)/).length !== 4 || + 'tesst'.split(/(s)*/)[1] === 't' || + 'test'.split(/(?:)/, -1).length !== 4 || + ''.split(/.?/).length || + '.'.split(/()()/).length > 1 + ) { + (function () { + var compliantExecNpcg = typeof /()??/.exec('')[1] === 'undefined'; // NPCG: nonparticipating capturing group + var maxSafe32BitInt = Math.pow(2, 32) - 1; + + StringPrototype.split = function (separator, limit) { + var string = String(this); + if (typeof separator === 'undefined' && limit === 0) { + return []; + } + + // If `separator` is not a regex, use native split + if (!isRegex(separator)) { + return strSplit(this, separator, limit); + } + + var output = []; + var flags = + (separator.ignoreCase ? 'i' : '') + + (separator.multiline ? 'm' : '') + + (separator.unicode ? 'u' : '') + // in ES6 + (separator.sticky ? 'y' : ''), // Firefox 3+ and ES6 + lastLastIndex = 0, + // Make `global` and avoid `lastIndex` issues by working with a copy + separator2, + match, + lastIndex, + lastLength; + var separatorCopy = new RegExp(separator.source, flags + 'g'); + if (!compliantExecNpcg) { + // Doesn't need flags gy, but they don't hurt + separator2 = new RegExp('^' + separatorCopy.source + '$(?!\\s)', flags); + } + /* Values for `limit`, per the spec: + * If undefined: 4294967295 // maxSafe32BitInt + * If 0, Infinity, or NaN: 0 + * If positive number: limit = Math.floor(limit); if (limit > 4294967295) limit -= 4294967296; + * If negative number: 4294967296 - Math.floor(Math.abs(limit)) + * If other: Type-convert, then use the above rules + */ + var splitLimit = typeof limit === 'undefined' ? maxSafe32BitInt : ES.ToUint32(limit); + match = separatorCopy.exec(string); + while (match) { + // `separatorCopy.lastIndex` is not reliable cross-browser + lastIndex = match.index + match[0].length; + if (lastIndex > lastLastIndex) { + pushCall(output, strSlice(string, lastLastIndex, match.index)); + // Fix browsers whose `exec` methods don't consistently return `undefined` for + // nonparticipating capturing groups + if (!compliantExecNpcg && match.length > 1) { + /* eslint-disable no-loop-func */ + match[0].replace(separator2, function () { + for (var i = 1; i < arguments.length - 2; i++) { + if (typeof arguments[i] === 'undefined') { + match[i] = void 0; + } + } + }); + /* eslint-enable no-loop-func */ + } + if (match.length > 1 && match.index < string.length) { + array_push.apply(output, arraySlice(match, 1)); + } + lastLength = match[0].length; + lastLastIndex = lastIndex; + if (output.length >= splitLimit) { + break; + } + } + if (separatorCopy.lastIndex === match.index) { + separatorCopy.lastIndex++; // Avoid an infinite loop + } + match = separatorCopy.exec(string); + } + if (lastLastIndex === string.length) { + if (lastLength || !separatorCopy.test('')) { + pushCall(output, ''); + } + } else { + pushCall(output, strSlice(string, lastLastIndex)); + } + return output.length > splitLimit ? arraySlice(output, 0, splitLimit) : output; + }; + })(); + + // [bugfix, chrome] + // If separator is undefined, then the result array contains just one String, + // which is the this value (converted to a String). If limit is not undefined, + // then the output array is truncated so that it contains no more than limit + // elements. + // "0".split(undefined, 0) -> [] + } else if ('0'.split(void 0, 0).length) { + StringPrototype.split = function split(separator, limit) { + if (typeof separator === 'undefined' && limit === 0) { + return []; + } + return strSplit(this, separator, limit); + }; + } + + var str_replace = StringPrototype.replace; + var replaceReportsGroupsCorrectly = (function () { + var groups = []; + 'x'.replace(/x(.)?/g, function (match, group) { + pushCall(groups, group); + }); + return groups.length === 1 && typeof groups[0] === 'undefined'; + })(); + + if (!replaceReportsGroupsCorrectly) { + StringPrototype.replace = function replace(searchValue, replaceValue) { + var isFn = isCallable(replaceValue); + var hasCapturingGroups = isRegex(searchValue) && /\)[*?]/.test(searchValue.source); + if (!isFn || !hasCapturingGroups) { + return str_replace.call(this, searchValue, replaceValue); + } else { + var wrappedReplaceValue = function (match) { + var length = arguments.length; + var originalLastIndex = searchValue.lastIndex; + searchValue.lastIndex = 0; + var args = searchValue.exec(match) || []; + searchValue.lastIndex = originalLastIndex; + pushCall(args, arguments[length - 2], arguments[length - 1]); + return replaceValue.apply(this, args); + }; + return str_replace.call(this, searchValue, wrappedReplaceValue); + } + }; + } + + // ECMA-262, 3rd B.2.3 + // Not an ECMAScript standard, although ECMAScript 3rd Edition has a + // non-normative section suggesting uniform semantics and it should be + // normalized across all browsers + // [bugfix, IE lt 9] IE < 9 substr() with negative value not working in IE + var string_substr = StringPrototype.substr; + var hasNegativeSubstrBug = ''.substr && '0b'.substr(-1) !== 'b'; + defineProperties( + StringPrototype, + { + substr: function substr(start, length) { + var normalizedStart = start; + if (start < 0) { + normalizedStart = max(this.length + start, 0); + } + return string_substr.call(this, normalizedStart, length); + }, + }, + hasNegativeSubstrBug, + ); + + // ES5 15.5.4.20 + // whitespace from: http://es5.github.io/#x15.5.4.20 + var ws = + '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' + + '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028' + + '\u2029\uFEFF'; + var zeroWidth = '\u200b'; + var wsRegexChars = '[' + ws + ']'; + var trimBeginRegexp = new RegExp('^' + wsRegexChars + wsRegexChars + '*'); + var trimEndRegexp = new RegExp(wsRegexChars + wsRegexChars + '*$'); + var hasTrimWhitespaceBug = StringPrototype.trim && (ws.trim() || !zeroWidth.trim()); + defineProperties( + StringPrototype, + { + // http://blog.stevenlevithan.com/archives/faster-trim-javascript + // http://perfectionkills.com/whitespace-deviations/ + trim: function trim() { + if (typeof this === 'undefined' || this === null) { + throw new TypeError("can't convert " + this + ' to object'); + } + return $String(this).replace(trimBeginRegexp, '').replace(trimEndRegexp, ''); + }, + }, + hasTrimWhitespaceBug, + ); + var trim = call.bind(String.prototype.trim); + + var hasLastIndexBug = StringPrototype.lastIndexOf && 'abcあい'.lastIndexOf('あい', 2) !== -1; + defineProperties( + StringPrototype, + { + lastIndexOf: function lastIndexOf(searchString) { + if (typeof this === 'undefined' || this === null) { + throw new TypeError("can't convert " + this + ' to object'); + } + var S = $String(this); + var searchStr = $String(searchString); + var numPos = arguments.length > 1 ? $Number(arguments[1]) : NaN; + var pos = isActualNaN(numPos) ? Infinity : ES.ToInteger(numPos); + var start = min(max(pos, 0), S.length); + var searchLen = searchStr.length; + var k = start + searchLen; + while (k > 0) { + k = max(0, k - searchLen); + var index = strIndexOf(strSlice(S, k, start + searchLen), searchStr); + if (index !== -1) { + return k + index; + } + } + return -1; + }, + }, + hasLastIndexBug, + ); + + var originalLastIndexOf = StringPrototype.lastIndexOf; + defineProperties( + StringPrototype, + { + lastIndexOf: function lastIndexOf(searchString) { + return originalLastIndexOf.apply(this, arguments); + }, + }, + StringPrototype.lastIndexOf.length !== 1, + ); + + // ES-5 15.1.2.2 + // eslint-disable-next-line radix + if (parseInt(ws + '08') !== 8 || parseInt(ws + '0x16') !== 22) { + /* global parseInt: true */ + parseInt = (function (origParseInt) { + var hexRegex = /^[-+]?0[xX]/; + return function parseInt(str, radix) { + if (typeof str === 'symbol') { + // handle Symbols in node 8.3/8.4 + // eslint-disable-next-line no-implicit-coercion, no-unused-expressions + '' + str; // jscs:ignore disallowImplicitTypeConversion + } + + var string = trim(String(str)); + var defaultedRadix = $Number(radix) || (hexRegex.test(string) ? 16 : 10); + return origParseInt(string, defaultedRadix); + }; + })(parseInt); + } + + // https://es5.github.io/#x15.1.2.3 + if (1 / parseFloat('-0') !== -Infinity) { + /* global parseFloat: true */ + parseFloat = (function (origParseFloat) { + return function parseFloat(string) { + var inputString = trim(String(string)); + var result = origParseFloat(inputString); + return result === 0 && strSlice(inputString, 0, 1) === '-' ? -0 : result; + }; + })(parseFloat); + } + + if (String(new RangeError('test')) !== 'RangeError: test') { + var errorToStringShim = function toString() { + if (typeof this === 'undefined' || this === null) { + throw new TypeError("can't convert " + this + ' to object'); + } + var name = this.name; + if (typeof name === 'undefined') { + name = 'Error'; + } else if (typeof name !== 'string') { + name = $String(name); + } + var msg = this.message; + if (typeof msg === 'undefined') { + msg = ''; + } else if (typeof msg !== 'string') { + msg = $String(msg); + } + if (!name) { + return msg; + } + if (!msg) { + return name; + } + return name + ': ' + msg; + }; + // can't use defineProperties here because of toString enumeration issue in IE <= 8 + Error.prototype.toString = errorToStringShim; + } + + if (supportsDescriptors) { + var ensureNonEnumerable = function (obj, prop) { + if (isEnum(obj, prop)) { + var desc = Object.getOwnPropertyDescriptor(obj, prop); + if (desc.configurable) { + desc.enumerable = false; + Object.defineProperty(obj, prop, desc); + } + } + }; + ensureNonEnumerable(Error.prototype, 'message'); + if (Error.prototype.message !== '') { + Error.prototype.message = ''; + } + ensureNonEnumerable(Error.prototype, 'name'); + } + + if (String(/a/gim) !== '/a/gim') { + var regexToString = function toString() { + var str = '/' + this.source + '/'; + if (this.global) { + str += 'g'; + } + if (this.ignoreCase) { + str += 'i'; + } + if (this.multiline) { + str += 'm'; + } + return str; + }; + // can't use defineProperties here because of toString enumeration issue in IE <= 8 + RegExp.prototype.toString = regexToString; + } + }); + + /***/ + }, + /* 472 */ + /***/ function (module, exports, __webpack_require__) { + var _Object$getOwnPropertyDescriptor = __webpack_require__(473); + + var _Object$defineProperty = __webpack_require__(476); + + var _typeof = __webpack_require__(479); + + var _WeakMap = __webpack_require__(498); + + function _getRequireWildcardCache() { + if (typeof _WeakMap !== 'function') return null; + var cache = new _WeakMap(); + + _getRequireWildcardCache = function _getRequireWildcardCache() { + return cache; + }; + + return cache; + } + + function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } + + if (obj === null || (_typeof(obj) !== 'object' && typeof obj !== 'function')) { + return { + default: obj, + }; + } + + var cache = _getRequireWildcardCache(); + + if (cache && cache.has(obj)) { + return cache.get(obj); + } + + var newObj = {}; + var hasPropertyDescriptor = _Object$defineProperty && _Object$getOwnPropertyDescriptor; + + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + var desc = hasPropertyDescriptor ? _Object$getOwnPropertyDescriptor(obj, key) : null; + + if (desc && (desc.get || desc.set)) { + _Object$defineProperty(newObj, key, desc); + } else { + newObj[key] = obj[key]; + } + } + } + + newObj['default'] = obj; + + if (cache) { + cache.set(obj, newObj); + } + + return newObj; + } + + module.exports = _interopRequireWildcard; + + /***/ + }, + /* 473 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = __webpack_require__(474); + + /***/ + }, + /* 474 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(475); + var $Object = __webpack_require__(13).Object; + module.exports = function getOwnPropertyDescriptor(it, key) { + return $Object.getOwnPropertyDescriptor(it, key); + }; + + /***/ + }, + /* 475 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) + var toIObject = __webpack_require__(61); + var $getOwnPropertyDescriptor = __webpack_require__(212).f; + + __webpack_require__(215)('getOwnPropertyDescriptor', function () { + return function getOwnPropertyDescriptor(it, key) { + return $getOwnPropertyDescriptor(toIObject(it), key); + }; + }); + + /***/ + }, + /* 476 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = __webpack_require__(477); + + /***/ + }, + /* 477 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(478); + var $Object = __webpack_require__(13).Object; + module.exports = function defineProperty(it, key, desc) { + return $Object.defineProperty(it, key, desc); + }; + + /***/ + }, + /* 478 */ + /***/ function (module, exports, __webpack_require__) { + var $export = __webpack_require__(36); + // 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes) + $export($export.S + $export.F * !__webpack_require__(28), 'Object', { + defineProperty: __webpack_require__(30).f, + }); + + /***/ + }, + /* 479 */ + /***/ function (module, exports, __webpack_require__) { + var _Symbol$iterator = __webpack_require__(480); + + var _Symbol = __webpack_require__(491); + + function _typeof(obj) { + '@babel/helpers - typeof'; + + if (typeof _Symbol === 'function' && typeof _Symbol$iterator === 'symbol') { + module.exports = _typeof = function _typeof(obj) { + return typeof obj; + }; + } else { + module.exports = _typeof = function _typeof(obj) { + return obj && + typeof _Symbol === 'function' && + obj.constructor === _Symbol && + obj !== _Symbol.prototype + ? 'symbol' + : typeof obj; + }; + } + + return _typeof(obj); + } + + module.exports = _typeof; + + /***/ + }, + /* 480 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = __webpack_require__(481); + + /***/ + }, + /* 481 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(144); + __webpack_require__(152); + module.exports = __webpack_require__(153).f('iterator'); + + /***/ + }, + /* 482 */ + /***/ function (module, exports, __webpack_require__) { + var toInteger = __webpack_require__(145); + var defined = __webpack_require__(142); + // true -> String#at + // false -> String#codePointAt + module.exports = function (TO_STRING) { + return function (that, pos) { + var s = String(defined(that)); + var i = toInteger(pos); + var l = s.length; + var a, b; + if (i < 0 || i >= l) return TO_STRING ? '' : undefined; + a = s.charCodeAt(i); + return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff + ? TO_STRING + ? s.charAt(i) + : a + : TO_STRING + ? s.slice(i, i + 2) + : ((a - 0xd800) << 10) + (b - 0xdc00) + 0x10000; + }; + }; + + /***/ + }, + /* 483 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var create = __webpack_require__(148); + var descriptor = __webpack_require__(79); + var setToStringTag = __webpack_require__(105); + var IteratorPrototype = {}; + + // 25.1.2.1.1 %IteratorPrototype%[@@iterator]() + __webpack_require__(46)(IteratorPrototype, __webpack_require__(22)('iterator'), function () { + return this; + }); + + module.exports = function (Constructor, NAME, next) { + Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) }); + setToStringTag(Constructor, NAME + ' Iterator'); + }; + + /***/ + }, + /* 484 */ + /***/ function (module, exports, __webpack_require__) { + var dP = __webpack_require__(30); + var anObject = __webpack_require__(63); + var getKeys = __webpack_require__(81); + + module.exports = __webpack_require__(28) + ? Object.defineProperties + : function defineProperties(O, Properties) { + anObject(O); + var keys = getKeys(Properties); + var length = keys.length; + var i = 0; + var P; + while (length > i) dP.f(O, (P = keys[i++]), Properties[P]); + return O; + }; + + /***/ + }, + /* 485 */ + /***/ function (module, exports, __webpack_require__) { + // false -> Array#indexOf + // true -> Array#includes + var toIObject = __webpack_require__(61); + var toLength = __webpack_require__(103); + var toAbsoluteIndex = __webpack_require__(486); + module.exports = function (IS_INCLUDES) { + return function ($this, el, fromIndex) { + var O = toIObject($this); + var length = toLength(O.length); + var index = toAbsoluteIndex(fromIndex, length); + var value; + // Array#includes uses SameValueZero equality algorithm + // eslint-disable-next-line no-self-compare + if (IS_INCLUDES && el != el) + while (length > index) { + value = O[index++]; + // eslint-disable-next-line no-self-compare + if (value != value) return true; + // Array#indexOf ignores holes, Array#includes - not + } + else + for (; length > index; index++) + if (IS_INCLUDES || index in O) { + if (O[index] === el) return IS_INCLUDES || index || 0; + } + return !IS_INCLUDES && -1; + }; + }; + + /***/ + }, + /* 486 */ + /***/ function (module, exports, __webpack_require__) { + var toInteger = __webpack_require__(145); + var max = Math.max; + var min = Math.min; + module.exports = function (index, length) { + index = toInteger(index); + return index < 0 ? max(index + length, 0) : min(index, length); + }; + + /***/ + }, + /* 487 */ + /***/ function (module, exports, __webpack_require__) { + var document = __webpack_require__(29).document; + module.exports = document && document.documentElement; + + /***/ + }, + /* 488 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) + var has = __webpack_require__(45); + var toObject = __webpack_require__(70); + var IE_PROTO = __webpack_require__(149)('IE_PROTO'); + var ObjectProto = Object.prototype; + + module.exports = + Object.getPrototypeOf || + function (O) { + O = toObject(O); + if (has(O, IE_PROTO)) return O[IE_PROTO]; + if (typeof O.constructor == 'function' && O instanceof O.constructor) { + return O.constructor.prototype; + } + return O instanceof Object ? ObjectProto : null; + }; + + /***/ + }, + /* 489 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var addToUnscopables = __webpack_require__(490); + var step = __webpack_require__(218); + var Iterators = __webpack_require__(80); + var toIObject = __webpack_require__(61); + + // 22.1.3.4 Array.prototype.entries() + // 22.1.3.13 Array.prototype.keys() + // 22.1.3.29 Array.prototype.values() + // 22.1.3.30 Array.prototype[@@iterator]() + module.exports = __webpack_require__(146)( + Array, + 'Array', + function (iterated, kind) { + this._t = toIObject(iterated); // target + this._i = 0; // next index + this._k = kind; // kind + // 22.1.5.2.1 %ArrayIteratorPrototype%.next() + }, + function () { + var O = this._t; + var kind = this._k; + var index = this._i++; + if (!O || index >= O.length) { + this._t = undefined; + return step(1); + } + if (kind == 'keys') return step(0, index); + if (kind == 'values') return step(0, O[index]); + return step(0, [index, O[index]]); + }, + 'values', + ); + + // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) + Iterators.Arguments = Iterators.Array; + + addToUnscopables('keys'); + addToUnscopables('values'); + addToUnscopables('entries'); + + /***/ + }, + /* 490 */ + /***/ function (module, exports) { + module.exports = function () { + /* empty */ + }; + + /***/ + }, + /* 491 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = __webpack_require__(492); + + /***/ + }, + /* 492 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(493); + __webpack_require__(156); + __webpack_require__(496); + __webpack_require__(497); + module.exports = __webpack_require__(13).Symbol; + + /***/ + }, + /* 493 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // ECMAScript 6 symbols shim + var global = __webpack_require__(29); + var has = __webpack_require__(45); + var DESCRIPTORS = __webpack_require__(28); + var $export = __webpack_require__(36); + var redefine = __webpack_require__(147); + var META = __webpack_require__(82).KEY; + var $fails = __webpack_require__(62); + var shared = __webpack_require__(150); + var setToStringTag = __webpack_require__(105); + var uid = __webpack_require__(104); + var wks = __webpack_require__(22); + var wksExt = __webpack_require__(153); + var wksDefine = __webpack_require__(154); + var enumKeys = __webpack_require__(494); + var isArray = __webpack_require__(219); + var anObject = __webpack_require__(63); + var isObject = __webpack_require__(35); + var toObject = __webpack_require__(70); + var toIObject = __webpack_require__(61); + var toPrimitive = __webpack_require__(143); + var createDesc = __webpack_require__(79); + var _create = __webpack_require__(148); + var gOPNExt = __webpack_require__(495); + var $GOPD = __webpack_require__(212); + var $GOPS = __webpack_require__(155); + var $DP = __webpack_require__(30); + var $keys = __webpack_require__(81); + var gOPD = $GOPD.f; + var dP = $DP.f; + var gOPN = gOPNExt.f; + var $Symbol = global.Symbol; + var $JSON = global.JSON; + var _stringify = $JSON && $JSON.stringify; + var PROTOTYPE = 'prototype'; + var HIDDEN = wks('_hidden'); + var TO_PRIMITIVE = wks('toPrimitive'); + var isEnum = {}.propertyIsEnumerable; + var SymbolRegistry = shared('symbol-registry'); + var AllSymbols = shared('symbols'); + var OPSymbols = shared('op-symbols'); + var ObjectProto = Object[PROTOTYPE]; + var USE_NATIVE = typeof $Symbol == 'function' && !!$GOPS.f; + var QObject = global.QObject; + // Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173 + var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild; + + // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687 + var setSymbolDesc = + DESCRIPTORS && + $fails(function () { + return ( + _create( + dP({}, 'a', { + get: function () { + return dP(this, 'a', { value: 7 }).a; + }, + }), + ).a != 7 + ); + }) + ? function (it, key, D) { + var protoDesc = gOPD(ObjectProto, key); + if (protoDesc) delete ObjectProto[key]; + dP(it, key, D); + if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc); + } + : dP; + + var wrap = function (tag) { + var sym = (AllSymbols[tag] = _create($Symbol[PROTOTYPE])); + sym._k = tag; + return sym; + }; + + var isSymbol = + USE_NATIVE && typeof $Symbol.iterator == 'symbol' + ? function (it) { + return typeof it == 'symbol'; + } + : function (it) { + return it instanceof $Symbol; + }; + + var $defineProperty = function defineProperty(it, key, D) { + if (it === ObjectProto) $defineProperty(OPSymbols, key, D); + anObject(it); + key = toPrimitive(key, true); + anObject(D); + if (has(AllSymbols, key)) { + if (!D.enumerable) { + if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {})); + it[HIDDEN][key] = true; + } else { + if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false; + D = _create(D, { enumerable: createDesc(0, false) }); + } + return setSymbolDesc(it, key, D); + } + return dP(it, key, D); + }; + var $defineProperties = function defineProperties(it, P) { + anObject(it); + var keys = enumKeys((P = toIObject(P))); + var i = 0; + var l = keys.length; + var key; + while (l > i) $defineProperty(it, (key = keys[i++]), P[key]); + return it; + }; + var $create = function create(it, P) { + return P === undefined ? _create(it) : $defineProperties(_create(it), P); + }; + var $propertyIsEnumerable = function propertyIsEnumerable(key) { + var E = isEnum.call(this, (key = toPrimitive(key, true))); + if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false; + return E || !has(this, key) || !has(AllSymbols, key) || (has(this, HIDDEN) && this[HIDDEN][key]) + ? E + : true; + }; + var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) { + it = toIObject(it); + key = toPrimitive(key, true); + if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return; + var D = gOPD(it, key); + if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true; + return D; + }; + var $getOwnPropertyNames = function getOwnPropertyNames(it) { + var names = gOPN(toIObject(it)); + var result = []; + var i = 0; + var key; + while (names.length > i) { + if (!has(AllSymbols, (key = names[i++])) && key != HIDDEN && key != META) result.push(key); + } + return result; + }; + var $getOwnPropertySymbols = function getOwnPropertySymbols(it) { + var IS_OP = it === ObjectProto; + var names = gOPN(IS_OP ? OPSymbols : toIObject(it)); + var result = []; + var i = 0; + var key; + while (names.length > i) { + if (has(AllSymbols, (key = names[i++])) && (IS_OP ? has(ObjectProto, key) : true)) + result.push(AllSymbols[key]); + } + return result; + }; + + // 19.4.1.1 Symbol([description]) + if (!USE_NATIVE) { + $Symbol = function Symbol() { + if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!'); + var tag = uid(arguments.length > 0 ? arguments[0] : undefined); + var $set = function (value) { + if (this === ObjectProto) $set.call(OPSymbols, value); + if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false; + setSymbolDesc(this, tag, createDesc(1, value)); + }; + if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set }); + return wrap(tag); + }; + redefine($Symbol[PROTOTYPE], 'toString', function toString() { + return this._k; + }); + + $GOPD.f = $getOwnPropertyDescriptor; + $DP.f = $defineProperty; + __webpack_require__(220).f = gOPNExt.f = $getOwnPropertyNames; + __webpack_require__(101).f = $propertyIsEnumerable; + $GOPS.f = $getOwnPropertySymbols; + + if (DESCRIPTORS && !__webpack_require__(102)) { + redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true); + } + + wksExt.f = function (name) { + return wrap(wks(name)); + }; + } + + $export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol }); + + for ( + var es6Symbols = + // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14 + 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'.split( + ',', + ), + j = 0; + es6Symbols.length > j; + + ) + wks(es6Symbols[j++]); + + for (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k; ) + wksDefine(wellKnownSymbols[k++]); + + $export($export.S + $export.F * !USE_NATIVE, 'Symbol', { + // 19.4.2.1 Symbol.for(key) + for: function (key) { + return has(SymbolRegistry, (key += '')) + ? SymbolRegistry[key] + : (SymbolRegistry[key] = $Symbol(key)); + }, + // 19.4.2.5 Symbol.keyFor(sym) + keyFor: function keyFor(sym) { + if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!'); + for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key; + }, + useSetter: function () { + setter = true; + }, + useSimple: function () { + setter = false; + }, + }); + + $export($export.S + $export.F * !USE_NATIVE, 'Object', { + // 19.1.2.2 Object.create(O [, Properties]) + create: $create, + // 19.1.2.4 Object.defineProperty(O, P, Attributes) + defineProperty: $defineProperty, + // 19.1.2.3 Object.defineProperties(O, Properties) + defineProperties: $defineProperties, + // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) + getOwnPropertyDescriptor: $getOwnPropertyDescriptor, + // 19.1.2.7 Object.getOwnPropertyNames(O) + getOwnPropertyNames: $getOwnPropertyNames, + // 19.1.2.8 Object.getOwnPropertySymbols(O) + getOwnPropertySymbols: $getOwnPropertySymbols, + }); + + // Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives + // https://bugs.chromium.org/p/v8/issues/detail?id=3443 + var FAILS_ON_PRIMITIVES = $fails(function () { + $GOPS.f(1); + }); + + $export($export.S + $export.F * FAILS_ON_PRIMITIVES, 'Object', { + getOwnPropertySymbols: function getOwnPropertySymbols(it) { + return $GOPS.f(toObject(it)); + }, + }); + + // 24.3.2 JSON.stringify(value [, replacer [, space]]) + $JSON && + $export( + $export.S + + $export.F * + (!USE_NATIVE || + $fails(function () { + var S = $Symbol(); + // MS Edge converts symbol values to JSON as {} + // WebKit converts symbol values to JSON as null + // V8 throws on boxed symbols + return ( + _stringify([S]) != '[null]' || + _stringify({ a: S }) != '{}' || + _stringify(Object(S)) != '{}' + ); + })), + 'JSON', + { + stringify: function stringify(it) { + var args = [it]; + var i = 1; + var replacer, $replacer; + while (arguments.length > i) args.push(arguments[i++]); + $replacer = replacer = args[1]; + if ((!isObject(replacer) && it === undefined) || isSymbol(it)) return; // IE8 returns string on undefined + if (!isArray(replacer)) + replacer = function (key, value) { + if (typeof $replacer == 'function') value = $replacer.call(this, key, value); + if (!isSymbol(value)) return value; + }; + args[1] = replacer; + return _stringify.apply($JSON, args); + }, + }, + ); + + // 19.4.3.4 Symbol.prototype[@@toPrimitive](hint) + $Symbol[PROTOTYPE][TO_PRIMITIVE] || + __webpack_require__(46)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf); + // 19.4.3.5 Symbol.prototype[@@toStringTag] + setToStringTag($Symbol, 'Symbol'); + // 20.2.1.9 Math[@@toStringTag] + setToStringTag(Math, 'Math', true); + // 24.3.3 JSON[@@toStringTag] + setToStringTag(global.JSON, 'JSON', true); + + /***/ + }, + /* 494 */ + /***/ function (module, exports, __webpack_require__) { + // all enumerable object keys, includes symbols + var getKeys = __webpack_require__(81); + var gOPS = __webpack_require__(155); + var pIE = __webpack_require__(101); + module.exports = function (it) { + var result = getKeys(it); + var getSymbols = gOPS.f; + if (getSymbols) { + var symbols = getSymbols(it); + var isEnum = pIE.f; + var i = 0; + var key; + while (symbols.length > i) if (isEnum.call(it, (key = symbols[i++]))) result.push(key); + } + return result; + }; + + /***/ + }, + /* 495 */ + /***/ function (module, exports, __webpack_require__) { + // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window + var toIObject = __webpack_require__(61); + var gOPN = __webpack_require__(220).f; + var toString = {}.toString; + + var windowNames = + typeof window == 'object' && window && Object.getOwnPropertyNames + ? Object.getOwnPropertyNames(window) + : []; + + var getWindowNames = function (it) { + try { + return gOPN(it); + } catch (e) { + return windowNames.slice(); + } + }; + + module.exports.f = function getOwnPropertyNames(it) { + return windowNames && toString.call(it) == '[object Window]' + ? getWindowNames(it) + : gOPN(toIObject(it)); + }; + + /***/ + }, + /* 496 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(154)('asyncIterator'); + + /***/ + }, + /* 497 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(154)('observable'); + + /***/ + }, + /* 498 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = __webpack_require__(499); + + /***/ + }, + /* 499 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(156); + __webpack_require__(152); + __webpack_require__(500); + __webpack_require__(504); + __webpack_require__(505); + module.exports = __webpack_require__(13).WeakMap; + + /***/ + }, + /* 500 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var global = __webpack_require__(29); + var each = __webpack_require__(157)(0); + var redefine = __webpack_require__(147); + var meta = __webpack_require__(82); + var assign = __webpack_require__(221); + var weak = __webpack_require__(503); + var isObject = __webpack_require__(35); + var validate = __webpack_require__(84); + var NATIVE_WEAK_MAP = __webpack_require__(84); + var IS_IE11 = !global.ActiveXObject && 'ActiveXObject' in global; + var WEAK_MAP = 'WeakMap'; + var getWeak = meta.getWeak; + var isExtensible = Object.isExtensible; + var uncaughtFrozenStore = weak.ufstore; + var InternalMap; + + var wrapper = function (get) { + return function WeakMap() { + return get(this, arguments.length > 0 ? arguments[0] : undefined); + }; + }; + + var methods = { + // 23.3.3.3 WeakMap.prototype.get(key) + get: function get(key) { + if (isObject(key)) { + var data = getWeak(key); + if (data === true) return uncaughtFrozenStore(validate(this, WEAK_MAP)).get(key); + return data ? data[this._i] : undefined; + } + }, + // 23.3.3.5 WeakMap.prototype.set(key, value) + set: function set(key, value) { + return weak.def(validate(this, WEAK_MAP), key, value); + }, + }; + + // 23.3 WeakMap Objects + var $WeakMap = (module.exports = __webpack_require__(226)( + WEAK_MAP, + wrapper, + methods, + weak, + true, + true, + )); + + // IE11 WeakMap frozen keys fix + if (NATIVE_WEAK_MAP && IS_IE11) { + InternalMap = weak.getConstructor(wrapper, WEAK_MAP); + assign(InternalMap.prototype, methods); + meta.NEED = true; + each(['delete', 'has', 'get', 'set'], function (key) { + var proto = $WeakMap.prototype; + var method = proto[key]; + redefine(proto, key, function (a, b) { + // store frozen objects on internal weakmap shim + if (isObject(a) && !isExtensible(a)) { + if (!this._f) this._f = new InternalMap(); + var result = this._f[key](a, b); + return key == 'set' ? this : result; + // store all the rest on native weakmap + } + return method.call(this, a, b); + }); + }); + } + + /***/ + }, + /* 501 */ + /***/ function (module, exports, __webpack_require__) { + // 9.4.2.3 ArraySpeciesCreate(originalArray, length) + var speciesConstructor = __webpack_require__(502); + + module.exports = function (original, length) { + return new (speciesConstructor(original))(length); + }; + + /***/ + }, + /* 502 */ + /***/ function (module, exports, __webpack_require__) { + var isObject = __webpack_require__(35); + var isArray = __webpack_require__(219); + var SPECIES = __webpack_require__(22)('species'); + + module.exports = function (original) { + var C; + if (isArray(original)) { + C = original.constructor; + // cross-realm fallback + if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined; + if (isObject(C)) { + C = C[SPECIES]; + if (C === null) C = undefined; + } + } + return C === undefined ? Array : C; + }; + + /***/ + }, + /* 503 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var redefineAll = __webpack_require__(158); + var getWeak = __webpack_require__(82).getWeak; + var anObject = __webpack_require__(63); + var isObject = __webpack_require__(35); + var anInstance = __webpack_require__(159); + var forOf = __webpack_require__(83); + var createArrayMethod = __webpack_require__(157); + var $has = __webpack_require__(45); + var validate = __webpack_require__(84); + var arrayFind = createArrayMethod(5); + var arrayFindIndex = createArrayMethod(6); + var id = 0; + + // fallback for uncaught frozen keys + var uncaughtFrozenStore = function (that) { + return that._l || (that._l = new UncaughtFrozenStore()); + }; + var UncaughtFrozenStore = function () { + this.a = []; + }; + var findUncaughtFrozen = function (store, key) { + return arrayFind(store.a, function (it) { + return it[0] === key; + }); + }; + UncaughtFrozenStore.prototype = { + get: function (key) { + var entry = findUncaughtFrozen(this, key); + if (entry) return entry[1]; + }, + has: function (key) { + return !!findUncaughtFrozen(this, key); + }, + set: function (key, value) { + var entry = findUncaughtFrozen(this, key); + if (entry) entry[1] = value; + else this.a.push([key, value]); + }, + delete: function (key) { + var index = arrayFindIndex(this.a, function (it) { + return it[0] === key; + }); + if (~index) this.a.splice(index, 1); + return !!~index; + }, + }; + + module.exports = { + getConstructor: function (wrapper, NAME, IS_MAP, ADDER) { + var C = wrapper(function (that, iterable) { + anInstance(that, C, NAME, '_i'); + that._t = NAME; // collection type + that._i = id++; // collection id + that._l = undefined; // leak store for uncaught frozen objects + if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that); + }); + redefineAll(C.prototype, { + // 23.3.3.2 WeakMap.prototype.delete(key) + // 23.4.3.3 WeakSet.prototype.delete(value) + delete: function (key) { + if (!isObject(key)) return false; + var data = getWeak(key); + if (data === true) return uncaughtFrozenStore(validate(this, NAME))['delete'](key); + return data && $has(data, this._i) && delete data[this._i]; + }, + // 23.3.3.4 WeakMap.prototype.has(key) + // 23.4.3.4 WeakSet.prototype.has(value) + has: function has(key) { + if (!isObject(key)) return false; + var data = getWeak(key); + if (data === true) return uncaughtFrozenStore(validate(this, NAME)).has(key); + return data && $has(data, this._i); + }, + }); + return C; + }, + def: function (that, key, value) { + var data = getWeak(anObject(key), true); + if (data === true) uncaughtFrozenStore(that).set(key, value); + else data[that._i] = value; + return that; + }, + ufstore: uncaughtFrozenStore, + }; + + /***/ + }, + /* 504 */ + /***/ function (module, exports, __webpack_require__) { + // https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.of + __webpack_require__(227)('WeakMap'); + + /***/ + }, + /* 505 */ + /***/ function (module, exports, __webpack_require__) { + // https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.from + __webpack_require__(228)('WeakMap'); + + /***/ + }, + /* 506 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(507); + module.exports = __webpack_require__(13).Object.assign; + + /***/ + }, + /* 507 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.3.1 Object.assign(target, source) + var $export = __webpack_require__(36); + + $export($export.S + $export.F, 'Object', { assign: __webpack_require__(221) }); + + /***/ + }, + /* 508 */ + /***/ function (module, exports, __webpack_require__) { + var core = __webpack_require__(13); + var $JSON = core.JSON || (core.JSON = { stringify: JSON.stringify }); + module.exports = function stringify(it) { + // eslint-disable-line no-unused-vars + return $JSON.stringify.apply($JSON, arguments); + }; + + /***/ + }, + /* 509 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(510); + module.exports = __webpack_require__(13).Object.keys; + + /***/ + }, + /* 510 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.14 Object.keys(O) + var toObject = __webpack_require__(70); + var $keys = __webpack_require__(81); + + __webpack_require__(215)('keys', function () { + return function keys(it) { + return $keys(toObject(it)); + }; + }); + + /***/ + }, + /* 511 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** @license React v16.12.0 + * react-dom.development.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + + if (true) { + (function () { + 'use strict'; + + var React = __webpack_require__(1); + var _assign = __webpack_require__(64); + var Scheduler = __webpack_require__(513); + var checkPropTypes = __webpack_require__(107); + var tracing = __webpack_require__(515); + + // Do not require this module directly! Use normal `invariant` calls with + // template literal strings. The messages will be replaced with error codes + // during build. + + /** + * Use invariant() to assert state which your program assumes to be true. + * + * Provide sprintf-style format (only %s is supported) and arguments + * to provide information about what broke and what you were + * expecting. + * + * The invariant message will be stripped in production, but the invariant + * will remain to ensure logic does not differ in production. + */ + + if (!React) { + { + throw Error( + 'ReactDOM was loaded before React. Make sure you load the React package before loading ReactDOM.', + ); + } + } + + /** + * Injectable ordering of event plugins. + */ + var eventPluginOrder = null; + /** + * Injectable mapping from names to event plugin modules. + */ + + var namesToPlugins = {}; + /** + * Recomputes the plugin list using the injected plugins and plugin ordering. + * + * @private + */ + + function recomputePluginOrdering() { + if (!eventPluginOrder) { + // Wait until an `eventPluginOrder` is injected. + return; + } + + for (var pluginName in namesToPlugins) { + var pluginModule = namesToPlugins[pluginName]; + var pluginIndex = eventPluginOrder.indexOf(pluginName); + + if (!(pluginIndex > -1)) { + { + throw Error( + 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `' + + pluginName + + '`.', + ); + } + } + + if (plugins[pluginIndex]) { + continue; + } + + if (!pluginModule.extractEvents) { + { + throw Error( + 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `' + + pluginName + + '` does not.', + ); + } + } + + plugins[pluginIndex] = pluginModule; + var publishedEvents = pluginModule.eventTypes; + + for (var eventName in publishedEvents) { + if (!publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName)) { + { + throw Error( + 'EventPluginRegistry: Failed to publish event `' + + eventName + + '` for plugin `' + + pluginName + + '`.', + ); + } + } + } + } + } + /** + * Publishes an event so that it can be dispatched by the supplied plugin. + * + * @param {object} dispatchConfig Dispatch configuration for the event. + * @param {object} PluginModule Plugin publishing the event. + * @return {boolean} True if the event was successfully published. + * @private + */ + + function publishEventForPlugin(dispatchConfig, pluginModule, eventName) { + if (!!eventNameDispatchConfigs.hasOwnProperty(eventName)) { + { + throw Error( + 'EventPluginHub: More than one plugin attempted to publish the same event name, `' + + eventName + + '`.', + ); + } + } + + eventNameDispatchConfigs[eventName] = dispatchConfig; + var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames; + + if (phasedRegistrationNames) { + for (var phaseName in phasedRegistrationNames) { + if (phasedRegistrationNames.hasOwnProperty(phaseName)) { + var phasedRegistrationName = phasedRegistrationNames[phaseName]; + publishRegistrationName(phasedRegistrationName, pluginModule, eventName); + } + } + + return true; + } else if (dispatchConfig.registrationName) { + publishRegistrationName(dispatchConfig.registrationName, pluginModule, eventName); + return true; + } + + return false; + } + /** + * Publishes a registration name that is used to identify dispatched events. + * + * @param {string} registrationName Registration name to add. + * @param {object} PluginModule Plugin publishing the event. + * @private + */ + + function publishRegistrationName(registrationName, pluginModule, eventName) { + if (!!registrationNameModules[registrationName]) { + { + throw Error( + 'EventPluginHub: More than one plugin attempted to publish the same registration name, `' + + registrationName + + '`.', + ); + } + } + + registrationNameModules[registrationName] = pluginModule; + registrationNameDependencies[registrationName] = pluginModule.eventTypes[eventName].dependencies; + + { + var lowerCasedName = registrationName.toLowerCase(); + possibleRegistrationNames[lowerCasedName] = registrationName; + + if (registrationName === 'onDoubleClick') { + possibleRegistrationNames.ondblclick = registrationName; + } + } + } + /** + * Registers plugins so that they can extract and dispatch events. + * + * @see {EventPluginHub} + */ + + /** + * Ordered list of injected plugins. + */ + + var plugins = []; + /** + * Mapping from event name to dispatch config + */ + + var eventNameDispatchConfigs = {}; + /** + * Mapping from registration name to plugin module + */ + + var registrationNameModules = {}; + /** + * Mapping from registration name to event name + */ + + var registrationNameDependencies = {}; + /** + * Mapping from lowercase registration names to the properly cased version, + * used to warn in the case of missing event handlers. Available + * only in true. + * @type {Object} + */ + + var possibleRegistrationNames = {}; // Trust the developer to only use possibleRegistrationNames in true + + /** + * Injects an ordering of plugins (by plugin name). This allows the ordering + * to be decoupled from injection of the actual plugins so that ordering is + * always deterministic regardless of packaging, on-the-fly injection, etc. + * + * @param {array} InjectedEventPluginOrder + * @internal + * @see {EventPluginHub.injection.injectEventPluginOrder} + */ + + function injectEventPluginOrder(injectedEventPluginOrder) { + if (!!eventPluginOrder) { + { + throw Error( + 'EventPluginRegistry: Cannot inject event plugin ordering more than once. You are likely trying to load more than one copy of React.', + ); + } + } // Clone the ordering so it cannot be dynamically mutated. + + eventPluginOrder = Array.prototype.slice.call(injectedEventPluginOrder); + recomputePluginOrdering(); + } + /** + * Injects plugins to be used by `EventPluginHub`. The plugin names must be + * in the ordering injected by `injectEventPluginOrder`. + * + * Plugins can be injected as part of page initialization or on-the-fly. + * + * @param {object} injectedNamesToPlugins Map from names to plugin modules. + * @internal + * @see {EventPluginHub.injection.injectEventPluginsByName} + */ + + function injectEventPluginsByName(injectedNamesToPlugins) { + var isOrderingDirty = false; + + for (var pluginName in injectedNamesToPlugins) { + if (!injectedNamesToPlugins.hasOwnProperty(pluginName)) { + continue; + } + + var pluginModule = injectedNamesToPlugins[pluginName]; + + if (!namesToPlugins.hasOwnProperty(pluginName) || namesToPlugins[pluginName] !== pluginModule) { + if (!!namesToPlugins[pluginName]) { + { + throw Error( + 'EventPluginRegistry: Cannot inject two different event plugins using the same name, `' + + pluginName + + '`.', + ); + } + } + + namesToPlugins[pluginName] = pluginModule; + isOrderingDirty = true; + } + } + + if (isOrderingDirty) { + recomputePluginOrdering(); + } + } + + var invokeGuardedCallbackImpl = function (name, func, context, a, b, c, d, e, f) { + var funcArgs = Array.prototype.slice.call(arguments, 3); + + try { + func.apply(context, funcArgs); + } catch (error) { + this.onError(error); + } + }; + + { + // In DEV mode, we swap out invokeGuardedCallback for a special version + // that plays more nicely with the browser's DevTools. The idea is to preserve + // "Pause on exceptions" behavior. Because React wraps all user-provided + // functions in invokeGuardedCallback, and the production version of + // invokeGuardedCallback uses a try-catch, all user exceptions are treated + // like caught exceptions, and the DevTools won't pause unless the developer + // takes the extra step of enabling pause on caught exceptions. This is + // unintuitive, though, because even though React has caught the error, from + // the developer's perspective, the error is uncaught. + // + // To preserve the expected "Pause on exceptions" behavior, we don't use a + // try-catch in DEV. Instead, we synchronously dispatch a fake event to a fake + // DOM node, and call the user-provided callback from inside an event handler + // for that fake event. If the callback throws, the error is "captured" using + // a global event handler. But because the error happens in a different + // event loop context, it does not interrupt the normal program flow. + // Effectively, this gives us try-catch behavior without actually using + // try-catch. Neat! + // Check that the browser supports the APIs we need to implement our special + // DEV version of invokeGuardedCallback + if ( + typeof window !== 'undefined' && + typeof window.dispatchEvent === 'function' && + typeof document !== 'undefined' && + typeof document.createEvent === 'function' + ) { + var fakeNode = document.createElement('react'); + + var invokeGuardedCallbackDev = function (name, func, context, a, b, c, d, e, f) { + // If document doesn't exist we know for sure we will crash in this method + // when we call document.createEvent(). However this can cause confusing + // errors: https://github.com/facebookincubator/create-react-app/issues/3482 + // So we preemptively throw with a better message instead. + if (!(typeof document !== 'undefined')) { + { + throw Error( + 'The `document` global was defined when React was initialized, but is not defined anymore. This can happen in a test environment if a component schedules an update from an asynchronous callback, but the test has already finished running. To solve this, you can either unmount the component at the end of your test (and ensure that any asynchronous operations get canceled in `componentWillUnmount`), or you can change the test itself to be asynchronous.', + ); + } + } + + var evt = document.createEvent('Event'); // Keeps track of whether the user-provided callback threw an error. We + // set this to true at the beginning, then set it to false right after + // calling the function. If the function errors, `didError` will never be + // set to false. This strategy works even if the browser is flaky and + // fails to call our global error handler, because it doesn't rely on + // the error event at all. + + var didError = true; // Keeps track of the value of window.event so that we can reset it + // during the callback to let user code access window.event in the + // browsers that support it. + + var windowEvent = window.event; // Keeps track of the descriptor of window.event to restore it after event + // dispatching: https://github.com/facebook/react/issues/13688 + + var windowEventDescriptor = Object.getOwnPropertyDescriptor(window, 'event'); // Create an event handler for our fake event. We will synchronously + // dispatch our fake event using `dispatchEvent`. Inside the handler, we + // call the user-provided callback. + + var funcArgs = Array.prototype.slice.call(arguments, 3); + + function callCallback() { + // We immediately remove the callback from event listeners so that + // nested `invokeGuardedCallback` calls do not clash. Otherwise, a + // nested call would trigger the fake event handlers of any call higher + // in the stack. + fakeNode.removeEventListener(evtType, callCallback, false); // We check for window.hasOwnProperty('event') to prevent the + // window.event assignment in both IE <= 10 as they throw an error + // "Member not found" in strict mode, and in Firefox which does not + // support window.event. + + if (typeof window.event !== 'undefined' && window.hasOwnProperty('event')) { + window.event = windowEvent; + } + + func.apply(context, funcArgs); + didError = false; + } // Create a global error event handler. We use this to capture the value + // that was thrown. It's possible that this error handler will fire more + // than once; for example, if non-React code also calls `dispatchEvent` + // and a handler for that event throws. We should be resilient to most of + // those cases. Even if our error event handler fires more than once, the + // last error event is always used. If the callback actually does error, + // we know that the last error event is the correct one, because it's not + // possible for anything else to have happened in between our callback + // erroring and the code that follows the `dispatchEvent` call below. If + // the callback doesn't error, but the error event was fired, we know to + // ignore it because `didError` will be false, as described above. + + var error; // Use this to track whether the error event is ever called. + + var didSetError = false; + var isCrossOriginError = false; + + function handleWindowError(event) { + error = event.error; + didSetError = true; + + if (error === null && event.colno === 0 && event.lineno === 0) { + isCrossOriginError = true; + } + + if (event.defaultPrevented) { + // Some other error handler has prevented default. + // Browsers silence the error report if this happens. + // We'll remember this to later decide whether to log it or not. + if (error != null && typeof error === 'object') { + try { + error._suppressLogging = true; + } catch (inner) { + // Ignore. + } + } + } + } // Create a fake event type. + + var evtType = 'react-' + (name ? name : 'invokeguardedcallback'); // Attach our event handlers + + window.addEventListener('error', handleWindowError); + fakeNode.addEventListener(evtType, callCallback, false); // Synchronously dispatch our fake event. If the user-provided function + // errors, it will trigger our global error handler. + + evt.initEvent(evtType, false, false); + fakeNode.dispatchEvent(evt); + + if (windowEventDescriptor) { + Object.defineProperty(window, 'event', windowEventDescriptor); + } + + if (didError) { + if (!didSetError) { + // The callback errored, but the error event never fired. + error = new Error( + 'An error was thrown inside one of your components, but React ' + + "doesn't know what it was. This is likely due to browser " + + 'flakiness. React does its best to preserve the "Pause on ' + + 'exceptions" behavior of the DevTools, which requires some ' + + "DEV-mode only tricks. It's possible that these don't work in " + + 'your browser. Try triggering the error in production mode, ' + + 'or switching to a modern browser. If you suspect that this is ' + + 'actually an issue with React, please file an issue.', + ); + } else if (isCrossOriginError) { + error = new Error( + "A cross-origin error was thrown. React doesn't have access to " + + 'the actual error object in development. ' + + 'See https://fb.me/react-crossorigin-error for more information.', + ); + } + + this.onError(error); + } // Remove our event listeners + + window.removeEventListener('error', handleWindowError); + }; + + invokeGuardedCallbackImpl = invokeGuardedCallbackDev; + } + } + + var invokeGuardedCallbackImpl$1 = invokeGuardedCallbackImpl; + + var hasError = false; + var caughtError = null; // Used by event system to capture/rethrow the first error. + + var hasRethrowError = false; + var rethrowError = null; + var reporter = { + onError: function (error) { + hasError = true; + caughtError = error; + }, + }; + /** + * Call a function while guarding against errors that happens within it. + * Returns an error if it throws, otherwise null. + * + * In production, this is implemented using a try-catch. The reason we don't + * use a try-catch directly is so that we can swap out a different + * implementation in DEV mode. + * + * @param {String} name of the guard to use for logging or debugging + * @param {Function} func The function to invoke + * @param {*} context The context to use when calling the function + * @param {...*} args Arguments for function + */ + + function invokeGuardedCallback(name, func, context, a, b, c, d, e, f) { + hasError = false; + caughtError = null; + invokeGuardedCallbackImpl$1.apply(reporter, arguments); + } + /** + * Same as invokeGuardedCallback, but instead of returning an error, it stores + * it in a global so it can be rethrown by `rethrowCaughtError` later. + * TODO: See if caughtError and rethrowError can be unified. + * + * @param {String} name of the guard to use for logging or debugging + * @param {Function} func The function to invoke + * @param {*} context The context to use when calling the function + * @param {...*} args Arguments for function + */ + + function invokeGuardedCallbackAndCatchFirstError(name, func, context, a, b, c, d, e, f) { + invokeGuardedCallback.apply(this, arguments); + + if (hasError) { + var error = clearCaughtError(); + + if (!hasRethrowError) { + hasRethrowError = true; + rethrowError = error; + } + } + } + /** + * During execution of guarded functions we will capture the first error which + * we will rethrow to be handled by the top level error handler. + */ + + function rethrowCaughtError() { + if (hasRethrowError) { + var error = rethrowError; + hasRethrowError = false; + rethrowError = null; + throw error; + } + } + function hasCaughtError() { + return hasError; + } + function clearCaughtError() { + if (hasError) { + var error = caughtError; + hasError = false; + caughtError = null; + return error; + } else { + { + { + throw Error( + 'clearCaughtError was called but no error was captured. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + } + } + + /** + * Similar to invariant but only logs a warning if the condition is not met. + * This can be used to log issues in development environments in critical + * paths. Removing the logging code for production environments will keep the + * same logic and follow the same code paths. + */ + var warningWithoutStack = function () {}; + + { + warningWithoutStack = function (condition, format) { + for ( + var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; + _key < _len; + _key++ + ) { + args[_key - 2] = arguments[_key]; + } + + if (format === undefined) { + throw new Error( + '`warningWithoutStack(condition, format, ...args)` requires a warning ' + + 'message argument', + ); + } + + if (args.length > 8) { + // Check before the condition to catch violations early. + throw new Error('warningWithoutStack() currently supports at most 8 arguments.'); + } + + if (condition) { + return; + } + + if (typeof console !== 'undefined') { + var argsWithFormat = args.map(function (item) { + return '' + item; + }); + argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it + // breaks IE9: https://github.com/facebook/react/issues/13610 + + Function.prototype.apply.call(console.error, console, argsWithFormat); + } + + try { + // --- Welcome to debugging React --- + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + var argIndex = 0; + var message = + 'Warning: ' + + format.replace(/%s/g, function () { + return args[argIndex++]; + }); + throw new Error(message); + } catch (x) {} + }; + } + + var warningWithoutStack$1 = warningWithoutStack; + + var getFiberCurrentPropsFromNode = null; + var getInstanceFromNode = null; + var getNodeFromInstance = null; + function setComponentTree( + getFiberCurrentPropsFromNodeImpl, + getInstanceFromNodeImpl, + getNodeFromInstanceImpl, + ) { + getFiberCurrentPropsFromNode = getFiberCurrentPropsFromNodeImpl; + getInstanceFromNode = getInstanceFromNodeImpl; + getNodeFromInstance = getNodeFromInstanceImpl; + + { + !(getNodeFromInstance && getInstanceFromNode) + ? warningWithoutStack$1( + false, + 'EventPluginUtils.setComponentTree(...): Injected ' + + 'module is missing getNodeFromInstance or getInstanceFromNode.', + ) + : void 0; + } + } + var validateEventDispatches; + + { + validateEventDispatches = function (event) { + var dispatchListeners = event._dispatchListeners; + var dispatchInstances = event._dispatchInstances; + var listenersIsArr = Array.isArray(dispatchListeners); + var listenersLen = listenersIsArr ? dispatchListeners.length : dispatchListeners ? 1 : 0; + var instancesIsArr = Array.isArray(dispatchInstances); + var instancesLen = instancesIsArr ? dispatchInstances.length : dispatchInstances ? 1 : 0; + !(instancesIsArr === listenersIsArr && instancesLen === listenersLen) + ? warningWithoutStack$1(false, 'EventPluginUtils: Invalid `event`.') + : void 0; + }; + } + /** + * Dispatch the event to the listener. + * @param {SyntheticEvent} event SyntheticEvent to handle + * @param {function} listener Application-level callback + * @param {*} inst Internal component instance + */ + + function executeDispatch(event, listener, inst) { + var type = event.type || 'unknown-event'; + event.currentTarget = getNodeFromInstance(inst); + invokeGuardedCallbackAndCatchFirstError(type, listener, undefined, event); + event.currentTarget = null; + } + /** + * Standard/simple iteration through an event's collected dispatches. + */ + + function executeDispatchesInOrder(event) { + var dispatchListeners = event._dispatchListeners; + var dispatchInstances = event._dispatchInstances; + + { + validateEventDispatches(event); + } + + if (Array.isArray(dispatchListeners)) { + for (var i = 0; i < dispatchListeners.length; i++) { + if (event.isPropagationStopped()) { + break; + } // Listeners and Instances are two parallel arrays that are always in sync. + + executeDispatch(event, dispatchListeners[i], dispatchInstances[i]); + } + } else if (dispatchListeners) { + executeDispatch(event, dispatchListeners, dispatchInstances); + } + + event._dispatchListeners = null; + event._dispatchInstances = null; + } + /** + * @see executeDispatchesInOrderStopAtTrueImpl + */ + + /** + * Execution of a "direct" dispatch - there must be at most one dispatch + * accumulated on the event or it is considered an error. It doesn't really make + * sense for an event with multiple dispatches (bubbled) to keep track of the + * return values at each dispatch execution, but it does tend to make sense when + * dealing with "direct" dispatches. + * + * @return {*} The return value of executing the single dispatch. + */ + + /** + * @param {SyntheticEvent} event + * @return {boolean} True iff number of dispatches accumulated is greater than 0. + */ + + /** + * Accumulates items that must not be null or undefined into the first one. This + * is used to conserve memory by avoiding array allocations, and thus sacrifices + * API cleanness. Since `current` can be null before being passed in and not + * null after this function, make sure to assign it back to `current`: + * + * `a = accumulateInto(a, b);` + * + * This API should be sparingly used. Try `accumulate` for something cleaner. + * + * @return {*|array<*>} An accumulation of items. + */ + + function accumulateInto(current, next) { + if (!(next != null)) { + { + throw Error('accumulateInto(...): Accumulated items must not be null or undefined.'); + } + } + + if (current == null) { + return next; + } // Both are not empty. Warning: Never call x.concat(y) when you are not + // certain that x is an Array (x could be a string with concat method). + + if (Array.isArray(current)) { + if (Array.isArray(next)) { + current.push.apply(current, next); + return current; + } + + current.push(next); + return current; + } + + if (Array.isArray(next)) { + // A bit too dangerous to mutate `next`. + return [current].concat(next); + } + + return [current, next]; + } + + /** + * @param {array} arr an "accumulation" of items which is either an Array or + * a single item. Useful when paired with the `accumulate` module. This is a + * simple utility that allows us to reason about a collection of items, but + * handling the case when there is exactly one item (and we do not need to + * allocate an array). + * @param {function} cb Callback invoked with each element or a collection. + * @param {?} [scope] Scope used as `this` in a callback. + */ + function forEachAccumulated(arr, cb, scope) { + if (Array.isArray(arr)) { + arr.forEach(cb, scope); + } else if (arr) { + cb.call(scope, arr); + } + } + + /** + * Internal queue of events that have accumulated their dispatches and are + * waiting to have their dispatches executed. + */ + + var eventQueue = null; + /** + * Dispatches an event and releases it back into the pool, unless persistent. + * + * @param {?object} event Synthetic event to be dispatched. + * @private + */ + + var executeDispatchesAndRelease = function (event) { + if (event) { + executeDispatchesInOrder(event); + + if (!event.isPersistent()) { + event.constructor.release(event); + } + } + }; + + var executeDispatchesAndReleaseTopLevel = function (e) { + return executeDispatchesAndRelease(e); + }; + + function runEventsInBatch(events) { + if (events !== null) { + eventQueue = accumulateInto(eventQueue, events); + } // Set `eventQueue` to null before processing it so that we can tell if more + // events get enqueued while processing. + + var processingEventQueue = eventQueue; + eventQueue = null; + + if (!processingEventQueue) { + return; + } + + forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseTopLevel); + + if (!!eventQueue) { + { + throw Error( + 'processEventQueue(): Additional events were enqueued while processing an event queue. Support for this has not yet been implemented.', + ); + } + } // This would be a good time to rethrow if any of the event handlers threw. + + rethrowCaughtError(); + } + + function isInteractive(tag) { + return tag === 'button' || tag === 'input' || tag === 'select' || tag === 'textarea'; + } + + function shouldPreventMouseEvent(name, type, props) { + switch (name) { + case 'onClick': + case 'onClickCapture': + case 'onDoubleClick': + case 'onDoubleClickCapture': + case 'onMouseDown': + case 'onMouseDownCapture': + case 'onMouseMove': + case 'onMouseMoveCapture': + case 'onMouseUp': + case 'onMouseUpCapture': + return !!(props.disabled && isInteractive(type)); + + default: + return false; + } + } + /** + * This is a unified interface for event plugins to be installed and configured. + * + * Event plugins can implement the following properties: + * + * `extractEvents` {function(string, DOMEventTarget, string, object): *} + * Required. When a top-level event is fired, this method is expected to + * extract synthetic events that will in turn be queued and dispatched. + * + * `eventTypes` {object} + * Optional, plugins that fire events must publish a mapping of registration + * names that are used to register listeners. Values of this mapping must + * be objects that contain `registrationName` or `phasedRegistrationNames`. + * + * `executeDispatch` {function(object, function, string)} + * Optional, allows plugins to override how an event gets dispatched. By + * default, the listener is simply invoked. + * + * Each plugin that is injected into `EventsPluginHub` is immediately operable. + * + * @public + */ + + /** + * Methods for injecting dependencies. + */ + + var injection = { + /** + * @param {array} InjectedEventPluginOrder + * @public + */ + injectEventPluginOrder: injectEventPluginOrder, + + /** + * @param {object} injectedNamesToPlugins Map from names to plugin modules. + */ + injectEventPluginsByName: injectEventPluginsByName, + }; + /** + * @param {object} inst The instance, which is the source of events. + * @param {string} registrationName Name of listener (e.g. `onClick`). + * @return {?function} The stored callback. + */ + + function getListener(inst, registrationName) { + var listener; // TODO: shouldPreventMouseEvent is DOM-specific and definitely should not + // live here; needs to be moved to a better place soon + + var stateNode = inst.stateNode; + + if (!stateNode) { + // Work in progress (ex: onload events in incremental mode). + return null; + } + + var props = getFiberCurrentPropsFromNode(stateNode); + + if (!props) { + // Work in progress. + return null; + } + + listener = props[registrationName]; + + if (shouldPreventMouseEvent(registrationName, inst.type, props)) { + return null; + } + + if (!(!listener || typeof listener === 'function')) { + { + throw Error( + 'Expected `' + + registrationName + + '` listener to be a function, instead got a value of `' + + typeof listener + + '` type.', + ); + } + } + + return listener; + } + /** + * Allows registered plugins an opportunity to extract events from top-level + * native browser events. + * + * @return {*} An accumulation of synthetic events. + * @internal + */ + + function extractPluginEvents( + topLevelType, + targetInst, + nativeEvent, + nativeEventTarget, + eventSystemFlags, + ) { + var events = null; + + for (var i = 0; i < plugins.length; i++) { + // Not every plugin in the ordering may be loaded at runtime. + var possiblePlugin = plugins[i]; + + if (possiblePlugin) { + var extractedEvents = possiblePlugin.extractEvents( + topLevelType, + targetInst, + nativeEvent, + nativeEventTarget, + eventSystemFlags, + ); + + if (extractedEvents) { + events = accumulateInto(events, extractedEvents); + } + } + } + + return events; + } + + function runExtractedPluginEventsInBatch( + topLevelType, + targetInst, + nativeEvent, + nativeEventTarget, + eventSystemFlags, + ) { + var events = extractPluginEvents( + topLevelType, + targetInst, + nativeEvent, + nativeEventTarget, + eventSystemFlags, + ); + runEventsInBatch(events); + } + + var FunctionComponent = 0; + var ClassComponent = 1; + var IndeterminateComponent = 2; // Before we know whether it is function or class + + var HostRoot = 3; // Root of a host tree. Could be nested inside another node. + + var HostPortal = 4; // A subtree. Could be an entry point to a different renderer. + + var HostComponent = 5; + var HostText = 6; + var Fragment = 7; + var Mode = 8; + var ContextConsumer = 9; + var ContextProvider = 10; + var ForwardRef = 11; + var Profiler = 12; + var SuspenseComponent = 13; + var MemoComponent = 14; + var SimpleMemoComponent = 15; + var LazyComponent = 16; + var IncompleteClassComponent = 17; + var DehydratedFragment = 18; + var SuspenseListComponent = 19; + var FundamentalComponent = 20; + var ScopeComponent = 21; + + var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; // Prevent newer renderers from RTE when used with older react package versions. + // Current owner and dispatcher used to share the same ref, + // but PR #14548 split them out to better support the react-debug-tools package. + + if (!ReactSharedInternals.hasOwnProperty('ReactCurrentDispatcher')) { + ReactSharedInternals.ReactCurrentDispatcher = { + current: null, + }; + } + + if (!ReactSharedInternals.hasOwnProperty('ReactCurrentBatchConfig')) { + ReactSharedInternals.ReactCurrentBatchConfig = { + suspense: null, + }; + } + + var BEFORE_SLASH_RE = /^(.*)[\\\/]/; + var describeComponentFrame = function (name, source, ownerName) { + var sourceInfo = ''; + + if (source) { + var path = source.fileName; + var fileName = path.replace(BEFORE_SLASH_RE, ''); + + { + // In DEV, include code for a common special case: + // prefer "folder/index.js" instead of just "index.js". + if (/^index\./.test(fileName)) { + var match = path.match(BEFORE_SLASH_RE); + + if (match) { + var pathBeforeSlash = match[1]; + + if (pathBeforeSlash) { + var folderName = pathBeforeSlash.replace(BEFORE_SLASH_RE, ''); + fileName = folderName + '/' + fileName; + } + } + } + } + + sourceInfo = ' (at ' + fileName + ':' + source.lineNumber + ')'; + } else if (ownerName) { + sourceInfo = ' (created by ' + ownerName + ')'; + } + + return '\n in ' + (name || 'Unknown') + sourceInfo; + }; + + // The Symbol used to tag the ReactElement-like types. If there is no native Symbol + // nor polyfill, then a plain number is used for performance. + var hasSymbol = typeof Symbol === 'function' && Symbol.for; + var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7; + var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca; + var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb; + var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc; + var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2; + var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd; + var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary + // (unstable) APIs that have been removed. Can we remove the symbols? + + var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf; + var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0; + var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1; + var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8; + var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3; + var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4; + var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5; + var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6; + var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7; + var MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; + var FAUX_ITERATOR_SYMBOL = '@@iterator'; + function getIteratorFn(maybeIterable) { + if (maybeIterable === null || typeof maybeIterable !== 'object') { + return null; + } + + var maybeIterator = + (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) || + maybeIterable[FAUX_ITERATOR_SYMBOL]; + + if (typeof maybeIterator === 'function') { + return maybeIterator; + } + + return null; + } + + /** + * Similar to invariant but only logs a warning if the condition is not met. + * This can be used to log issues in development environments in critical + * paths. Removing the logging code for production environments will keep the + * same logic and follow the same code paths. + */ + + var warning = warningWithoutStack$1; + + { + warning = function (condition, format) { + if (condition) { + return; + } + + var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; + var stack = ReactDebugCurrentFrame.getStackAddendum(); // eslint-disable-next-line react-internal/warning-and-invariant-args + + for ( + var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; + _key < _len; + _key++ + ) { + args[_key - 2] = arguments[_key]; + } + + warningWithoutStack$1.apply(void 0, [false, format + '%s'].concat(args, [stack])); + }; + } + + var warning$1 = warning; + + var Uninitialized = -1; + var Pending = 0; + var Resolved = 1; + var Rejected = 2; + function refineResolvedLazyComponent(lazyComponent) { + return lazyComponent._status === Resolved ? lazyComponent._result : null; + } + function initializeLazyComponentType(lazyComponent) { + if (lazyComponent._status === Uninitialized) { + lazyComponent._status = Pending; + var ctor = lazyComponent._ctor; + var thenable = ctor(); + lazyComponent._result = thenable; + thenable.then( + function (moduleObject) { + if (lazyComponent._status === Pending) { + var defaultExport = moduleObject.default; + + { + if (defaultExport === undefined) { + warning$1( + false, + 'lazy: Expected the result of a dynamic import() call. ' + + 'Instead received: %s\n\nYour code should look like: \n ' + + "const MyComponent = lazy(() => import('./MyComponent'))", + moduleObject, + ); + } + } + + lazyComponent._status = Resolved; + lazyComponent._result = defaultExport; + } + }, + function (error) { + if (lazyComponent._status === Pending) { + lazyComponent._status = Rejected; + lazyComponent._result = error; + } + }, + ); + } + } + + function getWrappedName(outerType, innerType, wrapperName) { + var functionName = innerType.displayName || innerType.name || ''; + return ( + outerType.displayName || + (functionName !== '' ? wrapperName + '(' + functionName + ')' : wrapperName) + ); + } + + function getComponentName(type) { + if (type == null) { + // Host root, text node or just invalid type. + return null; + } + + { + if (typeof type.tag === 'number') { + warningWithoutStack$1( + false, + 'Received an unexpected object in getComponentName(). ' + + 'This is likely a bug in React. Please file an issue.', + ); + } + } + + if (typeof type === 'function') { + return type.displayName || type.name || null; + } + + if (typeof type === 'string') { + return type; + } + + switch (type) { + case REACT_FRAGMENT_TYPE: + return 'Fragment'; + + case REACT_PORTAL_TYPE: + return 'Portal'; + + case REACT_PROFILER_TYPE: + return 'Profiler'; + + case REACT_STRICT_MODE_TYPE: + return 'StrictMode'; + + case REACT_SUSPENSE_TYPE: + return 'Suspense'; + + case REACT_SUSPENSE_LIST_TYPE: + return 'SuspenseList'; + } + + if (typeof type === 'object') { + switch (type.$$typeof) { + case REACT_CONTEXT_TYPE: + return 'Context.Consumer'; + + case REACT_PROVIDER_TYPE: + return 'Context.Provider'; + + case REACT_FORWARD_REF_TYPE: + return getWrappedName(type, type.render, 'ForwardRef'); + + case REACT_MEMO_TYPE: + return getComponentName(type.type); + + case REACT_LAZY_TYPE: { + var thenable = type; + var resolvedThenable = refineResolvedLazyComponent(thenable); + + if (resolvedThenable) { + return getComponentName(resolvedThenable); + } + + break; + } + } + } + + return null; + } + + var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; + + function describeFiber(fiber) { + switch (fiber.tag) { + case HostRoot: + case HostPortal: + case HostText: + case Fragment: + case ContextProvider: + case ContextConsumer: + return ''; + + default: + var owner = fiber._debugOwner; + var source = fiber._debugSource; + var name = getComponentName(fiber.type); + var ownerName = null; + + if (owner) { + ownerName = getComponentName(owner.type); + } + + return describeComponentFrame(name, source, ownerName); + } + } + + function getStackByFiberInDevAndProd(workInProgress) { + var info = ''; + var node = workInProgress; + + do { + info += describeFiber(node); + node = node.return; + } while (node); + + return info; + } + var current = null; + var phase = null; + function getCurrentFiberOwnerNameInDevOrNull() { + { + if (current === null) { + return null; + } + + var owner = current._debugOwner; + + if (owner !== null && typeof owner !== 'undefined') { + return getComponentName(owner.type); + } + } + + return null; + } + function getCurrentFiberStackInDev() { + { + if (current === null) { + return ''; + } // Safe because if current fiber exists, we are reconciling, + // and it is guaranteed to be the work-in-progress version. + + return getStackByFiberInDevAndProd(current); + } + + return ''; + } + function resetCurrentFiber() { + { + ReactDebugCurrentFrame.getCurrentStack = null; + current = null; + phase = null; + } + } + function setCurrentFiber(fiber) { + { + ReactDebugCurrentFrame.getCurrentStack = getCurrentFiberStackInDev; + current = fiber; + phase = null; + } + } + function setCurrentPhase(lifeCyclePhase) { + { + phase = lifeCyclePhase; + } + } + + var canUseDOM = !!( + typeof window !== 'undefined' && + typeof window.document !== 'undefined' && + typeof window.document.createElement !== 'undefined' + ); + + function endsWith(subject, search) { + var length = subject.length; + return subject.substring(length - search.length, length) === search; + } + + var PLUGIN_EVENT_SYSTEM = 1; + var RESPONDER_EVENT_SYSTEM = 1 << 1; + var IS_PASSIVE = 1 << 2; + var IS_ACTIVE = 1 << 3; + var PASSIVE_NOT_SUPPORTED = 1 << 4; + var IS_REPLAYED = 1 << 5; + + var restoreImpl = null; + var restoreTarget = null; + var restoreQueue = null; + + function restoreStateOfTarget(target) { + // We perform this translation at the end of the event loop so that we + // always receive the correct fiber here + var internalInstance = getInstanceFromNode(target); + + if (!internalInstance) { + // Unmounted + return; + } + + if (!(typeof restoreImpl === 'function')) { + { + throw Error( + 'setRestoreImplementation() needs to be called to handle a target for controlled events. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + + var props = getFiberCurrentPropsFromNode(internalInstance.stateNode); + restoreImpl(internalInstance.stateNode, internalInstance.type, props); + } + + function setRestoreImplementation(impl) { + restoreImpl = impl; + } + function enqueueStateRestore(target) { + if (restoreTarget) { + if (restoreQueue) { + restoreQueue.push(target); + } else { + restoreQueue = [target]; + } + } else { + restoreTarget = target; + } + } + function needsStateRestore() { + return restoreTarget !== null || restoreQueue !== null; + } + function restoreStateIfNeeded() { + if (!restoreTarget) { + return; + } + + var target = restoreTarget; + var queuedTargets = restoreQueue; + restoreTarget = null; + restoreQueue = null; + restoreStateOfTarget(target); + + if (queuedTargets) { + for (var i = 0; i < queuedTargets.length; i++) { + restoreStateOfTarget(queuedTargets[i]); + } + } + } + + var enableUserTimingAPI = true; // Helps identify side effects in render-phase lifecycle hooks and setState + // reducers by double invoking them in Strict Mode. + + var debugRenderPhaseSideEffectsForStrictMode = true; // To preserve the "Pause on caught exceptions" behavior of the debugger, we + // replay the begin phase of a failed component inside invokeGuardedCallback. + + var replayFailedUnitOfWorkWithInvokeGuardedCallback = true; // Warn about deprecated, async-unsafe lifecycles; relates to RFC #6: + + var warnAboutDeprecatedLifecycles = true; // Gather advanced timing metrics for Profiler subtrees. + + var enableProfilerTimer = true; // Trace which interactions trigger each commit. + + var enableSchedulerTracing = true; // SSR experiments + + var enableSuspenseServerRenderer = false; + var enableSelectiveHydration = false; // Only used in www builds. + + // Only used in www builds. + + // Disable javascript: URL strings in href for XSS protection. + + var disableJavaScriptURLs = false; // React Fire: prevent the value and checked attributes from syncing + // with their related DOM properties + + var disableInputAttributeSyncing = false; // These APIs will no longer be "unstable" in the upcoming 16.7 release, + // Control this behavior with a flag to support 16.6 minor releases in the meanwhile. + + var exposeConcurrentModeAPIs = false; + var warnAboutShorthandPropertyCollision = false; // Experimental React Flare event system and event components support. + + var enableFlareAPI = false; // Experimental Host Component support. + + var enableFundamentalAPI = false; // Experimental Scope support. + + var enableScopeAPI = false; // New API for JSX transforms to target - https://github.com/reactjs/rfcs/pull/107 + + // We will enforce mocking scheduler with scheduler/unstable_mock at some point. (v17?) + // Till then, we warn about the missing mock, but still fallback to a legacy mode compatible version + + var warnAboutUnmockedScheduler = false; // For tests, we flush suspense fallbacks in an act scope; + // *except* in some of our own tests, where we test incremental loading states. + + var flushSuspenseFallbacksInTests = true; // Add a callback property to suspense to notify which promises are currently + // in the update queue. This allows reporting and tracing of what is causing + // the user to see a loading state. + // Also allows hydration callbacks to fire when a dehydrated boundary gets + // hydrated or deleted. + + var enableSuspenseCallback = false; // Part of the simplification of React.createElement so we can eventually move + // from React.createElement to React.jsx + // https://github.com/reactjs/rfcs/blob/createlement-rfc/text/0000-create-element-changes.md + + var warnAboutDefaultPropsOnFunctionComponents = false; + var warnAboutStringRefs = false; + var disableLegacyContext = false; + var disableSchedulerTimeoutBasedOnReactExpirationTime = false; + var enableTrustedTypesIntegration = false; // Flag to turn event.target and event.currentTarget in ReactNative from a reactTag to a component instance + + // the renderer. Such as when we're dispatching events or if third party + // libraries need to call batchedUpdates. Eventually, this API will go away when + // everything is batched by default. We'll then have a similar API to opt-out of + // scheduled work and instead do synchronous work. + // Defaults + + var batchedUpdatesImpl = function (fn, bookkeeping) { + return fn(bookkeeping); + }; + + var discreteUpdatesImpl = function (fn, a, b, c) { + return fn(a, b, c); + }; + + var flushDiscreteUpdatesImpl = function () {}; + + var batchedEventUpdatesImpl = batchedUpdatesImpl; + var isInsideEventHandler = false; + var isBatchingEventUpdates = false; + + function finishEventHandler() { + // Here we wait until all updates have propagated, which is important + // when using controlled components within layers: + // https://github.com/facebook/react/issues/1698 + // Then we restore state of any controlled component. + var controlledComponentsHavePendingUpdates = needsStateRestore(); + + if (controlledComponentsHavePendingUpdates) { + // If a controlled event was fired, we may need to restore the state of + // the DOM node back to the controlled value. This is necessary when React + // bails out of the update without touching the DOM. + flushDiscreteUpdatesImpl(); + restoreStateIfNeeded(); + } + } + + function batchedUpdates(fn, bookkeeping) { + if (isInsideEventHandler) { + // If we are currently inside another batch, we need to wait until it + // fully completes before restoring state. + return fn(bookkeeping); + } + + isInsideEventHandler = true; + + try { + return batchedUpdatesImpl(fn, bookkeeping); + } finally { + isInsideEventHandler = false; + finishEventHandler(); + } + } + function batchedEventUpdates(fn, a, b) { + if (isBatchingEventUpdates) { + // If we are currently inside another batch, we need to wait until it + // fully completes before restoring state. + return fn(a, b); + } + + isBatchingEventUpdates = true; + + try { + return batchedEventUpdatesImpl(fn, a, b); + } finally { + isBatchingEventUpdates = false; + finishEventHandler(); + } + } // This is for the React Flare event system + + function executeUserEventHandler(fn, value) { + var previouslyInEventHandler = isInsideEventHandler; + + try { + isInsideEventHandler = true; + var type = typeof value === 'object' && value !== null ? value.type : ''; + invokeGuardedCallbackAndCatchFirstError(type, fn, undefined, value); + } finally { + isInsideEventHandler = previouslyInEventHandler; + } + } + function discreteUpdates(fn, a, b, c) { + var prevIsInsideEventHandler = isInsideEventHandler; + isInsideEventHandler = true; + + try { + return discreteUpdatesImpl(fn, a, b, c); + } finally { + isInsideEventHandler = prevIsInsideEventHandler; + + if (!isInsideEventHandler) { + finishEventHandler(); + } + } + } + var lastFlushedEventTimeStamp = 0; + function flushDiscreteUpdatesIfNeeded(timeStamp) { + // event.timeStamp isn't overly reliable due to inconsistencies in + // how different browsers have historically provided the time stamp. + // Some browsers provide high-resolution time stamps for all events, + // some provide low-resolution time stamps for all events. FF < 52 + // even mixes both time stamps together. Some browsers even report + // negative time stamps or time stamps that are 0 (iOS9) in some cases. + // Given we are only comparing two time stamps with equality (!==), + // we are safe from the resolution differences. If the time stamp is 0 + // we bail-out of preventing the flush, which can affect semantics, + // such as if an earlier flush removes or adds event listeners that + // are fired in the subsequent flush. However, this is the same + // behaviour as we had before this change, so the risks are low. + if ( + !isInsideEventHandler && + (!enableFlareAPI || timeStamp === 0 || lastFlushedEventTimeStamp !== timeStamp) + ) { + lastFlushedEventTimeStamp = timeStamp; + flushDiscreteUpdatesImpl(); + } + } + function setBatchingImplementation( + _batchedUpdatesImpl, + _discreteUpdatesImpl, + _flushDiscreteUpdatesImpl, + _batchedEventUpdatesImpl, + ) { + batchedUpdatesImpl = _batchedUpdatesImpl; + discreteUpdatesImpl = _discreteUpdatesImpl; + flushDiscreteUpdatesImpl = _flushDiscreteUpdatesImpl; + batchedEventUpdatesImpl = _batchedEventUpdatesImpl; + } + + var DiscreteEvent = 0; + var UserBlockingEvent = 1; + var ContinuousEvent = 2; + + // CommonJS interop named imports. + + var UserBlockingPriority = Scheduler.unstable_UserBlockingPriority; + var runWithPriority = Scheduler.unstable_runWithPriority; + var listenToResponderEventTypesImpl; + function setListenToResponderEventTypes(_listenToResponderEventTypesImpl) { + listenToResponderEventTypesImpl = _listenToResponderEventTypesImpl; + } + var rootEventTypesToEventResponderInstances = new Map(); + var DoNotPropagateToNextResponder = 0; + var PropagateToNextResponder = 1; + var currentTimeStamp = 0; + var currentInstance = null; + var currentDocument = null; + var currentPropagationBehavior = DoNotPropagateToNextResponder; + var eventResponderContext = { + dispatchEvent: function (eventValue, eventListener, eventPriority) { + validateResponderContext(); + validateEventValue(eventValue); + + switch (eventPriority) { + case DiscreteEvent: { + flushDiscreteUpdatesIfNeeded(currentTimeStamp); + discreteUpdates(function () { + return executeUserEventHandler(eventListener, eventValue); + }); + break; + } + + case UserBlockingEvent: { + runWithPriority(UserBlockingPriority, function () { + return executeUserEventHandler(eventListener, eventValue); + }); + break; + } + + case ContinuousEvent: { + executeUserEventHandler(eventListener, eventValue); + break; + } + } + }, + isTargetWithinResponder: function (target) { + validateResponderContext(); + + if (target != null) { + var fiber = getClosestInstanceFromNode(target); + var responderFiber = currentInstance.fiber; + + while (fiber !== null) { + if (fiber === responderFiber || fiber.alternate === responderFiber) { + return true; + } + + fiber = fiber.return; + } + } + + return false; + }, + isTargetWithinResponderScope: function (target) { + validateResponderContext(); + var componentInstance = currentInstance; + var responder = componentInstance.responder; + + if (target != null) { + var fiber = getClosestInstanceFromNode(target); + var responderFiber = currentInstance.fiber; + + while (fiber !== null) { + if (fiber === responderFiber || fiber.alternate === responderFiber) { + return true; + } + + if (doesFiberHaveResponder(fiber, responder)) { + return false; + } + + fiber = fiber.return; + } + } + + return false; + }, + isTargetWithinNode: function (childTarget, parentTarget) { + validateResponderContext(); + var childFiber = getClosestInstanceFromNode(childTarget); + var parentFiber = getClosestInstanceFromNode(parentTarget); + + if (childFiber != null && parentFiber != null) { + var parentAlternateFiber = parentFiber.alternate; + var node = childFiber; + + while (node !== null) { + if (node === parentFiber || node === parentAlternateFiber) { + return true; + } + + node = node.return; + } + + return false; + } // Fallback to DOM APIs + + return parentTarget.contains(childTarget); + }, + addRootEventTypes: function (rootEventTypes) { + validateResponderContext(); + listenToResponderEventTypesImpl(rootEventTypes, currentDocument); + + for (var i = 0; i < rootEventTypes.length; i++) { + var rootEventType = rootEventTypes[i]; + var eventResponderInstance = currentInstance; + registerRootEventType(rootEventType, eventResponderInstance); + } + }, + removeRootEventTypes: function (rootEventTypes) { + validateResponderContext(); + + for (var i = 0; i < rootEventTypes.length; i++) { + var rootEventType = rootEventTypes[i]; + var rootEventResponders = rootEventTypesToEventResponderInstances.get(rootEventType); + var rootEventTypesSet = currentInstance.rootEventTypes; + + if (rootEventTypesSet !== null) { + rootEventTypesSet.delete(rootEventType); + } + + if (rootEventResponders !== undefined) { + rootEventResponders.delete(currentInstance); + } + } + }, + getActiveDocument: getActiveDocument, + objectAssign: _assign, + getTimeStamp: function () { + validateResponderContext(); + return currentTimeStamp; + }, + isTargetWithinHostComponent: function (target, elementType) { + validateResponderContext(); + var fiber = getClosestInstanceFromNode(target); + + while (fiber !== null) { + if (fiber.tag === HostComponent && fiber.type === elementType) { + return true; + } + + fiber = fiber.return; + } + + return false; + }, + continuePropagation: function () { + currentPropagationBehavior = PropagateToNextResponder; + }, + enqueueStateRestore: enqueueStateRestore, + getResponderNode: function () { + validateResponderContext(); + var responderFiber = currentInstance.fiber; + + if (responderFiber.tag === ScopeComponent) { + return null; + } + + return responderFiber.stateNode; + }, + }; + + function validateEventValue(eventValue) { + if (typeof eventValue === 'object' && eventValue !== null) { + var target = eventValue.target, + type = eventValue.type, + timeStamp = eventValue.timeStamp; + + if (target == null || type == null || timeStamp == null) { + throw new Error( + 'context.dispatchEvent: "target", "timeStamp", and "type" fields on event object are required.', + ); + } + + var showWarning = function (name) { + { + warning$1( + false, + '%s is not available on event objects created from event responder modules (React Flare). ' + + 'Try wrapping in a conditional, i.e. `if (event.type !== "press") { event.%s }`', + name, + name, + ); + } + }; + + eventValue.isDefaultPrevented = function () { + { + showWarning('isDefaultPrevented()'); + } + }; + + eventValue.isPropagationStopped = function () { + { + showWarning('isPropagationStopped()'); + } + }; // $FlowFixMe: we don't need value, Flow thinks we do + + Object.defineProperty(eventValue, 'nativeEvent', { + get: function () { + { + showWarning('nativeEvent'); + } + }, + }); + } + } + + function doesFiberHaveResponder(fiber, responder) { + var tag = fiber.tag; + + if (tag === HostComponent || tag === ScopeComponent) { + var dependencies = fiber.dependencies; + + if (dependencies !== null) { + var respondersMap = dependencies.responders; + + if (respondersMap !== null && respondersMap.has(responder)) { + return true; + } + } + } + + return false; + } + + function getActiveDocument() { + return currentDocument; + } + + function createDOMResponderEvent( + topLevelType, + nativeEvent, + nativeEventTarget, + passive, + passiveSupported, + ) { + var _ref = nativeEvent, + buttons = _ref.buttons, + pointerType = _ref.pointerType; + var eventPointerType = ''; + + if (pointerType !== undefined) { + eventPointerType = pointerType; + } else if (nativeEvent.key !== undefined) { + eventPointerType = 'keyboard'; + } else if (buttons !== undefined) { + eventPointerType = 'mouse'; + } else if (nativeEvent.changedTouches !== undefined) { + eventPointerType = 'touch'; + } + + return { + nativeEvent: nativeEvent, + passive: passive, + passiveSupported: passiveSupported, + pointerType: eventPointerType, + target: nativeEventTarget, + type: topLevelType, + }; + } + + function responderEventTypesContainType(eventTypes, type) { + for (var i = 0, len = eventTypes.length; i < len; i++) { + if (eventTypes[i] === type) { + return true; + } + } + + return false; + } + + function validateResponderTargetEventTypes(eventType, responder) { + var targetEventTypes = responder.targetEventTypes; // Validate the target event type exists on the responder + + if (targetEventTypes !== null) { + return responderEventTypesContainType(targetEventTypes, eventType); + } + + return false; + } + + function traverseAndHandleEventResponderInstances( + topLevelType, + targetFiber, + nativeEvent, + nativeEventTarget, + eventSystemFlags, + ) { + var isPassiveEvent = (eventSystemFlags & IS_PASSIVE) !== 0; + var isPassiveSupported = (eventSystemFlags & PASSIVE_NOT_SUPPORTED) === 0; + var isPassive = isPassiveEvent || !isPassiveSupported; + var eventType = isPassive ? topLevelType : topLevelType + '_active'; // Trigger event responders in this order: + // - Bubble target responder phase + // - Root responder phase + + var visitedResponders = new Set(); + var responderEvent = createDOMResponderEvent( + topLevelType, + nativeEvent, + nativeEventTarget, + isPassiveEvent, + isPassiveSupported, + ); + var node = targetFiber; + var insidePortal = false; + + while (node !== null) { + var _node = node, + dependencies = _node.dependencies, + tag = _node.tag; + + if (tag === HostPortal) { + insidePortal = true; + } else if ((tag === HostComponent || tag === ScopeComponent) && dependencies !== null) { + var respondersMap = dependencies.responders; + + if (respondersMap !== null) { + var responderInstances = Array.from(respondersMap.values()); + + for (var i = 0, length = responderInstances.length; i < length; i++) { + var responderInstance = responderInstances[i]; + var props = responderInstance.props, + responder = responderInstance.responder, + state = responderInstance.state; + + if ( + !visitedResponders.has(responder) && + validateResponderTargetEventTypes(eventType, responder) && + (!insidePortal || responder.targetPortalPropagation) + ) { + visitedResponders.add(responder); + var onEvent = responder.onEvent; + + if (onEvent !== null) { + currentInstance = responderInstance; + onEvent(responderEvent, eventResponderContext, props, state); + + if (currentPropagationBehavior === PropagateToNextResponder) { + visitedResponders.delete(responder); + currentPropagationBehavior = DoNotPropagateToNextResponder; + } + } + } + } + } + } + + node = node.return; + } // Root phase + + var rootEventResponderInstances = rootEventTypesToEventResponderInstances.get(eventType); + + if (rootEventResponderInstances !== undefined) { + var _responderInstances = Array.from(rootEventResponderInstances); + + for (var _i = 0; _i < _responderInstances.length; _i++) { + var _responderInstance = _responderInstances[_i]; + var props = _responderInstance.props, + responder = _responderInstance.responder, + state = _responderInstance.state; + var onRootEvent = responder.onRootEvent; + + if (onRootEvent !== null) { + currentInstance = _responderInstance; + onRootEvent(responderEvent, eventResponderContext, props, state); + } + } + } + } + + function mountEventResponder(responder, responderInstance, props, state) { + var onMount = responder.onMount; + + if (onMount !== null) { + var previousInstance = currentInstance; + currentInstance = responderInstance; + + try { + batchedEventUpdates(function () { + onMount(eventResponderContext, props, state); + }); + } finally { + currentInstance = previousInstance; + } + } + } + function unmountEventResponder(responderInstance) { + var responder = responderInstance.responder; + var onUnmount = responder.onUnmount; + + if (onUnmount !== null) { + var props = responderInstance.props, + state = responderInstance.state; + var previousInstance = currentInstance; + currentInstance = responderInstance; + + try { + batchedEventUpdates(function () { + onUnmount(eventResponderContext, props, state); + }); + } finally { + currentInstance = previousInstance; + } + } + + var rootEventTypesSet = responderInstance.rootEventTypes; + + if (rootEventTypesSet !== null) { + var rootEventTypes = Array.from(rootEventTypesSet); + + for (var i = 0; i < rootEventTypes.length; i++) { + var topLevelEventType = rootEventTypes[i]; + var rootEventResponderInstances = + rootEventTypesToEventResponderInstances.get(topLevelEventType); + + if (rootEventResponderInstances !== undefined) { + rootEventResponderInstances.delete(responderInstance); + } + } + } + } + + function validateResponderContext() { + if (!(currentInstance !== null)) { + { + throw Error('An event responder context was used outside of an event cycle.'); + } + } + } + + function dispatchEventForResponderEventSystem( + topLevelType, + targetFiber, + nativeEvent, + nativeEventTarget, + eventSystemFlags, + ) { + if (enableFlareAPI) { + var previousInstance = currentInstance; + var previousTimeStamp = currentTimeStamp; + var previousDocument = currentDocument; + var previousPropagationBehavior = currentPropagationBehavior; + currentPropagationBehavior = DoNotPropagateToNextResponder; // nodeType 9 is DOCUMENT_NODE + + currentDocument = + nativeEventTarget.nodeType === 9 ? nativeEventTarget : nativeEventTarget.ownerDocument; // We might want to control timeStamp another way here + + currentTimeStamp = nativeEvent.timeStamp; + + try { + batchedEventUpdates(function () { + traverseAndHandleEventResponderInstances( + topLevelType, + targetFiber, + nativeEvent, + nativeEventTarget, + eventSystemFlags, + ); + }); + } finally { + currentInstance = previousInstance; + currentTimeStamp = previousTimeStamp; + currentDocument = previousDocument; + currentPropagationBehavior = previousPropagationBehavior; + } + } + } + function addRootEventTypesForResponderInstance(responderInstance, rootEventTypes) { + for (var i = 0; i < rootEventTypes.length; i++) { + var rootEventType = rootEventTypes[i]; + registerRootEventType(rootEventType, responderInstance); + } + } + + function registerRootEventType(rootEventType, eventResponderInstance) { + var rootEventResponderInstances = rootEventTypesToEventResponderInstances.get(rootEventType); + + if (rootEventResponderInstances === undefined) { + rootEventResponderInstances = new Set(); + rootEventTypesToEventResponderInstances.set(rootEventType, rootEventResponderInstances); + } + + var rootEventTypesSet = eventResponderInstance.rootEventTypes; + + if (rootEventTypesSet === null) { + rootEventTypesSet = eventResponderInstance.rootEventTypes = new Set(); + } + + if (!!rootEventTypesSet.has(rootEventType)) { + { + throw Error( + 'addRootEventTypes() found a duplicate root event type of "' + + rootEventType + + '". This might be because the event type exists in the event responder "rootEventTypes" array or because of a previous addRootEventTypes() using this root event type.', + ); + } + } + + rootEventTypesSet.add(rootEventType); + rootEventResponderInstances.add(eventResponderInstance); + } + + // A reserved attribute. + // It is handled by React separately and shouldn't be written to the DOM. + var RESERVED = 0; // A simple string attribute. + // Attributes that aren't in the whitelist are presumed to have this type. + + var STRING = 1; // A string attribute that accepts booleans in React. In HTML, these are called + // "enumerated" attributes with "true" and "false" as possible values. + // When true, it should be set to a "true" string. + // When false, it should be set to a "false" string. + + var BOOLEANISH_STRING = 2; // A real boolean attribute. + // When true, it should be present (set either to an empty string or its name). + // When false, it should be omitted. + + var BOOLEAN = 3; // An attribute that can be used as a flag as well as with a value. + // When true, it should be present (set either to an empty string or its name). + // When false, it should be omitted. + // For any other value, should be present with that value. + + var OVERLOADED_BOOLEAN = 4; // An attribute that must be numeric or parse as a numeric. + // When falsy, it should be removed. + + var NUMERIC = 5; // An attribute that must be positive numeric or parse as a positive numeric. + // When falsy, it should be removed. + + var POSITIVE_NUMERIC = 6; + + /* eslint-disable max-len */ + var ATTRIBUTE_NAME_START_CHAR = + ':A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD'; + /* eslint-enable max-len */ + + var ATTRIBUTE_NAME_CHAR = + ATTRIBUTE_NAME_START_CHAR + '\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040'; + + var ROOT_ATTRIBUTE_NAME = 'data-reactroot'; + var VALID_ATTRIBUTE_NAME_REGEX = new RegExp( + '^[' + ATTRIBUTE_NAME_START_CHAR + '][' + ATTRIBUTE_NAME_CHAR + ']*$', + ); + var hasOwnProperty = Object.prototype.hasOwnProperty; + var illegalAttributeNameCache = {}; + var validatedAttributeNameCache = {}; + function isAttributeNameSafe(attributeName) { + if (hasOwnProperty.call(validatedAttributeNameCache, attributeName)) { + return true; + } + + if (hasOwnProperty.call(illegalAttributeNameCache, attributeName)) { + return false; + } + + if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) { + validatedAttributeNameCache[attributeName] = true; + return true; + } + + illegalAttributeNameCache[attributeName] = true; + + { + warning$1(false, 'Invalid attribute name: `%s`', attributeName); + } + + return false; + } + function shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag) { + if (propertyInfo !== null) { + return propertyInfo.type === RESERVED; + } + + if (isCustomComponentTag) { + return false; + } + + if ( + name.length > 2 && + (name[0] === 'o' || name[0] === 'O') && + (name[1] === 'n' || name[1] === 'N') + ) { + return true; + } + + return false; + } + function shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag) { + if (propertyInfo !== null && propertyInfo.type === RESERVED) { + return false; + } + + switch (typeof value) { + case 'function': // $FlowIssue symbol is perfectly valid here + + case 'symbol': + // eslint-disable-line + return true; + + case 'boolean': { + if (isCustomComponentTag) { + return false; + } + + if (propertyInfo !== null) { + return !propertyInfo.acceptsBooleans; + } else { + var prefix = name.toLowerCase().slice(0, 5); + return prefix !== 'data-' && prefix !== 'aria-'; + } + } + + default: + return false; + } + } + function shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag) { + if (value === null || typeof value === 'undefined') { + return true; + } + + if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag)) { + return true; + } + + if (isCustomComponentTag) { + return false; + } + + if (propertyInfo !== null) { + switch (propertyInfo.type) { + case BOOLEAN: + return !value; + + case OVERLOADED_BOOLEAN: + return value === false; + + case NUMERIC: + return isNaN(value); + + case POSITIVE_NUMERIC: + return isNaN(value) || value < 1; + } + } + + return false; + } + function getPropertyInfo(name) { + return properties.hasOwnProperty(name) ? properties[name] : null; + } + + function PropertyInfoRecord( + name, + type, + mustUseProperty, + attributeName, + attributeNamespace, + sanitizeURL, + ) { + this.acceptsBooleans = + type === BOOLEANISH_STRING || type === BOOLEAN || type === OVERLOADED_BOOLEAN; + this.attributeName = attributeName; + this.attributeNamespace = attributeNamespace; + this.mustUseProperty = mustUseProperty; + this.propertyName = name; + this.type = type; + this.sanitizeURL = sanitizeURL; + } // When adding attributes to this list, be sure to also add them to + // the `possibleStandardNames` module to ensure casing and incorrect + // name warnings. + + var properties = {}; // These props are reserved by React. They shouldn't be written to the DOM. + + [ + 'children', + 'dangerouslySetInnerHTML', // TODO: This prevents the assignment of defaultValue to regular + // elements (not just inputs). Now that ReactDOMInput assigns to the + // defaultValue property -- do we need this? + 'defaultValue', + 'defaultChecked', + 'innerHTML', + 'suppressContentEditableWarning', + 'suppressHydrationWarning', + 'style', + ].forEach(function (name) { + properties[name] = new PropertyInfoRecord( + name, + RESERVED, + false, // mustUseProperty + name, // attributeName + null, // attributeNamespace + false, + ); + }); // A few React string attributes have a different name. + // This is a mapping from React prop names to the attribute names. + + [ + ['acceptCharset', 'accept-charset'], + ['className', 'class'], + ['htmlFor', 'for'], + ['httpEquiv', 'http-equiv'], + ].forEach(function (_ref) { + var name = _ref[0], + attributeName = _ref[1]; + properties[name] = new PropertyInfoRecord( + name, + STRING, + false, // mustUseProperty + attributeName, // attributeName + null, // attributeNamespace + false, + ); + }); // These are "enumerated" HTML attributes that accept "true" and "false". + // In React, we let users pass `true` and `false` even though technically + // these aren't boolean attributes (they are coerced to strings). + + ['contentEditable', 'draggable', 'spellCheck', 'value'].forEach(function (name) { + properties[name] = new PropertyInfoRecord( + name, + BOOLEANISH_STRING, + false, // mustUseProperty + name.toLowerCase(), // attributeName + null, // attributeNamespace + false, + ); + }); // These are "enumerated" SVG attributes that accept "true" and "false". + // In React, we let users pass `true` and `false` even though technically + // these aren't boolean attributes (they are coerced to strings). + // Since these are SVG attributes, their attribute names are case-sensitive. + + ['autoReverse', 'externalResourcesRequired', 'focusable', 'preserveAlpha'].forEach(function (name) { + properties[name] = new PropertyInfoRecord( + name, + BOOLEANISH_STRING, + false, // mustUseProperty + name, // attributeName + null, // attributeNamespace + false, + ); + }); // These are HTML boolean attributes. + + [ + 'allowFullScreen', + 'async', // Note: there is a special case that prevents it from being written to the DOM + // on the client side because the browsers are inconsistent. Instead we call focus(). + 'autoFocus', + 'autoPlay', + 'controls', + 'default', + 'defer', + 'disabled', + 'disablePictureInPicture', + 'formNoValidate', + 'hidden', + 'loop', + 'noModule', + 'noValidate', + 'open', + 'playsInline', + 'readOnly', + 'required', + 'reversed', + 'scoped', + 'seamless', // Microdata + 'itemScope', + ].forEach(function (name) { + properties[name] = new PropertyInfoRecord( + name, + BOOLEAN, + false, // mustUseProperty + name.toLowerCase(), // attributeName + null, // attributeNamespace + false, + ); + }); // These are the few React props that we set as DOM properties + // rather than attributes. These are all booleans. + + [ + 'checked', // Note: `option.selected` is not updated if `select.multiple` is + // disabled with `removeAttribute`. We have special logic for handling this. + 'multiple', + 'muted', + 'selected', + ].forEach(function (name) { + properties[name] = new PropertyInfoRecord( + name, + BOOLEAN, + true, // mustUseProperty + name, // attributeName + null, // attributeNamespace + false, + ); + }); // These are HTML attributes that are "overloaded booleans": they behave like + // booleans, but can also accept a string value. + + ['capture', 'download'].forEach(function (name) { + properties[name] = new PropertyInfoRecord( + name, + OVERLOADED_BOOLEAN, + false, // mustUseProperty + name, // attributeName + null, // attributeNamespace + false, + ); + }); // These are HTML attributes that must be positive numbers. + + ['cols', 'rows', 'size', 'span'].forEach(function (name) { + properties[name] = new PropertyInfoRecord( + name, + POSITIVE_NUMERIC, + false, // mustUseProperty + name, // attributeName + null, // attributeNamespace + false, + ); + }); // These are HTML attributes that must be numbers. + + ['rowSpan', 'start'].forEach(function (name) { + properties[name] = new PropertyInfoRecord( + name, + NUMERIC, + false, // mustUseProperty + name.toLowerCase(), // attributeName + null, // attributeNamespace + false, + ); + }); + var CAMELIZE = /[\-\:]([a-z])/g; + + var capitalize = function (token) { + return token[1].toUpperCase(); + }; // This is a list of all SVG attributes that need special casing, namespacing, + // or boolean value assignment. Regular attributes that just accept strings + // and have the same names are omitted, just like in the HTML whitelist. + // Some of these attributes can be hard to find. This list was created by + // scrapping the MDN documentation. + + [ + 'accent-height', + 'alignment-baseline', + 'arabic-form', + 'baseline-shift', + 'cap-height', + 'clip-path', + 'clip-rule', + 'color-interpolation', + 'color-interpolation-filters', + 'color-profile', + 'color-rendering', + 'dominant-baseline', + 'enable-background', + 'fill-opacity', + 'fill-rule', + 'flood-color', + 'flood-opacity', + 'font-family', + 'font-size', + 'font-size-adjust', + 'font-stretch', + 'font-style', + 'font-variant', + 'font-weight', + 'glyph-name', + 'glyph-orientation-horizontal', + 'glyph-orientation-vertical', + 'horiz-adv-x', + 'horiz-origin-x', + 'image-rendering', + 'letter-spacing', + 'lighting-color', + 'marker-end', + 'marker-mid', + 'marker-start', + 'overline-position', + 'overline-thickness', + 'paint-order', + 'panose-1', + 'pointer-events', + 'rendering-intent', + 'shape-rendering', + 'stop-color', + 'stop-opacity', + 'strikethrough-position', + 'strikethrough-thickness', + 'stroke-dasharray', + 'stroke-dashoffset', + 'stroke-linecap', + 'stroke-linejoin', + 'stroke-miterlimit', + 'stroke-opacity', + 'stroke-width', + 'text-anchor', + 'text-decoration', + 'text-rendering', + 'underline-position', + 'underline-thickness', + 'unicode-bidi', + 'unicode-range', + 'units-per-em', + 'v-alphabetic', + 'v-hanging', + 'v-ideographic', + 'v-mathematical', + 'vector-effect', + 'vert-adv-y', + 'vert-origin-x', + 'vert-origin-y', + 'word-spacing', + 'writing-mode', + 'xmlns:xlink', + 'x-height', + ].forEach(function (attributeName) { + var name = attributeName.replace(CAMELIZE, capitalize); + properties[name] = new PropertyInfoRecord( + name, + STRING, + false, // mustUseProperty + attributeName, + null, // attributeNamespace + false, + ); + }); // String SVG attributes with the xlink namespace. + + ['xlink:actuate', 'xlink:arcrole', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type'].forEach( + function (attributeName) { + var name = attributeName.replace(CAMELIZE, capitalize); + properties[name] = new PropertyInfoRecord( + name, + STRING, + false, // mustUseProperty + attributeName, + 'http://www.w3.org/1999/xlink', + false, + ); + }, + ); // String SVG attributes with the xml namespace. + + ['xml:base', 'xml:lang', 'xml:space'].forEach(function (attributeName) { + var name = attributeName.replace(CAMELIZE, capitalize); + properties[name] = new PropertyInfoRecord( + name, + STRING, + false, // mustUseProperty + attributeName, + 'http://www.w3.org/XML/1998/namespace', + false, + ); + }); // These attribute exists both in HTML and SVG. + // The attribute name is case-sensitive in SVG so we can't just use + // the React name like we do for attributes that exist only in HTML. + + ['tabIndex', 'crossOrigin'].forEach(function (attributeName) { + properties[attributeName] = new PropertyInfoRecord( + attributeName, + STRING, + false, // mustUseProperty + attributeName.toLowerCase(), // attributeName + null, // attributeNamespace + false, + ); + }); // These attributes accept URLs. These must not allow javascript: URLS. + // These will also need to accept Trusted Types object in the future. + + var xlinkHref = 'xlinkHref'; + properties[xlinkHref] = new PropertyInfoRecord( + 'xlinkHref', + STRING, + false, // mustUseProperty + 'xlink:href', + 'http://www.w3.org/1999/xlink', + true, + ); + ['src', 'href', 'action', 'formAction'].forEach(function (attributeName) { + properties[attributeName] = new PropertyInfoRecord( + attributeName, + STRING, + false, // mustUseProperty + attributeName.toLowerCase(), // attributeName + null, // attributeNamespace + true, + ); + }); + + var ReactDebugCurrentFrame$1 = null; + + { + ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame; + } // A javascript: URL can contain leading C0 control or \u0020 SPACE, + // and any newline or tab are filtered out as if they're not part of the URL. + // https://url.spec.whatwg.org/#url-parsing + // Tab or newline are defined as \r\n\t: + // https://infra.spec.whatwg.org/#ascii-tab-or-newline + // A C0 control is a code point in the range \u0000 NULL to \u001F + // INFORMATION SEPARATOR ONE, inclusive: + // https://infra.spec.whatwg.org/#c0-control-or-space + + /* eslint-disable max-len */ + + var isJavaScriptProtocol = + /^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i; + var didWarn = false; + + function sanitizeURL(url) { + if (disableJavaScriptURLs) { + if (!!isJavaScriptProtocol.test(url)) { + { + throw Error( + 'React has blocked a javascript: URL as a security precaution.' + + ReactDebugCurrentFrame$1.getStackAddendum(), + ); + } + } + } else if (true && !didWarn && isJavaScriptProtocol.test(url)) { + didWarn = true; + warning$1( + false, + 'A future version of React will block javascript: URLs as a security precaution. ' + + 'Use event handlers instead if you can. If you need to generate unsafe HTML try ' + + 'using dangerouslySetInnerHTML instead. React was passed %s.', + JSON.stringify(url), + ); + } + } + + // Flow does not allow string concatenation of most non-string types. To work + // around this limitation, we use an opaque type that can only be obtained by + // passing the value through getToStringValue first. + function toString(value) { + return '' + value; + } + function getToStringValue(value) { + switch (typeof value) { + case 'boolean': + case 'number': + case 'object': + case 'string': + case 'undefined': + return value; + + default: + // function, symbol are assigned as empty strings + return ''; + } + } + /** Trusted value is a wrapper for "safe" values which can be assigned to DOM execution sinks. */ + + /** + * We allow passing objects with toString method as element attributes or in dangerouslySetInnerHTML + * and we do validations that the value is safe. Once we do validation we want to use the validated + * value instead of the object (because object.toString may return something else on next call). + * + * If application uses Trusted Types we don't stringify trusted values, but preserve them as objects. + */ + var toStringOrTrustedType = toString; + + if (enableTrustedTypesIntegration && typeof trustedTypes !== 'undefined') { + toStringOrTrustedType = function (value) { + if ( + typeof value === 'object' && + (trustedTypes.isHTML(value) || + trustedTypes.isScript(value) || + trustedTypes.isScriptURL(value) || + /* TrustedURLs are deprecated and will be removed soon: https://github.com/WICG/trusted-types/pull/204 */ + (trustedTypes.isURL && trustedTypes.isURL(value))) + ) { + // Pass Trusted Types through. + return value; + } + + return toString(value); + }; + } + + /** + * Set attribute for a node. The attribute value can be either string or + * Trusted value (if application uses Trusted Types). + */ + function setAttribute(node, attributeName, attributeValue) { + node.setAttribute(attributeName, attributeValue); + } + /** + * Set attribute with namespace for a node. The attribute value can be either string or + * Trusted value (if application uses Trusted Types). + */ + + function setAttributeNS(node, attributeNamespace, attributeName, attributeValue) { + node.setAttributeNS(attributeNamespace, attributeName, attributeValue); + } + + /** + * Get the value for a property on a node. Only used in DEV for SSR validation. + * The "expected" argument is used as a hint of what the expected value is. + * Some properties have multiple equivalent values. + */ + function getValueForProperty(node, name, expected, propertyInfo) { + { + if (propertyInfo.mustUseProperty) { + var propertyName = propertyInfo.propertyName; + return node[propertyName]; + } else { + if (!disableJavaScriptURLs && propertyInfo.sanitizeURL) { + // If we haven't fully disabled javascript: URLs, and if + // the hydration is successful of a javascript: URL, we + // still want to warn on the client. + sanitizeURL('' + expected); + } + + var attributeName = propertyInfo.attributeName; + var stringValue = null; + + if (propertyInfo.type === OVERLOADED_BOOLEAN) { + if (node.hasAttribute(attributeName)) { + var value = node.getAttribute(attributeName); + + if (value === '') { + return true; + } + + if (shouldRemoveAttribute(name, expected, propertyInfo, false)) { + return value; + } + + if (value === '' + expected) { + return expected; + } + + return value; + } + } else if (node.hasAttribute(attributeName)) { + if (shouldRemoveAttribute(name, expected, propertyInfo, false)) { + // We had an attribute but shouldn't have had one, so read it + // for the error message. + return node.getAttribute(attributeName); + } + + if (propertyInfo.type === BOOLEAN) { + // If this was a boolean, it doesn't matter what the value is + // the fact that we have it is the same as the expected. + return expected; + } // Even if this property uses a namespace we use getAttribute + // because we assume its namespaced name is the same as our config. + // To use getAttributeNS we need the local name which we don't have + // in our config atm. + + stringValue = node.getAttribute(attributeName); + } + + if (shouldRemoveAttribute(name, expected, propertyInfo, false)) { + return stringValue === null ? expected : stringValue; + } else if (stringValue === '' + expected) { + return expected; + } else { + return stringValue; + } + } + } + } + /** + * Get the value for a attribute on a node. Only used in DEV for SSR validation. + * The third argument is used as a hint of what the expected value is. Some + * attributes have multiple equivalent values. + */ + + function getValueForAttribute(node, name, expected) { + { + if (!isAttributeNameSafe(name)) { + return; + } + + if (!node.hasAttribute(name)) { + return expected === undefined ? undefined : null; + } + + var value = node.getAttribute(name); + + if (value === '' + expected) { + return expected; + } + + return value; + } + } + /** + * Sets the value for a property on a node. + * + * @param {DOMElement} node + * @param {string} name + * @param {*} value + */ + + function setValueForProperty(node, name, value, isCustomComponentTag) { + var propertyInfo = getPropertyInfo(name); + + if (shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag)) { + return; + } + + if (shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag)) { + value = null; + } // If the prop isn't in the special list, treat it as a simple attribute. + + if (isCustomComponentTag || propertyInfo === null) { + if (isAttributeNameSafe(name)) { + var _attributeName = name; + + if (value === null) { + node.removeAttribute(_attributeName); + } else { + setAttribute(node, _attributeName, toStringOrTrustedType(value)); + } + } + + return; + } + + var mustUseProperty = propertyInfo.mustUseProperty; + + if (mustUseProperty) { + var propertyName = propertyInfo.propertyName; + + if (value === null) { + var type = propertyInfo.type; + node[propertyName] = type === BOOLEAN ? false : ''; + } else { + // Contrary to `setAttribute`, object properties are properly + // `toString`ed by IE8/9. + node[propertyName] = value; + } + + return; + } // The rest are treated as attributes with special cases. + + var attributeName = propertyInfo.attributeName, + attributeNamespace = propertyInfo.attributeNamespace; + + if (value === null) { + node.removeAttribute(attributeName); + } else { + var _type = propertyInfo.type; + var attributeValue; + + if (_type === BOOLEAN || (_type === OVERLOADED_BOOLEAN && value === true)) { + // If attribute type is boolean, we know for sure it won't be an execution sink + // and we won't require Trusted Type here. + attributeValue = ''; + } else { + // `setAttribute` with objects becomes only `[object]` in IE8/9, + // ('' + value) makes it output the correct toString()-value. + attributeValue = toStringOrTrustedType(value); + + if (propertyInfo.sanitizeURL) { + sanitizeURL(attributeValue.toString()); + } + } + + if (attributeNamespace) { + setAttributeNS(node, attributeNamespace, attributeName, attributeValue); + } else { + setAttribute(node, attributeName, attributeValue); + } + } + } + + var ReactDebugCurrentFrame$2 = null; + var ReactControlledValuePropTypes = { + checkPropTypes: null, + }; + + { + ReactDebugCurrentFrame$2 = ReactSharedInternals.ReactDebugCurrentFrame; + var hasReadOnlyValue = { + button: true, + checkbox: true, + image: true, + hidden: true, + radio: true, + reset: true, + submit: true, + }; + var propTypes = { + value: function (props, propName, componentName) { + if ( + hasReadOnlyValue[props.type] || + props.onChange || + props.readOnly || + props.disabled || + props[propName] == null || + (enableFlareAPI && props.listeners) + ) { + return null; + } + + return new Error( + 'You provided a `value` prop to a form field without an ' + + '`onChange` handler. This will render a read-only field. If ' + + 'the field should be mutable use `defaultValue`. Otherwise, ' + + 'set either `onChange` or `readOnly`.', + ); + }, + checked: function (props, propName, componentName) { + if ( + props.onChange || + props.readOnly || + props.disabled || + props[propName] == null || + (enableFlareAPI && props.listeners) + ) { + return null; + } + + return new Error( + 'You provided a `checked` prop to a form field without an ' + + '`onChange` handler. This will render a read-only field. If ' + + 'the field should be mutable use `defaultChecked`. Otherwise, ' + + 'set either `onChange` or `readOnly`.', + ); + }, + }; + /** + * Provide a linked `value` attribute for controlled forms. You should not use + * this outside of the ReactDOM controlled form components. + */ + + ReactControlledValuePropTypes.checkPropTypes = function (tagName, props) { + checkPropTypes(propTypes, props, 'prop', tagName, ReactDebugCurrentFrame$2.getStackAddendum); + }; + } + + function isCheckable(elem) { + var type = elem.type; + var nodeName = elem.nodeName; + return ( + nodeName && nodeName.toLowerCase() === 'input' && (type === 'checkbox' || type === 'radio') + ); + } + + function getTracker(node) { + return node._valueTracker; + } + + function detachTracker(node) { + node._valueTracker = null; + } + + function getValueFromNode(node) { + var value = ''; + + if (!node) { + return value; + } + + if (isCheckable(node)) { + value = node.checked ? 'true' : 'false'; + } else { + value = node.value; + } + + return value; + } + + function trackValueOnNode(node) { + var valueField = isCheckable(node) ? 'checked' : 'value'; + var descriptor = Object.getOwnPropertyDescriptor(node.constructor.prototype, valueField); + var currentValue = '' + node[valueField]; // if someone has already defined a value or Safari, then bail + // and don't track value will cause over reporting of changes, + // but it's better then a hard failure + // (needed for certain tests that spyOn input values and Safari) + + if ( + node.hasOwnProperty(valueField) || + typeof descriptor === 'undefined' || + typeof descriptor.get !== 'function' || + typeof descriptor.set !== 'function' + ) { + return; + } + + var get = descriptor.get, + set = descriptor.set; + Object.defineProperty(node, valueField, { + configurable: true, + get: function () { + return get.call(this); + }, + set: function (value) { + currentValue = '' + value; + set.call(this, value); + }, + }); // We could've passed this the first time + // but it triggers a bug in IE11 and Edge 14/15. + // Calling defineProperty() again should be equivalent. + // https://github.com/facebook/react/issues/11768 + + Object.defineProperty(node, valueField, { + enumerable: descriptor.enumerable, + }); + var tracker = { + getValue: function () { + return currentValue; + }, + setValue: function (value) { + currentValue = '' + value; + }, + stopTracking: function () { + detachTracker(node); + delete node[valueField]; + }, + }; + return tracker; + } + + function track(node) { + if (getTracker(node)) { + return; + } // TODO: Once it's just Fiber we can move this to node._wrapperState + + node._valueTracker = trackValueOnNode(node); + } + function updateValueIfChanged(node) { + if (!node) { + return false; + } + + var tracker = getTracker(node); // if there is no tracker at this point it's unlikely + // that trying again will succeed + + if (!tracker) { + return true; + } + + var lastValue = tracker.getValue(); + var nextValue = getValueFromNode(node); + + if (nextValue !== lastValue) { + tracker.setValue(nextValue); + return true; + } + + return false; + } + + // TODO: direct imports like some-package/src/* are bad. Fix me. + var didWarnValueDefaultValue = false; + var didWarnCheckedDefaultChecked = false; + var didWarnControlledToUncontrolled = false; + var didWarnUncontrolledToControlled = false; + + function isControlled(props) { + var usesChecked = props.type === 'checkbox' || props.type === 'radio'; + return usesChecked ? props.checked != null : props.value != null; + } + /** + * Implements an <input> host component that allows setting these optional + * props: `checked`, `value`, `defaultChecked`, and `defaultValue`. + * + * If `checked` or `value` are not supplied (or null/undefined), user actions + * that affect the checked state or value will trigger updates to the element. + * + * If they are supplied (and not null/undefined), the rendered element will not + * trigger updates to the element. Instead, the props must change in order for + * the rendered element to be updated. + * + * The rendered element will be initialized as unchecked (or `defaultChecked`) + * with an empty value (or `defaultValue`). + * + * See http://www.w3.org/TR/2012/WD-html5-20121025/the-input-element.html + */ + + function getHostProps(element, props) { + var node = element; + var checked = props.checked; + + var hostProps = _assign({}, props, { + defaultChecked: undefined, + defaultValue: undefined, + value: undefined, + checked: checked != null ? checked : node._wrapperState.initialChecked, + }); + + return hostProps; + } + function initWrapperState(element, props) { + { + ReactControlledValuePropTypes.checkPropTypes('input', props); + + if ( + props.checked !== undefined && + props.defaultChecked !== undefined && + !didWarnCheckedDefaultChecked + ) { + warning$1( + false, + '%s contains an input of type %s with both checked and defaultChecked props. ' + + 'Input elements must be either controlled or uncontrolled ' + + '(specify either the checked prop, or the defaultChecked prop, but not ' + + 'both). Decide between using a controlled or uncontrolled input ' + + 'element and remove one of these props. More info: ' + + 'https://fb.me/react-controlled-components', + getCurrentFiberOwnerNameInDevOrNull() || 'A component', + props.type, + ); + didWarnCheckedDefaultChecked = true; + } + + if ( + props.value !== undefined && + props.defaultValue !== undefined && + !didWarnValueDefaultValue + ) { + warning$1( + false, + '%s contains an input of type %s with both value and defaultValue props. ' + + 'Input elements must be either controlled or uncontrolled ' + + '(specify either the value prop, or the defaultValue prop, but not ' + + 'both). Decide between using a controlled or uncontrolled input ' + + 'element and remove one of these props. More info: ' + + 'https://fb.me/react-controlled-components', + getCurrentFiberOwnerNameInDevOrNull() || 'A component', + props.type, + ); + didWarnValueDefaultValue = true; + } + } + + var node = element; + var defaultValue = props.defaultValue == null ? '' : props.defaultValue; + node._wrapperState = { + initialChecked: props.checked != null ? props.checked : props.defaultChecked, + initialValue: getToStringValue(props.value != null ? props.value : defaultValue), + controlled: isControlled(props), + }; + } + function updateChecked(element, props) { + var node = element; + var checked = props.checked; + + if (checked != null) { + setValueForProperty(node, 'checked', checked, false); + } + } + function updateWrapper(element, props) { + var node = element; + + { + var controlled = isControlled(props); + + if (!node._wrapperState.controlled && controlled && !didWarnUncontrolledToControlled) { + warning$1( + false, + 'A component is changing an uncontrolled input of type %s to be controlled. ' + + 'Input elements should not switch from uncontrolled to controlled (or vice versa). ' + + 'Decide between using a controlled or uncontrolled input ' + + 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components', + props.type, + ); + didWarnUncontrolledToControlled = true; + } + + if (node._wrapperState.controlled && !controlled && !didWarnControlledToUncontrolled) { + warning$1( + false, + 'A component is changing a controlled input of type %s to be uncontrolled. ' + + 'Input elements should not switch from controlled to uncontrolled (or vice versa). ' + + 'Decide between using a controlled or uncontrolled input ' + + 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components', + props.type, + ); + didWarnControlledToUncontrolled = true; + } + } + + updateChecked(element, props); + var value = getToStringValue(props.value); + var type = props.type; + + if (value != null) { + if (type === 'number') { + if ( + (value === 0 && node.value === '') || // We explicitly want to coerce to number here if possible. + // eslint-disable-next-line + node.value != value + ) { + node.value = toString(value); + } + } else if (node.value !== toString(value)) { + node.value = toString(value); + } + } else if (type === 'submit' || type === 'reset') { + // Submit/reset inputs need the attribute removed completely to avoid + // blank-text buttons. + node.removeAttribute('value'); + return; + } + + if (disableInputAttributeSyncing) { + // When not syncing the value attribute, React only assigns a new value + // whenever the defaultValue React prop has changed. When not present, + // React does nothing + if (props.hasOwnProperty('defaultValue')) { + setDefaultValue(node, props.type, getToStringValue(props.defaultValue)); + } + } else { + // When syncing the value attribute, the value comes from a cascade of + // properties: + // 1. The value React property + // 2. The defaultValue React property + // 3. Otherwise there should be no change + if (props.hasOwnProperty('value')) { + setDefaultValue(node, props.type, value); + } else if (props.hasOwnProperty('defaultValue')) { + setDefaultValue(node, props.type, getToStringValue(props.defaultValue)); + } + } + + if (disableInputAttributeSyncing) { + // When not syncing the checked attribute, the attribute is directly + // controllable from the defaultValue React property. It needs to be + // updated as new props come in. + if (props.defaultChecked == null) { + node.removeAttribute('checked'); + } else { + node.defaultChecked = !!props.defaultChecked; + } + } else { + // When syncing the checked attribute, it only changes when it needs + // to be removed, such as transitioning from a checkbox into a text input + if (props.checked == null && props.defaultChecked != null) { + node.defaultChecked = !!props.defaultChecked; + } + } + } + function postMountWrapper(element, props, isHydrating) { + var node = element; // Do not assign value if it is already set. This prevents user text input + // from being lost during SSR hydration. + + if (props.hasOwnProperty('value') || props.hasOwnProperty('defaultValue')) { + var type = props.type; + var isButton = type === 'submit' || type === 'reset'; // Avoid setting value attribute on submit/reset inputs as it overrides the + // default value provided by the browser. See: #12872 + + if (isButton && (props.value === undefined || props.value === null)) { + return; + } + + var initialValue = toString(node._wrapperState.initialValue); // Do not assign value if it is already set. This prevents user text input + // from being lost during SSR hydration. + + if (!isHydrating) { + if (disableInputAttributeSyncing) { + var value = getToStringValue(props.value); // When not syncing the value attribute, the value property points + // directly to the React prop. Only assign it if it exists. + + if (value != null) { + // Always assign on buttons so that it is possible to assign an + // empty string to clear button text. + // + // Otherwise, do not re-assign the value property if is empty. This + // potentially avoids a DOM write and prevents Firefox (~60.0.1) from + // prematurely marking required inputs as invalid. Equality is compared + // to the current value in case the browser provided value is not an + // empty string. + if (isButton || value !== node.value) { + node.value = toString(value); + } + } + } else { + // When syncing the value attribute, the value property should use + // the wrapperState._initialValue property. This uses: + // + // 1. The value React property when present + // 2. The defaultValue React property when present + // 3. An empty string + if (initialValue !== node.value) { + node.value = initialValue; + } + } + } + + if (disableInputAttributeSyncing) { + // When not syncing the value attribute, assign the value attribute + // directly from the defaultValue React property (when present) + var defaultValue = getToStringValue(props.defaultValue); + + if (defaultValue != null) { + node.defaultValue = toString(defaultValue); + } + } else { + // Otherwise, the value attribute is synchronized to the property, + // so we assign defaultValue to the same thing as the value property + // assignment step above. + node.defaultValue = initialValue; + } + } // Normally, we'd just do `node.checked = node.checked` upon initial mount, less this bug + // this is needed to work around a chrome bug where setting defaultChecked + // will sometimes influence the value of checked (even after detachment). + // Reference: https://bugs.chromium.org/p/chromium/issues/detail?id=608416 + // We need to temporarily unset name to avoid disrupting radio button groups. + + var name = node.name; + + if (name !== '') { + node.name = ''; + } + + if (disableInputAttributeSyncing) { + // When not syncing the checked attribute, the checked property + // never gets assigned. It must be manually set. We don't want + // to do this when hydrating so that existing user input isn't + // modified + if (!isHydrating) { + updateChecked(element, props); + } // Only assign the checked attribute if it is defined. This saves + // a DOM write when controlling the checked attribute isn't needed + // (text inputs, submit/reset) + + if (props.hasOwnProperty('defaultChecked')) { + node.defaultChecked = !node.defaultChecked; + node.defaultChecked = !!props.defaultChecked; + } + } else { + // When syncing the checked attribute, both the checked property and + // attribute are assigned at the same time using defaultChecked. This uses: + // + // 1. The checked React property when present + // 2. The defaultChecked React property when present + // 3. Otherwise, false + node.defaultChecked = !node.defaultChecked; + node.defaultChecked = !!node._wrapperState.initialChecked; + } + + if (name !== '') { + node.name = name; + } + } + function restoreControlledState$1(element, props) { + var node = element; + updateWrapper(node, props); + updateNamedCousins(node, props); + } + + function updateNamedCousins(rootNode, props) { + var name = props.name; + + if (props.type === 'radio' && name != null) { + var queryRoot = rootNode; + + while (queryRoot.parentNode) { + queryRoot = queryRoot.parentNode; + } // If `rootNode.form` was non-null, then we could try `form.elements`, + // but that sometimes behaves strangely in IE8. We could also try using + // `form.getElementsByName`, but that will only return direct children + // and won't include inputs that use the HTML5 `form=` attribute. Since + // the input might not even be in a form. It might not even be in the + // document. Let's just use the local `querySelectorAll` to ensure we don't + // miss anything. + + var group = queryRoot.querySelectorAll( + 'input[name=' + JSON.stringify('' + name) + '][type="radio"]', + ); + + for (var i = 0; i < group.length; i++) { + var otherNode = group[i]; + + if (otherNode === rootNode || otherNode.form !== rootNode.form) { + continue; + } // This will throw if radio buttons rendered by different copies of React + // and the same name are rendered into the same form (same as #1939). + // That's probably okay; we don't support it just as we don't support + // mixing React radio buttons with non-React ones. + + var otherProps = getFiberCurrentPropsFromNode$1(otherNode); + + if (!otherProps) { + { + throw Error( + 'ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.', + ); + } + } // We need update the tracked value on the named cousin since the value + // was changed but the input saw no event or value set + + updateValueIfChanged(otherNode); // If this is a controlled radio button group, forcing the input that + // was previously checked to update will cause it to be come re-checked + // as appropriate. + + updateWrapper(otherNode, otherProps); + } + } + } // In Chrome, assigning defaultValue to certain input types triggers input validation. + // For number inputs, the display value loses trailing decimal points. For email inputs, + // Chrome raises "The specified value <x> is not a valid email address". + // + // Here we check to see if the defaultValue has actually changed, avoiding these problems + // when the user is inputting text + // + // https://github.com/facebook/react/issues/7253 + + function setDefaultValue(node, type, value) { + if ( + // Focused number inputs synchronize on blur. See ChangeEventPlugin.js + type !== 'number' || + node.ownerDocument.activeElement !== node + ) { + if (value == null) { + node.defaultValue = toString(node._wrapperState.initialValue); + } else if (node.defaultValue !== toString(value)) { + node.defaultValue = toString(value); + } + } + } + + var didWarnSelectedSetOnOption = false; + var didWarnInvalidChild = false; + + function flattenChildren(children) { + var content = ''; // Flatten children. We'll warn if they are invalid + // during validateProps() which runs for hydration too. + // Note that this would throw on non-element objects. + // Elements are stringified (which is normally irrelevant + // but matters for <fbt>). + + React.Children.forEach(children, function (child) { + if (child == null) { + return; + } + + content += child; // Note: we don't warn about invalid children here. + // Instead, this is done separately below so that + // it happens during the hydration codepath too. + }); + return content; + } + /** + * Implements an <option> host component that warns when `selected` is set. + */ + + function validateProps(element, props) { + { + // This mirrors the codepath above, but runs for hydration too. + // Warn about invalid children here so that client and hydration are consistent. + // TODO: this seems like it could cause a DEV-only throw for hydration + // if children contains a non-element object. We should try to avoid that. + if (typeof props.children === 'object' && props.children !== null) { + React.Children.forEach(props.children, function (child) { + if (child == null) { + return; + } + + if (typeof child === 'string' || typeof child === 'number') { + return; + } + + if (typeof child.type !== 'string') { + return; + } + + if (!didWarnInvalidChild) { + didWarnInvalidChild = true; + warning$1(false, 'Only strings and numbers are supported as <option> children.'); + } + }); + } // TODO: Remove support for `selected` in <option>. + + if (props.selected != null && !didWarnSelectedSetOnOption) { + warning$1( + false, + 'Use the `defaultValue` or `value` props on <select> instead of ' + + 'setting `selected` on <option>.', + ); + didWarnSelectedSetOnOption = true; + } + } + } + function postMountWrapper$1(element, props) { + // value="" should make a value attribute (#6219) + if (props.value != null) { + element.setAttribute('value', toString(getToStringValue(props.value))); + } + } + function getHostProps$1(element, props) { + var hostProps = _assign( + { + children: undefined, + }, + props, + ); + + var content = flattenChildren(props.children); + + if (content) { + hostProps.children = content; + } + + return hostProps; + } + + // TODO: direct imports like some-package/src/* are bad. Fix me. + var didWarnValueDefaultValue$1; + + { + didWarnValueDefaultValue$1 = false; + } + + function getDeclarationErrorAddendum() { + var ownerName = getCurrentFiberOwnerNameInDevOrNull(); + + if (ownerName) { + return '\n\nCheck the render method of `' + ownerName + '`.'; + } + + return ''; + } + + var valuePropNames = ['value', 'defaultValue']; + /** + * Validation function for `value` and `defaultValue`. + */ + + function checkSelectPropTypes(props) { + ReactControlledValuePropTypes.checkPropTypes('select', props); + + for (var i = 0; i < valuePropNames.length; i++) { + var propName = valuePropNames[i]; + + if (props[propName] == null) { + continue; + } + + var isArray = Array.isArray(props[propName]); + + if (props.multiple && !isArray) { + warning$1( + false, + 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', + propName, + getDeclarationErrorAddendum(), + ); + } else if (!props.multiple && isArray) { + warning$1( + false, + 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', + propName, + getDeclarationErrorAddendum(), + ); + } + } + } + + function updateOptions(node, multiple, propValue, setDefaultSelected) { + var options = node.options; + + if (multiple) { + var selectedValues = propValue; + var selectedValue = {}; + + for (var i = 0; i < selectedValues.length; i++) { + // Prefix to avoid chaos with special keys. + selectedValue['$' + selectedValues[i]] = true; + } + + for (var _i = 0; _i < options.length; _i++) { + var selected = selectedValue.hasOwnProperty('$' + options[_i].value); + + if (options[_i].selected !== selected) { + options[_i].selected = selected; + } + + if (selected && setDefaultSelected) { + options[_i].defaultSelected = true; + } + } + } else { + // Do not set `select.value` as exact behavior isn't consistent across all + // browsers for all cases. + var _selectedValue = toString(getToStringValue(propValue)); + + var defaultSelected = null; + + for (var _i2 = 0; _i2 < options.length; _i2++) { + if (options[_i2].value === _selectedValue) { + options[_i2].selected = true; + + if (setDefaultSelected) { + options[_i2].defaultSelected = true; + } + + return; + } + + if (defaultSelected === null && !options[_i2].disabled) { + defaultSelected = options[_i2]; + } + } + + if (defaultSelected !== null) { + defaultSelected.selected = true; + } + } + } + /** + * Implements a <select> host component that allows optionally setting the + * props `value` and `defaultValue`. If `multiple` is false, the prop must be a + * stringable. If `multiple` is true, the prop must be an array of stringables. + * + * If `value` is not supplied (or null/undefined), user actions that change the + * selected option will trigger updates to the rendered options. + * + * If it is supplied (and not null/undefined), the rendered options will not + * update in response to user actions. Instead, the `value` prop must change in + * order for the rendered options to update. + * + * If `defaultValue` is provided, any options with the supplied values will be + * selected. + */ + + function getHostProps$2(element, props) { + return _assign({}, props, { + value: undefined, + }); + } + function initWrapperState$1(element, props) { + var node = element; + + { + checkSelectPropTypes(props); + } + + node._wrapperState = { + wasMultiple: !!props.multiple, + }; + + { + if ( + props.value !== undefined && + props.defaultValue !== undefined && + !didWarnValueDefaultValue$1 + ) { + warning$1( + false, + 'Select elements must be either controlled or uncontrolled ' + + '(specify either the value prop, or the defaultValue prop, but not ' + + 'both). Decide between using a controlled or uncontrolled select ' + + 'element and remove one of these props. More info: ' + + 'https://fb.me/react-controlled-components', + ); + didWarnValueDefaultValue$1 = true; + } + } + } + function postMountWrapper$2(element, props) { + var node = element; + node.multiple = !!props.multiple; + var value = props.value; + + if (value != null) { + updateOptions(node, !!props.multiple, value, false); + } else if (props.defaultValue != null) { + updateOptions(node, !!props.multiple, props.defaultValue, true); + } + } + function postUpdateWrapper(element, props) { + var node = element; + var wasMultiple = node._wrapperState.wasMultiple; + node._wrapperState.wasMultiple = !!props.multiple; + var value = props.value; + + if (value != null) { + updateOptions(node, !!props.multiple, value, false); + } else if (wasMultiple !== !!props.multiple) { + // For simplicity, reapply `defaultValue` if `multiple` is toggled. + if (props.defaultValue != null) { + updateOptions(node, !!props.multiple, props.defaultValue, true); + } else { + // Revert the select back to its default unselected state. + updateOptions(node, !!props.multiple, props.multiple ? [] : '', false); + } + } + } + function restoreControlledState$2(element, props) { + var node = element; + var value = props.value; + + if (value != null) { + updateOptions(node, !!props.multiple, value, false); + } + } + + var didWarnValDefaultVal = false; + + /** + * Implements a <textarea> host component that allows setting `value`, and + * `defaultValue`. This differs from the traditional DOM API because value is + * usually set as PCDATA children. + * + * If `value` is not supplied (or null/undefined), user actions that affect the + * value will trigger updates to the element. + * + * If `value` is supplied (and not null/undefined), the rendered element will + * not trigger updates to the element. Instead, the `value` prop must change in + * order for the rendered element to be updated. + * + * The rendered element will be initialized with an empty value, the prop + * `defaultValue` if specified, or the children content (deprecated). + */ + function getHostProps$3(element, props) { + var node = element; + + if (!(props.dangerouslySetInnerHTML == null)) { + { + throw Error('`dangerouslySetInnerHTML` does not make sense on <textarea>.'); + } + } // Always set children to the same thing. In IE9, the selection range will + // get reset if `textContent` is mutated. We could add a check in setTextContent + // to only set the value if/when the value differs from the node value (which would + // completely solve this IE9 bug), but Sebastian+Sophie seemed to like this + // solution. The value can be a boolean or object so that's why it's forced + // to be a string. + + var hostProps = _assign({}, props, { + value: undefined, + defaultValue: undefined, + children: toString(node._wrapperState.initialValue), + }); + + return hostProps; + } + function initWrapperState$2(element, props) { + var node = element; + + { + ReactControlledValuePropTypes.checkPropTypes('textarea', props); + + if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValDefaultVal) { + warning$1( + false, + '%s contains a textarea with both value and defaultValue props. ' + + 'Textarea elements must be either controlled or uncontrolled ' + + '(specify either the value prop, or the defaultValue prop, but not ' + + 'both). Decide between using a controlled or uncontrolled textarea ' + + 'and remove one of these props. More info: ' + + 'https://fb.me/react-controlled-components', + getCurrentFiberOwnerNameInDevOrNull() || 'A component', + ); + didWarnValDefaultVal = true; + } + } + + var initialValue = props.value; // Only bother fetching default value if we're going to use it + + if (initialValue == null) { + var defaultValue = props.defaultValue; // TODO (yungsters): Remove support for children content in <textarea>. + + var children = props.children; + + if (children != null) { + { + warning$1( + false, + 'Use the `defaultValue` or `value` props instead of setting ' + 'children on <textarea>.', + ); + } + + if (!(defaultValue == null)) { + { + throw Error('If you supply `defaultValue` on a <textarea>, do not pass children.'); + } + } + + if (Array.isArray(children)) { + if (!(children.length <= 1)) { + { + throw Error('<textarea> can only have at most one child.'); + } + } + + children = children[0]; + } + + defaultValue = children; + } + + if (defaultValue == null) { + defaultValue = ''; + } + + initialValue = defaultValue; + } + + node._wrapperState = { + initialValue: getToStringValue(initialValue), + }; + } + function updateWrapper$1(element, props) { + var node = element; + var value = getToStringValue(props.value); + var defaultValue = getToStringValue(props.defaultValue); + + if (value != null) { + // Cast `value` to a string to ensure the value is set correctly. While + // browsers typically do this as necessary, jsdom doesn't. + var newValue = toString(value); // To avoid side effects (such as losing text selection), only set value if changed + + if (newValue !== node.value) { + node.value = newValue; + } + + if (props.defaultValue == null && node.defaultValue !== newValue) { + node.defaultValue = newValue; + } + } + + if (defaultValue != null) { + node.defaultValue = toString(defaultValue); + } + } + function postMountWrapper$3(element, props) { + var node = element; // This is in postMount because we need access to the DOM node, which is not + // available until after the component has mounted. + + var textContent = node.textContent; // Only set node.value if textContent is equal to the expected + // initial value. In IE10/IE11 there is a bug where the placeholder attribute + // will populate textContent as well. + // https://developer.microsoft.com/microsoft-edge/platform/issues/101525/ + + if (textContent === node._wrapperState.initialValue) { + if (textContent !== '' && textContent !== null) { + node.value = textContent; + } + } + } + function restoreControlledState$3(element, props) { + // DOM component is still mounted; update + updateWrapper$1(element, props); + } + + var HTML_NAMESPACE$1 = 'http://www.w3.org/1999/xhtml'; + var MATH_NAMESPACE = 'http://www.w3.org/1998/Math/MathML'; + var SVG_NAMESPACE = 'http://www.w3.org/2000/svg'; + var Namespaces = { + html: HTML_NAMESPACE$1, + mathml: MATH_NAMESPACE, + svg: SVG_NAMESPACE, + }; // Assumes there is no parent namespace. + + function getIntrinsicNamespace(type) { + switch (type) { + case 'svg': + return SVG_NAMESPACE; + + case 'math': + return MATH_NAMESPACE; + + default: + return HTML_NAMESPACE$1; + } + } + function getChildNamespace(parentNamespace, type) { + if (parentNamespace == null || parentNamespace === HTML_NAMESPACE$1) { + // No (or default) parent namespace: potential entry point. + return getIntrinsicNamespace(type); + } + + if (parentNamespace === SVG_NAMESPACE && type === 'foreignObject') { + // We're leaving SVG. + return HTML_NAMESPACE$1; + } // By default, pass namespace below. + + return parentNamespace; + } + + /* globals MSApp */ + + /** + * Create a function which has 'unsafe' privileges (required by windows8 apps) + */ + var createMicrosoftUnsafeLocalFunction = function (func) { + if (typeof MSApp !== 'undefined' && MSApp.execUnsafeLocalFunction) { + return function (arg0, arg1, arg2, arg3) { + MSApp.execUnsafeLocalFunction(function () { + return func(arg0, arg1, arg2, arg3); + }); + }; + } else { + return func; + } + }; + + var reusableSVGContainer; + /** + * Set the innerHTML property of a node + * + * @param {DOMElement} node + * @param {string} html + * @internal + */ + + var setInnerHTML = createMicrosoftUnsafeLocalFunction(function (node, html) { + if (node.namespaceURI === Namespaces.svg) { + { + if (enableTrustedTypesIntegration) { + // TODO: reconsider the text of this warning and when it should show + // before enabling the feature flag. + !(typeof trustedTypes === 'undefined') + ? warning$1( + false, + "Using 'dangerouslySetInnerHTML' in an svg element with " + + 'Trusted Types enabled in an Internet Explorer will cause ' + + 'the trusted value to be converted to string. Assigning string ' + + "to 'innerHTML' will throw an error if Trusted Types are enforced. " + + "You can try to wrap your svg element inside a div and use 'dangerouslySetInnerHTML' " + + 'on the enclosing div instead.', + ) + : void 0; + } + } + + if (!('innerHTML' in node)) { + // IE does not have innerHTML for SVG nodes, so instead we inject the + // new markup in a temp node and then move the child nodes across into + // the target node + reusableSVGContainer = reusableSVGContainer || document.createElement('div'); + reusableSVGContainer.innerHTML = '<svg>' + html.valueOf().toString() + '</svg>'; + var svgNode = reusableSVGContainer.firstChild; + + while (node.firstChild) { + node.removeChild(node.firstChild); + } + + while (svgNode.firstChild) { + node.appendChild(svgNode.firstChild); + } + + return; + } + } + + node.innerHTML = html; + }); + + /** + * HTML nodeType values that represent the type of the node + */ + var ELEMENT_NODE = 1; + var TEXT_NODE = 3; + var COMMENT_NODE = 8; + var DOCUMENT_NODE = 9; + var DOCUMENT_FRAGMENT_NODE = 11; + + /** + * Set the textContent property of a node. For text updates, it's faster + * to set the `nodeValue` of the Text node directly instead of using + * `.textContent` which will remove the existing node and create a new one. + * + * @param {DOMElement} node + * @param {string} text + * @internal + */ + + var setTextContent = function (node, text) { + if (text) { + var firstChild = node.firstChild; + + if (firstChild && firstChild === node.lastChild && firstChild.nodeType === TEXT_NODE) { + firstChild.nodeValue = text; + return; + } + } + + node.textContent = text; + }; + + // Do not use the below two methods directly! + // Instead use constants exported from DOMTopLevelEventTypes in ReactDOM. + // (It is the only module that is allowed to access these methods.) + function unsafeCastStringToDOMTopLevelType(topLevelType) { + return topLevelType; + } + function unsafeCastDOMTopLevelTypeToString(topLevelType) { + return topLevelType; + } + + /** + * Generate a mapping of standard vendor prefixes using the defined style property and event name. + * + * @param {string} styleProp + * @param {string} eventName + * @returns {object} + */ + + function makePrefixMap(styleProp, eventName) { + var prefixes = {}; + prefixes[styleProp.toLowerCase()] = eventName.toLowerCase(); + prefixes['Webkit' + styleProp] = 'webkit' + eventName; + prefixes['Moz' + styleProp] = 'moz' + eventName; + return prefixes; + } + /** + * A list of event names to a configurable list of vendor prefixes. + */ + + var vendorPrefixes = { + animationend: makePrefixMap('Animation', 'AnimationEnd'), + animationiteration: makePrefixMap('Animation', 'AnimationIteration'), + animationstart: makePrefixMap('Animation', 'AnimationStart'), + transitionend: makePrefixMap('Transition', 'TransitionEnd'), + }; + /** + * Event names that have already been detected and prefixed (if applicable). + */ + + var prefixedEventNames = {}; + /** + * Element to check for prefixes on. + */ + + var style = {}; + /** + * Bootstrap if a DOM exists. + */ + + if (canUseDOM) { + style = document.createElement('div').style; // On some platforms, in particular some releases of Android 4.x, + // the un-prefixed "animation" and "transition" properties are defined on the + // style object but the events that fire will still be prefixed, so we need + // to check if the un-prefixed events are usable, and if not remove them from the map. + + if (!('AnimationEvent' in window)) { + delete vendorPrefixes.animationend.animation; + delete vendorPrefixes.animationiteration.animation; + delete vendorPrefixes.animationstart.animation; + } // Same as above + + if (!('TransitionEvent' in window)) { + delete vendorPrefixes.transitionend.transition; + } + } + /** + * Attempts to determine the correct vendor prefixed event name. + * + * @param {string} eventName + * @returns {string} + */ + + function getVendorPrefixedEventName(eventName) { + if (prefixedEventNames[eventName]) { + return prefixedEventNames[eventName]; + } else if (!vendorPrefixes[eventName]) { + return eventName; + } + + var prefixMap = vendorPrefixes[eventName]; + + for (var styleProp in prefixMap) { + if (prefixMap.hasOwnProperty(styleProp) && styleProp in style) { + return (prefixedEventNames[eventName] = prefixMap[styleProp]); + } + } + + return eventName; + } + + /** + * To identify top level events in ReactDOM, we use constants defined by this + * module. This is the only module that uses the unsafe* methods to express + * that the constants actually correspond to the browser event names. This lets + * us save some bundle size by avoiding a top level type -> event name map. + * The rest of ReactDOM code should import top level types from this file. + */ + + var TOP_ABORT = unsafeCastStringToDOMTopLevelType('abort'); + var TOP_ANIMATION_END = unsafeCastStringToDOMTopLevelType( + getVendorPrefixedEventName('animationend'), + ); + var TOP_ANIMATION_ITERATION = unsafeCastStringToDOMTopLevelType( + getVendorPrefixedEventName('animationiteration'), + ); + var TOP_ANIMATION_START = unsafeCastStringToDOMTopLevelType( + getVendorPrefixedEventName('animationstart'), + ); + var TOP_BLUR = unsafeCastStringToDOMTopLevelType('blur'); + var TOP_CAN_PLAY = unsafeCastStringToDOMTopLevelType('canplay'); + var TOP_CAN_PLAY_THROUGH = unsafeCastStringToDOMTopLevelType('canplaythrough'); + var TOP_CANCEL = unsafeCastStringToDOMTopLevelType('cancel'); + var TOP_CHANGE = unsafeCastStringToDOMTopLevelType('change'); + var TOP_CLICK = unsafeCastStringToDOMTopLevelType('click'); + var TOP_CLOSE = unsafeCastStringToDOMTopLevelType('close'); + var TOP_COMPOSITION_END = unsafeCastStringToDOMTopLevelType('compositionend'); + var TOP_COMPOSITION_START = unsafeCastStringToDOMTopLevelType('compositionstart'); + var TOP_COMPOSITION_UPDATE = unsafeCastStringToDOMTopLevelType('compositionupdate'); + var TOP_CONTEXT_MENU = unsafeCastStringToDOMTopLevelType('contextmenu'); + var TOP_COPY = unsafeCastStringToDOMTopLevelType('copy'); + var TOP_CUT = unsafeCastStringToDOMTopLevelType('cut'); + var TOP_DOUBLE_CLICK = unsafeCastStringToDOMTopLevelType('dblclick'); + var TOP_AUX_CLICK = unsafeCastStringToDOMTopLevelType('auxclick'); + var TOP_DRAG = unsafeCastStringToDOMTopLevelType('drag'); + var TOP_DRAG_END = unsafeCastStringToDOMTopLevelType('dragend'); + var TOP_DRAG_ENTER = unsafeCastStringToDOMTopLevelType('dragenter'); + var TOP_DRAG_EXIT = unsafeCastStringToDOMTopLevelType('dragexit'); + var TOP_DRAG_LEAVE = unsafeCastStringToDOMTopLevelType('dragleave'); + var TOP_DRAG_OVER = unsafeCastStringToDOMTopLevelType('dragover'); + var TOP_DRAG_START = unsafeCastStringToDOMTopLevelType('dragstart'); + var TOP_DROP = unsafeCastStringToDOMTopLevelType('drop'); + var TOP_DURATION_CHANGE = unsafeCastStringToDOMTopLevelType('durationchange'); + var TOP_EMPTIED = unsafeCastStringToDOMTopLevelType('emptied'); + var TOP_ENCRYPTED = unsafeCastStringToDOMTopLevelType('encrypted'); + var TOP_ENDED = unsafeCastStringToDOMTopLevelType('ended'); + var TOP_ERROR = unsafeCastStringToDOMTopLevelType('error'); + var TOP_FOCUS = unsafeCastStringToDOMTopLevelType('focus'); + var TOP_GOT_POINTER_CAPTURE = unsafeCastStringToDOMTopLevelType('gotpointercapture'); + var TOP_INPUT = unsafeCastStringToDOMTopLevelType('input'); + var TOP_INVALID = unsafeCastStringToDOMTopLevelType('invalid'); + var TOP_KEY_DOWN = unsafeCastStringToDOMTopLevelType('keydown'); + var TOP_KEY_PRESS = unsafeCastStringToDOMTopLevelType('keypress'); + var TOP_KEY_UP = unsafeCastStringToDOMTopLevelType('keyup'); + var TOP_LOAD = unsafeCastStringToDOMTopLevelType('load'); + var TOP_LOAD_START = unsafeCastStringToDOMTopLevelType('loadstart'); + var TOP_LOADED_DATA = unsafeCastStringToDOMTopLevelType('loadeddata'); + var TOP_LOADED_METADATA = unsafeCastStringToDOMTopLevelType('loadedmetadata'); + var TOP_LOST_POINTER_CAPTURE = unsafeCastStringToDOMTopLevelType('lostpointercapture'); + var TOP_MOUSE_DOWN = unsafeCastStringToDOMTopLevelType('mousedown'); + var TOP_MOUSE_MOVE = unsafeCastStringToDOMTopLevelType('mousemove'); + var TOP_MOUSE_OUT = unsafeCastStringToDOMTopLevelType('mouseout'); + var TOP_MOUSE_OVER = unsafeCastStringToDOMTopLevelType('mouseover'); + var TOP_MOUSE_UP = unsafeCastStringToDOMTopLevelType('mouseup'); + var TOP_PASTE = unsafeCastStringToDOMTopLevelType('paste'); + var TOP_PAUSE = unsafeCastStringToDOMTopLevelType('pause'); + var TOP_PLAY = unsafeCastStringToDOMTopLevelType('play'); + var TOP_PLAYING = unsafeCastStringToDOMTopLevelType('playing'); + var TOP_POINTER_CANCEL = unsafeCastStringToDOMTopLevelType('pointercancel'); + var TOP_POINTER_DOWN = unsafeCastStringToDOMTopLevelType('pointerdown'); + + var TOP_POINTER_MOVE = unsafeCastStringToDOMTopLevelType('pointermove'); + var TOP_POINTER_OUT = unsafeCastStringToDOMTopLevelType('pointerout'); + var TOP_POINTER_OVER = unsafeCastStringToDOMTopLevelType('pointerover'); + var TOP_POINTER_UP = unsafeCastStringToDOMTopLevelType('pointerup'); + var TOP_PROGRESS = unsafeCastStringToDOMTopLevelType('progress'); + var TOP_RATE_CHANGE = unsafeCastStringToDOMTopLevelType('ratechange'); + var TOP_RESET = unsafeCastStringToDOMTopLevelType('reset'); + var TOP_SCROLL = unsafeCastStringToDOMTopLevelType('scroll'); + var TOP_SEEKED = unsafeCastStringToDOMTopLevelType('seeked'); + var TOP_SEEKING = unsafeCastStringToDOMTopLevelType('seeking'); + var TOP_SELECTION_CHANGE = unsafeCastStringToDOMTopLevelType('selectionchange'); + var TOP_STALLED = unsafeCastStringToDOMTopLevelType('stalled'); + var TOP_SUBMIT = unsafeCastStringToDOMTopLevelType('submit'); + var TOP_SUSPEND = unsafeCastStringToDOMTopLevelType('suspend'); + var TOP_TEXT_INPUT = unsafeCastStringToDOMTopLevelType('textInput'); + var TOP_TIME_UPDATE = unsafeCastStringToDOMTopLevelType('timeupdate'); + var TOP_TOGGLE = unsafeCastStringToDOMTopLevelType('toggle'); + var TOP_TOUCH_CANCEL = unsafeCastStringToDOMTopLevelType('touchcancel'); + var TOP_TOUCH_END = unsafeCastStringToDOMTopLevelType('touchend'); + var TOP_TOUCH_MOVE = unsafeCastStringToDOMTopLevelType('touchmove'); + var TOP_TOUCH_START = unsafeCastStringToDOMTopLevelType('touchstart'); + var TOP_TRANSITION_END = unsafeCastStringToDOMTopLevelType( + getVendorPrefixedEventName('transitionend'), + ); + var TOP_VOLUME_CHANGE = unsafeCastStringToDOMTopLevelType('volumechange'); + var TOP_WAITING = unsafeCastStringToDOMTopLevelType('waiting'); + var TOP_WHEEL = unsafeCastStringToDOMTopLevelType('wheel'); // List of events that need to be individually attached to media elements. + // Note that events in this list will *not* be listened to at the top level + // unless they're explicitly whitelisted in `ReactBrowserEventEmitter.listenTo`. + + var mediaEventTypes = [ + TOP_ABORT, + TOP_CAN_PLAY, + TOP_CAN_PLAY_THROUGH, + TOP_DURATION_CHANGE, + TOP_EMPTIED, + TOP_ENCRYPTED, + TOP_ENDED, + TOP_ERROR, + TOP_LOADED_DATA, + TOP_LOADED_METADATA, + TOP_LOAD_START, + TOP_PAUSE, + TOP_PLAY, + TOP_PLAYING, + TOP_PROGRESS, + TOP_RATE_CHANGE, + TOP_SEEKED, + TOP_SEEKING, + TOP_STALLED, + TOP_SUSPEND, + TOP_TIME_UPDATE, + TOP_VOLUME_CHANGE, + TOP_WAITING, + ]; + function getRawEventName(topLevelType) { + return unsafeCastDOMTopLevelTypeToString(topLevelType); + } + + /** + * `ReactInstanceMap` maintains a mapping from a public facing stateful + * instance (key) and the internal representation (value). This allows public + * methods to accept the user facing instance as an argument and map them back + * to internal methods. + * + * Note that this module is currently shared and assumed to be stateless. + * If this becomes an actual Map, that will break. + */ + + /** + * This API should be called `delete` but we'd have to make sure to always + * transform these to strings for IE support. When this transform is fully + * supported we can rename it. + */ + + function get(key) { + return key._reactInternalFiber; + } + function has(key) { + return key._reactInternalFiber !== undefined; + } + function set(key, value) { + key._reactInternalFiber = value; + } + + // Don't change these two values. They're used by React Dev Tools. + var NoEffect = + /* */ + 0; + var PerformedWork = + /* */ + 1; // You can change the rest (and add more). + + var Placement = + /* */ + 2; + var Update = + /* */ + 4; + var PlacementAndUpdate = + /* */ + 6; + var Deletion = + /* */ + 8; + var ContentReset = + /* */ + 16; + var Callback = + /* */ + 32; + var DidCapture = + /* */ + 64; + var Ref = + /* */ + 128; + var Snapshot = + /* */ + 256; + var Passive = + /* */ + 512; + var Hydrating = + /* */ + 1024; + var HydratingAndUpdate = + /* */ + 1028; // Passive & Update & Callback & Ref & Snapshot + + var LifecycleEffectMask = + /* */ + 932; // Union of all host effects + + var HostEffectMask = + /* */ + 2047; + var Incomplete = + /* */ + 2048; + var ShouldCapture = + /* */ + 4096; + + var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner; + function getNearestMountedFiber(fiber) { + var node = fiber; + var nearestMounted = fiber; + + if (!fiber.alternate) { + // If there is no alternate, this might be a new tree that isn't inserted + // yet. If it is, then it will have a pending insertion effect on it. + var nextNode = node; + + do { + node = nextNode; + + if ((node.effectTag & (Placement | Hydrating)) !== NoEffect) { + // This is an insertion or in-progress hydration. The nearest possible + // mounted fiber is the parent but we need to continue to figure out + // if that one is still mounted. + nearestMounted = node.return; + } + + nextNode = node.return; + } while (nextNode); + } else { + while (node.return) { + node = node.return; + } + } + + if (node.tag === HostRoot) { + // TODO: Check if this was a nested HostRoot when used with + // renderContainerIntoSubtree. + return nearestMounted; + } // If we didn't hit the root, that means that we're in an disconnected tree + // that has been unmounted. + + return null; + } + function getSuspenseInstanceFromFiber(fiber) { + if (fiber.tag === SuspenseComponent) { + var suspenseState = fiber.memoizedState; + + if (suspenseState === null) { + var current = fiber.alternate; + + if (current !== null) { + suspenseState = current.memoizedState; + } + } + + if (suspenseState !== null) { + return suspenseState.dehydrated; + } + } + + return null; + } + function getContainerFromFiber(fiber) { + return fiber.tag === HostRoot ? fiber.stateNode.containerInfo : null; + } + function isFiberMounted(fiber) { + return getNearestMountedFiber(fiber) === fiber; + } + function isMounted(component) { + { + var owner = ReactCurrentOwner.current; + + if (owner !== null && owner.tag === ClassComponent) { + var ownerFiber = owner; + var instance = ownerFiber.stateNode; + !instance._warnedAboutRefsInRender + ? warningWithoutStack$1( + false, + '%s is accessing isMounted inside its render() function. ' + + 'render() should be a pure function of props and state. It should ' + + 'never access something that requires stale data from the previous ' + + 'render, such as refs. Move this logic to componentDidMount and ' + + 'componentDidUpdate instead.', + getComponentName(ownerFiber.type) || 'A component', + ) + : void 0; + instance._warnedAboutRefsInRender = true; + } + } + + var fiber = get(component); + + if (!fiber) { + return false; + } + + return getNearestMountedFiber(fiber) === fiber; + } + + function assertIsMounted(fiber) { + if (!(getNearestMountedFiber(fiber) === fiber)) { + { + throw Error('Unable to find node on an unmounted component.'); + } + } + } + + function findCurrentFiberUsingSlowPath(fiber) { + var alternate = fiber.alternate; + + if (!alternate) { + // If there is no alternate, then we only need to check if it is mounted. + var nearestMounted = getNearestMountedFiber(fiber); + + if (!(nearestMounted !== null)) { + { + throw Error('Unable to find node on an unmounted component.'); + } + } + + if (nearestMounted !== fiber) { + return null; + } + + return fiber; + } // If we have two possible branches, we'll walk backwards up to the root + // to see what path the root points to. On the way we may hit one of the + // special cases and we'll deal with them. + + var a = fiber; + var b = alternate; + + while (true) { + var parentA = a.return; + + if (parentA === null) { + // We're at the root. + break; + } + + var parentB = parentA.alternate; + + if (parentB === null) { + // There is no alternate. This is an unusual case. Currently, it only + // happens when a Suspense component is hidden. An extra fragment fiber + // is inserted in between the Suspense fiber and its children. Skip + // over this extra fragment fiber and proceed to the next parent. + var nextParent = parentA.return; + + if (nextParent !== null) { + a = b = nextParent; + continue; + } // If there's no parent, we're at the root. + + break; + } // If both copies of the parent fiber point to the same child, we can + // assume that the child is current. This happens when we bailout on low + // priority: the bailed out fiber's child reuses the current child. + + if (parentA.child === parentB.child) { + var child = parentA.child; + + while (child) { + if (child === a) { + // We've determined that A is the current branch. + assertIsMounted(parentA); + return fiber; + } + + if (child === b) { + // We've determined that B is the current branch. + assertIsMounted(parentA); + return alternate; + } + + child = child.sibling; + } // We should never have an alternate for any mounting node. So the only + // way this could possibly happen is if this was unmounted, if at all. + + { + { + throw Error('Unable to find node on an unmounted component.'); + } + } + } + + if (a.return !== b.return) { + // The return pointer of A and the return pointer of B point to different + // fibers. We assume that return pointers never criss-cross, so A must + // belong to the child set of A.return, and B must belong to the child + // set of B.return. + a = parentA; + b = parentB; + } else { + // The return pointers point to the same fiber. We'll have to use the + // default, slow path: scan the child sets of each parent alternate to see + // which child belongs to which set. + // + // Search parent A's child set + var didFindChild = false; + var _child = parentA.child; + + while (_child) { + if (_child === a) { + didFindChild = true; + a = parentA; + b = parentB; + break; + } + + if (_child === b) { + didFindChild = true; + b = parentA; + a = parentB; + break; + } + + _child = _child.sibling; + } + + if (!didFindChild) { + // Search parent B's child set + _child = parentB.child; + + while (_child) { + if (_child === a) { + didFindChild = true; + a = parentB; + b = parentA; + break; + } + + if (_child === b) { + didFindChild = true; + b = parentB; + a = parentA; + break; + } + + _child = _child.sibling; + } + + if (!didFindChild) { + { + throw Error( + 'Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue.', + ); + } + } + } + } + + if (!(a.alternate === b)) { + { + throw Error( + "Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue.", + ); + } + } + } // If the root is not a host container, we're in a disconnected tree. I.e. + // unmounted. + + if (!(a.tag === HostRoot)) { + { + throw Error('Unable to find node on an unmounted component.'); + } + } + + if (a.stateNode.current === a) { + // We've determined that A is the current branch. + return fiber; + } // Otherwise B has to be current branch. + + return alternate; + } + function findCurrentHostFiber(parent) { + var currentParent = findCurrentFiberUsingSlowPath(parent); + + if (!currentParent) { + return null; + } // Next we'll drill down this component to find the first HostComponent/Text. + + var node = currentParent; + + while (true) { + if (node.tag === HostComponent || node.tag === HostText) { + return node; + } else if (node.child) { + node.child.return = node; + node = node.child; + continue; + } + + if (node === currentParent) { + return null; + } + + while (!node.sibling) { + if (!node.return || node.return === currentParent) { + return null; + } + + node = node.return; + } + + node.sibling.return = node.return; + node = node.sibling; + } // Flow needs the return null here, but ESLint complains about it. + // eslint-disable-next-line no-unreachable + + return null; + } + function findCurrentHostFiberWithNoPortals(parent) { + var currentParent = findCurrentFiberUsingSlowPath(parent); + + if (!currentParent) { + return null; + } // Next we'll drill down this component to find the first HostComponent/Text. + + var node = currentParent; + + while (true) { + if ( + node.tag === HostComponent || + node.tag === HostText || + (enableFundamentalAPI && node.tag === FundamentalComponent) + ) { + return node; + } else if (node.child && node.tag !== HostPortal) { + node.child.return = node; + node = node.child; + continue; + } + + if (node === currentParent) { + return null; + } + + while (!node.sibling) { + if (!node.return || node.return === currentParent) { + return null; + } + + node = node.return; + } + + node.sibling.return = node.return; + node = node.sibling; + } // Flow needs the return null here, but ESLint complains about it. + // eslint-disable-next-line no-unreachable + + return null; + } + + var attemptSynchronousHydration; + function setAttemptSynchronousHydration(fn) { + attemptSynchronousHydration = fn; + } + var attemptUserBlockingHydration; + function setAttemptUserBlockingHydration(fn) { + attemptUserBlockingHydration = fn; + } + var attemptContinuousHydration; + function setAttemptContinuousHydration(fn) { + attemptContinuousHydration = fn; + } + var attemptHydrationAtCurrentPriority; + function setAttemptHydrationAtCurrentPriority(fn) { + attemptHydrationAtCurrentPriority = fn; + } // TODO: Upgrade this definition once we're on a newer version of Flow that + // has this definition built-in. + + var hasScheduledReplayAttempt = false; // The queue of discrete events to be replayed. + + var queuedDiscreteEvents = []; // Indicates if any continuous event targets are non-null for early bailout. + + // if the last target was dehydrated. + + var queuedFocus = null; + var queuedDrag = null; + var queuedMouse = null; // For pointer events there can be one latest event per pointerId. + + var queuedPointers = new Map(); + var queuedPointerCaptures = new Map(); // We could consider replaying selectionchange and touchmoves too. + + var queuedExplicitHydrationTargets = []; + function hasQueuedDiscreteEvents() { + return queuedDiscreteEvents.length > 0; + } + + var discreteReplayableEvents = [ + TOP_MOUSE_DOWN, + TOP_MOUSE_UP, + TOP_TOUCH_CANCEL, + TOP_TOUCH_END, + TOP_TOUCH_START, + TOP_AUX_CLICK, + TOP_DOUBLE_CLICK, + TOP_POINTER_CANCEL, + TOP_POINTER_DOWN, + TOP_POINTER_UP, + TOP_DRAG_END, + TOP_DRAG_START, + TOP_DROP, + TOP_COMPOSITION_END, + TOP_COMPOSITION_START, + TOP_KEY_DOWN, + TOP_KEY_PRESS, + TOP_KEY_UP, + TOP_INPUT, + TOP_TEXT_INPUT, + TOP_CLOSE, + TOP_CANCEL, + TOP_COPY, + TOP_CUT, + TOP_PASTE, + TOP_CLICK, + TOP_CHANGE, + TOP_CONTEXT_MENU, + TOP_RESET, + TOP_SUBMIT, + ]; + var continuousReplayableEvents = [ + TOP_FOCUS, + TOP_BLUR, + TOP_DRAG_ENTER, + TOP_DRAG_LEAVE, + TOP_MOUSE_OVER, + TOP_MOUSE_OUT, + TOP_POINTER_OVER, + TOP_POINTER_OUT, + TOP_GOT_POINTER_CAPTURE, + TOP_LOST_POINTER_CAPTURE, + ]; + function isReplayableDiscreteEvent(eventType) { + return discreteReplayableEvents.indexOf(eventType) > -1; + } + + function trapReplayableEvent(topLevelType, document, listeningSet) { + listenToTopLevel(topLevelType, document, listeningSet); + + if (enableFlareAPI) { + // Trap events for the responder system. + var passiveEventKey = unsafeCastDOMTopLevelTypeToString(topLevelType) + '_passive'; + + if (!listeningSet.has(passiveEventKey)) { + trapEventForResponderEventSystem(document, topLevelType, true); + listeningSet.add(passiveEventKey); + } // TODO: This listens to all events as active which might have + // undesirable effects. It's also unnecessary to have both + // passive and active listeners. Instead, we could start with + // a passive and upgrade it to an active one if needed. + // For replaying purposes the active is never needed since we + // currently don't preventDefault. + + var activeEventKey = unsafeCastDOMTopLevelTypeToString(topLevelType) + '_active'; + + if (!listeningSet.has(activeEventKey)) { + trapEventForResponderEventSystem(document, topLevelType, false); + listeningSet.add(activeEventKey); + } + } + } + + function eagerlyTrapReplayableEvents(document) { + var listeningSet = getListeningSetForElement(document); // Discrete + + discreteReplayableEvents.forEach(function (topLevelType) { + trapReplayableEvent(topLevelType, document, listeningSet); + }); // Continuous + + continuousReplayableEvents.forEach(function (topLevelType) { + trapReplayableEvent(topLevelType, document, listeningSet); + }); + } + + function createQueuedReplayableEvent(blockedOn, topLevelType, eventSystemFlags, nativeEvent) { + return { + blockedOn: blockedOn, + topLevelType: topLevelType, + eventSystemFlags: eventSystemFlags | IS_REPLAYED, + nativeEvent: nativeEvent, + }; + } + + function queueDiscreteEvent(blockedOn, topLevelType, eventSystemFlags, nativeEvent) { + var queuedEvent = createQueuedReplayableEvent( + blockedOn, + topLevelType, + eventSystemFlags, + nativeEvent, + ); + queuedDiscreteEvents.push(queuedEvent); + + if (enableSelectiveHydration) { + if (queuedDiscreteEvents.length === 1) { + // If this was the first discrete event, we might be able to + // synchronously unblock it so that preventDefault still works. + while (queuedEvent.blockedOn !== null) { + var _fiber = getInstanceFromNode$1(queuedEvent.blockedOn); + + if (_fiber === null) { + break; + } + + attemptSynchronousHydration(_fiber); + + if (queuedEvent.blockedOn === null) { + // We got unblocked by hydration. Let's try again. + replayUnblockedEvents(); // If we're reblocked, on an inner boundary, we might need + // to attempt hydrating that one. + + continue; + } else { + // We're still blocked from hydation, we have to give up + // and replay later. + break; + } + } + } + } + } // Resets the replaying for this type of continuous event to no event. + + function clearIfContinuousEvent(topLevelType, nativeEvent) { + switch (topLevelType) { + case TOP_FOCUS: + case TOP_BLUR: + queuedFocus = null; + break; + + case TOP_DRAG_ENTER: + case TOP_DRAG_LEAVE: + queuedDrag = null; + break; + + case TOP_MOUSE_OVER: + case TOP_MOUSE_OUT: + queuedMouse = null; + break; + + case TOP_POINTER_OVER: + case TOP_POINTER_OUT: { + var pointerId = nativeEvent.pointerId; + queuedPointers.delete(pointerId); + break; + } + + case TOP_GOT_POINTER_CAPTURE: + case TOP_LOST_POINTER_CAPTURE: { + var _pointerId = nativeEvent.pointerId; + queuedPointerCaptures.delete(_pointerId); + break; + } + } + } + + function accumulateOrCreateContinuousQueuedReplayableEvent( + existingQueuedEvent, + blockedOn, + topLevelType, + eventSystemFlags, + nativeEvent, + ) { + if (existingQueuedEvent === null || existingQueuedEvent.nativeEvent !== nativeEvent) { + var queuedEvent = createQueuedReplayableEvent( + blockedOn, + topLevelType, + eventSystemFlags, + nativeEvent, + ); + + if (blockedOn !== null) { + var _fiber2 = getInstanceFromNode$1(blockedOn); + + if (_fiber2 !== null) { + // Attempt to increase the priority of this target. + attemptContinuousHydration(_fiber2); + } + } + + return queuedEvent; + } // If we have already queued this exact event, then it's because + // the different event systems have different DOM event listeners. + // We can accumulate the flags and store a single event to be + // replayed. + + existingQueuedEvent.eventSystemFlags |= eventSystemFlags; + return existingQueuedEvent; + } + + function queueIfContinuousEvent(blockedOn, topLevelType, eventSystemFlags, nativeEvent) { + // These set relatedTarget to null because the replayed event will be treated as if we + // moved from outside the window (no target) onto the target once it hydrates. + // Instead of mutating we could clone the event. + switch (topLevelType) { + case TOP_FOCUS: { + var focusEvent = nativeEvent; + queuedFocus = accumulateOrCreateContinuousQueuedReplayableEvent( + queuedFocus, + blockedOn, + topLevelType, + eventSystemFlags, + focusEvent, + ); + return true; + } + + case TOP_DRAG_ENTER: { + var dragEvent = nativeEvent; + queuedDrag = accumulateOrCreateContinuousQueuedReplayableEvent( + queuedDrag, + blockedOn, + topLevelType, + eventSystemFlags, + dragEvent, + ); + return true; + } + + case TOP_MOUSE_OVER: { + var mouseEvent = nativeEvent; + queuedMouse = accumulateOrCreateContinuousQueuedReplayableEvent( + queuedMouse, + blockedOn, + topLevelType, + eventSystemFlags, + mouseEvent, + ); + return true; + } + + case TOP_POINTER_OVER: { + var pointerEvent = nativeEvent; + var pointerId = pointerEvent.pointerId; + queuedPointers.set( + pointerId, + accumulateOrCreateContinuousQueuedReplayableEvent( + queuedPointers.get(pointerId) || null, + blockedOn, + topLevelType, + eventSystemFlags, + pointerEvent, + ), + ); + return true; + } + + case TOP_GOT_POINTER_CAPTURE: { + var _pointerEvent = nativeEvent; + var _pointerId2 = _pointerEvent.pointerId; + queuedPointerCaptures.set( + _pointerId2, + accumulateOrCreateContinuousQueuedReplayableEvent( + queuedPointerCaptures.get(_pointerId2) || null, + blockedOn, + topLevelType, + eventSystemFlags, + _pointerEvent, + ), + ); + return true; + } + } + + return false; + } // Check if this target is unblocked. Returns true if it's unblocked. + + function attemptExplicitHydrationTarget(queuedTarget) { + // TODO: This function shares a lot of logic with attemptToDispatchEvent. + // Try to unify them. It's a bit tricky since it would require two return + // values. + var targetInst = getClosestInstanceFromNode(queuedTarget.target); + + if (targetInst !== null) { + var nearestMounted = getNearestMountedFiber(targetInst); + + if (nearestMounted !== null) { + var tag = nearestMounted.tag; + + if (tag === SuspenseComponent) { + var instance = getSuspenseInstanceFromFiber(nearestMounted); + + if (instance !== null) { + // We're blocked on hydrating this boundary. + // Increase its priority. + queuedTarget.blockedOn = instance; + Scheduler.unstable_runWithPriority(queuedTarget.priority, function () { + attemptHydrationAtCurrentPriority(nearestMounted); + }); + return; + } + } else if (tag === HostRoot) { + var root = nearestMounted.stateNode; + + if (root.hydrate) { + queuedTarget.blockedOn = getContainerFromFiber(nearestMounted); // We don't currently have a way to increase the priority of + // a root other than sync. + + return; + } + } + } + } + + queuedTarget.blockedOn = null; + } + + function queueExplicitHydrationTarget(target) { + if (enableSelectiveHydration) { + var priority = Scheduler.unstable_getCurrentPriorityLevel(); + var queuedTarget = { + blockedOn: null, + target: target, + priority: priority, + }; + var i = 0; + + for (; i < queuedExplicitHydrationTargets.length; i++) { + if (priority <= queuedExplicitHydrationTargets[i].priority) { + break; + } + } + + queuedExplicitHydrationTargets.splice(i, 0, queuedTarget); + + if (i === 0) { + attemptExplicitHydrationTarget(queuedTarget); + } + } + } + + function attemptReplayContinuousQueuedEvent(queuedEvent) { + if (queuedEvent.blockedOn !== null) { + return false; + } + + var nextBlockedOn = attemptToDispatchEvent( + queuedEvent.topLevelType, + queuedEvent.eventSystemFlags, + queuedEvent.nativeEvent, + ); + + if (nextBlockedOn !== null) { + // We're still blocked. Try again later. + var _fiber3 = getInstanceFromNode$1(nextBlockedOn); + + if (_fiber3 !== null) { + attemptContinuousHydration(_fiber3); + } + + queuedEvent.blockedOn = nextBlockedOn; + return false; + } + + return true; + } + + function attemptReplayContinuousQueuedEventInMap(queuedEvent, key, map) { + if (attemptReplayContinuousQueuedEvent(queuedEvent)) { + map.delete(key); + } + } + + function replayUnblockedEvents() { + hasScheduledReplayAttempt = false; // First replay discrete events. + + while (queuedDiscreteEvents.length > 0) { + var nextDiscreteEvent = queuedDiscreteEvents[0]; + + if (nextDiscreteEvent.blockedOn !== null) { + // We're still blocked. + // Increase the priority of this boundary to unblock + // the next discrete event. + var _fiber4 = getInstanceFromNode$1(nextDiscreteEvent.blockedOn); + + if (_fiber4 !== null) { + attemptUserBlockingHydration(_fiber4); + } + + break; + } + + var nextBlockedOn = attemptToDispatchEvent( + nextDiscreteEvent.topLevelType, + nextDiscreteEvent.eventSystemFlags, + nextDiscreteEvent.nativeEvent, + ); + + if (nextBlockedOn !== null) { + // We're still blocked. Try again later. + nextDiscreteEvent.blockedOn = nextBlockedOn; + } else { + // We've successfully replayed the first event. Let's try the next one. + queuedDiscreteEvents.shift(); + } + } // Next replay any continuous events. + + if (queuedFocus !== null && attemptReplayContinuousQueuedEvent(queuedFocus)) { + queuedFocus = null; + } + + if (queuedDrag !== null && attemptReplayContinuousQueuedEvent(queuedDrag)) { + queuedDrag = null; + } + + if (queuedMouse !== null && attemptReplayContinuousQueuedEvent(queuedMouse)) { + queuedMouse = null; + } + + queuedPointers.forEach(attemptReplayContinuousQueuedEventInMap); + queuedPointerCaptures.forEach(attemptReplayContinuousQueuedEventInMap); + } + + function scheduleCallbackIfUnblocked(queuedEvent, unblocked) { + if (queuedEvent.blockedOn === unblocked) { + queuedEvent.blockedOn = null; + + if (!hasScheduledReplayAttempt) { + hasScheduledReplayAttempt = true; // Schedule a callback to attempt replaying as many events as are + // now unblocked. This first might not actually be unblocked yet. + // We could check it early to avoid scheduling an unnecessary callback. + + Scheduler.unstable_scheduleCallback(Scheduler.unstable_NormalPriority, replayUnblockedEvents); + } + } + } + + function retryIfBlockedOn(unblocked) { + // Mark anything that was blocked on this as no longer blocked + // and eligible for a replay. + if (queuedDiscreteEvents.length > 0) { + scheduleCallbackIfUnblocked(queuedDiscreteEvents[0], unblocked); // This is a exponential search for each boundary that commits. I think it's + // worth it because we expect very few discrete events to queue up and once + // we are actually fully unblocked it will be fast to replay them. + + for (var i = 1; i < queuedDiscreteEvents.length; i++) { + var queuedEvent = queuedDiscreteEvents[i]; + + if (queuedEvent.blockedOn === unblocked) { + queuedEvent.blockedOn = null; + } + } + } + + if (queuedFocus !== null) { + scheduleCallbackIfUnblocked(queuedFocus, unblocked); + } + + if (queuedDrag !== null) { + scheduleCallbackIfUnblocked(queuedDrag, unblocked); + } + + if (queuedMouse !== null) { + scheduleCallbackIfUnblocked(queuedMouse, unblocked); + } + + var unblock = function (queuedEvent) { + return scheduleCallbackIfUnblocked(queuedEvent, unblocked); + }; + + queuedPointers.forEach(unblock); + queuedPointerCaptures.forEach(unblock); + + for (var _i = 0; _i < queuedExplicitHydrationTargets.length; _i++) { + var queuedTarget = queuedExplicitHydrationTargets[_i]; + + if (queuedTarget.blockedOn === unblocked) { + queuedTarget.blockedOn = null; + } + } + + while (queuedExplicitHydrationTargets.length > 0) { + var nextExplicitTarget = queuedExplicitHydrationTargets[0]; + + if (nextExplicitTarget.blockedOn !== null) { + // We're still blocked. + break; + } else { + attemptExplicitHydrationTarget(nextExplicitTarget); + + if (nextExplicitTarget.blockedOn === null) { + // We're unblocked. + queuedExplicitHydrationTargets.shift(); + } + } + } + } + + function addEventBubbleListener(element, eventType, listener) { + element.addEventListener(eventType, listener, false); + } + function addEventCaptureListener(element, eventType, listener) { + element.addEventListener(eventType, listener, true); + } + function addEventCaptureListenerWithPassiveFlag(element, eventType, listener, passive) { + element.addEventListener(eventType, listener, { + capture: true, + passive: passive, + }); + } + + /** + * Gets the target node from a native browser event by accounting for + * inconsistencies in browser DOM APIs. + * + * @param {object} nativeEvent Native browser event. + * @return {DOMEventTarget} Target node. + */ + + function getEventTarget(nativeEvent) { + // Fallback to nativeEvent.srcElement for IE9 + // https://github.com/facebook/react/issues/12506 + var target = nativeEvent.target || nativeEvent.srcElement || window; // Normalize SVG <use> element events #4963 + + if (target.correspondingUseElement) { + target = target.correspondingUseElement; + } // Safari may fire events on text nodes (Node.TEXT_NODE is 3). + // @see http://www.quirksmode.org/js/events_properties.html + + return target.nodeType === TEXT_NODE ? target.parentNode : target; + } + + function getParent(inst) { + do { + inst = inst.return; // TODO: If this is a HostRoot we might want to bail out. + // That is depending on if we want nested subtrees (layers) to bubble + // events to their parent. We could also go through parentNode on the + // host node but that wouldn't work for React Native and doesn't let us + // do the portal feature. + } while (inst && inst.tag !== HostComponent); + + if (inst) { + return inst; + } + + return null; + } + /** + * Return the lowest common ancestor of A and B, or null if they are in + * different trees. + */ + + function getLowestCommonAncestor(instA, instB) { + var depthA = 0; + + for (var tempA = instA; tempA; tempA = getParent(tempA)) { + depthA++; + } + + var depthB = 0; + + for (var tempB = instB; tempB; tempB = getParent(tempB)) { + depthB++; + } // If A is deeper, crawl up. + + while (depthA - depthB > 0) { + instA = getParent(instA); + depthA--; + } // If B is deeper, crawl up. + + while (depthB - depthA > 0) { + instB = getParent(instB); + depthB--; + } // Walk in lockstep until we find a match. + + var depth = depthA; + + while (depth--) { + if (instA === instB || instA === instB.alternate) { + return instA; + } + + instA = getParent(instA); + instB = getParent(instB); + } + + return null; + } + /** + * Return if A is an ancestor of B. + */ + + /** + * Return the parent instance of the passed-in instance. + */ + + /** + * Simulates the traversal of a two-phase, capture/bubble event dispatch. + */ + + function traverseTwoPhase(inst, fn, arg) { + var path = []; + + while (inst) { + path.push(inst); + inst = getParent(inst); + } + + var i; + + for (i = path.length; i-- > 0; ) { + fn(path[i], 'captured', arg); + } + + for (i = 0; i < path.length; i++) { + fn(path[i], 'bubbled', arg); + } + } + /** + * Traverses the ID hierarchy and invokes the supplied `cb` on any IDs that + * should would receive a `mouseEnter` or `mouseLeave` event. + * + * Does not invoke the callback on the nearest common ancestor because nothing + * "entered" or "left" that element. + */ + + function traverseEnterLeave(from, to, fn, argFrom, argTo) { + var common = from && to ? getLowestCommonAncestor(from, to) : null; + var pathFrom = []; + + while (true) { + if (!from) { + break; + } + + if (from === common) { + break; + } + + var alternate = from.alternate; + + if (alternate !== null && alternate === common) { + break; + } + + pathFrom.push(from); + from = getParent(from); + } + + var pathTo = []; + + while (true) { + if (!to) { + break; + } + + if (to === common) { + break; + } + + var _alternate = to.alternate; + + if (_alternate !== null && _alternate === common) { + break; + } + + pathTo.push(to); + to = getParent(to); + } + + for (var i = 0; i < pathFrom.length; i++) { + fn(pathFrom[i], 'bubbled', argFrom); + } + + for (var _i = pathTo.length; _i-- > 0; ) { + fn(pathTo[_i], 'captured', argTo); + } + } + + /** + * Some event types have a notion of different registration names for different + * "phases" of propagation. This finds listeners by a given phase. + */ + function listenerAtPhase(inst, event, propagationPhase) { + var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase]; + return getListener(inst, registrationName); + } + /** + * A small set of propagation patterns, each of which will accept a small amount + * of information, and generate a set of "dispatch ready event objects" - which + * are sets of events that have already been annotated with a set of dispatched + * listener functions/ids. The API is designed this way to discourage these + * propagation strategies from actually executing the dispatches, since we + * always want to collect the entire set of dispatches before executing even a + * single one. + */ + + /** + * Tags a `SyntheticEvent` with dispatched listeners. Creating this function + * here, allows us to not have to bind or create functions for each event. + * Mutating the event's members allows us to not have to create a wrapping + * "dispatch" object that pairs the event with the listener. + */ + + function accumulateDirectionalDispatches(inst, phase, event) { + { + !inst ? warningWithoutStack$1(false, 'Dispatching inst must not be null') : void 0; + } + + var listener = listenerAtPhase(inst, event, phase); + + if (listener) { + event._dispatchListeners = accumulateInto(event._dispatchListeners, listener); + event._dispatchInstances = accumulateInto(event._dispatchInstances, inst); + } + } + /** + * Collect dispatches (must be entirely collected before dispatching - see unit + * tests). Lazily allocate the array to conserve memory. We must loop through + * each event and perform the traversal for each one. We cannot perform a + * single traversal for the entire collection of events because each event may + * have a different target. + */ + + function accumulateTwoPhaseDispatchesSingle(event) { + if (event && event.dispatchConfig.phasedRegistrationNames) { + traverseTwoPhase(event._targetInst, accumulateDirectionalDispatches, event); + } + } + /** + * Accumulates without regard to direction, does not look for phased + * registration names. Same as `accumulateDirectDispatchesSingle` but without + * requiring that the `dispatchMarker` be the same as the dispatched ID. + */ + + function accumulateDispatches(inst, ignoredDirection, event) { + if (inst && event && event.dispatchConfig.registrationName) { + var registrationName = event.dispatchConfig.registrationName; + var listener = getListener(inst, registrationName); + + if (listener) { + event._dispatchListeners = accumulateInto(event._dispatchListeners, listener); + event._dispatchInstances = accumulateInto(event._dispatchInstances, inst); + } + } + } + /** + * Accumulates dispatches on an `SyntheticEvent`, but only for the + * `dispatchMarker`. + * @param {SyntheticEvent} event + */ + + function accumulateDirectDispatchesSingle(event) { + if (event && event.dispatchConfig.registrationName) { + accumulateDispatches(event._targetInst, null, event); + } + } + + function accumulateTwoPhaseDispatches(events) { + forEachAccumulated(events, accumulateTwoPhaseDispatchesSingle); + } + + function accumulateEnterLeaveDispatches(leave, enter, from, to) { + traverseEnterLeave(from, to, accumulateDispatches, leave, enter); + } + function accumulateDirectDispatches(events) { + forEachAccumulated(events, accumulateDirectDispatchesSingle); + } + + /* eslint valid-typeof: 0 */ + var EVENT_POOL_SIZE = 10; + /** + * @interface Event + * @see http://www.w3.org/TR/DOM-Level-3-Events/ + */ + + var EventInterface = { + type: null, + target: null, + // currentTarget is set when dispatching; no use in copying it here + currentTarget: function () { + return null; + }, + eventPhase: null, + bubbles: null, + cancelable: null, + timeStamp: function (event) { + return event.timeStamp || Date.now(); + }, + defaultPrevented: null, + isTrusted: null, + }; + + function functionThatReturnsTrue() { + return true; + } + + function functionThatReturnsFalse() { + return false; + } + /** + * Synthetic events are dispatched by event plugins, typically in response to a + * top-level event delegation handler. + * + * These systems should generally use pooling to reduce the frequency of garbage + * collection. The system should check `isPersistent` to determine whether the + * event should be released into the pool after being dispatched. Users that + * need a persisted event should invoke `persist`. + * + * Synthetic events (and subclasses) implement the DOM Level 3 Events API by + * normalizing browser quirks. Subclasses do not necessarily have to implement a + * DOM interface; custom application-specific events can also subclass this. + * + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {*} targetInst Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @param {DOMEventTarget} nativeEventTarget Target node. + */ + + function SyntheticEvent(dispatchConfig, targetInst, nativeEvent, nativeEventTarget) { + { + // these have a getter/setter for warnings + delete this.nativeEvent; + delete this.preventDefault; + delete this.stopPropagation; + delete this.isDefaultPrevented; + delete this.isPropagationStopped; + } + + this.dispatchConfig = dispatchConfig; + this._targetInst = targetInst; + this.nativeEvent = nativeEvent; + var Interface = this.constructor.Interface; + + for (var propName in Interface) { + if (!Interface.hasOwnProperty(propName)) { + continue; + } + + { + delete this[propName]; // this has a getter/setter for warnings + } + + var normalize = Interface[propName]; + + if (normalize) { + this[propName] = normalize(nativeEvent); + } else { + if (propName === 'target') { + this.target = nativeEventTarget; + } else { + this[propName] = nativeEvent[propName]; + } + } + } + + var defaultPrevented = + nativeEvent.defaultPrevented != null + ? nativeEvent.defaultPrevented + : nativeEvent.returnValue === false; + + if (defaultPrevented) { + this.isDefaultPrevented = functionThatReturnsTrue; + } else { + this.isDefaultPrevented = functionThatReturnsFalse; + } + + this.isPropagationStopped = functionThatReturnsFalse; + return this; + } + + _assign(SyntheticEvent.prototype, { + preventDefault: function () { + this.defaultPrevented = true; + var event = this.nativeEvent; + + if (!event) { + return; + } + + if (event.preventDefault) { + event.preventDefault(); + } else if (typeof event.returnValue !== 'unknown') { + event.returnValue = false; + } + + this.isDefaultPrevented = functionThatReturnsTrue; + }, + stopPropagation: function () { + var event = this.nativeEvent; + + if (!event) { + return; + } + + if (event.stopPropagation) { + event.stopPropagation(); + } else if (typeof event.cancelBubble !== 'unknown') { + // The ChangeEventPlugin registers a "propertychange" event for + // IE. This event does not support bubbling or cancelling, and + // any references to cancelBubble throw "Member not found". A + // typeof check of "unknown" circumvents this issue (and is also + // IE specific). + event.cancelBubble = true; + } + + this.isPropagationStopped = functionThatReturnsTrue; + }, + + /** + * We release all dispatched `SyntheticEvent`s after each event loop, adding + * them back into the pool. This allows a way to hold onto a reference that + * won't be added back into the pool. + */ + persist: function () { + this.isPersistent = functionThatReturnsTrue; + }, + + /** + * Checks if this event should be released back into the pool. + * + * @return {boolean} True if this should not be released, false otherwise. + */ + isPersistent: functionThatReturnsFalse, + + /** + * `PooledClass` looks for `destructor` on each instance it releases. + */ + destructor: function () { + var Interface = this.constructor.Interface; + + for (var propName in Interface) { + { + Object.defineProperty( + this, + propName, + getPooledWarningPropertyDefinition(propName, Interface[propName]), + ); + } + } + + this.dispatchConfig = null; + this._targetInst = null; + this.nativeEvent = null; + this.isDefaultPrevented = functionThatReturnsFalse; + this.isPropagationStopped = functionThatReturnsFalse; + this._dispatchListeners = null; + this._dispatchInstances = null; + + { + Object.defineProperty( + this, + 'nativeEvent', + getPooledWarningPropertyDefinition('nativeEvent', null), + ); + Object.defineProperty( + this, + 'isDefaultPrevented', + getPooledWarningPropertyDefinition('isDefaultPrevented', functionThatReturnsFalse), + ); + Object.defineProperty( + this, + 'isPropagationStopped', + getPooledWarningPropertyDefinition('isPropagationStopped', functionThatReturnsFalse), + ); + Object.defineProperty( + this, + 'preventDefault', + getPooledWarningPropertyDefinition('preventDefault', function () {}), + ); + Object.defineProperty( + this, + 'stopPropagation', + getPooledWarningPropertyDefinition('stopPropagation', function () {}), + ); + } + }, + }); + + SyntheticEvent.Interface = EventInterface; + /** + * Helper to reduce boilerplate when creating subclasses. + */ + + SyntheticEvent.extend = function (Interface) { + var Super = this; + + var E = function () {}; + + E.prototype = Super.prototype; + var prototype = new E(); + + function Class() { + return Super.apply(this, arguments); + } + + _assign(prototype, Class.prototype); + + Class.prototype = prototype; + Class.prototype.constructor = Class; + Class.Interface = _assign({}, Super.Interface, Interface); + Class.extend = Super.extend; + addEventPoolingTo(Class); + return Class; + }; + + addEventPoolingTo(SyntheticEvent); + /** + * Helper to nullify syntheticEvent instance properties when destructing + * + * @param {String} propName + * @param {?object} getVal + * @return {object} defineProperty object + */ + + function getPooledWarningPropertyDefinition(propName, getVal) { + var isFunction = typeof getVal === 'function'; + return { + configurable: true, + set: set, + get: get, + }; + + function set(val) { + var action = isFunction ? 'setting the method' : 'setting the property'; + warn(action, 'This is effectively a no-op'); + return val; + } + + function get() { + var action = isFunction ? 'accessing the method' : 'accessing the property'; + var result = isFunction ? 'This is a no-op function' : 'This is set to null'; + warn(action, result); + return getVal; + } + + function warn(action, result) { + var warningCondition = false; + !warningCondition + ? warningWithoutStack$1( + false, + "This synthetic event is reused for performance reasons. If you're seeing this, " + + "you're %s `%s` on a released/nullified synthetic event. %s. " + + 'If you must keep the original synthetic event around, use event.persist(). ' + + 'See https://fb.me/react-event-pooling for more information.', + action, + propName, + result, + ) + : void 0; + } + } + + function getPooledEvent(dispatchConfig, targetInst, nativeEvent, nativeInst) { + var EventConstructor = this; + + if (EventConstructor.eventPool.length) { + var instance = EventConstructor.eventPool.pop(); + EventConstructor.call(instance, dispatchConfig, targetInst, nativeEvent, nativeInst); + return instance; + } + + return new EventConstructor(dispatchConfig, targetInst, nativeEvent, nativeInst); + } + + function releasePooledEvent(event) { + var EventConstructor = this; + + if (!(event instanceof EventConstructor)) { + { + throw Error('Trying to release an event instance into a pool of a different type.'); + } + } + + event.destructor(); + + if (EventConstructor.eventPool.length < EVENT_POOL_SIZE) { + EventConstructor.eventPool.push(event); + } + } + + function addEventPoolingTo(EventConstructor) { + EventConstructor.eventPool = []; + EventConstructor.getPooled = getPooledEvent; + EventConstructor.release = releasePooledEvent; + } + + /** + * @interface Event + * @see http://www.w3.org/TR/css3-animations/#AnimationEvent-interface + * @see https://developer.mozilla.org/en-US/docs/Web/API/AnimationEvent + */ + + var SyntheticAnimationEvent = SyntheticEvent.extend({ + animationName: null, + elapsedTime: null, + pseudoElement: null, + }); + + /** + * @interface Event + * @see http://www.w3.org/TR/clipboard-apis/ + */ + + var SyntheticClipboardEvent = SyntheticEvent.extend({ + clipboardData: function (event) { + return 'clipboardData' in event ? event.clipboardData : window.clipboardData; + }, + }); + + var SyntheticUIEvent = SyntheticEvent.extend({ + view: null, + detail: null, + }); + + /** + * @interface FocusEvent + * @see http://www.w3.org/TR/DOM-Level-3-Events/ + */ + + var SyntheticFocusEvent = SyntheticUIEvent.extend({ + relatedTarget: null, + }); + + /** + * `charCode` represents the actual "character code" and is safe to use with + * `String.fromCharCode`. As such, only keys that correspond to printable + * characters produce a valid `charCode`, the only exception to this is Enter. + * The Tab-key is considered non-printable and does not have a `charCode`, + * presumably because it does not produce a tab-character in browsers. + * + * @param {object} nativeEvent Native browser event. + * @return {number} Normalized `charCode` property. + */ + function getEventCharCode(nativeEvent) { + var charCode; + var keyCode = nativeEvent.keyCode; + + if ('charCode' in nativeEvent) { + charCode = nativeEvent.charCode; // FF does not set `charCode` for the Enter-key, check against `keyCode`. + + if (charCode === 0 && keyCode === 13) { + charCode = 13; + } + } else { + // IE8 does not implement `charCode`, but `keyCode` has the correct value. + charCode = keyCode; + } // IE and Edge (on Windows) and Chrome / Safari (on Windows and Linux) + // report Enter as charCode 10 when ctrl is pressed. + + if (charCode === 10) { + charCode = 13; + } // Some non-printable keys are reported in `charCode`/`keyCode`, discard them. + // Must not discard the (non-)printable Enter-key. + + if (charCode >= 32 || charCode === 13) { + return charCode; + } + + return 0; + } + + /** + * Normalization of deprecated HTML5 `key` values + * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names + */ + + var normalizeKey = { + Esc: 'Escape', + Spacebar: ' ', + Left: 'ArrowLeft', + Up: 'ArrowUp', + Right: 'ArrowRight', + Down: 'ArrowDown', + Del: 'Delete', + Win: 'OS', + Menu: 'ContextMenu', + Apps: 'ContextMenu', + Scroll: 'ScrollLock', + MozPrintableKey: 'Unidentified', + }; + /** + * Translation from legacy `keyCode` to HTML5 `key` + * Only special keys supported, all others depend on keyboard layout or browser + * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names + */ + + var translateToKey = { + 8: 'Backspace', + 9: 'Tab', + 12: 'Clear', + 13: 'Enter', + 16: 'Shift', + 17: 'Control', + 18: 'Alt', + 19: 'Pause', + 20: 'CapsLock', + 27: 'Escape', + 32: ' ', + 33: 'PageUp', + 34: 'PageDown', + 35: 'End', + 36: 'Home', + 37: 'ArrowLeft', + 38: 'ArrowUp', + 39: 'ArrowRight', + 40: 'ArrowDown', + 45: 'Insert', + 46: 'Delete', + 112: 'F1', + 113: 'F2', + 114: 'F3', + 115: 'F4', + 116: 'F5', + 117: 'F6', + 118: 'F7', + 119: 'F8', + 120: 'F9', + 121: 'F10', + 122: 'F11', + 123: 'F12', + 144: 'NumLock', + 145: 'ScrollLock', + 224: 'Meta', + }; + /** + * @param {object} nativeEvent Native browser event. + * @return {string} Normalized `key` property. + */ + + function getEventKey(nativeEvent) { + if (nativeEvent.key) { + // Normalize inconsistent values reported by browsers due to + // implementations of a working draft specification. + // FireFox implements `key` but returns `MozPrintableKey` for all + // printable characters (normalized to `Unidentified`), ignore it. + var key = normalizeKey[nativeEvent.key] || nativeEvent.key; + + if (key !== 'Unidentified') { + return key; + } + } // Browser does not implement `key`, polyfill as much of it as we can. + + if (nativeEvent.type === 'keypress') { + var charCode = getEventCharCode(nativeEvent); // The enter-key is technically both printable and non-printable and can + // thus be captured by `keypress`, no other non-printable key should. + + return charCode === 13 ? 'Enter' : String.fromCharCode(charCode); + } + + if (nativeEvent.type === 'keydown' || nativeEvent.type === 'keyup') { + // While user keyboard layout determines the actual meaning of each + // `keyCode` value, almost all function keys have a universal value. + return translateToKey[nativeEvent.keyCode] || 'Unidentified'; + } + + return ''; + } + + /** + * Translation from modifier key to the associated property in the event. + * @see http://www.w3.org/TR/DOM-Level-3-Events/#keys-Modifiers + */ + var modifierKeyToProp = { + Alt: 'altKey', + Control: 'ctrlKey', + Meta: 'metaKey', + Shift: 'shiftKey', + }; // Older browsers (Safari <= 10, iOS Safari <= 10.2) do not support + // getModifierState. If getModifierState is not supported, we map it to a set of + // modifier keys exposed by the event. In this case, Lock-keys are not supported. + + function modifierStateGetter(keyArg) { + var syntheticEvent = this; + var nativeEvent = syntheticEvent.nativeEvent; + + if (nativeEvent.getModifierState) { + return nativeEvent.getModifierState(keyArg); + } + + var keyProp = modifierKeyToProp[keyArg]; + return keyProp ? !!nativeEvent[keyProp] : false; + } + + function getEventModifierState(nativeEvent) { + return modifierStateGetter; + } + + /** + * @interface KeyboardEvent + * @see http://www.w3.org/TR/DOM-Level-3-Events/ + */ + + var SyntheticKeyboardEvent = SyntheticUIEvent.extend({ + key: getEventKey, + location: null, + ctrlKey: null, + shiftKey: null, + altKey: null, + metaKey: null, + repeat: null, + locale: null, + getModifierState: getEventModifierState, + // Legacy Interface + charCode: function (event) { + // `charCode` is the result of a KeyPress event and represents the value of + // the actual printable character. + // KeyPress is deprecated, but its replacement is not yet final and not + // implemented in any major browser. Only KeyPress has charCode. + if (event.type === 'keypress') { + return getEventCharCode(event); + } + + return 0; + }, + keyCode: function (event) { + // `keyCode` is the result of a KeyDown/Up event and represents the value of + // physical keyboard key. + // The actual meaning of the value depends on the users' keyboard layout + // which cannot be detected. Assuming that it is a US keyboard layout + // provides a surprisingly accurate mapping for US and European users. + // Due to this, it is left to the user to implement at this time. + if (event.type === 'keydown' || event.type === 'keyup') { + return event.keyCode; + } + + return 0; + }, + which: function (event) { + // `which` is an alias for either `keyCode` or `charCode` depending on the + // type of the event. + if (event.type === 'keypress') { + return getEventCharCode(event); + } + + if (event.type === 'keydown' || event.type === 'keyup') { + return event.keyCode; + } + + return 0; + }, + }); + + var previousScreenX = 0; + var previousScreenY = 0; // Use flags to signal movementX/Y has already been set + + var isMovementXSet = false; + var isMovementYSet = false; + /** + * @interface MouseEvent + * @see http://www.w3.org/TR/DOM-Level-3-Events/ + */ + + var SyntheticMouseEvent = SyntheticUIEvent.extend({ + screenX: null, + screenY: null, + clientX: null, + clientY: null, + pageX: null, + pageY: null, + ctrlKey: null, + shiftKey: null, + altKey: null, + metaKey: null, + getModifierState: getEventModifierState, + button: null, + buttons: null, + relatedTarget: function (event) { + return ( + event.relatedTarget || + (event.fromElement === event.srcElement ? event.toElement : event.fromElement) + ); + }, + movementX: function (event) { + if ('movementX' in event) { + return event.movementX; + } + + var screenX = previousScreenX; + previousScreenX = event.screenX; + + if (!isMovementXSet) { + isMovementXSet = true; + return 0; + } + + return event.type === 'mousemove' ? event.screenX - screenX : 0; + }, + movementY: function (event) { + if ('movementY' in event) { + return event.movementY; + } + + var screenY = previousScreenY; + previousScreenY = event.screenY; + + if (!isMovementYSet) { + isMovementYSet = true; + return 0; + } + + return event.type === 'mousemove' ? event.screenY - screenY : 0; + }, + }); + + /** + * @interface PointerEvent + * @see http://www.w3.org/TR/pointerevents/ + */ + + var SyntheticPointerEvent = SyntheticMouseEvent.extend({ + pointerId: null, + width: null, + height: null, + pressure: null, + tangentialPressure: null, + tiltX: null, + tiltY: null, + twist: null, + pointerType: null, + isPrimary: null, + }); + + /** + * @interface DragEvent + * @see http://www.w3.org/TR/DOM-Level-3-Events/ + */ + + var SyntheticDragEvent = SyntheticMouseEvent.extend({ + dataTransfer: null, + }); + + /** + * @interface TouchEvent + * @see http://www.w3.org/TR/touch-events/ + */ + + var SyntheticTouchEvent = SyntheticUIEvent.extend({ + touches: null, + targetTouches: null, + changedTouches: null, + altKey: null, + metaKey: null, + ctrlKey: null, + shiftKey: null, + getModifierState: getEventModifierState, + }); + + /** + * @interface Event + * @see http://www.w3.org/TR/2009/WD-css3-transitions-20090320/#transition-events- + * @see https://developer.mozilla.org/en-US/docs/Web/API/TransitionEvent + */ + + var SyntheticTransitionEvent = SyntheticEvent.extend({ + propertyName: null, + elapsedTime: null, + pseudoElement: null, + }); + + /** + * @interface WheelEvent + * @see http://www.w3.org/TR/DOM-Level-3-Events/ + */ + + var SyntheticWheelEvent = SyntheticMouseEvent.extend({ + deltaX: function (event) { + return 'deltaX' in event + ? event.deltaX // Fallback to `wheelDeltaX` for Webkit and normalize (right is positive). + : 'wheelDeltaX' in event + ? -event.wheelDeltaX + : 0; + }, + deltaY: function (event) { + return 'deltaY' in event + ? event.deltaY // Fallback to `wheelDeltaY` for Webkit and normalize (down is positive). + : 'wheelDeltaY' in event + ? -event.wheelDeltaY // Fallback to `wheelDelta` for IE<9 and normalize (down is positive). + : 'wheelDelta' in event + ? -event.wheelDelta + : 0; + }, + deltaZ: null, + // Browsers without "deltaMode" is reporting in raw wheel delta where one + // notch on the scroll is always +/- 120, roughly equivalent to pixels. + // A good approximation of DOM_DELTA_LINE (1) is 5% of viewport size or + // ~40 pixels, for DOM_DELTA_SCREEN (2) it is 87.5% of viewport size. + deltaMode: null, + }); + + /** + * Turns + * ['abort', ...] + * into + * eventTypes = { + * 'abort': { + * phasedRegistrationNames: { + * bubbled: 'onAbort', + * captured: 'onAbortCapture', + * }, + * dependencies: [TOP_ABORT], + * }, + * ... + * }; + * topLevelEventsToDispatchConfig = new Map([ + * [TOP_ABORT, { sameConfig }], + * ]); + */ + + var eventTuples = [ + // Discrete events + [TOP_BLUR, 'blur', DiscreteEvent], + [TOP_CANCEL, 'cancel', DiscreteEvent], + [TOP_CLICK, 'click', DiscreteEvent], + [TOP_CLOSE, 'close', DiscreteEvent], + [TOP_CONTEXT_MENU, 'contextMenu', DiscreteEvent], + [TOP_COPY, 'copy', DiscreteEvent], + [TOP_CUT, 'cut', DiscreteEvent], + [TOP_AUX_CLICK, 'auxClick', DiscreteEvent], + [TOP_DOUBLE_CLICK, 'doubleClick', DiscreteEvent], + [TOP_DRAG_END, 'dragEnd', DiscreteEvent], + [TOP_DRAG_START, 'dragStart', DiscreteEvent], + [TOP_DROP, 'drop', DiscreteEvent], + [TOP_FOCUS, 'focus', DiscreteEvent], + [TOP_INPUT, 'input', DiscreteEvent], + [TOP_INVALID, 'invalid', DiscreteEvent], + [TOP_KEY_DOWN, 'keyDown', DiscreteEvent], + [TOP_KEY_PRESS, 'keyPress', DiscreteEvent], + [TOP_KEY_UP, 'keyUp', DiscreteEvent], + [TOP_MOUSE_DOWN, 'mouseDown', DiscreteEvent], + [TOP_MOUSE_UP, 'mouseUp', DiscreteEvent], + [TOP_PASTE, 'paste', DiscreteEvent], + [TOP_PAUSE, 'pause', DiscreteEvent], + [TOP_PLAY, 'play', DiscreteEvent], + [TOP_POINTER_CANCEL, 'pointerCancel', DiscreteEvent], + [TOP_POINTER_DOWN, 'pointerDown', DiscreteEvent], + [TOP_POINTER_UP, 'pointerUp', DiscreteEvent], + [TOP_RATE_CHANGE, 'rateChange', DiscreteEvent], + [TOP_RESET, 'reset', DiscreteEvent], + [TOP_SEEKED, 'seeked', DiscreteEvent], + [TOP_SUBMIT, 'submit', DiscreteEvent], + [TOP_TOUCH_CANCEL, 'touchCancel', DiscreteEvent], + [TOP_TOUCH_END, 'touchEnd', DiscreteEvent], + [TOP_TOUCH_START, 'touchStart', DiscreteEvent], + [TOP_VOLUME_CHANGE, 'volumeChange', DiscreteEvent], // User-blocking events + [TOP_DRAG, 'drag', UserBlockingEvent], + [TOP_DRAG_ENTER, 'dragEnter', UserBlockingEvent], + [TOP_DRAG_EXIT, 'dragExit', UserBlockingEvent], + [TOP_DRAG_LEAVE, 'dragLeave', UserBlockingEvent], + [TOP_DRAG_OVER, 'dragOver', UserBlockingEvent], + [TOP_MOUSE_MOVE, 'mouseMove', UserBlockingEvent], + [TOP_MOUSE_OUT, 'mouseOut', UserBlockingEvent], + [TOP_MOUSE_OVER, 'mouseOver', UserBlockingEvent], + [TOP_POINTER_MOVE, 'pointerMove', UserBlockingEvent], + [TOP_POINTER_OUT, 'pointerOut', UserBlockingEvent], + [TOP_POINTER_OVER, 'pointerOver', UserBlockingEvent], + [TOP_SCROLL, 'scroll', UserBlockingEvent], + [TOP_TOGGLE, 'toggle', UserBlockingEvent], + [TOP_TOUCH_MOVE, 'touchMove', UserBlockingEvent], + [TOP_WHEEL, 'wheel', UserBlockingEvent], // Continuous events + [TOP_ABORT, 'abort', ContinuousEvent], + [TOP_ANIMATION_END, 'animationEnd', ContinuousEvent], + [TOP_ANIMATION_ITERATION, 'animationIteration', ContinuousEvent], + [TOP_ANIMATION_START, 'animationStart', ContinuousEvent], + [TOP_CAN_PLAY, 'canPlay', ContinuousEvent], + [TOP_CAN_PLAY_THROUGH, 'canPlayThrough', ContinuousEvent], + [TOP_DURATION_CHANGE, 'durationChange', ContinuousEvent], + [TOP_EMPTIED, 'emptied', ContinuousEvent], + [TOP_ENCRYPTED, 'encrypted', ContinuousEvent], + [TOP_ENDED, 'ended', ContinuousEvent], + [TOP_ERROR, 'error', ContinuousEvent], + [TOP_GOT_POINTER_CAPTURE, 'gotPointerCapture', ContinuousEvent], + [TOP_LOAD, 'load', ContinuousEvent], + [TOP_LOADED_DATA, 'loadedData', ContinuousEvent], + [TOP_LOADED_METADATA, 'loadedMetadata', ContinuousEvent], + [TOP_LOAD_START, 'loadStart', ContinuousEvent], + [TOP_LOST_POINTER_CAPTURE, 'lostPointerCapture', ContinuousEvent], + [TOP_PLAYING, 'playing', ContinuousEvent], + [TOP_PROGRESS, 'progress', ContinuousEvent], + [TOP_SEEKING, 'seeking', ContinuousEvent], + [TOP_STALLED, 'stalled', ContinuousEvent], + [TOP_SUSPEND, 'suspend', ContinuousEvent], + [TOP_TIME_UPDATE, 'timeUpdate', ContinuousEvent], + [TOP_TRANSITION_END, 'transitionEnd', ContinuousEvent], + [TOP_WAITING, 'waiting', ContinuousEvent], + ]; + var eventTypes = {}; + var topLevelEventsToDispatchConfig = {}; + + for (var i = 0; i < eventTuples.length; i++) { + var eventTuple = eventTuples[i]; + var topEvent = eventTuple[0]; + var event = eventTuple[1]; + var eventPriority = eventTuple[2]; + var capitalizedEvent = event[0].toUpperCase() + event.slice(1); + var onEvent = 'on' + capitalizedEvent; + var config = { + phasedRegistrationNames: { + bubbled: onEvent, + captured: onEvent + 'Capture', + }, + dependencies: [topEvent], + eventPriority: eventPriority, + }; + eventTypes[event] = config; + topLevelEventsToDispatchConfig[topEvent] = config; + } // Only used in DEV for exhaustiveness validation. + + var knownHTMLTopLevelTypes = [ + TOP_ABORT, + TOP_CANCEL, + TOP_CAN_PLAY, + TOP_CAN_PLAY_THROUGH, + TOP_CLOSE, + TOP_DURATION_CHANGE, + TOP_EMPTIED, + TOP_ENCRYPTED, + TOP_ENDED, + TOP_ERROR, + TOP_INPUT, + TOP_INVALID, + TOP_LOAD, + TOP_LOADED_DATA, + TOP_LOADED_METADATA, + TOP_LOAD_START, + TOP_PAUSE, + TOP_PLAY, + TOP_PLAYING, + TOP_PROGRESS, + TOP_RATE_CHANGE, + TOP_RESET, + TOP_SEEKED, + TOP_SEEKING, + TOP_STALLED, + TOP_SUBMIT, + TOP_SUSPEND, + TOP_TIME_UPDATE, + TOP_TOGGLE, + TOP_VOLUME_CHANGE, + TOP_WAITING, + ]; + var SimpleEventPlugin = { + eventTypes: eventTypes, + getEventPriority: function (topLevelType) { + var config = topLevelEventsToDispatchConfig[topLevelType]; + return config !== undefined ? config.eventPriority : ContinuousEvent; + }, + extractEvents: function ( + topLevelType, + targetInst, + nativeEvent, + nativeEventTarget, + eventSystemFlags, + ) { + var dispatchConfig = topLevelEventsToDispatchConfig[topLevelType]; + + if (!dispatchConfig) { + return null; + } + + var EventConstructor; + + switch (topLevelType) { + case TOP_KEY_PRESS: + // Firefox creates a keypress event for function keys too. This removes + // the unwanted keypress events. Enter is however both printable and + // non-printable. One would expect Tab to be as well (but it isn't). + if (getEventCharCode(nativeEvent) === 0) { + return null; + } + + /* falls through */ + + case TOP_KEY_DOWN: + case TOP_KEY_UP: + EventConstructor = SyntheticKeyboardEvent; + break; + + case TOP_BLUR: + case TOP_FOCUS: + EventConstructor = SyntheticFocusEvent; + break; + + case TOP_CLICK: + // Firefox creates a click event on right mouse clicks. This removes the + // unwanted click events. + if (nativeEvent.button === 2) { + return null; + } + + /* falls through */ + + case TOP_AUX_CLICK: + case TOP_DOUBLE_CLICK: + case TOP_MOUSE_DOWN: + case TOP_MOUSE_MOVE: + case TOP_MOUSE_UP: // TODO: Disabled elements should not respond to mouse events + + /* falls through */ + + case TOP_MOUSE_OUT: + case TOP_MOUSE_OVER: + case TOP_CONTEXT_MENU: + EventConstructor = SyntheticMouseEvent; + break; + + case TOP_DRAG: + case TOP_DRAG_END: + case TOP_DRAG_ENTER: + case TOP_DRAG_EXIT: + case TOP_DRAG_LEAVE: + case TOP_DRAG_OVER: + case TOP_DRAG_START: + case TOP_DROP: + EventConstructor = SyntheticDragEvent; + break; + + case TOP_TOUCH_CANCEL: + case TOP_TOUCH_END: + case TOP_TOUCH_MOVE: + case TOP_TOUCH_START: + EventConstructor = SyntheticTouchEvent; + break; + + case TOP_ANIMATION_END: + case TOP_ANIMATION_ITERATION: + case TOP_ANIMATION_START: + EventConstructor = SyntheticAnimationEvent; + break; + + case TOP_TRANSITION_END: + EventConstructor = SyntheticTransitionEvent; + break; + + case TOP_SCROLL: + EventConstructor = SyntheticUIEvent; + break; + + case TOP_WHEEL: + EventConstructor = SyntheticWheelEvent; + break; + + case TOP_COPY: + case TOP_CUT: + case TOP_PASTE: + EventConstructor = SyntheticClipboardEvent; + break; + + case TOP_GOT_POINTER_CAPTURE: + case TOP_LOST_POINTER_CAPTURE: + case TOP_POINTER_CANCEL: + case TOP_POINTER_DOWN: + case TOP_POINTER_MOVE: + case TOP_POINTER_OUT: + case TOP_POINTER_OVER: + case TOP_POINTER_UP: + EventConstructor = SyntheticPointerEvent; + break; + + default: + { + if (knownHTMLTopLevelTypes.indexOf(topLevelType) === -1) { + warningWithoutStack$1( + false, + 'SimpleEventPlugin: Unhandled event type, `%s`. This warning ' + + 'is likely caused by a bug in React. Please file an issue.', + topLevelType, + ); + } + } // HTML Events + // @see http://www.w3.org/TR/html5/index.html#events-0 + + EventConstructor = SyntheticEvent; + break; + } + + var event = EventConstructor.getPooled( + dispatchConfig, + targetInst, + nativeEvent, + nativeEventTarget, + ); + accumulateTwoPhaseDispatches(event); + return event; + }, + }; + + var passiveBrowserEventsSupported = false; // Check if browser support events with passive listeners + // https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#Safely_detecting_option_support + + if (enableFlareAPI && canUseDOM) { + try { + var options = {}; // $FlowFixMe: Ignore Flow complaining about needing a value + + Object.defineProperty(options, 'passive', { + get: function () { + passiveBrowserEventsSupported = true; + }, + }); + window.addEventListener('test', options, options); + window.removeEventListener('test', options, options); + } catch (e) { + passiveBrowserEventsSupported = false; + } + } + + // Intentionally not named imports because Rollup would use dynamic dispatch for + // CommonJS interop named imports. + var UserBlockingPriority$1 = Scheduler.unstable_UserBlockingPriority; + var runWithPriority$1 = Scheduler.unstable_runWithPriority; + var getEventPriority = SimpleEventPlugin.getEventPriority; + var CALLBACK_BOOKKEEPING_POOL_SIZE = 10; + var callbackBookkeepingPool = []; + + /** + * Find the deepest React component completely containing the root of the + * passed-in instance (for use when entire React trees are nested within each + * other). If React trees are not nested, returns null. + */ + function findRootContainerNode(inst) { + if (inst.tag === HostRoot) { + return inst.stateNode.containerInfo; + } // TODO: It may be a good idea to cache this to prevent unnecessary DOM + // traversal, but caching is difficult to do correctly without using a + // mutation observer to listen for all DOM changes. + + while (inst.return) { + inst = inst.return; + } + + if (inst.tag !== HostRoot) { + // This can happen if we're in a detached tree. + return null; + } + + return inst.stateNode.containerInfo; + } // Used to store ancestor hierarchy in top level callback + + function getTopLevelCallbackBookKeeping(topLevelType, nativeEvent, targetInst, eventSystemFlags) { + if (callbackBookkeepingPool.length) { + var instance = callbackBookkeepingPool.pop(); + instance.topLevelType = topLevelType; + instance.eventSystemFlags = eventSystemFlags; + instance.nativeEvent = nativeEvent; + instance.targetInst = targetInst; + return instance; + } + + return { + topLevelType: topLevelType, + eventSystemFlags: eventSystemFlags, + nativeEvent: nativeEvent, + targetInst: targetInst, + ancestors: [], + }; + } + + function releaseTopLevelCallbackBookKeeping(instance) { + instance.topLevelType = null; + instance.nativeEvent = null; + instance.targetInst = null; + instance.ancestors.length = 0; + + if (callbackBookkeepingPool.length < CALLBACK_BOOKKEEPING_POOL_SIZE) { + callbackBookkeepingPool.push(instance); + } + } + + function handleTopLevel(bookKeeping) { + var targetInst = bookKeeping.targetInst; // Loop through the hierarchy, in case there's any nested components. + // It's important that we build the array of ancestors before calling any + // event handlers, because event handlers can modify the DOM, leading to + // inconsistencies with ReactMount's node cache. See #1105. + + var ancestor = targetInst; + + do { + if (!ancestor) { + var ancestors = bookKeeping.ancestors; + ancestors.push(ancestor); + break; + } + + var root = findRootContainerNode(ancestor); + + if (!root) { + break; + } + + var tag = ancestor.tag; + + if (tag === HostComponent || tag === HostText) { + bookKeeping.ancestors.push(ancestor); + } + + ancestor = getClosestInstanceFromNode(root); + } while (ancestor); + + for (var i = 0; i < bookKeeping.ancestors.length; i++) { + targetInst = bookKeeping.ancestors[i]; + var eventTarget = getEventTarget(bookKeeping.nativeEvent); + var topLevelType = bookKeeping.topLevelType; + var nativeEvent = bookKeeping.nativeEvent; + runExtractedPluginEventsInBatch( + topLevelType, + targetInst, + nativeEvent, + eventTarget, + bookKeeping.eventSystemFlags, + ); + } + } // TODO: can we stop exporting these? + + var _enabled = true; + function setEnabled(enabled) { + _enabled = !!enabled; + } + function isEnabled() { + return _enabled; + } + function trapBubbledEvent(topLevelType, element) { + trapEventForPluginEventSystem(element, topLevelType, false); + } + function trapCapturedEvent(topLevelType, element) { + trapEventForPluginEventSystem(element, topLevelType, true); + } + function trapEventForResponderEventSystem(element, topLevelType, passive) { + if (enableFlareAPI) { + var rawEventName = getRawEventName(topLevelType); + var eventFlags = RESPONDER_EVENT_SYSTEM; // If passive option is not supported, then the event will be + // active and not passive, but we flag it as using not being + // supported too. This way the responder event plugins know, + // and can provide polyfills if needed. + + if (passive) { + if (passiveBrowserEventsSupported) { + eventFlags |= IS_PASSIVE; + } else { + eventFlags |= IS_ACTIVE; + eventFlags |= PASSIVE_NOT_SUPPORTED; + passive = false; + } + } else { + eventFlags |= IS_ACTIVE; + } // Check if interactive and wrap in discreteUpdates + + var listener = dispatchEvent.bind(null, topLevelType, eventFlags); + + if (passiveBrowserEventsSupported) { + addEventCaptureListenerWithPassiveFlag(element, rawEventName, listener, passive); + } else { + addEventCaptureListener(element, rawEventName, listener); + } + } + } + + function trapEventForPluginEventSystem(element, topLevelType, capture) { + var listener; + + switch (getEventPriority(topLevelType)) { + case DiscreteEvent: + listener = dispatchDiscreteEvent.bind(null, topLevelType, PLUGIN_EVENT_SYSTEM); + break; + + case UserBlockingEvent: + listener = dispatchUserBlockingUpdate.bind(null, topLevelType, PLUGIN_EVENT_SYSTEM); + break; + + case ContinuousEvent: + default: + listener = dispatchEvent.bind(null, topLevelType, PLUGIN_EVENT_SYSTEM); + break; + } + + var rawEventName = getRawEventName(topLevelType); + + if (capture) { + addEventCaptureListener(element, rawEventName, listener); + } else { + addEventBubbleListener(element, rawEventName, listener); + } + } + + function dispatchDiscreteEvent(topLevelType, eventSystemFlags, nativeEvent) { + flushDiscreteUpdatesIfNeeded(nativeEvent.timeStamp); + discreteUpdates(dispatchEvent, topLevelType, eventSystemFlags, nativeEvent); + } + + function dispatchUserBlockingUpdate(topLevelType, eventSystemFlags, nativeEvent) { + runWithPriority$1( + UserBlockingPriority$1, + dispatchEvent.bind(null, topLevelType, eventSystemFlags, nativeEvent), + ); + } + + function dispatchEventForPluginEventSystem( + topLevelType, + eventSystemFlags, + nativeEvent, + targetInst, + ) { + var bookKeeping = getTopLevelCallbackBookKeeping( + topLevelType, + nativeEvent, + targetInst, + eventSystemFlags, + ); + + try { + // Event queue being processed in the same cycle allows + // `preventDefault`. + batchedEventUpdates(handleTopLevel, bookKeeping); + } finally { + releaseTopLevelCallbackBookKeeping(bookKeeping); + } + } + + function dispatchEvent(topLevelType, eventSystemFlags, nativeEvent) { + if (!_enabled) { + return; + } + + if (hasQueuedDiscreteEvents() && isReplayableDiscreteEvent(topLevelType)) { + // If we already have a queue of discrete events, and this is another discrete + // event, then we can't dispatch it regardless of its target, since they + // need to dispatch in order. + queueDiscreteEvent( + null, // Flags that we're not actually blocked on anything as far as we know. + topLevelType, + eventSystemFlags, + nativeEvent, + ); + return; + } + + var blockedOn = attemptToDispatchEvent(topLevelType, eventSystemFlags, nativeEvent); + + if (blockedOn === null) { + // We successfully dispatched this event. + clearIfContinuousEvent(topLevelType, nativeEvent); + return; + } + + if (isReplayableDiscreteEvent(topLevelType)) { + // This this to be replayed later once the target is available. + queueDiscreteEvent(blockedOn, topLevelType, eventSystemFlags, nativeEvent); + return; + } + + if (queueIfContinuousEvent(blockedOn, topLevelType, eventSystemFlags, nativeEvent)) { + return; + } // We need to clear only if we didn't queue because + // queueing is accummulative. + + clearIfContinuousEvent(topLevelType, nativeEvent); // This is not replayable so we'll invoke it but without a target, + // in case the event system needs to trace it. + + if (enableFlareAPI) { + if (eventSystemFlags & PLUGIN_EVENT_SYSTEM) { + dispatchEventForPluginEventSystem(topLevelType, eventSystemFlags, nativeEvent, null); + } + + if (eventSystemFlags & RESPONDER_EVENT_SYSTEM) { + // React Flare event system + dispatchEventForResponderEventSystem( + topLevelType, + null, + nativeEvent, + getEventTarget(nativeEvent), + eventSystemFlags, + ); + } + } else { + dispatchEventForPluginEventSystem(topLevelType, eventSystemFlags, nativeEvent, null); + } + } // Attempt dispatching an event. Returns a SuspenseInstance or Container if it's blocked. + + function attemptToDispatchEvent(topLevelType, eventSystemFlags, nativeEvent) { + // TODO: Warn if _enabled is false. + var nativeEventTarget = getEventTarget(nativeEvent); + var targetInst = getClosestInstanceFromNode(nativeEventTarget); + + if (targetInst !== null) { + var nearestMounted = getNearestMountedFiber(targetInst); + + if (nearestMounted === null) { + // This tree has been unmounted already. Dispatch without a target. + targetInst = null; + } else { + var tag = nearestMounted.tag; + + if (tag === SuspenseComponent) { + var instance = getSuspenseInstanceFromFiber(nearestMounted); + + if (instance !== null) { + // Queue the event to be replayed later. Abort dispatching since we + // don't want this event dispatched twice through the event system. + // TODO: If this is the first discrete event in the queue. Schedule an increased + // priority for this boundary. + return instance; + } // This shouldn't happen, something went wrong but to avoid blocking + // the whole system, dispatch the event without a target. + // TODO: Warn. + + targetInst = null; + } else if (tag === HostRoot) { + var root = nearestMounted.stateNode; + + if (root.hydrate) { + // If this happens during a replay something went wrong and it might block + // the whole system. + return getContainerFromFiber(nearestMounted); + } + + targetInst = null; + } else if (nearestMounted !== targetInst) { + // If we get an event (ex: img onload) before committing that + // component's mount, ignore it for now (that is, treat it as if it was an + // event on a non-React tree). We might also consider queueing events and + // dispatching them after the mount. + targetInst = null; + } + } + } + + if (enableFlareAPI) { + if (eventSystemFlags & PLUGIN_EVENT_SYSTEM) { + dispatchEventForPluginEventSystem(topLevelType, eventSystemFlags, nativeEvent, targetInst); + } + + if (eventSystemFlags & RESPONDER_EVENT_SYSTEM) { + // React Flare event system + dispatchEventForResponderEventSystem( + topLevelType, + targetInst, + nativeEvent, + nativeEventTarget, + eventSystemFlags, + ); + } + } else { + dispatchEventForPluginEventSystem(topLevelType, eventSystemFlags, nativeEvent, targetInst); + } // We're not blocked on anything. + + return null; + } + + /** + * Checks if an event is supported in the current execution environment. + * + * NOTE: This will not work correctly for non-generic events such as `change`, + * `reset`, `load`, `error`, and `select`. + * + * Borrows from Modernizr. + * + * @param {string} eventNameSuffix Event name, e.g. "click". + * @return {boolean} True if the event is supported. + * @internal + * @license Modernizr 3.0.0pre (Custom Build) | MIT + */ + + function isEventSupported(eventNameSuffix) { + if (!canUseDOM) { + return false; + } + + var eventName = 'on' + eventNameSuffix; + var isSupported = eventName in document; + + if (!isSupported) { + var element = document.createElement('div'); + element.setAttribute(eventName, 'return;'); + isSupported = typeof element[eventName] === 'function'; + } + + return isSupported; + } + + /** + * Summary of `ReactBrowserEventEmitter` event handling: + * + * - Top-level delegation is used to trap most native browser events. This + * may only occur in the main thread and is the responsibility of + * ReactDOMEventListener, which is injected and can therefore support + * pluggable event sources. This is the only work that occurs in the main + * thread. + * + * - We normalize and de-duplicate events to account for browser quirks. This + * may be done in the worker thread. + * + * - Forward these native events (with the associated top-level type used to + * trap it) to `EventPluginHub`, which in turn will ask plugins if they want + * to extract any synthetic events. + * + * - The `EventPluginHub` will then process each event by annotating them with + * "dispatches", a sequence of listeners and IDs that care about that event. + * + * - The `EventPluginHub` then dispatches the events. + * + * Overview of React and the event system: + * + * +------------+ . + * | DOM | . + * +------------+ . + * | . + * v . + * +------------+ . + * | ReactEvent | . + * | Listener | . + * +------------+ . +-----------+ + * | . +--------+|SimpleEvent| + * | . | |Plugin | + * +-----|------+ . v +-----------+ + * | | | . +--------------+ +------------+ + * | +-----------.--->|EventPluginHub| | Event | + * | | . | | +-----------+ | Propagators| + * | ReactEvent | . | | |TapEvent | |------------| + * | Emitter | . | |<---+|Plugin | |other plugin| + * | | . | | +-----------+ | utilities | + * | +-----------.--->| | +------------+ + * | | | . +--------------+ + * +-----|------+ . ^ +-----------+ + * | . | |Enter/Leave| + * + . +-------+|Plugin | + * +-------------+ . +-----------+ + * | application | . + * |-------------| . + * | | . + * | | . + * +-------------+ . + * . + * React Core . General Purpose Event Plugin System + */ + + var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map; + var elementListeningSets = new PossiblyWeakMap(); + function getListeningSetForElement(element) { + var listeningSet = elementListeningSets.get(element); + + if (listeningSet === undefined) { + listeningSet = new Set(); + elementListeningSets.set(element, listeningSet); + } + + return listeningSet; + } + /** + * We listen for bubbled touch events on the document object. + * + * Firefox v8.01 (and possibly others) exhibited strange behavior when + * mounting `onmousemove` events at some node that was not the document + * element. The symptoms were that if your mouse is not moving over something + * contained within that mount point (for example on the background) the + * top-level listeners for `onmousemove` won't be called. However, if you + * register the `mousemove` on the document object, then it will of course + * catch all `mousemove`s. This along with iOS quirks, justifies restricting + * top-level listeners to the document object only, at least for these + * movement types of events and possibly all events. + * + * @see http://www.quirksmode.org/blog/archives/2010/09/click_event_del.html + * + * Also, `keyup`/`keypress`/`keydown` do not bubble to the window on IE, but + * they bubble to document. + * + * @param {string} registrationName Name of listener (e.g. `onClick`). + * @param {object} mountAt Container where to mount the listener + */ + + function listenTo(registrationName, mountAt) { + var listeningSet = getListeningSetForElement(mountAt); + var dependencies = registrationNameDependencies[registrationName]; + + for (var i = 0; i < dependencies.length; i++) { + var dependency = dependencies[i]; + listenToTopLevel(dependency, mountAt, listeningSet); + } + } + function listenToTopLevel(topLevelType, mountAt, listeningSet) { + if (!listeningSet.has(topLevelType)) { + switch (topLevelType) { + case TOP_SCROLL: + trapCapturedEvent(TOP_SCROLL, mountAt); + break; + + case TOP_FOCUS: + case TOP_BLUR: + trapCapturedEvent(TOP_FOCUS, mountAt); + trapCapturedEvent(TOP_BLUR, mountAt); // We set the flag for a single dependency later in this function, + // but this ensures we mark both as attached rather than just one. + + listeningSet.add(TOP_BLUR); + listeningSet.add(TOP_FOCUS); + break; + + case TOP_CANCEL: + case TOP_CLOSE: + if (isEventSupported(getRawEventName(topLevelType))) { + trapCapturedEvent(topLevelType, mountAt); + } + + break; + + case TOP_INVALID: + case TOP_SUBMIT: + case TOP_RESET: + // We listen to them on the target DOM elements. + // Some of them bubble so we don't want them to fire twice. + break; + + default: + // By default, listen on the top level to all non-media events. + // Media events don't bubble so adding the listener wouldn't do anything. + var isMediaEvent = mediaEventTypes.indexOf(topLevelType) !== -1; + + if (!isMediaEvent) { + trapBubbledEvent(topLevelType, mountAt); + } + + break; + } + + listeningSet.add(topLevelType); + } + } + function isListeningToAllDependencies(registrationName, mountAt) { + var listeningSet = getListeningSetForElement(mountAt); + var dependencies = registrationNameDependencies[registrationName]; + + for (var i = 0; i < dependencies.length; i++) { + var dependency = dependencies[i]; + + if (!listeningSet.has(dependency)) { + return false; + } + } + + return true; + } + + // List derived from Gecko source code: + // https://github.com/mozilla/gecko-dev/blob/4e638efc71/layout/style/test/property_database.js + var shorthandToLonghand = { + animation: [ + 'animationDelay', + 'animationDirection', + 'animationDuration', + 'animationFillMode', + 'animationIterationCount', + 'animationName', + 'animationPlayState', + 'animationTimingFunction', + ], + background: [ + 'backgroundAttachment', + 'backgroundClip', + 'backgroundColor', + 'backgroundImage', + 'backgroundOrigin', + 'backgroundPositionX', + 'backgroundPositionY', + 'backgroundRepeat', + 'backgroundSize', + ], + backgroundPosition: ['backgroundPositionX', 'backgroundPositionY'], + border: [ + 'borderBottomColor', + 'borderBottomStyle', + 'borderBottomWidth', + 'borderImageOutset', + 'borderImageRepeat', + 'borderImageSlice', + 'borderImageSource', + 'borderImageWidth', + 'borderLeftColor', + 'borderLeftStyle', + 'borderLeftWidth', + 'borderRightColor', + 'borderRightStyle', + 'borderRightWidth', + 'borderTopColor', + 'borderTopStyle', + 'borderTopWidth', + ], + borderBlockEnd: ['borderBlockEndColor', 'borderBlockEndStyle', 'borderBlockEndWidth'], + borderBlockStart: ['borderBlockStartColor', 'borderBlockStartStyle', 'borderBlockStartWidth'], + borderBottom: ['borderBottomColor', 'borderBottomStyle', 'borderBottomWidth'], + borderColor: ['borderBottomColor', 'borderLeftColor', 'borderRightColor', 'borderTopColor'], + borderImage: [ + 'borderImageOutset', + 'borderImageRepeat', + 'borderImageSlice', + 'borderImageSource', + 'borderImageWidth', + ], + borderInlineEnd: ['borderInlineEndColor', 'borderInlineEndStyle', 'borderInlineEndWidth'], + borderInlineStart: ['borderInlineStartColor', 'borderInlineStartStyle', 'borderInlineStartWidth'], + borderLeft: ['borderLeftColor', 'borderLeftStyle', 'borderLeftWidth'], + borderRadius: [ + 'borderBottomLeftRadius', + 'borderBottomRightRadius', + 'borderTopLeftRadius', + 'borderTopRightRadius', + ], + borderRight: ['borderRightColor', 'borderRightStyle', 'borderRightWidth'], + borderStyle: ['borderBottomStyle', 'borderLeftStyle', 'borderRightStyle', 'borderTopStyle'], + borderTop: ['borderTopColor', 'borderTopStyle', 'borderTopWidth'], + borderWidth: ['borderBottomWidth', 'borderLeftWidth', 'borderRightWidth', 'borderTopWidth'], + columnRule: ['columnRuleColor', 'columnRuleStyle', 'columnRuleWidth'], + columns: ['columnCount', 'columnWidth'], + flex: ['flexBasis', 'flexGrow', 'flexShrink'], + flexFlow: ['flexDirection', 'flexWrap'], + font: [ + 'fontFamily', + 'fontFeatureSettings', + 'fontKerning', + 'fontLanguageOverride', + 'fontSize', + 'fontSizeAdjust', + 'fontStretch', + 'fontStyle', + 'fontVariant', + 'fontVariantAlternates', + 'fontVariantCaps', + 'fontVariantEastAsian', + 'fontVariantLigatures', + 'fontVariantNumeric', + 'fontVariantPosition', + 'fontWeight', + 'lineHeight', + ], + fontVariant: [ + 'fontVariantAlternates', + 'fontVariantCaps', + 'fontVariantEastAsian', + 'fontVariantLigatures', + 'fontVariantNumeric', + 'fontVariantPosition', + ], + gap: ['columnGap', 'rowGap'], + grid: [ + 'gridAutoColumns', + 'gridAutoFlow', + 'gridAutoRows', + 'gridTemplateAreas', + 'gridTemplateColumns', + 'gridTemplateRows', + ], + gridArea: ['gridColumnEnd', 'gridColumnStart', 'gridRowEnd', 'gridRowStart'], + gridColumn: ['gridColumnEnd', 'gridColumnStart'], + gridColumnGap: ['columnGap'], + gridGap: ['columnGap', 'rowGap'], + gridRow: ['gridRowEnd', 'gridRowStart'], + gridRowGap: ['rowGap'], + gridTemplate: ['gridTemplateAreas', 'gridTemplateColumns', 'gridTemplateRows'], + listStyle: ['listStyleImage', 'listStylePosition', 'listStyleType'], + margin: ['marginBottom', 'marginLeft', 'marginRight', 'marginTop'], + marker: ['markerEnd', 'markerMid', 'markerStart'], + mask: [ + 'maskClip', + 'maskComposite', + 'maskImage', + 'maskMode', + 'maskOrigin', + 'maskPositionX', + 'maskPositionY', + 'maskRepeat', + 'maskSize', + ], + maskPosition: ['maskPositionX', 'maskPositionY'], + outline: ['outlineColor', 'outlineStyle', 'outlineWidth'], + overflow: ['overflowX', 'overflowY'], + padding: ['paddingBottom', 'paddingLeft', 'paddingRight', 'paddingTop'], + placeContent: ['alignContent', 'justifyContent'], + placeItems: ['alignItems', 'justifyItems'], + placeSelf: ['alignSelf', 'justifySelf'], + textDecoration: ['textDecorationColor', 'textDecorationLine', 'textDecorationStyle'], + textEmphasis: ['textEmphasisColor', 'textEmphasisStyle'], + transition: [ + 'transitionDelay', + 'transitionDuration', + 'transitionProperty', + 'transitionTimingFunction', + ], + wordWrap: ['overflowWrap'], + }; + + /** + * CSS properties which accept numbers but are not in units of "px". + */ + var isUnitlessNumber = { + animationIterationCount: true, + borderImageOutset: true, + borderImageSlice: true, + borderImageWidth: true, + boxFlex: true, + boxFlexGroup: true, + boxOrdinalGroup: true, + columnCount: true, + columns: true, + flex: true, + flexGrow: true, + flexPositive: true, + flexShrink: true, + flexNegative: true, + flexOrder: true, + gridArea: true, + gridRow: true, + gridRowEnd: true, + gridRowSpan: true, + gridRowStart: true, + gridColumn: true, + gridColumnEnd: true, + gridColumnSpan: true, + gridColumnStart: true, + fontWeight: true, + lineClamp: true, + lineHeight: true, + opacity: true, + order: true, + orphans: true, + tabSize: true, + widows: true, + zIndex: true, + zoom: true, + // SVG-related properties + fillOpacity: true, + floodOpacity: true, + stopOpacity: true, + strokeDasharray: true, + strokeDashoffset: true, + strokeMiterlimit: true, + strokeOpacity: true, + strokeWidth: true, + }; + /** + * @param {string} prefix vendor-specific prefix, eg: Webkit + * @param {string} key style name, eg: transitionDuration + * @return {string} style name prefixed with `prefix`, properly camelCased, eg: + * WebkitTransitionDuration + */ + + function prefixKey(prefix, key) { + return prefix + key.charAt(0).toUpperCase() + key.substring(1); + } + /** + * Support style names that may come passed in prefixed by adding permutations + * of vendor prefixes. + */ + + var prefixes = ['Webkit', 'ms', 'Moz', 'O']; // Using Object.keys here, or else the vanilla for-in loop makes IE8 go into an + // infinite loop, because it iterates over the newly added props too. + + Object.keys(isUnitlessNumber).forEach(function (prop) { + prefixes.forEach(function (prefix) { + isUnitlessNumber[prefixKey(prefix, prop)] = isUnitlessNumber[prop]; + }); + }); + + /** + * Convert a value into the proper css writable value. The style name `name` + * should be logical (no hyphens), as specified + * in `CSSProperty.isUnitlessNumber`. + * + * @param {string} name CSS property name such as `topMargin`. + * @param {*} value CSS property value such as `10px`. + * @return {string} Normalized style value with dimensions applied. + */ + + function dangerousStyleValue(name, value, isCustomProperty) { + // Note that we've removed escapeTextForBrowser() calls here since the + // whole string will be escaped when the attribute is injected into + // the markup. If you provide unsafe user data here they can inject + // arbitrary CSS which may be problematic (I couldn't repro this): + // https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet + // http://www.thespanner.co.uk/2007/11/26/ultimate-xss-css-injection/ + // This is not an XSS hole but instead a potential CSS injection issue + // which has lead to a greater discussion about how we're going to + // trust URLs moving forward. See #2115901 + var isEmpty = value == null || typeof value === 'boolean' || value === ''; + + if (isEmpty) { + return ''; + } + + if ( + !isCustomProperty && + typeof value === 'number' && + value !== 0 && + !(isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name]) + ) { + return value + 'px'; // Presumes implicit 'px' suffix for unitless numbers + } + + return ('' + value).trim(); + } + + var uppercasePattern = /([A-Z])/g; + var msPattern = /^ms-/; + /** + * Hyphenates a camelcased CSS property name, for example: + * + * > hyphenateStyleName('backgroundColor') + * < "background-color" + * > hyphenateStyleName('MozTransition') + * < "-moz-transition" + * > hyphenateStyleName('msTransition') + * < "-ms-transition" + * + * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix + * is converted to `-ms-`. + */ + + function hyphenateStyleName(name) { + return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-'); + } + + var warnValidStyle = function () {}; + + { + // 'msTransform' is correct, but the other prefixes should be capitalized + var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/; + var msPattern$1 = /^-ms-/; + var hyphenPattern = /-(.)/g; // style values shouldn't contain a semicolon + + var badStyleValueWithSemicolonPattern = /;\s*$/; + var warnedStyleNames = {}; + var warnedStyleValues = {}; + var warnedForNaNValue = false; + var warnedForInfinityValue = false; + + var camelize = function (string) { + return string.replace(hyphenPattern, function (_, character) { + return character.toUpperCase(); + }); + }; + + var warnHyphenatedStyleName = function (name) { + if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) { + return; + } + + warnedStyleNames[name] = true; + warning$1( + false, + 'Unsupported style property %s. Did you mean %s?', + name, // As Andi Smith suggests + // (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix + // is converted to lowercase `ms`. + camelize(name.replace(msPattern$1, 'ms-')), + ); + }; + + var warnBadVendoredStyleName = function (name) { + if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) { + return; + } + + warnedStyleNames[name] = true; + warning$1( + false, + 'Unsupported vendor-prefixed style property %s. Did you mean %s?', + name, + name.charAt(0).toUpperCase() + name.slice(1), + ); + }; + + var warnStyleValueWithSemicolon = function (name, value) { + if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) { + return; + } + + warnedStyleValues[value] = true; + warning$1( + false, + "Style property values shouldn't contain a semicolon. " + 'Try "%s: %s" instead.', + name, + value.replace(badStyleValueWithSemicolonPattern, ''), + ); + }; + + var warnStyleValueIsNaN = function (name, value) { + if (warnedForNaNValue) { + return; + } + + warnedForNaNValue = true; + warning$1(false, '`NaN` is an invalid value for the `%s` css style property.', name); + }; + + var warnStyleValueIsInfinity = function (name, value) { + if (warnedForInfinityValue) { + return; + } + + warnedForInfinityValue = true; + warning$1(false, '`Infinity` is an invalid value for the `%s` css style property.', name); + }; + + warnValidStyle = function (name, value) { + if (name.indexOf('-') > -1) { + warnHyphenatedStyleName(name); + } else if (badVendoredStyleNamePattern.test(name)) { + warnBadVendoredStyleName(name); + } else if (badStyleValueWithSemicolonPattern.test(value)) { + warnStyleValueWithSemicolon(name, value); + } + + if (typeof value === 'number') { + if (isNaN(value)) { + warnStyleValueIsNaN(name, value); + } else if (!isFinite(value)) { + warnStyleValueIsInfinity(name, value); + } + } + }; + } + + var warnValidStyle$1 = warnValidStyle; + + /** + * Operations for dealing with CSS properties. + */ + + /** + * This creates a string that is expected to be equivalent to the style + * attribute generated by server-side rendering. It by-passes warnings and + * security checks so it's not safe to use this value for anything other than + * comparison. It is only used in DEV for SSR validation. + */ + + function createDangerousStringForStyles(styles) { + { + var serialized = ''; + var delimiter = ''; + + for (var styleName in styles) { + if (!styles.hasOwnProperty(styleName)) { + continue; + } + + var styleValue = styles[styleName]; + + if (styleValue != null) { + var isCustomProperty = styleName.indexOf('--') === 0; + serialized += + delimiter + (isCustomProperty ? styleName : hyphenateStyleName(styleName)) + ':'; + serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty); + delimiter = ';'; + } + } + + return serialized || null; + } + } + /** + * Sets the value for multiple styles on a node. If a value is specified as + * '' (empty string), the corresponding style property will be unset. + * + * @param {DOMElement} node + * @param {object} styles + */ + + function setValueForStyles(node, styles) { + var style = node.style; + + for (var styleName in styles) { + if (!styles.hasOwnProperty(styleName)) { + continue; + } + + var isCustomProperty = styleName.indexOf('--') === 0; + + { + if (!isCustomProperty) { + warnValidStyle$1(styleName, styles[styleName]); + } + } + + var styleValue = dangerousStyleValue(styleName, styles[styleName], isCustomProperty); + + if (styleName === 'float') { + styleName = 'cssFloat'; + } + + if (isCustomProperty) { + style.setProperty(styleName, styleValue); + } else { + style[styleName] = styleValue; + } + } + } + + function isValueEmpty(value) { + return value == null || typeof value === 'boolean' || value === ''; + } + /** + * Given {color: 'red', overflow: 'hidden'} returns { + * color: 'color', + * overflowX: 'overflow', + * overflowY: 'overflow', + * }. This can be read as "the overflowY property was set by the overflow + * shorthand". That is, the values are the property that each was derived from. + */ + + function expandShorthandMap(styles) { + var expanded = {}; + + for (var key in styles) { + var longhands = shorthandToLonghand[key] || [key]; + + for (var i = 0; i < longhands.length; i++) { + expanded[longhands[i]] = key; + } + } + + return expanded; + } + /** + * When mixing shorthand and longhand property names, we warn during updates if + * we expect an incorrect result to occur. In particular, we warn for: + * + * Updating a shorthand property (longhand gets overwritten): + * {font: 'foo', fontVariant: 'bar'} -> {font: 'baz', fontVariant: 'bar'} + * becomes .style.font = 'baz' + * Removing a shorthand property (longhand gets lost too): + * {font: 'foo', fontVariant: 'bar'} -> {fontVariant: 'bar'} + * becomes .style.font = '' + * Removing a longhand property (should revert to shorthand; doesn't): + * {font: 'foo', fontVariant: 'bar'} -> {font: 'foo'} + * becomes .style.fontVariant = '' + */ + + function validateShorthandPropertyCollisionInDev(styleUpdates, nextStyles) { + if (!warnAboutShorthandPropertyCollision) { + return; + } + + if (!nextStyles) { + return; + } + + var expandedUpdates = expandShorthandMap(styleUpdates); + var expandedStyles = expandShorthandMap(nextStyles); + var warnedAbout = {}; + + for (var key in expandedUpdates) { + var originalKey = expandedUpdates[key]; + var correctOriginalKey = expandedStyles[key]; + + if (correctOriginalKey && originalKey !== correctOriginalKey) { + var warningKey = originalKey + ',' + correctOriginalKey; + + if (warnedAbout[warningKey]) { + continue; + } + + warnedAbout[warningKey] = true; + warning$1( + false, + '%s a style property during rerender (%s) when a ' + + 'conflicting property is set (%s) can lead to styling bugs. To ' + + "avoid this, don't mix shorthand and non-shorthand properties " + + 'for the same value; instead, replace the shorthand with ' + + 'separate values.', + isValueEmpty(styleUpdates[originalKey]) ? 'Removing' : 'Updating', + originalKey, + correctOriginalKey, + ); + } + } + } + + // For HTML, certain tags should omit their close tag. We keep a whitelist for + // those special-case tags. + var omittedCloseTags = { + area: true, + base: true, + br: true, + col: true, + embed: true, + hr: true, + img: true, + input: true, + keygen: true, + link: true, + meta: true, + param: true, + source: true, + track: true, + wbr: true, // NOTE: menuitem's close tag should be omitted, but that causes problems. + }; + + // `omittedCloseTags` except that `menuitem` should still have its closing tag. + + var voidElementTags = _assign( + { + menuitem: true, + }, + omittedCloseTags, + ); + + // or add stack by default to invariants where possible. + + var HTML$1 = '__html'; + var ReactDebugCurrentFrame$3 = null; + + { + ReactDebugCurrentFrame$3 = ReactSharedInternals.ReactDebugCurrentFrame; + } + + function assertValidProps(tag, props) { + if (!props) { + return; + } // Note the use of `==` which checks for null or undefined. + + if (voidElementTags[tag]) { + if (!(props.children == null && props.dangerouslySetInnerHTML == null)) { + { + throw Error( + tag + + ' is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.' + + ReactDebugCurrentFrame$3.getStackAddendum(), + ); + } + } + } + + if (props.dangerouslySetInnerHTML != null) { + if (!(props.children == null)) { + { + throw Error('Can only set one of `children` or `props.dangerouslySetInnerHTML`.'); + } + } + + if ( + !( + typeof props.dangerouslySetInnerHTML === 'object' && HTML$1 in props.dangerouslySetInnerHTML + ) + ) { + { + throw Error( + '`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://fb.me/react-invariant-dangerously-set-inner-html for more information.', + ); + } + } + } + + { + !(props.suppressContentEditableWarning || !props.contentEditable || props.children == null) + ? warning$1( + false, + 'A component is `contentEditable` and contains `children` managed by ' + + 'React. It is now your responsibility to guarantee that none of ' + + 'those nodes are unexpectedly modified or duplicated. This is ' + + 'probably not intentional.', + ) + : void 0; + } + + if (!(props.style == null || typeof props.style === 'object')) { + { + throw Error( + "The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX." + + ReactDebugCurrentFrame$3.getStackAddendum(), + ); + } + } + } + + function isCustomComponent(tagName, props) { + if (tagName.indexOf('-') === -1) { + return typeof props.is === 'string'; + } + + switch (tagName) { + // These are reserved SVG and MathML elements. + // We don't mind this whitelist too much because we expect it to never grow. + // The alternative is to track the namespace in a few places which is convoluted. + // https://w3c.github.io/webcomponents/spec/custom/#custom-elements-core-concepts + case 'annotation-xml': + case 'color-profile': + case 'font-face': + case 'font-face-src': + case 'font-face-uri': + case 'font-face-format': + case 'font-face-name': + case 'missing-glyph': + return false; + + default: + return true; + } + } + + // When adding attributes to the HTML or SVG whitelist, be sure to + // also add them to this module to ensure casing and incorrect name + // warnings. + var possibleStandardNames = { + // HTML + accept: 'accept', + acceptcharset: 'acceptCharset', + 'accept-charset': 'acceptCharset', + accesskey: 'accessKey', + action: 'action', + allowfullscreen: 'allowFullScreen', + alt: 'alt', + as: 'as', + async: 'async', + autocapitalize: 'autoCapitalize', + autocomplete: 'autoComplete', + autocorrect: 'autoCorrect', + autofocus: 'autoFocus', + autoplay: 'autoPlay', + autosave: 'autoSave', + capture: 'capture', + cellpadding: 'cellPadding', + cellspacing: 'cellSpacing', + challenge: 'challenge', + charset: 'charSet', + checked: 'checked', + children: 'children', + cite: 'cite', + class: 'className', + classid: 'classID', + classname: 'className', + cols: 'cols', + colspan: 'colSpan', + content: 'content', + contenteditable: 'contentEditable', + contextmenu: 'contextMenu', + controls: 'controls', + controlslist: 'controlsList', + coords: 'coords', + crossorigin: 'crossOrigin', + dangerouslysetinnerhtml: 'dangerouslySetInnerHTML', + data: 'data', + datetime: 'dateTime', + default: 'default', + defaultchecked: 'defaultChecked', + defaultvalue: 'defaultValue', + defer: 'defer', + dir: 'dir', + disabled: 'disabled', + disablepictureinpicture: 'disablePictureInPicture', + download: 'download', + draggable: 'draggable', + enctype: 'encType', + for: 'htmlFor', + form: 'form', + formmethod: 'formMethod', + formaction: 'formAction', + formenctype: 'formEncType', + formnovalidate: 'formNoValidate', + formtarget: 'formTarget', + frameborder: 'frameBorder', + headers: 'headers', + height: 'height', + hidden: 'hidden', + high: 'high', + href: 'href', + hreflang: 'hrefLang', + htmlfor: 'htmlFor', + httpequiv: 'httpEquiv', + 'http-equiv': 'httpEquiv', + icon: 'icon', + id: 'id', + innerhtml: 'innerHTML', + inputmode: 'inputMode', + integrity: 'integrity', + is: 'is', + itemid: 'itemID', + itemprop: 'itemProp', + itemref: 'itemRef', + itemscope: 'itemScope', + itemtype: 'itemType', + keyparams: 'keyParams', + keytype: 'keyType', + kind: 'kind', + label: 'label', + lang: 'lang', + list: 'list', + loop: 'loop', + low: 'low', + manifest: 'manifest', + marginwidth: 'marginWidth', + marginheight: 'marginHeight', + max: 'max', + maxlength: 'maxLength', + media: 'media', + mediagroup: 'mediaGroup', + method: 'method', + min: 'min', + minlength: 'minLength', + multiple: 'multiple', + muted: 'muted', + name: 'name', + nomodule: 'noModule', + nonce: 'nonce', + novalidate: 'noValidate', + open: 'open', + optimum: 'optimum', + pattern: 'pattern', + placeholder: 'placeholder', + playsinline: 'playsInline', + poster: 'poster', + preload: 'preload', + profile: 'profile', + radiogroup: 'radioGroup', + readonly: 'readOnly', + referrerpolicy: 'referrerPolicy', + rel: 'rel', + required: 'required', + reversed: 'reversed', + role: 'role', + rows: 'rows', + rowspan: 'rowSpan', + sandbox: 'sandbox', + scope: 'scope', + scoped: 'scoped', + scrolling: 'scrolling', + seamless: 'seamless', + selected: 'selected', + shape: 'shape', + size: 'size', + sizes: 'sizes', + span: 'span', + spellcheck: 'spellCheck', + src: 'src', + srcdoc: 'srcDoc', + srclang: 'srcLang', + srcset: 'srcSet', + start: 'start', + step: 'step', + style: 'style', + summary: 'summary', + tabindex: 'tabIndex', + target: 'target', + title: 'title', + type: 'type', + usemap: 'useMap', + value: 'value', + width: 'width', + wmode: 'wmode', + wrap: 'wrap', + // SVG + about: 'about', + accentheight: 'accentHeight', + 'accent-height': 'accentHeight', + accumulate: 'accumulate', + additive: 'additive', + alignmentbaseline: 'alignmentBaseline', + 'alignment-baseline': 'alignmentBaseline', + allowreorder: 'allowReorder', + alphabetic: 'alphabetic', + amplitude: 'amplitude', + arabicform: 'arabicForm', + 'arabic-form': 'arabicForm', + ascent: 'ascent', + attributename: 'attributeName', + attributetype: 'attributeType', + autoreverse: 'autoReverse', + azimuth: 'azimuth', + basefrequency: 'baseFrequency', + baselineshift: 'baselineShift', + 'baseline-shift': 'baselineShift', + baseprofile: 'baseProfile', + bbox: 'bbox', + begin: 'begin', + bias: 'bias', + by: 'by', + calcmode: 'calcMode', + capheight: 'capHeight', + 'cap-height': 'capHeight', + clip: 'clip', + clippath: 'clipPath', + 'clip-path': 'clipPath', + clippathunits: 'clipPathUnits', + cliprule: 'clipRule', + 'clip-rule': 'clipRule', + color: 'color', + colorinterpolation: 'colorInterpolation', + 'color-interpolation': 'colorInterpolation', + colorinterpolationfilters: 'colorInterpolationFilters', + 'color-interpolation-filters': 'colorInterpolationFilters', + colorprofile: 'colorProfile', + 'color-profile': 'colorProfile', + colorrendering: 'colorRendering', + 'color-rendering': 'colorRendering', + contentscripttype: 'contentScriptType', + contentstyletype: 'contentStyleType', + cursor: 'cursor', + cx: 'cx', + cy: 'cy', + d: 'd', + datatype: 'datatype', + decelerate: 'decelerate', + descent: 'descent', + diffuseconstant: 'diffuseConstant', + direction: 'direction', + display: 'display', + divisor: 'divisor', + dominantbaseline: 'dominantBaseline', + 'dominant-baseline': 'dominantBaseline', + dur: 'dur', + dx: 'dx', + dy: 'dy', + edgemode: 'edgeMode', + elevation: 'elevation', + enablebackground: 'enableBackground', + 'enable-background': 'enableBackground', + end: 'end', + exponent: 'exponent', + externalresourcesrequired: 'externalResourcesRequired', + fill: 'fill', + fillopacity: 'fillOpacity', + 'fill-opacity': 'fillOpacity', + fillrule: 'fillRule', + 'fill-rule': 'fillRule', + filter: 'filter', + filterres: 'filterRes', + filterunits: 'filterUnits', + floodopacity: 'floodOpacity', + 'flood-opacity': 'floodOpacity', + floodcolor: 'floodColor', + 'flood-color': 'floodColor', + focusable: 'focusable', + fontfamily: 'fontFamily', + 'font-family': 'fontFamily', + fontsize: 'fontSize', + 'font-size': 'fontSize', + fontsizeadjust: 'fontSizeAdjust', + 'font-size-adjust': 'fontSizeAdjust', + fontstretch: 'fontStretch', + 'font-stretch': 'fontStretch', + fontstyle: 'fontStyle', + 'font-style': 'fontStyle', + fontvariant: 'fontVariant', + 'font-variant': 'fontVariant', + fontweight: 'fontWeight', + 'font-weight': 'fontWeight', + format: 'format', + from: 'from', + fx: 'fx', + fy: 'fy', + g1: 'g1', + g2: 'g2', + glyphname: 'glyphName', + 'glyph-name': 'glyphName', + glyphorientationhorizontal: 'glyphOrientationHorizontal', + 'glyph-orientation-horizontal': 'glyphOrientationHorizontal', + glyphorientationvertical: 'glyphOrientationVertical', + 'glyph-orientation-vertical': 'glyphOrientationVertical', + glyphref: 'glyphRef', + gradienttransform: 'gradientTransform', + gradientunits: 'gradientUnits', + hanging: 'hanging', + horizadvx: 'horizAdvX', + 'horiz-adv-x': 'horizAdvX', + horizoriginx: 'horizOriginX', + 'horiz-origin-x': 'horizOriginX', + ideographic: 'ideographic', + imagerendering: 'imageRendering', + 'image-rendering': 'imageRendering', + in2: 'in2', + in: 'in', + inlist: 'inlist', + intercept: 'intercept', + k1: 'k1', + k2: 'k2', + k3: 'k3', + k4: 'k4', + k: 'k', + kernelmatrix: 'kernelMatrix', + kernelunitlength: 'kernelUnitLength', + kerning: 'kerning', + keypoints: 'keyPoints', + keysplines: 'keySplines', + keytimes: 'keyTimes', + lengthadjust: 'lengthAdjust', + letterspacing: 'letterSpacing', + 'letter-spacing': 'letterSpacing', + lightingcolor: 'lightingColor', + 'lighting-color': 'lightingColor', + limitingconeangle: 'limitingConeAngle', + local: 'local', + markerend: 'markerEnd', + 'marker-end': 'markerEnd', + markerheight: 'markerHeight', + markermid: 'markerMid', + 'marker-mid': 'markerMid', + markerstart: 'markerStart', + 'marker-start': 'markerStart', + markerunits: 'markerUnits', + markerwidth: 'markerWidth', + mask: 'mask', + maskcontentunits: 'maskContentUnits', + maskunits: 'maskUnits', + mathematical: 'mathematical', + mode: 'mode', + numoctaves: 'numOctaves', + offset: 'offset', + opacity: 'opacity', + operator: 'operator', + order: 'order', + orient: 'orient', + orientation: 'orientation', + origin: 'origin', + overflow: 'overflow', + overlineposition: 'overlinePosition', + 'overline-position': 'overlinePosition', + overlinethickness: 'overlineThickness', + 'overline-thickness': 'overlineThickness', + paintorder: 'paintOrder', + 'paint-order': 'paintOrder', + panose1: 'panose1', + 'panose-1': 'panose1', + pathlength: 'pathLength', + patterncontentunits: 'patternContentUnits', + patterntransform: 'patternTransform', + patternunits: 'patternUnits', + pointerevents: 'pointerEvents', + 'pointer-events': 'pointerEvents', + points: 'points', + pointsatx: 'pointsAtX', + pointsaty: 'pointsAtY', + pointsatz: 'pointsAtZ', + prefix: 'prefix', + preservealpha: 'preserveAlpha', + preserveaspectratio: 'preserveAspectRatio', + primitiveunits: 'primitiveUnits', + property: 'property', + r: 'r', + radius: 'radius', + refx: 'refX', + refy: 'refY', + renderingintent: 'renderingIntent', + 'rendering-intent': 'renderingIntent', + repeatcount: 'repeatCount', + repeatdur: 'repeatDur', + requiredextensions: 'requiredExtensions', + requiredfeatures: 'requiredFeatures', + resource: 'resource', + restart: 'restart', + result: 'result', + results: 'results', + rotate: 'rotate', + rx: 'rx', + ry: 'ry', + scale: 'scale', + security: 'security', + seed: 'seed', + shaperendering: 'shapeRendering', + 'shape-rendering': 'shapeRendering', + slope: 'slope', + spacing: 'spacing', + specularconstant: 'specularConstant', + specularexponent: 'specularExponent', + speed: 'speed', + spreadmethod: 'spreadMethod', + startoffset: 'startOffset', + stddeviation: 'stdDeviation', + stemh: 'stemh', + stemv: 'stemv', + stitchtiles: 'stitchTiles', + stopcolor: 'stopColor', + 'stop-color': 'stopColor', + stopopacity: 'stopOpacity', + 'stop-opacity': 'stopOpacity', + strikethroughposition: 'strikethroughPosition', + 'strikethrough-position': 'strikethroughPosition', + strikethroughthickness: 'strikethroughThickness', + 'strikethrough-thickness': 'strikethroughThickness', + string: 'string', + stroke: 'stroke', + strokedasharray: 'strokeDasharray', + 'stroke-dasharray': 'strokeDasharray', + strokedashoffset: 'strokeDashoffset', + 'stroke-dashoffset': 'strokeDashoffset', + strokelinecap: 'strokeLinecap', + 'stroke-linecap': 'strokeLinecap', + strokelinejoin: 'strokeLinejoin', + 'stroke-linejoin': 'strokeLinejoin', + strokemiterlimit: 'strokeMiterlimit', + 'stroke-miterlimit': 'strokeMiterlimit', + strokewidth: 'strokeWidth', + 'stroke-width': 'strokeWidth', + strokeopacity: 'strokeOpacity', + 'stroke-opacity': 'strokeOpacity', + suppresscontenteditablewarning: 'suppressContentEditableWarning', + suppresshydrationwarning: 'suppressHydrationWarning', + surfacescale: 'surfaceScale', + systemlanguage: 'systemLanguage', + tablevalues: 'tableValues', + targetx: 'targetX', + targety: 'targetY', + textanchor: 'textAnchor', + 'text-anchor': 'textAnchor', + textdecoration: 'textDecoration', + 'text-decoration': 'textDecoration', + textlength: 'textLength', + textrendering: 'textRendering', + 'text-rendering': 'textRendering', + to: 'to', + transform: 'transform', + typeof: 'typeof', + u1: 'u1', + u2: 'u2', + underlineposition: 'underlinePosition', + 'underline-position': 'underlinePosition', + underlinethickness: 'underlineThickness', + 'underline-thickness': 'underlineThickness', + unicode: 'unicode', + unicodebidi: 'unicodeBidi', + 'unicode-bidi': 'unicodeBidi', + unicoderange: 'unicodeRange', + 'unicode-range': 'unicodeRange', + unitsperem: 'unitsPerEm', + 'units-per-em': 'unitsPerEm', + unselectable: 'unselectable', + valphabetic: 'vAlphabetic', + 'v-alphabetic': 'vAlphabetic', + values: 'values', + vectoreffect: 'vectorEffect', + 'vector-effect': 'vectorEffect', + version: 'version', + vertadvy: 'vertAdvY', + 'vert-adv-y': 'vertAdvY', + vertoriginx: 'vertOriginX', + 'vert-origin-x': 'vertOriginX', + vertoriginy: 'vertOriginY', + 'vert-origin-y': 'vertOriginY', + vhanging: 'vHanging', + 'v-hanging': 'vHanging', + videographic: 'vIdeographic', + 'v-ideographic': 'vIdeographic', + viewbox: 'viewBox', + viewtarget: 'viewTarget', + visibility: 'visibility', + vmathematical: 'vMathematical', + 'v-mathematical': 'vMathematical', + vocab: 'vocab', + widths: 'widths', + wordspacing: 'wordSpacing', + 'word-spacing': 'wordSpacing', + writingmode: 'writingMode', + 'writing-mode': 'writingMode', + x1: 'x1', + x2: 'x2', + x: 'x', + xchannelselector: 'xChannelSelector', + xheight: 'xHeight', + 'x-height': 'xHeight', + xlinkactuate: 'xlinkActuate', + 'xlink:actuate': 'xlinkActuate', + xlinkarcrole: 'xlinkArcrole', + 'xlink:arcrole': 'xlinkArcrole', + xlinkhref: 'xlinkHref', + 'xlink:href': 'xlinkHref', + xlinkrole: 'xlinkRole', + 'xlink:role': 'xlinkRole', + xlinkshow: 'xlinkShow', + 'xlink:show': 'xlinkShow', + xlinktitle: 'xlinkTitle', + 'xlink:title': 'xlinkTitle', + xlinktype: 'xlinkType', + 'xlink:type': 'xlinkType', + xmlbase: 'xmlBase', + 'xml:base': 'xmlBase', + xmllang: 'xmlLang', + 'xml:lang': 'xmlLang', + xmlns: 'xmlns', + 'xml:space': 'xmlSpace', + xmlnsxlink: 'xmlnsXlink', + 'xmlns:xlink': 'xmlnsXlink', + xmlspace: 'xmlSpace', + y1: 'y1', + y2: 'y2', + y: 'y', + ychannelselector: 'yChannelSelector', + z: 'z', + zoomandpan: 'zoomAndPan', + }; + + var ariaProperties = { + 'aria-current': 0, + // state + 'aria-details': 0, + 'aria-disabled': 0, + // state + 'aria-hidden': 0, + // state + 'aria-invalid': 0, + // state + 'aria-keyshortcuts': 0, + 'aria-label': 0, + 'aria-roledescription': 0, + // Widget Attributes + 'aria-autocomplete': 0, + 'aria-checked': 0, + 'aria-expanded': 0, + 'aria-haspopup': 0, + 'aria-level': 0, + 'aria-modal': 0, + 'aria-multiline': 0, + 'aria-multiselectable': 0, + 'aria-orientation': 0, + 'aria-placeholder': 0, + 'aria-pressed': 0, + 'aria-readonly': 0, + 'aria-required': 0, + 'aria-selected': 0, + 'aria-sort': 0, + 'aria-valuemax': 0, + 'aria-valuemin': 0, + 'aria-valuenow': 0, + 'aria-valuetext': 0, + // Live Region Attributes + 'aria-atomic': 0, + 'aria-busy': 0, + 'aria-live': 0, + 'aria-relevant': 0, + // Drag-and-Drop Attributes + 'aria-dropeffect': 0, + 'aria-grabbed': 0, + // Relationship Attributes + 'aria-activedescendant': 0, + 'aria-colcount': 0, + 'aria-colindex': 0, + 'aria-colspan': 0, + 'aria-controls': 0, + 'aria-describedby': 0, + 'aria-errormessage': 0, + 'aria-flowto': 0, + 'aria-labelledby': 0, + 'aria-owns': 0, + 'aria-posinset': 0, + 'aria-rowcount': 0, + 'aria-rowindex': 0, + 'aria-rowspan': 0, + 'aria-setsize': 0, + }; + + var warnedProperties = {}; + var rARIA = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$'); + var rARIACamel = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$'); + var hasOwnProperty$1 = Object.prototype.hasOwnProperty; + + function validateProperty(tagName, name) { + if (hasOwnProperty$1.call(warnedProperties, name) && warnedProperties[name]) { + return true; + } + + if (rARIACamel.test(name)) { + var ariaName = 'aria-' + name.slice(4).toLowerCase(); + var correctName = ariaProperties.hasOwnProperty(ariaName) ? ariaName : null; // If this is an aria-* attribute, but is not listed in the known DOM + // DOM properties, then it is an invalid aria-* attribute. + + if (correctName == null) { + warning$1( + false, + 'Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.', + name, + ); + warnedProperties[name] = true; + return true; + } // aria-* attributes should be lowercase; suggest the lowercase version. + + if (name !== correctName) { + warning$1(false, 'Invalid ARIA attribute `%s`. Did you mean `%s`?', name, correctName); + warnedProperties[name] = true; + return true; + } + } + + if (rARIA.test(name)) { + var lowerCasedName = name.toLowerCase(); + var standardName = ariaProperties.hasOwnProperty(lowerCasedName) ? lowerCasedName : null; // If this is an aria-* attribute, but is not listed in the known DOM + // DOM properties, then it is an invalid aria-* attribute. + + if (standardName == null) { + warnedProperties[name] = true; + return false; + } // aria-* attributes should be lowercase; suggest the lowercase version. + + if (name !== standardName) { + warning$1(false, 'Unknown ARIA attribute `%s`. Did you mean `%s`?', name, standardName); + warnedProperties[name] = true; + return true; + } + } + + return true; + } + + function warnInvalidARIAProps(type, props) { + var invalidProps = []; + + for (var key in props) { + var isValid = validateProperty(type, key); + + if (!isValid) { + invalidProps.push(key); + } + } + + var unknownPropString = invalidProps + .map(function (prop) { + return '`' + prop + '`'; + }) + .join(', '); + + if (invalidProps.length === 1) { + warning$1( + false, + 'Invalid aria prop %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop', + unknownPropString, + type, + ); + } else if (invalidProps.length > 1) { + warning$1( + false, + 'Invalid aria props %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop', + unknownPropString, + type, + ); + } + } + + function validateProperties(type, props) { + if (isCustomComponent(type, props)) { + return; + } + + warnInvalidARIAProps(type, props); + } + + var didWarnValueNull = false; + function validateProperties$1(type, props) { + if (type !== 'input' && type !== 'textarea' && type !== 'select') { + return; + } + + if (props != null && props.value === null && !didWarnValueNull) { + didWarnValueNull = true; + + if (type === 'select' && props.multiple) { + warning$1( + false, + '`value` prop on `%s` should not be null. ' + + 'Consider using an empty array when `multiple` is set to `true` ' + + 'to clear the component or `undefined` for uncontrolled components.', + type, + ); + } else { + warning$1( + false, + '`value` prop on `%s` should not be null. ' + + 'Consider using an empty string to clear the component or `undefined` ' + + 'for uncontrolled components.', + type, + ); + } + } + } + + var validateProperty$1 = function () {}; + + { + var warnedProperties$1 = {}; + var _hasOwnProperty = Object.prototype.hasOwnProperty; + var EVENT_NAME_REGEX = /^on./; + var INVALID_EVENT_NAME_REGEX = /^on[^A-Z]/; + var rARIA$1 = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$'); + var rARIACamel$1 = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$'); + + validateProperty$1 = function (tagName, name, value, canUseEventSystem) { + if (_hasOwnProperty.call(warnedProperties$1, name) && warnedProperties$1[name]) { + return true; + } + + var lowerCasedName = name.toLowerCase(); + + if (lowerCasedName === 'onfocusin' || lowerCasedName === 'onfocusout') { + warning$1( + false, + 'React uses onFocus and onBlur instead of onFocusIn and onFocusOut. ' + + 'All React events are normalized to bubble, so onFocusIn and onFocusOut ' + + 'are not needed/supported by React.', + ); + warnedProperties$1[name] = true; + return true; + } // We can't rely on the event system being injected on the server. + + if (canUseEventSystem) { + if (registrationNameModules.hasOwnProperty(name)) { + return true; + } + + var registrationName = possibleRegistrationNames.hasOwnProperty(lowerCasedName) + ? possibleRegistrationNames[lowerCasedName] + : null; + + if (registrationName != null) { + warning$1( + false, + 'Invalid event handler property `%s`. Did you mean `%s`?', + name, + registrationName, + ); + warnedProperties$1[name] = true; + return true; + } + + if (EVENT_NAME_REGEX.test(name)) { + warning$1(false, 'Unknown event handler property `%s`. It will be ignored.', name); + warnedProperties$1[name] = true; + return true; + } + } else if (EVENT_NAME_REGEX.test(name)) { + // If no event plugins have been injected, we are in a server environment. + // So we can't tell if the event name is correct for sure, but we can filter + // out known bad ones like `onclick`. We can't suggest a specific replacement though. + if (INVALID_EVENT_NAME_REGEX.test(name)) { + warning$1( + false, + 'Invalid event handler property `%s`. ' + + 'React events use the camelCase naming convention, for example `onClick`.', + name, + ); + } + + warnedProperties$1[name] = true; + return true; + } // Let the ARIA attribute hook validate ARIA attributes + + if (rARIA$1.test(name) || rARIACamel$1.test(name)) { + return true; + } + + if (lowerCasedName === 'innerhtml') { + warning$1( + false, + 'Directly setting property `innerHTML` is not permitted. ' + + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.', + ); + warnedProperties$1[name] = true; + return true; + } + + if (lowerCasedName === 'aria') { + warning$1( + false, + 'The `aria` attribute is reserved for future use in React. ' + + 'Pass individual `aria-` attributes instead.', + ); + warnedProperties$1[name] = true; + return true; + } + + if ( + lowerCasedName === 'is' && + value !== null && + value !== undefined && + typeof value !== 'string' + ) { + warning$1( + false, + 'Received a `%s` for a string attribute `is`. If this is expected, cast ' + + 'the value to a string.', + typeof value, + ); + warnedProperties$1[name] = true; + return true; + } + + if (typeof value === 'number' && isNaN(value)) { + warning$1( + false, + 'Received NaN for the `%s` attribute. If this is expected, cast ' + + 'the value to a string.', + name, + ); + warnedProperties$1[name] = true; + return true; + } + + var propertyInfo = getPropertyInfo(name); + var isReserved = propertyInfo !== null && propertyInfo.type === RESERVED; // Known attributes should match the casing specified in the property config. + + if (possibleStandardNames.hasOwnProperty(lowerCasedName)) { + var standardName = possibleStandardNames[lowerCasedName]; + + if (standardName !== name) { + warning$1(false, 'Invalid DOM property `%s`. Did you mean `%s`?', name, standardName); + warnedProperties$1[name] = true; + return true; + } + } else if (!isReserved && name !== lowerCasedName) { + // Unknown attributes should have lowercase casing since that's how they + // will be cased anyway with server rendering. + warning$1( + false, + 'React does not recognize the `%s` prop on a DOM element. If you ' + + 'intentionally want it to appear in the DOM as a custom ' + + 'attribute, spell it as lowercase `%s` instead. ' + + 'If you accidentally passed it from a parent component, remove ' + + 'it from the DOM element.', + name, + lowerCasedName, + ); + warnedProperties$1[name] = true; + return true; + } + + if ( + typeof value === 'boolean' && + shouldRemoveAttributeWithWarning(name, value, propertyInfo, false) + ) { + if (value) { + warning$1( + false, + 'Received `%s` for a non-boolean attribute `%s`.\n\n' + + 'If you want to write it to the DOM, pass a string instead: ' + + '%s="%s" or %s={value.toString()}.', + value, + name, + name, + value, + name, + ); + } else { + warning$1( + false, + 'Received `%s` for a non-boolean attribute `%s`.\n\n' + + 'If you want to write it to the DOM, pass a string instead: ' + + '%s="%s" or %s={value.toString()}.\n\n' + + 'If you used to conditionally omit it with %s={condition && value}, ' + + 'pass %s={condition ? value : undefined} instead.', + value, + name, + name, + value, + name, + name, + name, + ); + } + + warnedProperties$1[name] = true; + return true; + } // Now that we've validated casing, do not validate + // data types for reserved props + + if (isReserved) { + return true; + } // Warn when a known attribute is a bad type + + if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, false)) { + warnedProperties$1[name] = true; + return false; + } // Warn when passing the strings 'false' or 'true' into a boolean prop + + if ( + (value === 'false' || value === 'true') && + propertyInfo !== null && + propertyInfo.type === BOOLEAN + ) { + warning$1( + false, + 'Received the string `%s` for the boolean attribute `%s`. ' + + '%s ' + + 'Did you mean %s={%s}?', + value, + name, + value === 'false' + ? 'The browser will interpret it as a truthy value.' + : 'Although this works, it will not work as expected if you pass the string "false".', + name, + value, + ); + warnedProperties$1[name] = true; + return true; + } + + return true; + }; + } + + var warnUnknownProperties = function (type, props, canUseEventSystem) { + var unknownProps = []; + + for (var key in props) { + var isValid = validateProperty$1(type, key, props[key], canUseEventSystem); + + if (!isValid) { + unknownProps.push(key); + } + } + + var unknownPropString = unknownProps + .map(function (prop) { + return '`' + prop + '`'; + }) + .join(', '); + + if (unknownProps.length === 1) { + warning$1( + false, + 'Invalid value for prop %s on <%s> tag. Either remove it from the element, ' + + 'or pass a string or number value to keep it in the DOM. ' + + 'For details, see https://fb.me/react-attribute-behavior', + unknownPropString, + type, + ); + } else if (unknownProps.length > 1) { + warning$1( + false, + 'Invalid values for props %s on <%s> tag. Either remove them from the element, ' + + 'or pass a string or number value to keep them in the DOM. ' + + 'For details, see https://fb.me/react-attribute-behavior', + unknownPropString, + type, + ); + } + }; + + function validateProperties$2(type, props, canUseEventSystem) { + if (isCustomComponent(type, props)) { + return; + } + + warnUnknownProperties(type, props, canUseEventSystem); + } + + // TODO: direct imports like some-package/src/* are bad. Fix me. + var didWarnInvalidHydration = false; + var didWarnShadyDOM = false; + var didWarnScriptTags = false; + var DANGEROUSLY_SET_INNER_HTML = 'dangerouslySetInnerHTML'; + var SUPPRESS_CONTENT_EDITABLE_WARNING = 'suppressContentEditableWarning'; + var SUPPRESS_HYDRATION_WARNING$1 = 'suppressHydrationWarning'; + var AUTOFOCUS = 'autoFocus'; + var CHILDREN = 'children'; + var STYLE$1 = 'style'; + var HTML = '__html'; + var LISTENERS = 'listeners'; + var HTML_NAMESPACE = Namespaces.html; + var warnedUnknownTags; + var suppressHydrationWarning; + var validatePropertiesInDevelopment; + var warnForTextDifference; + var warnForPropDifference; + var warnForExtraAttributes; + var warnForInvalidEventListener; + var canDiffStyleForHydrationWarning; + var normalizeMarkupForTextOrAttribute; + var normalizeHTML; + + { + warnedUnknownTags = { + // Chrome is the only major browser not shipping <time>. But as of July + // 2017 it intends to ship it due to widespread usage. We intentionally + // *don't* warn for <time> even if it's unrecognized by Chrome because + // it soon will be, and many apps have been using it anyway. + time: true, + // There are working polyfills for <dialog>. Let people use it. + dialog: true, + // Electron ships a custom <webview> tag to display external web content in + // an isolated frame and process. + // This tag is not present in non Electron environments such as JSDom which + // is often used for testing purposes. + // @see https://electronjs.org/docs/api/webview-tag + webview: true, + }; + + validatePropertiesInDevelopment = function (type, props) { + validateProperties(type, props); + validateProperties$1(type, props); + validateProperties$2( + type, + props, + /* canUseEventSystem */ + true, + ); + }; // IE 11 parses & normalizes the style attribute as opposed to other + // browsers. It adds spaces and sorts the properties in some + // non-alphabetical order. Handling that would require sorting CSS + // properties in the client & server versions or applying + // `expectedStyle` to a temporary DOM node to read its `style` attribute + // normalized. Since it only affects IE, we're skipping style warnings + // in that browser completely in favor of doing all that work. + // See https://github.com/facebook/react/issues/11807 + + canDiffStyleForHydrationWarning = canUseDOM && !document.documentMode; // HTML parsing normalizes CR and CRLF to LF. + // It also can turn \u0000 into \uFFFD inside attributes. + // https://www.w3.org/TR/html5/single-page.html#preprocessing-the-input-stream + // If we have a mismatch, it might be caused by that. + // We will still patch up in this case but not fire the warning. + + var NORMALIZE_NEWLINES_REGEX = /\r\n?/g; + var NORMALIZE_NULL_AND_REPLACEMENT_REGEX = /\u0000|\uFFFD/g; + + normalizeMarkupForTextOrAttribute = function (markup) { + var markupString = typeof markup === 'string' ? markup : '' + markup; + return markupString + .replace(NORMALIZE_NEWLINES_REGEX, '\n') + .replace(NORMALIZE_NULL_AND_REPLACEMENT_REGEX, ''); + }; + + warnForTextDifference = function (serverText, clientText) { + if (didWarnInvalidHydration) { + return; + } + + var normalizedClientText = normalizeMarkupForTextOrAttribute(clientText); + var normalizedServerText = normalizeMarkupForTextOrAttribute(serverText); + + if (normalizedServerText === normalizedClientText) { + return; + } + + didWarnInvalidHydration = true; + warningWithoutStack$1( + false, + 'Text content did not match. Server: "%s" Client: "%s"', + normalizedServerText, + normalizedClientText, + ); + }; + + warnForPropDifference = function (propName, serverValue, clientValue) { + if (didWarnInvalidHydration) { + return; + } + + var normalizedClientValue = normalizeMarkupForTextOrAttribute(clientValue); + var normalizedServerValue = normalizeMarkupForTextOrAttribute(serverValue); + + if (normalizedServerValue === normalizedClientValue) { + return; + } + + didWarnInvalidHydration = true; + warningWithoutStack$1( + false, + 'Prop `%s` did not match. Server: %s Client: %s', + propName, + JSON.stringify(normalizedServerValue), + JSON.stringify(normalizedClientValue), + ); + }; + + warnForExtraAttributes = function (attributeNames) { + if (didWarnInvalidHydration) { + return; + } + + didWarnInvalidHydration = true; + var names = []; + attributeNames.forEach(function (name) { + names.push(name); + }); + warningWithoutStack$1(false, 'Extra attributes from the server: %s', names); + }; + + warnForInvalidEventListener = function (registrationName, listener) { + if (listener === false) { + warning$1( + false, + 'Expected `%s` listener to be a function, instead got `false`.\n\n' + + 'If you used to conditionally omit it with %s={condition && value}, ' + + 'pass %s={condition ? value : undefined} instead.', + registrationName, + registrationName, + registrationName, + ); + } else { + warning$1( + false, + 'Expected `%s` listener to be a function, instead got a value of `%s` type.', + registrationName, + typeof listener, + ); + } + }; // Parse the HTML and read it back to normalize the HTML string so that it + // can be used for comparison. + + normalizeHTML = function (parent, html) { + // We could have created a separate document here to avoid + // re-initializing custom elements if they exist. But this breaks + // how <noscript> is being handled. So we use the same document. + // See the discussion in https://github.com/facebook/react/pull/11157. + var testElement = + parent.namespaceURI === HTML_NAMESPACE + ? parent.ownerDocument.createElement(parent.tagName) + : parent.ownerDocument.createElementNS(parent.namespaceURI, parent.tagName); + testElement.innerHTML = html; + return testElement.innerHTML; + }; + } + + function ensureListeningTo(rootContainerElement, registrationName) { + var isDocumentOrFragment = + rootContainerElement.nodeType === DOCUMENT_NODE || + rootContainerElement.nodeType === DOCUMENT_FRAGMENT_NODE; + var doc = isDocumentOrFragment ? rootContainerElement : rootContainerElement.ownerDocument; + listenTo(registrationName, doc); + } + + function getOwnerDocumentFromRootContainer(rootContainerElement) { + return rootContainerElement.nodeType === DOCUMENT_NODE + ? rootContainerElement + : rootContainerElement.ownerDocument; + } + + function noop() {} + + function trapClickOnNonInteractiveElement(node) { + // Mobile Safari does not fire properly bubble click events on + // non-interactive elements, which means delegated click listeners do not + // fire. The workaround for this bug involves attaching an empty click + // listener on the target node. + // http://www.quirksmode.org/blog/archives/2010/09/click_event_del.html + // Just set it using the onclick property so that we don't have to manage any + // bookkeeping for it. Not sure if we need to clear it when the listener is + // removed. + // TODO: Only do this for the relevant Safaris maybe? + node.onclick = noop; + } + + function setInitialDOMProperties( + tag, + domElement, + rootContainerElement, + nextProps, + isCustomComponentTag, + ) { + for (var propKey in nextProps) { + if (!nextProps.hasOwnProperty(propKey)) { + continue; + } + + var nextProp = nextProps[propKey]; + + if (propKey === STYLE$1) { + { + if (nextProp) { + // Freeze the next style object so that we can assume it won't be + // mutated. We have already warned for this in the past. + Object.freeze(nextProp); + } + } // Relies on `updateStylesByID` not mutating `styleUpdates`. + + setValueForStyles(domElement, nextProp); + } else if (propKey === DANGEROUSLY_SET_INNER_HTML) { + var nextHtml = nextProp ? nextProp[HTML] : undefined; + + if (nextHtml != null) { + setInnerHTML(domElement, nextHtml); + } + } else if (propKey === CHILDREN) { + if (typeof nextProp === 'string') { + // Avoid setting initial textContent when the text is empty. In IE11 setting + // textContent on a <textarea> will cause the placeholder to not + // show within the <textarea> until it has been focused and blurred again. + // https://github.com/facebook/react/issues/6731#issuecomment-254874553 + var canSetTextContent = tag !== 'textarea' || nextProp !== ''; + + if (canSetTextContent) { + setTextContent(domElement, nextProp); + } + } else if (typeof nextProp === 'number') { + setTextContent(domElement, '' + nextProp); + } + } else if ( + (enableFlareAPI && propKey === LISTENERS) || + propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || + propKey === SUPPRESS_HYDRATION_WARNING$1 + ) { + // Noop + } else if (propKey === AUTOFOCUS) { + // We polyfill it separately on the client during commit. + // We could have excluded it in the property list instead of + // adding a special case here, but then it wouldn't be emitted + // on server rendering (but we *do* want to emit it in SSR). + } else if (registrationNameModules.hasOwnProperty(propKey)) { + if (nextProp != null) { + if (true && typeof nextProp !== 'function') { + warnForInvalidEventListener(propKey, nextProp); + } + + ensureListeningTo(rootContainerElement, propKey); + } + } else if (nextProp != null) { + setValueForProperty(domElement, propKey, nextProp, isCustomComponentTag); + } + } + } + + function updateDOMProperties( + domElement, + updatePayload, + wasCustomComponentTag, + isCustomComponentTag, + ) { + // TODO: Handle wasCustomComponentTag + for (var i = 0; i < updatePayload.length; i += 2) { + var propKey = updatePayload[i]; + var propValue = updatePayload[i + 1]; + + if (propKey === STYLE$1) { + setValueForStyles(domElement, propValue); + } else if (propKey === DANGEROUSLY_SET_INNER_HTML) { + setInnerHTML(domElement, propValue); + } else if (propKey === CHILDREN) { + setTextContent(domElement, propValue); + } else { + setValueForProperty(domElement, propKey, propValue, isCustomComponentTag); + } + } + } + + function createElement(type, props, rootContainerElement, parentNamespace) { + var isCustomComponentTag; // We create tags in the namespace of their parent container, except HTML + // tags get no namespace. + + var ownerDocument = getOwnerDocumentFromRootContainer(rootContainerElement); + var domElement; + var namespaceURI = parentNamespace; + + if (namespaceURI === HTML_NAMESPACE) { + namespaceURI = getIntrinsicNamespace(type); + } + + if (namespaceURI === HTML_NAMESPACE) { + { + isCustomComponentTag = isCustomComponent(type, props); // Should this check be gated by parent namespace? Not sure we want to + // allow <SVG> or <mATH>. + + !(isCustomComponentTag || type === type.toLowerCase()) + ? warning$1( + false, + '<%s /> is using incorrect casing. ' + + 'Use PascalCase for React components, ' + + 'or lowercase for HTML elements.', + type, + ) + : void 0; + } + + if (type === 'script') { + // Create the script via .innerHTML so its "parser-inserted" flag is + // set to true and it does not execute + var div = ownerDocument.createElement('div'); + + { + if (enableTrustedTypesIntegration && !didWarnScriptTags) { + warning$1( + false, + 'Encountered a script tag while rendering React component. ' + + 'Scripts inside React components are never executed when rendering ' + + 'on the client. Consider using template tag instead ' + + '(https://developer.mozilla.org/en-US/docs/Web/HTML/Element/template).', + ); + didWarnScriptTags = true; + } + } + + div.innerHTML = '<script><' + '/script>'; // eslint-disable-line + // This is guaranteed to yield a script element. + + var firstChild = div.firstChild; + domElement = div.removeChild(firstChild); + } else if (typeof props.is === 'string') { + // $FlowIssue `createElement` should be updated for Web Components + domElement = ownerDocument.createElement(type, { + is: props.is, + }); + } else { + // Separate else branch instead of using `props.is || undefined` above because of a Firefox bug. + // See discussion in https://github.com/facebook/react/pull/6896 + // and discussion in https://bugzilla.mozilla.org/show_bug.cgi?id=1276240 + domElement = ownerDocument.createElement(type); // Normally attributes are assigned in `setInitialDOMProperties`, however the `multiple` and `size` + // attributes on `select`s needs to be added before `option`s are inserted. + // This prevents: + // - a bug where the `select` does not scroll to the correct option because singular + // `select` elements automatically pick the first item #13222 + // - a bug where the `select` set the first item as selected despite the `size` attribute #14239 + // See https://github.com/facebook/react/issues/13222 + // and https://github.com/facebook/react/issues/14239 + + if (type === 'select') { + var node = domElement; + + if (props.multiple) { + node.multiple = true; + } else if (props.size) { + // Setting a size greater than 1 causes a select to behave like `multiple=true`, where + // it is possible that no option is selected. + // + // This is only necessary when a select in "single selection mode". + node.size = props.size; + } + } + } + } else { + domElement = ownerDocument.createElementNS(namespaceURI, type); + } + + { + if (namespaceURI === HTML_NAMESPACE) { + if ( + !isCustomComponentTag && + Object.prototype.toString.call(domElement) === '[object HTMLUnknownElement]' && + !Object.prototype.hasOwnProperty.call(warnedUnknownTags, type) + ) { + warnedUnknownTags[type] = true; + warning$1( + false, + 'The tag <%s> is unrecognized in this browser. ' + + 'If you meant to render a React component, start its name with ' + + 'an uppercase letter.', + type, + ); + } + } + } + + return domElement; + } + function createTextNode(text, rootContainerElement) { + return getOwnerDocumentFromRootContainer(rootContainerElement).createTextNode(text); + } + function setInitialProperties(domElement, tag, rawProps, rootContainerElement) { + var isCustomComponentTag = isCustomComponent(tag, rawProps); + + { + validatePropertiesInDevelopment(tag, rawProps); + + if (isCustomComponentTag && !didWarnShadyDOM && domElement.shadyRoot) { + warning$1( + false, + '%s is using shady DOM. Using shady DOM with React can ' + 'cause things to break subtly.', + getCurrentFiberOwnerNameInDevOrNull() || 'A component', + ); + didWarnShadyDOM = true; + } + } // TODO: Make sure that we check isMounted before firing any of these events. + + var props; + + switch (tag) { + case 'iframe': + case 'object': + case 'embed': + trapBubbledEvent(TOP_LOAD, domElement); + props = rawProps; + break; + + case 'video': + case 'audio': + // Create listener for each media event + for (var i = 0; i < mediaEventTypes.length; i++) { + trapBubbledEvent(mediaEventTypes[i], domElement); + } + + props = rawProps; + break; + + case 'source': + trapBubbledEvent(TOP_ERROR, domElement); + props = rawProps; + break; + + case 'img': + case 'image': + case 'link': + trapBubbledEvent(TOP_ERROR, domElement); + trapBubbledEvent(TOP_LOAD, domElement); + props = rawProps; + break; + + case 'form': + trapBubbledEvent(TOP_RESET, domElement); + trapBubbledEvent(TOP_SUBMIT, domElement); + props = rawProps; + break; + + case 'details': + trapBubbledEvent(TOP_TOGGLE, domElement); + props = rawProps; + break; + + case 'input': + initWrapperState(domElement, rawProps); + props = getHostProps(domElement, rawProps); + trapBubbledEvent(TOP_INVALID, domElement); // For controlled components we always need to ensure we're listening + // to onChange. Even if there is no listener. + + ensureListeningTo(rootContainerElement, 'onChange'); + break; + + case 'option': + validateProps(domElement, rawProps); + props = getHostProps$1(domElement, rawProps); + break; + + case 'select': + initWrapperState$1(domElement, rawProps); + props = getHostProps$2(domElement, rawProps); + trapBubbledEvent(TOP_INVALID, domElement); // For controlled components we always need to ensure we're listening + // to onChange. Even if there is no listener. + + ensureListeningTo(rootContainerElement, 'onChange'); + break; + + case 'textarea': + initWrapperState$2(domElement, rawProps); + props = getHostProps$3(domElement, rawProps); + trapBubbledEvent(TOP_INVALID, domElement); // For controlled components we always need to ensure we're listening + // to onChange. Even if there is no listener. + + ensureListeningTo(rootContainerElement, 'onChange'); + break; + + default: + props = rawProps; + } + + assertValidProps(tag, props); + setInitialDOMProperties(tag, domElement, rootContainerElement, props, isCustomComponentTag); + + switch (tag) { + case 'input': + // TODO: Make sure we check if this is still unmounted or do any clean + // up necessary since we never stop tracking anymore. + track(domElement); + postMountWrapper(domElement, rawProps, false); + break; + + case 'textarea': + // TODO: Make sure we check if this is still unmounted or do any clean + // up necessary since we never stop tracking anymore. + track(domElement); + postMountWrapper$3(domElement, rawProps); + break; + + case 'option': + postMountWrapper$1(domElement, rawProps); + break; + + case 'select': + postMountWrapper$2(domElement, rawProps); + break; + + default: + if (typeof props.onClick === 'function') { + // TODO: This cast may not be sound for SVG, MathML or custom elements. + trapClickOnNonInteractiveElement(domElement); + } + + break; + } + } // Calculate the diff between the two objects. + + function diffProperties(domElement, tag, lastRawProps, nextRawProps, rootContainerElement) { + { + validatePropertiesInDevelopment(tag, nextRawProps); + } + + var updatePayload = null; + var lastProps; + var nextProps; + + switch (tag) { + case 'input': + lastProps = getHostProps(domElement, lastRawProps); + nextProps = getHostProps(domElement, nextRawProps); + updatePayload = []; + break; + + case 'option': + lastProps = getHostProps$1(domElement, lastRawProps); + nextProps = getHostProps$1(domElement, nextRawProps); + updatePayload = []; + break; + + case 'select': + lastProps = getHostProps$2(domElement, lastRawProps); + nextProps = getHostProps$2(domElement, nextRawProps); + updatePayload = []; + break; + + case 'textarea': + lastProps = getHostProps$3(domElement, lastRawProps); + nextProps = getHostProps$3(domElement, nextRawProps); + updatePayload = []; + break; + + default: + lastProps = lastRawProps; + nextProps = nextRawProps; + + if (typeof lastProps.onClick !== 'function' && typeof nextProps.onClick === 'function') { + // TODO: This cast may not be sound for SVG, MathML or custom elements. + trapClickOnNonInteractiveElement(domElement); + } + + break; + } + + assertValidProps(tag, nextProps); + var propKey; + var styleName; + var styleUpdates = null; + + for (propKey in lastProps) { + if ( + nextProps.hasOwnProperty(propKey) || + !lastProps.hasOwnProperty(propKey) || + lastProps[propKey] == null + ) { + continue; + } + + if (propKey === STYLE$1) { + var lastStyle = lastProps[propKey]; + + for (styleName in lastStyle) { + if (lastStyle.hasOwnProperty(styleName)) { + if (!styleUpdates) { + styleUpdates = {}; + } + + styleUpdates[styleName] = ''; + } + } + } else if (propKey === DANGEROUSLY_SET_INNER_HTML || propKey === CHILDREN) { + // Noop. This is handled by the clear text mechanism. + } else if ( + (enableFlareAPI && propKey === LISTENERS) || + propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || + propKey === SUPPRESS_HYDRATION_WARNING$1 + ) { + // Noop + } else if (propKey === AUTOFOCUS) { + // Noop. It doesn't work on updates anyway. + } else if (registrationNameModules.hasOwnProperty(propKey)) { + // This is a special case. If any listener updates we need to ensure + // that the "current" fiber pointer gets updated so we need a commit + // to update this element. + if (!updatePayload) { + updatePayload = []; + } + } else { + // For all other deleted properties we add it to the queue. We use + // the whitelist in the commit phase instead. + (updatePayload = updatePayload || []).push(propKey, null); + } + } + + for (propKey in nextProps) { + var nextProp = nextProps[propKey]; + var lastProp = lastProps != null ? lastProps[propKey] : undefined; + + if ( + !nextProps.hasOwnProperty(propKey) || + nextProp === lastProp || + (nextProp == null && lastProp == null) + ) { + continue; + } + + if (propKey === STYLE$1) { + { + if (nextProp) { + // Freeze the next style object so that we can assume it won't be + // mutated. We have already warned for this in the past. + Object.freeze(nextProp); + } + } + + if (lastProp) { + // Unset styles on `lastProp` but not on `nextProp`. + for (styleName in lastProp) { + if ( + lastProp.hasOwnProperty(styleName) && + (!nextProp || !nextProp.hasOwnProperty(styleName)) + ) { + if (!styleUpdates) { + styleUpdates = {}; + } + + styleUpdates[styleName] = ''; + } + } // Update styles that changed since `lastProp`. + + for (styleName in nextProp) { + if (nextProp.hasOwnProperty(styleName) && lastProp[styleName] !== nextProp[styleName]) { + if (!styleUpdates) { + styleUpdates = {}; + } + + styleUpdates[styleName] = nextProp[styleName]; + } + } + } else { + // Relies on `updateStylesByID` not mutating `styleUpdates`. + if (!styleUpdates) { + if (!updatePayload) { + updatePayload = []; + } + + updatePayload.push(propKey, styleUpdates); + } + + styleUpdates = nextProp; + } + } else if (propKey === DANGEROUSLY_SET_INNER_HTML) { + var nextHtml = nextProp ? nextProp[HTML] : undefined; + var lastHtml = lastProp ? lastProp[HTML] : undefined; + + if (nextHtml != null) { + if (lastHtml !== nextHtml) { + (updatePayload = updatePayload || []).push(propKey, toStringOrTrustedType(nextHtml)); + } + } else { + // TODO: It might be too late to clear this if we have children + // inserted already. + } + } else if (propKey === CHILDREN) { + if (lastProp !== nextProp && (typeof nextProp === 'string' || typeof nextProp === 'number')) { + (updatePayload = updatePayload || []).push(propKey, '' + nextProp); + } + } else if ( + (enableFlareAPI && propKey === LISTENERS) || + propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || + propKey === SUPPRESS_HYDRATION_WARNING$1 + ) { + // Noop + } else if (registrationNameModules.hasOwnProperty(propKey)) { + if (nextProp != null) { + // We eagerly listen to this even though we haven't committed yet. + if (true && typeof nextProp !== 'function') { + warnForInvalidEventListener(propKey, nextProp); + } + + ensureListeningTo(rootContainerElement, propKey); + } + + if (!updatePayload && lastProp !== nextProp) { + // This is a special case. If any listener updates we need to ensure + // that the "current" props pointer gets updated so we need a commit + // to update this element. + updatePayload = []; + } + } else { + // For any other property we always add it to the queue and then we + // filter it out using the whitelist during the commit. + (updatePayload = updatePayload || []).push(propKey, nextProp); + } + } + + if (styleUpdates) { + { + validateShorthandPropertyCollisionInDev(styleUpdates, nextProps[STYLE$1]); + } + + (updatePayload = updatePayload || []).push(STYLE$1, styleUpdates); + } + + return updatePayload; + } // Apply the diff. + + function updateProperties(domElement, updatePayload, tag, lastRawProps, nextRawProps) { + // Update checked *before* name. + // In the middle of an update, it is possible to have multiple checked. + // When a checked radio tries to change name, browser makes another radio's checked false. + if (tag === 'input' && nextRawProps.type === 'radio' && nextRawProps.name != null) { + updateChecked(domElement, nextRawProps); + } + + var wasCustomComponentTag = isCustomComponent(tag, lastRawProps); + var isCustomComponentTag = isCustomComponent(tag, nextRawProps); // Apply the diff. + + updateDOMProperties(domElement, updatePayload, wasCustomComponentTag, isCustomComponentTag); // TODO: Ensure that an update gets scheduled if any of the special props + // changed. + + switch (tag) { + case 'input': + // Update the wrapper around inputs *after* updating props. This has to + // happen after `updateDOMProperties`. Otherwise HTML5 input validations + // raise warnings and prevent the new value from being assigned. + updateWrapper(domElement, nextRawProps); + break; + + case 'textarea': + updateWrapper$1(domElement, nextRawProps); + break; + + case 'select': + // <select> value update needs to occur after <option> children + // reconciliation + postUpdateWrapper(domElement, nextRawProps); + break; + } + } + + function getPossibleStandardName(propName) { + { + var lowerCasedName = propName.toLowerCase(); + + if (!possibleStandardNames.hasOwnProperty(lowerCasedName)) { + return null; + } + + return possibleStandardNames[lowerCasedName] || null; + } + + return null; + } + + function diffHydratedProperties(domElement, tag, rawProps, parentNamespace, rootContainerElement) { + var isCustomComponentTag; + var extraAttributeNames; + + { + suppressHydrationWarning = rawProps[SUPPRESS_HYDRATION_WARNING$1] === true; + isCustomComponentTag = isCustomComponent(tag, rawProps); + validatePropertiesInDevelopment(tag, rawProps); + + if (isCustomComponentTag && !didWarnShadyDOM && domElement.shadyRoot) { + warning$1( + false, + '%s is using shady DOM. Using shady DOM with React can ' + 'cause things to break subtly.', + getCurrentFiberOwnerNameInDevOrNull() || 'A component', + ); + didWarnShadyDOM = true; + } + } // TODO: Make sure that we check isMounted before firing any of these events. + + switch (tag) { + case 'iframe': + case 'object': + case 'embed': + trapBubbledEvent(TOP_LOAD, domElement); + break; + + case 'video': + case 'audio': + // Create listener for each media event + for (var i = 0; i < mediaEventTypes.length; i++) { + trapBubbledEvent(mediaEventTypes[i], domElement); + } + + break; + + case 'source': + trapBubbledEvent(TOP_ERROR, domElement); + break; + + case 'img': + case 'image': + case 'link': + trapBubbledEvent(TOP_ERROR, domElement); + trapBubbledEvent(TOP_LOAD, domElement); + break; + + case 'form': + trapBubbledEvent(TOP_RESET, domElement); + trapBubbledEvent(TOP_SUBMIT, domElement); + break; + + case 'details': + trapBubbledEvent(TOP_TOGGLE, domElement); + break; + + case 'input': + initWrapperState(domElement, rawProps); + trapBubbledEvent(TOP_INVALID, domElement); // For controlled components we always need to ensure we're listening + // to onChange. Even if there is no listener. + + ensureListeningTo(rootContainerElement, 'onChange'); + break; + + case 'option': + validateProps(domElement, rawProps); + break; + + case 'select': + initWrapperState$1(domElement, rawProps); + trapBubbledEvent(TOP_INVALID, domElement); // For controlled components we always need to ensure we're listening + // to onChange. Even if there is no listener. + + ensureListeningTo(rootContainerElement, 'onChange'); + break; + + case 'textarea': + initWrapperState$2(domElement, rawProps); + trapBubbledEvent(TOP_INVALID, domElement); // For controlled components we always need to ensure we're listening + // to onChange. Even if there is no listener. + + ensureListeningTo(rootContainerElement, 'onChange'); + break; + } + + assertValidProps(tag, rawProps); + + { + extraAttributeNames = new Set(); + var attributes = domElement.attributes; + + for (var _i = 0; _i < attributes.length; _i++) { + var name = attributes[_i].name.toLowerCase(); + + switch (name) { + // Built-in SSR attribute is whitelisted + case 'data-reactroot': + break; + // Controlled attributes are not validated + // TODO: Only ignore them on controlled tags. + + case 'value': + break; + + case 'checked': + break; + + case 'selected': + break; + + default: + // Intentionally use the original name. + // See discussion in https://github.com/facebook/react/pull/10676. + extraAttributeNames.add(attributes[_i].name); + } + } + } + + var updatePayload = null; + + for (var propKey in rawProps) { + if (!rawProps.hasOwnProperty(propKey)) { + continue; + } + + var nextProp = rawProps[propKey]; + + if (propKey === CHILDREN) { + // For text content children we compare against textContent. This + // might match additional HTML that is hidden when we read it using + // textContent. E.g. "foo" will match "f<span>oo</span>" but that still + // satisfies our requirement. Our requirement is not to produce perfect + // HTML and attributes. Ideally we should preserve structure but it's + // ok not to if the visible content is still enough to indicate what + // even listeners these nodes might be wired up to. + // TODO: Warn if there is more than a single textNode as a child. + // TODO: Should we use domElement.firstChild.nodeValue to compare? + if (typeof nextProp === 'string') { + if (domElement.textContent !== nextProp) { + if (true && !suppressHydrationWarning) { + warnForTextDifference(domElement.textContent, nextProp); + } + + updatePayload = [CHILDREN, nextProp]; + } + } else if (typeof nextProp === 'number') { + if (domElement.textContent !== '' + nextProp) { + if (true && !suppressHydrationWarning) { + warnForTextDifference(domElement.textContent, nextProp); + } + + updatePayload = [CHILDREN, '' + nextProp]; + } + } + } else if (registrationNameModules.hasOwnProperty(propKey)) { + if (nextProp != null) { + if (true && typeof nextProp !== 'function') { + warnForInvalidEventListener(propKey, nextProp); + } + + ensureListeningTo(rootContainerElement, propKey); + } + } else if ( + true && // Convince Flow we've calculated it (it's DEV-only in this method.) + typeof isCustomComponentTag === 'boolean' + ) { + // Validate that the properties correspond to their expected values. + var serverValue = void 0; + var propertyInfo = getPropertyInfo(propKey); + + if (suppressHydrationWarning) { + // Don't bother comparing. We're ignoring all these warnings. + } else if ( + (enableFlareAPI && propKey === LISTENERS) || + propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || + propKey === SUPPRESS_HYDRATION_WARNING$1 || // Controlled attributes are not validated + // TODO: Only ignore them on controlled tags. + propKey === 'value' || + propKey === 'checked' || + propKey === 'selected' + ) { + // Noop + } else if (propKey === DANGEROUSLY_SET_INNER_HTML) { + var serverHTML = domElement.innerHTML; + var nextHtml = nextProp ? nextProp[HTML] : undefined; + var expectedHTML = normalizeHTML(domElement, nextHtml != null ? nextHtml : ''); + + if (expectedHTML !== serverHTML) { + warnForPropDifference(propKey, serverHTML, expectedHTML); + } + } else if (propKey === STYLE$1) { + // $FlowFixMe - Should be inferred as not undefined. + extraAttributeNames.delete(propKey); + + if (canDiffStyleForHydrationWarning) { + var expectedStyle = createDangerousStringForStyles(nextProp); + serverValue = domElement.getAttribute('style'); + + if (expectedStyle !== serverValue) { + warnForPropDifference(propKey, serverValue, expectedStyle); + } + } + } else if (isCustomComponentTag) { + // $FlowFixMe - Should be inferred as not undefined. + extraAttributeNames.delete(propKey.toLowerCase()); + serverValue = getValueForAttribute(domElement, propKey, nextProp); + + if (nextProp !== serverValue) { + warnForPropDifference(propKey, serverValue, nextProp); + } + } else if ( + !shouldIgnoreAttribute(propKey, propertyInfo, isCustomComponentTag) && + !shouldRemoveAttribute(propKey, nextProp, propertyInfo, isCustomComponentTag) + ) { + var isMismatchDueToBadCasing = false; + + if (propertyInfo !== null) { + // $FlowFixMe - Should be inferred as not undefined. + extraAttributeNames.delete(propertyInfo.attributeName); + serverValue = getValueForProperty(domElement, propKey, nextProp, propertyInfo); + } else { + var ownNamespace = parentNamespace; + + if (ownNamespace === HTML_NAMESPACE) { + ownNamespace = getIntrinsicNamespace(tag); + } + + if (ownNamespace === HTML_NAMESPACE) { + // $FlowFixMe - Should be inferred as not undefined. + extraAttributeNames.delete(propKey.toLowerCase()); + } else { + var standardName = getPossibleStandardName(propKey); + + if (standardName !== null && standardName !== propKey) { + // If an SVG prop is supplied with bad casing, it will + // be successfully parsed from HTML, but will produce a mismatch + // (and would be incorrectly rendered on the client). + // However, we already warn about bad casing elsewhere. + // So we'll skip the misleading extra mismatch warning in this case. + isMismatchDueToBadCasing = true; // $FlowFixMe - Should be inferred as not undefined. + + extraAttributeNames.delete(standardName); + } // $FlowFixMe - Should be inferred as not undefined. + + extraAttributeNames.delete(propKey); + } + + serverValue = getValueForAttribute(domElement, propKey, nextProp); + } + + if (nextProp !== serverValue && !isMismatchDueToBadCasing) { + warnForPropDifference(propKey, serverValue, nextProp); + } + } + } + } + + { + // $FlowFixMe - Should be inferred as not undefined. + if (extraAttributeNames.size > 0 && !suppressHydrationWarning) { + // $FlowFixMe - Should be inferred as not undefined. + warnForExtraAttributes(extraAttributeNames); + } + } + + switch (tag) { + case 'input': + // TODO: Make sure we check if this is still unmounted or do any clean + // up necessary since we never stop tracking anymore. + track(domElement); + postMountWrapper(domElement, rawProps, true); + break; + + case 'textarea': + // TODO: Make sure we check if this is still unmounted or do any clean + // up necessary since we never stop tracking anymore. + track(domElement); + postMountWrapper$3(domElement, rawProps); + break; + + case 'select': + case 'option': + // For input and textarea we current always set the value property at + // post mount to force it to diverge from attributes. However, for + // option and select we don't quite do the same thing and select + // is not resilient to the DOM state changing so we don't do that here. + // TODO: Consider not doing this for input and textarea. + break; + + default: + if (typeof rawProps.onClick === 'function') { + // TODO: This cast may not be sound for SVG, MathML or custom elements. + trapClickOnNonInteractiveElement(domElement); + } + + break; + } + + return updatePayload; + } + function diffHydratedText(textNode, text) { + var isDifferent = textNode.nodeValue !== text; + return isDifferent; + } + function warnForUnmatchedText(textNode, text) { + { + warnForTextDifference(textNode.nodeValue, text); + } + } + function warnForDeletedHydratableElement(parentNode, child) { + { + if (didWarnInvalidHydration) { + return; + } + + didWarnInvalidHydration = true; + warningWithoutStack$1( + false, + 'Did not expect server HTML to contain a <%s> in <%s>.', + child.nodeName.toLowerCase(), + parentNode.nodeName.toLowerCase(), + ); + } + } + function warnForDeletedHydratableText(parentNode, child) { + { + if (didWarnInvalidHydration) { + return; + } + + didWarnInvalidHydration = true; + warningWithoutStack$1( + false, + 'Did not expect server HTML to contain the text node "%s" in <%s>.', + child.nodeValue, + parentNode.nodeName.toLowerCase(), + ); + } + } + function warnForInsertedHydratedElement(parentNode, tag, props) { + { + if (didWarnInvalidHydration) { + return; + } + + didWarnInvalidHydration = true; + warningWithoutStack$1( + false, + 'Expected server HTML to contain a matching <%s> in <%s>.', + tag, + parentNode.nodeName.toLowerCase(), + ); + } + } + function warnForInsertedHydratedText(parentNode, text) { + { + if (text === '') { + // We expect to insert empty text nodes since they're not represented in + // the HTML. + // TODO: Remove this special case if we can just avoid inserting empty + // text nodes. + return; + } + + if (didWarnInvalidHydration) { + return; + } + + didWarnInvalidHydration = true; + warningWithoutStack$1( + false, + 'Expected server HTML to contain a matching text node for "%s" in <%s>.', + text, + parentNode.nodeName.toLowerCase(), + ); + } + } + function restoreControlledState$$1(domElement, tag, props) { + switch (tag) { + case 'input': + restoreControlledState$1(domElement, props); + return; + + case 'textarea': + restoreControlledState$3(domElement, props); + return; + + case 'select': + restoreControlledState$2(domElement, props); + return; + } + } + function listenToEventResponderEventTypes(eventTypes, element) { + if (enableFlareAPI) { + // Get the listening Set for this element. We use this to track + // what events we're listening to. + var listeningSet = getListeningSetForElement(element); // Go through each target event type of the event responder + + for (var i = 0, length = eventTypes.length; i < length; ++i) { + var eventType = eventTypes[i]; + var isPassive = !endsWith(eventType, '_active'); + var eventKey = isPassive ? eventType + '_passive' : eventType; + var targetEventType = isPassive ? eventType : eventType.substring(0, eventType.length - 7); + + if (!listeningSet.has(eventKey)) { + trapEventForResponderEventSystem(element, targetEventType, isPassive); + listeningSet.add(eventKey); + } + } + } + } // We can remove this once the event API is stable and out of a flag + + if (enableFlareAPI) { + setListenToResponderEventTypes(listenToEventResponderEventTypes); + } + + function getActiveElement(doc) { + doc = doc || (typeof document !== 'undefined' ? document : undefined); + + if (typeof doc === 'undefined') { + return null; + } + + try { + return doc.activeElement || doc.body; + } catch (e) { + return doc.body; + } + } + + /** + * Given any node return the first leaf node without children. + * + * @param {DOMElement|DOMTextNode} node + * @return {DOMElement|DOMTextNode} + */ + + function getLeafNode(node) { + while (node && node.firstChild) { + node = node.firstChild; + } + + return node; + } + /** + * Get the next sibling within a container. This will walk up the + * DOM if a node's siblings have been exhausted. + * + * @param {DOMElement|DOMTextNode} node + * @return {?DOMElement|DOMTextNode} + */ + + function getSiblingNode(node) { + while (node) { + if (node.nextSibling) { + return node.nextSibling; + } + + node = node.parentNode; + } + } + /** + * Get object describing the nodes which contain characters at offset. + * + * @param {DOMElement|DOMTextNode} root + * @param {number} offset + * @return {?object} + */ + + function getNodeForCharacterOffset(root, offset) { + var node = getLeafNode(root); + var nodeStart = 0; + var nodeEnd = 0; + + while (node) { + if (node.nodeType === TEXT_NODE) { + nodeEnd = nodeStart + node.textContent.length; + + if (nodeStart <= offset && nodeEnd >= offset) { + return { + node: node, + offset: offset - nodeStart, + }; + } + + nodeStart = nodeEnd; + } + + node = getLeafNode(getSiblingNode(node)); + } + } + + /** + * @param {DOMElement} outerNode + * @return {?object} + */ + + function getOffsets(outerNode) { + var ownerDocument = outerNode.ownerDocument; + var win = (ownerDocument && ownerDocument.defaultView) || window; + var selection = win.getSelection && win.getSelection(); + + if (!selection || selection.rangeCount === 0) { + return null; + } + + var anchorNode = selection.anchorNode, + anchorOffset = selection.anchorOffset, + focusNode = selection.focusNode, + focusOffset = selection.focusOffset; // In Firefox, anchorNode and focusNode can be "anonymous divs", e.g. the + // up/down buttons on an <input type="number">. Anonymous divs do not seem to + // expose properties, triggering a "Permission denied error" if any of its + // properties are accessed. The only seemingly possible way to avoid erroring + // is to access a property that typically works for non-anonymous divs and + // catch any error that may otherwise arise. See + // https://bugzilla.mozilla.org/show_bug.cgi?id=208427 + + try { + /* eslint-disable no-unused-expressions */ + anchorNode.nodeType; + focusNode.nodeType; + /* eslint-enable no-unused-expressions */ + } catch (e) { + return null; + } + + return getModernOffsetsFromPoints(outerNode, anchorNode, anchorOffset, focusNode, focusOffset); + } + /** + * Returns {start, end} where `start` is the character/codepoint index of + * (anchorNode, anchorOffset) within the textContent of `outerNode`, and + * `end` is the index of (focusNode, focusOffset). + * + * Returns null if you pass in garbage input but we should probably just crash. + * + * Exported only for testing. + */ + + function getModernOffsetsFromPoints(outerNode, anchorNode, anchorOffset, focusNode, focusOffset) { + var length = 0; + var start = -1; + var end = -1; + var indexWithinAnchor = 0; + var indexWithinFocus = 0; + var node = outerNode; + var parentNode = null; + + outer: while (true) { + var next = null; + + while (true) { + if (node === anchorNode && (anchorOffset === 0 || node.nodeType === TEXT_NODE)) { + start = length + anchorOffset; + } + + if (node === focusNode && (focusOffset === 0 || node.nodeType === TEXT_NODE)) { + end = length + focusOffset; + } + + if (node.nodeType === TEXT_NODE) { + length += node.nodeValue.length; + } + + if ((next = node.firstChild) === null) { + break; + } // Moving from `node` to its first child `next`. + + parentNode = node; + node = next; + } + + while (true) { + if (node === outerNode) { + // If `outerNode` has children, this is always the second time visiting + // it. If it has no children, this is still the first loop, and the only + // valid selection is anchorNode and focusNode both equal to this node + // and both offsets 0, in which case we will have handled above. + break outer; + } + + if (parentNode === anchorNode && ++indexWithinAnchor === anchorOffset) { + start = length; + } + + if (parentNode === focusNode && ++indexWithinFocus === focusOffset) { + end = length; + } + + if ((next = node.nextSibling) !== null) { + break; + } + + node = parentNode; + parentNode = node.parentNode; + } // Moving from `node` to its next sibling `next`. + + node = next; + } + + if (start === -1 || end === -1) { + // This should never happen. (Would happen if the anchor/focus nodes aren't + // actually inside the passed-in node.) + return null; + } + + return { + start: start, + end: end, + }; + } + /** + * In modern non-IE browsers, we can support both forward and backward + * selections. + * + * Note: IE10+ supports the Selection object, but it does not support + * the `extend` method, which means that even in modern IE, it's not possible + * to programmatically create a backward selection. Thus, for all IE + * versions, we use the old IE API to create our selections. + * + * @param {DOMElement|DOMTextNode} node + * @param {object} offsets + */ + + function setOffsets(node, offsets) { + var doc = node.ownerDocument || document; + var win = (doc && doc.defaultView) || window; // Edge fails with "Object expected" in some scenarios. + // (For instance: TinyMCE editor used in a list component that supports pasting to add more, + // fails when pasting 100+ items) + + if (!win.getSelection) { + return; + } + + var selection = win.getSelection(); + var length = node.textContent.length; + var start = Math.min(offsets.start, length); + var end = offsets.end === undefined ? start : Math.min(offsets.end, length); // IE 11 uses modern selection, but doesn't support the extend method. + // Flip backward selections, so we can set with a single range. + + if (!selection.extend && start > end) { + var temp = end; + end = start; + start = temp; + } + + var startMarker = getNodeForCharacterOffset(node, start); + var endMarker = getNodeForCharacterOffset(node, end); + + if (startMarker && endMarker) { + if ( + selection.rangeCount === 1 && + selection.anchorNode === startMarker.node && + selection.anchorOffset === startMarker.offset && + selection.focusNode === endMarker.node && + selection.focusOffset === endMarker.offset + ) { + return; + } + + var range = doc.createRange(); + range.setStart(startMarker.node, startMarker.offset); + selection.removeAllRanges(); + + if (start > end) { + selection.addRange(range); + selection.extend(endMarker.node, endMarker.offset); + } else { + range.setEnd(endMarker.node, endMarker.offset); + selection.addRange(range); + } + } + } + + function isTextNode(node) { + return node && node.nodeType === TEXT_NODE; + } + + function containsNode(outerNode, innerNode) { + if (!outerNode || !innerNode) { + return false; + } else if (outerNode === innerNode) { + return true; + } else if (isTextNode(outerNode)) { + return false; + } else if (isTextNode(innerNode)) { + return containsNode(outerNode, innerNode.parentNode); + } else if ('contains' in outerNode) { + return outerNode.contains(innerNode); + } else if (outerNode.compareDocumentPosition) { + return !!(outerNode.compareDocumentPosition(innerNode) & 16); + } else { + return false; + } + } + + function isInDocument(node) { + return node && node.ownerDocument && containsNode(node.ownerDocument.documentElement, node); + } + + function isSameOriginFrame(iframe) { + try { + // Accessing the contentDocument of a HTMLIframeElement can cause the browser + // to throw, e.g. if it has a cross-origin src attribute. + // Safari will show an error in the console when the access results in "Blocked a frame with origin". e.g: + // iframe.contentDocument.defaultView; + // A safety way is to access one of the cross origin properties: Window or Location + // Which might result in "SecurityError" DOM Exception and it is compatible to Safari. + // https://html.spec.whatwg.org/multipage/browsers.html#integration-with-idl + return typeof iframe.contentWindow.location.href === 'string'; + } catch (err) { + return false; + } + } + + function getActiveElementDeep() { + var win = window; + var element = getActiveElement(); + + while (element instanceof win.HTMLIFrameElement) { + if (isSameOriginFrame(element)) { + win = element.contentWindow; + } else { + return element; + } + + element = getActiveElement(win.document); + } + + return element; + } + /** + * @ReactInputSelection: React input selection module. Based on Selection.js, + * but modified to be suitable for react and has a couple of bug fixes (doesn't + * assume buttons have range selections allowed). + * Input selection module for React. + */ + + /** + * @hasSelectionCapabilities: we get the element types that support selection + * from https://html.spec.whatwg.org/#do-not-apply, looking at `selectionStart` + * and `selectionEnd` rows. + */ + + function hasSelectionCapabilities(elem) { + var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase(); + return ( + nodeName && + ((nodeName === 'input' && + (elem.type === 'text' || + elem.type === 'search' || + elem.type === 'tel' || + elem.type === 'url' || + elem.type === 'password')) || + nodeName === 'textarea' || + elem.contentEditable === 'true') + ); + } + function getSelectionInformation() { + var focusedElem = getActiveElementDeep(); + return { + focusedElem: focusedElem, + selectionRange: hasSelectionCapabilities(focusedElem) ? getSelection(focusedElem) : null, + }; + } + /** + * @restoreSelection: If any selection information was potentially lost, + * restore it. This is useful when performing operations that could remove dom + * nodes and place them back in, resulting in focus being lost. + */ + + function restoreSelection(priorSelectionInformation) { + var curFocusedElem = getActiveElementDeep(); + var priorFocusedElem = priorSelectionInformation.focusedElem; + var priorSelectionRange = priorSelectionInformation.selectionRange; + + if (curFocusedElem !== priorFocusedElem && isInDocument(priorFocusedElem)) { + if (priorSelectionRange !== null && hasSelectionCapabilities(priorFocusedElem)) { + setSelection(priorFocusedElem, priorSelectionRange); + } // Focusing a node can change the scroll position, which is undesirable + + var ancestors = []; + var ancestor = priorFocusedElem; + + while ((ancestor = ancestor.parentNode)) { + if (ancestor.nodeType === ELEMENT_NODE) { + ancestors.push({ + element: ancestor, + left: ancestor.scrollLeft, + top: ancestor.scrollTop, + }); + } + } + + if (typeof priorFocusedElem.focus === 'function') { + priorFocusedElem.focus(); + } + + for (var i = 0; i < ancestors.length; i++) { + var info = ancestors[i]; + info.element.scrollLeft = info.left; + info.element.scrollTop = info.top; + } + } + } + /** + * @getSelection: Gets the selection bounds of a focused textarea, input or + * contentEditable node. + * -@input: Look up selection bounds of this input + * -@return {start: selectionStart, end: selectionEnd} + */ + + function getSelection(input) { + var selection; + + if ('selectionStart' in input) { + // Modern browser with input or textarea. + selection = { + start: input.selectionStart, + end: input.selectionEnd, + }; + } else { + // Content editable or old IE textarea. + selection = getOffsets(input); + } + + return ( + selection || { + start: 0, + end: 0, + } + ); + } + /** + * @setSelection: Sets the selection bounds of a textarea or input and focuses + * the input. + * -@input Set selection bounds of this input or textarea + * -@offsets Object of same form that is returned from get* + */ + + function setSelection(input, offsets) { + var start = offsets.start, + end = offsets.end; + + if (end === undefined) { + end = start; + } + + if ('selectionStart' in input) { + input.selectionStart = start; + input.selectionEnd = Math.min(end, input.value.length); + } else { + setOffsets(input, offsets); + } + } + + var validateDOMNesting = function () {}; + + var updatedAncestorInfo = function () {}; + + { + // This validation code was written based on the HTML5 parsing spec: + // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope + // + // Note: this does not catch all invalid nesting, nor does it try to (as it's + // not clear what practical benefit doing so provides); instead, we warn only + // for cases where the parser will give a parse tree differing from what React + // intended. For example, <b><div></div></b> is invalid but we don't warn + // because it still parses correctly; we do warn for other cases like nested + // <p> tags where the beginning of the second element implicitly closes the + // first, causing a confusing mess. + // https://html.spec.whatwg.org/multipage/syntax.html#special + var specialTags = [ + 'address', + 'applet', + 'area', + 'article', + 'aside', + 'base', + 'basefont', + 'bgsound', + 'blockquote', + 'body', + 'br', + 'button', + 'caption', + 'center', + 'col', + 'colgroup', + 'dd', + 'details', + 'dir', + 'div', + 'dl', + 'dt', + 'embed', + 'fieldset', + 'figcaption', + 'figure', + 'footer', + 'form', + 'frame', + 'frameset', + 'h1', + 'h2', + 'h3', + 'h4', + 'h5', + 'h6', + 'head', + 'header', + 'hgroup', + 'hr', + 'html', + 'iframe', + 'img', + 'input', + 'isindex', + 'li', + 'link', + 'listing', + 'main', + 'marquee', + 'menu', + 'menuitem', + 'meta', + 'nav', + 'noembed', + 'noframes', + 'noscript', + 'object', + 'ol', + 'p', + 'param', + 'plaintext', + 'pre', + 'script', + 'section', + 'select', + 'source', + 'style', + 'summary', + 'table', + 'tbody', + 'td', + 'template', + 'textarea', + 'tfoot', + 'th', + 'thead', + 'title', + 'tr', + 'track', + 'ul', + 'wbr', + 'xmp', + ]; // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope + + var inScopeTags = [ + 'applet', + 'caption', + 'html', + 'table', + 'td', + 'th', + 'marquee', + 'object', + 'template', // https://html.spec.whatwg.org/multipage/syntax.html#html-integration-point + // TODO: Distinguish by namespace here -- for <title>, including it here + // errs on the side of fewer warnings + 'foreignObject', + 'desc', + 'title', + ]; // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-button-scope + + var buttonScopeTags = inScopeTags.concat(['button']); // https://html.spec.whatwg.org/multipage/syntax.html#generate-implied-end-tags + + var impliedEndTags = ['dd', 'dt', 'li', 'option', 'optgroup', 'p', 'rp', 'rt']; + var emptyAncestorInfo = { + current: null, + formTag: null, + aTagInScope: null, + buttonTagInScope: null, + nobrTagInScope: null, + pTagInButtonScope: null, + listItemTagAutoclosing: null, + dlItemTagAutoclosing: null, + }; + + updatedAncestorInfo = function (oldInfo, tag) { + var ancestorInfo = _assign({}, oldInfo || emptyAncestorInfo); + + var info = { + tag: tag, + }; + + if (inScopeTags.indexOf(tag) !== -1) { + ancestorInfo.aTagInScope = null; + ancestorInfo.buttonTagInScope = null; + ancestorInfo.nobrTagInScope = null; + } + + if (buttonScopeTags.indexOf(tag) !== -1) { + ancestorInfo.pTagInButtonScope = null; + } // See rules for 'li', 'dd', 'dt' start tags in + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody + + if (specialTags.indexOf(tag) !== -1 && tag !== 'address' && tag !== 'div' && tag !== 'p') { + ancestorInfo.listItemTagAutoclosing = null; + ancestorInfo.dlItemTagAutoclosing = null; + } + + ancestorInfo.current = info; + + if (tag === 'form') { + ancestorInfo.formTag = info; + } + + if (tag === 'a') { + ancestorInfo.aTagInScope = info; + } + + if (tag === 'button') { + ancestorInfo.buttonTagInScope = info; + } + + if (tag === 'nobr') { + ancestorInfo.nobrTagInScope = info; + } + + if (tag === 'p') { + ancestorInfo.pTagInButtonScope = info; + } + + if (tag === 'li') { + ancestorInfo.listItemTagAutoclosing = info; + } + + if (tag === 'dd' || tag === 'dt') { + ancestorInfo.dlItemTagAutoclosing = info; + } + + return ancestorInfo; + }; + /** + * Returns whether + */ + + var isTagValidWithParent = function (tag, parentTag) { + // First, let's check if we're in an unusual parsing mode... + switch (parentTag) { + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inselect + case 'select': + return tag === 'option' || tag === 'optgroup' || tag === '#text'; + + case 'optgroup': + return tag === 'option' || tag === '#text'; + // Strictly speaking, seeing an <option> doesn't mean we're in a <select> + // but + + case 'option': + return tag === '#text'; + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intd + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incaption + // No special behavior since these rules fall back to "in body" mode for + // all except special table nodes which cause bad parsing behavior anyway. + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intr + + case 'tr': + return ( + tag === 'th' || tag === 'td' || tag === 'style' || tag === 'script' || tag === 'template' + ); + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intbody + + case 'tbody': + case 'thead': + case 'tfoot': + return tag === 'tr' || tag === 'style' || tag === 'script' || tag === 'template'; + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incolgroup + + case 'colgroup': + return tag === 'col' || tag === 'template'; + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intable + + case 'table': + return ( + tag === 'caption' || + tag === 'colgroup' || + tag === 'tbody' || + tag === 'tfoot' || + tag === 'thead' || + tag === 'style' || + tag === 'script' || + tag === 'template' + ); + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inhead + + case 'head': + return ( + tag === 'base' || + tag === 'basefont' || + tag === 'bgsound' || + tag === 'link' || + tag === 'meta' || + tag === 'title' || + tag === 'noscript' || + tag === 'noframes' || + tag === 'style' || + tag === 'script' || + tag === 'template' + ); + // https://html.spec.whatwg.org/multipage/semantics.html#the-html-element + + case 'html': + return tag === 'head' || tag === 'body' || tag === 'frameset'; + + case 'frameset': + return tag === 'frame'; + + case '#document': + return tag === 'html'; + } // Probably in the "in body" parsing mode, so we outlaw only tag combos + // where the parsing rules cause implicit opens or closes to be added. + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody + + switch (tag) { + case 'h1': + case 'h2': + case 'h3': + case 'h4': + case 'h5': + case 'h6': + return ( + parentTag !== 'h1' && + parentTag !== 'h2' && + parentTag !== 'h3' && + parentTag !== 'h4' && + parentTag !== 'h5' && + parentTag !== 'h6' + ); + + case 'rp': + case 'rt': + return impliedEndTags.indexOf(parentTag) === -1; + + case 'body': + case 'caption': + case 'col': + case 'colgroup': + case 'frameset': + case 'frame': + case 'head': + case 'html': + case 'tbody': + case 'td': + case 'tfoot': + case 'th': + case 'thead': + case 'tr': + // These tags are only valid with a few parents that have special child + // parsing rules -- if we're down here, then none of those matched and + // so we allow it only if we don't know what the parent is, as all other + // cases are invalid. + return parentTag == null; + } + + return true; + }; + /** + * Returns whether + */ + + var findInvalidAncestorForTag = function (tag, ancestorInfo) { + switch (tag) { + case 'address': + case 'article': + case 'aside': + case 'blockquote': + case 'center': + case 'details': + case 'dialog': + case 'dir': + case 'div': + case 'dl': + case 'fieldset': + case 'figcaption': + case 'figure': + case 'footer': + case 'header': + case 'hgroup': + case 'main': + case 'menu': + case 'nav': + case 'ol': + case 'p': + case 'section': + case 'summary': + case 'ul': + case 'pre': + case 'listing': + case 'table': + case 'hr': + case 'xmp': + case 'h1': + case 'h2': + case 'h3': + case 'h4': + case 'h5': + case 'h6': + return ancestorInfo.pTagInButtonScope; + + case 'form': + return ancestorInfo.formTag || ancestorInfo.pTagInButtonScope; + + case 'li': + return ancestorInfo.listItemTagAutoclosing; + + case 'dd': + case 'dt': + return ancestorInfo.dlItemTagAutoclosing; + + case 'button': + return ancestorInfo.buttonTagInScope; + + case 'a': + // Spec says something about storing a list of markers, but it sounds + // equivalent to this check. + return ancestorInfo.aTagInScope; + + case 'nobr': + return ancestorInfo.nobrTagInScope; + } + + return null; + }; + + var didWarn$1 = {}; + + validateDOMNesting = function (childTag, childText, ancestorInfo) { + ancestorInfo = ancestorInfo || emptyAncestorInfo; + var parentInfo = ancestorInfo.current; + var parentTag = parentInfo && parentInfo.tag; + + if (childText != null) { + !(childTag == null) + ? warningWithoutStack$1( + false, + 'validateDOMNesting: when childText is passed, childTag should be null', + ) + : void 0; + childTag = '#text'; + } + + var invalidParent = isTagValidWithParent(childTag, parentTag) ? null : parentInfo; + var invalidAncestor = invalidParent ? null : findInvalidAncestorForTag(childTag, ancestorInfo); + var invalidParentOrAncestor = invalidParent || invalidAncestor; + + if (!invalidParentOrAncestor) { + return; + } + + var ancestorTag = invalidParentOrAncestor.tag; + var addendum = getCurrentFiberStackInDev(); + var warnKey = !!invalidParent + '|' + childTag + '|' + ancestorTag + '|' + addendum; + + if (didWarn$1[warnKey]) { + return; + } + + didWarn$1[warnKey] = true; + var tagDisplayName = childTag; + var whitespaceInfo = ''; + + if (childTag === '#text') { + if (/\S/.test(childText)) { + tagDisplayName = 'Text nodes'; + } else { + tagDisplayName = 'Whitespace text nodes'; + whitespaceInfo = + " Make sure you don't have any extra whitespace between tags on " + + 'each line of your source code.'; + } + } else { + tagDisplayName = '<' + childTag + '>'; + } + + if (invalidParent) { + var info = ''; + + if (ancestorTag === 'table' && childTag === 'tr') { + info += + ' Add a <tbody>, <thead> or <tfoot> to your code to match the DOM tree generated by ' + + 'the browser.'; + } + + warningWithoutStack$1( + false, + 'validateDOMNesting(...): %s cannot appear as a child of <%s>.%s%s%s', + tagDisplayName, + ancestorTag, + whitespaceInfo, + info, + addendum, + ); + } else { + warningWithoutStack$1( + false, + 'validateDOMNesting(...): %s cannot appear as a descendant of ' + '<%s>.%s', + tagDisplayName, + ancestorTag, + addendum, + ); + } + }; + } + + // can re-export everything from this module. + + function shim() { + { + { + throw Error( + 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + } // Persistence (when unsupported) + + var supportsPersistence = false; + var cloneInstance = shim; + var cloneFundamentalInstance = shim; + var createContainerChildSet = shim; + var appendChildToContainerChildSet = shim; + var finalizeContainerChildren = shim; + var replaceContainerChildren = shim; + var cloneHiddenInstance = shim; + var cloneHiddenTextInstance = shim; + + var SUPPRESS_HYDRATION_WARNING; + + { + SUPPRESS_HYDRATION_WARNING = 'suppressHydrationWarning'; + } + + var SUSPENSE_START_DATA = '$'; + var SUSPENSE_END_DATA = '/$'; + var SUSPENSE_PENDING_START_DATA = '$?'; + var SUSPENSE_FALLBACK_START_DATA = '$!'; + var STYLE = 'style'; + var eventsEnabled = null; + var selectionInformation = null; + + function shouldAutoFocusHostComponent(type, props) { + switch (type) { + case 'button': + case 'input': + case 'select': + case 'textarea': + return !!props.autoFocus; + } + + return false; + } + + function getRootHostContext(rootContainerInstance) { + var type; + var namespace; + var nodeType = rootContainerInstance.nodeType; + + switch (nodeType) { + case DOCUMENT_NODE: + case DOCUMENT_FRAGMENT_NODE: { + type = nodeType === DOCUMENT_NODE ? '#document' : '#fragment'; + var root = rootContainerInstance.documentElement; + namespace = root ? root.namespaceURI : getChildNamespace(null, ''); + break; + } + + default: { + var container = + nodeType === COMMENT_NODE ? rootContainerInstance.parentNode : rootContainerInstance; + var ownNamespace = container.namespaceURI || null; + type = container.tagName; + namespace = getChildNamespace(ownNamespace, type); + break; + } + } + + { + var validatedTag = type.toLowerCase(); + var ancestorInfo = updatedAncestorInfo(null, validatedTag); + return { + namespace: namespace, + ancestorInfo: ancestorInfo, + }; + } + + return namespace; + } + function getChildHostContext(parentHostContext, type, rootContainerInstance) { + { + var parentHostContextDev = parentHostContext; + var namespace = getChildNamespace(parentHostContextDev.namespace, type); + var ancestorInfo = updatedAncestorInfo(parentHostContextDev.ancestorInfo, type); + return { + namespace: namespace, + ancestorInfo: ancestorInfo, + }; + } + + var parentNamespace = parentHostContext; + return getChildNamespace(parentNamespace, type); + } + function getPublicInstance(instance) { + return instance; + } + function prepareForCommit(containerInfo) { + eventsEnabled = isEnabled(); + selectionInformation = getSelectionInformation(); + setEnabled(false); + } + function resetAfterCommit(containerInfo) { + restoreSelection(selectionInformation); + selectionInformation = null; + setEnabled(eventsEnabled); + eventsEnabled = null; + } + function createInstance(type, props, rootContainerInstance, hostContext, internalInstanceHandle) { + var parentNamespace; + + { + // TODO: take namespace into account when validating. + var hostContextDev = hostContext; + validateDOMNesting(type, null, hostContextDev.ancestorInfo); + + if (typeof props.children === 'string' || typeof props.children === 'number') { + var string = '' + props.children; + var ownAncestorInfo = updatedAncestorInfo(hostContextDev.ancestorInfo, type); + validateDOMNesting(null, string, ownAncestorInfo); + } + + parentNamespace = hostContextDev.namespace; + } + + var domElement = createElement(type, props, rootContainerInstance, parentNamespace); + precacheFiberNode(internalInstanceHandle, domElement); + updateFiberProps(domElement, props); + return domElement; + } + function appendInitialChild(parentInstance, child) { + parentInstance.appendChild(child); + } + function finalizeInitialChildren(domElement, type, props, rootContainerInstance, hostContext) { + setInitialProperties(domElement, type, props, rootContainerInstance); + return shouldAutoFocusHostComponent(type, props); + } + function prepareUpdate(domElement, type, oldProps, newProps, rootContainerInstance, hostContext) { + { + var hostContextDev = hostContext; + + if ( + typeof newProps.children !== typeof oldProps.children && + (typeof newProps.children === 'string' || typeof newProps.children === 'number') + ) { + var string = '' + newProps.children; + var ownAncestorInfo = updatedAncestorInfo(hostContextDev.ancestorInfo, type); + validateDOMNesting(null, string, ownAncestorInfo); + } + } + + return diffProperties(domElement, type, oldProps, newProps, rootContainerInstance); + } + function shouldSetTextContent(type, props) { + return ( + type === 'textarea' || + type === 'option' || + type === 'noscript' || + typeof props.children === 'string' || + typeof props.children === 'number' || + (typeof props.dangerouslySetInnerHTML === 'object' && + props.dangerouslySetInnerHTML !== null && + props.dangerouslySetInnerHTML.__html != null) + ); + } + function shouldDeprioritizeSubtree(type, props) { + return !!props.hidden; + } + function createTextInstance(text, rootContainerInstance, hostContext, internalInstanceHandle) { + { + var hostContextDev = hostContext; + validateDOMNesting(null, text, hostContextDev.ancestorInfo); + } + + var textNode = createTextNode(text, rootContainerInstance); + precacheFiberNode(internalInstanceHandle, textNode); + return textNode; + } + var isPrimaryRenderer = true; + var warnsIfNotActing = true; // This initialization code may run even on server environments + // if a component just imports ReactDOM (e.g. for findDOMNode). + // Some environments might not have setTimeout or clearTimeout. + + var scheduleTimeout = typeof setTimeout === 'function' ? setTimeout : undefined; + var cancelTimeout = typeof clearTimeout === 'function' ? clearTimeout : undefined; + var noTimeout = -1; // ------------------- + // Mutation + // ------------------- + + var supportsMutation = true; + function commitMount(domElement, type, newProps, internalInstanceHandle) { + // Despite the naming that might imply otherwise, this method only + // fires if there is an `Update` effect scheduled during mounting. + // This happens if `finalizeInitialChildren` returns `true` (which it + // does to implement the `autoFocus` attribute on the client). But + // there are also other cases when this might happen (such as patching + // up text content during hydration mismatch). So we'll check this again. + if (shouldAutoFocusHostComponent(type, newProps)) { + domElement.focus(); + } + } + function commitUpdate(domElement, updatePayload, type, oldProps, newProps, internalInstanceHandle) { + // Update the props handle so that we know which props are the ones with + // with current event handlers. + updateFiberProps(domElement, newProps); // Apply the diff to the DOM node. + + updateProperties(domElement, updatePayload, type, oldProps, newProps); + } + function resetTextContent(domElement) { + setTextContent(domElement, ''); + } + function commitTextUpdate(textInstance, oldText, newText) { + textInstance.nodeValue = newText; + } + function appendChild(parentInstance, child) { + parentInstance.appendChild(child); + } + function appendChildToContainer(container, child) { + var parentNode; + + if (container.nodeType === COMMENT_NODE) { + parentNode = container.parentNode; + parentNode.insertBefore(child, container); + } else { + parentNode = container; + parentNode.appendChild(child); + } // This container might be used for a portal. + // If something inside a portal is clicked, that click should bubble + // through the React tree. However, on Mobile Safari the click would + // never bubble through the *DOM* tree unless an ancestor with onclick + // event exists. So we wouldn't see it and dispatch it. + // This is why we ensure that non React root containers have inline onclick + // defined. + // https://github.com/facebook/react/issues/11918 + + var reactRootContainer = container._reactRootContainer; + + if ( + (reactRootContainer === null || reactRootContainer === undefined) && + parentNode.onclick === null + ) { + // TODO: This cast may not be sound for SVG, MathML or custom elements. + trapClickOnNonInteractiveElement(parentNode); + } + } + function insertBefore(parentInstance, child, beforeChild) { + parentInstance.insertBefore(child, beforeChild); + } + function insertInContainerBefore(container, child, beforeChild) { + if (container.nodeType === COMMENT_NODE) { + container.parentNode.insertBefore(child, beforeChild); + } else { + container.insertBefore(child, beforeChild); + } + } // This is a specific event for the React Flare + // event system, so event responders can act + // accordingly to a DOM node being unmounted that + // previously had active document focus. + + function dispatchDetachedVisibleNodeEvent(child) { + if (enableFlareAPI && selectionInformation && child === selectionInformation.focusedElem) { + var targetFiber = getClosestInstanceFromNode(child); // Simlulate a blur event to the React Flare responder system. + + dispatchEventForResponderEventSystem( + 'detachedvisiblenode', + targetFiber, + { + target: child, + timeStamp: Date.now(), + }, + child, + RESPONDER_EVENT_SYSTEM | IS_PASSIVE, + ); + } + } + + function removeChild(parentInstance, child) { + dispatchDetachedVisibleNodeEvent(child); + parentInstance.removeChild(child); + } + function removeChildFromContainer(container, child) { + if (container.nodeType === COMMENT_NODE) { + container.parentNode.removeChild(child); + } else { + dispatchDetachedVisibleNodeEvent(child); + container.removeChild(child); + } + } + function clearSuspenseBoundary(parentInstance, suspenseInstance) { + var node = suspenseInstance; // Delete all nodes within this suspense boundary. + // There might be nested nodes so we need to keep track of how + // deep we are and only break out when we're back on top. + + var depth = 0; + + do { + var nextNode = node.nextSibling; + parentInstance.removeChild(node); + + if (nextNode && nextNode.nodeType === COMMENT_NODE) { + var data = nextNode.data; + + if (data === SUSPENSE_END_DATA) { + if (depth === 0) { + parentInstance.removeChild(nextNode); // Retry if any event replaying was blocked on this. + + retryIfBlockedOn(suspenseInstance); + return; + } else { + depth--; + } + } else if ( + data === SUSPENSE_START_DATA || + data === SUSPENSE_PENDING_START_DATA || + data === SUSPENSE_FALLBACK_START_DATA + ) { + depth++; + } + } + + node = nextNode; + } while (node); // TODO: Warn, we didn't find the end comment boundary. + // Retry if any event replaying was blocked on this. + + retryIfBlockedOn(suspenseInstance); + } + function clearSuspenseBoundaryFromContainer(container, suspenseInstance) { + if (container.nodeType === COMMENT_NODE) { + clearSuspenseBoundary(container.parentNode, suspenseInstance); + } else if (container.nodeType === ELEMENT_NODE) { + clearSuspenseBoundary(container, suspenseInstance); + } else { + } // Document nodes should never contain suspense boundaries. + // Retry if any event replaying was blocked on this. + + retryIfBlockedOn(container); + } + function hideInstance(instance) { + // TODO: Does this work for all element types? What about MathML? Should we + // pass host context to this method? + instance = instance; + var style = instance.style; + + if (typeof style.setProperty === 'function') { + style.setProperty('display', 'none', 'important'); + } else { + style.display = 'none'; + } + } + function hideTextInstance(textInstance) { + textInstance.nodeValue = ''; + } + function unhideInstance(instance, props) { + instance = instance; + var styleProp = props[STYLE]; + var display = + styleProp !== undefined && styleProp !== null && styleProp.hasOwnProperty('display') + ? styleProp.display + : null; + instance.style.display = dangerousStyleValue('display', display); + } + function unhideTextInstance(textInstance, text) { + textInstance.nodeValue = text; + } // ------------------- + // Hydration + // ------------------- + + var supportsHydration = true; + function canHydrateInstance(instance, type, props) { + if ( + instance.nodeType !== ELEMENT_NODE || + type.toLowerCase() !== instance.nodeName.toLowerCase() + ) { + return null; + } // This has now been refined to an element node. + + return instance; + } + function canHydrateTextInstance(instance, text) { + if (text === '' || instance.nodeType !== TEXT_NODE) { + // Empty strings are not parsed by HTML so there won't be a correct match here. + return null; + } // This has now been refined to a text node. + + return instance; + } + function canHydrateSuspenseInstance(instance) { + if (instance.nodeType !== COMMENT_NODE) { + // Empty strings are not parsed by HTML so there won't be a correct match here. + return null; + } // This has now been refined to a suspense node. + + return instance; + } + function isSuspenseInstancePending(instance) { + return instance.data === SUSPENSE_PENDING_START_DATA; + } + function isSuspenseInstanceFallback(instance) { + return instance.data === SUSPENSE_FALLBACK_START_DATA; + } + function registerSuspenseInstanceRetry(instance, callback) { + instance._reactRetry = callback; + } + + function getNextHydratable(node) { + // Skip non-hydratable nodes. + for (; node != null; node = node.nextSibling) { + var nodeType = node.nodeType; + + if (nodeType === ELEMENT_NODE || nodeType === TEXT_NODE) { + break; + } + + if (enableSuspenseServerRenderer) { + if (nodeType === COMMENT_NODE) { + var nodeData = node.data; + + if ( + nodeData === SUSPENSE_START_DATA || + nodeData === SUSPENSE_FALLBACK_START_DATA || + nodeData === SUSPENSE_PENDING_START_DATA + ) { + break; + } + } + } + } + + return node; + } + + function getNextHydratableSibling(instance) { + return getNextHydratable(instance.nextSibling); + } + function getFirstHydratableChild(parentInstance) { + return getNextHydratable(parentInstance.firstChild); + } + function hydrateInstance( + instance, + type, + props, + rootContainerInstance, + hostContext, + internalInstanceHandle, + ) { + precacheFiberNode(internalInstanceHandle, instance); // TODO: Possibly defer this until the commit phase where all the events + // get attached. + + updateFiberProps(instance, props); + var parentNamespace; + + { + var hostContextDev = hostContext; + parentNamespace = hostContextDev.namespace; + } + + return diffHydratedProperties(instance, type, props, parentNamespace, rootContainerInstance); + } + function hydrateTextInstance(textInstance, text, internalInstanceHandle) { + precacheFiberNode(internalInstanceHandle, textInstance); + return diffHydratedText(textInstance, text); + } + function hydrateSuspenseInstance(suspenseInstance, internalInstanceHandle) { + precacheFiberNode(internalInstanceHandle, suspenseInstance); + } + function getNextHydratableInstanceAfterSuspenseInstance(suspenseInstance) { + var node = suspenseInstance.nextSibling; // Skip past all nodes within this suspense boundary. + // There might be nested nodes so we need to keep track of how + // deep we are and only break out when we're back on top. + + var depth = 0; + + while (node) { + if (node.nodeType === COMMENT_NODE) { + var data = node.data; + + if (data === SUSPENSE_END_DATA) { + if (depth === 0) { + return getNextHydratableSibling(node); + } else { + depth--; + } + } else if ( + data === SUSPENSE_START_DATA || + data === SUSPENSE_FALLBACK_START_DATA || + data === SUSPENSE_PENDING_START_DATA + ) { + depth++; + } + } + + node = node.nextSibling; + } // TODO: Warn, we didn't find the end comment boundary. + + return null; + } // Returns the SuspenseInstance if this node is a direct child of a + // SuspenseInstance. I.e. if its previous sibling is a Comment with + // SUSPENSE_x_START_DATA. Otherwise, null. + + function getParentSuspenseInstance(targetInstance) { + var node = targetInstance.previousSibling; // Skip past all nodes within this suspense boundary. + // There might be nested nodes so we need to keep track of how + // deep we are and only break out when we're back on top. + + var depth = 0; + + while (node) { + if (node.nodeType === COMMENT_NODE) { + var data = node.data; + + if ( + data === SUSPENSE_START_DATA || + data === SUSPENSE_FALLBACK_START_DATA || + data === SUSPENSE_PENDING_START_DATA + ) { + if (depth === 0) { + return node; + } else { + depth--; + } + } else if (data === SUSPENSE_END_DATA) { + depth++; + } + } + + node = node.previousSibling; + } + + return null; + } + function commitHydratedContainer(container) { + // Retry if any event replaying was blocked on this. + retryIfBlockedOn(container); + } + function commitHydratedSuspenseInstance(suspenseInstance) { + // Retry if any event replaying was blocked on this. + retryIfBlockedOn(suspenseInstance); + } + function didNotMatchHydratedContainerTextInstance(parentContainer, textInstance, text) { + { + warnForUnmatchedText(textInstance, text); + } + } + function didNotMatchHydratedTextInstance( + parentType, + parentProps, + parentInstance, + textInstance, + text, + ) { + if (true && parentProps[SUPPRESS_HYDRATION_WARNING] !== true) { + warnForUnmatchedText(textInstance, text); + } + } + function didNotHydrateContainerInstance(parentContainer, instance) { + { + if (instance.nodeType === ELEMENT_NODE) { + warnForDeletedHydratableElement(parentContainer, instance); + } else if (instance.nodeType === COMMENT_NODE) { + // TODO: warnForDeletedHydratableSuspenseBoundary + } else { + warnForDeletedHydratableText(parentContainer, instance); + } + } + } + function didNotHydrateInstance(parentType, parentProps, parentInstance, instance) { + if (true && parentProps[SUPPRESS_HYDRATION_WARNING] !== true) { + if (instance.nodeType === ELEMENT_NODE) { + warnForDeletedHydratableElement(parentInstance, instance); + } else if (instance.nodeType === COMMENT_NODE) { + // TODO: warnForDeletedHydratableSuspenseBoundary + } else { + warnForDeletedHydratableText(parentInstance, instance); + } + } + } + function didNotFindHydratableContainerInstance(parentContainer, type, props) { + { + warnForInsertedHydratedElement(parentContainer, type, props); + } + } + function didNotFindHydratableContainerTextInstance(parentContainer, text) { + { + warnForInsertedHydratedText(parentContainer, text); + } + } + + function didNotFindHydratableInstance(parentType, parentProps, parentInstance, type, props) { + if (true && parentProps[SUPPRESS_HYDRATION_WARNING] !== true) { + warnForInsertedHydratedElement(parentInstance, type, props); + } + } + function didNotFindHydratableTextInstance(parentType, parentProps, parentInstance, text) { + if (true && parentProps[SUPPRESS_HYDRATION_WARNING] !== true) { + warnForInsertedHydratedText(parentInstance, text); + } + } + function didNotFindHydratableSuspenseInstance(parentType, parentProps, parentInstance) { + if (true && parentProps[SUPPRESS_HYDRATION_WARNING] !== true) { + // TODO: warnForInsertedHydratedSuspense(parentInstance); + } + } + function mountResponderInstance( + responder, + responderInstance, + responderProps, + responderState, + instance, + ) { + // Listen to events + var doc = instance.ownerDocument; + var _ref = responder, + rootEventTypes = _ref.rootEventTypes, + targetEventTypes = _ref.targetEventTypes; + + if (targetEventTypes !== null) { + listenToEventResponderEventTypes(targetEventTypes, doc); + } + + if (rootEventTypes !== null) { + addRootEventTypesForResponderInstance(responderInstance, rootEventTypes); + listenToEventResponderEventTypes(rootEventTypes, doc); + } + + mountEventResponder(responder, responderInstance, responderProps, responderState); + return responderInstance; + } + function unmountResponderInstance(responderInstance) { + if (enableFlareAPI) { + // TODO stop listening to targetEventTypes + unmountEventResponder(responderInstance); + } + } + function getFundamentalComponentInstance(fundamentalInstance) { + if (enableFundamentalAPI) { + var currentFiber = fundamentalInstance.currentFiber, + impl = fundamentalInstance.impl, + props = fundamentalInstance.props, + state = fundamentalInstance.state; + var instance = impl.getInstance(null, props, state); + precacheFiberNode(currentFiber, instance); + return instance; + } // Because of the flag above, this gets around the Flow error; + + return null; + } + function mountFundamentalComponent(fundamentalInstance) { + if (enableFundamentalAPI) { + var impl = fundamentalInstance.impl, + instance = fundamentalInstance.instance, + props = fundamentalInstance.props, + state = fundamentalInstance.state; + var onMount = impl.onMount; + + if (onMount !== undefined) { + onMount(null, instance, props, state); + } + } + } + function shouldUpdateFundamentalComponent(fundamentalInstance) { + if (enableFundamentalAPI) { + var impl = fundamentalInstance.impl, + prevProps = fundamentalInstance.prevProps, + props = fundamentalInstance.props, + state = fundamentalInstance.state; + var shouldUpdate = impl.shouldUpdate; + + if (shouldUpdate !== undefined) { + return shouldUpdate(null, prevProps, props, state); + } + } + + return true; + } + function updateFundamentalComponent(fundamentalInstance) { + if (enableFundamentalAPI) { + var impl = fundamentalInstance.impl, + instance = fundamentalInstance.instance, + prevProps = fundamentalInstance.prevProps, + props = fundamentalInstance.props, + state = fundamentalInstance.state; + var onUpdate = impl.onUpdate; + + if (onUpdate !== undefined) { + onUpdate(null, instance, prevProps, props, state); + } + } + } + function unmountFundamentalComponent(fundamentalInstance) { + if (enableFundamentalAPI) { + var impl = fundamentalInstance.impl, + instance = fundamentalInstance.instance, + props = fundamentalInstance.props, + state = fundamentalInstance.state; + var onUnmount = impl.onUnmount; + + if (onUnmount !== undefined) { + onUnmount(null, instance, props, state); + } + } + } + function getInstanceFromNode$2(node) { + return getClosestInstanceFromNode(node) || null; + } + + var randomKey = Math.random().toString(36).slice(2); + var internalInstanceKey = '__reactInternalInstance$' + randomKey; + var internalEventHandlersKey = '__reactEventHandlers$' + randomKey; + var internalContainerInstanceKey = '__reactContainere$' + randomKey; + function precacheFiberNode(hostInst, node) { + node[internalInstanceKey] = hostInst; + } + function markContainerAsRoot(hostRoot, node) { + node[internalContainerInstanceKey] = hostRoot; + } + function unmarkContainerAsRoot(node) { + node[internalContainerInstanceKey] = null; + } + function isContainerMarkedAsRoot(node) { + return !!node[internalContainerInstanceKey]; + } // Given a DOM node, return the closest HostComponent or HostText fiber ancestor. + // If the target node is part of a hydrated or not yet rendered subtree, then + // this may also return a SuspenseComponent or HostRoot to indicate that. + // Conceptually the HostRoot fiber is a child of the Container node. So if you + // pass the Container node as the targetNode, you will not actually get the + // HostRoot back. To get to the HostRoot, you need to pass a child of it. + // The same thing applies to Suspense boundaries. + + function getClosestInstanceFromNode(targetNode) { + var targetInst = targetNode[internalInstanceKey]; + + if (targetInst) { + // Don't return HostRoot or SuspenseComponent here. + return targetInst; + } // If the direct event target isn't a React owned DOM node, we need to look + // to see if one of its parents is a React owned DOM node. + + var parentNode = targetNode.parentNode; + + while (parentNode) { + // We'll check if this is a container root that could include + // React nodes in the future. We need to check this first because + // if we're a child of a dehydrated container, we need to first + // find that inner container before moving on to finding the parent + // instance. Note that we don't check this field on the targetNode + // itself because the fibers are conceptually between the container + // node and the first child. It isn't surrounding the container node. + // If it's not a container, we check if it's an instance. + targetInst = parentNode[internalContainerInstanceKey] || parentNode[internalInstanceKey]; + + if (targetInst) { + // Since this wasn't the direct target of the event, we might have + // stepped past dehydrated DOM nodes to get here. However they could + // also have been non-React nodes. We need to answer which one. + // If we the instance doesn't have any children, then there can't be + // a nested suspense boundary within it. So we can use this as a fast + // bailout. Most of the time, when people add non-React children to + // the tree, it is using a ref to a child-less DOM node. + // Normally we'd only need to check one of the fibers because if it + // has ever gone from having children to deleting them or vice versa + // it would have deleted the dehydrated boundary nested inside already. + // However, since the HostRoot starts out with an alternate it might + // have one on the alternate so we need to check in case this was a + // root. + var alternate = targetInst.alternate; + + if (targetInst.child !== null || (alternate !== null && alternate.child !== null)) { + // Next we need to figure out if the node that skipped past is + // nested within a dehydrated boundary and if so, which one. + var suspenseInstance = getParentSuspenseInstance(targetNode); + + while (suspenseInstance !== null) { + // We found a suspense instance. That means that we haven't + // hydrated it yet. Even though we leave the comments in the + // DOM after hydrating, and there are boundaries in the DOM + // that could already be hydrated, we wouldn't have found them + // through this pass since if the target is hydrated it would + // have had an internalInstanceKey on it. + // Let's get the fiber associated with the SuspenseComponent + // as the deepest instance. + var targetSuspenseInst = suspenseInstance[internalInstanceKey]; + + if (targetSuspenseInst) { + return targetSuspenseInst; + } // If we don't find a Fiber on the comment, it might be because + // we haven't gotten to hydrate it yet. There might still be a + // parent boundary that hasn't above this one so we need to find + // the outer most that is known. + + suspenseInstance = getParentSuspenseInstance(suspenseInstance); // If we don't find one, then that should mean that the parent + // host component also hasn't hydrated yet. We can return it + // below since it will bail out on the isMounted check later. + } + } + + return targetInst; + } + + targetNode = parentNode; + parentNode = targetNode.parentNode; + } + + return null; + } + /** + * Given a DOM node, return the ReactDOMComponent or ReactDOMTextComponent + * instance, or null if the node was not rendered by this React. + */ + + function getInstanceFromNode$1(node) { + var inst = node[internalInstanceKey] || node[internalContainerInstanceKey]; + + if (inst) { + if ( + inst.tag === HostComponent || + inst.tag === HostText || + inst.tag === SuspenseComponent || + inst.tag === HostRoot + ) { + return inst; + } else { + return null; + } + } + + return null; + } + /** + * Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding + * DOM node. + */ + + function getNodeFromInstance$1(inst) { + if (inst.tag === HostComponent || inst.tag === HostText) { + // In Fiber this, is just the state node right now. We assume it will be + // a host component or host text. + return inst.stateNode; + } // Without this first invariant, passing a non-DOM-component triggers the next + // invariant for a missing parent, which is super confusing. + + { + { + throw Error('getNodeFromInstance: Invalid argument.'); + } + } + } + function getFiberCurrentPropsFromNode$1(node) { + return node[internalEventHandlersKey] || null; + } + function updateFiberProps(node, props) { + node[internalEventHandlersKey] = props; + } + + /** + * These variables store information about text content of a target node, + * allowing comparison of content before and after a given event. + * + * Identify the node where selection currently begins, then observe + * both its text content and its current position in the DOM. Since the + * browser may natively replace the target node during composition, we can + * use its position to find its replacement. + * + * + */ + var root = null; + var startText = null; + var fallbackText = null; + function initialize(nativeEventTarget) { + root = nativeEventTarget; + startText = getText(); + return true; + } + function reset() { + root = null; + startText = null; + fallbackText = null; + } + function getData() { + if (fallbackText) { + return fallbackText; + } + + var start; + var startValue = startText; + var startLength = startValue.length; + var end; + var endValue = getText(); + var endLength = endValue.length; + + for (start = 0; start < startLength; start++) { + if (startValue[start] !== endValue[start]) { + break; + } + } + + var minEnd = startLength - start; + + for (end = 1; end <= minEnd; end++) { + if (startValue[startLength - end] !== endValue[endLength - end]) { + break; + } + } + + var sliceTail = end > 1 ? 1 - end : undefined; + fallbackText = endValue.slice(start, sliceTail); + return fallbackText; + } + function getText() { + if ('value' in root) { + return root.value; + } + + return root.textContent; + } + + /** + * @interface Event + * @see http://www.w3.org/TR/DOM-Level-3-Events/#events-compositionevents + */ + + var SyntheticCompositionEvent = SyntheticEvent.extend({ + data: null, + }); + + /** + * @interface Event + * @see http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105 + * /#events-inputevents + */ + + var SyntheticInputEvent = SyntheticEvent.extend({ + data: null, + }); + + var END_KEYCODES = [9, 13, 27, 32]; // Tab, Return, Esc, Space + + var START_KEYCODE = 229; + var canUseCompositionEvent = canUseDOM && 'CompositionEvent' in window; + var documentMode = null; + + if (canUseDOM && 'documentMode' in document) { + documentMode = document.documentMode; + } // Webkit offers a very useful `textInput` event that can be used to + // directly represent `beforeInput`. The IE `textinput` event is not as + // useful, so we don't use it. + + var canUseTextInputEvent = canUseDOM && 'TextEvent' in window && !documentMode; // In IE9+, we have access to composition events, but the data supplied + // by the native compositionend event may be incorrect. Japanese ideographic + // spaces, for instance (\u3000) are not recorded correctly. + + var useFallbackCompositionData = + canUseDOM && + (!canUseCompositionEvent || (documentMode && documentMode > 8 && documentMode <= 11)); + var SPACEBAR_CODE = 32; + var SPACEBAR_CHAR = String.fromCharCode(SPACEBAR_CODE); // Events and their corresponding property names. + + var eventTypes$1 = { + beforeInput: { + phasedRegistrationNames: { + bubbled: 'onBeforeInput', + captured: 'onBeforeInputCapture', + }, + dependencies: [TOP_COMPOSITION_END, TOP_KEY_PRESS, TOP_TEXT_INPUT, TOP_PASTE], + }, + compositionEnd: { + phasedRegistrationNames: { + bubbled: 'onCompositionEnd', + captured: 'onCompositionEndCapture', + }, + dependencies: [ + TOP_BLUR, + TOP_COMPOSITION_END, + TOP_KEY_DOWN, + TOP_KEY_PRESS, + TOP_KEY_UP, + TOP_MOUSE_DOWN, + ], + }, + compositionStart: { + phasedRegistrationNames: { + bubbled: 'onCompositionStart', + captured: 'onCompositionStartCapture', + }, + dependencies: [ + TOP_BLUR, + TOP_COMPOSITION_START, + TOP_KEY_DOWN, + TOP_KEY_PRESS, + TOP_KEY_UP, + TOP_MOUSE_DOWN, + ], + }, + compositionUpdate: { + phasedRegistrationNames: { + bubbled: 'onCompositionUpdate', + captured: 'onCompositionUpdateCapture', + }, + dependencies: [ + TOP_BLUR, + TOP_COMPOSITION_UPDATE, + TOP_KEY_DOWN, + TOP_KEY_PRESS, + TOP_KEY_UP, + TOP_MOUSE_DOWN, + ], + }, + }; // Track whether we've ever handled a keypress on the space key. + + var hasSpaceKeypress = false; + /** + * Return whether a native keypress event is assumed to be a command. + * This is required because Firefox fires `keypress` events for key commands + * (cut, copy, select-all, etc.) even though no character is inserted. + */ + + function isKeypressCommand(nativeEvent) { + return ( + (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) && // ctrlKey && altKey is equivalent to AltGr, and is not a command. + !(nativeEvent.ctrlKey && nativeEvent.altKey) + ); + } + /** + * Translate native top level events into event types. + * + * @param {string} topLevelType + * @return {object} + */ + + function getCompositionEventType(topLevelType) { + switch (topLevelType) { + case TOP_COMPOSITION_START: + return eventTypes$1.compositionStart; + + case TOP_COMPOSITION_END: + return eventTypes$1.compositionEnd; + + case TOP_COMPOSITION_UPDATE: + return eventTypes$1.compositionUpdate; + } + } + /** + * Does our fallback best-guess model think this event signifies that + * composition has begun? + * + * @param {string} topLevelType + * @param {object} nativeEvent + * @return {boolean} + */ + + function isFallbackCompositionStart(topLevelType, nativeEvent) { + return topLevelType === TOP_KEY_DOWN && nativeEvent.keyCode === START_KEYCODE; + } + /** + * Does our fallback mode think that this event is the end of composition? + * + * @param {string} topLevelType + * @param {object} nativeEvent + * @return {boolean} + */ + + function isFallbackCompositionEnd(topLevelType, nativeEvent) { + switch (topLevelType) { + case TOP_KEY_UP: + // Command keys insert or clear IME input. + return END_KEYCODES.indexOf(nativeEvent.keyCode) !== -1; + + case TOP_KEY_DOWN: + // Expect IME keyCode on each keydown. If we get any other + // code we must have exited earlier. + return nativeEvent.keyCode !== START_KEYCODE; + + case TOP_KEY_PRESS: + case TOP_MOUSE_DOWN: + case TOP_BLUR: + // Events are not possible without cancelling IME. + return true; + + default: + return false; + } + } + /** + * Google Input Tools provides composition data via a CustomEvent, + * with the `data` property populated in the `detail` object. If this + * is available on the event object, use it. If not, this is a plain + * composition event and we have nothing special to extract. + * + * @param {object} nativeEvent + * @return {?string} + */ + + function getDataFromCustomEvent(nativeEvent) { + var detail = nativeEvent.detail; + + if (typeof detail === 'object' && 'data' in detail) { + return detail.data; + } + + return null; + } + /** + * Check if a composition event was triggered by Korean IME. + * Our fallback mode does not work well with IE's Korean IME, + * so just use native composition events when Korean IME is used. + * Although CompositionEvent.locale property is deprecated, + * it is available in IE, where our fallback mode is enabled. + * + * @param {object} nativeEvent + * @return {boolean} + */ + + function isUsingKoreanIME(nativeEvent) { + return nativeEvent.locale === 'ko'; + } // Track the current IME composition status, if any. + + var isComposing = false; + /** + * @return {?object} A SyntheticCompositionEvent. + */ + + function extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) { + var eventType; + var fallbackData; + + if (canUseCompositionEvent) { + eventType = getCompositionEventType(topLevelType); + } else if (!isComposing) { + if (isFallbackCompositionStart(topLevelType, nativeEvent)) { + eventType = eventTypes$1.compositionStart; + } + } else if (isFallbackCompositionEnd(topLevelType, nativeEvent)) { + eventType = eventTypes$1.compositionEnd; + } + + if (!eventType) { + return null; + } + + if (useFallbackCompositionData && !isUsingKoreanIME(nativeEvent)) { + // The current composition is stored statically and must not be + // overwritten while composition continues. + if (!isComposing && eventType === eventTypes$1.compositionStart) { + isComposing = initialize(nativeEventTarget); + } else if (eventType === eventTypes$1.compositionEnd) { + if (isComposing) { + fallbackData = getData(); + } + } + } + + var event = SyntheticCompositionEvent.getPooled( + eventType, + targetInst, + nativeEvent, + nativeEventTarget, + ); + + if (fallbackData) { + // Inject data generated from fallback path into the synthetic event. + // This matches the property of native CompositionEventInterface. + event.data = fallbackData; + } else { + var customData = getDataFromCustomEvent(nativeEvent); + + if (customData !== null) { + event.data = customData; + } + } + + accumulateTwoPhaseDispatches(event); + return event; + } + /** + * @param {TopLevelType} topLevelType Number from `TopLevelType`. + * @param {object} nativeEvent Native browser event. + * @return {?string} The string corresponding to this `beforeInput` event. + */ + + function getNativeBeforeInputChars(topLevelType, nativeEvent) { + switch (topLevelType) { + case TOP_COMPOSITION_END: + return getDataFromCustomEvent(nativeEvent); + + case TOP_KEY_PRESS: + /** + * If native `textInput` events are available, our goal is to make + * use of them. However, there is a special case: the spacebar key. + * In Webkit, preventing default on a spacebar `textInput` event + * cancels character insertion, but it *also* causes the browser + * to fall back to its default spacebar behavior of scrolling the + * page. + * + * Tracking at: + * https://code.google.com/p/chromium/issues/detail?id=355103 + * + * To avoid this issue, use the keypress event as if no `textInput` + * event is available. + */ + var which = nativeEvent.which; + + if (which !== SPACEBAR_CODE) { + return null; + } + + hasSpaceKeypress = true; + return SPACEBAR_CHAR; + + case TOP_TEXT_INPUT: + // Record the characters to be added to the DOM. + var chars = nativeEvent.data; // If it's a spacebar character, assume that we have already handled + // it at the keypress level and bail immediately. Android Chrome + // doesn't give us keycodes, so we need to ignore it. + + if (chars === SPACEBAR_CHAR && hasSpaceKeypress) { + return null; + } + + return chars; + + default: + // For other native event types, do nothing. + return null; + } + } + /** + * For browsers that do not provide the `textInput` event, extract the + * appropriate string to use for SyntheticInputEvent. + * + * @param {number} topLevelType Number from `TopLevelEventTypes`. + * @param {object} nativeEvent Native browser event. + * @return {?string} The fallback string for this `beforeInput` event. + */ + + function getFallbackBeforeInputChars(topLevelType, nativeEvent) { + // If we are currently composing (IME) and using a fallback to do so, + // try to extract the composed characters from the fallback object. + // If composition event is available, we extract a string only at + // compositionevent, otherwise extract it at fallback events. + if (isComposing) { + if ( + topLevelType === TOP_COMPOSITION_END || + (!canUseCompositionEvent && isFallbackCompositionEnd(topLevelType, nativeEvent)) + ) { + var chars = getData(); + reset(); + isComposing = false; + return chars; + } + + return null; + } + + switch (topLevelType) { + case TOP_PASTE: + // If a paste event occurs after a keypress, throw out the input + // chars. Paste events should not lead to BeforeInput events. + return null; + + case TOP_KEY_PRESS: + /** + * As of v27, Firefox may fire keypress events even when no character + * will be inserted. A few possibilities: + * + * - `which` is `0`. Arrow keys, Esc key, etc. + * + * - `which` is the pressed key code, but no char is available. + * Ex: 'AltGr + d` in Polish. There is no modified character for + * this key combination and no character is inserted into the + * document, but FF fires the keypress for char code `100` anyway. + * No `input` event will occur. + * + * - `which` is the pressed key code, but a command combination is + * being used. Ex: `Cmd+C`. No character is inserted, and no + * `input` event will occur. + */ + if (!isKeypressCommand(nativeEvent)) { + // IE fires the `keypress` event when a user types an emoji via + // Touch keyboard of Windows. In such a case, the `char` property + // holds an emoji character like `\uD83D\uDE0A`. Because its length + // is 2, the property `which` does not represent an emoji correctly. + // In such a case, we directly return the `char` property instead of + // using `which`. + if (nativeEvent.char && nativeEvent.char.length > 1) { + return nativeEvent.char; + } else if (nativeEvent.which) { + return String.fromCharCode(nativeEvent.which); + } + } + + return null; + + case TOP_COMPOSITION_END: + return useFallbackCompositionData && !isUsingKoreanIME(nativeEvent) ? null : nativeEvent.data; + + default: + return null; + } + } + /** + * Extract a SyntheticInputEvent for `beforeInput`, based on either native + * `textInput` or fallback behavior. + * + * @return {?object} A SyntheticInputEvent. + */ + + function extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) { + var chars; + + if (canUseTextInputEvent) { + chars = getNativeBeforeInputChars(topLevelType, nativeEvent); + } else { + chars = getFallbackBeforeInputChars(topLevelType, nativeEvent); + } // If no characters are being inserted, no BeforeInput event should + // be fired. + + if (!chars) { + return null; + } + + var event = SyntheticInputEvent.getPooled( + eventTypes$1.beforeInput, + targetInst, + nativeEvent, + nativeEventTarget, + ); + event.data = chars; + accumulateTwoPhaseDispatches(event); + return event; + } + /** + * Create an `onBeforeInput` event to match + * http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105/#events-inputevents. + * + * This event plugin is based on the native `textInput` event + * available in Chrome, Safari, Opera, and IE. This event fires after + * `onKeyPress` and `onCompositionEnd`, but before `onInput`. + * + * `beforeInput` is spec'd but not implemented in any browsers, and + * the `input` event does not provide any useful information about what has + * actually been added, contrary to the spec. Thus, `textInput` is the best + * available event to identify the characters that have actually been inserted + * into the target node. + * + * This plugin is also responsible for emitting `composition` events, thus + * allowing us to share composition fallback code for both `beforeInput` and + * `composition` event types. + */ + + var BeforeInputEventPlugin = { + eventTypes: eventTypes$1, + extractEvents: function ( + topLevelType, + targetInst, + nativeEvent, + nativeEventTarget, + eventSystemFlags, + ) { + var composition = extractCompositionEvent( + topLevelType, + targetInst, + nativeEvent, + nativeEventTarget, + ); + var beforeInput = extractBeforeInputEvent( + topLevelType, + targetInst, + nativeEvent, + nativeEventTarget, + ); + + if (composition === null) { + return beforeInput; + } + + if (beforeInput === null) { + return composition; + } + + return [composition, beforeInput]; + }, + }; + + /** + * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary + */ + var supportedInputTypes = { + color: true, + date: true, + datetime: true, + 'datetime-local': true, + email: true, + month: true, + number: true, + password: true, + range: true, + search: true, + tel: true, + text: true, + time: true, + url: true, + week: true, + }; + + function isTextInputElement(elem) { + var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase(); + + if (nodeName === 'input') { + return !!supportedInputTypes[elem.type]; + } + + if (nodeName === 'textarea') { + return true; + } + + return false; + } + + var eventTypes$2 = { + change: { + phasedRegistrationNames: { + bubbled: 'onChange', + captured: 'onChangeCapture', + }, + dependencies: [ + TOP_BLUR, + TOP_CHANGE, + TOP_CLICK, + TOP_FOCUS, + TOP_INPUT, + TOP_KEY_DOWN, + TOP_KEY_UP, + TOP_SELECTION_CHANGE, + ], + }, + }; + + function createAndAccumulateChangeEvent(inst, nativeEvent, target) { + var event = SyntheticEvent.getPooled(eventTypes$2.change, inst, nativeEvent, target); + event.type = 'change'; // Flag this event loop as needing state restore. + + enqueueStateRestore(target); + accumulateTwoPhaseDispatches(event); + return event; + } + /** + * For IE shims + */ + + var activeElement = null; + var activeElementInst = null; + /** + * SECTION: handle `change` event + */ + + function shouldUseChangeEvent(elem) { + var nodeName = elem.nodeName && elem.nodeName.toLowerCase(); + return nodeName === 'select' || (nodeName === 'input' && elem.type === 'file'); + } + + function manualDispatchChangeEvent(nativeEvent) { + var event = createAndAccumulateChangeEvent( + activeElementInst, + nativeEvent, + getEventTarget(nativeEvent), + ); // If change and propertychange bubbled, we'd just bind to it like all the + // other events and have it go through ReactBrowserEventEmitter. Since it + // doesn't, we manually listen for the events and so we have to enqueue and + // process the abstract event manually. + // + // Batching is necessary here in order to ensure that all event handlers run + // before the next rerender (including event handlers attached to ancestor + // elements instead of directly on the input). Without this, controlled + // components don't work properly in conjunction with event bubbling because + // the component is rerendered and the value reverted before all the event + // handlers can run. See https://github.com/facebook/react/issues/708. + + batchedUpdates(runEventInBatch, event); + } + + function runEventInBatch(event) { + runEventsInBatch(event); + } + + function getInstIfValueChanged(targetInst) { + var targetNode = getNodeFromInstance$1(targetInst); + + if (updateValueIfChanged(targetNode)) { + return targetInst; + } + } + + function getTargetInstForChangeEvent(topLevelType, targetInst) { + if (topLevelType === TOP_CHANGE) { + return targetInst; + } + } + /** + * SECTION: handle `input` event + */ + + var isInputEventSupported = false; + + if (canUseDOM) { + // IE9 claims to support the input event but fails to trigger it when + // deleting text, so we ignore its input events. + isInputEventSupported = + isEventSupported('input') && (!document.documentMode || document.documentMode > 9); + } + /** + * (For IE <=9) Starts tracking propertychange events on the passed-in element + * and override the value property so that we can distinguish user events from + * value changes in JS. + */ + + function startWatchingForValueChange(target, targetInst) { + activeElement = target; + activeElementInst = targetInst; + activeElement.attachEvent('onpropertychange', handlePropertyChange); + } + /** + * (For IE <=9) Removes the event listeners from the currently-tracked element, + * if any exists. + */ + + function stopWatchingForValueChange() { + if (!activeElement) { + return; + } + + activeElement.detachEvent('onpropertychange', handlePropertyChange); + activeElement = null; + activeElementInst = null; + } + /** + * (For IE <=9) Handles a propertychange event, sending a `change` event if + * the value of the active element has changed. + */ + + function handlePropertyChange(nativeEvent) { + if (nativeEvent.propertyName !== 'value') { + return; + } + + if (getInstIfValueChanged(activeElementInst)) { + manualDispatchChangeEvent(nativeEvent); + } + } + + function handleEventsForInputEventPolyfill(topLevelType, target, targetInst) { + if (topLevelType === TOP_FOCUS) { + // In IE9, propertychange fires for most input events but is buggy and + // doesn't fire when text is deleted, but conveniently, selectionchange + // appears to fire in all of the remaining cases so we catch those and + // forward the event if the value has changed + // In either case, we don't want to call the event handler if the value + // is changed from JS so we redefine a setter for `.value` that updates + // our activeElementValue variable, allowing us to ignore those changes + // + // stopWatching() should be a noop here but we call it just in case we + // missed a blur event somehow. + stopWatchingForValueChange(); + startWatchingForValueChange(target, targetInst); + } else if (topLevelType === TOP_BLUR) { + stopWatchingForValueChange(); + } + } // For IE8 and IE9. + + function getTargetInstForInputEventPolyfill(topLevelType, targetInst) { + if ( + topLevelType === TOP_SELECTION_CHANGE || + topLevelType === TOP_KEY_UP || + topLevelType === TOP_KEY_DOWN + ) { + // On the selectionchange event, the target is just document which isn't + // helpful for us so just check activeElement instead. + // + // 99% of the time, keydown and keyup aren't necessary. IE8 fails to fire + // propertychange on the first input event after setting `value` from a + // script and fires only keydown, keypress, keyup. Catching keyup usually + // gets it and catching keydown lets us fire an event for the first + // keystroke if user does a key repeat (it'll be a little delayed: right + // before the second keystroke). Other input methods (e.g., paste) seem to + // fire selectionchange normally. + return getInstIfValueChanged(activeElementInst); + } + } + /** + * SECTION: handle `click` event + */ + + function shouldUseClickEvent(elem) { + // Use the `click` event to detect changes to checkbox and radio inputs. + // This approach works across all browsers, whereas `change` does not fire + // until `blur` in IE8. + var nodeName = elem.nodeName; + return ( + nodeName && + nodeName.toLowerCase() === 'input' && + (elem.type === 'checkbox' || elem.type === 'radio') + ); + } + + function getTargetInstForClickEvent(topLevelType, targetInst) { + if (topLevelType === TOP_CLICK) { + return getInstIfValueChanged(targetInst); + } + } + + function getTargetInstForInputOrChangeEvent(topLevelType, targetInst) { + if (topLevelType === TOP_INPUT || topLevelType === TOP_CHANGE) { + return getInstIfValueChanged(targetInst); + } + } + + function handleControlledInputBlur(node) { + var state = node._wrapperState; + + if (!state || !state.controlled || node.type !== 'number') { + return; + } + + if (!disableInputAttributeSyncing) { + // If controlled, assign the value attribute to the current value on blur + setDefaultValue(node, 'number', node.value); + } + } + /** + * This plugin creates an `onChange` event that normalizes change events + * across form elements. This event fires at a time when it's possible to + * change the element's value without seeing a flicker. + * + * Supported elements are: + * - input (see `isTextInputElement`) + * - textarea + * - select + */ + + var ChangeEventPlugin = { + eventTypes: eventTypes$2, + _isInputEventSupported: isInputEventSupported, + extractEvents: function ( + topLevelType, + targetInst, + nativeEvent, + nativeEventTarget, + eventSystemFlags, + ) { + var targetNode = targetInst ? getNodeFromInstance$1(targetInst) : window; + var getTargetInstFunc, handleEventFunc; + + if (shouldUseChangeEvent(targetNode)) { + getTargetInstFunc = getTargetInstForChangeEvent; + } else if (isTextInputElement(targetNode)) { + if (isInputEventSupported) { + getTargetInstFunc = getTargetInstForInputOrChangeEvent; + } else { + getTargetInstFunc = getTargetInstForInputEventPolyfill; + handleEventFunc = handleEventsForInputEventPolyfill; + } + } else if (shouldUseClickEvent(targetNode)) { + getTargetInstFunc = getTargetInstForClickEvent; + } + + if (getTargetInstFunc) { + var inst = getTargetInstFunc(topLevelType, targetInst); + + if (inst) { + var event = createAndAccumulateChangeEvent(inst, nativeEvent, nativeEventTarget); + return event; + } + } + + if (handleEventFunc) { + handleEventFunc(topLevelType, targetNode, targetInst); + } // When blurring, set the value attribute for number inputs + + if (topLevelType === TOP_BLUR) { + handleControlledInputBlur(targetNode); + } + }, + }; + + /** + * Module that is injectable into `EventPluginHub`, that specifies a + * deterministic ordering of `EventPlugin`s. A convenient way to reason about + * plugins, without having to package every one of them. This is better than + * having plugins be ordered in the same order that they are injected because + * that ordering would be influenced by the packaging order. + * `ResponderEventPlugin` must occur before `SimpleEventPlugin` so that + * preventing default on events is convenient in `SimpleEventPlugin` handlers. + */ + var DOMEventPluginOrder = [ + 'ResponderEventPlugin', + 'SimpleEventPlugin', + 'EnterLeaveEventPlugin', + 'ChangeEventPlugin', + 'SelectEventPlugin', + 'BeforeInputEventPlugin', + ]; + + var eventTypes$3 = { + mouseEnter: { + registrationName: 'onMouseEnter', + dependencies: [TOP_MOUSE_OUT, TOP_MOUSE_OVER], + }, + mouseLeave: { + registrationName: 'onMouseLeave', + dependencies: [TOP_MOUSE_OUT, TOP_MOUSE_OVER], + }, + pointerEnter: { + registrationName: 'onPointerEnter', + dependencies: [TOP_POINTER_OUT, TOP_POINTER_OVER], + }, + pointerLeave: { + registrationName: 'onPointerLeave', + dependencies: [TOP_POINTER_OUT, TOP_POINTER_OVER], + }, + }; // We track the lastNativeEvent to ensure that when we encounter + // cases where we process the same nativeEvent multiple times, + // which can happen when have multiple ancestors, that we don't + // duplicate enter + + var lastNativeEvent; + var EnterLeaveEventPlugin = { + eventTypes: eventTypes$3, + + /** + * For almost every interaction we care about, there will be both a top-level + * `mouseover` and `mouseout` event that occurs. Only use `mouseout` so that + * we do not extract duplicate events. However, moving the mouse into the + * browser from outside will not fire a `mouseout` event. In this case, we use + * the `mouseover` top-level event. + */ + extractEvents: function ( + topLevelType, + targetInst, + nativeEvent, + nativeEventTarget, + eventSystemFlags, + ) { + var isOverEvent = topLevelType === TOP_MOUSE_OVER || topLevelType === TOP_POINTER_OVER; + var isOutEvent = topLevelType === TOP_MOUSE_OUT || topLevelType === TOP_POINTER_OUT; + + if ( + isOverEvent && + (eventSystemFlags & IS_REPLAYED) === 0 && + (nativeEvent.relatedTarget || nativeEvent.fromElement) + ) { + // If this is an over event with a target, then we've already dispatched + // the event in the out event of the other target. If this is replayed, + // then it's because we couldn't dispatch against this target previously + // so we have to do it now instead. + return null; + } + + if (!isOutEvent && !isOverEvent) { + // Must not be a mouse or pointer in or out - ignoring. + return null; + } + + var win; + + if (nativeEventTarget.window === nativeEventTarget) { + // `nativeEventTarget` is probably a window object. + win = nativeEventTarget; + } else { + // TODO: Figure out why `ownerDocument` is sometimes undefined in IE8. + var doc = nativeEventTarget.ownerDocument; + + if (doc) { + win = doc.defaultView || doc.parentWindow; + } else { + win = window; + } + } + + var from; + var to; + + if (isOutEvent) { + from = targetInst; + var related = nativeEvent.relatedTarget || nativeEvent.toElement; + to = related ? getClosestInstanceFromNode(related) : null; + + if (to !== null) { + var nearestMounted = getNearestMountedFiber(to); + + if (to !== nearestMounted || (to.tag !== HostComponent && to.tag !== HostText)) { + to = null; + } + } + } else { + // Moving to a node from outside the window. + from = null; + to = targetInst; + } + + if (from === to) { + // Nothing pertains to our managed components. + return null; + } + + var eventInterface, leaveEventType, enterEventType, eventTypePrefix; + + if (topLevelType === TOP_MOUSE_OUT || topLevelType === TOP_MOUSE_OVER) { + eventInterface = SyntheticMouseEvent; + leaveEventType = eventTypes$3.mouseLeave; + enterEventType = eventTypes$3.mouseEnter; + eventTypePrefix = 'mouse'; + } else if (topLevelType === TOP_POINTER_OUT || topLevelType === TOP_POINTER_OVER) { + eventInterface = SyntheticPointerEvent; + leaveEventType = eventTypes$3.pointerLeave; + enterEventType = eventTypes$3.pointerEnter; + eventTypePrefix = 'pointer'; + } + + var fromNode = from == null ? win : getNodeFromInstance$1(from); + var toNode = to == null ? win : getNodeFromInstance$1(to); + var leave = eventInterface.getPooled(leaveEventType, from, nativeEvent, nativeEventTarget); + leave.type = eventTypePrefix + 'leave'; + leave.target = fromNode; + leave.relatedTarget = toNode; + var enter = eventInterface.getPooled(enterEventType, to, nativeEvent, nativeEventTarget); + enter.type = eventTypePrefix + 'enter'; + enter.target = toNode; + enter.relatedTarget = fromNode; + accumulateEnterLeaveDispatches(leave, enter, from, to); + + if (nativeEvent === lastNativeEvent) { + lastNativeEvent = null; + return [leave]; + } + + lastNativeEvent = nativeEvent; + return [leave, enter]; + }, + }; + + /** + * inlined Object.is polyfill to avoid requiring consumers ship their own + * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is + */ + function is(x, y) { + return ( + (x === y && (x !== 0 || 1 / x === 1 / y)) || (x !== x && y !== y) // eslint-disable-line no-self-compare + ); + } + + var is$1 = typeof Object.is === 'function' ? Object.is : is; + + var hasOwnProperty$2 = Object.prototype.hasOwnProperty; + /** + * Performs equality by iterating through keys on an object and returning false + * when any key has values which are not strictly equal between the arguments. + * Returns true when the values of all keys are strictly equal. + */ + + function shallowEqual(objA, objB) { + if (is$1(objA, objB)) { + return true; + } + + if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) { + return false; + } + + var keysA = Object.keys(objA); + var keysB = Object.keys(objB); + + if (keysA.length !== keysB.length) { + return false; + } // Test for A's keys different from B. + + for (var i = 0; i < keysA.length; i++) { + if (!hasOwnProperty$2.call(objB, keysA[i]) || !is$1(objA[keysA[i]], objB[keysA[i]])) { + return false; + } + } + + return true; + } + + var skipSelectionChangeEvent = + canUseDOM && 'documentMode' in document && document.documentMode <= 11; + var eventTypes$4 = { + select: { + phasedRegistrationNames: { + bubbled: 'onSelect', + captured: 'onSelectCapture', + }, + dependencies: [ + TOP_BLUR, + TOP_CONTEXT_MENU, + TOP_DRAG_END, + TOP_FOCUS, + TOP_KEY_DOWN, + TOP_KEY_UP, + TOP_MOUSE_DOWN, + TOP_MOUSE_UP, + TOP_SELECTION_CHANGE, + ], + }, + }; + var activeElement$1 = null; + var activeElementInst$1 = null; + var lastSelection = null; + var mouseDown = false; + /** + * Get an object which is a unique representation of the current selection. + * + * The return value will not be consistent across nodes or browsers, but + * two identical selections on the same node will return identical objects. + * + * @param {DOMElement} node + * @return {object} + */ + + function getSelection$1(node) { + if ('selectionStart' in node && hasSelectionCapabilities(node)) { + return { + start: node.selectionStart, + end: node.selectionEnd, + }; + } else { + var win = (node.ownerDocument && node.ownerDocument.defaultView) || window; + var selection = win.getSelection(); + return { + anchorNode: selection.anchorNode, + anchorOffset: selection.anchorOffset, + focusNode: selection.focusNode, + focusOffset: selection.focusOffset, + }; + } + } + /** + * Get document associated with the event target. + * + * @param {object} nativeEventTarget + * @return {Document} + */ + + function getEventTargetDocument(eventTarget) { + return eventTarget.window === eventTarget + ? eventTarget.document + : eventTarget.nodeType === DOCUMENT_NODE + ? eventTarget + : eventTarget.ownerDocument; + } + /** + * Poll selection to see whether it's changed. + * + * @param {object} nativeEvent + * @param {object} nativeEventTarget + * @return {?SyntheticEvent} + */ + + function constructSelectEvent(nativeEvent, nativeEventTarget) { + // Ensure we have the right element, and that the user is not dragging a + // selection (this matches native `select` event behavior). In HTML5, select + // fires only on input and textarea thus if there's no focused element we + // won't dispatch. + var doc = getEventTargetDocument(nativeEventTarget); + + if (mouseDown || activeElement$1 == null || activeElement$1 !== getActiveElement(doc)) { + return null; + } // Only fire when selection has actually changed. + + var currentSelection = getSelection$1(activeElement$1); + + if (!lastSelection || !shallowEqual(lastSelection, currentSelection)) { + lastSelection = currentSelection; + var syntheticEvent = SyntheticEvent.getPooled( + eventTypes$4.select, + activeElementInst$1, + nativeEvent, + nativeEventTarget, + ); + syntheticEvent.type = 'select'; + syntheticEvent.target = activeElement$1; + accumulateTwoPhaseDispatches(syntheticEvent); + return syntheticEvent; + } + + return null; + } + /** + * This plugin creates an `onSelect` event that normalizes select events + * across form elements. + * + * Supported elements are: + * - input (see `isTextInputElement`) + * - textarea + * - contentEditable + * + * This differs from native browser implementations in the following ways: + * - Fires on contentEditable fields as well as inputs. + * - Fires for collapsed selection. + * - Fires after user input. + */ + + var SelectEventPlugin = { + eventTypes: eventTypes$4, + extractEvents: function ( + topLevelType, + targetInst, + nativeEvent, + nativeEventTarget, + eventSystemFlags, + ) { + var doc = getEventTargetDocument(nativeEventTarget); // Track whether all listeners exists for this plugin. If none exist, we do + // not extract events. See #3639. + + if (!doc || !isListeningToAllDependencies('onSelect', doc)) { + return null; + } + + var targetNode = targetInst ? getNodeFromInstance$1(targetInst) : window; + + switch (topLevelType) { + // Track the input node that has focus. + case TOP_FOCUS: + if (isTextInputElement(targetNode) || targetNode.contentEditable === 'true') { + activeElement$1 = targetNode; + activeElementInst$1 = targetInst; + lastSelection = null; + } + + break; + + case TOP_BLUR: + activeElement$1 = null; + activeElementInst$1 = null; + lastSelection = null; + break; + // Don't fire the event while the user is dragging. This matches the + // semantics of the native select event. + + case TOP_MOUSE_DOWN: + mouseDown = true; + break; + + case TOP_CONTEXT_MENU: + case TOP_MOUSE_UP: + case TOP_DRAG_END: + mouseDown = false; + return constructSelectEvent(nativeEvent, nativeEventTarget); + // Chrome and IE fire non-standard event when selection is changed (and + // sometimes when it hasn't). IE's event fires out of order with respect + // to key and input events on deletion, so we discard it. + // + // Firefox doesn't support selectionchange, so check selection status + // after each key entry. The selection changes after keydown and before + // keyup, but we check on keydown as well in the case of holding down a + // key, when multiple keydown events are fired but only one keyup is. + // This is also our approach for IE handling, for the reason above. + + case TOP_SELECTION_CHANGE: + if (skipSelectionChangeEvent) { + break; + } + + // falls through + + case TOP_KEY_DOWN: + case TOP_KEY_UP: + return constructSelectEvent(nativeEvent, nativeEventTarget); + } + + return null; + }, + }; + + /** + * Inject modules for resolving DOM hierarchy and plugin ordering. + */ + + injection.injectEventPluginOrder(DOMEventPluginOrder); + setComponentTree(getFiberCurrentPropsFromNode$1, getInstanceFromNode$1, getNodeFromInstance$1); + /** + * Some important event plugins included by default (without having to require + * them). + */ + + injection.injectEventPluginsByName({ + SimpleEventPlugin: SimpleEventPlugin, + EnterLeaveEventPlugin: EnterLeaveEventPlugin, + ChangeEventPlugin: ChangeEventPlugin, + SelectEventPlugin: SelectEventPlugin, + BeforeInputEventPlugin: BeforeInputEventPlugin, + }); + + // Prefix measurements so that it's possible to filter them. + // Longer prefixes are hard to read in DevTools. + var reactEmoji = '\u269B'; + var warningEmoji = '\u26D4'; + var supportsUserTiming = + typeof performance !== 'undefined' && + typeof performance.mark === 'function' && + typeof performance.clearMarks === 'function' && + typeof performance.measure === 'function' && + typeof performance.clearMeasures === 'function'; // Keep track of current fiber so that we know the path to unwind on pause. + // TODO: this looks the same as nextUnitOfWork in scheduler. Can we unify them? + + var currentFiber = null; // If we're in the middle of user code, which fiber and method is it? + // Reusing `currentFiber` would be confusing for this because user code fiber + // can change during commit phase too, but we don't need to unwind it (since + // lifecycles in the commit phase don't resemble a tree). + + var currentPhase = null; + var currentPhaseFiber = null; // Did lifecycle hook schedule an update? This is often a performance problem, + // so we will keep track of it, and include it in the report. + // Track commits caused by cascading updates. + + var isCommitting = false; + var hasScheduledUpdateInCurrentCommit = false; + var hasScheduledUpdateInCurrentPhase = false; + var commitCountInCurrentWorkLoop = 0; + var effectCountInCurrentCommit = 0; + // to avoid stretch the commit phase with measurement overhead. + + var labelsInCurrentCommit = new Set(); + + var formatMarkName = function (markName) { + return reactEmoji + ' ' + markName; + }; + + var formatLabel = function (label, warning) { + var prefix = warning ? warningEmoji + ' ' : reactEmoji + ' '; + var suffix = warning ? ' Warning: ' + warning : ''; + return '' + prefix + label + suffix; + }; + + var beginMark = function (markName) { + performance.mark(formatMarkName(markName)); + }; + + var clearMark = function (markName) { + performance.clearMarks(formatMarkName(markName)); + }; + + var endMark = function (label, markName, warning) { + var formattedMarkName = formatMarkName(markName); + var formattedLabel = formatLabel(label, warning); + + try { + performance.measure(formattedLabel, formattedMarkName); + } catch (err) {} // If previous mark was missing for some reason, this will throw. + // This could only happen if React crashed in an unexpected place earlier. + // Don't pile on with more errors. + // Clear marks immediately to avoid growing buffer. + + performance.clearMarks(formattedMarkName); + performance.clearMeasures(formattedLabel); + }; + + var getFiberMarkName = function (label, debugID) { + return label + ' (#' + debugID + ')'; + }; + + var getFiberLabel = function (componentName, isMounted, phase) { + if (phase === null) { + // These are composite component total time measurements. + return componentName + ' [' + (isMounted ? 'update' : 'mount') + ']'; + } else { + // Composite component methods. + return componentName + '.' + phase; + } + }; + + var beginFiberMark = function (fiber, phase) { + var componentName = getComponentName(fiber.type) || 'Unknown'; + var debugID = fiber._debugID; + var isMounted = fiber.alternate !== null; + var label = getFiberLabel(componentName, isMounted, phase); + + if (isCommitting && labelsInCurrentCommit.has(label)) { + // During the commit phase, we don't show duplicate labels because + // there is a fixed overhead for every measurement, and we don't + // want to stretch the commit phase beyond necessary. + return false; + } + + labelsInCurrentCommit.add(label); + var markName = getFiberMarkName(label, debugID); + beginMark(markName); + return true; + }; + + var clearFiberMark = function (fiber, phase) { + var componentName = getComponentName(fiber.type) || 'Unknown'; + var debugID = fiber._debugID; + var isMounted = fiber.alternate !== null; + var label = getFiberLabel(componentName, isMounted, phase); + var markName = getFiberMarkName(label, debugID); + clearMark(markName); + }; + + var endFiberMark = function (fiber, phase, warning) { + var componentName = getComponentName(fiber.type) || 'Unknown'; + var debugID = fiber._debugID; + var isMounted = fiber.alternate !== null; + var label = getFiberLabel(componentName, isMounted, phase); + var markName = getFiberMarkName(label, debugID); + endMark(label, markName, warning); + }; + + var shouldIgnoreFiber = function (fiber) { + // Host components should be skipped in the timeline. + // We could check typeof fiber.type, but does this work with RN? + switch (fiber.tag) { + case HostRoot: + case HostComponent: + case HostText: + case HostPortal: + case Fragment: + case ContextProvider: + case ContextConsumer: + case Mode: + return true; + + default: + return false; + } + }; + + var clearPendingPhaseMeasurement = function () { + if (currentPhase !== null && currentPhaseFiber !== null) { + clearFiberMark(currentPhaseFiber, currentPhase); + } + + currentPhaseFiber = null; + currentPhase = null; + hasScheduledUpdateInCurrentPhase = false; + }; + + var pauseTimers = function () { + // Stops all currently active measurements so that they can be resumed + // if we continue in a later deferred loop from the same unit of work. + var fiber = currentFiber; + + while (fiber) { + if (fiber._debugIsCurrentlyTiming) { + endFiberMark(fiber, null, null); + } + + fiber = fiber.return; + } + }; + + var resumeTimersRecursively = function (fiber) { + if (fiber.return !== null) { + resumeTimersRecursively(fiber.return); + } + + if (fiber._debugIsCurrentlyTiming) { + beginFiberMark(fiber, null); + } + }; + + var resumeTimers = function () { + // Resumes all measurements that were active during the last deferred loop. + if (currentFiber !== null) { + resumeTimersRecursively(currentFiber); + } + }; + + function recordEffect() { + if (enableUserTimingAPI) { + effectCountInCurrentCommit++; + } + } + function recordScheduleUpdate() { + if (enableUserTimingAPI) { + if (isCommitting) { + hasScheduledUpdateInCurrentCommit = true; + } + + if ( + currentPhase !== null && + currentPhase !== 'componentWillMount' && + currentPhase !== 'componentWillReceiveProps' + ) { + hasScheduledUpdateInCurrentPhase = true; + } + } + } + + function startWorkTimer(fiber) { + if (enableUserTimingAPI) { + if (!supportsUserTiming || shouldIgnoreFiber(fiber)) { + return; + } // If we pause, this is the fiber to unwind from. + + currentFiber = fiber; + + if (!beginFiberMark(fiber, null)) { + return; + } + + fiber._debugIsCurrentlyTiming = true; + } + } + function cancelWorkTimer(fiber) { + if (enableUserTimingAPI) { + if (!supportsUserTiming || shouldIgnoreFiber(fiber)) { + return; + } // Remember we shouldn't complete measurement for this fiber. + // Otherwise flamechart will be deep even for small updates. + + fiber._debugIsCurrentlyTiming = false; + clearFiberMark(fiber, null); + } + } + function stopWorkTimer(fiber) { + if (enableUserTimingAPI) { + if (!supportsUserTiming || shouldIgnoreFiber(fiber)) { + return; + } // If we pause, its parent is the fiber to unwind from. + + currentFiber = fiber.return; + + if (!fiber._debugIsCurrentlyTiming) { + return; + } + + fiber._debugIsCurrentlyTiming = false; + endFiberMark(fiber, null, null); + } + } + function stopFailedWorkTimer(fiber) { + if (enableUserTimingAPI) { + if (!supportsUserTiming || shouldIgnoreFiber(fiber)) { + return; + } // If we pause, its parent is the fiber to unwind from. + + currentFiber = fiber.return; + + if (!fiber._debugIsCurrentlyTiming) { + return; + } + + fiber._debugIsCurrentlyTiming = false; + var warning = + fiber.tag === SuspenseComponent + ? 'Rendering was suspended' + : 'An error was thrown inside this error boundary'; + endFiberMark(fiber, null, warning); + } + } + function startPhaseTimer(fiber, phase) { + if (enableUserTimingAPI) { + if (!supportsUserTiming) { + return; + } + + clearPendingPhaseMeasurement(); + + if (!beginFiberMark(fiber, phase)) { + return; + } + + currentPhaseFiber = fiber; + currentPhase = phase; + } + } + function stopPhaseTimer() { + if (enableUserTimingAPI) { + if (!supportsUserTiming) { + return; + } + + if (currentPhase !== null && currentPhaseFiber !== null) { + var warning = hasScheduledUpdateInCurrentPhase ? 'Scheduled a cascading update' : null; + endFiberMark(currentPhaseFiber, currentPhase, warning); + } + + currentPhase = null; + currentPhaseFiber = null; + } + } + function startWorkLoopTimer(nextUnitOfWork) { + if (enableUserTimingAPI) { + currentFiber = nextUnitOfWork; + + if (!supportsUserTiming) { + return; + } + + commitCountInCurrentWorkLoop = 0; // This is top level call. + // Any other measurements are performed within. + + beginMark('(React Tree Reconciliation)'); // Resume any measurements that were in progress during the last loop. + + resumeTimers(); + } + } + function stopWorkLoopTimer(interruptedBy, didCompleteRoot) { + if (enableUserTimingAPI) { + if (!supportsUserTiming) { + return; + } + + var warning = null; + + if (interruptedBy !== null) { + if (interruptedBy.tag === HostRoot) { + warning = 'A top-level update interrupted the previous render'; + } else { + var componentName = getComponentName(interruptedBy.type) || 'Unknown'; + warning = 'An update to ' + componentName + ' interrupted the previous render'; + } + } else if (commitCountInCurrentWorkLoop > 1) { + warning = 'There were cascading updates'; + } + + commitCountInCurrentWorkLoop = 0; + var label = didCompleteRoot + ? '(React Tree Reconciliation: Completed Root)' + : '(React Tree Reconciliation: Yielded)'; // Pause any measurements until the next loop. + + pauseTimers(); + endMark(label, '(React Tree Reconciliation)', warning); + } + } + function startCommitTimer() { + if (enableUserTimingAPI) { + if (!supportsUserTiming) { + return; + } + + isCommitting = true; + hasScheduledUpdateInCurrentCommit = false; + labelsInCurrentCommit.clear(); + beginMark('(Committing Changes)'); + } + } + function stopCommitTimer() { + if (enableUserTimingAPI) { + if (!supportsUserTiming) { + return; + } + + var warning = null; + + if (hasScheduledUpdateInCurrentCommit) { + warning = 'Lifecycle hook scheduled a cascading update'; + } else if (commitCountInCurrentWorkLoop > 0) { + warning = 'Caused by a cascading update in earlier commit'; + } + + hasScheduledUpdateInCurrentCommit = false; + commitCountInCurrentWorkLoop++; + isCommitting = false; + labelsInCurrentCommit.clear(); + endMark('(Committing Changes)', '(Committing Changes)', warning); + } + } + function startCommitSnapshotEffectsTimer() { + if (enableUserTimingAPI) { + if (!supportsUserTiming) { + return; + } + + effectCountInCurrentCommit = 0; + beginMark('(Committing Snapshot Effects)'); + } + } + function stopCommitSnapshotEffectsTimer() { + if (enableUserTimingAPI) { + if (!supportsUserTiming) { + return; + } + + var count = effectCountInCurrentCommit; + effectCountInCurrentCommit = 0; + endMark( + '(Committing Snapshot Effects: ' + count + ' Total)', + '(Committing Snapshot Effects)', + null, + ); + } + } + function startCommitHostEffectsTimer() { + if (enableUserTimingAPI) { + if (!supportsUserTiming) { + return; + } + + effectCountInCurrentCommit = 0; + beginMark('(Committing Host Effects)'); + } + } + function stopCommitHostEffectsTimer() { + if (enableUserTimingAPI) { + if (!supportsUserTiming) { + return; + } + + var count = effectCountInCurrentCommit; + effectCountInCurrentCommit = 0; + endMark('(Committing Host Effects: ' + count + ' Total)', '(Committing Host Effects)', null); + } + } + function startCommitLifeCyclesTimer() { + if (enableUserTimingAPI) { + if (!supportsUserTiming) { + return; + } + + effectCountInCurrentCommit = 0; + beginMark('(Calling Lifecycle Methods)'); + } + } + function stopCommitLifeCyclesTimer() { + if (enableUserTimingAPI) { + if (!supportsUserTiming) { + return; + } + + var count = effectCountInCurrentCommit; + effectCountInCurrentCommit = 0; + endMark( + '(Calling Lifecycle Methods: ' + count + ' Total)', + '(Calling Lifecycle Methods)', + null, + ); + } + } + + var valueStack = []; + var fiberStack; + + { + fiberStack = []; + } + + var index = -1; + + function createCursor(defaultValue) { + return { + current: defaultValue, + }; + } + + function pop(cursor, fiber) { + if (index < 0) { + { + warningWithoutStack$1(false, 'Unexpected pop.'); + } + + return; + } + + { + if (fiber !== fiberStack[index]) { + warningWithoutStack$1(false, 'Unexpected Fiber popped.'); + } + } + + cursor.current = valueStack[index]; + valueStack[index] = null; + + { + fiberStack[index] = null; + } + + index--; + } + + function push(cursor, value, fiber) { + index++; + valueStack[index] = cursor.current; + + { + fiberStack[index] = fiber; + } + + cursor.current = value; + } + + var warnedAboutMissingGetChildContext; + + { + warnedAboutMissingGetChildContext = {}; + } + + var emptyContextObject = {}; + + { + Object.freeze(emptyContextObject); + } // A cursor to the current merged context object on the stack. + + var contextStackCursor = createCursor(emptyContextObject); // A cursor to a boolean indicating whether the context has changed. + + var didPerformWorkStackCursor = createCursor(false); // Keep track of the previous context object that was on the stack. + // We use this to get access to the parent context after we have already + // pushed the next context provider, and now need to merge their contexts. + + var previousContext = emptyContextObject; + + function getUnmaskedContext(workInProgress, Component, didPushOwnContextIfProvider) { + if (disableLegacyContext) { + return emptyContextObject; + } else { + if (didPushOwnContextIfProvider && isContextProvider(Component)) { + // If the fiber is a context provider itself, when we read its context + // we may have already pushed its own child context on the stack. A context + // provider should not "see" its own child context. Therefore we read the + // previous (parent) context instead for a context provider. + return previousContext; + } + + return contextStackCursor.current; + } + } + + function cacheContext(workInProgress, unmaskedContext, maskedContext) { + if (disableLegacyContext) { + return; + } else { + var instance = workInProgress.stateNode; + instance.__reactInternalMemoizedUnmaskedChildContext = unmaskedContext; + instance.__reactInternalMemoizedMaskedChildContext = maskedContext; + } + } + + function getMaskedContext(workInProgress, unmaskedContext) { + if (disableLegacyContext) { + return emptyContextObject; + } else { + var type = workInProgress.type; + var contextTypes = type.contextTypes; + + if (!contextTypes) { + return emptyContextObject; + } // Avoid recreating masked context unless unmasked context has changed. + // Failing to do this will result in unnecessary calls to componentWillReceiveProps. + // This may trigger infinite loops if componentWillReceiveProps calls setState. + + var instance = workInProgress.stateNode; + + if (instance && instance.__reactInternalMemoizedUnmaskedChildContext === unmaskedContext) { + return instance.__reactInternalMemoizedMaskedChildContext; + } + + var context = {}; + + for (var key in contextTypes) { + context[key] = unmaskedContext[key]; + } + + { + var name = getComponentName(type) || 'Unknown'; + checkPropTypes(contextTypes, context, 'context', name, getCurrentFiberStackInDev); + } // Cache unmasked context so we can avoid recreating masked context unless necessary. + // Context is created before the class component is instantiated so check for instance. + + if (instance) { + cacheContext(workInProgress, unmaskedContext, context); + } + + return context; + } + } + + function hasContextChanged() { + if (disableLegacyContext) { + return false; + } else { + return didPerformWorkStackCursor.current; + } + } + + function isContextProvider(type) { + if (disableLegacyContext) { + return false; + } else { + var childContextTypes = type.childContextTypes; + return childContextTypes !== null && childContextTypes !== undefined; + } + } + + function popContext(fiber) { + if (disableLegacyContext) { + return; + } else { + pop(didPerformWorkStackCursor, fiber); + pop(contextStackCursor, fiber); + } + } + + function popTopLevelContextObject(fiber) { + if (disableLegacyContext) { + return; + } else { + pop(didPerformWorkStackCursor, fiber); + pop(contextStackCursor, fiber); + } + } + + function pushTopLevelContextObject(fiber, context, didChange) { + if (disableLegacyContext) { + return; + } else { + if (!(contextStackCursor.current === emptyContextObject)) { + { + throw Error( + 'Unexpected context found on stack. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + + push(contextStackCursor, context, fiber); + push(didPerformWorkStackCursor, didChange, fiber); + } + } + + function processChildContext(fiber, type, parentContext) { + if (disableLegacyContext) { + return parentContext; + } else { + var instance = fiber.stateNode; + var childContextTypes = type.childContextTypes; // TODO (bvaughn) Replace this behavior with an invariant() in the future. + // It has only been added in Fiber to match the (unintentional) behavior in Stack. + + if (typeof instance.getChildContext !== 'function') { + { + var componentName = getComponentName(type) || 'Unknown'; + + if (!warnedAboutMissingGetChildContext[componentName]) { + warnedAboutMissingGetChildContext[componentName] = true; + warningWithoutStack$1( + false, + '%s.childContextTypes is specified but there is no getChildContext() method ' + + 'on the instance. You can either define getChildContext() on %s or remove ' + + 'childContextTypes from it.', + componentName, + componentName, + ); + } + } + + return parentContext; + } + + var childContext; + + { + setCurrentPhase('getChildContext'); + } + + startPhaseTimer(fiber, 'getChildContext'); + childContext = instance.getChildContext(); + stopPhaseTimer(); + + { + setCurrentPhase(null); + } + + for (var contextKey in childContext) { + if (!(contextKey in childContextTypes)) { + { + throw Error( + (getComponentName(type) || 'Unknown') + + '.getChildContext(): key "' + + contextKey + + '" is not defined in childContextTypes.', + ); + } + } + } + + { + var name = getComponentName(type) || 'Unknown'; + checkPropTypes( + childContextTypes, + childContext, + 'child context', + name, // In practice, there is one case in which we won't get a stack. It's when + // somebody calls unstable_renderSubtreeIntoContainer() and we process + // context from the parent component instance. The stack will be missing + // because it's outside of the reconciliation, and so the pointer has not + // been set. This is rare and doesn't matter. We'll also remove that API. + getCurrentFiberStackInDev, + ); + } + + return _assign({}, parentContext, {}, childContext); + } + } + + function pushContextProvider(workInProgress) { + if (disableLegacyContext) { + return false; + } else { + var instance = workInProgress.stateNode; // We push the context as early as possible to ensure stack integrity. + // If the instance does not exist yet, we will push null at first, + // and replace it on the stack later when invalidating the context. + + var memoizedMergedChildContext = + (instance && instance.__reactInternalMemoizedMergedChildContext) || emptyContextObject; // Remember the parent context so we can merge with it later. + // Inherit the parent's did-perform-work value to avoid inadvertently blocking updates. + + previousContext = contextStackCursor.current; + push(contextStackCursor, memoizedMergedChildContext, workInProgress); + push(didPerformWorkStackCursor, didPerformWorkStackCursor.current, workInProgress); + return true; + } + } + + function invalidateContextProvider(workInProgress, type, didChange) { + if (disableLegacyContext) { + return; + } else { + var instance = workInProgress.stateNode; + + if (!instance) { + { + throw Error( + 'Expected to have an instance by this point. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + + if (didChange) { + // Merge parent and own context. + // Skip this if we're not updating due to sCU. + // This avoids unnecessarily recomputing memoized values. + var mergedContext = processChildContext(workInProgress, type, previousContext); + instance.__reactInternalMemoizedMergedChildContext = mergedContext; // Replace the old (or empty) context with the new one. + // It is important to unwind the context in the reverse order. + + pop(didPerformWorkStackCursor, workInProgress); + pop(contextStackCursor, workInProgress); // Now push the new context and mark that it has changed. + + push(contextStackCursor, mergedContext, workInProgress); + push(didPerformWorkStackCursor, didChange, workInProgress); + } else { + pop(didPerformWorkStackCursor, workInProgress); + push(didPerformWorkStackCursor, didChange, workInProgress); + } + } + } + + function findCurrentUnmaskedContext(fiber) { + if (disableLegacyContext) { + return emptyContextObject; + } else { + // Currently this is only used with renderSubtreeIntoContainer; not sure if it + // makes sense elsewhere + if (!(isFiberMounted(fiber) && fiber.tag === ClassComponent)) { + { + throw Error( + 'Expected subtree parent to be a mounted class component. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + + var node = fiber; + + do { + switch (node.tag) { + case HostRoot: + return node.stateNode.context; + + case ClassComponent: { + var Component = node.type; + + if (isContextProvider(Component)) { + return node.stateNode.__reactInternalMemoizedMergedChildContext; + } + + break; + } + } + + node = node.return; + } while (node !== null); + + { + { + throw Error( + 'Found unexpected detached subtree parent. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + } + } + + var LegacyRoot = 0; + var BlockingRoot = 1; + var ConcurrentRoot = 2; + + // Intentionally not named imports because Rollup would use dynamic dispatch for + // CommonJS interop named imports. + var Scheduler_runWithPriority = Scheduler.unstable_runWithPriority; + var Scheduler_scheduleCallback = Scheduler.unstable_scheduleCallback; + var Scheduler_cancelCallback = Scheduler.unstable_cancelCallback; + var Scheduler_shouldYield = Scheduler.unstable_shouldYield; + var Scheduler_requestPaint = Scheduler.unstable_requestPaint; + var Scheduler_now = Scheduler.unstable_now; + var Scheduler_getCurrentPriorityLevel = Scheduler.unstable_getCurrentPriorityLevel; + var Scheduler_ImmediatePriority = Scheduler.unstable_ImmediatePriority; + var Scheduler_UserBlockingPriority = Scheduler.unstable_UserBlockingPriority; + var Scheduler_NormalPriority = Scheduler.unstable_NormalPriority; + var Scheduler_LowPriority = Scheduler.unstable_LowPriority; + var Scheduler_IdlePriority = Scheduler.unstable_IdlePriority; + + if (enableSchedulerTracing) { + // Provide explicit error message when production+profiling bundle of e.g. + // react-dom is used with production (non-profiling) bundle of + // scheduler/tracing + if (!(tracing.__interactionsRef != null && tracing.__interactionsRef.current != null)) { + { + throw Error( + 'It is not supported to run the profiling version of a renderer (for example, `react-dom/profiling`) without also replacing the `scheduler/tracing` module with `scheduler/tracing-profiling`. Your bundler might have a setting for aliasing both modules. Learn more at http://fb.me/react-profiling', + ); + } + } + } + + var fakeCallbackNode = {}; // Except for NoPriority, these correspond to Scheduler priorities. We use + // ascending numbers so we can compare them like numbers. They start at 90 to + // avoid clashing with Scheduler's priorities. + + var ImmediatePriority = 99; + var UserBlockingPriority$2 = 98; + var NormalPriority = 97; + var LowPriority = 96; + var IdlePriority = 95; // NoPriority is the absence of priority. Also React-only. + + var NoPriority = 90; + var shouldYield = Scheduler_shouldYield; + var requestPaint = Scheduler_requestPaint !== undefined ? Scheduler_requestPaint : function () {}; // Fall back gracefully if we're running an older version of Scheduler. + var syncQueue = null; + var immediateQueueCallbackNode = null; + var isFlushingSyncQueue = false; + var initialTimeMs = Scheduler_now(); // If the initial timestamp is reasonably small, use Scheduler's `now` directly. + // This will be the case for modern browsers that support `performance.now`. In + // older browsers, Scheduler falls back to `Date.now`, which returns a Unix + // timestamp. In that case, subtract the module initialization time to simulate + // the behavior of performance.now and keep our times small enough to fit + // within 32 bits. + // TODO: Consider lifting this into Scheduler. + + var now = + initialTimeMs < 10000 + ? Scheduler_now + : function () { + return Scheduler_now() - initialTimeMs; + }; + function getCurrentPriorityLevel() { + switch (Scheduler_getCurrentPriorityLevel()) { + case Scheduler_ImmediatePriority: + return ImmediatePriority; + + case Scheduler_UserBlockingPriority: + return UserBlockingPriority$2; + + case Scheduler_NormalPriority: + return NormalPriority; + + case Scheduler_LowPriority: + return LowPriority; + + case Scheduler_IdlePriority: + return IdlePriority; + + default: { + { + throw Error('Unknown priority level.'); + } + } + } + } + + function reactPriorityToSchedulerPriority(reactPriorityLevel) { + switch (reactPriorityLevel) { + case ImmediatePriority: + return Scheduler_ImmediatePriority; + + case UserBlockingPriority$2: + return Scheduler_UserBlockingPriority; + + case NormalPriority: + return Scheduler_NormalPriority; + + case LowPriority: + return Scheduler_LowPriority; + + case IdlePriority: + return Scheduler_IdlePriority; + + default: { + { + throw Error('Unknown priority level.'); + } + } + } + } + + function runWithPriority$2(reactPriorityLevel, fn) { + var priorityLevel = reactPriorityToSchedulerPriority(reactPriorityLevel); + return Scheduler_runWithPriority(priorityLevel, fn); + } + function scheduleCallback(reactPriorityLevel, callback, options) { + var priorityLevel = reactPriorityToSchedulerPriority(reactPriorityLevel); + return Scheduler_scheduleCallback(priorityLevel, callback, options); + } + function scheduleSyncCallback(callback) { + // Push this callback into an internal queue. We'll flush these either in + // the next tick, or earlier if something calls `flushSyncCallbackQueue`. + if (syncQueue === null) { + syncQueue = [callback]; // Flush the queue in the next tick, at the earliest. + + immediateQueueCallbackNode = Scheduler_scheduleCallback( + Scheduler_ImmediatePriority, + flushSyncCallbackQueueImpl, + ); + } else { + // Push onto existing queue. Don't need to schedule a callback because + // we already scheduled one when we created the queue. + syncQueue.push(callback); + } + + return fakeCallbackNode; + } + function cancelCallback(callbackNode) { + if (callbackNode !== fakeCallbackNode) { + Scheduler_cancelCallback(callbackNode); + } + } + function flushSyncCallbackQueue() { + if (immediateQueueCallbackNode !== null) { + var node = immediateQueueCallbackNode; + immediateQueueCallbackNode = null; + Scheduler_cancelCallback(node); + } + + flushSyncCallbackQueueImpl(); + } + + function flushSyncCallbackQueueImpl() { + if (!isFlushingSyncQueue && syncQueue !== null) { + // Prevent re-entrancy. + isFlushingSyncQueue = true; + var i = 0; + + try { + var _isSync = true; + var queue = syncQueue; + runWithPriority$2(ImmediatePriority, function () { + for (; i < queue.length; i++) { + var callback = queue[i]; + + do { + callback = callback(_isSync); + } while (callback !== null); + } + }); + syncQueue = null; + } catch (error) { + // If something throws, leave the remaining callbacks on the queue. + if (syncQueue !== null) { + syncQueue = syncQueue.slice(i + 1); + } // Resume flushing in the next tick + + Scheduler_scheduleCallback(Scheduler_ImmediatePriority, flushSyncCallbackQueue); + throw error; + } finally { + isFlushingSyncQueue = false; + } + } + } + + var NoMode = 0; + var StrictMode = 1; // TODO: Remove BlockingMode and ConcurrentMode by reading from the root + // tag instead + + var BlockingMode = 2; + var ConcurrentMode = 4; + var ProfileMode = 8; + + // Max 31 bit integer. The max integer size in V8 for 32-bit systems. + // Math.pow(2, 30) - 1 + // 0b111111111111111111111111111111 + var MAX_SIGNED_31_BIT_INT = 1073741823; + + var NoWork = 0; // TODO: Think of a better name for Never. The key difference with Idle is that + // Never work can be committed in an inconsistent state without tearing the UI. + // The main example is offscreen content, like a hidden subtree. So one possible + // name is Offscreen. However, it also includes dehydrated Suspense boundaries, + // which are inconsistent in the sense that they haven't finished yet, but + // aren't visibly inconsistent because the server rendered HTML matches what the + // hydrated tree would look like. + + var Never = 1; // Idle is slightly higher priority than Never. It must completely finish in + // order to be consistent. + + var Idle = 2; // Continuous Hydration is a moving priority. It is slightly higher than Idle + // and is used to increase priority of hover targets. It is increasing with + // each usage so that last always wins. + + var ContinuousHydration = 3; + var Sync = MAX_SIGNED_31_BIT_INT; + var Batched = Sync - 1; + var UNIT_SIZE = 10; + var MAGIC_NUMBER_OFFSET = Batched - 1; // 1 unit of expiration time represents 10ms. + + function msToExpirationTime(ms) { + // Always add an offset so that we don't clash with the magic number for NoWork. + return MAGIC_NUMBER_OFFSET - ((ms / UNIT_SIZE) | 0); + } + function expirationTimeToMs(expirationTime) { + return (MAGIC_NUMBER_OFFSET - expirationTime) * UNIT_SIZE; + } + + function ceiling(num, precision) { + return (((num / precision) | 0) + 1) * precision; + } + + function computeExpirationBucket(currentTime, expirationInMs, bucketSizeMs) { + return ( + MAGIC_NUMBER_OFFSET - + ceiling( + MAGIC_NUMBER_OFFSET - currentTime + expirationInMs / UNIT_SIZE, + bucketSizeMs / UNIT_SIZE, + ) + ); + } // TODO: This corresponds to Scheduler's NormalPriority, not LowPriority. Update + // the names to reflect. + + var LOW_PRIORITY_EXPIRATION = 5000; + var LOW_PRIORITY_BATCH_SIZE = 250; + function computeAsyncExpiration(currentTime) { + return computeExpirationBucket(currentTime, LOW_PRIORITY_EXPIRATION, LOW_PRIORITY_BATCH_SIZE); + } + function computeSuspenseExpiration(currentTime, timeoutMs) { + // TODO: Should we warn if timeoutMs is lower than the normal pri expiration time? + return computeExpirationBucket(currentTime, timeoutMs, LOW_PRIORITY_BATCH_SIZE); + } // We intentionally set a higher expiration time for interactive updates in + // dev than in production. + // + // If the main thread is being blocked so long that you hit the expiration, + // it's a problem that could be solved with better scheduling. + // + // People will be more likely to notice this and fix it with the long + // expiration time in development. + // + // In production we opt for better UX at the risk of masking scheduling + // problems, by expiring fast. + + var HIGH_PRIORITY_EXPIRATION = 500; + var HIGH_PRIORITY_BATCH_SIZE = 100; + function computeInteractiveExpiration(currentTime) { + return computeExpirationBucket(currentTime, HIGH_PRIORITY_EXPIRATION, HIGH_PRIORITY_BATCH_SIZE); + } + function computeContinuousHydrationExpiration(currentTime) { + // Each time we ask for a new one of these we increase the priority. + // This ensures that the last one always wins since we can't deprioritize + // once we've scheduled work already. + return ContinuousHydration++; + } + function inferPriorityFromExpirationTime(currentTime, expirationTime) { + if (expirationTime === Sync) { + return ImmediatePriority; + } + + if (expirationTime === Never || expirationTime === Idle) { + return IdlePriority; + } + + var msUntil = expirationTimeToMs(expirationTime) - expirationTimeToMs(currentTime); + + if (msUntil <= 0) { + return ImmediatePriority; + } + + if (msUntil <= HIGH_PRIORITY_EXPIRATION + HIGH_PRIORITY_BATCH_SIZE) { + return UserBlockingPriority$2; + } + + if (msUntil <= LOW_PRIORITY_EXPIRATION + LOW_PRIORITY_BATCH_SIZE) { + return NormalPriority; + } // TODO: Handle LowPriority + // Assume anything lower has idle priority + + return IdlePriority; + } + + /** + * Forked from fbjs/warning: + * https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js + * + * Only change is we use console.warn instead of console.error, + * and do nothing when 'console' is not supported. + * This really simplifies the code. + * --- + * Similar to invariant but only logs a warning if the condition is not met. + * This can be used to log issues in development environments in critical + * paths. Removing the logging code for production environments will keep the + * same logic and follow the same code paths. + */ + var lowPriorityWarningWithoutStack = function () {}; + + { + var printWarning = function (format) { + for ( + var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; + _key < _len; + _key++ + ) { + args[_key - 1] = arguments[_key]; + } + + var argIndex = 0; + var message = + 'Warning: ' + + format.replace(/%s/g, function () { + return args[argIndex++]; + }); + + if (typeof console !== 'undefined') { + console.warn(message); + } + + try { + // --- Welcome to debugging React --- + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + throw new Error(message); + } catch (x) {} + }; + + lowPriorityWarningWithoutStack = function (condition, format) { + if (format === undefined) { + throw new Error( + '`lowPriorityWarningWithoutStack(condition, format, ...args)` requires a warning ' + + 'message argument', + ); + } + + if (!condition) { + for ( + var _len2 = arguments.length, args = new Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; + _key2 < _len2; + _key2++ + ) { + args[_key2 - 2] = arguments[_key2]; + } + + printWarning.apply(void 0, [format].concat(args)); + } + }; + } + + var lowPriorityWarningWithoutStack$1 = lowPriorityWarningWithoutStack; + + var ReactStrictModeWarnings = { + recordUnsafeLifecycleWarnings: function (fiber, instance) {}, + flushPendingUnsafeLifecycleWarnings: function () {}, + recordLegacyContextWarning: function (fiber, instance) {}, + flushLegacyContextWarning: function () {}, + discardPendingWarnings: function () {}, + }; + + { + var findStrictRoot = function (fiber) { + var maybeStrictRoot = null; + var node = fiber; + + while (node !== null) { + if (node.mode & StrictMode) { + maybeStrictRoot = node; + } + + node = node.return; + } + + return maybeStrictRoot; + }; + + var setToSortedString = function (set) { + var array = []; + set.forEach(function (value) { + array.push(value); + }); + return array.sort().join(', '); + }; + + var pendingComponentWillMountWarnings = []; + var pendingUNSAFE_ComponentWillMountWarnings = []; + var pendingComponentWillReceivePropsWarnings = []; + var pendingUNSAFE_ComponentWillReceivePropsWarnings = []; + var pendingComponentWillUpdateWarnings = []; + var pendingUNSAFE_ComponentWillUpdateWarnings = []; // Tracks components we have already warned about. + + var didWarnAboutUnsafeLifecycles = new Set(); + + ReactStrictModeWarnings.recordUnsafeLifecycleWarnings = function (fiber, instance) { + // Dedup strategy: Warn once per component. + if (didWarnAboutUnsafeLifecycles.has(fiber.type)) { + return; + } + + if ( + typeof instance.componentWillMount === 'function' && // Don't warn about react-lifecycles-compat polyfilled components. + instance.componentWillMount.__suppressDeprecationWarning !== true + ) { + pendingComponentWillMountWarnings.push(fiber); + } + + if (fiber.mode & StrictMode && typeof instance.UNSAFE_componentWillMount === 'function') { + pendingUNSAFE_ComponentWillMountWarnings.push(fiber); + } + + if ( + typeof instance.componentWillReceiveProps === 'function' && + instance.componentWillReceiveProps.__suppressDeprecationWarning !== true + ) { + pendingComponentWillReceivePropsWarnings.push(fiber); + } + + if ( + fiber.mode & StrictMode && + typeof instance.UNSAFE_componentWillReceiveProps === 'function' + ) { + pendingUNSAFE_ComponentWillReceivePropsWarnings.push(fiber); + } + + if ( + typeof instance.componentWillUpdate === 'function' && + instance.componentWillUpdate.__suppressDeprecationWarning !== true + ) { + pendingComponentWillUpdateWarnings.push(fiber); + } + + if (fiber.mode & StrictMode && typeof instance.UNSAFE_componentWillUpdate === 'function') { + pendingUNSAFE_ComponentWillUpdateWarnings.push(fiber); + } + }; + + ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings = function () { + // We do an initial pass to gather component names + var componentWillMountUniqueNames = new Set(); + + if (pendingComponentWillMountWarnings.length > 0) { + pendingComponentWillMountWarnings.forEach(function (fiber) { + componentWillMountUniqueNames.add(getComponentName(fiber.type) || 'Component'); + didWarnAboutUnsafeLifecycles.add(fiber.type); + }); + pendingComponentWillMountWarnings = []; + } + + var UNSAFE_componentWillMountUniqueNames = new Set(); + + if (pendingUNSAFE_ComponentWillMountWarnings.length > 0) { + pendingUNSAFE_ComponentWillMountWarnings.forEach(function (fiber) { + UNSAFE_componentWillMountUniqueNames.add(getComponentName(fiber.type) || 'Component'); + didWarnAboutUnsafeLifecycles.add(fiber.type); + }); + pendingUNSAFE_ComponentWillMountWarnings = []; + } + + var componentWillReceivePropsUniqueNames = new Set(); + + if (pendingComponentWillReceivePropsWarnings.length > 0) { + pendingComponentWillReceivePropsWarnings.forEach(function (fiber) { + componentWillReceivePropsUniqueNames.add(getComponentName(fiber.type) || 'Component'); + didWarnAboutUnsafeLifecycles.add(fiber.type); + }); + pendingComponentWillReceivePropsWarnings = []; + } + + var UNSAFE_componentWillReceivePropsUniqueNames = new Set(); + + if (pendingUNSAFE_ComponentWillReceivePropsWarnings.length > 0) { + pendingUNSAFE_ComponentWillReceivePropsWarnings.forEach(function (fiber) { + UNSAFE_componentWillReceivePropsUniqueNames.add( + getComponentName(fiber.type) || 'Component', + ); + didWarnAboutUnsafeLifecycles.add(fiber.type); + }); + pendingUNSAFE_ComponentWillReceivePropsWarnings = []; + } + + var componentWillUpdateUniqueNames = new Set(); + + if (pendingComponentWillUpdateWarnings.length > 0) { + pendingComponentWillUpdateWarnings.forEach(function (fiber) { + componentWillUpdateUniqueNames.add(getComponentName(fiber.type) || 'Component'); + didWarnAboutUnsafeLifecycles.add(fiber.type); + }); + pendingComponentWillUpdateWarnings = []; + } + + var UNSAFE_componentWillUpdateUniqueNames = new Set(); + + if (pendingUNSAFE_ComponentWillUpdateWarnings.length > 0) { + pendingUNSAFE_ComponentWillUpdateWarnings.forEach(function (fiber) { + UNSAFE_componentWillUpdateUniqueNames.add(getComponentName(fiber.type) || 'Component'); + didWarnAboutUnsafeLifecycles.add(fiber.type); + }); + pendingUNSAFE_ComponentWillUpdateWarnings = []; + } // Finally, we flush all the warnings + // UNSAFE_ ones before the deprecated ones, since they'll be 'louder' + + if (UNSAFE_componentWillMountUniqueNames.size > 0) { + var sortedNames = setToSortedString(UNSAFE_componentWillMountUniqueNames); + warningWithoutStack$1( + false, + 'Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. ' + + 'See https://fb.me/react-unsafe-component-lifecycles for details.\n\n' + + '* Move code with side effects to componentDidMount, and set initial state in the constructor.\n' + + '\nPlease update the following components: %s', + sortedNames, + ); + } + + if (UNSAFE_componentWillReceivePropsUniqueNames.size > 0) { + var _sortedNames = setToSortedString(UNSAFE_componentWillReceivePropsUniqueNames); + + warningWithoutStack$1( + false, + 'Using UNSAFE_componentWillReceiveProps in strict mode is not recommended ' + + 'and may indicate bugs in your code. ' + + 'See https://fb.me/react-unsafe-component-lifecycles for details.\n\n' + + '* Move data fetching code or side effects to componentDidUpdate.\n' + + "* If you're updating state whenever props change, " + + 'refactor your code to use memoization techniques or move it to ' + + 'static getDerivedStateFromProps. Learn more at: https://fb.me/react-derived-state\n' + + '\nPlease update the following components: %s', + _sortedNames, + ); + } + + if (UNSAFE_componentWillUpdateUniqueNames.size > 0) { + var _sortedNames2 = setToSortedString(UNSAFE_componentWillUpdateUniqueNames); + + warningWithoutStack$1( + false, + 'Using UNSAFE_componentWillUpdate in strict mode is not recommended ' + + 'and may indicate bugs in your code. ' + + 'See https://fb.me/react-unsafe-component-lifecycles for details.\n\n' + + '* Move data fetching code or side effects to componentDidUpdate.\n' + + '\nPlease update the following components: %s', + _sortedNames2, + ); + } + + if (componentWillMountUniqueNames.size > 0) { + var _sortedNames3 = setToSortedString(componentWillMountUniqueNames); + + lowPriorityWarningWithoutStack$1( + false, + 'componentWillMount has been renamed, and is not recommended for use. ' + + 'See https://fb.me/react-unsafe-component-lifecycles for details.\n\n' + + '* Move code with side effects to componentDidMount, and set initial state in the constructor.\n' + + '* Rename componentWillMount to UNSAFE_componentWillMount to suppress ' + + 'this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. ' + + 'To rename all deprecated lifecycles to their new names, you can run ' + + '`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n' + + '\nPlease update the following components: %s', + _sortedNames3, + ); + } + + if (componentWillReceivePropsUniqueNames.size > 0) { + var _sortedNames4 = setToSortedString(componentWillReceivePropsUniqueNames); + + lowPriorityWarningWithoutStack$1( + false, + 'componentWillReceiveProps has been renamed, and is not recommended for use. ' + + 'See https://fb.me/react-unsafe-component-lifecycles for details.\n\n' + + '* Move data fetching code or side effects to componentDidUpdate.\n' + + "* If you're updating state whenever props change, refactor your " + + 'code to use memoization techniques or move it to ' + + 'static getDerivedStateFromProps. Learn more at: https://fb.me/react-derived-state\n' + + '* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress ' + + 'this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. ' + + 'To rename all deprecated lifecycles to their new names, you can run ' + + '`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n' + + '\nPlease update the following components: %s', + _sortedNames4, + ); + } + + if (componentWillUpdateUniqueNames.size > 0) { + var _sortedNames5 = setToSortedString(componentWillUpdateUniqueNames); + + lowPriorityWarningWithoutStack$1( + false, + 'componentWillUpdate has been renamed, and is not recommended for use. ' + + 'See https://fb.me/react-unsafe-component-lifecycles for details.\n\n' + + '* Move data fetching code or side effects to componentDidUpdate.\n' + + '* Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress ' + + 'this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. ' + + 'To rename all deprecated lifecycles to their new names, you can run ' + + '`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n' + + '\nPlease update the following components: %s', + _sortedNames5, + ); + } + }; + + var pendingLegacyContextWarning = new Map(); // Tracks components we have already warned about. + + var didWarnAboutLegacyContext = new Set(); + + ReactStrictModeWarnings.recordLegacyContextWarning = function (fiber, instance) { + var strictRoot = findStrictRoot(fiber); + + if (strictRoot === null) { + warningWithoutStack$1( + false, + 'Expected to find a StrictMode component in a strict mode tree. ' + + 'This error is likely caused by a bug in React. Please file an issue.', + ); + return; + } // Dedup strategy: Warn once per component. + + if (didWarnAboutLegacyContext.has(fiber.type)) { + return; + } + + var warningsForRoot = pendingLegacyContextWarning.get(strictRoot); + + if ( + fiber.type.contextTypes != null || + fiber.type.childContextTypes != null || + (instance !== null && typeof instance.getChildContext === 'function') + ) { + if (warningsForRoot === undefined) { + warningsForRoot = []; + pendingLegacyContextWarning.set(strictRoot, warningsForRoot); + } + + warningsForRoot.push(fiber); + } + }; + + ReactStrictModeWarnings.flushLegacyContextWarning = function () { + pendingLegacyContextWarning.forEach(function (fiberArray, strictRoot) { + var uniqueNames = new Set(); + fiberArray.forEach(function (fiber) { + uniqueNames.add(getComponentName(fiber.type) || 'Component'); + didWarnAboutLegacyContext.add(fiber.type); + }); + var sortedNames = setToSortedString(uniqueNames); + var strictRootComponentStack = getStackByFiberInDevAndProd(strictRoot); + warningWithoutStack$1( + false, + 'Legacy context API has been detected within a strict-mode tree.' + + '\n\nThe old API will be supported in all 16.x releases, but applications ' + + 'using it should migrate to the new version.' + + '\n\nPlease update the following components: %s' + + '\n\nLearn more about this warning here: https://fb.me/react-legacy-context' + + '%s', + sortedNames, + strictRootComponentStack, + ); + }); + }; + + ReactStrictModeWarnings.discardPendingWarnings = function () { + pendingComponentWillMountWarnings = []; + pendingUNSAFE_ComponentWillMountWarnings = []; + pendingComponentWillReceivePropsWarnings = []; + pendingUNSAFE_ComponentWillReceivePropsWarnings = []; + pendingComponentWillUpdateWarnings = []; + pendingUNSAFE_ComponentWillUpdateWarnings = []; + pendingLegacyContextWarning = new Map(); + }; + } + + var resolveFamily = null; // $FlowFixMe Flow gets confused by a WeakSet feature check below. + + var failedBoundaries = null; + var setRefreshHandler = function (handler) { + { + resolveFamily = handler; + } + }; + function resolveFunctionForHotReloading(type) { + { + if (resolveFamily === null) { + // Hot reloading is disabled. + return type; + } + + var family = resolveFamily(type); + + if (family === undefined) { + return type; + } // Use the latest known implementation. + + return family.current; + } + } + function resolveClassForHotReloading(type) { + // No implementation differences. + return resolveFunctionForHotReloading(type); + } + function resolveForwardRefForHotReloading(type) { + { + if (resolveFamily === null) { + // Hot reloading is disabled. + return type; + } + + var family = resolveFamily(type); + + if (family === undefined) { + // Check if we're dealing with a real forwardRef. Don't want to crash early. + if (type !== null && type !== undefined && typeof type.render === 'function') { + // ForwardRef is special because its resolved .type is an object, + // but it's possible that we only have its inner render function in the map. + // If that inner render function is different, we'll build a new forwardRef type. + var currentRender = resolveFunctionForHotReloading(type.render); + + if (type.render !== currentRender) { + var syntheticType = { + $$typeof: REACT_FORWARD_REF_TYPE, + render: currentRender, + }; + + if (type.displayName !== undefined) { + syntheticType.displayName = type.displayName; + } + + return syntheticType; + } + } + + return type; + } // Use the latest known implementation. + + return family.current; + } + } + function isCompatibleFamilyForHotReloading(fiber, element) { + { + if (resolveFamily === null) { + // Hot reloading is disabled. + return false; + } + + var prevType = fiber.elementType; + var nextType = element.type; // If we got here, we know types aren't === equal. + + var needsCompareFamilies = false; + var $$typeofNextType = + typeof nextType === 'object' && nextType !== null ? nextType.$$typeof : null; + + switch (fiber.tag) { + case ClassComponent: { + if (typeof nextType === 'function') { + needsCompareFamilies = true; + } + + break; + } + + case FunctionComponent: { + if (typeof nextType === 'function') { + needsCompareFamilies = true; + } else if ($$typeofNextType === REACT_LAZY_TYPE) { + // We don't know the inner type yet. + // We're going to assume that the lazy inner type is stable, + // and so it is sufficient to avoid reconciling it away. + // We're not going to unwrap or actually use the new lazy type. + needsCompareFamilies = true; + } + + break; + } + + case ForwardRef: { + if ($$typeofNextType === REACT_FORWARD_REF_TYPE) { + needsCompareFamilies = true; + } else if ($$typeofNextType === REACT_LAZY_TYPE) { + needsCompareFamilies = true; + } + + break; + } + + case MemoComponent: + case SimpleMemoComponent: { + if ($$typeofNextType === REACT_MEMO_TYPE) { + // TODO: if it was but can no longer be simple, + // we shouldn't set this. + needsCompareFamilies = true; + } else if ($$typeofNextType === REACT_LAZY_TYPE) { + needsCompareFamilies = true; + } + + break; + } + + default: + return false; + } // Check if both types have a family and it's the same one. + + if (needsCompareFamilies) { + // Note: memo() and forwardRef() we'll compare outer rather than inner type. + // This means both of them need to be registered to preserve state. + // If we unwrapped and compared the inner types for wrappers instead, + // then we would risk falsely saying two separate memo(Foo) + // calls are equivalent because they wrap the same Foo function. + var prevFamily = resolveFamily(prevType); + + if (prevFamily !== undefined && prevFamily === resolveFamily(nextType)) { + return true; + } + } + + return false; + } + } + function markFailedErrorBoundaryForHotReloading(fiber) { + { + if (resolveFamily === null) { + // Hot reloading is disabled. + return; + } + + if (typeof WeakSet !== 'function') { + return; + } + + if (failedBoundaries === null) { + failedBoundaries = new WeakSet(); + } + + failedBoundaries.add(fiber); + } + } + var scheduleRefresh = function (root, update) { + { + if (resolveFamily === null) { + // Hot reloading is disabled. + return; + } + + var staleFamilies = update.staleFamilies, + updatedFamilies = update.updatedFamilies; + flushPassiveEffects(); + flushSync(function () { + scheduleFibersWithFamiliesRecursively(root.current, updatedFamilies, staleFamilies); + }); + } + }; + var scheduleRoot = function (root, element) { + { + if (root.context !== emptyContextObject) { + // Super edge case: root has a legacy _renderSubtree context + // but we don't know the parentComponent so we can't pass it. + // Just ignore. We'll delete this with _renderSubtree code path later. + return; + } + + flushPassiveEffects(); + syncUpdates(function () { + updateContainer(element, root, null, null); + }); + } + }; + + function scheduleFibersWithFamiliesRecursively(fiber, updatedFamilies, staleFamilies) { + { + var alternate = fiber.alternate, + child = fiber.child, + sibling = fiber.sibling, + tag = fiber.tag, + type = fiber.type; + var candidateType = null; + + switch (tag) { + case FunctionComponent: + case SimpleMemoComponent: + case ClassComponent: + candidateType = type; + break; + + case ForwardRef: + candidateType = type.render; + break; + + default: + break; + } + + if (resolveFamily === null) { + throw new Error('Expected resolveFamily to be set during hot reload.'); + } + + var needsRender = false; + var needsRemount = false; + + if (candidateType !== null) { + var family = resolveFamily(candidateType); + + if (family !== undefined) { + if (staleFamilies.has(family)) { + needsRemount = true; + } else if (updatedFamilies.has(family)) { + if (tag === ClassComponent) { + needsRemount = true; + } else { + needsRender = true; + } + } + } + } + + if (failedBoundaries !== null) { + if (failedBoundaries.has(fiber) || (alternate !== null && failedBoundaries.has(alternate))) { + needsRemount = true; + } + } + + if (needsRemount) { + fiber._debugNeedsRemount = true; + } + + if (needsRemount || needsRender) { + scheduleWork(fiber, Sync); + } + + if (child !== null && !needsRemount) { + scheduleFibersWithFamiliesRecursively(child, updatedFamilies, staleFamilies); + } + + if (sibling !== null) { + scheduleFibersWithFamiliesRecursively(sibling, updatedFamilies, staleFamilies); + } + } + } + + var findHostInstancesForRefresh = function (root, families) { + { + var hostInstances = new Set(); + var types = new Set( + families.map(function (family) { + return family.current; + }), + ); + findHostInstancesForMatchingFibersRecursively(root.current, types, hostInstances); + return hostInstances; + } + }; + + function findHostInstancesForMatchingFibersRecursively(fiber, types, hostInstances) { + { + var child = fiber.child, + sibling = fiber.sibling, + tag = fiber.tag, + type = fiber.type; + var candidateType = null; + + switch (tag) { + case FunctionComponent: + case SimpleMemoComponent: + case ClassComponent: + candidateType = type; + break; + + case ForwardRef: + candidateType = type.render; + break; + + default: + break; + } + + var didMatch = false; + + if (candidateType !== null) { + if (types.has(candidateType)) { + didMatch = true; + } + } + + if (didMatch) { + // We have a match. This only drills down to the closest host components. + // There's no need to search deeper because for the purpose of giving + // visual feedback, "flashing" outermost parent rectangles is sufficient. + findHostInstancesForFiberShallowly(fiber, hostInstances); + } else { + // If there's no match, maybe there will be one further down in the child tree. + if (child !== null) { + findHostInstancesForMatchingFibersRecursively(child, types, hostInstances); + } + } + + if (sibling !== null) { + findHostInstancesForMatchingFibersRecursively(sibling, types, hostInstances); + } + } + } + + function findHostInstancesForFiberShallowly(fiber, hostInstances) { + { + var foundHostInstances = findChildHostInstancesForFiberShallowly(fiber, hostInstances); + + if (foundHostInstances) { + return; + } // If we didn't find any host children, fallback to closest host parent. + + var node = fiber; + + while (true) { + switch (node.tag) { + case HostComponent: + hostInstances.add(node.stateNode); + return; + + case HostPortal: + hostInstances.add(node.stateNode.containerInfo); + return; + + case HostRoot: + hostInstances.add(node.stateNode.containerInfo); + return; + } + + if (node.return === null) { + throw new Error('Expected to reach root first.'); + } + + node = node.return; + } + } + } + + function findChildHostInstancesForFiberShallowly(fiber, hostInstances) { + { + var node = fiber; + var foundHostInstances = false; + + while (true) { + if (node.tag === HostComponent) { + // We got a match. + foundHostInstances = true; + hostInstances.add(node.stateNode); // There may still be more, so keep searching. + } else if (node.child !== null) { + node.child.return = node; + node = node.child; + continue; + } + + if (node === fiber) { + return foundHostInstances; + } + + while (node.sibling === null) { + if (node.return === null || node.return === fiber) { + return foundHostInstances; + } + + node = node.return; + } + + node.sibling.return = node.return; + node = node.sibling; + } + } + + return false; + } + + function resolveDefaultProps(Component, baseProps) { + if (Component && Component.defaultProps) { + // Resolve default props. Taken from ReactElement + var props = _assign({}, baseProps); + + var defaultProps = Component.defaultProps; + + for (var propName in defaultProps) { + if (props[propName] === undefined) { + props[propName] = defaultProps[propName]; + } + } + + return props; + } + + return baseProps; + } + function readLazyComponentType(lazyComponent) { + initializeLazyComponentType(lazyComponent); + + if (lazyComponent._status !== Resolved) { + throw lazyComponent._result; + } + + return lazyComponent._result; + } + + var valueCursor = createCursor(null); + var rendererSigil; + + { + // Use this to detect multiple renderers using the same context + rendererSigil = {}; + } + + var currentlyRenderingFiber = null; + var lastContextDependency = null; + var lastContextWithAllBitsObserved = null; + var isDisallowedContextReadInDEV = false; + function resetContextDependencies() { + // This is called right before React yields execution, to ensure `readContext` + // cannot be called outside the render phase. + currentlyRenderingFiber = null; + lastContextDependency = null; + lastContextWithAllBitsObserved = null; + + { + isDisallowedContextReadInDEV = false; + } + } + function enterDisallowedContextReadInDEV() { + { + isDisallowedContextReadInDEV = true; + } + } + function exitDisallowedContextReadInDEV() { + { + isDisallowedContextReadInDEV = false; + } + } + function pushProvider(providerFiber, nextValue) { + var context = providerFiber.type._context; + + if (isPrimaryRenderer) { + push(valueCursor, context._currentValue, providerFiber); + context._currentValue = nextValue; + + { + !( + context._currentRenderer === undefined || + context._currentRenderer === null || + context._currentRenderer === rendererSigil + ) + ? warningWithoutStack$1( + false, + 'Detected multiple renderers concurrently rendering the ' + + 'same context provider. This is currently unsupported.', + ) + : void 0; + context._currentRenderer = rendererSigil; + } + } else { + push(valueCursor, context._currentValue2, providerFiber); + context._currentValue2 = nextValue; + + { + !( + context._currentRenderer2 === undefined || + context._currentRenderer2 === null || + context._currentRenderer2 === rendererSigil + ) + ? warningWithoutStack$1( + false, + 'Detected multiple renderers concurrently rendering the ' + + 'same context provider. This is currently unsupported.', + ) + : void 0; + context._currentRenderer2 = rendererSigil; + } + } + } + function popProvider(providerFiber) { + var currentValue = valueCursor.current; + pop(valueCursor, providerFiber); + var context = providerFiber.type._context; + + if (isPrimaryRenderer) { + context._currentValue = currentValue; + } else { + context._currentValue2 = currentValue; + } + } + function calculateChangedBits(context, newValue, oldValue) { + if (is$1(oldValue, newValue)) { + // No change + return 0; + } else { + var changedBits = + typeof context._calculateChangedBits === 'function' + ? context._calculateChangedBits(oldValue, newValue) + : MAX_SIGNED_31_BIT_INT; + + { + !((changedBits & MAX_SIGNED_31_BIT_INT) === changedBits) + ? warning$1( + false, + 'calculateChangedBits: Expected the return value to be a ' + + '31-bit integer. Instead received: %s', + changedBits, + ) + : void 0; + } + + return changedBits | 0; + } + } + function scheduleWorkOnParentPath(parent, renderExpirationTime) { + // Update the child expiration time of all the ancestors, including + // the alternates. + var node = parent; + + while (node !== null) { + var alternate = node.alternate; + + if (node.childExpirationTime < renderExpirationTime) { + node.childExpirationTime = renderExpirationTime; + + if (alternate !== null && alternate.childExpirationTime < renderExpirationTime) { + alternate.childExpirationTime = renderExpirationTime; + } + } else if (alternate !== null && alternate.childExpirationTime < renderExpirationTime) { + alternate.childExpirationTime = renderExpirationTime; + } else { + // Neither alternate was updated, which means the rest of the + // ancestor path already has sufficient priority. + break; + } + + node = node.return; + } + } + function propagateContextChange(workInProgress, context, changedBits, renderExpirationTime) { + var fiber = workInProgress.child; + + if (fiber !== null) { + // Set the return pointer of the child to the work-in-progress fiber. + fiber.return = workInProgress; + } + + while (fiber !== null) { + var nextFiber = void 0; // Visit this fiber. + + var list = fiber.dependencies; + + if (list !== null) { + nextFiber = fiber.child; + var dependency = list.firstContext; + + while (dependency !== null) { + // Check if the context matches. + if (dependency.context === context && (dependency.observedBits & changedBits) !== 0) { + // Match! Schedule an update on this fiber. + if (fiber.tag === ClassComponent) { + // Schedule a force update on the work-in-progress. + var update = createUpdate(renderExpirationTime, null); + update.tag = ForceUpdate; // TODO: Because we don't have a work-in-progress, this will add the + // update to the current fiber, too, which means it will persist even if + // this render is thrown away. Since it's a race condition, not sure it's + // worth fixing. + + enqueueUpdate(fiber, update); + } + + if (fiber.expirationTime < renderExpirationTime) { + fiber.expirationTime = renderExpirationTime; + } + + var alternate = fiber.alternate; + + if (alternate !== null && alternate.expirationTime < renderExpirationTime) { + alternate.expirationTime = renderExpirationTime; + } + + scheduleWorkOnParentPath(fiber.return, renderExpirationTime); // Mark the expiration time on the list, too. + + if (list.expirationTime < renderExpirationTime) { + list.expirationTime = renderExpirationTime; + } // Since we already found a match, we can stop traversing the + // dependency list. + + break; + } + + dependency = dependency.next; + } + } else if (fiber.tag === ContextProvider) { + // Don't scan deeper if this is a matching provider + nextFiber = fiber.type === workInProgress.type ? null : fiber.child; + } else if (enableSuspenseServerRenderer && fiber.tag === DehydratedFragment) { + // If a dehydrated suspense bounudary is in this subtree, we don't know + // if it will have any context consumers in it. The best we can do is + // mark it as having updates. + var parentSuspense = fiber.return; + + if (!(parentSuspense !== null)) { + { + throw Error( + 'We just came from a parent so we must have had a parent. This is a bug in React.', + ); + } + } + + if (parentSuspense.expirationTime < renderExpirationTime) { + parentSuspense.expirationTime = renderExpirationTime; + } + + var _alternate = parentSuspense.alternate; + + if (_alternate !== null && _alternate.expirationTime < renderExpirationTime) { + _alternate.expirationTime = renderExpirationTime; + } // This is intentionally passing this fiber as the parent + // because we want to schedule this fiber as having work + // on its children. We'll use the childExpirationTime on + // this fiber to indicate that a context has changed. + + scheduleWorkOnParentPath(parentSuspense, renderExpirationTime); + nextFiber = fiber.sibling; + } else { + // Traverse down. + nextFiber = fiber.child; + } + + if (nextFiber !== null) { + // Set the return pointer of the child to the work-in-progress fiber. + nextFiber.return = fiber; + } else { + // No child. Traverse to next sibling. + nextFiber = fiber; + + while (nextFiber !== null) { + if (nextFiber === workInProgress) { + // We're back to the root of this subtree. Exit. + nextFiber = null; + break; + } + + var sibling = nextFiber.sibling; + + if (sibling !== null) { + // Set the return pointer of the sibling to the work-in-progress fiber. + sibling.return = nextFiber.return; + nextFiber = sibling; + break; + } // No more siblings. Traverse up. + + nextFiber = nextFiber.return; + } + } + + fiber = nextFiber; + } + } + function prepareToReadContext(workInProgress, renderExpirationTime) { + currentlyRenderingFiber = workInProgress; + lastContextDependency = null; + lastContextWithAllBitsObserved = null; + var dependencies = workInProgress.dependencies; + + if (dependencies !== null) { + var firstContext = dependencies.firstContext; + + if (firstContext !== null) { + if (dependencies.expirationTime >= renderExpirationTime) { + // Context list has a pending update. Mark that this fiber performed work. + markWorkInProgressReceivedUpdate(); + } // Reset the work-in-progress list + + dependencies.firstContext = null; + } + } + } + function readContext(context, observedBits) { + { + // This warning would fire if you read context inside a Hook like useMemo. + // Unlike the class check below, it's not enforced in production for perf. + !!isDisallowedContextReadInDEV + ? warning$1( + false, + 'Context can only be read while React is rendering. ' + + 'In classes, you can read it in the render method or getDerivedStateFromProps. ' + + 'In function components, you can read it directly in the function body, but not ' + + 'inside Hooks like useReducer() or useMemo().', + ) + : void 0; + } + + if (lastContextWithAllBitsObserved === context) { + // Nothing to do. We already observe everything in this context. + } else if (observedBits === false || observedBits === 0) { + // Do not observe any updates. + } else { + var resolvedObservedBits; // Avoid deopting on observable arguments or heterogeneous types. + + if (typeof observedBits !== 'number' || observedBits === MAX_SIGNED_31_BIT_INT) { + // Observe all updates. + lastContextWithAllBitsObserved = context; + resolvedObservedBits = MAX_SIGNED_31_BIT_INT; + } else { + resolvedObservedBits = observedBits; + } + + var contextItem = { + context: context, + observedBits: resolvedObservedBits, + next: null, + }; + + if (lastContextDependency === null) { + if (!(currentlyRenderingFiber !== null)) { + { + throw Error( + 'Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().', + ); + } + } // This is the first dependency for this component. Create a new list. + + lastContextDependency = contextItem; + currentlyRenderingFiber.dependencies = { + expirationTime: NoWork, + firstContext: contextItem, + responders: null, + }; + } else { + // Append a new context item. + lastContextDependency = lastContextDependency.next = contextItem; + } + } + + return isPrimaryRenderer ? context._currentValue : context._currentValue2; + } + + // UpdateQueue is a linked list of prioritized updates. + // + // Like fibers, update queues come in pairs: a current queue, which represents + // the visible state of the screen, and a work-in-progress queue, which can be + // mutated and processed asynchronously before it is committed — a form of + // double buffering. If a work-in-progress render is discarded before finishing, + // we create a new work-in-progress by cloning the current queue. + // + // Both queues share a persistent, singly-linked list structure. To schedule an + // update, we append it to the end of both queues. Each queue maintains a + // pointer to first update in the persistent list that hasn't been processed. + // The work-in-progress pointer always has a position equal to or greater than + // the current queue, since we always work on that one. The current queue's + // pointer is only updated during the commit phase, when we swap in the + // work-in-progress. + // + // For example: + // + // Current pointer: A - B - C - D - E - F + // Work-in-progress pointer: D - E - F + // ^ + // The work-in-progress queue has + // processed more updates than current. + // + // The reason we append to both queues is because otherwise we might drop + // updates without ever processing them. For example, if we only add updates to + // the work-in-progress queue, some updates could be lost whenever a work-in + // -progress render restarts by cloning from current. Similarly, if we only add + // updates to the current queue, the updates will be lost whenever an already + // in-progress queue commits and swaps with the current queue. However, by + // adding to both queues, we guarantee that the update will be part of the next + // work-in-progress. (And because the work-in-progress queue becomes the + // current queue once it commits, there's no danger of applying the same + // update twice.) + // + // Prioritization + // -------------- + // + // Updates are not sorted by priority, but by insertion; new updates are always + // appended to the end of the list. + // + // The priority is still important, though. When processing the update queue + // during the render phase, only the updates with sufficient priority are + // included in the result. If we skip an update because it has insufficient + // priority, it remains in the queue to be processed later, during a lower + // priority render. Crucially, all updates subsequent to a skipped update also + // remain in the queue *regardless of their priority*. That means high priority + // updates are sometimes processed twice, at two separate priorities. We also + // keep track of a base state, that represents the state before the first + // update in the queue is applied. + // + // For example: + // + // Given a base state of '', and the following queue of updates + // + // A1 - B2 - C1 - D2 + // + // where the number indicates the priority, and the update is applied to the + // previous state by appending a letter, React will process these updates as + // two separate renders, one per distinct priority level: + // + // First render, at priority 1: + // Base state: '' + // Updates: [A1, C1] + // Result state: 'AC' + // + // Second render, at priority 2: + // Base state: 'A' <- The base state does not include C1, + // because B2 was skipped. + // Updates: [B2, C1, D2] <- C1 was rebased on top of B2 + // Result state: 'ABCD' + // + // Because we process updates in insertion order, and rebase high priority + // updates when preceding updates are skipped, the final result is deterministic + // regardless of priority. Intermediate state may vary according to system + // resources, but the final state is always the same. + var UpdateState = 0; + var ReplaceState = 1; + var ForceUpdate = 2; + var CaptureUpdate = 3; // Global state that is reset at the beginning of calling `processUpdateQueue`. + // It should only be read right after calling `processUpdateQueue`, via + // `checkHasForceUpdateAfterProcessing`. + + var hasForceUpdate = false; + var didWarnUpdateInsideUpdate; + var currentlyProcessingQueue; + + { + didWarnUpdateInsideUpdate = false; + currentlyProcessingQueue = null; + } + + function createUpdateQueue(baseState) { + var queue = { + baseState: baseState, + firstUpdate: null, + lastUpdate: null, + firstCapturedUpdate: null, + lastCapturedUpdate: null, + firstEffect: null, + lastEffect: null, + firstCapturedEffect: null, + lastCapturedEffect: null, + }; + return queue; + } + + function cloneUpdateQueue(currentQueue) { + var queue = { + baseState: currentQueue.baseState, + firstUpdate: currentQueue.firstUpdate, + lastUpdate: currentQueue.lastUpdate, + // TODO: With resuming, if we bail out and resuse the child tree, we should + // keep these effects. + firstCapturedUpdate: null, + lastCapturedUpdate: null, + firstEffect: null, + lastEffect: null, + firstCapturedEffect: null, + lastCapturedEffect: null, + }; + return queue; + } + + function createUpdate(expirationTime, suspenseConfig) { + var update = { + expirationTime: expirationTime, + suspenseConfig: suspenseConfig, + tag: UpdateState, + payload: null, + callback: null, + next: null, + nextEffect: null, + }; + + { + update.priority = getCurrentPriorityLevel(); + } + + return update; + } + + function appendUpdateToQueue(queue, update) { + // Append the update to the end of the list. + if (queue.lastUpdate === null) { + // Queue is empty + queue.firstUpdate = queue.lastUpdate = update; + } else { + queue.lastUpdate.next = update; + queue.lastUpdate = update; + } + } + + function enqueueUpdate(fiber, update) { + // Update queues are created lazily. + var alternate = fiber.alternate; + var queue1; + var queue2; + + if (alternate === null) { + // There's only one fiber. + queue1 = fiber.updateQueue; + queue2 = null; + + if (queue1 === null) { + queue1 = fiber.updateQueue = createUpdateQueue(fiber.memoizedState); + } + } else { + // There are two owners. + queue1 = fiber.updateQueue; + queue2 = alternate.updateQueue; + + if (queue1 === null) { + if (queue2 === null) { + // Neither fiber has an update queue. Create new ones. + queue1 = fiber.updateQueue = createUpdateQueue(fiber.memoizedState); + queue2 = alternate.updateQueue = createUpdateQueue(alternate.memoizedState); + } else { + // Only one fiber has an update queue. Clone to create a new one. + queue1 = fiber.updateQueue = cloneUpdateQueue(queue2); + } + } else { + if (queue2 === null) { + // Only one fiber has an update queue. Clone to create a new one. + queue2 = alternate.updateQueue = cloneUpdateQueue(queue1); + } else { + // Both owners have an update queue. + } + } + } + + if (queue2 === null || queue1 === queue2) { + // There's only a single queue. + appendUpdateToQueue(queue1, update); + } else { + // There are two queues. We need to append the update to both queues, + // while accounting for the persistent structure of the list — we don't + // want the same update to be added multiple times. + if (queue1.lastUpdate === null || queue2.lastUpdate === null) { + // One of the queues is not empty. We must add the update to both queues. + appendUpdateToQueue(queue1, update); + appendUpdateToQueue(queue2, update); + } else { + // Both queues are non-empty. The last update is the same in both lists, + // because of structural sharing. So, only append to one of the lists. + appendUpdateToQueue(queue1, update); // But we still need to update the `lastUpdate` pointer of queue2. + + queue2.lastUpdate = update; + } + } + + { + if ( + fiber.tag === ClassComponent && + (currentlyProcessingQueue === queue1 || + (queue2 !== null && currentlyProcessingQueue === queue2)) && + !didWarnUpdateInsideUpdate + ) { + warningWithoutStack$1( + false, + 'An update (setState, replaceState, or forceUpdate) was scheduled ' + + 'from inside an update function. Update functions should be pure, ' + + 'with zero side-effects. Consider using componentDidUpdate or a ' + + 'callback.', + ); + didWarnUpdateInsideUpdate = true; + } + } + } + function enqueueCapturedUpdate(workInProgress, update) { + // Captured updates go into a separate list, and only on the work-in- + // progress queue. + var workInProgressQueue = workInProgress.updateQueue; + + if (workInProgressQueue === null) { + workInProgressQueue = workInProgress.updateQueue = createUpdateQueue( + workInProgress.memoizedState, + ); + } else { + // TODO: I put this here rather than createWorkInProgress so that we don't + // clone the queue unnecessarily. There's probably a better way to + // structure this. + workInProgressQueue = ensureWorkInProgressQueueIsAClone(workInProgress, workInProgressQueue); + } // Append the update to the end of the list. + + if (workInProgressQueue.lastCapturedUpdate === null) { + // This is the first render phase update + workInProgressQueue.firstCapturedUpdate = workInProgressQueue.lastCapturedUpdate = update; + } else { + workInProgressQueue.lastCapturedUpdate.next = update; + workInProgressQueue.lastCapturedUpdate = update; + } + } + + function ensureWorkInProgressQueueIsAClone(workInProgress, queue) { + var current = workInProgress.alternate; + + if (current !== null) { + // If the work-in-progress queue is equal to the current queue, + // we need to clone it first. + if (queue === current.updateQueue) { + queue = workInProgress.updateQueue = cloneUpdateQueue(queue); + } + } + + return queue; + } + + function getStateFromUpdate(workInProgress, queue, update, prevState, nextProps, instance) { + switch (update.tag) { + case ReplaceState: { + var payload = update.payload; + + if (typeof payload === 'function') { + // Updater function + { + enterDisallowedContextReadInDEV(); + + if (debugRenderPhaseSideEffectsForStrictMode && workInProgress.mode & StrictMode) { + payload.call(instance, prevState, nextProps); + } + } + + var nextState = payload.call(instance, prevState, nextProps); + + { + exitDisallowedContextReadInDEV(); + } + + return nextState; + } // State object + + return payload; + } + + case CaptureUpdate: { + workInProgress.effectTag = (workInProgress.effectTag & ~ShouldCapture) | DidCapture; + } + // Intentional fallthrough + + case UpdateState: { + var _payload = update.payload; + var partialState; + + if (typeof _payload === 'function') { + // Updater function + { + enterDisallowedContextReadInDEV(); + + if (debugRenderPhaseSideEffectsForStrictMode && workInProgress.mode & StrictMode) { + _payload.call(instance, prevState, nextProps); + } + } + + partialState = _payload.call(instance, prevState, nextProps); + + { + exitDisallowedContextReadInDEV(); + } + } else { + // Partial state object + partialState = _payload; + } + + if (partialState === null || partialState === undefined) { + // Null and undefined are treated as no-ops. + return prevState; + } // Merge the partial state and the previous state. + + return _assign({}, prevState, partialState); + } + + case ForceUpdate: { + hasForceUpdate = true; + return prevState; + } + } + + return prevState; + } + + function processUpdateQueue(workInProgress, queue, props, instance, renderExpirationTime) { + hasForceUpdate = false; + queue = ensureWorkInProgressQueueIsAClone(workInProgress, queue); + + { + currentlyProcessingQueue = queue; + } // These values may change as we process the queue. + + var newBaseState = queue.baseState; + var newFirstUpdate = null; + var newExpirationTime = NoWork; // Iterate through the list of updates to compute the result. + + var update = queue.firstUpdate; + var resultState = newBaseState; + + while (update !== null) { + var updateExpirationTime = update.expirationTime; + + if (updateExpirationTime < renderExpirationTime) { + // This update does not have sufficient priority. Skip it. + if (newFirstUpdate === null) { + // This is the first skipped update. It will be the first update in + // the new list. + newFirstUpdate = update; // Since this is the first update that was skipped, the current result + // is the new base state. + + newBaseState = resultState; + } // Since this update will remain in the list, update the remaining + // expiration time. + + if (newExpirationTime < updateExpirationTime) { + newExpirationTime = updateExpirationTime; + } + } else { + // This update does have sufficient priority. + // Mark the event time of this update as relevant to this render pass. + // TODO: This should ideally use the true event time of this update rather than + // its priority which is a derived and not reverseable value. + // TODO: We should skip this update if it was already committed but currently + // we have no way of detecting the difference between a committed and suspended + // update here. + markRenderEventTimeAndConfig(updateExpirationTime, update.suspenseConfig); // Process it and compute a new result. + + resultState = getStateFromUpdate(workInProgress, queue, update, resultState, props, instance); + var callback = update.callback; + + if (callback !== null) { + workInProgress.effectTag |= Callback; // Set this to null, in case it was mutated during an aborted render. + + update.nextEffect = null; + + if (queue.lastEffect === null) { + queue.firstEffect = queue.lastEffect = update; + } else { + queue.lastEffect.nextEffect = update; + queue.lastEffect = update; + } + } + } // Continue to the next update. + + update = update.next; + } // Separately, iterate though the list of captured updates. + + var newFirstCapturedUpdate = null; + update = queue.firstCapturedUpdate; + + while (update !== null) { + var _updateExpirationTime = update.expirationTime; + + if (_updateExpirationTime < renderExpirationTime) { + // This update does not have sufficient priority. Skip it. + if (newFirstCapturedUpdate === null) { + // This is the first skipped captured update. It will be the first + // update in the new list. + newFirstCapturedUpdate = update; // If this is the first update that was skipped, the current result is + // the new base state. + + if (newFirstUpdate === null) { + newBaseState = resultState; + } + } // Since this update will remain in the list, update the remaining + // expiration time. + + if (newExpirationTime < _updateExpirationTime) { + newExpirationTime = _updateExpirationTime; + } + } else { + // This update does have sufficient priority. Process it and compute + // a new result. + resultState = getStateFromUpdate(workInProgress, queue, update, resultState, props, instance); + var _callback = update.callback; + + if (_callback !== null) { + workInProgress.effectTag |= Callback; // Set this to null, in case it was mutated during an aborted render. + + update.nextEffect = null; + + if (queue.lastCapturedEffect === null) { + queue.firstCapturedEffect = queue.lastCapturedEffect = update; + } else { + queue.lastCapturedEffect.nextEffect = update; + queue.lastCapturedEffect = update; + } + } + } + + update = update.next; + } + + if (newFirstUpdate === null) { + queue.lastUpdate = null; + } + + if (newFirstCapturedUpdate === null) { + queue.lastCapturedUpdate = null; + } else { + workInProgress.effectTag |= Callback; + } + + if (newFirstUpdate === null && newFirstCapturedUpdate === null) { + // We processed every update, without skipping. That means the new base + // state is the same as the result state. + newBaseState = resultState; + } + + queue.baseState = newBaseState; + queue.firstUpdate = newFirstUpdate; + queue.firstCapturedUpdate = newFirstCapturedUpdate; // Set the remaining expiration time to be whatever is remaining in the queue. + // This should be fine because the only two other things that contribute to + // expiration time are props and context. We're already in the middle of the + // begin phase by the time we start processing the queue, so we've already + // dealt with the props. Context in components that specify + // shouldComponentUpdate is tricky; but we'll have to account for + // that regardless. + + markUnprocessedUpdateTime(newExpirationTime); + workInProgress.expirationTime = newExpirationTime; + workInProgress.memoizedState = resultState; + + { + currentlyProcessingQueue = null; + } + } + + function callCallback(callback, context) { + if (!(typeof callback === 'function')) { + { + throw Error( + 'Invalid argument passed as callback. Expected a function. Instead received: ' + callback, + ); + } + } + + callback.call(context); + } + + function resetHasForceUpdateBeforeProcessing() { + hasForceUpdate = false; + } + function checkHasForceUpdateAfterProcessing() { + return hasForceUpdate; + } + function commitUpdateQueue(finishedWork, finishedQueue, instance, renderExpirationTime) { + // If the finished render included captured updates, and there are still + // lower priority updates left over, we need to keep the captured updates + // in the queue so that they are rebased and not dropped once we process the + // queue again at the lower priority. + if (finishedQueue.firstCapturedUpdate !== null) { + // Join the captured update list to the end of the normal list. + if (finishedQueue.lastUpdate !== null) { + finishedQueue.lastUpdate.next = finishedQueue.firstCapturedUpdate; + finishedQueue.lastUpdate = finishedQueue.lastCapturedUpdate; + } // Clear the list of captured updates. + + finishedQueue.firstCapturedUpdate = finishedQueue.lastCapturedUpdate = null; + } // Commit the effects + + commitUpdateEffects(finishedQueue.firstEffect, instance); + finishedQueue.firstEffect = finishedQueue.lastEffect = null; + commitUpdateEffects(finishedQueue.firstCapturedEffect, instance); + finishedQueue.firstCapturedEffect = finishedQueue.lastCapturedEffect = null; + } + + function commitUpdateEffects(effect, instance) { + while (effect !== null) { + var callback = effect.callback; + + if (callback !== null) { + effect.callback = null; + callCallback(callback, instance); + } + + effect = effect.nextEffect; + } + } + + var ReactCurrentBatchConfig = ReactSharedInternals.ReactCurrentBatchConfig; + function requestCurrentSuspenseConfig() { + return ReactCurrentBatchConfig.suspense; + } + + var fakeInternalInstance = {}; + var isArray$1 = Array.isArray; // React.Component uses a shared frozen object by default. + // We'll use it to determine whether we need to initialize legacy refs. + + var emptyRefsObject = new React.Component().refs; + var didWarnAboutStateAssignmentForComponent; + var didWarnAboutUninitializedState; + var didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate; + var didWarnAboutLegacyLifecyclesAndDerivedState; + var didWarnAboutUndefinedDerivedState; + var warnOnUndefinedDerivedState; + var warnOnInvalidCallback$1; + var didWarnAboutDirectlyAssigningPropsToState; + var didWarnAboutContextTypeAndContextTypes; + var didWarnAboutInvalidateContextType; + + { + didWarnAboutStateAssignmentForComponent = new Set(); + didWarnAboutUninitializedState = new Set(); + didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate = new Set(); + didWarnAboutLegacyLifecyclesAndDerivedState = new Set(); + didWarnAboutDirectlyAssigningPropsToState = new Set(); + didWarnAboutUndefinedDerivedState = new Set(); + didWarnAboutContextTypeAndContextTypes = new Set(); + didWarnAboutInvalidateContextType = new Set(); + var didWarnOnInvalidCallback = new Set(); + + warnOnInvalidCallback$1 = function (callback, callerName) { + if (callback === null || typeof callback === 'function') { + return; + } + + var key = callerName + '_' + callback; + + if (!didWarnOnInvalidCallback.has(key)) { + didWarnOnInvalidCallback.add(key); + warningWithoutStack$1( + false, + '%s(...): Expected the last optional `callback` argument to be a ' + + 'function. Instead received: %s.', + callerName, + callback, + ); + } + }; + + warnOnUndefinedDerivedState = function (type, partialState) { + if (partialState === undefined) { + var componentName = getComponentName(type) || 'Component'; + + if (!didWarnAboutUndefinedDerivedState.has(componentName)) { + didWarnAboutUndefinedDerivedState.add(componentName); + warningWithoutStack$1( + false, + '%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. ' + + 'You have returned undefined.', + componentName, + ); + } + } + }; // This is so gross but it's at least non-critical and can be removed if + // it causes problems. This is meant to give a nicer error message for + // ReactDOM15.unstable_renderSubtreeIntoContainer(reactDOM16Component, + // ...)) which otherwise throws a "_processChildContext is not a function" + // exception. + + Object.defineProperty(fakeInternalInstance, '_processChildContext', { + enumerable: false, + value: function () { + { + { + throw Error( + "_processChildContext is not available in React 16+. This likely means you have multiple copies of React and are attempting to nest a React 15 tree inside a React 16 tree using unstable_renderSubtreeIntoContainer, which isn't supported. Try to make sure you have only one copy of React (and ideally, switch to ReactDOM.createPortal).", + ); + } + } + }, + }); + Object.freeze(fakeInternalInstance); + } + + function applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, nextProps) { + var prevState = workInProgress.memoizedState; + + { + if (debugRenderPhaseSideEffectsForStrictMode && workInProgress.mode & StrictMode) { + // Invoke the function an extra time to help detect side-effects. + getDerivedStateFromProps(nextProps, prevState); + } + } + + var partialState = getDerivedStateFromProps(nextProps, prevState); + + { + warnOnUndefinedDerivedState(ctor, partialState); + } // Merge the partial state and the previous state. + + var memoizedState = + partialState === null || partialState === undefined + ? prevState + : _assign({}, prevState, partialState); + workInProgress.memoizedState = memoizedState; // Once the update queue is empty, persist the derived state onto the + // base state. + + var updateQueue = workInProgress.updateQueue; + + if (updateQueue !== null && workInProgress.expirationTime === NoWork) { + updateQueue.baseState = memoizedState; + } + } + var classComponentUpdater = { + isMounted: isMounted, + enqueueSetState: function (inst, payload, callback) { + var fiber = get(inst); + var currentTime = requestCurrentTimeForUpdate(); + var suspenseConfig = requestCurrentSuspenseConfig(); + var expirationTime = computeExpirationForFiber(currentTime, fiber, suspenseConfig); + var update = createUpdate(expirationTime, suspenseConfig); + update.payload = payload; + + if (callback !== undefined && callback !== null) { + { + warnOnInvalidCallback$1(callback, 'setState'); + } + + update.callback = callback; + } + + enqueueUpdate(fiber, update); + scheduleWork(fiber, expirationTime); + }, + enqueueReplaceState: function (inst, payload, callback) { + var fiber = get(inst); + var currentTime = requestCurrentTimeForUpdate(); + var suspenseConfig = requestCurrentSuspenseConfig(); + var expirationTime = computeExpirationForFiber(currentTime, fiber, suspenseConfig); + var update = createUpdate(expirationTime, suspenseConfig); + update.tag = ReplaceState; + update.payload = payload; + + if (callback !== undefined && callback !== null) { + { + warnOnInvalidCallback$1(callback, 'replaceState'); + } + + update.callback = callback; + } + + enqueueUpdate(fiber, update); + scheduleWork(fiber, expirationTime); + }, + enqueueForceUpdate: function (inst, callback) { + var fiber = get(inst); + var currentTime = requestCurrentTimeForUpdate(); + var suspenseConfig = requestCurrentSuspenseConfig(); + var expirationTime = computeExpirationForFiber(currentTime, fiber, suspenseConfig); + var update = createUpdate(expirationTime, suspenseConfig); + update.tag = ForceUpdate; + + if (callback !== undefined && callback !== null) { + { + warnOnInvalidCallback$1(callback, 'forceUpdate'); + } + + update.callback = callback; + } + + enqueueUpdate(fiber, update); + scheduleWork(fiber, expirationTime); + }, + }; + + function checkShouldComponentUpdate( + workInProgress, + ctor, + oldProps, + newProps, + oldState, + newState, + nextContext, + ) { + var instance = workInProgress.stateNode; + + if (typeof instance.shouldComponentUpdate === 'function') { + startPhaseTimer(workInProgress, 'shouldComponentUpdate'); + var shouldUpdate = instance.shouldComponentUpdate(newProps, newState, nextContext); + stopPhaseTimer(); + + { + !(shouldUpdate !== undefined) + ? warningWithoutStack$1( + false, + '%s.shouldComponentUpdate(): Returned undefined instead of a ' + + 'boolean value. Make sure to return true or false.', + getComponentName(ctor) || 'Component', + ) + : void 0; + } + + return shouldUpdate; + } + + if (ctor.prototype && ctor.prototype.isPureReactComponent) { + return !shallowEqual(oldProps, newProps) || !shallowEqual(oldState, newState); + } + + return true; + } + + function checkClassInstance(workInProgress, ctor, newProps) { + var instance = workInProgress.stateNode; + + { + var name = getComponentName(ctor) || 'Component'; + var renderPresent = instance.render; + + if (!renderPresent) { + if (ctor.prototype && typeof ctor.prototype.render === 'function') { + warningWithoutStack$1( + false, + '%s(...): No `render` method found on the returned component ' + + 'instance: did you accidentally return an object from the constructor?', + name, + ); + } else { + warningWithoutStack$1( + false, + '%s(...): No `render` method found on the returned component ' + + 'instance: you may have forgotten to define `render`.', + name, + ); + } + } + + var noGetInitialStateOnES6 = + !instance.getInitialState || instance.getInitialState.isReactClassApproved || instance.state; + !noGetInitialStateOnES6 + ? warningWithoutStack$1( + false, + 'getInitialState was defined on %s, a plain JavaScript class. ' + + 'This is only supported for classes created using React.createClass. ' + + 'Did you mean to define a state property instead?', + name, + ) + : void 0; + var noGetDefaultPropsOnES6 = + !instance.getDefaultProps || instance.getDefaultProps.isReactClassApproved; + !noGetDefaultPropsOnES6 + ? warningWithoutStack$1( + false, + 'getDefaultProps was defined on %s, a plain JavaScript class. ' + + 'This is only supported for classes created using React.createClass. ' + + 'Use a static property to define defaultProps instead.', + name, + ) + : void 0; + var noInstancePropTypes = !instance.propTypes; + !noInstancePropTypes + ? warningWithoutStack$1( + false, + 'propTypes was defined as an instance property on %s. Use a static ' + + 'property to define propTypes instead.', + name, + ) + : void 0; + var noInstanceContextType = !instance.contextType; + !noInstanceContextType + ? warningWithoutStack$1( + false, + 'contextType was defined as an instance property on %s. Use a static ' + + 'property to define contextType instead.', + name, + ) + : void 0; + + if (disableLegacyContext) { + if (ctor.childContextTypes) { + warningWithoutStack$1( + false, + '%s uses the legacy childContextTypes API which is no longer supported. ' + + 'Use React.createContext() instead.', + name, + ); + } + + if (ctor.contextTypes) { + warningWithoutStack$1( + false, + '%s uses the legacy contextTypes API which is no longer supported. ' + + 'Use React.createContext() with static contextType instead.', + name, + ); + } + } else { + var noInstanceContextTypes = !instance.contextTypes; + !noInstanceContextTypes + ? warningWithoutStack$1( + false, + 'contextTypes was defined as an instance property on %s. Use a static ' + + 'property to define contextTypes instead.', + name, + ) + : void 0; + + if ( + ctor.contextType && + ctor.contextTypes && + !didWarnAboutContextTypeAndContextTypes.has(ctor) + ) { + didWarnAboutContextTypeAndContextTypes.add(ctor); + warningWithoutStack$1( + false, + '%s declares both contextTypes and contextType static properties. ' + + 'The legacy contextTypes property will be ignored.', + name, + ); + } + } + + var noComponentShouldUpdate = typeof instance.componentShouldUpdate !== 'function'; + !noComponentShouldUpdate + ? warningWithoutStack$1( + false, + '%s has a method called ' + + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + + 'The name is phrased as a question because the function is ' + + 'expected to return a value.', + name, + ) + : void 0; + + if ( + ctor.prototype && + ctor.prototype.isPureReactComponent && + typeof instance.shouldComponentUpdate !== 'undefined' + ) { + warningWithoutStack$1( + false, + '%s has a method called shouldComponentUpdate(). ' + + 'shouldComponentUpdate should not be used when extending React.PureComponent. ' + + 'Please extend React.Component if shouldComponentUpdate is used.', + getComponentName(ctor) || 'A pure component', + ); + } + + var noComponentDidUnmount = typeof instance.componentDidUnmount !== 'function'; + !noComponentDidUnmount + ? warningWithoutStack$1( + false, + '%s has a method called ' + + 'componentDidUnmount(). But there is no such lifecycle method. ' + + 'Did you mean componentWillUnmount()?', + name, + ) + : void 0; + var noComponentDidReceiveProps = typeof instance.componentDidReceiveProps !== 'function'; + !noComponentDidReceiveProps + ? warningWithoutStack$1( + false, + '%s has a method called ' + + 'componentDidReceiveProps(). But there is no such lifecycle method. ' + + 'If you meant to update the state in response to changing props, ' + + 'use componentWillReceiveProps(). If you meant to fetch data or ' + + 'run side-effects or mutations after React has updated the UI, use componentDidUpdate().', + name, + ) + : void 0; + var noComponentWillRecieveProps = typeof instance.componentWillRecieveProps !== 'function'; + !noComponentWillRecieveProps + ? warningWithoutStack$1( + false, + '%s has a method called ' + + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', + name, + ) + : void 0; + var noUnsafeComponentWillRecieveProps = + typeof instance.UNSAFE_componentWillRecieveProps !== 'function'; + !noUnsafeComponentWillRecieveProps + ? warningWithoutStack$1( + false, + '%s has a method called ' + + 'UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?', + name, + ) + : void 0; + var hasMutatedProps = instance.props !== newProps; + !(instance.props === undefined || !hasMutatedProps) + ? warningWithoutStack$1( + false, + '%s(...): When calling super() in `%s`, make sure to pass ' + + "up the same props that your component's constructor was passed.", + name, + name, + ) + : void 0; + var noInstanceDefaultProps = !instance.defaultProps; + !noInstanceDefaultProps + ? warningWithoutStack$1( + false, + 'Setting defaultProps as an instance property on %s is not supported and will be ignored.' + + ' Instead, define defaultProps as a static property on %s.', + name, + name, + ) + : void 0; + + if ( + typeof instance.getSnapshotBeforeUpdate === 'function' && + typeof instance.componentDidUpdate !== 'function' && + !didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.has(ctor) + ) { + didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.add(ctor); + warningWithoutStack$1( + false, + '%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). ' + + 'This component defines getSnapshotBeforeUpdate() only.', + getComponentName(ctor), + ); + } + + var noInstanceGetDerivedStateFromProps = + typeof instance.getDerivedStateFromProps !== 'function'; + !noInstanceGetDerivedStateFromProps + ? warningWithoutStack$1( + false, + '%s: getDerivedStateFromProps() is defined as an instance method ' + + 'and will be ignored. Instead, declare it as a static method.', + name, + ) + : void 0; + var noInstanceGetDerivedStateFromCatch = + typeof instance.getDerivedStateFromError !== 'function'; + !noInstanceGetDerivedStateFromCatch + ? warningWithoutStack$1( + false, + '%s: getDerivedStateFromError() is defined as an instance method ' + + 'and will be ignored. Instead, declare it as a static method.', + name, + ) + : void 0; + var noStaticGetSnapshotBeforeUpdate = typeof ctor.getSnapshotBeforeUpdate !== 'function'; + !noStaticGetSnapshotBeforeUpdate + ? warningWithoutStack$1( + false, + '%s: getSnapshotBeforeUpdate() is defined as a static method ' + + 'and will be ignored. Instead, declare it as an instance method.', + name, + ) + : void 0; + var _state = instance.state; + + if (_state && (typeof _state !== 'object' || isArray$1(_state))) { + warningWithoutStack$1(false, '%s.state: must be set to an object or null', name); + } + + if (typeof instance.getChildContext === 'function') { + !(typeof ctor.childContextTypes === 'object') + ? warningWithoutStack$1( + false, + '%s.getChildContext(): childContextTypes must be defined in order to ' + + 'use getChildContext().', + name, + ) + : void 0; + } + } + } + + function adoptClassInstance(workInProgress, instance) { + instance.updater = classComponentUpdater; + workInProgress.stateNode = instance; // The instance needs access to the fiber so that it can schedule updates + + set(instance, workInProgress); + + { + instance._reactInternalInstance = fakeInternalInstance; + } + } + + function constructClassInstance(workInProgress, ctor, props, renderExpirationTime) { + var isLegacyContextConsumer = false; + var unmaskedContext = emptyContextObject; + var context = emptyContextObject; + var contextType = ctor.contextType; + + { + if ('contextType' in ctor) { + var isValid = // Allow null for conditional declaration + contextType === null || + (contextType !== undefined && + contextType.$$typeof === REACT_CONTEXT_TYPE && + contextType._context === undefined); // Not a <Context.Consumer> + + if (!isValid && !didWarnAboutInvalidateContextType.has(ctor)) { + didWarnAboutInvalidateContextType.add(ctor); + var addendum = ''; + + if (contextType === undefined) { + addendum = + ' However, it is set to undefined. ' + + 'This can be caused by a typo or by mixing up named and default imports. ' + + 'This can also happen due to a circular dependency, so ' + + 'try moving the createContext() call to a separate file.'; + } else if (typeof contextType !== 'object') { + addendum = ' However, it is set to a ' + typeof contextType + '.'; + } else if (contextType.$$typeof === REACT_PROVIDER_TYPE) { + addendum = ' Did you accidentally pass the Context.Provider instead?'; + } else if (contextType._context !== undefined) { + // <Context.Consumer> + addendum = ' Did you accidentally pass the Context.Consumer instead?'; + } else { + addendum = + ' However, it is set to an object with keys {' + + Object.keys(contextType).join(', ') + + '}.'; + } + + warningWithoutStack$1( + false, + '%s defines an invalid contextType. ' + + 'contextType should point to the Context object returned by React.createContext().%s', + getComponentName(ctor) || 'Component', + addendum, + ); + } + } + } + + if (typeof contextType === 'object' && contextType !== null) { + context = readContext(contextType); + } else if (!disableLegacyContext) { + unmaskedContext = getUnmaskedContext(workInProgress, ctor, true); + var contextTypes = ctor.contextTypes; + isLegacyContextConsumer = contextTypes !== null && contextTypes !== undefined; + context = isLegacyContextConsumer + ? getMaskedContext(workInProgress, unmaskedContext) + : emptyContextObject; + } // Instantiate twice to help detect side-effects. + + { + if (debugRenderPhaseSideEffectsForStrictMode && workInProgress.mode & StrictMode) { + new ctor(props, context); // eslint-disable-line no-new + } + } + + var instance = new ctor(props, context); + var state = (workInProgress.memoizedState = + instance.state !== null && instance.state !== undefined ? instance.state : null); + adoptClassInstance(workInProgress, instance); + + { + if (typeof ctor.getDerivedStateFromProps === 'function' && state === null) { + var componentName = getComponentName(ctor) || 'Component'; + + if (!didWarnAboutUninitializedState.has(componentName)) { + didWarnAboutUninitializedState.add(componentName); + warningWithoutStack$1( + false, + '`%s` uses `getDerivedStateFromProps` but its initial state is ' + + '%s. This is not recommended. Instead, define the initial state by ' + + 'assigning an object to `this.state` in the constructor of `%s`. ' + + 'This ensures that `getDerivedStateFromProps` arguments have a consistent shape.', + componentName, + instance.state === null ? 'null' : 'undefined', + componentName, + ); + } + } // If new component APIs are defined, "unsafe" lifecycles won't be called. + // Warn about these lifecycles if they are present. + // Don't warn about react-lifecycles-compat polyfilled methods though. + + if ( + typeof ctor.getDerivedStateFromProps === 'function' || + typeof instance.getSnapshotBeforeUpdate === 'function' + ) { + var foundWillMountName = null; + var foundWillReceivePropsName = null; + var foundWillUpdateName = null; + + if ( + typeof instance.componentWillMount === 'function' && + instance.componentWillMount.__suppressDeprecationWarning !== true + ) { + foundWillMountName = 'componentWillMount'; + } else if (typeof instance.UNSAFE_componentWillMount === 'function') { + foundWillMountName = 'UNSAFE_componentWillMount'; + } + + if ( + typeof instance.componentWillReceiveProps === 'function' && + instance.componentWillReceiveProps.__suppressDeprecationWarning !== true + ) { + foundWillReceivePropsName = 'componentWillReceiveProps'; + } else if (typeof instance.UNSAFE_componentWillReceiveProps === 'function') { + foundWillReceivePropsName = 'UNSAFE_componentWillReceiveProps'; + } + + if ( + typeof instance.componentWillUpdate === 'function' && + instance.componentWillUpdate.__suppressDeprecationWarning !== true + ) { + foundWillUpdateName = 'componentWillUpdate'; + } else if (typeof instance.UNSAFE_componentWillUpdate === 'function') { + foundWillUpdateName = 'UNSAFE_componentWillUpdate'; + } + + if ( + foundWillMountName !== null || + foundWillReceivePropsName !== null || + foundWillUpdateName !== null + ) { + var _componentName = getComponentName(ctor) || 'Component'; + + var newApiName = + typeof ctor.getDerivedStateFromProps === 'function' + ? 'getDerivedStateFromProps()' + : 'getSnapshotBeforeUpdate()'; + + if (!didWarnAboutLegacyLifecyclesAndDerivedState.has(_componentName)) { + didWarnAboutLegacyLifecyclesAndDerivedState.add(_componentName); + warningWithoutStack$1( + false, + 'Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n' + + '%s uses %s but also contains the following legacy lifecycles:%s%s%s\n\n' + + 'The above lifecycles should be removed. Learn more about this warning here:\n' + + 'https://fb.me/react-unsafe-component-lifecycles', + _componentName, + newApiName, + foundWillMountName !== null ? '\n ' + foundWillMountName : '', + foundWillReceivePropsName !== null ? '\n ' + foundWillReceivePropsName : '', + foundWillUpdateName !== null ? '\n ' + foundWillUpdateName : '', + ); + } + } + } + } // Cache unmasked context so we can avoid recreating masked context unless necessary. + // ReactFiberContext usually updates this cache but can't for newly-created instances. + + if (isLegacyContextConsumer) { + cacheContext(workInProgress, unmaskedContext, context); + } + + return instance; + } + + function callComponentWillMount(workInProgress, instance) { + startPhaseTimer(workInProgress, 'componentWillMount'); + var oldState = instance.state; + + if (typeof instance.componentWillMount === 'function') { + instance.componentWillMount(); + } + + if (typeof instance.UNSAFE_componentWillMount === 'function') { + instance.UNSAFE_componentWillMount(); + } + + stopPhaseTimer(); + + if (oldState !== instance.state) { + { + warningWithoutStack$1( + false, + '%s.componentWillMount(): Assigning directly to this.state is ' + + "deprecated (except inside a component's " + + 'constructor). Use setState instead.', + getComponentName(workInProgress.type) || 'Component', + ); + } + + classComponentUpdater.enqueueReplaceState(instance, instance.state, null); + } + } + + function callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext) { + var oldState = instance.state; + startPhaseTimer(workInProgress, 'componentWillReceiveProps'); + + if (typeof instance.componentWillReceiveProps === 'function') { + instance.componentWillReceiveProps(newProps, nextContext); + } + + if (typeof instance.UNSAFE_componentWillReceiveProps === 'function') { + instance.UNSAFE_componentWillReceiveProps(newProps, nextContext); + } + + stopPhaseTimer(); + + if (instance.state !== oldState) { + { + var componentName = getComponentName(workInProgress.type) || 'Component'; + + if (!didWarnAboutStateAssignmentForComponent.has(componentName)) { + didWarnAboutStateAssignmentForComponent.add(componentName); + warningWithoutStack$1( + false, + '%s.componentWillReceiveProps(): Assigning directly to ' + + "this.state is deprecated (except inside a component's " + + 'constructor). Use setState instead.', + componentName, + ); + } + } + + classComponentUpdater.enqueueReplaceState(instance, instance.state, null); + } + } // Invokes the mount life-cycles on a previously never rendered instance. + + function mountClassInstance(workInProgress, ctor, newProps, renderExpirationTime) { + { + checkClassInstance(workInProgress, ctor, newProps); + } + + var instance = workInProgress.stateNode; + instance.props = newProps; + instance.state = workInProgress.memoizedState; + instance.refs = emptyRefsObject; + var contextType = ctor.contextType; + + if (typeof contextType === 'object' && contextType !== null) { + instance.context = readContext(contextType); + } else if (disableLegacyContext) { + instance.context = emptyContextObject; + } else { + var unmaskedContext = getUnmaskedContext(workInProgress, ctor, true); + instance.context = getMaskedContext(workInProgress, unmaskedContext); + } + + { + if (instance.state === newProps) { + var componentName = getComponentName(ctor) || 'Component'; + + if (!didWarnAboutDirectlyAssigningPropsToState.has(componentName)) { + didWarnAboutDirectlyAssigningPropsToState.add(componentName); + warningWithoutStack$1( + false, + '%s: It is not recommended to assign props directly to state ' + + "because updates to props won't be reflected in state. " + + 'In most cases, it is better to use props directly.', + componentName, + ); + } + } + + if (workInProgress.mode & StrictMode) { + ReactStrictModeWarnings.recordLegacyContextWarning(workInProgress, instance); + } + + if (warnAboutDeprecatedLifecycles) { + ReactStrictModeWarnings.recordUnsafeLifecycleWarnings(workInProgress, instance); + } + } + + var updateQueue = workInProgress.updateQueue; + + if (updateQueue !== null) { + processUpdateQueue(workInProgress, updateQueue, newProps, instance, renderExpirationTime); + instance.state = workInProgress.memoizedState; + } + + var getDerivedStateFromProps = ctor.getDerivedStateFromProps; + + if (typeof getDerivedStateFromProps === 'function') { + applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps); + instance.state = workInProgress.memoizedState; + } // In order to support react-lifecycles-compat polyfilled components, + // Unsafe lifecycles should not be invoked for components using the new APIs. + + if ( + typeof ctor.getDerivedStateFromProps !== 'function' && + typeof instance.getSnapshotBeforeUpdate !== 'function' && + (typeof instance.UNSAFE_componentWillMount === 'function' || + typeof instance.componentWillMount === 'function') + ) { + callComponentWillMount(workInProgress, instance); // If we had additional state updates during this life-cycle, let's + // process them now. + + updateQueue = workInProgress.updateQueue; + + if (updateQueue !== null) { + processUpdateQueue(workInProgress, updateQueue, newProps, instance, renderExpirationTime); + instance.state = workInProgress.memoizedState; + } + } + + if (typeof instance.componentDidMount === 'function') { + workInProgress.effectTag |= Update; + } + } + + function resumeMountClassInstance(workInProgress, ctor, newProps, renderExpirationTime) { + var instance = workInProgress.stateNode; + var oldProps = workInProgress.memoizedProps; + instance.props = oldProps; + var oldContext = instance.context; + var contextType = ctor.contextType; + var nextContext = emptyContextObject; + + if (typeof contextType === 'object' && contextType !== null) { + nextContext = readContext(contextType); + } else if (!disableLegacyContext) { + var nextLegacyUnmaskedContext = getUnmaskedContext(workInProgress, ctor, true); + nextContext = getMaskedContext(workInProgress, nextLegacyUnmaskedContext); + } + + var getDerivedStateFromProps = ctor.getDerivedStateFromProps; + var hasNewLifecycles = + typeof getDerivedStateFromProps === 'function' || + typeof instance.getSnapshotBeforeUpdate === 'function'; // Note: During these life-cycles, instance.props/instance.state are what + // ever the previously attempted to render - not the "current". However, + // during componentDidUpdate we pass the "current" props. + // In order to support react-lifecycles-compat polyfilled components, + // Unsafe lifecycles should not be invoked for components using the new APIs. + + if ( + !hasNewLifecycles && + (typeof instance.UNSAFE_componentWillReceiveProps === 'function' || + typeof instance.componentWillReceiveProps === 'function') + ) { + if (oldProps !== newProps || oldContext !== nextContext) { + callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext); + } + } + + resetHasForceUpdateBeforeProcessing(); + var oldState = workInProgress.memoizedState; + var newState = (instance.state = oldState); + var updateQueue = workInProgress.updateQueue; + + if (updateQueue !== null) { + processUpdateQueue(workInProgress, updateQueue, newProps, instance, renderExpirationTime); + newState = workInProgress.memoizedState; + } + + if ( + oldProps === newProps && + oldState === newState && + !hasContextChanged() && + !checkHasForceUpdateAfterProcessing() + ) { + // If an update was already in progress, we should schedule an Update + // effect even though we're bailing out, so that cWU/cDU are called. + if (typeof instance.componentDidMount === 'function') { + workInProgress.effectTag |= Update; + } + + return false; + } + + if (typeof getDerivedStateFromProps === 'function') { + applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps); + newState = workInProgress.memoizedState; + } + + var shouldUpdate = + checkHasForceUpdateAfterProcessing() || + checkShouldComponentUpdate( + workInProgress, + ctor, + oldProps, + newProps, + oldState, + newState, + nextContext, + ); + + if (shouldUpdate) { + // In order to support react-lifecycles-compat polyfilled components, + // Unsafe lifecycles should not be invoked for components using the new APIs. + if ( + !hasNewLifecycles && + (typeof instance.UNSAFE_componentWillMount === 'function' || + typeof instance.componentWillMount === 'function') + ) { + startPhaseTimer(workInProgress, 'componentWillMount'); + + if (typeof instance.componentWillMount === 'function') { + instance.componentWillMount(); + } + + if (typeof instance.UNSAFE_componentWillMount === 'function') { + instance.UNSAFE_componentWillMount(); + } + + stopPhaseTimer(); + } + + if (typeof instance.componentDidMount === 'function') { + workInProgress.effectTag |= Update; + } + } else { + // If an update was already in progress, we should schedule an Update + // effect even though we're bailing out, so that cWU/cDU are called. + if (typeof instance.componentDidMount === 'function') { + workInProgress.effectTag |= Update; + } // If shouldComponentUpdate returned false, we should still update the + // memoized state to indicate that this work can be reused. + + workInProgress.memoizedProps = newProps; + workInProgress.memoizedState = newState; + } // Update the existing instance's state, props, and context pointers even + // if shouldComponentUpdate returns false. + + instance.props = newProps; + instance.state = newState; + instance.context = nextContext; + return shouldUpdate; + } // Invokes the update life-cycles and returns false if it shouldn't rerender. + + function updateClassInstance(current, workInProgress, ctor, newProps, renderExpirationTime) { + var instance = workInProgress.stateNode; + var oldProps = workInProgress.memoizedProps; + instance.props = + workInProgress.type === workInProgress.elementType + ? oldProps + : resolveDefaultProps(workInProgress.type, oldProps); + var oldContext = instance.context; + var contextType = ctor.contextType; + var nextContext = emptyContextObject; + + if (typeof contextType === 'object' && contextType !== null) { + nextContext = readContext(contextType); + } else if (!disableLegacyContext) { + var nextUnmaskedContext = getUnmaskedContext(workInProgress, ctor, true); + nextContext = getMaskedContext(workInProgress, nextUnmaskedContext); + } + + var getDerivedStateFromProps = ctor.getDerivedStateFromProps; + var hasNewLifecycles = + typeof getDerivedStateFromProps === 'function' || + typeof instance.getSnapshotBeforeUpdate === 'function'; // Note: During these life-cycles, instance.props/instance.state are what + // ever the previously attempted to render - not the "current". However, + // during componentDidUpdate we pass the "current" props. + // In order to support react-lifecycles-compat polyfilled components, + // Unsafe lifecycles should not be invoked for components using the new APIs. + + if ( + !hasNewLifecycles && + (typeof instance.UNSAFE_componentWillReceiveProps === 'function' || + typeof instance.componentWillReceiveProps === 'function') + ) { + if (oldProps !== newProps || oldContext !== nextContext) { + callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext); + } + } + + resetHasForceUpdateBeforeProcessing(); + var oldState = workInProgress.memoizedState; + var newState = (instance.state = oldState); + var updateQueue = workInProgress.updateQueue; + + if (updateQueue !== null) { + processUpdateQueue(workInProgress, updateQueue, newProps, instance, renderExpirationTime); + newState = workInProgress.memoizedState; + } + + if ( + oldProps === newProps && + oldState === newState && + !hasContextChanged() && + !checkHasForceUpdateAfterProcessing() + ) { + // If an update was already in progress, we should schedule an Update + // effect even though we're bailing out, so that cWU/cDU are called. + if (typeof instance.componentDidUpdate === 'function') { + if (oldProps !== current.memoizedProps || oldState !== current.memoizedState) { + workInProgress.effectTag |= Update; + } + } + + if (typeof instance.getSnapshotBeforeUpdate === 'function') { + if (oldProps !== current.memoizedProps || oldState !== current.memoizedState) { + workInProgress.effectTag |= Snapshot; + } + } + + return false; + } + + if (typeof getDerivedStateFromProps === 'function') { + applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps); + newState = workInProgress.memoizedState; + } + + var shouldUpdate = + checkHasForceUpdateAfterProcessing() || + checkShouldComponentUpdate( + workInProgress, + ctor, + oldProps, + newProps, + oldState, + newState, + nextContext, + ); + + if (shouldUpdate) { + // In order to support react-lifecycles-compat polyfilled components, + // Unsafe lifecycles should not be invoked for components using the new APIs. + if ( + !hasNewLifecycles && + (typeof instance.UNSAFE_componentWillUpdate === 'function' || + typeof instance.componentWillUpdate === 'function') + ) { + startPhaseTimer(workInProgress, 'componentWillUpdate'); + + if (typeof instance.componentWillUpdate === 'function') { + instance.componentWillUpdate(newProps, newState, nextContext); + } + + if (typeof instance.UNSAFE_componentWillUpdate === 'function') { + instance.UNSAFE_componentWillUpdate(newProps, newState, nextContext); + } + + stopPhaseTimer(); + } + + if (typeof instance.componentDidUpdate === 'function') { + workInProgress.effectTag |= Update; + } + + if (typeof instance.getSnapshotBeforeUpdate === 'function') { + workInProgress.effectTag |= Snapshot; + } + } else { + // If an update was already in progress, we should schedule an Update + // effect even though we're bailing out, so that cWU/cDU are called. + if (typeof instance.componentDidUpdate === 'function') { + if (oldProps !== current.memoizedProps || oldState !== current.memoizedState) { + workInProgress.effectTag |= Update; + } + } + + if (typeof instance.getSnapshotBeforeUpdate === 'function') { + if (oldProps !== current.memoizedProps || oldState !== current.memoizedState) { + workInProgress.effectTag |= Snapshot; + } + } // If shouldComponentUpdate returned false, we should still update the + // memoized props/state to indicate that this work can be reused. + + workInProgress.memoizedProps = newProps; + workInProgress.memoizedState = newState; + } // Update the existing instance's state, props, and context pointers even + // if shouldComponentUpdate returns false. + + instance.props = newProps; + instance.state = newState; + instance.context = nextContext; + return shouldUpdate; + } + + var didWarnAboutMaps; + var didWarnAboutGenerators; + var didWarnAboutStringRefs; + var ownerHasKeyUseWarning; + var ownerHasFunctionTypeWarning; + + var warnForMissingKey = function (child) {}; + + { + didWarnAboutMaps = false; + didWarnAboutGenerators = false; + didWarnAboutStringRefs = {}; + /** + * Warn if there's no key explicitly set on dynamic arrays of children or + * object keys are not valid. This allows us to keep track of children between + * updates. + */ + + ownerHasKeyUseWarning = {}; + ownerHasFunctionTypeWarning = {}; + + warnForMissingKey = function (child) { + if (child === null || typeof child !== 'object') { + return; + } + + if (!child._store || child._store.validated || child.key != null) { + return; + } + + if (!(typeof child._store === 'object')) { + { + throw Error( + 'React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + + child._store.validated = true; + var currentComponentErrorInfo = + 'Each child in a list should have a unique ' + + '"key" prop. See https://fb.me/react-warning-keys for ' + + 'more information.' + + getCurrentFiberStackInDev(); + + if (ownerHasKeyUseWarning[currentComponentErrorInfo]) { + return; + } + + ownerHasKeyUseWarning[currentComponentErrorInfo] = true; + warning$1( + false, + 'Each child in a list should have a unique ' + + '"key" prop. See https://fb.me/react-warning-keys for ' + + 'more information.', + ); + }; + } + + var isArray = Array.isArray; + + function coerceRef(returnFiber, current$$1, element) { + var mixedRef = element.ref; + + if (mixedRef !== null && typeof mixedRef !== 'function' && typeof mixedRef !== 'object') { + { + // TODO: Clean this up once we turn on the string ref warning for + // everyone, because the strict mode case will no longer be relevant + if (returnFiber.mode & StrictMode || warnAboutStringRefs) { + var componentName = getComponentName(returnFiber.type) || 'Component'; + + if (!didWarnAboutStringRefs[componentName]) { + if (warnAboutStringRefs) { + warningWithoutStack$1( + false, + 'Component "%s" contains the string ref "%s". Support for string refs ' + + 'will be removed in a future major release. We recommend using ' + + 'useRef() or createRef() instead. ' + + 'Learn more about using refs safely here: ' + + 'https://fb.me/react-strict-mode-string-ref%s', + componentName, + mixedRef, + getStackByFiberInDevAndProd(returnFiber), + ); + } else { + warningWithoutStack$1( + false, + 'A string ref, "%s", has been found within a strict mode tree. ' + + 'String refs are a source of potential bugs and should be avoided. ' + + 'We recommend using useRef() or createRef() instead. ' + + 'Learn more about using refs safely here: ' + + 'https://fb.me/react-strict-mode-string-ref%s', + mixedRef, + getStackByFiberInDevAndProd(returnFiber), + ); + } + + didWarnAboutStringRefs[componentName] = true; + } + } + } + + if (element._owner) { + var owner = element._owner; + var inst; + + if (owner) { + var ownerFiber = owner; + + if (!(ownerFiber.tag === ClassComponent)) { + { + throw Error( + 'Function components cannot have refs. Did you mean to use React.forwardRef()?', + ); + } + } + + inst = ownerFiber.stateNode; + } + + if (!inst) { + { + throw Error( + 'Missing owner for string ref ' + + mixedRef + + '. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + + var stringRef = '' + mixedRef; // Check if previous string ref matches new string ref + + if ( + current$$1 !== null && + current$$1.ref !== null && + typeof current$$1.ref === 'function' && + current$$1.ref._stringRef === stringRef + ) { + return current$$1.ref; + } + + var ref = function (value) { + var refs = inst.refs; + + if (refs === emptyRefsObject) { + // This is a lazy pooled frozen object, so we need to initialize. + refs = inst.refs = {}; + } + + if (value === null) { + delete refs[stringRef]; + } else { + refs[stringRef] = value; + } + }; + + ref._stringRef = stringRef; + return ref; + } else { + if (!(typeof mixedRef === 'string')) { + { + throw Error( + 'Expected ref to be a function, a string, an object returned by React.createRef(), or null.', + ); + } + } + + if (!element._owner) { + { + throw Error( + 'Element ref was specified as a string (' + + mixedRef + + ") but no owner was set. This could happen for one of the following reasons:\n1. You may be adding a ref to a function component\n2. You may be adding a ref to a component that was not created inside a component's render method\n3. You have multiple copies of React loaded\nSee https://fb.me/react-refs-must-have-owner for more information.", + ); + } + } + } + } + + return mixedRef; + } + + function throwOnInvalidObjectType(returnFiber, newChild) { + if (returnFiber.type !== 'textarea') { + var addendum = ''; + + { + addendum = + ' If you meant to render a collection of children, use an array ' + + 'instead.' + + getCurrentFiberStackInDev(); + } + + { + { + throw Error( + 'Objects are not valid as a React child (found: ' + + (Object.prototype.toString.call(newChild) === '[object Object]' + ? 'object with keys {' + Object.keys(newChild).join(', ') + '}' + : newChild) + + ').' + + addendum, + ); + } + } + } + } + + function warnOnFunctionType() { + var currentComponentErrorInfo = + 'Functions are not valid as a React child. This may happen if ' + + 'you return a Component instead of <Component /> from render. ' + + 'Or maybe you meant to call this function rather than return it.' + + getCurrentFiberStackInDev(); + + if (ownerHasFunctionTypeWarning[currentComponentErrorInfo]) { + return; + } + + ownerHasFunctionTypeWarning[currentComponentErrorInfo] = true; + warning$1( + false, + 'Functions are not valid as a React child. This may happen if ' + + 'you return a Component instead of <Component /> from render. ' + + 'Or maybe you meant to call this function rather than return it.', + ); + } // This wrapper function exists because I expect to clone the code in each path + // to be able to optimize each path individually by branching early. This needs + // a compiler or we can do it manually. Helpers that don't need this branching + // live outside of this function. + + function ChildReconciler(shouldTrackSideEffects) { + function deleteChild(returnFiber, childToDelete) { + if (!shouldTrackSideEffects) { + // Noop. + return; + } // Deletions are added in reversed order so we add it to the front. + // At this point, the return fiber's effect list is empty except for + // deletions, so we can just append the deletion to the list. The remaining + // effects aren't added until the complete phase. Once we implement + // resuming, this may not be true. + + var last = returnFiber.lastEffect; + + if (last !== null) { + last.nextEffect = childToDelete; + returnFiber.lastEffect = childToDelete; + } else { + returnFiber.firstEffect = returnFiber.lastEffect = childToDelete; + } + + childToDelete.nextEffect = null; + childToDelete.effectTag = Deletion; + } + + function deleteRemainingChildren(returnFiber, currentFirstChild) { + if (!shouldTrackSideEffects) { + // Noop. + return null; + } // TODO: For the shouldClone case, this could be micro-optimized a bit by + // assuming that after the first child we've already added everything. + + var childToDelete = currentFirstChild; + + while (childToDelete !== null) { + deleteChild(returnFiber, childToDelete); + childToDelete = childToDelete.sibling; + } + + return null; + } + + function mapRemainingChildren(returnFiber, currentFirstChild) { + // Add the remaining children to a temporary map so that we can find them by + // keys quickly. Implicit (null) keys get added to this set with their index + // instead. + var existingChildren = new Map(); + var existingChild = currentFirstChild; + + while (existingChild !== null) { + if (existingChild.key !== null) { + existingChildren.set(existingChild.key, existingChild); + } else { + existingChildren.set(existingChild.index, existingChild); + } + + existingChild = existingChild.sibling; + } + + return existingChildren; + } + + function useFiber(fiber, pendingProps, expirationTime) { + // We currently set sibling to null and index to 0 here because it is easy + // to forget to do before returning it. E.g. for the single child case. + var clone = createWorkInProgress(fiber, pendingProps, expirationTime); + clone.index = 0; + clone.sibling = null; + return clone; + } + + function placeChild(newFiber, lastPlacedIndex, newIndex) { + newFiber.index = newIndex; + + if (!shouldTrackSideEffects) { + // Noop. + return lastPlacedIndex; + } + + var current$$1 = newFiber.alternate; + + if (current$$1 !== null) { + var oldIndex = current$$1.index; + + if (oldIndex < lastPlacedIndex) { + // This is a move. + newFiber.effectTag = Placement; + return lastPlacedIndex; + } else { + // This item can stay in place. + return oldIndex; + } + } else { + // This is an insertion. + newFiber.effectTag = Placement; + return lastPlacedIndex; + } + } + + function placeSingleChild(newFiber) { + // This is simpler for the single child case. We only need to do a + // placement for inserting new children. + if (shouldTrackSideEffects && newFiber.alternate === null) { + newFiber.effectTag = Placement; + } + + return newFiber; + } + + function updateTextNode(returnFiber, current$$1, textContent, expirationTime) { + if (current$$1 === null || current$$1.tag !== HostText) { + // Insert + var created = createFiberFromText(textContent, returnFiber.mode, expirationTime); + created.return = returnFiber; + return created; + } else { + // Update + var existing = useFiber(current$$1, textContent, expirationTime); + existing.return = returnFiber; + return existing; + } + } + + function updateElement(returnFiber, current$$1, element, expirationTime) { + if ( + current$$1 !== null && + (current$$1.elementType === element.type || // Keep this check inline so it only runs on the false path: + isCompatibleFamilyForHotReloading(current$$1, element)) + ) { + // Move based on index + var existing = useFiber(current$$1, element.props, expirationTime); + existing.ref = coerceRef(returnFiber, current$$1, element); + existing.return = returnFiber; + + { + existing._debugSource = element._source; + existing._debugOwner = element._owner; + } + + return existing; + } else { + // Insert + var created = createFiberFromElement(element, returnFiber.mode, expirationTime); + created.ref = coerceRef(returnFiber, current$$1, element); + created.return = returnFiber; + return created; + } + } + + function updatePortal(returnFiber, current$$1, portal, expirationTime) { + if ( + current$$1 === null || + current$$1.tag !== HostPortal || + current$$1.stateNode.containerInfo !== portal.containerInfo || + current$$1.stateNode.implementation !== portal.implementation + ) { + // Insert + var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime); + created.return = returnFiber; + return created; + } else { + // Update + var existing = useFiber(current$$1, portal.children || [], expirationTime); + existing.return = returnFiber; + return existing; + } + } + + function updateFragment(returnFiber, current$$1, fragment, expirationTime, key) { + if (current$$1 === null || current$$1.tag !== Fragment) { + // Insert + var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key); + created.return = returnFiber; + return created; + } else { + // Update + var existing = useFiber(current$$1, fragment, expirationTime); + existing.return = returnFiber; + return existing; + } + } + + function createChild(returnFiber, newChild, expirationTime) { + if (typeof newChild === 'string' || typeof newChild === 'number') { + // Text nodes don't have keys. If the previous node is implicitly keyed + // we can continue to replace it without aborting even if it is not a text + // node. + var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime); + created.return = returnFiber; + return created; + } + + if (typeof newChild === 'object' && newChild !== null) { + switch (newChild.$$typeof) { + case REACT_ELEMENT_TYPE: { + var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime); + + _created.ref = coerceRef(returnFiber, null, newChild); + _created.return = returnFiber; + return _created; + } + + case REACT_PORTAL_TYPE: { + var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime); + + _created2.return = returnFiber; + return _created2; + } + } + + if (isArray(newChild) || getIteratorFn(newChild)) { + var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null); + + _created3.return = returnFiber; + return _created3; + } + + throwOnInvalidObjectType(returnFiber, newChild); + } + + { + if (typeof newChild === 'function') { + warnOnFunctionType(); + } + } + + return null; + } + + function updateSlot(returnFiber, oldFiber, newChild, expirationTime) { + // Update the fiber if the keys match, otherwise return null. + var key = oldFiber !== null ? oldFiber.key : null; + + if (typeof newChild === 'string' || typeof newChild === 'number') { + // Text nodes don't have keys. If the previous node is implicitly keyed + // we can continue to replace it without aborting even if it is not a text + // node. + if (key !== null) { + return null; + } + + return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime); + } + + if (typeof newChild === 'object' && newChild !== null) { + switch (newChild.$$typeof) { + case REACT_ELEMENT_TYPE: { + if (newChild.key === key) { + if (newChild.type === REACT_FRAGMENT_TYPE) { + return updateFragment( + returnFiber, + oldFiber, + newChild.props.children, + expirationTime, + key, + ); + } + + return updateElement(returnFiber, oldFiber, newChild, expirationTime); + } else { + return null; + } + } + + case REACT_PORTAL_TYPE: { + if (newChild.key === key) { + return updatePortal(returnFiber, oldFiber, newChild, expirationTime); + } else { + return null; + } + } + } + + if (isArray(newChild) || getIteratorFn(newChild)) { + if (key !== null) { + return null; + } + + return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null); + } + + throwOnInvalidObjectType(returnFiber, newChild); + } + + { + if (typeof newChild === 'function') { + warnOnFunctionType(); + } + } + + return null; + } + + function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) { + if (typeof newChild === 'string' || typeof newChild === 'number') { + // Text nodes don't have keys, so we neither have to check the old nor + // new node for the key. If both are text nodes, they match. + var matchedFiber = existingChildren.get(newIdx) || null; + return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime); + } + + if (typeof newChild === 'object' && newChild !== null) { + switch (newChild.$$typeof) { + case REACT_ELEMENT_TYPE: { + var _matchedFiber = + existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null; + + if (newChild.type === REACT_FRAGMENT_TYPE) { + return updateFragment( + returnFiber, + _matchedFiber, + newChild.props.children, + expirationTime, + newChild.key, + ); + } + + return updateElement(returnFiber, _matchedFiber, newChild, expirationTime); + } + + case REACT_PORTAL_TYPE: { + var _matchedFiber2 = + existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null; + + return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime); + } + } + + if (isArray(newChild) || getIteratorFn(newChild)) { + var _matchedFiber3 = existingChildren.get(newIdx) || null; + + return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null); + } + + throwOnInvalidObjectType(returnFiber, newChild); + } + + { + if (typeof newChild === 'function') { + warnOnFunctionType(); + } + } + + return null; + } + /** + * Warns if there is a duplicate or missing key + */ + + function warnOnInvalidKey(child, knownKeys) { + { + if (typeof child !== 'object' || child === null) { + return knownKeys; + } + + switch (child.$$typeof) { + case REACT_ELEMENT_TYPE: + case REACT_PORTAL_TYPE: + warnForMissingKey(child); + var key = child.key; + + if (typeof key !== 'string') { + break; + } + + if (knownKeys === null) { + knownKeys = new Set(); + knownKeys.add(key); + break; + } + + if (!knownKeys.has(key)) { + knownKeys.add(key); + break; + } + + warning$1( + false, + 'Encountered two children with the same key, `%s`. ' + + 'Keys should be unique so that components maintain their identity ' + + 'across updates. Non-unique keys may cause children to be ' + + 'duplicated and/or omitted — the behavior is unsupported and ' + + 'could change in a future version.', + key, + ); + break; + + default: + break; + } + } + + return knownKeys; + } + + function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) { + // This algorithm can't optimize by searching from both ends since we + // don't have backpointers on fibers. I'm trying to see how far we can get + // with that model. If it ends up not being worth the tradeoffs, we can + // add it later. + // Even with a two ended optimization, we'd want to optimize for the case + // where there are few changes and brute force the comparison instead of + // going for the Map. It'd like to explore hitting that path first in + // forward-only mode and only go for the Map once we notice that we need + // lots of look ahead. This doesn't handle reversal as well as two ended + // search but that's unusual. Besides, for the two ended optimization to + // work on Iterables, we'd need to copy the whole set. + // In this first iteration, we'll just live with hitting the bad case + // (adding everything to a Map) in for every insert/move. + // If you change this code, also update reconcileChildrenIterator() which + // uses the same algorithm. + { + // First, validate keys. + var knownKeys = null; + + for (var i = 0; i < newChildren.length; i++) { + var child = newChildren[i]; + knownKeys = warnOnInvalidKey(child, knownKeys); + } + } + + var resultingFirstChild = null; + var previousNewFiber = null; + var oldFiber = currentFirstChild; + var lastPlacedIndex = 0; + var newIdx = 0; + var nextOldFiber = null; + + for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) { + if (oldFiber.index > newIdx) { + nextOldFiber = oldFiber; + oldFiber = null; + } else { + nextOldFiber = oldFiber.sibling; + } + + var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime); + + if (newFiber === null) { + // TODO: This breaks on empty slots like null children. That's + // unfortunate because it triggers the slow path all the time. We need + // a better way to communicate whether this was a miss or null, + // boolean, undefined, etc. + if (oldFiber === null) { + oldFiber = nextOldFiber; + } + + break; + } + + if (shouldTrackSideEffects) { + if (oldFiber && newFiber.alternate === null) { + // We matched the slot, but we didn't reuse the existing fiber, so we + // need to delete the existing child. + deleteChild(returnFiber, oldFiber); + } + } + + lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx); + + if (previousNewFiber === null) { + // TODO: Move out of the loop. This only happens for the first run. + resultingFirstChild = newFiber; + } else { + // TODO: Defer siblings if we're not at the right index for this slot. + // I.e. if we had null values before, then we want to defer this + // for each null value. However, we also don't want to call updateSlot + // with the previous one. + previousNewFiber.sibling = newFiber; + } + + previousNewFiber = newFiber; + oldFiber = nextOldFiber; + } + + if (newIdx === newChildren.length) { + // We've reached the end of the new children. We can delete the rest. + deleteRemainingChildren(returnFiber, oldFiber); + return resultingFirstChild; + } + + if (oldFiber === null) { + // If we don't have any more existing children we can choose a fast path + // since the rest will all be insertions. + for (; newIdx < newChildren.length; newIdx++) { + var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime); + + if (_newFiber === null) { + continue; + } + + lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx); + + if (previousNewFiber === null) { + // TODO: Move out of the loop. This only happens for the first run. + resultingFirstChild = _newFiber; + } else { + previousNewFiber.sibling = _newFiber; + } + + previousNewFiber = _newFiber; + } + + return resultingFirstChild; + } // Add all children to a key map for quick lookups. + + var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves. + + for (; newIdx < newChildren.length; newIdx++) { + var _newFiber2 = updateFromMap( + existingChildren, + returnFiber, + newIdx, + newChildren[newIdx], + expirationTime, + ); + + if (_newFiber2 !== null) { + if (shouldTrackSideEffects) { + if (_newFiber2.alternate !== null) { + // The new fiber is a work in progress, but if there exists a + // current, that means that we reused the fiber. We need to delete + // it from the child list so that we don't add it to the deletion + // list. + existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key); + } + } + + lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx); + + if (previousNewFiber === null) { + resultingFirstChild = _newFiber2; + } else { + previousNewFiber.sibling = _newFiber2; + } + + previousNewFiber = _newFiber2; + } + } + + if (shouldTrackSideEffects) { + // Any existing children that weren't consumed above were deleted. We need + // to add them to the deletion list. + existingChildren.forEach(function (child) { + return deleteChild(returnFiber, child); + }); + } + + return resultingFirstChild; + } + + function reconcileChildrenIterator( + returnFiber, + currentFirstChild, + newChildrenIterable, + expirationTime, + ) { + // This is the same implementation as reconcileChildrenArray(), + // but using the iterator instead. + var iteratorFn = getIteratorFn(newChildrenIterable); + + if (!(typeof iteratorFn === 'function')) { + { + throw Error( + 'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + + { + // We don't support rendering Generators because it's a mutation. + // See https://github.com/facebook/react/issues/12995 + if ( + typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag + newChildrenIterable[Symbol.toStringTag] === 'Generator' + ) { + !didWarnAboutGenerators + ? warning$1( + false, + 'Using Generators as children is unsupported and will likely yield ' + + 'unexpected results because enumerating a generator mutates it. ' + + 'You may convert it to an array with `Array.from()` or the ' + + '`[...spread]` operator before rendering. Keep in mind ' + + 'you might need to polyfill these features for older browsers.', + ) + : void 0; + didWarnAboutGenerators = true; + } // Warn about using Maps as children + + if (newChildrenIterable.entries === iteratorFn) { + !didWarnAboutMaps + ? warning$1( + false, + 'Using Maps as children is unsupported and will likely yield ' + + 'unexpected results. Convert it to a sequence/iterable of keyed ' + + 'ReactElements instead.', + ) + : void 0; + didWarnAboutMaps = true; + } // First, validate keys. + // We'll get a different iterator later for the main pass. + + var _newChildren = iteratorFn.call(newChildrenIterable); + + if (_newChildren) { + var knownKeys = null; + + var _step = _newChildren.next(); + + for (; !_step.done; _step = _newChildren.next()) { + var child = _step.value; + knownKeys = warnOnInvalidKey(child, knownKeys); + } + } + } + + var newChildren = iteratorFn.call(newChildrenIterable); + + if (!(newChildren != null)) { + { + throw Error('An iterable object provided no iterator.'); + } + } + + var resultingFirstChild = null; + var previousNewFiber = null; + var oldFiber = currentFirstChild; + var lastPlacedIndex = 0; + var newIdx = 0; + var nextOldFiber = null; + var step = newChildren.next(); + + for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) { + if (oldFiber.index > newIdx) { + nextOldFiber = oldFiber; + oldFiber = null; + } else { + nextOldFiber = oldFiber.sibling; + } + + var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime); + + if (newFiber === null) { + // TODO: This breaks on empty slots like null children. That's + // unfortunate because it triggers the slow path all the time. We need + // a better way to communicate whether this was a miss or null, + // boolean, undefined, etc. + if (oldFiber === null) { + oldFiber = nextOldFiber; + } + + break; + } + + if (shouldTrackSideEffects) { + if (oldFiber && newFiber.alternate === null) { + // We matched the slot, but we didn't reuse the existing fiber, so we + // need to delete the existing child. + deleteChild(returnFiber, oldFiber); + } + } + + lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx); + + if (previousNewFiber === null) { + // TODO: Move out of the loop. This only happens for the first run. + resultingFirstChild = newFiber; + } else { + // TODO: Defer siblings if we're not at the right index for this slot. + // I.e. if we had null values before, then we want to defer this + // for each null value. However, we also don't want to call updateSlot + // with the previous one. + previousNewFiber.sibling = newFiber; + } + + previousNewFiber = newFiber; + oldFiber = nextOldFiber; + } + + if (step.done) { + // We've reached the end of the new children. We can delete the rest. + deleteRemainingChildren(returnFiber, oldFiber); + return resultingFirstChild; + } + + if (oldFiber === null) { + // If we don't have any more existing children we can choose a fast path + // since the rest will all be insertions. + for (; !step.done; newIdx++, step = newChildren.next()) { + var _newFiber3 = createChild(returnFiber, step.value, expirationTime); + + if (_newFiber3 === null) { + continue; + } + + lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx); + + if (previousNewFiber === null) { + // TODO: Move out of the loop. This only happens for the first run. + resultingFirstChild = _newFiber3; + } else { + previousNewFiber.sibling = _newFiber3; + } + + previousNewFiber = _newFiber3; + } + + return resultingFirstChild; + } // Add all children to a key map for quick lookups. + + var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves. + + for (; !step.done; newIdx++, step = newChildren.next()) { + var _newFiber4 = updateFromMap( + existingChildren, + returnFiber, + newIdx, + step.value, + expirationTime, + ); + + if (_newFiber4 !== null) { + if (shouldTrackSideEffects) { + if (_newFiber4.alternate !== null) { + // The new fiber is a work in progress, but if there exists a + // current, that means that we reused the fiber. We need to delete + // it from the child list so that we don't add it to the deletion + // list. + existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key); + } + } + + lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx); + + if (previousNewFiber === null) { + resultingFirstChild = _newFiber4; + } else { + previousNewFiber.sibling = _newFiber4; + } + + previousNewFiber = _newFiber4; + } + } + + if (shouldTrackSideEffects) { + // Any existing children that weren't consumed above were deleted. We need + // to add them to the deletion list. + existingChildren.forEach(function (child) { + return deleteChild(returnFiber, child); + }); + } + + return resultingFirstChild; + } + + function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) { + // There's no need to check for keys on text nodes since we don't have a + // way to define them. + if (currentFirstChild !== null && currentFirstChild.tag === HostText) { + // We already have an existing node so let's just update it and delete + // the rest. + deleteRemainingChildren(returnFiber, currentFirstChild.sibling); + var existing = useFiber(currentFirstChild, textContent, expirationTime); + existing.return = returnFiber; + return existing; + } // The existing first child is not a text node so we need to create one + // and delete the existing ones. + + deleteRemainingChildren(returnFiber, currentFirstChild); + var created = createFiberFromText(textContent, returnFiber.mode, expirationTime); + created.return = returnFiber; + return created; + } + + function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) { + var key = element.key; + var child = currentFirstChild; + + while (child !== null) { + // TODO: If key === null and child.key === null, then this only applies to + // the first item in the list. + if (child.key === key) { + if ( + child.tag === Fragment + ? element.type === REACT_FRAGMENT_TYPE + : child.elementType === element.type || // Keep this check inline so it only runs on the false path: + isCompatibleFamilyForHotReloading(child, element) + ) { + deleteRemainingChildren(returnFiber, child.sibling); + var existing = useFiber( + child, + element.type === REACT_FRAGMENT_TYPE ? element.props.children : element.props, + expirationTime, + ); + existing.ref = coerceRef(returnFiber, child, element); + existing.return = returnFiber; + + { + existing._debugSource = element._source; + existing._debugOwner = element._owner; + } + + return existing; + } else { + deleteRemainingChildren(returnFiber, child); + break; + } + } else { + deleteChild(returnFiber, child); + } + + child = child.sibling; + } + + if (element.type === REACT_FRAGMENT_TYPE) { + var created = createFiberFromFragment( + element.props.children, + returnFiber.mode, + expirationTime, + element.key, + ); + created.return = returnFiber; + return created; + } else { + var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime); + + _created4.ref = coerceRef(returnFiber, currentFirstChild, element); + _created4.return = returnFiber; + return _created4; + } + } + + function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) { + var key = portal.key; + var child = currentFirstChild; + + while (child !== null) { + // TODO: If key === null and child.key === null, then this only applies to + // the first item in the list. + if (child.key === key) { + if ( + child.tag === HostPortal && + child.stateNode.containerInfo === portal.containerInfo && + child.stateNode.implementation === portal.implementation + ) { + deleteRemainingChildren(returnFiber, child.sibling); + var existing = useFiber(child, portal.children || [], expirationTime); + existing.return = returnFiber; + return existing; + } else { + deleteRemainingChildren(returnFiber, child); + break; + } + } else { + deleteChild(returnFiber, child); + } + + child = child.sibling; + } + + var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime); + created.return = returnFiber; + return created; + } // This API will tag the children with the side-effect of the reconciliation + // itself. They will be added to the side-effect list as we pass through the + // children and the parent. + + function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) { + // This function is not recursive. + // If the top level item is an array, we treat it as a set of children, + // not as a fragment. Nested arrays on the other hand will be treated as + // fragment nodes. Recursion happens at the normal flow. + // Handle top level unkeyed fragments as if they were arrays. + // This leads to an ambiguity between <>{[...]}</> and <>...</>. + // We treat the ambiguous cases above the same. + var isUnkeyedTopLevelFragment = + typeof newChild === 'object' && + newChild !== null && + newChild.type === REACT_FRAGMENT_TYPE && + newChild.key === null; + + if (isUnkeyedTopLevelFragment) { + newChild = newChild.props.children; + } // Handle object types + + var isObject = typeof newChild === 'object' && newChild !== null; + + if (isObject) { + switch (newChild.$$typeof) { + case REACT_ELEMENT_TYPE: + return placeSingleChild( + reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime), + ); + + case REACT_PORTAL_TYPE: + return placeSingleChild( + reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime), + ); + } + } + + if (typeof newChild === 'string' || typeof newChild === 'number') { + return placeSingleChild( + reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime), + ); + } + + if (isArray(newChild)) { + return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime); + } + + if (getIteratorFn(newChild)) { + return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime); + } + + if (isObject) { + throwOnInvalidObjectType(returnFiber, newChild); + } + + { + if (typeof newChild === 'function') { + warnOnFunctionType(); + } + } + + if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) { + // If the new child is undefined, and the return fiber is a composite + // component, throw an error. If Fiber return types are disabled, + // we already threw above. + switch (returnFiber.tag) { + case ClassComponent: { + { + var instance = returnFiber.stateNode; + + if (instance.render._isMockFunction) { + // We allow auto-mocks to proceed as if they're returning null. + break; + } + } + } + // Intentionally fall through to the next case, which handles both + // functions and classes + // eslint-disable-next-lined no-fallthrough + + case FunctionComponent: { + var Component = returnFiber.type; + + { + { + throw Error( + (Component.displayName || Component.name || 'Component') + + '(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.', + ); + } + } + } + } + } // Remaining cases are all treated as empty. + + return deleteRemainingChildren(returnFiber, currentFirstChild); + } + + return reconcileChildFibers; + } + + var reconcileChildFibers = ChildReconciler(true); + var mountChildFibers = ChildReconciler(false); + function cloneChildFibers(current$$1, workInProgress) { + if (!(current$$1 === null || workInProgress.child === current$$1.child)) { + { + throw Error('Resuming work not yet implemented.'); + } + } + + if (workInProgress.child === null) { + return; + } + + var currentChild = workInProgress.child; + var newChild = createWorkInProgress( + currentChild, + currentChild.pendingProps, + currentChild.expirationTime, + ); + workInProgress.child = newChild; + newChild.return = workInProgress; + + while (currentChild.sibling !== null) { + currentChild = currentChild.sibling; + newChild = newChild.sibling = createWorkInProgress( + currentChild, + currentChild.pendingProps, + currentChild.expirationTime, + ); + newChild.return = workInProgress; + } + + newChild.sibling = null; + } // Reset a workInProgress child set to prepare it for a second pass. + + function resetChildFibers(workInProgress, renderExpirationTime) { + var child = workInProgress.child; + + while (child !== null) { + resetWorkInProgress(child, renderExpirationTime); + child = child.sibling; + } + } + + var NO_CONTEXT = {}; + var contextStackCursor$1 = createCursor(NO_CONTEXT); + var contextFiberStackCursor = createCursor(NO_CONTEXT); + var rootInstanceStackCursor = createCursor(NO_CONTEXT); + + function requiredContext(c) { + if (!(c !== NO_CONTEXT)) { + { + throw Error( + 'Expected host context to exist. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + + return c; + } + + function getRootHostContainer() { + var rootInstance = requiredContext(rootInstanceStackCursor.current); + return rootInstance; + } + + function pushHostContainer(fiber, nextRootInstance) { + // Push current root instance onto the stack; + // This allows us to reset root when portals are popped. + push(rootInstanceStackCursor, nextRootInstance, fiber); // Track the context and the Fiber that provided it. + // This enables us to pop only Fibers that provide unique contexts. + + push(contextFiberStackCursor, fiber, fiber); // Finally, we need to push the host context to the stack. + // However, we can't just call getRootHostContext() and push it because + // we'd have a different number of entries on the stack depending on + // whether getRootHostContext() throws somewhere in renderer code or not. + // So we push an empty value first. This lets us safely unwind on errors. + + push(contextStackCursor$1, NO_CONTEXT, fiber); + var nextRootContext = getRootHostContext(nextRootInstance); // Now that we know this function doesn't throw, replace it. + + pop(contextStackCursor$1, fiber); + push(contextStackCursor$1, nextRootContext, fiber); + } + + function popHostContainer(fiber) { + pop(contextStackCursor$1, fiber); + pop(contextFiberStackCursor, fiber); + pop(rootInstanceStackCursor, fiber); + } + + function getHostContext() { + var context = requiredContext(contextStackCursor$1.current); + return context; + } + + function pushHostContext(fiber) { + var rootInstance = requiredContext(rootInstanceStackCursor.current); + var context = requiredContext(contextStackCursor$1.current); + var nextContext = getChildHostContext(context, fiber.type, rootInstance); // Don't push this Fiber's context unless it's unique. + + if (context === nextContext) { + return; + } // Track the context and the Fiber that provided it. + // This enables us to pop only Fibers that provide unique contexts. + + push(contextFiberStackCursor, fiber, fiber); + push(contextStackCursor$1, nextContext, fiber); + } + + function popHostContext(fiber) { + // Do not pop unless this Fiber provided the current context. + // pushHostContext() only pushes Fibers that provide unique contexts. + if (contextFiberStackCursor.current !== fiber) { + return; + } + + pop(contextStackCursor$1, fiber); + pop(contextFiberStackCursor, fiber); + } + + var DefaultSuspenseContext = 0; // The Suspense Context is split into two parts. The lower bits is + // inherited deeply down the subtree. The upper bits only affect + // this immediate suspense boundary and gets reset each new + // boundary or suspense list. + + var SubtreeSuspenseContextMask = 1; // Subtree Flags: + // InvisibleParentSuspenseContext indicates that one of our parent Suspense + // boundaries is not currently showing visible main content. + // Either because it is already showing a fallback or is not mounted at all. + // We can use this to determine if it is desirable to trigger a fallback at + // the parent. If not, then we might need to trigger undesirable boundaries + // and/or suspend the commit to avoid hiding the parent content. + + var InvisibleParentSuspenseContext = 1; // Shallow Flags: + // ForceSuspenseFallback can be used by SuspenseList to force newly added + // items into their fallback state during one of the render passes. + + var ForceSuspenseFallback = 2; + var suspenseStackCursor = createCursor(DefaultSuspenseContext); + function hasSuspenseContext(parentContext, flag) { + return (parentContext & flag) !== 0; + } + function setDefaultShallowSuspenseContext(parentContext) { + return parentContext & SubtreeSuspenseContextMask; + } + function setShallowSuspenseContext(parentContext, shallowContext) { + return (parentContext & SubtreeSuspenseContextMask) | shallowContext; + } + function addSubtreeSuspenseContext(parentContext, subtreeContext) { + return parentContext | subtreeContext; + } + function pushSuspenseContext(fiber, newContext) { + push(suspenseStackCursor, newContext, fiber); + } + function popSuspenseContext(fiber) { + pop(suspenseStackCursor, fiber); + } + + function shouldCaptureSuspense(workInProgress, hasInvisibleParent) { + // If it was the primary children that just suspended, capture and render the + // fallback. Otherwise, don't capture and bubble to the next boundary. + var nextState = workInProgress.memoizedState; + + if (nextState !== null) { + if (nextState.dehydrated !== null) { + // A dehydrated boundary always captures. + return true; + } + + return false; + } + + var props = workInProgress.memoizedProps; // In order to capture, the Suspense component must have a fallback prop. + + if (props.fallback === undefined) { + return false; + } // Regular boundaries always capture. + + if (props.unstable_avoidThisFallback !== true) { + return true; + } // If it's a boundary we should avoid, then we prefer to bubble up to the + // parent boundary if it is currently invisible. + + if (hasInvisibleParent) { + return false; + } // If the parent is not able to handle it, we must handle it. + + return true; + } + function findFirstSuspended(row) { + var node = row; + + while (node !== null) { + if (node.tag === SuspenseComponent) { + var state = node.memoizedState; + + if (state !== null) { + var dehydrated = state.dehydrated; + + if ( + dehydrated === null || + isSuspenseInstancePending(dehydrated) || + isSuspenseInstanceFallback(dehydrated) + ) { + return node; + } + } + } else if ( + node.tag === SuspenseListComponent && // revealOrder undefined can't be trusted because it don't + // keep track of whether it suspended or not. + node.memoizedProps.revealOrder !== undefined + ) { + var didSuspend = (node.effectTag & DidCapture) !== NoEffect; + + if (didSuspend) { + return node; + } + } else if (node.child !== null) { + node.child.return = node; + node = node.child; + continue; + } + + if (node === row) { + return null; + } + + while (node.sibling === null) { + if (node.return === null || node.return === row) { + return null; + } + + node = node.return; + } + + node.sibling.return = node.return; + node = node.sibling; + } + + return null; + } + + var emptyObject = {}; + var isArray$2 = Array.isArray; + function createResponderInstance(responder, responderProps, responderState, fiber) { + return { + fiber: fiber, + props: responderProps, + responder: responder, + rootEventTypes: null, + state: responderState, + }; + } + + function mountEventResponder$1( + responder, + responderProps, + fiber, + respondersMap, + rootContainerInstance, + ) { + var responderState = emptyObject; + var getInitialState = responder.getInitialState; + + if (getInitialState !== null) { + responderState = getInitialState(responderProps); + } + + var responderInstance = createResponderInstance(responder, responderProps, responderState, fiber); + + if (!rootContainerInstance) { + var node = fiber; + + while (node !== null) { + var tag = node.tag; + + if (tag === HostComponent) { + rootContainerInstance = node.stateNode; + break; + } else if (tag === HostRoot) { + rootContainerInstance = node.stateNode.containerInfo; + break; + } + + node = node.return; + } + } + + mountResponderInstance( + responder, + responderInstance, + responderProps, + responderState, + rootContainerInstance, + ); + respondersMap.set(responder, responderInstance); + } + + function updateEventListener( + listener, + fiber, + visistedResponders, + respondersMap, + rootContainerInstance, + ) { + var responder; + var props; + + if (listener) { + responder = listener.responder; + props = listener.props; + } + + if (!(responder && responder.$$typeof === REACT_RESPONDER_TYPE)) { + { + throw Error( + 'An invalid value was used as an event listener. Expect one or many event listeners created via React.unstable_useResponder().', + ); + } + } + + var listenerProps = props; + + if (visistedResponders.has(responder)) { + // show warning + { + warning$1( + false, + 'Duplicate event responder "%s" found in event listeners. ' + + 'Event listeners passed to elements cannot use the same event responder more than once.', + responder.displayName, + ); + } + + return; + } + + visistedResponders.add(responder); + var responderInstance = respondersMap.get(responder); + + if (responderInstance === undefined) { + // Mount (happens in either complete or commit phase) + mountEventResponder$1(responder, listenerProps, fiber, respondersMap, rootContainerInstance); + } else { + // Update (happens during commit phase only) + responderInstance.props = listenerProps; + responderInstance.fiber = fiber; + } + } + + function updateEventListeners(listeners, fiber, rootContainerInstance) { + var visistedResponders = new Set(); + var dependencies = fiber.dependencies; + + if (listeners != null) { + if (dependencies === null) { + dependencies = fiber.dependencies = { + expirationTime: NoWork, + firstContext: null, + responders: new Map(), + }; + } + + var respondersMap = dependencies.responders; + + if (respondersMap === null) { + respondersMap = new Map(); + } + + if (isArray$2(listeners)) { + for (var i = 0, length = listeners.length; i < length; i++) { + var listener = listeners[i]; + updateEventListener( + listener, + fiber, + visistedResponders, + respondersMap, + rootContainerInstance, + ); + } + } else { + updateEventListener( + listeners, + fiber, + visistedResponders, + respondersMap, + rootContainerInstance, + ); + } + } + + if (dependencies !== null) { + var _respondersMap = dependencies.responders; + + if (_respondersMap !== null) { + // Unmount + var mountedResponders = Array.from(_respondersMap.keys()); + + for (var _i = 0, _length = mountedResponders.length; _i < _length; _i++) { + var mountedResponder = mountedResponders[_i]; + + if (!visistedResponders.has(mountedResponder)) { + var responderInstance = _respondersMap.get(mountedResponder); + + unmountResponderInstance(responderInstance); + + _respondersMap.delete(mountedResponder); + } + } + } + } + } + function createResponderListener(responder, props) { + var eventResponderListener = { + responder: responder, + props: props, + }; + + { + Object.freeze(eventResponderListener); + } + + return eventResponderListener; + } + + var NoEffect$1 = + /* */ + 0; + var UnmountSnapshot = + /* */ + 2; + var UnmountMutation = + /* */ + 4; + var MountMutation = + /* */ + 8; + var UnmountLayout = + /* */ + 16; + var MountLayout = + /* */ + 32; + var MountPassive = + /* */ + 64; + var UnmountPassive = + /* */ + 128; + + var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher; + var ReactCurrentBatchConfig$1 = ReactSharedInternals.ReactCurrentBatchConfig; + var didWarnAboutMismatchedHooksForComponent; + + { + didWarnAboutMismatchedHooksForComponent = new Set(); + } + + // These are set right before calling the component. + var renderExpirationTime$1 = NoWork; // The work-in-progress fiber. I've named it differently to distinguish it from + // the work-in-progress hook. + + var currentlyRenderingFiber$1 = null; // Hooks are stored as a linked list on the fiber's memoizedState field. The + // current hook list is the list that belongs to the current fiber. The + // work-in-progress hook list is a new list that will be added to the + // work-in-progress fiber. + + var currentHook = null; + var nextCurrentHook = null; + var firstWorkInProgressHook = null; + var workInProgressHook = null; + var nextWorkInProgressHook = null; + var remainingExpirationTime = NoWork; + var componentUpdateQueue = null; + var sideEffectTag = 0; // Updates scheduled during render will trigger an immediate re-render at the + // end of the current pass. We can't store these updates on the normal queue, + // because if the work is aborted, they should be discarded. Because this is + // a relatively rare case, we also don't want to add an additional field to + // either the hook or queue object types. So we store them in a lazily create + // map of queue -> render-phase updates, which are discarded once the component + // completes without re-rendering. + // Whether an update was scheduled during the currently executing render pass. + + var didScheduleRenderPhaseUpdate = false; // Lazily created map of render-phase updates + + var renderPhaseUpdates = null; // Counter to prevent infinite loops. + + var numberOfReRenders = 0; + var RE_RENDER_LIMIT = 25; // In DEV, this is the name of the currently executing primitive hook + + var currentHookNameInDev = null; // In DEV, this list ensures that hooks are called in the same order between renders. + // The list stores the order of hooks used during the initial render (mount). + // Subsequent renders (updates) reference this list. + + var hookTypesDev = null; + var hookTypesUpdateIndexDev = -1; // In DEV, this tracks whether currently rendering component needs to ignore + // the dependencies for Hooks that need them (e.g. useEffect or useMemo). + // When true, such Hooks will always be "remounted". Only used during hot reload. + + var ignorePreviousDependencies = false; + + function mountHookTypesDev() { + { + var hookName = currentHookNameInDev; + + if (hookTypesDev === null) { + hookTypesDev = [hookName]; + } else { + hookTypesDev.push(hookName); + } + } + } + + function updateHookTypesDev() { + { + var hookName = currentHookNameInDev; + + if (hookTypesDev !== null) { + hookTypesUpdateIndexDev++; + + if (hookTypesDev[hookTypesUpdateIndexDev] !== hookName) { + warnOnHookMismatchInDev(hookName); + } + } + } + } + + function checkDepsAreArrayDev(deps) { + { + if (deps !== undefined && deps !== null && !Array.isArray(deps)) { + // Verify deps, but only on mount to avoid extra checks. + // It's unlikely their type would change as usually you define them inline. + warning$1( + false, + '%s received a final argument that is not an array (instead, received `%s`). When ' + + 'specified, the final argument must be an array.', + currentHookNameInDev, + typeof deps, + ); + } + } + } + + function warnOnHookMismatchInDev(currentHookName) { + { + var componentName = getComponentName(currentlyRenderingFiber$1.type); + + if (!didWarnAboutMismatchedHooksForComponent.has(componentName)) { + didWarnAboutMismatchedHooksForComponent.add(componentName); + + if (hookTypesDev !== null) { + var table = ''; + var secondColumnStart = 30; + + for (var i = 0; i <= hookTypesUpdateIndexDev; i++) { + var oldHookName = hookTypesDev[i]; + var newHookName = i === hookTypesUpdateIndexDev ? currentHookName : oldHookName; + var row = i + 1 + '. ' + oldHookName; // Extra space so second column lines up + // lol @ IE not supporting String#repeat + + while (row.length < secondColumnStart) { + row += ' '; + } + + row += newHookName + '\n'; + table += row; + } + + warning$1( + false, + 'React has detected a change in the order of Hooks called by %s. ' + + 'This will lead to bugs and errors if not fixed. ' + + 'For more information, read the Rules of Hooks: https://fb.me/rules-of-hooks\n\n' + + ' Previous render Next render\n' + + ' ------------------------------------------------------\n' + + '%s' + + ' ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', + componentName, + table, + ); + } + } + } + } + + function throwInvalidHookError() { + { + { + throw Error( + 'Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.', + ); + } + } + } + + function areHookInputsEqual(nextDeps, prevDeps) { + { + if (ignorePreviousDependencies) { + // Only true when this component is being hot reloaded. + return false; + } + } + + if (prevDeps === null) { + { + warning$1( + false, + '%s received a final argument during this render, but not during ' + + 'the previous render. Even though the final argument is optional, ' + + 'its type cannot change between renders.', + currentHookNameInDev, + ); + } + + return false; + } + + { + // Don't bother comparing lengths in prod because these arrays should be + // passed inline. + if (nextDeps.length !== prevDeps.length) { + warning$1( + false, + 'The final argument passed to %s changed size between renders. The ' + + 'order and size of this array must remain constant.\n\n' + + 'Previous: %s\n' + + 'Incoming: %s', + currentHookNameInDev, + '[' + prevDeps.join(', ') + ']', + '[' + nextDeps.join(', ') + ']', + ); + } + } + + for (var i = 0; i < prevDeps.length && i < nextDeps.length; i++) { + if (is$1(nextDeps[i], prevDeps[i])) { + continue; + } + + return false; + } + + return true; + } + + function renderWithHooks( + current, + workInProgress, + Component, + props, + refOrContext, + nextRenderExpirationTime, + ) { + renderExpirationTime$1 = nextRenderExpirationTime; + currentlyRenderingFiber$1 = workInProgress; + nextCurrentHook = current !== null ? current.memoizedState : null; + + { + hookTypesDev = current !== null ? current._debugHookTypes : null; + hookTypesUpdateIndexDev = -1; // Used for hot reloading: + + ignorePreviousDependencies = current !== null && current.type !== workInProgress.type; + } // The following should have already been reset + // currentHook = null; + // workInProgressHook = null; + // remainingExpirationTime = NoWork; + // componentUpdateQueue = null; + // didScheduleRenderPhaseUpdate = false; + // renderPhaseUpdates = null; + // numberOfReRenders = 0; + // sideEffectTag = 0; + // TODO Warn if no hooks are used at all during mount, then some are used during update. + // Currently we will identify the update render as a mount because nextCurrentHook === null. + // This is tricky because it's valid for certain types of components (e.g. React.lazy) + // Using nextCurrentHook to differentiate between mount/update only works if at least one stateful hook is used. + // Non-stateful hooks (e.g. context) don't get added to memoizedState, + // so nextCurrentHook would be null during updates and mounts. + + { + if (nextCurrentHook !== null) { + ReactCurrentDispatcher$1.current = HooksDispatcherOnUpdateInDEV; + } else if (hookTypesDev !== null) { + // This dispatcher handles an edge case where a component is updating, + // but no stateful hooks have been used. + // We want to match the production code behavior (which will use HooksDispatcherOnMount), + // but with the extra DEV validation to ensure hooks ordering hasn't changed. + // This dispatcher does that. + ReactCurrentDispatcher$1.current = HooksDispatcherOnMountWithHookTypesInDEV; + } else { + ReactCurrentDispatcher$1.current = HooksDispatcherOnMountInDEV; + } + } + + var children = Component(props, refOrContext); + + if (didScheduleRenderPhaseUpdate) { + do { + didScheduleRenderPhaseUpdate = false; + numberOfReRenders += 1; + + { + // Even when hot reloading, allow dependencies to stabilize + // after first render to prevent infinite render phase updates. + ignorePreviousDependencies = false; + } // Start over from the beginning of the list + + nextCurrentHook = current !== null ? current.memoizedState : null; + nextWorkInProgressHook = firstWorkInProgressHook; + currentHook = null; + workInProgressHook = null; + componentUpdateQueue = null; + + { + // Also validate hook order for cascading updates. + hookTypesUpdateIndexDev = -1; + } + + ReactCurrentDispatcher$1.current = HooksDispatcherOnUpdateInDEV; + children = Component(props, refOrContext); + } while (didScheduleRenderPhaseUpdate); + + renderPhaseUpdates = null; + numberOfReRenders = 0; + } // We can assume the previous dispatcher is always this one, since we set it + // at the beginning of the render phase and there's no re-entrancy. + + ReactCurrentDispatcher$1.current = ContextOnlyDispatcher; + var renderedWork = currentlyRenderingFiber$1; + renderedWork.memoizedState = firstWorkInProgressHook; + renderedWork.expirationTime = remainingExpirationTime; + renderedWork.updateQueue = componentUpdateQueue; + renderedWork.effectTag |= sideEffectTag; + + { + renderedWork._debugHookTypes = hookTypesDev; + } // This check uses currentHook so that it works the same in DEV and prod bundles. + // hookTypesDev could catch more cases (e.g. context) but only in DEV bundles. + + var didRenderTooFewHooks = currentHook !== null && currentHook.next !== null; + renderExpirationTime$1 = NoWork; + currentlyRenderingFiber$1 = null; + currentHook = null; + nextCurrentHook = null; + firstWorkInProgressHook = null; + workInProgressHook = null; + nextWorkInProgressHook = null; + + { + currentHookNameInDev = null; + hookTypesDev = null; + hookTypesUpdateIndexDev = -1; + } + + remainingExpirationTime = NoWork; + componentUpdateQueue = null; + sideEffectTag = 0; // These were reset above + // didScheduleRenderPhaseUpdate = false; + // renderPhaseUpdates = null; + // numberOfReRenders = 0; + + if (!!didRenderTooFewHooks) { + { + throw Error( + 'Rendered fewer hooks than expected. This may be caused by an accidental early return statement.', + ); + } + } + + return children; + } + function bailoutHooks(current, workInProgress, expirationTime) { + workInProgress.updateQueue = current.updateQueue; + workInProgress.effectTag &= ~(Passive | Update); + + if (current.expirationTime <= expirationTime) { + current.expirationTime = NoWork; + } + } + function resetHooks() { + // We can assume the previous dispatcher is always this one, since we set it + // at the beginning of the render phase and there's no re-entrancy. + ReactCurrentDispatcher$1.current = ContextOnlyDispatcher; // This is used to reset the state of this module when a component throws. + // It's also called inside mountIndeterminateComponent if we determine the + // component is a module-style component. + + renderExpirationTime$1 = NoWork; + currentlyRenderingFiber$1 = null; + currentHook = null; + nextCurrentHook = null; + firstWorkInProgressHook = null; + workInProgressHook = null; + nextWorkInProgressHook = null; + + { + hookTypesDev = null; + hookTypesUpdateIndexDev = -1; + currentHookNameInDev = null; + } + + remainingExpirationTime = NoWork; + componentUpdateQueue = null; + sideEffectTag = 0; + didScheduleRenderPhaseUpdate = false; + renderPhaseUpdates = null; + numberOfReRenders = 0; + } + + function mountWorkInProgressHook() { + var hook = { + memoizedState: null, + baseState: null, + queue: null, + baseUpdate: null, + next: null, + }; + + if (workInProgressHook === null) { + // This is the first hook in the list + firstWorkInProgressHook = workInProgressHook = hook; + } else { + // Append to the end of the list + workInProgressHook = workInProgressHook.next = hook; + } + + return workInProgressHook; + } + + function updateWorkInProgressHook() { + // This function is used both for updates and for re-renders triggered by a + // render phase update. It assumes there is either a current hook we can + // clone, or a work-in-progress hook from a previous render pass that we can + // use as a base. When we reach the end of the base list, we must switch to + // the dispatcher used for mounts. + if (nextWorkInProgressHook !== null) { + // There's already a work-in-progress. Reuse it. + workInProgressHook = nextWorkInProgressHook; + nextWorkInProgressHook = workInProgressHook.next; + currentHook = nextCurrentHook; + nextCurrentHook = currentHook !== null ? currentHook.next : null; + } else { + // Clone from the current hook. + if (!(nextCurrentHook !== null)) { + { + throw Error('Rendered more hooks than during the previous render.'); + } + } + + currentHook = nextCurrentHook; + var newHook = { + memoizedState: currentHook.memoizedState, + baseState: currentHook.baseState, + queue: currentHook.queue, + baseUpdate: currentHook.baseUpdate, + next: null, + }; + + if (workInProgressHook === null) { + // This is the first hook in the list. + workInProgressHook = firstWorkInProgressHook = newHook; + } else { + // Append to the end of the list. + workInProgressHook = workInProgressHook.next = newHook; + } + + nextCurrentHook = currentHook.next; + } + + return workInProgressHook; + } + + function createFunctionComponentUpdateQueue() { + return { + lastEffect: null, + }; + } + + function basicStateReducer(state, action) { + return typeof action === 'function' ? action(state) : action; + } + + function mountReducer(reducer, initialArg, init) { + var hook = mountWorkInProgressHook(); + var initialState; + + if (init !== undefined) { + initialState = init(initialArg); + } else { + initialState = initialArg; + } + + hook.memoizedState = hook.baseState = initialState; + var queue = (hook.queue = { + last: null, + dispatch: null, + lastRenderedReducer: reducer, + lastRenderedState: initialState, + }); + var dispatch = (queue.dispatch = dispatchAction.bind( + null, // Flow doesn't know this is non-null, but we do. + currentlyRenderingFiber$1, + queue, + )); + return [hook.memoizedState, dispatch]; + } + + function updateReducer(reducer, initialArg, init) { + var hook = updateWorkInProgressHook(); + var queue = hook.queue; + + if (!(queue !== null)) { + { + throw Error('Should have a queue. This is likely a bug in React. Please file an issue.'); + } + } + + queue.lastRenderedReducer = reducer; + + if (numberOfReRenders > 0) { + // This is a re-render. Apply the new render phase updates to the previous + // work-in-progress hook. + var _dispatch = queue.dispatch; + + if (renderPhaseUpdates !== null) { + // Render phase updates are stored in a map of queue -> linked list + var firstRenderPhaseUpdate = renderPhaseUpdates.get(queue); + + if (firstRenderPhaseUpdate !== undefined) { + renderPhaseUpdates.delete(queue); + var newState = hook.memoizedState; + var update = firstRenderPhaseUpdate; + + do { + // Process this render phase update. We don't have to check the + // priority because it will always be the same as the current + // render's. + var action = update.action; + newState = reducer(newState, action); + update = update.next; + } while (update !== null); // Mark that the fiber performed work, but only if the new state is + // different from the current state. + + if (!is$1(newState, hook.memoizedState)) { + markWorkInProgressReceivedUpdate(); + } + + hook.memoizedState = newState; // Don't persist the state accumulated from the render phase updates to + // the base state unless the queue is empty. + // TODO: Not sure if this is the desired semantics, but it's what we + // do for gDSFP. I can't remember why. + + if (hook.baseUpdate === queue.last) { + hook.baseState = newState; + } + + queue.lastRenderedState = newState; + return [newState, _dispatch]; + } + } + + return [hook.memoizedState, _dispatch]; + } // The last update in the entire queue + + var last = queue.last; // The last update that is part of the base state. + + var baseUpdate = hook.baseUpdate; + var baseState = hook.baseState; // Find the first unprocessed update. + + var first; + + if (baseUpdate !== null) { + if (last !== null) { + // For the first update, the queue is a circular linked list where + // `queue.last.next = queue.first`. Once the first update commits, and + // the `baseUpdate` is no longer empty, we can unravel the list. + last.next = null; + } + + first = baseUpdate.next; + } else { + first = last !== null ? last.next : null; + } + + if (first !== null) { + var _newState = baseState; + var newBaseState = null; + var newBaseUpdate = null; + var prevUpdate = baseUpdate; + var _update = first; + var didSkip = false; + + do { + var updateExpirationTime = _update.expirationTime; + + if (updateExpirationTime < renderExpirationTime$1) { + // Priority is insufficient. Skip this update. If this is the first + // skipped update, the previous update/state is the new base + // update/state. + if (!didSkip) { + didSkip = true; + newBaseUpdate = prevUpdate; + newBaseState = _newState; + } // Update the remaining priority in the queue. + + if (updateExpirationTime > remainingExpirationTime) { + remainingExpirationTime = updateExpirationTime; + markUnprocessedUpdateTime(remainingExpirationTime); + } + } else { + // This update does have sufficient priority. + // Mark the event time of this update as relevant to this render pass. + // TODO: This should ideally use the true event time of this update rather than + // its priority which is a derived and not reverseable value. + // TODO: We should skip this update if it was already committed but currently + // we have no way of detecting the difference between a committed and suspended + // update here. + markRenderEventTimeAndConfig(updateExpirationTime, _update.suspenseConfig); // Process this update. + + if (_update.eagerReducer === reducer) { + // If this update was processed eagerly, and its reducer matches the + // current reducer, we can use the eagerly computed state. + _newState = _update.eagerState; + } else { + var _action = _update.action; + _newState = reducer(_newState, _action); + } + } + + prevUpdate = _update; + _update = _update.next; + } while (_update !== null && _update !== first); + + if (!didSkip) { + newBaseUpdate = prevUpdate; + newBaseState = _newState; + } // Mark that the fiber performed work, but only if the new state is + // different from the current state. + + if (!is$1(_newState, hook.memoizedState)) { + markWorkInProgressReceivedUpdate(); + } + + hook.memoizedState = _newState; + hook.baseUpdate = newBaseUpdate; + hook.baseState = newBaseState; + queue.lastRenderedState = _newState; + } + + var dispatch = queue.dispatch; + return [hook.memoizedState, dispatch]; + } + + function mountState(initialState) { + var hook = mountWorkInProgressHook(); + + if (typeof initialState === 'function') { + initialState = initialState(); + } + + hook.memoizedState = hook.baseState = initialState; + var queue = (hook.queue = { + last: null, + dispatch: null, + lastRenderedReducer: basicStateReducer, + lastRenderedState: initialState, + }); + var dispatch = (queue.dispatch = dispatchAction.bind( + null, // Flow doesn't know this is non-null, but we do. + currentlyRenderingFiber$1, + queue, + )); + return [hook.memoizedState, dispatch]; + } + + function updateState(initialState) { + return updateReducer(basicStateReducer, initialState); + } + + function pushEffect(tag, create, destroy, deps) { + var effect = { + tag: tag, + create: create, + destroy: destroy, + deps: deps, + // Circular + next: null, + }; + + if (componentUpdateQueue === null) { + componentUpdateQueue = createFunctionComponentUpdateQueue(); + componentUpdateQueue.lastEffect = effect.next = effect; + } else { + var lastEffect = componentUpdateQueue.lastEffect; + + if (lastEffect === null) { + componentUpdateQueue.lastEffect = effect.next = effect; + } else { + var firstEffect = lastEffect.next; + lastEffect.next = effect; + effect.next = firstEffect; + componentUpdateQueue.lastEffect = effect; + } + } + + return effect; + } + + function mountRef(initialValue) { + var hook = mountWorkInProgressHook(); + var ref = { + current: initialValue, + }; + + { + Object.seal(ref); + } + + hook.memoizedState = ref; + return ref; + } + + function updateRef(initialValue) { + var hook = updateWorkInProgressHook(); + return hook.memoizedState; + } + + function mountEffectImpl(fiberEffectTag, hookEffectTag, create, deps) { + var hook = mountWorkInProgressHook(); + var nextDeps = deps === undefined ? null : deps; + sideEffectTag |= fiberEffectTag; + hook.memoizedState = pushEffect(hookEffectTag, create, undefined, nextDeps); + } + + function updateEffectImpl(fiberEffectTag, hookEffectTag, create, deps) { + var hook = updateWorkInProgressHook(); + var nextDeps = deps === undefined ? null : deps; + var destroy = undefined; + + if (currentHook !== null) { + var prevEffect = currentHook.memoizedState; + destroy = prevEffect.destroy; + + if (nextDeps !== null) { + var prevDeps = prevEffect.deps; + + if (areHookInputsEqual(nextDeps, prevDeps)) { + pushEffect(NoEffect$1, create, destroy, nextDeps); + return; + } + } + } + + sideEffectTag |= fiberEffectTag; + hook.memoizedState = pushEffect(hookEffectTag, create, destroy, nextDeps); + } + + function mountEffect(create, deps) { + { + // $FlowExpectedError - jest isn't a global, and isn't recognized outside of tests + if ('undefined' !== typeof jest) { + warnIfNotCurrentlyActingEffectsInDEV(currentlyRenderingFiber$1); + } + } + + return mountEffectImpl(Update | Passive, UnmountPassive | MountPassive, create, deps); + } + + function updateEffect(create, deps) { + { + // $FlowExpectedError - jest isn't a global, and isn't recognized outside of tests + if ('undefined' !== typeof jest) { + warnIfNotCurrentlyActingEffectsInDEV(currentlyRenderingFiber$1); + } + } + + return updateEffectImpl(Update | Passive, UnmountPassive | MountPassive, create, deps); + } + + function mountLayoutEffect(create, deps) { + return mountEffectImpl(Update, UnmountMutation | MountLayout, create, deps); + } + + function updateLayoutEffect(create, deps) { + return updateEffectImpl(Update, UnmountMutation | MountLayout, create, deps); + } + + function imperativeHandleEffect(create, ref) { + if (typeof ref === 'function') { + var refCallback = ref; + + var _inst = create(); + + refCallback(_inst); + return function () { + refCallback(null); + }; + } else if (ref !== null && ref !== undefined) { + var refObject = ref; + + { + !refObject.hasOwnProperty('current') + ? warning$1( + false, + 'Expected useImperativeHandle() first argument to either be a ' + + 'ref callback or React.createRef() object. Instead received: %s.', + 'an object with keys {' + Object.keys(refObject).join(', ') + '}', + ) + : void 0; + } + + var _inst2 = create(); + + refObject.current = _inst2; + return function () { + refObject.current = null; + }; + } + } + + function mountImperativeHandle(ref, create, deps) { + { + !(typeof create === 'function') + ? warning$1( + false, + 'Expected useImperativeHandle() second argument to be a function ' + + 'that creates a handle. Instead received: %s.', + create !== null ? typeof create : 'null', + ) + : void 0; + } // TODO: If deps are provided, should we skip comparing the ref itself? + + var effectDeps = deps !== null && deps !== undefined ? deps.concat([ref]) : null; + return mountEffectImpl( + Update, + UnmountMutation | MountLayout, + imperativeHandleEffect.bind(null, create, ref), + effectDeps, + ); + } + + function updateImperativeHandle(ref, create, deps) { + { + !(typeof create === 'function') + ? warning$1( + false, + 'Expected useImperativeHandle() second argument to be a function ' + + 'that creates a handle. Instead received: %s.', + create !== null ? typeof create : 'null', + ) + : void 0; + } // TODO: If deps are provided, should we skip comparing the ref itself? + + var effectDeps = deps !== null && deps !== undefined ? deps.concat([ref]) : null; + return updateEffectImpl( + Update, + UnmountMutation | MountLayout, + imperativeHandleEffect.bind(null, create, ref), + effectDeps, + ); + } + + function mountDebugValue(value, formatterFn) { + // This hook is normally a no-op. + // The react-debug-hooks package injects its own implementation + // so that e.g. DevTools can display custom hook values. + } + + var updateDebugValue = mountDebugValue; + + function mountCallback(callback, deps) { + var hook = mountWorkInProgressHook(); + var nextDeps = deps === undefined ? null : deps; + hook.memoizedState = [callback, nextDeps]; + return callback; + } + + function updateCallback(callback, deps) { + var hook = updateWorkInProgressHook(); + var nextDeps = deps === undefined ? null : deps; + var prevState = hook.memoizedState; + + if (prevState !== null) { + if (nextDeps !== null) { + var prevDeps = prevState[1]; + + if (areHookInputsEqual(nextDeps, prevDeps)) { + return prevState[0]; + } + } + } + + hook.memoizedState = [callback, nextDeps]; + return callback; + } + + function mountMemo(nextCreate, deps) { + var hook = mountWorkInProgressHook(); + var nextDeps = deps === undefined ? null : deps; + var nextValue = nextCreate(); + hook.memoizedState = [nextValue, nextDeps]; + return nextValue; + } + + function updateMemo(nextCreate, deps) { + var hook = updateWorkInProgressHook(); + var nextDeps = deps === undefined ? null : deps; + var prevState = hook.memoizedState; + + if (prevState !== null) { + // Assume these are defined. If they're not, areHookInputsEqual will warn. + if (nextDeps !== null) { + var prevDeps = prevState[1]; + + if (areHookInputsEqual(nextDeps, prevDeps)) { + return prevState[0]; + } + } + } + + var nextValue = nextCreate(); + hook.memoizedState = [nextValue, nextDeps]; + return nextValue; + } + + function mountDeferredValue(value, config) { + var _mountState = mountState(value), + prevValue = _mountState[0], + setValue = _mountState[1]; + + mountEffect( + function () { + Scheduler.unstable_next(function () { + var previousConfig = ReactCurrentBatchConfig$1.suspense; + ReactCurrentBatchConfig$1.suspense = config === undefined ? null : config; + + try { + setValue(value); + } finally { + ReactCurrentBatchConfig$1.suspense = previousConfig; + } + }); + }, + [value, config], + ); + return prevValue; + } + + function updateDeferredValue(value, config) { + var _updateState = updateState(value), + prevValue = _updateState[0], + setValue = _updateState[1]; + + updateEffect( + function () { + Scheduler.unstable_next(function () { + var previousConfig = ReactCurrentBatchConfig$1.suspense; + ReactCurrentBatchConfig$1.suspense = config === undefined ? null : config; + + try { + setValue(value); + } finally { + ReactCurrentBatchConfig$1.suspense = previousConfig; + } + }); + }, + [value, config], + ); + return prevValue; + } + + function mountTransition(config) { + var _mountState2 = mountState(false), + isPending = _mountState2[0], + setPending = _mountState2[1]; + + var startTransition = mountCallback( + function (callback) { + setPending(true); + Scheduler.unstable_next(function () { + var previousConfig = ReactCurrentBatchConfig$1.suspense; + ReactCurrentBatchConfig$1.suspense = config === undefined ? null : config; + + try { + setPending(false); + callback(); + } finally { + ReactCurrentBatchConfig$1.suspense = previousConfig; + } + }); + }, + [config, isPending], + ); + return [startTransition, isPending]; + } + + function updateTransition(config) { + var _updateState2 = updateState(false), + isPending = _updateState2[0], + setPending = _updateState2[1]; + + var startTransition = updateCallback( + function (callback) { + setPending(true); + Scheduler.unstable_next(function () { + var previousConfig = ReactCurrentBatchConfig$1.suspense; + ReactCurrentBatchConfig$1.suspense = config === undefined ? null : config; + + try { + setPending(false); + callback(); + } finally { + ReactCurrentBatchConfig$1.suspense = previousConfig; + } + }); + }, + [config, isPending], + ); + return [startTransition, isPending]; + } + + function dispatchAction(fiber, queue, action) { + if (!(numberOfReRenders < RE_RENDER_LIMIT)) { + { + throw Error( + 'Too many re-renders. React limits the number of renders to prevent an infinite loop.', + ); + } + } + + { + !(typeof arguments[3] !== 'function') + ? warning$1( + false, + "State updates from the useState() and useReducer() Hooks don't support the " + + 'second callback argument. To execute a side effect after ' + + 'rendering, declare it in the component body with useEffect().', + ) + : void 0; + } + + var alternate = fiber.alternate; + + if ( + fiber === currentlyRenderingFiber$1 || + (alternate !== null && alternate === currentlyRenderingFiber$1) + ) { + // This is a render phase update. Stash it in a lazily-created map of + // queue -> linked list of updates. After this render pass, we'll restart + // and apply the stashed updates on top of the work-in-progress hook. + didScheduleRenderPhaseUpdate = true; + var update = { + expirationTime: renderExpirationTime$1, + suspenseConfig: null, + action: action, + eagerReducer: null, + eagerState: null, + next: null, + }; + + { + update.priority = getCurrentPriorityLevel(); + } + + if (renderPhaseUpdates === null) { + renderPhaseUpdates = new Map(); + } + + var firstRenderPhaseUpdate = renderPhaseUpdates.get(queue); + + if (firstRenderPhaseUpdate === undefined) { + renderPhaseUpdates.set(queue, update); + } else { + // Append the update to the end of the list. + var lastRenderPhaseUpdate = firstRenderPhaseUpdate; + + while (lastRenderPhaseUpdate.next !== null) { + lastRenderPhaseUpdate = lastRenderPhaseUpdate.next; + } + + lastRenderPhaseUpdate.next = update; + } + } else { + var currentTime = requestCurrentTimeForUpdate(); + var suspenseConfig = requestCurrentSuspenseConfig(); + var expirationTime = computeExpirationForFiber(currentTime, fiber, suspenseConfig); + var _update2 = { + expirationTime: expirationTime, + suspenseConfig: suspenseConfig, + action: action, + eagerReducer: null, + eagerState: null, + next: null, + }; + + { + _update2.priority = getCurrentPriorityLevel(); + } // Append the update to the end of the list. + + var last = queue.last; + + if (last === null) { + // This is the first update. Create a circular list. + _update2.next = _update2; + } else { + var first = last.next; + + if (first !== null) { + // Still circular. + _update2.next = first; + } + + last.next = _update2; + } + + queue.last = _update2; + + if ( + fiber.expirationTime === NoWork && + (alternate === null || alternate.expirationTime === NoWork) + ) { + // The queue is currently empty, which means we can eagerly compute the + // next state before entering the render phase. If the new state is the + // same as the current state, we may be able to bail out entirely. + var lastRenderedReducer = queue.lastRenderedReducer; + + if (lastRenderedReducer !== null) { + var prevDispatcher; + + { + prevDispatcher = ReactCurrentDispatcher$1.current; + ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV; + } + + try { + var currentState = queue.lastRenderedState; + var eagerState = lastRenderedReducer(currentState, action); // Stash the eagerly computed state, and the reducer used to compute + // it, on the update object. If the reducer hasn't changed by the + // time we enter the render phase, then the eager state can be used + // without calling the reducer again. + + _update2.eagerReducer = lastRenderedReducer; + _update2.eagerState = eagerState; + + if (is$1(eagerState, currentState)) { + // Fast path. We can bail out without scheduling React to re-render. + // It's still possible that we'll need to rebase this update later, + // if the component re-renders for a different reason and by that + // time the reducer has changed. + return; + } + } catch (error) { + // Suppress the error. It will throw again in the render phase. + } finally { + { + ReactCurrentDispatcher$1.current = prevDispatcher; + } + } + } + } + + { + // $FlowExpectedError - jest isn't a global, and isn't recognized outside of tests + if ('undefined' !== typeof jest) { + warnIfNotScopedWithMatchingAct(fiber); + warnIfNotCurrentlyActingUpdatesInDev(fiber); + } + } + + scheduleWork(fiber, expirationTime); + } + } + + var ContextOnlyDispatcher = { + readContext: readContext, + useCallback: throwInvalidHookError, + useContext: throwInvalidHookError, + useEffect: throwInvalidHookError, + useImperativeHandle: throwInvalidHookError, + useLayoutEffect: throwInvalidHookError, + useMemo: throwInvalidHookError, + useReducer: throwInvalidHookError, + useRef: throwInvalidHookError, + useState: throwInvalidHookError, + useDebugValue: throwInvalidHookError, + useResponder: throwInvalidHookError, + useDeferredValue: throwInvalidHookError, + useTransition: throwInvalidHookError, + }; + var HooksDispatcherOnMountInDEV = null; + var HooksDispatcherOnMountWithHookTypesInDEV = null; + var HooksDispatcherOnUpdateInDEV = null; + var InvalidNestedHooksDispatcherOnMountInDEV = null; + var InvalidNestedHooksDispatcherOnUpdateInDEV = null; + + { + var warnInvalidContextAccess = function () { + warning$1( + false, + 'Context can only be read while React is rendering. ' + + 'In classes, you can read it in the render method or getDerivedStateFromProps. ' + + 'In function components, you can read it directly in the function body, but not ' + + 'inside Hooks like useReducer() or useMemo().', + ); + }; + + var warnInvalidHookAccess = function () { + warning$1( + false, + 'Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. ' + + 'You can only call Hooks at the top level of your React function. ' + + 'For more information, see ' + + 'https://fb.me/rules-of-hooks', + ); + }; + + HooksDispatcherOnMountInDEV = { + readContext: function (context, observedBits) { + return readContext(context, observedBits); + }, + useCallback: function (callback, deps) { + currentHookNameInDev = 'useCallback'; + mountHookTypesDev(); + checkDepsAreArrayDev(deps); + return mountCallback(callback, deps); + }, + useContext: function (context, observedBits) { + currentHookNameInDev = 'useContext'; + mountHookTypesDev(); + return readContext(context, observedBits); + }, + useEffect: function (create, deps) { + currentHookNameInDev = 'useEffect'; + mountHookTypesDev(); + checkDepsAreArrayDev(deps); + return mountEffect(create, deps); + }, + useImperativeHandle: function (ref, create, deps) { + currentHookNameInDev = 'useImperativeHandle'; + mountHookTypesDev(); + checkDepsAreArrayDev(deps); + return mountImperativeHandle(ref, create, deps); + }, + useLayoutEffect: function (create, deps) { + currentHookNameInDev = 'useLayoutEffect'; + mountHookTypesDev(); + checkDepsAreArrayDev(deps); + return mountLayoutEffect(create, deps); + }, + useMemo: function (create, deps) { + currentHookNameInDev = 'useMemo'; + mountHookTypesDev(); + checkDepsAreArrayDev(deps); + var prevDispatcher = ReactCurrentDispatcher$1.current; + ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV; + + try { + return mountMemo(create, deps); + } finally { + ReactCurrentDispatcher$1.current = prevDispatcher; + } + }, + useReducer: function (reducer, initialArg, init) { + currentHookNameInDev = 'useReducer'; + mountHookTypesDev(); + var prevDispatcher = ReactCurrentDispatcher$1.current; + ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV; + + try { + return mountReducer(reducer, initialArg, init); + } finally { + ReactCurrentDispatcher$1.current = prevDispatcher; + } + }, + useRef: function (initialValue) { + currentHookNameInDev = 'useRef'; + mountHookTypesDev(); + return mountRef(initialValue); + }, + useState: function (initialState) { + currentHookNameInDev = 'useState'; + mountHookTypesDev(); + var prevDispatcher = ReactCurrentDispatcher$1.current; + ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV; + + try { + return mountState(initialState); + } finally { + ReactCurrentDispatcher$1.current = prevDispatcher; + } + }, + useDebugValue: function (value, formatterFn) { + currentHookNameInDev = 'useDebugValue'; + mountHookTypesDev(); + return mountDebugValue(value, formatterFn); + }, + useResponder: function (responder, props) { + currentHookNameInDev = 'useResponder'; + mountHookTypesDev(); + return createResponderListener(responder, props); + }, + useDeferredValue: function (value, config) { + currentHookNameInDev = 'useDeferredValue'; + mountHookTypesDev(); + return mountDeferredValue(value, config); + }, + useTransition: function (config) { + currentHookNameInDev = 'useTransition'; + mountHookTypesDev(); + return mountTransition(config); + }, + }; + HooksDispatcherOnMountWithHookTypesInDEV = { + readContext: function (context, observedBits) { + return readContext(context, observedBits); + }, + useCallback: function (callback, deps) { + currentHookNameInDev = 'useCallback'; + updateHookTypesDev(); + return mountCallback(callback, deps); + }, + useContext: function (context, observedBits) { + currentHookNameInDev = 'useContext'; + updateHookTypesDev(); + return readContext(context, observedBits); + }, + useEffect: function (create, deps) { + currentHookNameInDev = 'useEffect'; + updateHookTypesDev(); + return mountEffect(create, deps); + }, + useImperativeHandle: function (ref, create, deps) { + currentHookNameInDev = 'useImperativeHandle'; + updateHookTypesDev(); + return mountImperativeHandle(ref, create, deps); + }, + useLayoutEffect: function (create, deps) { + currentHookNameInDev = 'useLayoutEffect'; + updateHookTypesDev(); + return mountLayoutEffect(create, deps); + }, + useMemo: function (create, deps) { + currentHookNameInDev = 'useMemo'; + updateHookTypesDev(); + var prevDispatcher = ReactCurrentDispatcher$1.current; + ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV; + + try { + return mountMemo(create, deps); + } finally { + ReactCurrentDispatcher$1.current = prevDispatcher; + } + }, + useReducer: function (reducer, initialArg, init) { + currentHookNameInDev = 'useReducer'; + updateHookTypesDev(); + var prevDispatcher = ReactCurrentDispatcher$1.current; + ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV; + + try { + return mountReducer(reducer, initialArg, init); + } finally { + ReactCurrentDispatcher$1.current = prevDispatcher; + } + }, + useRef: function (initialValue) { + currentHookNameInDev = 'useRef'; + updateHookTypesDev(); + return mountRef(initialValue); + }, + useState: function (initialState) { + currentHookNameInDev = 'useState'; + updateHookTypesDev(); + var prevDispatcher = ReactCurrentDispatcher$1.current; + ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV; + + try { + return mountState(initialState); + } finally { + ReactCurrentDispatcher$1.current = prevDispatcher; + } + }, + useDebugValue: function (value, formatterFn) { + currentHookNameInDev = 'useDebugValue'; + updateHookTypesDev(); + return mountDebugValue(value, formatterFn); + }, + useResponder: function (responder, props) { + currentHookNameInDev = 'useResponder'; + updateHookTypesDev(); + return createResponderListener(responder, props); + }, + useDeferredValue: function (value, config) { + currentHookNameInDev = 'useDeferredValue'; + updateHookTypesDev(); + return mountDeferredValue(value, config); + }, + useTransition: function (config) { + currentHookNameInDev = 'useTransition'; + updateHookTypesDev(); + return mountTransition(config); + }, + }; + HooksDispatcherOnUpdateInDEV = { + readContext: function (context, observedBits) { + return readContext(context, observedBits); + }, + useCallback: function (callback, deps) { + currentHookNameInDev = 'useCallback'; + updateHookTypesDev(); + return updateCallback(callback, deps); + }, + useContext: function (context, observedBits) { + currentHookNameInDev = 'useContext'; + updateHookTypesDev(); + return readContext(context, observedBits); + }, + useEffect: function (create, deps) { + currentHookNameInDev = 'useEffect'; + updateHookTypesDev(); + return updateEffect(create, deps); + }, + useImperativeHandle: function (ref, create, deps) { + currentHookNameInDev = 'useImperativeHandle'; + updateHookTypesDev(); + return updateImperativeHandle(ref, create, deps); + }, + useLayoutEffect: function (create, deps) { + currentHookNameInDev = 'useLayoutEffect'; + updateHookTypesDev(); + return updateLayoutEffect(create, deps); + }, + useMemo: function (create, deps) { + currentHookNameInDev = 'useMemo'; + updateHookTypesDev(); + var prevDispatcher = ReactCurrentDispatcher$1.current; + ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV; + + try { + return updateMemo(create, deps); + } finally { + ReactCurrentDispatcher$1.current = prevDispatcher; + } + }, + useReducer: function (reducer, initialArg, init) { + currentHookNameInDev = 'useReducer'; + updateHookTypesDev(); + var prevDispatcher = ReactCurrentDispatcher$1.current; + ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV; + + try { + return updateReducer(reducer, initialArg, init); + } finally { + ReactCurrentDispatcher$1.current = prevDispatcher; + } + }, + useRef: function (initialValue) { + currentHookNameInDev = 'useRef'; + updateHookTypesDev(); + return updateRef(initialValue); + }, + useState: function (initialState) { + currentHookNameInDev = 'useState'; + updateHookTypesDev(); + var prevDispatcher = ReactCurrentDispatcher$1.current; + ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV; + + try { + return updateState(initialState); + } finally { + ReactCurrentDispatcher$1.current = prevDispatcher; + } + }, + useDebugValue: function (value, formatterFn) { + currentHookNameInDev = 'useDebugValue'; + updateHookTypesDev(); + return updateDebugValue(value, formatterFn); + }, + useResponder: function (responder, props) { + currentHookNameInDev = 'useResponder'; + updateHookTypesDev(); + return createResponderListener(responder, props); + }, + useDeferredValue: function (value, config) { + currentHookNameInDev = 'useDeferredValue'; + updateHookTypesDev(); + return updateDeferredValue(value, config); + }, + useTransition: function (config) { + currentHookNameInDev = 'useTransition'; + updateHookTypesDev(); + return updateTransition(config); + }, + }; + InvalidNestedHooksDispatcherOnMountInDEV = { + readContext: function (context, observedBits) { + warnInvalidContextAccess(); + return readContext(context, observedBits); + }, + useCallback: function (callback, deps) { + currentHookNameInDev = 'useCallback'; + warnInvalidHookAccess(); + mountHookTypesDev(); + return mountCallback(callback, deps); + }, + useContext: function (context, observedBits) { + currentHookNameInDev = 'useContext'; + warnInvalidHookAccess(); + mountHookTypesDev(); + return readContext(context, observedBits); + }, + useEffect: function (create, deps) { + currentHookNameInDev = 'useEffect'; + warnInvalidHookAccess(); + mountHookTypesDev(); + return mountEffect(create, deps); + }, + useImperativeHandle: function (ref, create, deps) { + currentHookNameInDev = 'useImperativeHandle'; + warnInvalidHookAccess(); + mountHookTypesDev(); + return mountImperativeHandle(ref, create, deps); + }, + useLayoutEffect: function (create, deps) { + currentHookNameInDev = 'useLayoutEffect'; + warnInvalidHookAccess(); + mountHookTypesDev(); + return mountLayoutEffect(create, deps); + }, + useMemo: function (create, deps) { + currentHookNameInDev = 'useMemo'; + warnInvalidHookAccess(); + mountHookTypesDev(); + var prevDispatcher = ReactCurrentDispatcher$1.current; + ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV; + + try { + return mountMemo(create, deps); + } finally { + ReactCurrentDispatcher$1.current = prevDispatcher; + } + }, + useReducer: function (reducer, initialArg, init) { + currentHookNameInDev = 'useReducer'; + warnInvalidHookAccess(); + mountHookTypesDev(); + var prevDispatcher = ReactCurrentDispatcher$1.current; + ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV; + + try { + return mountReducer(reducer, initialArg, init); + } finally { + ReactCurrentDispatcher$1.current = prevDispatcher; + } + }, + useRef: function (initialValue) { + currentHookNameInDev = 'useRef'; + warnInvalidHookAccess(); + mountHookTypesDev(); + return mountRef(initialValue); + }, + useState: function (initialState) { + currentHookNameInDev = 'useState'; + warnInvalidHookAccess(); + mountHookTypesDev(); + var prevDispatcher = ReactCurrentDispatcher$1.current; + ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV; + + try { + return mountState(initialState); + } finally { + ReactCurrentDispatcher$1.current = prevDispatcher; + } + }, + useDebugValue: function (value, formatterFn) { + currentHookNameInDev = 'useDebugValue'; + warnInvalidHookAccess(); + mountHookTypesDev(); + return mountDebugValue(value, formatterFn); + }, + useResponder: function (responder, props) { + currentHookNameInDev = 'useResponder'; + warnInvalidHookAccess(); + mountHookTypesDev(); + return createResponderListener(responder, props); + }, + useDeferredValue: function (value, config) { + currentHookNameInDev = 'useDeferredValue'; + warnInvalidHookAccess(); + mountHookTypesDev(); + return mountDeferredValue(value, config); + }, + useTransition: function (config) { + currentHookNameInDev = 'useTransition'; + warnInvalidHookAccess(); + mountHookTypesDev(); + return mountTransition(config); + }, + }; + InvalidNestedHooksDispatcherOnUpdateInDEV = { + readContext: function (context, observedBits) { + warnInvalidContextAccess(); + return readContext(context, observedBits); + }, + useCallback: function (callback, deps) { + currentHookNameInDev = 'useCallback'; + warnInvalidHookAccess(); + updateHookTypesDev(); + return updateCallback(callback, deps); + }, + useContext: function (context, observedBits) { + currentHookNameInDev = 'useContext'; + warnInvalidHookAccess(); + updateHookTypesDev(); + return readContext(context, observedBits); + }, + useEffect: function (create, deps) { + currentHookNameInDev = 'useEffect'; + warnInvalidHookAccess(); + updateHookTypesDev(); + return updateEffect(create, deps); + }, + useImperativeHandle: function (ref, create, deps) { + currentHookNameInDev = 'useImperativeHandle'; + warnInvalidHookAccess(); + updateHookTypesDev(); + return updateImperativeHandle(ref, create, deps); + }, + useLayoutEffect: function (create, deps) { + currentHookNameInDev = 'useLayoutEffect'; + warnInvalidHookAccess(); + updateHookTypesDev(); + return updateLayoutEffect(create, deps); + }, + useMemo: function (create, deps) { + currentHookNameInDev = 'useMemo'; + warnInvalidHookAccess(); + updateHookTypesDev(); + var prevDispatcher = ReactCurrentDispatcher$1.current; + ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV; + + try { + return updateMemo(create, deps); + } finally { + ReactCurrentDispatcher$1.current = prevDispatcher; + } + }, + useReducer: function (reducer, initialArg, init) { + currentHookNameInDev = 'useReducer'; + warnInvalidHookAccess(); + updateHookTypesDev(); + var prevDispatcher = ReactCurrentDispatcher$1.current; + ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV; + + try { + return updateReducer(reducer, initialArg, init); + } finally { + ReactCurrentDispatcher$1.current = prevDispatcher; + } + }, + useRef: function (initialValue) { + currentHookNameInDev = 'useRef'; + warnInvalidHookAccess(); + updateHookTypesDev(); + return updateRef(initialValue); + }, + useState: function (initialState) { + currentHookNameInDev = 'useState'; + warnInvalidHookAccess(); + updateHookTypesDev(); + var prevDispatcher = ReactCurrentDispatcher$1.current; + ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV; + + try { + return updateState(initialState); + } finally { + ReactCurrentDispatcher$1.current = prevDispatcher; + } + }, + useDebugValue: function (value, formatterFn) { + currentHookNameInDev = 'useDebugValue'; + warnInvalidHookAccess(); + updateHookTypesDev(); + return updateDebugValue(value, formatterFn); + }, + useResponder: function (responder, props) { + currentHookNameInDev = 'useResponder'; + warnInvalidHookAccess(); + updateHookTypesDev(); + return createResponderListener(responder, props); + }, + useDeferredValue: function (value, config) { + currentHookNameInDev = 'useDeferredValue'; + warnInvalidHookAccess(); + updateHookTypesDev(); + return updateDeferredValue(value, config); + }, + useTransition: function (config) { + currentHookNameInDev = 'useTransition'; + warnInvalidHookAccess(); + updateHookTypesDev(); + return updateTransition(config); + }, + }; + } + + // CommonJS interop named imports. + + var now$1 = Scheduler.unstable_now; + var commitTime = 0; + var profilerStartTime = -1; + + function getCommitTime() { + return commitTime; + } + + function recordCommitTime() { + if (!enableProfilerTimer) { + return; + } + + commitTime = now$1(); + } + + function startProfilerTimer(fiber) { + if (!enableProfilerTimer) { + return; + } + + profilerStartTime = now$1(); + + if (fiber.actualStartTime < 0) { + fiber.actualStartTime = now$1(); + } + } + + function stopProfilerTimerIfRunning(fiber) { + if (!enableProfilerTimer) { + return; + } + + profilerStartTime = -1; + } + + function stopProfilerTimerIfRunningAndRecordDelta(fiber, overrideBaseTime) { + if (!enableProfilerTimer) { + return; + } + + if (profilerStartTime >= 0) { + var elapsedTime = now$1() - profilerStartTime; + fiber.actualDuration += elapsedTime; + + if (overrideBaseTime) { + fiber.selfBaseDuration = elapsedTime; + } + + profilerStartTime = -1; + } + } + + // This may have been an insertion or a hydration. + + var hydrationParentFiber = null; + var nextHydratableInstance = null; + var isHydrating = false; + + function warnIfHydrating() { + { + !!isHydrating + ? warning$1( + false, + 'We should not be hydrating here. This is a bug in React. Please file a bug.', + ) + : void 0; + } + } + + function enterHydrationState(fiber) { + if (!supportsHydration) { + return false; + } + + var parentInstance = fiber.stateNode.containerInfo; + nextHydratableInstance = getFirstHydratableChild(parentInstance); + hydrationParentFiber = fiber; + isHydrating = true; + return true; + } + + function reenterHydrationStateFromDehydratedSuspenseInstance(fiber, suspenseInstance) { + if (!supportsHydration) { + return false; + } + + nextHydratableInstance = getNextHydratableSibling(suspenseInstance); + popToNextHostParent(fiber); + isHydrating = true; + return true; + } + + function deleteHydratableInstance(returnFiber, instance) { + { + switch (returnFiber.tag) { + case HostRoot: + didNotHydrateContainerInstance(returnFiber.stateNode.containerInfo, instance); + break; + + case HostComponent: + didNotHydrateInstance( + returnFiber.type, + returnFiber.memoizedProps, + returnFiber.stateNode, + instance, + ); + break; + } + } + + var childToDelete = createFiberFromHostInstanceForDeletion(); + childToDelete.stateNode = instance; + childToDelete.return = returnFiber; + childToDelete.effectTag = Deletion; // This might seem like it belongs on progressedFirstDeletion. However, + // these children are not part of the reconciliation list of children. + // Even if we abort and rereconcile the children, that will try to hydrate + // again and the nodes are still in the host tree so these will be + // recreated. + + if (returnFiber.lastEffect !== null) { + returnFiber.lastEffect.nextEffect = childToDelete; + returnFiber.lastEffect = childToDelete; + } else { + returnFiber.firstEffect = returnFiber.lastEffect = childToDelete; + } + } + + function insertNonHydratedInstance(returnFiber, fiber) { + fiber.effectTag = (fiber.effectTag & ~Hydrating) | Placement; + + { + switch (returnFiber.tag) { + case HostRoot: { + var parentContainer = returnFiber.stateNode.containerInfo; + + switch (fiber.tag) { + case HostComponent: + var type = fiber.type; + var props = fiber.pendingProps; + didNotFindHydratableContainerInstance(parentContainer, type, props); + break; + + case HostText: + var text = fiber.pendingProps; + didNotFindHydratableContainerTextInstance(parentContainer, text); + break; + + case SuspenseComponent: + break; + } + + break; + } + + case HostComponent: { + var parentType = returnFiber.type; + var parentProps = returnFiber.memoizedProps; + var parentInstance = returnFiber.stateNode; + + switch (fiber.tag) { + case HostComponent: + var _type = fiber.type; + var _props = fiber.pendingProps; + didNotFindHydratableInstance(parentType, parentProps, parentInstance, _type, _props); + break; + + case HostText: + var _text = fiber.pendingProps; + didNotFindHydratableTextInstance(parentType, parentProps, parentInstance, _text); + break; + + case SuspenseComponent: + didNotFindHydratableSuspenseInstance(parentType, parentProps, parentInstance); + break; + } + + break; + } + + default: + return; + } + } + } + + function tryHydrate(fiber, nextInstance) { + switch (fiber.tag) { + case HostComponent: { + var type = fiber.type; + var props = fiber.pendingProps; + var instance = canHydrateInstance(nextInstance, type, props); + + if (instance !== null) { + fiber.stateNode = instance; + return true; + } + + return false; + } + + case HostText: { + var text = fiber.pendingProps; + var textInstance = canHydrateTextInstance(nextInstance, text); + + if (textInstance !== null) { + fiber.stateNode = textInstance; + return true; + } + + return false; + } + + case SuspenseComponent: { + if (enableSuspenseServerRenderer) { + var suspenseInstance = canHydrateSuspenseInstance(nextInstance); + + if (suspenseInstance !== null) { + var suspenseState = { + dehydrated: suspenseInstance, + retryTime: Never, + }; + fiber.memoizedState = suspenseState; // Store the dehydrated fragment as a child fiber. + // This simplifies the code for getHostSibling and deleting nodes, + // since it doesn't have to consider all Suspense boundaries and + // check if they're dehydrated ones or not. + + var dehydratedFragment = createFiberFromDehydratedFragment(suspenseInstance); + dehydratedFragment.return = fiber; + fiber.child = dehydratedFragment; + return true; + } + } + + return false; + } + + default: + return false; + } + } + + function tryToClaimNextHydratableInstance(fiber) { + if (!isHydrating) { + return; + } + + var nextInstance = nextHydratableInstance; + + if (!nextInstance) { + // Nothing to hydrate. Make it an insertion. + insertNonHydratedInstance(hydrationParentFiber, fiber); + isHydrating = false; + hydrationParentFiber = fiber; + return; + } + + var firstAttemptedInstance = nextInstance; + + if (!tryHydrate(fiber, nextInstance)) { + // If we can't hydrate this instance let's try the next one. + // We use this as a heuristic. It's based on intuition and not data so it + // might be flawed or unnecessary. + nextInstance = getNextHydratableSibling(firstAttemptedInstance); + + if (!nextInstance || !tryHydrate(fiber, nextInstance)) { + // Nothing to hydrate. Make it an insertion. + insertNonHydratedInstance(hydrationParentFiber, fiber); + isHydrating = false; + hydrationParentFiber = fiber; + return; + } // We matched the next one, we'll now assume that the first one was + // superfluous and we'll delete it. Since we can't eagerly delete it + // we'll have to schedule a deletion. To do that, this node needs a dummy + // fiber associated with it. + + deleteHydratableInstance(hydrationParentFiber, firstAttemptedInstance); + } + + hydrationParentFiber = fiber; + nextHydratableInstance = getFirstHydratableChild(nextInstance); + } + + function prepareToHydrateHostInstance(fiber, rootContainerInstance, hostContext) { + if (!supportsHydration) { + { + { + throw Error( + 'Expected prepareToHydrateHostInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + } + + var instance = fiber.stateNode; + var updatePayload = hydrateInstance( + instance, + fiber.type, + fiber.memoizedProps, + rootContainerInstance, + hostContext, + fiber, + ); // TODO: Type this specific to this type of component. + + fiber.updateQueue = updatePayload; // If the update payload indicates that there is a change or if there + // is a new ref we mark this as an update. + + if (updatePayload !== null) { + return true; + } + + return false; + } + + function prepareToHydrateHostTextInstance(fiber) { + if (!supportsHydration) { + { + { + throw Error( + 'Expected prepareToHydrateHostTextInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + } + + var textInstance = fiber.stateNode; + var textContent = fiber.memoizedProps; + var shouldUpdate = hydrateTextInstance(textInstance, textContent, fiber); + + { + if (shouldUpdate) { + // We assume that prepareToHydrateHostTextInstance is called in a context where the + // hydration parent is the parent host component of this host text. + var returnFiber = hydrationParentFiber; + + if (returnFiber !== null) { + switch (returnFiber.tag) { + case HostRoot: { + var parentContainer = returnFiber.stateNode.containerInfo; + didNotMatchHydratedContainerTextInstance(parentContainer, textInstance, textContent); + break; + } + + case HostComponent: { + var parentType = returnFiber.type; + var parentProps = returnFiber.memoizedProps; + var parentInstance = returnFiber.stateNode; + didNotMatchHydratedTextInstance( + parentType, + parentProps, + parentInstance, + textInstance, + textContent, + ); + break; + } + } + } + } + } + + return shouldUpdate; + } + + function prepareToHydrateHostSuspenseInstance(fiber) { + if (!supportsHydration) { + { + { + throw Error( + 'Expected prepareToHydrateHostSuspenseInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + } + + var suspenseState = fiber.memoizedState; + var suspenseInstance = suspenseState !== null ? suspenseState.dehydrated : null; + + if (!suspenseInstance) { + { + throw Error( + 'Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + + hydrateSuspenseInstance(suspenseInstance, fiber); + } + + function skipPastDehydratedSuspenseInstance(fiber) { + if (!supportsHydration) { + { + { + throw Error( + 'Expected skipPastDehydratedSuspenseInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + } + + var suspenseState = fiber.memoizedState; + var suspenseInstance = suspenseState !== null ? suspenseState.dehydrated : null; + + if (!suspenseInstance) { + { + throw Error( + 'Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + + return getNextHydratableInstanceAfterSuspenseInstance(suspenseInstance); + } + + function popToNextHostParent(fiber) { + var parent = fiber.return; + + while ( + parent !== null && + parent.tag !== HostComponent && + parent.tag !== HostRoot && + parent.tag !== SuspenseComponent + ) { + parent = parent.return; + } + + hydrationParentFiber = parent; + } + + function popHydrationState(fiber) { + if (!supportsHydration) { + return false; + } + + if (fiber !== hydrationParentFiber) { + // We're deeper than the current hydration context, inside an inserted + // tree. + return false; + } + + if (!isHydrating) { + // If we're not currently hydrating but we're in a hydration context, then + // we were an insertion and now need to pop up reenter hydration of our + // siblings. + popToNextHostParent(fiber); + isHydrating = true; + return false; + } + + var type = fiber.type; // If we have any remaining hydratable nodes, we need to delete them now. + // We only do this deeper than head and body since they tend to have random + // other nodes in them. We also ignore components with pure text content in + // side of them. + // TODO: Better heuristic. + + if ( + fiber.tag !== HostComponent || + (type !== 'head' && type !== 'body' && !shouldSetTextContent(type, fiber.memoizedProps)) + ) { + var nextInstance = nextHydratableInstance; + + while (nextInstance) { + deleteHydratableInstance(fiber, nextInstance); + nextInstance = getNextHydratableSibling(nextInstance); + } + } + + popToNextHostParent(fiber); + + if (fiber.tag === SuspenseComponent) { + nextHydratableInstance = skipPastDehydratedSuspenseInstance(fiber); + } else { + nextHydratableInstance = hydrationParentFiber + ? getNextHydratableSibling(fiber.stateNode) + : null; + } + + return true; + } + + function resetHydrationState() { + if (!supportsHydration) { + return; + } + + hydrationParentFiber = null; + nextHydratableInstance = null; + isHydrating = false; + } + + var ReactCurrentOwner$3 = ReactSharedInternals.ReactCurrentOwner; + var didReceiveUpdate = false; + var didWarnAboutBadClass; + var didWarnAboutModulePatternComponent; + var didWarnAboutContextTypeOnFunctionComponent; + var didWarnAboutGetDerivedStateOnFunctionComponent; + var didWarnAboutFunctionRefs; + var didWarnAboutReassigningProps; + var didWarnAboutMaxDuration; + var didWarnAboutRevealOrder; + var didWarnAboutTailOptions; + var didWarnAboutDefaultPropsOnFunctionComponent; + + { + didWarnAboutBadClass = {}; + didWarnAboutModulePatternComponent = {}; + didWarnAboutContextTypeOnFunctionComponent = {}; + didWarnAboutGetDerivedStateOnFunctionComponent = {}; + didWarnAboutFunctionRefs = {}; + didWarnAboutReassigningProps = false; + didWarnAboutMaxDuration = false; + didWarnAboutRevealOrder = {}; + didWarnAboutTailOptions = {}; + didWarnAboutDefaultPropsOnFunctionComponent = {}; + } + + function reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime) { + if (current$$1 === null) { + // If this is a fresh new component that hasn't been rendered yet, we + // won't update its child set by applying minimal side-effects. Instead, + // we will add them all to the child before it gets rendered. That means + // we can optimize this reconciliation pass by not tracking side-effects. + workInProgress.child = mountChildFibers( + workInProgress, + null, + nextChildren, + renderExpirationTime, + ); + } else { + // If the current child is the same as the work in progress, it means that + // we haven't yet started any work on these children. Therefore, we use + // the clone algorithm to create a copy of all the current children. + // If we had any progressed work already, that is invalid at this point so + // let's throw it out. + workInProgress.child = reconcileChildFibers( + workInProgress, + current$$1.child, + nextChildren, + renderExpirationTime, + ); + } + } + + function forceUnmountCurrentAndReconcile( + current$$1, + workInProgress, + nextChildren, + renderExpirationTime, + ) { + // This function is fork of reconcileChildren. It's used in cases where we + // want to reconcile without matching against the existing set. This has the + // effect of all current children being unmounted; even if the type and key + // are the same, the old child is unmounted and a new child is created. + // + // To do this, we're going to go through the reconcile algorithm twice. In + // the first pass, we schedule a deletion for all the current children by + // passing null. + workInProgress.child = reconcileChildFibers( + workInProgress, + current$$1.child, + null, + renderExpirationTime, + ); // In the second pass, we mount the new children. The trick here is that we + // pass null in place of where we usually pass the current child set. This has + // the effect of remounting all children regardless of whether their their + // identity matches. + + workInProgress.child = reconcileChildFibers( + workInProgress, + null, + nextChildren, + renderExpirationTime, + ); + } + + function updateForwardRef(current$$1, workInProgress, Component, nextProps, renderExpirationTime) { + // TODO: current can be non-null here even if the component + // hasn't yet mounted. This happens after the first render suspends. + // We'll need to figure out if this is fine or can cause issues. + { + if (workInProgress.type !== workInProgress.elementType) { + // Lazy component props can't be validated in createElement + // because they're only guaranteed to be resolved here. + var innerPropTypes = Component.propTypes; + + if (innerPropTypes) { + checkPropTypes( + innerPropTypes, + nextProps, // Resolved props + 'prop', + getComponentName(Component), + getCurrentFiberStackInDev, + ); + } + } + } + + var render = Component.render; + var ref = workInProgress.ref; // The rest is a fork of updateFunctionComponent + + var nextChildren; + prepareToReadContext(workInProgress, renderExpirationTime); + + { + ReactCurrentOwner$3.current = workInProgress; + setCurrentPhase('render'); + nextChildren = renderWithHooks( + current$$1, + workInProgress, + render, + nextProps, + ref, + renderExpirationTime, + ); + + if (debugRenderPhaseSideEffectsForStrictMode && workInProgress.mode & StrictMode) { + // Only double-render components with Hooks + if (workInProgress.memoizedState !== null) { + nextChildren = renderWithHooks( + current$$1, + workInProgress, + render, + nextProps, + ref, + renderExpirationTime, + ); + } + } + + setCurrentPhase(null); + } + + if (current$$1 !== null && !didReceiveUpdate) { + bailoutHooks(current$$1, workInProgress, renderExpirationTime); + return bailoutOnAlreadyFinishedWork(current$$1, workInProgress, renderExpirationTime); + } // React DevTools reads this flag. + + workInProgress.effectTag |= PerformedWork; + reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime); + return workInProgress.child; + } + + function updateMemoComponent( + current$$1, + workInProgress, + Component, + nextProps, + updateExpirationTime, + renderExpirationTime, + ) { + if (current$$1 === null) { + var type = Component.type; + + if ( + isSimpleFunctionComponent(type) && + Component.compare === null && // SimpleMemoComponent codepath doesn't resolve outer props either. + Component.defaultProps === undefined + ) { + var resolvedType = type; + + { + resolvedType = resolveFunctionForHotReloading(type); + } // If this is a plain function component without default props, + // and with only the default shallow comparison, we upgrade it + // to a SimpleMemoComponent to allow fast path updates. + + workInProgress.tag = SimpleMemoComponent; + workInProgress.type = resolvedType; + + { + validateFunctionComponentInDev(workInProgress, type); + } + + return updateSimpleMemoComponent( + current$$1, + workInProgress, + resolvedType, + nextProps, + updateExpirationTime, + renderExpirationTime, + ); + } + + { + var innerPropTypes = type.propTypes; + + if (innerPropTypes) { + // Inner memo component props aren't currently validated in createElement. + // We could move it there, but we'd still need this for lazy code path. + checkPropTypes( + innerPropTypes, + nextProps, // Resolved props + 'prop', + getComponentName(type), + getCurrentFiberStackInDev, + ); + } + } + + var child = createFiberFromTypeAndProps( + Component.type, + null, + nextProps, + null, + workInProgress.mode, + renderExpirationTime, + ); + child.ref = workInProgress.ref; + child.return = workInProgress; + workInProgress.child = child; + return child; + } + + { + var _type = Component.type; + var _innerPropTypes = _type.propTypes; + + if (_innerPropTypes) { + // Inner memo component props aren't currently validated in createElement. + // We could move it there, but we'd still need this for lazy code path. + checkPropTypes( + _innerPropTypes, + nextProps, // Resolved props + 'prop', + getComponentName(_type), + getCurrentFiberStackInDev, + ); + } + } + + var currentChild = current$$1.child; // This is always exactly one child + + if (updateExpirationTime < renderExpirationTime) { + // This will be the props with resolved defaultProps, + // unlike current.memoizedProps which will be the unresolved ones. + var prevProps = currentChild.memoizedProps; // Default to shallow comparison + + var compare = Component.compare; + compare = compare !== null ? compare : shallowEqual; + + if (compare(prevProps, nextProps) && current$$1.ref === workInProgress.ref) { + return bailoutOnAlreadyFinishedWork(current$$1, workInProgress, renderExpirationTime); + } + } // React DevTools reads this flag. + + workInProgress.effectTag |= PerformedWork; + var newChild = createWorkInProgress(currentChild, nextProps, renderExpirationTime); + newChild.ref = workInProgress.ref; + newChild.return = workInProgress; + workInProgress.child = newChild; + return newChild; + } + + function updateSimpleMemoComponent( + current$$1, + workInProgress, + Component, + nextProps, + updateExpirationTime, + renderExpirationTime, + ) { + // TODO: current can be non-null here even if the component + // hasn't yet mounted. This happens when the inner render suspends. + // We'll need to figure out if this is fine or can cause issues. + { + if (workInProgress.type !== workInProgress.elementType) { + // Lazy component props can't be validated in createElement + // because they're only guaranteed to be resolved here. + var outerMemoType = workInProgress.elementType; + + if (outerMemoType.$$typeof === REACT_LAZY_TYPE) { + // We warn when you define propTypes on lazy() + // so let's just skip over it to find memo() outer wrapper. + // Inner props for memo are validated later. + outerMemoType = refineResolvedLazyComponent(outerMemoType); + } + + var outerPropTypes = outerMemoType && outerMemoType.propTypes; + + if (outerPropTypes) { + checkPropTypes( + outerPropTypes, + nextProps, // Resolved (SimpleMemoComponent has no defaultProps) + 'prop', + getComponentName(outerMemoType), + getCurrentFiberStackInDev, + ); + } // Inner propTypes will be validated in the function component path. + } + } + + if (current$$1 !== null) { + var prevProps = current$$1.memoizedProps; + + if ( + shallowEqual(prevProps, nextProps) && + current$$1.ref === workInProgress.ref && // Prevent bailout if the implementation changed due to hot reload: + workInProgress.type === current$$1.type + ) { + didReceiveUpdate = false; + + if (updateExpirationTime < renderExpirationTime) { + return bailoutOnAlreadyFinishedWork(current$$1, workInProgress, renderExpirationTime); + } + } + } + + return updateFunctionComponent( + current$$1, + workInProgress, + Component, + nextProps, + renderExpirationTime, + ); + } + + function updateFragment(current$$1, workInProgress, renderExpirationTime) { + var nextChildren = workInProgress.pendingProps; + reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime); + return workInProgress.child; + } + + function updateMode(current$$1, workInProgress, renderExpirationTime) { + var nextChildren = workInProgress.pendingProps.children; + reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime); + return workInProgress.child; + } + + function updateProfiler(current$$1, workInProgress, renderExpirationTime) { + if (enableProfilerTimer) { + workInProgress.effectTag |= Update; + } + + var nextProps = workInProgress.pendingProps; + var nextChildren = nextProps.children; + reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime); + return workInProgress.child; + } + + function markRef(current$$1, workInProgress) { + var ref = workInProgress.ref; + + if ((current$$1 === null && ref !== null) || (current$$1 !== null && current$$1.ref !== ref)) { + // Schedule a Ref effect + workInProgress.effectTag |= Ref; + } + } + + function updateFunctionComponent( + current$$1, + workInProgress, + Component, + nextProps, + renderExpirationTime, + ) { + { + if (workInProgress.type !== workInProgress.elementType) { + // Lazy component props can't be validated in createElement + // because they're only guaranteed to be resolved here. + var innerPropTypes = Component.propTypes; + + if (innerPropTypes) { + checkPropTypes( + innerPropTypes, + nextProps, // Resolved props + 'prop', + getComponentName(Component), + getCurrentFiberStackInDev, + ); + } + } + } + + var context; + + if (!disableLegacyContext) { + var unmaskedContext = getUnmaskedContext(workInProgress, Component, true); + context = getMaskedContext(workInProgress, unmaskedContext); + } + + var nextChildren; + prepareToReadContext(workInProgress, renderExpirationTime); + + { + ReactCurrentOwner$3.current = workInProgress; + setCurrentPhase('render'); + nextChildren = renderWithHooks( + current$$1, + workInProgress, + Component, + nextProps, + context, + renderExpirationTime, + ); + + if (debugRenderPhaseSideEffectsForStrictMode && workInProgress.mode & StrictMode) { + // Only double-render components with Hooks + if (workInProgress.memoizedState !== null) { + nextChildren = renderWithHooks( + current$$1, + workInProgress, + Component, + nextProps, + context, + renderExpirationTime, + ); + } + } + + setCurrentPhase(null); + } + + if (current$$1 !== null && !didReceiveUpdate) { + bailoutHooks(current$$1, workInProgress, renderExpirationTime); + return bailoutOnAlreadyFinishedWork(current$$1, workInProgress, renderExpirationTime); + } // React DevTools reads this flag. + + workInProgress.effectTag |= PerformedWork; + reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime); + return workInProgress.child; + } + + function updateClassComponent( + current$$1, + workInProgress, + Component, + nextProps, + renderExpirationTime, + ) { + { + if (workInProgress.type !== workInProgress.elementType) { + // Lazy component props can't be validated in createElement + // because they're only guaranteed to be resolved here. + var innerPropTypes = Component.propTypes; + + if (innerPropTypes) { + checkPropTypes( + innerPropTypes, + nextProps, // Resolved props + 'prop', + getComponentName(Component), + getCurrentFiberStackInDev, + ); + } + } + } // Push context providers early to prevent context stack mismatches. + // During mounting we don't know the child context yet as the instance doesn't exist. + // We will invalidate the child context in finishClassComponent() right after rendering. + + var hasContext; + + if (isContextProvider(Component)) { + hasContext = true; + pushContextProvider(workInProgress); + } else { + hasContext = false; + } + + prepareToReadContext(workInProgress, renderExpirationTime); + var instance = workInProgress.stateNode; + var shouldUpdate; + + if (instance === null) { + if (current$$1 !== null) { + // An class component without an instance only mounts if it suspended + // inside a non- concurrent tree, in an inconsistent state. We want to + // tree it like a new mount, even though an empty version of it already + // committed. Disconnect the alternate pointers. + current$$1.alternate = null; + workInProgress.alternate = null; // Since this is conceptually a new fiber, schedule a Placement effect + + workInProgress.effectTag |= Placement; + } // In the initial pass we might need to construct the instance. + + constructClassInstance(workInProgress, Component, nextProps, renderExpirationTime); + mountClassInstance(workInProgress, Component, nextProps, renderExpirationTime); + shouldUpdate = true; + } else if (current$$1 === null) { + // In a resume, we'll already have an instance we can reuse. + shouldUpdate = resumeMountClassInstance( + workInProgress, + Component, + nextProps, + renderExpirationTime, + ); + } else { + shouldUpdate = updateClassInstance( + current$$1, + workInProgress, + Component, + nextProps, + renderExpirationTime, + ); + } + + var nextUnitOfWork = finishClassComponent( + current$$1, + workInProgress, + Component, + shouldUpdate, + hasContext, + renderExpirationTime, + ); + + { + var inst = workInProgress.stateNode; + + if (inst.props !== nextProps) { + !didWarnAboutReassigningProps + ? warning$1( + false, + 'It looks like %s is reassigning its own `this.props` while rendering. ' + + 'This is not supported and can lead to confusing bugs.', + getComponentName(workInProgress.type) || 'a component', + ) + : void 0; + didWarnAboutReassigningProps = true; + } + } + + return nextUnitOfWork; + } + + function finishClassComponent( + current$$1, + workInProgress, + Component, + shouldUpdate, + hasContext, + renderExpirationTime, + ) { + // Refs should update even if shouldComponentUpdate returns false + markRef(current$$1, workInProgress); + var didCaptureError = (workInProgress.effectTag & DidCapture) !== NoEffect; + + if (!shouldUpdate && !didCaptureError) { + // Context providers should defer to sCU for rendering + if (hasContext) { + invalidateContextProvider(workInProgress, Component, false); + } + + return bailoutOnAlreadyFinishedWork(current$$1, workInProgress, renderExpirationTime); + } + + var instance = workInProgress.stateNode; // Rerender + + ReactCurrentOwner$3.current = workInProgress; + var nextChildren; + + if (didCaptureError && typeof Component.getDerivedStateFromError !== 'function') { + // If we captured an error, but getDerivedStateFrom catch is not defined, + // unmount all the children. componentDidCatch will schedule an update to + // re-render a fallback. This is temporary until we migrate everyone to + // the new API. + // TODO: Warn in a future release. + nextChildren = null; + + if (enableProfilerTimer) { + stopProfilerTimerIfRunning(workInProgress); + } + } else { + { + setCurrentPhase('render'); + nextChildren = instance.render(); + + if (debugRenderPhaseSideEffectsForStrictMode && workInProgress.mode & StrictMode) { + instance.render(); + } + + setCurrentPhase(null); + } + } // React DevTools reads this flag. + + workInProgress.effectTag |= PerformedWork; + + if (current$$1 !== null && didCaptureError) { + // If we're recovering from an error, reconcile without reusing any of + // the existing children. Conceptually, the normal children and the children + // that are shown on error are two different sets, so we shouldn't reuse + // normal children even if their identities match. + forceUnmountCurrentAndReconcile(current$$1, workInProgress, nextChildren, renderExpirationTime); + } else { + reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime); + } // Memoize state using the values we just used to render. + // TODO: Restructure so we never read values from the instance. + + workInProgress.memoizedState = instance.state; // The context might have changed so we need to recalculate it. + + if (hasContext) { + invalidateContextProvider(workInProgress, Component, true); + } + + return workInProgress.child; + } + + function pushHostRootContext(workInProgress) { + var root = workInProgress.stateNode; + + if (root.pendingContext) { + pushTopLevelContextObject( + workInProgress, + root.pendingContext, + root.pendingContext !== root.context, + ); + } else if (root.context) { + // Should always be set + pushTopLevelContextObject(workInProgress, root.context, false); + } + + pushHostContainer(workInProgress, root.containerInfo); + } + + function updateHostRoot(current$$1, workInProgress, renderExpirationTime) { + pushHostRootContext(workInProgress); + var updateQueue = workInProgress.updateQueue; + + if (!(updateQueue !== null)) { + { + throw Error( + 'If the root does not have an updateQueue, we should have already bailed out. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + + var nextProps = workInProgress.pendingProps; + var prevState = workInProgress.memoizedState; + var prevChildren = prevState !== null ? prevState.element : null; + processUpdateQueue(workInProgress, updateQueue, nextProps, null, renderExpirationTime); + var nextState = workInProgress.memoizedState; // Caution: React DevTools currently depends on this property + // being called "element". + + var nextChildren = nextState.element; + + if (nextChildren === prevChildren) { + // If the state is the same as before, that's a bailout because we had + // no work that expires at this time. + resetHydrationState(); + return bailoutOnAlreadyFinishedWork(current$$1, workInProgress, renderExpirationTime); + } + + var root = workInProgress.stateNode; + + if (root.hydrate && enterHydrationState(workInProgress)) { + // If we don't have any current children this might be the first pass. + // We always try to hydrate. If this isn't a hydration pass there won't + // be any children to hydrate which is effectively the same thing as + // not hydrating. + var child = mountChildFibers(workInProgress, null, nextChildren, renderExpirationTime); + workInProgress.child = child; + var node = child; + + while (node) { + // Mark each child as hydrating. This is a fast path to know whether this + // tree is part of a hydrating tree. This is used to determine if a child + // node has fully mounted yet, and for scheduling event replaying. + // Conceptually this is similar to Placement in that a new subtree is + // inserted into the React tree here. It just happens to not need DOM + // mutations because it already exists. + node.effectTag = (node.effectTag & ~Placement) | Hydrating; + node = node.sibling; + } + } else { + // Otherwise reset hydration state in case we aborted and resumed another + // root. + reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime); + resetHydrationState(); + } + + return workInProgress.child; + } + + function updateHostComponent(current$$1, workInProgress, renderExpirationTime) { + pushHostContext(workInProgress); + + if (current$$1 === null) { + tryToClaimNextHydratableInstance(workInProgress); + } + + var type = workInProgress.type; + var nextProps = workInProgress.pendingProps; + var prevProps = current$$1 !== null ? current$$1.memoizedProps : null; + var nextChildren = nextProps.children; + var isDirectTextChild = shouldSetTextContent(type, nextProps); + + if (isDirectTextChild) { + // We special case a direct text child of a host node. This is a common + // case. We won't handle it as a reified child. We will instead handle + // this in the host environment that also have access to this prop. That + // avoids allocating another HostText fiber and traversing it. + nextChildren = null; + } else if (prevProps !== null && shouldSetTextContent(type, prevProps)) { + // If we're switching from a direct text child to a normal child, or to + // empty, we need to schedule the text content to be reset. + workInProgress.effectTag |= ContentReset; + } + + markRef(current$$1, workInProgress); // Check the host config to see if the children are offscreen/hidden. + + if ( + workInProgress.mode & ConcurrentMode && + renderExpirationTime !== Never && + shouldDeprioritizeSubtree(type, nextProps) + ) { + if (enableSchedulerTracing) { + markSpawnedWork(Never); + } // Schedule this fiber to re-render at offscreen priority. Then bailout. + + workInProgress.expirationTime = workInProgress.childExpirationTime = Never; + return null; + } + + reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime); + return workInProgress.child; + } + + function updateHostText(current$$1, workInProgress) { + if (current$$1 === null) { + tryToClaimNextHydratableInstance(workInProgress); + } // Nothing to do here. This is terminal. We'll do the completion step + // immediately after. + + return null; + } + + function mountLazyComponent( + _current, + workInProgress, + elementType, + updateExpirationTime, + renderExpirationTime, + ) { + if (_current !== null) { + // An lazy component only mounts if it suspended inside a non- + // concurrent tree, in an inconsistent state. We want to treat it like + // a new mount, even though an empty version of it already committed. + // Disconnect the alternate pointers. + _current.alternate = null; + workInProgress.alternate = null; // Since this is conceptually a new fiber, schedule a Placement effect + + workInProgress.effectTag |= Placement; + } + + var props = workInProgress.pendingProps; // We can't start a User Timing measurement with correct label yet. + // Cancel and resume right after we know the tag. + + cancelWorkTimer(workInProgress); + var Component = readLazyComponentType(elementType); // Store the unwrapped component in the type. + + workInProgress.type = Component; + var resolvedTag = (workInProgress.tag = resolveLazyComponentTag(Component)); + startWorkTimer(workInProgress); + var resolvedProps = resolveDefaultProps(Component, props); + var child; + + switch (resolvedTag) { + case FunctionComponent: { + { + validateFunctionComponentInDev(workInProgress, Component); + workInProgress.type = Component = resolveFunctionForHotReloading(Component); + } + + child = updateFunctionComponent( + null, + workInProgress, + Component, + resolvedProps, + renderExpirationTime, + ); + break; + } + + case ClassComponent: { + { + workInProgress.type = Component = resolveClassForHotReloading(Component); + } + + child = updateClassComponent( + null, + workInProgress, + Component, + resolvedProps, + renderExpirationTime, + ); + break; + } + + case ForwardRef: { + { + workInProgress.type = Component = resolveForwardRefForHotReloading(Component); + } + + child = updateForwardRef( + null, + workInProgress, + Component, + resolvedProps, + renderExpirationTime, + ); + break; + } + + case MemoComponent: { + { + if (workInProgress.type !== workInProgress.elementType) { + var outerPropTypes = Component.propTypes; + + if (outerPropTypes) { + checkPropTypes( + outerPropTypes, + resolvedProps, // Resolved for outer only + 'prop', + getComponentName(Component), + getCurrentFiberStackInDev, + ); + } + } + } + + child = updateMemoComponent( + null, + workInProgress, + Component, + resolveDefaultProps(Component.type, resolvedProps), // The inner type can have defaults too + updateExpirationTime, + renderExpirationTime, + ); + break; + } + + default: { + var hint = ''; + + { + if ( + Component !== null && + typeof Component === 'object' && + Component.$$typeof === REACT_LAZY_TYPE + ) { + hint = ' Did you wrap a component in React.lazy() more than once?'; + } + } // This message intentionally doesn't mention ForwardRef or MemoComponent + // because the fact that it's a separate type of work is an + // implementation detail. + + { + { + throw Error( + 'Element type is invalid. Received a promise that resolves to: ' + + Component + + '. Lazy element type must resolve to a class or function.' + + hint, + ); + } + } + } + } + + return child; + } + + function mountIncompleteClassComponent( + _current, + workInProgress, + Component, + nextProps, + renderExpirationTime, + ) { + if (_current !== null) { + // An incomplete component only mounts if it suspended inside a non- + // concurrent tree, in an inconsistent state. We want to treat it like + // a new mount, even though an empty version of it already committed. + // Disconnect the alternate pointers. + _current.alternate = null; + workInProgress.alternate = null; // Since this is conceptually a new fiber, schedule a Placement effect + + workInProgress.effectTag |= Placement; + } // Promote the fiber to a class and try rendering again. + + workInProgress.tag = ClassComponent; // The rest of this function is a fork of `updateClassComponent` + // Push context providers early to prevent context stack mismatches. + // During mounting we don't know the child context yet as the instance doesn't exist. + // We will invalidate the child context in finishClassComponent() right after rendering. + + var hasContext; + + if (isContextProvider(Component)) { + hasContext = true; + pushContextProvider(workInProgress); + } else { + hasContext = false; + } + + prepareToReadContext(workInProgress, renderExpirationTime); + constructClassInstance(workInProgress, Component, nextProps, renderExpirationTime); + mountClassInstance(workInProgress, Component, nextProps, renderExpirationTime); + return finishClassComponent( + null, + workInProgress, + Component, + true, + hasContext, + renderExpirationTime, + ); + } + + function mountIndeterminateComponent(_current, workInProgress, Component, renderExpirationTime) { + if (_current !== null) { + // An indeterminate component only mounts if it suspended inside a non- + // concurrent tree, in an inconsistent state. We want to treat it like + // a new mount, even though an empty version of it already committed. + // Disconnect the alternate pointers. + _current.alternate = null; + workInProgress.alternate = null; // Since this is conceptually a new fiber, schedule a Placement effect + + workInProgress.effectTag |= Placement; + } + + var props = workInProgress.pendingProps; + var context; + + if (!disableLegacyContext) { + var unmaskedContext = getUnmaskedContext(workInProgress, Component, false); + context = getMaskedContext(workInProgress, unmaskedContext); + } + + prepareToReadContext(workInProgress, renderExpirationTime); + var value; + + { + if (Component.prototype && typeof Component.prototype.render === 'function') { + var componentName = getComponentName(Component) || 'Unknown'; + + if (!didWarnAboutBadClass[componentName]) { + warningWithoutStack$1( + false, + "The <%s /> component appears to have a render method, but doesn't extend React.Component. " + + 'This is likely to cause errors. Change %s to extend React.Component instead.', + componentName, + componentName, + ); + didWarnAboutBadClass[componentName] = true; + } + } + + if (workInProgress.mode & StrictMode) { + ReactStrictModeWarnings.recordLegacyContextWarning(workInProgress, null); + } + + ReactCurrentOwner$3.current = workInProgress; + value = renderWithHooks(null, workInProgress, Component, props, context, renderExpirationTime); + } // React DevTools reads this flag. + + workInProgress.effectTag |= PerformedWork; + + if ( + typeof value === 'object' && + value !== null && + typeof value.render === 'function' && + value.$$typeof === undefined + ) { + { + var _componentName = getComponentName(Component) || 'Unknown'; + + if (!didWarnAboutModulePatternComponent[_componentName]) { + warningWithoutStack$1( + false, + 'The <%s /> component appears to be a function component that returns a class instance. ' + + 'Change %s to a class that extends React.Component instead. ' + + "If you can't use a class try assigning the prototype on the function as a workaround. " + + "`%s.prototype = React.Component.prototype`. Don't use an arrow function since it " + + 'cannot be called with `new` by React.', + _componentName, + _componentName, + _componentName, + ); + didWarnAboutModulePatternComponent[_componentName] = true; + } + } // Proceed under the assumption that this is a class instance + + workInProgress.tag = ClassComponent; // Throw out any hooks that were used. + + resetHooks(); // Push context providers early to prevent context stack mismatches. + // During mounting we don't know the child context yet as the instance doesn't exist. + // We will invalidate the child context in finishClassComponent() right after rendering. + + var hasContext = false; + + if (isContextProvider(Component)) { + hasContext = true; + pushContextProvider(workInProgress); + } else { + hasContext = false; + } + + workInProgress.memoizedState = + value.state !== null && value.state !== undefined ? value.state : null; + var getDerivedStateFromProps = Component.getDerivedStateFromProps; + + if (typeof getDerivedStateFromProps === 'function') { + applyDerivedStateFromProps(workInProgress, Component, getDerivedStateFromProps, props); + } + + adoptClassInstance(workInProgress, value); + mountClassInstance(workInProgress, Component, props, renderExpirationTime); + return finishClassComponent( + null, + workInProgress, + Component, + true, + hasContext, + renderExpirationTime, + ); + } else { + // Proceed under the assumption that this is a function component + workInProgress.tag = FunctionComponent; + + { + if (disableLegacyContext && Component.contextTypes) { + warningWithoutStack$1( + false, + '%s uses the legacy contextTypes API which is no longer supported. ' + + 'Use React.createContext() with React.useContext() instead.', + getComponentName(Component) || 'Unknown', + ); + } + + if (debugRenderPhaseSideEffectsForStrictMode && workInProgress.mode & StrictMode) { + // Only double-render components with Hooks + if (workInProgress.memoizedState !== null) { + value = renderWithHooks( + null, + workInProgress, + Component, + props, + context, + renderExpirationTime, + ); + } + } + } + + reconcileChildren(null, workInProgress, value, renderExpirationTime); + + { + validateFunctionComponentInDev(workInProgress, Component); + } + + return workInProgress.child; + } + } + + function validateFunctionComponentInDev(workInProgress, Component) { + if (Component) { + !!Component.childContextTypes + ? warningWithoutStack$1( + false, + '%s(...): childContextTypes cannot be defined on a function component.', + Component.displayName || Component.name || 'Component', + ) + : void 0; + } + + if (workInProgress.ref !== null) { + var info = ''; + var ownerName = getCurrentFiberOwnerNameInDevOrNull(); + + if (ownerName) { + info += '\n\nCheck the render method of `' + ownerName + '`.'; + } + + var warningKey = ownerName || workInProgress._debugID || ''; + var debugSource = workInProgress._debugSource; + + if (debugSource) { + warningKey = debugSource.fileName + ':' + debugSource.lineNumber; + } + + if (!didWarnAboutFunctionRefs[warningKey]) { + didWarnAboutFunctionRefs[warningKey] = true; + warning$1( + false, + 'Function components cannot be given refs. ' + + 'Attempts to access this ref will fail. ' + + 'Did you mean to use React.forwardRef()?%s', + info, + ); + } + } + + if (warnAboutDefaultPropsOnFunctionComponents && Component.defaultProps !== undefined) { + var componentName = getComponentName(Component) || 'Unknown'; + + if (!didWarnAboutDefaultPropsOnFunctionComponent[componentName]) { + warningWithoutStack$1( + false, + '%s: Support for defaultProps will be removed from function components ' + + 'in a future major release. Use JavaScript default parameters instead.', + componentName, + ); + didWarnAboutDefaultPropsOnFunctionComponent[componentName] = true; + } + } + + if (typeof Component.getDerivedStateFromProps === 'function') { + var _componentName2 = getComponentName(Component) || 'Unknown'; + + if (!didWarnAboutGetDerivedStateOnFunctionComponent[_componentName2]) { + warningWithoutStack$1( + false, + '%s: Function components do not support getDerivedStateFromProps.', + _componentName2, + ); + didWarnAboutGetDerivedStateOnFunctionComponent[_componentName2] = true; + } + } + + if (typeof Component.contextType === 'object' && Component.contextType !== null) { + var _componentName3 = getComponentName(Component) || 'Unknown'; + + if (!didWarnAboutContextTypeOnFunctionComponent[_componentName3]) { + warningWithoutStack$1( + false, + '%s: Function components do not support contextType.', + _componentName3, + ); + didWarnAboutContextTypeOnFunctionComponent[_componentName3] = true; + } + } + } + + var SUSPENDED_MARKER = { + dehydrated: null, + retryTime: NoWork, + }; + + function shouldRemainOnFallback(suspenseContext, current$$1, workInProgress) { + // If the context is telling us that we should show a fallback, and we're not + // already showing content, then we should show the fallback instead. + return ( + hasSuspenseContext(suspenseContext, ForceSuspenseFallback) && + (current$$1 === null || current$$1.memoizedState !== null) + ); + } + + function updateSuspenseComponent(current$$1, workInProgress, renderExpirationTime) { + var mode = workInProgress.mode; + var nextProps = workInProgress.pendingProps; // This is used by DevTools to force a boundary to suspend. + + { + if (shouldSuspend(workInProgress)) { + workInProgress.effectTag |= DidCapture; + } + } + + var suspenseContext = suspenseStackCursor.current; + var nextDidTimeout = false; + var didSuspend = (workInProgress.effectTag & DidCapture) !== NoEffect; + + if (didSuspend || shouldRemainOnFallback(suspenseContext, current$$1, workInProgress)) { + // Something in this boundary's subtree already suspended. Switch to + // rendering the fallback children. + nextDidTimeout = true; + workInProgress.effectTag &= ~DidCapture; + } else { + // Attempting the main content + if (current$$1 === null || current$$1.memoizedState !== null) { + // This is a new mount or this boundary is already showing a fallback state. + // Mark this subtree context as having at least one invisible parent that could + // handle the fallback state. + // Boundaries without fallbacks or should be avoided are not considered since + // they cannot handle preferred fallback states. + if (nextProps.fallback !== undefined && nextProps.unstable_avoidThisFallback !== true) { + suspenseContext = addSubtreeSuspenseContext( + suspenseContext, + InvisibleParentSuspenseContext, + ); + } + } + } + + suspenseContext = setDefaultShallowSuspenseContext(suspenseContext); + pushSuspenseContext(workInProgress, suspenseContext); + + { + if ('maxDuration' in nextProps) { + if (!didWarnAboutMaxDuration) { + didWarnAboutMaxDuration = true; + warning$1( + false, + 'maxDuration has been removed from React. ' + 'Remove the maxDuration prop.', + ); + } + } + } // This next part is a bit confusing. If the children timeout, we switch to + // showing the fallback children in place of the "primary" children. + // However, we don't want to delete the primary children because then their + // state will be lost (both the React state and the host state, e.g. + // uncontrolled form inputs). Instead we keep them mounted and hide them. + // Both the fallback children AND the primary children are rendered at the + // same time. Once the primary children are un-suspended, we can delete + // the fallback children — don't need to preserve their state. + // + // The two sets of children are siblings in the host environment, but + // semantically, for purposes of reconciliation, they are two separate sets. + // So we store them using two fragment fibers. + // + // However, we want to avoid allocating extra fibers for every placeholder. + // They're only necessary when the children time out, because that's the + // only time when both sets are mounted. + // + // So, the extra fragment fibers are only used if the children time out. + // Otherwise, we render the primary children directly. This requires some + // custom reconciliation logic to preserve the state of the primary + // children. It's essentially a very basic form of re-parenting. + + if (current$$1 === null) { + // If we're currently hydrating, try to hydrate this boundary. + // But only if this has a fallback. + if (nextProps.fallback !== undefined) { + tryToClaimNextHydratableInstance(workInProgress); // This could've been a dehydrated suspense component. + + if (enableSuspenseServerRenderer) { + var suspenseState = workInProgress.memoizedState; + + if (suspenseState !== null) { + var dehydrated = suspenseState.dehydrated; + + if (dehydrated !== null) { + return mountDehydratedSuspenseComponent( + workInProgress, + dehydrated, + renderExpirationTime, + ); + } + } + } + } // This is the initial mount. This branch is pretty simple because there's + // no previous state that needs to be preserved. + + if (nextDidTimeout) { + // Mount separate fragments for primary and fallback children. + var nextFallbackChildren = nextProps.fallback; + var primaryChildFragment = createFiberFromFragment(null, mode, NoWork, null); + primaryChildFragment.return = workInProgress; + + if ((workInProgress.mode & BlockingMode) === NoMode) { + // Outside of blocking mode, we commit the effects from the + // partially completed, timed-out tree, too. + var progressedState = workInProgress.memoizedState; + var progressedPrimaryChild = + progressedState !== null ? workInProgress.child.child : workInProgress.child; + primaryChildFragment.child = progressedPrimaryChild; + var progressedChild = progressedPrimaryChild; + + while (progressedChild !== null) { + progressedChild.return = primaryChildFragment; + progressedChild = progressedChild.sibling; + } + } + + var fallbackChildFragment = createFiberFromFragment( + nextFallbackChildren, + mode, + renderExpirationTime, + null, + ); + fallbackChildFragment.return = workInProgress; + primaryChildFragment.sibling = fallbackChildFragment; // Skip the primary children, and continue working on the + // fallback children. + + workInProgress.memoizedState = SUSPENDED_MARKER; + workInProgress.child = primaryChildFragment; + return fallbackChildFragment; + } else { + // Mount the primary children without an intermediate fragment fiber. + var nextPrimaryChildren = nextProps.children; + workInProgress.memoizedState = null; + return (workInProgress.child = mountChildFibers( + workInProgress, + null, + nextPrimaryChildren, + renderExpirationTime, + )); + } + } else { + // This is an update. This branch is more complicated because we need to + // ensure the state of the primary children is preserved. + var prevState = current$$1.memoizedState; + + if (prevState !== null) { + if (enableSuspenseServerRenderer) { + var _dehydrated = prevState.dehydrated; + + if (_dehydrated !== null) { + if (!didSuspend) { + return updateDehydratedSuspenseComponent( + current$$1, + workInProgress, + _dehydrated, + prevState, + renderExpirationTime, + ); + } else if (workInProgress.memoizedState !== null) { + // Something suspended and we should still be in dehydrated mode. + // Leave the existing child in place. + workInProgress.child = current$$1.child; // The dehydrated completion pass expects this flag to be there + // but the normal suspense pass doesn't. + + workInProgress.effectTag |= DidCapture; + return null; + } else { + // Suspended but we should no longer be in dehydrated mode. + // Therefore we now have to render the fallback. Wrap the children + // in a fragment fiber to keep them separate from the fallback + // children. + var _nextFallbackChildren = nextProps.fallback; + + var _primaryChildFragment = createFiberFromFragment( + // It shouldn't matter what the pending props are because we aren't + // going to render this fragment. + null, + mode, + NoWork, + null, + ); + + _primaryChildFragment.return = workInProgress; // This is always null since we never want the previous child + // that we're not going to hydrate. + + _primaryChildFragment.child = null; + + if ((workInProgress.mode & BlockingMode) === NoMode) { + // Outside of blocking mode, we commit the effects from the + // partially completed, timed-out tree, too. + var _progressedChild = (_primaryChildFragment.child = workInProgress.child); + + while (_progressedChild !== null) { + _progressedChild.return = _primaryChildFragment; + _progressedChild = _progressedChild.sibling; + } + } else { + // We will have dropped the effect list which contains the deletion. + // We need to reconcile to delete the current child. + reconcileChildFibers(workInProgress, current$$1.child, null, renderExpirationTime); + } // Because primaryChildFragment is a new fiber that we're inserting as the + // parent of a new tree, we need to set its treeBaseDuration. + + if (enableProfilerTimer && workInProgress.mode & ProfileMode) { + // treeBaseDuration is the sum of all the child tree base durations. + var treeBaseDuration = 0; + var hiddenChild = _primaryChildFragment.child; + + while (hiddenChild !== null) { + treeBaseDuration += hiddenChild.treeBaseDuration; + hiddenChild = hiddenChild.sibling; + } + + _primaryChildFragment.treeBaseDuration = treeBaseDuration; + } // Create a fragment from the fallback children, too. + + var _fallbackChildFragment = createFiberFromFragment( + _nextFallbackChildren, + mode, + renderExpirationTime, + null, + ); + + _fallbackChildFragment.return = workInProgress; + _primaryChildFragment.sibling = _fallbackChildFragment; + _fallbackChildFragment.effectTag |= Placement; + _primaryChildFragment.childExpirationTime = NoWork; + workInProgress.memoizedState = SUSPENDED_MARKER; + workInProgress.child = _primaryChildFragment; // Skip the primary children, and continue working on the + // fallback children. + + return _fallbackChildFragment; + } + } + } // The current tree already timed out. That means each child set is + // wrapped in a fragment fiber. + + var currentPrimaryChildFragment = current$$1.child; + var currentFallbackChildFragment = currentPrimaryChildFragment.sibling; + + if (nextDidTimeout) { + // Still timed out. Reuse the current primary children by cloning + // its fragment. We're going to skip over these entirely. + var _nextFallbackChildren2 = nextProps.fallback; + + var _primaryChildFragment2 = createWorkInProgress( + currentPrimaryChildFragment, + currentPrimaryChildFragment.pendingProps, + NoWork, + ); + + _primaryChildFragment2.return = workInProgress; + + if ((workInProgress.mode & BlockingMode) === NoMode) { + // Outside of blocking mode, we commit the effects from the + // partially completed, timed-out tree, too. + var _progressedState = workInProgress.memoizedState; + + var _progressedPrimaryChild = + _progressedState !== null ? workInProgress.child.child : workInProgress.child; + + if (_progressedPrimaryChild !== currentPrimaryChildFragment.child) { + _primaryChildFragment2.child = _progressedPrimaryChild; + var _progressedChild2 = _progressedPrimaryChild; + + while (_progressedChild2 !== null) { + _progressedChild2.return = _primaryChildFragment2; + _progressedChild2 = _progressedChild2.sibling; + } + } + } // Because primaryChildFragment is a new fiber that we're inserting as the + // parent of a new tree, we need to set its treeBaseDuration. + + if (enableProfilerTimer && workInProgress.mode & ProfileMode) { + // treeBaseDuration is the sum of all the child tree base durations. + var _treeBaseDuration = 0; + var _hiddenChild = _primaryChildFragment2.child; + + while (_hiddenChild !== null) { + _treeBaseDuration += _hiddenChild.treeBaseDuration; + _hiddenChild = _hiddenChild.sibling; + } + + _primaryChildFragment2.treeBaseDuration = _treeBaseDuration; + } // Clone the fallback child fragment, too. These we'll continue + // working on. + + var _fallbackChildFragment2 = createWorkInProgress( + currentFallbackChildFragment, + _nextFallbackChildren2, + currentFallbackChildFragment.expirationTime, + ); + + _fallbackChildFragment2.return = workInProgress; + _primaryChildFragment2.sibling = _fallbackChildFragment2; + _primaryChildFragment2.childExpirationTime = NoWork; // Skip the primary children, and continue working on the + // fallback children. + + workInProgress.memoizedState = SUSPENDED_MARKER; + workInProgress.child = _primaryChildFragment2; + return _fallbackChildFragment2; + } else { + // No longer suspended. Switch back to showing the primary children, + // and remove the intermediate fragment fiber. + var _nextPrimaryChildren = nextProps.children; + var currentPrimaryChild = currentPrimaryChildFragment.child; + var primaryChild = reconcileChildFibers( + workInProgress, + currentPrimaryChild, + _nextPrimaryChildren, + renderExpirationTime, + ); // If this render doesn't suspend, we need to delete the fallback + // children. Wait until the complete phase, after we've confirmed the + // fallback is no longer needed. + // TODO: Would it be better to store the fallback fragment on + // the stateNode? + // Continue rendering the children, like we normally do. + + workInProgress.memoizedState = null; + return (workInProgress.child = primaryChild); + } + } else { + // The current tree has not already timed out. That means the primary + // children are not wrapped in a fragment fiber. + var _currentPrimaryChild = current$$1.child; + + if (nextDidTimeout) { + // Timed out. Wrap the children in a fragment fiber to keep them + // separate from the fallback children. + var _nextFallbackChildren3 = nextProps.fallback; + + var _primaryChildFragment3 = createFiberFromFragment( + // It shouldn't matter what the pending props are because we aren't + // going to render this fragment. + null, + mode, + NoWork, + null, + ); + + _primaryChildFragment3.return = workInProgress; + _primaryChildFragment3.child = _currentPrimaryChild; + + if (_currentPrimaryChild !== null) { + _currentPrimaryChild.return = _primaryChildFragment3; + } // Even though we're creating a new fiber, there are no new children, + // because we're reusing an already mounted tree. So we don't need to + // schedule a placement. + // primaryChildFragment.effectTag |= Placement; + + if ((workInProgress.mode & BlockingMode) === NoMode) { + // Outside of blocking mode, we commit the effects from the + // partially completed, timed-out tree, too. + var _progressedState2 = workInProgress.memoizedState; + + var _progressedPrimaryChild2 = + _progressedState2 !== null ? workInProgress.child.child : workInProgress.child; + + _primaryChildFragment3.child = _progressedPrimaryChild2; + var _progressedChild3 = _progressedPrimaryChild2; + + while (_progressedChild3 !== null) { + _progressedChild3.return = _primaryChildFragment3; + _progressedChild3 = _progressedChild3.sibling; + } + } // Because primaryChildFragment is a new fiber that we're inserting as the + // parent of a new tree, we need to set its treeBaseDuration. + + if (enableProfilerTimer && workInProgress.mode & ProfileMode) { + // treeBaseDuration is the sum of all the child tree base durations. + var _treeBaseDuration2 = 0; + var _hiddenChild2 = _primaryChildFragment3.child; + + while (_hiddenChild2 !== null) { + _treeBaseDuration2 += _hiddenChild2.treeBaseDuration; + _hiddenChild2 = _hiddenChild2.sibling; + } + + _primaryChildFragment3.treeBaseDuration = _treeBaseDuration2; + } // Create a fragment from the fallback children, too. + + var _fallbackChildFragment3 = createFiberFromFragment( + _nextFallbackChildren3, + mode, + renderExpirationTime, + null, + ); + + _fallbackChildFragment3.return = workInProgress; + _primaryChildFragment3.sibling = _fallbackChildFragment3; + _fallbackChildFragment3.effectTag |= Placement; + _primaryChildFragment3.childExpirationTime = NoWork; // Skip the primary children, and continue working on the + // fallback children. + + workInProgress.memoizedState = SUSPENDED_MARKER; + workInProgress.child = _primaryChildFragment3; + return _fallbackChildFragment3; + } else { + // Still haven't timed out. Continue rendering the children, like we + // normally do. + workInProgress.memoizedState = null; + var _nextPrimaryChildren2 = nextProps.children; + return (workInProgress.child = reconcileChildFibers( + workInProgress, + _currentPrimaryChild, + _nextPrimaryChildren2, + renderExpirationTime, + )); + } + } + } + } + + function retrySuspenseComponentWithoutHydrating(current$$1, workInProgress, renderExpirationTime) { + // We're now not suspended nor dehydrated. + workInProgress.memoizedState = null; // Retry with the full children. + + var nextProps = workInProgress.pendingProps; + var nextChildren = nextProps.children; // This will ensure that the children get Placement effects and + // that the old child gets a Deletion effect. + // We could also call forceUnmountCurrentAndReconcile. + + reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime); + return workInProgress.child; + } + + function mountDehydratedSuspenseComponent(workInProgress, suspenseInstance, renderExpirationTime) { + // During the first pass, we'll bail out and not drill into the children. + // Instead, we'll leave the content in place and try to hydrate it later. + if ((workInProgress.mode & BlockingMode) === NoMode) { + { + warning$1( + false, + 'Cannot hydrate Suspense in legacy mode. Switch from ' + + 'ReactDOM.hydrate(element, container) to ' + + 'ReactDOM.createBlockingRoot(container, { hydrate: true })' + + '.render(element) or remove the Suspense components from ' + + 'the server rendered components.', + ); + } + + workInProgress.expirationTime = Sync; + } else if (isSuspenseInstanceFallback(suspenseInstance)) { + // This is a client-only boundary. Since we won't get any content from the server + // for this, we need to schedule that at a higher priority based on when it would + // have timed out. In theory we could render it in this pass but it would have the + // wrong priority associated with it and will prevent hydration of parent path. + // Instead, we'll leave work left on it to render it in a separate commit. + // TODO This time should be the time at which the server rendered response that is + // a parent to this boundary was displayed. However, since we currently don't have + // a protocol to transfer that time, we'll just estimate it by using the current + // time. This will mean that Suspense timeouts are slightly shifted to later than + // they should be. + var serverDisplayTime = requestCurrentTimeForUpdate(); // Schedule a normal pri update to render this content. + + var newExpirationTime = computeAsyncExpiration(serverDisplayTime); + + if (enableSchedulerTracing) { + markSpawnedWork(newExpirationTime); + } + + workInProgress.expirationTime = newExpirationTime; + } else { + // We'll continue hydrating the rest at offscreen priority since we'll already + // be showing the right content coming from the server, it is no rush. + workInProgress.expirationTime = Never; + + if (enableSchedulerTracing) { + markSpawnedWork(Never); + } + } + + return null; + } + + function updateDehydratedSuspenseComponent( + current$$1, + workInProgress, + suspenseInstance, + suspenseState, + renderExpirationTime, + ) { + // We should never be hydrating at this point because it is the first pass, + // but after we've already committed once. + warnIfHydrating(); + + if ((workInProgress.mode & BlockingMode) === NoMode) { + return retrySuspenseComponentWithoutHydrating(current$$1, workInProgress, renderExpirationTime); + } + + if (isSuspenseInstanceFallback(suspenseInstance)) { + // This boundary is in a permanent fallback state. In this case, we'll never + // get an update and we'll never be able to hydrate the final content. Let's just try the + // client side render instead. + return retrySuspenseComponentWithoutHydrating(current$$1, workInProgress, renderExpirationTime); + } // We use childExpirationTime to indicate that a child might depend on context, so if + // any context has changed, we need to treat is as if the input might have changed. + + var hasContextChanged$$1 = current$$1.childExpirationTime >= renderExpirationTime; + + if (didReceiveUpdate || hasContextChanged$$1) { + // This boundary has changed since the first render. This means that we are now unable to + // hydrate it. We might still be able to hydrate it using an earlier expiration time, if + // we are rendering at lower expiration than sync. + if (renderExpirationTime < Sync) { + if (suspenseState.retryTime <= renderExpirationTime) { + // This render is even higher pri than we've seen before, let's try again + // at even higher pri. + var attemptHydrationAtExpirationTime = renderExpirationTime + 1; + suspenseState.retryTime = attemptHydrationAtExpirationTime; + scheduleWork(current$$1, attemptHydrationAtExpirationTime); // TODO: Early abort this render. + } else { + // We have already tried to ping at a higher priority than we're rendering with + // so if we got here, we must have failed to hydrate at those levels. We must + // now give up. Instead, we're going to delete the whole subtree and instead inject + // a new real Suspense boundary to take its place, which may render content + // or fallback. This might suspend for a while and if it does we might still have + // an opportunity to hydrate before this pass commits. + } + } // If we have scheduled higher pri work above, this will probably just abort the render + // since we now have higher priority work, but in case it doesn't, we need to prepare to + // render something, if we time out. Even if that requires us to delete everything and + // skip hydration. + // Delay having to do this as long as the suspense timeout allows us. + + renderDidSuspendDelayIfPossible(); + return retrySuspenseComponentWithoutHydrating(current$$1, workInProgress, renderExpirationTime); + } else if (isSuspenseInstancePending(suspenseInstance)) { + // This component is still pending more data from the server, so we can't hydrate its + // content. We treat it as if this component suspended itself. It might seem as if + // we could just try to render it client-side instead. However, this will perform a + // lot of unnecessary work and is unlikely to complete since it often will suspend + // on missing data anyway. Additionally, the server might be able to render more + // than we can on the client yet. In that case we'd end up with more fallback states + // on the client than if we just leave it alone. If the server times out or errors + // these should update this boundary to the permanent Fallback state instead. + // Mark it as having captured (i.e. suspended). + workInProgress.effectTag |= DidCapture; // Leave the child in place. I.e. the dehydrated fragment. + + workInProgress.child = current$$1.child; // Register a callback to retry this boundary once the server has sent the result. + + registerSuspenseInstanceRetry( + suspenseInstance, + retryDehydratedSuspenseBoundary.bind(null, current$$1), + ); + return null; + } else { + // This is the first attempt. + reenterHydrationStateFromDehydratedSuspenseInstance(workInProgress, suspenseInstance); + var nextProps = workInProgress.pendingProps; + var nextChildren = nextProps.children; + var child = mountChildFibers(workInProgress, null, nextChildren, renderExpirationTime); + var node = child; + + while (node) { + // Mark each child as hydrating. This is a fast path to know whether this + // tree is part of a hydrating tree. This is used to determine if a child + // node has fully mounted yet, and for scheduling event replaying. + // Conceptually this is similar to Placement in that a new subtree is + // inserted into the React tree here. It just happens to not need DOM + // mutations because it already exists. + node.effectTag |= Hydrating; + node = node.sibling; + } + + workInProgress.child = child; + return workInProgress.child; + } + } + + function scheduleWorkOnFiber(fiber, renderExpirationTime) { + if (fiber.expirationTime < renderExpirationTime) { + fiber.expirationTime = renderExpirationTime; + } + + var alternate = fiber.alternate; + + if (alternate !== null && alternate.expirationTime < renderExpirationTime) { + alternate.expirationTime = renderExpirationTime; + } + + scheduleWorkOnParentPath(fiber.return, renderExpirationTime); + } + + function propagateSuspenseContextChange(workInProgress, firstChild, renderExpirationTime) { + // Mark any Suspense boundaries with fallbacks as having work to do. + // If they were previously forced into fallbacks, they may now be able + // to unblock. + var node = firstChild; + + while (node !== null) { + if (node.tag === SuspenseComponent) { + var state = node.memoizedState; + + if (state !== null) { + scheduleWorkOnFiber(node, renderExpirationTime); + } + } else if (node.tag === SuspenseListComponent) { + // If the tail is hidden there might not be an Suspense boundaries + // to schedule work on. In this case we have to schedule it on the + // list itself. + // We don't have to traverse to the children of the list since + // the list will propagate the change when it rerenders. + scheduleWorkOnFiber(node, renderExpirationTime); + } else if (node.child !== null) { + node.child.return = node; + node = node.child; + continue; + } + + if (node === workInProgress) { + return; + } + + while (node.sibling === null) { + if (node.return === null || node.return === workInProgress) { + return; + } + + node = node.return; + } + + node.sibling.return = node.return; + node = node.sibling; + } + } + + function findLastContentRow(firstChild) { + // This is going to find the last row among these children that is already + // showing content on the screen, as opposed to being in fallback state or + // new. If a row has multiple Suspense boundaries, any of them being in the + // fallback state, counts as the whole row being in a fallback state. + // Note that the "rows" will be workInProgress, but any nested children + // will still be current since we haven't rendered them yet. The mounted + // order may not be the same as the new order. We use the new order. + var row = firstChild; + var lastContentRow = null; + + while (row !== null) { + var currentRow = row.alternate; // New rows can't be content rows. + + if (currentRow !== null && findFirstSuspended(currentRow) === null) { + lastContentRow = row; + } + + row = row.sibling; + } + + return lastContentRow; + } + + function validateRevealOrder(revealOrder) { + { + if ( + revealOrder !== undefined && + revealOrder !== 'forwards' && + revealOrder !== 'backwards' && + revealOrder !== 'together' && + !didWarnAboutRevealOrder[revealOrder] + ) { + didWarnAboutRevealOrder[revealOrder] = true; + + if (typeof revealOrder === 'string') { + switch (revealOrder.toLowerCase()) { + case 'together': + case 'forwards': + case 'backwards': { + warning$1( + false, + '"%s" is not a valid value for revealOrder on <SuspenseList />. ' + + 'Use lowercase "%s" instead.', + revealOrder, + revealOrder.toLowerCase(), + ); + break; + } + + case 'forward': + case 'backward': { + warning$1( + false, + '"%s" is not a valid value for revealOrder on <SuspenseList />. ' + + 'React uses the -s suffix in the spelling. Use "%ss" instead.', + revealOrder, + revealOrder.toLowerCase(), + ); + break; + } + + default: + warning$1( + false, + '"%s" is not a supported revealOrder on <SuspenseList />. ' + + 'Did you mean "together", "forwards" or "backwards"?', + revealOrder, + ); + break; + } + } else { + warning$1( + false, + '%s is not a supported value for revealOrder on <SuspenseList />. ' + + 'Did you mean "together", "forwards" or "backwards"?', + revealOrder, + ); + } + } + } + } + + function validateTailOptions(tailMode, revealOrder) { + { + if (tailMode !== undefined && !didWarnAboutTailOptions[tailMode]) { + if (tailMode !== 'collapsed' && tailMode !== 'hidden') { + didWarnAboutTailOptions[tailMode] = true; + warning$1( + false, + '"%s" is not a supported value for tail on <SuspenseList />. ' + + 'Did you mean "collapsed" or "hidden"?', + tailMode, + ); + } else if (revealOrder !== 'forwards' && revealOrder !== 'backwards') { + didWarnAboutTailOptions[tailMode] = true; + warning$1( + false, + '<SuspenseList tail="%s" /> is only valid if revealOrder is ' + + '"forwards" or "backwards". ' + + 'Did you mean to specify revealOrder="forwards"?', + tailMode, + ); + } + } + } + } + + function validateSuspenseListNestedChild(childSlot, index) { + { + var isArray = Array.isArray(childSlot); + var isIterable = !isArray && typeof getIteratorFn(childSlot) === 'function'; + + if (isArray || isIterable) { + var type = isArray ? 'array' : 'iterable'; + warning$1( + false, + 'A nested %s was passed to row #%s in <SuspenseList />. Wrap it in ' + + 'an additional SuspenseList to configure its revealOrder: ' + + '<SuspenseList revealOrder=...> ... ' + + '<SuspenseList revealOrder=...>{%s}</SuspenseList> ... ' + + '</SuspenseList>', + type, + index, + type, + ); + return false; + } + } + + return true; + } + + function validateSuspenseListChildren(children, revealOrder) { + { + if ( + (revealOrder === 'forwards' || revealOrder === 'backwards') && + children !== undefined && + children !== null && + children !== false + ) { + if (Array.isArray(children)) { + for (var i = 0; i < children.length; i++) { + if (!validateSuspenseListNestedChild(children[i], i)) { + return; + } + } + } else { + var iteratorFn = getIteratorFn(children); + + if (typeof iteratorFn === 'function') { + var childrenIterator = iteratorFn.call(children); + + if (childrenIterator) { + var step = childrenIterator.next(); + var _i = 0; + + for (; !step.done; step = childrenIterator.next()) { + if (!validateSuspenseListNestedChild(step.value, _i)) { + return; + } + + _i++; + } + } + } else { + warning$1( + false, + 'A single row was passed to a <SuspenseList revealOrder="%s" />. ' + + 'This is not useful since it needs multiple rows. ' + + 'Did you mean to pass multiple children or an array?', + revealOrder, + ); + } + } + } + } + } + + function initSuspenseListRenderState( + workInProgress, + isBackwards, + tail, + lastContentRow, + tailMode, + lastEffectBeforeRendering, + ) { + var renderState = workInProgress.memoizedState; + + if (renderState === null) { + workInProgress.memoizedState = { + isBackwards: isBackwards, + rendering: null, + last: lastContentRow, + tail: tail, + tailExpiration: 0, + tailMode: tailMode, + lastEffect: lastEffectBeforeRendering, + }; + } else { + // We can reuse the existing object from previous renders. + renderState.isBackwards = isBackwards; + renderState.rendering = null; + renderState.last = lastContentRow; + renderState.tail = tail; + renderState.tailExpiration = 0; + renderState.tailMode = tailMode; + renderState.lastEffect = lastEffectBeforeRendering; + } + } // This can end up rendering this component multiple passes. + // The first pass splits the children fibers into two sets. A head and tail. + // We first render the head. If anything is in fallback state, we do another + // pass through beginWork to rerender all children (including the tail) with + // the force suspend context. If the first render didn't have anything in + // in fallback state. Then we render each row in the tail one-by-one. + // That happens in the completeWork phase without going back to beginWork. + + function updateSuspenseListComponent(current$$1, workInProgress, renderExpirationTime) { + var nextProps = workInProgress.pendingProps; + var revealOrder = nextProps.revealOrder; + var tailMode = nextProps.tail; + var newChildren = nextProps.children; + validateRevealOrder(revealOrder); + validateTailOptions(tailMode, revealOrder); + validateSuspenseListChildren(newChildren, revealOrder); + reconcileChildren(current$$1, workInProgress, newChildren, renderExpirationTime); + var suspenseContext = suspenseStackCursor.current; + var shouldForceFallback = hasSuspenseContext(suspenseContext, ForceSuspenseFallback); + + if (shouldForceFallback) { + suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback); + workInProgress.effectTag |= DidCapture; + } else { + var didSuspendBefore = current$$1 !== null && (current$$1.effectTag & DidCapture) !== NoEffect; + + if (didSuspendBefore) { + // If we previously forced a fallback, we need to schedule work + // on any nested boundaries to let them know to try to render + // again. This is the same as context updating. + propagateSuspenseContextChange(workInProgress, workInProgress.child, renderExpirationTime); + } + + suspenseContext = setDefaultShallowSuspenseContext(suspenseContext); + } + + pushSuspenseContext(workInProgress, suspenseContext); + + if ((workInProgress.mode & BlockingMode) === NoMode) { + // Outside of blocking mode, SuspenseList doesn't work so we just + // use make it a noop by treating it as the default revealOrder. + workInProgress.memoizedState = null; + } else { + switch (revealOrder) { + case 'forwards': { + var lastContentRow = findLastContentRow(workInProgress.child); + var tail; + + if (lastContentRow === null) { + // The whole list is part of the tail. + // TODO: We could fast path by just rendering the tail now. + tail = workInProgress.child; + workInProgress.child = null; + } else { + // Disconnect the tail rows after the content row. + // We're going to render them separately later. + tail = lastContentRow.sibling; + lastContentRow.sibling = null; + } + + initSuspenseListRenderState( + workInProgress, + false, // isBackwards + tail, + lastContentRow, + tailMode, + workInProgress.lastEffect, + ); + break; + } + + case 'backwards': { + // We're going to find the first row that has existing content. + // At the same time we're going to reverse the list of everything + // we pass in the meantime. That's going to be our tail in reverse + // order. + var _tail = null; + var row = workInProgress.child; + workInProgress.child = null; + + while (row !== null) { + var currentRow = row.alternate; // New rows can't be content rows. + + if (currentRow !== null && findFirstSuspended(currentRow) === null) { + // This is the beginning of the main content. + workInProgress.child = row; + break; + } + + var nextRow = row.sibling; + row.sibling = _tail; + _tail = row; + row = nextRow; + } // TODO: If workInProgress.child is null, we can continue on the tail immediately. + + initSuspenseListRenderState( + workInProgress, + true, // isBackwards + _tail, + null, // last + tailMode, + workInProgress.lastEffect, + ); + break; + } + + case 'together': { + initSuspenseListRenderState( + workInProgress, + false, // isBackwards + null, // tail + null, // last + undefined, + workInProgress.lastEffect, + ); + break; + } + + default: { + // The default reveal order is the same as not having + // a boundary. + workInProgress.memoizedState = null; + } + } + } + + return workInProgress.child; + } + + function updatePortalComponent(current$$1, workInProgress, renderExpirationTime) { + pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo); + var nextChildren = workInProgress.pendingProps; + + if (current$$1 === null) { + // Portals are special because we don't append the children during mount + // but at commit. Therefore we need to track insertions which the normal + // flow doesn't do during mount. This doesn't happen at the root because + // the root always starts with a "current" with a null child. + // TODO: Consider unifying this with how the root works. + workInProgress.child = reconcileChildFibers( + workInProgress, + null, + nextChildren, + renderExpirationTime, + ); + } else { + reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime); + } + + return workInProgress.child; + } + + function updateContextProvider(current$$1, workInProgress, renderExpirationTime) { + var providerType = workInProgress.type; + var context = providerType._context; + var newProps = workInProgress.pendingProps; + var oldProps = workInProgress.memoizedProps; + var newValue = newProps.value; + + { + var providerPropTypes = workInProgress.type.propTypes; + + if (providerPropTypes) { + checkPropTypes( + providerPropTypes, + newProps, + 'prop', + 'Context.Provider', + getCurrentFiberStackInDev, + ); + } + } + + pushProvider(workInProgress, newValue); + + if (oldProps !== null) { + var oldValue = oldProps.value; + var changedBits = calculateChangedBits(context, newValue, oldValue); + + if (changedBits === 0) { + // No change. Bailout early if children are the same. + if (oldProps.children === newProps.children && !hasContextChanged()) { + return bailoutOnAlreadyFinishedWork(current$$1, workInProgress, renderExpirationTime); + } + } else { + // The context value changed. Search for matching consumers and schedule + // them to update. + propagateContextChange(workInProgress, context, changedBits, renderExpirationTime); + } + } + + var newChildren = newProps.children; + reconcileChildren(current$$1, workInProgress, newChildren, renderExpirationTime); + return workInProgress.child; + } + + var hasWarnedAboutUsingContextAsConsumer = false; + + function updateContextConsumer(current$$1, workInProgress, renderExpirationTime) { + var context = workInProgress.type; // The logic below for Context differs depending on PROD or DEV mode. In + // DEV mode, we create a separate object for Context.Consumer that acts + // like a proxy to Context. This proxy object adds unnecessary code in PROD + // so we use the old behaviour (Context.Consumer references Context) to + // reduce size and overhead. The separate object references context via + // a property called "_context", which also gives us the ability to check + // in DEV mode if this property exists or not and warn if it does not. + + { + if (context._context === undefined) { + // This may be because it's a Context (rather than a Consumer). + // Or it may be because it's older React where they're the same thing. + // We only want to warn if we're sure it's a new React. + if (context !== context.Consumer) { + if (!hasWarnedAboutUsingContextAsConsumer) { + hasWarnedAboutUsingContextAsConsumer = true; + warning$1( + false, + 'Rendering <Context> directly is not supported and will be removed in ' + + 'a future major release. Did you mean to render <Context.Consumer> instead?', + ); + } + } + } else { + context = context._context; + } + } + + var newProps = workInProgress.pendingProps; + var render = newProps.children; + + { + !(typeof render === 'function') + ? warningWithoutStack$1( + false, + 'A context consumer was rendered with multiple children, or a child ' + + "that isn't a function. A context consumer expects a single child " + + 'that is a function. If you did pass a function, make sure there ' + + 'is no trailing or leading whitespace around it.', + ) + : void 0; + } + + prepareToReadContext(workInProgress, renderExpirationTime); + var newValue = readContext(context, newProps.unstable_observedBits); + var newChildren; + + { + ReactCurrentOwner$3.current = workInProgress; + setCurrentPhase('render'); + newChildren = render(newValue); + setCurrentPhase(null); + } // React DevTools reads this flag. + + workInProgress.effectTag |= PerformedWork; + reconcileChildren(current$$1, workInProgress, newChildren, renderExpirationTime); + return workInProgress.child; + } + + function updateFundamentalComponent$1(current$$1, workInProgress, renderExpirationTime) { + var fundamentalImpl = workInProgress.type.impl; + + if (fundamentalImpl.reconcileChildren === false) { + return null; + } + + var nextProps = workInProgress.pendingProps; + var nextChildren = nextProps.children; + reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime); + return workInProgress.child; + } + + function updateScopeComponent(current$$1, workInProgress, renderExpirationTime) { + var nextProps = workInProgress.pendingProps; + var nextChildren = nextProps.children; + reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime); + return workInProgress.child; + } + + function markWorkInProgressReceivedUpdate() { + didReceiveUpdate = true; + } + + function bailoutOnAlreadyFinishedWork(current$$1, workInProgress, renderExpirationTime) { + cancelWorkTimer(workInProgress); + + if (current$$1 !== null) { + // Reuse previous dependencies + workInProgress.dependencies = current$$1.dependencies; + } + + if (enableProfilerTimer) { + // Don't update "base" render times for bailouts. + stopProfilerTimerIfRunning(workInProgress); + } + + var updateExpirationTime = workInProgress.expirationTime; + + if (updateExpirationTime !== NoWork) { + markUnprocessedUpdateTime(updateExpirationTime); + } // Check if the children have any pending work. + + var childExpirationTime = workInProgress.childExpirationTime; + + if (childExpirationTime < renderExpirationTime) { + // The children don't have any work either. We can skip them. + // TODO: Once we add back resuming, we should check if the children are + // a work-in-progress set. If so, we need to transfer their effects. + return null; + } else { + // This fiber doesn't have work, but its subtree does. Clone the child + // fibers and continue. + cloneChildFibers(current$$1, workInProgress); + return workInProgress.child; + } + } + + function remountFiber(current$$1, oldWorkInProgress, newWorkInProgress) { + { + var returnFiber = oldWorkInProgress.return; + + if (returnFiber === null) { + throw new Error('Cannot swap the root fiber.'); + } // Disconnect from the old current. + // It will get deleted. + + current$$1.alternate = null; + oldWorkInProgress.alternate = null; // Connect to the new tree. + + newWorkInProgress.index = oldWorkInProgress.index; + newWorkInProgress.sibling = oldWorkInProgress.sibling; + newWorkInProgress.return = oldWorkInProgress.return; + newWorkInProgress.ref = oldWorkInProgress.ref; // Replace the child/sibling pointers above it. + + if (oldWorkInProgress === returnFiber.child) { + returnFiber.child = newWorkInProgress; + } else { + var prevSibling = returnFiber.child; + + if (prevSibling === null) { + throw new Error('Expected parent to have a child.'); + } + + while (prevSibling.sibling !== oldWorkInProgress) { + prevSibling = prevSibling.sibling; + + if (prevSibling === null) { + throw new Error('Expected to find the previous sibling.'); + } + } + + prevSibling.sibling = newWorkInProgress; + } // Delete the old fiber and place the new one. + // Since the old fiber is disconnected, we have to schedule it manually. + + var last = returnFiber.lastEffect; + + if (last !== null) { + last.nextEffect = current$$1; + returnFiber.lastEffect = current$$1; + } else { + returnFiber.firstEffect = returnFiber.lastEffect = current$$1; + } + + current$$1.nextEffect = null; + current$$1.effectTag = Deletion; + newWorkInProgress.effectTag |= Placement; // Restart work from the new fiber. + + return newWorkInProgress; + } + } + + function beginWork$1(current$$1, workInProgress, renderExpirationTime) { + var updateExpirationTime = workInProgress.expirationTime; + + { + if (workInProgress._debugNeedsRemount && current$$1 !== null) { + // This will restart the begin phase with a new fiber. + return remountFiber( + current$$1, + workInProgress, + createFiberFromTypeAndProps( + workInProgress.type, + workInProgress.key, + workInProgress.pendingProps, + workInProgress._debugOwner || null, + workInProgress.mode, + workInProgress.expirationTime, + ), + ); + } + } + + if (current$$1 !== null) { + var oldProps = current$$1.memoizedProps; + var newProps = workInProgress.pendingProps; + + if ( + oldProps !== newProps || + hasContextChanged() || // Force a re-render if the implementation changed due to hot reload: + workInProgress.type !== current$$1.type + ) { + // If props or context changed, mark the fiber as having performed work. + // This may be unset if the props are determined to be equal later (memo). + didReceiveUpdate = true; + } else if (updateExpirationTime < renderExpirationTime) { + didReceiveUpdate = false; // This fiber does not have any pending work. Bailout without entering + // the begin phase. There's still some bookkeeping we that needs to be done + // in this optimized path, mostly pushing stuff onto the stack. + + switch (workInProgress.tag) { + case HostRoot: + pushHostRootContext(workInProgress); + resetHydrationState(); + break; + + case HostComponent: + pushHostContext(workInProgress); + + if ( + workInProgress.mode & ConcurrentMode && + renderExpirationTime !== Never && + shouldDeprioritizeSubtree(workInProgress.type, newProps) + ) { + if (enableSchedulerTracing) { + markSpawnedWork(Never); + } // Schedule this fiber to re-render at offscreen priority. Then bailout. + + workInProgress.expirationTime = workInProgress.childExpirationTime = Never; + return null; + } + + break; + + case ClassComponent: { + var Component = workInProgress.type; + + if (isContextProvider(Component)) { + pushContextProvider(workInProgress); + } + + break; + } + + case HostPortal: + pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo); + break; + + case ContextProvider: { + var newValue = workInProgress.memoizedProps.value; + pushProvider(workInProgress, newValue); + break; + } + + case Profiler: + if (enableProfilerTimer) { + // Profiler should only call onRender when one of its descendants actually rendered. + var hasChildWork = workInProgress.childExpirationTime >= renderExpirationTime; + + if (hasChildWork) { + workInProgress.effectTag |= Update; + } + } + + break; + + case SuspenseComponent: { + var state = workInProgress.memoizedState; + + if (state !== null) { + if (enableSuspenseServerRenderer) { + if (state.dehydrated !== null) { + pushSuspenseContext( + workInProgress, + setDefaultShallowSuspenseContext(suspenseStackCursor.current), + ); // We know that this component will suspend again because if it has + // been unsuspended it has committed as a resolved Suspense component. + // If it needs to be retried, it should have work scheduled on it. + + workInProgress.effectTag |= DidCapture; + break; + } + } // If this boundary is currently timed out, we need to decide + // whether to retry the primary children, or to skip over it and + // go straight to the fallback. Check the priority of the primary + // child fragment. + + var primaryChildFragment = workInProgress.child; + var primaryChildExpirationTime = primaryChildFragment.childExpirationTime; + + if ( + primaryChildExpirationTime !== NoWork && + primaryChildExpirationTime >= renderExpirationTime + ) { + // The primary children have pending work. Use the normal path + // to attempt to render the primary children again. + return updateSuspenseComponent(current$$1, workInProgress, renderExpirationTime); + } else { + pushSuspenseContext( + workInProgress, + setDefaultShallowSuspenseContext(suspenseStackCursor.current), + ); // The primary children do not have pending work with sufficient + // priority. Bailout. + + var child = bailoutOnAlreadyFinishedWork( + current$$1, + workInProgress, + renderExpirationTime, + ); + + if (child !== null) { + // The fallback children have pending work. Skip over the + // primary children and work on the fallback. + return child.sibling; + } else { + return null; + } + } + } else { + pushSuspenseContext( + workInProgress, + setDefaultShallowSuspenseContext(suspenseStackCursor.current), + ); + } + + break; + } + + case SuspenseListComponent: { + var didSuspendBefore = (current$$1.effectTag & DidCapture) !== NoEffect; + + var _hasChildWork = workInProgress.childExpirationTime >= renderExpirationTime; + + if (didSuspendBefore) { + if (_hasChildWork) { + // If something was in fallback state last time, and we have all the + // same children then we're still in progressive loading state. + // Something might get unblocked by state updates or retries in the + // tree which will affect the tail. So we need to use the normal + // path to compute the correct tail. + return updateSuspenseListComponent(current$$1, workInProgress, renderExpirationTime); + } // If none of the children had any work, that means that none of + // them got retried so they'll still be blocked in the same way + // as before. We can fast bail out. + + workInProgress.effectTag |= DidCapture; + } // If nothing suspended before and we're rendering the same children, + // then the tail doesn't matter. Anything new that suspends will work + // in the "together" mode, so we can continue from the state we had. + + var renderState = workInProgress.memoizedState; + + if (renderState !== null) { + // Reset to the "together" mode in case we've started a different + // update in the past but didn't complete it. + renderState.rendering = null; + renderState.tail = null; + } + + pushSuspenseContext(workInProgress, suspenseStackCursor.current); + + if (_hasChildWork) { + break; + } else { + // If none of the children had any work, that means that none of + // them got retried so they'll still be blocked in the same way + // as before. We can fast bail out. + return null; + } + } + } + + return bailoutOnAlreadyFinishedWork(current$$1, workInProgress, renderExpirationTime); + } else { + // An update was scheduled on this fiber, but there are no new props + // nor legacy context. Set this to false. If an update queue or context + // consumer produces a changed value, it will set this to true. Otherwise, + // the component will assume the children have not changed and bail out. + didReceiveUpdate = false; + } + } else { + didReceiveUpdate = false; + } // Before entering the begin phase, clear the expiration time. + + workInProgress.expirationTime = NoWork; + + switch (workInProgress.tag) { + case IndeterminateComponent: { + return mountIndeterminateComponent( + current$$1, + workInProgress, + workInProgress.type, + renderExpirationTime, + ); + } + + case LazyComponent: { + var elementType = workInProgress.elementType; + return mountLazyComponent( + current$$1, + workInProgress, + elementType, + updateExpirationTime, + renderExpirationTime, + ); + } + + case FunctionComponent: { + var _Component = workInProgress.type; + var unresolvedProps = workInProgress.pendingProps; + var resolvedProps = + workInProgress.elementType === _Component + ? unresolvedProps + : resolveDefaultProps(_Component, unresolvedProps); + return updateFunctionComponent( + current$$1, + workInProgress, + _Component, + resolvedProps, + renderExpirationTime, + ); + } + + case ClassComponent: { + var _Component2 = workInProgress.type; + var _unresolvedProps = workInProgress.pendingProps; + + var _resolvedProps = + workInProgress.elementType === _Component2 + ? _unresolvedProps + : resolveDefaultProps(_Component2, _unresolvedProps); + + return updateClassComponent( + current$$1, + workInProgress, + _Component2, + _resolvedProps, + renderExpirationTime, + ); + } + + case HostRoot: + return updateHostRoot(current$$1, workInProgress, renderExpirationTime); + + case HostComponent: + return updateHostComponent(current$$1, workInProgress, renderExpirationTime); + + case HostText: + return updateHostText(current$$1, workInProgress); + + case SuspenseComponent: + return updateSuspenseComponent(current$$1, workInProgress, renderExpirationTime); + + case HostPortal: + return updatePortalComponent(current$$1, workInProgress, renderExpirationTime); + + case ForwardRef: { + var type = workInProgress.type; + var _unresolvedProps2 = workInProgress.pendingProps; + + var _resolvedProps2 = + workInProgress.elementType === type + ? _unresolvedProps2 + : resolveDefaultProps(type, _unresolvedProps2); + + return updateForwardRef( + current$$1, + workInProgress, + type, + _resolvedProps2, + renderExpirationTime, + ); + } + + case Fragment: + return updateFragment(current$$1, workInProgress, renderExpirationTime); + + case Mode: + return updateMode(current$$1, workInProgress, renderExpirationTime); + + case Profiler: + return updateProfiler(current$$1, workInProgress, renderExpirationTime); + + case ContextProvider: + return updateContextProvider(current$$1, workInProgress, renderExpirationTime); + + case ContextConsumer: + return updateContextConsumer(current$$1, workInProgress, renderExpirationTime); + + case MemoComponent: { + var _type2 = workInProgress.type; + var _unresolvedProps3 = workInProgress.pendingProps; // Resolve outer props first, then resolve inner props. + + var _resolvedProps3 = resolveDefaultProps(_type2, _unresolvedProps3); + + { + if (workInProgress.type !== workInProgress.elementType) { + var outerPropTypes = _type2.propTypes; + + if (outerPropTypes) { + checkPropTypes( + outerPropTypes, + _resolvedProps3, // Resolved for outer only + 'prop', + getComponentName(_type2), + getCurrentFiberStackInDev, + ); + } + } + } + + _resolvedProps3 = resolveDefaultProps(_type2.type, _resolvedProps3); + return updateMemoComponent( + current$$1, + workInProgress, + _type2, + _resolvedProps3, + updateExpirationTime, + renderExpirationTime, + ); + } + + case SimpleMemoComponent: { + return updateSimpleMemoComponent( + current$$1, + workInProgress, + workInProgress.type, + workInProgress.pendingProps, + updateExpirationTime, + renderExpirationTime, + ); + } + + case IncompleteClassComponent: { + var _Component3 = workInProgress.type; + var _unresolvedProps4 = workInProgress.pendingProps; + + var _resolvedProps4 = + workInProgress.elementType === _Component3 + ? _unresolvedProps4 + : resolveDefaultProps(_Component3, _unresolvedProps4); + + return mountIncompleteClassComponent( + current$$1, + workInProgress, + _Component3, + _resolvedProps4, + renderExpirationTime, + ); + } + + case SuspenseListComponent: { + return updateSuspenseListComponent(current$$1, workInProgress, renderExpirationTime); + } + + case FundamentalComponent: { + if (enableFundamentalAPI) { + return updateFundamentalComponent$1(current$$1, workInProgress, renderExpirationTime); + } + + break; + } + + case ScopeComponent: { + if (enableScopeAPI) { + return updateScopeComponent(current$$1, workInProgress, renderExpirationTime); + } + + break; + } + } + + { + { + throw Error( + 'Unknown unit of work tag (' + + workInProgress.tag + + '). This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + } + + function createFundamentalStateInstance(currentFiber, props, impl, state) { + return { + currentFiber: currentFiber, + impl: impl, + instance: null, + prevProps: null, + props: props, + state: state, + }; + } + + function isFiberSuspenseAndTimedOut(fiber) { + return fiber.tag === SuspenseComponent && fiber.memoizedState !== null; + } + + function getSuspenseFallbackChild(fiber) { + return fiber.child.sibling.child; + } + + var emptyObject$1 = {}; + + function collectScopedNodes(node, fn, scopedNodes) { + if (enableScopeAPI) { + if (node.tag === HostComponent) { + var _type = node.type, + memoizedProps = node.memoizedProps, + stateNode = node.stateNode; + + var _instance = getPublicInstance(stateNode); + + if (_instance !== null && fn(_type, memoizedProps || emptyObject$1, _instance) === true) { + scopedNodes.push(_instance); + } + } + + var child = node.child; + + if (isFiberSuspenseAndTimedOut(node)) { + child = getSuspenseFallbackChild(node); + } + + if (child !== null) { + collectScopedNodesFromChildren(child, fn, scopedNodes); + } + } + } + + function collectFirstScopedNode(node, fn) { + if (enableScopeAPI) { + if (node.tag === HostComponent) { + var _type2 = node.type, + memoizedProps = node.memoizedProps, + stateNode = node.stateNode; + + var _instance2 = getPublicInstance(stateNode); + + if (_instance2 !== null && fn(_type2, memoizedProps, _instance2) === true) { + return _instance2; + } + } + + var child = node.child; + + if (isFiberSuspenseAndTimedOut(node)) { + child = getSuspenseFallbackChild(node); + } + + if (child !== null) { + return collectFirstScopedNodeFromChildren(child, fn); + } + } + + return null; + } + + function collectScopedNodesFromChildren(startingChild, fn, scopedNodes) { + var child = startingChild; + + while (child !== null) { + collectScopedNodes(child, fn, scopedNodes); + child = child.sibling; + } + } + + function collectFirstScopedNodeFromChildren(startingChild, fn) { + var child = startingChild; + + while (child !== null) { + var scopedNode = collectFirstScopedNode(child, fn); + + if (scopedNode !== null) { + return scopedNode; + } + + child = child.sibling; + } + + return null; + } + + function collectNearestScopeMethods(node, scope, childrenScopes) { + if (isValidScopeNode(node, scope)) { + childrenScopes.push(node.stateNode.methods); + } else { + var child = node.child; + + if (isFiberSuspenseAndTimedOut(node)) { + child = getSuspenseFallbackChild(node); + } + + if (child !== null) { + collectNearestChildScopeMethods(child, scope, childrenScopes); + } + } + } + + function collectNearestChildScopeMethods(startingChild, scope, childrenScopes) { + var child = startingChild; + + while (child !== null) { + collectNearestScopeMethods(child, scope, childrenScopes); + child = child.sibling; + } + } + + function isValidScopeNode(node, scope) { + return node.tag === ScopeComponent && node.type === scope && node.stateNode !== null; + } + + function createScopeMethods(scope, instance) { + return { + getChildren: function () { + var currentFiber = instance.fiber; + var child = currentFiber.child; + var childrenScopes = []; + + if (child !== null) { + collectNearestChildScopeMethods(child, scope, childrenScopes); + } + + return childrenScopes.length === 0 ? null : childrenScopes; + }, + getChildrenFromRoot: function () { + var currentFiber = instance.fiber; + var node = currentFiber; + + while (node !== null) { + var parent = node.return; + + if (parent === null) { + break; + } + + node = parent; + + if (node.tag === ScopeComponent && node.type === scope) { + break; + } + } + + var childrenScopes = []; + collectNearestChildScopeMethods(node.child, scope, childrenScopes); + return childrenScopes.length === 0 ? null : childrenScopes; + }, + getParent: function () { + var node = instance.fiber.return; + + while (node !== null) { + if (node.tag === ScopeComponent && node.type === scope) { + return node.stateNode.methods; + } + + node = node.return; + } + + return null; + }, + getProps: function () { + var currentFiber = instance.fiber; + return currentFiber.memoizedProps; + }, + queryAllNodes: function (fn) { + var currentFiber = instance.fiber; + var child = currentFiber.child; + var scopedNodes = []; + + if (child !== null) { + collectScopedNodesFromChildren(child, fn, scopedNodes); + } + + return scopedNodes.length === 0 ? null : scopedNodes; + }, + queryFirstNode: function (fn) { + var currentFiber = instance.fiber; + var child = currentFiber.child; + + if (child !== null) { + return collectFirstScopedNodeFromChildren(child, fn); + } + + return null; + }, + containsNode: function (node) { + var fiber = getInstanceFromNode$2(node); + + while (fiber !== null) { + if (fiber.tag === ScopeComponent && fiber.type === scope && fiber.stateNode === instance) { + return true; + } + + fiber = fiber.return; + } + + return false; + }, + }; + } + + function markUpdate(workInProgress) { + // Tag the fiber with an update effect. This turns a Placement into + // a PlacementAndUpdate. + workInProgress.effectTag |= Update; + } + + function markRef$1(workInProgress) { + workInProgress.effectTag |= Ref; + } + + var appendAllChildren; + var updateHostContainer; + var updateHostComponent$1; + var updateHostText$1; + + if (supportsMutation) { + // Mutation mode + appendAllChildren = function (parent, workInProgress, needsVisibilityToggle, isHidden) { + // We only have the top Fiber that was created but we need recurse down its + // children to find all the terminal nodes. + var node = workInProgress.child; + + while (node !== null) { + if (node.tag === HostComponent || node.tag === HostText) { + appendInitialChild(parent, node.stateNode); + } else if (enableFundamentalAPI && node.tag === FundamentalComponent) { + appendInitialChild(parent, node.stateNode.instance); + } else if (node.tag === HostPortal) { + // If we have a portal child, then we don't want to traverse + // down its children. Instead, we'll get insertions from each child in + // the portal directly. + } else if (node.child !== null) { + node.child.return = node; + node = node.child; + continue; + } + + if (node === workInProgress) { + return; + } + + while (node.sibling === null) { + if (node.return === null || node.return === workInProgress) { + return; + } + + node = node.return; + } + + node.sibling.return = node.return; + node = node.sibling; + } + }; + + updateHostContainer = function (workInProgress) { + // Noop + }; + + updateHostComponent$1 = function ( + current, + workInProgress, + type, + newProps, + rootContainerInstance, + ) { + // If we have an alternate, that means this is an update and we need to + // schedule a side-effect to do the updates. + var oldProps = current.memoizedProps; + + if (oldProps === newProps) { + // In mutation mode, this is sufficient for a bailout because + // we won't touch this node even if children changed. + return; + } // If we get updated because one of our children updated, we don't + // have newProps so we'll have to reuse them. + // TODO: Split the update API as separate for the props vs. children. + // Even better would be if children weren't special cased at all tho. + + var instance = workInProgress.stateNode; + var currentHostContext = getHostContext(); // TODO: Experiencing an error where oldProps is null. Suggests a host + // component is hitting the resume path. Figure out why. Possibly + // related to `hidden`. + + var updatePayload = prepareUpdate( + instance, + type, + oldProps, + newProps, + rootContainerInstance, + currentHostContext, + ); // TODO: Type this specific to this type of component. + + workInProgress.updateQueue = updatePayload; // If the update payload indicates that there is a change or if there + // is a new ref we mark this as an update. All the work is done in commitWork. + + if (updatePayload) { + markUpdate(workInProgress); + } + }; + + updateHostText$1 = function (current, workInProgress, oldText, newText) { + // If the text differs, mark it as an update. All the work in done in commitWork. + if (oldText !== newText) { + markUpdate(workInProgress); + } + }; + } else if (supportsPersistence) { + // Persistent host tree mode + appendAllChildren = function (parent, workInProgress, needsVisibilityToggle, isHidden) { + // We only have the top Fiber that was created but we need recurse down its + // children to find all the terminal nodes. + var node = workInProgress.child; + + while (node !== null) { + // eslint-disable-next-line no-labels + branches: if (node.tag === HostComponent) { + var instance = node.stateNode; + + if (needsVisibilityToggle && isHidden) { + // This child is inside a timed out tree. Hide it. + var props = node.memoizedProps; + var type = node.type; + instance = cloneHiddenInstance(instance, type, props, node); + } + + appendInitialChild(parent, instance); + } else if (node.tag === HostText) { + var _instance = node.stateNode; + + if (needsVisibilityToggle && isHidden) { + // This child is inside a timed out tree. Hide it. + var text = node.memoizedProps; + _instance = cloneHiddenTextInstance(_instance, text, node); + } + + appendInitialChild(parent, _instance); + } else if (enableFundamentalAPI && node.tag === FundamentalComponent) { + var _instance2 = node.stateNode.instance; + + if (needsVisibilityToggle && isHidden) { + // This child is inside a timed out tree. Hide it. + var _props = node.memoizedProps; + var _type = node.type; + _instance2 = cloneHiddenInstance(_instance2, _type, _props, node); + } + + appendInitialChild(parent, _instance2); + } else if (node.tag === HostPortal) { + // If we have a portal child, then we don't want to traverse + // down its children. Instead, we'll get insertions from each child in + // the portal directly. + } else if (node.tag === SuspenseComponent) { + if ((node.effectTag & Update) !== NoEffect) { + // Need to toggle the visibility of the primary children. + var newIsHidden = node.memoizedState !== null; + + if (newIsHidden) { + var primaryChildParent = node.child; + + if (primaryChildParent !== null) { + if (primaryChildParent.child !== null) { + primaryChildParent.child.return = primaryChildParent; + appendAllChildren(parent, primaryChildParent, true, newIsHidden); + } + + var fallbackChildParent = primaryChildParent.sibling; + + if (fallbackChildParent !== null) { + fallbackChildParent.return = node; + node = fallbackChildParent; + continue; + } + } + } + } + + if (node.child !== null) { + // Continue traversing like normal + node.child.return = node; + node = node.child; + continue; + } + } else if (node.child !== null) { + node.child.return = node; + node = node.child; + continue; + } // $FlowFixMe This is correct but Flow is confused by the labeled break. + + node = node; + + if (node === workInProgress) { + return; + } + + while (node.sibling === null) { + if (node.return === null || node.return === workInProgress) { + return; + } + + node = node.return; + } + + node.sibling.return = node.return; + node = node.sibling; + } + }; // An unfortunate fork of appendAllChildren because we have two different parent types. + + var appendAllChildrenToContainer = function ( + containerChildSet, + workInProgress, + needsVisibilityToggle, + isHidden, + ) { + // We only have the top Fiber that was created but we need recurse down its + // children to find all the terminal nodes. + var node = workInProgress.child; + + while (node !== null) { + // eslint-disable-next-line no-labels + branches: if (node.tag === HostComponent) { + var instance = node.stateNode; + + if (needsVisibilityToggle && isHidden) { + // This child is inside a timed out tree. Hide it. + var props = node.memoizedProps; + var type = node.type; + instance = cloneHiddenInstance(instance, type, props, node); + } + + appendChildToContainerChildSet(containerChildSet, instance); + } else if (node.tag === HostText) { + var _instance3 = node.stateNode; + + if (needsVisibilityToggle && isHidden) { + // This child is inside a timed out tree. Hide it. + var text = node.memoizedProps; + _instance3 = cloneHiddenTextInstance(_instance3, text, node); + } + + appendChildToContainerChildSet(containerChildSet, _instance3); + } else if (enableFundamentalAPI && node.tag === FundamentalComponent) { + var _instance4 = node.stateNode.instance; + + if (needsVisibilityToggle && isHidden) { + // This child is inside a timed out tree. Hide it. + var _props2 = node.memoizedProps; + var _type2 = node.type; + _instance4 = cloneHiddenInstance(_instance4, _type2, _props2, node); + } + + appendChildToContainerChildSet(containerChildSet, _instance4); + } else if (node.tag === HostPortal) { + // If we have a portal child, then we don't want to traverse + // down its children. Instead, we'll get insertions from each child in + // the portal directly. + } else if (node.tag === SuspenseComponent) { + if ((node.effectTag & Update) !== NoEffect) { + // Need to toggle the visibility of the primary children. + var newIsHidden = node.memoizedState !== null; + + if (newIsHidden) { + var primaryChildParent = node.child; + + if (primaryChildParent !== null) { + if (primaryChildParent.child !== null) { + primaryChildParent.child.return = primaryChildParent; + appendAllChildrenToContainer( + containerChildSet, + primaryChildParent, + true, + newIsHidden, + ); + } + + var fallbackChildParent = primaryChildParent.sibling; + + if (fallbackChildParent !== null) { + fallbackChildParent.return = node; + node = fallbackChildParent; + continue; + } + } + } + } + + if (node.child !== null) { + // Continue traversing like normal + node.child.return = node; + node = node.child; + continue; + } + } else if (node.child !== null) { + node.child.return = node; + node = node.child; + continue; + } // $FlowFixMe This is correct but Flow is confused by the labeled break. + + node = node; + + if (node === workInProgress) { + return; + } + + while (node.sibling === null) { + if (node.return === null || node.return === workInProgress) { + return; + } + + node = node.return; + } + + node.sibling.return = node.return; + node = node.sibling; + } + }; + + updateHostContainer = function (workInProgress) { + var portalOrRoot = workInProgress.stateNode; + var childrenUnchanged = workInProgress.firstEffect === null; + + if (childrenUnchanged) { + // No changes, just reuse the existing instance. + } else { + var container = portalOrRoot.containerInfo; + var newChildSet = createContainerChildSet(container); // If children might have changed, we have to add them all to the set. + + appendAllChildrenToContainer(newChildSet, workInProgress, false, false); + portalOrRoot.pendingChildren = newChildSet; // Schedule an update on the container to swap out the container. + + markUpdate(workInProgress); + finalizeContainerChildren(container, newChildSet); + } + }; + + updateHostComponent$1 = function ( + current, + workInProgress, + type, + newProps, + rootContainerInstance, + ) { + var currentInstance = current.stateNode; + var oldProps = current.memoizedProps; // If there are no effects associated with this node, then none of our children had any updates. + // This guarantees that we can reuse all of them. + + var childrenUnchanged = workInProgress.firstEffect === null; + + if (childrenUnchanged && oldProps === newProps) { + // No changes, just reuse the existing instance. + // Note that this might release a previous clone. + workInProgress.stateNode = currentInstance; + return; + } + + var recyclableInstance = workInProgress.stateNode; + var currentHostContext = getHostContext(); + var updatePayload = null; + + if (oldProps !== newProps) { + updatePayload = prepareUpdate( + recyclableInstance, + type, + oldProps, + newProps, + rootContainerInstance, + currentHostContext, + ); + } + + if (childrenUnchanged && updatePayload === null) { + // No changes, just reuse the existing instance. + // Note that this might release a previous clone. + workInProgress.stateNode = currentInstance; + return; + } + + var newInstance = cloneInstance( + currentInstance, + updatePayload, + type, + oldProps, + newProps, + workInProgress, + childrenUnchanged, + recyclableInstance, + ); + + if ( + finalizeInitialChildren( + newInstance, + type, + newProps, + rootContainerInstance, + currentHostContext, + ) + ) { + markUpdate(workInProgress); + } + + workInProgress.stateNode = newInstance; + + if (childrenUnchanged) { + // If there are no other effects in this tree, we need to flag this node as having one. + // Even though we're not going to use it for anything. + // Otherwise parents won't know that there are new children to propagate upwards. + markUpdate(workInProgress); + } else { + // If children might have changed, we have to add them all to the set. + appendAllChildren(newInstance, workInProgress, false, false); + } + }; + + updateHostText$1 = function (current, workInProgress, oldText, newText) { + if (oldText !== newText) { + // If the text content differs, we'll create a new text instance for it. + var rootContainerInstance = getRootHostContainer(); + var currentHostContext = getHostContext(); + workInProgress.stateNode = createTextInstance( + newText, + rootContainerInstance, + currentHostContext, + workInProgress, + ); // We'll have to mark it as having an effect, even though we won't use the effect for anything. + // This lets the parents know that at least one of their children has changed. + + markUpdate(workInProgress); + } + }; + } else { + // No host operations + updateHostContainer = function (workInProgress) { + // Noop + }; + + updateHostComponent$1 = function ( + current, + workInProgress, + type, + newProps, + rootContainerInstance, + ) { + // Noop + }; + + updateHostText$1 = function (current, workInProgress, oldText, newText) { + // Noop + }; + } + + function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { + switch (renderState.tailMode) { + case 'hidden': { + // Any insertions at the end of the tail list after this point + // should be invisible. If there are already mounted boundaries + // anything before them are not considered for collapsing. + // Therefore we need to go through the whole tail to find if + // there are any. + var tailNode = renderState.tail; + var lastTailNode = null; + + while (tailNode !== null) { + if (tailNode.alternate !== null) { + lastTailNode = tailNode; + } + + tailNode = tailNode.sibling; + } // Next we're simply going to delete all insertions after the + // last rendered item. + + if (lastTailNode === null) { + // All remaining items in the tail are insertions. + renderState.tail = null; + } else { + // Detach the insertion after the last node that was already + // inserted. + lastTailNode.sibling = null; + } + + break; + } + + case 'collapsed': { + // Any insertions at the end of the tail list after this point + // should be invisible. If there are already mounted boundaries + // anything before them are not considered for collapsing. + // Therefore we need to go through the whole tail to find if + // there are any. + var _tailNode = renderState.tail; + var _lastTailNode = null; + + while (_tailNode !== null) { + if (_tailNode.alternate !== null) { + _lastTailNode = _tailNode; + } + + _tailNode = _tailNode.sibling; + } // Next we're simply going to delete all insertions after the + // last rendered item. + + if (_lastTailNode === null) { + // All remaining items in the tail are insertions. + if (!hasRenderedATailFallback && renderState.tail !== null) { + // We suspended during the head. We want to show at least one + // row at the tail. So we'll keep on and cut off the rest. + renderState.tail.sibling = null; + } else { + renderState.tail = null; + } + } else { + // Detach the insertion after the last node that was already + // inserted. + _lastTailNode.sibling = null; + } + + break; + } + } + } + + function completeWork(current, workInProgress, renderExpirationTime) { + var newProps = workInProgress.pendingProps; + + switch (workInProgress.tag) { + case IndeterminateComponent: + break; + + case LazyComponent: + break; + + case SimpleMemoComponent: + case FunctionComponent: + break; + + case ClassComponent: { + var Component = workInProgress.type; + + if (isContextProvider(Component)) { + popContext(workInProgress); + } + + break; + } + + case HostRoot: { + popHostContainer(workInProgress); + popTopLevelContextObject(workInProgress); + var fiberRoot = workInProgress.stateNode; + + if (fiberRoot.pendingContext) { + fiberRoot.context = fiberRoot.pendingContext; + fiberRoot.pendingContext = null; + } + + if (current === null || current.child === null) { + // If we hydrated, pop so that we can delete any remaining children + // that weren't hydrated. + var wasHydrated = popHydrationState(workInProgress); + + if (wasHydrated) { + // If we hydrated, then we'll need to schedule an update for + // the commit side-effects on the root. + markUpdate(workInProgress); + } + } + + updateHostContainer(workInProgress); + break; + } + + case HostComponent: { + popHostContext(workInProgress); + var rootContainerInstance = getRootHostContainer(); + var type = workInProgress.type; + + if (current !== null && workInProgress.stateNode != null) { + updateHostComponent$1(current, workInProgress, type, newProps, rootContainerInstance); + + if (enableFlareAPI) { + var prevListeners = current.memoizedProps.listeners; + var nextListeners = newProps.listeners; + + if (prevListeners !== nextListeners) { + markUpdate(workInProgress); + } + } + + if (current.ref !== workInProgress.ref) { + markRef$1(workInProgress); + } + } else { + if (!newProps) { + if (!(workInProgress.stateNode !== null)) { + { + throw Error( + 'We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } // This can happen when we abort work. + + break; + } + + var currentHostContext = getHostContext(); // TODO: Move createInstance to beginWork and keep it on a context + // "stack" as the parent. Then append children as we go in beginWork + // or completeWork depending on we want to add then top->down or + // bottom->up. Top->down is faster in IE11. + + var _wasHydrated = popHydrationState(workInProgress); + + if (_wasHydrated) { + // TODO: Move this and createInstance step into the beginPhase + // to consolidate. + if ( + prepareToHydrateHostInstance(workInProgress, rootContainerInstance, currentHostContext) + ) { + // If changes to the hydrated node needs to be applied at the + // commit-phase we mark this as such. + markUpdate(workInProgress); + } + + if (enableFlareAPI) { + var listeners = newProps.listeners; + + if (listeners != null) { + updateEventListeners(listeners, workInProgress, rootContainerInstance); + } + } + } else { + var instance = createInstance( + type, + newProps, + rootContainerInstance, + currentHostContext, + workInProgress, + ); + appendAllChildren(instance, workInProgress, false, false); // This needs to be set before we mount Flare event listeners + + workInProgress.stateNode = instance; + + if (enableFlareAPI) { + var _listeners = newProps.listeners; + + if (_listeners != null) { + updateEventListeners(_listeners, workInProgress, rootContainerInstance); + } + } // Certain renderers require commit-time effects for initial mount. + // (eg DOM renderer supports auto-focus for certain elements). + // Make sure such renderers get scheduled for later work. + + if ( + finalizeInitialChildren( + instance, + type, + newProps, + rootContainerInstance, + currentHostContext, + ) + ) { + markUpdate(workInProgress); + } + } + + if (workInProgress.ref !== null) { + // If there is a ref on a host node we need to schedule a callback + markRef$1(workInProgress); + } + } + + break; + } + + case HostText: { + var newText = newProps; + + if (current && workInProgress.stateNode != null) { + var oldText = current.memoizedProps; // If we have an alternate, that means this is an update and we need + // to schedule a side-effect to do the updates. + + updateHostText$1(current, workInProgress, oldText, newText); + } else { + if (typeof newText !== 'string') { + if (!(workInProgress.stateNode !== null)) { + { + throw Error( + 'We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } // This can happen when we abort work. + } + + var _rootContainerInstance = getRootHostContainer(); + + var _currentHostContext = getHostContext(); + + var _wasHydrated2 = popHydrationState(workInProgress); + + if (_wasHydrated2) { + if (prepareToHydrateHostTextInstance(workInProgress)) { + markUpdate(workInProgress); + } + } else { + workInProgress.stateNode = createTextInstance( + newText, + _rootContainerInstance, + _currentHostContext, + workInProgress, + ); + } + } + + break; + } + + case ForwardRef: + break; + + case SuspenseComponent: { + popSuspenseContext(workInProgress); + var nextState = workInProgress.memoizedState; + + if (enableSuspenseServerRenderer) { + if (nextState !== null && nextState.dehydrated !== null) { + if (current === null) { + var _wasHydrated3 = popHydrationState(workInProgress); + + if (!_wasHydrated3) { + { + throw Error( + 'A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.', + ); + } + } + + prepareToHydrateHostSuspenseInstance(workInProgress); + + if (enableSchedulerTracing) { + markSpawnedWork(Never); + } + + return null; + } else { + // We should never have been in a hydration state if we didn't have a current. + // However, in some of those paths, we might have reentered a hydration state + // and then we might be inside a hydration state. In that case, we'll need to + // exit out of it. + resetHydrationState(); + + if ((workInProgress.effectTag & DidCapture) === NoEffect) { + // This boundary did not suspend so it's now hydrated and unsuspended. + workInProgress.memoizedState = null; + } // If nothing suspended, we need to schedule an effect to mark this boundary + // as having hydrated so events know that they're free be invoked. + // It's also a signal to replay events and the suspense callback. + // If something suspended, schedule an effect to attach retry listeners. + // So we might as well always mark this. + + workInProgress.effectTag |= Update; + return null; + } + } + } + + if ((workInProgress.effectTag & DidCapture) !== NoEffect) { + // Something suspended. Re-render with the fallback children. + workInProgress.expirationTime = renderExpirationTime; // Do not reset the effect list. + + return workInProgress; + } + + var nextDidTimeout = nextState !== null; + var prevDidTimeout = false; + + if (current === null) { + if (workInProgress.memoizedProps.fallback !== undefined) { + popHydrationState(workInProgress); + } + } else { + var prevState = current.memoizedState; + prevDidTimeout = prevState !== null; + + if (!nextDidTimeout && prevState !== null) { + // We just switched from the fallback to the normal children. + // Delete the fallback. + // TODO: Would it be better to store the fallback fragment on + // the stateNode during the begin phase? + var currentFallbackChild = current.child.sibling; + + if (currentFallbackChild !== null) { + // Deletions go at the beginning of the return fiber's effect list + var first = workInProgress.firstEffect; + + if (first !== null) { + workInProgress.firstEffect = currentFallbackChild; + currentFallbackChild.nextEffect = first; + } else { + workInProgress.firstEffect = workInProgress.lastEffect = currentFallbackChild; + currentFallbackChild.nextEffect = null; + } + + currentFallbackChild.effectTag = Deletion; + } + } + } + + if (nextDidTimeout && !prevDidTimeout) { + // If this subtreee is running in blocking mode we can suspend, + // otherwise we won't suspend. + // TODO: This will still suspend a synchronous tree if anything + // in the concurrent tree already suspended during this render. + // This is a known bug. + if ((workInProgress.mode & BlockingMode) !== NoMode) { + // TODO: Move this back to throwException because this is too late + // if this is a large tree which is common for initial loads. We + // don't know if we should restart a render or not until we get + // this marker, and this is too late. + // If this render already had a ping or lower pri updates, + // and this is the first time we know we're going to suspend we + // should be able to immediately restart from within throwException. + var hasInvisibleChildContext = + current === null && workInProgress.memoizedProps.unstable_avoidThisFallback !== true; + + if ( + hasInvisibleChildContext || + hasSuspenseContext(suspenseStackCursor.current, InvisibleParentSuspenseContext) + ) { + // If this was in an invisible tree or a new render, then showing + // this boundary is ok. + renderDidSuspend(); + } else { + // Otherwise, we're going to have to hide content so we should + // suspend for longer if possible. + renderDidSuspendDelayIfPossible(); + } + } + } + + if (supportsPersistence) { + // TODO: Only schedule updates if not prevDidTimeout. + if (nextDidTimeout) { + // If this boundary just timed out, schedule an effect to attach a + // retry listener to the proimse. This flag is also used to hide the + // primary children. + workInProgress.effectTag |= Update; + } + } + + if (supportsMutation) { + // TODO: Only schedule updates if these values are non equal, i.e. it changed. + if (nextDidTimeout || prevDidTimeout) { + // If this boundary just timed out, schedule an effect to attach a + // retry listener to the proimse. This flag is also used to hide the + // primary children. In mutation mode, we also need the flag to + // *unhide* children that were previously hidden, so check if the + // is currently timed out, too. + workInProgress.effectTag |= Update; + } + } + + if ( + enableSuspenseCallback && + workInProgress.updateQueue !== null && + workInProgress.memoizedProps.suspenseCallback != null + ) { + // Always notify the callback + workInProgress.effectTag |= Update; + } + + break; + } + + case Fragment: + break; + + case Mode: + break; + + case Profiler: + break; + + case HostPortal: + popHostContainer(workInProgress); + updateHostContainer(workInProgress); + break; + + case ContextProvider: + // Pop provider fiber + popProvider(workInProgress); + break; + + case ContextConsumer: + break; + + case MemoComponent: + break; + + case IncompleteClassComponent: { + // Same as class component case. I put it down here so that the tags are + // sequential to ensure this switch is compiled to a jump table. + var _Component = workInProgress.type; + + if (isContextProvider(_Component)) { + popContext(workInProgress); + } + + break; + } + + case SuspenseListComponent: { + popSuspenseContext(workInProgress); + var renderState = workInProgress.memoizedState; + + if (renderState === null) { + // We're running in the default, "independent" mode. We don't do anything + // in this mode. + break; + } + + var didSuspendAlready = (workInProgress.effectTag & DidCapture) !== NoEffect; + var renderedTail = renderState.rendering; + + if (renderedTail === null) { + // We just rendered the head. + if (!didSuspendAlready) { + // This is the first pass. We need to figure out if anything is still + // suspended in the rendered set. + // If new content unsuspended, but there's still some content that + // didn't. Then we need to do a second pass that forces everything + // to keep showing their fallbacks. + // We might be suspended if something in this render pass suspended, or + // something in the previous committed pass suspended. Otherwise, + // there's no chance so we can skip the expensive call to + // findFirstSuspended. + var cannotBeSuspended = + renderHasNotSuspendedYet() && + (current === null || (current.effectTag & DidCapture) === NoEffect); + + if (!cannotBeSuspended) { + var row = workInProgress.child; + + while (row !== null) { + var suspended = findFirstSuspended(row); + + if (suspended !== null) { + didSuspendAlready = true; + workInProgress.effectTag |= DidCapture; + cutOffTailIfNeeded(renderState, false); // If this is a newly suspended tree, it might not get committed as + // part of the second pass. In that case nothing will subscribe to + // its thennables. Instead, we'll transfer its thennables to the + // SuspenseList so that it can retry if they resolve. + // There might be multiple of these in the list but since we're + // going to wait for all of them anyway, it doesn't really matter + // which ones gets to ping. In theory we could get clever and keep + // track of how many dependencies remain but it gets tricky because + // in the meantime, we can add/remove/change items and dependencies. + // We might bail out of the loop before finding any but that + // doesn't matter since that means that the other boundaries that + // we did find already has their listeners attached. + + var newThennables = suspended.updateQueue; + + if (newThennables !== null) { + workInProgress.updateQueue = newThennables; + workInProgress.effectTag |= Update; + } // Rerender the whole list, but this time, we'll force fallbacks + // to stay in place. + // Reset the effect list before doing the second pass since that's now invalid. + + if (renderState.lastEffect === null) { + workInProgress.firstEffect = null; + } + + workInProgress.lastEffect = renderState.lastEffect; // Reset the child fibers to their original state. + + resetChildFibers(workInProgress, renderExpirationTime); // Set up the Suspense Context to force suspense and immediately + // rerender the children. + + pushSuspenseContext( + workInProgress, + setShallowSuspenseContext(suspenseStackCursor.current, ForceSuspenseFallback), + ); + return workInProgress.child; + } + + row = row.sibling; + } + } + } else { + cutOffTailIfNeeded(renderState, false); + } // Next we're going to render the tail. + } else { + // Append the rendered row to the child list. + if (!didSuspendAlready) { + var _suspended = findFirstSuspended(renderedTail); + + if (_suspended !== null) { + workInProgress.effectTag |= DidCapture; + didSuspendAlready = true; // Ensure we transfer the update queue to the parent so that it doesn't + // get lost if this row ends up dropped during a second pass. + + var _newThennables = _suspended.updateQueue; + + if (_newThennables !== null) { + workInProgress.updateQueue = _newThennables; + workInProgress.effectTag |= Update; + } + + cutOffTailIfNeeded(renderState, true); // This might have been modified. + + if ( + renderState.tail === null && + renderState.tailMode === 'hidden' && + !renderedTail.alternate + ) { + // We need to delete the row we just rendered. + // Reset the effect list to what it was before we rendered this + // child. The nested children have already appended themselves. + var lastEffect = (workInProgress.lastEffect = renderState.lastEffect); // Remove any effects that were appended after this point. + + if (lastEffect !== null) { + lastEffect.nextEffect = null; + } // We're done. + + return null; + } + } else if (now() > renderState.tailExpiration && renderExpirationTime > Never) { + // We have now passed our CPU deadline and we'll just give up further + // attempts to render the main content and only render fallbacks. + // The assumption is that this is usually faster. + workInProgress.effectTag |= DidCapture; + didSuspendAlready = true; + cutOffTailIfNeeded(renderState, false); // Since nothing actually suspended, there will nothing to ping this + // to get it started back up to attempt the next item. If we can show + // them, then they really have the same priority as this render. + // So we'll pick it back up the very next render pass once we've had + // an opportunity to yield for paint. + + var nextPriority = renderExpirationTime - 1; + workInProgress.expirationTime = workInProgress.childExpirationTime = nextPriority; + + if (enableSchedulerTracing) { + markSpawnedWork(nextPriority); + } + } + } + + if (renderState.isBackwards) { + // The effect list of the backwards tail will have been added + // to the end. This breaks the guarantee that life-cycles fire in + // sibling order but that isn't a strong guarantee promised by React. + // Especially since these might also just pop in during future commits. + // Append to the beginning of the list. + renderedTail.sibling = workInProgress.child; + workInProgress.child = renderedTail; + } else { + var previousSibling = renderState.last; + + if (previousSibling !== null) { + previousSibling.sibling = renderedTail; + } else { + workInProgress.child = renderedTail; + } + + renderState.last = renderedTail; + } + } + + if (renderState.tail !== null) { + // We still have tail rows to render. + if (renderState.tailExpiration === 0) { + // Heuristic for how long we're willing to spend rendering rows + // until we just give up and show what we have so far. + var TAIL_EXPIRATION_TIMEOUT_MS = 500; + renderState.tailExpiration = now() + TAIL_EXPIRATION_TIMEOUT_MS; + } // Pop a row. + + var next = renderState.tail; + renderState.rendering = next; + renderState.tail = next.sibling; + renderState.lastEffect = workInProgress.lastEffect; + next.sibling = null; // Restore the context. + // TODO: We can probably just avoid popping it instead and only + // setting it the first time we go from not suspended to suspended. + + var suspenseContext = suspenseStackCursor.current; + + if (didSuspendAlready) { + suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback); + } else { + suspenseContext = setDefaultShallowSuspenseContext(suspenseContext); + } + + pushSuspenseContext(workInProgress, suspenseContext); // Do a pass over the next row. + + return next; + } + + break; + } + + case FundamentalComponent: { + if (enableFundamentalAPI) { + var fundamentalImpl = workInProgress.type.impl; + var fundamentalInstance = workInProgress.stateNode; + + if (fundamentalInstance === null) { + var getInitialState = fundamentalImpl.getInitialState; + var fundamentalState; + + if (getInitialState !== undefined) { + fundamentalState = getInitialState(newProps); + } + + fundamentalInstance = workInProgress.stateNode = createFundamentalStateInstance( + workInProgress, + newProps, + fundamentalImpl, + fundamentalState || {}, + ); + + var _instance5 = getFundamentalComponentInstance(fundamentalInstance); + + fundamentalInstance.instance = _instance5; + + if (fundamentalImpl.reconcileChildren === false) { + return null; + } + + appendAllChildren(_instance5, workInProgress, false, false); + mountFundamentalComponent(fundamentalInstance); + } else { + // We fire update in commit phase + var prevProps = fundamentalInstance.props; + fundamentalInstance.prevProps = prevProps; + fundamentalInstance.props = newProps; + fundamentalInstance.currentFiber = workInProgress; + + if (supportsPersistence) { + var _instance6 = cloneFundamentalInstance(fundamentalInstance); + + fundamentalInstance.instance = _instance6; + appendAllChildren(_instance6, workInProgress, false, false); + } + + var shouldUpdate = shouldUpdateFundamentalComponent(fundamentalInstance); + + if (shouldUpdate) { + markUpdate(workInProgress); + } + } + } + + break; + } + + case ScopeComponent: { + if (enableScopeAPI) { + if (current === null) { + var _type3 = workInProgress.type; + var scopeInstance = { + fiber: workInProgress, + methods: null, + }; + workInProgress.stateNode = scopeInstance; + scopeInstance.methods = createScopeMethods(_type3, scopeInstance); + + if (enableFlareAPI) { + var _listeners2 = newProps.listeners; + + if (_listeners2 != null) { + var _rootContainerInstance2 = getRootHostContainer(); + + updateEventListeners(_listeners2, workInProgress, _rootContainerInstance2); + } + } + + if (workInProgress.ref !== null) { + markRef$1(workInProgress); + markUpdate(workInProgress); + } + } else { + if (enableFlareAPI) { + var _prevListeners = current.memoizedProps.listeners; + var _nextListeners = newProps.listeners; + + if (_prevListeners !== _nextListeners || workInProgress.ref !== null) { + markUpdate(workInProgress); + } + } else { + if (workInProgress.ref !== null) { + markUpdate(workInProgress); + } + } + + if (current.ref !== workInProgress.ref) { + markRef$1(workInProgress); + } + } + } + + break; + } + + default: { + { + throw Error( + 'Unknown unit of work tag (' + + workInProgress.tag + + '). This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + } + + return null; + } + + function unwindWork(workInProgress, renderExpirationTime) { + switch (workInProgress.tag) { + case ClassComponent: { + var Component = workInProgress.type; + + if (isContextProvider(Component)) { + popContext(workInProgress); + } + + var effectTag = workInProgress.effectTag; + + if (effectTag & ShouldCapture) { + workInProgress.effectTag = (effectTag & ~ShouldCapture) | DidCapture; + return workInProgress; + } + + return null; + } + + case HostRoot: { + popHostContainer(workInProgress); + popTopLevelContextObject(workInProgress); + var _effectTag = workInProgress.effectTag; + + if (!((_effectTag & DidCapture) === NoEffect)) { + { + throw Error( + 'The root failed to unmount after an error. This is likely a bug in React. Please file an issue.', + ); + } + } + + workInProgress.effectTag = (_effectTag & ~ShouldCapture) | DidCapture; + return workInProgress; + } + + case HostComponent: { + // TODO: popHydrationState + popHostContext(workInProgress); + return null; + } + + case SuspenseComponent: { + popSuspenseContext(workInProgress); + + if (enableSuspenseServerRenderer) { + var suspenseState = workInProgress.memoizedState; + + if (suspenseState !== null && suspenseState.dehydrated !== null) { + if (!(workInProgress.alternate !== null)) { + { + throw Error( + 'Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue.', + ); + } + } + + resetHydrationState(); + } + } + + var _effectTag2 = workInProgress.effectTag; + + if (_effectTag2 & ShouldCapture) { + workInProgress.effectTag = (_effectTag2 & ~ShouldCapture) | DidCapture; // Captured a suspense effect. Re-render the boundary. + + return workInProgress; + } + + return null; + } + + case SuspenseListComponent: { + popSuspenseContext(workInProgress); // SuspenseList doesn't actually catch anything. It should've been + // caught by a nested boundary. If not, it should bubble through. + + return null; + } + + case HostPortal: + popHostContainer(workInProgress); + return null; + + case ContextProvider: + popProvider(workInProgress); + return null; + + default: + return null; + } + } + + function unwindInterruptedWork(interruptedWork) { + switch (interruptedWork.tag) { + case ClassComponent: { + var childContextTypes = interruptedWork.type.childContextTypes; + + if (childContextTypes !== null && childContextTypes !== undefined) { + popContext(interruptedWork); + } + + break; + } + + case HostRoot: { + popHostContainer(interruptedWork); + popTopLevelContextObject(interruptedWork); + break; + } + + case HostComponent: { + popHostContext(interruptedWork); + break; + } + + case HostPortal: + popHostContainer(interruptedWork); + break; + + case SuspenseComponent: + popSuspenseContext(interruptedWork); + break; + + case SuspenseListComponent: + popSuspenseContext(interruptedWork); + break; + + case ContextProvider: + popProvider(interruptedWork); + break; + + default: + break; + } + } + + function createCapturedValue(value, source) { + // If the value is an error, call this function immediately after it is thrown + // so the stack is accurate. + return { + value: value, + source: source, + stack: getStackByFiberInDevAndProd(source), + }; + } + + // This module is forked in different environments. + // By default, return `true` to log errors to the console. + // Forks can return `false` if this isn't desirable. + function showErrorDialog(capturedError) { + return true; + } + + function logCapturedError(capturedError) { + var logError = showErrorDialog(capturedError); // Allow injected showErrorDialog() to prevent default console.error logging. + // This enables renderers like ReactNative to better manage redbox behavior. + + if (logError === false) { + return; + } + + var error = capturedError.error; + + { + var componentName = capturedError.componentName, + componentStack = capturedError.componentStack, + errorBoundaryName = capturedError.errorBoundaryName, + errorBoundaryFound = capturedError.errorBoundaryFound, + willRetry = capturedError.willRetry; // Browsers support silencing uncaught errors by calling + // `preventDefault()` in window `error` handler. + // We record this information as an expando on the error. + + if (error != null && error._suppressLogging) { + if (errorBoundaryFound && willRetry) { + // The error is recoverable and was silenced. + // Ignore it and don't print the stack addendum. + // This is handy for testing error boundaries without noise. + return; + } // The error is fatal. Since the silencing might have + // been accidental, we'll surface it anyway. + // However, the browser would have silenced the original error + // so we'll print it first, and then print the stack addendum. + + console.error(error); // For a more detailed description of this block, see: + // https://github.com/facebook/react/pull/13384 + } + + var componentNameMessage = componentName + ? 'The above error occurred in the <' + componentName + '> component:' + : 'The above error occurred in one of your React components:'; + var errorBoundaryMessage; // errorBoundaryFound check is sufficient; errorBoundaryName check is to satisfy Flow. + + if (errorBoundaryFound && errorBoundaryName) { + if (willRetry) { + errorBoundaryMessage = + 'React will try to recreate this component tree from scratch ' + + ('using the error boundary you provided, ' + errorBoundaryName + '.'); + } else { + errorBoundaryMessage = + 'This error was initially handled by the error boundary ' + + errorBoundaryName + + '.\n' + + 'Recreating the tree from scratch failed so React will unmount the tree.'; + } + } else { + errorBoundaryMessage = + 'Consider adding an error boundary to your tree to customize error handling behavior.\n' + + 'Visit https://fb.me/react-error-boundaries to learn more about error boundaries.'; + } + + var combinedMessage = + '' + componentNameMessage + componentStack + '\n\n' + ('' + errorBoundaryMessage); // In development, we provide our own message with just the component stack. + // We don't include the original error message and JS stack because the browser + // has already printed it. Even if the application swallows the error, it is still + // displayed by the browser thanks to the DEV-only fake event trick in ReactErrorUtils. + + console.error(combinedMessage); + } + } + + var didWarnAboutUndefinedSnapshotBeforeUpdate = null; + + { + didWarnAboutUndefinedSnapshotBeforeUpdate = new Set(); + } + + var PossiblyWeakSet = typeof WeakSet === 'function' ? WeakSet : Set; + function logError(boundary, errorInfo) { + var source = errorInfo.source; + var stack = errorInfo.stack; + + if (stack === null && source !== null) { + stack = getStackByFiberInDevAndProd(source); + } + + var capturedError = { + componentName: source !== null ? getComponentName(source.type) : null, + componentStack: stack !== null ? stack : '', + error: errorInfo.value, + errorBoundary: null, + errorBoundaryName: null, + errorBoundaryFound: false, + willRetry: false, + }; + + if (boundary !== null && boundary.tag === ClassComponent) { + capturedError.errorBoundary = boundary.stateNode; + capturedError.errorBoundaryName = getComponentName(boundary.type); + capturedError.errorBoundaryFound = true; + capturedError.willRetry = true; + } + + try { + logCapturedError(capturedError); + } catch (e) { + // This method must not throw, or React internal state will get messed up. + // If console.error is overridden, or logCapturedError() shows a dialog that throws, + // we want to report this error outside of the normal stack as a last resort. + // https://github.com/facebook/react/issues/13188 + setTimeout(function () { + throw e; + }); + } + } + + var callComponentWillUnmountWithTimer = function (current$$1, instance) { + startPhaseTimer(current$$1, 'componentWillUnmount'); + instance.props = current$$1.memoizedProps; + instance.state = current$$1.memoizedState; + instance.componentWillUnmount(); + stopPhaseTimer(); + }; // Capture errors so they don't interrupt unmounting. + + function safelyCallComponentWillUnmount(current$$1, instance) { + { + invokeGuardedCallback(null, callComponentWillUnmountWithTimer, null, current$$1, instance); + + if (hasCaughtError()) { + var unmountError = clearCaughtError(); + captureCommitPhaseError(current$$1, unmountError); + } + } + } + + function safelyDetachRef(current$$1) { + var ref = current$$1.ref; + + if (ref !== null) { + if (typeof ref === 'function') { + { + invokeGuardedCallback(null, ref, null, null); + + if (hasCaughtError()) { + var refError = clearCaughtError(); + captureCommitPhaseError(current$$1, refError); + } + } + } else { + ref.current = null; + } + } + } + + function safelyCallDestroy(current$$1, destroy) { + { + invokeGuardedCallback(null, destroy, null); + + if (hasCaughtError()) { + var error = clearCaughtError(); + captureCommitPhaseError(current$$1, error); + } + } + } + + function commitBeforeMutationLifeCycles(current$$1, finishedWork) { + switch (finishedWork.tag) { + case FunctionComponent: + case ForwardRef: + case SimpleMemoComponent: { + commitHookEffectList(UnmountSnapshot, NoEffect$1, finishedWork); + return; + } + + case ClassComponent: { + if (finishedWork.effectTag & Snapshot) { + if (current$$1 !== null) { + var prevProps = current$$1.memoizedProps; + var prevState = current$$1.memoizedState; + startPhaseTimer(finishedWork, 'getSnapshotBeforeUpdate'); + var instance = finishedWork.stateNode; // We could update instance props and state here, + // but instead we rely on them being set during last render. + // TODO: revisit this when we implement resuming. + + { + if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) { + !(instance.props === finishedWork.memoizedProps) + ? warning$1( + false, + 'Expected %s props to match memoized props before ' + + 'getSnapshotBeforeUpdate. ' + + 'This might either be because of a bug in React, or because ' + + 'a component reassigns its own `this.props`. ' + + 'Please file an issue.', + getComponentName(finishedWork.type) || 'instance', + ) + : void 0; + !(instance.state === finishedWork.memoizedState) + ? warning$1( + false, + 'Expected %s state to match memoized state before ' + + 'getSnapshotBeforeUpdate. ' + + 'This might either be because of a bug in React, or because ' + + 'a component reassigns its own `this.props`. ' + + 'Please file an issue.', + getComponentName(finishedWork.type) || 'instance', + ) + : void 0; + } + } + + var snapshot = instance.getSnapshotBeforeUpdate( + finishedWork.elementType === finishedWork.type + ? prevProps + : resolveDefaultProps(finishedWork.type, prevProps), + prevState, + ); + + { + var didWarnSet = didWarnAboutUndefinedSnapshotBeforeUpdate; + + if (snapshot === undefined && !didWarnSet.has(finishedWork.type)) { + didWarnSet.add(finishedWork.type); + warningWithoutStack$1( + false, + '%s.getSnapshotBeforeUpdate(): A snapshot value (or null) ' + + 'must be returned. You have returned undefined.', + getComponentName(finishedWork.type), + ); + } + } + + instance.__reactInternalSnapshotBeforeUpdate = snapshot; + stopPhaseTimer(); + } + } + + return; + } + + case HostRoot: + case HostComponent: + case HostText: + case HostPortal: + case IncompleteClassComponent: + // Nothing to do for these component types + return; + + default: { + { + { + throw Error( + 'This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + } + } + } + + function commitHookEffectList(unmountTag, mountTag, finishedWork) { + var updateQueue = finishedWork.updateQueue; + var lastEffect = updateQueue !== null ? updateQueue.lastEffect : null; + + if (lastEffect !== null) { + var firstEffect = lastEffect.next; + var effect = firstEffect; + + do { + if ((effect.tag & unmountTag) !== NoEffect$1) { + // Unmount + var destroy = effect.destroy; + effect.destroy = undefined; + + if (destroy !== undefined) { + destroy(); + } + } + + if ((effect.tag & mountTag) !== NoEffect$1) { + // Mount + var create = effect.create; + effect.destroy = create(); + + { + var _destroy = effect.destroy; + + if (_destroy !== undefined && typeof _destroy !== 'function') { + var addendum = void 0; + + if (_destroy === null) { + addendum = + ' You returned null. If your effect does not require clean ' + + 'up, return undefined (or nothing).'; + } else if (typeof _destroy.then === 'function') { + addendum = + '\n\nIt looks like you wrote useEffect(async () => ...) or returned a Promise. ' + + 'Instead, write the async function inside your effect ' + + 'and call it immediately:\n\n' + + 'useEffect(() => {\n' + + ' async function fetchData() {\n' + + ' // You can await here\n' + + ' const response = await MyAPI.getData(someId);\n' + + ' // ...\n' + + ' }\n' + + ' fetchData();\n' + + "}, [someId]); // Or [] if effect doesn't need props or state\n\n" + + 'Learn more about data fetching with Hooks: https://fb.me/react-hooks-data-fetching'; + } else { + addendum = ' You returned: ' + _destroy; + } + + warningWithoutStack$1( + false, + 'An effect function must not return anything besides a function, ' + + 'which is used for clean-up.%s%s', + addendum, + getStackByFiberInDevAndProd(finishedWork), + ); + } + } + } + + effect = effect.next; + } while (effect !== firstEffect); + } + } + + function commitPassiveHookEffects(finishedWork) { + if ((finishedWork.effectTag & Passive) !== NoEffect) { + switch (finishedWork.tag) { + case FunctionComponent: + case ForwardRef: + case SimpleMemoComponent: { + commitHookEffectList(UnmountPassive, NoEffect$1, finishedWork); + commitHookEffectList(NoEffect$1, MountPassive, finishedWork); + break; + } + + default: + break; + } + } + } + + function commitLifeCycles(finishedRoot, current$$1, finishedWork, committedExpirationTime) { + switch (finishedWork.tag) { + case FunctionComponent: + case ForwardRef: + case SimpleMemoComponent: { + commitHookEffectList(UnmountLayout, MountLayout, finishedWork); + break; + } + + case ClassComponent: { + var instance = finishedWork.stateNode; + + if (finishedWork.effectTag & Update) { + if (current$$1 === null) { + startPhaseTimer(finishedWork, 'componentDidMount'); // We could update instance props and state here, + // but instead we rely on them being set during last render. + // TODO: revisit this when we implement resuming. + + { + if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) { + !(instance.props === finishedWork.memoizedProps) + ? warning$1( + false, + 'Expected %s props to match memoized props before ' + + 'componentDidMount. ' + + 'This might either be because of a bug in React, or because ' + + 'a component reassigns its own `this.props`. ' + + 'Please file an issue.', + getComponentName(finishedWork.type) || 'instance', + ) + : void 0; + !(instance.state === finishedWork.memoizedState) + ? warning$1( + false, + 'Expected %s state to match memoized state before ' + + 'componentDidMount. ' + + 'This might either be because of a bug in React, or because ' + + 'a component reassigns its own `this.props`. ' + + 'Please file an issue.', + getComponentName(finishedWork.type) || 'instance', + ) + : void 0; + } + } + + instance.componentDidMount(); + stopPhaseTimer(); + } else { + var prevProps = + finishedWork.elementType === finishedWork.type + ? current$$1.memoizedProps + : resolveDefaultProps(finishedWork.type, current$$1.memoizedProps); + var prevState = current$$1.memoizedState; + startPhaseTimer(finishedWork, 'componentDidUpdate'); // We could update instance props and state here, + // but instead we rely on them being set during last render. + // TODO: revisit this when we implement resuming. + + { + if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) { + !(instance.props === finishedWork.memoizedProps) + ? warning$1( + false, + 'Expected %s props to match memoized props before ' + + 'componentDidUpdate. ' + + 'This might either be because of a bug in React, or because ' + + 'a component reassigns its own `this.props`. ' + + 'Please file an issue.', + getComponentName(finishedWork.type) || 'instance', + ) + : void 0; + !(instance.state === finishedWork.memoizedState) + ? warning$1( + false, + 'Expected %s state to match memoized state before ' + + 'componentDidUpdate. ' + + 'This might either be because of a bug in React, or because ' + + 'a component reassigns its own `this.props`. ' + + 'Please file an issue.', + getComponentName(finishedWork.type) || 'instance', + ) + : void 0; + } + } + + instance.componentDidUpdate( + prevProps, + prevState, + instance.__reactInternalSnapshotBeforeUpdate, + ); + stopPhaseTimer(); + } + } + + var updateQueue = finishedWork.updateQueue; + + if (updateQueue !== null) { + { + if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) { + !(instance.props === finishedWork.memoizedProps) + ? warning$1( + false, + 'Expected %s props to match memoized props before ' + + 'processing the update queue. ' + + 'This might either be because of a bug in React, or because ' + + 'a component reassigns its own `this.props`. ' + + 'Please file an issue.', + getComponentName(finishedWork.type) || 'instance', + ) + : void 0; + !(instance.state === finishedWork.memoizedState) + ? warning$1( + false, + 'Expected %s state to match memoized state before ' + + 'processing the update queue. ' + + 'This might either be because of a bug in React, or because ' + + 'a component reassigns its own `this.props`. ' + + 'Please file an issue.', + getComponentName(finishedWork.type) || 'instance', + ) + : void 0; + } + } // We could update instance props and state here, + // but instead we rely on them being set during last render. + // TODO: revisit this when we implement resuming. + + commitUpdateQueue(finishedWork, updateQueue, instance, committedExpirationTime); + } + + return; + } + + case HostRoot: { + var _updateQueue = finishedWork.updateQueue; + + if (_updateQueue !== null) { + var _instance = null; + + if (finishedWork.child !== null) { + switch (finishedWork.child.tag) { + case HostComponent: + _instance = getPublicInstance(finishedWork.child.stateNode); + break; + + case ClassComponent: + _instance = finishedWork.child.stateNode; + break; + } + } + + commitUpdateQueue(finishedWork, _updateQueue, _instance, committedExpirationTime); + } + + return; + } + + case HostComponent: { + var _instance2 = finishedWork.stateNode; // Renderers may schedule work to be done after host components are mounted + // (eg DOM renderer may schedule auto-focus for inputs and form controls). + // These effects should only be committed when components are first mounted, + // aka when there is no current/alternate. + + if (current$$1 === null && finishedWork.effectTag & Update) { + var type = finishedWork.type; + var props = finishedWork.memoizedProps; + commitMount(_instance2, type, props, finishedWork); + } + + return; + } + + case HostText: { + // We have no life-cycles associated with text. + return; + } + + case HostPortal: { + // We have no life-cycles associated with portals. + return; + } + + case Profiler: { + if (enableProfilerTimer) { + var onRender = finishedWork.memoizedProps.onRender; + + if (typeof onRender === 'function') { + if (enableSchedulerTracing) { + onRender( + finishedWork.memoizedProps.id, + current$$1 === null ? 'mount' : 'update', + finishedWork.actualDuration, + finishedWork.treeBaseDuration, + finishedWork.actualStartTime, + getCommitTime(), + finishedRoot.memoizedInteractions, + ); + } else { + onRender( + finishedWork.memoizedProps.id, + current$$1 === null ? 'mount' : 'update', + finishedWork.actualDuration, + finishedWork.treeBaseDuration, + finishedWork.actualStartTime, + getCommitTime(), + ); + } + } + } + + return; + } + + case SuspenseComponent: { + commitSuspenseHydrationCallbacks(finishedRoot, finishedWork); + return; + } + + case SuspenseListComponent: + case IncompleteClassComponent: + case FundamentalComponent: + case ScopeComponent: + return; + + default: { + { + { + throw Error( + 'This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + } + } + } + + function hideOrUnhideAllChildren(finishedWork, isHidden) { + if (supportsMutation) { + // We only have the top Fiber that was inserted but we need to recurse down its + // children to find all the terminal nodes. + var node = finishedWork; + + while (true) { + if (node.tag === HostComponent) { + var instance = node.stateNode; + + if (isHidden) { + hideInstance(instance); + } else { + unhideInstance(node.stateNode, node.memoizedProps); + } + } else if (node.tag === HostText) { + var _instance3 = node.stateNode; + + if (isHidden) { + hideTextInstance(_instance3); + } else { + unhideTextInstance(_instance3, node.memoizedProps); + } + } else if ( + node.tag === SuspenseComponent && + node.memoizedState !== null && + node.memoizedState.dehydrated === null + ) { + // Found a nested Suspense component that timed out. Skip over the + // primary child fragment, which should remain hidden. + var fallbackChildFragment = node.child.sibling; + fallbackChildFragment.return = node; + node = fallbackChildFragment; + continue; + } else if (node.child !== null) { + node.child.return = node; + node = node.child; + continue; + } + + if (node === finishedWork) { + return; + } + + while (node.sibling === null) { + if (node.return === null || node.return === finishedWork) { + return; + } + + node = node.return; + } + + node.sibling.return = node.return; + node = node.sibling; + } + } + } + + function commitAttachRef(finishedWork) { + var ref = finishedWork.ref; + + if (ref !== null) { + var instance = finishedWork.stateNode; + var instanceToUse; + + switch (finishedWork.tag) { + case HostComponent: + instanceToUse = getPublicInstance(instance); + break; + + default: + instanceToUse = instance; + } // Moved outside to ensure DCE works with this flag + + if (enableScopeAPI && finishedWork.tag === ScopeComponent) { + instanceToUse = instance.methods; + } + + if (typeof ref === 'function') { + ref(instanceToUse); + } else { + { + if (!ref.hasOwnProperty('current')) { + warningWithoutStack$1( + false, + 'Unexpected ref object provided for %s. ' + + 'Use either a ref-setter function or React.createRef().%s', + getComponentName(finishedWork.type), + getStackByFiberInDevAndProd(finishedWork), + ); + } + } + + ref.current = instanceToUse; + } + } + } + + function commitDetachRef(current$$1) { + var currentRef = current$$1.ref; + + if (currentRef !== null) { + if (typeof currentRef === 'function') { + currentRef(null); + } else { + currentRef.current = null; + } + } + } // User-originating errors (lifecycles and refs) should not interrupt + // deletion, so don't let them throw. Host-originating errors should + // interrupt deletion, so it's okay + + function commitUnmount(finishedRoot, current$$1, renderPriorityLevel) { + onCommitUnmount(current$$1); + + switch (current$$1.tag) { + case FunctionComponent: + case ForwardRef: + case MemoComponent: + case SimpleMemoComponent: { + var updateQueue = current$$1.updateQueue; + + if (updateQueue !== null) { + var lastEffect = updateQueue.lastEffect; + + if (lastEffect !== null) { + var firstEffect = lastEffect.next; // When the owner fiber is deleted, the destroy function of a passive + // effect hook is called during the synchronous commit phase. This is + // a concession to implementation complexity. Calling it in the + // passive effect phase (like they usually are, when dependencies + // change during an update) would require either traversing the + // children of the deleted fiber again, or including unmount effects + // as part of the fiber effect list. + // + // Because this is during the sync commit phase, we need to change + // the priority. + // + // TODO: Reconsider this implementation trade off. + + var priorityLevel = + renderPriorityLevel > NormalPriority ? NormalPriority : renderPriorityLevel; + runWithPriority$2(priorityLevel, function () { + var effect = firstEffect; + + do { + var destroy = effect.destroy; + + if (destroy !== undefined) { + safelyCallDestroy(current$$1, destroy); + } + + effect = effect.next; + } while (effect !== firstEffect); + }); + } + } + + break; + } + + case ClassComponent: { + safelyDetachRef(current$$1); + var instance = current$$1.stateNode; + + if (typeof instance.componentWillUnmount === 'function') { + safelyCallComponentWillUnmount(current$$1, instance); + } + + return; + } + + case HostComponent: { + if (enableFlareAPI) { + var dependencies = current$$1.dependencies; + + if (dependencies !== null) { + var respondersMap = dependencies.responders; + + if (respondersMap !== null) { + var responderInstances = Array.from(respondersMap.values()); + + for (var i = 0, length = responderInstances.length; i < length; i++) { + var responderInstance = responderInstances[i]; + unmountResponderInstance(responderInstance); + } + + dependencies.responders = null; + } + } + } + + safelyDetachRef(current$$1); + return; + } + + case HostPortal: { + // TODO: this is recursive. + // We are also not using this parent because + // the portal will get pushed immediately. + if (supportsMutation) { + unmountHostComponents(finishedRoot, current$$1, renderPriorityLevel); + } else if (supportsPersistence) { + emptyPortalContainer(current$$1); + } + + return; + } + + case FundamentalComponent: { + if (enableFundamentalAPI) { + var fundamentalInstance = current$$1.stateNode; + + if (fundamentalInstance !== null) { + unmountFundamentalComponent(fundamentalInstance); + current$$1.stateNode = null; + } + } + + return; + } + + case DehydratedFragment: { + if (enableSuspenseCallback) { + var hydrationCallbacks = finishedRoot.hydrationCallbacks; + + if (hydrationCallbacks !== null) { + var onDeleted = hydrationCallbacks.onDeleted; + + if (onDeleted) { + onDeleted(current$$1.stateNode); + } + } + } + + return; + } + + case ScopeComponent: { + if (enableScopeAPI) { + safelyDetachRef(current$$1); + } + } + } + } + + function commitNestedUnmounts(finishedRoot, root, renderPriorityLevel) { + // While we're inside a removed host node we don't want to call + // removeChild on the inner nodes because they're removed by the top + // call anyway. We also want to call componentWillUnmount on all + // composites before this host node is removed from the tree. Therefore + // we do an inner loop while we're still inside the host node. + var node = root; + + while (true) { + commitUnmount(finishedRoot, node, renderPriorityLevel); // Visit children because they may contain more composite or host nodes. + // Skip portals because commitUnmount() currently visits them recursively. + + if ( + node.child !== null && // If we use mutation we drill down into portals using commitUnmount above. + // If we don't use mutation we drill down into portals here instead. + (!supportsMutation || node.tag !== HostPortal) + ) { + node.child.return = node; + node = node.child; + continue; + } + + if (node === root) { + return; + } + + while (node.sibling === null) { + if (node.return === null || node.return === root) { + return; + } + + node = node.return; + } + + node.sibling.return = node.return; + node = node.sibling; + } + } + + function detachFiber(current$$1) { + var alternate = current$$1.alternate; // Cut off the return pointers to disconnect it from the tree. Ideally, we + // should clear the child pointer of the parent alternate to let this + // get GC:ed but we don't know which for sure which parent is the current + // one so we'll settle for GC:ing the subtree of this child. This child + // itself will be GC:ed when the parent updates the next time. + + current$$1.return = null; + current$$1.child = null; + current$$1.memoizedState = null; + current$$1.updateQueue = null; + current$$1.dependencies = null; + current$$1.alternate = null; + current$$1.firstEffect = null; + current$$1.lastEffect = null; + current$$1.pendingProps = null; + current$$1.memoizedProps = null; + + if (alternate !== null) { + detachFiber(alternate); + } + } + + function emptyPortalContainer(current$$1) { + if (!supportsPersistence) { + return; + } + + var portal = current$$1.stateNode; + var containerInfo = portal.containerInfo; + var emptyChildSet = createContainerChildSet(containerInfo); + replaceContainerChildren(containerInfo, emptyChildSet); + } + + function commitContainer(finishedWork) { + if (!supportsPersistence) { + return; + } + + switch (finishedWork.tag) { + case ClassComponent: + case HostComponent: + case HostText: + case FundamentalComponent: { + return; + } + + case HostRoot: + case HostPortal: { + var portalOrRoot = finishedWork.stateNode; + var containerInfo = portalOrRoot.containerInfo, + pendingChildren = portalOrRoot.pendingChildren; + replaceContainerChildren(containerInfo, pendingChildren); + return; + } + + default: { + { + { + throw Error( + 'This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + } + } + } + + function getHostParentFiber(fiber) { + var parent = fiber.return; + + while (parent !== null) { + if (isHostParent(parent)) { + return parent; + } + + parent = parent.return; + } + + { + { + throw Error( + 'Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + } + + function isHostParent(fiber) { + return fiber.tag === HostComponent || fiber.tag === HostRoot || fiber.tag === HostPortal; + } + + function getHostSibling(fiber) { + // We're going to search forward into the tree until we find a sibling host + // node. Unfortunately, if multiple insertions are done in a row we have to + // search past them. This leads to exponential search for the next sibling. + // TODO: Find a more efficient way to do this. + var node = fiber; + + siblings: while (true) { + // If we didn't find anything, let's try the next sibling. + while (node.sibling === null) { + if (node.return === null || isHostParent(node.return)) { + // If we pop out of the root or hit the parent the fiber we are the + // last sibling. + return null; + } + + node = node.return; + } + + node.sibling.return = node.return; + node = node.sibling; + + while (node.tag !== HostComponent && node.tag !== HostText && node.tag !== DehydratedFragment) { + // If it is not host node and, we might have a host node inside it. + // Try to search down until we find one. + if (node.effectTag & Placement) { + // If we don't have a child, try the siblings instead. + continue siblings; + } // If we don't have a child, try the siblings instead. + // We also skip portals because they are not part of this host tree. + + if (node.child === null || node.tag === HostPortal) { + continue siblings; + } else { + node.child.return = node; + node = node.child; + } + } // Check if this host node is stable or about to be placed. + + if (!(node.effectTag & Placement)) { + // Found it! + return node.stateNode; + } + } + } + + function commitPlacement(finishedWork) { + if (!supportsMutation) { + return; + } // Recursively insert all host nodes into the parent. + + var parentFiber = getHostParentFiber(finishedWork); // Note: these two variables *must* always be updated together. + + var parent; + var isContainer; + var parentStateNode = parentFiber.stateNode; + + switch (parentFiber.tag) { + case HostComponent: + parent = parentStateNode; + isContainer = false; + break; + + case HostRoot: + parent = parentStateNode.containerInfo; + isContainer = true; + break; + + case HostPortal: + parent = parentStateNode.containerInfo; + isContainer = true; + break; + + case FundamentalComponent: + if (enableFundamentalAPI) { + parent = parentStateNode.instance; + isContainer = false; + } + + // eslint-disable-next-line-no-fallthrough + + default: { + { + throw Error( + 'Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + } + + if (parentFiber.effectTag & ContentReset) { + // Reset the text content of the parent before doing any insertions + resetTextContent(parent); // Clear ContentReset from the effect tag + + parentFiber.effectTag &= ~ContentReset; + } + + var before = getHostSibling(finishedWork); // We only have the top Fiber that was inserted but we need to recurse down its + // children to find all the terminal nodes. + + var node = finishedWork; + + while (true) { + var isHost = node.tag === HostComponent || node.tag === HostText; + + if (isHost || (enableFundamentalAPI && node.tag === FundamentalComponent)) { + var stateNode = isHost ? node.stateNode : node.stateNode.instance; + + if (before) { + if (isContainer) { + insertInContainerBefore(parent, stateNode, before); + } else { + insertBefore(parent, stateNode, before); + } + } else { + if (isContainer) { + appendChildToContainer(parent, stateNode); + } else { + appendChild(parent, stateNode); + } + } + } else if (node.tag === HostPortal) { + // If the insertion itself is a portal, then we don't want to traverse + // down its children. Instead, we'll get insertions from each child in + // the portal directly. + } else if (node.child !== null) { + node.child.return = node; + node = node.child; + continue; + } + + if (node === finishedWork) { + return; + } + + while (node.sibling === null) { + if (node.return === null || node.return === finishedWork) { + return; + } + + node = node.return; + } + + node.sibling.return = node.return; + node = node.sibling; + } + } + + function unmountHostComponents(finishedRoot, current$$1, renderPriorityLevel) { + // We only have the top Fiber that was deleted but we need to recurse down its + // children to find all the terminal nodes. + var node = current$$1; // Each iteration, currentParent is populated with node's host parent if not + // currentParentIsValid. + + var currentParentIsValid = false; // Note: these two variables *must* always be updated together. + + var currentParent; + var currentParentIsContainer; + + while (true) { + if (!currentParentIsValid) { + var parent = node.return; + + findParent: while (true) { + if (!(parent !== null)) { + { + throw Error( + 'Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + + var parentStateNode = parent.stateNode; + + switch (parent.tag) { + case HostComponent: + currentParent = parentStateNode; + currentParentIsContainer = false; + break findParent; + + case HostRoot: + currentParent = parentStateNode.containerInfo; + currentParentIsContainer = true; + break findParent; + + case HostPortal: + currentParent = parentStateNode.containerInfo; + currentParentIsContainer = true; + break findParent; + + case FundamentalComponent: + if (enableFundamentalAPI) { + currentParent = parentStateNode.instance; + currentParentIsContainer = false; + } + } + + parent = parent.return; + } + + currentParentIsValid = true; + } + + if (node.tag === HostComponent || node.tag === HostText) { + commitNestedUnmounts(finishedRoot, node, renderPriorityLevel); // After all the children have unmounted, it is now safe to remove the + // node from the tree. + + if (currentParentIsContainer) { + removeChildFromContainer(currentParent, node.stateNode); + } else { + removeChild(currentParent, node.stateNode); + } // Don't visit children because we already visited them. + } else if (enableFundamentalAPI && node.tag === FundamentalComponent) { + var fundamentalNode = node.stateNode.instance; + commitNestedUnmounts(finishedRoot, node, renderPriorityLevel); // After all the children have unmounted, it is now safe to remove the + // node from the tree. + + if (currentParentIsContainer) { + removeChildFromContainer(currentParent, fundamentalNode); + } else { + removeChild(currentParent, fundamentalNode); + } + } else if (enableSuspenseServerRenderer && node.tag === DehydratedFragment) { + if (enableSuspenseCallback) { + var hydrationCallbacks = finishedRoot.hydrationCallbacks; + + if (hydrationCallbacks !== null) { + var onDeleted = hydrationCallbacks.onDeleted; + + if (onDeleted) { + onDeleted(node.stateNode); + } + } + } // Delete the dehydrated suspense boundary and all of its content. + + if (currentParentIsContainer) { + clearSuspenseBoundaryFromContainer(currentParent, node.stateNode); + } else { + clearSuspenseBoundary(currentParent, node.stateNode); + } + } else if (node.tag === HostPortal) { + if (node.child !== null) { + // When we go into a portal, it becomes the parent to remove from. + // We will reassign it back when we pop the portal on the way up. + currentParent = node.stateNode.containerInfo; + currentParentIsContainer = true; // Visit children because portals might contain host components. + + node.child.return = node; + node = node.child; + continue; + } + } else { + commitUnmount(finishedRoot, node, renderPriorityLevel); // Visit children because we may find more host components below. + + if (node.child !== null) { + node.child.return = node; + node = node.child; + continue; + } + } + + if (node === current$$1) { + return; + } + + while (node.sibling === null) { + if (node.return === null || node.return === current$$1) { + return; + } + + node = node.return; + + if (node.tag === HostPortal) { + // When we go out of the portal, we need to restore the parent. + // Since we don't keep a stack of them, we will search for it. + currentParentIsValid = false; + } + } + + node.sibling.return = node.return; + node = node.sibling; + } + } + + function commitDeletion(finishedRoot, current$$1, renderPriorityLevel) { + if (supportsMutation) { + // Recursively delete all host nodes from the parent. + // Detach refs and call componentWillUnmount() on the whole subtree. + unmountHostComponents(finishedRoot, current$$1, renderPriorityLevel); + } else { + // Detach refs and call componentWillUnmount() on the whole subtree. + commitNestedUnmounts(finishedRoot, current$$1, renderPriorityLevel); + } + + detachFiber(current$$1); + } + + function commitWork(current$$1, finishedWork) { + if (!supportsMutation) { + switch (finishedWork.tag) { + case FunctionComponent: + case ForwardRef: + case MemoComponent: + case SimpleMemoComponent: { + // Note: We currently never use MountMutation, but useLayout uses + // UnmountMutation. + commitHookEffectList(UnmountMutation, MountMutation, finishedWork); + return; + } + + case Profiler: { + return; + } + + case SuspenseComponent: { + commitSuspenseComponent(finishedWork); + attachSuspenseRetryListeners(finishedWork); + return; + } + + case SuspenseListComponent: { + attachSuspenseRetryListeners(finishedWork); + return; + } + + case HostRoot: { + if (supportsHydration) { + var root = finishedWork.stateNode; + + if (root.hydrate) { + // We've just hydrated. No need to hydrate again. + root.hydrate = false; + commitHydratedContainer(root.containerInfo); + } + } + + break; + } + } + + commitContainer(finishedWork); + return; + } + + switch (finishedWork.tag) { + case FunctionComponent: + case ForwardRef: + case MemoComponent: + case SimpleMemoComponent: { + // Note: We currently never use MountMutation, but useLayout uses + // UnmountMutation. + commitHookEffectList(UnmountMutation, MountMutation, finishedWork); + return; + } + + case ClassComponent: { + return; + } + + case HostComponent: { + var instance = finishedWork.stateNode; + + if (instance != null) { + // Commit the work prepared earlier. + var newProps = finishedWork.memoizedProps; // For hydration we reuse the update path but we treat the oldProps + // as the newProps. The updatePayload will contain the real change in + // this case. + + var oldProps = current$$1 !== null ? current$$1.memoizedProps : newProps; + var type = finishedWork.type; // TODO: Type the updateQueue to be specific to host components. + + var updatePayload = finishedWork.updateQueue; + finishedWork.updateQueue = null; + + if (updatePayload !== null) { + commitUpdate(instance, updatePayload, type, oldProps, newProps, finishedWork); + } + + if (enableFlareAPI) { + var prevListeners = oldProps.listeners; + var nextListeners = newProps.listeners; + + if (prevListeners !== nextListeners) { + updateEventListeners(nextListeners, finishedWork, null); + } + } + } + + return; + } + + case HostText: { + if (!(finishedWork.stateNode !== null)) { + { + throw Error( + 'This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + + var textInstance = finishedWork.stateNode; + var newText = finishedWork.memoizedProps; // For hydration we reuse the update path but we treat the oldProps + // as the newProps. The updatePayload will contain the real change in + // this case. + + var oldText = current$$1 !== null ? current$$1.memoizedProps : newText; + commitTextUpdate(textInstance, oldText, newText); + return; + } + + case HostRoot: { + if (supportsHydration) { + var _root = finishedWork.stateNode; + + if (_root.hydrate) { + // We've just hydrated. No need to hydrate again. + _root.hydrate = false; + commitHydratedContainer(_root.containerInfo); + } + } + + return; + } + + case Profiler: { + return; + } + + case SuspenseComponent: { + commitSuspenseComponent(finishedWork); + attachSuspenseRetryListeners(finishedWork); + return; + } + + case SuspenseListComponent: { + attachSuspenseRetryListeners(finishedWork); + return; + } + + case IncompleteClassComponent: { + return; + } + + case FundamentalComponent: { + if (enableFundamentalAPI) { + var fundamentalInstance = finishedWork.stateNode; + updateFundamentalComponent(fundamentalInstance); + } + + return; + } + + case ScopeComponent: { + if (enableScopeAPI) { + var scopeInstance = finishedWork.stateNode; + scopeInstance.fiber = finishedWork; + + if (enableFlareAPI) { + var _newProps = finishedWork.memoizedProps; + + var _oldProps = current$$1 !== null ? current$$1.memoizedProps : _newProps; + + var _prevListeners = _oldProps.listeners; + var _nextListeners = _newProps.listeners; + + if (_prevListeners !== _nextListeners) { + updateEventListeners(_nextListeners, finishedWork, null); + } + } + } + + return; + } + + default: { + { + { + throw Error( + 'This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + } + } + } + + function commitSuspenseComponent(finishedWork) { + var newState = finishedWork.memoizedState; + var newDidTimeout; + var primaryChildParent = finishedWork; + + if (newState === null) { + newDidTimeout = false; + } else { + newDidTimeout = true; + primaryChildParent = finishedWork.child; + markCommitTimeOfFallback(); + } + + if (supportsMutation && primaryChildParent !== null) { + hideOrUnhideAllChildren(primaryChildParent, newDidTimeout); + } + + if (enableSuspenseCallback && newState !== null) { + var suspenseCallback = finishedWork.memoizedProps.suspenseCallback; + + if (typeof suspenseCallback === 'function') { + var thenables = finishedWork.updateQueue; + + if (thenables !== null) { + suspenseCallback(new Set(thenables)); + } + } else { + if (suspenseCallback !== undefined) { + warning$1(false, 'Unexpected type for suspenseCallback.'); + } + } + } + } + + function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) { + if (!supportsHydration) { + return; + } + + var newState = finishedWork.memoizedState; + + if (newState === null) { + var current$$1 = finishedWork.alternate; + + if (current$$1 !== null) { + var prevState = current$$1.memoizedState; + + if (prevState !== null) { + var suspenseInstance = prevState.dehydrated; + + if (suspenseInstance !== null) { + commitHydratedSuspenseInstance(suspenseInstance); + + if (enableSuspenseCallback) { + var hydrationCallbacks = finishedRoot.hydrationCallbacks; + + if (hydrationCallbacks !== null) { + var onHydrated = hydrationCallbacks.onHydrated; + + if (onHydrated) { + onHydrated(suspenseInstance); + } + } + } + } + } + } + } + } + + function attachSuspenseRetryListeners(finishedWork) { + // If this boundary just timed out, then it will have a set of thenables. + // For each thenable, attach a listener so that when it resolves, React + // attempts to re-render the boundary in the primary (pre-timeout) state. + var thenables = finishedWork.updateQueue; + + if (thenables !== null) { + finishedWork.updateQueue = null; + var retryCache = finishedWork.stateNode; + + if (retryCache === null) { + retryCache = finishedWork.stateNode = new PossiblyWeakSet(); + } + + thenables.forEach(function (thenable) { + // Memoize using the boundary fiber to prevent redundant listeners. + var retry = resolveRetryThenable.bind(null, finishedWork, thenable); + + if (!retryCache.has(thenable)) { + if (enableSchedulerTracing) { + if (thenable.__reactDoNotTraceInteractions !== true) { + retry = tracing.unstable_wrap(retry); + } + } + + retryCache.add(thenable); + thenable.then(retry, retry); + } + }); + } + } + + function commitResetTextContent(current$$1) { + if (!supportsMutation) { + return; + } + + resetTextContent(current$$1.stateNode); + } + + var PossiblyWeakMap$1 = typeof WeakMap === 'function' ? WeakMap : Map; + + function createRootErrorUpdate(fiber, errorInfo, expirationTime) { + var update = createUpdate(expirationTime, null); // Unmount the root by rendering null. + + update.tag = CaptureUpdate; // Caution: React DevTools currently depends on this property + // being called "element". + + update.payload = { + element: null, + }; + var error = errorInfo.value; + + update.callback = function () { + onUncaughtError(error); + logError(fiber, errorInfo); + }; + + return update; + } + + function createClassErrorUpdate(fiber, errorInfo, expirationTime) { + var update = createUpdate(expirationTime, null); + update.tag = CaptureUpdate; + var getDerivedStateFromError = fiber.type.getDerivedStateFromError; + + if (typeof getDerivedStateFromError === 'function') { + var error = errorInfo.value; + + update.payload = function () { + logError(fiber, errorInfo); + return getDerivedStateFromError(error); + }; + } + + var inst = fiber.stateNode; + + if (inst !== null && typeof inst.componentDidCatch === 'function') { + update.callback = function callback() { + { + markFailedErrorBoundaryForHotReloading(fiber); + } + + if (typeof getDerivedStateFromError !== 'function') { + // To preserve the preexisting retry behavior of error boundaries, + // we keep track of which ones already failed during this batch. + // This gets reset before we yield back to the browser. + // TODO: Warn in strict mode if getDerivedStateFromError is + // not defined. + markLegacyErrorBoundaryAsFailed(this); // Only log here if componentDidCatch is the only error boundary method defined + + logError(fiber, errorInfo); + } + + var error = errorInfo.value; + var stack = errorInfo.stack; + this.componentDidCatch(error, { + componentStack: stack !== null ? stack : '', + }); + + { + if (typeof getDerivedStateFromError !== 'function') { + // If componentDidCatch is the only error boundary method defined, + // then it needs to call setState to recover from errors. + // If no state update is scheduled then the boundary will swallow the error. + !(fiber.expirationTime === Sync) + ? warningWithoutStack$1( + false, + '%s: Error boundaries should implement getDerivedStateFromError(). ' + + 'In that method, return a state update to display an error message or fallback UI.', + getComponentName(fiber.type) || 'Unknown', + ) + : void 0; + } + } + }; + } else { + update.callback = function () { + markFailedErrorBoundaryForHotReloading(fiber); + }; + } + + return update; + } + + function attachPingListener(root, renderExpirationTime, thenable) { + // Attach a listener to the promise to "ping" the root and retry. But + // only if one does not already exist for the current render expiration + // time (which acts like a "thread ID" here). + var pingCache = root.pingCache; + var threadIDs; + + if (pingCache === null) { + pingCache = root.pingCache = new PossiblyWeakMap$1(); + threadIDs = new Set(); + pingCache.set(thenable, threadIDs); + } else { + threadIDs = pingCache.get(thenable); + + if (threadIDs === undefined) { + threadIDs = new Set(); + pingCache.set(thenable, threadIDs); + } + } + + if (!threadIDs.has(renderExpirationTime)) { + // Memoize using the thread ID to prevent redundant listeners. + threadIDs.add(renderExpirationTime); + var ping = pingSuspendedRoot.bind(null, root, thenable, renderExpirationTime); + thenable.then(ping, ping); + } + } + + function throwException(root, returnFiber, sourceFiber, value, renderExpirationTime) { + // The source fiber did not complete. + sourceFiber.effectTag |= Incomplete; // Its effect list is no longer valid. + + sourceFiber.firstEffect = sourceFiber.lastEffect = null; + + if (value !== null && typeof value === 'object' && typeof value.then === 'function') { + // This is a thenable. + var thenable = value; + checkForWrongSuspensePriorityInDEV(sourceFiber); + var hasInvisibleParentBoundary = hasSuspenseContext( + suspenseStackCursor.current, + InvisibleParentSuspenseContext, + ); // Schedule the nearest Suspense to re-render the timed out view. + + var _workInProgress = returnFiber; + + do { + if ( + _workInProgress.tag === SuspenseComponent && + shouldCaptureSuspense(_workInProgress, hasInvisibleParentBoundary) + ) { + // Found the nearest boundary. + // Stash the promise on the boundary fiber. If the boundary times out, we'll + // attach another listener to flip the boundary back to its normal state. + var thenables = _workInProgress.updateQueue; + + if (thenables === null) { + var updateQueue = new Set(); + updateQueue.add(thenable); + _workInProgress.updateQueue = updateQueue; + } else { + thenables.add(thenable); + } // If the boundary is outside of blocking mode, we should *not* + // suspend the commit. Pretend as if the suspended component rendered + // null and keep rendering. In the commit phase, we'll schedule a + // subsequent synchronous update to re-render the Suspense. + // + // Note: It doesn't matter whether the component that suspended was + // inside a blocking mode tree. If the Suspense is outside of it, we + // should *not* suspend the commit. + + if ((_workInProgress.mode & BlockingMode) === NoMode) { + _workInProgress.effectTag |= DidCapture; // We're going to commit this fiber even though it didn't complete. + // But we shouldn't call any lifecycle methods or callbacks. Remove + // all lifecycle effect tags. + + sourceFiber.effectTag &= ~(LifecycleEffectMask | Incomplete); + + if (sourceFiber.tag === ClassComponent) { + var currentSourceFiber = sourceFiber.alternate; + + if (currentSourceFiber === null) { + // This is a new mount. Change the tag so it's not mistaken for a + // completed class component. For example, we should not call + // componentWillUnmount if it is deleted. + sourceFiber.tag = IncompleteClassComponent; + } else { + // When we try rendering again, we should not reuse the current fiber, + // since it's known to be in an inconsistent state. Use a force update to + // prevent a bail out. + var update = createUpdate(Sync, null); + update.tag = ForceUpdate; + enqueueUpdate(sourceFiber, update); + } + } // The source fiber did not complete. Mark it with Sync priority to + // indicate that it still has pending work. + + sourceFiber.expirationTime = Sync; // Exit without suspending. + + return; + } // Confirmed that the boundary is in a concurrent mode tree. Continue + // with the normal suspend path. + // + // After this we'll use a set of heuristics to determine whether this + // render pass will run to completion or restart or "suspend" the commit. + // The actual logic for this is spread out in different places. + // + // This first principle is that if we're going to suspend when we complete + // a root, then we should also restart if we get an update or ping that + // might unsuspend it, and vice versa. The only reason to suspend is + // because you think you might want to restart before committing. However, + // it doesn't make sense to restart only while in the period we're suspended. + // + // Restarting too aggressively is also not good because it starves out any + // intermediate loading state. So we use heuristics to determine when. + // Suspense Heuristics + // + // If nothing threw a Promise or all the same fallbacks are already showing, + // then don't suspend/restart. + // + // If this is an initial render of a new tree of Suspense boundaries and + // those trigger a fallback, then don't suspend/restart. We want to ensure + // that we can show the initial loading state as quickly as possible. + // + // If we hit a "Delayed" case, such as when we'd switch from content back into + // a fallback, then we should always suspend/restart. SuspenseConfig applies to + // this case. If none is defined, JND is used instead. + // + // If we're already showing a fallback and it gets "retried", allowing us to show + // another level, but there's still an inner boundary that would show a fallback, + // then we suspend/restart for 500ms since the last time we showed a fallback + // anywhere in the tree. This effectively throttles progressive loading into a + // consistent train of commits. This also gives us an opportunity to restart to + // get to the completed state slightly earlier. + // + // If there's ambiguity due to batching it's resolved in preference of: + // 1) "delayed", 2) "initial render", 3) "retry". + // + // We want to ensure that a "busy" state doesn't get force committed. We want to + // ensure that new initial loading states can commit as soon as possible. + + attachPingListener(root, renderExpirationTime, thenable); + _workInProgress.effectTag |= ShouldCapture; + _workInProgress.expirationTime = renderExpirationTime; + return; + } // This boundary already captured during this render. Continue to the next + // boundary. + + _workInProgress = _workInProgress.return; + } while (_workInProgress !== null); // No boundary was found. Fallthrough to error mode. + // TODO: Use invariant so the message is stripped in prod? + + value = new Error( + (getComponentName(sourceFiber.type) || 'A React component') + + ' suspended while rendering, but no fallback UI was specified.\n' + + '\n' + + 'Add a <Suspense fallback=...> component higher in the tree to ' + + 'provide a loading indicator or placeholder to display.' + + getStackByFiberInDevAndProd(sourceFiber), + ); + } // We didn't find a boundary that could handle this type of exception. Start + // over and traverse parent path again, this time treating the exception + // as an error. + + renderDidError(); + value = createCapturedValue(value, sourceFiber); + var workInProgress = returnFiber; + + do { + switch (workInProgress.tag) { + case HostRoot: { + var _errorInfo = value; + workInProgress.effectTag |= ShouldCapture; + workInProgress.expirationTime = renderExpirationTime; + + var _update = createRootErrorUpdate(workInProgress, _errorInfo, renderExpirationTime); + + enqueueCapturedUpdate(workInProgress, _update); + return; + } + + case ClassComponent: + // Capture and retry + var errorInfo = value; + var ctor = workInProgress.type; + var instance = workInProgress.stateNode; + + if ( + (workInProgress.effectTag & DidCapture) === NoEffect && + (typeof ctor.getDerivedStateFromError === 'function' || + (instance !== null && + typeof instance.componentDidCatch === 'function' && + !isAlreadyFailedLegacyErrorBoundary(instance))) + ) { + workInProgress.effectTag |= ShouldCapture; + workInProgress.expirationTime = renderExpirationTime; // Schedule the error boundary to re-render using updated state + + var _update2 = createClassErrorUpdate(workInProgress, errorInfo, renderExpirationTime); + + enqueueCapturedUpdate(workInProgress, _update2); + return; + } + + break; + + default: + break; + } + + workInProgress = workInProgress.return; + } while (workInProgress !== null); + } + + var ceil = Math.ceil; + var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher; + var ReactCurrentOwner$2 = ReactSharedInternals.ReactCurrentOwner; + var IsSomeRendererActing = ReactSharedInternals.IsSomeRendererActing; + var NoContext = + /* */ + 0; + var BatchedContext = + /* */ + 1; + var EventContext = + /* */ + 2; + var DiscreteEventContext = + /* */ + 4; + var LegacyUnbatchedContext = + /* */ + 8; + var RenderContext = + /* */ + 16; + var CommitContext = + /* */ + 32; + var RootIncomplete = 0; + var RootFatalErrored = 1; + var RootErrored = 2; + var RootSuspended = 3; + var RootSuspendedWithDelay = 4; + var RootCompleted = 5; + // Describes where we are in the React execution stack + var executionContext = NoContext; // The root we're working on + + var workInProgressRoot = null; // The fiber we're working on + + var workInProgress = null; // The expiration time we're rendering + + var renderExpirationTime = NoWork; // Whether to root completed, errored, suspended, etc. + + var workInProgressRootExitStatus = RootIncomplete; // A fatal error, if one is thrown + + var workInProgressRootFatalError = null; // Most recent event time among processed updates during this render. + // This is conceptually a time stamp but expressed in terms of an ExpirationTime + // because we deal mostly with expiration times in the hot path, so this avoids + // the conversion happening in the hot path. + + var workInProgressRootLatestProcessedExpirationTime = Sync; + var workInProgressRootLatestSuspenseTimeout = Sync; + var workInProgressRootCanSuspendUsingConfig = null; // The work left over by components that were visited during this render. Only + // includes unprocessed updates, not work in bailed out children. + + var workInProgressRootNextUnprocessedUpdateTime = NoWork; // If we're pinged while rendering we don't always restart immediately. + // This flag determines if it might be worthwhile to restart if an opportunity + // happens latere. + + var workInProgressRootHasPendingPing = false; // The most recent time we committed a fallback. This lets us ensure a train + // model where we don't commit new loading states in too quick succession. + + var globalMostRecentFallbackTime = 0; + var FALLBACK_THROTTLE_MS = 500; + var nextEffect = null; + var hasUncaughtError = false; + var firstUncaughtError = null; + var legacyErrorBoundariesThatAlreadyFailed = null; + var rootDoesHavePassiveEffects = false; + var rootWithPendingPassiveEffects = null; + var pendingPassiveEffectsRenderPriority = NoPriority; + var pendingPassiveEffectsExpirationTime = NoWork; + var rootsWithPendingDiscreteUpdates = null; // Use these to prevent an infinite loop of nested updates + + var NESTED_UPDATE_LIMIT = 50; + var nestedUpdateCount = 0; + var rootWithNestedUpdates = null; + var NESTED_PASSIVE_UPDATE_LIMIT = 50; + var nestedPassiveUpdateCount = 0; + var interruptedBy = null; // Marks the need to reschedule pending interactions at these expiration times + // during the commit phase. This enables them to be traced across components + // that spawn new work during render. E.g. hidden boundaries, suspended SSR + // hydration or SuspenseList. + + var spawnedWorkDuringRender = null; // Expiration times are computed by adding to the current time (the start + // time). However, if two updates are scheduled within the same event, we + // should treat their start times as simultaneous, even if the actual clock + // time has advanced between the first and second call. + // In other words, because expiration times determine how updates are batched, + // we want all updates of like priority that occur within the same event to + // receive the same expiration time. Otherwise we get tearing. + + var currentEventTime = NoWork; + function requestCurrentTimeForUpdate() { + if ((executionContext & (RenderContext | CommitContext)) !== NoContext) { + // We're inside React, so it's fine to read the actual time. + return msToExpirationTime(now()); + } // We're not inside React, so we may be in the middle of a browser event. + + if (currentEventTime !== NoWork) { + // Use the same start time for all updates until we enter React again. + return currentEventTime; + } // This is the first update since React yielded. Compute a new start time. + + currentEventTime = msToExpirationTime(now()); + return currentEventTime; + } + function getCurrentTime() { + return msToExpirationTime(now()); + } + function computeExpirationForFiber(currentTime, fiber, suspenseConfig) { + var mode = fiber.mode; + + if ((mode & BlockingMode) === NoMode) { + return Sync; + } + + var priorityLevel = getCurrentPriorityLevel(); + + if ((mode & ConcurrentMode) === NoMode) { + return priorityLevel === ImmediatePriority ? Sync : Batched; + } + + if ((executionContext & RenderContext) !== NoContext) { + // Use whatever time we're already rendering + // TODO: Should there be a way to opt out, like with `runWithPriority`? + return renderExpirationTime; + } + + var expirationTime; + + if (suspenseConfig !== null) { + // Compute an expiration time based on the Suspense timeout. + expirationTime = computeSuspenseExpiration( + currentTime, + suspenseConfig.timeoutMs | 0 || LOW_PRIORITY_EXPIRATION, + ); + } else { + // Compute an expiration time based on the Scheduler priority. + switch (priorityLevel) { + case ImmediatePriority: + expirationTime = Sync; + break; + + case UserBlockingPriority$2: + // TODO: Rename this to computeUserBlockingExpiration + expirationTime = computeInteractiveExpiration(currentTime); + break; + + case NormalPriority: + case LowPriority: + // TODO: Handle LowPriority + // TODO: Rename this to... something better. + expirationTime = computeAsyncExpiration(currentTime); + break; + + case IdlePriority: + expirationTime = Idle; + break; + + default: { + { + throw Error('Expected a valid priority level'); + } + } + } + } // If we're in the middle of rendering a tree, do not update at the same + // expiration time that is already rendering. + // TODO: We shouldn't have to do this if the update is on a different root. + // Refactor computeExpirationForFiber + scheduleUpdate so we have access to + // the root when we check for this condition. + + if (workInProgressRoot !== null && expirationTime === renderExpirationTime) { + // This is a trick to move this update into a separate batch + expirationTime -= 1; + } + + return expirationTime; + } + function scheduleUpdateOnFiber(fiber, expirationTime) { + checkForNestedUpdates(); + warnAboutInvalidUpdatesOnClassComponentsInDEV(fiber); + var root = markUpdateTimeFromFiberToRoot(fiber, expirationTime); + + if (root === null) { + warnAboutUpdateOnUnmountedFiberInDEV(fiber); + return; + } + + checkForInterruption(fiber, expirationTime); + recordScheduleUpdate(); // TODO: computeExpirationForFiber also reads the priority. Pass the + // priority as an argument to that function and this one. + + var priorityLevel = getCurrentPriorityLevel(); + + if (expirationTime === Sync) { + if ( + // Check if we're inside unbatchedUpdates + (executionContext & LegacyUnbatchedContext) !== NoContext && // Check if we're not already rendering + (executionContext & (RenderContext | CommitContext)) === NoContext + ) { + // Register pending interactions on the root to avoid losing traced interaction data. + schedulePendingInteractions(root, expirationTime); // This is a legacy edge case. The initial mount of a ReactDOM.render-ed + // root inside of batchedUpdates should be synchronous, but layout updates + // should be deferred until the end of the batch. + + performSyncWorkOnRoot(root); + } else { + ensureRootIsScheduled(root); + schedulePendingInteractions(root, expirationTime); + + if (executionContext === NoContext) { + // Flush the synchronous work now, unless we're already working or inside + // a batch. This is intentionally inside scheduleUpdateOnFiber instead of + // scheduleCallbackForFiber to preserve the ability to schedule a callback + // without immediately flushing it. We only do this for user-initiated + // updates, to preserve historical behavior of legacy mode. + flushSyncCallbackQueue(); + } + } + } else { + ensureRootIsScheduled(root); + schedulePendingInteractions(root, expirationTime); + } + + if ( + (executionContext & DiscreteEventContext) !== NoContext && // Only updates at user-blocking priority or greater are considered + // discrete, even inside a discrete event. + (priorityLevel === UserBlockingPriority$2 || priorityLevel === ImmediatePriority) + ) { + // This is the result of a discrete event. Track the lowest priority + // discrete update per root so we can flush them early, if needed. + if (rootsWithPendingDiscreteUpdates === null) { + rootsWithPendingDiscreteUpdates = new Map([[root, expirationTime]]); + } else { + var lastDiscreteTime = rootsWithPendingDiscreteUpdates.get(root); + + if (lastDiscreteTime === undefined || lastDiscreteTime > expirationTime) { + rootsWithPendingDiscreteUpdates.set(root, expirationTime); + } + } + } + } + var scheduleWork = scheduleUpdateOnFiber; // This is split into a separate function so we can mark a fiber with pending + // work without treating it as a typical update that originates from an event; + // e.g. retrying a Suspense boundary isn't an update, but it does schedule work + // on a fiber. + + function markUpdateTimeFromFiberToRoot(fiber, expirationTime) { + // Update the source fiber's expiration time + if (fiber.expirationTime < expirationTime) { + fiber.expirationTime = expirationTime; + } + + var alternate = fiber.alternate; + + if (alternate !== null && alternate.expirationTime < expirationTime) { + alternate.expirationTime = expirationTime; + } // Walk the parent path to the root and update the child expiration time. + + var node = fiber.return; + var root = null; + + if (node === null && fiber.tag === HostRoot) { + root = fiber.stateNode; + } else { + while (node !== null) { + alternate = node.alternate; + + if (node.childExpirationTime < expirationTime) { + node.childExpirationTime = expirationTime; + + if (alternate !== null && alternate.childExpirationTime < expirationTime) { + alternate.childExpirationTime = expirationTime; + } + } else if (alternate !== null && alternate.childExpirationTime < expirationTime) { + alternate.childExpirationTime = expirationTime; + } + + if (node.return === null && node.tag === HostRoot) { + root = node.stateNode; + break; + } + + node = node.return; + } + } + + if (root !== null) { + if (workInProgressRoot === root) { + // Received an update to a tree that's in the middle of rendering. Mark + // that's unprocessed work on this root. + markUnprocessedUpdateTime(expirationTime); + + if (workInProgressRootExitStatus === RootSuspendedWithDelay) { + // The root already suspended with a delay, which means this render + // definitely won't finish. Since we have a new update, let's mark it as + // suspended now, right before marking the incoming update. This has the + // effect of interrupting the current render and switching to the update. + // TODO: This happens to work when receiving an update during the render + // phase, because of the trick inside computeExpirationForFiber to + // subtract 1 from `renderExpirationTime` to move it into a + // separate bucket. But we should probably model it with an exception, + // using the same mechanism we use to force hydration of a subtree. + // TODO: This does not account for low pri updates that were already + // scheduled before the root started rendering. Need to track the next + // pending expiration time (perhaps by backtracking the return path) and + // then trigger a restart in the `renderDidSuspendDelayIfPossible` path. + markRootSuspendedAtTime(root, renderExpirationTime); + } + } // Mark that the root has a pending update. + + markRootUpdatedAtTime(root, expirationTime); + } + + return root; + } + + function getNextRootExpirationTimeToWorkOn(root) { + // Determines the next expiration time that the root should render, taking + // into account levels that may be suspended, or levels that may have + // received a ping. + var lastExpiredTime = root.lastExpiredTime; + + if (lastExpiredTime !== NoWork) { + return lastExpiredTime; + } // "Pending" refers to any update that hasn't committed yet, including if it + // suspended. The "suspended" range is therefore a subset. + + var firstPendingTime = root.firstPendingTime; + + if (!isRootSuspendedAtTime(root, firstPendingTime)) { + // The highest priority pending time is not suspended. Let's work on that. + return firstPendingTime; + } // If the first pending time is suspended, check if there's a lower priority + // pending level that we know about. Or check if we received a ping. Work + // on whichever is higher priority. + + var lastPingedTime = root.lastPingedTime; + var nextKnownPendingLevel = root.nextKnownPendingLevel; + return lastPingedTime > nextKnownPendingLevel ? lastPingedTime : nextKnownPendingLevel; + } // Use this function to schedule a task for a root. There's only one task per + // root; if a task was already scheduled, we'll check to make sure the + // expiration time of the existing task is the same as the expiration time of + // the next level that the root has work on. This function is called on every + // update, and right before exiting a task. + + function ensureRootIsScheduled(root) { + var lastExpiredTime = root.lastExpiredTime; + + if (lastExpiredTime !== NoWork) { + // Special case: Expired work should flush synchronously. + root.callbackExpirationTime = Sync; + root.callbackPriority = ImmediatePriority; + root.callbackNode = scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root)); + return; + } + + var expirationTime = getNextRootExpirationTimeToWorkOn(root); + var existingCallbackNode = root.callbackNode; + + if (expirationTime === NoWork) { + // There's nothing to work on. + if (existingCallbackNode !== null) { + root.callbackNode = null; + root.callbackExpirationTime = NoWork; + root.callbackPriority = NoPriority; + } + + return; + } // TODO: If this is an update, we already read the current time. Pass the + // time as an argument. + + var currentTime = requestCurrentTimeForUpdate(); + var priorityLevel = inferPriorityFromExpirationTime(currentTime, expirationTime); // If there's an existing render task, confirm it has the correct priority and + // expiration time. Otherwise, we'll cancel it and schedule a new one. + + if (existingCallbackNode !== null) { + var existingCallbackPriority = root.callbackPriority; + var existingCallbackExpirationTime = root.callbackExpirationTime; + + if ( + // Callback must have the exact same expiration time. + existingCallbackExpirationTime === expirationTime && // Callback must have greater or equal priority. + existingCallbackPriority >= priorityLevel + ) { + // Existing callback is sufficient. + return; + } // Need to schedule a new task. + // TODO: Instead of scheduling a new task, we should be able to change the + // priority of the existing one. + + cancelCallback(existingCallbackNode); + } + + root.callbackExpirationTime = expirationTime; + root.callbackPriority = priorityLevel; + var callbackNode; + + if (expirationTime === Sync) { + // Sync React callbacks are scheduled on a special internal queue + callbackNode = scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root)); + } else if (disableSchedulerTimeoutBasedOnReactExpirationTime) { + callbackNode = scheduleCallback(priorityLevel, performConcurrentWorkOnRoot.bind(null, root)); + } else { + callbackNode = scheduleCallback( + priorityLevel, + performConcurrentWorkOnRoot.bind(null, root), // Compute a task timeout based on the expiration time. This also affects + // ordering because tasks are processed in timeout order. + { + timeout: expirationTimeToMs(expirationTime) - now(), + }, + ); + } + + root.callbackNode = callbackNode; + } // This is the entry point for every concurrent task, i.e. anything that + // goes through Scheduler. + + function performConcurrentWorkOnRoot(root, didTimeout) { + // Since we know we're in a React event, we can clear the current + // event time. The next update will compute a new event time. + currentEventTime = NoWork; + + if (didTimeout) { + // The render task took too long to complete. Mark the current time as + // expired to synchronously render all expired work in a single batch. + var currentTime = requestCurrentTimeForUpdate(); + markRootExpiredAtTime(root, currentTime); // This will schedule a synchronous callback. + + ensureRootIsScheduled(root); + return null; + } // Determine the next expiration time to work on, using the fields stored + // on the root. + + var expirationTime = getNextRootExpirationTimeToWorkOn(root); + + if (expirationTime !== NoWork) { + var originalCallbackNode = root.callbackNode; + + if (!((executionContext & (RenderContext | CommitContext)) === NoContext)) { + { + throw Error('Should not already be working.'); + } + } + + flushPassiveEffects(); // If the root or expiration time have changed, throw out the existing stack + // and prepare a fresh one. Otherwise we'll continue where we left off. + + if (root !== workInProgressRoot || expirationTime !== renderExpirationTime) { + prepareFreshStack(root, expirationTime); + startWorkOnPendingInteractions(root, expirationTime); + } // If we have a work-in-progress fiber, it means there's still work to do + // in this root. + + if (workInProgress !== null) { + var prevExecutionContext = executionContext; + executionContext |= RenderContext; + var prevDispatcher = pushDispatcher(root); + var prevInteractions = pushInteractions(root); + startWorkLoopTimer(workInProgress); + + do { + try { + workLoopConcurrent(); + break; + } catch (thrownValue) { + handleError(root, thrownValue); + } + } while (true); + + resetContextDependencies(); + executionContext = prevExecutionContext; + popDispatcher(prevDispatcher); + + if (enableSchedulerTracing) { + popInteractions(prevInteractions); + } + + if (workInProgressRootExitStatus === RootFatalErrored) { + var fatalError = workInProgressRootFatalError; + stopInterruptedWorkLoopTimer(); + prepareFreshStack(root, expirationTime); + markRootSuspendedAtTime(root, expirationTime); + ensureRootIsScheduled(root); + throw fatalError; + } + + if (workInProgress !== null) { + // There's still work left over. Exit without committing. + stopInterruptedWorkLoopTimer(); + } else { + // We now have a consistent tree. The next step is either to commit it, + // or, if something suspended, wait to commit it after a timeout. + stopFinishedWorkLoopTimer(); + var finishedWork = (root.finishedWork = root.current.alternate); + root.finishedExpirationTime = expirationTime; + finishConcurrentRender(root, finishedWork, workInProgressRootExitStatus, expirationTime); + } + + ensureRootIsScheduled(root); + + if (root.callbackNode === originalCallbackNode) { + // The task node scheduled for this root is the same one that's + // currently executed. Need to return a continuation. + return performConcurrentWorkOnRoot.bind(null, root); + } + } + } + + return null; + } + + function finishConcurrentRender(root, finishedWork, exitStatus, expirationTime) { + // Set this to null to indicate there's no in-progress render. + workInProgressRoot = null; + + switch (exitStatus) { + case RootIncomplete: + case RootFatalErrored: { + { + { + throw Error('Root did not complete. This is a bug in React.'); + } + } + } + // Flow knows about invariant, so it complains if I add a break + // statement, but eslint doesn't know about invariant, so it complains + // if I do. eslint-disable-next-line no-fallthrough + + case RootErrored: { + // If this was an async render, the error may have happened due to + // a mutation in a concurrent event. Try rendering one more time, + // synchronously, to see if the error goes away. If there are + // lower priority updates, let's include those, too, in case they + // fix the inconsistency. Render at Idle to include all updates. + // If it was Idle or Never or some not-yet-invented time, render + // at that time. + markRootExpiredAtTime(root, expirationTime > Idle ? Idle : expirationTime); // We assume that this second render pass will be synchronous + // and therefore not hit this path again. + + break; + } + + case RootSuspended: { + markRootSuspendedAtTime(root, expirationTime); + var lastSuspendedTime = root.lastSuspendedTime; + + if (expirationTime === lastSuspendedTime) { + root.nextKnownPendingLevel = getRemainingExpirationTime(finishedWork); + } + + flushSuspensePriorityWarningInDEV(); // We have an acceptable loading state. We need to figure out if we + // should immediately commit it or wait a bit. + // If we have processed new updates during this render, we may now + // have a new loading state ready. We want to ensure that we commit + // that as soon as possible. + + var hasNotProcessedNewUpdates = workInProgressRootLatestProcessedExpirationTime === Sync; + + if ( + hasNotProcessedNewUpdates && // do not delay if we're inside an act() scope + !(true && flushSuspenseFallbacksInTests && IsThisRendererActing.current) + ) { + // If we have not processed any new updates during this pass, then + // this is either a retry of an existing fallback state or a + // hidden tree. Hidden trees shouldn't be batched with other work + // and after that's fixed it can only be a retry. We're going to + // throttle committing retries so that we don't show too many + // loading states too quickly. + var msUntilTimeout = globalMostRecentFallbackTime + FALLBACK_THROTTLE_MS - now(); // Don't bother with a very short suspense time. + + if (msUntilTimeout > 10) { + if (workInProgressRootHasPendingPing) { + var lastPingedTime = root.lastPingedTime; + + if (lastPingedTime === NoWork || lastPingedTime >= expirationTime) { + // This render was pinged but we didn't get to restart + // earlier so try restarting now instead. + root.lastPingedTime = expirationTime; + prepareFreshStack(root, expirationTime); + break; + } + } + + var nextTime = getNextRootExpirationTimeToWorkOn(root); + + if (nextTime !== NoWork && nextTime !== expirationTime) { + // There's additional work on this root. + break; + } + + if (lastSuspendedTime !== NoWork && lastSuspendedTime !== expirationTime) { + // We should prefer to render the fallback of at the last + // suspended level. Ping the last suspended level to try + // rendering it again. + root.lastPingedTime = lastSuspendedTime; + break; + } // The render is suspended, it hasn't timed out, and there's no + // lower priority work to do. Instead of committing the fallback + // immediately, wait for more data to arrive. + + root.timeoutHandle = scheduleTimeout(commitRoot.bind(null, root), msUntilTimeout); + break; + } + } // The work expired. Commit immediately. + + commitRoot(root); + break; + } + + case RootSuspendedWithDelay: { + markRootSuspendedAtTime(root, expirationTime); + var _lastSuspendedTime = root.lastSuspendedTime; + + if (expirationTime === _lastSuspendedTime) { + root.nextKnownPendingLevel = getRemainingExpirationTime(finishedWork); + } + + flushSuspensePriorityWarningInDEV(); + + if ( + // do not delay if we're inside an act() scope + !(true && flushSuspenseFallbacksInTests && IsThisRendererActing.current) + ) { + // We're suspended in a state that should be avoided. We'll try to + // avoid committing it for as long as the timeouts let us. + if (workInProgressRootHasPendingPing) { + var _lastPingedTime = root.lastPingedTime; + + if (_lastPingedTime === NoWork || _lastPingedTime >= expirationTime) { + // This render was pinged but we didn't get to restart earlier + // so try restarting now instead. + root.lastPingedTime = expirationTime; + prepareFreshStack(root, expirationTime); + break; + } + } + + var _nextTime = getNextRootExpirationTimeToWorkOn(root); + + if (_nextTime !== NoWork && _nextTime !== expirationTime) { + // There's additional work on this root. + break; + } + + if (_lastSuspendedTime !== NoWork && _lastSuspendedTime !== expirationTime) { + // We should prefer to render the fallback of at the last + // suspended level. Ping the last suspended level to try + // rendering it again. + root.lastPingedTime = _lastSuspendedTime; + break; + } + + var _msUntilTimeout; + + if (workInProgressRootLatestSuspenseTimeout !== Sync) { + // We have processed a suspense config whose expiration time we + // can use as the timeout. + _msUntilTimeout = expirationTimeToMs(workInProgressRootLatestSuspenseTimeout) - now(); + } else if (workInProgressRootLatestProcessedExpirationTime === Sync) { + // This should never normally happen because only new updates + // cause delayed states, so we should have processed something. + // However, this could also happen in an offscreen tree. + _msUntilTimeout = 0; + } else { + // If we don't have a suspense config, we're going to use a + // heuristic to determine how long we can suspend. + var eventTimeMs = inferTimeFromExpirationTime( + workInProgressRootLatestProcessedExpirationTime, + ); + var currentTimeMs = now(); + var timeUntilExpirationMs = expirationTimeToMs(expirationTime) - currentTimeMs; + var timeElapsed = currentTimeMs - eventTimeMs; + + if (timeElapsed < 0) { + // We get this wrong some time since we estimate the time. + timeElapsed = 0; + } + + _msUntilTimeout = jnd(timeElapsed) - timeElapsed; // Clamp the timeout to the expiration time. TODO: Once the + // event time is exact instead of inferred from expiration time + // we don't need this. + + if (timeUntilExpirationMs < _msUntilTimeout) { + _msUntilTimeout = timeUntilExpirationMs; + } + } // Don't bother with a very short suspense time. + + if (_msUntilTimeout > 10) { + // The render is suspended, it hasn't timed out, and there's no + // lower priority work to do. Instead of committing the fallback + // immediately, wait for more data to arrive. + root.timeoutHandle = scheduleTimeout(commitRoot.bind(null, root), _msUntilTimeout); + break; + } + } // The work expired. Commit immediately. + + commitRoot(root); + break; + } + + case RootCompleted: { + // The work completed. Ready to commit. + if ( + // do not delay if we're inside an act() scope + !(true && flushSuspenseFallbacksInTests && IsThisRendererActing.current) && + workInProgressRootLatestProcessedExpirationTime !== Sync && + workInProgressRootCanSuspendUsingConfig !== null + ) { + // If we have exceeded the minimum loading delay, which probably + // means we have shown a spinner already, we might have to suspend + // a bit longer to ensure that the spinner is shown for + // enough time. + var _msUntilTimeout2 = computeMsUntilSuspenseLoadingDelay( + workInProgressRootLatestProcessedExpirationTime, + expirationTime, + workInProgressRootCanSuspendUsingConfig, + ); + + if (_msUntilTimeout2 > 10) { + markRootSuspendedAtTime(root, expirationTime); + root.timeoutHandle = scheduleTimeout(commitRoot.bind(null, root), _msUntilTimeout2); + break; + } + } + + commitRoot(root); + break; + } + + default: { + { + { + throw Error('Unknown root exit status.'); + } + } + } + } + } // This is the entry point for synchronous tasks that don't go + // through Scheduler + + function performSyncWorkOnRoot(root) { + // Check if there's expired work on this root. Otherwise, render at Sync. + var lastExpiredTime = root.lastExpiredTime; + var expirationTime = lastExpiredTime !== NoWork ? lastExpiredTime : Sync; + + if (root.finishedExpirationTime === expirationTime) { + // There's already a pending commit at this expiration time. + // TODO: This is poorly factored. This case only exists for the + // batch.commit() API. + commitRoot(root); + } else { + if (!((executionContext & (RenderContext | CommitContext)) === NoContext)) { + { + throw Error('Should not already be working.'); + } + } + + flushPassiveEffects(); // If the root or expiration time have changed, throw out the existing stack + // and prepare a fresh one. Otherwise we'll continue where we left off. + + if (root !== workInProgressRoot || expirationTime !== renderExpirationTime) { + prepareFreshStack(root, expirationTime); + startWorkOnPendingInteractions(root, expirationTime); + } // If we have a work-in-progress fiber, it means there's still work to do + // in this root. + + if (workInProgress !== null) { + var prevExecutionContext = executionContext; + executionContext |= RenderContext; + var prevDispatcher = pushDispatcher(root); + var prevInteractions = pushInteractions(root); + startWorkLoopTimer(workInProgress); + + do { + try { + workLoopSync(); + break; + } catch (thrownValue) { + handleError(root, thrownValue); + } + } while (true); + + resetContextDependencies(); + executionContext = prevExecutionContext; + popDispatcher(prevDispatcher); + + if (enableSchedulerTracing) { + popInteractions(prevInteractions); + } + + if (workInProgressRootExitStatus === RootFatalErrored) { + var fatalError = workInProgressRootFatalError; + stopInterruptedWorkLoopTimer(); + prepareFreshStack(root, expirationTime); + markRootSuspendedAtTime(root, expirationTime); + ensureRootIsScheduled(root); + throw fatalError; + } + + if (workInProgress !== null) { + // This is a sync render, so we should have finished the whole tree. + { + { + throw Error( + 'Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + } else { + // We now have a consistent tree. Because this is a sync render, we + // will commit it even if something suspended. + stopFinishedWorkLoopTimer(); + root.finishedWork = root.current.alternate; + root.finishedExpirationTime = expirationTime; + finishSyncRender(root, workInProgressRootExitStatus, expirationTime); + } // Before exiting, make sure there's a callback scheduled for the next + // pending level. + + ensureRootIsScheduled(root); + } + } + + return null; + } + + function finishSyncRender(root, exitStatus, expirationTime) { + // Set this to null to indicate there's no in-progress render. + workInProgressRoot = null; + + { + if (exitStatus === RootSuspended || exitStatus === RootSuspendedWithDelay) { + flushSuspensePriorityWarningInDEV(); + } + } + + commitRoot(root); + } + + function flushRoot(root, expirationTime) { + markRootExpiredAtTime(root, expirationTime); + ensureRootIsScheduled(root); + + if ((executionContext & (RenderContext | CommitContext)) === NoContext) { + flushSyncCallbackQueue(); + } + } + function flushDiscreteUpdates() { + // TODO: Should be able to flush inside batchedUpdates, but not inside `act`. + // However, `act` uses `batchedUpdates`, so there's no way to distinguish + // those two cases. Need to fix this before exposing flushDiscreteUpdates + // as a public API. + if ((executionContext & (BatchedContext | RenderContext | CommitContext)) !== NoContext) { + if (true && (executionContext & RenderContext) !== NoContext) { + warning$1( + false, + 'unstable_flushDiscreteUpdates: Cannot flush updates when React is ' + 'already rendering.', + ); + } // We're already rendering, so we can't synchronously flush pending work. + // This is probably a nested event dispatch triggered by a lifecycle/effect, + // like `el.focus()`. Exit. + + return; + } + + flushPendingDiscreteUpdates(); // If the discrete updates scheduled passive effects, flush them now so that + // they fire before the next serial event. + + flushPassiveEffects(); + } + + function syncUpdates(fn, a, b, c) { + return runWithPriority$2(ImmediatePriority, fn.bind(null, a, b, c)); + } + + function flushPendingDiscreteUpdates() { + if (rootsWithPendingDiscreteUpdates !== null) { + // For each root with pending discrete updates, schedule a callback to + // immediately flush them. + var roots = rootsWithPendingDiscreteUpdates; + rootsWithPendingDiscreteUpdates = null; + roots.forEach(function (expirationTime, root) { + markRootExpiredAtTime(root, expirationTime); + ensureRootIsScheduled(root); + }); // Now flush the immediate queue. + + flushSyncCallbackQueue(); + } + } + + function batchedUpdates$1(fn, a) { + var prevExecutionContext = executionContext; + executionContext |= BatchedContext; + + try { + return fn(a); + } finally { + executionContext = prevExecutionContext; + + if (executionContext === NoContext) { + // Flush the immediate callbacks that were scheduled during this batch + flushSyncCallbackQueue(); + } + } + } + function batchedEventUpdates$1(fn, a) { + var prevExecutionContext = executionContext; + executionContext |= EventContext; + + try { + return fn(a); + } finally { + executionContext = prevExecutionContext; + + if (executionContext === NoContext) { + // Flush the immediate callbacks that were scheduled during this batch + flushSyncCallbackQueue(); + } + } + } + function discreteUpdates$1(fn, a, b, c) { + var prevExecutionContext = executionContext; + executionContext |= DiscreteEventContext; + + try { + // Should this + return runWithPriority$2(UserBlockingPriority$2, fn.bind(null, a, b, c)); + } finally { + executionContext = prevExecutionContext; + + if (executionContext === NoContext) { + // Flush the immediate callbacks that were scheduled during this batch + flushSyncCallbackQueue(); + } + } + } + function unbatchedUpdates(fn, a) { + var prevExecutionContext = executionContext; + executionContext &= ~BatchedContext; + executionContext |= LegacyUnbatchedContext; + + try { + return fn(a); + } finally { + executionContext = prevExecutionContext; + + if (executionContext === NoContext) { + // Flush the immediate callbacks that were scheduled during this batch + flushSyncCallbackQueue(); + } + } + } + function flushSync(fn, a) { + if ((executionContext & (RenderContext | CommitContext)) !== NoContext) { + { + { + throw Error( + 'flushSync was called from inside a lifecycle method. It cannot be called when React is already rendering.', + ); + } + } + } + + var prevExecutionContext = executionContext; + executionContext |= BatchedContext; + + try { + return runWithPriority$2(ImmediatePriority, fn.bind(null, a)); + } finally { + executionContext = prevExecutionContext; // Flush the immediate callbacks that were scheduled during this batch. + // Note that this will happen even if batchedUpdates is higher up + // the stack. + + flushSyncCallbackQueue(); + } + } + function flushControlled(fn) { + var prevExecutionContext = executionContext; + executionContext |= BatchedContext; + + try { + runWithPriority$2(ImmediatePriority, fn); + } finally { + executionContext = prevExecutionContext; + + if (executionContext === NoContext) { + // Flush the immediate callbacks that were scheduled during this batch + flushSyncCallbackQueue(); + } + } + } + + function prepareFreshStack(root, expirationTime) { + root.finishedWork = null; + root.finishedExpirationTime = NoWork; + var timeoutHandle = root.timeoutHandle; + + if (timeoutHandle !== noTimeout) { + // The root previous suspended and scheduled a timeout to commit a fallback + // state. Now that we have additional work, cancel the timeout. + root.timeoutHandle = noTimeout; // $FlowFixMe Complains noTimeout is not a TimeoutID, despite the check above + + cancelTimeout(timeoutHandle); + } + + if (workInProgress !== null) { + var interruptedWork = workInProgress.return; + + while (interruptedWork !== null) { + unwindInterruptedWork(interruptedWork); + interruptedWork = interruptedWork.return; + } + } + + workInProgressRoot = root; + workInProgress = createWorkInProgress(root.current, null, expirationTime); + renderExpirationTime = expirationTime; + workInProgressRootExitStatus = RootIncomplete; + workInProgressRootFatalError = null; + workInProgressRootLatestProcessedExpirationTime = Sync; + workInProgressRootLatestSuspenseTimeout = Sync; + workInProgressRootCanSuspendUsingConfig = null; + workInProgressRootNextUnprocessedUpdateTime = NoWork; + workInProgressRootHasPendingPing = false; + + if (enableSchedulerTracing) { + spawnedWorkDuringRender = null; + } + + { + ReactStrictModeWarnings.discardPendingWarnings(); + componentsThatTriggeredHighPriSuspend = null; + } + } + + function handleError(root, thrownValue) { + do { + try { + // Reset module-level state that was set during the render phase. + resetContextDependencies(); + resetHooks(); + resetCurrentFiber(); + + if (workInProgress === null || workInProgress.return === null) { + // Expected to be working on a non-root fiber. This is a fatal error + // because there's no ancestor that can handle it; the root is + // supposed to capture all errors that weren't caught by an error + // boundary. + workInProgressRootExitStatus = RootFatalErrored; + workInProgressRootFatalError = thrownValue; + return null; + } + + if (enableProfilerTimer && workInProgress.mode & ProfileMode) { + // Record the time spent rendering before an error was thrown. This + // avoids inaccurate Profiler durations in the case of a + // suspended render. + stopProfilerTimerIfRunningAndRecordDelta(workInProgress, true); + } + + throwException( + root, + workInProgress.return, + workInProgress, + thrownValue, + renderExpirationTime, + ); + workInProgress = completeUnitOfWork(workInProgress); + } catch (yetAnotherThrownValue) { + // Something in the return path also threw. + thrownValue = yetAnotherThrownValue; + continue; + } // Return to the normal work loop. + + return; + } while (true); + } + + function pushDispatcher(root) { + var prevDispatcher = ReactCurrentDispatcher.current; + ReactCurrentDispatcher.current = ContextOnlyDispatcher; + + if (prevDispatcher === null) { + // The React isomorphic package does not include a default dispatcher. + // Instead the first renderer will lazily attach one, in order to give + // nicer error messages. + return ContextOnlyDispatcher; + } else { + return prevDispatcher; + } + } + + function popDispatcher(prevDispatcher) { + ReactCurrentDispatcher.current = prevDispatcher; + } + + function pushInteractions(root) { + if (enableSchedulerTracing) { + var prevInteractions = tracing.__interactionsRef.current; + tracing.__interactionsRef.current = root.memoizedInteractions; + return prevInteractions; + } + + return null; + } + + function popInteractions(prevInteractions) { + if (enableSchedulerTracing) { + tracing.__interactionsRef.current = prevInteractions; + } + } + + function markCommitTimeOfFallback() { + globalMostRecentFallbackTime = now(); + } + function markRenderEventTimeAndConfig(expirationTime, suspenseConfig) { + if (expirationTime < workInProgressRootLatestProcessedExpirationTime && expirationTime > Idle) { + workInProgressRootLatestProcessedExpirationTime = expirationTime; + } + + if (suspenseConfig !== null) { + if (expirationTime < workInProgressRootLatestSuspenseTimeout && expirationTime > Idle) { + workInProgressRootLatestSuspenseTimeout = expirationTime; // Most of the time we only have one config and getting wrong is not bad. + + workInProgressRootCanSuspendUsingConfig = suspenseConfig; + } + } + } + function markUnprocessedUpdateTime(expirationTime) { + if (expirationTime > workInProgressRootNextUnprocessedUpdateTime) { + workInProgressRootNextUnprocessedUpdateTime = expirationTime; + } + } + function renderDidSuspend() { + if (workInProgressRootExitStatus === RootIncomplete) { + workInProgressRootExitStatus = RootSuspended; + } + } + function renderDidSuspendDelayIfPossible() { + if ( + workInProgressRootExitStatus === RootIncomplete || + workInProgressRootExitStatus === RootSuspended + ) { + workInProgressRootExitStatus = RootSuspendedWithDelay; + } // Check if there's a lower priority update somewhere else in the tree. + + if (workInProgressRootNextUnprocessedUpdateTime !== NoWork && workInProgressRoot !== null) { + // Mark the current render as suspended, and then mark that there's a + // pending update. + // TODO: This should immediately interrupt the current render, instead + // of waiting until the next time we yield. + markRootSuspendedAtTime(workInProgressRoot, renderExpirationTime); + markRootUpdatedAtTime(workInProgressRoot, workInProgressRootNextUnprocessedUpdateTime); + } + } + function renderDidError() { + if (workInProgressRootExitStatus !== RootCompleted) { + workInProgressRootExitStatus = RootErrored; + } + } // Called during render to determine if anything has suspended. + // Returns false if we're not sure. + + function renderHasNotSuspendedYet() { + // If something errored or completed, we can't really be sure, + // so those are false. + return workInProgressRootExitStatus === RootIncomplete; + } + + function inferTimeFromExpirationTime(expirationTime) { + // We don't know exactly when the update was scheduled, but we can infer an + // approximate start time from the expiration time. + var earliestExpirationTimeMs = expirationTimeToMs(expirationTime); + return earliestExpirationTimeMs - LOW_PRIORITY_EXPIRATION; + } + + function inferTimeFromExpirationTimeWithSuspenseConfig(expirationTime, suspenseConfig) { + // We don't know exactly when the update was scheduled, but we can infer an + // approximate start time from the expiration time by subtracting the timeout + // that was added to the event time. + var earliestExpirationTimeMs = expirationTimeToMs(expirationTime); + return earliestExpirationTimeMs - (suspenseConfig.timeoutMs | 0 || LOW_PRIORITY_EXPIRATION); + } // The work loop is an extremely hot path. Tell Closure not to inline it. + + /** @noinline */ + + function workLoopSync() { + // Already timed out, so perform work without checking if we need to yield. + while (workInProgress !== null) { + workInProgress = performUnitOfWork(workInProgress); + } + } + /** @noinline */ + + function workLoopConcurrent() { + // Perform work until Scheduler asks us to yield + while (workInProgress !== null && !shouldYield()) { + workInProgress = performUnitOfWork(workInProgress); + } + } + + function performUnitOfWork(unitOfWork) { + // The current, flushed, state of this fiber is the alternate. Ideally + // nothing should rely on this, but relying on it here means that we don't + // need an additional field on the work in progress. + var current$$1 = unitOfWork.alternate; + startWorkTimer(unitOfWork); + setCurrentFiber(unitOfWork); + var next; + + if (enableProfilerTimer && (unitOfWork.mode & ProfileMode) !== NoMode) { + startProfilerTimer(unitOfWork); + next = beginWork$$1(current$$1, unitOfWork, renderExpirationTime); + stopProfilerTimerIfRunningAndRecordDelta(unitOfWork, true); + } else { + next = beginWork$$1(current$$1, unitOfWork, renderExpirationTime); + } + + resetCurrentFiber(); + unitOfWork.memoizedProps = unitOfWork.pendingProps; + + if (next === null) { + // If this doesn't spawn new work, complete the current work. + next = completeUnitOfWork(unitOfWork); + } + + ReactCurrentOwner$2.current = null; + return next; + } + + function completeUnitOfWork(unitOfWork) { + // Attempt to complete the current unit of work, then move to the next + // sibling. If there are no more siblings, return to the parent fiber. + workInProgress = unitOfWork; + + do { + // The current, flushed, state of this fiber is the alternate. Ideally + // nothing should rely on this, but relying on it here means that we don't + // need an additional field on the work in progress. + var current$$1 = workInProgress.alternate; + var returnFiber = workInProgress.return; // Check if the work completed or if something threw. + + if ((workInProgress.effectTag & Incomplete) === NoEffect) { + setCurrentFiber(workInProgress); + var next = void 0; + + if (!enableProfilerTimer || (workInProgress.mode & ProfileMode) === NoMode) { + next = completeWork(current$$1, workInProgress, renderExpirationTime); + } else { + startProfilerTimer(workInProgress); + next = completeWork(current$$1, workInProgress, renderExpirationTime); // Update render duration assuming we didn't error. + + stopProfilerTimerIfRunningAndRecordDelta(workInProgress, false); + } + + stopWorkTimer(workInProgress); + resetCurrentFiber(); + resetChildExpirationTime(workInProgress); + + if (next !== null) { + // Completing this fiber spawned new work. Work on that next. + return next; + } + + if ( + returnFiber !== null && // Do not append effects to parents if a sibling failed to complete + (returnFiber.effectTag & Incomplete) === NoEffect + ) { + // Append all the effects of the subtree and this fiber onto the effect + // list of the parent. The completion order of the children affects the + // side-effect order. + if (returnFiber.firstEffect === null) { + returnFiber.firstEffect = workInProgress.firstEffect; + } + + if (workInProgress.lastEffect !== null) { + if (returnFiber.lastEffect !== null) { + returnFiber.lastEffect.nextEffect = workInProgress.firstEffect; + } + + returnFiber.lastEffect = workInProgress.lastEffect; + } // If this fiber had side-effects, we append it AFTER the children's + // side-effects. We can perform certain side-effects earlier if needed, + // by doing multiple passes over the effect list. We don't want to + // schedule our own side-effect on our own list because if end up + // reusing children we'll schedule this effect onto itself since we're + // at the end. + + var effectTag = workInProgress.effectTag; // Skip both NoWork and PerformedWork tags when creating the effect + // list. PerformedWork effect is read by React DevTools but shouldn't be + // committed. + + if (effectTag > PerformedWork) { + if (returnFiber.lastEffect !== null) { + returnFiber.lastEffect.nextEffect = workInProgress; + } else { + returnFiber.firstEffect = workInProgress; + } + + returnFiber.lastEffect = workInProgress; + } + } + } else { + // This fiber did not complete because something threw. Pop values off + // the stack without entering the complete phase. If this is a boundary, + // capture values if possible. + var _next = unwindWork(workInProgress, renderExpirationTime); // Because this fiber did not complete, don't reset its expiration time. + + if (enableProfilerTimer && (workInProgress.mode & ProfileMode) !== NoMode) { + // Record the render duration for the fiber that errored. + stopProfilerTimerIfRunningAndRecordDelta(workInProgress, false); // Include the time spent working on failed children before continuing. + + var actualDuration = workInProgress.actualDuration; + var child = workInProgress.child; + + while (child !== null) { + actualDuration += child.actualDuration; + child = child.sibling; + } + + workInProgress.actualDuration = actualDuration; + } + + if (_next !== null) { + // If completing this work spawned new work, do that next. We'll come + // back here again. + // Since we're restarting, remove anything that is not a host effect + // from the effect tag. + // TODO: The name stopFailedWorkTimer is misleading because Suspense + // also captures and restarts. + stopFailedWorkTimer(workInProgress); + _next.effectTag &= HostEffectMask; + return _next; + } + + stopWorkTimer(workInProgress); + + if (returnFiber !== null) { + // Mark the parent fiber as incomplete and clear its effect list. + returnFiber.firstEffect = returnFiber.lastEffect = null; + returnFiber.effectTag |= Incomplete; + } + } + + var siblingFiber = workInProgress.sibling; + + if (siblingFiber !== null) { + // If there is more work to do in this returnFiber, do that next. + return siblingFiber; + } // Otherwise, return to the parent + + workInProgress = returnFiber; + } while (workInProgress !== null); // We've reached the root. + + if (workInProgressRootExitStatus === RootIncomplete) { + workInProgressRootExitStatus = RootCompleted; + } + + return null; + } + + function getRemainingExpirationTime(fiber) { + var updateExpirationTime = fiber.expirationTime; + var childExpirationTime = fiber.childExpirationTime; + return updateExpirationTime > childExpirationTime ? updateExpirationTime : childExpirationTime; + } + + function resetChildExpirationTime(completedWork) { + if (renderExpirationTime !== Never && completedWork.childExpirationTime === Never) { + // The children of this component are hidden. Don't bubble their + // expiration times. + return; + } + + var newChildExpirationTime = NoWork; // Bubble up the earliest expiration time. + + if (enableProfilerTimer && (completedWork.mode & ProfileMode) !== NoMode) { + // In profiling mode, resetChildExpirationTime is also used to reset + // profiler durations. + var actualDuration = completedWork.actualDuration; + var treeBaseDuration = completedWork.selfBaseDuration; // When a fiber is cloned, its actualDuration is reset to 0. This value will + // only be updated if work is done on the fiber (i.e. it doesn't bailout). + // When work is done, it should bubble to the parent's actualDuration. If + // the fiber has not been cloned though, (meaning no work was done), then + // this value will reflect the amount of time spent working on a previous + // render. In that case it should not bubble. We determine whether it was + // cloned by comparing the child pointer. + + var shouldBubbleActualDurations = + completedWork.alternate === null || completedWork.child !== completedWork.alternate.child; + var child = completedWork.child; + + while (child !== null) { + var childUpdateExpirationTime = child.expirationTime; + var childChildExpirationTime = child.childExpirationTime; + + if (childUpdateExpirationTime > newChildExpirationTime) { + newChildExpirationTime = childUpdateExpirationTime; + } + + if (childChildExpirationTime > newChildExpirationTime) { + newChildExpirationTime = childChildExpirationTime; + } + + if (shouldBubbleActualDurations) { + actualDuration += child.actualDuration; + } + + treeBaseDuration += child.treeBaseDuration; + child = child.sibling; + } + + completedWork.actualDuration = actualDuration; + completedWork.treeBaseDuration = treeBaseDuration; + } else { + var _child = completedWork.child; + + while (_child !== null) { + var _childUpdateExpirationTime = _child.expirationTime; + var _childChildExpirationTime = _child.childExpirationTime; + + if (_childUpdateExpirationTime > newChildExpirationTime) { + newChildExpirationTime = _childUpdateExpirationTime; + } + + if (_childChildExpirationTime > newChildExpirationTime) { + newChildExpirationTime = _childChildExpirationTime; + } + + _child = _child.sibling; + } + } + + completedWork.childExpirationTime = newChildExpirationTime; + } + + function commitRoot(root) { + var renderPriorityLevel = getCurrentPriorityLevel(); + runWithPriority$2(ImmediatePriority, commitRootImpl.bind(null, root, renderPriorityLevel)); + return null; + } + + function commitRootImpl(root, renderPriorityLevel) { + do { + // `flushPassiveEffects` will call `flushSyncUpdateQueue` at the end, which + // means `flushPassiveEffects` will sometimes result in additional + // passive effects. So we need to keep flushing in a loop until there are + // no more pending effects. + // TODO: Might be better if `flushPassiveEffects` did not automatically + // flush synchronous work at the end, to avoid factoring hazards like this. + flushPassiveEffects(); + } while (rootWithPendingPassiveEffects !== null); + + flushRenderPhaseStrictModeWarningsInDEV(); + + if (!((executionContext & (RenderContext | CommitContext)) === NoContext)) { + { + throw Error('Should not already be working.'); + } + } + + var finishedWork = root.finishedWork; + var expirationTime = root.finishedExpirationTime; + + if (finishedWork === null) { + return null; + } + + root.finishedWork = null; + root.finishedExpirationTime = NoWork; + + if (!(finishedWork !== root.current)) { + { + throw Error( + 'Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } // commitRoot never returns a continuation; it always finishes synchronously. + // So we can clear these now to allow a new callback to be scheduled. + + root.callbackNode = null; + root.callbackExpirationTime = NoWork; + root.callbackPriority = NoPriority; + root.nextKnownPendingLevel = NoWork; + startCommitTimer(); // Update the first and last pending times on this root. The new first + // pending time is whatever is left on the root fiber. + + var remainingExpirationTimeBeforeCommit = getRemainingExpirationTime(finishedWork); + markRootFinishedAtTime(root, expirationTime, remainingExpirationTimeBeforeCommit); + + if (root === workInProgressRoot) { + // We can reset these now that they are finished. + workInProgressRoot = null; + workInProgress = null; + renderExpirationTime = NoWork; + } else { + } // This indicates that the last root we worked on is not the same one that + // we're committing now. This most commonly happens when a suspended root + // times out. + // Get the list of effects. + + var firstEffect; + + if (finishedWork.effectTag > PerformedWork) { + // A fiber's effect list consists only of its children, not itself. So if + // the root has an effect, we need to add it to the end of the list. The + // resulting list is the set that would belong to the root's parent, if it + // had one; that is, all the effects in the tree including the root. + if (finishedWork.lastEffect !== null) { + finishedWork.lastEffect.nextEffect = finishedWork; + firstEffect = finishedWork.firstEffect; + } else { + firstEffect = finishedWork; + } + } else { + // There is no effect on the root. + firstEffect = finishedWork.firstEffect; + } + + if (firstEffect !== null) { + var prevExecutionContext = executionContext; + executionContext |= CommitContext; + var prevInteractions = pushInteractions(root); // Reset this to null before calling lifecycles + + ReactCurrentOwner$2.current = null; // The commit phase is broken into several sub-phases. We do a separate pass + // of the effect list for each phase: all mutation effects come before all + // layout effects, and so on. + // The first phase a "before mutation" phase. We use this phase to read the + // state of the host tree right before we mutate it. This is where + // getSnapshotBeforeUpdate is called. + + startCommitSnapshotEffectsTimer(); + prepareForCommit(root.containerInfo); + nextEffect = firstEffect; + + do { + { + invokeGuardedCallback(null, commitBeforeMutationEffects, null); + + if (hasCaughtError()) { + if (!(nextEffect !== null)) { + { + throw Error('Should be working on an effect.'); + } + } + + var error = clearCaughtError(); + captureCommitPhaseError(nextEffect, error); + nextEffect = nextEffect.nextEffect; + } + } + } while (nextEffect !== null); + + stopCommitSnapshotEffectsTimer(); + + if (enableProfilerTimer) { + // Mark the current commit time to be shared by all Profilers in this + // batch. This enables them to be grouped later. + recordCommitTime(); + } // The next phase is the mutation phase, where we mutate the host tree. + + startCommitHostEffectsTimer(); + nextEffect = firstEffect; + + do { + { + invokeGuardedCallback(null, commitMutationEffects, null, root, renderPriorityLevel); + + if (hasCaughtError()) { + if (!(nextEffect !== null)) { + { + throw Error('Should be working on an effect.'); + } + } + + var _error = clearCaughtError(); + + captureCommitPhaseError(nextEffect, _error); + nextEffect = nextEffect.nextEffect; + } + } + } while (nextEffect !== null); + + stopCommitHostEffectsTimer(); + resetAfterCommit(root.containerInfo); // The work-in-progress tree is now the current tree. This must come after + // the mutation phase, so that the previous tree is still current during + // componentWillUnmount, but before the layout phase, so that the finished + // work is current during componentDidMount/Update. + + root.current = finishedWork; // The next phase is the layout phase, where we call effects that read + // the host tree after it's been mutated. The idiomatic use case for this is + // layout, but class component lifecycles also fire here for legacy reasons. + + startCommitLifeCyclesTimer(); + nextEffect = firstEffect; + + do { + { + invokeGuardedCallback(null, commitLayoutEffects, null, root, expirationTime); + + if (hasCaughtError()) { + if (!(nextEffect !== null)) { + { + throw Error('Should be working on an effect.'); + } + } + + var _error2 = clearCaughtError(); + + captureCommitPhaseError(nextEffect, _error2); + nextEffect = nextEffect.nextEffect; + } + } + } while (nextEffect !== null); + + stopCommitLifeCyclesTimer(); + nextEffect = null; // Tell Scheduler to yield at the end of the frame, so the browser has an + // opportunity to paint. + + requestPaint(); + + if (enableSchedulerTracing) { + popInteractions(prevInteractions); + } + + executionContext = prevExecutionContext; + } else { + // No effects. + root.current = finishedWork; // Measure these anyway so the flamegraph explicitly shows that there were + // no effects. + // TODO: Maybe there's a better way to report this. + + startCommitSnapshotEffectsTimer(); + stopCommitSnapshotEffectsTimer(); + + if (enableProfilerTimer) { + recordCommitTime(); + } + + startCommitHostEffectsTimer(); + stopCommitHostEffectsTimer(); + startCommitLifeCyclesTimer(); + stopCommitLifeCyclesTimer(); + } + + stopCommitTimer(); + var rootDidHavePassiveEffects = rootDoesHavePassiveEffects; + + if (rootDoesHavePassiveEffects) { + // This commit has passive effects. Stash a reference to them. But don't + // schedule a callback until after flushing layout work. + rootDoesHavePassiveEffects = false; + rootWithPendingPassiveEffects = root; + pendingPassiveEffectsExpirationTime = expirationTime; + pendingPassiveEffectsRenderPriority = renderPriorityLevel; + } else { + // We are done with the effect chain at this point so let's clear the + // nextEffect pointers to assist with GC. If we have passive effects, we'll + // clear this in flushPassiveEffects. + nextEffect = firstEffect; + + while (nextEffect !== null) { + var nextNextEffect = nextEffect.nextEffect; + nextEffect.nextEffect = null; + nextEffect = nextNextEffect; + } + } // Check if there's remaining work on this root + + var remainingExpirationTime = root.firstPendingTime; + + if (remainingExpirationTime !== NoWork) { + if (enableSchedulerTracing) { + if (spawnedWorkDuringRender !== null) { + var expirationTimes = spawnedWorkDuringRender; + spawnedWorkDuringRender = null; + + for (var i = 0; i < expirationTimes.length; i++) { + scheduleInteractions(root, expirationTimes[i], root.memoizedInteractions); + } + } + + schedulePendingInteractions(root, remainingExpirationTime); + } + } else { + // If there's no remaining work, we can clear the set of already failed + // error boundaries. + legacyErrorBoundariesThatAlreadyFailed = null; + } + + if (enableSchedulerTracing) { + if (!rootDidHavePassiveEffects) { + // If there are no passive effects, then we can complete the pending interactions. + // Otherwise, we'll wait until after the passive effects are flushed. + // Wait to do this until after remaining work has been scheduled, + // so that we don't prematurely signal complete for interactions when there's e.g. hidden work. + finishPendingInteractions(root, expirationTime); + } + } + + if (remainingExpirationTime === Sync) { + // Count the number of times the root synchronously re-renders without + // finishing. If there are too many, it indicates an infinite update loop. + if (root === rootWithNestedUpdates) { + nestedUpdateCount++; + } else { + nestedUpdateCount = 0; + rootWithNestedUpdates = root; + } + } else { + nestedUpdateCount = 0; + } + + onCommitRoot(finishedWork.stateNode, expirationTime); // Always call this before exiting `commitRoot`, to ensure that any + // additional work on this root is scheduled. + + ensureRootIsScheduled(root); + + if (hasUncaughtError) { + hasUncaughtError = false; + var _error3 = firstUncaughtError; + firstUncaughtError = null; + throw _error3; + } + + if ((executionContext & LegacyUnbatchedContext) !== NoContext) { + // This is a legacy edge case. We just committed the initial mount of + // a ReactDOM.render-ed root inside of batchedUpdates. The commit fired + // synchronously, but layout updates should be deferred until the end + // of the batch. + return null; + } // If layout work was scheduled, flush it now. + + flushSyncCallbackQueue(); + return null; + } + + function commitBeforeMutationEffects() { + while (nextEffect !== null) { + var effectTag = nextEffect.effectTag; + + if ((effectTag & Snapshot) !== NoEffect) { + setCurrentFiber(nextEffect); + recordEffect(); + var current$$1 = nextEffect.alternate; + commitBeforeMutationLifeCycles(current$$1, nextEffect); + resetCurrentFiber(); + } + + if ((effectTag & Passive) !== NoEffect) { + // If there are passive effects, schedule a callback to flush at + // the earliest opportunity. + if (!rootDoesHavePassiveEffects) { + rootDoesHavePassiveEffects = true; + scheduleCallback(NormalPriority, function () { + flushPassiveEffects(); + return null; + }); + } + } + + nextEffect = nextEffect.nextEffect; + } + } + + function commitMutationEffects(root, renderPriorityLevel) { + // TODO: Should probably move the bulk of this function to commitWork. + while (nextEffect !== null) { + setCurrentFiber(nextEffect); + var effectTag = nextEffect.effectTag; + + if (effectTag & ContentReset) { + commitResetTextContent(nextEffect); + } + + if (effectTag & Ref) { + var current$$1 = nextEffect.alternate; + + if (current$$1 !== null) { + commitDetachRef(current$$1); + } + } // The following switch statement is only concerned about placement, + // updates, and deletions. To avoid needing to add a case for every possible + // bitmap value, we remove the secondary effects from the effect tag and + // switch on that value. + + var primaryEffectTag = effectTag & (Placement | Update | Deletion | Hydrating); + + switch (primaryEffectTag) { + case Placement: { + commitPlacement(nextEffect); // Clear the "placement" from effect tag so that we know that this is + // inserted, before any life-cycles like componentDidMount gets called. + // TODO: findDOMNode doesn't rely on this any more but isMounted does + // and isMounted is deprecated anyway so we should be able to kill this. + + nextEffect.effectTag &= ~Placement; + break; + } + + case PlacementAndUpdate: { + // Placement + commitPlacement(nextEffect); // Clear the "placement" from effect tag so that we know that this is + // inserted, before any life-cycles like componentDidMount gets called. + + nextEffect.effectTag &= ~Placement; // Update + + var _current = nextEffect.alternate; + commitWork(_current, nextEffect); + break; + } + + case Hydrating: { + nextEffect.effectTag &= ~Hydrating; + break; + } + + case HydratingAndUpdate: { + nextEffect.effectTag &= ~Hydrating; // Update + + var _current2 = nextEffect.alternate; + commitWork(_current2, nextEffect); + break; + } + + case Update: { + var _current3 = nextEffect.alternate; + commitWork(_current3, nextEffect); + break; + } + + case Deletion: { + commitDeletion(root, nextEffect, renderPriorityLevel); + break; + } + } // TODO: Only record a mutation effect if primaryEffectTag is non-zero. + + recordEffect(); + resetCurrentFiber(); + nextEffect = nextEffect.nextEffect; + } + } + + function commitLayoutEffects(root, committedExpirationTime) { + // TODO: Should probably move the bulk of this function to commitWork. + while (nextEffect !== null) { + setCurrentFiber(nextEffect); + var effectTag = nextEffect.effectTag; + + if (effectTag & (Update | Callback)) { + recordEffect(); + var current$$1 = nextEffect.alternate; + commitLifeCycles(root, current$$1, nextEffect, committedExpirationTime); + } + + if (effectTag & Ref) { + recordEffect(); + commitAttachRef(nextEffect); + } + + resetCurrentFiber(); + nextEffect = nextEffect.nextEffect; + } + } + + function flushPassiveEffects() { + if (pendingPassiveEffectsRenderPriority !== NoPriority) { + var priorityLevel = + pendingPassiveEffectsRenderPriority > NormalPriority + ? NormalPriority + : pendingPassiveEffectsRenderPriority; + pendingPassiveEffectsRenderPriority = NoPriority; + return runWithPriority$2(priorityLevel, flushPassiveEffectsImpl); + } + } + + function flushPassiveEffectsImpl() { + if (rootWithPendingPassiveEffects === null) { + return false; + } + + var root = rootWithPendingPassiveEffects; + var expirationTime = pendingPassiveEffectsExpirationTime; + rootWithPendingPassiveEffects = null; + pendingPassiveEffectsExpirationTime = NoWork; + + if (!((executionContext & (RenderContext | CommitContext)) === NoContext)) { + { + throw Error('Cannot flush passive effects while already rendering.'); + } + } + + var prevExecutionContext = executionContext; + executionContext |= CommitContext; + var prevInteractions = pushInteractions(root); // Note: This currently assumes there are no passive effects on the root + // fiber, because the root is not part of its own effect list. This could + // change in the future. + + var effect = root.current.firstEffect; + + while (effect !== null) { + { + setCurrentFiber(effect); + invokeGuardedCallback(null, commitPassiveHookEffects, null, effect); + + if (hasCaughtError()) { + if (!(effect !== null)) { + { + throw Error('Should be working on an effect.'); + } + } + + var error = clearCaughtError(); + captureCommitPhaseError(effect, error); + } + + resetCurrentFiber(); + } + + var nextNextEffect = effect.nextEffect; // Remove nextEffect pointer to assist GC + + effect.nextEffect = null; + effect = nextNextEffect; + } + + if (enableSchedulerTracing) { + popInteractions(prevInteractions); + finishPendingInteractions(root, expirationTime); + } + + executionContext = prevExecutionContext; + flushSyncCallbackQueue(); // If additional passive effects were scheduled, increment a counter. If this + // exceeds the limit, we'll fire a warning. + + nestedPassiveUpdateCount = + rootWithPendingPassiveEffects === null ? 0 : nestedPassiveUpdateCount + 1; + return true; + } + + function isAlreadyFailedLegacyErrorBoundary(instance) { + return ( + legacyErrorBoundariesThatAlreadyFailed !== null && + legacyErrorBoundariesThatAlreadyFailed.has(instance) + ); + } + function markLegacyErrorBoundaryAsFailed(instance) { + if (legacyErrorBoundariesThatAlreadyFailed === null) { + legacyErrorBoundariesThatAlreadyFailed = new Set([instance]); + } else { + legacyErrorBoundariesThatAlreadyFailed.add(instance); + } + } + + function prepareToThrowUncaughtError(error) { + if (!hasUncaughtError) { + hasUncaughtError = true; + firstUncaughtError = error; + } + } + + var onUncaughtError = prepareToThrowUncaughtError; + + function captureCommitPhaseErrorOnRoot(rootFiber, sourceFiber, error) { + var errorInfo = createCapturedValue(error, sourceFiber); + var update = createRootErrorUpdate(rootFiber, errorInfo, Sync); + enqueueUpdate(rootFiber, update); + var root = markUpdateTimeFromFiberToRoot(rootFiber, Sync); + + if (root !== null) { + ensureRootIsScheduled(root); + schedulePendingInteractions(root, Sync); + } + } + + function captureCommitPhaseError(sourceFiber, error) { + if (sourceFiber.tag === HostRoot) { + // Error was thrown at the root. There is no parent, so the root + // itself should capture it. + captureCommitPhaseErrorOnRoot(sourceFiber, sourceFiber, error); + return; + } + + var fiber = sourceFiber.return; + + while (fiber !== null) { + if (fiber.tag === HostRoot) { + captureCommitPhaseErrorOnRoot(fiber, sourceFiber, error); + return; + } else if (fiber.tag === ClassComponent) { + var ctor = fiber.type; + var instance = fiber.stateNode; + + if ( + typeof ctor.getDerivedStateFromError === 'function' || + (typeof instance.componentDidCatch === 'function' && + !isAlreadyFailedLegacyErrorBoundary(instance)) + ) { + var errorInfo = createCapturedValue(error, sourceFiber); + var update = createClassErrorUpdate( + fiber, + errorInfo, // TODO: This is always sync + Sync, + ); + enqueueUpdate(fiber, update); + var root = markUpdateTimeFromFiberToRoot(fiber, Sync); + + if (root !== null) { + ensureRootIsScheduled(root); + schedulePendingInteractions(root, Sync); + } + + return; + } + } + + fiber = fiber.return; + } + } + function pingSuspendedRoot(root, thenable, suspendedTime) { + var pingCache = root.pingCache; + + if (pingCache !== null) { + // The thenable resolved, so we no longer need to memoize, because it will + // never be thrown again. + pingCache.delete(thenable); + } + + if (workInProgressRoot === root && renderExpirationTime === suspendedTime) { + // Received a ping at the same priority level at which we're currently + // rendering. We might want to restart this render. This should mirror + // the logic of whether or not a root suspends once it completes. + // TODO: If we're rendering sync either due to Sync, Batched or expired, + // we should probably never restart. + // If we're suspended with delay, we'll always suspend so we can always + // restart. If we're suspended without any updates, it might be a retry. + // If it's early in the retry we can restart. We can't know for sure + // whether we'll eventually process an update during this render pass, + // but it's somewhat unlikely that we get to a ping before that, since + // getting to the root most update is usually very fast. + if ( + workInProgressRootExitStatus === RootSuspendedWithDelay || + (workInProgressRootExitStatus === RootSuspended && + workInProgressRootLatestProcessedExpirationTime === Sync && + now() - globalMostRecentFallbackTime < FALLBACK_THROTTLE_MS) + ) { + // Restart from the root. Don't need to schedule a ping because + // we're already working on this tree. + prepareFreshStack(root, renderExpirationTime); + } else { + // Even though we can't restart right now, we might get an + // opportunity later. So we mark this render as having a ping. + workInProgressRootHasPendingPing = true; + } + + return; + } + + if (!isRootSuspendedAtTime(root, suspendedTime)) { + // The root is no longer suspended at this time. + return; + } + + var lastPingedTime = root.lastPingedTime; + + if (lastPingedTime !== NoWork && lastPingedTime < suspendedTime) { + // There's already a lower priority ping scheduled. + return; + } // Mark the time at which this ping was scheduled. + + root.lastPingedTime = suspendedTime; + + if (root.finishedExpirationTime === suspendedTime) { + // If there's a pending fallback waiting to commit, throw it away. + root.finishedExpirationTime = NoWork; + root.finishedWork = null; + } + + ensureRootIsScheduled(root); + schedulePendingInteractions(root, suspendedTime); + } + + function retryTimedOutBoundary(boundaryFiber, retryTime) { + // The boundary fiber (a Suspense component or SuspenseList component) + // previously was rendered in its fallback state. One of the promises that + // suspended it has resolved, which means at least part of the tree was + // likely unblocked. Try rendering again, at a new expiration time. + if (retryTime === NoWork) { + var suspenseConfig = null; // Retries don't carry over the already committed update. + + var currentTime = requestCurrentTimeForUpdate(); + retryTime = computeExpirationForFiber(currentTime, boundaryFiber, suspenseConfig); + } // TODO: Special case idle priority? + + var root = markUpdateTimeFromFiberToRoot(boundaryFiber, retryTime); + + if (root !== null) { + ensureRootIsScheduled(root); + schedulePendingInteractions(root, retryTime); + } + } + + function retryDehydratedSuspenseBoundary(boundaryFiber) { + var suspenseState = boundaryFiber.memoizedState; + var retryTime = NoWork; + + if (suspenseState !== null) { + retryTime = suspenseState.retryTime; + } + + retryTimedOutBoundary(boundaryFiber, retryTime); + } + function resolveRetryThenable(boundaryFiber, thenable) { + var retryTime = NoWork; // Default + + var retryCache; + + if (enableSuspenseServerRenderer) { + switch (boundaryFiber.tag) { + case SuspenseComponent: + retryCache = boundaryFiber.stateNode; + var suspenseState = boundaryFiber.memoizedState; + + if (suspenseState !== null) { + retryTime = suspenseState.retryTime; + } + + break; + + case SuspenseListComponent: + retryCache = boundaryFiber.stateNode; + break; + + default: { + { + throw Error('Pinged unknown suspense boundary type. This is probably a bug in React.'); + } + } + } + } else { + retryCache = boundaryFiber.stateNode; + } + + if (retryCache !== null) { + // The thenable resolved, so we no longer need to memoize, because it will + // never be thrown again. + retryCache.delete(thenable); + } + + retryTimedOutBoundary(boundaryFiber, retryTime); + } // Computes the next Just Noticeable Difference (JND) boundary. + // The theory is that a person can't tell the difference between small differences in time. + // Therefore, if we wait a bit longer than necessary that won't translate to a noticeable + // difference in the experience. However, waiting for longer might mean that we can avoid + // showing an intermediate loading state. The longer we have already waited, the harder it + // is to tell small differences in time. Therefore, the longer we've already waited, + // the longer we can wait additionally. At some point we have to give up though. + // We pick a train model where the next boundary commits at a consistent schedule. + // These particular numbers are vague estimates. We expect to adjust them based on research. + + function jnd(timeElapsed) { + return timeElapsed < 120 + ? 120 + : timeElapsed < 480 + ? 480 + : timeElapsed < 1080 + ? 1080 + : timeElapsed < 1920 + ? 1920 + : timeElapsed < 3000 + ? 3000 + : timeElapsed < 4320 + ? 4320 + : ceil(timeElapsed / 1960) * 1960; + } + + function computeMsUntilSuspenseLoadingDelay( + mostRecentEventTime, + committedExpirationTime, + suspenseConfig, + ) { + var busyMinDurationMs = suspenseConfig.busyMinDurationMs | 0; + + if (busyMinDurationMs <= 0) { + return 0; + } + + var busyDelayMs = suspenseConfig.busyDelayMs | 0; // Compute the time until this render pass would expire. + + var currentTimeMs = now(); + var eventTimeMs = inferTimeFromExpirationTimeWithSuspenseConfig( + mostRecentEventTime, + suspenseConfig, + ); + var timeElapsed = currentTimeMs - eventTimeMs; + + if (timeElapsed <= busyDelayMs) { + // If we haven't yet waited longer than the initial delay, we don't + // have to wait any additional time. + return 0; + } + + var msUntilTimeout = busyDelayMs + busyMinDurationMs - timeElapsed; // This is the value that is passed to `setTimeout`. + + return msUntilTimeout; + } + + function checkForNestedUpdates() { + if (nestedUpdateCount > NESTED_UPDATE_LIMIT) { + nestedUpdateCount = 0; + rootWithNestedUpdates = null; + + { + { + throw Error( + 'Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.', + ); + } + } + } + + { + if (nestedPassiveUpdateCount > NESTED_PASSIVE_UPDATE_LIMIT) { + nestedPassiveUpdateCount = 0; + warning$1( + false, + 'Maximum update depth exceeded. This can happen when a component ' + + "calls setState inside useEffect, but useEffect either doesn't " + + 'have a dependency array, or one of the dependencies changes on ' + + 'every render.', + ); + } + } + } + + function flushRenderPhaseStrictModeWarningsInDEV() { + { + ReactStrictModeWarnings.flushLegacyContextWarning(); + + if (warnAboutDeprecatedLifecycles) { + ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings(); + } + } + } + + function stopFinishedWorkLoopTimer() { + var didCompleteRoot = true; + stopWorkLoopTimer(interruptedBy, didCompleteRoot); + interruptedBy = null; + } + + function stopInterruptedWorkLoopTimer() { + // TODO: Track which fiber caused the interruption. + var didCompleteRoot = false; + stopWorkLoopTimer(interruptedBy, didCompleteRoot); + interruptedBy = null; + } + + function checkForInterruption(fiberThatReceivedUpdate, updateExpirationTime) { + if ( + enableUserTimingAPI && + workInProgressRoot !== null && + updateExpirationTime > renderExpirationTime + ) { + interruptedBy = fiberThatReceivedUpdate; + } + } + + var didWarnStateUpdateForUnmountedComponent = null; + + function warnAboutUpdateOnUnmountedFiberInDEV(fiber) { + { + var tag = fiber.tag; + + if ( + tag !== HostRoot && + tag !== ClassComponent && + tag !== FunctionComponent && + tag !== ForwardRef && + tag !== MemoComponent && + tag !== SimpleMemoComponent + ) { + // Only warn for user-defined components, not internal ones like Suspense. + return; + } // We show the whole stack but dedupe on the top component's name because + // the problematic code almost always lies inside that component. + + var componentName = getComponentName(fiber.type) || 'ReactComponent'; + + if (didWarnStateUpdateForUnmountedComponent !== null) { + if (didWarnStateUpdateForUnmountedComponent.has(componentName)) { + return; + } + + didWarnStateUpdateForUnmountedComponent.add(componentName); + } else { + didWarnStateUpdateForUnmountedComponent = new Set([componentName]); + } + + warningWithoutStack$1( + false, + "Can't perform a React state update on an unmounted component. This " + + 'is a no-op, but it indicates a memory leak in your application. To ' + + 'fix, cancel all subscriptions and asynchronous tasks in %s.%s', + tag === ClassComponent ? 'the componentWillUnmount method' : 'a useEffect cleanup function', + getStackByFiberInDevAndProd(fiber), + ); + } + } + + var beginWork$$1; + + if (true && replayFailedUnitOfWorkWithInvokeGuardedCallback) { + var dummyFiber = null; + + beginWork$$1 = function (current$$1, unitOfWork, expirationTime) { + // If a component throws an error, we replay it again in a synchronously + // dispatched event, so that the debugger will treat it as an uncaught + // error See ReactErrorUtils for more information. + // Before entering the begin phase, copy the work-in-progress onto a dummy + // fiber. If beginWork throws, we'll use this to reset the state. + var originalWorkInProgressCopy = assignFiberPropertiesInDEV(dummyFiber, unitOfWork); + + try { + return beginWork$1(current$$1, unitOfWork, expirationTime); + } catch (originalError) { + if ( + originalError !== null && + typeof originalError === 'object' && + typeof originalError.then === 'function' + ) { + // Don't replay promises. Treat everything else like an error. + throw originalError; + } // Keep this code in sync with handleError; any changes here must have + // corresponding changes there. + + resetContextDependencies(); + resetHooks(); // Don't reset current debug fiber, since we're about to work on the + // same fiber again. + // Unwind the failed stack frame + + unwindInterruptedWork(unitOfWork); // Restore the original properties of the fiber. + + assignFiberPropertiesInDEV(unitOfWork, originalWorkInProgressCopy); + + if (enableProfilerTimer && unitOfWork.mode & ProfileMode) { + // Reset the profiler timer. + startProfilerTimer(unitOfWork); + } // Run beginWork again. + + invokeGuardedCallback(null, beginWork$1, null, current$$1, unitOfWork, expirationTime); + + if (hasCaughtError()) { + var replayError = clearCaughtError(); // `invokeGuardedCallback` sometimes sets an expando `_suppressLogging`. + // Rethrow this error instead of the original one. + + throw replayError; + } else { + // This branch is reachable if the render phase is impure. + throw originalError; + } + } + }; + } else { + beginWork$$1 = beginWork$1; + } + + var didWarnAboutUpdateInRender = false; + var didWarnAboutUpdateInGetChildContext = false; + + function warnAboutInvalidUpdatesOnClassComponentsInDEV(fiber) { + { + if (fiber.tag === ClassComponent) { + switch (phase) { + case 'getChildContext': + if (didWarnAboutUpdateInGetChildContext) { + return; + } + + warningWithoutStack$1( + false, + 'setState(...): Cannot call setState() inside getChildContext()', + ); + didWarnAboutUpdateInGetChildContext = true; + break; + + case 'render': + if (didWarnAboutUpdateInRender) { + return; + } + + warningWithoutStack$1( + false, + 'Cannot update during an existing state transition (such as ' + + 'within `render`). Render methods should be a pure function of ' + + 'props and state.', + ); + didWarnAboutUpdateInRender = true; + break; + } + } + } + } // a 'shared' variable that changes when act() opens/closes in tests. + + var IsThisRendererActing = { + current: false, + }; + function warnIfNotScopedWithMatchingAct(fiber) { + { + if ( + warnsIfNotActing === true && + IsSomeRendererActing.current === true && + IsThisRendererActing.current !== true + ) { + warningWithoutStack$1( + false, + "It looks like you're using the wrong act() around your test interactions.\n" + + 'Be sure to use the matching version of act() corresponding to your renderer:\n\n' + + '// for react-dom:\n' + + "import {act} from 'react-dom/test-utils';\n" + + '// ...\n' + + 'act(() => ...);\n\n' + + '// for react-test-renderer:\n' + + "import TestRenderer from 'react-test-renderer';\n" + + 'const {act} = TestRenderer;\n' + + '// ...\n' + + 'act(() => ...);' + + '%s', + getStackByFiberInDevAndProd(fiber), + ); + } + } + } + function warnIfNotCurrentlyActingEffectsInDEV(fiber) { + { + if ( + warnsIfNotActing === true && + (fiber.mode & StrictMode) !== NoMode && + IsSomeRendererActing.current === false && + IsThisRendererActing.current === false + ) { + warningWithoutStack$1( + false, + 'An update to %s ran an effect, but was not wrapped in act(...).\n\n' + + 'When testing, code that causes React state updates should be ' + + 'wrapped into act(...):\n\n' + + 'act(() => {\n' + + ' /* fire events that update state */\n' + + '});\n' + + '/* assert on the output */\n\n' + + "This ensures that you're testing the behavior the user would see " + + 'in the browser.' + + ' Learn more at https://fb.me/react-wrap-tests-with-act' + + '%s', + getComponentName(fiber.type), + getStackByFiberInDevAndProd(fiber), + ); + } + } + } + + function warnIfNotCurrentlyActingUpdatesInDEV(fiber) { + { + if ( + warnsIfNotActing === true && + executionContext === NoContext && + IsSomeRendererActing.current === false && + IsThisRendererActing.current === false + ) { + warningWithoutStack$1( + false, + 'An update to %s inside a test was not wrapped in act(...).\n\n' + + 'When testing, code that causes React state updates should be ' + + 'wrapped into act(...):\n\n' + + 'act(() => {\n' + + ' /* fire events that update state */\n' + + '});\n' + + '/* assert on the output */\n\n' + + "This ensures that you're testing the behavior the user would see " + + 'in the browser.' + + ' Learn more at https://fb.me/react-wrap-tests-with-act' + + '%s', + getComponentName(fiber.type), + getStackByFiberInDevAndProd(fiber), + ); + } + } + } + + var warnIfNotCurrentlyActingUpdatesInDev = warnIfNotCurrentlyActingUpdatesInDEV; // In tests, we want to enforce a mocked scheduler. + + var didWarnAboutUnmockedScheduler = false; // TODO Before we release concurrent mode, revisit this and decide whether a mocked + // scheduler is the actual recommendation. The alternative could be a testing build, + // a new lib, or whatever; we dunno just yet. This message is for early adopters + // to get their tests right. + + function warnIfUnmockedScheduler(fiber) { + { + if ( + didWarnAboutUnmockedScheduler === false && + Scheduler.unstable_flushAllWithoutAsserting === undefined + ) { + if (fiber.mode & BlockingMode || fiber.mode & ConcurrentMode) { + didWarnAboutUnmockedScheduler = true; + warningWithoutStack$1( + false, + 'In Concurrent or Sync modes, the "scheduler" module needs to be mocked ' + + 'to guarantee consistent behaviour across tests and browsers. ' + + 'For example, with jest: \n' + + "jest.mock('scheduler', () => require('scheduler/unstable_mock'));\n\n" + + 'For more info, visit https://fb.me/react-mock-scheduler', + ); + } else if (warnAboutUnmockedScheduler === true) { + didWarnAboutUnmockedScheduler = true; + warningWithoutStack$1( + false, + 'Starting from React v17, the "scheduler" module will need to be mocked ' + + 'to guarantee consistent behaviour across tests and browsers. ' + + 'For example, with jest: \n' + + "jest.mock('scheduler', () => require('scheduler/unstable_mock'));\n\n" + + 'For more info, visit https://fb.me/react-mock-scheduler', + ); + } + } + } + } + var componentsThatTriggeredHighPriSuspend = null; + function checkForWrongSuspensePriorityInDEV(sourceFiber) { + { + var currentPriorityLevel = getCurrentPriorityLevel(); + + if ( + (sourceFiber.mode & ConcurrentMode) !== NoEffect && + (currentPriorityLevel === UserBlockingPriority$2 || + currentPriorityLevel === ImmediatePriority) + ) { + var workInProgressNode = sourceFiber; + + while (workInProgressNode !== null) { + // Add the component that triggered the suspense + var current$$1 = workInProgressNode.alternate; + + if (current$$1 !== null) { + // TODO: warn component that triggers the high priority + // suspend is the HostRoot + switch (workInProgressNode.tag) { + case ClassComponent: + // Loop through the component's update queue and see whether the component + // has triggered any high priority updates + var updateQueue = current$$1.updateQueue; + + if (updateQueue !== null) { + var update = updateQueue.firstUpdate; + + while (update !== null) { + var priorityLevel = update.priority; + + if ( + priorityLevel === UserBlockingPriority$2 || + priorityLevel === ImmediatePriority + ) { + if (componentsThatTriggeredHighPriSuspend === null) { + componentsThatTriggeredHighPriSuspend = new Set([ + getComponentName(workInProgressNode.type), + ]); + } else { + componentsThatTriggeredHighPriSuspend.add( + getComponentName(workInProgressNode.type), + ); + } + + break; + } + + update = update.next; + } + } + + break; + + case FunctionComponent: + case ForwardRef: + case SimpleMemoComponent: + if ( + workInProgressNode.memoizedState !== null && + workInProgressNode.memoizedState.baseUpdate !== null + ) { + var _update = workInProgressNode.memoizedState.baseUpdate; // Loop through the functional component's memoized state to see whether + // the component has triggered any high pri updates + + while (_update !== null) { + var priority = _update.priority; + + if (priority === UserBlockingPriority$2 || priority === ImmediatePriority) { + if (componentsThatTriggeredHighPriSuspend === null) { + componentsThatTriggeredHighPriSuspend = new Set([ + getComponentName(workInProgressNode.type), + ]); + } else { + componentsThatTriggeredHighPriSuspend.add( + getComponentName(workInProgressNode.type), + ); + } + + break; + } + + if (_update.next === workInProgressNode.memoizedState.baseUpdate) { + break; + } + + _update = _update.next; + } + } + + break; + + default: + break; + } + } + + workInProgressNode = workInProgressNode.return; + } + } + } + } + + function flushSuspensePriorityWarningInDEV() { + { + if (componentsThatTriggeredHighPriSuspend !== null) { + var componentNames = []; + componentsThatTriggeredHighPriSuspend.forEach(function (name) { + return componentNames.push(name); + }); + componentsThatTriggeredHighPriSuspend = null; + + if (componentNames.length > 0) { + warningWithoutStack$1( + false, + '%s triggered a user-blocking update that suspended.' + + '\n\n' + + 'The fix is to split the update into multiple parts: a user-blocking ' + + 'update to provide immediate feedback, and another update that ' + + 'triggers the bulk of the changes.' + + '\n\n' + + 'Refer to the documentation for useTransition to learn how ' + + 'to implement this pattern.', // TODO: Add link to React docs with more information, once it exists + componentNames.sort().join(', '), + ); + } + } + } + } + + function computeThreadID(root, expirationTime) { + // Interaction threads are unique per root and expiration time. + return expirationTime * 1000 + root.interactionThreadID; + } + + function markSpawnedWork(expirationTime) { + if (!enableSchedulerTracing) { + return; + } + + if (spawnedWorkDuringRender === null) { + spawnedWorkDuringRender = [expirationTime]; + } else { + spawnedWorkDuringRender.push(expirationTime); + } + } + + function scheduleInteractions(root, expirationTime, interactions) { + if (!enableSchedulerTracing) { + return; + } + + if (interactions.size > 0) { + var pendingInteractionMap = root.pendingInteractionMap; + var pendingInteractions = pendingInteractionMap.get(expirationTime); + + if (pendingInteractions != null) { + interactions.forEach(function (interaction) { + if (!pendingInteractions.has(interaction)) { + // Update the pending async work count for previously unscheduled interaction. + interaction.__count++; + } + + pendingInteractions.add(interaction); + }); + } else { + pendingInteractionMap.set(expirationTime, new Set(interactions)); // Update the pending async work count for the current interactions. + + interactions.forEach(function (interaction) { + interaction.__count++; + }); + } + + var subscriber = tracing.__subscriberRef.current; + + if (subscriber !== null) { + var threadID = computeThreadID(root, expirationTime); + subscriber.onWorkScheduled(interactions, threadID); + } + } + } + + function schedulePendingInteractions(root, expirationTime) { + // This is called when work is scheduled on a root. + // It associates the current interactions with the newly-scheduled expiration. + // They will be restored when that expiration is later committed. + if (!enableSchedulerTracing) { + return; + } + + scheduleInteractions(root, expirationTime, tracing.__interactionsRef.current); + } + + function startWorkOnPendingInteractions(root, expirationTime) { + // This is called when new work is started on a root. + if (!enableSchedulerTracing) { + return; + } // Determine which interactions this batch of work currently includes, So that + // we can accurately attribute time spent working on it, And so that cascading + // work triggered during the render phase will be associated with it. + + var interactions = new Set(); + root.pendingInteractionMap.forEach(function (scheduledInteractions, scheduledExpirationTime) { + if (scheduledExpirationTime >= expirationTime) { + scheduledInteractions.forEach(function (interaction) { + return interactions.add(interaction); + }); + } + }); // Store the current set of interactions on the FiberRoot for a few reasons: + // We can re-use it in hot functions like performConcurrentWorkOnRoot() + // without having to recalculate it. We will also use it in commitWork() to + // pass to any Profiler onRender() hooks. This also provides DevTools with a + // way to access it when the onCommitRoot() hook is called. + + root.memoizedInteractions = interactions; + + if (interactions.size > 0) { + var subscriber = tracing.__subscriberRef.current; + + if (subscriber !== null) { + var threadID = computeThreadID(root, expirationTime); + + try { + subscriber.onWorkStarted(interactions, threadID); + } catch (error) { + // If the subscriber throws, rethrow it in a separate task + scheduleCallback(ImmediatePriority, function () { + throw error; + }); + } + } + } + } + + function finishPendingInteractions(root, committedExpirationTime) { + if (!enableSchedulerTracing) { + return; + } + + var earliestRemainingTimeAfterCommit = root.firstPendingTime; + var subscriber; + + try { + subscriber = tracing.__subscriberRef.current; + + if (subscriber !== null && root.memoizedInteractions.size > 0) { + var threadID = computeThreadID(root, committedExpirationTime); + subscriber.onWorkStopped(root.memoizedInteractions, threadID); + } + } catch (error) { + // If the subscriber throws, rethrow it in a separate task + scheduleCallback(ImmediatePriority, function () { + throw error; + }); + } finally { + // Clear completed interactions from the pending Map. + // Unless the render was suspended or cascading work was scheduled, + // In which case– leave pending interactions until the subsequent render. + var pendingInteractionMap = root.pendingInteractionMap; + pendingInteractionMap.forEach(function (scheduledInteractions, scheduledExpirationTime) { + // Only decrement the pending interaction count if we're done. + // If there's still work at the current priority, + // That indicates that we are waiting for suspense data. + if (scheduledExpirationTime > earliestRemainingTimeAfterCommit) { + pendingInteractionMap.delete(scheduledExpirationTime); + scheduledInteractions.forEach(function (interaction) { + interaction.__count--; + + if (subscriber !== null && interaction.__count === 0) { + try { + subscriber.onInteractionScheduledWorkCompleted(interaction); + } catch (error) { + // If the subscriber throws, rethrow it in a separate task + scheduleCallback(ImmediatePriority, function () { + throw error; + }); + } + } + }); + } + }); + } + } + + var onCommitFiberRoot = null; + var onCommitFiberUnmount = null; + var hasLoggedError = false; + var isDevToolsPresent = typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined'; + function injectInternals(internals) { + if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined') { + // No DevTools + return false; + } + + var hook = __REACT_DEVTOOLS_GLOBAL_HOOK__; + + if (hook.isDisabled) { + // This isn't a real property on the hook, but it can be set to opt out + // of DevTools integration and associated warnings and logs. + // https://github.com/facebook/react/issues/3877 + return true; + } + + if (!hook.supportsFiber) { + { + warningWithoutStack$1( + false, + 'The installed version of React DevTools is too old and will not work ' + + 'with the current version of React. Please update React DevTools. ' + + 'https://fb.me/react-devtools', + ); + } // DevTools exists, even though it doesn't support Fiber. + + return true; + } + + try { + var rendererID = hook.inject(internals); // We have successfully injected, so now it is safe to set up hooks. + + onCommitFiberRoot = function (root, expirationTime) { + try { + var didError = (root.current.effectTag & DidCapture) === DidCapture; + + if (enableProfilerTimer) { + var currentTime = getCurrentTime(); + var priorityLevel = inferPriorityFromExpirationTime(currentTime, expirationTime); + hook.onCommitFiberRoot(rendererID, root, priorityLevel, didError); + } else { + hook.onCommitFiberRoot(rendererID, root, undefined, didError); + } + } catch (err) { + if (true && !hasLoggedError) { + hasLoggedError = true; + warningWithoutStack$1(false, 'React DevTools encountered an error: %s', err); + } + } + }; + + onCommitFiberUnmount = function (fiber) { + try { + hook.onCommitFiberUnmount(rendererID, fiber); + } catch (err) { + if (true && !hasLoggedError) { + hasLoggedError = true; + warningWithoutStack$1(false, 'React DevTools encountered an error: %s', err); + } + } + }; + } catch (err) { + // Catch all errors because it is unsafe to throw during initialization. + { + warningWithoutStack$1(false, 'React DevTools encountered an error: %s.', err); + } + } // DevTools exists + + return true; + } + function onCommitRoot(root, expirationTime) { + if (typeof onCommitFiberRoot === 'function') { + onCommitFiberRoot(root, expirationTime); + } + } + function onCommitUnmount(fiber) { + if (typeof onCommitFiberUnmount === 'function') { + onCommitFiberUnmount(fiber); + } + } + + var hasBadMapPolyfill; + + { + hasBadMapPolyfill = false; + + try { + var nonExtensibleObject = Object.preventExtensions({}); + var testMap = new Map([[nonExtensibleObject, null]]); + var testSet = new Set([nonExtensibleObject]); // This is necessary for Rollup to not consider these unused. + // https://github.com/rollup/rollup/issues/1771 + // TODO: we can remove these if Rollup fixes the bug. + + testMap.set(0, 0); + testSet.add(0); + } catch (e) { + // TODO: Consider warning about bad polyfills + hasBadMapPolyfill = true; + } + } + + var debugCounter = 1; + + function FiberNode(tag, pendingProps, key, mode) { + // Instance + this.tag = tag; + this.key = key; + this.elementType = null; + this.type = null; + this.stateNode = null; // Fiber + + this.return = null; + this.child = null; + this.sibling = null; + this.index = 0; + this.ref = null; + this.pendingProps = pendingProps; + this.memoizedProps = null; + this.updateQueue = null; + this.memoizedState = null; + this.dependencies = null; + this.mode = mode; // Effects + + this.effectTag = NoEffect; + this.nextEffect = null; + this.firstEffect = null; + this.lastEffect = null; + this.expirationTime = NoWork; + this.childExpirationTime = NoWork; + this.alternate = null; + + if (enableProfilerTimer) { + // Note: The following is done to avoid a v8 performance cliff. + // + // Initializing the fields below to smis and later updating them with + // double values will cause Fibers to end up having separate shapes. + // This behavior/bug has something to do with Object.preventExtension(). + // Fortunately this only impacts DEV builds. + // Unfortunately it makes React unusably slow for some applications. + // To work around this, initialize the fields below with doubles. + // + // Learn more about this here: + // https://github.com/facebook/react/issues/14365 + // https://bugs.chromium.org/p/v8/issues/detail?id=8538 + this.actualDuration = Number.NaN; + this.actualStartTime = Number.NaN; + this.selfBaseDuration = Number.NaN; + this.treeBaseDuration = Number.NaN; // It's okay to replace the initial doubles with smis after initialization. + // This won't trigger the performance cliff mentioned above, + // and it simplifies other profiler code (including DevTools). + + this.actualDuration = 0; + this.actualStartTime = -1; + this.selfBaseDuration = 0; + this.treeBaseDuration = 0; + } // This is normally DEV-only except www when it adds listeners. + // TODO: remove the User Timing integration in favor of Root Events. + + if (enableUserTimingAPI) { + this._debugID = debugCounter++; + this._debugIsCurrentlyTiming = false; + } + + { + this._debugSource = null; + this._debugOwner = null; + this._debugNeedsRemount = false; + this._debugHookTypes = null; + + if (!hasBadMapPolyfill && typeof Object.preventExtensions === 'function') { + Object.preventExtensions(this); + } + } + } // This is a constructor function, rather than a POJO constructor, still + // please ensure we do the following: + // 1) Nobody should add any instance methods on this. Instance methods can be + // more difficult to predict when they get optimized and they are almost + // never inlined properly in static compilers. + // 2) Nobody should rely on `instanceof Fiber` for type testing. We should + // always know when it is a fiber. + // 3) We might want to experiment with using numeric keys since they are easier + // to optimize in a non-JIT environment. + // 4) We can easily go from a constructor to a createFiber object literal if that + // is faster. + // 5) It should be easy to port this to a C struct and keep a C implementation + // compatible. + + var createFiber = function (tag, pendingProps, key, mode) { + // $FlowFixMe: the shapes are exact here but Flow doesn't like constructors + return new FiberNode(tag, pendingProps, key, mode); + }; + + function shouldConstruct(Component) { + var prototype = Component.prototype; + return !!(prototype && prototype.isReactComponent); + } + + function isSimpleFunctionComponent(type) { + return typeof type === 'function' && !shouldConstruct(type) && type.defaultProps === undefined; + } + function resolveLazyComponentTag(Component) { + if (typeof Component === 'function') { + return shouldConstruct(Component) ? ClassComponent : FunctionComponent; + } else if (Component !== undefined && Component !== null) { + var $$typeof = Component.$$typeof; + + if ($$typeof === REACT_FORWARD_REF_TYPE) { + return ForwardRef; + } + + if ($$typeof === REACT_MEMO_TYPE) { + return MemoComponent; + } + } + + return IndeterminateComponent; + } // This is used to create an alternate fiber to do work on. + + function createWorkInProgress(current, pendingProps, expirationTime) { + var workInProgress = current.alternate; + + if (workInProgress === null) { + // We use a double buffering pooling technique because we know that we'll + // only ever need at most two versions of a tree. We pool the "other" unused + // node that we're free to reuse. This is lazily created to avoid allocating + // extra objects for things that are never updated. It also allow us to + // reclaim the extra memory if needed. + workInProgress = createFiber(current.tag, pendingProps, current.key, current.mode); + workInProgress.elementType = current.elementType; + workInProgress.type = current.type; + workInProgress.stateNode = current.stateNode; + + { + // DEV-only fields + workInProgress._debugID = current._debugID; + workInProgress._debugSource = current._debugSource; + workInProgress._debugOwner = current._debugOwner; + workInProgress._debugHookTypes = current._debugHookTypes; + } + + workInProgress.alternate = current; + current.alternate = workInProgress; + } else { + workInProgress.pendingProps = pendingProps; // We already have an alternate. + // Reset the effect tag. + + workInProgress.effectTag = NoEffect; // The effect list is no longer valid. + + workInProgress.nextEffect = null; + workInProgress.firstEffect = null; + workInProgress.lastEffect = null; + + if (enableProfilerTimer) { + // We intentionally reset, rather than copy, actualDuration & actualStartTime. + // This prevents time from endlessly accumulating in new commits. + // This has the downside of resetting values for different priority renders, + // But works for yielding (the common case) and should support resuming. + workInProgress.actualDuration = 0; + workInProgress.actualStartTime = -1; + } + } + + workInProgress.childExpirationTime = current.childExpirationTime; + workInProgress.expirationTime = current.expirationTime; + workInProgress.child = current.child; + workInProgress.memoizedProps = current.memoizedProps; + workInProgress.memoizedState = current.memoizedState; + workInProgress.updateQueue = current.updateQueue; // Clone the dependencies object. This is mutated during the render phase, so + // it cannot be shared with the current fiber. + + var currentDependencies = current.dependencies; + workInProgress.dependencies = + currentDependencies === null + ? null + : { + expirationTime: currentDependencies.expirationTime, + firstContext: currentDependencies.firstContext, + responders: currentDependencies.responders, + }; // These will be overridden during the parent's reconciliation + + workInProgress.sibling = current.sibling; + workInProgress.index = current.index; + workInProgress.ref = current.ref; + + if (enableProfilerTimer) { + workInProgress.selfBaseDuration = current.selfBaseDuration; + workInProgress.treeBaseDuration = current.treeBaseDuration; + } + + { + workInProgress._debugNeedsRemount = current._debugNeedsRemount; + + switch (workInProgress.tag) { + case IndeterminateComponent: + case FunctionComponent: + case SimpleMemoComponent: + workInProgress.type = resolveFunctionForHotReloading(current.type); + break; + + case ClassComponent: + workInProgress.type = resolveClassForHotReloading(current.type); + break; + + case ForwardRef: + workInProgress.type = resolveForwardRefForHotReloading(current.type); + break; + + default: + break; + } + } + + return workInProgress; + } // Used to reuse a Fiber for a second pass. + + function resetWorkInProgress(workInProgress, renderExpirationTime) { + // This resets the Fiber to what createFiber or createWorkInProgress would + // have set the values to before during the first pass. Ideally this wouldn't + // be necessary but unfortunately many code paths reads from the workInProgress + // when they should be reading from current and writing to workInProgress. + // We assume pendingProps, index, key, ref, return are still untouched to + // avoid doing another reconciliation. + // Reset the effect tag but keep any Placement tags, since that's something + // that child fiber is setting, not the reconciliation. + workInProgress.effectTag &= Placement; // The effect list is no longer valid. + + workInProgress.nextEffect = null; + workInProgress.firstEffect = null; + workInProgress.lastEffect = null; + var current = workInProgress.alternate; + + if (current === null) { + // Reset to createFiber's initial values. + workInProgress.childExpirationTime = NoWork; + workInProgress.expirationTime = renderExpirationTime; + workInProgress.child = null; + workInProgress.memoizedProps = null; + workInProgress.memoizedState = null; + workInProgress.updateQueue = null; + workInProgress.dependencies = null; + + if (enableProfilerTimer) { + // Note: We don't reset the actualTime counts. It's useful to accumulate + // actual time across multiple render passes. + workInProgress.selfBaseDuration = 0; + workInProgress.treeBaseDuration = 0; + } + } else { + // Reset to the cloned values that createWorkInProgress would've. + workInProgress.childExpirationTime = current.childExpirationTime; + workInProgress.expirationTime = current.expirationTime; + workInProgress.child = current.child; + workInProgress.memoizedProps = current.memoizedProps; + workInProgress.memoizedState = current.memoizedState; + workInProgress.updateQueue = current.updateQueue; // Clone the dependencies object. This is mutated during the render phase, so + // it cannot be shared with the current fiber. + + var currentDependencies = current.dependencies; + workInProgress.dependencies = + currentDependencies === null + ? null + : { + expirationTime: currentDependencies.expirationTime, + firstContext: currentDependencies.firstContext, + responders: currentDependencies.responders, + }; + + if (enableProfilerTimer) { + // Note: We don't reset the actualTime counts. It's useful to accumulate + // actual time across multiple render passes. + workInProgress.selfBaseDuration = current.selfBaseDuration; + workInProgress.treeBaseDuration = current.treeBaseDuration; + } + } + + return workInProgress; + } + function createHostRootFiber(tag) { + var mode; + + if (tag === ConcurrentRoot) { + mode = ConcurrentMode | BlockingMode | StrictMode; + } else if (tag === BlockingRoot) { + mode = BlockingMode | StrictMode; + } else { + mode = NoMode; + } + + if (enableProfilerTimer && isDevToolsPresent) { + // Always collect profile timings when DevTools are present. + // This enables DevTools to start capturing timing at any point– + // Without some nodes in the tree having empty base times. + mode |= ProfileMode; + } + + return createFiber(HostRoot, null, null, mode); + } + function createFiberFromTypeAndProps( + type, // React$ElementType + key, + pendingProps, + owner, + mode, + expirationTime, + ) { + var fiber; + var fiberTag = IndeterminateComponent; // The resolved type is set if we know what the final type will be. I.e. it's not lazy. + + var resolvedType = type; + + if (typeof type === 'function') { + if (shouldConstruct(type)) { + fiberTag = ClassComponent; + + { + resolvedType = resolveClassForHotReloading(resolvedType); + } + } else { + { + resolvedType = resolveFunctionForHotReloading(resolvedType); + } + } + } else if (typeof type === 'string') { + fiberTag = HostComponent; + } else { + getTag: switch (type) { + case REACT_FRAGMENT_TYPE: + return createFiberFromFragment(pendingProps.children, mode, expirationTime, key); + + case REACT_CONCURRENT_MODE_TYPE: + fiberTag = Mode; + mode |= ConcurrentMode | BlockingMode | StrictMode; + break; + + case REACT_STRICT_MODE_TYPE: + fiberTag = Mode; + mode |= StrictMode; + break; + + case REACT_PROFILER_TYPE: + return createFiberFromProfiler(pendingProps, mode, expirationTime, key); + + case REACT_SUSPENSE_TYPE: + return createFiberFromSuspense(pendingProps, mode, expirationTime, key); + + case REACT_SUSPENSE_LIST_TYPE: + return createFiberFromSuspenseList(pendingProps, mode, expirationTime, key); + + default: { + if (typeof type === 'object' && type !== null) { + switch (type.$$typeof) { + case REACT_PROVIDER_TYPE: + fiberTag = ContextProvider; + break getTag; + + case REACT_CONTEXT_TYPE: + // This is a consumer + fiberTag = ContextConsumer; + break getTag; + + case REACT_FORWARD_REF_TYPE: + fiberTag = ForwardRef; + + { + resolvedType = resolveForwardRefForHotReloading(resolvedType); + } + + break getTag; + + case REACT_MEMO_TYPE: + fiberTag = MemoComponent; + break getTag; + + case REACT_LAZY_TYPE: + fiberTag = LazyComponent; + resolvedType = null; + break getTag; + + case REACT_FUNDAMENTAL_TYPE: + if (enableFundamentalAPI) { + return createFiberFromFundamental(type, pendingProps, mode, expirationTime, key); + } + + break; + + case REACT_SCOPE_TYPE: + if (enableScopeAPI) { + return createFiberFromScope(type, pendingProps, mode, expirationTime, key); + } + } + } + + var info = ''; + + { + if ( + type === undefined || + (typeof type === 'object' && type !== null && Object.keys(type).length === 0) + ) { + info += + ' You likely forgot to export your component from the file ' + + "it's defined in, or you might have mixed up default and " + + 'named imports.'; + } + + var ownerName = owner ? getComponentName(owner.type) : null; + + if (ownerName) { + info += '\n\nCheck the render method of `' + ownerName + '`.'; + } + } + + { + { + throw Error( + 'Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: ' + + (type == null ? type : typeof type) + + '.' + + info, + ); + } + } + } + } + } + + fiber = createFiber(fiberTag, pendingProps, key, mode); + fiber.elementType = type; + fiber.type = resolvedType; + fiber.expirationTime = expirationTime; + return fiber; + } + function createFiberFromElement(element, mode, expirationTime) { + var owner = null; + + { + owner = element._owner; + } + + var type = element.type; + var key = element.key; + var pendingProps = element.props; + var fiber = createFiberFromTypeAndProps(type, key, pendingProps, owner, mode, expirationTime); + + { + fiber._debugSource = element._source; + fiber._debugOwner = element._owner; + } + + return fiber; + } + function createFiberFromFragment(elements, mode, expirationTime, key) { + var fiber = createFiber(Fragment, elements, key, mode); + fiber.expirationTime = expirationTime; + return fiber; + } + function createFiberFromFundamental(fundamentalComponent, pendingProps, mode, expirationTime, key) { + var fiber = createFiber(FundamentalComponent, pendingProps, key, mode); + fiber.elementType = fundamentalComponent; + fiber.type = fundamentalComponent; + fiber.expirationTime = expirationTime; + return fiber; + } + + function createFiberFromScope(scope, pendingProps, mode, expirationTime, key) { + var fiber = createFiber(ScopeComponent, pendingProps, key, mode); + fiber.type = scope; + fiber.elementType = scope; + fiber.expirationTime = expirationTime; + return fiber; + } + + function createFiberFromProfiler(pendingProps, mode, expirationTime, key) { + { + if (typeof pendingProps.id !== 'string' || typeof pendingProps.onRender !== 'function') { + warningWithoutStack$1( + false, + 'Profiler must specify an "id" string and "onRender" function as props', + ); + } + } + + var fiber = createFiber(Profiler, pendingProps, key, mode | ProfileMode); // TODO: The Profiler fiber shouldn't have a type. It has a tag. + + fiber.elementType = REACT_PROFILER_TYPE; + fiber.type = REACT_PROFILER_TYPE; + fiber.expirationTime = expirationTime; + return fiber; + } + + function createFiberFromSuspense(pendingProps, mode, expirationTime, key) { + var fiber = createFiber(SuspenseComponent, pendingProps, key, mode); // TODO: The SuspenseComponent fiber shouldn't have a type. It has a tag. + // This needs to be fixed in getComponentName so that it relies on the tag + // instead. + + fiber.type = REACT_SUSPENSE_TYPE; + fiber.elementType = REACT_SUSPENSE_TYPE; + fiber.expirationTime = expirationTime; + return fiber; + } + function createFiberFromSuspenseList(pendingProps, mode, expirationTime, key) { + var fiber = createFiber(SuspenseListComponent, pendingProps, key, mode); + + { + // TODO: The SuspenseListComponent fiber shouldn't have a type. It has a tag. + // This needs to be fixed in getComponentName so that it relies on the tag + // instead. + fiber.type = REACT_SUSPENSE_LIST_TYPE; + } + + fiber.elementType = REACT_SUSPENSE_LIST_TYPE; + fiber.expirationTime = expirationTime; + return fiber; + } + function createFiberFromText(content, mode, expirationTime) { + var fiber = createFiber(HostText, content, null, mode); + fiber.expirationTime = expirationTime; + return fiber; + } + function createFiberFromHostInstanceForDeletion() { + var fiber = createFiber(HostComponent, null, null, NoMode); // TODO: These should not need a type. + + fiber.elementType = 'DELETED'; + fiber.type = 'DELETED'; + return fiber; + } + function createFiberFromDehydratedFragment(dehydratedNode) { + var fiber = createFiber(DehydratedFragment, null, null, NoMode); + fiber.stateNode = dehydratedNode; + return fiber; + } + function createFiberFromPortal(portal, mode, expirationTime) { + var pendingProps = portal.children !== null ? portal.children : []; + var fiber = createFiber(HostPortal, pendingProps, portal.key, mode); + fiber.expirationTime = expirationTime; + fiber.stateNode = { + containerInfo: portal.containerInfo, + pendingChildren: null, + // Used by persistent updates + implementation: portal.implementation, + }; + return fiber; + } // Used for stashing WIP properties to replay failed work in DEV. + + function assignFiberPropertiesInDEV(target, source) { + if (target === null) { + // This Fiber's initial properties will always be overwritten. + // We only use a Fiber to ensure the same hidden class so DEV isn't slow. + target = createFiber(IndeterminateComponent, null, null, NoMode); + } // This is intentionally written as a list of all properties. + // We tried to use Object.assign() instead but this is called in + // the hottest path, and Object.assign() was too slow: + // https://github.com/facebook/react/issues/12502 + // This code is DEV-only so size is not a concern. + + target.tag = source.tag; + target.key = source.key; + target.elementType = source.elementType; + target.type = source.type; + target.stateNode = source.stateNode; + target.return = source.return; + target.child = source.child; + target.sibling = source.sibling; + target.index = source.index; + target.ref = source.ref; + target.pendingProps = source.pendingProps; + target.memoizedProps = source.memoizedProps; + target.updateQueue = source.updateQueue; + target.memoizedState = source.memoizedState; + target.dependencies = source.dependencies; + target.mode = source.mode; + target.effectTag = source.effectTag; + target.nextEffect = source.nextEffect; + target.firstEffect = source.firstEffect; + target.lastEffect = source.lastEffect; + target.expirationTime = source.expirationTime; + target.childExpirationTime = source.childExpirationTime; + target.alternate = source.alternate; + + if (enableProfilerTimer) { + target.actualDuration = source.actualDuration; + target.actualStartTime = source.actualStartTime; + target.selfBaseDuration = source.selfBaseDuration; + target.treeBaseDuration = source.treeBaseDuration; + } + + target._debugID = source._debugID; + target._debugSource = source._debugSource; + target._debugOwner = source._debugOwner; + target._debugIsCurrentlyTiming = source._debugIsCurrentlyTiming; + target._debugNeedsRemount = source._debugNeedsRemount; + target._debugHookTypes = source._debugHookTypes; + return target; + } + + function FiberRootNode(containerInfo, tag, hydrate) { + this.tag = tag; + this.current = null; + this.containerInfo = containerInfo; + this.pendingChildren = null; + this.pingCache = null; + this.finishedExpirationTime = NoWork; + this.finishedWork = null; + this.timeoutHandle = noTimeout; + this.context = null; + this.pendingContext = null; + this.hydrate = hydrate; + this.callbackNode = null; + this.callbackPriority = NoPriority; + this.firstPendingTime = NoWork; + this.firstSuspendedTime = NoWork; + this.lastSuspendedTime = NoWork; + this.nextKnownPendingLevel = NoWork; + this.lastPingedTime = NoWork; + this.lastExpiredTime = NoWork; + + if (enableSchedulerTracing) { + this.interactionThreadID = tracing.unstable_getThreadID(); + this.memoizedInteractions = new Set(); + this.pendingInteractionMap = new Map(); + } + + if (enableSuspenseCallback) { + this.hydrationCallbacks = null; + } + } + + function createFiberRoot(containerInfo, tag, hydrate, hydrationCallbacks) { + var root = new FiberRootNode(containerInfo, tag, hydrate); + + if (enableSuspenseCallback) { + root.hydrationCallbacks = hydrationCallbacks; + } // Cyclic construction. This cheats the type system right now because + // stateNode is any. + + var uninitializedFiber = createHostRootFiber(tag); + root.current = uninitializedFiber; + uninitializedFiber.stateNode = root; + return root; + } + function isRootSuspendedAtTime(root, expirationTime) { + var firstSuspendedTime = root.firstSuspendedTime; + var lastSuspendedTime = root.lastSuspendedTime; + return ( + firstSuspendedTime !== NoWork && + firstSuspendedTime >= expirationTime && + lastSuspendedTime <= expirationTime + ); + } + function markRootSuspendedAtTime(root, expirationTime) { + var firstSuspendedTime = root.firstSuspendedTime; + var lastSuspendedTime = root.lastSuspendedTime; + + if (firstSuspendedTime < expirationTime) { + root.firstSuspendedTime = expirationTime; + } + + if (lastSuspendedTime > expirationTime || firstSuspendedTime === NoWork) { + root.lastSuspendedTime = expirationTime; + } + + if (expirationTime <= root.lastPingedTime) { + root.lastPingedTime = NoWork; + } + + if (expirationTime <= root.lastExpiredTime) { + root.lastExpiredTime = NoWork; + } + } + function markRootUpdatedAtTime(root, expirationTime) { + // Update the range of pending times + var firstPendingTime = root.firstPendingTime; + + if (expirationTime > firstPendingTime) { + root.firstPendingTime = expirationTime; + } // Update the range of suspended times. Treat everything lower priority or + // equal to this update as unsuspended. + + var firstSuspendedTime = root.firstSuspendedTime; + + if (firstSuspendedTime !== NoWork) { + if (expirationTime >= firstSuspendedTime) { + // The entire suspended range is now unsuspended. + root.firstSuspendedTime = root.lastSuspendedTime = root.nextKnownPendingLevel = NoWork; + } else if (expirationTime >= root.lastSuspendedTime) { + root.lastSuspendedTime = expirationTime + 1; + } // This is a pending level. Check if it's higher priority than the next + // known pending level. + + if (expirationTime > root.nextKnownPendingLevel) { + root.nextKnownPendingLevel = expirationTime; + } + } + } + function markRootFinishedAtTime(root, finishedExpirationTime, remainingExpirationTime) { + // Update the range of pending times + root.firstPendingTime = remainingExpirationTime; // Update the range of suspended times. Treat everything higher priority or + // equal to this update as unsuspended. + + if (finishedExpirationTime <= root.lastSuspendedTime) { + // The entire suspended range is now unsuspended. + root.firstSuspendedTime = root.lastSuspendedTime = root.nextKnownPendingLevel = NoWork; + } else if (finishedExpirationTime <= root.firstSuspendedTime) { + // Part of the suspended range is now unsuspended. Narrow the range to + // include everything between the unsuspended time (non-inclusive) and the + // last suspended time. + root.firstSuspendedTime = finishedExpirationTime - 1; + } + + if (finishedExpirationTime <= root.lastPingedTime) { + // Clear the pinged time + root.lastPingedTime = NoWork; + } + + if (finishedExpirationTime <= root.lastExpiredTime) { + // Clear the expired time + root.lastExpiredTime = NoWork; + } + } + function markRootExpiredAtTime(root, expirationTime) { + var lastExpiredTime = root.lastExpiredTime; + + if (lastExpiredTime === NoWork || lastExpiredTime > expirationTime) { + root.lastExpiredTime = expirationTime; + } + } + + // This lets us hook into Fiber to debug what it's doing. + // See https://github.com/facebook/react/pull/8033. + // This is not part of the public API, not even for React DevTools. + // You may only inject a debugTool if you work on React Fiber itself. + var ReactFiberInstrumentation = { + debugTool: null, + }; + var ReactFiberInstrumentation_1 = ReactFiberInstrumentation; + + var didWarnAboutNestedUpdates; + var didWarnAboutFindNodeInStrictMode; + + { + didWarnAboutNestedUpdates = false; + didWarnAboutFindNodeInStrictMode = {}; + } + + function getContextForSubtree(parentComponent) { + if (!parentComponent) { + return emptyContextObject; + } + + var fiber = get(parentComponent); + var parentContext = findCurrentUnmaskedContext(fiber); + + if (fiber.tag === ClassComponent) { + var Component = fiber.type; + + if (isContextProvider(Component)) { + return processChildContext(fiber, Component, parentContext); + } + } + + return parentContext; + } + + function findHostInstance(component) { + var fiber = get(component); + + if (fiber === undefined) { + if (typeof component.render === 'function') { + { + { + throw Error('Unable to find node on an unmounted component.'); + } + } + } else { + { + { + throw Error( + 'Argument appears to not be a ReactComponent. Keys: ' + Object.keys(component), + ); + } + } + } + } + + var hostFiber = findCurrentHostFiber(fiber); + + if (hostFiber === null) { + return null; + } + + return hostFiber.stateNode; + } + + function findHostInstanceWithWarning(component, methodName) { + { + var fiber = get(component); + + if (fiber === undefined) { + if (typeof component.render === 'function') { + { + { + throw Error('Unable to find node on an unmounted component.'); + } + } + } else { + { + { + throw Error( + 'Argument appears to not be a ReactComponent. Keys: ' + Object.keys(component), + ); + } + } + } + } + + var hostFiber = findCurrentHostFiber(fiber); + + if (hostFiber === null) { + return null; + } + + if (hostFiber.mode & StrictMode) { + var componentName = getComponentName(fiber.type) || 'Component'; + + if (!didWarnAboutFindNodeInStrictMode[componentName]) { + didWarnAboutFindNodeInStrictMode[componentName] = true; + + if (fiber.mode & StrictMode) { + warningWithoutStack$1( + false, + '%s is deprecated in StrictMode. ' + + '%s was passed an instance of %s which is inside StrictMode. ' + + 'Instead, add a ref directly to the element you want to reference. ' + + 'Learn more about using refs safely here: ' + + 'https://fb.me/react-strict-mode-find-node%s', + methodName, + methodName, + componentName, + getStackByFiberInDevAndProd(hostFiber), + ); + } else { + warningWithoutStack$1( + false, + '%s is deprecated in StrictMode. ' + + '%s was passed an instance of %s which renders StrictMode children. ' + + 'Instead, add a ref directly to the element you want to reference. ' + + 'Learn more about using refs safely here: ' + + 'https://fb.me/react-strict-mode-find-node%s', + methodName, + methodName, + componentName, + getStackByFiberInDevAndProd(hostFiber), + ); + } + } + } + + return hostFiber.stateNode; + } + + return findHostInstance(component); + } + + function createContainer(containerInfo, tag, hydrate, hydrationCallbacks) { + return createFiberRoot(containerInfo, tag, hydrate, hydrationCallbacks); + } + function updateContainer(element, container, parentComponent, callback) { + var current$$1 = container.current; + var currentTime = requestCurrentTimeForUpdate(); + + { + // $FlowExpectedError - jest isn't a global, and isn't recognized outside of tests + if ('undefined' !== typeof jest) { + warnIfUnmockedScheduler(current$$1); + warnIfNotScopedWithMatchingAct(current$$1); + } + } + + var suspenseConfig = requestCurrentSuspenseConfig(); + var expirationTime = computeExpirationForFiber(currentTime, current$$1, suspenseConfig); + + { + if (ReactFiberInstrumentation_1.debugTool) { + if (current$$1.alternate === null) { + ReactFiberInstrumentation_1.debugTool.onMountContainer(container); + } else if (element === null) { + ReactFiberInstrumentation_1.debugTool.onUnmountContainer(container); + } else { + ReactFiberInstrumentation_1.debugTool.onUpdateContainer(container); + } + } + } + + var context = getContextForSubtree(parentComponent); + + if (container.context === null) { + container.context = context; + } else { + container.pendingContext = context; + } + + { + if (phase === 'render' && current !== null && !didWarnAboutNestedUpdates) { + didWarnAboutNestedUpdates = true; + warningWithoutStack$1( + false, + 'Render methods should be a pure function of props and state; ' + + 'triggering nested component updates from render is not allowed. ' + + 'If necessary, trigger nested updates in componentDidUpdate.\n\n' + + 'Check the render method of %s.', + getComponentName(current.type) || 'Unknown', + ); + } + } + + var update = createUpdate(expirationTime, suspenseConfig); // Caution: React DevTools currently depends on this property + // being called "element". + + update.payload = { + element: element, + }; + callback = callback === undefined ? null : callback; + + if (callback !== null) { + !(typeof callback === 'function') + ? warningWithoutStack$1( + false, + 'render(...): Expected the last optional `callback` argument to be a ' + + 'function. Instead received: %s.', + callback, + ) + : void 0; + update.callback = callback; + } + + enqueueUpdate(current$$1, update); + scheduleWork(current$$1, expirationTime); + return expirationTime; + } + function getPublicRootInstance(container) { + var containerFiber = container.current; + + if (!containerFiber.child) { + return null; + } + + switch (containerFiber.child.tag) { + case HostComponent: + return getPublicInstance(containerFiber.child.stateNode); + + default: + return containerFiber.child.stateNode; + } + } + function attemptSynchronousHydration$1(fiber) { + switch (fiber.tag) { + case HostRoot: + var root = fiber.stateNode; + + if (root.hydrate) { + // Flush the first scheduled "update". + flushRoot(root, root.firstPendingTime); + } + + break; + + case SuspenseComponent: + flushSync(function () { + return scheduleWork(fiber, Sync); + }); // If we're still blocked after this, we need to increase + // the priority of any promises resolving within this + // boundary so that they next attempt also has higher pri. + + var retryExpTime = computeInteractiveExpiration(requestCurrentTimeForUpdate()); + markRetryTimeIfNotHydrated(fiber, retryExpTime); + break; + } + } + + function markRetryTimeImpl(fiber, retryTime) { + var suspenseState = fiber.memoizedState; + + if (suspenseState !== null && suspenseState.dehydrated !== null) { + if (suspenseState.retryTime < retryTime) { + suspenseState.retryTime = retryTime; + } + } + } // Increases the priority of thennables when they resolve within this boundary. + + function markRetryTimeIfNotHydrated(fiber, retryTime) { + markRetryTimeImpl(fiber, retryTime); + var alternate = fiber.alternate; + + if (alternate) { + markRetryTimeImpl(alternate, retryTime); + } + } + + function attemptUserBlockingHydration$1(fiber) { + if (fiber.tag !== SuspenseComponent) { + // We ignore HostRoots here because we can't increase + // their priority and they should not suspend on I/O, + // since you have to wrap anything that might suspend in + // Suspense. + return; + } + + var expTime = computeInteractiveExpiration(requestCurrentTimeForUpdate()); + scheduleWork(fiber, expTime); + markRetryTimeIfNotHydrated(fiber, expTime); + } + function attemptContinuousHydration$1(fiber) { + if (fiber.tag !== SuspenseComponent) { + // We ignore HostRoots here because we can't increase + // their priority and they should not suspend on I/O, + // since you have to wrap anything that might suspend in + // Suspense. + return; + } + + var expTime = computeContinuousHydrationExpiration(requestCurrentTimeForUpdate()); + scheduleWork(fiber, expTime); + markRetryTimeIfNotHydrated(fiber, expTime); + } + function attemptHydrationAtCurrentPriority$1(fiber) { + if (fiber.tag !== SuspenseComponent) { + // We ignore HostRoots here because we can't increase + // their priority other than synchronously flush it. + return; + } + + var currentTime = requestCurrentTimeForUpdate(); + var expTime = computeExpirationForFiber(currentTime, fiber, null); + scheduleWork(fiber, expTime); + markRetryTimeIfNotHydrated(fiber, expTime); + } + function findHostInstanceWithNoPortals(fiber) { + var hostFiber = findCurrentHostFiberWithNoPortals(fiber); + + if (hostFiber === null) { + return null; + } + + if (hostFiber.tag === FundamentalComponent) { + return hostFiber.stateNode.instance; + } + + return hostFiber.stateNode; + } + + var shouldSuspendImpl = function (fiber) { + return false; + }; + + function shouldSuspend(fiber) { + return shouldSuspendImpl(fiber); + } + var overrideHookState = null; + var overrideProps = null; + var scheduleUpdate = null; + var setSuspenseHandler = null; + + { + var copyWithSetImpl = function (obj, path, idx, value) { + if (idx >= path.length) { + return value; + } + + var key = path[idx]; + var updated = Array.isArray(obj) ? obj.slice() : _assign({}, obj); // $FlowFixMe number or string is fine here + + updated[key] = copyWithSetImpl(obj[key], path, idx + 1, value); + return updated; + }; + + var copyWithSet = function (obj, path, value) { + return copyWithSetImpl(obj, path, 0, value); + }; // Support DevTools editable values for useState and useReducer. + + overrideHookState = function (fiber, id, path, value) { + // For now, the "id" of stateful hooks is just the stateful hook index. + // This may change in the future with e.g. nested hooks. + var currentHook = fiber.memoizedState; + + while (currentHook !== null && id > 0) { + currentHook = currentHook.next; + id--; + } + + if (currentHook !== null) { + var newState = copyWithSet(currentHook.memoizedState, path, value); + currentHook.memoizedState = newState; + currentHook.baseState = newState; // We aren't actually adding an update to the queue, + // because there is no update we can add for useReducer hooks that won't trigger an error. + // (There's no appropriate action type for DevTools overrides.) + // As a result though, React will see the scheduled update as a noop and bailout. + // Shallow cloning props works as a workaround for now to bypass the bailout check. + + fiber.memoizedProps = _assign({}, fiber.memoizedProps); + scheduleWork(fiber, Sync); + } + }; // Support DevTools props for function components, forwardRef, memo, host components, etc. + + overrideProps = function (fiber, path, value) { + fiber.pendingProps = copyWithSet(fiber.memoizedProps, path, value); + + if (fiber.alternate) { + fiber.alternate.pendingProps = fiber.pendingProps; + } + + scheduleWork(fiber, Sync); + }; + + scheduleUpdate = function (fiber) { + scheduleWork(fiber, Sync); + }; + + setSuspenseHandler = function (newShouldSuspendImpl) { + shouldSuspendImpl = newShouldSuspendImpl; + }; + } + + function injectIntoDevTools(devToolsConfig) { + var findFiberByHostInstance = devToolsConfig.findFiberByHostInstance; + var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher; + return injectInternals( + _assign({}, devToolsConfig, { + overrideHookState: overrideHookState, + overrideProps: overrideProps, + setSuspenseHandler: setSuspenseHandler, + scheduleUpdate: scheduleUpdate, + currentDispatcherRef: ReactCurrentDispatcher, + findHostInstanceByFiber: function (fiber) { + var hostFiber = findCurrentHostFiber(fiber); + + if (hostFiber === null) { + return null; + } + + return hostFiber.stateNode; + }, + findFiberByHostInstance: function (instance) { + if (!findFiberByHostInstance) { + // Might not be implemented by the renderer. + return null; + } + + return findFiberByHostInstance(instance); + }, + // React Refresh + findHostInstancesForRefresh: findHostInstancesForRefresh, + scheduleRefresh: scheduleRefresh, + scheduleRoot: scheduleRoot, + setRefreshHandler: setRefreshHandler, + // Enables DevTools to append owner stacks to error messages in DEV mode. + getCurrentFiber: function () { + return current; + }, + }), + ); + } + + // This file intentionally does *not* have the Flow annotation. + // Don't add it. See `./inline-typed.js` for an explanation. + + // TODO: This type is shared between the reconciler and ReactDOM, but will + // eventually be lifted out to the renderer. + function ReactDOMRoot(container, options) { + this._internalRoot = createRootImpl(container, ConcurrentRoot, options); + } + + function ReactDOMBlockingRoot(container, tag, options) { + this._internalRoot = createRootImpl(container, tag, options); + } + + ReactDOMRoot.prototype.render = ReactDOMBlockingRoot.prototype.render = function ( + children, + callback, + ) { + var root = this._internalRoot; + var cb = callback === undefined ? null : callback; + + { + warnOnInvalidCallback(cb, 'render'); + } + + updateContainer(children, root, null, cb); + }; + + ReactDOMRoot.prototype.unmount = ReactDOMBlockingRoot.prototype.unmount = function (callback) { + var root = this._internalRoot; + var cb = callback === undefined ? null : callback; + + { + warnOnInvalidCallback(cb, 'render'); + } + + var container = root.containerInfo; + updateContainer(null, root, null, function () { + unmarkContainerAsRoot(container); + + if (cb !== null) { + cb(); + } + }); + }; + + function createRootImpl(container, tag, options) { + // Tag is either LegacyRoot or Concurrent Root + var hydrate = options != null && options.hydrate === true; + var hydrationCallbacks = (options != null && options.hydrationOptions) || null; + var root = createContainer(container, tag, hydrate, hydrationCallbacks); + markContainerAsRoot(root.current, container); + + if (hydrate && tag !== LegacyRoot) { + var doc = container.nodeType === DOCUMENT_NODE ? container : container.ownerDocument; + eagerlyTrapReplayableEvents(doc); + } + + return root; + } + + function createRoot(container, options) { + if (!isValidContainer(container)) { + { + throw Error('createRoot(...): Target container is not a DOM element.'); + } + } + + warnIfReactDOMContainerInDEV(container); + return new ReactDOMRoot(container, options); + } + function createBlockingRoot(container, options) { + if (!isValidContainer(container)) { + { + throw Error('createRoot(...): Target container is not a DOM element.'); + } + } + + warnIfReactDOMContainerInDEV(container); + return new ReactDOMBlockingRoot(container, BlockingRoot, options); + } + function createLegacyRoot(container, options) { + return new ReactDOMBlockingRoot(container, LegacyRoot, options); + } + function isValidContainer(node) { + return !!( + node && + (node.nodeType === ELEMENT_NODE || + node.nodeType === DOCUMENT_NODE || + node.nodeType === DOCUMENT_FRAGMENT_NODE || + (node.nodeType === COMMENT_NODE && node.nodeValue === ' react-mount-point-unstable ')) + ); + } + function warnOnInvalidCallback(callback, callerName) { + { + !(callback === null || typeof callback === 'function') + ? warningWithoutStack$1( + false, + '%s(...): Expected the last optional `callback` argument to be a ' + + 'function. Instead received: %s.', + callerName, + callback, + ) + : void 0; + } + } + + function warnIfReactDOMContainerInDEV(container) { + { + if (isContainerMarkedAsRoot(container)) { + if (container._reactRootContainer) { + warningWithoutStack$1( + false, + 'You are calling ReactDOM.createRoot() on a container that was previously ' + + 'passed to ReactDOM.render(). This is not supported.', + ); + } else { + warningWithoutStack$1( + false, + 'You are calling ReactDOM.createRoot() on a container that ' + + 'has already been passed to createRoot() before. Instead, call ' + + 'root.render() on the existing root instead if you want to update it.', + ); + } + } + } + } + + var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner; + var topLevelUpdateWarnings; + var warnedAboutHydrateAPI = false; + + { + topLevelUpdateWarnings = function (container) { + if (container._reactRootContainer && container.nodeType !== COMMENT_NODE) { + var hostInstance = findHostInstanceWithNoPortals( + container._reactRootContainer._internalRoot.current, + ); + + if (hostInstance) { + !(hostInstance.parentNode === container) + ? warningWithoutStack$1( + false, + 'render(...): It looks like the React-rendered content of this ' + + 'container was removed without using React. This is not ' + + 'supported and will cause errors. Instead, call ' + + 'ReactDOM.unmountComponentAtNode to empty a container.', + ) + : void 0; + } + } + + var isRootRenderedBySomeReact = !!container._reactRootContainer; + var rootEl = getReactRootElementInContainer(container); + var hasNonRootReactChild = !!(rootEl && getInstanceFromNode$1(rootEl)); + !(!hasNonRootReactChild || isRootRenderedBySomeReact) + ? warningWithoutStack$1( + false, + 'render(...): Replacing React-rendered children with a new root ' + + 'component. If you intended to update the children of this node, ' + + 'you should instead have the existing children update their state ' + + 'and render the new components instead of calling ReactDOM.render.', + ) + : void 0; + !( + container.nodeType !== ELEMENT_NODE || + !container.tagName || + container.tagName.toUpperCase() !== 'BODY' + ) + ? warningWithoutStack$1( + false, + 'render(): Rendering components directly into document.body is ' + + 'discouraged, since its children are often manipulated by third-party ' + + 'scripts and browser extensions. This may lead to subtle ' + + 'reconciliation issues. Try rendering into a container element created ' + + 'for your app.', + ) + : void 0; + }; + } + + function getReactRootElementInContainer(container) { + if (!container) { + return null; + } + + if (container.nodeType === DOCUMENT_NODE) { + return container.documentElement; + } else { + return container.firstChild; + } + } + + function shouldHydrateDueToLegacyHeuristic(container) { + var rootElement = getReactRootElementInContainer(container); + return !!( + rootElement && + rootElement.nodeType === ELEMENT_NODE && + rootElement.hasAttribute(ROOT_ATTRIBUTE_NAME) + ); + } + + function legacyCreateRootFromDOMContainer(container, forceHydrate) { + var shouldHydrate = forceHydrate || shouldHydrateDueToLegacyHeuristic(container); // First clear any existing content. + + if (!shouldHydrate) { + var warned = false; + var rootSibling; + + while ((rootSibling = container.lastChild)) { + { + if ( + !warned && + rootSibling.nodeType === ELEMENT_NODE && + rootSibling.hasAttribute(ROOT_ATTRIBUTE_NAME) + ) { + warned = true; + warningWithoutStack$1( + false, + 'render(): Target node has markup rendered by React, but there ' + + 'are unrelated nodes as well. This is most commonly caused by ' + + 'white-space inserted around server-rendered markup.', + ); + } + } + + container.removeChild(rootSibling); + } + } + + { + if (shouldHydrate && !forceHydrate && !warnedAboutHydrateAPI) { + warnedAboutHydrateAPI = true; + lowPriorityWarningWithoutStack$1( + false, + 'render(): Calling ReactDOM.render() to hydrate server-rendered markup ' + + 'will stop working in React v17. Replace the ReactDOM.render() call ' + + 'with ReactDOM.hydrate() if you want React to attach to the server HTML.', + ); + } + } + + return createLegacyRoot( + container, + shouldHydrate + ? { + hydrate: true, + } + : undefined, + ); + } + + function legacyRenderSubtreeIntoContainer( + parentComponent, + children, + container, + forceHydrate, + callback, + ) { + { + topLevelUpdateWarnings(container); + warnOnInvalidCallback(callback === undefined ? null : callback, 'render'); + } // TODO: Without `any` type, Flow says "Property cannot be accessed on any + // member of intersection type." Whyyyyyy. + + var root = container._reactRootContainer; + var fiberRoot; + + if (!root) { + // Initial mount + root = container._reactRootContainer = legacyCreateRootFromDOMContainer( + container, + forceHydrate, + ); + fiberRoot = root._internalRoot; + + if (typeof callback === 'function') { + var originalCallback = callback; + + callback = function () { + var instance = getPublicRootInstance(fiberRoot); + originalCallback.call(instance); + }; + } // Initial mount should not be batched. + + unbatchedUpdates(function () { + updateContainer(children, fiberRoot, parentComponent, callback); + }); + } else { + fiberRoot = root._internalRoot; + + if (typeof callback === 'function') { + var _originalCallback = callback; + + callback = function () { + var instance = getPublicRootInstance(fiberRoot); + + _originalCallback.call(instance); + }; + } // Update + + updateContainer(children, fiberRoot, parentComponent, callback); + } + + return getPublicRootInstance(fiberRoot); + } + + function findDOMNode(componentOrElement) { + { + var owner = ReactCurrentOwner$1.current; + + if (owner !== null && owner.stateNode !== null) { + var warnedAboutRefsInRender = owner.stateNode._warnedAboutRefsInRender; + !warnedAboutRefsInRender + ? warningWithoutStack$1( + false, + '%s is accessing findDOMNode inside its render(). ' + + 'render() should be a pure function of props and state. It should ' + + 'never access something that requires stale data from the previous ' + + 'render, such as refs. Move this logic to componentDidMount and ' + + 'componentDidUpdate instead.', + getComponentName(owner.type) || 'A component', + ) + : void 0; + owner.stateNode._warnedAboutRefsInRender = true; + } + } + + if (componentOrElement == null) { + return null; + } + + if (componentOrElement.nodeType === ELEMENT_NODE) { + return componentOrElement; + } + + { + return findHostInstanceWithWarning(componentOrElement, 'findDOMNode'); + } + + return findHostInstance(componentOrElement); + } + function hydrate(element, container, callback) { + if (!isValidContainer(container)) { + { + throw Error('Target container is not a DOM element.'); + } + } + + { + var isModernRoot = + isContainerMarkedAsRoot(container) && container._reactRootContainer === undefined; + + if (isModernRoot) { + warningWithoutStack$1( + false, + 'You are calling ReactDOM.hydrate() on a container that was previously ' + + 'passed to ReactDOM.createRoot(). This is not supported. ' + + 'Did you mean to call createRoot(container, {hydrate: true}).render(element)?', + ); + } + } // TODO: throw or warn if we couldn't hydrate? + + return legacyRenderSubtreeIntoContainer(null, element, container, true, callback); + } + function render(element, container, callback) { + if (!isValidContainer(container)) { + { + throw Error('Target container is not a DOM element.'); + } + } + + { + var isModernRoot = + isContainerMarkedAsRoot(container) && container._reactRootContainer === undefined; + + if (isModernRoot) { + warningWithoutStack$1( + false, + 'You are calling ReactDOM.render() on a container that was previously ' + + 'passed to ReactDOM.createRoot(). This is not supported. ' + + 'Did you mean to call root.render(element)?', + ); + } + } + + return legacyRenderSubtreeIntoContainer(null, element, container, false, callback); + } + function unstable_renderSubtreeIntoContainer(parentComponent, element, containerNode, callback) { + if (!isValidContainer(containerNode)) { + { + throw Error('Target container is not a DOM element.'); + } + } + + if (!(parentComponent != null && has(parentComponent))) { + { + throw Error('parentComponent must be a valid React Component'); + } + } + + return legacyRenderSubtreeIntoContainer(parentComponent, element, containerNode, false, callback); + } + function unmountComponentAtNode(container) { + if (!isValidContainer(container)) { + { + throw Error('unmountComponentAtNode(...): Target container is not a DOM element.'); + } + } + + { + var isModernRoot = + isContainerMarkedAsRoot(container) && container._reactRootContainer === undefined; + + if (isModernRoot) { + warningWithoutStack$1( + false, + 'You are calling ReactDOM.unmountComponentAtNode() on a container that was previously ' + + 'passed to ReactDOM.createRoot(). This is not supported. Did you mean to call root.unmount()?', + ); + } + } + + if (container._reactRootContainer) { + { + var rootEl = getReactRootElementInContainer(container); + var renderedByDifferentReact = rootEl && !getInstanceFromNode$1(rootEl); + !!renderedByDifferentReact + ? warningWithoutStack$1( + false, + "unmountComponentAtNode(): The node you're attempting to unmount " + + 'was rendered by another copy of React.', + ) + : void 0; + } // Unmount should not be batched. + + unbatchedUpdates(function () { + legacyRenderSubtreeIntoContainer(null, null, container, false, function () { + container._reactRootContainer = null; + unmarkContainerAsRoot(container); + }); + }); // If you call unmountComponentAtNode twice in quick succession, you'll + // get `true` twice. That's probably fine? + + return true; + } else { + { + var _rootEl = getReactRootElementInContainer(container); + + var hasNonRootReactChild = !!(_rootEl && getInstanceFromNode$1(_rootEl)); // Check if the container itself is a React root node. + + var isContainerReactRoot = + container.nodeType === ELEMENT_NODE && + isValidContainer(container.parentNode) && + !!container.parentNode._reactRootContainer; + !!hasNonRootReactChild + ? warningWithoutStack$1( + false, + "unmountComponentAtNode(): The node you're attempting to unmount " + + 'was rendered by React and is not a top-level container. %s', + isContainerReactRoot + ? 'You may have accidentally passed in a React root node instead ' + + 'of its container.' + : 'Instead, have the parent component update its state and ' + + 'rerender in order to remove this component.', + ) + : void 0; + } + + return false; + } + } + + function createPortal$1( + children, + containerInfo, // TODO: figure out the API for cross-renderer implementation. + implementation, + ) { + var key = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null; + return { + // This tag allow us to uniquely identify this as a React Portal + $$typeof: REACT_PORTAL_TYPE, + key: key == null ? null : '' + key, + children: children, + containerInfo: containerInfo, + implementation: implementation, + }; + } + + // TODO: this is special because it gets imported during build. + + var ReactVersion = '16.12.0'; + + setAttemptSynchronousHydration(attemptSynchronousHydration$1); + setAttemptUserBlockingHydration(attemptUserBlockingHydration$1); + setAttemptContinuousHydration(attemptContinuousHydration$1); + setAttemptHydrationAtCurrentPriority(attemptHydrationAtCurrentPriority$1); + var didWarnAboutUnstableCreatePortal = false; + + { + if ( + typeof Map !== 'function' || // $FlowIssue Flow incorrectly thinks Map has no prototype + Map.prototype == null || + typeof Map.prototype.forEach !== 'function' || + typeof Set !== 'function' || // $FlowIssue Flow incorrectly thinks Set has no prototype + Set.prototype == null || + typeof Set.prototype.clear !== 'function' || + typeof Set.prototype.forEach !== 'function' + ) { + warningWithoutStack$1( + false, + 'React depends on Map and Set built-in types. Make sure that you load a ' + + 'polyfill in older browsers. https://fb.me/react-polyfills', + ); + } + } + + setRestoreImplementation(restoreControlledState$$1); + setBatchingImplementation( + batchedUpdates$1, + discreteUpdates$1, + flushDiscreteUpdates, + batchedEventUpdates$1, + ); + + function createPortal$$1(children, container) { + var key = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null; + + if (!isValidContainer(container)) { + { + throw Error('Target container is not a DOM element.'); + } + } // TODO: pass ReactDOM portal implementation as third argument + + return createPortal$1(children, container, null, key); + } + + var ReactDOM = { + createPortal: createPortal$$1, + // Legacy + findDOMNode: findDOMNode, + hydrate: hydrate, + render: render, + unstable_renderSubtreeIntoContainer: unstable_renderSubtreeIntoContainer, + unmountComponentAtNode: unmountComponentAtNode, + // Temporary alias since we already shipped React 16 RC with it. + // TODO: remove in React 17. + unstable_createPortal: function () { + if (!didWarnAboutUnstableCreatePortal) { + didWarnAboutUnstableCreatePortal = true; + lowPriorityWarningWithoutStack$1( + false, + 'The ReactDOM.unstable_createPortal() alias has been deprecated, ' + + 'and will be removed in React 17+. Update your code to use ' + + 'ReactDOM.createPortal() instead. It has the exact same API, ' + + 'but without the "unstable_" prefix.', + ); + } + + return createPortal$$1.apply(void 0, arguments); + }, + unstable_batchedUpdates: batchedUpdates$1, + flushSync: flushSync, + __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: { + // Keep in sync with ReactDOMUnstableNativeDependencies.js + // ReactTestUtils.js, and ReactTestUtilsAct.js. This is an array for better minification. + Events: [ + getInstanceFromNode$1, + getNodeFromInstance$1, + getFiberCurrentPropsFromNode$1, + injection.injectEventPluginsByName, + eventNameDispatchConfigs, + accumulateTwoPhaseDispatches, + accumulateDirectDispatches, + enqueueStateRestore, + restoreStateIfNeeded, + dispatchEvent, + runEventsInBatch, + flushPassiveEffects, + IsThisRendererActing, + ], + }, + }; + + if (exposeConcurrentModeAPIs) { + ReactDOM.createRoot = createRoot; + ReactDOM.createBlockingRoot = createBlockingRoot; + ReactDOM.unstable_discreteUpdates = discreteUpdates$1; + ReactDOM.unstable_flushDiscreteUpdates = flushDiscreteUpdates; + ReactDOM.unstable_flushControlled = flushControlled; + + ReactDOM.unstable_scheduleHydration = function (target) { + if (target) { + queueExplicitHydrationTarget(target); + } + }; + } + + var foundDevTools = injectIntoDevTools({ + findFiberByHostInstance: getClosestInstanceFromNode, + bundleType: 1, + version: ReactVersion, + rendererPackageName: 'react-dom', + }); + + { + if (!foundDevTools && canUseDOM && window.top === window.self) { + // If we're in Chrome or Firefox, provide a download link if not installed. + if ( + (navigator.userAgent.indexOf('Chrome') > -1 && navigator.userAgent.indexOf('Edge') === -1) || + navigator.userAgent.indexOf('Firefox') > -1 + ) { + var protocol = window.location.protocol; // Don't warn in exotic cases like chrome-extension://. + + if (/^(https?|file):$/.test(protocol)) { + console.info( + '%cDownload the React DevTools ' + + 'for a better development experience: ' + + 'https://fb.me/react-devtools' + + (protocol === 'file:' + ? '\nYou might need to use a local HTTP server (instead of file://): ' + + 'https://fb.me/react-devtools-faq' + : ''), + 'font-weight:bold', + ); + } + } + } + } + + var ReactDOM$2 = Object.freeze({ + default: ReactDOM, + }); + + var ReactDOM$3 = (ReactDOM$2 && ReactDOM) || ReactDOM$2; + + // TODO: decide on the top-level export form. + // This is hacky but makes it work with both Rollup and Jest. + + var reactDom = ReactDOM$3.default || ReactDOM$3; + + module.exports = reactDom; + })(); + } + + /***/ + }, + /* 512 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** @license React v16.12.0 + * react.development.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + + if (true) { + (function () { + 'use strict'; + + var _assign = __webpack_require__(64); + var checkPropTypes = __webpack_require__(107); + + // TODO: this is special because it gets imported during build. + + var ReactVersion = '16.12.0'; + + // The Symbol used to tag the ReactElement-like types. If there is no native Symbol + // nor polyfill, then a plain number is used for performance. + var hasSymbol = typeof Symbol === 'function' && Symbol.for; + var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7; + var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca; + var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb; + var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc; + var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2; + var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd; + var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary + // (unstable) APIs that have been removed. Can we remove the symbols? + + var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf; + var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0; + var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1; + var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8; + var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3; + var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4; + var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5; + var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6; + var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7; + var MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; + var FAUX_ITERATOR_SYMBOL = '@@iterator'; + function getIteratorFn(maybeIterable) { + if (maybeIterable === null || typeof maybeIterable !== 'object') { + return null; + } + + var maybeIterator = + (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) || + maybeIterable[FAUX_ITERATOR_SYMBOL]; + + if (typeof maybeIterator === 'function') { + return maybeIterator; + } + + return null; + } + + // Do not require this module directly! Use normal `invariant` calls with + // template literal strings. The messages will be replaced with error codes + // during build. + + /** + * Use invariant() to assert state which your program assumes to be true. + * + * Provide sprintf-style format (only %s is supported) and arguments + * to provide information about what broke and what you were + * expecting. + * + * The invariant message will be stripped in production, but the invariant + * will remain to ensure logic does not differ in production. + */ + + /** + * Forked from fbjs/warning: + * https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js + * + * Only change is we use console.warn instead of console.error, + * and do nothing when 'console' is not supported. + * This really simplifies the code. + * --- + * Similar to invariant but only logs a warning if the condition is not met. + * This can be used to log issues in development environments in critical + * paths. Removing the logging code for production environments will keep the + * same logic and follow the same code paths. + */ + var lowPriorityWarningWithoutStack = function () {}; + + { + var printWarning = function (format) { + for ( + var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; + _key < _len; + _key++ + ) { + args[_key - 1] = arguments[_key]; + } + + var argIndex = 0; + var message = + 'Warning: ' + + format.replace(/%s/g, function () { + return args[argIndex++]; + }); + + if (typeof console !== 'undefined') { + console.warn(message); + } + + try { + // --- Welcome to debugging React --- + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + throw new Error(message); + } catch (x) {} + }; + + lowPriorityWarningWithoutStack = function (condition, format) { + if (format === undefined) { + throw new Error( + '`lowPriorityWarningWithoutStack(condition, format, ...args)` requires a warning ' + + 'message argument', + ); + } + + if (!condition) { + for ( + var _len2 = arguments.length, args = new Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; + _key2 < _len2; + _key2++ + ) { + args[_key2 - 2] = arguments[_key2]; + } + + printWarning.apply(void 0, [format].concat(args)); + } + }; + } + + var lowPriorityWarningWithoutStack$1 = lowPriorityWarningWithoutStack; + + /** + * Similar to invariant but only logs a warning if the condition is not met. + * This can be used to log issues in development environments in critical + * paths. Removing the logging code for production environments will keep the + * same logic and follow the same code paths. + */ + var warningWithoutStack = function () {}; + + { + warningWithoutStack = function (condition, format) { + for ( + var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; + _key < _len; + _key++ + ) { + args[_key - 2] = arguments[_key]; + } + + if (format === undefined) { + throw new Error( + '`warningWithoutStack(condition, format, ...args)` requires a warning ' + + 'message argument', + ); + } + + if (args.length > 8) { + // Check before the condition to catch violations early. + throw new Error('warningWithoutStack() currently supports at most 8 arguments.'); + } + + if (condition) { + return; + } + + if (typeof console !== 'undefined') { + var argsWithFormat = args.map(function (item) { + return '' + item; + }); + argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it + // breaks IE9: https://github.com/facebook/react/issues/13610 + + Function.prototype.apply.call(console.error, console, argsWithFormat); + } + + try { + // --- Welcome to debugging React --- + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + var argIndex = 0; + var message = + 'Warning: ' + + format.replace(/%s/g, function () { + return args[argIndex++]; + }); + throw new Error(message); + } catch (x) {} + }; + } + + var warningWithoutStack$1 = warningWithoutStack; + + var didWarnStateUpdateForUnmountedComponent = {}; + + function warnNoop(publicInstance, callerName) { + { + var _constructor = publicInstance.constructor; + var componentName = + (_constructor && (_constructor.displayName || _constructor.name)) || 'ReactClass'; + var warningKey = componentName + '.' + callerName; + + if (didWarnStateUpdateForUnmountedComponent[warningKey]) { + return; + } + + warningWithoutStack$1( + false, + "Can't call %s on a component that is not yet mounted. " + + 'This is a no-op, but it might indicate a bug in your application. ' + + 'Instead, assign to `this.state` directly or define a `state = {};` ' + + 'class property with the desired state in the %s component.', + callerName, + componentName, + ); + didWarnStateUpdateForUnmountedComponent[warningKey] = true; + } + } + /** + * This is the abstract API for an update queue. + */ + + var ReactNoopUpdateQueue = { + /** + * Checks whether or not this composite component is mounted. + * @param {ReactClass} publicInstance The instance we want to test. + * @return {boolean} True if mounted, false otherwise. + * @protected + * @final + */ + isMounted: function (publicInstance) { + return false; + }, + + /** + * Forces an update. This should only be invoked when it is known with + * certainty that we are **not** in a DOM transaction. + * + * You may want to call this when you know that some deeper aspect of the + * component's state has changed but `setState` was not called. + * + * This will not invoke `shouldComponentUpdate`, but it will invoke + * `componentWillUpdate` and `componentDidUpdate`. + * + * @param {ReactClass} publicInstance The instance that should rerender. + * @param {?function} callback Called after component is updated. + * @param {?string} callerName name of the calling function in the public API. + * @internal + */ + enqueueForceUpdate: function (publicInstance, callback, callerName) { + warnNoop(publicInstance, 'forceUpdate'); + }, + + /** + * Replaces all of the state. Always use this or `setState` to mutate state. + * You should treat `this.state` as immutable. + * + * There is no guarantee that `this.state` will be immediately updated, so + * accessing `this.state` after calling this method may return the old value. + * + * @param {ReactClass} publicInstance The instance that should rerender. + * @param {object} completeState Next state. + * @param {?function} callback Called after component is updated. + * @param {?string} callerName name of the calling function in the public API. + * @internal + */ + enqueueReplaceState: function (publicInstance, completeState, callback, callerName) { + warnNoop(publicInstance, 'replaceState'); + }, + + /** + * Sets a subset of the state. This only exists because _pendingState is + * internal. This provides a merging strategy that is not available to deep + * properties which is confusing. TODO: Expose pendingState or don't use it + * during the merge. + * + * @param {ReactClass} publicInstance The instance that should rerender. + * @param {object} partialState Next partial state to be merged with state. + * @param {?function} callback Called after component is updated. + * @param {?string} Name of the calling function in the public API. + * @internal + */ + enqueueSetState: function (publicInstance, partialState, callback, callerName) { + warnNoop(publicInstance, 'setState'); + }, + }; + + var emptyObject = {}; + + { + Object.freeze(emptyObject); + } + /** + * Base class helpers for the updating state of a component. + */ + + function Component(props, context, updater) { + this.props = props; + this.context = context; // If a component has string refs, we will assign a different object later. + + this.refs = emptyObject; // We initialize the default updater but the real one gets injected by the + // renderer. + + this.updater = updater || ReactNoopUpdateQueue; + } + + Component.prototype.isReactComponent = {}; + /** + * Sets a subset of the state. Always use this to mutate + * state. You should treat `this.state` as immutable. + * + * There is no guarantee that `this.state` will be immediately updated, so + * accessing `this.state` after calling this method may return the old value. + * + * There is no guarantee that calls to `setState` will run synchronously, + * as they may eventually be batched together. You can provide an optional + * callback that will be executed when the call to setState is actually + * completed. + * + * When a function is provided to setState, it will be called at some point in + * the future (not synchronously). It will be called with the up to date + * component arguments (state, props, context). These values can be different + * from this.* because your function may be called after receiveProps but before + * shouldComponentUpdate, and this new state, props, and context will not yet be + * assigned to this. + * + * @param {object|function} partialState Next partial state or function to + * produce next partial state to be merged with current state. + * @param {?function} callback Called after state is updated. + * @final + * @protected + */ + + Component.prototype.setState = function (partialState, callback) { + if ( + !( + typeof partialState === 'object' || + typeof partialState === 'function' || + partialState == null + ) + ) { + { + throw Error( + 'setState(...): takes an object of state variables to update or a function which returns an object of state variables.', + ); + } + } + + this.updater.enqueueSetState(this, partialState, callback, 'setState'); + }; + /** + * Forces an update. This should only be invoked when it is known with + * certainty that we are **not** in a DOM transaction. + * + * You may want to call this when you know that some deeper aspect of the + * component's state has changed but `setState` was not called. + * + * This will not invoke `shouldComponentUpdate`, but it will invoke + * `componentWillUpdate` and `componentDidUpdate`. + * + * @param {?function} callback Called after update is complete. + * @final + * @protected + */ + + Component.prototype.forceUpdate = function (callback) { + this.updater.enqueueForceUpdate(this, callback, 'forceUpdate'); + }; + /** + * Deprecated APIs. These APIs used to exist on classic React classes but since + * we would like to deprecate them, we're not going to move them over to this + * modern base class. Instead, we define a getter that warns if it's accessed. + */ + + { + var deprecatedAPIs = { + isMounted: [ + 'isMounted', + 'Instead, make sure to clean up subscriptions and pending requests in ' + + 'componentWillUnmount to prevent memory leaks.', + ], + replaceState: [ + 'replaceState', + 'Refactor your code to use setState instead (see ' + + 'https://github.com/facebook/react/issues/3236).', + ], + }; + + var defineDeprecationWarning = function (methodName, info) { + Object.defineProperty(Component.prototype, methodName, { + get: function () { + lowPriorityWarningWithoutStack$1( + false, + '%s(...) is deprecated in plain JavaScript React classes. %s', + info[0], + info[1], + ); + return undefined; + }, + }); + }; + + for (var fnName in deprecatedAPIs) { + if (deprecatedAPIs.hasOwnProperty(fnName)) { + defineDeprecationWarning(fnName, deprecatedAPIs[fnName]); + } + } + } + + function ComponentDummy() {} + + ComponentDummy.prototype = Component.prototype; + /** + * Convenience component with default shallow equality check for sCU. + */ + + function PureComponent(props, context, updater) { + this.props = props; + this.context = context; // If a component has string refs, we will assign a different object later. + + this.refs = emptyObject; + this.updater = updater || ReactNoopUpdateQueue; + } + + var pureComponentPrototype = (PureComponent.prototype = new ComponentDummy()); + pureComponentPrototype.constructor = PureComponent; // Avoid an extra prototype jump for these methods. + + _assign(pureComponentPrototype, Component.prototype); + + pureComponentPrototype.isPureReactComponent = true; + + // an immutable object with a single mutable value + function createRef() { + var refObject = { + current: null, + }; + + { + Object.seal(refObject); + } + + return refObject; + } + + /** + * Keeps track of the current dispatcher. + */ + var ReactCurrentDispatcher = { + /** + * @internal + * @type {ReactComponent} + */ + current: null, + }; + + /** + * Keeps track of the current batch's configuration such as how long an update + * should suspend for if it needs to. + */ + var ReactCurrentBatchConfig = { + suspense: null, + }; + + /** + * Keeps track of the current owner. + * + * The current owner is the component who should own any components that are + * currently being constructed. + */ + var ReactCurrentOwner = { + /** + * @internal + * @type {ReactComponent} + */ + current: null, + }; + + var BEFORE_SLASH_RE = /^(.*)[\\\/]/; + var describeComponentFrame = function (name, source, ownerName) { + var sourceInfo = ''; + + if (source) { + var path = source.fileName; + var fileName = path.replace(BEFORE_SLASH_RE, ''); + + { + // In DEV, include code for a common special case: + // prefer "folder/index.js" instead of just "index.js". + if (/^index\./.test(fileName)) { + var match = path.match(BEFORE_SLASH_RE); + + if (match) { + var pathBeforeSlash = match[1]; + + if (pathBeforeSlash) { + var folderName = pathBeforeSlash.replace(BEFORE_SLASH_RE, ''); + fileName = folderName + '/' + fileName; + } + } + } + } + + sourceInfo = ' (at ' + fileName + ':' + source.lineNumber + ')'; + } else if (ownerName) { + sourceInfo = ' (created by ' + ownerName + ')'; + } + + return '\n in ' + (name || 'Unknown') + sourceInfo; + }; + + var Resolved = 1; + + function refineResolvedLazyComponent(lazyComponent) { + return lazyComponent._status === Resolved ? lazyComponent._result : null; + } + + function getWrappedName(outerType, innerType, wrapperName) { + var functionName = innerType.displayName || innerType.name || ''; + return ( + outerType.displayName || + (functionName !== '' ? wrapperName + '(' + functionName + ')' : wrapperName) + ); + } + + function getComponentName(type) { + if (type == null) { + // Host root, text node or just invalid type. + return null; + } + + { + if (typeof type.tag === 'number') { + warningWithoutStack$1( + false, + 'Received an unexpected object in getComponentName(). ' + + 'This is likely a bug in React. Please file an issue.', + ); + } + } + + if (typeof type === 'function') { + return type.displayName || type.name || null; + } + + if (typeof type === 'string') { + return type; + } + + switch (type) { + case REACT_FRAGMENT_TYPE: + return 'Fragment'; + + case REACT_PORTAL_TYPE: + return 'Portal'; + + case REACT_PROFILER_TYPE: + return 'Profiler'; + + case REACT_STRICT_MODE_TYPE: + return 'StrictMode'; + + case REACT_SUSPENSE_TYPE: + return 'Suspense'; + + case REACT_SUSPENSE_LIST_TYPE: + return 'SuspenseList'; + } + + if (typeof type === 'object') { + switch (type.$$typeof) { + case REACT_CONTEXT_TYPE: + return 'Context.Consumer'; + + case REACT_PROVIDER_TYPE: + return 'Context.Provider'; + + case REACT_FORWARD_REF_TYPE: + return getWrappedName(type, type.render, 'ForwardRef'); + + case REACT_MEMO_TYPE: + return getComponentName(type.type); + + case REACT_LAZY_TYPE: { + var thenable = type; + var resolvedThenable = refineResolvedLazyComponent(thenable); + + if (resolvedThenable) { + return getComponentName(resolvedThenable); + } + + break; + } + } + } + + return null; + } + + var ReactDebugCurrentFrame = {}; + var currentlyValidatingElement = null; + function setCurrentlyValidatingElement(element) { + { + currentlyValidatingElement = element; + } + } + + { + // Stack implementation injected by the current renderer. + ReactDebugCurrentFrame.getCurrentStack = null; + + ReactDebugCurrentFrame.getStackAddendum = function () { + var stack = ''; // Add an extra top frame while an element is being validated + + if (currentlyValidatingElement) { + var name = getComponentName(currentlyValidatingElement.type); + var owner = currentlyValidatingElement._owner; + stack += describeComponentFrame( + name, + currentlyValidatingElement._source, + owner && getComponentName(owner.type), + ); + } // Delegate to the injected renderer-specific implementation + + var impl = ReactDebugCurrentFrame.getCurrentStack; + + if (impl) { + stack += impl() || ''; + } + + return stack; + }; + } + + /** + * Used by act() to track whether you're inside an act() scope. + */ + var IsSomeRendererActing = { + current: false, + }; + + var ReactSharedInternals = { + ReactCurrentDispatcher: ReactCurrentDispatcher, + ReactCurrentBatchConfig: ReactCurrentBatchConfig, + ReactCurrentOwner: ReactCurrentOwner, + IsSomeRendererActing: IsSomeRendererActing, + // Used by renderers to avoid bundling object-assign twice in UMD bundles: + assign: _assign, + }; + + { + _assign(ReactSharedInternals, { + // These should not be included in production. + ReactDebugCurrentFrame: ReactDebugCurrentFrame, + // Shim for React DOM 16.0.0 which still destructured (but not used) this. + // TODO: remove in React 17.0. + ReactComponentTreeHook: {}, + }); + } + + /** + * Similar to invariant but only logs a warning if the condition is not met. + * This can be used to log issues in development environments in critical + * paths. Removing the logging code for production environments will keep the + * same logic and follow the same code paths. + */ + + var warning = warningWithoutStack$1; + + { + warning = function (condition, format) { + if (condition) { + return; + } + + var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; + var stack = ReactDebugCurrentFrame.getStackAddendum(); // eslint-disable-next-line react-internal/warning-and-invariant-args + + for ( + var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; + _key < _len; + _key++ + ) { + args[_key - 2] = arguments[_key]; + } + + warningWithoutStack$1.apply(void 0, [false, format + '%s'].concat(args, [stack])); + }; + } + + var warning$1 = warning; + + var hasOwnProperty = Object.prototype.hasOwnProperty; + var RESERVED_PROPS = { + key: true, + ref: true, + __self: true, + __source: true, + }; + var specialPropKeyWarningShown; + var specialPropRefWarningShown; + + function hasValidRef(config) { + { + if (hasOwnProperty.call(config, 'ref')) { + var getter = Object.getOwnPropertyDescriptor(config, 'ref').get; + + if (getter && getter.isReactWarning) { + return false; + } + } + } + + return config.ref !== undefined; + } + + function hasValidKey(config) { + { + if (hasOwnProperty.call(config, 'key')) { + var getter = Object.getOwnPropertyDescriptor(config, 'key').get; + + if (getter && getter.isReactWarning) { + return false; + } + } + } + + return config.key !== undefined; + } + + function defineKeyPropWarningGetter(props, displayName) { + var warnAboutAccessingKey = function () { + if (!specialPropKeyWarningShown) { + specialPropKeyWarningShown = true; + warningWithoutStack$1( + false, + '%s: `key` is not a prop. Trying to access it will result ' + + 'in `undefined` being returned. If you need to access the same ' + + 'value within the child component, you should pass it as a different ' + + 'prop. (https://fb.me/react-special-props)', + displayName, + ); + } + }; + + warnAboutAccessingKey.isReactWarning = true; + Object.defineProperty(props, 'key', { + get: warnAboutAccessingKey, + configurable: true, + }); + } + + function defineRefPropWarningGetter(props, displayName) { + var warnAboutAccessingRef = function () { + if (!specialPropRefWarningShown) { + specialPropRefWarningShown = true; + warningWithoutStack$1( + false, + '%s: `ref` is not a prop. Trying to access it will result ' + + 'in `undefined` being returned. If you need to access the same ' + + 'value within the child component, you should pass it as a different ' + + 'prop. (https://fb.me/react-special-props)', + displayName, + ); + } + }; + + warnAboutAccessingRef.isReactWarning = true; + Object.defineProperty(props, 'ref', { + get: warnAboutAccessingRef, + configurable: true, + }); + } + /** + * Factory method to create a new React element. This no longer adheres to + * the class pattern, so do not use new to call it. Also, instanceof check + * will not work. Instead test $$typeof field against Symbol.for('react.element') to check + * if something is a React Element. + * + * @param {*} type + * @param {*} props + * @param {*} key + * @param {string|object} ref + * @param {*} owner + * @param {*} self A *temporary* helper to detect places where `this` is + * different from the `owner` when React.createElement is called, so that we + * can warn. We want to get rid of owner and replace string `ref`s with arrow + * functions, and as long as `this` and owner are the same, there will be no + * change in behavior. + * @param {*} source An annotation object (added by a transpiler or otherwise) + * indicating filename, line number, and/or other information. + * @internal + */ + + var ReactElement = function (type, key, ref, self, source, owner, props) { + var element = { + // This tag allows us to uniquely identify this as a React Element + $$typeof: REACT_ELEMENT_TYPE, + // Built-in properties that belong on the element + type: type, + key: key, + ref: ref, + props: props, + // Record the component responsible for creating this element. + _owner: owner, + }; + + { + // The validation flag is currently mutative. We put it on + // an external backing store so that we can freeze the whole object. + // This can be replaced with a WeakMap once they are implemented in + // commonly used development environments. + element._store = {}; // To make comparing ReactElements easier for testing purposes, we make + // the validation flag non-enumerable (where possible, which should + // include every environment we run tests in), so the test framework + // ignores it. + + Object.defineProperty(element._store, 'validated', { + configurable: false, + enumerable: false, + writable: true, + value: false, + }); // self and source are DEV only properties. + + Object.defineProperty(element, '_self', { + configurable: false, + enumerable: false, + writable: false, + value: self, + }); // Two elements created in two different places should be considered + // equal for testing purposes and therefore we hide it from enumeration. + + Object.defineProperty(element, '_source', { + configurable: false, + enumerable: false, + writable: false, + value: source, + }); + + if (Object.freeze) { + Object.freeze(element.props); + Object.freeze(element); + } + } + + return element; + }; + /** + * https://github.com/reactjs/rfcs/pull/107 + * @param {*} type + * @param {object} props + * @param {string} key + */ + + /** + * https://github.com/reactjs/rfcs/pull/107 + * @param {*} type + * @param {object} props + * @param {string} key + */ + + function jsxDEV(type, config, maybeKey, source, self) { + var propName; // Reserved names are extracted + + var props = {}; + var key = null; + var ref = null; // Currently, key can be spread in as a prop. This causes a potential + // issue if key is also explicitly declared (ie. <div {...props} key="Hi" /> + // or <div key="Hi" {...props} /> ). We want to deprecate key spread, + // but as an intermediary step, we will use jsxDEV for everything except + // <div {...props} key="Hi" />, because we aren't currently able to tell if + // key is explicitly declared to be undefined or not. + + if (maybeKey !== undefined) { + key = '' + maybeKey; + } + + if (hasValidKey(config)) { + key = '' + config.key; + } + + if (hasValidRef(config)) { + ref = config.ref; + } // Remaining properties are added to a new props object + + for (propName in config) { + if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { + props[propName] = config[propName]; + } + } // Resolve default props + + if (type && type.defaultProps) { + var defaultProps = type.defaultProps; + + for (propName in defaultProps) { + if (props[propName] === undefined) { + props[propName] = defaultProps[propName]; + } + } + } + + if (key || ref) { + var displayName = + typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type; + + if (key) { + defineKeyPropWarningGetter(props, displayName); + } + + if (ref) { + defineRefPropWarningGetter(props, displayName); + } + } + + return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props); + } + /** + * Create and return a new ReactElement of the given type. + * See https://reactjs.org/docs/react-api.html#createelement + */ + + function createElement(type, config, children) { + var propName; // Reserved names are extracted + + var props = {}; + var key = null; + var ref = null; + var self = null; + var source = null; + + if (config != null) { + if (hasValidRef(config)) { + ref = config.ref; + } + + if (hasValidKey(config)) { + key = '' + config.key; + } + + self = config.__self === undefined ? null : config.__self; + source = config.__source === undefined ? null : config.__source; // Remaining properties are added to a new props object + + for (propName in config) { + if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { + props[propName] = config[propName]; + } + } + } // Children can be more than one argument, and those are transferred onto + // the newly allocated props object. + + var childrenLength = arguments.length - 2; + + if (childrenLength === 1) { + props.children = children; + } else if (childrenLength > 1) { + var childArray = Array(childrenLength); + + for (var i = 0; i < childrenLength; i++) { + childArray[i] = arguments[i + 2]; + } + + { + if (Object.freeze) { + Object.freeze(childArray); + } + } + + props.children = childArray; + } // Resolve default props + + if (type && type.defaultProps) { + var defaultProps = type.defaultProps; + + for (propName in defaultProps) { + if (props[propName] === undefined) { + props[propName] = defaultProps[propName]; + } + } + } + + { + if (key || ref) { + var displayName = + typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type; + + if (key) { + defineKeyPropWarningGetter(props, displayName); + } + + if (ref) { + defineRefPropWarningGetter(props, displayName); + } + } + } + + return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props); + } + /** + * Return a function that produces ReactElements of a given type. + * See https://reactjs.org/docs/react-api.html#createfactory + */ + + function cloneAndReplaceKey(oldElement, newKey) { + var newElement = ReactElement( + oldElement.type, + newKey, + oldElement.ref, + oldElement._self, + oldElement._source, + oldElement._owner, + oldElement.props, + ); + return newElement; + } + /** + * Clone and return a new ReactElement using element as the starting point. + * See https://reactjs.org/docs/react-api.html#cloneelement + */ + + function cloneElement(element, config, children) { + if (!!(element === null || element === undefined)) { + { + throw Error( + 'React.cloneElement(...): The argument must be a React element, but you passed ' + + element + + '.', + ); + } + } + + var propName; // Original props are copied + + var props = _assign({}, element.props); // Reserved names are extracted + + var key = element.key; + var ref = element.ref; // Self is preserved since the owner is preserved. + + var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a + // transpiler, and the original source is probably a better indicator of the + // true owner. + + var source = element._source; // Owner will be preserved, unless ref is overridden + + var owner = element._owner; + + if (config != null) { + if (hasValidRef(config)) { + // Silently steal the ref from the parent. + ref = config.ref; + owner = ReactCurrentOwner.current; + } + + if (hasValidKey(config)) { + key = '' + config.key; + } // Remaining properties override existing props + + var defaultProps; + + if (element.type && element.type.defaultProps) { + defaultProps = element.type.defaultProps; + } + + for (propName in config) { + if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { + if (config[propName] === undefined && defaultProps !== undefined) { + // Resolve default props + props[propName] = defaultProps[propName]; + } else { + props[propName] = config[propName]; + } + } + } + } // Children can be more than one argument, and those are transferred onto + // the newly allocated props object. + + var childrenLength = arguments.length - 2; + + if (childrenLength === 1) { + props.children = children; + } else if (childrenLength > 1) { + var childArray = Array(childrenLength); + + for (var i = 0; i < childrenLength; i++) { + childArray[i] = arguments[i + 2]; + } + + props.children = childArray; + } + + return ReactElement(element.type, key, ref, self, source, owner, props); + } + /** + * Verifies the object is a ReactElement. + * See https://reactjs.org/docs/react-api.html#isvalidelement + * @param {?object} object + * @return {boolean} True if `object` is a ReactElement. + * @final + */ + + function isValidElement(object) { + return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; + } + + var SEPARATOR = '.'; + var SUBSEPARATOR = ':'; + /** + * Escape and wrap key so it is safe to use as a reactid + * + * @param {string} key to be escaped. + * @return {string} the escaped key. + */ + + function escape(key) { + var escapeRegex = /[=:]/g; + var escaperLookup = { + '=': '=0', + ':': '=2', + }; + var escapedString = ('' + key).replace(escapeRegex, function (match) { + return escaperLookup[match]; + }); + return '$' + escapedString; + } + /** + * TODO: Test that a single child and an array with one item have the same key + * pattern. + */ + + var didWarnAboutMaps = false; + var userProvidedKeyEscapeRegex = /\/+/g; + + function escapeUserProvidedKey(text) { + return ('' + text).replace(userProvidedKeyEscapeRegex, '$&/'); + } + + var POOL_SIZE = 10; + var traverseContextPool = []; + + function getPooledTraverseContext(mapResult, keyPrefix, mapFunction, mapContext) { + if (traverseContextPool.length) { + var traverseContext = traverseContextPool.pop(); + traverseContext.result = mapResult; + traverseContext.keyPrefix = keyPrefix; + traverseContext.func = mapFunction; + traverseContext.context = mapContext; + traverseContext.count = 0; + return traverseContext; + } else { + return { + result: mapResult, + keyPrefix: keyPrefix, + func: mapFunction, + context: mapContext, + count: 0, + }; + } + } + + function releaseTraverseContext(traverseContext) { + traverseContext.result = null; + traverseContext.keyPrefix = null; + traverseContext.func = null; + traverseContext.context = null; + traverseContext.count = 0; + + if (traverseContextPool.length < POOL_SIZE) { + traverseContextPool.push(traverseContext); + } + } + /** + * @param {?*} children Children tree container. + * @param {!string} nameSoFar Name of the key path so far. + * @param {!function} callback Callback to invoke with each child found. + * @param {?*} traverseContext Used to pass information throughout the traversal + * process. + * @return {!number} The number of children in this subtree. + */ + + function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) { + var type = typeof children; + + if (type === 'undefined' || type === 'boolean') { + // All of the above are perceived as null. + children = null; + } + + var invokeCallback = false; + + if (children === null) { + invokeCallback = true; + } else { + switch (type) { + case 'string': + case 'number': + invokeCallback = true; + break; + + case 'object': + switch (children.$$typeof) { + case REACT_ELEMENT_TYPE: + case REACT_PORTAL_TYPE: + invokeCallback = true; + } + } + } + + if (invokeCallback) { + callback( + traverseContext, + children, // If it's the only child, treat the name as if it was wrapped in an array + // so that it's consistent if the number of children grows. + nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar, + ); + return 1; + } + + var child; + var nextName; + var subtreeCount = 0; // Count of children found in the current subtree. + + var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR; + + if (Array.isArray(children)) { + for (var i = 0; i < children.length; i++) { + child = children[i]; + nextName = nextNamePrefix + getComponentKey(child, i); + subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext); + } + } else { + var iteratorFn = getIteratorFn(children); + + if (typeof iteratorFn === 'function') { + { + // Warn about using Maps as children + if (iteratorFn === children.entries) { + !didWarnAboutMaps + ? warning$1( + false, + 'Using Maps as children is unsupported and will likely yield ' + + 'unexpected results. Convert it to a sequence/iterable of keyed ' + + 'ReactElements instead.', + ) + : void 0; + didWarnAboutMaps = true; + } + } + + var iterator = iteratorFn.call(children); + var step; + var ii = 0; + + while (!(step = iterator.next()).done) { + child = step.value; + nextName = nextNamePrefix + getComponentKey(child, ii++); + subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext); + } + } else if (type === 'object') { + var addendum = ''; + + { + addendum = + ' If you meant to render a collection of children, use an array ' + + 'instead.' + + ReactDebugCurrentFrame.getStackAddendum(); + } + + var childrenString = '' + children; + + { + { + throw Error( + 'Objects are not valid as a React child (found: ' + + (childrenString === '[object Object]' + ? 'object with keys {' + Object.keys(children).join(', ') + '}' + : childrenString) + + ').' + + addendum, + ); + } + } + } + } + + return subtreeCount; + } + /** + * Traverses children that are typically specified as `props.children`, but + * might also be specified through attributes: + * + * - `traverseAllChildren(this.props.children, ...)` + * - `traverseAllChildren(this.props.leftPanelChildren, ...)` + * + * The `traverseContext` is an optional argument that is passed through the + * entire traversal. It can be used to store accumulations or anything else that + * the callback might find relevant. + * + * @param {?*} children Children tree object. + * @param {!function} callback To invoke upon traversing each child. + * @param {?*} traverseContext Context for traversal. + * @return {!number} The number of children in this subtree. + */ + + function traverseAllChildren(children, callback, traverseContext) { + if (children == null) { + return 0; + } + + return traverseAllChildrenImpl(children, '', callback, traverseContext); + } + /** + * Generate a key string that identifies a component within a set. + * + * @param {*} component A component that could contain a manual key. + * @param {number} index Index that is used if a manual key is not provided. + * @return {string} + */ + + function getComponentKey(component, index) { + // Do some typechecking here since we call this blindly. We want to ensure + // that we don't block potential future ES APIs. + if (typeof component === 'object' && component !== null && component.key != null) { + // Explicit key + return escape(component.key); + } // Implicit key determined by the index in the set + + return index.toString(36); + } + + function forEachSingleChild(bookKeeping, child, name) { + var func = bookKeeping.func, + context = bookKeeping.context; + func.call(context, child, bookKeeping.count++); + } + /** + * Iterates through children that are typically specified as `props.children`. + * + * See https://reactjs.org/docs/react-api.html#reactchildrenforeach + * + * The provided forEachFunc(child, index) will be called for each + * leaf child. + * + * @param {?*} children Children tree container. + * @param {function(*, int)} forEachFunc + * @param {*} forEachContext Context for forEachContext. + */ + + function forEachChildren(children, forEachFunc, forEachContext) { + if (children == null) { + return children; + } + + var traverseContext = getPooledTraverseContext(null, null, forEachFunc, forEachContext); + traverseAllChildren(children, forEachSingleChild, traverseContext); + releaseTraverseContext(traverseContext); + } + + function mapSingleChildIntoContext(bookKeeping, child, childKey) { + var result = bookKeeping.result, + keyPrefix = bookKeeping.keyPrefix, + func = bookKeeping.func, + context = bookKeeping.context; + var mappedChild = func.call(context, child, bookKeeping.count++); + + if (Array.isArray(mappedChild)) { + mapIntoWithKeyPrefixInternal(mappedChild, result, childKey, function (c) { + return c; + }); + } else if (mappedChild != null) { + if (isValidElement(mappedChild)) { + mappedChild = cloneAndReplaceKey( + mappedChild, // Keep both the (mapped) and old keys if they differ, just as + // traverseAllChildren used to do for objects as children + keyPrefix + + (mappedChild.key && (!child || child.key !== mappedChild.key) + ? escapeUserProvidedKey(mappedChild.key) + '/' + : '') + + childKey, + ); + } + + result.push(mappedChild); + } + } + + function mapIntoWithKeyPrefixInternal(children, array, prefix, func, context) { + var escapedPrefix = ''; + + if (prefix != null) { + escapedPrefix = escapeUserProvidedKey(prefix) + '/'; + } + + var traverseContext = getPooledTraverseContext(array, escapedPrefix, func, context); + traverseAllChildren(children, mapSingleChildIntoContext, traverseContext); + releaseTraverseContext(traverseContext); + } + /** + * Maps children that are typically specified as `props.children`. + * + * See https://reactjs.org/docs/react-api.html#reactchildrenmap + * + * The provided mapFunction(child, key, index) will be called for each + * leaf child. + * + * @param {?*} children Children tree container. + * @param {function(*, int)} func The map function. + * @param {*} context Context for mapFunction. + * @return {object} Object containing the ordered map of results. + */ + + function mapChildren(children, func, context) { + if (children == null) { + return children; + } + + var result = []; + mapIntoWithKeyPrefixInternal(children, result, null, func, context); + return result; + } + /** + * Count the number of children that are typically specified as + * `props.children`. + * + * See https://reactjs.org/docs/react-api.html#reactchildrencount + * + * @param {?*} children Children tree container. + * @return {number} The number of children. + */ + + function countChildren(children) { + return traverseAllChildren( + children, + function () { + return null; + }, + null, + ); + } + /** + * Flatten a children object (typically specified as `props.children`) and + * return an array with appropriately re-keyed children. + * + * See https://reactjs.org/docs/react-api.html#reactchildrentoarray + */ + + function toArray(children) { + var result = []; + mapIntoWithKeyPrefixInternal(children, result, null, function (child) { + return child; + }); + return result; + } + /** + * Returns the first child in a collection of children and verifies that there + * is only one child in the collection. + * + * See https://reactjs.org/docs/react-api.html#reactchildrenonly + * + * The current implementation of this function assumes that a single child gets + * passed without a wrapper, but the purpose of this helper function is to + * abstract away the particular structure of children. + * + * @param {?object} children Child collection structure. + * @return {ReactElement} The first and only `ReactElement` contained in the + * structure. + */ + + function onlyChild(children) { + if (!isValidElement(children)) { + { + throw Error('React.Children.only expected to receive a single React element child.'); + } + } + + return children; + } + + function createContext(defaultValue, calculateChangedBits) { + if (calculateChangedBits === undefined) { + calculateChangedBits = null; + } else { + { + !(calculateChangedBits === null || typeof calculateChangedBits === 'function') + ? warningWithoutStack$1( + false, + 'createContext: Expected the optional second argument to be a ' + + 'function. Instead received: %s', + calculateChangedBits, + ) + : void 0; + } + } + + var context = { + $$typeof: REACT_CONTEXT_TYPE, + _calculateChangedBits: calculateChangedBits, + // As a workaround to support multiple concurrent renderers, we categorize + // some renderers as primary and others as secondary. We only expect + // there to be two concurrent renderers at most: React Native (primary) and + // Fabric (secondary); React DOM (primary) and React ART (secondary). + // Secondary renderers store their context values on separate fields. + _currentValue: defaultValue, + _currentValue2: defaultValue, + // Used to track how many concurrent renderers this context currently + // supports within in a single renderer. Such as parallel server rendering. + _threadCount: 0, + // These are circular + Provider: null, + Consumer: null, + }; + context.Provider = { + $$typeof: REACT_PROVIDER_TYPE, + _context: context, + }; + var hasWarnedAboutUsingNestedContextConsumers = false; + var hasWarnedAboutUsingConsumerProvider = false; + + { + // A separate object, but proxies back to the original context object for + // backwards compatibility. It has a different $$typeof, so we can properly + // warn for the incorrect usage of Context as a Consumer. + var Consumer = { + $$typeof: REACT_CONTEXT_TYPE, + _context: context, + _calculateChangedBits: context._calculateChangedBits, + }; // $FlowFixMe: Flow complains about not setting a value, which is intentional here + + Object.defineProperties(Consumer, { + Provider: { + get: function () { + if (!hasWarnedAboutUsingConsumerProvider) { + hasWarnedAboutUsingConsumerProvider = true; + warning$1( + false, + 'Rendering <Context.Consumer.Provider> is not supported and will be removed in ' + + 'a future major release. Did you mean to render <Context.Provider> instead?', + ); + } + + return context.Provider; + }, + set: function (_Provider) { + context.Provider = _Provider; + }, + }, + _currentValue: { + get: function () { + return context._currentValue; + }, + set: function (_currentValue) { + context._currentValue = _currentValue; + }, + }, + _currentValue2: { + get: function () { + return context._currentValue2; + }, + set: function (_currentValue2) { + context._currentValue2 = _currentValue2; + }, + }, + _threadCount: { + get: function () { + return context._threadCount; + }, + set: function (_threadCount) { + context._threadCount = _threadCount; + }, + }, + Consumer: { + get: function () { + if (!hasWarnedAboutUsingNestedContextConsumers) { + hasWarnedAboutUsingNestedContextConsumers = true; + warning$1( + false, + 'Rendering <Context.Consumer.Consumer> is not supported and will be removed in ' + + 'a future major release. Did you mean to render <Context.Consumer> instead?', + ); + } + + return context.Consumer; + }, + }, + }); // $FlowFixMe: Flow complains about missing properties because it doesn't understand defineProperty + + context.Consumer = Consumer; + } + + { + context._currentRenderer = null; + context._currentRenderer2 = null; + } + + return context; + } + + function lazy(ctor) { + var lazyType = { + $$typeof: REACT_LAZY_TYPE, + _ctor: ctor, + // React uses these fields to store the result. + _status: -1, + _result: null, + }; + + { + // In production, this would just set it on the object. + var defaultProps; + var propTypes; + Object.defineProperties(lazyType, { + defaultProps: { + configurable: true, + get: function () { + return defaultProps; + }, + set: function (newDefaultProps) { + warning$1( + false, + 'React.lazy(...): It is not supported to assign `defaultProps` to ' + + 'a lazy component import. Either specify them where the component ' + + 'is defined, or create a wrapping component around it.', + ); + defaultProps = newDefaultProps; // Match production behavior more closely: + + Object.defineProperty(lazyType, 'defaultProps', { + enumerable: true, + }); + }, + }, + propTypes: { + configurable: true, + get: function () { + return propTypes; + }, + set: function (newPropTypes) { + warning$1( + false, + 'React.lazy(...): It is not supported to assign `propTypes` to ' + + 'a lazy component import. Either specify them where the component ' + + 'is defined, or create a wrapping component around it.', + ); + propTypes = newPropTypes; // Match production behavior more closely: + + Object.defineProperty(lazyType, 'propTypes', { + enumerable: true, + }); + }, + }, + }); + } + + return lazyType; + } + + function forwardRef(render) { + { + if (render != null && render.$$typeof === REACT_MEMO_TYPE) { + warningWithoutStack$1( + false, + 'forwardRef requires a render function but received a `memo` ' + + 'component. Instead of forwardRef(memo(...)), use ' + + 'memo(forwardRef(...)).', + ); + } else if (typeof render !== 'function') { + warningWithoutStack$1( + false, + 'forwardRef requires a render function but was given %s.', + render === null ? 'null' : typeof render, + ); + } else { + !( + // Do not warn for 0 arguments because it could be due to usage of the 'arguments' object + (render.length === 0 || render.length === 2) + ) + ? warningWithoutStack$1( + false, + 'forwardRef render functions accept exactly two parameters: props and ref. %s', + render.length === 1 + ? 'Did you forget to use the ref parameter?' + : 'Any additional parameter will be undefined.', + ) + : void 0; + } + + if (render != null) { + !(render.defaultProps == null && render.propTypes == null) + ? warningWithoutStack$1( + false, + 'forwardRef render functions do not support propTypes or defaultProps. ' + + 'Did you accidentally pass a React component?', + ) + : void 0; + } + } + + return { + $$typeof: REACT_FORWARD_REF_TYPE, + render: render, + }; + } + + function isValidElementType(type) { + return ( + typeof type === 'string' || + typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill. + type === REACT_FRAGMENT_TYPE || + type === REACT_CONCURRENT_MODE_TYPE || + type === REACT_PROFILER_TYPE || + type === REACT_STRICT_MODE_TYPE || + type === REACT_SUSPENSE_TYPE || + type === REACT_SUSPENSE_LIST_TYPE || + (typeof type === 'object' && + type !== null && + (type.$$typeof === REACT_LAZY_TYPE || + type.$$typeof === REACT_MEMO_TYPE || + type.$$typeof === REACT_PROVIDER_TYPE || + type.$$typeof === REACT_CONTEXT_TYPE || + type.$$typeof === REACT_FORWARD_REF_TYPE || + type.$$typeof === REACT_FUNDAMENTAL_TYPE || + type.$$typeof === REACT_RESPONDER_TYPE || + type.$$typeof === REACT_SCOPE_TYPE)) + ); + } + + function memo(type, compare) { + { + if (!isValidElementType(type)) { + warningWithoutStack$1( + false, + 'memo: The first argument must be a component. Instead ' + 'received: %s', + type === null ? 'null' : typeof type, + ); + } + } + + return { + $$typeof: REACT_MEMO_TYPE, + type: type, + compare: compare === undefined ? null : compare, + }; + } + + function resolveDispatcher() { + var dispatcher = ReactCurrentDispatcher.current; + + if (!(dispatcher !== null)) { + { + throw Error( + 'Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.', + ); + } + } + + return dispatcher; + } + + function useContext(Context, unstable_observedBits) { + var dispatcher = resolveDispatcher(); + + { + !(unstable_observedBits === undefined) + ? warning$1( + false, + 'useContext() second argument is reserved for future ' + + 'use in React. Passing it is not supported. ' + + 'You passed: %s.%s', + unstable_observedBits, + typeof unstable_observedBits === 'number' && Array.isArray(arguments[2]) + ? '\n\nDid you call array.map(useContext)? ' + + 'Calling Hooks inside a loop is not supported. ' + + 'Learn more at https://fb.me/rules-of-hooks' + : '', + ) + : void 0; // TODO: add a more generic warning for invalid values. + + if (Context._context !== undefined) { + var realContext = Context._context; // Don't deduplicate because this legitimately causes bugs + // and nobody should be using this in existing code. + + if (realContext.Consumer === Context) { + warning$1( + false, + 'Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be ' + + 'removed in a future major release. Did you mean to call useContext(Context) instead?', + ); + } else if (realContext.Provider === Context) { + warning$1( + false, + 'Calling useContext(Context.Provider) is not supported. ' + + 'Did you mean to call useContext(Context) instead?', + ); + } + } + } + + return dispatcher.useContext(Context, unstable_observedBits); + } + function useState(initialState) { + var dispatcher = resolveDispatcher(); + return dispatcher.useState(initialState); + } + function useReducer(reducer, initialArg, init) { + var dispatcher = resolveDispatcher(); + return dispatcher.useReducer(reducer, initialArg, init); + } + function useRef(initialValue) { + var dispatcher = resolveDispatcher(); + return dispatcher.useRef(initialValue); + } + function useEffect(create, inputs) { + var dispatcher = resolveDispatcher(); + return dispatcher.useEffect(create, inputs); + } + function useLayoutEffect(create, inputs) { + var dispatcher = resolveDispatcher(); + return dispatcher.useLayoutEffect(create, inputs); + } + function useCallback(callback, inputs) { + var dispatcher = resolveDispatcher(); + return dispatcher.useCallback(callback, inputs); + } + function useMemo(create, inputs) { + var dispatcher = resolveDispatcher(); + return dispatcher.useMemo(create, inputs); + } + function useImperativeHandle(ref, create, inputs) { + var dispatcher = resolveDispatcher(); + return dispatcher.useImperativeHandle(ref, create, inputs); + } + function useDebugValue(value, formatterFn) { + { + var dispatcher = resolveDispatcher(); + return dispatcher.useDebugValue(value, formatterFn); + } + } + var emptyObject$1 = {}; + function useResponder(responder, listenerProps) { + var dispatcher = resolveDispatcher(); + + { + if (responder == null || responder.$$typeof !== REACT_RESPONDER_TYPE) { + warning$1( + false, + 'useResponder: invalid first argument. Expected an event responder, but instead got %s', + responder, + ); + return; + } + } + + return dispatcher.useResponder(responder, listenerProps || emptyObject$1); + } + function useTransition(config) { + var dispatcher = resolveDispatcher(); + return dispatcher.useTransition(config); + } + function useDeferredValue(value, config) { + var dispatcher = resolveDispatcher(); + return dispatcher.useDeferredValue(value, config); + } + + function withSuspenseConfig(scope, config) { + var previousConfig = ReactCurrentBatchConfig.suspense; + ReactCurrentBatchConfig.suspense = config === undefined ? null : config; + + try { + scope(); + } finally { + ReactCurrentBatchConfig.suspense = previousConfig; + } + } + + /** + * ReactElementValidator provides a wrapper around a element factory + * which validates the props passed to the element. This is intended to be + * used only in DEV and could be replaced by a static type checker for languages + * that support it. + */ + var propTypesMisspellWarningShown; + + { + propTypesMisspellWarningShown = false; + } + + var hasOwnProperty$1 = Object.prototype.hasOwnProperty; + + function getDeclarationErrorAddendum() { + if (ReactCurrentOwner.current) { + var name = getComponentName(ReactCurrentOwner.current.type); + + if (name) { + return '\n\nCheck the render method of `' + name + '`.'; + } + } + + return ''; + } + + function getSourceInfoErrorAddendum(source) { + if (source !== undefined) { + var fileName = source.fileName.replace(/^.*[\\\/]/, ''); + var lineNumber = source.lineNumber; + return '\n\nCheck your code at ' + fileName + ':' + lineNumber + '.'; + } + + return ''; + } + + function getSourceInfoErrorAddendumForProps(elementProps) { + if (elementProps !== null && elementProps !== undefined) { + return getSourceInfoErrorAddendum(elementProps.__source); + } + + return ''; + } + /** + * Warn if there's no key explicitly set on dynamic arrays of children or + * object keys are not valid. This allows us to keep track of children between + * updates. + */ + + var ownerHasKeyUseWarning = {}; + + function getCurrentComponentErrorInfo(parentType) { + var info = getDeclarationErrorAddendum(); + + if (!info) { + var parentName = + typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name; + + if (parentName) { + info = '\n\nCheck the top-level render call using <' + parentName + '>.'; + } + } + + return info; + } + /** + * Warn if the element doesn't have an explicit key assigned to it. + * This element is in an array. The array could grow and shrink or be + * reordered. All children that haven't already been validated are required to + * have a "key" property assigned to it. Error statuses are cached so a warning + * will only be shown once. + * + * @internal + * @param {ReactElement} element Element that requires a key. + * @param {*} parentType element's parent's type. + */ + + function validateExplicitKey(element, parentType) { + if (!element._store || element._store.validated || element.key != null) { + return; + } + + element._store.validated = true; + var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType); + + if (ownerHasKeyUseWarning[currentComponentErrorInfo]) { + return; + } + + ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a + // property, it may be the creator of the child that's responsible for + // assigning it a key. + + var childOwner = ''; + + if (element && element._owner && element._owner !== ReactCurrentOwner.current) { + // Give the component that originally created this child. + childOwner = ' It was passed a child from ' + getComponentName(element._owner.type) + '.'; + } + + setCurrentlyValidatingElement(element); + + { + warning$1( + false, + 'Each child in a list should have a unique "key" prop.' + + '%s%s See https://fb.me/react-warning-keys for more information.', + currentComponentErrorInfo, + childOwner, + ); + } + + setCurrentlyValidatingElement(null); + } + /** + * Ensure that every element either is passed in a static location, in an + * array with an explicit keys property defined, or in an object literal + * with valid key property. + * + * @internal + * @param {ReactNode} node Statically passed child of any type. + * @param {*} parentType node's parent's type. + */ + + function validateChildKeys(node, parentType) { + if (typeof node !== 'object') { + return; + } + + if (Array.isArray(node)) { + for (var i = 0; i < node.length; i++) { + var child = node[i]; + + if (isValidElement(child)) { + validateExplicitKey(child, parentType); + } + } + } else if (isValidElement(node)) { + // This element was passed in a valid location. + if (node._store) { + node._store.validated = true; + } + } else if (node) { + var iteratorFn = getIteratorFn(node); + + if (typeof iteratorFn === 'function') { + // Entry iterators used to provide implicit keys, + // but now we print a separate warning for them later. + if (iteratorFn !== node.entries) { + var iterator = iteratorFn.call(node); + var step; + + while (!(step = iterator.next()).done) { + if (isValidElement(step.value)) { + validateExplicitKey(step.value, parentType); + } + } + } + } + } + } + /** + * Given an element, validate that its props follow the propTypes definition, + * provided by the type. + * + * @param {ReactElement} element + */ + + function validatePropTypes(element) { + var type = element.type; + + if (type === null || type === undefined || typeof type === 'string') { + return; + } + + var name = getComponentName(type); + var propTypes; + + if (typeof type === 'function') { + propTypes = type.propTypes; + } else if ( + typeof type === 'object' && + (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here. + // Inner props are checked in the reconciler. + type.$$typeof === REACT_MEMO_TYPE) + ) { + propTypes = type.propTypes; + } else { + return; + } + + if (propTypes) { + setCurrentlyValidatingElement(element); + checkPropTypes(propTypes, element.props, 'prop', name, ReactDebugCurrentFrame.getStackAddendum); + setCurrentlyValidatingElement(null); + } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) { + propTypesMisspellWarningShown = true; + warningWithoutStack$1( + false, + 'Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', + name || 'Unknown', + ); + } + + if (typeof type.getDefaultProps === 'function') { + !type.getDefaultProps.isReactClassApproved + ? warningWithoutStack$1( + false, + 'getDefaultProps is only used on classic React.createClass ' + + 'definitions. Use a static property named `defaultProps` instead.', + ) + : void 0; + } + } + /** + * Given a fragment, validate that it can only be provided with fragment props + * @param {ReactElement} fragment + */ + + function validateFragmentProps(fragment) { + setCurrentlyValidatingElement(fragment); + var keys = Object.keys(fragment.props); + + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + + if (key !== 'children' && key !== 'key') { + warning$1( + false, + 'Invalid prop `%s` supplied to `React.Fragment`. ' + + 'React.Fragment can only have `key` and `children` props.', + key, + ); + break; + } + } + + if (fragment.ref !== null) { + warning$1(false, 'Invalid attribute `ref` supplied to `React.Fragment`.'); + } + + setCurrentlyValidatingElement(null); + } + + function jsxWithValidation(type, props, key, isStaticChildren, source, self) { + var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to + // succeed and there will likely be errors in render. + + if (!validType) { + var info = ''; + + if ( + type === undefined || + (typeof type === 'object' && type !== null && Object.keys(type).length === 0) + ) { + info += + ' You likely forgot to export your component from the file ' + + "it's defined in, or you might have mixed up default and named imports."; + } + + var sourceInfo = getSourceInfoErrorAddendum(source); + + if (sourceInfo) { + info += sourceInfo; + } else { + info += getDeclarationErrorAddendum(); + } + + var typeString; + + if (type === null) { + typeString = 'null'; + } else if (Array.isArray(type)) { + typeString = 'array'; + } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) { + typeString = '<' + (getComponentName(type.type) || 'Unknown') + ' />'; + info = ' Did you accidentally export a JSX literal instead of a component?'; + } else { + typeString = typeof type; + } + + warning$1( + false, + 'React.jsx: type is invalid -- expected a string (for ' + + 'built-in components) or a class/function (for composite ' + + 'components) but got: %s.%s', + typeString, + info, + ); + } + + var element = jsxDEV(type, props, key, source, self); // The result can be nullish if a mock or a custom function is used. + // TODO: Drop this when these are no longer allowed as the type argument. + + if (element == null) { + return element; + } // Skip key warning if the type isn't valid since our key validation logic + // doesn't expect a non-string/function type and can throw confusing errors. + // We don't want exception behavior to differ between dev and prod. + // (Rendering will throw with a helpful message and as soon as the type is + // fixed, the key warnings will appear.) + + if (validType) { + var children = props.children; + + if (children !== undefined) { + if (isStaticChildren) { + if (Array.isArray(children)) { + for (var i = 0; i < children.length; i++) { + validateChildKeys(children[i], type); + } + + if (Object.freeze) { + Object.freeze(children); + } + } else { + warning$1( + false, + 'React.jsx: Static children should always be an array. ' + + 'You are likely explicitly calling React.jsxs or React.jsxDEV. ' + + 'Use the Babel transform instead.', + ); + } + } else { + validateChildKeys(children, type); + } + } + } + + if (hasOwnProperty$1.call(props, 'key')) { + warning$1( + false, + 'React.jsx: Spreading a key to JSX is a deprecated pattern. ' + + 'Explicitly pass a key after spreading props in your JSX call. ' + + 'E.g. <ComponentName {...props} key={key} />', + ); + } + + if (type === REACT_FRAGMENT_TYPE) { + validateFragmentProps(element); + } else { + validatePropTypes(element); + } + + return element; + } // These two functions exist to still get child warnings in dev + // even with the prod transform. This means that jsxDEV is purely + // opt-in behavior for better messages but that we won't stop + // giving you warnings if you use production apis. + + function jsxWithValidationStatic(type, props, key) { + return jsxWithValidation(type, props, key, true); + } + function jsxWithValidationDynamic(type, props, key) { + return jsxWithValidation(type, props, key, false); + } + function createElementWithValidation(type, props, children) { + var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to + // succeed and there will likely be errors in render. + + if (!validType) { + var info = ''; + + if ( + type === undefined || + (typeof type === 'object' && type !== null && Object.keys(type).length === 0) + ) { + info += + ' You likely forgot to export your component from the file ' + + "it's defined in, or you might have mixed up default and named imports."; + } + + var sourceInfo = getSourceInfoErrorAddendumForProps(props); + + if (sourceInfo) { + info += sourceInfo; + } else { + info += getDeclarationErrorAddendum(); + } + + var typeString; + + if (type === null) { + typeString = 'null'; + } else if (Array.isArray(type)) { + typeString = 'array'; + } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) { + typeString = '<' + (getComponentName(type.type) || 'Unknown') + ' />'; + info = ' Did you accidentally export a JSX literal instead of a component?'; + } else { + typeString = typeof type; + } + + warning$1( + false, + 'React.createElement: type is invalid -- expected a string (for ' + + 'built-in components) or a class/function (for composite ' + + 'components) but got: %s.%s', + typeString, + info, + ); + } + + var element = createElement.apply(this, arguments); // The result can be nullish if a mock or a custom function is used. + // TODO: Drop this when these are no longer allowed as the type argument. + + if (element == null) { + return element; + } // Skip key warning if the type isn't valid since our key validation logic + // doesn't expect a non-string/function type and can throw confusing errors. + // We don't want exception behavior to differ between dev and prod. + // (Rendering will throw with a helpful message and as soon as the type is + // fixed, the key warnings will appear.) + + if (validType) { + for (var i = 2; i < arguments.length; i++) { + validateChildKeys(arguments[i], type); + } + } + + if (type === REACT_FRAGMENT_TYPE) { + validateFragmentProps(element); + } else { + validatePropTypes(element); + } + + return element; + } + function createFactoryWithValidation(type) { + var validatedFactory = createElementWithValidation.bind(null, type); + validatedFactory.type = type; // Legacy hook: remove it + + { + Object.defineProperty(validatedFactory, 'type', { + enumerable: false, + get: function () { + lowPriorityWarningWithoutStack$1( + false, + 'Factory.type is deprecated. Access the class directly ' + + 'before passing it to createFactory.', + ); + Object.defineProperty(this, 'type', { + value: type, + }); + return type; + }, + }); + } + + return validatedFactory; + } + function cloneElementWithValidation(element, props, children) { + var newElement = cloneElement.apply(this, arguments); + + for (var i = 2; i < arguments.length; i++) { + validateChildKeys(arguments[i], newElement.type); + } + + validatePropTypes(newElement); + return newElement; + } + + var hasBadMapPolyfill; + + { + hasBadMapPolyfill = false; + + try { + var frozenObject = Object.freeze({}); + var testMap = new Map([[frozenObject, null]]); + var testSet = new Set([frozenObject]); // This is necessary for Rollup to not consider these unused. + // https://github.com/rollup/rollup/issues/1771 + // TODO: we can remove these if Rollup fixes the bug. + + testMap.set(0, 0); + testSet.add(0); + } catch (e) { + // TODO: Consider warning about bad polyfills + hasBadMapPolyfill = true; + } + } + + function createFundamentalComponent(impl) { + // We use responder as a Map key later on. When we have a bad + // polyfill, then we can't use it as a key as the polyfill tries + // to add a property to the object. + if (true && !hasBadMapPolyfill) { + Object.freeze(impl); + } + + var fundamantalComponent = { + $$typeof: REACT_FUNDAMENTAL_TYPE, + impl: impl, + }; + + { + Object.freeze(fundamantalComponent); + } + + return fundamantalComponent; + } + + function createEventResponder(displayName, responderConfig) { + var getInitialState = responderConfig.getInitialState, + onEvent = responderConfig.onEvent, + onMount = responderConfig.onMount, + onUnmount = responderConfig.onUnmount, + onRootEvent = responderConfig.onRootEvent, + rootEventTypes = responderConfig.rootEventTypes, + targetEventTypes = responderConfig.targetEventTypes, + targetPortalPropagation = responderConfig.targetPortalPropagation; + var eventResponder = { + $$typeof: REACT_RESPONDER_TYPE, + displayName: displayName, + getInitialState: getInitialState || null, + onEvent: onEvent || null, + onMount: onMount || null, + onRootEvent: onRootEvent || null, + onUnmount: onUnmount || null, + rootEventTypes: rootEventTypes || null, + targetEventTypes: targetEventTypes || null, + targetPortalPropagation: targetPortalPropagation || false, + }; // We use responder as a Map key later on. When we have a bad + // polyfill, then we can't use it as a key as the polyfill tries + // to add a property to the object. + + if (true && !hasBadMapPolyfill) { + Object.freeze(eventResponder); + } + + return eventResponder; + } + + function createScope() { + var scopeComponent = { + $$typeof: REACT_SCOPE_TYPE, + }; + + { + Object.freeze(scopeComponent); + } + + return scopeComponent; + } + + // Helps identify side effects in render-phase lifecycle hooks and setState + // reducers by double invoking them in Strict Mode. + + // To preserve the "Pause on caught exceptions" behavior of the debugger, we + // replay the begin phase of a failed component inside invokeGuardedCallback. + + // Warn about deprecated, async-unsafe lifecycles; relates to RFC #6: + + // Gather advanced timing metrics for Profiler subtrees. + + // Trace which interactions trigger each commit. + + // SSR experiments + + // Only used in www builds. + + // Only used in www builds. + + // Disable javascript: URL strings in href for XSS protection. + + // React Fire: prevent the value and checked attributes from syncing + // with their related DOM properties + + // These APIs will no longer be "unstable" in the upcoming 16.7 release, + // Control this behavior with a flag to support 16.6 minor releases in the meanwhile. + + var exposeConcurrentModeAPIs = false; + // Experimental React Flare event system and event components support. + + var enableFlareAPI = false; // Experimental Host Component support. + + var enableFundamentalAPI = false; // Experimental Scope support. + + var enableScopeAPI = false; // New API for JSX transforms to target - https://github.com/reactjs/rfcs/pull/107 + + var enableJSXTransformAPI = false; // We will enforce mocking scheduler with scheduler/unstable_mock at some point. (v17?) + // Till then, we warn about the missing mock, but still fallback to a legacy mode compatible version + + // For tests, we flush suspense fallbacks in an act scope; + // *except* in some of our own tests, where we test incremental loading states. + + // Add a callback property to suspense to notify which promises are currently + // in the update queue. This allows reporting and tracing of what is causing + // the user to see a loading state. + // Also allows hydration callbacks to fire when a dehydrated boundary gets + // hydrated or deleted. + + // Part of the simplification of React.createElement so we can eventually move + // from React.createElement to React.jsx + // https://github.com/reactjs/rfcs/blob/createlement-rfc/text/0000-create-element-changes.md + + // Flag to turn event.target and event.currentTarget in ReactNative from a reactTag to a component instance + + var React = { + Children: { + map: mapChildren, + forEach: forEachChildren, + count: countChildren, + toArray: toArray, + only: onlyChild, + }, + createRef: createRef, + Component: Component, + PureComponent: PureComponent, + createContext: createContext, + forwardRef: forwardRef, + lazy: lazy, + memo: memo, + useCallback: useCallback, + useContext: useContext, + useEffect: useEffect, + useImperativeHandle: useImperativeHandle, + useDebugValue: useDebugValue, + useLayoutEffect: useLayoutEffect, + useMemo: useMemo, + useReducer: useReducer, + useRef: useRef, + useState: useState, + Fragment: REACT_FRAGMENT_TYPE, + Profiler: REACT_PROFILER_TYPE, + StrictMode: REACT_STRICT_MODE_TYPE, + Suspense: REACT_SUSPENSE_TYPE, + createElement: createElementWithValidation, + cloneElement: cloneElementWithValidation, + createFactory: createFactoryWithValidation, + isValidElement: isValidElement, + version: ReactVersion, + __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: ReactSharedInternals, + }; + + if (exposeConcurrentModeAPIs) { + React.useTransition = useTransition; + React.useDeferredValue = useDeferredValue; + React.SuspenseList = REACT_SUSPENSE_LIST_TYPE; + React.unstable_withSuspenseConfig = withSuspenseConfig; + } + + if (enableFlareAPI) { + React.unstable_useResponder = useResponder; + React.unstable_createResponder = createEventResponder; + } + + if (enableFundamentalAPI) { + React.unstable_createFundamental = createFundamentalComponent; + } + + if (enableScopeAPI) { + React.unstable_createScope = createScope; + } // Note: some APIs are added with feature flags. + // Make sure that stable builds for open source + // don't modify the React object to avoid deopts. + // Also let's not expose their names in stable builds. + + if (enableJSXTransformAPI) { + { + React.jsxDEV = jsxWithValidation; + React.jsx = jsxWithValidationDynamic; + React.jsxs = jsxWithValidationStatic; + } + } + + var React$2 = Object.freeze({ + default: React, + }); + + var React$3 = (React$2 && React) || React$2; + + // TODO: decide on the top-level export form. + // This is hacky but makes it work with both Rollup and Jest. + + var react = React$3.default || React$3; + + module.exports = react; + })(); + } + + /***/ + }, + /* 513 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + if (false) { + module.exports = require('./cjs/scheduler.production.min.js'); + } else { + module.exports = __webpack_require__(514); + } + + /***/ + }, + /* 514 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** @license React v0.18.0 + * scheduler.development.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + + if (true) { + (function () { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { value: true }); + + var enableSchedulerDebugging = false; + var enableIsInputPending = false; + var enableProfiling = true; + + var requestHostCallback; + + var requestHostTimeout; + var cancelHostTimeout; + var shouldYieldToHost; + var requestPaint; + + if ( + // If Scheduler runs in a non-DOM environment, it falls back to a naive + // implementation using setTimeout. + typeof window === 'undefined' || // Check if MessageChannel is supported, too. + typeof MessageChannel !== 'function' + ) { + // If this accidentally gets imported in a non-browser environment, e.g. JavaScriptCore, + // fallback to a naive implementation. + var _callback = null; + var _timeoutID = null; + + var _flushCallback = function () { + if (_callback !== null) { + try { + var currentTime = exports.unstable_now(); + var hasRemainingTime = true; + + _callback(hasRemainingTime, currentTime); + + _callback = null; + } catch (e) { + setTimeout(_flushCallback, 0); + throw e; + } + } + }; + + var initialTime = Date.now(); + + exports.unstable_now = function () { + return Date.now() - initialTime; + }; + + requestHostCallback = function (cb) { + if (_callback !== null) { + // Protect against re-entrancy. + setTimeout(requestHostCallback, 0, cb); + } else { + _callback = cb; + setTimeout(_flushCallback, 0); + } + }; + + requestHostTimeout = function (cb, ms) { + _timeoutID = setTimeout(cb, ms); + }; + + cancelHostTimeout = function () { + clearTimeout(_timeoutID); + }; + + shouldYieldToHost = function () { + return false; + }; + + requestPaint = exports.unstable_forceFrameRate = function () {}; + } else { + // Capture local references to native APIs, in case a polyfill overrides them. + var performance = window.performance; + var _Date = window.Date; + var _setTimeout = window.setTimeout; + var _clearTimeout = window.clearTimeout; + + if (typeof console !== 'undefined') { + // TODO: Scheduler no longer requires these methods to be polyfilled. But + // maybe we want to continue warning if they don't exist, to preserve the + // option to rely on it in the future? + var requestAnimationFrame = window.requestAnimationFrame; + var cancelAnimationFrame = window.cancelAnimationFrame; // TODO: Remove fb.me link + + if (typeof requestAnimationFrame !== 'function') { + console.error( + "This browser doesn't support requestAnimationFrame. " + + 'Make sure that you load a ' + + 'polyfill in older browsers. https://fb.me/react-polyfills', + ); + } + + if (typeof cancelAnimationFrame !== 'function') { + console.error( + "This browser doesn't support cancelAnimationFrame. " + + 'Make sure that you load a ' + + 'polyfill in older browsers. https://fb.me/react-polyfills', + ); + } + } + + if (typeof performance === 'object' && typeof performance.now === 'function') { + exports.unstable_now = function () { + return performance.now(); + }; + } else { + var _initialTime = _Date.now(); + + exports.unstable_now = function () { + return _Date.now() - _initialTime; + }; + } + + var isMessageLoopRunning = false; + var scheduledHostCallback = null; + var taskTimeoutID = -1; // Scheduler periodically yields in case there is other work on the main + // thread, like user events. By default, it yields multiple times per frame. + // It does not attempt to align with frame boundaries, since most tasks don't + // need to be frame aligned; for those that do, use requestAnimationFrame. + + var yieldInterval = 5; + var deadline = 0; // TODO: Make this configurable + // TODO: Adjust this based on priority? + + var maxYieldInterval = 300; + var needsPaint = false; + + if ( + enableIsInputPending && + navigator !== undefined && + navigator.scheduling !== undefined && + navigator.scheduling.isInputPending !== undefined + ) { + var scheduling = navigator.scheduling; + + shouldYieldToHost = function () { + var currentTime = exports.unstable_now(); + + if (currentTime >= deadline) { + // There's no time left. We may want to yield control of the main + // thread, so the browser can perform high priority tasks. The main ones + // are painting and user input. If there's a pending paint or a pending + // input, then we should yield. But if there's neither, then we can + // yield less often while remaining responsive. We'll eventually yield + // regardless, since there could be a pending paint that wasn't + // accompanied by a call to `requestPaint`, or other main thread tasks + // like network events. + if (needsPaint || scheduling.isInputPending()) { + // There is either a pending paint or a pending input. + return true; + } // There's no pending input. Only yield if we've reached the max + // yield interval. + + return currentTime >= maxYieldInterval; + } else { + // There's still time left in the frame. + return false; + } + }; + + requestPaint = function () { + needsPaint = true; + }; + } else { + // `isInputPending` is not available. Since we have no way of knowing if + // there's pending input, always yield at the end of the frame. + shouldYieldToHost = function () { + return exports.unstable_now() >= deadline; + }; // Since we yield every frame regardless, `requestPaint` has no effect. + + requestPaint = function () {}; + } + + exports.unstable_forceFrameRate = function (fps) { + if (fps < 0 || fps > 125) { + console.error( + 'forceFrameRate takes a positive int between 0 and 125, ' + + 'forcing framerates higher than 125 fps is not unsupported', + ); + return; + } + + if (fps > 0) { + yieldInterval = Math.floor(1000 / fps); + } else { + // reset the framerate + yieldInterval = 5; + } + }; + + var performWorkUntilDeadline = function () { + if (scheduledHostCallback !== null) { + var currentTime = exports.unstable_now(); // Yield after `yieldInterval` ms, regardless of where we are in the vsync + // cycle. This means there's always time remaining at the beginning of + // the message event. + + deadline = currentTime + yieldInterval; + var hasTimeRemaining = true; + + try { + var hasMoreWork = scheduledHostCallback(hasTimeRemaining, currentTime); + + if (!hasMoreWork) { + isMessageLoopRunning = false; + scheduledHostCallback = null; + } else { + // If there's more work, schedule the next message event at the end + // of the preceding one. + port.postMessage(null); + } + } catch (error) { + // If a scheduler task throws, exit the current browser task so the + // error can be observed. + port.postMessage(null); + throw error; + } + } else { + isMessageLoopRunning = false; + } // Yielding to the browser will give it a chance to paint, so we can + // reset this. + + needsPaint = false; + }; + + var channel = new MessageChannel(); + var port = channel.port2; + channel.port1.onmessage = performWorkUntilDeadline; + + requestHostCallback = function (callback) { + scheduledHostCallback = callback; + + if (!isMessageLoopRunning) { + isMessageLoopRunning = true; + port.postMessage(null); + } + }; + + requestHostTimeout = function (callback, ms) { + taskTimeoutID = _setTimeout(function () { + callback(exports.unstable_now()); + }, ms); + }; + + cancelHostTimeout = function () { + _clearTimeout(taskTimeoutID); + + taskTimeoutID = -1; + }; + } + + function push(heap, node) { + var index = heap.length; + heap.push(node); + siftUp(heap, node, index); + } + function peek(heap) { + var first = heap[0]; + return first === undefined ? null : first; + } + function pop(heap) { + var first = heap[0]; + + if (first !== undefined) { + var last = heap.pop(); + + if (last !== first) { + heap[0] = last; + siftDown(heap, last, 0); + } + + return first; + } else { + return null; + } + } + + function siftUp(heap, node, i) { + var index = i; + + while (true) { + var parentIndex = Math.floor((index - 1) / 2); + var parent = heap[parentIndex]; + + if (parent !== undefined && compare(parent, node) > 0) { + // The parent is larger. Swap positions. + heap[parentIndex] = node; + heap[index] = parent; + index = parentIndex; + } else { + // The parent is smaller. Exit. + return; + } + } + } + + function siftDown(heap, node, i) { + var index = i; + var length = heap.length; + + while (index < length) { + var leftIndex = (index + 1) * 2 - 1; + var left = heap[leftIndex]; + var rightIndex = leftIndex + 1; + var right = heap[rightIndex]; // If the left or right node is smaller, swap with the smaller of those. + + if (left !== undefined && compare(left, node) < 0) { + if (right !== undefined && compare(right, left) < 0) { + heap[index] = right; + heap[rightIndex] = node; + index = rightIndex; + } else { + heap[index] = left; + heap[leftIndex] = node; + index = leftIndex; + } + } else if (right !== undefined && compare(right, node) < 0) { + heap[index] = right; + heap[rightIndex] = node; + index = rightIndex; + } else { + // Neither child is smaller. Exit. + return; + } + } + } + + function compare(a, b) { + // Compare sort index first, then task id. + var diff = a.sortIndex - b.sortIndex; + return diff !== 0 ? diff : a.id - b.id; + } + + // TODO: Use symbols? + var NoPriority = 0; + var ImmediatePriority = 1; + var UserBlockingPriority = 2; + var NormalPriority = 3; + var LowPriority = 4; + var IdlePriority = 5; + + var runIdCounter = 0; + var mainThreadIdCounter = 0; + var profilingStateSize = 4; + var sharedProfilingBuffer = enableProfiling // $FlowFixMe Flow doesn't know about SharedArrayBuffer + ? typeof SharedArrayBuffer === 'function' + ? new SharedArrayBuffer(profilingStateSize * Int32Array.BYTES_PER_ELEMENT) // $FlowFixMe Flow doesn't know about ArrayBuffer + : typeof ArrayBuffer === 'function' + ? new ArrayBuffer(profilingStateSize * Int32Array.BYTES_PER_ELEMENT) + : null // Don't crash the init path on IE9 + : null; + var profilingState = + enableProfiling && sharedProfilingBuffer !== null ? new Int32Array(sharedProfilingBuffer) : []; // We can't read this but it helps save bytes for null checks + + var PRIORITY = 0; + var CURRENT_TASK_ID = 1; + var CURRENT_RUN_ID = 2; + var QUEUE_SIZE = 3; + + if (enableProfiling) { + profilingState[PRIORITY] = NoPriority; // This is maintained with a counter, because the size of the priority queue + // array might include canceled tasks. + + profilingState[QUEUE_SIZE] = 0; + profilingState[CURRENT_TASK_ID] = 0; + } // Bytes per element is 4 + + var INITIAL_EVENT_LOG_SIZE = 131072; + var MAX_EVENT_LOG_SIZE = 524288; // Equivalent to 2 megabytes + + var eventLogSize = 0; + var eventLogBuffer = null; + var eventLog = null; + var eventLogIndex = 0; + var TaskStartEvent = 1; + var TaskCompleteEvent = 2; + var TaskErrorEvent = 3; + var TaskCancelEvent = 4; + var TaskRunEvent = 5; + var TaskYieldEvent = 6; + var SchedulerSuspendEvent = 7; + var SchedulerResumeEvent = 8; + + function logEvent(entries) { + if (eventLog !== null) { + var offset = eventLogIndex; + eventLogIndex += entries.length; + + if (eventLogIndex + 1 > eventLogSize) { + eventLogSize *= 2; + + if (eventLogSize > MAX_EVENT_LOG_SIZE) { + console.error( + "Scheduler Profiling: Event log exceeded maximum size. Don't " + + 'forget to call `stopLoggingProfilingEvents()`.', + ); + stopLoggingProfilingEvents(); + return; + } + + var newEventLog = new Int32Array(eventLogSize * 4); + newEventLog.set(eventLog); + eventLogBuffer = newEventLog.buffer; + eventLog = newEventLog; + } + + eventLog.set(entries, offset); + } + } + + function startLoggingProfilingEvents() { + eventLogSize = INITIAL_EVENT_LOG_SIZE; + eventLogBuffer = new ArrayBuffer(eventLogSize * 4); + eventLog = new Int32Array(eventLogBuffer); + eventLogIndex = 0; + } + function stopLoggingProfilingEvents() { + var buffer = eventLogBuffer; + eventLogSize = 0; + eventLogBuffer = null; + eventLog = null; + eventLogIndex = 0; + return buffer; + } + function markTaskStart(task, ms) { + if (enableProfiling) { + profilingState[QUEUE_SIZE]++; + + if (eventLog !== null) { + // performance.now returns a float, representing milliseconds. When the + // event is logged, it's coerced to an int. Convert to microseconds to + // maintain extra degrees of precision. + logEvent([TaskStartEvent, ms * 1000, task.id, task.priorityLevel]); + } + } + } + function markTaskCompleted(task, ms) { + if (enableProfiling) { + profilingState[PRIORITY] = NoPriority; + profilingState[CURRENT_TASK_ID] = 0; + profilingState[QUEUE_SIZE]--; + + if (eventLog !== null) { + logEvent([TaskCompleteEvent, ms * 1000, task.id]); + } + } + } + function markTaskCanceled(task, ms) { + if (enableProfiling) { + profilingState[QUEUE_SIZE]--; + + if (eventLog !== null) { + logEvent([TaskCancelEvent, ms * 1000, task.id]); + } + } + } + function markTaskErrored(task, ms) { + if (enableProfiling) { + profilingState[PRIORITY] = NoPriority; + profilingState[CURRENT_TASK_ID] = 0; + profilingState[QUEUE_SIZE]--; + + if (eventLog !== null) { + logEvent([TaskErrorEvent, ms * 1000, task.id]); + } + } + } + function markTaskRun(task, ms) { + if (enableProfiling) { + runIdCounter++; + profilingState[PRIORITY] = task.priorityLevel; + profilingState[CURRENT_TASK_ID] = task.id; + profilingState[CURRENT_RUN_ID] = runIdCounter; + + if (eventLog !== null) { + logEvent([TaskRunEvent, ms * 1000, task.id, runIdCounter]); + } + } + } + function markTaskYield(task, ms) { + if (enableProfiling) { + profilingState[PRIORITY] = NoPriority; + profilingState[CURRENT_TASK_ID] = 0; + profilingState[CURRENT_RUN_ID] = 0; + + if (eventLog !== null) { + logEvent([TaskYieldEvent, ms * 1000, task.id, runIdCounter]); + } + } + } + function markSchedulerSuspended(ms) { + if (enableProfiling) { + mainThreadIdCounter++; + + if (eventLog !== null) { + logEvent([SchedulerSuspendEvent, ms * 1000, mainThreadIdCounter]); + } + } + } + function markSchedulerUnsuspended(ms) { + if (enableProfiling) { + if (eventLog !== null) { + logEvent([SchedulerResumeEvent, ms * 1000, mainThreadIdCounter]); + } + } + } + + /* eslint-disable no-var */ + // Math.pow(2, 30) - 1 + // 0b111111111111111111111111111111 + + var maxSigned31BitInt = 1073741823; // Times out immediately + + var IMMEDIATE_PRIORITY_TIMEOUT = -1; // Eventually times out + + var USER_BLOCKING_PRIORITY = 250; + var NORMAL_PRIORITY_TIMEOUT = 5000; + var LOW_PRIORITY_TIMEOUT = 10000; // Never times out + + var IDLE_PRIORITY = maxSigned31BitInt; // Tasks are stored on a min heap + + var taskQueue = []; + var timerQueue = []; // Incrementing id counter. Used to maintain insertion order. + + var taskIdCounter = 1; // Pausing the scheduler is useful for debugging. + + var isSchedulerPaused = false; + var currentTask = null; + var currentPriorityLevel = NormalPriority; // This is set while performing work, to prevent re-entrancy. + + var isPerformingWork = false; + var isHostCallbackScheduled = false; + var isHostTimeoutScheduled = false; + + function advanceTimers(currentTime) { + // Check for tasks that are no longer delayed and add them to the queue. + var timer = peek(timerQueue); + + while (timer !== null) { + if (timer.callback === null) { + // Timer was cancelled. + pop(timerQueue); + } else if (timer.startTime <= currentTime) { + // Timer fired. Transfer to the task queue. + pop(timerQueue); + timer.sortIndex = timer.expirationTime; + push(taskQueue, timer); + + if (enableProfiling) { + markTaskStart(timer, currentTime); + timer.isQueued = true; + } + } else { + // Remaining timers are pending. + return; + } + + timer = peek(timerQueue); + } + } + + function handleTimeout(currentTime) { + isHostTimeoutScheduled = false; + advanceTimers(currentTime); + + if (!isHostCallbackScheduled) { + if (peek(taskQueue) !== null) { + isHostCallbackScheduled = true; + requestHostCallback(flushWork); + } else { + var firstTimer = peek(timerQueue); + + if (firstTimer !== null) { + requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime); + } + } + } + } + + function flushWork(hasTimeRemaining, initialTime) { + if (enableProfiling) { + markSchedulerUnsuspended(initialTime); + } // We'll need a host callback the next time work is scheduled. + + isHostCallbackScheduled = false; + + if (isHostTimeoutScheduled) { + // We scheduled a timeout but it's no longer needed. Cancel it. + isHostTimeoutScheduled = false; + cancelHostTimeout(); + } + + isPerformingWork = true; + var previousPriorityLevel = currentPriorityLevel; + + try { + if (enableProfiling) { + try { + return workLoop(hasTimeRemaining, initialTime); + } catch (error) { + if (currentTask !== null) { + var currentTime = exports.unstable_now(); + markTaskErrored(currentTask, currentTime); + currentTask.isQueued = false; + } + + throw error; + } + } else { + // No catch in prod codepath. + return workLoop(hasTimeRemaining, initialTime); + } + } finally { + currentTask = null; + currentPriorityLevel = previousPriorityLevel; + isPerformingWork = false; + + if (enableProfiling) { + var _currentTime = exports.unstable_now(); + + markSchedulerSuspended(_currentTime); + } + } + } + + function workLoop(hasTimeRemaining, initialTime) { + var currentTime = initialTime; + advanceTimers(currentTime); + currentTask = peek(taskQueue); + + while (currentTask !== null && !(enableSchedulerDebugging && isSchedulerPaused)) { + if (currentTask.expirationTime > currentTime && (!hasTimeRemaining || shouldYieldToHost())) { + // This currentTask hasn't expired, and we've reached the deadline. + break; + } + + var callback = currentTask.callback; + + if (callback !== null) { + currentTask.callback = null; + currentPriorityLevel = currentTask.priorityLevel; + var didUserCallbackTimeout = currentTask.expirationTime <= currentTime; + markTaskRun(currentTask, currentTime); + var continuationCallback = callback(didUserCallbackTimeout); + currentTime = exports.unstable_now(); + + if (typeof continuationCallback === 'function') { + currentTask.callback = continuationCallback; + markTaskYield(currentTask, currentTime); + } else { + if (enableProfiling) { + markTaskCompleted(currentTask, currentTime); + currentTask.isQueued = false; + } + + if (currentTask === peek(taskQueue)) { + pop(taskQueue); + } + } + + advanceTimers(currentTime); + } else { + pop(taskQueue); + } + + currentTask = peek(taskQueue); + } // Return whether there's additional work + + if (currentTask !== null) { + return true; + } else { + var firstTimer = peek(timerQueue); + + if (firstTimer !== null) { + requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime); + } + + return false; + } + } + + function unstable_runWithPriority(priorityLevel, eventHandler) { + switch (priorityLevel) { + case ImmediatePriority: + case UserBlockingPriority: + case NormalPriority: + case LowPriority: + case IdlePriority: + break; + + default: + priorityLevel = NormalPriority; + } + + var previousPriorityLevel = currentPriorityLevel; + currentPriorityLevel = priorityLevel; + + try { + return eventHandler(); + } finally { + currentPriorityLevel = previousPriorityLevel; + } + } + + function unstable_next(eventHandler) { + var priorityLevel; + + switch (currentPriorityLevel) { + case ImmediatePriority: + case UserBlockingPriority: + case NormalPriority: + // Shift down to normal priority + priorityLevel = NormalPriority; + break; + + default: + // Anything lower than normal priority should remain at the current level. + priorityLevel = currentPriorityLevel; + break; + } + + var previousPriorityLevel = currentPriorityLevel; + currentPriorityLevel = priorityLevel; + + try { + return eventHandler(); + } finally { + currentPriorityLevel = previousPriorityLevel; + } + } + + function unstable_wrapCallback(callback) { + var parentPriorityLevel = currentPriorityLevel; + return function () { + // This is a fork of runWithPriority, inlined for performance. + var previousPriorityLevel = currentPriorityLevel; + currentPriorityLevel = parentPriorityLevel; + + try { + return callback.apply(this, arguments); + } finally { + currentPriorityLevel = previousPriorityLevel; + } + }; + } + + function timeoutForPriorityLevel(priorityLevel) { + switch (priorityLevel) { + case ImmediatePriority: + return IMMEDIATE_PRIORITY_TIMEOUT; + + case UserBlockingPriority: + return USER_BLOCKING_PRIORITY; + + case IdlePriority: + return IDLE_PRIORITY; + + case LowPriority: + return LOW_PRIORITY_TIMEOUT; + + case NormalPriority: + default: + return NORMAL_PRIORITY_TIMEOUT; + } + } + + function unstable_scheduleCallback(priorityLevel, callback, options) { + var currentTime = exports.unstable_now(); + var startTime; + var timeout; + + if (typeof options === 'object' && options !== null) { + var delay = options.delay; + + if (typeof delay === 'number' && delay > 0) { + startTime = currentTime + delay; + } else { + startTime = currentTime; + } + + timeout = + typeof options.timeout === 'number' + ? options.timeout + : timeoutForPriorityLevel(priorityLevel); + } else { + timeout = timeoutForPriorityLevel(priorityLevel); + startTime = currentTime; + } + + var expirationTime = startTime + timeout; + var newTask = { + id: taskIdCounter++, + callback: callback, + priorityLevel: priorityLevel, + startTime: startTime, + expirationTime: expirationTime, + sortIndex: -1, + }; + + if (enableProfiling) { + newTask.isQueued = false; + } + + if (startTime > currentTime) { + // This is a delayed task. + newTask.sortIndex = startTime; + push(timerQueue, newTask); + + if (peek(taskQueue) === null && newTask === peek(timerQueue)) { + // All tasks are delayed, and this is the task with the earliest delay. + if (isHostTimeoutScheduled) { + // Cancel an existing timeout. + cancelHostTimeout(); + } else { + isHostTimeoutScheduled = true; + } // Schedule a timeout. + + requestHostTimeout(handleTimeout, startTime - currentTime); + } + } else { + newTask.sortIndex = expirationTime; + push(taskQueue, newTask); + + if (enableProfiling) { + markTaskStart(newTask, currentTime); + newTask.isQueued = true; + } // Schedule a host callback, if needed. If we're already performing work, + // wait until the next time we yield. + + if (!isHostCallbackScheduled && !isPerformingWork) { + isHostCallbackScheduled = true; + requestHostCallback(flushWork); + } + } + + return newTask; + } + + function unstable_pauseExecution() { + isSchedulerPaused = true; + } + + function unstable_continueExecution() { + isSchedulerPaused = false; + + if (!isHostCallbackScheduled && !isPerformingWork) { + isHostCallbackScheduled = true; + requestHostCallback(flushWork); + } + } + + function unstable_getFirstCallbackNode() { + return peek(taskQueue); + } + + function unstable_cancelCallback(task) { + if (enableProfiling) { + if (task.isQueued) { + var currentTime = exports.unstable_now(); + markTaskCanceled(task, currentTime); + task.isQueued = false; + } + } // Null out the callback to indicate the task has been canceled. (Can't + // remove from the queue because you can't remove arbitrary nodes from an + // array based heap, only the first one.) + + task.callback = null; + } + + function unstable_getCurrentPriorityLevel() { + return currentPriorityLevel; + } + + function unstable_shouldYield() { + var currentTime = exports.unstable_now(); + advanceTimers(currentTime); + var firstTask = peek(taskQueue); + return ( + (firstTask !== currentTask && + currentTask !== null && + firstTask !== null && + firstTask.callback !== null && + firstTask.startTime <= currentTime && + firstTask.expirationTime < currentTask.expirationTime) || + shouldYieldToHost() + ); + } + + var unstable_requestPaint = requestPaint; + var unstable_Profiling = enableProfiling + ? { + startLoggingProfilingEvents: startLoggingProfilingEvents, + stopLoggingProfilingEvents: stopLoggingProfilingEvents, + sharedProfilingBuffer: sharedProfilingBuffer, + } + : null; + + exports.unstable_ImmediatePriority = ImmediatePriority; + exports.unstable_UserBlockingPriority = UserBlockingPriority; + exports.unstable_NormalPriority = NormalPriority; + exports.unstable_IdlePriority = IdlePriority; + exports.unstable_LowPriority = LowPriority; + exports.unstable_runWithPriority = unstable_runWithPriority; + exports.unstable_next = unstable_next; + exports.unstable_scheduleCallback = unstable_scheduleCallback; + exports.unstable_cancelCallback = unstable_cancelCallback; + exports.unstable_wrapCallback = unstable_wrapCallback; + exports.unstable_getCurrentPriorityLevel = unstable_getCurrentPriorityLevel; + exports.unstable_shouldYield = unstable_shouldYield; + exports.unstable_requestPaint = unstable_requestPaint; + exports.unstable_continueExecution = unstable_continueExecution; + exports.unstable_pauseExecution = unstable_pauseExecution; + exports.unstable_getFirstCallbackNode = unstable_getFirstCallbackNode; + exports.unstable_Profiling = unstable_Profiling; + })(); + } + + /***/ + }, + /* 515 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + if (false) { + module.exports = require('./cjs/scheduler-tracing.production.min.js'); + } else { + module.exports = __webpack_require__(516); + } + + /***/ + }, + /* 516 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** @license React v0.18.0 + * scheduler-tracing.development.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + + if (true) { + (function () { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { value: true }); + + // Helps identify side effects in render-phase lifecycle hooks and setState + // reducers by double invoking them in Strict Mode. + + // To preserve the "Pause on caught exceptions" behavior of the debugger, we + // replay the begin phase of a failed component inside invokeGuardedCallback. + + // Warn about deprecated, async-unsafe lifecycles; relates to RFC #6: + + // Gather advanced timing metrics for Profiler subtrees. + + // Trace which interactions trigger each commit. + + var enableSchedulerTracing = true; // SSR experiments + + // Only used in www builds. + + // Only used in www builds. + + // Disable javascript: URL strings in href for XSS protection. + + // React Fire: prevent the value and checked attributes from syncing + // with their related DOM properties + + // These APIs will no longer be "unstable" in the upcoming 16.7 release, + // Control this behavior with a flag to support 16.6 minor releases in the meanwhile. + + // Experimental React Flare event system and event components support. + + // Experimental Host Component support. + + // Experimental Scope support. + + // New API for JSX transforms to target - https://github.com/reactjs/rfcs/pull/107 + + // We will enforce mocking scheduler with scheduler/unstable_mock at some point. (v17?) + // Till then, we warn about the missing mock, but still fallback to a legacy mode compatible version + + // For tests, we flush suspense fallbacks in an act scope; + // *except* in some of our own tests, where we test incremental loading states. + + // Add a callback property to suspense to notify which promises are currently + // in the update queue. This allows reporting and tracing of what is causing + // the user to see a loading state. + // Also allows hydration callbacks to fire when a dehydrated boundary gets + // hydrated or deleted. + + // Part of the simplification of React.createElement so we can eventually move + // from React.createElement to React.jsx + // https://github.com/reactjs/rfcs/blob/createlement-rfc/text/0000-create-element-changes.md + + // Flag to turn event.target and event.currentTarget in ReactNative from a reactTag to a component instance + + var DEFAULT_THREAD_ID = 0; // Counters used to generate unique IDs. + + var interactionIDCounter = 0; + var threadIDCounter = 0; // Set of currently traced interactions. + // Interactions "stack"– + // Meaning that newly traced interactions are appended to the previously active set. + // When an interaction goes out of scope, the previous set (if any) is restored. + + exports.__interactionsRef = null; // Listener(s) to notify when interactions begin and end. + + exports.__subscriberRef = null; + + if (enableSchedulerTracing) { + exports.__interactionsRef = { + current: new Set(), + }; + exports.__subscriberRef = { + current: null, + }; + } + + function unstable_clear(callback) { + if (!enableSchedulerTracing) { + return callback(); + } + + var prevInteractions = exports.__interactionsRef.current; + exports.__interactionsRef.current = new Set(); + + try { + return callback(); + } finally { + exports.__interactionsRef.current = prevInteractions; + } + } + function unstable_getCurrent() { + if (!enableSchedulerTracing) { + return null; + } else { + return exports.__interactionsRef.current; + } + } + function unstable_getThreadID() { + return ++threadIDCounter; + } + function unstable_trace(name, timestamp, callback) { + var threadID = + arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : DEFAULT_THREAD_ID; + + if (!enableSchedulerTracing) { + return callback(); + } + + var interaction = { + __count: 1, + id: interactionIDCounter++, + name: name, + timestamp: timestamp, + }; + var prevInteractions = exports.__interactionsRef.current; // Traced interactions should stack/accumulate. + // To do that, clone the current interactions. + // The previous set will be restored upon completion. + + var interactions = new Set(prevInteractions); + interactions.add(interaction); + exports.__interactionsRef.current = interactions; + var subscriber = exports.__subscriberRef.current; + var returnValue; + + try { + if (subscriber !== null) { + subscriber.onInteractionTraced(interaction); + } + } finally { + try { + if (subscriber !== null) { + subscriber.onWorkStarted(interactions, threadID); + } + } finally { + try { + returnValue = callback(); + } finally { + exports.__interactionsRef.current = prevInteractions; + + try { + if (subscriber !== null) { + subscriber.onWorkStopped(interactions, threadID); + } + } finally { + interaction.__count--; // If no async work was scheduled for this interaction, + // Notify subscribers that it's completed. + + if (subscriber !== null && interaction.__count === 0) { + subscriber.onInteractionScheduledWorkCompleted(interaction); + } + } + } + } + } + + return returnValue; + } + function unstable_wrap(callback) { + var threadID = + arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEFAULT_THREAD_ID; + + if (!enableSchedulerTracing) { + return callback; + } + + var wrappedInteractions = exports.__interactionsRef.current; + var subscriber = exports.__subscriberRef.current; + + if (subscriber !== null) { + subscriber.onWorkScheduled(wrappedInteractions, threadID); + } // Update the pending async work count for the current interactions. + // Update after calling subscribers in case of error. + + wrappedInteractions.forEach(function (interaction) { + interaction.__count++; + }); + var hasRun = false; + + function wrapped() { + var prevInteractions = exports.__interactionsRef.current; + exports.__interactionsRef.current = wrappedInteractions; + subscriber = exports.__subscriberRef.current; + + try { + var returnValue; + + try { + if (subscriber !== null) { + subscriber.onWorkStarted(wrappedInteractions, threadID); + } + } finally { + try { + returnValue = callback.apply(undefined, arguments); + } finally { + exports.__interactionsRef.current = prevInteractions; + + if (subscriber !== null) { + subscriber.onWorkStopped(wrappedInteractions, threadID); + } + } + } + + return returnValue; + } finally { + if (!hasRun) { + // We only expect a wrapped function to be executed once, + // But in the event that it's executed more than once– + // Only decrement the outstanding interaction counts once. + hasRun = true; // Update pending async counts for all wrapped interactions. + // If this was the last scheduled async work for any of them, + // Mark them as completed. + + wrappedInteractions.forEach(function (interaction) { + interaction.__count--; + + if (subscriber !== null && interaction.__count === 0) { + subscriber.onInteractionScheduledWorkCompleted(interaction); + } + }); + } + } + } + + wrapped.cancel = function cancel() { + subscriber = exports.__subscriberRef.current; + + try { + if (subscriber !== null) { + subscriber.onWorkCanceled(wrappedInteractions, threadID); + } + } finally { + // Update pending async counts for all wrapped interactions. + // If this was the last scheduled async work for any of them, + // Mark them as completed. + wrappedInteractions.forEach(function (interaction) { + interaction.__count--; + + if (subscriber && interaction.__count === 0) { + subscriber.onInteractionScheduledWorkCompleted(interaction); + } + }); + } + }; + + return wrapped; + } + + var subscribers = null; + + if (enableSchedulerTracing) { + subscribers = new Set(); + } + + function unstable_subscribe(subscriber) { + if (enableSchedulerTracing) { + subscribers.add(subscriber); + + if (subscribers.size === 1) { + exports.__subscriberRef.current = { + onInteractionScheduledWorkCompleted: onInteractionScheduledWorkCompleted, + onInteractionTraced: onInteractionTraced, + onWorkCanceled: onWorkCanceled, + onWorkScheduled: onWorkScheduled, + onWorkStarted: onWorkStarted, + onWorkStopped: onWorkStopped, + }; + } + } + } + function unstable_unsubscribe(subscriber) { + if (enableSchedulerTracing) { + subscribers.delete(subscriber); + + if (subscribers.size === 0) { + exports.__subscriberRef.current = null; + } + } + } + + function onInteractionTraced(interaction) { + var didCatchError = false; + var caughtError = null; + subscribers.forEach(function (subscriber) { + try { + subscriber.onInteractionTraced(interaction); + } catch (error) { + if (!didCatchError) { + didCatchError = true; + caughtError = error; + } + } + }); + + if (didCatchError) { + throw caughtError; + } + } + + function onInteractionScheduledWorkCompleted(interaction) { + var didCatchError = false; + var caughtError = null; + subscribers.forEach(function (subscriber) { + try { + subscriber.onInteractionScheduledWorkCompleted(interaction); + } catch (error) { + if (!didCatchError) { + didCatchError = true; + caughtError = error; + } + } + }); + + if (didCatchError) { + throw caughtError; + } + } + + function onWorkScheduled(interactions, threadID) { + var didCatchError = false; + var caughtError = null; + subscribers.forEach(function (subscriber) { + try { + subscriber.onWorkScheduled(interactions, threadID); + } catch (error) { + if (!didCatchError) { + didCatchError = true; + caughtError = error; + } + } + }); + + if (didCatchError) { + throw caughtError; + } + } + + function onWorkStarted(interactions, threadID) { + var didCatchError = false; + var caughtError = null; + subscribers.forEach(function (subscriber) { + try { + subscriber.onWorkStarted(interactions, threadID); + } catch (error) { + if (!didCatchError) { + didCatchError = true; + caughtError = error; + } + } + }); + + if (didCatchError) { + throw caughtError; + } + } + + function onWorkStopped(interactions, threadID) { + var didCatchError = false; + var caughtError = null; + subscribers.forEach(function (subscriber) { + try { + subscriber.onWorkStopped(interactions, threadID); + } catch (error) { + if (!didCatchError) { + didCatchError = true; + caughtError = error; + } + } + }); + + if (didCatchError) { + throw caughtError; + } + } + + function onWorkCanceled(interactions, threadID) { + var didCatchError = false; + var caughtError = null; + subscribers.forEach(function (subscriber) { + try { + subscriber.onWorkCanceled(interactions, threadID); + } catch (error) { + if (!didCatchError) { + didCatchError = true; + caughtError = error; + } + } + }); + + if (didCatchError) { + throw caughtError; + } + } + + exports.unstable_clear = unstable_clear; + exports.unstable_getCurrent = unstable_getCurrent; + exports.unstable_getThreadID = unstable_getThreadID; + exports.unstable_trace = unstable_trace; + exports.unstable_wrap = unstable_wrap; + exports.unstable_subscribe = unstable_subscribe; + exports.unstable_unsubscribe = unstable_unsubscribe; + })(); + } + + /***/ + }, + /* 517 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (global) { + var _interopRequireDefault = __webpack_require__(41); + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.reactOnRailsPageLoaded = reactOnRailsPageLoaded; + exports.clientStartup = clientStartup; + + var _stringify = _interopRequireDefault(__webpack_require__(106)); + + var _reactDom = _interopRequireDefault(__webpack_require__(230)); + + var _createReactElement = _interopRequireDefault(__webpack_require__(161)); + + var _isCreateReactElementResultNonReactComponent = _interopRequireDefault(__webpack_require__(232)); + + /* global ReactOnRails Turbolinks */ + var REACT_ON_RAILS_STORE_ATTRIBUTE = 'data-js-react-on-rails-store'; + + function findContext() { + if (typeof window.ReactOnRails !== 'undefined') { + return window; + } else if (typeof ReactOnRails !== 'undefined') { + return global; + } + + throw new Error('ReactOnRails is undefined in both global and window namespaces.\n '); + } + + function debugTurbolinks() { + if (!window) { + return; + } + + var context = findContext(); + + if (context.ReactOnRails.option('traceTurbolinks')) { + var _console; + + for (var _len = arguments.length, msg = new Array(_len), _key = 0; _key < _len; _key++) { + msg[_key] = arguments[_key]; + } + + (_console = console).log.apply(_console, ['TURBO:'].concat(msg)); + } + } + + function turbolinksInstalled() { + return typeof Turbolinks !== 'undefined'; + } + + function forEach(fn, className, railsContext) { + var els = document.getElementsByClassName(className); + + for (var i = 0; i < els.length; i += 1) { + fn(els[i], railsContext); + } + } + + function forEachByAttribute(fn, attributeName, railsContext) { + var els = document.querySelectorAll('['.concat(attributeName, ']')); + + for (var i = 0; i < els.length; i += 1) { + fn(els[i], railsContext); + } + } + + function forEachComponent(fn, railsContext) { + forEach(fn, 'js-react-on-rails-component', railsContext); + } + + function initializeStore(el, railsContext) { + var context = findContext(); + var name = el.getAttribute(REACT_ON_RAILS_STORE_ATTRIBUTE); + var props = JSON.parse(el.textContent); + var storeGenerator = context.ReactOnRails.getStoreGenerator(name); + var store = storeGenerator(props, railsContext); + context.ReactOnRails.setStore(name, store); + } + + function forEachStore(railsContext) { + forEachByAttribute(initializeStore, REACT_ON_RAILS_STORE_ATTRIBUTE, railsContext); + } + + function turbolinksVersion5() { + return typeof Turbolinks.controller !== 'undefined'; + } + + function turbolinksSupported() { + return Turbolinks.supported; + } + + function delegateToRenderer(componentObj, props, railsContext, domNodeId, trace) { + var name = componentObj.name, + component = componentObj.component, + isRenderer = componentObj.isRenderer; + + if (isRenderer) { + if (trace) { + console.log( + 'DELEGATING TO RENDERER ' + .concat(name, ' for dom node with id: ') + .concat(domNodeId, ' with props, railsContext:'), + props, + railsContext, + ); + } + + component(props, railsContext, domNodeId); + return true; + } + + return false; + } + + function domNodeIdForEl(el) { + return el.getAttribute('data-dom-id'); + } + /** + * Used for client rendering by ReactOnRails. Either calls ReactDOM.hydrate, ReactDOM.render, or + * delegates to a renderer registered by the user. + * @param el + */ + + function render(el, railsContext) { + var context = findContext(); // This must match lib/react_on_rails/helper.rb + + var name = el.getAttribute('data-component-name'); + var domNodeId = domNodeIdForEl(el); + var props = JSON.parse(el.textContent); + var trace = el.getAttribute('data-trace'); + + try { + var domNode = document.getElementById(domNodeId); + + if (domNode) { + var componentObj = context.ReactOnRails.getComponent(name); + + if (delegateToRenderer(componentObj, props, railsContext, domNodeId, trace)) { + return; + } // Hydrate if available and was server rendered + + var shouldHydrate = !!_reactDom.default.hydrate && !!domNode.innerHTML; + var reactElementOrRouterResult = (0, _createReactElement.default)({ + componentObj: componentObj, + props: props, + domNodeId: domNodeId, + trace: trace, + railsContext: railsContext, + shouldHydrate: shouldHydrate, + }); + + if ((0, _isCreateReactElementResultNonReactComponent.default)(reactElementOrRouterResult)) { + throw new Error( + 'You returned a server side type of react-router error: '.concat( + (0, _stringify.default)(reactElementOrRouterResult), + '\nYou should return a React.Component always for the client side entry point.', + ), + ); + } else if (shouldHydrate) { + _reactDom.default.hydrate(reactElementOrRouterResult, domNode); + } else { + _reactDom.default.render(reactElementOrRouterResult, domNode); + } + } + } catch (e) { + e.message = + 'ReactOnRails encountered an error while rendering component: '.concat(name, '.\n') + + 'Original message: '.concat(e.message); + throw e; + } + } + + function parseRailsContext() { + var el = document.getElementById('js-react-on-rails-context'); + + if (el) { + return JSON.parse(el.textContent); + } + + return null; + } + + function reactOnRailsPageLoaded() { + debugTurbolinks('reactOnRailsPageLoaded'); + var railsContext = parseRailsContext(); + forEachStore(railsContext); + forEachComponent(render, railsContext); + } + + function unmount(el) { + var domNodeId = domNodeIdForEl(el); + var domNode = document.getElementById(domNodeId); + + try { + _reactDom.default.unmountComponentAtNode(domNode); + } catch (e) { + console.info( + 'Caught error calling unmountComponentAtNode: '.concat(e.message, ' for domNode'), + domNode, + e, + ); + } + } + + function reactOnRailsPageUnloaded() { + debugTurbolinks('reactOnRailsPageUnloaded'); + forEachComponent(unmount); + } + + function renderInit() { + // Install listeners when running on the client (browser). + // We must do this check for turbolinks AFTER the document is loaded because we load the + // Webpack bundles first. + if (!turbolinksInstalled() || !turbolinksSupported()) { + debugTurbolinks('NOT USING TURBOLINKS: calling reactOnRailsPageLoaded'); + reactOnRailsPageLoaded(); + return; + } + + if (turbolinksVersion5()) { + debugTurbolinks( + 'USING TURBOLINKS 5: document added event listeners ' + + 'turbolinks:before-render and turbolinks:render.', + ); + document.addEventListener('turbolinks:before-render', reactOnRailsPageUnloaded); + document.addEventListener('turbolinks:render', reactOnRailsPageLoaded); + reactOnRailsPageLoaded(); + } else { + debugTurbolinks( + 'USING TURBOLINKS 2: document added event listeners page:before-unload and ' + 'page:change.', + ); + document.addEventListener('page:before-unload', reactOnRailsPageUnloaded); + document.addEventListener('page:change', reactOnRailsPageLoaded); + } + } + + function clientStartup(context) { + var document = context.document; // Check if server rendering + + if (!document) { + return; + } // Tried with a file local variable, but the install handler gets called twice. + // eslint-disable-next-line no-underscore-dangle + + if (context.__REACT_ON_RAILS_EVENT_HANDLERS_RAN_ONCE__) { + return; + } // eslint-disable-next-line no-underscore-dangle, no-param-reassign + + context.__REACT_ON_RAILS_EVENT_HANDLERS_RAN_ONCE__ = true; + debugTurbolinks('Adding DOMContentLoaded event to install event listeners.'); + + if (document.readyState === 'complete') { + window.setTimeout(renderInit); + } else { + document.addEventListener('DOMContentLoaded', renderInit); + } + } + /* WEBPACK VAR INJECTION */ + }).call(exports, __webpack_require__(38)); + + /***/ + }, + /* 518 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** @license React v16.12.0 + * react-dom-server.browser.development.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + + if (true) { + (function () { + 'use strict'; + + var _assign = __webpack_require__(64); + var React = __webpack_require__(1); + var checkPropTypes = __webpack_require__(107); + + // Do not require this module directly! Use normal `invariant` calls with + // template literal strings. The messages will be replaced with error codes + // during build. + + // TODO: this is special because it gets imported during build. + + var ReactVersion = '16.12.0'; + + /** + * Use invariant() to assert state which your program assumes to be true. + * + * Provide sprintf-style format (only %s is supported) and arguments + * to provide information about what broke and what you were + * expecting. + * + * The invariant message will be stripped in production, but the invariant + * will remain to ensure logic does not differ in production. + */ + + /** + * Similar to invariant but only logs a warning if the condition is not met. + * This can be used to log issues in development environments in critical + * paths. Removing the logging code for production environments will keep the + * same logic and follow the same code paths. + */ + var warningWithoutStack = function () {}; + + { + warningWithoutStack = function (condition, format) { + for ( + var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; + _key < _len; + _key++ + ) { + args[_key - 2] = arguments[_key]; + } + + if (format === undefined) { + throw new Error( + '`warningWithoutStack(condition, format, ...args)` requires a warning ' + + 'message argument', + ); + } + + if (args.length > 8) { + // Check before the condition to catch violations early. + throw new Error('warningWithoutStack() currently supports at most 8 arguments.'); + } + + if (condition) { + return; + } + + if (typeof console !== 'undefined') { + var argsWithFormat = args.map(function (item) { + return '' + item; + }); + argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it + // breaks IE9: https://github.com/facebook/react/issues/13610 + + Function.prototype.apply.call(console.error, console, argsWithFormat); + } + + try { + // --- Welcome to debugging React --- + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + var argIndex = 0; + var message = + 'Warning: ' + + format.replace(/%s/g, function () { + return args[argIndex++]; + }); + throw new Error(message); + } catch (x) {} + }; + } + + var warningWithoutStack$1 = warningWithoutStack; + + // The Symbol used to tag the ReactElement-like types. If there is no native Symbol + // nor polyfill, then a plain number is used for performance. + var hasSymbol = typeof Symbol === 'function' && Symbol.for; + + var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca; + var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb; + var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc; + var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2; + var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd; + var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary + // (unstable) APIs that have been removed. Can we remove the symbols? + + var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf; + var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0; + var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1; + var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8; + var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3; + var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4; + var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5; + + var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7; + + var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; // Prevent newer renderers from RTE when used with older react package versions. + // Current owner and dispatcher used to share the same ref, + // but PR #14548 split them out to better support the react-debug-tools package. + + if (!ReactSharedInternals.hasOwnProperty('ReactCurrentDispatcher')) { + ReactSharedInternals.ReactCurrentDispatcher = { + current: null, + }; + } + + if (!ReactSharedInternals.hasOwnProperty('ReactCurrentBatchConfig')) { + ReactSharedInternals.ReactCurrentBatchConfig = { + suspense: null, + }; + } + + /** + * Similar to invariant but only logs a warning if the condition is not met. + * This can be used to log issues in development environments in critical + * paths. Removing the logging code for production environments will keep the + * same logic and follow the same code paths. + */ + + var warning = warningWithoutStack$1; + + { + warning = function (condition, format) { + if (condition) { + return; + } + + var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; + var stack = ReactDebugCurrentFrame.getStackAddendum(); // eslint-disable-next-line react-internal/warning-and-invariant-args + + for ( + var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; + _key < _len; + _key++ + ) { + args[_key - 2] = arguments[_key]; + } + + warningWithoutStack$1.apply(void 0, [false, format + '%s'].concat(args, [stack])); + }; + } + + var warning$1 = warning; + + var Uninitialized = -1; + var Pending = 0; + var Resolved = 1; + var Rejected = 2; + function refineResolvedLazyComponent(lazyComponent) { + return lazyComponent._status === Resolved ? lazyComponent._result : null; + } + function initializeLazyComponentType(lazyComponent) { + if (lazyComponent._status === Uninitialized) { + lazyComponent._status = Pending; + var ctor = lazyComponent._ctor; + var thenable = ctor(); + lazyComponent._result = thenable; + thenable.then( + function (moduleObject) { + if (lazyComponent._status === Pending) { + var defaultExport = moduleObject.default; + + { + if (defaultExport === undefined) { + warning$1( + false, + 'lazy: Expected the result of a dynamic import() call. ' + + 'Instead received: %s\n\nYour code should look like: \n ' + + "const MyComponent = lazy(() => import('./MyComponent'))", + moduleObject, + ); + } + } + + lazyComponent._status = Resolved; + lazyComponent._result = defaultExport; + } + }, + function (error) { + if (lazyComponent._status === Pending) { + lazyComponent._status = Rejected; + lazyComponent._result = error; + } + }, + ); + } + } + + function getWrappedName(outerType, innerType, wrapperName) { + var functionName = innerType.displayName || innerType.name || ''; + return ( + outerType.displayName || + (functionName !== '' ? wrapperName + '(' + functionName + ')' : wrapperName) + ); + } + + function getComponentName(type) { + if (type == null) { + // Host root, text node or just invalid type. + return null; + } + + { + if (typeof type.tag === 'number') { + warningWithoutStack$1( + false, + 'Received an unexpected object in getComponentName(). ' + + 'This is likely a bug in React. Please file an issue.', + ); + } + } + + if (typeof type === 'function') { + return type.displayName || type.name || null; + } + + if (typeof type === 'string') { + return type; + } + + switch (type) { + case REACT_FRAGMENT_TYPE: + return 'Fragment'; + + case REACT_PORTAL_TYPE: + return 'Portal'; + + case REACT_PROFILER_TYPE: + return 'Profiler'; + + case REACT_STRICT_MODE_TYPE: + return 'StrictMode'; + + case REACT_SUSPENSE_TYPE: + return 'Suspense'; + + case REACT_SUSPENSE_LIST_TYPE: + return 'SuspenseList'; + } + + if (typeof type === 'object') { + switch (type.$$typeof) { + case REACT_CONTEXT_TYPE: + return 'Context.Consumer'; + + case REACT_PROVIDER_TYPE: + return 'Context.Provider'; + + case REACT_FORWARD_REF_TYPE: + return getWrappedName(type, type.render, 'ForwardRef'); + + case REACT_MEMO_TYPE: + return getComponentName(type.type); + + case REACT_LAZY_TYPE: { + var thenable = type; + var resolvedThenable = refineResolvedLazyComponent(thenable); + + if (resolvedThenable) { + return getComponentName(resolvedThenable); + } + + break; + } + } + } + + return null; + } + + /** + * Forked from fbjs/warning: + * https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js + * + * Only change is we use console.warn instead of console.error, + * and do nothing when 'console' is not supported. + * This really simplifies the code. + * --- + * Similar to invariant but only logs a warning if the condition is not met. + * This can be used to log issues in development environments in critical + * paths. Removing the logging code for production environments will keep the + * same logic and follow the same code paths. + */ + var lowPriorityWarningWithoutStack = function () {}; + + { + var printWarning = function (format) { + for ( + var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; + _key < _len; + _key++ + ) { + args[_key - 1] = arguments[_key]; + } + + var argIndex = 0; + var message = + 'Warning: ' + + format.replace(/%s/g, function () { + return args[argIndex++]; + }); + + if (typeof console !== 'undefined') { + console.warn(message); + } + + try { + // --- Welcome to debugging React --- + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + throw new Error(message); + } catch (x) {} + }; + + lowPriorityWarningWithoutStack = function (condition, format) { + if (format === undefined) { + throw new Error( + '`lowPriorityWarningWithoutStack(condition, format, ...args)` requires a warning ' + + 'message argument', + ); + } + + if (!condition) { + for ( + var _len2 = arguments.length, args = new Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; + _key2 < _len2; + _key2++ + ) { + args[_key2 - 2] = arguments[_key2]; + } + + printWarning.apply(void 0, [format].concat(args)); + } + }; + } + + var lowPriorityWarningWithoutStack$1 = lowPriorityWarningWithoutStack; + + var BEFORE_SLASH_RE = /^(.*)[\\\/]/; + var describeComponentFrame = function (name, source, ownerName) { + var sourceInfo = ''; + + if (source) { + var path = source.fileName; + var fileName = path.replace(BEFORE_SLASH_RE, ''); + + { + // In DEV, include code for a common special case: + // prefer "folder/index.js" instead of just "index.js". + if (/^index\./.test(fileName)) { + var match = path.match(BEFORE_SLASH_RE); + + if (match) { + var pathBeforeSlash = match[1]; + + if (pathBeforeSlash) { + var folderName = pathBeforeSlash.replace(BEFORE_SLASH_RE, ''); + fileName = folderName + '/' + fileName; + } + } + } + } + + sourceInfo = ' (at ' + fileName + ':' + source.lineNumber + ')'; + } else if (ownerName) { + sourceInfo = ' (created by ' + ownerName + ')'; + } + + return '\n in ' + (name || 'Unknown') + sourceInfo; + }; + + // Helps identify side effects in render-phase lifecycle hooks and setState + // reducers by double invoking them in Strict Mode. + + // To preserve the "Pause on caught exceptions" behavior of the debugger, we + // replay the begin phase of a failed component inside invokeGuardedCallback. + + // Warn about deprecated, async-unsafe lifecycles; relates to RFC #6: + + var warnAboutDeprecatedLifecycles = true; // Gather advanced timing metrics for Profiler subtrees. + + // Trace which interactions trigger each commit. + + // SSR experiments + + var enableSuspenseServerRenderer = false; + // Only used in www builds. + + // Only used in www builds. + + // Disable javascript: URL strings in href for XSS protection. + + var disableJavaScriptURLs = false; // React Fire: prevent the value and checked attributes from syncing + // with their related DOM properties + + // These APIs will no longer be "unstable" in the upcoming 16.7 release, + // Control this behavior with a flag to support 16.6 minor releases in the meanwhile. + + // Experimental React Flare event system and event components support. + + var enableFlareAPI = false; // Experimental Host Component support. + + var enableFundamentalAPI = false; // Experimental Scope support. + + var enableScopeAPI = false; // New API for JSX transforms to target - https://github.com/reactjs/rfcs/pull/107 + + // We will enforce mocking scheduler with scheduler/unstable_mock at some point. (v17?) + // Till then, we warn about the missing mock, but still fallback to a legacy mode compatible version + + // For tests, we flush suspense fallbacks in an act scope; + // *except* in some of our own tests, where we test incremental loading states. + + // Add a callback property to suspense to notify which promises are currently + // in the update queue. This allows reporting and tracing of what is causing + // the user to see a loading state. + // Also allows hydration callbacks to fire when a dehydrated boundary gets + // hydrated or deleted. + + // Part of the simplification of React.createElement so we can eventually move + // from React.createElement to React.jsx + // https://github.com/reactjs/rfcs/blob/createlement-rfc/text/0000-create-element-changes.md + + var disableLegacyContext = false; + + // Flag to turn event.target and event.currentTarget in ReactNative from a reactTag to a component instance + + var ReactDebugCurrentFrame$1; + var didWarnAboutInvalidateContextType; + + { + ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame; + didWarnAboutInvalidateContextType = new Set(); + } + + var emptyObject = {}; + + { + Object.freeze(emptyObject); + } + + function maskContext(type, context) { + var contextTypes = type.contextTypes; + + if (!contextTypes) { + return emptyObject; + } + + var maskedContext = {}; + + for (var contextName in contextTypes) { + maskedContext[contextName] = context[contextName]; + } + + return maskedContext; + } + + function checkContextTypes(typeSpecs, values, location) { + { + checkPropTypes( + typeSpecs, + values, + location, + 'Component', + ReactDebugCurrentFrame$1.getCurrentStack, + ); + } + } + + function validateContextBounds(context, threadID) { + // If we don't have enough slots in this context to store this threadID, + // fill it in without leaving any holes to ensure that the VM optimizes + // this as non-holey index properties. + // (Note: If `react` package is < 16.6, _threadCount is undefined.) + for (var i = context._threadCount | 0; i <= threadID; i++) { + // We assume that this is the same as the defaultValue which might not be + // true if we're rendering inside a secondary renderer but they are + // secondary because these use cases are very rare. + context[i] = context._currentValue2; + context._threadCount = i + 1; + } + } + function processContext(type, context, threadID, isClass) { + if (isClass) { + var contextType = type.contextType; + + { + if ('contextType' in type) { + var isValid = // Allow null for conditional declaration + contextType === null || + (contextType !== undefined && + contextType.$$typeof === REACT_CONTEXT_TYPE && + contextType._context === undefined); // Not a <Context.Consumer> + + if (!isValid && !didWarnAboutInvalidateContextType.has(type)) { + didWarnAboutInvalidateContextType.add(type); + var addendum = ''; + + if (contextType === undefined) { + addendum = + ' However, it is set to undefined. ' + + 'This can be caused by a typo or by mixing up named and default imports. ' + + 'This can also happen due to a circular dependency, so ' + + 'try moving the createContext() call to a separate file.'; + } else if (typeof contextType !== 'object') { + addendum = ' However, it is set to a ' + typeof contextType + '.'; + } else if (contextType.$$typeof === REACT_PROVIDER_TYPE) { + addendum = ' Did you accidentally pass the Context.Provider instead?'; + } else if (contextType._context !== undefined) { + // <Context.Consumer> + addendum = ' Did you accidentally pass the Context.Consumer instead?'; + } else { + addendum = + ' However, it is set to an object with keys {' + + Object.keys(contextType).join(', ') + + '}.'; + } + + warningWithoutStack$1( + false, + '%s defines an invalid contextType. ' + + 'contextType should point to the Context object returned by React.createContext().%s', + getComponentName(type) || 'Component', + addendum, + ); + } + } + } + + if (typeof contextType === 'object' && contextType !== null) { + validateContextBounds(contextType, threadID); + return contextType[threadID]; + } + + if (disableLegacyContext) { + { + if (type.contextTypes) { + warningWithoutStack$1( + false, + '%s uses the legacy contextTypes API which is no longer supported. ' + + 'Use React.createContext() with static contextType instead.', + getComponentName(type) || 'Unknown', + ); + } + } + + return emptyObject; + } else { + var maskedContext = maskContext(type, context); + + { + if (type.contextTypes) { + checkContextTypes(type.contextTypes, maskedContext, 'context'); + } + } + + return maskedContext; + } + } else { + if (disableLegacyContext) { + { + if (type.contextTypes) { + warningWithoutStack$1( + false, + '%s uses the legacy contextTypes API which is no longer supported. ' + + 'Use React.createContext() with React.useContext() instead.', + getComponentName(type) || 'Unknown', + ); + } + } + + return undefined; + } else { + var _maskedContext = maskContext(type, context); + + { + if (type.contextTypes) { + checkContextTypes(type.contextTypes, _maskedContext, 'context'); + } + } + + return _maskedContext; + } + } + } + + // Allocates a new index for each request. Tries to stay as compact as possible so that these + // indices can be used to reference a tightly packed array. As opposed to being used in a Map. + // The first allocated index is 1. + var nextAvailableThreadIDs = new Uint16Array(16); + + for (var i = 0; i < 15; i++) { + nextAvailableThreadIDs[i] = i + 1; + } + + nextAvailableThreadIDs[15] = 0; + + function growThreadCountAndReturnNextAvailable() { + var oldArray = nextAvailableThreadIDs; + var oldSize = oldArray.length; + var newSize = oldSize * 2; + + if (!(newSize <= 0x10000)) { + { + throw Error( + 'Maximum number of concurrent React renderers exceeded. This can happen if you are not properly destroying the Readable provided by React. Ensure that you call .destroy() on it if you no longer want to read from it, and did not read to the end. If you use .pipe() this should be automatic.', + ); + } + } + + var newArray = new Uint16Array(newSize); + newArray.set(oldArray); + nextAvailableThreadIDs = newArray; + nextAvailableThreadIDs[0] = oldSize + 1; + + for (var _i = oldSize; _i < newSize - 1; _i++) { + nextAvailableThreadIDs[_i] = _i + 1; + } + + nextAvailableThreadIDs[newSize - 1] = 0; + return oldSize; + } + + function allocThreadID() { + var nextID = nextAvailableThreadIDs[0]; + + if (nextID === 0) { + return growThreadCountAndReturnNextAvailable(); + } + + nextAvailableThreadIDs[0] = nextAvailableThreadIDs[nextID]; + return nextID; + } + function freeThreadID(id) { + nextAvailableThreadIDs[id] = nextAvailableThreadIDs[0]; + nextAvailableThreadIDs[0] = id; + } + + // A reserved attribute. + // It is handled by React separately and shouldn't be written to the DOM. + var RESERVED = 0; // A simple string attribute. + // Attributes that aren't in the whitelist are presumed to have this type. + + var STRING = 1; // A string attribute that accepts booleans in React. In HTML, these are called + // "enumerated" attributes with "true" and "false" as possible values. + // When true, it should be set to a "true" string. + // When false, it should be set to a "false" string. + + var BOOLEANISH_STRING = 2; // A real boolean attribute. + // When true, it should be present (set either to an empty string or its name). + // When false, it should be omitted. + + var BOOLEAN = 3; // An attribute that can be used as a flag as well as with a value. + // When true, it should be present (set either to an empty string or its name). + // When false, it should be omitted. + // For any other value, should be present with that value. + + var OVERLOADED_BOOLEAN = 4; // An attribute that must be numeric or parse as a numeric. + // When falsy, it should be removed. + + var NUMERIC = 5; // An attribute that must be positive numeric or parse as a positive numeric. + // When falsy, it should be removed. + + var POSITIVE_NUMERIC = 6; + + /* eslint-disable max-len */ + var ATTRIBUTE_NAME_START_CHAR = + ':A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD'; + /* eslint-enable max-len */ + + var ATTRIBUTE_NAME_CHAR = + ATTRIBUTE_NAME_START_CHAR + '\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040'; + + var ROOT_ATTRIBUTE_NAME = 'data-reactroot'; + var VALID_ATTRIBUTE_NAME_REGEX = new RegExp( + '^[' + ATTRIBUTE_NAME_START_CHAR + '][' + ATTRIBUTE_NAME_CHAR + ']*$', + ); + var hasOwnProperty$1 = Object.prototype.hasOwnProperty; + var illegalAttributeNameCache = {}; + var validatedAttributeNameCache = {}; + function isAttributeNameSafe(attributeName) { + if (hasOwnProperty$1.call(validatedAttributeNameCache, attributeName)) { + return true; + } + + if (hasOwnProperty$1.call(illegalAttributeNameCache, attributeName)) { + return false; + } + + if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) { + validatedAttributeNameCache[attributeName] = true; + return true; + } + + illegalAttributeNameCache[attributeName] = true; + + { + warning$1(false, 'Invalid attribute name: `%s`', attributeName); + } + + return false; + } + function shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag) { + if (propertyInfo !== null) { + return propertyInfo.type === RESERVED; + } + + if (isCustomComponentTag) { + return false; + } + + if ( + name.length > 2 && + (name[0] === 'o' || name[0] === 'O') && + (name[1] === 'n' || name[1] === 'N') + ) { + return true; + } + + return false; + } + function shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag) { + if (propertyInfo !== null && propertyInfo.type === RESERVED) { + return false; + } + + switch (typeof value) { + case 'function': // $FlowIssue symbol is perfectly valid here + + case 'symbol': + // eslint-disable-line + return true; + + case 'boolean': { + if (isCustomComponentTag) { + return false; + } + + if (propertyInfo !== null) { + return !propertyInfo.acceptsBooleans; + } else { + var prefix = name.toLowerCase().slice(0, 5); + return prefix !== 'data-' && prefix !== 'aria-'; + } + } + + default: + return false; + } + } + function shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag) { + if (value === null || typeof value === 'undefined') { + return true; + } + + if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag)) { + return true; + } + + if (isCustomComponentTag) { + return false; + } + + if (propertyInfo !== null) { + switch (propertyInfo.type) { + case BOOLEAN: + return !value; + + case OVERLOADED_BOOLEAN: + return value === false; + + case NUMERIC: + return isNaN(value); + + case POSITIVE_NUMERIC: + return isNaN(value) || value < 1; + } + } + + return false; + } + function getPropertyInfo(name) { + return properties.hasOwnProperty(name) ? properties[name] : null; + } + + function PropertyInfoRecord( + name, + type, + mustUseProperty, + attributeName, + attributeNamespace, + sanitizeURL, + ) { + this.acceptsBooleans = + type === BOOLEANISH_STRING || type === BOOLEAN || type === OVERLOADED_BOOLEAN; + this.attributeName = attributeName; + this.attributeNamespace = attributeNamespace; + this.mustUseProperty = mustUseProperty; + this.propertyName = name; + this.type = type; + this.sanitizeURL = sanitizeURL; + } // When adding attributes to this list, be sure to also add them to + // the `possibleStandardNames` module to ensure casing and incorrect + // name warnings. + + var properties = {}; // These props are reserved by React. They shouldn't be written to the DOM. + + [ + 'children', + 'dangerouslySetInnerHTML', // TODO: This prevents the assignment of defaultValue to regular + // elements (not just inputs). Now that ReactDOMInput assigns to the + // defaultValue property -- do we need this? + 'defaultValue', + 'defaultChecked', + 'innerHTML', + 'suppressContentEditableWarning', + 'suppressHydrationWarning', + 'style', + ].forEach(function (name) { + properties[name] = new PropertyInfoRecord( + name, + RESERVED, + false, // mustUseProperty + name, // attributeName + null, // attributeNamespace + false, + ); + }); // A few React string attributes have a different name. + // This is a mapping from React prop names to the attribute names. + + [ + ['acceptCharset', 'accept-charset'], + ['className', 'class'], + ['htmlFor', 'for'], + ['httpEquiv', 'http-equiv'], + ].forEach(function (_ref) { + var name = _ref[0], + attributeName = _ref[1]; + properties[name] = new PropertyInfoRecord( + name, + STRING, + false, // mustUseProperty + attributeName, // attributeName + null, // attributeNamespace + false, + ); + }); // These are "enumerated" HTML attributes that accept "true" and "false". + // In React, we let users pass `true` and `false` even though technically + // these aren't boolean attributes (they are coerced to strings). + + ['contentEditable', 'draggable', 'spellCheck', 'value'].forEach(function (name) { + properties[name] = new PropertyInfoRecord( + name, + BOOLEANISH_STRING, + false, // mustUseProperty + name.toLowerCase(), // attributeName + null, // attributeNamespace + false, + ); + }); // These are "enumerated" SVG attributes that accept "true" and "false". + // In React, we let users pass `true` and `false` even though technically + // these aren't boolean attributes (they are coerced to strings). + // Since these are SVG attributes, their attribute names are case-sensitive. + + ['autoReverse', 'externalResourcesRequired', 'focusable', 'preserveAlpha'].forEach(function (name) { + properties[name] = new PropertyInfoRecord( + name, + BOOLEANISH_STRING, + false, // mustUseProperty + name, // attributeName + null, // attributeNamespace + false, + ); + }); // These are HTML boolean attributes. + + [ + 'allowFullScreen', + 'async', // Note: there is a special case that prevents it from being written to the DOM + // on the client side because the browsers are inconsistent. Instead we call focus(). + 'autoFocus', + 'autoPlay', + 'controls', + 'default', + 'defer', + 'disabled', + 'disablePictureInPicture', + 'formNoValidate', + 'hidden', + 'loop', + 'noModule', + 'noValidate', + 'open', + 'playsInline', + 'readOnly', + 'required', + 'reversed', + 'scoped', + 'seamless', // Microdata + 'itemScope', + ].forEach(function (name) { + properties[name] = new PropertyInfoRecord( + name, + BOOLEAN, + false, // mustUseProperty + name.toLowerCase(), // attributeName + null, // attributeNamespace + false, + ); + }); // These are the few React props that we set as DOM properties + // rather than attributes. These are all booleans. + + [ + 'checked', // Note: `option.selected` is not updated if `select.multiple` is + // disabled with `removeAttribute`. We have special logic for handling this. + 'multiple', + 'muted', + 'selected', + ].forEach(function (name) { + properties[name] = new PropertyInfoRecord( + name, + BOOLEAN, + true, // mustUseProperty + name, // attributeName + null, // attributeNamespace + false, + ); + }); // These are HTML attributes that are "overloaded booleans": they behave like + // booleans, but can also accept a string value. + + ['capture', 'download'].forEach(function (name) { + properties[name] = new PropertyInfoRecord( + name, + OVERLOADED_BOOLEAN, + false, // mustUseProperty + name, // attributeName + null, // attributeNamespace + false, + ); + }); // These are HTML attributes that must be positive numbers. + + ['cols', 'rows', 'size', 'span'].forEach(function (name) { + properties[name] = new PropertyInfoRecord( + name, + POSITIVE_NUMERIC, + false, // mustUseProperty + name, // attributeName + null, // attributeNamespace + false, + ); + }); // These are HTML attributes that must be numbers. + + ['rowSpan', 'start'].forEach(function (name) { + properties[name] = new PropertyInfoRecord( + name, + NUMERIC, + false, // mustUseProperty + name.toLowerCase(), // attributeName + null, // attributeNamespace + false, + ); + }); + var CAMELIZE = /[\-\:]([a-z])/g; + + var capitalize = function (token) { + return token[1].toUpperCase(); + }; // This is a list of all SVG attributes that need special casing, namespacing, + // or boolean value assignment. Regular attributes that just accept strings + // and have the same names are omitted, just like in the HTML whitelist. + // Some of these attributes can be hard to find. This list was created by + // scrapping the MDN documentation. + + [ + 'accent-height', + 'alignment-baseline', + 'arabic-form', + 'baseline-shift', + 'cap-height', + 'clip-path', + 'clip-rule', + 'color-interpolation', + 'color-interpolation-filters', + 'color-profile', + 'color-rendering', + 'dominant-baseline', + 'enable-background', + 'fill-opacity', + 'fill-rule', + 'flood-color', + 'flood-opacity', + 'font-family', + 'font-size', + 'font-size-adjust', + 'font-stretch', + 'font-style', + 'font-variant', + 'font-weight', + 'glyph-name', + 'glyph-orientation-horizontal', + 'glyph-orientation-vertical', + 'horiz-adv-x', + 'horiz-origin-x', + 'image-rendering', + 'letter-spacing', + 'lighting-color', + 'marker-end', + 'marker-mid', + 'marker-start', + 'overline-position', + 'overline-thickness', + 'paint-order', + 'panose-1', + 'pointer-events', + 'rendering-intent', + 'shape-rendering', + 'stop-color', + 'stop-opacity', + 'strikethrough-position', + 'strikethrough-thickness', + 'stroke-dasharray', + 'stroke-dashoffset', + 'stroke-linecap', + 'stroke-linejoin', + 'stroke-miterlimit', + 'stroke-opacity', + 'stroke-width', + 'text-anchor', + 'text-decoration', + 'text-rendering', + 'underline-position', + 'underline-thickness', + 'unicode-bidi', + 'unicode-range', + 'units-per-em', + 'v-alphabetic', + 'v-hanging', + 'v-ideographic', + 'v-mathematical', + 'vector-effect', + 'vert-adv-y', + 'vert-origin-x', + 'vert-origin-y', + 'word-spacing', + 'writing-mode', + 'xmlns:xlink', + 'x-height', + ].forEach(function (attributeName) { + var name = attributeName.replace(CAMELIZE, capitalize); + properties[name] = new PropertyInfoRecord( + name, + STRING, + false, // mustUseProperty + attributeName, + null, // attributeNamespace + false, + ); + }); // String SVG attributes with the xlink namespace. + + ['xlink:actuate', 'xlink:arcrole', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type'].forEach( + function (attributeName) { + var name = attributeName.replace(CAMELIZE, capitalize); + properties[name] = new PropertyInfoRecord( + name, + STRING, + false, // mustUseProperty + attributeName, + 'http://www.w3.org/1999/xlink', + false, + ); + }, + ); // String SVG attributes with the xml namespace. + + ['xml:base', 'xml:lang', 'xml:space'].forEach(function (attributeName) { + var name = attributeName.replace(CAMELIZE, capitalize); + properties[name] = new PropertyInfoRecord( + name, + STRING, + false, // mustUseProperty + attributeName, + 'http://www.w3.org/XML/1998/namespace', + false, + ); + }); // These attribute exists both in HTML and SVG. + // The attribute name is case-sensitive in SVG so we can't just use + // the React name like we do for attributes that exist only in HTML. + + ['tabIndex', 'crossOrigin'].forEach(function (attributeName) { + properties[attributeName] = new PropertyInfoRecord( + attributeName, + STRING, + false, // mustUseProperty + attributeName.toLowerCase(), // attributeName + null, // attributeNamespace + false, + ); + }); // These attributes accept URLs. These must not allow javascript: URLS. + // These will also need to accept Trusted Types object in the future. + + var xlinkHref = 'xlinkHref'; + properties[xlinkHref] = new PropertyInfoRecord( + 'xlinkHref', + STRING, + false, // mustUseProperty + 'xlink:href', + 'http://www.w3.org/1999/xlink', + true, + ); + ['src', 'href', 'action', 'formAction'].forEach(function (attributeName) { + properties[attributeName] = new PropertyInfoRecord( + attributeName, + STRING, + false, // mustUseProperty + attributeName.toLowerCase(), // attributeName + null, // attributeNamespace + true, + ); + }); + + var ReactDebugCurrentFrame$2 = null; + + { + ReactDebugCurrentFrame$2 = ReactSharedInternals.ReactDebugCurrentFrame; + } // A javascript: URL can contain leading C0 control or \u0020 SPACE, + // and any newline or tab are filtered out as if they're not part of the URL. + // https://url.spec.whatwg.org/#url-parsing + // Tab or newline are defined as \r\n\t: + // https://infra.spec.whatwg.org/#ascii-tab-or-newline + // A C0 control is a code point in the range \u0000 NULL to \u001F + // INFORMATION SEPARATOR ONE, inclusive: + // https://infra.spec.whatwg.org/#c0-control-or-space + + /* eslint-disable max-len */ + + var isJavaScriptProtocol = + /^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i; + var didWarn = false; + + function sanitizeURL(url) { + if (disableJavaScriptURLs) { + if (!!isJavaScriptProtocol.test(url)) { + { + throw Error( + 'React has blocked a javascript: URL as a security precaution.' + + ReactDebugCurrentFrame$2.getStackAddendum(), + ); + } + } + } else if (true && !didWarn && isJavaScriptProtocol.test(url)) { + didWarn = true; + warning$1( + false, + 'A future version of React will block javascript: URLs as a security precaution. ' + + 'Use event handlers instead if you can. If you need to generate unsafe HTML try ' + + 'using dangerouslySetInnerHTML instead. React was passed %s.', + JSON.stringify(url), + ); + } + } + + // code copied and modified from escape-html + + /** + * Module variables. + * @private + */ + var matchHtmlRegExp = /["'&<>]/; + /** + * Escapes special characters and HTML entities in a given html string. + * + * @param {string} string HTML string to escape for later insertion + * @return {string} + * @public + */ + + function escapeHtml(string) { + var str = '' + string; + var match = matchHtmlRegExp.exec(str); + + if (!match) { + return str; + } + + var escape; + var html = ''; + var index; + var lastIndex = 0; + + for (index = match.index; index < str.length; index++) { + switch (str.charCodeAt(index)) { + case 34: + // " + escape = '"'; + break; + + case 38: + // & + escape = '&'; + break; + + case 39: + // ' + escape = '''; // modified from escape-html; used to be ''' + + break; + + case 60: + // < + escape = '<'; + break; + + case 62: + // > + escape = '>'; + break; + + default: + continue; + } + + if (lastIndex !== index) { + html += str.substring(lastIndex, index); + } + + lastIndex = index + 1; + html += escape; + } + + return lastIndex !== index ? html + str.substring(lastIndex, index) : html; + } // end code copied and modified from escape-html + + /** + * Escapes text to prevent scripting attacks. + * + * @param {*} text Text value to escape. + * @return {string} An escaped string. + */ + + function escapeTextForBrowser(text) { + if (typeof text === 'boolean' || typeof text === 'number') { + // this shortcircuit helps perf for types that we know will never have + // special characters, especially given that this function is used often + // for numeric dom ids. + return '' + text; + } + + return escapeHtml(text); + } + + /** + * Escapes attribute value to prevent scripting attacks. + * + * @param {*} value Value to escape. + * @return {string} An escaped string. + */ + + function quoteAttributeValueForBrowser(value) { + return '"' + escapeTextForBrowser(value) + '"'; + } + + /** + * Operations for dealing with DOM properties. + */ + + /** + * Creates markup for the ID property. + * + * @param {string} id Unescaped ID. + * @return {string} Markup string. + */ + + function createMarkupForRoot() { + return ROOT_ATTRIBUTE_NAME + '=""'; + } + /** + * Creates markup for a property. + * + * @param {string} name + * @param {*} value + * @return {?string} Markup string, or null if the property was invalid. + */ + + function createMarkupForProperty(name, value) { + var propertyInfo = getPropertyInfo(name); + + if (name !== 'style' && shouldIgnoreAttribute(name, propertyInfo, false)) { + return ''; + } + + if (shouldRemoveAttribute(name, value, propertyInfo, false)) { + return ''; + } + + if (propertyInfo !== null) { + var attributeName = propertyInfo.attributeName; + var type = propertyInfo.type; + + if (type === BOOLEAN || (type === OVERLOADED_BOOLEAN && value === true)) { + return attributeName + '=""'; + } else { + if (propertyInfo.sanitizeURL) { + value = '' + value; + sanitizeURL(value); + } + + return attributeName + '=' + quoteAttributeValueForBrowser(value); + } + } else if (isAttributeNameSafe(name)) { + return name + '=' + quoteAttributeValueForBrowser(value); + } + + return ''; + } + /** + * Creates markup for a custom property. + * + * @param {string} name + * @param {*} value + * @return {string} Markup string, or empty string if the property was invalid. + */ + + function createMarkupForCustomAttribute(name, value) { + if (!isAttributeNameSafe(name) || value == null) { + return ''; + } + + return name + '=' + quoteAttributeValueForBrowser(value); + } + + /** + * inlined Object.is polyfill to avoid requiring consumers ship their own + * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is + */ + function is(x, y) { + return ( + (x === y && (x !== 0 || 1 / x === 1 / y)) || (x !== x && y !== y) // eslint-disable-line no-self-compare + ); + } + + var is$1 = typeof Object.is === 'function' ? Object.is : is; + + var currentlyRenderingComponent = null; + var firstWorkInProgressHook = null; + var workInProgressHook = null; // Whether the work-in-progress hook is a re-rendered hook + + var isReRender = false; // Whether an update was scheduled during the currently executing render pass. + + var didScheduleRenderPhaseUpdate = false; // Lazily created map of render-phase updates + + var renderPhaseUpdates = null; // Counter to prevent infinite loops. + + var numberOfReRenders = 0; + var RE_RENDER_LIMIT = 25; + var isInHookUserCodeInDev = false; // In DEV, this is the name of the currently executing primitive hook + + var currentHookNameInDev; + + function resolveCurrentlyRenderingComponent() { + if (!(currentlyRenderingComponent !== null)) { + { + throw Error( + 'Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.', + ); + } + } + + { + !!isInHookUserCodeInDev + ? warning$1( + false, + 'Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. ' + + 'You can only call Hooks at the top level of your React function. ' + + 'For more information, see ' + + 'https://fb.me/rules-of-hooks', + ) + : void 0; + } + + return currentlyRenderingComponent; + } + + function areHookInputsEqual(nextDeps, prevDeps) { + if (prevDeps === null) { + { + warning$1( + false, + '%s received a final argument during this render, but not during ' + + 'the previous render. Even though the final argument is optional, ' + + 'its type cannot change between renders.', + currentHookNameInDev, + ); + } + + return false; + } + + { + // Don't bother comparing lengths in prod because these arrays should be + // passed inline. + if (nextDeps.length !== prevDeps.length) { + warning$1( + false, + 'The final argument passed to %s changed size between renders. The ' + + 'order and size of this array must remain constant.\n\n' + + 'Previous: %s\n' + + 'Incoming: %s', + currentHookNameInDev, + '[' + nextDeps.join(', ') + ']', + '[' + prevDeps.join(', ') + ']', + ); + } + } + + for (var i = 0; i < prevDeps.length && i < nextDeps.length; i++) { + if (is$1(nextDeps[i], prevDeps[i])) { + continue; + } + + return false; + } + + return true; + } + + function createHook() { + if (numberOfReRenders > 0) { + { + { + throw Error('Rendered more hooks than during the previous render'); + } + } + } + + return { + memoizedState: null, + queue: null, + next: null, + }; + } + + function createWorkInProgressHook() { + if (workInProgressHook === null) { + // This is the first hook in the list + if (firstWorkInProgressHook === null) { + isReRender = false; + firstWorkInProgressHook = workInProgressHook = createHook(); + } else { + // There's already a work-in-progress. Reuse it. + isReRender = true; + workInProgressHook = firstWorkInProgressHook; + } + } else { + if (workInProgressHook.next === null) { + isReRender = false; // Append to the end of the list + + workInProgressHook = workInProgressHook.next = createHook(); + } else { + // There's already a work-in-progress. Reuse it. + isReRender = true; + workInProgressHook = workInProgressHook.next; + } + } + + return workInProgressHook; + } + + function prepareToUseHooks(componentIdentity) { + currentlyRenderingComponent = componentIdentity; + + { + isInHookUserCodeInDev = false; + } // The following should have already been reset + // didScheduleRenderPhaseUpdate = false; + // firstWorkInProgressHook = null; + // numberOfReRenders = 0; + // renderPhaseUpdates = null; + // workInProgressHook = null; + } + function finishHooks(Component, props, children, refOrContext) { + // This must be called after every function component to prevent hooks from + // being used in classes. + while (didScheduleRenderPhaseUpdate) { + // Updates were scheduled during the render phase. They are stored in + // the `renderPhaseUpdates` map. Call the component again, reusing the + // work-in-progress hooks and applying the additional updates on top. Keep + // restarting until no more updates are scheduled. + didScheduleRenderPhaseUpdate = false; + numberOfReRenders += 1; // Start over from the beginning of the list + + workInProgressHook = null; + children = Component(props, refOrContext); + } + + currentlyRenderingComponent = null; + firstWorkInProgressHook = null; + numberOfReRenders = 0; + renderPhaseUpdates = null; + workInProgressHook = null; + + { + isInHookUserCodeInDev = false; + } // These were reset above + // currentlyRenderingComponent = null; + // didScheduleRenderPhaseUpdate = false; + // firstWorkInProgressHook = null; + // numberOfReRenders = 0; + // renderPhaseUpdates = null; + // workInProgressHook = null; + + return children; + } + + function readContext(context, observedBits) { + var threadID = currentThreadID; + validateContextBounds(context, threadID); + + { + !!isInHookUserCodeInDev + ? warning$1( + false, + 'Context can only be read while React is rendering. ' + + 'In classes, you can read it in the render method or getDerivedStateFromProps. ' + + 'In function components, you can read it directly in the function body, but not ' + + 'inside Hooks like useReducer() or useMemo().', + ) + : void 0; + } + + return context[threadID]; + } + + function useContext(context, observedBits) { + { + currentHookNameInDev = 'useContext'; + } + + resolveCurrentlyRenderingComponent(); + var threadID = currentThreadID; + validateContextBounds(context, threadID); + return context[threadID]; + } + + function basicStateReducer(state, action) { + return typeof action === 'function' ? action(state) : action; + } + + function useState(initialState) { + { + currentHookNameInDev = 'useState'; + } + + return useReducer( + basicStateReducer, // useReducer has a special case to support lazy useState initializers + initialState, + ); + } + function useReducer(reducer, initialArg, init) { + { + if (reducer !== basicStateReducer) { + currentHookNameInDev = 'useReducer'; + } + } + + currentlyRenderingComponent = resolveCurrentlyRenderingComponent(); + workInProgressHook = createWorkInProgressHook(); + + if (isReRender) { + // This is a re-render. Apply the new render phase updates to the previous + // current hook. + var queue = workInProgressHook.queue; + var dispatch = queue.dispatch; + + if (renderPhaseUpdates !== null) { + // Render phase updates are stored in a map of queue -> linked list + var firstRenderPhaseUpdate = renderPhaseUpdates.get(queue); + + if (firstRenderPhaseUpdate !== undefined) { + renderPhaseUpdates.delete(queue); + var newState = workInProgressHook.memoizedState; + var update = firstRenderPhaseUpdate; + + do { + // Process this render phase update. We don't have to check the + // priority because it will always be the same as the current + // render's. + var action = update.action; + + { + isInHookUserCodeInDev = true; + } + + newState = reducer(newState, action); + + { + isInHookUserCodeInDev = false; + } + + update = update.next; + } while (update !== null); + + workInProgressHook.memoizedState = newState; + return [newState, dispatch]; + } + } + + return [workInProgressHook.memoizedState, dispatch]; + } else { + { + isInHookUserCodeInDev = true; + } + + var initialState; + + if (reducer === basicStateReducer) { + // Special case for `useState`. + initialState = typeof initialArg === 'function' ? initialArg() : initialArg; + } else { + initialState = init !== undefined ? init(initialArg) : initialArg; + } + + { + isInHookUserCodeInDev = false; + } + + workInProgressHook.memoizedState = initialState; + + var _queue = (workInProgressHook.queue = { + last: null, + dispatch: null, + }); + + var _dispatch = (_queue.dispatch = dispatchAction.bind( + null, + currentlyRenderingComponent, + _queue, + )); + + return [workInProgressHook.memoizedState, _dispatch]; + } + } + + function useMemo(nextCreate, deps) { + currentlyRenderingComponent = resolveCurrentlyRenderingComponent(); + workInProgressHook = createWorkInProgressHook(); + var nextDeps = deps === undefined ? null : deps; + + if (workInProgressHook !== null) { + var prevState = workInProgressHook.memoizedState; + + if (prevState !== null) { + if (nextDeps !== null) { + var prevDeps = prevState[1]; + + if (areHookInputsEqual(nextDeps, prevDeps)) { + return prevState[0]; + } + } + } + } + + { + isInHookUserCodeInDev = true; + } + + var nextValue = nextCreate(); + + { + isInHookUserCodeInDev = false; + } + + workInProgressHook.memoizedState = [nextValue, nextDeps]; + return nextValue; + } + + function useRef(initialValue) { + currentlyRenderingComponent = resolveCurrentlyRenderingComponent(); + workInProgressHook = createWorkInProgressHook(); + var previousRef = workInProgressHook.memoizedState; + + if (previousRef === null) { + var ref = { + current: initialValue, + }; + + { + Object.seal(ref); + } + + workInProgressHook.memoizedState = ref; + return ref; + } else { + return previousRef; + } + } + + function useLayoutEffect(create, inputs) { + { + currentHookNameInDev = 'useLayoutEffect'; + } + + warning$1( + false, + 'useLayoutEffect does nothing on the server, because its effect cannot ' + + "be encoded into the server renderer's output format. This will lead " + + 'to a mismatch between the initial, non-hydrated UI and the intended ' + + 'UI. To avoid this, useLayoutEffect should only be used in ' + + 'components that render exclusively on the client. ' + + 'See https://fb.me/react-uselayouteffect-ssr for common fixes.', + ); + } + + function dispatchAction(componentIdentity, queue, action) { + if (!(numberOfReRenders < RE_RENDER_LIMIT)) { + { + throw Error( + 'Too many re-renders. React limits the number of renders to prevent an infinite loop.', + ); + } + } + + if (componentIdentity === currentlyRenderingComponent) { + // This is a render phase update. Stash it in a lazily-created map of + // queue -> linked list of updates. After this render pass, we'll restart + // and apply the stashed updates on top of the work-in-progress hook. + didScheduleRenderPhaseUpdate = true; + var update = { + action: action, + next: null, + }; + + if (renderPhaseUpdates === null) { + renderPhaseUpdates = new Map(); + } + + var firstRenderPhaseUpdate = renderPhaseUpdates.get(queue); + + if (firstRenderPhaseUpdate === undefined) { + renderPhaseUpdates.set(queue, update); + } else { + // Append the update to the end of the list. + var lastRenderPhaseUpdate = firstRenderPhaseUpdate; + + while (lastRenderPhaseUpdate.next !== null) { + lastRenderPhaseUpdate = lastRenderPhaseUpdate.next; + } + + lastRenderPhaseUpdate.next = update; + } + } else { + // This means an update has happened after the function component has + // returned. On the server this is a no-op. In React Fiber, the update + // would be scheduled for a future render. + } + } + + function useCallback(callback, deps) { + // Callbacks are passed as they are in the server environment. + return callback; + } + + function useResponder(responder, props) { + return { + props: props, + responder: responder, + }; + } + + function useDeferredValue(value, config) { + resolveCurrentlyRenderingComponent(); + return value; + } + + function useTransition(config) { + resolveCurrentlyRenderingComponent(); + + var startTransition = function (callback) { + callback(); + }; + + return [startTransition, false]; + } + + function noop() {} + + var currentThreadID = 0; + function setCurrentThreadID(threadID) { + currentThreadID = threadID; + } + var Dispatcher = { + readContext: readContext, + useContext: useContext, + useMemo: useMemo, + useReducer: useReducer, + useRef: useRef, + useState: useState, + useLayoutEffect: useLayoutEffect, + useCallback: useCallback, + // useImperativeHandle is not run in the server environment + useImperativeHandle: noop, + // Effects are not run in the server environment. + useEffect: noop, + // Debugging effect + useDebugValue: noop, + useResponder: useResponder, + useDeferredValue: useDeferredValue, + useTransition: useTransition, + }; + + var HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml'; + var MATH_NAMESPACE = 'http://www.w3.org/1998/Math/MathML'; + var SVG_NAMESPACE = 'http://www.w3.org/2000/svg'; + var Namespaces = { + html: HTML_NAMESPACE, + mathml: MATH_NAMESPACE, + svg: SVG_NAMESPACE, + }; // Assumes there is no parent namespace. + + function getIntrinsicNamespace(type) { + switch (type) { + case 'svg': + return SVG_NAMESPACE; + + case 'math': + return MATH_NAMESPACE; + + default: + return HTML_NAMESPACE; + } + } + function getChildNamespace(parentNamespace, type) { + if (parentNamespace == null || parentNamespace === HTML_NAMESPACE) { + // No (or default) parent namespace: potential entry point. + return getIntrinsicNamespace(type); + } + + if (parentNamespace === SVG_NAMESPACE && type === 'foreignObject') { + // We're leaving SVG. + return HTML_NAMESPACE; + } // By default, pass namespace below. + + return parentNamespace; + } + + var ReactDebugCurrentFrame$3 = null; + var ReactControlledValuePropTypes = { + checkPropTypes: null, + }; + + { + ReactDebugCurrentFrame$3 = ReactSharedInternals.ReactDebugCurrentFrame; + var hasReadOnlyValue = { + button: true, + checkbox: true, + image: true, + hidden: true, + radio: true, + reset: true, + submit: true, + }; + var propTypes = { + value: function (props, propName, componentName) { + if ( + hasReadOnlyValue[props.type] || + props.onChange || + props.readOnly || + props.disabled || + props[propName] == null || + (enableFlareAPI && props.listeners) + ) { + return null; + } + + return new Error( + 'You provided a `value` prop to a form field without an ' + + '`onChange` handler. This will render a read-only field. If ' + + 'the field should be mutable use `defaultValue`. Otherwise, ' + + 'set either `onChange` or `readOnly`.', + ); + }, + checked: function (props, propName, componentName) { + if ( + props.onChange || + props.readOnly || + props.disabled || + props[propName] == null || + (enableFlareAPI && props.listeners) + ) { + return null; + } + + return new Error( + 'You provided a `checked` prop to a form field without an ' + + '`onChange` handler. This will render a read-only field. If ' + + 'the field should be mutable use `defaultChecked`. Otherwise, ' + + 'set either `onChange` or `readOnly`.', + ); + }, + }; + /** + * Provide a linked `value` attribute for controlled forms. You should not use + * this outside of the ReactDOM controlled form components. + */ + + ReactControlledValuePropTypes.checkPropTypes = function (tagName, props) { + checkPropTypes(propTypes, props, 'prop', tagName, ReactDebugCurrentFrame$3.getStackAddendum); + }; + } + + // For HTML, certain tags should omit their close tag. We keep a whitelist for + // those special-case tags. + var omittedCloseTags = { + area: true, + base: true, + br: true, + col: true, + embed: true, + hr: true, + img: true, + input: true, + keygen: true, + link: true, + meta: true, + param: true, + source: true, + track: true, + wbr: true, // NOTE: menuitem's close tag should be omitted, but that causes problems. + }; + + // `omittedCloseTags` except that `menuitem` should still have its closing tag. + + var voidElementTags = _assign( + { + menuitem: true, + }, + omittedCloseTags, + ); + + // or add stack by default to invariants where possible. + + var HTML = '__html'; + var ReactDebugCurrentFrame$4 = null; + + { + ReactDebugCurrentFrame$4 = ReactSharedInternals.ReactDebugCurrentFrame; + } + + function assertValidProps(tag, props) { + if (!props) { + return; + } // Note the use of `==` which checks for null or undefined. + + if (voidElementTags[tag]) { + if (!(props.children == null && props.dangerouslySetInnerHTML == null)) { + { + throw Error( + tag + + ' is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.' + + ReactDebugCurrentFrame$4.getStackAddendum(), + ); + } + } + } + + if (props.dangerouslySetInnerHTML != null) { + if (!(props.children == null)) { + { + throw Error('Can only set one of `children` or `props.dangerouslySetInnerHTML`.'); + } + } + + if ( + !(typeof props.dangerouslySetInnerHTML === 'object' && HTML in props.dangerouslySetInnerHTML) + ) { + { + throw Error( + '`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://fb.me/react-invariant-dangerously-set-inner-html for more information.', + ); + } + } + } + + { + !(props.suppressContentEditableWarning || !props.contentEditable || props.children == null) + ? warning$1( + false, + 'A component is `contentEditable` and contains `children` managed by ' + + 'React. It is now your responsibility to guarantee that none of ' + + 'those nodes are unexpectedly modified or duplicated. This is ' + + 'probably not intentional.', + ) + : void 0; + } + + if (!(props.style == null || typeof props.style === 'object')) { + { + throw Error( + "The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX." + + ReactDebugCurrentFrame$4.getStackAddendum(), + ); + } + } + } + + /** + * CSS properties which accept numbers but are not in units of "px". + */ + var isUnitlessNumber = { + animationIterationCount: true, + borderImageOutset: true, + borderImageSlice: true, + borderImageWidth: true, + boxFlex: true, + boxFlexGroup: true, + boxOrdinalGroup: true, + columnCount: true, + columns: true, + flex: true, + flexGrow: true, + flexPositive: true, + flexShrink: true, + flexNegative: true, + flexOrder: true, + gridArea: true, + gridRow: true, + gridRowEnd: true, + gridRowSpan: true, + gridRowStart: true, + gridColumn: true, + gridColumnEnd: true, + gridColumnSpan: true, + gridColumnStart: true, + fontWeight: true, + lineClamp: true, + lineHeight: true, + opacity: true, + order: true, + orphans: true, + tabSize: true, + widows: true, + zIndex: true, + zoom: true, + // SVG-related properties + fillOpacity: true, + floodOpacity: true, + stopOpacity: true, + strokeDasharray: true, + strokeDashoffset: true, + strokeMiterlimit: true, + strokeOpacity: true, + strokeWidth: true, + }; + /** + * @param {string} prefix vendor-specific prefix, eg: Webkit + * @param {string} key style name, eg: transitionDuration + * @return {string} style name prefixed with `prefix`, properly camelCased, eg: + * WebkitTransitionDuration + */ + + function prefixKey(prefix, key) { + return prefix + key.charAt(0).toUpperCase() + key.substring(1); + } + /** + * Support style names that may come passed in prefixed by adding permutations + * of vendor prefixes. + */ + + var prefixes = ['Webkit', 'ms', 'Moz', 'O']; // Using Object.keys here, or else the vanilla for-in loop makes IE8 go into an + // infinite loop, because it iterates over the newly added props too. + + Object.keys(isUnitlessNumber).forEach(function (prop) { + prefixes.forEach(function (prefix) { + isUnitlessNumber[prefixKey(prefix, prop)] = isUnitlessNumber[prop]; + }); + }); + + /** + * Convert a value into the proper css writable value. The style name `name` + * should be logical (no hyphens), as specified + * in `CSSProperty.isUnitlessNumber`. + * + * @param {string} name CSS property name such as `topMargin`. + * @param {*} value CSS property value such as `10px`. + * @return {string} Normalized style value with dimensions applied. + */ + + function dangerousStyleValue(name, value, isCustomProperty) { + // Note that we've removed escapeTextForBrowser() calls here since the + // whole string will be escaped when the attribute is injected into + // the markup. If you provide unsafe user data here they can inject + // arbitrary CSS which may be problematic (I couldn't repro this): + // https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet + // http://www.thespanner.co.uk/2007/11/26/ultimate-xss-css-injection/ + // This is not an XSS hole but instead a potential CSS injection issue + // which has lead to a greater discussion about how we're going to + // trust URLs moving forward. See #2115901 + var isEmpty = value == null || typeof value === 'boolean' || value === ''; + + if (isEmpty) { + return ''; + } + + if ( + !isCustomProperty && + typeof value === 'number' && + value !== 0 && + !(isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name]) + ) { + return value + 'px'; // Presumes implicit 'px' suffix for unitless numbers + } + + return ('' + value).trim(); + } + + var uppercasePattern = /([A-Z])/g; + var msPattern = /^ms-/; + /** + * Hyphenates a camelcased CSS property name, for example: + * + * > hyphenateStyleName('backgroundColor') + * < "background-color" + * > hyphenateStyleName('MozTransition') + * < "-moz-transition" + * > hyphenateStyleName('msTransition') + * < "-ms-transition" + * + * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix + * is converted to `-ms-`. + */ + + function hyphenateStyleName(name) { + return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-'); + } + + function isCustomComponent(tagName, props) { + if (tagName.indexOf('-') === -1) { + return typeof props.is === 'string'; + } + + switch (tagName) { + // These are reserved SVG and MathML elements. + // We don't mind this whitelist too much because we expect it to never grow. + // The alternative is to track the namespace in a few places which is convoluted. + // https://w3c.github.io/webcomponents/spec/custom/#custom-elements-core-concepts + case 'annotation-xml': + case 'color-profile': + case 'font-face': + case 'font-face-src': + case 'font-face-uri': + case 'font-face-format': + case 'font-face-name': + case 'missing-glyph': + return false; + + default: + return true; + } + } + + var warnValidStyle = function () {}; + + { + // 'msTransform' is correct, but the other prefixes should be capitalized + var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/; + var msPattern$1 = /^-ms-/; + var hyphenPattern = /-(.)/g; // style values shouldn't contain a semicolon + + var badStyleValueWithSemicolonPattern = /;\s*$/; + var warnedStyleNames = {}; + var warnedStyleValues = {}; + var warnedForNaNValue = false; + var warnedForInfinityValue = false; + + var camelize = function (string) { + return string.replace(hyphenPattern, function (_, character) { + return character.toUpperCase(); + }); + }; + + var warnHyphenatedStyleName = function (name) { + if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) { + return; + } + + warnedStyleNames[name] = true; + warning$1( + false, + 'Unsupported style property %s. Did you mean %s?', + name, // As Andi Smith suggests + // (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix + // is converted to lowercase `ms`. + camelize(name.replace(msPattern$1, 'ms-')), + ); + }; + + var warnBadVendoredStyleName = function (name) { + if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) { + return; + } + + warnedStyleNames[name] = true; + warning$1( + false, + 'Unsupported vendor-prefixed style property %s. Did you mean %s?', + name, + name.charAt(0).toUpperCase() + name.slice(1), + ); + }; + + var warnStyleValueWithSemicolon = function (name, value) { + if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) { + return; + } + + warnedStyleValues[value] = true; + warning$1( + false, + "Style property values shouldn't contain a semicolon. " + 'Try "%s: %s" instead.', + name, + value.replace(badStyleValueWithSemicolonPattern, ''), + ); + }; + + var warnStyleValueIsNaN = function (name, value) { + if (warnedForNaNValue) { + return; + } + + warnedForNaNValue = true; + warning$1(false, '`NaN` is an invalid value for the `%s` css style property.', name); + }; + + var warnStyleValueIsInfinity = function (name, value) { + if (warnedForInfinityValue) { + return; + } + + warnedForInfinityValue = true; + warning$1(false, '`Infinity` is an invalid value for the `%s` css style property.', name); + }; + + warnValidStyle = function (name, value) { + if (name.indexOf('-') > -1) { + warnHyphenatedStyleName(name); + } else if (badVendoredStyleNamePattern.test(name)) { + warnBadVendoredStyleName(name); + } else if (badStyleValueWithSemicolonPattern.test(value)) { + warnStyleValueWithSemicolon(name, value); + } + + if (typeof value === 'number') { + if (isNaN(value)) { + warnStyleValueIsNaN(name, value); + } else if (!isFinite(value)) { + warnStyleValueIsInfinity(name, value); + } + } + }; + } + + var warnValidStyle$1 = warnValidStyle; + + var ariaProperties = { + 'aria-current': 0, + // state + 'aria-details': 0, + 'aria-disabled': 0, + // state + 'aria-hidden': 0, + // state + 'aria-invalid': 0, + // state + 'aria-keyshortcuts': 0, + 'aria-label': 0, + 'aria-roledescription': 0, + // Widget Attributes + 'aria-autocomplete': 0, + 'aria-checked': 0, + 'aria-expanded': 0, + 'aria-haspopup': 0, + 'aria-level': 0, + 'aria-modal': 0, + 'aria-multiline': 0, + 'aria-multiselectable': 0, + 'aria-orientation': 0, + 'aria-placeholder': 0, + 'aria-pressed': 0, + 'aria-readonly': 0, + 'aria-required': 0, + 'aria-selected': 0, + 'aria-sort': 0, + 'aria-valuemax': 0, + 'aria-valuemin': 0, + 'aria-valuenow': 0, + 'aria-valuetext': 0, + // Live Region Attributes + 'aria-atomic': 0, + 'aria-busy': 0, + 'aria-live': 0, + 'aria-relevant': 0, + // Drag-and-Drop Attributes + 'aria-dropeffect': 0, + 'aria-grabbed': 0, + // Relationship Attributes + 'aria-activedescendant': 0, + 'aria-colcount': 0, + 'aria-colindex': 0, + 'aria-colspan': 0, + 'aria-controls': 0, + 'aria-describedby': 0, + 'aria-errormessage': 0, + 'aria-flowto': 0, + 'aria-labelledby': 0, + 'aria-owns': 0, + 'aria-posinset': 0, + 'aria-rowcount': 0, + 'aria-rowindex': 0, + 'aria-rowspan': 0, + 'aria-setsize': 0, + }; + + var warnedProperties = {}; + var rARIA = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$'); + var rARIACamel = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$'); + var hasOwnProperty$2 = Object.prototype.hasOwnProperty; + + function validateProperty(tagName, name) { + if (hasOwnProperty$2.call(warnedProperties, name) && warnedProperties[name]) { + return true; + } + + if (rARIACamel.test(name)) { + var ariaName = 'aria-' + name.slice(4).toLowerCase(); + var correctName = ariaProperties.hasOwnProperty(ariaName) ? ariaName : null; // If this is an aria-* attribute, but is not listed in the known DOM + // DOM properties, then it is an invalid aria-* attribute. + + if (correctName == null) { + warning$1( + false, + 'Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.', + name, + ); + warnedProperties[name] = true; + return true; + } // aria-* attributes should be lowercase; suggest the lowercase version. + + if (name !== correctName) { + warning$1(false, 'Invalid ARIA attribute `%s`. Did you mean `%s`?', name, correctName); + warnedProperties[name] = true; + return true; + } + } + + if (rARIA.test(name)) { + var lowerCasedName = name.toLowerCase(); + var standardName = ariaProperties.hasOwnProperty(lowerCasedName) ? lowerCasedName : null; // If this is an aria-* attribute, but is not listed in the known DOM + // DOM properties, then it is an invalid aria-* attribute. + + if (standardName == null) { + warnedProperties[name] = true; + return false; + } // aria-* attributes should be lowercase; suggest the lowercase version. + + if (name !== standardName) { + warning$1(false, 'Unknown ARIA attribute `%s`. Did you mean `%s`?', name, standardName); + warnedProperties[name] = true; + return true; + } + } + + return true; + } + + function warnInvalidARIAProps(type, props) { + var invalidProps = []; + + for (var key in props) { + var isValid = validateProperty(type, key); + + if (!isValid) { + invalidProps.push(key); + } + } + + var unknownPropString = invalidProps + .map(function (prop) { + return '`' + prop + '`'; + }) + .join(', '); + + if (invalidProps.length === 1) { + warning$1( + false, + 'Invalid aria prop %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop', + unknownPropString, + type, + ); + } else if (invalidProps.length > 1) { + warning$1( + false, + 'Invalid aria props %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop', + unknownPropString, + type, + ); + } + } + + function validateProperties(type, props) { + if (isCustomComponent(type, props)) { + return; + } + + warnInvalidARIAProps(type, props); + } + + var didWarnValueNull = false; + function validateProperties$1(type, props) { + if (type !== 'input' && type !== 'textarea' && type !== 'select') { + return; + } + + if (props != null && props.value === null && !didWarnValueNull) { + didWarnValueNull = true; + + if (type === 'select' && props.multiple) { + warning$1( + false, + '`value` prop on `%s` should not be null. ' + + 'Consider using an empty array when `multiple` is set to `true` ' + + 'to clear the component or `undefined` for uncontrolled components.', + type, + ); + } else { + warning$1( + false, + '`value` prop on `%s` should not be null. ' + + 'Consider using an empty string to clear the component or `undefined` ' + + 'for uncontrolled components.', + type, + ); + } + } + } + + /** + * Registers plugins so that they can extract and dispatch events. + * + * @see {EventPluginHub} + */ + + /** + * Ordered list of injected plugins. + */ + + /** + * Mapping from event name to dispatch config + */ + + /** + * Mapping from registration name to plugin module + */ + + var registrationNameModules = {}; + /** + * Mapping from registration name to event name + */ + + /** + * Mapping from lowercase registration names to the properly cased version, + * used to warn in the case of missing event handlers. Available + * only in true. + * @type {Object} + */ + + var possibleRegistrationNames = {}; // Trust the developer to only use possibleRegistrationNames in true + + /** + * Injects an ordering of plugins (by plugin name). This allows the ordering + * to be decoupled from injection of the actual plugins so that ordering is + * always deterministic regardless of packaging, on-the-fly injection, etc. + * + * @param {array} InjectedEventPluginOrder + * @internal + * @see {EventPluginHub.injection.injectEventPluginOrder} + */ + + /** + * Injects plugins to be used by `EventPluginHub`. The plugin names must be + * in the ordering injected by `injectEventPluginOrder`. + * + * Plugins can be injected as part of page initialization or on-the-fly. + * + * @param {object} injectedNamesToPlugins Map from names to plugin modules. + * @internal + * @see {EventPluginHub.injection.injectEventPluginsByName} + */ + + // When adding attributes to the HTML or SVG whitelist, be sure to + // also add them to this module to ensure casing and incorrect name + // warnings. + var possibleStandardNames = { + // HTML + accept: 'accept', + acceptcharset: 'acceptCharset', + 'accept-charset': 'acceptCharset', + accesskey: 'accessKey', + action: 'action', + allowfullscreen: 'allowFullScreen', + alt: 'alt', + as: 'as', + async: 'async', + autocapitalize: 'autoCapitalize', + autocomplete: 'autoComplete', + autocorrect: 'autoCorrect', + autofocus: 'autoFocus', + autoplay: 'autoPlay', + autosave: 'autoSave', + capture: 'capture', + cellpadding: 'cellPadding', + cellspacing: 'cellSpacing', + challenge: 'challenge', + charset: 'charSet', + checked: 'checked', + children: 'children', + cite: 'cite', + class: 'className', + classid: 'classID', + classname: 'className', + cols: 'cols', + colspan: 'colSpan', + content: 'content', + contenteditable: 'contentEditable', + contextmenu: 'contextMenu', + controls: 'controls', + controlslist: 'controlsList', + coords: 'coords', + crossorigin: 'crossOrigin', + dangerouslysetinnerhtml: 'dangerouslySetInnerHTML', + data: 'data', + datetime: 'dateTime', + default: 'default', + defaultchecked: 'defaultChecked', + defaultvalue: 'defaultValue', + defer: 'defer', + dir: 'dir', + disabled: 'disabled', + disablepictureinpicture: 'disablePictureInPicture', + download: 'download', + draggable: 'draggable', + enctype: 'encType', + for: 'htmlFor', + form: 'form', + formmethod: 'formMethod', + formaction: 'formAction', + formenctype: 'formEncType', + formnovalidate: 'formNoValidate', + formtarget: 'formTarget', + frameborder: 'frameBorder', + headers: 'headers', + height: 'height', + hidden: 'hidden', + high: 'high', + href: 'href', + hreflang: 'hrefLang', + htmlfor: 'htmlFor', + httpequiv: 'httpEquiv', + 'http-equiv': 'httpEquiv', + icon: 'icon', + id: 'id', + innerhtml: 'innerHTML', + inputmode: 'inputMode', + integrity: 'integrity', + is: 'is', + itemid: 'itemID', + itemprop: 'itemProp', + itemref: 'itemRef', + itemscope: 'itemScope', + itemtype: 'itemType', + keyparams: 'keyParams', + keytype: 'keyType', + kind: 'kind', + label: 'label', + lang: 'lang', + list: 'list', + loop: 'loop', + low: 'low', + manifest: 'manifest', + marginwidth: 'marginWidth', + marginheight: 'marginHeight', + max: 'max', + maxlength: 'maxLength', + media: 'media', + mediagroup: 'mediaGroup', + method: 'method', + min: 'min', + minlength: 'minLength', + multiple: 'multiple', + muted: 'muted', + name: 'name', + nomodule: 'noModule', + nonce: 'nonce', + novalidate: 'noValidate', + open: 'open', + optimum: 'optimum', + pattern: 'pattern', + placeholder: 'placeholder', + playsinline: 'playsInline', + poster: 'poster', + preload: 'preload', + profile: 'profile', + radiogroup: 'radioGroup', + readonly: 'readOnly', + referrerpolicy: 'referrerPolicy', + rel: 'rel', + required: 'required', + reversed: 'reversed', + role: 'role', + rows: 'rows', + rowspan: 'rowSpan', + sandbox: 'sandbox', + scope: 'scope', + scoped: 'scoped', + scrolling: 'scrolling', + seamless: 'seamless', + selected: 'selected', + shape: 'shape', + size: 'size', + sizes: 'sizes', + span: 'span', + spellcheck: 'spellCheck', + src: 'src', + srcdoc: 'srcDoc', + srclang: 'srcLang', + srcset: 'srcSet', + start: 'start', + step: 'step', + style: 'style', + summary: 'summary', + tabindex: 'tabIndex', + target: 'target', + title: 'title', + type: 'type', + usemap: 'useMap', + value: 'value', + width: 'width', + wmode: 'wmode', + wrap: 'wrap', + // SVG + about: 'about', + accentheight: 'accentHeight', + 'accent-height': 'accentHeight', + accumulate: 'accumulate', + additive: 'additive', + alignmentbaseline: 'alignmentBaseline', + 'alignment-baseline': 'alignmentBaseline', + allowreorder: 'allowReorder', + alphabetic: 'alphabetic', + amplitude: 'amplitude', + arabicform: 'arabicForm', + 'arabic-form': 'arabicForm', + ascent: 'ascent', + attributename: 'attributeName', + attributetype: 'attributeType', + autoreverse: 'autoReverse', + azimuth: 'azimuth', + basefrequency: 'baseFrequency', + baselineshift: 'baselineShift', + 'baseline-shift': 'baselineShift', + baseprofile: 'baseProfile', + bbox: 'bbox', + begin: 'begin', + bias: 'bias', + by: 'by', + calcmode: 'calcMode', + capheight: 'capHeight', + 'cap-height': 'capHeight', + clip: 'clip', + clippath: 'clipPath', + 'clip-path': 'clipPath', + clippathunits: 'clipPathUnits', + cliprule: 'clipRule', + 'clip-rule': 'clipRule', + color: 'color', + colorinterpolation: 'colorInterpolation', + 'color-interpolation': 'colorInterpolation', + colorinterpolationfilters: 'colorInterpolationFilters', + 'color-interpolation-filters': 'colorInterpolationFilters', + colorprofile: 'colorProfile', + 'color-profile': 'colorProfile', + colorrendering: 'colorRendering', + 'color-rendering': 'colorRendering', + contentscripttype: 'contentScriptType', + contentstyletype: 'contentStyleType', + cursor: 'cursor', + cx: 'cx', + cy: 'cy', + d: 'd', + datatype: 'datatype', + decelerate: 'decelerate', + descent: 'descent', + diffuseconstant: 'diffuseConstant', + direction: 'direction', + display: 'display', + divisor: 'divisor', + dominantbaseline: 'dominantBaseline', + 'dominant-baseline': 'dominantBaseline', + dur: 'dur', + dx: 'dx', + dy: 'dy', + edgemode: 'edgeMode', + elevation: 'elevation', + enablebackground: 'enableBackground', + 'enable-background': 'enableBackground', + end: 'end', + exponent: 'exponent', + externalresourcesrequired: 'externalResourcesRequired', + fill: 'fill', + fillopacity: 'fillOpacity', + 'fill-opacity': 'fillOpacity', + fillrule: 'fillRule', + 'fill-rule': 'fillRule', + filter: 'filter', + filterres: 'filterRes', + filterunits: 'filterUnits', + floodopacity: 'floodOpacity', + 'flood-opacity': 'floodOpacity', + floodcolor: 'floodColor', + 'flood-color': 'floodColor', + focusable: 'focusable', + fontfamily: 'fontFamily', + 'font-family': 'fontFamily', + fontsize: 'fontSize', + 'font-size': 'fontSize', + fontsizeadjust: 'fontSizeAdjust', + 'font-size-adjust': 'fontSizeAdjust', + fontstretch: 'fontStretch', + 'font-stretch': 'fontStretch', + fontstyle: 'fontStyle', + 'font-style': 'fontStyle', + fontvariant: 'fontVariant', + 'font-variant': 'fontVariant', + fontweight: 'fontWeight', + 'font-weight': 'fontWeight', + format: 'format', + from: 'from', + fx: 'fx', + fy: 'fy', + g1: 'g1', + g2: 'g2', + glyphname: 'glyphName', + 'glyph-name': 'glyphName', + glyphorientationhorizontal: 'glyphOrientationHorizontal', + 'glyph-orientation-horizontal': 'glyphOrientationHorizontal', + glyphorientationvertical: 'glyphOrientationVertical', + 'glyph-orientation-vertical': 'glyphOrientationVertical', + glyphref: 'glyphRef', + gradienttransform: 'gradientTransform', + gradientunits: 'gradientUnits', + hanging: 'hanging', + horizadvx: 'horizAdvX', + 'horiz-adv-x': 'horizAdvX', + horizoriginx: 'horizOriginX', + 'horiz-origin-x': 'horizOriginX', + ideographic: 'ideographic', + imagerendering: 'imageRendering', + 'image-rendering': 'imageRendering', + in2: 'in2', + in: 'in', + inlist: 'inlist', + intercept: 'intercept', + k1: 'k1', + k2: 'k2', + k3: 'k3', + k4: 'k4', + k: 'k', + kernelmatrix: 'kernelMatrix', + kernelunitlength: 'kernelUnitLength', + kerning: 'kerning', + keypoints: 'keyPoints', + keysplines: 'keySplines', + keytimes: 'keyTimes', + lengthadjust: 'lengthAdjust', + letterspacing: 'letterSpacing', + 'letter-spacing': 'letterSpacing', + lightingcolor: 'lightingColor', + 'lighting-color': 'lightingColor', + limitingconeangle: 'limitingConeAngle', + local: 'local', + markerend: 'markerEnd', + 'marker-end': 'markerEnd', + markerheight: 'markerHeight', + markermid: 'markerMid', + 'marker-mid': 'markerMid', + markerstart: 'markerStart', + 'marker-start': 'markerStart', + markerunits: 'markerUnits', + markerwidth: 'markerWidth', + mask: 'mask', + maskcontentunits: 'maskContentUnits', + maskunits: 'maskUnits', + mathematical: 'mathematical', + mode: 'mode', + numoctaves: 'numOctaves', + offset: 'offset', + opacity: 'opacity', + operator: 'operator', + order: 'order', + orient: 'orient', + orientation: 'orientation', + origin: 'origin', + overflow: 'overflow', + overlineposition: 'overlinePosition', + 'overline-position': 'overlinePosition', + overlinethickness: 'overlineThickness', + 'overline-thickness': 'overlineThickness', + paintorder: 'paintOrder', + 'paint-order': 'paintOrder', + panose1: 'panose1', + 'panose-1': 'panose1', + pathlength: 'pathLength', + patterncontentunits: 'patternContentUnits', + patterntransform: 'patternTransform', + patternunits: 'patternUnits', + pointerevents: 'pointerEvents', + 'pointer-events': 'pointerEvents', + points: 'points', + pointsatx: 'pointsAtX', + pointsaty: 'pointsAtY', + pointsatz: 'pointsAtZ', + prefix: 'prefix', + preservealpha: 'preserveAlpha', + preserveaspectratio: 'preserveAspectRatio', + primitiveunits: 'primitiveUnits', + property: 'property', + r: 'r', + radius: 'radius', + refx: 'refX', + refy: 'refY', + renderingintent: 'renderingIntent', + 'rendering-intent': 'renderingIntent', + repeatcount: 'repeatCount', + repeatdur: 'repeatDur', + requiredextensions: 'requiredExtensions', + requiredfeatures: 'requiredFeatures', + resource: 'resource', + restart: 'restart', + result: 'result', + results: 'results', + rotate: 'rotate', + rx: 'rx', + ry: 'ry', + scale: 'scale', + security: 'security', + seed: 'seed', + shaperendering: 'shapeRendering', + 'shape-rendering': 'shapeRendering', + slope: 'slope', + spacing: 'spacing', + specularconstant: 'specularConstant', + specularexponent: 'specularExponent', + speed: 'speed', + spreadmethod: 'spreadMethod', + startoffset: 'startOffset', + stddeviation: 'stdDeviation', + stemh: 'stemh', + stemv: 'stemv', + stitchtiles: 'stitchTiles', + stopcolor: 'stopColor', + 'stop-color': 'stopColor', + stopopacity: 'stopOpacity', + 'stop-opacity': 'stopOpacity', + strikethroughposition: 'strikethroughPosition', + 'strikethrough-position': 'strikethroughPosition', + strikethroughthickness: 'strikethroughThickness', + 'strikethrough-thickness': 'strikethroughThickness', + string: 'string', + stroke: 'stroke', + strokedasharray: 'strokeDasharray', + 'stroke-dasharray': 'strokeDasharray', + strokedashoffset: 'strokeDashoffset', + 'stroke-dashoffset': 'strokeDashoffset', + strokelinecap: 'strokeLinecap', + 'stroke-linecap': 'strokeLinecap', + strokelinejoin: 'strokeLinejoin', + 'stroke-linejoin': 'strokeLinejoin', + strokemiterlimit: 'strokeMiterlimit', + 'stroke-miterlimit': 'strokeMiterlimit', + strokewidth: 'strokeWidth', + 'stroke-width': 'strokeWidth', + strokeopacity: 'strokeOpacity', + 'stroke-opacity': 'strokeOpacity', + suppresscontenteditablewarning: 'suppressContentEditableWarning', + suppresshydrationwarning: 'suppressHydrationWarning', + surfacescale: 'surfaceScale', + systemlanguage: 'systemLanguage', + tablevalues: 'tableValues', + targetx: 'targetX', + targety: 'targetY', + textanchor: 'textAnchor', + 'text-anchor': 'textAnchor', + textdecoration: 'textDecoration', + 'text-decoration': 'textDecoration', + textlength: 'textLength', + textrendering: 'textRendering', + 'text-rendering': 'textRendering', + to: 'to', + transform: 'transform', + typeof: 'typeof', + u1: 'u1', + u2: 'u2', + underlineposition: 'underlinePosition', + 'underline-position': 'underlinePosition', + underlinethickness: 'underlineThickness', + 'underline-thickness': 'underlineThickness', + unicode: 'unicode', + unicodebidi: 'unicodeBidi', + 'unicode-bidi': 'unicodeBidi', + unicoderange: 'unicodeRange', + 'unicode-range': 'unicodeRange', + unitsperem: 'unitsPerEm', + 'units-per-em': 'unitsPerEm', + unselectable: 'unselectable', + valphabetic: 'vAlphabetic', + 'v-alphabetic': 'vAlphabetic', + values: 'values', + vectoreffect: 'vectorEffect', + 'vector-effect': 'vectorEffect', + version: 'version', + vertadvy: 'vertAdvY', + 'vert-adv-y': 'vertAdvY', + vertoriginx: 'vertOriginX', + 'vert-origin-x': 'vertOriginX', + vertoriginy: 'vertOriginY', + 'vert-origin-y': 'vertOriginY', + vhanging: 'vHanging', + 'v-hanging': 'vHanging', + videographic: 'vIdeographic', + 'v-ideographic': 'vIdeographic', + viewbox: 'viewBox', + viewtarget: 'viewTarget', + visibility: 'visibility', + vmathematical: 'vMathematical', + 'v-mathematical': 'vMathematical', + vocab: 'vocab', + widths: 'widths', + wordspacing: 'wordSpacing', + 'word-spacing': 'wordSpacing', + writingmode: 'writingMode', + 'writing-mode': 'writingMode', + x1: 'x1', + x2: 'x2', + x: 'x', + xchannelselector: 'xChannelSelector', + xheight: 'xHeight', + 'x-height': 'xHeight', + xlinkactuate: 'xlinkActuate', + 'xlink:actuate': 'xlinkActuate', + xlinkarcrole: 'xlinkArcrole', + 'xlink:arcrole': 'xlinkArcrole', + xlinkhref: 'xlinkHref', + 'xlink:href': 'xlinkHref', + xlinkrole: 'xlinkRole', + 'xlink:role': 'xlinkRole', + xlinkshow: 'xlinkShow', + 'xlink:show': 'xlinkShow', + xlinktitle: 'xlinkTitle', + 'xlink:title': 'xlinkTitle', + xlinktype: 'xlinkType', + 'xlink:type': 'xlinkType', + xmlbase: 'xmlBase', + 'xml:base': 'xmlBase', + xmllang: 'xmlLang', + 'xml:lang': 'xmlLang', + xmlns: 'xmlns', + 'xml:space': 'xmlSpace', + xmlnsxlink: 'xmlnsXlink', + 'xmlns:xlink': 'xmlnsXlink', + xmlspace: 'xmlSpace', + y1: 'y1', + y2: 'y2', + y: 'y', + ychannelselector: 'yChannelSelector', + z: 'z', + zoomandpan: 'zoomAndPan', + }; + + var validateProperty$1 = function () {}; + + { + var warnedProperties$1 = {}; + var _hasOwnProperty = Object.prototype.hasOwnProperty; + var EVENT_NAME_REGEX = /^on./; + var INVALID_EVENT_NAME_REGEX = /^on[^A-Z]/; + var rARIA$1 = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$'); + var rARIACamel$1 = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$'); + + validateProperty$1 = function (tagName, name, value, canUseEventSystem) { + if (_hasOwnProperty.call(warnedProperties$1, name) && warnedProperties$1[name]) { + return true; + } + + var lowerCasedName = name.toLowerCase(); + + if (lowerCasedName === 'onfocusin' || lowerCasedName === 'onfocusout') { + warning$1( + false, + 'React uses onFocus and onBlur instead of onFocusIn and onFocusOut. ' + + 'All React events are normalized to bubble, so onFocusIn and onFocusOut ' + + 'are not needed/supported by React.', + ); + warnedProperties$1[name] = true; + return true; + } // We can't rely on the event system being injected on the server. + + if (canUseEventSystem) { + if (registrationNameModules.hasOwnProperty(name)) { + return true; + } + + var registrationName = possibleRegistrationNames.hasOwnProperty(lowerCasedName) + ? possibleRegistrationNames[lowerCasedName] + : null; + + if (registrationName != null) { + warning$1( + false, + 'Invalid event handler property `%s`. Did you mean `%s`?', + name, + registrationName, + ); + warnedProperties$1[name] = true; + return true; + } + + if (EVENT_NAME_REGEX.test(name)) { + warning$1(false, 'Unknown event handler property `%s`. It will be ignored.', name); + warnedProperties$1[name] = true; + return true; + } + } else if (EVENT_NAME_REGEX.test(name)) { + // If no event plugins have been injected, we are in a server environment. + // So we can't tell if the event name is correct for sure, but we can filter + // out known bad ones like `onclick`. We can't suggest a specific replacement though. + if (INVALID_EVENT_NAME_REGEX.test(name)) { + warning$1( + false, + 'Invalid event handler property `%s`. ' + + 'React events use the camelCase naming convention, for example `onClick`.', + name, + ); + } + + warnedProperties$1[name] = true; + return true; + } // Let the ARIA attribute hook validate ARIA attributes + + if (rARIA$1.test(name) || rARIACamel$1.test(name)) { + return true; + } + + if (lowerCasedName === 'innerhtml') { + warning$1( + false, + 'Directly setting property `innerHTML` is not permitted. ' + + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.', + ); + warnedProperties$1[name] = true; + return true; + } + + if (lowerCasedName === 'aria') { + warning$1( + false, + 'The `aria` attribute is reserved for future use in React. ' + + 'Pass individual `aria-` attributes instead.', + ); + warnedProperties$1[name] = true; + return true; + } + + if ( + lowerCasedName === 'is' && + value !== null && + value !== undefined && + typeof value !== 'string' + ) { + warning$1( + false, + 'Received a `%s` for a string attribute `is`. If this is expected, cast ' + + 'the value to a string.', + typeof value, + ); + warnedProperties$1[name] = true; + return true; + } + + if (typeof value === 'number' && isNaN(value)) { + warning$1( + false, + 'Received NaN for the `%s` attribute. If this is expected, cast ' + + 'the value to a string.', + name, + ); + warnedProperties$1[name] = true; + return true; + } + + var propertyInfo = getPropertyInfo(name); + var isReserved = propertyInfo !== null && propertyInfo.type === RESERVED; // Known attributes should match the casing specified in the property config. + + if (possibleStandardNames.hasOwnProperty(lowerCasedName)) { + var standardName = possibleStandardNames[lowerCasedName]; + + if (standardName !== name) { + warning$1(false, 'Invalid DOM property `%s`. Did you mean `%s`?', name, standardName); + warnedProperties$1[name] = true; + return true; + } + } else if (!isReserved && name !== lowerCasedName) { + // Unknown attributes should have lowercase casing since that's how they + // will be cased anyway with server rendering. + warning$1( + false, + 'React does not recognize the `%s` prop on a DOM element. If you ' + + 'intentionally want it to appear in the DOM as a custom ' + + 'attribute, spell it as lowercase `%s` instead. ' + + 'If you accidentally passed it from a parent component, remove ' + + 'it from the DOM element.', + name, + lowerCasedName, + ); + warnedProperties$1[name] = true; + return true; + } + + if ( + typeof value === 'boolean' && + shouldRemoveAttributeWithWarning(name, value, propertyInfo, false) + ) { + if (value) { + warning$1( + false, + 'Received `%s` for a non-boolean attribute `%s`.\n\n' + + 'If you want to write it to the DOM, pass a string instead: ' + + '%s="%s" or %s={value.toString()}.', + value, + name, + name, + value, + name, + ); + } else { + warning$1( + false, + 'Received `%s` for a non-boolean attribute `%s`.\n\n' + + 'If you want to write it to the DOM, pass a string instead: ' + + '%s="%s" or %s={value.toString()}.\n\n' + + 'If you used to conditionally omit it with %s={condition && value}, ' + + 'pass %s={condition ? value : undefined} instead.', + value, + name, + name, + value, + name, + name, + name, + ); + } + + warnedProperties$1[name] = true; + return true; + } // Now that we've validated casing, do not validate + // data types for reserved props + + if (isReserved) { + return true; + } // Warn when a known attribute is a bad type + + if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, false)) { + warnedProperties$1[name] = true; + return false; + } // Warn when passing the strings 'false' or 'true' into a boolean prop + + if ( + (value === 'false' || value === 'true') && + propertyInfo !== null && + propertyInfo.type === BOOLEAN + ) { + warning$1( + false, + 'Received the string `%s` for the boolean attribute `%s`. ' + + '%s ' + + 'Did you mean %s={%s}?', + value, + name, + value === 'false' + ? 'The browser will interpret it as a truthy value.' + : 'Although this works, it will not work as expected if you pass the string "false".', + name, + value, + ); + warnedProperties$1[name] = true; + return true; + } + + return true; + }; + } + + var warnUnknownProperties = function (type, props, canUseEventSystem) { + var unknownProps = []; + + for (var key in props) { + var isValid = validateProperty$1(type, key, props[key], canUseEventSystem); + + if (!isValid) { + unknownProps.push(key); + } + } + + var unknownPropString = unknownProps + .map(function (prop) { + return '`' + prop + '`'; + }) + .join(', '); + + if (unknownProps.length === 1) { + warning$1( + false, + 'Invalid value for prop %s on <%s> tag. Either remove it from the element, ' + + 'or pass a string or number value to keep it in the DOM. ' + + 'For details, see https://fb.me/react-attribute-behavior', + unknownPropString, + type, + ); + } else if (unknownProps.length > 1) { + warning$1( + false, + 'Invalid values for props %s on <%s> tag. Either remove them from the element, ' + + 'or pass a string or number value to keep them in the DOM. ' + + 'For details, see https://fb.me/react-attribute-behavior', + unknownPropString, + type, + ); + } + }; + + function validateProperties$2(type, props, canUseEventSystem) { + if (isCustomComponent(type, props)) { + return; + } + + warnUnknownProperties(type, props, canUseEventSystem); + } + + var toArray = React.Children.toArray; // This is only used in DEV. + // Each entry is `this.stack` from a currently executing renderer instance. + // (There may be more than one because ReactDOMServer is reentrant). + // Each stack is an array of frames which may contain nested stacks of elements. + + var currentDebugStacks = []; + var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher; + var ReactDebugCurrentFrame; + var prevGetCurrentStackImpl = null; + + var getCurrentServerStackImpl = function () { + return ''; + }; + + var describeStackFrame = function (element) { + return ''; + }; + + var validatePropertiesInDevelopment = function (type, props) {}; + + var pushCurrentDebugStack = function (stack) {}; + + var pushElementToDebugStack = function (element) {}; + + var popCurrentDebugStack = function () {}; + + var hasWarnedAboutUsingContextAsConsumer = false; + + { + ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; + + validatePropertiesInDevelopment = function (type, props) { + validateProperties(type, props); + validateProperties$1(type, props); + validateProperties$2( + type, + props, + /* canUseEventSystem */ + false, + ); + }; + + describeStackFrame = function (element) { + var source = element._source; + var type = element.type; + var name = getComponentName(type); + var ownerName = null; + return describeComponentFrame(name, source, ownerName); + }; + + pushCurrentDebugStack = function (stack) { + currentDebugStacks.push(stack); + + if (currentDebugStacks.length === 1) { + // We are entering a server renderer. + // Remember the previous (e.g. client) global stack implementation. + prevGetCurrentStackImpl = ReactDebugCurrentFrame.getCurrentStack; + ReactDebugCurrentFrame.getCurrentStack = getCurrentServerStackImpl; + } + }; + + pushElementToDebugStack = function (element) { + // For the innermost executing ReactDOMServer call, + var stack = currentDebugStacks[currentDebugStacks.length - 1]; // Take the innermost executing frame (e.g. <Foo>), + + var frame = stack[stack.length - 1]; // and record that it has one more element associated with it. + + frame.debugElementStack.push(element); // We only need this because we tail-optimize single-element + // children and directly handle them in an inner loop instead of + // creating separate frames for them. + }; + + popCurrentDebugStack = function () { + currentDebugStacks.pop(); + + if (currentDebugStacks.length === 0) { + // We are exiting the server renderer. + // Restore the previous (e.g. client) global stack implementation. + ReactDebugCurrentFrame.getCurrentStack = prevGetCurrentStackImpl; + prevGetCurrentStackImpl = null; + } + }; + + getCurrentServerStackImpl = function () { + if (currentDebugStacks.length === 0) { + // Nothing is currently rendering. + return ''; + } // ReactDOMServer is reentrant so there may be multiple calls at the same time. + // Take the frames from the innermost call which is the last in the array. + + var frames = currentDebugStacks[currentDebugStacks.length - 1]; + var stack = ''; // Go through every frame in the stack from the innermost one. + + for (var i = frames.length - 1; i >= 0; i--) { + var frame = frames[i]; // Every frame might have more than one debug element stack entry associated with it. + // This is because single-child nesting doesn't create materialized frames. + // Instead it would push them through `pushElementToDebugStack()`. + + var debugElementStack = frame.debugElementStack; + + for (var ii = debugElementStack.length - 1; ii >= 0; ii--) { + stack += describeStackFrame(debugElementStack[ii]); + } + } + + return stack; + }; + } + + var didWarnDefaultInputValue = false; + var didWarnDefaultChecked = false; + var didWarnDefaultSelectValue = false; + var didWarnDefaultTextareaValue = false; + var didWarnInvalidOptionChildren = false; + var didWarnAboutNoopUpdateForComponent = {}; + var didWarnAboutBadClass = {}; + var didWarnAboutModulePatternComponent = {}; + var didWarnAboutDeprecatedWillMount = {}; + var didWarnAboutUndefinedDerivedState = {}; + var didWarnAboutUninitializedState = {}; + var valuePropNames = ['value', 'defaultValue']; + var newlineEatingTags = { + listing: true, + pre: true, + textarea: true, + }; // We accept any tag to be rendered but since this gets injected into arbitrary + // HTML, we want to make sure that it's a safe tag. + // http://www.w3.org/TR/REC-xml/#NT-Name + + var VALID_TAG_REGEX = /^[a-zA-Z][a-zA-Z:_\.\-\d]*$/; // Simplified subset + + var validatedTagCache = {}; + + function validateDangerousTag(tag) { + if (!validatedTagCache.hasOwnProperty(tag)) { + if (!VALID_TAG_REGEX.test(tag)) { + { + throw Error('Invalid tag: ' + tag); + } + } + + validatedTagCache[tag] = true; + } + } + + var styleNameCache = {}; + + var processStyleName = function (styleName) { + if (styleNameCache.hasOwnProperty(styleName)) { + return styleNameCache[styleName]; + } + + var result = hyphenateStyleName(styleName); + styleNameCache[styleName] = result; + return result; + }; + + function createMarkupForStyles(styles) { + var serialized = ''; + var delimiter = ''; + + for (var styleName in styles) { + if (!styles.hasOwnProperty(styleName)) { + continue; + } + + var isCustomProperty = styleName.indexOf('--') === 0; + var styleValue = styles[styleName]; + + { + if (!isCustomProperty) { + warnValidStyle$1(styleName, styleValue); + } + } + + if (styleValue != null) { + serialized += delimiter + (isCustomProperty ? styleName : processStyleName(styleName)) + ':'; + serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty); + delimiter = ';'; + } + } + + return serialized || null; + } + + function warnNoop(publicInstance, callerName) { + { + var _constructor = publicInstance.constructor; + var componentName = (_constructor && getComponentName(_constructor)) || 'ReactClass'; + var warningKey = componentName + '.' + callerName; + + if (didWarnAboutNoopUpdateForComponent[warningKey]) { + return; + } + + warningWithoutStack$1( + false, + '%s(...): Can only update a mounting component. ' + + 'This usually means you called %s() outside componentWillMount() on the server. ' + + 'This is a no-op.\n\nPlease check the code for the %s component.', + callerName, + callerName, + componentName, + ); + didWarnAboutNoopUpdateForComponent[warningKey] = true; + } + } + + function shouldConstruct(Component) { + return Component.prototype && Component.prototype.isReactComponent; + } + + function getNonChildrenInnerMarkup(props) { + var innerHTML = props.dangerouslySetInnerHTML; + + if (innerHTML != null) { + if (innerHTML.__html != null) { + return innerHTML.__html; + } + } else { + var content = props.children; + + if (typeof content === 'string' || typeof content === 'number') { + return escapeTextForBrowser(content); + } + } + + return null; + } + + function flattenTopLevelChildren(children) { + if (!React.isValidElement(children)) { + return toArray(children); + } + + var element = children; + + if (element.type !== REACT_FRAGMENT_TYPE) { + return [element]; + } + + var fragmentChildren = element.props.children; + + if (!React.isValidElement(fragmentChildren)) { + return toArray(fragmentChildren); + } + + var fragmentChildElement = fragmentChildren; + return [fragmentChildElement]; + } + + function flattenOptionChildren(children) { + if (children === undefined || children === null) { + return children; + } + + var content = ''; // Flatten children and warn if they aren't strings or numbers; + // invalid types are ignored. + + React.Children.forEach(children, function (child) { + if (child == null) { + return; + } + + content += child; + + { + if (!didWarnInvalidOptionChildren && typeof child !== 'string' && typeof child !== 'number') { + didWarnInvalidOptionChildren = true; + warning$1(false, 'Only strings and numbers are supported as <option> children.'); + } + } + }); + return content; + } + + var hasOwnProperty = Object.prototype.hasOwnProperty; + var STYLE = 'style'; + var RESERVED_PROPS = { + children: null, + dangerouslySetInnerHTML: null, + suppressContentEditableWarning: null, + suppressHydrationWarning: null, + }; + + function createOpenTagMarkup( + tagVerbatim, + tagLowercase, + props, + namespace, + makeStaticMarkup, + isRootElement, + ) { + var ret = '<' + tagVerbatim; + + for (var propKey in props) { + if (!hasOwnProperty.call(props, propKey)) { + continue; + } + + if (enableFlareAPI && propKey === 'listeners') { + continue; + } + + var propValue = props[propKey]; + + if (propValue == null) { + continue; + } + + if (propKey === STYLE) { + propValue = createMarkupForStyles(propValue); + } + + var markup = null; + + if (isCustomComponent(tagLowercase, props)) { + if (!RESERVED_PROPS.hasOwnProperty(propKey)) { + markup = createMarkupForCustomAttribute(propKey, propValue); + } + } else { + markup = createMarkupForProperty(propKey, propValue); + } + + if (markup) { + ret += ' ' + markup; + } + } // For static pages, no need to put React ID and checksum. Saves lots of + // bytes. + + if (makeStaticMarkup) { + return ret; + } + + if (isRootElement) { + ret += ' ' + createMarkupForRoot(); + } + + return ret; + } + + function validateRenderResult(child, type) { + if (child === undefined) { + { + { + throw Error( + (getComponentName(type) || 'Component') + + '(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.', + ); + } + } + } + } + + function resolve(child, context, threadID) { + while (React.isValidElement(child)) { + // Safe because we just checked it's an element. + var element = child; + var Component = element.type; + + { + pushElementToDebugStack(element); + } + + if (typeof Component !== 'function') { + break; + } + + processChild(element, Component); + } // Extra closure so queue and replace can be captured properly + + function processChild(element, Component) { + var isClass = shouldConstruct(Component); + var publicContext = processContext(Component, context, threadID, isClass); + var queue = []; + var replace = false; + var updater = { + isMounted: function (publicInstance) { + return false; + }, + enqueueForceUpdate: function (publicInstance) { + if (queue === null) { + warnNoop(publicInstance, 'forceUpdate'); + return null; + } + }, + enqueueReplaceState: function (publicInstance, completeState) { + replace = true; + queue = [completeState]; + }, + enqueueSetState: function (publicInstance, currentPartialState) { + if (queue === null) { + warnNoop(publicInstance, 'setState'); + return null; + } + + queue.push(currentPartialState); + }, + }; + var inst; + + if (isClass) { + inst = new Component(element.props, publicContext, updater); + + if (typeof Component.getDerivedStateFromProps === 'function') { + { + if (inst.state === null || inst.state === undefined) { + var componentName = getComponentName(Component) || 'Unknown'; + + if (!didWarnAboutUninitializedState[componentName]) { + warningWithoutStack$1( + false, + '`%s` uses `getDerivedStateFromProps` but its initial state is ' + + '%s. This is not recommended. Instead, define the initial state by ' + + 'assigning an object to `this.state` in the constructor of `%s`. ' + + 'This ensures that `getDerivedStateFromProps` arguments have a consistent shape.', + componentName, + inst.state === null ? 'null' : 'undefined', + componentName, + ); + didWarnAboutUninitializedState[componentName] = true; + } + } + } + + var partialState = Component.getDerivedStateFromProps.call(null, element.props, inst.state); + + { + if (partialState === undefined) { + var _componentName = getComponentName(Component) || 'Unknown'; + + if (!didWarnAboutUndefinedDerivedState[_componentName]) { + warningWithoutStack$1( + false, + '%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. ' + + 'You have returned undefined.', + _componentName, + ); + didWarnAboutUndefinedDerivedState[_componentName] = true; + } + } + } + + if (partialState != null) { + inst.state = _assign({}, inst.state, partialState); + } + } + } else { + { + if (Component.prototype && typeof Component.prototype.render === 'function') { + var _componentName2 = getComponentName(Component) || 'Unknown'; + + if (!didWarnAboutBadClass[_componentName2]) { + warningWithoutStack$1( + false, + "The <%s /> component appears to have a render method, but doesn't extend React.Component. " + + 'This is likely to cause errors. Change %s to extend React.Component instead.', + _componentName2, + _componentName2, + ); + didWarnAboutBadClass[_componentName2] = true; + } + } + } + + var componentIdentity = {}; + prepareToUseHooks(componentIdentity); + inst = Component(element.props, publicContext, updater); + inst = finishHooks(Component, element.props, inst, publicContext); + + if (inst == null || inst.render == null) { + child = inst; + validateRenderResult(child, Component); + return; + } + + { + var _componentName3 = getComponentName(Component) || 'Unknown'; + + if (!didWarnAboutModulePatternComponent[_componentName3]) { + warningWithoutStack$1( + false, + 'The <%s /> component appears to be a function component that returns a class instance. ' + + 'Change %s to a class that extends React.Component instead. ' + + "If you can't use a class try assigning the prototype on the function as a workaround. " + + "`%s.prototype = React.Component.prototype`. Don't use an arrow function since it " + + 'cannot be called with `new` by React.', + _componentName3, + _componentName3, + _componentName3, + ); + didWarnAboutModulePatternComponent[_componentName3] = true; + } + } + } + + inst.props = element.props; + inst.context = publicContext; + inst.updater = updater; + var initialState = inst.state; + + if (initialState === undefined) { + inst.state = initialState = null; + } + + if ( + typeof inst.UNSAFE_componentWillMount === 'function' || + typeof inst.componentWillMount === 'function' + ) { + if (typeof inst.componentWillMount === 'function') { + { + if ( + warnAboutDeprecatedLifecycles && + inst.componentWillMount.__suppressDeprecationWarning !== true + ) { + var _componentName4 = getComponentName(Component) || 'Unknown'; + + if (!didWarnAboutDeprecatedWillMount[_componentName4]) { + lowPriorityWarningWithoutStack$1( + false, // keep this warning in sync with ReactStrictModeWarning.js + 'componentWillMount has been renamed, and is not recommended for use. ' + + 'See https://fb.me/react-unsafe-component-lifecycles for details.\n\n' + + '* Move code from componentWillMount to componentDidMount (preferred in most cases) ' + + 'or the constructor.\n' + + '\nPlease update the following components: %s', + _componentName4, + ); + didWarnAboutDeprecatedWillMount[_componentName4] = true; + } + } + } // In order to support react-lifecycles-compat polyfilled components, + // Unsafe lifecycles should not be invoked for any component with the new gDSFP. + + if (typeof Component.getDerivedStateFromProps !== 'function') { + inst.componentWillMount(); + } + } + + if ( + typeof inst.UNSAFE_componentWillMount === 'function' && + typeof Component.getDerivedStateFromProps !== 'function' + ) { + // In order to support react-lifecycles-compat polyfilled components, + // Unsafe lifecycles should not be invoked for any component with the new gDSFP. + inst.UNSAFE_componentWillMount(); + } + + if (queue.length) { + var oldQueue = queue; + var oldReplace = replace; + queue = null; + replace = false; + + if (oldReplace && oldQueue.length === 1) { + inst.state = oldQueue[0]; + } else { + var nextState = oldReplace ? oldQueue[0] : inst.state; + var dontMutate = true; + + for (var i = oldReplace ? 1 : 0; i < oldQueue.length; i++) { + var partial = oldQueue[i]; + + var _partialState = + typeof partial === 'function' + ? partial.call(inst, nextState, element.props, publicContext) + : partial; + + if (_partialState != null) { + if (dontMutate) { + dontMutate = false; + nextState = _assign({}, nextState, _partialState); + } else { + _assign(nextState, _partialState); + } + } + } + + inst.state = nextState; + } + } else { + queue = null; + } + } + + child = inst.render(); + + { + if (child === undefined && inst.render._isMockFunction) { + // This is probably bad practice. Consider warning here and + // deprecating this convenience. + child = null; + } + } + + validateRenderResult(child, Component); + var childContext; + + if (disableLegacyContext) { + { + var childContextTypes = Component.childContextTypes; + + if (childContextTypes !== undefined) { + warningWithoutStack$1( + false, + '%s uses the legacy childContextTypes API which is no longer supported. ' + + 'Use React.createContext() instead.', + getComponentName(Component) || 'Unknown', + ); + } + } + } else { + if (typeof inst.getChildContext === 'function') { + var _childContextTypes = Component.childContextTypes; + + if (typeof _childContextTypes === 'object') { + childContext = inst.getChildContext(); + + for (var contextKey in childContext) { + if (!(contextKey in _childContextTypes)) { + { + throw Error( + (getComponentName(Component) || 'Unknown') + + '.getChildContext(): key "' + + contextKey + + '" is not defined in childContextTypes.', + ); + } + } + } + } else { + warningWithoutStack$1( + false, + '%s.getChildContext(): childContextTypes must be defined in order to ' + + 'use getChildContext().', + getComponentName(Component) || 'Unknown', + ); + } + } + + if (childContext) { + context = _assign({}, context, childContext); + } + } + } + + return { + child: child, + context: context, + }; + } + + var ReactDOMServerRenderer = + /*#__PURE__*/ + (function () { + // TODO: type this more strictly: + // DEV-only + function ReactDOMServerRenderer(children, makeStaticMarkup) { + var flatChildren = flattenTopLevelChildren(children); + var topFrame = { + type: null, + // Assume all trees start in the HTML namespace (not totally true, but + // this is what we did historically) + domNamespace: Namespaces.html, + children: flatChildren, + childIndex: 0, + context: emptyObject, + footer: '', + }; + + { + topFrame.debugElementStack = []; + } + + this.threadID = allocThreadID(); + this.stack = [topFrame]; + this.exhausted = false; + this.currentSelectValue = null; + this.previousWasTextNode = false; + this.makeStaticMarkup = makeStaticMarkup; + this.suspenseDepth = 0; // Context (new API) + + this.contextIndex = -1; + this.contextStack = []; + this.contextValueStack = []; + + { + this.contextProviderStack = []; + } + } + + var _proto = ReactDOMServerRenderer.prototype; + + _proto.destroy = function destroy() { + if (!this.exhausted) { + this.exhausted = true; + this.clearProviders(); + freeThreadID(this.threadID); + } + }; + /** + * Note: We use just two stacks regardless of how many context providers you have. + * Providers are always popped in the reverse order to how they were pushed + * so we always know on the way down which provider you'll encounter next on the way up. + * On the way down, we push the current provider, and its context value *before* + * we mutated it, onto the stacks. Therefore, on the way up, we always know which + * provider needs to be "restored" to which value. + * https://github.com/facebook/react/pull/12985#issuecomment-396301248 + */ + + _proto.pushProvider = function pushProvider(provider) { + var index = ++this.contextIndex; + var context = provider.type._context; + var threadID = this.threadID; + validateContextBounds(context, threadID); + var previousValue = context[threadID]; // Remember which value to restore this context to on our way up. + + this.contextStack[index] = context; + this.contextValueStack[index] = previousValue; + + { + // Only used for push/pop mismatch warnings. + this.contextProviderStack[index] = provider; + } // Mutate the current value. + + context[threadID] = provider.props.value; + }; + + _proto.popProvider = function popProvider(provider) { + var index = this.contextIndex; + + { + !(index > -1 && provider === this.contextProviderStack[index]) + ? warningWithoutStack$1(false, 'Unexpected pop.') + : void 0; + } + + var context = this.contextStack[index]; + var previousValue = this.contextValueStack[index]; // "Hide" these null assignments from Flow by using `any` + // because conceptually they are deletions--as long as we + // promise to never access values beyond `this.contextIndex`. + + this.contextStack[index] = null; + this.contextValueStack[index] = null; + + { + this.contextProviderStack[index] = null; + } + + this.contextIndex--; // Restore to the previous value we stored as we were walking down. + // We've already verified that this context has been expanded to accommodate + // this thread id, so we don't need to do it again. + + context[this.threadID] = previousValue; + }; + + _proto.clearProviders = function clearProviders() { + // Restore any remaining providers on the stack to previous values + for (var index = this.contextIndex; index >= 0; index--) { + var context = this.contextStack[index]; + var previousValue = this.contextValueStack[index]; + context[this.threadID] = previousValue; + } + }; + + _proto.read = function read(bytes) { + if (this.exhausted) { + return null; + } + + var prevThreadID = currentThreadID; + setCurrentThreadID(this.threadID); + var prevDispatcher = ReactCurrentDispatcher.current; + ReactCurrentDispatcher.current = Dispatcher; + + try { + // Markup generated within <Suspense> ends up buffered until we know + // nothing in that boundary suspended + var out = ['']; + var suspended = false; + + while (out[0].length < bytes) { + if (this.stack.length === 0) { + this.exhausted = true; + freeThreadID(this.threadID); + break; + } + + var frame = this.stack[this.stack.length - 1]; + + if (suspended || frame.childIndex >= frame.children.length) { + var footer = frame.footer; + + if (footer !== '') { + this.previousWasTextNode = false; + } + + this.stack.pop(); + + if (frame.type === 'select') { + this.currentSelectValue = null; + } else if ( + frame.type != null && + frame.type.type != null && + frame.type.type.$$typeof === REACT_PROVIDER_TYPE + ) { + var provider = frame.type; + this.popProvider(provider); + } else if (frame.type === REACT_SUSPENSE_TYPE) { + this.suspenseDepth--; + var buffered = out.pop(); + + if (suspended) { + suspended = false; // If rendering was suspended at this boundary, render the fallbackFrame + + var fallbackFrame = frame.fallbackFrame; + + if (!fallbackFrame) { + { + throw Error( + 'ReactDOMServer did not find an internal fallback frame for Suspense. This is a bug in React. Please file an issue.', + ); + } + } + + this.stack.push(fallbackFrame); + out[this.suspenseDepth] += '<!--$!-->'; // Skip flushing output since we're switching to the fallback + + continue; + } else { + out[this.suspenseDepth] += buffered; + } + } // Flush output + + out[this.suspenseDepth] += footer; + continue; + } + + var child = frame.children[frame.childIndex++]; + var outBuffer = ''; + + { + pushCurrentDebugStack(this.stack); // We're starting work on this frame, so reset its inner stack. + + frame.debugElementStack.length = 0; + } + + try { + outBuffer += this.render(child, frame.context, frame.domNamespace); + } catch (err) { + if (err != null && typeof err.then === 'function') { + if (enableSuspenseServerRenderer) { + if (!(this.suspenseDepth > 0)) { + { + throw Error( + 'A React component suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.', + ); + } + } + + suspended = true; + } else { + { + { + throw Error('ReactDOMServer does not yet support Suspense.'); + } + } + } + } else { + throw err; + } + } finally { + { + popCurrentDebugStack(); + } + } + + if (out.length <= this.suspenseDepth) { + out.push(''); + } + + out[this.suspenseDepth] += outBuffer; + } + + return out[0]; + } finally { + ReactCurrentDispatcher.current = prevDispatcher; + setCurrentThreadID(prevThreadID); + } + }; + + _proto.render = function render(child, context, parentNamespace) { + if (typeof child === 'string' || typeof child === 'number') { + var text = '' + child; + + if (text === '') { + return ''; + } + + if (this.makeStaticMarkup) { + return escapeTextForBrowser(text); + } + + if (this.previousWasTextNode) { + return '<!-- -->' + escapeTextForBrowser(text); + } + + this.previousWasTextNode = true; + return escapeTextForBrowser(text); + } else { + var nextChild; + + var _resolve = resolve(child, context, this.threadID); + + nextChild = _resolve.child; + context = _resolve.context; + + if (nextChild === null || nextChild === false) { + return ''; + } else if (!React.isValidElement(nextChild)) { + if (nextChild != null && nextChild.$$typeof != null) { + // Catch unexpected special types early. + var $$typeof = nextChild.$$typeof; + + if (!($$typeof !== REACT_PORTAL_TYPE)) { + { + throw Error( + 'Portals are not currently supported by the server renderer. Render them conditionally so that they only appear on the client render.', + ); + } + } // Catch-all to prevent an infinite loop if React.Children.toArray() supports some new type. + + { + { + throw Error( + 'Unknown element-like object type: ' + + $$typeof.toString() + + '. This is likely a bug in React. Please file an issue.', + ); + } + } + } + + var nextChildren = toArray(nextChild); + var frame = { + type: null, + domNamespace: parentNamespace, + children: nextChildren, + childIndex: 0, + context: context, + footer: '', + }; + + { + frame.debugElementStack = []; + } + + this.stack.push(frame); + return ''; + } // Safe because we just checked it's an element. + + var nextElement = nextChild; + var elementType = nextElement.type; + + if (typeof elementType === 'string') { + return this.renderDOM(nextElement, context, parentNamespace); + } + + switch (elementType) { + case REACT_STRICT_MODE_TYPE: + case REACT_CONCURRENT_MODE_TYPE: + case REACT_PROFILER_TYPE: + case REACT_SUSPENSE_LIST_TYPE: + case REACT_FRAGMENT_TYPE: { + var _nextChildren = toArray(nextChild.props.children); + + var _frame = { + type: null, + domNamespace: parentNamespace, + children: _nextChildren, + childIndex: 0, + context: context, + footer: '', + }; + + { + _frame.debugElementStack = []; + } + + this.stack.push(_frame); + return ''; + } + + case REACT_SUSPENSE_TYPE: { + if (enableSuspenseServerRenderer) { + var fallback = nextChild.props.fallback; + + if (fallback === undefined) { + // If there is no fallback, then this just behaves as a fragment. + var _nextChildren3 = toArray(nextChild.props.children); + + var _frame3 = { + type: null, + domNamespace: parentNamespace, + children: _nextChildren3, + childIndex: 0, + context: context, + footer: '', + }; + + { + _frame3.debugElementStack = []; + } + + this.stack.push(_frame3); + return ''; + } + + var fallbackChildren = toArray(fallback); + + var _nextChildren2 = toArray(nextChild.props.children); + + var fallbackFrame = { + type: null, + domNamespace: parentNamespace, + children: fallbackChildren, + childIndex: 0, + context: context, + footer: '<!--/$-->', + }; + var _frame2 = { + fallbackFrame: fallbackFrame, + type: REACT_SUSPENSE_TYPE, + domNamespace: parentNamespace, + children: _nextChildren2, + childIndex: 0, + context: context, + footer: '<!--/$-->', + }; + + { + _frame2.debugElementStack = []; + fallbackFrame.debugElementStack = []; + } + + this.stack.push(_frame2); + this.suspenseDepth++; + return '<!--$-->'; + } else { + { + { + throw Error('ReactDOMServer does not yet support Suspense.'); + } + } + } + } + // eslint-disable-next-line-no-fallthrough + + default: + break; + } + + if (typeof elementType === 'object' && elementType !== null) { + switch (elementType.$$typeof) { + case REACT_FORWARD_REF_TYPE: { + var element = nextChild; + + var _nextChildren4; + + var componentIdentity = {}; + prepareToUseHooks(componentIdentity); + _nextChildren4 = elementType.render(element.props, element.ref); + _nextChildren4 = finishHooks( + elementType.render, + element.props, + _nextChildren4, + element.ref, + ); + _nextChildren4 = toArray(_nextChildren4); + var _frame4 = { + type: null, + domNamespace: parentNamespace, + children: _nextChildren4, + childIndex: 0, + context: context, + footer: '', + }; + + { + _frame4.debugElementStack = []; + } + + this.stack.push(_frame4); + return ''; + } + + case REACT_MEMO_TYPE: { + var _element = nextChild; + var _nextChildren5 = [ + React.createElement( + elementType.type, + _assign( + { + ref: _element.ref, + }, + _element.props, + ), + ), + ]; + var _frame5 = { + type: null, + domNamespace: parentNamespace, + children: _nextChildren5, + childIndex: 0, + context: context, + footer: '', + }; + + { + _frame5.debugElementStack = []; + } + + this.stack.push(_frame5); + return ''; + } + + case REACT_PROVIDER_TYPE: { + var provider = nextChild; + var nextProps = provider.props; + + var _nextChildren6 = toArray(nextProps.children); + + var _frame6 = { + type: provider, + domNamespace: parentNamespace, + children: _nextChildren6, + childIndex: 0, + context: context, + footer: '', + }; + + { + _frame6.debugElementStack = []; + } + + this.pushProvider(provider); + this.stack.push(_frame6); + return ''; + } + + case REACT_CONTEXT_TYPE: { + var reactContext = nextChild.type; // The logic below for Context differs depending on PROD or DEV mode. In + // DEV mode, we create a separate object for Context.Consumer that acts + // like a proxy to Context. This proxy object adds unnecessary code in PROD + // so we use the old behaviour (Context.Consumer references Context) to + // reduce size and overhead. The separate object references context via + // a property called "_context", which also gives us the ability to check + // in DEV mode if this property exists or not and warn if it does not. + + { + if (reactContext._context === undefined) { + // This may be because it's a Context (rather than a Consumer). + // Or it may be because it's older React where they're the same thing. + // We only want to warn if we're sure it's a new React. + if (reactContext !== reactContext.Consumer) { + if (!hasWarnedAboutUsingContextAsConsumer) { + hasWarnedAboutUsingContextAsConsumer = true; + warning$1( + false, + 'Rendering <Context> directly is not supported and will be removed in ' + + 'a future major release. Did you mean to render <Context.Consumer> instead?', + ); + } + } + } else { + reactContext = reactContext._context; + } + } + + var _nextProps = nextChild.props; + var threadID = this.threadID; + validateContextBounds(reactContext, threadID); + var nextValue = reactContext[threadID]; + + var _nextChildren7 = toArray(_nextProps.children(nextValue)); + + var _frame7 = { + type: nextChild, + domNamespace: parentNamespace, + children: _nextChildren7, + childIndex: 0, + context: context, + footer: '', + }; + + { + _frame7.debugElementStack = []; + } + + this.stack.push(_frame7); + return ''; + } + // eslint-disable-next-line-no-fallthrough + + case REACT_FUNDAMENTAL_TYPE: { + if (enableFundamentalAPI) { + var fundamentalImpl = elementType.impl; + var open = fundamentalImpl.getServerSideString(null, nextElement.props); + var getServerSideStringClose = fundamentalImpl.getServerSideStringClose; + var close = + getServerSideStringClose !== undefined + ? getServerSideStringClose(null, nextElement.props) + : ''; + + var _nextChildren8 = + fundamentalImpl.reconcileChildren !== false + ? toArray(nextChild.props.children) + : []; + + var _frame8 = { + type: null, + domNamespace: parentNamespace, + children: _nextChildren8, + childIndex: 0, + context: context, + footer: close, + }; + + { + _frame8.debugElementStack = []; + } + + this.stack.push(_frame8); + return open; + } + + { + { + throw Error('ReactDOMServer does not yet support the fundamental API.'); + } + } + } + // eslint-disable-next-line-no-fallthrough + + case REACT_LAZY_TYPE: { + var _element2 = nextChild; + var lazyComponent = nextChild.type; // Attempt to initialize lazy component regardless of whether the + // suspense server-side renderer is enabled so synchronously + // resolved constructors are supported. + + initializeLazyComponentType(lazyComponent); + + switch (lazyComponent._status) { + case Resolved: { + var _nextChildren9 = [ + React.createElement( + lazyComponent._result, + _assign( + { + ref: _element2.ref, + }, + _element2.props, + ), + ), + ]; + var _frame9 = { + type: null, + domNamespace: parentNamespace, + children: _nextChildren9, + childIndex: 0, + context: context, + footer: '', + }; + + { + _frame9.debugElementStack = []; + } + + this.stack.push(_frame9); + return ''; + } + + case Rejected: + throw lazyComponent._result; + + case Pending: + default: { + { + throw Error('ReactDOMServer does not yet support lazy-loaded components.'); + } + } + } + } + // eslint-disable-next-line-no-fallthrough + + case REACT_SCOPE_TYPE: { + if (enableScopeAPI) { + var _nextChildren10 = toArray(nextChild.props.children); + + var _frame10 = { + type: null, + domNamespace: parentNamespace, + children: _nextChildren10, + childIndex: 0, + context: context, + footer: '', + }; + + { + _frame10.debugElementStack = []; + } + + this.stack.push(_frame10); + return ''; + } + + { + { + throw Error('ReactDOMServer does not yet support scope components.'); + } + } + } + } + } + + var info = ''; + + { + var owner = nextElement._owner; + + if ( + elementType === undefined || + (typeof elementType === 'object' && + elementType !== null && + Object.keys(elementType).length === 0) + ) { + info += + ' You likely forgot to export your component from the file ' + + "it's defined in, or you might have mixed up default and " + + 'named imports.'; + } + + var ownerName = owner ? getComponentName(owner) : null; + + if (ownerName) { + info += '\n\nCheck the render method of `' + ownerName + '`.'; + } + } + + { + { + throw Error( + 'Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: ' + + (elementType == null ? elementType : typeof elementType) + + '.' + + info, + ); + } + } + } + }; + + _proto.renderDOM = function renderDOM(element, context, parentNamespace) { + var tag = element.type.toLowerCase(); + var namespace = parentNamespace; + + if (parentNamespace === Namespaces.html) { + namespace = getIntrinsicNamespace(tag); + } + + { + if (namespace === Namespaces.html) { + // Should this check be gated by parent namespace? Not sure we want to + // allow <SVG> or <mATH>. + !(tag === element.type) + ? warning$1( + false, + '<%s /> is using incorrect casing. ' + + 'Use PascalCase for React components, ' + + 'or lowercase for HTML elements.', + element.type, + ) + : void 0; + } + } + + validateDangerousTag(tag); + var props = element.props; + + if (tag === 'input') { + { + ReactControlledValuePropTypes.checkPropTypes('input', props); + + if ( + props.checked !== undefined && + props.defaultChecked !== undefined && + !didWarnDefaultChecked + ) { + warning$1( + false, + '%s contains an input of type %s with both checked and defaultChecked props. ' + + 'Input elements must be either controlled or uncontrolled ' + + '(specify either the checked prop, or the defaultChecked prop, but not ' + + 'both). Decide between using a controlled or uncontrolled input ' + + 'element and remove one of these props. More info: ' + + 'https://fb.me/react-controlled-components', + 'A component', + props.type, + ); + didWarnDefaultChecked = true; + } + + if ( + props.value !== undefined && + props.defaultValue !== undefined && + !didWarnDefaultInputValue + ) { + warning$1( + false, + '%s contains an input of type %s with both value and defaultValue props. ' + + 'Input elements must be either controlled or uncontrolled ' + + '(specify either the value prop, or the defaultValue prop, but not ' + + 'both). Decide between using a controlled or uncontrolled input ' + + 'element and remove one of these props. More info: ' + + 'https://fb.me/react-controlled-components', + 'A component', + props.type, + ); + didWarnDefaultInputValue = true; + } + } + + props = _assign( + { + type: undefined, + }, + props, + { + defaultChecked: undefined, + defaultValue: undefined, + value: props.value != null ? props.value : props.defaultValue, + checked: props.checked != null ? props.checked : props.defaultChecked, + }, + ); + } else if (tag === 'textarea') { + { + ReactControlledValuePropTypes.checkPropTypes('textarea', props); + + if ( + props.value !== undefined && + props.defaultValue !== undefined && + !didWarnDefaultTextareaValue + ) { + warning$1( + false, + 'Textarea elements must be either controlled or uncontrolled ' + + '(specify either the value prop, or the defaultValue prop, but not ' + + 'both). Decide between using a controlled or uncontrolled textarea ' + + 'and remove one of these props. More info: ' + + 'https://fb.me/react-controlled-components', + ); + didWarnDefaultTextareaValue = true; + } + } + + var initialValue = props.value; + + if (initialValue == null) { + var defaultValue = props.defaultValue; // TODO (yungsters): Remove support for children content in <textarea>. + + var textareaChildren = props.children; + + if (textareaChildren != null) { + { + warning$1( + false, + 'Use the `defaultValue` or `value` props instead of setting ' + + 'children on <textarea>.', + ); + } + + if (!(defaultValue == null)) { + { + throw Error('If you supply `defaultValue` on a <textarea>, do not pass children.'); + } + } + + if (Array.isArray(textareaChildren)) { + if (!(textareaChildren.length <= 1)) { + { + throw Error('<textarea> can only have at most one child.'); + } + } + + textareaChildren = textareaChildren[0]; + } + + defaultValue = '' + textareaChildren; + } + + if (defaultValue == null) { + defaultValue = ''; + } + + initialValue = defaultValue; + } + + props = _assign({}, props, { + value: undefined, + children: '' + initialValue, + }); + } else if (tag === 'select') { + { + ReactControlledValuePropTypes.checkPropTypes('select', props); + + for (var i = 0; i < valuePropNames.length; i++) { + var propName = valuePropNames[i]; + + if (props[propName] == null) { + continue; + } + + var isArray = Array.isArray(props[propName]); + + if (props.multiple && !isArray) { + warning$1( + false, + 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.', + propName, + ); + } else if (!props.multiple && isArray) { + warning$1( + false, + 'The `%s` prop supplied to <select> must be a scalar ' + + 'value if `multiple` is false.', + propName, + ); + } + } + + if ( + props.value !== undefined && + props.defaultValue !== undefined && + !didWarnDefaultSelectValue + ) { + warning$1( + false, + 'Select elements must be either controlled or uncontrolled ' + + '(specify either the value prop, or the defaultValue prop, but not ' + + 'both). Decide between using a controlled or uncontrolled select ' + + 'element and remove one of these props. More info: ' + + 'https://fb.me/react-controlled-components', + ); + didWarnDefaultSelectValue = true; + } + } + + this.currentSelectValue = props.value != null ? props.value : props.defaultValue; + props = _assign({}, props, { + value: undefined, + }); + } else if (tag === 'option') { + var selected = null; + var selectValue = this.currentSelectValue; + var optionChildren = flattenOptionChildren(props.children); + + if (selectValue != null) { + var value; + + if (props.value != null) { + value = props.value + ''; + } else { + value = optionChildren; + } + + selected = false; + + if (Array.isArray(selectValue)) { + // multiple + for (var j = 0; j < selectValue.length; j++) { + if ('' + selectValue[j] === value) { + selected = true; + break; + } + } + } else { + selected = '' + selectValue === value; + } + + props = _assign( + { + selected: undefined, + children: undefined, + }, + props, + { + selected: selected, + children: optionChildren, + }, + ); + } + } + + { + validatePropertiesInDevelopment(tag, props); + } + + assertValidProps(tag, props); + var out = createOpenTagMarkup( + element.type, + tag, + props, + namespace, + this.makeStaticMarkup, + this.stack.length === 1, + ); + var footer = ''; + + if (omittedCloseTags.hasOwnProperty(tag)) { + out += '/>'; + } else { + out += '>'; + footer = '</' + element.type + '>'; + } + + var children; + var innerMarkup = getNonChildrenInnerMarkup(props); + + if (innerMarkup != null) { + children = []; + + if (newlineEatingTags[tag] && innerMarkup.charAt(0) === '\n') { + // text/html ignores the first character in these tags if it's a newline + // Prefer to break application/xml over text/html (for now) by adding + // a newline specifically to get eaten by the parser. (Alternately for + // textareas, replacing "^\n" with "\r\n" doesn't get eaten, and the first + // \r is normalized out by HTMLTextAreaElement#value.) + // See: <http://www.w3.org/TR/html-polyglot/#newlines-in-textarea-and-pre> + // See: <http://www.w3.org/TR/html5/syntax.html#element-restrictions> + // See: <http://www.w3.org/TR/html5/syntax.html#newlines> + // See: Parsing of "textarea" "listing" and "pre" elements + // from <http://www.w3.org/TR/html5/syntax.html#parsing-main-inbody> + out += '\n'; + } + + out += innerMarkup; + } else { + children = toArray(props.children); + } + + var frame = { + domNamespace: getChildNamespace(parentNamespace, element.type), + type: tag, + children: children, + childIndex: 0, + context: context, + footer: footer, + }; + + { + frame.debugElementStack = []; + } + + this.stack.push(frame); + this.previousWasTextNode = false; + return out; + }; + + return ReactDOMServerRenderer; + })(); + + /** + * Render a ReactElement to its initial HTML. This should only be used on the + * server. + * See https://reactjs.org/docs/react-dom-server.html#rendertostring + */ + + function renderToString(element) { + var renderer = new ReactDOMServerRenderer(element, false); + + try { + var markup = renderer.read(Infinity); + return markup; + } finally { + renderer.destroy(); + } + } + /** + * Similar to renderToString, except this doesn't create extra DOM attributes + * such as data-react-id that React uses internally. + * See https://reactjs.org/docs/react-dom-server.html#rendertostaticmarkup + */ + + function renderToStaticMarkup(element) { + var renderer = new ReactDOMServerRenderer(element, true); + + try { + var markup = renderer.read(Infinity); + return markup; + } finally { + renderer.destroy(); + } + } + + function renderToNodeStream() { + { + { + throw Error( + 'ReactDOMServer.renderToNodeStream(): The streaming API is not available in the browser. Use ReactDOMServer.renderToString() instead.', + ); + } + } + } + + function renderToStaticNodeStream() { + { + { + throw Error( + 'ReactDOMServer.renderToStaticNodeStream(): The streaming API is not available in the browser. Use ReactDOMServer.renderToStaticMarkup() instead.', + ); + } + } + } // Note: when changing this, also consider https://github.com/facebook/react/issues/11526 + + var ReactDOMServerBrowser = { + renderToString: renderToString, + renderToStaticMarkup: renderToStaticMarkup, + renderToNodeStream: renderToNodeStream, + renderToStaticNodeStream: renderToStaticNodeStream, + version: ReactVersion, + }; + + var ReactDOMServerBrowser$1 = Object.freeze({ + default: ReactDOMServerBrowser, + }); + + var ReactDOMServer = (ReactDOMServerBrowser$1 && ReactDOMServerBrowser) || ReactDOMServerBrowser$1; + + // TODO: decide on the top-level export form. + // This is hacky but makes it work with both Rollup and Jest + + var server_browser = ReactDOMServer.default || ReactDOMServer; + + module.exports = server_browser; + })(); + } + + /***/ + }, + /* 519 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(144); + __webpack_require__(520); + module.exports = __webpack_require__(13).Array.from; + + /***/ + }, + /* 520 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var ctx = __webpack_require__(69); + var $export = __webpack_require__(36); + var toObject = __webpack_require__(70); + var call = __webpack_require__(222); + var isArrayIter = __webpack_require__(223); + var toLength = __webpack_require__(103); + var createProperty = __webpack_require__(521); + var getIterFn = __webpack_require__(224); + + $export( + $export.S + + $export.F * + !__webpack_require__(522)(function (iter) { + Array.from(iter); + }), + 'Array', + { + // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined) + from: function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) { + var O = toObject(arrayLike); + var C = typeof this == 'function' ? this : Array; + var aLen = arguments.length; + var mapfn = aLen > 1 ? arguments[1] : undefined; + var mapping = mapfn !== undefined; + var index = 0; + var iterFn = getIterFn(O); + var length, result, step, iterator; + if (mapping) mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2); + // if object isn't iterable or it's array with default iterator - use simple case + if (iterFn != undefined && !(C == Array && isArrayIter(iterFn))) { + for (iterator = iterFn.call(O), result = new C(); !(step = iterator.next()).done; index++) { + createProperty( + result, + index, + mapping ? call(iterator, mapfn, [step.value, index], true) : step.value, + ); + } + } else { + length = toLength(O.length); + for (result = new C(length); length > index; index++) { + createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]); + } + } + result.length = index; + return result; + }, + }, + ); + + /***/ + }, + /* 521 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $defineProperty = __webpack_require__(30); + var createDesc = __webpack_require__(79); + + module.exports = function (object, index, value) { + if (index in object) $defineProperty.f(object, index, createDesc(0, value)); + else object[index] = value; + }; + + /***/ + }, + /* 522 */ + /***/ function (module, exports, __webpack_require__) { + var ITERATOR = __webpack_require__(22)('iterator'); + var SAFE_CLOSING = false; + + try { + var riter = [7][ITERATOR](); + riter['return'] = function () { + SAFE_CLOSING = true; + }; + // eslint-disable-next-line no-throw-literal + Array.from(riter, function () { + throw 2; + }); + } catch (e) { + /* empty */ + } + + module.exports = function (exec, skipClosing) { + if (!skipClosing && !SAFE_CLOSING) return false; + var safe = false; + try { + var arr = [7]; + var iter = arr[ITERATOR](); + iter.next = function () { + return { done: (safe = true) }; + }; + arr[ITERATOR] = function () { + return iter; + }; + exec(arr); + } catch (e) { + /* empty */ + } + return safe; + }; + + /***/ + }, + /* 523 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(156); + __webpack_require__(144); + __webpack_require__(152); + __webpack_require__(524); + __webpack_require__(527); + __webpack_require__(530); + __webpack_require__(531); + module.exports = __webpack_require__(13).Map; + + /***/ + }, + /* 524 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var strong = __webpack_require__(525); + var validate = __webpack_require__(84); + var MAP = 'Map'; + + // 23.1 Map Objects + module.exports = __webpack_require__(226)( + MAP, + function (get) { + return function Map() { + return get(this, arguments.length > 0 ? arguments[0] : undefined); + }; + }, + { + // 23.1.3.6 Map.prototype.get(key) + get: function get(key) { + var entry = strong.getEntry(validate(this, MAP), key); + return entry && entry.v; + }, + // 23.1.3.9 Map.prototype.set(key, value) + set: function set(key, value) { + return strong.def(validate(this, MAP), key === 0 ? 0 : key, value); + }, + }, + strong, + true, + ); + + /***/ + }, + /* 525 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var dP = __webpack_require__(30).f; + var create = __webpack_require__(148); + var redefineAll = __webpack_require__(158); + var ctx = __webpack_require__(69); + var anInstance = __webpack_require__(159); + var forOf = __webpack_require__(83); + var $iterDefine = __webpack_require__(146); + var step = __webpack_require__(218); + var setSpecies = __webpack_require__(526); + var DESCRIPTORS = __webpack_require__(28); + var fastKey = __webpack_require__(82).fastKey; + var validate = __webpack_require__(84); + var SIZE = DESCRIPTORS ? '_s' : 'size'; + + var getEntry = function (that, key) { + // fast case + var index = fastKey(key); + var entry; + if (index !== 'F') return that._i[index]; + // frozen object case + for (entry = that._f; entry; entry = entry.n) { + if (entry.k == key) return entry; + } + }; + + module.exports = { + getConstructor: function (wrapper, NAME, IS_MAP, ADDER) { + var C = wrapper(function (that, iterable) { + anInstance(that, C, NAME, '_i'); + that._t = NAME; // collection type + that._i = create(null); // index + that._f = undefined; // first entry + that._l = undefined; // last entry + that[SIZE] = 0; // size + if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that); + }); + redefineAll(C.prototype, { + // 23.1.3.1 Map.prototype.clear() + // 23.2.3.2 Set.prototype.clear() + clear: function clear() { + for (var that = validate(this, NAME), data = that._i, entry = that._f; entry; entry = entry.n) { + entry.r = true; + if (entry.p) entry.p = entry.p.n = undefined; + delete data[entry.i]; + } + that._f = that._l = undefined; + that[SIZE] = 0; + }, + // 23.1.3.3 Map.prototype.delete(key) + // 23.2.3.4 Set.prototype.delete(value) + delete: function (key) { + var that = validate(this, NAME); + var entry = getEntry(that, key); + if (entry) { + var next = entry.n; + var prev = entry.p; + delete that._i[entry.i]; + entry.r = true; + if (prev) prev.n = next; + if (next) next.p = prev; + if (that._f == entry) that._f = next; + if (that._l == entry) that._l = prev; + that[SIZE]--; + } + return !!entry; + }, + // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined) + // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined) + forEach: function forEach(callbackfn /* , that = undefined */) { + validate(this, NAME); + var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3); + var entry; + while ((entry = entry ? entry.n : this._f)) { + f(entry.v, entry.k, this); + // revert to the last existing entry + while (entry && entry.r) entry = entry.p; + } + }, + // 23.1.3.7 Map.prototype.has(key) + // 23.2.3.7 Set.prototype.has(value) + has: function has(key) { + return !!getEntry(validate(this, NAME), key); + }, + }); + if (DESCRIPTORS) + dP(C.prototype, 'size', { + get: function () { + return validate(this, NAME)[SIZE]; + }, + }); + return C; + }, + def: function (that, key, value) { + var entry = getEntry(that, key); + var prev, index; + // change existing entry + if (entry) { + entry.v = value; + // create new entry + } else { + that._l = entry = { + i: (index = fastKey(key, true)), // <- index + k: key, // <- key + v: value, // <- value + p: (prev = that._l), // <- previous entry + n: undefined, // <- next entry + r: false, // <- removed + }; + if (!that._f) that._f = entry; + if (prev) prev.n = entry; + that[SIZE]++; + // add to index + if (index !== 'F') that._i[index] = entry; + } + return that; + }, + getEntry: getEntry, + setStrong: function (C, NAME, IS_MAP) { + // add .keys, .values, .entries, [@@iterator] + // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11 + $iterDefine( + C, + NAME, + function (iterated, kind) { + this._t = validate(iterated, NAME); // target + this._k = kind; // kind + this._l = undefined; // previous + }, + function () { + var that = this; + var kind = that._k; + var entry = that._l; + // revert to the last existing entry + while (entry && entry.r) entry = entry.p; + // get next entry + if (!that._t || !(that._l = entry = entry ? entry.n : that._t._f)) { + // or finish the iteration + that._t = undefined; + return step(1); + } + // return step by kind + if (kind == 'keys') return step(0, entry.k); + if (kind == 'values') return step(0, entry.v); + return step(0, [entry.k, entry.v]); + }, + IS_MAP ? 'entries' : 'values', + !IS_MAP, + true, + ); + + // add [@@species], 23.1.2.2, 23.2.2.2 + setSpecies(NAME); + }, + }; + + /***/ + }, + /* 526 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var global = __webpack_require__(29); + var core = __webpack_require__(13); + var dP = __webpack_require__(30); + var DESCRIPTORS = __webpack_require__(28); + var SPECIES = __webpack_require__(22)('species'); + + module.exports = function (KEY) { + var C = typeof core[KEY] == 'function' ? core[KEY] : global[KEY]; + if (DESCRIPTORS && C && !C[SPECIES]) + dP.f(C, SPECIES, { + configurable: true, + get: function () { + return this; + }, + }); + }; + + /***/ + }, + /* 527 */ + /***/ function (module, exports, __webpack_require__) { + // https://github.com/DavidBruant/Map-Set.prototype.toJSON + var $export = __webpack_require__(36); + + $export($export.P + $export.R, 'Map', { toJSON: __webpack_require__(528)('Map') }); + + /***/ + }, + /* 528 */ + /***/ function (module, exports, __webpack_require__) { + // https://github.com/DavidBruant/Map-Set.prototype.toJSON + var classof = __webpack_require__(225); + var from = __webpack_require__(529); + module.exports = function (NAME) { + return function toJSON() { + if (classof(this) != NAME) throw TypeError(NAME + "#toJSON isn't generic"); + return from(this); + }; + }; + + /***/ + }, + /* 529 */ + /***/ function (module, exports, __webpack_require__) { + var forOf = __webpack_require__(83); + + module.exports = function (iter, ITERATOR) { + var result = []; + forOf(iter, false, result.push, result, ITERATOR); + return result; + }; + + /***/ + }, + /* 530 */ + /***/ function (module, exports, __webpack_require__) { + // https://tc39.github.io/proposal-setmap-offrom/#sec-map.of + __webpack_require__(227)('Map'); + + /***/ + }, + /* 531 */ + /***/ function (module, exports, __webpack_require__) { + // https://tc39.github.io/proposal-setmap-offrom/#sec-map.from + __webpack_require__(228)('Map'); + + /***/ + }, + /* 532 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.default = generatorFunction; + + // See discussion: + // https://discuss.reactjs.org/t/how-to-determine-if-js-object-is-react-component/2825/2 + + /** + * Used to determine we'll call be calling React.createElement on the component of if this is a + * generator function used return a function that takes props to return a React element + * @param component + * @returns {boolean} + */ + function generatorFunction(component) { + if (!component.prototype) { + return false; + } // es5 or es6 React Component + + return !component.prototype.isReactComponent; + } + + /***/ + }, + /* 533 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var _interopRequireDefault = __webpack_require__(41); + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.default = void 0; + + var _from = _interopRequireDefault(__webpack_require__(235)); + + var _keys = _interopRequireDefault(__webpack_require__(160)); + + var _map = _interopRequireDefault(__webpack_require__(236)); + + // key = name used by react_on_rails to identify the store + // value = redux store creator, which is a function that takes props and returns a store + var registeredStoreGenerators = new _map.default(); + var hydratedStores = new _map.default(); + var _default = { + /** + * Register a store generator, a function that takes props and returns a store. + * @param storeGenerators { name1: storeGenerator1, name2: storeGenerator2 } + */ + register: function register(storeGenerators) { + (0, _keys.default)(storeGenerators).forEach(function (name) { + if (registeredStoreGenerators.has(name)) { + console.warn('Called registerStore for store that is already registered', name); + } + + var store = storeGenerators[name]; + + if (!store) { + throw new Error( + 'Called ReactOnRails.registerStores with a null or undefined as a value ' + + 'for the store generator with key '.concat(name, '.'), + ); + } + + registeredStoreGenerators.set(name, store); + }); + }, + + /** + * Used by components to get the hydrated store which contains props. + * @param name + * @param throwIfMissing Defaults to true. Set to false to have this call return undefined if + * there is no store with the given name. + * @returns Redux Store, possibly hydrated + */ + getStore: function getStore(name) { + var throwIfMissing = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + + if (hydratedStores.has(name)) { + return hydratedStores.get(name); + } + + var storeKeys = (0, _from.default)(hydratedStores.keys()).join(', '); + + if (storeKeys.length === 0) { + var msg = 'There are no stores hydrated and you are requesting the store '.concat( + name, + ".\nThis can happen if you are server rendering and either:\n1. You do not call redux_store near the top of your controller action's view (not the layout)\n and before any call to react_component.\n2. You do not render redux_store_hydration_data anywhere on your page.", + ); + throw new Error(msg); + } + + if (throwIfMissing) { + console.log('storeKeys', storeKeys); + throw new Error( + "Could not find hydrated store with name '".concat(name, "'. ") + + 'Hydrated store names include ['.concat(storeKeys, '].'), + ); + } + + return undefined; + }, + + /** + * Internally used function to get the store creator that was passed to `register`. + * @param name + * @returns storeCreator with given name + */ + getStoreGenerator: function getStoreGenerator(name) { + if (registeredStoreGenerators.has(name)) { + return registeredStoreGenerators.get(name); + } + + var storeKeys = (0, _from.default)(registeredStoreGenerators.keys()).join(', '); + throw new Error( + "Could not find store registered with name '".concat(name, "'. Registered store ") + + 'names include [ '.concat(storeKeys, ' ]. Maybe you forgot to register the store?'), + ); + }, + + /** + * Internally used function to set the hydrated store after a Rails page is loaded. + * @param name + * @param store (not the storeGenerator, but the hydrated store) + */ + setStore: function setStore(name, store) { + hydratedStores.set(name, store); + }, + + /** + * Internally used function to completely clear hydratedStores Map. + */ + clearHydratedStores: function clearHydratedStores() { + hydratedStores.clear(); + }, + + /** + * Get a Map containing all registered store generators. Useful for debugging. + * @returns Map where key is the component name and values are the store generators. + */ + storeGenerators: function storeGenerators() { + return registeredStoreGenerators; + }, + + /** + * Get a Map containing all hydrated stores. Useful for debugging. + * @returns Map where key is the component name and values are the hydrated stores. + */ + stores: function stores() { + return hydratedStores; + }, + }; + exports.default = _default; + + /***/ + }, + /* 534 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var _interopRequireDefault = __webpack_require__(41); + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.default = serverRenderReactComponent; + + var _stringify = _interopRequireDefault(__webpack_require__(106)); + + var _server = _interopRequireDefault(__webpack_require__(108)); + + var _ComponentRegistry = _interopRequireDefault(__webpack_require__(234)); + + var _createReactElement = _interopRequireDefault(__webpack_require__(161)); + + var _isCreateReactElementResultNonReactComponent = _interopRequireDefault(__webpack_require__(232)); + + var _buildConsoleReplay = _interopRequireDefault(__webpack_require__(237)); + + var _handleError = _interopRequireDefault(__webpack_require__(233)); + + function serverRenderReactComponent(options) { + var name = options.name, + domNodeId = options.domNodeId, + trace = options.trace, + props = options.props, + railsContext = options.railsContext; + var htmlResult = ''; + var hasErrors = false; + + try { + var componentObj = _ComponentRegistry.default.get(name); + + if (componentObj.isRenderer) { + throw new Error( + "Detected a renderer while server rendering component '".concat( + name, + "'. See https://github.com/shakacode/react_on_rails#renderer-functions", + ), + ); + } + + var reactElementOrRouterResult = (0, _createReactElement.default)({ + componentObj: componentObj, + domNodeId: domNodeId, + trace: trace, + props: props, + railsContext: railsContext, + }); + + if ((0, _isCreateReactElementResultNonReactComponent.default)(reactElementOrRouterResult)) { + // We let the client side handle any redirect + // Set hasErrors in case we want to throw a Rails exception + hasErrors = !!reactElementOrRouterResult.routeError; + + if (hasErrors) { + console.error( + 'React Router ERROR: '.concat((0, _stringify.default)(reactElementOrRouterResult.routeError)), + ); + } + + if (reactElementOrRouterResult.redirectLocation) { + if (trace) { + var redirectLocation = reactElementOrRouterResult.redirectLocation; + var redirectPath = redirectLocation.pathname + redirectLocation.search; + console.log( + 'ROUTER REDIRECT: ' + .concat(name, ' to dom node with id: ') + .concat(domNodeId, ', redirect to ') + .concat(redirectPath), + ); + } // For redirects on server rendering, we can't stop Rails from returning the same result. + // Possibly, someday, we could have the rails server redirect. + } else { + htmlResult = reactElementOrRouterResult.renderedHtml; + } + } else { + htmlResult = _server.default.renderToString(reactElementOrRouterResult); + } + } catch (e) { + hasErrors = true; + htmlResult = (0, _handleError.default)({ + e: e, + name: name, + serverSide: true, + }); + } + + var consoleReplayScript = (0, _buildConsoleReplay.default)(); + return (0, _stringify.default)({ + html: htmlResult, + consoleReplayScript: consoleReplayScript, + hasErrors: hasErrors, + }); + } + + /***/ + }, + /* 535 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.default = void 0; + var _default = { + wrapInScriptTags: function wrapInScriptTags(scriptId, scriptBody) { + if (!scriptBody) { + return ''; + } + + return '\n<script id="'.concat(scriptId, '">\n').concat(scriptBody, '\n</script>'); + }, + }; + exports.default = _default; + + /***/ + }, + /* 536 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.default = void 0; + + var _default = function _default(val) { + // Replace closing + var re = /<\/\W*script/gi; + return val.replace(re, '(/script'); + }; + + exports.default = _default; + + /***/ + }, + /* 537 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var _interopRequireDefault = __webpack_require__(41); + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.default = void 0; + + var _assign = _interopRequireDefault(__webpack_require__(229)); + + var _default = { + authenticityToken: function authenticityToken() { + var token = document.querySelector('meta[name="csrf-token"]'); + + if (token && token instanceof window.HTMLMetaElement) { + return token.content; + } + + return null; + }, + authenticityHeaders: function authenticityHeaders() { + var otherHeaders = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + return (0, _assign.default)(otherHeaders, { + 'X-CSRF-Token': this.authenticityToken(), + 'X-Requested-With': 'XMLHttpRequest', + }); + }, + }; + exports.default = _default; + + /***/ + }, + /* 538 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (global) { + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.default = context; + + /** + * Get the context, be it window or global + * @returns {boolean|Window|*|context} + */ + function context() { + return ( + (typeof window !== 'undefined' && window) || (typeof global !== 'undefined' && global) || this + ); + } + /* WEBPACK VAR INJECTION */ + }).call(exports, __webpack_require__(38)); + + /***/ + }, + /* 539 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + // Super simple example without using React. + // This shows you can server side render any JS code. + + var HelloString = { + world: function world() { + return 'Hello WORLD! Will this work?? YES! Time to visit Maui'; + }, + }; + + var _default = HelloString; + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + HelloString, + 'HelloString', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/non_react/HelloString.js', + ); + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/non_react/HelloString.js', + ); + })(); + + /***/ + }, + /* 540 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** @license React v16.12.0 + * react-is.development.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + + if (true) { + (function () { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { value: true }); + + // The Symbol used to tag the ReactElement-like types. If there is no native Symbol + // nor polyfill, then a plain number is used for performance. + var hasSymbol = typeof Symbol === 'function' && Symbol.for; + var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7; + var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca; + var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb; + var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc; + var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2; + var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd; + var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary + // (unstable) APIs that have been removed. Can we remove the symbols? + + var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf; + var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf; + var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0; + var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1; + var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8; + var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3; + var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4; + var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5; + var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6; + var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7; + + function isValidElementType(type) { + return ( + typeof type === 'string' || + typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill. + type === REACT_FRAGMENT_TYPE || + type === REACT_CONCURRENT_MODE_TYPE || + type === REACT_PROFILER_TYPE || + type === REACT_STRICT_MODE_TYPE || + type === REACT_SUSPENSE_TYPE || + type === REACT_SUSPENSE_LIST_TYPE || + (typeof type === 'object' && + type !== null && + (type.$$typeof === REACT_LAZY_TYPE || + type.$$typeof === REACT_MEMO_TYPE || + type.$$typeof === REACT_PROVIDER_TYPE || + type.$$typeof === REACT_CONTEXT_TYPE || + type.$$typeof === REACT_FORWARD_REF_TYPE || + type.$$typeof === REACT_FUNDAMENTAL_TYPE || + type.$$typeof === REACT_RESPONDER_TYPE || + type.$$typeof === REACT_SCOPE_TYPE)) + ); + } + + /** + * Forked from fbjs/warning: + * https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js + * + * Only change is we use console.warn instead of console.error, + * and do nothing when 'console' is not supported. + * This really simplifies the code. + * --- + * Similar to invariant but only logs a warning if the condition is not met. + * This can be used to log issues in development environments in critical + * paths. Removing the logging code for production environments will keep the + * same logic and follow the same code paths. + */ + var lowPriorityWarningWithoutStack = function () {}; + + { + var printWarning = function (format) { + for ( + var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; + _key < _len; + _key++ + ) { + args[_key - 1] = arguments[_key]; + } + + var argIndex = 0; + var message = + 'Warning: ' + + format.replace(/%s/g, function () { + return args[argIndex++]; + }); + + if (typeof console !== 'undefined') { + console.warn(message); + } + + try { + // --- Welcome to debugging React --- + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + throw new Error(message); + } catch (x) {} + }; + + lowPriorityWarningWithoutStack = function (condition, format) { + if (format === undefined) { + throw new Error( + '`lowPriorityWarningWithoutStack(condition, format, ...args)` requires a warning ' + + 'message argument', + ); + } + + if (!condition) { + for ( + var _len2 = arguments.length, args = new Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; + _key2 < _len2; + _key2++ + ) { + args[_key2 - 2] = arguments[_key2]; + } + + printWarning.apply(void 0, [format].concat(args)); + } + }; + } + + var lowPriorityWarningWithoutStack$1 = lowPriorityWarningWithoutStack; + + function typeOf(object) { + if (typeof object === 'object' && object !== null) { + var $$typeof = object.$$typeof; + + switch ($$typeof) { + case REACT_ELEMENT_TYPE: + var type = object.type; + + switch (type) { + case REACT_ASYNC_MODE_TYPE: + case REACT_CONCURRENT_MODE_TYPE: + case REACT_FRAGMENT_TYPE: + case REACT_PROFILER_TYPE: + case REACT_STRICT_MODE_TYPE: + case REACT_SUSPENSE_TYPE: + return type; + + default: + var $$typeofType = type && type.$$typeof; + + switch ($$typeofType) { + case REACT_CONTEXT_TYPE: + case REACT_FORWARD_REF_TYPE: + case REACT_LAZY_TYPE: + case REACT_MEMO_TYPE: + case REACT_PROVIDER_TYPE: + return $$typeofType; + + default: + return $$typeof; + } + } + + case REACT_PORTAL_TYPE: + return $$typeof; + } + } + + return undefined; + } // AsyncMode is deprecated along with isAsyncMode + + var AsyncMode = REACT_ASYNC_MODE_TYPE; + var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE; + var ContextConsumer = REACT_CONTEXT_TYPE; + var ContextProvider = REACT_PROVIDER_TYPE; + var Element = REACT_ELEMENT_TYPE; + var ForwardRef = REACT_FORWARD_REF_TYPE; + var Fragment = REACT_FRAGMENT_TYPE; + var Lazy = REACT_LAZY_TYPE; + var Memo = REACT_MEMO_TYPE; + var Portal = REACT_PORTAL_TYPE; + var Profiler = REACT_PROFILER_TYPE; + var StrictMode = REACT_STRICT_MODE_TYPE; + var Suspense = REACT_SUSPENSE_TYPE; + var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated + + function isAsyncMode(object) { + { + if (!hasWarnedAboutDeprecatedIsAsyncMode) { + hasWarnedAboutDeprecatedIsAsyncMode = true; + lowPriorityWarningWithoutStack$1( + false, + 'The ReactIs.isAsyncMode() alias has been deprecated, ' + + 'and will be removed in React 17+. Update your code to use ' + + 'ReactIs.isConcurrentMode() instead. It has the exact same API.', + ); + } + } + + return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE; + } + function isConcurrentMode(object) { + return typeOf(object) === REACT_CONCURRENT_MODE_TYPE; + } + function isContextConsumer(object) { + return typeOf(object) === REACT_CONTEXT_TYPE; + } + function isContextProvider(object) { + return typeOf(object) === REACT_PROVIDER_TYPE; + } + function isElement(object) { + return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; + } + function isForwardRef(object) { + return typeOf(object) === REACT_FORWARD_REF_TYPE; + } + function isFragment(object) { + return typeOf(object) === REACT_FRAGMENT_TYPE; + } + function isLazy(object) { + return typeOf(object) === REACT_LAZY_TYPE; + } + function isMemo(object) { + return typeOf(object) === REACT_MEMO_TYPE; + } + function isPortal(object) { + return typeOf(object) === REACT_PORTAL_TYPE; + } + function isProfiler(object) { + return typeOf(object) === REACT_PROFILER_TYPE; + } + function isStrictMode(object) { + return typeOf(object) === REACT_STRICT_MODE_TYPE; + } + function isSuspense(object) { + return typeOf(object) === REACT_SUSPENSE_TYPE; + } + + exports.typeOf = typeOf; + exports.AsyncMode = AsyncMode; + exports.ConcurrentMode = ConcurrentMode; + exports.ContextConsumer = ContextConsumer; + exports.ContextProvider = ContextProvider; + exports.Element = Element; + exports.ForwardRef = ForwardRef; + exports.Fragment = Fragment; + exports.Lazy = Lazy; + exports.Memo = Memo; + exports.Portal = Portal; + exports.Profiler = Profiler; + exports.StrictMode = StrictMode; + exports.Suspense = Suspense; + exports.isValidElementType = isValidElementType; + exports.isAsyncMode = isAsyncMode; + exports.isConcurrentMode = isConcurrentMode; + exports.isContextConsumer = isContextConsumer; + exports.isContextProvider = isContextProvider; + exports.isElement = isElement; + exports.isForwardRef = isForwardRef; + exports.isFragment = isFragment; + exports.isLazy = isLazy; + exports.isMemo = isMemo; + exports.isPortal = isPortal; + exports.isProfiler = isProfiler; + exports.isStrictMode = isStrictMode; + exports.isSuspense = isSuspense; + })(); + } + + /***/ + }, + /* 541 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + + var ReactIs = __webpack_require__(109); + var assign = __webpack_require__(64); + + var ReactPropTypesSecret = __webpack_require__(231); + var checkPropTypes = __webpack_require__(107); + + var has = Function.call.bind(Object.prototype.hasOwnProperty); + var printWarning = function () {}; + + if (true) { + printWarning = function (text) { + var message = 'Warning: ' + text; + if (typeof console !== 'undefined') { + console.error(message); + } + try { + // --- Welcome to debugging React --- + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + throw new Error(message); + } catch (x) {} + }; + } + + function emptyFunctionThatReturnsNull() { + return null; + } + + module.exports = function (isValidElement, throwOnDirectAccess) { + /* global Symbol */ + var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; + var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec. + + /** + * Returns the iterator method function contained on the iterable object. + * + * Be sure to invoke the function with the iterable as context: + * + * var iteratorFn = getIteratorFn(myIterable); + * if (iteratorFn) { + * var iterator = iteratorFn.call(myIterable); + * ... + * } + * + * @param {?object} maybeIterable + * @return {?function} + */ + function getIteratorFn(maybeIterable) { + var iteratorFn = + maybeIterable && + ((ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL]) || maybeIterable[FAUX_ITERATOR_SYMBOL]); + if (typeof iteratorFn === 'function') { + return iteratorFn; + } + } + + /** + * Collection of methods that allow declaration and validation of props that are + * supplied to React components. Example usage: + * + * var Props = require('ReactPropTypes'); + * var MyArticle = React.createClass({ + * propTypes: { + * // An optional string prop named "description". + * description: Props.string, + * + * // A required enum prop named "category". + * category: Props.oneOf(['News','Photos']).isRequired, + * + * // A prop named "dialog" that requires an instance of Dialog. + * dialog: Props.instanceOf(Dialog).isRequired + * }, + * render: function() { ... } + * }); + * + * A more formal specification of how these methods are used: + * + * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...) + * decl := ReactPropTypes.{type}(.isRequired)? + * + * Each and every declaration produces a function with the same signature. This + * allows the creation of custom validation functions. For example: + * + * var MyLink = React.createClass({ + * propTypes: { + * // An optional string or URI prop named "href". + * href: function(props, propName, componentName) { + * var propValue = props[propName]; + * if (propValue != null && typeof propValue !== 'string' && + * !(propValue instanceof URI)) { + * return new Error( + * 'Expected a string or an URI for ' + propName + ' in ' + + * componentName + * ); + * } + * } + * }, + * render: function() {...} + * }); + * + * @internal + */ + + var ANONYMOUS = '<<anonymous>>'; + + // Important! + // Keep this list in sync with production version in `./factoryWithThrowingShims.js`. + var ReactPropTypes = { + array: createPrimitiveTypeChecker('array'), + bool: createPrimitiveTypeChecker('boolean'), + func: createPrimitiveTypeChecker('function'), + number: createPrimitiveTypeChecker('number'), + object: createPrimitiveTypeChecker('object'), + string: createPrimitiveTypeChecker('string'), + symbol: createPrimitiveTypeChecker('symbol'), + + any: createAnyTypeChecker(), + arrayOf: createArrayOfTypeChecker, + element: createElementTypeChecker(), + elementType: createElementTypeTypeChecker(), + instanceOf: createInstanceTypeChecker, + node: createNodeChecker(), + objectOf: createObjectOfTypeChecker, + oneOf: createEnumTypeChecker, + oneOfType: createUnionTypeChecker, + shape: createShapeTypeChecker, + exact: createStrictShapeTypeChecker, + }; + + /** + * inlined Object.is polyfill to avoid requiring consumers ship their own + * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is + */ + /*eslint-disable no-self-compare*/ + function is(x, y) { + // SameValue algorithm + if (x === y) { + // Steps 1-5, 7-10 + // Steps 6.b-6.e: +0 != -0 + return x !== 0 || 1 / x === 1 / y; + } else { + // Step 6.a: NaN == NaN + return x !== x && y !== y; + } + } + /*eslint-enable no-self-compare*/ + + /** + * We use an Error-like object for backward compatibility as people may call + * PropTypes directly and inspect their output. However, we don't use real + * Errors anymore. We don't inspect their stack anyway, and creating them + * is prohibitively expensive if they are created too often, such as what + * happens in oneOfType() for any type before the one that matched. + */ + function PropTypeError(message) { + this.message = message; + this.stack = ''; + } + // Make `instanceof Error` still work for returned errors. + PropTypeError.prototype = Error.prototype; + + function createChainableTypeChecker(validate) { + if (true) { + var manualPropTypeCallCache = {}; + var manualPropTypeWarningCount = 0; + } + function checkType(isRequired, props, propName, componentName, location, propFullName, secret) { + componentName = componentName || ANONYMOUS; + propFullName = propFullName || propName; + + if (secret !== ReactPropTypesSecret) { + if (throwOnDirectAccess) { + // New behavior only for users of `prop-types` package + var err = new Error( + 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' + + 'Use `PropTypes.checkPropTypes()` to call them. ' + + 'Read more at http://fb.me/use-check-prop-types', + ); + err.name = 'Invariant Violation'; + throw err; + } else if ('development' !== 'production' && typeof console !== 'undefined') { + // Old behavior for people using React.PropTypes + var cacheKey = componentName + ':' + propName; + if ( + !manualPropTypeCallCache[cacheKey] && + // Avoid spamming the console because they are often not actionable except for lib authors + manualPropTypeWarningCount < 3 + ) { + printWarning( + 'You are manually calling a React.PropTypes validation ' + + 'function for the `' + + propFullName + + '` prop on `' + + componentName + + '`. This is deprecated ' + + 'and will throw in the standalone `prop-types` package. ' + + 'You may be seeing this warning due to a third-party PropTypes ' + + 'library. See https://fb.me/react-warning-dont-call-proptypes ' + + 'for details.', + ); + manualPropTypeCallCache[cacheKey] = true; + manualPropTypeWarningCount++; + } + } + } + if (props[propName] == null) { + if (isRequired) { + if (props[propName] === null) { + return new PropTypeError( + 'The ' + + location + + ' `' + + propFullName + + '` is marked as required ' + + ('in `' + componentName + '`, but its value is `null`.'), + ); + } + return new PropTypeError( + 'The ' + + location + + ' `' + + propFullName + + '` is marked as required in ' + + ('`' + componentName + '`, but its value is `undefined`.'), + ); + } + return null; + } else { + return validate(props, propName, componentName, location, propFullName); + } + } + + var chainedCheckType = checkType.bind(null, false); + chainedCheckType.isRequired = checkType.bind(null, true); + + return chainedCheckType; + } + + function createPrimitiveTypeChecker(expectedType) { + function validate(props, propName, componentName, location, propFullName, secret) { + var propValue = props[propName]; + var propType = getPropType(propValue); + if (propType !== expectedType) { + // `propValue` being instance of, say, date/regexp, pass the 'object' + // check, but we can offer a more precise error message here rather than + // 'of type `object`'. + var preciseType = getPreciseType(propValue); + + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` of type ' + + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + + ('`' + expectedType + '`.'), + ); + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createAnyTypeChecker() { + return createChainableTypeChecker(emptyFunctionThatReturnsNull); + } + + function createArrayOfTypeChecker(typeChecker) { + function validate(props, propName, componentName, location, propFullName) { + if (typeof typeChecker !== 'function') { + return new PropTypeError( + 'Property `' + + propFullName + + '` of component `' + + componentName + + '` has invalid PropType notation inside arrayOf.', + ); + } + var propValue = props[propName]; + if (!Array.isArray(propValue)) { + var propType = getPropType(propValue); + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` of type ' + + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'), + ); + } + for (var i = 0; i < propValue.length; i++) { + var error = typeChecker( + propValue, + i, + componentName, + location, + propFullName + '[' + i + ']', + ReactPropTypesSecret, + ); + if (error instanceof Error) { + return error; + } + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createElementTypeChecker() { + function validate(props, propName, componentName, location, propFullName) { + var propValue = props[propName]; + if (!isValidElement(propValue)) { + var propType = getPropType(propValue); + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` of type ' + + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'), + ); + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createElementTypeTypeChecker() { + function validate(props, propName, componentName, location, propFullName) { + var propValue = props[propName]; + if (!ReactIs.isValidElementType(propValue)) { + var propType = getPropType(propValue); + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` of type ' + + ('`' + + propType + + '` supplied to `' + + componentName + + '`, expected a single ReactElement type.'), + ); + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createInstanceTypeChecker(expectedClass) { + function validate(props, propName, componentName, location, propFullName) { + if (!(props[propName] instanceof expectedClass)) { + var expectedClassName = expectedClass.name || ANONYMOUS; + var actualClassName = getClassName(props[propName]); + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` of type ' + + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + + ('instance of `' + expectedClassName + '`.'), + ); + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createEnumTypeChecker(expectedValues) { + if (!Array.isArray(expectedValues)) { + if (true) { + if (arguments.length > 1) { + printWarning( + 'Invalid arguments supplied to oneOf, expected an array, got ' + + arguments.length + + ' arguments. ' + + 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).', + ); + } else { + printWarning('Invalid argument supplied to oneOf, expected an array.'); + } + } + return emptyFunctionThatReturnsNull; + } + + function validate(props, propName, componentName, location, propFullName) { + var propValue = props[propName]; + for (var i = 0; i < expectedValues.length; i++) { + if (is(propValue, expectedValues[i])) { + return null; + } + } + + var valuesString = JSON.stringify(expectedValues, function replacer(key, value) { + var type = getPreciseType(value); + if (type === 'symbol') { + return String(value); + } + return value; + }); + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` of value `' + + String(propValue) + + '` ' + + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'), + ); + } + return createChainableTypeChecker(validate); + } + + function createObjectOfTypeChecker(typeChecker) { + function validate(props, propName, componentName, location, propFullName) { + if (typeof typeChecker !== 'function') { + return new PropTypeError( + 'Property `' + + propFullName + + '` of component `' + + componentName + + '` has invalid PropType notation inside objectOf.', + ); + } + var propValue = props[propName]; + var propType = getPropType(propValue); + if (propType !== 'object') { + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` of type ' + + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'), + ); + } + for (var key in propValue) { + if (has(propValue, key)) { + var error = typeChecker( + propValue, + key, + componentName, + location, + propFullName + '.' + key, + ReactPropTypesSecret, + ); + if (error instanceof Error) { + return error; + } + } + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createUnionTypeChecker(arrayOfTypeCheckers) { + if (!Array.isArray(arrayOfTypeCheckers)) { + true + ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') + : void 0; + return emptyFunctionThatReturnsNull; + } + + for (var i = 0; i < arrayOfTypeCheckers.length; i++) { + var checker = arrayOfTypeCheckers[i]; + if (typeof checker !== 'function') { + printWarning( + 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' + + 'received ' + + getPostfixForTypeWarning(checker) + + ' at index ' + + i + + '.', + ); + return emptyFunctionThatReturnsNull; + } + } + + function validate(props, propName, componentName, location, propFullName) { + for (var i = 0; i < arrayOfTypeCheckers.length; i++) { + var checker = arrayOfTypeCheckers[i]; + if ( + checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null + ) { + return null; + } + } + + return new PropTypeError( + 'Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'), + ); + } + return createChainableTypeChecker(validate); + } + + function createNodeChecker() { + function validate(props, propName, componentName, location, propFullName) { + if (!isNode(props[propName])) { + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` supplied to ' + + ('`' + componentName + '`, expected a ReactNode.'), + ); + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createShapeTypeChecker(shapeTypes) { + function validate(props, propName, componentName, location, propFullName) { + var propValue = props[propName]; + var propType = getPropType(propValue); + if (propType !== 'object') { + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` of type `' + + propType + + '` ' + + ('supplied to `' + componentName + '`, expected `object`.'), + ); + } + for (var key in shapeTypes) { + var checker = shapeTypes[key]; + if (!checker) { + continue; + } + var error = checker( + propValue, + key, + componentName, + location, + propFullName + '.' + key, + ReactPropTypesSecret, + ); + if (error) { + return error; + } + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createStrictShapeTypeChecker(shapeTypes) { + function validate(props, propName, componentName, location, propFullName) { + var propValue = props[propName]; + var propType = getPropType(propValue); + if (propType !== 'object') { + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` of type `' + + propType + + '` ' + + ('supplied to `' + componentName + '`, expected `object`.'), + ); + } + // We need to check all keys in case some are required but missing from + // props. + var allKeys = assign({}, props[propName], shapeTypes); + for (var key in allKeys) { + var checker = shapeTypes[key]; + if (!checker) { + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` key `' + + key + + '` supplied to `' + + componentName + + '`.' + + '\nBad object: ' + + JSON.stringify(props[propName], null, ' ') + + '\nValid keys: ' + + JSON.stringify(Object.keys(shapeTypes), null, ' '), + ); + } + var error = checker( + propValue, + key, + componentName, + location, + propFullName + '.' + key, + ReactPropTypesSecret, + ); + if (error) { + return error; + } + } + return null; + } + + return createChainableTypeChecker(validate); + } + + function isNode(propValue) { + switch (typeof propValue) { + case 'number': + case 'string': + case 'undefined': + return true; + case 'boolean': + return !propValue; + case 'object': + if (Array.isArray(propValue)) { + return propValue.every(isNode); + } + if (propValue === null || isValidElement(propValue)) { + return true; + } + + var iteratorFn = getIteratorFn(propValue); + if (iteratorFn) { + var iterator = iteratorFn.call(propValue); + var step; + if (iteratorFn !== propValue.entries) { + while (!(step = iterator.next()).done) { + if (!isNode(step.value)) { + return false; + } + } + } else { + // Iterator will provide entry [k,v] tuples rather than values. + while (!(step = iterator.next()).done) { + var entry = step.value; + if (entry) { + if (!isNode(entry[1])) { + return false; + } + } + } + } + } else { + return false; + } + + return true; + default: + return false; + } + } + + function isSymbol(propType, propValue) { + // Native Symbol. + if (propType === 'symbol') { + return true; + } + + // falsy value can't be a Symbol + if (!propValue) { + return false; + } + + // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol' + if (propValue['@@toStringTag'] === 'Symbol') { + return true; + } + + // Fallback for non-spec compliant Symbols which are polyfilled. + if (typeof Symbol === 'function' && propValue instanceof Symbol) { + return true; + } + + return false; + } + + // Equivalent of `typeof` but with special handling for array and regexp. + function getPropType(propValue) { + var propType = typeof propValue; + if (Array.isArray(propValue)) { + return 'array'; + } + if (propValue instanceof RegExp) { + // Old webkits (at least until Android 4.0) return 'function' rather than + // 'object' for typeof a RegExp. We'll normalize this here so that /bla/ + // passes PropTypes.object. + return 'object'; + } + if (isSymbol(propType, propValue)) { + return 'symbol'; + } + return propType; + } + + // This handles more types than `getPropType`. Only used for error messages. + // See `createPrimitiveTypeChecker`. + function getPreciseType(propValue) { + if (typeof propValue === 'undefined' || propValue === null) { + return '' + propValue; + } + var propType = getPropType(propValue); + if (propType === 'object') { + if (propValue instanceof Date) { + return 'date'; + } else if (propValue instanceof RegExp) { + return 'regexp'; + } + } + return propType; + } + + // Returns a string that is postfixed to a warning about an invalid type. + // For example, "undefined" or "of type array" + function getPostfixForTypeWarning(value) { + var type = getPreciseType(value); + switch (type) { + case 'array': + case 'object': + return 'an ' + type; + case 'boolean': + case 'date': + case 'regexp': + return 'a ' + type; + default: + return type; + } + } + + // Returns class name of the object, if any. + function getClassName(propValue) { + if (!propValue.constructor || !propValue.constructor.name) { + return ANONYMOUS; + } + return propValue.constructor.name; + } + + ReactPropTypes.checkPropTypes = checkPropTypes; + ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache; + ReactPropTypes.PropTypes = ReactPropTypes; + + return ReactPropTypes; + }; + + /***/ + }, + /* 542 */ + /***/ function (module, exports, __webpack_require__) { + /* WEBPACK VAR INJECTION */ (function (global, module) { + var __WEBPACK_AMD_DEFINE_RESULT__; /** + * @license + * Lodash <https://lodash.com/> + * Copyright OpenJS Foundation and other contributors <https://openjsf.org/> + * Released under MIT license <https://lodash.com/license> + * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ + (function () { + /** Used as a safe reference for `undefined` in pre-ES5 environments. */ + var undefined; + + /** Used as the semantic version number. */ + var VERSION = '4.17.15'; + + /** Used as the size to enable large array optimizations. */ + var LARGE_ARRAY_SIZE = 200; + + /** Error message constants. */ + var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.', + FUNC_ERROR_TEXT = 'Expected a function'; + + /** Used to stand-in for `undefined` hash values. */ + var HASH_UNDEFINED = '__lodash_hash_undefined__'; + + /** Used as the maximum memoize cache size. */ + var MAX_MEMOIZE_SIZE = 500; + + /** Used as the internal argument placeholder. */ + var PLACEHOLDER = '__lodash_placeholder__'; + + /** Used to compose bitmasks for cloning. */ + var CLONE_DEEP_FLAG = 1, + CLONE_FLAT_FLAG = 2, + CLONE_SYMBOLS_FLAG = 4; + + /** Used to compose bitmasks for value comparisons. */ + var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; + + /** Used to compose bitmasks for function metadata. */ + var WRAP_BIND_FLAG = 1, + WRAP_BIND_KEY_FLAG = 2, + WRAP_CURRY_BOUND_FLAG = 4, + WRAP_CURRY_FLAG = 8, + WRAP_CURRY_RIGHT_FLAG = 16, + WRAP_PARTIAL_FLAG = 32, + WRAP_PARTIAL_RIGHT_FLAG = 64, + WRAP_ARY_FLAG = 128, + WRAP_REARG_FLAG = 256, + WRAP_FLIP_FLAG = 512; + + /** Used as default options for `_.truncate`. */ + var DEFAULT_TRUNC_LENGTH = 30, + DEFAULT_TRUNC_OMISSION = '...'; + + /** Used to detect hot functions by number of calls within a span of milliseconds. */ + var HOT_COUNT = 800, + HOT_SPAN = 16; + + /** Used to indicate the type of lazy iteratees. */ + var LAZY_FILTER_FLAG = 1, + LAZY_MAP_FLAG = 2, + LAZY_WHILE_FLAG = 3; + + /** Used as references for various `Number` constants. */ + var INFINITY = 1 / 0, + MAX_SAFE_INTEGER = 9007199254740991, + MAX_INTEGER = 1.7976931348623157e308, + NAN = 0 / 0; + + /** Used as references for the maximum length and index of an array. */ + var MAX_ARRAY_LENGTH = 4294967295, + MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1, + HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1; + + /** Used to associate wrap methods with their bit flags. */ + var wrapFlags = [ + ['ary', WRAP_ARY_FLAG], + ['bind', WRAP_BIND_FLAG], + ['bindKey', WRAP_BIND_KEY_FLAG], + ['curry', WRAP_CURRY_FLAG], + ['curryRight', WRAP_CURRY_RIGHT_FLAG], + ['flip', WRAP_FLIP_FLAG], + ['partial', WRAP_PARTIAL_FLAG], + ['partialRight', WRAP_PARTIAL_RIGHT_FLAG], + ['rearg', WRAP_REARG_FLAG], + ]; + + /** `Object#toString` result references. */ + var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + asyncTag = '[object AsyncFunction]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + domExcTag = '[object DOMException]', + errorTag = '[object Error]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + mapTag = '[object Map]', + numberTag = '[object Number]', + nullTag = '[object Null]', + objectTag = '[object Object]', + promiseTag = '[object Promise]', + proxyTag = '[object Proxy]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]', + undefinedTag = '[object Undefined]', + weakMapTag = '[object WeakMap]', + weakSetTag = '[object WeakSet]'; + + var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + + /** Used to match empty string literals in compiled template source. */ + var reEmptyStringLeading = /\b__p \+= '';/g, + reEmptyStringMiddle = /\b(__p \+=) '' \+/g, + reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g; + + /** Used to match HTML entities and HTML characters. */ + var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g, + reUnescapedHtml = /[&<>"']/g, + reHasEscapedHtml = RegExp(reEscapedHtml.source), + reHasUnescapedHtml = RegExp(reUnescapedHtml.source); + + /** Used to match template delimiters. */ + var reEscape = /<%-([\s\S]+?)%>/g, + reEvaluate = /<%([\s\S]+?)%>/g, + reInterpolate = /<%=([\s\S]+?)%>/g; + + /** Used to match property names within property paths. */ + var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, + reIsPlainProp = /^\w*$/, + rePropName = + /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; + + /** + * Used to match `RegExp` + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). + */ + var reRegExpChar = /[\\^$.*+?()[\]{}|]/g, + reHasRegExpChar = RegExp(reRegExpChar.source); + + /** Used to match leading and trailing whitespace. */ + var reTrim = /^\s+|\s+$/g, + reTrimStart = /^\s+/, + reTrimEnd = /\s+$/; + + /** Used to match wrap detail comments. */ + var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, + reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/, + reSplitDetails = /,? & /; + + /** Used to match words composed of alphanumeric characters. */ + var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g; + + /** Used to match backslashes in property paths. */ + var reEscapeChar = /\\(\\)?/g; + + /** + * Used to match + * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components). + */ + var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g; + + /** Used to match `RegExp` flags from their coerced string values. */ + var reFlags = /\w*$/; + + /** Used to detect bad signed hexadecimal string values. */ + var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; + + /** Used to detect binary string values. */ + var reIsBinary = /^0b[01]+$/i; + + /** Used to detect host constructors (Safari). */ + var reIsHostCtor = /^\[object .+?Constructor\]$/; + + /** Used to detect octal string values. */ + var reIsOctal = /^0o[0-7]+$/i; + + /** Used to detect unsigned integer values. */ + var reIsUint = /^(?:0|[1-9]\d*)$/; + + /** Used to match Latin Unicode letters (excluding mathematical operators). */ + var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g; + + /** Used to ensure capturing order of template delimiters. */ + var reNoMatch = /($^)/; + + /** Used to match unescaped characters in compiled string literals. */ + var reUnescapedString = /['\n\r\u2028\u2029\\]/g; + + /** Used to compose unicode character classes. */ + var rsAstralRange = '\\ud800-\\udfff', + rsComboMarksRange = '\\u0300-\\u036f', + reComboHalfMarksRange = '\\ufe20-\\ufe2f', + rsComboSymbolsRange = '\\u20d0-\\u20ff', + rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, + rsDingbatRange = '\\u2700-\\u27bf', + rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff', + rsMathOpRange = '\\xac\\xb1\\xd7\\xf7', + rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf', + rsPunctuationRange = '\\u2000-\\u206f', + rsSpaceRange = + ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000', + rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde', + rsVarRange = '\\ufe0e\\ufe0f', + rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange; + + /** Used to compose unicode capture groups. */ + var rsApos = "['\u2019]", + rsAstral = '[' + rsAstralRange + ']', + rsBreak = '[' + rsBreakRange + ']', + rsCombo = '[' + rsComboRange + ']', + rsDigits = '\\d+', + rsDingbat = '[' + rsDingbatRange + ']', + rsLower = '[' + rsLowerRange + ']', + rsMisc = + '[^' + + rsAstralRange + + rsBreakRange + + rsDigits + + rsDingbatRange + + rsLowerRange + + rsUpperRange + + ']', + rsFitz = '\\ud83c[\\udffb-\\udfff]', + rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', + rsNonAstral = '[^' + rsAstralRange + ']', + rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', + rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', + rsUpper = '[' + rsUpperRange + ']', + rsZWJ = '\\u200d'; + + /** Used to compose unicode regexes. */ + var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')', + rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')', + rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?', + rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?', + reOptMod = rsModifier + '?', + rsOptVar = '[' + rsVarRange + ']?', + rsOptJoin = + '(?:' + + rsZWJ + + '(?:' + + [rsNonAstral, rsRegional, rsSurrPair].join('|') + + ')' + + rsOptVar + + reOptMod + + ')*', + rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])', + rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])', + rsSeq = rsOptVar + reOptMod + rsOptJoin, + rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq, + rsSymbol = + '(?:' + + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + + ')'; + + /** Used to match apostrophes. */ + var reApos = RegExp(rsApos, 'g'); + + /** + * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and + * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols). + */ + var reComboMark = RegExp(rsCombo, 'g'); + + /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ + var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); + + /** Used to match complex or compound words. */ + var reUnicodeWord = RegExp( + [ + rsUpper + + '?' + + rsLower + + '+' + + rsOptContrLower + + '(?=' + + [rsBreak, rsUpper, '$'].join('|') + + ')', + rsMiscUpper + + '+' + + rsOptContrUpper + + '(?=' + + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + + ')', + rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower, + rsUpper + '+' + rsOptContrUpper, + rsOrdUpper, + rsOrdLower, + rsDigits, + rsEmoji, + ].join('|'), + 'g', + ); + + /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */ + var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']'); + + /** Used to detect strings that need a more robust regexp to match words. */ + var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/; + + /** Used to assign default `context` object properties. */ + var contextProps = [ + 'Array', + 'Buffer', + 'DataView', + 'Date', + 'Error', + 'Float32Array', + 'Float64Array', + 'Function', + 'Int8Array', + 'Int16Array', + 'Int32Array', + 'Map', + 'Math', + 'Object', + 'Promise', + 'RegExp', + 'Set', + 'String', + 'Symbol', + 'TypeError', + 'Uint8Array', + 'Uint8ClampedArray', + 'Uint16Array', + 'Uint32Array', + 'WeakMap', + '_', + 'clearTimeout', + 'isFinite', + 'parseInt', + 'setTimeout', + ]; + + /** Used to make template sourceURLs easier to identify. */ + var templateCounter = -1; + + /** Used to identify `toStringTag` values of typed arrays. */ + var typedArrayTags = {}; + typedArrayTags[float32Tag] = + typedArrayTags[float64Tag] = + typedArrayTags[int8Tag] = + typedArrayTags[int16Tag] = + typedArrayTags[int32Tag] = + typedArrayTags[uint8Tag] = + typedArrayTags[uint8ClampedTag] = + typedArrayTags[uint16Tag] = + typedArrayTags[uint32Tag] = + true; + typedArrayTags[argsTag] = + typedArrayTags[arrayTag] = + typedArrayTags[arrayBufferTag] = + typedArrayTags[boolTag] = + typedArrayTags[dataViewTag] = + typedArrayTags[dateTag] = + typedArrayTags[errorTag] = + typedArrayTags[funcTag] = + typedArrayTags[mapTag] = + typedArrayTags[numberTag] = + typedArrayTags[objectTag] = + typedArrayTags[regexpTag] = + typedArrayTags[setTag] = + typedArrayTags[stringTag] = + typedArrayTags[weakMapTag] = + false; + + /** Used to identify `toStringTag` values supported by `_.clone`. */ + var cloneableTags = {}; + cloneableTags[argsTag] = + cloneableTags[arrayTag] = + cloneableTags[arrayBufferTag] = + cloneableTags[dataViewTag] = + cloneableTags[boolTag] = + cloneableTags[dateTag] = + cloneableTags[float32Tag] = + cloneableTags[float64Tag] = + cloneableTags[int8Tag] = + cloneableTags[int16Tag] = + cloneableTags[int32Tag] = + cloneableTags[mapTag] = + cloneableTags[numberTag] = + cloneableTags[objectTag] = + cloneableTags[regexpTag] = + cloneableTags[setTag] = + cloneableTags[stringTag] = + cloneableTags[symbolTag] = + cloneableTags[uint8Tag] = + cloneableTags[uint8ClampedTag] = + cloneableTags[uint16Tag] = + cloneableTags[uint32Tag] = + true; + cloneableTags[errorTag] = cloneableTags[funcTag] = cloneableTags[weakMapTag] = false; + + /** Used to map Latin Unicode letters to basic Latin letters. */ + var deburredLetters = { + // Latin-1 Supplement block. + '\xc0': 'A', + '\xc1': 'A', + '\xc2': 'A', + '\xc3': 'A', + '\xc4': 'A', + '\xc5': 'A', + '\xe0': 'a', + '\xe1': 'a', + '\xe2': 'a', + '\xe3': 'a', + '\xe4': 'a', + '\xe5': 'a', + '\xc7': 'C', + '\xe7': 'c', + '\xd0': 'D', + '\xf0': 'd', + '\xc8': 'E', + '\xc9': 'E', + '\xca': 'E', + '\xcb': 'E', + '\xe8': 'e', + '\xe9': 'e', + '\xea': 'e', + '\xeb': 'e', + '\xcc': 'I', + '\xcd': 'I', + '\xce': 'I', + '\xcf': 'I', + '\xec': 'i', + '\xed': 'i', + '\xee': 'i', + '\xef': 'i', + '\xd1': 'N', + '\xf1': 'n', + '\xd2': 'O', + '\xd3': 'O', + '\xd4': 'O', + '\xd5': 'O', + '\xd6': 'O', + '\xd8': 'O', + '\xf2': 'o', + '\xf3': 'o', + '\xf4': 'o', + '\xf5': 'o', + '\xf6': 'o', + '\xf8': 'o', + '\xd9': 'U', + '\xda': 'U', + '\xdb': 'U', + '\xdc': 'U', + '\xf9': 'u', + '\xfa': 'u', + '\xfb': 'u', + '\xfc': 'u', + '\xdd': 'Y', + '\xfd': 'y', + '\xff': 'y', + '\xc6': 'Ae', + '\xe6': 'ae', + '\xde': 'Th', + '\xfe': 'th', + '\xdf': 'ss', + // Latin Extended-A block. + '\u0100': 'A', + '\u0102': 'A', + '\u0104': 'A', + '\u0101': 'a', + '\u0103': 'a', + '\u0105': 'a', + '\u0106': 'C', + '\u0108': 'C', + '\u010a': 'C', + '\u010c': 'C', + '\u0107': 'c', + '\u0109': 'c', + '\u010b': 'c', + '\u010d': 'c', + '\u010e': 'D', + '\u0110': 'D', + '\u010f': 'd', + '\u0111': 'd', + '\u0112': 'E', + '\u0114': 'E', + '\u0116': 'E', + '\u0118': 'E', + '\u011a': 'E', + '\u0113': 'e', + '\u0115': 'e', + '\u0117': 'e', + '\u0119': 'e', + '\u011b': 'e', + '\u011c': 'G', + '\u011e': 'G', + '\u0120': 'G', + '\u0122': 'G', + '\u011d': 'g', + '\u011f': 'g', + '\u0121': 'g', + '\u0123': 'g', + '\u0124': 'H', + '\u0126': 'H', + '\u0125': 'h', + '\u0127': 'h', + '\u0128': 'I', + '\u012a': 'I', + '\u012c': 'I', + '\u012e': 'I', + '\u0130': 'I', + '\u0129': 'i', + '\u012b': 'i', + '\u012d': 'i', + '\u012f': 'i', + '\u0131': 'i', + '\u0134': 'J', + '\u0135': 'j', + '\u0136': 'K', + '\u0137': 'k', + '\u0138': 'k', + '\u0139': 'L', + '\u013b': 'L', + '\u013d': 'L', + '\u013f': 'L', + '\u0141': 'L', + '\u013a': 'l', + '\u013c': 'l', + '\u013e': 'l', + '\u0140': 'l', + '\u0142': 'l', + '\u0143': 'N', + '\u0145': 'N', + '\u0147': 'N', + '\u014a': 'N', + '\u0144': 'n', + '\u0146': 'n', + '\u0148': 'n', + '\u014b': 'n', + '\u014c': 'O', + '\u014e': 'O', + '\u0150': 'O', + '\u014d': 'o', + '\u014f': 'o', + '\u0151': 'o', + '\u0154': 'R', + '\u0156': 'R', + '\u0158': 'R', + '\u0155': 'r', + '\u0157': 'r', + '\u0159': 'r', + '\u015a': 'S', + '\u015c': 'S', + '\u015e': 'S', + '\u0160': 'S', + '\u015b': 's', + '\u015d': 's', + '\u015f': 's', + '\u0161': 's', + '\u0162': 'T', + '\u0164': 'T', + '\u0166': 'T', + '\u0163': 't', + '\u0165': 't', + '\u0167': 't', + '\u0168': 'U', + '\u016a': 'U', + '\u016c': 'U', + '\u016e': 'U', + '\u0170': 'U', + '\u0172': 'U', + '\u0169': 'u', + '\u016b': 'u', + '\u016d': 'u', + '\u016f': 'u', + '\u0171': 'u', + '\u0173': 'u', + '\u0174': 'W', + '\u0175': 'w', + '\u0176': 'Y', + '\u0177': 'y', + '\u0178': 'Y', + '\u0179': 'Z', + '\u017b': 'Z', + '\u017d': 'Z', + '\u017a': 'z', + '\u017c': 'z', + '\u017e': 'z', + '\u0132': 'IJ', + '\u0133': 'ij', + '\u0152': 'Oe', + '\u0153': 'oe', + '\u0149': "'n", + '\u017f': 's', + }; + + /** Used to map characters to HTML entities. */ + var htmlEscapes = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''', + }; + + /** Used to map HTML entities to characters. */ + var htmlUnescapes = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + ''': "'", + }; + + /** Used to escape characters for inclusion in compiled string literals. */ + var stringEscapes = { + '\\': '\\', + "'": "'", + '\n': 'n', + '\r': 'r', + '\u2028': 'u2028', + '\u2029': 'u2029', + }; + + /** Built-in method references without a dependency on `root`. */ + var freeParseFloat = parseFloat, + freeParseInt = parseInt; + + /** Detect free variable `global` from Node.js. */ + var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + + /** Detect free variable `self`. */ + var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + + /** Used as a reference to the global object. */ + var root = freeGlobal || freeSelf || Function('return this')(); + + /** Detect free variable `exports`. */ + var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; + + /** Detect free variable `module`. */ + var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + + /** Detect the popular CommonJS extension `module.exports`. */ + var moduleExports = freeModule && freeModule.exports === freeExports; + + /** Detect free variable `process` from Node.js. */ + var freeProcess = moduleExports && freeGlobal.process; + + /** Used to access faster Node.js helpers. */ + var nodeUtil = (function () { + try { + // Use `util.types` for Node.js 10+. + var types = freeModule && freeModule.require && freeModule.require('util').types; + + if (types) { + return types; + } + + // Legacy `process.binding('util')` for Node.js < 10. + return freeProcess && freeProcess.binding && freeProcess.binding('util'); + } catch (e) {} + })(); + + /* Node.js helper references. */ + var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer, + nodeIsDate = nodeUtil && nodeUtil.isDate, + nodeIsMap = nodeUtil && nodeUtil.isMap, + nodeIsRegExp = nodeUtil && nodeUtil.isRegExp, + nodeIsSet = nodeUtil && nodeUtil.isSet, + nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; + + /*--------------------------------------------------------------------------*/ + + /** + * A faster alternative to `Function#apply`, this function invokes `func` + * with the `this` binding of `thisArg` and the arguments of `args`. + * + * @private + * @param {Function} func The function to invoke. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} args The arguments to invoke `func` with. + * @returns {*} Returns the result of `func`. + */ + function apply(func, thisArg, args) { + switch (args.length) { + case 0: + return func.call(thisArg); + case 1: + return func.call(thisArg, args[0]); + case 2: + return func.call(thisArg, args[0], args[1]); + case 3: + return func.call(thisArg, args[0], args[1], args[2]); + } + return func.apply(thisArg, args); + } + + /** + * A specialized version of `baseAggregator` for arrays. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} setter The function to set `accumulator` values. + * @param {Function} iteratee The iteratee to transform keys. + * @param {Object} accumulator The initial aggregated object. + * @returns {Function} Returns `accumulator`. + */ + function arrayAggregator(array, setter, iteratee, accumulator) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + var value = array[index]; + setter(accumulator, value, iteratee(value), array); + } + return accumulator; + } + + /** + * A specialized version of `_.forEach` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ + function arrayEach(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (iteratee(array[index], index, array) === false) { + break; + } + } + return array; + } + + /** + * A specialized version of `_.forEachRight` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ + function arrayEachRight(array, iteratee) { + var length = array == null ? 0 : array.length; + + while (length--) { + if (iteratee(array[length], length, array) === false) { + break; + } + } + return array; + } + + /** + * A specialized version of `_.every` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false`. + */ + function arrayEvery(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (!predicate(array[index], index, array)) { + return false; + } + } + return true; + } + + /** + * A specialized version of `_.filter` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ + function arrayFilter(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result[resIndex++] = value; + } + } + return result; + } + + /** + * A specialized version of `_.includes` for arrays without support for + * specifying an index to search from. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ + function arrayIncludes(array, value) { + var length = array == null ? 0 : array.length; + return !!length && baseIndexOf(array, value, 0) > -1; + } + + /** + * This function is like `arrayIncludes` except that it accepts a comparator. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @param {Function} comparator The comparator invoked per element. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ + function arrayIncludesWith(array, value, comparator) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (comparator(value, array[index])) { + return true; + } + } + return false; + } + + /** + * A specialized version of `_.map` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ + function arrayMap(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length, + result = Array(length); + + while (++index < length) { + result[index] = iteratee(array[index], index, array); + } + return result; + } + + /** + * Appends the elements of `values` to `array`. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to append. + * @returns {Array} Returns `array`. + */ + function arrayPush(array, values) { + var index = -1, + length = values.length, + offset = array.length; + + while (++index < length) { + array[offset + index] = values[index]; + } + return array; + } + + /** + * A specialized version of `_.reduce` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {boolean} [initAccum] Specify using the first element of `array` as + * the initial value. + * @returns {*} Returns the accumulated value. + */ + function arrayReduce(array, iteratee, accumulator, initAccum) { + var index = -1, + length = array == null ? 0 : array.length; + + if (initAccum && length) { + accumulator = array[++index]; + } + while (++index < length) { + accumulator = iteratee(accumulator, array[index], index, array); + } + return accumulator; + } + + /** + * A specialized version of `_.reduceRight` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {boolean} [initAccum] Specify using the last element of `array` as + * the initial value. + * @returns {*} Returns the accumulated value. + */ + function arrayReduceRight(array, iteratee, accumulator, initAccum) { + var length = array == null ? 0 : array.length; + if (initAccum && length) { + accumulator = array[--length]; + } + while (length--) { + accumulator = iteratee(accumulator, array[length], length, array); + } + return accumulator; + } + + /** + * A specialized version of `_.some` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ + function arraySome(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (predicate(array[index], index, array)) { + return true; + } + } + return false; + } + + /** + * Gets the size of an ASCII `string`. + * + * @private + * @param {string} string The string inspect. + * @returns {number} Returns the string size. + */ + var asciiSize = baseProperty('length'); + + /** + * Converts an ASCII `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ + function asciiToArray(string) { + return string.split(''); + } + + /** + * Splits an ASCII `string` into an array of its words. + * + * @private + * @param {string} The string to inspect. + * @returns {Array} Returns the words of `string`. + */ + function asciiWords(string) { + return string.match(reAsciiWord) || []; + } + + /** + * The base implementation of methods like `_.findKey` and `_.findLastKey`, + * without support for iteratee shorthands, which iterates over `collection` + * using `eachFunc`. + * + * @private + * @param {Array|Object} collection The collection to inspect. + * @param {Function} predicate The function invoked per iteration. + * @param {Function} eachFunc The function to iterate over `collection`. + * @returns {*} Returns the found element or its key, else `undefined`. + */ + function baseFindKey(collection, predicate, eachFunc) { + var result; + eachFunc(collection, function (value, key, collection) { + if (predicate(value, key, collection)) { + result = key; + return false; + } + }); + return result; + } + + /** + * The base implementation of `_.findIndex` and `_.findLastIndex` without + * support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} predicate The function invoked per iteration. + * @param {number} fromIndex The index to search from. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function baseFindIndex(array, predicate, fromIndex, fromRight) { + var length = array.length, + index = fromIndex + (fromRight ? 1 : -1); + + while (fromRight ? index-- : ++index < length) { + if (predicate(array[index], index, array)) { + return index; + } + } + return -1; + } + + /** + * The base implementation of `_.indexOf` without `fromIndex` bounds checks. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function baseIndexOf(array, value, fromIndex) { + return value === value + ? strictIndexOf(array, value, fromIndex) + : baseFindIndex(array, baseIsNaN, fromIndex); + } + + /** + * This function is like `baseIndexOf` except that it accepts a comparator. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @param {Function} comparator The comparator invoked per element. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function baseIndexOfWith(array, value, fromIndex, comparator) { + var index = fromIndex - 1, + length = array.length; + + while (++index < length) { + if (comparator(array[index], value)) { + return index; + } + } + return -1; + } + + /** + * The base implementation of `_.isNaN` without support for number objects. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + */ + function baseIsNaN(value) { + return value !== value; + } + + /** + * The base implementation of `_.mean` and `_.meanBy` without support for + * iteratee shorthands. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {number} Returns the mean. + */ + function baseMean(array, iteratee) { + var length = array == null ? 0 : array.length; + return length ? baseSum(array, iteratee) / length : NAN; + } + + /** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new accessor function. + */ + function baseProperty(key) { + return function (object) { + return object == null ? undefined : object[key]; + }; + } + + /** + * The base implementation of `_.propertyOf` without support for deep paths. + * + * @private + * @param {Object} object The object to query. + * @returns {Function} Returns the new accessor function. + */ + function basePropertyOf(object) { + return function (key) { + return object == null ? undefined : object[key]; + }; + } + + /** + * The base implementation of `_.reduce` and `_.reduceRight`, without support + * for iteratee shorthands, which iterates over `collection` using `eachFunc`. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} accumulator The initial value. + * @param {boolean} initAccum Specify using the first or last element of + * `collection` as the initial value. + * @param {Function} eachFunc The function to iterate over `collection`. + * @returns {*} Returns the accumulated value. + */ + function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) { + eachFunc(collection, function (value, index, collection) { + accumulator = initAccum + ? ((initAccum = false), value) + : iteratee(accumulator, value, index, collection); + }); + return accumulator; + } + + /** + * The base implementation of `_.sortBy` which uses `comparer` to define the + * sort order of `array` and replaces criteria objects with their corresponding + * values. + * + * @private + * @param {Array} array The array to sort. + * @param {Function} comparer The function to define sort order. + * @returns {Array} Returns `array`. + */ + function baseSortBy(array, comparer) { + var length = array.length; + + array.sort(comparer); + while (length--) { + array[length] = array[length].value; + } + return array; + } + + /** + * The base implementation of `_.sum` and `_.sumBy` without support for + * iteratee shorthands. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {number} Returns the sum. + */ + function baseSum(array, iteratee) { + var result, + index = -1, + length = array.length; + + while (++index < length) { + var current = iteratee(array[index]); + if (current !== undefined) { + result = result === undefined ? current : result + current; + } + } + return result; + } + + /** + * The base implementation of `_.times` without support for iteratee shorthands + * or max array length checks. + * + * @private + * @param {number} n The number of times to invoke `iteratee`. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the array of results. + */ + function baseTimes(n, iteratee) { + var index = -1, + result = Array(n); + + while (++index < n) { + result[index] = iteratee(index); + } + return result; + } + + /** + * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array + * of key-value pairs for `object` corresponding to the property names of `props`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} props The property names to get values for. + * @returns {Object} Returns the key-value pairs. + */ + function baseToPairs(object, props) { + return arrayMap(props, function (key) { + return [key, object[key]]; + }); + } + + /** + * The base implementation of `_.unary` without support for storing metadata. + * + * @private + * @param {Function} func The function to cap arguments for. + * @returns {Function} Returns the new capped function. + */ + function baseUnary(func) { + return function (value) { + return func(value); + }; + } + + /** + * The base implementation of `_.values` and `_.valuesIn` which creates an + * array of `object` property values corresponding to the property names + * of `props`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} props The property names to get values for. + * @returns {Object} Returns the array of property values. + */ + function baseValues(object, props) { + return arrayMap(props, function (key) { + return object[key]; + }); + } + + /** + * Checks if a `cache` value for `key` exists. + * + * @private + * @param {Object} cache The cache to query. + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function cacheHas(cache, key) { + return cache.has(key); + } + + /** + * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol + * that is not found in the character symbols. + * + * @private + * @param {Array} strSymbols The string symbols to inspect. + * @param {Array} chrSymbols The character symbols to find. + * @returns {number} Returns the index of the first unmatched string symbol. + */ + function charsStartIndex(strSymbols, chrSymbols) { + var index = -1, + length = strSymbols.length; + + while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} + return index; + } + + /** + * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol + * that is not found in the character symbols. + * + * @private + * @param {Array} strSymbols The string symbols to inspect. + * @param {Array} chrSymbols The character symbols to find. + * @returns {number} Returns the index of the last unmatched string symbol. + */ + function charsEndIndex(strSymbols, chrSymbols) { + var index = strSymbols.length; + + while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} + return index; + } + + /** + * Gets the number of `placeholder` occurrences in `array`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} placeholder The placeholder to search for. + * @returns {number} Returns the placeholder count. + */ + function countHolders(array, placeholder) { + var length = array.length, + result = 0; + + while (length--) { + if (array[length] === placeholder) { + ++result; + } + } + return result; + } + + /** + * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A + * letters to basic Latin letters. + * + * @private + * @param {string} letter The matched letter to deburr. + * @returns {string} Returns the deburred letter. + */ + var deburrLetter = basePropertyOf(deburredLetters); + + /** + * Used by `_.escape` to convert characters to HTML entities. + * + * @private + * @param {string} chr The matched character to escape. + * @returns {string} Returns the escaped character. + */ + var escapeHtmlChar = basePropertyOf(htmlEscapes); + + /** + * Used by `_.template` to escape characters for inclusion in compiled string literals. + * + * @private + * @param {string} chr The matched character to escape. + * @returns {string} Returns the escaped character. + */ + function escapeStringChar(chr) { + return '\\' + stringEscapes[chr]; + } + + /** + * Gets the value at `key` of `object`. + * + * @private + * @param {Object} [object] The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ + function getValue(object, key) { + return object == null ? undefined : object[key]; + } + + /** + * Checks if `string` contains Unicode symbols. + * + * @private + * @param {string} string The string to inspect. + * @returns {boolean} Returns `true` if a symbol is found, else `false`. + */ + function hasUnicode(string) { + return reHasUnicode.test(string); + } + + /** + * Checks if `string` contains a word composed of Unicode symbols. + * + * @private + * @param {string} string The string to inspect. + * @returns {boolean} Returns `true` if a word is found, else `false`. + */ + function hasUnicodeWord(string) { + return reHasUnicodeWord.test(string); + } + + /** + * Converts `iterator` to an array. + * + * @private + * @param {Object} iterator The iterator to convert. + * @returns {Array} Returns the converted array. + */ + function iteratorToArray(iterator) { + var data, + result = []; + + while (!(data = iterator.next()).done) { + result.push(data.value); + } + return result; + } + + /** + * Converts `map` to its key-value pairs. + * + * @private + * @param {Object} map The map to convert. + * @returns {Array} Returns the key-value pairs. + */ + function mapToArray(map) { + var index = -1, + result = Array(map.size); + + map.forEach(function (value, key) { + result[++index] = [key, value]; + }); + return result; + } + + /** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ + function overArg(func, transform) { + return function (arg) { + return func(transform(arg)); + }; + } + + /** + * Replaces all `placeholder` elements in `array` with an internal placeholder + * and returns an array of their indexes. + * + * @private + * @param {Array} array The array to modify. + * @param {*} placeholder The placeholder to replace. + * @returns {Array} Returns the new array of placeholder indexes. + */ + function replaceHolders(array, placeholder) { + var index = -1, + length = array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (value === placeholder || value === PLACEHOLDER) { + array[index] = PLACEHOLDER; + result[resIndex++] = index; + } + } + return result; + } + + /** + * Converts `set` to an array of its values. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the values. + */ + function setToArray(set) { + var index = -1, + result = Array(set.size); + + set.forEach(function (value) { + result[++index] = value; + }); + return result; + } + + /** + * Converts `set` to its value-value pairs. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the value-value pairs. + */ + function setToPairs(set) { + var index = -1, + result = Array(set.size); + + set.forEach(function (value) { + result[++index] = [value, value]; + }); + return result; + } + + /** + * A specialized version of `_.indexOf` which performs strict equality + * comparisons of values, i.e. `===`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function strictIndexOf(array, value, fromIndex) { + var index = fromIndex - 1, + length = array.length; + + while (++index < length) { + if (array[index] === value) { + return index; + } + } + return -1; + } + + /** + * A specialized version of `_.lastIndexOf` which performs strict equality + * comparisons of values, i.e. `===`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function strictLastIndexOf(array, value, fromIndex) { + var index = fromIndex + 1; + while (index--) { + if (array[index] === value) { + return index; + } + } + return index; + } + + /** + * Gets the number of symbols in `string`. + * + * @private + * @param {string} string The string to inspect. + * @returns {number} Returns the string size. + */ + function stringSize(string) { + return hasUnicode(string) ? unicodeSize(string) : asciiSize(string); + } + + /** + * Converts `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ + function stringToArray(string) { + return hasUnicode(string) ? unicodeToArray(string) : asciiToArray(string); + } + + /** + * Used by `_.unescape` to convert HTML entities to characters. + * + * @private + * @param {string} chr The matched character to unescape. + * @returns {string} Returns the unescaped character. + */ + var unescapeHtmlChar = basePropertyOf(htmlUnescapes); + + /** + * Gets the size of a Unicode `string`. + * + * @private + * @param {string} string The string inspect. + * @returns {number} Returns the string size. + */ + function unicodeSize(string) { + var result = (reUnicode.lastIndex = 0); + while (reUnicode.test(string)) { + ++result; + } + return result; + } + + /** + * Converts a Unicode `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ + function unicodeToArray(string) { + return string.match(reUnicode) || []; + } + + /** + * Splits a Unicode `string` into an array of its words. + * + * @private + * @param {string} The string to inspect. + * @returns {Array} Returns the words of `string`. + */ + function unicodeWords(string) { + return string.match(reUnicodeWord) || []; + } + + /*--------------------------------------------------------------------------*/ + + /** + * Create a new pristine `lodash` function using the `context` object. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category Util + * @param {Object} [context=root] The context object. + * @returns {Function} Returns a new `lodash` function. + * @example + * + * _.mixin({ 'foo': _.constant('foo') }); + * + * var lodash = _.runInContext(); + * lodash.mixin({ 'bar': lodash.constant('bar') }); + * + * _.isFunction(_.foo); + * // => true + * _.isFunction(_.bar); + * // => false + * + * lodash.isFunction(lodash.foo); + * // => false + * lodash.isFunction(lodash.bar); + * // => true + * + * // Create a suped-up `defer` in Node.js. + * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer; + */ + var runInContext = function runInContext(context) { + context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps)); + + /** Built-in constructor references. */ + var Array = context.Array, + Date = context.Date, + Error = context.Error, + Function = context.Function, + Math = context.Math, + Object = context.Object, + RegExp = context.RegExp, + String = context.String, + TypeError = context.TypeError; + + /** Used for built-in method references. */ + var arrayProto = Array.prototype, + funcProto = Function.prototype, + objectProto = Object.prototype; + + /** Used to detect overreaching core-js shims. */ + var coreJsData = context['__core-js_shared__']; + + /** Used to resolve the decompiled source of functions. */ + var funcToString = funcProto.toString; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** Used to generate unique IDs. */ + var idCounter = 0; + + /** Used to detect methods masquerading as native. */ + var maskSrcKey = (function () { + var uid = /[^.]+$/.exec((coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO) || ''); + return uid ? 'Symbol(src)_1.' + uid : ''; + })(); + + /** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ + var nativeObjectToString = objectProto.toString; + + /** Used to infer the `Object` constructor. */ + var objectCtorString = funcToString.call(Object); + + /** Used to restore the original `_` reference in `_.noConflict`. */ + var oldDash = root._; + + /** Used to detect if a method is native. */ + var reIsNative = RegExp( + '^' + + funcToString + .call(hasOwnProperty) + .replace(reRegExpChar, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + + '$', + ); + + /** Built-in value references. */ + var Buffer = moduleExports ? context.Buffer : undefined, + Symbol = context.Symbol, + Uint8Array = context.Uint8Array, + allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined, + getPrototype = overArg(Object.getPrototypeOf, Object), + objectCreate = Object.create, + propertyIsEnumerable = objectProto.propertyIsEnumerable, + splice = arrayProto.splice, + spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined, + symIterator = Symbol ? Symbol.iterator : undefined, + symToStringTag = Symbol ? Symbol.toStringTag : undefined; + + var defineProperty = (function () { + try { + var func = getNative(Object, 'defineProperty'); + func({}, '', {}); + return func; + } catch (e) {} + })(); + + /** Mocked built-ins. */ + var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout, + ctxNow = Date && Date.now !== root.Date.now && Date.now, + ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout; + + /* Built-in method references for those with the same name as other `lodash` methods. */ + var nativeCeil = Math.ceil, + nativeFloor = Math.floor, + nativeGetSymbols = Object.getOwnPropertySymbols, + nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined, + nativeIsFinite = context.isFinite, + nativeJoin = arrayProto.join, + nativeKeys = overArg(Object.keys, Object), + nativeMax = Math.max, + nativeMin = Math.min, + nativeNow = Date.now, + nativeParseInt = context.parseInt, + nativeRandom = Math.random, + nativeReverse = arrayProto.reverse; + + /* Built-in method references that are verified to be native. */ + var DataView = getNative(context, 'DataView'), + Map = getNative(context, 'Map'), + Promise = getNative(context, 'Promise'), + Set = getNative(context, 'Set'), + WeakMap = getNative(context, 'WeakMap'), + nativeCreate = getNative(Object, 'create'); + + /** Used to store function metadata. */ + var metaMap = WeakMap && new WeakMap(); + + /** Used to lookup unminified function names. */ + var realNames = {}; + + /** Used to detect maps, sets, and weakmaps. */ + var dataViewCtorString = toSource(DataView), + mapCtorString = toSource(Map), + promiseCtorString = toSource(Promise), + setCtorString = toSource(Set), + weakMapCtorString = toSource(WeakMap); + + /** Used to convert symbols to primitives and strings. */ + var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolValueOf = symbolProto ? symbolProto.valueOf : undefined, + symbolToString = symbolProto ? symbolProto.toString : undefined; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a `lodash` object which wraps `value` to enable implicit method + * chain sequences. Methods that operate on and return arrays, collections, + * and functions can be chained together. Methods that retrieve a single value + * or may return a primitive value will automatically end the chain sequence + * and return the unwrapped value. Otherwise, the value must be unwrapped + * with `_#value`. + * + * Explicit chain sequences, which must be unwrapped with `_#value`, may be + * enabled using `_.chain`. + * + * The execution of chained methods is lazy, that is, it's deferred until + * `_#value` is implicitly or explicitly called. + * + * Lazy evaluation allows several methods to support shortcut fusion. + * Shortcut fusion is an optimization to merge iteratee calls; this avoids + * the creation of intermediate arrays and can greatly reduce the number of + * iteratee executions. Sections of a chain sequence qualify for shortcut + * fusion if the section is applied to an array and iteratees accept only + * one argument. The heuristic for whether a section qualifies for shortcut + * fusion is subject to change. + * + * Chaining is supported in custom builds as long as the `_#value` method is + * directly or indirectly included in the build. + * + * In addition to lodash methods, wrappers have `Array` and `String` methods. + * + * The wrapper `Array` methods are: + * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift` + * + * The wrapper `String` methods are: + * `replace` and `split` + * + * The wrapper methods that support shortcut fusion are: + * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`, + * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`, + * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray` + * + * The chainable wrapper methods are: + * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`, + * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`, + * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`, + * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`, + * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`, + * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`, + * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`, + * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`, + * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`, + * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`, + * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`, + * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`, + * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`, + * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`, + * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`, + * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`, + * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`, + * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`, + * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`, + * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`, + * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`, + * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`, + * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`, + * `zipObject`, `zipObjectDeep`, and `zipWith` + * + * The wrapper methods that are **not** chainable by default are: + * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`, + * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`, + * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`, + * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`, + * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`, + * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`, + * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`, + * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`, + * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`, + * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`, + * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`, + * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`, + * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`, + * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`, + * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`, + * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`, + * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`, + * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`, + * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`, + * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`, + * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`, + * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`, + * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`, + * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`, + * `upperFirst`, `value`, and `words` + * + * @name _ + * @constructor + * @category Seq + * @param {*} value The value to wrap in a `lodash` instance. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * function square(n) { + * return n * n; + * } + * + * var wrapped = _([1, 2, 3]); + * + * // Returns an unwrapped value. + * wrapped.reduce(_.add); + * // => 6 + * + * // Returns a wrapped value. + * var squares = wrapped.map(square); + * + * _.isArray(squares); + * // => false + * + * _.isArray(squares.value()); + * // => true + */ + function lodash(value) { + if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) { + if (value instanceof LodashWrapper) { + return value; + } + if (hasOwnProperty.call(value, '__wrapped__')) { + return wrapperClone(value); + } + } + return new LodashWrapper(value); + } + + /** + * The base implementation of `_.create` without support for assigning + * properties to the created object. + * + * @private + * @param {Object} proto The object to inherit from. + * @returns {Object} Returns the new object. + */ + var baseCreate = (function () { + function object() {} + return function (proto) { + if (!isObject(proto)) { + return {}; + } + if (objectCreate) { + return objectCreate(proto); + } + object.prototype = proto; + var result = new object(); + object.prototype = undefined; + return result; + }; + })(); + + /** + * The function whose prototype chain sequence wrappers inherit from. + * + * @private + */ + function baseLodash() { + // No operation performed. + } + + /** + * The base constructor for creating `lodash` wrapper objects. + * + * @private + * @param {*} value The value to wrap. + * @param {boolean} [chainAll] Enable explicit method chain sequences. + */ + function LodashWrapper(value, chainAll) { + this.__wrapped__ = value; + this.__actions__ = []; + this.__chain__ = !!chainAll; + this.__index__ = 0; + this.__values__ = undefined; + } + + /** + * By default, the template delimiters used by lodash are like those in + * embedded Ruby (ERB) as well as ES2015 template strings. Change the + * following template settings to use alternative delimiters. + * + * @static + * @memberOf _ + * @type {Object} + */ + lodash.templateSettings = { + /** + * Used to detect `data` property values to be HTML-escaped. + * + * @memberOf _.templateSettings + * @type {RegExp} + */ + escape: reEscape, + + /** + * Used to detect code to be evaluated. + * + * @memberOf _.templateSettings + * @type {RegExp} + */ + evaluate: reEvaluate, + + /** + * Used to detect `data` property values to inject. + * + * @memberOf _.templateSettings + * @type {RegExp} + */ + interpolate: reInterpolate, + + /** + * Used to reference the data object in the template text. + * + * @memberOf _.templateSettings + * @type {string} + */ + variable: '', + + /** + * Used to import variables into the compiled template. + * + * @memberOf _.templateSettings + * @type {Object} + */ + imports: { + /** + * A reference to the `lodash` function. + * + * @memberOf _.templateSettings.imports + * @type {Function} + */ + _: lodash, + }, + }; + + // Ensure wrappers are instances of `baseLodash`. + lodash.prototype = baseLodash.prototype; + lodash.prototype.constructor = lodash; + + LodashWrapper.prototype = baseCreate(baseLodash.prototype); + LodashWrapper.prototype.constructor = LodashWrapper; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation. + * + * @private + * @constructor + * @param {*} value The value to wrap. + */ + function LazyWrapper(value) { + this.__wrapped__ = value; + this.__actions__ = []; + this.__dir__ = 1; + this.__filtered__ = false; + this.__iteratees__ = []; + this.__takeCount__ = MAX_ARRAY_LENGTH; + this.__views__ = []; + } + + /** + * Creates a clone of the lazy wrapper object. + * + * @private + * @name clone + * @memberOf LazyWrapper + * @returns {Object} Returns the cloned `LazyWrapper` object. + */ + function lazyClone() { + var result = new LazyWrapper(this.__wrapped__); + result.__actions__ = copyArray(this.__actions__); + result.__dir__ = this.__dir__; + result.__filtered__ = this.__filtered__; + result.__iteratees__ = copyArray(this.__iteratees__); + result.__takeCount__ = this.__takeCount__; + result.__views__ = copyArray(this.__views__); + return result; + } + + /** + * Reverses the direction of lazy iteration. + * + * @private + * @name reverse + * @memberOf LazyWrapper + * @returns {Object} Returns the new reversed `LazyWrapper` object. + */ + function lazyReverse() { + if (this.__filtered__) { + var result = new LazyWrapper(this); + result.__dir__ = -1; + result.__filtered__ = true; + } else { + result = this.clone(); + result.__dir__ *= -1; + } + return result; + } + + /** + * Extracts the unwrapped value from its lazy wrapper. + * + * @private + * @name value + * @memberOf LazyWrapper + * @returns {*} Returns the unwrapped value. + */ + function lazyValue() { + var array = this.__wrapped__.value(), + dir = this.__dir__, + isArr = isArray(array), + isRight = dir < 0, + arrLength = isArr ? array.length : 0, + view = getView(0, arrLength, this.__views__), + start = view.start, + end = view.end, + length = end - start, + index = isRight ? end : start - 1, + iteratees = this.__iteratees__, + iterLength = iteratees.length, + resIndex = 0, + takeCount = nativeMin(length, this.__takeCount__); + + if (!isArr || (!isRight && arrLength == length && takeCount == length)) { + return baseWrapperValue(array, this.__actions__); + } + var result = []; + + outer: while (length-- && resIndex < takeCount) { + index += dir; + + var iterIndex = -1, + value = array[index]; + + while (++iterIndex < iterLength) { + var data = iteratees[iterIndex], + iteratee = data.iteratee, + type = data.type, + computed = iteratee(value); + + if (type == LAZY_MAP_FLAG) { + value = computed; + } else if (!computed) { + if (type == LAZY_FILTER_FLAG) { + continue outer; + } else { + break outer; + } + } + } + result[resIndex++] = value; + } + return result; + } + + // Ensure `LazyWrapper` is an instance of `baseLodash`. + LazyWrapper.prototype = baseCreate(baseLodash.prototype); + LazyWrapper.prototype.constructor = LazyWrapper; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a hash object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function Hash(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + + /** + * Removes all key-value entries from the hash. + * + * @private + * @name clear + * @memberOf Hash + */ + function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; + this.size = 0; + } + + /** + * Removes `key` and its value from the hash. + * + * @private + * @name delete + * @memberOf Hash + * @param {Object} hash The hash to modify. + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function hashDelete(key) { + var result = this.has(key) && delete this.__data__[key]; + this.size -= result ? 1 : 0; + return result; + } + + /** + * Gets the hash value for `key`. + * + * @private + * @name get + * @memberOf Hash + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function hashGet(key) { + var data = this.__data__; + if (nativeCreate) { + var result = data[key]; + return result === HASH_UNDEFINED ? undefined : result; + } + return hasOwnProperty.call(data, key) ? data[key] : undefined; + } + + /** + * Checks if a hash value for `key` exists. + * + * @private + * @name has + * @memberOf Hash + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function hashHas(key) { + var data = this.__data__; + return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key); + } + + /** + * Sets the hash `key` to `value`. + * + * @private + * @name set + * @memberOf Hash + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the hash instance. + */ + function hashSet(key, value) { + var data = this.__data__; + this.size += this.has(key) ? 0 : 1; + data[key] = nativeCreate && value === undefined ? HASH_UNDEFINED : value; + return this; + } + + // Add methods to `Hash`. + Hash.prototype.clear = hashClear; + Hash.prototype['delete'] = hashDelete; + Hash.prototype.get = hashGet; + Hash.prototype.has = hashHas; + Hash.prototype.set = hashSet; + + /*------------------------------------------------------------------------*/ + + /** + * Creates an list cache object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function ListCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + + /** + * Removes all key-value entries from the list cache. + * + * @private + * @name clear + * @memberOf ListCache + */ + function listCacheClear() { + this.__data__ = []; + this.size = 0; + } + + /** + * Removes `key` and its value from the list cache. + * + * @private + * @name delete + * @memberOf ListCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function listCacheDelete(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + return false; + } + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + --this.size; + return true; + } + + /** + * Gets the list cache value for `key`. + * + * @private + * @name get + * @memberOf ListCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function listCacheGet(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + return index < 0 ? undefined : data[index][1]; + } + + /** + * Checks if a list cache value for `key` exists. + * + * @private + * @name has + * @memberOf ListCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; + } + + /** + * Sets the list cache `key` to `value`. + * + * @private + * @name set + * @memberOf ListCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the list cache instance. + */ + function listCacheSet(key, value) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + ++this.size; + data.push([key, value]); + } else { + data[index][1] = value; + } + return this; + } + + // Add methods to `ListCache`. + ListCache.prototype.clear = listCacheClear; + ListCache.prototype['delete'] = listCacheDelete; + ListCache.prototype.get = listCacheGet; + ListCache.prototype.has = listCacheHas; + ListCache.prototype.set = listCacheSet; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a map cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function MapCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + + /** + * Removes all key-value entries from the map. + * + * @private + * @name clear + * @memberOf MapCache + */ + function mapCacheClear() { + this.size = 0; + this.__data__ = { + hash: new Hash(), + map: new (Map || ListCache)(), + string: new Hash(), + }; + } + + /** + * Removes `key` and its value from the map. + * + * @private + * @name delete + * @memberOf MapCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function mapCacheDelete(key) { + var result = getMapData(this, key)['delete'](key); + this.size -= result ? 1 : 0; + return result; + } + + /** + * Gets the map value for `key`. + * + * @private + * @name get + * @memberOf MapCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function mapCacheGet(key) { + return getMapData(this, key).get(key); + } + + /** + * Checks if a map value for `key` exists. + * + * @private + * @name has + * @memberOf MapCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function mapCacheHas(key) { + return getMapData(this, key).has(key); + } + + /** + * Sets the map `key` to `value`. + * + * @private + * @name set + * @memberOf MapCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the map cache instance. + */ + function mapCacheSet(key, value) { + var data = getMapData(this, key), + size = data.size; + + data.set(key, value); + this.size += data.size == size ? 0 : 1; + return this; + } + + // Add methods to `MapCache`. + MapCache.prototype.clear = mapCacheClear; + MapCache.prototype['delete'] = mapCacheDelete; + MapCache.prototype.get = mapCacheGet; + MapCache.prototype.has = mapCacheHas; + MapCache.prototype.set = mapCacheSet; + + /*------------------------------------------------------------------------*/ + + /** + * + * Creates an array cache object to store unique values. + * + * @private + * @constructor + * @param {Array} [values] The values to cache. + */ + function SetCache(values) { + var index = -1, + length = values == null ? 0 : values.length; + + this.__data__ = new MapCache(); + while (++index < length) { + this.add(values[index]); + } + } + + /** + * Adds `value` to the array cache. + * + * @private + * @name add + * @memberOf SetCache + * @alias push + * @param {*} value The value to cache. + * @returns {Object} Returns the cache instance. + */ + function setCacheAdd(value) { + this.__data__.set(value, HASH_UNDEFINED); + return this; + } + + /** + * Checks if `value` is in the array cache. + * + * @private + * @name has + * @memberOf SetCache + * @param {*} value The value to search for. + * @returns {number} Returns `true` if `value` is found, else `false`. + */ + function setCacheHas(value) { + return this.__data__.has(value); + } + + // Add methods to `SetCache`. + SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; + SetCache.prototype.has = setCacheHas; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a stack cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function Stack(entries) { + var data = (this.__data__ = new ListCache(entries)); + this.size = data.size; + } + + /** + * Removes all key-value entries from the stack. + * + * @private + * @name clear + * @memberOf Stack + */ + function stackClear() { + this.__data__ = new ListCache(); + this.size = 0; + } + + /** + * Removes `key` and its value from the stack. + * + * @private + * @name delete + * @memberOf Stack + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function stackDelete(key) { + var data = this.__data__, + result = data['delete'](key); + + this.size = data.size; + return result; + } + + /** + * Gets the stack value for `key`. + * + * @private + * @name get + * @memberOf Stack + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function stackGet(key) { + return this.__data__.get(key); + } + + /** + * Checks if a stack value for `key` exists. + * + * @private + * @name has + * @memberOf Stack + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function stackHas(key) { + return this.__data__.has(key); + } + + /** + * Sets the stack `key` to `value`. + * + * @private + * @name set + * @memberOf Stack + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the stack cache instance. + */ + function stackSet(key, value) { + var data = this.__data__; + if (data instanceof ListCache) { + var pairs = data.__data__; + if (!Map || pairs.length < LARGE_ARRAY_SIZE - 1) { + pairs.push([key, value]); + this.size = ++data.size; + return this; + } + data = this.__data__ = new MapCache(pairs); + } + data.set(key, value); + this.size = data.size; + return this; + } + + // Add methods to `Stack`. + Stack.prototype.clear = stackClear; + Stack.prototype['delete'] = stackDelete; + Stack.prototype.get = stackGet; + Stack.prototype.has = stackHas; + Stack.prototype.set = stackSet; + + /*------------------------------------------------------------------------*/ + + /** + * Creates an array of the enumerable property names of the array-like `value`. + * + * @private + * @param {*} value The value to query. + * @param {boolean} inherited Specify returning inherited property names. + * @returns {Array} Returns the array of property names. + */ + function arrayLikeKeys(value, inherited) { + var isArr = isArray(value), + isArg = !isArr && isArguments(value), + isBuff = !isArr && !isArg && isBuffer(value), + isType = !isArr && !isArg && !isBuff && isTypedArray(value), + skipIndexes = isArr || isArg || isBuff || isType, + result = skipIndexes ? baseTimes(value.length, String) : [], + length = result.length; + + for (var key in value) { + if ( + (inherited || hasOwnProperty.call(value, key)) && + !( + skipIndexes && + // Safari 9 has enumerable `arguments.length` in strict mode. + (key == 'length' || + // Node.js 0.10 has enumerable non-index properties on buffers. + (isBuff && (key == 'offset' || key == 'parent')) || + // PhantomJS 2 has enumerable non-index properties on typed arrays. + (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) || + // Skip index properties. + isIndex(key, length)) + ) + ) { + result.push(key); + } + } + return result; + } + + /** + * A specialized version of `_.sample` for arrays. + * + * @private + * @param {Array} array The array to sample. + * @returns {*} Returns the random element. + */ + function arraySample(array) { + var length = array.length; + return length ? array[baseRandom(0, length - 1)] : undefined; + } + + /** + * A specialized version of `_.sampleSize` for arrays. + * + * @private + * @param {Array} array The array to sample. + * @param {number} n The number of elements to sample. + * @returns {Array} Returns the random elements. + */ + function arraySampleSize(array, n) { + return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length)); + } + + /** + * A specialized version of `_.shuffle` for arrays. + * + * @private + * @param {Array} array The array to shuffle. + * @returns {Array} Returns the new shuffled array. + */ + function arrayShuffle(array) { + return shuffleSelf(copyArray(array)); + } + + /** + * This function is like `assignValue` except that it doesn't assign + * `undefined` values. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ + function assignMergeValue(object, key, value) { + if ( + (value !== undefined && !eq(object[key], value)) || + (value === undefined && !(key in object)) + ) { + baseAssignValue(object, key, value); + } + } + + /** + * Assigns `value` to `key` of `object` if the existing value is not equivalent + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ + function assignValue(object, key, value) { + var objValue = object[key]; + if ( + !(hasOwnProperty.call(object, key) && eq(objValue, value)) || + (value === undefined && !(key in object)) + ) { + baseAssignValue(object, key, value); + } + } + + /** + * Gets the index at which the `key` is found in `array` of key-value pairs. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} key The key to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + return -1; + } + + /** + * Aggregates elements of `collection` on `accumulator` with keys transformed + * by `iteratee` and values set by `setter`. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} setter The function to set `accumulator` values. + * @param {Function} iteratee The iteratee to transform keys. + * @param {Object} accumulator The initial aggregated object. + * @returns {Function} Returns `accumulator`. + */ + function baseAggregator(collection, setter, iteratee, accumulator) { + baseEach(collection, function (value, key, collection) { + setter(accumulator, value, iteratee(value), collection); + }); + return accumulator; + } + + /** + * The base implementation of `_.assign` without support for multiple sources + * or `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ + function baseAssign(object, source) { + return object && copyObject(source, keys(source), object); + } + + /** + * The base implementation of `_.assignIn` without support for multiple sources + * or `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ + function baseAssignIn(object, source) { + return object && copyObject(source, keysIn(source), object); + } + + /** + * The base implementation of `assignValue` and `assignMergeValue` without + * value checks. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ + function baseAssignValue(object, key, value) { + if (key == '__proto__' && defineProperty) { + defineProperty(object, key, { + configurable: true, + enumerable: true, + value: value, + writable: true, + }); + } else { + object[key] = value; + } + } + + /** + * The base implementation of `_.at` without support for individual paths. + * + * @private + * @param {Object} object The object to iterate over. + * @param {string[]} paths The property paths to pick. + * @returns {Array} Returns the picked elements. + */ + function baseAt(object, paths) { + var index = -1, + length = paths.length, + result = Array(length), + skip = object == null; + + while (++index < length) { + result[index] = skip ? undefined : get(object, paths[index]); + } + return result; + } + + /** + * The base implementation of `_.clamp` which doesn't coerce arguments. + * + * @private + * @param {number} number The number to clamp. + * @param {number} [lower] The lower bound. + * @param {number} upper The upper bound. + * @returns {number} Returns the clamped number. + */ + function baseClamp(number, lower, upper) { + if (number === number) { + if (upper !== undefined) { + number = number <= upper ? number : upper; + } + if (lower !== undefined) { + number = number >= lower ? number : lower; + } + } + return number; + } + + /** + * The base implementation of `_.clone` and `_.cloneDeep` which tracks + * traversed objects. + * + * @private + * @param {*} value The value to clone. + * @param {boolean} bitmask The bitmask flags. + * 1 - Deep clone + * 2 - Flatten inherited properties + * 4 - Clone symbols + * @param {Function} [customizer] The function to customize cloning. + * @param {string} [key] The key of `value`. + * @param {Object} [object] The parent object of `value`. + * @param {Object} [stack] Tracks traversed objects and their clone counterparts. + * @returns {*} Returns the cloned value. + */ + function baseClone(value, bitmask, customizer, key, object, stack) { + var result, + isDeep = bitmask & CLONE_DEEP_FLAG, + isFlat = bitmask & CLONE_FLAT_FLAG, + isFull = bitmask & CLONE_SYMBOLS_FLAG; + + if (customizer) { + result = object ? customizer(value, key, object, stack) : customizer(value); + } + if (result !== undefined) { + return result; + } + if (!isObject(value)) { + return value; + } + var isArr = isArray(value); + if (isArr) { + result = initCloneArray(value); + if (!isDeep) { + return copyArray(value, result); + } + } else { + var tag = getTag(value), + isFunc = tag == funcTag || tag == genTag; + + if (isBuffer(value)) { + return cloneBuffer(value, isDeep); + } + if (tag == objectTag || tag == argsTag || (isFunc && !object)) { + result = isFlat || isFunc ? {} : initCloneObject(value); + if (!isDeep) { + return isFlat + ? copySymbolsIn(value, baseAssignIn(result, value)) + : copySymbols(value, baseAssign(result, value)); + } + } else { + if (!cloneableTags[tag]) { + return object ? value : {}; + } + result = initCloneByTag(value, tag, isDeep); + } + } + // Check for circular references and return its corresponding clone. + stack || (stack = new Stack()); + var stacked = stack.get(value); + if (stacked) { + return stacked; + } + stack.set(value, result); + + if (isSet(value)) { + value.forEach(function (subValue) { + result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack)); + }); + } else if (isMap(value)) { + value.forEach(function (subValue, key) { + result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack)); + }); + } + + var keysFunc = isFull ? (isFlat ? getAllKeysIn : getAllKeys) : isFlat ? keysIn : keys; + + var props = isArr ? undefined : keysFunc(value); + arrayEach(props || value, function (subValue, key) { + if (props) { + key = subValue; + subValue = value[key]; + } + // Recursively populate clone (susceptible to call stack limits). + assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack)); + }); + return result; + } + + /** + * The base implementation of `_.conforms` which doesn't clone `source`. + * + * @private + * @param {Object} source The object of property predicates to conform to. + * @returns {Function} Returns the new spec function. + */ + function baseConforms(source) { + var props = keys(source); + return function (object) { + return baseConformsTo(object, source, props); + }; + } + + /** + * The base implementation of `_.conformsTo` which accepts `props` to check. + * + * @private + * @param {Object} object The object to inspect. + * @param {Object} source The object of property predicates to conform to. + * @returns {boolean} Returns `true` if `object` conforms, else `false`. + */ + function baseConformsTo(object, source, props) { + var length = props.length; + if (object == null) { + return !length; + } + object = Object(object); + while (length--) { + var key = props[length], + predicate = source[key], + value = object[key]; + + if ((value === undefined && !(key in object)) || !predicate(value)) { + return false; + } + } + return true; + } + + /** + * The base implementation of `_.delay` and `_.defer` which accepts `args` + * to provide to `func`. + * + * @private + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @param {Array} args The arguments to provide to `func`. + * @returns {number|Object} Returns the timer id or timeout object. + */ + function baseDelay(func, wait, args) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + return setTimeout(function () { + func.apply(undefined, args); + }, wait); + } + + /** + * The base implementation of methods like `_.difference` without support + * for excluding multiple arrays or iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Array} values The values to exclude. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of filtered values. + */ + function baseDifference(array, values, iteratee, comparator) { + var index = -1, + includes = arrayIncludes, + isCommon = true, + length = array.length, + result = [], + valuesLength = values.length; + + if (!length) { + return result; + } + if (iteratee) { + values = arrayMap(values, baseUnary(iteratee)); + } + if (comparator) { + includes = arrayIncludesWith; + isCommon = false; + } else if (values.length >= LARGE_ARRAY_SIZE) { + includes = cacheHas; + isCommon = false; + values = new SetCache(values); + } + outer: while (++index < length) { + var value = array[index], + computed = iteratee == null ? value : iteratee(value); + + value = comparator || value !== 0 ? value : 0; + if (isCommon && computed === computed) { + var valuesIndex = valuesLength; + while (valuesIndex--) { + if (values[valuesIndex] === computed) { + continue outer; + } + } + result.push(value); + } else if (!includes(values, computed, comparator)) { + result.push(value); + } + } + return result; + } + + /** + * The base implementation of `_.forEach` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + */ + var baseEach = createBaseEach(baseForOwn); + + /** + * The base implementation of `_.forEachRight` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + */ + var baseEachRight = createBaseEach(baseForOwnRight, true); + + /** + * The base implementation of `_.every` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false` + */ + function baseEvery(collection, predicate) { + var result = true; + baseEach(collection, function (value, index, collection) { + result = !!predicate(value, index, collection); + return result; + }); + return result; + } + + /** + * The base implementation of methods like `_.max` and `_.min` which accepts a + * `comparator` to determine the extremum value. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The iteratee invoked per iteration. + * @param {Function} comparator The comparator used to compare values. + * @returns {*} Returns the extremum value. + */ + function baseExtremum(array, iteratee, comparator) { + var index = -1, + length = array.length; + + while (++index < length) { + var value = array[index], + current = iteratee(value); + + if ( + current != null && + (computed === undefined + ? current === current && !isSymbol(current) + : comparator(current, computed)) + ) { + var computed = current, + result = value; + } + } + return result; + } + + /** + * The base implementation of `_.fill` without an iteratee call guard. + * + * @private + * @param {Array} array The array to fill. + * @param {*} value The value to fill `array` with. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns `array`. + */ + function baseFill(array, value, start, end) { + var length = array.length; + + start = toInteger(start); + if (start < 0) { + start = -start > length ? 0 : length + start; + } + end = end === undefined || end > length ? length : toInteger(end); + if (end < 0) { + end += length; + } + end = start > end ? 0 : toLength(end); + while (start < end) { + array[start++] = value; + } + return array; + } + + /** + * The base implementation of `_.filter` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ + function baseFilter(collection, predicate) { + var result = []; + baseEach(collection, function (value, index, collection) { + if (predicate(value, index, collection)) { + result.push(value); + } + }); + return result; + } + + /** + * The base implementation of `_.flatten` with support for restricting flattening. + * + * @private + * @param {Array} array The array to flatten. + * @param {number} depth The maximum recursion depth. + * @param {boolean} [predicate=isFlattenable] The function invoked per iteration. + * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks. + * @param {Array} [result=[]] The initial result value. + * @returns {Array} Returns the new flattened array. + */ + function baseFlatten(array, depth, predicate, isStrict, result) { + var index = -1, + length = array.length; + + predicate || (predicate = isFlattenable); + result || (result = []); + + while (++index < length) { + var value = array[index]; + if (depth > 0 && predicate(value)) { + if (depth > 1) { + // Recursively flatten arrays (susceptible to call stack limits). + baseFlatten(value, depth - 1, predicate, isStrict, result); + } else { + arrayPush(result, value); + } + } else if (!isStrict) { + result[result.length] = value; + } + } + return result; + } + + /** + * The base implementation of `baseForOwn` which iterates over `object` + * properties returned by `keysFunc` and invokes `iteratee` for each property. + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ + var baseFor = createBaseFor(); + + /** + * This function is like `baseFor` except that it iterates over properties + * in the opposite order. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ + var baseForRight = createBaseFor(true); + + /** + * The base implementation of `_.forOwn` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ + function baseForOwn(object, iteratee) { + return object && baseFor(object, iteratee, keys); + } + + /** + * The base implementation of `_.forOwnRight` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ + function baseForOwnRight(object, iteratee) { + return object && baseForRight(object, iteratee, keys); + } + + /** + * The base implementation of `_.functions` which creates an array of + * `object` function property names filtered from `props`. + * + * @private + * @param {Object} object The object to inspect. + * @param {Array} props The property names to filter. + * @returns {Array} Returns the function names. + */ + function baseFunctions(object, props) { + return arrayFilter(props, function (key) { + return isFunction(object[key]); + }); + } + + /** + * The base implementation of `_.get` without support for default values. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @returns {*} Returns the resolved value. + */ + function baseGet(object, path) { + path = castPath(path, object); + + var index = 0, + length = path.length; + + while (object != null && index < length) { + object = object[toKey(path[index++])]; + } + return index && index == length ? object : undefined; + } + + /** + * The base implementation of `getAllKeys` and `getAllKeysIn` which uses + * `keysFunc` and `symbolsFunc` to get the enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Function} keysFunc The function to get the keys of `object`. + * @param {Function} symbolsFunc The function to get the symbols of `object`. + * @returns {Array} Returns the array of property names and symbols. + */ + function baseGetAllKeys(object, keysFunc, symbolsFunc) { + var result = keysFunc(object); + return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); + } + + /** + * The base implementation of `getTag` without fallbacks for buggy environments. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ + function baseGetTag(value) { + if (value == null) { + return value === undefined ? undefinedTag : nullTag; + } + return symToStringTag && symToStringTag in Object(value) + ? getRawTag(value) + : objectToString(value); + } + + /** + * The base implementation of `_.gt` which doesn't coerce arguments. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than `other`, + * else `false`. + */ + function baseGt(value, other) { + return value > other; + } + + /** + * The base implementation of `_.has` without support for deep paths. + * + * @private + * @param {Object} [object] The object to query. + * @param {Array|string} key The key to check. + * @returns {boolean} Returns `true` if `key` exists, else `false`. + */ + function baseHas(object, key) { + return object != null && hasOwnProperty.call(object, key); + } + + /** + * The base implementation of `_.hasIn` without support for deep paths. + * + * @private + * @param {Object} [object] The object to query. + * @param {Array|string} key The key to check. + * @returns {boolean} Returns `true` if `key` exists, else `false`. + */ + function baseHasIn(object, key) { + return object != null && key in Object(object); + } + + /** + * The base implementation of `_.inRange` which doesn't coerce arguments. + * + * @private + * @param {number} number The number to check. + * @param {number} start The start of the range. + * @param {number} end The end of the range. + * @returns {boolean} Returns `true` if `number` is in the range, else `false`. + */ + function baseInRange(number, start, end) { + return number >= nativeMin(start, end) && number < nativeMax(start, end); + } + + /** + * The base implementation of methods like `_.intersection`, without support + * for iteratee shorthands, that accepts an array of arrays to inspect. + * + * @private + * @param {Array} arrays The arrays to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of shared values. + */ + function baseIntersection(arrays, iteratee, comparator) { + var includes = comparator ? arrayIncludesWith : arrayIncludes, + length = arrays[0].length, + othLength = arrays.length, + othIndex = othLength, + caches = Array(othLength), + maxLength = Infinity, + result = []; + + while (othIndex--) { + var array = arrays[othIndex]; + if (othIndex && iteratee) { + array = arrayMap(array, baseUnary(iteratee)); + } + maxLength = nativeMin(array.length, maxLength); + caches[othIndex] = + !comparator && (iteratee || (length >= 120 && array.length >= 120)) + ? new SetCache(othIndex && array) + : undefined; + } + array = arrays[0]; + + var index = -1, + seen = caches[0]; + + outer: while (++index < length && result.length < maxLength) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + value = comparator || value !== 0 ? value : 0; + if (!(seen ? cacheHas(seen, computed) : includes(result, computed, comparator))) { + othIndex = othLength; + while (--othIndex) { + var cache = caches[othIndex]; + if ( + !(cache ? cacheHas(cache, computed) : includes(arrays[othIndex], computed, comparator)) + ) { + continue outer; + } + } + if (seen) { + seen.push(computed); + } + result.push(value); + } + } + return result; + } + + /** + * The base implementation of `_.invert` and `_.invertBy` which inverts + * `object` with values transformed by `iteratee` and set by `setter`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} setter The function to set `accumulator` values. + * @param {Function} iteratee The iteratee to transform values. + * @param {Object} accumulator The initial inverted object. + * @returns {Function} Returns `accumulator`. + */ + function baseInverter(object, setter, iteratee, accumulator) { + baseForOwn(object, function (value, key, object) { + setter(accumulator, iteratee(value), key, object); + }); + return accumulator; + } + + /** + * The base implementation of `_.invoke` without support for individual + * method arguments. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path of the method to invoke. + * @param {Array} args The arguments to invoke the method with. + * @returns {*} Returns the result of the invoked method. + */ + function baseInvoke(object, path, args) { + path = castPath(path, object); + object = parent(object, path); + var func = object == null ? object : object[toKey(last(path))]; + return func == null ? undefined : apply(func, object, args); + } + + /** + * The base implementation of `_.isArguments`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + */ + function baseIsArguments(value) { + return isObjectLike(value) && baseGetTag(value) == argsTag; + } + + /** + * The base implementation of `_.isArrayBuffer` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`. + */ + function baseIsArrayBuffer(value) { + return isObjectLike(value) && baseGetTag(value) == arrayBufferTag; + } + + /** + * The base implementation of `_.isDate` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a date object, else `false`. + */ + function baseIsDate(value) { + return isObjectLike(value) && baseGetTag(value) == dateTag; + } + + /** + * The base implementation of `_.isEqual` which supports partial comparisons + * and tracks traversed objects. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {boolean} bitmask The bitmask flags. + * 1 - Unordered comparison + * 2 - Partial comparison + * @param {Function} [customizer] The function to customize comparisons. + * @param {Object} [stack] Tracks traversed `value` and `other` objects. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + */ + function baseIsEqual(value, other, bitmask, customizer, stack) { + if (value === other) { + return true; + } + if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) { + return value !== value && other !== other; + } + return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); + } + + /** + * A specialized version of `baseIsEqual` for arrays and objects which performs + * deep comparisons and tracks traversed objects enabling objects with circular + * references to be compared. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} [stack] Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { + var objIsArr = isArray(object), + othIsArr = isArray(other), + objTag = objIsArr ? arrayTag : getTag(object), + othTag = othIsArr ? arrayTag : getTag(other); + + objTag = objTag == argsTag ? objectTag : objTag; + othTag = othTag == argsTag ? objectTag : othTag; + + var objIsObj = objTag == objectTag, + othIsObj = othTag == objectTag, + isSameTag = objTag == othTag; + + if (isSameTag && isBuffer(object)) { + if (!isBuffer(other)) { + return false; + } + objIsArr = true; + objIsObj = false; + } + if (isSameTag && !objIsObj) { + stack || (stack = new Stack()); + return objIsArr || isTypedArray(object) + ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) + : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); + } + if (!(bitmask & COMPARE_PARTIAL_FLAG)) { + var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), + othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); + + if (objIsWrapped || othIsWrapped) { + var objUnwrapped = objIsWrapped ? object.value() : object, + othUnwrapped = othIsWrapped ? other.value() : other; + + stack || (stack = new Stack()); + return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); + } + } + if (!isSameTag) { + return false; + } + stack || (stack = new Stack()); + return equalObjects(object, other, bitmask, customizer, equalFunc, stack); + } + + /** + * The base implementation of `_.isMap` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a map, else `false`. + */ + function baseIsMap(value) { + return isObjectLike(value) && getTag(value) == mapTag; + } + + /** + * The base implementation of `_.isMatch` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @param {Array} matchData The property names, values, and compare flags to match. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + */ + function baseIsMatch(object, source, matchData, customizer) { + var index = matchData.length, + length = index, + noCustomizer = !customizer; + + if (object == null) { + return !length; + } + object = Object(object); + while (index--) { + var data = matchData[index]; + if (noCustomizer && data[2] ? data[1] !== object[data[0]] : !(data[0] in object)) { + return false; + } + } + while (++index < length) { + data = matchData[index]; + var key = data[0], + objValue = object[key], + srcValue = data[1]; + + if (noCustomizer && data[2]) { + if (objValue === undefined && !(key in object)) { + return false; + } + } else { + var stack = new Stack(); + if (customizer) { + var result = customizer(objValue, srcValue, key, object, source, stack); + } + if ( + !(result === undefined + ? baseIsEqual( + srcValue, + objValue, + COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, + customizer, + stack, + ) + : result) + ) { + return false; + } + } + } + return true; + } + + /** + * The base implementation of `_.isNative` without bad shim checks. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + */ + function baseIsNative(value) { + if (!isObject(value) || isMasked(value)) { + return false; + } + var pattern = isFunction(value) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); + } + + /** + * The base implementation of `_.isRegExp` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. + */ + function baseIsRegExp(value) { + return isObjectLike(value) && baseGetTag(value) == regexpTag; + } + + /** + * The base implementation of `_.isSet` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a set, else `false`. + */ + function baseIsSet(value) { + return isObjectLike(value) && getTag(value) == setTag; + } + + /** + * The base implementation of `_.isTypedArray` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + */ + function baseIsTypedArray(value) { + return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; + } + + /** + * The base implementation of `_.iteratee`. + * + * @private + * @param {*} [value=_.identity] The value to convert to an iteratee. + * @returns {Function} Returns the iteratee. + */ + function baseIteratee(value) { + // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9. + // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details. + if (typeof value == 'function') { + return value; + } + if (value == null) { + return identity; + } + if (typeof value == 'object') { + return isArray(value) ? baseMatchesProperty(value[0], value[1]) : baseMatches(value); + } + return property(value); + } + + /** + * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + function baseKeys(object) { + if (!isPrototype(object)) { + return nativeKeys(object); + } + var result = []; + for (var key in Object(object)) { + if (hasOwnProperty.call(object, key) && key != 'constructor') { + result.push(key); + } + } + return result; + } + + /** + * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + function baseKeysIn(object) { + if (!isObject(object)) { + return nativeKeysIn(object); + } + var isProto = isPrototype(object), + result = []; + + for (var key in object) { + if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { + result.push(key); + } + } + return result; + } + + /** + * The base implementation of `_.lt` which doesn't coerce arguments. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than `other`, + * else `false`. + */ + function baseLt(value, other) { + return value < other; + } + + /** + * The base implementation of `_.map` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ + function baseMap(collection, iteratee) { + var index = -1, + result = isArrayLike(collection) ? Array(collection.length) : []; + + baseEach(collection, function (value, key, collection) { + result[++index] = iteratee(value, key, collection); + }); + return result; + } + + /** + * The base implementation of `_.matches` which doesn't clone `source`. + * + * @private + * @param {Object} source The object of property values to match. + * @returns {Function} Returns the new spec function. + */ + function baseMatches(source) { + var matchData = getMatchData(source); + if (matchData.length == 1 && matchData[0][2]) { + return matchesStrictComparable(matchData[0][0], matchData[0][1]); + } + return function (object) { + return object === source || baseIsMatch(object, source, matchData); + }; + } + + /** + * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`. + * + * @private + * @param {string} path The path of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + */ + function baseMatchesProperty(path, srcValue) { + if (isKey(path) && isStrictComparable(srcValue)) { + return matchesStrictComparable(toKey(path), srcValue); + } + return function (object) { + var objValue = get(object, path); + return objValue === undefined && objValue === srcValue + ? hasIn(object, path) + : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG); + }; + } + + /** + * The base implementation of `_.merge` without support for multiple sources. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {number} srcIndex The index of `source`. + * @param {Function} [customizer] The function to customize merged values. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + */ + function baseMerge(object, source, srcIndex, customizer, stack) { + if (object === source) { + return; + } + baseFor( + source, + function (srcValue, key) { + stack || (stack = new Stack()); + if (isObject(srcValue)) { + baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack); + } else { + var newValue = customizer + ? customizer(safeGet(object, key), srcValue, key + '', object, source, stack) + : undefined; + + if (newValue === undefined) { + newValue = srcValue; + } + assignMergeValue(object, key, newValue); + } + }, + keysIn, + ); + } + + /** + * A specialized version of `baseMerge` for arrays and objects which performs + * deep merges and tracks traversed objects enabling objects with circular + * references to be merged. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {string} key The key of the value to merge. + * @param {number} srcIndex The index of `source`. + * @param {Function} mergeFunc The function to merge values. + * @param {Function} [customizer] The function to customize assigned values. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + */ + function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) { + var objValue = safeGet(object, key), + srcValue = safeGet(source, key), + stacked = stack.get(srcValue); + + if (stacked) { + assignMergeValue(object, key, stacked); + return; + } + var newValue = customizer + ? customizer(objValue, srcValue, key + '', object, source, stack) + : undefined; + + var isCommon = newValue === undefined; + + if (isCommon) { + var isArr = isArray(srcValue), + isBuff = !isArr && isBuffer(srcValue), + isTyped = !isArr && !isBuff && isTypedArray(srcValue); + + newValue = srcValue; + if (isArr || isBuff || isTyped) { + if (isArray(objValue)) { + newValue = objValue; + } else if (isArrayLikeObject(objValue)) { + newValue = copyArray(objValue); + } else if (isBuff) { + isCommon = false; + newValue = cloneBuffer(srcValue, true); + } else if (isTyped) { + isCommon = false; + newValue = cloneTypedArray(srcValue, true); + } else { + newValue = []; + } + } else if (isPlainObject(srcValue) || isArguments(srcValue)) { + newValue = objValue; + if (isArguments(objValue)) { + newValue = toPlainObject(objValue); + } else if (!isObject(objValue) || isFunction(objValue)) { + newValue = initCloneObject(srcValue); + } + } else { + isCommon = false; + } + } + if (isCommon) { + // Recursively merge objects and arrays (susceptible to call stack limits). + stack.set(srcValue, newValue); + mergeFunc(newValue, srcValue, srcIndex, customizer, stack); + stack['delete'](srcValue); + } + assignMergeValue(object, key, newValue); + } + + /** + * The base implementation of `_.nth` which doesn't coerce arguments. + * + * @private + * @param {Array} array The array to query. + * @param {number} n The index of the element to return. + * @returns {*} Returns the nth element of `array`. + */ + function baseNth(array, n) { + var length = array.length; + if (!length) { + return; + } + n += n < 0 ? length : 0; + return isIndex(n, length) ? array[n] : undefined; + } + + /** + * The base implementation of `_.orderBy` without param guards. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by. + * @param {string[]} orders The sort orders of `iteratees`. + * @returns {Array} Returns the new sorted array. + */ + function baseOrderBy(collection, iteratees, orders) { + var index = -1; + iteratees = arrayMap(iteratees.length ? iteratees : [identity], baseUnary(getIteratee())); + + var result = baseMap(collection, function (value, key, collection) { + var criteria = arrayMap(iteratees, function (iteratee) { + return iteratee(value); + }); + return { criteria: criteria, index: ++index, value: value }; + }); + + return baseSortBy(result, function (object, other) { + return compareMultiple(object, other, orders); + }); + } + + /** + * The base implementation of `_.pick` without support for individual + * property identifiers. + * + * @private + * @param {Object} object The source object. + * @param {string[]} paths The property paths to pick. + * @returns {Object} Returns the new object. + */ + function basePick(object, paths) { + return basePickBy(object, paths, function (value, path) { + return hasIn(object, path); + }); + } + + /** + * The base implementation of `_.pickBy` without support for iteratee shorthands. + * + * @private + * @param {Object} object The source object. + * @param {string[]} paths The property paths to pick. + * @param {Function} predicate The function invoked per property. + * @returns {Object} Returns the new object. + */ + function basePickBy(object, paths, predicate) { + var index = -1, + length = paths.length, + result = {}; + + while (++index < length) { + var path = paths[index], + value = baseGet(object, path); + + if (predicate(value, path)) { + baseSet(result, castPath(path, object), value); + } + } + return result; + } + + /** + * A specialized version of `baseProperty` which supports deep paths. + * + * @private + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new accessor function. + */ + function basePropertyDeep(path) { + return function (object) { + return baseGet(object, path); + }; + } + + /** + * The base implementation of `_.pullAllBy` without support for iteratee + * shorthands. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns `array`. + */ + function basePullAll(array, values, iteratee, comparator) { + var indexOf = comparator ? baseIndexOfWith : baseIndexOf, + index = -1, + length = values.length, + seen = array; + + if (array === values) { + values = copyArray(values); + } + if (iteratee) { + seen = arrayMap(array, baseUnary(iteratee)); + } + while (++index < length) { + var fromIndex = 0, + value = values[index], + computed = iteratee ? iteratee(value) : value; + + while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) { + if (seen !== array) { + splice.call(seen, fromIndex, 1); + } + splice.call(array, fromIndex, 1); + } + } + return array; + } + + /** + * The base implementation of `_.pullAt` without support for individual + * indexes or capturing the removed elements. + * + * @private + * @param {Array} array The array to modify. + * @param {number[]} indexes The indexes of elements to remove. + * @returns {Array} Returns `array`. + */ + function basePullAt(array, indexes) { + var length = array ? indexes.length : 0, + lastIndex = length - 1; + + while (length--) { + var index = indexes[length]; + if (length == lastIndex || index !== previous) { + var previous = index; + if (isIndex(index)) { + splice.call(array, index, 1); + } else { + baseUnset(array, index); + } + } + } + return array; + } + + /** + * The base implementation of `_.random` without support for returning + * floating-point numbers. + * + * @private + * @param {number} lower The lower bound. + * @param {number} upper The upper bound. + * @returns {number} Returns the random number. + */ + function baseRandom(lower, upper) { + return lower + nativeFloor(nativeRandom() * (upper - lower + 1)); + } + + /** + * The base implementation of `_.range` and `_.rangeRight` which doesn't + * coerce arguments. + * + * @private + * @param {number} start The start of the range. + * @param {number} end The end of the range. + * @param {number} step The value to increment or decrement by. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Array} Returns the range of numbers. + */ + function baseRange(start, end, step, fromRight) { + var index = -1, + length = nativeMax(nativeCeil((end - start) / (step || 1)), 0), + result = Array(length); + + while (length--) { + result[fromRight ? length : ++index] = start; + start += step; + } + return result; + } + + /** + * The base implementation of `_.repeat` which doesn't coerce arguments. + * + * @private + * @param {string} string The string to repeat. + * @param {number} n The number of times to repeat the string. + * @returns {string} Returns the repeated string. + */ + function baseRepeat(string, n) { + var result = ''; + if (!string || n < 1 || n > MAX_SAFE_INTEGER) { + return result; + } + // Leverage the exponentiation by squaring algorithm for a faster repeat. + // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details. + do { + if (n % 2) { + result += string; + } + n = nativeFloor(n / 2); + if (n) { + string += string; + } + } while (n); + + return result; + } + + /** + * The base implementation of `_.rest` which doesn't validate or coerce arguments. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + */ + function baseRest(func, start) { + return setToString(overRest(func, start, identity), func + ''); + } + + /** + * The base implementation of `_.sample`. + * + * @private + * @param {Array|Object} collection The collection to sample. + * @returns {*} Returns the random element. + */ + function baseSample(collection) { + return arraySample(values(collection)); + } + + /** + * The base implementation of `_.sampleSize` without param guards. + * + * @private + * @param {Array|Object} collection The collection to sample. + * @param {number} n The number of elements to sample. + * @returns {Array} Returns the random elements. + */ + function baseSampleSize(collection, n) { + var array = values(collection); + return shuffleSelf(array, baseClamp(n, 0, array.length)); + } + + /** + * The base implementation of `_.set`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @param {Function} [customizer] The function to customize path creation. + * @returns {Object} Returns `object`. + */ + function baseSet(object, path, value, customizer) { + if (!isObject(object)) { + return object; + } + path = castPath(path, object); + + var index = -1, + length = path.length, + lastIndex = length - 1, + nested = object; + + while (nested != null && ++index < length) { + var key = toKey(path[index]), + newValue = value; + + if (index != lastIndex) { + var objValue = nested[key]; + newValue = customizer ? customizer(objValue, key, nested) : undefined; + if (newValue === undefined) { + newValue = isObject(objValue) ? objValue : isIndex(path[index + 1]) ? [] : {}; + } + } + assignValue(nested, key, newValue); + nested = nested[key]; + } + return object; + } + + /** + * The base implementation of `setData` without support for hot loop shorting. + * + * @private + * @param {Function} func The function to associate metadata with. + * @param {*} data The metadata. + * @returns {Function} Returns `func`. + */ + var baseSetData = !metaMap + ? identity + : function (func, data) { + metaMap.set(func, data); + return func; + }; + + /** + * The base implementation of `setToString` without support for hot loop shorting. + * + * @private + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. + */ + var baseSetToString = !defineProperty + ? identity + : function (func, string) { + return defineProperty(func, 'toString', { + configurable: true, + enumerable: false, + value: constant(string), + writable: true, + }); + }; + + /** + * The base implementation of `_.shuffle`. + * + * @private + * @param {Array|Object} collection The collection to shuffle. + * @returns {Array} Returns the new shuffled array. + */ + function baseShuffle(collection) { + return shuffleSelf(values(collection)); + } + + /** + * The base implementation of `_.slice` without an iteratee call guard. + * + * @private + * @param {Array} array The array to slice. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the slice of `array`. + */ + function baseSlice(array, start, end) { + var index = -1, + length = array.length; + + if (start < 0) { + start = -start > length ? 0 : length + start; + } + end = end > length ? length : end; + if (end < 0) { + end += length; + } + length = start > end ? 0 : (end - start) >>> 0; + start >>>= 0; + + var result = Array(length); + while (++index < length) { + result[index] = array[index + start]; + } + return result; + } + + /** + * The base implementation of `_.some` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ + function baseSome(collection, predicate) { + var result; + + baseEach(collection, function (value, index, collection) { + result = predicate(value, index, collection); + return !result; + }); + return !!result; + } + + /** + * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which + * performs a binary search of `array` to determine the index at which `value` + * should be inserted into `array` in order to maintain its sort order. + * + * @private + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {boolean} [retHighest] Specify returning the highest qualified index. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + */ + function baseSortedIndex(array, value, retHighest) { + var low = 0, + high = array == null ? low : array.length; + + if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) { + while (low < high) { + var mid = (low + high) >>> 1, + computed = array[mid]; + + if ( + computed !== null && + !isSymbol(computed) && + (retHighest ? computed <= value : computed < value) + ) { + low = mid + 1; + } else { + high = mid; + } + } + return high; + } + return baseSortedIndexBy(array, value, identity, retHighest); + } + + /** + * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy` + * which invokes `iteratee` for `value` and each element of `array` to compute + * their sort ranking. The iteratee is invoked with one argument; (value). + * + * @private + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function} iteratee The iteratee invoked per element. + * @param {boolean} [retHighest] Specify returning the highest qualified index. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + */ + function baseSortedIndexBy(array, value, iteratee, retHighest) { + value = iteratee(value); + + var low = 0, + high = array == null ? 0 : array.length, + valIsNaN = value !== value, + valIsNull = value === null, + valIsSymbol = isSymbol(value), + valIsUndefined = value === undefined; + + while (low < high) { + var mid = nativeFloor((low + high) / 2), + computed = iteratee(array[mid]), + othIsDefined = computed !== undefined, + othIsNull = computed === null, + othIsReflexive = computed === computed, + othIsSymbol = isSymbol(computed); + + if (valIsNaN) { + var setLow = retHighest || othIsReflexive; + } else if (valIsUndefined) { + setLow = othIsReflexive && (retHighest || othIsDefined); + } else if (valIsNull) { + setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull); + } else if (valIsSymbol) { + setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol); + } else if (othIsNull || othIsSymbol) { + setLow = false; + } else { + setLow = retHighest ? computed <= value : computed < value; + } + if (setLow) { + low = mid + 1; + } else { + high = mid; + } + } + return nativeMin(high, MAX_ARRAY_INDEX); + } + + /** + * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without + * support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @returns {Array} Returns the new duplicate free array. + */ + function baseSortedUniq(array, iteratee) { + var index = -1, + length = array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + if (!index || !eq(computed, seen)) { + var seen = computed; + result[resIndex++] = value === 0 ? 0 : value; + } + } + return result; + } + + /** + * The base implementation of `_.toNumber` which doesn't ensure correct + * conversions of binary, hexadecimal, or octal string values. + * + * @private + * @param {*} value The value to process. + * @returns {number} Returns the number. + */ + function baseToNumber(value) { + if (typeof value == 'number') { + return value; + } + if (isSymbol(value)) { + return NAN; + } + return +value; + } + + /** + * The base implementation of `_.toString` which doesn't convert nullish + * values to empty strings. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ + function baseToString(value) { + // Exit early for strings to avoid a performance hit in some environments. + if (typeof value == 'string') { + return value; + } + if (isArray(value)) { + // Recursively convert values (susceptible to call stack limits). + return arrayMap(value, baseToString) + ''; + } + if (isSymbol(value)) { + return symbolToString ? symbolToString.call(value) : ''; + } + var result = value + ''; + return result == '0' && 1 / value == -INFINITY ? '-0' : result; + } + + /** + * The base implementation of `_.uniqBy` without support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new duplicate free array. + */ + function baseUniq(array, iteratee, comparator) { + var index = -1, + includes = arrayIncludes, + length = array.length, + isCommon = true, + result = [], + seen = result; + + if (comparator) { + isCommon = false; + includes = arrayIncludesWith; + } else if (length >= LARGE_ARRAY_SIZE) { + var set = iteratee ? null : createSet(array); + if (set) { + return setToArray(set); + } + isCommon = false; + includes = cacheHas; + seen = new SetCache(); + } else { + seen = iteratee ? [] : result; + } + outer: while (++index < length) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + value = comparator || value !== 0 ? value : 0; + if (isCommon && computed === computed) { + var seenIndex = seen.length; + while (seenIndex--) { + if (seen[seenIndex] === computed) { + continue outer; + } + } + if (iteratee) { + seen.push(computed); + } + result.push(value); + } else if (!includes(seen, computed, comparator)) { + if (seen !== result) { + seen.push(computed); + } + result.push(value); + } + } + return result; + } + + /** + * The base implementation of `_.unset`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The property path to unset. + * @returns {boolean} Returns `true` if the property is deleted, else `false`. + */ + function baseUnset(object, path) { + path = castPath(path, object); + object = parent(object, path); + return object == null || delete object[toKey(last(path))]; + } + + /** + * The base implementation of `_.update`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to update. + * @param {Function} updater The function to produce the updated value. + * @param {Function} [customizer] The function to customize path creation. + * @returns {Object} Returns `object`. + */ + function baseUpdate(object, path, updater, customizer) { + return baseSet(object, path, updater(baseGet(object, path)), customizer); + } + + /** + * The base implementation of methods like `_.dropWhile` and `_.takeWhile` + * without support for iteratee shorthands. + * + * @private + * @param {Array} array The array to query. + * @param {Function} predicate The function invoked per iteration. + * @param {boolean} [isDrop] Specify dropping elements instead of taking them. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Array} Returns the slice of `array`. + */ + function baseWhile(array, predicate, isDrop, fromRight) { + var length = array.length, + index = fromRight ? length : -1; + + while ((fromRight ? index-- : ++index < length) && predicate(array[index], index, array)) {} + + return isDrop + ? baseSlice(array, fromRight ? 0 : index, fromRight ? index + 1 : length) + : baseSlice(array, fromRight ? index + 1 : 0, fromRight ? length : index); + } + + /** + * The base implementation of `wrapperValue` which returns the result of + * performing a sequence of actions on the unwrapped `value`, where each + * successive action is supplied the return value of the previous. + * + * @private + * @param {*} value The unwrapped value. + * @param {Array} actions Actions to perform to resolve the unwrapped value. + * @returns {*} Returns the resolved value. + */ + function baseWrapperValue(value, actions) { + var result = value; + if (result instanceof LazyWrapper) { + result = result.value(); + } + return arrayReduce( + actions, + function (result, action) { + return action.func.apply(action.thisArg, arrayPush([result], action.args)); + }, + result, + ); + } + + /** + * The base implementation of methods like `_.xor`, without support for + * iteratee shorthands, that accepts an array of arrays to inspect. + * + * @private + * @param {Array} arrays The arrays to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of values. + */ + function baseXor(arrays, iteratee, comparator) { + var length = arrays.length; + if (length < 2) { + return length ? baseUniq(arrays[0]) : []; + } + var index = -1, + result = Array(length); + + while (++index < length) { + var array = arrays[index], + othIndex = -1; + + while (++othIndex < length) { + if (othIndex != index) { + result[index] = baseDifference( + result[index] || array, + arrays[othIndex], + iteratee, + comparator, + ); + } + } + } + return baseUniq(baseFlatten(result, 1), iteratee, comparator); + } + + /** + * This base implementation of `_.zipObject` which assigns values using `assignFunc`. + * + * @private + * @param {Array} props The property identifiers. + * @param {Array} values The property values. + * @param {Function} assignFunc The function to assign values. + * @returns {Object} Returns the new object. + */ + function baseZipObject(props, values, assignFunc) { + var index = -1, + length = props.length, + valsLength = values.length, + result = {}; + + while (++index < length) { + var value = index < valsLength ? values[index] : undefined; + assignFunc(result, props[index], value); + } + return result; + } + + /** + * Casts `value` to an empty array if it's not an array like object. + * + * @private + * @param {*} value The value to inspect. + * @returns {Array|Object} Returns the cast array-like object. + */ + function castArrayLikeObject(value) { + return isArrayLikeObject(value) ? value : []; + } + + /** + * Casts `value` to `identity` if it's not a function. + * + * @private + * @param {*} value The value to inspect. + * @returns {Function} Returns cast function. + */ + function castFunction(value) { + return typeof value == 'function' ? value : identity; + } + + /** + * Casts `value` to a path array if it's not one. + * + * @private + * @param {*} value The value to inspect. + * @param {Object} [object] The object to query keys on. + * @returns {Array} Returns the cast property path array. + */ + function castPath(value, object) { + if (isArray(value)) { + return value; + } + return isKey(value, object) ? [value] : stringToPath(toString(value)); + } + + /** + * A `baseRest` alias which can be replaced with `identity` by module + * replacement plugins. + * + * @private + * @type {Function} + * @param {Function} func The function to apply a rest parameter to. + * @returns {Function} Returns the new function. + */ + var castRest = baseRest; + + /** + * Casts `array` to a slice if it's needed. + * + * @private + * @param {Array} array The array to inspect. + * @param {number} start The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the cast slice. + */ + function castSlice(array, start, end) { + var length = array.length; + end = end === undefined ? length : end; + return !start && end >= length ? array : baseSlice(array, start, end); + } + + /** + * A simple wrapper around the global [`clearTimeout`](https://mdn.io/clearTimeout). + * + * @private + * @param {number|Object} id The timer id or timeout object of the timer to clear. + */ + var clearTimeout = + ctxClearTimeout || + function (id) { + return root.clearTimeout(id); + }; + + /** + * Creates a clone of `buffer`. + * + * @private + * @param {Buffer} buffer The buffer to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Buffer} Returns the cloned buffer. + */ + function cloneBuffer(buffer, isDeep) { + if (isDeep) { + return buffer.slice(); + } + var length = buffer.length, + result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length); + + buffer.copy(result); + return result; + } + + /** + * Creates a clone of `arrayBuffer`. + * + * @private + * @param {ArrayBuffer} arrayBuffer The array buffer to clone. + * @returns {ArrayBuffer} Returns the cloned array buffer. + */ + function cloneArrayBuffer(arrayBuffer) { + var result = new arrayBuffer.constructor(arrayBuffer.byteLength); + new Uint8Array(result).set(new Uint8Array(arrayBuffer)); + return result; + } + + /** + * Creates a clone of `dataView`. + * + * @private + * @param {Object} dataView The data view to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned data view. + */ + function cloneDataView(dataView, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer; + return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); + } + + /** + * Creates a clone of `regexp`. + * + * @private + * @param {Object} regexp The regexp to clone. + * @returns {Object} Returns the cloned regexp. + */ + function cloneRegExp(regexp) { + var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); + result.lastIndex = regexp.lastIndex; + return result; + } + + /** + * Creates a clone of the `symbol` object. + * + * @private + * @param {Object} symbol The symbol object to clone. + * @returns {Object} Returns the cloned symbol object. + */ + function cloneSymbol(symbol) { + return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; + } + + /** + * Creates a clone of `typedArray`. + * + * @private + * @param {Object} typedArray The typed array to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned typed array. + */ + function cloneTypedArray(typedArray, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; + return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); + } + + /** + * Compares values to sort them in ascending order. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {number} Returns the sort order indicator for `value`. + */ + function compareAscending(value, other) { + if (value !== other) { + var valIsDefined = value !== undefined, + valIsNull = value === null, + valIsReflexive = value === value, + valIsSymbol = isSymbol(value); + + var othIsDefined = other !== undefined, + othIsNull = other === null, + othIsReflexive = other === other, + othIsSymbol = isSymbol(other); + + if ( + (!othIsNull && !othIsSymbol && !valIsSymbol && value > other) || + (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) || + (valIsNull && othIsDefined && othIsReflexive) || + (!valIsDefined && othIsReflexive) || + !valIsReflexive + ) { + return 1; + } + if ( + (!valIsNull && !valIsSymbol && !othIsSymbol && value < other) || + (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) || + (othIsNull && valIsDefined && valIsReflexive) || + (!othIsDefined && valIsReflexive) || + !othIsReflexive + ) { + return -1; + } + } + return 0; + } + + /** + * Used by `_.orderBy` to compare multiple properties of a value to another + * and stable sort them. + * + * If `orders` is unspecified, all values are sorted in ascending order. Otherwise, + * specify an order of "desc" for descending or "asc" for ascending sort order + * of corresponding values. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {boolean[]|string[]} orders The order to sort by for each property. + * @returns {number} Returns the sort order indicator for `object`. + */ + function compareMultiple(object, other, orders) { + var index = -1, + objCriteria = object.criteria, + othCriteria = other.criteria, + length = objCriteria.length, + ordersLength = orders.length; + + while (++index < length) { + var result = compareAscending(objCriteria[index], othCriteria[index]); + if (result) { + if (index >= ordersLength) { + return result; + } + var order = orders[index]; + return result * (order == 'desc' ? -1 : 1); + } + } + // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications + // that causes it, under certain circumstances, to provide the same value for + // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247 + // for more details. + // + // This also ensures a stable sort in V8 and other engines. + // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details. + return object.index - other.index; + } + + /** + * Creates an array that is the composition of partially applied arguments, + * placeholders, and provided arguments into a single array of arguments. + * + * @private + * @param {Array} args The provided arguments. + * @param {Array} partials The arguments to prepend to those provided. + * @param {Array} holders The `partials` placeholder indexes. + * @params {boolean} [isCurried] Specify composing for a curried function. + * @returns {Array} Returns the new array of composed arguments. + */ + function composeArgs(args, partials, holders, isCurried) { + var argsIndex = -1, + argsLength = args.length, + holdersLength = holders.length, + leftIndex = -1, + leftLength = partials.length, + rangeLength = nativeMax(argsLength - holdersLength, 0), + result = Array(leftLength + rangeLength), + isUncurried = !isCurried; + + while (++leftIndex < leftLength) { + result[leftIndex] = partials[leftIndex]; + } + while (++argsIndex < holdersLength) { + if (isUncurried || argsIndex < argsLength) { + result[holders[argsIndex]] = args[argsIndex]; + } + } + while (rangeLength--) { + result[leftIndex++] = args[argsIndex++]; + } + return result; + } + + /** + * This function is like `composeArgs` except that the arguments composition + * is tailored for `_.partialRight`. + * + * @private + * @param {Array} args The provided arguments. + * @param {Array} partials The arguments to append to those provided. + * @param {Array} holders The `partials` placeholder indexes. + * @params {boolean} [isCurried] Specify composing for a curried function. + * @returns {Array} Returns the new array of composed arguments. + */ + function composeArgsRight(args, partials, holders, isCurried) { + var argsIndex = -1, + argsLength = args.length, + holdersIndex = -1, + holdersLength = holders.length, + rightIndex = -1, + rightLength = partials.length, + rangeLength = nativeMax(argsLength - holdersLength, 0), + result = Array(rangeLength + rightLength), + isUncurried = !isCurried; + + while (++argsIndex < rangeLength) { + result[argsIndex] = args[argsIndex]; + } + var offset = argsIndex; + while (++rightIndex < rightLength) { + result[offset + rightIndex] = partials[rightIndex]; + } + while (++holdersIndex < holdersLength) { + if (isUncurried || argsIndex < argsLength) { + result[offset + holders[holdersIndex]] = args[argsIndex++]; + } + } + return result; + } + + /** + * Copies the values of `source` to `array`. + * + * @private + * @param {Array} source The array to copy values from. + * @param {Array} [array=[]] The array to copy values to. + * @returns {Array} Returns `array`. + */ + function copyArray(source, array) { + var index = -1, + length = source.length; + + array || (array = Array(length)); + while (++index < length) { + array[index] = source[index]; + } + return array; + } + + /** + * Copies properties of `source` to `object`. + * + * @private + * @param {Object} source The object to copy properties from. + * @param {Array} props The property identifiers to copy. + * @param {Object} [object={}] The object to copy properties to. + * @param {Function} [customizer] The function to customize copied values. + * @returns {Object} Returns `object`. + */ + function copyObject(source, props, object, customizer) { + var isNew = !object; + object || (object = {}); + + var index = -1, + length = props.length; + + while (++index < length) { + var key = props[index]; + + var newValue = customizer + ? customizer(object[key], source[key], key, object, source) + : undefined; + + if (newValue === undefined) { + newValue = source[key]; + } + if (isNew) { + baseAssignValue(object, key, newValue); + } else { + assignValue(object, key, newValue); + } + } + return object; + } + + /** + * Copies own symbols of `source` to `object`. + * + * @private + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. + */ + function copySymbols(source, object) { + return copyObject(source, getSymbols(source), object); + } + + /** + * Copies own and inherited symbols of `source` to `object`. + * + * @private + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. + */ + function copySymbolsIn(source, object) { + return copyObject(source, getSymbolsIn(source), object); + } + + /** + * Creates a function like `_.groupBy`. + * + * @private + * @param {Function} setter The function to set accumulator values. + * @param {Function} [initializer] The accumulator object initializer. + * @returns {Function} Returns the new aggregator function. + */ + function createAggregator(setter, initializer) { + return function (collection, iteratee) { + var func = isArray(collection) ? arrayAggregator : baseAggregator, + accumulator = initializer ? initializer() : {}; + + return func(collection, setter, getIteratee(iteratee, 2), accumulator); + }; + } + + /** + * Creates a function like `_.assign`. + * + * @private + * @param {Function} assigner The function to assign values. + * @returns {Function} Returns the new assigner function. + */ + function createAssigner(assigner) { + return baseRest(function (object, sources) { + var index = -1, + length = sources.length, + customizer = length > 1 ? sources[length - 1] : undefined, + guard = length > 2 ? sources[2] : undefined; + + customizer = + assigner.length > 3 && typeof customizer == 'function' ? (length--, customizer) : undefined; + + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + customizer = length < 3 ? undefined : customizer; + length = 1; + } + object = Object(object); + while (++index < length) { + var source = sources[index]; + if (source) { + assigner(object, source, index, customizer); + } + } + return object; + }); + } + + /** + * Creates a `baseEach` or `baseEachRight` function. + * + * @private + * @param {Function} eachFunc The function to iterate over a collection. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ + function createBaseEach(eachFunc, fromRight) { + return function (collection, iteratee) { + if (collection == null) { + return collection; + } + if (!isArrayLike(collection)) { + return eachFunc(collection, iteratee); + } + var length = collection.length, + index = fromRight ? length : -1, + iterable = Object(collection); + + while (fromRight ? index-- : ++index < length) { + if (iteratee(iterable[index], index, iterable) === false) { + break; + } + } + return collection; + }; + } + + /** + * Creates a base function for methods like `_.forIn` and `_.forOwn`. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ + function createBaseFor(fromRight) { + return function (object, iteratee, keysFunc) { + var index = -1, + iterable = Object(object), + props = keysFunc(object), + length = props.length; + + while (length--) { + var key = props[fromRight ? length : ++index]; + if (iteratee(iterable[key], key, iterable) === false) { + break; + } + } + return object; + }; + } + + /** + * Creates a function that wraps `func` to invoke it with the optional `this` + * binding of `thisArg`. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {*} [thisArg] The `this` binding of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createBind(func, bitmask, thisArg) { + var isBind = bitmask & WRAP_BIND_FLAG, + Ctor = createCtor(func); + + function wrapper() { + var fn = this && this !== root && this instanceof wrapper ? Ctor : func; + return fn.apply(isBind ? thisArg : this, arguments); + } + return wrapper; + } + + /** + * Creates a function like `_.lowerFirst`. + * + * @private + * @param {string} methodName The name of the `String` case method to use. + * @returns {Function} Returns the new case function. + */ + function createCaseFirst(methodName) { + return function (string) { + string = toString(string); + + var strSymbols = hasUnicode(string) ? stringToArray(string) : undefined; + + var chr = strSymbols ? strSymbols[0] : string.charAt(0); + + var trailing = strSymbols ? castSlice(strSymbols, 1).join('') : string.slice(1); + + return chr[methodName]() + trailing; + }; + } + + /** + * Creates a function like `_.camelCase`. + * + * @private + * @param {Function} callback The function to combine each word. + * @returns {Function} Returns the new compounder function. + */ + function createCompounder(callback) { + return function (string) { + return arrayReduce(words(deburr(string).replace(reApos, '')), callback, ''); + }; + } + + /** + * Creates a function that produces an instance of `Ctor` regardless of + * whether it was invoked as part of a `new` expression or by `call` or `apply`. + * + * @private + * @param {Function} Ctor The constructor to wrap. + * @returns {Function} Returns the new wrapped function. + */ + function createCtor(Ctor) { + return function () { + // Use a `switch` statement to work with class constructors. See + // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist + // for more details. + var args = arguments; + switch (args.length) { + case 0: + return new Ctor(); + case 1: + return new Ctor(args[0]); + case 2: + return new Ctor(args[0], args[1]); + case 3: + return new Ctor(args[0], args[1], args[2]); + case 4: + return new Ctor(args[0], args[1], args[2], args[3]); + case 5: + return new Ctor(args[0], args[1], args[2], args[3], args[4]); + case 6: + return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]); + case 7: + return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]); + } + var thisBinding = baseCreate(Ctor.prototype), + result = Ctor.apply(thisBinding, args); + + // Mimic the constructor's `return` behavior. + // See https://es5.github.io/#x13.2.2 for more details. + return isObject(result) ? result : thisBinding; + }; + } + + /** + * Creates a function that wraps `func` to enable currying. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {number} arity The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createCurry(func, bitmask, arity) { + var Ctor = createCtor(func); + + function wrapper() { + var length = arguments.length, + args = Array(length), + index = length, + placeholder = getHolder(wrapper); + + while (index--) { + args[index] = arguments[index]; + } + var holders = + length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder + ? [] + : replaceHolders(args, placeholder); + + length -= holders.length; + if (length < arity) { + return createRecurry( + func, + bitmask, + createHybrid, + wrapper.placeholder, + undefined, + args, + holders, + undefined, + undefined, + arity - length, + ); + } + var fn = this && this !== root && this instanceof wrapper ? Ctor : func; + return apply(fn, this, args); + } + return wrapper; + } + + /** + * Creates a `_.find` or `_.findLast` function. + * + * @private + * @param {Function} findIndexFunc The function to find the collection index. + * @returns {Function} Returns the new find function. + */ + function createFind(findIndexFunc) { + return function (collection, predicate, fromIndex) { + var iterable = Object(collection); + if (!isArrayLike(collection)) { + var iteratee = getIteratee(predicate, 3); + collection = keys(collection); + predicate = function (key) { + return iteratee(iterable[key], key, iterable); + }; + } + var index = findIndexFunc(collection, predicate, fromIndex); + return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined; + }; + } + + /** + * Creates a `_.flow` or `_.flowRight` function. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new flow function. + */ + function createFlow(fromRight) { + return flatRest(function (funcs) { + var length = funcs.length, + index = length, + prereq = LodashWrapper.prototype.thru; + + if (fromRight) { + funcs.reverse(); + } + while (index--) { + var func = funcs[index]; + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + if (prereq && !wrapper && getFuncName(func) == 'wrapper') { + var wrapper = new LodashWrapper([], true); + } + } + index = wrapper ? index : length; + while (++index < length) { + func = funcs[index]; + + var funcName = getFuncName(func), + data = funcName == 'wrapper' ? getData(func) : undefined; + + if ( + data && + isLaziable(data[0]) && + data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) && + !data[4].length && + data[9] == 1 + ) { + wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]); + } else { + wrapper = func.length == 1 && isLaziable(func) ? wrapper[funcName]() : wrapper.thru(func); + } + } + return function () { + var args = arguments, + value = args[0]; + + if (wrapper && args.length == 1 && isArray(value)) { + return wrapper.plant(value).value(); + } + var index = 0, + result = length ? funcs[index].apply(this, args) : value; + + while (++index < length) { + result = funcs[index].call(this, result); + } + return result; + }; + }); + } + + /** + * Creates a function that wraps `func` to invoke it with optional `this` + * binding of `thisArg`, partial application, and currying. + * + * @private + * @param {Function|string} func The function or method name to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to prepend to those provided to + * the new function. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [partialsRight] The arguments to append to those provided + * to the new function. + * @param {Array} [holdersRight] The `partialsRight` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createHybrid( + func, + bitmask, + thisArg, + partials, + holders, + partialsRight, + holdersRight, + argPos, + ary, + arity, + ) { + var isAry = bitmask & WRAP_ARY_FLAG, + isBind = bitmask & WRAP_BIND_FLAG, + isBindKey = bitmask & WRAP_BIND_KEY_FLAG, + isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG), + isFlip = bitmask & WRAP_FLIP_FLAG, + Ctor = isBindKey ? undefined : createCtor(func); + + function wrapper() { + var length = arguments.length, + args = Array(length), + index = length; + + while (index--) { + args[index] = arguments[index]; + } + if (isCurried) { + var placeholder = getHolder(wrapper), + holdersCount = countHolders(args, placeholder); + } + if (partials) { + args = composeArgs(args, partials, holders, isCurried); + } + if (partialsRight) { + args = composeArgsRight(args, partialsRight, holdersRight, isCurried); + } + length -= holdersCount; + if (isCurried && length < arity) { + var newHolders = replaceHolders(args, placeholder); + return createRecurry( + func, + bitmask, + createHybrid, + wrapper.placeholder, + thisArg, + args, + newHolders, + argPos, + ary, + arity - length, + ); + } + var thisBinding = isBind ? thisArg : this, + fn = isBindKey ? thisBinding[func] : func; + + length = args.length; + if (argPos) { + args = reorder(args, argPos); + } else if (isFlip && length > 1) { + args.reverse(); + } + if (isAry && ary < length) { + args.length = ary; + } + if (this && this !== root && this instanceof wrapper) { + fn = Ctor || createCtor(fn); + } + return fn.apply(thisBinding, args); + } + return wrapper; + } + + /** + * Creates a function like `_.invertBy`. + * + * @private + * @param {Function} setter The function to set accumulator values. + * @param {Function} toIteratee The function to resolve iteratees. + * @returns {Function} Returns the new inverter function. + */ + function createInverter(setter, toIteratee) { + return function (object, iteratee) { + return baseInverter(object, setter, toIteratee(iteratee), {}); + }; + } + + /** + * Creates a function that performs a mathematical operation on two values. + * + * @private + * @param {Function} operator The function to perform the operation. + * @param {number} [defaultValue] The value used for `undefined` arguments. + * @returns {Function} Returns the new mathematical operation function. + */ + function createMathOperation(operator, defaultValue) { + return function (value, other) { + var result; + if (value === undefined && other === undefined) { + return defaultValue; + } + if (value !== undefined) { + result = value; + } + if (other !== undefined) { + if (result === undefined) { + return other; + } + if (typeof value == 'string' || typeof other == 'string') { + value = baseToString(value); + other = baseToString(other); + } else { + value = baseToNumber(value); + other = baseToNumber(other); + } + result = operator(value, other); + } + return result; + }; + } + + /** + * Creates a function like `_.over`. + * + * @private + * @param {Function} arrayFunc The function to iterate over iteratees. + * @returns {Function} Returns the new over function. + */ + function createOver(arrayFunc) { + return flatRest(function (iteratees) { + iteratees = arrayMap(iteratees, baseUnary(getIteratee())); + return baseRest(function (args) { + var thisArg = this; + return arrayFunc(iteratees, function (iteratee) { + return apply(iteratee, thisArg, args); + }); + }); + }); + } + + /** + * Creates the padding for `string` based on `length`. The `chars` string + * is truncated if the number of characters exceeds `length`. + * + * @private + * @param {number} length The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padding for `string`. + */ + function createPadding(length, chars) { + chars = chars === undefined ? ' ' : baseToString(chars); + + var charsLength = chars.length; + if (charsLength < 2) { + return charsLength ? baseRepeat(chars, length) : chars; + } + var result = baseRepeat(chars, nativeCeil(length / stringSize(chars))); + return hasUnicode(chars) + ? castSlice(stringToArray(result), 0, length).join('') + : result.slice(0, length); + } + + /** + * Creates a function that wraps `func` to invoke it with the `this` binding + * of `thisArg` and `partials` prepended to the arguments it receives. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} partials The arguments to prepend to those provided to + * the new function. + * @returns {Function} Returns the new wrapped function. + */ + function createPartial(func, bitmask, thisArg, partials) { + var isBind = bitmask & WRAP_BIND_FLAG, + Ctor = createCtor(func); + + function wrapper() { + var argsIndex = -1, + argsLength = arguments.length, + leftIndex = -1, + leftLength = partials.length, + args = Array(leftLength + argsLength), + fn = this && this !== root && this instanceof wrapper ? Ctor : func; + + while (++leftIndex < leftLength) { + args[leftIndex] = partials[leftIndex]; + } + while (argsLength--) { + args[leftIndex++] = arguments[++argsIndex]; + } + return apply(fn, isBind ? thisArg : this, args); + } + return wrapper; + } + + /** + * Creates a `_.range` or `_.rangeRight` function. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new range function. + */ + function createRange(fromRight) { + return function (start, end, step) { + if (step && typeof step != 'number' && isIterateeCall(start, end, step)) { + end = step = undefined; + } + // Ensure the sign of `-0` is preserved. + start = toFinite(start); + if (end === undefined) { + end = start; + start = 0; + } else { + end = toFinite(end); + } + step = step === undefined ? (start < end ? 1 : -1) : toFinite(step); + return baseRange(start, end, step, fromRight); + }; + } + + /** + * Creates a function that performs a relational operation on two values. + * + * @private + * @param {Function} operator The function to perform the operation. + * @returns {Function} Returns the new relational operation function. + */ + function createRelationalOperation(operator) { + return function (value, other) { + if (!(typeof value == 'string' && typeof other == 'string')) { + value = toNumber(value); + other = toNumber(other); + } + return operator(value, other); + }; + } + + /** + * Creates a function that wraps `func` to continue currying. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {Function} wrapFunc The function to create the `func` wrapper. + * @param {*} placeholder The placeholder value. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to prepend to those provided to + * the new function. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createRecurry( + func, + bitmask, + wrapFunc, + placeholder, + thisArg, + partials, + holders, + argPos, + ary, + arity, + ) { + var isCurry = bitmask & WRAP_CURRY_FLAG, + newHolders = isCurry ? holders : undefined, + newHoldersRight = isCurry ? undefined : holders, + newPartials = isCurry ? partials : undefined, + newPartialsRight = isCurry ? undefined : partials; + + bitmask |= isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG; + bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG); + + if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) { + bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG); + } + var newData = [ + func, + bitmask, + thisArg, + newPartials, + newHolders, + newPartialsRight, + newHoldersRight, + argPos, + ary, + arity, + ]; + + var result = wrapFunc.apply(undefined, newData); + if (isLaziable(func)) { + setData(result, newData); + } + result.placeholder = placeholder; + return setWrapToString(result, func, bitmask); + } + + /** + * Creates a function like `_.round`. + * + * @private + * @param {string} methodName The name of the `Math` method to use when rounding. + * @returns {Function} Returns the new round function. + */ + function createRound(methodName) { + var func = Math[methodName]; + return function (number, precision) { + number = toNumber(number); + precision = precision == null ? 0 : nativeMin(toInteger(precision), 292); + if (precision && nativeIsFinite(number)) { + // Shift with exponential notation to avoid floating-point issues. + // See [MDN](https://mdn.io/round#Examples) for more details. + var pair = (toString(number) + 'e').split('e'), + value = func(pair[0] + 'e' + (+pair[1] + precision)); + + pair = (toString(value) + 'e').split('e'); + return +(pair[0] + 'e' + (+pair[1] - precision)); + } + return func(number); + }; + } + + /** + * Creates a set object of `values`. + * + * @private + * @param {Array} values The values to add to the set. + * @returns {Object} Returns the new set. + */ + var createSet = !(Set && 1 / setToArray(new Set([, -0]))[1] == INFINITY) + ? noop + : function (values) { + return new Set(values); + }; + + /** + * Creates a `_.toPairs` or `_.toPairsIn` function. + * + * @private + * @param {Function} keysFunc The function to get the keys of a given object. + * @returns {Function} Returns the new pairs function. + */ + function createToPairs(keysFunc) { + return function (object) { + var tag = getTag(object); + if (tag == mapTag) { + return mapToArray(object); + } + if (tag == setTag) { + return setToPairs(object); + } + return baseToPairs(object, keysFunc(object)); + }; + } + + /** + * Creates a function that either curries or invokes `func` with optional + * `this` binding and partially applied arguments. + * + * @private + * @param {Function|string} func The function or method name to wrap. + * @param {number} bitmask The bitmask flags. + * 1 - `_.bind` + * 2 - `_.bindKey` + * 4 - `_.curry` or `_.curryRight` of a bound function + * 8 - `_.curry` + * 16 - `_.curryRight` + * 32 - `_.partial` + * 64 - `_.partialRight` + * 128 - `_.rearg` + * 256 - `_.ary` + * 512 - `_.flip` + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to be partially applied. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) { + var isBindKey = bitmask & WRAP_BIND_KEY_FLAG; + if (!isBindKey && typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + var length = partials ? partials.length : 0; + if (!length) { + bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG); + partials = holders = undefined; + } + ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0); + arity = arity === undefined ? arity : toInteger(arity); + length -= holders ? holders.length : 0; + + if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) { + var partialsRight = partials, + holdersRight = holders; + + partials = holders = undefined; + } + var data = isBindKey ? undefined : getData(func); + + var newData = [ + func, + bitmask, + thisArg, + partials, + holders, + partialsRight, + holdersRight, + argPos, + ary, + arity, + ]; + + if (data) { + mergeData(newData, data); + } + func = newData[0]; + bitmask = newData[1]; + thisArg = newData[2]; + partials = newData[3]; + holders = newData[4]; + arity = newData[9] = + newData[9] === undefined ? (isBindKey ? 0 : func.length) : nativeMax(newData[9] - length, 0); + + if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) { + bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG); + } + if (!bitmask || bitmask == WRAP_BIND_FLAG) { + var result = createBind(func, bitmask, thisArg); + } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) { + result = createCurry(func, bitmask, arity); + } else if ( + (bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && + !holders.length + ) { + result = createPartial(func, bitmask, thisArg, partials); + } else { + result = createHybrid.apply(undefined, newData); + } + var setter = data ? baseSetData : setData; + return setWrapToString(setter(result, newData), func, bitmask); + } + + /** + * Used by `_.defaults` to customize its `_.assignIn` use to assign properties + * of source objects to the destination object for all destination properties + * that resolve to `undefined`. + * + * @private + * @param {*} objValue The destination value. + * @param {*} srcValue The source value. + * @param {string} key The key of the property to assign. + * @param {Object} object The parent object of `objValue`. + * @returns {*} Returns the value to assign. + */ + function customDefaultsAssignIn(objValue, srcValue, key, object) { + if ( + objValue === undefined || + (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key)) + ) { + return srcValue; + } + return objValue; + } + + /** + * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source + * objects into destination objects that are passed thru. + * + * @private + * @param {*} objValue The destination value. + * @param {*} srcValue The source value. + * @param {string} key The key of the property to merge. + * @param {Object} object The parent object of `objValue`. + * @param {Object} source The parent object of `srcValue`. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + * @returns {*} Returns the value to assign. + */ + function customDefaultsMerge(objValue, srcValue, key, object, source, stack) { + if (isObject(objValue) && isObject(srcValue)) { + // Recursively merge objects and arrays (susceptible to call stack limits). + stack.set(srcValue, objValue); + baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack); + stack['delete'](srcValue); + } + return objValue; + } + + /** + * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain + * objects. + * + * @private + * @param {*} value The value to inspect. + * @param {string} key The key of the property to inspect. + * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`. + */ + function customOmitClone(value) { + return isPlainObject(value) ? undefined : value; + } + + /** + * A specialized version of `baseIsEqualDeep` for arrays with support for + * partial deep comparisons. + * + * @private + * @param {Array} array The array to compare. + * @param {Array} other The other array to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `array` and `other` objects. + * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. + */ + function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + arrLength = array.length, + othLength = other.length; + + if (arrLength != othLength && !(isPartial && othLength > arrLength)) { + return false; + } + // Assume cyclic values are equal. + var stacked = stack.get(array); + if (stacked && stack.get(other)) { + return stacked == other; + } + var index = -1, + result = true, + seen = bitmask & COMPARE_UNORDERED_FLAG ? new SetCache() : undefined; + + stack.set(array, other); + stack.set(other, array); + + // Ignore non-index properties. + while (++index < arrLength) { + var arrValue = array[index], + othValue = other[index]; + + if (customizer) { + var compared = isPartial + ? customizer(othValue, arrValue, index, other, array, stack) + : customizer(arrValue, othValue, index, array, other, stack); + } + if (compared !== undefined) { + if (compared) { + continue; + } + result = false; + break; + } + // Recursively compare arrays (susceptible to call stack limits). + if (seen) { + if ( + !arraySome(other, function (othValue, othIndex) { + if ( + !cacheHas(seen, othIndex) && + (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack)) + ) { + return seen.push(othIndex); + } + }) + ) { + result = false; + break; + } + } else if ( + !(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack)) + ) { + result = false; + break; + } + } + stack['delete'](array); + stack['delete'](other); + return result; + } + + /** + * A specialized version of `baseIsEqualDeep` for comparing objects of + * the same `toStringTag`. + * + * **Note:** This function only supports comparing values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {string} tag The `toStringTag` of the objects to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { + switch (tag) { + case dataViewTag: + if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) { + return false; + } + object = object.buffer; + other = other.buffer; + + case arrayBufferTag: + if ( + object.byteLength != other.byteLength || + !equalFunc(new Uint8Array(object), new Uint8Array(other)) + ) { + return false; + } + return true; + + case boolTag: + case dateTag: + case numberTag: + // Coerce booleans to `1` or `0` and dates to milliseconds. + // Invalid dates are coerced to `NaN`. + return eq(+object, +other); + + case errorTag: + return object.name == other.name && object.message == other.message; + + case regexpTag: + case stringTag: + // Coerce regexes to strings and treat strings, primitives and objects, + // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring + // for more details. + return object == other + ''; + + case mapTag: + var convert = mapToArray; + + case setTag: + var isPartial = bitmask & COMPARE_PARTIAL_FLAG; + convert || (convert = setToArray); + + if (object.size != other.size && !isPartial) { + return false; + } + // Assume cyclic values are equal. + var stacked = stack.get(object); + if (stacked) { + return stacked == other; + } + bitmask |= COMPARE_UNORDERED_FLAG; + + // Recursively compare objects (susceptible to call stack limits). + stack.set(object, other); + var result = equalArrays( + convert(object), + convert(other), + bitmask, + customizer, + equalFunc, + stack, + ); + stack['delete'](object); + return result; + + case symbolTag: + if (symbolValueOf) { + return symbolValueOf.call(object) == symbolValueOf.call(other); + } + } + return false; + } + + /** + * A specialized version of `baseIsEqualDeep` for objects with support for + * partial deep comparisons. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + objProps = getAllKeys(object), + objLength = objProps.length, + othProps = getAllKeys(other), + othLength = othProps.length; + + if (objLength != othLength && !isPartial) { + return false; + } + var index = objLength; + while (index--) { + var key = objProps[index]; + if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { + return false; + } + } + // Assume cyclic values are equal. + var stacked = stack.get(object); + if (stacked && stack.get(other)) { + return stacked == other; + } + var result = true; + stack.set(object, other); + stack.set(other, object); + + var skipCtor = isPartial; + while (++index < objLength) { + key = objProps[index]; + var objValue = object[key], + othValue = other[key]; + + if (customizer) { + var compared = isPartial + ? customizer(othValue, objValue, key, other, object, stack) + : customizer(objValue, othValue, key, object, other, stack); + } + // Recursively compare objects (susceptible to call stack limits). + if ( + !(compared === undefined + ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) + : compared) + ) { + result = false; + break; + } + skipCtor || (skipCtor = key == 'constructor'); + } + if (result && !skipCtor) { + var objCtor = object.constructor, + othCtor = other.constructor; + + // Non `Object` object instances with different constructors are not equal. + if ( + objCtor != othCtor && + 'constructor' in object && + 'constructor' in other && + !( + typeof objCtor == 'function' && + objCtor instanceof objCtor && + typeof othCtor == 'function' && + othCtor instanceof othCtor + ) + ) { + result = false; + } + } + stack['delete'](object); + stack['delete'](other); + return result; + } + + /** + * A specialized version of `baseRest` which flattens the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @returns {Function} Returns the new function. + */ + function flatRest(func) { + return setToString(overRest(func, undefined, flatten), func + ''); + } + + /** + * Creates an array of own enumerable property names and symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ + function getAllKeys(object) { + return baseGetAllKeys(object, keys, getSymbols); + } + + /** + * Creates an array of own and inherited enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ + function getAllKeysIn(object) { + return baseGetAllKeys(object, keysIn, getSymbolsIn); + } + + /** + * Gets metadata for `func`. + * + * @private + * @param {Function} func The function to query. + * @returns {*} Returns the metadata for `func`. + */ + var getData = !metaMap + ? noop + : function (func) { + return metaMap.get(func); + }; + + /** + * Gets the name of `func`. + * + * @private + * @param {Function} func The function to query. + * @returns {string} Returns the function name. + */ + function getFuncName(func) { + var result = func.name + '', + array = realNames[result], + length = hasOwnProperty.call(realNames, result) ? array.length : 0; + + while (length--) { + var data = array[length], + otherFunc = data.func; + if (otherFunc == null || otherFunc == func) { + return data.name; + } + } + return result; + } + + /** + * Gets the argument placeholder value for `func`. + * + * @private + * @param {Function} func The function to inspect. + * @returns {*} Returns the placeholder value. + */ + function getHolder(func) { + var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func; + return object.placeholder; + } + + /** + * Gets the appropriate "iteratee" function. If `_.iteratee` is customized, + * this function returns the custom method, otherwise it returns `baseIteratee`. + * If arguments are provided, the chosen function is invoked with them and + * its result is returned. + * + * @private + * @param {*} [value] The value to convert to an iteratee. + * @param {number} [arity] The arity of the created iteratee. + * @returns {Function} Returns the chosen function or its result. + */ + function getIteratee() { + var result = lodash.iteratee || iteratee; + result = result === iteratee ? baseIteratee : result; + return arguments.length ? result(arguments[0], arguments[1]) : result; + } + + /** + * Gets the data for `map`. + * + * @private + * @param {Object} map The map to query. + * @param {string} key The reference key. + * @returns {*} Returns the map data. + */ + function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) ? data[typeof key == 'string' ? 'string' : 'hash'] : data.map; + } + + /** + * Gets the property names, values, and compare flags of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the match data of `object`. + */ + function getMatchData(object) { + var result = keys(object), + length = result.length; + + while (length--) { + var key = result[length], + value = object[key]; + + result[length] = [key, value, isStrictComparable(value)]; + } + return result; + } + + /** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ + function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : undefined; + } + + /** + * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the raw `toStringTag`. + */ + function getRawTag(value) { + var isOwn = hasOwnProperty.call(value, symToStringTag), + tag = value[symToStringTag]; + + try { + value[symToStringTag] = undefined; + var unmasked = true; + } catch (e) {} + + var result = nativeObjectToString.call(value); + if (unmasked) { + if (isOwn) { + value[symToStringTag] = tag; + } else { + delete value[symToStringTag]; + } + } + return result; + } + + /** + * Creates an array of the own enumerable symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ + var getSymbols = !nativeGetSymbols + ? stubArray + : function (object) { + if (object == null) { + return []; + } + object = Object(object); + return arrayFilter(nativeGetSymbols(object), function (symbol) { + return propertyIsEnumerable.call(object, symbol); + }); + }; + + /** + * Creates an array of the own and inherited enumerable symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ + var getSymbolsIn = !nativeGetSymbols + ? stubArray + : function (object) { + var result = []; + while (object) { + arrayPush(result, getSymbols(object)); + object = getPrototype(object); + } + return result; + }; + + /** + * Gets the `toStringTag` of `value`. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ + var getTag = baseGetTag; + + // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6. + if ( + (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || + (Map && getTag(new Map()) != mapTag) || + (Promise && getTag(Promise.resolve()) != promiseTag) || + (Set && getTag(new Set()) != setTag) || + (WeakMap && getTag(new WeakMap()) != weakMapTag) + ) { + getTag = function (value) { + var result = baseGetTag(value), + Ctor = result == objectTag ? value.constructor : undefined, + ctorString = Ctor ? toSource(Ctor) : ''; + + if (ctorString) { + switch (ctorString) { + case dataViewCtorString: + return dataViewTag; + case mapCtorString: + return mapTag; + case promiseCtorString: + return promiseTag; + case setCtorString: + return setTag; + case weakMapCtorString: + return weakMapTag; + } + } + return result; + }; + } + + /** + * Gets the view, applying any `transforms` to the `start` and `end` positions. + * + * @private + * @param {number} start The start of the view. + * @param {number} end The end of the view. + * @param {Array} transforms The transformations to apply to the view. + * @returns {Object} Returns an object containing the `start` and `end` + * positions of the view. + */ + function getView(start, end, transforms) { + var index = -1, + length = transforms.length; + + while (++index < length) { + var data = transforms[index], + size = data.size; + + switch (data.type) { + case 'drop': + start += size; + break; + case 'dropRight': + end -= size; + break; + case 'take': + end = nativeMin(end, start + size); + break; + case 'takeRight': + start = nativeMax(start, end - size); + break; + } + } + return { start: start, end: end }; + } + + /** + * Extracts wrapper details from the `source` body comment. + * + * @private + * @param {string} source The source to inspect. + * @returns {Array} Returns the wrapper details. + */ + function getWrapDetails(source) { + var match = source.match(reWrapDetails); + return match ? match[1].split(reSplitDetails) : []; + } + + /** + * Checks if `path` exists on `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @param {Function} hasFunc The function to check properties. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + */ + function hasPath(object, path, hasFunc) { + path = castPath(path, object); + + var index = -1, + length = path.length, + result = false; + + while (++index < length) { + var key = toKey(path[index]); + if (!(result = object != null && hasFunc(object, key))) { + break; + } + object = object[key]; + } + if (result || ++index != length) { + return result; + } + length = object == null ? 0 : object.length; + return ( + !!length && + isLength(length) && + isIndex(key, length) && + (isArray(object) || isArguments(object)) + ); + } + + /** + * Initializes an array clone. + * + * @private + * @param {Array} array The array to clone. + * @returns {Array} Returns the initialized clone. + */ + function initCloneArray(array) { + var length = array.length, + result = new array.constructor(length); + + // Add properties assigned by `RegExp#exec`. + if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) { + result.index = array.index; + result.input = array.input; + } + return result; + } + + /** + * Initializes an object clone. + * + * @private + * @param {Object} object The object to clone. + * @returns {Object} Returns the initialized clone. + */ + function initCloneObject(object) { + return typeof object.constructor == 'function' && !isPrototype(object) + ? baseCreate(getPrototype(object)) + : {}; + } + + /** + * Initializes an object clone based on its `toStringTag`. + * + * **Note:** This function only supports cloning values with tags of + * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`. + * + * @private + * @param {Object} object The object to clone. + * @param {string} tag The `toStringTag` of the object to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the initialized clone. + */ + function initCloneByTag(object, tag, isDeep) { + var Ctor = object.constructor; + switch (tag) { + case arrayBufferTag: + return cloneArrayBuffer(object); + + case boolTag: + case dateTag: + return new Ctor(+object); + + case dataViewTag: + return cloneDataView(object, isDeep); + + case float32Tag: + case float64Tag: + case int8Tag: + case int16Tag: + case int32Tag: + case uint8Tag: + case uint8ClampedTag: + case uint16Tag: + case uint32Tag: + return cloneTypedArray(object, isDeep); + + case mapTag: + return new Ctor(); + + case numberTag: + case stringTag: + return new Ctor(object); + + case regexpTag: + return cloneRegExp(object); + + case setTag: + return new Ctor(); + + case symbolTag: + return cloneSymbol(object); + } + } + + /** + * Inserts wrapper `details` in a comment at the top of the `source` body. + * + * @private + * @param {string} source The source to modify. + * @returns {Array} details The details to insert. + * @returns {string} Returns the modified source. + */ + function insertWrapDetails(source, details) { + var length = details.length; + if (!length) { + return source; + } + var lastIndex = length - 1; + details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex]; + details = details.join(length > 2 ? ', ' : ' '); + return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n'); + } + + /** + * Checks if `value` is a flattenable `arguments` object or array. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. + */ + function isFlattenable(value) { + return ( + isArray(value) || + isArguments(value) || + !!(spreadableSymbol && value && value[spreadableSymbol]) + ); + } + + /** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ + function isIndex(value, length) { + var type = typeof value; + length = length == null ? MAX_SAFE_INTEGER : length; + + return ( + !!length && + (type == 'number' || (type != 'symbol' && reIsUint.test(value))) && + value > -1 && + value % 1 == 0 && + value < length + ); + } + + /** + * Checks if the given arguments are from an iteratee call. + * + * @private + * @param {*} value The potential iteratee value argument. + * @param {*} index The potential iteratee index or key argument. + * @param {*} object The potential iteratee object argument. + * @returns {boolean} Returns `true` if the arguments are from an iteratee call, + * else `false`. + */ + function isIterateeCall(value, index, object) { + if (!isObject(object)) { + return false; + } + var type = typeof index; + if ( + type == 'number' + ? isArrayLike(object) && isIndex(index, object.length) + : type == 'string' && index in object + ) { + return eq(object[index], value); + } + return false; + } + + /** + * Checks if `value` is a property name and not a property path. + * + * @private + * @param {*} value The value to check. + * @param {Object} [object] The object to query keys on. + * @returns {boolean} Returns `true` if `value` is a property name, else `false`. + */ + function isKey(value, object) { + if (isArray(value)) { + return false; + } + var type = typeof value; + if ( + type == 'number' || + type == 'symbol' || + type == 'boolean' || + value == null || + isSymbol(value) + ) { + return true; + } + return ( + reIsPlainProp.test(value) || + !reIsDeepProp.test(value) || + (object != null && value in Object(object)) + ); + } + + /** + * Checks if `value` is suitable for use as unique object key. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is suitable, else `false`. + */ + function isKeyable(value) { + var type = typeof value; + return type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean' + ? value !== '__proto__' + : value === null; + } + + /** + * Checks if `func` has a lazy counterpart. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` has a lazy counterpart, + * else `false`. + */ + function isLaziable(func) { + var funcName = getFuncName(func), + other = lodash[funcName]; + + if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) { + return false; + } + if (func === other) { + return true; + } + var data = getData(other); + return !!data && func === data[0]; + } + + /** + * Checks if `func` has its source masked. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` is masked, else `false`. + */ + function isMasked(func) { + return !!maskSrcKey && maskSrcKey in func; + } + + /** + * Checks if `func` is capable of being masked. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `func` is maskable, else `false`. + */ + var isMaskable = coreJsData ? isFunction : stubFalse; + + /** + * Checks if `value` is likely a prototype object. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. + */ + function isPrototype(value) { + var Ctor = value && value.constructor, + proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; + + return value === proto; + } + + /** + * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` if suitable for strict + * equality comparisons, else `false`. + */ + function isStrictComparable(value) { + return value === value && !isObject(value); + } + + /** + * A specialized version of `matchesProperty` for source values suitable + * for strict equality comparisons, i.e. `===`. + * + * @private + * @param {string} key The key of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + */ + function matchesStrictComparable(key, srcValue) { + return function (object) { + if (object == null) { + return false; + } + return object[key] === srcValue && (srcValue !== undefined || key in Object(object)); + }; + } + + /** + * A specialized version of `_.memoize` which clears the memoized function's + * cache when it exceeds `MAX_MEMOIZE_SIZE`. + * + * @private + * @param {Function} func The function to have its output memoized. + * @returns {Function} Returns the new memoized function. + */ + function memoizeCapped(func) { + var result = memoize(func, function (key) { + if (cache.size === MAX_MEMOIZE_SIZE) { + cache.clear(); + } + return key; + }); + + var cache = result.cache; + return result; + } + + /** + * Merges the function metadata of `source` into `data`. + * + * Merging metadata reduces the number of wrappers used to invoke a function. + * This is possible because methods like `_.bind`, `_.curry`, and `_.partial` + * may be applied regardless of execution order. Methods like `_.ary` and + * `_.rearg` modify function arguments, making the order in which they are + * executed important, preventing the merging of metadata. However, we make + * an exception for a safe combined case where curried functions have `_.ary` + * and or `_.rearg` applied. + * + * @private + * @param {Array} data The destination metadata. + * @param {Array} source The source metadata. + * @returns {Array} Returns `data`. + */ + function mergeData(data, source) { + var bitmask = data[1], + srcBitmask = source[1], + newBitmask = bitmask | srcBitmask, + isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG); + + var isCombo = + (srcBitmask == WRAP_ARY_FLAG && bitmask == WRAP_CURRY_FLAG) || + (srcBitmask == WRAP_ARY_FLAG && bitmask == WRAP_REARG_FLAG && data[7].length <= source[8]) || + (srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG) && + source[7].length <= source[8] && + bitmask == WRAP_CURRY_FLAG); + + // Exit early if metadata can't be merged. + if (!(isCommon || isCombo)) { + return data; + } + // Use source `thisArg` if available. + if (srcBitmask & WRAP_BIND_FLAG) { + data[2] = source[2]; + // Set when currying a bound function. + newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG; + } + // Compose partial arguments. + var value = source[3]; + if (value) { + var partials = data[3]; + data[3] = partials ? composeArgs(partials, value, source[4]) : value; + data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4]; + } + // Compose partial right arguments. + value = source[5]; + if (value) { + partials = data[5]; + data[5] = partials ? composeArgsRight(partials, value, source[6]) : value; + data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6]; + } + // Use source `argPos` if available. + value = source[7]; + if (value) { + data[7] = value; + } + // Use source `ary` if it's smaller. + if (srcBitmask & WRAP_ARY_FLAG) { + data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]); + } + // Use source `arity` if one is not provided. + if (data[9] == null) { + data[9] = source[9]; + } + // Use source `func` and merge bitmasks. + data[0] = source[0]; + data[1] = newBitmask; + + return data; + } + + /** + * This function is like + * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * except that it includes inherited enumerable properties. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + function nativeKeysIn(object) { + var result = []; + if (object != null) { + for (var key in Object(object)) { + result.push(key); + } + } + return result; + } + + /** + * Converts `value` to a string using `Object.prototype.toString`. + * + * @private + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + */ + function objectToString(value) { + return nativeObjectToString.call(value); + } + + /** + * A specialized version of `baseRest` which transforms the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @param {Function} transform The rest array transform. + * @returns {Function} Returns the new function. + */ + function overRest(func, start, transform) { + start = nativeMax(start === undefined ? func.length - 1 : start, 0); + return function () { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + array = Array(length); + + while (++index < length) { + array[index] = args[start + index]; + } + index = -1; + var otherArgs = Array(start + 1); + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = transform(array); + return apply(func, this, otherArgs); + }; + } + + /** + * Gets the parent value at `path` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} path The path to get the parent value of. + * @returns {*} Returns the parent value. + */ + function parent(object, path) { + return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1)); + } + + /** + * Reorder `array` according to the specified indexes where the element at + * the first index is assigned as the first element, the element at + * the second index is assigned as the second element, and so on. + * + * @private + * @param {Array} array The array to reorder. + * @param {Array} indexes The arranged array indexes. + * @returns {Array} Returns `array`. + */ + function reorder(array, indexes) { + var arrLength = array.length, + length = nativeMin(indexes.length, arrLength), + oldArray = copyArray(array); + + while (length--) { + var index = indexes[length]; + array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined; + } + return array; + } + + /** + * Gets the value at `key`, unless `key` is "__proto__" or "constructor". + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ + function safeGet(object, key) { + if (key === 'constructor' && typeof object[key] === 'function') { + return; + } + + if (key == '__proto__') { + return; + } + + return object[key]; + } + + /** + * Sets metadata for `func`. + * + * **Note:** If this function becomes hot, i.e. is invoked a lot in a short + * period of time, it will trip its breaker and transition to an identity + * function to avoid garbage collection pauses in V8. See + * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070) + * for more details. + * + * @private + * @param {Function} func The function to associate metadata with. + * @param {*} data The metadata. + * @returns {Function} Returns `func`. + */ + var setData = shortOut(baseSetData); + + /** + * A simple wrapper around the global [`setTimeout`](https://mdn.io/setTimeout). + * + * @private + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @returns {number|Object} Returns the timer id or timeout object. + */ + var setTimeout = + ctxSetTimeout || + function (func, wait) { + return root.setTimeout(func, wait); + }; + + /** + * Sets the `toString` method of `func` to return `string`. + * + * @private + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. + */ + var setToString = shortOut(baseSetToString); + + /** + * Sets the `toString` method of `wrapper` to mimic the source of `reference` + * with wrapper details in a comment at the top of the source body. + * + * @private + * @param {Function} wrapper The function to modify. + * @param {Function} reference The reference function. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @returns {Function} Returns `wrapper`. + */ + function setWrapToString(wrapper, reference, bitmask) { + var source = reference + ''; + return setToString( + wrapper, + insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)), + ); + } + + /** + * Creates a function that'll short out and invoke `identity` instead + * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN` + * milliseconds. + * + * @private + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new shortable function. + */ + function shortOut(func) { + var count = 0, + lastCalled = 0; + + return function () { + var stamp = nativeNow(), + remaining = HOT_SPAN - (stamp - lastCalled); + + lastCalled = stamp; + if (remaining > 0) { + if (++count >= HOT_COUNT) { + return arguments[0]; + } + } else { + count = 0; + } + return func.apply(undefined, arguments); + }; + } + + /** + * A specialized version of `_.shuffle` which mutates and sets the size of `array`. + * + * @private + * @param {Array} array The array to shuffle. + * @param {number} [size=array.length] The size of `array`. + * @returns {Array} Returns `array`. + */ + function shuffleSelf(array, size) { + var index = -1, + length = array.length, + lastIndex = length - 1; + + size = size === undefined ? length : size; + while (++index < size) { + var rand = baseRandom(index, lastIndex), + value = array[rand]; + + array[rand] = array[index]; + array[index] = value; + } + array.length = size; + return array; + } + + /** + * Converts `string` to a property path array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the property path array. + */ + var stringToPath = memoizeCapped(function (string) { + var result = []; + if (string.charCodeAt(0) === 46 /* . */) { + result.push(''); + } + string.replace(rePropName, function (match, number, quote, subString) { + result.push(quote ? subString.replace(reEscapeChar, '$1') : number || match); + }); + return result; + }); + + /** + * Converts `value` to a string key if it's not a string or symbol. + * + * @private + * @param {*} value The value to inspect. + * @returns {string|symbol} Returns the key. + */ + function toKey(value) { + if (typeof value == 'string' || isSymbol(value)) { + return value; + } + var result = value + ''; + return result == '0' && 1 / value == -INFINITY ? '-0' : result; + } + + /** + * Converts `func` to its source code. + * + * @private + * @param {Function} func The function to convert. + * @returns {string} Returns the source code. + */ + function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) {} + try { + return func + ''; + } catch (e) {} + } + return ''; + } + + /** + * Updates wrapper `details` based on `bitmask` flags. + * + * @private + * @returns {Array} details The details to modify. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @returns {Array} Returns `details`. + */ + function updateWrapDetails(details, bitmask) { + arrayEach(wrapFlags, function (pair) { + var value = '_.' + pair[0]; + if (bitmask & pair[1] && !arrayIncludes(details, value)) { + details.push(value); + } + }); + return details.sort(); + } + + /** + * Creates a clone of `wrapper`. + * + * @private + * @param {Object} wrapper The wrapper to clone. + * @returns {Object} Returns the cloned wrapper. + */ + function wrapperClone(wrapper) { + if (wrapper instanceof LazyWrapper) { + return wrapper.clone(); + } + var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__); + result.__actions__ = copyArray(wrapper.__actions__); + result.__index__ = wrapper.__index__; + result.__values__ = wrapper.__values__; + return result; + } + + /*------------------------------------------------------------------------*/ + + /** + * Creates an array of elements split into groups the length of `size`. + * If `array` can't be split evenly, the final chunk will be the remaining + * elements. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to process. + * @param {number} [size=1] The length of each chunk + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the new array of chunks. + * @example + * + * _.chunk(['a', 'b', 'c', 'd'], 2); + * // => [['a', 'b'], ['c', 'd']] + * + * _.chunk(['a', 'b', 'c', 'd'], 3); + * // => [['a', 'b', 'c'], ['d']] + */ + function chunk(array, size, guard) { + if (guard ? isIterateeCall(array, size, guard) : size === undefined) { + size = 1; + } else { + size = nativeMax(toInteger(size), 0); + } + var length = array == null ? 0 : array.length; + if (!length || size < 1) { + return []; + } + var index = 0, + resIndex = 0, + result = Array(nativeCeil(length / size)); + + while (index < length) { + result[resIndex++] = baseSlice(array, index, (index += size)); + } + return result; + } + + /** + * Creates an array with all falsey values removed. The values `false`, `null`, + * `0`, `""`, `undefined`, and `NaN` are falsey. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to compact. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.compact([0, 1, false, 2, '', 3]); + * // => [1, 2, 3] + */ + function compact(array) { + var index = -1, + length = array == null ? 0 : array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (value) { + result[resIndex++] = value; + } + } + return result; + } + + /** + * Creates a new array concatenating `array` with any additional arrays + * and/or values. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to concatenate. + * @param {...*} [values] The values to concatenate. + * @returns {Array} Returns the new concatenated array. + * @example + * + * var array = [1]; + * var other = _.concat(array, 2, [3], [[4]]); + * + * console.log(other); + * // => [1, 2, 3, [4]] + * + * console.log(array); + * // => [1] + */ + function concat() { + var length = arguments.length; + if (!length) { + return []; + } + var args = Array(length - 1), + array = arguments[0], + index = length; + + while (index--) { + args[index - 1] = arguments[index]; + } + return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1)); + } + + /** + * Creates an array of `array` values not included in the other given arrays + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. The order and references of result values are + * determined by the first array. + * + * **Note:** Unlike `_.pullAll`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The values to exclude. + * @returns {Array} Returns the new array of filtered values. + * @see _.without, _.xor + * @example + * + * _.difference([2, 1], [2, 3]); + * // => [1] + */ + var difference = baseRest(function (array, values) { + return isArrayLikeObject(array) + ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true)) + : []; + }); + + /** + * This method is like `_.difference` except that it accepts `iteratee` which + * is invoked for each element of `array` and `values` to generate the criterion + * by which they're compared. The order and references of result values are + * determined by the first array. The iteratee is invoked with one argument: + * (value). + * + * **Note:** Unlike `_.pullAllBy`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The values to exclude. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor); + * // => [1.2] + * + * // The `_.property` iteratee shorthand. + * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x'); + * // => [{ 'x': 2 }] + */ + var differenceBy = baseRest(function (array, values) { + var iteratee = last(values); + if (isArrayLikeObject(iteratee)) { + iteratee = undefined; + } + return isArrayLikeObject(array) + ? baseDifference( + array, + baseFlatten(values, 1, isArrayLikeObject, true), + getIteratee(iteratee, 2), + ) + : []; + }); + + /** + * This method is like `_.difference` except that it accepts `comparator` + * which is invoked to compare elements of `array` to `values`. The order and + * references of result values are determined by the first array. The comparator + * is invoked with two arguments: (arrVal, othVal). + * + * **Note:** Unlike `_.pullAllWith`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The values to exclude. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * + * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual); + * // => [{ 'x': 2, 'y': 1 }] + */ + var differenceWith = baseRest(function (array, values) { + var comparator = last(values); + if (isArrayLikeObject(comparator)) { + comparator = undefined; + } + return isArrayLikeObject(array) + ? baseDifference( + array, + baseFlatten(values, 1, isArrayLikeObject, true), + undefined, + comparator, + ) + : []; + }); + + /** + * Creates a slice of `array` with `n` elements dropped from the beginning. + * + * @static + * @memberOf _ + * @since 0.5.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to drop. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.drop([1, 2, 3]); + * // => [2, 3] + * + * _.drop([1, 2, 3], 2); + * // => [3] + * + * _.drop([1, 2, 3], 5); + * // => [] + * + * _.drop([1, 2, 3], 0); + * // => [1, 2, 3] + */ + function drop(array, n, guard) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + n = guard || n === undefined ? 1 : toInteger(n); + return baseSlice(array, n < 0 ? 0 : n, length); + } + + /** + * Creates a slice of `array` with `n` elements dropped from the end. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to drop. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.dropRight([1, 2, 3]); + * // => [1, 2] + * + * _.dropRight([1, 2, 3], 2); + * // => [1] + * + * _.dropRight([1, 2, 3], 5); + * // => [] + * + * _.dropRight([1, 2, 3], 0); + * // => [1, 2, 3] + */ + function dropRight(array, n, guard) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + n = guard || n === undefined ? 1 : toInteger(n); + n = length - n; + return baseSlice(array, 0, n < 0 ? 0 : n); + } + + /** + * Creates a slice of `array` excluding elements dropped from the end. + * Elements are dropped until `predicate` returns falsey. The predicate is + * invoked with three arguments: (value, index, array). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * _.dropRightWhile(users, function(o) { return !o.active; }); + * // => objects for ['barney'] + * + * // The `_.matches` iteratee shorthand. + * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false }); + * // => objects for ['barney', 'fred'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.dropRightWhile(users, ['active', false]); + * // => objects for ['barney'] + * + * // The `_.property` iteratee shorthand. + * _.dropRightWhile(users, 'active'); + * // => objects for ['barney', 'fred', 'pebbles'] + */ + function dropRightWhile(array, predicate) { + return array && array.length ? baseWhile(array, getIteratee(predicate, 3), true, true) : []; + } + + /** + * Creates a slice of `array` excluding elements dropped from the beginning. + * Elements are dropped until `predicate` returns falsey. The predicate is + * invoked with three arguments: (value, index, array). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.dropWhile(users, function(o) { return !o.active; }); + * // => objects for ['pebbles'] + * + * // The `_.matches` iteratee shorthand. + * _.dropWhile(users, { 'user': 'barney', 'active': false }); + * // => objects for ['fred', 'pebbles'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.dropWhile(users, ['active', false]); + * // => objects for ['pebbles'] + * + * // The `_.property` iteratee shorthand. + * _.dropWhile(users, 'active'); + * // => objects for ['barney', 'fred', 'pebbles'] + */ + function dropWhile(array, predicate) { + return array && array.length ? baseWhile(array, getIteratee(predicate, 3), true) : []; + } + + /** + * Fills elements of `array` with `value` from `start` up to, but not + * including, `end`. + * + * **Note:** This method mutates `array`. + * + * @static + * @memberOf _ + * @since 3.2.0 + * @category Array + * @param {Array} array The array to fill. + * @param {*} value The value to fill `array` with. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns `array`. + * @example + * + * var array = [1, 2, 3]; + * + * _.fill(array, 'a'); + * console.log(array); + * // => ['a', 'a', 'a'] + * + * _.fill(Array(3), 2); + * // => [2, 2, 2] + * + * _.fill([4, 6, 8, 10], '*', 1, 3); + * // => [4, '*', '*', 10] + */ + function fill(array, value, start, end) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + if (start && typeof start != 'number' && isIterateeCall(array, value, start)) { + start = 0; + end = length; + } + return baseFill(array, value, start, end); + } + + /** + * This method is like `_.find` except that it returns the index of the first + * element `predicate` returns truthy for instead of the element itself. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.findIndex(users, function(o) { return o.user == 'barney'; }); + * // => 0 + * + * // The `_.matches` iteratee shorthand. + * _.findIndex(users, { 'user': 'fred', 'active': false }); + * // => 1 + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findIndex(users, ['active', false]); + * // => 0 + * + * // The `_.property` iteratee shorthand. + * _.findIndex(users, 'active'); + * // => 2 + */ + function findIndex(array, predicate, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = fromIndex == null ? 0 : toInteger(fromIndex); + if (index < 0) { + index = nativeMax(length + index, 0); + } + return baseFindIndex(array, getIteratee(predicate, 3), index); + } + + /** + * This method is like `_.findIndex` except that it iterates over elements + * of `collection` from right to left. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=array.length-1] The index to search from. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; }); + * // => 2 + * + * // The `_.matches` iteratee shorthand. + * _.findLastIndex(users, { 'user': 'barney', 'active': true }); + * // => 0 + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findLastIndex(users, ['active', false]); + * // => 2 + * + * // The `_.property` iteratee shorthand. + * _.findLastIndex(users, 'active'); + * // => 0 + */ + function findLastIndex(array, predicate, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = length - 1; + if (fromIndex !== undefined) { + index = toInteger(fromIndex); + index = fromIndex < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1); + } + return baseFindIndex(array, getIteratee(predicate, 3), index, true); + } + + /** + * Flattens `array` a single level deep. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to flatten. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flatten([1, [2, [3, [4]], 5]]); + * // => [1, 2, [3, [4]], 5] + */ + function flatten(array) { + var length = array == null ? 0 : array.length; + return length ? baseFlatten(array, 1) : []; + } + + /** + * Recursively flattens `array`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to flatten. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flattenDeep([1, [2, [3, [4]], 5]]); + * // => [1, 2, 3, 4, 5] + */ + function flattenDeep(array) { + var length = array == null ? 0 : array.length; + return length ? baseFlatten(array, INFINITY) : []; + } + + /** + * Recursively flatten `array` up to `depth` times. + * + * @static + * @memberOf _ + * @since 4.4.0 + * @category Array + * @param {Array} array The array to flatten. + * @param {number} [depth=1] The maximum recursion depth. + * @returns {Array} Returns the new flattened array. + * @example + * + * var array = [1, [2, [3, [4]], 5]]; + * + * _.flattenDepth(array, 1); + * // => [1, 2, [3, [4]], 5] + * + * _.flattenDepth(array, 2); + * // => [1, 2, 3, [4], 5] + */ + function flattenDepth(array, depth) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + depth = depth === undefined ? 1 : toInteger(depth); + return baseFlatten(array, depth); + } + + /** + * The inverse of `_.toPairs`; this method returns an object composed + * from key-value `pairs`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} pairs The key-value pairs. + * @returns {Object} Returns the new object. + * @example + * + * _.fromPairs([['a', 1], ['b', 2]]); + * // => { 'a': 1, 'b': 2 } + */ + function fromPairs(pairs) { + var index = -1, + length = pairs == null ? 0 : pairs.length, + result = {}; + + while (++index < length) { + var pair = pairs[index]; + result[pair[0]] = pair[1]; + } + return result; + } + + /** + * Gets the first element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @alias first + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the first element of `array`. + * @example + * + * _.head([1, 2, 3]); + * // => 1 + * + * _.head([]); + * // => undefined + */ + function head(array) { + return array && array.length ? array[0] : undefined; + } + + /** + * Gets the index at which the first occurrence of `value` is found in `array` + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. If `fromIndex` is negative, it's used as the + * offset from the end of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.indexOf([1, 2, 1, 2], 2); + * // => 1 + * + * // Search from the `fromIndex`. + * _.indexOf([1, 2, 1, 2], 2, 2); + * // => 3 + */ + function indexOf(array, value, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = fromIndex == null ? 0 : toInteger(fromIndex); + if (index < 0) { + index = nativeMax(length + index, 0); + } + return baseIndexOf(array, value, index); + } + + /** + * Gets all but the last element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.initial([1, 2, 3]); + * // => [1, 2] + */ + function initial(array) { + var length = array == null ? 0 : array.length; + return length ? baseSlice(array, 0, -1) : []; + } + + /** + * Creates an array of unique values that are included in all given arrays + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. The order and references of result values are + * determined by the first array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of intersecting values. + * @example + * + * _.intersection([2, 1], [2, 3]); + * // => [2] + */ + var intersection = baseRest(function (arrays) { + var mapped = arrayMap(arrays, castArrayLikeObject); + return mapped.length && mapped[0] === arrays[0] ? baseIntersection(mapped) : []; + }); + + /** + * This method is like `_.intersection` except that it accepts `iteratee` + * which is invoked for each element of each `arrays` to generate the criterion + * by which they're compared. The order and references of result values are + * determined by the first array. The iteratee is invoked with one argument: + * (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of intersecting values. + * @example + * + * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor); + * // => [2.1] + * + * // The `_.property` iteratee shorthand. + * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }] + */ + var intersectionBy = baseRest(function (arrays) { + var iteratee = last(arrays), + mapped = arrayMap(arrays, castArrayLikeObject); + + if (iteratee === last(mapped)) { + iteratee = undefined; + } else { + mapped.pop(); + } + return mapped.length && mapped[0] === arrays[0] + ? baseIntersection(mapped, getIteratee(iteratee, 2)) + : []; + }); + + /** + * This method is like `_.intersection` except that it accepts `comparator` + * which is invoked to compare elements of `arrays`. The order and references + * of result values are determined by the first array. The comparator is + * invoked with two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of intersecting values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.intersectionWith(objects, others, _.isEqual); + * // => [{ 'x': 1, 'y': 2 }] + */ + var intersectionWith = baseRest(function (arrays) { + var comparator = last(arrays), + mapped = arrayMap(arrays, castArrayLikeObject); + + comparator = typeof comparator == 'function' ? comparator : undefined; + if (comparator) { + mapped.pop(); + } + return mapped.length && mapped[0] === arrays[0] + ? baseIntersection(mapped, undefined, comparator) + : []; + }); + + /** + * Converts all elements in `array` into a string separated by `separator`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to convert. + * @param {string} [separator=','] The element separator. + * @returns {string} Returns the joined string. + * @example + * + * _.join(['a', 'b', 'c'], '~'); + * // => 'a~b~c' + */ + function join(array, separator) { + return array == null ? '' : nativeJoin.call(array, separator); + } + + /** + * Gets the last element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the last element of `array`. + * @example + * + * _.last([1, 2, 3]); + * // => 3 + */ + function last(array) { + var length = array == null ? 0 : array.length; + return length ? array[length - 1] : undefined; + } + + /** + * This method is like `_.indexOf` except that it iterates over elements of + * `array` from right to left. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} [fromIndex=array.length-1] The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.lastIndexOf([1, 2, 1, 2], 2); + * // => 3 + * + * // Search from the `fromIndex`. + * _.lastIndexOf([1, 2, 1, 2], 2, 2); + * // => 1 + */ + function lastIndexOf(array, value, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = length; + if (fromIndex !== undefined) { + index = toInteger(fromIndex); + index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1); + } + return value === value + ? strictLastIndexOf(array, value, index) + : baseFindIndex(array, baseIsNaN, index, true); + } + + /** + * Gets the element at index `n` of `array`. If `n` is negative, the nth + * element from the end is returned. + * + * @static + * @memberOf _ + * @since 4.11.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=0] The index of the element to return. + * @returns {*} Returns the nth element of `array`. + * @example + * + * var array = ['a', 'b', 'c', 'd']; + * + * _.nth(array, 1); + * // => 'b' + * + * _.nth(array, -2); + * // => 'c'; + */ + function nth(array, n) { + return array && array.length ? baseNth(array, toInteger(n)) : undefined; + } + + /** + * Removes all given values from `array` using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove` + * to remove elements from an array by predicate. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {...*} [values] The values to remove. + * @returns {Array} Returns `array`. + * @example + * + * var array = ['a', 'b', 'c', 'a', 'b', 'c']; + * + * _.pull(array, 'a', 'c'); + * console.log(array); + * // => ['b', 'b'] + */ + var pull = baseRest(pullAll); + + /** + * This method is like `_.pull` except that it accepts an array of values to remove. + * + * **Note:** Unlike `_.difference`, this method mutates `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @returns {Array} Returns `array`. + * @example + * + * var array = ['a', 'b', 'c', 'a', 'b', 'c']; + * + * _.pullAll(array, ['a', 'c']); + * console.log(array); + * // => ['b', 'b'] + */ + function pullAll(array, values) { + return array && array.length && values && values.length ? basePullAll(array, values) : array; + } + + /** + * This method is like `_.pullAll` except that it accepts `iteratee` which is + * invoked for each element of `array` and `values` to generate the criterion + * by which they're compared. The iteratee is invoked with one argument: (value). + * + * **Note:** Unlike `_.differenceBy`, this method mutates `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns `array`. + * @example + * + * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }]; + * + * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x'); + * console.log(array); + * // => [{ 'x': 2 }] + */ + function pullAllBy(array, values, iteratee) { + return array && array.length && values && values.length + ? basePullAll(array, values, getIteratee(iteratee, 2)) + : array; + } + + /** + * This method is like `_.pullAll` except that it accepts `comparator` which + * is invoked to compare elements of `array` to `values`. The comparator is + * invoked with two arguments: (arrVal, othVal). + * + * **Note:** Unlike `_.differenceWith`, this method mutates `array`. + * + * @static + * @memberOf _ + * @since 4.6.0 + * @category Array + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns `array`. + * @example + * + * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }]; + * + * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual); + * console.log(array); + * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }] + */ + function pullAllWith(array, values, comparator) { + return array && array.length && values && values.length + ? basePullAll(array, values, undefined, comparator) + : array; + } + + /** + * Removes elements from `array` corresponding to `indexes` and returns an + * array of removed elements. + * + * **Note:** Unlike `_.at`, this method mutates `array`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {...(number|number[])} [indexes] The indexes of elements to remove. + * @returns {Array} Returns the new array of removed elements. + * @example + * + * var array = ['a', 'b', 'c', 'd']; + * var pulled = _.pullAt(array, [1, 3]); + * + * console.log(array); + * // => ['a', 'c'] + * + * console.log(pulled); + * // => ['b', 'd'] + */ + var pullAt = flatRest(function (array, indexes) { + var length = array == null ? 0 : array.length, + result = baseAt(array, indexes); + + basePullAt( + array, + arrayMap(indexes, function (index) { + return isIndex(index, length) ? +index : index; + }).sort(compareAscending), + ); + + return result; + }); + + /** + * Removes all elements from `array` that `predicate` returns truthy for + * and returns an array of the removed elements. The predicate is invoked + * with three arguments: (value, index, array). + * + * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull` + * to pull elements from an array by value. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new array of removed elements. + * @example + * + * var array = [1, 2, 3, 4]; + * var evens = _.remove(array, function(n) { + * return n % 2 == 0; + * }); + * + * console.log(array); + * // => [1, 3] + * + * console.log(evens); + * // => [2, 4] + */ + function remove(array, predicate) { + var result = []; + if (!(array && array.length)) { + return result; + } + var index = -1, + indexes = [], + length = array.length; + + predicate = getIteratee(predicate, 3); + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result.push(value); + indexes.push(index); + } + } + basePullAt(array, indexes); + return result; + } + + /** + * Reverses `array` so that the first element becomes the last, the second + * element becomes the second to last, and so on. + * + * **Note:** This method mutates `array` and is based on + * [`Array#reverse`](https://mdn.io/Array/reverse). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to modify. + * @returns {Array} Returns `array`. + * @example + * + * var array = [1, 2, 3]; + * + * _.reverse(array); + * // => [3, 2, 1] + * + * console.log(array); + * // => [3, 2, 1] + */ + function reverse(array) { + return array == null ? array : nativeReverse.call(array); + } + + /** + * Creates a slice of `array` from `start` up to, but not including, `end`. + * + * **Note:** This method is used instead of + * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are + * returned. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to slice. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the slice of `array`. + */ + function slice(array, start, end) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + if (end && typeof end != 'number' && isIterateeCall(array, start, end)) { + start = 0; + end = length; + } else { + start = start == null ? 0 : toInteger(start); + end = end === undefined ? length : toInteger(end); + } + return baseSlice(array, start, end); + } + + /** + * Uses a binary search to determine the lowest index at which `value` + * should be inserted into `array` in order to maintain its sort order. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * _.sortedIndex([30, 50], 40); + * // => 1 + */ + function sortedIndex(array, value) { + return baseSortedIndex(array, value); + } + + /** + * This method is like `_.sortedIndex` except that it accepts `iteratee` + * which is invoked for `value` and each element of `array` to compute their + * sort ranking. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * var objects = [{ 'x': 4 }, { 'x': 5 }]; + * + * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; }); + * // => 0 + * + * // The `_.property` iteratee shorthand. + * _.sortedIndexBy(objects, { 'x': 4 }, 'x'); + * // => 0 + */ + function sortedIndexBy(array, value, iteratee) { + return baseSortedIndexBy(array, value, getIteratee(iteratee, 2)); + } + + /** + * This method is like `_.indexOf` except that it performs a binary + * search on a sorted `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.sortedIndexOf([4, 5, 5, 5, 6], 5); + * // => 1 + */ + function sortedIndexOf(array, value) { + var length = array == null ? 0 : array.length; + if (length) { + var index = baseSortedIndex(array, value); + if (index < length && eq(array[index], value)) { + return index; + } + } + return -1; + } + + /** + * This method is like `_.sortedIndex` except that it returns the highest + * index at which `value` should be inserted into `array` in order to + * maintain its sort order. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * _.sortedLastIndex([4, 5, 5, 5, 6], 5); + * // => 4 + */ + function sortedLastIndex(array, value) { + return baseSortedIndex(array, value, true); + } + + /** + * This method is like `_.sortedLastIndex` except that it accepts `iteratee` + * which is invoked for `value` and each element of `array` to compute their + * sort ranking. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * var objects = [{ 'x': 4 }, { 'x': 5 }]; + * + * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; }); + * // => 1 + * + * // The `_.property` iteratee shorthand. + * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x'); + * // => 1 + */ + function sortedLastIndexBy(array, value, iteratee) { + return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true); + } + + /** + * This method is like `_.lastIndexOf` except that it performs a binary + * search on a sorted `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5); + * // => 3 + */ + function sortedLastIndexOf(array, value) { + var length = array == null ? 0 : array.length; + if (length) { + var index = baseSortedIndex(array, value, true) - 1; + if (eq(array[index], value)) { + return index; + } + } + return -1; + } + + /** + * This method is like `_.uniq` except that it's designed and optimized + * for sorted arrays. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.sortedUniq([1, 1, 2]); + * // => [1, 2] + */ + function sortedUniq(array) { + return array && array.length ? baseSortedUniq(array) : []; + } + + /** + * This method is like `_.uniqBy` except that it's designed and optimized + * for sorted arrays. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor); + * // => [1.1, 2.3] + */ + function sortedUniqBy(array, iteratee) { + return array && array.length ? baseSortedUniq(array, getIteratee(iteratee, 2)) : []; + } + + /** + * Gets all but the first element of `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to query. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.tail([1, 2, 3]); + * // => [2, 3] + */ + function tail(array) { + var length = array == null ? 0 : array.length; + return length ? baseSlice(array, 1, length) : []; + } + + /** + * Creates a slice of `array` with `n` elements taken from the beginning. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to take. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.take([1, 2, 3]); + * // => [1] + * + * _.take([1, 2, 3], 2); + * // => [1, 2] + * + * _.take([1, 2, 3], 5); + * // => [1, 2, 3] + * + * _.take([1, 2, 3], 0); + * // => [] + */ + function take(array, n, guard) { + if (!(array && array.length)) { + return []; + } + n = guard || n === undefined ? 1 : toInteger(n); + return baseSlice(array, 0, n < 0 ? 0 : n); + } + + /** + * Creates a slice of `array` with `n` elements taken from the end. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to take. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.takeRight([1, 2, 3]); + * // => [3] + * + * _.takeRight([1, 2, 3], 2); + * // => [2, 3] + * + * _.takeRight([1, 2, 3], 5); + * // => [1, 2, 3] + * + * _.takeRight([1, 2, 3], 0); + * // => [] + */ + function takeRight(array, n, guard) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + n = guard || n === undefined ? 1 : toInteger(n); + n = length - n; + return baseSlice(array, n < 0 ? 0 : n, length); + } + + /** + * Creates a slice of `array` with elements taken from the end. Elements are + * taken until `predicate` returns falsey. The predicate is invoked with + * three arguments: (value, index, array). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * _.takeRightWhile(users, function(o) { return !o.active; }); + * // => objects for ['fred', 'pebbles'] + * + * // The `_.matches` iteratee shorthand. + * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false }); + * // => objects for ['pebbles'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.takeRightWhile(users, ['active', false]); + * // => objects for ['fred', 'pebbles'] + * + * // The `_.property` iteratee shorthand. + * _.takeRightWhile(users, 'active'); + * // => [] + */ + function takeRightWhile(array, predicate) { + return array && array.length ? baseWhile(array, getIteratee(predicate, 3), false, true) : []; + } + + /** + * Creates a slice of `array` with elements taken from the beginning. Elements + * are taken until `predicate` returns falsey. The predicate is invoked with + * three arguments: (value, index, array). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.takeWhile(users, function(o) { return !o.active; }); + * // => objects for ['barney', 'fred'] + * + * // The `_.matches` iteratee shorthand. + * _.takeWhile(users, { 'user': 'barney', 'active': false }); + * // => objects for ['barney'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.takeWhile(users, ['active', false]); + * // => objects for ['barney', 'fred'] + * + * // The `_.property` iteratee shorthand. + * _.takeWhile(users, 'active'); + * // => [] + */ + function takeWhile(array, predicate) { + return array && array.length ? baseWhile(array, getIteratee(predicate, 3)) : []; + } + + /** + * Creates an array of unique values, in order, from all given arrays using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of combined values. + * @example + * + * _.union([2], [1, 2]); + * // => [2, 1] + */ + var union = baseRest(function (arrays) { + return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true)); + }); + + /** + * This method is like `_.union` except that it accepts `iteratee` which is + * invoked for each element of each `arrays` to generate the criterion by + * which uniqueness is computed. Result values are chosen from the first + * array in which the value occurs. The iteratee is invoked with one argument: + * (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of combined values. + * @example + * + * _.unionBy([2.1], [1.2, 2.3], Math.floor); + * // => [2.1, 1.2] + * + * // The `_.property` iteratee shorthand. + * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }, { 'x': 2 }] + */ + var unionBy = baseRest(function (arrays) { + var iteratee = last(arrays); + if (isArrayLikeObject(iteratee)) { + iteratee = undefined; + } + return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2)); + }); + + /** + * This method is like `_.union` except that it accepts `comparator` which + * is invoked to compare elements of `arrays`. Result values are chosen from + * the first array in which the value occurs. The comparator is invoked + * with two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of combined values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.unionWith(objects, others, _.isEqual); + * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }] + */ + var unionWith = baseRest(function (arrays) { + var comparator = last(arrays); + comparator = typeof comparator == 'function' ? comparator : undefined; + return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator); + }); + + /** + * Creates a duplicate-free version of an array, using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons, in which only the first occurrence of each element + * is kept. The order of result values is determined by the order they occur + * in the array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.uniq([2, 1, 2]); + * // => [2, 1] + */ + function uniq(array) { + return array && array.length ? baseUniq(array) : []; + } + + /** + * This method is like `_.uniq` except that it accepts `iteratee` which is + * invoked for each element in `array` to generate the criterion by which + * uniqueness is computed. The order of result values is determined by the + * order they occur in the array. The iteratee is invoked with one argument: + * (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.uniqBy([2.1, 1.2, 2.3], Math.floor); + * // => [2.1, 1.2] + * + * // The `_.property` iteratee shorthand. + * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }, { 'x': 2 }] + */ + function uniqBy(array, iteratee) { + return array && array.length ? baseUniq(array, getIteratee(iteratee, 2)) : []; + } + + /** + * This method is like `_.uniq` except that it accepts `comparator` which + * is invoked to compare elements of `array`. The order of result values is + * determined by the order they occur in the array.The comparator is invoked + * with two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.uniqWith(objects, _.isEqual); + * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }] + */ + function uniqWith(array, comparator) { + comparator = typeof comparator == 'function' ? comparator : undefined; + return array && array.length ? baseUniq(array, undefined, comparator) : []; + } + + /** + * This method is like `_.zip` except that it accepts an array of grouped + * elements and creates an array regrouping the elements to their pre-zip + * configuration. + * + * @static + * @memberOf _ + * @since 1.2.0 + * @category Array + * @param {Array} array The array of grouped elements to process. + * @returns {Array} Returns the new array of regrouped elements. + * @example + * + * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]); + * // => [['a', 1, true], ['b', 2, false]] + * + * _.unzip(zipped); + * // => [['a', 'b'], [1, 2], [true, false]] + */ + function unzip(array) { + if (!(array && array.length)) { + return []; + } + var length = 0; + array = arrayFilter(array, function (group) { + if (isArrayLikeObject(group)) { + length = nativeMax(group.length, length); + return true; + } + }); + return baseTimes(length, function (index) { + return arrayMap(array, baseProperty(index)); + }); + } + + /** + * This method is like `_.unzip` except that it accepts `iteratee` to specify + * how regrouped values should be combined. The iteratee is invoked with the + * elements of each group: (...group). + * + * @static + * @memberOf _ + * @since 3.8.0 + * @category Array + * @param {Array} array The array of grouped elements to process. + * @param {Function} [iteratee=_.identity] The function to combine + * regrouped values. + * @returns {Array} Returns the new array of regrouped elements. + * @example + * + * var zipped = _.zip([1, 2], [10, 20], [100, 200]); + * // => [[1, 10, 100], [2, 20, 200]] + * + * _.unzipWith(zipped, _.add); + * // => [3, 30, 300] + */ + function unzipWith(array, iteratee) { + if (!(array && array.length)) { + return []; + } + var result = unzip(array); + if (iteratee == null) { + return result; + } + return arrayMap(result, function (group) { + return apply(iteratee, undefined, group); + }); + } + + /** + * Creates an array excluding all given values using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * **Note:** Unlike `_.pull`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...*} [values] The values to exclude. + * @returns {Array} Returns the new array of filtered values. + * @see _.difference, _.xor + * @example + * + * _.without([2, 1, 2, 3], 1, 2); + * // => [3] + */ + var without = baseRest(function (array, values) { + return isArrayLikeObject(array) ? baseDifference(array, values) : []; + }); + + /** + * Creates an array of unique values that is the + * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference) + * of the given arrays. The order of result values is determined by the order + * they occur in the arrays. + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of filtered values. + * @see _.difference, _.without + * @example + * + * _.xor([2, 1], [2, 3]); + * // => [1, 3] + */ + var xor = baseRest(function (arrays) { + return baseXor(arrayFilter(arrays, isArrayLikeObject)); + }); + + /** + * This method is like `_.xor` except that it accepts `iteratee` which is + * invoked for each element of each `arrays` to generate the criterion by + * which by which they're compared. The order of result values is determined + * by the order they occur in the arrays. The iteratee is invoked with one + * argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor); + * // => [1.2, 3.4] + * + * // The `_.property` iteratee shorthand. + * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 2 }] + */ + var xorBy = baseRest(function (arrays) { + var iteratee = last(arrays); + if (isArrayLikeObject(iteratee)) { + iteratee = undefined; + } + return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2)); + }); + + /** + * This method is like `_.xor` except that it accepts `comparator` which is + * invoked to compare elements of `arrays`. The order of result values is + * determined by the order they occur in the arrays. The comparator is invoked + * with two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.xorWith(objects, others, _.isEqual); + * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }] + */ + var xorWith = baseRest(function (arrays) { + var comparator = last(arrays); + comparator = typeof comparator == 'function' ? comparator : undefined; + return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator); + }); + + /** + * Creates an array of grouped elements, the first of which contains the + * first elements of the given arrays, the second of which contains the + * second elements of the given arrays, and so on. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {...Array} [arrays] The arrays to process. + * @returns {Array} Returns the new array of grouped elements. + * @example + * + * _.zip(['a', 'b'], [1, 2], [true, false]); + * // => [['a', 1, true], ['b', 2, false]] + */ + var zip = baseRest(unzip); + + /** + * This method is like `_.fromPairs` except that it accepts two arrays, + * one of property identifiers and one of corresponding values. + * + * @static + * @memberOf _ + * @since 0.4.0 + * @category Array + * @param {Array} [props=[]] The property identifiers. + * @param {Array} [values=[]] The property values. + * @returns {Object} Returns the new object. + * @example + * + * _.zipObject(['a', 'b'], [1, 2]); + * // => { 'a': 1, 'b': 2 } + */ + function zipObject(props, values) { + return baseZipObject(props || [], values || [], assignValue); + } + + /** + * This method is like `_.zipObject` except that it supports property paths. + * + * @static + * @memberOf _ + * @since 4.1.0 + * @category Array + * @param {Array} [props=[]] The property identifiers. + * @param {Array} [values=[]] The property values. + * @returns {Object} Returns the new object. + * @example + * + * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]); + * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } } + */ + function zipObjectDeep(props, values) { + return baseZipObject(props || [], values || [], baseSet); + } + + /** + * This method is like `_.zip` except that it accepts `iteratee` to specify + * how grouped values should be combined. The iteratee is invoked with the + * elements of each group: (...group). + * + * @static + * @memberOf _ + * @since 3.8.0 + * @category Array + * @param {...Array} [arrays] The arrays to process. + * @param {Function} [iteratee=_.identity] The function to combine + * grouped values. + * @returns {Array} Returns the new array of grouped elements. + * @example + * + * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) { + * return a + b + c; + * }); + * // => [111, 222] + */ + var zipWith = baseRest(function (arrays) { + var length = arrays.length, + iteratee = length > 1 ? arrays[length - 1] : undefined; + + iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined; + return unzipWith(arrays, iteratee); + }); + + /*------------------------------------------------------------------------*/ + + /** + * Creates a `lodash` wrapper instance that wraps `value` with explicit method + * chain sequences enabled. The result of such sequences must be unwrapped + * with `_#value`. + * + * @static + * @memberOf _ + * @since 1.3.0 + * @category Seq + * @param {*} value The value to wrap. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 }, + * { 'user': 'pebbles', 'age': 1 } + * ]; + * + * var youngest = _ + * .chain(users) + * .sortBy('age') + * .map(function(o) { + * return o.user + ' is ' + o.age; + * }) + * .head() + * .value(); + * // => 'pebbles is 1' + */ + function chain(value) { + var result = lodash(value); + result.__chain__ = true; + return result; + } + + /** + * This method invokes `interceptor` and returns `value`. The interceptor + * is invoked with one argument; (value). The purpose of this method is to + * "tap into" a method chain sequence in order to modify intermediate results. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Seq + * @param {*} value The value to provide to `interceptor`. + * @param {Function} interceptor The function to invoke. + * @returns {*} Returns `value`. + * @example + * + * _([1, 2, 3]) + * .tap(function(array) { + * // Mutate input array. + * array.pop(); + * }) + * .reverse() + * .value(); + * // => [2, 1] + */ + function tap(value, interceptor) { + interceptor(value); + return value; + } + + /** + * This method is like `_.tap` except that it returns the result of `interceptor`. + * The purpose of this method is to "pass thru" values replacing intermediate + * results in a method chain sequence. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Seq + * @param {*} value The value to provide to `interceptor`. + * @param {Function} interceptor The function to invoke. + * @returns {*} Returns the result of `interceptor`. + * @example + * + * _(' abc ') + * .chain() + * .trim() + * .thru(function(value) { + * return [value]; + * }) + * .value(); + * // => ['abc'] + */ + function thru(value, interceptor) { + return interceptor(value); + } + + /** + * This method is the wrapper version of `_.at`. + * + * @name at + * @memberOf _ + * @since 1.0.0 + * @category Seq + * @param {...(string|string[])} [paths] The property paths to pick. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] }; + * + * _(object).at(['a[0].b.c', 'a[1]']).value(); + * // => [3, 4] + */ + var wrapperAt = flatRest(function (paths) { + var length = paths.length, + start = length ? paths[0] : 0, + value = this.__wrapped__, + interceptor = function (object) { + return baseAt(object, paths); + }; + + if ( + length > 1 || + this.__actions__.length || + !(value instanceof LazyWrapper) || + !isIndex(start) + ) { + return this.thru(interceptor); + } + value = value.slice(start, +start + (length ? 1 : 0)); + value.__actions__.push({ + func: thru, + args: [interceptor], + thisArg: undefined, + }); + return new LodashWrapper(value, this.__chain__).thru(function (array) { + if (length && !array.length) { + array.push(undefined); + } + return array; + }); + }); + + /** + * Creates a `lodash` wrapper instance with explicit method chain sequences enabled. + * + * @name chain + * @memberOf _ + * @since 0.1.0 + * @category Seq + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 } + * ]; + * + * // A sequence without explicit chaining. + * _(users).head(); + * // => { 'user': 'barney', 'age': 36 } + * + * // A sequence with explicit chaining. + * _(users) + * .chain() + * .head() + * .pick('user') + * .value(); + * // => { 'user': 'barney' } + */ + function wrapperChain() { + return chain(this); + } + + /** + * Executes the chain sequence and returns the wrapped result. + * + * @name commit + * @memberOf _ + * @since 3.2.0 + * @category Seq + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var array = [1, 2]; + * var wrapped = _(array).push(3); + * + * console.log(array); + * // => [1, 2] + * + * wrapped = wrapped.commit(); + * console.log(array); + * // => [1, 2, 3] + * + * wrapped.last(); + * // => 3 + * + * console.log(array); + * // => [1, 2, 3] + */ + function wrapperCommit() { + return new LodashWrapper(this.value(), this.__chain__); + } + + /** + * Gets the next value on a wrapped object following the + * [iterator protocol](https://mdn.io/iteration_protocols#iterator). + * + * @name next + * @memberOf _ + * @since 4.0.0 + * @category Seq + * @returns {Object} Returns the next iterator value. + * @example + * + * var wrapped = _([1, 2]); + * + * wrapped.next(); + * // => { 'done': false, 'value': 1 } + * + * wrapped.next(); + * // => { 'done': false, 'value': 2 } + * + * wrapped.next(); + * // => { 'done': true, 'value': undefined } + */ + function wrapperNext() { + if (this.__values__ === undefined) { + this.__values__ = toArray(this.value()); + } + var done = this.__index__ >= this.__values__.length, + value = done ? undefined : this.__values__[this.__index__++]; + + return { done: done, value: value }; + } + + /** + * Enables the wrapper to be iterable. + * + * @name Symbol.iterator + * @memberOf _ + * @since 4.0.0 + * @category Seq + * @returns {Object} Returns the wrapper object. + * @example + * + * var wrapped = _([1, 2]); + * + * wrapped[Symbol.iterator]() === wrapped; + * // => true + * + * Array.from(wrapped); + * // => [1, 2] + */ + function wrapperToIterator() { + return this; + } + + /** + * Creates a clone of the chain sequence planting `value` as the wrapped value. + * + * @name plant + * @memberOf _ + * @since 3.2.0 + * @category Seq + * @param {*} value The value to plant. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * function square(n) { + * return n * n; + * } + * + * var wrapped = _([1, 2]).map(square); + * var other = wrapped.plant([3, 4]); + * + * other.value(); + * // => [9, 16] + * + * wrapped.value(); + * // => [1, 4] + */ + function wrapperPlant(value) { + var result, + parent = this; + + while (parent instanceof baseLodash) { + var clone = wrapperClone(parent); + clone.__index__ = 0; + clone.__values__ = undefined; + if (result) { + previous.__wrapped__ = clone; + } else { + result = clone; + } + var previous = clone; + parent = parent.__wrapped__; + } + previous.__wrapped__ = value; + return result; + } + + /** + * This method is the wrapper version of `_.reverse`. + * + * **Note:** This method mutates the wrapped array. + * + * @name reverse + * @memberOf _ + * @since 0.1.0 + * @category Seq + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var array = [1, 2, 3]; + * + * _(array).reverse().value() + * // => [3, 2, 1] + * + * console.log(array); + * // => [3, 2, 1] + */ + function wrapperReverse() { + var value = this.__wrapped__; + if (value instanceof LazyWrapper) { + var wrapped = value; + if (this.__actions__.length) { + wrapped = new LazyWrapper(this); + } + wrapped = wrapped.reverse(); + wrapped.__actions__.push({ + func: thru, + args: [reverse], + thisArg: undefined, + }); + return new LodashWrapper(wrapped, this.__chain__); + } + return this.thru(reverse); + } + + /** + * Executes the chain sequence to resolve the unwrapped value. + * + * @name value + * @memberOf _ + * @since 0.1.0 + * @alias toJSON, valueOf + * @category Seq + * @returns {*} Returns the resolved unwrapped value. + * @example + * + * _([1, 2, 3]).value(); + * // => [1, 2, 3] + */ + function wrapperValue() { + return baseWrapperValue(this.__wrapped__, this.__actions__); + } + + /*------------------------------------------------------------------------*/ + + /** + * Creates an object composed of keys generated from the results of running + * each element of `collection` thru `iteratee`. The corresponding value of + * each key is the number of times the key was returned by `iteratee`. The + * iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 0.5.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee to transform keys. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * _.countBy([6.1, 4.2, 6.3], Math.floor); + * // => { '4': 1, '6': 2 } + * + * // The `_.property` iteratee shorthand. + * _.countBy(['one', 'two', 'three'], 'length'); + * // => { '3': 2, '5': 1 } + */ + var countBy = createAggregator(function (result, value, key) { + if (hasOwnProperty.call(result, key)) { + ++result[key]; + } else { + baseAssignValue(result, key, 1); + } + }); + + /** + * Checks if `predicate` returns truthy for **all** elements of `collection`. + * Iteration is stopped once `predicate` returns falsey. The predicate is + * invoked with three arguments: (value, index|key, collection). + * + * **Note:** This method returns `true` for + * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because + * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of + * elements of empty collections. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false`. + * @example + * + * _.every([true, 1, null, 'yes'], Boolean); + * // => false + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * // The `_.matches` iteratee shorthand. + * _.every(users, { 'user': 'barney', 'active': false }); + * // => false + * + * // The `_.matchesProperty` iteratee shorthand. + * _.every(users, ['active', false]); + * // => true + * + * // The `_.property` iteratee shorthand. + * _.every(users, 'active'); + * // => false + */ + function every(collection, predicate, guard) { + var func = isArray(collection) ? arrayEvery : baseEvery; + if (guard && isIterateeCall(collection, predicate, guard)) { + predicate = undefined; + } + return func(collection, getIteratee(predicate, 3)); + } + + /** + * Iterates over elements of `collection`, returning an array of all elements + * `predicate` returns truthy for. The predicate is invoked with three + * arguments: (value, index|key, collection). + * + * **Note:** Unlike `_.remove`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + * @see _.reject + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * _.filter(users, function(o) { return !o.active; }); + * // => objects for ['fred'] + * + * // The `_.matches` iteratee shorthand. + * _.filter(users, { 'age': 36, 'active': true }); + * // => objects for ['barney'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.filter(users, ['active', false]); + * // => objects for ['fred'] + * + * // The `_.property` iteratee shorthand. + * _.filter(users, 'active'); + * // => objects for ['barney'] + */ + function filter(collection, predicate) { + var func = isArray(collection) ? arrayFilter : baseFilter; + return func(collection, getIteratee(predicate, 3)); + } + + /** + * Iterates over elements of `collection`, returning the first element + * `predicate` returns truthy for. The predicate is invoked with three + * arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. + * @returns {*} Returns the matched element, else `undefined`. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false }, + * { 'user': 'pebbles', 'age': 1, 'active': true } + * ]; + * + * _.find(users, function(o) { return o.age < 40; }); + * // => object for 'barney' + * + * // The `_.matches` iteratee shorthand. + * _.find(users, { 'age': 1, 'active': true }); + * // => object for 'pebbles' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.find(users, ['active', false]); + * // => object for 'fred' + * + * // The `_.property` iteratee shorthand. + * _.find(users, 'active'); + * // => object for 'barney' + */ + var find = createFind(findIndex); + + /** + * This method is like `_.find` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Collection + * @param {Array|Object} collection The collection to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=collection.length-1] The index to search from. + * @returns {*} Returns the matched element, else `undefined`. + * @example + * + * _.findLast([1, 2, 3, 4], function(n) { + * return n % 2 == 1; + * }); + * // => 3 + */ + var findLast = createFind(findLastIndex); + + /** + * Creates a flattened array of values by running each element in `collection` + * thru `iteratee` and flattening the mapped results. The iteratee is invoked + * with three arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new flattened array. + * @example + * + * function duplicate(n) { + * return [n, n]; + * } + * + * _.flatMap([1, 2], duplicate); + * // => [1, 1, 2, 2] + */ + function flatMap(collection, iteratee) { + return baseFlatten(map(collection, iteratee), 1); + } + + /** + * This method is like `_.flatMap` except that it recursively flattens the + * mapped results. + * + * @static + * @memberOf _ + * @since 4.7.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new flattened array. + * @example + * + * function duplicate(n) { + * return [[[n, n]]]; + * } + * + * _.flatMapDeep([1, 2], duplicate); + * // => [1, 1, 2, 2] + */ + function flatMapDeep(collection, iteratee) { + return baseFlatten(map(collection, iteratee), INFINITY); + } + + /** + * This method is like `_.flatMap` except that it recursively flattens the + * mapped results up to `depth` times. + * + * @static + * @memberOf _ + * @since 4.7.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {number} [depth=1] The maximum recursion depth. + * @returns {Array} Returns the new flattened array. + * @example + * + * function duplicate(n) { + * return [[[n, n]]]; + * } + * + * _.flatMapDepth([1, 2], duplicate, 2); + * // => [[1, 1], [2, 2]] + */ + function flatMapDepth(collection, iteratee, depth) { + depth = depth === undefined ? 1 : toInteger(depth); + return baseFlatten(map(collection, iteratee), depth); + } + + /** + * Iterates over elements of `collection` and invokes `iteratee` for each element. + * The iteratee is invoked with three arguments: (value, index|key, collection). + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * **Note:** As with other "Collections" methods, objects with a "length" + * property are iterated like arrays. To avoid this behavior use `_.forIn` + * or `_.forOwn` for object iteration. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @alias each + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + * @see _.forEachRight + * @example + * + * _.forEach([1, 2], function(value) { + * console.log(value); + * }); + * // => Logs `1` then `2`. + * + * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a' then 'b' (iteration order is not guaranteed). + */ + function forEach(collection, iteratee) { + var func = isArray(collection) ? arrayEach : baseEach; + return func(collection, getIteratee(iteratee, 3)); + } + + /** + * This method is like `_.forEach` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @alias eachRight + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + * @see _.forEach + * @example + * + * _.forEachRight([1, 2], function(value) { + * console.log(value); + * }); + * // => Logs `2` then `1`. + */ + function forEachRight(collection, iteratee) { + var func = isArray(collection) ? arrayEachRight : baseEachRight; + return func(collection, getIteratee(iteratee, 3)); + } + + /** + * Creates an object composed of keys generated from the results of running + * each element of `collection` thru `iteratee`. The order of grouped values + * is determined by the order they occur in `collection`. The corresponding + * value of each key is an array of elements responsible for generating the + * key. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee to transform keys. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * _.groupBy([6.1, 4.2, 6.3], Math.floor); + * // => { '4': [4.2], '6': [6.1, 6.3] } + * + * // The `_.property` iteratee shorthand. + * _.groupBy(['one', 'two', 'three'], 'length'); + * // => { '3': ['one', 'two'], '5': ['three'] } + */ + var groupBy = createAggregator(function (result, value, key) { + if (hasOwnProperty.call(result, key)) { + result[key].push(value); + } else { + baseAssignValue(result, key, [value]); + } + }); + + /** + * Checks if `value` is in `collection`. If `collection` is a string, it's + * checked for a substring of `value`, otherwise + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * is used for equality comparisons. If `fromIndex` is negative, it's used as + * the offset from the end of `collection`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object|string} collection The collection to inspect. + * @param {*} value The value to search for. + * @param {number} [fromIndex=0] The index to search from. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`. + * @returns {boolean} Returns `true` if `value` is found, else `false`. + * @example + * + * _.includes([1, 2, 3], 1); + * // => true + * + * _.includes([1, 2, 3], 1, 2); + * // => false + * + * _.includes({ 'a': 1, 'b': 2 }, 1); + * // => true + * + * _.includes('abcd', 'bc'); + * // => true + */ + function includes(collection, value, fromIndex, guard) { + collection = isArrayLike(collection) ? collection : values(collection); + fromIndex = fromIndex && !guard ? toInteger(fromIndex) : 0; + + var length = collection.length; + if (fromIndex < 0) { + fromIndex = nativeMax(length + fromIndex, 0); + } + return isString(collection) + ? fromIndex <= length && collection.indexOf(value, fromIndex) > -1 + : !!length && baseIndexOf(collection, value, fromIndex) > -1; + } + + /** + * Invokes the method at `path` of each element in `collection`, returning + * an array of the results of each invoked method. Any additional arguments + * are provided to each invoked method. If `path` is a function, it's invoked + * for, and `this` bound to, each element in `collection`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Array|Function|string} path The path of the method to invoke or + * the function invoked per iteration. + * @param {...*} [args] The arguments to invoke each method with. + * @returns {Array} Returns the array of results. + * @example + * + * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort'); + * // => [[1, 5, 7], [1, 2, 3]] + * + * _.invokeMap([123, 456], String.prototype.split, ''); + * // => [['1', '2', '3'], ['4', '5', '6']] + */ + var invokeMap = baseRest(function (collection, path, args) { + var index = -1, + isFunc = typeof path == 'function', + result = isArrayLike(collection) ? Array(collection.length) : []; + + baseEach(collection, function (value) { + result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args); + }); + return result; + }); + + /** + * Creates an object composed of keys generated from the results of running + * each element of `collection` thru `iteratee`. The corresponding value of + * each key is the last element responsible for generating the key. The + * iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee to transform keys. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * var array = [ + * { 'dir': 'left', 'code': 97 }, + * { 'dir': 'right', 'code': 100 } + * ]; + * + * _.keyBy(array, function(o) { + * return String.fromCharCode(o.code); + * }); + * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } } + * + * _.keyBy(array, 'dir'); + * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } } + */ + var keyBy = createAggregator(function (result, value, key) { + baseAssignValue(result, key, value); + }); + + /** + * Creates an array of values by running each element in `collection` thru + * `iteratee`. The iteratee is invoked with three arguments: + * (value, index|key, collection). + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. + * + * The guarded methods are: + * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`, + * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`, + * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`, + * `template`, `trim`, `trimEnd`, `trimStart`, and `words` + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + * @example + * + * function square(n) { + * return n * n; + * } + * + * _.map([4, 8], square); + * // => [16, 64] + * + * _.map({ 'a': 4, 'b': 8 }, square); + * // => [16, 64] (iteration order is not guaranteed) + * + * var users = [ + * { 'user': 'barney' }, + * { 'user': 'fred' } + * ]; + * + * // The `_.property` iteratee shorthand. + * _.map(users, 'user'); + * // => ['barney', 'fred'] + */ + function map(collection, iteratee) { + var func = isArray(collection) ? arrayMap : baseMap; + return func(collection, getIteratee(iteratee, 3)); + } + + /** + * This method is like `_.sortBy` except that it allows specifying the sort + * orders of the iteratees to sort by. If `orders` is unspecified, all values + * are sorted in ascending order. Otherwise, specify an order of "desc" for + * descending or "asc" for ascending sort order of corresponding values. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]] + * The iteratees to sort by. + * @param {string[]} [orders] The sort orders of `iteratees`. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`. + * @returns {Array} Returns the new sorted array. + * @example + * + * var users = [ + * { 'user': 'fred', 'age': 48 }, + * { 'user': 'barney', 'age': 34 }, + * { 'user': 'fred', 'age': 40 }, + * { 'user': 'barney', 'age': 36 } + * ]; + * + * // Sort by `user` in ascending order and by `age` in descending order. + * _.orderBy(users, ['user', 'age'], ['asc', 'desc']); + * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]] + */ + function orderBy(collection, iteratees, orders, guard) { + if (collection == null) { + return []; + } + if (!isArray(iteratees)) { + iteratees = iteratees == null ? [] : [iteratees]; + } + orders = guard ? undefined : orders; + if (!isArray(orders)) { + orders = orders == null ? [] : [orders]; + } + return baseOrderBy(collection, iteratees, orders); + } + + /** + * Creates an array of elements split into two groups, the first of which + * contains elements `predicate` returns truthy for, the second of which + * contains elements `predicate` returns falsey for. The predicate is + * invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the array of grouped elements. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false }, + * { 'user': 'fred', 'age': 40, 'active': true }, + * { 'user': 'pebbles', 'age': 1, 'active': false } + * ]; + * + * _.partition(users, function(o) { return o.active; }); + * // => objects for [['fred'], ['barney', 'pebbles']] + * + * // The `_.matches` iteratee shorthand. + * _.partition(users, { 'age': 1, 'active': false }); + * // => objects for [['pebbles'], ['barney', 'fred']] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.partition(users, ['active', false]); + * // => objects for [['barney', 'pebbles'], ['fred']] + * + * // The `_.property` iteratee shorthand. + * _.partition(users, 'active'); + * // => objects for [['fred'], ['barney', 'pebbles']] + */ + var partition = createAggregator( + function (result, value, key) { + result[key ? 0 : 1].push(value); + }, + function () { + return [[], []]; + }, + ); + + /** + * Reduces `collection` to a value which is the accumulated result of running + * each element in `collection` thru `iteratee`, where each successive + * invocation is supplied the return value of the previous. If `accumulator` + * is not given, the first element of `collection` is used as the initial + * value. The iteratee is invoked with four arguments: + * (accumulator, value, index|key, collection). + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.reduce`, `_.reduceRight`, and `_.transform`. + * + * The guarded methods are: + * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`, + * and `sortBy` + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @returns {*} Returns the accumulated value. + * @see _.reduceRight + * @example + * + * _.reduce([1, 2], function(sum, n) { + * return sum + n; + * }, 0); + * // => 3 + * + * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { + * (result[value] || (result[value] = [])).push(key); + * return result; + * }, {}); + * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed) + */ + function reduce(collection, iteratee, accumulator) { + var func = isArray(collection) ? arrayReduce : baseReduce, + initAccum = arguments.length < 3; + + return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach); + } + + /** + * This method is like `_.reduce` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @returns {*} Returns the accumulated value. + * @see _.reduce + * @example + * + * var array = [[0, 1], [2, 3], [4, 5]]; + * + * _.reduceRight(array, function(flattened, other) { + * return flattened.concat(other); + * }, []); + * // => [4, 5, 2, 3, 0, 1] + */ + function reduceRight(collection, iteratee, accumulator) { + var func = isArray(collection) ? arrayReduceRight : baseReduce, + initAccum = arguments.length < 3; + + return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight); + } + + /** + * The opposite of `_.filter`; this method returns the elements of `collection` + * that `predicate` does **not** return truthy for. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + * @see _.filter + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false }, + * { 'user': 'fred', 'age': 40, 'active': true } + * ]; + * + * _.reject(users, function(o) { return !o.active; }); + * // => objects for ['fred'] + * + * // The `_.matches` iteratee shorthand. + * _.reject(users, { 'age': 40, 'active': true }); + * // => objects for ['barney'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.reject(users, ['active', false]); + * // => objects for ['fred'] + * + * // The `_.property` iteratee shorthand. + * _.reject(users, 'active'); + * // => objects for ['barney'] + */ + function reject(collection, predicate) { + var func = isArray(collection) ? arrayFilter : baseFilter; + return func(collection, negate(getIteratee(predicate, 3))); + } + + /** + * Gets a random element from `collection`. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Collection + * @param {Array|Object} collection The collection to sample. + * @returns {*} Returns the random element. + * @example + * + * _.sample([1, 2, 3, 4]); + * // => 2 + */ + function sample(collection) { + var func = isArray(collection) ? arraySample : baseSample; + return func(collection); + } + + /** + * Gets `n` random elements at unique keys from `collection` up to the + * size of `collection`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to sample. + * @param {number} [n=1] The number of elements to sample. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the random elements. + * @example + * + * _.sampleSize([1, 2, 3], 2); + * // => [3, 1] + * + * _.sampleSize([1, 2, 3], 4); + * // => [2, 3, 1] + */ + function sampleSize(collection, n, guard) { + if (guard ? isIterateeCall(collection, n, guard) : n === undefined) { + n = 1; + } else { + n = toInteger(n); + } + var func = isArray(collection) ? arraySampleSize : baseSampleSize; + return func(collection, n); + } + + /** + * Creates an array of shuffled values, using a version of the + * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to shuffle. + * @returns {Array} Returns the new shuffled array. + * @example + * + * _.shuffle([1, 2, 3, 4]); + * // => [4, 1, 3, 2] + */ + function shuffle(collection) { + var func = isArray(collection) ? arrayShuffle : baseShuffle; + return func(collection); + } + + /** + * Gets the size of `collection` by returning its length for array-like + * values or the number of own enumerable string keyed properties for objects. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object|string} collection The collection to inspect. + * @returns {number} Returns the collection size. + * @example + * + * _.size([1, 2, 3]); + * // => 3 + * + * _.size({ 'a': 1, 'b': 2 }); + * // => 2 + * + * _.size('pebbles'); + * // => 7 + */ + function size(collection) { + if (collection == null) { + return 0; + } + if (isArrayLike(collection)) { + return isString(collection) ? stringSize(collection) : collection.length; + } + var tag = getTag(collection); + if (tag == mapTag || tag == setTag) { + return collection.size; + } + return baseKeys(collection).length; + } + + /** + * Checks if `predicate` returns truthy for **any** element of `collection`. + * Iteration is stopped once `predicate` returns truthy. The predicate is + * invoked with three arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + * @example + * + * _.some([null, 0, 'yes', false], Boolean); + * // => true + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false } + * ]; + * + * // The `_.matches` iteratee shorthand. + * _.some(users, { 'user': 'barney', 'active': false }); + * // => false + * + * // The `_.matchesProperty` iteratee shorthand. + * _.some(users, ['active', false]); + * // => true + * + * // The `_.property` iteratee shorthand. + * _.some(users, 'active'); + * // => true + */ + function some(collection, predicate, guard) { + var func = isArray(collection) ? arraySome : baseSome; + if (guard && isIterateeCall(collection, predicate, guard)) { + predicate = undefined; + } + return func(collection, getIteratee(predicate, 3)); + } + + /** + * Creates an array of elements, sorted in ascending order by the results of + * running each element in a collection thru each iteratee. This method + * performs a stable sort, that is, it preserves the original sort order of + * equal elements. The iteratees are invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {...(Function|Function[])} [iteratees=[_.identity]] + * The iteratees to sort by. + * @returns {Array} Returns the new sorted array. + * @example + * + * var users = [ + * { 'user': 'fred', 'age': 48 }, + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 }, + * { 'user': 'barney', 'age': 34 } + * ]; + * + * _.sortBy(users, [function(o) { return o.user; }]); + * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]] + * + * _.sortBy(users, ['user', 'age']); + * // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]] + */ + var sortBy = baseRest(function (collection, iteratees) { + if (collection == null) { + return []; + } + var length = iteratees.length; + if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) { + iteratees = []; + } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) { + iteratees = [iteratees[0]]; + } + return baseOrderBy(collection, baseFlatten(iteratees, 1), []); + }); + + /*------------------------------------------------------------------------*/ + + /** + * Gets the timestamp of the number of milliseconds that have elapsed since + * the Unix epoch (1 January 1970 00:00:00 UTC). + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Date + * @returns {number} Returns the timestamp. + * @example + * + * _.defer(function(stamp) { + * console.log(_.now() - stamp); + * }, _.now()); + * // => Logs the number of milliseconds it took for the deferred invocation. + */ + var now = + ctxNow || + function () { + return root.Date.now(); + }; + + /*------------------------------------------------------------------------*/ + + /** + * The opposite of `_.before`; this method creates a function that invokes + * `func` once it's called `n` or more times. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {number} n The number of calls before `func` is invoked. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * var saves = ['profile', 'settings']; + * + * var done = _.after(saves.length, function() { + * console.log('done saving!'); + * }); + * + * _.forEach(saves, function(type) { + * asyncSave({ 'type': type, 'complete': done }); + * }); + * // => Logs 'done saving!' after the two async saves have completed. + */ + function after(n, func) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + n = toInteger(n); + return function () { + if (--n < 1) { + return func.apply(this, arguments); + } + }; + } + + /** + * Creates a function that invokes `func`, with up to `n` arguments, + * ignoring any additional arguments. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} func The function to cap arguments for. + * @param {number} [n=func.length] The arity cap. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the new capped function. + * @example + * + * _.map(['6', '8', '10'], _.ary(parseInt, 1)); + * // => [6, 8, 10] + */ + function ary(func, n, guard) { + n = guard ? undefined : n; + n = func && n == null ? func.length : n; + return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n); + } + + /** + * Creates a function that invokes `func`, with the `this` binding and arguments + * of the created function, while it's called less than `n` times. Subsequent + * calls to the created function return the result of the last `func` invocation. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {number} n The number of calls at which `func` is no longer invoked. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * jQuery(element).on('click', _.before(5, addContactToList)); + * // => Allows adding up to 4 contacts to the list. + */ + function before(n, func) { + var result; + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + n = toInteger(n); + return function () { + if (--n > 0) { + result = func.apply(this, arguments); + } + if (n <= 1) { + func = undefined; + } + return result; + }; + } + + /** + * Creates a function that invokes `func` with the `this` binding of `thisArg` + * and `partials` prepended to the arguments it receives. + * + * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds, + * may be used as a placeholder for partially applied arguments. + * + * **Note:** Unlike native `Function#bind`, this method doesn't set the "length" + * property of bound functions. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to bind. + * @param {*} thisArg The `this` binding of `func`. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new bound function. + * @example + * + * function greet(greeting, punctuation) { + * return greeting + ' ' + this.user + punctuation; + * } + * + * var object = { 'user': 'fred' }; + * + * var bound = _.bind(greet, object, 'hi'); + * bound('!'); + * // => 'hi fred!' + * + * // Bound with placeholders. + * var bound = _.bind(greet, object, _, '!'); + * bound('hi'); + * // => 'hi fred!' + */ + var bind = baseRest(function (func, thisArg, partials) { + var bitmask = WRAP_BIND_FLAG; + if (partials.length) { + var holders = replaceHolders(partials, getHolder(bind)); + bitmask |= WRAP_PARTIAL_FLAG; + } + return createWrap(func, bitmask, thisArg, partials, holders); + }); + + /** + * Creates a function that invokes the method at `object[key]` with `partials` + * prepended to the arguments it receives. + * + * This method differs from `_.bind` by allowing bound functions to reference + * methods that may be redefined or don't yet exist. See + * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern) + * for more details. + * + * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for partially applied arguments. + * + * @static + * @memberOf _ + * @since 0.10.0 + * @category Function + * @param {Object} object The object to invoke the method on. + * @param {string} key The key of the method. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new bound function. + * @example + * + * var object = { + * 'user': 'fred', + * 'greet': function(greeting, punctuation) { + * return greeting + ' ' + this.user + punctuation; + * } + * }; + * + * var bound = _.bindKey(object, 'greet', 'hi'); + * bound('!'); + * // => 'hi fred!' + * + * object.greet = function(greeting, punctuation) { + * return greeting + 'ya ' + this.user + punctuation; + * }; + * + * bound('!'); + * // => 'hiya fred!' + * + * // Bound with placeholders. + * var bound = _.bindKey(object, 'greet', _, '!'); + * bound('hi'); + * // => 'hiya fred!' + */ + var bindKey = baseRest(function (object, key, partials) { + var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG; + if (partials.length) { + var holders = replaceHolders(partials, getHolder(bindKey)); + bitmask |= WRAP_PARTIAL_FLAG; + } + return createWrap(key, bitmask, object, partials, holders); + }); + + /** + * Creates a function that accepts arguments of `func` and either invokes + * `func` returning its result, if at least `arity` number of arguments have + * been provided, or returns a function that accepts the remaining `func` + * arguments, and so on. The arity of `func` may be specified if `func.length` + * is not sufficient. + * + * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds, + * may be used as a placeholder for provided arguments. + * + * **Note:** This method doesn't set the "length" property of curried functions. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Function + * @param {Function} func The function to curry. + * @param {number} [arity=func.length] The arity of `func`. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the new curried function. + * @example + * + * var abc = function(a, b, c) { + * return [a, b, c]; + * }; + * + * var curried = _.curry(abc); + * + * curried(1)(2)(3); + * // => [1, 2, 3] + * + * curried(1, 2)(3); + * // => [1, 2, 3] + * + * curried(1, 2, 3); + * // => [1, 2, 3] + * + * // Curried with placeholders. + * curried(1)(_, 3)(2); + * // => [1, 2, 3] + */ + function curry(func, arity, guard) { + arity = guard ? undefined : arity; + var result = createWrap( + func, + WRAP_CURRY_FLAG, + undefined, + undefined, + undefined, + undefined, + undefined, + arity, + ); + result.placeholder = curry.placeholder; + return result; + } + + /** + * This method is like `_.curry` except that arguments are applied to `func` + * in the manner of `_.partialRight` instead of `_.partial`. + * + * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for provided arguments. + * + * **Note:** This method doesn't set the "length" property of curried functions. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} func The function to curry. + * @param {number} [arity=func.length] The arity of `func`. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the new curried function. + * @example + * + * var abc = function(a, b, c) { + * return [a, b, c]; + * }; + * + * var curried = _.curryRight(abc); + * + * curried(3)(2)(1); + * // => [1, 2, 3] + * + * curried(2, 3)(1); + * // => [1, 2, 3] + * + * curried(1, 2, 3); + * // => [1, 2, 3] + * + * // Curried with placeholders. + * curried(3)(1, _)(2); + * // => [1, 2, 3] + */ + function curryRight(func, arity, guard) { + arity = guard ? undefined : arity; + var result = createWrap( + func, + WRAP_CURRY_RIGHT_FLAG, + undefined, + undefined, + undefined, + undefined, + undefined, + arity, + ); + result.placeholder = curryRight.placeholder; + return result; + } + + /** + * Creates a debounced function that delays invoking `func` until after `wait` + * milliseconds have elapsed since the last time the debounced function was + * invoked. The debounced function comes with a `cancel` method to cancel + * delayed `func` invocations and a `flush` method to immediately invoke them. + * Provide `options` to indicate whether `func` should be invoked on the + * leading and/or trailing edge of the `wait` timeout. The `func` is invoked + * with the last arguments provided to the debounced function. Subsequent + * calls to the debounced function return the result of the last `func` + * invocation. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is + * invoked on the trailing edge of the timeout only if the debounced function + * is invoked more than once during the `wait` timeout. + * + * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred + * until to the next tick, similar to `setTimeout` with a timeout of `0`. + * + * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) + * for details over the differences between `_.debounce` and `_.throttle`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to debounce. + * @param {number} [wait=0] The number of milliseconds to delay. + * @param {Object} [options={}] The options object. + * @param {boolean} [options.leading=false] + * Specify invoking on the leading edge of the timeout. + * @param {number} [options.maxWait] + * The maximum time `func` is allowed to be delayed before it's invoked. + * @param {boolean} [options.trailing=true] + * Specify invoking on the trailing edge of the timeout. + * @returns {Function} Returns the new debounced function. + * @example + * + * // Avoid costly calculations while the window size is in flux. + * jQuery(window).on('resize', _.debounce(calculateLayout, 150)); + * + * // Invoke `sendMail` when clicked, debouncing subsequent calls. + * jQuery(element).on('click', _.debounce(sendMail, 300, { + * 'leading': true, + * 'trailing': false + * })); + * + * // Ensure `batchLog` is invoked once after 1 second of debounced calls. + * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 }); + * var source = new EventSource('/stream'); + * jQuery(source).on('message', debounced); + * + * // Cancel the trailing debounced invocation. + * jQuery(window).on('popstate', debounced.cancel); + */ + function debounce(func, wait, options) { + var lastArgs, + lastThis, + maxWait, + result, + timerId, + lastCallTime, + lastInvokeTime = 0, + leading = false, + maxing = false, + trailing = true; + + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + wait = toNumber(wait) || 0; + if (isObject(options)) { + leading = !!options.leading; + maxing = 'maxWait' in options; + maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait; + trailing = 'trailing' in options ? !!options.trailing : trailing; + } + + function invokeFunc(time) { + var args = lastArgs, + thisArg = lastThis; + + lastArgs = lastThis = undefined; + lastInvokeTime = time; + result = func.apply(thisArg, args); + return result; + } + + function leadingEdge(time) { + // Reset any `maxWait` timer. + lastInvokeTime = time; + // Start the timer for the trailing edge. + timerId = setTimeout(timerExpired, wait); + // Invoke the leading edge. + return leading ? invokeFunc(time) : result; + } + + function remainingWait(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime, + timeWaiting = wait - timeSinceLastCall; + + return maxing ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) : timeWaiting; + } + + function shouldInvoke(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime; + + // Either this is the first call, activity has stopped and we're at the + // trailing edge, the system time has gone backwards and we're treating + // it as the trailing edge, or we've hit the `maxWait` limit. + return ( + lastCallTime === undefined || + timeSinceLastCall >= wait || + timeSinceLastCall < 0 || + (maxing && timeSinceLastInvoke >= maxWait) + ); + } + + function timerExpired() { + var time = now(); + if (shouldInvoke(time)) { + return trailingEdge(time); + } + // Restart the timer. + timerId = setTimeout(timerExpired, remainingWait(time)); + } + + function trailingEdge(time) { + timerId = undefined; + + // Only invoke if we have `lastArgs` which means `func` has been + // debounced at least once. + if (trailing && lastArgs) { + return invokeFunc(time); + } + lastArgs = lastThis = undefined; + return result; + } + + function cancel() { + if (timerId !== undefined) { + clearTimeout(timerId); + } + lastInvokeTime = 0; + lastArgs = lastCallTime = lastThis = timerId = undefined; + } + + function flush() { + return timerId === undefined ? result : trailingEdge(now()); + } + + function debounced() { + var time = now(), + isInvoking = shouldInvoke(time); + + lastArgs = arguments; + lastThis = this; + lastCallTime = time; + + if (isInvoking) { + if (timerId === undefined) { + return leadingEdge(lastCallTime); + } + if (maxing) { + // Handle invocations in a tight loop. + clearTimeout(timerId); + timerId = setTimeout(timerExpired, wait); + return invokeFunc(lastCallTime); + } + } + if (timerId === undefined) { + timerId = setTimeout(timerExpired, wait); + } + return result; + } + debounced.cancel = cancel; + debounced.flush = flush; + return debounced; + } + + /** + * Defers invoking the `func` until the current call stack has cleared. Any + * additional arguments are provided to `func` when it's invoked. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to defer. + * @param {...*} [args] The arguments to invoke `func` with. + * @returns {number} Returns the timer id. + * @example + * + * _.defer(function(text) { + * console.log(text); + * }, 'deferred'); + * // => Logs 'deferred' after one millisecond. + */ + var defer = baseRest(function (func, args) { + return baseDelay(func, 1, args); + }); + + /** + * Invokes `func` after `wait` milliseconds. Any additional arguments are + * provided to `func` when it's invoked. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @param {...*} [args] The arguments to invoke `func` with. + * @returns {number} Returns the timer id. + * @example + * + * _.delay(function(text) { + * console.log(text); + * }, 1000, 'later'); + * // => Logs 'later' after one second. + */ + var delay = baseRest(function (func, wait, args) { + return baseDelay(func, toNumber(wait) || 0, args); + }); + + /** + * Creates a function that invokes `func` with arguments reversed. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Function + * @param {Function} func The function to flip arguments for. + * @returns {Function} Returns the new flipped function. + * @example + * + * var flipped = _.flip(function() { + * return _.toArray(arguments); + * }); + * + * flipped('a', 'b', 'c', 'd'); + * // => ['d', 'c', 'b', 'a'] + */ + function flip(func) { + return createWrap(func, WRAP_FLIP_FLAG); + } + + /** + * Creates a function that memoizes the result of `func`. If `resolver` is + * provided, it determines the cache key for storing the result based on the + * arguments provided to the memoized function. By default, the first argument + * provided to the memoized function is used as the map cache key. The `func` + * is invoked with the `this` binding of the memoized function. + * + * **Note:** The cache is exposed as the `cache` property on the memoized + * function. Its creation may be customized by replacing the `_.memoize.Cache` + * constructor with one whose instances implement the + * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object) + * method interface of `clear`, `delete`, `get`, `has`, and `set`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to have its output memoized. + * @param {Function} [resolver] The function to resolve the cache key. + * @returns {Function} Returns the new memoized function. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * var other = { 'c': 3, 'd': 4 }; + * + * var values = _.memoize(_.values); + * values(object); + * // => [1, 2] + * + * values(other); + * // => [3, 4] + * + * object.a = 2; + * values(object); + * // => [1, 2] + * + * // Modify the result cache. + * values.cache.set(object, ['a', 'b']); + * values(object); + * // => ['a', 'b'] + * + * // Replace `_.memoize.Cache`. + * _.memoize.Cache = WeakMap; + */ + function memoize(func, resolver) { + if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) { + throw new TypeError(FUNC_ERROR_TEXT); + } + var memoized = function () { + var args = arguments, + key = resolver ? resolver.apply(this, args) : args[0], + cache = memoized.cache; + + if (cache.has(key)) { + return cache.get(key); + } + var result = func.apply(this, args); + memoized.cache = cache.set(key, result) || cache; + return result; + }; + memoized.cache = new (memoize.Cache || MapCache)(); + return memoized; + } + + // Expose `MapCache`. + memoize.Cache = MapCache; + + /** + * Creates a function that negates the result of the predicate `func`. The + * `func` predicate is invoked with the `this` binding and arguments of the + * created function. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} predicate The predicate to negate. + * @returns {Function} Returns the new negated function. + * @example + * + * function isEven(n) { + * return n % 2 == 0; + * } + * + * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven)); + * // => [1, 3, 5] + */ + function negate(predicate) { + if (typeof predicate != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + return function () { + var args = arguments; + switch (args.length) { + case 0: + return !predicate.call(this); + case 1: + return !predicate.call(this, args[0]); + case 2: + return !predicate.call(this, args[0], args[1]); + case 3: + return !predicate.call(this, args[0], args[1], args[2]); + } + return !predicate.apply(this, args); + }; + } + + /** + * Creates a function that is restricted to invoking `func` once. Repeat calls + * to the function return the value of the first invocation. The `func` is + * invoked with the `this` binding and arguments of the created function. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * var initialize = _.once(createApplication); + * initialize(); + * initialize(); + * // => `createApplication` is invoked once + */ + function once(func) { + return before(2, func); + } + + /** + * Creates a function that invokes `func` with its arguments transformed. + * + * @static + * @since 4.0.0 + * @memberOf _ + * @category Function + * @param {Function} func The function to wrap. + * @param {...(Function|Function[])} [transforms=[_.identity]] + * The argument transforms. + * @returns {Function} Returns the new function. + * @example + * + * function doubled(n) { + * return n * 2; + * } + * + * function square(n) { + * return n * n; + * } + * + * var func = _.overArgs(function(x, y) { + * return [x, y]; + * }, [square, doubled]); + * + * func(9, 3); + * // => [81, 6] + * + * func(10, 5); + * // => [100, 10] + */ + var overArgs = castRest(function (func, transforms) { + transforms = + transforms.length == 1 && isArray(transforms[0]) + ? arrayMap(transforms[0], baseUnary(getIteratee())) + : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee())); + + var funcsLength = transforms.length; + return baseRest(function (args) { + var index = -1, + length = nativeMin(args.length, funcsLength); + + while (++index < length) { + args[index] = transforms[index].call(this, args[index]); + } + return apply(func, this, args); + }); + }); + + /** + * Creates a function that invokes `func` with `partials` prepended to the + * arguments it receives. This method is like `_.bind` except it does **not** + * alter the `this` binding. + * + * The `_.partial.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for partially applied arguments. + * + * **Note:** This method doesn't set the "length" property of partially + * applied functions. + * + * @static + * @memberOf _ + * @since 0.2.0 + * @category Function + * @param {Function} func The function to partially apply arguments to. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new partially applied function. + * @example + * + * function greet(greeting, name) { + * return greeting + ' ' + name; + * } + * + * var sayHelloTo = _.partial(greet, 'hello'); + * sayHelloTo('fred'); + * // => 'hello fred' + * + * // Partially applied with placeholders. + * var greetFred = _.partial(greet, _, 'fred'); + * greetFred('hi'); + * // => 'hi fred' + */ + var partial = baseRest(function (func, partials) { + var holders = replaceHolders(partials, getHolder(partial)); + return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders); + }); + + /** + * This method is like `_.partial` except that partially applied arguments + * are appended to the arguments it receives. + * + * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for partially applied arguments. + * + * **Note:** This method doesn't set the "length" property of partially + * applied functions. + * + * @static + * @memberOf _ + * @since 1.0.0 + * @category Function + * @param {Function} func The function to partially apply arguments to. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new partially applied function. + * @example + * + * function greet(greeting, name) { + * return greeting + ' ' + name; + * } + * + * var greetFred = _.partialRight(greet, 'fred'); + * greetFred('hi'); + * // => 'hi fred' + * + * // Partially applied with placeholders. + * var sayHelloTo = _.partialRight(greet, 'hello', _); + * sayHelloTo('fred'); + * // => 'hello fred' + */ + var partialRight = baseRest(function (func, partials) { + var holders = replaceHolders(partials, getHolder(partialRight)); + return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders); + }); + + /** + * Creates a function that invokes `func` with arguments arranged according + * to the specified `indexes` where the argument value at the first index is + * provided as the first argument, the argument value at the second index is + * provided as the second argument, and so on. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} func The function to rearrange arguments for. + * @param {...(number|number[])} indexes The arranged argument indexes. + * @returns {Function} Returns the new function. + * @example + * + * var rearged = _.rearg(function(a, b, c) { + * return [a, b, c]; + * }, [2, 0, 1]); + * + * rearged('b', 'c', 'a') + * // => ['a', 'b', 'c'] + */ + var rearg = flatRest(function (func, indexes) { + return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes); + }); + + /** + * Creates a function that invokes `func` with the `this` binding of the + * created function and arguments from `start` and beyond provided as + * an array. + * + * **Note:** This method is based on the + * [rest parameter](https://mdn.io/rest_parameters). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Function + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + * @example + * + * var say = _.rest(function(what, names) { + * return what + ' ' + _.initial(names).join(', ') + + * (_.size(names) > 1 ? ', & ' : '') + _.last(names); + * }); + * + * say('hello', 'fred', 'barney', 'pebbles'); + * // => 'hello fred, barney, & pebbles' + */ + function rest(func, start) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + start = start === undefined ? start : toInteger(start); + return baseRest(func, start); + } + + /** + * Creates a function that invokes `func` with the `this` binding of the + * create function and an array of arguments much like + * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply). + * + * **Note:** This method is based on the + * [spread operator](https://mdn.io/spread_operator). + * + * @static + * @memberOf _ + * @since 3.2.0 + * @category Function + * @param {Function} func The function to spread arguments over. + * @param {number} [start=0] The start position of the spread. + * @returns {Function} Returns the new function. + * @example + * + * var say = _.spread(function(who, what) { + * return who + ' says ' + what; + * }); + * + * say(['fred', 'hello']); + * // => 'fred says hello' + * + * var numbers = Promise.all([ + * Promise.resolve(40), + * Promise.resolve(36) + * ]); + * + * numbers.then(_.spread(function(x, y) { + * return x + y; + * })); + * // => a Promise of 76 + */ + function spread(func, start) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + start = start == null ? 0 : nativeMax(toInteger(start), 0); + return baseRest(function (args) { + var array = args[start], + otherArgs = castSlice(args, 0, start); + + if (array) { + arrayPush(otherArgs, array); + } + return apply(func, this, otherArgs); + }); + } + + /** + * Creates a throttled function that only invokes `func` at most once per + * every `wait` milliseconds. The throttled function comes with a `cancel` + * method to cancel delayed `func` invocations and a `flush` method to + * immediately invoke them. Provide `options` to indicate whether `func` + * should be invoked on the leading and/or trailing edge of the `wait` + * timeout. The `func` is invoked with the last arguments provided to the + * throttled function. Subsequent calls to the throttled function return the + * result of the last `func` invocation. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is + * invoked on the trailing edge of the timeout only if the throttled function + * is invoked more than once during the `wait` timeout. + * + * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred + * until to the next tick, similar to `setTimeout` with a timeout of `0`. + * + * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) + * for details over the differences between `_.throttle` and `_.debounce`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to throttle. + * @param {number} [wait=0] The number of milliseconds to throttle invocations to. + * @param {Object} [options={}] The options object. + * @param {boolean} [options.leading=true] + * Specify invoking on the leading edge of the timeout. + * @param {boolean} [options.trailing=true] + * Specify invoking on the trailing edge of the timeout. + * @returns {Function} Returns the new throttled function. + * @example + * + * // Avoid excessively updating the position while scrolling. + * jQuery(window).on('scroll', _.throttle(updatePosition, 100)); + * + * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes. + * var throttled = _.throttle(renewToken, 300000, { 'trailing': false }); + * jQuery(element).on('click', throttled); + * + * // Cancel the trailing throttled invocation. + * jQuery(window).on('popstate', throttled.cancel); + */ + function throttle(func, wait, options) { + var leading = true, + trailing = true; + + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + if (isObject(options)) { + leading = 'leading' in options ? !!options.leading : leading; + trailing = 'trailing' in options ? !!options.trailing : trailing; + } + return debounce(func, wait, { + leading: leading, + maxWait: wait, + trailing: trailing, + }); + } + + /** + * Creates a function that accepts up to one argument, ignoring any + * additional arguments. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Function + * @param {Function} func The function to cap arguments for. + * @returns {Function} Returns the new capped function. + * @example + * + * _.map(['6', '8', '10'], _.unary(parseInt)); + * // => [6, 8, 10] + */ + function unary(func) { + return ary(func, 1); + } + + /** + * Creates a function that provides `value` to `wrapper` as its first + * argument. Any additional arguments provided to the function are appended + * to those provided to the `wrapper`. The wrapper is invoked with the `this` + * binding of the created function. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {*} value The value to wrap. + * @param {Function} [wrapper=identity] The wrapper function. + * @returns {Function} Returns the new function. + * @example + * + * var p = _.wrap(_.escape, function(func, text) { + * return '<p>' + func(text) + '</p>'; + * }); + * + * p('fred, barney, & pebbles'); + * // => '<p>fred, barney, & pebbles</p>' + */ + function wrap(value, wrapper) { + return partial(castFunction(wrapper), value); + } + + /*------------------------------------------------------------------------*/ + + /** + * Casts `value` as an array if it's not one. + * + * @static + * @memberOf _ + * @since 4.4.0 + * @category Lang + * @param {*} value The value to inspect. + * @returns {Array} Returns the cast array. + * @example + * + * _.castArray(1); + * // => [1] + * + * _.castArray({ 'a': 1 }); + * // => [{ 'a': 1 }] + * + * _.castArray('abc'); + * // => ['abc'] + * + * _.castArray(null); + * // => [null] + * + * _.castArray(undefined); + * // => [undefined] + * + * _.castArray(); + * // => [] + * + * var array = [1, 2, 3]; + * console.log(_.castArray(array) === array); + * // => true + */ + function castArray() { + if (!arguments.length) { + return []; + } + var value = arguments[0]; + return isArray(value) ? value : [value]; + } + + /** + * Creates a shallow clone of `value`. + * + * **Note:** This method is loosely based on the + * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm) + * and supports cloning arrays, array buffers, booleans, date objects, maps, + * numbers, `Object` objects, regexes, sets, strings, symbols, and typed + * arrays. The own enumerable properties of `arguments` objects are cloned + * as plain objects. An empty object is returned for uncloneable values such + * as error objects, functions, DOM nodes, and WeakMaps. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to clone. + * @returns {*} Returns the cloned value. + * @see _.cloneDeep + * @example + * + * var objects = [{ 'a': 1 }, { 'b': 2 }]; + * + * var shallow = _.clone(objects); + * console.log(shallow[0] === objects[0]); + * // => true + */ + function clone(value) { + return baseClone(value, CLONE_SYMBOLS_FLAG); + } + + /** + * This method is like `_.clone` except that it accepts `customizer` which + * is invoked to produce the cloned value. If `customizer` returns `undefined`, + * cloning is handled by the method instead. The `customizer` is invoked with + * up to four arguments; (value [, index|key, object, stack]). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to clone. + * @param {Function} [customizer] The function to customize cloning. + * @returns {*} Returns the cloned value. + * @see _.cloneDeepWith + * @example + * + * function customizer(value) { + * if (_.isElement(value)) { + * return value.cloneNode(false); + * } + * } + * + * var el = _.cloneWith(document.body, customizer); + * + * console.log(el === document.body); + * // => false + * console.log(el.nodeName); + * // => 'BODY' + * console.log(el.childNodes.length); + * // => 0 + */ + function cloneWith(value, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return baseClone(value, CLONE_SYMBOLS_FLAG, customizer); + } + + /** + * This method is like `_.clone` except that it recursively clones `value`. + * + * @static + * @memberOf _ + * @since 1.0.0 + * @category Lang + * @param {*} value The value to recursively clone. + * @returns {*} Returns the deep cloned value. + * @see _.clone + * @example + * + * var objects = [{ 'a': 1 }, { 'b': 2 }]; + * + * var deep = _.cloneDeep(objects); + * console.log(deep[0] === objects[0]); + * // => false + */ + function cloneDeep(value) { + return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG); + } + + /** + * This method is like `_.cloneWith` except that it recursively clones `value`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to recursively clone. + * @param {Function} [customizer] The function to customize cloning. + * @returns {*} Returns the deep cloned value. + * @see _.cloneWith + * @example + * + * function customizer(value) { + * if (_.isElement(value)) { + * return value.cloneNode(true); + * } + * } + * + * var el = _.cloneDeepWith(document.body, customizer); + * + * console.log(el === document.body); + * // => false + * console.log(el.nodeName); + * // => 'BODY' + * console.log(el.childNodes.length); + * // => 20 + */ + function cloneDeepWith(value, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer); + } + + /** + * Checks if `object` conforms to `source` by invoking the predicate + * properties of `source` with the corresponding property values of `object`. + * + * **Note:** This method is equivalent to `_.conforms` when `source` is + * partially applied. + * + * @static + * @memberOf _ + * @since 4.14.0 + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property predicates to conform to. + * @returns {boolean} Returns `true` if `object` conforms, else `false`. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * + * _.conformsTo(object, { 'b': function(n) { return n > 1; } }); + * // => true + * + * _.conformsTo(object, { 'b': function(n) { return n > 2; } }); + * // => false + */ + function conformsTo(object, source) { + return source == null || baseConformsTo(object, source, keys(source)); + } + + /** + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ + function eq(value, other) { + return value === other || (value !== value && other !== other); + } + + /** + * Checks if `value` is greater than `other`. + * + * @static + * @memberOf _ + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than `other`, + * else `false`. + * @see _.lt + * @example + * + * _.gt(3, 1); + * // => true + * + * _.gt(3, 3); + * // => false + * + * _.gt(1, 3); + * // => false + */ + var gt = createRelationalOperation(baseGt); + + /** + * Checks if `value` is greater than or equal to `other`. + * + * @static + * @memberOf _ + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than or equal to + * `other`, else `false`. + * @see _.lte + * @example + * + * _.gte(3, 1); + * // => true + * + * _.gte(3, 3); + * // => true + * + * _.gte(1, 3); + * // => false + */ + var gte = createRelationalOperation(function (value, other) { + return value >= other; + }); + + /** + * Checks if `value` is likely an `arguments` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + * else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ + var isArguments = baseIsArguments( + (function () { + return arguments; + })(), + ) + ? baseIsArguments + : function (value) { + return ( + isObjectLike(value) && + hasOwnProperty.call(value, 'callee') && + !propertyIsEnumerable.call(value, 'callee') + ); + }; + + /** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ + var isArray = Array.isArray; + + /** + * Checks if `value` is classified as an `ArrayBuffer` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`. + * @example + * + * _.isArrayBuffer(new ArrayBuffer(2)); + * // => true + * + * _.isArrayBuffer(new Array(2)); + * // => false + */ + var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer; + + /** + * Checks if `value` is array-like. A value is considered array-like if it's + * not a function and has a `value.length` that's an integer greater than or + * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + * @example + * + * _.isArrayLike([1, 2, 3]); + * // => true + * + * _.isArrayLike(document.body.children); + * // => true + * + * _.isArrayLike('abc'); + * // => true + * + * _.isArrayLike(_.noop); + * // => false + */ + function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); + } + + /** + * This method is like `_.isArrayLike` except that it also checks if `value` + * is an object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array-like object, + * else `false`. + * @example + * + * _.isArrayLikeObject([1, 2, 3]); + * // => true + * + * _.isArrayLikeObject(document.body.children); + * // => true + * + * _.isArrayLikeObject('abc'); + * // => false + * + * _.isArrayLikeObject(_.noop); + * // => false + */ + function isArrayLikeObject(value) { + return isObjectLike(value) && isArrayLike(value); + } + + /** + * Checks if `value` is classified as a boolean primitive or object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a boolean, else `false`. + * @example + * + * _.isBoolean(false); + * // => true + * + * _.isBoolean(null); + * // => false + */ + function isBoolean(value) { + return ( + value === true || value === false || (isObjectLike(value) && baseGetTag(value) == boolTag) + ); + } + + /** + * Checks if `value` is a buffer. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. + * @example + * + * _.isBuffer(new Buffer(2)); + * // => true + * + * _.isBuffer(new Uint8Array(2)); + * // => false + */ + var isBuffer = nativeIsBuffer || stubFalse; + + /** + * Checks if `value` is classified as a `Date` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a date object, else `false`. + * @example + * + * _.isDate(new Date); + * // => true + * + * _.isDate('Mon April 23 2012'); + * // => false + */ + var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate; + + /** + * Checks if `value` is likely a DOM element. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`. + * @example + * + * _.isElement(document.body); + * // => true + * + * _.isElement('<body>'); + * // => false + */ + function isElement(value) { + return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value); + } + + /** + * Checks if `value` is an empty object, collection, map, or set. + * + * Objects are considered empty if they have no own enumerable string keyed + * properties. + * + * Array-like values such as `arguments` objects, arrays, buffers, strings, or + * jQuery-like collections are considered empty if they have a `length` of `0`. + * Similarly, maps and sets are considered empty if they have a `size` of `0`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is empty, else `false`. + * @example + * + * _.isEmpty(null); + * // => true + * + * _.isEmpty(true); + * // => true + * + * _.isEmpty(1); + * // => true + * + * _.isEmpty([1, 2, 3]); + * // => false + * + * _.isEmpty({ 'a': 1 }); + * // => false + */ + function isEmpty(value) { + if (value == null) { + return true; + } + if ( + isArrayLike(value) && + (isArray(value) || + typeof value == 'string' || + typeof value.splice == 'function' || + isBuffer(value) || + isTypedArray(value) || + isArguments(value)) + ) { + return !value.length; + } + var tag = getTag(value); + if (tag == mapTag || tag == setTag) { + return !value.size; + } + if (isPrototype(value)) { + return !baseKeys(value).length; + } + for (var key in value) { + if (hasOwnProperty.call(value, key)) { + return false; + } + } + return true; + } + + /** + * Performs a deep comparison between two values to determine if they are + * equivalent. + * + * **Note:** This method supports comparing arrays, array buffers, booleans, + * date objects, error objects, maps, numbers, `Object` objects, regexes, + * sets, strings, symbols, and typed arrays. `Object` objects are compared + * by their own, not inherited, enumerable properties. Functions and DOM + * nodes are compared by strict equality, i.e. `===`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.isEqual(object, other); + * // => true + * + * object === other; + * // => false + */ + function isEqual(value, other) { + return baseIsEqual(value, other); + } + + /** + * This method is like `_.isEqual` except that it accepts `customizer` which + * is invoked to compare values. If `customizer` returns `undefined`, comparisons + * are handled by the method instead. The `customizer` is invoked with up to + * six arguments: (objValue, othValue [, index|key, object, other, stack]). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * function isGreeting(value) { + * return /^h(?:i|ello)$/.test(value); + * } + * + * function customizer(objValue, othValue) { + * if (isGreeting(objValue) && isGreeting(othValue)) { + * return true; + * } + * } + * + * var array = ['hello', 'goodbye']; + * var other = ['hi', 'goodbye']; + * + * _.isEqualWith(array, other, customizer); + * // => true + */ + function isEqualWith(value, other, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + var result = customizer ? customizer(value, other) : undefined; + return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result; + } + + /** + * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`, + * `SyntaxError`, `TypeError`, or `URIError` object. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an error object, else `false`. + * @example + * + * _.isError(new Error); + * // => true + * + * _.isError(Error); + * // => false + */ + function isError(value) { + if (!isObjectLike(value)) { + return false; + } + var tag = baseGetTag(value); + return ( + tag == errorTag || + tag == domExcTag || + (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value)) + ); + } + + /** + * Checks if `value` is a finite primitive number. + * + * **Note:** This method is based on + * [`Number.isFinite`](https://mdn.io/Number/isFinite). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a finite number, else `false`. + * @example + * + * _.isFinite(3); + * // => true + * + * _.isFinite(Number.MIN_VALUE); + * // => true + * + * _.isFinite(Infinity); + * // => false + * + * _.isFinite('3'); + * // => false + */ + function isFinite(value) { + return typeof value == 'number' && nativeIsFinite(value); + } + + /** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ + function isFunction(value) { + if (!isObject(value)) { + return false; + } + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 9 which returns 'object' for typed arrays and other constructors. + var tag = baseGetTag(value); + return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; + } + + /** + * Checks if `value` is an integer. + * + * **Note:** This method is based on + * [`Number.isInteger`](https://mdn.io/Number/isInteger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an integer, else `false`. + * @example + * + * _.isInteger(3); + * // => true + * + * _.isInteger(Number.MIN_VALUE); + * // => false + * + * _.isInteger(Infinity); + * // => false + * + * _.isInteger('3'); + * // => false + */ + function isInteger(value) { + return typeof value == 'number' && value == toInteger(value); + } + + /** + * Checks if `value` is a valid array-like length. + * + * **Note:** This method is loosely based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @example + * + * _.isLength(3); + * // => true + * + * _.isLength(Number.MIN_VALUE); + * // => false + * + * _.isLength(Infinity); + * // => false + * + * _.isLength('3'); + * // => false + */ + function isLength(value) { + return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + + /** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ + function isObject(value) { + var type = typeof value; + return value != null && (type == 'object' || type == 'function'); + } + + /** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ + function isObjectLike(value) { + return value != null && typeof value == 'object'; + } + + /** + * Checks if `value` is classified as a `Map` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a map, else `false`. + * @example + * + * _.isMap(new Map); + * // => true + * + * _.isMap(new WeakMap); + * // => false + */ + var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap; + + /** + * Performs a partial deep comparison between `object` and `source` to + * determine if `object` contains equivalent property values. + * + * **Note:** This method is equivalent to `_.matches` when `source` is + * partially applied. + * + * Partial comparisons will match empty array and empty object `source` + * values against any array or object value, respectively. See `_.isEqual` + * for a list of supported value comparisons. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * + * _.isMatch(object, { 'b': 2 }); + * // => true + * + * _.isMatch(object, { 'b': 1 }); + * // => false + */ + function isMatch(object, source) { + return object === source || baseIsMatch(object, source, getMatchData(source)); + } + + /** + * This method is like `_.isMatch` except that it accepts `customizer` which + * is invoked to compare values. If `customizer` returns `undefined`, comparisons + * are handled by the method instead. The `customizer` is invoked with five + * arguments: (objValue, srcValue, index|key, object, source). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + * @example + * + * function isGreeting(value) { + * return /^h(?:i|ello)$/.test(value); + * } + * + * function customizer(objValue, srcValue) { + * if (isGreeting(objValue) && isGreeting(srcValue)) { + * return true; + * } + * } + * + * var object = { 'greeting': 'hello' }; + * var source = { 'greeting': 'hi' }; + * + * _.isMatchWith(object, source, customizer); + * // => true + */ + function isMatchWith(object, source, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return baseIsMatch(object, source, getMatchData(source), customizer); + } + + /** + * Checks if `value` is `NaN`. + * + * **Note:** This method is based on + * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as + * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for + * `undefined` and other non-number values. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + * @example + * + * _.isNaN(NaN); + * // => true + * + * _.isNaN(new Number(NaN)); + * // => true + * + * isNaN(undefined); + * // => true + * + * _.isNaN(undefined); + * // => false + */ + function isNaN(value) { + // An `NaN` primitive is the only value that is not equal to itself. + // Perform the `toStringTag` check first to avoid errors with some + // ActiveX objects in IE. + return isNumber(value) && value != +value; + } + + /** + * Checks if `value` is a pristine native function. + * + * **Note:** This method can't reliably detect native functions in the presence + * of the core-js package because core-js circumvents this kind of detection. + * Despite multiple requests, the core-js maintainer has made it clear: any + * attempt to fix the detection will be obstructed. As a result, we're left + * with little choice but to throw an error. Unfortunately, this also affects + * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill), + * which rely on core-js. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + * @example + * + * _.isNative(Array.prototype.push); + * // => true + * + * _.isNative(_); + * // => false + */ + function isNative(value) { + if (isMaskable(value)) { + throw new Error(CORE_ERROR_TEXT); + } + return baseIsNative(value); + } + + /** + * Checks if `value` is `null`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `null`, else `false`. + * @example + * + * _.isNull(null); + * // => true + * + * _.isNull(void 0); + * // => false + */ + function isNull(value) { + return value === null; + } + + /** + * Checks if `value` is `null` or `undefined`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is nullish, else `false`. + * @example + * + * _.isNil(null); + * // => true + * + * _.isNil(void 0); + * // => true + * + * _.isNil(NaN); + * // => false + */ + function isNil(value) { + return value == null; + } + + /** + * Checks if `value` is classified as a `Number` primitive or object. + * + * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are + * classified as numbers, use the `_.isFinite` method. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a number, else `false`. + * @example + * + * _.isNumber(3); + * // => true + * + * _.isNumber(Number.MIN_VALUE); + * // => true + * + * _.isNumber(Infinity); + * // => true + * + * _.isNumber('3'); + * // => false + */ + function isNumber(value) { + return typeof value == 'number' || (isObjectLike(value) && baseGetTag(value) == numberTag); + } + + /** + * Checks if `value` is a plain object, that is, an object created by the + * `Object` constructor or one with a `[[Prototype]]` of `null`. + * + * @static + * @memberOf _ + * @since 0.8.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * _.isPlainObject(new Foo); + * // => false + * + * _.isPlainObject([1, 2, 3]); + * // => false + * + * _.isPlainObject({ 'x': 0, 'y': 0 }); + * // => true + * + * _.isPlainObject(Object.create(null)); + * // => true + */ + function isPlainObject(value) { + if (!isObjectLike(value) || baseGetTag(value) != objectTag) { + return false; + } + var proto = getPrototype(value); + if (proto === null) { + return true; + } + var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; + return ( + typeof Ctor == 'function' && + Ctor instanceof Ctor && + funcToString.call(Ctor) == objectCtorString + ); + } + + /** + * Checks if `value` is classified as a `RegExp` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. + * @example + * + * _.isRegExp(/abc/); + * // => true + * + * _.isRegExp('/abc/'); + * // => false + */ + var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp; + + /** + * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754 + * double precision number which isn't the result of a rounded unsafe integer. + * + * **Note:** This method is based on + * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`. + * @example + * + * _.isSafeInteger(3); + * // => true + * + * _.isSafeInteger(Number.MIN_VALUE); + * // => false + * + * _.isSafeInteger(Infinity); + * // => false + * + * _.isSafeInteger('3'); + * // => false + */ + function isSafeInteger(value) { + return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER; + } + + /** + * Checks if `value` is classified as a `Set` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a set, else `false`. + * @example + * + * _.isSet(new Set); + * // => true + * + * _.isSet(new WeakSet); + * // => false + */ + var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet; + + /** + * Checks if `value` is classified as a `String` primitive or object. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a string, else `false`. + * @example + * + * _.isString('abc'); + * // => true + * + * _.isString(1); + * // => false + */ + function isString(value) { + return ( + typeof value == 'string' || + (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag) + ); + } + + /** + * Checks if `value` is classified as a `Symbol` primitive or object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ + function isSymbol(value) { + return typeof value == 'symbol' || (isObjectLike(value) && baseGetTag(value) == symbolTag); + } + + /** + * Checks if `value` is classified as a typed array. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + * @example + * + * _.isTypedArray(new Uint8Array); + * // => true + * + * _.isTypedArray([]); + * // => false + */ + var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; + + /** + * Checks if `value` is `undefined`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`. + * @example + * + * _.isUndefined(void 0); + * // => true + * + * _.isUndefined(null); + * // => false + */ + function isUndefined(value) { + return value === undefined; + } + + /** + * Checks if `value` is classified as a `WeakMap` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a weak map, else `false`. + * @example + * + * _.isWeakMap(new WeakMap); + * // => true + * + * _.isWeakMap(new Map); + * // => false + */ + function isWeakMap(value) { + return isObjectLike(value) && getTag(value) == weakMapTag; + } + + /** + * Checks if `value` is classified as a `WeakSet` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a weak set, else `false`. + * @example + * + * _.isWeakSet(new WeakSet); + * // => true + * + * _.isWeakSet(new Set); + * // => false + */ + function isWeakSet(value) { + return isObjectLike(value) && baseGetTag(value) == weakSetTag; + } + + /** + * Checks if `value` is less than `other`. + * + * @static + * @memberOf _ + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than `other`, + * else `false`. + * @see _.gt + * @example + * + * _.lt(1, 3); + * // => true + * + * _.lt(3, 3); + * // => false + * + * _.lt(3, 1); + * // => false + */ + var lt = createRelationalOperation(baseLt); + + /** + * Checks if `value` is less than or equal to `other`. + * + * @static + * @memberOf _ + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than or equal to + * `other`, else `false`. + * @see _.gte + * @example + * + * _.lte(1, 3); + * // => true + * + * _.lte(3, 3); + * // => true + * + * _.lte(3, 1); + * // => false + */ + var lte = createRelationalOperation(function (value, other) { + return value <= other; + }); + + /** + * Converts `value` to an array. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to convert. + * @returns {Array} Returns the converted array. + * @example + * + * _.toArray({ 'a': 1, 'b': 2 }); + * // => [1, 2] + * + * _.toArray('abc'); + * // => ['a', 'b', 'c'] + * + * _.toArray(1); + * // => [] + * + * _.toArray(null); + * // => [] + */ + function toArray(value) { + if (!value) { + return []; + } + if (isArrayLike(value)) { + return isString(value) ? stringToArray(value) : copyArray(value); + } + if (symIterator && value[symIterator]) { + return iteratorToArray(value[symIterator]()); + } + var tag = getTag(value), + func = tag == mapTag ? mapToArray : tag == setTag ? setToArray : values; + + return func(value); + } + + /** + * Converts `value` to a finite number. + * + * @static + * @memberOf _ + * @since 4.12.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted number. + * @example + * + * _.toFinite(3.2); + * // => 3.2 + * + * _.toFinite(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toFinite(Infinity); + * // => 1.7976931348623157e+308 + * + * _.toFinite('3.2'); + * // => 3.2 + */ + function toFinite(value) { + if (!value) { + return value === 0 ? value : 0; + } + value = toNumber(value); + if (value === INFINITY || value === -INFINITY) { + var sign = value < 0 ? -1 : 1; + return sign * MAX_INTEGER; + } + return value === value ? value : 0; + } + + /** + * Converts `value` to an integer. + * + * **Note:** This method is loosely based on + * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted integer. + * @example + * + * _.toInteger(3.2); + * // => 3 + * + * _.toInteger(Number.MIN_VALUE); + * // => 0 + * + * _.toInteger(Infinity); + * // => 1.7976931348623157e+308 + * + * _.toInteger('3.2'); + * // => 3 + */ + function toInteger(value) { + var result = toFinite(value), + remainder = result % 1; + + return result === result ? (remainder ? result - remainder : result) : 0; + } + + /** + * Converts `value` to an integer suitable for use as the length of an + * array-like object. + * + * **Note:** This method is based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted integer. + * @example + * + * _.toLength(3.2); + * // => 3 + * + * _.toLength(Number.MIN_VALUE); + * // => 0 + * + * _.toLength(Infinity); + * // => 4294967295 + * + * _.toLength('3.2'); + * // => 3 + */ + function toLength(value) { + return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0; + } + + /** + * Converts `value` to a number. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to process. + * @returns {number} Returns the number. + * @example + * + * _.toNumber(3.2); + * // => 3.2 + * + * _.toNumber(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toNumber(Infinity); + * // => Infinity + * + * _.toNumber('3.2'); + * // => 3.2 + */ + function toNumber(value) { + if (typeof value == 'number') { + return value; + } + if (isSymbol(value)) { + return NAN; + } + if (isObject(value)) { + var other = typeof value.valueOf == 'function' ? value.valueOf() : value; + value = isObject(other) ? other + '' : other; + } + if (typeof value != 'string') { + return value === 0 ? value : +value; + } + value = value.replace(reTrim, ''); + var isBinary = reIsBinary.test(value); + return isBinary || reIsOctal.test(value) + ? freeParseInt(value.slice(2), isBinary ? 2 : 8) + : reIsBadHex.test(value) + ? NAN + : +value; + } + + /** + * Converts `value` to a plain object flattening inherited enumerable string + * keyed properties of `value` to own properties of the plain object. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {Object} Returns the converted plain object. + * @example + * + * function Foo() { + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.assign({ 'a': 1 }, new Foo); + * // => { 'a': 1, 'b': 2 } + * + * _.assign({ 'a': 1 }, _.toPlainObject(new Foo)); + * // => { 'a': 1, 'b': 2, 'c': 3 } + */ + function toPlainObject(value) { + return copyObject(value, keysIn(value)); + } + + /** + * Converts `value` to a safe integer. A safe integer can be compared and + * represented correctly. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted integer. + * @example + * + * _.toSafeInteger(3.2); + * // => 3 + * + * _.toSafeInteger(Number.MIN_VALUE); + * // => 0 + * + * _.toSafeInteger(Infinity); + * // => 9007199254740991 + * + * _.toSafeInteger('3.2'); + * // => 3 + */ + function toSafeInteger(value) { + return value + ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER) + : value === 0 + ? value + : 0; + } + + /** + * Converts `value` to a string. An empty string is returned for `null` + * and `undefined` values. The sign of `-0` is preserved. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + * @example + * + * _.toString(null); + * // => '' + * + * _.toString(-0); + * // => '-0' + * + * _.toString([1, 2, 3]); + * // => '1,2,3' + */ + function toString(value) { + return value == null ? '' : baseToString(value); + } + + /*------------------------------------------------------------------------*/ + + /** + * Assigns own enumerable string keyed properties of source objects to the + * destination object. Source objects are applied from left to right. + * Subsequent sources overwrite property assignments of previous sources. + * + * **Note:** This method mutates `object` and is loosely based on + * [`Object.assign`](https://mdn.io/Object/assign). + * + * @static + * @memberOf _ + * @since 0.10.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.assignIn + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * function Bar() { + * this.c = 3; + * } + * + * Foo.prototype.b = 2; + * Bar.prototype.d = 4; + * + * _.assign({ 'a': 0 }, new Foo, new Bar); + * // => { 'a': 1, 'c': 3 } + */ + var assign = createAssigner(function (object, source) { + if (isPrototype(source) || isArrayLike(source)) { + copyObject(source, keys(source), object); + return; + } + for (var key in source) { + if (hasOwnProperty.call(source, key)) { + assignValue(object, key, source[key]); + } + } + }); + + /** + * This method is like `_.assign` except that it iterates over own and + * inherited source properties. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias extend + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.assign + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * function Bar() { + * this.c = 3; + * } + * + * Foo.prototype.b = 2; + * Bar.prototype.d = 4; + * + * _.assignIn({ 'a': 0 }, new Foo, new Bar); + * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 } + */ + var assignIn = createAssigner(function (object, source) { + copyObject(source, keysIn(source), object); + }); + + /** + * This method is like `_.assignIn` except that it accepts `customizer` + * which is invoked to produce the assigned values. If `customizer` returns + * `undefined`, assignment is handled by the method instead. The `customizer` + * is invoked with five arguments: (objValue, srcValue, key, object, source). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias extendWith + * @category Object + * @param {Object} object The destination object. + * @param {...Object} sources The source objects. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @see _.assignWith + * @example + * + * function customizer(objValue, srcValue) { + * return _.isUndefined(objValue) ? srcValue : objValue; + * } + * + * var defaults = _.partialRight(_.assignInWith, customizer); + * + * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ + var assignInWith = createAssigner(function (object, source, srcIndex, customizer) { + copyObject(source, keysIn(source), object, customizer); + }); + + /** + * This method is like `_.assign` except that it accepts `customizer` + * which is invoked to produce the assigned values. If `customizer` returns + * `undefined`, assignment is handled by the method instead. The `customizer` + * is invoked with five arguments: (objValue, srcValue, key, object, source). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} sources The source objects. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @see _.assignInWith + * @example + * + * function customizer(objValue, srcValue) { + * return _.isUndefined(objValue) ? srcValue : objValue; + * } + * + * var defaults = _.partialRight(_.assignWith, customizer); + * + * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ + var assignWith = createAssigner(function (object, source, srcIndex, customizer) { + copyObject(source, keys(source), object, customizer); + }); + + /** + * Creates an array of values corresponding to `paths` of `object`. + * + * @static + * @memberOf _ + * @since 1.0.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {...(string|string[])} [paths] The property paths to pick. + * @returns {Array} Returns the picked values. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] }; + * + * _.at(object, ['a[0].b.c', 'a[1]']); + * // => [3, 4] + */ + var at = flatRest(baseAt); + + /** + * Creates an object that inherits from the `prototype` object. If a + * `properties` object is given, its own enumerable string keyed properties + * are assigned to the created object. + * + * @static + * @memberOf _ + * @since 2.3.0 + * @category Object + * @param {Object} prototype The object to inherit from. + * @param {Object} [properties] The properties to assign to the object. + * @returns {Object} Returns the new object. + * @example + * + * function Shape() { + * this.x = 0; + * this.y = 0; + * } + * + * function Circle() { + * Shape.call(this); + * } + * + * Circle.prototype = _.create(Shape.prototype, { + * 'constructor': Circle + * }); + * + * var circle = new Circle; + * circle instanceof Circle; + * // => true + * + * circle instanceof Shape; + * // => true + */ + function create(prototype, properties) { + var result = baseCreate(prototype); + return properties == null ? result : baseAssign(result, properties); + } + + /** + * Assigns own and inherited enumerable string keyed properties of source + * objects to the destination object for all destination properties that + * resolve to `undefined`. Source objects are applied from left to right. + * Once a property is set, additional values of the same property are ignored. + * + * **Note:** This method mutates `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.defaultsDeep + * @example + * + * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ + var defaults = baseRest(function (object, sources) { + object = Object(object); + + var index = -1; + var length = sources.length; + var guard = length > 2 ? sources[2] : undefined; + + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + length = 1; + } + + while (++index < length) { + var source = sources[index]; + var props = keysIn(source); + var propsIndex = -1; + var propsLength = props.length; + + while (++propsIndex < propsLength) { + var key = props[propsIndex]; + var value = object[key]; + + if ( + value === undefined || + (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key)) + ) { + object[key] = source[key]; + } + } + } + + return object; + }); + + /** + * This method is like `_.defaults` except that it recursively assigns + * default properties. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 3.10.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.defaults + * @example + * + * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } }); + * // => { 'a': { 'b': 2, 'c': 3 } } + */ + var defaultsDeep = baseRest(function (args) { + args.push(undefined, customDefaultsMerge); + return apply(mergeWith, undefined, args); + }); + + /** + * This method is like `_.find` except that it returns the key of the first + * element `predicate` returns truthy for instead of the element itself. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category Object + * @param {Object} object The object to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {string|undefined} Returns the key of the matched element, + * else `undefined`. + * @example + * + * var users = { + * 'barney': { 'age': 36, 'active': true }, + * 'fred': { 'age': 40, 'active': false }, + * 'pebbles': { 'age': 1, 'active': true } + * }; + * + * _.findKey(users, function(o) { return o.age < 40; }); + * // => 'barney' (iteration order is not guaranteed) + * + * // The `_.matches` iteratee shorthand. + * _.findKey(users, { 'age': 1, 'active': true }); + * // => 'pebbles' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findKey(users, ['active', false]); + * // => 'fred' + * + * // The `_.property` iteratee shorthand. + * _.findKey(users, 'active'); + * // => 'barney' + */ + function findKey(object, predicate) { + return baseFindKey(object, getIteratee(predicate, 3), baseForOwn); + } + + /** + * This method is like `_.findKey` except that it iterates over elements of + * a collection in the opposite order. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Object + * @param {Object} object The object to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {string|undefined} Returns the key of the matched element, + * else `undefined`. + * @example + * + * var users = { + * 'barney': { 'age': 36, 'active': true }, + * 'fred': { 'age': 40, 'active': false }, + * 'pebbles': { 'age': 1, 'active': true } + * }; + * + * _.findLastKey(users, function(o) { return o.age < 40; }); + * // => returns 'pebbles' assuming `_.findKey` returns 'barney' + * + * // The `_.matches` iteratee shorthand. + * _.findLastKey(users, { 'age': 36, 'active': true }); + * // => 'barney' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findLastKey(users, ['active', false]); + * // => 'fred' + * + * // The `_.property` iteratee shorthand. + * _.findLastKey(users, 'active'); + * // => 'pebbles' + */ + function findLastKey(object, predicate) { + return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight); + } + + /** + * Iterates over own and inherited enumerable string keyed properties of an + * object and invokes `iteratee` for each property. The iteratee is invoked + * with three arguments: (value, key, object). Iteratee functions may exit + * iteration early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @since 0.3.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forInRight + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forIn(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed). + */ + function forIn(object, iteratee) { + return object == null ? object : baseFor(object, getIteratee(iteratee, 3), keysIn); + } + + /** + * This method is like `_.forIn` except that it iterates over properties of + * `object` in the opposite order. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forIn + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forInRight(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'. + */ + function forInRight(object, iteratee) { + return object == null ? object : baseForRight(object, getIteratee(iteratee, 3), keysIn); + } + + /** + * Iterates over own enumerable string keyed properties of an object and + * invokes `iteratee` for each property. The iteratee is invoked with three + * arguments: (value, key, object). Iteratee functions may exit iteration + * early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @since 0.3.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forOwnRight + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forOwn(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a' then 'b' (iteration order is not guaranteed). + */ + function forOwn(object, iteratee) { + return object && baseForOwn(object, getIteratee(iteratee, 3)); + } + + /** + * This method is like `_.forOwn` except that it iterates over properties of + * `object` in the opposite order. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forOwn + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forOwnRight(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'. + */ + function forOwnRight(object, iteratee) { + return object && baseForOwnRight(object, getIteratee(iteratee, 3)); + } + + /** + * Creates an array of function property names from own enumerable properties + * of `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to inspect. + * @returns {Array} Returns the function names. + * @see _.functionsIn + * @example + * + * function Foo() { + * this.a = _.constant('a'); + * this.b = _.constant('b'); + * } + * + * Foo.prototype.c = _.constant('c'); + * + * _.functions(new Foo); + * // => ['a', 'b'] + */ + function functions(object) { + return object == null ? [] : baseFunctions(object, keys(object)); + } + + /** + * Creates an array of function property names from own and inherited + * enumerable properties of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to inspect. + * @returns {Array} Returns the function names. + * @see _.functions + * @example + * + * function Foo() { + * this.a = _.constant('a'); + * this.b = _.constant('b'); + * } + * + * Foo.prototype.c = _.constant('c'); + * + * _.functionsIn(new Foo); + * // => ['a', 'b', 'c'] + */ + function functionsIn(object) { + return object == null ? [] : baseFunctions(object, keysIn(object)); + } + + /** + * Gets the value at `path` of `object`. If the resolved value is + * `undefined`, the `defaultValue` is returned in its place. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @param {*} [defaultValue] The value returned for `undefined` resolved values. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.get(object, 'a[0].b.c'); + * // => 3 + * + * _.get(object, ['a', '0', 'b', 'c']); + * // => 3 + * + * _.get(object, 'a.b.c', 'default'); + * // => 'default' + */ + function get(object, path, defaultValue) { + var result = object == null ? undefined : baseGet(object, path); + return result === undefined ? defaultValue : result; + } + + /** + * Checks if `path` is a direct property of `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = { 'a': { 'b': 2 } }; + * var other = _.create({ 'a': _.create({ 'b': 2 }) }); + * + * _.has(object, 'a'); + * // => true + * + * _.has(object, 'a.b'); + * // => true + * + * _.has(object, ['a', 'b']); + * // => true + * + * _.has(other, 'a'); + * // => false + */ + function has(object, path) { + return object != null && hasPath(object, path, baseHas); + } + + /** + * Checks if `path` is a direct or inherited property of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = _.create({ 'a': _.create({ 'b': 2 }) }); + * + * _.hasIn(object, 'a'); + * // => true + * + * _.hasIn(object, 'a.b'); + * // => true + * + * _.hasIn(object, ['a', 'b']); + * // => true + * + * _.hasIn(object, 'b'); + * // => false + */ + function hasIn(object, path) { + return object != null && hasPath(object, path, baseHasIn); + } + + /** + * Creates an object composed of the inverted keys and values of `object`. + * If `object` contains duplicate values, subsequent values overwrite + * property assignments of previous values. + * + * @static + * @memberOf _ + * @since 0.7.0 + * @category Object + * @param {Object} object The object to invert. + * @returns {Object} Returns the new inverted object. + * @example + * + * var object = { 'a': 1, 'b': 2, 'c': 1 }; + * + * _.invert(object); + * // => { '1': 'c', '2': 'b' } + */ + var invert = createInverter(function (result, value, key) { + if (value != null && typeof value.toString != 'function') { + value = nativeObjectToString.call(value); + } + + result[value] = key; + }, constant(identity)); + + /** + * This method is like `_.invert` except that the inverted object is generated + * from the results of running each element of `object` thru `iteratee`. The + * corresponding inverted value of each inverted key is an array of keys + * responsible for generating the inverted value. The iteratee is invoked + * with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.1.0 + * @category Object + * @param {Object} object The object to invert. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Object} Returns the new inverted object. + * @example + * + * var object = { 'a': 1, 'b': 2, 'c': 1 }; + * + * _.invertBy(object); + * // => { '1': ['a', 'c'], '2': ['b'] } + * + * _.invertBy(object, function(value) { + * return 'group' + value; + * }); + * // => { 'group1': ['a', 'c'], 'group2': ['b'] } + */ + var invertBy = createInverter(function (result, value, key) { + if (value != null && typeof value.toString != 'function') { + value = nativeObjectToString.call(value); + } + + if (hasOwnProperty.call(result, value)) { + result[value].push(key); + } else { + result[value] = [key]; + } + }, getIteratee); + + /** + * Invokes the method at `path` of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the method to invoke. + * @param {...*} [args] The arguments to invoke the method with. + * @returns {*} Returns the result of the invoked method. + * @example + * + * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] }; + * + * _.invoke(object, 'a[0].b.c.slice', 1, 3); + * // => [2, 3] + */ + var invoke = baseRest(baseInvoke); + + /** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * for more details. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ + function keys(object) { + return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); + } + + /** + * Creates an array of the own and inherited enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keysIn(new Foo); + * // => ['a', 'b', 'c'] (iteration order is not guaranteed) + */ + function keysIn(object) { + return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); + } + + /** + * The opposite of `_.mapValues`; this method creates an object with the + * same values as `object` and keys generated by running each own enumerable + * string keyed property of `object` thru `iteratee`. The iteratee is invoked + * with three arguments: (value, key, object). + * + * @static + * @memberOf _ + * @since 3.8.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns the new mapped object. + * @see _.mapValues + * @example + * + * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) { + * return key + value; + * }); + * // => { 'a1': 1, 'b2': 2 } + */ + function mapKeys(object, iteratee) { + var result = {}; + iteratee = getIteratee(iteratee, 3); + + baseForOwn(object, function (value, key, object) { + baseAssignValue(result, iteratee(value, key, object), value); + }); + return result; + } + + /** + * Creates an object with the same keys as `object` and values generated + * by running each own enumerable string keyed property of `object` thru + * `iteratee`. The iteratee is invoked with three arguments: + * (value, key, object). + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns the new mapped object. + * @see _.mapKeys + * @example + * + * var users = { + * 'fred': { 'user': 'fred', 'age': 40 }, + * 'pebbles': { 'user': 'pebbles', 'age': 1 } + * }; + * + * _.mapValues(users, function(o) { return o.age; }); + * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) + * + * // The `_.property` iteratee shorthand. + * _.mapValues(users, 'age'); + * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) + */ + function mapValues(object, iteratee) { + var result = {}; + iteratee = getIteratee(iteratee, 3); + + baseForOwn(object, function (value, key, object) { + baseAssignValue(result, key, iteratee(value, key, object)); + }); + return result; + } + + /** + * This method is like `_.assign` except that it recursively merges own and + * inherited enumerable string keyed properties of source objects into the + * destination object. Source properties that resolve to `undefined` are + * skipped if a destination value exists. Array and plain object properties + * are merged recursively. Other objects and value types are overridden by + * assignment. Source objects are applied from left to right. Subsequent + * sources overwrite property assignments of previous sources. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 0.5.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @example + * + * var object = { + * 'a': [{ 'b': 2 }, { 'd': 4 }] + * }; + * + * var other = { + * 'a': [{ 'c': 3 }, { 'e': 5 }] + * }; + * + * _.merge(object, other); + * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] } + */ + var merge = createAssigner(function (object, source, srcIndex) { + baseMerge(object, source, srcIndex); + }); + + /** + * This method is like `_.merge` except that it accepts `customizer` which + * is invoked to produce the merged values of the destination and source + * properties. If `customizer` returns `undefined`, merging is handled by the + * method instead. The `customizer` is invoked with six arguments: + * (objValue, srcValue, key, object, source, stack). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} sources The source objects. + * @param {Function} customizer The function to customize assigned values. + * @returns {Object} Returns `object`. + * @example + * + * function customizer(objValue, srcValue) { + * if (_.isArray(objValue)) { + * return objValue.concat(srcValue); + * } + * } + * + * var object = { 'a': [1], 'b': [2] }; + * var other = { 'a': [3], 'b': [4] }; + * + * _.mergeWith(object, other, customizer); + * // => { 'a': [1, 3], 'b': [2, 4] } + */ + var mergeWith = createAssigner(function (object, source, srcIndex, customizer) { + baseMerge(object, source, srcIndex, customizer); + }); + + /** + * The opposite of `_.pick`; this method creates an object composed of the + * own and inherited enumerable property paths of `object` that are not omitted. + * + * **Note:** This method is considerably slower than `_.pick`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The source object. + * @param {...(string|string[])} [paths] The property paths to omit. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.omit(object, ['a', 'c']); + * // => { 'b': '2' } + */ + var omit = flatRest(function (object, paths) { + var result = {}; + if (object == null) { + return result; + } + var isDeep = false; + paths = arrayMap(paths, function (path) { + path = castPath(path, object); + isDeep || (isDeep = path.length > 1); + return path; + }); + copyObject(object, getAllKeysIn(object), result); + if (isDeep) { + result = baseClone( + result, + CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, + customOmitClone, + ); + } + var length = paths.length; + while (length--) { + baseUnset(result, paths[length]); + } + return result; + }); + + /** + * The opposite of `_.pickBy`; this method creates an object composed of + * the own and inherited enumerable string keyed properties of `object` that + * `predicate` doesn't return truthy for. The predicate is invoked with two + * arguments: (value, key). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The source object. + * @param {Function} [predicate=_.identity] The function invoked per property. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.omitBy(object, _.isNumber); + * // => { 'b': '2' } + */ + function omitBy(object, predicate) { + return pickBy(object, negate(getIteratee(predicate))); + } + + /** + * Creates an object composed of the picked `object` properties. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The source object. + * @param {...(string|string[])} [paths] The property paths to pick. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.pick(object, ['a', 'c']); + * // => { 'a': 1, 'c': 3 } + */ + var pick = flatRest(function (object, paths) { + return object == null ? {} : basePick(object, paths); + }); + + /** + * Creates an object composed of the `object` properties `predicate` returns + * truthy for. The predicate is invoked with two arguments: (value, key). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The source object. + * @param {Function} [predicate=_.identity] The function invoked per property. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.pickBy(object, _.isNumber); + * // => { 'a': 1, 'c': 3 } + */ + function pickBy(object, predicate) { + if (object == null) { + return {}; + } + var props = arrayMap(getAllKeysIn(object), function (prop) { + return [prop]; + }); + predicate = getIteratee(predicate); + return basePickBy(object, props, function (value, path) { + return predicate(value, path[0]); + }); + } + + /** + * This method is like `_.get` except that if the resolved value is a + * function it's invoked with the `this` binding of its parent object and + * its result is returned. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to resolve. + * @param {*} [defaultValue] The value returned for `undefined` resolved values. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] }; + * + * _.result(object, 'a[0].b.c1'); + * // => 3 + * + * _.result(object, 'a[0].b.c2'); + * // => 4 + * + * _.result(object, 'a[0].b.c3', 'default'); + * // => 'default' + * + * _.result(object, 'a[0].b.c3', _.constant('default')); + * // => 'default' + */ + function result(object, path, defaultValue) { + path = castPath(path, object); + + var index = -1, + length = path.length; + + // Ensure the loop is entered when path is empty. + if (!length) { + length = 1; + object = undefined; + } + while (++index < length) { + var value = object == null ? undefined : object[toKey(path[index])]; + if (value === undefined) { + index = length; + value = defaultValue; + } + object = isFunction(value) ? value.call(object) : value; + } + return object; + } + + /** + * Sets the value at `path` of `object`. If a portion of `path` doesn't exist, + * it's created. Arrays are created for missing index properties while objects + * are created for all other missing properties. Use `_.setWith` to customize + * `path` creation. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @returns {Object} Returns `object`. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.set(object, 'a[0].b.c', 4); + * console.log(object.a[0].b.c); + * // => 4 + * + * _.set(object, ['x', '0', 'y', 'z'], 5); + * console.log(object.x[0].y.z); + * // => 5 + */ + function set(object, path, value) { + return object == null ? object : baseSet(object, path, value); + } + + /** + * This method is like `_.set` except that it accepts `customizer` which is + * invoked to produce the objects of `path`. If `customizer` returns `undefined` + * path creation is handled by the method instead. The `customizer` is invoked + * with three arguments: (nsValue, key, nsObject). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @example + * + * var object = {}; + * + * _.setWith(object, '[0][1]', 'a', Object); + * // => { '0': { '1': 'a' } } + */ + function setWith(object, path, value, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return object == null ? object : baseSet(object, path, value, customizer); + } + + /** + * Creates an array of own enumerable string keyed-value pairs for `object` + * which can be consumed by `_.fromPairs`. If `object` is a map or set, its + * entries are returned. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias entries + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the key-value pairs. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.toPairs(new Foo); + * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed) + */ + var toPairs = createToPairs(keys); + + /** + * Creates an array of own and inherited enumerable string keyed-value pairs + * for `object` which can be consumed by `_.fromPairs`. If `object` is a map + * or set, its entries are returned. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias entriesIn + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the key-value pairs. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.toPairsIn(new Foo); + * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed) + */ + var toPairsIn = createToPairs(keysIn); + + /** + * An alternative to `_.reduce`; this method transforms `object` to a new + * `accumulator` object which is the result of running each of its own + * enumerable string keyed properties thru `iteratee`, with each invocation + * potentially mutating the `accumulator` object. If `accumulator` is not + * provided, a new object with the same `[[Prototype]]` will be used. The + * iteratee is invoked with four arguments: (accumulator, value, key, object). + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @since 1.3.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The custom accumulator value. + * @returns {*} Returns the accumulated value. + * @example + * + * _.transform([2, 3, 4], function(result, n) { + * result.push(n *= n); + * return n % 2 == 0; + * }, []); + * // => [4, 9] + * + * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { + * (result[value] || (result[value] = [])).push(key); + * }, {}); + * // => { '1': ['a', 'c'], '2': ['b'] } + */ + function transform(object, iteratee, accumulator) { + var isArr = isArray(object), + isArrLike = isArr || isBuffer(object) || isTypedArray(object); + + iteratee = getIteratee(iteratee, 4); + if (accumulator == null) { + var Ctor = object && object.constructor; + if (isArrLike) { + accumulator = isArr ? new Ctor() : []; + } else if (isObject(object)) { + accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {}; + } else { + accumulator = {}; + } + } + (isArrLike ? arrayEach : baseForOwn)(object, function (value, index, object) { + return iteratee(accumulator, value, index, object); + }); + return accumulator; + } + + /** + * Removes the property at `path` of `object`. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to unset. + * @returns {boolean} Returns `true` if the property is deleted, else `false`. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 7 } }] }; + * _.unset(object, 'a[0].b.c'); + * // => true + * + * console.log(object); + * // => { 'a': [{ 'b': {} }] }; + * + * _.unset(object, ['a', '0', 'b', 'c']); + * // => true + * + * console.log(object); + * // => { 'a': [{ 'b': {} }] }; + */ + function unset(object, path) { + return object == null ? true : baseUnset(object, path); + } + + /** + * This method is like `_.set` except that accepts `updater` to produce the + * value to set. Use `_.updateWith` to customize `path` creation. The `updater` + * is invoked with one argument: (value). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.6.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {Function} updater The function to produce the updated value. + * @returns {Object} Returns `object`. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.update(object, 'a[0].b.c', function(n) { return n * n; }); + * console.log(object.a[0].b.c); + * // => 9 + * + * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; }); + * console.log(object.x[0].y.z); + * // => 0 + */ + function update(object, path, updater) { + return object == null ? object : baseUpdate(object, path, castFunction(updater)); + } + + /** + * This method is like `_.update` except that it accepts `customizer` which is + * invoked to produce the objects of `path`. If `customizer` returns `undefined` + * path creation is handled by the method instead. The `customizer` is invoked + * with three arguments: (nsValue, key, nsObject). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.6.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {Function} updater The function to produce the updated value. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @example + * + * var object = {}; + * + * _.updateWith(object, '[0][1]', _.constant('a'), Object); + * // => { '0': { '1': 'a' } } + */ + function updateWith(object, path, updater, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer); + } + + /** + * Creates an array of the own enumerable string keyed property values of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property values. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.values(new Foo); + * // => [1, 2] (iteration order is not guaranteed) + * + * _.values('hi'); + * // => ['h', 'i'] + */ + function values(object) { + return object == null ? [] : baseValues(object, keys(object)); + } + + /** + * Creates an array of the own and inherited enumerable string keyed property + * values of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property values. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.valuesIn(new Foo); + * // => [1, 2, 3] (iteration order is not guaranteed) + */ + function valuesIn(object) { + return object == null ? [] : baseValues(object, keysIn(object)); + } + + /*------------------------------------------------------------------------*/ + + /** + * Clamps `number` within the inclusive `lower` and `upper` bounds. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Number + * @param {number} number The number to clamp. + * @param {number} [lower] The lower bound. + * @param {number} upper The upper bound. + * @returns {number} Returns the clamped number. + * @example + * + * _.clamp(-10, -5, 5); + * // => -5 + * + * _.clamp(10, -5, 5); + * // => 5 + */ + function clamp(number, lower, upper) { + if (upper === undefined) { + upper = lower; + lower = undefined; + } + if (upper !== undefined) { + upper = toNumber(upper); + upper = upper === upper ? upper : 0; + } + if (lower !== undefined) { + lower = toNumber(lower); + lower = lower === lower ? lower : 0; + } + return baseClamp(toNumber(number), lower, upper); + } + + /** + * Checks if `n` is between `start` and up to, but not including, `end`. If + * `end` is not specified, it's set to `start` with `start` then set to `0`. + * If `start` is greater than `end` the params are swapped to support + * negative ranges. + * + * @static + * @memberOf _ + * @since 3.3.0 + * @category Number + * @param {number} number The number to check. + * @param {number} [start=0] The start of the range. + * @param {number} end The end of the range. + * @returns {boolean} Returns `true` if `number` is in the range, else `false`. + * @see _.range, _.rangeRight + * @example + * + * _.inRange(3, 2, 4); + * // => true + * + * _.inRange(4, 8); + * // => true + * + * _.inRange(4, 2); + * // => false + * + * _.inRange(2, 2); + * // => false + * + * _.inRange(1.2, 2); + * // => true + * + * _.inRange(5.2, 4); + * // => false + * + * _.inRange(-3, -2, -6); + * // => true + */ + function inRange(number, start, end) { + start = toFinite(start); + if (end === undefined) { + end = start; + start = 0; + } else { + end = toFinite(end); + } + number = toNumber(number); + return baseInRange(number, start, end); + } + + /** + * Produces a random number between the inclusive `lower` and `upper` bounds. + * If only one argument is provided a number between `0` and the given number + * is returned. If `floating` is `true`, or either `lower` or `upper` are + * floats, a floating-point number is returned instead of an integer. + * + * **Note:** JavaScript follows the IEEE-754 standard for resolving + * floating-point values which can produce unexpected results. + * + * @static + * @memberOf _ + * @since 0.7.0 + * @category Number + * @param {number} [lower=0] The lower bound. + * @param {number} [upper=1] The upper bound. + * @param {boolean} [floating] Specify returning a floating-point number. + * @returns {number} Returns the random number. + * @example + * + * _.random(0, 5); + * // => an integer between 0 and 5 + * + * _.random(5); + * // => also an integer between 0 and 5 + * + * _.random(5, true); + * // => a floating-point number between 0 and 5 + * + * _.random(1.2, 5.2); + * // => a floating-point number between 1.2 and 5.2 + */ + function random(lower, upper, floating) { + if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) { + upper = floating = undefined; + } + if (floating === undefined) { + if (typeof upper == 'boolean') { + floating = upper; + upper = undefined; + } else if (typeof lower == 'boolean') { + floating = lower; + lower = undefined; + } + } + if (lower === undefined && upper === undefined) { + lower = 0; + upper = 1; + } else { + lower = toFinite(lower); + if (upper === undefined) { + upper = lower; + lower = 0; + } else { + upper = toFinite(upper); + } + } + if (lower > upper) { + var temp = lower; + lower = upper; + upper = temp; + } + if (floating || lower % 1 || upper % 1) { + var rand = nativeRandom(); + return nativeMin( + lower + rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1))), + upper, + ); + } + return baseRandom(lower, upper); + } + + /*------------------------------------------------------------------------*/ + + /** + * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the camel cased string. + * @example + * + * _.camelCase('Foo Bar'); + * // => 'fooBar' + * + * _.camelCase('--foo-bar--'); + * // => 'fooBar' + * + * _.camelCase('__FOO_BAR__'); + * // => 'fooBar' + */ + var camelCase = createCompounder(function (result, word, index) { + word = word.toLowerCase(); + return result + (index ? capitalize(word) : word); + }); + + /** + * Converts the first character of `string` to upper case and the remaining + * to lower case. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to capitalize. + * @returns {string} Returns the capitalized string. + * @example + * + * _.capitalize('FRED'); + * // => 'Fred' + */ + function capitalize(string) { + return upperFirst(toString(string).toLowerCase()); + } + + /** + * Deburrs `string` by converting + * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table) + * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A) + * letters to basic Latin letters and removing + * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to deburr. + * @returns {string} Returns the deburred string. + * @example + * + * _.deburr('déjà vu'); + * // => 'deja vu' + */ + function deburr(string) { + string = toString(string); + return string && string.replace(reLatin, deburrLetter).replace(reComboMark, ''); + } + + /** + * Checks if `string` ends with the given target string. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to inspect. + * @param {string} [target] The string to search for. + * @param {number} [position=string.length] The position to search up to. + * @returns {boolean} Returns `true` if `string` ends with `target`, + * else `false`. + * @example + * + * _.endsWith('abc', 'c'); + * // => true + * + * _.endsWith('abc', 'b'); + * // => false + * + * _.endsWith('abc', 'b', 2); + * // => true + */ + function endsWith(string, target, position) { + string = toString(string); + target = baseToString(target); + + var length = string.length; + position = position === undefined ? length : baseClamp(toInteger(position), 0, length); + + var end = position; + position -= target.length; + return position >= 0 && string.slice(position, end) == target; + } + + /** + * Converts the characters "&", "<", ">", '"', and "'" in `string` to their + * corresponding HTML entities. + * + * **Note:** No other characters are escaped. To escape additional + * characters use a third-party library like [_he_](https://mths.be/he). + * + * Though the ">" character is escaped for symmetry, characters like + * ">" and "/" don't need escaping in HTML and have no special meaning + * unless they're part of a tag or unquoted attribute value. See + * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands) + * (under "semi-related fun fact") for more details. + * + * When working with HTML you should always + * [quote attribute values](http://wonko.com/post/html-escaping) to reduce + * XSS vectors. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category String + * @param {string} [string=''] The string to escape. + * @returns {string} Returns the escaped string. + * @example + * + * _.escape('fred, barney, & pebbles'); + * // => 'fred, barney, & pebbles' + */ + function escape(string) { + string = toString(string); + return string && reHasUnescapedHtml.test(string) + ? string.replace(reUnescapedHtml, escapeHtmlChar) + : string; + } + + /** + * Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+", + * "?", "(", ")", "[", "]", "{", "}", and "|" in `string`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to escape. + * @returns {string} Returns the escaped string. + * @example + * + * _.escapeRegExp('[lodash](https://lodash.com/)'); + * // => '\[lodash\]\(https://lodash\.com/\)' + */ + function escapeRegExp(string) { + string = toString(string); + return string && reHasRegExpChar.test(string) ? string.replace(reRegExpChar, '\\$&') : string; + } + + /** + * Converts `string` to + * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the kebab cased string. + * @example + * + * _.kebabCase('Foo Bar'); + * // => 'foo-bar' + * + * _.kebabCase('fooBar'); + * // => 'foo-bar' + * + * _.kebabCase('__FOO_BAR__'); + * // => 'foo-bar' + */ + var kebabCase = createCompounder(function (result, word, index) { + return result + (index ? '-' : '') + word.toLowerCase(); + }); + + /** + * Converts `string`, as space separated words, to lower case. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the lower cased string. + * @example + * + * _.lowerCase('--Foo-Bar--'); + * // => 'foo bar' + * + * _.lowerCase('fooBar'); + * // => 'foo bar' + * + * _.lowerCase('__FOO_BAR__'); + * // => 'foo bar' + */ + var lowerCase = createCompounder(function (result, word, index) { + return result + (index ? ' ' : '') + word.toLowerCase(); + }); + + /** + * Converts the first character of `string` to lower case. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the converted string. + * @example + * + * _.lowerFirst('Fred'); + * // => 'fred' + * + * _.lowerFirst('FRED'); + * // => 'fRED' + */ + var lowerFirst = createCaseFirst('toLowerCase'); + + /** + * Pads `string` on the left and right sides if it's shorter than `length`. + * Padding characters are truncated if they can't be evenly divided by `length`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to pad. + * @param {number} [length=0] The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padded string. + * @example + * + * _.pad('abc', 8); + * // => ' abc ' + * + * _.pad('abc', 8, '_-'); + * // => '_-abc_-_' + * + * _.pad('abc', 3); + * // => 'abc' + */ + function pad(string, length, chars) { + string = toString(string); + length = toInteger(length); + + var strLength = length ? stringSize(string) : 0; + if (!length || strLength >= length) { + return string; + } + var mid = (length - strLength) / 2; + return createPadding(nativeFloor(mid), chars) + string + createPadding(nativeCeil(mid), chars); + } + + /** + * Pads `string` on the right side if it's shorter than `length`. Padding + * characters are truncated if they exceed `length`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to pad. + * @param {number} [length=0] The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padded string. + * @example + * + * _.padEnd('abc', 6); + * // => 'abc ' + * + * _.padEnd('abc', 6, '_-'); + * // => 'abc_-_' + * + * _.padEnd('abc', 3); + * // => 'abc' + */ + function padEnd(string, length, chars) { + string = toString(string); + length = toInteger(length); + + var strLength = length ? stringSize(string) : 0; + return length && strLength < length + ? string + createPadding(length - strLength, chars) + : string; + } + + /** + * Pads `string` on the left side if it's shorter than `length`. Padding + * characters are truncated if they exceed `length`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to pad. + * @param {number} [length=0] The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padded string. + * @example + * + * _.padStart('abc', 6); + * // => ' abc' + * + * _.padStart('abc', 6, '_-'); + * // => '_-_abc' + * + * _.padStart('abc', 3); + * // => 'abc' + */ + function padStart(string, length, chars) { + string = toString(string); + length = toInteger(length); + + var strLength = length ? stringSize(string) : 0; + return length && strLength < length + ? createPadding(length - strLength, chars) + string + : string; + } + + /** + * Converts `string` to an integer of the specified radix. If `radix` is + * `undefined` or `0`, a `radix` of `10` is used unless `value` is a + * hexadecimal, in which case a `radix` of `16` is used. + * + * **Note:** This method aligns with the + * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category String + * @param {string} string The string to convert. + * @param {number} [radix=10] The radix to interpret `value` by. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {number} Returns the converted integer. + * @example + * + * _.parseInt('08'); + * // => 8 + * + * _.map(['6', '08', '10'], _.parseInt); + * // => [6, 8, 10] + */ + function parseInt(string, radix, guard) { + if (guard || radix == null) { + radix = 0; + } else if (radix) { + radix = +radix; + } + return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0); + } + + /** + * Repeats the given string `n` times. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to repeat. + * @param {number} [n=1] The number of times to repeat the string. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {string} Returns the repeated string. + * @example + * + * _.repeat('*', 3); + * // => '***' + * + * _.repeat('abc', 2); + * // => 'abcabc' + * + * _.repeat('abc', 0); + * // => '' + */ + function repeat(string, n, guard) { + if (guard ? isIterateeCall(string, n, guard) : n === undefined) { + n = 1; + } else { + n = toInteger(n); + } + return baseRepeat(toString(string), n); + } + + /** + * Replaces matches for `pattern` in `string` with `replacement`. + * + * **Note:** This method is based on + * [`String#replace`](https://mdn.io/String/replace). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to modify. + * @param {RegExp|string} pattern The pattern to replace. + * @param {Function|string} replacement The match replacement. + * @returns {string} Returns the modified string. + * @example + * + * _.replace('Hi Fred', 'Fred', 'Barney'); + * // => 'Hi Barney' + */ + function replace() { + var args = arguments, + string = toString(args[0]); + + return args.length < 3 ? string : string.replace(args[1], args[2]); + } + + /** + * Converts `string` to + * [snake case](https://en.wikipedia.org/wiki/Snake_case). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the snake cased string. + * @example + * + * _.snakeCase('Foo Bar'); + * // => 'foo_bar' + * + * _.snakeCase('fooBar'); + * // => 'foo_bar' + * + * _.snakeCase('--FOO-BAR--'); + * // => 'foo_bar' + */ + var snakeCase = createCompounder(function (result, word, index) { + return result + (index ? '_' : '') + word.toLowerCase(); + }); + + /** + * Splits `string` by `separator`. + * + * **Note:** This method is based on + * [`String#split`](https://mdn.io/String/split). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to split. + * @param {RegExp|string} separator The separator pattern to split by. + * @param {number} [limit] The length to truncate results to. + * @returns {Array} Returns the string segments. + * @example + * + * _.split('a-b-c', '-', 2); + * // => ['a', 'b'] + */ + function split(string, separator, limit) { + if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) { + separator = limit = undefined; + } + limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0; + if (!limit) { + return []; + } + string = toString(string); + if (string && (typeof separator == 'string' || (separator != null && !isRegExp(separator)))) { + separator = baseToString(separator); + if (!separator && hasUnicode(string)) { + return castSlice(stringToArray(string), 0, limit); + } + } + return string.split(separator, limit); + } + + /** + * Converts `string` to + * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage). + * + * @static + * @memberOf _ + * @since 3.1.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the start cased string. + * @example + * + * _.startCase('--foo-bar--'); + * // => 'Foo Bar' + * + * _.startCase('fooBar'); + * // => 'Foo Bar' + * + * _.startCase('__FOO_BAR__'); + * // => 'FOO BAR' + */ + var startCase = createCompounder(function (result, word, index) { + return result + (index ? ' ' : '') + upperFirst(word); + }); + + /** + * Checks if `string` starts with the given target string. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to inspect. + * @param {string} [target] The string to search for. + * @param {number} [position=0] The position to search from. + * @returns {boolean} Returns `true` if `string` starts with `target`, + * else `false`. + * @example + * + * _.startsWith('abc', 'a'); + * // => true + * + * _.startsWith('abc', 'b'); + * // => false + * + * _.startsWith('abc', 'b', 1); + * // => true + */ + function startsWith(string, target, position) { + string = toString(string); + position = position == null ? 0 : baseClamp(toInteger(position), 0, string.length); + + target = baseToString(target); + return string.slice(position, position + target.length) == target; + } + + /** + * Creates a compiled template function that can interpolate data properties + * in "interpolate" delimiters, HTML-escape interpolated data properties in + * "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data + * properties may be accessed as free variables in the template. If a setting + * object is given, it takes precedence over `_.templateSettings` values. + * + * **Note:** In the development build `_.template` utilizes + * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl) + * for easier debugging. + * + * For more information on precompiling templates see + * [lodash's custom builds documentation](https://lodash.com/custom-builds). + * + * For more information on Chrome extension sandboxes see + * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval). + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category String + * @param {string} [string=''] The template string. + * @param {Object} [options={}] The options object. + * @param {RegExp} [options.escape=_.templateSettings.escape] + * The HTML "escape" delimiter. + * @param {RegExp} [options.evaluate=_.templateSettings.evaluate] + * The "evaluate" delimiter. + * @param {Object} [options.imports=_.templateSettings.imports] + * An object to import into the template as free variables. + * @param {RegExp} [options.interpolate=_.templateSettings.interpolate] + * The "interpolate" delimiter. + * @param {string} [options.sourceURL='lodash.templateSources[n]'] + * The sourceURL of the compiled template. + * @param {string} [options.variable='obj'] + * The data object variable name. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the compiled template function. + * @example + * + * // Use the "interpolate" delimiter to create a compiled template. + * var compiled = _.template('hello <%= user %>!'); + * compiled({ 'user': 'fred' }); + * // => 'hello fred!' + * + * // Use the HTML "escape" delimiter to escape data property values. + * var compiled = _.template('<b><%- value %></b>'); + * compiled({ 'value': '<script>' }); + * // => '<b><script></b>' + * + * // Use the "evaluate" delimiter to execute JavaScript and generate HTML. + * var compiled = _.template('<% _.forEach(users, function(user) { %><li><%- user %></li><% }); %>'); + * compiled({ 'users': ['fred', 'barney'] }); + * // => '<li>fred</li><li>barney</li>' + * + * // Use the internal `print` function in "evaluate" delimiters. + * var compiled = _.template('<% print("hello " + user); %>!'); + * compiled({ 'user': 'barney' }); + * // => 'hello barney!' + * + * // Use the ES template literal delimiter as an "interpolate" delimiter. + * // Disable support by replacing the "interpolate" delimiter. + * var compiled = _.template('hello ${ user }!'); + * compiled({ 'user': 'pebbles' }); + * // => 'hello pebbles!' + * + * // Use backslashes to treat delimiters as plain text. + * var compiled = _.template('<%= "\\<%- value %\\>" %>'); + * compiled({ 'value': 'ignored' }); + * // => '<%- value %>' + * + * // Use the `imports` option to import `jQuery` as `jq`. + * var text = '<% jq.each(users, function(user) { %><li><%- user %></li><% }); %>'; + * var compiled = _.template(text, { 'imports': { 'jq': jQuery } }); + * compiled({ 'users': ['fred', 'barney'] }); + * // => '<li>fred</li><li>barney</li>' + * + * // Use the `sourceURL` option to specify a custom sourceURL for the template. + * var compiled = _.template('hello <%= user %>!', { 'sourceURL': '/basic/greeting.jst' }); + * compiled(data); + * // => Find the source of "greeting.jst" under the Sources tab or Resources panel of the web inspector. + * + * // Use the `variable` option to ensure a with-statement isn't used in the compiled template. + * var compiled = _.template('hi <%= data.user %>!', { 'variable': 'data' }); + * compiled.source; + * // => function(data) { + * // var __t, __p = ''; + * // __p += 'hi ' + ((__t = ( data.user )) == null ? '' : __t) + '!'; + * // return __p; + * // } + * + * // Use custom template delimiters. + * _.templateSettings.interpolate = /{{([\s\S]+?)}}/g; + * var compiled = _.template('hello {{ user }}!'); + * compiled({ 'user': 'mustache' }); + * // => 'hello mustache!' + * + * // Use the `source` property to inline compiled templates for meaningful + * // line numbers in error messages and stack traces. + * fs.writeFileSync(path.join(process.cwd(), 'jst.js'), '\ + * var JST = {\ + * "main": ' + _.template(mainText).source + '\ + * };\ + * '); + */ + function template(string, options, guard) { + // Based on John Resig's `tmpl` implementation + // (http://ejohn.org/blog/javascript-micro-templating/) + // and Laura Doktorova's doT.js (https://github.com/olado/doT). + var settings = lodash.templateSettings; + + if (guard && isIterateeCall(string, options, guard)) { + options = undefined; + } + string = toString(string); + options = assignInWith({}, options, settings, customDefaultsAssignIn); + + var imports = assignInWith({}, options.imports, settings.imports, customDefaultsAssignIn), + importsKeys = keys(imports), + importsValues = baseValues(imports, importsKeys); + + var isEscaping, + isEvaluating, + index = 0, + interpolate = options.interpolate || reNoMatch, + source = "__p += '"; + + // Compile the regexp to match each delimiter. + var reDelimiters = RegExp( + (options.escape || reNoMatch).source + + '|' + + interpolate.source + + '|' + + (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + + '|' + + (options.evaluate || reNoMatch).source + + '|$', + 'g', + ); + + // Use a sourceURL for easier debugging. + // The sourceURL gets injected into the source that's eval-ed, so be careful + // with lookup (in case of e.g. prototype pollution), and strip newlines if any. + // A newline wouldn't be a valid sourceURL anyway, and it'd enable code injection. + var sourceURL = + '//# sourceURL=' + + (hasOwnProperty.call(options, 'sourceURL') + ? (options.sourceURL + '').replace(/[\r\n]/g, ' ') + : 'lodash.templateSources[' + ++templateCounter + ']') + + '\n'; + + string.replace( + reDelimiters, + function (match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) { + interpolateValue || (interpolateValue = esTemplateValue); + + // Escape characters that can't be included in string literals. + source += string.slice(index, offset).replace(reUnescapedString, escapeStringChar); + + // Replace delimiters with snippets. + if (escapeValue) { + isEscaping = true; + source += "' +\n__e(" + escapeValue + ") +\n'"; + } + if (evaluateValue) { + isEvaluating = true; + source += "';\n" + evaluateValue + ";\n__p += '"; + } + if (interpolateValue) { + source += "' +\n((__t = (" + interpolateValue + ")) == null ? '' : __t) +\n'"; + } + index = offset + match.length; + + // The JS engine embedded in Adobe products needs `match` returned in + // order to produce the correct `offset` value. + return match; + }, + ); + + source += "';\n"; + + // If `variable` is not specified wrap a with-statement around the generated + // code to add the data object to the top of the scope chain. + // Like with sourceURL, we take care to not check the option's prototype, + // as this configuration is a code injection vector. + var variable = hasOwnProperty.call(options, 'variable') && options.variable; + if (!variable) { + source = 'with (obj) {\n' + source + '\n}\n'; + } + // Cleanup code by stripping empty strings. + source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source) + .replace(reEmptyStringMiddle, '$1') + .replace(reEmptyStringTrailing, '$1;'); + + // Frame code as the function body. + source = + 'function(' + + (variable || 'obj') + + ') {\n' + + (variable ? '' : 'obj || (obj = {});\n') + + "var __t, __p = ''" + + (isEscaping ? ', __e = _.escape' : '') + + (isEvaluating + ? ', __j = Array.prototype.join;\n' + + "function print() { __p += __j.call(arguments, '') }\n" + : ';\n') + + source + + 'return __p\n}'; + + var result = attempt(function () { + return Function(importsKeys, sourceURL + 'return ' + source).apply(undefined, importsValues); + }); + + // Provide the compiled function's source by its `toString` method or + // the `source` property as a convenience for inlining compiled templates. + result.source = source; + if (isError(result)) { + throw result; + } + return result; + } + + /** + * Converts `string`, as a whole, to lower case just like + * [String#toLowerCase](https://mdn.io/toLowerCase). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the lower cased string. + * @example + * + * _.toLower('--Foo-Bar--'); + * // => '--foo-bar--' + * + * _.toLower('fooBar'); + * // => 'foobar' + * + * _.toLower('__FOO_BAR__'); + * // => '__foo_bar__' + */ + function toLower(value) { + return toString(value).toLowerCase(); + } + + /** + * Converts `string`, as a whole, to upper case just like + * [String#toUpperCase](https://mdn.io/toUpperCase). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the upper cased string. + * @example + * + * _.toUpper('--foo-bar--'); + * // => '--FOO-BAR--' + * + * _.toUpper('fooBar'); + * // => 'FOOBAR' + * + * _.toUpper('__foo_bar__'); + * // => '__FOO_BAR__' + */ + function toUpper(value) { + return toString(value).toUpperCase(); + } + + /** + * Removes leading and trailing whitespace or specified characters from `string`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to trim. + * @param {string} [chars=whitespace] The characters to trim. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {string} Returns the trimmed string. + * @example + * + * _.trim(' abc '); + * // => 'abc' + * + * _.trim('-_-abc-_-', '_-'); + * // => 'abc' + * + * _.map([' foo ', ' bar '], _.trim); + * // => ['foo', 'bar'] + */ + function trim(string, chars, guard) { + string = toString(string); + if (string && (guard || chars === undefined)) { + return string.replace(reTrim, ''); + } + if (!string || !(chars = baseToString(chars))) { + return string; + } + var strSymbols = stringToArray(string), + chrSymbols = stringToArray(chars), + start = charsStartIndex(strSymbols, chrSymbols), + end = charsEndIndex(strSymbols, chrSymbols) + 1; + + return castSlice(strSymbols, start, end).join(''); + } + + /** + * Removes trailing whitespace or specified characters from `string`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to trim. + * @param {string} [chars=whitespace] The characters to trim. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {string} Returns the trimmed string. + * @example + * + * _.trimEnd(' abc '); + * // => ' abc' + * + * _.trimEnd('-_-abc-_-', '_-'); + * // => '-_-abc' + */ + function trimEnd(string, chars, guard) { + string = toString(string); + if (string && (guard || chars === undefined)) { + return string.replace(reTrimEnd, ''); + } + if (!string || !(chars = baseToString(chars))) { + return string; + } + var strSymbols = stringToArray(string), + end = charsEndIndex(strSymbols, stringToArray(chars)) + 1; + + return castSlice(strSymbols, 0, end).join(''); + } + + /** + * Removes leading whitespace or specified characters from `string`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to trim. + * @param {string} [chars=whitespace] The characters to trim. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {string} Returns the trimmed string. + * @example + * + * _.trimStart(' abc '); + * // => 'abc ' + * + * _.trimStart('-_-abc-_-', '_-'); + * // => 'abc-_-' + */ + function trimStart(string, chars, guard) { + string = toString(string); + if (string && (guard || chars === undefined)) { + return string.replace(reTrimStart, ''); + } + if (!string || !(chars = baseToString(chars))) { + return string; + } + var strSymbols = stringToArray(string), + start = charsStartIndex(strSymbols, stringToArray(chars)); + + return castSlice(strSymbols, start).join(''); + } + + /** + * Truncates `string` if it's longer than the given maximum string length. + * The last characters of the truncated string are replaced with the omission + * string which defaults to "...". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to truncate. + * @param {Object} [options={}] The options object. + * @param {number} [options.length=30] The maximum string length. + * @param {string} [options.omission='...'] The string to indicate text is omitted. + * @param {RegExp|string} [options.separator] The separator pattern to truncate to. + * @returns {string} Returns the truncated string. + * @example + * + * _.truncate('hi-diddly-ho there, neighborino'); + * // => 'hi-diddly-ho there, neighbo...' + * + * _.truncate('hi-diddly-ho there, neighborino', { + * 'length': 24, + * 'separator': ' ' + * }); + * // => 'hi-diddly-ho there,...' + * + * _.truncate('hi-diddly-ho there, neighborino', { + * 'length': 24, + * 'separator': /,? +/ + * }); + * // => 'hi-diddly-ho there...' + * + * _.truncate('hi-diddly-ho there, neighborino', { + * 'omission': ' [...]' + * }); + * // => 'hi-diddly-ho there, neig [...]' + */ + function truncate(string, options) { + var length = DEFAULT_TRUNC_LENGTH, + omission = DEFAULT_TRUNC_OMISSION; + + if (isObject(options)) { + var separator = 'separator' in options ? options.separator : separator; + length = 'length' in options ? toInteger(options.length) : length; + omission = 'omission' in options ? baseToString(options.omission) : omission; + } + string = toString(string); + + var strLength = string.length; + if (hasUnicode(string)) { + var strSymbols = stringToArray(string); + strLength = strSymbols.length; + } + if (length >= strLength) { + return string; + } + var end = length - stringSize(omission); + if (end < 1) { + return omission; + } + var result = strSymbols ? castSlice(strSymbols, 0, end).join('') : string.slice(0, end); + + if (separator === undefined) { + return result + omission; + } + if (strSymbols) { + end += result.length - end; + } + if (isRegExp(separator)) { + if (string.slice(end).search(separator)) { + var match, + substring = result; + + if (!separator.global) { + separator = RegExp(separator.source, toString(reFlags.exec(separator)) + 'g'); + } + separator.lastIndex = 0; + while ((match = separator.exec(substring))) { + var newEnd = match.index; + } + result = result.slice(0, newEnd === undefined ? end : newEnd); + } + } else if (string.indexOf(baseToString(separator), end) != end) { + var index = result.lastIndexOf(separator); + if (index > -1) { + result = result.slice(0, index); + } + } + return result + omission; + } + + /** + * The inverse of `_.escape`; this method converts the HTML entities + * `&`, `<`, `>`, `"`, and `'` in `string` to + * their corresponding characters. + * + * **Note:** No other HTML entities are unescaped. To unescape additional + * HTML entities use a third-party library like [_he_](https://mths.be/he). + * + * @static + * @memberOf _ + * @since 0.6.0 + * @category String + * @param {string} [string=''] The string to unescape. + * @returns {string} Returns the unescaped string. + * @example + * + * _.unescape('fred, barney, & pebbles'); + * // => 'fred, barney, & pebbles' + */ + function unescape(string) { + string = toString(string); + return string && reHasEscapedHtml.test(string) + ? string.replace(reEscapedHtml, unescapeHtmlChar) + : string; + } + + /** + * Converts `string`, as space separated words, to upper case. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the upper cased string. + * @example + * + * _.upperCase('--foo-bar'); + * // => 'FOO BAR' + * + * _.upperCase('fooBar'); + * // => 'FOO BAR' + * + * _.upperCase('__foo_bar__'); + * // => 'FOO BAR' + */ + var upperCase = createCompounder(function (result, word, index) { + return result + (index ? ' ' : '') + word.toUpperCase(); + }); + + /** + * Converts the first character of `string` to upper case. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the converted string. + * @example + * + * _.upperFirst('fred'); + * // => 'Fred' + * + * _.upperFirst('FRED'); + * // => 'FRED' + */ + var upperFirst = createCaseFirst('toUpperCase'); + + /** + * Splits `string` into an array of its words. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to inspect. + * @param {RegExp|string} [pattern] The pattern to match words. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the words of `string`. + * @example + * + * _.words('fred, barney, & pebbles'); + * // => ['fred', 'barney', 'pebbles'] + * + * _.words('fred, barney, & pebbles', /[^, ]+/g); + * // => ['fred', 'barney', '&', 'pebbles'] + */ + function words(string, pattern, guard) { + string = toString(string); + pattern = guard ? undefined : pattern; + + if (pattern === undefined) { + return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string); + } + return string.match(pattern) || []; + } + + /*------------------------------------------------------------------------*/ + + /** + * Attempts to invoke `func`, returning either the result or the caught error + * object. Any additional arguments are provided to `func` when it's invoked. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Util + * @param {Function} func The function to attempt. + * @param {...*} [args] The arguments to invoke `func` with. + * @returns {*} Returns the `func` result or error object. + * @example + * + * // Avoid throwing errors for invalid selectors. + * var elements = _.attempt(function(selector) { + * return document.querySelectorAll(selector); + * }, '>_>'); + * + * if (_.isError(elements)) { + * elements = []; + * } + */ + var attempt = baseRest(function (func, args) { + try { + return apply(func, undefined, args); + } catch (e) { + return isError(e) ? e : new Error(e); + } + }); + + /** + * Binds methods of an object to the object itself, overwriting the existing + * method. + * + * **Note:** This method doesn't set the "length" property of bound functions. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {Object} object The object to bind and assign the bound methods to. + * @param {...(string|string[])} methodNames The object method names to bind. + * @returns {Object} Returns `object`. + * @example + * + * var view = { + * 'label': 'docs', + * 'click': function() { + * console.log('clicked ' + this.label); + * } + * }; + * + * _.bindAll(view, ['click']); + * jQuery(element).on('click', view.click); + * // => Logs 'clicked docs' when clicked. + */ + var bindAll = flatRest(function (object, methodNames) { + arrayEach(methodNames, function (key) { + key = toKey(key); + baseAssignValue(object, key, bind(object[key], object)); + }); + return object; + }); + + /** + * Creates a function that iterates over `pairs` and invokes the corresponding + * function of the first predicate to return truthy. The predicate-function + * pairs are invoked with the `this` binding and arguments of the created + * function. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Util + * @param {Array} pairs The predicate-function pairs. + * @returns {Function} Returns the new composite function. + * @example + * + * var func = _.cond([ + * [_.matches({ 'a': 1 }), _.constant('matches A')], + * [_.conforms({ 'b': _.isNumber }), _.constant('matches B')], + * [_.stubTrue, _.constant('no match')] + * ]); + * + * func({ 'a': 1, 'b': 2 }); + * // => 'matches A' + * + * func({ 'a': 0, 'b': 1 }); + * // => 'matches B' + * + * func({ 'a': '1', 'b': '2' }); + * // => 'no match' + */ + function cond(pairs) { + var length = pairs == null ? 0 : pairs.length, + toIteratee = getIteratee(); + + pairs = !length + ? [] + : arrayMap(pairs, function (pair) { + if (typeof pair[1] != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + return [toIteratee(pair[0]), pair[1]]; + }); + + return baseRest(function (args) { + var index = -1; + while (++index < length) { + var pair = pairs[index]; + if (apply(pair[0], this, args)) { + return apply(pair[1], this, args); + } + } + }); + } + + /** + * Creates a function that invokes the predicate properties of `source` with + * the corresponding property values of a given object, returning `true` if + * all predicates return truthy, else `false`. + * + * **Note:** The created function is equivalent to `_.conformsTo` with + * `source` partially applied. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Util + * @param {Object} source The object of property predicates to conform to. + * @returns {Function} Returns the new spec function. + * @example + * + * var objects = [ + * { 'a': 2, 'b': 1 }, + * { 'a': 1, 'b': 2 } + * ]; + * + * _.filter(objects, _.conforms({ 'b': function(n) { return n > 1; } })); + * // => [{ 'a': 1, 'b': 2 }] + */ + function conforms(source) { + return baseConforms(baseClone(source, CLONE_DEEP_FLAG)); + } + + /** + * Creates a function that returns `value`. + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Util + * @param {*} value The value to return from the new function. + * @returns {Function} Returns the new constant function. + * @example + * + * var objects = _.times(2, _.constant({ 'a': 1 })); + * + * console.log(objects); + * // => [{ 'a': 1 }, { 'a': 1 }] + * + * console.log(objects[0] === objects[1]); + * // => true + */ + function constant(value) { + return function () { + return value; + }; + } + + /** + * Checks `value` to determine whether a default value should be returned in + * its place. The `defaultValue` is returned if `value` is `NaN`, `null`, + * or `undefined`. + * + * @static + * @memberOf _ + * @since 4.14.0 + * @category Util + * @param {*} value The value to check. + * @param {*} defaultValue The default value. + * @returns {*} Returns the resolved value. + * @example + * + * _.defaultTo(1, 10); + * // => 1 + * + * _.defaultTo(undefined, 10); + * // => 10 + */ + function defaultTo(value, defaultValue) { + return value == null || value !== value ? defaultValue : value; + } + + /** + * Creates a function that returns the result of invoking the given functions + * with the `this` binding of the created function, where each successive + * invocation is supplied the return value of the previous. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Util + * @param {...(Function|Function[])} [funcs] The functions to invoke. + * @returns {Function} Returns the new composite function. + * @see _.flowRight + * @example + * + * function square(n) { + * return n * n; + * } + * + * var addSquare = _.flow([_.add, square]); + * addSquare(1, 2); + * // => 9 + */ + var flow = createFlow(); + + /** + * This method is like `_.flow` except that it creates a function that + * invokes the given functions from right to left. + * + * @static + * @since 3.0.0 + * @memberOf _ + * @category Util + * @param {...(Function|Function[])} [funcs] The functions to invoke. + * @returns {Function} Returns the new composite function. + * @see _.flow + * @example + * + * function square(n) { + * return n * n; + * } + * + * var addSquare = _.flowRight([square, _.add]); + * addSquare(1, 2); + * // => 9 + */ + var flowRight = createFlow(true); + + /** + * This method returns the first argument it receives. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {*} value Any value. + * @returns {*} Returns `value`. + * @example + * + * var object = { 'a': 1 }; + * + * console.log(_.identity(object) === object); + * // => true + */ + function identity(value) { + return value; + } + + /** + * Creates a function that invokes `func` with the arguments of the created + * function. If `func` is a property name, the created function returns the + * property value for a given element. If `func` is an array or object, the + * created function returns `true` for elements that contain the equivalent + * source properties, otherwise it returns `false`. + * + * @static + * @since 4.0.0 + * @memberOf _ + * @category Util + * @param {*} [func=_.identity] The value to convert to a callback. + * @returns {Function} Returns the callback. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * // The `_.matches` iteratee shorthand. + * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true })); + * // => [{ 'user': 'barney', 'age': 36, 'active': true }] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.filter(users, _.iteratee(['user', 'fred'])); + * // => [{ 'user': 'fred', 'age': 40 }] + * + * // The `_.property` iteratee shorthand. + * _.map(users, _.iteratee('user')); + * // => ['barney', 'fred'] + * + * // Create custom iteratee shorthands. + * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) { + * return !_.isRegExp(func) ? iteratee(func) : function(string) { + * return func.test(string); + * }; + * }); + * + * _.filter(['abc', 'def'], /ef/); + * // => ['def'] + */ + function iteratee(func) { + return baseIteratee(typeof func == 'function' ? func : baseClone(func, CLONE_DEEP_FLAG)); + } + + /** + * Creates a function that performs a partial deep comparison between a given + * object and `source`, returning `true` if the given object has equivalent + * property values, else `false`. + * + * **Note:** The created function is equivalent to `_.isMatch` with `source` + * partially applied. + * + * Partial comparisons will match empty array and empty object `source` + * values against any array or object value, respectively. See `_.isEqual` + * for a list of supported value comparisons. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Util + * @param {Object} source The object of property values to match. + * @returns {Function} Returns the new spec function. + * @example + * + * var objects = [ + * { 'a': 1, 'b': 2, 'c': 3 }, + * { 'a': 4, 'b': 5, 'c': 6 } + * ]; + * + * _.filter(objects, _.matches({ 'a': 4, 'c': 6 })); + * // => [{ 'a': 4, 'b': 5, 'c': 6 }] + */ + function matches(source) { + return baseMatches(baseClone(source, CLONE_DEEP_FLAG)); + } + + /** + * Creates a function that performs a partial deep comparison between the + * value at `path` of a given object to `srcValue`, returning `true` if the + * object value is equivalent, else `false`. + * + * **Note:** Partial comparisons will match empty array and empty object + * `srcValue` values against any array or object value, respectively. See + * `_.isEqual` for a list of supported value comparisons. + * + * @static + * @memberOf _ + * @since 3.2.0 + * @category Util + * @param {Array|string} path The path of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + * @example + * + * var objects = [ + * { 'a': 1, 'b': 2, 'c': 3 }, + * { 'a': 4, 'b': 5, 'c': 6 } + * ]; + * + * _.find(objects, _.matchesProperty('a', 4)); + * // => { 'a': 4, 'b': 5, 'c': 6 } + */ + function matchesProperty(path, srcValue) { + return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG)); + } + + /** + * Creates a function that invokes the method at `path` of a given object. + * Any additional arguments are provided to the invoked method. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Util + * @param {Array|string} path The path of the method to invoke. + * @param {...*} [args] The arguments to invoke the method with. + * @returns {Function} Returns the new invoker function. + * @example + * + * var objects = [ + * { 'a': { 'b': _.constant(2) } }, + * { 'a': { 'b': _.constant(1) } } + * ]; + * + * _.map(objects, _.method('a.b')); + * // => [2, 1] + * + * _.map(objects, _.method(['a', 'b'])); + * // => [2, 1] + */ + var method = baseRest(function (path, args) { + return function (object) { + return baseInvoke(object, path, args); + }; + }); + + /** + * The opposite of `_.method`; this method creates a function that invokes + * the method at a given path of `object`. Any additional arguments are + * provided to the invoked method. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Util + * @param {Object} object The object to query. + * @param {...*} [args] The arguments to invoke the method with. + * @returns {Function} Returns the new invoker function. + * @example + * + * var array = _.times(3, _.constant), + * object = { 'a': array, 'b': array, 'c': array }; + * + * _.map(['a[2]', 'c[0]'], _.methodOf(object)); + * // => [2, 0] + * + * _.map([['a', '2'], ['c', '0']], _.methodOf(object)); + * // => [2, 0] + */ + var methodOf = baseRest(function (object, args) { + return function (path) { + return baseInvoke(object, path, args); + }; + }); + + /** + * Adds all own enumerable string keyed function properties of a source + * object to the destination object. If `object` is a function, then methods + * are added to its prototype as well. + * + * **Note:** Use `_.runInContext` to create a pristine `lodash` function to + * avoid conflicts caused by modifying the original. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {Function|Object} [object=lodash] The destination object. + * @param {Object} source The object of functions to add. + * @param {Object} [options={}] The options object. + * @param {boolean} [options.chain=true] Specify whether mixins are chainable. + * @returns {Function|Object} Returns `object`. + * @example + * + * function vowels(string) { + * return _.filter(string, function(v) { + * return /[aeiou]/i.test(v); + * }); + * } + * + * _.mixin({ 'vowels': vowels }); + * _.vowels('fred'); + * // => ['e'] + * + * _('fred').vowels().value(); + * // => ['e'] + * + * _.mixin({ 'vowels': vowels }, { 'chain': false }); + * _('fred').vowels(); + * // => ['e'] + */ + function mixin(object, source, options) { + var props = keys(source), + methodNames = baseFunctions(source, props); + + if (options == null && !(isObject(source) && (methodNames.length || !props.length))) { + options = source; + source = object; + object = this; + methodNames = baseFunctions(source, keys(source)); + } + var chain = !(isObject(options) && 'chain' in options) || !!options.chain, + isFunc = isFunction(object); + + arrayEach(methodNames, function (methodName) { + var func = source[methodName]; + object[methodName] = func; + if (isFunc) { + object.prototype[methodName] = function () { + var chainAll = this.__chain__; + if (chain || chainAll) { + var result = object(this.__wrapped__), + actions = (result.__actions__ = copyArray(this.__actions__)); + + actions.push({ func: func, args: arguments, thisArg: object }); + result.__chain__ = chainAll; + return result; + } + return func.apply(object, arrayPush([this.value()], arguments)); + }; + } + }); + + return object; + } + + /** + * Reverts the `_` variable to its previous value and returns a reference to + * the `lodash` function. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @returns {Function} Returns the `lodash` function. + * @example + * + * var lodash = _.noConflict(); + */ + function noConflict() { + if (root._ === this) { + root._ = oldDash; + } + return this; + } + + /** + * This method returns `undefined`. + * + * @static + * @memberOf _ + * @since 2.3.0 + * @category Util + * @example + * + * _.times(2, _.noop); + * // => [undefined, undefined] + */ + function noop() { + // No operation performed. + } + + /** + * Creates a function that gets the argument at index `n`. If `n` is negative, + * the nth argument from the end is returned. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Util + * @param {number} [n=0] The index of the argument to return. + * @returns {Function} Returns the new pass-thru function. + * @example + * + * var func = _.nthArg(1); + * func('a', 'b', 'c', 'd'); + * // => 'b' + * + * var func = _.nthArg(-2); + * func('a', 'b', 'c', 'd'); + * // => 'c' + */ + function nthArg(n) { + n = toInteger(n); + return baseRest(function (args) { + return baseNth(args, n); + }); + } + + /** + * Creates a function that invokes `iteratees` with the arguments it receives + * and returns their results. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Util + * @param {...(Function|Function[])} [iteratees=[_.identity]] + * The iteratees to invoke. + * @returns {Function} Returns the new function. + * @example + * + * var func = _.over([Math.max, Math.min]); + * + * func(1, 2, 3, 4); + * // => [4, 1] + */ + var over = createOver(arrayMap); + + /** + * Creates a function that checks if **all** of the `predicates` return + * truthy when invoked with the arguments it receives. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Util + * @param {...(Function|Function[])} [predicates=[_.identity]] + * The predicates to check. + * @returns {Function} Returns the new function. + * @example + * + * var func = _.overEvery([Boolean, isFinite]); + * + * func('1'); + * // => true + * + * func(null); + * // => false + * + * func(NaN); + * // => false + */ + var overEvery = createOver(arrayEvery); + + /** + * Creates a function that checks if **any** of the `predicates` return + * truthy when invoked with the arguments it receives. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Util + * @param {...(Function|Function[])} [predicates=[_.identity]] + * The predicates to check. + * @returns {Function} Returns the new function. + * @example + * + * var func = _.overSome([Boolean, isFinite]); + * + * func('1'); + * // => true + * + * func(null); + * // => true + * + * func(NaN); + * // => false + */ + var overSome = createOver(arraySome); + + /** + * Creates a function that returns the value at `path` of a given object. + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Util + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new accessor function. + * @example + * + * var objects = [ + * { 'a': { 'b': 2 } }, + * { 'a': { 'b': 1 } } + * ]; + * + * _.map(objects, _.property('a.b')); + * // => [2, 1] + * + * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b'); + * // => [1, 2] + */ + function property(path) { + return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path); + } + + /** + * The opposite of `_.property`; this method creates a function that returns + * the value at a given path of `object`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Util + * @param {Object} object The object to query. + * @returns {Function} Returns the new accessor function. + * @example + * + * var array = [0, 1, 2], + * object = { 'a': array, 'b': array, 'c': array }; + * + * _.map(['a[2]', 'c[0]'], _.propertyOf(object)); + * // => [2, 0] + * + * _.map([['a', '2'], ['c', '0']], _.propertyOf(object)); + * // => [2, 0] + */ + function propertyOf(object) { + return function (path) { + return object == null ? undefined : baseGet(object, path); + }; + } + + /** + * Creates an array of numbers (positive and/or negative) progressing from + * `start` up to, but not including, `end`. A step of `-1` is used if a negative + * `start` is specified without an `end` or `step`. If `end` is not specified, + * it's set to `start` with `start` then set to `0`. + * + * **Note:** JavaScript follows the IEEE-754 standard for resolving + * floating-point values which can produce unexpected results. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {number} [start=0] The start of the range. + * @param {number} end The end of the range. + * @param {number} [step=1] The value to increment or decrement by. + * @returns {Array} Returns the range of numbers. + * @see _.inRange, _.rangeRight + * @example + * + * _.range(4); + * // => [0, 1, 2, 3] + * + * _.range(-4); + * // => [0, -1, -2, -3] + * + * _.range(1, 5); + * // => [1, 2, 3, 4] + * + * _.range(0, 20, 5); + * // => [0, 5, 10, 15] + * + * _.range(0, -4, -1); + * // => [0, -1, -2, -3] + * + * _.range(1, 4, 0); + * // => [1, 1, 1] + * + * _.range(0); + * // => [] + */ + var range = createRange(); + + /** + * This method is like `_.range` except that it populates values in + * descending order. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Util + * @param {number} [start=0] The start of the range. + * @param {number} end The end of the range. + * @param {number} [step=1] The value to increment or decrement by. + * @returns {Array} Returns the range of numbers. + * @see _.inRange, _.range + * @example + * + * _.rangeRight(4); + * // => [3, 2, 1, 0] + * + * _.rangeRight(-4); + * // => [-3, -2, -1, 0] + * + * _.rangeRight(1, 5); + * // => [4, 3, 2, 1] + * + * _.rangeRight(0, 20, 5); + * // => [15, 10, 5, 0] + * + * _.rangeRight(0, -4, -1); + * // => [-3, -2, -1, 0] + * + * _.rangeRight(1, 4, 0); + * // => [1, 1, 1] + * + * _.rangeRight(0); + * // => [] + */ + var rangeRight = createRange(true); + + /** + * This method returns a new empty array. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {Array} Returns the new empty array. + * @example + * + * var arrays = _.times(2, _.stubArray); + * + * console.log(arrays); + * // => [[], []] + * + * console.log(arrays[0] === arrays[1]); + * // => false + */ + function stubArray() { + return []; + } + + /** + * This method returns `false`. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {boolean} Returns `false`. + * @example + * + * _.times(2, _.stubFalse); + * // => [false, false] + */ + function stubFalse() { + return false; + } + + /** + * This method returns a new empty object. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {Object} Returns the new empty object. + * @example + * + * var objects = _.times(2, _.stubObject); + * + * console.log(objects); + * // => [{}, {}] + * + * console.log(objects[0] === objects[1]); + * // => false + */ + function stubObject() { + return {}; + } + + /** + * This method returns an empty string. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {string} Returns the empty string. + * @example + * + * _.times(2, _.stubString); + * // => ['', ''] + */ + function stubString() { + return ''; + } + + /** + * This method returns `true`. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {boolean} Returns `true`. + * @example + * + * _.times(2, _.stubTrue); + * // => [true, true] + */ + function stubTrue() { + return true; + } + + /** + * Invokes the iteratee `n` times, returning an array of the results of + * each invocation. The iteratee is invoked with one argument; (index). + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {number} n The number of times to invoke `iteratee`. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the array of results. + * @example + * + * _.times(3, String); + * // => ['0', '1', '2'] + * + * _.times(4, _.constant(0)); + * // => [0, 0, 0, 0] + */ + function times(n, iteratee) { + n = toInteger(n); + if (n < 1 || n > MAX_SAFE_INTEGER) { + return []; + } + var index = MAX_ARRAY_LENGTH, + length = nativeMin(n, MAX_ARRAY_LENGTH); + + iteratee = getIteratee(iteratee); + n -= MAX_ARRAY_LENGTH; + + var result = baseTimes(length, iteratee); + while (++index < n) { + iteratee(index); + } + return result; + } + + /** + * Converts `value` to a property path array. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Util + * @param {*} value The value to convert. + * @returns {Array} Returns the new property path array. + * @example + * + * _.toPath('a.b.c'); + * // => ['a', 'b', 'c'] + * + * _.toPath('a[0].b.c'); + * // => ['a', '0', 'b', 'c'] + */ + function toPath(value) { + if (isArray(value)) { + return arrayMap(value, toKey); + } + return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value))); + } + + /** + * Generates a unique ID. If `prefix` is given, the ID is appended to it. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {string} [prefix=''] The value to prefix the ID with. + * @returns {string} Returns the unique ID. + * @example + * + * _.uniqueId('contact_'); + * // => 'contact_104' + * + * _.uniqueId(); + * // => '105' + */ + function uniqueId(prefix) { + var id = ++idCounter; + return toString(prefix) + id; + } + + /*------------------------------------------------------------------------*/ + + /** + * Adds two numbers. + * + * @static + * @memberOf _ + * @since 3.4.0 + * @category Math + * @param {number} augend The first number in an addition. + * @param {number} addend The second number in an addition. + * @returns {number} Returns the total. + * @example + * + * _.add(6, 4); + * // => 10 + */ + var add = createMathOperation(function (augend, addend) { + return augend + addend; + }, 0); + + /** + * Computes `number` rounded up to `precision`. + * + * @static + * @memberOf _ + * @since 3.10.0 + * @category Math + * @param {number} number The number to round up. + * @param {number} [precision=0] The precision to round up to. + * @returns {number} Returns the rounded up number. + * @example + * + * _.ceil(4.006); + * // => 5 + * + * _.ceil(6.004, 2); + * // => 6.01 + * + * _.ceil(6040, -2); + * // => 6100 + */ + var ceil = createRound('ceil'); + + /** + * Divide two numbers. + * + * @static + * @memberOf _ + * @since 4.7.0 + * @category Math + * @param {number} dividend The first number in a division. + * @param {number} divisor The second number in a division. + * @returns {number} Returns the quotient. + * @example + * + * _.divide(6, 4); + * // => 1.5 + */ + var divide = createMathOperation(function (dividend, divisor) { + return dividend / divisor; + }, 1); + + /** + * Computes `number` rounded down to `precision`. + * + * @static + * @memberOf _ + * @since 3.10.0 + * @category Math + * @param {number} number The number to round down. + * @param {number} [precision=0] The precision to round down to. + * @returns {number} Returns the rounded down number. + * @example + * + * _.floor(4.006); + * // => 4 + * + * _.floor(0.046, 2); + * // => 0.04 + * + * _.floor(4060, -2); + * // => 4000 + */ + var floor = createRound('floor'); + + /** + * Computes the maximum value of `array`. If `array` is empty or falsey, + * `undefined` is returned. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Math + * @param {Array} array The array to iterate over. + * @returns {*} Returns the maximum value. + * @example + * + * _.max([4, 2, 8, 6]); + * // => 8 + * + * _.max([]); + * // => undefined + */ + function max(array) { + return array && array.length ? baseExtremum(array, identity, baseGt) : undefined; + } + + /** + * This method is like `_.max` except that it accepts `iteratee` which is + * invoked for each element in `array` to generate the criterion by which + * the value is ranked. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Math + * @param {Array} array The array to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {*} Returns the maximum value. + * @example + * + * var objects = [{ 'n': 1 }, { 'n': 2 }]; + * + * _.maxBy(objects, function(o) { return o.n; }); + * // => { 'n': 2 } + * + * // The `_.property` iteratee shorthand. + * _.maxBy(objects, 'n'); + * // => { 'n': 2 } + */ + function maxBy(array, iteratee) { + return array && array.length + ? baseExtremum(array, getIteratee(iteratee, 2), baseGt) + : undefined; + } + + /** + * Computes the mean of the values in `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Math + * @param {Array} array The array to iterate over. + * @returns {number} Returns the mean. + * @example + * + * _.mean([4, 2, 8, 6]); + * // => 5 + */ + function mean(array) { + return baseMean(array, identity); + } + + /** + * This method is like `_.mean` except that it accepts `iteratee` which is + * invoked for each element in `array` to generate the value to be averaged. + * The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.7.0 + * @category Math + * @param {Array} array The array to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {number} Returns the mean. + * @example + * + * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }]; + * + * _.meanBy(objects, function(o) { return o.n; }); + * // => 5 + * + * // The `_.property` iteratee shorthand. + * _.meanBy(objects, 'n'); + * // => 5 + */ + function meanBy(array, iteratee) { + return baseMean(array, getIteratee(iteratee, 2)); + } + + /** + * Computes the minimum value of `array`. If `array` is empty or falsey, + * `undefined` is returned. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Math + * @param {Array} array The array to iterate over. + * @returns {*} Returns the minimum value. + * @example + * + * _.min([4, 2, 8, 6]); + * // => 2 + * + * _.min([]); + * // => undefined + */ + function min(array) { + return array && array.length ? baseExtremum(array, identity, baseLt) : undefined; + } + + /** + * This method is like `_.min` except that it accepts `iteratee` which is + * invoked for each element in `array` to generate the criterion by which + * the value is ranked. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Math + * @param {Array} array The array to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {*} Returns the minimum value. + * @example + * + * var objects = [{ 'n': 1 }, { 'n': 2 }]; + * + * _.minBy(objects, function(o) { return o.n; }); + * // => { 'n': 1 } + * + * // The `_.property` iteratee shorthand. + * _.minBy(objects, 'n'); + * // => { 'n': 1 } + */ + function minBy(array, iteratee) { + return array && array.length + ? baseExtremum(array, getIteratee(iteratee, 2), baseLt) + : undefined; + } + + /** + * Multiply two numbers. + * + * @static + * @memberOf _ + * @since 4.7.0 + * @category Math + * @param {number} multiplier The first number in a multiplication. + * @param {number} multiplicand The second number in a multiplication. + * @returns {number} Returns the product. + * @example + * + * _.multiply(6, 4); + * // => 24 + */ + var multiply = createMathOperation(function (multiplier, multiplicand) { + return multiplier * multiplicand; + }, 1); + + /** + * Computes `number` rounded to `precision`. + * + * @static + * @memberOf _ + * @since 3.10.0 + * @category Math + * @param {number} number The number to round. + * @param {number} [precision=0] The precision to round to. + * @returns {number} Returns the rounded number. + * @example + * + * _.round(4.006); + * // => 4 + * + * _.round(4.006, 2); + * // => 4.01 + * + * _.round(4060, -2); + * // => 4100 + */ + var round = createRound('round'); + + /** + * Subtract two numbers. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Math + * @param {number} minuend The first number in a subtraction. + * @param {number} subtrahend The second number in a subtraction. + * @returns {number} Returns the difference. + * @example + * + * _.subtract(6, 4); + * // => 2 + */ + var subtract = createMathOperation(function (minuend, subtrahend) { + return minuend - subtrahend; + }, 0); + + /** + * Computes the sum of the values in `array`. + * + * @static + * @memberOf _ + * @since 3.4.0 + * @category Math + * @param {Array} array The array to iterate over. + * @returns {number} Returns the sum. + * @example + * + * _.sum([4, 2, 8, 6]); + * // => 20 + */ + function sum(array) { + return array && array.length ? baseSum(array, identity) : 0; + } + + /** + * This method is like `_.sum` except that it accepts `iteratee` which is + * invoked for each element in `array` to generate the value to be summed. + * The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Math + * @param {Array} array The array to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {number} Returns the sum. + * @example + * + * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }]; + * + * _.sumBy(objects, function(o) { return o.n; }); + * // => 20 + * + * // The `_.property` iteratee shorthand. + * _.sumBy(objects, 'n'); + * // => 20 + */ + function sumBy(array, iteratee) { + return array && array.length ? baseSum(array, getIteratee(iteratee, 2)) : 0; + } + + /*------------------------------------------------------------------------*/ + + // Add methods that return wrapped values in chain sequences. + lodash.after = after; + lodash.ary = ary; + lodash.assign = assign; + lodash.assignIn = assignIn; + lodash.assignInWith = assignInWith; + lodash.assignWith = assignWith; + lodash.at = at; + lodash.before = before; + lodash.bind = bind; + lodash.bindAll = bindAll; + lodash.bindKey = bindKey; + lodash.castArray = castArray; + lodash.chain = chain; + lodash.chunk = chunk; + lodash.compact = compact; + lodash.concat = concat; + lodash.cond = cond; + lodash.conforms = conforms; + lodash.constant = constant; + lodash.countBy = countBy; + lodash.create = create; + lodash.curry = curry; + lodash.curryRight = curryRight; + lodash.debounce = debounce; + lodash.defaults = defaults; + lodash.defaultsDeep = defaultsDeep; + lodash.defer = defer; + lodash.delay = delay; + lodash.difference = difference; + lodash.differenceBy = differenceBy; + lodash.differenceWith = differenceWith; + lodash.drop = drop; + lodash.dropRight = dropRight; + lodash.dropRightWhile = dropRightWhile; + lodash.dropWhile = dropWhile; + lodash.fill = fill; + lodash.filter = filter; + lodash.flatMap = flatMap; + lodash.flatMapDeep = flatMapDeep; + lodash.flatMapDepth = flatMapDepth; + lodash.flatten = flatten; + lodash.flattenDeep = flattenDeep; + lodash.flattenDepth = flattenDepth; + lodash.flip = flip; + lodash.flow = flow; + lodash.flowRight = flowRight; + lodash.fromPairs = fromPairs; + lodash.functions = functions; + lodash.functionsIn = functionsIn; + lodash.groupBy = groupBy; + lodash.initial = initial; + lodash.intersection = intersection; + lodash.intersectionBy = intersectionBy; + lodash.intersectionWith = intersectionWith; + lodash.invert = invert; + lodash.invertBy = invertBy; + lodash.invokeMap = invokeMap; + lodash.iteratee = iteratee; + lodash.keyBy = keyBy; + lodash.keys = keys; + lodash.keysIn = keysIn; + lodash.map = map; + lodash.mapKeys = mapKeys; + lodash.mapValues = mapValues; + lodash.matches = matches; + lodash.matchesProperty = matchesProperty; + lodash.memoize = memoize; + lodash.merge = merge; + lodash.mergeWith = mergeWith; + lodash.method = method; + lodash.methodOf = methodOf; + lodash.mixin = mixin; + lodash.negate = negate; + lodash.nthArg = nthArg; + lodash.omit = omit; + lodash.omitBy = omitBy; + lodash.once = once; + lodash.orderBy = orderBy; + lodash.over = over; + lodash.overArgs = overArgs; + lodash.overEvery = overEvery; + lodash.overSome = overSome; + lodash.partial = partial; + lodash.partialRight = partialRight; + lodash.partition = partition; + lodash.pick = pick; + lodash.pickBy = pickBy; + lodash.property = property; + lodash.propertyOf = propertyOf; + lodash.pull = pull; + lodash.pullAll = pullAll; + lodash.pullAllBy = pullAllBy; + lodash.pullAllWith = pullAllWith; + lodash.pullAt = pullAt; + lodash.range = range; + lodash.rangeRight = rangeRight; + lodash.rearg = rearg; + lodash.reject = reject; + lodash.remove = remove; + lodash.rest = rest; + lodash.reverse = reverse; + lodash.sampleSize = sampleSize; + lodash.set = set; + lodash.setWith = setWith; + lodash.shuffle = shuffle; + lodash.slice = slice; + lodash.sortBy = sortBy; + lodash.sortedUniq = sortedUniq; + lodash.sortedUniqBy = sortedUniqBy; + lodash.split = split; + lodash.spread = spread; + lodash.tail = tail; + lodash.take = take; + lodash.takeRight = takeRight; + lodash.takeRightWhile = takeRightWhile; + lodash.takeWhile = takeWhile; + lodash.tap = tap; + lodash.throttle = throttle; + lodash.thru = thru; + lodash.toArray = toArray; + lodash.toPairs = toPairs; + lodash.toPairsIn = toPairsIn; + lodash.toPath = toPath; + lodash.toPlainObject = toPlainObject; + lodash.transform = transform; + lodash.unary = unary; + lodash.union = union; + lodash.unionBy = unionBy; + lodash.unionWith = unionWith; + lodash.uniq = uniq; + lodash.uniqBy = uniqBy; + lodash.uniqWith = uniqWith; + lodash.unset = unset; + lodash.unzip = unzip; + lodash.unzipWith = unzipWith; + lodash.update = update; + lodash.updateWith = updateWith; + lodash.values = values; + lodash.valuesIn = valuesIn; + lodash.without = without; + lodash.words = words; + lodash.wrap = wrap; + lodash.xor = xor; + lodash.xorBy = xorBy; + lodash.xorWith = xorWith; + lodash.zip = zip; + lodash.zipObject = zipObject; + lodash.zipObjectDeep = zipObjectDeep; + lodash.zipWith = zipWith; + + // Add aliases. + lodash.entries = toPairs; + lodash.entriesIn = toPairsIn; + lodash.extend = assignIn; + lodash.extendWith = assignInWith; + + // Add methods to `lodash.prototype`. + mixin(lodash, lodash); + + /*------------------------------------------------------------------------*/ + + // Add methods that return unwrapped values in chain sequences. + lodash.add = add; + lodash.attempt = attempt; + lodash.camelCase = camelCase; + lodash.capitalize = capitalize; + lodash.ceil = ceil; + lodash.clamp = clamp; + lodash.clone = clone; + lodash.cloneDeep = cloneDeep; + lodash.cloneDeepWith = cloneDeepWith; + lodash.cloneWith = cloneWith; + lodash.conformsTo = conformsTo; + lodash.deburr = deburr; + lodash.defaultTo = defaultTo; + lodash.divide = divide; + lodash.endsWith = endsWith; + lodash.eq = eq; + lodash.escape = escape; + lodash.escapeRegExp = escapeRegExp; + lodash.every = every; + lodash.find = find; + lodash.findIndex = findIndex; + lodash.findKey = findKey; + lodash.findLast = findLast; + lodash.findLastIndex = findLastIndex; + lodash.findLastKey = findLastKey; + lodash.floor = floor; + lodash.forEach = forEach; + lodash.forEachRight = forEachRight; + lodash.forIn = forIn; + lodash.forInRight = forInRight; + lodash.forOwn = forOwn; + lodash.forOwnRight = forOwnRight; + lodash.get = get; + lodash.gt = gt; + lodash.gte = gte; + lodash.has = has; + lodash.hasIn = hasIn; + lodash.head = head; + lodash.identity = identity; + lodash.includes = includes; + lodash.indexOf = indexOf; + lodash.inRange = inRange; + lodash.invoke = invoke; + lodash.isArguments = isArguments; + lodash.isArray = isArray; + lodash.isArrayBuffer = isArrayBuffer; + lodash.isArrayLike = isArrayLike; + lodash.isArrayLikeObject = isArrayLikeObject; + lodash.isBoolean = isBoolean; + lodash.isBuffer = isBuffer; + lodash.isDate = isDate; + lodash.isElement = isElement; + lodash.isEmpty = isEmpty; + lodash.isEqual = isEqual; + lodash.isEqualWith = isEqualWith; + lodash.isError = isError; + lodash.isFinite = isFinite; + lodash.isFunction = isFunction; + lodash.isInteger = isInteger; + lodash.isLength = isLength; + lodash.isMap = isMap; + lodash.isMatch = isMatch; + lodash.isMatchWith = isMatchWith; + lodash.isNaN = isNaN; + lodash.isNative = isNative; + lodash.isNil = isNil; + lodash.isNull = isNull; + lodash.isNumber = isNumber; + lodash.isObject = isObject; + lodash.isObjectLike = isObjectLike; + lodash.isPlainObject = isPlainObject; + lodash.isRegExp = isRegExp; + lodash.isSafeInteger = isSafeInteger; + lodash.isSet = isSet; + lodash.isString = isString; + lodash.isSymbol = isSymbol; + lodash.isTypedArray = isTypedArray; + lodash.isUndefined = isUndefined; + lodash.isWeakMap = isWeakMap; + lodash.isWeakSet = isWeakSet; + lodash.join = join; + lodash.kebabCase = kebabCase; + lodash.last = last; + lodash.lastIndexOf = lastIndexOf; + lodash.lowerCase = lowerCase; + lodash.lowerFirst = lowerFirst; + lodash.lt = lt; + lodash.lte = lte; + lodash.max = max; + lodash.maxBy = maxBy; + lodash.mean = mean; + lodash.meanBy = meanBy; + lodash.min = min; + lodash.minBy = minBy; + lodash.stubArray = stubArray; + lodash.stubFalse = stubFalse; + lodash.stubObject = stubObject; + lodash.stubString = stubString; + lodash.stubTrue = stubTrue; + lodash.multiply = multiply; + lodash.nth = nth; + lodash.noConflict = noConflict; + lodash.noop = noop; + lodash.now = now; + lodash.pad = pad; + lodash.padEnd = padEnd; + lodash.padStart = padStart; + lodash.parseInt = parseInt; + lodash.random = random; + lodash.reduce = reduce; + lodash.reduceRight = reduceRight; + lodash.repeat = repeat; + lodash.replace = replace; + lodash.result = result; + lodash.round = round; + lodash.runInContext = runInContext; + lodash.sample = sample; + lodash.size = size; + lodash.snakeCase = snakeCase; + lodash.some = some; + lodash.sortedIndex = sortedIndex; + lodash.sortedIndexBy = sortedIndexBy; + lodash.sortedIndexOf = sortedIndexOf; + lodash.sortedLastIndex = sortedLastIndex; + lodash.sortedLastIndexBy = sortedLastIndexBy; + lodash.sortedLastIndexOf = sortedLastIndexOf; + lodash.startCase = startCase; + lodash.startsWith = startsWith; + lodash.subtract = subtract; + lodash.sum = sum; + lodash.sumBy = sumBy; + lodash.template = template; + lodash.times = times; + lodash.toFinite = toFinite; + lodash.toInteger = toInteger; + lodash.toLength = toLength; + lodash.toLower = toLower; + lodash.toNumber = toNumber; + lodash.toSafeInteger = toSafeInteger; + lodash.toString = toString; + lodash.toUpper = toUpper; + lodash.trim = trim; + lodash.trimEnd = trimEnd; + lodash.trimStart = trimStart; + lodash.truncate = truncate; + lodash.unescape = unescape; + lodash.uniqueId = uniqueId; + lodash.upperCase = upperCase; + lodash.upperFirst = upperFirst; + + // Add aliases. + lodash.each = forEach; + lodash.eachRight = forEachRight; + lodash.first = head; + + mixin( + lodash, + (function () { + var source = {}; + baseForOwn(lodash, function (func, methodName) { + if (!hasOwnProperty.call(lodash.prototype, methodName)) { + source[methodName] = func; + } + }); + return source; + })(), + { chain: false }, + ); + + /*------------------------------------------------------------------------*/ + + /** + * The semantic version number. + * + * @static + * @memberOf _ + * @type {string} + */ + lodash.VERSION = VERSION; + + // Assign default placeholders. + arrayEach( + ['bind', 'bindKey', 'curry', 'curryRight', 'partial', 'partialRight'], + function (methodName) { + lodash[methodName].placeholder = lodash; + }, + ); + + // Add `LazyWrapper` methods for `_.drop` and `_.take` variants. + arrayEach(['drop', 'take'], function (methodName, index) { + LazyWrapper.prototype[methodName] = function (n) { + n = n === undefined ? 1 : nativeMax(toInteger(n), 0); + + var result = this.__filtered__ && !index ? new LazyWrapper(this) : this.clone(); + + if (result.__filtered__) { + result.__takeCount__ = nativeMin(n, result.__takeCount__); + } else { + result.__views__.push({ + size: nativeMin(n, MAX_ARRAY_LENGTH), + type: methodName + (result.__dir__ < 0 ? 'Right' : ''), + }); + } + return result; + }; + + LazyWrapper.prototype[methodName + 'Right'] = function (n) { + return this.reverse()[methodName](n).reverse(); + }; + }); + + // Add `LazyWrapper` methods that accept an `iteratee` value. + arrayEach(['filter', 'map', 'takeWhile'], function (methodName, index) { + var type = index + 1, + isFilter = type == LAZY_FILTER_FLAG || type == LAZY_WHILE_FLAG; + + LazyWrapper.prototype[methodName] = function (iteratee) { + var result = this.clone(); + result.__iteratees__.push({ + iteratee: getIteratee(iteratee, 3), + type: type, + }); + result.__filtered__ = result.__filtered__ || isFilter; + return result; + }; + }); + + // Add `LazyWrapper` methods for `_.head` and `_.last`. + arrayEach(['head', 'last'], function (methodName, index) { + var takeName = 'take' + (index ? 'Right' : ''); + + LazyWrapper.prototype[methodName] = function () { + return this[takeName](1).value()[0]; + }; + }); + + // Add `LazyWrapper` methods for `_.initial` and `_.tail`. + arrayEach(['initial', 'tail'], function (methodName, index) { + var dropName = 'drop' + (index ? '' : 'Right'); + + LazyWrapper.prototype[methodName] = function () { + return this.__filtered__ ? new LazyWrapper(this) : this[dropName](1); + }; + }); + + LazyWrapper.prototype.compact = function () { + return this.filter(identity); + }; + + LazyWrapper.prototype.find = function (predicate) { + return this.filter(predicate).head(); + }; + + LazyWrapper.prototype.findLast = function (predicate) { + return this.reverse().find(predicate); + }; + + LazyWrapper.prototype.invokeMap = baseRest(function (path, args) { + if (typeof path == 'function') { + return new LazyWrapper(this); + } + return this.map(function (value) { + return baseInvoke(value, path, args); + }); + }); + + LazyWrapper.prototype.reject = function (predicate) { + return this.filter(negate(getIteratee(predicate))); + }; + + LazyWrapper.prototype.slice = function (start, end) { + start = toInteger(start); + + var result = this; + if (result.__filtered__ && (start > 0 || end < 0)) { + return new LazyWrapper(result); + } + if (start < 0) { + result = result.takeRight(-start); + } else if (start) { + result = result.drop(start); + } + if (end !== undefined) { + end = toInteger(end); + result = end < 0 ? result.dropRight(-end) : result.take(end - start); + } + return result; + }; + + LazyWrapper.prototype.takeRightWhile = function (predicate) { + return this.reverse().takeWhile(predicate).reverse(); + }; + + LazyWrapper.prototype.toArray = function () { + return this.take(MAX_ARRAY_LENGTH); + }; + + // Add `LazyWrapper` methods to `lodash.prototype`. + baseForOwn(LazyWrapper.prototype, function (func, methodName) { + var checkIteratee = /^(?:filter|find|map|reject)|While$/.test(methodName), + isTaker = /^(?:head|last)$/.test(methodName), + lodashFunc = lodash[isTaker ? 'take' + (methodName == 'last' ? 'Right' : '') : methodName], + retUnwrapped = isTaker || /^find/.test(methodName); + + if (!lodashFunc) { + return; + } + lodash.prototype[methodName] = function () { + var value = this.__wrapped__, + args = isTaker ? [1] : arguments, + isLazy = value instanceof LazyWrapper, + iteratee = args[0], + useLazy = isLazy || isArray(value); + + var interceptor = function (value) { + var result = lodashFunc.apply(lodash, arrayPush([value], args)); + return isTaker && chainAll ? result[0] : result; + }; + + if (useLazy && checkIteratee && typeof iteratee == 'function' && iteratee.length != 1) { + // Avoid lazy use if the iteratee has a "length" value other than `1`. + isLazy = useLazy = false; + } + var chainAll = this.__chain__, + isHybrid = !!this.__actions__.length, + isUnwrapped = retUnwrapped && !chainAll, + onlyLazy = isLazy && !isHybrid; + + if (!retUnwrapped && useLazy) { + value = onlyLazy ? value : new LazyWrapper(this); + var result = func.apply(value, args); + result.__actions__.push({ func: thru, args: [interceptor], thisArg: undefined }); + return new LodashWrapper(result, chainAll); + } + if (isUnwrapped && onlyLazy) { + return func.apply(this, args); + } + result = this.thru(interceptor); + return isUnwrapped ? (isTaker ? result.value()[0] : result.value()) : result; + }; + }); + + // Add `Array` methods to `lodash.prototype`. + arrayEach(['pop', 'push', 'shift', 'sort', 'splice', 'unshift'], function (methodName) { + var func = arrayProto[methodName], + chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru', + retUnwrapped = /^(?:pop|shift)$/.test(methodName); + + lodash.prototype[methodName] = function () { + var args = arguments; + if (retUnwrapped && !this.__chain__) { + var value = this.value(); + return func.apply(isArray(value) ? value : [], args); + } + return this[chainName](function (value) { + return func.apply(isArray(value) ? value : [], args); + }); + }; + }); + + // Map minified method names to their real names. + baseForOwn(LazyWrapper.prototype, function (func, methodName) { + var lodashFunc = lodash[methodName]; + if (lodashFunc) { + var key = lodashFunc.name + ''; + if (!hasOwnProperty.call(realNames, key)) { + realNames[key] = []; + } + realNames[key].push({ name: methodName, func: lodashFunc }); + } + }); + + realNames[createHybrid(undefined, WRAP_BIND_KEY_FLAG).name] = [ + { + name: 'wrapper', + func: undefined, + }, + ]; + + // Add methods to `LazyWrapper`. + LazyWrapper.prototype.clone = lazyClone; + LazyWrapper.prototype.reverse = lazyReverse; + LazyWrapper.prototype.value = lazyValue; + + // Add chain sequence methods to the `lodash` wrapper. + lodash.prototype.at = wrapperAt; + lodash.prototype.chain = wrapperChain; + lodash.prototype.commit = wrapperCommit; + lodash.prototype.next = wrapperNext; + lodash.prototype.plant = wrapperPlant; + lodash.prototype.reverse = wrapperReverse; + lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue; + + // Add lazy aliases. + lodash.prototype.first = lodash.prototype.head; + + if (symIterator) { + lodash.prototype[symIterator] = wrapperToIterator; + } + return lodash; + }; + + /*--------------------------------------------------------------------------*/ + + // Export lodash. + var _ = runInContext(); + + // Some AMD build optimizers, like r.js, check for condition patterns like: + if (true) { + // Expose Lodash on the global object to prevent errors when Lodash is + // loaded by a script tag in the presence of an AMD loader. + // See http://requirejs.org/docs/errors.html#mismatch for more details. + // Use `_.noConflict` to remove Lodash from the global object. + root._ = _; + + // Define as an anonymous module so, through path mapping, it can be + // referenced as the "underscore" module. + !((__WEBPACK_AMD_DEFINE_RESULT__ = function () { + return _; + }.call(exports, __webpack_require__, exports, module)), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } + // Check for `exports` after `define` in case a build optimizer adds it. + else if (freeModule) { + // Export for Node.js. + (freeModule.exports = _)._ = _; + // Export for CommonJS support. + freeExports._ = _; + } else { + // Export to the global object. + root._ = _; + } + }).call(this); + + /* WEBPACK VAR INJECTION */ + }).call(exports, __webpack_require__(38), __webpack_require__(239)(module)); + + /***/ + }, + /* 543 */ + /***/ function (module, exports) { + module.exports = { + brightColor: 'HelloWorld__brightColor__1M8yw', + }; + + /***/ + }, + /* 544 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(10); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_create_react_class__ = __webpack_require__(37); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_create_react_class___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_create_react_class__); + /* eslint-disable react/prefer-es6-class */ + + // Super simple example of React component using React.createClass + var HelloWorldES5 = __WEBPACK_IMPORTED_MODULE_2_create_react_class___default()({ + displayName: 'HelloWorldES5', + + propTypes: { + helloWorldData: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object, + }, + + getInitialState: function getInitialState() { + return this.props.helloWorldData; + }, + setNameDomRef: function setNameDomRef(nameDomNode) { + this.nameDomRef = nameDomNode; + }, + handleChange: function handleChange() { + var name = this.nameDomRef.value; + this.setState({ name: name }); + }, + render: function render() { + var name = this.state.name; + + return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'div', + null, + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('h3', null, 'Hello ES5, ', name, '!'), + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'p', + null, + 'Say hello to:', + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('input', { + type: 'text', + ref: this.setNameDomRef, + defaultValue: name, + onChange: this.handleChange, + }), + ), + ); + }, + }); + + var _default = HelloWorldES5; + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + HelloWorldES5, + 'HelloWorldES5', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/HelloWorldES5.jsx', + ); + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/HelloWorldES5.jsx', + ); + })(); + + /***/ + }, + /* 545 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + */ + + var _assign = __webpack_require__(64); + + var emptyObject = __webpack_require__(546); + var _invariant = __webpack_require__(547); + + if (true) { + var warning = __webpack_require__(548); + } + + var MIXINS_KEY = 'mixins'; + + // Helper function to allow the creation of anonymous functions which do not + // have .name set to the name of the variable being assigned to. + function identity(fn) { + return fn; + } + + var ReactPropTypeLocationNames; + if (true) { + ReactPropTypeLocationNames = { + prop: 'prop', + context: 'context', + childContext: 'child context', + }; + } else { + ReactPropTypeLocationNames = {}; + } + + function factory(ReactComponent, isValidElement, ReactNoopUpdateQueue) { + /** + * Policies that describe methods in `ReactClassInterface`. + */ + + var injectedMixins = []; + + /** + * Composite components are higher-level components that compose other composite + * or host components. + * + * To create a new type of `ReactClass`, pass a specification of + * your new class to `React.createClass`. The only requirement of your class + * specification is that you implement a `render` method. + * + * var MyComponent = React.createClass({ + * render: function() { + * return <div>Hello World</div>; + * } + * }); + * + * The class specification supports a specific protocol of methods that have + * special meaning (e.g. `render`). See `ReactClassInterface` for + * more the comprehensive protocol. Any other properties and methods in the + * class specification will be available on the prototype. + * + * @interface ReactClassInterface + * @internal + */ + var ReactClassInterface = { + /** + * An array of Mixin objects to include when defining your component. + * + * @type {array} + * @optional + */ + mixins: 'DEFINE_MANY', + + /** + * An object containing properties and methods that should be defined on + * the component's constructor instead of its prototype (static methods). + * + * @type {object} + * @optional + */ + statics: 'DEFINE_MANY', + + /** + * Definition of prop types for this component. + * + * @type {object} + * @optional + */ + propTypes: 'DEFINE_MANY', + + /** + * Definition of context types for this component. + * + * @type {object} + * @optional + */ + contextTypes: 'DEFINE_MANY', + + /** + * Definition of context types this component sets for its children. + * + * @type {object} + * @optional + */ + childContextTypes: 'DEFINE_MANY', + + // ==== Definition methods ==== + + /** + * Invoked when the component is mounted. Values in the mapping will be set on + * `this.props` if that prop is not specified (i.e. using an `in` check). + * + * This method is invoked before `getInitialState` and therefore cannot rely + * on `this.state` or use `this.setState`. + * + * @return {object} + * @optional + */ + getDefaultProps: 'DEFINE_MANY_MERGED', + + /** + * Invoked once before the component is mounted. The return value will be used + * as the initial value of `this.state`. + * + * getInitialState: function() { + * return { + * isOn: false, + * fooBaz: new BazFoo() + * } + * } + * + * @return {object} + * @optional + */ + getInitialState: 'DEFINE_MANY_MERGED', + + /** + * @return {object} + * @optional + */ + getChildContext: 'DEFINE_MANY_MERGED', + + /** + * Uses props from `this.props` and state from `this.state` to render the + * structure of the component. + * + * No guarantees are made about when or how often this method is invoked, so + * it must not have side effects. + * + * render: function() { + * var name = this.props.name; + * return <div>Hello, {name}!</div>; + * } + * + * @return {ReactComponent} + * @required + */ + render: 'DEFINE_ONCE', + + // ==== Delegate methods ==== + + /** + * Invoked when the component is initially created and about to be mounted. + * This may have side effects, but any external subscriptions or data created + * by this method must be cleaned up in `componentWillUnmount`. + * + * @optional + */ + componentWillMount: 'DEFINE_MANY', + + /** + * Invoked when the component has been mounted and has a DOM representation. + * However, there is no guarantee that the DOM node is in the document. + * + * Use this as an opportunity to operate on the DOM when the component has + * been mounted (initialized and rendered) for the first time. + * + * @param {DOMElement} rootNode DOM element representing the component. + * @optional + */ + componentDidMount: 'DEFINE_MANY', + + /** + * Invoked before the component receives new props. + * + * Use this as an opportunity to react to a prop transition by updating the + * state using `this.setState`. Current props are accessed via `this.props`. + * + * componentWillReceiveProps: function(nextProps, nextContext) { + * this.setState({ + * likesIncreasing: nextProps.likeCount > this.props.likeCount + * }); + * } + * + * NOTE: There is no equivalent `componentWillReceiveState`. An incoming prop + * transition may cause a state change, but the opposite is not true. If you + * need it, you are probably looking for `componentWillUpdate`. + * + * @param {object} nextProps + * @optional + */ + componentWillReceiveProps: 'DEFINE_MANY', + + /** + * Invoked while deciding if the component should be updated as a result of + * receiving new props, state and/or context. + * + * Use this as an opportunity to `return false` when you're certain that the + * transition to the new props/state/context will not require a component + * update. + * + * shouldComponentUpdate: function(nextProps, nextState, nextContext) { + * return !equal(nextProps, this.props) || + * !equal(nextState, this.state) || + * !equal(nextContext, this.context); + * } + * + * @param {object} nextProps + * @param {?object} nextState + * @param {?object} nextContext + * @return {boolean} True if the component should update. + * @optional + */ + shouldComponentUpdate: 'DEFINE_ONCE', + + /** + * Invoked when the component is about to update due to a transition from + * `this.props`, `this.state` and `this.context` to `nextProps`, `nextState` + * and `nextContext`. + * + * Use this as an opportunity to perform preparation before an update occurs. + * + * NOTE: You **cannot** use `this.setState()` in this method. + * + * @param {object} nextProps + * @param {?object} nextState + * @param {?object} nextContext + * @param {ReactReconcileTransaction} transaction + * @optional + */ + componentWillUpdate: 'DEFINE_MANY', + + /** + * Invoked when the component's DOM representation has been updated. + * + * Use this as an opportunity to operate on the DOM when the component has + * been updated. + * + * @param {object} prevProps + * @param {?object} prevState + * @param {?object} prevContext + * @param {DOMElement} rootNode DOM element representing the component. + * @optional + */ + componentDidUpdate: 'DEFINE_MANY', + + /** + * Invoked when the component is about to be removed from its parent and have + * its DOM representation destroyed. + * + * Use this as an opportunity to deallocate any external resources. + * + * NOTE: There is no `componentDidUnmount` since your component will have been + * destroyed by that point. + * + * @optional + */ + componentWillUnmount: 'DEFINE_MANY', + + /** + * Replacement for (deprecated) `componentWillMount`. + * + * @optional + */ + UNSAFE_componentWillMount: 'DEFINE_MANY', + + /** + * Replacement for (deprecated) `componentWillReceiveProps`. + * + * @optional + */ + UNSAFE_componentWillReceiveProps: 'DEFINE_MANY', + + /** + * Replacement for (deprecated) `componentWillUpdate`. + * + * @optional + */ + UNSAFE_componentWillUpdate: 'DEFINE_MANY', + + // ==== Advanced methods ==== + + /** + * Updates the component's currently mounted DOM representation. + * + * By default, this implements React's rendering and reconciliation algorithm. + * Sophisticated clients may wish to override this. + * + * @param {ReactReconcileTransaction} transaction + * @internal + * @overridable + */ + updateComponent: 'OVERRIDE_BASE', + }; + + /** + * Similar to ReactClassInterface but for static methods. + */ + var ReactClassStaticInterface = { + /** + * This method is invoked after a component is instantiated and when it + * receives new props. Return an object to update state in response to + * prop changes. Return null to indicate no change to state. + * + * If an object is returned, its keys will be merged into the existing state. + * + * @return {object || null} + * @optional + */ + getDerivedStateFromProps: 'DEFINE_MANY_MERGED', + }; + + /** + * Mapping from class specification keys to special processing functions. + * + * Although these are declared like instance properties in the specification + * when defining classes using `React.createClass`, they are actually static + * and are accessible on the constructor instead of the prototype. Despite + * being static, they must be defined outside of the "statics" key under + * which all other static methods are defined. + */ + var RESERVED_SPEC_KEYS = { + displayName: function (Constructor, displayName) { + Constructor.displayName = displayName; + }, + mixins: function (Constructor, mixins) { + if (mixins) { + for (var i = 0; i < mixins.length; i++) { + mixSpecIntoComponent(Constructor, mixins[i]); + } + } + }, + childContextTypes: function (Constructor, childContextTypes) { + if (true) { + validateTypeDef(Constructor, childContextTypes, 'childContext'); + } + Constructor.childContextTypes = _assign({}, Constructor.childContextTypes, childContextTypes); + }, + contextTypes: function (Constructor, contextTypes) { + if (true) { + validateTypeDef(Constructor, contextTypes, 'context'); + } + Constructor.contextTypes = _assign({}, Constructor.contextTypes, contextTypes); + }, + /** + * Special case getDefaultProps which should move into statics but requires + * automatic merging. + */ + getDefaultProps: function (Constructor, getDefaultProps) { + if (Constructor.getDefaultProps) { + Constructor.getDefaultProps = createMergedResultFunction( + Constructor.getDefaultProps, + getDefaultProps, + ); + } else { + Constructor.getDefaultProps = getDefaultProps; + } + }, + propTypes: function (Constructor, propTypes) { + if (true) { + validateTypeDef(Constructor, propTypes, 'prop'); + } + Constructor.propTypes = _assign({}, Constructor.propTypes, propTypes); + }, + statics: function (Constructor, statics) { + mixStaticSpecIntoComponent(Constructor, statics); + }, + autobind: function () {}, + }; + + function validateTypeDef(Constructor, typeDef, location) { + for (var propName in typeDef) { + if (typeDef.hasOwnProperty(propName)) { + // use a warning instead of an _invariant so components + // don't show up in prod but only in __DEV__ + if (true) { + warning( + typeof typeDef[propName] === 'function', + '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', + Constructor.displayName || 'ReactClass', + ReactPropTypeLocationNames[location], + propName, + ); + } + } + } + } + + function validateMethodOverride(isAlreadyDefined, name) { + var specPolicy = ReactClassInterface.hasOwnProperty(name) ? ReactClassInterface[name] : null; + + // Disallow overriding of base class methods unless explicitly allowed. + if (ReactClassMixin.hasOwnProperty(name)) { + _invariant( + specPolicy === 'OVERRIDE_BASE', + 'ReactClassInterface: You are attempting to override ' + + '`%s` from your class specification. Ensure that your method names ' + + 'do not overlap with React methods.', + name, + ); + } + + // Disallow defining methods more than once unless explicitly allowed. + if (isAlreadyDefined) { + _invariant( + specPolicy === 'DEFINE_MANY' || specPolicy === 'DEFINE_MANY_MERGED', + 'ReactClassInterface: You are attempting to define ' + + '`%s` on your component more than once. This conflict may be due ' + + 'to a mixin.', + name, + ); + } + } + + /** + * Mixin helper which handles policy validation and reserved + * specification keys when building React classes. + */ + function mixSpecIntoComponent(Constructor, spec) { + if (!spec) { + if (true) { + var typeofSpec = typeof spec; + var isMixinValid = typeofSpec === 'object' && spec !== null; + + if (true) { + warning( + isMixinValid, + "%s: You're attempting to include a mixin that is either null " + + 'or not an object. Check the mixins included by the component, ' + + 'as well as any mixins they include themselves. ' + + 'Expected object but got %s.', + Constructor.displayName || 'ReactClass', + spec === null ? null : typeofSpec, + ); + } + } + + return; + } + + _invariant( + typeof spec !== 'function', + "ReactClass: You're attempting to " + + 'use a component class or function as a mixin. Instead, just use a ' + + 'regular object.', + ); + _invariant( + !isValidElement(spec), + "ReactClass: You're attempting to " + + 'use a component as a mixin. Instead, just use a regular object.', + ); + + var proto = Constructor.prototype; + var autoBindPairs = proto.__reactAutoBindPairs; + + // By handling mixins before any other properties, we ensure the same + // chaining order is applied to methods with DEFINE_MANY policy, whether + // mixins are listed before or after these methods in the spec. + if (spec.hasOwnProperty(MIXINS_KEY)) { + RESERVED_SPEC_KEYS.mixins(Constructor, spec.mixins); + } + + for (var name in spec) { + if (!spec.hasOwnProperty(name)) { + continue; + } + + if (name === MIXINS_KEY) { + // We have already handled mixins in a special case above. + continue; + } + + var property = spec[name]; + var isAlreadyDefined = proto.hasOwnProperty(name); + validateMethodOverride(isAlreadyDefined, name); + + if (RESERVED_SPEC_KEYS.hasOwnProperty(name)) { + RESERVED_SPEC_KEYS[name](Constructor, property); + } else { + // Setup methods on prototype: + // The following member methods should not be automatically bound: + // 1. Expected ReactClass methods (in the "interface"). + // 2. Overridden methods (that were mixed in). + var isReactClassMethod = ReactClassInterface.hasOwnProperty(name); + var isFunction = typeof property === 'function'; + var shouldAutoBind = + isFunction && !isReactClassMethod && !isAlreadyDefined && spec.autobind !== false; + + if (shouldAutoBind) { + autoBindPairs.push(name, property); + proto[name] = property; + } else { + if (isAlreadyDefined) { + var specPolicy = ReactClassInterface[name]; + + // These cases should already be caught by validateMethodOverride. + _invariant( + isReactClassMethod && + (specPolicy === 'DEFINE_MANY_MERGED' || specPolicy === 'DEFINE_MANY'), + 'ReactClass: Unexpected spec policy %s for key %s ' + 'when mixing in component specs.', + specPolicy, + name, + ); + + // For methods which are defined more than once, call the existing + // methods before calling the new property, merging if appropriate. + if (specPolicy === 'DEFINE_MANY_MERGED') { + proto[name] = createMergedResultFunction(proto[name], property); + } else if (specPolicy === 'DEFINE_MANY') { + proto[name] = createChainedFunction(proto[name], property); + } + } else { + proto[name] = property; + if (true) { + // Add verbose displayName to the function, which helps when looking + // at profiling tools. + if (typeof property === 'function' && spec.displayName) { + proto[name].displayName = spec.displayName + '_' + name; + } + } + } + } + } + } + } + + function mixStaticSpecIntoComponent(Constructor, statics) { + if (!statics) { + return; + } + + for (var name in statics) { + var property = statics[name]; + if (!statics.hasOwnProperty(name)) { + continue; + } + + var isReserved = name in RESERVED_SPEC_KEYS; + _invariant( + !isReserved, + 'ReactClass: You are attempting to define a reserved ' + + 'property, `%s`, that shouldn\'t be on the "statics" key. Define it ' + + 'as an instance property instead; it will still be accessible on the ' + + 'constructor.', + name, + ); + + var isAlreadyDefined = name in Constructor; + if (isAlreadyDefined) { + var specPolicy = ReactClassStaticInterface.hasOwnProperty(name) + ? ReactClassStaticInterface[name] + : null; + + _invariant( + specPolicy === 'DEFINE_MANY_MERGED', + 'ReactClass: You are attempting to define ' + + '`%s` on your component more than once. This conflict may be ' + + 'due to a mixin.', + name, + ); + + Constructor[name] = createMergedResultFunction(Constructor[name], property); + + return; + } + + Constructor[name] = property; + } + } + + /** + * Merge two objects, but throw if both contain the same key. + * + * @param {object} one The first object, which is mutated. + * @param {object} two The second object + * @return {object} one after it has been mutated to contain everything in two. + */ + function mergeIntoWithNoDuplicateKeys(one, two) { + _invariant( + one && two && typeof one === 'object' && typeof two === 'object', + 'mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.', + ); + + for (var key in two) { + if (two.hasOwnProperty(key)) { + _invariant( + one[key] === undefined, + 'mergeIntoWithNoDuplicateKeys(): ' + + 'Tried to merge two objects with the same key: `%s`. This conflict ' + + 'may be due to a mixin; in particular, this may be caused by two ' + + 'getInitialState() or getDefaultProps() methods returning objects ' + + 'with clashing keys.', + key, + ); + one[key] = two[key]; + } + } + return one; + } + + /** + * Creates a function that invokes two functions and merges their return values. + * + * @param {function} one Function to invoke first. + * @param {function} two Function to invoke second. + * @return {function} Function that invokes the two argument functions. + * @private + */ + function createMergedResultFunction(one, two) { + return function mergedResult() { + var a = one.apply(this, arguments); + var b = two.apply(this, arguments); + if (a == null) { + return b; + } else if (b == null) { + return a; + } + var c = {}; + mergeIntoWithNoDuplicateKeys(c, a); + mergeIntoWithNoDuplicateKeys(c, b); + return c; + }; + } + + /** + * Creates a function that invokes two functions and ignores their return vales. + * + * @param {function} one Function to invoke first. + * @param {function} two Function to invoke second. + * @return {function} Function that invokes the two argument functions. + * @private + */ + function createChainedFunction(one, two) { + return function chainedFunction() { + one.apply(this, arguments); + two.apply(this, arguments); + }; + } + + /** + * Binds a method to the component. + * + * @param {object} component Component whose method is going to be bound. + * @param {function} method Method to be bound. + * @return {function} The bound method. + */ + function bindAutoBindMethod(component, method) { + var boundMethod = method.bind(component); + if (true) { + boundMethod.__reactBoundContext = component; + boundMethod.__reactBoundMethod = method; + boundMethod.__reactBoundArguments = null; + var componentName = component.constructor.displayName; + var _bind = boundMethod.bind; + boundMethod.bind = function (newThis) { + for ( + var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; + _key < _len; + _key++ + ) { + args[_key - 1] = arguments[_key]; + } + + // User is trying to bind() an autobound method; we effectively will + // ignore the value of "this" that the user is trying to use, so + // let's warn. + if (newThis !== component && newThis !== null) { + if (true) { + warning( + false, + 'bind(): React component methods may only be bound to the ' + + 'component instance. See %s', + componentName, + ); + } + } else if (!args.length) { + if (true) { + warning( + false, + 'bind(): You are binding a component method to the component. ' + + 'React does this for you automatically in a high-performance ' + + 'way, so you can safely remove this call. See %s', + componentName, + ); + } + return boundMethod; + } + var reboundMethod = _bind.apply(boundMethod, arguments); + reboundMethod.__reactBoundContext = component; + reboundMethod.__reactBoundMethod = method; + reboundMethod.__reactBoundArguments = args; + return reboundMethod; + }; + } + return boundMethod; + } + + /** + * Binds all auto-bound methods in a component. + * + * @param {object} component Component whose method is going to be bound. + */ + function bindAutoBindMethods(component) { + var pairs = component.__reactAutoBindPairs; + for (var i = 0; i < pairs.length; i += 2) { + var autoBindKey = pairs[i]; + var method = pairs[i + 1]; + component[autoBindKey] = bindAutoBindMethod(component, method); + } + } + + var IsMountedPreMixin = { + componentDidMount: function () { + this.__isMounted = true; + }, + }; + + var IsMountedPostMixin = { + componentWillUnmount: function () { + this.__isMounted = false; + }, + }; + + /** + * Add more to the ReactClass base class. These are all legacy features and + * therefore not already part of the modern ReactComponent. + */ + var ReactClassMixin = { + /** + * TODO: This will be deprecated because state should always keep a consistent + * type signature and the only use case for this, is to avoid that. + */ + replaceState: function (newState, callback) { + this.updater.enqueueReplaceState(this, newState, callback); + }, + + /** + * Checks whether or not this composite component is mounted. + * @return {boolean} True if mounted, false otherwise. + * @protected + * @final + */ + isMounted: function () { + if (true) { + warning( + this.__didWarnIsMounted, + '%s: isMounted is deprecated. Instead, make sure to clean up ' + + 'subscriptions and pending requests in componentWillUnmount to ' + + 'prevent memory leaks.', + (this.constructor && this.constructor.displayName) || this.name || 'Component', + ); + this.__didWarnIsMounted = true; + } + return !!this.__isMounted; + }, + }; + + var ReactClassComponent = function () {}; + _assign(ReactClassComponent.prototype, ReactComponent.prototype, ReactClassMixin); + + /** + * Creates a composite component class given a class specification. + * See https://facebook.github.io/react/docs/top-level-api.html#react.createclass + * + * @param {object} spec Class specification (which must define `render`). + * @return {function} Component constructor function. + * @public + */ + function createClass(spec) { + // To keep our warnings more understandable, we'll use a little hack here to + // ensure that Constructor.name !== 'Constructor'. This makes sure we don't + // unnecessarily identify a class without displayName as 'Constructor'. + var Constructor = identity(function (props, context, updater) { + // This constructor gets overridden by mocks. The argument is used + // by mocks to assert on what gets mounted. + + if (true) { + warning( + this instanceof Constructor, + 'Something is calling a React component directly. Use a factory or ' + + 'JSX instead. See: https://fb.me/react-legacyfactory', + ); + } + + // Wire up auto-binding + if (this.__reactAutoBindPairs.length) { + bindAutoBindMethods(this); + } + + this.props = props; + this.context = context; + this.refs = emptyObject; + this.updater = updater || ReactNoopUpdateQueue; + + this.state = null; + + // ReactClasses doesn't have constructors. Instead, they use the + // getInitialState and componentWillMount methods for initialization. + + var initialState = this.getInitialState ? this.getInitialState() : null; + if (true) { + // We allow auto-mocks to proceed as if they're returning null. + if (initialState === undefined && this.getInitialState._isMockFunction) { + // This is probably bad practice. Consider warning here and + // deprecating this convenience. + initialState = null; + } + } + _invariant( + typeof initialState === 'object' && !Array.isArray(initialState), + '%s.getInitialState(): must return an object or null', + Constructor.displayName || 'ReactCompositeComponent', + ); + + this.state = initialState; + }); + Constructor.prototype = new ReactClassComponent(); + Constructor.prototype.constructor = Constructor; + Constructor.prototype.__reactAutoBindPairs = []; + + injectedMixins.forEach(mixSpecIntoComponent.bind(null, Constructor)); + + mixSpecIntoComponent(Constructor, IsMountedPreMixin); + mixSpecIntoComponent(Constructor, spec); + mixSpecIntoComponent(Constructor, IsMountedPostMixin); + + // Initialize the defaultProps property after all mixins have been merged. + if (Constructor.getDefaultProps) { + Constructor.defaultProps = Constructor.getDefaultProps(); + } + + if (true) { + // This is a tag to indicate that the use of these method names is ok, + // since it's used with createClass. If it's not, then it's likely a + // mistake so we'll warn you to use the static property, property + // initializer or constructor respectively. + if (Constructor.getDefaultProps) { + Constructor.getDefaultProps.isReactClassApproved = {}; + } + if (Constructor.prototype.getInitialState) { + Constructor.prototype.getInitialState.isReactClassApproved = {}; + } + } + + _invariant( + Constructor.prototype.render, + 'createClass(...): Class specification must implement a `render` method.', + ); + + if (true) { + warning( + !Constructor.prototype.componentShouldUpdate, + '%s has a method called ' + + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + + 'The name is phrased as a question because the function is ' + + 'expected to return a value.', + spec.displayName || 'A component', + ); + warning( + !Constructor.prototype.componentWillRecieveProps, + '%s has a method called ' + + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', + spec.displayName || 'A component', + ); + warning( + !Constructor.prototype.UNSAFE_componentWillRecieveProps, + '%s has a method called UNSAFE_componentWillRecieveProps(). ' + + 'Did you mean UNSAFE_componentWillReceiveProps()?', + spec.displayName || 'A component', + ); + } + + // Reduce time spent doing lookups by setting these on the prototype. + for (var methodName in ReactClassInterface) { + if (!Constructor.prototype[methodName]) { + Constructor.prototype[methodName] = null; + } + } + + return Constructor; + } + + return createClass; + } + + module.exports = factory; + + /***/ + }, + /* 546 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + */ + + var emptyObject = {}; + + if (true) { + Object.freeze(emptyObject); + } + + module.exports = emptyObject; + + /***/ + }, + /* 547 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + */ + + /** + * Use invariant() to assert state which your program assumes to be true. + * + * Provide sprintf-style format (only %s is supported) and arguments + * to provide information about what broke and what you were + * expecting. + * + * The invariant message will be stripped in production, but the invariant + * will remain to ensure logic does not differ in production. + */ + + var validateFormat = function validateFormat(format) {}; + + if (true) { + validateFormat = function validateFormat(format) { + if (format === undefined) { + throw new Error('invariant requires an error message argument'); + } + }; + } + + function invariant(condition, format, a, b, c, d, e, f) { + validateFormat(format); + + if (!condition) { + var error; + if (format === undefined) { + error = new Error( + 'Minified exception occurred; use the non-minified dev environment ' + + 'for the full error message and additional helpful warnings.', + ); + } else { + var args = [a, b, c, d, e, f]; + var argIndex = 0; + error = new Error( + format.replace(/%s/g, function () { + return args[argIndex++]; + }), + ); + error.name = 'Invariant Violation'; + } + + error.framesToPop = 1; // we don't care about invariant's own frame + throw error; + } + } + + module.exports = invariant; + + /***/ + }, + /* 548 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright (c) 2014-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + */ + + var emptyFunction = __webpack_require__(549); + + /** + * Similar to invariant but only logs a warning if the condition is not met. + * This can be used to log issues in development environments in critical + * paths. Removing the logging code for production environments will keep the + * same logic and follow the same code paths. + */ + + var warning = emptyFunction; + + if (true) { + var printWarning = function printWarning(format) { + for ( + var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; + _key < _len; + _key++ + ) { + args[_key - 1] = arguments[_key]; + } + + var argIndex = 0; + var message = + 'Warning: ' + + format.replace(/%s/g, function () { + return args[argIndex++]; + }); + if (typeof console !== 'undefined') { + console.error(message); + } + try { + // --- Welcome to debugging React --- + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + throw new Error(message); + } catch (x) {} + }; + + warning = function warning(condition, format) { + if (format === undefined) { + throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument'); + } + + if (format.indexOf('Failed Composite propType: ') === 0) { + return; // Ignore CompositeComponent proptype check. + } + + if (!condition) { + for ( + var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; + _key2 < _len2; + _key2++ + ) { + args[_key2 - 2] = arguments[_key2]; + } + + printWarning.apply(undefined, [format].concat(args)); + } + }; + } + + module.exports = warning; + + /***/ + }, + /* 549 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + /** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * + */ + + function makeEmptyFunction(arg) { + return function () { + return arg; + }; + } + + /** + * This function accepts and discards inputs; it has no side effects. This is + * primarily useful idiomatically for overridable function endpoints which + * always need to be callable, since JS lacks a null-call idiom ala Cocoa. + */ + var emptyFunction = function emptyFunction() {}; + + emptyFunction.thatReturns = makeEmptyFunction; + emptyFunction.thatReturnsFalse = makeEmptyFunction(false); + emptyFunction.thatReturnsTrue = makeEmptyFunction(true); + emptyFunction.thatReturnsNull = makeEmptyFunction(null); + emptyFunction.thatReturnsThis = function () { + return this; + }; + emptyFunction.thatReturnsArgument = function (arg) { + return arg; + }; + + module.exports = emptyFunction; + + /***/ + }, + /* 550 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + /* eslint-disable no-unused-vars */ + + // Example of logging and throw error handling + + var HelloWorldWithLogAndThrow = function HelloWorldWithLogAndThrow(props, context) { + /* eslint-disable no-console */ + console.log('console.log in HelloWorld'); + console.warn('console.warn in HelloWorld'); + console.error('console.error in HelloWorld'); + throw new Error('throw in HelloWorldWithLogAndThrow'); + }; + + var _default = HelloWorldWithLogAndThrow; + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + HelloWorldWithLogAndThrow, + 'HelloWorldWithLogAndThrow', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/HelloWorldWithLogAndThrow.jsx', + ); + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/HelloWorldWithLogAndThrow.jsx', + ); + })(); + + /***/ + }, + /* 551 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__components_HelloWorld__ = + __webpack_require__(162); + // Top level component for simple client side only rendering + + /* + * Export a function that takes the props and returns a ReactComponent. + * This is used for the client rendering hook after the page html is rendered. + * React will see that the state is the same and not do anything. + * Note, this is imported as "HelloWorldApp" by "clientRegistration.jsx" + * + * Note, this is a fictional example, as you'd only use a generator function if you wanted to run + * some extra code, such as setting up Redux and React-Router. + */ + + var _default = function _default(props) { + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_1__components_HelloWorld__['a' /* default */], + props, + ); + }; + + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/startup/HelloWorldApp.jsx', + ); + })(); + + /***/ + }, + /* 552 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + // Top level component for simple client side only rendering + + /* + * Just an example of what can go wrong while coding. No import. Whoops! + */ + + var _default = function _default(props) { + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(HelloWorld, props); + }; + + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/startup/BrokenApp.jsx', + ); + })(); + + /***/ + }, + /* 553 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_redux__ = __webpack_require__(110); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_redux__ = __webpack_require__(163); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_redux_thunk__ = __webpack_require__(250); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__reducers_reducersIndex__ = + __webpack_require__(251); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__store_composeInitialState__ = + __webpack_require__(582); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__components_HelloWorldContainer__ = + __webpack_require__(253); + // This is loaded by execJs and Rails to generate the HTML used for server rendering. + // Compare this file to ./ClientApp.jsx + // This module should export one default method that take props and returns the react component to + // render. + + // Uses the index + + /* + * Export a function that takes the props and returns a ReactComponent. + * This is used for the server rendering. + * In the client, React will see that the state is the same and not do anything. + */ + + var _default = function _default(props, railsContext) { + var combinedReducer = Object(__WEBPACK_IMPORTED_MODULE_1_redux__['c' /* combineReducers */])( + __WEBPACK_IMPORTED_MODULE_4__reducers_reducersIndex__['a' /* default */], + ); + var combinedProps = Object( + __WEBPACK_IMPORTED_MODULE_5__store_composeInitialState__['a' /* default */], + )(props, railsContext); + + // This is where we'll put in the middleware for the async function. Placeholder. + // store will have helloWorldData as a top level property + var store = Object(__WEBPACK_IMPORTED_MODULE_1_redux__['a' /* applyMiddleware */])( + __WEBPACK_IMPORTED_MODULE_3_redux_thunk__['a' /* default */], + )(__WEBPACK_IMPORTED_MODULE_1_redux__['d' /* createStore */])(combinedReducer, combinedProps); + + // Provider uses the this.props.children, so we're not typical React syntax. + // This allows redux to add additional props to the HelloWorldContainer. + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_2_react_redux__['a' /* Provider */], + { store: store }, + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_6__components_HelloWorldContainer__['a' /* default */], + null, + ), + ); + }; + + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/startup/ServerReduxApp.jsx', + ); + })(); + + /***/ + }, + /* 554 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Symbol_js__ = __webpack_require__(242); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getRawTag_js__ = __webpack_require__(557); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__objectToString_js__ = __webpack_require__(558); + + /** `Object#toString` result references. */ + var nullTag = '[object Null]', + undefinedTag = '[object Undefined]'; + + /** Built-in value references. */ + var symToStringTag = __WEBPACK_IMPORTED_MODULE_0__Symbol_js__['a' /* default */] + ? __WEBPACK_IMPORTED_MODULE_0__Symbol_js__['a' /* default */].toStringTag + : undefined; + + /** + * The base implementation of `getTag` without fallbacks for buggy environments. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ + function baseGetTag(value) { + if (value == null) { + return value === undefined ? undefinedTag : nullTag; + } + return symToStringTag && symToStringTag in Object(value) + ? Object(__WEBPACK_IMPORTED_MODULE_1__getRawTag_js__['a' /* default */])(value) + : Object(__WEBPACK_IMPORTED_MODULE_2__objectToString_js__['a' /* default */])(value); + } + + /* harmony default export */ __webpack_exports__['a'] = baseGetTag; + + /***/ + }, + /* 555 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__freeGlobal_js__ = __webpack_require__(556); + + /** Detect free variable `self`. */ + var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + + /** Used as a reference to the global object. */ + var root = + __WEBPACK_IMPORTED_MODULE_0__freeGlobal_js__['a' /* default */] || + freeSelf || + Function('return this')(); + + /* harmony default export */ __webpack_exports__['a'] = root; + + /***/ + }, + /* 556 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (global) { + /** Detect free variable `global` from Node.js. */ + var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + + /* harmony default export */ __webpack_exports__['a'] = freeGlobal; + + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(38)); + + /***/ + }, + /* 557 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Symbol_js__ = __webpack_require__(242); + + /** Used for built-in method references. */ + var objectProto = Object.prototype; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ + var nativeObjectToString = objectProto.toString; + + /** Built-in value references. */ + var symToStringTag = __WEBPACK_IMPORTED_MODULE_0__Symbol_js__['a' /* default */] + ? __WEBPACK_IMPORTED_MODULE_0__Symbol_js__['a' /* default */].toStringTag + : undefined; + + /** + * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the raw `toStringTag`. + */ + function getRawTag(value) { + var isOwn = hasOwnProperty.call(value, symToStringTag), + tag = value[symToStringTag]; + + try { + value[symToStringTag] = undefined; + var unmasked = true; + } catch (e) {} + + var result = nativeObjectToString.call(value); + if (unmasked) { + if (isOwn) { + value[symToStringTag] = tag; + } else { + delete value[symToStringTag]; + } + } + return result; + } + + /* harmony default export */ __webpack_exports__['a'] = getRawTag; + + /***/ + }, + /* 558 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /** Used for built-in method references. */ + var objectProto = Object.prototype; + + /** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ + var nativeObjectToString = objectProto.toString; + + /** + * Converts `value` to a string using `Object.prototype.toString`. + * + * @private + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + */ + function objectToString(value) { + return nativeObjectToString.call(value); + } + + /* harmony default export */ __webpack_exports__['a'] = objectToString; + + /***/ + }, + /* 559 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__overArg_js__ = __webpack_require__(560); + + /** Built-in value references. */ + var getPrototype = Object(__WEBPACK_IMPORTED_MODULE_0__overArg_js__['a' /* default */])( + Object.getPrototypeOf, + Object, + ); + + /* harmony default export */ __webpack_exports__['a'] = getPrototype; + + /***/ + }, + /* 560 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ + function overArg(func, transform) { + return function (arg) { + return func(transform(arg)); + }; + } + + /* harmony default export */ __webpack_exports__['a'] = overArg; + + /***/ + }, + /* 561 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ + function isObjectLike(value) { + return value != null && typeof value == 'object'; + } + + /* harmony default export */ __webpack_exports__['a'] = isObjectLike; + + /***/ + }, + /* 562 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (global, module) { + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__ponyfill_js__ = __webpack_require__(564); + /* global window */ + + var root; + + if (typeof self !== 'undefined') { + root = self; + } else if (typeof window !== 'undefined') { + root = window; + } else if (typeof global !== 'undefined') { + root = global; + } else if (true) { + root = module; + } else { + root = Function('return this')(); + } + + var result = Object(__WEBPACK_IMPORTED_MODULE_0__ponyfill_js__['a' /* default */])(root); + /* harmony default export */ __webpack_exports__['a'] = result; + + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(38), __webpack_require__(563)(module)); + + /***/ + }, + /* 563 */ + /***/ function (module, exports) { + module.exports = function (originalModule) { + if (!originalModule.webpackPolyfill) { + var module = Object.create(originalModule); + // module.parent = undefined by default + if (!module.children) module.children = []; + Object.defineProperty(module, 'loaded', { + enumerable: true, + get: function () { + return module.l; + }, + }); + Object.defineProperty(module, 'id', { + enumerable: true, + get: function () { + return module.i; + }, + }); + Object.defineProperty(module, 'exports', { + enumerable: true, + }); + module.webpackPolyfill = 1; + } + return module; + }; + + /***/ + }, + /* 564 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = symbolObservablePonyfill; + function symbolObservablePonyfill(root) { + var result; + var Symbol = root.Symbol; + + if (typeof Symbol === 'function') { + if (Symbol.observable) { + result = Symbol.observable; + } else { + result = Symbol('observable'); + Symbol.observable = result; + } + } else { + result = '@@observable'; + } + + return result; + } + + /***/ + }, + /* 565 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = combineReducers; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createStore__ = __webpack_require__(240); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_es_isPlainObject__ = + __webpack_require__(241); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_warning__ = __webpack_require__(243); + + function getUndefinedStateErrorMessage(key, action) { + var actionType = action && action.type; + var actionName = (actionType && '"' + actionType.toString() + '"') || 'an action'; + + return ( + 'Given action ' + + actionName + + ', reducer "' + + key + + '" returned undefined. ' + + 'To ignore an action, you must explicitly return the previous state. ' + + 'If you want this reducer to hold no value, you can return null instead of undefined.' + ); + } + + function getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) { + var reducerKeys = Object.keys(reducers); + var argumentName = + action && action.type === __WEBPACK_IMPORTED_MODULE_0__createStore__['a' /* ActionTypes */].INIT + ? 'preloadedState argument passed to createStore' + : 'previous state received by the reducer'; + + if (reducerKeys.length === 0) { + return ( + 'Store does not have a valid reducer. Make sure the argument passed ' + + 'to combineReducers is an object whose values are reducers.' + ); + } + + if (!Object(__WEBPACK_IMPORTED_MODULE_1_lodash_es_isPlainObject__['a' /* default */])(inputState)) { + return ( + 'The ' + + argumentName + + ' has unexpected type of "' + + {}.toString.call(inputState).match(/\s([a-z|A-Z]+)/)[1] + + '". Expected argument to be an object with the following ' + + ('keys: "' + reducerKeys.join('", "') + '"') + ); + } + + var unexpectedKeys = Object.keys(inputState).filter(function (key) { + return !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key]; + }); + + unexpectedKeys.forEach(function (key) { + unexpectedKeyCache[key] = true; + }); + + if (unexpectedKeys.length > 0) { + return ( + 'Unexpected ' + + (unexpectedKeys.length > 1 ? 'keys' : 'key') + + ' ' + + ('"' + unexpectedKeys.join('", "') + '" found in ' + argumentName + '. ') + + 'Expected to find one of the known reducer keys instead: ' + + ('"' + reducerKeys.join('", "') + '". Unexpected keys will be ignored.') + ); + } + } + + function assertReducerShape(reducers) { + Object.keys(reducers).forEach(function (key) { + var reducer = reducers[key]; + var initialState = reducer(undefined, { + type: __WEBPACK_IMPORTED_MODULE_0__createStore__['a' /* ActionTypes */].INIT, + }); + + if (typeof initialState === 'undefined') { + throw new Error( + 'Reducer "' + + key + + '" returned undefined during initialization. ' + + 'If the state passed to the reducer is undefined, you must ' + + 'explicitly return the initial state. The initial state may ' + + "not be undefined. If you don't want to set a value for this reducer, " + + 'you can use null instead of undefined.', + ); + } + + var type = + '@@redux/PROBE_UNKNOWN_ACTION_' + Math.random().toString(36).substring(7).split('').join('.'); + if (typeof reducer(undefined, { type: type }) === 'undefined') { + throw new Error( + 'Reducer "' + + key + + '" returned undefined when probed with a random type. ' + + ("Don't try to handle " + + __WEBPACK_IMPORTED_MODULE_0__createStore__['a' /* ActionTypes */].INIT + + ' or other actions in "redux/*" ') + + 'namespace. They are considered private. Instead, you must return the ' + + 'current state for any unknown actions, unless it is undefined, ' + + 'in which case you must return the initial state, regardless of the ' + + 'action type. The initial state may not be undefined, but can be null.', + ); + } + }); + } + + /** + * Turns an object whose values are different reducer functions, into a single + * reducer function. It will call every child reducer, and gather their results + * into a single state object, whose keys correspond to the keys of the passed + * reducer functions. + * + * @param {Object} reducers An object whose values correspond to different + * reducer functions that need to be combined into one. One handy way to obtain + * it is to use ES6 `import * as reducers` syntax. The reducers may never return + * undefined for any action. Instead, they should return their initial state + * if the state passed to them was undefined, and the current state for any + * unrecognized action. + * + * @returns {Function} A reducer function that invokes every reducer inside the + * passed object, and builds a state object with the same shape. + */ + function combineReducers(reducers) { + var reducerKeys = Object.keys(reducers); + var finalReducers = {}; + for (var i = 0; i < reducerKeys.length; i++) { + var key = reducerKeys[i]; + + if (true) { + if (typeof reducers[key] === 'undefined') { + Object(__WEBPACK_IMPORTED_MODULE_2__utils_warning__['a' /* default */])( + 'No reducer provided for key "' + key + '"', + ); + } + } + + if (typeof reducers[key] === 'function') { + finalReducers[key] = reducers[key]; + } + } + var finalReducerKeys = Object.keys(finalReducers); + + var unexpectedKeyCache = void 0; + if (true) { + unexpectedKeyCache = {}; + } + + var shapeAssertionError = void 0; + try { + assertReducerShape(finalReducers); + } catch (e) { + shapeAssertionError = e; + } + + return function combination() { + var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + var action = arguments[1]; + + if (shapeAssertionError) { + throw shapeAssertionError; + } + + if (true) { + var warningMessage = getUnexpectedStateShapeWarningMessage( + state, + finalReducers, + action, + unexpectedKeyCache, + ); + if (warningMessage) { + Object(__WEBPACK_IMPORTED_MODULE_2__utils_warning__['a' /* default */])(warningMessage); + } + } + + var hasChanged = false; + var nextState = {}; + for (var _i = 0; _i < finalReducerKeys.length; _i++) { + var _key = finalReducerKeys[_i]; + var reducer = finalReducers[_key]; + var previousStateForKey = state[_key]; + var nextStateForKey = reducer(previousStateForKey, action); + if (typeof nextStateForKey === 'undefined') { + var errorMessage = getUndefinedStateErrorMessage(_key, action); + throw new Error(errorMessage); + } + nextState[_key] = nextStateForKey; + hasChanged = hasChanged || nextStateForKey !== previousStateForKey; + } + return hasChanged ? nextState : state; + }; + } + + /***/ + }, + /* 566 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = bindActionCreators; + function bindActionCreator(actionCreator, dispatch) { + return function () { + return dispatch(actionCreator.apply(undefined, arguments)); + }; + } + + /** + * Turns an object whose values are action creators, into an object with the + * same keys, but with every function wrapped into a `dispatch` call so they + * may be invoked directly. This is just a convenience method, as you can call + * `store.dispatch(MyActionCreators.doSomething())` yourself just fine. + * + * For convenience, you can also pass a single function as the first argument, + * and get a function in return. + * + * @param {Function|Object} actionCreators An object whose values are action + * creator functions. One handy way to obtain it is to use ES6 `import * as` + * syntax. You may also pass a single function. + * + * @param {Function} dispatch The `dispatch` function available on your Redux + * store. + * + * @returns {Function|Object} The object mimicking the original object, but with + * every action creator wrapped into the `dispatch` call. If you passed a + * function as `actionCreators`, the return value will also be a single + * function. + */ + function bindActionCreators(actionCreators, dispatch) { + if (typeof actionCreators === 'function') { + return bindActionCreator(actionCreators, dispatch); + } + + if (typeof actionCreators !== 'object' || actionCreators === null) { + throw new Error( + 'bindActionCreators expected an object or a function, instead received ' + + (actionCreators === null ? 'null' : typeof actionCreators) + + '. ' + + 'Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?', + ); + } + + var keys = Object.keys(actionCreators); + var boundActionCreators = {}; + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + var actionCreator = actionCreators[key]; + if (typeof actionCreator === 'function') { + boundActionCreators[key] = bindActionCreator(actionCreator, dispatch); + } + } + return boundActionCreators; + } + + /***/ + }, + /* 567 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = applyMiddleware; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__compose__ = __webpack_require__(244); + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + /** + * Creates a store enhancer that applies middleware to the dispatch method + * of the Redux store. This is handy for a variety of tasks, such as expressing + * asynchronous actions in a concise manner, or logging every action payload. + * + * See `redux-thunk` package as an example of the Redux middleware. + * + * Because middleware is potentially asynchronous, this should be the first + * store enhancer in the composition chain. + * + * Note that each middleware will be given the `dispatch` and `getState` functions + * as named arguments. + * + * @param {...Function} middlewares The middleware chain to be applied. + * @returns {Function} A store enhancer applying the middleware. + */ + function applyMiddleware() { + for (var _len = arguments.length, middlewares = Array(_len), _key = 0; _key < _len; _key++) { + middlewares[_key] = arguments[_key]; + } + + return function (createStore) { + return function (reducer, preloadedState, enhancer) { + var store = createStore(reducer, preloadedState, enhancer); + var _dispatch = store.dispatch; + var chain = []; + + var middlewareAPI = { + getState: store.getState, + dispatch: function dispatch(action) { + return _dispatch(action); + }, + }; + chain = middlewares.map(function (middleware) { + return middleware(middlewareAPI); + }); + _dispatch = __WEBPACK_IMPORTED_MODULE_0__compose__['a' /* default */].apply( + undefined, + chain, + )(store.dispatch); + + return _extends({}, store, { + dispatch: _dispatch, + }); + }; + }; + } + + /***/ + }, + /* 568 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* unused harmony export createProvider */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_inheritsLoose__ = + __webpack_require__(245); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types__ = __webpack_require__(10); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_2_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__utils_PropTypes__ = __webpack_require__(246); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__utils_warning__ = __webpack_require__(164); + + var prefixUnsafeLifecycleMethods = + typeof __WEBPACK_IMPORTED_MODULE_1_react___default.a.forwardRef !== 'undefined'; + var didWarnAboutReceivingStore = false; + + function warnAboutReceivingStore() { + if (didWarnAboutReceivingStore) { + return; + } + + didWarnAboutReceivingStore = true; + Object(__WEBPACK_IMPORTED_MODULE_4__utils_warning__['a' /* default */])( + '<Provider> does not support changing `store` on the fly. ' + + 'It is most likely that you see this error because you updated to ' + + 'Redux 2.x and React Redux 2.x which no longer hot reload reducers ' + + 'automatically. See https://github.com/reduxjs/react-redux/releases/' + + 'tag/v2.0.0 for the migration instructions.', + ); + } + + function createProvider(storeKey) { + var _Provider$childContex; + + if (storeKey === void 0) { + storeKey = 'store'; + } + + var subscriptionKey = storeKey + 'Subscription'; + + var Provider = + /*#__PURE__*/ + (function (_Component) { + Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_inheritsLoose__['a' /* default */])( + Provider, + _Component, + ); + + var _proto = Provider.prototype; + + _proto.getChildContext = function getChildContext() { + var _ref; + + return (_ref = {}), (_ref[storeKey] = this[storeKey]), (_ref[subscriptionKey] = null), _ref; + }; + + function Provider(props, context) { + var _this; + + _this = _Component.call(this, props, context) || this; + _this[storeKey] = props.store; + return _this; + } + + _proto.render = function render() { + return __WEBPACK_IMPORTED_MODULE_1_react__['Children'].only(this.props.children); + }; + + return Provider; + })(__WEBPACK_IMPORTED_MODULE_1_react__['Component']); + + if (true) { + // Use UNSAFE_ event name where supported + var eventName = prefixUnsafeLifecycleMethods + ? 'UNSAFE_componentWillReceiveProps' + : 'componentWillReceiveProps'; + + Provider.prototype[eventName] = function (nextProps) { + if (this[storeKey] !== nextProps.store) { + warnAboutReceivingStore(); + } + }; + } + + Provider.propTypes = { + store: __WEBPACK_IMPORTED_MODULE_3__utils_PropTypes__['a' /* storeShape */].isRequired, + children: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.element.isRequired, + }; + Provider.childContextTypes = + ((_Provider$childContex = {}), + (_Provider$childContex[storeKey] = + __WEBPACK_IMPORTED_MODULE_3__utils_PropTypes__['a' /* storeShape */].isRequired), + (_Provider$childContex[subscriptionKey] = + __WEBPACK_IMPORTED_MODULE_3__utils_PropTypes__['b' /* subscriptionShape */]), + _Provider$childContex); + return Provider; + } + /* harmony default export */ __webpack_exports__['a'] = createProvider(); + + /***/ + }, + /* 569 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = _assertThisInitialized; + function _assertThisInitialized(self) { + if (self === void 0) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return self; + } + + /***/ + }, + /* 570 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var reactIs = __webpack_require__(109); + + /** + * Copyright 2015, Yahoo! Inc. + * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. + */ + var REACT_STATICS = { + childContextTypes: true, + contextType: true, + contextTypes: true, + defaultProps: true, + displayName: true, + getDefaultProps: true, + getDerivedStateFromError: true, + getDerivedStateFromProps: true, + mixins: true, + propTypes: true, + type: true, + }; + var KNOWN_STATICS = { + name: true, + length: true, + prototype: true, + caller: true, + callee: true, + arguments: true, + arity: true, + }; + var FORWARD_REF_STATICS = { + $$typeof: true, + render: true, + defaultProps: true, + displayName: true, + propTypes: true, + }; + var MEMO_STATICS = { + $$typeof: true, + compare: true, + defaultProps: true, + displayName: true, + propTypes: true, + type: true, + }; + var TYPE_STATICS = {}; + TYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS; + TYPE_STATICS[reactIs.Memo] = MEMO_STATICS; + + function getStatics(component) { + // React v16.11 and below + if (reactIs.isMemo(component)) { + return MEMO_STATICS; + } // React v16.12 and above + + return TYPE_STATICS[component['$$typeof']] || REACT_STATICS; + } + + var defineProperty = Object.defineProperty; + var getOwnPropertyNames = Object.getOwnPropertyNames; + var getOwnPropertySymbols = Object.getOwnPropertySymbols; + var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; + var getPrototypeOf = Object.getPrototypeOf; + var objectPrototype = Object.prototype; + function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) { + if (typeof sourceComponent !== 'string') { + // don't hoist over string (html) components + if (objectPrototype) { + var inheritedComponent = getPrototypeOf(sourceComponent); + + if (inheritedComponent && inheritedComponent !== objectPrototype) { + hoistNonReactStatics(targetComponent, inheritedComponent, blacklist); + } + } + + var keys = getOwnPropertyNames(sourceComponent); + + if (getOwnPropertySymbols) { + keys = keys.concat(getOwnPropertySymbols(sourceComponent)); + } + + var targetStatics = getStatics(targetComponent); + var sourceStatics = getStatics(sourceComponent); + + for (var i = 0; i < keys.length; ++i) { + var key = keys[i]; + + if ( + !KNOWN_STATICS[key] && + !(blacklist && blacklist[key]) && + !(sourceStatics && sourceStatics[key]) && + !(targetStatics && targetStatics[key]) + ) { + var descriptor = getOwnPropertyDescriptor(sourceComponent, key); + + try { + // Avoid failures from read-only properties + defineProperty(targetComponent, key, descriptor); + } catch (e) {} + } + } + } + + return targetComponent; + } + + module.exports = hoistNonReactStatics; + + /***/ + }, + /* 571 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'a', function () { + return Subscription; + }); + // encapsulates the subscription logic for connecting a component to the redux store, as + // well as nesting subscriptions of descendant components, so that we can ensure the + // ancestor components re-render before descendants + var CLEARED = null; + var nullListeners = { + notify: function notify() {}, + }; + + function createListenerCollection() { + // the current/next pattern is copied from redux's createStore code. + // TODO: refactor+expose that code to be reusable here? + var current = []; + var next = []; + return { + clear: function clear() { + next = CLEARED; + current = CLEARED; + }, + notify: function notify() { + var listeners = (current = next); + + for (var i = 0; i < listeners.length; i++) { + listeners[i](); + } + }, + get: function get() { + return next; + }, + subscribe: function subscribe(listener) { + var isSubscribed = true; + if (next === current) next = current.slice(); + next.push(listener); + return function unsubscribe() { + if (!isSubscribed || current === CLEARED) return; + isSubscribed = false; + if (next === current) next = current.slice(); + next.splice(next.indexOf(listener), 1); + }; + }, + }; + } + + var Subscription = + /*#__PURE__*/ + (function () { + function Subscription(store, parentSub, onStateChange) { + this.store = store; + this.parentSub = parentSub; + this.onStateChange = onStateChange; + this.unsubscribe = null; + this.listeners = nullListeners; + } + + var _proto = Subscription.prototype; + + _proto.addNestedSub = function addNestedSub(listener) { + this.trySubscribe(); + return this.listeners.subscribe(listener); + }; + + _proto.notifyNestedSubs = function notifyNestedSubs() { + this.listeners.notify(); + }; + + _proto.isSubscribed = function isSubscribed() { + return Boolean(this.unsubscribe); + }; + + _proto.trySubscribe = function trySubscribe() { + if (!this.unsubscribe) { + this.unsubscribe = this.parentSub + ? this.parentSub.addNestedSub(this.onStateChange) + : this.store.subscribe(this.onStateChange); + this.listeners = createListenerCollection(); + } + }; + + _proto.tryUnsubscribe = function tryUnsubscribe() { + if (this.unsubscribe) { + this.unsubscribe(); + this.unsubscribe = null; + this.listeners.clear(); + this.listeners = nullListeners; + } + }; + + return Subscription; + })(); + + /***/ + }, + /* 572 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* unused harmony export createConnect */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_extends__ = + __webpack_require__(165); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_esm_objectWithoutPropertiesLoose__ = + __webpack_require__(166); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__components_connectAdvanced__ = + __webpack_require__(247); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__utils_shallowEqual__ = __webpack_require__(573); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__mapDispatchToProps__ = __webpack_require__(574); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__mapStateToProps__ = __webpack_require__(576); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__mergeProps__ = __webpack_require__(577); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__selectorFactory__ = __webpack_require__(578); + + /* + connect is a facade over connectAdvanced. It turns its args into a compatible + selectorFactory, which has the signature: + + (dispatch, options) => (nextState, nextOwnProps) => nextFinalProps + + connect passes its args to connectAdvanced as options, which will in turn pass them to + selectorFactory each time a Connect component instance is instantiated or hot reloaded. + + selectorFactory returns a final props selector from its mapStateToProps, + mapStateToPropsFactories, mapDispatchToProps, mapDispatchToPropsFactories, mergeProps, + mergePropsFactories, and pure args. + + The resulting final props selector is called by the Connect component instance whenever + it receives new props or store state. + */ + + function match(arg, factories, name) { + for (var i = factories.length - 1; i >= 0; i--) { + var result = factories[i](arg); + if (result) return result; + } + + return function (dispatch, options) { + throw new Error( + 'Invalid value of type ' + + typeof arg + + ' for ' + + name + + ' argument when connecting component ' + + options.wrappedComponentName + + '.', + ); + }; + } + + function strictEqual(a, b) { + return a === b; + } // createConnect with default args builds the 'official' connect behavior. Calling it with + // different options opens up some testing and extensibility scenarios + + function createConnect(_temp) { + var _ref = _temp === void 0 ? {} : _temp, + _ref$connectHOC = _ref.connectHOC, + connectHOC = + _ref$connectHOC === void 0 + ? __WEBPACK_IMPORTED_MODULE_2__components_connectAdvanced__['a' /* default */] + : _ref$connectHOC, + _ref$mapStateToPropsF = _ref.mapStateToPropsFactories, + mapStateToPropsFactories = + _ref$mapStateToPropsF === void 0 + ? __WEBPACK_IMPORTED_MODULE_5__mapStateToProps__['a' /* default */] + : _ref$mapStateToPropsF, + _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories, + mapDispatchToPropsFactories = + _ref$mapDispatchToPro === void 0 + ? __WEBPACK_IMPORTED_MODULE_4__mapDispatchToProps__['a' /* default */] + : _ref$mapDispatchToPro, + _ref$mergePropsFactor = _ref.mergePropsFactories, + mergePropsFactories = + _ref$mergePropsFactor === void 0 + ? __WEBPACK_IMPORTED_MODULE_6__mergeProps__['a' /* default */] + : _ref$mergePropsFactor, + _ref$selectorFactory = _ref.selectorFactory, + selectorFactory = + _ref$selectorFactory === void 0 + ? __WEBPACK_IMPORTED_MODULE_7__selectorFactory__['a' /* default */] + : _ref$selectorFactory; + + return function connect(mapStateToProps, mapDispatchToProps, mergeProps, _ref2) { + if (_ref2 === void 0) { + _ref2 = {}; + } + + var _ref3 = _ref2, + _ref3$pure = _ref3.pure, + pure = _ref3$pure === void 0 ? true : _ref3$pure, + _ref3$areStatesEqual = _ref3.areStatesEqual, + areStatesEqual = _ref3$areStatesEqual === void 0 ? strictEqual : _ref3$areStatesEqual, + _ref3$areOwnPropsEqua = _ref3.areOwnPropsEqual, + areOwnPropsEqual = + _ref3$areOwnPropsEqua === void 0 + ? __WEBPACK_IMPORTED_MODULE_3__utils_shallowEqual__['a' /* default */] + : _ref3$areOwnPropsEqua, + _ref3$areStatePropsEq = _ref3.areStatePropsEqual, + areStatePropsEqual = + _ref3$areStatePropsEq === void 0 + ? __WEBPACK_IMPORTED_MODULE_3__utils_shallowEqual__['a' /* default */] + : _ref3$areStatePropsEq, + _ref3$areMergedPropsE = _ref3.areMergedPropsEqual, + areMergedPropsEqual = + _ref3$areMergedPropsE === void 0 + ? __WEBPACK_IMPORTED_MODULE_3__utils_shallowEqual__['a' /* default */] + : _ref3$areMergedPropsE, + extraOptions = Object( + __WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_esm_objectWithoutPropertiesLoose__[ + 'a' /* default */ + ], + )(_ref3, [ + 'pure', + 'areStatesEqual', + 'areOwnPropsEqual', + 'areStatePropsEqual', + 'areMergedPropsEqual', + ]); + + var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps'); + var initMapDispatchToProps = match( + mapDispatchToProps, + mapDispatchToPropsFactories, + 'mapDispatchToProps', + ); + var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps'); + return connectHOC( + selectorFactory, + Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_extends__['a' /* default */])( + { + // used in error messages + methodName: 'connect', + // used to compute Connect's displayName from the wrapped component's displayName. + getDisplayName: function getDisplayName(name) { + return 'Connect(' + name + ')'; + }, + // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes + shouldHandleStateChanges: Boolean(mapStateToProps), + // passed through to selectorFactory + initMapStateToProps: initMapStateToProps, + initMapDispatchToProps: initMapDispatchToProps, + initMergeProps: initMergeProps, + pure: pure, + areStatesEqual: areStatesEqual, + areOwnPropsEqual: areOwnPropsEqual, + areStatePropsEqual: areStatePropsEqual, + areMergedPropsEqual: areMergedPropsEqual, + }, + extraOptions, + ), + ); + }; + } + /* harmony default export */ __webpack_exports__['a'] = createConnect(); + + /***/ + }, + /* 573 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = shallowEqual; + var hasOwn = Object.prototype.hasOwnProperty; + + function is(x, y) { + if (x === y) { + return x !== 0 || y !== 0 || 1 / x === 1 / y; + } else { + return x !== x && y !== y; + } + } + + function shallowEqual(objA, objB) { + if (is(objA, objB)) return true; + + if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) { + return false; + } + + var keysA = Object.keys(objA); + var keysB = Object.keys(objB); + if (keysA.length !== keysB.length) return false; + + for (var i = 0; i < keysA.length; i++) { + if (!hasOwn.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) { + return false; + } + } + + return true; + } + + /***/ + }, + /* 574 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* unused harmony export whenMapDispatchToPropsIsFunction */ + /* unused harmony export whenMapDispatchToPropsIsMissing */ + /* unused harmony export whenMapDispatchToPropsIsObject */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_redux__ = __webpack_require__(110); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__wrapMapToProps__ = __webpack_require__(248); + + function whenMapDispatchToPropsIsFunction(mapDispatchToProps) { + return typeof mapDispatchToProps === 'function' + ? Object(__WEBPACK_IMPORTED_MODULE_1__wrapMapToProps__['b' /* wrapMapToPropsFunc */])( + mapDispatchToProps, + 'mapDispatchToProps', + ) + : undefined; + } + function whenMapDispatchToPropsIsMissing(mapDispatchToProps) { + return !mapDispatchToProps + ? Object(__WEBPACK_IMPORTED_MODULE_1__wrapMapToProps__['a' /* wrapMapToPropsConstant */])( + function (dispatch) { + return { + dispatch: dispatch, + }; + }, + ) + : undefined; + } + function whenMapDispatchToPropsIsObject(mapDispatchToProps) { + return mapDispatchToProps && typeof mapDispatchToProps === 'object' + ? Object(__WEBPACK_IMPORTED_MODULE_1__wrapMapToProps__['a' /* wrapMapToPropsConstant */])( + function (dispatch) { + return Object(__WEBPACK_IMPORTED_MODULE_0_redux__['b' /* bindActionCreators */])( + mapDispatchToProps, + dispatch, + ); + }, + ) + : undefined; + } + /* harmony default export */ __webpack_exports__['a'] = [ + whenMapDispatchToPropsIsFunction, + whenMapDispatchToPropsIsMissing, + whenMapDispatchToPropsIsObject, + ]; + + /***/ + }, + /* 575 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = isPlainObject; + /** + * @param {any} obj The object to inspect. + * @returns {boolean} True if the argument appears to be a plain object. + */ + function isPlainObject(obj) { + if (typeof obj !== 'object' || obj === null) return false; + var proto = Object.getPrototypeOf(obj); + if (proto === null) return true; + var baseProto = proto; + + while (Object.getPrototypeOf(baseProto) !== null) { + baseProto = Object.getPrototypeOf(baseProto); + } + + return proto === baseProto; + } + + /***/ + }, + /* 576 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* unused harmony export whenMapStateToPropsIsFunction */ + /* unused harmony export whenMapStateToPropsIsMissing */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__wrapMapToProps__ = __webpack_require__(248); + + function whenMapStateToPropsIsFunction(mapStateToProps) { + return typeof mapStateToProps === 'function' + ? Object(__WEBPACK_IMPORTED_MODULE_0__wrapMapToProps__['b' /* wrapMapToPropsFunc */])( + mapStateToProps, + 'mapStateToProps', + ) + : undefined; + } + function whenMapStateToPropsIsMissing(mapStateToProps) { + return !mapStateToProps + ? Object(__WEBPACK_IMPORTED_MODULE_0__wrapMapToProps__['a' /* wrapMapToPropsConstant */])( + function () { + return {}; + }, + ) + : undefined; + } + /* harmony default export */ __webpack_exports__['a'] = [ + whenMapStateToPropsIsFunction, + whenMapStateToPropsIsMissing, + ]; + + /***/ + }, + /* 577 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* unused harmony export defaultMergeProps */ + /* unused harmony export wrapMergePropsFunc */ + /* unused harmony export whenMergePropsIsFunction */ + /* unused harmony export whenMergePropsIsOmitted */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_extends__ = + __webpack_require__(165); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__utils_verifyPlainObject__ = + __webpack_require__(249); + + function defaultMergeProps(stateProps, dispatchProps, ownProps) { + return Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_extends__['a' /* default */])( + {}, + ownProps, + stateProps, + dispatchProps, + ); + } + function wrapMergePropsFunc(mergeProps) { + return function initMergePropsProxy(dispatch, _ref) { + var displayName = _ref.displayName, + pure = _ref.pure, + areMergedPropsEqual = _ref.areMergedPropsEqual; + var hasRunOnce = false; + var mergedProps; + return function mergePropsProxy(stateProps, dispatchProps, ownProps) { + var nextMergedProps = mergeProps(stateProps, dispatchProps, ownProps); + + if (hasRunOnce) { + if (!pure || !areMergedPropsEqual(nextMergedProps, mergedProps)) mergedProps = nextMergedProps; + } else { + hasRunOnce = true; + mergedProps = nextMergedProps; + if (true) + Object(__WEBPACK_IMPORTED_MODULE_1__utils_verifyPlainObject__['a' /* default */])( + mergedProps, + displayName, + 'mergeProps', + ); + } + + return mergedProps; + }; + }; + } + function whenMergePropsIsFunction(mergeProps) { + return typeof mergeProps === 'function' ? wrapMergePropsFunc(mergeProps) : undefined; + } + function whenMergePropsIsOmitted(mergeProps) { + return !mergeProps + ? function () { + return defaultMergeProps; + } + : undefined; + } + /* harmony default export */ __webpack_exports__['a'] = [ + whenMergePropsIsFunction, + whenMergePropsIsOmitted, + ]; + + /***/ + }, + /* 578 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* unused harmony export impureFinalPropsSelectorFactory */ + /* unused harmony export pureFinalPropsSelectorFactory */ + /* harmony export (immutable) */ __webpack_exports__['a'] = finalPropsSelectorFactory; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_objectWithoutPropertiesLoose__ = + __webpack_require__(166); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__verifySubselectors__ = __webpack_require__(579); + + function impureFinalPropsSelectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch) { + return function impureFinalPropsSelector(state, ownProps) { + return mergeProps( + mapStateToProps(state, ownProps), + mapDispatchToProps(dispatch, ownProps), + ownProps, + ); + }; + } + function pureFinalPropsSelectorFactory( + mapStateToProps, + mapDispatchToProps, + mergeProps, + dispatch, + _ref, + ) { + var areStatesEqual = _ref.areStatesEqual, + areOwnPropsEqual = _ref.areOwnPropsEqual, + areStatePropsEqual = _ref.areStatePropsEqual; + var hasRunAtLeastOnce = false; + var state; + var ownProps; + var stateProps; + var dispatchProps; + var mergedProps; + + function handleFirstCall(firstState, firstOwnProps) { + state = firstState; + ownProps = firstOwnProps; + stateProps = mapStateToProps(state, ownProps); + dispatchProps = mapDispatchToProps(dispatch, ownProps); + mergedProps = mergeProps(stateProps, dispatchProps, ownProps); + hasRunAtLeastOnce = true; + return mergedProps; + } + + function handleNewPropsAndNewState() { + stateProps = mapStateToProps(state, ownProps); + if (mapDispatchToProps.dependsOnOwnProps) dispatchProps = mapDispatchToProps(dispatch, ownProps); + mergedProps = mergeProps(stateProps, dispatchProps, ownProps); + return mergedProps; + } + + function handleNewProps() { + if (mapStateToProps.dependsOnOwnProps) stateProps = mapStateToProps(state, ownProps); + if (mapDispatchToProps.dependsOnOwnProps) dispatchProps = mapDispatchToProps(dispatch, ownProps); + mergedProps = mergeProps(stateProps, dispatchProps, ownProps); + return mergedProps; + } + + function handleNewState() { + var nextStateProps = mapStateToProps(state, ownProps); + var statePropsChanged = !areStatePropsEqual(nextStateProps, stateProps); + stateProps = nextStateProps; + if (statePropsChanged) mergedProps = mergeProps(stateProps, dispatchProps, ownProps); + return mergedProps; + } + + function handleSubsequentCalls(nextState, nextOwnProps) { + var propsChanged = !areOwnPropsEqual(nextOwnProps, ownProps); + var stateChanged = !areStatesEqual(nextState, state); + state = nextState; + ownProps = nextOwnProps; + if (propsChanged && stateChanged) return handleNewPropsAndNewState(); + if (propsChanged) return handleNewProps(); + if (stateChanged) return handleNewState(); + return mergedProps; + } + + return function pureFinalPropsSelector(nextState, nextOwnProps) { + return hasRunAtLeastOnce + ? handleSubsequentCalls(nextState, nextOwnProps) + : handleFirstCall(nextState, nextOwnProps); + }; + } // TODO: Add more comments + // If pure is true, the selector returned by selectorFactory will memoize its results, + // allowing connectAdvanced's shouldComponentUpdate to return false if final + // props have not changed. If false, the selector will always return a new + // object and shouldComponentUpdate will always return true. + + function finalPropsSelectorFactory(dispatch, _ref2) { + var initMapStateToProps = _ref2.initMapStateToProps, + initMapDispatchToProps = _ref2.initMapDispatchToProps, + initMergeProps = _ref2.initMergeProps, + options = Object( + __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_objectWithoutPropertiesLoose__[ + 'a' /* default */ + ], + )(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']); + + var mapStateToProps = initMapStateToProps(dispatch, options); + var mapDispatchToProps = initMapDispatchToProps(dispatch, options); + var mergeProps = initMergeProps(dispatch, options); + + if (true) { + Object(__WEBPACK_IMPORTED_MODULE_1__verifySubselectors__['a' /* default */])( + mapStateToProps, + mapDispatchToProps, + mergeProps, + options.displayName, + ); + } + + var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory; + return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options); + } + + /***/ + }, + /* 579 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = verifySubselectors; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils_warning__ = __webpack_require__(164); + + function verify(selector, methodName, displayName) { + if (!selector) { + throw new Error('Unexpected value for ' + methodName + ' in ' + displayName + '.'); + } else if (methodName === 'mapStateToProps' || methodName === 'mapDispatchToProps') { + if (!selector.hasOwnProperty('dependsOnOwnProps')) { + Object(__WEBPACK_IMPORTED_MODULE_0__utils_warning__['a' /* default */])( + 'The selector for ' + + methodName + + ' of ' + + displayName + + ' did not specify a value for dependsOnOwnProps.', + ); + } + } + } + + function verifySubselectors(mapStateToProps, mapDispatchToProps, mergeProps, displayName) { + verify(mapStateToProps, 'mapStateToProps', displayName); + verify(mapDispatchToProps, 'mapDispatchToProps', displayName); + verify(mergeProps, 'mergeProps', displayName); + } + + /***/ + }, + /* 580 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = helloWorldReducer; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__constants_HelloWorldConstants__ = + __webpack_require__(252); + + var initialState = { + lastActionType: null, + name: 'Alex', + }; + + // Why name function the same as the reducer? + // https://github.com/gaearon/redux/issues/428#issuecomment-129223274 + // Naming the function will help with debugging! + function helloWorldReducer() { + var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState; + var action = arguments[1]; + var type = action.type, + name = action.name; + + switch (type) { + case __WEBPACK_IMPORTED_MODULE_0__constants_HelloWorldConstants__[ + 'a' /* HELLO_WORLD_NAME_UPDATE */ + ]: + return { + lastActionType: type, + name: name, + }; + default: + return state; + } + } + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + initialState, + 'initialState', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/reducers/HelloWorldReducer.jsx', + ); + + __REACT_HOT_LOADER__.register( + helloWorldReducer, + 'helloWorldReducer', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/reducers/HelloWorldReducer.jsx', + ); + })(); + + /***/ + }, + /* 581 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = railsContextReducer; + // This will always get set + var initialState = {}; + + // Why name function the same as the reducer? + // https://github.com/gaearon/redux/issues/428#issuecomment-129223274 + // Naming the function will help with debugging! + /* eslint-disable no-unused-vars */ + function railsContextReducer() { + var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState; + var action = arguments[1]; + + return state; + } + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + initialState, + 'initialState', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/reducers/RailsContextReducer.jsx', + ); + + __REACT_HOT_LOADER__.register( + railsContextReducer, + 'railsContextReducer', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/reducers/RailsContextReducer.jsx', + ); + })(); + + /***/ + }, + /* 582 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + var _default = function _default(props, railsContext) { + return Object.assign({}, props, { railsContext: railsContext }); + }; + + // Real world is that you'll want to do lots of manipulations of the data you get back from Rails + // to coerce it into exactly what you want your initial redux state. + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/store/composeInitialState.js', + ); + })(); + + /***/ + }, + /* 583 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(10); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__RailsContext__ = __webpack_require__(238); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + // Super simple example of the simplest possible React component + + var HelloWorldRedux = (function (_React$Component) { + _inherits(HelloWorldRedux, _React$Component); + + // Not necessary if we only call super, but we'll need to initialize state, etc. + function HelloWorldRedux(props) { + _classCallCheck(this, HelloWorldRedux); + + var _this = _possibleConstructorReturn( + this, + (HelloWorldRedux.__proto__ || Object.getPrototypeOf(HelloWorldRedux)).call(this, props), + ); + + _this.setNameDomRef = _this.setNameDomRef.bind(_this); + _this.handleChange = _this.handleChange.bind(_this); + return _this; + } + + _createClass(HelloWorldRedux, [ + { + key: 'setNameDomRef', + value: function setNameDomRef(nameDomNode) { + this.nameDomRef = nameDomNode; + }, + }, + { + key: 'handleChange', + value: function handleChange() { + var name = this.nameDomRef.value; + this.props.actions.updateName(name); + }, + }, + { + key: 'render', + value: function render() { + var _props = this.props, + data = _props.data, + railsContext = _props.railsContext; + var name = data.name; + + // If this creates an alert, we have a problem! + // see file packages/node-renderer/src/scriptSanitizedVal.js for the fix to this prior issue. + + /* eslint-disable no-console */ + + console.log('This is a script:"</div>"</script> <script>alert(\'WTF1\')</script>'); + console.log('Script2:"</div>"</script xx> <script>alert(\'WTF2\')</script xx>'); + console.log('Script3:"</div>"</ SCRIPT xx> <script>alert(\'WTF3\')</script xx>'); + console.log('Script4"</div>"</script <script>alert(\'WTF4\')</script>'); + console.log('Script5:"</div>"</ script> <script>alert(\'WTF5\')</script>'); + + return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'div', + null, + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'h3', + null, + 'Redux Hello, ', + name, + '!', + ), + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'p', + null, + 'With Redux, say hello to:', + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('input', { + type: 'text', + ref: this.setNameDomRef, + value: name || '', + onChange: this.handleChange, + }), + ), + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_2__RailsContext__['a' /* default */], + { railsContext: railsContext }, + ), + ); + }, + }, + ]); + + return HelloWorldRedux; + })(__WEBPACK_IMPORTED_MODULE_1_react___default.a.Component); + + HelloWorldRedux.propTypes = { + actions: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object.isRequired, + data: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object.isRequired, + railsContext: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object.isRequired, + }; + var _default = HelloWorldRedux; + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + HelloWorldRedux, + 'HelloWorldRedux', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/HelloWorldRedux.jsx', + ); + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/HelloWorldRedux.jsx', + ); + })(); + + /***/ + }, + /* 584 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + Object.defineProperty(__webpack_exports__, '__esModule', { value: true }); + /* harmony export (immutable) */ __webpack_exports__['updateName'] = updateName; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__constants_HelloWorldConstants__ = + __webpack_require__(252); + + /* eslint-disable import/prefer-default-export */ + function updateName(name) { + return { + type: __WEBPACK_IMPORTED_MODULE_0__constants_HelloWorldConstants__[ + 'a' /* HELLO_WORLD_NAME_UPDATE */ + ], + name: name, + }; + } + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + updateName, + 'updateName', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/actions/HelloWorldActions.jsx', + ); + })(); + + /***/ + }, + /* 585 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_on_rails__ = __webpack_require__(211); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_on_rails___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_react_on_rails__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_redux__ = __webpack_require__(163); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__components_HelloWorldContainer__ = + __webpack_require__(253); + // Top level component for serer side. + // Compare this to the ./ClientReduxSharedStoreApp.jsx file which is used for client side rendering. + + /* + * Export a function that returns a ReactComponent, depending on a store named SharedReduxStore. + * This is used for the server rendering. + * React will see that the state is the same and not do anything. + */ + + var _default = function _default() { + // This is where we get the existing store. + var store = __WEBPACK_IMPORTED_MODULE_1_react_on_rails___default.a.getStore('SharedReduxStore'); + + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_2_react_redux__['a' /* Provider */], + { store: store }, + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_3__components_HelloWorldContainer__['a' /* default */], + null, + ), + ); + }; + + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/startup/ServerReduxSharedStoreApp.jsx', + ); + })(); + + /***/ + }, + /* 586 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_router__ = __webpack_require__(85); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__routes_routes__ = __webpack_require__(612); + + var _default = function _default(_props, railsContext) { + var error = void 0; + var redirectLocation = void 0; + var routeProps = void 0; + + var location = railsContext.location; + + // See https://github.com/reactjs/react-router/blob/master/docs/guides/ServerRendering.md + + Object(__WEBPACK_IMPORTED_MODULE_1_react_router__['d' /* match */])( + { routes: __WEBPACK_IMPORTED_MODULE_2__routes_routes__['a' /* default */], location: location }, + function (_error, _redirectLocation, _routeProps) { + error = _error; + redirectLocation = _redirectLocation; + routeProps = _routeProps; + }, + ); + + // This tell react_on_rails to skip server rendering any HTML. Note, client rendering + // will handle the redirect. What's key is that we don't try to render. + // Critical to return the Object properties to match this { error, redirectLocation } + if (error || redirectLocation) { + return { error: error, redirectLocation: redirectLocation }; + } + + // Important that you don't do this if you are redirecting or have an error. + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_1_react_router__['c' /* RouterContext */], + routeProps, + ); + }; + + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/startup/ServerRouterApp.jsx', + ); + })(); + + /***/ + }, + /* 587 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant__ = __webpack_require__(14); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_invariant__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_create_react_class__ = __webpack_require__(37); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_create_react_class___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_create_react_class__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types__ = __webpack_require__(10); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_3_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__createTransitionManager__ = + __webpack_require__(254); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__ = __webpack_require__(86); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__RouterContext__ = __webpack_require__(168); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__RouteUtils__ = __webpack_require__(48); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__RouterUtils__ = __webpack_require__(256); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__routerWarning__ = __webpack_require__(71); + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + function _objectWithoutProperties(obj, keys) { + var target = {}; + for (var i in obj) { + if (keys.indexOf(i) >= 0) continue; + if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; + target[i] = obj[i]; + } + return target; + } + + var propTypes = { + history: __WEBPACK_IMPORTED_MODULE_3_prop_types__['object'], + children: __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__['d' /* routes */], + routes: __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__['d' /* routes */], // alias for children + render: __WEBPACK_IMPORTED_MODULE_3_prop_types__['func'], + createElement: __WEBPACK_IMPORTED_MODULE_3_prop_types__['func'], + onError: __WEBPACK_IMPORTED_MODULE_3_prop_types__['func'], + onUpdate: __WEBPACK_IMPORTED_MODULE_3_prop_types__['func'], + + // PRIVATE: For client-side rehydration of server match. + matchContext: __WEBPACK_IMPORTED_MODULE_3_prop_types__['object'], + }; + + /** + * A <Router> is a high-level API for automatically setting up + * a router that renders a <RouterContext> with all the props + * it needs each time the URL changes. + */ + var Router = __WEBPACK_IMPORTED_MODULE_2_create_react_class___default()({ + displayName: 'Router', + + propTypes: propTypes, + + getDefaultProps: function getDefaultProps() { + return { + render: function render(props) { + return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_6__RouterContext__['a' /* default */], + props, + ); + }, + }; + }, + getInitialState: function getInitialState() { + return { + location: null, + routes: null, + params: null, + components: null, + }; + }, + handleError: function handleError(error) { + if (this.props.onError) { + this.props.onError.call(this, error); + } else { + // Throw errors by default so we don't silently swallow them! + throw error; // This error probably occurred in getChildRoutes or getComponents. + } + }, + createRouterObject: function createRouterObject(state) { + var matchContext = this.props.matchContext; + + if (matchContext) { + return matchContext.router; + } + + var history = this.props.history; + + return Object(__WEBPACK_IMPORTED_MODULE_8__RouterUtils__['b' /* createRouterObject */])( + history, + this.transitionManager, + state, + ); + }, + createTransitionManager: function createTransitionManager() { + var matchContext = this.props.matchContext; + + if (matchContext) { + return matchContext.transitionManager; + } + + var history = this.props.history; + var _props = this.props, + routes = _props.routes, + children = _props.children; + + !history.getCurrentLocation + ? true + ? __WEBPACK_IMPORTED_MODULE_0_invariant___default()( + false, + 'You have provided a history object created with history v4.x or v2.x ' + + 'and earlier. This version of React Router is only compatible with v3 ' + + 'history objects. Please change to history v3.x.', + ) + : invariant(false) + : void 0; + + return Object(__WEBPACK_IMPORTED_MODULE_4__createTransitionManager__['a' /* default */])( + history, + Object(__WEBPACK_IMPORTED_MODULE_7__RouteUtils__['b' /* createRoutes */])(routes || children), + ); + }, + componentWillMount: function componentWillMount() { + var _this = this; + + this.transitionManager = this.createTransitionManager(); + this.router = this.createRouterObject(this.state); + + this._unlisten = this.transitionManager.listen(function (error, state) { + if (error) { + _this.handleError(error); + } else { + // Keep the identity of this.router because of a caveat in ContextUtils: + // they only work if the object identity is preserved. + Object(__WEBPACK_IMPORTED_MODULE_8__RouterUtils__['a' /* assignRouterState */])( + _this.router, + state, + ); + _this.setState(state, _this.props.onUpdate); + } + }); + }, + + /* istanbul ignore next: sanity check */ + componentWillReceiveProps: function componentWillReceiveProps(nextProps) { + true + ? Object(__WEBPACK_IMPORTED_MODULE_9__routerWarning__['a' /* default */])( + nextProps.history === this.props.history, + 'You cannot change <Router history>; it will be ignored', + ) + : void 0; + + true + ? Object(__WEBPACK_IMPORTED_MODULE_9__routerWarning__['a' /* default */])( + (nextProps.routes || nextProps.children) === (this.props.routes || this.props.children), + 'You cannot change <Router routes>; it will be ignored', + ) + : void 0; + }, + componentWillUnmount: function componentWillUnmount() { + if (this._unlisten) this._unlisten(); + }, + render: function render() { + var _state = this.state, + location = _state.location, + routes = _state.routes, + params = _state.params, + components = _state.components; + + var _props2 = this.props, + createElement = _props2.createElement, + render = _props2.render, + props = _objectWithoutProperties(_props2, ['createElement', 'render']); + + if (location == null) return null; // Async match + + // Only forward non-Router-specific props to routing context, as those are + // the only ones that might be custom routing context props. + Object.keys(propTypes).forEach(function (propType) { + return delete props[propType]; + }); + + return render( + _extends({}, props, { + router: this.router, + location: location, + routes: routes, + params: params, + components: components, + createElement: createElement, + }), + ); + }, + }); + + /* unused harmony default export */ var _unused_webpack_default_export = Router; + + /***/ + }, + /* 588 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__PatternUtils__ = __webpack_require__(72); + + function routeParamsChanged(route, prevState, nextState) { + if (!route.path) return false; + + var paramNames = Object(__WEBPACK_IMPORTED_MODULE_0__PatternUtils__['b' /* getParamNames */])( + route.path, + ); + + return paramNames.some(function (paramName) { + return prevState.params[paramName] !== nextState.params[paramName]; + }); + } + + /** + * Returns an object of { leaveRoutes, changeRoutes, enterRoutes } determined by + * the change from prevState to nextState. We leave routes if either + * 1) they are not in the next state or 2) they are in the next state + * but their params have changed (i.e. /users/123 => /users/456). + * + * leaveRoutes are ordered starting at the leaf route of the tree + * we're leaving up to the common parent route. enterRoutes are ordered + * from the top of the tree we're entering down to the leaf route. + * + * changeRoutes are any routes that didn't leave or enter during + * the transition. + */ + function computeChangedRoutes(prevState, nextState) { + var prevRoutes = prevState && prevState.routes; + var nextRoutes = nextState.routes; + + var leaveRoutes = void 0, + changeRoutes = void 0, + enterRoutes = void 0; + if (prevRoutes) { + var parentIsLeaving = false; + leaveRoutes = prevRoutes.filter(function (route) { + if (parentIsLeaving) { + return true; + } else { + var isLeaving = + nextRoutes.indexOf(route) === -1 || routeParamsChanged(route, prevState, nextState); + if (isLeaving) parentIsLeaving = true; + return isLeaving; + } + }); + + // onLeave hooks start at the leaf route. + leaveRoutes.reverse(); + + enterRoutes = []; + changeRoutes = []; + + nextRoutes.forEach(function (route) { + var isNew = prevRoutes.indexOf(route) === -1; + var paramsChanged = leaveRoutes.indexOf(route) !== -1; + + if (isNew || paramsChanged) enterRoutes.push(route); + else changeRoutes.push(route); + }); + } else { + leaveRoutes = []; + changeRoutes = []; + enterRoutes = nextRoutes; + } + + return { + leaveRoutes: leaveRoutes, + changeRoutes: changeRoutes, + enterRoutes: enterRoutes, + }; + } + + /* harmony default export */ __webpack_exports__['a'] = computeChangedRoutes; + + /***/ + }, + /* 589 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = getTransitionUtils; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__AsyncUtils__ = __webpack_require__(167); + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + var PendingHooks = function PendingHooks() { + var _this = this; + + _classCallCheck(this, PendingHooks); + + this.hooks = []; + + this.add = function (hook) { + return _this.hooks.push(hook); + }; + + this.remove = function (hook) { + return (_this.hooks = _this.hooks.filter(function (h) { + return h !== hook; + })); + }; + + this.has = function (hook) { + return _this.hooks.indexOf(hook) !== -1; + }; + + this.clear = function () { + return (_this.hooks = []); + }; + }; + + function getTransitionUtils() { + var enterHooks = new PendingHooks(); + var changeHooks = new PendingHooks(); + + function createTransitionHook(hook, route, asyncArity, pendingHooks) { + var isSync = hook.length < asyncArity; + + var transitionHook = function transitionHook() { + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + hook.apply(route, args); + + if (isSync) { + var callback = args[args.length - 1]; + // Assume hook executes synchronously and + // automatically call the callback. + callback(); + } + }; + + pendingHooks.add(transitionHook); + + return transitionHook; + } + + function getEnterHooks(routes) { + return routes.reduce(function (hooks, route) { + if (route.onEnter) hooks.push(createTransitionHook(route.onEnter, route, 3, enterHooks)); + return hooks; + }, []); + } + + function getChangeHooks(routes) { + return routes.reduce(function (hooks, route) { + if (route.onChange) hooks.push(createTransitionHook(route.onChange, route, 4, changeHooks)); + return hooks; + }, []); + } + + function runTransitionHooks(length, iter, callback) { + if (!length) { + callback(); + return; + } + + var redirectInfo = void 0; + function replace(location) { + redirectInfo = location; + } + + Object(__WEBPACK_IMPORTED_MODULE_0__AsyncUtils__['a' /* loopAsync */])( + length, + function (index, next, done) { + iter(index, replace, function (error) { + if (error || redirectInfo) { + done(error, redirectInfo); // No need to continue. + } else { + next(); + } + }); + }, + callback, + ); + } + + /** + * Runs all onEnter hooks in the given array of routes in order + * with onEnter(nextState, replace, callback) and calls + * callback(error, redirectInfo) when finished. The first hook + * to use replace short-circuits the loop. + * + * If a hook needs to run asynchronously, it may use the callback + * function. However, doing so will cause the transition to pause, + * which could lead to a non-responsive UI if the hook is slow. + */ + function runEnterHooks(routes, nextState, callback) { + enterHooks.clear(); + var hooks = getEnterHooks(routes); + return runTransitionHooks( + hooks.length, + function (index, replace, next) { + var wrappedNext = function wrappedNext() { + if (enterHooks.has(hooks[index])) { + next.apply(undefined, arguments); + enterHooks.remove(hooks[index]); + } + }; + hooks[index](nextState, replace, wrappedNext); + }, + callback, + ); + } + + /** + * Runs all onChange hooks in the given array of routes in order + * with onChange(prevState, nextState, replace, callback) and calls + * callback(error, redirectInfo) when finished. The first hook + * to use replace short-circuits the loop. + * + * If a hook needs to run asynchronously, it may use the callback + * function. However, doing so will cause the transition to pause, + * which could lead to a non-responsive UI if the hook is slow. + */ + function runChangeHooks(routes, state, nextState, callback) { + changeHooks.clear(); + var hooks = getChangeHooks(routes); + return runTransitionHooks( + hooks.length, + function (index, replace, next) { + var wrappedNext = function wrappedNext() { + if (changeHooks.has(hooks[index])) { + next.apply(undefined, arguments); + changeHooks.remove(hooks[index]); + } + }; + hooks[index](state, nextState, replace, wrappedNext); + }, + callback, + ); + } + + /** + * Runs all onLeave hooks in the given array of routes in order. + */ + function runLeaveHooks(routes, prevState) { + for (var i = 0, len = routes.length; i < len; ++i) { + if (routes[i].onLeave) routes[i].onLeave.call(routes[i], prevState); + } + } + + return { + runEnterHooks: runEnterHooks, + runChangeHooks: runChangeHooks, + runLeaveHooks: runLeaveHooks, + }; + } + + /***/ + }, + /* 590 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = isActive; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__PatternUtils__ = __webpack_require__(72); + var _typeof = + typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' + ? function (obj) { + return typeof obj; + } + : function (obj) { + return obj && + typeof Symbol === 'function' && + obj.constructor === Symbol && + obj !== Symbol.prototype + ? 'symbol' + : typeof obj; + }; + + function deepEqual(a, b) { + if (a == b) return true; + + if (a == null || b == null) return false; + + if (Array.isArray(a)) { + return ( + Array.isArray(b) && + a.length === b.length && + a.every(function (item, index) { + return deepEqual(item, b[index]); + }) + ); + } + + if ((typeof a === 'undefined' ? 'undefined' : _typeof(a)) === 'object') { + for (var p in a) { + if (!Object.prototype.hasOwnProperty.call(a, p)) { + continue; + } + + if (a[p] === undefined) { + if (b[p] !== undefined) { + return false; + } + } else if (!Object.prototype.hasOwnProperty.call(b, p)) { + return false; + } else if (!deepEqual(a[p], b[p])) { + return false; + } + } + + return true; + } + + return String(a) === String(b); + } + + /** + * Returns true if the current pathname matches the supplied one, net of + * leading and trailing slash normalization. This is sufficient for an + * indexOnly route match. + */ + function pathIsActive(pathname, currentPathname) { + // Normalize leading slash for consistency. Leading slash on pathname has + // already been normalized in isActive. See caveat there. + if (currentPathname.charAt(0) !== '/') { + currentPathname = '/' + currentPathname; + } + + // Normalize the end of both path names too. Maybe `/foo/` shouldn't show + // `/foo` as active, but in this case, we would already have failed the + // match. + if (pathname.charAt(pathname.length - 1) !== '/') { + pathname += '/'; + } + if (currentPathname.charAt(currentPathname.length - 1) !== '/') { + currentPathname += '/'; + } + + return currentPathname === pathname; + } + + /** + * Returns true if the given pathname matches the active routes and params. + */ + function routeIsActive(pathname, routes, params) { + var remainingPathname = pathname, + paramNames = [], + paramValues = []; + + // for...of would work here but it's probably slower post-transpilation. + for (var i = 0, len = routes.length; i < len; ++i) { + var route = routes[i]; + var pattern = route.path || ''; + + if (pattern.charAt(0) === '/') { + remainingPathname = pathname; + paramNames = []; + paramValues = []; + } + + if (remainingPathname !== null && pattern) { + var matched = Object(__WEBPACK_IMPORTED_MODULE_0__PatternUtils__['c' /* matchPattern */])( + pattern, + remainingPathname, + ); + if (matched) { + remainingPathname = matched.remainingPathname; + paramNames = [].concat(paramNames, matched.paramNames); + paramValues = [].concat(paramValues, matched.paramValues); + } else { + remainingPathname = null; + } + + if (remainingPathname === '') { + // We have an exact match on the route. Just check that all the params + // match. + // FIXME: This doesn't work on repeated params. + return paramNames.every(function (paramName, index) { + return String(paramValues[index]) === String(params[paramName]); + }); + } + } + } + + return false; + } + + /** + * Returns true if all key/value pairs in the given query are + * currently active. + */ + function queryIsActive(query, activeQuery) { + if (activeQuery == null) return query == null; + + if (query == null) return true; + + return deepEqual(query, activeQuery); + } + + /** + * Returns true if a <Link> to the given pathname/query combination is + * currently active. + */ + function isActive(_ref, indexOnly, currentLocation, routes, params) { + var pathname = _ref.pathname, + query = _ref.query; + + if (currentLocation == null) return false; + + // TODO: This is a bit ugly. It keeps around support for treating pathnames + // without preceding slashes as absolute paths, but possibly also works + // around the same quirks with basenames as in matchRoutes. + if (pathname.charAt(0) !== '/') { + pathname = '/' + pathname; + } + + if (!pathIsActive(pathname, currentLocation.pathname)) { + // The path check is necessary and sufficient for indexOnly, but otherwise + // we still need to check the routes. + if (indexOnly || !routeIsActive(pathname, routes, params)) { + return false; + } + } + + return queryIsActive(query, currentLocation.query); + } + + /***/ + }, + /* 591 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__AsyncUtils__ = __webpack_require__(167); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__PromiseUtils__ = __webpack_require__(255); + + function getComponentsForRoute(nextState, route, callback) { + if (route.component || route.components) { + callback(null, route.component || route.components); + return; + } + + var getComponent = route.getComponent || route.getComponents; + if (getComponent) { + var componentReturn = getComponent.call(route, nextState, callback); + if (Object(__WEBPACK_IMPORTED_MODULE_1__PromiseUtils__['a' /* isPromise */])(componentReturn)) + componentReturn.then(function (component) { + return callback(null, component); + }, callback); + } else { + callback(); + } + } + + /** + * Asynchronously fetches all components needed for the given router + * state and calls callback(error, components) when finished. + * + * Note: This operation may finish synchronously if no routes have an + * asynchronous getComponents method. + */ + function getComponents(nextState, callback) { + Object(__WEBPACK_IMPORTED_MODULE_0__AsyncUtils__['b' /* mapAsync */])( + nextState.routes, + function (route, index, callback) { + getComponentsForRoute(nextState, route, callback); + }, + callback, + ); + } + + /* harmony default export */ __webpack_exports__['a'] = getComponents; + + /***/ + }, + /* 592 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = matchRoutes; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__AsyncUtils__ = __webpack_require__(167); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__PromiseUtils__ = __webpack_require__(255); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__PatternUtils__ = __webpack_require__(72); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__routerWarning__ = __webpack_require__(71); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__RouteUtils__ = __webpack_require__(48); + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + function getChildRoutes(route, location, paramNames, paramValues, callback) { + if (route.childRoutes) { + return [null, route.childRoutes]; + } + if (!route.getChildRoutes) { + return []; + } + + var sync = true, + result = void 0; + + var partialNextState = { + location: location, + params: createParams(paramNames, paramValues), + }; + + var childRoutesReturn = route.getChildRoutes(partialNextState, function (error, childRoutes) { + childRoutes = + !error && Object(__WEBPACK_IMPORTED_MODULE_4__RouteUtils__['b' /* createRoutes */])(childRoutes); + if (sync) { + result = [error, childRoutes]; + return; + } + + callback(error, childRoutes); + }); + + if (Object(__WEBPACK_IMPORTED_MODULE_1__PromiseUtils__['a' /* isPromise */])(childRoutesReturn)) + childRoutesReturn.then(function (childRoutes) { + return callback( + null, + Object(__WEBPACK_IMPORTED_MODULE_4__RouteUtils__['b' /* createRoutes */])(childRoutes), + ); + }, callback); + + sync = false; + return result; // Might be undefined. + } + + function getIndexRoute(route, location, paramNames, paramValues, callback) { + if (route.indexRoute) { + callback(null, route.indexRoute); + } else if (route.getIndexRoute) { + var partialNextState = { + location: location, + params: createParams(paramNames, paramValues), + }; + + var indexRoutesReturn = route.getIndexRoute(partialNextState, function (error, indexRoute) { + callback( + error, + !error && + Object(__WEBPACK_IMPORTED_MODULE_4__RouteUtils__['b' /* createRoutes */])(indexRoute)[0], + ); + }); + + if (Object(__WEBPACK_IMPORTED_MODULE_1__PromiseUtils__['a' /* isPromise */])(indexRoutesReturn)) + indexRoutesReturn.then(function (indexRoute) { + return callback( + null, + Object(__WEBPACK_IMPORTED_MODULE_4__RouteUtils__['b' /* createRoutes */])(indexRoute)[0], + ); + }, callback); + } else if (route.childRoutes || route.getChildRoutes) { + var onChildRoutes = function onChildRoutes(error, childRoutes) { + if (error) { + callback(error); + return; + } + + var pathless = childRoutes.filter(function (childRoute) { + return !childRoute.path; + }); + + Object(__WEBPACK_IMPORTED_MODULE_0__AsyncUtils__['a' /* loopAsync */])( + pathless.length, + function (index, next, done) { + getIndexRoute( + pathless[index], + location, + paramNames, + paramValues, + function (error, indexRoute) { + if (error || indexRoute) { + var routes = [pathless[index]].concat( + Array.isArray(indexRoute) ? indexRoute : [indexRoute], + ); + done(error, routes); + } else { + next(); + } + }, + ); + }, + function (err, routes) { + callback(null, routes); + }, + ); + }; + + var result = getChildRoutes(route, location, paramNames, paramValues, onChildRoutes); + if (result) { + onChildRoutes.apply(undefined, result); + } + } else { + callback(); + } + } + + function assignParams(params, paramNames, paramValues) { + return paramNames.reduce(function (params, paramName, index) { + var paramValue = paramValues && paramValues[index]; + + if (Array.isArray(params[paramName])) { + params[paramName].push(paramValue); + } else if (paramName in params) { + params[paramName] = [params[paramName], paramValue]; + } else { + params[paramName] = paramValue; + } + + return params; + }, params); + } + + function createParams(paramNames, paramValues) { + return assignParams({}, paramNames, paramValues); + } + + function matchRouteDeep(route, location, remainingPathname, paramNames, paramValues, callback) { + var pattern = route.path || ''; + + if (pattern.charAt(0) === '/') { + remainingPathname = location.pathname; + paramNames = []; + paramValues = []; + } + + // Only try to match the path if the route actually has a pattern, and if + // we're not just searching for potential nested absolute paths. + if (remainingPathname !== null && pattern) { + try { + var matched = Object(__WEBPACK_IMPORTED_MODULE_2__PatternUtils__['c' /* matchPattern */])( + pattern, + remainingPathname, + ); + if (matched) { + remainingPathname = matched.remainingPathname; + paramNames = [].concat(paramNames, matched.paramNames); + paramValues = [].concat(paramValues, matched.paramValues); + } else { + remainingPathname = null; + } + } catch (error) { + callback(error); + } + + // By assumption, pattern is non-empty here, which is the prerequisite for + // actually terminating a match. + if (remainingPathname === '') { + var match = { + routes: [route], + params: createParams(paramNames, paramValues), + }; + + getIndexRoute(route, location, paramNames, paramValues, function (error, indexRoute) { + if (error) { + callback(error); + } else { + if (Array.isArray(indexRoute)) { + var _match$routes; + + true + ? Object(__WEBPACK_IMPORTED_MODULE_3__routerWarning__['a' /* default */])( + indexRoute.every(function (route) { + return !route.path; + }), + 'Index routes should not have paths', + ) + : void 0; + (_match$routes = match.routes).push.apply(_match$routes, indexRoute); + } else if (indexRoute) { + true + ? Object(__WEBPACK_IMPORTED_MODULE_3__routerWarning__['a' /* default */])( + !indexRoute.path, + 'Index routes should not have paths', + ) + : void 0; + match.routes.push(indexRoute); + } + + callback(null, match); + } + }); + + return; + } + } + + if (remainingPathname != null || route.childRoutes) { + // Either a) this route matched at least some of the path or b) + // we don't have to load this route's children asynchronously. In + // either case continue checking for matches in the subtree. + var onChildRoutes = function onChildRoutes(error, childRoutes) { + if (error) { + callback(error); + } else if (childRoutes) { + // Check the child routes to see if any of them match. + matchRoutes( + childRoutes, + location, + function (error, match) { + if (error) { + callback(error); + } else if (match) { + // A child route matched! Augment the match and pass it up the stack. + match.routes.unshift(route); + callback(null, match); + } else { + callback(); + } + }, + remainingPathname, + paramNames, + paramValues, + ); + } else { + callback(); + } + }; + + var result = getChildRoutes(route, location, paramNames, paramValues, onChildRoutes); + if (result) { + onChildRoutes.apply(undefined, result); + } + } else { + callback(); + } + } + + /** + * Asynchronously matches the given location to a set of routes and calls + * callback(error, state) when finished. The state object will have the + * following properties: + * + * - routes An array of routes that matched, in hierarchical order + * - params An object of URL parameters + * + * Note: This operation may finish synchronously if no routes have an + * asynchronous getChildRoutes method. + */ + function matchRoutes(routes, location, callback, remainingPathname) { + var paramNames = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : []; + var paramValues = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : []; + + if (remainingPathname === undefined) { + // TODO: This is a little bit ugly, but it works around a quirk in history + // that strips the leading slash from pathnames when using basenames with + // trailing slashes. + if (location.pathname.charAt(0) !== '/') { + location = _extends({}, location, { + pathname: '/' + location.pathname, + }); + } + remainingPathname = location.pathname; + } + + Object(__WEBPACK_IMPORTED_MODULE_0__AsyncUtils__['a' /* loopAsync */])( + routes.length, + function (index, next, done) { + matchRouteDeep( + routes[index], + location, + remainingPathname, + paramNames, + paramValues, + function (error, match) { + if (error || match) { + done(error, match); + } else { + next(); + } + }, + ); + }, + callback, + ); + } + + /***/ + }, + /* 593 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__PatternUtils__ = __webpack_require__(72); + + /** + * Extracts an object of params the given route cares about from + * the given params object. + */ + function getRouteParams(route, params) { + var routeParams = {}; + + if (!route.path) return routeParams; + + Object(__WEBPACK_IMPORTED_MODULE_0__PatternUtils__['b' /* getParamNames */])(route.path).forEach( + function (p) { + if (Object.prototype.hasOwnProperty.call(params, p)) { + routeParams[p] = params[p]; + } + }, + ); + + return routeParams; + } + + /* harmony default export */ __webpack_exports__['a'] = getRouteParams; + + /***/ + }, + /* 594 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_create_react_class__ = __webpack_require__(37); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_create_react_class___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_create_react_class__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Link__ = __webpack_require__(257); + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + /** + * An <IndexLink> is used to link to an <IndexRoute>. + */ + var IndexLink = __WEBPACK_IMPORTED_MODULE_1_create_react_class___default()({ + displayName: 'IndexLink', + + render: function render() { + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_2__Link__['a' /* default */], + _extends({}, this.props, { onlyActiveOnIndex: true }), + ); + }, + }); + + /* unused harmony default export */ var _unused_webpack_default_export = IndexLink; + + /***/ + }, + /* 595 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* unused harmony export default */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant__ = __webpack_require__(14); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_invariant__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_create_react_class__ = __webpack_require__(37); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_create_react_class___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_create_react_class__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_hoist_non_react_statics__ = + __webpack_require__(596); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_hoist_non_react_statics___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_hoist_non_react_statics__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__ContextUtils__ = __webpack_require__(169); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__PropTypes__ = __webpack_require__(170); + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + function getDisplayName(WrappedComponent) { + return WrappedComponent.displayName || WrappedComponent.name || 'Component'; + } + + function withRouter(WrappedComponent, options) { + var withRef = options && options.withRef; + + var WithRouter = __WEBPACK_IMPORTED_MODULE_2_create_react_class___default()({ + displayName: 'WithRouter', + + mixins: [ + Object(__WEBPACK_IMPORTED_MODULE_4__ContextUtils__['b' /* ContextSubscriber */])('router'), + ], + + contextTypes: { router: __WEBPACK_IMPORTED_MODULE_5__PropTypes__['a' /* routerShape */] }, + propTypes: { router: __WEBPACK_IMPORTED_MODULE_5__PropTypes__['a' /* routerShape */] }, + + getWrappedInstance: function getWrappedInstance() { + !withRef + ? true + ? __WEBPACK_IMPORTED_MODULE_0_invariant___default()( + false, + 'To access the wrapped instance, you need to specify ' + + '`{ withRef: true }` as the second argument of the withRouter() call.', + ) + : invariant(false) + : void 0; + + return this.wrappedInstance; + }, + render: function render() { + var _this = this; + + var router = this.props.router || this.context.router; + if (!router) { + return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + WrappedComponent, + this.props, + ); + } + + var params = router.params, + location = router.location, + routes = router.routes; + + var props = _extends({}, this.props, { + router: router, + params: params, + location: location, + routes: routes, + }); + + if (withRef) { + props.ref = function (c) { + _this.wrappedInstance = c; + }; + } + + return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(WrappedComponent, props); + }, + }); + + WithRouter.displayName = 'withRouter(' + getDisplayName(WrappedComponent) + ')'; + WithRouter.WrappedComponent = WrappedComponent; + + return __WEBPACK_IMPORTED_MODULE_3_hoist_non_react_statics___default()(WithRouter, WrappedComponent); + } + + /***/ + }, + /* 596 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2015, Yahoo! Inc. + * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. + */ + + var REACT_STATICS = { + childContextTypes: true, + contextTypes: true, + defaultProps: true, + displayName: true, + getDefaultProps: true, + mixins: true, + propTypes: true, + type: true, + }; + + var KNOWN_STATICS = { + name: true, + length: true, + prototype: true, + caller: true, + arguments: true, + arity: true, + }; + + var isGetOwnPropertySymbolsAvailable = typeof Object.getOwnPropertySymbols === 'function'; + + module.exports = function hoistNonReactStatics(targetComponent, sourceComponent, customStatics) { + if (typeof sourceComponent !== 'string') { + // don't hoist over string (html) components + var keys = Object.getOwnPropertyNames(sourceComponent); + + /* istanbul ignore else */ + if (isGetOwnPropertySymbolsAvailable) { + keys = keys.concat(Object.getOwnPropertySymbols(sourceComponent)); + } + + for (var i = 0; i < keys.length; ++i) { + if ( + !REACT_STATICS[keys[i]] && + !KNOWN_STATICS[keys[i]] && + (!customStatics || !customStatics[keys[i]]) + ) { + try { + targetComponent[keys[i]] = sourceComponent[keys[i]]; + } catch (error) {} + } + } + } + + return targetComponent; + }; + + /***/ + }, + /* 597 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_create_react_class__ = __webpack_require__(37); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_create_react_class___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_create_react_class__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(10); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__routerWarning__ = __webpack_require__(71); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_invariant__ = __webpack_require__(14); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_invariant___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_3_invariant__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Redirect__ = __webpack_require__(258); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__ = __webpack_require__(86); + + /** + * An <IndexRedirect> is used to redirect from an indexRoute. + */ + /* eslint-disable react/require-render-return */ + var IndexRedirect = __WEBPACK_IMPORTED_MODULE_0_create_react_class___default()({ + displayName: 'IndexRedirect', + + statics: { + createRouteFromReactElement: function createRouteFromReactElement(element, parentRoute) { + /* istanbul ignore else: sanity check */ + if (parentRoute) { + parentRoute.indexRoute = + __WEBPACK_IMPORTED_MODULE_4__Redirect__['a' /* default */].createRouteFromReactElement( + element, + ); + } else { + true + ? Object(__WEBPACK_IMPORTED_MODULE_2__routerWarning__['a' /* default */])( + false, + 'An <IndexRedirect> does not make sense at the root of your route config', + ) + : void 0; + } + }, + }, + + propTypes: { + to: __WEBPACK_IMPORTED_MODULE_1_prop_types__['string'].isRequired, + query: __WEBPACK_IMPORTED_MODULE_1_prop_types__['object'], + state: __WEBPACK_IMPORTED_MODULE_1_prop_types__['object'], + onEnter: __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__['c' /* falsy */], + children: __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__['c' /* falsy */], + }, + + /* istanbul ignore next: sanity check */ + render: function render() { + true + ? true + ? __WEBPACK_IMPORTED_MODULE_3_invariant___default()( + false, + '<IndexRedirect> elements are for router configuration only and should not be rendered', + ) + : invariant(false) + : void 0; + }, + }); + + /* unused harmony default export */ var _unused_webpack_default_export = IndexRedirect; + + /***/ + }, + /* 598 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_create_react_class__ = __webpack_require__(37); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_create_react_class___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_create_react_class__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(10); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__routerWarning__ = __webpack_require__(71); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_invariant__ = __webpack_require__(14); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_invariant___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_3_invariant__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__RouteUtils__ = __webpack_require__(48); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__ = __webpack_require__(86); + + /** + * An <IndexRoute> is used to specify its parent's <Route indexRoute> in + * a JSX route config. + */ + /* eslint-disable react/require-render-return */ + var IndexRoute = __WEBPACK_IMPORTED_MODULE_0_create_react_class___default()({ + displayName: 'IndexRoute', + + statics: { + createRouteFromReactElement: function createRouteFromReactElement(element, parentRoute) { + /* istanbul ignore else: sanity check */ + if (parentRoute) { + parentRoute.indexRoute = Object( + __WEBPACK_IMPORTED_MODULE_4__RouteUtils__['a' /* createRouteFromReactElement */], + )(element); + } else { + true + ? Object(__WEBPACK_IMPORTED_MODULE_2__routerWarning__['a' /* default */])( + false, + 'An <IndexRoute> does not make sense at the root of your route config', + ) + : void 0; + } + }, + }, + + propTypes: { + path: __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__['c' /* falsy */], + component: __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__['a' /* component */], + components: __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__['b' /* components */], + getComponent: __WEBPACK_IMPORTED_MODULE_1_prop_types__['func'], + getComponents: __WEBPACK_IMPORTED_MODULE_1_prop_types__['func'], + }, + + /* istanbul ignore next: sanity check */ + render: function render() { + true + ? true + ? __WEBPACK_IMPORTED_MODULE_3_invariant___default()( + false, + '<IndexRoute> elements are for router configuration only and should not be rendered', + ) + : invariant(false) + : void 0; + }, + }); + + /* unused harmony default export */ var _unused_webpack_default_export = IndexRoute; + + /***/ + }, + /* 599 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_create_react_class__ = __webpack_require__(37); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_create_react_class___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_create_react_class__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(10); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant__ = __webpack_require__(14); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_2_invariant__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__RouteUtils__ = __webpack_require__(48); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__InternalPropTypes__ = __webpack_require__(86); + + /** + * A <Route> is used to declare which components are rendered to the + * page when the URL matches a given pattern. + * + * Routes are arranged in a nested tree structure. When a new URL is + * requested, the tree is searched depth-first to find a route whose + * path matches the URL. When one is found, all routes in the tree + * that lead to it are considered "active" and their components are + * rendered into the DOM, nested in the same order as in the tree. + */ + /* eslint-disable react/require-render-return */ + var Route = __WEBPACK_IMPORTED_MODULE_0_create_react_class___default()({ + displayName: 'Route', + + statics: { + createRouteFromReactElement: + __WEBPACK_IMPORTED_MODULE_3__RouteUtils__['a' /* createRouteFromReactElement */], + }, + + propTypes: { + path: __WEBPACK_IMPORTED_MODULE_1_prop_types__['string'], + component: __WEBPACK_IMPORTED_MODULE_4__InternalPropTypes__['a' /* component */], + components: __WEBPACK_IMPORTED_MODULE_4__InternalPropTypes__['b' /* components */], + getComponent: __WEBPACK_IMPORTED_MODULE_1_prop_types__['func'], + getComponents: __WEBPACK_IMPORTED_MODULE_1_prop_types__['func'], + }, + + /* istanbul ignore next: sanity check */ + render: function render() { + true + ? true + ? __WEBPACK_IMPORTED_MODULE_2_invariant___default()( + false, + '<Route> elements are for router configuration only and should not be rendered', + ) + : invariant(false) + : void 0; + }, + }); + + /* harmony default export */ __webpack_exports__['a'] = Route; + + /***/ + }, + /* 600 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_Actions__ = __webpack_require__(111); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_Actions___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_history_lib_Actions__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(14); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_invariant__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__createMemoryHistory__ = __webpack_require__(259); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__createTransitionManager__ = + __webpack_require__(254); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__RouteUtils__ = __webpack_require__(48); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__RouterUtils__ = __webpack_require__(256); + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + function _objectWithoutProperties(obj, keys) { + var target = {}; + for (var i in obj) { + if (keys.indexOf(i) >= 0) continue; + if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; + target[i] = obj[i]; + } + return target; + } + + /** + * A high-level API to be used for server-side rendering. + * + * This function matches a location to a set of routes and calls + * callback(error, redirectLocation, renderProps) when finished. + * + * Note: You probably don't want to use this in a browser unless you're using + * server-side rendering with async routes. + */ + function match(_ref, callback) { + var history = _ref.history, + routes = _ref.routes, + location = _ref.location, + options = _objectWithoutProperties(_ref, ['history', 'routes', 'location']); + + !(history || location) + ? true + ? __WEBPACK_IMPORTED_MODULE_1_invariant___default()(false, 'match needs a history or a location') + : invariant(false) + : void 0; + + history = history + ? history + : Object(__WEBPACK_IMPORTED_MODULE_2__createMemoryHistory__['a' /* default */])(options); + var transitionManager = Object( + __WEBPACK_IMPORTED_MODULE_3__createTransitionManager__['a' /* default */], + )(history, Object(__WEBPACK_IMPORTED_MODULE_4__RouteUtils__['b' /* createRoutes */])(routes)); + + if (location) { + // Allow match({ location: '/the/path', ... }) + location = history.createLocation(location); + } else { + location = history.getCurrentLocation(); + } + + transitionManager.match(location, function (error, redirectLocation, nextState) { + var renderProps = void 0; + + if (nextState) { + var router = Object(__WEBPACK_IMPORTED_MODULE_5__RouterUtils__['b' /* createRouterObject */])( + history, + transitionManager, + nextState, + ); + renderProps = _extends({}, nextState, { + router: router, + matchContext: { transitionManager: transitionManager, router: router }, + }); + } + + callback( + error, + redirectLocation && + history.createLocation( + redirectLocation, + __WEBPACK_IMPORTED_MODULE_0_history_lib_Actions__['REPLACE'], + ), + renderProps, + ); + }); + } + + /* harmony default export */ __webpack_exports__['a'] = match; + + /***/ + }, + /* 601 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var strictUriEncode = __webpack_require__(602); + var objectAssign = __webpack_require__(64); + + function encoderForArrayFormat(opts) { + switch (opts.arrayFormat) { + case 'index': + return function (key, value, index) { + return value === null + ? [encode(key, opts), '[', index, ']'].join('') + : [encode(key, opts), '[', encode(index, opts), ']=', encode(value, opts)].join(''); + }; + + case 'bracket': + return function (key, value) { + return value === null + ? encode(key, opts) + : [encode(key, opts), '[]=', encode(value, opts)].join(''); + }; + + default: + return function (key, value) { + return value === null + ? encode(key, opts) + : [encode(key, opts), '=', encode(value, opts)].join(''); + }; + } + } + + function parserForArrayFormat(opts) { + var result; + + switch (opts.arrayFormat) { + case 'index': + return function (key, value, accumulator) { + result = /\[(\d*)\]$/.exec(key); + + key = key.replace(/\[\d*\]$/, ''); + + if (!result) { + accumulator[key] = value; + return; + } + + if (accumulator[key] === undefined) { + accumulator[key] = {}; + } + + accumulator[key][result[1]] = value; + }; + + case 'bracket': + return function (key, value, accumulator) { + result = /(\[\])$/.exec(key); + key = key.replace(/\[\]$/, ''); + + if (!result) { + accumulator[key] = value; + return; + } else if (accumulator[key] === undefined) { + accumulator[key] = [value]; + return; + } + + accumulator[key] = [].concat(accumulator[key], value); + }; + + default: + return function (key, value, accumulator) { + if (accumulator[key] === undefined) { + accumulator[key] = value; + return; + } + + accumulator[key] = [].concat(accumulator[key], value); + }; + } + } + + function encode(value, opts) { + if (opts.encode) { + return opts.strict ? strictUriEncode(value) : encodeURIComponent(value); + } + + return value; + } + + function keysSorter(input) { + if (Array.isArray(input)) { + return input.sort(); + } else if (typeof input === 'object') { + return keysSorter(Object.keys(input)) + .sort(function (a, b) { + return Number(a) - Number(b); + }) + .map(function (key) { + return input[key]; + }); + } + + return input; + } + + exports.extract = function (str) { + return str.split('?')[1] || ''; + }; + + exports.parse = function (str, opts) { + opts = objectAssign({ arrayFormat: 'none' }, opts); + + var formatter = parserForArrayFormat(opts); + + // Create an object with no prototype + // https://github.com/sindresorhus/query-string/issues/47 + var ret = Object.create(null); + + if (typeof str !== 'string') { + return ret; + } + + str = str.trim().replace(/^(\?|#|&)/, ''); + + if (!str) { + return ret; + } + + str.split('&').forEach(function (param) { + var parts = param.replace(/\+/g, ' ').split('='); + // Firefox (pre 40) decodes `%3D` to `=` + // https://github.com/sindresorhus/query-string/pull/37 + var key = parts.shift(); + var val = parts.length > 0 ? parts.join('=') : undefined; + + // missing `=` should be `null`: + // http://w3.org/TR/2012/WD-url-20120524/#collect-url-parameters + val = val === undefined ? null : decodeURIComponent(val); + + formatter(decodeURIComponent(key), val, ret); + }); + + return Object.keys(ret) + .sort() + .reduce(function (result, key) { + var val = ret[key]; + if (Boolean(val) && typeof val === 'object' && !Array.isArray(val)) { + // Sort object keys, not values + result[key] = keysSorter(val); + } else { + result[key] = val; + } + + return result; + }, Object.create(null)); + }; + + exports.stringify = function (obj, opts) { + var defaults = { + encode: true, + strict: true, + arrayFormat: 'none', + }; + + opts = objectAssign(defaults, opts); + + var formatter = encoderForArrayFormat(opts); + + return obj + ? Object.keys(obj) + .sort() + .map(function (key) { + var val = obj[key]; + + if (val === undefined) { + return ''; + } + + if (val === null) { + return encode(key, opts); + } + + if (Array.isArray(val)) { + var result = []; + + val.slice().forEach(function (val2) { + if (val2 === undefined) { + return; + } + + result.push(formatter(key, val2, result.length)); + }); + + return result.join('&'); + } + + return encode(key, opts) + '=' + encode(val, opts); + }) + .filter(function (x) { + return x.length > 0; + }) + .join('&') + : ''; + }; + + /***/ + }, + /* 602 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + module.exports = function (str) { + return encodeURIComponent(str).replace(/[!'()*]/g, function (c) { + return '%' + c.charCodeAt(0).toString(16).toUpperCase(); + }); + }; + + /***/ + }, + /* 603 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + var _warning = __webpack_require__(47); + + var _warning2 = _interopRequireDefault(_warning); + + var _invariant = __webpack_require__(14); + + var _invariant2 = _interopRequireDefault(_invariant); + + var _LocationUtils = __webpack_require__(73); + + var _PathUtils = __webpack_require__(49); + + var _createHistory = __webpack_require__(172); + + var _createHistory2 = _interopRequireDefault(_createHistory); + + var _Actions = __webpack_require__(111); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + var createStateStorage = function createStateStorage(entries) { + return entries + .filter(function (entry) { + return entry.state; + }) + .reduce(function (memo, entry) { + memo[entry.key] = entry.state; + return memo; + }, {}); + }; + + var createMemoryHistory = function createMemoryHistory() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + + if (Array.isArray(options)) { + options = { entries: options }; + } else if (typeof options === 'string') { + options = { entries: [options] }; + } + + var getCurrentLocation = function getCurrentLocation() { + var entry = entries[current]; + var path = (0, _PathUtils.createPath)(entry); + + var key = void 0, + state = void 0; + if (entry.key) { + key = entry.key; + state = readState(key); + } + + var init = (0, _PathUtils.parsePath)(path); + + return (0, _LocationUtils.createLocation)(_extends({}, init, { state: state }), undefined, key); + }; + + var canGo = function canGo(n) { + var index = current + n; + return index >= 0 && index < entries.length; + }; + + var go = function go(n) { + if (!n) return; + + if (!canGo(n)) { + true ? (0, _warning2.default)(false, 'Cannot go(%s) there is not enough history', n) : void 0; + + return; + } + + current += n; + var currentLocation = getCurrentLocation(); + + // Change action to POP + history.transitionTo(_extends({}, currentLocation, { action: _Actions.POP })); + }; + + var pushLocation = function pushLocation(location) { + current += 1; + + if (current < entries.length) entries.splice(current); + + entries.push(location); + + saveState(location.key, location.state); + }; + + var replaceLocation = function replaceLocation(location) { + entries[current] = location; + saveState(location.key, location.state); + }; + + var history = (0, _createHistory2.default)( + _extends({}, options, { + getCurrentLocation: getCurrentLocation, + pushLocation: pushLocation, + replaceLocation: replaceLocation, + go: go, + }), + ); + + var _options = options, + entries = _options.entries, + current = _options.current; + + if (typeof entries === 'string') { + entries = [entries]; + } else if (!Array.isArray(entries)) { + entries = ['/']; + } + + entries = entries.map(function (entry) { + return (0, _LocationUtils.createLocation)(entry); + }); + + if (current == null) { + current = entries.length - 1; + } else { + !(current >= 0 && current < entries.length) + ? true + ? (0, _invariant2.default)( + false, + 'Current index must be >= 0 and < %s, was %s', + entries.length, + current, + ) + : (0, _invariant2.default)(false) + : void 0; + } + + var storage = createStateStorage(entries); + + var saveState = function saveState(key, state) { + return (storage[key] = state); + }; + + var readState = function readState(key) { + return storage[key]; + }; + + return _extends({}, history, { + canGo: canGo, + }); + }; + + exports.default = createMemoryHistory; + + /***/ + }, + /* 604 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + var loopAsync = (exports.loopAsync = function loopAsync(turns, work, callback) { + var currentTurn = 0, + isDone = false; + var isSync = false, + hasNext = false, + doneArgs = void 0; + + var done = function done() { + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + isDone = true; + + if (isSync) { + // Iterate instead of recursing if possible. + doneArgs = args; + return; + } + + callback.apply(undefined, args); + }; + + var next = function next() { + if (isDone) return; + + hasNext = true; + + if (isSync) return; // Iterate instead of recursing if possible. + + isSync = true; + + while (!isDone && currentTurn < turns && hasNext) { + hasNext = false; + work(currentTurn++, next, done); + } + + isSync = false; + + if (isDone) { + // This means the loop finished synchronously. + callback.apply(undefined, doneArgs); + return; + } + + if (currentTurn >= turns && hasNext) { + isDone = true; + callback(); + } + }; + + next(); + }); + + /***/ + }, + /* 605 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__RouterContext__ = __webpack_require__(168); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__routerWarning__ = __webpack_require__(71); + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + /* unused harmony default export */ var _unused_webpack_default_export = function () { + for (var _len = arguments.length, middlewares = Array(_len), _key = 0; _key < _len; _key++) { + middlewares[_key] = arguments[_key]; + } + + if (true) { + middlewares.forEach(function (middleware, index) { + true + ? Object(__WEBPACK_IMPORTED_MODULE_2__routerWarning__['a' /* default */])( + middleware.renderRouterContext || middleware.renderRouteComponent, + 'The middleware specified at index ' + + index + + ' does not appear to be ' + + 'a valid React Router middleware.', + ) + : void 0; + }); + } + + var withContext = middlewares + .map(function (middleware) { + return middleware.renderRouterContext; + }) + .filter(Boolean); + var withComponent = middlewares + .map(function (middleware) { + return middleware.renderRouteComponent; + }) + .filter(Boolean); + + var makeCreateElement = function makeCreateElement() { + var baseCreateElement = + arguments.length > 0 && arguments[0] !== undefined + ? arguments[0] + : __WEBPACK_IMPORTED_MODULE_0_react__['createElement']; + return function (Component, props) { + return withComponent.reduceRight( + function (previous, renderRouteComponent) { + return renderRouteComponent(previous, props); + }, + baseCreateElement(Component, props), + ); + }; + }; + + return function (renderProps) { + return withContext.reduceRight( + function (previous, renderRouterContext) { + return renderRouterContext(previous, renderProps); + }, + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_1__RouterContext__['a' /* default */], + _extends({}, renderProps, { + createElement: makeCreateElement(renderProps.createElement), + }), + ), + ); + }; + }; + + /***/ + }, + /* 606 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_createBrowserHistory__ = + __webpack_require__(607); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_createBrowserHistory___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_history_lib_createBrowserHistory__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__createRouterHistory__ = __webpack_require__(264); + + /* unused harmony default export */ var _unused_webpack_default_export = Object( + __WEBPACK_IMPORTED_MODULE_1__createRouterHistory__['a' /* default */], + )(__WEBPACK_IMPORTED_MODULE_0_history_lib_createBrowserHistory___default.a); + + /***/ + }, + /* 607 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + var _invariant = __webpack_require__(14); + + var _invariant2 = _interopRequireDefault(_invariant); + + var _ExecutionEnvironment = __webpack_require__(173); + + var _BrowserProtocol = __webpack_require__(174); + + var BrowserProtocol = _interopRequireWildcard(_BrowserProtocol); + + var _RefreshProtocol = __webpack_require__(608); + + var RefreshProtocol = _interopRequireWildcard(_RefreshProtocol); + + var _DOMUtils = __webpack_require__(112); + + var _createHistory = __webpack_require__(172); + + var _createHistory2 = _interopRequireDefault(_createHistory); + + function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; + } + } + newObj.default = obj; + return newObj; + } + } + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + /** + * Creates and returns a history object that uses HTML5's history API + * (pushState, replaceState, and the popstate event) to manage history. + * This is the recommended method of managing history in browsers because + * it provides the cleanest URLs. + * + * Note: In browsers that do not support the HTML5 history API full + * page reloads will be used to preserve clean URLs. You can force this + * behavior using { forceRefresh: true } in options. + */ + var createBrowserHistory = function createBrowserHistory() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + + !_ExecutionEnvironment.canUseDOM + ? true + ? (0, _invariant2.default)(false, 'Browser history needs a DOM') + : (0, _invariant2.default)(false) + : void 0; + + var useRefresh = options.forceRefresh || !(0, _DOMUtils.supportsHistory)(); + var Protocol = useRefresh ? RefreshProtocol : BrowserProtocol; + + var getUserConfirmation = Protocol.getUserConfirmation, + getCurrentLocation = Protocol.getCurrentLocation, + pushLocation = Protocol.pushLocation, + replaceLocation = Protocol.replaceLocation, + go = Protocol.go; + + var history = (0, _createHistory2.default)( + _extends( + { + getUserConfirmation: getUserConfirmation, + }, + options, + { + getCurrentLocation: getCurrentLocation, + pushLocation: pushLocation, + replaceLocation: replaceLocation, + go: go, + }, + ), + ); + + var listenerCount = 0, + stopListener = void 0; + + var startListener = function startListener(listener, before) { + if (++listenerCount === 1) stopListener = BrowserProtocol.startListener(history.transitionTo); + + var unlisten = before ? history.listenBefore(listener) : history.listen(listener); + + return function () { + unlisten(); + + if (--listenerCount === 0) stopListener(); + }; + }; + + var listenBefore = function listenBefore(listener) { + return startListener(listener, true); + }; + + var listen = function listen(listener) { + return startListener(listener, false); + }; + + return _extends({}, history, { + listenBefore: listenBefore, + listen: listen, + }); + }; + + exports.default = createBrowserHistory; + + /***/ + }, + /* 608 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + exports.replaceLocation = + exports.pushLocation = + exports.getCurrentLocation = + exports.go = + exports.getUserConfirmation = + undefined; + + var _BrowserProtocol = __webpack_require__(174); + + Object.defineProperty(exports, 'getUserConfirmation', { + enumerable: true, + get: function get() { + return _BrowserProtocol.getUserConfirmation; + }, + }); + Object.defineProperty(exports, 'go', { + enumerable: true, + get: function get() { + return _BrowserProtocol.go; + }, + }); + + var _LocationUtils = __webpack_require__(73); + + var _PathUtils = __webpack_require__(49); + + var getCurrentLocation = (exports.getCurrentLocation = function getCurrentLocation() { + return (0, _LocationUtils.createLocation)(window.location); + }); + + var pushLocation = (exports.pushLocation = function pushLocation(location) { + window.location.href = (0, _PathUtils.createPath)(location); + return false; // Don't update location + }); + + var replaceLocation = (exports.replaceLocation = function replaceLocation(location) { + window.location.replace((0, _PathUtils.createPath)(location)); + return false; // Don't update location + }); + + /***/ + }, + /* 609 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_createHashHistory__ = + __webpack_require__(610); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_createHashHistory___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_history_lib_createHashHistory__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__createRouterHistory__ = __webpack_require__(264); + + /* unused harmony default export */ var _unused_webpack_default_export = Object( + __WEBPACK_IMPORTED_MODULE_1__createRouterHistory__['a' /* default */], + )(__WEBPACK_IMPORTED_MODULE_0_history_lib_createHashHistory___default.a); + + /***/ + }, + /* 610 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + var _warning = __webpack_require__(47); + + var _warning2 = _interopRequireDefault(_warning); + + var _invariant = __webpack_require__(14); + + var _invariant2 = _interopRequireDefault(_invariant); + + var _ExecutionEnvironment = __webpack_require__(173); + + var _DOMUtils = __webpack_require__(112); + + var _HashProtocol = __webpack_require__(611); + + var HashProtocol = _interopRequireWildcard(_HashProtocol); + + var _createHistory = __webpack_require__(172); + + var _createHistory2 = _interopRequireDefault(_createHistory); + + function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; + } + } + newObj.default = obj; + return newObj; + } + } + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + var DefaultQueryKey = '_k'; + + var addLeadingSlash = function addLeadingSlash(path) { + return path.charAt(0) === '/' ? path : '/' + path; + }; + + var HashPathCoders = { + hashbang: { + encodePath: function encodePath(path) { + return path.charAt(0) === '!' ? path : '!' + path; + }, + decodePath: function decodePath(path) { + return path.charAt(0) === '!' ? path.substring(1) : path; + }, + }, + noslash: { + encodePath: function encodePath(path) { + return path.charAt(0) === '/' ? path.substring(1) : path; + }, + decodePath: addLeadingSlash, + }, + slash: { + encodePath: addLeadingSlash, + decodePath: addLeadingSlash, + }, + }; + + var createHashHistory = function createHashHistory() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + + !_ExecutionEnvironment.canUseDOM + ? true + ? (0, _invariant2.default)(false, 'Hash history needs a DOM') + : (0, _invariant2.default)(false) + : void 0; + + var queryKey = options.queryKey, + hashType = options.hashType; + + true + ? (0, _warning2.default)( + queryKey !== false, + "Using { queryKey: false } no longer works. Instead, just don't " + + "use location state if you don't want a key in your URL query string", + ) + : void 0; + + if (typeof queryKey !== 'string') queryKey = DefaultQueryKey; + + if (hashType == null) hashType = 'slash'; + + if (!(hashType in HashPathCoders)) { + true ? (0, _warning2.default)(false, 'Invalid hash type: %s', hashType) : void 0; + + hashType = 'slash'; + } + + var pathCoder = HashPathCoders[hashType]; + + var getUserConfirmation = HashProtocol.getUserConfirmation; + + var getCurrentLocation = function getCurrentLocation() { + return HashProtocol.getCurrentLocation(pathCoder, queryKey); + }; + + var pushLocation = function pushLocation(location) { + return HashProtocol.pushLocation(location, pathCoder, queryKey); + }; + + var replaceLocation = function replaceLocation(location) { + return HashProtocol.replaceLocation(location, pathCoder, queryKey); + }; + + var history = (0, _createHistory2.default)( + _extends( + { + getUserConfirmation: getUserConfirmation, + }, + options, + { + getCurrentLocation: getCurrentLocation, + pushLocation: pushLocation, + replaceLocation: replaceLocation, + go: HashProtocol.go, + }, + ), + ); + + var listenerCount = 0, + stopListener = void 0; + + var startListener = function startListener(listener, before) { + if (++listenerCount === 1) + stopListener = HashProtocol.startListener(history.transitionTo, pathCoder, queryKey); + + var unlisten = before ? history.listenBefore(listener) : history.listen(listener); + + return function () { + unlisten(); + + if (--listenerCount === 0) stopListener(); + }; + }; + + var listenBefore = function listenBefore(listener) { + return startListener(listener, true); + }; + + var listen = function listen(listener) { + return startListener(listener, false); + }; + + var goIsSupportedWithoutReload = (0, _DOMUtils.supportsGoWithoutReloadUsingHash)(); + + var go = function go(n) { + true + ? (0, _warning2.default)( + goIsSupportedWithoutReload, + 'Hash history go(n) causes a full page reload in this browser', + ) + : void 0; + + history.go(n); + }; + + var createHref = function createHref(path) { + return '#' + pathCoder.encodePath(history.createHref(path)); + }; + + return _extends({}, history, { + listenBefore: listenBefore, + listen: listen, + go: go, + createHref: createHref, + }); + }; + + exports.default = createHashHistory; + + /***/ + }, + /* 611 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + exports.replaceLocation = + exports.pushLocation = + exports.startListener = + exports.getCurrentLocation = + exports.go = + exports.getUserConfirmation = + undefined; + + var _BrowserProtocol = __webpack_require__(174); + + Object.defineProperty(exports, 'getUserConfirmation', { + enumerable: true, + get: function get() { + return _BrowserProtocol.getUserConfirmation; + }, + }); + Object.defineProperty(exports, 'go', { + enumerable: true, + get: function get() { + return _BrowserProtocol.go; + }, + }); + + var _warning = __webpack_require__(47); + + var _warning2 = _interopRequireDefault(_warning); + + var _LocationUtils = __webpack_require__(73); + + var _DOMUtils = __webpack_require__(112); + + var _DOMStateStorage = __webpack_require__(263); + + var _PathUtils = __webpack_require__(49); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + var HashChangeEvent = 'hashchange'; + + var getHashPath = function getHashPath() { + // We can't use window.location.hash here because it's not + // consistent across browsers - Firefox will pre-decode it! + var href = window.location.href; + var hashIndex = href.indexOf('#'); + return hashIndex === -1 ? '' : href.substring(hashIndex + 1); + }; + + var pushHashPath = function pushHashPath(path) { + return (window.location.hash = path); + }; + + var replaceHashPath = function replaceHashPath(path) { + var hashIndex = window.location.href.indexOf('#'); + + window.location.replace(window.location.href.slice(0, hashIndex >= 0 ? hashIndex : 0) + '#' + path); + }; + + var getCurrentLocation = (exports.getCurrentLocation = function getCurrentLocation( + pathCoder, + queryKey, + ) { + var path = pathCoder.decodePath(getHashPath()); + var key = (0, _PathUtils.getQueryStringValueFromPath)(path, queryKey); + + var state = void 0; + if (key) { + path = (0, _PathUtils.stripQueryStringValueFromPath)(path, queryKey); + state = (0, _DOMStateStorage.readState)(key); + } + + var init = (0, _PathUtils.parsePath)(path); + init.state = state; + + return (0, _LocationUtils.createLocation)(init, undefined, key); + }); + + var prevLocation = void 0; + + var startListener = (exports.startListener = function startListener(listener, pathCoder, queryKey) { + var handleHashChange = function handleHashChange() { + var path = getHashPath(); + var encodedPath = pathCoder.encodePath(path); + + if (path !== encodedPath) { + // Always be sure we have a properly-encoded hash. + replaceHashPath(encodedPath); + } else { + var currentLocation = getCurrentLocation(pathCoder, queryKey); + + if (prevLocation && currentLocation.key && prevLocation.key === currentLocation.key) return; // Ignore extraneous hashchange events + + prevLocation = currentLocation; + + listener(currentLocation); + } + }; + + // Ensure the hash is encoded properly. + var path = getHashPath(); + var encodedPath = pathCoder.encodePath(path); + + if (path !== encodedPath) replaceHashPath(encodedPath); + + (0, _DOMUtils.addEventListener)(window, HashChangeEvent, handleHashChange); + + return function () { + return (0, _DOMUtils.removeEventListener)(window, HashChangeEvent, handleHashChange); + }; + }); + + var updateLocation = function updateLocation(location, pathCoder, queryKey, updateHash) { + var state = location.state, + key = location.key; + + var path = pathCoder.encodePath((0, _PathUtils.createPath)(location)); + + if (state !== undefined) { + path = (0, _PathUtils.addQueryStringValueToPath)(path, queryKey, key); + (0, _DOMStateStorage.saveState)(key, state); + } + + prevLocation = location; + + updateHash(path); + }; + + var pushLocation = (exports.pushLocation = function pushLocation(location, pathCoder, queryKey) { + return updateLocation(location, pathCoder, queryKey, function (path) { + if (getHashPath() !== path) { + pushHashPath(path); + } else { + true ? (0, _warning2.default)(false, 'You cannot PUSH the same path using hash history') : void 0; + } + }); + }); + + var replaceLocation = (exports.replaceLocation = function replaceLocation( + location, + pathCoder, + queryKey, + ) { + return updateLocation(location, pathCoder, queryKey, function (path) { + if (getHashPath() !== path) replaceHashPath(path); + }); + }); + + /***/ + }, + /* 612 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_router__ = __webpack_require__(85); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__components_RouterLayout__ = + __webpack_require__(613); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__components_RouterFirstPage__ = + __webpack_require__(614); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__components_RouterSecondPage__ = + __webpack_require__(615); + + var _default = __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_1_react_router__['b' /* Route */], + { + path: 'react_router', + component: __WEBPACK_IMPORTED_MODULE_2__components_RouterLayout__['a' /* default */], + }, + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_1_react_router__['b' /* Route */], + { + path: 'first_page', + component: __WEBPACK_IMPORTED_MODULE_3__components_RouterFirstPage__['a' /* default */], + }, + ), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_1_react_router__['b' /* Route */], + { + path: 'second_page', + component: __WEBPACK_IMPORTED_MODULE_4__components_RouterSecondPage__['a' /* default */], + }, + ), + ); + + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/routes/routes.jsx', + ); + })(); + + /***/ + }, + /* 613 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(10); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_router__ = __webpack_require__(85); + + var RouterLayout = function RouterLayout(_ref) { + var children = _ref.children; + return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'div', + { className: 'container' }, + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('h1', null, 'React Router is working!'), + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'p', + null, + 'Woohoo, we can use ', + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('code', null, 'react-router'), + ' here!', + ), + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'ul', + null, + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'li', + null, + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_2_react_router__['a' /* Link */], + { to: '/react_router' }, + 'React Router Layout Only', + ), + ), + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'li', + null, + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_2_react_router__['a' /* Link */], + { to: '/react_router/first_page' }, + 'Router First Page', + ), + ), + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'li', + null, + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_2_react_router__['a' /* Link */], + { to: '/react_router/second_page' }, + 'Router Second Page', + ), + ), + ), + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('hr', null), + children, + ); + }; + + RouterLayout.propTypes = { + children: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object, + }; + + var _default = RouterLayout; + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + RouterLayout, + 'RouterLayout', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/RouterLayout.jsx', + ); + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/RouterLayout.jsx', + ); + })(); + + /***/ + }, + /* 614 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + + var RouterFirstPage = function RouterFirstPage() { + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'div', + { className: 'container' }, + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('h2', null, 'React Router First Page'), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'p', + null, + 'This page brought to you by React Router', + ), + ); + }; + + var _default = RouterFirstPage; + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + RouterFirstPage, + 'RouterFirstPage', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/RouterFirstPage.jsx', + ); + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/RouterFirstPage.jsx', + ); + })(); + + /***/ + }, + /* 615 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + + var RouterSecondPage = function RouterSecondPage() { + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'div', + { className: 'container' }, + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('h2', null, 'React Router Second Page'), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'p', + null, + 'This page brought to you by React Router', + ), + ); + }; + + var _default = RouterSecondPage; + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + RouterSecondPage, + 'RouterSecondPage', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/RouterSecondPage.jsx', + ); + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/RouterSecondPage.jsx', + ); + })(); + + /***/ + }, + /* 616 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + /* eslint-disable react/prop-types */ + + var _default = function _default(props) { + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('h1', null, props.title); + }; + + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/PureComponent.jsx', + ); + })(); + + /***/ + }, + /* 617 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__CssModulesImagesFontsExample_scss__ = + __webpack_require__(618); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__CssModulesImagesFontsExample_scss___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__CssModulesImagesFontsExample_scss__); + /* eslint-disable react/prop-types */ + + var _default = function _default(_props, _railsContext) { + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'div', + null, + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'h1', + { className: __WEBPACK_IMPORTED_MODULE_1__CssModulesImagesFontsExample_scss___default.a.heading }, + 'This should be open sans light', + ), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'div', + null, + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'h2', + null, + 'Last Call (relative path)', + ), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div', { + className: __WEBPACK_IMPORTED_MODULE_1__CssModulesImagesFontsExample_scss___default.a.lastCall, + }), + ), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'div', + null, + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('h2', null, 'Check (URL encoded)'), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div', { + className: __WEBPACK_IMPORTED_MODULE_1__CssModulesImagesFontsExample_scss___default.a.check, + }), + ), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'div', + null, + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'h2', + null, + 'Rails on Maui Logo (absolute path)', + ), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div', { + className: + __WEBPACK_IMPORTED_MODULE_1__CssModulesImagesFontsExample_scss___default.a.railsOnMaui, + }), + ), + ); + }; + + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/CssModulesImagesFontsExample.jsx', + ); + })(); + + /***/ + }, + /* 618 */ + /***/ function (module, exports) { + module.exports = { + heading: 'CssModulesImagesFontsExample__heading__2GwOW', + check: 'CssModulesImagesFontsExample__check__Fa5t1', + lastCall: 'CssModulesImagesFontsExample__lastCall__2o_LE', + railsOnMaui: 'CssModulesImagesFontsExample__railsOnMaui__3s9ht', + }; + + /***/ + }, + /* 619 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_redux__ = __webpack_require__(110); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_redux_thunk__ = __webpack_require__(250); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__reducers_reducersIndex__ = + __webpack_require__(251); + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + /* + * Export a function that takes the props and returns a Redux store + * This is used so that 2 components can have the same store. + */ + + var _default = function _default(props, railsContext) { + var combinedReducer = Object(__WEBPACK_IMPORTED_MODULE_0_redux__['c' /* combineReducers */])( + __WEBPACK_IMPORTED_MODULE_2__reducers_reducersIndex__['a' /* default */], + ); + var newProps = _extends({}, props, { railsContext: railsContext }); + return Object(__WEBPACK_IMPORTED_MODULE_0_redux__['a' /* applyMiddleware */])( + __WEBPACK_IMPORTED_MODULE_1_redux_thunk__['a' /* default */], + )(__WEBPACK_IMPORTED_MODULE_0_redux__['d' /* createStore */])(combinedReducer, newProps); + }; + + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/stores/SharedReduxStore.jsx', + ); + })(); + + /***/ + }, + /* 620 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_router__ = __webpack_require__(85); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__components_DeferredRender__ = + __webpack_require__(621); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__components_DeferredRenderAsyncPage__ = + __webpack_require__(622); + + var DeferredRenderAppServer = function DeferredRenderAppServer(_props, railsContext) { + var error = void 0; + var redirectLocation = void 0; + var routerProps = void 0; + + var location = railsContext.location; + + var routes = { + path: '/deferred_render_with_server_rendering', + component: __WEBPACK_IMPORTED_MODULE_2__components_DeferredRender__['a' /* default */], + childRoutes: [ + { + path: '/deferred_render_with_server_rendering/async_page', + component: __WEBPACK_IMPORTED_MODULE_3__components_DeferredRenderAsyncPage__['a' /* default */], + }, + ], + }; + + // Unlike the match in DeferredRenderAppRenderer, this match is always + // syncronous because we directly require all the routes. Do not do anything + // asyncronous in code that will run on the server. + Object(__WEBPACK_IMPORTED_MODULE_1_react_router__['d' /* match */])( + { location: location, routes: routes }, + function (_error, _redirectLocation, _routerProps) { + error = _error; + redirectLocation = _redirectLocation; + routerProps = _routerProps; + }, + ); + + if (error || redirectLocation) { + return { error: error, redirectLocation: redirectLocation }; + } + + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_1_react_router__['c' /* RouterContext */], + routerProps, + ); + }; + + var _default = DeferredRenderAppServer; + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + DeferredRenderAppServer, + 'DeferredRenderAppServer', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/startup/DeferredRenderAppServer.jsx', + ); + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/startup/DeferredRenderAppServer.jsx', + ); + })(); + + /***/ + }, + /* 621 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(10); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_router__ = __webpack_require__(85); + + var DeferredRender = function DeferredRender(_ref) { + var children = _ref.children; + return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'div', + null, + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('h1', null, 'Deferred Rendering'), + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'p', + null, + "Here, we're testing async routes with server rendering. By deferring the initial render, we can prevent a client/server checksum mismatch error.", + ), + children || + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'p', + null, + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_2_react_router__['a' /* Link */], + { to: '/deferred_render_with_server_rendering/async_page' }, + 'Test Async Route', + ), + ), + ); + }; + + DeferredRender.propTypes = { + children: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.node, + }; + + var _default = DeferredRender; + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + DeferredRender, + 'DeferredRender', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/DeferredRender.jsx', + ); + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/DeferredRender.jsx', + ); + })(); + + /***/ + }, + /* 622 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + + var DeferredRenderAsyncPage = function DeferredRenderAsyncPage() { + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'div', + null, + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('p', null, 'Noice! It works.'), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'p', + null, + "Now, try reloading this page and looking at the developer console. There shouldn't be any client/server mismatch error from React.", + ), + ); + }; + + var _default = DeferredRenderAsyncPage; + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + DeferredRenderAsyncPage, + 'DeferredRenderAsyncPage', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/DeferredRenderAsyncPage.jsx', + ); + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/DeferredRenderAsyncPage.jsx', + ); + })(); + + /***/ + }, + /* 623 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_dom_server__ = __webpack_require__(108); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_dom_server___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_react_dom_server__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__components_EchoProps__ = __webpack_require__(624); + // Top level component for simple client side only rendering + + /* + * Export a function that takes the props and returns an object with { renderedHtml } + * Note, this is imported as "RenderedHtml" by "serverRegistration.jsx" + * + * Note, this is a fictional example, as you'd only use a generator function if you wanted to run + * some extra code, such as setting up Redux and React-Router. + * + * And the use of renderToString would probably be done with react-router v4 + * + */ + + var _default = function _default(props, _railsContext) { + var renderedHtml = Object(__WEBPACK_IMPORTED_MODULE_1_react_dom_server__['renderToString'])( + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_2__components_EchoProps__['a' /* default */], + props, + ), + ); + return { renderedHtml: renderedHtml }; + }; + + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/startup/ServerRenderedHtml.jsx', + ); + })(); + + /***/ + }, + /* 624 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + + var EchoProps = function EchoProps(props) { + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'div', + null, + 'Props: ', + JSON.stringify(props), + ); + }; + + var _default = EchoProps; + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + EchoProps, + 'EchoProps', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/EchoProps.jsx', + ); + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/EchoProps.jsx', + ); + })(); + + /***/ + }, + /* 625 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_dom_server__ = __webpack_require__(108); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_dom_server___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_react_dom_server__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_helmet__ = __webpack_require__(265); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_helmet___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_2_react_helmet__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__components_ReactHelmet__ = + __webpack_require__(630); + // Top level component for simple client side only rendering + + /* + * Export a function that takes the props and returns an object with { renderedHtml } + * This example shows returning renderedHtml as an object itself that contains rendered + * component markup and additional HTML strings. + * + * This is imported as "ReactHelmetApp" by "serverRegistration.jsx". Note that rendered + * component markup must go under "componentHtml" key. + */ + + var _default = function _default(props, _railsContext) { + var componentHtml = Object(__WEBPACK_IMPORTED_MODULE_1_react_dom_server__['renderToString'])( + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_3__components_ReactHelmet__['a' /* default */], + props, + ), + ); + var helmet = __WEBPACK_IMPORTED_MODULE_2_react_helmet__['Helmet'].renderStatic(); + + var renderedHtml = { + componentHtml: componentHtml, + title: helmet.title.toString(), + }; + return { renderedHtml: renderedHtml }; + }; + + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/startup/ReactHelmetServerApp.jsx', + ); + })(); + + /***/ + }, + /* 626 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + function _interopDefault(ex) { + return ex && typeof ex === 'object' && 'default' in ex ? ex['default'] : ex; + } + + var React = __webpack_require__(1); + var React__default = _interopDefault(React); + var shallowEqual = _interopDefault(__webpack_require__(627)); + + 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 _inheritsLoose(subClass, superClass) { + subClass.prototype = Object.create(superClass.prototype); + subClass.prototype.constructor = subClass; + subClass.__proto__ = superClass; + } + + var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement); + function withSideEffect(reducePropsToState, handleStateChangeOnClient, mapStateOnServer) { + if (typeof reducePropsToState !== 'function') { + throw new Error('Expected reducePropsToState to be a function.'); + } + + if (typeof handleStateChangeOnClient !== 'function') { + throw new Error('Expected handleStateChangeOnClient to be a function.'); + } + + if (typeof mapStateOnServer !== 'undefined' && typeof mapStateOnServer !== 'function') { + throw new Error('Expected mapStateOnServer to either be undefined or a function.'); + } + + function getDisplayName(WrappedComponent) { + return WrappedComponent.displayName || WrappedComponent.name || 'Component'; + } + + return function wrap(WrappedComponent) { + if (typeof WrappedComponent !== 'function') { + throw new Error('Expected WrappedComponent to be a React component.'); + } + + var mountedInstances = []; + var state; + + function emitChange() { + state = reducePropsToState( + mountedInstances.map(function (instance) { + return instance.props; + }), + ); + + if (SideEffect.canUseDOM) { + handleStateChangeOnClient(state); + } else if (mapStateOnServer) { + state = mapStateOnServer(state); + } + } + + var SideEffect = + /*#__PURE__*/ + (function (_Component) { + _inheritsLoose(SideEffect, _Component); + + function SideEffect() { + return _Component.apply(this, arguments) || this; + } + + // Try to use displayName of wrapped component + // Expose canUseDOM so tests can monkeypatch it + SideEffect.peek = function peek() { + return state; + }; + + SideEffect.rewind = function rewind() { + if (SideEffect.canUseDOM) { + throw new Error( + 'You may only call rewind() on the server. Call peek() to read the current state.', + ); + } + + var recordedState = state; + state = undefined; + mountedInstances = []; + return recordedState; + }; + + var _proto = SideEffect.prototype; + + _proto.shouldComponentUpdate = function shouldComponentUpdate(nextProps) { + return !shallowEqual(nextProps, this.props); + }; + + _proto.componentWillMount = function componentWillMount() { + mountedInstances.push(this); + emitChange(); + }; + + _proto.componentDidUpdate = function componentDidUpdate() { + emitChange(); + }; + + _proto.componentWillUnmount = function componentWillUnmount() { + var index = mountedInstances.indexOf(this); + mountedInstances.splice(index, 1); + emitChange(); + }; + + _proto.render = function render() { + return React__default.createElement(WrappedComponent, this.props); + }; + + return SideEffect; + })(React.Component); + + _defineProperty(SideEffect, 'displayName', 'SideEffect(' + getDisplayName(WrappedComponent) + ')'); + + _defineProperty(SideEffect, 'canUseDOM', canUseDOM); + + return SideEffect; + }; + } + + module.exports = withSideEffect; + + /***/ + }, + /* 627 */ + /***/ function (module, exports) { + // + + module.exports = function shallowEqual(objA, objB, compare, compareContext) { + var ret = compare ? compare.call(compareContext, objA, objB) : void 0; + + if (ret !== void 0) { + return !!ret; + } + + if (objA === objB) { + return true; + } + + if (typeof objA !== 'object' || !objA || typeof objB !== 'object' || !objB) { + return false; + } + + var keysA = Object.keys(objA); + var keysB = Object.keys(objB); + + if (keysA.length !== keysB.length) { + return false; + } + + var bHasOwnProperty = Object.prototype.hasOwnProperty.bind(objB); + + // Test for A's keys different from B. + for (var idx = 0; idx < keysA.length; idx++) { + var key = keysA[idx]; + + if (!bHasOwnProperty(key)) { + return false; + } + + var valueA = objA[key]; + var valueB = objB[key]; + + ret = compare ? compare.call(compareContext, valueA, valueB, key) : void 0; + + if (ret === false || (ret === void 0 && valueA !== valueB)) { + return false; + } + } + + return true; + }; + + /***/ + }, + /* 628 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var isArray = Array.isArray; + var keyList = Object.keys; + var hasProp = Object.prototype.hasOwnProperty; + var hasElementType = typeof Element !== 'undefined'; + + function equal(a, b) { + // fast-deep-equal index.js 2.0.1 + if (a === b) return true; + + if (a && b && typeof a == 'object' && typeof b == 'object') { + var arrA = isArray(a), + arrB = isArray(b), + i, + length, + key; + + if (arrA && arrB) { + length = a.length; + if (length != b.length) return false; + for (i = length; i-- !== 0; ) if (!equal(a[i], b[i])) return false; + return true; + } + + if (arrA != arrB) return false; + + var dateA = a instanceof Date, + dateB = b instanceof Date; + if (dateA != dateB) return false; + if (dateA && dateB) return a.getTime() == b.getTime(); + + var regexpA = a instanceof RegExp, + regexpB = b instanceof RegExp; + if (regexpA != regexpB) return false; + if (regexpA && regexpB) return a.toString() == b.toString(); + + var keys = keyList(a); + length = keys.length; + + if (length !== keyList(b).length) return false; + + for (i = length; i-- !== 0; ) if (!hasProp.call(b, keys[i])) return false; + // end fast-deep-equal + + // start react-fast-compare + // custom handling for DOM elements + if (hasElementType && a instanceof Element && b instanceof Element) return a === b; + + // custom handling for React + for (i = length; i-- !== 0; ) { + key = keys[i]; + if (key === '_owner' && a.$$typeof) { + // React-specific: avoid traversing React elements' _owner. + // _owner contains circular references + // and is not needed when comparing the actual elements (and not their owners) + // .$$typeof and ._store on just reasonable markers of a react element + continue; + } else { + // all other properties should be traversed as usual + if (!equal(a[key], b[key])) return false; + } + } + // end react-fast-compare + + // fast-deep-equal index.js 2.0.1 + return true; + } + + return a !== a && b !== b; + } + // end fast-deep-equal + + module.exports = function exportedEqual(a, b) { + try { + return equal(a, b); + } catch (error) { + if ((error.message && error.message.match(/stack|recursion/i)) || error.number === -2146828260) { + // warn on circular references, don't crash + // browsers give this different errors name and messages: + // chrome/safari: "RangeError", "Maximum call stack size exceeded" + // firefox: "InternalError", too much recursion" + // edge: "Error", "Out of stack space" + console.warn( + 'Warning: react-fast-compare does not handle circular references.', + error.name, + error.message, + ); + return false; + } + // some other error. we should definitely know about these + throw error; + } + }; + + /***/ + }, + /* 629 */ + /***/ function (module, exports, __webpack_require__) { + /* WEBPACK VAR INJECTION */ (function (global) { + exports.__esModule = true; + exports.warn = + exports.requestAnimationFrame = + exports.reducePropsToState = + exports.mapStateOnServer = + exports.handleClientStateChange = + exports.convertReactPropstoHtmlAttributes = + undefined; + + var _typeof = + typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' + ? function (obj) { + return typeof obj; + } + : function (obj) { + return obj && + typeof Symbol === 'function' && + obj.constructor === Symbol && + obj !== Symbol.prototype + ? 'symbol' + : typeof obj; + }; + + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + var _react = __webpack_require__(1); + + var _react2 = _interopRequireDefault(_react); + + var _objectAssign = __webpack_require__(64); + + var _objectAssign2 = _interopRequireDefault(_objectAssign); + + var _HelmetConstants = __webpack_require__(266); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + var encodeSpecialCharacters = function encodeSpecialCharacters(str) { + var encode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + + if (encode === false) { + return String(str); + } + + return String(str) + .replace(/&/g, '&') + .replace(/</g, '<') + .replace(/>/g, '>') + .replace(/"/g, '"') + .replace(/'/g, '''); + }; + + var getTitleFromPropsList = function getTitleFromPropsList(propsList) { + var innermostTitle = getInnermostProperty(propsList, _HelmetConstants.TAG_NAMES.TITLE); + var innermostTemplate = getInnermostProperty( + propsList, + _HelmetConstants.HELMET_PROPS.TITLE_TEMPLATE, + ); + + if (innermostTemplate && innermostTitle) { + // use function arg to avoid need to escape $ characters + return innermostTemplate.replace(/%s/g, function () { + return innermostTitle; + }); + } + + var innermostDefaultTitle = getInnermostProperty( + propsList, + _HelmetConstants.HELMET_PROPS.DEFAULT_TITLE, + ); + + return innermostTitle || innermostDefaultTitle || undefined; + }; + + var getOnChangeClientState = function getOnChangeClientState(propsList) { + return ( + getInnermostProperty(propsList, _HelmetConstants.HELMET_PROPS.ON_CHANGE_CLIENT_STATE) || + function () {} + ); + }; + + var getAttributesFromPropsList = function getAttributesFromPropsList(tagType, propsList) { + return propsList + .filter(function (props) { + return typeof props[tagType] !== 'undefined'; + }) + .map(function (props) { + return props[tagType]; + }) + .reduce(function (tagAttrs, current) { + return _extends({}, tagAttrs, current); + }, {}); + }; + + var getBaseTagFromPropsList = function getBaseTagFromPropsList(primaryAttributes, propsList) { + return propsList + .filter(function (props) { + return typeof props[_HelmetConstants.TAG_NAMES.BASE] !== 'undefined'; + }) + .map(function (props) { + return props[_HelmetConstants.TAG_NAMES.BASE]; + }) + .reverse() + .reduce(function (innermostBaseTag, tag) { + if (!innermostBaseTag.length) { + var keys = Object.keys(tag); + + for (var i = 0; i < keys.length; i++) { + var attributeKey = keys[i]; + var lowerCaseAttributeKey = attributeKey.toLowerCase(); + + if (primaryAttributes.indexOf(lowerCaseAttributeKey) !== -1 && tag[lowerCaseAttributeKey]) { + return innermostBaseTag.concat(tag); + } + } + } + + return innermostBaseTag; + }, []); + }; + + var getTagsFromPropsList = function getTagsFromPropsList(tagName, primaryAttributes, propsList) { + // Calculate list of tags, giving priority innermost component (end of the propslist) + var approvedSeenTags = {}; + + return propsList + .filter(function (props) { + if (Array.isArray(props[tagName])) { + return true; + } + if (typeof props[tagName] !== 'undefined') { + warn( + 'Helmet: ' + + tagName + + ' should be of type "Array". Instead found type "' + + _typeof(props[tagName]) + + '"', + ); + } + return false; + }) + .map(function (props) { + return props[tagName]; + }) + .reverse() + .reduce(function (approvedTags, instanceTags) { + var instanceSeenTags = {}; + + instanceTags + .filter(function (tag) { + var primaryAttributeKey = void 0; + var keys = Object.keys(tag); + for (var i = 0; i < keys.length; i++) { + var attributeKey = keys[i]; + var lowerCaseAttributeKey = attributeKey.toLowerCase(); + + // Special rule with link tags, since rel and href are both primary tags, rel takes priority + if ( + primaryAttributes.indexOf(lowerCaseAttributeKey) !== -1 && + !( + primaryAttributeKey === _HelmetConstants.TAG_PROPERTIES.REL && + tag[primaryAttributeKey].toLowerCase() === 'canonical' + ) && + !( + lowerCaseAttributeKey === _HelmetConstants.TAG_PROPERTIES.REL && + tag[lowerCaseAttributeKey].toLowerCase() === 'stylesheet' + ) + ) { + primaryAttributeKey = lowerCaseAttributeKey; + } + // Special case for innerHTML which doesn't work lowercased + if ( + primaryAttributes.indexOf(attributeKey) !== -1 && + (attributeKey === _HelmetConstants.TAG_PROPERTIES.INNER_HTML || + attributeKey === _HelmetConstants.TAG_PROPERTIES.CSS_TEXT || + attributeKey === _HelmetConstants.TAG_PROPERTIES.ITEM_PROP) + ) { + primaryAttributeKey = attributeKey; + } + } + + if (!primaryAttributeKey || !tag[primaryAttributeKey]) { + return false; + } + + var value = tag[primaryAttributeKey].toLowerCase(); + + if (!approvedSeenTags[primaryAttributeKey]) { + approvedSeenTags[primaryAttributeKey] = {}; + } + + if (!instanceSeenTags[primaryAttributeKey]) { + instanceSeenTags[primaryAttributeKey] = {}; + } + + if (!approvedSeenTags[primaryAttributeKey][value]) { + instanceSeenTags[primaryAttributeKey][value] = true; + return true; + } + + return false; + }) + .reverse() + .forEach(function (tag) { + return approvedTags.push(tag); + }); + + // Update seen tags with tags from this instance + var keys = Object.keys(instanceSeenTags); + for (var i = 0; i < keys.length; i++) { + var attributeKey = keys[i]; + var tagUnion = (0, _objectAssign2.default)( + {}, + approvedSeenTags[attributeKey], + instanceSeenTags[attributeKey], + ); + + approvedSeenTags[attributeKey] = tagUnion; + } + + return approvedTags; + }, []) + .reverse(); + }; + + var getInnermostProperty = function getInnermostProperty(propsList, property) { + for (var i = propsList.length - 1; i >= 0; i--) { + var props = propsList[i]; + + if (props.hasOwnProperty(property)) { + return props[property]; + } + } + + return null; + }; + + var reducePropsToState = function reducePropsToState(propsList) { + return { + baseTag: getBaseTagFromPropsList([_HelmetConstants.TAG_PROPERTIES.HREF], propsList), + bodyAttributes: getAttributesFromPropsList(_HelmetConstants.ATTRIBUTE_NAMES.BODY, propsList), + defer: getInnermostProperty(propsList, _HelmetConstants.HELMET_PROPS.DEFER), + encode: getInnermostProperty(propsList, _HelmetConstants.HELMET_PROPS.ENCODE_SPECIAL_CHARACTERS), + htmlAttributes: getAttributesFromPropsList(_HelmetConstants.ATTRIBUTE_NAMES.HTML, propsList), + linkTags: getTagsFromPropsList( + _HelmetConstants.TAG_NAMES.LINK, + [_HelmetConstants.TAG_PROPERTIES.REL, _HelmetConstants.TAG_PROPERTIES.HREF], + propsList, + ), + metaTags: getTagsFromPropsList( + _HelmetConstants.TAG_NAMES.META, + [ + _HelmetConstants.TAG_PROPERTIES.NAME, + _HelmetConstants.TAG_PROPERTIES.CHARSET, + _HelmetConstants.TAG_PROPERTIES.HTTPEQUIV, + _HelmetConstants.TAG_PROPERTIES.PROPERTY, + _HelmetConstants.TAG_PROPERTIES.ITEM_PROP, + ], + propsList, + ), + noscriptTags: getTagsFromPropsList( + _HelmetConstants.TAG_NAMES.NOSCRIPT, + [_HelmetConstants.TAG_PROPERTIES.INNER_HTML], + propsList, + ), + onChangeClientState: getOnChangeClientState(propsList), + scriptTags: getTagsFromPropsList( + _HelmetConstants.TAG_NAMES.SCRIPT, + [_HelmetConstants.TAG_PROPERTIES.SRC, _HelmetConstants.TAG_PROPERTIES.INNER_HTML], + propsList, + ), + styleTags: getTagsFromPropsList( + _HelmetConstants.TAG_NAMES.STYLE, + [_HelmetConstants.TAG_PROPERTIES.CSS_TEXT], + propsList, + ), + title: getTitleFromPropsList(propsList), + titleAttributes: getAttributesFromPropsList(_HelmetConstants.ATTRIBUTE_NAMES.TITLE, propsList), + }; + }; + + var rafPolyfill = (function () { + var clock = Date.now(); + + return function (callback) { + var currentTime = Date.now(); + + if (currentTime - clock > 16) { + clock = currentTime; + callback(currentTime); + } else { + setTimeout(function () { + rafPolyfill(callback); + }, 0); + } + }; + })(); + + var cafPolyfill = function cafPolyfill(id) { + return clearTimeout(id); + }; + + var requestAnimationFrame = + typeof window !== 'undefined' + ? window.requestAnimationFrame || + window.webkitRequestAnimationFrame || + window.mozRequestAnimationFrame || + rafPolyfill + : global.requestAnimationFrame || rafPolyfill; + + var cancelAnimationFrame = + typeof window !== 'undefined' + ? window.cancelAnimationFrame || + window.webkitCancelAnimationFrame || + window.mozCancelAnimationFrame || + cafPolyfill + : global.cancelAnimationFrame || cafPolyfill; + + var warn = function warn(msg) { + return console && typeof console.warn === 'function' && console.warn(msg); + }; + + var _helmetCallback = null; + + var handleClientStateChange = function handleClientStateChange(newState) { + if (_helmetCallback) { + cancelAnimationFrame(_helmetCallback); + } + + if (newState.defer) { + _helmetCallback = requestAnimationFrame(function () { + commitTagChanges(newState, function () { + _helmetCallback = null; + }); + }); + } else { + commitTagChanges(newState); + _helmetCallback = null; + } + }; + + var commitTagChanges = function commitTagChanges(newState, cb) { + var baseTag = newState.baseTag, + bodyAttributes = newState.bodyAttributes, + htmlAttributes = newState.htmlAttributes, + linkTags = newState.linkTags, + metaTags = newState.metaTags, + noscriptTags = newState.noscriptTags, + onChangeClientState = newState.onChangeClientState, + scriptTags = newState.scriptTags, + styleTags = newState.styleTags, + title = newState.title, + titleAttributes = newState.titleAttributes; + + updateAttributes(_HelmetConstants.TAG_NAMES.BODY, bodyAttributes); + updateAttributes(_HelmetConstants.TAG_NAMES.HTML, htmlAttributes); + + updateTitle(title, titleAttributes); + + var tagUpdates = { + baseTag: updateTags(_HelmetConstants.TAG_NAMES.BASE, baseTag), + linkTags: updateTags(_HelmetConstants.TAG_NAMES.LINK, linkTags), + metaTags: updateTags(_HelmetConstants.TAG_NAMES.META, metaTags), + noscriptTags: updateTags(_HelmetConstants.TAG_NAMES.NOSCRIPT, noscriptTags), + scriptTags: updateTags(_HelmetConstants.TAG_NAMES.SCRIPT, scriptTags), + styleTags: updateTags(_HelmetConstants.TAG_NAMES.STYLE, styleTags), + }; + + var addedTags = {}; + var removedTags = {}; + + Object.keys(tagUpdates).forEach(function (tagType) { + var _tagUpdates$tagType = tagUpdates[tagType], + newTags = _tagUpdates$tagType.newTags, + oldTags = _tagUpdates$tagType.oldTags; + + if (newTags.length) { + addedTags[tagType] = newTags; + } + if (oldTags.length) { + removedTags[tagType] = tagUpdates[tagType].oldTags; + } + }); + + cb && cb(); + + onChangeClientState(newState, addedTags, removedTags); + }; + + var flattenArray = function flattenArray(possibleArray) { + return Array.isArray(possibleArray) ? possibleArray.join('') : possibleArray; + }; + + var updateTitle = function updateTitle(title, attributes) { + if (typeof title !== 'undefined' && document.title !== title) { + document.title = flattenArray(title); + } + + updateAttributes(_HelmetConstants.TAG_NAMES.TITLE, attributes); + }; + + var updateAttributes = function updateAttributes(tagName, attributes) { + var elementTag = document.getElementsByTagName(tagName)[0]; + + if (!elementTag) { + return; + } + + var helmetAttributeString = elementTag.getAttribute(_HelmetConstants.HELMET_ATTRIBUTE); + var helmetAttributes = helmetAttributeString ? helmetAttributeString.split(',') : []; + var attributesToRemove = [].concat(helmetAttributes); + var attributeKeys = Object.keys(attributes); + + for (var i = 0; i < attributeKeys.length; i++) { + var attribute = attributeKeys[i]; + var value = attributes[attribute] || ''; + + if (elementTag.getAttribute(attribute) !== value) { + elementTag.setAttribute(attribute, value); + } + + if (helmetAttributes.indexOf(attribute) === -1) { + helmetAttributes.push(attribute); + } + + var indexToSave = attributesToRemove.indexOf(attribute); + if (indexToSave !== -1) { + attributesToRemove.splice(indexToSave, 1); + } + } + + for (var _i = attributesToRemove.length - 1; _i >= 0; _i--) { + elementTag.removeAttribute(attributesToRemove[_i]); + } + + if (helmetAttributes.length === attributesToRemove.length) { + elementTag.removeAttribute(_HelmetConstants.HELMET_ATTRIBUTE); + } else if (elementTag.getAttribute(_HelmetConstants.HELMET_ATTRIBUTE) !== attributeKeys.join(',')) { + elementTag.setAttribute(_HelmetConstants.HELMET_ATTRIBUTE, attributeKeys.join(',')); + } + }; + + var updateTags = function updateTags(type, tags) { + var headElement = document.head || document.querySelector(_HelmetConstants.TAG_NAMES.HEAD); + var tagNodes = headElement.querySelectorAll(type + '[' + _HelmetConstants.HELMET_ATTRIBUTE + ']'); + var oldTags = Array.prototype.slice.call(tagNodes); + var newTags = []; + var indexToDelete = void 0; + + if (tags && tags.length) { + tags.forEach(function (tag) { + var newElement = document.createElement(type); + + for (var attribute in tag) { + if (tag.hasOwnProperty(attribute)) { + if (attribute === _HelmetConstants.TAG_PROPERTIES.INNER_HTML) { + newElement.innerHTML = tag.innerHTML; + } else if (attribute === _HelmetConstants.TAG_PROPERTIES.CSS_TEXT) { + if (newElement.styleSheet) { + newElement.styleSheet.cssText = tag.cssText; + } else { + newElement.appendChild(document.createTextNode(tag.cssText)); + } + } else { + var value = typeof tag[attribute] === 'undefined' ? '' : tag[attribute]; + newElement.setAttribute(attribute, value); + } + } + } + + newElement.setAttribute(_HelmetConstants.HELMET_ATTRIBUTE, 'true'); + + // Remove a duplicate tag from domTagstoRemove, so it isn't cleared. + if ( + oldTags.some(function (existingTag, index) { + indexToDelete = index; + return newElement.isEqualNode(existingTag); + }) + ) { + oldTags.splice(indexToDelete, 1); + } else { + newTags.push(newElement); + } + }); + } + + oldTags.forEach(function (tag) { + return tag.parentNode.removeChild(tag); + }); + newTags.forEach(function (tag) { + return headElement.appendChild(tag); + }); + + return { + oldTags: oldTags, + newTags: newTags, + }; + }; + + var generateElementAttributesAsString = function generateElementAttributesAsString(attributes) { + return Object.keys(attributes).reduce(function (str, key) { + var attr = typeof attributes[key] !== 'undefined' ? key + '="' + attributes[key] + '"' : '' + key; + return str ? str + ' ' + attr : attr; + }, ''); + }; + + var generateTitleAsString = function generateTitleAsString(type, title, attributes, encode) { + var attributeString = generateElementAttributesAsString(attributes); + var flattenedTitle = flattenArray(title); + return attributeString + ? '<' + + type + + ' ' + + _HelmetConstants.HELMET_ATTRIBUTE + + '="true" ' + + attributeString + + '>' + + encodeSpecialCharacters(flattenedTitle, encode) + + '</' + + type + + '>' + : '<' + + type + + ' ' + + _HelmetConstants.HELMET_ATTRIBUTE + + '="true">' + + encodeSpecialCharacters(flattenedTitle, encode) + + '</' + + type + + '>'; + }; + + var generateTagsAsString = function generateTagsAsString(type, tags, encode) { + return tags.reduce(function (str, tag) { + var attributeHtml = Object.keys(tag) + .filter(function (attribute) { + return !( + attribute === _HelmetConstants.TAG_PROPERTIES.INNER_HTML || + attribute === _HelmetConstants.TAG_PROPERTIES.CSS_TEXT + ); + }) + .reduce(function (string, attribute) { + var attr = + typeof tag[attribute] === 'undefined' + ? attribute + : attribute + '="' + encodeSpecialCharacters(tag[attribute], encode) + '"'; + return string ? string + ' ' + attr : attr; + }, ''); + + var tagContent = tag.innerHTML || tag.cssText || ''; + + var isSelfClosing = _HelmetConstants.SELF_CLOSING_TAGS.indexOf(type) === -1; + + return ( + str + + '<' + + type + + ' ' + + _HelmetConstants.HELMET_ATTRIBUTE + + '="true" ' + + attributeHtml + + (isSelfClosing ? '/>' : '>' + tagContent + '</' + type + '>') + ); + }, ''); + }; + + var convertElementAttributestoReactProps = function convertElementAttributestoReactProps(attributes) { + var initProps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + return Object.keys(attributes).reduce(function (obj, key) { + obj[_HelmetConstants.REACT_TAG_MAP[key] || key] = attributes[key]; + return obj; + }, initProps); + }; + + var convertReactPropstoHtmlAttributes = function convertReactPropstoHtmlAttributes(props) { + var initAttributes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + return Object.keys(props).reduce(function (obj, key) { + obj[_HelmetConstants.HTML_TAG_MAP[key] || key] = props[key]; + return obj; + }, initAttributes); + }; + + var generateTitleAsReactComponent = function generateTitleAsReactComponent(type, title, attributes) { + var _initProps; + + // assigning into an array to define toString function on it + var initProps = + ((_initProps = { + key: title, + }), + (_initProps[_HelmetConstants.HELMET_ATTRIBUTE] = true), + _initProps); + var props = convertElementAttributestoReactProps(attributes, initProps); + + return [_react2.default.createElement(_HelmetConstants.TAG_NAMES.TITLE, props, title)]; + }; + + var generateTagsAsReactComponent = function generateTagsAsReactComponent(type, tags) { + return tags.map(function (tag, i) { + var _mappedTag; + + var mappedTag = + ((_mappedTag = { + key: i, + }), + (_mappedTag[_HelmetConstants.HELMET_ATTRIBUTE] = true), + _mappedTag); + + Object.keys(tag).forEach(function (attribute) { + var mappedAttribute = _HelmetConstants.REACT_TAG_MAP[attribute] || attribute; + + if ( + mappedAttribute === _HelmetConstants.TAG_PROPERTIES.INNER_HTML || + mappedAttribute === _HelmetConstants.TAG_PROPERTIES.CSS_TEXT + ) { + var content = tag.innerHTML || tag.cssText; + mappedTag.dangerouslySetInnerHTML = { __html: content }; + } else { + mappedTag[mappedAttribute] = tag[attribute]; + } + }); + + return _react2.default.createElement(type, mappedTag); + }); + }; + + var getMethodsForTag = function getMethodsForTag(type, tags, encode) { + switch (type) { + case _HelmetConstants.TAG_NAMES.TITLE: + return { + toComponent: function toComponent() { + return generateTitleAsReactComponent(type, tags.title, tags.titleAttributes, encode); + }, + toString: function toString() { + return generateTitleAsString(type, tags.title, tags.titleAttributes, encode); + }, + }; + case _HelmetConstants.ATTRIBUTE_NAMES.BODY: + case _HelmetConstants.ATTRIBUTE_NAMES.HTML: + return { + toComponent: function toComponent() { + return convertElementAttributestoReactProps(tags); + }, + toString: function toString() { + return generateElementAttributesAsString(tags); + }, + }; + default: + return { + toComponent: function toComponent() { + return generateTagsAsReactComponent(type, tags); + }, + toString: function toString() { + return generateTagsAsString(type, tags, encode); + }, + }; + } + }; + + var mapStateOnServer = function mapStateOnServer(_ref) { + var baseTag = _ref.baseTag, + bodyAttributes = _ref.bodyAttributes, + encode = _ref.encode, + htmlAttributes = _ref.htmlAttributes, + linkTags = _ref.linkTags, + metaTags = _ref.metaTags, + noscriptTags = _ref.noscriptTags, + scriptTags = _ref.scriptTags, + styleTags = _ref.styleTags, + _ref$title = _ref.title, + title = _ref$title === undefined ? '' : _ref$title, + titleAttributes = _ref.titleAttributes; + return { + base: getMethodsForTag(_HelmetConstants.TAG_NAMES.BASE, baseTag, encode), + bodyAttributes: getMethodsForTag(_HelmetConstants.ATTRIBUTE_NAMES.BODY, bodyAttributes, encode), + htmlAttributes: getMethodsForTag(_HelmetConstants.ATTRIBUTE_NAMES.HTML, htmlAttributes, encode), + link: getMethodsForTag(_HelmetConstants.TAG_NAMES.LINK, linkTags, encode), + meta: getMethodsForTag(_HelmetConstants.TAG_NAMES.META, metaTags, encode), + noscript: getMethodsForTag(_HelmetConstants.TAG_NAMES.NOSCRIPT, noscriptTags, encode), + script: getMethodsForTag(_HelmetConstants.TAG_NAMES.SCRIPT, scriptTags, encode), + style: getMethodsForTag(_HelmetConstants.TAG_NAMES.STYLE, styleTags, encode), + title: getMethodsForTag( + _HelmetConstants.TAG_NAMES.TITLE, + { title: title, titleAttributes: titleAttributes }, + encode, + ), + }; + }; + + exports.convertReactPropstoHtmlAttributes = convertReactPropstoHtmlAttributes; + exports.handleClientStateChange = handleClientStateChange; + exports.mapStateOnServer = mapStateOnServer; + exports.reducePropsToState = reducePropsToState; + exports.requestAnimationFrame = requestAnimationFrame; + exports.warn = warn; + /* WEBPACK VAR INJECTION */ + }).call(exports, __webpack_require__(38)); + + /***/ + }, + /* 630 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_helmet__ = __webpack_require__(265); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_helmet___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_react_helmet__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__HelloWorld__ = __webpack_require__(162); + + var EchoProps = function EchoProps(props) { + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'div', + null, + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_1_react_helmet__['Helmet'], + null, + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('title', null, 'Custom page title'), + ), + 'Props: ', + JSON.stringify(props), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_2__HelloWorld__['a' /* default */], + props, + ), + ); + }; + + var _default = EchoProps; + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + EchoProps, + 'EchoProps', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/ReactHelmet.jsx', + ); + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/ReactHelmet.jsx', + ); + })(); + + /***/ + }, + /* 631 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__ImageExample__ = __webpack_require__(632); + /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, 'a', function () { + return __WEBPACK_IMPORTED_MODULE_0__ImageExample__['a']; + }); + + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + })(); + + /***/ + }, + /* 632 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(10); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__ImageExample_scss__ = __webpack_require__(633); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__ImageExample_scss___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__ImageExample_scss__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_images_256egghead_png__ = __webpack_require__(634); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_images_256egghead_png___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_images_256egghead_png__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__bower_png__ = __webpack_require__(635); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__bower_png___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_4__bower_png__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__blueprint_icon_svg__ = __webpack_require__(636); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__blueprint_icon_svg___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5__blueprint_icon_svg__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_images_lego_icon_svg__ = __webpack_require__(637); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_images_lego_icon_svg___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_images_lego_icon_svg__); + + // Note the global alias for images + + var TestComponent = function TestComponent(props) { + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'div', + null, + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'h1', + { className: __WEBPACK_IMPORTED_MODULE_2__ImageExample_scss___default.a.red }, + 'This is a test of CSS module color red.', + ), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('hr', null), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'h1', + { className: __WEBPACK_IMPORTED_MODULE_2__ImageExample_scss___default.a.background }, + 'Here is a label with a background-image from the CSS modules imported', + ), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('img', { + src: __WEBPACK_IMPORTED_MODULE_3_images_256egghead_png___default.a, + }), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('hr', null), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'h1', + { className: __WEBPACK_IMPORTED_MODULE_2__ImageExample_scss___default.a.backgroundSameDirectory }, + 'This label has a background image from the same directory. Below is an img tag in the same directory', + ), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('img', { + src: __WEBPACK_IMPORTED_MODULE_4__bower_png___default.a, + }), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('hr', null), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'h1', + null, + ' Below is an img tag of a svg in the same directory', + ), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('img', { + src: __WEBPACK_IMPORTED_MODULE_5__blueprint_icon_svg___default.a, + }), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('hr', null), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'h1', + null, + 'Below is a div with a background svg', + ), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div', { + className: __WEBPACK_IMPORTED_MODULE_2__ImageExample_scss___default.a.googleLogo, + }), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('hr', null), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'h1', + null, + 'SVG lego icon img tag with global path', + ), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('img', { + src: __WEBPACK_IMPORTED_MODULE_6_images_lego_icon_svg___default.a, + }), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('hr', null), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'h1', + null, + 'SVG lego icon with background image to global path', + ), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div', { + className: __WEBPACK_IMPORTED_MODULE_2__ImageExample_scss___default.a.legoIcon, + }), + ); + }; + + TestComponent.propTypes = { + message: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string, + }; + + var _default = TestComponent; + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + TestComponent, + 'TestComponent', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/ImageExample/ImageExample.js', + ); + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/ImageExample/ImageExample.js', + ); + })(); + + /***/ + }, + /* 633 */ + /***/ function (module, exports) { + module.exports = { + red: 'ImageExample__red__3ax2T', + background: 'ImageExample__background__2X-y3', + backgroundSameDirectory: 'ImageExample__backgroundSameDirectory__2Sn4F', + googleLogo: 'ImageExample__googleLogo__DoneW', + legoIcon: 'ImageExample__legoIcon__1AnHH', + }; + + /***/ + }, + /* 634 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = __webpack_require__.p + 'images/256egghead-0a0d6f5484f79e0ea2c2666cde44588c.png'; + + /***/ + }, + /* 635 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = __webpack_require__.p + 'images/bower-57ad2e565a98cf71ab6b0925ea211ea2.png'; + + /***/ + }, + /* 636 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = __webpack_require__.p + 'images/blueprint_icon-8e2f62bdd4e1cce1884907f5fafb6c61.svg'; + + /***/ + }, + /* 637 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = __webpack_require__.p + 'images/lego_icon-431dba39c343f8a5f0d8a7b890de4ad9.svg'; + + /***/ + }, + /* 638 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + + var SetTimeoutLoggingApp = function SetTimeoutLoggingApp(props) { + setTimeout(function () { + return console.error('*****TIMEOUT DONE!*****'); + }, 5000); + + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div', null, 'Called setTimeout.'); + }; + + var _default = SetTimeoutLoggingApp; + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + SetTimeoutLoggingApp, + 'SetTimeoutLoggingApp', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/startup/SetTimeoutLoggingApp.jsx', + ); + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/startup/SetTimeoutLoggingApp.jsx', + ); + })(); + + /***/ + }, + /* 639 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__components_ComponentWithLodash__ = + __webpack_require__(640); + + /* + * Export a function that returns a ReactComponent, depending on a store named SharedReduxStore. + * This is used for the client rendering hook after the page html is rendered. + * React will see that the state is the same and not do anything. + */ + + var _default = function _default() { + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_1__components_ComponentWithLodash__['a' /* default */], + null, + ); + }; + + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/startup/ComponentWithLodashApp.jsx', + ); + })(); + + /***/ + }, + /* 640 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_fp__ = __webpack_require__(641); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_fp___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_lodash_fp__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__index_scss__ = __webpack_require__(646); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__index_scss___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_2__index_scss__, + ); + + var _default = function _default() { + var paddedWord = __WEBPACK_IMPORTED_MODULE_1_lodash_fp___default.a.padStart(7)('works!'); + + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'div', + null, + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'h3', + { className: __WEBPACK_IMPORTED_MODULE_2__index_scss___default.a.message }, + 'Lodash still', + paddedWord, + ), + ); + }; + + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/ComponentWithLodash/index.jsx', + ); + })(); + + /***/ + }, + /* 641 */ + /***/ function (module, exports, __webpack_require__) { + var _ = __webpack_require__(642).runInContext(); + module.exports = __webpack_require__(643)(_, _); + + /***/ + }, + /* 642 */ + /***/ function (module, exports, __webpack_require__) { + /* WEBPACK VAR INJECTION */ (function (global, module) { + var __WEBPACK_AMD_DEFINE_RESULT__; /** + * @license + * Lodash lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE + */ + (function () { + function n(n, t, r) { + switch (r.length) { + case 0: + return n.call(t); + case 1: + return n.call(t, r[0]); + case 2: + return n.call(t, r[0], r[1]); + case 3: + return n.call(t, r[0], r[1], r[2]); + } + return n.apply(t, r); + } + function t(n, t, r, e) { + for (var u = -1, i = null == n ? 0 : n.length; ++u < i; ) { + var o = n[u]; + t(e, o, r(o), n); + } + return e; + } + function r(n, t) { + for (var r = -1, e = null == n ? 0 : n.length; ++r < e && false !== t(n[r], r, n); ); + return n; + } + function e(n, t) { + for (var r = null == n ? 0 : n.length; r-- && false !== t(n[r], r, n); ); + return n; + } + function u(n, t) { + for (var r = -1, e = null == n ? 0 : n.length; ++r < e; ) if (!t(n[r], r, n)) return false; + return true; + } + function i(n, t) { + for (var r = -1, e = null == n ? 0 : n.length, u = 0, i = []; ++r < e; ) { + var o = n[r]; + t(o, r, n) && (i[u++] = o); + } + return i; + } + function o(n, t) { + return !(null == n || !n.length) && -1 < v(n, t, 0); + } + function f(n, t, r) { + for (var e = -1, u = null == n ? 0 : n.length; ++e < u; ) if (r(t, n[e])) return true; + return false; + } + function c(n, t) { + for (var r = -1, e = null == n ? 0 : n.length, u = Array(e); ++r < e; ) u[r] = t(n[r], r, n); + return u; + } + function a(n, t) { + for (var r = -1, e = t.length, u = n.length; ++r < e; ) n[u + r] = t[r]; + return n; + } + function l(n, t, r, e) { + var u = -1, + i = null == n ? 0 : n.length; + for (e && i && (r = n[++u]); ++u < i; ) r = t(r, n[u], u, n); + return r; + } + function s(n, t, r, e) { + var u = null == n ? 0 : n.length; + for (e && u && (r = n[--u]); u--; ) r = t(r, n[u], u, n); + return r; + } + function h(n, t) { + for (var r = -1, e = null == n ? 0 : n.length; ++r < e; ) if (t(n[r], r, n)) return true; + return false; + } + function p(n, t, r) { + var e; + return ( + r(n, function (n, r, u) { + if (t(n, r, u)) return (e = r), false; + }), + e + ); + } + function _(n, t, r, e) { + var u = n.length; + for (r += e ? 1 : -1; e ? r-- : ++r < u; ) if (t(n[r], r, n)) return r; + return -1; + } + function v(n, t, r) { + if (t === t) + n: { + --r; + for (var e = n.length; ++r < e; ) + if (n[r] === t) { + n = r; + break n; + } + n = -1; + } + else n = _(n, d, r); + return n; + } + function g(n, t, r, e) { + --r; + for (var u = n.length; ++r < u; ) if (e(n[r], t)) return r; + return -1; + } + function d(n) { + return n !== n; + } + function y(n, t) { + var r = null == n ? 0 : n.length; + return r ? m(n, t) / r : F; + } + function b(n) { + return function (t) { + return null == t ? T : t[n]; + }; + } + function x(n) { + return function (t) { + return null == n ? T : n[t]; + }; + } + function j(n, t, r, e, u) { + return ( + u(n, function (n, u, i) { + r = e ? ((e = false), n) : t(r, n, u, i); + }), + r + ); + } + function w(n, t) { + var r = n.length; + for (n.sort(t); r--; ) n[r] = n[r].c; + return n; + } + function m(n, t) { + for (var r, e = -1, u = n.length; ++e < u; ) { + var i = t(n[e]); + i !== T && (r = r === T ? i : r + i); + } + return r; + } + function A(n, t) { + for (var r = -1, e = Array(n); ++r < n; ) e[r] = t(r); + return e; + } + function E(n, t) { + return c(t, function (t) { + return [t, n[t]]; + }); + } + function k(n) { + return function (t) { + return n(t); + }; + } + function S(n, t) { + return c(t, function (t) { + return n[t]; + }); + } + function O(n, t) { + return n.has(t); + } + function I(n, t) { + for (var r = -1, e = n.length; ++r < e && -1 < v(t, n[r], 0); ); + return r; + } + function R(n, t) { + for (var r = n.length; r-- && -1 < v(t, n[r], 0); ); + return r; + } + function z(n) { + return '\\' + Un[n]; + } + function W(n) { + var t = -1, + r = Array(n.size); + return ( + n.forEach(function (n, e) { + r[++t] = [e, n]; + }), + r + ); + } + function B(n, t) { + return function (r) { + return n(t(r)); + }; + } + function L(n, t) { + for (var r = -1, e = n.length, u = 0, i = []; ++r < e; ) { + var o = n[r]; + (o !== t && '__lodash_placeholder__' !== o) || + ((n[r] = '__lodash_placeholder__'), (i[u++] = r)); + } + return i; + } + function U(n) { + var t = -1, + r = Array(n.size); + return ( + n.forEach(function (n) { + r[++t] = n; + }), + r + ); + } + function C(n) { + var t = -1, + r = Array(n.size); + return ( + n.forEach(function (n) { + r[++t] = [n, n]; + }), + r + ); + } + function D(n) { + if (Rn.test(n)) { + for (var t = (On.lastIndex = 0); On.test(n); ) ++t; + n = t; + } else n = Qn(n); + return n; + } + function M(n) { + return Rn.test(n) ? n.match(On) || [] : n.split(''); + } + var T, + $ = 1 / 0, + F = NaN, + N = [ + ['ary', 128], + ['bind', 1], + ['bindKey', 2], + ['curry', 8], + ['curryRight', 16], + ['flip', 512], + ['partial', 32], + ['partialRight', 64], + ['rearg', 256], + ], + P = /\b__p\+='';/g, + Z = /\b(__p\+=)''\+/g, + q = /(__e\(.*?\)|\b__t\))\+'';/g, + V = /&(?:amp|lt|gt|quot|#39);/g, + K = /[&<>"']/g, + G = RegExp(V.source), + H = RegExp(K.source), + J = /<%-([\s\S]+?)%>/g, + Y = /<%([\s\S]+?)%>/g, + Q = /<%=([\s\S]+?)%>/g, + X = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, + nn = /^\w*$/, + tn = + /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, + rn = /[\\^$.*+?()[\]{}|]/g, + en = RegExp(rn.source), + un = /^\s+|\s+$/g, + on = /^\s+/, + fn = /\s+$/, + cn = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, + an = /\{\n\/\* \[wrapped with (.+)\] \*/, + ln = /,? & /, + sn = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g, + hn = /\\(\\)?/g, + pn = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g, + _n = /\w*$/, + vn = /^[-+]0x[0-9a-f]+$/i, + gn = /^0b[01]+$/i, + dn = /^\[object .+?Constructor\]$/, + yn = /^0o[0-7]+$/i, + bn = /^(?:0|[1-9]\d*)$/, + xn = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g, + jn = /($^)/, + wn = /['\n\r\u2028\u2029\\]/g, + mn = + '[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?(?:\\u200d(?:[^\\ud800-\\udfff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?)*', + An = + '(?:[\\u2700-\\u27bf]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])' + mn, + En = + '(?:[^\\ud800-\\udfff][\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]?|[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\ud800-\\udfff])', + kn = RegExp("['\u2019]", 'g'), + Sn = RegExp('[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]', 'g'), + On = RegExp('\\ud83c[\\udffb-\\udfff](?=\\ud83c[\\udffb-\\udfff])|' + En + mn, 'g'), + In = RegExp( + [ + "[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+(?:['\u2019](?:d|ll|m|re|s|t|ve))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde]|$)|(?:[A-Z\\xc0-\\xd6\\xd8-\\xde]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde](?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])|$)|[A-Z\\xc0-\\xd6\\xd8-\\xde]?(?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['\u2019](?:d|ll|m|re|s|t|ve))?|[A-Z\\xc0-\\xd6\\xd8-\\xde]+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?|\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])|\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])|\\d+", + An, + ].join('|'), + 'g', + ), + Rn = RegExp( + '[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]', + ), + zn = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/, + Wn = + 'Array Buffer DataView Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Map Math Object Promise RegExp Set String Symbol TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array WeakMap _ clearTimeout isFinite parseInt setTimeout'.split( + ' ', + ), + Bn = {}; + (Bn['[object Float32Array]'] = + Bn['[object Float64Array]'] = + Bn['[object Int8Array]'] = + Bn['[object Int16Array]'] = + Bn['[object Int32Array]'] = + Bn['[object Uint8Array]'] = + Bn['[object Uint8ClampedArray]'] = + Bn['[object Uint16Array]'] = + Bn['[object Uint32Array]'] = + true), + (Bn['[object Arguments]'] = + Bn['[object Array]'] = + Bn['[object ArrayBuffer]'] = + Bn['[object Boolean]'] = + Bn['[object DataView]'] = + Bn['[object Date]'] = + Bn['[object Error]'] = + Bn['[object Function]'] = + Bn['[object Map]'] = + Bn['[object Number]'] = + Bn['[object Object]'] = + Bn['[object RegExp]'] = + Bn['[object Set]'] = + Bn['[object String]'] = + Bn['[object WeakMap]'] = + false); + var Ln = {}; + (Ln['[object Arguments]'] = + Ln['[object Array]'] = + Ln['[object ArrayBuffer]'] = + Ln['[object DataView]'] = + Ln['[object Boolean]'] = + Ln['[object Date]'] = + Ln['[object Float32Array]'] = + Ln['[object Float64Array]'] = + Ln['[object Int8Array]'] = + Ln['[object Int16Array]'] = + Ln['[object Int32Array]'] = + Ln['[object Map]'] = + Ln['[object Number]'] = + Ln['[object Object]'] = + Ln['[object RegExp]'] = + Ln['[object Set]'] = + Ln['[object String]'] = + Ln['[object Symbol]'] = + Ln['[object Uint8Array]'] = + Ln['[object Uint8ClampedArray]'] = + Ln['[object Uint16Array]'] = + Ln['[object Uint32Array]'] = + true), + (Ln['[object Error]'] = Ln['[object Function]'] = Ln['[object WeakMap]'] = false); + var Un = { '\\': '\\', "'": "'", '\n': 'n', '\r': 'r', '\u2028': 'u2028', '\u2029': 'u2029' }, + Cn = parseFloat, + Dn = parseInt, + Mn = typeof global == 'object' && global && global.Object === Object && global, + Tn = typeof self == 'object' && self && self.Object === Object && self, + $n = Mn || Tn || Function('return this')(), + Fn = typeof exports == 'object' && exports && !exports.nodeType && exports, + Nn = Fn && typeof module == 'object' && module && !module.nodeType && module, + Pn = Nn && Nn.exports === Fn, + Zn = Pn && Mn.process, + qn = (function () { + try { + var n = Nn && Nn.f && Nn.f('util').types; + return n ? n : Zn && Zn.binding && Zn.binding('util'); + } catch (n) {} + })(), + Vn = qn && qn.isArrayBuffer, + Kn = qn && qn.isDate, + Gn = qn && qn.isMap, + Hn = qn && qn.isRegExp, + Jn = qn && qn.isSet, + Yn = qn && qn.isTypedArray, + Qn = b('length'), + Xn = x({ + '\xc0': 'A', + '\xc1': 'A', + '\xc2': 'A', + '\xc3': 'A', + '\xc4': 'A', + '\xc5': 'A', + '\xe0': 'a', + '\xe1': 'a', + '\xe2': 'a', + '\xe3': 'a', + '\xe4': 'a', + '\xe5': 'a', + '\xc7': 'C', + '\xe7': 'c', + '\xd0': 'D', + '\xf0': 'd', + '\xc8': 'E', + '\xc9': 'E', + '\xca': 'E', + '\xcb': 'E', + '\xe8': 'e', + '\xe9': 'e', + '\xea': 'e', + '\xeb': 'e', + '\xcc': 'I', + '\xcd': 'I', + '\xce': 'I', + '\xcf': 'I', + '\xec': 'i', + '\xed': 'i', + '\xee': 'i', + '\xef': 'i', + '\xd1': 'N', + '\xf1': 'n', + '\xd2': 'O', + '\xd3': 'O', + '\xd4': 'O', + '\xd5': 'O', + '\xd6': 'O', + '\xd8': 'O', + '\xf2': 'o', + '\xf3': 'o', + '\xf4': 'o', + '\xf5': 'o', + '\xf6': 'o', + '\xf8': 'o', + '\xd9': 'U', + '\xda': 'U', + '\xdb': 'U', + '\xdc': 'U', + '\xf9': 'u', + '\xfa': 'u', + '\xfb': 'u', + '\xfc': 'u', + '\xdd': 'Y', + '\xfd': 'y', + '\xff': 'y', + '\xc6': 'Ae', + '\xe6': 'ae', + '\xde': 'Th', + '\xfe': 'th', + '\xdf': 'ss', + '\u0100': 'A', + '\u0102': 'A', + '\u0104': 'A', + '\u0101': 'a', + '\u0103': 'a', + '\u0105': 'a', + '\u0106': 'C', + '\u0108': 'C', + '\u010a': 'C', + '\u010c': 'C', + '\u0107': 'c', + '\u0109': 'c', + '\u010b': 'c', + '\u010d': 'c', + '\u010e': 'D', + '\u0110': 'D', + '\u010f': 'd', + '\u0111': 'd', + '\u0112': 'E', + '\u0114': 'E', + '\u0116': 'E', + '\u0118': 'E', + '\u011a': 'E', + '\u0113': 'e', + '\u0115': 'e', + '\u0117': 'e', + '\u0119': 'e', + '\u011b': 'e', + '\u011c': 'G', + '\u011e': 'G', + '\u0120': 'G', + '\u0122': 'G', + '\u011d': 'g', + '\u011f': 'g', + '\u0121': 'g', + '\u0123': 'g', + '\u0124': 'H', + '\u0126': 'H', + '\u0125': 'h', + '\u0127': 'h', + '\u0128': 'I', + '\u012a': 'I', + '\u012c': 'I', + '\u012e': 'I', + '\u0130': 'I', + '\u0129': 'i', + '\u012b': 'i', + '\u012d': 'i', + '\u012f': 'i', + '\u0131': 'i', + '\u0134': 'J', + '\u0135': 'j', + '\u0136': 'K', + '\u0137': 'k', + '\u0138': 'k', + '\u0139': 'L', + '\u013b': 'L', + '\u013d': 'L', + '\u013f': 'L', + '\u0141': 'L', + '\u013a': 'l', + '\u013c': 'l', + '\u013e': 'l', + '\u0140': 'l', + '\u0142': 'l', + '\u0143': 'N', + '\u0145': 'N', + '\u0147': 'N', + '\u014a': 'N', + '\u0144': 'n', + '\u0146': 'n', + '\u0148': 'n', + '\u014b': 'n', + '\u014c': 'O', + '\u014e': 'O', + '\u0150': 'O', + '\u014d': 'o', + '\u014f': 'o', + '\u0151': 'o', + '\u0154': 'R', + '\u0156': 'R', + '\u0158': 'R', + '\u0155': 'r', + '\u0157': 'r', + '\u0159': 'r', + '\u015a': 'S', + '\u015c': 'S', + '\u015e': 'S', + '\u0160': 'S', + '\u015b': 's', + '\u015d': 's', + '\u015f': 's', + '\u0161': 's', + '\u0162': 'T', + '\u0164': 'T', + '\u0166': 'T', + '\u0163': 't', + '\u0165': 't', + '\u0167': 't', + '\u0168': 'U', + '\u016a': 'U', + '\u016c': 'U', + '\u016e': 'U', + '\u0170': 'U', + '\u0172': 'U', + '\u0169': 'u', + '\u016b': 'u', + '\u016d': 'u', + '\u016f': 'u', + '\u0171': 'u', + '\u0173': 'u', + '\u0174': 'W', + '\u0175': 'w', + '\u0176': 'Y', + '\u0177': 'y', + '\u0178': 'Y', + '\u0179': 'Z', + '\u017b': 'Z', + '\u017d': 'Z', + '\u017a': 'z', + '\u017c': 'z', + '\u017e': 'z', + '\u0132': 'IJ', + '\u0133': 'ij', + '\u0152': 'Oe', + '\u0153': 'oe', + '\u0149': "'n", + '\u017f': 's', + }), + nt = x({ '&': '&', '<': '<', '>': '>', '"': '"', "'": ''' }), + tt = x({ '&': '&', '<': '<', '>': '>', '"': '"', ''': "'" }), + rt = (function x(mn) { + function An(n) { + if (yu(n) && !ff(n) && !(n instanceof Un)) { + if (n instanceof On) return n; + if (oi.call(n, '__wrapped__')) return Fe(n); + } + return new On(n); + } + function En() {} + function On(n, t) { + (this.__wrapped__ = n), + (this.__actions__ = []), + (this.__chain__ = !!t), + (this.__index__ = 0), + (this.__values__ = T); + } + function Un(n) { + (this.__wrapped__ = n), + (this.__actions__ = []), + (this.__dir__ = 1), + (this.__filtered__ = false), + (this.__iteratees__ = []), + (this.__takeCount__ = 4294967295), + (this.__views__ = []); + } + function Mn(n) { + var t = -1, + r = null == n ? 0 : n.length; + for (this.clear(); ++t < r; ) { + var e = n[t]; + this.set(e[0], e[1]); + } + } + function Tn(n) { + var t = -1, + r = null == n ? 0 : n.length; + for (this.clear(); ++t < r; ) { + var e = n[t]; + this.set(e[0], e[1]); + } + } + function Fn(n) { + var t = -1, + r = null == n ? 0 : n.length; + for (this.clear(); ++t < r; ) { + var e = n[t]; + this.set(e[0], e[1]); + } + } + function Nn(n) { + var t = -1, + r = null == n ? 0 : n.length; + for (this.__data__ = new Fn(); ++t < r; ) this.add(n[t]); + } + function Zn(n) { + this.size = (this.__data__ = new Tn(n)).size; + } + function qn(n, t) { + var r, + e = ff(n), + u = !e && of(n), + i = !e && !u && af(n), + o = !e && !u && !i && _f(n), + u = (e = e || u || i || o) ? A(n.length, ni) : [], + f = u.length; + for (r in n) + (!t && !oi.call(n, r)) || + (e && + ('length' == r || + (i && ('offset' == r || 'parent' == r)) || + (o && ('buffer' == r || 'byteLength' == r || 'byteOffset' == r)) || + Se(r, f))) || + u.push(r); + return u; + } + function Qn(n) { + var t = n.length; + return t ? n[ir(0, t - 1)] : T; + } + function et(n, t) { + return De(Ur(n), pt(t, 0, n.length)); + } + function ut(n) { + return De(Ur(n)); + } + function it(n, t, r) { + ((r === T || lu(n[t], r)) && (r !== T || t in n)) || st(n, t, r); + } + function ot(n, t, r) { + var e = n[t]; + (oi.call(n, t) && lu(e, r) && (r !== T || t in n)) || st(n, t, r); + } + function ft(n, t) { + for (var r = n.length; r--; ) if (lu(n[r][0], t)) return r; + return -1; + } + function ct(n, t, r, e) { + return ( + uo(n, function (n, u, i) { + t(e, n, r(n), i); + }), + e + ); + } + function at(n, t) { + return n && Cr(t, Wu(t), n); + } + function lt(n, t) { + return n && Cr(t, Bu(t), n); + } + function st(n, t, r) { + '__proto__' == t && Ai + ? Ai(n, t, { configurable: true, enumerable: true, value: r, writable: true }) + : (n[t] = r); + } + function ht(n, t) { + for (var r = -1, e = t.length, u = Ku(e), i = null == n; ++r < e; ) + u[r] = i ? T : Ru(n, t[r]); + return u; + } + function pt(n, t, r) { + return n === n && (r !== T && (n = n <= r ? n : r), t !== T && (n = n >= t ? n : t)), n; + } + function _t(n, t, e, u, i, o) { + var f, + c = 1 & t, + a = 2 & t, + l = 4 & t; + if ((e && (f = i ? e(n, u, i, o) : e(n)), f !== T)) return f; + if (!du(n)) return n; + if ((u = ff(n))) { + if (((f = me(n)), !c)) return Ur(n, f); + } else { + var s = vo(n), + h = '[object Function]' == s || '[object GeneratorFunction]' == s; + if (af(n)) return Ir(n, c); + if ('[object Object]' == s || '[object Arguments]' == s || (h && !i)) { + if (((f = a || h ? {} : Ae(n)), !c)) return a ? Mr(n, lt(f, n)) : Dr(n, at(f, n)); + } else { + if (!Ln[s]) return i ? n : {}; + f = Ee(n, s, c); + } + } + if ((o || (o = new Zn()), (i = o.get(n)))) return i; + o.set(n, f), + pf(n) + ? n.forEach(function (r) { + f.add(_t(r, t, e, r, n, o)); + }) + : sf(n) && + n.forEach(function (r, u) { + f.set(u, _t(r, t, e, u, n, o)); + }); + var a = l ? (a ? ve : _e) : a ? Bu : Wu, + p = u ? T : a(n); + return ( + r(p || n, function (r, u) { + p && ((u = r), (r = n[u])), ot(f, u, _t(r, t, e, u, n, o)); + }), + f + ); + } + function vt(n) { + var t = Wu(n); + return function (r) { + return gt(r, n, t); + }; + } + function gt(n, t, r) { + var e = r.length; + if (null == n) return !e; + for (n = Qu(n); e--; ) { + var u = r[e], + i = t[u], + o = n[u]; + if ((o === T && !(u in n)) || !i(o)) return false; + } + return true; + } + function dt(n, t, r) { + if (typeof n != 'function') throw new ti('Expected a function'); + return bo(function () { + n.apply(T, r); + }, t); + } + function yt(n, t, r, e) { + var u = -1, + i = o, + a = true, + l = n.length, + s = [], + h = t.length; + if (!l) return s; + r && (t = c(t, k(r))), + e ? ((i = f), (a = false)) : 200 <= t.length && ((i = O), (a = false), (t = new Nn(t))); + n: for (; ++u < l; ) { + var p = n[u], + _ = null == r ? p : r(p), + p = e || 0 !== p ? p : 0; + if (a && _ === _) { + for (var v = h; v--; ) if (t[v] === _) continue n; + s.push(p); + } else i(t, _, e) || s.push(p); + } + return s; + } + function bt(n, t) { + var r = true; + return ( + uo(n, function (n, e, u) { + return (r = !!t(n, e, u)); + }), + r + ); + } + function xt(n, t, r) { + for (var e = -1, u = n.length; ++e < u; ) { + var i = n[e], + o = t(i); + if (null != o && (f === T ? o === o && !wu(o) : r(o, f))) + var f = o, + c = i; + } + return c; + } + function jt(n, t) { + var r = []; + return ( + uo(n, function (n, e, u) { + t(n, e, u) && r.push(n); + }), + r + ); + } + function wt(n, t, r, e, u) { + var i = -1, + o = n.length; + for (r || (r = ke), u || (u = []); ++i < o; ) { + var f = n[i]; + 0 < t && r(f) ? (1 < t ? wt(f, t - 1, r, e, u) : a(u, f)) : e || (u[u.length] = f); + } + return u; + } + function mt(n, t) { + return n && oo(n, t, Wu); + } + function At(n, t) { + return n && fo(n, t, Wu); + } + function Et(n, t) { + return i(t, function (t) { + return _u(n[t]); + }); + } + function kt(n, t) { + t = Sr(t, n); + for (var r = 0, e = t.length; null != n && r < e; ) n = n[Me(t[r++])]; + return r && r == e ? n : T; + } + function St(n, t, r) { + return (t = t(n)), ff(n) ? t : a(t, r(n)); + } + function Ot(n) { + if (null == n) n = n === T ? '[object Undefined]' : '[object Null]'; + else if (mi && mi in Qu(n)) { + var t = oi.call(n, mi), + r = n[mi]; + try { + n[mi] = T; + var e = true; + } catch (n) {} + var u = ai.call(n); + e && (t ? (n[mi] = r) : delete n[mi]), (n = u); + } else n = ai.call(n); + return n; + } + function It(n, t) { + return n > t; + } + function Rt(n, t) { + return null != n && oi.call(n, t); + } + function zt(n, t) { + return null != n && t in Qu(n); + } + function Wt(n, t, r) { + for ( + var e = r ? f : o, u = n[0].length, i = n.length, a = i, l = Ku(i), s = 1 / 0, h = []; + a--; + + ) { + var p = n[a]; + a && t && (p = c(p, k(t))), + (s = Ci(p.length, s)), + (l[a] = !r && (t || (120 <= u && 120 <= p.length)) ? new Nn(a && p) : T); + } + var p = n[0], + _ = -1, + v = l[0]; + n: for (; ++_ < u && h.length < s; ) { + var g = p[_], + d = t ? t(g) : g, + g = r || 0 !== g ? g : 0; + if (v ? !O(v, d) : !e(h, d, r)) { + for (a = i; --a; ) { + var y = l[a]; + if (y ? !O(y, d) : !e(n[a], d, r)) continue n; + } + v && v.push(d), h.push(g); + } + } + return h; + } + function Bt(n, t, r) { + var e = {}; + return ( + mt(n, function (n, u, i) { + t(e, r(n), u, i); + }), + e + ); + } + function Lt(t, r, e) { + return ( + (r = Sr(r, t)), + (t = 2 > r.length ? t : kt(t, hr(r, 0, -1))), + (r = null == t ? t : t[Me(Ve(r))]), + null == r ? T : n(r, t, e) + ); + } + function Ut(n) { + return yu(n) && '[object Arguments]' == Ot(n); + } + function Ct(n) { + return yu(n) && '[object ArrayBuffer]' == Ot(n); + } + function Dt(n) { + return yu(n) && '[object Date]' == Ot(n); + } + function Mt(n, t, r, e, u) { + if (n === t) t = true; + else if (null == n || null == t || (!yu(n) && !yu(t))) t = n !== n && t !== t; + else + n: { + var i = ff(n), + o = ff(t), + f = i ? '[object Array]' : vo(n), + c = o ? '[object Array]' : vo(t), + f = '[object Arguments]' == f ? '[object Object]' : f, + c = '[object Arguments]' == c ? '[object Object]' : c, + a = '[object Object]' == f, + o = '[object Object]' == c; + if ((c = f == c) && af(n)) { + if (!af(t)) { + t = false; + break n; + } + (i = true), (a = false); + } + if (c && !a) + u || (u = new Zn()), + (t = i || _f(n) ? se(n, t, r, e, Mt, u) : he(n, t, f, r, e, Mt, u)); + else { + if ( + !(1 & r) && + ((i = a && oi.call(n, '__wrapped__')), (f = o && oi.call(t, '__wrapped__')), i || f) + ) { + (n = i ? n.value() : n), + (t = f ? t.value() : t), + u || (u = new Zn()), + (t = Mt(n, t, r, e, u)); + break n; + } + if (c) + t: if ( + (u || (u = new Zn()), + (i = 1 & r), + (f = _e(n)), + (o = f.length), + (c = _e(t).length), + o == c || i) + ) { + for (a = o; a--; ) { + var l = f[a]; + if (!(i ? l in t : oi.call(t, l))) { + t = false; + break t; + } + } + if ((c = u.get(n)) && u.get(t)) t = c == t; + else { + (c = true), u.set(n, t), u.set(t, n); + for (var s = i; ++a < o; ) { + var l = f[a], + h = n[l], + p = t[l]; + if (e) var _ = i ? e(p, h, l, t, n, u) : e(h, p, l, n, t, u); + if (_ === T ? h !== p && !Mt(h, p, r, e, u) : !_) { + c = false; + break; + } + s || (s = 'constructor' == l); + } + c && + !s && + ((r = n.constructor), + (e = t.constructor), + r != e && + 'constructor' in n && + 'constructor' in t && + !( + typeof r == 'function' && + r instanceof r && + typeof e == 'function' && + e instanceof e + ) && + (c = false)), + u.delete(n), + u.delete(t), + (t = c); + } + } else t = false; + else t = false; + } + } + return t; + } + function Tt(n) { + return yu(n) && '[object Map]' == vo(n); + } + function $t(n, t, r, e) { + var u = r.length, + i = u, + o = !e; + if (null == n) return !i; + for (n = Qu(n); u--; ) { + var f = r[u]; + if (o && f[2] ? f[1] !== n[f[0]] : !(f[0] in n)) return false; + } + for (; ++u < i; ) { + var f = r[u], + c = f[0], + a = n[c], + l = f[1]; + if (o && f[2]) { + if (a === T && !(c in n)) return false; + } else { + if (((f = new Zn()), e)) var s = e(a, l, c, n, t, f); + if (s === T ? !Mt(l, a, 3, e, f) : !s) return false; + } + } + return true; + } + function Ft(n) { + return !(!du(n) || (ci && ci in n)) && (_u(n) ? hi : dn).test(Te(n)); + } + function Nt(n) { + return yu(n) && '[object RegExp]' == Ot(n); + } + function Pt(n) { + return yu(n) && '[object Set]' == vo(n); + } + function Zt(n) { + return yu(n) && gu(n.length) && !!Bn[Ot(n)]; + } + function qt(n) { + return typeof n == 'function' + ? n + : null == n + ? $u + : typeof n == 'object' + ? ff(n) + ? Jt(n[0], n[1]) + : Ht(n) + : Zu(n); + } + function Vt(n) { + if (!ze(n)) return Li(n); + var t, + r = []; + for (t in Qu(n)) oi.call(n, t) && 'constructor' != t && r.push(t); + return r; + } + function Kt(n, t) { + return n < t; + } + function Gt(n, t) { + var r = -1, + e = su(n) ? Ku(n.length) : []; + return ( + uo(n, function (n, u, i) { + e[++r] = t(n, u, i); + }), + e + ); + } + function Ht(n) { + var t = xe(n); + return 1 == t.length && t[0][2] + ? We(t[0][0], t[0][1]) + : function (r) { + return r === n || $t(r, n, t); + }; + } + function Jt(n, t) { + return Ie(n) && t === t && !du(t) + ? We(Me(n), t) + : function (r) { + var e = Ru(r, n); + return e === T && e === t ? zu(r, n) : Mt(t, e, 3); + }; + } + function Yt(n, t, r, e, u) { + n !== t && + oo( + t, + function (i, o) { + if ((u || (u = new Zn()), du(i))) { + var f = u, + c = Le(n, o), + a = Le(t, o), + l = f.get(a); + if (l) it(n, o, l); + else { + var l = e ? e(c, a, o + '', n, t, f) : T, + s = l === T; + if (s) { + var h = ff(a), + p = !h && af(a), + _ = !h && !p && _f(a), + l = a; + h || p || _ + ? ff(c) + ? (l = c) + : hu(c) + ? (l = Ur(c)) + : p + ? ((s = false), (l = Ir(a, true))) + : _ + ? ((s = false), (l = zr(a, true))) + : (l = []) + : xu(a) || of(a) + ? ((l = c), of(c) ? (l = Ou(c)) : (du(c) && !_u(c)) || (l = Ae(a))) + : (s = false); + } + s && (f.set(a, l), Yt(l, a, r, e, f), f.delete(a)), it(n, o, l); + } + } else (f = e ? e(Le(n, o), i, o + '', n, t, u) : T), f === T && (f = i), it(n, o, f); + }, + Bu, + ); + } + function Qt(n, t) { + var r = n.length; + if (r) return (t += 0 > t ? r : 0), Se(t, r) ? n[t] : T; + } + function Xt(n, t, r) { + var e = -1; + return ( + (t = c(t.length ? t : [$u], k(ye()))), + (n = Gt(n, function (n) { + return { + a: c(t, function (t) { + return t(n); + }), + b: ++e, + c: n, + }; + })), + w(n, function (n, t) { + var e; + n: { + e = -1; + for (var u = n.a, i = t.a, o = u.length, f = r.length; ++e < o; ) { + var c = Wr(u[e], i[e]); + if (c) { + e = e >= f ? c : c * ('desc' == r[e] ? -1 : 1); + break n; + } + } + e = n.b - t.b; + } + return e; + }) + ); + } + function nr(n, t) { + return tr(n, t, function (t, r) { + return zu(n, r); + }); + } + function tr(n, t, r) { + for (var e = -1, u = t.length, i = {}; ++e < u; ) { + var o = t[e], + f = kt(n, o); + r(f, o) && lr(i, Sr(o, n), f); + } + return i; + } + function rr(n) { + return function (t) { + return kt(t, n); + }; + } + function er(n, t, r, e) { + var u = e ? g : v, + i = -1, + o = t.length, + f = n; + for (n === t && (t = Ur(t)), r && (f = c(n, k(r))); ++i < o; ) + for (var a = 0, l = t[i], l = r ? r(l) : l; -1 < (a = u(f, l, a, e)); ) + f !== n && xi.call(f, a, 1), xi.call(n, a, 1); + return n; + } + function ur(n, t) { + for (var r = n ? t.length : 0, e = r - 1; r--; ) { + var u = t[r]; + if (r == e || u !== i) { + var i = u; + Se(u) ? xi.call(n, u, 1) : xr(n, u); + } + } + } + function ir(n, t) { + return n + Ii(Ti() * (t - n + 1)); + } + function or(n, t) { + var r = ''; + if (!n || 1 > t || 9007199254740991 < t) return r; + do t % 2 && (r += n), (t = Ii(t / 2)) && (n += n); + while (t); + return r; + } + function fr(n, t) { + return xo(Be(n, t, $u), n + ''); + } + function cr(n) { + return Qn(Uu(n)); + } + function ar(n, t) { + var r = Uu(n); + return De(r, pt(t, 0, r.length)); + } + function lr(n, t, r, e) { + if (!du(n)) return n; + t = Sr(t, n); + for (var u = -1, i = t.length, o = i - 1, f = n; null != f && ++u < i; ) { + var c = Me(t[u]), + a = r; + if (u != o) { + var l = f[c], + a = e ? e(l, c, f) : T; + a === T && (a = du(l) ? l : Se(t[u + 1]) ? [] : {}); + } + ot(f, c, a), (f = f[c]); + } + return n; + } + function sr(n) { + return De(Uu(n)); + } + function hr(n, t, r) { + var e = -1, + u = n.length; + for ( + 0 > t && (t = -t > u ? 0 : u + t), + r = r > u ? u : r, + 0 > r && (r += u), + u = t > r ? 0 : (r - t) >>> 0, + t >>>= 0, + r = Ku(u); + ++e < u; + + ) + r[e] = n[e + t]; + return r; + } + function pr(n, t) { + var r; + return ( + uo(n, function (n, e, u) { + return (r = t(n, e, u)), !r; + }), + !!r + ); + } + function _r(n, t, r) { + var e = 0, + u = null == n ? e : n.length; + if (typeof t == 'number' && t === t && 2147483647 >= u) { + for (; e < u; ) { + var i = (e + u) >>> 1, + o = n[i]; + null !== o && !wu(o) && (r ? o <= t : o < t) ? (e = i + 1) : (u = i); + } + return u; + } + return vr(n, t, $u, r); + } + function vr(n, t, r, e) { + t = r(t); + for ( + var u = 0, + i = null == n ? 0 : n.length, + o = t !== t, + f = null === t, + c = wu(t), + a = t === T; + u < i; + + ) { + var l = Ii((u + i) / 2), + s = r(n[l]), + h = s !== T, + p = null === s, + _ = s === s, + v = wu(s); + ( + o + ? e || _ + : a + ? _ && (e || h) + : f + ? _ && h && (e || !p) + : c + ? _ && h && !p && (e || !v) + : p || v + ? 0 + : e + ? s <= t + : s < t + ) + ? (u = l + 1) + : (i = l); + } + return Ci(i, 4294967294); + } + function gr(n, t) { + for (var r = -1, e = n.length, u = 0, i = []; ++r < e; ) { + var o = n[r], + f = t ? t(o) : o; + if (!r || !lu(f, c)) { + var c = f; + i[u++] = 0 === o ? 0 : o; + } + } + return i; + } + function dr(n) { + return typeof n == 'number' ? n : wu(n) ? F : +n; + } + function yr(n) { + if (typeof n == 'string') return n; + if (ff(n)) return c(n, yr) + ''; + if (wu(n)) return ro ? ro.call(n) : ''; + var t = n + ''; + return '0' == t && 1 / n == -$ ? '-0' : t; + } + function br(n, t, r) { + var e = -1, + u = o, + i = n.length, + c = true, + a = [], + l = a; + if (r) (c = false), (u = f); + else if (200 <= i) { + if ((u = t ? null : so(n))) return U(u); + (c = false), (u = O), (l = new Nn()); + } else l = t ? [] : a; + n: for (; ++e < i; ) { + var s = n[e], + h = t ? t(s) : s, + s = r || 0 !== s ? s : 0; + if (c && h === h) { + for (var p = l.length; p--; ) if (l[p] === h) continue n; + t && l.push(h), a.push(s); + } else u(l, h, r) || (l !== a && l.push(h), a.push(s)); + } + return a; + } + function xr(n, t) { + return ( + (t = Sr(t, n)), + (n = 2 > t.length ? n : kt(n, hr(t, 0, -1))), + null == n || delete n[Me(Ve(t))] + ); + } + function jr(n, t, r, e) { + for (var u = n.length, i = e ? u : -1; (e ? i-- : ++i < u) && t(n[i], i, n); ); + return r ? hr(n, e ? 0 : i, e ? i + 1 : u) : hr(n, e ? i + 1 : 0, e ? u : i); + } + function wr(n, t) { + var r = n; + return ( + r instanceof Un && (r = r.value()), + l( + t, + function (n, t) { + return t.func.apply(t.thisArg, a([n], t.args)); + }, + r, + ) + ); + } + function mr(n, t, r) { + var e = n.length; + if (2 > e) return e ? br(n[0]) : []; + for (var u = -1, i = Ku(e); ++u < e; ) + for (var o = n[u], f = -1; ++f < e; ) f != u && (i[u] = yt(i[u] || o, n[f], t, r)); + return br(wt(i, 1), t, r); + } + function Ar(n, t, r) { + for (var e = -1, u = n.length, i = t.length, o = {}; ++e < u; ) r(o, n[e], e < i ? t[e] : T); + return o; + } + function Er(n) { + return hu(n) ? n : []; + } + function kr(n) { + return typeof n == 'function' ? n : $u; + } + function Sr(n, t) { + return ff(n) ? n : Ie(n, t) ? [n] : jo(Iu(n)); + } + function Or(n, t, r) { + var e = n.length; + return (r = r === T ? e : r), !t && r >= e ? n : hr(n, t, r); + } + function Ir(n, t) { + if (t) return n.slice(); + var r = n.length, + r = gi ? gi(r) : new n.constructor(r); + return n.copy(r), r; + } + function Rr(n) { + var t = new n.constructor(n.byteLength); + return new vi(t).set(new vi(n)), t; + } + function zr(n, t) { + return new n.constructor(t ? Rr(n.buffer) : n.buffer, n.byteOffset, n.length); + } + function Wr(n, t) { + if (n !== t) { + var r = n !== T, + e = null === n, + u = n === n, + i = wu(n), + o = t !== T, + f = null === t, + c = t === t, + a = wu(t); + if ( + (!f && !a && !i && n > t) || + (i && o && c && !f && !a) || + (e && o && c) || + (!r && c) || + !u + ) + return 1; + if ( + (!e && !i && !a && n < t) || + (a && r && u && !e && !i) || + (f && r && u) || + (!o && u) || + !c + ) + return -1; + } + return 0; + } + function Br(n, t, r, e) { + var u = -1, + i = n.length, + o = r.length, + f = -1, + c = t.length, + a = Ui(i - o, 0), + l = Ku(c + a); + for (e = !e; ++f < c; ) l[f] = t[f]; + for (; ++u < o; ) (e || u < i) && (l[r[u]] = n[u]); + for (; a--; ) l[f++] = n[u++]; + return l; + } + function Lr(n, t, r, e) { + var u = -1, + i = n.length, + o = -1, + f = r.length, + c = -1, + a = t.length, + l = Ui(i - f, 0), + s = Ku(l + a); + for (e = !e; ++u < l; ) s[u] = n[u]; + for (l = u; ++c < a; ) s[l + c] = t[c]; + for (; ++o < f; ) (e || u < i) && (s[l + r[o]] = n[u++]); + return s; + } + function Ur(n, t) { + var r = -1, + e = n.length; + for (t || (t = Ku(e)); ++r < e; ) t[r] = n[r]; + return t; + } + function Cr(n, t, r, e) { + var u = !r; + r || (r = {}); + for (var i = -1, o = t.length; ++i < o; ) { + var f = t[i], + c = e ? e(r[f], n[f], f, r, n) : T; + c === T && (c = n[f]), u ? st(r, f, c) : ot(r, f, c); + } + return r; + } + function Dr(n, t) { + return Cr(n, po(n), t); + } + function Mr(n, t) { + return Cr(n, _o(n), t); + } + function Tr(n, r) { + return function (e, u) { + var i = ff(e) ? t : ct, + o = r ? r() : {}; + return i(e, n, ye(u, 2), o); + }; + } + function $r(n) { + return fr(function (t, r) { + var e = -1, + u = r.length, + i = 1 < u ? r[u - 1] : T, + o = 2 < u ? r[2] : T, + i = 3 < n.length && typeof i == 'function' ? (u--, i) : T; + for (o && Oe(r[0], r[1], o) && ((i = 3 > u ? T : i), (u = 1)), t = Qu(t); ++e < u; ) + (o = r[e]) && n(t, o, e, i); + return t; + }); + } + function Fr(n, t) { + return function (r, e) { + if (null == r) return r; + if (!su(r)) return n(r, e); + for ( + var u = r.length, i = t ? u : -1, o = Qu(r); + (t ? i-- : ++i < u) && false !== e(o[i], i, o); + + ); + return r; + }; + } + function Nr(n) { + return function (t, r, e) { + var u = -1, + i = Qu(t); + e = e(t); + for (var o = e.length; o--; ) { + var f = e[n ? o : ++u]; + if (false === r(i[f], f, i)) break; + } + return t; + }; + } + function Pr(n, t, r) { + function e() { + return (this && this !== $n && this instanceof e ? i : n).apply(u ? r : this, arguments); + } + var u = 1 & t, + i = Vr(n); + return e; + } + function Zr(n) { + return function (t) { + t = Iu(t); + var r = Rn.test(t) ? M(t) : T, + e = r ? r[0] : t.charAt(0); + return (t = r ? Or(r, 1).join('') : t.slice(1)), e[n]() + t; + }; + } + function qr(n) { + return function (t) { + return l(Mu(Du(t).replace(kn, '')), n, ''); + }; + } + function Vr(n) { + return function () { + var t = arguments; + switch (t.length) { + case 0: + return new n(); + case 1: + return new n(t[0]); + case 2: + return new n(t[0], t[1]); + case 3: + return new n(t[0], t[1], t[2]); + case 4: + return new n(t[0], t[1], t[2], t[3]); + case 5: + return new n(t[0], t[1], t[2], t[3], t[4]); + case 6: + return new n(t[0], t[1], t[2], t[3], t[4], t[5]); + case 7: + return new n(t[0], t[1], t[2], t[3], t[4], t[5], t[6]); + } + var r = eo(n.prototype), + t = n.apply(r, t); + return du(t) ? t : r; + }; + } + function Kr(t, r, e) { + function u() { + for (var o = arguments.length, f = Ku(o), c = o, a = de(u); c--; ) f[c] = arguments[c]; + return ( + (c = 3 > o && f[0] !== a && f[o - 1] !== a ? [] : L(f, a)), + (o -= c.length), + o < e + ? ue(t, r, Jr, u.placeholder, T, f, c, T, T, e - o) + : n(this && this !== $n && this instanceof u ? i : t, this, f) + ); + } + var i = Vr(t); + return u; + } + function Gr(n) { + return function (t, r, e) { + var u = Qu(t); + if (!su(t)) { + var i = ye(r, 3); + (t = Wu(t)), + (r = function (n) { + return i(u[n], n, u); + }); + } + return (r = n(t, r, e)), -1 < r ? u[i ? t[r] : r] : T; + }; + } + function Hr(n) { + return pe(function (t) { + var r = t.length, + e = r, + u = On.prototype.thru; + for (n && t.reverse(); e--; ) { + var i = t[e]; + if (typeof i != 'function') throw new ti('Expected a function'); + if (u && !o && 'wrapper' == ge(i)) var o = new On([], true); + } + for (e = o ? e : r; ++e < r; ) + var i = t[e], + u = ge(i), + f = 'wrapper' == u ? ho(i) : T, + o = + f && Re(f[0]) && 424 == f[1] && !f[4].length && 1 == f[9] + ? o[ge(f[0])].apply(o, f[3]) + : 1 == i.length && Re(i) + ? o[u]() + : o.thru(i); + return function () { + var n = arguments, + e = n[0]; + if (o && 1 == n.length && ff(e)) return o.plant(e).value(); + for (var u = 0, n = r ? t[u].apply(this, n) : e; ++u < r; ) n = t[u].call(this, n); + return n; + }; + }); + } + function Jr(n, t, r, e, u, i, o, f, c, a) { + function l() { + for (var d = arguments.length, y = Ku(d), b = d; b--; ) y[b] = arguments[b]; + if (_) { + var x, + j = de(l), + b = y.length; + for (x = 0; b--; ) y[b] === j && ++x; + } + if ((e && (y = Br(y, e, u, _)), i && (y = Lr(y, i, o, _)), (d -= x), _ && d < a)) + return (j = L(y, j)), ue(n, t, Jr, l.placeholder, r, y, j, f, c, a - d); + if (((j = h ? r : this), (b = p ? j[n] : n), (d = y.length), f)) { + x = y.length; + for (var w = Ci(f.length, x), m = Ur(y); w--; ) { + var A = f[w]; + y[w] = Se(A, x) ? m[A] : T; + } + } else v && 1 < d && y.reverse(); + return ( + s && c < d && (y.length = c), + this && this !== $n && this instanceof l && (b = g || Vr(b)), + b.apply(j, y) + ); + } + var s = 128 & t, + h = 1 & t, + p = 2 & t, + _ = 24 & t, + v = 512 & t, + g = p ? T : Vr(n); + return l; + } + function Yr(n, t) { + return function (r, e) { + return Bt(r, n, t(e)); + }; + } + function Qr(n, t) { + return function (r, e) { + var u; + if (r === T && e === T) return t; + if ((r !== T && (u = r), e !== T)) { + if (u === T) return e; + typeof r == 'string' || typeof e == 'string' + ? ((r = yr(r)), (e = yr(e))) + : ((r = dr(r)), (e = dr(e))), + (u = n(r, e)); + } + return u; + }; + } + function Xr(t) { + return pe(function (r) { + return ( + (r = c(r, k(ye()))), + fr(function (e) { + var u = this; + return t(r, function (t) { + return n(t, u, e); + }); + }) + ); + }); + } + function ne(n, t) { + t = t === T ? ' ' : yr(t); + var r = t.length; + return 2 > r + ? r + ? or(t, n) + : t + : ((r = or(t, Oi(n / D(t)))), Rn.test(t) ? Or(M(r), 0, n).join('') : r.slice(0, n)); + } + function te(t, r, e, u) { + function i() { + for ( + var r = -1, + c = arguments.length, + a = -1, + l = u.length, + s = Ku(l + c), + h = this && this !== $n && this instanceof i ? f : t; + ++a < l; + + ) + s[a] = u[a]; + for (; c--; ) s[a++] = arguments[++r]; + return n(h, o ? e : this, s); + } + var o = 1 & r, + f = Vr(t); + return i; + } + function re(n) { + return function (t, r, e) { + e && typeof e != 'number' && Oe(t, r, e) && (r = e = T), + (t = Au(t)), + r === T ? ((r = t), (t = 0)) : (r = Au(r)), + (e = e === T ? (t < r ? 1 : -1) : Au(e)); + var u = -1; + r = Ui(Oi((r - t) / (e || 1)), 0); + for (var i = Ku(r); r--; ) (i[n ? r : ++u] = t), (t += e); + return i; + }; + } + function ee(n) { + return function (t, r) { + return ( + (typeof t == 'string' && typeof r == 'string') || ((t = Su(t)), (r = Su(r))), n(t, r) + ); + }; + } + function ue(n, t, r, e, u, i, o, f, c, a) { + var l = 8 & t, + s = l ? o : T; + o = l ? T : o; + var h = l ? i : T; + return ( + (i = l ? T : i), + (t = (t | (l ? 32 : 64)) & ~(l ? 64 : 32)), + 4 & t || (t &= -4), + (u = [n, t, u, h, s, i, o, f, c, a]), + (r = r.apply(T, u)), + Re(n) && yo(r, u), + (r.placeholder = e), + Ue(r, n, t) + ); + } + function ie(n) { + var t = Yu[n]; + return function (n, r) { + if (((n = Su(n)), (r = null == r ? 0 : Ci(Eu(r), 292)) && Wi(n))) { + var e = (Iu(n) + 'e').split('e'), + e = t(e[0] + 'e' + (+e[1] + r)), + e = (Iu(e) + 'e').split('e'); + return +(e[0] + 'e' + (+e[1] - r)); + } + return t(n); + }; + } + function oe(n) { + return function (t) { + var r = vo(t); + return '[object Map]' == r ? W(t) : '[object Set]' == r ? C(t) : E(t, n(t)); + }; + } + function fe(n, t, r, e, u, i, o, f) { + var c = 2 & t; + if (!c && typeof n != 'function') throw new ti('Expected a function'); + var a = e ? e.length : 0; + if ( + (a || ((t &= -97), (e = u = T)), + (o = o === T ? o : Ui(Eu(o), 0)), + (f = f === T ? f : Eu(f)), + (a -= u ? u.length : 0), + 64 & t) + ) { + var l = e, + s = u; + e = u = T; + } + var h = c ? T : ho(n); + return ( + (i = [n, t, r, e, u, l, s, i, o, f]), + h && + ((r = i[1]), + (n = h[1]), + (t = r | n), + (e = + (128 == n && 8 == r) || + (128 == n && 256 == r && i[7].length <= h[8]) || + (384 == n && h[7].length <= h[8] && 8 == r)), + 131 > t || e) && + (1 & n && ((i[2] = h[2]), (t |= 1 & r ? 0 : 4)), + (r = h[3]) && + ((e = i[3]), + (i[3] = e ? Br(e, r, h[4]) : r), + (i[4] = e ? L(i[3], '__lodash_placeholder__') : h[4])), + (r = h[5]) && + ((e = i[5]), + (i[5] = e ? Lr(e, r, h[6]) : r), + (i[6] = e ? L(i[5], '__lodash_placeholder__') : h[6])), + (r = h[7]) && (i[7] = r), + 128 & n && (i[8] = null == i[8] ? h[8] : Ci(i[8], h[8])), + null == i[9] && (i[9] = h[9]), + (i[0] = h[0]), + (i[1] = t)), + (n = i[0]), + (t = i[1]), + (r = i[2]), + (e = i[3]), + (u = i[4]), + (f = i[9] = i[9] === T ? (c ? 0 : n.length) : Ui(i[9] - a, 0)), + !f && 24 & t && (t &= -25), + Ue( + (h ? co : yo)( + t && 1 != t + ? 8 == t || 16 == t + ? Kr(n, t, f) + : (32 != t && 33 != t) || u.length + ? Jr.apply(T, i) + : te(n, t, r, e) + : Pr(n, t, r), + i, + ), + n, + t, + ) + ); + } + function ce(n, t, r, e) { + return n === T || (lu(n, ei[r]) && !oi.call(e, r)) ? t : n; + } + function ae(n, t, r, e, u, i) { + return du(n) && du(t) && (i.set(t, n), Yt(n, t, T, ae, i), i.delete(t)), n; + } + function le(n) { + return xu(n) ? T : n; + } + function se(n, t, r, e, u, i) { + var o = 1 & r, + f = n.length, + c = t.length; + if (f != c && !(o && c > f)) return false; + if ((c = i.get(n)) && i.get(t)) return c == t; + var c = -1, + a = true, + l = 2 & r ? new Nn() : T; + for (i.set(n, t), i.set(t, n); ++c < f; ) { + var s = n[c], + p = t[c]; + if (e) var _ = o ? e(p, s, c, t, n, i) : e(s, p, c, n, t, i); + if (_ !== T) { + if (_) continue; + a = false; + break; + } + if (l) { + if ( + !h(t, function (n, t) { + if (!O(l, t) && (s === n || u(s, n, r, e, i))) return l.push(t); + }) + ) { + a = false; + break; + } + } else if (s !== p && !u(s, p, r, e, i)) { + a = false; + break; + } + } + return i.delete(n), i.delete(t), a; + } + function he(n, t, r, e, u, i, o) { + switch (r) { + case '[object DataView]': + if (n.byteLength != t.byteLength || n.byteOffset != t.byteOffset) break; + (n = n.buffer), (t = t.buffer); + case '[object ArrayBuffer]': + if (n.byteLength != t.byteLength || !i(new vi(n), new vi(t))) break; + return true; + case '[object Boolean]': + case '[object Date]': + case '[object Number]': + return lu(+n, +t); + case '[object Error]': + return n.name == t.name && n.message == t.message; + case '[object RegExp]': + case '[object String]': + return n == t + ''; + case '[object Map]': + var f = W; + case '[object Set]': + if ((f || (f = U), n.size != t.size && !(1 & e))) break; + return (r = o.get(n)) + ? r == t + : ((e |= 2), o.set(n, t), (t = se(f(n), f(t), e, u, i, o)), o.delete(n), t); + case '[object Symbol]': + if (to) return to.call(n) == to.call(t); + } + return false; + } + function pe(n) { + return xo(Be(n, T, Ze), n + ''); + } + function _e(n) { + return St(n, Wu, po); + } + function ve(n) { + return St(n, Bu, _o); + } + function ge(n) { + for (var t = n.name + '', r = Gi[t], e = oi.call(Gi, t) ? r.length : 0; e--; ) { + var u = r[e], + i = u.func; + if (null == i || i == n) return u.name; + } + return t; + } + function de(n) { + return (oi.call(An, 'placeholder') ? An : n).placeholder; + } + function ye() { + var n = An.iteratee || Fu, + n = n === Fu ? qt : n; + return arguments.length ? n(arguments[0], arguments[1]) : n; + } + function be(n, t) { + var r = n.__data__, + e = typeof t; + return ( + 'string' == e || 'number' == e || 'symbol' == e || 'boolean' == e + ? '__proto__' !== t + : null === t + ) + ? r[typeof t == 'string' ? 'string' : 'hash'] + : r.map; + } + function xe(n) { + for (var t = Wu(n), r = t.length; r--; ) { + var e = t[r], + u = n[e]; + t[r] = [e, u, u === u && !du(u)]; + } + return t; + } + function je(n, t) { + var r = null == n ? T : n[t]; + return Ft(r) ? r : T; + } + function we(n, t, r) { + t = Sr(t, n); + for (var e = -1, u = t.length, i = false; ++e < u; ) { + var o = Me(t[e]); + if (!(i = null != n && r(n, o))) break; + n = n[o]; + } + return i || ++e != u + ? i + : ((u = null == n ? 0 : n.length), !!u && gu(u) && Se(o, u) && (ff(n) || of(n))); + } + function me(n) { + var t = n.length, + r = new n.constructor(t); + return ( + t && + 'string' == typeof n[0] && + oi.call(n, 'index') && + ((r.index = n.index), (r.input = n.input)), + r + ); + } + function Ae(n) { + return typeof n.constructor != 'function' || ze(n) ? {} : eo(di(n)); + } + function Ee(n, t, r) { + var e = n.constructor; + switch (t) { + case '[object ArrayBuffer]': + return Rr(n); + case '[object Boolean]': + case '[object Date]': + return new e(+n); + case '[object DataView]': + return ( + (t = r ? Rr(n.buffer) : n.buffer), new n.constructor(t, n.byteOffset, n.byteLength) + ); + case '[object Float32Array]': + case '[object Float64Array]': + case '[object Int8Array]': + case '[object Int16Array]': + case '[object Int32Array]': + case '[object Uint8Array]': + case '[object Uint8ClampedArray]': + case '[object Uint16Array]': + case '[object Uint32Array]': + return zr(n, r); + case '[object Map]': + return new e(); + case '[object Number]': + case '[object String]': + return new e(n); + case '[object RegExp]': + return (t = new n.constructor(n.source, _n.exec(n))), (t.lastIndex = n.lastIndex), t; + case '[object Set]': + return new e(); + case '[object Symbol]': + return to ? Qu(to.call(n)) : {}; + } + } + function ke(n) { + return ff(n) || of(n) || !!(ji && n && n[ji]); + } + function Se(n, t) { + var r = typeof n; + return ( + (t = null == t ? 9007199254740991 : t), + !!t && ('number' == r || ('symbol' != r && bn.test(n))) && -1 < n && 0 == n % 1 && n < t + ); + } + function Oe(n, t, r) { + if (!du(r)) return false; + var e = typeof t; + return !!('number' == e ? su(r) && Se(t, r.length) : 'string' == e && t in r) && lu(r[t], n); + } + function Ie(n, t) { + if (ff(n)) return false; + var r = typeof n; + return ( + !('number' != r && 'symbol' != r && 'boolean' != r && null != n && !wu(n)) || + nn.test(n) || + !X.test(n) || + (null != t && n in Qu(t)) + ); + } + function Re(n) { + var t = ge(n), + r = An[t]; + return ( + typeof r == 'function' && t in Un.prototype && (n === r || ((t = ho(r)), !!t && n === t[0])) + ); + } + function ze(n) { + var t = n && n.constructor; + return n === ((typeof t == 'function' && t.prototype) || ei); + } + function We(n, t) { + return function (r) { + return null != r && r[n] === t && (t !== T || n in Qu(r)); + }; + } + function Be(t, r, e) { + return ( + (r = Ui(r === T ? t.length - 1 : r, 0)), + function () { + for (var u = arguments, i = -1, o = Ui(u.length - r, 0), f = Ku(o); ++i < o; ) + f[i] = u[r + i]; + for (i = -1, o = Ku(r + 1); ++i < r; ) o[i] = u[i]; + return (o[r] = e(f)), n(t, this, o); + } + ); + } + function Le(n, t) { + if (('constructor' !== t || 'function' != typeof n[t]) && '__proto__' != t) return n[t]; + } + function Ue(n, t, r) { + var e = t + ''; + t = xo; + var u, + i = $e; + return ( + (u = (u = e.match(an)) ? u[1].split(ln) : []), + (r = i(u, r)), + (i = r.length) && + ((u = i - 1), + (r[u] = (1 < i ? '& ' : '') + r[u]), + (r = r.join(2 < i ? ', ' : ' ')), + (e = e.replace(cn, '{\n/* [wrapped with ' + r + '] */\n'))), + t(n, e) + ); + } + function Ce(n) { + var t = 0, + r = 0; + return function () { + var e = Di(), + u = 16 - (e - r); + if (((r = e), 0 < u)) { + if (800 <= ++t) return arguments[0]; + } else t = 0; + return n.apply(T, arguments); + }; + } + function De(n, t) { + var r = -1, + e = n.length, + u = e - 1; + for (t = t === T ? e : t; ++r < t; ) { + var e = ir(r, u), + i = n[e]; + (n[e] = n[r]), (n[r] = i); + } + return (n.length = t), n; + } + function Me(n) { + if (typeof n == 'string' || wu(n)) return n; + var t = n + ''; + return '0' == t && 1 / n == -$ ? '-0' : t; + } + function Te(n) { + if (null != n) { + try { + return ii.call(n); + } catch (n) {} + return n + ''; + } + return ''; + } + function $e(n, t) { + return ( + r(N, function (r) { + var e = '_.' + r[0]; + t & r[1] && !o(n, e) && n.push(e); + }), + n.sort() + ); + } + function Fe(n) { + if (n instanceof Un) return n.clone(); + var t = new On(n.__wrapped__, n.__chain__); + return ( + (t.__actions__ = Ur(n.__actions__)), + (t.__index__ = n.__index__), + (t.__values__ = n.__values__), + t + ); + } + function Ne(n, t, r) { + var e = null == n ? 0 : n.length; + return e ? ((r = null == r ? 0 : Eu(r)), 0 > r && (r = Ui(e + r, 0)), _(n, ye(t, 3), r)) : -1; + } + function Pe(n, t, r) { + var e = null == n ? 0 : n.length; + if (!e) return -1; + var u = e - 1; + return ( + r !== T && ((u = Eu(r)), (u = 0 > r ? Ui(e + u, 0) : Ci(u, e - 1))), _(n, ye(t, 3), u, true) + ); + } + function Ze(n) { + return (null == n ? 0 : n.length) ? wt(n, 1) : []; + } + function qe(n) { + return n && n.length ? n[0] : T; + } + function Ve(n) { + var t = null == n ? 0 : n.length; + return t ? n[t - 1] : T; + } + function Ke(n, t) { + return n && n.length && t && t.length ? er(n, t) : n; + } + function Ge(n) { + return null == n ? n : $i.call(n); + } + function He(n) { + if (!n || !n.length) return []; + var t = 0; + return ( + (n = i(n, function (n) { + if (hu(n)) return (t = Ui(n.length, t)), true; + })), + A(t, function (t) { + return c(n, b(t)); + }) + ); + } + function Je(t, r) { + if (!t || !t.length) return []; + var e = He(t); + return null == r + ? e + : c(e, function (t) { + return n(r, T, t); + }); + } + function Ye(n) { + return (n = An(n)), (n.__chain__ = true), n; + } + function Qe(n, t) { + return t(n); + } + function Xe() { + return this; + } + function nu(n, t) { + return (ff(n) ? r : uo)(n, ye(t, 3)); + } + function tu(n, t) { + return (ff(n) ? e : io)(n, ye(t, 3)); + } + function ru(n, t) { + return (ff(n) ? c : Gt)(n, ye(t, 3)); + } + function eu(n, t, r) { + return (t = r ? T : t), (t = n && null == t ? n.length : t), fe(n, 128, T, T, T, T, t); + } + function uu(n, t) { + var r; + if (typeof t != 'function') throw new ti('Expected a function'); + return ( + (n = Eu(n)), + function () { + return 0 < --n && (r = t.apply(this, arguments)), 1 >= n && (t = T), r; + } + ); + } + function iu(n, t, r) { + return (t = r ? T : t), (n = fe(n, 8, T, T, T, T, T, t)), (n.placeholder = iu.placeholder), n; + } + function ou(n, t, r) { + return ( + (t = r ? T : t), (n = fe(n, 16, T, T, T, T, T, t)), (n.placeholder = ou.placeholder), n + ); + } + function fu(n, t, r) { + function e(t) { + var r = c, + e = a; + return (c = a = T), (_ = t), (s = n.apply(e, r)); + } + function u(n) { + var r = n - p; + return (n -= _), p === T || r >= t || 0 > r || (g && n >= l); + } + function i() { + var n = Go(); + if (u(n)) return o(n); + var r, + e = bo; + (r = n - _), (n = t - (n - p)), (r = g ? Ci(n, l - r) : n), (h = e(i, r)); + } + function o(n) { + return (h = T), d && c ? e(n) : ((c = a = T), s); + } + function f() { + var n = Go(), + r = u(n); + if (((c = arguments), (a = this), (p = n), r)) { + if (h === T) return (_ = n = p), (h = bo(i, t)), v ? e(n) : s; + if (g) return lo(h), (h = bo(i, t)), e(p); + } + return h === T && (h = bo(i, t)), s; + } + var c, + a, + l, + s, + h, + p, + _ = 0, + v = false, + g = false, + d = true; + if (typeof n != 'function') throw new ti('Expected a function'); + return ( + (t = Su(t) || 0), + du(r) && + ((v = !!r.leading), + (l = (g = 'maxWait' in r) ? Ui(Su(r.maxWait) || 0, t) : l), + (d = 'trailing' in r ? !!r.trailing : d)), + (f.cancel = function () { + h !== T && lo(h), (_ = 0), (c = p = a = h = T); + }), + (f.flush = function () { + return h === T ? s : o(Go()); + }), + f + ); + } + function cu(n, t) { + function r() { + var e = arguments, + u = t ? t.apply(this, e) : e[0], + i = r.cache; + return i.has(u) ? i.get(u) : ((e = n.apply(this, e)), (r.cache = i.set(u, e) || i), e); + } + if (typeof n != 'function' || (null != t && typeof t != 'function')) + throw new ti('Expected a function'); + return (r.cache = new (cu.Cache || Fn)()), r; + } + function au(n) { + if (typeof n != 'function') throw new ti('Expected a function'); + return function () { + var t = arguments; + switch (t.length) { + case 0: + return !n.call(this); + case 1: + return !n.call(this, t[0]); + case 2: + return !n.call(this, t[0], t[1]); + case 3: + return !n.call(this, t[0], t[1], t[2]); + } + return !n.apply(this, t); + }; + } + function lu(n, t) { + return n === t || (n !== n && t !== t); + } + function su(n) { + return null != n && gu(n.length) && !_u(n); + } + function hu(n) { + return yu(n) && su(n); + } + function pu(n) { + if (!yu(n)) return false; + var t = Ot(n); + return ( + '[object Error]' == t || + '[object DOMException]' == t || + (typeof n.message == 'string' && typeof n.name == 'string' && !xu(n)) + ); + } + function _u(n) { + return ( + !!du(n) && + ((n = Ot(n)), + '[object Function]' == n || + '[object GeneratorFunction]' == n || + '[object AsyncFunction]' == n || + '[object Proxy]' == n) + ); + } + function vu(n) { + return typeof n == 'number' && n == Eu(n); + } + function gu(n) { + return typeof n == 'number' && -1 < n && 0 == n % 1 && 9007199254740991 >= n; + } + function du(n) { + var t = typeof n; + return null != n && ('object' == t || 'function' == t); + } + function yu(n) { + return null != n && typeof n == 'object'; + } + function bu(n) { + return typeof n == 'number' || (yu(n) && '[object Number]' == Ot(n)); + } + function xu(n) { + return ( + !(!yu(n) || '[object Object]' != Ot(n)) && + ((n = di(n)), + null === n || + ((n = oi.call(n, 'constructor') && n.constructor), + typeof n == 'function' && n instanceof n && ii.call(n) == li)) + ); + } + function ju(n) { + return typeof n == 'string' || (!ff(n) && yu(n) && '[object String]' == Ot(n)); + } + function wu(n) { + return typeof n == 'symbol' || (yu(n) && '[object Symbol]' == Ot(n)); + } + function mu(n) { + if (!n) return []; + if (su(n)) return ju(n) ? M(n) : Ur(n); + if (wi && n[wi]) { + n = n[wi](); + for (var t, r = []; !(t = n.next()).done; ) r.push(t.value); + return r; + } + return (t = vo(n)), ('[object Map]' == t ? W : '[object Set]' == t ? U : Uu)(n); + } + function Au(n) { + return n + ? ((n = Su(n)), + n === $ || n === -$ ? 1.7976931348623157e308 * (0 > n ? -1 : 1) : n === n ? n : 0) + : 0 === n + ? n + : 0; + } + function Eu(n) { + n = Au(n); + var t = n % 1; + return n === n ? (t ? n - t : n) : 0; + } + function ku(n) { + return n ? pt(Eu(n), 0, 4294967295) : 0; + } + function Su(n) { + if (typeof n == 'number') return n; + if (wu(n)) return F; + if ( + (du(n) && + ((n = typeof n.valueOf == 'function' ? n.valueOf() : n), (n = du(n) ? n + '' : n)), + typeof n != 'string') + ) + return 0 === n ? n : +n; + n = n.replace(un, ''); + var t = gn.test(n); + return t || yn.test(n) ? Dn(n.slice(2), t ? 2 : 8) : vn.test(n) ? F : +n; + } + function Ou(n) { + return Cr(n, Bu(n)); + } + function Iu(n) { + return null == n ? '' : yr(n); + } + function Ru(n, t, r) { + return (n = null == n ? T : kt(n, t)), n === T ? r : n; + } + function zu(n, t) { + return null != n && we(n, t, zt); + } + function Wu(n) { + return su(n) ? qn(n) : Vt(n); + } + function Bu(n) { + if (su(n)) n = qn(n, true); + else if (du(n)) { + var t, + r = ze(n), + e = []; + for (t in n) ('constructor' != t || (!r && oi.call(n, t))) && e.push(t); + n = e; + } else { + if (((t = []), null != n)) for (r in Qu(n)) t.push(r); + n = t; + } + return n; + } + function Lu(n, t) { + if (null == n) return {}; + var r = c(ve(n), function (n) { + return [n]; + }); + return ( + (t = ye(t)), + tr(n, r, function (n, r) { + return t(n, r[0]); + }) + ); + } + function Uu(n) { + return null == n ? [] : S(n, Wu(n)); + } + function Cu(n) { + return $f(Iu(n).toLowerCase()); + } + function Du(n) { + return (n = Iu(n)) && n.replace(xn, Xn).replace(Sn, ''); + } + function Mu(n, t, r) { + return ( + (n = Iu(n)), + (t = r ? T : t), + t === T ? (zn.test(n) ? n.match(In) || [] : n.match(sn) || []) : n.match(t) || [] + ); + } + function Tu(n) { + return function () { + return n; + }; + } + function $u(n) { + return n; + } + function Fu(n) { + return qt(typeof n == 'function' ? n : _t(n, 1)); + } + function Nu(n, t, e) { + var u = Wu(t), + i = Et(t, u); + null != e || + (du(t) && (i.length || !u.length)) || + ((e = t), (t = n), (n = this), (i = Et(t, Wu(t)))); + var o = !(du(e) && 'chain' in e && !e.chain), + f = _u(n); + return ( + r(i, function (r) { + var e = t[r]; + (n[r] = e), + f && + (n.prototype[r] = function () { + var t = this.__chain__; + if (o || t) { + var r = n(this.__wrapped__); + return ( + (r.__actions__ = Ur(this.__actions__)).push({ + func: e, + args: arguments, + thisArg: n, + }), + (r.__chain__ = t), + r + ); + } + return e.apply(n, a([this.value()], arguments)); + }); + }), + n + ); + } + function Pu() {} + function Zu(n) { + return Ie(n) ? b(Me(n)) : rr(n); + } + function qu() { + return []; + } + function Vu() { + return false; + } + mn = null == mn ? $n : rt.defaults($n.Object(), mn, rt.pick($n, Wn)); + var Ku = mn.Array, + Gu = mn.Date, + Hu = mn.Error, + Ju = mn.Function, + Yu = mn.Math, + Qu = mn.Object, + Xu = mn.RegExp, + ni = mn.String, + ti = mn.TypeError, + ri = Ku.prototype, + ei = Qu.prototype, + ui = mn['__core-js_shared__'], + ii = Ju.prototype.toString, + oi = ei.hasOwnProperty, + fi = 0, + ci = (function () { + var n = /[^.]+$/.exec((ui && ui.keys && ui.keys.IE_PROTO) || ''); + return n ? 'Symbol(src)_1.' + n : ''; + })(), + ai = ei.toString, + li = ii.call(Qu), + si = $n._, + hi = Xu( + '^' + + ii + .call(oi) + .replace(rn, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + + '$', + ), + pi = Pn ? mn.Buffer : T, + _i = mn.Symbol, + vi = mn.Uint8Array, + gi = pi ? pi.g : T, + di = B(Qu.getPrototypeOf, Qu), + yi = Qu.create, + bi = ei.propertyIsEnumerable, + xi = ri.splice, + ji = _i ? _i.isConcatSpreadable : T, + wi = _i ? _i.iterator : T, + mi = _i ? _i.toStringTag : T, + Ai = (function () { + try { + var n = je(Qu, 'defineProperty'); + return n({}, '', {}), n; + } catch (n) {} + })(), + Ei = mn.clearTimeout !== $n.clearTimeout && mn.clearTimeout, + ki = Gu && Gu.now !== $n.Date.now && Gu.now, + Si = mn.setTimeout !== $n.setTimeout && mn.setTimeout, + Oi = Yu.ceil, + Ii = Yu.floor, + Ri = Qu.getOwnPropertySymbols, + zi = pi ? pi.isBuffer : T, + Wi = mn.isFinite, + Bi = ri.join, + Li = B(Qu.keys, Qu), + Ui = Yu.max, + Ci = Yu.min, + Di = Gu.now, + Mi = mn.parseInt, + Ti = Yu.random, + $i = ri.reverse, + Fi = je(mn, 'DataView'), + Ni = je(mn, 'Map'), + Pi = je(mn, 'Promise'), + Zi = je(mn, 'Set'), + qi = je(mn, 'WeakMap'), + Vi = je(Qu, 'create'), + Ki = qi && new qi(), + Gi = {}, + Hi = Te(Fi), + Ji = Te(Ni), + Yi = Te(Pi), + Qi = Te(Zi), + Xi = Te(qi), + no = _i ? _i.prototype : T, + to = no ? no.valueOf : T, + ro = no ? no.toString : T, + eo = (function () { + function n() {} + return function (t) { + return du(t) + ? yi + ? yi(t) + : ((n.prototype = t), (t = new n()), (n.prototype = T), t) + : {}; + }; + })(); + (An.templateSettings = { + escape: J, + evaluate: Y, + interpolate: Q, + variable: '', + imports: { _: An }, + }), + (An.prototype = En.prototype), + (An.prototype.constructor = An), + (On.prototype = eo(En.prototype)), + (On.prototype.constructor = On), + (Un.prototype = eo(En.prototype)), + (Un.prototype.constructor = Un), + (Mn.prototype.clear = function () { + (this.__data__ = Vi ? Vi(null) : {}), (this.size = 0); + }), + (Mn.prototype.delete = function (n) { + return (n = this.has(n) && delete this.__data__[n]), (this.size -= n ? 1 : 0), n; + }), + (Mn.prototype.get = function (n) { + var t = this.__data__; + return Vi + ? ((n = t[n]), '__lodash_hash_undefined__' === n ? T : n) + : oi.call(t, n) + ? t[n] + : T; + }), + (Mn.prototype.has = function (n) { + var t = this.__data__; + return Vi ? t[n] !== T : oi.call(t, n); + }), + (Mn.prototype.set = function (n, t) { + var r = this.__data__; + return ( + (this.size += this.has(n) ? 0 : 1), + (r[n] = Vi && t === T ? '__lodash_hash_undefined__' : t), + this + ); + }), + (Tn.prototype.clear = function () { + (this.__data__ = []), (this.size = 0); + }), + (Tn.prototype.delete = function (n) { + var t = this.__data__; + return ( + (n = ft(t, n)), + !(0 > n) && (n == t.length - 1 ? t.pop() : xi.call(t, n, 1), --this.size, true) + ); + }), + (Tn.prototype.get = function (n) { + var t = this.__data__; + return (n = ft(t, n)), 0 > n ? T : t[n][1]; + }), + (Tn.prototype.has = function (n) { + return -1 < ft(this.__data__, n); + }), + (Tn.prototype.set = function (n, t) { + var r = this.__data__, + e = ft(r, n); + return 0 > e ? (++this.size, r.push([n, t])) : (r[e][1] = t), this; + }), + (Fn.prototype.clear = function () { + (this.size = 0), + (this.__data__ = { hash: new Mn(), map: new (Ni || Tn)(), string: new Mn() }); + }), + (Fn.prototype.delete = function (n) { + return (n = be(this, n).delete(n)), (this.size -= n ? 1 : 0), n; + }), + (Fn.prototype.get = function (n) { + return be(this, n).get(n); + }), + (Fn.prototype.has = function (n) { + return be(this, n).has(n); + }), + (Fn.prototype.set = function (n, t) { + var r = be(this, n), + e = r.size; + return r.set(n, t), (this.size += r.size == e ? 0 : 1), this; + }), + (Nn.prototype.add = Nn.prototype.push = + function (n) { + return this.__data__.set(n, '__lodash_hash_undefined__'), this; + }), + (Nn.prototype.has = function (n) { + return this.__data__.has(n); + }), + (Zn.prototype.clear = function () { + (this.__data__ = new Tn()), (this.size = 0); + }), + (Zn.prototype.delete = function (n) { + var t = this.__data__; + return (n = t.delete(n)), (this.size = t.size), n; + }), + (Zn.prototype.get = function (n) { + return this.__data__.get(n); + }), + (Zn.prototype.has = function (n) { + return this.__data__.has(n); + }), + (Zn.prototype.set = function (n, t) { + var r = this.__data__; + if (r instanceof Tn) { + var e = r.__data__; + if (!Ni || 199 > e.length) return e.push([n, t]), (this.size = ++r.size), this; + r = this.__data__ = new Fn(e); + } + return r.set(n, t), (this.size = r.size), this; + }); + var uo = Fr(mt), + io = Fr(At, true), + oo = Nr(), + fo = Nr(true), + co = Ki + ? function (n, t) { + return Ki.set(n, t), n; + } + : $u, + ao = Ai + ? function (n, t) { + return Ai(n, 'toString', { + configurable: true, + enumerable: false, + value: Tu(t), + writable: true, + }); + } + : $u, + lo = + Ei || + function (n) { + return $n.clearTimeout(n); + }, + so = + Zi && 1 / U(new Zi([, -0]))[1] == $ + ? function (n) { + return new Zi(n); + } + : Pu, + ho = Ki + ? function (n) { + return Ki.get(n); + } + : Pu, + po = Ri + ? function (n) { + return null == n + ? [] + : ((n = Qu(n)), + i(Ri(n), function (t) { + return bi.call(n, t); + })); + } + : qu, + _o = Ri + ? function (n) { + for (var t = []; n; ) a(t, po(n)), (n = di(n)); + return t; + } + : qu, + vo = Ot; + ((Fi && '[object DataView]' != vo(new Fi(new ArrayBuffer(1)))) || + (Ni && '[object Map]' != vo(new Ni())) || + (Pi && '[object Promise]' != vo(Pi.resolve())) || + (Zi && '[object Set]' != vo(new Zi())) || + (qi && '[object WeakMap]' != vo(new qi()))) && + (vo = function (n) { + var t = Ot(n); + if ((n = (n = '[object Object]' == t ? n.constructor : T) ? Te(n) : '')) + switch (n) { + case Hi: + return '[object DataView]'; + case Ji: + return '[object Map]'; + case Yi: + return '[object Promise]'; + case Qi: + return '[object Set]'; + case Xi: + return '[object WeakMap]'; + } + return t; + }); + var go = ui ? _u : Vu, + yo = Ce(co), + bo = + Si || + function (n, t) { + return $n.setTimeout(n, t); + }, + xo = Ce(ao), + jo = (function (n) { + n = cu(n, function (n) { + return 500 === t.size && t.clear(), n; + }); + var t = n.cache; + return n; + })(function (n) { + var t = []; + return ( + 46 === n.charCodeAt(0) && t.push(''), + n.replace(tn, function (n, r, e, u) { + t.push(e ? u.replace(hn, '$1') : r || n); + }), + t + ); + }), + wo = fr(function (n, t) { + return hu(n) ? yt(n, wt(t, 1, hu, true)) : []; + }), + mo = fr(function (n, t) { + var r = Ve(t); + return hu(r) && (r = T), hu(n) ? yt(n, wt(t, 1, hu, true), ye(r, 2)) : []; + }), + Ao = fr(function (n, t) { + var r = Ve(t); + return hu(r) && (r = T), hu(n) ? yt(n, wt(t, 1, hu, true), T, r) : []; + }), + Eo = fr(function (n) { + var t = c(n, Er); + return t.length && t[0] === n[0] ? Wt(t) : []; + }), + ko = fr(function (n) { + var t = Ve(n), + r = c(n, Er); + return t === Ve(r) ? (t = T) : r.pop(), r.length && r[0] === n[0] ? Wt(r, ye(t, 2)) : []; + }), + So = fr(function (n) { + var t = Ve(n), + r = c(n, Er); + return ( + (t = typeof t == 'function' ? t : T) && r.pop(), + r.length && r[0] === n[0] ? Wt(r, T, t) : [] + ); + }), + Oo = fr(Ke), + Io = pe(function (n, t) { + var r = null == n ? 0 : n.length, + e = ht(n, t); + return ( + ur( + n, + c(t, function (n) { + return Se(n, r) ? +n : n; + }).sort(Wr), + ), + e + ); + }), + Ro = fr(function (n) { + return br(wt(n, 1, hu, true)); + }), + zo = fr(function (n) { + var t = Ve(n); + return hu(t) && (t = T), br(wt(n, 1, hu, true), ye(t, 2)); + }), + Wo = fr(function (n) { + var t = Ve(n), + t = typeof t == 'function' ? t : T; + return br(wt(n, 1, hu, true), T, t); + }), + Bo = fr(function (n, t) { + return hu(n) ? yt(n, t) : []; + }), + Lo = fr(function (n) { + return mr(i(n, hu)); + }), + Uo = fr(function (n) { + var t = Ve(n); + return hu(t) && (t = T), mr(i(n, hu), ye(t, 2)); + }), + Co = fr(function (n) { + var t = Ve(n), + t = typeof t == 'function' ? t : T; + return mr(i(n, hu), T, t); + }), + Do = fr(He), + Mo = fr(function (n) { + var t = n.length, + t = 1 < t ? n[t - 1] : T, + t = typeof t == 'function' ? (n.pop(), t) : T; + return Je(n, t); + }), + To = pe(function (n) { + function t(t) { + return ht(t, n); + } + var r = n.length, + e = r ? n[0] : 0, + u = this.__wrapped__; + return !(1 < r || this.__actions__.length) && u instanceof Un && Se(e) + ? ((u = u.slice(e, +e + (r ? 1 : 0))), + u.__actions__.push({ func: Qe, args: [t], thisArg: T }), + new On(u, this.__chain__).thru(function (n) { + return r && !n.length && n.push(T), n; + })) + : this.thru(t); + }), + $o = Tr(function (n, t, r) { + oi.call(n, r) ? ++n[r] : st(n, r, 1); + }), + Fo = Gr(Ne), + No = Gr(Pe), + Po = Tr(function (n, t, r) { + oi.call(n, r) ? n[r].push(t) : st(n, r, [t]); + }), + Zo = fr(function (t, r, e) { + var u = -1, + i = typeof r == 'function', + o = su(t) ? Ku(t.length) : []; + return ( + uo(t, function (t) { + o[++u] = i ? n(r, t, e) : Lt(t, r, e); + }), + o + ); + }), + qo = Tr(function (n, t, r) { + st(n, r, t); + }), + Vo = Tr( + function (n, t, r) { + n[r ? 0 : 1].push(t); + }, + function () { + return [[], []]; + }, + ), + Ko = fr(function (n, t) { + if (null == n) return []; + var r = t.length; + return ( + 1 < r && Oe(n, t[0], t[1]) ? (t = []) : 2 < r && Oe(t[0], t[1], t[2]) && (t = [t[0]]), + Xt(n, wt(t, 1), []) + ); + }), + Go = + ki || + function () { + return $n.Date.now(); + }, + Ho = fr(function (n, t, r) { + var e = 1; + if (r.length) + var u = L(r, de(Ho)), + e = 32 | e; + return fe(n, e, t, r, u); + }), + Jo = fr(function (n, t, r) { + var e = 3; + if (r.length) + var u = L(r, de(Jo)), + e = 32 | e; + return fe(t, e, n, r, u); + }), + Yo = fr(function (n, t) { + return dt(n, 1, t); + }), + Qo = fr(function (n, t, r) { + return dt(n, Su(t) || 0, r); + }); + cu.Cache = Fn; + var Xo = fr(function (t, r) { + r = 1 == r.length && ff(r[0]) ? c(r[0], k(ye())) : c(wt(r, 1), k(ye())); + var e = r.length; + return fr(function (u) { + for (var i = -1, o = Ci(u.length, e); ++i < o; ) u[i] = r[i].call(this, u[i]); + return n(t, this, u); + }); + }), + nf = fr(function (n, t) { + return fe(n, 32, T, t, L(t, de(nf))); + }), + tf = fr(function (n, t) { + return fe(n, 64, T, t, L(t, de(tf))); + }), + rf = pe(function (n, t) { + return fe(n, 256, T, T, T, t); + }), + ef = ee(It), + uf = ee(function (n, t) { + return n >= t; + }), + of = Ut( + (function () { + return arguments; + })(), + ) + ? Ut + : function (n) { + return yu(n) && oi.call(n, 'callee') && !bi.call(n, 'callee'); + }, + ff = Ku.isArray, + cf = Vn ? k(Vn) : Ct, + af = zi || Vu, + lf = Kn ? k(Kn) : Dt, + sf = Gn ? k(Gn) : Tt, + hf = Hn ? k(Hn) : Nt, + pf = Jn ? k(Jn) : Pt, + _f = Yn ? k(Yn) : Zt, + vf = ee(Kt), + gf = ee(function (n, t) { + return n <= t; + }), + df = $r(function (n, t) { + if (ze(t) || su(t)) Cr(t, Wu(t), n); + else for (var r in t) oi.call(t, r) && ot(n, r, t[r]); + }), + yf = $r(function (n, t) { + Cr(t, Bu(t), n); + }), + bf = $r(function (n, t, r, e) { + Cr(t, Bu(t), n, e); + }), + xf = $r(function (n, t, r, e) { + Cr(t, Wu(t), n, e); + }), + jf = pe(ht), + wf = fr(function (n, t) { + n = Qu(n); + var r = -1, + e = t.length, + u = 2 < e ? t[2] : T; + for (u && Oe(t[0], t[1], u) && (e = 1); ++r < e; ) + for (var u = t[r], i = Bu(u), o = -1, f = i.length; ++o < f; ) { + var c = i[o], + a = n[c]; + (a === T || (lu(a, ei[c]) && !oi.call(n, c))) && (n[c] = u[c]); + } + return n; + }), + mf = fr(function (t) { + return t.push(T, ae), n(Of, T, t); + }), + Af = Yr(function (n, t, r) { + null != t && typeof t.toString != 'function' && (t = ai.call(t)), (n[t] = r); + }, Tu($u)), + Ef = Yr(function (n, t, r) { + null != t && typeof t.toString != 'function' && (t = ai.call(t)), + oi.call(n, t) ? n[t].push(r) : (n[t] = [r]); + }, ye), + kf = fr(Lt), + Sf = $r(function (n, t, r) { + Yt(n, t, r); + }), + Of = $r(function (n, t, r, e) { + Yt(n, t, r, e); + }), + If = pe(function (n, t) { + var r = {}; + if (null == n) return r; + var e = false; + (t = c(t, function (t) { + return (t = Sr(t, n)), e || (e = 1 < t.length), t; + })), + Cr(n, ve(n), r), + e && (r = _t(r, 7, le)); + for (var u = t.length; u--; ) xr(r, t[u]); + return r; + }), + Rf = pe(function (n, t) { + return null == n ? {} : nr(n, t); + }), + zf = oe(Wu), + Wf = oe(Bu), + Bf = qr(function (n, t, r) { + return (t = t.toLowerCase()), n + (r ? Cu(t) : t); + }), + Lf = qr(function (n, t, r) { + return n + (r ? '-' : '') + t.toLowerCase(); + }), + Uf = qr(function (n, t, r) { + return n + (r ? ' ' : '') + t.toLowerCase(); + }), + Cf = Zr('toLowerCase'), + Df = qr(function (n, t, r) { + return n + (r ? '_' : '') + t.toLowerCase(); + }), + Mf = qr(function (n, t, r) { + return n + (r ? ' ' : '') + $f(t); + }), + Tf = qr(function (n, t, r) { + return n + (r ? ' ' : '') + t.toUpperCase(); + }), + $f = Zr('toUpperCase'), + Ff = fr(function (t, r) { + try { + return n(t, T, r); + } catch (n) { + return pu(n) ? n : new Hu(n); + } + }), + Nf = pe(function (n, t) { + return ( + r(t, function (t) { + (t = Me(t)), st(n, t, Ho(n[t], n)); + }), + n + ); + }), + Pf = Hr(), + Zf = Hr(true), + qf = fr(function (n, t) { + return function (r) { + return Lt(r, n, t); + }; + }), + Vf = fr(function (n, t) { + return function (r) { + return Lt(n, r, t); + }; + }), + Kf = Xr(c), + Gf = Xr(u), + Hf = Xr(h), + Jf = re(), + Yf = re(true), + Qf = Qr(function (n, t) { + return n + t; + }, 0), + Xf = ie('ceil'), + nc = Qr(function (n, t) { + return n / t; + }, 1), + tc = ie('floor'), + rc = Qr(function (n, t) { + return n * t; + }, 1), + ec = ie('round'), + uc = Qr(function (n, t) { + return n - t; + }, 0); + return ( + (An.after = function (n, t) { + if (typeof t != 'function') throw new ti('Expected a function'); + return ( + (n = Eu(n)), + function () { + if (1 > --n) return t.apply(this, arguments); + } + ); + }), + (An.ary = eu), + (An.assign = df), + (An.assignIn = yf), + (An.assignInWith = bf), + (An.assignWith = xf), + (An.at = jf), + (An.before = uu), + (An.bind = Ho), + (An.bindAll = Nf), + (An.bindKey = Jo), + (An.castArray = function () { + if (!arguments.length) return []; + var n = arguments[0]; + return ff(n) ? n : [n]; + }), + (An.chain = Ye), + (An.chunk = function (n, t, r) { + if ( + ((t = (r ? Oe(n, t, r) : t === T) ? 1 : Ui(Eu(t), 0)), + (r = null == n ? 0 : n.length), + !r || 1 > t) + ) + return []; + for (var e = 0, u = 0, i = Ku(Oi(r / t)); e < r; ) i[u++] = hr(n, e, (e += t)); + return i; + }), + (An.compact = function (n) { + for (var t = -1, r = null == n ? 0 : n.length, e = 0, u = []; ++t < r; ) { + var i = n[t]; + i && (u[e++] = i); + } + return u; + }), + (An.concat = function () { + var n = arguments.length; + if (!n) return []; + for (var t = Ku(n - 1), r = arguments[0]; n--; ) t[n - 1] = arguments[n]; + return a(ff(r) ? Ur(r) : [r], wt(t, 1)); + }), + (An.cond = function (t) { + var r = null == t ? 0 : t.length, + e = ye(); + return ( + (t = r + ? c(t, function (n) { + if ('function' != typeof n[1]) throw new ti('Expected a function'); + return [e(n[0]), n[1]]; + }) + : []), + fr(function (e) { + for (var u = -1; ++u < r; ) { + var i = t[u]; + if (n(i[0], this, e)) return n(i[1], this, e); + } + }) + ); + }), + (An.conforms = function (n) { + return vt(_t(n, 1)); + }), + (An.constant = Tu), + (An.countBy = $o), + (An.create = function (n, t) { + var r = eo(n); + return null == t ? r : at(r, t); + }), + (An.curry = iu), + (An.curryRight = ou), + (An.debounce = fu), + (An.defaults = wf), + (An.defaultsDeep = mf), + (An.defer = Yo), + (An.delay = Qo), + (An.difference = wo), + (An.differenceBy = mo), + (An.differenceWith = Ao), + (An.drop = function (n, t, r) { + var e = null == n ? 0 : n.length; + return e ? ((t = r || t === T ? 1 : Eu(t)), hr(n, 0 > t ? 0 : t, e)) : []; + }), + (An.dropRight = function (n, t, r) { + var e = null == n ? 0 : n.length; + return e ? ((t = r || t === T ? 1 : Eu(t)), (t = e - t), hr(n, 0, 0 > t ? 0 : t)) : []; + }), + (An.dropRightWhile = function (n, t) { + return n && n.length ? jr(n, ye(t, 3), true, true) : []; + }), + (An.dropWhile = function (n, t) { + return n && n.length ? jr(n, ye(t, 3), true) : []; + }), + (An.fill = function (n, t, r, e) { + var u = null == n ? 0 : n.length; + if (!u) return []; + for ( + r && typeof r != 'number' && Oe(n, t, r) && ((r = 0), (e = u)), + u = n.length, + r = Eu(r), + 0 > r && (r = -r > u ? 0 : u + r), + e = e === T || e > u ? u : Eu(e), + 0 > e && (e += u), + e = r > e ? 0 : ku(e); + r < e; + + ) + n[r++] = t; + return n; + }), + (An.filter = function (n, t) { + return (ff(n) ? i : jt)(n, ye(t, 3)); + }), + (An.flatMap = function (n, t) { + return wt(ru(n, t), 1); + }), + (An.flatMapDeep = function (n, t) { + return wt(ru(n, t), $); + }), + (An.flatMapDepth = function (n, t, r) { + return (r = r === T ? 1 : Eu(r)), wt(ru(n, t), r); + }), + (An.flatten = Ze), + (An.flattenDeep = function (n) { + return (null == n ? 0 : n.length) ? wt(n, $) : []; + }), + (An.flattenDepth = function (n, t) { + return null != n && n.length ? ((t = t === T ? 1 : Eu(t)), wt(n, t)) : []; + }), + (An.flip = function (n) { + return fe(n, 512); + }), + (An.flow = Pf), + (An.flowRight = Zf), + (An.fromPairs = function (n) { + for (var t = -1, r = null == n ? 0 : n.length, e = {}; ++t < r; ) { + var u = n[t]; + e[u[0]] = u[1]; + } + return e; + }), + (An.functions = function (n) { + return null == n ? [] : Et(n, Wu(n)); + }), + (An.functionsIn = function (n) { + return null == n ? [] : Et(n, Bu(n)); + }), + (An.groupBy = Po), + (An.initial = function (n) { + return (null == n ? 0 : n.length) ? hr(n, 0, -1) : []; + }), + (An.intersection = Eo), + (An.intersectionBy = ko), + (An.intersectionWith = So), + (An.invert = Af), + (An.invertBy = Ef), + (An.invokeMap = Zo), + (An.iteratee = Fu), + (An.keyBy = qo), + (An.keys = Wu), + (An.keysIn = Bu), + (An.map = ru), + (An.mapKeys = function (n, t) { + var r = {}; + return ( + (t = ye(t, 3)), + mt(n, function (n, e, u) { + st(r, t(n, e, u), n); + }), + r + ); + }), + (An.mapValues = function (n, t) { + var r = {}; + return ( + (t = ye(t, 3)), + mt(n, function (n, e, u) { + st(r, e, t(n, e, u)); + }), + r + ); + }), + (An.matches = function (n) { + return Ht(_t(n, 1)); + }), + (An.matchesProperty = function (n, t) { + return Jt(n, _t(t, 1)); + }), + (An.memoize = cu), + (An.merge = Sf), + (An.mergeWith = Of), + (An.method = qf), + (An.methodOf = Vf), + (An.mixin = Nu), + (An.negate = au), + (An.nthArg = function (n) { + return ( + (n = Eu(n)), + fr(function (t) { + return Qt(t, n); + }) + ); + }), + (An.omit = If), + (An.omitBy = function (n, t) { + return Lu(n, au(ye(t))); + }), + (An.once = function (n) { + return uu(2, n); + }), + (An.orderBy = function (n, t, r, e) { + return null == n + ? [] + : (ff(t) || (t = null == t ? [] : [t]), + (r = e ? T : r), + ff(r) || (r = null == r ? [] : [r]), + Xt(n, t, r)); + }), + (An.over = Kf), + (An.overArgs = Xo), + (An.overEvery = Gf), + (An.overSome = Hf), + (An.partial = nf), + (An.partialRight = tf), + (An.partition = Vo), + (An.pick = Rf), + (An.pickBy = Lu), + (An.property = Zu), + (An.propertyOf = function (n) { + return function (t) { + return null == n ? T : kt(n, t); + }; + }), + (An.pull = Oo), + (An.pullAll = Ke), + (An.pullAllBy = function (n, t, r) { + return n && n.length && t && t.length ? er(n, t, ye(r, 2)) : n; + }), + (An.pullAllWith = function (n, t, r) { + return n && n.length && t && t.length ? er(n, t, T, r) : n; + }), + (An.pullAt = Io), + (An.range = Jf), + (An.rangeRight = Yf), + (An.rearg = rf), + (An.reject = function (n, t) { + return (ff(n) ? i : jt)(n, au(ye(t, 3))); + }), + (An.remove = function (n, t) { + var r = []; + if (!n || !n.length) return r; + var e = -1, + u = [], + i = n.length; + for (t = ye(t, 3); ++e < i; ) { + var o = n[e]; + t(o, e, n) && (r.push(o), u.push(e)); + } + return ur(n, u), r; + }), + (An.rest = function (n, t) { + if (typeof n != 'function') throw new ti('Expected a function'); + return (t = t === T ? t : Eu(t)), fr(n, t); + }), + (An.reverse = Ge), + (An.sampleSize = function (n, t, r) { + return (t = (r ? Oe(n, t, r) : t === T) ? 1 : Eu(t)), (ff(n) ? et : ar)(n, t); + }), + (An.set = function (n, t, r) { + return null == n ? n : lr(n, t, r); + }), + (An.setWith = function (n, t, r, e) { + return (e = typeof e == 'function' ? e : T), null == n ? n : lr(n, t, r, e); + }), + (An.shuffle = function (n) { + return (ff(n) ? ut : sr)(n); + }), + (An.slice = function (n, t, r) { + var e = null == n ? 0 : n.length; + return e + ? (r && typeof r != 'number' && Oe(n, t, r) + ? ((t = 0), (r = e)) + : ((t = null == t ? 0 : Eu(t)), (r = r === T ? e : Eu(r))), + hr(n, t, r)) + : []; + }), + (An.sortBy = Ko), + (An.sortedUniq = function (n) { + return n && n.length ? gr(n) : []; + }), + (An.sortedUniqBy = function (n, t) { + return n && n.length ? gr(n, ye(t, 2)) : []; + }), + (An.split = function (n, t, r) { + return ( + r && typeof r != 'number' && Oe(n, t, r) && (t = r = T), + (r = r === T ? 4294967295 : r >>> 0), + r + ? (n = Iu(n)) && + (typeof t == 'string' || (null != t && !hf(t))) && + ((t = yr(t)), !t && Rn.test(n)) + ? Or(M(n), 0, r) + : n.split(t, r) + : [] + ); + }), + (An.spread = function (t, r) { + if (typeof t != 'function') throw new ti('Expected a function'); + return ( + (r = null == r ? 0 : Ui(Eu(r), 0)), + fr(function (e) { + var u = e[r]; + return (e = Or(e, 0, r)), u && a(e, u), n(t, this, e); + }) + ); + }), + (An.tail = function (n) { + var t = null == n ? 0 : n.length; + return t ? hr(n, 1, t) : []; + }), + (An.take = function (n, t, r) { + return n && n.length ? ((t = r || t === T ? 1 : Eu(t)), hr(n, 0, 0 > t ? 0 : t)) : []; + }), + (An.takeRight = function (n, t, r) { + var e = null == n ? 0 : n.length; + return e ? ((t = r || t === T ? 1 : Eu(t)), (t = e - t), hr(n, 0 > t ? 0 : t, e)) : []; + }), + (An.takeRightWhile = function (n, t) { + return n && n.length ? jr(n, ye(t, 3), false, true) : []; + }), + (An.takeWhile = function (n, t) { + return n && n.length ? jr(n, ye(t, 3)) : []; + }), + (An.tap = function (n, t) { + return t(n), n; + }), + (An.throttle = function (n, t, r) { + var e = true, + u = true; + if (typeof n != 'function') throw new ti('Expected a function'); + return ( + du(r) && + ((e = 'leading' in r ? !!r.leading : e), (u = 'trailing' in r ? !!r.trailing : u)), + fu(n, t, { leading: e, maxWait: t, trailing: u }) + ); + }), + (An.thru = Qe), + (An.toArray = mu), + (An.toPairs = zf), + (An.toPairsIn = Wf), + (An.toPath = function (n) { + return ff(n) ? c(n, Me) : wu(n) ? [n] : Ur(jo(Iu(n))); + }), + (An.toPlainObject = Ou), + (An.transform = function (n, t, e) { + var u = ff(n), + i = u || af(n) || _f(n); + if (((t = ye(t, 4)), null == e)) { + var o = n && n.constructor; + e = i ? (u ? new o() : []) : du(n) && _u(o) ? eo(di(n)) : {}; + } + return ( + (i ? r : mt)(n, function (n, r, u) { + return t(e, n, r, u); + }), + e + ); + }), + (An.unary = function (n) { + return eu(n, 1); + }), + (An.union = Ro), + (An.unionBy = zo), + (An.unionWith = Wo), + (An.uniq = function (n) { + return n && n.length ? br(n) : []; + }), + (An.uniqBy = function (n, t) { + return n && n.length ? br(n, ye(t, 2)) : []; + }), + (An.uniqWith = function (n, t) { + return (t = typeof t == 'function' ? t : T), n && n.length ? br(n, T, t) : []; + }), + (An.unset = function (n, t) { + return null == n || xr(n, t); + }), + (An.unzip = He), + (An.unzipWith = Je), + (An.update = function (n, t, r) { + return null == n ? n : lr(n, t, kr(r)(kt(n, t)), void 0); + }), + (An.updateWith = function (n, t, r, e) { + return ( + (e = typeof e == 'function' ? e : T), null != n && (n = lr(n, t, kr(r)(kt(n, t)), e)), n + ); + }), + (An.values = Uu), + (An.valuesIn = function (n) { + return null == n ? [] : S(n, Bu(n)); + }), + (An.without = Bo), + (An.words = Mu), + (An.wrap = function (n, t) { + return nf(kr(t), n); + }), + (An.xor = Lo), + (An.xorBy = Uo), + (An.xorWith = Co), + (An.zip = Do), + (An.zipObject = function (n, t) { + return Ar(n || [], t || [], ot); + }), + (An.zipObjectDeep = function (n, t) { + return Ar(n || [], t || [], lr); + }), + (An.zipWith = Mo), + (An.entries = zf), + (An.entriesIn = Wf), + (An.extend = yf), + (An.extendWith = bf), + Nu(An, An), + (An.add = Qf), + (An.attempt = Ff), + (An.camelCase = Bf), + (An.capitalize = Cu), + (An.ceil = Xf), + (An.clamp = function (n, t, r) { + return ( + r === T && ((r = t), (t = T)), + r !== T && ((r = Su(r)), (r = r === r ? r : 0)), + t !== T && ((t = Su(t)), (t = t === t ? t : 0)), + pt(Su(n), t, r) + ); + }), + (An.clone = function (n) { + return _t(n, 4); + }), + (An.cloneDeep = function (n) { + return _t(n, 5); + }), + (An.cloneDeepWith = function (n, t) { + return (t = typeof t == 'function' ? t : T), _t(n, 5, t); + }), + (An.cloneWith = function (n, t) { + return (t = typeof t == 'function' ? t : T), _t(n, 4, t); + }), + (An.conformsTo = function (n, t) { + return null == t || gt(n, t, Wu(t)); + }), + (An.deburr = Du), + (An.defaultTo = function (n, t) { + return null == n || n !== n ? t : n; + }), + (An.divide = nc), + (An.endsWith = function (n, t, r) { + (n = Iu(n)), (t = yr(t)); + var e = n.length, + e = (r = r === T ? e : pt(Eu(r), 0, e)); + return (r -= t.length), 0 <= r && n.slice(r, e) == t; + }), + (An.eq = lu), + (An.escape = function (n) { + return (n = Iu(n)) && H.test(n) ? n.replace(K, nt) : n; + }), + (An.escapeRegExp = function (n) { + return (n = Iu(n)) && en.test(n) ? n.replace(rn, '\\$&') : n; + }), + (An.every = function (n, t, r) { + var e = ff(n) ? u : bt; + return r && Oe(n, t, r) && (t = T), e(n, ye(t, 3)); + }), + (An.find = Fo), + (An.findIndex = Ne), + (An.findKey = function (n, t) { + return p(n, ye(t, 3), mt); + }), + (An.findLast = No), + (An.findLastIndex = Pe), + (An.findLastKey = function (n, t) { + return p(n, ye(t, 3), At); + }), + (An.floor = tc), + (An.forEach = nu), + (An.forEachRight = tu), + (An.forIn = function (n, t) { + return null == n ? n : oo(n, ye(t, 3), Bu); + }), + (An.forInRight = function (n, t) { + return null == n ? n : fo(n, ye(t, 3), Bu); + }), + (An.forOwn = function (n, t) { + return n && mt(n, ye(t, 3)); + }), + (An.forOwnRight = function (n, t) { + return n && At(n, ye(t, 3)); + }), + (An.get = Ru), + (An.gt = ef), + (An.gte = uf), + (An.has = function (n, t) { + return null != n && we(n, t, Rt); + }), + (An.hasIn = zu), + (An.head = qe), + (An.identity = $u), + (An.includes = function (n, t, r, e) { + return ( + (n = su(n) ? n : Uu(n)), + (r = r && !e ? Eu(r) : 0), + (e = n.length), + 0 > r && (r = Ui(e + r, 0)), + ju(n) ? r <= e && -1 < n.indexOf(t, r) : !!e && -1 < v(n, t, r) + ); + }), + (An.indexOf = function (n, t, r) { + var e = null == n ? 0 : n.length; + return e ? ((r = null == r ? 0 : Eu(r)), 0 > r && (r = Ui(e + r, 0)), v(n, t, r)) : -1; + }), + (An.inRange = function (n, t, r) { + return ( + (t = Au(t)), + r === T ? ((r = t), (t = 0)) : (r = Au(r)), + (n = Su(n)), + n >= Ci(t, r) && n < Ui(t, r) + ); + }), + (An.invoke = kf), + (An.isArguments = of), + (An.isArray = ff), + (An.isArrayBuffer = cf), + (An.isArrayLike = su), + (An.isArrayLikeObject = hu), + (An.isBoolean = function (n) { + return true === n || false === n || (yu(n) && '[object Boolean]' == Ot(n)); + }), + (An.isBuffer = af), + (An.isDate = lf), + (An.isElement = function (n) { + return yu(n) && 1 === n.nodeType && !xu(n); + }), + (An.isEmpty = function (n) { + if (null == n) return true; + if ( + su(n) && + (ff(n) || + typeof n == 'string' || + typeof n.splice == 'function' || + af(n) || + _f(n) || + of(n)) + ) + return !n.length; + var t = vo(n); + if ('[object Map]' == t || '[object Set]' == t) return !n.size; + if (ze(n)) return !Vt(n).length; + for (var r in n) if (oi.call(n, r)) return false; + return true; + }), + (An.isEqual = function (n, t) { + return Mt(n, t); + }), + (An.isEqualWith = function (n, t, r) { + var e = (r = typeof r == 'function' ? r : T) ? r(n, t) : T; + return e === T ? Mt(n, t, T, r) : !!e; + }), + (An.isError = pu), + (An.isFinite = function (n) { + return typeof n == 'number' && Wi(n); + }), + (An.isFunction = _u), + (An.isInteger = vu), + (An.isLength = gu), + (An.isMap = sf), + (An.isMatch = function (n, t) { + return n === t || $t(n, t, xe(t)); + }), + (An.isMatchWith = function (n, t, r) { + return (r = typeof r == 'function' ? r : T), $t(n, t, xe(t), r); + }), + (An.isNaN = function (n) { + return bu(n) && n != +n; + }), + (An.isNative = function (n) { + if (go(n)) throw new Hu('Unsupported core-js use. Try https://npms.io/search?q=ponyfill.'); + return Ft(n); + }), + (An.isNil = function (n) { + return null == n; + }), + (An.isNull = function (n) { + return null === n; + }), + (An.isNumber = bu), + (An.isObject = du), + (An.isObjectLike = yu), + (An.isPlainObject = xu), + (An.isRegExp = hf), + (An.isSafeInteger = function (n) { + return vu(n) && -9007199254740991 <= n && 9007199254740991 >= n; + }), + (An.isSet = pf), + (An.isString = ju), + (An.isSymbol = wu), + (An.isTypedArray = _f), + (An.isUndefined = function (n) { + return n === T; + }), + (An.isWeakMap = function (n) { + return yu(n) && '[object WeakMap]' == vo(n); + }), + (An.isWeakSet = function (n) { + return yu(n) && '[object WeakSet]' == Ot(n); + }), + (An.join = function (n, t) { + return null == n ? '' : Bi.call(n, t); + }), + (An.kebabCase = Lf), + (An.last = Ve), + (An.lastIndexOf = function (n, t, r) { + var e = null == n ? 0 : n.length; + if (!e) return -1; + var u = e; + if ((r !== T && ((u = Eu(r)), (u = 0 > u ? Ui(e + u, 0) : Ci(u, e - 1))), t === t)) { + for (r = u + 1; r-- && n[r] !== t; ); + n = r; + } else n = _(n, d, u, true); + return n; + }), + (An.lowerCase = Uf), + (An.lowerFirst = Cf), + (An.lt = vf), + (An.lte = gf), + (An.max = function (n) { + return n && n.length ? xt(n, $u, It) : T; + }), + (An.maxBy = function (n, t) { + return n && n.length ? xt(n, ye(t, 2), It) : T; + }), + (An.mean = function (n) { + return y(n, $u); + }), + (An.meanBy = function (n, t) { + return y(n, ye(t, 2)); + }), + (An.min = function (n) { + return n && n.length ? xt(n, $u, Kt) : T; + }), + (An.minBy = function (n, t) { + return n && n.length ? xt(n, ye(t, 2), Kt) : T; + }), + (An.stubArray = qu), + (An.stubFalse = Vu), + (An.stubObject = function () { + return {}; + }), + (An.stubString = function () { + return ''; + }), + (An.stubTrue = function () { + return true; + }), + (An.multiply = rc), + (An.nth = function (n, t) { + return n && n.length ? Qt(n, Eu(t)) : T; + }), + (An.noConflict = function () { + return $n._ === this && ($n._ = si), this; + }), + (An.noop = Pu), + (An.now = Go), + (An.pad = function (n, t, r) { + n = Iu(n); + var e = (t = Eu(t)) ? D(n) : 0; + return !t || e >= t ? n : ((t = (t - e) / 2), ne(Ii(t), r) + n + ne(Oi(t), r)); + }), + (An.padEnd = function (n, t, r) { + n = Iu(n); + var e = (t = Eu(t)) ? D(n) : 0; + return t && e < t ? n + ne(t - e, r) : n; + }), + (An.padStart = function (n, t, r) { + n = Iu(n); + var e = (t = Eu(t)) ? D(n) : 0; + return t && e < t ? ne(t - e, r) + n : n; + }), + (An.parseInt = function (n, t, r) { + return r || null == t ? (t = 0) : t && (t = +t), Mi(Iu(n).replace(on, ''), t || 0); + }), + (An.random = function (n, t, r) { + if ( + (r && typeof r != 'boolean' && Oe(n, t, r) && (t = r = T), + r === T && + (typeof t == 'boolean' + ? ((r = t), (t = T)) + : typeof n == 'boolean' && ((r = n), (n = T))), + n === T && t === T + ? ((n = 0), (t = 1)) + : ((n = Au(n)), t === T ? ((t = n), (n = 0)) : (t = Au(t))), + n > t) + ) { + var e = n; + (n = t), (t = e); + } + return r || n % 1 || t % 1 + ? ((r = Ti()), Ci(n + r * (t - n + Cn('1e-' + ((r + '').length - 1))), t)) + : ir(n, t); + }), + (An.reduce = function (n, t, r) { + var e = ff(n) ? l : j, + u = 3 > arguments.length; + return e(n, ye(t, 4), r, u, uo); + }), + (An.reduceRight = function (n, t, r) { + var e = ff(n) ? s : j, + u = 3 > arguments.length; + return e(n, ye(t, 4), r, u, io); + }), + (An.repeat = function (n, t, r) { + return (t = (r ? Oe(n, t, r) : t === T) ? 1 : Eu(t)), or(Iu(n), t); + }), + (An.replace = function () { + var n = arguments, + t = Iu(n[0]); + return 3 > n.length ? t : t.replace(n[1], n[2]); + }), + (An.result = function (n, t, r) { + t = Sr(t, n); + var e = -1, + u = t.length; + for (u || ((u = 1), (n = T)); ++e < u; ) { + var i = null == n ? T : n[Me(t[e])]; + i === T && ((e = u), (i = r)), (n = _u(i) ? i.call(n) : i); + } + return n; + }), + (An.round = ec), + (An.runInContext = x), + (An.sample = function (n) { + return (ff(n) ? Qn : cr)(n); + }), + (An.size = function (n) { + if (null == n) return 0; + if (su(n)) return ju(n) ? D(n) : n.length; + var t = vo(n); + return '[object Map]' == t || '[object Set]' == t ? n.size : Vt(n).length; + }), + (An.snakeCase = Df), + (An.some = function (n, t, r) { + var e = ff(n) ? h : pr; + return r && Oe(n, t, r) && (t = T), e(n, ye(t, 3)); + }), + (An.sortedIndex = function (n, t) { + return _r(n, t); + }), + (An.sortedIndexBy = function (n, t, r) { + return vr(n, t, ye(r, 2)); + }), + (An.sortedIndexOf = function (n, t) { + var r = null == n ? 0 : n.length; + if (r) { + var e = _r(n, t); + if (e < r && lu(n[e], t)) return e; + } + return -1; + }), + (An.sortedLastIndex = function (n, t) { + return _r(n, t, true); + }), + (An.sortedLastIndexBy = function (n, t, r) { + return vr(n, t, ye(r, 2), true); + }), + (An.sortedLastIndexOf = function (n, t) { + if (null == n ? 0 : n.length) { + var r = _r(n, t, true) - 1; + if (lu(n[r], t)) return r; + } + return -1; + }), + (An.startCase = Mf), + (An.startsWith = function (n, t, r) { + return ( + (n = Iu(n)), + (r = null == r ? 0 : pt(Eu(r), 0, n.length)), + (t = yr(t)), + n.slice(r, r + t.length) == t + ); + }), + (An.subtract = uc), + (An.sum = function (n) { + return n && n.length ? m(n, $u) : 0; + }), + (An.sumBy = function (n, t) { + return n && n.length ? m(n, ye(t, 2)) : 0; + }), + (An.template = function (n, t, r) { + var e = An.templateSettings; + r && Oe(n, t, r) && (t = T), + (n = Iu(n)), + (t = bf({}, t, e, ce)), + (r = bf({}, t.imports, e.imports, ce)); + var u, + i, + o = Wu(r), + f = S(r, o), + c = 0; + r = t.interpolate || jn; + var a = "__p+='"; + r = Xu( + (t.escape || jn).source + + '|' + + r.source + + '|' + + (r === Q ? pn : jn).source + + '|' + + (t.evaluate || jn).source + + '|$', + 'g', + ); + var l = oi.call(t, 'sourceURL') + ? '//# sourceURL=' + (t.sourceURL + '').replace(/[\r\n]/g, ' ') + '\n' + : ''; + if ( + (n.replace(r, function (t, r, e, o, f, l) { + return ( + e || (e = o), + (a += n.slice(c, l).replace(wn, z)), + r && ((u = true), (a += "'+__e(" + r + ")+'")), + f && ((i = true), (a += "';" + f + ";\n__p+='")), + e && (a += "'+((__t=(" + e + "))==null?'':__t)+'"), + (c = l + t.length), + t + ); + }), + (a += "';"), + (t = oi.call(t, 'variable') && t.variable) || (a = 'with(obj){' + a + '}'), + (a = (i ? a.replace(P, '') : a).replace(Z, '$1').replace(q, '$1;')), + (a = + 'function(' + + (t || 'obj') + + '){' + + (t ? '' : 'obj||(obj={});') + + "var __t,__p=''" + + (u ? ',__e=_.escape' : '') + + (i ? ",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}" : ';') + + a + + 'return __p}'), + (t = Ff(function () { + return Ju(o, l + 'return ' + a).apply(T, f); + })), + (t.source = a), + pu(t)) + ) + throw t; + return t; + }), + (An.times = function (n, t) { + if (((n = Eu(n)), 1 > n || 9007199254740991 < n)) return []; + var r = 4294967295, + e = Ci(n, 4294967295); + for (t = ye(t), n -= 4294967295, e = A(e, t); ++r < n; ) t(r); + return e; + }), + (An.toFinite = Au), + (An.toInteger = Eu), + (An.toLength = ku), + (An.toLower = function (n) { + return Iu(n).toLowerCase(); + }), + (An.toNumber = Su), + (An.toSafeInteger = function (n) { + return n ? pt(Eu(n), -9007199254740991, 9007199254740991) : 0 === n ? n : 0; + }), + (An.toString = Iu), + (An.toUpper = function (n) { + return Iu(n).toUpperCase(); + }), + (An.trim = function (n, t, r) { + return (n = Iu(n)) && (r || t === T) + ? n.replace(un, '') + : n && (t = yr(t)) + ? ((n = M(n)), (r = M(t)), (t = I(n, r)), (r = R(n, r) + 1), Or(n, t, r).join('')) + : n; + }), + (An.trimEnd = function (n, t, r) { + return (n = Iu(n)) && (r || t === T) + ? n.replace(fn, '') + : n && (t = yr(t)) + ? ((n = M(n)), (t = R(n, M(t)) + 1), Or(n, 0, t).join('')) + : n; + }), + (An.trimStart = function (n, t, r) { + return (n = Iu(n)) && (r || t === T) + ? n.replace(on, '') + : n && (t = yr(t)) + ? ((n = M(n)), (t = I(n, M(t))), Or(n, t).join('')) + : n; + }), + (An.truncate = function (n, t) { + var r = 30, + e = '...'; + if (du(t)) + var u = 'separator' in t ? t.separator : u, + r = 'length' in t ? Eu(t.length) : r, + e = 'omission' in t ? yr(t.omission) : e; + n = Iu(n); + var i = n.length; + if (Rn.test(n)) + var o = M(n), + i = o.length; + if (r >= i) return n; + if (((i = r - D(e)), 1 > i)) return e; + if (((r = o ? Or(o, 0, i).join('') : n.slice(0, i)), u === T)) return r + e; + if ((o && (i += r.length - i), hf(u))) { + if (n.slice(i).search(u)) { + var f = r; + for ( + u.global || (u = Xu(u.source, Iu(_n.exec(u)) + 'g')), u.lastIndex = 0; + (o = u.exec(f)); + + ) + var c = o.index; + r = r.slice(0, c === T ? i : c); + } + } else n.indexOf(yr(u), i) != i && ((u = r.lastIndexOf(u)), -1 < u && (r = r.slice(0, u))); + return r + e; + }), + (An.unescape = function (n) { + return (n = Iu(n)) && G.test(n) ? n.replace(V, tt) : n; + }), + (An.uniqueId = function (n) { + var t = ++fi; + return Iu(n) + t; + }), + (An.upperCase = Tf), + (An.upperFirst = $f), + (An.each = nu), + (An.eachRight = tu), + (An.first = qe), + Nu( + An, + (function () { + var n = {}; + return ( + mt(An, function (t, r) { + oi.call(An.prototype, r) || (n[r] = t); + }), + n + ); + })(), + { chain: false }, + ), + (An.VERSION = '4.17.15'), + r('bind bindKey curry curryRight partial partialRight'.split(' '), function (n) { + An[n].placeholder = An; + }), + r(['drop', 'take'], function (n, t) { + (Un.prototype[n] = function (r) { + r = r === T ? 1 : Ui(Eu(r), 0); + var e = this.__filtered__ && !t ? new Un(this) : this.clone(); + return ( + e.__filtered__ + ? (e.__takeCount__ = Ci(r, e.__takeCount__)) + : e.__views__.push({ + size: Ci(r, 4294967295), + type: n + (0 > e.__dir__ ? 'Right' : ''), + }), + e + ); + }), + (Un.prototype[n + 'Right'] = function (t) { + return this.reverse()[n](t).reverse(); + }); + }), + r(['filter', 'map', 'takeWhile'], function (n, t) { + var r = t + 1, + e = 1 == r || 3 == r; + Un.prototype[n] = function (n) { + var t = this.clone(); + return ( + t.__iteratees__.push({ iteratee: ye(n, 3), type: r }), + (t.__filtered__ = t.__filtered__ || e), + t + ); + }; + }), + r(['head', 'last'], function (n, t) { + var r = 'take' + (t ? 'Right' : ''); + Un.prototype[n] = function () { + return this[r](1).value()[0]; + }; + }), + r(['initial', 'tail'], function (n, t) { + var r = 'drop' + (t ? '' : 'Right'); + Un.prototype[n] = function () { + return this.__filtered__ ? new Un(this) : this[r](1); + }; + }), + (Un.prototype.compact = function () { + return this.filter($u); + }), + (Un.prototype.find = function (n) { + return this.filter(n).head(); + }), + (Un.prototype.findLast = function (n) { + return this.reverse().find(n); + }), + (Un.prototype.invokeMap = fr(function (n, t) { + return typeof n == 'function' + ? new Un(this) + : this.map(function (r) { + return Lt(r, n, t); + }); + })), + (Un.prototype.reject = function (n) { + return this.filter(au(ye(n))); + }), + (Un.prototype.slice = function (n, t) { + n = Eu(n); + var r = this; + return r.__filtered__ && (0 < n || 0 > t) + ? new Un(r) + : (0 > n ? (r = r.takeRight(-n)) : n && (r = r.drop(n)), + t !== T && ((t = Eu(t)), (r = 0 > t ? r.dropRight(-t) : r.take(t - n))), + r); + }), + (Un.prototype.takeRightWhile = function (n) { + return this.reverse().takeWhile(n).reverse(); + }), + (Un.prototype.toArray = function () { + return this.take(4294967295); + }), + mt(Un.prototype, function (n, t) { + var r = /^(?:filter|find|map|reject)|While$/.test(t), + e = /^(?:head|last)$/.test(t), + u = An[e ? 'take' + ('last' == t ? 'Right' : '') : t], + i = e || /^find/.test(t); + u && + (An.prototype[t] = function () { + function t(n) { + return (n = u.apply(An, a([n], f))), e && h ? n[0] : n; + } + var o = this.__wrapped__, + f = e ? [1] : arguments, + c = o instanceof Un, + l = f[0], + s = c || ff(o); + s && r && typeof l == 'function' && 1 != l.length && (c = s = false); + var h = this.__chain__, + p = !!this.__actions__.length, + l = i && !h, + c = c && !p; + return !i && s + ? ((o = c ? o : new Un(this)), + (o = n.apply(o, f)), + o.__actions__.push({ func: Qe, args: [t], thisArg: T }), + new On(o, h)) + : l && c + ? n.apply(this, f) + : ((o = this.thru(t)), l ? (e ? o.value()[0] : o.value()) : o); + }); + }), + r('pop push shift sort splice unshift'.split(' '), function (n) { + var t = ri[n], + r = /^(?:push|sort|unshift)$/.test(n) ? 'tap' : 'thru', + e = /^(?:pop|shift)$/.test(n); + An.prototype[n] = function () { + var n = arguments; + if (e && !this.__chain__) { + var u = this.value(); + return t.apply(ff(u) ? u : [], n); + } + return this[r](function (r) { + return t.apply(ff(r) ? r : [], n); + }); + }; + }), + mt(Un.prototype, function (n, t) { + var r = An[t]; + if (r) { + var e = r.name + ''; + oi.call(Gi, e) || (Gi[e] = []), Gi[e].push({ name: t, func: r }); + } + }), + (Gi[Jr(T, 2).name] = [{ name: 'wrapper', func: T }]), + (Un.prototype.clone = function () { + var n = new Un(this.__wrapped__); + return ( + (n.__actions__ = Ur(this.__actions__)), + (n.__dir__ = this.__dir__), + (n.__filtered__ = this.__filtered__), + (n.__iteratees__ = Ur(this.__iteratees__)), + (n.__takeCount__ = this.__takeCount__), + (n.__views__ = Ur(this.__views__)), + n + ); + }), + (Un.prototype.reverse = function () { + if (this.__filtered__) { + var n = new Un(this); + (n.__dir__ = -1), (n.__filtered__ = true); + } else (n = this.clone()), (n.__dir__ *= -1); + return n; + }), + (Un.prototype.value = function () { + var n, + t = this.__wrapped__.value(), + r = this.__dir__, + e = ff(t), + u = 0 > r, + i = e ? t.length : 0; + n = i; + for (var o = this.__views__, f = 0, c = -1, a = o.length; ++c < a; ) { + var l = o[c], + s = l.size; + switch (l.type) { + case 'drop': + f += s; + break; + case 'dropRight': + n -= s; + break; + case 'take': + n = Ci(n, f + s); + break; + case 'takeRight': + f = Ui(f, n - s); + } + } + if ( + ((n = { start: f, end: n }), + (o = n.start), + (f = n.end), + (n = f - o), + (o = u ? f : o - 1), + (f = this.__iteratees__), + (c = f.length), + (a = 0), + (l = Ci(n, this.__takeCount__)), + !e || (!u && i == n && l == n)) + ) + return wr(t, this.__actions__); + e = []; + n: for (; n-- && a < l; ) { + for (o += r, u = -1, i = t[o]; ++u < c; ) { + var h = f[u], + s = h.type, + h = (0, h.iteratee)(i); + if (2 == s) i = h; + else if (!h) { + if (1 == s) continue n; + break n; + } + } + e[a++] = i; + } + return e; + }), + (An.prototype.at = To), + (An.prototype.chain = function () { + return Ye(this); + }), + (An.prototype.commit = function () { + return new On(this.value(), this.__chain__); + }), + (An.prototype.next = function () { + this.__values__ === T && (this.__values__ = mu(this.value())); + var n = this.__index__ >= this.__values__.length; + return { done: n, value: n ? T : this.__values__[this.__index__++] }; + }), + (An.prototype.plant = function (n) { + for (var t, r = this; r instanceof En; ) { + var e = Fe(r); + (e.__index__ = 0), (e.__values__ = T), t ? (u.__wrapped__ = e) : (t = e); + var u = e, + r = r.__wrapped__; + } + return (u.__wrapped__ = n), t; + }), + (An.prototype.reverse = function () { + var n = this.__wrapped__; + return n instanceof Un + ? (this.__actions__.length && (n = new Un(this)), + (n = n.reverse()), + n.__actions__.push({ func: Qe, args: [Ge], thisArg: T }), + new On(n, this.__chain__)) + : this.thru(Ge); + }), + (An.prototype.toJSON = + An.prototype.valueOf = + An.prototype.value = + function () { + return wr(this.__wrapped__, this.__actions__); + }), + (An.prototype.first = An.prototype.head), + wi && (An.prototype[wi] = Xe), + An + ); + })(); + true + ? (($n._ = rt), + !((__WEBPACK_AMD_DEFINE_RESULT__ = function () { + return rt; + }.call(exports, __webpack_require__, exports, module)), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && + (module.exports = __WEBPACK_AMD_DEFINE_RESULT__))) + : Nn + ? (((Nn.exports = rt)._ = rt), (Fn._ = rt)) + : ($n._ = rt); + }).call(this); + /* WEBPACK VAR INJECTION */ + }).call(exports, __webpack_require__(38), __webpack_require__(239)(module)); + + /***/ + }, + /* 643 */ + /***/ function (module, exports, __webpack_require__) { + var mapping = __webpack_require__(644), + fallbackHolder = __webpack_require__(645); + + /** Built-in value reference. */ + var push = Array.prototype.push; + + /** + * Creates a function, with an arity of `n`, that invokes `func` with the + * arguments it receives. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} n The arity of the new function. + * @returns {Function} Returns the new function. + */ + function baseArity(func, n) { + return n == 2 + ? function (a, b) { + return func.apply(undefined, arguments); + } + : function (a) { + return func.apply(undefined, arguments); + }; + } + + /** + * Creates a function that invokes `func`, with up to `n` arguments, ignoring + * any additional arguments. + * + * @private + * @param {Function} func The function to cap arguments for. + * @param {number} n The arity cap. + * @returns {Function} Returns the new function. + */ + function baseAry(func, n) { + return n == 2 + ? function (a, b) { + return func(a, b); + } + : function (a) { + return func(a); + }; + } + + /** + * Creates a clone of `array`. + * + * @private + * @param {Array} array The array to clone. + * @returns {Array} Returns the cloned array. + */ + function cloneArray(array) { + var length = array ? array.length : 0, + result = Array(length); + + while (length--) { + result[length] = array[length]; + } + return result; + } + + /** + * Creates a function that clones a given object using the assignment `func`. + * + * @private + * @param {Function} func The assignment function. + * @returns {Function} Returns the new cloner function. + */ + function createCloner(func) { + return function (object) { + return func({}, object); + }; + } + + /** + * A specialized version of `_.spread` which flattens the spread array into + * the arguments of the invoked `func`. + * + * @private + * @param {Function} func The function to spread arguments over. + * @param {number} start The start position of the spread. + * @returns {Function} Returns the new function. + */ + function flatSpread(func, start) { + return function () { + var length = arguments.length, + lastIndex = length - 1, + args = Array(length); + + while (length--) { + args[length] = arguments[length]; + } + var array = args[start], + otherArgs = args.slice(0, start); + + if (array) { + push.apply(otherArgs, array); + } + if (start != lastIndex) { + push.apply(otherArgs, args.slice(start + 1)); + } + return func.apply(this, otherArgs); + }; + } + + /** + * Creates a function that wraps `func` and uses `cloner` to clone the first + * argument it receives. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} cloner The function to clone arguments. + * @returns {Function} Returns the new immutable function. + */ + function wrapImmutable(func, cloner) { + return function () { + var length = arguments.length; + if (!length) { + return; + } + var args = Array(length); + while (length--) { + args[length] = arguments[length]; + } + var result = (args[0] = cloner.apply(undefined, args)); + func.apply(undefined, args); + return result; + }; + } + + /** + * The base implementation of `convert` which accepts a `util` object of methods + * required to perform conversions. + * + * @param {Object} util The util object. + * @param {string} name The name of the function to convert. + * @param {Function} func The function to convert. + * @param {Object} [options] The options object. + * @param {boolean} [options.cap=true] Specify capping iteratee arguments. + * @param {boolean} [options.curry=true] Specify currying. + * @param {boolean} [options.fixed=true] Specify fixed arity. + * @param {boolean} [options.immutable=true] Specify immutable operations. + * @param {boolean} [options.rearg=true] Specify rearranging arguments. + * @returns {Function|Object} Returns the converted function or object. + */ + function baseConvert(util, name, func, options) { + var isLib = typeof name == 'function', + isObj = name === Object(name); + + if (isObj) { + options = func; + func = name; + name = undefined; + } + if (func == null) { + throw new TypeError(); + } + options || (options = {}); + + var config = { + cap: 'cap' in options ? options.cap : true, + curry: 'curry' in options ? options.curry : true, + fixed: 'fixed' in options ? options.fixed : true, + immutable: 'immutable' in options ? options.immutable : true, + rearg: 'rearg' in options ? options.rearg : true, + }; + + var defaultHolder = isLib ? func : fallbackHolder, + forceCurry = 'curry' in options && options.curry, + forceFixed = 'fixed' in options && options.fixed, + forceRearg = 'rearg' in options && options.rearg, + pristine = isLib ? func.runInContext() : undefined; + + var helpers = isLib + ? func + : { + ary: util.ary, + assign: util.assign, + clone: util.clone, + curry: util.curry, + forEach: util.forEach, + isArray: util.isArray, + isError: util.isError, + isFunction: util.isFunction, + isWeakMap: util.isWeakMap, + iteratee: util.iteratee, + keys: util.keys, + rearg: util.rearg, + toInteger: util.toInteger, + toPath: util.toPath, + }; + + var ary = helpers.ary, + assign = helpers.assign, + clone = helpers.clone, + curry = helpers.curry, + each = helpers.forEach, + isArray = helpers.isArray, + isError = helpers.isError, + isFunction = helpers.isFunction, + isWeakMap = helpers.isWeakMap, + keys = helpers.keys, + rearg = helpers.rearg, + toInteger = helpers.toInteger, + toPath = helpers.toPath; + + var aryMethodKeys = keys(mapping.aryMethod); + + var wrappers = { + castArray: function (castArray) { + return function () { + var value = arguments[0]; + return isArray(value) ? castArray(cloneArray(value)) : castArray.apply(undefined, arguments); + }; + }, + iteratee: function (iteratee) { + return function () { + var func = arguments[0], + arity = arguments[1], + result = iteratee(func, arity), + length = result.length; + + if (config.cap && typeof arity == 'number') { + arity = arity > 2 ? arity - 2 : 1; + return length && length <= arity ? result : baseAry(result, arity); + } + return result; + }; + }, + mixin: function (mixin) { + return function (source) { + var func = this; + if (!isFunction(func)) { + return mixin(func, Object(source)); + } + var pairs = []; + each(keys(source), function (key) { + if (isFunction(source[key])) { + pairs.push([key, func.prototype[key]]); + } + }); + + mixin(func, Object(source)); + + each(pairs, function (pair) { + var value = pair[1]; + if (isFunction(value)) { + func.prototype[pair[0]] = value; + } else { + delete func.prototype[pair[0]]; + } + }); + return func; + }; + }, + nthArg: function (nthArg) { + return function (n) { + var arity = n < 0 ? 1 : toInteger(n) + 1; + return curry(nthArg(n), arity); + }; + }, + rearg: function (rearg) { + return function (func, indexes) { + var arity = indexes ? indexes.length : 0; + return curry(rearg(func, indexes), arity); + }; + }, + runInContext: function (runInContext) { + return function (context) { + return baseConvert(util, runInContext(context), options); + }; + }, + }; + + /*--------------------------------------------------------------------------*/ + + /** + * Casts `func` to a function with an arity capped iteratee if needed. + * + * @private + * @param {string} name The name of the function to inspect. + * @param {Function} func The function to inspect. + * @returns {Function} Returns the cast function. + */ + function castCap(name, func) { + if (config.cap) { + var indexes = mapping.iterateeRearg[name]; + if (indexes) { + return iterateeRearg(func, indexes); + } + var n = !isLib && mapping.iterateeAry[name]; + if (n) { + return iterateeAry(func, n); + } + } + return func; + } + + /** + * Casts `func` to a curried function if needed. + * + * @private + * @param {string} name The name of the function to inspect. + * @param {Function} func The function to inspect. + * @param {number} n The arity of `func`. + * @returns {Function} Returns the cast function. + */ + function castCurry(name, func, n) { + return forceCurry || (config.curry && n > 1) ? curry(func, n) : func; + } + + /** + * Casts `func` to a fixed arity function if needed. + * + * @private + * @param {string} name The name of the function to inspect. + * @param {Function} func The function to inspect. + * @param {number} n The arity cap. + * @returns {Function} Returns the cast function. + */ + function castFixed(name, func, n) { + if (config.fixed && (forceFixed || !mapping.skipFixed[name])) { + var data = mapping.methodSpread[name], + start = data && data.start; + + return start === undefined ? ary(func, n) : flatSpread(func, start); + } + return func; + } + + /** + * Casts `func` to an rearged function if needed. + * + * @private + * @param {string} name The name of the function to inspect. + * @param {Function} func The function to inspect. + * @param {number} n The arity of `func`. + * @returns {Function} Returns the cast function. + */ + function castRearg(name, func, n) { + return config.rearg && n > 1 && (forceRearg || !mapping.skipRearg[name]) + ? rearg(func, mapping.methodRearg[name] || mapping.aryRearg[n]) + : func; + } + + /** + * Creates a clone of `object` by `path`. + * + * @private + * @param {Object} object The object to clone. + * @param {Array|string} path The path to clone by. + * @returns {Object} Returns the cloned object. + */ + function cloneByPath(object, path) { + path = toPath(path); + + var index = -1, + length = path.length, + lastIndex = length - 1, + result = clone(Object(object)), + nested = result; + + while (nested != null && ++index < length) { + var key = path[index], + value = nested[key]; + + if (value != null && !(isFunction(value) || isError(value) || isWeakMap(value))) { + nested[key] = clone(index == lastIndex ? value : Object(value)); + } + nested = nested[key]; + } + return result; + } + + /** + * Converts `lodash` to an immutable auto-curried iteratee-first data-last + * version with conversion `options` applied. + * + * @param {Object} [options] The options object. See `baseConvert` for more details. + * @returns {Function} Returns the converted `lodash`. + */ + function convertLib(options) { + return _.runInContext.convert(options)(undefined); + } + + /** + * Create a converter function for `func` of `name`. + * + * @param {string} name The name of the function to convert. + * @param {Function} func The function to convert. + * @returns {Function} Returns the new converter function. + */ + function createConverter(name, func) { + var realName = mapping.aliasToReal[name] || name, + methodName = mapping.remap[realName] || realName, + oldOptions = options; + + return function (options) { + var newUtil = isLib ? pristine : helpers, + newFunc = isLib ? pristine[methodName] : func, + newOptions = assign(assign({}, oldOptions), options); + + return baseConvert(newUtil, realName, newFunc, newOptions); + }; + } + + /** + * Creates a function that wraps `func` to invoke its iteratee, with up to `n` + * arguments, ignoring any additional arguments. + * + * @private + * @param {Function} func The function to cap iteratee arguments for. + * @param {number} n The arity cap. + * @returns {Function} Returns the new function. + */ + function iterateeAry(func, n) { + return overArg(func, function (func) { + return typeof func == 'function' ? baseAry(func, n) : func; + }); + } + + /** + * Creates a function that wraps `func` to invoke its iteratee with arguments + * arranged according to the specified `indexes` where the argument value at + * the first index is provided as the first argument, the argument value at + * the second index is provided as the second argument, and so on. + * + * @private + * @param {Function} func The function to rearrange iteratee arguments for. + * @param {number[]} indexes The arranged argument indexes. + * @returns {Function} Returns the new function. + */ + function iterateeRearg(func, indexes) { + return overArg(func, function (func) { + var n = indexes.length; + return baseArity(rearg(baseAry(func, n), indexes), n); + }); + } + + /** + * Creates a function that invokes `func` with its first argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ + function overArg(func, transform) { + return function () { + var length = arguments.length; + if (!length) { + return func(); + } + var args = Array(length); + while (length--) { + args[length] = arguments[length]; + } + var index = config.rearg ? 0 : length - 1; + args[index] = transform(args[index]); + return func.apply(undefined, args); + }; + } + + /** + * Creates a function that wraps `func` and applys the conversions + * rules by `name`. + * + * @private + * @param {string} name The name of the function to wrap. + * @param {Function} func The function to wrap. + * @returns {Function} Returns the converted function. + */ + function wrap(name, func, placeholder) { + var result, + realName = mapping.aliasToReal[name] || name, + wrapped = func, + wrapper = wrappers[realName]; + + if (wrapper) { + wrapped = wrapper(func); + } else if (config.immutable) { + if (mapping.mutate.array[realName]) { + wrapped = wrapImmutable(func, cloneArray); + } else if (mapping.mutate.object[realName]) { + wrapped = wrapImmutable(func, createCloner(func)); + } else if (mapping.mutate.set[realName]) { + wrapped = wrapImmutable(func, cloneByPath); + } + } + each(aryMethodKeys, function (aryKey) { + each(mapping.aryMethod[aryKey], function (otherName) { + if (realName == otherName) { + var data = mapping.methodSpread[realName], + afterRearg = data && data.afterRearg; + + result = afterRearg + ? castFixed(realName, castRearg(realName, wrapped, aryKey), aryKey) + : castRearg(realName, castFixed(realName, wrapped, aryKey), aryKey); + + result = castCap(realName, result); + result = castCurry(realName, result, aryKey); + return false; + } + }); + return !result; + }); + + result || (result = wrapped); + if (result == func) { + result = forceCurry + ? curry(result, 1) + : function () { + return func.apply(this, arguments); + }; + } + result.convert = createConverter(realName, func); + result.placeholder = func.placeholder = placeholder; + + return result; + } + + /*--------------------------------------------------------------------------*/ + + if (!isObj) { + return wrap(name, func, defaultHolder); + } + var _ = func; + + // Convert methods by ary cap. + var pairs = []; + each(aryMethodKeys, function (aryKey) { + each(mapping.aryMethod[aryKey], function (key) { + var func = _[mapping.remap[key] || key]; + if (func) { + pairs.push([key, wrap(key, func, _)]); + } + }); + }); + + // Convert remaining methods. + each(keys(_), function (key) { + var func = _[key]; + if (typeof func == 'function') { + var length = pairs.length; + while (length--) { + if (pairs[length][0] == key) { + return; + } + } + func.convert = createConverter(key, func); + pairs.push([key, func]); + } + }); + + // Assign to `_` leaving `_.prototype` unchanged to allow chaining. + each(pairs, function (pair) { + _[pair[0]] = pair[1]; + }); + + _.convert = convertLib; + _.placeholder = _; + + // Assign aliases. + each(keys(_), function (key) { + each(mapping.realToAlias[key] || [], function (alias) { + _[alias] = _[key]; + }); + }); + + return _; + } + + module.exports = baseConvert; + + /***/ + }, + /* 644 */ + /***/ function (module, exports) { + /** Used to map aliases to their real names. */ + exports.aliasToReal = { + // Lodash aliases. + each: 'forEach', + eachRight: 'forEachRight', + entries: 'toPairs', + entriesIn: 'toPairsIn', + extend: 'assignIn', + extendAll: 'assignInAll', + extendAllWith: 'assignInAllWith', + extendWith: 'assignInWith', + first: 'head', + + // Methods that are curried variants of others. + conforms: 'conformsTo', + matches: 'isMatch', + property: 'get', + + // Ramda aliases. + __: 'placeholder', + F: 'stubFalse', + T: 'stubTrue', + all: 'every', + allPass: 'overEvery', + always: 'constant', + any: 'some', + anyPass: 'overSome', + apply: 'spread', + assoc: 'set', + assocPath: 'set', + complement: 'negate', + compose: 'flowRight', + contains: 'includes', + dissoc: 'unset', + dissocPath: 'unset', + dropLast: 'dropRight', + dropLastWhile: 'dropRightWhile', + equals: 'isEqual', + identical: 'eq', + indexBy: 'keyBy', + init: 'initial', + invertObj: 'invert', + juxt: 'over', + omitAll: 'omit', + nAry: 'ary', + path: 'get', + pathEq: 'matchesProperty', + pathOr: 'getOr', + paths: 'at', + pickAll: 'pick', + pipe: 'flow', + pluck: 'map', + prop: 'get', + propEq: 'matchesProperty', + propOr: 'getOr', + props: 'at', + symmetricDifference: 'xor', + symmetricDifferenceBy: 'xorBy', + symmetricDifferenceWith: 'xorWith', + takeLast: 'takeRight', + takeLastWhile: 'takeRightWhile', + unapply: 'rest', + unnest: 'flatten', + useWith: 'overArgs', + where: 'conformsTo', + whereEq: 'isMatch', + zipObj: 'zipObject', + }; + + /** Used to map ary to method names. */ + exports.aryMethod = { + 1: [ + 'assignAll', + 'assignInAll', + 'attempt', + 'castArray', + 'ceil', + 'create', + 'curry', + 'curryRight', + 'defaultsAll', + 'defaultsDeepAll', + 'floor', + 'flow', + 'flowRight', + 'fromPairs', + 'invert', + 'iteratee', + 'memoize', + 'method', + 'mergeAll', + 'methodOf', + 'mixin', + 'nthArg', + 'over', + 'overEvery', + 'overSome', + 'rest', + 'reverse', + 'round', + 'runInContext', + 'spread', + 'template', + 'trim', + 'trimEnd', + 'trimStart', + 'uniqueId', + 'words', + 'zipAll', + ], + 2: [ + 'add', + 'after', + 'ary', + 'assign', + 'assignAllWith', + 'assignIn', + 'assignInAllWith', + 'at', + 'before', + 'bind', + 'bindAll', + 'bindKey', + 'chunk', + 'cloneDeepWith', + 'cloneWith', + 'concat', + 'conformsTo', + 'countBy', + 'curryN', + 'curryRightN', + 'debounce', + 'defaults', + 'defaultsDeep', + 'defaultTo', + 'delay', + 'difference', + 'divide', + 'drop', + 'dropRight', + 'dropRightWhile', + 'dropWhile', + 'endsWith', + 'eq', + 'every', + 'filter', + 'find', + 'findIndex', + 'findKey', + 'findLast', + 'findLastIndex', + 'findLastKey', + 'flatMap', + 'flatMapDeep', + 'flattenDepth', + 'forEach', + 'forEachRight', + 'forIn', + 'forInRight', + 'forOwn', + 'forOwnRight', + 'get', + 'groupBy', + 'gt', + 'gte', + 'has', + 'hasIn', + 'includes', + 'indexOf', + 'intersection', + 'invertBy', + 'invoke', + 'invokeMap', + 'isEqual', + 'isMatch', + 'join', + 'keyBy', + 'lastIndexOf', + 'lt', + 'lte', + 'map', + 'mapKeys', + 'mapValues', + 'matchesProperty', + 'maxBy', + 'meanBy', + 'merge', + 'mergeAllWith', + 'minBy', + 'multiply', + 'nth', + 'omit', + 'omitBy', + 'overArgs', + 'pad', + 'padEnd', + 'padStart', + 'parseInt', + 'partial', + 'partialRight', + 'partition', + 'pick', + 'pickBy', + 'propertyOf', + 'pull', + 'pullAll', + 'pullAt', + 'random', + 'range', + 'rangeRight', + 'rearg', + 'reject', + 'remove', + 'repeat', + 'restFrom', + 'result', + 'sampleSize', + 'some', + 'sortBy', + 'sortedIndex', + 'sortedIndexOf', + 'sortedLastIndex', + 'sortedLastIndexOf', + 'sortedUniqBy', + 'split', + 'spreadFrom', + 'startsWith', + 'subtract', + 'sumBy', + 'take', + 'takeRight', + 'takeRightWhile', + 'takeWhile', + 'tap', + 'throttle', + 'thru', + 'times', + 'trimChars', + 'trimCharsEnd', + 'trimCharsStart', + 'truncate', + 'union', + 'uniqBy', + 'uniqWith', + 'unset', + 'unzipWith', + 'without', + 'wrap', + 'xor', + 'zip', + 'zipObject', + 'zipObjectDeep', + ], + 3: [ + 'assignInWith', + 'assignWith', + 'clamp', + 'differenceBy', + 'differenceWith', + 'findFrom', + 'findIndexFrom', + 'findLastFrom', + 'findLastIndexFrom', + 'getOr', + 'includesFrom', + 'indexOfFrom', + 'inRange', + 'intersectionBy', + 'intersectionWith', + 'invokeArgs', + 'invokeArgsMap', + 'isEqualWith', + 'isMatchWith', + 'flatMapDepth', + 'lastIndexOfFrom', + 'mergeWith', + 'orderBy', + 'padChars', + 'padCharsEnd', + 'padCharsStart', + 'pullAllBy', + 'pullAllWith', + 'rangeStep', + 'rangeStepRight', + 'reduce', + 'reduceRight', + 'replace', + 'set', + 'slice', + 'sortedIndexBy', + 'sortedLastIndexBy', + 'transform', + 'unionBy', + 'unionWith', + 'update', + 'xorBy', + 'xorWith', + 'zipWith', + ], + 4: ['fill', 'setWith', 'updateWith'], + }; + + /** Used to map ary to rearg configs. */ + exports.aryRearg = { + 2: [1, 0], + 3: [2, 0, 1], + 4: [3, 2, 0, 1], + }; + + /** Used to map method names to their iteratee ary. */ + exports.iterateeAry = { + dropRightWhile: 1, + dropWhile: 1, + every: 1, + filter: 1, + find: 1, + findFrom: 1, + findIndex: 1, + findIndexFrom: 1, + findKey: 1, + findLast: 1, + findLastFrom: 1, + findLastIndex: 1, + findLastIndexFrom: 1, + findLastKey: 1, + flatMap: 1, + flatMapDeep: 1, + flatMapDepth: 1, + forEach: 1, + forEachRight: 1, + forIn: 1, + forInRight: 1, + forOwn: 1, + forOwnRight: 1, + map: 1, + mapKeys: 1, + mapValues: 1, + partition: 1, + reduce: 2, + reduceRight: 2, + reject: 1, + remove: 1, + some: 1, + takeRightWhile: 1, + takeWhile: 1, + times: 1, + transform: 2, + }; + + /** Used to map method names to iteratee rearg configs. */ + exports.iterateeRearg = { + mapKeys: [1], + reduceRight: [1, 0], + }; + + /** Used to map method names to rearg configs. */ + exports.methodRearg = { + assignInAllWith: [1, 0], + assignInWith: [1, 2, 0], + assignAllWith: [1, 0], + assignWith: [1, 2, 0], + differenceBy: [1, 2, 0], + differenceWith: [1, 2, 0], + getOr: [2, 1, 0], + intersectionBy: [1, 2, 0], + intersectionWith: [1, 2, 0], + isEqualWith: [1, 2, 0], + isMatchWith: [2, 1, 0], + mergeAllWith: [1, 0], + mergeWith: [1, 2, 0], + padChars: [2, 1, 0], + padCharsEnd: [2, 1, 0], + padCharsStart: [2, 1, 0], + pullAllBy: [2, 1, 0], + pullAllWith: [2, 1, 0], + rangeStep: [1, 2, 0], + rangeStepRight: [1, 2, 0], + setWith: [3, 1, 2, 0], + sortedIndexBy: [2, 1, 0], + sortedLastIndexBy: [2, 1, 0], + unionBy: [1, 2, 0], + unionWith: [1, 2, 0], + updateWith: [3, 1, 2, 0], + xorBy: [1, 2, 0], + xorWith: [1, 2, 0], + zipWith: [1, 2, 0], + }; + + /** Used to map method names to spread configs. */ + exports.methodSpread = { + assignAll: { start: 0 }, + assignAllWith: { start: 0 }, + assignInAll: { start: 0 }, + assignInAllWith: { start: 0 }, + defaultsAll: { start: 0 }, + defaultsDeepAll: { start: 0 }, + invokeArgs: { start: 2 }, + invokeArgsMap: { start: 2 }, + mergeAll: { start: 0 }, + mergeAllWith: { start: 0 }, + partial: { start: 1 }, + partialRight: { start: 1 }, + without: { start: 1 }, + zipAll: { start: 0 }, + }; + + /** Used to identify methods which mutate arrays or objects. */ + exports.mutate = { + array: { + fill: true, + pull: true, + pullAll: true, + pullAllBy: true, + pullAllWith: true, + pullAt: true, + remove: true, + reverse: true, + }, + object: { + assign: true, + assignAll: true, + assignAllWith: true, + assignIn: true, + assignInAll: true, + assignInAllWith: true, + assignInWith: true, + assignWith: true, + defaults: true, + defaultsAll: true, + defaultsDeep: true, + defaultsDeepAll: true, + merge: true, + mergeAll: true, + mergeAllWith: true, + mergeWith: true, + }, + set: { + set: true, + setWith: true, + unset: true, + update: true, + updateWith: true, + }, + }; + + /** Used to map real names to their aliases. */ + exports.realToAlias = (function () { + var hasOwnProperty = Object.prototype.hasOwnProperty, + object = exports.aliasToReal, + result = {}; + + for (var key in object) { + var value = object[key]; + if (hasOwnProperty.call(result, value)) { + result[value].push(key); + } else { + result[value] = [key]; + } + } + return result; + })(); + + /** Used to map method names to other names. */ + exports.remap = { + assignAll: 'assign', + assignAllWith: 'assignWith', + assignInAll: 'assignIn', + assignInAllWith: 'assignInWith', + curryN: 'curry', + curryRightN: 'curryRight', + defaultsAll: 'defaults', + defaultsDeepAll: 'defaultsDeep', + findFrom: 'find', + findIndexFrom: 'findIndex', + findLastFrom: 'findLast', + findLastIndexFrom: 'findLastIndex', + getOr: 'get', + includesFrom: 'includes', + indexOfFrom: 'indexOf', + invokeArgs: 'invoke', + invokeArgsMap: 'invokeMap', + lastIndexOfFrom: 'lastIndexOf', + mergeAll: 'merge', + mergeAllWith: 'mergeWith', + padChars: 'pad', + padCharsEnd: 'padEnd', + padCharsStart: 'padStart', + propertyOf: 'get', + rangeStep: 'range', + rangeStepRight: 'rangeRight', + restFrom: 'rest', + spreadFrom: 'spread', + trimChars: 'trim', + trimCharsEnd: 'trimEnd', + trimCharsStart: 'trimStart', + zipAll: 'zip', + }; + + /** Used to track methods that skip fixing their arity. */ + exports.skipFixed = { + castArray: true, + flow: true, + flowRight: true, + iteratee: true, + mixin: true, + rearg: true, + runInContext: true, + }; + + /** Used to track methods that skip rearranging arguments. */ + exports.skipRearg = { + add: true, + assign: true, + assignIn: true, + bind: true, + bindKey: true, + concat: true, + difference: true, + divide: true, + eq: true, + gt: true, + gte: true, + isEqual: true, + lt: true, + lte: true, + matchesProperty: true, + merge: true, + multiply: true, + overArgs: true, + partial: true, + partialRight: true, + propertyOf: true, + random: true, + range: true, + rangeRight: true, + subtract: true, + zip: true, + zipObject: true, + zipObjectDeep: true, + }; + + /***/ + }, + /* 645 */ + /***/ function (module, exports) { + /** + * The default argument placeholder value for methods. + * + * @type {Object} + */ + module.exports = {}; + + /***/ + }, + /* 646 */ + /***/ function (module, exports) { + module.exports = { + message: 'index__message__2coBI', + }; + + /***/ + }, + /******/ + ], +); diff --git a/packages/react-on-rails-pro-node-renderer/tests/fixtures/projects/spec-dummy/220f7a3/server-bundle-web-target.js b/packages/react-on-rails-pro-node-renderer/tests/fixtures/projects/spec-dummy/220f7a3/server-bundle-web-target.js new file mode 100644 index 0000000000..4c3d9a2197 --- /dev/null +++ b/packages/react-on-rails-pro-node-renderer/tests/fixtures/projects/spec-dummy/220f7a3/server-bundle-web-target.js @@ -0,0 +1,3810 @@ +/* + * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development"). + * This devtool is neither made for production nor for readable output files. + * It uses "eval()" calls to create a separate source file in the browser devtools. + * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/) + * or disable the default devtool with "devtool: false". + * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/). + */ +/******/ (() => { + // webpackBootstrap + /******/ var __webpack_modules__ = { + /***/ 7252: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var map = {\n\t"./": [\n\t\t5211\n\t],\n\t"./A": [\n\t\t9322,\n\t\t367\n\t],\n\t"./A.css": [\n\t\t1807,\n\t\t367\n\t],\n\t"./A.js": [\n\t\t9322,\n\t\t367\n\t],\n\t"./B": [\n\t\t6231,\n\t\t367\n\t],\n\t"./B.js": [\n\t\t6231,\n\t\t367\n\t],\n\t"./C": [\n\t\t7456,\n\t\t367\n\t],\n\t"./C.js": [\n\t\t7456,\n\t\t367\n\t],\n\t"./D": [\n\t\t7957,\n\t\t367\n\t],\n\t"./D.js": [\n\t\t7957,\n\t\t367\n\t],\n\t"./E": [\n\t\t9718,\n\t\t367\n\t],\n\t"./E.js": [\n\t\t9718,\n\t\t367\n\t],\n\t"./F": [\n\t\t9363,\n\t\t367\n\t],\n\t"./F.js": [\n\t\t9363,\n\t\t367\n\t],\n\t"./G": [\n\t\t1260,\n\t\t367\n\t],\n\t"./G.js": [\n\t\t1260,\n\t\t367\n\t],\n\t"./Letters.imports-hmr": [\n\t\t4958,\n\t\t367\n\t],\n\t"./Letters.imports-hmr.jsx": [\n\t\t4958,\n\t\t367\n\t],\n\t"./Letters.imports-loadable": [\n\t\t3507\n\t],\n\t"./Letters.imports-loadable.jsx": [\n\t\t3507\n\t],\n\t"./Z/file": [\n\t\t7816,\n\t\t367\n\t],\n\t"./Z/file.js": [\n\t\t7816,\n\t\t367\n\t],\n\t"./index": [\n\t\t5211\n\t],\n\t"./index.jsx": [\n\t\t5211\n\t],\n\t"./main": [\n\t\t9227\n\t],\n\t"./main.css": [\n\t\t9227\n\t]\n};\nfunction webpackAsyncContext(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\treturn Promise.resolve().then(() => {\n\t\t\tvar e = new Error("Cannot find module \'" + req + "\'");\n\t\t\te.code = \'MODULE_NOT_FOUND\';\n\t\t\tthrow e;\n\t\t});\n\t}\n\n\tvar ids = map[req], id = ids[0];\n\treturn Promise.all(ids.slice(1).map(__webpack_require__.e)).then(() => {\n\t\treturn __webpack_require__(id);\n\t});\n}\nwebpackAsyncContext.keys = () => (Object.keys(map));\nwebpackAsyncContext.id = 7252;\nmodule.exports = webpackAsyncContext;\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./client/app/components/Loadable/letters/_lazy_^\\.\\/.*$_chunkName:_%5Brequest%5D_namespace_object?', + ); + + /***/ + }, + + /***/ 9983: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var map = {\n\t"./Z/file": [\n\t\t7816,\n\t\t367\n\t]\n};\nfunction webpackAsyncContext(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\treturn Promise.resolve().then(() => {\n\t\t\tvar e = new Error("Cannot find module \'" + req + "\'");\n\t\t\te.code = \'MODULE_NOT_FOUND\';\n\t\t\tthrow e;\n\t\t});\n\t}\n\n\tvar ids = map[req], id = ids[0];\n\treturn __webpack_require__.e(ids[1]).then(() => {\n\t\treturn __webpack_require__(id);\n\t});\n}\nwebpackAsyncContext.keys = () => (Object.keys(map));\nwebpackAsyncContext.id = 9983;\nmodule.exports = webpackAsyncContext;\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./client/app/components/Loadable/letters/_lazy_^\\.\\/.*\\/file$_chunkName:_%5Brequest%5D_namespace_object?', + ); + + /***/ + }, + + /***/ 2478: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var map = {\n\t"./": 5211,\n\t"./A": 9322,\n\t"./A.css": 1807,\n\t"./A.js": 9322,\n\t"./B": 6231,\n\t"./B.js": 6231,\n\t"./C": 7456,\n\t"./C.js": 7456,\n\t"./D": 7957,\n\t"./D.js": 7957,\n\t"./E": 9718,\n\t"./E.js": 9718,\n\t"./F": 9363,\n\t"./F.js": 9363,\n\t"./G": 1260,\n\t"./G.js": 1260,\n\t"./Letters.imports-hmr": 4958,\n\t"./Letters.imports-hmr.jsx": 4958,\n\t"./Letters.imports-loadable": 3507,\n\t"./Letters.imports-loadable.jsx": 3507,\n\t"./Z/file": 7816,\n\t"./Z/file.js": 7816,\n\t"./index": 5211,\n\t"./index.jsx": 5211,\n\t"./main": 9227,\n\t"./main.css": 9227\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\tif(!__webpack_require__.m[id]) {\n\t\tvar e = new Error("Module \'" + req + "\' (\'" + id + "\') is not available (weak dependency)");\n\t\te.code = \'MODULE_NOT_FOUND\';\n\t\tthrow e;\n\t}\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error("Cannot find module \'" + req + "\'");\n\t\te.code = \'MODULE_NOT_FOUND\';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nwebpackContext.id = 2478;\nmodule.exports = webpackContext;\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./client/app/components/Loadable/letters/_weak_^\\.\\/.*$?', + ); + + /***/ + }, + + /***/ 1015: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var map = {\n\t"./Z/file": 7816\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\tif(!__webpack_require__.m[id]) {\n\t\tvar e = new Error("Module \'" + req + "\' (\'" + id + "\') is not available (weak dependency)");\n\t\te.code = \'MODULE_NOT_FOUND\';\n\t\tthrow e;\n\t}\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error("Cannot find module \'" + req + "\'");\n\t\te.code = \'MODULE_NOT_FOUND\';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nwebpackContext.id = 1015;\nmodule.exports = webpackContext;\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./client/app/components/Loadable/letters/_weak_^\\.\\/.*\\/file$?', + ); + + /***/ + }, + + /***/ 8630: /***/ (__unused_webpack_module, exports, __webpack_require__) => { + 'use strict'; + eval( + "\n\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\n\nfunction _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }\n\nvar React = _interopDefault(__webpack_require__(6540));\nvar _objectWithoutPropertiesLoose = _interopDefault(__webpack_require__(4893));\nvar _extends = _interopDefault(__webpack_require__(4634));\nvar _assertThisInitialized = _interopDefault(__webpack_require__(2475));\nvar _inheritsLoose = _interopDefault(__webpack_require__(6221));\nvar hoistNonReactStatics = _interopDefault(__webpack_require__(4146));\n\n/* eslint-disable import/prefer-default-export */\nfunction invariant(condition, message) {\n if (condition) return;\n var error = new Error(\"loadable: \" + message);\n error.framesToPop = 1;\n error.name = 'Invariant Violation';\n throw error;\n}\nfunction warn(message) {\n // eslint-disable-next-line no-console\n console.warn(\"loadable: \" + message);\n}\n\nvar Context = /*#__PURE__*/\nReact.createContext();\n\nvar LOADABLE_REQUIRED_CHUNKS_KEY = '__LOADABLE_REQUIRED_CHUNKS__';\nfunction getRequiredChunkKey(namespace) {\n return \"\" + namespace + LOADABLE_REQUIRED_CHUNKS_KEY;\n}\n\nvar sharedInternals = /*#__PURE__*/Object.freeze({\n __proto__: null,\n getRequiredChunkKey: getRequiredChunkKey,\n invariant: invariant,\n Context: Context\n});\n\nvar LOADABLE_SHARED = {\n initialChunks: {}\n};\n\nvar STATUS_PENDING = 'PENDING';\nvar STATUS_RESOLVED = 'RESOLVED';\nvar STATUS_REJECTED = 'REJECTED';\n\nfunction resolveConstructor(ctor) {\n if (typeof ctor === 'function') {\n return {\n requireAsync: ctor,\n resolve: function resolve() {\n return undefined;\n },\n chunkName: function chunkName() {\n return undefined;\n }\n };\n }\n\n return ctor;\n}\n\nvar withChunkExtractor = function withChunkExtractor(Component) {\n var LoadableWithChunkExtractor = function LoadableWithChunkExtractor(props) {\n return React.createElement(Context.Consumer, null, function (extractor) {\n return React.createElement(Component, Object.assign({\n __chunkExtractor: extractor\n }, props));\n });\n };\n\n if (Component.displayName) {\n LoadableWithChunkExtractor.displayName = Component.displayName + \"WithChunkExtractor\";\n }\n\n return LoadableWithChunkExtractor;\n};\n\nvar identity = function identity(v) {\n return v;\n};\n\nfunction createLoadable(_ref) {\n var _ref$defaultResolveCo = _ref.defaultResolveComponent,\n defaultResolveComponent = _ref$defaultResolveCo === void 0 ? identity : _ref$defaultResolveCo,\n _render = _ref.render,\n onLoad = _ref.onLoad;\n\n function loadable(loadableConstructor, options) {\n if (options === void 0) {\n options = {};\n }\n\n var ctor = resolveConstructor(loadableConstructor);\n var cache = {};\n /**\n * Cachekey represents the component to be loaded\n * if key changes - component has to be reloaded\n * @param props\n * @returns {null|Component}\n */\n\n function _getCacheKey(props) {\n if (options.cacheKey) {\n return options.cacheKey(props);\n }\n\n if (ctor.resolve) {\n return ctor.resolve(props);\n }\n\n return 'static';\n }\n /**\n * Resolves loaded `module` to a specific `Component\n * @param module\n * @param props\n * @param Loadable\n * @returns Component\n */\n\n\n function resolve(module, props, Loadable) {\n var Component = options.resolveComponent ? options.resolveComponent(module, props) : defaultResolveComponent(module); // FIXME: suppressed due to https://github.com/gregberge/loadable-components/issues/990\n // if (options.resolveComponent && !ReactIs.isValidElementType(Component)) {\n // throw new Error(\n // `resolveComponent returned something that is not a React component!`,\n // )\n // }\n\n hoistNonReactStatics(Loadable, Component, {\n preload: true\n });\n return Component;\n }\n\n var cachedLoad = function cachedLoad(props) {\n var cacheKey = _getCacheKey(props);\n\n var promise = cache[cacheKey];\n\n if (!promise || promise.status === STATUS_REJECTED) {\n promise = ctor.requireAsync(props);\n promise.status = STATUS_PENDING;\n cache[cacheKey] = promise;\n promise.then(function () {\n promise.status = STATUS_RESOLVED;\n }, function (error) {\n console.error('loadable-components: failed to asynchronously load component', {\n fileName: ctor.resolve(props),\n chunkName: ctor.chunkName(props),\n error: error ? error.message : error\n });\n promise.status = STATUS_REJECTED;\n });\n }\n\n return promise;\n };\n\n var InnerLoadable =\n /*#__PURE__*/\n function (_React$Component) {\n _inheritsLoose(InnerLoadable, _React$Component);\n\n InnerLoadable.getDerivedStateFromProps = function getDerivedStateFromProps(props, state) {\n var cacheKey = _getCacheKey(props);\n\n return _extends({}, state, {\n cacheKey: cacheKey,\n // change of a key triggers loading state automatically\n loading: state.loading || state.cacheKey !== cacheKey\n });\n };\n\n function InnerLoadable(props) {\n var _this;\n\n _this = _React$Component.call(this, props) || this;\n _this.state = {\n result: null,\n error: null,\n loading: true,\n cacheKey: _getCacheKey(props)\n };\n invariant(!props.__chunkExtractor || ctor.requireSync, 'SSR requires `@loadable/babel-plugin`, please install it'); // Server-side\n\n if (props.__chunkExtractor) {\n // This module has been marked with no SSR\n if (options.ssr === false) {\n return _assertThisInitialized(_this);\n } // We run load function, we assume that it won't fail and that it\n // triggers a synchronous loading of the module\n\n\n ctor.requireAsync(props)[\"catch\"](function () {\n return null;\n }); // So we can require now the module synchronously\n\n _this.loadSync();\n\n props.__chunkExtractor.addChunk(ctor.chunkName(props));\n\n return _assertThisInitialized(_this);\n } // Client-side with `isReady` method present (SSR probably)\n // If module is already loaded, we use a synchronous loading\n // Only perform this synchronous loading if the component has not\n // been marked with no SSR, else we risk hydration mismatches\n\n\n if (options.ssr !== false && ( // is ready - was loaded in this session\n ctor.isReady && ctor.isReady(props) || // is ready - was loaded during SSR process\n ctor.chunkName && LOADABLE_SHARED.initialChunks[ctor.chunkName(props)])) {\n _this.loadSync();\n }\n\n return _this;\n }\n\n var _proto = InnerLoadable.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n this.mounted = true; // retrieve loading promise from a global cache\n\n var cachedPromise = this.getCache(); // if promise exists, but rejected - clear cache\n\n if (cachedPromise && cachedPromise.status === STATUS_REJECTED) {\n this.setCache();\n } // component might be resolved synchronously in the constructor\n\n\n if (this.state.loading) {\n this.loadAsync();\n }\n };\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps, prevState) {\n // Component has to be reloaded on cacheKey change\n if (prevState.cacheKey !== this.state.cacheKey) {\n this.loadAsync();\n }\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.mounted = false;\n };\n\n _proto.safeSetState = function safeSetState(nextState, callback) {\n if (this.mounted) {\n this.setState(nextState, callback);\n }\n }\n /**\n * returns a cache key for the current props\n * @returns {Component|string}\n */\n ;\n\n _proto.getCacheKey = function getCacheKey() {\n return _getCacheKey(this.props);\n }\n /**\n * access the persistent cache\n */\n ;\n\n _proto.getCache = function getCache() {\n return cache[this.getCacheKey()];\n }\n /**\n * sets the cache value. If called without value sets it as undefined\n */\n ;\n\n _proto.setCache = function setCache(value) {\n if (value === void 0) {\n value = undefined;\n }\n\n cache[this.getCacheKey()] = value;\n };\n\n _proto.triggerOnLoad = function triggerOnLoad() {\n var _this2 = this;\n\n if (onLoad) {\n setTimeout(function () {\n onLoad(_this2.state.result, _this2.props);\n });\n }\n }\n /**\n * Synchronously loads component\n * target module is expected to already exists in the module cache\n * or be capable to resolve synchronously (webpack target=node)\n */\n ;\n\n _proto.loadSync = function loadSync() {\n // load sync is expecting component to be in the \"loading\" state already\n // sounds weird, but loading=true is the initial state of InnerLoadable\n if (!this.state.loading) return;\n\n try {\n var loadedModule = ctor.requireSync(this.props);\n var result = resolve(loadedModule, this.props, Loadable);\n this.state.result = result;\n this.state.loading = false;\n } catch (error) {\n console.error('loadable-components: failed to synchronously load component, which expected to be available', {\n fileName: ctor.resolve(this.props),\n chunkName: ctor.chunkName(this.props),\n error: error ? error.message : error\n });\n this.state.error = error;\n }\n }\n /**\n * Asynchronously loads a component.\n */\n ;\n\n _proto.loadAsync = function loadAsync() {\n var _this3 = this;\n\n var promise = this.resolveAsync();\n promise.then(function (loadedModule) {\n var result = resolve(loadedModule, _this3.props, Loadable);\n\n _this3.safeSetState({\n result: result,\n loading: false\n }, function () {\n return _this3.triggerOnLoad();\n });\n })[\"catch\"](function (error) {\n return _this3.safeSetState({\n error: error,\n loading: false\n });\n });\n return promise;\n }\n /**\n * Asynchronously resolves(not loads) a component.\n * Note - this function does not change the state\n */\n ;\n\n _proto.resolveAsync = function resolveAsync() {\n var _this$props = this.props,\n __chunkExtractor = _this$props.__chunkExtractor,\n forwardedRef = _this$props.forwardedRef,\n props = _objectWithoutPropertiesLoose(_this$props, [\"__chunkExtractor\", \"forwardedRef\"]);\n\n return cachedLoad(props);\n };\n\n _proto.render = function render() {\n var _this$props2 = this.props,\n forwardedRef = _this$props2.forwardedRef,\n propFallback = _this$props2.fallback,\n __chunkExtractor = _this$props2.__chunkExtractor,\n props = _objectWithoutPropertiesLoose(_this$props2, [\"forwardedRef\", \"fallback\", \"__chunkExtractor\"]);\n\n var _this$state = this.state,\n error = _this$state.error,\n loading = _this$state.loading,\n result = _this$state.result;\n\n if (options.suspense) {\n var cachedPromise = this.getCache() || this.loadAsync();\n\n if (cachedPromise.status === STATUS_PENDING) {\n throw this.loadAsync();\n }\n }\n\n if (error) {\n throw error;\n }\n\n var fallback = propFallback || options.fallback || null;\n\n if (loading) {\n return fallback;\n }\n\n return _render({\n fallback: fallback,\n result: result,\n options: options,\n props: _extends({}, props, {\n ref: forwardedRef\n })\n });\n };\n\n return InnerLoadable;\n }(React.Component);\n\n var EnhancedInnerLoadable = withChunkExtractor(InnerLoadable);\n var Loadable = React.forwardRef(function (props, ref) {\n return React.createElement(EnhancedInnerLoadable, Object.assign({\n forwardedRef: ref\n }, props));\n });\n Loadable.displayName = 'Loadable'; // In future, preload could use `<link rel=\"preload\">`\n\n Loadable.preload = function (props) {\n Loadable.load(props);\n };\n\n Loadable.load = function (props) {\n return cachedLoad(props);\n };\n\n return Loadable;\n }\n\n function lazy(ctor, options) {\n return loadable(ctor, _extends({}, options, {\n suspense: true\n }));\n }\n\n return {\n loadable: loadable,\n lazy: lazy\n };\n}\n\nfunction defaultResolveComponent(loadedModule) {\n // eslint-disable-next-line no-underscore-dangle\n return loadedModule.__esModule ? loadedModule[\"default\"] : loadedModule[\"default\"] || loadedModule;\n}\n\n/* eslint-disable no-use-before-define, react/no-multi-comp */\n\nvar _createLoadable =\n/*#__PURE__*/\ncreateLoadable({\n defaultResolveComponent: defaultResolveComponent,\n render: function render(_ref) {\n var Component = _ref.result,\n props = _ref.props;\n return React.createElement(Component, props);\n }\n}),\n loadable = _createLoadable.loadable,\n lazy = _createLoadable.lazy;\n\n/* eslint-disable no-use-before-define, react/no-multi-comp */\n\nvar _createLoadable$1 =\n/*#__PURE__*/\ncreateLoadable({\n onLoad: function onLoad(result, props) {\n if (result && props.forwardedRef) {\n if (typeof props.forwardedRef === 'function') {\n props.forwardedRef(result);\n } else {\n props.forwardedRef.current = result;\n }\n }\n },\n render: function render(_ref) {\n var result = _ref.result,\n props = _ref.props;\n\n if (props.children) {\n return props.children(result);\n }\n\n return null;\n }\n}),\n loadable$1 = _createLoadable$1.loadable,\n lazy$1 = _createLoadable$1.lazy;\n\n/* eslint-disable no-underscore-dangle, camelcase */\nvar BROWSER = typeof window !== 'undefined';\nfunction loadableReady(done, _temp) {\n if (done === void 0) {\n done = function done() {};\n }\n\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$namespace = _ref.namespace,\n namespace = _ref$namespace === void 0 ? '' : _ref$namespace,\n _ref$chunkLoadingGlob = _ref.chunkLoadingGlobal,\n chunkLoadingGlobal = _ref$chunkLoadingGlob === void 0 ? '__LOADABLE_LOADED_CHUNKS__' : _ref$chunkLoadingGlob;\n\n if (!BROWSER) {\n warn('`loadableReady()` must be called in browser only');\n done();\n return Promise.resolve();\n }\n\n var requiredChunks = null;\n\n if (BROWSER) {\n var id = getRequiredChunkKey(namespace);\n var dataElement = document.getElementById(id);\n\n if (dataElement) {\n requiredChunks = JSON.parse(dataElement.textContent);\n var extElement = document.getElementById(id + \"_ext\");\n\n if (extElement) {\n var _JSON$parse = JSON.parse(extElement.textContent),\n namedChunks = _JSON$parse.namedChunks;\n\n namedChunks.forEach(function (chunkName) {\n LOADABLE_SHARED.initialChunks[chunkName] = true;\n });\n } else {\n // version mismatch\n throw new Error('loadable-component: @loadable/server does not match @loadable/component');\n }\n }\n }\n\n if (!requiredChunks) {\n warn('`loadableReady()` requires state, please use `getScriptTags` or `getScriptElements` server-side');\n done();\n return Promise.resolve();\n }\n\n var resolved = false;\n return new Promise(function (resolve) {\n window[chunkLoadingGlobal] = window[chunkLoadingGlobal] || [];\n var loadedChunks = window[chunkLoadingGlobal];\n var originalPush = loadedChunks.push.bind(loadedChunks);\n\n function checkReadyState() {\n if (requiredChunks.every(function (chunk) {\n return loadedChunks.some(function (_ref2) {\n var chunks = _ref2[0];\n return chunks.indexOf(chunk) > -1;\n });\n })) {\n if (!resolved) {\n resolved = true;\n resolve();\n }\n }\n }\n\n loadedChunks.push = function () {\n originalPush.apply(void 0, arguments);\n checkReadyState();\n };\n\n checkReadyState();\n }).then(done);\n}\n\n/* eslint-disable no-underscore-dangle */\nvar loadable$2 = loadable;\nloadable$2.lib = loadable$1;\nvar lazy$2 = lazy;\nlazy$2.lib = lazy$1;\nvar __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = sharedInternals;\n\nexports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\nexports[\"default\"] = loadable$2;\nexports.lazy = lazy$2;\nexports.loadableReady = loadableReady;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@loadable/component/dist/loadable.cjs.js?", + ); + + /***/ + }, + + /***/ 6888: /***/ (__unused_webpack_module, exports, __webpack_require__) => { + 'use strict'; + eval( + "\n\nexports.__esModule = true;\nexports[\"default\"] = void 0;\n\nvar _path = _interopRequireDefault(__webpack_require__(6928));\n\nvar _fs = _interopRequireDefault(__webpack_require__(9896));\n\nvar _uniq = _interopRequireDefault(__webpack_require__(3375));\n\nvar _uniqBy = _interopRequireDefault(__webpack_require__(14));\n\nvar _flatMap = _interopRequireDefault(__webpack_require__(7307));\n\nvar _react = _interopRequireDefault(__webpack_require__(6540));\n\nvar _sharedInternals = __webpack_require__(9506);\n\nvar _ChunkExtractorManager = _interopRequireDefault(__webpack_require__(3917));\n\nvar _util = __webpack_require__(9203);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nconst EXTENSION_SCRIPT_TYPES = {\n '.js': 'script',\n '.mjs': 'script',\n '.css': 'style'\n};\n\nfunction extensionToScriptType(extension) {\n return EXTENSION_SCRIPT_TYPES[extension] || null;\n}\n/**\n * some files can be references with extra query arguments which have to be removed\n * @param name\n * @returns {*}\n */\n\n\nfunction cleanFileName(name) {\n return name.split('?')[0];\n}\n\nfunction getFileScriptType(fileName) {\n return extensionToScriptType(cleanFileName(_path.default.extname(fileName)).toLowerCase());\n}\n\nfunction isScriptFile(fileName) {\n return getFileScriptType(fileName) === 'script';\n}\n\nfunction getAssets(chunks, getAsset) {\n return (0, _uniqBy.default)((0, _flatMap.default)(chunks, chunk => getAsset(chunk)), 'url');\n}\n\nfunction handleExtraProps(asset, extraProps) {\n return typeof extraProps === 'function' ? extraProps(asset) : extraProps;\n}\n\nfunction extraPropsToString(asset, extraProps) {\n return Object.entries(handleExtraProps(asset, extraProps)).reduce((acc, [key, value]) => `${acc} ${key}=\"${value}\"`, '');\n}\n\nfunction getSriHtmlAttributes(asset) {\n if (!asset.integrity) {\n return '';\n }\n\n return ` integrity=\"${asset.integrity}\"`;\n}\n\nfunction assetToScriptTag(asset, extraProps) {\n return `<script async data-chunk=\"${asset.chunk}\" src=\"${asset.url}\"${getSriHtmlAttributes(asset)}${extraPropsToString(asset, extraProps)}></script>`;\n}\n\nfunction assetToScriptElement(asset, extraProps) {\n return _react.default.createElement(\"script\", Object.assign({\n key: asset.url,\n async: true,\n \"data-chunk\": asset.chunk,\n src: asset.url\n }, handleExtraProps(asset, extraProps)));\n}\n\nfunction assetToStyleString(asset, {\n inputFileSystem\n}) {\n return new Promise((resolve, reject) => {\n inputFileSystem.readFile(asset.path, 'utf8', (err, data) => {\n if (err) {\n reject(err);\n return;\n }\n\n resolve(data);\n });\n });\n}\n\nfunction assetToStyleTag(asset, extraProps) {\n return `<link data-chunk=\"${asset.chunk}\" rel=\"stylesheet\" href=\"${asset.url}\"${getSriHtmlAttributes(asset)}${extraPropsToString(asset, extraProps)}>`;\n}\n\nfunction assetToStyleTagInline(asset, extraProps, {\n inputFileSystem\n}) {\n return new Promise((resolve, reject) => {\n inputFileSystem.readFile(asset.path, 'utf8', (err, data) => {\n if (err) {\n reject(err);\n return;\n }\n\n resolve(`<style type=\"text/css\" data-chunk=\"${asset.chunk}\"${extraPropsToString(asset, extraProps)}>\n${data}\n</style>`);\n });\n });\n}\n\nfunction assetToStyleElement(asset, extraProps) {\n return _react.default.createElement(\"link\", Object.assign({\n key: asset.url,\n \"data-chunk\": asset.chunk,\n rel: \"stylesheet\",\n href: asset.url\n }, handleExtraProps(asset, extraProps)));\n}\n\nfunction assetToStyleElementInline(asset, extraProps, {\n inputFileSystem\n}) {\n return new Promise((resolve, reject) => {\n inputFileSystem.readFile(asset.path, 'utf8', (err, data) => {\n if (err) {\n reject(err);\n return;\n }\n\n resolve(_react.default.createElement(\"style\", Object.assign({\n key: asset.url,\n \"data-chunk\": asset.chunk,\n dangerouslySetInnerHTML: {\n __html: data\n }\n }, handleExtraProps(asset, extraProps))));\n });\n });\n}\n\nconst LINK_ASSET_HINTS = {\n mainAsset: 'data-chunk',\n childAsset: 'data-parent-chunk'\n};\n\nfunction assetToLinkTag(asset, extraProps) {\n const hint = LINK_ASSET_HINTS[asset.type];\n return `<link ${hint}=\"${asset.chunk}\" rel=\"${asset.linkType}\" as=\"${asset.scriptType}\" href=\"${asset.url}\"${getSriHtmlAttributes(asset)}${extraPropsToString(asset, extraProps)}>`;\n}\n\nfunction assetToLinkElement(asset, extraProps) {\n const hint = LINK_ASSET_HINTS[asset.type];\n\n const props = _extends({\n key: asset.url,\n [hint]: asset.chunk,\n rel: asset.linkType,\n as: asset.scriptType,\n href: asset.url\n }, handleExtraProps(asset, extraProps));\n\n return _react.default.createElement(\"link\", props);\n}\n\nfunction joinTags(tags) {\n return tags.join('\\n');\n}\n\nconst HOT_UPDATE_REGEXP = /\\.hot-update\\.js$/;\n\nfunction isValidChunkAsset(chunkAsset) {\n return chunkAsset.scriptType && !HOT_UPDATE_REGEXP.test(chunkAsset.filename);\n}\n\nfunction checkIfChunkIncludesJs(chunkInfo) {\n return chunkInfo.files.some(file => isScriptFile(file));\n}\n\nclass ChunkExtractor {\n constructor({\n statsFile,\n stats,\n entrypoints = ['main'],\n namespace = '',\n outputPath,\n publicPath,\n inputFileSystem = _fs.default\n } = {}) {\n this.namespace = namespace;\n this.stats = stats || (0, _util.readJsonFileSync)(inputFileSystem, statsFile);\n this.publicPath = publicPath || this.stats.publicPath;\n this.outputPath = outputPath || this.stats.outputPath;\n this.statsFile = statsFile;\n this.entrypoints = Array.isArray(entrypoints) ? entrypoints : [entrypoints];\n this.chunks = [];\n this.inputFileSystem = inputFileSystem;\n }\n\n resolvePublicUrl(filename) {\n return (0, _util.joinURLPath)(this.publicPath, filename);\n }\n\n getChunkGroup(chunk) {\n const chunkGroup = this.stats.namedChunkGroups[chunk];\n (0, _sharedInternals.invariant)(chunkGroup, `cannot find ${chunk} in stats`);\n return chunkGroup;\n }\n\n getChunkInfo(chunkId) {\n const chunkInfo = this.stats.chunks.find(chunk => chunk.id === chunkId);\n (0, _sharedInternals.invariant)(chunkInfo, `cannot find chunk (chunkId: ${chunkId}) in stats`);\n return chunkInfo;\n }\n\n createChunkAsset({\n filename,\n chunk,\n type,\n linkType\n }) {\n const resolvedFilename = typeof filename === 'object' && filename.name ? filename.name : filename;\n const resolvedIntegrity = typeof filename === 'object' && filename.integrity ? filename.integrity : null;\n return {\n filename: resolvedFilename,\n integrity: resolvedIntegrity,\n scriptType: getFileScriptType(resolvedFilename),\n chunk,\n url: this.resolvePublicUrl(resolvedFilename),\n path: _path.default.join(this.outputPath, resolvedFilename),\n type,\n linkType\n };\n }\n\n getChunkAssets(chunks) {\n const one = chunk => {\n const chunkGroup = this.getChunkGroup(chunk);\n return chunkGroup.assets.map(filename => this.createChunkAsset({\n filename,\n chunk,\n type: 'mainAsset',\n linkType: 'preload'\n })).filter(isValidChunkAsset);\n };\n\n if (Array.isArray(chunks)) {\n return getAssets(chunks, one);\n }\n\n return one(chunks);\n }\n\n getChunkChildAssets(chunks, type) {\n const one = chunk => {\n const chunkGroup = this.getChunkGroup(chunk);\n const assets = chunkGroup.childAssets[type] || [];\n return assets.map(filename => this.createChunkAsset({\n filename,\n chunk,\n type: 'childAsset',\n linkType: type\n })).filter(isValidChunkAsset);\n };\n\n if (Array.isArray(chunks)) {\n return getAssets(chunks, one);\n }\n\n return one(chunks);\n }\n\n getChunkDependencies(chunks) {\n const one = chunk => {\n const chunkGroup = this.getChunkGroup(chunk); // ignore chunk that only contains css files.\n\n return chunkGroup.chunks.filter(chunkId => {\n const chunkInfo = this.getChunkInfo(chunkId);\n\n if (!chunkInfo) {\n return false;\n }\n\n return checkIfChunkIncludesJs(chunkInfo);\n });\n };\n\n if (Array.isArray(chunks)) {\n return (0, _uniq.default)((0, _flatMap.default)(chunks, one));\n }\n\n return one(chunks);\n }\n\n getRequiredChunksScriptContent() {\n return JSON.stringify(this.getChunkDependencies(this.chunks));\n }\n\n getRequiredChunksNamesScriptContent() {\n return JSON.stringify({\n namedChunks: this.chunks\n });\n }\n\n getRequiredChunksScriptTag(extraProps) {\n const id = (0, _sharedInternals.getRequiredChunkKey)(this.namespace);\n const props = `type=\"application/json\"${extraPropsToString(null, extraProps)}`;\n return [`<script id=\"${id}\" ${props}>${this.getRequiredChunksScriptContent()}</script>`, `<script id=\"${id}_ext\" ${props}>${this.getRequiredChunksNamesScriptContent()}</script>`].join('');\n }\n\n getRequiredChunksScriptElements(extraProps) {\n const id = (0, _sharedInternals.getRequiredChunkKey)(this.namespace);\n\n const props = _extends({\n type: 'application/json'\n }, handleExtraProps(null, extraProps));\n\n return [_react.default.createElement(\"script\", Object.assign({\n id: id,\n key: id,\n dangerouslySetInnerHTML: {\n __html: this.getRequiredChunksScriptContent()\n }\n }, props)), _react.default.createElement(\"script\", Object.assign({\n id: `${id}_ext`,\n key: `${id}_ext`,\n dangerouslySetInnerHTML: {\n __html: this.getRequiredChunksNamesScriptContent()\n }\n }, props))];\n } // Public methods\n // -----------------\n // Collect\n\n\n addChunk(chunk) {\n if (this.chunks.indexOf(chunk) !== -1) return;\n this.chunks.push(chunk);\n }\n\n collectChunks(app) {\n return _react.default.createElement(_ChunkExtractorManager.default, {\n extractor: this\n }, app);\n } // Utilities\n\n\n requireEntrypoint(entrypoint) {\n const entrypointPath = this.getEntrypointPath(this.entrypoint);\n this.getAllScriptAssetsPaths().forEach(assetPath => {\n (0, _util.smartRequire)(assetPath);\n });\n return (0, _util.smartRequire)(entrypointPath);\n }\n\n getEntrypointPath(entrypoint) {\n entrypoint = entrypoint || this.entrypoints[0];\n const assets = this.getChunkAssets(entrypoint);\n const mainAsset = assets.find(asset => asset.scriptType === 'script');\n (0, _sharedInternals.invariant)(mainAsset, 'asset not found');\n return cleanFileName(mainAsset.path);\n }\n\n getAllScriptAssetsPaths() {\n return this.stats.assets.filter(({\n name\n }) => isScriptFile(name)).map(({\n name\n }) => {\n return _path.default.join(this.outputPath, cleanFileName(name));\n });\n } // Main assets\n\n\n getMainAssets(scriptType) {\n const chunks = [...this.entrypoints, ...this.chunks];\n const assets = this.getChunkAssets(chunks);\n\n if (scriptType) {\n return assets.filter(asset => asset.scriptType === scriptType);\n }\n\n return assets;\n }\n\n getScriptTags(extraProps = {}) {\n const requiredScriptTag = this.getRequiredChunksScriptTag(extraProps);\n const mainAssets = this.getMainAssets('script');\n const assetsScriptTags = mainAssets.map(asset => assetToScriptTag(asset, extraProps));\n return joinTags([requiredScriptTag, ...assetsScriptTags]);\n }\n\n getScriptElements(extraProps = {}) {\n const requiredScriptElements = this.getRequiredChunksScriptElements(extraProps);\n const mainAssets = this.getMainAssets('script');\n const assetsScriptElements = mainAssets.map(asset => assetToScriptElement(asset, extraProps));\n return [...requiredScriptElements, ...assetsScriptElements];\n }\n\n getCssString() {\n const mainAssets = this.getMainAssets('style');\n const promises = mainAssets.map(asset => assetToStyleString(asset, this).then(data => data));\n return Promise.all(promises).then(results => joinTags(results));\n }\n\n getStyleTags(extraProps = {}) {\n const mainAssets = this.getMainAssets('style');\n return joinTags(mainAssets.map(asset => assetToStyleTag(asset, extraProps)));\n }\n\n getInlineStyleTags(extraProps = {}) {\n const mainAssets = this.getMainAssets('style');\n const promises = mainAssets.map(asset => assetToStyleTagInline(asset, extraProps, this).then(data => data));\n return Promise.all(promises).then(results => joinTags(results));\n }\n\n getStyleElements(extraProps = {}) {\n const mainAssets = this.getMainAssets('style');\n return mainAssets.map(asset => assetToStyleElement(asset, extraProps));\n }\n\n getInlineStyleElements(extraProps = {}) {\n const mainAssets = this.getMainAssets('style');\n const promises = mainAssets.map(asset => assetToStyleElementInline(asset, extraProps, this).then(data => data));\n return Promise.all(promises).then(results => results);\n } // Pre assets\n\n\n getPreAssets() {\n const mainAssets = this.getMainAssets();\n const chunks = [...this.entrypoints, ...this.chunks];\n const preloadAssets = this.getChunkChildAssets(chunks, 'preload');\n const prefetchAssets = this.getChunkChildAssets(chunks, 'prefetch');\n return [...mainAssets, ...preloadAssets, ...prefetchAssets].sort(a => a.scriptType === 'style' ? -1 : 0);\n }\n\n getLinkTags(extraProps = {}) {\n const assets = this.getPreAssets();\n const linkTags = assets.map(asset => assetToLinkTag(asset, extraProps));\n return joinTags(linkTags);\n }\n\n getLinkElements(extraProps = {}) {\n const assets = this.getPreAssets();\n return assets.map(asset => assetToLinkElement(asset, extraProps));\n }\n\n}\n\nvar _default = ChunkExtractor;\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@loadable/server/lib/ChunkExtractor.js?", + ); + + /***/ + }, + + /***/ 3917: /***/ (__unused_webpack_module, exports, __webpack_require__) => { + 'use strict'; + eval( + '\n\nexports.__esModule = true;\nexports["default"] = void 0;\n\nvar _react = _interopRequireDefault(__webpack_require__(6540));\n\nvar _sharedInternals = __webpack_require__(9506);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst ChunkExtractorManager = ({\n extractor,\n children\n}) => _react.default.createElement(_sharedInternals.Context.Provider, {\n value: extractor\n}, children);\n\nvar _default = ChunkExtractorManager;\nexports["default"] = _default;\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@loadable/server/lib/ChunkExtractorManager.js?', + ); + + /***/ + }, + + /***/ 427: /***/ (__unused_webpack_module, exports, __webpack_require__) => { + 'use strict'; + eval( + 'var __webpack_unused_export__;\n\n\n__webpack_unused_export__ = true;\nexports.ky = __webpack_unused_export__ = void 0;\n\nvar _ChunkExtractorManager = _interopRequireDefault(__webpack_require__(3917));\n\n__webpack_unused_export__ = _ChunkExtractorManager.default;\n\nvar _ChunkExtractor = _interopRequireDefault(__webpack_require__(6888));\n\nexports.ky = _ChunkExtractor.default;\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@loadable/server/lib/index.js?', + ); + + /***/ + }, + + /***/ 9506: /***/ (__unused_webpack_module, exports, __webpack_require__) => { + 'use strict'; + eval( + '\n\nexports.__esModule = true;\nexports.getRequiredChunkKey = exports.Context = exports.invariant = void 0;\n\nvar _component = __webpack_require__(8630);\n\n/* eslint-disable no-underscore-dangle */\nconst {\n invariant,\n Context,\n getRequiredChunkKey\n} = _component.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\nexports.getRequiredChunkKey = getRequiredChunkKey;\nexports.Context = Context;\nexports.invariant = invariant;\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@loadable/server/lib/sharedInternals.js?', + ); + + /***/ + }, + + /***/ 9203: /***/ (__unused_webpack_module, exports) => { + 'use strict'; + eval( + "\n\nexports.__esModule = true;\nexports.readJsonFileSync = exports.joinURLPath = exports.smartRequire = exports.clearModuleCache = void 0;\n\n// Use __non_webpack_require__ to prevent Webpack from compiling it\n// when the server-side code is compiled with Webpack\n// eslint-disable-next-line camelcase, no-undef, global-require, import/no-dynamic-require, no-eval\nconst getRequire = () => typeof require !== 'undefined' ? require : eval('require');\n\nconst clearModuleCache = moduleName => {\n const {\n cache\n } = getRequire();\n const m = cache[moduleName];\n\n if (m) {\n // remove self from own parents\n if (m.parent && m.parent.children) {\n m.parent.children = m.parent.children.filter(x => x !== m);\n } // remove self from own children\n\n\n if (m.children) {\n m.children.forEach(child => {\n if (child.parent && child.parent === m) {\n child.parent = null;\n }\n });\n }\n\n delete cache[moduleName];\n }\n};\n\nexports.clearModuleCache = clearModuleCache;\n\nconst smartRequire = modulePath => {\n if (false) {}\n\n return getRequire()(modulePath);\n};\n\nexports.smartRequire = smartRequire;\n\nconst joinURLPath = (publicPath, filename) => {\n if (publicPath.substr(-1) === '/') {\n return `${publicPath}${filename}`;\n }\n\n return `${publicPath}/${filename}`;\n};\n\nexports.joinURLPath = joinURLPath;\n\nconst readJsonFileSync = (inputFileSystem, jsonFilePath) => {\n return JSON.parse(inputFileSystem.readFileSync(jsonFilePath));\n};\n\nexports.readJsonFileSync = readJsonFileSync;\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@loadable/server/lib/util.js?", + ); + + /***/ + }, + + /***/ 5588: /***/ (__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ AbortedDeferredError: () => (/* binding */ AbortedDeferredError),\n/* harmony export */ Action: () => (/* binding */ Action),\n/* harmony export */ IDLE_BLOCKER: () => (/* binding */ IDLE_BLOCKER),\n/* harmony export */ IDLE_FETCHER: () => (/* binding */ IDLE_FETCHER),\n/* harmony export */ IDLE_NAVIGATION: () => (/* binding */ IDLE_NAVIGATION),\n/* harmony export */ UNSAFE_DEFERRED_SYMBOL: () => (/* binding */ UNSAFE_DEFERRED_SYMBOL),\n/* harmony export */ UNSAFE_DeferredData: () => (/* binding */ DeferredData),\n/* harmony export */ UNSAFE_ErrorResponseImpl: () => (/* binding */ ErrorResponseImpl),\n/* harmony export */ UNSAFE_convertRouteMatchToUiMatch: () => (/* binding */ convertRouteMatchToUiMatch),\n/* harmony export */ UNSAFE_convertRoutesToDataRoutes: () => (/* binding */ convertRoutesToDataRoutes),\n/* harmony export */ UNSAFE_getResolveToMatches: () => (/* binding */ getResolveToMatches),\n/* harmony export */ UNSAFE_invariant: () => (/* binding */ invariant),\n/* harmony export */ UNSAFE_warning: () => (/* binding */ warning),\n/* harmony export */ createBrowserHistory: () => (/* binding */ createBrowserHistory),\n/* harmony export */ createHashHistory: () => (/* binding */ createHashHistory),\n/* harmony export */ createMemoryHistory: () => (/* binding */ createMemoryHistory),\n/* harmony export */ createPath: () => (/* binding */ createPath),\n/* harmony export */ createRouter: () => (/* binding */ createRouter),\n/* harmony export */ createStaticHandler: () => (/* binding */ createStaticHandler),\n/* harmony export */ defer: () => (/* binding */ defer),\n/* harmony export */ generatePath: () => (/* binding */ generatePath),\n/* harmony export */ getStaticContextFromError: () => (/* binding */ getStaticContextFromError),\n/* harmony export */ getToPathname: () => (/* binding */ getToPathname),\n/* harmony export */ isDeferredData: () => (/* binding */ isDeferredData),\n/* harmony export */ isRouteErrorResponse: () => (/* binding */ isRouteErrorResponse),\n/* harmony export */ joinPaths: () => (/* binding */ joinPaths),\n/* harmony export */ json: () => (/* binding */ json),\n/* harmony export */ matchPath: () => (/* binding */ matchPath),\n/* harmony export */ matchRoutes: () => (/* binding */ matchRoutes),\n/* harmony export */ normalizePathname: () => (/* binding */ normalizePathname),\n/* harmony export */ parsePath: () => (/* binding */ parsePath),\n/* harmony export */ redirect: () => (/* binding */ redirect),\n/* harmony export */ redirectDocument: () => (/* binding */ redirectDocument),\n/* harmony export */ resolvePath: () => (/* binding */ resolvePath),\n/* harmony export */ resolveTo: () => (/* binding */ resolveTo),\n/* harmony export */ stripBasename: () => (/* binding */ stripBasename)\n/* harmony export */ });\n/**\n * @remix-run/router v1.17.1\n *\n * Copyright (c) Remix Software Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE.md file in the root directory of this source tree.\n *\n * @license MIT\n */\nfunction _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}\n\n////////////////////////////////////////////////////////////////////////////////\n//#region Types and Constants\n////////////////////////////////////////////////////////////////////////////////\n/**\n * Actions represent the type of change to a location value.\n */\nvar Action;\n(function (Action) {\n /**\n * A POP indicates a change to an arbitrary index in the history stack, such\n * as a back or forward navigation. It does not describe the direction of the\n * navigation, only that the current index changed.\n *\n * Note: This is the default action for newly created history objects.\n */\n Action["Pop"] = "POP";\n /**\n * A PUSH indicates a new entry being added to the history stack, such as when\n * a link is clicked and a new page loads. When this happens, all subsequent\n * entries in the stack are lost.\n */\n Action["Push"] = "PUSH";\n /**\n * A REPLACE indicates the entry at the current index in the history stack\n * being replaced by a new one.\n */\n Action["Replace"] = "REPLACE";\n})(Action || (Action = {}));\nconst PopStateEventType = "popstate";\n/**\n * Memory history stores the current location in memory. It is designed for use\n * in stateful non-browser environments like tests and React Native.\n */\nfunction createMemoryHistory(options) {\n if (options === void 0) {\n options = {};\n }\n let {\n initialEntries = ["/"],\n initialIndex,\n v5Compat = false\n } = options;\n let entries; // Declare so we can access from createMemoryLocation\n entries = initialEntries.map((entry, index) => createMemoryLocation(entry, typeof entry === "string" ? null : entry.state, index === 0 ? "default" : undefined));\n let index = clampIndex(initialIndex == null ? entries.length - 1 : initialIndex);\n let action = Action.Pop;\n let listener = null;\n function clampIndex(n) {\n return Math.min(Math.max(n, 0), entries.length - 1);\n }\n function getCurrentLocation() {\n return entries[index];\n }\n function createMemoryLocation(to, state, key) {\n if (state === void 0) {\n state = null;\n }\n let location = createLocation(entries ? getCurrentLocation().pathname : "/", to, state, key);\n warning(location.pathname.charAt(0) === "/", "relative pathnames are not supported in memory history: " + JSON.stringify(to));\n return location;\n }\n function createHref(to) {\n return typeof to === "string" ? to : createPath(to);\n }\n let history = {\n get index() {\n return index;\n },\n get action() {\n return action;\n },\n get location() {\n return getCurrentLocation();\n },\n createHref,\n createURL(to) {\n return new URL(createHref(to), "http://localhost");\n },\n encodeLocation(to) {\n let path = typeof to === "string" ? parsePath(to) : to;\n return {\n pathname: path.pathname || "",\n search: path.search || "",\n hash: path.hash || ""\n };\n },\n push(to, state) {\n action = Action.Push;\n let nextLocation = createMemoryLocation(to, state);\n index += 1;\n entries.splice(index, entries.length, nextLocation);\n if (v5Compat && listener) {\n listener({\n action,\n location: nextLocation,\n delta: 1\n });\n }\n },\n replace(to, state) {\n action = Action.Replace;\n let nextLocation = createMemoryLocation(to, state);\n entries[index] = nextLocation;\n if (v5Compat && listener) {\n listener({\n action,\n location: nextLocation,\n delta: 0\n });\n }\n },\n go(delta) {\n action = Action.Pop;\n let nextIndex = clampIndex(index + delta);\n let nextLocation = entries[nextIndex];\n index = nextIndex;\n if (listener) {\n listener({\n action,\n location: nextLocation,\n delta\n });\n }\n },\n listen(fn) {\n listener = fn;\n return () => {\n listener = null;\n };\n }\n };\n return history;\n}\n/**\n * Browser history stores the location in regular URLs. This is the standard for\n * most web apps, but it requires some configuration on the server to ensure you\n * serve the same app at multiple URLs.\n *\n * @see https://github.com/remix-run/history/tree/main/docs/api-reference.md#createbrowserhistory\n */\nfunction createBrowserHistory(options) {\n if (options === void 0) {\n options = {};\n }\n function createBrowserLocation(window, globalHistory) {\n let {\n pathname,\n search,\n hash\n } = window.location;\n return createLocation("", {\n pathname,\n search,\n hash\n },\n // state defaults to `null` because `window.history.state` does\n globalHistory.state && globalHistory.state.usr || null, globalHistory.state && globalHistory.state.key || "default");\n }\n function createBrowserHref(window, to) {\n return typeof to === "string" ? to : createPath(to);\n }\n return getUrlBasedHistory(createBrowserLocation, createBrowserHref, null, options);\n}\n/**\n * Hash history stores the location in window.location.hash. This makes it ideal\n * for situations where you don\'t want to send the location to the server for\n * some reason, either because you do cannot configure it or the URL space is\n * reserved for something else.\n *\n * @see https://github.com/remix-run/history/tree/main/docs/api-reference.md#createhashhistory\n */\nfunction createHashHistory(options) {\n if (options === void 0) {\n options = {};\n }\n function createHashLocation(window, globalHistory) {\n let {\n pathname = "/",\n search = "",\n hash = ""\n } = parsePath(window.location.hash.substr(1));\n // Hash URL should always have a leading / just like window.location.pathname\n // does, so if an app ends up at a route like /#something then we add a\n // leading slash so all of our path-matching behaves the same as if it would\n // in a browser router. This is particularly important when there exists a\n // root splat route (<Route path="*">) since that matches internally against\n // "/*" and we\'d expect /#something to 404 in a hash router app.\n if (!pathname.startsWith("/") && !pathname.startsWith(".")) {\n pathname = "/" + pathname;\n }\n return createLocation("", {\n pathname,\n search,\n hash\n },\n // state defaults to `null` because `window.history.state` does\n globalHistory.state && globalHistory.state.usr || null, globalHistory.state && globalHistory.state.key || "default");\n }\n function createHashHref(window, to) {\n let base = window.document.querySelector("base");\n let href = "";\n if (base && base.getAttribute("href")) {\n let url = window.location.href;\n let hashIndex = url.indexOf("#");\n href = hashIndex === -1 ? url : url.slice(0, hashIndex);\n }\n return href + "#" + (typeof to === "string" ? to : createPath(to));\n }\n function validateHashLocation(location, to) {\n warning(location.pathname.charAt(0) === "/", "relative pathnames are not supported in hash history.push(" + JSON.stringify(to) + ")");\n }\n return getUrlBasedHistory(createHashLocation, createHashHref, validateHashLocation, options);\n}\nfunction invariant(value, message) {\n if (value === false || value === null || typeof value === "undefined") {\n throw new Error(message);\n }\n}\nfunction warning(cond, message) {\n if (!cond) {\n // eslint-disable-next-line no-console\n if (typeof console !== "undefined") console.warn(message);\n try {\n // Welcome to debugging history!\n //\n // This error is thrown as a convenience, so you can more easily\n // find the source for a warning that appears in the console by\n // enabling "pause on exceptions" in your JavaScript debugger.\n throw new Error(message);\n // eslint-disable-next-line no-empty\n } catch (e) {}\n }\n}\nfunction createKey() {\n return Math.random().toString(36).substr(2, 8);\n}\n/**\n * For browser-based histories, we combine the state and key into an object\n */\nfunction getHistoryState(location, index) {\n return {\n usr: location.state,\n key: location.key,\n idx: index\n };\n}\n/**\n * Creates a Location object with a unique key from the given Path\n */\nfunction createLocation(current, to, state, key) {\n if (state === void 0) {\n state = null;\n }\n let location = _extends({\n pathname: typeof current === "string" ? current : current.pathname,\n search: "",\n hash: ""\n }, typeof to === "string" ? parsePath(to) : to, {\n state,\n // TODO: This could be cleaned up. push/replace should probably just take\n // full Locations now and avoid the need to run through this flow at all\n // But that\'s a pretty big refactor to the current test suite so going to\n // keep as is for the time being and just let any incoming keys take precedence\n key: to && to.key || key || createKey()\n });\n return location;\n}\n/**\n * Creates a string URL path from the given pathname, search, and hash components.\n */\nfunction createPath(_ref) {\n let {\n pathname = "/",\n search = "",\n hash = ""\n } = _ref;\n if (search && search !== "?") pathname += search.charAt(0) === "?" ? search : "?" + search;\n if (hash && hash !== "#") pathname += hash.charAt(0) === "#" ? hash : "#" + hash;\n return pathname;\n}\n/**\n * Parses a string URL path into its separate pathname, search, and hash components.\n */\nfunction parsePath(path) {\n let parsedPath = {};\n if (path) {\n let hashIndex = path.indexOf("#");\n if (hashIndex >= 0) {\n parsedPath.hash = path.substr(hashIndex);\n path = path.substr(0, hashIndex);\n }\n let searchIndex = path.indexOf("?");\n if (searchIndex >= 0) {\n parsedPath.search = path.substr(searchIndex);\n path = path.substr(0, searchIndex);\n }\n if (path) {\n parsedPath.pathname = path;\n }\n }\n return parsedPath;\n}\nfunction getUrlBasedHistory(getLocation, createHref, validateLocation, options) {\n if (options === void 0) {\n options = {};\n }\n let {\n window = document.defaultView,\n v5Compat = false\n } = options;\n let globalHistory = window.history;\n let action = Action.Pop;\n let listener = null;\n let index = getIndex();\n // Index should only be null when we initialize. If not, it\'s because the\n // user called history.pushState or history.replaceState directly, in which\n // case we should log a warning as it will result in bugs.\n if (index == null) {\n index = 0;\n globalHistory.replaceState(_extends({}, globalHistory.state, {\n idx: index\n }), "");\n }\n function getIndex() {\n let state = globalHistory.state || {\n idx: null\n };\n return state.idx;\n }\n function handlePop() {\n action = Action.Pop;\n let nextIndex = getIndex();\n let delta = nextIndex == null ? null : nextIndex - index;\n index = nextIndex;\n if (listener) {\n listener({\n action,\n location: history.location,\n delta\n });\n }\n }\n function push(to, state) {\n action = Action.Push;\n let location = createLocation(history.location, to, state);\n if (validateLocation) validateLocation(location, to);\n index = getIndex() + 1;\n let historyState = getHistoryState(location, index);\n let url = history.createHref(location);\n // try...catch because iOS limits us to 100 pushState calls :/\n try {\n globalHistory.pushState(historyState, "", url);\n } catch (error) {\n // If the exception is because `state` can\'t be serialized, let that throw\n // outwards just like a replace call would so the dev knows the cause\n // https://html.spec.whatwg.org/multipage/nav-history-apis.html#shared-history-push/replace-state-steps\n // https://html.spec.whatwg.org/multipage/structured-data.html#structuredserializeinternal\n if (error instanceof DOMException && error.name === "DataCloneError") {\n throw error;\n }\n // They are going to lose state here, but there is no real\n // way to warn them about it since the page will refresh...\n window.location.assign(url);\n }\n if (v5Compat && listener) {\n listener({\n action,\n location: history.location,\n delta: 1\n });\n }\n }\n function replace(to, state) {\n action = Action.Replace;\n let location = createLocation(history.location, to, state);\n if (validateLocation) validateLocation(location, to);\n index = getIndex();\n let historyState = getHistoryState(location, index);\n let url = history.createHref(location);\n globalHistory.replaceState(historyState, "", url);\n if (v5Compat && listener) {\n listener({\n action,\n location: history.location,\n delta: 0\n });\n }\n }\n function createURL(to) {\n // window.location.origin is "null" (the literal string value) in Firefox\n // under certain conditions, notably when serving from a local HTML file\n // See https://bugzilla.mozilla.org/show_bug.cgi?id=878297\n let base = window.location.origin !== "null" ? window.location.origin : window.location.href;\n let href = typeof to === "string" ? to : createPath(to);\n // Treating this as a full URL will strip any trailing spaces so we need to\n // pre-encode them since they might be part of a matching splat param from\n // an ancestor route\n href = href.replace(/ $/, "%20");\n invariant(base, "No window.location.(origin|href) available to create URL for href: " + href);\n return new URL(href, base);\n }\n let history = {\n get action() {\n return action;\n },\n get location() {\n return getLocation(window, globalHistory);\n },\n listen(fn) {\n if (listener) {\n throw new Error("A history only accepts one active listener");\n }\n window.addEventListener(PopStateEventType, handlePop);\n listener = fn;\n return () => {\n window.removeEventListener(PopStateEventType, handlePop);\n listener = null;\n };\n },\n createHref(to) {\n return createHref(window, to);\n },\n createURL,\n encodeLocation(to) {\n // Encode a Location the same way window.location would\n let url = createURL(to);\n return {\n pathname: url.pathname,\n search: url.search,\n hash: url.hash\n };\n },\n push,\n replace,\n go(n) {\n return globalHistory.go(n);\n }\n };\n return history;\n}\n//#endregion\n\nvar ResultType;\n(function (ResultType) {\n ResultType["data"] = "data";\n ResultType["deferred"] = "deferred";\n ResultType["redirect"] = "redirect";\n ResultType["error"] = "error";\n})(ResultType || (ResultType = {}));\nconst immutableRouteKeys = new Set(["lazy", "caseSensitive", "path", "id", "index", "children"]);\nfunction isIndexRoute(route) {\n return route.index === true;\n}\n// Walk the route tree generating unique IDs where necessary, so we are working\n// solely with AgnosticDataRouteObject\'s within the Router\nfunction convertRoutesToDataRoutes(routes, mapRouteProperties, parentPath, manifest) {\n if (parentPath === void 0) {\n parentPath = [];\n }\n if (manifest === void 0) {\n manifest = {};\n }\n return routes.map((route, index) => {\n let treePath = [...parentPath, String(index)];\n let id = typeof route.id === "string" ? route.id : treePath.join("-");\n invariant(route.index !== true || !route.children, "Cannot specify children on an index route");\n invariant(!manifest[id], "Found a route id collision on id \\"" + id + "\\". Route " + "id\'s must be globally unique within Data Router usages");\n if (isIndexRoute(route)) {\n let indexRoute = _extends({}, route, mapRouteProperties(route), {\n id\n });\n manifest[id] = indexRoute;\n return indexRoute;\n } else {\n let pathOrLayoutRoute = _extends({}, route, mapRouteProperties(route), {\n id,\n children: undefined\n });\n manifest[id] = pathOrLayoutRoute;\n if (route.children) {\n pathOrLayoutRoute.children = convertRoutesToDataRoutes(route.children, mapRouteProperties, treePath, manifest);\n }\n return pathOrLayoutRoute;\n }\n });\n}\n/**\n * Matches the given routes to a location and returns the match data.\n *\n * @see https://reactrouter.com/utils/match-routes\n */\nfunction matchRoutes(routes, locationArg, basename) {\n if (basename === void 0) {\n basename = "/";\n }\n return matchRoutesImpl(routes, locationArg, basename, false);\n}\nfunction matchRoutesImpl(routes, locationArg, basename, allowPartial) {\n let location = typeof locationArg === "string" ? parsePath(locationArg) : locationArg;\n let pathname = stripBasename(location.pathname || "/", basename);\n if (pathname == null) {\n return null;\n }\n let branches = flattenRoutes(routes);\n rankRouteBranches(branches);\n let matches = null;\n for (let i = 0; matches == null && i < branches.length; ++i) {\n // Incoming pathnames are generally encoded from either window.location\n // or from router.navigate, but we want to match against the unencoded\n // paths in the route definitions. Memory router locations won\'t be\n // encoded here but there also shouldn\'t be anything to decode so this\n // should be a safe operation. This avoids needing matchRoutes to be\n // history-aware.\n let decoded = decodePath(pathname);\n matches = matchRouteBranch(branches[i], decoded, allowPartial);\n }\n return matches;\n}\nfunction convertRouteMatchToUiMatch(match, loaderData) {\n let {\n route,\n pathname,\n params\n } = match;\n return {\n id: route.id,\n pathname,\n params,\n data: loaderData[route.id],\n handle: route.handle\n };\n}\nfunction flattenRoutes(routes, branches, parentsMeta, parentPath) {\n if (branches === void 0) {\n branches = [];\n }\n if (parentsMeta === void 0) {\n parentsMeta = [];\n }\n if (parentPath === void 0) {\n parentPath = "";\n }\n let flattenRoute = (route, index, relativePath) => {\n let meta = {\n relativePath: relativePath === undefined ? route.path || "" : relativePath,\n caseSensitive: route.caseSensitive === true,\n childrenIndex: index,\n route\n };\n if (meta.relativePath.startsWith("/")) {\n invariant(meta.relativePath.startsWith(parentPath), "Absolute route path \\"" + meta.relativePath + "\\" nested under path " + ("\\"" + parentPath + "\\" is not valid. An absolute child route path ") + "must start with the combined path of all its parent routes.");\n meta.relativePath = meta.relativePath.slice(parentPath.length);\n }\n let path = joinPaths([parentPath, meta.relativePath]);\n let routesMeta = parentsMeta.concat(meta);\n // Add the children before adding this route to the array, so we traverse the\n // route tree depth-first and child routes appear before their parents in\n // the "flattened" version.\n if (route.children && route.children.length > 0) {\n invariant(\n // Our types know better, but runtime JS may not!\n // @ts-expect-error\n route.index !== true, "Index routes must not have child routes. Please remove " + ("all child routes from route path \\"" + path + "\\"."));\n flattenRoutes(route.children, branches, routesMeta, path);\n }\n // Routes without a path shouldn\'t ever match by themselves unless they are\n // index routes, so don\'t add them to the list of possible branches.\n if (route.path == null && !route.index) {\n return;\n }\n branches.push({\n path,\n score: computeScore(path, route.index),\n routesMeta\n });\n };\n routes.forEach((route, index) => {\n var _route$path;\n // coarse-grain check for optional params\n if (route.path === "" || !((_route$path = route.path) != null && _route$path.includes("?"))) {\n flattenRoute(route, index);\n } else {\n for (let exploded of explodeOptionalSegments(route.path)) {\n flattenRoute(route, index, exploded);\n }\n }\n });\n return branches;\n}\n/**\n * Computes all combinations of optional path segments for a given path,\n * excluding combinations that are ambiguous and of lower priority.\n *\n * For example, `/one/:two?/three/:four?/:five?` explodes to:\n * - `/one/three`\n * - `/one/:two/three`\n * - `/one/three/:four`\n * - `/one/three/:five`\n * - `/one/:two/three/:four`\n * - `/one/:two/three/:five`\n * - `/one/three/:four/:five`\n * - `/one/:two/three/:four/:five`\n */\nfunction explodeOptionalSegments(path) {\n let segments = path.split("/");\n if (segments.length === 0) return [];\n let [first, ...rest] = segments;\n // Optional path segments are denoted by a trailing `?`\n let isOptional = first.endsWith("?");\n // Compute the corresponding required segment: `foo?` -> `foo`\n let required = first.replace(/\\?$/, "");\n if (rest.length === 0) {\n // Intepret empty string as omitting an optional segment\n // `["one", "", "three"]` corresponds to omitting `:two` from `/one/:two?/three` -> `/one/three`\n return isOptional ? [required, ""] : [required];\n }\n let restExploded = explodeOptionalSegments(rest.join("/"));\n let result = [];\n // All child paths with the prefix. Do this for all children before the\n // optional version for all children, so we get consistent ordering where the\n // parent optional aspect is preferred as required. Otherwise, we can get\n // child sections interspersed where deeper optional segments are higher than\n // parent optional segments, where for example, /:two would explode _earlier_\n // then /:one. By always including the parent as required _for all children_\n // first, we avoid this issue\n result.push(...restExploded.map(subpath => subpath === "" ? required : [required, subpath].join("/")));\n // Then, if this is an optional value, add all child versions without\n if (isOptional) {\n result.push(...restExploded);\n }\n // for absolute paths, ensure `/` instead of empty segment\n return result.map(exploded => path.startsWith("/") && exploded === "" ? "/" : exploded);\n}\nfunction rankRouteBranches(branches) {\n branches.sort((a, b) => a.score !== b.score ? b.score - a.score // Higher score first\n : compareIndexes(a.routesMeta.map(meta => meta.childrenIndex), b.routesMeta.map(meta => meta.childrenIndex)));\n}\nconst paramRe = /^:[\\w-]+$/;\nconst dynamicSegmentValue = 3;\nconst indexRouteValue = 2;\nconst emptySegmentValue = 1;\nconst staticSegmentValue = 10;\nconst splatPenalty = -2;\nconst isSplat = s => s === "*";\nfunction computeScore(path, index) {\n let segments = path.split("/");\n let initialScore = segments.length;\n if (segments.some(isSplat)) {\n initialScore += splatPenalty;\n }\n if (index) {\n initialScore += indexRouteValue;\n }\n return segments.filter(s => !isSplat(s)).reduce((score, segment) => score + (paramRe.test(segment) ? dynamicSegmentValue : segment === "" ? emptySegmentValue : staticSegmentValue), initialScore);\n}\nfunction compareIndexes(a, b) {\n let siblings = a.length === b.length && a.slice(0, -1).every((n, i) => n === b[i]);\n return siblings ?\n // If two routes are siblings, we should try to match the earlier sibling\n // first. This allows people to have fine-grained control over the matching\n // behavior by simply putting routes with identical paths in the order they\n // want them tried.\n a[a.length - 1] - b[b.length - 1] :\n // Otherwise, it doesn\'t really make sense to rank non-siblings by index,\n // so they sort equally.\n 0;\n}\nfunction matchRouteBranch(branch, pathname, allowPartial) {\n if (allowPartial === void 0) {\n allowPartial = false;\n }\n let {\n routesMeta\n } = branch;\n let matchedParams = {};\n let matchedPathname = "/";\n let matches = [];\n for (let i = 0; i < routesMeta.length; ++i) {\n let meta = routesMeta[i];\n let end = i === routesMeta.length - 1;\n let remainingPathname = matchedPathname === "/" ? pathname : pathname.slice(matchedPathname.length) || "/";\n let match = matchPath({\n path: meta.relativePath,\n caseSensitive: meta.caseSensitive,\n end\n }, remainingPathname);\n let route = meta.route;\n if (!match && end && allowPartial && !routesMeta[routesMeta.length - 1].route.index) {\n match = matchPath({\n path: meta.relativePath,\n caseSensitive: meta.caseSensitive,\n end: false\n }, remainingPathname);\n }\n if (!match) {\n return null;\n }\n Object.assign(matchedParams, match.params);\n matches.push({\n // TODO: Can this as be avoided?\n params: matchedParams,\n pathname: joinPaths([matchedPathname, match.pathname]),\n pathnameBase: normalizePathname(joinPaths([matchedPathname, match.pathnameBase])),\n route\n });\n if (match.pathnameBase !== "/") {\n matchedPathname = joinPaths([matchedPathname, match.pathnameBase]);\n }\n }\n return matches;\n}\n/**\n * Returns a path with params interpolated.\n *\n * @see https://reactrouter.com/utils/generate-path\n */\nfunction generatePath(originalPath, params) {\n if (params === void 0) {\n params = {};\n }\n let path = originalPath;\n if (path.endsWith("*") && path !== "*" && !path.endsWith("/*")) {\n warning(false, "Route path \\"" + path + "\\" will be treated as if it were " + ("\\"" + path.replace(/\\*$/, "/*") + "\\" because the `*` character must ") + "always follow a `/` in the pattern. To get rid of this warning, " + ("please change the route path to \\"" + path.replace(/\\*$/, "/*") + "\\"."));\n path = path.replace(/\\*$/, "/*");\n }\n // ensure `/` is added at the beginning if the path is absolute\n const prefix = path.startsWith("/") ? "/" : "";\n const stringify = p => p == null ? "" : typeof p === "string" ? p : String(p);\n const segments = path.split(/\\/+/).map((segment, index, array) => {\n const isLastSegment = index === array.length - 1;\n // only apply the splat if it\'s the last segment\n if (isLastSegment && segment === "*") {\n const star = "*";\n // Apply the splat\n return stringify(params[star]);\n }\n const keyMatch = segment.match(/^:([\\w-]+)(\\??)$/);\n if (keyMatch) {\n const [, key, optional] = keyMatch;\n let param = params[key];\n invariant(optional === "?" || param != null, "Missing \\":" + key + "\\" param");\n return stringify(param);\n }\n // Remove any optional markers from optional static segments\n return segment.replace(/\\?$/g, "");\n })\n // Remove empty segments\n .filter(segment => !!segment);\n return prefix + segments.join("/");\n}\n/**\n * Performs pattern matching on a URL pathname and returns information about\n * the match.\n *\n * @see https://reactrouter.com/utils/match-path\n */\nfunction matchPath(pattern, pathname) {\n if (typeof pattern === "string") {\n pattern = {\n path: pattern,\n caseSensitive: false,\n end: true\n };\n }\n let [matcher, compiledParams] = compilePath(pattern.path, pattern.caseSensitive, pattern.end);\n let match = pathname.match(matcher);\n if (!match) return null;\n let matchedPathname = match[0];\n let pathnameBase = matchedPathname.replace(/(.)\\/+$/, "$1");\n let captureGroups = match.slice(1);\n let params = compiledParams.reduce((memo, _ref, index) => {\n let {\n paramName,\n isOptional\n } = _ref;\n // We need to compute the pathnameBase here using the raw splat value\n // instead of using params["*"] later because it will be decoded then\n if (paramName === "*") {\n let splatValue = captureGroups[index] || "";\n pathnameBase = matchedPathname.slice(0, matchedPathname.length - splatValue.length).replace(/(.)\\/+$/, "$1");\n }\n const value = captureGroups[index];\n if (isOptional && !value) {\n memo[paramName] = undefined;\n } else {\n memo[paramName] = (value || "").replace(/%2F/g, "/");\n }\n return memo;\n }, {});\n return {\n params,\n pathname: matchedPathname,\n pathnameBase,\n pattern\n };\n}\nfunction compilePath(path, caseSensitive, end) {\n if (caseSensitive === void 0) {\n caseSensitive = false;\n }\n if (end === void 0) {\n end = true;\n }\n warning(path === "*" || !path.endsWith("*") || path.endsWith("/*"), "Route path \\"" + path + "\\" will be treated as if it were " + ("\\"" + path.replace(/\\*$/, "/*") + "\\" because the `*` character must ") + "always follow a `/` in the pattern. To get rid of this warning, " + ("please change the route path to \\"" + path.replace(/\\*$/, "/*") + "\\"."));\n let params = [];\n let regexpSource = "^" + path.replace(/\\/*\\*?$/, "") // Ignore trailing / and /*, we\'ll handle it below\n .replace(/^\\/*/, "/") // Make sure it has a leading /\n .replace(/[\\\\.*+^${}|()[\\]]/g, "\\\\$&") // Escape special regex chars\n .replace(/\\/:([\\w-]+)(\\?)?/g, (_, paramName, isOptional) => {\n params.push({\n paramName,\n isOptional: isOptional != null\n });\n return isOptional ? "/?([^\\\\/]+)?" : "/([^\\\\/]+)";\n });\n if (path.endsWith("*")) {\n params.push({\n paramName: "*"\n });\n regexpSource += path === "*" || path === "/*" ? "(.*)$" // Already matched the initial /, just match the rest\n : "(?:\\\\/(.+)|\\\\/*)$"; // Don\'t include the / in params["*"]\n } else if (end) {\n // When matching to the end, ignore trailing slashes\n regexpSource += "\\\\/*$";\n } else if (path !== "" && path !== "/") {\n // If our path is non-empty and contains anything beyond an initial slash,\n // then we have _some_ form of path in our regex, so we should expect to\n // match only if we find the end of this path segment. Look for an optional\n // non-captured trailing slash (to match a portion of the URL) or the end\n // of the path (if we\'ve matched to the end). We used to do this with a\n // word boundary but that gives false positives on routes like\n // /user-preferences since `-` counts as a word boundary.\n regexpSource += "(?:(?=\\\\/|$))";\n } else ;\n let matcher = new RegExp(regexpSource, caseSensitive ? undefined : "i");\n return [matcher, params];\n}\nfunction decodePath(value) {\n try {\n return value.split("/").map(v => decodeURIComponent(v).replace(/\\//g, "%2F")).join("/");\n } catch (error) {\n warning(false, "The URL path \\"" + value + "\\" could not be decoded because it is is a " + "malformed URL segment. This is probably due to a bad percent " + ("encoding (" + error + ")."));\n return value;\n }\n}\n/**\n * @private\n */\nfunction stripBasename(pathname, basename) {\n if (basename === "/") return pathname;\n if (!pathname.toLowerCase().startsWith(basename.toLowerCase())) {\n return null;\n }\n // We want to leave trailing slash behavior in the user\'s control, so if they\n // specify a basename with a trailing slash, we should support it\n let startIndex = basename.endsWith("/") ? basename.length - 1 : basename.length;\n let nextChar = pathname.charAt(startIndex);\n if (nextChar && nextChar !== "/") {\n // pathname does not start with basename/\n return null;\n }\n return pathname.slice(startIndex) || "/";\n}\n/**\n * Returns a resolved path object relative to the given pathname.\n *\n * @see https://reactrouter.com/utils/resolve-path\n */\nfunction resolvePath(to, fromPathname) {\n if (fromPathname === void 0) {\n fromPathname = "/";\n }\n let {\n pathname: toPathname,\n search = "",\n hash = ""\n } = typeof to === "string" ? parsePath(to) : to;\n let pathname = toPathname ? toPathname.startsWith("/") ? toPathname : resolvePathname(toPathname, fromPathname) : fromPathname;\n return {\n pathname,\n search: normalizeSearch(search),\n hash: normalizeHash(hash)\n };\n}\nfunction resolvePathname(relativePath, fromPathname) {\n let segments = fromPathname.replace(/\\/+$/, "").split("/");\n let relativeSegments = relativePath.split("/");\n relativeSegments.forEach(segment => {\n if (segment === "..") {\n // Keep the root "" segment so the pathname starts at /\n if (segments.length > 1) segments.pop();\n } else if (segment !== ".") {\n segments.push(segment);\n }\n });\n return segments.length > 1 ? segments.join("/") : "/";\n}\nfunction getInvalidPathError(char, field, dest, path) {\n return "Cannot include a \'" + char + "\' character in a manually specified " + ("`to." + field + "` field [" + JSON.stringify(path) + "]. Please separate it out to the ") + ("`to." + dest + "` field. Alternatively you may provide the full path as ") + "a string in <Link to=\\"...\\"> and the router will parse it for you.";\n}\n/**\n * @private\n *\n * When processing relative navigation we want to ignore ancestor routes that\n * do not contribute to the path, such that index/pathless layout routes don\'t\n * interfere.\n *\n * For example, when moving a route element into an index route and/or a\n * pathless layout route, relative link behavior contained within should stay\n * the same. Both of the following examples should link back to the root:\n *\n * <Route path="/">\n * <Route path="accounts" element={<Link to=".."}>\n * </Route>\n *\n * <Route path="/">\n * <Route path="accounts">\n * <Route element={<AccountsLayout />}> // <-- Does not contribute\n * <Route index element={<Link to=".."} /> // <-- Does not contribute\n * </Route\n * </Route>\n * </Route>\n */\nfunction getPathContributingMatches(matches) {\n return matches.filter((match, index) => index === 0 || match.route.path && match.route.path.length > 0);\n}\n// Return the array of pathnames for the current route matches - used to\n// generate the routePathnames input for resolveTo()\nfunction getResolveToMatches(matches, v7_relativeSplatPath) {\n let pathMatches = getPathContributingMatches(matches);\n // When v7_relativeSplatPath is enabled, use the full pathname for the leaf\n // match so we include splat values for "." links. See:\n // https://github.com/remix-run/react-router/issues/11052#issuecomment-1836589329\n if (v7_relativeSplatPath) {\n return pathMatches.map((match, idx) => idx === pathMatches.length - 1 ? match.pathname : match.pathnameBase);\n }\n return pathMatches.map(match => match.pathnameBase);\n}\n/**\n * @private\n */\nfunction resolveTo(toArg, routePathnames, locationPathname, isPathRelative) {\n if (isPathRelative === void 0) {\n isPathRelative = false;\n }\n let to;\n if (typeof toArg === "string") {\n to = parsePath(toArg);\n } else {\n to = _extends({}, toArg);\n invariant(!to.pathname || !to.pathname.includes("?"), getInvalidPathError("?", "pathname", "search", to));\n invariant(!to.pathname || !to.pathname.includes("#"), getInvalidPathError("#", "pathname", "hash", to));\n invariant(!to.search || !to.search.includes("#"), getInvalidPathError("#", "search", "hash", to));\n }\n let isEmptyPath = toArg === "" || to.pathname === "";\n let toPathname = isEmptyPath ? "/" : to.pathname;\n let from;\n // Routing is relative to the current pathname if explicitly requested.\n //\n // If a pathname is explicitly provided in `to`, it should be relative to the\n // route context. This is explained in `Note on `<Link to>` values` in our\n // migration guide from v5 as a means of disambiguation between `to` values\n // that begin with `/` and those that do not. However, this is problematic for\n // `to` values that do not provide a pathname. `to` can simply be a search or\n // hash string, in which case we should assume that the navigation is relative\n // to the current location\'s pathname and *not* the route pathname.\n if (toPathname == null) {\n from = locationPathname;\n } else {\n let routePathnameIndex = routePathnames.length - 1;\n // With relative="route" (the default), each leading .. segment means\n // "go up one route" instead of "go up one URL segment". This is a key\n // difference from how <a href> works and a major reason we call this a\n // "to" value instead of a "href".\n if (!isPathRelative && toPathname.startsWith("..")) {\n let toSegments = toPathname.split("/");\n while (toSegments[0] === "..") {\n toSegments.shift();\n routePathnameIndex -= 1;\n }\n to.pathname = toSegments.join("/");\n }\n from = routePathnameIndex >= 0 ? routePathnames[routePathnameIndex] : "/";\n }\n let path = resolvePath(to, from);\n // Ensure the pathname has a trailing slash if the original "to" had one\n let hasExplicitTrailingSlash = toPathname && toPathname !== "/" && toPathname.endsWith("/");\n // Or if this was a link to the current path which has a trailing slash\n let hasCurrentTrailingSlash = (isEmptyPath || toPathname === ".") && locationPathname.endsWith("/");\n if (!path.pathname.endsWith("/") && (hasExplicitTrailingSlash || hasCurrentTrailingSlash)) {\n path.pathname += "/";\n }\n return path;\n}\n/**\n * @private\n */\nfunction getToPathname(to) {\n // Empty strings should be treated the same as / paths\n return to === "" || to.pathname === "" ? "/" : typeof to === "string" ? parsePath(to).pathname : to.pathname;\n}\n/**\n * @private\n */\nconst joinPaths = paths => paths.join("/").replace(/\\/\\/+/g, "/");\n/**\n * @private\n */\nconst normalizePathname = pathname => pathname.replace(/\\/+$/, "").replace(/^\\/*/, "/");\n/**\n * @private\n */\nconst normalizeSearch = search => !search || search === "?" ? "" : search.startsWith("?") ? search : "?" + search;\n/**\n * @private\n */\nconst normalizeHash = hash => !hash || hash === "#" ? "" : hash.startsWith("#") ? hash : "#" + hash;\n/**\n * This is a shortcut for creating `application/json` responses. Converts `data`\n * to JSON and sets the `Content-Type` header.\n */\nconst json = function json(data, init) {\n if (init === void 0) {\n init = {};\n }\n let responseInit = typeof init === "number" ? {\n status: init\n } : init;\n let headers = new Headers(responseInit.headers);\n if (!headers.has("Content-Type")) {\n headers.set("Content-Type", "application/json; charset=utf-8");\n }\n return new Response(JSON.stringify(data), _extends({}, responseInit, {\n headers\n }));\n};\nclass AbortedDeferredError extends Error {}\nclass DeferredData {\n constructor(data, responseInit) {\n this.pendingKeysSet = new Set();\n this.subscribers = new Set();\n this.deferredKeys = [];\n invariant(data && typeof data === "object" && !Array.isArray(data), "defer() only accepts plain objects");\n // Set up an AbortController + Promise we can race against to exit early\n // cancellation\n let reject;\n this.abortPromise = new Promise((_, r) => reject = r);\n this.controller = new AbortController();\n let onAbort = () => reject(new AbortedDeferredError("Deferred data aborted"));\n this.unlistenAbortSignal = () => this.controller.signal.removeEventListener("abort", onAbort);\n this.controller.signal.addEventListener("abort", onAbort);\n this.data = Object.entries(data).reduce((acc, _ref2) => {\n let [key, value] = _ref2;\n return Object.assign(acc, {\n [key]: this.trackPromise(key, value)\n });\n }, {});\n if (this.done) {\n // All incoming values were resolved\n this.unlistenAbortSignal();\n }\n this.init = responseInit;\n }\n trackPromise(key, value) {\n if (!(value instanceof Promise)) {\n return value;\n }\n this.deferredKeys.push(key);\n this.pendingKeysSet.add(key);\n // We store a little wrapper promise that will be extended with\n // _data/_error props upon resolve/reject\n let promise = Promise.race([value, this.abortPromise]).then(data => this.onSettle(promise, key, undefined, data), error => this.onSettle(promise, key, error));\n // Register rejection listeners to avoid uncaught promise rejections on\n // errors or aborted deferred values\n promise.catch(() => {});\n Object.defineProperty(promise, "_tracked", {\n get: () => true\n });\n return promise;\n }\n onSettle(promise, key, error, data) {\n if (this.controller.signal.aborted && error instanceof AbortedDeferredError) {\n this.unlistenAbortSignal();\n Object.defineProperty(promise, "_error", {\n get: () => error\n });\n return Promise.reject(error);\n }\n this.pendingKeysSet.delete(key);\n if (this.done) {\n // Nothing left to abort!\n this.unlistenAbortSignal();\n }\n // If the promise was resolved/rejected with undefined, we\'ll throw an error as you\n // should always resolve with a value or null\n if (error === undefined && data === undefined) {\n let undefinedError = new Error("Deferred data for key \\"" + key + "\\" resolved/rejected with `undefined`, " + "you must resolve/reject with a value or `null`.");\n Object.defineProperty(promise, "_error", {\n get: () => undefinedError\n });\n this.emit(false, key);\n return Promise.reject(undefinedError);\n }\n if (data === undefined) {\n Object.defineProperty(promise, "_error", {\n get: () => error\n });\n this.emit(false, key);\n return Promise.reject(error);\n }\n Object.defineProperty(promise, "_data", {\n get: () => data\n });\n this.emit(false, key);\n return data;\n }\n emit(aborted, settledKey) {\n this.subscribers.forEach(subscriber => subscriber(aborted, settledKey));\n }\n subscribe(fn) {\n this.subscribers.add(fn);\n return () => this.subscribers.delete(fn);\n }\n cancel() {\n this.controller.abort();\n this.pendingKeysSet.forEach((v, k) => this.pendingKeysSet.delete(k));\n this.emit(true);\n }\n async resolveData(signal) {\n let aborted = false;\n if (!this.done) {\n let onAbort = () => this.cancel();\n signal.addEventListener("abort", onAbort);\n aborted = await new Promise(resolve => {\n this.subscribe(aborted => {\n signal.removeEventListener("abort", onAbort);\n if (aborted || this.done) {\n resolve(aborted);\n }\n });\n });\n }\n return aborted;\n }\n get done() {\n return this.pendingKeysSet.size === 0;\n }\n get unwrappedData() {\n invariant(this.data !== null && this.done, "Can only unwrap data on initialized and settled deferreds");\n return Object.entries(this.data).reduce((acc, _ref3) => {\n let [key, value] = _ref3;\n return Object.assign(acc, {\n [key]: unwrapTrackedPromise(value)\n });\n }, {});\n }\n get pendingKeys() {\n return Array.from(this.pendingKeysSet);\n }\n}\nfunction isTrackedPromise(value) {\n return value instanceof Promise && value._tracked === true;\n}\nfunction unwrapTrackedPromise(value) {\n if (!isTrackedPromise(value)) {\n return value;\n }\n if (value._error) {\n throw value._error;\n }\n return value._data;\n}\nconst defer = function defer(data, init) {\n if (init === void 0) {\n init = {};\n }\n let responseInit = typeof init === "number" ? {\n status: init\n } : init;\n return new DeferredData(data, responseInit);\n};\n/**\n * A redirect response. Sets the status code and the `Location` header.\n * Defaults to "302 Found".\n */\nconst redirect = function redirect(url, init) {\n if (init === void 0) {\n init = 302;\n }\n let responseInit = init;\n if (typeof responseInit === "number") {\n responseInit = {\n status: responseInit\n };\n } else if (typeof responseInit.status === "undefined") {\n responseInit.status = 302;\n }\n let headers = new Headers(responseInit.headers);\n headers.set("Location", url);\n return new Response(null, _extends({}, responseInit, {\n headers\n }));\n};\n/**\n * A redirect response that will force a document reload to the new location.\n * Sets the status code and the `Location` header.\n * Defaults to "302 Found".\n */\nconst redirectDocument = (url, init) => {\n let response = redirect(url, init);\n response.headers.set("X-Remix-Reload-Document", "true");\n return response;\n};\n/**\n * @private\n * Utility class we use to hold auto-unwrapped 4xx/5xx Response bodies\n *\n * We don\'t export the class for public use since it\'s an implementation\n * detail, but we export the interface above so folks can build their own\n * abstractions around instances via isRouteErrorResponse()\n */\nclass ErrorResponseImpl {\n constructor(status, statusText, data, internal) {\n if (internal === void 0) {\n internal = false;\n }\n this.status = status;\n this.statusText = statusText || "";\n this.internal = internal;\n if (data instanceof Error) {\n this.data = data.toString();\n this.error = data;\n } else {\n this.data = data;\n }\n }\n}\n/**\n * Check if the given error is an ErrorResponse generated from a 4xx/5xx\n * Response thrown from an action/loader\n */\nfunction isRouteErrorResponse(error) {\n return error != null && typeof error.status === "number" && typeof error.statusText === "string" && typeof error.internal === "boolean" && "data" in error;\n}\n\nconst validMutationMethodsArr = ["post", "put", "patch", "delete"];\nconst validMutationMethods = new Set(validMutationMethodsArr);\nconst validRequestMethodsArr = ["get", ...validMutationMethodsArr];\nconst validRequestMethods = new Set(validRequestMethodsArr);\nconst redirectStatusCodes = new Set([301, 302, 303, 307, 308]);\nconst redirectPreserveMethodStatusCodes = new Set([307, 308]);\nconst IDLE_NAVIGATION = {\n state: "idle",\n location: undefined,\n formMethod: undefined,\n formAction: undefined,\n formEncType: undefined,\n formData: undefined,\n json: undefined,\n text: undefined\n};\nconst IDLE_FETCHER = {\n state: "idle",\n data: undefined,\n formMethod: undefined,\n formAction: undefined,\n formEncType: undefined,\n formData: undefined,\n json: undefined,\n text: undefined\n};\nconst IDLE_BLOCKER = {\n state: "unblocked",\n proceed: undefined,\n reset: undefined,\n location: undefined\n};\nconst ABSOLUTE_URL_REGEX = /^(?:[a-z][a-z0-9+.-]*:|\\/\\/)/i;\nconst defaultMapRouteProperties = route => ({\n hasErrorBoundary: Boolean(route.hasErrorBoundary)\n});\nconst TRANSITIONS_STORAGE_KEY = "remix-router-transitions";\n//#endregion\n////////////////////////////////////////////////////////////////////////////////\n//#region createRouter\n////////////////////////////////////////////////////////////////////////////////\n/**\n * Create a router and listen to history POP navigations\n */\nfunction createRouter(init) {\n const routerWindow = init.window ? init.window : typeof window !== "undefined" ? window : undefined;\n const isBrowser = typeof routerWindow !== "undefined" && typeof routerWindow.document !== "undefined" && typeof routerWindow.document.createElement !== "undefined";\n const isServer = !isBrowser;\n invariant(init.routes.length > 0, "You must provide a non-empty routes array to createRouter");\n let mapRouteProperties;\n if (init.mapRouteProperties) {\n mapRouteProperties = init.mapRouteProperties;\n } else if (init.detectErrorBoundary) {\n // If they are still using the deprecated version, wrap it with the new API\n let detectErrorBoundary = init.detectErrorBoundary;\n mapRouteProperties = route => ({\n hasErrorBoundary: detectErrorBoundary(route)\n });\n } else {\n mapRouteProperties = defaultMapRouteProperties;\n }\n // Routes keyed by ID\n let manifest = {};\n // Routes in tree format for matching\n let dataRoutes = convertRoutesToDataRoutes(init.routes, mapRouteProperties, undefined, manifest);\n let inFlightDataRoutes;\n let basename = init.basename || "/";\n let dataStrategyImpl = init.unstable_dataStrategy || defaultDataStrategy;\n let patchRoutesOnMissImpl = init.unstable_patchRoutesOnMiss;\n // Config driven behavior flags\n let future = _extends({\n v7_fetcherPersist: false,\n v7_normalizeFormMethod: false,\n v7_partialHydration: false,\n v7_prependBasename: false,\n v7_relativeSplatPath: false,\n unstable_skipActionErrorRevalidation: false\n }, init.future);\n // Cleanup function for history\n let unlistenHistory = null;\n // Externally-provided functions to call on all state changes\n let subscribers = new Set();\n // Externally-provided object to hold scroll restoration locations during routing\n let savedScrollPositions = null;\n // Externally-provided function to get scroll restoration keys\n let getScrollRestorationKey = null;\n // Externally-provided function to get current scroll position\n let getScrollPosition = null;\n // One-time flag to control the initial hydration scroll restoration. Because\n // we don\'t get the saved positions from <ScrollRestoration /> until _after_\n // the initial render, we need to manually trigger a separate updateState to\n // send along the restoreScrollPosition\n // Set to true if we have `hydrationData` since we assume we were SSR\'d and that\n // SSR did the initial scroll restoration.\n let initialScrollRestored = init.hydrationData != null;\n let initialMatches = matchRoutes(dataRoutes, init.history.location, basename);\n let initialErrors = null;\n if (initialMatches == null && !patchRoutesOnMissImpl) {\n // If we do not match a user-provided-route, fall back to the root\n // to allow the error boundary to take over\n let error = getInternalRouterError(404, {\n pathname: init.history.location.pathname\n });\n let {\n matches,\n route\n } = getShortCircuitMatches(dataRoutes);\n initialMatches = matches;\n initialErrors = {\n [route.id]: error\n };\n }\n // If the user provided a patchRoutesOnMiss implementation and our initial\n // match is a splat route, clear them out so we run through lazy discovery\n // on hydration in case there\'s a more accurate lazy route match\n if (initialMatches && patchRoutesOnMissImpl) {\n let fogOfWar = checkFogOfWar(initialMatches, dataRoutes, init.history.location.pathname);\n if (fogOfWar.active) {\n initialMatches = null;\n }\n }\n let initialized;\n if (!initialMatches) {\n // We need to run patchRoutesOnMiss in initialize()\n initialized = false;\n initialMatches = [];\n } else if (initialMatches.some(m => m.route.lazy)) {\n // All initialMatches need to be loaded before we\'re ready. If we have lazy\n // functions around still then we\'ll need to run them in initialize()\n initialized = false;\n } else if (!initialMatches.some(m => m.route.loader)) {\n // If we\'ve got no loaders to run, then we\'re good to go\n initialized = true;\n } else if (future.v7_partialHydration) {\n // If partial hydration is enabled, we\'re initialized so long as we were\n // provided with hydrationData for every route with a loader, and no loaders\n // were marked for explicit hydration\n let loaderData = init.hydrationData ? init.hydrationData.loaderData : null;\n let errors = init.hydrationData ? init.hydrationData.errors : null;\n let isRouteInitialized = m => {\n // No loader, nothing to initialize\n if (!m.route.loader) {\n return true;\n }\n // Explicitly opting-in to running on hydration\n if (typeof m.route.loader === "function" && m.route.loader.hydrate === true) {\n return false;\n }\n // Otherwise, initialized if hydrated with data or an error\n return loaderData && loaderData[m.route.id] !== undefined || errors && errors[m.route.id] !== undefined;\n };\n // If errors exist, don\'t consider routes below the boundary\n if (errors) {\n let idx = initialMatches.findIndex(m => errors[m.route.id] !== undefined);\n initialized = initialMatches.slice(0, idx + 1).every(isRouteInitialized);\n } else {\n initialized = initialMatches.every(isRouteInitialized);\n }\n } else {\n // Without partial hydration - we\'re initialized if we were provided any\n // hydrationData - which is expected to be complete\n initialized = init.hydrationData != null;\n }\n let router;\n let state = {\n historyAction: init.history.action,\n location: init.history.location,\n matches: initialMatches,\n initialized,\n navigation: IDLE_NAVIGATION,\n // Don\'t restore on initial updateState() if we were SSR\'d\n restoreScrollPosition: init.hydrationData != null ? false : null,\n preventScrollReset: false,\n revalidation: "idle",\n loaderData: init.hydrationData && init.hydrationData.loaderData || {},\n actionData: init.hydrationData && init.hydrationData.actionData || null,\n errors: init.hydrationData && init.hydrationData.errors || initialErrors,\n fetchers: new Map(),\n blockers: new Map()\n };\n // -- Stateful internal variables to manage navigations --\n // Current navigation in progress (to be committed in completeNavigation)\n let pendingAction = Action.Pop;\n // Should the current navigation prevent the scroll reset if scroll cannot\n // be restored?\n let pendingPreventScrollReset = false;\n // AbortController for the active navigation\n let pendingNavigationController;\n // Should the current navigation enable document.startViewTransition?\n let pendingViewTransitionEnabled = false;\n // Store applied view transitions so we can apply them on POP\n let appliedViewTransitions = new Map();\n // Cleanup function for persisting applied transitions to sessionStorage\n let removePageHideEventListener = null;\n // We use this to avoid touching history in completeNavigation if a\n // revalidation is entirely uninterrupted\n let isUninterruptedRevalidation = false;\n // Use this internal flag to force revalidation of all loaders:\n // - submissions (completed or interrupted)\n // - useRevalidator()\n // - X-Remix-Revalidate (from redirect)\n let isRevalidationRequired = false;\n // Use this internal array to capture routes that require revalidation due\n // to a cancelled deferred on action submission\n let cancelledDeferredRoutes = [];\n // Use this internal array to capture fetcher loads that were cancelled by an\n // action navigation and require revalidation\n let cancelledFetcherLoads = [];\n // AbortControllers for any in-flight fetchers\n let fetchControllers = new Map();\n // Track loads based on the order in which they started\n let incrementingLoadId = 0;\n // Track the outstanding pending navigation data load to be compared against\n // the globally incrementing load when a fetcher load lands after a completed\n // navigation\n let pendingNavigationLoadId = -1;\n // Fetchers that triggered data reloads as a result of their actions\n let fetchReloadIds = new Map();\n // Fetchers that triggered redirect navigations\n let fetchRedirectIds = new Set();\n // Most recent href/match for fetcher.load calls for fetchers\n let fetchLoadMatches = new Map();\n // Ref-count mounted fetchers so we know when it\'s ok to clean them up\n let activeFetchers = new Map();\n // Fetchers that have requested a delete when using v7_fetcherPersist,\n // they\'ll be officially removed after they return to idle\n let deletedFetchers = new Set();\n // Store DeferredData instances for active route matches. When a\n // route loader returns defer() we stick one in here. Then, when a nested\n // promise resolves we update loaderData. If a new navigation starts we\n // cancel active deferreds for eliminated routes.\n let activeDeferreds = new Map();\n // Store blocker functions in a separate Map outside of router state since\n // we don\'t need to update UI state if they change\n let blockerFunctions = new Map();\n // Map of pending patchRoutesOnMiss() promises (keyed by path/matches) so\n // that we only kick them off once for a given combo\n let pendingPatchRoutes = new Map();\n // Flag to ignore the next history update, so we can revert the URL change on\n // a POP navigation that was blocked by the user without touching router state\n let ignoreNextHistoryUpdate = false;\n // Initialize the router, all side effects should be kicked off from here.\n // Implemented as a Fluent API for ease of:\n // let router = createRouter(init).initialize();\n function initialize() {\n // If history informs us of a POP navigation, start the navigation but do not update\n // state. We\'ll update our own state once the navigation completes\n unlistenHistory = init.history.listen(_ref => {\n let {\n action: historyAction,\n location,\n delta\n } = _ref;\n // Ignore this event if it was just us resetting the URL from a\n // blocked POP navigation\n if (ignoreNextHistoryUpdate) {\n ignoreNextHistoryUpdate = false;\n return;\n }\n warning(blockerFunctions.size === 0 || delta != null, "You are trying to use a blocker on a POP navigation to a location " + "that was not created by @remix-run/router. This will fail silently in " + "production. This can happen if you are navigating outside the router " + "via `window.history.pushState`/`window.location.hash` instead of using " + "router navigation APIs. This can also happen if you are using " + "createHashRouter and the user manually changes the URL.");\n let blockerKey = shouldBlockNavigation({\n currentLocation: state.location,\n nextLocation: location,\n historyAction\n });\n if (blockerKey && delta != null) {\n // Restore the URL to match the current UI, but don\'t update router state\n ignoreNextHistoryUpdate = true;\n init.history.go(delta * -1);\n // Put the blocker into a blocked state\n updateBlocker(blockerKey, {\n state: "blocked",\n location,\n proceed() {\n updateBlocker(blockerKey, {\n state: "proceeding",\n proceed: undefined,\n reset: undefined,\n location\n });\n // Re-do the same POP navigation we just blocked\n init.history.go(delta);\n },\n reset() {\n let blockers = new Map(state.blockers);\n blockers.set(blockerKey, IDLE_BLOCKER);\n updateState({\n blockers\n });\n }\n });\n return;\n }\n return startNavigation(historyAction, location);\n });\n if (isBrowser) {\n // FIXME: This feels gross. How can we cleanup the lines between\n // scrollRestoration/appliedTransitions persistance?\n restoreAppliedTransitions(routerWindow, appliedViewTransitions);\n let _saveAppliedTransitions = () => persistAppliedTransitions(routerWindow, appliedViewTransitions);\n routerWindow.addEventListener("pagehide", _saveAppliedTransitions);\n removePageHideEventListener = () => routerWindow.removeEventListener("pagehide", _saveAppliedTransitions);\n }\n // Kick off initial data load if needed. Use Pop to avoid modifying history\n // Note we don\'t do any handling of lazy here. For SPA\'s it\'ll get handled\n // in the normal navigation flow. For SSR it\'s expected that lazy modules are\n // resolved prior to router creation since we can\'t go into a fallbackElement\n // UI for SSR\'d apps\n if (!state.initialized) {\n startNavigation(Action.Pop, state.location, {\n initialHydration: true\n });\n }\n return router;\n }\n // Clean up a router and it\'s side effects\n function dispose() {\n if (unlistenHistory) {\n unlistenHistory();\n }\n if (removePageHideEventListener) {\n removePageHideEventListener();\n }\n subscribers.clear();\n pendingNavigationController && pendingNavigationController.abort();\n state.fetchers.forEach((_, key) => deleteFetcher(key));\n state.blockers.forEach((_, key) => deleteBlocker(key));\n }\n // Subscribe to state updates for the router\n function subscribe(fn) {\n subscribers.add(fn);\n return () => subscribers.delete(fn);\n }\n // Update our state and notify the calling context of the change\n function updateState(newState, opts) {\n if (opts === void 0) {\n opts = {};\n }\n state = _extends({}, state, newState);\n // Prep fetcher cleanup so we can tell the UI which fetcher data entries\n // can be removed\n let completedFetchers = [];\n let deletedFetchersKeys = [];\n if (future.v7_fetcherPersist) {\n state.fetchers.forEach((fetcher, key) => {\n if (fetcher.state === "idle") {\n if (deletedFetchers.has(key)) {\n // Unmounted from the UI and can be totally removed\n deletedFetchersKeys.push(key);\n } else {\n // Returned to idle but still mounted in the UI, so semi-remains for\n // revalidations and such\n completedFetchers.push(key);\n }\n }\n });\n }\n // Iterate over a local copy so that if flushSync is used and we end up\n // removing and adding a new subscriber due to the useCallback dependencies,\n // we don\'t get ourselves into a loop calling the new subscriber immediately\n [...subscribers].forEach(subscriber => subscriber(state, {\n deletedFetchers: deletedFetchersKeys,\n unstable_viewTransitionOpts: opts.viewTransitionOpts,\n unstable_flushSync: opts.flushSync === true\n }));\n // Remove idle fetchers from state since we only care about in-flight fetchers.\n if (future.v7_fetcherPersist) {\n completedFetchers.forEach(key => state.fetchers.delete(key));\n deletedFetchersKeys.forEach(key => deleteFetcher(key));\n }\n }\n // Complete a navigation returning the state.navigation back to the IDLE_NAVIGATION\n // and setting state.[historyAction/location/matches] to the new route.\n // - Location is a required param\n // - Navigation will always be set to IDLE_NAVIGATION\n // - Can pass any other state in newState\n function completeNavigation(location, newState, _temp) {\n var _location$state, _location$state2;\n let {\n flushSync\n } = _temp === void 0 ? {} : _temp;\n // Deduce if we\'re in a loading/actionReload state:\n // - We have committed actionData in the store\n // - The current navigation was a mutation submission\n // - We\'re past the submitting state and into the loading state\n // - The location being loaded is not the result of a redirect\n let isActionReload = state.actionData != null && state.navigation.formMethod != null && isMutationMethod(state.navigation.formMethod) && state.navigation.state === "loading" && ((_location$state = location.state) == null ? void 0 : _location$state._isRedirect) !== true;\n let actionData;\n if (newState.actionData) {\n if (Object.keys(newState.actionData).length > 0) {\n actionData = newState.actionData;\n } else {\n // Empty actionData -> clear prior actionData due to an action error\n actionData = null;\n }\n } else if (isActionReload) {\n // Keep the current data if we\'re wrapping up the action reload\n actionData = state.actionData;\n } else {\n // Clear actionData on any other completed navigations\n actionData = null;\n }\n // Always preserve any existing loaderData from re-used routes\n let loaderData = newState.loaderData ? mergeLoaderData(state.loaderData, newState.loaderData, newState.matches || [], newState.errors) : state.loaderData;\n // On a successful navigation we can assume we got through all blockers\n // so we can start fresh\n let blockers = state.blockers;\n if (blockers.size > 0) {\n blockers = new Map(blockers);\n blockers.forEach((_, k) => blockers.set(k, IDLE_BLOCKER));\n }\n // Always respect the user flag. Otherwise don\'t reset on mutation\n // submission navigations unless they redirect\n let preventScrollReset = pendingPreventScrollReset === true || state.navigation.formMethod != null && isMutationMethod(state.navigation.formMethod) && ((_location$state2 = location.state) == null ? void 0 : _location$state2._isRedirect) !== true;\n // Commit any in-flight routes at the end of the HMR revalidation "navigation"\n if (inFlightDataRoutes) {\n dataRoutes = inFlightDataRoutes;\n inFlightDataRoutes = undefined;\n }\n if (isUninterruptedRevalidation) ; else if (pendingAction === Action.Pop) ; else if (pendingAction === Action.Push) {\n init.history.push(location, location.state);\n } else if (pendingAction === Action.Replace) {\n init.history.replace(location, location.state);\n }\n let viewTransitionOpts;\n // On POP, enable transitions if they were enabled on the original navigation\n if (pendingAction === Action.Pop) {\n // Forward takes precedence so they behave like the original navigation\n let priorPaths = appliedViewTransitions.get(state.location.pathname);\n if (priorPaths && priorPaths.has(location.pathname)) {\n viewTransitionOpts = {\n currentLocation: state.location,\n nextLocation: location\n };\n } else if (appliedViewTransitions.has(location.pathname)) {\n // If we don\'t have a previous forward nav, assume we\'re popping back to\n // the new location and enable if that location previously enabled\n viewTransitionOpts = {\n currentLocation: location,\n nextLocation: state.location\n };\n }\n } else if (pendingViewTransitionEnabled) {\n // Store the applied transition on PUSH/REPLACE\n let toPaths = appliedViewTransitions.get(state.location.pathname);\n if (toPaths) {\n toPaths.add(location.pathname);\n } else {\n toPaths = new Set([location.pathname]);\n appliedViewTransitions.set(state.location.pathname, toPaths);\n }\n viewTransitionOpts = {\n currentLocation: state.location,\n nextLocation: location\n };\n }\n updateState(_extends({}, newState, {\n actionData,\n loaderData,\n historyAction: pendingAction,\n location,\n initialized: true,\n navigation: IDLE_NAVIGATION,\n revalidation: "idle",\n restoreScrollPosition: getSavedScrollPosition(location, newState.matches || state.matches),\n preventScrollReset,\n blockers\n }), {\n viewTransitionOpts,\n flushSync: flushSync === true\n });\n // Reset stateful navigation vars\n pendingAction = Action.Pop;\n pendingPreventScrollReset = false;\n pendingViewTransitionEnabled = false;\n isUninterruptedRevalidation = false;\n isRevalidationRequired = false;\n cancelledDeferredRoutes = [];\n cancelledFetcherLoads = [];\n }\n // Trigger a navigation event, which can either be a numerical POP or a PUSH\n // replace with an optional submission\n async function navigate(to, opts) {\n if (typeof to === "number") {\n init.history.go(to);\n return;\n }\n let normalizedPath = normalizeTo(state.location, state.matches, basename, future.v7_prependBasename, to, future.v7_relativeSplatPath, opts == null ? void 0 : opts.fromRouteId, opts == null ? void 0 : opts.relative);\n let {\n path,\n submission,\n error\n } = normalizeNavigateOptions(future.v7_normalizeFormMethod, false, normalizedPath, opts);\n let currentLocation = state.location;\n let nextLocation = createLocation(state.location, path, opts && opts.state);\n // When using navigate as a PUSH/REPLACE we aren\'t reading an already-encoded\n // URL from window.location, so we need to encode it here so the behavior\n // remains the same as POP and non-data-router usages. new URL() does all\n // the same encoding we\'d get from a history.pushState/window.location read\n // without having to touch history\n nextLocation = _extends({}, nextLocation, init.history.encodeLocation(nextLocation));\n let userReplace = opts && opts.replace != null ? opts.replace : undefined;\n let historyAction = Action.Push;\n if (userReplace === true) {\n historyAction = Action.Replace;\n } else if (userReplace === false) ; else if (submission != null && isMutationMethod(submission.formMethod) && submission.formAction === state.location.pathname + state.location.search) {\n // By default on submissions to the current location we REPLACE so that\n // users don\'t have to double-click the back button to get to the prior\n // location. If the user redirects to a different location from the\n // action/loader this will be ignored and the redirect will be a PUSH\n historyAction = Action.Replace;\n }\n let preventScrollReset = opts && "preventScrollReset" in opts ? opts.preventScrollReset === true : undefined;\n let flushSync = (opts && opts.unstable_flushSync) === true;\n let blockerKey = shouldBlockNavigation({\n currentLocation,\n nextLocation,\n historyAction\n });\n if (blockerKey) {\n // Put the blocker into a blocked state\n updateBlocker(blockerKey, {\n state: "blocked",\n location: nextLocation,\n proceed() {\n updateBlocker(blockerKey, {\n state: "proceeding",\n proceed: undefined,\n reset: undefined,\n location: nextLocation\n });\n // Send the same navigation through\n navigate(to, opts);\n },\n reset() {\n let blockers = new Map(state.blockers);\n blockers.set(blockerKey, IDLE_BLOCKER);\n updateState({\n blockers\n });\n }\n });\n return;\n }\n return await startNavigation(historyAction, nextLocation, {\n submission,\n // Send through the formData serialization error if we have one so we can\n // render at the right error boundary after we match routes\n pendingError: error,\n preventScrollReset,\n replace: opts && opts.replace,\n enableViewTransition: opts && opts.unstable_viewTransition,\n flushSync\n });\n }\n // Revalidate all current loaders. If a navigation is in progress or if this\n // is interrupted by a navigation, allow this to "succeed" by calling all\n // loaders during the next loader round\n function revalidate() {\n interruptActiveLoads();\n updateState({\n revalidation: "loading"\n });\n // If we\'re currently submitting an action, we don\'t need to start a new\n // navigation, we\'ll just let the follow up loader execution call all loaders\n if (state.navigation.state === "submitting") {\n return;\n }\n // If we\'re currently in an idle state, start a new navigation for the current\n // action/location and mark it as uninterrupted, which will skip the history\n // update in completeNavigation\n if (state.navigation.state === "idle") {\n startNavigation(state.historyAction, state.location, {\n startUninterruptedRevalidation: true\n });\n return;\n }\n // Otherwise, if we\'re currently in a loading state, just start a new\n // navigation to the navigation.location but do not trigger an uninterrupted\n // revalidation so that history correctly updates once the navigation completes\n startNavigation(pendingAction || state.historyAction, state.navigation.location, {\n overrideNavigation: state.navigation\n });\n }\n // Start a navigation to the given action/location. Can optionally provide a\n // overrideNavigation which will override the normalLoad in the case of a redirect\n // navigation\n async function startNavigation(historyAction, location, opts) {\n // Abort any in-progress navigations and start a new one. Unset any ongoing\n // uninterrupted revalidations unless told otherwise, since we want this\n // new navigation to update history normally\n pendingNavigationController && pendingNavigationController.abort();\n pendingNavigationController = null;\n pendingAction = historyAction;\n isUninterruptedRevalidation = (opts && opts.startUninterruptedRevalidation) === true;\n // Save the current scroll position every time we start a new navigation,\n // and track whether we should reset scroll on completion\n saveScrollPosition(state.location, state.matches);\n pendingPreventScrollReset = (opts && opts.preventScrollReset) === true;\n pendingViewTransitionEnabled = (opts && opts.enableViewTransition) === true;\n let routesToUse = inFlightDataRoutes || dataRoutes;\n let loadingNavigation = opts && opts.overrideNavigation;\n let matches = matchRoutes(routesToUse, location, basename);\n let flushSync = (opts && opts.flushSync) === true;\n let fogOfWar = checkFogOfWar(matches, routesToUse, location.pathname);\n if (fogOfWar.active && fogOfWar.matches) {\n matches = fogOfWar.matches;\n }\n // Short circuit with a 404 on the root error boundary if we match nothing\n if (!matches) {\n let {\n error,\n notFoundMatches,\n route\n } = handleNavigational404(location.pathname);\n completeNavigation(location, {\n matches: notFoundMatches,\n loaderData: {},\n errors: {\n [route.id]: error\n }\n }, {\n flushSync\n });\n return;\n }\n // Short circuit if it\'s only a hash change and not a revalidation or\n // mutation submission.\n //\n // Ignore on initial page loads because since the initial load will always\n // be "same hash". For example, on /page#hash and submit a <Form method="post">\n // which will default to a navigation to /page\n if (state.initialized && !isRevalidationRequired && isHashChangeOnly(state.location, location) && !(opts && opts.submission && isMutationMethod(opts.submission.formMethod))) {\n completeNavigation(location, {\n matches\n }, {\n flushSync\n });\n return;\n }\n // Create a controller/Request for this navigation\n pendingNavigationController = new AbortController();\n let request = createClientSideRequest(init.history, location, pendingNavigationController.signal, opts && opts.submission);\n let pendingActionResult;\n if (opts && opts.pendingError) {\n // If we have a pendingError, it means the user attempted a GET submission\n // with binary FormData so assign here and skip to handleLoaders. That\n // way we handle calling loaders above the boundary etc. It\'s not really\n // different from an actionError in that sense.\n pendingActionResult = [findNearestBoundary(matches).route.id, {\n type: ResultType.error,\n error: opts.pendingError\n }];\n } else if (opts && opts.submission && isMutationMethod(opts.submission.formMethod)) {\n // Call action if we received an action submission\n let actionResult = await handleAction(request, location, opts.submission, matches, fogOfWar.active, {\n replace: opts.replace,\n flushSync\n });\n if (actionResult.shortCircuited) {\n return;\n }\n // If we received a 404 from handleAction, it\'s because we couldn\'t lazily\n // discover the destination route so we don\'t want to call loaders\n if (actionResult.pendingActionResult) {\n let [routeId, result] = actionResult.pendingActionResult;\n if (isErrorResult(result) && isRouteErrorResponse(result.error) && result.error.status === 404) {\n pendingNavigationController = null;\n completeNavigation(location, {\n matches: actionResult.matches,\n loaderData: {},\n errors: {\n [routeId]: result.error\n }\n });\n return;\n }\n }\n matches = actionResult.matches || matches;\n pendingActionResult = actionResult.pendingActionResult;\n loadingNavigation = getLoadingNavigation(location, opts.submission);\n flushSync = false;\n // No need to do fog of war matching again on loader execution\n fogOfWar.active = false;\n // Create a GET request for the loaders\n request = createClientSideRequest(init.history, request.url, request.signal);\n }\n // Call loaders\n let {\n shortCircuited,\n matches: updatedMatches,\n loaderData,\n errors\n } = await handleLoaders(request, location, matches, fogOfWar.active, loadingNavigation, opts && opts.submission, opts && opts.fetcherSubmission, opts && opts.replace, opts && opts.initialHydration === true, flushSync, pendingActionResult);\n if (shortCircuited) {\n return;\n }\n // Clean up now that the action/loaders have completed. Don\'t clean up if\n // we short circuited because pendingNavigationController will have already\n // been assigned to a new controller for the next navigation\n pendingNavigationController = null;\n completeNavigation(location, _extends({\n matches: updatedMatches || matches\n }, getActionDataForCommit(pendingActionResult), {\n loaderData,\n errors\n }));\n }\n // Call the action matched by the leaf route for this navigation and handle\n // redirects/errors\n async function handleAction(request, location, submission, matches, isFogOfWar, opts) {\n if (opts === void 0) {\n opts = {};\n }\n interruptActiveLoads();\n // Put us in a submitting state\n let navigation = getSubmittingNavigation(location, submission);\n updateState({\n navigation\n }, {\n flushSync: opts.flushSync === true\n });\n if (isFogOfWar) {\n let discoverResult = await discoverRoutes(matches, location.pathname, request.signal);\n if (discoverResult.type === "aborted") {\n return {\n shortCircuited: true\n };\n } else if (discoverResult.type === "error") {\n let {\n error,\n notFoundMatches,\n route\n } = handleDiscoverRouteError(location.pathname, discoverResult);\n return {\n matches: notFoundMatches,\n pendingActionResult: [route.id, {\n type: ResultType.error,\n error\n }]\n };\n } else if (!discoverResult.matches) {\n let {\n notFoundMatches,\n error,\n route\n } = handleNavigational404(location.pathname);\n return {\n matches: notFoundMatches,\n pendingActionResult: [route.id, {\n type: ResultType.error,\n error\n }]\n };\n } else {\n matches = discoverResult.matches;\n }\n }\n // Call our action and get the result\n let result;\n let actionMatch = getTargetMatch(matches, location);\n if (!actionMatch.route.action && !actionMatch.route.lazy) {\n result = {\n type: ResultType.error,\n error: getInternalRouterError(405, {\n method: request.method,\n pathname: location.pathname,\n routeId: actionMatch.route.id\n })\n };\n } else {\n let results = await callDataStrategy("action", request, [actionMatch], matches);\n result = results[0];\n if (request.signal.aborted) {\n return {\n shortCircuited: true\n };\n }\n }\n if (isRedirectResult(result)) {\n let replace;\n if (opts && opts.replace != null) {\n replace = opts.replace;\n } else {\n // If the user didn\'t explicity indicate replace behavior, replace if\n // we redirected to the exact same location we\'re currently at to avoid\n // double back-buttons\n let location = normalizeRedirectLocation(result.response.headers.get("Location"), new URL(request.url), basename);\n replace = location === state.location.pathname + state.location.search;\n }\n await startRedirectNavigation(request, result, {\n submission,\n replace\n });\n return {\n shortCircuited: true\n };\n }\n if (isDeferredResult(result)) {\n throw getInternalRouterError(400, {\n type: "defer-action"\n });\n }\n if (isErrorResult(result)) {\n // Store off the pending error - we use it to determine which loaders\n // to call and will commit it when we complete the navigation\n let boundaryMatch = findNearestBoundary(matches, actionMatch.route.id);\n // By default, all submissions to the current location are REPLACE\n // navigations, but if the action threw an error that\'ll be rendered in\n // an errorElement, we fall back to PUSH so that the user can use the\n // back button to get back to the pre-submission form location to try\n // again\n if ((opts && opts.replace) !== true) {\n pendingAction = Action.Push;\n }\n return {\n matches,\n pendingActionResult: [boundaryMatch.route.id, result]\n };\n }\n return {\n matches,\n pendingActionResult: [actionMatch.route.id, result]\n };\n }\n // Call all applicable loaders for the given matches, handling redirects,\n // errors, etc.\n async function handleLoaders(request, location, matches, isFogOfWar, overrideNavigation, submission, fetcherSubmission, replace, initialHydration, flushSync, pendingActionResult) {\n // Figure out the right navigation we want to use for data loading\n let loadingNavigation = overrideNavigation || getLoadingNavigation(location, submission);\n // If this was a redirect from an action we don\'t have a "submission" but\n // we have it on the loading navigation so use that if available\n let activeSubmission = submission || fetcherSubmission || getSubmissionFromNavigation(loadingNavigation);\n // If this is an uninterrupted revalidation, we remain in our current idle\n // state. If not, we need to switch to our loading state and load data,\n // preserving any new action data or existing action data (in the case of\n // a revalidation interrupting an actionReload)\n // If we have partialHydration enabled, then don\'t update the state for the\n // initial data load since it\'s not a "navigation"\n let shouldUpdateNavigationState = !isUninterruptedRevalidation && (!future.v7_partialHydration || !initialHydration);\n // When fog of war is enabled, we enter our `loading` state earlier so we\n // can discover new routes during the `loading` state. We skip this if\n // we\'ve already run actions since we would have done our matching already.\n // If the children() function threw then, we want to proceed with the\n // partial matches it discovered.\n if (isFogOfWar) {\n if (shouldUpdateNavigationState) {\n let actionData = getUpdatedActionData(pendingActionResult);\n updateState(_extends({\n navigation: loadingNavigation\n }, actionData !== undefined ? {\n actionData\n } : {}), {\n flushSync\n });\n }\n let discoverResult = await discoverRoutes(matches, location.pathname, request.signal);\n if (discoverResult.type === "aborted") {\n return {\n shortCircuited: true\n };\n } else if (discoverResult.type === "error") {\n let {\n error,\n notFoundMatches,\n route\n } = handleDiscoverRouteError(location.pathname, discoverResult);\n return {\n matches: notFoundMatches,\n loaderData: {},\n errors: {\n [route.id]: error\n }\n };\n } else if (!discoverResult.matches) {\n let {\n error,\n notFoundMatches,\n route\n } = handleNavigational404(location.pathname);\n return {\n matches: notFoundMatches,\n loaderData: {},\n errors: {\n [route.id]: error\n }\n };\n } else {\n matches = discoverResult.matches;\n }\n }\n let routesToUse = inFlightDataRoutes || dataRoutes;\n let [matchesToLoad, revalidatingFetchers] = getMatchesToLoad(init.history, state, matches, activeSubmission, location, future.v7_partialHydration && initialHydration === true, future.unstable_skipActionErrorRevalidation, isRevalidationRequired, cancelledDeferredRoutes, cancelledFetcherLoads, deletedFetchers, fetchLoadMatches, fetchRedirectIds, routesToUse, basename, pendingActionResult);\n // Cancel pending deferreds for no-longer-matched routes or routes we\'re\n // about to reload. Note that if this is an action reload we would have\n // already cancelled all pending deferreds so this would be a no-op\n cancelActiveDeferreds(routeId => !(matches && matches.some(m => m.route.id === routeId)) || matchesToLoad && matchesToLoad.some(m => m.route.id === routeId));\n pendingNavigationLoadId = ++incrementingLoadId;\n // Short circuit if we have no loaders to run\n if (matchesToLoad.length === 0 && revalidatingFetchers.length === 0) {\n let updatedFetchers = markFetchRedirectsDone();\n completeNavigation(location, _extends({\n matches,\n loaderData: {},\n // Commit pending error if we\'re short circuiting\n errors: pendingActionResult && isErrorResult(pendingActionResult[1]) ? {\n [pendingActionResult[0]]: pendingActionResult[1].error\n } : null\n }, getActionDataForCommit(pendingActionResult), updatedFetchers ? {\n fetchers: new Map(state.fetchers)\n } : {}), {\n flushSync\n });\n return {\n shortCircuited: true\n };\n }\n if (shouldUpdateNavigationState) {\n let updates = {};\n if (!isFogOfWar) {\n // Only update navigation/actionNData if we didn\'t already do it above\n updates.navigation = loadingNavigation;\n let actionData = getUpdatedActionData(pendingActionResult);\n if (actionData !== undefined) {\n updates.actionData = actionData;\n }\n }\n if (revalidatingFetchers.length > 0) {\n updates.fetchers = getUpdatedRevalidatingFetchers(revalidatingFetchers);\n }\n updateState(updates, {\n flushSync\n });\n }\n revalidatingFetchers.forEach(rf => {\n if (fetchControllers.has(rf.key)) {\n abortFetcher(rf.key);\n }\n if (rf.controller) {\n // Fetchers use an independent AbortController so that aborting a fetcher\n // (via deleteFetcher) does not abort the triggering navigation that\n // triggered the revalidation\n fetchControllers.set(rf.key, rf.controller);\n }\n });\n // Proxy navigation abort through to revalidation fetchers\n let abortPendingFetchRevalidations = () => revalidatingFetchers.forEach(f => abortFetcher(f.key));\n if (pendingNavigationController) {\n pendingNavigationController.signal.addEventListener("abort", abortPendingFetchRevalidations);\n }\n let {\n loaderResults,\n fetcherResults\n } = await callLoadersAndMaybeResolveData(state.matches, matches, matchesToLoad, revalidatingFetchers, request);\n if (request.signal.aborted) {\n return {\n shortCircuited: true\n };\n }\n // Clean up _after_ loaders have completed. Don\'t clean up if we short\n // circuited because fetchControllers would have been aborted and\n // reassigned to new controllers for the next navigation\n if (pendingNavigationController) {\n pendingNavigationController.signal.removeEventListener("abort", abortPendingFetchRevalidations);\n }\n revalidatingFetchers.forEach(rf => fetchControllers.delete(rf.key));\n // If any loaders returned a redirect Response, start a new REPLACE navigation\n let redirect = findRedirect([...loaderResults, ...fetcherResults]);\n if (redirect) {\n if (redirect.idx >= matchesToLoad.length) {\n // If this redirect came from a fetcher make sure we mark it in\n // fetchRedirectIds so it doesn\'t get revalidated on the next set of\n // loader executions\n let fetcherKey = revalidatingFetchers[redirect.idx - matchesToLoad.length].key;\n fetchRedirectIds.add(fetcherKey);\n }\n await startRedirectNavigation(request, redirect.result, {\n replace\n });\n return {\n shortCircuited: true\n };\n }\n // Process and commit output from loaders\n let {\n loaderData,\n errors\n } = processLoaderData(state, matches, matchesToLoad, loaderResults, pendingActionResult, revalidatingFetchers, fetcherResults, activeDeferreds);\n // Wire up subscribers to update loaderData as promises settle\n activeDeferreds.forEach((deferredData, routeId) => {\n deferredData.subscribe(aborted => {\n // Note: No need to updateState here since the TrackedPromise on\n // loaderData is stable across resolve/reject\n // Remove this instance if we were aborted or if promises have settled\n if (aborted || deferredData.done) {\n activeDeferreds.delete(routeId);\n }\n });\n });\n // During partial hydration, preserve SSR errors for routes that don\'t re-run\n if (future.v7_partialHydration && initialHydration && state.errors) {\n Object.entries(state.errors).filter(_ref2 => {\n let [id] = _ref2;\n return !matchesToLoad.some(m => m.route.id === id);\n }).forEach(_ref3 => {\n let [routeId, error] = _ref3;\n errors = Object.assign(errors || {}, {\n [routeId]: error\n });\n });\n }\n let updatedFetchers = markFetchRedirectsDone();\n let didAbortFetchLoads = abortStaleFetchLoads(pendingNavigationLoadId);\n let shouldUpdateFetchers = updatedFetchers || didAbortFetchLoads || revalidatingFetchers.length > 0;\n return _extends({\n matches,\n loaderData,\n errors\n }, shouldUpdateFetchers ? {\n fetchers: new Map(state.fetchers)\n } : {});\n }\n function getUpdatedActionData(pendingActionResult) {\n if (pendingActionResult && !isErrorResult(pendingActionResult[1])) {\n // This is cast to `any` currently because `RouteData`uses any and it\n // would be a breaking change to use any.\n // TODO: v7 - change `RouteData` to use `unknown` instead of `any`\n return {\n [pendingActionResult[0]]: pendingActionResult[1].data\n };\n } else if (state.actionData) {\n if (Object.keys(state.actionData).length === 0) {\n return null;\n } else {\n return state.actionData;\n }\n }\n }\n function getUpdatedRevalidatingFetchers(revalidatingFetchers) {\n revalidatingFetchers.forEach(rf => {\n let fetcher = state.fetchers.get(rf.key);\n let revalidatingFetcher = getLoadingFetcher(undefined, fetcher ? fetcher.data : undefined);\n state.fetchers.set(rf.key, revalidatingFetcher);\n });\n return new Map(state.fetchers);\n }\n // Trigger a fetcher load/submit for the given fetcher key\n function fetch(key, routeId, href, opts) {\n if (isServer) {\n throw new Error("router.fetch() was called during the server render, but it shouldn\'t be. " + "You are likely calling a useFetcher() method in the body of your component. " + "Try moving it to a useEffect or a callback.");\n }\n if (fetchControllers.has(key)) abortFetcher(key);\n let flushSync = (opts && opts.unstable_flushSync) === true;\n let routesToUse = inFlightDataRoutes || dataRoutes;\n let normalizedPath = normalizeTo(state.location, state.matches, basename, future.v7_prependBasename, href, future.v7_relativeSplatPath, routeId, opts == null ? void 0 : opts.relative);\n let matches = matchRoutes(routesToUse, normalizedPath, basename);\n let fogOfWar = checkFogOfWar(matches, routesToUse, normalizedPath);\n if (fogOfWar.active && fogOfWar.matches) {\n matches = fogOfWar.matches;\n }\n if (!matches) {\n setFetcherError(key, routeId, getInternalRouterError(404, {\n pathname: normalizedPath\n }), {\n flushSync\n });\n return;\n }\n let {\n path,\n submission,\n error\n } = normalizeNavigateOptions(future.v7_normalizeFormMethod, true, normalizedPath, opts);\n if (error) {\n setFetcherError(key, routeId, error, {\n flushSync\n });\n return;\n }\n let match = getTargetMatch(matches, path);\n pendingPreventScrollReset = (opts && opts.preventScrollReset) === true;\n if (submission && isMutationMethod(submission.formMethod)) {\n handleFetcherAction(key, routeId, path, match, matches, fogOfWar.active, flushSync, submission);\n return;\n }\n // Store off the match so we can call it\'s shouldRevalidate on subsequent\n // revalidations\n fetchLoadMatches.set(key, {\n routeId,\n path\n });\n handleFetcherLoader(key, routeId, path, match, matches, fogOfWar.active, flushSync, submission);\n }\n // Call the action for the matched fetcher.submit(), and then handle redirects,\n // errors, and revalidation\n async function handleFetcherAction(key, routeId, path, match, requestMatches, isFogOfWar, flushSync, submission) {\n interruptActiveLoads();\n fetchLoadMatches.delete(key);\n function detectAndHandle405Error(m) {\n if (!m.route.action && !m.route.lazy) {\n let error = getInternalRouterError(405, {\n method: submission.formMethod,\n pathname: path,\n routeId: routeId\n });\n setFetcherError(key, routeId, error, {\n flushSync\n });\n return true;\n }\n return false;\n }\n if (!isFogOfWar && detectAndHandle405Error(match)) {\n return;\n }\n // Put this fetcher into it\'s submitting state\n let existingFetcher = state.fetchers.get(key);\n updateFetcherState(key, getSubmittingFetcher(submission, existingFetcher), {\n flushSync\n });\n let abortController = new AbortController();\n let fetchRequest = createClientSideRequest(init.history, path, abortController.signal, submission);\n if (isFogOfWar) {\n let discoverResult = await discoverRoutes(requestMatches, path, fetchRequest.signal);\n if (discoverResult.type === "aborted") {\n return;\n } else if (discoverResult.type === "error") {\n let {\n error\n } = handleDiscoverRouteError(path, discoverResult);\n setFetcherError(key, routeId, error, {\n flushSync\n });\n return;\n } else if (!discoverResult.matches) {\n setFetcherError(key, routeId, getInternalRouterError(404, {\n pathname: path\n }), {\n flushSync\n });\n return;\n } else {\n requestMatches = discoverResult.matches;\n match = getTargetMatch(requestMatches, path);\n if (detectAndHandle405Error(match)) {\n return;\n }\n }\n }\n // Call the action for the fetcher\n fetchControllers.set(key, abortController);\n let originatingLoadId = incrementingLoadId;\n let actionResults = await callDataStrategy("action", fetchRequest, [match], requestMatches);\n let actionResult = actionResults[0];\n if (fetchRequest.signal.aborted) {\n // We can delete this so long as we weren\'t aborted by our own fetcher\n // re-submit which would have put _new_ controller is in fetchControllers\n if (fetchControllers.get(key) === abortController) {\n fetchControllers.delete(key);\n }\n return;\n }\n // When using v7_fetcherPersist, we don\'t want errors bubbling up to the UI\n // or redirects processed for unmounted fetchers so we just revert them to\n // idle\n if (future.v7_fetcherPersist && deletedFetchers.has(key)) {\n if (isRedirectResult(actionResult) || isErrorResult(actionResult)) {\n updateFetcherState(key, getDoneFetcher(undefined));\n return;\n }\n // Let SuccessResult\'s fall through for revalidation\n } else {\n if (isRedirectResult(actionResult)) {\n fetchControllers.delete(key);\n if (pendingNavigationLoadId > originatingLoadId) {\n // A new navigation was kicked off after our action started, so that\n // should take precedence over this redirect navigation. We already\n // set isRevalidationRequired so all loaders for the new route should\n // fire unless opted out via shouldRevalidate\n updateFetcherState(key, getDoneFetcher(undefined));\n return;\n } else {\n fetchRedirectIds.add(key);\n updateFetcherState(key, getLoadingFetcher(submission));\n return startRedirectNavigation(fetchRequest, actionResult, {\n fetcherSubmission: submission\n });\n }\n }\n // Process any non-redirect errors thrown\n if (isErrorResult(actionResult)) {\n setFetcherError(key, routeId, actionResult.error);\n return;\n }\n }\n if (isDeferredResult(actionResult)) {\n throw getInternalRouterError(400, {\n type: "defer-action"\n });\n }\n // Start the data load for current matches, or the next location if we\'re\n // in the middle of a navigation\n let nextLocation = state.navigation.location || state.location;\n let revalidationRequest = createClientSideRequest(init.history, nextLocation, abortController.signal);\n let routesToUse = inFlightDataRoutes || dataRoutes;\n let matches = state.navigation.state !== "idle" ? matchRoutes(routesToUse, state.navigation.location, basename) : state.matches;\n invariant(matches, "Didn\'t find any matches after fetcher action");\n let loadId = ++incrementingLoadId;\n fetchReloadIds.set(key, loadId);\n let loadFetcher = getLoadingFetcher(submission, actionResult.data);\n state.fetchers.set(key, loadFetcher);\n let [matchesToLoad, revalidatingFetchers] = getMatchesToLoad(init.history, state, matches, submission, nextLocation, false, future.unstable_skipActionErrorRevalidation, isRevalidationRequired, cancelledDeferredRoutes, cancelledFetcherLoads, deletedFetchers, fetchLoadMatches, fetchRedirectIds, routesToUse, basename, [match.route.id, actionResult]);\n // Put all revalidating fetchers into the loading state, except for the\n // current fetcher which we want to keep in it\'s current loading state which\n // contains it\'s action submission info + action data\n revalidatingFetchers.filter(rf => rf.key !== key).forEach(rf => {\n let staleKey = rf.key;\n let existingFetcher = state.fetchers.get(staleKey);\n let revalidatingFetcher = getLoadingFetcher(undefined, existingFetcher ? existingFetcher.data : undefined);\n state.fetchers.set(staleKey, revalidatingFetcher);\n if (fetchControllers.has(staleKey)) {\n abortFetcher(staleKey);\n }\n if (rf.controller) {\n fetchControllers.set(staleKey, rf.controller);\n }\n });\n updateState({\n fetchers: new Map(state.fetchers)\n });\n let abortPendingFetchRevalidations = () => revalidatingFetchers.forEach(rf => abortFetcher(rf.key));\n abortController.signal.addEventListener("abort", abortPendingFetchRevalidations);\n let {\n loaderResults,\n fetcherResults\n } = await callLoadersAndMaybeResolveData(state.matches, matches, matchesToLoad, revalidatingFetchers, revalidationRequest);\n if (abortController.signal.aborted) {\n return;\n }\n abortController.signal.removeEventListener("abort", abortPendingFetchRevalidations);\n fetchReloadIds.delete(key);\n fetchControllers.delete(key);\n revalidatingFetchers.forEach(r => fetchControllers.delete(r.key));\n let redirect = findRedirect([...loaderResults, ...fetcherResults]);\n if (redirect) {\n if (redirect.idx >= matchesToLoad.length) {\n // If this redirect came from a fetcher make sure we mark it in\n // fetchRedirectIds so it doesn\'t get revalidated on the next set of\n // loader executions\n let fetcherKey = revalidatingFetchers[redirect.idx - matchesToLoad.length].key;\n fetchRedirectIds.add(fetcherKey);\n }\n return startRedirectNavigation(revalidationRequest, redirect.result);\n }\n // Process and commit output from loaders\n let {\n loaderData,\n errors\n } = processLoaderData(state, state.matches, matchesToLoad, loaderResults, undefined, revalidatingFetchers, fetcherResults, activeDeferreds);\n // Since we let revalidations complete even if the submitting fetcher was\n // deleted, only put it back to idle if it hasn\'t been deleted\n if (state.fetchers.has(key)) {\n let doneFetcher = getDoneFetcher(actionResult.data);\n state.fetchers.set(key, doneFetcher);\n }\n abortStaleFetchLoads(loadId);\n // If we are currently in a navigation loading state and this fetcher is\n // more recent than the navigation, we want the newer data so abort the\n // navigation and complete it with the fetcher data\n if (state.navigation.state === "loading" && loadId > pendingNavigationLoadId) {\n invariant(pendingAction, "Expected pending action");\n pendingNavigationController && pendingNavigationController.abort();\n completeNavigation(state.navigation.location, {\n matches,\n loaderData,\n errors,\n fetchers: new Map(state.fetchers)\n });\n } else {\n // otherwise just update with the fetcher data, preserving any existing\n // loaderData for loaders that did not need to reload. We have to\n // manually merge here since we aren\'t going through completeNavigation\n updateState({\n errors,\n loaderData: mergeLoaderData(state.loaderData, loaderData, matches, errors),\n fetchers: new Map(state.fetchers)\n });\n isRevalidationRequired = false;\n }\n }\n // Call the matched loader for fetcher.load(), handling redirects, errors, etc.\n async function handleFetcherLoader(key, routeId, path, match, matches, isFogOfWar, flushSync, submission) {\n let existingFetcher = state.fetchers.get(key);\n updateFetcherState(key, getLoadingFetcher(submission, existingFetcher ? existingFetcher.data : undefined), {\n flushSync\n });\n let abortController = new AbortController();\n let fetchRequest = createClientSideRequest(init.history, path, abortController.signal);\n if (isFogOfWar) {\n let discoverResult = await discoverRoutes(matches, path, fetchRequest.signal);\n if (discoverResult.type === "aborted") {\n return;\n } else if (discoverResult.type === "error") {\n let {\n error\n } = handleDiscoverRouteError(path, discoverResult);\n setFetcherError(key, routeId, error, {\n flushSync\n });\n return;\n } else if (!discoverResult.matches) {\n setFetcherError(key, routeId, getInternalRouterError(404, {\n pathname: path\n }), {\n flushSync\n });\n return;\n } else {\n matches = discoverResult.matches;\n match = getTargetMatch(matches, path);\n }\n }\n // Call the loader for this fetcher route match\n fetchControllers.set(key, abortController);\n let originatingLoadId = incrementingLoadId;\n let results = await callDataStrategy("loader", fetchRequest, [match], matches);\n let result = results[0];\n // Deferred isn\'t supported for fetcher loads, await everything and treat it\n // as a normal load. resolveDeferredData will return undefined if this\n // fetcher gets aborted, so we just leave result untouched and short circuit\n // below if that happens\n if (isDeferredResult(result)) {\n result = (await resolveDeferredData(result, fetchRequest.signal, true)) || result;\n }\n // We can delete this so long as we weren\'t aborted by our our own fetcher\n // re-load which would have put _new_ controller is in fetchControllers\n if (fetchControllers.get(key) === abortController) {\n fetchControllers.delete(key);\n }\n if (fetchRequest.signal.aborted) {\n return;\n }\n // We don\'t want errors bubbling up or redirects followed for unmounted\n // fetchers, so short circuit here if it was removed from the UI\n if (deletedFetchers.has(key)) {\n updateFetcherState(key, getDoneFetcher(undefined));\n return;\n }\n // If the loader threw a redirect Response, start a new REPLACE navigation\n if (isRedirectResult(result)) {\n if (pendingNavigationLoadId > originatingLoadId) {\n // A new navigation was kicked off after our loader started, so that\n // should take precedence over this redirect navigation\n updateFetcherState(key, getDoneFetcher(undefined));\n return;\n } else {\n fetchRedirectIds.add(key);\n await startRedirectNavigation(fetchRequest, result);\n return;\n }\n }\n // Process any non-redirect errors thrown\n if (isErrorResult(result)) {\n setFetcherError(key, routeId, result.error);\n return;\n }\n invariant(!isDeferredResult(result), "Unhandled fetcher deferred data");\n // Put the fetcher back into an idle state\n updateFetcherState(key, getDoneFetcher(result.data));\n }\n /**\n * Utility function to handle redirects returned from an action or loader.\n * Normally, a redirect "replaces" the navigation that triggered it. So, for\n * example:\n *\n * - user is on /a\n * - user clicks a link to /b\n * - loader for /b redirects to /c\n *\n * In a non-JS app the browser would track the in-flight navigation to /b and\n * then replace it with /c when it encountered the redirect response. In\n * the end it would only ever update the URL bar with /c.\n *\n * In client-side routing using pushState/replaceState, we aim to emulate\n * this behavior and we also do not update history until the end of the\n * navigation (including processed redirects). This means that we never\n * actually touch history until we\'ve processed redirects, so we just use\n * the history action from the original navigation (PUSH or REPLACE).\n */\n async function startRedirectNavigation(request, redirect, _temp2) {\n let {\n submission,\n fetcherSubmission,\n replace\n } = _temp2 === void 0 ? {} : _temp2;\n if (redirect.response.headers.has("X-Remix-Revalidate")) {\n isRevalidationRequired = true;\n }\n let location = redirect.response.headers.get("Location");\n invariant(location, "Expected a Location header on the redirect Response");\n location = normalizeRedirectLocation(location, new URL(request.url), basename);\n let redirectLocation = createLocation(state.location, location, {\n _isRedirect: true\n });\n if (isBrowser) {\n let isDocumentReload = false;\n if (redirect.response.headers.has("X-Remix-Reload-Document")) {\n // Hard reload if the response contained X-Remix-Reload-Document\n isDocumentReload = true;\n } else if (ABSOLUTE_URL_REGEX.test(location)) {\n const url = init.history.createURL(location);\n isDocumentReload =\n // Hard reload if it\'s an absolute URL to a new origin\n url.origin !== routerWindow.location.origin ||\n // Hard reload if it\'s an absolute URL that does not match our basename\n stripBasename(url.pathname, basename) == null;\n }\n if (isDocumentReload) {\n if (replace) {\n routerWindow.location.replace(location);\n } else {\n routerWindow.location.assign(location);\n }\n return;\n }\n }\n // There\'s no need to abort on redirects, since we don\'t detect the\n // redirect until the action/loaders have settled\n pendingNavigationController = null;\n let redirectHistoryAction = replace === true ? Action.Replace : Action.Push;\n // Use the incoming submission if provided, fallback on the active one in\n // state.navigation\n let {\n formMethod,\n formAction,\n formEncType\n } = state.navigation;\n if (!submission && !fetcherSubmission && formMethod && formAction && formEncType) {\n submission = getSubmissionFromNavigation(state.navigation);\n }\n // If this was a 307/308 submission we want to preserve the HTTP method and\n // re-submit the GET/POST/PUT/PATCH/DELETE as a submission navigation to the\n // redirected location\n let activeSubmission = submission || fetcherSubmission;\n if (redirectPreserveMethodStatusCodes.has(redirect.response.status) && activeSubmission && isMutationMethod(activeSubmission.formMethod)) {\n await startNavigation(redirectHistoryAction, redirectLocation, {\n submission: _extends({}, activeSubmission, {\n formAction: location\n }),\n // Preserve this flag across redirects\n preventScrollReset: pendingPreventScrollReset\n });\n } else {\n // If we have a navigation submission, we will preserve it through the\n // redirect navigation\n let overrideNavigation = getLoadingNavigation(redirectLocation, submission);\n await startNavigation(redirectHistoryAction, redirectLocation, {\n overrideNavigation,\n // Send fetcher submissions through for shouldRevalidate\n fetcherSubmission,\n // Preserve this flag across redirects\n preventScrollReset: pendingPreventScrollReset\n });\n }\n }\n // Utility wrapper for calling dataStrategy client-side without having to\n // pass around the manifest, mapRouteProperties, etc.\n async function callDataStrategy(type, request, matchesToLoad, matches) {\n try {\n let results = await callDataStrategyImpl(dataStrategyImpl, type, request, matchesToLoad, matches, manifest, mapRouteProperties);\n return await Promise.all(results.map((result, i) => {\n if (isRedirectHandlerResult(result)) {\n let response = result.result;\n return {\n type: ResultType.redirect,\n response: normalizeRelativeRoutingRedirectResponse(response, request, matchesToLoad[i].route.id, matches, basename, future.v7_relativeSplatPath)\n };\n }\n return convertHandlerResultToDataResult(result);\n }));\n } catch (e) {\n // If the outer dataStrategy method throws, just return the error for all\n // matches - and it\'ll naturally bubble to the root\n return matchesToLoad.map(() => ({\n type: ResultType.error,\n error: e\n }));\n }\n }\n async function callLoadersAndMaybeResolveData(currentMatches, matches, matchesToLoad, fetchersToLoad, request) {\n let [loaderResults, ...fetcherResults] = await Promise.all([matchesToLoad.length ? callDataStrategy("loader", request, matchesToLoad, matches) : [], ...fetchersToLoad.map(f => {\n if (f.matches && f.match && f.controller) {\n let fetcherRequest = createClientSideRequest(init.history, f.path, f.controller.signal);\n return callDataStrategy("loader", fetcherRequest, [f.match], f.matches).then(r => r[0]);\n } else {\n return Promise.resolve({\n type: ResultType.error,\n error: getInternalRouterError(404, {\n pathname: f.path\n })\n });\n }\n })]);\n await Promise.all([resolveDeferredResults(currentMatches, matchesToLoad, loaderResults, loaderResults.map(() => request.signal), false, state.loaderData), resolveDeferredResults(currentMatches, fetchersToLoad.map(f => f.match), fetcherResults, fetchersToLoad.map(f => f.controller ? f.controller.signal : null), true)]);\n return {\n loaderResults,\n fetcherResults\n };\n }\n function interruptActiveLoads() {\n // Every interruption triggers a revalidation\n isRevalidationRequired = true;\n // Cancel pending route-level deferreds and mark cancelled routes for\n // revalidation\n cancelledDeferredRoutes.push(...cancelActiveDeferreds());\n // Abort in-flight fetcher loads\n fetchLoadMatches.forEach((_, key) => {\n if (fetchControllers.has(key)) {\n cancelledFetcherLoads.push(key);\n abortFetcher(key);\n }\n });\n }\n function updateFetcherState(key, fetcher, opts) {\n if (opts === void 0) {\n opts = {};\n }\n state.fetchers.set(key, fetcher);\n updateState({\n fetchers: new Map(state.fetchers)\n }, {\n flushSync: (opts && opts.flushSync) === true\n });\n }\n function setFetcherError(key, routeId, error, opts) {\n if (opts === void 0) {\n opts = {};\n }\n let boundaryMatch = findNearestBoundary(state.matches, routeId);\n deleteFetcher(key);\n updateState({\n errors: {\n [boundaryMatch.route.id]: error\n },\n fetchers: new Map(state.fetchers)\n }, {\n flushSync: (opts && opts.flushSync) === true\n });\n }\n function getFetcher(key) {\n if (future.v7_fetcherPersist) {\n activeFetchers.set(key, (activeFetchers.get(key) || 0) + 1);\n // If this fetcher was previously marked for deletion, unmark it since we\n // have a new instance\n if (deletedFetchers.has(key)) {\n deletedFetchers.delete(key);\n }\n }\n return state.fetchers.get(key) || IDLE_FETCHER;\n }\n function deleteFetcher(key) {\n let fetcher = state.fetchers.get(key);\n // Don\'t abort the controller if this is a deletion of a fetcher.submit()\n // in it\'s loading phase since - we don\'t want to abort the corresponding\n // revalidation and want them to complete and land\n if (fetchControllers.has(key) && !(fetcher && fetcher.state === "loading" && fetchReloadIds.has(key))) {\n abortFetcher(key);\n }\n fetchLoadMatches.delete(key);\n fetchReloadIds.delete(key);\n fetchRedirectIds.delete(key);\n deletedFetchers.delete(key);\n state.fetchers.delete(key);\n }\n function deleteFetcherAndUpdateState(key) {\n if (future.v7_fetcherPersist) {\n let count = (activeFetchers.get(key) || 0) - 1;\n if (count <= 0) {\n activeFetchers.delete(key);\n deletedFetchers.add(key);\n } else {\n activeFetchers.set(key, count);\n }\n } else {\n deleteFetcher(key);\n }\n updateState({\n fetchers: new Map(state.fetchers)\n });\n }\n function abortFetcher(key) {\n let controller = fetchControllers.get(key);\n invariant(controller, "Expected fetch controller: " + key);\n controller.abort();\n fetchControllers.delete(key);\n }\n function markFetchersDone(keys) {\n for (let key of keys) {\n let fetcher = getFetcher(key);\n let doneFetcher = getDoneFetcher(fetcher.data);\n state.fetchers.set(key, doneFetcher);\n }\n }\n function markFetchRedirectsDone() {\n let doneKeys = [];\n let updatedFetchers = false;\n for (let key of fetchRedirectIds) {\n let fetcher = state.fetchers.get(key);\n invariant(fetcher, "Expected fetcher: " + key);\n if (fetcher.state === "loading") {\n fetchRedirectIds.delete(key);\n doneKeys.push(key);\n updatedFetchers = true;\n }\n }\n markFetchersDone(doneKeys);\n return updatedFetchers;\n }\n function abortStaleFetchLoads(landedId) {\n let yeetedKeys = [];\n for (let [key, id] of fetchReloadIds) {\n if (id < landedId) {\n let fetcher = state.fetchers.get(key);\n invariant(fetcher, "Expected fetcher: " + key);\n if (fetcher.state === "loading") {\n abortFetcher(key);\n fetchReloadIds.delete(key);\n yeetedKeys.push(key);\n }\n }\n }\n markFetchersDone(yeetedKeys);\n return yeetedKeys.length > 0;\n }\n function getBlocker(key, fn) {\n let blocker = state.blockers.get(key) || IDLE_BLOCKER;\n if (blockerFunctions.get(key) !== fn) {\n blockerFunctions.set(key, fn);\n }\n return blocker;\n }\n function deleteBlocker(key) {\n state.blockers.delete(key);\n blockerFunctions.delete(key);\n }\n // Utility function to update blockers, ensuring valid state transitions\n function updateBlocker(key, newBlocker) {\n let blocker = state.blockers.get(key) || IDLE_BLOCKER;\n // Poor mans state machine :)\n // https://mermaid.live/edit#pako:eNqVkc9OwzAMxl8l8nnjAYrEtDIOHEBIgwvKJTReGy3_lDpIqO27k6awMG0XcrLlnz87nwdonESogKXXBuE79rq75XZO3-yHds0RJVuv70YrPlUrCEe2HfrORS3rubqZfuhtpg5C9wk5tZ4VKcRUq88q9Z8RS0-48cE1iHJkL0ugbHuFLus9L6spZy8nX9MP2CNdomVaposqu3fGayT8T8-jJQwhepo_UtpgBQaDEUom04dZhAN1aJBDlUKJBxE1ceB2Smj0Mln-IBW5AFU2dwUiktt_2Qaq2dBfaKdEup85UV7Yd-dKjlnkabl2Pvr0DTkTreM\n invariant(blocker.state === "unblocked" && newBlocker.state === "blocked" || blocker.state === "blocked" && newBlocker.state === "blocked" || blocker.state === "blocked" && newBlocker.state === "proceeding" || blocker.state === "blocked" && newBlocker.state === "unblocked" || blocker.state === "proceeding" && newBlocker.state === "unblocked", "Invalid blocker state transition: " + blocker.state + " -> " + newBlocker.state);\n let blockers = new Map(state.blockers);\n blockers.set(key, newBlocker);\n updateState({\n blockers\n });\n }\n function shouldBlockNavigation(_ref4) {\n let {\n currentLocation,\n nextLocation,\n historyAction\n } = _ref4;\n if (blockerFunctions.size === 0) {\n return;\n }\n // We ony support a single active blocker at the moment since we don\'t have\n // any compelling use cases for multi-blocker yet\n if (blockerFunctions.size > 1) {\n warning(false, "A router only supports one blocker at a time");\n }\n let entries = Array.from(blockerFunctions.entries());\n let [blockerKey, blockerFunction] = entries[entries.length - 1];\n let blocker = state.blockers.get(blockerKey);\n if (blocker && blocker.state === "proceeding") {\n // If the blocker is currently proceeding, we don\'t need to re-check\n // it and can let this navigation continue\n return;\n }\n // At this point, we know we\'re unblocked/blocked so we need to check the\n // user-provided blocker function\n if (blockerFunction({\n currentLocation,\n nextLocation,\n historyAction\n })) {\n return blockerKey;\n }\n }\n function handleNavigational404(pathname) {\n let error = getInternalRouterError(404, {\n pathname\n });\n let routesToUse = inFlightDataRoutes || dataRoutes;\n let {\n matches,\n route\n } = getShortCircuitMatches(routesToUse);\n // Cancel all pending deferred on 404s since we don\'t keep any routes\n cancelActiveDeferreds();\n return {\n notFoundMatches: matches,\n route,\n error\n };\n }\n function handleDiscoverRouteError(pathname, discoverResult) {\n let matches = discoverResult.partialMatches;\n let route = matches[matches.length - 1].route;\n let error = getInternalRouterError(400, {\n type: "route-discovery",\n routeId: route.id,\n pathname,\n message: discoverResult.error != null && "message" in discoverResult.error ? discoverResult.error : String(discoverResult.error)\n });\n return {\n notFoundMatches: matches,\n route,\n error\n };\n }\n function cancelActiveDeferreds(predicate) {\n let cancelledRouteIds = [];\n activeDeferreds.forEach((dfd, routeId) => {\n if (!predicate || predicate(routeId)) {\n // Cancel the deferred - but do not remove from activeDeferreds here -\n // we rely on the subscribers to do that so our tests can assert proper\n // cleanup via _internalActiveDeferreds\n dfd.cancel();\n cancelledRouteIds.push(routeId);\n activeDeferreds.delete(routeId);\n }\n });\n return cancelledRouteIds;\n }\n // Opt in to capturing and reporting scroll positions during navigations,\n // used by the <ScrollRestoration> component\n function enableScrollRestoration(positions, getPosition, getKey) {\n savedScrollPositions = positions;\n getScrollPosition = getPosition;\n getScrollRestorationKey = getKey || null;\n // Perform initial hydration scroll restoration, since we miss the boat on\n // the initial updateState() because we\'ve not yet rendered <ScrollRestoration/>\n // and therefore have no savedScrollPositions available\n if (!initialScrollRestored && state.navigation === IDLE_NAVIGATION) {\n initialScrollRestored = true;\n let y = getSavedScrollPosition(state.location, state.matches);\n if (y != null) {\n updateState({\n restoreScrollPosition: y\n });\n }\n }\n return () => {\n savedScrollPositions = null;\n getScrollPosition = null;\n getScrollRestorationKey = null;\n };\n }\n function getScrollKey(location, matches) {\n if (getScrollRestorationKey) {\n let key = getScrollRestorationKey(location, matches.map(m => convertRouteMatchToUiMatch(m, state.loaderData)));\n return key || location.key;\n }\n return location.key;\n }\n function saveScrollPosition(location, matches) {\n if (savedScrollPositions && getScrollPosition) {\n let key = getScrollKey(location, matches);\n savedScrollPositions[key] = getScrollPosition();\n }\n }\n function getSavedScrollPosition(location, matches) {\n if (savedScrollPositions) {\n let key = getScrollKey(location, matches);\n let y = savedScrollPositions[key];\n if (typeof y === "number") {\n return y;\n }\n }\n return null;\n }\n function checkFogOfWar(matches, routesToUse, pathname) {\n if (patchRoutesOnMissImpl) {\n if (!matches) {\n let fogMatches = matchRoutesImpl(routesToUse, pathname, basename, true);\n return {\n active: true,\n matches: fogMatches || []\n };\n } else {\n let leafRoute = matches[matches.length - 1].route;\n if (leafRoute.path && (leafRoute.path === "*" || leafRoute.path.endsWith("/*"))) {\n // If we matched a splat, it might only be because we haven\'t yet fetched\n // the children that would match with a higher score, so let\'s fetch\n // around and find out\n let partialMatches = matchRoutesImpl(routesToUse, pathname, basename, true);\n return {\n active: true,\n matches: partialMatches\n };\n }\n }\n }\n return {\n active: false,\n matches: null\n };\n }\n async function discoverRoutes(matches, pathname, signal) {\n let partialMatches = matches;\n let route = partialMatches.length > 0 ? partialMatches[partialMatches.length - 1].route : null;\n while (true) {\n let isNonHMR = inFlightDataRoutes == null;\n let routesToUse = inFlightDataRoutes || dataRoutes;\n try {\n await loadLazyRouteChildren(patchRoutesOnMissImpl, pathname, partialMatches, routesToUse, manifest, mapRouteProperties, pendingPatchRoutes, signal);\n } catch (e) {\n return {\n type: "error",\n error: e,\n partialMatches\n };\n } finally {\n // If we are not in the middle of an HMR revalidation and we changed the\n // routes, provide a new identity so when we `updateState` at the end of\n // this navigation/fetch `router.routes` will be a new identity and\n // trigger a re-run of memoized `router.routes` dependencies.\n // HMR will already update the identity and reflow when it lands\n // `inFlightDataRoutes` in `completeNavigation`\n if (isNonHMR) {\n dataRoutes = [...dataRoutes];\n }\n }\n if (signal.aborted) {\n return {\n type: "aborted"\n };\n }\n let newMatches = matchRoutes(routesToUse, pathname, basename);\n let matchedSplat = false;\n if (newMatches) {\n let leafRoute = newMatches[newMatches.length - 1].route;\n if (leafRoute.index) {\n // If we found an index route, we can stop\n return {\n type: "success",\n matches: newMatches\n };\n }\n if (leafRoute.path && leafRoute.path.length > 0) {\n if (leafRoute.path === "*") {\n // If we found a splat route, we can\'t be sure there\'s not a\n // higher-scoring route down some partial matches trail so we need\n // to check that out\n matchedSplat = true;\n } else {\n // If we found a non-splat route, we can stop\n return {\n type: "success",\n matches: newMatches\n };\n }\n }\n }\n let newPartialMatches = matchRoutesImpl(routesToUse, pathname, basename, true);\n // If we are no longer partially matching anything, this was either a\n // legit splat match above, or it\'s a 404. Also avoid loops if the\n // second pass results in the same partial matches\n if (!newPartialMatches || partialMatches.map(m => m.route.id).join("-") === newPartialMatches.map(m => m.route.id).join("-")) {\n return {\n type: "success",\n matches: matchedSplat ? newMatches : null\n };\n }\n partialMatches = newPartialMatches;\n route = partialMatches[partialMatches.length - 1].route;\n if (route.path === "*") {\n // The splat is still our most accurate partial, so run with it\n return {\n type: "success",\n matches: partialMatches\n };\n }\n }\n }\n function _internalSetRoutes(newRoutes) {\n manifest = {};\n inFlightDataRoutes = convertRoutesToDataRoutes(newRoutes, mapRouteProperties, undefined, manifest);\n }\n function patchRoutes(routeId, children) {\n let isNonHMR = inFlightDataRoutes == null;\n let routesToUse = inFlightDataRoutes || dataRoutes;\n patchRoutesImpl(routeId, children, routesToUse, manifest, mapRouteProperties);\n // If we are not in the middle of an HMR revalidation and we changed the\n // routes, provide a new identity and trigger a reflow via `updateState`\n // to re-run memoized `router.routes` dependencies.\n // HMR will already update the identity and reflow when it lands\n // `inFlightDataRoutes` in `completeNavigation`\n if (isNonHMR) {\n dataRoutes = [...dataRoutes];\n updateState({});\n }\n }\n router = {\n get basename() {\n return basename;\n },\n get future() {\n return future;\n },\n get state() {\n return state;\n },\n get routes() {\n return dataRoutes;\n },\n get window() {\n return routerWindow;\n },\n initialize,\n subscribe,\n enableScrollRestoration,\n navigate,\n fetch,\n revalidate,\n // Passthrough to history-aware createHref used by useHref so we get proper\n // hash-aware URLs in DOM paths\n createHref: to => init.history.createHref(to),\n encodeLocation: to => init.history.encodeLocation(to),\n getFetcher,\n deleteFetcher: deleteFetcherAndUpdateState,\n dispose,\n getBlocker,\n deleteBlocker,\n patchRoutes,\n _internalFetchControllers: fetchControllers,\n _internalActiveDeferreds: activeDeferreds,\n // TODO: Remove setRoutes, it\'s temporary to avoid dealing with\n // updating the tree while validating the update algorithm.\n _internalSetRoutes\n };\n return router;\n}\n//#endregion\n////////////////////////////////////////////////////////////////////////////////\n//#region createStaticHandler\n////////////////////////////////////////////////////////////////////////////////\nconst UNSAFE_DEFERRED_SYMBOL = Symbol("deferred");\nfunction createStaticHandler(routes, opts) {\n invariant(routes.length > 0, "You must provide a non-empty routes array to createStaticHandler");\n let manifest = {};\n let basename = (opts ? opts.basename : null) || "/";\n let mapRouteProperties;\n if (opts != null && opts.mapRouteProperties) {\n mapRouteProperties = opts.mapRouteProperties;\n } else if (opts != null && opts.detectErrorBoundary) {\n // If they are still using the deprecated version, wrap it with the new API\n let detectErrorBoundary = opts.detectErrorBoundary;\n mapRouteProperties = route => ({\n hasErrorBoundary: detectErrorBoundary(route)\n });\n } else {\n mapRouteProperties = defaultMapRouteProperties;\n }\n // Config driven behavior flags\n let future = _extends({\n v7_relativeSplatPath: false,\n v7_throwAbortReason: false\n }, opts ? opts.future : null);\n let dataRoutes = convertRoutesToDataRoutes(routes, mapRouteProperties, undefined, manifest);\n /**\n * The query() method is intended for document requests, in which we want to\n * call an optional action and potentially multiple loaders for all nested\n * routes. It returns a StaticHandlerContext object, which is very similar\n * to the router state (location, loaderData, actionData, errors, etc.) and\n * also adds SSR-specific information such as the statusCode and headers\n * from action/loaders Responses.\n *\n * It _should_ never throw and should report all errors through the\n * returned context.errors object, properly associating errors to their error\n * boundary. Additionally, it tracks _deepestRenderedBoundaryId which can be\n * used to emulate React error boundaries during SSr by performing a second\n * pass only down to the boundaryId.\n *\n * The one exception where we do not return a StaticHandlerContext is when a\n * redirect response is returned or thrown from any action/loader. We\n * propagate that out and return the raw Response so the HTTP server can\n * return it directly.\n *\n * - `opts.requestContext` is an optional server context that will be passed\n * to actions/loaders in the `context` parameter\n * - `opts.skipLoaderErrorBubbling` is an optional parameter that will prevent\n * the bubbling of errors which allows single-fetch-type implementations\n * where the client will handle the bubbling and we may need to return data\n * for the handling route\n */\n async function query(request, _temp3) {\n let {\n requestContext,\n skipLoaderErrorBubbling,\n unstable_dataStrategy\n } = _temp3 === void 0 ? {} : _temp3;\n let url = new URL(request.url);\n let method = request.method;\n let location = createLocation("", createPath(url), null, "default");\n let matches = matchRoutes(dataRoutes, location, basename);\n // SSR supports HEAD requests while SPA doesn\'t\n if (!isValidMethod(method) && method !== "HEAD") {\n let error = getInternalRouterError(405, {\n method\n });\n let {\n matches: methodNotAllowedMatches,\n route\n } = getShortCircuitMatches(dataRoutes);\n return {\n basename,\n location,\n matches: methodNotAllowedMatches,\n loaderData: {},\n actionData: null,\n errors: {\n [route.id]: error\n },\n statusCode: error.status,\n loaderHeaders: {},\n actionHeaders: {},\n activeDeferreds: null\n };\n } else if (!matches) {\n let error = getInternalRouterError(404, {\n pathname: location.pathname\n });\n let {\n matches: notFoundMatches,\n route\n } = getShortCircuitMatches(dataRoutes);\n return {\n basename,\n location,\n matches: notFoundMatches,\n loaderData: {},\n actionData: null,\n errors: {\n [route.id]: error\n },\n statusCode: error.status,\n loaderHeaders: {},\n actionHeaders: {},\n activeDeferreds: null\n };\n }\n let result = await queryImpl(request, location, matches, requestContext, unstable_dataStrategy || null, skipLoaderErrorBubbling === true, null);\n if (isResponse(result)) {\n return result;\n }\n // When returning StaticHandlerContext, we patch back in the location here\n // since we need it for React Context. But this helps keep our submit and\n // loadRouteData operating on a Request instead of a Location\n return _extends({\n location,\n basename\n }, result);\n }\n /**\n * The queryRoute() method is intended for targeted route requests, either\n * for fetch ?_data requests or resource route requests. In this case, we\n * are only ever calling a single action or loader, and we are returning the\n * returned value directly. In most cases, this will be a Response returned\n * from the action/loader, but it may be a primitive or other value as well -\n * and in such cases the calling context should handle that accordingly.\n *\n * We do respect the throw/return differentiation, so if an action/loader\n * throws, then this method will throw the value. This is important so we\n * can do proper boundary identification in Remix where a thrown Response\n * must go to the Catch Boundary but a returned Response is happy-path.\n *\n * One thing to note is that any Router-initiated Errors that make sense\n * to associate with a status code will be thrown as an ErrorResponse\n * instance which include the raw Error, such that the calling context can\n * serialize the error as they see fit while including the proper response\n * code. Examples here are 404 and 405 errors that occur prior to reaching\n * any user-defined loaders.\n *\n * - `opts.routeId` allows you to specify the specific route handler to call.\n * If not provided the handler will determine the proper route by matching\n * against `request.url`\n * - `opts.requestContext` is an optional server context that will be passed\n * to actions/loaders in the `context` parameter\n */\n async function queryRoute(request, _temp4) {\n let {\n routeId,\n requestContext,\n unstable_dataStrategy\n } = _temp4 === void 0 ? {} : _temp4;\n let url = new URL(request.url);\n let method = request.method;\n let location = createLocation("", createPath(url), null, "default");\n let matches = matchRoutes(dataRoutes, location, basename);\n // SSR supports HEAD requests while SPA doesn\'t\n if (!isValidMethod(method) && method !== "HEAD" && method !== "OPTIONS") {\n throw getInternalRouterError(405, {\n method\n });\n } else if (!matches) {\n throw getInternalRouterError(404, {\n pathname: location.pathname\n });\n }\n let match = routeId ? matches.find(m => m.route.id === routeId) : getTargetMatch(matches, location);\n if (routeId && !match) {\n throw getInternalRouterError(403, {\n pathname: location.pathname,\n routeId\n });\n } else if (!match) {\n // This should never hit I don\'t think?\n throw getInternalRouterError(404, {\n pathname: location.pathname\n });\n }\n let result = await queryImpl(request, location, matches, requestContext, unstable_dataStrategy || null, false, match);\n if (isResponse(result)) {\n return result;\n }\n let error = result.errors ? Object.values(result.errors)[0] : undefined;\n if (error !== undefined) {\n // If we got back result.errors, that means the loader/action threw\n // _something_ that wasn\'t a Response, but it\'s not guaranteed/required\n // to be an `instanceof Error` either, so we have to use throw here to\n // preserve the "error" state outside of queryImpl.\n throw error;\n }\n // Pick off the right state value to return\n if (result.actionData) {\n return Object.values(result.actionData)[0];\n }\n if (result.loaderData) {\n var _result$activeDeferre;\n let data = Object.values(result.loaderData)[0];\n if ((_result$activeDeferre = result.activeDeferreds) != null && _result$activeDeferre[match.route.id]) {\n data[UNSAFE_DEFERRED_SYMBOL] = result.activeDeferreds[match.route.id];\n }\n return data;\n }\n return undefined;\n }\n async function queryImpl(request, location, matches, requestContext, unstable_dataStrategy, skipLoaderErrorBubbling, routeMatch) {\n invariant(request.signal, "query()/queryRoute() requests must contain an AbortController signal");\n try {\n if (isMutationMethod(request.method.toLowerCase())) {\n let result = await submit(request, matches, routeMatch || getTargetMatch(matches, location), requestContext, unstable_dataStrategy, skipLoaderErrorBubbling, routeMatch != null);\n return result;\n }\n let result = await loadRouteData(request, matches, requestContext, unstable_dataStrategy, skipLoaderErrorBubbling, routeMatch);\n return isResponse(result) ? result : _extends({}, result, {\n actionData: null,\n actionHeaders: {}\n });\n } catch (e) {\n // If the user threw/returned a Response in callLoaderOrAction for a\n // `queryRoute` call, we throw the `HandlerResult` to bail out early\n // and then return or throw the raw Response here accordingly\n if (isHandlerResult(e) && isResponse(e.result)) {\n if (e.type === ResultType.error) {\n throw e.result;\n }\n return e.result;\n }\n // Redirects are always returned since they don\'t propagate to catch\n // boundaries\n if (isRedirectResponse(e)) {\n return e;\n }\n throw e;\n }\n }\n async function submit(request, matches, actionMatch, requestContext, unstable_dataStrategy, skipLoaderErrorBubbling, isRouteRequest) {\n let result;\n if (!actionMatch.route.action && !actionMatch.route.lazy) {\n let error = getInternalRouterError(405, {\n method: request.method,\n pathname: new URL(request.url).pathname,\n routeId: actionMatch.route.id\n });\n if (isRouteRequest) {\n throw error;\n }\n result = {\n type: ResultType.error,\n error\n };\n } else {\n let results = await callDataStrategy("action", request, [actionMatch], matches, isRouteRequest, requestContext, unstable_dataStrategy);\n result = results[0];\n if (request.signal.aborted) {\n throwStaticHandlerAbortedError(request, isRouteRequest, future);\n }\n }\n if (isRedirectResult(result)) {\n // Uhhhh - this should never happen, we should always throw these from\n // callLoaderOrAction, but the type narrowing here keeps TS happy and we\n // can get back on the "throw all redirect responses" train here should\n // this ever happen :/\n throw new Response(null, {\n status: result.response.status,\n headers: {\n Location: result.response.headers.get("Location")\n }\n });\n }\n if (isDeferredResult(result)) {\n let error = getInternalRouterError(400, {\n type: "defer-action"\n });\n if (isRouteRequest) {\n throw error;\n }\n result = {\n type: ResultType.error,\n error\n };\n }\n if (isRouteRequest) {\n // Note: This should only be non-Response values if we get here, since\n // isRouteRequest should throw any Response received in callLoaderOrAction\n if (isErrorResult(result)) {\n throw result.error;\n }\n return {\n matches: [actionMatch],\n loaderData: {},\n actionData: {\n [actionMatch.route.id]: result.data\n },\n errors: null,\n // Note: statusCode + headers are unused here since queryRoute will\n // return the raw Response or value\n statusCode: 200,\n loaderHeaders: {},\n actionHeaders: {},\n activeDeferreds: null\n };\n }\n // Create a GET request for the loaders\n let loaderRequest = new Request(request.url, {\n headers: request.headers,\n redirect: request.redirect,\n signal: request.signal\n });\n if (isErrorResult(result)) {\n // Store off the pending error - we use it to determine which loaders\n // to call and will commit it when we complete the navigation\n let boundaryMatch = skipLoaderErrorBubbling ? actionMatch : findNearestBoundary(matches, actionMatch.route.id);\n let context = await loadRouteData(loaderRequest, matches, requestContext, unstable_dataStrategy, skipLoaderErrorBubbling, null, [boundaryMatch.route.id, result]);\n // action status codes take precedence over loader status codes\n return _extends({}, context, {\n statusCode: isRouteErrorResponse(result.error) ? result.error.status : result.statusCode != null ? result.statusCode : 500,\n actionData: null,\n actionHeaders: _extends({}, result.headers ? {\n [actionMatch.route.id]: result.headers\n } : {})\n });\n }\n let context = await loadRouteData(loaderRequest, matches, requestContext, unstable_dataStrategy, skipLoaderErrorBubbling, null);\n return _extends({}, context, {\n actionData: {\n [actionMatch.route.id]: result.data\n }\n }, result.statusCode ? {\n statusCode: result.statusCode\n } : {}, {\n actionHeaders: result.headers ? {\n [actionMatch.route.id]: result.headers\n } : {}\n });\n }\n async function loadRouteData(request, matches, requestContext, unstable_dataStrategy, skipLoaderErrorBubbling, routeMatch, pendingActionResult) {\n let isRouteRequest = routeMatch != null;\n // Short circuit if we have no loaders to run (queryRoute())\n if (isRouteRequest && !(routeMatch != null && routeMatch.route.loader) && !(routeMatch != null && routeMatch.route.lazy)) {\n throw getInternalRouterError(400, {\n method: request.method,\n pathname: new URL(request.url).pathname,\n routeId: routeMatch == null ? void 0 : routeMatch.route.id\n });\n }\n let requestMatches = routeMatch ? [routeMatch] : pendingActionResult && isErrorResult(pendingActionResult[1]) ? getLoaderMatchesUntilBoundary(matches, pendingActionResult[0]) : matches;\n let matchesToLoad = requestMatches.filter(m => m.route.loader || m.route.lazy);\n // Short circuit if we have no loaders to run (query())\n if (matchesToLoad.length === 0) {\n return {\n matches,\n // Add a null for all matched routes for proper revalidation on the client\n loaderData: matches.reduce((acc, m) => Object.assign(acc, {\n [m.route.id]: null\n }), {}),\n errors: pendingActionResult && isErrorResult(pendingActionResult[1]) ? {\n [pendingActionResult[0]]: pendingActionResult[1].error\n } : null,\n statusCode: 200,\n loaderHeaders: {},\n activeDeferreds: null\n };\n }\n let results = await callDataStrategy("loader", request, matchesToLoad, matches, isRouteRequest, requestContext, unstable_dataStrategy);\n if (request.signal.aborted) {\n throwStaticHandlerAbortedError(request, isRouteRequest, future);\n }\n // Process and commit output from loaders\n let activeDeferreds = new Map();\n let context = processRouteLoaderData(matches, matchesToLoad, results, pendingActionResult, activeDeferreds, skipLoaderErrorBubbling);\n // Add a null for any non-loader matches for proper revalidation on the client\n let executedLoaders = new Set(matchesToLoad.map(match => match.route.id));\n matches.forEach(match => {\n if (!executedLoaders.has(match.route.id)) {\n context.loaderData[match.route.id] = null;\n }\n });\n return _extends({}, context, {\n matches,\n activeDeferreds: activeDeferreds.size > 0 ? Object.fromEntries(activeDeferreds.entries()) : null\n });\n }\n // Utility wrapper for calling dataStrategy server-side without having to\n // pass around the manifest, mapRouteProperties, etc.\n async function callDataStrategy(type, request, matchesToLoad, matches, isRouteRequest, requestContext, unstable_dataStrategy) {\n let results = await callDataStrategyImpl(unstable_dataStrategy || defaultDataStrategy, type, request, matchesToLoad, matches, manifest, mapRouteProperties, requestContext);\n return await Promise.all(results.map((result, i) => {\n if (isRedirectHandlerResult(result)) {\n let response = result.result;\n // Throw redirects and let the server handle them with an HTTP redirect\n throw normalizeRelativeRoutingRedirectResponse(response, request, matchesToLoad[i].route.id, matches, basename, future.v7_relativeSplatPath);\n }\n if (isResponse(result.result) && isRouteRequest) {\n // For SSR single-route requests, we want to hand Responses back\n // directly without unwrapping\n throw result;\n }\n return convertHandlerResultToDataResult(result);\n }));\n }\n return {\n dataRoutes,\n query,\n queryRoute\n };\n}\n//#endregion\n////////////////////////////////////////////////////////////////////////////////\n//#region Helpers\n////////////////////////////////////////////////////////////////////////////////\n/**\n * Given an existing StaticHandlerContext and an error thrown at render time,\n * provide an updated StaticHandlerContext suitable for a second SSR render\n */\nfunction getStaticContextFromError(routes, context, error) {\n let newContext = _extends({}, context, {\n statusCode: isRouteErrorResponse(error) ? error.status : 500,\n errors: {\n [context._deepestRenderedBoundaryId || routes[0].id]: error\n }\n });\n return newContext;\n}\nfunction throwStaticHandlerAbortedError(request, isRouteRequest, future) {\n if (future.v7_throwAbortReason && request.signal.reason !== undefined) {\n throw request.signal.reason;\n }\n let method = isRouteRequest ? "queryRoute" : "query";\n throw new Error(method + "() call aborted: " + request.method + " " + request.url);\n}\nfunction isSubmissionNavigation(opts) {\n return opts != null && ("formData" in opts && opts.formData != null || "body" in opts && opts.body !== undefined);\n}\nfunction normalizeTo(location, matches, basename, prependBasename, to, v7_relativeSplatPath, fromRouteId, relative) {\n let contextualMatches;\n let activeRouteMatch;\n if (fromRouteId) {\n // Grab matches up to the calling route so our route-relative logic is\n // relative to the correct source route\n contextualMatches = [];\n for (let match of matches) {\n contextualMatches.push(match);\n if (match.route.id === fromRouteId) {\n activeRouteMatch = match;\n break;\n }\n }\n } else {\n contextualMatches = matches;\n activeRouteMatch = matches[matches.length - 1];\n }\n // Resolve the relative path\n let path = resolveTo(to ? to : ".", getResolveToMatches(contextualMatches, v7_relativeSplatPath), stripBasename(location.pathname, basename) || location.pathname, relative === "path");\n // When `to` is not specified we inherit search/hash from the current\n // location, unlike when to="." and we just inherit the path.\n // See https://github.com/remix-run/remix/issues/927\n if (to == null) {\n path.search = location.search;\n path.hash = location.hash;\n }\n // Add an ?index param for matched index routes if we don\'t already have one\n if ((to == null || to === "" || to === ".") && activeRouteMatch && activeRouteMatch.route.index && !hasNakedIndexQuery(path.search)) {\n path.search = path.search ? path.search.replace(/^\\?/, "?index&") : "?index";\n }\n // If we\'re operating within a basename, prepend it to the pathname. If\n // this is a root navigation, then just use the raw basename which allows\n // the basename to have full control over the presence of a trailing slash\n // on root actions\n if (prependBasename && basename !== "/") {\n path.pathname = path.pathname === "/" ? basename : joinPaths([basename, path.pathname]);\n }\n return createPath(path);\n}\n// Normalize navigation options by converting formMethod=GET formData objects to\n// URLSearchParams so they behave identically to links with query params\nfunction normalizeNavigateOptions(normalizeFormMethod, isFetcher, path, opts) {\n // Return location verbatim on non-submission navigations\n if (!opts || !isSubmissionNavigation(opts)) {\n return {\n path\n };\n }\n if (opts.formMethod && !isValidMethod(opts.formMethod)) {\n return {\n path,\n error: getInternalRouterError(405, {\n method: opts.formMethod\n })\n };\n }\n let getInvalidBodyError = () => ({\n path,\n error: getInternalRouterError(400, {\n type: "invalid-body"\n })\n });\n // Create a Submission on non-GET navigations\n let rawFormMethod = opts.formMethod || "get";\n let formMethod = normalizeFormMethod ? rawFormMethod.toUpperCase() : rawFormMethod.toLowerCase();\n let formAction = stripHashFromPath(path);\n if (opts.body !== undefined) {\n if (opts.formEncType === "text/plain") {\n // text only support POST/PUT/PATCH/DELETE submissions\n if (!isMutationMethod(formMethod)) {\n return getInvalidBodyError();\n }\n let text = typeof opts.body === "string" ? opts.body : opts.body instanceof FormData || opts.body instanceof URLSearchParams ?\n // https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#plain-text-form-data\n Array.from(opts.body.entries()).reduce((acc, _ref5) => {\n let [name, value] = _ref5;\n return "" + acc + name + "=" + value + "\\n";\n }, "") : String(opts.body);\n return {\n path,\n submission: {\n formMethod,\n formAction,\n formEncType: opts.formEncType,\n formData: undefined,\n json: undefined,\n text\n }\n };\n } else if (opts.formEncType === "application/json") {\n // json only supports POST/PUT/PATCH/DELETE submissions\n if (!isMutationMethod(formMethod)) {\n return getInvalidBodyError();\n }\n try {\n let json = typeof opts.body === "string" ? JSON.parse(opts.body) : opts.body;\n return {\n path,\n submission: {\n formMethod,\n formAction,\n formEncType: opts.formEncType,\n formData: undefined,\n json,\n text: undefined\n }\n };\n } catch (e) {\n return getInvalidBodyError();\n }\n }\n }\n invariant(typeof FormData === "function", "FormData is not available in this environment");\n let searchParams;\n let formData;\n if (opts.formData) {\n searchParams = convertFormDataToSearchParams(opts.formData);\n formData = opts.formData;\n } else if (opts.body instanceof FormData) {\n searchParams = convertFormDataToSearchParams(opts.body);\n formData = opts.body;\n } else if (opts.body instanceof URLSearchParams) {\n searchParams = opts.body;\n formData = convertSearchParamsToFormData(searchParams);\n } else if (opts.body == null) {\n searchParams = new URLSearchParams();\n formData = new FormData();\n } else {\n try {\n searchParams = new URLSearchParams(opts.body);\n formData = convertSearchParamsToFormData(searchParams);\n } catch (e) {\n return getInvalidBodyError();\n }\n }\n let submission = {\n formMethod,\n formAction,\n formEncType: opts && opts.formEncType || "application/x-www-form-urlencoded",\n formData,\n json: undefined,\n text: undefined\n };\n if (isMutationMethod(submission.formMethod)) {\n return {\n path,\n submission\n };\n }\n // Flatten submission onto URLSearchParams for GET submissions\n let parsedPath = parsePath(path);\n // On GET navigation submissions we can drop the ?index param from the\n // resulting location since all loaders will run. But fetcher GET submissions\n // only run a single loader so we need to preserve any incoming ?index params\n if (isFetcher && parsedPath.search && hasNakedIndexQuery(parsedPath.search)) {\n searchParams.append("index", "");\n }\n parsedPath.search = "?" + searchParams;\n return {\n path: createPath(parsedPath),\n submission\n };\n}\n// Filter out all routes below any caught error as they aren\'t going to\n// render so we don\'t need to load them\nfunction getLoaderMatchesUntilBoundary(matches, boundaryId) {\n let boundaryMatches = matches;\n if (boundaryId) {\n let index = matches.findIndex(m => m.route.id === boundaryId);\n if (index >= 0) {\n boundaryMatches = matches.slice(0, index);\n }\n }\n return boundaryMatches;\n}\nfunction getMatchesToLoad(history, state, matches, submission, location, isInitialLoad, skipActionErrorRevalidation, isRevalidationRequired, cancelledDeferredRoutes, cancelledFetcherLoads, deletedFetchers, fetchLoadMatches, fetchRedirectIds, routesToUse, basename, pendingActionResult) {\n let actionResult = pendingActionResult ? isErrorResult(pendingActionResult[1]) ? pendingActionResult[1].error : pendingActionResult[1].data : undefined;\n let currentUrl = history.createURL(state.location);\n let nextUrl = history.createURL(location);\n // Pick navigation matches that are net-new or qualify for revalidation\n let boundaryId = pendingActionResult && isErrorResult(pendingActionResult[1]) ? pendingActionResult[0] : undefined;\n let boundaryMatches = boundaryId ? getLoaderMatchesUntilBoundary(matches, boundaryId) : matches;\n // Don\'t revalidate loaders by default after action 4xx/5xx responses\n // when the flag is enabled. They can still opt-into revalidation via\n // `shouldRevalidate` via `actionResult`\n let actionStatus = pendingActionResult ? pendingActionResult[1].statusCode : undefined;\n let shouldSkipRevalidation = skipActionErrorRevalidation && actionStatus && actionStatus >= 400;\n let navigationMatches = boundaryMatches.filter((match, index) => {\n let {\n route\n } = match;\n if (route.lazy) {\n // We haven\'t loaded this route yet so we don\'t know if it\'s got a loader!\n return true;\n }\n if (route.loader == null) {\n return false;\n }\n if (isInitialLoad) {\n if (typeof route.loader !== "function" || route.loader.hydrate) {\n return true;\n }\n return state.loaderData[route.id] === undefined && (\n // Don\'t re-run if the loader ran and threw an error\n !state.errors || state.errors[route.id] === undefined);\n }\n // Always call the loader on new route instances and pending defer cancellations\n if (isNewLoader(state.loaderData, state.matches[index], match) || cancelledDeferredRoutes.some(id => id === match.route.id)) {\n return true;\n }\n // This is the default implementation for when we revalidate. If the route\n // provides it\'s own implementation, then we give them full control but\n // provide this value so they can leverage it if needed after they check\n // their own specific use cases\n let currentRouteMatch = state.matches[index];\n let nextRouteMatch = match;\n return shouldRevalidateLoader(match, _extends({\n currentUrl,\n currentParams: currentRouteMatch.params,\n nextUrl,\n nextParams: nextRouteMatch.params\n }, submission, {\n actionResult,\n unstable_actionStatus: actionStatus,\n defaultShouldRevalidate: shouldSkipRevalidation ? false :\n // Forced revalidation due to submission, useRevalidator, or X-Remix-Revalidate\n isRevalidationRequired || currentUrl.pathname + currentUrl.search === nextUrl.pathname + nextUrl.search ||\n // Search params affect all loaders\n currentUrl.search !== nextUrl.search || isNewRouteInstance(currentRouteMatch, nextRouteMatch)\n }));\n });\n // Pick fetcher.loads that need to be revalidated\n let revalidatingFetchers = [];\n fetchLoadMatches.forEach((f, key) => {\n // Don\'t revalidate:\n // - on initial load (shouldn\'t be any fetchers then anyway)\n // - if fetcher won\'t be present in the subsequent render\n // - no longer matches the URL (v7_fetcherPersist=false)\n // - was unmounted but persisted due to v7_fetcherPersist=true\n if (isInitialLoad || !matches.some(m => m.route.id === f.routeId) || deletedFetchers.has(key)) {\n return;\n }\n let fetcherMatches = matchRoutes(routesToUse, f.path, basename);\n // If the fetcher path no longer matches, push it in with null matches so\n // we can trigger a 404 in callLoadersAndMaybeResolveData. Note this is\n // currently only a use-case for Remix HMR where the route tree can change\n // at runtime and remove a route previously loaded via a fetcher\n if (!fetcherMatches) {\n revalidatingFetchers.push({\n key,\n routeId: f.routeId,\n path: f.path,\n matches: null,\n match: null,\n controller: null\n });\n return;\n }\n // Revalidating fetchers are decoupled from the route matches since they\n // load from a static href. They revalidate based on explicit revalidation\n // (submission, useRevalidator, or X-Remix-Revalidate)\n let fetcher = state.fetchers.get(key);\n let fetcherMatch = getTargetMatch(fetcherMatches, f.path);\n let shouldRevalidate = false;\n if (fetchRedirectIds.has(key)) {\n // Never trigger a revalidation of an actively redirecting fetcher\n shouldRevalidate = false;\n } else if (cancelledFetcherLoads.includes(key)) {\n // Always revalidate if the fetcher was cancelled\n shouldRevalidate = true;\n } else if (fetcher && fetcher.state !== "idle" && fetcher.data === undefined) {\n // If the fetcher hasn\'t ever completed loading yet, then this isn\'t a\n // revalidation, it would just be a brand new load if an explicit\n // revalidation is required\n shouldRevalidate = isRevalidationRequired;\n } else {\n // Otherwise fall back on any user-defined shouldRevalidate, defaulting\n // to explicit revalidations only\n shouldRevalidate = shouldRevalidateLoader(fetcherMatch, _extends({\n currentUrl,\n currentParams: state.matches[state.matches.length - 1].params,\n nextUrl,\n nextParams: matches[matches.length - 1].params\n }, submission, {\n actionResult,\n unstable_actionStatus: actionStatus,\n defaultShouldRevalidate: shouldSkipRevalidation ? false : isRevalidationRequired\n }));\n }\n if (shouldRevalidate) {\n revalidatingFetchers.push({\n key,\n routeId: f.routeId,\n path: f.path,\n matches: fetcherMatches,\n match: fetcherMatch,\n controller: new AbortController()\n });\n }\n });\n return [navigationMatches, revalidatingFetchers];\n}\nfunction isNewLoader(currentLoaderData, currentMatch, match) {\n let isNew =\n // [a] -> [a, b]\n !currentMatch ||\n // [a, b] -> [a, c]\n match.route.id !== currentMatch.route.id;\n // Handle the case that we don\'t have data for a re-used route, potentially\n // from a prior error or from a cancelled pending deferred\n let isMissingData = currentLoaderData[match.route.id] === undefined;\n // Always load if this is a net-new route or we don\'t yet have data\n return isNew || isMissingData;\n}\nfunction isNewRouteInstance(currentMatch, match) {\n let currentPath = currentMatch.route.path;\n return (\n // param change for this match, /users/123 -> /users/456\n currentMatch.pathname !== match.pathname ||\n // splat param changed, which is not present in match.path\n // e.g. /files/images/avatar.jpg -> files/finances.xls\n currentPath != null && currentPath.endsWith("*") && currentMatch.params["*"] !== match.params["*"]\n );\n}\nfunction shouldRevalidateLoader(loaderMatch, arg) {\n if (loaderMatch.route.shouldRevalidate) {\n let routeChoice = loaderMatch.route.shouldRevalidate(arg);\n if (typeof routeChoice === "boolean") {\n return routeChoice;\n }\n }\n return arg.defaultShouldRevalidate;\n}\n/**\n * Idempotent utility to execute patchRoutesOnMiss() to lazily load route\n * definitions and update the routes/routeManifest\n */\nasync function loadLazyRouteChildren(patchRoutesOnMissImpl, path, matches, routes, manifest, mapRouteProperties, pendingRouteChildren, signal) {\n let key = [path, ...matches.map(m => m.route.id)].join("-");\n try {\n let pending = pendingRouteChildren.get(key);\n if (!pending) {\n pending = patchRoutesOnMissImpl({\n path,\n matches,\n patch: (routeId, children) => {\n if (!signal.aborted) {\n patchRoutesImpl(routeId, children, routes, manifest, mapRouteProperties);\n }\n }\n });\n pendingRouteChildren.set(key, pending);\n }\n if (pending && isPromise(pending)) {\n await pending;\n }\n } finally {\n pendingRouteChildren.delete(key);\n }\n}\nfunction patchRoutesImpl(routeId, children, routesToUse, manifest, mapRouteProperties) {\n if (routeId) {\n var _route$children;\n let route = manifest[routeId];\n invariant(route, "No route found to patch children into: routeId = " + routeId);\n let dataChildren = convertRoutesToDataRoutes(children, mapRouteProperties, [routeId, "patch", String(((_route$children = route.children) == null ? void 0 : _route$children.length) || "0")], manifest);\n if (route.children) {\n route.children.push(...dataChildren);\n } else {\n route.children = dataChildren;\n }\n } else {\n let dataChildren = convertRoutesToDataRoutes(children, mapRouteProperties, ["patch", String(routesToUse.length || "0")], manifest);\n routesToUse.push(...dataChildren);\n }\n}\n/**\n * Execute route.lazy() methods to lazily load route modules (loader, action,\n * shouldRevalidate) and update the routeManifest in place which shares objects\n * with dataRoutes so those get updated as well.\n */\nasync function loadLazyRouteModule(route, mapRouteProperties, manifest) {\n if (!route.lazy) {\n return;\n }\n let lazyRoute = await route.lazy();\n // If the lazy route function was executed and removed by another parallel\n // call then we can return - first lazy() to finish wins because the return\n // value of lazy is expected to be static\n if (!route.lazy) {\n return;\n }\n let routeToUpdate = manifest[route.id];\n invariant(routeToUpdate, "No route found in manifest");\n // Update the route in place. This should be safe because there\'s no way\n // we could yet be sitting on this route as we can\'t get there without\n // resolving lazy() first.\n //\n // This is different than the HMR "update" use-case where we may actively be\n // on the route being updated. The main concern boils down to "does this\n // mutation affect any ongoing navigations or any current state.matches\n // values?". If not, it should be safe to update in place.\n let routeUpdates = {};\n for (let lazyRouteProperty in lazyRoute) {\n let staticRouteValue = routeToUpdate[lazyRouteProperty];\n let isPropertyStaticallyDefined = staticRouteValue !== undefined &&\n // This property isn\'t static since it should always be updated based\n // on the route updates\n lazyRouteProperty !== "hasErrorBoundary";\n warning(!isPropertyStaticallyDefined, "Route \\"" + routeToUpdate.id + "\\" has a static property \\"" + lazyRouteProperty + "\\" " + "defined but its lazy function is also returning a value for this property. " + ("The lazy route property \\"" + lazyRouteProperty + "\\" will be ignored."));\n if (!isPropertyStaticallyDefined && !immutableRouteKeys.has(lazyRouteProperty)) {\n routeUpdates[lazyRouteProperty] = lazyRoute[lazyRouteProperty];\n }\n }\n // Mutate the route with the provided updates. Do this first so we pass\n // the updated version to mapRouteProperties\n Object.assign(routeToUpdate, routeUpdates);\n // Mutate the `hasErrorBoundary` property on the route based on the route\n // updates and remove the `lazy` function so we don\'t resolve the lazy\n // route again.\n Object.assign(routeToUpdate, _extends({}, mapRouteProperties(routeToUpdate), {\n lazy: undefined\n }));\n}\n// Default implementation of `dataStrategy` which fetches all loaders in parallel\nfunction defaultDataStrategy(opts) {\n return Promise.all(opts.matches.map(m => m.resolve()));\n}\nasync function callDataStrategyImpl(dataStrategyImpl, type, request, matchesToLoad, matches, manifest, mapRouteProperties, requestContext) {\n let routeIdsToLoad = matchesToLoad.reduce((acc, m) => acc.add(m.route.id), new Set());\n let loadedMatches = new Set();\n // Send all matches here to allow for a middleware-type implementation.\n // handler will be a no-op for unneeded routes and we filter those results\n // back out below.\n let results = await dataStrategyImpl({\n matches: matches.map(match => {\n let shouldLoad = routeIdsToLoad.has(match.route.id);\n // `resolve` encapsulates the route.lazy, executing the\n // loader/action, and mapping return values/thrown errors to a\n // HandlerResult. Users can pass a callback to take fine-grained control\n // over the execution of the loader/action\n let resolve = handlerOverride => {\n loadedMatches.add(match.route.id);\n return shouldLoad ? callLoaderOrAction(type, request, match, manifest, mapRouteProperties, handlerOverride, requestContext) : Promise.resolve({\n type: ResultType.data,\n result: undefined\n });\n };\n return _extends({}, match, {\n shouldLoad,\n resolve\n });\n }),\n request,\n params: matches[0].params,\n context: requestContext\n });\n // Throw if any loadRoute implementations not called since they are what\n // ensures a route is fully loaded\n matches.forEach(m => invariant(loadedMatches.has(m.route.id), "`match.resolve()` was not called for route id \\"" + m.route.id + "\\". " + "You must call `match.resolve()` on every match passed to " + "`dataStrategy` to ensure all routes are properly loaded."));\n // Filter out any middleware-only matches for which we didn\'t need to run handlers\n return results.filter((_, i) => routeIdsToLoad.has(matches[i].route.id));\n}\n// Default logic for calling a loader/action is the user has no specified a dataStrategy\nasync function callLoaderOrAction(type, request, match, manifest, mapRouteProperties, handlerOverride, staticContext) {\n let result;\n let onReject;\n let runHandler = handler => {\n // Setup a promise we can race against so that abort signals short circuit\n let reject;\n // This will never resolve so safe to type it as Promise<HandlerResult> to\n // satisfy the function return value\n let abortPromise = new Promise((_, r) => reject = r);\n onReject = () => reject();\n request.signal.addEventListener("abort", onReject);\n let actualHandler = ctx => {\n if (typeof handler !== "function") {\n return Promise.reject(new Error("You cannot call the handler for a route which defines a boolean " + ("\\"" + type + "\\" [routeId: " + match.route.id + "]")));\n }\n return handler({\n request,\n params: match.params,\n context: staticContext\n }, ...(ctx !== undefined ? [ctx] : []));\n };\n let handlerPromise;\n if (handlerOverride) {\n handlerPromise = handlerOverride(ctx => actualHandler(ctx));\n } else {\n handlerPromise = (async () => {\n try {\n let val = await actualHandler();\n return {\n type: "data",\n result: val\n };\n } catch (e) {\n return {\n type: "error",\n result: e\n };\n }\n })();\n }\n return Promise.race([handlerPromise, abortPromise]);\n };\n try {\n let handler = match.route[type];\n if (match.route.lazy) {\n if (handler) {\n // Run statically defined handler in parallel with lazy()\n let handlerError;\n let [value] = await Promise.all([\n // If the handler throws, don\'t let it immediately bubble out,\n // since we need to let the lazy() execution finish so we know if this\n // route has a boundary that can handle the error\n runHandler(handler).catch(e => {\n handlerError = e;\n }), loadLazyRouteModule(match.route, mapRouteProperties, manifest)]);\n if (handlerError !== undefined) {\n throw handlerError;\n }\n result = value;\n } else {\n // Load lazy route module, then run any returned handler\n await loadLazyRouteModule(match.route, mapRouteProperties, manifest);\n handler = match.route[type];\n if (handler) {\n // Handler still runs even if we got interrupted to maintain consistency\n // with un-abortable behavior of handler execution on non-lazy or\n // previously-lazy-loaded routes\n result = await runHandler(handler);\n } else if (type === "action") {\n let url = new URL(request.url);\n let pathname = url.pathname + url.search;\n throw getInternalRouterError(405, {\n method: request.method,\n pathname,\n routeId: match.route.id\n });\n } else {\n // lazy() route has no loader to run. Short circuit here so we don\'t\n // hit the invariant below that errors on returning undefined.\n return {\n type: ResultType.data,\n result: undefined\n };\n }\n }\n } else if (!handler) {\n let url = new URL(request.url);\n let pathname = url.pathname + url.search;\n throw getInternalRouterError(404, {\n pathname\n });\n } else {\n result = await runHandler(handler);\n }\n invariant(result.result !== undefined, "You defined " + (type === "action" ? "an action" : "a loader") + " for route " + ("\\"" + match.route.id + "\\" but didn\'t return anything from your `" + type + "` ") + "function. Please return a value or `null`.");\n } catch (e) {\n // We should already be catching and converting normal handler executions to\n // HandlerResults and returning them, so anything that throws here is an\n // unexpected error we still need to wrap\n return {\n type: ResultType.error,\n result: e\n };\n } finally {\n if (onReject) {\n request.signal.removeEventListener("abort", onReject);\n }\n }\n return result;\n}\nasync function convertHandlerResultToDataResult(handlerResult) {\n let {\n result,\n type,\n status\n } = handlerResult;\n if (isResponse(result)) {\n let data;\n try {\n let contentType = result.headers.get("Content-Type");\n // Check between word boundaries instead of startsWith() due to the last\n // paragraph of https://httpwg.org/specs/rfc9110.html#field.content-type\n if (contentType && /\\bapplication\\/json\\b/.test(contentType)) {\n if (result.body == null) {\n data = null;\n } else {\n data = await result.json();\n }\n } else {\n data = await result.text();\n }\n } catch (e) {\n return {\n type: ResultType.error,\n error: e\n };\n }\n if (type === ResultType.error) {\n return {\n type: ResultType.error,\n error: new ErrorResponseImpl(result.status, result.statusText, data),\n statusCode: result.status,\n headers: result.headers\n };\n }\n return {\n type: ResultType.data,\n data,\n statusCode: result.status,\n headers: result.headers\n };\n }\n if (type === ResultType.error) {\n return {\n type: ResultType.error,\n error: result,\n statusCode: isRouteErrorResponse(result) ? result.status : status\n };\n }\n if (isDeferredData(result)) {\n var _result$init, _result$init2;\n return {\n type: ResultType.deferred,\n deferredData: result,\n statusCode: (_result$init = result.init) == null ? void 0 : _result$init.status,\n headers: ((_result$init2 = result.init) == null ? void 0 : _result$init2.headers) && new Headers(result.init.headers)\n };\n }\n return {\n type: ResultType.data,\n data: result,\n statusCode: status\n };\n}\n// Support relative routing in internal redirects\nfunction normalizeRelativeRoutingRedirectResponse(response, request, routeId, matches, basename, v7_relativeSplatPath) {\n let location = response.headers.get("Location");\n invariant(location, "Redirects returned/thrown from loaders/actions must have a Location header");\n if (!ABSOLUTE_URL_REGEX.test(location)) {\n let trimmedMatches = matches.slice(0, matches.findIndex(m => m.route.id === routeId) + 1);\n location = normalizeTo(new URL(request.url), trimmedMatches, basename, true, location, v7_relativeSplatPath);\n response.headers.set("Location", location);\n }\n return response;\n}\nfunction normalizeRedirectLocation(location, currentUrl, basename) {\n if (ABSOLUTE_URL_REGEX.test(location)) {\n // Strip off the protocol+origin for same-origin + same-basename absolute redirects\n let normalizedLocation = location;\n let url = normalizedLocation.startsWith("//") ? new URL(currentUrl.protocol + normalizedLocation) : new URL(normalizedLocation);\n let isSameBasename = stripBasename(url.pathname, basename) != null;\n if (url.origin === currentUrl.origin && isSameBasename) {\n return url.pathname + url.search + url.hash;\n }\n }\n return location;\n}\n// Utility method for creating the Request instances for loaders/actions during\n// client-side navigations and fetches. During SSR we will always have a\n// Request instance from the static handler (query/queryRoute)\nfunction createClientSideRequest(history, location, signal, submission) {\n let url = history.createURL(stripHashFromPath(location)).toString();\n let init = {\n signal\n };\n if (submission && isMutationMethod(submission.formMethod)) {\n let {\n formMethod,\n formEncType\n } = submission;\n // Didn\'t think we needed this but it turns out unlike other methods, patch\n // won\'t be properly normalized to uppercase and results in a 405 error.\n // See: https://fetch.spec.whatwg.org/#concept-method\n init.method = formMethod.toUpperCase();\n if (formEncType === "application/json") {\n init.headers = new Headers({\n "Content-Type": formEncType\n });\n init.body = JSON.stringify(submission.json);\n } else if (formEncType === "text/plain") {\n // Content-Type is inferred (https://fetch.spec.whatwg.org/#dom-request)\n init.body = submission.text;\n } else if (formEncType === "application/x-www-form-urlencoded" && submission.formData) {\n // Content-Type is inferred (https://fetch.spec.whatwg.org/#dom-request)\n init.body = convertFormDataToSearchParams(submission.formData);\n } else {\n // Content-Type is inferred (https://fetch.spec.whatwg.org/#dom-request)\n init.body = submission.formData;\n }\n }\n return new Request(url, init);\n}\nfunction convertFormDataToSearchParams(formData) {\n let searchParams = new URLSearchParams();\n for (let [key, value] of formData.entries()) {\n // https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#converting-an-entry-list-to-a-list-of-name-value-pairs\n searchParams.append(key, typeof value === "string" ? value : value.name);\n }\n return searchParams;\n}\nfunction convertSearchParamsToFormData(searchParams) {\n let formData = new FormData();\n for (let [key, value] of searchParams.entries()) {\n formData.append(key, value);\n }\n return formData;\n}\nfunction processRouteLoaderData(matches, matchesToLoad, results, pendingActionResult, activeDeferreds, skipLoaderErrorBubbling) {\n // Fill in loaderData/errors from our loaders\n let loaderData = {};\n let errors = null;\n let statusCode;\n let foundError = false;\n let loaderHeaders = {};\n let pendingError = pendingActionResult && isErrorResult(pendingActionResult[1]) ? pendingActionResult[1].error : undefined;\n // Process loader results into state.loaderData/state.errors\n results.forEach((result, index) => {\n let id = matchesToLoad[index].route.id;\n invariant(!isRedirectResult(result), "Cannot handle redirect results in processLoaderData");\n if (isErrorResult(result)) {\n let error = result.error;\n // If we have a pending action error, we report it at the highest-route\n // that throws a loader error, and then clear it out to indicate that\n // it was consumed\n if (pendingError !== undefined) {\n error = pendingError;\n pendingError = undefined;\n }\n errors = errors || {};\n if (skipLoaderErrorBubbling) {\n errors[id] = error;\n } else {\n // Look upwards from the matched route for the closest ancestor error\n // boundary, defaulting to the root match. Prefer higher error values\n // if lower errors bubble to the same boundary\n let boundaryMatch = findNearestBoundary(matches, id);\n if (errors[boundaryMatch.route.id] == null) {\n errors[boundaryMatch.route.id] = error;\n }\n }\n // Clear our any prior loaderData for the throwing route\n loaderData[id] = undefined;\n // Once we find our first (highest) error, we set the status code and\n // prevent deeper status codes from overriding\n if (!foundError) {\n foundError = true;\n statusCode = isRouteErrorResponse(result.error) ? result.error.status : 500;\n }\n if (result.headers) {\n loaderHeaders[id] = result.headers;\n }\n } else {\n if (isDeferredResult(result)) {\n activeDeferreds.set(id, result.deferredData);\n loaderData[id] = result.deferredData.data;\n // Error status codes always override success status codes, but if all\n // loaders are successful we take the deepest status code.\n if (result.statusCode != null && result.statusCode !== 200 && !foundError) {\n statusCode = result.statusCode;\n }\n if (result.headers) {\n loaderHeaders[id] = result.headers;\n }\n } else {\n loaderData[id] = result.data;\n // Error status codes always override success status codes, but if all\n // loaders are successful we take the deepest status code.\n if (result.statusCode && result.statusCode !== 200 && !foundError) {\n statusCode = result.statusCode;\n }\n if (result.headers) {\n loaderHeaders[id] = result.headers;\n }\n }\n }\n });\n // If we didn\'t consume the pending action error (i.e., all loaders\n // resolved), then consume it here. Also clear out any loaderData for the\n // throwing route\n if (pendingError !== undefined && pendingActionResult) {\n errors = {\n [pendingActionResult[0]]: pendingError\n };\n loaderData[pendingActionResult[0]] = undefined;\n }\n return {\n loaderData,\n errors,\n statusCode: statusCode || 200,\n loaderHeaders\n };\n}\nfunction processLoaderData(state, matches, matchesToLoad, results, pendingActionResult, revalidatingFetchers, fetcherResults, activeDeferreds) {\n let {\n loaderData,\n errors\n } = processRouteLoaderData(matches, matchesToLoad, results, pendingActionResult, activeDeferreds, false // This method is only called client side so we always want to bubble\n );\n // Process results from our revalidating fetchers\n for (let index = 0; index < revalidatingFetchers.length; index++) {\n let {\n key,\n match,\n controller\n } = revalidatingFetchers[index];\n invariant(fetcherResults !== undefined && fetcherResults[index] !== undefined, "Did not find corresponding fetcher result");\n let result = fetcherResults[index];\n // Process fetcher non-redirect errors\n if (controller && controller.signal.aborted) {\n // Nothing to do for aborted fetchers\n continue;\n } else if (isErrorResult(result)) {\n let boundaryMatch = findNearestBoundary(state.matches, match == null ? void 0 : match.route.id);\n if (!(errors && errors[boundaryMatch.route.id])) {\n errors = _extends({}, errors, {\n [boundaryMatch.route.id]: result.error\n });\n }\n state.fetchers.delete(key);\n } else if (isRedirectResult(result)) {\n // Should never get here, redirects should get processed above, but we\n // keep this to type narrow to a success result in the else\n invariant(false, "Unhandled fetcher revalidation redirect");\n } else if (isDeferredResult(result)) {\n // Should never get here, deferred data should be awaited for fetchers\n // in resolveDeferredResults\n invariant(false, "Unhandled fetcher deferred data");\n } else {\n let doneFetcher = getDoneFetcher(result.data);\n state.fetchers.set(key, doneFetcher);\n }\n }\n return {\n loaderData,\n errors\n };\n}\nfunction mergeLoaderData(loaderData, newLoaderData, matches, errors) {\n let mergedLoaderData = _extends({}, newLoaderData);\n for (let match of matches) {\n let id = match.route.id;\n if (newLoaderData.hasOwnProperty(id)) {\n if (newLoaderData[id] !== undefined) {\n mergedLoaderData[id] = newLoaderData[id];\n }\n } else if (loaderData[id] !== undefined && match.route.loader) {\n // Preserve existing keys not included in newLoaderData and where a loader\n // wasn\'t removed by HMR\n mergedLoaderData[id] = loaderData[id];\n }\n if (errors && errors.hasOwnProperty(id)) {\n // Don\'t keep any loader data below the boundary\n break;\n }\n }\n return mergedLoaderData;\n}\nfunction getActionDataForCommit(pendingActionResult) {\n if (!pendingActionResult) {\n return {};\n }\n return isErrorResult(pendingActionResult[1]) ? {\n // Clear out prior actionData on errors\n actionData: {}\n } : {\n actionData: {\n [pendingActionResult[0]]: pendingActionResult[1].data\n }\n };\n}\n// Find the nearest error boundary, looking upwards from the leaf route (or the\n// route specified by routeId) for the closest ancestor error boundary,\n// defaulting to the root match\nfunction findNearestBoundary(matches, routeId) {\n let eligibleMatches = routeId ? matches.slice(0, matches.findIndex(m => m.route.id === routeId) + 1) : [...matches];\n return eligibleMatches.reverse().find(m => m.route.hasErrorBoundary === true) || matches[0];\n}\nfunction getShortCircuitMatches(routes) {\n // Prefer a root layout route if present, otherwise shim in a route object\n let route = routes.length === 1 ? routes[0] : routes.find(r => r.index || !r.path || r.path === "/") || {\n id: "__shim-error-route__"\n };\n return {\n matches: [{\n params: {},\n pathname: "",\n pathnameBase: "",\n route\n }],\n route\n };\n}\nfunction getInternalRouterError(status, _temp5) {\n let {\n pathname,\n routeId,\n method,\n type,\n message\n } = _temp5 === void 0 ? {} : _temp5;\n let statusText = "Unknown Server Error";\n let errorMessage = "Unknown @remix-run/router error";\n if (status === 400) {\n statusText = "Bad Request";\n if (type === "route-discovery") {\n errorMessage = "Unable to match URL \\"" + pathname + "\\" - the `children()` function for " + ("route `" + routeId + "` threw the following error:\\n" + message);\n } else if (method && pathname && routeId) {\n errorMessage = "You made a " + method + " request to \\"" + pathname + "\\" but " + ("did not provide a `loader` for route \\"" + routeId + "\\", ") + "so there is no way to handle the request.";\n } else if (type === "defer-action") {\n errorMessage = "defer() is not supported in actions";\n } else if (type === "invalid-body") {\n errorMessage = "Unable to encode submission body";\n }\n } else if (status === 403) {\n statusText = "Forbidden";\n errorMessage = "Route \\"" + routeId + "\\" does not match URL \\"" + pathname + "\\"";\n } else if (status === 404) {\n statusText = "Not Found";\n errorMessage = "No route matches URL \\"" + pathname + "\\"";\n } else if (status === 405) {\n statusText = "Method Not Allowed";\n if (method && pathname && routeId) {\n errorMessage = "You made a " + method.toUpperCase() + " request to \\"" + pathname + "\\" but " + ("did not provide an `action` for route \\"" + routeId + "\\", ") + "so there is no way to handle the request.";\n } else if (method) {\n errorMessage = "Invalid request method \\"" + method.toUpperCase() + "\\"";\n }\n }\n return new ErrorResponseImpl(status || 500, statusText, new Error(errorMessage), true);\n}\n// Find any returned redirect errors, starting from the lowest match\nfunction findRedirect(results) {\n for (let i = results.length - 1; i >= 0; i--) {\n let result = results[i];\n if (isRedirectResult(result)) {\n return {\n result,\n idx: i\n };\n }\n }\n}\nfunction stripHashFromPath(path) {\n let parsedPath = typeof path === "string" ? parsePath(path) : path;\n return createPath(_extends({}, parsedPath, {\n hash: ""\n }));\n}\nfunction isHashChangeOnly(a, b) {\n if (a.pathname !== b.pathname || a.search !== b.search) {\n return false;\n }\n if (a.hash === "") {\n // /page -> /page#hash\n return b.hash !== "";\n } else if (a.hash === b.hash) {\n // /page#hash -> /page#hash\n return true;\n } else if (b.hash !== "") {\n // /page#hash -> /page#other\n return true;\n }\n // If the hash is removed the browser will re-perform a request to the server\n // /page#hash -> /page\n return false;\n}\nfunction isPromise(val) {\n return typeof val === "object" && val != null && "then" in val;\n}\nfunction isHandlerResult(result) {\n return result != null && typeof result === "object" && "type" in result && "result" in result && (result.type === ResultType.data || result.type === ResultType.error);\n}\nfunction isRedirectHandlerResult(result) {\n return isResponse(result.result) && redirectStatusCodes.has(result.result.status);\n}\nfunction isDeferredResult(result) {\n return result.type === ResultType.deferred;\n}\nfunction isErrorResult(result) {\n return result.type === ResultType.error;\n}\nfunction isRedirectResult(result) {\n return (result && result.type) === ResultType.redirect;\n}\nfunction isDeferredData(value) {\n let deferred = value;\n return deferred && typeof deferred === "object" && typeof deferred.data === "object" && typeof deferred.subscribe === "function" && typeof deferred.cancel === "function" && typeof deferred.resolveData === "function";\n}\nfunction isResponse(value) {\n return value != null && typeof value.status === "number" && typeof value.statusText === "string" && typeof value.headers === "object" && typeof value.body !== "undefined";\n}\nfunction isRedirectResponse(result) {\n if (!isResponse(result)) {\n return false;\n }\n let status = result.status;\n let location = result.headers.get("Location");\n return status >= 300 && status <= 399 && location != null;\n}\nfunction isValidMethod(method) {\n return validRequestMethods.has(method.toLowerCase());\n}\nfunction isMutationMethod(method) {\n return validMutationMethods.has(method.toLowerCase());\n}\nasync function resolveDeferredResults(currentMatches, matchesToLoad, results, signals, isFetcher, currentLoaderData) {\n for (let index = 0; index < results.length; index++) {\n let result = results[index];\n let match = matchesToLoad[index];\n // If we don\'t have a match, then we can have a deferred result to do\n // anything with. This is for revalidating fetchers where the route was\n // removed during HMR\n if (!match) {\n continue;\n }\n let currentMatch = currentMatches.find(m => m.route.id === match.route.id);\n let isRevalidatingLoader = currentMatch != null && !isNewRouteInstance(currentMatch, match) && (currentLoaderData && currentLoaderData[match.route.id]) !== undefined;\n if (isDeferredResult(result) && (isFetcher || isRevalidatingLoader)) {\n // Note: we do not have to touch activeDeferreds here since we race them\n // against the signal in resolveDeferredData and they\'ll get aborted\n // there if needed\n let signal = signals[index];\n invariant(signal, "Expected an AbortSignal for revalidating fetcher deferred result");\n await resolveDeferredData(result, signal, isFetcher).then(result => {\n if (result) {\n results[index] = result || results[index];\n }\n });\n }\n }\n}\nasync function resolveDeferredData(result, signal, unwrap) {\n if (unwrap === void 0) {\n unwrap = false;\n }\n let aborted = await result.deferredData.resolveData(signal);\n if (aborted) {\n return;\n }\n if (unwrap) {\n try {\n return {\n type: ResultType.data,\n data: result.deferredData.unwrappedData\n };\n } catch (e) {\n // Handle any TrackedPromise._error values encountered while unwrapping\n return {\n type: ResultType.error,\n error: e\n };\n }\n }\n return {\n type: ResultType.data,\n data: result.deferredData.data\n };\n}\nfunction hasNakedIndexQuery(search) {\n return new URLSearchParams(search).getAll("index").some(v => v === "");\n}\nfunction getTargetMatch(matches, location) {\n let search = typeof location === "string" ? parsePath(location).search : location.search;\n if (matches[matches.length - 1].route.index && hasNakedIndexQuery(search || "")) {\n // Return the leaf index route when index is present\n return matches[matches.length - 1];\n }\n // Otherwise grab the deepest "path contributing" match (ignoring index and\n // pathless layout routes)\n let pathMatches = getPathContributingMatches(matches);\n return pathMatches[pathMatches.length - 1];\n}\nfunction getSubmissionFromNavigation(navigation) {\n let {\n formMethod,\n formAction,\n formEncType,\n text,\n formData,\n json\n } = navigation;\n if (!formMethod || !formAction || !formEncType) {\n return;\n }\n if (text != null) {\n return {\n formMethod,\n formAction,\n formEncType,\n formData: undefined,\n json: undefined,\n text\n };\n } else if (formData != null) {\n return {\n formMethod,\n formAction,\n formEncType,\n formData,\n json: undefined,\n text: undefined\n };\n } else if (json !== undefined) {\n return {\n formMethod,\n formAction,\n formEncType,\n formData: undefined,\n json,\n text: undefined\n };\n }\n}\nfunction getLoadingNavigation(location, submission) {\n if (submission) {\n let navigation = {\n state: "loading",\n location,\n formMethod: submission.formMethod,\n formAction: submission.formAction,\n formEncType: submission.formEncType,\n formData: submission.formData,\n json: submission.json,\n text: submission.text\n };\n return navigation;\n } else {\n let navigation = {\n state: "loading",\n location,\n formMethod: undefined,\n formAction: undefined,\n formEncType: undefined,\n formData: undefined,\n json: undefined,\n text: undefined\n };\n return navigation;\n }\n}\nfunction getSubmittingNavigation(location, submission) {\n let navigation = {\n state: "submitting",\n location,\n formMethod: submission.formMethod,\n formAction: submission.formAction,\n formEncType: submission.formEncType,\n formData: submission.formData,\n json: submission.json,\n text: submission.text\n };\n return navigation;\n}\nfunction getLoadingFetcher(submission, data) {\n if (submission) {\n let fetcher = {\n state: "loading",\n formMethod: submission.formMethod,\n formAction: submission.formAction,\n formEncType: submission.formEncType,\n formData: submission.formData,\n json: submission.json,\n text: submission.text,\n data\n };\n return fetcher;\n } else {\n let fetcher = {\n state: "loading",\n formMethod: undefined,\n formAction: undefined,\n formEncType: undefined,\n formData: undefined,\n json: undefined,\n text: undefined,\n data\n };\n return fetcher;\n }\n}\nfunction getSubmittingFetcher(submission, existingFetcher) {\n let fetcher = {\n state: "submitting",\n formMethod: submission.formMethod,\n formAction: submission.formAction,\n formEncType: submission.formEncType,\n formData: submission.formData,\n json: submission.json,\n text: submission.text,\n data: existingFetcher ? existingFetcher.data : undefined\n };\n return fetcher;\n}\nfunction getDoneFetcher(data) {\n let fetcher = {\n state: "idle",\n formMethod: undefined,\n formAction: undefined,\n formEncType: undefined,\n formData: undefined,\n json: undefined,\n text: undefined,\n data\n };\n return fetcher;\n}\nfunction restoreAppliedTransitions(_window, transitions) {\n try {\n let sessionPositions = _window.sessionStorage.getItem(TRANSITIONS_STORAGE_KEY);\n if (sessionPositions) {\n let json = JSON.parse(sessionPositions);\n for (let [k, v] of Object.entries(json || {})) {\n if (v && Array.isArray(v)) {\n transitions.set(k, new Set(v || []));\n }\n }\n }\n } catch (e) {\n // no-op, use default empty object\n }\n}\nfunction persistAppliedTransitions(_window, transitions) {\n if (transitions.size > 0) {\n let json = {};\n for (let [k, v] of transitions) {\n json[k] = [...v];\n }\n try {\n _window.sessionStorage.setItem(TRANSITIONS_STORAGE_KEY, JSON.stringify(json));\n } catch (error) {\n warning(false, "Failed to save applied view transitions in sessionStorage (" + error + ").");\n }\n }\n}\n//#endregion\n\n\n//# sourceMappingURL=router.js.map\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@remix-run/router/dist/router.js?', + ); + + /***/ + }, + + /***/ 9322: /***/ (__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5093);\n/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _A_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1807);\n// We simulate that "moment" is called in "A" and "B"\n\n\nconst A = () => \'A\';\n\n// We keep a reference to prevent uglify remove\nA.moment = (moment__WEBPACK_IMPORTED_MODULE_0___default());\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (A);\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./client/app/components/Loadable/letters/A.js?', + ); + + /***/ + }, + + /***/ 6231: /***/ (__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5093);\n/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_0__);\n// We simulate that "moment" is called in "A" and "B"\n\nconst B = () => \'B\';\n\n// We keep a reference to prevent uglify remove\nB.moment = (moment__WEBPACK_IMPORTED_MODULE_0___default());\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (B);\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./client/app/components/Loadable/letters/B.js?', + ); + + /***/ + }, + + /***/ 7456: /***/ (__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (() => \'C\');\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./client/app/components/Loadable/letters/C.js?', + ); + + /***/ + }, + + /***/ 7957: /***/ (__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (() => \'D\');\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./client/app/components/Loadable/letters/D.js?', + ); + + /***/ + }, + + /***/ 9718: /***/ (__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (() => \'E\');\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./client/app/components/Loadable/letters/E.js?', + ); + + /***/ + }, + + /***/ 6700: /***/ (__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (() => \'E\');\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./client/app/components/Loadable/letters/E.js?', + ); + + /***/ + }, + + /***/ 9363: /***/ (__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (() => \'F\');\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./client/app/components/Loadable/letters/F.js?', + ); + + /***/ + }, + + /***/ 1260: /***/ (__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6540);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\nvar _jsxFileName = "/mnt/ssd/react_on_rails_pro/spec/dummy/client/app/components/Loadable/letters/G.js";\n\nconst G = ({\n prefix\n}) => /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", {\n className: "my-cool-class",\n __self: undefined,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 3,\n columnNumber: 27\n }\n}, prefix, " - G");\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (G);\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./client/app/components/Loadable/letters/G.js?', + ); + + /***/ + }, + + /***/ 4958: /***/ (__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ A: () => (/* reexport safe */ _A__WEBPACK_IMPORTED_MODULE_1__["default"]),\n/* harmony export */ B: () => (/* reexport safe */ _B__WEBPACK_IMPORTED_MODULE_2__["default"]),\n/* harmony export */ C: () => (/* reexport safe */ _C__WEBPACK_IMPORTED_MODULE_3__["default"]),\n/* harmony export */ D: () => (/* reexport safe */ _D__WEBPACK_IMPORTED_MODULE_4__["default"]),\n/* harmony export */ E: () => (/* reexport safe */ _E__WEBPACK_IMPORTED_MODULE_5__["default"]),\n/* harmony export */ GClient: () => (/* binding */ GClient),\n/* harmony export */ GServer: () => (/* binding */ GServer),\n/* harmony export */ Moment: () => (/* binding */ Moment),\n/* harmony export */ Sub: () => (/* reexport safe */ _Z_file__WEBPACK_IMPORTED_MODULE_8__["default"]),\n/* harmony export */ X: () => (/* binding */ X)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6540);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _A__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9322);\n/* harmony import */ var _B__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6231);\n/* harmony import */ var _C__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(7456);\n/* harmony import */ var _D__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(7957);\n/* harmony import */ var _E__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(9718);\n/* harmony import */ var _F__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(9363);\n/* harmony import */ var _Z_file__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(7816);\n/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(5093);\n/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_7__);\nvar _jsxFileName = "/mnt/ssd/react_on_rails_pro/spec/dummy/client/app/components/Loadable/letters/Letters.imports-hmr.jsx";\n\n\n\n\n\n\n\n\nconst components = {\n A: _A__WEBPACK_IMPORTED_MODULE_1__["default"],\n B: _B__WEBPACK_IMPORTED_MODULE_2__["default"],\n C: _C__WEBPACK_IMPORTED_MODULE_3__["default"],\n D: _D__WEBPACK_IMPORTED_MODULE_4__["default"],\n E: _E__WEBPACK_IMPORTED_MODULE_5__["default"],\n F: _F__WEBPACK_IMPORTED_MODULE_6__["default"]\n};\n\n// Not the same functionality as loadable-components because I have to\n// create a registry instead of dynamically importing a file\nconst X = props => {\n const RegisteredComponent = components[props.letter];\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(RegisteredComponent, {\n __self: undefined,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 24,\n columnNumber: 10\n }\n });\n};\n\n// The loadable-compnents equivalents of the below components also depend on dynamic importing\nconst GClient = () => /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", {\n className: "loading-state",\n __self: undefined,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 28,\n columnNumber: 23\n }\n}, "ssr: false - Loading...");\nconst GServer = () => /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", {\n className: "loading-state",\n __self: undefined,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 30,\n columnNumber: 23\n }\n}, "ssr: true - Loading...");\n\nconst Moment = props => props.children((moment__WEBPACK_IMPORTED_MODULE_7___default()));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./client/app/components/Loadable/letters/Letters.imports-hmr.jsx?', + ); + + /***/ + }, + + /***/ 3507: /***/ (__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ A: () => (/* binding */ A),\n/* harmony export */ B: () => (/* binding */ B),\n/* harmony export */ C: () => (/* binding */ C),\n/* harmony export */ D: () => (/* binding */ D),\n/* harmony export */ E: () => (/* binding */ E),\n/* harmony export */ GClient: () => (/* binding */ GClient),\n/* harmony export */ GServer: () => (/* binding */ GServer),\n/* harmony export */ Moment: () => (/* binding */ Moment),\n/* harmony export */ Sub: () => (/* binding */ Sub),\n/* harmony export */ X: () => (/* binding */ X)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6540);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _loadable_component__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6007);\nvar _jsxFileName = "/mnt/ssd/react_on_rails_pro/spec/dummy/client/app/components/Loadable/letters/Letters.imports-loadable.jsx";\n\n// eslint-disable-next-line import/no-extraneous-dependencies\n\nconst A = (0,_loadable_component__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Ay)({\n resolved: {},\n chunkName() {\n return "A";\n },\n isReady(props) {\n const key = this.resolve(props);\n if (this.resolved[key] !== true) {\n return false;\n }\n if (true) {\n return !!__webpack_require__.m[key];\n }\n return false;\n },\n importAsync: () => Promise.resolve(/* import() | A */).then(__webpack_require__.bind(__webpack_require__, 9322)),\n requireAsync(props) {\n const key = this.resolve(props);\n this.resolved[key] = false;\n return this.importAsync(props).then(resolved => {\n this.resolved[key] = true;\n return resolved;\n });\n },\n requireSync(props) {\n const id = this.resolve(props);\n if (true) {\n return __webpack_require__(id);\n }\n return eval(\'module.require\')(id);\n },\n resolve() {\n if (true) {\n return /*require.resolve*/(9322);\n }\n return eval(\'require.resolve\')("./A");\n }\n});\nconst B = (0,_loadable_component__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Ay)({\n resolved: {},\n chunkName() {\n return "B";\n },\n isReady(props) {\n const key = this.resolve(props);\n if (this.resolved[key] !== true) {\n return false;\n }\n if (true) {\n return !!__webpack_require__.m[key];\n }\n return false;\n },\n importAsync: () => Promise.resolve(/* import() | B */).then(__webpack_require__.bind(__webpack_require__, 6231)),\n requireAsync(props) {\n const key = this.resolve(props);\n this.resolved[key] = false;\n return this.importAsync(props).then(resolved => {\n this.resolved[key] = true;\n return resolved;\n });\n },\n requireSync(props) {\n const id = this.resolve(props);\n if (true) {\n return __webpack_require__(id);\n }\n return eval(\'module.require\')(id);\n },\n resolve() {\n if (true) {\n return /*require.resolve*/(6231);\n }\n return eval(\'require.resolve\')("./B");\n }\n});\nconst C = (0,_loadable_component__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Ay)({\n resolved: {},\n chunkName() {\n return "C";\n },\n isReady(props) {\n const key = this.resolve(props);\n if (this.resolved[key] !== true) {\n return false;\n }\n if (true) {\n return !!__webpack_require__.m[key];\n }\n return false;\n },\n importAsync: () => Promise.resolve(/* import() | C */).then(__webpack_require__.bind(__webpack_require__, 7456)),\n requireAsync(props) {\n const key = this.resolve(props);\n this.resolved[key] = false;\n return this.importAsync(props).then(resolved => {\n this.resolved[key] = true;\n return resolved;\n });\n },\n requireSync(props) {\n const id = this.resolve(props);\n if (true) {\n return __webpack_require__(id);\n }\n return eval(\'module.require\')(id);\n },\n resolve() {\n if (true) {\n return /*require.resolve*/(7456);\n }\n return eval(\'require.resolve\')("./C");\n }\n});\nconst D = (0,_loadable_component__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Ay)({\n resolved: {},\n chunkName() {\n return "D";\n },\n isReady(props) {\n const key = this.resolve(props);\n if (this.resolved[key] !== true) {\n return false;\n }\n if (true) {\n return !!__webpack_require__.m[key];\n }\n return false;\n },\n importAsync: () => Promise.resolve(/* import() | D */).then(__webpack_require__.bind(__webpack_require__, 7957)),\n requireAsync(props) {\n const key = this.resolve(props);\n this.resolved[key] = false;\n return this.importAsync(props).then(resolved => {\n this.resolved[key] = true;\n return resolved;\n });\n },\n requireSync(props) {\n const id = this.resolve(props);\n if (true) {\n return __webpack_require__(id);\n }\n return eval(\'module.require\')(id);\n },\n resolve() {\n if (true) {\n return /*require.resolve*/(7957);\n }\n return eval(\'require.resolve\')("./D");\n }\n});\nconst E = (0,_loadable_component__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Ay)({\n resolved: {},\n chunkName() {\n return "E-param";\n },\n isReady(props) {\n const key = this.resolve(props);\n if (this.resolved[key] !== true) {\n return false;\n }\n if (true) {\n return !!__webpack_require__.m[key];\n }\n return false;\n },\n importAsync: () => Promise.resolve(/* import() | E-param */).then(__webpack_require__.bind(__webpack_require__, 6700)),\n requireAsync(props) {\n const key = this.resolve(props);\n this.resolved[key] = false;\n return this.importAsync(props).then(resolved => {\n this.resolved[key] = true;\n return resolved;\n });\n },\n requireSync(props) {\n const id = this.resolve(props);\n if (true) {\n return __webpack_require__(id);\n }\n return eval(\'module.require\')(id);\n },\n resolve() {\n if (true) {\n return /*require.resolve*/(6700);\n }\n return eval(\'require.resolve\')("./E?param");\n }\n}, {\n ssr: false\n});\nconst X = (0,_loadable_component__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Ay)({\n resolved: {},\n chunkName(props) {\n return `${props.letter}`.replace(/[^a-zA-Z0-9_!§$()=\\-^°]+/g, "-");\n },\n isReady(props) {\n const key = this.resolve(props);\n if (this.resolved[key] !== true) {\n return false;\n }\n if (true) {\n return !!__webpack_require__.m[key];\n }\n return false;\n },\n importAsync: props => __webpack_require__(7252)(`./${props.letter}`),\n requireAsync(props) {\n const key = this.resolve(props);\n this.resolved[key] = false;\n return this.importAsync(props).then(resolved => {\n this.resolved[key] = true;\n return resolved;\n });\n },\n requireSync(props) {\n const id = this.resolve(props);\n if (true) {\n return __webpack_require__(id);\n }\n return eval(\'module.require\')(id);\n },\n resolve(props) {\n if (true) {\n return /*require.resolve*/(__webpack_require__(2478).resolve(`./${props.letter}`));\n }\n return eval(\'require.resolve\')(`./${props.letter}`);\n }\n});\nconst Sub = (0,_loadable_component__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Ay)({\n resolved: {},\n chunkName(props) {\n return `${props.letter}-file`.replace(/[^a-zA-Z0-9_!§$()=\\-^°]+/g, "-");\n },\n isReady(props) {\n const key = this.resolve(props);\n if (this.resolved[key] !== true) {\n return false;\n }\n if (true) {\n return !!__webpack_require__.m[key];\n }\n return false;\n },\n importAsync: props => __webpack_require__(9983)(`./${props.letter}/file`),\n requireAsync(props) {\n const key = this.resolve(props);\n this.resolved[key] = false;\n return this.importAsync(props).then(resolved => {\n this.resolved[key] = true;\n return resolved;\n });\n },\n requireSync(props) {\n const id = this.resolve(props);\n if (true) {\n return __webpack_require__(id);\n }\n return eval(\'module.require\')(id);\n },\n resolve(props) {\n if (true) {\n return /*require.resolve*/(__webpack_require__(1015).resolve(`./${props.letter}/file`));\n }\n return eval(\'require.resolve\')(`./${props.letter}/file`);\n }\n});\n\n// Load the \'G\' component twice: once in SSR and once fully client-side\nconst GClient = (0,_loadable_component__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Ay)({\n resolved: {},\n chunkName() {\n return "G";\n },\n isReady(props) {\n const key = this.resolve(props);\n if (this.resolved[key] !== true) {\n return false;\n }\n if (true) {\n return !!__webpack_require__.m[key];\n }\n return false;\n },\n importAsync: () => Promise.resolve(/* import() | G */).then(__webpack_require__.bind(__webpack_require__, 1260)),\n requireAsync(props) {\n const key = this.resolve(props);\n this.resolved[key] = false;\n return this.importAsync(props).then(resolved => {\n this.resolved[key] = true;\n return resolved;\n });\n },\n requireSync(props) {\n const id = this.resolve(props);\n if (true) {\n return __webpack_require__(id);\n }\n return eval(\'module.require\')(id);\n },\n resolve() {\n if (true) {\n return /*require.resolve*/(1260);\n }\n return eval(\'require.resolve\')("./G");\n }\n}, {\n ssr: false,\n fallback: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", {\n className: "loading-state",\n __self: undefined,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 16,\n columnNumber: 13\n }\n }, "ssr: false - Loading...")\n});\nconst GServer = (0,_loadable_component__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Ay)({\n resolved: {},\n chunkName() {\n return "G";\n },\n isReady(props) {\n const key = this.resolve(props);\n if (this.resolved[key] !== true) {\n return false;\n }\n if (true) {\n return !!__webpack_require__.m[key];\n }\n return false;\n },\n importAsync: () => Promise.resolve(/* import() | G */).then(__webpack_require__.bind(__webpack_require__, 1260)),\n requireAsync(props) {\n const key = this.resolve(props);\n this.resolved[key] = false;\n return this.importAsync(props).then(resolved => {\n this.resolved[key] = true;\n return resolved;\n });\n },\n requireSync(props) {\n const id = this.resolve(props);\n if (true) {\n return __webpack_require__(id);\n }\n return eval(\'module.require\')(id);\n },\n resolve() {\n if (true) {\n return /*require.resolve*/(1260);\n }\n return eval(\'require.resolve\')("./G");\n }\n}, {\n ssr: true,\n fallback: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", {\n className: "loading-state",\n __self: undefined,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 21,\n columnNumber: 13\n }\n }, "ssr: true - Loading...")\n});\nconst Moment = _loadable_component__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Ay.lib({\n resolved: {},\n chunkName() {\n return "moment";\n },\n isReady(props) {\n const key = this.resolve(props);\n if (this.resolved[key] !== true) {\n return false;\n }\n if (true) {\n return !!__webpack_require__.m[key];\n }\n return false;\n },\n importAsync: () => Promise.resolve(/* import() | moment */).then(__webpack_require__.t.bind(__webpack_require__, 5093, 23)),\n requireAsync(props) {\n const key = this.resolve(props);\n this.resolved[key] = false;\n return this.importAsync(props).then(resolved => {\n this.resolved[key] = true;\n return resolved;\n });\n },\n requireSync(props) {\n const id = this.resolve(props);\n if (true) {\n return __webpack_require__(id);\n }\n return eval(\'module.require\')(id);\n },\n resolve() {\n if (true) {\n return /*require.resolve*/(5093);\n }\n return eval(\'require.resolve\')("moment");\n }\n}, {\n resolveComponent: moment => moment.default || moment\n});\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./client/app/components/Loadable/letters/Letters.imports-loadable.jsx?', + ); + + /***/ + }, + + /***/ 7816: /***/ (__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (() => \'Z\');\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./client/app/components/Loadable/letters/Z/file.js?', + ); + + /***/ + }, + + /***/ 5211: /***/ (__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6540);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Letters_imports_loadable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3507);\n/* harmony import */ var _main_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(9227);\nvar _jsxFileName = "/mnt/ssd/react_on_rails_pro/spec/dummy/client/app/components/Loadable/letters/index.jsx";\n\n\n\nconst Letters = () => /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {\n __self: undefined,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 6,\n columnNumber: 3\n }\n}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("h1", {\n __self: undefined,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 7,\n columnNumber: 5\n }\n}, "Check out how these letters are imported in the source code!"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Letters_imports_loadable__WEBPACK_IMPORTED_MODULE_1__.A, {\n __self: undefined,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 8,\n columnNumber: 5\n }\n}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("br", {\n __self: undefined,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 9,\n columnNumber: 5\n }\n}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Letters_imports_loadable__WEBPACK_IMPORTED_MODULE_1__.B, {\n __self: undefined,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 10,\n columnNumber: 5\n }\n}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("br", {\n __self: undefined,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 11,\n columnNumber: 5\n }\n}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Letters_imports_loadable__WEBPACK_IMPORTED_MODULE_1__.C, {\n __self: undefined,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 12,\n columnNumber: 5\n }\n}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("br", {\n __self: undefined,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 13,\n columnNumber: 5\n }\n}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Letters_imports_loadable__WEBPACK_IMPORTED_MODULE_1__.D, {\n __self: undefined,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 14,\n columnNumber: 5\n }\n}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("br", {\n __self: undefined,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 15,\n columnNumber: 5\n }\n}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Letters_imports_loadable__WEBPACK_IMPORTED_MODULE_1__.X, {\n letter: "A",\n __self: undefined,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 16,\n columnNumber: 5\n }\n}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("br", {\n __self: undefined,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 17,\n columnNumber: 5\n }\n}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Letters_imports_loadable__WEBPACK_IMPORTED_MODULE_1__.X, {\n letter: "F",\n __self: undefined,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 18,\n columnNumber: 5\n }\n}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("br", {\n __self: undefined,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 19,\n columnNumber: 5\n }\n}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Letters_imports_loadable__WEBPACK_IMPORTED_MODULE_1__.E, {\n __self: undefined,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 20,\n columnNumber: 5\n }\n}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("br", {\n __self: undefined,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 21,\n columnNumber: 5\n }\n}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Letters_imports_loadable__WEBPACK_IMPORTED_MODULE_1__.GClient, {\n prefix: "ssr: false",\n __self: undefined,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 22,\n columnNumber: 5\n }\n}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("br", {\n __self: undefined,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 23,\n columnNumber: 5\n }\n}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Letters_imports_loadable__WEBPACK_IMPORTED_MODULE_1__.GServer, {\n prefix: "ssr: true",\n __self: undefined,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 24,\n columnNumber: 5\n }\n}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("br", {\n __self: undefined,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 25,\n columnNumber: 5\n }\n}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Letters_imports_loadable__WEBPACK_IMPORTED_MODULE_1__.Sub, {\n letter: "Z",\n __self: undefined,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 26,\n columnNumber: 5\n }\n}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("br", {\n __self: undefined,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 27,\n columnNumber: 5\n }\n}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Letters_imports_loadable__WEBPACK_IMPORTED_MODULE_1__.Moment, {\n __self: undefined,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 28,\n columnNumber: 5\n }\n}, moment => moment().format(\'HH:mm\')));\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Letters);\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./client/app/components/Loadable/letters/index.jsx?', + ); + + /***/ + }, + + /***/ 8609: /***/ (__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6540);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react_helmet__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8154);\nvar _jsxFileName = "/mnt/ssd/react_on_rails_pro/spec/dummy/client/app/components/Loadable/pages/A.jsx";\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (() => /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), {\n __self: undefined,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 5,\n columnNumber: 3\n }\n}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react_helmet__WEBPACK_IMPORTED_MODULE_1__/* .Helmet */ .m, {\n __self: undefined,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 6,\n columnNumber: 5\n }\n}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("title", {\n __self: undefined,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 7,\n columnNumber: 7\n }\n}, "Page A")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("h1", {\n __self: undefined,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 9,\n columnNumber: 5\n }\n}, "This is Page A.")));\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./client/app/components/Loadable/pages/A.jsx?', + ); + + /***/ + }, + + /***/ 1338: /***/ (__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6540);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react_helmet__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8154);\nvar _jsxFileName = "/mnt/ssd/react_on_rails_pro/spec/dummy/client/app/components/Loadable/pages/B.jsx";\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (() => /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), {\n __self: undefined,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 5,\n columnNumber: 3\n }\n}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react_helmet__WEBPACK_IMPORTED_MODULE_1__/* .Helmet */ .m, {\n __self: undefined,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 6,\n columnNumber: 5\n }\n}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("title", {\n __self: undefined,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 7,\n columnNumber: 7\n }\n}, "Page B")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("h1", {\n __self: undefined,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 9,\n columnNumber: 5\n }\n}, "This is Page B.")));\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./client/app/components/Loadable/pages/B.jsx?', + ); + + /***/ + }, + + /***/ 8813: /***/ (__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ $: () => (/* binding */ PageA),\n/* harmony export */ i: () => (/* binding */ PageB)\n/* harmony export */ });\n/* harmony import */ var _loadable_component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6007);\n\nconst PageA = (0,_loadable_component__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Ay)({\n resolved: {},\n chunkName() {\n return "pages-A";\n },\n isReady(props) {\n const key = this.resolve(props);\n if (this.resolved[key] !== true) {\n return false;\n }\n if (true) {\n return !!__webpack_require__.m[key];\n }\n return false;\n },\n importAsync: () => Promise.resolve(/* import() | pages-A */).then(__webpack_require__.bind(__webpack_require__, 8609)),\n requireAsync(props) {\n const key = this.resolve(props);\n this.resolved[key] = false;\n return this.importAsync(props).then(resolved => {\n this.resolved[key] = true;\n return resolved;\n });\n },\n requireSync(props) {\n const id = this.resolve(props);\n if (true) {\n return __webpack_require__(id);\n }\n return eval(\'module.require\')(id);\n },\n resolve() {\n if (true) {\n return /*require.resolve*/(8609);\n }\n return eval(\'require.resolve\')("../pages/A");\n }\n});\nconst PageB = (0,_loadable_component__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Ay)({\n resolved: {},\n chunkName() {\n return "pages-B";\n },\n isReady(props) {\n const key = this.resolve(props);\n if (this.resolved[key] !== true) {\n return false;\n }\n if (true) {\n return !!__webpack_require__.m[key];\n }\n return false;\n },\n importAsync: () => Promise.resolve(/* import() | pages-B */).then(__webpack_require__.bind(__webpack_require__, 1338)),\n requireAsync(props) {\n const key = this.resolve(props);\n this.resolved[key] = false;\n return this.importAsync(props).then(resolved => {\n this.resolved[key] = true;\n return resolved;\n });\n },\n requireSync(props) {\n const id = this.resolve(props);\n if (true) {\n return __webpack_require__(id);\n }\n return eval(\'module.require\')(id);\n },\n resolve() {\n if (true) {\n return /*require.resolve*/(1338);\n }\n return eval(\'require.resolve\')("../pages/B");\n }\n});\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./client/app/components/Loadable/routes/Routes.imports-loadable.jsx?', + ); + + /***/ + }, + + /***/ 9416: /***/ (__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '// ESM COMPAT FLAG\n__webpack_require__.r(__webpack_exports__);\n\n// NAMESPACE OBJECT: ./client/app/ssr-computations/userQuery.ssr-computation.ts\nvar userQuery_ssr_computation_namespaceObject = {};\n__webpack_require__.r(userQuery_ssr_computation_namespaceObject);\n__webpack_require__.d(userQuery_ssr_computation_namespaceObject, {\n compute: () => (compute),\n preloadQuery: () => (preloadQuery),\n subscribe: () => (subscribe)\n});\n\n// NAMESPACE OBJECT: ./client/app/actions/HelloWorldActions.jsx\nvar HelloWorldActions_namespaceObject = {};\n__webpack_require__.r(HelloWorldActions_namespaceObject);\n__webpack_require__.d(HelloWorldActions_namespaceObject, {\n updateName: () => (updateName)\n});\n\n// EXTERNAL MODULE: ./node_modules/react-on-rails/node_package/lib/ReactOnRails.js\nvar ReactOnRails = __webpack_require__(2765);\nvar ReactOnRails_default = /*#__PURE__*/__webpack_require__.n(ReactOnRails);\n// EXTERNAL MODULE: ./node_modules/react/index.js\nvar react = __webpack_require__(6540);\nvar react_default = /*#__PURE__*/__webpack_require__.n(react);\n;// CONCATENATED MODULE: ./client/app/ror-auto-load-components/BrokenApp.jsx\nvar _jsxFileName = "/mnt/ssd/react_on_rails_pro/spec/dummy/client/app/ror-auto-load-components/BrokenApp.jsx";\n// Top level component for simple client side only rendering\n\n\n/*\n * Just an example of what can go wrong while coding. No import. Whoops!\n */\n// eslint-disable-next-line react/jsx-no-undef\n/* harmony default export */ const BrokenApp = (props => /*#__PURE__*/react_default().createElement(HelloWorld, Object.assign({}, props, {\n __self: undefined,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 8,\n columnNumber: 27\n }\n})));\n;// CONCATENATED MODULE: ./client/app/ror-auto-load-components/CacheDisabled.jsx\nvar CacheDisabled_jsxFileName = "/mnt/ssd/react_on_rails_pro/spec/dummy/client/app/ror-auto-load-components/CacheDisabled.jsx";\n\nclass CacheDisabled extends (react_default()).Component {\n componentWillUnmount() {\n // eslint-disable-next-line no-console\n console.log(\'CacheDisabled#componentWillUnmount\');\n }\n render() {\n return /*#__PURE__*/react_default().createElement("div", {\n className: "container",\n __self: this,\n __source: {\n fileName: CacheDisabled_jsxFileName,\n lineNumber: 11,\n columnNumber: 7\n }\n }, /*#__PURE__*/react_default().createElement("h2", {\n __self: this,\n __source: {\n fileName: CacheDisabled_jsxFileName,\n lineNumber: 12,\n columnNumber: 9\n }\n }, "Turbolinks cache is disabled"), /*#__PURE__*/react_default().createElement("p", {\n __self: this,\n __source: {\n fileName: CacheDisabled_jsxFileName,\n lineNumber: 13,\n columnNumber: 9\n }\n }, "Must call componentWillUnmount."));\n }\n}\n;// CONCATENATED MODULE: ./client/app/CssModulesImagesFontsExample.module.scss\n// Exports\n/* harmony default export */ const CssModulesImagesFontsExample_module = ({\n\t"heading": `f225CmwQmsvHGWNJSxDE`,\n\t"check": `KrEBMb1v6LQe83HhY7mE`,\n\t"lastCall": `lccSG44s3Mm3TsjFEiK5`,\n\t"railsOnMaui": `MZqs0PczLfioTw0Zo0_U`\n});\n\n;// CONCATENATED MODULE: ./client/app/ror-auto-load-components/CssModulesImagesFontsExample.jsx\nvar CssModulesImagesFontsExample_jsxFileName = "/mnt/ssd/react_on_rails_pro/spec/dummy/client/app/ror-auto-load-components/CssModulesImagesFontsExample.jsx";\n/* eslint-disable react/prop-types */\n\n\n/* harmony default export */ const CssModulesImagesFontsExample = ((_props, _railsContext) => () => /*#__PURE__*/react_default().createElement("div", {\n __self: undefined,\n __source: {\n fileName: CssModulesImagesFontsExample_jsxFileName,\n lineNumber: 7,\n columnNumber: 3\n }\n}, /*#__PURE__*/react_default().createElement("h1", {\n className: CssModulesImagesFontsExample_module.heading,\n __self: undefined,\n __source: {\n fileName: CssModulesImagesFontsExample_jsxFileName,\n lineNumber: 8,\n columnNumber: 5\n }\n}, "This should be open sans light"), /*#__PURE__*/react_default().createElement("div", {\n __self: undefined,\n __source: {\n fileName: CssModulesImagesFontsExample_jsxFileName,\n lineNumber: 9,\n columnNumber: 5\n }\n}, /*#__PURE__*/react_default().createElement("h2", {\n __self: undefined,\n __source: {\n fileName: CssModulesImagesFontsExample_jsxFileName,\n lineNumber: 10,\n columnNumber: 7\n }\n}, "Last Call (relative path)"), /*#__PURE__*/react_default().createElement("div", {\n className: CssModulesImagesFontsExample_module.lastCall,\n __self: undefined,\n __source: {\n fileName: CssModulesImagesFontsExample_jsxFileName,\n lineNumber: 11,\n columnNumber: 7\n }\n})), /*#__PURE__*/react_default().createElement("div", {\n __self: undefined,\n __source: {\n fileName: CssModulesImagesFontsExample_jsxFileName,\n lineNumber: 13,\n columnNumber: 5\n }\n}, /*#__PURE__*/react_default().createElement("h2", {\n __self: undefined,\n __source: {\n fileName: CssModulesImagesFontsExample_jsxFileName,\n lineNumber: 14,\n columnNumber: 7\n }\n}, "Check (URL encoded)"), /*#__PURE__*/react_default().createElement("div", {\n className: CssModulesImagesFontsExample_module.check,\n __self: undefined,\n __source: {\n fileName: CssModulesImagesFontsExample_jsxFileName,\n lineNumber: 15,\n columnNumber: 7\n }\n})), /*#__PURE__*/react_default().createElement("div", {\n __self: undefined,\n __source: {\n fileName: CssModulesImagesFontsExample_jsxFileName,\n lineNumber: 17,\n columnNumber: 5\n }\n}, /*#__PURE__*/react_default().createElement("h2", {\n __self: undefined,\n __source: {\n fileName: CssModulesImagesFontsExample_jsxFileName,\n lineNumber: 18,\n columnNumber: 7\n }\n}, "Rails on Maui Logo (absolute path)"), /*#__PURE__*/react_default().createElement("div", {\n className: CssModulesImagesFontsExample_module.railsOnMaui,\n __self: undefined,\n __source: {\n fileName: CssModulesImagesFontsExample_jsxFileName,\n lineNumber: 19,\n columnNumber: 7\n }\n}))));\n// EXTERNAL MODULE: ./node_modules/prop-types/index.js\nvar prop_types = __webpack_require__(5556);\nvar prop_types_default = /*#__PURE__*/__webpack_require__.n(prop_types);\n// EXTERNAL MODULE: ./node_modules/lodash/lodash.js\nvar lodash = __webpack_require__(2543);\n;// CONCATENATED MODULE: ./client/app/components/RailsContext.jsx\nvar RailsContext_jsxFileName = "/mnt/ssd/react_on_rails_pro/spec/dummy/client/app/components/RailsContext.jsx";\n\n\n\nfunction renderContextRows(railsContext) {\n // eslint-disable-next-line no-console\n console.log(\'railsContext.serverSide is \', railsContext.serverSide);\n return (0,lodash.transform)(railsContext, (accum, value, key) => {\n if (key !== \'serverSide\') {\n const className = `js-${key}`;\n accum.push( /*#__PURE__*/react_default().createElement("tr", {\n key: className,\n __self: this,\n __source: {\n fileName: RailsContext_jsxFileName,\n lineNumber: 14,\n columnNumber: 11\n }\n }, /*#__PURE__*/react_default().createElement("td", {\n __self: this,\n __source: {\n fileName: RailsContext_jsxFileName,\n lineNumber: 15,\n columnNumber: 13\n }\n }, /*#__PURE__*/react_default().createElement("strong", {\n __self: this,\n __source: {\n fileName: RailsContext_jsxFileName,\n lineNumber: 16,\n columnNumber: 15\n }\n }, key, ":\\xA0")), /*#__PURE__*/react_default().createElement("td", {\n className: className,\n __self: this,\n __source: {\n fileName: RailsContext_jsxFileName,\n lineNumber: 18,\n columnNumber: 13\n }\n }, `${value}`)));\n }\n }, []);\n}\nconst RailsContext = props => /*#__PURE__*/react_default().createElement("table", {\n __self: undefined,\n __source: {\n fileName: RailsContext_jsxFileName,\n lineNumber: 28,\n columnNumber: 3\n }\n}, /*#__PURE__*/react_default().createElement("thead", {\n __self: undefined,\n __source: {\n fileName: RailsContext_jsxFileName,\n lineNumber: 29,\n columnNumber: 5\n }\n}, /*#__PURE__*/react_default().createElement("tr", {\n __self: undefined,\n __source: {\n fileName: RailsContext_jsxFileName,\n lineNumber: 30,\n columnNumber: 7\n }\n}, /*#__PURE__*/react_default().createElement("th", {\n __self: undefined,\n __source: {\n fileName: RailsContext_jsxFileName,\n lineNumber: 31,\n columnNumber: 9\n }\n}, /*#__PURE__*/react_default().createElement("i", {\n __self: undefined,\n __source: {\n fileName: RailsContext_jsxFileName,\n lineNumber: 32,\n columnNumber: 11\n }\n}, "key")), /*#__PURE__*/react_default().createElement("th", {\n __self: undefined,\n __source: {\n fileName: RailsContext_jsxFileName,\n lineNumber: 34,\n columnNumber: 9\n }\n}, /*#__PURE__*/react_default().createElement("i", {\n __self: undefined,\n __source: {\n fileName: RailsContext_jsxFileName,\n lineNumber: 35,\n columnNumber: 11\n }\n}, "value")))), /*#__PURE__*/react_default().createElement("tbody", {\n __self: undefined,\n __source: {\n fileName: RailsContext_jsxFileName,\n lineNumber: 39,\n columnNumber: 5\n }\n}, renderContextRows(props.railsContext)));\nRailsContext.propTypes = {\n railsContext: (prop_types_default()).object.isRequired\n};\n/* harmony default export */ const components_RailsContext = (RailsContext);\n;// CONCATENATED MODULE: ./client/app/components/HelloWorld.module.scss\n// Exports\n/* harmony default export */ const HelloWorld_module = ({\n\t"brightColor": `lAeMDCOjEs1j1FVQohl2`\n});\n\n;// CONCATENATED MODULE: ./client/app/ror-auto-load-components/HelloWorld.jsx\nvar HelloWorld_jsxFileName = "/mnt/ssd/react_on_rails_pro/spec/dummy/client/app/ror-auto-load-components/HelloWorld.jsx";\n\n\n\n\n// Example of CSS modules.\n\n\n// Super simple example of the simplest possible React component\nclass HelloWorld_HelloWorld extends (react_default()).Component {\n static propTypes = {\n helloWorldData: prop_types_default().shape({\n name: (prop_types_default()).string\n }).isRequired,\n railsContext: (prop_types_default()).object\n };\n\n // Not necessary if we only call super, but we\'ll need to initialize state, etc.\n constructor(props) {\n super(props);\n this.state = props.helloWorldData;\n this.setNameDomRef = this.setNameDomRef.bind(this);\n this.handleChange = this.handleChange.bind(this);\n }\n setNameDomRef(nameDomNode) {\n this.nameDomRef = nameDomNode;\n }\n handleChange() {\n const name = this.nameDomRef.value;\n this.setState({\n name\n });\n }\n render() {\n // eslint-disable-next-line no-console\n console.log(\'HelloWorld demonstrating a call to console.log in \' + \'spec/dummy/client/app/components/HelloWorld.jsx:18\');\n const {\n name\n } = this.state;\n const {\n railsContext\n } = this.props;\n return /*#__PURE__*/react_default().createElement("div", {\n __self: this,\n __source: {\n fileName: HelloWorld_jsxFileName,\n lineNumber: 45,\n columnNumber: 7\n }\n }, /*#__PURE__*/react_default().createElement("h3", {\n className: HelloWorld_module.brightColor,\n __self: this,\n __source: {\n fileName: HelloWorld_jsxFileName,\n lineNumber: 46,\n columnNumber: 9\n }\n }, "Hello, ", name, "!"), /*#__PURE__*/react_default().createElement("p", {\n __self: this,\n __source: {\n fileName: HelloWorld_jsxFileName,\n lineNumber: 47,\n columnNumber: 9\n }\n }, "Say hello to:", /*#__PURE__*/react_default().createElement("input", {\n type: "text",\n ref: this.setNameDomRef,\n defaultValue: name,\n onChange: this.handleChange,\n __self: this,\n __source: {\n fileName: HelloWorld_jsxFileName,\n lineNumber: 49,\n columnNumber: 11\n }\n })), railsContext && /*#__PURE__*/react_default().createElement(components_RailsContext, {\n railsContext,\n __self: this,\n __source: {\n fileName: HelloWorld_jsxFileName,\n lineNumber: 51,\n columnNumber: 26\n }\n }));\n }\n}\n/* harmony default export */ const ror_auto_load_components_HelloWorld = (HelloWorld_HelloWorld);\n;// CONCATENATED MODULE: ./client/app/ror-auto-load-components/HelloWorldApp.jsx\nvar HelloWorldApp_jsxFileName = "/mnt/ssd/react_on_rails_pro/spec/dummy/client/app/ror-auto-load-components/HelloWorldApp.jsx";\n// Top level component for simple client side only rendering\n\n\n\n/*\n * Export a function that takes the props and returns a ReactComponent.\n * This is used for the client rendering hook after the page html is rendered.\n * React will see that the state is the same and not do anything.\n * Note, this is imported as "HelloWorldApp" by "clientRegistration.jsx"\n *\n * Note, this is a fictional example, as you\'d only use a generator function if you wanted to run\n * some extra code, such as setting up Redux and React-Router.\n */\n/* harmony default export */ const HelloWorldApp = (props => /*#__PURE__*/react_default().createElement(ror_auto_load_components_HelloWorld, Object.assign({}, props, {\n __self: undefined,\n __source: {\n fileName: HelloWorldApp_jsxFileName,\n lineNumber: 14,\n columnNumber: 27\n }\n})));\n// EXTERNAL MODULE: ./node_modules/create-react-class/index.js\nvar create_react_class = __webpack_require__(2306);\nvar create_react_class_default = /*#__PURE__*/__webpack_require__.n(create_react_class);\n;// CONCATENATED MODULE: ./client/app/ror-auto-load-components/HelloWorldES5.jsx\nvar HelloWorldES5_jsxFileName = "/mnt/ssd/react_on_rails_pro/spec/dummy/client/app/ror-auto-load-components/HelloWorldES5.jsx";\n/* eslint-disable react/prefer-es6-class */\n\n\n\n\n\n// Super simple example of React component using React.createClass\nconst HelloWorldES5 = create_react_class_default()({\n displayName: "HelloWorldES5",\n propTypes: {\n helloWorldData: (prop_types_default()).object\n },\n getInitialState() {\n return this.props.helloWorldData;\n },\n setNameDomRef(nameDomNode) {\n this.nameDomRef = nameDomNode;\n },\n handleChange() {\n const name = this.nameDomRef.value;\n this.setState({\n name\n });\n },\n render() {\n const {\n name\n } = this.state;\n return /*#__PURE__*/react_default().createElement("div", {\n __self: this,\n __source: {\n fileName: HelloWorldES5_jsxFileName,\n lineNumber: 30,\n columnNumber: 7\n }\n }, /*#__PURE__*/react_default().createElement("h3", {\n __self: this,\n __source: {\n fileName: HelloWorldES5_jsxFileName,\n lineNumber: 31,\n columnNumber: 9\n }\n }, "Hello ES5, ", name, "!"), /*#__PURE__*/react_default().createElement("p", {\n __self: this,\n __source: {\n fileName: HelloWorldES5_jsxFileName,\n lineNumber: 32,\n columnNumber: 9\n }\n }, "Say hello to:", /*#__PURE__*/react_default().createElement("input", {\n type: "text",\n ref: this.setNameDomRef,\n defaultValue: name,\n onChange: this.handleChange,\n __self: this,\n __source: {\n fileName: HelloWorldES5_jsxFileName,\n lineNumber: 34,\n columnNumber: 11\n }\n })));\n }\n});\n/* harmony default export */ const ror_auto_load_components_HelloWorldES5 = (HelloWorldES5);\n;// CONCATENATED MODULE: ./client/app/ror-auto-load-components/HelloWorldHooks.jsx\nvar HelloWorldHooks_jsxFileName = "/mnt/ssd/react_on_rails_pro/spec/dummy/client/app/ror-auto-load-components/HelloWorldHooks.jsx";\n// Super simple example of the simplest possible React component\n\n\n\n// TODO: make more like the HelloWorld.jsx\nfunction HelloWorldHooks(props) {\n const [name, setName] = (0,react.useState)(props.helloWorldData.name);\n return /*#__PURE__*/react_default().createElement("div", {\n __self: this,\n __source: {\n fileName: HelloWorldHooks_jsxFileName,\n lineNumber: 9,\n columnNumber: 5\n }\n }, /*#__PURE__*/react_default().createElement("h3", {\n className: HelloWorld_module.brightColor,\n __self: this,\n __source: {\n fileName: HelloWorldHooks_jsxFileName,\n lineNumber: 10,\n columnNumber: 7\n }\n }, "Hello, ", name, "!"), /*#__PURE__*/react_default().createElement("p", {\n __self: this,\n __source: {\n fileName: HelloWorldHooks_jsxFileName,\n lineNumber: 11,\n columnNumber: 7\n }\n }, "Say hello to:", /*#__PURE__*/react_default().createElement("input", {\n type: "text",\n value: name,\n onChange: e => setName(e.target.value),\n __self: this,\n __source: {\n fileName: HelloWorldHooks_jsxFileName,\n lineNumber: 13,\n columnNumber: 9\n }\n })));\n}\n/* harmony default export */ const ror_auto_load_components_HelloWorldHooks = (HelloWorldHooks);\n;// CONCATENATED MODULE: ./client/app/ror-auto-load-components/HelloWorldHooksContext.jsx\nvar HelloWorldHooksContext_jsxFileName = "/mnt/ssd/react_on_rails_pro/spec/dummy/client/app/ror-auto-load-components/HelloWorldHooksContext.jsx";\n// Example of using hooks when taking the props and railsContext\n// Note, you need the call the hooks API within the react component stateless function\n\n\n\nconst HelloWorldHooksContext = (props, railsContext) => {\n // You could pass props here or use the closure\n return () => {\n const [name, setName] = (0,react.useState)(props.helloWorldData.name);\n return /*#__PURE__*/react_default().createElement((react_default()).Fragment, null, /*#__PURE__*/react_default().createElement("h3", {\n className: HelloWorld_module.brightColor,\n __self: undefined,\n __source: {\n fileName: HelloWorldHooksContext_jsxFileName,\n lineNumber: 13,\n columnNumber: 9\n }\n }, "Hello, ", name, "!"), /*#__PURE__*/react_default().createElement("p", {\n __self: undefined,\n __source: {\n fileName: HelloWorldHooksContext_jsxFileName,\n lineNumber: 14,\n columnNumber: 9\n }\n }, "Say hello to:", /*#__PURE__*/react_default().createElement("input", {\n type: "text",\n value: name,\n onChange: e => setName(e.target.value),\n __self: undefined,\n __source: {\n fileName: HelloWorldHooksContext_jsxFileName,\n lineNumber: 16,\n columnNumber: 11\n }\n })), /*#__PURE__*/react_default().createElement("p", {\n __self: undefined,\n __source: {\n fileName: HelloWorldHooksContext_jsxFileName,\n lineNumber: 18,\n columnNumber: 9\n }\n }, "Rails Context :"), /*#__PURE__*/react_default().createElement(components_RailsContext, {\n railsContext,\n __self: undefined,\n __source: {\n fileName: HelloWorldHooksContext_jsxFileName,\n lineNumber: 19,\n columnNumber: 9\n }\n }));\n };\n};\n/* harmony default export */ const ror_auto_load_components_HelloWorldHooksContext = (HelloWorldHooksContext);\n;// CONCATENATED MODULE: ./client/app/ror-auto-load-components/HelloWorldRehydratable.jsx\nvar HelloWorldRehydratable_jsxFileName = "/mnt/ssd/react_on_rails_pro/spec/dummy/client/app/ror-auto-load-components/HelloWorldRehydratable.jsx";\n\n\n\n\nclass HelloWorldRehydratable extends (react_default()).Component {\n static propTypes = {\n helloWorldData: prop_types_default().shape({\n name: (prop_types_default()).string\n }).isRequired,\n railsContext: (prop_types_default()).object\n };\n\n // Not necessary if we only call super, but we\'ll need to initialize state, etc.\n constructor(props) {\n super(props);\n this.state = props.helloWorldData;\n this.setNameDomRef = this.setNameDomRef.bind(this);\n this.forceClientHydration = this.forceClientHydration.bind(this);\n this.handleChange = this.handleChange.bind(this);\n }\n componentDidMount() {\n document.addEventListener(\'hydrate\', this.forceClientHydration);\n }\n componentWillUnmount() {\n document.removeEventListener(\'hydrate\', this.forceClientHydration);\n }\n setNameDomRef(nameDomNode) {\n this.nameDomRef = nameDomNode;\n }\n forceClientHydration() {\n const registeredComponentName = \'HelloWorldRehydratable\';\n const {\n railsContext\n } = this.props;\n\n // Target all instances of the component in the DOM\n const match = document.querySelectorAll(`[id^=${registeredComponentName}-react-component-]`);\n // Not all browsers support forEach on NodeList so we go with a classic for-loop\n for (let i = 0; i < match.length; i += 1) {\n const component = match[i];\n // Get component specification <script> tag\n const componentSpecificationTag = document.querySelector(`script[data-dom-id=${component.id}]`);\n // Read props from the component specification tag and merge railsContext\n const mergedProps = {\n ...JSON.parse(componentSpecificationTag.textContent),\n railsContext\n };\n // Hydrate\n ReactOnRails_default().render(registeredComponentName, mergedProps, component.id, true);\n }\n }\n handleChange() {\n const name = this.nameDomRef.value;\n this.setState({\n name\n });\n }\n render() {\n const {\n name\n } = this.state;\n const {\n railsContext\n } = this.props;\n return /*#__PURE__*/react_default().createElement("div", {\n __self: this,\n __source: {\n fileName: HelloWorldRehydratable_jsxFileName,\n lineNumber: 63,\n columnNumber: 7\n }\n }, /*#__PURE__*/react_default().createElement("h3", {\n __self: this,\n __source: {\n fileName: HelloWorldRehydratable_jsxFileName,\n lineNumber: 64,\n columnNumber: 9\n }\n }, "Hello, ", name, "!"), /*#__PURE__*/react_default().createElement("p", {\n __self: this,\n __source: {\n fileName: HelloWorldRehydratable_jsxFileName,\n lineNumber: 65,\n columnNumber: 9\n }\n }, "Say hello to:", /*#__PURE__*/react_default().createElement("input", {\n type: "text",\n ref: this.setNameDomRef,\n defaultValue: name,\n onChange: this.handleChange,\n __self: this,\n __source: {\n fileName: HelloWorldRehydratable_jsxFileName,\n lineNumber: 67,\n columnNumber: 11\n }\n })), railsContext && /*#__PURE__*/react_default().createElement(components_RailsContext, {\n railsContext,\n __self: this,\n __source: {\n fileName: HelloWorldRehydratable_jsxFileName,\n lineNumber: 69,\n columnNumber: 26\n }\n }));\n }\n}\n/* harmony default export */ const ror_auto_load_components_HelloWorldRehydratable = (HelloWorldRehydratable);\n;// CONCATENATED MODULE: ./client/app/ror-auto-load-components/HelloWorldWithLogAndThrow.jsx\n/* eslint-disable no-unused-vars */\n\n\n// Example of logging and throw error handling\n\nconst HelloWorldWithLogAndThrow = (props, context) => {\n /* eslint-disable no-console */\n console.log(\'console.log in HelloWorld\');\n console.warn(\'console.warn in HelloWorld\');\n console.error(\'console.error in HelloWorld\');\n throw new Error(\'throw in HelloWorldWithLogAndThrow\');\n};\n/* harmony default export */ const ror_auto_load_components_HelloWorldWithLogAndThrow = (HelloWorldWithLogAndThrow);\n;// CONCATENATED MODULE: ./client/app/components/ImageExample/ImageExample.module.scss\n// Exports\n/* harmony default export */ const ImageExample_module = ({\n\t"red": `m0VunKQyA3s4CKeJ1O1P`,\n\t"background": `CD3TJZfpbY48gzW31uCR`,\n\t"backgroundSameDirectory": `c45FS3FaYo_nujsxhtkB`,\n\t"googleLogo": `ECVZDbluRA99sVqWiGpj`,\n\t"legoIcon": `AggSCoW0f4GkwE_ZsrZM`\n});\n\n;// CONCATENATED MODULE: ./client/app/assets/images/256egghead.png\nconst _256egghead_namespaceObject = __webpack_require__.p + "static/assets/images/256egghead-56c6d1ce61e86e0d344e.png";\n;// CONCATENATED MODULE: ./client/app/components/ImageExample/bower.png\nconst bower_namespaceObject = __webpack_require__.p + "static/components/ImageExample/bower-84b294626064a0c1f5a5.png";\n;// CONCATENATED MODULE: ./client/app/components/ImageExample/blueprint_icon.svg\nconst blueprint_icon_namespaceObject = __webpack_require__.p + "static/components/ImageExample/blueprint_icon-6c833e6cfe2aa70969a2.svg";\n;// CONCATENATED MODULE: ./client/app/assets/images/lego_icon.svg\nconst lego_icon_namespaceObject = __webpack_require__.p + "static/assets/images/lego_icon-6e54a18b7232e09de939.svg";\n;// CONCATENATED MODULE: ./client/app/ror-auto-load-components/ImageExample.jsx\nvar ImageExample_jsxFileName = "/mnt/ssd/react_on_rails_pro/spec/dummy/client/app/ror-auto-load-components/ImageExample.jsx";\n\n\n\n\n// Note the global alias for images\n\n\n\n\nconst TestComponent = props => /*#__PURE__*/react_default().createElement("div", {\n __self: undefined,\n __source: {\n fileName: ImageExample_jsxFileName,\n lineNumber: 11,\n columnNumber: 3\n }\n}, /*#__PURE__*/react_default().createElement("h1", {\n className: ImageExample_module.red,\n __self: undefined,\n __source: {\n fileName: ImageExample_jsxFileName,\n lineNumber: 12,\n columnNumber: 5\n }\n}, "This is a test of CSS module color red."), /*#__PURE__*/react_default().createElement("hr", {\n __self: undefined,\n __source: {\n fileName: ImageExample_jsxFileName,\n lineNumber: 13,\n columnNumber: 5\n }\n}), /*#__PURE__*/react_default().createElement("h1", {\n className: ImageExample_module.background,\n __self: undefined,\n __source: {\n fileName: ImageExample_jsxFileName,\n lineNumber: 14,\n columnNumber: 5\n }\n}, "Here is a label with a background-image from the CSS modules imported"), /*#__PURE__*/react_default().createElement("img", {\n src: _256egghead_namespaceObject,\n __self: undefined,\n __source: {\n fileName: ImageExample_jsxFileName,\n lineNumber: 15,\n columnNumber: 5\n }\n}), /*#__PURE__*/react_default().createElement("hr", {\n __self: undefined,\n __source: {\n fileName: ImageExample_jsxFileName,\n lineNumber: 16,\n columnNumber: 5\n }\n}), /*#__PURE__*/react_default().createElement("h1", {\n className: ImageExample_module.backgroundSameDirectory,\n __self: undefined,\n __source: {\n fileName: ImageExample_jsxFileName,\n lineNumber: 17,\n columnNumber: 5\n }\n}, "This label has a background image from the same directory. Below is an img tag in the same directory"), /*#__PURE__*/react_default().createElement("img", {\n src: bower_namespaceObject,\n __self: undefined,\n __source: {\n fileName: ImageExample_jsxFileName,\n lineNumber: 20,\n columnNumber: 5\n }\n}), /*#__PURE__*/react_default().createElement("hr", {\n __self: undefined,\n __source: {\n fileName: ImageExample_jsxFileName,\n lineNumber: 21,\n columnNumber: 5\n }\n}), /*#__PURE__*/react_default().createElement("h1", {\n __self: undefined,\n __source: {\n fileName: ImageExample_jsxFileName,\n lineNumber: 22,\n columnNumber: 5\n }\n}, " Below is an img tag of a svg in the same directory"), /*#__PURE__*/react_default().createElement("img", {\n src: blueprint_icon_namespaceObject,\n __self: undefined,\n __source: {\n fileName: ImageExample_jsxFileName,\n lineNumber: 23,\n columnNumber: 5\n }\n}), /*#__PURE__*/react_default().createElement("hr", {\n __self: undefined,\n __source: {\n fileName: ImageExample_jsxFileName,\n lineNumber: 24,\n columnNumber: 5\n }\n}), /*#__PURE__*/react_default().createElement("h1", {\n __self: undefined,\n __source: {\n fileName: ImageExample_jsxFileName,\n lineNumber: 25,\n columnNumber: 5\n }\n}, "Below is a div with a background svg"), /*#__PURE__*/react_default().createElement("div", {\n className: ImageExample_module.googleLogo,\n __self: undefined,\n __source: {\n fileName: ImageExample_jsxFileName,\n lineNumber: 26,\n columnNumber: 5\n }\n}), /*#__PURE__*/react_default().createElement("hr", {\n __self: undefined,\n __source: {\n fileName: ImageExample_jsxFileName,\n lineNumber: 27,\n columnNumber: 5\n }\n}), /*#__PURE__*/react_default().createElement("h1", {\n __self: undefined,\n __source: {\n fileName: ImageExample_jsxFileName,\n lineNumber: 28,\n columnNumber: 5\n }\n}, "SVG lego icon img tag with global path"), /*#__PURE__*/react_default().createElement("img", {\n src: lego_icon_namespaceObject,\n __self: undefined,\n __source: {\n fileName: ImageExample_jsxFileName,\n lineNumber: 29,\n columnNumber: 5\n }\n}), /*#__PURE__*/react_default().createElement("hr", {\n __self: undefined,\n __source: {\n fileName: ImageExample_jsxFileName,\n lineNumber: 30,\n columnNumber: 5\n }\n}), /*#__PURE__*/react_default().createElement("h1", {\n __self: undefined,\n __source: {\n fileName: ImageExample_jsxFileName,\n lineNumber: 31,\n columnNumber: 5\n }\n}, "SVG lego icon with background image to global path"), /*#__PURE__*/react_default().createElement("div", {\n className: ImageExample_module.legoIcon,\n __self: undefined,\n __source: {\n fileName: ImageExample_jsxFileName,\n lineNumber: 32,\n columnNumber: 5\n }\n}));\nTestComponent.propTypes = {\n message: (prop_types_default()).string\n};\n/* harmony default export */ const ImageExample = (TestComponent);\n// EXTERNAL MODULE: ./node_modules/react-dom/client.js\nvar client = __webpack_require__(5338);\n;// CONCATENATED MODULE: ./client/app/ror-auto-load-components/ManualRenderApp.jsx\nvar ManualRenderApp_jsxFileName = "/mnt/ssd/react_on_rails_pro/spec/dummy/client/app/ror-auto-load-components/ManualRenderApp.jsx";\n\n\nconst hydrateOrRender = (domEl, reactEl, prerender) => {\n if (prerender) {\n return (0,client.hydrateRoot)(domEl, reactEl);\n } else {\n const root = (0,client.createRoot)(domEl);\n root.render(reactEl);\n return root;\n }\n};\n/* harmony default export */ const ManualRenderApp = ((props, _railsContext, domNodeId) => {\n const {\n prerender\n } = props;\n const reactElement = /*#__PURE__*/react_default().createElement("div", {\n __self: undefined,\n __source: {\n fileName: ManualRenderApp_jsxFileName,\n lineNumber: 18,\n columnNumber: 5\n }\n }, /*#__PURE__*/react_default().createElement("h1", {\n id: "manual-render",\n __self: undefined,\n __source: {\n fileName: ManualRenderApp_jsxFileName,\n lineNumber: 19,\n columnNumber: 7\n }\n }, "Manual Render Example"), /*#__PURE__*/react_default().createElement("p", {\n __self: undefined,\n __source: {\n fileName: ManualRenderApp_jsxFileName,\n lineNumber: 20,\n columnNumber: 7\n }\n }, "If you can see this, you can register renderer functions."));\n hydrateOrRender(document.getElementById(domNodeId), reactElement, prerender);\n});\n;// CONCATENATED MODULE: ./client/app/ror-auto-load-components/PureComponent.jsx\nvar PureComponent_jsxFileName = "/mnt/ssd/react_on_rails_pro/spec/dummy/client/app/ror-auto-load-components/PureComponent.jsx";\n/* eslint-disable react/prop-types */\n\n/* harmony default export */ const PureComponent = (props => /*#__PURE__*/react_default().createElement("h1", {\n __self: undefined,\n __source: {\n fileName: PureComponent_jsxFileName,\n lineNumber: 4,\n columnNumber: 27\n }\n}, props.title));\n// EXTERNAL MODULE: ./node_modules/react-dom/server.node.js\nvar server_node = __webpack_require__(4362);\n// EXTERNAL MODULE: ./node_modules/tslib/tslib.es6.mjs\nvar tslib_es6 = __webpack_require__(1635);\n// EXTERNAL MODULE: ./node_modules/rehackt/index.js\nvar rehackt = __webpack_require__(7243);\nvar rehackt_namespaceObject = /*#__PURE__*/__webpack_require__.t(rehackt, 2);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/common/canUse.js\nvar canUse = __webpack_require__(2619);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/globals/index.js + 4 modules\nvar globals = __webpack_require__(6319);\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/react/context/ApolloContext.js\n\n\n\n// To make sure Apollo Client doesn\'t create more than one React context\n// (which can lead to problems like having an Apollo Client instance added\n// in one context, then attempting to retrieve it from another different\n// context), a single Apollo context is created and tracked in global state.\nvar contextKey = canUse/* canUseSymbol */.ol ? Symbol.for("__APOLLO_CONTEXT__") : "__APOLLO_CONTEXT__";\nfunction getApolloContext() {\n (0,globals/* invariant */.V1)("createContext" in rehackt_namespaceObject, 45);\n var context = rehackt.createContext[contextKey];\n if (!context) {\n Object.defineProperty(rehackt.createContext, contextKey, {\n value: (context = rehackt.createContext({})),\n enumerable: false,\n writable: false,\n configurable: true,\n });\n context.displayName = "ApolloContext";\n }\n return context;\n}\n/**\n * @deprecated This function has no "resetting" effect since Apollo Client 3.4.12,\n * and will be removed in the next major version of Apollo Client.\n * If you want to get the Apollo Context, use `getApolloContext` instead.\n */\nvar resetApolloContext = (/* unused pure expression or super */ null && (getApolloContext));\n//# sourceMappingURL=ApolloContext.js.map\n// EXTERNAL MODULE: ./node_modules/@wry/trie/lib/index.js\nvar lib = __webpack_require__(2453);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/common/canonicalStringify.js\nvar canonicalStringify = __webpack_require__(6269);\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/react/ssr/RenderPromises.js\n\n\nfunction makeQueryInfoTrie() {\n // these Tries are very short-lived, so we don\'t need to worry about making it\n // "weak" - it\'s easier to test and debug as a strong Trie.\n return new lib/* Trie */.b(false, function () { return ({\n seen: false,\n observable: null,\n }); });\n}\nvar RenderPromises = /** @class */ (function () {\n function RenderPromises() {\n // Map from Query component instances to pending fetchData promises.\n this.queryPromises = new Map();\n // Two-layered map from (query document, stringified variables) to QueryInfo\n // objects. These QueryInfo objects are intended to survive through the whole\n // getMarkupFromTree process, whereas specific Query instances do not survive\n // beyond a single call to renderToStaticMarkup.\n this.queryInfoTrie = makeQueryInfoTrie();\n this.stopped = false;\n }\n RenderPromises.prototype.stop = function () {\n if (!this.stopped) {\n this.queryPromises.clear();\n this.queryInfoTrie = makeQueryInfoTrie();\n this.stopped = true;\n }\n };\n // Registers the server side rendered observable.\n RenderPromises.prototype.registerSSRObservable = function (observable) {\n if (this.stopped)\n return;\n this.lookupQueryInfo(observable.options).observable = observable;\n };\n // Get\'s the cached observable that matches the SSR Query instances query and variables.\n RenderPromises.prototype.getSSRObservable = function (props) {\n return this.lookupQueryInfo(props).observable;\n };\n RenderPromises.prototype.addQueryPromise = function (queryInstance, finish) {\n if (!this.stopped) {\n var info = this.lookupQueryInfo(queryInstance.getOptions());\n if (!info.seen) {\n this.queryPromises.set(queryInstance.getOptions(), new Promise(function (resolve) {\n resolve(queryInstance.fetchData());\n }));\n // Render null to abandon this subtree for this rendering, so that we\n // can wait for the data to arrive.\n return null;\n }\n }\n return finish ? finish() : null;\n };\n RenderPromises.prototype.addObservableQueryPromise = function (obsQuery) {\n return this.addQueryPromise({\n // The only options which seem to actually be used by the\n // RenderPromises class are query and variables.\n getOptions: function () { return obsQuery.options; },\n fetchData: function () {\n return new Promise(function (resolve) {\n var sub = obsQuery.subscribe({\n next: function (result) {\n if (!result.loading) {\n resolve();\n sub.unsubscribe();\n }\n },\n error: function () {\n resolve();\n sub.unsubscribe();\n },\n complete: function () {\n resolve();\n },\n });\n });\n },\n });\n };\n RenderPromises.prototype.hasPromises = function () {\n return this.queryPromises.size > 0;\n };\n RenderPromises.prototype.consumeAndAwaitPromises = function () {\n var _this = this;\n var promises = [];\n this.queryPromises.forEach(function (promise, queryInstance) {\n // Make sure we never try to call fetchData for this query document and\n // these variables again. Since the queryInstance objects change with\n // every rendering, deduplicating them by query and variables is the\n // best we can do. If a different Query component happens to have the\n // same query document and variables, it will be immediately rendered\n // by calling finish() in addQueryPromise, which could result in the\n // rendering of an unwanted loading state, but that\'s not nearly as bad\n // as getting stuck in an infinite rendering loop because we kept calling\n // queryInstance.fetchData for the same Query component indefinitely.\n _this.lookupQueryInfo(queryInstance).seen = true;\n promises.push(promise);\n });\n this.queryPromises.clear();\n return Promise.all(promises);\n };\n RenderPromises.prototype.lookupQueryInfo = function (props) {\n return this.queryInfoTrie.lookup(props.query, (0,canonicalStringify/* canonicalStringify */.M)(props.variables));\n };\n return RenderPromises;\n}());\n\n//# sourceMappingURL=RenderPromises.js.map\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/react/ssr/getDataFromTree.js\n\n\n\n\n\nfunction getDataFromTree(tree, context) {\n if (context === void 0) { context = {}; }\n return getMarkupFromTree({\n tree: tree,\n context: context,\n // If you need to configure this renderFunction, call getMarkupFromTree\n // directly instead of getDataFromTree.\n renderFunction: renderToStaticMarkup,\n });\n}\nfunction getMarkupFromTree(_a) {\n var tree = _a.tree, _b = _a.context, context = _b === void 0 ? {} : _b, \n // The rendering function is configurable! We use renderToStaticMarkup as\n // the default, because it\'s a little less expensive than renderToString,\n // and legacy usage of getDataFromTree ignores the return value anyway.\n _c = _a.renderFunction, \n // The rendering function is configurable! We use renderToStaticMarkup as\n // the default, because it\'s a little less expensive than renderToString,\n // and legacy usage of getDataFromTree ignores the return value anyway.\n renderFunction = _c === void 0 ? server_node.renderToStaticMarkup : _c;\n var renderPromises = new RenderPromises();\n function process() {\n // Always re-render from the rootElement, even though it might seem\n // better to render the children of the component responsible for the\n // promise, because it is not possible to reconstruct the full context\n // of the original rendering (including all unknown context provider\n // elements) for a subtree of the original component tree.\n var ApolloContext = getApolloContext();\n return new Promise(function (resolve) {\n var element = rehackt.createElement(ApolloContext.Provider, { value: (0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, context), { renderPromises: renderPromises }) }, tree);\n resolve(renderFunction(element));\n })\n .then(function (html) {\n return renderPromises.hasPromises() ?\n renderPromises.consumeAndAwaitPromises().then(process)\n : html;\n })\n .finally(function () {\n renderPromises.stop();\n });\n }\n return Promise.resolve().then(process);\n}\n//# sourceMappingURL=getDataFromTree.js.map\n// EXTERNAL MODULE: ./node_modules/graphql-tag/lib/index.js + 12 modules\nvar graphql_tag_lib = __webpack_require__(9708);\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/react/hooks/useSyncExternalStore.js\n\n\n\nvar didWarnUncachedGetSnapshot = false;\n// Prevent webpack from complaining about our feature detection of the\n// useSyncExternalStore property of the React namespace, which is expected not\n// to exist when using React 17 and earlier, and that\'s fine.\nvar uSESKey = "useSyncExternalStore";\nvar realHook = rehackt_namespaceObject[uSESKey];\n// Adapted from https://www.npmjs.com/package/use-sync-external-store, with\n// Apollo Client deviations called out by "// DEVIATION ..." comments.\n// When/if React.useSyncExternalStore is defined, delegate fully to it.\nvar useSyncExternalStore = realHook ||\n (function (subscribe, getSnapshot, getServerSnapshot) {\n // Read the current snapshot from the store on every render. Again, this\n // breaks the rules of React, and only works here because of specific\n // implementation details, most importantly that updates are\n // always synchronous.\n var value = getSnapshot();\n if (\n // DEVIATION: Using __DEV__\n globalThis.__DEV__ !== false &&\n !didWarnUncachedGetSnapshot &&\n // DEVIATION: Not using Object.is because we know our snapshots will never\n // be exotic primitive values like NaN, which is !== itself.\n value !== getSnapshot()) {\n didWarnUncachedGetSnapshot = true;\n // DEVIATION: Using invariant.error instead of console.error directly.\n globalThis.__DEV__ !== false && globals/* invariant */.V1.error(58);\n }\n // Because updates are synchronous, we don\'t queue them. Instead we force a\n // re-render whenever the subscribed state changes by updating an some\n // arbitrary useState hook. Then, during render, we call getSnapshot to read\n // the current value.\n //\n // Because we don\'t actually use the state returned by the useState hook, we\n // can save a bit of memory by storing other stuff in that slot.\n //\n // To implement the early bailout, we need to track some things on a mutable\n // object. Usually, we would put that in a useRef hook, but we can stash it in\n // our useState hook instead.\n //\n // To force a re-render, we call forceUpdate({inst}). That works because the\n // new object always fails an equality check.\n var _a = rehackt.useState({\n inst: { value: value, getSnapshot: getSnapshot },\n }), inst = _a[0].inst, forceUpdate = _a[1];\n // Track the latest getSnapshot function with a ref. This needs to be updated\n // in the layout phase so we can access it during the tearing check that\n // happens on subscribe.\n if (canUse/* canUseLayoutEffect */.JR) {\n // DEVIATION: We avoid calling useLayoutEffect when !canUseLayoutEffect,\n // which may seem like a conditional hook, but this code ends up behaving\n // unconditionally (one way or the other) because canUseLayoutEffect is\n // constant.\n rehackt.useLayoutEffect(function () {\n Object.assign(inst, { value: value, getSnapshot: getSnapshot });\n // Whenever getSnapshot or subscribe changes, we need to check in the\n // commit phase if there was an interleaved mutation. In concurrent mode\n // this can happen all the time, but even in synchronous mode, an earlier\n // effect may have mutated the store.\n if (checkIfSnapshotChanged(inst)) {\n // Force a re-render.\n forceUpdate({ inst: inst });\n }\n // React Hook React.useLayoutEffect has a missing dependency: \'inst\'. Either include it or remove the dependency array.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [subscribe, value, getSnapshot]);\n }\n else {\n Object.assign(inst, { value: value, getSnapshot: getSnapshot });\n }\n rehackt.useEffect(function () {\n // Check for changes right before subscribing. Subsequent changes will be\n // detected in the subscription handler.\n if (checkIfSnapshotChanged(inst)) {\n // Force a re-render.\n forceUpdate({ inst: inst });\n }\n // Subscribe to the store and return a clean-up function.\n return subscribe(function handleStoreChange() {\n // TODO: Because there is no cross-renderer API for batching updates, it\'s\n // up to the consumer of this library to wrap their subscription event\n // with unstable_batchedUpdates. Should we try to detect when this isn\'t\n // the case and print a warning in development?\n // The store changed. Check if the snapshot changed since the last time we\n // read from the store.\n if (checkIfSnapshotChanged(inst)) {\n // Force a re-render.\n forceUpdate({ inst: inst });\n }\n });\n // React Hook React.useEffect has a missing dependency: \'inst\'. Either include it or remove the dependency array.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [subscribe]);\n return value;\n });\nfunction checkIfSnapshotChanged(_a) {\n var value = _a.value, getSnapshot = _a.getSnapshot;\n try {\n return value !== getSnapshot();\n }\n catch (_b) {\n return true;\n }\n}\n//# sourceMappingURL=useSyncExternalStore.js.map\n// EXTERNAL MODULE: ./node_modules/@wry/equality/lib/index.js\nvar equality_lib = __webpack_require__(5381);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/common/mergeOptions.js\nvar mergeOptions = __webpack_require__(144);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/errors/index.js\nvar errors = __webpack_require__(9211);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/core/networkStatus.js\nvar networkStatus = __webpack_require__(8599);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/caching/caches.js\nvar caches = __webpack_require__(599);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/caching/sizes.js\nvar sizes = __webpack_require__(1212);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/caching/getMemoryInternals.js\nvar getMemoryInternals = __webpack_require__(5051);\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/react/parser/index.js\n\n\n\nvar DocumentType;\n(function (DocumentType) {\n DocumentType[DocumentType["Query"] = 0] = "Query";\n DocumentType[DocumentType["Mutation"] = 1] = "Mutation";\n DocumentType[DocumentType["Subscription"] = 2] = "Subscription";\n})(DocumentType || (DocumentType = {}));\nvar cache;\nfunction operationName(type) {\n var name;\n switch (type) {\n case DocumentType.Query:\n name = "Query";\n break;\n case DocumentType.Mutation:\n name = "Mutation";\n break;\n case DocumentType.Subscription:\n name = "Subscription";\n break;\n }\n return name;\n}\n// This parser is mostly used to safety check incoming documents.\nfunction parser(document) {\n if (!cache) {\n cache = new caches/* AutoCleanedWeakCache */.A(sizes/* cacheSizes */.v.parser || 1000 /* defaultCacheSizes.parser */);\n }\n var cached = cache.get(document);\n if (cached)\n return cached;\n var variables, type, name;\n (0,globals/* invariant */.V1)(!!document && !!document.kind, 60, document);\n var fragments = [];\n var queries = [];\n var mutations = [];\n var subscriptions = [];\n for (var _i = 0, _a = document.definitions; _i < _a.length; _i++) {\n var x = _a[_i];\n if (x.kind === "FragmentDefinition") {\n fragments.push(x);\n continue;\n }\n if (x.kind === "OperationDefinition") {\n switch (x.operation) {\n case "query":\n queries.push(x);\n break;\n case "mutation":\n mutations.push(x);\n break;\n case "subscription":\n subscriptions.push(x);\n break;\n }\n }\n }\n (0,globals/* invariant */.V1)(!fragments.length ||\n queries.length ||\n mutations.length ||\n subscriptions.length, 61);\n (0,globals/* invariant */.V1)(\n queries.length + mutations.length + subscriptions.length <= 1,\n 62,\n document,\n queries.length,\n subscriptions.length,\n mutations.length\n );\n type = queries.length ? DocumentType.Query : DocumentType.Mutation;\n if (!queries.length && !mutations.length)\n type = DocumentType.Subscription;\n var definitions = queries.length ? queries\n : mutations.length ? mutations\n : subscriptions;\n (0,globals/* invariant */.V1)(definitions.length === 1, 63, document, definitions.length);\n var definition = definitions[0];\n variables = definition.variableDefinitions || [];\n if (definition.name && definition.name.kind === "Name") {\n name = definition.name.value;\n }\n else {\n name = "data"; // fallback to using data if no name\n }\n var payload = { name: name, type: type, variables: variables };\n cache.set(document, payload);\n return payload;\n}\nparser.resetCache = function () {\n cache = undefined;\n};\nif (globalThis.__DEV__ !== false) {\n (0,getMemoryInternals/* registerGlobalCache */.D_)("parser", function () { return (cache ? cache.size : 0); });\n}\nfunction verifyDocumentType(document, type) {\n var operation = parser(document);\n var requiredOperationName = operationName(type);\n var usedOperationName = operationName(operation.type);\n (0,globals/* invariant */.V1)(\n operation.type === type,\n 64,\n requiredOperationName,\n requiredOperationName,\n usedOperationName\n );\n}\n//# sourceMappingURL=index.js.map\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/react/hooks/useApolloClient.js\n\n\n\n/**\n * @example\n * ```jsx\n * import { useApolloClient } from \'@apollo/client\';\n *\n * function SomeComponent() {\n * const client = useApolloClient();\n * // `client` is now set to the `ApolloClient` instance being used by the\n * // application (that was configured using something like `ApolloProvider`)\n * }\n * ```\n *\n * @since 3.0.0\n * @returns The `ApolloClient` instance being used by the application.\n */\nfunction useApolloClient(override) {\n var context = rehackt.useContext(getApolloContext());\n var client = override || context.client;\n (0,globals/* invariant */.V1)(!!client, 49);\n return client;\n}\n//# sourceMappingURL=useApolloClient.js.map\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/common/maybeDeepFreeze.js\nvar maybeDeepFreeze = __webpack_require__(1469);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/common/compact.js\nvar compact = __webpack_require__(7945);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/common/arrays.js\nvar arrays = __webpack_require__(5636);\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/react/hooks/internal/wrapHook.js\nvar wrapperSymbol = Symbol.for("apollo.hook.wrappers");\n/**\n * @internal\n *\n * Makes an Apollo Client hook "wrappable".\n * That means that the Apollo Client instance can expose a "wrapper" that will be\n * used to wrap the original hook implementation with additional logic.\n * @example\n * ```tsx\n * // this is already done in `@apollo/client` for all wrappable hooks (see `WrappableHooks`)\n * // following this pattern\n * function useQuery() {\n * return wrapHook(\'useQuery\', _useQuery, options.client)(query, options);\n * }\n * function _useQuery(query, options) {\n * // original implementation\n * }\n *\n * // this is what a library like `@apollo/client-react-streaming` would do\n * class ApolloClientWithStreaming extends ApolloClient {\n * constructor(options) {\n * super(options);\n * this.queryManager[Symbol.for("apollo.hook.wrappers")] = {\n * useQuery: (original) => (query, options) => {\n * console.log("useQuery was called with options", options);\n * return original(query, options);\n * }\n * }\n * }\n * }\n *\n * // this will now log the options and then call the original `useQuery`\n * const client = new ApolloClientWithStreaming({ ... });\n * useQuery(query, { client });\n * ```\n */\nfunction wrapHook(hookName, useHook, clientOrObsQuery) {\n var queryManager = clientOrObsQuery["queryManager"];\n var wrappers = queryManager && queryManager[wrapperSymbol];\n var wrapper = wrappers && wrappers[hookName];\n return wrapper ? wrapper(useHook) : useHook;\n}\n//# sourceMappingURL=wrapHook.js.map\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/react/hooks/useQuery.js\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar useQuery_hasOwnProperty = Object.prototype.hasOwnProperty;\n/**\n * A hook for executing queries in an Apollo application.\n *\n * To run a query within a React component, call `useQuery` and pass it a GraphQL query document.\n *\n * When your component renders, `useQuery` returns an object from Apollo Client that contains `loading`, `error`, and `data` properties you can use to render your UI.\n *\n * > Refer to the [Queries](https://www.apollographql.com/docs/react/data/queries) section for a more in-depth overview of `useQuery`.\n *\n * @example\n * ```jsx\n * import { gql, useQuery } from \'@apollo/client\';\n *\n * const GET_GREETING = gql`\n * query GetGreeting($language: String!) {\n * greeting(language: $language) {\n * message\n * }\n * }\n * `;\n *\n * function Hello() {\n * const { loading, error, data } = useQuery(GET_GREETING, {\n * variables: { language: \'english\' },\n * });\n * if (loading) return <p>Loading ...</p>;\n * return <h1>Hello {data.greeting.message}!</h1>;\n * }\n * ```\n * @since 3.0.0\n * @param query - A GraphQL query document parsed into an AST by `gql`.\n * @param options - Options to control how the query is executed.\n * @returns Query result object\n */\nfunction useQuery(query, options) {\n if (options === void 0) { options = Object.create(null); }\n return wrapHook("useQuery", _useQuery, useApolloClient(options && options.client))(query, options);\n}\nfunction _useQuery(query, options) {\n return useInternalState(useApolloClient(options.client), query).useQuery(options);\n}\nfunction useInternalState(client, query) {\n // By default, InternalState.prototype.forceUpdate is an empty function, but\n // we replace it here (before anyone has had a chance to see this state yet)\n // with a function that unconditionally forces an update, using the latest\n // setTick function. Updating this state by calling state.forceUpdate or the\n // uSES notification callback are the only way we trigger React component updates.\n var forceUpdateState = rehackt.useReducer(function (tick) { return tick + 1; }, 0)[1];\n function createInternalState(previous) {\n return Object.assign(new InternalState(client, query, previous), {\n forceUpdateState: forceUpdateState,\n });\n }\n var _a = rehackt.useState(createInternalState), state = _a[0], updateState = _a[1];\n if (client !== state.client || query !== state.query) {\n // If the client or query have changed, we need to create a new InternalState.\n // This will trigger a re-render with the new state, but it will also continue\n // to run the current render function to completion.\n // Since we sometimes trigger some side-effects in the render function, we\n // re-assign `state` to the new state to ensure that those side-effects are\n // triggered with the new state.\n updateState((state = createInternalState(state)));\n }\n return state;\n}\nvar InternalState = /** @class */ (function () {\n function InternalState(client, query, previous) {\n var _this = this;\n this.client = client;\n this.query = query;\n /**\n * Will be overwritten by the `useSyncExternalStore` "force update" method\n * whenever it is available and reset to `forceUpdateState` when it isn\'t.\n */\n this.forceUpdate = function () { return _this.forceUpdateState(); };\n this.ssrDisabledResult = (0,maybeDeepFreeze/* maybeDeepFreeze */.G)({\n loading: true,\n data: void 0,\n error: void 0,\n networkStatus: networkStatus/* NetworkStatus */.pT.loading,\n });\n this.skipStandbyResult = (0,maybeDeepFreeze/* maybeDeepFreeze */.G)({\n loading: false,\n data: void 0,\n error: void 0,\n networkStatus: networkStatus/* NetworkStatus */.pT.ready,\n });\n // This cache allows the referential stability of this.result (as returned by\n // getCurrentResult) to translate into referential stability of the resulting\n // QueryResult object returned by toQueryResult.\n this.toQueryResultCache = new (canUse/* canUseWeakMap */.et ? WeakMap : Map)();\n verifyDocumentType(query, DocumentType.Query);\n // Reuse previousData from previous InternalState (if any) to provide\n // continuity of previousData even if/when the query or client changes.\n var previousResult = previous && previous.result;\n var previousData = previousResult && previousResult.data;\n if (previousData) {\n this.previousData = previousData;\n }\n }\n /**\n * Forces an update using local component state.\n * As this is not batched with `useSyncExternalStore` updates,\n * this is only used as a fallback if the `useSyncExternalStore` "force update"\n * method is not registered at the moment.\n * See https://github.com/facebook/react/issues/25191\n * */\n InternalState.prototype.forceUpdateState = function () {\n // Replaced (in useInternalState) with a method that triggers an update.\n globalThis.__DEV__ !== false && globals/* invariant */.V1.warn(51);\n };\n InternalState.prototype.executeQuery = function (options) {\n var _this = this;\n var _a;\n if (options.query) {\n Object.assign(this, { query: options.query });\n }\n this.watchQueryOptions = this.createWatchQueryOptions((this.queryHookOptions = options));\n var concast = this.observable.reobserveAsConcast(this.getObsQueryOptions());\n // Make sure getCurrentResult returns a fresh ApolloQueryResult<TData>,\n // but save the current data as this.previousData, just like setResult\n // usually does.\n this.previousData = ((_a = this.result) === null || _a === void 0 ? void 0 : _a.data) || this.previousData;\n this.result = void 0;\n this.forceUpdate();\n return new Promise(function (resolve) {\n var result;\n // Subscribe to the concast independently of the ObservableQuery in case\n // the component gets unmounted before the promise resolves. This prevents\n // the concast from terminating early and resolving with `undefined` when\n // there are no more subscribers for the concast.\n concast.subscribe({\n next: function (value) {\n result = value;\n },\n error: function () {\n resolve(_this.toQueryResult(_this.observable.getCurrentResult()));\n },\n complete: function () {\n resolve(_this.toQueryResult(result));\n },\n });\n });\n };\n // Methods beginning with use- should be called according to the standard\n // rules of React hooks: only at the top level of the calling function, and\n // without any dynamic conditional logic.\n InternalState.prototype.useQuery = function (options) {\n var _this = this;\n // The renderPromises field gets initialized here in the useQuery method, at\n // the beginning of everything (for a given component rendering, at least),\n // so we can safely use this.renderPromises in other/later InternalState\n // methods without worrying it might be uninitialized. Even after\n // initialization, this.renderPromises is usually undefined (unless SSR is\n // happening), but that\'s fine as long as it has been initialized that way,\n // rather than left uninitialized.\n // eslint-disable-next-line react-hooks/rules-of-hooks\n this.renderPromises = rehackt.useContext(getApolloContext()).renderPromises;\n this.useOptions(options);\n var obsQuery = this.useObservableQuery();\n // eslint-disable-next-line react-hooks/rules-of-hooks\n var result = useSyncExternalStore(\n // eslint-disable-next-line react-hooks/rules-of-hooks\n rehackt.useCallback(function (handleStoreChange) {\n if (_this.renderPromises) {\n return function () { };\n }\n _this.forceUpdate = handleStoreChange;\n var onNext = function () {\n var previousResult = _this.result;\n // We use `getCurrentResult()` instead of the onNext argument because\n // the values differ slightly. Specifically, loading results will have\n // an empty object for data instead of `undefined` for some reason.\n var result = obsQuery.getCurrentResult();\n // Make sure we\'re not attempting to re-render similar results\n if (previousResult &&\n previousResult.loading === result.loading &&\n previousResult.networkStatus === result.networkStatus &&\n (0,equality_lib/* equal */.L)(previousResult.data, result.data)) {\n return;\n }\n _this.setResult(result);\n };\n var onError = function (error) {\n subscription.unsubscribe();\n subscription = obsQuery.resubscribeAfterError(onNext, onError);\n if (!useQuery_hasOwnProperty.call(error, "graphQLErrors")) {\n // The error is not a GraphQL error\n throw error;\n }\n var previousResult = _this.result;\n if (!previousResult ||\n (previousResult && previousResult.loading) ||\n !(0,equality_lib/* equal */.L)(error, previousResult.error)) {\n _this.setResult({\n data: (previousResult && previousResult.data),\n error: error,\n loading: false,\n networkStatus: networkStatus/* NetworkStatus */.pT.error,\n });\n }\n };\n var subscription = obsQuery.subscribe(onNext, onError);\n // Do the "unsubscribe" with a short delay.\n // This way, an existing subscription can be reused without an additional\n // request if "unsubscribe" and "resubscribe" to the same ObservableQuery\n // happen in very fast succession.\n return function () {\n setTimeout(function () { return subscription.unsubscribe(); });\n _this.forceUpdate = function () { return _this.forceUpdateState(); };\n };\n }, [\n // We memoize the subscribe function using useCallback and the following\n // dependency keys, because the subscribe function reference is all that\n // useSyncExternalStore uses internally as a dependency key for the\n // useEffect ultimately responsible for the subscription, so we are\n // effectively passing this dependency array to that useEffect buried\n // inside useSyncExternalStore, as desired.\n obsQuery,\n // eslint-disable-next-line react-hooks/exhaustive-deps\n this.renderPromises,\n // eslint-disable-next-line react-hooks/exhaustive-deps\n this.client.disableNetworkFetches,\n ]), function () { return _this.getCurrentResult(); }, function () { return _this.getCurrentResult(); });\n // TODO Remove this method when we remove support for options.partialRefetch.\n this.unsafeHandlePartialRefetch(result);\n return this.toQueryResult(result);\n };\n InternalState.prototype.useOptions = function (options) {\n var _a;\n var watchQueryOptions = this.createWatchQueryOptions((this.queryHookOptions = options));\n // Update this.watchQueryOptions, but only when they have changed, which\n // allows us to depend on the referential stability of\n // this.watchQueryOptions elsewhere.\n var currentWatchQueryOptions = this.watchQueryOptions;\n if (!(0,equality_lib/* equal */.L)(watchQueryOptions, currentWatchQueryOptions)) {\n this.watchQueryOptions = watchQueryOptions;\n if (currentWatchQueryOptions && this.observable) {\n // Though it might be tempting to postpone this reobserve call to the\n // useEffect block, we need getCurrentResult to return an appropriate\n // loading:true result synchronously (later within the same call to\n // useQuery). Since we already have this.observable here (not true for\n // the very first call to useQuery), we are not initiating any new\n // subscriptions, though it does feel less than ideal that reobserve\n // (potentially) kicks off a network request (for example, when the\n // variables have changed), which is technically a side-effect.\n this.observable.reobserve(this.getObsQueryOptions());\n // Make sure getCurrentResult returns a fresh ApolloQueryResult<TData>,\n // but save the current data as this.previousData, just like setResult\n // usually does.\n this.previousData = ((_a = this.result) === null || _a === void 0 ? void 0 : _a.data) || this.previousData;\n this.result = void 0;\n }\n }\n // Make sure state.onCompleted and state.onError always reflect the latest\n // options.onCompleted and options.onError callbacks provided to useQuery,\n // since those functions are often recreated every time useQuery is called.\n // Like the forceUpdate method, the versions of these methods inherited from\n // InternalState.prototype are empty no-ops, but we can override them on the\n // base state object (without modifying the prototype).\n this.onCompleted =\n options.onCompleted || InternalState.prototype.onCompleted;\n this.onError = options.onError || InternalState.prototype.onError;\n if ((this.renderPromises || this.client.disableNetworkFetches) &&\n this.queryHookOptions.ssr === false &&\n !this.queryHookOptions.skip) {\n // If SSR has been explicitly disabled, and this function has been called\n // on the server side, return the default loading state.\n this.result = this.ssrDisabledResult;\n }\n else if (this.queryHookOptions.skip ||\n this.watchQueryOptions.fetchPolicy === "standby") {\n // When skipping a query (ie. we\'re not querying for data but still want to\n // render children), make sure the `data` is cleared out and `loading` is\n // set to `false` (since we aren\'t loading anything).\n //\n // NOTE: We no longer think this is the correct behavior. Skipping should\n // not automatically set `data` to `undefined`, but instead leave the\n // previous data in place. In other words, skipping should not mandate that\n // previously received data is all of a sudden removed. Unfortunately,\n // changing this is breaking, so we\'ll have to wait until Apollo Client 4.0\n // to address this.\n this.result = this.skipStandbyResult;\n }\n else if (this.result === this.ssrDisabledResult ||\n this.result === this.skipStandbyResult) {\n this.result = void 0;\n }\n };\n InternalState.prototype.getObsQueryOptions = function () {\n var toMerge = [];\n var globalDefaults = this.client.defaultOptions.watchQuery;\n if (globalDefaults)\n toMerge.push(globalDefaults);\n if (this.queryHookOptions.defaultOptions) {\n toMerge.push(this.queryHookOptions.defaultOptions);\n }\n // We use compact rather than mergeOptions for this part of the merge,\n // because we want watchQueryOptions.variables (if defined) to replace\n // this.observable.options.variables whole. This replacement allows\n // removing variables by removing them from the variables input to\n // useQuery. If the variables were always merged together (rather than\n // replaced), there would be no way to remove existing variables.\n // However, the variables from options.defaultOptions and globalDefaults\n // (if provided) should be merged, to ensure individual defaulted\n // variables always have values, if not otherwise defined in\n // observable.options or watchQueryOptions.\n toMerge.push((0,compact/* compact */.o)(this.observable && this.observable.options, this.watchQueryOptions));\n return toMerge.reduce(mergeOptions/* mergeOptions */.l);\n };\n // A function to massage options before passing them to ObservableQuery.\n InternalState.prototype.createWatchQueryOptions = function (_a) {\n var _b;\n if (_a === void 0) { _a = {}; }\n var skip = _a.skip, ssr = _a.ssr, onCompleted = _a.onCompleted, onError = _a.onError, defaultOptions = _a.defaultOptions, \n // The above options are useQuery-specific, so this ...otherOptions spread\n // makes otherOptions almost a WatchQueryOptions object, except for the\n // query property that we add below.\n otherOptions = (0,tslib_es6/* __rest */.Tt)(_a, ["skip", "ssr", "onCompleted", "onError", "defaultOptions"]);\n // This Object.assign is safe because otherOptions is a fresh ...rest object\n // that did not exist until just now, so modifications are still allowed.\n var watchQueryOptions = Object.assign(otherOptions, { query: this.query });\n if (this.renderPromises &&\n (watchQueryOptions.fetchPolicy === "network-only" ||\n watchQueryOptions.fetchPolicy === "cache-and-network")) {\n // this behavior was added to react-apollo without explanation in this PR\n // https://github.com/apollographql/react-apollo/pull/1579\n watchQueryOptions.fetchPolicy = "cache-first";\n }\n if (!watchQueryOptions.variables) {\n watchQueryOptions.variables = {};\n }\n if (skip) {\n var _c = watchQueryOptions.fetchPolicy, fetchPolicy = _c === void 0 ? this.getDefaultFetchPolicy() : _c, _d = watchQueryOptions.initialFetchPolicy, initialFetchPolicy = _d === void 0 ? fetchPolicy : _d;\n // When skipping, we set watchQueryOptions.fetchPolicy initially to\n // "standby", but we also need/want to preserve the initial non-standby\n // fetchPolicy that would have been used if not skipping.\n Object.assign(watchQueryOptions, {\n initialFetchPolicy: initialFetchPolicy,\n fetchPolicy: "standby",\n });\n }\n else if (!watchQueryOptions.fetchPolicy) {\n watchQueryOptions.fetchPolicy =\n ((_b = this.observable) === null || _b === void 0 ? void 0 : _b.options.initialFetchPolicy) ||\n this.getDefaultFetchPolicy();\n }\n return watchQueryOptions;\n };\n InternalState.prototype.getDefaultFetchPolicy = function () {\n var _a, _b;\n return (((_a = this.queryHookOptions.defaultOptions) === null || _a === void 0 ? void 0 : _a.fetchPolicy) ||\n ((_b = this.client.defaultOptions.watchQuery) === null || _b === void 0 ? void 0 : _b.fetchPolicy) ||\n "cache-first");\n };\n // Defining these methods as no-ops on the prototype allows us to call\n // state.onCompleted and/or state.onError without worrying about whether a\n // callback was provided.\n InternalState.prototype.onCompleted = function (data) { };\n InternalState.prototype.onError = function (error) { };\n InternalState.prototype.useObservableQuery = function () {\n // See if there is an existing observable that was used to fetch the same\n // data and if so, use it instead since it will contain the proper queryId\n // to fetch the result set. This is used during SSR.\n var obsQuery = (this.observable =\n (this.renderPromises &&\n this.renderPromises.getSSRObservable(this.watchQueryOptions)) ||\n this.observable || // Reuse this.observable if possible (and not SSR)\n this.client.watchQuery(this.getObsQueryOptions()));\n // eslint-disable-next-line react-hooks/rules-of-hooks\n this.obsQueryFields = rehackt.useMemo(function () { return ({\n refetch: obsQuery.refetch.bind(obsQuery),\n reobserve: obsQuery.reobserve.bind(obsQuery),\n fetchMore: obsQuery.fetchMore.bind(obsQuery),\n updateQuery: obsQuery.updateQuery.bind(obsQuery),\n startPolling: obsQuery.startPolling.bind(obsQuery),\n stopPolling: obsQuery.stopPolling.bind(obsQuery),\n subscribeToMore: obsQuery.subscribeToMore.bind(obsQuery),\n }); }, [obsQuery]);\n var ssrAllowed = !(this.queryHookOptions.ssr === false || this.queryHookOptions.skip);\n if (this.renderPromises && ssrAllowed) {\n this.renderPromises.registerSSRObservable(obsQuery);\n if (obsQuery.getCurrentResult().loading) {\n // TODO: This is a legacy API which could probably be cleaned up\n this.renderPromises.addObservableQueryPromise(obsQuery);\n }\n }\n return obsQuery;\n };\n InternalState.prototype.setResult = function (nextResult) {\n var previousResult = this.result;\n if (previousResult && previousResult.data) {\n this.previousData = previousResult.data;\n }\n this.result = nextResult;\n // Calling state.setResult always triggers an update, though some call sites\n // perform additional equality checks before committing to an update.\n this.forceUpdate();\n this.handleErrorOrCompleted(nextResult, previousResult);\n };\n InternalState.prototype.handleErrorOrCompleted = function (result, previousResult) {\n var _this = this;\n if (!result.loading) {\n var error_1 = this.toApolloError(result);\n // wait a tick in case we are in the middle of rendering a component\n Promise.resolve()\n .then(function () {\n if (error_1) {\n _this.onError(error_1);\n }\n else if (result.data &&\n (previousResult === null || previousResult === void 0 ? void 0 : previousResult.networkStatus) !== result.networkStatus &&\n result.networkStatus === networkStatus/* NetworkStatus */.pT.ready) {\n _this.onCompleted(result.data);\n }\n })\n .catch(function (error) {\n globalThis.__DEV__ !== false && globals/* invariant */.V1.warn(error);\n });\n }\n };\n InternalState.prototype.toApolloError = function (result) {\n return (0,arrays/* isNonEmptyArray */.E)(result.errors) ?\n new errors/* ApolloError */.K4({ graphQLErrors: result.errors })\n : result.error;\n };\n InternalState.prototype.getCurrentResult = function () {\n // Using this.result as a cache ensures getCurrentResult continues returning\n // the same (===) result object, unless state.setResult has been called, or\n // we\'re doing server rendering and therefore override the result below.\n if (!this.result) {\n this.handleErrorOrCompleted((this.result = this.observable.getCurrentResult()));\n }\n return this.result;\n };\n InternalState.prototype.toQueryResult = function (result) {\n var queryResult = this.toQueryResultCache.get(result);\n if (queryResult)\n return queryResult;\n var data = result.data, partial = result.partial, resultWithoutPartial = (0,tslib_es6/* __rest */.Tt)(result, ["data", "partial"]);\n this.toQueryResultCache.set(result, (queryResult = (0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({ data: data }, resultWithoutPartial), this.obsQueryFields), { client: this.client, observable: this.observable, variables: this.observable.variables, called: !this.queryHookOptions.skip, previousData: this.previousData })));\n if (!queryResult.error && (0,arrays/* isNonEmptyArray */.E)(result.errors)) {\n // Until a set naming convention for networkError and graphQLErrors is\n // decided upon, we map errors (graphQLErrors) to the error options.\n // TODO: Is it possible for both result.error and result.errors to be\n // defined here?\n queryResult.error = new errors/* ApolloError */.K4({ graphQLErrors: result.errors });\n }\n return queryResult;\n };\n InternalState.prototype.unsafeHandlePartialRefetch = function (result) {\n // WARNING: SIDE-EFFECTS IN THE RENDER FUNCTION\n //\n // TODO: This code should be removed when the partialRefetch option is\n // removed. I was unable to get this hook to behave reasonably in certain\n // edge cases when this block was put in an effect.\n if (result.partial &&\n this.queryHookOptions.partialRefetch &&\n !result.loading &&\n (!result.data || Object.keys(result.data).length === 0) &&\n this.observable.options.fetchPolicy !== "cache-only") {\n Object.assign(result, {\n loading: true,\n networkStatus: networkStatus/* NetworkStatus */.pT.refetch,\n });\n this.observable.refetch();\n }\n };\n return InternalState;\n}());\n//# sourceMappingURL=useQuery.js.map\n;// CONCATENATED MODULE: ./client/app/components/ApolloGraphQL.jsx\nvar ApolloGraphQL_jsxFileName = "/mnt/ssd/react_on_rails_pro/spec/dummy/client/app/components/ApolloGraphQL.jsx";\n\n\nconst GET_FIRST_USER = (0,graphql_tag_lib/* gql */.J1)`\n query FirstUser {\n user(id: 1) {\n name\n email\n }\n }\n`;\nconst ApolloGraphQL = () => {\n const {\n data,\n error,\n loading\n } = useQuery(GET_FIRST_USER);\n if (error) {\n throw error;\n }\n if (loading) {\n return /*#__PURE__*/react_default().createElement("div", {\n __self: undefined,\n __source: {\n fileName: ApolloGraphQL_jsxFileName,\n lineNumber: 20,\n columnNumber: 12\n }\n }, "Loading...");\n }\n const {\n name,\n email\n } = data.user;\n return /*#__PURE__*/react_default().createElement("p", {\n __self: undefined,\n __source: {\n fileName: ApolloGraphQL_jsxFileName,\n lineNumber: 24,\n columnNumber: 5\n }\n }, /*#__PURE__*/react_default().createElement("b", {\n __self: undefined,\n __source: {\n fileName: ApolloGraphQL_jsxFileName,\n lineNumber: 25,\n columnNumber: 7\n }\n }, name, ": "), email);\n};\n/* harmony default export */ const components_ApolloGraphQL = (ApolloGraphQL);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/core/ApolloClient.js + 12 modules\nvar ApolloClient = __webpack_require__(8067);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/link/http/createHttpLink.js + 14 modules\nvar createHttpLink = __webpack_require__(4132);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/cache/inmemory/inMemoryCache.js + 9 modules\nvar inMemoryCache = __webpack_require__(7404);\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/react/context/ApolloProvider.js\n\n\n\n\nvar ApolloProvider = function (_a) {\n var client = _a.client, children = _a.children;\n var ApolloContext = getApolloContext();\n var parentContext = rehackt.useContext(ApolloContext);\n var context = rehackt.useMemo(function () {\n return (0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, parentContext), { client: client || parentContext.client });\n }, [parentContext, client]);\n (0,globals/* invariant */.V1)(context.client, 46);\n return (rehackt.createElement(ApolloContext.Provider, { value: context }, children));\n};\n//# sourceMappingURL=ApolloProvider.js.map\n;// CONCATENATED MODULE: ./client/app/ror-auto-load-components/ApolloGraphQLApp.server.jsx\nvar ApolloGraphQLApp_server_jsxFileName = "/mnt/ssd/react_on_rails_pro/spec/dummy/client/app/ror-auto-load-components/ApolloGraphQLApp.server.jsx";\n\n\n\n\n\n/* harmony default export */ const ApolloGraphQLApp_server = (async (props, _railsContext) => {\n const {\n csrf,\n sessionCookie\n } = props.ssrOnlyProps;\n const client = new ApolloClient/* ApolloClient */.R({\n ssrMode: true,\n link: (0,createHttpLink/* createHttpLink */.$)({\n uri: \'http://localhost:3000/graphql\',\n headers: {\n \'X-CSRF-Token\': csrf,\n Cookie: `_dummy_session=${sessionCookie}`\n }\n }),\n cache: new inMemoryCache/* InMemoryCache */.D()\n });\n const App = /*#__PURE__*/react_default().createElement(ApolloProvider, {\n client: client,\n __self: undefined,\n __source: {\n fileName: ApolloGraphQLApp_server_jsxFileName,\n lineNumber: 21,\n columnNumber: 5\n }\n }, /*#__PURE__*/react_default().createElement(components_ApolloGraphQL, {\n __self: undefined,\n __source: {\n fileName: ApolloGraphQLApp_server_jsxFileName,\n lineNumber: 22,\n columnNumber: 7\n }\n }));\n const componentHtml = await getMarkupFromTree({\n renderFunction: server_node.renderToString,\n tree: App\n });\n const initialState = client.extract();\n\n // you need to return additional property `apolloStateTag`, to fulfill the state for hydration\n const apolloStateTag = (0,server_node.renderToString)( /*#__PURE__*/react_default().createElement("script", {\n dangerouslySetInnerHTML: {\n __html: `window.__APOLLO_STATE__=${JSON.stringify(initialState).replace(/</g, \'\\\\u003c\')};`\n },\n __self: undefined,\n __source: {\n fileName: ApolloGraphQLApp_server_jsxFileName,\n lineNumber: 35,\n columnNumber: 5\n }\n }));\n return {\n componentHtml,\n apolloStateTag\n };\n});\n;// CONCATENATED MODULE: ./client/app/components/ConsoleLogsInAsyncServer.jsx\nvar ConsoleLogsInAsyncServer_jsxFileName = "/mnt/ssd/react_on_rails_pro/spec/dummy/client/app/components/ConsoleLogsInAsyncServer.jsx";\n\nconst ConsoleLogsInAsyncServer = ({\n requestId\n}) => /*#__PURE__*/react_default().createElement("div", {\n __self: undefined,\n __source: {\n fileName: ConsoleLogsInAsyncServer_jsxFileName,\n lineNumber: 4,\n columnNumber: 3\n }\n}, /*#__PURE__*/react_default().createElement("h1", {\n __self: undefined,\n __source: {\n fileName: ConsoleLogsInAsyncServer_jsxFileName,\n lineNumber: 5,\n columnNumber: 5\n }\n}, "Console logs in async server"), /*#__PURE__*/react_default().createElement("p", {\n __self: undefined,\n __source: {\n fileName: ConsoleLogsInAsyncServer_jsxFileName,\n lineNumber: 6,\n columnNumber: 5\n }\n}, "Request ID: ", /*#__PURE__*/react_default().createElement("b", {\n __self: undefined,\n __source: {\n fileName: ConsoleLogsInAsyncServer_jsxFileName,\n lineNumber: 7,\n columnNumber: 19\n }\n}, requestId)), /*#__PURE__*/react_default().createElement("p", {\n __self: undefined,\n __source: {\n fileName: ConsoleLogsInAsyncServer_jsxFileName,\n lineNumber: 9,\n columnNumber: 5\n }\n}, "Request ID should prefix all console logs logged on the server. You shouldn\'t see more than one request ID in the console logs."), /*#__PURE__*/react_default().createElement("br", {\n __self: undefined,\n __source: {\n fileName: ConsoleLogsInAsyncServer_jsxFileName,\n lineNumber: 14,\n columnNumber: 5\n }\n}), /*#__PURE__*/react_default().createElement("div", {\n __self: undefined,\n __source: {\n fileName: ConsoleLogsInAsyncServer_jsxFileName,\n lineNumber: 16,\n columnNumber: 5\n }\n}, /*#__PURE__*/react_default().createElement("p", {\n __self: undefined,\n __source: {\n fileName: ConsoleLogsInAsyncServer_jsxFileName,\n lineNumber: 17,\n columnNumber: 7\n }\n}, "If ", /*#__PURE__*/react_default().createElement("code", {\n __self: undefined,\n __source: {\n fileName: ConsoleLogsInAsyncServer_jsxFileName,\n lineNumber: 18,\n columnNumber: 12\n }\n}, "replayServerAsyncOperationLogs"), " is set to ", /*#__PURE__*/react_default().createElement("code", {\n __self: undefined,\n __source: {\n fileName: ConsoleLogsInAsyncServer_jsxFileName,\n lineNumber: 18,\n columnNumber: 66\n }\n}, "true"), " (or not set at all because it\'s the default value), you should see all logs either logged in sync or async server operations."), /*#__PURE__*/react_default().createElement("p", {\n __self: undefined,\n __source: {\n fileName: ConsoleLogsInAsyncServer_jsxFileName,\n lineNumber: 22,\n columnNumber: 7\n }\n}, "So, you should see the following logs in the console:"), /*#__PURE__*/react_default().createElement("ul", {\n __self: undefined,\n __source: {\n fileName: ConsoleLogsInAsyncServer_jsxFileName,\n lineNumber: 23,\n columnNumber: 7\n }\n}, /*#__PURE__*/react_default().createElement("li", {\n __self: undefined,\n __source: {\n fileName: ConsoleLogsInAsyncServer_jsxFileName,\n lineNumber: 24,\n columnNumber: 9\n }\n}, "[SERVER][", requestId, "] Console log from Sync Server"), /*#__PURE__*/react_default().createElement("li", {\n __self: undefined,\n __source: {\n fileName: ConsoleLogsInAsyncServer_jsxFileName,\n lineNumber: 25,\n columnNumber: 9\n }\n}, "[SERVER][", requestId, "] Console log from Recursive Async Function at level <repeated 10 times>"), /*#__PURE__*/react_default().createElement("li", {\n __self: undefined,\n __source: {\n fileName: ConsoleLogsInAsyncServer_jsxFileName,\n lineNumber: 28,\n columnNumber: 9\n }\n}, "[SERVER][", requestId, "] Console log from Simple Async Function at iteration <repeated 10 times>"), /*#__PURE__*/react_default().createElement("li", {\n __self: undefined,\n __source: {\n fileName: ConsoleLogsInAsyncServer_jsxFileName,\n lineNumber: 31,\n columnNumber: 9\n }\n}, "[SERVER][", requestId, "] Console log from Async Server after calling async functions"))), /*#__PURE__*/react_default().createElement("br", {\n __self: undefined,\n __source: {\n fileName: ConsoleLogsInAsyncServer_jsxFileName,\n lineNumber: 35,\n columnNumber: 5\n }\n}), /*#__PURE__*/react_default().createElement("div", {\n __self: undefined,\n __source: {\n fileName: ConsoleLogsInAsyncServer_jsxFileName,\n lineNumber: 37,\n columnNumber: 5\n }\n}, /*#__PURE__*/react_default().createElement("p", {\n __self: undefined,\n __source: {\n fileName: ConsoleLogsInAsyncServer_jsxFileName,\n lineNumber: 38,\n columnNumber: 7\n }\n}, "If ", /*#__PURE__*/react_default().createElement("code", {\n __self: undefined,\n __source: {\n fileName: ConsoleLogsInAsyncServer_jsxFileName,\n lineNumber: 39,\n columnNumber: 12\n }\n}, "replayServerAsyncOperationLogs"), " is set to ", /*#__PURE__*/react_default().createElement("code", {\n __self: undefined,\n __source: {\n fileName: ConsoleLogsInAsyncServer_jsxFileName,\n lineNumber: 39,\n columnNumber: 66\n }\n}, "false"), ", you should see only logs from sync server operations."), /*#__PURE__*/react_default().createElement("p", {\n __self: undefined,\n __source: {\n fileName: ConsoleLogsInAsyncServer_jsxFileName,\n lineNumber: 43,\n columnNumber: 7\n }\n}, "So, you should see the following logs in the console:"), /*#__PURE__*/react_default().createElement("ul", {\n __self: undefined,\n __source: {\n fileName: ConsoleLogsInAsyncServer_jsxFileName,\n lineNumber: 44,\n columnNumber: 7\n }\n}, /*#__PURE__*/react_default().createElement("li", {\n __self: undefined,\n __source: {\n fileName: ConsoleLogsInAsyncServer_jsxFileName,\n lineNumber: 45,\n columnNumber: 9\n }\n}, "[SERVER][", requestId, "] Console log from Sync Server"))));\n/* harmony default export */ const components_ConsoleLogsInAsyncServer = (ConsoleLogsInAsyncServer);\n;// CONCATENATED MODULE: ./client/app/ror-auto-load-components/ConsoleLogsInAsyncServer.server.jsx\nvar ConsoleLogsInAsyncServer_server_jsxFileName = "/mnt/ssd/react_on_rails_pro/spec/dummy/client/app/ror-auto-load-components/ConsoleLogsInAsyncServer.server.jsx";\n\n\n\n/* harmony default export */ const ConsoleLogsInAsyncServer_server = (async ({\n requestId\n}, _railsContext) => {\n console.log(`[${requestId}] Console log from Sync Server`);\n const recursiveAsyncFunction = async (level = 0) => {\n await new Promise(resolve => setTimeout(resolve, 100));\n console.log(`[${requestId}] Console log from Recursive Async Function at level ${level}`);\n if (level < 10) {\n await recursiveAsyncFunction(level + 1);\n }\n };\n const loopCallOfAsyncFunction = async () => {\n const simpleAsyncFunction = async iteration => {\n await new Promise(resolve => setTimeout(resolve, 100));\n console.log(`[${requestId}] Console log from Simple Async Function at iteration ${iteration}`);\n };\n for (let i = 0; i < 10; i++) {\n await simpleAsyncFunction(i);\n }\n };\n await recursiveAsyncFunction();\n await loopCallOfAsyncFunction();\n console.log(`[${requestId}] Console log from Async Server after calling async functions`);\n return (0,server_node.renderToString)( /*#__PURE__*/react_default().createElement(components_ConsoleLogsInAsyncServer, {\n requestId: requestId,\n __self: undefined,\n __source: {\n fileName: ConsoleLogsInAsyncServer_server_jsxFileName,\n lineNumber: 31,\n columnNumber: 25\n }\n }));\n});\n;// CONCATENATED MODULE: ./node_modules/@shakacode/use-ssr-computation.runtime/lib/errorHandler.js\nclass InternalUseSSRComputationError extends Error {\n constructor(message, result) {\n super(message);\n this.name = \'InternalUseSSRComputationError\';\n this.result = result;\n }\n}\nclass UseSSRComputationError extends Error {\n constructor(message, dependencies, ssrComputationFile, error, partialResult) {\n super(message);\n this.name = \'UseSSRComputationError\';\n this.dependencies = dependencies;\n this.error = error;\n this.result = partialResult;\n this.ssrComputationFile = ssrComputationFile;\n }\n}\nlet errorHandler = () => { };\nconst setErrorHandler = (handler) => {\n errorHandler = handler;\n};\nconst handleError = (error) => {\n if (typeof errorHandler === \'function\') {\n errorHandler(error);\n }\n else {\n console.error(error);\n }\n};\nconst wrapErrorHandler = (useSSRComputation) => {\n return (...args) => {\n try {\n return useSSRComputation(...args);\n }\n catch (error) {\n let message = \'\';\n let result = null;\n if (error instanceof InternalUseSSRComputationError) {\n message = error.message;\n result = error.result;\n }\n else {\n message = String(error);\n }\n const [_, dependencies, __, relativePathToCwd] = args;\n const useSSRComputationError = new UseSSRComputationError(message, dependencies, relativePathToCwd, error, result);\n handleError(useSSRComputationError);\n return result;\n }\n };\n};\n\n;// CONCATENATED MODULE: ./node_modules/@shakacode/use-ssr-computation.runtime/lib/ssrCache.js\nlet ssrCache = {};\nconst setSSRCache = (newCache) => {\n ssrCache = newCache;\n};\nconst getSSRCache = () => {\n return ssrCache;\n};\n\n;// CONCATENATED MODULE: ./node_modules/@shakacode/use-ssr-computation.runtime/lib/utils.js\nconst NoResult = Symbol("NoResult");\nfunction isDependency(element) {\n return typeof element === \'number\' || typeof element === \'string\' || (typeof element === \'object\' && element.uniqueId !== undefined);\n}\nfunction parseDependencies(dependencies) {\n if (!Array.isArray(dependencies)) {\n throw new Error(\'Dependencies must be an array.\');\n }\n return dependencies.map((dependency) => {\n if (isDependency(dependency)) {\n return dependency;\n }\n throw new Error(`useSSRComputation: dependency ${dependency} is not a valid dependency object`);\n });\n}\nconst mapDependencyToValue = (dependency) => {\n if (typeof dependency === \'number\') {\n return dependency.toString();\n }\n if (typeof dependency === \'string\') {\n return dependency;\n }\n return dependency.uniqueId;\n};\nconst calculateCacheKey = (modulePath, dependencies) => {\n const dependenciesString = dependencies.map(mapDependencyToValue).join(\',\');\n return `${modulePath}::${dependenciesString}`;\n};\n\n;// CONCATENATED MODULE: ./node_modules/@shakacode/use-ssr-computation.runtime/lib/subscriptions.js\nlet fetchSubscriptions = () => undefined;\nlet fetchSubscriptionsPromise = new Promise((resolve) => {\n fetchSubscriptions = () => resolve();\n});\n// Used only in unit tests to reset the subscription state before the start of the next test. Not exported to the user.\nconst resetFetchingSubscriptionsForTesting = () => {\n fetchSubscriptions = () => undefined;\n fetchSubscriptionsPromise = new Promise((resolve) => {\n fetchSubscriptions = () => resolve();\n });\n};\nasync function runOnSubscriptionsResumed(callback) {\n await fetchSubscriptionsPromise;\n return callback();\n}\n\n;// CONCATENATED MODULE: ./node_modules/@shakacode/use-ssr-computation.runtime/lib/index.runtime.js\n\n\n\n\n\n// EXTERNAL MODULE: ./client/app/utils/lazyApollo.ts\nvar lazyApollo = __webpack_require__(2580);\n;// CONCATENATED MODULE: ./client/app/utils/dom.ts\nconst isSSR = typeof window === \'undefined\';\n;// CONCATENATED MODULE: ./client/app/ssr-computations/userQuery.ssr-computation.ts\n\n\n\n\nconst USER_QUERY = (0,graphql_tag_lib/* gql */.J1)`\n query User($id: ID!) {\n user(id: $id) {\n id\n name\n email\n }\n }\n`;\nconst preloadQuery = userId => {\n const apolloClient = (0,lazyApollo.getApolloClient)();\n if (!apolloClient) {\n throw new Error(\'Apollo client not found\');\n }\n return apolloClient.query({\n query: USER_QUERY,\n variables: {\n id: userId\n }\n });\n};\nconst compute = userId => {\n const initializedApolloClient = (0,lazyApollo.getApolloClient)();\n if (!initializedApolloClient && isSSR) {\n console.log(\'Apollo Client is not initialized on server-side before calling useSSRComputation\');\n }\n const apolloClient = initializedApolloClient ?? (0,lazyApollo.initializeApolloClient)();\n const data = apolloClient.cache.readQuery({\n query: USER_QUERY,\n variables: {\n id: userId\n }\n });\n return data ?? NoResult;\n};\nconst subscribe = (getCurrentResult, next, userId) => {\n const apolloClient = (0,lazyApollo.getApolloClient)();\n if (!apolloClient) {\n throw new Error(\'Apollo client not found\');\n }\n return apolloClient.watchQuery({\n query: USER_QUERY,\n variables: {\n id: userId\n }\n }).subscribe({\n next: result => {\n next(result.data);\n }\n });\n};\n;// CONCATENATED MODULE: ./node_modules/@shakacode/use-ssr-computation.runtime/lib/useSSRComputation_Server.js\n\n\n\nconst useSSRComputation_Server = (computationModule, dependencies, options, relativePathToCwd) => {\n const cache = getSSRCache();\n if (options.skip)\n return null;\n const result = computationModule.compute(...dependencies);\n if (result === NoResult) {\n throw new Error(\'The SSR Computation module must return a result on server side\');\n }\n // relativePathToCwd is used to make sure that the cache key is unique for each module\n // and it\'s not affected by the file that calls it\n const cacheKey = calculateCacheKey(relativePathToCwd, dependencies);\n cache[cacheKey] = {\n result,\n isSubscription: !!computationModule.subscribe,\n };\n return result;\n};\n/* harmony default export */ const lib_useSSRComputation_Server = (wrapErrorHandler(useSSRComputation_Server));\n\n;// CONCATENATED MODULE: ./client/app/utils/useLazyMutation.ts\n\n\nconst useLazyMutation = (loadMutation, options) => {\n const [result, setResult] = (0,react.useState)({\n loading: false\n });\n const currentOptions = (0,react.useRef)(options);\n currentOptions.current = options;\n const isMounted = (0,react.useRef)(true);\n (0,react.useEffect)(() => {\n return () => {\n isMounted.current = false;\n };\n }, []);\n const execute = (0,react.useCallback)(async variables => {\n fetchSubscriptions();\n setResult({\n loading: true\n });\n const [apolloClient, mutation] = await Promise.all([Promise.resolve(/* import() */).then(__webpack_require__.bind(__webpack_require__, 2580)).then(lazyApollo => lazyApollo.initializeApolloClient()), loadMutation()]);\n if (!isMounted.current) return;\n const result = await apolloClient.mutate({\n mutation,\n ...currentOptions.current,\n variables: {\n ...currentOptions.current?.variables,\n ...variables\n }\n });\n if (!isMounted.current) return;\n setResult({\n ...result,\n loading: false\n });\n }, [loadMutation]);\n return [execute, result];\n};\n;// CONCATENATED MODULE: ./client/app/components/LazyApolloGraphQL.tsx\nvar LazyApolloGraphQL_jsxFileName = "/mnt/ssd/react_on_rails_pro/spec/dummy/client/app/components/LazyApolloGraphQL.tsx";\n\n\n\n\n\nsetErrorHandler(error => {\n throw error;\n});\nconst UserPanel = () => {\n const [userId, setUserId] = (0,react.useState)(1);\n const newNameInputRef = (0,react.useRef)(null);\n const data = lib_useSSRComputation_Server(userQuery_ssr_computation_namespaceObject, [userId], {}, "client/app/ssr-computations/userQuery.ssr-computation");\n const [updateUserMutation, {\n errors: updateError,\n loading: updating\n }] = useLazyMutation(() => Promise.resolve(/* import() */).then(__webpack_require__.bind(__webpack_require__, 4766)).then(lazyApolloOperations => lazyApolloOperations.UPDATE_USER_MUTATION));\n const renderUserInfo = () => {\n if (!data) {\n return /*#__PURE__*/react_default().createElement("div", {\n __self: undefined,\n __source: {\n fileName: LazyApolloGraphQL_jsxFileName,\n lineNumber: 23,\n columnNumber: 14\n }\n }, "Loading...");\n }\n const {\n name,\n email\n } = data.user;\n return /*#__PURE__*/react_default().createElement("p", {\n __self: undefined,\n __source: {\n fileName: LazyApolloGraphQL_jsxFileName,\n lineNumber: 27,\n columnNumber: 7\n }\n }, /*#__PURE__*/react_default().createElement("b", {\n __self: undefined,\n __source: {\n fileName: LazyApolloGraphQL_jsxFileName,\n lineNumber: 28,\n columnNumber: 9\n }\n }, name, ": "), email);\n };\n const changeUser = () => {\n setUserId(prevState => prevState === 1 ? 2 : 1);\n };\n const updateUser = () => {\n const newName = newNameInputRef.current?.value;\n if (!newName) return;\n void updateUserMutation({\n newName: newName,\n userId: userId\n });\n };\n const buttonStyle = {\n background: \'rgba(51, 51, 51, 0.05)\',\n border: \'1px solid rgba(51, 51, 51, 0.1)\',\n borderRadius: \'4px\',\n padding: \'4px 8px\'\n };\n return /*#__PURE__*/react_default().createElement("div", {\n __self: undefined,\n __source: {\n fileName: LazyApolloGraphQL_jsxFileName,\n lineNumber: 51,\n columnNumber: 5\n }\n }, renderUserInfo(), /*#__PURE__*/react_default().createElement("button", {\n style: buttonStyle,\n onClick: changeUser,\n __self: undefined,\n __source: {\n fileName: LazyApolloGraphQL_jsxFileName,\n lineNumber: 53,\n columnNumber: 7\n }\n }, "Change User"), /*#__PURE__*/react_default().createElement("br", {\n __self: undefined,\n __source: {\n fileName: LazyApolloGraphQL_jsxFileName,\n lineNumber: 56,\n columnNumber: 7\n }\n }), /*#__PURE__*/react_default().createElement("br", {\n __self: undefined,\n __source: {\n fileName: LazyApolloGraphQL_jsxFileName,\n lineNumber: 57,\n columnNumber: 7\n }\n }), /*#__PURE__*/react_default().createElement("div", {\n __self: undefined,\n __source: {\n fileName: LazyApolloGraphQL_jsxFileName,\n lineNumber: 58,\n columnNumber: 7\n }\n }, /*#__PURE__*/react_default().createElement("b", {\n __self: undefined,\n __source: {\n fileName: LazyApolloGraphQL_jsxFileName,\n lineNumber: 59,\n columnNumber: 9\n }\n }, "Update User")), /*#__PURE__*/react_default().createElement("label", {\n __self: undefined,\n __source: {\n fileName: LazyApolloGraphQL_jsxFileName,\n lineNumber: 61,\n columnNumber: 7\n }\n }, "New User Name: "), /*#__PURE__*/react_default().createElement("input", {\n type: "text",\n ref: newNameInputRef,\n __self: undefined,\n __source: {\n fileName: LazyApolloGraphQL_jsxFileName,\n lineNumber: 62,\n columnNumber: 7\n }\n }), /*#__PURE__*/react_default().createElement("br", {\n __self: undefined,\n __source: {\n fileName: LazyApolloGraphQL_jsxFileName,\n lineNumber: 63,\n columnNumber: 7\n }\n }), /*#__PURE__*/react_default().createElement("button", {\n style: buttonStyle,\n className: "bg-blue-500 hover:bg-blue-700",\n onClick: updateUser,\n __self: undefined,\n __source: {\n fileName: LazyApolloGraphQL_jsxFileName,\n lineNumber: 64,\n columnNumber: 7\n }\n }, "Update User"), updating && /*#__PURE__*/react_default().createElement("div", {\n __self: undefined,\n __source: {\n fileName: LazyApolloGraphQL_jsxFileName,\n lineNumber: 68,\n columnNumber: 20\n }\n }, "Updating..."), updateError && /*#__PURE__*/react_default().createElement("div", {\n style: {\n color: \'red\'\n },\n __self: undefined,\n __source: {\n fileName: LazyApolloGraphQL_jsxFileName,\n lineNumber: 69,\n columnNumber: 23\n }\n }, "Error while updating User: ", updateError.toString()));\n};\nconst UserPanels = () => {\n return /*#__PURE__*/react_default().createElement("div", {\n style: {\n display: \'flex\',\n justifyContent: \'space-evenly\'\n },\n __self: undefined,\n __source: {\n fileName: LazyApolloGraphQL_jsxFileName,\n lineNumber: 76,\n columnNumber: 5\n }\n }, /*#__PURE__*/react_default().createElement(UserPanel, {\n __self: undefined,\n __source: {\n fileName: LazyApolloGraphQL_jsxFileName,\n lineNumber: 77,\n columnNumber: 7\n }\n }), /*#__PURE__*/react_default().createElement(UserPanel, {\n __self: undefined,\n __source: {\n fileName: LazyApolloGraphQL_jsxFileName,\n lineNumber: 78,\n columnNumber: 7\n }\n }));\n};\n/* harmony default export */ const LazyApolloGraphQL = (UserPanels);\n;// CONCATENATED MODULE: ./client/app/ror-auto-load-components/LazyApolloGraphQLApp.server.tsx\nvar LazyApolloGraphQLApp_server_jsxFileName = "/mnt/ssd/react_on_rails_pro/spec/dummy/client/app/ror-auto-load-components/LazyApolloGraphQLApp.server.tsx";\n\n\n\n\n\n\n\n\n/* harmony default export */ const LazyApolloGraphQLApp_server = (async (props, _railsContext) => {\n const {\n csrf,\n sessionCookie\n } = props.ssrOnlyProps;\n const client = new ApolloClient/* ApolloClient */.R({\n ssrMode: true,\n link: (0,createHttpLink/* createHttpLink */.$)({\n uri: \'http://localhost:3000/graphql\',\n headers: {\n \'X-CSRF-Token\': csrf,\n Cookie: `_dummy_session=${sessionCookie}`\n }\n }),\n cache: new inMemoryCache/* InMemoryCache */.D()\n });\n (0,lazyApollo.setApolloClient)(client);\n const App = /*#__PURE__*/react_default().createElement(LazyApolloGraphQL, {\n __self: undefined,\n __source: {\n fileName: LazyApolloGraphQLApp_server_jsxFileName,\n lineNumber: 32,\n columnNumber: 15\n }\n });\n\n // `ssr-computation` doesn\'t support async code on server side, so needs to preload the query before rendering\n await preloadQuery(1);\n const componentHtml = await getMarkupFromTree({\n renderFunction: server_node.renderToString,\n tree: App\n });\n const initialState = client.extract();\n\n // you need to return additional property `apolloStateTag`, to fulfill the state for hydration\n const apolloStateTag = (0,server_node.renderToString)( /*#__PURE__*/react_default().createElement("script", {\n dangerouslySetInnerHTML: {\n __html: `\n window.__APOLLO_STATE__=${JSON.stringify(initialState).replace(/</g, \'\\\\u003c\')};\n window.__SSR_COMPUTATION_CACHE=${JSON.stringify(getSSRCache())};\n `\n },\n __self: undefined,\n __source: {\n fileName: LazyApolloGraphQLApp_server_jsxFileName,\n lineNumber: 45,\n columnNumber: 5\n }\n }));\n return {\n componentHtml,\n apolloStateTag\n };\n});\n// EXTERNAL MODULE: ./node_modules/@loadable/server/lib/index.js\nvar server_lib = __webpack_require__(427);\n// EXTERNAL MODULE: ./node_modules/react-helmet/es/Helmet.js\nvar Helmet = __webpack_require__(8154);\n// EXTERNAL MODULE: ./node_modules/react-router-dom/dist/index.js\nvar dist = __webpack_require__(4976);\n// EXTERNAL MODULE: ./node_modules/react-router-dom/server.js\nvar server = __webpack_require__(3984);\n// EXTERNAL MODULE: ./node_modules/react-router/dist/index.js\nvar react_router_dist = __webpack_require__(7767);\n;// CONCATENATED MODULE: ./client/app/components/Loadable/ActiveLink.jsx\nvar ActiveLink_jsxFileName = "/mnt/ssd/react_on_rails_pro/spec/dummy/client/app/components/Loadable/ActiveLink.jsx";\n\n\nfunction ActiveLink({\n text,\n to\n}) {\n const match = (0,react_router_dist.useMatch)({\n path: to\n });\n return /*#__PURE__*/react_default().createElement("div", {\n className: match ? \'active\' : \'\',\n __self: this,\n __source: {\n fileName: ActiveLink_jsxFileName,\n lineNumber: 10,\n columnNumber: 5\n }\n }, match && \'> \', /*#__PURE__*/react_default().createElement(dist.Link, {\n to: to,\n __self: this,\n __source: {\n fileName: ActiveLink_jsxFileName,\n lineNumber: 12,\n columnNumber: 7\n }\n }, text));\n}\n/* harmony default export */ const Loadable_ActiveLink = (ActiveLink);\n;// CONCATENATED MODULE: ./client/app/components/Loadable/Header.jsx\nvar Header_jsxFileName = "/mnt/ssd/react_on_rails_pro/spec/dummy/client/app/components/Loadable/Header.jsx";\n\n\n\nconst Header = () => /*#__PURE__*/react_default().createElement("div", {\n __self: undefined,\n __source: {\n fileName: Header_jsxFileName,\n lineNumber: 6,\n columnNumber: 3\n }\n}, /*#__PURE__*/react_default().createElement(Helmet/* Helmet */.m, {\n __self: undefined,\n __source: {\n fileName: Header_jsxFileName,\n lineNumber: 7,\n columnNumber: 5\n }\n}, /*#__PURE__*/react_default().createElement("title", {\n __self: undefined,\n __source: {\n fileName: Header_jsxFileName,\n lineNumber: 8,\n columnNumber: 7\n }\n}, "Index Page")), /*#__PURE__*/react_default().createElement(Loadable_ActiveLink, {\n to: "/A",\n text: "Path A",\n __self: undefined,\n __source: {\n fileName: Header_jsxFileName,\n lineNumber: 10,\n columnNumber: 5\n }\n}), /*#__PURE__*/react_default().createElement(Loadable_ActiveLink, {\n to: "/B",\n text: "Path B",\n __self: undefined,\n __source: {\n fileName: Header_jsxFileName,\n lineNumber: 11,\n columnNumber: 5\n }\n}));\n/* harmony default export */ const Loadable_Header = (Header);\n// EXTERNAL MODULE: ./client/app/components/Loadable/routes/Routes.imports-loadable.jsx\nvar Routes_imports_loadable = __webpack_require__(8813);\n;// CONCATENATED MODULE: ./client/app/components/Loadable/routes/Routes.jsx\nvar Routes_jsxFileName = "/mnt/ssd/react_on_rails_pro/spec/dummy/client/app/components/Loadable/routes/Routes.jsx";\n\n\n\nclass LoadableRoutes extends (react_default()).PureComponent {\n render() {\n return /*#__PURE__*/react_default().createElement(react_router_dist.Routes, {\n __self: this,\n __source: {\n fileName: Routes_jsxFileName,\n lineNumber: 9,\n columnNumber: 7\n }\n }, /*#__PURE__*/react_default().createElement(react_router_dist.Route, {\n path: "A",\n Component: Routes_imports_loadable/* PageA */.$,\n __self: this,\n __source: {\n fileName: Routes_jsxFileName,\n lineNumber: 10,\n columnNumber: 9\n }\n }), /*#__PURE__*/react_default().createElement(react_router_dist.Route, {\n path: "B",\n Component: Routes_imports_loadable/* PageB */.i,\n __self: this,\n __source: {\n fileName: Routes_jsxFileName,\n lineNumber: 11,\n columnNumber: 9\n }\n }));\n }\n}\n/* harmony default export */ const Routes = (LoadableRoutes);\n// EXTERNAL MODULE: ./client/app/components/Loadable/letters/index.jsx\nvar letters = __webpack_require__(5211);\n;// CONCATENATED MODULE: ./client/app/loadable/LoadableApp.jsx\nvar LoadableApp_jsxFileName = "/mnt/ssd/react_on_rails_pro/spec/dummy/client/app/loadable/LoadableApp.jsx";\n\n\n\n\n\n\nconst basename = \'loadable\';\nconst LoadableApp = props => {\n if (typeof window === `undefined`) {\n return /*#__PURE__*/react_default().createElement(server/* StaticRouter */.kO, {\n basename: basename,\n location: props.path,\n context: {},\n __self: undefined,\n __source: {\n fileName: LoadableApp_jsxFileName,\n lineNumber: 14,\n columnNumber: 7\n }\n }, /*#__PURE__*/react_default().createElement(Loadable_Header, {\n __self: undefined,\n __source: {\n fileName: LoadableApp_jsxFileName,\n lineNumber: 15,\n columnNumber: 9\n }\n }), /*#__PURE__*/react_default().createElement(Routes, {\n __self: undefined,\n __source: {\n fileName: LoadableApp_jsxFileName,\n lineNumber: 16,\n columnNumber: 9\n }\n }), /*#__PURE__*/react_default().createElement(letters["default"], {\n __self: undefined,\n __source: {\n fileName: LoadableApp_jsxFileName,\n lineNumber: 17,\n columnNumber: 9\n }\n }));\n }\n return /*#__PURE__*/react_default().createElement(dist.BrowserRouter, {\n basename: basename,\n __self: undefined,\n __source: {\n fileName: LoadableApp_jsxFileName,\n lineNumber: 22,\n columnNumber: 5\n }\n }, /*#__PURE__*/react_default().createElement(Loadable_Header, {\n __self: undefined,\n __source: {\n fileName: LoadableApp_jsxFileName,\n lineNumber: 23,\n columnNumber: 7\n }\n }), /*#__PURE__*/react_default().createElement(Routes, {\n __self: undefined,\n __source: {\n fileName: LoadableApp_jsxFileName,\n lineNumber: 24,\n columnNumber: 7\n }\n }), /*#__PURE__*/react_default().createElement(letters["default"], {\n __self: undefined,\n __source: {\n fileName: LoadableApp_jsxFileName,\n lineNumber: 25,\n columnNumber: 7\n }\n }));\n};\n/* harmony default export */ const loadable_LoadableApp = (LoadableApp);\n;// CONCATENATED MODULE: ./client/app/loadable/loadable-server.imports-loadable.jsx\nvar loadable_server_imports_loadable_jsxFileName = "/mnt/ssd/react_on_rails_pro/spec/dummy/client/app/loadable/loadable-server.imports-loadable.jsx";\n\n\n\n\n\nconst loadableApp = (props, railsContext) => {\n const path = __webpack_require__(6928);\n\n // Note, React on Rails Pro copies the loadable-stats.json to the same place as the\n // server-bundle.js. Thus, the __dirname of this code is where we can find loadable-stats.json.\n const statsFile = path.resolve(__dirname, \'loadable-stats.json\');\n const extractor = new server_lib/* ChunkExtractor */.ky({\n entrypoints: [\'client-bundle\'],\n statsFile\n });\n const {\n pathname\n } = railsContext;\n const componentHtml = (0,server_node.renderToString)(extractor.collectChunks( /*#__PURE__*/react_default().createElement(loadable_LoadableApp, Object.assign({}, props, {\n path: pathname,\n __self: undefined,\n __source: {\n fileName: loadable_server_imports_loadable_jsxFileName,\n lineNumber: 16,\n columnNumber: 64\n }\n }))));\n const helmet = Helmet/* Helmet */.m.renderStatic();\n return {\n renderedHtml: {\n componentHtml,\n link: helmet.link.toString(),\n linkTags: extractor.getLinkTags(),\n styleTags: extractor.getStyleTags(),\n meta: helmet.meta.toString(),\n scriptTags: extractor.getScriptTags(),\n style: helmet.style.toString(),\n title: helmet.title.toString()\n }\n };\n};\n/* harmony default export */ const loadable_server_imports_loadable = (loadableApp);\n;// CONCATENATED MODULE: ./client/app/ror-auto-load-components/Loadable.server.jsx\n\n// EXTERNAL MODULE: ./node_modules/cross-fetch/dist/node-polyfill.js\nvar node_polyfill = __webpack_require__(7143);\n;// CONCATENATED MODULE: ./client/app/utils/json.ts\nconst consistentKeysReplacer = (key, value) => {\n if (value instanceof Object && !(value instanceof Array)) {\n const sortedObject = Object.keys(value).sort().reduce((sorted, currentKey) => {\n const keyValue = value[currentKey];\n sorted[currentKey] = keyValue;\n return sorted;\n }, {});\n return sortedObject;\n }\n return value;\n};\n;// CONCATENATED MODULE: ./client/app/components/ReactHelmet.jsx\nvar ReactHelmet_jsxFileName = "/mnt/ssd/react_on_rails_pro/spec/dummy/client/app/components/ReactHelmet.jsx";\n\n\n\n\nconst ReactHelmet = props => /*#__PURE__*/react_default().createElement("div", {\n __self: undefined,\n __source: {\n fileName: ReactHelmet_jsxFileName,\n lineNumber: 6,\n columnNumber: 3\n }\n}, /*#__PURE__*/react_default().createElement(Helmet/* Helmet */.m, {\n __self: undefined,\n __source: {\n fileName: ReactHelmet_jsxFileName,\n lineNumber: 7,\n columnNumber: 5\n }\n}, /*#__PURE__*/react_default().createElement("title", {\n __self: undefined,\n __source: {\n fileName: ReactHelmet_jsxFileName,\n lineNumber: 8,\n columnNumber: 7\n }\n}, "Custom page title")), "Props: ", JSON.stringify(props, consistentKeysReplacer), /*#__PURE__*/react_default().createElement(ror_auto_load_components_HelloWorld, Object.assign({}, props, {\n __self: undefined,\n __source: {\n fileName: ReactHelmet_jsxFileName,\n lineNumber: 11,\n columnNumber: 5\n }\n})), /*#__PURE__*/react_default().createElement("div", {\n __self: undefined,\n __source: {\n fileName: ReactHelmet_jsxFileName,\n lineNumber: 12,\n columnNumber: 5\n }\n}, "result from api request during server rendering:", \' \', JSON.stringify(props.apiRequestResponse, consistentKeysReplacer)));\n/* harmony default export */ const components_ReactHelmet = (ReactHelmet);\n;// CONCATENATED MODULE: ./client/app/ror-auto-load-components/ReactHelmetApp.server.jsx\nvar ReactHelmetApp_server_jsxFileName = "/mnt/ssd/react_on_rails_pro/spec/dummy/client/app/ror-auto-load-components/ReactHelmetApp.server.jsx";\n\n\n// Top level component for simple client side only rendering\n\n\n\n\n\n/*\n * Export a function that takes the props and returns an object with { renderedHtml }\n * This example shows returning renderedHtml as an object itself that contains rendered\n * component markup and additional HTML strings.\n *\n * This is imported as "ReactHelmetApp" by "serverRegistration.jsx". Note that rendered\n * component markup must go under "componentHtml" key.\n */\n/* harmony default export */ const ReactHelmetApp_server = (async (props, railsContext) => {\n const portSuffix = railsContext.port ? `:${railsContext.port}` : \'\';\n const apiRequestResponse = await fetch(`https://api.nationalize.io/?name=ReactOnRails`).then(function (response) {\n if (response.status >= 400) {\n throw new Error(\'Bad response from server\');\n }\n return response.json();\n }).catch(error => console.error(`There was an error doing an API request during server rendering: ${error}`));\n const componentHtml = (0,server_node.renderToString)( /*#__PURE__*/react_default().createElement(components_ReactHelmet, Object.assign({}, props, {\n apiRequestResponse: apiRequestResponse,\n __self: undefined,\n __source: {\n fileName: ReactHelmetApp_server_jsxFileName,\n lineNumber: 30,\n columnNumber: 40\n }\n })));\n const helmet = Helmet/* Helmet */.m.renderStatic();\n const promiseObject = {\n componentHtml,\n title: helmet.title.toString()\n };\n return promiseObject;\n});\n;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/typeof.js\nfunction _typeof(o) {\n "@babel/helpers - typeof";\n\n return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;\n }, _typeof(o);\n}\n\n;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toPrimitive.js\n\nfunction toPrimitive(t, r) {\n if ("object" != _typeof(t) || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || "default");\n if ("object" != _typeof(i)) return i;\n throw new TypeError("@@toPrimitive must return a primitive value.");\n }\n return ("string" === r ? String : Number)(t);\n}\n\n;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js\n\n\nfunction toPropertyKey(t) {\n var i = toPrimitive(t, "string");\n return "symbol" == _typeof(i) ? i : i + "";\n}\n\n;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js\n\nfunction _defineProperty(e, r, t) {\n return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {\n value: t,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }) : e[r] = t, e;\n}\n\n;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js\n\nfunction ownKeys(e, r) {\n var t = Object.keys(e);\n if (Object.getOwnPropertySymbols) {\n var o = Object.getOwnPropertySymbols(e);\n r && (o = o.filter(function (r) {\n return Object.getOwnPropertyDescriptor(e, r).enumerable;\n })), t.push.apply(t, o);\n }\n return t;\n}\nfunction _objectSpread2(e) {\n for (var r = 1; r < arguments.length; r++) {\n var t = null != arguments[r] ? arguments[r] : {};\n r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {\n _defineProperty(e, r, t[r]);\n }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {\n Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));\n });\n }\n return e;\n}\n\n;// CONCATENATED MODULE: ./node_modules/redux/es/redux.js\n\n\n/**\n * Adapted from React: https://github.com/facebook/react/blob/master/packages/shared/formatProdErrorMessage.js\n *\n * Do not require this module directly! Use normal throw error calls. These messages will be replaced with error codes\n * during build.\n * @param {number} code\n */\nfunction formatProdErrorMessage(code) {\n return "Minified Redux error #" + code + "; visit https://redux.js.org/Errors?code=" + code + " for the full message or " + \'use the non-minified dev environment for full errors. \';\n}\n\n// Inlined version of the `symbol-observable` polyfill\nvar $$observable = (function () {\n return typeof Symbol === \'function\' && Symbol.observable || \'@@observable\';\n})();\n\n/**\n * These are private action types reserved by Redux.\n * For any unknown actions, you must return the current state.\n * If the current state is undefined, you must return the initial state.\n * Do not reference these action types directly in your code.\n */\nvar randomString = function randomString() {\n return Math.random().toString(36).substring(7).split(\'\').join(\'.\');\n};\n\nvar ActionTypes = {\n INIT: "@@redux/INIT" + randomString(),\n REPLACE: "@@redux/REPLACE" + randomString(),\n PROBE_UNKNOWN_ACTION: function PROBE_UNKNOWN_ACTION() {\n return "@@redux/PROBE_UNKNOWN_ACTION" + randomString();\n }\n};\n\n/**\n * @param {any} obj The object to inspect.\n * @returns {boolean} True if the argument appears to be a plain object.\n */\nfunction isPlainObject(obj) {\n if (typeof obj !== \'object\' || obj === null) return false;\n var proto = obj;\n\n while (Object.getPrototypeOf(proto) !== null) {\n proto = Object.getPrototypeOf(proto);\n }\n\n return Object.getPrototypeOf(obj) === proto;\n}\n\n// Inlined / shortened version of `kindOf` from https://github.com/jonschlinkert/kind-of\nfunction miniKindOf(val) {\n if (val === void 0) return \'undefined\';\n if (val === null) return \'null\';\n var type = typeof val;\n\n switch (type) {\n case \'boolean\':\n case \'string\':\n case \'number\':\n case \'symbol\':\n case \'function\':\n {\n return type;\n }\n }\n\n if (Array.isArray(val)) return \'array\';\n if (isDate(val)) return \'date\';\n if (isError(val)) return \'error\';\n var constructorName = ctorName(val);\n\n switch (constructorName) {\n case \'Symbol\':\n case \'Promise\':\n case \'WeakMap\':\n case \'WeakSet\':\n case \'Map\':\n case \'Set\':\n return constructorName;\n } // other\n\n\n return type.slice(8, -1).toLowerCase().replace(/\\s/g, \'\');\n}\n\nfunction ctorName(val) {\n return typeof val.constructor === \'function\' ? val.constructor.name : null;\n}\n\nfunction isError(val) {\n return val instanceof Error || typeof val.message === \'string\' && val.constructor && typeof val.constructor.stackTraceLimit === \'number\';\n}\n\nfunction isDate(val) {\n if (val instanceof Date) return true;\n return typeof val.toDateString === \'function\' && typeof val.getDate === \'function\' && typeof val.setDate === \'function\';\n}\n\nfunction kindOf(val) {\n var typeOfVal = typeof val;\n\n if (true) {\n typeOfVal = miniKindOf(val);\n }\n\n return typeOfVal;\n}\n\n/**\n * @deprecated\n *\n * **We recommend using the `configureStore` method\n * of the `@reduxjs/toolkit` package**, which replaces `createStore`.\n *\n * Redux Toolkit is our recommended approach for writing Redux logic today,\n * including store setup, reducers, data fetching, and more.\n *\n * **For more details, please read this Redux docs page:**\n * **https://redux.js.org/introduction/why-rtk-is-redux-today**\n *\n * `configureStore` from Redux Toolkit is an improved version of `createStore` that\n * simplifies setup and helps avoid common bugs.\n *\n * You should not be using the `redux` core package by itself today, except for learning purposes.\n * The `createStore` method from the core `redux` package will not be removed, but we encourage\n * all users to migrate to using Redux Toolkit for all Redux code.\n *\n * If you want to use `createStore` without this visual deprecation warning, use\n * the `legacy_createStore` import instead:\n *\n * `import { legacy_createStore as createStore} from \'redux\'`\n *\n */\n\nfunction createStore(reducer, preloadedState, enhancer) {\n var _ref2;\n\n if (typeof preloadedState === \'function\' && typeof enhancer === \'function\' || typeof enhancer === \'function\' && typeof arguments[3] === \'function\') {\n throw new Error( false ? 0 : \'It looks like you are passing several store enhancers to \' + \'createStore(). This is not supported. Instead, compose them \' + \'together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.\');\n }\n\n if (typeof preloadedState === \'function\' && typeof enhancer === \'undefined\') {\n enhancer = preloadedState;\n preloadedState = undefined;\n }\n\n if (typeof enhancer !== \'undefined\') {\n if (typeof enhancer !== \'function\') {\n throw new Error( false ? 0 : "Expected the enhancer to be a function. Instead, received: \'" + kindOf(enhancer) + "\'");\n }\n\n return enhancer(createStore)(reducer, preloadedState);\n }\n\n if (typeof reducer !== \'function\') {\n throw new Error( false ? 0 : "Expected the root reducer to be a function. Instead, received: \'" + kindOf(reducer) + "\'");\n }\n\n var currentReducer = reducer;\n var currentState = preloadedState;\n var currentListeners = [];\n var nextListeners = currentListeners;\n var isDispatching = false;\n /**\n * This makes a shallow copy of currentListeners so we can use\n * nextListeners as a temporary list while dispatching.\n *\n * This prevents any bugs around consumers calling\n * subscribe/unsubscribe in the middle of a dispatch.\n */\n\n function ensureCanMutateNextListeners() {\n if (nextListeners === currentListeners) {\n nextListeners = currentListeners.slice();\n }\n }\n /**\n * Reads the state tree managed by the store.\n *\n * @returns {any} The current state tree of your application.\n */\n\n\n function getState() {\n if (isDispatching) {\n throw new Error( false ? 0 : \'You may not call store.getState() while the reducer is executing. \' + \'The reducer has already received the state as an argument. \' + \'Pass it down from the top reducer instead of reading it from the store.\');\n }\n\n return currentState;\n }\n /**\n * Adds a change listener. It will be called any time an action is dispatched,\n * and some part of the state tree may potentially have changed. You may then\n * call `getState()` to read the current state tree inside the callback.\n *\n * You may call `dispatch()` from a change listener, with the following\n * caveats:\n *\n * 1. The subscriptions are snapshotted just before every `dispatch()` call.\n * If you subscribe or unsubscribe while the listeners are being invoked, this\n * will not have any effect on the `dispatch()` that is currently in progress.\n * However, the next `dispatch()` call, whether nested or not, will use a more\n * recent snapshot of the subscription list.\n *\n * 2. The listener should not expect to see all state changes, as the state\n * might have been updated multiple times during a nested `dispatch()` before\n * the listener is called. It is, however, guaranteed that all subscribers\n * registered before the `dispatch()` started will be called with the latest\n * state by the time it exits.\n *\n * @param {Function} listener A callback to be invoked on every dispatch.\n * @returns {Function} A function to remove this change listener.\n */\n\n\n function subscribe(listener) {\n if (typeof listener !== \'function\') {\n throw new Error( false ? 0 : "Expected the listener to be a function. Instead, received: \'" + kindOf(listener) + "\'");\n }\n\n if (isDispatching) {\n throw new Error( false ? 0 : \'You may not call store.subscribe() while the reducer is executing. \' + \'If you would like to be notified after the store has been updated, subscribe from a \' + \'component and invoke store.getState() in the callback to access the latest state. \' + \'See https://redux.js.org/api/store#subscribelistener for more details.\');\n }\n\n var isSubscribed = true;\n ensureCanMutateNextListeners();\n nextListeners.push(listener);\n return function unsubscribe() {\n if (!isSubscribed) {\n return;\n }\n\n if (isDispatching) {\n throw new Error( false ? 0 : \'You may not unsubscribe from a store listener while the reducer is executing. \' + \'See https://redux.js.org/api/store#subscribelistener for more details.\');\n }\n\n isSubscribed = false;\n ensureCanMutateNextListeners();\n var index = nextListeners.indexOf(listener);\n nextListeners.splice(index, 1);\n currentListeners = null;\n };\n }\n /**\n * Dispatches an action. It is the only way to trigger a state change.\n *\n * The `reducer` function, used to create the store, will be called with the\n * current state tree and the given `action`. Its return value will\n * be considered the **next** state of the tree, and the change listeners\n * will be notified.\n *\n * The base implementation only supports plain object actions. If you want to\n * dispatch a Promise, an Observable, a thunk, or something else, you need to\n * wrap your store creating function into the corresponding middleware. For\n * example, see the documentation for the `redux-thunk` package. Even the\n * middleware will eventually dispatch plain object actions using this method.\n *\n * @param {Object} action A plain object representing “what changed”. It is\n * a good idea to keep actions serializable so you can record and replay user\n * sessions, or use the time travelling `redux-devtools`. An action must have\n * a `type` property which may not be `undefined`. It is a good idea to use\n * string constants for action types.\n *\n * @returns {Object} For convenience, the same action object you dispatched.\n *\n * Note that, if you use a custom middleware, it may wrap `dispatch()` to\n * return something else (for example, a Promise you can await).\n */\n\n\n function dispatch(action) {\n if (!isPlainObject(action)) {\n throw new Error( false ? 0 : "Actions must be plain objects. Instead, the actual type was: \'" + kindOf(action) + "\'. You may need to add middleware to your store setup to handle dispatching other values, such as \'redux-thunk\' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.");\n }\n\n if (typeof action.type === \'undefined\') {\n throw new Error( false ? 0 : \'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.\');\n }\n\n if (isDispatching) {\n throw new Error( false ? 0 : \'Reducers may not dispatch actions.\');\n }\n\n try {\n isDispatching = true;\n currentState = currentReducer(currentState, action);\n } finally {\n isDispatching = false;\n }\n\n var listeners = currentListeners = nextListeners;\n\n for (var i = 0; i < listeners.length; i++) {\n var listener = listeners[i];\n listener();\n }\n\n return action;\n }\n /**\n * Replaces the reducer currently used by the store to calculate the state.\n *\n * You might need this if your app implements code splitting and you want to\n * load some of the reducers dynamically. You might also need this if you\n * implement a hot reloading mechanism for Redux.\n *\n * @param {Function} nextReducer The reducer for the store to use instead.\n * @returns {void}\n */\n\n\n function replaceReducer(nextReducer) {\n if (typeof nextReducer !== \'function\') {\n throw new Error( false ? 0 : "Expected the nextReducer to be a function. Instead, received: \'" + kindOf(nextReducer));\n }\n\n currentReducer = nextReducer; // This action has a similiar effect to ActionTypes.INIT.\n // Any reducers that existed in both the new and old rootReducer\n // will receive the previous state. This effectively populates\n // the new state tree with any relevant data from the old one.\n\n dispatch({\n type: ActionTypes.REPLACE\n });\n }\n /**\n * Interoperability point for observable/reactive libraries.\n * @returns {observable} A minimal observable of state changes.\n * For more information, see the observable proposal:\n * https://github.com/tc39/proposal-observable\n */\n\n\n function observable() {\n var _ref;\n\n var outerSubscribe = subscribe;\n return _ref = {\n /**\n * The minimal observable subscription method.\n * @param {Object} observer Any object that can be used as an observer.\n * The observer object should have a `next` method.\n * @returns {subscription} An object with an `unsubscribe` method that can\n * be used to unsubscribe the observable from the store, and prevent further\n * emission of values from the observable.\n */\n subscribe: function subscribe(observer) {\n if (typeof observer !== \'object\' || observer === null) {\n throw new Error( false ? 0 : "Expected the observer to be an object. Instead, received: \'" + kindOf(observer) + "\'");\n }\n\n function observeState() {\n if (observer.next) {\n observer.next(getState());\n }\n }\n\n observeState();\n var unsubscribe = outerSubscribe(observeState);\n return {\n unsubscribe: unsubscribe\n };\n }\n }, _ref[$$observable] = function () {\n return this;\n }, _ref;\n } // When a store is created, an "INIT" action is dispatched so that every\n // reducer returns their initial state. This effectively populates\n // the initial state tree.\n\n\n dispatch({\n type: ActionTypes.INIT\n });\n return _ref2 = {\n dispatch: dispatch,\n subscribe: subscribe,\n getState: getState,\n replaceReducer: replaceReducer\n }, _ref2[$$observable] = observable, _ref2;\n}\n/**\n * Creates a Redux store that holds the state tree.\n *\n * **We recommend using `configureStore` from the\n * `@reduxjs/toolkit` package**, which replaces `createStore`:\n * **https://redux.js.org/introduction/why-rtk-is-redux-today**\n *\n * The only way to change the data in the store is to call `dispatch()` on it.\n *\n * There should only be a single store in your app. To specify how different\n * parts of the state tree respond to actions, you may combine several reducers\n * into a single reducer function by using `combineReducers`.\n *\n * @param {Function} reducer A function that returns the next state tree, given\n * the current state tree and the action to handle.\n *\n * @param {any} [preloadedState] The initial state. You may optionally specify it\n * to hydrate the state from the server in universal apps, or to restore a\n * previously serialized user session.\n * If you use `combineReducers` to produce the root reducer function, this must be\n * an object with the same shape as `combineReducers` keys.\n *\n * @param {Function} [enhancer] The store enhancer. You may optionally specify it\n * to enhance the store with third-party capabilities such as middleware,\n * time travel, persistence, etc. The only store enhancer that ships with Redux\n * is `applyMiddleware()`.\n *\n * @returns {Store} A Redux store that lets you read the state, dispatch actions\n * and subscribe to changes.\n */\n\nvar legacy_createStore = (/* unused pure expression or super */ null && (createStore));\n\n/**\n * Prints a warning in the console if it exists.\n *\n * @param {String} message The warning message.\n * @returns {void}\n */\nfunction warning(message) {\n /* eslint-disable no-console */\n if (typeof console !== \'undefined\' && typeof console.error === \'function\') {\n console.error(message);\n }\n /* eslint-enable no-console */\n\n\n try {\n // This error was thrown as a convenience so that if you enable\n // "break on all exceptions" in your console,\n // it would pause the execution at this line.\n throw new Error(message);\n } catch (e) {} // eslint-disable-line no-empty\n\n}\n\nfunction getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) {\n var reducerKeys = Object.keys(reducers);\n var argumentName = action && action.type === ActionTypes.INIT ? \'preloadedState argument passed to createStore\' : \'previous state received by the reducer\';\n\n if (reducerKeys.length === 0) {\n return \'Store does not have a valid reducer. Make sure the argument passed \' + \'to combineReducers is an object whose values are reducers.\';\n }\n\n if (!isPlainObject(inputState)) {\n return "The " + argumentName + " has unexpected type of \\"" + kindOf(inputState) + "\\". Expected argument to be an object with the following " + ("keys: \\"" + reducerKeys.join(\'", "\') + "\\"");\n }\n\n var unexpectedKeys = Object.keys(inputState).filter(function (key) {\n return !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key];\n });\n unexpectedKeys.forEach(function (key) {\n unexpectedKeyCache[key] = true;\n });\n if (action && action.type === ActionTypes.REPLACE) return;\n\n if (unexpectedKeys.length > 0) {\n return "Unexpected " + (unexpectedKeys.length > 1 ? \'keys\' : \'key\') + " " + ("\\"" + unexpectedKeys.join(\'", "\') + "\\" found in " + argumentName + ". ") + "Expected to find one of the known reducer keys instead: " + ("\\"" + reducerKeys.join(\'", "\') + "\\". Unexpected keys will be ignored.");\n }\n}\n\nfunction assertReducerShape(reducers) {\n Object.keys(reducers).forEach(function (key) {\n var reducer = reducers[key];\n var initialState = reducer(undefined, {\n type: ActionTypes.INIT\n });\n\n if (typeof initialState === \'undefined\') {\n throw new Error( false ? 0 : "The slice reducer for key \\"" + key + "\\" returned undefined during initialization. " + "If the state passed to the reducer is undefined, you must " + "explicitly return the initial state. The initial state may " + "not be undefined. If you don\'t want to set a value for this reducer, " + "you can use null instead of undefined.");\n }\n\n if (typeof reducer(undefined, {\n type: ActionTypes.PROBE_UNKNOWN_ACTION()\n }) === \'undefined\') {\n throw new Error( false ? 0 : "The slice reducer for key \\"" + key + "\\" returned undefined when probed with a random type. " + ("Don\'t try to handle \'" + ActionTypes.INIT + "\' or other actions in \\"redux/*\\" ") + "namespace. They are considered private. Instead, you must return the " + "current state for any unknown actions, unless it is undefined, " + "in which case you must return the initial state, regardless of the " + "action type. The initial state may not be undefined, but can be null.");\n }\n });\n}\n/**\n * Turns an object whose values are different reducer functions, into a single\n * reducer function. It will call every child reducer, and gather their results\n * into a single state object, whose keys correspond to the keys of the passed\n * reducer functions.\n *\n * @param {Object} reducers An object whose values correspond to different\n * reducer functions that need to be combined into one. One handy way to obtain\n * it is to use ES6 `import * as reducers` syntax. The reducers may never return\n * undefined for any action. Instead, they should return their initial state\n * if the state passed to them was undefined, and the current state for any\n * unrecognized action.\n *\n * @returns {Function} A reducer function that invokes every reducer inside the\n * passed object, and builds a state object with the same shape.\n */\n\n\nfunction combineReducers(reducers) {\n var reducerKeys = Object.keys(reducers);\n var finalReducers = {};\n\n for (var i = 0; i < reducerKeys.length; i++) {\n var key = reducerKeys[i];\n\n if (true) {\n if (typeof reducers[key] === \'undefined\') {\n warning("No reducer provided for key \\"" + key + "\\"");\n }\n }\n\n if (typeof reducers[key] === \'function\') {\n finalReducers[key] = reducers[key];\n }\n }\n\n var finalReducerKeys = Object.keys(finalReducers); // This is used to make sure we don\'t warn about the same\n // keys multiple times.\n\n var unexpectedKeyCache;\n\n if (true) {\n unexpectedKeyCache = {};\n }\n\n var shapeAssertionError;\n\n try {\n assertReducerShape(finalReducers);\n } catch (e) {\n shapeAssertionError = e;\n }\n\n return function combination(state, action) {\n if (state === void 0) {\n state = {};\n }\n\n if (shapeAssertionError) {\n throw shapeAssertionError;\n }\n\n if (true) {\n var warningMessage = getUnexpectedStateShapeWarningMessage(state, finalReducers, action, unexpectedKeyCache);\n\n if (warningMessage) {\n warning(warningMessage);\n }\n }\n\n var hasChanged = false;\n var nextState = {};\n\n for (var _i = 0; _i < finalReducerKeys.length; _i++) {\n var _key = finalReducerKeys[_i];\n var reducer = finalReducers[_key];\n var previousStateForKey = state[_key];\n var nextStateForKey = reducer(previousStateForKey, action);\n\n if (typeof nextStateForKey === \'undefined\') {\n var actionType = action && action.type;\n throw new Error( false ? 0 : "When called with an action of type " + (actionType ? "\\"" + String(actionType) + "\\"" : \'(unknown type)\') + ", the slice reducer for key \\"" + _key + "\\" returned undefined. " + "To ignore an action, you must explicitly return the previous state. " + "If you want this reducer to hold no value, you can return null instead of undefined.");\n }\n\n nextState[_key] = nextStateForKey;\n hasChanged = hasChanged || nextStateForKey !== previousStateForKey;\n }\n\n hasChanged = hasChanged || finalReducerKeys.length !== Object.keys(state).length;\n return hasChanged ? nextState : state;\n };\n}\n\nfunction bindActionCreator(actionCreator, dispatch) {\n return function () {\n return dispatch(actionCreator.apply(this, arguments));\n };\n}\n/**\n * Turns an object whose values are action creators, into an object with the\n * same keys, but with every function wrapped into a `dispatch` call so they\n * may be invoked directly. This is just a convenience method, as you can call\n * `store.dispatch(MyActionCreators.doSomething())` yourself just fine.\n *\n * For convenience, you can also pass an action creator as the first argument,\n * and get a dispatch wrapped function in return.\n *\n * @param {Function|Object} actionCreators An object whose values are action\n * creator functions. One handy way to obtain it is to use ES6 `import * as`\n * syntax. You may also pass a single function.\n *\n * @param {Function} dispatch The `dispatch` function available on your Redux\n * store.\n *\n * @returns {Function|Object} The object mimicking the original object, but with\n * every action creator wrapped into the `dispatch` call. If you passed a\n * function as `actionCreators`, the return value will also be a single\n * function.\n */\n\n\nfunction bindActionCreators(actionCreators, dispatch) {\n if (typeof actionCreators === \'function\') {\n return bindActionCreator(actionCreators, dispatch);\n }\n\n if (typeof actionCreators !== \'object\' || actionCreators === null) {\n throw new Error( false ? 0 : "bindActionCreators expected an object or a function, but instead received: \'" + kindOf(actionCreators) + "\'. " + "Did you write \\"import ActionCreators from\\" instead of \\"import * as ActionCreators from\\"?");\n }\n\n var boundActionCreators = {};\n\n for (var key in actionCreators) {\n var actionCreator = actionCreators[key];\n\n if (typeof actionCreator === \'function\') {\n boundActionCreators[key] = bindActionCreator(actionCreator, dispatch);\n }\n }\n\n return boundActionCreators;\n}\n\n/**\n * Composes single-argument functions from right to left. The rightmost\n * function can take multiple arguments as it provides the signature for\n * the resulting composite function.\n *\n * @param {...Function} funcs The functions to compose.\n * @returns {Function} A function obtained by composing the argument functions\n * from right to left. For example, compose(f, g, h) is identical to doing\n * (...args) => f(g(h(...args))).\n */\nfunction compose() {\n for (var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++) {\n funcs[_key] = arguments[_key];\n }\n\n if (funcs.length === 0) {\n return function (arg) {\n return arg;\n };\n }\n\n if (funcs.length === 1) {\n return funcs[0];\n }\n\n return funcs.reduce(function (a, b) {\n return function () {\n return a(b.apply(void 0, arguments));\n };\n });\n}\n\n/**\n * Creates a store enhancer that applies middleware to the dispatch method\n * of the Redux store. This is handy for a variety of tasks, such as expressing\n * asynchronous actions in a concise manner, or logging every action payload.\n *\n * See `redux-thunk` package as an example of the Redux middleware.\n *\n * Because middleware is potentially asynchronous, this should be the first\n * store enhancer in the composition chain.\n *\n * Note that each middleware will be given the `dispatch` and `getState` functions\n * as named arguments.\n *\n * @param {...Function} middlewares The middleware chain to be applied.\n * @returns {Function} A store enhancer applying the middleware.\n */\n\nfunction applyMiddleware() {\n for (var _len = arguments.length, middlewares = new Array(_len), _key = 0; _key < _len; _key++) {\n middlewares[_key] = arguments[_key];\n }\n\n return function (createStore) {\n return function () {\n var store = createStore.apply(void 0, arguments);\n\n var _dispatch = function dispatch() {\n throw new Error( false ? 0 : \'Dispatching while constructing your middleware is not allowed. \' + \'Other middleware would not be applied to this dispatch.\');\n };\n\n var middlewareAPI = {\n getState: store.getState,\n dispatch: function dispatch() {\n return _dispatch.apply(void 0, arguments);\n }\n };\n var chain = middlewares.map(function (middleware) {\n return middleware(middlewareAPI);\n });\n _dispatch = compose.apply(void 0, chain)(store.dispatch);\n return _objectSpread2(_objectSpread2({}, store), {}, {\n dispatch: _dispatch\n });\n };\n };\n}\n\n\n\n// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js + 1 modules\nvar inheritsLoose = __webpack_require__(5540);\n;// CONCATENATED MODULE: ./node_modules/react-redux/es/utils/PropTypes.js\n\nvar subscriptionShape = prop_types_default().shape({\n trySubscribe: (prop_types_default()).func.isRequired,\n tryUnsubscribe: (prop_types_default()).func.isRequired,\n notifyNestedSubs: (prop_types_default()).func.isRequired,\n isSubscribed: (prop_types_default()).func.isRequired\n});\nvar storeShape = prop_types_default().shape({\n subscribe: (prop_types_default()).func.isRequired,\n dispatch: (prop_types_default()).func.isRequired,\n getState: (prop_types_default()).func.isRequired\n});\n;// CONCATENATED MODULE: ./node_modules/react-redux/es/utils/warning.js\n/**\n * Prints a warning in the console if it exists.\n *\n * @param {String} message The warning message.\n * @returns {void}\n */\nfunction warning_warning(message) {\n /* eslint-disable no-console */\n if (typeof console !== \'undefined\' && typeof console.error === \'function\') {\n console.error(message);\n }\n /* eslint-enable no-console */\n\n\n try {\n // This error was thrown as a convenience so that if you enable\n // "break on all exceptions" in your console,\n // it would pause the execution at this line.\n throw new Error(message);\n /* eslint-disable no-empty */\n } catch (e) {}\n /* eslint-enable no-empty */\n\n}\n;// CONCATENATED MODULE: ./node_modules/react-redux/es/components/Provider.js\n\n\n\n\n\nvar prefixUnsafeLifecycleMethods = typeof (react_default()).forwardRef !== "undefined";\nvar didWarnAboutReceivingStore = false;\n\nfunction warnAboutReceivingStore() {\n if (didWarnAboutReceivingStore) {\n return;\n }\n\n didWarnAboutReceivingStore = true;\n warning_warning(\'<Provider> does not support changing `store` on the fly. \' + \'It is most likely that you see this error because you updated to \' + \'Redux 2.x and React Redux 2.x which no longer hot reload reducers \' + \'automatically. See https://github.com/reduxjs/react-redux/releases/\' + \'tag/v2.0.0 for the migration instructions.\');\n}\n\nfunction createProvider(storeKey) {\n var _Provider$childContex;\n\n if (storeKey === void 0) {\n storeKey = \'store\';\n }\n\n var subscriptionKey = storeKey + "Subscription";\n\n var Provider =\n /*#__PURE__*/\n function (_Component) {\n (0,inheritsLoose/* default */.A)(Provider, _Component);\n\n var _proto = Provider.prototype;\n\n _proto.getChildContext = function getChildContext() {\n var _ref;\n\n return _ref = {}, _ref[storeKey] = this[storeKey], _ref[subscriptionKey] = null, _ref;\n };\n\n function Provider(props, context) {\n var _this;\n\n _this = _Component.call(this, props, context) || this;\n _this[storeKey] = props.store;\n return _this;\n }\n\n _proto.render = function render() {\n return react.Children.only(this.props.children);\n };\n\n return Provider;\n }(react.Component);\n\n if (true) {\n // Use UNSAFE_ event name where supported\n var eventName = prefixUnsafeLifecycleMethods ? \'UNSAFE_componentWillReceiveProps\' : \'componentWillReceiveProps\';\n\n Provider.prototype[eventName] = function (nextProps) {\n if (this[storeKey] !== nextProps.store) {\n warnAboutReceivingStore();\n }\n };\n }\n\n Provider.propTypes = {\n store: storeShape.isRequired,\n children: (prop_types_default()).element.isRequired\n };\n Provider.childContextTypes = (_Provider$childContex = {}, _Provider$childContex[storeKey] = storeShape.isRequired, _Provider$childContex[subscriptionKey] = subscriptionShape, _Provider$childContex);\n return Provider;\n}\n/* harmony default export */ const Provider = (createProvider());\n// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js\nvar assertThisInitialized = __webpack_require__(9417);\n// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js\nvar esm_extends = __webpack_require__(8168);\n// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js\nvar objectWithoutPropertiesLoose = __webpack_require__(8587);\n// EXTERNAL MODULE: ./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js\nvar hoist_non_react_statics_cjs = __webpack_require__(4146);\nvar hoist_non_react_statics_cjs_default = /*#__PURE__*/__webpack_require__.n(hoist_non_react_statics_cjs);\n// EXTERNAL MODULE: ./node_modules/invariant/invariant.js\nvar invariant = __webpack_require__(7927);\nvar invariant_default = /*#__PURE__*/__webpack_require__.n(invariant);\n// EXTERNAL MODULE: ./node_modules/react-is/index.js\nvar react_is = __webpack_require__(4363);\n;// CONCATENATED MODULE: ./node_modules/react-redux/es/utils/Subscription.js\n// encapsulates the subscription logic for connecting a component to the redux store, as\n// well as nesting subscriptions of descendant components, so that we can ensure the\n// ancestor components re-render before descendants\nvar CLEARED = null;\nvar nullListeners = {\n notify: function notify() {}\n};\n\nfunction createListenerCollection() {\n // the current/next pattern is copied from redux\'s createStore code.\n // TODO: refactor+expose that code to be reusable here?\n var current = [];\n var next = [];\n return {\n clear: function clear() {\n next = CLEARED;\n current = CLEARED;\n },\n notify: function notify() {\n var listeners = current = next;\n\n for (var i = 0; i < listeners.length; i++) {\n listeners[i]();\n }\n },\n get: function get() {\n return next;\n },\n subscribe: function subscribe(listener) {\n var isSubscribed = true;\n if (next === current) next = current.slice();\n next.push(listener);\n return function unsubscribe() {\n if (!isSubscribed || current === CLEARED) return;\n isSubscribed = false;\n if (next === current) next = current.slice();\n next.splice(next.indexOf(listener), 1);\n };\n }\n };\n}\n\nvar Subscription =\n/*#__PURE__*/\nfunction () {\n function Subscription(store, parentSub, onStateChange) {\n this.store = store;\n this.parentSub = parentSub;\n this.onStateChange = onStateChange;\n this.unsubscribe = null;\n this.listeners = nullListeners;\n }\n\n var _proto = Subscription.prototype;\n\n _proto.addNestedSub = function addNestedSub(listener) {\n this.trySubscribe();\n return this.listeners.subscribe(listener);\n };\n\n _proto.notifyNestedSubs = function notifyNestedSubs() {\n this.listeners.notify();\n };\n\n _proto.isSubscribed = function isSubscribed() {\n return Boolean(this.unsubscribe);\n };\n\n _proto.trySubscribe = function trySubscribe() {\n if (!this.unsubscribe) {\n this.unsubscribe = this.parentSub ? this.parentSub.addNestedSub(this.onStateChange) : this.store.subscribe(this.onStateChange);\n this.listeners = createListenerCollection();\n }\n };\n\n _proto.tryUnsubscribe = function tryUnsubscribe() {\n if (this.unsubscribe) {\n this.unsubscribe();\n this.unsubscribe = null;\n this.listeners.clear();\n this.listeners = nullListeners;\n }\n };\n\n return Subscription;\n}();\n\n\n;// CONCATENATED MODULE: ./node_modules/react-redux/es/components/connectAdvanced.js\n\n\n\n\n\n\n\n\n\n\nvar connectAdvanced_prefixUnsafeLifecycleMethods = typeof (react_default()).forwardRef !== "undefined";\nvar hotReloadingVersion = 0;\nvar dummyState = {};\n\nfunction noop() {}\n\nfunction makeSelectorStateful(sourceSelector, store) {\n // wrap the selector in an object that tracks its results between runs.\n var selector = {\n run: function runComponentSelector(props) {\n try {\n var nextProps = sourceSelector(store.getState(), props);\n\n if (nextProps !== selector.props || selector.error) {\n selector.shouldComponentUpdate = true;\n selector.props = nextProps;\n selector.error = null;\n }\n } catch (error) {\n selector.shouldComponentUpdate = true;\n selector.error = error;\n }\n }\n };\n return selector;\n}\n\nfunction connectAdvanced(\n/*\n selectorFactory is a func that is responsible for returning the selector function used to\n compute new props from state, props, and dispatch. For example:\n export default connectAdvanced((dispatch, options) => (state, props) => ({\n thing: state.things[props.thingId],\n saveThing: fields => dispatch(actionCreators.saveThing(props.thingId, fields)),\n }))(YourComponent)\n Access to dispatch is provided to the factory so selectorFactories can bind actionCreators\n outside of their selector as an optimization. Options passed to connectAdvanced are passed to\n the selectorFactory, along with displayName and WrappedComponent, as the second argument.\n Note that selectorFactory is responsible for all caching/memoization of inbound and outbound\n props. Do not use connectAdvanced directly without memoizing results between calls to your\n selector, otherwise the Connect component will re-render on every state or props change.\n*/\nselectorFactory, // options object:\n_ref) {\n var _contextTypes, _childContextTypes;\n\n if (_ref === void 0) {\n _ref = {};\n }\n\n var _ref2 = _ref,\n _ref2$getDisplayName = _ref2.getDisplayName,\n getDisplayName = _ref2$getDisplayName === void 0 ? function (name) {\n return "ConnectAdvanced(" + name + ")";\n } : _ref2$getDisplayName,\n _ref2$methodName = _ref2.methodName,\n methodName = _ref2$methodName === void 0 ? \'connectAdvanced\' : _ref2$methodName,\n _ref2$renderCountProp = _ref2.renderCountProp,\n renderCountProp = _ref2$renderCountProp === void 0 ? undefined : _ref2$renderCountProp,\n _ref2$shouldHandleSta = _ref2.shouldHandleStateChanges,\n shouldHandleStateChanges = _ref2$shouldHandleSta === void 0 ? true : _ref2$shouldHandleSta,\n _ref2$storeKey = _ref2.storeKey,\n storeKey = _ref2$storeKey === void 0 ? \'store\' : _ref2$storeKey,\n _ref2$withRef = _ref2.withRef,\n withRef = _ref2$withRef === void 0 ? false : _ref2$withRef,\n connectOptions = (0,objectWithoutPropertiesLoose/* default */.A)(_ref2, ["getDisplayName", "methodName", "renderCountProp", "shouldHandleStateChanges", "storeKey", "withRef"]);\n\n var subscriptionKey = storeKey + \'Subscription\';\n var version = hotReloadingVersion++;\n var contextTypes = (_contextTypes = {}, _contextTypes[storeKey] = storeShape, _contextTypes[subscriptionKey] = subscriptionShape, _contextTypes);\n var childContextTypes = (_childContextTypes = {}, _childContextTypes[subscriptionKey] = subscriptionShape, _childContextTypes);\n return function wrapWithConnect(WrappedComponent) {\n invariant_default()((0,react_is.isValidElementType)(WrappedComponent), "You must pass a component to the function returned by " + (methodName + ". Instead received " + JSON.stringify(WrappedComponent)));\n var wrappedComponentName = WrappedComponent.displayName || WrappedComponent.name || \'Component\';\n var displayName = getDisplayName(wrappedComponentName);\n\n var selectorFactoryOptions = (0,esm_extends/* default */.A)({}, connectOptions, {\n getDisplayName: getDisplayName,\n methodName: methodName,\n renderCountProp: renderCountProp,\n shouldHandleStateChanges: shouldHandleStateChanges,\n storeKey: storeKey,\n withRef: withRef,\n displayName: displayName,\n wrappedComponentName: wrappedComponentName,\n WrappedComponent: WrappedComponent // TODO Actually fix our use of componentWillReceiveProps\n\n /* eslint-disable react/no-deprecated */\n\n });\n\n var Connect =\n /*#__PURE__*/\n function (_Component) {\n (0,inheritsLoose/* default */.A)(Connect, _Component);\n\n function Connect(props, context) {\n var _this;\n\n _this = _Component.call(this, props, context) || this;\n _this.version = version;\n _this.state = {};\n _this.renderCount = 0;\n _this.store = props[storeKey] || context[storeKey];\n _this.propsMode = Boolean(props[storeKey]);\n _this.setWrappedInstance = _this.setWrappedInstance.bind((0,assertThisInitialized/* default */.A)((0,assertThisInitialized/* default */.A)(_this)));\n invariant_default()(_this.store, "Could not find \\"" + storeKey + "\\" in either the context or props of " + ("\\"" + displayName + "\\". Either wrap the root component in a <Provider>, ") + ("or explicitly pass \\"" + storeKey + "\\" as a prop to \\"" + displayName + "\\"."));\n\n _this.initSelector();\n\n _this.initSubscription();\n\n return _this;\n }\n\n var _proto = Connect.prototype;\n\n _proto.getChildContext = function getChildContext() {\n var _ref3;\n\n // If this component received store from props, its subscription should be transparent\n // to any descendants receiving store+subscription from context; it passes along\n // subscription passed to it. Otherwise, it shadows the parent subscription, which allows\n // Connect to control ordering of notifications to flow top-down.\n var subscription = this.propsMode ? null : this.subscription;\n return _ref3 = {}, _ref3[subscriptionKey] = subscription || this.context[subscriptionKey], _ref3;\n };\n\n _proto.componentDidMount = function componentDidMount() {\n if (!shouldHandleStateChanges) return; // componentWillMount fires during server side rendering, but componentDidMount and\n // componentWillUnmount do not. Because of this, trySubscribe happens during ...didMount.\n // Otherwise, unsubscription would never take place during SSR, causing a memory leak.\n // To handle the case where a child component may have triggered a state change by\n // dispatching an action in its componentWillMount, we have to re-run the select and maybe\n // re-render.\n\n this.subscription.trySubscribe();\n this.selector.run(this.props);\n if (this.selector.shouldComponentUpdate) this.forceUpdate();\n }; // Note: this is renamed below to the UNSAFE_ version in React >=16.3.0\n\n\n _proto.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {\n this.selector.run(nextProps);\n };\n\n _proto.shouldComponentUpdate = function shouldComponentUpdate() {\n return this.selector.shouldComponentUpdate;\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n if (this.subscription) this.subscription.tryUnsubscribe();\n this.subscription = null;\n this.notifyNestedSubs = noop;\n this.store = null;\n this.selector.run = noop;\n this.selector.shouldComponentUpdate = false;\n };\n\n _proto.getWrappedInstance = function getWrappedInstance() {\n invariant_default()(withRef, "To access the wrapped instance, you need to specify " + ("{ withRef: true } in the options argument of the " + methodName + "() call."));\n return this.wrappedInstance;\n };\n\n _proto.setWrappedInstance = function setWrappedInstance(ref) {\n this.wrappedInstance = ref;\n };\n\n _proto.initSelector = function initSelector() {\n var sourceSelector = selectorFactory(this.store.dispatch, selectorFactoryOptions);\n this.selector = makeSelectorStateful(sourceSelector, this.store);\n this.selector.run(this.props);\n };\n\n _proto.initSubscription = function initSubscription() {\n if (!shouldHandleStateChanges) return; // parentSub\'s source should match where store came from: props vs. context. A component\n // connected to the store via props shouldn\'t use subscription from context, or vice versa.\n\n var parentSub = (this.propsMode ? this.props : this.context)[subscriptionKey];\n this.subscription = new Subscription(this.store, parentSub, this.onStateChange.bind(this)); // `notifyNestedSubs` is duplicated to handle the case where the component is unmounted in\n // the middle of the notification loop, where `this.subscription` will then be null. An\n // extra null check every change can be avoided by copying the method onto `this` and then\n // replacing it with a no-op on unmount. This can probably be avoided if Subscription\'s\n // listeners logic is changed to not call listeners that have been unsubscribed in the\n // middle of the notification loop.\n\n this.notifyNestedSubs = this.subscription.notifyNestedSubs.bind(this.subscription);\n };\n\n _proto.onStateChange = function onStateChange() {\n this.selector.run(this.props);\n\n if (!this.selector.shouldComponentUpdate) {\n this.notifyNestedSubs();\n } else {\n this.componentDidUpdate = this.notifyNestedSubsOnComponentDidUpdate;\n this.setState(dummyState);\n }\n };\n\n _proto.notifyNestedSubsOnComponentDidUpdate = function notifyNestedSubsOnComponentDidUpdate() {\n // `componentDidUpdate` is conditionally implemented when `onStateChange` determines it\n // needs to notify nested subs. Once called, it unimplements itself until further state\n // changes occur. Doing it this way vs having a permanent `componentDidUpdate` that does\n // a boolean check every time avoids an extra method call most of the time, resulting\n // in some perf boost.\n this.componentDidUpdate = undefined;\n this.notifyNestedSubs();\n };\n\n _proto.isSubscribed = function isSubscribed() {\n return Boolean(this.subscription) && this.subscription.isSubscribed();\n };\n\n _proto.addExtraProps = function addExtraProps(props) {\n if (!withRef && !renderCountProp && !(this.propsMode && this.subscription)) return props; // make a shallow copy so that fields added don\'t leak to the original selector.\n // this is especially important for \'ref\' since that\'s a reference back to the component\n // instance. a singleton memoized selector would then be holding a reference to the\n // instance, preventing the instance from being garbage collected, and that would be bad\n\n var withExtras = (0,esm_extends/* default */.A)({}, props);\n\n if (withRef) withExtras.ref = this.setWrappedInstance;\n if (renderCountProp) withExtras[renderCountProp] = this.renderCount++;\n if (this.propsMode && this.subscription) withExtras[subscriptionKey] = this.subscription;\n return withExtras;\n };\n\n _proto.render = function render() {\n var selector = this.selector;\n selector.shouldComponentUpdate = false;\n\n if (selector.error) {\n throw selector.error;\n } else {\n return (0,react.createElement)(WrappedComponent, this.addExtraProps(selector.props));\n }\n };\n\n return Connect;\n }(react.Component);\n\n if (connectAdvanced_prefixUnsafeLifecycleMethods) {\n // Use UNSAFE_ event name where supported\n Connect.prototype.UNSAFE_componentWillReceiveProps = Connect.prototype.componentWillReceiveProps;\n delete Connect.prototype.componentWillReceiveProps;\n }\n /* eslint-enable react/no-deprecated */\n\n\n Connect.WrappedComponent = WrappedComponent;\n Connect.displayName = displayName;\n Connect.childContextTypes = childContextTypes;\n Connect.contextTypes = contextTypes;\n Connect.propTypes = contextTypes;\n\n if (true) {\n // Use UNSAFE_ event name where supported\n var eventName = connectAdvanced_prefixUnsafeLifecycleMethods ? \'UNSAFE_componentWillUpdate\' : \'componentWillUpdate\';\n\n Connect.prototype[eventName] = function componentWillUpdate() {\n var _this2 = this;\n\n // We are hot reloading!\n if (this.version !== version) {\n this.version = version;\n this.initSelector(); // If any connected descendants don\'t hot reload (and resubscribe in the process), their\n // listeners will be lost when we unsubscribe. Unfortunately, by copying over all\n // listeners, this does mean that the old versions of connected descendants will still be\n // notified of state changes; however, their onStateChange function is a no-op so this\n // isn\'t a huge deal.\n\n var oldListeners = [];\n\n if (this.subscription) {\n oldListeners = this.subscription.listeners.get();\n this.subscription.tryUnsubscribe();\n }\n\n this.initSubscription();\n\n if (shouldHandleStateChanges) {\n this.subscription.trySubscribe();\n oldListeners.forEach(function (listener) {\n return _this2.subscription.listeners.subscribe(listener);\n });\n }\n }\n };\n }\n\n return hoist_non_react_statics_cjs_default()(Connect, WrappedComponent);\n };\n}\n;// CONCATENATED MODULE: ./node_modules/react-redux/es/utils/shallowEqual.js\nvar hasOwn = Object.prototype.hasOwnProperty;\n\nfunction is(x, y) {\n if (x === y) {\n return x !== 0 || y !== 0 || 1 / x === 1 / y;\n } else {\n return x !== x && y !== y;\n }\n}\n\nfunction shallowEqual(objA, objB) {\n if (is(objA, objB)) return true;\n\n if (typeof objA !== \'object\' || objA === null || typeof objB !== \'object\' || objB === null) {\n return false;\n }\n\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n if (keysA.length !== keysB.length) return false;\n\n for (var i = 0; i < keysA.length; i++) {\n if (!hasOwn.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n return false;\n }\n }\n\n return true;\n}\n;// CONCATENATED MODULE: ./node_modules/react-redux/es/utils/isPlainObject.js\n/**\r\n * @param {any} obj The object to inspect.\r\n * @returns {boolean} True if the argument appears to be a plain object.\r\n */\nfunction isPlainObject_isPlainObject(obj) {\n if (typeof obj !== \'object\' || obj === null) return false;\n var proto = Object.getPrototypeOf(obj);\n if (proto === null) return true;\n var baseProto = proto;\n\n while (Object.getPrototypeOf(baseProto) !== null) {\n baseProto = Object.getPrototypeOf(baseProto);\n }\n\n return proto === baseProto;\n}\n;// CONCATENATED MODULE: ./node_modules/react-redux/es/utils/verifyPlainObject.js\n\n\nfunction verifyPlainObject(value, displayName, methodName) {\n if (!isPlainObject_isPlainObject(value)) {\n warning_warning(methodName + "() in " + displayName + " must return a plain object. Instead received " + value + ".");\n }\n}\n;// CONCATENATED MODULE: ./node_modules/react-redux/es/connect/wrapMapToProps.js\n\nfunction wrapMapToPropsConstant(getConstant) {\n return function initConstantSelector(dispatch, options) {\n var constant = getConstant(dispatch, options);\n\n function constantSelector() {\n return constant;\n }\n\n constantSelector.dependsOnOwnProps = false;\n return constantSelector;\n };\n} // dependsOnOwnProps is used by createMapToPropsProxy to determine whether to pass props as args\n// to the mapToProps function being wrapped. It is also used by makePurePropsSelector to determine\n// whether mapToProps needs to be invoked when props have changed.\n// \n// A length of one signals that mapToProps does not depend on props from the parent component.\n// A length of zero is assumed to mean mapToProps is getting args via arguments or ...args and\n// therefore not reporting its length accurately..\n\nfunction getDependsOnOwnProps(mapToProps) {\n return mapToProps.dependsOnOwnProps !== null && mapToProps.dependsOnOwnProps !== undefined ? Boolean(mapToProps.dependsOnOwnProps) : mapToProps.length !== 1;\n} // Used by whenMapStateToPropsIsFunction and whenMapDispatchToPropsIsFunction,\n// this function wraps mapToProps in a proxy function which does several things:\n// \n// * Detects whether the mapToProps function being called depends on props, which\n// is used by selectorFactory to decide if it should reinvoke on props changes.\n// \n// * On first call, handles mapToProps if returns another function, and treats that\n// new function as the true mapToProps for subsequent calls.\n// \n// * On first call, verifies the first result is a plain object, in order to warn\n// the developer that their mapToProps function is not returning a valid result.\n// \n\nfunction wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === \'function\') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) verifyPlainObject(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}\n;// CONCATENATED MODULE: ./node_modules/react-redux/es/connect/mapDispatchToProps.js\n\n\nfunction whenMapDispatchToPropsIsFunction(mapDispatchToProps) {\n return typeof mapDispatchToProps === \'function\' ? wrapMapToPropsFunc(mapDispatchToProps, \'mapDispatchToProps\') : undefined;\n}\nfunction whenMapDispatchToPropsIsMissing(mapDispatchToProps) {\n return !mapDispatchToProps ? wrapMapToPropsConstant(function (dispatch) {\n return {\n dispatch: dispatch\n };\n }) : undefined;\n}\nfunction whenMapDispatchToPropsIsObject(mapDispatchToProps) {\n return mapDispatchToProps && typeof mapDispatchToProps === \'object\' ? wrapMapToPropsConstant(function (dispatch) {\n return bindActionCreators(mapDispatchToProps, dispatch);\n }) : undefined;\n}\n/* harmony default export */ const mapDispatchToProps = ([whenMapDispatchToPropsIsFunction, whenMapDispatchToPropsIsMissing, whenMapDispatchToPropsIsObject]);\n;// CONCATENATED MODULE: ./node_modules/react-redux/es/connect/mapStateToProps.js\n\nfunction whenMapStateToPropsIsFunction(mapStateToProps) {\n return typeof mapStateToProps === \'function\' ? wrapMapToPropsFunc(mapStateToProps, \'mapStateToProps\') : undefined;\n}\nfunction whenMapStateToPropsIsMissing(mapStateToProps) {\n return !mapStateToProps ? wrapMapToPropsConstant(function () {\n return {};\n }) : undefined;\n}\n/* harmony default export */ const mapStateToProps = ([whenMapStateToPropsIsFunction, whenMapStateToPropsIsMissing]);\n;// CONCATENATED MODULE: ./node_modules/react-redux/es/connect/mergeProps.js\n\n\nfunction defaultMergeProps(stateProps, dispatchProps, ownProps) {\n return (0,esm_extends/* default */.A)({}, ownProps, stateProps, dispatchProps);\n}\nfunction wrapMergePropsFunc(mergeProps) {\n return function initMergePropsProxy(dispatch, _ref) {\n var displayName = _ref.displayName,\n pure = _ref.pure,\n areMergedPropsEqual = _ref.areMergedPropsEqual;\n var hasRunOnce = false;\n var mergedProps;\n return function mergePropsProxy(stateProps, dispatchProps, ownProps) {\n var nextMergedProps = mergeProps(stateProps, dispatchProps, ownProps);\n\n if (hasRunOnce) {\n if (!pure || !areMergedPropsEqual(nextMergedProps, mergedProps)) mergedProps = nextMergedProps;\n } else {\n hasRunOnce = true;\n mergedProps = nextMergedProps;\n if (true) verifyPlainObject(mergedProps, displayName, \'mergeProps\');\n }\n\n return mergedProps;\n };\n };\n}\nfunction whenMergePropsIsFunction(mergeProps) {\n return typeof mergeProps === \'function\' ? wrapMergePropsFunc(mergeProps) : undefined;\n}\nfunction whenMergePropsIsOmitted(mergeProps) {\n return !mergeProps ? function () {\n return defaultMergeProps;\n } : undefined;\n}\n/* harmony default export */ const mergeProps = ([whenMergePropsIsFunction, whenMergePropsIsOmitted]);\n;// CONCATENATED MODULE: ./node_modules/react-redux/es/connect/verifySubselectors.js\n\n\nfunction verify(selector, methodName, displayName) {\n if (!selector) {\n throw new Error("Unexpected value for " + methodName + " in " + displayName + ".");\n } else if (methodName === \'mapStateToProps\' || methodName === \'mapDispatchToProps\') {\n if (!selector.hasOwnProperty(\'dependsOnOwnProps\')) {\n warning_warning("The selector for " + methodName + " of " + displayName + " did not specify a value for dependsOnOwnProps.");\n }\n }\n}\n\nfunction verifySubselectors(mapStateToProps, mapDispatchToProps, mergeProps, displayName) {\n verify(mapStateToProps, \'mapStateToProps\', displayName);\n verify(mapDispatchToProps, \'mapDispatchToProps\', displayName);\n verify(mergeProps, \'mergeProps\', displayName);\n}\n;// CONCATENATED MODULE: ./node_modules/react-redux/es/connect/selectorFactory.js\n\n\nfunction impureFinalPropsSelectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch) {\n return function impureFinalPropsSelector(state, ownProps) {\n return mergeProps(mapStateToProps(state, ownProps), mapDispatchToProps(dispatch, ownProps), ownProps);\n };\n}\nfunction pureFinalPropsSelectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, _ref) {\n var areStatesEqual = _ref.areStatesEqual,\n areOwnPropsEqual = _ref.areOwnPropsEqual,\n areStatePropsEqual = _ref.areStatePropsEqual;\n var hasRunAtLeastOnce = false;\n var state;\n var ownProps;\n var stateProps;\n var dispatchProps;\n var mergedProps;\n\n function handleFirstCall(firstState, firstOwnProps) {\n state = firstState;\n ownProps = firstOwnProps;\n stateProps = mapStateToProps(state, ownProps);\n dispatchProps = mapDispatchToProps(dispatch, ownProps);\n mergedProps = mergeProps(stateProps, dispatchProps, ownProps);\n hasRunAtLeastOnce = true;\n return mergedProps;\n }\n\n function handleNewPropsAndNewState() {\n stateProps = mapStateToProps(state, ownProps);\n if (mapDispatchToProps.dependsOnOwnProps) dispatchProps = mapDispatchToProps(dispatch, ownProps);\n mergedProps = mergeProps(stateProps, dispatchProps, ownProps);\n return mergedProps;\n }\n\n function handleNewProps() {\n if (mapStateToProps.dependsOnOwnProps) stateProps = mapStateToProps(state, ownProps);\n if (mapDispatchToProps.dependsOnOwnProps) dispatchProps = mapDispatchToProps(dispatch, ownProps);\n mergedProps = mergeProps(stateProps, dispatchProps, ownProps);\n return mergedProps;\n }\n\n function handleNewState() {\n var nextStateProps = mapStateToProps(state, ownProps);\n var statePropsChanged = !areStatePropsEqual(nextStateProps, stateProps);\n stateProps = nextStateProps;\n if (statePropsChanged) mergedProps = mergeProps(stateProps, dispatchProps, ownProps);\n return mergedProps;\n }\n\n function handleSubsequentCalls(nextState, nextOwnProps) {\n var propsChanged = !areOwnPropsEqual(nextOwnProps, ownProps);\n var stateChanged = !areStatesEqual(nextState, state);\n state = nextState;\n ownProps = nextOwnProps;\n if (propsChanged && stateChanged) return handleNewPropsAndNewState();\n if (propsChanged) return handleNewProps();\n if (stateChanged) return handleNewState();\n return mergedProps;\n }\n\n return function pureFinalPropsSelector(nextState, nextOwnProps) {\n return hasRunAtLeastOnce ? handleSubsequentCalls(nextState, nextOwnProps) : handleFirstCall(nextState, nextOwnProps);\n };\n} // TODO: Add more comments\n// If pure is true, the selector returned by selectorFactory will memoize its results,\n// allowing connectAdvanced\'s shouldComponentUpdate to return false if final\n// props have not changed. If false, the selector will always return a new\n// object and shouldComponentUpdate will always return true.\n\nfunction finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = (0,objectWithoutPropertiesLoose/* default */.A)(_ref2, ["initMapStateToProps", "initMapDispatchToProps", "initMergeProps"]);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (true) {\n verifySubselectors(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}\n;// CONCATENATED MODULE: ./node_modules/react-redux/es/connect/connect.js\n\n\n\n\n\n\n\n\n/*\n connect is a facade over connectAdvanced. It turns its args into a compatible\n selectorFactory, which has the signature:\n\n (dispatch, options) => (nextState, nextOwnProps) => nextFinalProps\n \n connect passes its args to connectAdvanced as options, which will in turn pass them to\n selectorFactory each time a Connect component instance is instantiated or hot reloaded.\n\n selectorFactory returns a final props selector from its mapStateToProps,\n mapStateToPropsFactories, mapDispatchToProps, mapDispatchToPropsFactories, mergeProps,\n mergePropsFactories, and pure args.\n\n The resulting final props selector is called by the Connect component instance whenever\n it receives new props or store state.\n */\n\nfunction match(arg, factories, name) {\n for (var i = factories.length - 1; i >= 0; i--) {\n var result = factories[i](arg);\n if (result) return result;\n }\n\n return function (dispatch, options) {\n throw new Error("Invalid value of type " + typeof arg + " for " + name + " argument when connecting component " + options.wrappedComponentName + ".");\n };\n}\n\nfunction strictEqual(a, b) {\n return a === b;\n} // createConnect with default args builds the \'official\' connect behavior. Calling it with\n// different options opens up some testing and extensibility scenarios\n\n\nfunction createConnect(_temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === void 0 ? connectAdvanced : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === void 0 ? mapStateToProps : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === void 0 ? mapDispatchToProps : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === void 0 ? mergeProps : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === void 0 ? finalPropsSelectorFactory : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps, _ref2) {\n if (_ref2 === void 0) {\n _ref2 = {};\n }\n\n var _ref3 = _ref2,\n _ref3$pure = _ref3.pure,\n pure = _ref3$pure === void 0 ? true : _ref3$pure,\n _ref3$areStatesEqual = _ref3.areStatesEqual,\n areStatesEqual = _ref3$areStatesEqual === void 0 ? strictEqual : _ref3$areStatesEqual,\n _ref3$areOwnPropsEqua = _ref3.areOwnPropsEqual,\n areOwnPropsEqual = _ref3$areOwnPropsEqua === void 0 ? shallowEqual : _ref3$areOwnPropsEqua,\n _ref3$areStatePropsEq = _ref3.areStatePropsEqual,\n areStatePropsEqual = _ref3$areStatePropsEq === void 0 ? shallowEqual : _ref3$areStatePropsEq,\n _ref3$areMergedPropsE = _ref3.areMergedPropsEqual,\n areMergedPropsEqual = _ref3$areMergedPropsE === void 0 ? shallowEqual : _ref3$areMergedPropsE,\n extraOptions = (0,objectWithoutPropertiesLoose/* default */.A)(_ref3, ["pure", "areStatesEqual", "areOwnPropsEqual", "areStatePropsEqual", "areMergedPropsEqual"]);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, \'mapStateToProps\');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, \'mapDispatchToProps\');\n var initMergeProps = match(mergeProps, mergePropsFactories, \'mergeProps\');\n return connectHOC(selectorFactory, (0,esm_extends/* default */.A)({\n // used in error messages\n methodName: \'connect\',\n // used to compute Connect\'s displayName from the wrapped component\'s displayName.\n getDisplayName: function getDisplayName(name) {\n return "Connect(" + name + ")";\n },\n // if mapStateToProps is falsy, the Connect component doesn\'t subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n }, extraOptions));\n };\n}\n/* harmony default export */ const connect = (createConnect());\n;// CONCATENATED MODULE: ./node_modules/react-redux/es/index.js\n\n\n\n\n;// CONCATENATED MODULE: ./node_modules/redux-thunk/es/index.js\n/** A function that accepts a potential "extra argument" value to be injected later,\r\n * and returns an instance of the thunk middleware that uses that value\r\n */\nfunction createThunkMiddleware(extraArgument) {\n // Standard Redux middleware definition pattern:\n // See: https://redux.js.org/tutorials/fundamentals/part-4-store#writing-custom-middleware\n var middleware = function middleware(_ref) {\n var dispatch = _ref.dispatch,\n getState = _ref.getState;\n return function (next) {\n return function (action) {\n // The thunk middleware looks for any functions that were passed to `store.dispatch`.\n // If this "action" is really a function, call it and return the result.\n if (typeof action === \'function\') {\n // Inject the store\'s `dispatch` and `getState` methods, as well as any "extra arg"\n return action(dispatch, getState, extraArgument);\n } // Otherwise, pass the action down the middleware chain as usual\n\n\n return next(action);\n };\n };\n };\n\n return middleware;\n}\n\nvar thunk = createThunkMiddleware(); // Attach the factory function so users can create a customized version\n// with whatever "extra arg" they want to inject into their thunks\n\nthunk.withExtraArgument = createThunkMiddleware;\n/* harmony default export */ const es = (thunk);\n;// CONCATENATED MODULE: ./client/app/constants/HelloWorldConstants.jsx\n/* eslint-disable import/prefer-default-export */\nconst HELLO_WORLD_NAME_UPDATE = \'HELLO_WORLD_NAME_UPDATE\';\n;// CONCATENATED MODULE: ./client/app/reducers/HelloWorldReducer.jsx\n\nconst initialState = {\n lastActionType: null,\n name: \'Alex\'\n};\n\n// Why name function the same as the reducer?\n// https://github.com/gaearon/redux/issues/428#issuecomment-129223274\n// Naming the function will help with debugging!\nfunction helloWorldReducer(state = initialState, action) {\n const {\n type,\n name\n } = action;\n switch (type) {\n case HELLO_WORLD_NAME_UPDATE:\n return {\n lastActionType: type,\n name\n };\n default:\n return state;\n }\n}\n;// CONCATENATED MODULE: ./client/app/reducers/RailsContextReducer.jsx\n// This will always get set\nconst RailsContextReducer_initialState = {};\n\n// Why name function the same as the reducer?\n// https://github.com/gaearon/redux/issues/428#issuecomment-129223274\n// Naming the function will help with debugging!\n/* eslint-disable no-unused-vars */\nfunction railsContextReducer(state = RailsContextReducer_initialState, action) {\n return state;\n}\n;// CONCATENATED MODULE: ./client/app/reducers/reducersIndex.jsx\n\n\n\n// This is how you do a directory of reducers.\n// The `import * as reducers` does not work for a directory, but only with a single file\n/* harmony default export */ const reducersIndex = ({\n helloWorldData: helloWorldReducer,\n railsContext: railsContextReducer\n});\n;// CONCATENATED MODULE: ./client/app/store/composeInitialState.js\n// Real world is that you\'ll want to do lots of manipulations of the data you get back from Rails\n// to coerce it into exactly what you want your initial redux state.\n/* harmony default export */ const composeInitialState = ((props, railsContext) => Object.assign({}, props, {\n railsContext\n}));\n;// CONCATENATED MODULE: ./client/app/components/HelloWorldRedux.jsx\nvar HelloWorldRedux_jsxFileName = "/mnt/ssd/react_on_rails_pro/spec/dummy/client/app/components/HelloWorldRedux.jsx";\n\n\n\n\n// Super simple example of the simplest possible React component\nclass HelloWorldRedux extends (react_default()).Component {\n static propTypes = {\n actions: (prop_types_default()).object.isRequired,\n data: (prop_types_default()).object.isRequired,\n railsContext: (prop_types_default()).object.isRequired\n };\n\n // Not necessary if we only call super, but we\'ll need to initialize state, etc.\n constructor(props) {\n super(props);\n this.setNameDomRef = this.setNameDomRef.bind(this);\n this.handleChange = this.handleChange.bind(this);\n }\n setNameDomRef(nameDomNode) {\n this.nameDomRef = nameDomNode;\n }\n handleChange() {\n const name = this.nameDomRef.value;\n this.props.actions.updateName(name);\n }\n render() {\n const {\n data,\n railsContext\n } = this.props;\n const {\n name\n } = data;\n\n // If this creates an alert, we have a problem!\n // see file node_package/src/scriptSanitizedVal.js for the fix to this prior issue.\n\n /* eslint-disable no-console */\n console.log(\'This is a script:"</div>"</script> <script>alert(\\\'WTF1\\\')</script>\');\n console.log(\'Script2:"</div>"</script xx> <script>alert(\\\'WTF2\\\')</script xx>\');\n console.log(\'Script3:"</div>"</ SCRIPT xx> <script>alert(\\\'WTF3\\\')</script xx>\');\n console.log(\'Script4"</div>"</script <script>alert(\\\'WTF4\\\')</script>\');\n console.log(\'Script5:"</div>"</ script> <script>alert(\\\'WTF5\\\')</script>\');\n return /*#__PURE__*/react_default().createElement("div", {\n __self: this,\n __source: {\n fileName: HelloWorldRedux_jsxFileName,\n lineNumber: 44,\n columnNumber: 7\n }\n }, /*#__PURE__*/react_default().createElement("h3", {\n __self: this,\n __source: {\n fileName: HelloWorldRedux_jsxFileName,\n lineNumber: 45,\n columnNumber: 9\n }\n }, "Redux Hello, ", name, "!"), /*#__PURE__*/react_default().createElement("p", {\n __self: this,\n __source: {\n fileName: HelloWorldRedux_jsxFileName,\n lineNumber: 46,\n columnNumber: 9\n }\n }, "With Redux, say hello to:", /*#__PURE__*/react_default().createElement("input", {\n type: "text",\n ref: this.setNameDomRef,\n value: name,\n onChange: this.handleChange,\n __self: this,\n __source: {\n fileName: HelloWorldRedux_jsxFileName,\n lineNumber: 48,\n columnNumber: 11\n }\n })), /*#__PURE__*/react_default().createElement(components_RailsContext, {\n railsContext,\n __self: this,\n __source: {\n fileName: HelloWorldRedux_jsxFileName,\n lineNumber: 50,\n columnNumber: 9\n }\n }));\n }\n}\n;// CONCATENATED MODULE: ./client/app/actions/HelloWorldActions.jsx\n\n\n/* eslint-disable import/prefer-default-export */\nfunction updateName(name) {\n return {\n type: HELLO_WORLD_NAME_UPDATE,\n name\n };\n}\n;// CONCATENATED MODULE: ./client/app/components/HelloWorldContainer.jsx\nvar HelloWorldContainer_jsxFileName = "/mnt/ssd/react_on_rails_pro/spec/dummy/client/app/components/HelloWorldContainer.jsx";\n\n\n\n\n\n\nconst HelloWorldContainer = ({\n actions,\n data,\n railsContext\n}) => /*#__PURE__*/react_default().createElement(HelloWorldRedux, {\n actions,\n data,\n railsContext,\n __self: undefined,\n __source: {\n fileName: HelloWorldContainer_jsxFileName,\n lineNumber: 11,\n columnNumber: 3\n }\n});\nHelloWorldContainer.propTypes = {\n actions: (prop_types_default()).object.isRequired,\n data: (prop_types_default()).object.isRequired,\n railsContext: (prop_types_default()).object.isRequired\n};\nfunction HelloWorldContainer_mapStateToProps(state) {\n return {\n data: state.helloWorldData,\n railsContext: state.railsContext\n };\n}\nfunction HelloWorldContainer_mapDispatchToProps(dispatch) {\n return {\n actions: bindActionCreators(HelloWorldActions_namespaceObject, dispatch)\n };\n}\n\n// Don\'t forget to actually use connect!\n/* harmony default export */ const components_HelloWorldContainer = (connect(HelloWorldContainer_mapStateToProps, HelloWorldContainer_mapDispatchToProps)(HelloWorldContainer));\n;// CONCATENATED MODULE: ./client/app/ror-auto-load-components/ReduxApp.server.jsx\nvar ReduxApp_server_jsxFileName = "/mnt/ssd/react_on_rails_pro/spec/dummy/client/app/ror-auto-load-components/ReduxApp.server.jsx";\n// This is loaded by execJs and Rails to generate the HTML used for server rendering.\n// Compare this file to ./ClientApp.jsx\n// This module should export one default method that take props and returns the react component to\n// render.\n\n\n\n\n\n\n// Uses the index\n\n\n\n\n/*\n * Export a function that takes the props and returns a ReactComponent.\n * This is used for the server rendering.\n * In the client, React will see that the state is the same and not do anything.\n */\n/* harmony default export */ const ReduxApp_server = ((props, railsContext) => {\n // eslint-disable-next-line\n delete props.prerender;\n const combinedReducer = combineReducers(reducersIndex);\n const combinedProps = composeInitialState(props, railsContext);\n\n // This is where we\'ll put in the middleware for the async function. Placeholder.\n // store will have helloWorldData as a top level property\n const store = applyMiddleware(es)(createStore)(combinedReducer, combinedProps);\n\n // Provider uses the this.props.children, so we\'re not typical React syntax.\n // This allows redux to add additional props to the HelloWorldContainer.\n return () => /*#__PURE__*/react_default().createElement(Provider, {\n store: store,\n __self: undefined,\n __source: {\n fileName: ReduxApp_server_jsxFileName,\n lineNumber: 36,\n columnNumber: 5\n }\n }, /*#__PURE__*/react_default().createElement(components_HelloWorldContainer, {\n __self: undefined,\n __source: {\n fileName: ReduxApp_server_jsxFileName,\n lineNumber: 37,\n columnNumber: 7\n }\n }));\n});\n;// CONCATENATED MODULE: ./client/app/ror-auto-load-components/ReduxSharedStoreApp.server.jsx\nvar ReduxSharedStoreApp_server_jsxFileName = "/mnt/ssd/react_on_rails_pro/spec/dummy/client/app/ror-auto-load-components/ReduxSharedStoreApp.server.jsx";\n// Top level component for serer side.\n// Compare this to the ./ClientReduxSharedStoreApp.jsx file which is used for client side rendering.\n\n\n\n\n\n\n/*\n * Export a function that returns a ReactComponent, depending on a store named SharedReduxStore.\n * This is used for the server rendering.\n * React will see that the state is the same and not do anything.\n */\n/* harmony default export */ const ReduxSharedStoreApp_server = (() => {\n // This is where we get the existing store.\n const store = ReactOnRails_default().getStore(\'SharedReduxStore\');\n return /*#__PURE__*/react_default().createElement(Provider, {\n store: store,\n __self: undefined,\n __source: {\n fileName: ReduxSharedStoreApp_server_jsxFileName,\n lineNumber: 20,\n columnNumber: 5\n }\n }, /*#__PURE__*/react_default().createElement(components_HelloWorldContainer, {\n __self: undefined,\n __source: {\n fileName: ReduxSharedStoreApp_server_jsxFileName,\n lineNumber: 21,\n columnNumber: 7\n }\n }));\n});\n;// CONCATENATED MODULE: ./client/app/components/EchoProps.jsx\nvar EchoProps_jsxFileName = "/mnt/ssd/react_on_rails_pro/spec/dummy/client/app/components/EchoProps.jsx";\n\nconst EchoProps = props => /*#__PURE__*/react_default().createElement("div", {\n __self: undefined,\n __source: {\n fileName: EchoProps_jsxFileName,\n lineNumber: 3,\n columnNumber: 30\n }\n}, "Props: ", JSON.stringify(props));\n/* harmony default export */ const components_EchoProps = (EchoProps);\n;// CONCATENATED MODULE: ./client/app/ror-auto-load-components/RenderedHtml.server.jsx\nvar RenderedHtml_server_jsxFileName = "/mnt/ssd/react_on_rails_pro/spec/dummy/client/app/ror-auto-load-components/RenderedHtml.server.jsx";\n// Top level component for simple client side only rendering\n\n\n\n\n/*\n * Export a function that takes the props and returns an object with { renderedHtml }\n * Note, this is imported as "RenderedHtml" by "serverRegistration.jsx"\n *\n * Note, this is a fictional example, as you\'d only use a generator function if you wanted to run\n * some extra code, such as setting up Redux and React-Router.\n *\n * And the use of renderToString would probably be done with react-router v4\n *\n */\n/* harmony default export */ const RenderedHtml_server = ((props, _railsContext) => {\n const renderedHtml = (0,server_node.renderToString)( /*#__PURE__*/react_default().createElement(components_EchoProps, Object.assign({}, props, {\n __self: undefined,\n __source: {\n fileName: RenderedHtml_server_jsxFileName,\n lineNumber: 17,\n columnNumber: 39\n }\n })));\n return {\n renderedHtml\n };\n});\n;// CONCATENATED MODULE: ./client/app/components/RouterLayout.jsx\nvar RouterLayout_jsxFileName = "/mnt/ssd/react_on_rails_pro/spec/dummy/client/app/components/RouterLayout.jsx";\n\n\n\nconst RouterLayout = ({\n children\n}) => {\n console.log(`The result of react-router\'s loaderFunction (which is called when then route is initialized) is: ${(0,react_router_dist.useLoaderData)()}`);\n return /*#__PURE__*/react_default().createElement("div", {\n className: "container",\n __self: undefined,\n __source: {\n fileName: RouterLayout_jsxFileName,\n lineNumber: 10,\n columnNumber: 5\n }\n }, /*#__PURE__*/react_default().createElement("h1", {\n __self: undefined,\n __source: {\n fileName: RouterLayout_jsxFileName,\n lineNumber: 11,\n columnNumber: 7\n }\n }, "React Router is working!"), /*#__PURE__*/react_default().createElement("p", {\n __self: undefined,\n __source: {\n fileName: RouterLayout_jsxFileName,\n lineNumber: 12,\n columnNumber: 7\n }\n }, "Woohoo, we can use ", /*#__PURE__*/react_default().createElement("code", {\n __self: undefined,\n __source: {\n fileName: RouterLayout_jsxFileName,\n lineNumber: 13,\n columnNumber: 28\n }\n }, "react-router"), " here!"), /*#__PURE__*/react_default().createElement("ul", {\n __self: undefined,\n __source: {\n fileName: RouterLayout_jsxFileName,\n lineNumber: 15,\n columnNumber: 7\n }\n }, /*#__PURE__*/react_default().createElement("li", {\n __self: undefined,\n __source: {\n fileName: RouterLayout_jsxFileName,\n lineNumber: 16,\n columnNumber: 9\n }\n }, /*#__PURE__*/react_default().createElement(dist.Link, {\n to: "/react_router",\n __self: undefined,\n __source: {\n fileName: RouterLayout_jsxFileName,\n lineNumber: 17,\n columnNumber: 11\n }\n }, "React Router Layout Only")), /*#__PURE__*/react_default().createElement("li", {\n __self: undefined,\n __source: {\n fileName: RouterLayout_jsxFileName,\n lineNumber: 19,\n columnNumber: 9\n }\n }, /*#__PURE__*/react_default().createElement(dist.Link, {\n to: "/react_router/first_page",\n __self: undefined,\n __source: {\n fileName: RouterLayout_jsxFileName,\n lineNumber: 20,\n columnNumber: 11\n }\n }, "Router First Page")), /*#__PURE__*/react_default().createElement("li", {\n __self: undefined,\n __source: {\n fileName: RouterLayout_jsxFileName,\n lineNumber: 22,\n columnNumber: 9\n }\n }, /*#__PURE__*/react_default().createElement(dist.Link, {\n to: "/react_router/second_page",\n __self: undefined,\n __source: {\n fileName: RouterLayout_jsxFileName,\n lineNumber: 23,\n columnNumber: 11\n }\n }, "Router Second Page"))), /*#__PURE__*/react_default().createElement("hr", {\n __self: undefined,\n __source: {\n fileName: RouterLayout_jsxFileName,\n lineNumber: 26,\n columnNumber: 7\n }\n }), /*#__PURE__*/react_default().createElement(react_router_dist.Outlet, {\n __self: undefined,\n __source: {\n fileName: RouterLayout_jsxFileName,\n lineNumber: 27,\n columnNumber: 7\n }\n }));\n};\nRouterLayout.propTypes = {\n children: (prop_types_default()).object\n};\n/* harmony default export */ const components_RouterLayout = (RouterLayout);\n;// CONCATENATED MODULE: ./client/app/components/RouterFirstPage.jsx\nvar RouterFirstPage_jsxFileName = "/mnt/ssd/react_on_rails_pro/spec/dummy/client/app/components/RouterFirstPage.jsx";\n\nconst RouterFirstPage = () => /*#__PURE__*/react_default().createElement("div", {\n className: "container",\n __self: undefined,\n __source: {\n fileName: RouterFirstPage_jsxFileName,\n lineNumber: 4,\n columnNumber: 3\n }\n}, /*#__PURE__*/react_default().createElement("h2", {\n id: "first-page",\n __self: undefined,\n __source: {\n fileName: RouterFirstPage_jsxFileName,\n lineNumber: 5,\n columnNumber: 5\n }\n}, "React Router First Page"), /*#__PURE__*/react_default().createElement("p", {\n __self: undefined,\n __source: {\n fileName: RouterFirstPage_jsxFileName,\n lineNumber: 6,\n columnNumber: 5\n }\n}, "This page brought to you by React Router"));\n/* harmony default export */ const components_RouterFirstPage = (RouterFirstPage);\n;// CONCATENATED MODULE: ./client/app/components/RouterSecondPage.jsx\nvar RouterSecondPage_jsxFileName = "/mnt/ssd/react_on_rails_pro/spec/dummy/client/app/components/RouterSecondPage.jsx";\n\nconst RouterSecondPage = () => /*#__PURE__*/react_default().createElement("div", {\n className: "container",\n __self: undefined,\n __source: {\n fileName: RouterSecondPage_jsxFileName,\n lineNumber: 4,\n columnNumber: 3\n }\n}, /*#__PURE__*/react_default().createElement("h2", {\n id: "second-page",\n __self: undefined,\n __source: {\n fileName: RouterSecondPage_jsxFileName,\n lineNumber: 5,\n columnNumber: 5\n }\n}, "React Router Second Page"), /*#__PURE__*/react_default().createElement("p", {\n __self: undefined,\n __source: {\n fileName: RouterSecondPage_jsxFileName,\n lineNumber: 6,\n columnNumber: 5\n }\n}, "This page brought to you by React Router"));\n/* harmony default export */ const components_RouterSecondPage = (RouterSecondPage);\n;// CONCATENATED MODULE: ./client/app/routes/routes.jsx\nvar routes_jsxFileName = "/mnt/ssd/react_on_rails_pro/spec/dummy/client/app/routes/routes.jsx";\n\n\n\n\nconst loaderFunction = () => {\n console.log("/react_router\'s loader function was called.");\n return "return result from /react_router\'s loader function";\n};\n/* harmony default export */ const routes = ([{\n path: \'/react_router\',\n element: /*#__PURE__*/react_default().createElement(components_RouterLayout, {\n __self: undefined,\n __source: {\n fileName: routes_jsxFileName,\n lineNumber: 15,\n columnNumber: 14\n }\n }),\n loader: loaderFunction,\n children: [{\n path: \'first_page\',\n element: /*#__PURE__*/react_default().createElement(components_RouterFirstPage, {\n __self: undefined,\n __source: {\n fileName: routes_jsxFileName,\n lineNumber: 20,\n columnNumber: 18\n }\n }),\n loader: loaderFunction\n }, {\n path: \'second_page\',\n element: /*#__PURE__*/react_default().createElement(components_RouterSecondPage, {\n __self: undefined,\n __source: {\n fileName: routes_jsxFileName,\n lineNumber: 25,\n columnNumber: 18\n }\n }),\n loader: loaderFunction\n }]\n}]);\n;// CONCATENATED MODULE: ./client/app/ror-auto-load-components/RouterApp.server.jsx\nvar RouterApp_server_jsxFileName = "/mnt/ssd/react_on_rails_pro/spec/dummy/client/app/ror-auto-load-components/RouterApp.server.jsx";\n\n\n\n\nconst dataServerRouter = async (_props, railsContext) => {\n const controller = new AbortController();\n const request = new Request(new URL(railsContext.href), {\n signal: controller.signal\n });\n const handler = (0,server/* createStaticHandler */.d6)(routes);\n const routerContext = await handler.query(request);\n const router = (0,server/* createStaticRouter */.KD)(handler.dataRoutes, routerContext);\n return (0,server_node.renderToString)( /*#__PURE__*/react_default().createElement(server/* StaticRouterProvider */.je, {\n router: router,\n context: routerContext,\n __self: undefined,\n __source: {\n fileName: RouterApp_server_jsxFileName,\n lineNumber: 14,\n columnNumber: 25\n }\n }));\n};\n/* harmony default export */ const RouterApp_server = (dataServerRouter);\n;// CONCATENATED MODULE: ./client/app/ror-auto-load-components/SetTimeoutLoggingApp.server.jsx\nvar SetTimeoutLoggingApp_server_jsxFileName = "/mnt/ssd/react_on_rails_pro/spec/dummy/client/app/ror-auto-load-components/SetTimeoutLoggingApp.server.jsx";\n\n\n\n/**\n * TODO: Node rendering server should handle a timeout.\n */\n/* harmony default export */ const SetTimeoutLoggingApp_server = (async (_props, _railsContext) => {\n const delayedValuePromise = new Promise(resolve => {\n setTimeout(() => {\n console.log(\'Console log from setTimeout in SetTimeoutLoggingApp.server.jsx\');\n }, 1);\n setTimeout(() => {\n console.log(\'Console log from setTimeout100 in SetTimeoutLoggingApp.server.jsx\');\n resolve(\'this value is set by setTimeout during SSR\');\n }, 100);\n });\n console.log(\'Console log from SetTimeoutLoggingApp.server.jsx\');\n const delayedValue = await delayedValuePromise;\n const element = /*#__PURE__*/react_default().createElement("div", {\n __self: undefined,\n __source: {\n fileName: SetTimeoutLoggingApp_server_jsxFileName,\n lineNumber: 21,\n columnNumber: 19\n }\n }, "Disable javascript in your browser options to confirm ", delayedValue, ".");\n return (0,server_node.renderToString)(element);\n});\n;// CONCATENATED MODULE: ./client/app/generated/server-bundle-generated.js\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nReactOnRails_default().register({\n BrokenApp: BrokenApp,\n CacheDisabled: CacheDisabled,\n CssModulesImagesFontsExample: CssModulesImagesFontsExample,\n HelloWorld: ror_auto_load_components_HelloWorld,\n HelloWorldApp: HelloWorldApp,\n HelloWorldES5: ror_auto_load_components_HelloWorldES5,\n HelloWorldHooks: ror_auto_load_components_HelloWorldHooks,\n HelloWorldHooksContext: ror_auto_load_components_HelloWorldHooksContext,\n HelloWorldRehydratable: ror_auto_load_components_HelloWorldRehydratable,\n HelloWorldWithLogAndThrow: ror_auto_load_components_HelloWorldWithLogAndThrow,\n ImageExample: ImageExample,\n ManualRenderApp: ManualRenderApp,\n PureComponent: PureComponent,\n ApolloGraphQLApp: ApolloGraphQLApp_server,\n ConsoleLogsInAsyncServer: ConsoleLogsInAsyncServer_server,\n LazyApolloGraphQLApp: LazyApolloGraphQLApp_server,\n Loadable: loadable_server_imports_loadable,\n ReactHelmetApp: ReactHelmetApp_server,\n ReduxApp: ReduxApp_server,\n ReduxSharedStoreApp: ReduxSharedStoreApp_server,\n RenderedHtml: RenderedHtml_server,\n RouterApp: RouterApp_server,\n SetTimeoutLoggingApp: SetTimeoutLoggingApp_server\n});\n;// CONCATENATED MODULE: ./client/app/non_react/HelloString.js\n// Super simple example without using React.\n// This shows you can server side render any JS code.\n\nconst HelloString = {\n world() {\n return \'Hello WORLD! Will this work?? YES! Time to visit Maui\';\n }\n};\n/* harmony default export */ const non_react_HelloString = (HelloString);\n;// CONCATENATED MODULE: ./client/app/stores/SharedReduxStore.jsx\n\n\n\n\n/*\n * Export a function that takes the props and returns a Redux store\n * This is used so that 2 components can have the same store.\n */\n/* harmony default export */ const SharedReduxStore = ((props, railsContext) => {\n // eslint-disable-next-line no-param-reassign\n delete props.prerender;\n const combinedReducer = combineReducers(reducersIndex);\n const newProps = {\n ...props,\n railsContext\n };\n return applyMiddleware(es)(createStore)(combinedReducer, newProps);\n});\n;// CONCATENATED MODULE: ./client/app/packs/server-bundle.js\n// import statement added by react_on_rails:generate_packs rake task\n\n// Shows the mapping from the exported object to the name used by the server rendering.\n\n\n// Example of server rendering with no React\n\n\nReactOnRails_default().register({\n HelloString: non_react_HelloString\n});\nReactOnRails_default().registerStore({\n SharedReduxStore: SharedReduxStore\n});\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./client/app/packs/server-bundle.js_+_98_modules?', + ); + + /***/ + }, + + /***/ 2580: /***/ (__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + "__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ getApolloClient: () => (/* binding */ getApolloClient),\n/* harmony export */ initializeApolloClient: () => (/* binding */ initializeApolloClient),\n/* harmony export */ setApolloClient: () => (/* binding */ setApolloClient)\n/* harmony export */ });\n/* harmony import */ var _apollo_client__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8067);\n/* harmony import */ var _apollo_client__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7404);\n/* harmony import */ var _apollo_client__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4132);\n\nlet apolloClient;\nconst getApolloClient = () => {\n return apolloClient;\n};\nconst setApolloClient = client => {\n apolloClient = client;\n};\nconst initializeApolloClient = () => {\n let client = getApolloClient();\n if (client) {\n return client;\n }\n const csrfToken = document.querySelector('meta[name=\"csrf-token\"]')?.getAttribute('content');\n if (!csrfToken) {\n throw new Error('CSRF token not found: Are you missing a meta tag in your layout?');\n }\n // fulfill the store with the server data\n const initialState = window.__APOLLO_STATE__;\n client = new _apollo_client__WEBPACK_IMPORTED_MODULE_0__/* .ApolloClient */ .R({\n cache: new _apollo_client__WEBPACK_IMPORTED_MODULE_1__/* .InMemoryCache */ .D().restore(initialState),\n link: (0,_apollo_client__WEBPACK_IMPORTED_MODULE_2__/* .createHttpLink */ .$)({\n uri: `${window.location.origin}/graphql`,\n credentials: 'same-origin',\n headers: {\n 'X-CSRF-Token': csrfToken\n }\n }),\n ssrForceFetchDelay: 100\n });\n setApolloClient(client);\n return client;\n};\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./client/app/utils/lazyApollo.ts?", + ); + + /***/ + }, + + /***/ 4766: /***/ (__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ UPDATE_USER_MUTATION: () => (/* binding */ UPDATE_USER_MUTATION)\n/* harmony export */ });\n/* harmony import */ var _apollo_client__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9708);\n\nconst UPDATE_USER_MUTATION = (0,_apollo_client__WEBPACK_IMPORTED_MODULE_0__/* .gql */ .J1)`\n mutation updateUser($userId: ID!, $newName: String!) {\n updateUser(input: { userId: $userId, newName: $newName }) {\n user {\n id\n name\n email\n }\n }\n }\n`;\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./client/app/utils/lazyApolloOperations.ts?', + ); + + /***/ + }, + + /***/ 1804: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + 'use strict'; + eval( + "/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n\n\nvar _assign = __webpack_require__(5228);\n\n// -- Inlined from fbjs --\n\nvar emptyObject = {};\n\nif (true) {\n Object.freeze(emptyObject);\n}\n\nvar validateFormat = function validateFormat(format) {};\n\nif (true) {\n validateFormat = function validateFormat(format) {\n if (format === undefined) {\n throw new Error('invariant requires an error message argument');\n }\n };\n}\n\nfunction _invariant(condition, format, a, b, c, d, e, f) {\n validateFormat(format);\n\n if (!condition) {\n var error;\n if (format === undefined) {\n error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');\n } else {\n var args = [a, b, c, d, e, f];\n var argIndex = 0;\n error = new Error(format.replace(/%s/g, function () {\n return args[argIndex++];\n }));\n error.name = 'Invariant Violation';\n }\n\n error.framesToPop = 1; // we don't care about invariant's own frame\n throw error;\n }\n}\n\nvar warning = function(){};\n\nif (true) {\n var printWarning = function printWarning(format) {\n for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n var argIndex = 0;\n var message = 'Warning: ' + format.replace(/%s/g, function () {\n return args[argIndex++];\n });\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n };\n\n warning = function warning(condition, format) {\n if (format === undefined) {\n throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');\n }\n\n if (format.indexOf('Failed Composite propType: ') === 0) {\n return; // Ignore CompositeComponent proptype check.\n }\n\n if (!condition) {\n for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {\n args[_key2 - 2] = arguments[_key2];\n }\n\n printWarning.apply(undefined, [format].concat(args));\n }\n };\n}\n\n// /-- Inlined from fbjs --\n\nvar MIXINS_KEY = 'mixins';\n\n// Helper function to allow the creation of anonymous functions which do not\n// have .name set to the name of the variable being assigned to.\nfunction identity(fn) {\n return fn;\n}\n\nvar ReactPropTypeLocationNames;\nif (true) {\n ReactPropTypeLocationNames = {\n prop: 'prop',\n context: 'context',\n childContext: 'child context'\n };\n} else {}\n\nfunction factory(ReactComponent, isValidElement, ReactNoopUpdateQueue) {\n /**\n * Policies that describe methods in `ReactClassInterface`.\n */\n\n var injectedMixins = [];\n\n /**\n * Composite components are higher-level components that compose other composite\n * or host components.\n *\n * To create a new type of `ReactClass`, pass a specification of\n * your new class to `React.createClass`. The only requirement of your class\n * specification is that you implement a `render` method.\n *\n * var MyComponent = React.createClass({\n * render: function() {\n * return <div>Hello World</div>;\n * }\n * });\n *\n * The class specification supports a specific protocol of methods that have\n * special meaning (e.g. `render`). See `ReactClassInterface` for\n * more the comprehensive protocol. Any other properties and methods in the\n * class specification will be available on the prototype.\n *\n * @interface ReactClassInterface\n * @internal\n */\n var ReactClassInterface = {\n /**\n * An array of Mixin objects to include when defining your component.\n *\n * @type {array}\n * @optional\n */\n mixins: 'DEFINE_MANY',\n\n /**\n * An object containing properties and methods that should be defined on\n * the component's constructor instead of its prototype (static methods).\n *\n * @type {object}\n * @optional\n */\n statics: 'DEFINE_MANY',\n\n /**\n * Definition of prop types for this component.\n *\n * @type {object}\n * @optional\n */\n propTypes: 'DEFINE_MANY',\n\n /**\n * Definition of context types for this component.\n *\n * @type {object}\n * @optional\n */\n contextTypes: 'DEFINE_MANY',\n\n /**\n * Definition of context types this component sets for its children.\n *\n * @type {object}\n * @optional\n */\n childContextTypes: 'DEFINE_MANY',\n\n // ==== Definition methods ====\n\n /**\n * Invoked when the component is mounted. Values in the mapping will be set on\n * `this.props` if that prop is not specified (i.e. using an `in` check).\n *\n * This method is invoked before `getInitialState` and therefore cannot rely\n * on `this.state` or use `this.setState`.\n *\n * @return {object}\n * @optional\n */\n getDefaultProps: 'DEFINE_MANY_MERGED',\n\n /**\n * Invoked once before the component is mounted. The return value will be used\n * as the initial value of `this.state`.\n *\n * getInitialState: function() {\n * return {\n * isOn: false,\n * fooBaz: new BazFoo()\n * }\n * }\n *\n * @return {object}\n * @optional\n */\n getInitialState: 'DEFINE_MANY_MERGED',\n\n /**\n * @return {object}\n * @optional\n */\n getChildContext: 'DEFINE_MANY_MERGED',\n\n /**\n * Uses props from `this.props` and state from `this.state` to render the\n * structure of the component.\n *\n * No guarantees are made about when or how often this method is invoked, so\n * it must not have side effects.\n *\n * render: function() {\n * var name = this.props.name;\n * return <div>Hello, {name}!</div>;\n * }\n *\n * @return {ReactComponent}\n * @required\n */\n render: 'DEFINE_ONCE',\n\n // ==== Delegate methods ====\n\n /**\n * Invoked when the component is initially created and about to be mounted.\n * This may have side effects, but any external subscriptions or data created\n * by this method must be cleaned up in `componentWillUnmount`.\n *\n * @optional\n */\n componentWillMount: 'DEFINE_MANY',\n\n /**\n * Invoked when the component has been mounted and has a DOM representation.\n * However, there is no guarantee that the DOM node is in the document.\n *\n * Use this as an opportunity to operate on the DOM when the component has\n * been mounted (initialized and rendered) for the first time.\n *\n * @param {DOMElement} rootNode DOM element representing the component.\n * @optional\n */\n componentDidMount: 'DEFINE_MANY',\n\n /**\n * Invoked before the component receives new props.\n *\n * Use this as an opportunity to react to a prop transition by updating the\n * state using `this.setState`. Current props are accessed via `this.props`.\n *\n * componentWillReceiveProps: function(nextProps, nextContext) {\n * this.setState({\n * likesIncreasing: nextProps.likeCount > this.props.likeCount\n * });\n * }\n *\n * NOTE: There is no equivalent `componentWillReceiveState`. An incoming prop\n * transition may cause a state change, but the opposite is not true. If you\n * need it, you are probably looking for `componentWillUpdate`.\n *\n * @param {object} nextProps\n * @optional\n */\n componentWillReceiveProps: 'DEFINE_MANY',\n\n /**\n * Invoked while deciding if the component should be updated as a result of\n * receiving new props, state and/or context.\n *\n * Use this as an opportunity to `return false` when you're certain that the\n * transition to the new props/state/context will not require a component\n * update.\n *\n * shouldComponentUpdate: function(nextProps, nextState, nextContext) {\n * return !equal(nextProps, this.props) ||\n * !equal(nextState, this.state) ||\n * !equal(nextContext, this.context);\n * }\n *\n * @param {object} nextProps\n * @param {?object} nextState\n * @param {?object} nextContext\n * @return {boolean} True if the component should update.\n * @optional\n */\n shouldComponentUpdate: 'DEFINE_ONCE',\n\n /**\n * Invoked when the component is about to update due to a transition from\n * `this.props`, `this.state` and `this.context` to `nextProps`, `nextState`\n * and `nextContext`.\n *\n * Use this as an opportunity to perform preparation before an update occurs.\n *\n * NOTE: You **cannot** use `this.setState()` in this method.\n *\n * @param {object} nextProps\n * @param {?object} nextState\n * @param {?object} nextContext\n * @param {ReactReconcileTransaction} transaction\n * @optional\n */\n componentWillUpdate: 'DEFINE_MANY',\n\n /**\n * Invoked when the component's DOM representation has been updated.\n *\n * Use this as an opportunity to operate on the DOM when the component has\n * been updated.\n *\n * @param {object} prevProps\n * @param {?object} prevState\n * @param {?object} prevContext\n * @param {DOMElement} rootNode DOM element representing the component.\n * @optional\n */\n componentDidUpdate: 'DEFINE_MANY',\n\n /**\n * Invoked when the component is about to be removed from its parent and have\n * its DOM representation destroyed.\n *\n * Use this as an opportunity to deallocate any external resources.\n *\n * NOTE: There is no `componentDidUnmount` since your component will have been\n * destroyed by that point.\n *\n * @optional\n */\n componentWillUnmount: 'DEFINE_MANY',\n\n /**\n * Replacement for (deprecated) `componentWillMount`.\n *\n * @optional\n */\n UNSAFE_componentWillMount: 'DEFINE_MANY',\n\n /**\n * Replacement for (deprecated) `componentWillReceiveProps`.\n *\n * @optional\n */\n UNSAFE_componentWillReceiveProps: 'DEFINE_MANY',\n\n /**\n * Replacement for (deprecated) `componentWillUpdate`.\n *\n * @optional\n */\n UNSAFE_componentWillUpdate: 'DEFINE_MANY',\n\n // ==== Advanced methods ====\n\n /**\n * Updates the component's currently mounted DOM representation.\n *\n * By default, this implements React's rendering and reconciliation algorithm.\n * Sophisticated clients may wish to override this.\n *\n * @param {ReactReconcileTransaction} transaction\n * @internal\n * @overridable\n */\n updateComponent: 'OVERRIDE_BASE'\n };\n\n /**\n * Similar to ReactClassInterface but for static methods.\n */\n var ReactClassStaticInterface = {\n /**\n * This method is invoked after a component is instantiated and when it\n * receives new props. Return an object to update state in response to\n * prop changes. Return null to indicate no change to state.\n *\n * If an object is returned, its keys will be merged into the existing state.\n *\n * @return {object || null}\n * @optional\n */\n getDerivedStateFromProps: 'DEFINE_MANY_MERGED'\n };\n\n /**\n * Mapping from class specification keys to special processing functions.\n *\n * Although these are declared like instance properties in the specification\n * when defining classes using `React.createClass`, they are actually static\n * and are accessible on the constructor instead of the prototype. Despite\n * being static, they must be defined outside of the \"statics\" key under\n * which all other static methods are defined.\n */\n var RESERVED_SPEC_KEYS = {\n displayName: function(Constructor, displayName) {\n Constructor.displayName = displayName;\n },\n mixins: function(Constructor, mixins) {\n if (mixins) {\n for (var i = 0; i < mixins.length; i++) {\n mixSpecIntoComponent(Constructor, mixins[i]);\n }\n }\n },\n childContextTypes: function(Constructor, childContextTypes) {\n if (true) {\n validateTypeDef(Constructor, childContextTypes, 'childContext');\n }\n Constructor.childContextTypes = _assign(\n {},\n Constructor.childContextTypes,\n childContextTypes\n );\n },\n contextTypes: function(Constructor, contextTypes) {\n if (true) {\n validateTypeDef(Constructor, contextTypes, 'context');\n }\n Constructor.contextTypes = _assign(\n {},\n Constructor.contextTypes,\n contextTypes\n );\n },\n /**\n * Special case getDefaultProps which should move into statics but requires\n * automatic merging.\n */\n getDefaultProps: function(Constructor, getDefaultProps) {\n if (Constructor.getDefaultProps) {\n Constructor.getDefaultProps = createMergedResultFunction(\n Constructor.getDefaultProps,\n getDefaultProps\n );\n } else {\n Constructor.getDefaultProps = getDefaultProps;\n }\n },\n propTypes: function(Constructor, propTypes) {\n if (true) {\n validateTypeDef(Constructor, propTypes, 'prop');\n }\n Constructor.propTypes = _assign({}, Constructor.propTypes, propTypes);\n },\n statics: function(Constructor, statics) {\n mixStaticSpecIntoComponent(Constructor, statics);\n },\n autobind: function() {}\n };\n\n function validateTypeDef(Constructor, typeDef, location) {\n for (var propName in typeDef) {\n if (typeDef.hasOwnProperty(propName)) {\n // use a warning instead of an _invariant so components\n // don't show up in prod but only in __DEV__\n if (true) {\n warning(\n typeof typeDef[propName] === 'function',\n '%s: %s type `%s` is invalid; it must be a function, usually from ' +\n 'React.PropTypes.',\n Constructor.displayName || 'ReactClass',\n ReactPropTypeLocationNames[location],\n propName\n );\n }\n }\n }\n }\n\n function validateMethodOverride(isAlreadyDefined, name) {\n var specPolicy = ReactClassInterface.hasOwnProperty(name)\n ? ReactClassInterface[name]\n : null;\n\n // Disallow overriding of base class methods unless explicitly allowed.\n if (ReactClassMixin.hasOwnProperty(name)) {\n _invariant(\n specPolicy === 'OVERRIDE_BASE',\n 'ReactClassInterface: You are attempting to override ' +\n '`%s` from your class specification. Ensure that your method names ' +\n 'do not overlap with React methods.',\n name\n );\n }\n\n // Disallow defining methods more than once unless explicitly allowed.\n if (isAlreadyDefined) {\n _invariant(\n specPolicy === 'DEFINE_MANY' || specPolicy === 'DEFINE_MANY_MERGED',\n 'ReactClassInterface: You are attempting to define ' +\n '`%s` on your component more than once. This conflict may be due ' +\n 'to a mixin.',\n name\n );\n }\n }\n\n /**\n * Mixin helper which handles policy validation and reserved\n * specification keys when building React classes.\n */\n function mixSpecIntoComponent(Constructor, spec) {\n if (!spec) {\n if (true) {\n var typeofSpec = typeof spec;\n var isMixinValid = typeofSpec === 'object' && spec !== null;\n\n if (true) {\n warning(\n isMixinValid,\n \"%s: You're attempting to include a mixin that is either null \" +\n 'or not an object. Check the mixins included by the component, ' +\n 'as well as any mixins they include themselves. ' +\n 'Expected object but got %s.',\n Constructor.displayName || 'ReactClass',\n spec === null ? null : typeofSpec\n );\n }\n }\n\n return;\n }\n\n _invariant(\n typeof spec !== 'function',\n \"ReactClass: You're attempting to \" +\n 'use a component class or function as a mixin. Instead, just use a ' +\n 'regular object.'\n );\n _invariant(\n !isValidElement(spec),\n \"ReactClass: You're attempting to \" +\n 'use a component as a mixin. Instead, just use a regular object.'\n );\n\n var proto = Constructor.prototype;\n var autoBindPairs = proto.__reactAutoBindPairs;\n\n // By handling mixins before any other properties, we ensure the same\n // chaining order is applied to methods with DEFINE_MANY policy, whether\n // mixins are listed before or after these methods in the spec.\n if (spec.hasOwnProperty(MIXINS_KEY)) {\n RESERVED_SPEC_KEYS.mixins(Constructor, spec.mixins);\n }\n\n for (var name in spec) {\n if (!spec.hasOwnProperty(name)) {\n continue;\n }\n\n if (name === MIXINS_KEY) {\n // We have already handled mixins in a special case above.\n continue;\n }\n\n var property = spec[name];\n var isAlreadyDefined = proto.hasOwnProperty(name);\n validateMethodOverride(isAlreadyDefined, name);\n\n if (RESERVED_SPEC_KEYS.hasOwnProperty(name)) {\n RESERVED_SPEC_KEYS[name](Constructor, property);\n } else {\n // Setup methods on prototype:\n // The following member methods should not be automatically bound:\n // 1. Expected ReactClass methods (in the \"interface\").\n // 2. Overridden methods (that were mixed in).\n var isReactClassMethod = ReactClassInterface.hasOwnProperty(name);\n var isFunction = typeof property === 'function';\n var shouldAutoBind =\n isFunction &&\n !isReactClassMethod &&\n !isAlreadyDefined &&\n spec.autobind !== false;\n\n if (shouldAutoBind) {\n autoBindPairs.push(name, property);\n proto[name] = property;\n } else {\n if (isAlreadyDefined) {\n var specPolicy = ReactClassInterface[name];\n\n // These cases should already be caught by validateMethodOverride.\n _invariant(\n isReactClassMethod &&\n (specPolicy === 'DEFINE_MANY_MERGED' ||\n specPolicy === 'DEFINE_MANY'),\n 'ReactClass: Unexpected spec policy %s for key %s ' +\n 'when mixing in component specs.',\n specPolicy,\n name\n );\n\n // For methods which are defined more than once, call the existing\n // methods before calling the new property, merging if appropriate.\n if (specPolicy === 'DEFINE_MANY_MERGED') {\n proto[name] = createMergedResultFunction(proto[name], property);\n } else if (specPolicy === 'DEFINE_MANY') {\n proto[name] = createChainedFunction(proto[name], property);\n }\n } else {\n proto[name] = property;\n if (true) {\n // Add verbose displayName to the function, which helps when looking\n // at profiling tools.\n if (typeof property === 'function' && spec.displayName) {\n proto[name].displayName = spec.displayName + '_' + name;\n }\n }\n }\n }\n }\n }\n }\n\n function mixStaticSpecIntoComponent(Constructor, statics) {\n if (!statics) {\n return;\n }\n\n for (var name in statics) {\n var property = statics[name];\n if (!statics.hasOwnProperty(name)) {\n continue;\n }\n\n var isReserved = name in RESERVED_SPEC_KEYS;\n _invariant(\n !isReserved,\n 'ReactClass: You are attempting to define a reserved ' +\n 'property, `%s`, that shouldn\\'t be on the \"statics\" key. Define it ' +\n 'as an instance property instead; it will still be accessible on the ' +\n 'constructor.',\n name\n );\n\n var isAlreadyDefined = name in Constructor;\n if (isAlreadyDefined) {\n var specPolicy = ReactClassStaticInterface.hasOwnProperty(name)\n ? ReactClassStaticInterface[name]\n : null;\n\n _invariant(\n specPolicy === 'DEFINE_MANY_MERGED',\n 'ReactClass: You are attempting to define ' +\n '`%s` on your component more than once. This conflict may be ' +\n 'due to a mixin.',\n name\n );\n\n Constructor[name] = createMergedResultFunction(Constructor[name], property);\n\n return;\n }\n\n Constructor[name] = property;\n }\n }\n\n /**\n * Merge two objects, but throw if both contain the same key.\n *\n * @param {object} one The first object, which is mutated.\n * @param {object} two The second object\n * @return {object} one after it has been mutated to contain everything in two.\n */\n function mergeIntoWithNoDuplicateKeys(one, two) {\n _invariant(\n one && two && typeof one === 'object' && typeof two === 'object',\n 'mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.'\n );\n\n for (var key in two) {\n if (two.hasOwnProperty(key)) {\n _invariant(\n one[key] === undefined,\n 'mergeIntoWithNoDuplicateKeys(): ' +\n 'Tried to merge two objects with the same key: `%s`. This conflict ' +\n 'may be due to a mixin; in particular, this may be caused by two ' +\n 'getInitialState() or getDefaultProps() methods returning objects ' +\n 'with clashing keys.',\n key\n );\n one[key] = two[key];\n }\n }\n return one;\n }\n\n /**\n * Creates a function that invokes two functions and merges their return values.\n *\n * @param {function} one Function to invoke first.\n * @param {function} two Function to invoke second.\n * @return {function} Function that invokes the two argument functions.\n * @private\n */\n function createMergedResultFunction(one, two) {\n return function mergedResult() {\n var a = one.apply(this, arguments);\n var b = two.apply(this, arguments);\n if (a == null) {\n return b;\n } else if (b == null) {\n return a;\n }\n var c = {};\n mergeIntoWithNoDuplicateKeys(c, a);\n mergeIntoWithNoDuplicateKeys(c, b);\n return c;\n };\n }\n\n /**\n * Creates a function that invokes two functions and ignores their return vales.\n *\n * @param {function} one Function to invoke first.\n * @param {function} two Function to invoke second.\n * @return {function} Function that invokes the two argument functions.\n * @private\n */\n function createChainedFunction(one, two) {\n return function chainedFunction() {\n one.apply(this, arguments);\n two.apply(this, arguments);\n };\n }\n\n /**\n * Binds a method to the component.\n *\n * @param {object} component Component whose method is going to be bound.\n * @param {function} method Method to be bound.\n * @return {function} The bound method.\n */\n function bindAutoBindMethod(component, method) {\n var boundMethod = method.bind(component);\n if (true) {\n boundMethod.__reactBoundContext = component;\n boundMethod.__reactBoundMethod = method;\n boundMethod.__reactBoundArguments = null;\n var componentName = component.constructor.displayName;\n var _bind = boundMethod.bind;\n boundMethod.bind = function(newThis) {\n for (\n var _len = arguments.length,\n args = Array(_len > 1 ? _len - 1 : 0),\n _key = 1;\n _key < _len;\n _key++\n ) {\n args[_key - 1] = arguments[_key];\n }\n\n // User is trying to bind() an autobound method; we effectively will\n // ignore the value of \"this\" that the user is trying to use, so\n // let's warn.\n if (newThis !== component && newThis !== null) {\n if (true) {\n warning(\n false,\n 'bind(): React component methods may only be bound to the ' +\n 'component instance. See %s',\n componentName\n );\n }\n } else if (!args.length) {\n if (true) {\n warning(\n false,\n 'bind(): You are binding a component method to the component. ' +\n 'React does this for you automatically in a high-performance ' +\n 'way, so you can safely remove this call. See %s',\n componentName\n );\n }\n return boundMethod;\n }\n var reboundMethod = _bind.apply(boundMethod, arguments);\n reboundMethod.__reactBoundContext = component;\n reboundMethod.__reactBoundMethod = method;\n reboundMethod.__reactBoundArguments = args;\n return reboundMethod;\n };\n }\n return boundMethod;\n }\n\n /**\n * Binds all auto-bound methods in a component.\n *\n * @param {object} component Component whose method is going to be bound.\n */\n function bindAutoBindMethods(component) {\n var pairs = component.__reactAutoBindPairs;\n for (var i = 0; i < pairs.length; i += 2) {\n var autoBindKey = pairs[i];\n var method = pairs[i + 1];\n component[autoBindKey] = bindAutoBindMethod(component, method);\n }\n }\n\n var IsMountedPreMixin = {\n componentDidMount: function() {\n this.__isMounted = true;\n }\n };\n\n var IsMountedPostMixin = {\n componentWillUnmount: function() {\n this.__isMounted = false;\n }\n };\n\n /**\n * Add more to the ReactClass base class. These are all legacy features and\n * therefore not already part of the modern ReactComponent.\n */\n var ReactClassMixin = {\n /**\n * TODO: This will be deprecated because state should always keep a consistent\n * type signature and the only use case for this, is to avoid that.\n */\n replaceState: function(newState, callback) {\n this.updater.enqueueReplaceState(this, newState, callback);\n },\n\n /**\n * Checks whether or not this composite component is mounted.\n * @return {boolean} True if mounted, false otherwise.\n * @protected\n * @final\n */\n isMounted: function() {\n if (true) {\n warning(\n this.__didWarnIsMounted,\n '%s: isMounted is deprecated. Instead, make sure to clean up ' +\n 'subscriptions and pending requests in componentWillUnmount to ' +\n 'prevent memory leaks.',\n (this.constructor && this.constructor.displayName) ||\n this.name ||\n 'Component'\n );\n this.__didWarnIsMounted = true;\n }\n return !!this.__isMounted;\n }\n };\n\n var ReactClassComponent = function() {};\n _assign(\n ReactClassComponent.prototype,\n ReactComponent.prototype,\n ReactClassMixin\n );\n\n /**\n * Creates a composite component class given a class specification.\n * See https://facebook.github.io/react/docs/top-level-api.html#react.createclass\n *\n * @param {object} spec Class specification (which must define `render`).\n * @return {function} Component constructor function.\n * @public\n */\n function createClass(spec) {\n // To keep our warnings more understandable, we'll use a little hack here to\n // ensure that Constructor.name !== 'Constructor'. This makes sure we don't\n // unnecessarily identify a class without displayName as 'Constructor'.\n var Constructor = identity(function(props, context, updater) {\n // This constructor gets overridden by mocks. The argument is used\n // by mocks to assert on what gets mounted.\n\n if (true) {\n warning(\n this instanceof Constructor,\n 'Something is calling a React component directly. Use a factory or ' +\n 'JSX instead. See: https://fb.me/react-legacyfactory'\n );\n }\n\n // Wire up auto-binding\n if (this.__reactAutoBindPairs.length) {\n bindAutoBindMethods(this);\n }\n\n this.props = props;\n this.context = context;\n this.refs = emptyObject;\n this.updater = updater || ReactNoopUpdateQueue;\n\n this.state = null;\n\n // ReactClasses doesn't have constructors. Instead, they use the\n // getInitialState and componentWillMount methods for initialization.\n\n var initialState = this.getInitialState ? this.getInitialState() : null;\n if (true) {\n // We allow auto-mocks to proceed as if they're returning null.\n if (\n initialState === undefined &&\n this.getInitialState._isMockFunction\n ) {\n // This is probably bad practice. Consider warning here and\n // deprecating this convenience.\n initialState = null;\n }\n }\n _invariant(\n typeof initialState === 'object' && !Array.isArray(initialState),\n '%s.getInitialState(): must return an object or null',\n Constructor.displayName || 'ReactCompositeComponent'\n );\n\n this.state = initialState;\n });\n Constructor.prototype = new ReactClassComponent();\n Constructor.prototype.constructor = Constructor;\n Constructor.prototype.__reactAutoBindPairs = [];\n\n injectedMixins.forEach(mixSpecIntoComponent.bind(null, Constructor));\n\n mixSpecIntoComponent(Constructor, IsMountedPreMixin);\n mixSpecIntoComponent(Constructor, spec);\n mixSpecIntoComponent(Constructor, IsMountedPostMixin);\n\n // Initialize the defaultProps property after all mixins have been merged.\n if (Constructor.getDefaultProps) {\n Constructor.defaultProps = Constructor.getDefaultProps();\n }\n\n if (true) {\n // This is a tag to indicate that the use of these method names is ok,\n // since it's used with createClass. If it's not, then it's likely a\n // mistake so we'll warn you to use the static property, property\n // initializer or constructor respectively.\n if (Constructor.getDefaultProps) {\n Constructor.getDefaultProps.isReactClassApproved = {};\n }\n if (Constructor.prototype.getInitialState) {\n Constructor.prototype.getInitialState.isReactClassApproved = {};\n }\n }\n\n _invariant(\n Constructor.prototype.render,\n 'createClass(...): Class specification must implement a `render` method.'\n );\n\n if (true) {\n warning(\n !Constructor.prototype.componentShouldUpdate,\n '%s has a method called ' +\n 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' +\n 'The name is phrased as a question because the function is ' +\n 'expected to return a value.',\n spec.displayName || 'A component'\n );\n warning(\n !Constructor.prototype.componentWillRecieveProps,\n '%s has a method called ' +\n 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?',\n spec.displayName || 'A component'\n );\n warning(\n !Constructor.prototype.UNSAFE_componentWillRecieveProps,\n '%s has a method called UNSAFE_componentWillRecieveProps(). ' +\n 'Did you mean UNSAFE_componentWillReceiveProps()?',\n spec.displayName || 'A component'\n );\n }\n\n // Reduce time spent doing lookups by setting these on the prototype.\n for (var methodName in ReactClassInterface) {\n if (!Constructor.prototype[methodName]) {\n Constructor.prototype[methodName] = null;\n }\n }\n\n return Constructor;\n }\n\n return createClass;\n}\n\nmodule.exports = factory;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/create-react-class/factory.js?", + ); + + /***/ + }, + + /***/ 2306: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + 'use strict'; + eval( + "/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n\n\nvar React = __webpack_require__(6540);\nvar factory = __webpack_require__(1804);\n\nif (typeof React === 'undefined') {\n throw Error(\n 'create-react-class could not find the React object. If you are using script tags, ' +\n 'make sure that React is being loaded before create-react-class.'\n );\n}\n\n// Hack to grab NoopUpdateQueue from isomorphic React\nvar ReactNoopUpdateQueue = new React.Component().updater;\n\nmodule.exports = factory(\n React.Component,\n React.isValidElement,\n ReactNoopUpdateQueue\n);\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/create-react-class/index.js?", + ); + + /***/ + }, + + /***/ 7143: /***/ (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'const fetchNode = __webpack_require__(5221)\nconst fetch = fetchNode.fetch.bind({})\n\nfetch.polyfill = true\n\nif (!global.fetch) {\n global.fetch = fetch\n global.Response = fetchNode.Response\n global.Headers = fetchNode.Headers\n global.Request = fetchNode.Request\n}\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/cross-fetch/dist/node-polyfill.js?', + ); + + /***/ + }, + + /***/ 5221: /***/ (module, exports, __webpack_require__) => { + eval( + 'const nodeFetch = __webpack_require__(9778)\nconst realFetch = nodeFetch.default || nodeFetch\n\nconst fetch = function (url, options) {\n // Support schemaless URIs on the server for parity with the browser.\n // Ex: //github.com/ -> https://github.com/\n if (/^\\/\\//.test(url)) {\n url = \'https:\' + url\n }\n return realFetch.call(this, url, options)\n}\n\nfetch.ponyfill = true\n\nmodule.exports = exports = fetch\nexports.fetch = fetch\nexports.Headers = nodeFetch.Headers\nexports.Request = nodeFetch.Request\nexports.Response = nodeFetch.Response\n\n// Needed for TypeScript consumers without esModuleInterop.\nexports["default"] = fetch\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/cross-fetch/dist/node-ponyfill.js?', + ); + + /***/ + }, + + /***/ 1807: /***/ (__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({\n\n});\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./client/app/components/Loadable/letters/A.css?', + ); + + /***/ + }, + + /***/ 9227: /***/ (__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({\n\n});\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./client/app/components/Loadable/letters/main.css?', + ); + + /***/ + }, + + /***/ 9708: /***/ (__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + "\n// EXPORTS\n__webpack_require__.d(__webpack_exports__, {\n J1: () => (/* binding */ gql)\n});\n\n// UNUSED EXPORTS: default, disableExperimentalFragmentVariables, disableFragmentWarnings, enableExperimentalFragmentVariables, resetCaches\n\n// EXTERNAL MODULE: ./node_modules/tslib/tslib.es6.mjs\nvar tslib_es6 = __webpack_require__(1635);\n;// CONCATENATED MODULE: ./node_modules/graphql/jsutils/isObjectLike.mjs\n/**\n * Return true if `value` is object-like. A value is object-like if it's not\n * `null` and has a `typeof` result of \"object\".\n */\nfunction isObjectLike(value) {\n return typeof value == 'object' && value !== null;\n}\n\n;// CONCATENATED MODULE: ./node_modules/graphql/jsutils/invariant.mjs\nfunction invariant(condition, message) {\n const booleanCondition = Boolean(condition);\n\n if (!booleanCondition) {\n throw new Error(\n message != null ? message : 'Unexpected invariant triggered.',\n );\n }\n}\n\n;// CONCATENATED MODULE: ./node_modules/graphql/language/location.mjs\n\nconst LineRegExp = /\\r\\n|[\\n\\r]/g;\n/**\n * Represents a location in a Source.\n */\n\n/**\n * Takes a Source and a UTF-8 character offset, and returns the corresponding\n * line and column as a SourceLocation.\n */\nfunction getLocation(source, position) {\n let lastLineStart = 0;\n let line = 1;\n\n for (const match of source.body.matchAll(LineRegExp)) {\n typeof match.index === 'number' || invariant(false);\n\n if (match.index >= position) {\n break;\n }\n\n lastLineStart = match.index + match[0].length;\n line += 1;\n }\n\n return {\n line,\n column: position + 1 - lastLineStart,\n };\n}\n\n;// CONCATENATED MODULE: ./node_modules/graphql/language/printLocation.mjs\n\n\n/**\n * Render a helpful description of the location in the GraphQL Source document.\n */\nfunction printLocation(location) {\n return printSourceLocation(\n location.source,\n getLocation(location.source, location.start),\n );\n}\n/**\n * Render a helpful description of the location in the GraphQL Source document.\n */\n\nfunction printSourceLocation(source, sourceLocation) {\n const firstLineColumnOffset = source.locationOffset.column - 1;\n const body = ''.padStart(firstLineColumnOffset) + source.body;\n const lineIndex = sourceLocation.line - 1;\n const lineOffset = source.locationOffset.line - 1;\n const lineNum = sourceLocation.line + lineOffset;\n const columnOffset = sourceLocation.line === 1 ? firstLineColumnOffset : 0;\n const columnNum = sourceLocation.column + columnOffset;\n const locationStr = `${source.name}:${lineNum}:${columnNum}\\n`;\n const lines = body.split(/\\r\\n|[\\n\\r]/g);\n const locationLine = lines[lineIndex]; // Special case for minified documents\n\n if (locationLine.length > 120) {\n const subLineIndex = Math.floor(columnNum / 80);\n const subLineColumnNum = columnNum % 80;\n const subLines = [];\n\n for (let i = 0; i < locationLine.length; i += 80) {\n subLines.push(locationLine.slice(i, i + 80));\n }\n\n return (\n locationStr +\n printPrefixedLines([\n [`${lineNum} |`, subLines[0]],\n ...subLines.slice(1, subLineIndex + 1).map((subLine) => ['|', subLine]),\n ['|', '^'.padStart(subLineColumnNum)],\n ['|', subLines[subLineIndex + 1]],\n ])\n );\n }\n\n return (\n locationStr +\n printPrefixedLines([\n // Lines specified like this: [\"prefix\", \"string\"],\n [`${lineNum - 1} |`, lines[lineIndex - 1]],\n [`${lineNum} |`, locationLine],\n ['|', '^'.padStart(columnNum)],\n [`${lineNum + 1} |`, lines[lineIndex + 1]],\n ])\n );\n}\n\nfunction printPrefixedLines(lines) {\n const existingLines = lines.filter(([_, line]) => line !== undefined);\n const padLen = Math.max(...existingLines.map(([prefix]) => prefix.length));\n return existingLines\n .map(([prefix, line]) => prefix.padStart(padLen) + (line ? ' ' + line : ''))\n .join('\\n');\n}\n\n;// CONCATENATED MODULE: ./node_modules/graphql/error/GraphQLError.mjs\n\n\n\n\nfunction toNormalizedOptions(args) {\n const firstArg = args[0];\n\n if (firstArg == null || 'kind' in firstArg || 'length' in firstArg) {\n return {\n nodes: firstArg,\n source: args[1],\n positions: args[2],\n path: args[3],\n originalError: args[4],\n extensions: args[5],\n };\n }\n\n return firstArg;\n}\n/**\n * A GraphQLError describes an Error found during the parse, validate, or\n * execute phases of performing a GraphQL operation. In addition to a message\n * and stack trace, it also includes information about the locations in a\n * GraphQL document and/or execution result that correspond to the Error.\n */\n\nclass GraphQLError extends Error {\n /**\n * An array of `{ line, column }` locations within the source GraphQL document\n * which correspond to this error.\n *\n * Errors during validation often contain multiple locations, for example to\n * point out two things with the same name. Errors during execution include a\n * single location, the field which produced the error.\n *\n * Enumerable, and appears in the result of JSON.stringify().\n */\n\n /**\n * An array describing the JSON-path into the execution response which\n * corresponds to this error. Only included for errors during execution.\n *\n * Enumerable, and appears in the result of JSON.stringify().\n */\n\n /**\n * An array of GraphQL AST Nodes corresponding to this error.\n */\n\n /**\n * The source GraphQL document for the first location of this error.\n *\n * Note that if this Error represents more than one node, the source may not\n * represent nodes after the first node.\n */\n\n /**\n * An array of character offsets within the source GraphQL document\n * which correspond to this error.\n */\n\n /**\n * The original error thrown from a field resolver during execution.\n */\n\n /**\n * Extension fields to add to the formatted error.\n */\n\n /**\n * @deprecated Please use the `GraphQLErrorOptions` constructor overload instead.\n */\n constructor(message, ...rawArgs) {\n var _this$nodes, _nodeLocations$, _ref;\n\n const { nodes, source, positions, path, originalError, extensions } =\n toNormalizedOptions(rawArgs);\n super(message);\n this.name = 'GraphQLError';\n this.path = path !== null && path !== void 0 ? path : undefined;\n this.originalError =\n originalError !== null && originalError !== void 0\n ? originalError\n : undefined; // Compute list of blame nodes.\n\n this.nodes = undefinedIfEmpty(\n Array.isArray(nodes) ? nodes : nodes ? [nodes] : undefined,\n );\n const nodeLocations = undefinedIfEmpty(\n (_this$nodes = this.nodes) === null || _this$nodes === void 0\n ? void 0\n : _this$nodes.map((node) => node.loc).filter((loc) => loc != null),\n ); // Compute locations in the source for the given nodes/positions.\n\n this.source =\n source !== null && source !== void 0\n ? source\n : nodeLocations === null || nodeLocations === void 0\n ? void 0\n : (_nodeLocations$ = nodeLocations[0]) === null ||\n _nodeLocations$ === void 0\n ? void 0\n : _nodeLocations$.source;\n this.positions =\n positions !== null && positions !== void 0\n ? positions\n : nodeLocations === null || nodeLocations === void 0\n ? void 0\n : nodeLocations.map((loc) => loc.start);\n this.locations =\n positions && source\n ? positions.map((pos) => getLocation(source, pos))\n : nodeLocations === null || nodeLocations === void 0\n ? void 0\n : nodeLocations.map((loc) => getLocation(loc.source, loc.start));\n const originalExtensions = isObjectLike(\n originalError === null || originalError === void 0\n ? void 0\n : originalError.extensions,\n )\n ? originalError === null || originalError === void 0\n ? void 0\n : originalError.extensions\n : undefined;\n this.extensions =\n (_ref =\n extensions !== null && extensions !== void 0\n ? extensions\n : originalExtensions) !== null && _ref !== void 0\n ? _ref\n : Object.create(null); // Only properties prescribed by the spec should be enumerable.\n // Keep the rest as non-enumerable.\n\n Object.defineProperties(this, {\n message: {\n writable: true,\n enumerable: true,\n },\n name: {\n enumerable: false,\n },\n nodes: {\n enumerable: false,\n },\n source: {\n enumerable: false,\n },\n positions: {\n enumerable: false,\n },\n originalError: {\n enumerable: false,\n },\n }); // Include (non-enumerable) stack trace.\n\n /* c8 ignore start */\n // FIXME: https://github.com/graphql/graphql-js/issues/2317\n\n if (\n originalError !== null &&\n originalError !== void 0 &&\n originalError.stack\n ) {\n Object.defineProperty(this, 'stack', {\n value: originalError.stack,\n writable: true,\n configurable: true,\n });\n } else if (Error.captureStackTrace) {\n Error.captureStackTrace(this, GraphQLError);\n } else {\n Object.defineProperty(this, 'stack', {\n value: Error().stack,\n writable: true,\n configurable: true,\n });\n }\n /* c8 ignore stop */\n }\n\n get [Symbol.toStringTag]() {\n return 'GraphQLError';\n }\n\n toString() {\n let output = this.message;\n\n if (this.nodes) {\n for (const node of this.nodes) {\n if (node.loc) {\n output += '\\n\\n' + printLocation(node.loc);\n }\n }\n } else if (this.source && this.locations) {\n for (const location of this.locations) {\n output += '\\n\\n' + printSourceLocation(this.source, location);\n }\n }\n\n return output;\n }\n\n toJSON() {\n const formattedError = {\n message: this.message,\n };\n\n if (this.locations != null) {\n formattedError.locations = this.locations;\n }\n\n if (this.path != null) {\n formattedError.path = this.path;\n }\n\n if (this.extensions != null && Object.keys(this.extensions).length > 0) {\n formattedError.extensions = this.extensions;\n }\n\n return formattedError;\n }\n}\n\nfunction undefinedIfEmpty(array) {\n return array === undefined || array.length === 0 ? undefined : array;\n}\n/**\n * See: https://spec.graphql.org/draft/#sec-Errors\n */\n\n/**\n * Prints a GraphQLError to a string, representing useful location information\n * about the error's position in the source.\n *\n * @deprecated Please use `error.toString` instead. Will be removed in v17\n */\nfunction printError(error) {\n return error.toString();\n}\n/**\n * Given a GraphQLError, format it according to the rules described by the\n * Response Format, Errors section of the GraphQL Specification.\n *\n * @deprecated Please use `error.toJSON` instead. Will be removed in v17\n */\n\nfunction formatError(error) {\n return error.toJSON();\n}\n\n;// CONCATENATED MODULE: ./node_modules/graphql/error/syntaxError.mjs\n\n/**\n * Produces a GraphQLError representing a syntax error, containing useful\n * descriptive information about the syntax error's position in the source.\n */\n\nfunction syntaxError(source, position, description) {\n return new GraphQLError(`Syntax Error: ${description}`, {\n source,\n positions: [position],\n });\n}\n\n// EXTERNAL MODULE: ./node_modules/graphql/language/ast.mjs\nvar ast = __webpack_require__(475);\n;// CONCATENATED MODULE: ./node_modules/graphql/language/directiveLocation.mjs\n/**\n * The set of allowed directive location values.\n */\nvar DirectiveLocation;\n\n(function (DirectiveLocation) {\n DirectiveLocation['QUERY'] = 'QUERY';\n DirectiveLocation['MUTATION'] = 'MUTATION';\n DirectiveLocation['SUBSCRIPTION'] = 'SUBSCRIPTION';\n DirectiveLocation['FIELD'] = 'FIELD';\n DirectiveLocation['FRAGMENT_DEFINITION'] = 'FRAGMENT_DEFINITION';\n DirectiveLocation['FRAGMENT_SPREAD'] = 'FRAGMENT_SPREAD';\n DirectiveLocation['INLINE_FRAGMENT'] = 'INLINE_FRAGMENT';\n DirectiveLocation['VARIABLE_DEFINITION'] = 'VARIABLE_DEFINITION';\n DirectiveLocation['SCHEMA'] = 'SCHEMA';\n DirectiveLocation['SCALAR'] = 'SCALAR';\n DirectiveLocation['OBJECT'] = 'OBJECT';\n DirectiveLocation['FIELD_DEFINITION'] = 'FIELD_DEFINITION';\n DirectiveLocation['ARGUMENT_DEFINITION'] = 'ARGUMENT_DEFINITION';\n DirectiveLocation['INTERFACE'] = 'INTERFACE';\n DirectiveLocation['UNION'] = 'UNION';\n DirectiveLocation['ENUM'] = 'ENUM';\n DirectiveLocation['ENUM_VALUE'] = 'ENUM_VALUE';\n DirectiveLocation['INPUT_OBJECT'] = 'INPUT_OBJECT';\n DirectiveLocation['INPUT_FIELD_DEFINITION'] = 'INPUT_FIELD_DEFINITION';\n})(DirectiveLocation || (DirectiveLocation = {}));\n\n\n/**\n * The enum type representing the directive location values.\n *\n * @deprecated Please use `DirectiveLocation`. Will be remove in v17.\n */\n\n// EXTERNAL MODULE: ./node_modules/graphql/language/kinds.mjs\nvar kinds = __webpack_require__(3298);\n// EXTERNAL MODULE: ./node_modules/graphql/language/blockString.mjs\nvar blockString = __webpack_require__(5995);\n// EXTERNAL MODULE: ./node_modules/graphql/language/characterClasses.mjs\nvar characterClasses = __webpack_require__(9646);\n;// CONCATENATED MODULE: ./node_modules/graphql/language/tokenKind.mjs\n/**\n * An exported enum describing the different kinds of tokens that the\n * lexer emits.\n */\nvar tokenKind_TokenKind;\n\n(function (TokenKind) {\n TokenKind['SOF'] = '<SOF>';\n TokenKind['EOF'] = '<EOF>';\n TokenKind['BANG'] = '!';\n TokenKind['DOLLAR'] = '$';\n TokenKind['AMP'] = '&';\n TokenKind['PAREN_L'] = '(';\n TokenKind['PAREN_R'] = ')';\n TokenKind['SPREAD'] = '...';\n TokenKind['COLON'] = ':';\n TokenKind['EQUALS'] = '=';\n TokenKind['AT'] = '@';\n TokenKind['BRACKET_L'] = '[';\n TokenKind['BRACKET_R'] = ']';\n TokenKind['BRACE_L'] = '{';\n TokenKind['PIPE'] = '|';\n TokenKind['BRACE_R'] = '}';\n TokenKind['NAME'] = 'Name';\n TokenKind['INT'] = 'Int';\n TokenKind['FLOAT'] = 'Float';\n TokenKind['STRING'] = 'String';\n TokenKind['BLOCK_STRING'] = 'BlockString';\n TokenKind['COMMENT'] = 'Comment';\n})(tokenKind_TokenKind || (tokenKind_TokenKind = {}));\n\n\n/**\n * The enum type representing the token kinds values.\n *\n * @deprecated Please use `TokenKind`. Will be remove in v17.\n */\n\n;// CONCATENATED MODULE: ./node_modules/graphql/language/lexer.mjs\n\n\n\n\n\n/**\n * Given a Source object, creates a Lexer for that source.\n * A Lexer is a stateful stream generator in that every time\n * it is advanced, it returns the next token in the Source. Assuming the\n * source lexes, the final Token emitted by the lexer will be of kind\n * EOF, after which the lexer will repeatedly return the same EOF token\n * whenever called.\n */\n\nclass Lexer {\n /**\n * The previously focused non-ignored token.\n */\n\n /**\n * The currently focused non-ignored token.\n */\n\n /**\n * The (1-indexed) line containing the current token.\n */\n\n /**\n * The character offset at which the current line begins.\n */\n constructor(source) {\n const startOfFileToken = new ast/* Token */.ou(tokenKind_TokenKind.SOF, 0, 0, 0, 0);\n this.source = source;\n this.lastToken = startOfFileToken;\n this.token = startOfFileToken;\n this.line = 1;\n this.lineStart = 0;\n }\n\n get [Symbol.toStringTag]() {\n return 'Lexer';\n }\n /**\n * Advances the token stream to the next non-ignored token.\n */\n\n advance() {\n this.lastToken = this.token;\n const token = (this.token = this.lookahead());\n return token;\n }\n /**\n * Looks ahead and returns the next non-ignored token, but does not change\n * the state of Lexer.\n */\n\n lookahead() {\n let token = this.token;\n\n if (token.kind !== tokenKind_TokenKind.EOF) {\n do {\n if (token.next) {\n token = token.next;\n } else {\n // Read the next token and form a link in the token linked-list.\n const nextToken = readNextToken(this, token.end); // @ts-expect-error next is only mutable during parsing.\n\n token.next = nextToken; // @ts-expect-error prev is only mutable during parsing.\n\n nextToken.prev = token;\n token = nextToken;\n }\n } while (token.kind === tokenKind_TokenKind.COMMENT);\n }\n\n return token;\n }\n}\n/**\n * @internal\n */\n\nfunction isPunctuatorTokenKind(kind) {\n return (\n kind === tokenKind_TokenKind.BANG ||\n kind === tokenKind_TokenKind.DOLLAR ||\n kind === tokenKind_TokenKind.AMP ||\n kind === tokenKind_TokenKind.PAREN_L ||\n kind === tokenKind_TokenKind.PAREN_R ||\n kind === tokenKind_TokenKind.SPREAD ||\n kind === tokenKind_TokenKind.COLON ||\n kind === tokenKind_TokenKind.EQUALS ||\n kind === tokenKind_TokenKind.AT ||\n kind === tokenKind_TokenKind.BRACKET_L ||\n kind === tokenKind_TokenKind.BRACKET_R ||\n kind === tokenKind_TokenKind.BRACE_L ||\n kind === tokenKind_TokenKind.PIPE ||\n kind === tokenKind_TokenKind.BRACE_R\n );\n}\n/**\n * A Unicode scalar value is any Unicode code point except surrogate code\n * points. In other words, the inclusive ranges of values 0x0000 to 0xD7FF and\n * 0xE000 to 0x10FFFF.\n *\n * SourceCharacter ::\n * - \"Any Unicode scalar value\"\n */\n\nfunction isUnicodeScalarValue(code) {\n return (\n (code >= 0x0000 && code <= 0xd7ff) || (code >= 0xe000 && code <= 0x10ffff)\n );\n}\n/**\n * The GraphQL specification defines source text as a sequence of unicode scalar\n * values (which Unicode defines to exclude surrogate code points). However\n * JavaScript defines strings as a sequence of UTF-16 code units which may\n * include surrogates. A surrogate pair is a valid source character as it\n * encodes a supplementary code point (above U+FFFF), but unpaired surrogate\n * code points are not valid source characters.\n */\n\nfunction isSupplementaryCodePoint(body, location) {\n return (\n isLeadingSurrogate(body.charCodeAt(location)) &&\n isTrailingSurrogate(body.charCodeAt(location + 1))\n );\n}\n\nfunction isLeadingSurrogate(code) {\n return code >= 0xd800 && code <= 0xdbff;\n}\n\nfunction isTrailingSurrogate(code) {\n return code >= 0xdc00 && code <= 0xdfff;\n}\n/**\n * Prints the code point (or end of file reference) at a given location in a\n * source for use in error messages.\n *\n * Printable ASCII is printed quoted, while other points are printed in Unicode\n * code point form (ie. U+1234).\n */\n\nfunction printCodePointAt(lexer, location) {\n const code = lexer.source.body.codePointAt(location);\n\n if (code === undefined) {\n return tokenKind_TokenKind.EOF;\n } else if (code >= 0x0020 && code <= 0x007e) {\n // Printable ASCII\n const char = String.fromCodePoint(code);\n return char === '\"' ? \"'\\\"'\" : `\"${char}\"`;\n } // Unicode code point\n\n return 'U+' + code.toString(16).toUpperCase().padStart(4, '0');\n}\n/**\n * Create a token with line and column location information.\n */\n\nfunction createToken(lexer, kind, start, end, value) {\n const line = lexer.line;\n const col = 1 + start - lexer.lineStart;\n return new ast/* Token */.ou(kind, start, end, line, col, value);\n}\n/**\n * Gets the next token from the source starting at the given position.\n *\n * This skips over whitespace until it finds the next lexable token, then lexes\n * punctuators immediately or calls the appropriate helper function for more\n * complicated tokens.\n */\n\nfunction readNextToken(lexer, start) {\n const body = lexer.source.body;\n const bodyLength = body.length;\n let position = start;\n\n while (position < bodyLength) {\n const code = body.charCodeAt(position); // SourceCharacter\n\n switch (code) {\n // Ignored ::\n // - UnicodeBOM\n // - WhiteSpace\n // - LineTerminator\n // - Comment\n // - Comma\n //\n // UnicodeBOM :: \"Byte Order Mark (U+FEFF)\"\n //\n // WhiteSpace ::\n // - \"Horizontal Tab (U+0009)\"\n // - \"Space (U+0020)\"\n //\n // Comma :: ,\n case 0xfeff: // <BOM>\n\n case 0x0009: // \\t\n\n case 0x0020: // <space>\n\n case 0x002c:\n // ,\n ++position;\n continue;\n // LineTerminator ::\n // - \"New Line (U+000A)\"\n // - \"Carriage Return (U+000D)\" [lookahead != \"New Line (U+000A)\"]\n // - \"Carriage Return (U+000D)\" \"New Line (U+000A)\"\n\n case 0x000a:\n // \\n\n ++position;\n ++lexer.line;\n lexer.lineStart = position;\n continue;\n\n case 0x000d:\n // \\r\n if (body.charCodeAt(position + 1) === 0x000a) {\n position += 2;\n } else {\n ++position;\n }\n\n ++lexer.line;\n lexer.lineStart = position;\n continue;\n // Comment\n\n case 0x0023:\n // #\n return readComment(lexer, position);\n // Token ::\n // - Punctuator\n // - Name\n // - IntValue\n // - FloatValue\n // - StringValue\n //\n // Punctuator :: one of ! $ & ( ) ... : = @ [ ] { | }\n\n case 0x0021:\n // !\n return createToken(lexer, tokenKind_TokenKind.BANG, position, position + 1);\n\n case 0x0024:\n // $\n return createToken(lexer, tokenKind_TokenKind.DOLLAR, position, position + 1);\n\n case 0x0026:\n // &\n return createToken(lexer, tokenKind_TokenKind.AMP, position, position + 1);\n\n case 0x0028:\n // (\n return createToken(lexer, tokenKind_TokenKind.PAREN_L, position, position + 1);\n\n case 0x0029:\n // )\n return createToken(lexer, tokenKind_TokenKind.PAREN_R, position, position + 1);\n\n case 0x002e:\n // .\n if (\n body.charCodeAt(position + 1) === 0x002e &&\n body.charCodeAt(position + 2) === 0x002e\n ) {\n return createToken(lexer, tokenKind_TokenKind.SPREAD, position, position + 3);\n }\n\n break;\n\n case 0x003a:\n // :\n return createToken(lexer, tokenKind_TokenKind.COLON, position, position + 1);\n\n case 0x003d:\n // =\n return createToken(lexer, tokenKind_TokenKind.EQUALS, position, position + 1);\n\n case 0x0040:\n // @\n return createToken(lexer, tokenKind_TokenKind.AT, position, position + 1);\n\n case 0x005b:\n // [\n return createToken(lexer, tokenKind_TokenKind.BRACKET_L, position, position + 1);\n\n case 0x005d:\n // ]\n return createToken(lexer, tokenKind_TokenKind.BRACKET_R, position, position + 1);\n\n case 0x007b:\n // {\n return createToken(lexer, tokenKind_TokenKind.BRACE_L, position, position + 1);\n\n case 0x007c:\n // |\n return createToken(lexer, tokenKind_TokenKind.PIPE, position, position + 1);\n\n case 0x007d:\n // }\n return createToken(lexer, tokenKind_TokenKind.BRACE_R, position, position + 1);\n // StringValue\n\n case 0x0022:\n // \"\n if (\n body.charCodeAt(position + 1) === 0x0022 &&\n body.charCodeAt(position + 2) === 0x0022\n ) {\n return readBlockString(lexer, position);\n }\n\n return readString(lexer, position);\n } // IntValue | FloatValue (Digit | -)\n\n if ((0,characterClasses/* isDigit */.yp)(code) || code === 0x002d) {\n return readNumber(lexer, position, code);\n } // Name\n\n if ((0,characterClasses/* isNameStart */.un)(code)) {\n return readName(lexer, position);\n }\n\n throw syntaxError(\n lexer.source,\n position,\n code === 0x0027\n ? 'Unexpected single quote character (\\'), did you mean to use a double quote (\")?'\n : isUnicodeScalarValue(code) || isSupplementaryCodePoint(body, position)\n ? `Unexpected character: ${printCodePointAt(lexer, position)}.`\n : `Invalid character: ${printCodePointAt(lexer, position)}.`,\n );\n }\n\n return createToken(lexer, tokenKind_TokenKind.EOF, bodyLength, bodyLength);\n}\n/**\n * Reads a comment token from the source file.\n *\n * ```\n * Comment :: # CommentChar* [lookahead != CommentChar]\n *\n * CommentChar :: SourceCharacter but not LineTerminator\n * ```\n */\n\nfunction readComment(lexer, start) {\n const body = lexer.source.body;\n const bodyLength = body.length;\n let position = start + 1;\n\n while (position < bodyLength) {\n const code = body.charCodeAt(position); // LineTerminator (\\n | \\r)\n\n if (code === 0x000a || code === 0x000d) {\n break;\n } // SourceCharacter\n\n if (isUnicodeScalarValue(code)) {\n ++position;\n } else if (isSupplementaryCodePoint(body, position)) {\n position += 2;\n } else {\n break;\n }\n }\n\n return createToken(\n lexer,\n tokenKind_TokenKind.COMMENT,\n start,\n position,\n body.slice(start + 1, position),\n );\n}\n/**\n * Reads a number token from the source file, either a FloatValue or an IntValue\n * depending on whether a FractionalPart or ExponentPart is encountered.\n *\n * ```\n * IntValue :: IntegerPart [lookahead != {Digit, `.`, NameStart}]\n *\n * IntegerPart ::\n * - NegativeSign? 0\n * - NegativeSign? NonZeroDigit Digit*\n *\n * NegativeSign :: -\n *\n * NonZeroDigit :: Digit but not `0`\n *\n * FloatValue ::\n * - IntegerPart FractionalPart ExponentPart [lookahead != {Digit, `.`, NameStart}]\n * - IntegerPart FractionalPart [lookahead != {Digit, `.`, NameStart}]\n * - IntegerPart ExponentPart [lookahead != {Digit, `.`, NameStart}]\n *\n * FractionalPart :: . Digit+\n *\n * ExponentPart :: ExponentIndicator Sign? Digit+\n *\n * ExponentIndicator :: one of `e` `E`\n *\n * Sign :: one of + -\n * ```\n */\n\nfunction readNumber(lexer, start, firstCode) {\n const body = lexer.source.body;\n let position = start;\n let code = firstCode;\n let isFloat = false; // NegativeSign (-)\n\n if (code === 0x002d) {\n code = body.charCodeAt(++position);\n } // Zero (0)\n\n if (code === 0x0030) {\n code = body.charCodeAt(++position);\n\n if ((0,characterClasses/* isDigit */.yp)(code)) {\n throw syntaxError(\n lexer.source,\n position,\n `Invalid number, unexpected digit after 0: ${printCodePointAt(\n lexer,\n position,\n )}.`,\n );\n }\n } else {\n position = readDigits(lexer, position, code);\n code = body.charCodeAt(position);\n } // Full stop (.)\n\n if (code === 0x002e) {\n isFloat = true;\n code = body.charCodeAt(++position);\n position = readDigits(lexer, position, code);\n code = body.charCodeAt(position);\n } // E e\n\n if (code === 0x0045 || code === 0x0065) {\n isFloat = true;\n code = body.charCodeAt(++position); // + -\n\n if (code === 0x002b || code === 0x002d) {\n code = body.charCodeAt(++position);\n }\n\n position = readDigits(lexer, position, code);\n code = body.charCodeAt(position);\n } // Numbers cannot be followed by . or NameStart\n\n if (code === 0x002e || (0,characterClasses/* isNameStart */.un)(code)) {\n throw syntaxError(\n lexer.source,\n position,\n `Invalid number, expected digit but got: ${printCodePointAt(\n lexer,\n position,\n )}.`,\n );\n }\n\n return createToken(\n lexer,\n isFloat ? tokenKind_TokenKind.FLOAT : tokenKind_TokenKind.INT,\n start,\n position,\n body.slice(start, position),\n );\n}\n/**\n * Returns the new position in the source after reading one or more digits.\n */\n\nfunction readDigits(lexer, start, firstCode) {\n if (!(0,characterClasses/* isDigit */.yp)(firstCode)) {\n throw syntaxError(\n lexer.source,\n start,\n `Invalid number, expected digit but got: ${printCodePointAt(\n lexer,\n start,\n )}.`,\n );\n }\n\n const body = lexer.source.body;\n let position = start + 1; // +1 to skip first firstCode\n\n while ((0,characterClasses/* isDigit */.yp)(body.charCodeAt(position))) {\n ++position;\n }\n\n return position;\n}\n/**\n * Reads a single-quote string token from the source file.\n *\n * ```\n * StringValue ::\n * - `\"\"` [lookahead != `\"`]\n * - `\"` StringCharacter+ `\"`\n *\n * StringCharacter ::\n * - SourceCharacter but not `\"` or `\\` or LineTerminator\n * - `\\u` EscapedUnicode\n * - `\\` EscapedCharacter\n *\n * EscapedUnicode ::\n * - `{` HexDigit+ `}`\n * - HexDigit HexDigit HexDigit HexDigit\n *\n * EscapedCharacter :: one of `\"` `\\` `/` `b` `f` `n` `r` `t`\n * ```\n */\n\nfunction readString(lexer, start) {\n const body = lexer.source.body;\n const bodyLength = body.length;\n let position = start + 1;\n let chunkStart = position;\n let value = '';\n\n while (position < bodyLength) {\n const code = body.charCodeAt(position); // Closing Quote (\")\n\n if (code === 0x0022) {\n value += body.slice(chunkStart, position);\n return createToken(lexer, tokenKind_TokenKind.STRING, start, position + 1, value);\n } // Escape Sequence (\\)\n\n if (code === 0x005c) {\n value += body.slice(chunkStart, position);\n const escape =\n body.charCodeAt(position + 1) === 0x0075 // u\n ? body.charCodeAt(position + 2) === 0x007b // {\n ? readEscapedUnicodeVariableWidth(lexer, position)\n : readEscapedUnicodeFixedWidth(lexer, position)\n : readEscapedCharacter(lexer, position);\n value += escape.value;\n position += escape.size;\n chunkStart = position;\n continue;\n } // LineTerminator (\\n | \\r)\n\n if (code === 0x000a || code === 0x000d) {\n break;\n } // SourceCharacter\n\n if (isUnicodeScalarValue(code)) {\n ++position;\n } else if (isSupplementaryCodePoint(body, position)) {\n position += 2;\n } else {\n throw syntaxError(\n lexer.source,\n position,\n `Invalid character within String: ${printCodePointAt(\n lexer,\n position,\n )}.`,\n );\n }\n }\n\n throw syntaxError(lexer.source, position, 'Unterminated string.');\n} // The string value and lexed size of an escape sequence.\n\nfunction readEscapedUnicodeVariableWidth(lexer, position) {\n const body = lexer.source.body;\n let point = 0;\n let size = 3; // Cannot be larger than 12 chars (\\u{00000000}).\n\n while (size < 12) {\n const code = body.charCodeAt(position + size++); // Closing Brace (})\n\n if (code === 0x007d) {\n // Must be at least 5 chars (\\u{0}) and encode a Unicode scalar value.\n if (size < 5 || !isUnicodeScalarValue(point)) {\n break;\n }\n\n return {\n value: String.fromCodePoint(point),\n size,\n };\n } // Append this hex digit to the code point.\n\n point = (point << 4) | readHexDigit(code);\n\n if (point < 0) {\n break;\n }\n }\n\n throw syntaxError(\n lexer.source,\n position,\n `Invalid Unicode escape sequence: \"${body.slice(\n position,\n position + size,\n )}\".`,\n );\n}\n\nfunction readEscapedUnicodeFixedWidth(lexer, position) {\n const body = lexer.source.body;\n const code = read16BitHexCode(body, position + 2);\n\n if (isUnicodeScalarValue(code)) {\n return {\n value: String.fromCodePoint(code),\n size: 6,\n };\n } // GraphQL allows JSON-style surrogate pair escape sequences, but only when\n // a valid pair is formed.\n\n if (isLeadingSurrogate(code)) {\n // \\u\n if (\n body.charCodeAt(position + 6) === 0x005c &&\n body.charCodeAt(position + 7) === 0x0075\n ) {\n const trailingCode = read16BitHexCode(body, position + 8);\n\n if (isTrailingSurrogate(trailingCode)) {\n // JavaScript defines strings as a sequence of UTF-16 code units and\n // encodes Unicode code points above U+FFFF using a surrogate pair of\n // code units. Since this is a surrogate pair escape sequence, just\n // include both codes into the JavaScript string value. Had JavaScript\n // not been internally based on UTF-16, then this surrogate pair would\n // be decoded to retrieve the supplementary code point.\n return {\n value: String.fromCodePoint(code, trailingCode),\n size: 12,\n };\n }\n }\n }\n\n throw syntaxError(\n lexer.source,\n position,\n `Invalid Unicode escape sequence: \"${body.slice(position, position + 6)}\".`,\n );\n}\n/**\n * Reads four hexadecimal characters and returns the positive integer that 16bit\n * hexadecimal string represents. For example, \"000f\" will return 15, and \"dead\"\n * will return 57005.\n *\n * Returns a negative number if any char was not a valid hexadecimal digit.\n */\n\nfunction read16BitHexCode(body, position) {\n // readHexDigit() returns -1 on error. ORing a negative value with any other\n // value always produces a negative value.\n return (\n (readHexDigit(body.charCodeAt(position)) << 12) |\n (readHexDigit(body.charCodeAt(position + 1)) << 8) |\n (readHexDigit(body.charCodeAt(position + 2)) << 4) |\n readHexDigit(body.charCodeAt(position + 3))\n );\n}\n/**\n * Reads a hexadecimal character and returns its positive integer value (0-15).\n *\n * '0' becomes 0, '9' becomes 9\n * 'A' becomes 10, 'F' becomes 15\n * 'a' becomes 10, 'f' becomes 15\n *\n * Returns -1 if the provided character code was not a valid hexadecimal digit.\n *\n * HexDigit :: one of\n * - `0` `1` `2` `3` `4` `5` `6` `7` `8` `9`\n * - `A` `B` `C` `D` `E` `F`\n * - `a` `b` `c` `d` `e` `f`\n */\n\nfunction readHexDigit(code) {\n return code >= 0x0030 && code <= 0x0039 // 0-9\n ? code - 0x0030\n : code >= 0x0041 && code <= 0x0046 // A-F\n ? code - 0x0037\n : code >= 0x0061 && code <= 0x0066 // a-f\n ? code - 0x0057\n : -1;\n}\n/**\n * | Escaped Character | Code Point | Character Name |\n * | ----------------- | ---------- | ---------------------------- |\n * | `\"` | U+0022 | double quote |\n * | `\\` | U+005C | reverse solidus (back slash) |\n * | `/` | U+002F | solidus (forward slash) |\n * | `b` | U+0008 | backspace |\n * | `f` | U+000C | form feed |\n * | `n` | U+000A | line feed (new line) |\n * | `r` | U+000D | carriage return |\n * | `t` | U+0009 | horizontal tab |\n */\n\nfunction readEscapedCharacter(lexer, position) {\n const body = lexer.source.body;\n const code = body.charCodeAt(position + 1);\n\n switch (code) {\n case 0x0022:\n // \"\n return {\n value: '\\u0022',\n size: 2,\n };\n\n case 0x005c:\n // \\\n return {\n value: '\\u005c',\n size: 2,\n };\n\n case 0x002f:\n // /\n return {\n value: '\\u002f',\n size: 2,\n };\n\n case 0x0062:\n // b\n return {\n value: '\\u0008',\n size: 2,\n };\n\n case 0x0066:\n // f\n return {\n value: '\\u000c',\n size: 2,\n };\n\n case 0x006e:\n // n\n return {\n value: '\\u000a',\n size: 2,\n };\n\n case 0x0072:\n // r\n return {\n value: '\\u000d',\n size: 2,\n };\n\n case 0x0074:\n // t\n return {\n value: '\\u0009',\n size: 2,\n };\n }\n\n throw syntaxError(\n lexer.source,\n position,\n `Invalid character escape sequence: \"${body.slice(\n position,\n position + 2,\n )}\".`,\n );\n}\n/**\n * Reads a block string token from the source file.\n *\n * ```\n * StringValue ::\n * - `\"\"\"` BlockStringCharacter* `\"\"\"`\n *\n * BlockStringCharacter ::\n * - SourceCharacter but not `\"\"\"` or `\\\"\"\"`\n * - `\\\"\"\"`\n * ```\n */\n\nfunction readBlockString(lexer, start) {\n const body = lexer.source.body;\n const bodyLength = body.length;\n let lineStart = lexer.lineStart;\n let position = start + 3;\n let chunkStart = position;\n let currentLine = '';\n const blockLines = [];\n\n while (position < bodyLength) {\n const code = body.charCodeAt(position); // Closing Triple-Quote (\"\"\")\n\n if (\n code === 0x0022 &&\n body.charCodeAt(position + 1) === 0x0022 &&\n body.charCodeAt(position + 2) === 0x0022\n ) {\n currentLine += body.slice(chunkStart, position);\n blockLines.push(currentLine);\n const token = createToken(\n lexer,\n tokenKind_TokenKind.BLOCK_STRING,\n start,\n position + 3, // Return a string of the lines joined with U+000A.\n (0,blockString/* dedentBlockStringLines */.OC)(blockLines).join('\\n'),\n );\n lexer.line += blockLines.length - 1;\n lexer.lineStart = lineStart;\n return token;\n } // Escaped Triple-Quote (\\\"\"\")\n\n if (\n code === 0x005c &&\n body.charCodeAt(position + 1) === 0x0022 &&\n body.charCodeAt(position + 2) === 0x0022 &&\n body.charCodeAt(position + 3) === 0x0022\n ) {\n currentLine += body.slice(chunkStart, position);\n chunkStart = position + 1; // skip only slash\n\n position += 4;\n continue;\n } // LineTerminator\n\n if (code === 0x000a || code === 0x000d) {\n currentLine += body.slice(chunkStart, position);\n blockLines.push(currentLine);\n\n if (code === 0x000d && body.charCodeAt(position + 1) === 0x000a) {\n position += 2;\n } else {\n ++position;\n }\n\n currentLine = '';\n chunkStart = position;\n lineStart = position;\n continue;\n } // SourceCharacter\n\n if (isUnicodeScalarValue(code)) {\n ++position;\n } else if (isSupplementaryCodePoint(body, position)) {\n position += 2;\n } else {\n throw syntaxError(\n lexer.source,\n position,\n `Invalid character within String: ${printCodePointAt(\n lexer,\n position,\n )}.`,\n );\n }\n }\n\n throw syntaxError(lexer.source, position, 'Unterminated string.');\n}\n/**\n * Reads an alphanumeric + underscore name from the source.\n *\n * ```\n * Name ::\n * - NameStart NameContinue* [lookahead != NameContinue]\n * ```\n */\n\nfunction readName(lexer, start) {\n const body = lexer.source.body;\n const bodyLength = body.length;\n let position = start + 1;\n\n while (position < bodyLength) {\n const code = body.charCodeAt(position);\n\n if ((0,characterClasses/* isNameContinue */.xr)(code)) {\n ++position;\n } else {\n break;\n }\n }\n\n return createToken(\n lexer,\n tokenKind_TokenKind.NAME,\n start,\n position,\n body.slice(start, position),\n );\n}\n\n// EXTERNAL MODULE: ./node_modules/graphql/jsutils/devAssert.mjs\nvar devAssert = __webpack_require__(6286);\n// EXTERNAL MODULE: ./node_modules/graphql/jsutils/inspect.mjs\nvar inspect = __webpack_require__(129);\n;// CONCATENATED MODULE: ./node_modules/graphql/jsutils/instanceOf.mjs\n\n/* c8 ignore next 3 */\n\nconst isProduction =\n globalThis.process && // eslint-disable-next-line no-undef\n \"test\" === 'production';\n/**\n * A replacement for instanceof which includes an error warning when multi-realm\n * constructors are detected.\n * See: https://expressjs.com/en/advanced/best-practice-performance.html#set-node_env-to-production\n * See: https://webpack.js.org/guides/production/\n */\n\nconst instanceOf =\n /* c8 ignore next 6 */\n // FIXME: https://github.com/graphql/graphql-js/issues/2317\n isProduction\n ? function instanceOf(value, constructor) {\n return value instanceof constructor;\n }\n : function instanceOf(value, constructor) {\n if (value instanceof constructor) {\n return true;\n }\n\n if (typeof value === 'object' && value !== null) {\n var _value$constructor;\n\n // Prefer Symbol.toStringTag since it is immune to minification.\n const className = constructor.prototype[Symbol.toStringTag];\n const valueClassName = // We still need to support constructor's name to detect conflicts with older versions of this library.\n Symbol.toStringTag in value // @ts-expect-error TS bug see, https://github.com/microsoft/TypeScript/issues/38009\n ? value[Symbol.toStringTag]\n : (_value$constructor = value.constructor) === null ||\n _value$constructor === void 0\n ? void 0\n : _value$constructor.name;\n\n if (className === valueClassName) {\n const stringifiedValue = (0,inspect/* inspect */.N)(value);\n throw new Error(`Cannot use ${className} \"${stringifiedValue}\" from another module or realm.\n\nEnsure that there is only one instance of \"graphql\" in the node_modules\ndirectory. If different versions of \"graphql\" are the dependencies of other\nrelied on modules, use \"resolutions\" to ensure only one version is installed.\n\nhttps://yarnpkg.com/en/docs/selective-version-resolutions\n\nDuplicate \"graphql\" modules cannot be used at the same time since different\nversions may have different capabilities and behavior. The data from one\nversion used in the function from another could produce confusing and\nspurious results.`);\n }\n }\n\n return false;\n };\n\n;// CONCATENATED MODULE: ./node_modules/graphql/language/source.mjs\n\n\n\n\n/**\n * A representation of source input to GraphQL. The `name` and `locationOffset` parameters are\n * optional, but they are useful for clients who store GraphQL documents in source files.\n * For example, if the GraphQL input starts at line 40 in a file named `Foo.graphql`, it might\n * be useful for `name` to be `\"Foo.graphql\"` and location to be `{ line: 40, column: 1 }`.\n * The `line` and `column` properties in `locationOffset` are 1-indexed.\n */\nclass Source {\n constructor(\n body,\n name = 'GraphQL request',\n locationOffset = {\n line: 1,\n column: 1,\n },\n ) {\n typeof body === 'string' ||\n (0,devAssert/* devAssert */.U)(false, `Body must be a string. Received: ${(0,inspect/* inspect */.N)(body)}.`);\n this.body = body;\n this.name = name;\n this.locationOffset = locationOffset;\n this.locationOffset.line > 0 ||\n (0,devAssert/* devAssert */.U)(\n false,\n 'line in locationOffset is 1-indexed and must be positive.',\n );\n this.locationOffset.column > 0 ||\n (0,devAssert/* devAssert */.U)(\n false,\n 'column in locationOffset is 1-indexed and must be positive.',\n );\n }\n\n get [Symbol.toStringTag]() {\n return 'Source';\n }\n}\n/**\n * Test if the given value is a Source object.\n *\n * @internal\n */\n\nfunction isSource(source) {\n return instanceOf(source, Source);\n}\n\n;// CONCATENATED MODULE: ./node_modules/graphql/language/parser.mjs\n\n\n\n\n\n\n\n/**\n * Configuration options to control parser behavior\n */\n\n/**\n * Given a GraphQL source, parses it into a Document.\n * Throws GraphQLError if a syntax error is encountered.\n */\nfunction parse(source, options) {\n const parser = new Parser(source, options);\n return parser.parseDocument();\n}\n/**\n * Given a string containing a GraphQL value (ex. `[42]`), parse the AST for\n * that value.\n * Throws GraphQLError if a syntax error is encountered.\n *\n * This is useful within tools that operate upon GraphQL Values directly and\n * in isolation of complete GraphQL documents.\n *\n * Consider providing the results to the utility function: valueFromAST().\n */\n\nfunction parseValue(source, options) {\n const parser = new Parser(source, options);\n parser.expectToken(TokenKind.SOF);\n const value = parser.parseValueLiteral(false);\n parser.expectToken(TokenKind.EOF);\n return value;\n}\n/**\n * Similar to parseValue(), but raises a parse error if it encounters a\n * variable. The return type will be a constant value.\n */\n\nfunction parseConstValue(source, options) {\n const parser = new Parser(source, options);\n parser.expectToken(TokenKind.SOF);\n const value = parser.parseConstValueLiteral();\n parser.expectToken(TokenKind.EOF);\n return value;\n}\n/**\n * Given a string containing a GraphQL Type (ex. `[Int!]`), parse the AST for\n * that type.\n * Throws GraphQLError if a syntax error is encountered.\n *\n * This is useful within tools that operate upon GraphQL Types directly and\n * in isolation of complete GraphQL documents.\n *\n * Consider providing the results to the utility function: typeFromAST().\n */\n\nfunction parseType(source, options) {\n const parser = new Parser(source, options);\n parser.expectToken(TokenKind.SOF);\n const type = parser.parseTypeReference();\n parser.expectToken(TokenKind.EOF);\n return type;\n}\n/**\n * This class is exported only to assist people in implementing their own parsers\n * without duplicating too much code and should be used only as last resort for cases\n * such as experimental syntax or if certain features could not be contributed upstream.\n *\n * It is still part of the internal API and is versioned, so any changes to it are never\n * considered breaking changes. If you still need to support multiple versions of the\n * library, please use the `versionInfo` variable for version detection.\n *\n * @internal\n */\n\nclass Parser {\n constructor(source, options = {}) {\n const sourceObj = isSource(source) ? source : new Source(source);\n this._lexer = new Lexer(sourceObj);\n this._options = options;\n this._tokenCounter = 0;\n }\n /**\n * Converts a name lex token into a name parse node.\n */\n\n parseName() {\n const token = this.expectToken(tokenKind_TokenKind.NAME);\n return this.node(token, {\n kind: kinds/* Kind */.b.NAME,\n value: token.value,\n });\n } // Implements the parsing rules in the Document section.\n\n /**\n * Document : Definition+\n */\n\n parseDocument() {\n return this.node(this._lexer.token, {\n kind: kinds/* Kind */.b.DOCUMENT,\n definitions: this.many(\n tokenKind_TokenKind.SOF,\n this.parseDefinition,\n tokenKind_TokenKind.EOF,\n ),\n });\n }\n /**\n * Definition :\n * - ExecutableDefinition\n * - TypeSystemDefinition\n * - TypeSystemExtension\n *\n * ExecutableDefinition :\n * - OperationDefinition\n * - FragmentDefinition\n *\n * TypeSystemDefinition :\n * - SchemaDefinition\n * - TypeDefinition\n * - DirectiveDefinition\n *\n * TypeDefinition :\n * - ScalarTypeDefinition\n * - ObjectTypeDefinition\n * - InterfaceTypeDefinition\n * - UnionTypeDefinition\n * - EnumTypeDefinition\n * - InputObjectTypeDefinition\n */\n\n parseDefinition() {\n if (this.peek(tokenKind_TokenKind.BRACE_L)) {\n return this.parseOperationDefinition();\n } // Many definitions begin with a description and require a lookahead.\n\n const hasDescription = this.peekDescription();\n const keywordToken = hasDescription\n ? this._lexer.lookahead()\n : this._lexer.token;\n\n if (keywordToken.kind === tokenKind_TokenKind.NAME) {\n switch (keywordToken.value) {\n case 'schema':\n return this.parseSchemaDefinition();\n\n case 'scalar':\n return this.parseScalarTypeDefinition();\n\n case 'type':\n return this.parseObjectTypeDefinition();\n\n case 'interface':\n return this.parseInterfaceTypeDefinition();\n\n case 'union':\n return this.parseUnionTypeDefinition();\n\n case 'enum':\n return this.parseEnumTypeDefinition();\n\n case 'input':\n return this.parseInputObjectTypeDefinition();\n\n case 'directive':\n return this.parseDirectiveDefinition();\n }\n\n if (hasDescription) {\n throw syntaxError(\n this._lexer.source,\n this._lexer.token.start,\n 'Unexpected description, descriptions are supported only on type definitions.',\n );\n }\n\n switch (keywordToken.value) {\n case 'query':\n case 'mutation':\n case 'subscription':\n return this.parseOperationDefinition();\n\n case 'fragment':\n return this.parseFragmentDefinition();\n\n case 'extend':\n return this.parseTypeSystemExtension();\n }\n }\n\n throw this.unexpected(keywordToken);\n } // Implements the parsing rules in the Operations section.\n\n /**\n * OperationDefinition :\n * - SelectionSet\n * - OperationType Name? VariableDefinitions? Directives? SelectionSet\n */\n\n parseOperationDefinition() {\n const start = this._lexer.token;\n\n if (this.peek(tokenKind_TokenKind.BRACE_L)) {\n return this.node(start, {\n kind: kinds/* Kind */.b.OPERATION_DEFINITION,\n operation: ast/* OperationTypeNode */.cE.QUERY,\n name: undefined,\n variableDefinitions: [],\n directives: [],\n selectionSet: this.parseSelectionSet(),\n });\n }\n\n const operation = this.parseOperationType();\n let name;\n\n if (this.peek(tokenKind_TokenKind.NAME)) {\n name = this.parseName();\n }\n\n return this.node(start, {\n kind: kinds/* Kind */.b.OPERATION_DEFINITION,\n operation,\n name,\n variableDefinitions: this.parseVariableDefinitions(),\n directives: this.parseDirectives(false),\n selectionSet: this.parseSelectionSet(),\n });\n }\n /**\n * OperationType : one of query mutation subscription\n */\n\n parseOperationType() {\n const operationToken = this.expectToken(tokenKind_TokenKind.NAME);\n\n switch (operationToken.value) {\n case 'query':\n return ast/* OperationTypeNode */.cE.QUERY;\n\n case 'mutation':\n return ast/* OperationTypeNode */.cE.MUTATION;\n\n case 'subscription':\n return ast/* OperationTypeNode */.cE.SUBSCRIPTION;\n }\n\n throw this.unexpected(operationToken);\n }\n /**\n * VariableDefinitions : ( VariableDefinition+ )\n */\n\n parseVariableDefinitions() {\n return this.optionalMany(\n tokenKind_TokenKind.PAREN_L,\n this.parseVariableDefinition,\n tokenKind_TokenKind.PAREN_R,\n );\n }\n /**\n * VariableDefinition : Variable : Type DefaultValue? Directives[Const]?\n */\n\n parseVariableDefinition() {\n return this.node(this._lexer.token, {\n kind: kinds/* Kind */.b.VARIABLE_DEFINITION,\n variable: this.parseVariable(),\n type: (this.expectToken(tokenKind_TokenKind.COLON), this.parseTypeReference()),\n defaultValue: this.expectOptionalToken(tokenKind_TokenKind.EQUALS)\n ? this.parseConstValueLiteral()\n : undefined,\n directives: this.parseConstDirectives(),\n });\n }\n /**\n * Variable : $ Name\n */\n\n parseVariable() {\n const start = this._lexer.token;\n this.expectToken(tokenKind_TokenKind.DOLLAR);\n return this.node(start, {\n kind: kinds/* Kind */.b.VARIABLE,\n name: this.parseName(),\n });\n }\n /**\n * ```\n * SelectionSet : { Selection+ }\n * ```\n */\n\n parseSelectionSet() {\n return this.node(this._lexer.token, {\n kind: kinds/* Kind */.b.SELECTION_SET,\n selections: this.many(\n tokenKind_TokenKind.BRACE_L,\n this.parseSelection,\n tokenKind_TokenKind.BRACE_R,\n ),\n });\n }\n /**\n * Selection :\n * - Field\n * - FragmentSpread\n * - InlineFragment\n */\n\n parseSelection() {\n return this.peek(tokenKind_TokenKind.SPREAD)\n ? this.parseFragment()\n : this.parseField();\n }\n /**\n * Field : Alias? Name Arguments? Directives? SelectionSet?\n *\n * Alias : Name :\n */\n\n parseField() {\n const start = this._lexer.token;\n const nameOrAlias = this.parseName();\n let alias;\n let name;\n\n if (this.expectOptionalToken(tokenKind_TokenKind.COLON)) {\n alias = nameOrAlias;\n name = this.parseName();\n } else {\n name = nameOrAlias;\n }\n\n return this.node(start, {\n kind: kinds/* Kind */.b.FIELD,\n alias,\n name,\n arguments: this.parseArguments(false),\n directives: this.parseDirectives(false),\n selectionSet: this.peek(tokenKind_TokenKind.BRACE_L)\n ? this.parseSelectionSet()\n : undefined,\n });\n }\n /**\n * Arguments[Const] : ( Argument[?Const]+ )\n */\n\n parseArguments(isConst) {\n const item = isConst ? this.parseConstArgument : this.parseArgument;\n return this.optionalMany(tokenKind_TokenKind.PAREN_L, item, tokenKind_TokenKind.PAREN_R);\n }\n /**\n * Argument[Const] : Name : Value[?Const]\n */\n\n parseArgument(isConst = false) {\n const start = this._lexer.token;\n const name = this.parseName();\n this.expectToken(tokenKind_TokenKind.COLON);\n return this.node(start, {\n kind: kinds/* Kind */.b.ARGUMENT,\n name,\n value: this.parseValueLiteral(isConst),\n });\n }\n\n parseConstArgument() {\n return this.parseArgument(true);\n } // Implements the parsing rules in the Fragments section.\n\n /**\n * Corresponds to both FragmentSpread and InlineFragment in the spec.\n *\n * FragmentSpread : ... FragmentName Directives?\n *\n * InlineFragment : ... TypeCondition? Directives? SelectionSet\n */\n\n parseFragment() {\n const start = this._lexer.token;\n this.expectToken(tokenKind_TokenKind.SPREAD);\n const hasTypeCondition = this.expectOptionalKeyword('on');\n\n if (!hasTypeCondition && this.peek(tokenKind_TokenKind.NAME)) {\n return this.node(start, {\n kind: kinds/* Kind */.b.FRAGMENT_SPREAD,\n name: this.parseFragmentName(),\n directives: this.parseDirectives(false),\n });\n }\n\n return this.node(start, {\n kind: kinds/* Kind */.b.INLINE_FRAGMENT,\n typeCondition: hasTypeCondition ? this.parseNamedType() : undefined,\n directives: this.parseDirectives(false),\n selectionSet: this.parseSelectionSet(),\n });\n }\n /**\n * FragmentDefinition :\n * - fragment FragmentName on TypeCondition Directives? SelectionSet\n *\n * TypeCondition : NamedType\n */\n\n parseFragmentDefinition() {\n const start = this._lexer.token;\n this.expectKeyword('fragment'); // Legacy support for defining variables within fragments changes\n // the grammar of FragmentDefinition:\n // - fragment FragmentName VariableDefinitions? on TypeCondition Directives? SelectionSet\n\n if (this._options.allowLegacyFragmentVariables === true) {\n return this.node(start, {\n kind: kinds/* Kind */.b.FRAGMENT_DEFINITION,\n name: this.parseFragmentName(),\n variableDefinitions: this.parseVariableDefinitions(),\n typeCondition: (this.expectKeyword('on'), this.parseNamedType()),\n directives: this.parseDirectives(false),\n selectionSet: this.parseSelectionSet(),\n });\n }\n\n return this.node(start, {\n kind: kinds/* Kind */.b.FRAGMENT_DEFINITION,\n name: this.parseFragmentName(),\n typeCondition: (this.expectKeyword('on'), this.parseNamedType()),\n directives: this.parseDirectives(false),\n selectionSet: this.parseSelectionSet(),\n });\n }\n /**\n * FragmentName : Name but not `on`\n */\n\n parseFragmentName() {\n if (this._lexer.token.value === 'on') {\n throw this.unexpected();\n }\n\n return this.parseName();\n } // Implements the parsing rules in the Values section.\n\n /**\n * Value[Const] :\n * - [~Const] Variable\n * - IntValue\n * - FloatValue\n * - StringValue\n * - BooleanValue\n * - NullValue\n * - EnumValue\n * - ListValue[?Const]\n * - ObjectValue[?Const]\n *\n * BooleanValue : one of `true` `false`\n *\n * NullValue : `null`\n *\n * EnumValue : Name but not `true`, `false` or `null`\n */\n\n parseValueLiteral(isConst) {\n const token = this._lexer.token;\n\n switch (token.kind) {\n case tokenKind_TokenKind.BRACKET_L:\n return this.parseList(isConst);\n\n case tokenKind_TokenKind.BRACE_L:\n return this.parseObject(isConst);\n\n case tokenKind_TokenKind.INT:\n this.advanceLexer();\n return this.node(token, {\n kind: kinds/* Kind */.b.INT,\n value: token.value,\n });\n\n case tokenKind_TokenKind.FLOAT:\n this.advanceLexer();\n return this.node(token, {\n kind: kinds/* Kind */.b.FLOAT,\n value: token.value,\n });\n\n case tokenKind_TokenKind.STRING:\n case tokenKind_TokenKind.BLOCK_STRING:\n return this.parseStringLiteral();\n\n case tokenKind_TokenKind.NAME:\n this.advanceLexer();\n\n switch (token.value) {\n case 'true':\n return this.node(token, {\n kind: kinds/* Kind */.b.BOOLEAN,\n value: true,\n });\n\n case 'false':\n return this.node(token, {\n kind: kinds/* Kind */.b.BOOLEAN,\n value: false,\n });\n\n case 'null':\n return this.node(token, {\n kind: kinds/* Kind */.b.NULL,\n });\n\n default:\n return this.node(token, {\n kind: kinds/* Kind */.b.ENUM,\n value: token.value,\n });\n }\n\n case tokenKind_TokenKind.DOLLAR:\n if (isConst) {\n this.expectToken(tokenKind_TokenKind.DOLLAR);\n\n if (this._lexer.token.kind === tokenKind_TokenKind.NAME) {\n const varName = this._lexer.token.value;\n throw syntaxError(\n this._lexer.source,\n token.start,\n `Unexpected variable \"$${varName}\" in constant value.`,\n );\n } else {\n throw this.unexpected(token);\n }\n }\n\n return this.parseVariable();\n\n default:\n throw this.unexpected();\n }\n }\n\n parseConstValueLiteral() {\n return this.parseValueLiteral(true);\n }\n\n parseStringLiteral() {\n const token = this._lexer.token;\n this.advanceLexer();\n return this.node(token, {\n kind: kinds/* Kind */.b.STRING,\n value: token.value,\n block: token.kind === tokenKind_TokenKind.BLOCK_STRING,\n });\n }\n /**\n * ListValue[Const] :\n * - [ ]\n * - [ Value[?Const]+ ]\n */\n\n parseList(isConst) {\n const item = () => this.parseValueLiteral(isConst);\n\n return this.node(this._lexer.token, {\n kind: kinds/* Kind */.b.LIST,\n values: this.any(tokenKind_TokenKind.BRACKET_L, item, tokenKind_TokenKind.BRACKET_R),\n });\n }\n /**\n * ```\n * ObjectValue[Const] :\n * - { }\n * - { ObjectField[?Const]+ }\n * ```\n */\n\n parseObject(isConst) {\n const item = () => this.parseObjectField(isConst);\n\n return this.node(this._lexer.token, {\n kind: kinds/* Kind */.b.OBJECT,\n fields: this.any(tokenKind_TokenKind.BRACE_L, item, tokenKind_TokenKind.BRACE_R),\n });\n }\n /**\n * ObjectField[Const] : Name : Value[?Const]\n */\n\n parseObjectField(isConst) {\n const start = this._lexer.token;\n const name = this.parseName();\n this.expectToken(tokenKind_TokenKind.COLON);\n return this.node(start, {\n kind: kinds/* Kind */.b.OBJECT_FIELD,\n name,\n value: this.parseValueLiteral(isConst),\n });\n } // Implements the parsing rules in the Directives section.\n\n /**\n * Directives[Const] : Directive[?Const]+\n */\n\n parseDirectives(isConst) {\n const directives = [];\n\n while (this.peek(tokenKind_TokenKind.AT)) {\n directives.push(this.parseDirective(isConst));\n }\n\n return directives;\n }\n\n parseConstDirectives() {\n return this.parseDirectives(true);\n }\n /**\n * ```\n * Directive[Const] : @ Name Arguments[?Const]?\n * ```\n */\n\n parseDirective(isConst) {\n const start = this._lexer.token;\n this.expectToken(tokenKind_TokenKind.AT);\n return this.node(start, {\n kind: kinds/* Kind */.b.DIRECTIVE,\n name: this.parseName(),\n arguments: this.parseArguments(isConst),\n });\n } // Implements the parsing rules in the Types section.\n\n /**\n * Type :\n * - NamedType\n * - ListType\n * - NonNullType\n */\n\n parseTypeReference() {\n const start = this._lexer.token;\n let type;\n\n if (this.expectOptionalToken(tokenKind_TokenKind.BRACKET_L)) {\n const innerType = this.parseTypeReference();\n this.expectToken(tokenKind_TokenKind.BRACKET_R);\n type = this.node(start, {\n kind: kinds/* Kind */.b.LIST_TYPE,\n type: innerType,\n });\n } else {\n type = this.parseNamedType();\n }\n\n if (this.expectOptionalToken(tokenKind_TokenKind.BANG)) {\n return this.node(start, {\n kind: kinds/* Kind */.b.NON_NULL_TYPE,\n type,\n });\n }\n\n return type;\n }\n /**\n * NamedType : Name\n */\n\n parseNamedType() {\n return this.node(this._lexer.token, {\n kind: kinds/* Kind */.b.NAMED_TYPE,\n name: this.parseName(),\n });\n } // Implements the parsing rules in the Type Definition section.\n\n peekDescription() {\n return this.peek(tokenKind_TokenKind.STRING) || this.peek(tokenKind_TokenKind.BLOCK_STRING);\n }\n /**\n * Description : StringValue\n */\n\n parseDescription() {\n if (this.peekDescription()) {\n return this.parseStringLiteral();\n }\n }\n /**\n * ```\n * SchemaDefinition : Description? schema Directives[Const]? { OperationTypeDefinition+ }\n * ```\n */\n\n parseSchemaDefinition() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n this.expectKeyword('schema');\n const directives = this.parseConstDirectives();\n const operationTypes = this.many(\n tokenKind_TokenKind.BRACE_L,\n this.parseOperationTypeDefinition,\n tokenKind_TokenKind.BRACE_R,\n );\n return this.node(start, {\n kind: kinds/* Kind */.b.SCHEMA_DEFINITION,\n description,\n directives,\n operationTypes,\n });\n }\n /**\n * OperationTypeDefinition : OperationType : NamedType\n */\n\n parseOperationTypeDefinition() {\n const start = this._lexer.token;\n const operation = this.parseOperationType();\n this.expectToken(tokenKind_TokenKind.COLON);\n const type = this.parseNamedType();\n return this.node(start, {\n kind: kinds/* Kind */.b.OPERATION_TYPE_DEFINITION,\n operation,\n type,\n });\n }\n /**\n * ScalarTypeDefinition : Description? scalar Name Directives[Const]?\n */\n\n parseScalarTypeDefinition() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n this.expectKeyword('scalar');\n const name = this.parseName();\n const directives = this.parseConstDirectives();\n return this.node(start, {\n kind: kinds/* Kind */.b.SCALAR_TYPE_DEFINITION,\n description,\n name,\n directives,\n });\n }\n /**\n * ObjectTypeDefinition :\n * Description?\n * type Name ImplementsInterfaces? Directives[Const]? FieldsDefinition?\n */\n\n parseObjectTypeDefinition() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n this.expectKeyword('type');\n const name = this.parseName();\n const interfaces = this.parseImplementsInterfaces();\n const directives = this.parseConstDirectives();\n const fields = this.parseFieldsDefinition();\n return this.node(start, {\n kind: kinds/* Kind */.b.OBJECT_TYPE_DEFINITION,\n description,\n name,\n interfaces,\n directives,\n fields,\n });\n }\n /**\n * ImplementsInterfaces :\n * - implements `&`? NamedType\n * - ImplementsInterfaces & NamedType\n */\n\n parseImplementsInterfaces() {\n return this.expectOptionalKeyword('implements')\n ? this.delimitedMany(tokenKind_TokenKind.AMP, this.parseNamedType)\n : [];\n }\n /**\n * ```\n * FieldsDefinition : { FieldDefinition+ }\n * ```\n */\n\n parseFieldsDefinition() {\n return this.optionalMany(\n tokenKind_TokenKind.BRACE_L,\n this.parseFieldDefinition,\n tokenKind_TokenKind.BRACE_R,\n );\n }\n /**\n * FieldDefinition :\n * - Description? Name ArgumentsDefinition? : Type Directives[Const]?\n */\n\n parseFieldDefinition() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n const name = this.parseName();\n const args = this.parseArgumentDefs();\n this.expectToken(tokenKind_TokenKind.COLON);\n const type = this.parseTypeReference();\n const directives = this.parseConstDirectives();\n return this.node(start, {\n kind: kinds/* Kind */.b.FIELD_DEFINITION,\n description,\n name,\n arguments: args,\n type,\n directives,\n });\n }\n /**\n * ArgumentsDefinition : ( InputValueDefinition+ )\n */\n\n parseArgumentDefs() {\n return this.optionalMany(\n tokenKind_TokenKind.PAREN_L,\n this.parseInputValueDef,\n tokenKind_TokenKind.PAREN_R,\n );\n }\n /**\n * InputValueDefinition :\n * - Description? Name : Type DefaultValue? Directives[Const]?\n */\n\n parseInputValueDef() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n const name = this.parseName();\n this.expectToken(tokenKind_TokenKind.COLON);\n const type = this.parseTypeReference();\n let defaultValue;\n\n if (this.expectOptionalToken(tokenKind_TokenKind.EQUALS)) {\n defaultValue = this.parseConstValueLiteral();\n }\n\n const directives = this.parseConstDirectives();\n return this.node(start, {\n kind: kinds/* Kind */.b.INPUT_VALUE_DEFINITION,\n description,\n name,\n type,\n defaultValue,\n directives,\n });\n }\n /**\n * InterfaceTypeDefinition :\n * - Description? interface Name Directives[Const]? FieldsDefinition?\n */\n\n parseInterfaceTypeDefinition() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n this.expectKeyword('interface');\n const name = this.parseName();\n const interfaces = this.parseImplementsInterfaces();\n const directives = this.parseConstDirectives();\n const fields = this.parseFieldsDefinition();\n return this.node(start, {\n kind: kinds/* Kind */.b.INTERFACE_TYPE_DEFINITION,\n description,\n name,\n interfaces,\n directives,\n fields,\n });\n }\n /**\n * UnionTypeDefinition :\n * - Description? union Name Directives[Const]? UnionMemberTypes?\n */\n\n parseUnionTypeDefinition() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n this.expectKeyword('union');\n const name = this.parseName();\n const directives = this.parseConstDirectives();\n const types = this.parseUnionMemberTypes();\n return this.node(start, {\n kind: kinds/* Kind */.b.UNION_TYPE_DEFINITION,\n description,\n name,\n directives,\n types,\n });\n }\n /**\n * UnionMemberTypes :\n * - = `|`? NamedType\n * - UnionMemberTypes | NamedType\n */\n\n parseUnionMemberTypes() {\n return this.expectOptionalToken(tokenKind_TokenKind.EQUALS)\n ? this.delimitedMany(tokenKind_TokenKind.PIPE, this.parseNamedType)\n : [];\n }\n /**\n * EnumTypeDefinition :\n * - Description? enum Name Directives[Const]? EnumValuesDefinition?\n */\n\n parseEnumTypeDefinition() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n this.expectKeyword('enum');\n const name = this.parseName();\n const directives = this.parseConstDirectives();\n const values = this.parseEnumValuesDefinition();\n return this.node(start, {\n kind: kinds/* Kind */.b.ENUM_TYPE_DEFINITION,\n description,\n name,\n directives,\n values,\n });\n }\n /**\n * ```\n * EnumValuesDefinition : { EnumValueDefinition+ }\n * ```\n */\n\n parseEnumValuesDefinition() {\n return this.optionalMany(\n tokenKind_TokenKind.BRACE_L,\n this.parseEnumValueDefinition,\n tokenKind_TokenKind.BRACE_R,\n );\n }\n /**\n * EnumValueDefinition : Description? EnumValue Directives[Const]?\n */\n\n parseEnumValueDefinition() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n const name = this.parseEnumValueName();\n const directives = this.parseConstDirectives();\n return this.node(start, {\n kind: kinds/* Kind */.b.ENUM_VALUE_DEFINITION,\n description,\n name,\n directives,\n });\n }\n /**\n * EnumValue : Name but not `true`, `false` or `null`\n */\n\n parseEnumValueName() {\n if (\n this._lexer.token.value === 'true' ||\n this._lexer.token.value === 'false' ||\n this._lexer.token.value === 'null'\n ) {\n throw syntaxError(\n this._lexer.source,\n this._lexer.token.start,\n `${getTokenDesc(\n this._lexer.token,\n )} is reserved and cannot be used for an enum value.`,\n );\n }\n\n return this.parseName();\n }\n /**\n * InputObjectTypeDefinition :\n * - Description? input Name Directives[Const]? InputFieldsDefinition?\n */\n\n parseInputObjectTypeDefinition() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n this.expectKeyword('input');\n const name = this.parseName();\n const directives = this.parseConstDirectives();\n const fields = this.parseInputFieldsDefinition();\n return this.node(start, {\n kind: kinds/* Kind */.b.INPUT_OBJECT_TYPE_DEFINITION,\n description,\n name,\n directives,\n fields,\n });\n }\n /**\n * ```\n * InputFieldsDefinition : { InputValueDefinition+ }\n * ```\n */\n\n parseInputFieldsDefinition() {\n return this.optionalMany(\n tokenKind_TokenKind.BRACE_L,\n this.parseInputValueDef,\n tokenKind_TokenKind.BRACE_R,\n );\n }\n /**\n * TypeSystemExtension :\n * - SchemaExtension\n * - TypeExtension\n *\n * TypeExtension :\n * - ScalarTypeExtension\n * - ObjectTypeExtension\n * - InterfaceTypeExtension\n * - UnionTypeExtension\n * - EnumTypeExtension\n * - InputObjectTypeDefinition\n */\n\n parseTypeSystemExtension() {\n const keywordToken = this._lexer.lookahead();\n\n if (keywordToken.kind === tokenKind_TokenKind.NAME) {\n switch (keywordToken.value) {\n case 'schema':\n return this.parseSchemaExtension();\n\n case 'scalar':\n return this.parseScalarTypeExtension();\n\n case 'type':\n return this.parseObjectTypeExtension();\n\n case 'interface':\n return this.parseInterfaceTypeExtension();\n\n case 'union':\n return this.parseUnionTypeExtension();\n\n case 'enum':\n return this.parseEnumTypeExtension();\n\n case 'input':\n return this.parseInputObjectTypeExtension();\n }\n }\n\n throw this.unexpected(keywordToken);\n }\n /**\n * ```\n * SchemaExtension :\n * - extend schema Directives[Const]? { OperationTypeDefinition+ }\n * - extend schema Directives[Const]\n * ```\n */\n\n parseSchemaExtension() {\n const start = this._lexer.token;\n this.expectKeyword('extend');\n this.expectKeyword('schema');\n const directives = this.parseConstDirectives();\n const operationTypes = this.optionalMany(\n tokenKind_TokenKind.BRACE_L,\n this.parseOperationTypeDefinition,\n tokenKind_TokenKind.BRACE_R,\n );\n\n if (directives.length === 0 && operationTypes.length === 0) {\n throw this.unexpected();\n }\n\n return this.node(start, {\n kind: kinds/* Kind */.b.SCHEMA_EXTENSION,\n directives,\n operationTypes,\n });\n }\n /**\n * ScalarTypeExtension :\n * - extend scalar Name Directives[Const]\n */\n\n parseScalarTypeExtension() {\n const start = this._lexer.token;\n this.expectKeyword('extend');\n this.expectKeyword('scalar');\n const name = this.parseName();\n const directives = this.parseConstDirectives();\n\n if (directives.length === 0) {\n throw this.unexpected();\n }\n\n return this.node(start, {\n kind: kinds/* Kind */.b.SCALAR_TYPE_EXTENSION,\n name,\n directives,\n });\n }\n /**\n * ObjectTypeExtension :\n * - extend type Name ImplementsInterfaces? Directives[Const]? FieldsDefinition\n * - extend type Name ImplementsInterfaces? Directives[Const]\n * - extend type Name ImplementsInterfaces\n */\n\n parseObjectTypeExtension() {\n const start = this._lexer.token;\n this.expectKeyword('extend');\n this.expectKeyword('type');\n const name = this.parseName();\n const interfaces = this.parseImplementsInterfaces();\n const directives = this.parseConstDirectives();\n const fields = this.parseFieldsDefinition();\n\n if (\n interfaces.length === 0 &&\n directives.length === 0 &&\n fields.length === 0\n ) {\n throw this.unexpected();\n }\n\n return this.node(start, {\n kind: kinds/* Kind */.b.OBJECT_TYPE_EXTENSION,\n name,\n interfaces,\n directives,\n fields,\n });\n }\n /**\n * InterfaceTypeExtension :\n * - extend interface Name ImplementsInterfaces? Directives[Const]? FieldsDefinition\n * - extend interface Name ImplementsInterfaces? Directives[Const]\n * - extend interface Name ImplementsInterfaces\n */\n\n parseInterfaceTypeExtension() {\n const start = this._lexer.token;\n this.expectKeyword('extend');\n this.expectKeyword('interface');\n const name = this.parseName();\n const interfaces = this.parseImplementsInterfaces();\n const directives = this.parseConstDirectives();\n const fields = this.parseFieldsDefinition();\n\n if (\n interfaces.length === 0 &&\n directives.length === 0 &&\n fields.length === 0\n ) {\n throw this.unexpected();\n }\n\n return this.node(start, {\n kind: kinds/* Kind */.b.INTERFACE_TYPE_EXTENSION,\n name,\n interfaces,\n directives,\n fields,\n });\n }\n /**\n * UnionTypeExtension :\n * - extend union Name Directives[Const]? UnionMemberTypes\n * - extend union Name Directives[Const]\n */\n\n parseUnionTypeExtension() {\n const start = this._lexer.token;\n this.expectKeyword('extend');\n this.expectKeyword('union');\n const name = this.parseName();\n const directives = this.parseConstDirectives();\n const types = this.parseUnionMemberTypes();\n\n if (directives.length === 0 && types.length === 0) {\n throw this.unexpected();\n }\n\n return this.node(start, {\n kind: kinds/* Kind */.b.UNION_TYPE_EXTENSION,\n name,\n directives,\n types,\n });\n }\n /**\n * EnumTypeExtension :\n * - extend enum Name Directives[Const]? EnumValuesDefinition\n * - extend enum Name Directives[Const]\n */\n\n parseEnumTypeExtension() {\n const start = this._lexer.token;\n this.expectKeyword('extend');\n this.expectKeyword('enum');\n const name = this.parseName();\n const directives = this.parseConstDirectives();\n const values = this.parseEnumValuesDefinition();\n\n if (directives.length === 0 && values.length === 0) {\n throw this.unexpected();\n }\n\n return this.node(start, {\n kind: kinds/* Kind */.b.ENUM_TYPE_EXTENSION,\n name,\n directives,\n values,\n });\n }\n /**\n * InputObjectTypeExtension :\n * - extend input Name Directives[Const]? InputFieldsDefinition\n * - extend input Name Directives[Const]\n */\n\n parseInputObjectTypeExtension() {\n const start = this._lexer.token;\n this.expectKeyword('extend');\n this.expectKeyword('input');\n const name = this.parseName();\n const directives = this.parseConstDirectives();\n const fields = this.parseInputFieldsDefinition();\n\n if (directives.length === 0 && fields.length === 0) {\n throw this.unexpected();\n }\n\n return this.node(start, {\n kind: kinds/* Kind */.b.INPUT_OBJECT_TYPE_EXTENSION,\n name,\n directives,\n fields,\n });\n }\n /**\n * ```\n * DirectiveDefinition :\n * - Description? directive @ Name ArgumentsDefinition? `repeatable`? on DirectiveLocations\n * ```\n */\n\n parseDirectiveDefinition() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n this.expectKeyword('directive');\n this.expectToken(tokenKind_TokenKind.AT);\n const name = this.parseName();\n const args = this.parseArgumentDefs();\n const repeatable = this.expectOptionalKeyword('repeatable');\n this.expectKeyword('on');\n const locations = this.parseDirectiveLocations();\n return this.node(start, {\n kind: kinds/* Kind */.b.DIRECTIVE_DEFINITION,\n description,\n name,\n arguments: args,\n repeatable,\n locations,\n });\n }\n /**\n * DirectiveLocations :\n * - `|`? DirectiveLocation\n * - DirectiveLocations | DirectiveLocation\n */\n\n parseDirectiveLocations() {\n return this.delimitedMany(tokenKind_TokenKind.PIPE, this.parseDirectiveLocation);\n }\n /*\n * DirectiveLocation :\n * - ExecutableDirectiveLocation\n * - TypeSystemDirectiveLocation\n *\n * ExecutableDirectiveLocation : one of\n * `QUERY`\n * `MUTATION`\n * `SUBSCRIPTION`\n * `FIELD`\n * `FRAGMENT_DEFINITION`\n * `FRAGMENT_SPREAD`\n * `INLINE_FRAGMENT`\n *\n * TypeSystemDirectiveLocation : one of\n * `SCHEMA`\n * `SCALAR`\n * `OBJECT`\n * `FIELD_DEFINITION`\n * `ARGUMENT_DEFINITION`\n * `INTERFACE`\n * `UNION`\n * `ENUM`\n * `ENUM_VALUE`\n * `INPUT_OBJECT`\n * `INPUT_FIELD_DEFINITION`\n */\n\n parseDirectiveLocation() {\n const start = this._lexer.token;\n const name = this.parseName();\n\n if (Object.prototype.hasOwnProperty.call(DirectiveLocation, name.value)) {\n return name;\n }\n\n throw this.unexpected(start);\n } // Core parsing utility functions\n\n /**\n * Returns a node that, if configured to do so, sets a \"loc\" field as a\n * location object, used to identify the place in the source that created a\n * given parsed object.\n */\n\n node(startToken, node) {\n if (this._options.noLocation !== true) {\n node.loc = new ast/* Location */.aZ(\n startToken,\n this._lexer.lastToken,\n this._lexer.source,\n );\n }\n\n return node;\n }\n /**\n * Determines if the next token is of a given kind\n */\n\n peek(kind) {\n return this._lexer.token.kind === kind;\n }\n /**\n * If the next token is of the given kind, return that token after advancing the lexer.\n * Otherwise, do not change the parser state and throw an error.\n */\n\n expectToken(kind) {\n const token = this._lexer.token;\n\n if (token.kind === kind) {\n this.advanceLexer();\n return token;\n }\n\n throw syntaxError(\n this._lexer.source,\n token.start,\n `Expected ${getTokenKindDesc(kind)}, found ${getTokenDesc(token)}.`,\n );\n }\n /**\n * If the next token is of the given kind, return \"true\" after advancing the lexer.\n * Otherwise, do not change the parser state and return \"false\".\n */\n\n expectOptionalToken(kind) {\n const token = this._lexer.token;\n\n if (token.kind === kind) {\n this.advanceLexer();\n return true;\n }\n\n return false;\n }\n /**\n * If the next token is a given keyword, advance the lexer.\n * Otherwise, do not change the parser state and throw an error.\n */\n\n expectKeyword(value) {\n const token = this._lexer.token;\n\n if (token.kind === tokenKind_TokenKind.NAME && token.value === value) {\n this.advanceLexer();\n } else {\n throw syntaxError(\n this._lexer.source,\n token.start,\n `Expected \"${value}\", found ${getTokenDesc(token)}.`,\n );\n }\n }\n /**\n * If the next token is a given keyword, return \"true\" after advancing the lexer.\n * Otherwise, do not change the parser state and return \"false\".\n */\n\n expectOptionalKeyword(value) {\n const token = this._lexer.token;\n\n if (token.kind === tokenKind_TokenKind.NAME && token.value === value) {\n this.advanceLexer();\n return true;\n }\n\n return false;\n }\n /**\n * Helper function for creating an error when an unexpected lexed token is encountered.\n */\n\n unexpected(atToken) {\n const token =\n atToken !== null && atToken !== void 0 ? atToken : this._lexer.token;\n return syntaxError(\n this._lexer.source,\n token.start,\n `Unexpected ${getTokenDesc(token)}.`,\n );\n }\n /**\n * Returns a possibly empty list of parse nodes, determined by the parseFn.\n * This list begins with a lex token of openKind and ends with a lex token of closeKind.\n * Advances the parser to the next lex token after the closing token.\n */\n\n any(openKind, parseFn, closeKind) {\n this.expectToken(openKind);\n const nodes = [];\n\n while (!this.expectOptionalToken(closeKind)) {\n nodes.push(parseFn.call(this));\n }\n\n return nodes;\n }\n /**\n * Returns a list of parse nodes, determined by the parseFn.\n * It can be empty only if open token is missing otherwise it will always return non-empty list\n * that begins with a lex token of openKind and ends with a lex token of closeKind.\n * Advances the parser to the next lex token after the closing token.\n */\n\n optionalMany(openKind, parseFn, closeKind) {\n if (this.expectOptionalToken(openKind)) {\n const nodes = [];\n\n do {\n nodes.push(parseFn.call(this));\n } while (!this.expectOptionalToken(closeKind));\n\n return nodes;\n }\n\n return [];\n }\n /**\n * Returns a non-empty list of parse nodes, determined by the parseFn.\n * This list begins with a lex token of openKind and ends with a lex token of closeKind.\n * Advances the parser to the next lex token after the closing token.\n */\n\n many(openKind, parseFn, closeKind) {\n this.expectToken(openKind);\n const nodes = [];\n\n do {\n nodes.push(parseFn.call(this));\n } while (!this.expectOptionalToken(closeKind));\n\n return nodes;\n }\n /**\n * Returns a non-empty list of parse nodes, determined by the parseFn.\n * This list may begin with a lex token of delimiterKind followed by items separated by lex tokens of tokenKind.\n * Advances the parser to the next lex token after last item in the list.\n */\n\n delimitedMany(delimiterKind, parseFn) {\n this.expectOptionalToken(delimiterKind);\n const nodes = [];\n\n do {\n nodes.push(parseFn.call(this));\n } while (this.expectOptionalToken(delimiterKind));\n\n return nodes;\n }\n\n advanceLexer() {\n const { maxTokens } = this._options;\n\n const token = this._lexer.advance();\n\n if (maxTokens !== undefined && token.kind !== tokenKind_TokenKind.EOF) {\n ++this._tokenCounter;\n\n if (this._tokenCounter > maxTokens) {\n throw syntaxError(\n this._lexer.source,\n token.start,\n `Document contains more that ${maxTokens} tokens. Parsing aborted.`,\n );\n }\n }\n }\n}\n/**\n * A helper function to describe a token as a string for debugging.\n */\n\nfunction getTokenDesc(token) {\n const value = token.value;\n return getTokenKindDesc(token.kind) + (value != null ? ` \"${value}\"` : '');\n}\n/**\n * A helper function to describe a token kind as a string for debugging.\n */\n\nfunction getTokenKindDesc(kind) {\n return isPunctuatorTokenKind(kind) ? `\"${kind}\"` : kind;\n}\n\n;// CONCATENATED MODULE: ./node_modules/graphql-tag/lib/index.js\n\n\nvar docCache = new Map();\nvar fragmentSourceMap = new Map();\nvar printFragmentWarnings = true;\nvar experimentalFragmentVariables = false;\nfunction normalize(string) {\n return string.replace(/[\\s,]+/g, ' ').trim();\n}\nfunction cacheKeyFromLoc(loc) {\n return normalize(loc.source.body.substring(loc.start, loc.end));\n}\nfunction processFragments(ast) {\n var seenKeys = new Set();\n var definitions = [];\n ast.definitions.forEach(function (fragmentDefinition) {\n if (fragmentDefinition.kind === 'FragmentDefinition') {\n var fragmentName = fragmentDefinition.name.value;\n var sourceKey = cacheKeyFromLoc(fragmentDefinition.loc);\n var sourceKeySet = fragmentSourceMap.get(fragmentName);\n if (sourceKeySet && !sourceKeySet.has(sourceKey)) {\n if (printFragmentWarnings) {\n console.warn(\"Warning: fragment with name \" + fragmentName + \" already exists.\\n\"\n + \"graphql-tag enforces all fragment names across your application to be unique; read more about\\n\"\n + \"this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names\");\n }\n }\n else if (!sourceKeySet) {\n fragmentSourceMap.set(fragmentName, sourceKeySet = new Set);\n }\n sourceKeySet.add(sourceKey);\n if (!seenKeys.has(sourceKey)) {\n seenKeys.add(sourceKey);\n definitions.push(fragmentDefinition);\n }\n }\n else {\n definitions.push(fragmentDefinition);\n }\n });\n return (0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, ast), { definitions: definitions });\n}\nfunction stripLoc(doc) {\n var workSet = new Set(doc.definitions);\n workSet.forEach(function (node) {\n if (node.loc)\n delete node.loc;\n Object.keys(node).forEach(function (key) {\n var value = node[key];\n if (value && typeof value === 'object') {\n workSet.add(value);\n }\n });\n });\n var loc = doc.loc;\n if (loc) {\n delete loc.startToken;\n delete loc.endToken;\n }\n return doc;\n}\nfunction parseDocument(source) {\n var cacheKey = normalize(source);\n if (!docCache.has(cacheKey)) {\n var parsed = parse(source, {\n experimentalFragmentVariables: experimentalFragmentVariables,\n allowLegacyFragmentVariables: experimentalFragmentVariables\n });\n if (!parsed || parsed.kind !== 'Document') {\n throw new Error('Not a valid GraphQL document.');\n }\n docCache.set(cacheKey, stripLoc(processFragments(parsed)));\n }\n return docCache.get(cacheKey);\n}\nfunction gql(literals) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n if (typeof literals === 'string') {\n literals = [literals];\n }\n var result = literals[0];\n args.forEach(function (arg, i) {\n if (arg && arg.kind === 'Document') {\n result += arg.loc.source.body;\n }\n else {\n result += arg;\n }\n result += literals[i + 1];\n });\n return parseDocument(result);\n}\nfunction resetCaches() {\n docCache.clear();\n fragmentSourceMap.clear();\n}\nfunction disableFragmentWarnings() {\n printFragmentWarnings = false;\n}\nfunction enableExperimentalFragmentVariables() {\n experimentalFragmentVariables = true;\n}\nfunction disableExperimentalFragmentVariables() {\n experimentalFragmentVariables = false;\n}\nvar extras = {\n gql: gql,\n resetCaches: resetCaches,\n disableFragmentWarnings: disableFragmentWarnings,\n enableExperimentalFragmentVariables: enableExperimentalFragmentVariables,\n disableExperimentalFragmentVariables: disableExperimentalFragmentVariables\n};\n(function (gql_1) {\n gql_1.gql = extras.gql, gql_1.resetCaches = extras.resetCaches, gql_1.disableFragmentWarnings = extras.disableFragmentWarnings, gql_1.enableExperimentalFragmentVariables = extras.enableExperimentalFragmentVariables, gql_1.disableExperimentalFragmentVariables = extras.disableExperimentalFragmentVariables;\n})(gql || (gql = {}));\ngql[\"default\"] = gql;\n/* harmony default export */ const lib = ((/* unused pure expression or super */ null && (gql)));\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/graphql-tag/lib/index.js_+_12_modules?", + ); + + /***/ + }, + + /***/ 4146: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + 'use strict'; + eval( + "\n\nvar reactIs = __webpack_require__(4363);\n\n/**\n * Copyright 2015, Yahoo! Inc.\n * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.\n */\nvar REACT_STATICS = {\n childContextTypes: true,\n contextType: true,\n contextTypes: true,\n defaultProps: true,\n displayName: true,\n getDefaultProps: true,\n getDerivedStateFromError: true,\n getDerivedStateFromProps: true,\n mixins: true,\n propTypes: true,\n type: true\n};\nvar KNOWN_STATICS = {\n name: true,\n length: true,\n prototype: true,\n caller: true,\n callee: true,\n arguments: true,\n arity: true\n};\nvar FORWARD_REF_STATICS = {\n '$$typeof': true,\n render: true,\n defaultProps: true,\n displayName: true,\n propTypes: true\n};\nvar MEMO_STATICS = {\n '$$typeof': true,\n compare: true,\n defaultProps: true,\n displayName: true,\n propTypes: true,\n type: true\n};\nvar TYPE_STATICS = {};\nTYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;\nTYPE_STATICS[reactIs.Memo] = MEMO_STATICS;\n\nfunction getStatics(component) {\n // React v16.11 and below\n if (reactIs.isMemo(component)) {\n return MEMO_STATICS;\n } // React v16.12 and above\n\n\n return TYPE_STATICS[component['$$typeof']] || REACT_STATICS;\n}\n\nvar defineProperty = Object.defineProperty;\nvar getOwnPropertyNames = Object.getOwnPropertyNames;\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nvar getPrototypeOf = Object.getPrototypeOf;\nvar objectPrototype = Object.prototype;\nfunction hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {\n if (typeof sourceComponent !== 'string') {\n // don't hoist over string (html) components\n if (objectPrototype) {\n var inheritedComponent = getPrototypeOf(sourceComponent);\n\n if (inheritedComponent && inheritedComponent !== objectPrototype) {\n hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);\n }\n }\n\n var keys = getOwnPropertyNames(sourceComponent);\n\n if (getOwnPropertySymbols) {\n keys = keys.concat(getOwnPropertySymbols(sourceComponent));\n }\n\n var targetStatics = getStatics(targetComponent);\n var sourceStatics = getStatics(sourceComponent);\n\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n\n if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {\n var descriptor = getOwnPropertyDescriptor(sourceComponent, key);\n\n try {\n // Avoid failures from read-only properties\n defineProperty(targetComponent, key, descriptor);\n } catch (e) {}\n }\n }\n }\n\n return targetComponent;\n}\n\nmodule.exports = hoistNonReactStatics;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js?", + ); + + /***/ + }, + + /***/ 7927: /***/ (module) => { + 'use strict'; + eval( + "/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar NODE_ENV = \"test\";\n\nvar invariant = function(condition, format, a, b, c, d, e, f) {\n if (NODE_ENV !== 'production') {\n if (format === undefined) {\n throw new Error('invariant requires an error message argument');\n }\n }\n\n if (!condition) {\n var error;\n if (format === undefined) {\n error = new Error(\n 'Minified exception occurred; use the non-minified dev environment ' +\n 'for the full error message and additional helpful warnings.'\n );\n } else {\n var args = [a, b, c, d, e, f];\n var argIndex = 0;\n error = new Error(\n format.replace(/%s/g, function() { return args[argIndex++]; })\n );\n error.name = 'Invariant Violation';\n }\n\n error.framesToPop = 1; // we don't care about invariant's own frame\n throw error;\n }\n};\n\nmodule.exports = invariant;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/invariant/invariant.js?", + ); + + /***/ + }, + + /***/ 5580: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var getNative = __webpack_require__(6110),\n root = __webpack_require__(9325);\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nmodule.exports = DataView;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_DataView.js?", + ); + + /***/ + }, + + /***/ 1549: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var hashClear = __webpack_require__(2032),\n hashDelete = __webpack_require__(3862),\n hashGet = __webpack_require__(6721),\n hashHas = __webpack_require__(2749),\n hashSet = __webpack_require__(5749);\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_Hash.js?", + ); + + /***/ + }, + + /***/ 79: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var listCacheClear = __webpack_require__(3702),\n listCacheDelete = __webpack_require__(80),\n listCacheGet = __webpack_require__(4739),\n listCacheHas = __webpack_require__(8655),\n listCacheSet = __webpack_require__(1175);\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_ListCache.js?", + ); + + /***/ + }, + + /***/ 8223: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var getNative = __webpack_require__(6110),\n root = __webpack_require__(9325);\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_Map.js?", + ); + + /***/ + }, + + /***/ 3661: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var mapCacheClear = __webpack_require__(3040),\n mapCacheDelete = __webpack_require__(7670),\n mapCacheGet = __webpack_require__(289),\n mapCacheHas = __webpack_require__(4509),\n mapCacheSet = __webpack_require__(2949);\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_MapCache.js?", + ); + + /***/ + }, + + /***/ 2804: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var getNative = __webpack_require__(6110),\n root = __webpack_require__(9325);\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nmodule.exports = Promise;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_Promise.js?", + ); + + /***/ + }, + + /***/ 6545: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var getNative = __webpack_require__(6110),\n root = __webpack_require__(9325);\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nmodule.exports = Set;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_Set.js?", + ); + + /***/ + }, + + /***/ 8859: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var MapCache = __webpack_require__(3661),\n setCacheAdd = __webpack_require__(1380),\n setCacheHas = __webpack_require__(1459);\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nmodule.exports = SetCache;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_SetCache.js?', + ); + + /***/ + }, + + /***/ 7217: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var ListCache = __webpack_require__(79),\n stackClear = __webpack_require__(1420),\n stackDelete = __webpack_require__(938),\n stackGet = __webpack_require__(3605),\n stackHas = __webpack_require__(9817),\n stackSet = __webpack_require__(945);\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nmodule.exports = Stack;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_Stack.js?", + ); + + /***/ + }, + + /***/ 1873: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var root = __webpack_require__(9325);\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_Symbol.js?', + ); + + /***/ + }, + + /***/ 7828: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var root = __webpack_require__(9325);\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nmodule.exports = Uint8Array;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_Uint8Array.js?', + ); + + /***/ + }, + + /***/ 8303: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var getNative = __webpack_require__(6110),\n root = __webpack_require__(9325);\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nmodule.exports = WeakMap;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_WeakMap.js?", + ); + + /***/ + }, + + /***/ 9770: /***/ (module) => { + eval( + '/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nmodule.exports = arrayFilter;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_arrayFilter.js?', + ); + + /***/ + }, + + /***/ 5325: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var baseIndexOf = __webpack_require__(6131);\n\n/**\n * A specialized version of `_.includes` for arrays without support for\n * specifying an index to search from.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\nfunction arrayIncludes(array, value) {\n var length = array == null ? 0 : array.length;\n return !!length && baseIndexOf(array, value, 0) > -1;\n}\n\nmodule.exports = arrayIncludes;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_arrayIncludes.js?', + ); + + /***/ + }, + + /***/ 9905: /***/ (module) => { + eval( + '/**\n * This function is like `arrayIncludes` except that it accepts a comparator.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @param {Function} comparator The comparator invoked per element.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\nfunction arrayIncludesWith(array, value, comparator) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (comparator(value, array[index])) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arrayIncludesWith;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_arrayIncludesWith.js?', + ); + + /***/ + }, + + /***/ 695: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var baseTimes = __webpack_require__(8096),\n isArguments = __webpack_require__(2428),\n isArray = __webpack_require__(6449),\n isBuffer = __webpack_require__(3656),\n isIndex = __webpack_require__(361),\n isTypedArray = __webpack_require__(7167);\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = arrayLikeKeys;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_arrayLikeKeys.js?", + ); + + /***/ + }, + + /***/ 4932: /***/ (module) => { + eval( + '/**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction arrayMap(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length,\n result = Array(length);\n\n while (++index < length) {\n result[index] = iteratee(array[index], index, array);\n }\n return result;\n}\n\nmodule.exports = arrayMap;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_arrayMap.js?', + ); + + /***/ + }, + + /***/ 4528: /***/ (module) => { + eval( + '/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nmodule.exports = arrayPush;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_arrayPush.js?', + ); + + /***/ + }, + + /***/ 4248: /***/ (module) => { + eval( + '/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arraySome;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_arraySome.js?', + ); + + /***/ + }, + + /***/ 6025: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var eq = __webpack_require__(5288);\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nmodule.exports = assocIndexOf;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_assocIndexOf.js?', + ); + + /***/ + }, + + /***/ 909: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var baseForOwn = __webpack_require__(641),\n createBaseEach = __webpack_require__(8329);\n\n/**\n * The base implementation of `_.forEach` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n */\nvar baseEach = createBaseEach(baseForOwn);\n\nmodule.exports = baseEach;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_baseEach.js?', + ); + + /***/ + }, + + /***/ 2523: /***/ (module) => { + eval( + '/**\n * The base implementation of `_.findIndex` and `_.findLastIndex` without\n * support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} predicate The function invoked per iteration.\n * @param {number} fromIndex The index to search from.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseFindIndex(array, predicate, fromIndex, fromRight) {\n var length = array.length,\n index = fromIndex + (fromRight ? 1 : -1);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (predicate(array[index], index, array)) {\n return index;\n }\n }\n return -1;\n}\n\nmodule.exports = baseFindIndex;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_baseFindIndex.js?', + ); + + /***/ + }, + + /***/ 3120: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var arrayPush = __webpack_require__(4528),\n isFlattenable = __webpack_require__(5891);\n\n/**\n * The base implementation of `_.flatten` with support for restricting flattening.\n *\n * @private\n * @param {Array} array The array to flatten.\n * @param {number} depth The maximum recursion depth.\n * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.\n * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.\n * @param {Array} [result=[]] The initial result value.\n * @returns {Array} Returns the new flattened array.\n */\nfunction baseFlatten(array, depth, predicate, isStrict, result) {\n var index = -1,\n length = array.length;\n\n predicate || (predicate = isFlattenable);\n result || (result = []);\n\n while (++index < length) {\n var value = array[index];\n if (depth > 0 && predicate(value)) {\n if (depth > 1) {\n // Recursively flatten arrays (susceptible to call stack limits).\n baseFlatten(value, depth - 1, predicate, isStrict, result);\n } else {\n arrayPush(result, value);\n }\n } else if (!isStrict) {\n result[result.length] = value;\n }\n }\n return result;\n}\n\nmodule.exports = baseFlatten;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_baseFlatten.js?', + ); + + /***/ + }, + + /***/ 6649: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var createBaseFor = __webpack_require__(3221);\n\n/**\n * The base implementation of `baseForOwn` which iterates over `object`\n * properties returned by `keysFunc` and invokes `iteratee` for each property.\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\nvar baseFor = createBaseFor();\n\nmodule.exports = baseFor;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_baseFor.js?', + ); + + /***/ + }, + + /***/ 641: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var baseFor = __webpack_require__(6649),\n keys = __webpack_require__(5950);\n\n/**\n * The base implementation of `_.forOwn` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\nfunction baseForOwn(object, iteratee) {\n return object && baseFor(object, iteratee, keys);\n}\n\nmodule.exports = baseForOwn;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_baseForOwn.js?', + ); + + /***/ + }, + + /***/ 7422: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var castPath = __webpack_require__(1769),\n toKey = __webpack_require__(7797);\n\n/**\n * The base implementation of `_.get` without support for default values.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @returns {*} Returns the resolved value.\n */\nfunction baseGet(object, path) {\n path = castPath(path, object);\n\n var index = 0,\n length = path.length;\n\n while (object != null && index < length) {\n object = object[toKey(path[index++])];\n }\n return (index && index == length) ? object : undefined;\n}\n\nmodule.exports = baseGet;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_baseGet.js?', + ); + + /***/ + }, + + /***/ 2199: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var arrayPush = __webpack_require__(4528),\n isArray = __webpack_require__(6449);\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nmodule.exports = baseGetAllKeys;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_baseGetAllKeys.js?', + ); + + /***/ + }, + + /***/ 2552: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var Symbol = __webpack_require__(1873),\n getRawTag = __webpack_require__(659),\n objectToString = __webpack_require__(9350);\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_baseGetTag.js?", + ); + + /***/ + }, + + /***/ 8077: /***/ (module) => { + eval( + '/**\n * The base implementation of `_.hasIn` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\nfunction baseHasIn(object, key) {\n return object != null && key in Object(object);\n}\n\nmodule.exports = baseHasIn;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_baseHasIn.js?', + ); + + /***/ + }, + + /***/ 6131: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var baseFindIndex = __webpack_require__(2523),\n baseIsNaN = __webpack_require__(5463),\n strictIndexOf = __webpack_require__(6959);\n\n/**\n * The base implementation of `_.indexOf` without `fromIndex` bounds checks.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseIndexOf(array, value, fromIndex) {\n return value === value\n ? strictIndexOf(array, value, fromIndex)\n : baseFindIndex(array, baseIsNaN, fromIndex);\n}\n\nmodule.exports = baseIndexOf;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_baseIndexOf.js?', + ); + + /***/ + }, + + /***/ 7534: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var baseGetTag = __webpack_require__(2552),\n isObjectLike = __webpack_require__(346);\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_baseIsArguments.js?", + ); + + /***/ + }, + + /***/ 270: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var baseIsEqualDeep = __webpack_require__(7068),\n isObjectLike = __webpack_require__(346);\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nmodule.exports = baseIsEqual;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_baseIsEqual.js?', + ); + + /***/ + }, + + /***/ 7068: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var Stack = __webpack_require__(7217),\n equalArrays = __webpack_require__(5911),\n equalByTag = __webpack_require__(1986),\n equalObjects = __webpack_require__(689),\n getTag = __webpack_require__(5861),\n isArray = __webpack_require__(6449),\n isBuffer = __webpack_require__(3656),\n isTypedArray = __webpack_require__(7167);\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nmodule.exports = baseIsEqualDeep;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_baseIsEqualDeep.js?", + ); + + /***/ + }, + + /***/ 1799: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var Stack = __webpack_require__(7217),\n baseIsEqual = __webpack_require__(270);\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * The base implementation of `_.isMatch` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @param {Array} matchData The property names, values, and compare flags to match.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n */\nfunction baseIsMatch(object, source, matchData, customizer) {\n var index = matchData.length,\n length = index,\n noCustomizer = !customizer;\n\n if (object == null) {\n return !length;\n }\n object = Object(object);\n while (index--) {\n var data = matchData[index];\n if ((noCustomizer && data[2])\n ? data[1] !== object[data[0]]\n : !(data[0] in object)\n ) {\n return false;\n }\n }\n while (++index < length) {\n data = matchData[index];\n var key = data[0],\n objValue = object[key],\n srcValue = data[1];\n\n if (noCustomizer && data[2]) {\n if (objValue === undefined && !(key in object)) {\n return false;\n }\n } else {\n var stack = new Stack;\n if (customizer) {\n var result = customizer(objValue, srcValue, key, object, source, stack);\n }\n if (!(result === undefined\n ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)\n : result\n )) {\n return false;\n }\n }\n }\n return true;\n}\n\nmodule.exports = baseIsMatch;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_baseIsMatch.js?', + ); + + /***/ + }, + + /***/ 5463: /***/ (module) => { + eval( + '/**\n * The base implementation of `_.isNaN` without support for number objects.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n */\nfunction baseIsNaN(value) {\n return value !== value;\n}\n\nmodule.exports = baseIsNaN;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_baseIsNaN.js?', + ); + + /***/ + }, + + /***/ 5083: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var isFunction = __webpack_require__(1882),\n isMasked = __webpack_require__(7296),\n isObject = __webpack_require__(3805),\n toSource = __webpack_require__(7473);\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_baseIsNative.js?", + ); + + /***/ + }, + + /***/ 4901: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var baseGetTag = __webpack_require__(2552),\n isLength = __webpack_require__(294),\n isObjectLike = __webpack_require__(346);\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_baseIsTypedArray.js?", + ); + + /***/ + }, + + /***/ 5389: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var baseMatches = __webpack_require__(3663),\n baseMatchesProperty = __webpack_require__(7978),\n identity = __webpack_require__(3488),\n isArray = __webpack_require__(6449),\n property = __webpack_require__(583);\n\n/**\n * The base implementation of `_.iteratee`.\n *\n * @private\n * @param {*} [value=_.identity] The value to convert to an iteratee.\n * @returns {Function} Returns the iteratee.\n */\nfunction baseIteratee(value) {\n // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.\n // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.\n if (typeof value == 'function') {\n return value;\n }\n if (value == null) {\n return identity;\n }\n if (typeof value == 'object') {\n return isArray(value)\n ? baseMatchesProperty(value[0], value[1])\n : baseMatches(value);\n }\n return property(value);\n}\n\nmodule.exports = baseIteratee;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_baseIteratee.js?", + ); + + /***/ + }, + + /***/ 8984: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var isPrototype = __webpack_require__(5527),\n nativeKeys = __webpack_require__(3650);\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeys;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_baseKeys.js?", + ); + + /***/ + }, + + /***/ 5128: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var baseEach = __webpack_require__(909),\n isArrayLike = __webpack_require__(4894);\n\n/**\n * The base implementation of `_.map` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction baseMap(collection, iteratee) {\n var index = -1,\n result = isArrayLike(collection) ? Array(collection.length) : [];\n\n baseEach(collection, function(value, key, collection) {\n result[++index] = iteratee(value, key, collection);\n });\n return result;\n}\n\nmodule.exports = baseMap;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_baseMap.js?', + ); + + /***/ + }, + + /***/ 3663: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var baseIsMatch = __webpack_require__(1799),\n getMatchData = __webpack_require__(776),\n matchesStrictComparable = __webpack_require__(7197);\n\n/**\n * The base implementation of `_.matches` which doesn't clone `source`.\n *\n * @private\n * @param {Object} source The object of property values to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction baseMatches(source) {\n var matchData = getMatchData(source);\n if (matchData.length == 1 && matchData[0][2]) {\n return matchesStrictComparable(matchData[0][0], matchData[0][1]);\n }\n return function(object) {\n return object === source || baseIsMatch(object, source, matchData);\n };\n}\n\nmodule.exports = baseMatches;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_baseMatches.js?", + ); + + /***/ + }, + + /***/ 7978: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var baseIsEqual = __webpack_require__(270),\n get = __webpack_require__(8156),\n hasIn = __webpack_require__(631),\n isKey = __webpack_require__(8586),\n isStrictComparable = __webpack_require__(756),\n matchesStrictComparable = __webpack_require__(7197),\n toKey = __webpack_require__(7797);\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.\n *\n * @private\n * @param {string} path The path of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction baseMatchesProperty(path, srcValue) {\n if (isKey(path) && isStrictComparable(srcValue)) {\n return matchesStrictComparable(toKey(path), srcValue);\n }\n return function(object) {\n var objValue = get(object, path);\n return (objValue === undefined && objValue === srcValue)\n ? hasIn(object, path)\n : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);\n };\n}\n\nmodule.exports = baseMatchesProperty;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_baseMatchesProperty.js?", + ); + + /***/ + }, + + /***/ 7237: /***/ (module) => { + eval( + '/**\n * The base implementation of `_.property` without support for deep paths.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\nfunction baseProperty(key) {\n return function(object) {\n return object == null ? undefined : object[key];\n };\n}\n\nmodule.exports = baseProperty;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_baseProperty.js?', + ); + + /***/ + }, + + /***/ 7255: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var baseGet = __webpack_require__(7422);\n\n/**\n * A specialized version of `baseProperty` which supports deep paths.\n *\n * @private\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\nfunction basePropertyDeep(path) {\n return function(object) {\n return baseGet(object, path);\n };\n}\n\nmodule.exports = basePropertyDeep;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_basePropertyDeep.js?', + ); + + /***/ + }, + + /***/ 8096: /***/ (module) => { + eval( + '/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\nmodule.exports = baseTimes;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_baseTimes.js?', + ); + + /***/ + }, + + /***/ 7556: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var Symbol = __webpack_require__(1873),\n arrayMap = __webpack_require__(4932),\n isArray = __webpack_require__(6449),\n isSymbol = __webpack_require__(4394);\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n/**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\nfunction baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n if (isArray(value)) {\n // Recursively convert values (susceptible to call stack limits).\n return arrayMap(value, baseToString) + '';\n }\n if (isSymbol(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nmodule.exports = baseToString;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_baseToString.js?", + ); + + /***/ + }, + + /***/ 7301: /***/ (module) => { + eval( + '/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nmodule.exports = baseUnary;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_baseUnary.js?', + ); + + /***/ + }, + + /***/ 5765: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var SetCache = __webpack_require__(8859),\n arrayIncludes = __webpack_require__(5325),\n arrayIncludesWith = __webpack_require__(9905),\n cacheHas = __webpack_require__(9219),\n createSet = __webpack_require__(4517),\n setToArray = __webpack_require__(4247);\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * The base implementation of `_.uniqBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n */\nfunction baseUniq(array, iteratee, comparator) {\n var index = -1,\n includes = arrayIncludes,\n length = array.length,\n isCommon = true,\n result = [],\n seen = result;\n\n if (comparator) {\n isCommon = false;\n includes = arrayIncludesWith;\n }\n else if (length >= LARGE_ARRAY_SIZE) {\n var set = iteratee ? null : createSet(array);\n if (set) {\n return setToArray(set);\n }\n isCommon = false;\n includes = cacheHas;\n seen = new SetCache;\n }\n else {\n seen = iteratee ? [] : result;\n }\n outer:\n while (++index < length) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n value = (comparator || value !== 0) ? value : 0;\n if (isCommon && computed === computed) {\n var seenIndex = seen.length;\n while (seenIndex--) {\n if (seen[seenIndex] === computed) {\n continue outer;\n }\n }\n if (iteratee) {\n seen.push(computed);\n }\n result.push(value);\n }\n else if (!includes(seen, computed, comparator)) {\n if (seen !== result) {\n seen.push(computed);\n }\n result.push(value);\n }\n }\n return result;\n}\n\nmodule.exports = baseUniq;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_baseUniq.js?', + ); + + /***/ + }, + + /***/ 9219: /***/ (module) => { + eval( + '/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\nmodule.exports = cacheHas;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_cacheHas.js?', + ); + + /***/ + }, + + /***/ 1769: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var isArray = __webpack_require__(6449),\n isKey = __webpack_require__(8586),\n stringToPath = __webpack_require__(1802),\n toString = __webpack_require__(3222);\n\n/**\n * Casts `value` to a path array if it's not one.\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {Object} [object] The object to query keys on.\n * @returns {Array} Returns the cast property path array.\n */\nfunction castPath(value, object) {\n if (isArray(value)) {\n return value;\n }\n return isKey(value, object) ? [value] : stringToPath(toString(value));\n}\n\nmodule.exports = castPath;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_castPath.js?", + ); + + /***/ + }, + + /***/ 5481: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var root = __webpack_require__(9325);\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_coreJsData.js?", + ); + + /***/ + }, + + /***/ 8329: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var isArrayLike = __webpack_require__(4894);\n\n/**\n * Creates a `baseEach` or `baseEachRight` function.\n *\n * @private\n * @param {Function} eachFunc The function to iterate over a collection.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseEach(eachFunc, fromRight) {\n return function(collection, iteratee) {\n if (collection == null) {\n return collection;\n }\n if (!isArrayLike(collection)) {\n return eachFunc(collection, iteratee);\n }\n var length = collection.length,\n index = fromRight ? length : -1,\n iterable = Object(collection);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (iteratee(iterable[index], index, iterable) === false) {\n break;\n }\n }\n return collection;\n };\n}\n\nmodule.exports = createBaseEach;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_createBaseEach.js?', + ); + + /***/ + }, + + /***/ 3221: /***/ (module) => { + eval( + '/**\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseFor(fromRight) {\n return function(object, iteratee, keysFunc) {\n var index = -1,\n iterable = Object(object),\n props = keysFunc(object),\n length = props.length;\n\n while (length--) {\n var key = props[fromRight ? length : ++index];\n if (iteratee(iterable[key], key, iterable) === false) {\n break;\n }\n }\n return object;\n };\n}\n\nmodule.exports = createBaseFor;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_createBaseFor.js?', + ); + + /***/ + }, + + /***/ 4517: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var Set = __webpack_require__(6545),\n noop = __webpack_require__(3950),\n setToArray = __webpack_require__(4247);\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * Creates a set object of `values`.\n *\n * @private\n * @param {Array} values The values to add to the set.\n * @returns {Object} Returns the new set.\n */\nvar createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {\n return new Set(values);\n};\n\nmodule.exports = createSet;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_createSet.js?', + ); + + /***/ + }, + + /***/ 5911: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var SetCache = __webpack_require__(8859),\n arraySome = __webpack_require__(4248),\n cacheHas = __webpack_require__(9219);\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalArrays;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_equalArrays.js?", + ); + + /***/ + }, + + /***/ 1986: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var Symbol = __webpack_require__(1873),\n Uint8Array = __webpack_require__(7828),\n eq = __webpack_require__(5288),\n equalArrays = __webpack_require__(5911),\n mapToArray = __webpack_require__(317),\n setToArray = __webpack_require__(4247);\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\nmodule.exports = equalByTag;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_equalByTag.js?", + ); + + /***/ + }, + + /***/ 689: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var getAllKeys = __webpack_require__(2);\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalObjects;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_equalObjects.js?", + ); + + /***/ + }, + + /***/ 4840: /***/ (module) => { + eval( + "/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_freeGlobal.js?", + ); + + /***/ + }, + + /***/ 2: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var baseGetAllKeys = __webpack_require__(2199),\n getSymbols = __webpack_require__(4664),\n keys = __webpack_require__(5950);\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\nmodule.exports = getAllKeys;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_getAllKeys.js?', + ); + + /***/ + }, + + /***/ 2651: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var isKeyable = __webpack_require__(4218);\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nmodule.exports = getMapData;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_getMapData.js?", + ); + + /***/ + }, + + /***/ 776: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var isStrictComparable = __webpack_require__(756),\n keys = __webpack_require__(5950);\n\n/**\n * Gets the property names, values, and compare flags of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the match data of `object`.\n */\nfunction getMatchData(object) {\n var result = keys(object),\n length = result.length;\n\n while (length--) {\n var key = result[length],\n value = object[key];\n\n result[length] = [key, value, isStrictComparable(value)];\n }\n return result;\n}\n\nmodule.exports = getMatchData;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_getMatchData.js?', + ); + + /***/ + }, + + /***/ 6110: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var baseIsNative = __webpack_require__(5083),\n getValue = __webpack_require__(392);\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_getNative.js?", + ); + + /***/ + }, + + /***/ 659: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var Symbol = __webpack_require__(1873);\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_getRawTag.js?', + ); + + /***/ + }, + + /***/ 4664: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var arrayFilter = __webpack_require__(9770),\n stubArray = __webpack_require__(3345);\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\nmodule.exports = getSymbols;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_getSymbols.js?', + ); + + /***/ + }, + + /***/ 5861: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var DataView = __webpack_require__(5580),\n Map = __webpack_require__(8223),\n Promise = __webpack_require__(2804),\n Set = __webpack_require__(6545),\n WeakMap = __webpack_require__(8303),\n baseGetTag = __webpack_require__(2552),\n toSource = __webpack_require__(7473);\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\nmodule.exports = getTag;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_getTag.js?", + ); + + /***/ + }, + + /***/ 392: /***/ (module) => { + eval( + '/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_getValue.js?', + ); + + /***/ + }, + + /***/ 9326: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var castPath = __webpack_require__(1769),\n isArguments = __webpack_require__(2428),\n isArray = __webpack_require__(6449),\n isIndex = __webpack_require__(361),\n isLength = __webpack_require__(294),\n toKey = __webpack_require__(7797);\n\n/**\n * Checks if `path` exists on `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @param {Function} hasFunc The function to check properties.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n */\nfunction hasPath(object, path, hasFunc) {\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n result = false;\n\n while (++index < length) {\n var key = toKey(path[index]);\n if (!(result = object != null && hasFunc(object, key))) {\n break;\n }\n object = object[key];\n }\n if (result || ++index != length) {\n return result;\n }\n length = object == null ? 0 : object.length;\n return !!length && isLength(length) && isIndex(key, length) &&\n (isArray(object) || isArguments(object));\n}\n\nmodule.exports = hasPath;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_hasPath.js?', + ); + + /***/ + }, + + /***/ 2032: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var nativeCreate = __webpack_require__(1042);\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nmodule.exports = hashClear;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_hashClear.js?', + ); + + /***/ + }, + + /***/ 3862: /***/ (module) => { + eval( + '/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = hashDelete;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_hashDelete.js?', + ); + + /***/ + }, + + /***/ 6721: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var nativeCreate = __webpack_require__(1042);\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_hashGet.js?", + ); + + /***/ + }, + + /***/ 2749: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var nativeCreate = __webpack_require__(1042);\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_hashHas.js?', + ); + + /***/ + }, + + /***/ 5749: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var nativeCreate = __webpack_require__(1042);\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nmodule.exports = hashSet;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_hashSet.js?", + ); + + /***/ + }, + + /***/ 5891: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var Symbol = __webpack_require__(1873),\n isArguments = __webpack_require__(2428),\n isArray = __webpack_require__(6449);\n\n/** Built-in value references. */\nvar spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined;\n\n/**\n * Checks if `value` is a flattenable `arguments` object or array.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.\n */\nfunction isFlattenable(value) {\n return isArray(value) || isArguments(value) ||\n !!(spreadableSymbol && value && value[spreadableSymbol]);\n}\n\nmodule.exports = isFlattenable;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_isFlattenable.js?', + ); + + /***/ + }, + + /***/ 361: /***/ (module) => { + eval( + "/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_isIndex.js?", + ); + + /***/ + }, + + /***/ 8586: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var isArray = __webpack_require__(6449),\n isSymbol = __webpack_require__(4394);\n\n/** Used to match property names within property paths. */\nvar reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n reIsPlainProp = /^\\w*$/;\n\n/**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\nfunction isKey(value, object) {\n if (isArray(value)) {\n return false;\n }\n var type = typeof value;\n if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n value == null || isSymbol(value)) {\n return true;\n }\n return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n (object != null && value in Object(object));\n}\n\nmodule.exports = isKey;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_isKey.js?", + ); + + /***/ + }, + + /***/ 4218: /***/ (module) => { + eval( + "/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nmodule.exports = isKeyable;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_isKeyable.js?", + ); + + /***/ + }, + + /***/ 7296: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var coreJsData = __webpack_require__(5481);\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_isMasked.js?", + ); + + /***/ + }, + + /***/ 5527: /***/ (module) => { + eval( + "/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\nmodule.exports = isPrototype;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_isPrototype.js?", + ); + + /***/ + }, + + /***/ 756: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var isObject = __webpack_require__(3805);\n\n/**\n * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` if suitable for strict\n * equality comparisons, else `false`.\n */\nfunction isStrictComparable(value) {\n return value === value && !isObject(value);\n}\n\nmodule.exports = isStrictComparable;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_isStrictComparable.js?', + ); + + /***/ + }, + + /***/ 3702: /***/ (module) => { + eval( + '/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_listCacheClear.js?', + ); + + /***/ + }, + + /***/ 80: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var assocIndexOf = __webpack_require__(6025);\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_listCacheDelete.js?', + ); + + /***/ + }, + + /***/ 4739: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var assocIndexOf = __webpack_require__(6025);\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_listCacheGet.js?', + ); + + /***/ + }, + + /***/ 8655: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var assocIndexOf = __webpack_require__(6025);\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_listCacheHas.js?', + ); + + /***/ + }, + + /***/ 1175: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var assocIndexOf = __webpack_require__(6025);\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nmodule.exports = listCacheSet;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_listCacheSet.js?', + ); + + /***/ + }, + + /***/ 3040: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var Hash = __webpack_require__(1549),\n ListCache = __webpack_require__(79),\n Map = __webpack_require__(8223);\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nmodule.exports = mapCacheClear;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_mapCacheClear.js?", + ); + + /***/ + }, + + /***/ 7670: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var getMapData = __webpack_require__(2651);\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = mapCacheDelete;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_mapCacheDelete.js?", + ); + + /***/ + }, + + /***/ 289: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var getMapData = __webpack_require__(2651);\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_mapCacheGet.js?', + ); + + /***/ + }, + + /***/ 4509: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var getMapData = __webpack_require__(2651);\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_mapCacheHas.js?', + ); + + /***/ + }, + + /***/ 2949: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var getMapData = __webpack_require__(2651);\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nmodule.exports = mapCacheSet;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_mapCacheSet.js?', + ); + + /***/ + }, + + /***/ 317: /***/ (module) => { + eval( + '/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\nmodule.exports = mapToArray;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_mapToArray.js?', + ); + + /***/ + }, + + /***/ 7197: /***/ (module) => { + eval( + '/**\n * A specialized version of `matchesProperty` for source values suitable\n * for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction matchesStrictComparable(key, srcValue) {\n return function(object) {\n if (object == null) {\n return false;\n }\n return object[key] === srcValue &&\n (srcValue !== undefined || (key in Object(object)));\n };\n}\n\nmodule.exports = matchesStrictComparable;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_matchesStrictComparable.js?', + ); + + /***/ + }, + + /***/ 2224: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var memoize = __webpack_require__(104);\n\n/** Used as the maximum memoize cache size. */\nvar MAX_MEMOIZE_SIZE = 500;\n\n/**\n * A specialized version of `_.memoize` which clears the memoized function's\n * cache when it exceeds `MAX_MEMOIZE_SIZE`.\n *\n * @private\n * @param {Function} func The function to have its output memoized.\n * @returns {Function} Returns the new memoized function.\n */\nfunction memoizeCapped(func) {\n var result = memoize(func, function(key) {\n if (cache.size === MAX_MEMOIZE_SIZE) {\n cache.clear();\n }\n return key;\n });\n\n var cache = result.cache;\n return result;\n}\n\nmodule.exports = memoizeCapped;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_memoizeCapped.js?", + ); + + /***/ + }, + + /***/ 1042: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var getNative = __webpack_require__(6110);\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_nativeCreate.js?", + ); + + /***/ + }, + + /***/ 3650: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var overArg = __webpack_require__(4335);\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nmodule.exports = nativeKeys;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_nativeKeys.js?', + ); + + /***/ + }, + + /***/ 6009: /***/ (module, exports, __webpack_require__) => { + eval( + "/* module decorator */ module = __webpack_require__.nmd(module);\nvar freeGlobal = __webpack_require__(4840);\n\n/** Detect free variable `exports`. */\nvar freeExports = true && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && \"object\" == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_nodeUtil.js?", + ); + + /***/ + }, + + /***/ 9350: /***/ (module) => { + eval( + '/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_objectToString.js?', + ); + + /***/ + }, + + /***/ 4335: /***/ (module) => { + eval( + '/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_overArg.js?', + ); + + /***/ + }, + + /***/ 9325: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var freeGlobal = __webpack_require__(4840);\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_root.js?", + ); + + /***/ + }, + + /***/ 1380: /***/ (module) => { + eval( + "/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\nmodule.exports = setCacheAdd;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_setCacheAdd.js?", + ); + + /***/ + }, + + /***/ 1459: /***/ (module) => { + eval( + '/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\nmodule.exports = setCacheHas;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_setCacheHas.js?', + ); + + /***/ + }, + + /***/ 4247: /***/ (module) => { + eval( + '/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\nmodule.exports = setToArray;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_setToArray.js?', + ); + + /***/ + }, + + /***/ 1420: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var ListCache = __webpack_require__(79);\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\nmodule.exports = stackClear;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_stackClear.js?', + ); + + /***/ + }, + + /***/ 938: /***/ (module) => { + eval( + "/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\nmodule.exports = stackDelete;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_stackDelete.js?", + ); + + /***/ + }, + + /***/ 3605: /***/ (module) => { + eval( + '/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\nmodule.exports = stackGet;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_stackGet.js?', + ); + + /***/ + }, + + /***/ 9817: /***/ (module) => { + eval( + '/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\nmodule.exports = stackHas;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_stackHas.js?', + ); + + /***/ + }, + + /***/ 945: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var ListCache = __webpack_require__(79),\n Map = __webpack_require__(8223),\n MapCache = __webpack_require__(3661);\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\nmodule.exports = stackSet;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_stackSet.js?', + ); + + /***/ + }, + + /***/ 6959: /***/ (module) => { + eval( + '/**\n * A specialized version of `_.indexOf` which performs strict equality\n * comparisons of values, i.e. `===`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction strictIndexOf(array, value, fromIndex) {\n var index = fromIndex - 1,\n length = array.length;\n\n while (++index < length) {\n if (array[index] === value) {\n return index;\n }\n }\n return -1;\n}\n\nmodule.exports = strictIndexOf;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_strictIndexOf.js?', + ); + + /***/ + }, + + /***/ 1802: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var memoizeCapped = __webpack_require__(2224);\n\n/** Used to match property names within property paths. */\nvar rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n/** Used to match backslashes in property paths. */\nvar reEscapeChar = /\\\\(\\\\)?/g;\n\n/**\n * Converts `string` to a property path array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the property path array.\n */\nvar stringToPath = memoizeCapped(function(string) {\n var result = [];\n if (string.charCodeAt(0) === 46 /* . */) {\n result.push('');\n }\n string.replace(rePropName, function(match, number, quote, subString) {\n result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));\n });\n return result;\n});\n\nmodule.exports = stringToPath;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_stringToPath.js?", + ); + + /***/ + }, + + /***/ 7797: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var isSymbol = __webpack_require__(4394);\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\nfunction toKey(value) {\n if (typeof value == 'string' || isSymbol(value)) {\n return value;\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nmodule.exports = toKey;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_toKey.js?", + ); + + /***/ + }, + + /***/ 7473: /***/ (module) => { + eval( + "/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nmodule.exports = toSource;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_toSource.js?", + ); + + /***/ + }, + + /***/ 5288: /***/ (module) => { + eval( + "/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/eq.js?", + ); + + /***/ + }, + + /***/ 7307: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var baseFlatten = __webpack_require__(3120),\n map = __webpack_require__(5378);\n\n/**\n * Creates a flattened array of values by running each element in `collection`\n * thru `iteratee` and flattening the mapped results. The iteratee is invoked\n * with three arguments: (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * function duplicate(n) {\n * return [n, n];\n * }\n *\n * _.flatMap([1, 2], duplicate);\n * // => [1, 1, 2, 2]\n */\nfunction flatMap(collection, iteratee) {\n return baseFlatten(map(collection, iteratee), 1);\n}\n\nmodule.exports = flatMap;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/flatMap.js?', + ); + + /***/ + }, + + /***/ 8156: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var baseGet = __webpack_require__(7422);\n\n/**\n * Gets the value at `path` of `object`. If the resolved value is\n * `undefined`, the `defaultValue` is returned in its place.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.get(object, 'a[0].b.c');\n * // => 3\n *\n * _.get(object, ['a', '0', 'b', 'c']);\n * // => 3\n *\n * _.get(object, 'a.b.c', 'default');\n * // => 'default'\n */\nfunction get(object, path, defaultValue) {\n var result = object == null ? undefined : baseGet(object, path);\n return result === undefined ? defaultValue : result;\n}\n\nmodule.exports = get;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/get.js?", + ); + + /***/ + }, + + /***/ 631: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var baseHasIn = __webpack_require__(8077),\n hasPath = __webpack_require__(9326);\n\n/**\n * Checks if `path` is a direct or inherited property of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.hasIn(object, 'a');\n * // => true\n *\n * _.hasIn(object, 'a.b');\n * // => true\n *\n * _.hasIn(object, ['a', 'b']);\n * // => true\n *\n * _.hasIn(object, 'b');\n * // => false\n */\nfunction hasIn(object, path) {\n return object != null && hasPath(object, path, baseHasIn);\n}\n\nmodule.exports = hasIn;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/hasIn.js?", + ); + + /***/ + }, + + /***/ 3488: /***/ (module) => { + eval( + "/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\nmodule.exports = identity;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/identity.js?", + ); + + /***/ + }, + + /***/ 2428: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var baseIsArguments = __webpack_require__(7534),\n isObjectLike = __webpack_require__(346);\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/isArguments.js?", + ); + + /***/ + }, + + /***/ 6449: /***/ (module) => { + eval( + "/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/isArray.js?", + ); + + /***/ + }, + + /***/ 4894: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var isFunction = __webpack_require__(1882),\n isLength = __webpack_require__(294);\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/isArrayLike.js?", + ); + + /***/ + }, + + /***/ 3656: /***/ (module, exports, __webpack_require__) => { + eval( + '/* module decorator */ module = __webpack_require__.nmd(module);\nvar root = __webpack_require__(9325),\n stubFalse = __webpack_require__(9935);\n\n/** Detect free variable `exports`. */\nvar freeExports = true && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && "object" == \'object\' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nmodule.exports = isBuffer;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/isBuffer.js?', + ); + + /***/ + }, + + /***/ 1882: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var baseGetTag = __webpack_require__(2552),\n isObject = __webpack_require__(3805);\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/isFunction.js?", + ); + + /***/ + }, + + /***/ 294: /***/ (module) => { + eval( + "/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/isLength.js?", + ); + + /***/ + }, + + /***/ 3805: /***/ (module) => { + eval( + "/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/isObject.js?", + ); + + /***/ + }, + + /***/ 346: /***/ (module) => { + eval( + "/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/isObjectLike.js?", + ); + + /***/ + }, + + /***/ 4394: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var baseGetTag = __webpack_require__(2552),\n isObjectLike = __webpack_require__(346);\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nmodule.exports = isSymbol;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/isSymbol.js?", + ); + + /***/ + }, + + /***/ 7167: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var baseIsTypedArray = __webpack_require__(4901),\n baseUnary = __webpack_require__(7301),\n nodeUtil = __webpack_require__(6009);\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/isTypedArray.js?', + ); + + /***/ + }, + + /***/ 5950: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var arrayLikeKeys = __webpack_require__(695),\n baseKeys = __webpack_require__(8984),\n isArrayLike = __webpack_require__(4894);\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = keys;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/keys.js?", + ); + + /***/ + }, + + /***/ 2543: /***/ function (module, exports, __webpack_require__) { + eval( + "/* module decorator */ module = __webpack_require__.nmd(module);\nvar __WEBPACK_AMD_DEFINE_RESULT__;/**\n * @license\n * Lodash <https://lodash.com/>\n * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n;(function() {\n\n /** Used as a safe reference for `undefined` in pre-ES5 environments. */\n var undefined;\n\n /** Used as the semantic version number. */\n var VERSION = '4.17.21';\n\n /** Used as the size to enable large array optimizations. */\n var LARGE_ARRAY_SIZE = 200;\n\n /** Error message constants. */\n var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.',\n FUNC_ERROR_TEXT = 'Expected a function',\n INVALID_TEMPL_VAR_ERROR_TEXT = 'Invalid `variable` option passed into `_.template`';\n\n /** Used to stand-in for `undefined` hash values. */\n var HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n /** Used as the maximum memoize cache size. */\n var MAX_MEMOIZE_SIZE = 500;\n\n /** Used as the internal argument placeholder. */\n var PLACEHOLDER = '__lodash_placeholder__';\n\n /** Used to compose bitmasks for cloning. */\n var CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n /** Used to compose bitmasks for value comparisons. */\n var COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n /** Used to compose bitmasks for function metadata. */\n var WRAP_BIND_FLAG = 1,\n WRAP_BIND_KEY_FLAG = 2,\n WRAP_CURRY_BOUND_FLAG = 4,\n WRAP_CURRY_FLAG = 8,\n WRAP_CURRY_RIGHT_FLAG = 16,\n WRAP_PARTIAL_FLAG = 32,\n WRAP_PARTIAL_RIGHT_FLAG = 64,\n WRAP_ARY_FLAG = 128,\n WRAP_REARG_FLAG = 256,\n WRAP_FLIP_FLAG = 512;\n\n /** Used as default options for `_.truncate`. */\n var DEFAULT_TRUNC_LENGTH = 30,\n DEFAULT_TRUNC_OMISSION = '...';\n\n /** Used to detect hot functions by number of calls within a span of milliseconds. */\n var HOT_COUNT = 800,\n HOT_SPAN = 16;\n\n /** Used to indicate the type of lazy iteratees. */\n var LAZY_FILTER_FLAG = 1,\n LAZY_MAP_FLAG = 2,\n LAZY_WHILE_FLAG = 3;\n\n /** Used as references for various `Number` constants. */\n var INFINITY = 1 / 0,\n MAX_SAFE_INTEGER = 9007199254740991,\n MAX_INTEGER = 1.7976931348623157e+308,\n NAN = 0 / 0;\n\n /** Used as references for the maximum length and index of an array. */\n var MAX_ARRAY_LENGTH = 4294967295,\n MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1,\n HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;\n\n /** Used to associate wrap methods with their bit flags. */\n var wrapFlags = [\n ['ary', WRAP_ARY_FLAG],\n ['bind', WRAP_BIND_FLAG],\n ['bindKey', WRAP_BIND_KEY_FLAG],\n ['curry', WRAP_CURRY_FLAG],\n ['curryRight', WRAP_CURRY_RIGHT_FLAG],\n ['flip', WRAP_FLIP_FLAG],\n ['partial', WRAP_PARTIAL_FLAG],\n ['partialRight', WRAP_PARTIAL_RIGHT_FLAG],\n ['rearg', WRAP_REARG_FLAG]\n ];\n\n /** `Object#toString` result references. */\n var argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n asyncTag = '[object AsyncFunction]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n domExcTag = '[object DOMException]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n nullTag = '[object Null]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n proxyTag = '[object Proxy]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n undefinedTag = '[object Undefined]',\n weakMapTag = '[object WeakMap]',\n weakSetTag = '[object WeakSet]';\n\n var arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n /** Used to match empty string literals in compiled template source. */\n var reEmptyStringLeading = /\\b__p \\+= '';/g,\n reEmptyStringMiddle = /\\b(__p \\+=) '' \\+/g,\n reEmptyStringTrailing = /(__e\\(.*?\\)|\\b__t\\)) \\+\\n'';/g;\n\n /** Used to match HTML entities and HTML characters. */\n var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g,\n reUnescapedHtml = /[&<>\"']/g,\n reHasEscapedHtml = RegExp(reEscapedHtml.source),\n reHasUnescapedHtml = RegExp(reUnescapedHtml.source);\n\n /** Used to match template delimiters. */\n var reEscape = /<%-([\\s\\S]+?)%>/g,\n reEvaluate = /<%([\\s\\S]+?)%>/g,\n reInterpolate = /<%=([\\s\\S]+?)%>/g;\n\n /** Used to match property names within property paths. */\n var reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n reIsPlainProp = /^\\w*$/,\n rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n /**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\n var reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g,\n reHasRegExpChar = RegExp(reRegExpChar.source);\n\n /** Used to match leading whitespace. */\n var reTrimStart = /^\\s+/;\n\n /** Used to match a single whitespace character. */\n var reWhitespace = /\\s/;\n\n /** Used to match wrap detail comments. */\n var reWrapComment = /\\{(?:\\n\\/\\* \\[wrapped with .+\\] \\*\\/)?\\n?/,\n reWrapDetails = /\\{\\n\\/\\* \\[wrapped with (.+)\\] \\*/,\n reSplitDetails = /,? & /;\n\n /** Used to match words composed of alphanumeric characters. */\n var reAsciiWord = /[^\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\x7f]+/g;\n\n /**\n * Used to validate the `validate` option in `_.template` variable.\n *\n * Forbids characters which could potentially change the meaning of the function argument definition:\n * - \"(),\" (modification of function parameters)\n * - \"=\" (default value)\n * - \"[]{}\" (destructuring of function parameters)\n * - \"/\" (beginning of a comment)\n * - whitespace\n */\n var reForbiddenIdentifierChars = /[()=,{}\\[\\]\\/\\s]/;\n\n /** Used to match backslashes in property paths. */\n var reEscapeChar = /\\\\(\\\\)?/g;\n\n /**\n * Used to match\n * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components).\n */\n var reEsTemplate = /\\$\\{([^\\\\}]*(?:\\\\.[^\\\\}]*)*)\\}/g;\n\n /** Used to match `RegExp` flags from their coerced string values. */\n var reFlags = /\\w*$/;\n\n /** Used to detect bad signed hexadecimal string values. */\n var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n /** Used to detect binary string values. */\n var reIsBinary = /^0b[01]+$/i;\n\n /** Used to detect host constructors (Safari). */\n var reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n /** Used to detect octal string values. */\n var reIsOctal = /^0o[0-7]+$/i;\n\n /** Used to detect unsigned integer values. */\n var reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n /** Used to match Latin Unicode letters (excluding mathematical operators). */\n var reLatin = /[\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\xff\\u0100-\\u017f]/g;\n\n /** Used to ensure capturing order of template delimiters. */\n var reNoMatch = /($^)/;\n\n /** Used to match unescaped characters in compiled string literals. */\n var reUnescapedString = /['\\n\\r\\u2028\\u2029\\\\]/g;\n\n /** Used to compose unicode character classes. */\n var rsAstralRange = '\\\\ud800-\\\\udfff',\n rsComboMarksRange = '\\\\u0300-\\\\u036f',\n reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,\n rsDingbatRange = '\\\\u2700-\\\\u27bf',\n rsLowerRange = 'a-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xff',\n rsMathOpRange = '\\\\xac\\\\xb1\\\\xd7\\\\xf7',\n rsNonCharRange = '\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf',\n rsPunctuationRange = '\\\\u2000-\\\\u206f',\n rsSpaceRange = ' \\\\t\\\\x0b\\\\f\\\\xa0\\\\ufeff\\\\n\\\\r\\\\u2028\\\\u2029\\\\u1680\\\\u180e\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200a\\\\u202f\\\\u205f\\\\u3000',\n rsUpperRange = 'A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde',\n rsVarRange = '\\\\ufe0e\\\\ufe0f',\n rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;\n\n /** Used to compose unicode capture groups. */\n var rsApos = \"['\\u2019]\",\n rsAstral = '[' + rsAstralRange + ']',\n rsBreak = '[' + rsBreakRange + ']',\n rsCombo = '[' + rsComboRange + ']',\n rsDigits = '\\\\d+',\n rsDingbat = '[' + rsDingbatRange + ']',\n rsLower = '[' + rsLowerRange + ']',\n rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',\n rsFitz = '\\\\ud83c[\\\\udffb-\\\\udfff]',\n rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',\n rsNonAstral = '[^' + rsAstralRange + ']',\n rsRegional = '(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}',\n rsSurrPair = '[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]',\n rsUpper = '[' + rsUpperRange + ']',\n rsZWJ = '\\\\u200d';\n\n /** Used to compose unicode regexes. */\n var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',\n rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',\n rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',\n rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',\n reOptMod = rsModifier + '?',\n rsOptVar = '[' + rsVarRange + ']?',\n rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',\n rsOrdLower = '\\\\d*(?:1st|2nd|3rd|(?![123])\\\\dth)(?=\\\\b|[A-Z_])',\n rsOrdUpper = '\\\\d*(?:1ST|2ND|3RD|(?![123])\\\\dTH)(?=\\\\b|[a-z_])',\n rsSeq = rsOptVar + reOptMod + rsOptJoin,\n rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq,\n rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';\n\n /** Used to match apostrophes. */\n var reApos = RegExp(rsApos, 'g');\n\n /**\n * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and\n * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).\n */\n var reComboMark = RegExp(rsCombo, 'g');\n\n /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */\n var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');\n\n /** Used to match complex or compound words. */\n var reUnicodeWord = RegExp([\n rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',\n rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',\n rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,\n rsUpper + '+' + rsOptContrUpper,\n rsOrdUpper,\n rsOrdLower,\n rsDigits,\n rsEmoji\n ].join('|'), 'g');\n\n /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */\n var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']');\n\n /** Used to detect strings that need a more robust regexp to match words. */\n var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;\n\n /** Used to assign default `context` object properties. */\n var contextProps = [\n 'Array', 'Buffer', 'DataView', 'Date', 'Error', 'Float32Array', 'Float64Array',\n 'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object',\n 'Promise', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', 'Uint8Array',\n 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap',\n '_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout'\n ];\n\n /** Used to make template sourceURLs easier to identify. */\n var templateCounter = -1;\n\n /** Used to identify `toStringTag` values of typed arrays. */\n var typedArrayTags = {};\n typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\n typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\n typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\n typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\n typedArrayTags[uint32Tag] = true;\n typedArrayTags[argsTag] = typedArrayTags[arrayTag] =\n typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\n typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\n typedArrayTags[errorTag] = typedArrayTags[funcTag] =\n typedArrayTags[mapTag] = typedArrayTags[numberTag] =\n typedArrayTags[objectTag] = typedArrayTags[regexpTag] =\n typedArrayTags[setTag] = typedArrayTags[stringTag] =\n typedArrayTags[weakMapTag] = false;\n\n /** Used to identify `toStringTag` values supported by `_.clone`. */\n var cloneableTags = {};\n cloneableTags[argsTag] = cloneableTags[arrayTag] =\n cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\n cloneableTags[boolTag] = cloneableTags[dateTag] =\n cloneableTags[float32Tag] = cloneableTags[float64Tag] =\n cloneableTags[int8Tag] = cloneableTags[int16Tag] =\n cloneableTags[int32Tag] = cloneableTags[mapTag] =\n cloneableTags[numberTag] = cloneableTags[objectTag] =\n cloneableTags[regexpTag] = cloneableTags[setTag] =\n cloneableTags[stringTag] = cloneableTags[symbolTag] =\n cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\n cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\n cloneableTags[errorTag] = cloneableTags[funcTag] =\n cloneableTags[weakMapTag] = false;\n\n /** Used to map Latin Unicode letters to basic Latin letters. */\n var deburredLetters = {\n // Latin-1 Supplement block.\n '\\xc0': 'A', '\\xc1': 'A', '\\xc2': 'A', '\\xc3': 'A', '\\xc4': 'A', '\\xc5': 'A',\n '\\xe0': 'a', '\\xe1': 'a', '\\xe2': 'a', '\\xe3': 'a', '\\xe4': 'a', '\\xe5': 'a',\n '\\xc7': 'C', '\\xe7': 'c',\n '\\xd0': 'D', '\\xf0': 'd',\n '\\xc8': 'E', '\\xc9': 'E', '\\xca': 'E', '\\xcb': 'E',\n '\\xe8': 'e', '\\xe9': 'e', '\\xea': 'e', '\\xeb': 'e',\n '\\xcc': 'I', '\\xcd': 'I', '\\xce': 'I', '\\xcf': 'I',\n '\\xec': 'i', '\\xed': 'i', '\\xee': 'i', '\\xef': 'i',\n '\\xd1': 'N', '\\xf1': 'n',\n '\\xd2': 'O', '\\xd3': 'O', '\\xd4': 'O', '\\xd5': 'O', '\\xd6': 'O', '\\xd8': 'O',\n '\\xf2': 'o', '\\xf3': 'o', '\\xf4': 'o', '\\xf5': 'o', '\\xf6': 'o', '\\xf8': 'o',\n '\\xd9': 'U', '\\xda': 'U', '\\xdb': 'U', '\\xdc': 'U',\n '\\xf9': 'u', '\\xfa': 'u', '\\xfb': 'u', '\\xfc': 'u',\n '\\xdd': 'Y', '\\xfd': 'y', '\\xff': 'y',\n '\\xc6': 'Ae', '\\xe6': 'ae',\n '\\xde': 'Th', '\\xfe': 'th',\n '\\xdf': 'ss',\n // Latin Extended-A block.\n '\\u0100': 'A', '\\u0102': 'A', '\\u0104': 'A',\n '\\u0101': 'a', '\\u0103': 'a', '\\u0105': 'a',\n '\\u0106': 'C', '\\u0108': 'C', '\\u010a': 'C', '\\u010c': 'C',\n '\\u0107': 'c', '\\u0109': 'c', '\\u010b': 'c', '\\u010d': 'c',\n '\\u010e': 'D', '\\u0110': 'D', '\\u010f': 'd', '\\u0111': 'd',\n '\\u0112': 'E', '\\u0114': 'E', '\\u0116': 'E', '\\u0118': 'E', '\\u011a': 'E',\n '\\u0113': 'e', '\\u0115': 'e', '\\u0117': 'e', '\\u0119': 'e', '\\u011b': 'e',\n '\\u011c': 'G', '\\u011e': 'G', '\\u0120': 'G', '\\u0122': 'G',\n '\\u011d': 'g', '\\u011f': 'g', '\\u0121': 'g', '\\u0123': 'g',\n '\\u0124': 'H', '\\u0126': 'H', '\\u0125': 'h', '\\u0127': 'h',\n '\\u0128': 'I', '\\u012a': 'I', '\\u012c': 'I', '\\u012e': 'I', '\\u0130': 'I',\n '\\u0129': 'i', '\\u012b': 'i', '\\u012d': 'i', '\\u012f': 'i', '\\u0131': 'i',\n '\\u0134': 'J', '\\u0135': 'j',\n '\\u0136': 'K', '\\u0137': 'k', '\\u0138': 'k',\n '\\u0139': 'L', '\\u013b': 'L', '\\u013d': 'L', '\\u013f': 'L', '\\u0141': 'L',\n '\\u013a': 'l', '\\u013c': 'l', '\\u013e': 'l', '\\u0140': 'l', '\\u0142': 'l',\n '\\u0143': 'N', '\\u0145': 'N', '\\u0147': 'N', '\\u014a': 'N',\n '\\u0144': 'n', '\\u0146': 'n', '\\u0148': 'n', '\\u014b': 'n',\n '\\u014c': 'O', '\\u014e': 'O', '\\u0150': 'O',\n '\\u014d': 'o', '\\u014f': 'o', '\\u0151': 'o',\n '\\u0154': 'R', '\\u0156': 'R', '\\u0158': 'R',\n '\\u0155': 'r', '\\u0157': 'r', '\\u0159': 'r',\n '\\u015a': 'S', '\\u015c': 'S', '\\u015e': 'S', '\\u0160': 'S',\n '\\u015b': 's', '\\u015d': 's', '\\u015f': 's', '\\u0161': 's',\n '\\u0162': 'T', '\\u0164': 'T', '\\u0166': 'T',\n '\\u0163': 't', '\\u0165': 't', '\\u0167': 't',\n '\\u0168': 'U', '\\u016a': 'U', '\\u016c': 'U', '\\u016e': 'U', '\\u0170': 'U', '\\u0172': 'U',\n '\\u0169': 'u', '\\u016b': 'u', '\\u016d': 'u', '\\u016f': 'u', '\\u0171': 'u', '\\u0173': 'u',\n '\\u0174': 'W', '\\u0175': 'w',\n '\\u0176': 'Y', '\\u0177': 'y', '\\u0178': 'Y',\n '\\u0179': 'Z', '\\u017b': 'Z', '\\u017d': 'Z',\n '\\u017a': 'z', '\\u017c': 'z', '\\u017e': 'z',\n '\\u0132': 'IJ', '\\u0133': 'ij',\n '\\u0152': 'Oe', '\\u0153': 'oe',\n '\\u0149': \"'n\", '\\u017f': 's'\n };\n\n /** Used to map characters to HTML entities. */\n var htmlEscapes = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": '''\n };\n\n /** Used to map HTML entities to characters. */\n var htmlUnescapes = {\n '&': '&',\n '<': '<',\n '>': '>',\n '"': '\"',\n ''': \"'\"\n };\n\n /** Used to escape characters for inclusion in compiled string literals. */\n var stringEscapes = {\n '\\\\': '\\\\',\n \"'\": \"'\",\n '\\n': 'n',\n '\\r': 'r',\n '\\u2028': 'u2028',\n '\\u2029': 'u2029'\n };\n\n /** Built-in method references without a dependency on `root`. */\n var freeParseFloat = parseFloat,\n freeParseInt = parseInt;\n\n /** Detect free variable `global` from Node.js. */\n var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n /** Detect free variable `self`. */\n var freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n /** Used as a reference to the global object. */\n var root = freeGlobal || freeSelf || Function('return this')();\n\n /** Detect free variable `exports`. */\n var freeExports = true && exports && !exports.nodeType && exports;\n\n /** Detect free variable `module`. */\n var freeModule = freeExports && \"object\" == 'object' && module && !module.nodeType && module;\n\n /** Detect the popular CommonJS extension `module.exports`. */\n var moduleExports = freeModule && freeModule.exports === freeExports;\n\n /** Detect free variable `process` from Node.js. */\n var freeProcess = moduleExports && freeGlobal.process;\n\n /** Used to access faster Node.js helpers. */\n var nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n }());\n\n /* Node.js helper references. */\n var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer,\n nodeIsDate = nodeUtil && nodeUtil.isDate,\n nodeIsMap = nodeUtil && nodeUtil.isMap,\n nodeIsRegExp = nodeUtil && nodeUtil.isRegExp,\n nodeIsSet = nodeUtil && nodeUtil.isSet,\n nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n /*--------------------------------------------------------------------------*/\n\n /**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\n function apply(func, thisArg, args) {\n switch (args.length) {\n case 0: return func.call(thisArg);\n case 1: return func.call(thisArg, args[0]);\n case 2: return func.call(thisArg, args[0], args[1]);\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\n }\n return func.apply(thisArg, args);\n }\n\n /**\n * A specialized version of `baseAggregator` for arrays.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform keys.\n * @param {Object} accumulator The initial aggregated object.\n * @returns {Function} Returns `accumulator`.\n */\n function arrayAggregator(array, setter, iteratee, accumulator) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n var value = array[index];\n setter(accumulator, value, iteratee(value), array);\n }\n return accumulator;\n }\n\n /**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\n function arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n }\n\n /**\n * A specialized version of `_.forEachRight` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\n function arrayEachRight(array, iteratee) {\n var length = array == null ? 0 : array.length;\n\n while (length--) {\n if (iteratee(array[length], length, array) === false) {\n break;\n }\n }\n return array;\n }\n\n /**\n * A specialized version of `_.every` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\n * else `false`.\n */\n function arrayEvery(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (!predicate(array[index], index, array)) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\n function arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n }\n\n /**\n * A specialized version of `_.includes` for arrays without support for\n * specifying an index to search from.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\n function arrayIncludes(array, value) {\n var length = array == null ? 0 : array.length;\n return !!length && baseIndexOf(array, value, 0) > -1;\n }\n\n /**\n * This function is like `arrayIncludes` except that it accepts a comparator.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @param {Function} comparator The comparator invoked per element.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\n function arrayIncludesWith(array, value, comparator) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (comparator(value, array[index])) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\n function arrayMap(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length,\n result = Array(length);\n\n while (++index < length) {\n result[index] = iteratee(array[index], index, array);\n }\n return result;\n }\n\n /**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\n function arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n }\n\n /**\n * A specialized version of `_.reduce` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @param {boolean} [initAccum] Specify using the first element of `array` as\n * the initial value.\n * @returns {*} Returns the accumulated value.\n */\n function arrayReduce(array, iteratee, accumulator, initAccum) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n if (initAccum && length) {\n accumulator = array[++index];\n }\n while (++index < length) {\n accumulator = iteratee(accumulator, array[index], index, array);\n }\n return accumulator;\n }\n\n /**\n * A specialized version of `_.reduceRight` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @param {boolean} [initAccum] Specify using the last element of `array` as\n * the initial value.\n * @returns {*} Returns the accumulated value.\n */\n function arrayReduceRight(array, iteratee, accumulator, initAccum) {\n var length = array == null ? 0 : array.length;\n if (initAccum && length) {\n accumulator = array[--length];\n }\n while (length--) {\n accumulator = iteratee(accumulator, array[length], length, array);\n }\n return accumulator;\n }\n\n /**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\n function arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * Gets the size of an ASCII `string`.\n *\n * @private\n * @param {string} string The string inspect.\n * @returns {number} Returns the string size.\n */\n var asciiSize = baseProperty('length');\n\n /**\n * Converts an ASCII `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\n function asciiToArray(string) {\n return string.split('');\n }\n\n /**\n * Splits an ASCII `string` into an array of its words.\n *\n * @private\n * @param {string} The string to inspect.\n * @returns {Array} Returns the words of `string`.\n */\n function asciiWords(string) {\n return string.match(reAsciiWord) || [];\n }\n\n /**\n * The base implementation of methods like `_.findKey` and `_.findLastKey`,\n * without support for iteratee shorthands, which iterates over `collection`\n * using `eachFunc`.\n *\n * @private\n * @param {Array|Object} collection The collection to inspect.\n * @param {Function} predicate The function invoked per iteration.\n * @param {Function} eachFunc The function to iterate over `collection`.\n * @returns {*} Returns the found element or its key, else `undefined`.\n */\n function baseFindKey(collection, predicate, eachFunc) {\n var result;\n eachFunc(collection, function(value, key, collection) {\n if (predicate(value, key, collection)) {\n result = key;\n return false;\n }\n });\n return result;\n }\n\n /**\n * The base implementation of `_.findIndex` and `_.findLastIndex` without\n * support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} predicate The function invoked per iteration.\n * @param {number} fromIndex The index to search from.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function baseFindIndex(array, predicate, fromIndex, fromRight) {\n var length = array.length,\n index = fromIndex + (fromRight ? 1 : -1);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (predicate(array[index], index, array)) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * The base implementation of `_.indexOf` without `fromIndex` bounds checks.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function baseIndexOf(array, value, fromIndex) {\n return value === value\n ? strictIndexOf(array, value, fromIndex)\n : baseFindIndex(array, baseIsNaN, fromIndex);\n }\n\n /**\n * This function is like `baseIndexOf` except that it accepts a comparator.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @param {Function} comparator The comparator invoked per element.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function baseIndexOfWith(array, value, fromIndex, comparator) {\n var index = fromIndex - 1,\n length = array.length;\n\n while (++index < length) {\n if (comparator(array[index], value)) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * The base implementation of `_.isNaN` without support for number objects.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n */\n function baseIsNaN(value) {\n return value !== value;\n }\n\n /**\n * The base implementation of `_.mean` and `_.meanBy` without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {number} Returns the mean.\n */\n function baseMean(array, iteratee) {\n var length = array == null ? 0 : array.length;\n return length ? (baseSum(array, iteratee) / length) : NAN;\n }\n\n /**\n * The base implementation of `_.property` without support for deep paths.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\n function baseProperty(key) {\n return function(object) {\n return object == null ? undefined : object[key];\n };\n }\n\n /**\n * The base implementation of `_.propertyOf` without support for deep paths.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Function} Returns the new accessor function.\n */\n function basePropertyOf(object) {\n return function(key) {\n return object == null ? undefined : object[key];\n };\n }\n\n /**\n * The base implementation of `_.reduce` and `_.reduceRight`, without support\n * for iteratee shorthands, which iterates over `collection` using `eachFunc`.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} accumulator The initial value.\n * @param {boolean} initAccum Specify using the first or last element of\n * `collection` as the initial value.\n * @param {Function} eachFunc The function to iterate over `collection`.\n * @returns {*} Returns the accumulated value.\n */\n function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {\n eachFunc(collection, function(value, index, collection) {\n accumulator = initAccum\n ? (initAccum = false, value)\n : iteratee(accumulator, value, index, collection);\n });\n return accumulator;\n }\n\n /**\n * The base implementation of `_.sortBy` which uses `comparer` to define the\n * sort order of `array` and replaces criteria objects with their corresponding\n * values.\n *\n * @private\n * @param {Array} array The array to sort.\n * @param {Function} comparer The function to define sort order.\n * @returns {Array} Returns `array`.\n */\n function baseSortBy(array, comparer) {\n var length = array.length;\n\n array.sort(comparer);\n while (length--) {\n array[length] = array[length].value;\n }\n return array;\n }\n\n /**\n * The base implementation of `_.sum` and `_.sumBy` without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {number} Returns the sum.\n */\n function baseSum(array, iteratee) {\n var result,\n index = -1,\n length = array.length;\n\n while (++index < length) {\n var current = iteratee(array[index]);\n if (current !== undefined) {\n result = result === undefined ? current : (result + current);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\n function baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n }\n\n /**\n * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array\n * of key-value pairs for `object` corresponding to the property names of `props`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array} props The property names to get values for.\n * @returns {Object} Returns the key-value pairs.\n */\n function baseToPairs(object, props) {\n return arrayMap(props, function(key) {\n return [key, object[key]];\n });\n }\n\n /**\n * The base implementation of `_.trim`.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} Returns the trimmed string.\n */\n function baseTrim(string) {\n return string\n ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n : string;\n }\n\n /**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\n function baseUnary(func) {\n return function(value) {\n return func(value);\n };\n }\n\n /**\n * The base implementation of `_.values` and `_.valuesIn` which creates an\n * array of `object` property values corresponding to the property names\n * of `props`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array} props The property names to get values for.\n * @returns {Object} Returns the array of property values.\n */\n function baseValues(object, props) {\n return arrayMap(props, function(key) {\n return object[key];\n });\n }\n\n /**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function cacheHas(cache, key) {\n return cache.has(key);\n }\n\n /**\n * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol\n * that is not found in the character symbols.\n *\n * @private\n * @param {Array} strSymbols The string symbols to inspect.\n * @param {Array} chrSymbols The character symbols to find.\n * @returns {number} Returns the index of the first unmatched string symbol.\n */\n function charsStartIndex(strSymbols, chrSymbols) {\n var index = -1,\n length = strSymbols.length;\n\n while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}\n return index;\n }\n\n /**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol\n * that is not found in the character symbols.\n *\n * @private\n * @param {Array} strSymbols The string symbols to inspect.\n * @param {Array} chrSymbols The character symbols to find.\n * @returns {number} Returns the index of the last unmatched string symbol.\n */\n function charsEndIndex(strSymbols, chrSymbols) {\n var index = strSymbols.length;\n\n while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}\n return index;\n }\n\n /**\n * Gets the number of `placeholder` occurrences in `array`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} placeholder The placeholder to search for.\n * @returns {number} Returns the placeholder count.\n */\n function countHolders(array, placeholder) {\n var length = array.length,\n result = 0;\n\n while (length--) {\n if (array[length] === placeholder) {\n ++result;\n }\n }\n return result;\n }\n\n /**\n * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A\n * letters to basic Latin letters.\n *\n * @private\n * @param {string} letter The matched letter to deburr.\n * @returns {string} Returns the deburred letter.\n */\n var deburrLetter = basePropertyOf(deburredLetters);\n\n /**\n * Used by `_.escape` to convert characters to HTML entities.\n *\n * @private\n * @param {string} chr The matched character to escape.\n * @returns {string} Returns the escaped character.\n */\n var escapeHtmlChar = basePropertyOf(htmlEscapes);\n\n /**\n * Used by `_.template` to escape characters for inclusion in compiled string literals.\n *\n * @private\n * @param {string} chr The matched character to escape.\n * @returns {string} Returns the escaped character.\n */\n function escapeStringChar(chr) {\n return '\\\\' + stringEscapes[chr];\n }\n\n /**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\n function getValue(object, key) {\n return object == null ? undefined : object[key];\n }\n\n /**\n * Checks if `string` contains Unicode symbols.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {boolean} Returns `true` if a symbol is found, else `false`.\n */\n function hasUnicode(string) {\n return reHasUnicode.test(string);\n }\n\n /**\n * Checks if `string` contains a word composed of Unicode symbols.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {boolean} Returns `true` if a word is found, else `false`.\n */\n function hasUnicodeWord(string) {\n return reHasUnicodeWord.test(string);\n }\n\n /**\n * Converts `iterator` to an array.\n *\n * @private\n * @param {Object} iterator The iterator to convert.\n * @returns {Array} Returns the converted array.\n */\n function iteratorToArray(iterator) {\n var data,\n result = [];\n\n while (!(data = iterator.next()).done) {\n result.push(data.value);\n }\n return result;\n }\n\n /**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\n function mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n }\n\n /**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\n function overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n }\n\n /**\n * Replaces all `placeholder` elements in `array` with an internal placeholder\n * and returns an array of their indexes.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {*} placeholder The placeholder to replace.\n * @returns {Array} Returns the new array of placeholder indexes.\n */\n function replaceHolders(array, placeholder) {\n var index = -1,\n length = array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (value === placeholder || value === PLACEHOLDER) {\n array[index] = PLACEHOLDER;\n result[resIndex++] = index;\n }\n }\n return result;\n }\n\n /**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\n function setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n }\n\n /**\n * Converts `set` to its value-value pairs.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the value-value pairs.\n */\n function setToPairs(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = [value, value];\n });\n return result;\n }\n\n /**\n * A specialized version of `_.indexOf` which performs strict equality\n * comparisons of values, i.e. `===`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function strictIndexOf(array, value, fromIndex) {\n var index = fromIndex - 1,\n length = array.length;\n\n while (++index < length) {\n if (array[index] === value) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * A specialized version of `_.lastIndexOf` which performs strict equality\n * comparisons of values, i.e. `===`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function strictLastIndexOf(array, value, fromIndex) {\n var index = fromIndex + 1;\n while (index--) {\n if (array[index] === value) {\n return index;\n }\n }\n return index;\n }\n\n /**\n * Gets the number of symbols in `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the string size.\n */\n function stringSize(string) {\n return hasUnicode(string)\n ? unicodeSize(string)\n : asciiSize(string);\n }\n\n /**\n * Converts `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\n function stringToArray(string) {\n return hasUnicode(string)\n ? unicodeToArray(string)\n : asciiToArray(string);\n }\n\n /**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the last non-whitespace character.\n */\n function trimmedEndIndex(string) {\n var index = string.length;\n\n while (index-- && reWhitespace.test(string.charAt(index))) {}\n return index;\n }\n\n /**\n * Used by `_.unescape` to convert HTML entities to characters.\n *\n * @private\n * @param {string} chr The matched character to unescape.\n * @returns {string} Returns the unescaped character.\n */\n var unescapeHtmlChar = basePropertyOf(htmlUnescapes);\n\n /**\n * Gets the size of a Unicode `string`.\n *\n * @private\n * @param {string} string The string inspect.\n * @returns {number} Returns the string size.\n */\n function unicodeSize(string) {\n var result = reUnicode.lastIndex = 0;\n while (reUnicode.test(string)) {\n ++result;\n }\n return result;\n }\n\n /**\n * Converts a Unicode `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\n function unicodeToArray(string) {\n return string.match(reUnicode) || [];\n }\n\n /**\n * Splits a Unicode `string` into an array of its words.\n *\n * @private\n * @param {string} The string to inspect.\n * @returns {Array} Returns the words of `string`.\n */\n function unicodeWords(string) {\n return string.match(reUnicodeWord) || [];\n }\n\n /*--------------------------------------------------------------------------*/\n\n /**\n * Create a new pristine `lodash` function using the `context` object.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category Util\n * @param {Object} [context=root] The context object.\n * @returns {Function} Returns a new `lodash` function.\n * @example\n *\n * _.mixin({ 'foo': _.constant('foo') });\n *\n * var lodash = _.runInContext();\n * lodash.mixin({ 'bar': lodash.constant('bar') });\n *\n * _.isFunction(_.foo);\n * // => true\n * _.isFunction(_.bar);\n * // => false\n *\n * lodash.isFunction(lodash.foo);\n * // => false\n * lodash.isFunction(lodash.bar);\n * // => true\n *\n * // Create a suped-up `defer` in Node.js.\n * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer;\n */\n var runInContext = (function runInContext(context) {\n context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps));\n\n /** Built-in constructor references. */\n var Array = context.Array,\n Date = context.Date,\n Error = context.Error,\n Function = context.Function,\n Math = context.Math,\n Object = context.Object,\n RegExp = context.RegExp,\n String = context.String,\n TypeError = context.TypeError;\n\n /** Used for built-in method references. */\n var arrayProto = Array.prototype,\n funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n /** Used to detect overreaching core-js shims. */\n var coreJsData = context['__core-js_shared__'];\n\n /** Used to resolve the decompiled source of functions. */\n var funcToString = funcProto.toString;\n\n /** Used to check objects for own properties. */\n var hasOwnProperty = objectProto.hasOwnProperty;\n\n /** Used to generate unique IDs. */\n var idCounter = 0;\n\n /** Used to detect methods masquerading as native. */\n var maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n }());\n\n /**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\n var nativeObjectToString = objectProto.toString;\n\n /** Used to infer the `Object` constructor. */\n var objectCtorString = funcToString.call(Object);\n\n /** Used to restore the original `_` reference in `_.noConflict`. */\n var oldDash = root._;\n\n /** Used to detect if a method is native. */\n var reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n );\n\n /** Built-in value references. */\n var Buffer = moduleExports ? context.Buffer : undefined,\n Symbol = context.Symbol,\n Uint8Array = context.Uint8Array,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined,\n getPrototype = overArg(Object.getPrototypeOf, Object),\n objectCreate = Object.create,\n propertyIsEnumerable = objectProto.propertyIsEnumerable,\n splice = arrayProto.splice,\n spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined,\n symIterator = Symbol ? Symbol.iterator : undefined,\n symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n var defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n }());\n\n /** Mocked built-ins. */\n var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout,\n ctxNow = Date && Date.now !== root.Date.now && Date.now,\n ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;\n\n /* Built-in method references for those with the same name as other `lodash` methods. */\n var nativeCeil = Math.ceil,\n nativeFloor = Math.floor,\n nativeGetSymbols = Object.getOwnPropertySymbols,\n nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,\n nativeIsFinite = context.isFinite,\n nativeJoin = arrayProto.join,\n nativeKeys = overArg(Object.keys, Object),\n nativeMax = Math.max,\n nativeMin = Math.min,\n nativeNow = Date.now,\n nativeParseInt = context.parseInt,\n nativeRandom = Math.random,\n nativeReverse = arrayProto.reverse;\n\n /* Built-in method references that are verified to be native. */\n var DataView = getNative(context, 'DataView'),\n Map = getNative(context, 'Map'),\n Promise = getNative(context, 'Promise'),\n Set = getNative(context, 'Set'),\n WeakMap = getNative(context, 'WeakMap'),\n nativeCreate = getNative(Object, 'create');\n\n /** Used to store function metadata. */\n var metaMap = WeakMap && new WeakMap;\n\n /** Used to lookup unminified function names. */\n var realNames = {};\n\n /** Used to detect maps, sets, and weakmaps. */\n var dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n /** Used to convert symbols to primitives and strings. */\n var symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a `lodash` object which wraps `value` to enable implicit method\n * chain sequences. Methods that operate on and return arrays, collections,\n * and functions can be chained together. Methods that retrieve a single value\n * or may return a primitive value will automatically end the chain sequence\n * and return the unwrapped value. Otherwise, the value must be unwrapped\n * with `_#value`.\n *\n * Explicit chain sequences, which must be unwrapped with `_#value`, may be\n * enabled using `_.chain`.\n *\n * The execution of chained methods is lazy, that is, it's deferred until\n * `_#value` is implicitly or explicitly called.\n *\n * Lazy evaluation allows several methods to support shortcut fusion.\n * Shortcut fusion is an optimization to merge iteratee calls; this avoids\n * the creation of intermediate arrays and can greatly reduce the number of\n * iteratee executions. Sections of a chain sequence qualify for shortcut\n * fusion if the section is applied to an array and iteratees accept only\n * one argument. The heuristic for whether a section qualifies for shortcut\n * fusion is subject to change.\n *\n * Chaining is supported in custom builds as long as the `_#value` method is\n * directly or indirectly included in the build.\n *\n * In addition to lodash methods, wrappers have `Array` and `String` methods.\n *\n * The wrapper `Array` methods are:\n * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`\n *\n * The wrapper `String` methods are:\n * `replace` and `split`\n *\n * The wrapper methods that support shortcut fusion are:\n * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,\n * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,\n * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`\n *\n * The chainable wrapper methods are:\n * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,\n * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,\n * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,\n * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,\n * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,\n * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,\n * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,\n * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,\n * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,\n * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,\n * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,\n * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,\n * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,\n * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,\n * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,\n * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,\n * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,\n * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,\n * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,\n * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,\n * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,\n * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,\n * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,\n * `zipObject`, `zipObjectDeep`, and `zipWith`\n *\n * The wrapper methods that are **not** chainable by default are:\n * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,\n * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`,\n * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`,\n * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,\n * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`,\n * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,\n * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,\n * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`,\n * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`,\n * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`,\n * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,\n * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,\n * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`,\n * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`,\n * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,\n * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`,\n * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,\n * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,\n * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,\n * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`,\n * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`,\n * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,\n * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`,\n * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`,\n * `upperFirst`, `value`, and `words`\n *\n * @name _\n * @constructor\n * @category Seq\n * @param {*} value The value to wrap in a `lodash` instance.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * var wrapped = _([1, 2, 3]);\n *\n * // Returns an unwrapped value.\n * wrapped.reduce(_.add);\n * // => 6\n *\n * // Returns a wrapped value.\n * var squares = wrapped.map(square);\n *\n * _.isArray(squares);\n * // => false\n *\n * _.isArray(squares.value());\n * // => true\n */\n function lodash(value) {\n if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {\n if (value instanceof LodashWrapper) {\n return value;\n }\n if (hasOwnProperty.call(value, '__wrapped__')) {\n return wrapperClone(value);\n }\n }\n return new LodashWrapper(value);\n }\n\n /**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\n var baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n }());\n\n /**\n * The function whose prototype chain sequence wrappers inherit from.\n *\n * @private\n */\n function baseLodash() {\n // No operation performed.\n }\n\n /**\n * The base constructor for creating `lodash` wrapper objects.\n *\n * @private\n * @param {*} value The value to wrap.\n * @param {boolean} [chainAll] Enable explicit method chain sequences.\n */\n function LodashWrapper(value, chainAll) {\n this.__wrapped__ = value;\n this.__actions__ = [];\n this.__chain__ = !!chainAll;\n this.__index__ = 0;\n this.__values__ = undefined;\n }\n\n /**\n * By default, the template delimiters used by lodash are like those in\n * embedded Ruby (ERB) as well as ES2015 template strings. Change the\n * following template settings to use alternative delimiters.\n *\n * @static\n * @memberOf _\n * @type {Object}\n */\n lodash.templateSettings = {\n\n /**\n * Used to detect `data` property values to be HTML-escaped.\n *\n * @memberOf _.templateSettings\n * @type {RegExp}\n */\n 'escape': reEscape,\n\n /**\n * Used to detect code to be evaluated.\n *\n * @memberOf _.templateSettings\n * @type {RegExp}\n */\n 'evaluate': reEvaluate,\n\n /**\n * Used to detect `data` property values to inject.\n *\n * @memberOf _.templateSettings\n * @type {RegExp}\n */\n 'interpolate': reInterpolate,\n\n /**\n * Used to reference the data object in the template text.\n *\n * @memberOf _.templateSettings\n * @type {string}\n */\n 'variable': '',\n\n /**\n * Used to import variables into the compiled template.\n *\n * @memberOf _.templateSettings\n * @type {Object}\n */\n 'imports': {\n\n /**\n * A reference to the `lodash` function.\n *\n * @memberOf _.templateSettings.imports\n * @type {Function}\n */\n '_': lodash\n }\n };\n\n // Ensure wrappers are instances of `baseLodash`.\n lodash.prototype = baseLodash.prototype;\n lodash.prototype.constructor = lodash;\n\n LodashWrapper.prototype = baseCreate(baseLodash.prototype);\n LodashWrapper.prototype.constructor = LodashWrapper;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.\n *\n * @private\n * @constructor\n * @param {*} value The value to wrap.\n */\n function LazyWrapper(value) {\n this.__wrapped__ = value;\n this.__actions__ = [];\n this.__dir__ = 1;\n this.__filtered__ = false;\n this.__iteratees__ = [];\n this.__takeCount__ = MAX_ARRAY_LENGTH;\n this.__views__ = [];\n }\n\n /**\n * Creates a clone of the lazy wrapper object.\n *\n * @private\n * @name clone\n * @memberOf LazyWrapper\n * @returns {Object} Returns the cloned `LazyWrapper` object.\n */\n function lazyClone() {\n var result = new LazyWrapper(this.__wrapped__);\n result.__actions__ = copyArray(this.__actions__);\n result.__dir__ = this.__dir__;\n result.__filtered__ = this.__filtered__;\n result.__iteratees__ = copyArray(this.__iteratees__);\n result.__takeCount__ = this.__takeCount__;\n result.__views__ = copyArray(this.__views__);\n return result;\n }\n\n /**\n * Reverses the direction of lazy iteration.\n *\n * @private\n * @name reverse\n * @memberOf LazyWrapper\n * @returns {Object} Returns the new reversed `LazyWrapper` object.\n */\n function lazyReverse() {\n if (this.__filtered__) {\n var result = new LazyWrapper(this);\n result.__dir__ = -1;\n result.__filtered__ = true;\n } else {\n result = this.clone();\n result.__dir__ *= -1;\n }\n return result;\n }\n\n /**\n * Extracts the unwrapped value from its lazy wrapper.\n *\n * @private\n * @name value\n * @memberOf LazyWrapper\n * @returns {*} Returns the unwrapped value.\n */\n function lazyValue() {\n var array = this.__wrapped__.value(),\n dir = this.__dir__,\n isArr = isArray(array),\n isRight = dir < 0,\n arrLength = isArr ? array.length : 0,\n view = getView(0, arrLength, this.__views__),\n start = view.start,\n end = view.end,\n length = end - start,\n index = isRight ? end : (start - 1),\n iteratees = this.__iteratees__,\n iterLength = iteratees.length,\n resIndex = 0,\n takeCount = nativeMin(length, this.__takeCount__);\n\n if (!isArr || (!isRight && arrLength == length && takeCount == length)) {\n return baseWrapperValue(array, this.__actions__);\n }\n var result = [];\n\n outer:\n while (length-- && resIndex < takeCount) {\n index += dir;\n\n var iterIndex = -1,\n value = array[index];\n\n while (++iterIndex < iterLength) {\n var data = iteratees[iterIndex],\n iteratee = data.iteratee,\n type = data.type,\n computed = iteratee(value);\n\n if (type == LAZY_MAP_FLAG) {\n value = computed;\n } else if (!computed) {\n if (type == LAZY_FILTER_FLAG) {\n continue outer;\n } else {\n break outer;\n }\n }\n }\n result[resIndex++] = value;\n }\n return result;\n }\n\n // Ensure `LazyWrapper` is an instance of `baseLodash`.\n LazyWrapper.prototype = baseCreate(baseLodash.prototype);\n LazyWrapper.prototype.constructor = LazyWrapper;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\n function Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n }\n\n /**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\n function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }\n\n /**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\n function hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n }\n\n /**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\n function hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n }\n\n /**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n }\n\n /**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\n function hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n }\n\n // Add methods to `Hash`.\n Hash.prototype.clear = hashClear;\n Hash.prototype['delete'] = hashDelete;\n Hash.prototype.get = hashGet;\n Hash.prototype.has = hashHas;\n Hash.prototype.set = hashSet;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\n function ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n }\n\n /**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\n function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }\n\n /**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\n function listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n }\n\n /**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\n function listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n }\n\n /**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n }\n\n /**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\n function listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n }\n\n // Add methods to `ListCache`.\n ListCache.prototype.clear = listCacheClear;\n ListCache.prototype['delete'] = listCacheDelete;\n ListCache.prototype.get = listCacheGet;\n ListCache.prototype.has = listCacheHas;\n ListCache.prototype.set = listCacheSet;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\n function MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n }\n\n /**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\n function mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n }\n\n /**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\n function mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n }\n\n /**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\n function mapCacheGet(key) {\n return getMapData(this, key).get(key);\n }\n\n /**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function mapCacheHas(key) {\n return getMapData(this, key).has(key);\n }\n\n /**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\n function mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n }\n\n // Add methods to `MapCache`.\n MapCache.prototype.clear = mapCacheClear;\n MapCache.prototype['delete'] = mapCacheDelete;\n MapCache.prototype.get = mapCacheGet;\n MapCache.prototype.has = mapCacheHas;\n MapCache.prototype.set = mapCacheSet;\n\n /*------------------------------------------------------------------------*/\n\n /**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\n function SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n }\n\n /**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\n function setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n }\n\n /**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\n function setCacheHas(value) {\n return this.__data__.has(value);\n }\n\n // Add methods to `SetCache`.\n SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\n SetCache.prototype.has = setCacheHas;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\n function Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n }\n\n /**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\n function stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n }\n\n /**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\n function stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n }\n\n /**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\n function stackGet(key) {\n return this.__data__.get(key);\n }\n\n /**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function stackHas(key) {\n return this.__data__.has(key);\n }\n\n /**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\n function stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n }\n\n // Add methods to `Stack`.\n Stack.prototype.clear = stackClear;\n Stack.prototype['delete'] = stackDelete;\n Stack.prototype.get = stackGet;\n Stack.prototype.has = stackHas;\n Stack.prototype.set = stackSet;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\n function arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n }\n\n /**\n * A specialized version of `_.sample` for arrays.\n *\n * @private\n * @param {Array} array The array to sample.\n * @returns {*} Returns the random element.\n */\n function arraySample(array) {\n var length = array.length;\n return length ? array[baseRandom(0, length - 1)] : undefined;\n }\n\n /**\n * A specialized version of `_.sampleSize` for arrays.\n *\n * @private\n * @param {Array} array The array to sample.\n * @param {number} n The number of elements to sample.\n * @returns {Array} Returns the random elements.\n */\n function arraySampleSize(array, n) {\n return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length));\n }\n\n /**\n * A specialized version of `_.shuffle` for arrays.\n *\n * @private\n * @param {Array} array The array to shuffle.\n * @returns {Array} Returns the new shuffled array.\n */\n function arrayShuffle(array) {\n return shuffleSelf(copyArray(array));\n }\n\n /**\n * This function is like `assignValue` except that it doesn't assign\n * `undefined` values.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\n function assignMergeValue(object, key, value) {\n if ((value !== undefined && !eq(object[key], value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n }\n\n /**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\n function assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n }\n\n /**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n }\n\n /**\n * Aggregates elements of `collection` on `accumulator` with keys transformed\n * by `iteratee` and values set by `setter`.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform keys.\n * @param {Object} accumulator The initial aggregated object.\n * @returns {Function} Returns `accumulator`.\n */\n function baseAggregator(collection, setter, iteratee, accumulator) {\n baseEach(collection, function(value, key, collection) {\n setter(accumulator, value, iteratee(value), collection);\n });\n return accumulator;\n }\n\n /**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\n function baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n }\n\n /**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\n function baseAssignIn(object, source) {\n return object && copyObject(source, keysIn(source), object);\n }\n\n /**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\n function baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n }\n\n /**\n * The base implementation of `_.at` without support for individual paths.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {string[]} paths The property paths to pick.\n * @returns {Array} Returns the picked elements.\n */\n function baseAt(object, paths) {\n var index = -1,\n length = paths.length,\n result = Array(length),\n skip = object == null;\n\n while (++index < length) {\n result[index] = skip ? undefined : get(object, paths[index]);\n }\n return result;\n }\n\n /**\n * The base implementation of `_.clamp` which doesn't coerce arguments.\n *\n * @private\n * @param {number} number The number to clamp.\n * @param {number} [lower] The lower bound.\n * @param {number} upper The upper bound.\n * @returns {number} Returns the clamped number.\n */\n function baseClamp(number, lower, upper) {\n if (number === number) {\n if (upper !== undefined) {\n number = number <= upper ? number : upper;\n }\n if (lower !== undefined) {\n number = number >= lower ? number : lower;\n }\n }\n return number;\n }\n\n /**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\n function baseClone(value, bitmask, customizer, key, object, stack) {\n var result,\n isDeep = bitmask & CLONE_DEEP_FLAG,\n isFlat = bitmask & CLONE_FLAT_FLAG,\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\n if (!isDeep) {\n return isFlat\n ? copySymbolsIn(value, baseAssignIn(result, value))\n : copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (isSet(value)) {\n value.forEach(function(subValue) {\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n });\n } else if (isMap(value)) {\n value.forEach(function(subValue, key) {\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n }\n\n var keysFunc = isFull\n ? (isFlat ? getAllKeysIn : getAllKeys)\n : (isFlat ? keysIn : keys);\n\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n }\n\n /**\n * The base implementation of `_.conforms` which doesn't clone `source`.\n *\n * @private\n * @param {Object} source The object of property predicates to conform to.\n * @returns {Function} Returns the new spec function.\n */\n function baseConforms(source) {\n var props = keys(source);\n return function(object) {\n return baseConformsTo(object, source, props);\n };\n }\n\n /**\n * The base implementation of `_.conformsTo` which accepts `props` to check.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property predicates to conform to.\n * @returns {boolean} Returns `true` if `object` conforms, else `false`.\n */\n function baseConformsTo(object, source, props) {\n var length = props.length;\n if (object == null) {\n return !length;\n }\n object = Object(object);\n while (length--) {\n var key = props[length],\n predicate = source[key],\n value = object[key];\n\n if ((value === undefined && !(key in object)) || !predicate(value)) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * The base implementation of `_.delay` and `_.defer` which accepts `args`\n * to provide to `func`.\n *\n * @private\n * @param {Function} func The function to delay.\n * @param {number} wait The number of milliseconds to delay invocation.\n * @param {Array} args The arguments to provide to `func`.\n * @returns {number|Object} Returns the timer id or timeout object.\n */\n function baseDelay(func, wait, args) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n return setTimeout(function() { func.apply(undefined, args); }, wait);\n }\n\n /**\n * The base implementation of methods like `_.difference` without support\n * for excluding multiple arrays or iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Array} values The values to exclude.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n */\n function baseDifference(array, values, iteratee, comparator) {\n var index = -1,\n includes = arrayIncludes,\n isCommon = true,\n length = array.length,\n result = [],\n valuesLength = values.length;\n\n if (!length) {\n return result;\n }\n if (iteratee) {\n values = arrayMap(values, baseUnary(iteratee));\n }\n if (comparator) {\n includes = arrayIncludesWith;\n isCommon = false;\n }\n else if (values.length >= LARGE_ARRAY_SIZE) {\n includes = cacheHas;\n isCommon = false;\n values = new SetCache(values);\n }\n outer:\n while (++index < length) {\n var value = array[index],\n computed = iteratee == null ? value : iteratee(value);\n\n value = (comparator || value !== 0) ? value : 0;\n if (isCommon && computed === computed) {\n var valuesIndex = valuesLength;\n while (valuesIndex--) {\n if (values[valuesIndex] === computed) {\n continue outer;\n }\n }\n result.push(value);\n }\n else if (!includes(values, computed, comparator)) {\n result.push(value);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.forEach` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n */\n var baseEach = createBaseEach(baseForOwn);\n\n /**\n * The base implementation of `_.forEachRight` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n */\n var baseEachRight = createBaseEach(baseForOwnRight, true);\n\n /**\n * The base implementation of `_.every` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\n * else `false`\n */\n function baseEvery(collection, predicate) {\n var result = true;\n baseEach(collection, function(value, index, collection) {\n result = !!predicate(value, index, collection);\n return result;\n });\n return result;\n }\n\n /**\n * The base implementation of methods like `_.max` and `_.min` which accepts a\n * `comparator` to determine the extremum value.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The iteratee invoked per iteration.\n * @param {Function} comparator The comparator used to compare values.\n * @returns {*} Returns the extremum value.\n */\n function baseExtremum(array, iteratee, comparator) {\n var index = -1,\n length = array.length;\n\n while (++index < length) {\n var value = array[index],\n current = iteratee(value);\n\n if (current != null && (computed === undefined\n ? (current === current && !isSymbol(current))\n : comparator(current, computed)\n )) {\n var computed = current,\n result = value;\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.fill` without an iteratee call guard.\n *\n * @private\n * @param {Array} array The array to fill.\n * @param {*} value The value to fill `array` with.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns `array`.\n */\n function baseFill(array, value, start, end) {\n var length = array.length;\n\n start = toInteger(start);\n if (start < 0) {\n start = -start > length ? 0 : (length + start);\n }\n end = (end === undefined || end > length) ? length : toInteger(end);\n if (end < 0) {\n end += length;\n }\n end = start > end ? 0 : toLength(end);\n while (start < end) {\n array[start++] = value;\n }\n return array;\n }\n\n /**\n * The base implementation of `_.filter` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\n function baseFilter(collection, predicate) {\n var result = [];\n baseEach(collection, function(value, index, collection) {\n if (predicate(value, index, collection)) {\n result.push(value);\n }\n });\n return result;\n }\n\n /**\n * The base implementation of `_.flatten` with support for restricting flattening.\n *\n * @private\n * @param {Array} array The array to flatten.\n * @param {number} depth The maximum recursion depth.\n * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.\n * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.\n * @param {Array} [result=[]] The initial result value.\n * @returns {Array} Returns the new flattened array.\n */\n function baseFlatten(array, depth, predicate, isStrict, result) {\n var index = -1,\n length = array.length;\n\n predicate || (predicate = isFlattenable);\n result || (result = []);\n\n while (++index < length) {\n var value = array[index];\n if (depth > 0 && predicate(value)) {\n if (depth > 1) {\n // Recursively flatten arrays (susceptible to call stack limits).\n baseFlatten(value, depth - 1, predicate, isStrict, result);\n } else {\n arrayPush(result, value);\n }\n } else if (!isStrict) {\n result[result.length] = value;\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `baseForOwn` which iterates over `object`\n * properties returned by `keysFunc` and invokes `iteratee` for each property.\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\n var baseFor = createBaseFor();\n\n /**\n * This function is like `baseFor` except that it iterates over properties\n * in the opposite order.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\n var baseForRight = createBaseFor(true);\n\n /**\n * The base implementation of `_.forOwn` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\n function baseForOwn(object, iteratee) {\n return object && baseFor(object, iteratee, keys);\n }\n\n /**\n * The base implementation of `_.forOwnRight` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\n function baseForOwnRight(object, iteratee) {\n return object && baseForRight(object, iteratee, keys);\n }\n\n /**\n * The base implementation of `_.functions` which creates an array of\n * `object` function property names filtered from `props`.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Array} props The property names to filter.\n * @returns {Array} Returns the function names.\n */\n function baseFunctions(object, props) {\n return arrayFilter(props, function(key) {\n return isFunction(object[key]);\n });\n }\n\n /**\n * The base implementation of `_.get` without support for default values.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @returns {*} Returns the resolved value.\n */\n function baseGet(object, path) {\n path = castPath(path, object);\n\n var index = 0,\n length = path.length;\n\n while (object != null && index < length) {\n object = object[toKey(path[index++])];\n }\n return (index && index == length) ? object : undefined;\n }\n\n /**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\n function baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n }\n\n /**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\n function baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n }\n\n /**\n * The base implementation of `_.gt` which doesn't coerce arguments.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is greater than `other`,\n * else `false`.\n */\n function baseGt(value, other) {\n return value > other;\n }\n\n /**\n * The base implementation of `_.has` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\n function baseHas(object, key) {\n return object != null && hasOwnProperty.call(object, key);\n }\n\n /**\n * The base implementation of `_.hasIn` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\n function baseHasIn(object, key) {\n return object != null && key in Object(object);\n }\n\n /**\n * The base implementation of `_.inRange` which doesn't coerce arguments.\n *\n * @private\n * @param {number} number The number to check.\n * @param {number} start The start of the range.\n * @param {number} end The end of the range.\n * @returns {boolean} Returns `true` if `number` is in the range, else `false`.\n */\n function baseInRange(number, start, end) {\n return number >= nativeMin(start, end) && number < nativeMax(start, end);\n }\n\n /**\n * The base implementation of methods like `_.intersection`, without support\n * for iteratee shorthands, that accepts an array of arrays to inspect.\n *\n * @private\n * @param {Array} arrays The arrays to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of shared values.\n */\n function baseIntersection(arrays, iteratee, comparator) {\n var includes = comparator ? arrayIncludesWith : arrayIncludes,\n length = arrays[0].length,\n othLength = arrays.length,\n othIndex = othLength,\n caches = Array(othLength),\n maxLength = Infinity,\n result = [];\n\n while (othIndex--) {\n var array = arrays[othIndex];\n if (othIndex && iteratee) {\n array = arrayMap(array, baseUnary(iteratee));\n }\n maxLength = nativeMin(array.length, maxLength);\n caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))\n ? new SetCache(othIndex && array)\n : undefined;\n }\n array = arrays[0];\n\n var index = -1,\n seen = caches[0];\n\n outer:\n while (++index < length && result.length < maxLength) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n value = (comparator || value !== 0) ? value : 0;\n if (!(seen\n ? cacheHas(seen, computed)\n : includes(result, computed, comparator)\n )) {\n othIndex = othLength;\n while (--othIndex) {\n var cache = caches[othIndex];\n if (!(cache\n ? cacheHas(cache, computed)\n : includes(arrays[othIndex], computed, comparator))\n ) {\n continue outer;\n }\n }\n if (seen) {\n seen.push(computed);\n }\n result.push(value);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.invert` and `_.invertBy` which inverts\n * `object` with values transformed by `iteratee` and set by `setter`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform values.\n * @param {Object} accumulator The initial inverted object.\n * @returns {Function} Returns `accumulator`.\n */\n function baseInverter(object, setter, iteratee, accumulator) {\n baseForOwn(object, function(value, key, object) {\n setter(accumulator, iteratee(value), key, object);\n });\n return accumulator;\n }\n\n /**\n * The base implementation of `_.invoke` without support for individual\n * method arguments.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the method to invoke.\n * @param {Array} args The arguments to invoke the method with.\n * @returns {*} Returns the result of the invoked method.\n */\n function baseInvoke(object, path, args) {\n path = castPath(path, object);\n object = parent(object, path);\n var func = object == null ? object : object[toKey(last(path))];\n return func == null ? undefined : apply(func, object, args);\n }\n\n /**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\n function baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n }\n\n /**\n * The base implementation of `_.isArrayBuffer` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.\n */\n function baseIsArrayBuffer(value) {\n return isObjectLike(value) && baseGetTag(value) == arrayBufferTag;\n }\n\n /**\n * The base implementation of `_.isDate` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a date object, else `false`.\n */\n function baseIsDate(value) {\n return isObjectLike(value) && baseGetTag(value) == dateTag;\n }\n\n /**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\n function baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n }\n\n /**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\n function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n }\n\n /**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\n function baseIsMap(value) {\n return isObjectLike(value) && getTag(value) == mapTag;\n }\n\n /**\n * The base implementation of `_.isMatch` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @param {Array} matchData The property names, values, and compare flags to match.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n */\n function baseIsMatch(object, source, matchData, customizer) {\n var index = matchData.length,\n length = index,\n noCustomizer = !customizer;\n\n if (object == null) {\n return !length;\n }\n object = Object(object);\n while (index--) {\n var data = matchData[index];\n if ((noCustomizer && data[2])\n ? data[1] !== object[data[0]]\n : !(data[0] in object)\n ) {\n return false;\n }\n }\n while (++index < length) {\n data = matchData[index];\n var key = data[0],\n objValue = object[key],\n srcValue = data[1];\n\n if (noCustomizer && data[2]) {\n if (objValue === undefined && !(key in object)) {\n return false;\n }\n } else {\n var stack = new Stack;\n if (customizer) {\n var result = customizer(objValue, srcValue, key, object, source, stack);\n }\n if (!(result === undefined\n ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)\n : result\n )) {\n return false;\n }\n }\n }\n return true;\n }\n\n /**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\n function baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n }\n\n /**\n * The base implementation of `_.isRegExp` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.\n */\n function baseIsRegExp(value) {\n return isObjectLike(value) && baseGetTag(value) == regexpTag;\n }\n\n /**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\n function baseIsSet(value) {\n return isObjectLike(value) && getTag(value) == setTag;\n }\n\n /**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\n function baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n }\n\n /**\n * The base implementation of `_.iteratee`.\n *\n * @private\n * @param {*} [value=_.identity] The value to convert to an iteratee.\n * @returns {Function} Returns the iteratee.\n */\n function baseIteratee(value) {\n // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.\n // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.\n if (typeof value == 'function') {\n return value;\n }\n if (value == null) {\n return identity;\n }\n if (typeof value == 'object') {\n return isArray(value)\n ? baseMatchesProperty(value[0], value[1])\n : baseMatches(value);\n }\n return property(value);\n }\n\n /**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\n function baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\n function baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.lt` which doesn't coerce arguments.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is less than `other`,\n * else `false`.\n */\n function baseLt(value, other) {\n return value < other;\n }\n\n /**\n * The base implementation of `_.map` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\n function baseMap(collection, iteratee) {\n var index = -1,\n result = isArrayLike(collection) ? Array(collection.length) : [];\n\n baseEach(collection, function(value, key, collection) {\n result[++index] = iteratee(value, key, collection);\n });\n return result;\n }\n\n /**\n * The base implementation of `_.matches` which doesn't clone `source`.\n *\n * @private\n * @param {Object} source The object of property values to match.\n * @returns {Function} Returns the new spec function.\n */\n function baseMatches(source) {\n var matchData = getMatchData(source);\n if (matchData.length == 1 && matchData[0][2]) {\n return matchesStrictComparable(matchData[0][0], matchData[0][1]);\n }\n return function(object) {\n return object === source || baseIsMatch(object, source, matchData);\n };\n }\n\n /**\n * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.\n *\n * @private\n * @param {string} path The path of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\n function baseMatchesProperty(path, srcValue) {\n if (isKey(path) && isStrictComparable(srcValue)) {\n return matchesStrictComparable(toKey(path), srcValue);\n }\n return function(object) {\n var objValue = get(object, path);\n return (objValue === undefined && objValue === srcValue)\n ? hasIn(object, path)\n : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);\n };\n }\n\n /**\n * The base implementation of `_.merge` without support for multiple sources.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} [customizer] The function to customize merged values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\n function baseMerge(object, source, srcIndex, customizer, stack) {\n if (object === source) {\n return;\n }\n baseFor(source, function(srcValue, key) {\n stack || (stack = new Stack);\n if (isObject(srcValue)) {\n baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);\n }\n else {\n var newValue = customizer\n ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)\n : undefined;\n\n if (newValue === undefined) {\n newValue = srcValue;\n }\n assignMergeValue(object, key, newValue);\n }\n }, keysIn);\n }\n\n /**\n * A specialized version of `baseMerge` for arrays and objects which performs\n * deep merges and tracks traversed objects enabling objects with circular\n * references to be merged.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {string} key The key of the value to merge.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} mergeFunc The function to merge values.\n * @param {Function} [customizer] The function to customize assigned values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\n function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {\n var objValue = safeGet(object, key),\n srcValue = safeGet(source, key),\n stacked = stack.get(srcValue);\n\n if (stacked) {\n assignMergeValue(object, key, stacked);\n return;\n }\n var newValue = customizer\n ? customizer(objValue, srcValue, (key + ''), object, source, stack)\n : undefined;\n\n var isCommon = newValue === undefined;\n\n if (isCommon) {\n var isArr = isArray(srcValue),\n isBuff = !isArr && isBuffer(srcValue),\n isTyped = !isArr && !isBuff && isTypedArray(srcValue);\n\n newValue = srcValue;\n if (isArr || isBuff || isTyped) {\n if (isArray(objValue)) {\n newValue = objValue;\n }\n else if (isArrayLikeObject(objValue)) {\n newValue = copyArray(objValue);\n }\n else if (isBuff) {\n isCommon = false;\n newValue = cloneBuffer(srcValue, true);\n }\n else if (isTyped) {\n isCommon = false;\n newValue = cloneTypedArray(srcValue, true);\n }\n else {\n newValue = [];\n }\n }\n else if (isPlainObject(srcValue) || isArguments(srcValue)) {\n newValue = objValue;\n if (isArguments(objValue)) {\n newValue = toPlainObject(objValue);\n }\n else if (!isObject(objValue) || isFunction(objValue)) {\n newValue = initCloneObject(srcValue);\n }\n }\n else {\n isCommon = false;\n }\n }\n if (isCommon) {\n // Recursively merge objects and arrays (susceptible to call stack limits).\n stack.set(srcValue, newValue);\n mergeFunc(newValue, srcValue, srcIndex, customizer, stack);\n stack['delete'](srcValue);\n }\n assignMergeValue(object, key, newValue);\n }\n\n /**\n * The base implementation of `_.nth` which doesn't coerce arguments.\n *\n * @private\n * @param {Array} array The array to query.\n * @param {number} n The index of the element to return.\n * @returns {*} Returns the nth element of `array`.\n */\n function baseNth(array, n) {\n var length = array.length;\n if (!length) {\n return;\n }\n n += n < 0 ? length : 0;\n return isIndex(n, length) ? array[n] : undefined;\n }\n\n /**\n * The base implementation of `_.orderBy` without param guards.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.\n * @param {string[]} orders The sort orders of `iteratees`.\n * @returns {Array} Returns the new sorted array.\n */\n function baseOrderBy(collection, iteratees, orders) {\n if (iteratees.length) {\n iteratees = arrayMap(iteratees, function(iteratee) {\n if (isArray(iteratee)) {\n return function(value) {\n return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee);\n }\n }\n return iteratee;\n });\n } else {\n iteratees = [identity];\n }\n\n var index = -1;\n iteratees = arrayMap(iteratees, baseUnary(getIteratee()));\n\n var result = baseMap(collection, function(value, key, collection) {\n var criteria = arrayMap(iteratees, function(iteratee) {\n return iteratee(value);\n });\n return { 'criteria': criteria, 'index': ++index, 'value': value };\n });\n\n return baseSortBy(result, function(object, other) {\n return compareMultiple(object, other, orders);\n });\n }\n\n /**\n * The base implementation of `_.pick` without support for individual\n * property identifiers.\n *\n * @private\n * @param {Object} object The source object.\n * @param {string[]} paths The property paths to pick.\n * @returns {Object} Returns the new object.\n */\n function basePick(object, paths) {\n return basePickBy(object, paths, function(value, path) {\n return hasIn(object, path);\n });\n }\n\n /**\n * The base implementation of `_.pickBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The source object.\n * @param {string[]} paths The property paths to pick.\n * @param {Function} predicate The function invoked per property.\n * @returns {Object} Returns the new object.\n */\n function basePickBy(object, paths, predicate) {\n var index = -1,\n length = paths.length,\n result = {};\n\n while (++index < length) {\n var path = paths[index],\n value = baseGet(object, path);\n\n if (predicate(value, path)) {\n baseSet(result, castPath(path, object), value);\n }\n }\n return result;\n }\n\n /**\n * A specialized version of `baseProperty` which supports deep paths.\n *\n * @private\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\n function basePropertyDeep(path) {\n return function(object) {\n return baseGet(object, path);\n };\n }\n\n /**\n * The base implementation of `_.pullAllBy` without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to remove.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns `array`.\n */\n function basePullAll(array, values, iteratee, comparator) {\n var indexOf = comparator ? baseIndexOfWith : baseIndexOf,\n index = -1,\n length = values.length,\n seen = array;\n\n if (array === values) {\n values = copyArray(values);\n }\n if (iteratee) {\n seen = arrayMap(array, baseUnary(iteratee));\n }\n while (++index < length) {\n var fromIndex = 0,\n value = values[index],\n computed = iteratee ? iteratee(value) : value;\n\n while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) {\n if (seen !== array) {\n splice.call(seen, fromIndex, 1);\n }\n splice.call(array, fromIndex, 1);\n }\n }\n return array;\n }\n\n /**\n * The base implementation of `_.pullAt` without support for individual\n * indexes or capturing the removed elements.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {number[]} indexes The indexes of elements to remove.\n * @returns {Array} Returns `array`.\n */\n function basePullAt(array, indexes) {\n var length = array ? indexes.length : 0,\n lastIndex = length - 1;\n\n while (length--) {\n var index = indexes[length];\n if (length == lastIndex || index !== previous) {\n var previous = index;\n if (isIndex(index)) {\n splice.call(array, index, 1);\n } else {\n baseUnset(array, index);\n }\n }\n }\n return array;\n }\n\n /**\n * The base implementation of `_.random` without support for returning\n * floating-point numbers.\n *\n * @private\n * @param {number} lower The lower bound.\n * @param {number} upper The upper bound.\n * @returns {number} Returns the random number.\n */\n function baseRandom(lower, upper) {\n return lower + nativeFloor(nativeRandom() * (upper - lower + 1));\n }\n\n /**\n * The base implementation of `_.range` and `_.rangeRight` which doesn't\n * coerce arguments.\n *\n * @private\n * @param {number} start The start of the range.\n * @param {number} end The end of the range.\n * @param {number} step The value to increment or decrement by.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Array} Returns the range of numbers.\n */\n function baseRange(start, end, step, fromRight) {\n var index = -1,\n length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),\n result = Array(length);\n\n while (length--) {\n result[fromRight ? length : ++index] = start;\n start += step;\n }\n return result;\n }\n\n /**\n * The base implementation of `_.repeat` which doesn't coerce arguments.\n *\n * @private\n * @param {string} string The string to repeat.\n * @param {number} n The number of times to repeat the string.\n * @returns {string} Returns the repeated string.\n */\n function baseRepeat(string, n) {\n var result = '';\n if (!string || n < 1 || n > MAX_SAFE_INTEGER) {\n return result;\n }\n // Leverage the exponentiation by squaring algorithm for a faster repeat.\n // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details.\n do {\n if (n % 2) {\n result += string;\n }\n n = nativeFloor(n / 2);\n if (n) {\n string += string;\n }\n } while (n);\n\n return result;\n }\n\n /**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\n function baseRest(func, start) {\n return setToString(overRest(func, start, identity), func + '');\n }\n\n /**\n * The base implementation of `_.sample`.\n *\n * @private\n * @param {Array|Object} collection The collection to sample.\n * @returns {*} Returns the random element.\n */\n function baseSample(collection) {\n return arraySample(values(collection));\n }\n\n /**\n * The base implementation of `_.sampleSize` without param guards.\n *\n * @private\n * @param {Array|Object} collection The collection to sample.\n * @param {number} n The number of elements to sample.\n * @returns {Array} Returns the random elements.\n */\n function baseSampleSize(collection, n) {\n var array = values(collection);\n return shuffleSelf(array, baseClamp(n, 0, array.length));\n }\n\n /**\n * The base implementation of `_.set`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @param {Function} [customizer] The function to customize path creation.\n * @returns {Object} Returns `object`.\n */\n function baseSet(object, path, value, customizer) {\n if (!isObject(object)) {\n return object;\n }\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n lastIndex = length - 1,\n nested = object;\n\n while (nested != null && ++index < length) {\n var key = toKey(path[index]),\n newValue = value;\n\n if (key === '__proto__' || key === 'constructor' || key === 'prototype') {\n return object;\n }\n\n if (index != lastIndex) {\n var objValue = nested[key];\n newValue = customizer ? customizer(objValue, key, nested) : undefined;\n if (newValue === undefined) {\n newValue = isObject(objValue)\n ? objValue\n : (isIndex(path[index + 1]) ? [] : {});\n }\n }\n assignValue(nested, key, newValue);\n nested = nested[key];\n }\n return object;\n }\n\n /**\n * The base implementation of `setData` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to associate metadata with.\n * @param {*} data The metadata.\n * @returns {Function} Returns `func`.\n */\n var baseSetData = !metaMap ? identity : function(func, data) {\n metaMap.set(func, data);\n return func;\n };\n\n /**\n * The base implementation of `setToString` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\n var baseSetToString = !defineProperty ? identity : function(func, string) {\n return defineProperty(func, 'toString', {\n 'configurable': true,\n 'enumerable': false,\n 'value': constant(string),\n 'writable': true\n });\n };\n\n /**\n * The base implementation of `_.shuffle`.\n *\n * @private\n * @param {Array|Object} collection The collection to shuffle.\n * @returns {Array} Returns the new shuffled array.\n */\n function baseShuffle(collection) {\n return shuffleSelf(values(collection));\n }\n\n /**\n * The base implementation of `_.slice` without an iteratee call guard.\n *\n * @private\n * @param {Array} array The array to slice.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the slice of `array`.\n */\n function baseSlice(array, start, end) {\n var index = -1,\n length = array.length;\n\n if (start < 0) {\n start = -start > length ? 0 : (length + start);\n }\n end = end > length ? length : end;\n if (end < 0) {\n end += length;\n }\n length = start > end ? 0 : ((end - start) >>> 0);\n start >>>= 0;\n\n var result = Array(length);\n while (++index < length) {\n result[index] = array[index + start];\n }\n return result;\n }\n\n /**\n * The base implementation of `_.some` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\n function baseSome(collection, predicate) {\n var result;\n\n baseEach(collection, function(value, index, collection) {\n result = predicate(value, index, collection);\n return !result;\n });\n return !!result;\n }\n\n /**\n * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which\n * performs a binary search of `array` to determine the index at which `value`\n * should be inserted into `array` in order to maintain its sort order.\n *\n * @private\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {boolean} [retHighest] Specify returning the highest qualified index.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n */\n function baseSortedIndex(array, value, retHighest) {\n var low = 0,\n high = array == null ? low : array.length;\n\n if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) {\n while (low < high) {\n var mid = (low + high) >>> 1,\n computed = array[mid];\n\n if (computed !== null && !isSymbol(computed) &&\n (retHighest ? (computed <= value) : (computed < value))) {\n low = mid + 1;\n } else {\n high = mid;\n }\n }\n return high;\n }\n return baseSortedIndexBy(array, value, identity, retHighest);\n }\n\n /**\n * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy`\n * which invokes `iteratee` for `value` and each element of `array` to compute\n * their sort ranking. The iteratee is invoked with one argument; (value).\n *\n * @private\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {Function} iteratee The iteratee invoked per element.\n * @param {boolean} [retHighest] Specify returning the highest qualified index.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n */\n function baseSortedIndexBy(array, value, iteratee, retHighest) {\n var low = 0,\n high = array == null ? 0 : array.length;\n if (high === 0) {\n return 0;\n }\n\n value = iteratee(value);\n var valIsNaN = value !== value,\n valIsNull = value === null,\n valIsSymbol = isSymbol(value),\n valIsUndefined = value === undefined;\n\n while (low < high) {\n var mid = nativeFloor((low + high) / 2),\n computed = iteratee(array[mid]),\n othIsDefined = computed !== undefined,\n othIsNull = computed === null,\n othIsReflexive = computed === computed,\n othIsSymbol = isSymbol(computed);\n\n if (valIsNaN) {\n var setLow = retHighest || othIsReflexive;\n } else if (valIsUndefined) {\n setLow = othIsReflexive && (retHighest || othIsDefined);\n } else if (valIsNull) {\n setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull);\n } else if (valIsSymbol) {\n setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol);\n } else if (othIsNull || othIsSymbol) {\n setLow = false;\n } else {\n setLow = retHighest ? (computed <= value) : (computed < value);\n }\n if (setLow) {\n low = mid + 1;\n } else {\n high = mid;\n }\n }\n return nativeMin(high, MAX_ARRAY_INDEX);\n }\n\n /**\n * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without\n * support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n */\n function baseSortedUniq(array, iteratee) {\n var index = -1,\n length = array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n if (!index || !eq(computed, seen)) {\n var seen = computed;\n result[resIndex++] = value === 0 ? 0 : value;\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.toNumber` which doesn't ensure correct\n * conversions of binary, hexadecimal, or octal string values.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n */\n function baseToNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n return +value;\n }\n\n /**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\n function baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n if (isArray(value)) {\n // Recursively convert values (susceptible to call stack limits).\n return arrayMap(value, baseToString) + '';\n }\n if (isSymbol(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n }\n\n /**\n * The base implementation of `_.uniqBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n */\n function baseUniq(array, iteratee, comparator) {\n var index = -1,\n includes = arrayIncludes,\n length = array.length,\n isCommon = true,\n result = [],\n seen = result;\n\n if (comparator) {\n isCommon = false;\n includes = arrayIncludesWith;\n }\n else if (length >= LARGE_ARRAY_SIZE) {\n var set = iteratee ? null : createSet(array);\n if (set) {\n return setToArray(set);\n }\n isCommon = false;\n includes = cacheHas;\n seen = new SetCache;\n }\n else {\n seen = iteratee ? [] : result;\n }\n outer:\n while (++index < length) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n value = (comparator || value !== 0) ? value : 0;\n if (isCommon && computed === computed) {\n var seenIndex = seen.length;\n while (seenIndex--) {\n if (seen[seenIndex] === computed) {\n continue outer;\n }\n }\n if (iteratee) {\n seen.push(computed);\n }\n result.push(value);\n }\n else if (!includes(seen, computed, comparator)) {\n if (seen !== result) {\n seen.push(computed);\n }\n result.push(value);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.unset`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The property path to unset.\n * @returns {boolean} Returns `true` if the property is deleted, else `false`.\n */\n function baseUnset(object, path) {\n path = castPath(path, object);\n object = parent(object, path);\n return object == null || delete object[toKey(last(path))];\n }\n\n /**\n * The base implementation of `_.update`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to update.\n * @param {Function} updater The function to produce the updated value.\n * @param {Function} [customizer] The function to customize path creation.\n * @returns {Object} Returns `object`.\n */\n function baseUpdate(object, path, updater, customizer) {\n return baseSet(object, path, updater(baseGet(object, path)), customizer);\n }\n\n /**\n * The base implementation of methods like `_.dropWhile` and `_.takeWhile`\n * without support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to query.\n * @param {Function} predicate The function invoked per iteration.\n * @param {boolean} [isDrop] Specify dropping elements instead of taking them.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Array} Returns the slice of `array`.\n */\n function baseWhile(array, predicate, isDrop, fromRight) {\n var length = array.length,\n index = fromRight ? length : -1;\n\n while ((fromRight ? index-- : ++index < length) &&\n predicate(array[index], index, array)) {}\n\n return isDrop\n ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length))\n : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index));\n }\n\n /**\n * The base implementation of `wrapperValue` which returns the result of\n * performing a sequence of actions on the unwrapped `value`, where each\n * successive action is supplied the return value of the previous.\n *\n * @private\n * @param {*} value The unwrapped value.\n * @param {Array} actions Actions to perform to resolve the unwrapped value.\n * @returns {*} Returns the resolved value.\n */\n function baseWrapperValue(value, actions) {\n var result = value;\n if (result instanceof LazyWrapper) {\n result = result.value();\n }\n return arrayReduce(actions, function(result, action) {\n return action.func.apply(action.thisArg, arrayPush([result], action.args));\n }, result);\n }\n\n /**\n * The base implementation of methods like `_.xor`, without support for\n * iteratee shorthands, that accepts an array of arrays to inspect.\n *\n * @private\n * @param {Array} arrays The arrays to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of values.\n */\n function baseXor(arrays, iteratee, comparator) {\n var length = arrays.length;\n if (length < 2) {\n return length ? baseUniq(arrays[0]) : [];\n }\n var index = -1,\n result = Array(length);\n\n while (++index < length) {\n var array = arrays[index],\n othIndex = -1;\n\n while (++othIndex < length) {\n if (othIndex != index) {\n result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator);\n }\n }\n }\n return baseUniq(baseFlatten(result, 1), iteratee, comparator);\n }\n\n /**\n * This base implementation of `_.zipObject` which assigns values using `assignFunc`.\n *\n * @private\n * @param {Array} props The property identifiers.\n * @param {Array} values The property values.\n * @param {Function} assignFunc The function to assign values.\n * @returns {Object} Returns the new object.\n */\n function baseZipObject(props, values, assignFunc) {\n var index = -1,\n length = props.length,\n valsLength = values.length,\n result = {};\n\n while (++index < length) {\n var value = index < valsLength ? values[index] : undefined;\n assignFunc(result, props[index], value);\n }\n return result;\n }\n\n /**\n * Casts `value` to an empty array if it's not an array like object.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {Array|Object} Returns the cast array-like object.\n */\n function castArrayLikeObject(value) {\n return isArrayLikeObject(value) ? value : [];\n }\n\n /**\n * Casts `value` to `identity` if it's not a function.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {Function} Returns cast function.\n */\n function castFunction(value) {\n return typeof value == 'function' ? value : identity;\n }\n\n /**\n * Casts `value` to a path array if it's not one.\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {Object} [object] The object to query keys on.\n * @returns {Array} Returns the cast property path array.\n */\n function castPath(value, object) {\n if (isArray(value)) {\n return value;\n }\n return isKey(value, object) ? [value] : stringToPath(toString(value));\n }\n\n /**\n * A `baseRest` alias which can be replaced with `identity` by module\n * replacement plugins.\n *\n * @private\n * @type {Function}\n * @param {Function} func The function to apply a rest parameter to.\n * @returns {Function} Returns the new function.\n */\n var castRest = baseRest;\n\n /**\n * Casts `array` to a slice if it's needed.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {number} start The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the cast slice.\n */\n function castSlice(array, start, end) {\n var length = array.length;\n end = end === undefined ? length : end;\n return (!start && end >= length) ? array : baseSlice(array, start, end);\n }\n\n /**\n * A simple wrapper around the global [`clearTimeout`](https://mdn.io/clearTimeout).\n *\n * @private\n * @param {number|Object} id The timer id or timeout object of the timer to clear.\n */\n var clearTimeout = ctxClearTimeout || function(id) {\n return root.clearTimeout(id);\n };\n\n /**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\n function cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n }\n\n /**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\n function cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n }\n\n /**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\n function cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n }\n\n /**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\n function cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n }\n\n /**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\n function cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n }\n\n /**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\n function cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n }\n\n /**\n * Compares values to sort them in ascending order.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {number} Returns the sort order indicator for `value`.\n */\n function compareAscending(value, other) {\n if (value !== other) {\n var valIsDefined = value !== undefined,\n valIsNull = value === null,\n valIsReflexive = value === value,\n valIsSymbol = isSymbol(value);\n\n var othIsDefined = other !== undefined,\n othIsNull = other === null,\n othIsReflexive = other === other,\n othIsSymbol = isSymbol(other);\n\n if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||\n (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||\n (valIsNull && othIsDefined && othIsReflexive) ||\n (!valIsDefined && othIsReflexive) ||\n !valIsReflexive) {\n return 1;\n }\n if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||\n (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||\n (othIsNull && valIsDefined && valIsReflexive) ||\n (!othIsDefined && valIsReflexive) ||\n !othIsReflexive) {\n return -1;\n }\n }\n return 0;\n }\n\n /**\n * Used by `_.orderBy` to compare multiple properties of a value to another\n * and stable sort them.\n *\n * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,\n * specify an order of \"desc\" for descending or \"asc\" for ascending sort order\n * of corresponding values.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {boolean[]|string[]} orders The order to sort by for each property.\n * @returns {number} Returns the sort order indicator for `object`.\n */\n function compareMultiple(object, other, orders) {\n var index = -1,\n objCriteria = object.criteria,\n othCriteria = other.criteria,\n length = objCriteria.length,\n ordersLength = orders.length;\n\n while (++index < length) {\n var result = compareAscending(objCriteria[index], othCriteria[index]);\n if (result) {\n if (index >= ordersLength) {\n return result;\n }\n var order = orders[index];\n return result * (order == 'desc' ? -1 : 1);\n }\n }\n // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications\n // that causes it, under certain circumstances, to provide the same value for\n // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247\n // for more details.\n //\n // This also ensures a stable sort in V8 and other engines.\n // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.\n return object.index - other.index;\n }\n\n /**\n * Creates an array that is the composition of partially applied arguments,\n * placeholders, and provided arguments into a single array of arguments.\n *\n * @private\n * @param {Array} args The provided arguments.\n * @param {Array} partials The arguments to prepend to those provided.\n * @param {Array} holders The `partials` placeholder indexes.\n * @params {boolean} [isCurried] Specify composing for a curried function.\n * @returns {Array} Returns the new array of composed arguments.\n */\n function composeArgs(args, partials, holders, isCurried) {\n var argsIndex = -1,\n argsLength = args.length,\n holdersLength = holders.length,\n leftIndex = -1,\n leftLength = partials.length,\n rangeLength = nativeMax(argsLength - holdersLength, 0),\n result = Array(leftLength + rangeLength),\n isUncurried = !isCurried;\n\n while (++leftIndex < leftLength) {\n result[leftIndex] = partials[leftIndex];\n }\n while (++argsIndex < holdersLength) {\n if (isUncurried || argsIndex < argsLength) {\n result[holders[argsIndex]] = args[argsIndex];\n }\n }\n while (rangeLength--) {\n result[leftIndex++] = args[argsIndex++];\n }\n return result;\n }\n\n /**\n * This function is like `composeArgs` except that the arguments composition\n * is tailored for `_.partialRight`.\n *\n * @private\n * @param {Array} args The provided arguments.\n * @param {Array} partials The arguments to append to those provided.\n * @param {Array} holders The `partials` placeholder indexes.\n * @params {boolean} [isCurried] Specify composing for a curried function.\n * @returns {Array} Returns the new array of composed arguments.\n */\n function composeArgsRight(args, partials, holders, isCurried) {\n var argsIndex = -1,\n argsLength = args.length,\n holdersIndex = -1,\n holdersLength = holders.length,\n rightIndex = -1,\n rightLength = partials.length,\n rangeLength = nativeMax(argsLength - holdersLength, 0),\n result = Array(rangeLength + rightLength),\n isUncurried = !isCurried;\n\n while (++argsIndex < rangeLength) {\n result[argsIndex] = args[argsIndex];\n }\n var offset = argsIndex;\n while (++rightIndex < rightLength) {\n result[offset + rightIndex] = partials[rightIndex];\n }\n while (++holdersIndex < holdersLength) {\n if (isUncurried || argsIndex < argsLength) {\n result[offset + holders[holdersIndex]] = args[argsIndex++];\n }\n }\n return result;\n }\n\n /**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\n function copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n }\n\n /**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\n function copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n }\n\n /**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\n function copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n }\n\n /**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\n function copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n }\n\n /**\n * Creates a function like `_.groupBy`.\n *\n * @private\n * @param {Function} setter The function to set accumulator values.\n * @param {Function} [initializer] The accumulator object initializer.\n * @returns {Function} Returns the new aggregator function.\n */\n function createAggregator(setter, initializer) {\n return function(collection, iteratee) {\n var func = isArray(collection) ? arrayAggregator : baseAggregator,\n accumulator = initializer ? initializer() : {};\n\n return func(collection, setter, getIteratee(iteratee, 2), accumulator);\n };\n }\n\n /**\n * Creates a function like `_.assign`.\n *\n * @private\n * @param {Function} assigner The function to assign values.\n * @returns {Function} Returns the new assigner function.\n */\n function createAssigner(assigner) {\n return baseRest(function(object, sources) {\n var index = -1,\n length = sources.length,\n customizer = length > 1 ? sources[length - 1] : undefined,\n guard = length > 2 ? sources[2] : undefined;\n\n customizer = (assigner.length > 3 && typeof customizer == 'function')\n ? (length--, customizer)\n : undefined;\n\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n customizer = length < 3 ? undefined : customizer;\n length = 1;\n }\n object = Object(object);\n while (++index < length) {\n var source = sources[index];\n if (source) {\n assigner(object, source, index, customizer);\n }\n }\n return object;\n });\n }\n\n /**\n * Creates a `baseEach` or `baseEachRight` function.\n *\n * @private\n * @param {Function} eachFunc The function to iterate over a collection.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\n function createBaseEach(eachFunc, fromRight) {\n return function(collection, iteratee) {\n if (collection == null) {\n return collection;\n }\n if (!isArrayLike(collection)) {\n return eachFunc(collection, iteratee);\n }\n var length = collection.length,\n index = fromRight ? length : -1,\n iterable = Object(collection);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (iteratee(iterable[index], index, iterable) === false) {\n break;\n }\n }\n return collection;\n };\n }\n\n /**\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\n function createBaseFor(fromRight) {\n return function(object, iteratee, keysFunc) {\n var index = -1,\n iterable = Object(object),\n props = keysFunc(object),\n length = props.length;\n\n while (length--) {\n var key = props[fromRight ? length : ++index];\n if (iteratee(iterable[key], key, iterable) === false) {\n break;\n }\n }\n return object;\n };\n }\n\n /**\n * Creates a function that wraps `func` to invoke it with the optional `this`\n * binding of `thisArg`.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {*} [thisArg] The `this` binding of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createBind(func, bitmask, thisArg) {\n var isBind = bitmask & WRAP_BIND_FLAG,\n Ctor = createCtor(func);\n\n function wrapper() {\n var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n return fn.apply(isBind ? thisArg : this, arguments);\n }\n return wrapper;\n }\n\n /**\n * Creates a function like `_.lowerFirst`.\n *\n * @private\n * @param {string} methodName The name of the `String` case method to use.\n * @returns {Function} Returns the new case function.\n */\n function createCaseFirst(methodName) {\n return function(string) {\n string = toString(string);\n\n var strSymbols = hasUnicode(string)\n ? stringToArray(string)\n : undefined;\n\n var chr = strSymbols\n ? strSymbols[0]\n : string.charAt(0);\n\n var trailing = strSymbols\n ? castSlice(strSymbols, 1).join('')\n : string.slice(1);\n\n return chr[methodName]() + trailing;\n };\n }\n\n /**\n * Creates a function like `_.camelCase`.\n *\n * @private\n * @param {Function} callback The function to combine each word.\n * @returns {Function} Returns the new compounder function.\n */\n function createCompounder(callback) {\n return function(string) {\n return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');\n };\n }\n\n /**\n * Creates a function that produces an instance of `Ctor` regardless of\n * whether it was invoked as part of a `new` expression or by `call` or `apply`.\n *\n * @private\n * @param {Function} Ctor The constructor to wrap.\n * @returns {Function} Returns the new wrapped function.\n */\n function createCtor(Ctor) {\n return function() {\n // Use a `switch` statement to work with class constructors. See\n // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist\n // for more details.\n var args = arguments;\n switch (args.length) {\n case 0: return new Ctor;\n case 1: return new Ctor(args[0]);\n case 2: return new Ctor(args[0], args[1]);\n case 3: return new Ctor(args[0], args[1], args[2]);\n case 4: return new Ctor(args[0], args[1], args[2], args[3]);\n case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);\n case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);\n case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);\n }\n var thisBinding = baseCreate(Ctor.prototype),\n result = Ctor.apply(thisBinding, args);\n\n // Mimic the constructor's `return` behavior.\n // See https://es5.github.io/#x13.2.2 for more details.\n return isObject(result) ? result : thisBinding;\n };\n }\n\n /**\n * Creates a function that wraps `func` to enable currying.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {number} arity The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createCurry(func, bitmask, arity) {\n var Ctor = createCtor(func);\n\n function wrapper() {\n var length = arguments.length,\n args = Array(length),\n index = length,\n placeholder = getHolder(wrapper);\n\n while (index--) {\n args[index] = arguments[index];\n }\n var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder)\n ? []\n : replaceHolders(args, placeholder);\n\n length -= holders.length;\n if (length < arity) {\n return createRecurry(\n func, bitmask, createHybrid, wrapper.placeholder, undefined,\n args, holders, undefined, undefined, arity - length);\n }\n var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n return apply(fn, this, args);\n }\n return wrapper;\n }\n\n /**\n * Creates a `_.find` or `_.findLast` function.\n *\n * @private\n * @param {Function} findIndexFunc The function to find the collection index.\n * @returns {Function} Returns the new find function.\n */\n function createFind(findIndexFunc) {\n return function(collection, predicate, fromIndex) {\n var iterable = Object(collection);\n if (!isArrayLike(collection)) {\n var iteratee = getIteratee(predicate, 3);\n collection = keys(collection);\n predicate = function(key) { return iteratee(iterable[key], key, iterable); };\n }\n var index = findIndexFunc(collection, predicate, fromIndex);\n return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;\n };\n }\n\n /**\n * Creates a `_.flow` or `_.flowRight` function.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new flow function.\n */\n function createFlow(fromRight) {\n return flatRest(function(funcs) {\n var length = funcs.length,\n index = length,\n prereq = LodashWrapper.prototype.thru;\n\n if (fromRight) {\n funcs.reverse();\n }\n while (index--) {\n var func = funcs[index];\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n if (prereq && !wrapper && getFuncName(func) == 'wrapper') {\n var wrapper = new LodashWrapper([], true);\n }\n }\n index = wrapper ? index : length;\n while (++index < length) {\n func = funcs[index];\n\n var funcName = getFuncName(func),\n data = funcName == 'wrapper' ? getData(func) : undefined;\n\n if (data && isLaziable(data[0]) &&\n data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) &&\n !data[4].length && data[9] == 1\n ) {\n wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);\n } else {\n wrapper = (func.length == 1 && isLaziable(func))\n ? wrapper[funcName]()\n : wrapper.thru(func);\n }\n }\n return function() {\n var args = arguments,\n value = args[0];\n\n if (wrapper && args.length == 1 && isArray(value)) {\n return wrapper.plant(value).value();\n }\n var index = 0,\n result = length ? funcs[index].apply(this, args) : value;\n\n while (++index < length) {\n result = funcs[index].call(this, result);\n }\n return result;\n };\n });\n }\n\n /**\n * Creates a function that wraps `func` to invoke it with optional `this`\n * binding of `thisArg`, partial application, and currying.\n *\n * @private\n * @param {Function|string} func The function or method name to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {*} [thisArg] The `this` binding of `func`.\n * @param {Array} [partials] The arguments to prepend to those provided to\n * the new function.\n * @param {Array} [holders] The `partials` placeholder indexes.\n * @param {Array} [partialsRight] The arguments to append to those provided\n * to the new function.\n * @param {Array} [holdersRight] The `partialsRight` placeholder indexes.\n * @param {Array} [argPos] The argument positions of the new function.\n * @param {number} [ary] The arity cap of `func`.\n * @param {number} [arity] The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {\n var isAry = bitmask & WRAP_ARY_FLAG,\n isBind = bitmask & WRAP_BIND_FLAG,\n isBindKey = bitmask & WRAP_BIND_KEY_FLAG,\n isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG),\n isFlip = bitmask & WRAP_FLIP_FLAG,\n Ctor = isBindKey ? undefined : createCtor(func);\n\n function wrapper() {\n var length = arguments.length,\n args = Array(length),\n index = length;\n\n while (index--) {\n args[index] = arguments[index];\n }\n if (isCurried) {\n var placeholder = getHolder(wrapper),\n holdersCount = countHolders(args, placeholder);\n }\n if (partials) {\n args = composeArgs(args, partials, holders, isCurried);\n }\n if (partialsRight) {\n args = composeArgsRight(args, partialsRight, holdersRight, isCurried);\n }\n length -= holdersCount;\n if (isCurried && length < arity) {\n var newHolders = replaceHolders(args, placeholder);\n return createRecurry(\n func, bitmask, createHybrid, wrapper.placeholder, thisArg,\n args, newHolders, argPos, ary, arity - length\n );\n }\n var thisBinding = isBind ? thisArg : this,\n fn = isBindKey ? thisBinding[func] : func;\n\n length = args.length;\n if (argPos) {\n args = reorder(args, argPos);\n } else if (isFlip && length > 1) {\n args.reverse();\n }\n if (isAry && ary < length) {\n args.length = ary;\n }\n if (this && this !== root && this instanceof wrapper) {\n fn = Ctor || createCtor(fn);\n }\n return fn.apply(thisBinding, args);\n }\n return wrapper;\n }\n\n /**\n * Creates a function like `_.invertBy`.\n *\n * @private\n * @param {Function} setter The function to set accumulator values.\n * @param {Function} toIteratee The function to resolve iteratees.\n * @returns {Function} Returns the new inverter function.\n */\n function createInverter(setter, toIteratee) {\n return function(object, iteratee) {\n return baseInverter(object, setter, toIteratee(iteratee), {});\n };\n }\n\n /**\n * Creates a function that performs a mathematical operation on two values.\n *\n * @private\n * @param {Function} operator The function to perform the operation.\n * @param {number} [defaultValue] The value used for `undefined` arguments.\n * @returns {Function} Returns the new mathematical operation function.\n */\n function createMathOperation(operator, defaultValue) {\n return function(value, other) {\n var result;\n if (value === undefined && other === undefined) {\n return defaultValue;\n }\n if (value !== undefined) {\n result = value;\n }\n if (other !== undefined) {\n if (result === undefined) {\n return other;\n }\n if (typeof value == 'string' || typeof other == 'string') {\n value = baseToString(value);\n other = baseToString(other);\n } else {\n value = baseToNumber(value);\n other = baseToNumber(other);\n }\n result = operator(value, other);\n }\n return result;\n };\n }\n\n /**\n * Creates a function like `_.over`.\n *\n * @private\n * @param {Function} arrayFunc The function to iterate over iteratees.\n * @returns {Function} Returns the new over function.\n */\n function createOver(arrayFunc) {\n return flatRest(function(iteratees) {\n iteratees = arrayMap(iteratees, baseUnary(getIteratee()));\n return baseRest(function(args) {\n var thisArg = this;\n return arrayFunc(iteratees, function(iteratee) {\n return apply(iteratee, thisArg, args);\n });\n });\n });\n }\n\n /**\n * Creates the padding for `string` based on `length`. The `chars` string\n * is truncated if the number of characters exceeds `length`.\n *\n * @private\n * @param {number} length The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padding for `string`.\n */\n function createPadding(length, chars) {\n chars = chars === undefined ? ' ' : baseToString(chars);\n\n var charsLength = chars.length;\n if (charsLength < 2) {\n return charsLength ? baseRepeat(chars, length) : chars;\n }\n var result = baseRepeat(chars, nativeCeil(length / stringSize(chars)));\n return hasUnicode(chars)\n ? castSlice(stringToArray(result), 0, length).join('')\n : result.slice(0, length);\n }\n\n /**\n * Creates a function that wraps `func` to invoke it with the `this` binding\n * of `thisArg` and `partials` prepended to the arguments it receives.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} partials The arguments to prepend to those provided to\n * the new function.\n * @returns {Function} Returns the new wrapped function.\n */\n function createPartial(func, bitmask, thisArg, partials) {\n var isBind = bitmask & WRAP_BIND_FLAG,\n Ctor = createCtor(func);\n\n function wrapper() {\n var argsIndex = -1,\n argsLength = arguments.length,\n leftIndex = -1,\n leftLength = partials.length,\n args = Array(leftLength + argsLength),\n fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n\n while (++leftIndex < leftLength) {\n args[leftIndex] = partials[leftIndex];\n }\n while (argsLength--) {\n args[leftIndex++] = arguments[++argsIndex];\n }\n return apply(fn, isBind ? thisArg : this, args);\n }\n return wrapper;\n }\n\n /**\n * Creates a `_.range` or `_.rangeRight` function.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new range function.\n */\n function createRange(fromRight) {\n return function(start, end, step) {\n if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {\n end = step = undefined;\n }\n // Ensure the sign of `-0` is preserved.\n start = toFinite(start);\n if (end === undefined) {\n end = start;\n start = 0;\n } else {\n end = toFinite(end);\n }\n step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);\n return baseRange(start, end, step, fromRight);\n };\n }\n\n /**\n * Creates a function that performs a relational operation on two values.\n *\n * @private\n * @param {Function} operator The function to perform the operation.\n * @returns {Function} Returns the new relational operation function.\n */\n function createRelationalOperation(operator) {\n return function(value, other) {\n if (!(typeof value == 'string' && typeof other == 'string')) {\n value = toNumber(value);\n other = toNumber(other);\n }\n return operator(value, other);\n };\n }\n\n /**\n * Creates a function that wraps `func` to continue currying.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {Function} wrapFunc The function to create the `func` wrapper.\n * @param {*} placeholder The placeholder value.\n * @param {*} [thisArg] The `this` binding of `func`.\n * @param {Array} [partials] The arguments to prepend to those provided to\n * the new function.\n * @param {Array} [holders] The `partials` placeholder indexes.\n * @param {Array} [argPos] The argument positions of the new function.\n * @param {number} [ary] The arity cap of `func`.\n * @param {number} [arity] The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {\n var isCurry = bitmask & WRAP_CURRY_FLAG,\n newHolders = isCurry ? holders : undefined,\n newHoldersRight = isCurry ? undefined : holders,\n newPartials = isCurry ? partials : undefined,\n newPartialsRight = isCurry ? undefined : partials;\n\n bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG);\n bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);\n\n if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {\n bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG);\n }\n var newData = [\n func, bitmask, thisArg, newPartials, newHolders, newPartialsRight,\n newHoldersRight, argPos, ary, arity\n ];\n\n var result = wrapFunc.apply(undefined, newData);\n if (isLaziable(func)) {\n setData(result, newData);\n }\n result.placeholder = placeholder;\n return setWrapToString(result, func, bitmask);\n }\n\n /**\n * Creates a function like `_.round`.\n *\n * @private\n * @param {string} methodName The name of the `Math` method to use when rounding.\n * @returns {Function} Returns the new round function.\n */\n function createRound(methodName) {\n var func = Math[methodName];\n return function(number, precision) {\n number = toNumber(number);\n precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);\n if (precision && nativeIsFinite(number)) {\n // Shift with exponential notation to avoid floating-point issues.\n // See [MDN](https://mdn.io/round#Examples) for more details.\n var pair = (toString(number) + 'e').split('e'),\n value = func(pair[0] + 'e' + (+pair[1] + precision));\n\n pair = (toString(value) + 'e').split('e');\n return +(pair[0] + 'e' + (+pair[1] - precision));\n }\n return func(number);\n };\n }\n\n /**\n * Creates a set object of `values`.\n *\n * @private\n * @param {Array} values The values to add to the set.\n * @returns {Object} Returns the new set.\n */\n var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {\n return new Set(values);\n };\n\n /**\n * Creates a `_.toPairs` or `_.toPairsIn` function.\n *\n * @private\n * @param {Function} keysFunc The function to get the keys of a given object.\n * @returns {Function} Returns the new pairs function.\n */\n function createToPairs(keysFunc) {\n return function(object) {\n var tag = getTag(object);\n if (tag == mapTag) {\n return mapToArray(object);\n }\n if (tag == setTag) {\n return setToPairs(object);\n }\n return baseToPairs(object, keysFunc(object));\n };\n }\n\n /**\n * Creates a function that either curries or invokes `func` with optional\n * `this` binding and partially applied arguments.\n *\n * @private\n * @param {Function|string} func The function or method name to wrap.\n * @param {number} bitmask The bitmask flags.\n * 1 - `_.bind`\n * 2 - `_.bindKey`\n * 4 - `_.curry` or `_.curryRight` of a bound function\n * 8 - `_.curry`\n * 16 - `_.curryRight`\n * 32 - `_.partial`\n * 64 - `_.partialRight`\n * 128 - `_.rearg`\n * 256 - `_.ary`\n * 512 - `_.flip`\n * @param {*} [thisArg] The `this` binding of `func`.\n * @param {Array} [partials] The arguments to be partially applied.\n * @param {Array} [holders] The `partials` placeholder indexes.\n * @param {Array} [argPos] The argument positions of the new function.\n * @param {number} [ary] The arity cap of `func`.\n * @param {number} [arity] The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {\n var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;\n if (!isBindKey && typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var length = partials ? partials.length : 0;\n if (!length) {\n bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG);\n partials = holders = undefined;\n }\n ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0);\n arity = arity === undefined ? arity : toInteger(arity);\n length -= holders ? holders.length : 0;\n\n if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) {\n var partialsRight = partials,\n holdersRight = holders;\n\n partials = holders = undefined;\n }\n var data = isBindKey ? undefined : getData(func);\n\n var newData = [\n func, bitmask, thisArg, partials, holders, partialsRight, holdersRight,\n argPos, ary, arity\n ];\n\n if (data) {\n mergeData(newData, data);\n }\n func = newData[0];\n bitmask = newData[1];\n thisArg = newData[2];\n partials = newData[3];\n holders = newData[4];\n arity = newData[9] = newData[9] === undefined\n ? (isBindKey ? 0 : func.length)\n : nativeMax(newData[9] - length, 0);\n\n if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {\n bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);\n }\n if (!bitmask || bitmask == WRAP_BIND_FLAG) {\n var result = createBind(func, bitmask, thisArg);\n } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) {\n result = createCurry(func, bitmask, arity);\n } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) {\n result = createPartial(func, bitmask, thisArg, partials);\n } else {\n result = createHybrid.apply(undefined, newData);\n }\n var setter = data ? baseSetData : setData;\n return setWrapToString(setter(result, newData), func, bitmask);\n }\n\n /**\n * Used by `_.defaults` to customize its `_.assignIn` use to assign properties\n * of source objects to the destination object for all destination properties\n * that resolve to `undefined`.\n *\n * @private\n * @param {*} objValue The destination value.\n * @param {*} srcValue The source value.\n * @param {string} key The key of the property to assign.\n * @param {Object} object The parent object of `objValue`.\n * @returns {*} Returns the value to assign.\n */\n function customDefaultsAssignIn(objValue, srcValue, key, object) {\n if (objValue === undefined ||\n (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {\n return srcValue;\n }\n return objValue;\n }\n\n /**\n * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source\n * objects into destination objects that are passed thru.\n *\n * @private\n * @param {*} objValue The destination value.\n * @param {*} srcValue The source value.\n * @param {string} key The key of the property to merge.\n * @param {Object} object The parent object of `objValue`.\n * @param {Object} source The parent object of `srcValue`.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n * @returns {*} Returns the value to assign.\n */\n function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {\n if (isObject(objValue) && isObject(srcValue)) {\n // Recursively merge objects and arrays (susceptible to call stack limits).\n stack.set(srcValue, objValue);\n baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack);\n stack['delete'](srcValue);\n }\n return objValue;\n }\n\n /**\n * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain\n * objects.\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {string} key The key of the property to inspect.\n * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`.\n */\n function customOmitClone(value) {\n return isPlainObject(value) ? undefined : value;\n }\n\n /**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\n function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n }\n\n /**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\n function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n }\n\n /**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\n function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n }\n\n /**\n * A specialized version of `baseRest` which flattens the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @returns {Function} Returns the new function.\n */\n function flatRest(func) {\n return setToString(overRest(func, undefined, flatten), func + '');\n }\n\n /**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\n function getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n }\n\n /**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\n function getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n }\n\n /**\n * Gets metadata for `func`.\n *\n * @private\n * @param {Function} func The function to query.\n * @returns {*} Returns the metadata for `func`.\n */\n var getData = !metaMap ? noop : function(func) {\n return metaMap.get(func);\n };\n\n /**\n * Gets the name of `func`.\n *\n * @private\n * @param {Function} func The function to query.\n * @returns {string} Returns the function name.\n */\n function getFuncName(func) {\n var result = (func.name + ''),\n array = realNames[result],\n length = hasOwnProperty.call(realNames, result) ? array.length : 0;\n\n while (length--) {\n var data = array[length],\n otherFunc = data.func;\n if (otherFunc == null || otherFunc == func) {\n return data.name;\n }\n }\n return result;\n }\n\n /**\n * Gets the argument placeholder value for `func`.\n *\n * @private\n * @param {Function} func The function to inspect.\n * @returns {*} Returns the placeholder value.\n */\n function getHolder(func) {\n var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func;\n return object.placeholder;\n }\n\n /**\n * Gets the appropriate \"iteratee\" function. If `_.iteratee` is customized,\n * this function returns the custom method, otherwise it returns `baseIteratee`.\n * If arguments are provided, the chosen function is invoked with them and\n * its result is returned.\n *\n * @private\n * @param {*} [value] The value to convert to an iteratee.\n * @param {number} [arity] The arity of the created iteratee.\n * @returns {Function} Returns the chosen function or its result.\n */\n function getIteratee() {\n var result = lodash.iteratee || iteratee;\n result = result === iteratee ? baseIteratee : result;\n return arguments.length ? result(arguments[0], arguments[1]) : result;\n }\n\n /**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\n function getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n }\n\n /**\n * Gets the property names, values, and compare flags of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the match data of `object`.\n */\n function getMatchData(object) {\n var result = keys(object),\n length = result.length;\n\n while (length--) {\n var key = result[length],\n value = object[key];\n\n result[length] = [key, value, isStrictComparable(value)];\n }\n return result;\n }\n\n /**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\n function getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n }\n\n /**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\n function getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n }\n\n /**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\n var getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n };\n\n /**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\n var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n };\n\n /**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\n var getTag = baseGetTag;\n\n // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\n if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n }\n\n /**\n * Gets the view, applying any `transforms` to the `start` and `end` positions.\n *\n * @private\n * @param {number} start The start of the view.\n * @param {number} end The end of the view.\n * @param {Array} transforms The transformations to apply to the view.\n * @returns {Object} Returns an object containing the `start` and `end`\n * positions of the view.\n */\n function getView(start, end, transforms) {\n var index = -1,\n length = transforms.length;\n\n while (++index < length) {\n var data = transforms[index],\n size = data.size;\n\n switch (data.type) {\n case 'drop': start += size; break;\n case 'dropRight': end -= size; break;\n case 'take': end = nativeMin(end, start + size); break;\n case 'takeRight': start = nativeMax(start, end - size); break;\n }\n }\n return { 'start': start, 'end': end };\n }\n\n /**\n * Extracts wrapper details from the `source` body comment.\n *\n * @private\n * @param {string} source The source to inspect.\n * @returns {Array} Returns the wrapper details.\n */\n function getWrapDetails(source) {\n var match = source.match(reWrapDetails);\n return match ? match[1].split(reSplitDetails) : [];\n }\n\n /**\n * Checks if `path` exists on `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @param {Function} hasFunc The function to check properties.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n */\n function hasPath(object, path, hasFunc) {\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n result = false;\n\n while (++index < length) {\n var key = toKey(path[index]);\n if (!(result = object != null && hasFunc(object, key))) {\n break;\n }\n object = object[key];\n }\n if (result || ++index != length) {\n return result;\n }\n length = object == null ? 0 : object.length;\n return !!length && isLength(length) && isIndex(key, length) &&\n (isArray(object) || isArguments(object));\n }\n\n /**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\n function initCloneArray(array) {\n var length = array.length,\n result = new array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n }\n\n /**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\n function initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n }\n\n /**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\n function initCloneByTag(object, tag, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return new Ctor;\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return new Ctor;\n\n case symbolTag:\n return cloneSymbol(object);\n }\n }\n\n /**\n * Inserts wrapper `details` in a comment at the top of the `source` body.\n *\n * @private\n * @param {string} source The source to modify.\n * @returns {Array} details The details to insert.\n * @returns {string} Returns the modified source.\n */\n function insertWrapDetails(source, details) {\n var length = details.length;\n if (!length) {\n return source;\n }\n var lastIndex = length - 1;\n details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex];\n details = details.join(length > 2 ? ', ' : ' ');\n return source.replace(reWrapComment, '{\\n/* [wrapped with ' + details + '] */\\n');\n }\n\n /**\n * Checks if `value` is a flattenable `arguments` object or array.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.\n */\n function isFlattenable(value) {\n return isArray(value) || isArguments(value) ||\n !!(spreadableSymbol && value && value[spreadableSymbol]);\n }\n\n /**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\n function isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n }\n\n /**\n * Checks if the given arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n * else `false`.\n */\n function isIterateeCall(value, index, object) {\n if (!isObject(object)) {\n return false;\n }\n var type = typeof index;\n if (type == 'number'\n ? (isArrayLike(object) && isIndex(index, object.length))\n : (type == 'string' && index in object)\n ) {\n return eq(object[index], value);\n }\n return false;\n }\n\n /**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\n function isKey(value, object) {\n if (isArray(value)) {\n return false;\n }\n var type = typeof value;\n if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n value == null || isSymbol(value)) {\n return true;\n }\n return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n (object != null && value in Object(object));\n }\n\n /**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\n function isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n }\n\n /**\n * Checks if `func` has a lazy counterpart.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` has a lazy counterpart,\n * else `false`.\n */\n function isLaziable(func) {\n var funcName = getFuncName(func),\n other = lodash[funcName];\n\n if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {\n return false;\n }\n if (func === other) {\n return true;\n }\n var data = getData(other);\n return !!data && func === data[0];\n }\n\n /**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\n function isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n }\n\n /**\n * Checks if `func` is capable of being masked.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `func` is maskable, else `false`.\n */\n var isMaskable = coreJsData ? isFunction : stubFalse;\n\n /**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\n function isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n }\n\n /**\n * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` if suitable for strict\n * equality comparisons, else `false`.\n */\n function isStrictComparable(value) {\n return value === value && !isObject(value);\n }\n\n /**\n * A specialized version of `matchesProperty` for source values suitable\n * for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\n function matchesStrictComparable(key, srcValue) {\n return function(object) {\n if (object == null) {\n return false;\n }\n return object[key] === srcValue &&\n (srcValue !== undefined || (key in Object(object)));\n };\n }\n\n /**\n * A specialized version of `_.memoize` which clears the memoized function's\n * cache when it exceeds `MAX_MEMOIZE_SIZE`.\n *\n * @private\n * @param {Function} func The function to have its output memoized.\n * @returns {Function} Returns the new memoized function.\n */\n function memoizeCapped(func) {\n var result = memoize(func, function(key) {\n if (cache.size === MAX_MEMOIZE_SIZE) {\n cache.clear();\n }\n return key;\n });\n\n var cache = result.cache;\n return result;\n }\n\n /**\n * Merges the function metadata of `source` into `data`.\n *\n * Merging metadata reduces the number of wrappers used to invoke a function.\n * This is possible because methods like `_.bind`, `_.curry`, and `_.partial`\n * may be applied regardless of execution order. Methods like `_.ary` and\n * `_.rearg` modify function arguments, making the order in which they are\n * executed important, preventing the merging of metadata. However, we make\n * an exception for a safe combined case where curried functions have `_.ary`\n * and or `_.rearg` applied.\n *\n * @private\n * @param {Array} data The destination metadata.\n * @param {Array} source The source metadata.\n * @returns {Array} Returns `data`.\n */\n function mergeData(data, source) {\n var bitmask = data[1],\n srcBitmask = source[1],\n newBitmask = bitmask | srcBitmask,\n isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);\n\n var isCombo =\n ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) ||\n ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) ||\n ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG));\n\n // Exit early if metadata can't be merged.\n if (!(isCommon || isCombo)) {\n return data;\n }\n // Use source `thisArg` if available.\n if (srcBitmask & WRAP_BIND_FLAG) {\n data[2] = source[2];\n // Set when currying a bound function.\n newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;\n }\n // Compose partial arguments.\n var value = source[3];\n if (value) {\n var partials = data[3];\n data[3] = partials ? composeArgs(partials, value, source[4]) : value;\n data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];\n }\n // Compose partial right arguments.\n value = source[5];\n if (value) {\n partials = data[5];\n data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;\n data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];\n }\n // Use source `argPos` if available.\n value = source[7];\n if (value) {\n data[7] = value;\n }\n // Use source `ary` if it's smaller.\n if (srcBitmask & WRAP_ARY_FLAG) {\n data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);\n }\n // Use source `arity` if one is not provided.\n if (data[9] == null) {\n data[9] = source[9];\n }\n // Use source `func` and merge bitmasks.\n data[0] = source[0];\n data[1] = newBitmask;\n\n return data;\n }\n\n /**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\n function nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n }\n\n /**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\n function objectToString(value) {\n return nativeObjectToString.call(value);\n }\n\n /**\n * A specialized version of `baseRest` which transforms the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @param {Function} transform The rest array transform.\n * @returns {Function} Returns the new function.\n */\n function overRest(func, start, transform) {\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n index = -1;\n var otherArgs = Array(start + 1);\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = transform(array);\n return apply(func, this, otherArgs);\n };\n }\n\n /**\n * Gets the parent value at `path` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array} path The path to get the parent value of.\n * @returns {*} Returns the parent value.\n */\n function parent(object, path) {\n return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));\n }\n\n /**\n * Reorder `array` according to the specified indexes where the element at\n * the first index is assigned as the first element, the element at\n * the second index is assigned as the second element, and so on.\n *\n * @private\n * @param {Array} array The array to reorder.\n * @param {Array} indexes The arranged array indexes.\n * @returns {Array} Returns `array`.\n */\n function reorder(array, indexes) {\n var arrLength = array.length,\n length = nativeMin(indexes.length, arrLength),\n oldArray = copyArray(array);\n\n while (length--) {\n var index = indexes[length];\n array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;\n }\n return array;\n }\n\n /**\n * Gets the value at `key`, unless `key` is \"__proto__\" or \"constructor\".\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\n function safeGet(object, key) {\n if (key === 'constructor' && typeof object[key] === 'function') {\n return;\n }\n\n if (key == '__proto__') {\n return;\n }\n\n return object[key];\n }\n\n /**\n * Sets metadata for `func`.\n *\n * **Note:** If this function becomes hot, i.e. is invoked a lot in a short\n * period of time, it will trip its breaker and transition to an identity\n * function to avoid garbage collection pauses in V8. See\n * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070)\n * for more details.\n *\n * @private\n * @param {Function} func The function to associate metadata with.\n * @param {*} data The metadata.\n * @returns {Function} Returns `func`.\n */\n var setData = shortOut(baseSetData);\n\n /**\n * A simple wrapper around the global [`setTimeout`](https://mdn.io/setTimeout).\n *\n * @private\n * @param {Function} func The function to delay.\n * @param {number} wait The number of milliseconds to delay invocation.\n * @returns {number|Object} Returns the timer id or timeout object.\n */\n var setTimeout = ctxSetTimeout || function(func, wait) {\n return root.setTimeout(func, wait);\n };\n\n /**\n * Sets the `toString` method of `func` to return `string`.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\n var setToString = shortOut(baseSetToString);\n\n /**\n * Sets the `toString` method of `wrapper` to mimic the source of `reference`\n * with wrapper details in a comment at the top of the source body.\n *\n * @private\n * @param {Function} wrapper The function to modify.\n * @param {Function} reference The reference function.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @returns {Function} Returns `wrapper`.\n */\n function setWrapToString(wrapper, reference, bitmask) {\n var source = (reference + '');\n return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));\n }\n\n /**\n * Creates a function that'll short out and invoke `identity` instead\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n * milliseconds.\n *\n * @private\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new shortable function.\n */\n function shortOut(func) {\n var count = 0,\n lastCalled = 0;\n\n return function() {\n var stamp = nativeNow(),\n remaining = HOT_SPAN - (stamp - lastCalled);\n\n lastCalled = stamp;\n if (remaining > 0) {\n if (++count >= HOT_COUNT) {\n return arguments[0];\n }\n } else {\n count = 0;\n }\n return func.apply(undefined, arguments);\n };\n }\n\n /**\n * A specialized version of `_.shuffle` which mutates and sets the size of `array`.\n *\n * @private\n * @param {Array} array The array to shuffle.\n * @param {number} [size=array.length] The size of `array`.\n * @returns {Array} Returns `array`.\n */\n function shuffleSelf(array, size) {\n var index = -1,\n length = array.length,\n lastIndex = length - 1;\n\n size = size === undefined ? length : size;\n while (++index < size) {\n var rand = baseRandom(index, lastIndex),\n value = array[rand];\n\n array[rand] = array[index];\n array[index] = value;\n }\n array.length = size;\n return array;\n }\n\n /**\n * Converts `string` to a property path array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the property path array.\n */\n var stringToPath = memoizeCapped(function(string) {\n var result = [];\n if (string.charCodeAt(0) === 46 /* . */) {\n result.push('');\n }\n string.replace(rePropName, function(match, number, quote, subString) {\n result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));\n });\n return result;\n });\n\n /**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\n function toKey(value) {\n if (typeof value == 'string' || isSymbol(value)) {\n return value;\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n }\n\n /**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\n function toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n }\n\n /**\n * Updates wrapper `details` based on `bitmask` flags.\n *\n * @private\n * @returns {Array} details The details to modify.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @returns {Array} Returns `details`.\n */\n function updateWrapDetails(details, bitmask) {\n arrayEach(wrapFlags, function(pair) {\n var value = '_.' + pair[0];\n if ((bitmask & pair[1]) && !arrayIncludes(details, value)) {\n details.push(value);\n }\n });\n return details.sort();\n }\n\n /**\n * Creates a clone of `wrapper`.\n *\n * @private\n * @param {Object} wrapper The wrapper to clone.\n * @returns {Object} Returns the cloned wrapper.\n */\n function wrapperClone(wrapper) {\n if (wrapper instanceof LazyWrapper) {\n return wrapper.clone();\n }\n var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);\n result.__actions__ = copyArray(wrapper.__actions__);\n result.__index__ = wrapper.__index__;\n result.__values__ = wrapper.__values__;\n return result;\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates an array of elements split into groups the length of `size`.\n * If `array` can't be split evenly, the final chunk will be the remaining\n * elements.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to process.\n * @param {number} [size=1] The length of each chunk\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the new array of chunks.\n * @example\n *\n * _.chunk(['a', 'b', 'c', 'd'], 2);\n * // => [['a', 'b'], ['c', 'd']]\n *\n * _.chunk(['a', 'b', 'c', 'd'], 3);\n * // => [['a', 'b', 'c'], ['d']]\n */\n function chunk(array, size, guard) {\n if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) {\n size = 1;\n } else {\n size = nativeMax(toInteger(size), 0);\n }\n var length = array == null ? 0 : array.length;\n if (!length || size < 1) {\n return [];\n }\n var index = 0,\n resIndex = 0,\n result = Array(nativeCeil(length / size));\n\n while (index < length) {\n result[resIndex++] = baseSlice(array, index, (index += size));\n }\n return result;\n }\n\n /**\n * Creates an array with all falsey values removed. The values `false`, `null`,\n * `0`, `\"\"`, `undefined`, and `NaN` are falsey.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to compact.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * _.compact([0, 1, false, 2, '', 3]);\n * // => [1, 2, 3]\n */\n function compact(array) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (value) {\n result[resIndex++] = value;\n }\n }\n return result;\n }\n\n /**\n * Creates a new array concatenating `array` with any additional arrays\n * and/or values.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to concatenate.\n * @param {...*} [values] The values to concatenate.\n * @returns {Array} Returns the new concatenated array.\n * @example\n *\n * var array = [1];\n * var other = _.concat(array, 2, [3], [[4]]);\n *\n * console.log(other);\n * // => [1, 2, 3, [4]]\n *\n * console.log(array);\n * // => [1]\n */\n function concat() {\n var length = arguments.length;\n if (!length) {\n return [];\n }\n var args = Array(length - 1),\n array = arguments[0],\n index = length;\n\n while (index--) {\n args[index - 1] = arguments[index];\n }\n return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));\n }\n\n /**\n * Creates an array of `array` values not included in the other given arrays\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons. The order and references of result values are\n * determined by the first array.\n *\n * **Note:** Unlike `_.pullAll`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...Array} [values] The values to exclude.\n * @returns {Array} Returns the new array of filtered values.\n * @see _.without, _.xor\n * @example\n *\n * _.difference([2, 1], [2, 3]);\n * // => [1]\n */\n var difference = baseRest(function(array, values) {\n return isArrayLikeObject(array)\n ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))\n : [];\n });\n\n /**\n * This method is like `_.difference` except that it accepts `iteratee` which\n * is invoked for each element of `array` and `values` to generate the criterion\n * by which they're compared. The order and references of result values are\n * determined by the first array. The iteratee is invoked with one argument:\n * (value).\n *\n * **Note:** Unlike `_.pullAllBy`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...Array} [values] The values to exclude.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n * // => [1.2]\n *\n * // The `_.property` iteratee shorthand.\n * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x');\n * // => [{ 'x': 2 }]\n */\n var differenceBy = baseRest(function(array, values) {\n var iteratee = last(values);\n if (isArrayLikeObject(iteratee)) {\n iteratee = undefined;\n }\n return isArrayLikeObject(array)\n ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee, 2))\n : [];\n });\n\n /**\n * This method is like `_.difference` except that it accepts `comparator`\n * which is invoked to compare elements of `array` to `values`. The order and\n * references of result values are determined by the first array. The comparator\n * is invoked with two arguments: (arrVal, othVal).\n *\n * **Note:** Unlike `_.pullAllWith`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...Array} [values] The values to exclude.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n *\n * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);\n * // => [{ 'x': 2, 'y': 1 }]\n */\n var differenceWith = baseRest(function(array, values) {\n var comparator = last(values);\n if (isArrayLikeObject(comparator)) {\n comparator = undefined;\n }\n return isArrayLikeObject(array)\n ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator)\n : [];\n });\n\n /**\n * Creates a slice of `array` with `n` elements dropped from the beginning.\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to drop.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.drop([1, 2, 3]);\n * // => [2, 3]\n *\n * _.drop([1, 2, 3], 2);\n * // => [3]\n *\n * _.drop([1, 2, 3], 5);\n * // => []\n *\n * _.drop([1, 2, 3], 0);\n * // => [1, 2, 3]\n */\n function drop(array, n, guard) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n n = (guard || n === undefined) ? 1 : toInteger(n);\n return baseSlice(array, n < 0 ? 0 : n, length);\n }\n\n /**\n * Creates a slice of `array` with `n` elements dropped from the end.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to drop.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.dropRight([1, 2, 3]);\n * // => [1, 2]\n *\n * _.dropRight([1, 2, 3], 2);\n * // => [1]\n *\n * _.dropRight([1, 2, 3], 5);\n * // => []\n *\n * _.dropRight([1, 2, 3], 0);\n * // => [1, 2, 3]\n */\n function dropRight(array, n, guard) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n n = (guard || n === undefined) ? 1 : toInteger(n);\n n = length - n;\n return baseSlice(array, 0, n < 0 ? 0 : n);\n }\n\n /**\n * Creates a slice of `array` excluding elements dropped from the end.\n * Elements are dropped until `predicate` returns falsey. The predicate is\n * invoked with three arguments: (value, index, array).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': false }\n * ];\n *\n * _.dropRightWhile(users, function(o) { return !o.active; });\n * // => objects for ['barney']\n *\n * // The `_.matches` iteratee shorthand.\n * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false });\n * // => objects for ['barney', 'fred']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.dropRightWhile(users, ['active', false]);\n * // => objects for ['barney']\n *\n * // The `_.property` iteratee shorthand.\n * _.dropRightWhile(users, 'active');\n * // => objects for ['barney', 'fred', 'pebbles']\n */\n function dropRightWhile(array, predicate) {\n return (array && array.length)\n ? baseWhile(array, getIteratee(predicate, 3), true, true)\n : [];\n }\n\n /**\n * Creates a slice of `array` excluding elements dropped from the beginning.\n * Elements are dropped until `predicate` returns falsey. The predicate is\n * invoked with three arguments: (value, index, array).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.dropWhile(users, function(o) { return !o.active; });\n * // => objects for ['pebbles']\n *\n * // The `_.matches` iteratee shorthand.\n * _.dropWhile(users, { 'user': 'barney', 'active': false });\n * // => objects for ['fred', 'pebbles']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.dropWhile(users, ['active', false]);\n * // => objects for ['pebbles']\n *\n * // The `_.property` iteratee shorthand.\n * _.dropWhile(users, 'active');\n * // => objects for ['barney', 'fred', 'pebbles']\n */\n function dropWhile(array, predicate) {\n return (array && array.length)\n ? baseWhile(array, getIteratee(predicate, 3), true)\n : [];\n }\n\n /**\n * Fills elements of `array` with `value` from `start` up to, but not\n * including, `end`.\n *\n * **Note:** This method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 3.2.0\n * @category Array\n * @param {Array} array The array to fill.\n * @param {*} value The value to fill `array` with.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [1, 2, 3];\n *\n * _.fill(array, 'a');\n * console.log(array);\n * // => ['a', 'a', 'a']\n *\n * _.fill(Array(3), 2);\n * // => [2, 2, 2]\n *\n * _.fill([4, 6, 8, 10], '*', 1, 3);\n * // => [4, '*', '*', 10]\n */\n function fill(array, value, start, end) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n if (start && typeof start != 'number' && isIterateeCall(array, value, start)) {\n start = 0;\n end = length;\n }\n return baseFill(array, value, start, end);\n }\n\n /**\n * This method is like `_.find` except that it returns the index of the first\n * element `predicate` returns truthy for instead of the element itself.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {number} Returns the index of the found element, else `-1`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.findIndex(users, function(o) { return o.user == 'barney'; });\n * // => 0\n *\n * // The `_.matches` iteratee shorthand.\n * _.findIndex(users, { 'user': 'fred', 'active': false });\n * // => 1\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findIndex(users, ['active', false]);\n * // => 0\n *\n * // The `_.property` iteratee shorthand.\n * _.findIndex(users, 'active');\n * // => 2\n */\n function findIndex(array, predicate, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = fromIndex == null ? 0 : toInteger(fromIndex);\n if (index < 0) {\n index = nativeMax(length + index, 0);\n }\n return baseFindIndex(array, getIteratee(predicate, 3), index);\n }\n\n /**\n * This method is like `_.findIndex` except that it iterates over elements\n * of `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=array.length-1] The index to search from.\n * @returns {number} Returns the index of the found element, else `-1`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': false }\n * ];\n *\n * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; });\n * // => 2\n *\n * // The `_.matches` iteratee shorthand.\n * _.findLastIndex(users, { 'user': 'barney', 'active': true });\n * // => 0\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findLastIndex(users, ['active', false]);\n * // => 2\n *\n * // The `_.property` iteratee shorthand.\n * _.findLastIndex(users, 'active');\n * // => 0\n */\n function findLastIndex(array, predicate, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = length - 1;\n if (fromIndex !== undefined) {\n index = toInteger(fromIndex);\n index = fromIndex < 0\n ? nativeMax(length + index, 0)\n : nativeMin(index, length - 1);\n }\n return baseFindIndex(array, getIteratee(predicate, 3), index, true);\n }\n\n /**\n * Flattens `array` a single level deep.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * _.flatten([1, [2, [3, [4]], 5]]);\n * // => [1, 2, [3, [4]], 5]\n */\n function flatten(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseFlatten(array, 1) : [];\n }\n\n /**\n * Recursively flattens `array`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * _.flattenDeep([1, [2, [3, [4]], 5]]);\n * // => [1, 2, 3, 4, 5]\n */\n function flattenDeep(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseFlatten(array, INFINITY) : [];\n }\n\n /**\n * Recursively flatten `array` up to `depth` times.\n *\n * @static\n * @memberOf _\n * @since 4.4.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @param {number} [depth=1] The maximum recursion depth.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * var array = [1, [2, [3, [4]], 5]];\n *\n * _.flattenDepth(array, 1);\n * // => [1, 2, [3, [4]], 5]\n *\n * _.flattenDepth(array, 2);\n * // => [1, 2, 3, [4], 5]\n */\n function flattenDepth(array, depth) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n depth = depth === undefined ? 1 : toInteger(depth);\n return baseFlatten(array, depth);\n }\n\n /**\n * The inverse of `_.toPairs`; this method returns an object composed\n * from key-value `pairs`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} pairs The key-value pairs.\n * @returns {Object} Returns the new object.\n * @example\n *\n * _.fromPairs([['a', 1], ['b', 2]]);\n * // => { 'a': 1, 'b': 2 }\n */\n function fromPairs(pairs) {\n var index = -1,\n length = pairs == null ? 0 : pairs.length,\n result = {};\n\n while (++index < length) {\n var pair = pairs[index];\n result[pair[0]] = pair[1];\n }\n return result;\n }\n\n /**\n * Gets the first element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @alias first\n * @category Array\n * @param {Array} array The array to query.\n * @returns {*} Returns the first element of `array`.\n * @example\n *\n * _.head([1, 2, 3]);\n * // => 1\n *\n * _.head([]);\n * // => undefined\n */\n function head(array) {\n return (array && array.length) ? array[0] : undefined;\n }\n\n /**\n * Gets the index at which the first occurrence of `value` is found in `array`\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons. If `fromIndex` is negative, it's used as the\n * offset from the end of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.indexOf([1, 2, 1, 2], 2);\n * // => 1\n *\n * // Search from the `fromIndex`.\n * _.indexOf([1, 2, 1, 2], 2, 2);\n * // => 3\n */\n function indexOf(array, value, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = fromIndex == null ? 0 : toInteger(fromIndex);\n if (index < 0) {\n index = nativeMax(length + index, 0);\n }\n return baseIndexOf(array, value, index);\n }\n\n /**\n * Gets all but the last element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.initial([1, 2, 3]);\n * // => [1, 2]\n */\n function initial(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseSlice(array, 0, -1) : [];\n }\n\n /**\n * Creates an array of unique values that are included in all given arrays\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons. The order and references of result values are\n * determined by the first array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @returns {Array} Returns the new array of intersecting values.\n * @example\n *\n * _.intersection([2, 1], [2, 3]);\n * // => [2]\n */\n var intersection = baseRest(function(arrays) {\n var mapped = arrayMap(arrays, castArrayLikeObject);\n return (mapped.length && mapped[0] === arrays[0])\n ? baseIntersection(mapped)\n : [];\n });\n\n /**\n * This method is like `_.intersection` except that it accepts `iteratee`\n * which is invoked for each element of each `arrays` to generate the criterion\n * by which they're compared. The order and references of result values are\n * determined by the first array. The iteratee is invoked with one argument:\n * (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new array of intersecting values.\n * @example\n *\n * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n * // => [2.1]\n *\n * // The `_.property` iteratee shorthand.\n * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 1 }]\n */\n var intersectionBy = baseRest(function(arrays) {\n var iteratee = last(arrays),\n mapped = arrayMap(arrays, castArrayLikeObject);\n\n if (iteratee === last(mapped)) {\n iteratee = undefined;\n } else {\n mapped.pop();\n }\n return (mapped.length && mapped[0] === arrays[0])\n ? baseIntersection(mapped, getIteratee(iteratee, 2))\n : [];\n });\n\n /**\n * This method is like `_.intersection` except that it accepts `comparator`\n * which is invoked to compare elements of `arrays`. The order and references\n * of result values are determined by the first array. The comparator is\n * invoked with two arguments: (arrVal, othVal).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of intersecting values.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n *\n * _.intersectionWith(objects, others, _.isEqual);\n * // => [{ 'x': 1, 'y': 2 }]\n */\n var intersectionWith = baseRest(function(arrays) {\n var comparator = last(arrays),\n mapped = arrayMap(arrays, castArrayLikeObject);\n\n comparator = typeof comparator == 'function' ? comparator : undefined;\n if (comparator) {\n mapped.pop();\n }\n return (mapped.length && mapped[0] === arrays[0])\n ? baseIntersection(mapped, undefined, comparator)\n : [];\n });\n\n /**\n * Converts all elements in `array` into a string separated by `separator`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to convert.\n * @param {string} [separator=','] The element separator.\n * @returns {string} Returns the joined string.\n * @example\n *\n * _.join(['a', 'b', 'c'], '~');\n * // => 'a~b~c'\n */\n function join(array, separator) {\n return array == null ? '' : nativeJoin.call(array, separator);\n }\n\n /**\n * Gets the last element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {*} Returns the last element of `array`.\n * @example\n *\n * _.last([1, 2, 3]);\n * // => 3\n */\n function last(array) {\n var length = array == null ? 0 : array.length;\n return length ? array[length - 1] : undefined;\n }\n\n /**\n * This method is like `_.indexOf` except that it iterates over elements of\n * `array` from right to left.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} [fromIndex=array.length-1] The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.lastIndexOf([1, 2, 1, 2], 2);\n * // => 3\n *\n * // Search from the `fromIndex`.\n * _.lastIndexOf([1, 2, 1, 2], 2, 2);\n * // => 1\n */\n function lastIndexOf(array, value, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = length;\n if (fromIndex !== undefined) {\n index = toInteger(fromIndex);\n index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);\n }\n return value === value\n ? strictLastIndexOf(array, value, index)\n : baseFindIndex(array, baseIsNaN, index, true);\n }\n\n /**\n * Gets the element at index `n` of `array`. If `n` is negative, the nth\n * element from the end is returned.\n *\n * @static\n * @memberOf _\n * @since 4.11.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=0] The index of the element to return.\n * @returns {*} Returns the nth element of `array`.\n * @example\n *\n * var array = ['a', 'b', 'c', 'd'];\n *\n * _.nth(array, 1);\n * // => 'b'\n *\n * _.nth(array, -2);\n * // => 'c';\n */\n function nth(array, n) {\n return (array && array.length) ? baseNth(array, toInteger(n)) : undefined;\n }\n\n /**\n * Removes all given values from `array` using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove`\n * to remove elements from an array by predicate.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {...*} [values] The values to remove.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = ['a', 'b', 'c', 'a', 'b', 'c'];\n *\n * _.pull(array, 'a', 'c');\n * console.log(array);\n * // => ['b', 'b']\n */\n var pull = baseRest(pullAll);\n\n /**\n * This method is like `_.pull` except that it accepts an array of values to remove.\n *\n * **Note:** Unlike `_.difference`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Array} values The values to remove.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = ['a', 'b', 'c', 'a', 'b', 'c'];\n *\n * _.pullAll(array, ['a', 'c']);\n * console.log(array);\n * // => ['b', 'b']\n */\n function pullAll(array, values) {\n return (array && array.length && values && values.length)\n ? basePullAll(array, values)\n : array;\n }\n\n /**\n * This method is like `_.pullAll` except that it accepts `iteratee` which is\n * invoked for each element of `array` and `values` to generate the criterion\n * by which they're compared. The iteratee is invoked with one argument: (value).\n *\n * **Note:** Unlike `_.differenceBy`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Array} values The values to remove.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];\n *\n * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x');\n * console.log(array);\n * // => [{ 'x': 2 }]\n */\n function pullAllBy(array, values, iteratee) {\n return (array && array.length && values && values.length)\n ? basePullAll(array, values, getIteratee(iteratee, 2))\n : array;\n }\n\n /**\n * This method is like `_.pullAll` except that it accepts `comparator` which\n * is invoked to compare elements of `array` to `values`. The comparator is\n * invoked with two arguments: (arrVal, othVal).\n *\n * **Note:** Unlike `_.differenceWith`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 4.6.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Array} values The values to remove.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }];\n *\n * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual);\n * console.log(array);\n * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }]\n */\n function pullAllWith(array, values, comparator) {\n return (array && array.length && values && values.length)\n ? basePullAll(array, values, undefined, comparator)\n : array;\n }\n\n /**\n * Removes elements from `array` corresponding to `indexes` and returns an\n * array of removed elements.\n *\n * **Note:** Unlike `_.at`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {...(number|number[])} [indexes] The indexes of elements to remove.\n * @returns {Array} Returns the new array of removed elements.\n * @example\n *\n * var array = ['a', 'b', 'c', 'd'];\n * var pulled = _.pullAt(array, [1, 3]);\n *\n * console.log(array);\n * // => ['a', 'c']\n *\n * console.log(pulled);\n * // => ['b', 'd']\n */\n var pullAt = flatRest(function(array, indexes) {\n var length = array == null ? 0 : array.length,\n result = baseAt(array, indexes);\n\n basePullAt(array, arrayMap(indexes, function(index) {\n return isIndex(index, length) ? +index : index;\n }).sort(compareAscending));\n\n return result;\n });\n\n /**\n * Removes all elements from `array` that `predicate` returns truthy for\n * and returns an array of the removed elements. The predicate is invoked\n * with three arguments: (value, index, array).\n *\n * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull`\n * to pull elements from an array by value.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new array of removed elements.\n * @example\n *\n * var array = [1, 2, 3, 4];\n * var evens = _.remove(array, function(n) {\n * return n % 2 == 0;\n * });\n *\n * console.log(array);\n * // => [1, 3]\n *\n * console.log(evens);\n * // => [2, 4]\n */\n function remove(array, predicate) {\n var result = [];\n if (!(array && array.length)) {\n return result;\n }\n var index = -1,\n indexes = [],\n length = array.length;\n\n predicate = getIteratee(predicate, 3);\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result.push(value);\n indexes.push(index);\n }\n }\n basePullAt(array, indexes);\n return result;\n }\n\n /**\n * Reverses `array` so that the first element becomes the last, the second\n * element becomes the second to last, and so on.\n *\n * **Note:** This method mutates `array` and is based on\n * [`Array#reverse`](https://mdn.io/Array/reverse).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [1, 2, 3];\n *\n * _.reverse(array);\n * // => [3, 2, 1]\n *\n * console.log(array);\n * // => [3, 2, 1]\n */\n function reverse(array) {\n return array == null ? array : nativeReverse.call(array);\n }\n\n /**\n * Creates a slice of `array` from `start` up to, but not including, `end`.\n *\n * **Note:** This method is used instead of\n * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are\n * returned.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to slice.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the slice of `array`.\n */\n function slice(array, start, end) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n if (end && typeof end != 'number' && isIterateeCall(array, start, end)) {\n start = 0;\n end = length;\n }\n else {\n start = start == null ? 0 : toInteger(start);\n end = end === undefined ? length : toInteger(end);\n }\n return baseSlice(array, start, end);\n }\n\n /**\n * Uses a binary search to determine the lowest index at which `value`\n * should be inserted into `array` in order to maintain its sort order.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n * @example\n *\n * _.sortedIndex([30, 50], 40);\n * // => 1\n */\n function sortedIndex(array, value) {\n return baseSortedIndex(array, value);\n }\n\n /**\n * This method is like `_.sortedIndex` except that it accepts `iteratee`\n * which is invoked for `value` and each element of `array` to compute their\n * sort ranking. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n * @example\n *\n * var objects = [{ 'x': 4 }, { 'x': 5 }];\n *\n * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });\n * // => 0\n *\n * // The `_.property` iteratee shorthand.\n * _.sortedIndexBy(objects, { 'x': 4 }, 'x');\n * // => 0\n */\n function sortedIndexBy(array, value, iteratee) {\n return baseSortedIndexBy(array, value, getIteratee(iteratee, 2));\n }\n\n /**\n * This method is like `_.indexOf` except that it performs a binary\n * search on a sorted `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.sortedIndexOf([4, 5, 5, 5, 6], 5);\n * // => 1\n */\n function sortedIndexOf(array, value) {\n var length = array == null ? 0 : array.length;\n if (length) {\n var index = baseSortedIndex(array, value);\n if (index < length && eq(array[index], value)) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * This method is like `_.sortedIndex` except that it returns the highest\n * index at which `value` should be inserted into `array` in order to\n * maintain its sort order.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n * @example\n *\n * _.sortedLastIndex([4, 5, 5, 5, 6], 5);\n * // => 4\n */\n function sortedLastIndex(array, value) {\n return baseSortedIndex(array, value, true);\n }\n\n /**\n * This method is like `_.sortedLastIndex` except that it accepts `iteratee`\n * which is invoked for `value` and each element of `array` to compute their\n * sort ranking. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n * @example\n *\n * var objects = [{ 'x': 4 }, { 'x': 5 }];\n *\n * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });\n * // => 1\n *\n * // The `_.property` iteratee shorthand.\n * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x');\n * // => 1\n */\n function sortedLastIndexBy(array, value, iteratee) {\n return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true);\n }\n\n /**\n * This method is like `_.lastIndexOf` except that it performs a binary\n * search on a sorted `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5);\n * // => 3\n */\n function sortedLastIndexOf(array, value) {\n var length = array == null ? 0 : array.length;\n if (length) {\n var index = baseSortedIndex(array, value, true) - 1;\n if (eq(array[index], value)) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * This method is like `_.uniq` except that it's designed and optimized\n * for sorted arrays.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.sortedUniq([1, 1, 2]);\n * // => [1, 2]\n */\n function sortedUniq(array) {\n return (array && array.length)\n ? baseSortedUniq(array)\n : [];\n }\n\n /**\n * This method is like `_.uniqBy` except that it's designed and optimized\n * for sorted arrays.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor);\n * // => [1.1, 2.3]\n */\n function sortedUniqBy(array, iteratee) {\n return (array && array.length)\n ? baseSortedUniq(array, getIteratee(iteratee, 2))\n : [];\n }\n\n /**\n * Gets all but the first element of `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.tail([1, 2, 3]);\n * // => [2, 3]\n */\n function tail(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseSlice(array, 1, length) : [];\n }\n\n /**\n * Creates a slice of `array` with `n` elements taken from the beginning.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to take.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.take([1, 2, 3]);\n * // => [1]\n *\n * _.take([1, 2, 3], 2);\n * // => [1, 2]\n *\n * _.take([1, 2, 3], 5);\n * // => [1, 2, 3]\n *\n * _.take([1, 2, 3], 0);\n * // => []\n */\n function take(array, n, guard) {\n if (!(array && array.length)) {\n return [];\n }\n n = (guard || n === undefined) ? 1 : toInteger(n);\n return baseSlice(array, 0, n < 0 ? 0 : n);\n }\n\n /**\n * Creates a slice of `array` with `n` elements taken from the end.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to take.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.takeRight([1, 2, 3]);\n * // => [3]\n *\n * _.takeRight([1, 2, 3], 2);\n * // => [2, 3]\n *\n * _.takeRight([1, 2, 3], 5);\n * // => [1, 2, 3]\n *\n * _.takeRight([1, 2, 3], 0);\n * // => []\n */\n function takeRight(array, n, guard) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n n = (guard || n === undefined) ? 1 : toInteger(n);\n n = length - n;\n return baseSlice(array, n < 0 ? 0 : n, length);\n }\n\n /**\n * Creates a slice of `array` with elements taken from the end. Elements are\n * taken until `predicate` returns falsey. The predicate is invoked with\n * three arguments: (value, index, array).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': false }\n * ];\n *\n * _.takeRightWhile(users, function(o) { return !o.active; });\n * // => objects for ['fred', 'pebbles']\n *\n * // The `_.matches` iteratee shorthand.\n * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false });\n * // => objects for ['pebbles']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.takeRightWhile(users, ['active', false]);\n * // => objects for ['fred', 'pebbles']\n *\n * // The `_.property` iteratee shorthand.\n * _.takeRightWhile(users, 'active');\n * // => []\n */\n function takeRightWhile(array, predicate) {\n return (array && array.length)\n ? baseWhile(array, getIteratee(predicate, 3), false, true)\n : [];\n }\n\n /**\n * Creates a slice of `array` with elements taken from the beginning. Elements\n * are taken until `predicate` returns falsey. The predicate is invoked with\n * three arguments: (value, index, array).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.takeWhile(users, function(o) { return !o.active; });\n * // => objects for ['barney', 'fred']\n *\n * // The `_.matches` iteratee shorthand.\n * _.takeWhile(users, { 'user': 'barney', 'active': false });\n * // => objects for ['barney']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.takeWhile(users, ['active', false]);\n * // => objects for ['barney', 'fred']\n *\n * // The `_.property` iteratee shorthand.\n * _.takeWhile(users, 'active');\n * // => []\n */\n function takeWhile(array, predicate) {\n return (array && array.length)\n ? baseWhile(array, getIteratee(predicate, 3))\n : [];\n }\n\n /**\n * Creates an array of unique values, in order, from all given arrays using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @returns {Array} Returns the new array of combined values.\n * @example\n *\n * _.union([2], [1, 2]);\n * // => [2, 1]\n */\n var union = baseRest(function(arrays) {\n return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));\n });\n\n /**\n * This method is like `_.union` except that it accepts `iteratee` which is\n * invoked for each element of each `arrays` to generate the criterion by\n * which uniqueness is computed. Result values are chosen from the first\n * array in which the value occurs. The iteratee is invoked with one argument:\n * (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new array of combined values.\n * @example\n *\n * _.unionBy([2.1], [1.2, 2.3], Math.floor);\n * // => [2.1, 1.2]\n *\n * // The `_.property` iteratee shorthand.\n * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 1 }, { 'x': 2 }]\n */\n var unionBy = baseRest(function(arrays) {\n var iteratee = last(arrays);\n if (isArrayLikeObject(iteratee)) {\n iteratee = undefined;\n }\n return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2));\n });\n\n /**\n * This method is like `_.union` except that it accepts `comparator` which\n * is invoked to compare elements of `arrays`. Result values are chosen from\n * the first array in which the value occurs. The comparator is invoked\n * with two arguments: (arrVal, othVal).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of combined values.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n *\n * _.unionWith(objects, others, _.isEqual);\n * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]\n */\n var unionWith = baseRest(function(arrays) {\n var comparator = last(arrays);\n comparator = typeof comparator == 'function' ? comparator : undefined;\n return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator);\n });\n\n /**\n * Creates a duplicate-free version of an array, using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons, in which only the first occurrence of each element\n * is kept. The order of result values is determined by the order they occur\n * in the array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.uniq([2, 1, 2]);\n * // => [2, 1]\n */\n function uniq(array) {\n return (array && array.length) ? baseUniq(array) : [];\n }\n\n /**\n * This method is like `_.uniq` except that it accepts `iteratee` which is\n * invoked for each element in `array` to generate the criterion by which\n * uniqueness is computed. The order of result values is determined by the\n * order they occur in the array. The iteratee is invoked with one argument:\n * (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.uniqBy([2.1, 1.2, 2.3], Math.floor);\n * // => [2.1, 1.2]\n *\n * // The `_.property` iteratee shorthand.\n * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 1 }, { 'x': 2 }]\n */\n function uniqBy(array, iteratee) {\n return (array && array.length) ? baseUniq(array, getIteratee(iteratee, 2)) : [];\n }\n\n /**\n * This method is like `_.uniq` except that it accepts `comparator` which\n * is invoked to compare elements of `array`. The order of result values is\n * determined by the order they occur in the array.The comparator is invoked\n * with two arguments: (arrVal, othVal).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }];\n *\n * _.uniqWith(objects, _.isEqual);\n * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]\n */\n function uniqWith(array, comparator) {\n comparator = typeof comparator == 'function' ? comparator : undefined;\n return (array && array.length) ? baseUniq(array, undefined, comparator) : [];\n }\n\n /**\n * This method is like `_.zip` except that it accepts an array of grouped\n * elements and creates an array regrouping the elements to their pre-zip\n * configuration.\n *\n * @static\n * @memberOf _\n * @since 1.2.0\n * @category Array\n * @param {Array} array The array of grouped elements to process.\n * @returns {Array} Returns the new array of regrouped elements.\n * @example\n *\n * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]);\n * // => [['a', 1, true], ['b', 2, false]]\n *\n * _.unzip(zipped);\n * // => [['a', 'b'], [1, 2], [true, false]]\n */\n function unzip(array) {\n if (!(array && array.length)) {\n return [];\n }\n var length = 0;\n array = arrayFilter(array, function(group) {\n if (isArrayLikeObject(group)) {\n length = nativeMax(group.length, length);\n return true;\n }\n });\n return baseTimes(length, function(index) {\n return arrayMap(array, baseProperty(index));\n });\n }\n\n /**\n * This method is like `_.unzip` except that it accepts `iteratee` to specify\n * how regrouped values should be combined. The iteratee is invoked with the\n * elements of each group: (...group).\n *\n * @static\n * @memberOf _\n * @since 3.8.0\n * @category Array\n * @param {Array} array The array of grouped elements to process.\n * @param {Function} [iteratee=_.identity] The function to combine\n * regrouped values.\n * @returns {Array} Returns the new array of regrouped elements.\n * @example\n *\n * var zipped = _.zip([1, 2], [10, 20], [100, 200]);\n * // => [[1, 10, 100], [2, 20, 200]]\n *\n * _.unzipWith(zipped, _.add);\n * // => [3, 30, 300]\n */\n function unzipWith(array, iteratee) {\n if (!(array && array.length)) {\n return [];\n }\n var result = unzip(array);\n if (iteratee == null) {\n return result;\n }\n return arrayMap(result, function(group) {\n return apply(iteratee, undefined, group);\n });\n }\n\n /**\n * Creates an array excluding all given values using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * **Note:** Unlike `_.pull`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...*} [values] The values to exclude.\n * @returns {Array} Returns the new array of filtered values.\n * @see _.difference, _.xor\n * @example\n *\n * _.without([2, 1, 2, 3], 1, 2);\n * // => [3]\n */\n var without = baseRest(function(array, values) {\n return isArrayLikeObject(array)\n ? baseDifference(array, values)\n : [];\n });\n\n /**\n * Creates an array of unique values that is the\n * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference)\n * of the given arrays. The order of result values is determined by the order\n * they occur in the arrays.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @returns {Array} Returns the new array of filtered values.\n * @see _.difference, _.without\n * @example\n *\n * _.xor([2, 1], [2, 3]);\n * // => [1, 3]\n */\n var xor = baseRest(function(arrays) {\n return baseXor(arrayFilter(arrays, isArrayLikeObject));\n });\n\n /**\n * This method is like `_.xor` except that it accepts `iteratee` which is\n * invoked for each element of each `arrays` to generate the criterion by\n * which by which they're compared. The order of result values is determined\n * by the order they occur in the arrays. The iteratee is invoked with one\n * argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n * // => [1.2, 3.4]\n *\n * // The `_.property` iteratee shorthand.\n * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 2 }]\n */\n var xorBy = baseRest(function(arrays) {\n var iteratee = last(arrays);\n if (isArrayLikeObject(iteratee)) {\n iteratee = undefined;\n }\n return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2));\n });\n\n /**\n * This method is like `_.xor` except that it accepts `comparator` which is\n * invoked to compare elements of `arrays`. The order of result values is\n * determined by the order they occur in the arrays. The comparator is invoked\n * with two arguments: (arrVal, othVal).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n *\n * _.xorWith(objects, others, _.isEqual);\n * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]\n */\n var xorWith = baseRest(function(arrays) {\n var comparator = last(arrays);\n comparator = typeof comparator == 'function' ? comparator : undefined;\n return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator);\n });\n\n /**\n * Creates an array of grouped elements, the first of which contains the\n * first elements of the given arrays, the second of which contains the\n * second elements of the given arrays, and so on.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {...Array} [arrays] The arrays to process.\n * @returns {Array} Returns the new array of grouped elements.\n * @example\n *\n * _.zip(['a', 'b'], [1, 2], [true, false]);\n * // => [['a', 1, true], ['b', 2, false]]\n */\n var zip = baseRest(unzip);\n\n /**\n * This method is like `_.fromPairs` except that it accepts two arrays,\n * one of property identifiers and one of corresponding values.\n *\n * @static\n * @memberOf _\n * @since 0.4.0\n * @category Array\n * @param {Array} [props=[]] The property identifiers.\n * @param {Array} [values=[]] The property values.\n * @returns {Object} Returns the new object.\n * @example\n *\n * _.zipObject(['a', 'b'], [1, 2]);\n * // => { 'a': 1, 'b': 2 }\n */\n function zipObject(props, values) {\n return baseZipObject(props || [], values || [], assignValue);\n }\n\n /**\n * This method is like `_.zipObject` except that it supports property paths.\n *\n * @static\n * @memberOf _\n * @since 4.1.0\n * @category Array\n * @param {Array} [props=[]] The property identifiers.\n * @param {Array} [values=[]] The property values.\n * @returns {Object} Returns the new object.\n * @example\n *\n * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]);\n * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } }\n */\n function zipObjectDeep(props, values) {\n return baseZipObject(props || [], values || [], baseSet);\n }\n\n /**\n * This method is like `_.zip` except that it accepts `iteratee` to specify\n * how grouped values should be combined. The iteratee is invoked with the\n * elements of each group: (...group).\n *\n * @static\n * @memberOf _\n * @since 3.8.0\n * @category Array\n * @param {...Array} [arrays] The arrays to process.\n * @param {Function} [iteratee=_.identity] The function to combine\n * grouped values.\n * @returns {Array} Returns the new array of grouped elements.\n * @example\n *\n * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) {\n * return a + b + c;\n * });\n * // => [111, 222]\n */\n var zipWith = baseRest(function(arrays) {\n var length = arrays.length,\n iteratee = length > 1 ? arrays[length - 1] : undefined;\n\n iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined;\n return unzipWith(arrays, iteratee);\n });\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a `lodash` wrapper instance that wraps `value` with explicit method\n * chain sequences enabled. The result of such sequences must be unwrapped\n * with `_#value`.\n *\n * @static\n * @memberOf _\n * @since 1.3.0\n * @category Seq\n * @param {*} value The value to wrap.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36 },\n * { 'user': 'fred', 'age': 40 },\n * { 'user': 'pebbles', 'age': 1 }\n * ];\n *\n * var youngest = _\n * .chain(users)\n * .sortBy('age')\n * .map(function(o) {\n * return o.user + ' is ' + o.age;\n * })\n * .head()\n * .value();\n * // => 'pebbles is 1'\n */\n function chain(value) {\n var result = lodash(value);\n result.__chain__ = true;\n return result;\n }\n\n /**\n * This method invokes `interceptor` and returns `value`. The interceptor\n * is invoked with one argument; (value). The purpose of this method is to\n * \"tap into\" a method chain sequence in order to modify intermediate results.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Seq\n * @param {*} value The value to provide to `interceptor`.\n * @param {Function} interceptor The function to invoke.\n * @returns {*} Returns `value`.\n * @example\n *\n * _([1, 2, 3])\n * .tap(function(array) {\n * // Mutate input array.\n * array.pop();\n * })\n * .reverse()\n * .value();\n * // => [2, 1]\n */\n function tap(value, interceptor) {\n interceptor(value);\n return value;\n }\n\n /**\n * This method is like `_.tap` except that it returns the result of `interceptor`.\n * The purpose of this method is to \"pass thru\" values replacing intermediate\n * results in a method chain sequence.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Seq\n * @param {*} value The value to provide to `interceptor`.\n * @param {Function} interceptor The function to invoke.\n * @returns {*} Returns the result of `interceptor`.\n * @example\n *\n * _(' abc ')\n * .chain()\n * .trim()\n * .thru(function(value) {\n * return [value];\n * })\n * .value();\n * // => ['abc']\n */\n function thru(value, interceptor) {\n return interceptor(value);\n }\n\n /**\n * This method is the wrapper version of `_.at`.\n *\n * @name at\n * @memberOf _\n * @since 1.0.0\n * @category Seq\n * @param {...(string|string[])} [paths] The property paths to pick.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };\n *\n * _(object).at(['a[0].b.c', 'a[1]']).value();\n * // => [3, 4]\n */\n var wrapperAt = flatRest(function(paths) {\n var length = paths.length,\n start = length ? paths[0] : 0,\n value = this.__wrapped__,\n interceptor = function(object) { return baseAt(object, paths); };\n\n if (length > 1 || this.__actions__.length ||\n !(value instanceof LazyWrapper) || !isIndex(start)) {\n return this.thru(interceptor);\n }\n value = value.slice(start, +start + (length ? 1 : 0));\n value.__actions__.push({\n 'func': thru,\n 'args': [interceptor],\n 'thisArg': undefined\n });\n return new LodashWrapper(value, this.__chain__).thru(function(array) {\n if (length && !array.length) {\n array.push(undefined);\n }\n return array;\n });\n });\n\n /**\n * Creates a `lodash` wrapper instance with explicit method chain sequences enabled.\n *\n * @name chain\n * @memberOf _\n * @since 0.1.0\n * @category Seq\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36 },\n * { 'user': 'fred', 'age': 40 }\n * ];\n *\n * // A sequence without explicit chaining.\n * _(users).head();\n * // => { 'user': 'barney', 'age': 36 }\n *\n * // A sequence with explicit chaining.\n * _(users)\n * .chain()\n * .head()\n * .pick('user')\n * .value();\n * // => { 'user': 'barney' }\n */\n function wrapperChain() {\n return chain(this);\n }\n\n /**\n * Executes the chain sequence and returns the wrapped result.\n *\n * @name commit\n * @memberOf _\n * @since 3.2.0\n * @category Seq\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var array = [1, 2];\n * var wrapped = _(array).push(3);\n *\n * console.log(array);\n * // => [1, 2]\n *\n * wrapped = wrapped.commit();\n * console.log(array);\n * // => [1, 2, 3]\n *\n * wrapped.last();\n * // => 3\n *\n * console.log(array);\n * // => [1, 2, 3]\n */\n function wrapperCommit() {\n return new LodashWrapper(this.value(), this.__chain__);\n }\n\n /**\n * Gets the next value on a wrapped object following the\n * [iterator protocol](https://mdn.io/iteration_protocols#iterator).\n *\n * @name next\n * @memberOf _\n * @since 4.0.0\n * @category Seq\n * @returns {Object} Returns the next iterator value.\n * @example\n *\n * var wrapped = _([1, 2]);\n *\n * wrapped.next();\n * // => { 'done': false, 'value': 1 }\n *\n * wrapped.next();\n * // => { 'done': false, 'value': 2 }\n *\n * wrapped.next();\n * // => { 'done': true, 'value': undefined }\n */\n function wrapperNext() {\n if (this.__values__ === undefined) {\n this.__values__ = toArray(this.value());\n }\n var done = this.__index__ >= this.__values__.length,\n value = done ? undefined : this.__values__[this.__index__++];\n\n return { 'done': done, 'value': value };\n }\n\n /**\n * Enables the wrapper to be iterable.\n *\n * @name Symbol.iterator\n * @memberOf _\n * @since 4.0.0\n * @category Seq\n * @returns {Object} Returns the wrapper object.\n * @example\n *\n * var wrapped = _([1, 2]);\n *\n * wrapped[Symbol.iterator]() === wrapped;\n * // => true\n *\n * Array.from(wrapped);\n * // => [1, 2]\n */\n function wrapperToIterator() {\n return this;\n }\n\n /**\n * Creates a clone of the chain sequence planting `value` as the wrapped value.\n *\n * @name plant\n * @memberOf _\n * @since 3.2.0\n * @category Seq\n * @param {*} value The value to plant.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * var wrapped = _([1, 2]).map(square);\n * var other = wrapped.plant([3, 4]);\n *\n * other.value();\n * // => [9, 16]\n *\n * wrapped.value();\n * // => [1, 4]\n */\n function wrapperPlant(value) {\n var result,\n parent = this;\n\n while (parent instanceof baseLodash) {\n var clone = wrapperClone(parent);\n clone.__index__ = 0;\n clone.__values__ = undefined;\n if (result) {\n previous.__wrapped__ = clone;\n } else {\n result = clone;\n }\n var previous = clone;\n parent = parent.__wrapped__;\n }\n previous.__wrapped__ = value;\n return result;\n }\n\n /**\n * This method is the wrapper version of `_.reverse`.\n *\n * **Note:** This method mutates the wrapped array.\n *\n * @name reverse\n * @memberOf _\n * @since 0.1.0\n * @category Seq\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var array = [1, 2, 3];\n *\n * _(array).reverse().value()\n * // => [3, 2, 1]\n *\n * console.log(array);\n * // => [3, 2, 1]\n */\n function wrapperReverse() {\n var value = this.__wrapped__;\n if (value instanceof LazyWrapper) {\n var wrapped = value;\n if (this.__actions__.length) {\n wrapped = new LazyWrapper(this);\n }\n wrapped = wrapped.reverse();\n wrapped.__actions__.push({\n 'func': thru,\n 'args': [reverse],\n 'thisArg': undefined\n });\n return new LodashWrapper(wrapped, this.__chain__);\n }\n return this.thru(reverse);\n }\n\n /**\n * Executes the chain sequence to resolve the unwrapped value.\n *\n * @name value\n * @memberOf _\n * @since 0.1.0\n * @alias toJSON, valueOf\n * @category Seq\n * @returns {*} Returns the resolved unwrapped value.\n * @example\n *\n * _([1, 2, 3]).value();\n * // => [1, 2, 3]\n */\n function wrapperValue() {\n return baseWrapperValue(this.__wrapped__, this.__actions__);\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates an object composed of keys generated from the results of running\n * each element of `collection` thru `iteratee`. The corresponding value of\n * each key is the number of times the key was returned by `iteratee`. The\n * iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n * @returns {Object} Returns the composed aggregate object.\n * @example\n *\n * _.countBy([6.1, 4.2, 6.3], Math.floor);\n * // => { '4': 1, '6': 2 }\n *\n * // The `_.property` iteratee shorthand.\n * _.countBy(['one', 'two', 'three'], 'length');\n * // => { '3': 2, '5': 1 }\n */\n var countBy = createAggregator(function(result, value, key) {\n if (hasOwnProperty.call(result, key)) {\n ++result[key];\n } else {\n baseAssignValue(result, key, 1);\n }\n });\n\n /**\n * Checks if `predicate` returns truthy for **all** elements of `collection`.\n * Iteration is stopped once `predicate` returns falsey. The predicate is\n * invoked with three arguments: (value, index|key, collection).\n *\n * **Note:** This method returns `true` for\n * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because\n * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of\n * elements of empty collections.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\n * else `false`.\n * @example\n *\n * _.every([true, 1, null, 'yes'], Boolean);\n * // => false\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': false },\n * { 'user': 'fred', 'age': 40, 'active': false }\n * ];\n *\n * // The `_.matches` iteratee shorthand.\n * _.every(users, { 'user': 'barney', 'active': false });\n * // => false\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.every(users, ['active', false]);\n * // => true\n *\n * // The `_.property` iteratee shorthand.\n * _.every(users, 'active');\n * // => false\n */\n function every(collection, predicate, guard) {\n var func = isArray(collection) ? arrayEvery : baseEvery;\n if (guard && isIterateeCall(collection, predicate, guard)) {\n predicate = undefined;\n }\n return func(collection, getIteratee(predicate, 3));\n }\n\n /**\n * Iterates over elements of `collection`, returning an array of all elements\n * `predicate` returns truthy for. The predicate is invoked with three\n * arguments: (value, index|key, collection).\n *\n * **Note:** Unlike `_.remove`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n * @see _.reject\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': true },\n * { 'user': 'fred', 'age': 40, 'active': false }\n * ];\n *\n * _.filter(users, function(o) { return !o.active; });\n * // => objects for ['fred']\n *\n * // The `_.matches` iteratee shorthand.\n * _.filter(users, { 'age': 36, 'active': true });\n * // => objects for ['barney']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.filter(users, ['active', false]);\n * // => objects for ['fred']\n *\n * // The `_.property` iteratee shorthand.\n * _.filter(users, 'active');\n * // => objects for ['barney']\n *\n * // Combining several predicates using `_.overEvery` or `_.overSome`.\n * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]]));\n * // => objects for ['fred', 'barney']\n */\n function filter(collection, predicate) {\n var func = isArray(collection) ? arrayFilter : baseFilter;\n return func(collection, getIteratee(predicate, 3));\n }\n\n /**\n * Iterates over elements of `collection`, returning the first element\n * `predicate` returns truthy for. The predicate is invoked with three\n * arguments: (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {*} Returns the matched element, else `undefined`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': true },\n * { 'user': 'fred', 'age': 40, 'active': false },\n * { 'user': 'pebbles', 'age': 1, 'active': true }\n * ];\n *\n * _.find(users, function(o) { return o.age < 40; });\n * // => object for 'barney'\n *\n * // The `_.matches` iteratee shorthand.\n * _.find(users, { 'age': 1, 'active': true });\n * // => object for 'pebbles'\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.find(users, ['active', false]);\n * // => object for 'fred'\n *\n * // The `_.property` iteratee shorthand.\n * _.find(users, 'active');\n * // => object for 'barney'\n */\n var find = createFind(findIndex);\n\n /**\n * This method is like `_.find` except that it iterates over elements of\n * `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=collection.length-1] The index to search from.\n * @returns {*} Returns the matched element, else `undefined`.\n * @example\n *\n * _.findLast([1, 2, 3, 4], function(n) {\n * return n % 2 == 1;\n * });\n * // => 3\n */\n var findLast = createFind(findLastIndex);\n\n /**\n * Creates a flattened array of values by running each element in `collection`\n * thru `iteratee` and flattening the mapped results. The iteratee is invoked\n * with three arguments: (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * function duplicate(n) {\n * return [n, n];\n * }\n *\n * _.flatMap([1, 2], duplicate);\n * // => [1, 1, 2, 2]\n */\n function flatMap(collection, iteratee) {\n return baseFlatten(map(collection, iteratee), 1);\n }\n\n /**\n * This method is like `_.flatMap` except that it recursively flattens the\n * mapped results.\n *\n * @static\n * @memberOf _\n * @since 4.7.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * function duplicate(n) {\n * return [[[n, n]]];\n * }\n *\n * _.flatMapDeep([1, 2], duplicate);\n * // => [1, 1, 2, 2]\n */\n function flatMapDeep(collection, iteratee) {\n return baseFlatten(map(collection, iteratee), INFINITY);\n }\n\n /**\n * This method is like `_.flatMap` except that it recursively flattens the\n * mapped results up to `depth` times.\n *\n * @static\n * @memberOf _\n * @since 4.7.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {number} [depth=1] The maximum recursion depth.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * function duplicate(n) {\n * return [[[n, n]]];\n * }\n *\n * _.flatMapDepth([1, 2], duplicate, 2);\n * // => [[1, 1], [2, 2]]\n */\n function flatMapDepth(collection, iteratee, depth) {\n depth = depth === undefined ? 1 : toInteger(depth);\n return baseFlatten(map(collection, iteratee), depth);\n }\n\n /**\n * Iterates over elements of `collection` and invokes `iteratee` for each element.\n * The iteratee is invoked with three arguments: (value, index|key, collection).\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * **Note:** As with other \"Collections\" methods, objects with a \"length\"\n * property are iterated like arrays. To avoid this behavior use `_.forIn`\n * or `_.forOwn` for object iteration.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @alias each\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n * @see _.forEachRight\n * @example\n *\n * _.forEach([1, 2], function(value) {\n * console.log(value);\n * });\n * // => Logs `1` then `2`.\n *\n * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'a' then 'b' (iteration order is not guaranteed).\n */\n function forEach(collection, iteratee) {\n var func = isArray(collection) ? arrayEach : baseEach;\n return func(collection, getIteratee(iteratee, 3));\n }\n\n /**\n * This method is like `_.forEach` except that it iterates over elements of\n * `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @alias eachRight\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n * @see _.forEach\n * @example\n *\n * _.forEachRight([1, 2], function(value) {\n * console.log(value);\n * });\n * // => Logs `2` then `1`.\n */\n function forEachRight(collection, iteratee) {\n var func = isArray(collection) ? arrayEachRight : baseEachRight;\n return func(collection, getIteratee(iteratee, 3));\n }\n\n /**\n * Creates an object composed of keys generated from the results of running\n * each element of `collection` thru `iteratee`. The order of grouped values\n * is determined by the order they occur in `collection`. The corresponding\n * value of each key is an array of elements responsible for generating the\n * key. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n * @returns {Object} Returns the composed aggregate object.\n * @example\n *\n * _.groupBy([6.1, 4.2, 6.3], Math.floor);\n * // => { '4': [4.2], '6': [6.1, 6.3] }\n *\n * // The `_.property` iteratee shorthand.\n * _.groupBy(['one', 'two', 'three'], 'length');\n * // => { '3': ['one', 'two'], '5': ['three'] }\n */\n var groupBy = createAggregator(function(result, value, key) {\n if (hasOwnProperty.call(result, key)) {\n result[key].push(value);\n } else {\n baseAssignValue(result, key, [value]);\n }\n });\n\n /**\n * Checks if `value` is in `collection`. If `collection` is a string, it's\n * checked for a substring of `value`, otherwise\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * is used for equality comparisons. If `fromIndex` is negative, it's used as\n * the offset from the end of `collection`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object|string} collection The collection to inspect.\n * @param {*} value The value to search for.\n * @param {number} [fromIndex=0] The index to search from.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.\n * @returns {boolean} Returns `true` if `value` is found, else `false`.\n * @example\n *\n * _.includes([1, 2, 3], 1);\n * // => true\n *\n * _.includes([1, 2, 3], 1, 2);\n * // => false\n *\n * _.includes({ 'a': 1, 'b': 2 }, 1);\n * // => true\n *\n * _.includes('abcd', 'bc');\n * // => true\n */\n function includes(collection, value, fromIndex, guard) {\n collection = isArrayLike(collection) ? collection : values(collection);\n fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0;\n\n var length = collection.length;\n if (fromIndex < 0) {\n fromIndex = nativeMax(length + fromIndex, 0);\n }\n return isString(collection)\n ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1)\n : (!!length && baseIndexOf(collection, value, fromIndex) > -1);\n }\n\n /**\n * Invokes the method at `path` of each element in `collection`, returning\n * an array of the results of each invoked method. Any additional arguments\n * are provided to each invoked method. If `path` is a function, it's invoked\n * for, and `this` bound to, each element in `collection`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Array|Function|string} path The path of the method to invoke or\n * the function invoked per iteration.\n * @param {...*} [args] The arguments to invoke each method with.\n * @returns {Array} Returns the array of results.\n * @example\n *\n * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort');\n * // => [[1, 5, 7], [1, 2, 3]]\n *\n * _.invokeMap([123, 456], String.prototype.split, '');\n * // => [['1', '2', '3'], ['4', '5', '6']]\n */\n var invokeMap = baseRest(function(collection, path, args) {\n var index = -1,\n isFunc = typeof path == 'function',\n result = isArrayLike(collection) ? Array(collection.length) : [];\n\n baseEach(collection, function(value) {\n result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args);\n });\n return result;\n });\n\n /**\n * Creates an object composed of keys generated from the results of running\n * each element of `collection` thru `iteratee`. The corresponding value of\n * each key is the last element responsible for generating the key. The\n * iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n * @returns {Object} Returns the composed aggregate object.\n * @example\n *\n * var array = [\n * { 'dir': 'left', 'code': 97 },\n * { 'dir': 'right', 'code': 100 }\n * ];\n *\n * _.keyBy(array, function(o) {\n * return String.fromCharCode(o.code);\n * });\n * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }\n *\n * _.keyBy(array, 'dir');\n * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }\n */\n var keyBy = createAggregator(function(result, value, key) {\n baseAssignValue(result, key, value);\n });\n\n /**\n * Creates an array of values by running each element in `collection` thru\n * `iteratee`. The iteratee is invoked with three arguments:\n * (value, index|key, collection).\n *\n * Many lodash methods are guarded to work as iteratees for methods like\n * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.\n *\n * The guarded methods are:\n * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,\n * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,\n * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,\n * `template`, `trim`, `trimEnd`, `trimStart`, and `words`\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * _.map([4, 8], square);\n * // => [16, 64]\n *\n * _.map({ 'a': 4, 'b': 8 }, square);\n * // => [16, 64] (iteration order is not guaranteed)\n *\n * var users = [\n * { 'user': 'barney' },\n * { 'user': 'fred' }\n * ];\n *\n * // The `_.property` iteratee shorthand.\n * _.map(users, 'user');\n * // => ['barney', 'fred']\n */\n function map(collection, iteratee) {\n var func = isArray(collection) ? arrayMap : baseMap;\n return func(collection, getIteratee(iteratee, 3));\n }\n\n /**\n * This method is like `_.sortBy` except that it allows specifying the sort\n * orders of the iteratees to sort by. If `orders` is unspecified, all values\n * are sorted in ascending order. Otherwise, specify an order of \"desc\" for\n * descending or \"asc\" for ascending sort order of corresponding values.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]]\n * The iteratees to sort by.\n * @param {string[]} [orders] The sort orders of `iteratees`.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.\n * @returns {Array} Returns the new sorted array.\n * @example\n *\n * var users = [\n * { 'user': 'fred', 'age': 48 },\n * { 'user': 'barney', 'age': 34 },\n * { 'user': 'fred', 'age': 40 },\n * { 'user': 'barney', 'age': 36 }\n * ];\n *\n * // Sort by `user` in ascending order and by `age` in descending order.\n * _.orderBy(users, ['user', 'age'], ['asc', 'desc']);\n * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]\n */\n function orderBy(collection, iteratees, orders, guard) {\n if (collection == null) {\n return [];\n }\n if (!isArray(iteratees)) {\n iteratees = iteratees == null ? [] : [iteratees];\n }\n orders = guard ? undefined : orders;\n if (!isArray(orders)) {\n orders = orders == null ? [] : [orders];\n }\n return baseOrderBy(collection, iteratees, orders);\n }\n\n /**\n * Creates an array of elements split into two groups, the first of which\n * contains elements `predicate` returns truthy for, the second of which\n * contains elements `predicate` returns falsey for. The predicate is\n * invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the array of grouped elements.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': false },\n * { 'user': 'fred', 'age': 40, 'active': true },\n * { 'user': 'pebbles', 'age': 1, 'active': false }\n * ];\n *\n * _.partition(users, function(o) { return o.active; });\n * // => objects for [['fred'], ['barney', 'pebbles']]\n *\n * // The `_.matches` iteratee shorthand.\n * _.partition(users, { 'age': 1, 'active': false });\n * // => objects for [['pebbles'], ['barney', 'fred']]\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.partition(users, ['active', false]);\n * // => objects for [['barney', 'pebbles'], ['fred']]\n *\n * // The `_.property` iteratee shorthand.\n * _.partition(users, 'active');\n * // => objects for [['fred'], ['barney', 'pebbles']]\n */\n var partition = createAggregator(function(result, value, key) {\n result[key ? 0 : 1].push(value);\n }, function() { return [[], []]; });\n\n /**\n * Reduces `collection` to a value which is the accumulated result of running\n * each element in `collection` thru `iteratee`, where each successive\n * invocation is supplied the return value of the previous. If `accumulator`\n * is not given, the first element of `collection` is used as the initial\n * value. The iteratee is invoked with four arguments:\n * (accumulator, value, index|key, collection).\n *\n * Many lodash methods are guarded to work as iteratees for methods like\n * `_.reduce`, `_.reduceRight`, and `_.transform`.\n *\n * The guarded methods are:\n * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,\n * and `sortBy`\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @returns {*} Returns the accumulated value.\n * @see _.reduceRight\n * @example\n *\n * _.reduce([1, 2], function(sum, n) {\n * return sum + n;\n * }, 0);\n * // => 3\n *\n * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {\n * (result[value] || (result[value] = [])).push(key);\n * return result;\n * }, {});\n * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)\n */\n function reduce(collection, iteratee, accumulator) {\n var func = isArray(collection) ? arrayReduce : baseReduce,\n initAccum = arguments.length < 3;\n\n return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach);\n }\n\n /**\n * This method is like `_.reduce` except that it iterates over elements of\n * `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @returns {*} Returns the accumulated value.\n * @see _.reduce\n * @example\n *\n * var array = [[0, 1], [2, 3], [4, 5]];\n *\n * _.reduceRight(array, function(flattened, other) {\n * return flattened.concat(other);\n * }, []);\n * // => [4, 5, 2, 3, 0, 1]\n */\n function reduceRight(collection, iteratee, accumulator) {\n var func = isArray(collection) ? arrayReduceRight : baseReduce,\n initAccum = arguments.length < 3;\n\n return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight);\n }\n\n /**\n * The opposite of `_.filter`; this method returns the elements of `collection`\n * that `predicate` does **not** return truthy for.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n * @see _.filter\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': false },\n * { 'user': 'fred', 'age': 40, 'active': true }\n * ];\n *\n * _.reject(users, function(o) { return !o.active; });\n * // => objects for ['fred']\n *\n * // The `_.matches` iteratee shorthand.\n * _.reject(users, { 'age': 40, 'active': true });\n * // => objects for ['barney']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.reject(users, ['active', false]);\n * // => objects for ['fred']\n *\n * // The `_.property` iteratee shorthand.\n * _.reject(users, 'active');\n * // => objects for ['barney']\n */\n function reject(collection, predicate) {\n var func = isArray(collection) ? arrayFilter : baseFilter;\n return func(collection, negate(getIteratee(predicate, 3)));\n }\n\n /**\n * Gets a random element from `collection`.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to sample.\n * @returns {*} Returns the random element.\n * @example\n *\n * _.sample([1, 2, 3, 4]);\n * // => 2\n */\n function sample(collection) {\n var func = isArray(collection) ? arraySample : baseSample;\n return func(collection);\n }\n\n /**\n * Gets `n` random elements at unique keys from `collection` up to the\n * size of `collection`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to sample.\n * @param {number} [n=1] The number of elements to sample.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the random elements.\n * @example\n *\n * _.sampleSize([1, 2, 3], 2);\n * // => [3, 1]\n *\n * _.sampleSize([1, 2, 3], 4);\n * // => [2, 3, 1]\n */\n function sampleSize(collection, n, guard) {\n if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) {\n n = 1;\n } else {\n n = toInteger(n);\n }\n var func = isArray(collection) ? arraySampleSize : baseSampleSize;\n return func(collection, n);\n }\n\n /**\n * Creates an array of shuffled values, using a version of the\n * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to shuffle.\n * @returns {Array} Returns the new shuffled array.\n * @example\n *\n * _.shuffle([1, 2, 3, 4]);\n * // => [4, 1, 3, 2]\n */\n function shuffle(collection) {\n var func = isArray(collection) ? arrayShuffle : baseShuffle;\n return func(collection);\n }\n\n /**\n * Gets the size of `collection` by returning its length for array-like\n * values or the number of own enumerable string keyed properties for objects.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object|string} collection The collection to inspect.\n * @returns {number} Returns the collection size.\n * @example\n *\n * _.size([1, 2, 3]);\n * // => 3\n *\n * _.size({ 'a': 1, 'b': 2 });\n * // => 2\n *\n * _.size('pebbles');\n * // => 7\n */\n function size(collection) {\n if (collection == null) {\n return 0;\n }\n if (isArrayLike(collection)) {\n return isString(collection) ? stringSize(collection) : collection.length;\n }\n var tag = getTag(collection);\n if (tag == mapTag || tag == setTag) {\n return collection.size;\n }\n return baseKeys(collection).length;\n }\n\n /**\n * Checks if `predicate` returns truthy for **any** element of `collection`.\n * Iteration is stopped once `predicate` returns truthy. The predicate is\n * invoked with three arguments: (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n * @example\n *\n * _.some([null, 0, 'yes', false], Boolean);\n * // => true\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false }\n * ];\n *\n * // The `_.matches` iteratee shorthand.\n * _.some(users, { 'user': 'barney', 'active': false });\n * // => false\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.some(users, ['active', false]);\n * // => true\n *\n * // The `_.property` iteratee shorthand.\n * _.some(users, 'active');\n * // => true\n */\n function some(collection, predicate, guard) {\n var func = isArray(collection) ? arraySome : baseSome;\n if (guard && isIterateeCall(collection, predicate, guard)) {\n predicate = undefined;\n }\n return func(collection, getIteratee(predicate, 3));\n }\n\n /**\n * Creates an array of elements, sorted in ascending order by the results of\n * running each element in a collection thru each iteratee. This method\n * performs a stable sort, that is, it preserves the original sort order of\n * equal elements. The iteratees are invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {...(Function|Function[])} [iteratees=[_.identity]]\n * The iteratees to sort by.\n * @returns {Array} Returns the new sorted array.\n * @example\n *\n * var users = [\n * { 'user': 'fred', 'age': 48 },\n * { 'user': 'barney', 'age': 36 },\n * { 'user': 'fred', 'age': 30 },\n * { 'user': 'barney', 'age': 34 }\n * ];\n *\n * _.sortBy(users, [function(o) { return o.user; }]);\n * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]]\n *\n * _.sortBy(users, ['user', 'age']);\n * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]]\n */\n var sortBy = baseRest(function(collection, iteratees) {\n if (collection == null) {\n return [];\n }\n var length = iteratees.length;\n if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {\n iteratees = [];\n } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {\n iteratees = [iteratees[0]];\n }\n return baseOrderBy(collection, baseFlatten(iteratees, 1), []);\n });\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\n var now = ctxNow || function() {\n return root.Date.now();\n };\n\n /*------------------------------------------------------------------------*/\n\n /**\n * The opposite of `_.before`; this method creates a function that invokes\n * `func` once it's called `n` or more times.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {number} n The number of calls before `func` is invoked.\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * var saves = ['profile', 'settings'];\n *\n * var done = _.after(saves.length, function() {\n * console.log('done saving!');\n * });\n *\n * _.forEach(saves, function(type) {\n * asyncSave({ 'type': type, 'complete': done });\n * });\n * // => Logs 'done saving!' after the two async saves have completed.\n */\n function after(n, func) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n n = toInteger(n);\n return function() {\n if (--n < 1) {\n return func.apply(this, arguments);\n }\n };\n }\n\n /**\n * Creates a function that invokes `func`, with up to `n` arguments,\n * ignoring any additional arguments.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} func The function to cap arguments for.\n * @param {number} [n=func.length] The arity cap.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the new capped function.\n * @example\n *\n * _.map(['6', '8', '10'], _.ary(parseInt, 1));\n * // => [6, 8, 10]\n */\n function ary(func, n, guard) {\n n = guard ? undefined : n;\n n = (func && n == null) ? func.length : n;\n return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n);\n }\n\n /**\n * Creates a function that invokes `func`, with the `this` binding and arguments\n * of the created function, while it's called less than `n` times. Subsequent\n * calls to the created function return the result of the last `func` invocation.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {number} n The number of calls at which `func` is no longer invoked.\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * jQuery(element).on('click', _.before(5, addContactToList));\n * // => Allows adding up to 4 contacts to the list.\n */\n function before(n, func) {\n var result;\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n n = toInteger(n);\n return function() {\n if (--n > 0) {\n result = func.apply(this, arguments);\n }\n if (n <= 1) {\n func = undefined;\n }\n return result;\n };\n }\n\n /**\n * Creates a function that invokes `func` with the `this` binding of `thisArg`\n * and `partials` prepended to the arguments it receives.\n *\n * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,\n * may be used as a placeholder for partially applied arguments.\n *\n * **Note:** Unlike native `Function#bind`, this method doesn't set the \"length\"\n * property of bound functions.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to bind.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {...*} [partials] The arguments to be partially applied.\n * @returns {Function} Returns the new bound function.\n * @example\n *\n * function greet(greeting, punctuation) {\n * return greeting + ' ' + this.user + punctuation;\n * }\n *\n * var object = { 'user': 'fred' };\n *\n * var bound = _.bind(greet, object, 'hi');\n * bound('!');\n * // => 'hi fred!'\n *\n * // Bound with placeholders.\n * var bound = _.bind(greet, object, _, '!');\n * bound('hi');\n * // => 'hi fred!'\n */\n var bind = baseRest(function(func, thisArg, partials) {\n var bitmask = WRAP_BIND_FLAG;\n if (partials.length) {\n var holders = replaceHolders(partials, getHolder(bind));\n bitmask |= WRAP_PARTIAL_FLAG;\n }\n return createWrap(func, bitmask, thisArg, partials, holders);\n });\n\n /**\n * Creates a function that invokes the method at `object[key]` with `partials`\n * prepended to the arguments it receives.\n *\n * This method differs from `_.bind` by allowing bound functions to reference\n * methods that may be redefined or don't yet exist. See\n * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern)\n * for more details.\n *\n * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic\n * builds, may be used as a placeholder for partially applied arguments.\n *\n * @static\n * @memberOf _\n * @since 0.10.0\n * @category Function\n * @param {Object} object The object to invoke the method on.\n * @param {string} key The key of the method.\n * @param {...*} [partials] The arguments to be partially applied.\n * @returns {Function} Returns the new bound function.\n * @example\n *\n * var object = {\n * 'user': 'fred',\n * 'greet': function(greeting, punctuation) {\n * return greeting + ' ' + this.user + punctuation;\n * }\n * };\n *\n * var bound = _.bindKey(object, 'greet', 'hi');\n * bound('!');\n * // => 'hi fred!'\n *\n * object.greet = function(greeting, punctuation) {\n * return greeting + 'ya ' + this.user + punctuation;\n * };\n *\n * bound('!');\n * // => 'hiya fred!'\n *\n * // Bound with placeholders.\n * var bound = _.bindKey(object, 'greet', _, '!');\n * bound('hi');\n * // => 'hiya fred!'\n */\n var bindKey = baseRest(function(object, key, partials) {\n var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG;\n if (partials.length) {\n var holders = replaceHolders(partials, getHolder(bindKey));\n bitmask |= WRAP_PARTIAL_FLAG;\n }\n return createWrap(key, bitmask, object, partials, holders);\n });\n\n /**\n * Creates a function that accepts arguments of `func` and either invokes\n * `func` returning its result, if at least `arity` number of arguments have\n * been provided, or returns a function that accepts the remaining `func`\n * arguments, and so on. The arity of `func` may be specified if `func.length`\n * is not sufficient.\n *\n * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,\n * may be used as a placeholder for provided arguments.\n *\n * **Note:** This method doesn't set the \"length\" property of curried functions.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Function\n * @param {Function} func The function to curry.\n * @param {number} [arity=func.length] The arity of `func`.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the new curried function.\n * @example\n *\n * var abc = function(a, b, c) {\n * return [a, b, c];\n * };\n *\n * var curried = _.curry(abc);\n *\n * curried(1)(2)(3);\n * // => [1, 2, 3]\n *\n * curried(1, 2)(3);\n * // => [1, 2, 3]\n *\n * curried(1, 2, 3);\n * // => [1, 2, 3]\n *\n * // Curried with placeholders.\n * curried(1)(_, 3)(2);\n * // => [1, 2, 3]\n */\n function curry(func, arity, guard) {\n arity = guard ? undefined : arity;\n var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity);\n result.placeholder = curry.placeholder;\n return result;\n }\n\n /**\n * This method is like `_.curry` except that arguments are applied to `func`\n * in the manner of `_.partialRight` instead of `_.partial`.\n *\n * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic\n * builds, may be used as a placeholder for provided arguments.\n *\n * **Note:** This method doesn't set the \"length\" property of curried functions.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} func The function to curry.\n * @param {number} [arity=func.length] The arity of `func`.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the new curried function.\n * @example\n *\n * var abc = function(a, b, c) {\n * return [a, b, c];\n * };\n *\n * var curried = _.curryRight(abc);\n *\n * curried(3)(2)(1);\n * // => [1, 2, 3]\n *\n * curried(2, 3)(1);\n * // => [1, 2, 3]\n *\n * curried(1, 2, 3);\n * // => [1, 2, 3]\n *\n * // Curried with placeholders.\n * curried(3)(1, _)(2);\n * // => [1, 2, 3]\n */\n function curryRight(func, arity, guard) {\n arity = guard ? undefined : arity;\n var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity);\n result.placeholder = curryRight.placeholder;\n return result;\n }\n\n /**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\n function debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n\n return maxing\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n clearTimeout(timerId);\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n }\n\n /**\n * Defers invoking the `func` until the current call stack has cleared. Any\n * additional arguments are provided to `func` when it's invoked.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to defer.\n * @param {...*} [args] The arguments to invoke `func` with.\n * @returns {number} Returns the timer id.\n * @example\n *\n * _.defer(function(text) {\n * console.log(text);\n * }, 'deferred');\n * // => Logs 'deferred' after one millisecond.\n */\n var defer = baseRest(function(func, args) {\n return baseDelay(func, 1, args);\n });\n\n /**\n * Invokes `func` after `wait` milliseconds. Any additional arguments are\n * provided to `func` when it's invoked.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to delay.\n * @param {number} wait The number of milliseconds to delay invocation.\n * @param {...*} [args] The arguments to invoke `func` with.\n * @returns {number} Returns the timer id.\n * @example\n *\n * _.delay(function(text) {\n * console.log(text);\n * }, 1000, 'later');\n * // => Logs 'later' after one second.\n */\n var delay = baseRest(function(func, wait, args) {\n return baseDelay(func, toNumber(wait) || 0, args);\n });\n\n /**\n * Creates a function that invokes `func` with arguments reversed.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Function\n * @param {Function} func The function to flip arguments for.\n * @returns {Function} Returns the new flipped function.\n * @example\n *\n * var flipped = _.flip(function() {\n * return _.toArray(arguments);\n * });\n *\n * flipped('a', 'b', 'c', 'd');\n * // => ['d', 'c', 'b', 'a']\n */\n function flip(func) {\n return createWrap(func, WRAP_FLIP_FLAG);\n }\n\n /**\n * Creates a function that memoizes the result of `func`. If `resolver` is\n * provided, it determines the cache key for storing the result based on the\n * arguments provided to the memoized function. By default, the first argument\n * provided to the memoized function is used as the map cache key. The `func`\n * is invoked with the `this` binding of the memoized function.\n *\n * **Note:** The cache is exposed as the `cache` property on the memoized\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\n * constructor with one whose instances implement the\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n * method interface of `clear`, `delete`, `get`, `has`, and `set`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to have its output memoized.\n * @param {Function} [resolver] The function to resolve the cache key.\n * @returns {Function} Returns the new memoized function.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n * var other = { 'c': 3, 'd': 4 };\n *\n * var values = _.memoize(_.values);\n * values(object);\n * // => [1, 2]\n *\n * values(other);\n * // => [3, 4]\n *\n * object.a = 2;\n * values(object);\n * // => [1, 2]\n *\n * // Modify the result cache.\n * values.cache.set(object, ['a', 'b']);\n * values(object);\n * // => ['a', 'b']\n *\n * // Replace `_.memoize.Cache`.\n * _.memoize.Cache = WeakMap;\n */\n function memoize(func, resolver) {\n if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var memoized = function() {\n var args = arguments,\n key = resolver ? resolver.apply(this, args) : args[0],\n cache = memoized.cache;\n\n if (cache.has(key)) {\n return cache.get(key);\n }\n var result = func.apply(this, args);\n memoized.cache = cache.set(key, result) || cache;\n return result;\n };\n memoized.cache = new (memoize.Cache || MapCache);\n return memoized;\n }\n\n // Expose `MapCache`.\n memoize.Cache = MapCache;\n\n /**\n * Creates a function that negates the result of the predicate `func`. The\n * `func` predicate is invoked with the `this` binding and arguments of the\n * created function.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} predicate The predicate to negate.\n * @returns {Function} Returns the new negated function.\n * @example\n *\n * function isEven(n) {\n * return n % 2 == 0;\n * }\n *\n * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));\n * // => [1, 3, 5]\n */\n function negate(predicate) {\n if (typeof predicate != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n return function() {\n var args = arguments;\n switch (args.length) {\n case 0: return !predicate.call(this);\n case 1: return !predicate.call(this, args[0]);\n case 2: return !predicate.call(this, args[0], args[1]);\n case 3: return !predicate.call(this, args[0], args[1], args[2]);\n }\n return !predicate.apply(this, args);\n };\n }\n\n /**\n * Creates a function that is restricted to invoking `func` once. Repeat calls\n * to the function return the value of the first invocation. The `func` is\n * invoked with the `this` binding and arguments of the created function.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * var initialize = _.once(createApplication);\n * initialize();\n * initialize();\n * // => `createApplication` is invoked once\n */\n function once(func) {\n return before(2, func);\n }\n\n /**\n * Creates a function that invokes `func` with its arguments transformed.\n *\n * @static\n * @since 4.0.0\n * @memberOf _\n * @category Function\n * @param {Function} func The function to wrap.\n * @param {...(Function|Function[])} [transforms=[_.identity]]\n * The argument transforms.\n * @returns {Function} Returns the new function.\n * @example\n *\n * function doubled(n) {\n * return n * 2;\n * }\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * var func = _.overArgs(function(x, y) {\n * return [x, y];\n * }, [square, doubled]);\n *\n * func(9, 3);\n * // => [81, 6]\n *\n * func(10, 5);\n * // => [100, 10]\n */\n var overArgs = castRest(function(func, transforms) {\n transforms = (transforms.length == 1 && isArray(transforms[0]))\n ? arrayMap(transforms[0], baseUnary(getIteratee()))\n : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee()));\n\n var funcsLength = transforms.length;\n return baseRest(function(args) {\n var index = -1,\n length = nativeMin(args.length, funcsLength);\n\n while (++index < length) {\n args[index] = transforms[index].call(this, args[index]);\n }\n return apply(func, this, args);\n });\n });\n\n /**\n * Creates a function that invokes `func` with `partials` prepended to the\n * arguments it receives. This method is like `_.bind` except it does **not**\n * alter the `this` binding.\n *\n * The `_.partial.placeholder` value, which defaults to `_` in monolithic\n * builds, may be used as a placeholder for partially applied arguments.\n *\n * **Note:** This method doesn't set the \"length\" property of partially\n * applied functions.\n *\n * @static\n * @memberOf _\n * @since 0.2.0\n * @category Function\n * @param {Function} func The function to partially apply arguments to.\n * @param {...*} [partials] The arguments to be partially applied.\n * @returns {Function} Returns the new partially applied function.\n * @example\n *\n * function greet(greeting, name) {\n * return greeting + ' ' + name;\n * }\n *\n * var sayHelloTo = _.partial(greet, 'hello');\n * sayHelloTo('fred');\n * // => 'hello fred'\n *\n * // Partially applied with placeholders.\n * var greetFred = _.partial(greet, _, 'fred');\n * greetFred('hi');\n * // => 'hi fred'\n */\n var partial = baseRest(function(func, partials) {\n var holders = replaceHolders(partials, getHolder(partial));\n return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders);\n });\n\n /**\n * This method is like `_.partial` except that partially applied arguments\n * are appended to the arguments it receives.\n *\n * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic\n * builds, may be used as a placeholder for partially applied arguments.\n *\n * **Note:** This method doesn't set the \"length\" property of partially\n * applied functions.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Function\n * @param {Function} func The function to partially apply arguments to.\n * @param {...*} [partials] The arguments to be partially applied.\n * @returns {Function} Returns the new partially applied function.\n * @example\n *\n * function greet(greeting, name) {\n * return greeting + ' ' + name;\n * }\n *\n * var greetFred = _.partialRight(greet, 'fred');\n * greetFred('hi');\n * // => 'hi fred'\n *\n * // Partially applied with placeholders.\n * var sayHelloTo = _.partialRight(greet, 'hello', _);\n * sayHelloTo('fred');\n * // => 'hello fred'\n */\n var partialRight = baseRest(function(func, partials) {\n var holders = replaceHolders(partials, getHolder(partialRight));\n return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders);\n });\n\n /**\n * Creates a function that invokes `func` with arguments arranged according\n * to the specified `indexes` where the argument value at the first index is\n * provided as the first argument, the argument value at the second index is\n * provided as the second argument, and so on.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} func The function to rearrange arguments for.\n * @param {...(number|number[])} indexes The arranged argument indexes.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var rearged = _.rearg(function(a, b, c) {\n * return [a, b, c];\n * }, [2, 0, 1]);\n *\n * rearged('b', 'c', 'a')\n * // => ['a', 'b', 'c']\n */\n var rearg = flatRest(function(func, indexes) {\n return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes);\n });\n\n /**\n * Creates a function that invokes `func` with the `this` binding of the\n * created function and arguments from `start` and beyond provided as\n * an array.\n *\n * **Note:** This method is based on the\n * [rest parameter](https://mdn.io/rest_parameters).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Function\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var say = _.rest(function(what, names) {\n * return what + ' ' + _.initial(names).join(', ') +\n * (_.size(names) > 1 ? ', & ' : '') + _.last(names);\n * });\n *\n * say('hello', 'fred', 'barney', 'pebbles');\n * // => 'hello fred, barney, & pebbles'\n */\n function rest(func, start) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n start = start === undefined ? start : toInteger(start);\n return baseRest(func, start);\n }\n\n /**\n * Creates a function that invokes `func` with the `this` binding of the\n * create function and an array of arguments much like\n * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply).\n *\n * **Note:** This method is based on the\n * [spread operator](https://mdn.io/spread_operator).\n *\n * @static\n * @memberOf _\n * @since 3.2.0\n * @category Function\n * @param {Function} func The function to spread arguments over.\n * @param {number} [start=0] The start position of the spread.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var say = _.spread(function(who, what) {\n * return who + ' says ' + what;\n * });\n *\n * say(['fred', 'hello']);\n * // => 'fred says hello'\n *\n * var numbers = Promise.all([\n * Promise.resolve(40),\n * Promise.resolve(36)\n * ]);\n *\n * numbers.then(_.spread(function(x, y) {\n * return x + y;\n * }));\n * // => a Promise of 76\n */\n function spread(func, start) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n start = start == null ? 0 : nativeMax(toInteger(start), 0);\n return baseRest(function(args) {\n var array = args[start],\n otherArgs = castSlice(args, 0, start);\n\n if (array) {\n arrayPush(otherArgs, array);\n }\n return apply(func, this, otherArgs);\n });\n }\n\n /**\n * Creates a throttled function that only invokes `func` at most once per\n * every `wait` milliseconds. The throttled function comes with a `cancel`\n * method to cancel delayed `func` invocations and a `flush` method to\n * immediately invoke them. Provide `options` to indicate whether `func`\n * should be invoked on the leading and/or trailing edge of the `wait`\n * timeout. The `func` is invoked with the last arguments provided to the\n * throttled function. Subsequent calls to the throttled function return the\n * result of the last `func` invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the throttled function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.throttle` and `_.debounce`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to throttle.\n * @param {number} [wait=0] The number of milliseconds to throttle invocations to.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=true]\n * Specify invoking on the leading edge of the timeout.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new throttled function.\n * @example\n *\n * // Avoid excessively updating the position while scrolling.\n * jQuery(window).on('scroll', _.throttle(updatePosition, 100));\n *\n * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.\n * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });\n * jQuery(element).on('click', throttled);\n *\n * // Cancel the trailing throttled invocation.\n * jQuery(window).on('popstate', throttled.cancel);\n */\n function throttle(func, wait, options) {\n var leading = true,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n if (isObject(options)) {\n leading = 'leading' in options ? !!options.leading : leading;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n return debounce(func, wait, {\n 'leading': leading,\n 'maxWait': wait,\n 'trailing': trailing\n });\n }\n\n /**\n * Creates a function that accepts up to one argument, ignoring any\n * additional arguments.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Function\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n * @example\n *\n * _.map(['6', '8', '10'], _.unary(parseInt));\n * // => [6, 8, 10]\n */\n function unary(func) {\n return ary(func, 1);\n }\n\n /**\n * Creates a function that provides `value` to `wrapper` as its first\n * argument. Any additional arguments provided to the function are appended\n * to those provided to the `wrapper`. The wrapper is invoked with the `this`\n * binding of the created function.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {*} value The value to wrap.\n * @param {Function} [wrapper=identity] The wrapper function.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var p = _.wrap(_.escape, function(func, text) {\n * return '<p>' + func(text) + '</p>';\n * });\n *\n * p('fred, barney, & pebbles');\n * // => '<p>fred, barney, & pebbles</p>'\n */\n function wrap(value, wrapper) {\n return partial(castFunction(wrapper), value);\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Casts `value` as an array if it's not one.\n *\n * @static\n * @memberOf _\n * @since 4.4.0\n * @category Lang\n * @param {*} value The value to inspect.\n * @returns {Array} Returns the cast array.\n * @example\n *\n * _.castArray(1);\n * // => [1]\n *\n * _.castArray({ 'a': 1 });\n * // => [{ 'a': 1 }]\n *\n * _.castArray('abc');\n * // => ['abc']\n *\n * _.castArray(null);\n * // => [null]\n *\n * _.castArray(undefined);\n * // => [undefined]\n *\n * _.castArray();\n * // => []\n *\n * var array = [1, 2, 3];\n * console.log(_.castArray(array) === array);\n * // => true\n */\n function castArray() {\n if (!arguments.length) {\n return [];\n }\n var value = arguments[0];\n return isArray(value) ? value : [value];\n }\n\n /**\n * Creates a shallow clone of `value`.\n *\n * **Note:** This method is loosely based on the\n * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)\n * and supports cloning arrays, array buffers, booleans, date objects, maps,\n * numbers, `Object` objects, regexes, sets, strings, symbols, and typed\n * arrays. The own enumerable properties of `arguments` objects are cloned\n * as plain objects. An empty object is returned for uncloneable values such\n * as error objects, functions, DOM nodes, and WeakMaps.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to clone.\n * @returns {*} Returns the cloned value.\n * @see _.cloneDeep\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var shallow = _.clone(objects);\n * console.log(shallow[0] === objects[0]);\n * // => true\n */\n function clone(value) {\n return baseClone(value, CLONE_SYMBOLS_FLAG);\n }\n\n /**\n * This method is like `_.clone` except that it accepts `customizer` which\n * is invoked to produce the cloned value. If `customizer` returns `undefined`,\n * cloning is handled by the method instead. The `customizer` is invoked with\n * up to four arguments; (value [, index|key, object, stack]).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to clone.\n * @param {Function} [customizer] The function to customize cloning.\n * @returns {*} Returns the cloned value.\n * @see _.cloneDeepWith\n * @example\n *\n * function customizer(value) {\n * if (_.isElement(value)) {\n * return value.cloneNode(false);\n * }\n * }\n *\n * var el = _.cloneWith(document.body, customizer);\n *\n * console.log(el === document.body);\n * // => false\n * console.log(el.nodeName);\n * // => 'BODY'\n * console.log(el.childNodes.length);\n * // => 0\n */\n function cloneWith(value, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return baseClone(value, CLONE_SYMBOLS_FLAG, customizer);\n }\n\n /**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\n function cloneDeep(value) {\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n }\n\n /**\n * This method is like `_.cloneWith` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @param {Function} [customizer] The function to customize cloning.\n * @returns {*} Returns the deep cloned value.\n * @see _.cloneWith\n * @example\n *\n * function customizer(value) {\n * if (_.isElement(value)) {\n * return value.cloneNode(true);\n * }\n * }\n *\n * var el = _.cloneDeepWith(document.body, customizer);\n *\n * console.log(el === document.body);\n * // => false\n * console.log(el.nodeName);\n * // => 'BODY'\n * console.log(el.childNodes.length);\n * // => 20\n */\n function cloneDeepWith(value, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer);\n }\n\n /**\n * Checks if `object` conforms to `source` by invoking the predicate\n * properties of `source` with the corresponding property values of `object`.\n *\n * **Note:** This method is equivalent to `_.conforms` when `source` is\n * partially applied.\n *\n * @static\n * @memberOf _\n * @since 4.14.0\n * @category Lang\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property predicates to conform to.\n * @returns {boolean} Returns `true` if `object` conforms, else `false`.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n *\n * _.conformsTo(object, { 'b': function(n) { return n > 1; } });\n * // => true\n *\n * _.conformsTo(object, { 'b': function(n) { return n > 2; } });\n * // => false\n */\n function conformsTo(object, source) {\n return source == null || baseConformsTo(object, source, keys(source));\n }\n\n /**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\n function eq(value, other) {\n return value === other || (value !== value && other !== other);\n }\n\n /**\n * Checks if `value` is greater than `other`.\n *\n * @static\n * @memberOf _\n * @since 3.9.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is greater than `other`,\n * else `false`.\n * @see _.lt\n * @example\n *\n * _.gt(3, 1);\n * // => true\n *\n * _.gt(3, 3);\n * // => false\n *\n * _.gt(1, 3);\n * // => false\n */\n var gt = createRelationalOperation(baseGt);\n\n /**\n * Checks if `value` is greater than or equal to `other`.\n *\n * @static\n * @memberOf _\n * @since 3.9.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is greater than or equal to\n * `other`, else `false`.\n * @see _.lte\n * @example\n *\n * _.gte(3, 1);\n * // => true\n *\n * _.gte(3, 3);\n * // => true\n *\n * _.gte(1, 3);\n * // => false\n */\n var gte = createRelationalOperation(function(value, other) {\n return value >= other;\n });\n\n /**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\n var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n };\n\n /**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\n var isArray = Array.isArray;\n\n /**\n * Checks if `value` is classified as an `ArrayBuffer` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.\n * @example\n *\n * _.isArrayBuffer(new ArrayBuffer(2));\n * // => true\n *\n * _.isArrayBuffer(new Array(2));\n * // => false\n */\n var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer;\n\n /**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\n function isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n }\n\n /**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n * else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\n function isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n }\n\n /**\n * Checks if `value` is classified as a boolean primitive or object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a boolean, else `false`.\n * @example\n *\n * _.isBoolean(false);\n * // => true\n *\n * _.isBoolean(null);\n * // => false\n */\n function isBoolean(value) {\n return value === true || value === false ||\n (isObjectLike(value) && baseGetTag(value) == boolTag);\n }\n\n /**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\n var isBuffer = nativeIsBuffer || stubFalse;\n\n /**\n * Checks if `value` is classified as a `Date` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a date object, else `false`.\n * @example\n *\n * _.isDate(new Date);\n * // => true\n *\n * _.isDate('Mon April 23 2012');\n * // => false\n */\n var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;\n\n /**\n * Checks if `value` is likely a DOM element.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`.\n * @example\n *\n * _.isElement(document.body);\n * // => true\n *\n * _.isElement('<body>');\n * // => false\n */\n function isElement(value) {\n return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);\n }\n\n /**\n * Checks if `value` is an empty object, collection, map, or set.\n *\n * Objects are considered empty if they have no own enumerable string keyed\n * properties.\n *\n * Array-like values such as `arguments` objects, arrays, buffers, strings, or\n * jQuery-like collections are considered empty if they have a `length` of `0`.\n * Similarly, maps and sets are considered empty if they have a `size` of `0`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is empty, else `false`.\n * @example\n *\n * _.isEmpty(null);\n * // => true\n *\n * _.isEmpty(true);\n * // => true\n *\n * _.isEmpty(1);\n * // => true\n *\n * _.isEmpty([1, 2, 3]);\n * // => false\n *\n * _.isEmpty({ 'a': 1 });\n * // => false\n */\n function isEmpty(value) {\n if (value == null) {\n return true;\n }\n if (isArrayLike(value) &&\n (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||\n isBuffer(value) || isTypedArray(value) || isArguments(value))) {\n return !value.length;\n }\n var tag = getTag(value);\n if (tag == mapTag || tag == setTag) {\n return !value.size;\n }\n if (isPrototype(value)) {\n return !baseKeys(value).length;\n }\n for (var key in value) {\n if (hasOwnProperty.call(value, key)) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\n function isEqual(value, other) {\n return baseIsEqual(value, other);\n }\n\n /**\n * This method is like `_.isEqual` except that it accepts `customizer` which\n * is invoked to compare values. If `customizer` returns `undefined`, comparisons\n * are handled by the method instead. The `customizer` is invoked with up to\n * six arguments: (objValue, othValue [, index|key, object, other, stack]).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * function isGreeting(value) {\n * return /^h(?:i|ello)$/.test(value);\n * }\n *\n * function customizer(objValue, othValue) {\n * if (isGreeting(objValue) && isGreeting(othValue)) {\n * return true;\n * }\n * }\n *\n * var array = ['hello', 'goodbye'];\n * var other = ['hi', 'goodbye'];\n *\n * _.isEqualWith(array, other, customizer);\n * // => true\n */\n function isEqualWith(value, other, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n var result = customizer ? customizer(value, other) : undefined;\n return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result;\n }\n\n /**\n * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,\n * `SyntaxError`, `TypeError`, or `URIError` object.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an error object, else `false`.\n * @example\n *\n * _.isError(new Error);\n * // => true\n *\n * _.isError(Error);\n * // => false\n */\n function isError(value) {\n if (!isObjectLike(value)) {\n return false;\n }\n var tag = baseGetTag(value);\n return tag == errorTag || tag == domExcTag ||\n (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value));\n }\n\n /**\n * Checks if `value` is a finite primitive number.\n *\n * **Note:** This method is based on\n * [`Number.isFinite`](https://mdn.io/Number/isFinite).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a finite number, else `false`.\n * @example\n *\n * _.isFinite(3);\n * // => true\n *\n * _.isFinite(Number.MIN_VALUE);\n * // => true\n *\n * _.isFinite(Infinity);\n * // => false\n *\n * _.isFinite('3');\n * // => false\n */\n function isFinite(value) {\n return typeof value == 'number' && nativeIsFinite(value);\n }\n\n /**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\n function isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n }\n\n /**\n * Checks if `value` is an integer.\n *\n * **Note:** This method is based on\n * [`Number.isInteger`](https://mdn.io/Number/isInteger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an integer, else `false`.\n * @example\n *\n * _.isInteger(3);\n * // => true\n *\n * _.isInteger(Number.MIN_VALUE);\n * // => false\n *\n * _.isInteger(Infinity);\n * // => false\n *\n * _.isInteger('3');\n * // => false\n */\n function isInteger(value) {\n return typeof value == 'number' && value == toInteger(value);\n }\n\n /**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\n function isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n }\n\n /**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\n function isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n }\n\n /**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\n function isObjectLike(value) {\n return value != null && typeof value == 'object';\n }\n\n /**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\n var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\n /**\n * Performs a partial deep comparison between `object` and `source` to\n * determine if `object` contains equivalent property values.\n *\n * **Note:** This method is equivalent to `_.matches` when `source` is\n * partially applied.\n *\n * Partial comparisons will match empty array and empty object `source`\n * values against any array or object value, respectively. See `_.isEqual`\n * for a list of supported value comparisons.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n *\n * _.isMatch(object, { 'b': 2 });\n * // => true\n *\n * _.isMatch(object, { 'b': 1 });\n * // => false\n */\n function isMatch(object, source) {\n return object === source || baseIsMatch(object, source, getMatchData(source));\n }\n\n /**\n * This method is like `_.isMatch` except that it accepts `customizer` which\n * is invoked to compare values. If `customizer` returns `undefined`, comparisons\n * are handled by the method instead. The `customizer` is invoked with five\n * arguments: (objValue, srcValue, index|key, object, source).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n * @example\n *\n * function isGreeting(value) {\n * return /^h(?:i|ello)$/.test(value);\n * }\n *\n * function customizer(objValue, srcValue) {\n * if (isGreeting(objValue) && isGreeting(srcValue)) {\n * return true;\n * }\n * }\n *\n * var object = { 'greeting': 'hello' };\n * var source = { 'greeting': 'hi' };\n *\n * _.isMatchWith(object, source, customizer);\n * // => true\n */\n function isMatchWith(object, source, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return baseIsMatch(object, source, getMatchData(source), customizer);\n }\n\n /**\n * Checks if `value` is `NaN`.\n *\n * **Note:** This method is based on\n * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as\n * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for\n * `undefined` and other non-number values.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n * @example\n *\n * _.isNaN(NaN);\n * // => true\n *\n * _.isNaN(new Number(NaN));\n * // => true\n *\n * isNaN(undefined);\n * // => true\n *\n * _.isNaN(undefined);\n * // => false\n */\n function isNaN(value) {\n // An `NaN` primitive is the only value that is not equal to itself.\n // Perform the `toStringTag` check first to avoid errors with some\n // ActiveX objects in IE.\n return isNumber(value) && value != +value;\n }\n\n /**\n * Checks if `value` is a pristine native function.\n *\n * **Note:** This method can't reliably detect native functions in the presence\n * of the core-js package because core-js circumvents this kind of detection.\n * Despite multiple requests, the core-js maintainer has made it clear: any\n * attempt to fix the detection will be obstructed. As a result, we're left\n * with little choice but to throw an error. Unfortunately, this also affects\n * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill),\n * which rely on core-js.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n * @example\n *\n * _.isNative(Array.prototype.push);\n * // => true\n *\n * _.isNative(_);\n * // => false\n */\n function isNative(value) {\n if (isMaskable(value)) {\n throw new Error(CORE_ERROR_TEXT);\n }\n return baseIsNative(value);\n }\n\n /**\n * Checks if `value` is `null`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `null`, else `false`.\n * @example\n *\n * _.isNull(null);\n * // => true\n *\n * _.isNull(void 0);\n * // => false\n */\n function isNull(value) {\n return value === null;\n }\n\n /**\n * Checks if `value` is `null` or `undefined`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is nullish, else `false`.\n * @example\n *\n * _.isNil(null);\n * // => true\n *\n * _.isNil(void 0);\n * // => true\n *\n * _.isNil(NaN);\n * // => false\n */\n function isNil(value) {\n return value == null;\n }\n\n /**\n * Checks if `value` is classified as a `Number` primitive or object.\n *\n * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are\n * classified as numbers, use the `_.isFinite` method.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a number, else `false`.\n * @example\n *\n * _.isNumber(3);\n * // => true\n *\n * _.isNumber(Number.MIN_VALUE);\n * // => true\n *\n * _.isNumber(Infinity);\n * // => true\n *\n * _.isNumber('3');\n * // => false\n */\n function isNumber(value) {\n return typeof value == 'number' ||\n (isObjectLike(value) && baseGetTag(value) == numberTag);\n }\n\n /**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\n function isPlainObject(value) {\n if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n return false;\n }\n var proto = getPrototype(value);\n if (proto === null) {\n return true;\n }\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n funcToString.call(Ctor) == objectCtorString;\n }\n\n /**\n * Checks if `value` is classified as a `RegExp` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.\n * @example\n *\n * _.isRegExp(/abc/);\n * // => true\n *\n * _.isRegExp('/abc/');\n * // => false\n */\n var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;\n\n /**\n * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754\n * double precision number which isn't the result of a rounded unsafe integer.\n *\n * **Note:** This method is based on\n * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`.\n * @example\n *\n * _.isSafeInteger(3);\n * // => true\n *\n * _.isSafeInteger(Number.MIN_VALUE);\n * // => false\n *\n * _.isSafeInteger(Infinity);\n * // => false\n *\n * _.isSafeInteger('3');\n * // => false\n */\n function isSafeInteger(value) {\n return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER;\n }\n\n /**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\n var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\n /**\n * Checks if `value` is classified as a `String` primitive or object.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a string, else `false`.\n * @example\n *\n * _.isString('abc');\n * // => true\n *\n * _.isString(1);\n * // => false\n */\n function isString(value) {\n return typeof value == 'string' ||\n (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);\n }\n\n /**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\n function isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n }\n\n /**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\n var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\n /**\n * Checks if `value` is `undefined`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.\n * @example\n *\n * _.isUndefined(void 0);\n * // => true\n *\n * _.isUndefined(null);\n * // => false\n */\n function isUndefined(value) {\n return value === undefined;\n }\n\n /**\n * Checks if `value` is classified as a `WeakMap` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a weak map, else `false`.\n * @example\n *\n * _.isWeakMap(new WeakMap);\n * // => true\n *\n * _.isWeakMap(new Map);\n * // => false\n */\n function isWeakMap(value) {\n return isObjectLike(value) && getTag(value) == weakMapTag;\n }\n\n /**\n * Checks if `value` is classified as a `WeakSet` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a weak set, else `false`.\n * @example\n *\n * _.isWeakSet(new WeakSet);\n * // => true\n *\n * _.isWeakSet(new Set);\n * // => false\n */\n function isWeakSet(value) {\n return isObjectLike(value) && baseGetTag(value) == weakSetTag;\n }\n\n /**\n * Checks if `value` is less than `other`.\n *\n * @static\n * @memberOf _\n * @since 3.9.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is less than `other`,\n * else `false`.\n * @see _.gt\n * @example\n *\n * _.lt(1, 3);\n * // => true\n *\n * _.lt(3, 3);\n * // => false\n *\n * _.lt(3, 1);\n * // => false\n */\n var lt = createRelationalOperation(baseLt);\n\n /**\n * Checks if `value` is less than or equal to `other`.\n *\n * @static\n * @memberOf _\n * @since 3.9.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is less than or equal to\n * `other`, else `false`.\n * @see _.gte\n * @example\n *\n * _.lte(1, 3);\n * // => true\n *\n * _.lte(3, 3);\n * // => true\n *\n * _.lte(3, 1);\n * // => false\n */\n var lte = createRelationalOperation(function(value, other) {\n return value <= other;\n });\n\n /**\n * Converts `value` to an array.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Array} Returns the converted array.\n * @example\n *\n * _.toArray({ 'a': 1, 'b': 2 });\n * // => [1, 2]\n *\n * _.toArray('abc');\n * // => ['a', 'b', 'c']\n *\n * _.toArray(1);\n * // => []\n *\n * _.toArray(null);\n * // => []\n */\n function toArray(value) {\n if (!value) {\n return [];\n }\n if (isArrayLike(value)) {\n return isString(value) ? stringToArray(value) : copyArray(value);\n }\n if (symIterator && value[symIterator]) {\n return iteratorToArray(value[symIterator]());\n }\n var tag = getTag(value),\n func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values);\n\n return func(value);\n }\n\n /**\n * Converts `value` to a finite number.\n *\n * @static\n * @memberOf _\n * @since 4.12.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted number.\n * @example\n *\n * _.toFinite(3.2);\n * // => 3.2\n *\n * _.toFinite(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toFinite(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toFinite('3.2');\n * // => 3.2\n */\n function toFinite(value) {\n if (!value) {\n return value === 0 ? value : 0;\n }\n value = toNumber(value);\n if (value === INFINITY || value === -INFINITY) {\n var sign = (value < 0 ? -1 : 1);\n return sign * MAX_INTEGER;\n }\n return value === value ? value : 0;\n }\n\n /**\n * Converts `value` to an integer.\n *\n * **Note:** This method is loosely based on\n * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toInteger(3.2);\n * // => 3\n *\n * _.toInteger(Number.MIN_VALUE);\n * // => 0\n *\n * _.toInteger(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toInteger('3.2');\n * // => 3\n */\n function toInteger(value) {\n var result = toFinite(value),\n remainder = result % 1;\n\n return result === result ? (remainder ? result - remainder : result) : 0;\n }\n\n /**\n * Converts `value` to an integer suitable for use as the length of an\n * array-like object.\n *\n * **Note:** This method is based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toLength(3.2);\n * // => 3\n *\n * _.toLength(Number.MIN_VALUE);\n * // => 0\n *\n * _.toLength(Infinity);\n * // => 4294967295\n *\n * _.toLength('3.2');\n * // => 3\n */\n function toLength(value) {\n return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0;\n }\n\n /**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\n function toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = baseTrim(value);\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n }\n\n /**\n * Converts `value` to a plain object flattening inherited enumerable string\n * keyed properties of `value` to own properties of the plain object.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Object} Returns the converted plain object.\n * @example\n *\n * function Foo() {\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.assign({ 'a': 1 }, new Foo);\n * // => { 'a': 1, 'b': 2 }\n *\n * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));\n * // => { 'a': 1, 'b': 2, 'c': 3 }\n */\n function toPlainObject(value) {\n return copyObject(value, keysIn(value));\n }\n\n /**\n * Converts `value` to a safe integer. A safe integer can be compared and\n * represented correctly.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toSafeInteger(3.2);\n * // => 3\n *\n * _.toSafeInteger(Number.MIN_VALUE);\n * // => 0\n *\n * _.toSafeInteger(Infinity);\n * // => 9007199254740991\n *\n * _.toSafeInteger('3.2');\n * // => 3\n */\n function toSafeInteger(value) {\n return value\n ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER)\n : (value === 0 ? value : 0);\n }\n\n /**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\n function toString(value) {\n return value == null ? '' : baseToString(value);\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Assigns own enumerable string keyed properties of source objects to the\n * destination object. Source objects are applied from left to right.\n * Subsequent sources overwrite property assignments of previous sources.\n *\n * **Note:** This method mutates `object` and is loosely based on\n * [`Object.assign`](https://mdn.io/Object/assign).\n *\n * @static\n * @memberOf _\n * @since 0.10.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.assignIn\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * function Bar() {\n * this.c = 3;\n * }\n *\n * Foo.prototype.b = 2;\n * Bar.prototype.d = 4;\n *\n * _.assign({ 'a': 0 }, new Foo, new Bar);\n * // => { 'a': 1, 'c': 3 }\n */\n var assign = createAssigner(function(object, source) {\n if (isPrototype(source) || isArrayLike(source)) {\n copyObject(source, keys(source), object);\n return;\n }\n for (var key in source) {\n if (hasOwnProperty.call(source, key)) {\n assignValue(object, key, source[key]);\n }\n }\n });\n\n /**\n * This method is like `_.assign` except that it iterates over own and\n * inherited source properties.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @alias extend\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.assign\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * function Bar() {\n * this.c = 3;\n * }\n *\n * Foo.prototype.b = 2;\n * Bar.prototype.d = 4;\n *\n * _.assignIn({ 'a': 0 }, new Foo, new Bar);\n * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 }\n */\n var assignIn = createAssigner(function(object, source) {\n copyObject(source, keysIn(source), object);\n });\n\n /**\n * This method is like `_.assignIn` except that it accepts `customizer`\n * which is invoked to produce the assigned values. If `customizer` returns\n * `undefined`, assignment is handled by the method instead. The `customizer`\n * is invoked with five arguments: (objValue, srcValue, key, object, source).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @alias extendWith\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} sources The source objects.\n * @param {Function} [customizer] The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @see _.assignWith\n * @example\n *\n * function customizer(objValue, srcValue) {\n * return _.isUndefined(objValue) ? srcValue : objValue;\n * }\n *\n * var defaults = _.partialRight(_.assignInWith, customizer);\n *\n * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n * // => { 'a': 1, 'b': 2 }\n */\n var assignInWith = createAssigner(function(object, source, srcIndex, customizer) {\n copyObject(source, keysIn(source), object, customizer);\n });\n\n /**\n * This method is like `_.assign` except that it accepts `customizer`\n * which is invoked to produce the assigned values. If `customizer` returns\n * `undefined`, assignment is handled by the method instead. The `customizer`\n * is invoked with five arguments: (objValue, srcValue, key, object, source).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} sources The source objects.\n * @param {Function} [customizer] The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @see _.assignInWith\n * @example\n *\n * function customizer(objValue, srcValue) {\n * return _.isUndefined(objValue) ? srcValue : objValue;\n * }\n *\n * var defaults = _.partialRight(_.assignWith, customizer);\n *\n * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n * // => { 'a': 1, 'b': 2 }\n */\n var assignWith = createAssigner(function(object, source, srcIndex, customizer) {\n copyObject(source, keys(source), object, customizer);\n });\n\n /**\n * Creates an array of values corresponding to `paths` of `object`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {...(string|string[])} [paths] The property paths to pick.\n * @returns {Array} Returns the picked values.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };\n *\n * _.at(object, ['a[0].b.c', 'a[1]']);\n * // => [3, 4]\n */\n var at = flatRest(baseAt);\n\n /**\n * Creates an object that inherits from the `prototype` object. If a\n * `properties` object is given, its own enumerable string keyed properties\n * are assigned to the created object.\n *\n * @static\n * @memberOf _\n * @since 2.3.0\n * @category Object\n * @param {Object} prototype The object to inherit from.\n * @param {Object} [properties] The properties to assign to the object.\n * @returns {Object} Returns the new object.\n * @example\n *\n * function Shape() {\n * this.x = 0;\n * this.y = 0;\n * }\n *\n * function Circle() {\n * Shape.call(this);\n * }\n *\n * Circle.prototype = _.create(Shape.prototype, {\n * 'constructor': Circle\n * });\n *\n * var circle = new Circle;\n * circle instanceof Circle;\n * // => true\n *\n * circle instanceof Shape;\n * // => true\n */\n function create(prototype, properties) {\n var result = baseCreate(prototype);\n return properties == null ? result : baseAssign(result, properties);\n }\n\n /**\n * Assigns own and inherited enumerable string keyed properties of source\n * objects to the destination object for all destination properties that\n * resolve to `undefined`. Source objects are applied from left to right.\n * Once a property is set, additional values of the same property are ignored.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.defaultsDeep\n * @example\n *\n * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n * // => { 'a': 1, 'b': 2 }\n */\n var defaults = baseRest(function(object, sources) {\n object = Object(object);\n\n var index = -1;\n var length = sources.length;\n var guard = length > 2 ? sources[2] : undefined;\n\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n length = 1;\n }\n\n while (++index < length) {\n var source = sources[index];\n var props = keysIn(source);\n var propsIndex = -1;\n var propsLength = props.length;\n\n while (++propsIndex < propsLength) {\n var key = props[propsIndex];\n var value = object[key];\n\n if (value === undefined ||\n (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) {\n object[key] = source[key];\n }\n }\n }\n\n return object;\n });\n\n /**\n * This method is like `_.defaults` except that it recursively assigns\n * default properties.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 3.10.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.defaults\n * @example\n *\n * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } });\n * // => { 'a': { 'b': 2, 'c': 3 } }\n */\n var defaultsDeep = baseRest(function(args) {\n args.push(undefined, customDefaultsMerge);\n return apply(mergeWith, undefined, args);\n });\n\n /**\n * This method is like `_.find` except that it returns the key of the first\n * element `predicate` returns truthy for instead of the element itself.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category Object\n * @param {Object} object The object to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {string|undefined} Returns the key of the matched element,\n * else `undefined`.\n * @example\n *\n * var users = {\n * 'barney': { 'age': 36, 'active': true },\n * 'fred': { 'age': 40, 'active': false },\n * 'pebbles': { 'age': 1, 'active': true }\n * };\n *\n * _.findKey(users, function(o) { return o.age < 40; });\n * // => 'barney' (iteration order is not guaranteed)\n *\n * // The `_.matches` iteratee shorthand.\n * _.findKey(users, { 'age': 1, 'active': true });\n * // => 'pebbles'\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findKey(users, ['active', false]);\n * // => 'fred'\n *\n * // The `_.property` iteratee shorthand.\n * _.findKey(users, 'active');\n * // => 'barney'\n */\n function findKey(object, predicate) {\n return baseFindKey(object, getIteratee(predicate, 3), baseForOwn);\n }\n\n /**\n * This method is like `_.findKey` except that it iterates over elements of\n * a collection in the opposite order.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Object\n * @param {Object} object The object to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {string|undefined} Returns the key of the matched element,\n * else `undefined`.\n * @example\n *\n * var users = {\n * 'barney': { 'age': 36, 'active': true },\n * 'fred': { 'age': 40, 'active': false },\n * 'pebbles': { 'age': 1, 'active': true }\n * };\n *\n * _.findLastKey(users, function(o) { return o.age < 40; });\n * // => returns 'pebbles' assuming `_.findKey` returns 'barney'\n *\n * // The `_.matches` iteratee shorthand.\n * _.findLastKey(users, { 'age': 36, 'active': true });\n * // => 'barney'\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findLastKey(users, ['active', false]);\n * // => 'fred'\n *\n * // The `_.property` iteratee shorthand.\n * _.findLastKey(users, 'active');\n * // => 'pebbles'\n */\n function findLastKey(object, predicate) {\n return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight);\n }\n\n /**\n * Iterates over own and inherited enumerable string keyed properties of an\n * object and invokes `iteratee` for each property. The iteratee is invoked\n * with three arguments: (value, key, object). Iteratee functions may exit\n * iteration early by explicitly returning `false`.\n *\n * @static\n * @memberOf _\n * @since 0.3.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forInRight\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forIn(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed).\n */\n function forIn(object, iteratee) {\n return object == null\n ? object\n : baseFor(object, getIteratee(iteratee, 3), keysIn);\n }\n\n /**\n * This method is like `_.forIn` except that it iterates over properties of\n * `object` in the opposite order.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forIn\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forInRight(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'.\n */\n function forInRight(object, iteratee) {\n return object == null\n ? object\n : baseForRight(object, getIteratee(iteratee, 3), keysIn);\n }\n\n /**\n * Iterates over own enumerable string keyed properties of an object and\n * invokes `iteratee` for each property. The iteratee is invoked with three\n * arguments: (value, key, object). Iteratee functions may exit iteration\n * early by explicitly returning `false`.\n *\n * @static\n * @memberOf _\n * @since 0.3.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forOwnRight\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forOwn(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'a' then 'b' (iteration order is not guaranteed).\n */\n function forOwn(object, iteratee) {\n return object && baseForOwn(object, getIteratee(iteratee, 3));\n }\n\n /**\n * This method is like `_.forOwn` except that it iterates over properties of\n * `object` in the opposite order.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forOwn\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forOwnRight(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'.\n */\n function forOwnRight(object, iteratee) {\n return object && baseForOwnRight(object, getIteratee(iteratee, 3));\n }\n\n /**\n * Creates an array of function property names from own enumerable properties\n * of `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to inspect.\n * @returns {Array} Returns the function names.\n * @see _.functionsIn\n * @example\n *\n * function Foo() {\n * this.a = _.constant('a');\n * this.b = _.constant('b');\n * }\n *\n * Foo.prototype.c = _.constant('c');\n *\n * _.functions(new Foo);\n * // => ['a', 'b']\n */\n function functions(object) {\n return object == null ? [] : baseFunctions(object, keys(object));\n }\n\n /**\n * Creates an array of function property names from own and inherited\n * enumerable properties of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to inspect.\n * @returns {Array} Returns the function names.\n * @see _.functions\n * @example\n *\n * function Foo() {\n * this.a = _.constant('a');\n * this.b = _.constant('b');\n * }\n *\n * Foo.prototype.c = _.constant('c');\n *\n * _.functionsIn(new Foo);\n * // => ['a', 'b', 'c']\n */\n function functionsIn(object) {\n return object == null ? [] : baseFunctions(object, keysIn(object));\n }\n\n /**\n * Gets the value at `path` of `object`. If the resolved value is\n * `undefined`, the `defaultValue` is returned in its place.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.get(object, 'a[0].b.c');\n * // => 3\n *\n * _.get(object, ['a', '0', 'b', 'c']);\n * // => 3\n *\n * _.get(object, 'a.b.c', 'default');\n * // => 'default'\n */\n function get(object, path, defaultValue) {\n var result = object == null ? undefined : baseGet(object, path);\n return result === undefined ? defaultValue : result;\n }\n\n /**\n * Checks if `path` is a direct property of `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = { 'a': { 'b': 2 } };\n * var other = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.has(object, 'a');\n * // => true\n *\n * _.has(object, 'a.b');\n * // => true\n *\n * _.has(object, ['a', 'b']);\n * // => true\n *\n * _.has(other, 'a');\n * // => false\n */\n function has(object, path) {\n return object != null && hasPath(object, path, baseHas);\n }\n\n /**\n * Checks if `path` is a direct or inherited property of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.hasIn(object, 'a');\n * // => true\n *\n * _.hasIn(object, 'a.b');\n * // => true\n *\n * _.hasIn(object, ['a', 'b']);\n * // => true\n *\n * _.hasIn(object, 'b');\n * // => false\n */\n function hasIn(object, path) {\n return object != null && hasPath(object, path, baseHasIn);\n }\n\n /**\n * Creates an object composed of the inverted keys and values of `object`.\n * If `object` contains duplicate values, subsequent values overwrite\n * property assignments of previous values.\n *\n * @static\n * @memberOf _\n * @since 0.7.0\n * @category Object\n * @param {Object} object The object to invert.\n * @returns {Object} Returns the new inverted object.\n * @example\n *\n * var object = { 'a': 1, 'b': 2, 'c': 1 };\n *\n * _.invert(object);\n * // => { '1': 'c', '2': 'b' }\n */\n var invert = createInverter(function(result, value, key) {\n if (value != null &&\n typeof value.toString != 'function') {\n value = nativeObjectToString.call(value);\n }\n\n result[value] = key;\n }, constant(identity));\n\n /**\n * This method is like `_.invert` except that the inverted object is generated\n * from the results of running each element of `object` thru `iteratee`. The\n * corresponding inverted value of each inverted key is an array of keys\n * responsible for generating the inverted value. The iteratee is invoked\n * with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.1.0\n * @category Object\n * @param {Object} object The object to invert.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Object} Returns the new inverted object.\n * @example\n *\n * var object = { 'a': 1, 'b': 2, 'c': 1 };\n *\n * _.invertBy(object);\n * // => { '1': ['a', 'c'], '2': ['b'] }\n *\n * _.invertBy(object, function(value) {\n * return 'group' + value;\n * });\n * // => { 'group1': ['a', 'c'], 'group2': ['b'] }\n */\n var invertBy = createInverter(function(result, value, key) {\n if (value != null &&\n typeof value.toString != 'function') {\n value = nativeObjectToString.call(value);\n }\n\n if (hasOwnProperty.call(result, value)) {\n result[value].push(key);\n } else {\n result[value] = [key];\n }\n }, getIteratee);\n\n /**\n * Invokes the method at `path` of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the method to invoke.\n * @param {...*} [args] The arguments to invoke the method with.\n * @returns {*} Returns the result of the invoked method.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] };\n *\n * _.invoke(object, 'a[0].b.c.slice', 1, 3);\n * // => [2, 3]\n */\n var invoke = baseRest(baseInvoke);\n\n /**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\n function keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n }\n\n /**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\n function keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n }\n\n /**\n * The opposite of `_.mapValues`; this method creates an object with the\n * same values as `object` and keys generated by running each own enumerable\n * string keyed property of `object` thru `iteratee`. The iteratee is invoked\n * with three arguments: (value, key, object).\n *\n * @static\n * @memberOf _\n * @since 3.8.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns the new mapped object.\n * @see _.mapValues\n * @example\n *\n * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {\n * return key + value;\n * });\n * // => { 'a1': 1, 'b2': 2 }\n */\n function mapKeys(object, iteratee) {\n var result = {};\n iteratee = getIteratee(iteratee, 3);\n\n baseForOwn(object, function(value, key, object) {\n baseAssignValue(result, iteratee(value, key, object), value);\n });\n return result;\n }\n\n /**\n * Creates an object with the same keys as `object` and values generated\n * by running each own enumerable string keyed property of `object` thru\n * `iteratee`. The iteratee is invoked with three arguments:\n * (value, key, object).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns the new mapped object.\n * @see _.mapKeys\n * @example\n *\n * var users = {\n * 'fred': { 'user': 'fred', 'age': 40 },\n * 'pebbles': { 'user': 'pebbles', 'age': 1 }\n * };\n *\n * _.mapValues(users, function(o) { return o.age; });\n * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\n *\n * // The `_.property` iteratee shorthand.\n * _.mapValues(users, 'age');\n * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\n */\n function mapValues(object, iteratee) {\n var result = {};\n iteratee = getIteratee(iteratee, 3);\n\n baseForOwn(object, function(value, key, object) {\n baseAssignValue(result, key, iteratee(value, key, object));\n });\n return result;\n }\n\n /**\n * This method is like `_.assign` except that it recursively merges own and\n * inherited enumerable string keyed properties of source objects into the\n * destination object. Source properties that resolve to `undefined` are\n * skipped if a destination value exists. Array and plain object properties\n * are merged recursively. Other objects and value types are overridden by\n * assignment. Source objects are applied from left to right. Subsequent\n * sources overwrite property assignments of previous sources.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {\n * 'a': [{ 'b': 2 }, { 'd': 4 }]\n * };\n *\n * var other = {\n * 'a': [{ 'c': 3 }, { 'e': 5 }]\n * };\n *\n * _.merge(object, other);\n * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }\n */\n var merge = createAssigner(function(object, source, srcIndex) {\n baseMerge(object, source, srcIndex);\n });\n\n /**\n * This method is like `_.merge` except that it accepts `customizer` which\n * is invoked to produce the merged values of the destination and source\n * properties. If `customizer` returns `undefined`, merging is handled by the\n * method instead. The `customizer` is invoked with six arguments:\n * (objValue, srcValue, key, object, source, stack).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} sources The source objects.\n * @param {Function} customizer The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @example\n *\n * function customizer(objValue, srcValue) {\n * if (_.isArray(objValue)) {\n * return objValue.concat(srcValue);\n * }\n * }\n *\n * var object = { 'a': [1], 'b': [2] };\n * var other = { 'a': [3], 'b': [4] };\n *\n * _.mergeWith(object, other, customizer);\n * // => { 'a': [1, 3], 'b': [2, 4] }\n */\n var mergeWith = createAssigner(function(object, source, srcIndex, customizer) {\n baseMerge(object, source, srcIndex, customizer);\n });\n\n /**\n * The opposite of `_.pick`; this method creates an object composed of the\n * own and inherited enumerable property paths of `object` that are not omitted.\n *\n * **Note:** This method is considerably slower than `_.pick`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The source object.\n * @param {...(string|string[])} [paths] The property paths to omit.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.omit(object, ['a', 'c']);\n * // => { 'b': '2' }\n */\n var omit = flatRest(function(object, paths) {\n var result = {};\n if (object == null) {\n return result;\n }\n var isDeep = false;\n paths = arrayMap(paths, function(path) {\n path = castPath(path, object);\n isDeep || (isDeep = path.length > 1);\n return path;\n });\n copyObject(object, getAllKeysIn(object), result);\n if (isDeep) {\n result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);\n }\n var length = paths.length;\n while (length--) {\n baseUnset(result, paths[length]);\n }\n return result;\n });\n\n /**\n * The opposite of `_.pickBy`; this method creates an object composed of\n * the own and inherited enumerable string keyed properties of `object` that\n * `predicate` doesn't return truthy for. The predicate is invoked with two\n * arguments: (value, key).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The source object.\n * @param {Function} [predicate=_.identity] The function invoked per property.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.omitBy(object, _.isNumber);\n * // => { 'b': '2' }\n */\n function omitBy(object, predicate) {\n return pickBy(object, negate(getIteratee(predicate)));\n }\n\n /**\n * Creates an object composed of the picked `object` properties.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The source object.\n * @param {...(string|string[])} [paths] The property paths to pick.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.pick(object, ['a', 'c']);\n * // => { 'a': 1, 'c': 3 }\n */\n var pick = flatRest(function(object, paths) {\n return object == null ? {} : basePick(object, paths);\n });\n\n /**\n * Creates an object composed of the `object` properties `predicate` returns\n * truthy for. The predicate is invoked with two arguments: (value, key).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The source object.\n * @param {Function} [predicate=_.identity] The function invoked per property.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.pickBy(object, _.isNumber);\n * // => { 'a': 1, 'c': 3 }\n */\n function pickBy(object, predicate) {\n if (object == null) {\n return {};\n }\n var props = arrayMap(getAllKeysIn(object), function(prop) {\n return [prop];\n });\n predicate = getIteratee(predicate);\n return basePickBy(object, props, function(value, path) {\n return predicate(value, path[0]);\n });\n }\n\n /**\n * This method is like `_.get` except that if the resolved value is a\n * function it's invoked with the `this` binding of its parent object and\n * its result is returned.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to resolve.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };\n *\n * _.result(object, 'a[0].b.c1');\n * // => 3\n *\n * _.result(object, 'a[0].b.c2');\n * // => 4\n *\n * _.result(object, 'a[0].b.c3', 'default');\n * // => 'default'\n *\n * _.result(object, 'a[0].b.c3', _.constant('default'));\n * // => 'default'\n */\n function result(object, path, defaultValue) {\n path = castPath(path, object);\n\n var index = -1,\n length = path.length;\n\n // Ensure the loop is entered when path is empty.\n if (!length) {\n length = 1;\n object = undefined;\n }\n while (++index < length) {\n var value = object == null ? undefined : object[toKey(path[index])];\n if (value === undefined) {\n index = length;\n value = defaultValue;\n }\n object = isFunction(value) ? value.call(object) : value;\n }\n return object;\n }\n\n /**\n * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,\n * it's created. Arrays are created for missing index properties while objects\n * are created for all other missing properties. Use `_.setWith` to customize\n * `path` creation.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.set(object, 'a[0].b.c', 4);\n * console.log(object.a[0].b.c);\n * // => 4\n *\n * _.set(object, ['x', '0', 'y', 'z'], 5);\n * console.log(object.x[0].y.z);\n * // => 5\n */\n function set(object, path, value) {\n return object == null ? object : baseSet(object, path, value);\n }\n\n /**\n * This method is like `_.set` except that it accepts `customizer` which is\n * invoked to produce the objects of `path`. If `customizer` returns `undefined`\n * path creation is handled by the method instead. The `customizer` is invoked\n * with three arguments: (nsValue, key, nsObject).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @param {Function} [customizer] The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {};\n *\n * _.setWith(object, '[0][1]', 'a', Object);\n * // => { '0': { '1': 'a' } }\n */\n function setWith(object, path, value, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return object == null ? object : baseSet(object, path, value, customizer);\n }\n\n /**\n * Creates an array of own enumerable string keyed-value pairs for `object`\n * which can be consumed by `_.fromPairs`. If `object` is a map or set, its\n * entries are returned.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @alias entries\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the key-value pairs.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.toPairs(new Foo);\n * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed)\n */\n var toPairs = createToPairs(keys);\n\n /**\n * Creates an array of own and inherited enumerable string keyed-value pairs\n * for `object` which can be consumed by `_.fromPairs`. If `object` is a map\n * or set, its entries are returned.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @alias entriesIn\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the key-value pairs.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.toPairsIn(new Foo);\n * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed)\n */\n var toPairsIn = createToPairs(keysIn);\n\n /**\n * An alternative to `_.reduce`; this method transforms `object` to a new\n * `accumulator` object which is the result of running each of its own\n * enumerable string keyed properties thru `iteratee`, with each invocation\n * potentially mutating the `accumulator` object. If `accumulator` is not\n * provided, a new object with the same `[[Prototype]]` will be used. The\n * iteratee is invoked with four arguments: (accumulator, value, key, object).\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @static\n * @memberOf _\n * @since 1.3.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {*} [accumulator] The custom accumulator value.\n * @returns {*} Returns the accumulated value.\n * @example\n *\n * _.transform([2, 3, 4], function(result, n) {\n * result.push(n *= n);\n * return n % 2 == 0;\n * }, []);\n * // => [4, 9]\n *\n * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {\n * (result[value] || (result[value] = [])).push(key);\n * }, {});\n * // => { '1': ['a', 'c'], '2': ['b'] }\n */\n function transform(object, iteratee, accumulator) {\n var isArr = isArray(object),\n isArrLike = isArr || isBuffer(object) || isTypedArray(object);\n\n iteratee = getIteratee(iteratee, 4);\n if (accumulator == null) {\n var Ctor = object && object.constructor;\n if (isArrLike) {\n accumulator = isArr ? new Ctor : [];\n }\n else if (isObject(object)) {\n accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};\n }\n else {\n accumulator = {};\n }\n }\n (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) {\n return iteratee(accumulator, value, index, object);\n });\n return accumulator;\n }\n\n /**\n * Removes the property at `path` of `object`.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to unset.\n * @returns {boolean} Returns `true` if the property is deleted, else `false`.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 7 } }] };\n * _.unset(object, 'a[0].b.c');\n * // => true\n *\n * console.log(object);\n * // => { 'a': [{ 'b': {} }] };\n *\n * _.unset(object, ['a', '0', 'b', 'c']);\n * // => true\n *\n * console.log(object);\n * // => { 'a': [{ 'b': {} }] };\n */\n function unset(object, path) {\n return object == null ? true : baseUnset(object, path);\n }\n\n /**\n * This method is like `_.set` except that accepts `updater` to produce the\n * value to set. Use `_.updateWith` to customize `path` creation. The `updater`\n * is invoked with one argument: (value).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.6.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {Function} updater The function to produce the updated value.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.update(object, 'a[0].b.c', function(n) { return n * n; });\n * console.log(object.a[0].b.c);\n * // => 9\n *\n * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; });\n * console.log(object.x[0].y.z);\n * // => 0\n */\n function update(object, path, updater) {\n return object == null ? object : baseUpdate(object, path, castFunction(updater));\n }\n\n /**\n * This method is like `_.update` except that it accepts `customizer` which is\n * invoked to produce the objects of `path`. If `customizer` returns `undefined`\n * path creation is handled by the method instead. The `customizer` is invoked\n * with three arguments: (nsValue, key, nsObject).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.6.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {Function} updater The function to produce the updated value.\n * @param {Function} [customizer] The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {};\n *\n * _.updateWith(object, '[0][1]', _.constant('a'), Object);\n * // => { '0': { '1': 'a' } }\n */\n function updateWith(object, path, updater, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer);\n }\n\n /**\n * Creates an array of the own enumerable string keyed property values of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property values.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.values(new Foo);\n * // => [1, 2] (iteration order is not guaranteed)\n *\n * _.values('hi');\n * // => ['h', 'i']\n */\n function values(object) {\n return object == null ? [] : baseValues(object, keys(object));\n }\n\n /**\n * Creates an array of the own and inherited enumerable string keyed property\n * values of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property values.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.valuesIn(new Foo);\n * // => [1, 2, 3] (iteration order is not guaranteed)\n */\n function valuesIn(object) {\n return object == null ? [] : baseValues(object, keysIn(object));\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Clamps `number` within the inclusive `lower` and `upper` bounds.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Number\n * @param {number} number The number to clamp.\n * @param {number} [lower] The lower bound.\n * @param {number} upper The upper bound.\n * @returns {number} Returns the clamped number.\n * @example\n *\n * _.clamp(-10, -5, 5);\n * // => -5\n *\n * _.clamp(10, -5, 5);\n * // => 5\n */\n function clamp(number, lower, upper) {\n if (upper === undefined) {\n upper = lower;\n lower = undefined;\n }\n if (upper !== undefined) {\n upper = toNumber(upper);\n upper = upper === upper ? upper : 0;\n }\n if (lower !== undefined) {\n lower = toNumber(lower);\n lower = lower === lower ? lower : 0;\n }\n return baseClamp(toNumber(number), lower, upper);\n }\n\n /**\n * Checks if `n` is between `start` and up to, but not including, `end`. If\n * `end` is not specified, it's set to `start` with `start` then set to `0`.\n * If `start` is greater than `end` the params are swapped to support\n * negative ranges.\n *\n * @static\n * @memberOf _\n * @since 3.3.0\n * @category Number\n * @param {number} number The number to check.\n * @param {number} [start=0] The start of the range.\n * @param {number} end The end of the range.\n * @returns {boolean} Returns `true` if `number` is in the range, else `false`.\n * @see _.range, _.rangeRight\n * @example\n *\n * _.inRange(3, 2, 4);\n * // => true\n *\n * _.inRange(4, 8);\n * // => true\n *\n * _.inRange(4, 2);\n * // => false\n *\n * _.inRange(2, 2);\n * // => false\n *\n * _.inRange(1.2, 2);\n * // => true\n *\n * _.inRange(5.2, 4);\n * // => false\n *\n * _.inRange(-3, -2, -6);\n * // => true\n */\n function inRange(number, start, end) {\n start = toFinite(start);\n if (end === undefined) {\n end = start;\n start = 0;\n } else {\n end = toFinite(end);\n }\n number = toNumber(number);\n return baseInRange(number, start, end);\n }\n\n /**\n * Produces a random number between the inclusive `lower` and `upper` bounds.\n * If only one argument is provided a number between `0` and the given number\n * is returned. If `floating` is `true`, or either `lower` or `upper` are\n * floats, a floating-point number is returned instead of an integer.\n *\n * **Note:** JavaScript follows the IEEE-754 standard for resolving\n * floating-point values which can produce unexpected results.\n *\n * @static\n * @memberOf _\n * @since 0.7.0\n * @category Number\n * @param {number} [lower=0] The lower bound.\n * @param {number} [upper=1] The upper bound.\n * @param {boolean} [floating] Specify returning a floating-point number.\n * @returns {number} Returns the random number.\n * @example\n *\n * _.random(0, 5);\n * // => an integer between 0 and 5\n *\n * _.random(5);\n * // => also an integer between 0 and 5\n *\n * _.random(5, true);\n * // => a floating-point number between 0 and 5\n *\n * _.random(1.2, 5.2);\n * // => a floating-point number between 1.2 and 5.2\n */\n function random(lower, upper, floating) {\n if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) {\n upper = floating = undefined;\n }\n if (floating === undefined) {\n if (typeof upper == 'boolean') {\n floating = upper;\n upper = undefined;\n }\n else if (typeof lower == 'boolean') {\n floating = lower;\n lower = undefined;\n }\n }\n if (lower === undefined && upper === undefined) {\n lower = 0;\n upper = 1;\n }\n else {\n lower = toFinite(lower);\n if (upper === undefined) {\n upper = lower;\n lower = 0;\n } else {\n upper = toFinite(upper);\n }\n }\n if (lower > upper) {\n var temp = lower;\n lower = upper;\n upper = temp;\n }\n if (floating || lower % 1 || upper % 1) {\n var rand = nativeRandom();\n return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper);\n }\n return baseRandom(lower, upper);\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the camel cased string.\n * @example\n *\n * _.camelCase('Foo Bar');\n * // => 'fooBar'\n *\n * _.camelCase('--foo-bar--');\n * // => 'fooBar'\n *\n * _.camelCase('__FOO_BAR__');\n * // => 'fooBar'\n */\n var camelCase = createCompounder(function(result, word, index) {\n word = word.toLowerCase();\n return result + (index ? capitalize(word) : word);\n });\n\n /**\n * Converts the first character of `string` to upper case and the remaining\n * to lower case.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to capitalize.\n * @returns {string} Returns the capitalized string.\n * @example\n *\n * _.capitalize('FRED');\n * // => 'Fred'\n */\n function capitalize(string) {\n return upperFirst(toString(string).toLowerCase());\n }\n\n /**\n * Deburrs `string` by converting\n * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)\n * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)\n * letters to basic Latin letters and removing\n * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to deburr.\n * @returns {string} Returns the deburred string.\n * @example\n *\n * _.deburr('déjà vu');\n * // => 'deja vu'\n */\n function deburr(string) {\n string = toString(string);\n return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');\n }\n\n /**\n * Checks if `string` ends with the given target string.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to inspect.\n * @param {string} [target] The string to search for.\n * @param {number} [position=string.length] The position to search up to.\n * @returns {boolean} Returns `true` if `string` ends with `target`,\n * else `false`.\n * @example\n *\n * _.endsWith('abc', 'c');\n * // => true\n *\n * _.endsWith('abc', 'b');\n * // => false\n *\n * _.endsWith('abc', 'b', 2);\n * // => true\n */\n function endsWith(string, target, position) {\n string = toString(string);\n target = baseToString(target);\n\n var length = string.length;\n position = position === undefined\n ? length\n : baseClamp(toInteger(position), 0, length);\n\n var end = position;\n position -= target.length;\n return position >= 0 && string.slice(position, end) == target;\n }\n\n /**\n * Converts the characters \"&\", \"<\", \">\", '\"', and \"'\" in `string` to their\n * corresponding HTML entities.\n *\n * **Note:** No other characters are escaped. To escape additional\n * characters use a third-party library like [_he_](https://mths.be/he).\n *\n * Though the \">\" character is escaped for symmetry, characters like\n * \">\" and \"/\" don't need escaping in HTML and have no special meaning\n * unless they're part of a tag or unquoted attribute value. See\n * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)\n * (under \"semi-related fun fact\") for more details.\n *\n * When working with HTML you should always\n * [quote attribute values](http://wonko.com/post/html-escaping) to reduce\n * XSS vectors.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category String\n * @param {string} [string=''] The string to escape.\n * @returns {string} Returns the escaped string.\n * @example\n *\n * _.escape('fred, barney, & pebbles');\n * // => 'fred, barney, & pebbles'\n */\n function escape(string) {\n string = toString(string);\n return (string && reHasUnescapedHtml.test(string))\n ? string.replace(reUnescapedHtml, escapeHtmlChar)\n : string;\n }\n\n /**\n * Escapes the `RegExp` special characters \"^\", \"$\", \"\\\", \".\", \"*\", \"+\",\n * \"?\", \"(\", \")\", \"[\", \"]\", \"{\", \"}\", and \"|\" in `string`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to escape.\n * @returns {string} Returns the escaped string.\n * @example\n *\n * _.escapeRegExp('[lodash](https://lodash.com/)');\n * // => '\\[lodash\\]\\(https://lodash\\.com/\\)'\n */\n function escapeRegExp(string) {\n string = toString(string);\n return (string && reHasRegExpChar.test(string))\n ? string.replace(reRegExpChar, '\\\\$&')\n : string;\n }\n\n /**\n * Converts `string` to\n * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the kebab cased string.\n * @example\n *\n * _.kebabCase('Foo Bar');\n * // => 'foo-bar'\n *\n * _.kebabCase('fooBar');\n * // => 'foo-bar'\n *\n * _.kebabCase('__FOO_BAR__');\n * // => 'foo-bar'\n */\n var kebabCase = createCompounder(function(result, word, index) {\n return result + (index ? '-' : '') + word.toLowerCase();\n });\n\n /**\n * Converts `string`, as space separated words, to lower case.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the lower cased string.\n * @example\n *\n * _.lowerCase('--Foo-Bar--');\n * // => 'foo bar'\n *\n * _.lowerCase('fooBar');\n * // => 'foo bar'\n *\n * _.lowerCase('__FOO_BAR__');\n * // => 'foo bar'\n */\n var lowerCase = createCompounder(function(result, word, index) {\n return result + (index ? ' ' : '') + word.toLowerCase();\n });\n\n /**\n * Converts the first character of `string` to lower case.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.lowerFirst('Fred');\n * // => 'fred'\n *\n * _.lowerFirst('FRED');\n * // => 'fRED'\n */\n var lowerFirst = createCaseFirst('toLowerCase');\n\n /**\n * Pads `string` on the left and right sides if it's shorter than `length`.\n * Padding characters are truncated if they can't be evenly divided by `length`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to pad.\n * @param {number} [length=0] The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padded string.\n * @example\n *\n * _.pad('abc', 8);\n * // => ' abc '\n *\n * _.pad('abc', 8, '_-');\n * // => '_-abc_-_'\n *\n * _.pad('abc', 3);\n * // => 'abc'\n */\n function pad(string, length, chars) {\n string = toString(string);\n length = toInteger(length);\n\n var strLength = length ? stringSize(string) : 0;\n if (!length || strLength >= length) {\n return string;\n }\n var mid = (length - strLength) / 2;\n return (\n createPadding(nativeFloor(mid), chars) +\n string +\n createPadding(nativeCeil(mid), chars)\n );\n }\n\n /**\n * Pads `string` on the right side if it's shorter than `length`. Padding\n * characters are truncated if they exceed `length`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to pad.\n * @param {number} [length=0] The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padded string.\n * @example\n *\n * _.padEnd('abc', 6);\n * // => 'abc '\n *\n * _.padEnd('abc', 6, '_-');\n * // => 'abc_-_'\n *\n * _.padEnd('abc', 3);\n * // => 'abc'\n */\n function padEnd(string, length, chars) {\n string = toString(string);\n length = toInteger(length);\n\n var strLength = length ? stringSize(string) : 0;\n return (length && strLength < length)\n ? (string + createPadding(length - strLength, chars))\n : string;\n }\n\n /**\n * Pads `string` on the left side if it's shorter than `length`. Padding\n * characters are truncated if they exceed `length`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to pad.\n * @param {number} [length=0] The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padded string.\n * @example\n *\n * _.padStart('abc', 6);\n * // => ' abc'\n *\n * _.padStart('abc', 6, '_-');\n * // => '_-_abc'\n *\n * _.padStart('abc', 3);\n * // => 'abc'\n */\n function padStart(string, length, chars) {\n string = toString(string);\n length = toInteger(length);\n\n var strLength = length ? stringSize(string) : 0;\n return (length && strLength < length)\n ? (createPadding(length - strLength, chars) + string)\n : string;\n }\n\n /**\n * Converts `string` to an integer of the specified radix. If `radix` is\n * `undefined` or `0`, a `radix` of `10` is used unless `value` is a\n * hexadecimal, in which case a `radix` of `16` is used.\n *\n * **Note:** This method aligns with the\n * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category String\n * @param {string} string The string to convert.\n * @param {number} [radix=10] The radix to interpret `value` by.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.parseInt('08');\n * // => 8\n *\n * _.map(['6', '08', '10'], _.parseInt);\n * // => [6, 8, 10]\n */\n function parseInt(string, radix, guard) {\n if (guard || radix == null) {\n radix = 0;\n } else if (radix) {\n radix = +radix;\n }\n return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0);\n }\n\n /**\n * Repeats the given string `n` times.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to repeat.\n * @param {number} [n=1] The number of times to repeat the string.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {string} Returns the repeated string.\n * @example\n *\n * _.repeat('*', 3);\n * // => '***'\n *\n * _.repeat('abc', 2);\n * // => 'abcabc'\n *\n * _.repeat('abc', 0);\n * // => ''\n */\n function repeat(string, n, guard) {\n if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) {\n n = 1;\n } else {\n n = toInteger(n);\n }\n return baseRepeat(toString(string), n);\n }\n\n /**\n * Replaces matches for `pattern` in `string` with `replacement`.\n *\n * **Note:** This method is based on\n * [`String#replace`](https://mdn.io/String/replace).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to modify.\n * @param {RegExp|string} pattern The pattern to replace.\n * @param {Function|string} replacement The match replacement.\n * @returns {string} Returns the modified string.\n * @example\n *\n * _.replace('Hi Fred', 'Fred', 'Barney');\n * // => 'Hi Barney'\n */\n function replace() {\n var args = arguments,\n string = toString(args[0]);\n\n return args.length < 3 ? string : string.replace(args[1], args[2]);\n }\n\n /**\n * Converts `string` to\n * [snake case](https://en.wikipedia.org/wiki/Snake_case).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the snake cased string.\n * @example\n *\n * _.snakeCase('Foo Bar');\n * // => 'foo_bar'\n *\n * _.snakeCase('fooBar');\n * // => 'foo_bar'\n *\n * _.snakeCase('--FOO-BAR--');\n * // => 'foo_bar'\n */\n var snakeCase = createCompounder(function(result, word, index) {\n return result + (index ? '_' : '') + word.toLowerCase();\n });\n\n /**\n * Splits `string` by `separator`.\n *\n * **Note:** This method is based on\n * [`String#split`](https://mdn.io/String/split).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to split.\n * @param {RegExp|string} separator The separator pattern to split by.\n * @param {number} [limit] The length to truncate results to.\n * @returns {Array} Returns the string segments.\n * @example\n *\n * _.split('a-b-c', '-', 2);\n * // => ['a', 'b']\n */\n function split(string, separator, limit) {\n if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) {\n separator = limit = undefined;\n }\n limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0;\n if (!limit) {\n return [];\n }\n string = toString(string);\n if (string && (\n typeof separator == 'string' ||\n (separator != null && !isRegExp(separator))\n )) {\n separator = baseToString(separator);\n if (!separator && hasUnicode(string)) {\n return castSlice(stringToArray(string), 0, limit);\n }\n }\n return string.split(separator, limit);\n }\n\n /**\n * Converts `string` to\n * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage).\n *\n * @static\n * @memberOf _\n * @since 3.1.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the start cased string.\n * @example\n *\n * _.startCase('--foo-bar--');\n * // => 'Foo Bar'\n *\n * _.startCase('fooBar');\n * // => 'Foo Bar'\n *\n * _.startCase('__FOO_BAR__');\n * // => 'FOO BAR'\n */\n var startCase = createCompounder(function(result, word, index) {\n return result + (index ? ' ' : '') + upperFirst(word);\n });\n\n /**\n * Checks if `string` starts with the given target string.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to inspect.\n * @param {string} [target] The string to search for.\n * @param {number} [position=0] The position to search from.\n * @returns {boolean} Returns `true` if `string` starts with `target`,\n * else `false`.\n * @example\n *\n * _.startsWith('abc', 'a');\n * // => true\n *\n * _.startsWith('abc', 'b');\n * // => false\n *\n * _.startsWith('abc', 'b', 1);\n * // => true\n */\n function startsWith(string, target, position) {\n string = toString(string);\n position = position == null\n ? 0\n : baseClamp(toInteger(position), 0, string.length);\n\n target = baseToString(target);\n return string.slice(position, position + target.length) == target;\n }\n\n /**\n * Creates a compiled template function that can interpolate data properties\n * in \"interpolate\" delimiters, HTML-escape interpolated data properties in\n * \"escape\" delimiters, and execute JavaScript in \"evaluate\" delimiters. Data\n * properties may be accessed as free variables in the template. If a setting\n * object is given, it takes precedence over `_.templateSettings` values.\n *\n * **Note:** In the development build `_.template` utilizes\n * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)\n * for easier debugging.\n *\n * For more information on precompiling templates see\n * [lodash's custom builds documentation](https://lodash.com/custom-builds).\n *\n * For more information on Chrome extension sandboxes see\n * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category String\n * @param {string} [string=''] The template string.\n * @param {Object} [options={}] The options object.\n * @param {RegExp} [options.escape=_.templateSettings.escape]\n * The HTML \"escape\" delimiter.\n * @param {RegExp} [options.evaluate=_.templateSettings.evaluate]\n * The \"evaluate\" delimiter.\n * @param {Object} [options.imports=_.templateSettings.imports]\n * An object to import into the template as free variables.\n * @param {RegExp} [options.interpolate=_.templateSettings.interpolate]\n * The \"interpolate\" delimiter.\n * @param {string} [options.sourceURL='lodash.templateSources[n]']\n * The sourceURL of the compiled template.\n * @param {string} [options.variable='obj']\n * The data object variable name.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the compiled template function.\n * @example\n *\n * // Use the \"interpolate\" delimiter to create a compiled template.\n * var compiled = _.template('hello <%= user %>!');\n * compiled({ 'user': 'fred' });\n * // => 'hello fred!'\n *\n * // Use the HTML \"escape\" delimiter to escape data property values.\n * var compiled = _.template('<b><%- value %></b>');\n * compiled({ 'value': '<script>' });\n * // => '<b><script></b>'\n *\n * // Use the \"evaluate\" delimiter to execute JavaScript and generate HTML.\n * var compiled = _.template('<% _.forEach(users, function(user) { %><li><%- user %></li><% }); %>');\n * compiled({ 'users': ['fred', 'barney'] });\n * // => '<li>fred</li><li>barney</li>'\n *\n * // Use the internal `print` function in \"evaluate\" delimiters.\n * var compiled = _.template('<% print(\"hello \" + user); %>!');\n * compiled({ 'user': 'barney' });\n * // => 'hello barney!'\n *\n * // Use the ES template literal delimiter as an \"interpolate\" delimiter.\n * // Disable support by replacing the \"interpolate\" delimiter.\n * var compiled = _.template('hello ${ user }!');\n * compiled({ 'user': 'pebbles' });\n * // => 'hello pebbles!'\n *\n * // Use backslashes to treat delimiters as plain text.\n * var compiled = _.template('<%= \"\\\\<%- value %\\\\>\" %>');\n * compiled({ 'value': 'ignored' });\n * // => '<%- value %>'\n *\n * // Use the `imports` option to import `jQuery` as `jq`.\n * var text = '<% jq.each(users, function(user) { %><li><%- user %></li><% }); %>';\n * var compiled = _.template(text, { 'imports': { 'jq': jQuery } });\n * compiled({ 'users': ['fred', 'barney'] });\n * // => '<li>fred</li><li>barney</li>'\n *\n * // Use the `sourceURL` option to specify a custom sourceURL for the template.\n * var compiled = _.template('hello <%= user %>!', { 'sourceURL': '/basic/greeting.jst' });\n * compiled(data);\n * // => Find the source of \"greeting.jst\" under the Sources tab or Resources panel of the web inspector.\n *\n * // Use the `variable` option to ensure a with-statement isn't used in the compiled template.\n * var compiled = _.template('hi <%= data.user %>!', { 'variable': 'data' });\n * compiled.source;\n * // => function(data) {\n * // var __t, __p = '';\n * // __p += 'hi ' + ((__t = ( data.user )) == null ? '' : __t) + '!';\n * // return __p;\n * // }\n *\n * // Use custom template delimiters.\n * _.templateSettings.interpolate = /{{([\\s\\S]+?)}}/g;\n * var compiled = _.template('hello {{ user }}!');\n * compiled({ 'user': 'mustache' });\n * // => 'hello mustache!'\n *\n * // Use the `source` property to inline compiled templates for meaningful\n * // line numbers in error messages and stack traces.\n * fs.writeFileSync(path.join(process.cwd(), 'jst.js'), '\\\n * var JST = {\\\n * \"main\": ' + _.template(mainText).source + '\\\n * };\\\n * ');\n */\n function template(string, options, guard) {\n // Based on John Resig's `tmpl` implementation\n // (http://ejohn.org/blog/javascript-micro-templating/)\n // and Laura Doktorova's doT.js (https://github.com/olado/doT).\n var settings = lodash.templateSettings;\n\n if (guard && isIterateeCall(string, options, guard)) {\n options = undefined;\n }\n string = toString(string);\n options = assignInWith({}, options, settings, customDefaultsAssignIn);\n\n var imports = assignInWith({}, options.imports, settings.imports, customDefaultsAssignIn),\n importsKeys = keys(imports),\n importsValues = baseValues(imports, importsKeys);\n\n var isEscaping,\n isEvaluating,\n index = 0,\n interpolate = options.interpolate || reNoMatch,\n source = \"__p += '\";\n\n // Compile the regexp to match each delimiter.\n var reDelimiters = RegExp(\n (options.escape || reNoMatch).source + '|' +\n interpolate.source + '|' +\n (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + '|' +\n (options.evaluate || reNoMatch).source + '|$'\n , 'g');\n\n // Use a sourceURL for easier debugging.\n // The sourceURL gets injected into the source that's eval-ed, so be careful\n // to normalize all kinds of whitespace, so e.g. newlines (and unicode versions of it) can't sneak in\n // and escape the comment, thus injecting code that gets evaled.\n var sourceURL = '//# sourceURL=' +\n (hasOwnProperty.call(options, 'sourceURL')\n ? (options.sourceURL + '').replace(/\\s/g, ' ')\n : ('lodash.templateSources[' + (++templateCounter) + ']')\n ) + '\\n';\n\n string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) {\n interpolateValue || (interpolateValue = esTemplateValue);\n\n // Escape characters that can't be included in string literals.\n source += string.slice(index, offset).replace(reUnescapedString, escapeStringChar);\n\n // Replace delimiters with snippets.\n if (escapeValue) {\n isEscaping = true;\n source += \"' +\\n__e(\" + escapeValue + \") +\\n'\";\n }\n if (evaluateValue) {\n isEvaluating = true;\n source += \"';\\n\" + evaluateValue + \";\\n__p += '\";\n }\n if (interpolateValue) {\n source += \"' +\\n((__t = (\" + interpolateValue + \")) == null ? '' : __t) +\\n'\";\n }\n index = offset + match.length;\n\n // The JS engine embedded in Adobe products needs `match` returned in\n // order to produce the correct `offset` value.\n return match;\n });\n\n source += \"';\\n\";\n\n // If `variable` is not specified wrap a with-statement around the generated\n // code to add the data object to the top of the scope chain.\n var variable = hasOwnProperty.call(options, 'variable') && options.variable;\n if (!variable) {\n source = 'with (obj) {\\n' + source + '\\n}\\n';\n }\n // Throw an error if a forbidden character was found in `variable`, to prevent\n // potential command injection attacks.\n else if (reForbiddenIdentifierChars.test(variable)) {\n throw new Error(INVALID_TEMPL_VAR_ERROR_TEXT);\n }\n\n // Cleanup code by stripping empty strings.\n source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source)\n .replace(reEmptyStringMiddle, '$1')\n .replace(reEmptyStringTrailing, '$1;');\n\n // Frame code as the function body.\n source = 'function(' + (variable || 'obj') + ') {\\n' +\n (variable\n ? ''\n : 'obj || (obj = {});\\n'\n ) +\n \"var __t, __p = ''\" +\n (isEscaping\n ? ', __e = _.escape'\n : ''\n ) +\n (isEvaluating\n ? ', __j = Array.prototype.join;\\n' +\n \"function print() { __p += __j.call(arguments, '') }\\n\"\n : ';\\n'\n ) +\n source +\n 'return __p\\n}';\n\n var result = attempt(function() {\n return Function(importsKeys, sourceURL + 'return ' + source)\n .apply(undefined, importsValues);\n });\n\n // Provide the compiled function's source by its `toString` method or\n // the `source` property as a convenience for inlining compiled templates.\n result.source = source;\n if (isError(result)) {\n throw result;\n }\n return result;\n }\n\n /**\n * Converts `string`, as a whole, to lower case just like\n * [String#toLowerCase](https://mdn.io/toLowerCase).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the lower cased string.\n * @example\n *\n * _.toLower('--Foo-Bar--');\n * // => '--foo-bar--'\n *\n * _.toLower('fooBar');\n * // => 'foobar'\n *\n * _.toLower('__FOO_BAR__');\n * // => '__foo_bar__'\n */\n function toLower(value) {\n return toString(value).toLowerCase();\n }\n\n /**\n * Converts `string`, as a whole, to upper case just like\n * [String#toUpperCase](https://mdn.io/toUpperCase).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the upper cased string.\n * @example\n *\n * _.toUpper('--foo-bar--');\n * // => '--FOO-BAR--'\n *\n * _.toUpper('fooBar');\n * // => 'FOOBAR'\n *\n * _.toUpper('__foo_bar__');\n * // => '__FOO_BAR__'\n */\n function toUpper(value) {\n return toString(value).toUpperCase();\n }\n\n /**\n * Removes leading and trailing whitespace or specified characters from `string`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to trim.\n * @param {string} [chars=whitespace] The characters to trim.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {string} Returns the trimmed string.\n * @example\n *\n * _.trim(' abc ');\n * // => 'abc'\n *\n * _.trim('-_-abc-_-', '_-');\n * // => 'abc'\n *\n * _.map([' foo ', ' bar '], _.trim);\n * // => ['foo', 'bar']\n */\n function trim(string, chars, guard) {\n string = toString(string);\n if (string && (guard || chars === undefined)) {\n return baseTrim(string);\n }\n if (!string || !(chars = baseToString(chars))) {\n return string;\n }\n var strSymbols = stringToArray(string),\n chrSymbols = stringToArray(chars),\n start = charsStartIndex(strSymbols, chrSymbols),\n end = charsEndIndex(strSymbols, chrSymbols) + 1;\n\n return castSlice(strSymbols, start, end).join('');\n }\n\n /**\n * Removes trailing whitespace or specified characters from `string`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to trim.\n * @param {string} [chars=whitespace] The characters to trim.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {string} Returns the trimmed string.\n * @example\n *\n * _.trimEnd(' abc ');\n * // => ' abc'\n *\n * _.trimEnd('-_-abc-_-', '_-');\n * // => '-_-abc'\n */\n function trimEnd(string, chars, guard) {\n string = toString(string);\n if (string && (guard || chars === undefined)) {\n return string.slice(0, trimmedEndIndex(string) + 1);\n }\n if (!string || !(chars = baseToString(chars))) {\n return string;\n }\n var strSymbols = stringToArray(string),\n end = charsEndIndex(strSymbols, stringToArray(chars)) + 1;\n\n return castSlice(strSymbols, 0, end).join('');\n }\n\n /**\n * Removes leading whitespace or specified characters from `string`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to trim.\n * @param {string} [chars=whitespace] The characters to trim.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {string} Returns the trimmed string.\n * @example\n *\n * _.trimStart(' abc ');\n * // => 'abc '\n *\n * _.trimStart('-_-abc-_-', '_-');\n * // => 'abc-_-'\n */\n function trimStart(string, chars, guard) {\n string = toString(string);\n if (string && (guard || chars === undefined)) {\n return string.replace(reTrimStart, '');\n }\n if (!string || !(chars = baseToString(chars))) {\n return string;\n }\n var strSymbols = stringToArray(string),\n start = charsStartIndex(strSymbols, stringToArray(chars));\n\n return castSlice(strSymbols, start).join('');\n }\n\n /**\n * Truncates `string` if it's longer than the given maximum string length.\n * The last characters of the truncated string are replaced with the omission\n * string which defaults to \"...\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to truncate.\n * @param {Object} [options={}] The options object.\n * @param {number} [options.length=30] The maximum string length.\n * @param {string} [options.omission='...'] The string to indicate text is omitted.\n * @param {RegExp|string} [options.separator] The separator pattern to truncate to.\n * @returns {string} Returns the truncated string.\n * @example\n *\n * _.truncate('hi-diddly-ho there, neighborino');\n * // => 'hi-diddly-ho there, neighbo...'\n *\n * _.truncate('hi-diddly-ho there, neighborino', {\n * 'length': 24,\n * 'separator': ' '\n * });\n * // => 'hi-diddly-ho there,...'\n *\n * _.truncate('hi-diddly-ho there, neighborino', {\n * 'length': 24,\n * 'separator': /,? +/\n * });\n * // => 'hi-diddly-ho there...'\n *\n * _.truncate('hi-diddly-ho there, neighborino', {\n * 'omission': ' [...]'\n * });\n * // => 'hi-diddly-ho there, neig [...]'\n */\n function truncate(string, options) {\n var length = DEFAULT_TRUNC_LENGTH,\n omission = DEFAULT_TRUNC_OMISSION;\n\n if (isObject(options)) {\n var separator = 'separator' in options ? options.separator : separator;\n length = 'length' in options ? toInteger(options.length) : length;\n omission = 'omission' in options ? baseToString(options.omission) : omission;\n }\n string = toString(string);\n\n var strLength = string.length;\n if (hasUnicode(string)) {\n var strSymbols = stringToArray(string);\n strLength = strSymbols.length;\n }\n if (length >= strLength) {\n return string;\n }\n var end = length - stringSize(omission);\n if (end < 1) {\n return omission;\n }\n var result = strSymbols\n ? castSlice(strSymbols, 0, end).join('')\n : string.slice(0, end);\n\n if (separator === undefined) {\n return result + omission;\n }\n if (strSymbols) {\n end += (result.length - end);\n }\n if (isRegExp(separator)) {\n if (string.slice(end).search(separator)) {\n var match,\n substring = result;\n\n if (!separator.global) {\n separator = RegExp(separator.source, toString(reFlags.exec(separator)) + 'g');\n }\n separator.lastIndex = 0;\n while ((match = separator.exec(substring))) {\n var newEnd = match.index;\n }\n result = result.slice(0, newEnd === undefined ? end : newEnd);\n }\n } else if (string.indexOf(baseToString(separator), end) != end) {\n var index = result.lastIndexOf(separator);\n if (index > -1) {\n result = result.slice(0, index);\n }\n }\n return result + omission;\n }\n\n /**\n * The inverse of `_.escape`; this method converts the HTML entities\n * `&`, `<`, `>`, `"`, and `'` in `string` to\n * their corresponding characters.\n *\n * **Note:** No other HTML entities are unescaped. To unescape additional\n * HTML entities use a third-party library like [_he_](https://mths.be/he).\n *\n * @static\n * @memberOf _\n * @since 0.6.0\n * @category String\n * @param {string} [string=''] The string to unescape.\n * @returns {string} Returns the unescaped string.\n * @example\n *\n * _.unescape('fred, barney, & pebbles');\n * // => 'fred, barney, & pebbles'\n */\n function unescape(string) {\n string = toString(string);\n return (string && reHasEscapedHtml.test(string))\n ? string.replace(reEscapedHtml, unescapeHtmlChar)\n : string;\n }\n\n /**\n * Converts `string`, as space separated words, to upper case.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the upper cased string.\n * @example\n *\n * _.upperCase('--foo-bar');\n * // => 'FOO BAR'\n *\n * _.upperCase('fooBar');\n * // => 'FOO BAR'\n *\n * _.upperCase('__foo_bar__');\n * // => 'FOO BAR'\n */\n var upperCase = createCompounder(function(result, word, index) {\n return result + (index ? ' ' : '') + word.toUpperCase();\n });\n\n /**\n * Converts the first character of `string` to upper case.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.upperFirst('fred');\n * // => 'Fred'\n *\n * _.upperFirst('FRED');\n * // => 'FRED'\n */\n var upperFirst = createCaseFirst('toUpperCase');\n\n /**\n * Splits `string` into an array of its words.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to inspect.\n * @param {RegExp|string} [pattern] The pattern to match words.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the words of `string`.\n * @example\n *\n * _.words('fred, barney, & pebbles');\n * // => ['fred', 'barney', 'pebbles']\n *\n * _.words('fred, barney, & pebbles', /[^, ]+/g);\n * // => ['fred', 'barney', '&', 'pebbles']\n */\n function words(string, pattern, guard) {\n string = toString(string);\n pattern = guard ? undefined : pattern;\n\n if (pattern === undefined) {\n return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);\n }\n return string.match(pattern) || [];\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Attempts to invoke `func`, returning either the result or the caught error\n * object. Any additional arguments are provided to `func` when it's invoked.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Util\n * @param {Function} func The function to attempt.\n * @param {...*} [args] The arguments to invoke `func` with.\n * @returns {*} Returns the `func` result or error object.\n * @example\n *\n * // Avoid throwing errors for invalid selectors.\n * var elements = _.attempt(function(selector) {\n * return document.querySelectorAll(selector);\n * }, '>_>');\n *\n * if (_.isError(elements)) {\n * elements = [];\n * }\n */\n var attempt = baseRest(function(func, args) {\n try {\n return apply(func, undefined, args);\n } catch (e) {\n return isError(e) ? e : new Error(e);\n }\n });\n\n /**\n * Binds methods of an object to the object itself, overwriting the existing\n * method.\n *\n * **Note:** This method doesn't set the \"length\" property of bound functions.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {Object} object The object to bind and assign the bound methods to.\n * @param {...(string|string[])} methodNames The object method names to bind.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var view = {\n * 'label': 'docs',\n * 'click': function() {\n * console.log('clicked ' + this.label);\n * }\n * };\n *\n * _.bindAll(view, ['click']);\n * jQuery(element).on('click', view.click);\n * // => Logs 'clicked docs' when clicked.\n */\n var bindAll = flatRest(function(object, methodNames) {\n arrayEach(methodNames, function(key) {\n key = toKey(key);\n baseAssignValue(object, key, bind(object[key], object));\n });\n return object;\n });\n\n /**\n * Creates a function that iterates over `pairs` and invokes the corresponding\n * function of the first predicate to return truthy. The predicate-function\n * pairs are invoked with the `this` binding and arguments of the created\n * function.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Util\n * @param {Array} pairs The predicate-function pairs.\n * @returns {Function} Returns the new composite function.\n * @example\n *\n * var func = _.cond([\n * [_.matches({ 'a': 1 }), _.constant('matches A')],\n * [_.conforms({ 'b': _.isNumber }), _.constant('matches B')],\n * [_.stubTrue, _.constant('no match')]\n * ]);\n *\n * func({ 'a': 1, 'b': 2 });\n * // => 'matches A'\n *\n * func({ 'a': 0, 'b': 1 });\n * // => 'matches B'\n *\n * func({ 'a': '1', 'b': '2' });\n * // => 'no match'\n */\n function cond(pairs) {\n var length = pairs == null ? 0 : pairs.length,\n toIteratee = getIteratee();\n\n pairs = !length ? [] : arrayMap(pairs, function(pair) {\n if (typeof pair[1] != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n return [toIteratee(pair[0]), pair[1]];\n });\n\n return baseRest(function(args) {\n var index = -1;\n while (++index < length) {\n var pair = pairs[index];\n if (apply(pair[0], this, args)) {\n return apply(pair[1], this, args);\n }\n }\n });\n }\n\n /**\n * Creates a function that invokes the predicate properties of `source` with\n * the corresponding property values of a given object, returning `true` if\n * all predicates return truthy, else `false`.\n *\n * **Note:** The created function is equivalent to `_.conformsTo` with\n * `source` partially applied.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Util\n * @param {Object} source The object of property predicates to conform to.\n * @returns {Function} Returns the new spec function.\n * @example\n *\n * var objects = [\n * { 'a': 2, 'b': 1 },\n * { 'a': 1, 'b': 2 }\n * ];\n *\n * _.filter(objects, _.conforms({ 'b': function(n) { return n > 1; } }));\n * // => [{ 'a': 1, 'b': 2 }]\n */\n function conforms(source) {\n return baseConforms(baseClone(source, CLONE_DEEP_FLAG));\n }\n\n /**\n * Creates a function that returns `value`.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {*} value The value to return from the new function.\n * @returns {Function} Returns the new constant function.\n * @example\n *\n * var objects = _.times(2, _.constant({ 'a': 1 }));\n *\n * console.log(objects);\n * // => [{ 'a': 1 }, { 'a': 1 }]\n *\n * console.log(objects[0] === objects[1]);\n * // => true\n */\n function constant(value) {\n return function() {\n return value;\n };\n }\n\n /**\n * Checks `value` to determine whether a default value should be returned in\n * its place. The `defaultValue` is returned if `value` is `NaN`, `null`,\n * or `undefined`.\n *\n * @static\n * @memberOf _\n * @since 4.14.0\n * @category Util\n * @param {*} value The value to check.\n * @param {*} defaultValue The default value.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * _.defaultTo(1, 10);\n * // => 1\n *\n * _.defaultTo(undefined, 10);\n * // => 10\n */\n function defaultTo(value, defaultValue) {\n return (value == null || value !== value) ? defaultValue : value;\n }\n\n /**\n * Creates a function that returns the result of invoking the given functions\n * with the `this` binding of the created function, where each successive\n * invocation is supplied the return value of the previous.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Util\n * @param {...(Function|Function[])} [funcs] The functions to invoke.\n * @returns {Function} Returns the new composite function.\n * @see _.flowRight\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * var addSquare = _.flow([_.add, square]);\n * addSquare(1, 2);\n * // => 9\n */\n var flow = createFlow();\n\n /**\n * This method is like `_.flow` except that it creates a function that\n * invokes the given functions from right to left.\n *\n * @static\n * @since 3.0.0\n * @memberOf _\n * @category Util\n * @param {...(Function|Function[])} [funcs] The functions to invoke.\n * @returns {Function} Returns the new composite function.\n * @see _.flow\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * var addSquare = _.flowRight([square, _.add]);\n * addSquare(1, 2);\n * // => 9\n */\n var flowRight = createFlow(true);\n\n /**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\n function identity(value) {\n return value;\n }\n\n /**\n * Creates a function that invokes `func` with the arguments of the created\n * function. If `func` is a property name, the created function returns the\n * property value for a given element. If `func` is an array or object, the\n * created function returns `true` for elements that contain the equivalent\n * source properties, otherwise it returns `false`.\n *\n * @static\n * @since 4.0.0\n * @memberOf _\n * @category Util\n * @param {*} [func=_.identity] The value to convert to a callback.\n * @returns {Function} Returns the callback.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': true },\n * { 'user': 'fred', 'age': 40, 'active': false }\n * ];\n *\n * // The `_.matches` iteratee shorthand.\n * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true }));\n * // => [{ 'user': 'barney', 'age': 36, 'active': true }]\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.filter(users, _.iteratee(['user', 'fred']));\n * // => [{ 'user': 'fred', 'age': 40 }]\n *\n * // The `_.property` iteratee shorthand.\n * _.map(users, _.iteratee('user'));\n * // => ['barney', 'fred']\n *\n * // Create custom iteratee shorthands.\n * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) {\n * return !_.isRegExp(func) ? iteratee(func) : function(string) {\n * return func.test(string);\n * };\n * });\n *\n * _.filter(['abc', 'def'], /ef/);\n * // => ['def']\n */\n function iteratee(func) {\n return baseIteratee(typeof func == 'function' ? func : baseClone(func, CLONE_DEEP_FLAG));\n }\n\n /**\n * Creates a function that performs a partial deep comparison between a given\n * object and `source`, returning `true` if the given object has equivalent\n * property values, else `false`.\n *\n * **Note:** The created function is equivalent to `_.isMatch` with `source`\n * partially applied.\n *\n * Partial comparisons will match empty array and empty object `source`\n * values against any array or object value, respectively. See `_.isEqual`\n * for a list of supported value comparisons.\n *\n * **Note:** Multiple values can be checked by combining several matchers\n * using `_.overSome`\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Util\n * @param {Object} source The object of property values to match.\n * @returns {Function} Returns the new spec function.\n * @example\n *\n * var objects = [\n * { 'a': 1, 'b': 2, 'c': 3 },\n * { 'a': 4, 'b': 5, 'c': 6 }\n * ];\n *\n * _.filter(objects, _.matches({ 'a': 4, 'c': 6 }));\n * // => [{ 'a': 4, 'b': 5, 'c': 6 }]\n *\n * // Checking for several possible values\n * _.filter(objects, _.overSome([_.matches({ 'a': 1 }), _.matches({ 'a': 4 })]));\n * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }]\n */\n function matches(source) {\n return baseMatches(baseClone(source, CLONE_DEEP_FLAG));\n }\n\n /**\n * Creates a function that performs a partial deep comparison between the\n * value at `path` of a given object to `srcValue`, returning `true` if the\n * object value is equivalent, else `false`.\n *\n * **Note:** Partial comparisons will match empty array and empty object\n * `srcValue` values against any array or object value, respectively. See\n * `_.isEqual` for a list of supported value comparisons.\n *\n * **Note:** Multiple values can be checked by combining several matchers\n * using `_.overSome`\n *\n * @static\n * @memberOf _\n * @since 3.2.0\n * @category Util\n * @param {Array|string} path The path of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n * @example\n *\n * var objects = [\n * { 'a': 1, 'b': 2, 'c': 3 },\n * { 'a': 4, 'b': 5, 'c': 6 }\n * ];\n *\n * _.find(objects, _.matchesProperty('a', 4));\n * // => { 'a': 4, 'b': 5, 'c': 6 }\n *\n * // Checking for several possible values\n * _.filter(objects, _.overSome([_.matchesProperty('a', 1), _.matchesProperty('a', 4)]));\n * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }]\n */\n function matchesProperty(path, srcValue) {\n return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG));\n }\n\n /**\n * Creates a function that invokes the method at `path` of a given object.\n * Any additional arguments are provided to the invoked method.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Util\n * @param {Array|string} path The path of the method to invoke.\n * @param {...*} [args] The arguments to invoke the method with.\n * @returns {Function} Returns the new invoker function.\n * @example\n *\n * var objects = [\n * { 'a': { 'b': _.constant(2) } },\n * { 'a': { 'b': _.constant(1) } }\n * ];\n *\n * _.map(objects, _.method('a.b'));\n * // => [2, 1]\n *\n * _.map(objects, _.method(['a', 'b']));\n * // => [2, 1]\n */\n var method = baseRest(function(path, args) {\n return function(object) {\n return baseInvoke(object, path, args);\n };\n });\n\n /**\n * The opposite of `_.method`; this method creates a function that invokes\n * the method at a given path of `object`. Any additional arguments are\n * provided to the invoked method.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Util\n * @param {Object} object The object to query.\n * @param {...*} [args] The arguments to invoke the method with.\n * @returns {Function} Returns the new invoker function.\n * @example\n *\n * var array = _.times(3, _.constant),\n * object = { 'a': array, 'b': array, 'c': array };\n *\n * _.map(['a[2]', 'c[0]'], _.methodOf(object));\n * // => [2, 0]\n *\n * _.map([['a', '2'], ['c', '0']], _.methodOf(object));\n * // => [2, 0]\n */\n var methodOf = baseRest(function(object, args) {\n return function(path) {\n return baseInvoke(object, path, args);\n };\n });\n\n /**\n * Adds all own enumerable string keyed function properties of a source\n * object to the destination object. If `object` is a function, then methods\n * are added to its prototype as well.\n *\n * **Note:** Use `_.runInContext` to create a pristine `lodash` function to\n * avoid conflicts caused by modifying the original.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {Function|Object} [object=lodash] The destination object.\n * @param {Object} source The object of functions to add.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.chain=true] Specify whether mixins are chainable.\n * @returns {Function|Object} Returns `object`.\n * @example\n *\n * function vowels(string) {\n * return _.filter(string, function(v) {\n * return /[aeiou]/i.test(v);\n * });\n * }\n *\n * _.mixin({ 'vowels': vowels });\n * _.vowels('fred');\n * // => ['e']\n *\n * _('fred').vowels().value();\n * // => ['e']\n *\n * _.mixin({ 'vowels': vowels }, { 'chain': false });\n * _('fred').vowels();\n * // => ['e']\n */\n function mixin(object, source, options) {\n var props = keys(source),\n methodNames = baseFunctions(source, props);\n\n if (options == null &&\n !(isObject(source) && (methodNames.length || !props.length))) {\n options = source;\n source = object;\n object = this;\n methodNames = baseFunctions(source, keys(source));\n }\n var chain = !(isObject(options) && 'chain' in options) || !!options.chain,\n isFunc = isFunction(object);\n\n arrayEach(methodNames, function(methodName) {\n var func = source[methodName];\n object[methodName] = func;\n if (isFunc) {\n object.prototype[methodName] = function() {\n var chainAll = this.__chain__;\n if (chain || chainAll) {\n var result = object(this.__wrapped__),\n actions = result.__actions__ = copyArray(this.__actions__);\n\n actions.push({ 'func': func, 'args': arguments, 'thisArg': object });\n result.__chain__ = chainAll;\n return result;\n }\n return func.apply(object, arrayPush([this.value()], arguments));\n };\n }\n });\n\n return object;\n }\n\n /**\n * Reverts the `_` variable to its previous value and returns a reference to\n * the `lodash` function.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @returns {Function} Returns the `lodash` function.\n * @example\n *\n * var lodash = _.noConflict();\n */\n function noConflict() {\n if (root._ === this) {\n root._ = oldDash;\n }\n return this;\n }\n\n /**\n * This method returns `undefined`.\n *\n * @static\n * @memberOf _\n * @since 2.3.0\n * @category Util\n * @example\n *\n * _.times(2, _.noop);\n * // => [undefined, undefined]\n */\n function noop() {\n // No operation performed.\n }\n\n /**\n * Creates a function that gets the argument at index `n`. If `n` is negative,\n * the nth argument from the end is returned.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Util\n * @param {number} [n=0] The index of the argument to return.\n * @returns {Function} Returns the new pass-thru function.\n * @example\n *\n * var func = _.nthArg(1);\n * func('a', 'b', 'c', 'd');\n * // => 'b'\n *\n * var func = _.nthArg(-2);\n * func('a', 'b', 'c', 'd');\n * // => 'c'\n */\n function nthArg(n) {\n n = toInteger(n);\n return baseRest(function(args) {\n return baseNth(args, n);\n });\n }\n\n /**\n * Creates a function that invokes `iteratees` with the arguments it receives\n * and returns their results.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Util\n * @param {...(Function|Function[])} [iteratees=[_.identity]]\n * The iteratees to invoke.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var func = _.over([Math.max, Math.min]);\n *\n * func(1, 2, 3, 4);\n * // => [4, 1]\n */\n var over = createOver(arrayMap);\n\n /**\n * Creates a function that checks if **all** of the `predicates` return\n * truthy when invoked with the arguments it receives.\n *\n * Following shorthands are possible for providing predicates.\n * Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate.\n * Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Util\n * @param {...(Function|Function[])} [predicates=[_.identity]]\n * The predicates to check.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var func = _.overEvery([Boolean, isFinite]);\n *\n * func('1');\n * // => true\n *\n * func(null);\n * // => false\n *\n * func(NaN);\n * // => false\n */\n var overEvery = createOver(arrayEvery);\n\n /**\n * Creates a function that checks if **any** of the `predicates` return\n * truthy when invoked with the arguments it receives.\n *\n * Following shorthands are possible for providing predicates.\n * Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate.\n * Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Util\n * @param {...(Function|Function[])} [predicates=[_.identity]]\n * The predicates to check.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var func = _.overSome([Boolean, isFinite]);\n *\n * func('1');\n * // => true\n *\n * func(null);\n * // => true\n *\n * func(NaN);\n * // => false\n *\n * var matchesFunc = _.overSome([{ 'a': 1 }, { 'a': 2 }])\n * var matchesPropertyFunc = _.overSome([['a', 1], ['a', 2]])\n */\n var overSome = createOver(arraySome);\n\n /**\n * Creates a function that returns the value at `path` of a given object.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n * @example\n *\n * var objects = [\n * { 'a': { 'b': 2 } },\n * { 'a': { 'b': 1 } }\n * ];\n *\n * _.map(objects, _.property('a.b'));\n * // => [2, 1]\n *\n * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');\n * // => [1, 2]\n */\n function property(path) {\n return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);\n }\n\n /**\n * The opposite of `_.property`; this method creates a function that returns\n * the value at a given path of `object`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Util\n * @param {Object} object The object to query.\n * @returns {Function} Returns the new accessor function.\n * @example\n *\n * var array = [0, 1, 2],\n * object = { 'a': array, 'b': array, 'c': array };\n *\n * _.map(['a[2]', 'c[0]'], _.propertyOf(object));\n * // => [2, 0]\n *\n * _.map([['a', '2'], ['c', '0']], _.propertyOf(object));\n * // => [2, 0]\n */\n function propertyOf(object) {\n return function(path) {\n return object == null ? undefined : baseGet(object, path);\n };\n }\n\n /**\n * Creates an array of numbers (positive and/or negative) progressing from\n * `start` up to, but not including, `end`. A step of `-1` is used if a negative\n * `start` is specified without an `end` or `step`. If `end` is not specified,\n * it's set to `start` with `start` then set to `0`.\n *\n * **Note:** JavaScript follows the IEEE-754 standard for resolving\n * floating-point values which can produce unexpected results.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {number} [start=0] The start of the range.\n * @param {number} end The end of the range.\n * @param {number} [step=1] The value to increment or decrement by.\n * @returns {Array} Returns the range of numbers.\n * @see _.inRange, _.rangeRight\n * @example\n *\n * _.range(4);\n * // => [0, 1, 2, 3]\n *\n * _.range(-4);\n * // => [0, -1, -2, -3]\n *\n * _.range(1, 5);\n * // => [1, 2, 3, 4]\n *\n * _.range(0, 20, 5);\n * // => [0, 5, 10, 15]\n *\n * _.range(0, -4, -1);\n * // => [0, -1, -2, -3]\n *\n * _.range(1, 4, 0);\n * // => [1, 1, 1]\n *\n * _.range(0);\n * // => []\n */\n var range = createRange();\n\n /**\n * This method is like `_.range` except that it populates values in\n * descending order.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Util\n * @param {number} [start=0] The start of the range.\n * @param {number} end The end of the range.\n * @param {number} [step=1] The value to increment or decrement by.\n * @returns {Array} Returns the range of numbers.\n * @see _.inRange, _.range\n * @example\n *\n * _.rangeRight(4);\n * // => [3, 2, 1, 0]\n *\n * _.rangeRight(-4);\n * // => [-3, -2, -1, 0]\n *\n * _.rangeRight(1, 5);\n * // => [4, 3, 2, 1]\n *\n * _.rangeRight(0, 20, 5);\n * // => [15, 10, 5, 0]\n *\n * _.rangeRight(0, -4, -1);\n * // => [-3, -2, -1, 0]\n *\n * _.rangeRight(1, 4, 0);\n * // => [1, 1, 1]\n *\n * _.rangeRight(0);\n * // => []\n */\n var rangeRight = createRange(true);\n\n /**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\n function stubArray() {\n return [];\n }\n\n /**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\n function stubFalse() {\n return false;\n }\n\n /**\n * This method returns a new empty object.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Object} Returns the new empty object.\n * @example\n *\n * var objects = _.times(2, _.stubObject);\n *\n * console.log(objects);\n * // => [{}, {}]\n *\n * console.log(objects[0] === objects[1]);\n * // => false\n */\n function stubObject() {\n return {};\n }\n\n /**\n * This method returns an empty string.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {string} Returns the empty string.\n * @example\n *\n * _.times(2, _.stubString);\n * // => ['', '']\n */\n function stubString() {\n return '';\n }\n\n /**\n * This method returns `true`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `true`.\n * @example\n *\n * _.times(2, _.stubTrue);\n * // => [true, true]\n */\n function stubTrue() {\n return true;\n }\n\n /**\n * Invokes the iteratee `n` times, returning an array of the results of\n * each invocation. The iteratee is invoked with one argument; (index).\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n * @example\n *\n * _.times(3, String);\n * // => ['0', '1', '2']\n *\n * _.times(4, _.constant(0));\n * // => [0, 0, 0, 0]\n */\n function times(n, iteratee) {\n n = toInteger(n);\n if (n < 1 || n > MAX_SAFE_INTEGER) {\n return [];\n }\n var index = MAX_ARRAY_LENGTH,\n length = nativeMin(n, MAX_ARRAY_LENGTH);\n\n iteratee = getIteratee(iteratee);\n n -= MAX_ARRAY_LENGTH;\n\n var result = baseTimes(length, iteratee);\n while (++index < n) {\n iteratee(index);\n }\n return result;\n }\n\n /**\n * Converts `value` to a property path array.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Util\n * @param {*} value The value to convert.\n * @returns {Array} Returns the new property path array.\n * @example\n *\n * _.toPath('a.b.c');\n * // => ['a', 'b', 'c']\n *\n * _.toPath('a[0].b.c');\n * // => ['a', '0', 'b', 'c']\n */\n function toPath(value) {\n if (isArray(value)) {\n return arrayMap(value, toKey);\n }\n return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value)));\n }\n\n /**\n * Generates a unique ID. If `prefix` is given, the ID is appended to it.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {string} [prefix=''] The value to prefix the ID with.\n * @returns {string} Returns the unique ID.\n * @example\n *\n * _.uniqueId('contact_');\n * // => 'contact_104'\n *\n * _.uniqueId();\n * // => '105'\n */\n function uniqueId(prefix) {\n var id = ++idCounter;\n return toString(prefix) + id;\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Adds two numbers.\n *\n * @static\n * @memberOf _\n * @since 3.4.0\n * @category Math\n * @param {number} augend The first number in an addition.\n * @param {number} addend The second number in an addition.\n * @returns {number} Returns the total.\n * @example\n *\n * _.add(6, 4);\n * // => 10\n */\n var add = createMathOperation(function(augend, addend) {\n return augend + addend;\n }, 0);\n\n /**\n * Computes `number` rounded up to `precision`.\n *\n * @static\n * @memberOf _\n * @since 3.10.0\n * @category Math\n * @param {number} number The number to round up.\n * @param {number} [precision=0] The precision to round up to.\n * @returns {number} Returns the rounded up number.\n * @example\n *\n * _.ceil(4.006);\n * // => 5\n *\n * _.ceil(6.004, 2);\n * // => 6.01\n *\n * _.ceil(6040, -2);\n * // => 6100\n */\n var ceil = createRound('ceil');\n\n /**\n * Divide two numbers.\n *\n * @static\n * @memberOf _\n * @since 4.7.0\n * @category Math\n * @param {number} dividend The first number in a division.\n * @param {number} divisor The second number in a division.\n * @returns {number} Returns the quotient.\n * @example\n *\n * _.divide(6, 4);\n * // => 1.5\n */\n var divide = createMathOperation(function(dividend, divisor) {\n return dividend / divisor;\n }, 1);\n\n /**\n * Computes `number` rounded down to `precision`.\n *\n * @static\n * @memberOf _\n * @since 3.10.0\n * @category Math\n * @param {number} number The number to round down.\n * @param {number} [precision=0] The precision to round down to.\n * @returns {number} Returns the rounded down number.\n * @example\n *\n * _.floor(4.006);\n * // => 4\n *\n * _.floor(0.046, 2);\n * // => 0.04\n *\n * _.floor(4060, -2);\n * // => 4000\n */\n var floor = createRound('floor');\n\n /**\n * Computes the maximum value of `array`. If `array` is empty or falsey,\n * `undefined` is returned.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Math\n * @param {Array} array The array to iterate over.\n * @returns {*} Returns the maximum value.\n * @example\n *\n * _.max([4, 2, 8, 6]);\n * // => 8\n *\n * _.max([]);\n * // => undefined\n */\n function max(array) {\n return (array && array.length)\n ? baseExtremum(array, identity, baseGt)\n : undefined;\n }\n\n /**\n * This method is like `_.max` except that it accepts `iteratee` which is\n * invoked for each element in `array` to generate the criterion by which\n * the value is ranked. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Math\n * @param {Array} array The array to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {*} Returns the maximum value.\n * @example\n *\n * var objects = [{ 'n': 1 }, { 'n': 2 }];\n *\n * _.maxBy(objects, function(o) { return o.n; });\n * // => { 'n': 2 }\n *\n * // The `_.property` iteratee shorthand.\n * _.maxBy(objects, 'n');\n * // => { 'n': 2 }\n */\n function maxBy(array, iteratee) {\n return (array && array.length)\n ? baseExtremum(array, getIteratee(iteratee, 2), baseGt)\n : undefined;\n }\n\n /**\n * Computes the mean of the values in `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Math\n * @param {Array} array The array to iterate over.\n * @returns {number} Returns the mean.\n * @example\n *\n * _.mean([4, 2, 8, 6]);\n * // => 5\n */\n function mean(array) {\n return baseMean(array, identity);\n }\n\n /**\n * This method is like `_.mean` except that it accepts `iteratee` which is\n * invoked for each element in `array` to generate the value to be averaged.\n * The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.7.0\n * @category Math\n * @param {Array} array The array to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {number} Returns the mean.\n * @example\n *\n * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];\n *\n * _.meanBy(objects, function(o) { return o.n; });\n * // => 5\n *\n * // The `_.property` iteratee shorthand.\n * _.meanBy(objects, 'n');\n * // => 5\n */\n function meanBy(array, iteratee) {\n return baseMean(array, getIteratee(iteratee, 2));\n }\n\n /**\n * Computes the minimum value of `array`. If `array` is empty or falsey,\n * `undefined` is returned.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Math\n * @param {Array} array The array to iterate over.\n * @returns {*} Returns the minimum value.\n * @example\n *\n * _.min([4, 2, 8, 6]);\n * // => 2\n *\n * _.min([]);\n * // => undefined\n */\n function min(array) {\n return (array && array.length)\n ? baseExtremum(array, identity, baseLt)\n : undefined;\n }\n\n /**\n * This method is like `_.min` except that it accepts `iteratee` which is\n * invoked for each element in `array` to generate the criterion by which\n * the value is ranked. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Math\n * @param {Array} array The array to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {*} Returns the minimum value.\n * @example\n *\n * var objects = [{ 'n': 1 }, { 'n': 2 }];\n *\n * _.minBy(objects, function(o) { return o.n; });\n * // => { 'n': 1 }\n *\n * // The `_.property` iteratee shorthand.\n * _.minBy(objects, 'n');\n * // => { 'n': 1 }\n */\n function minBy(array, iteratee) {\n return (array && array.length)\n ? baseExtremum(array, getIteratee(iteratee, 2), baseLt)\n : undefined;\n }\n\n /**\n * Multiply two numbers.\n *\n * @static\n * @memberOf _\n * @since 4.7.0\n * @category Math\n * @param {number} multiplier The first number in a multiplication.\n * @param {number} multiplicand The second number in a multiplication.\n * @returns {number} Returns the product.\n * @example\n *\n * _.multiply(6, 4);\n * // => 24\n */\n var multiply = createMathOperation(function(multiplier, multiplicand) {\n return multiplier * multiplicand;\n }, 1);\n\n /**\n * Computes `number` rounded to `precision`.\n *\n * @static\n * @memberOf _\n * @since 3.10.0\n * @category Math\n * @param {number} number The number to round.\n * @param {number} [precision=0] The precision to round to.\n * @returns {number} Returns the rounded number.\n * @example\n *\n * _.round(4.006);\n * // => 4\n *\n * _.round(4.006, 2);\n * // => 4.01\n *\n * _.round(4060, -2);\n * // => 4100\n */\n var round = createRound('round');\n\n /**\n * Subtract two numbers.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Math\n * @param {number} minuend The first number in a subtraction.\n * @param {number} subtrahend The second number in a subtraction.\n * @returns {number} Returns the difference.\n * @example\n *\n * _.subtract(6, 4);\n * // => 2\n */\n var subtract = createMathOperation(function(minuend, subtrahend) {\n return minuend - subtrahend;\n }, 0);\n\n /**\n * Computes the sum of the values in `array`.\n *\n * @static\n * @memberOf _\n * @since 3.4.0\n * @category Math\n * @param {Array} array The array to iterate over.\n * @returns {number} Returns the sum.\n * @example\n *\n * _.sum([4, 2, 8, 6]);\n * // => 20\n */\n function sum(array) {\n return (array && array.length)\n ? baseSum(array, identity)\n : 0;\n }\n\n /**\n * This method is like `_.sum` except that it accepts `iteratee` which is\n * invoked for each element in `array` to generate the value to be summed.\n * The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Math\n * @param {Array} array The array to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {number} Returns the sum.\n * @example\n *\n * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];\n *\n * _.sumBy(objects, function(o) { return o.n; });\n * // => 20\n *\n * // The `_.property` iteratee shorthand.\n * _.sumBy(objects, 'n');\n * // => 20\n */\n function sumBy(array, iteratee) {\n return (array && array.length)\n ? baseSum(array, getIteratee(iteratee, 2))\n : 0;\n }\n\n /*------------------------------------------------------------------------*/\n\n // Add methods that return wrapped values in chain sequences.\n lodash.after = after;\n lodash.ary = ary;\n lodash.assign = assign;\n lodash.assignIn = assignIn;\n lodash.assignInWith = assignInWith;\n lodash.assignWith = assignWith;\n lodash.at = at;\n lodash.before = before;\n lodash.bind = bind;\n lodash.bindAll = bindAll;\n lodash.bindKey = bindKey;\n lodash.castArray = castArray;\n lodash.chain = chain;\n lodash.chunk = chunk;\n lodash.compact = compact;\n lodash.concat = concat;\n lodash.cond = cond;\n lodash.conforms = conforms;\n lodash.constant = constant;\n lodash.countBy = countBy;\n lodash.create = create;\n lodash.curry = curry;\n lodash.curryRight = curryRight;\n lodash.debounce = debounce;\n lodash.defaults = defaults;\n lodash.defaultsDeep = defaultsDeep;\n lodash.defer = defer;\n lodash.delay = delay;\n lodash.difference = difference;\n lodash.differenceBy = differenceBy;\n lodash.differenceWith = differenceWith;\n lodash.drop = drop;\n lodash.dropRight = dropRight;\n lodash.dropRightWhile = dropRightWhile;\n lodash.dropWhile = dropWhile;\n lodash.fill = fill;\n lodash.filter = filter;\n lodash.flatMap = flatMap;\n lodash.flatMapDeep = flatMapDeep;\n lodash.flatMapDepth = flatMapDepth;\n lodash.flatten = flatten;\n lodash.flattenDeep = flattenDeep;\n lodash.flattenDepth = flattenDepth;\n lodash.flip = flip;\n lodash.flow = flow;\n lodash.flowRight = flowRight;\n lodash.fromPairs = fromPairs;\n lodash.functions = functions;\n lodash.functionsIn = functionsIn;\n lodash.groupBy = groupBy;\n lodash.initial = initial;\n lodash.intersection = intersection;\n lodash.intersectionBy = intersectionBy;\n lodash.intersectionWith = intersectionWith;\n lodash.invert = invert;\n lodash.invertBy = invertBy;\n lodash.invokeMap = invokeMap;\n lodash.iteratee = iteratee;\n lodash.keyBy = keyBy;\n lodash.keys = keys;\n lodash.keysIn = keysIn;\n lodash.map = map;\n lodash.mapKeys = mapKeys;\n lodash.mapValues = mapValues;\n lodash.matches = matches;\n lodash.matchesProperty = matchesProperty;\n lodash.memoize = memoize;\n lodash.merge = merge;\n lodash.mergeWith = mergeWith;\n lodash.method = method;\n lodash.methodOf = methodOf;\n lodash.mixin = mixin;\n lodash.negate = negate;\n lodash.nthArg = nthArg;\n lodash.omit = omit;\n lodash.omitBy = omitBy;\n lodash.once = once;\n lodash.orderBy = orderBy;\n lodash.over = over;\n lodash.overArgs = overArgs;\n lodash.overEvery = overEvery;\n lodash.overSome = overSome;\n lodash.partial = partial;\n lodash.partialRight = partialRight;\n lodash.partition = partition;\n lodash.pick = pick;\n lodash.pickBy = pickBy;\n lodash.property = property;\n lodash.propertyOf = propertyOf;\n lodash.pull = pull;\n lodash.pullAll = pullAll;\n lodash.pullAllBy = pullAllBy;\n lodash.pullAllWith = pullAllWith;\n lodash.pullAt = pullAt;\n lodash.range = range;\n lodash.rangeRight = rangeRight;\n lodash.rearg = rearg;\n lodash.reject = reject;\n lodash.remove = remove;\n lodash.rest = rest;\n lodash.reverse = reverse;\n lodash.sampleSize = sampleSize;\n lodash.set = set;\n lodash.setWith = setWith;\n lodash.shuffle = shuffle;\n lodash.slice = slice;\n lodash.sortBy = sortBy;\n lodash.sortedUniq = sortedUniq;\n lodash.sortedUniqBy = sortedUniqBy;\n lodash.split = split;\n lodash.spread = spread;\n lodash.tail = tail;\n lodash.take = take;\n lodash.takeRight = takeRight;\n lodash.takeRightWhile = takeRightWhile;\n lodash.takeWhile = takeWhile;\n lodash.tap = tap;\n lodash.throttle = throttle;\n lodash.thru = thru;\n lodash.toArray = toArray;\n lodash.toPairs = toPairs;\n lodash.toPairsIn = toPairsIn;\n lodash.toPath = toPath;\n lodash.toPlainObject = toPlainObject;\n lodash.transform = transform;\n lodash.unary = unary;\n lodash.union = union;\n lodash.unionBy = unionBy;\n lodash.unionWith = unionWith;\n lodash.uniq = uniq;\n lodash.uniqBy = uniqBy;\n lodash.uniqWith = uniqWith;\n lodash.unset = unset;\n lodash.unzip = unzip;\n lodash.unzipWith = unzipWith;\n lodash.update = update;\n lodash.updateWith = updateWith;\n lodash.values = values;\n lodash.valuesIn = valuesIn;\n lodash.without = without;\n lodash.words = words;\n lodash.wrap = wrap;\n lodash.xor = xor;\n lodash.xorBy = xorBy;\n lodash.xorWith = xorWith;\n lodash.zip = zip;\n lodash.zipObject = zipObject;\n lodash.zipObjectDeep = zipObjectDeep;\n lodash.zipWith = zipWith;\n\n // Add aliases.\n lodash.entries = toPairs;\n lodash.entriesIn = toPairsIn;\n lodash.extend = assignIn;\n lodash.extendWith = assignInWith;\n\n // Add methods to `lodash.prototype`.\n mixin(lodash, lodash);\n\n /*------------------------------------------------------------------------*/\n\n // Add methods that return unwrapped values in chain sequences.\n lodash.add = add;\n lodash.attempt = attempt;\n lodash.camelCase = camelCase;\n lodash.capitalize = capitalize;\n lodash.ceil = ceil;\n lodash.clamp = clamp;\n lodash.clone = clone;\n lodash.cloneDeep = cloneDeep;\n lodash.cloneDeepWith = cloneDeepWith;\n lodash.cloneWith = cloneWith;\n lodash.conformsTo = conformsTo;\n lodash.deburr = deburr;\n lodash.defaultTo = defaultTo;\n lodash.divide = divide;\n lodash.endsWith = endsWith;\n lodash.eq = eq;\n lodash.escape = escape;\n lodash.escapeRegExp = escapeRegExp;\n lodash.every = every;\n lodash.find = find;\n lodash.findIndex = findIndex;\n lodash.findKey = findKey;\n lodash.findLast = findLast;\n lodash.findLastIndex = findLastIndex;\n lodash.findLastKey = findLastKey;\n lodash.floor = floor;\n lodash.forEach = forEach;\n lodash.forEachRight = forEachRight;\n lodash.forIn = forIn;\n lodash.forInRight = forInRight;\n lodash.forOwn = forOwn;\n lodash.forOwnRight = forOwnRight;\n lodash.get = get;\n lodash.gt = gt;\n lodash.gte = gte;\n lodash.has = has;\n lodash.hasIn = hasIn;\n lodash.head = head;\n lodash.identity = identity;\n lodash.includes = includes;\n lodash.indexOf = indexOf;\n lodash.inRange = inRange;\n lodash.invoke = invoke;\n lodash.isArguments = isArguments;\n lodash.isArray = isArray;\n lodash.isArrayBuffer = isArrayBuffer;\n lodash.isArrayLike = isArrayLike;\n lodash.isArrayLikeObject = isArrayLikeObject;\n lodash.isBoolean = isBoolean;\n lodash.isBuffer = isBuffer;\n lodash.isDate = isDate;\n lodash.isElement = isElement;\n lodash.isEmpty = isEmpty;\n lodash.isEqual = isEqual;\n lodash.isEqualWith = isEqualWith;\n lodash.isError = isError;\n lodash.isFinite = isFinite;\n lodash.isFunction = isFunction;\n lodash.isInteger = isInteger;\n lodash.isLength = isLength;\n lodash.isMap = isMap;\n lodash.isMatch = isMatch;\n lodash.isMatchWith = isMatchWith;\n lodash.isNaN = isNaN;\n lodash.isNative = isNative;\n lodash.isNil = isNil;\n lodash.isNull = isNull;\n lodash.isNumber = isNumber;\n lodash.isObject = isObject;\n lodash.isObjectLike = isObjectLike;\n lodash.isPlainObject = isPlainObject;\n lodash.isRegExp = isRegExp;\n lodash.isSafeInteger = isSafeInteger;\n lodash.isSet = isSet;\n lodash.isString = isString;\n lodash.isSymbol = isSymbol;\n lodash.isTypedArray = isTypedArray;\n lodash.isUndefined = isUndefined;\n lodash.isWeakMap = isWeakMap;\n lodash.isWeakSet = isWeakSet;\n lodash.join = join;\n lodash.kebabCase = kebabCase;\n lodash.last = last;\n lodash.lastIndexOf = lastIndexOf;\n lodash.lowerCase = lowerCase;\n lodash.lowerFirst = lowerFirst;\n lodash.lt = lt;\n lodash.lte = lte;\n lodash.max = max;\n lodash.maxBy = maxBy;\n lodash.mean = mean;\n lodash.meanBy = meanBy;\n lodash.min = min;\n lodash.minBy = minBy;\n lodash.stubArray = stubArray;\n lodash.stubFalse = stubFalse;\n lodash.stubObject = stubObject;\n lodash.stubString = stubString;\n lodash.stubTrue = stubTrue;\n lodash.multiply = multiply;\n lodash.nth = nth;\n lodash.noConflict = noConflict;\n lodash.noop = noop;\n lodash.now = now;\n lodash.pad = pad;\n lodash.padEnd = padEnd;\n lodash.padStart = padStart;\n lodash.parseInt = parseInt;\n lodash.random = random;\n lodash.reduce = reduce;\n lodash.reduceRight = reduceRight;\n lodash.repeat = repeat;\n lodash.replace = replace;\n lodash.result = result;\n lodash.round = round;\n lodash.runInContext = runInContext;\n lodash.sample = sample;\n lodash.size = size;\n lodash.snakeCase = snakeCase;\n lodash.some = some;\n lodash.sortedIndex = sortedIndex;\n lodash.sortedIndexBy = sortedIndexBy;\n lodash.sortedIndexOf = sortedIndexOf;\n lodash.sortedLastIndex = sortedLastIndex;\n lodash.sortedLastIndexBy = sortedLastIndexBy;\n lodash.sortedLastIndexOf = sortedLastIndexOf;\n lodash.startCase = startCase;\n lodash.startsWith = startsWith;\n lodash.subtract = subtract;\n lodash.sum = sum;\n lodash.sumBy = sumBy;\n lodash.template = template;\n lodash.times = times;\n lodash.toFinite = toFinite;\n lodash.toInteger = toInteger;\n lodash.toLength = toLength;\n lodash.toLower = toLower;\n lodash.toNumber = toNumber;\n lodash.toSafeInteger = toSafeInteger;\n lodash.toString = toString;\n lodash.toUpper = toUpper;\n lodash.trim = trim;\n lodash.trimEnd = trimEnd;\n lodash.trimStart = trimStart;\n lodash.truncate = truncate;\n lodash.unescape = unescape;\n lodash.uniqueId = uniqueId;\n lodash.upperCase = upperCase;\n lodash.upperFirst = upperFirst;\n\n // Add aliases.\n lodash.each = forEach;\n lodash.eachRight = forEachRight;\n lodash.first = head;\n\n mixin(lodash, (function() {\n var source = {};\n baseForOwn(lodash, function(func, methodName) {\n if (!hasOwnProperty.call(lodash.prototype, methodName)) {\n source[methodName] = func;\n }\n });\n return source;\n }()), { 'chain': false });\n\n /*------------------------------------------------------------------------*/\n\n /**\n * The semantic version number.\n *\n * @static\n * @memberOf _\n * @type {string}\n */\n lodash.VERSION = VERSION;\n\n // Assign default placeholders.\n arrayEach(['bind', 'bindKey', 'curry', 'curryRight', 'partial', 'partialRight'], function(methodName) {\n lodash[methodName].placeholder = lodash;\n });\n\n // Add `LazyWrapper` methods for `_.drop` and `_.take` variants.\n arrayEach(['drop', 'take'], function(methodName, index) {\n LazyWrapper.prototype[methodName] = function(n) {\n n = n === undefined ? 1 : nativeMax(toInteger(n), 0);\n\n var result = (this.__filtered__ && !index)\n ? new LazyWrapper(this)\n : this.clone();\n\n if (result.__filtered__) {\n result.__takeCount__ = nativeMin(n, result.__takeCount__);\n } else {\n result.__views__.push({\n 'size': nativeMin(n, MAX_ARRAY_LENGTH),\n 'type': methodName + (result.__dir__ < 0 ? 'Right' : '')\n });\n }\n return result;\n };\n\n LazyWrapper.prototype[methodName + 'Right'] = function(n) {\n return this.reverse()[methodName](n).reverse();\n };\n });\n\n // Add `LazyWrapper` methods that accept an `iteratee` value.\n arrayEach(['filter', 'map', 'takeWhile'], function(methodName, index) {\n var type = index + 1,\n isFilter = type == LAZY_FILTER_FLAG || type == LAZY_WHILE_FLAG;\n\n LazyWrapper.prototype[methodName] = function(iteratee) {\n var result = this.clone();\n result.__iteratees__.push({\n 'iteratee': getIteratee(iteratee, 3),\n 'type': type\n });\n result.__filtered__ = result.__filtered__ || isFilter;\n return result;\n };\n });\n\n // Add `LazyWrapper` methods for `_.head` and `_.last`.\n arrayEach(['head', 'last'], function(methodName, index) {\n var takeName = 'take' + (index ? 'Right' : '');\n\n LazyWrapper.prototype[methodName] = function() {\n return this[takeName](1).value()[0];\n };\n });\n\n // Add `LazyWrapper` methods for `_.initial` and `_.tail`.\n arrayEach(['initial', 'tail'], function(methodName, index) {\n var dropName = 'drop' + (index ? '' : 'Right');\n\n LazyWrapper.prototype[methodName] = function() {\n return this.__filtered__ ? new LazyWrapper(this) : this[dropName](1);\n };\n });\n\n LazyWrapper.prototype.compact = function() {\n return this.filter(identity);\n };\n\n LazyWrapper.prototype.find = function(predicate) {\n return this.filter(predicate).head();\n };\n\n LazyWrapper.prototype.findLast = function(predicate) {\n return this.reverse().find(predicate);\n };\n\n LazyWrapper.prototype.invokeMap = baseRest(function(path, args) {\n if (typeof path == 'function') {\n return new LazyWrapper(this);\n }\n return this.map(function(value) {\n return baseInvoke(value, path, args);\n });\n });\n\n LazyWrapper.prototype.reject = function(predicate) {\n return this.filter(negate(getIteratee(predicate)));\n };\n\n LazyWrapper.prototype.slice = function(start, end) {\n start = toInteger(start);\n\n var result = this;\n if (result.__filtered__ && (start > 0 || end < 0)) {\n return new LazyWrapper(result);\n }\n if (start < 0) {\n result = result.takeRight(-start);\n } else if (start) {\n result = result.drop(start);\n }\n if (end !== undefined) {\n end = toInteger(end);\n result = end < 0 ? result.dropRight(-end) : result.take(end - start);\n }\n return result;\n };\n\n LazyWrapper.prototype.takeRightWhile = function(predicate) {\n return this.reverse().takeWhile(predicate).reverse();\n };\n\n LazyWrapper.prototype.toArray = function() {\n return this.take(MAX_ARRAY_LENGTH);\n };\n\n // Add `LazyWrapper` methods to `lodash.prototype`.\n baseForOwn(LazyWrapper.prototype, function(func, methodName) {\n var checkIteratee = /^(?:filter|find|map|reject)|While$/.test(methodName),\n isTaker = /^(?:head|last)$/.test(methodName),\n lodashFunc = lodash[isTaker ? ('take' + (methodName == 'last' ? 'Right' : '')) : methodName],\n retUnwrapped = isTaker || /^find/.test(methodName);\n\n if (!lodashFunc) {\n return;\n }\n lodash.prototype[methodName] = function() {\n var value = this.__wrapped__,\n args = isTaker ? [1] : arguments,\n isLazy = value instanceof LazyWrapper,\n iteratee = args[0],\n useLazy = isLazy || isArray(value);\n\n var interceptor = function(value) {\n var result = lodashFunc.apply(lodash, arrayPush([value], args));\n return (isTaker && chainAll) ? result[0] : result;\n };\n\n if (useLazy && checkIteratee && typeof iteratee == 'function' && iteratee.length != 1) {\n // Avoid lazy use if the iteratee has a \"length\" value other than `1`.\n isLazy = useLazy = false;\n }\n var chainAll = this.__chain__,\n isHybrid = !!this.__actions__.length,\n isUnwrapped = retUnwrapped && !chainAll,\n onlyLazy = isLazy && !isHybrid;\n\n if (!retUnwrapped && useLazy) {\n value = onlyLazy ? value : new LazyWrapper(this);\n var result = func.apply(value, args);\n result.__actions__.push({ 'func': thru, 'args': [interceptor], 'thisArg': undefined });\n return new LodashWrapper(result, chainAll);\n }\n if (isUnwrapped && onlyLazy) {\n return func.apply(this, args);\n }\n result = this.thru(interceptor);\n return isUnwrapped ? (isTaker ? result.value()[0] : result.value()) : result;\n };\n });\n\n // Add `Array` methods to `lodash.prototype`.\n arrayEach(['pop', 'push', 'shift', 'sort', 'splice', 'unshift'], function(methodName) {\n var func = arrayProto[methodName],\n chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru',\n retUnwrapped = /^(?:pop|shift)$/.test(methodName);\n\n lodash.prototype[methodName] = function() {\n var args = arguments;\n if (retUnwrapped && !this.__chain__) {\n var value = this.value();\n return func.apply(isArray(value) ? value : [], args);\n }\n return this[chainName](function(value) {\n return func.apply(isArray(value) ? value : [], args);\n });\n };\n });\n\n // Map minified method names to their real names.\n baseForOwn(LazyWrapper.prototype, function(func, methodName) {\n var lodashFunc = lodash[methodName];\n if (lodashFunc) {\n var key = lodashFunc.name + '';\n if (!hasOwnProperty.call(realNames, key)) {\n realNames[key] = [];\n }\n realNames[key].push({ 'name': methodName, 'func': lodashFunc });\n }\n });\n\n realNames[createHybrid(undefined, WRAP_BIND_KEY_FLAG).name] = [{\n 'name': 'wrapper',\n 'func': undefined\n }];\n\n // Add methods to `LazyWrapper`.\n LazyWrapper.prototype.clone = lazyClone;\n LazyWrapper.prototype.reverse = lazyReverse;\n LazyWrapper.prototype.value = lazyValue;\n\n // Add chain sequence methods to the `lodash` wrapper.\n lodash.prototype.at = wrapperAt;\n lodash.prototype.chain = wrapperChain;\n lodash.prototype.commit = wrapperCommit;\n lodash.prototype.next = wrapperNext;\n lodash.prototype.plant = wrapperPlant;\n lodash.prototype.reverse = wrapperReverse;\n lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue;\n\n // Add lazy aliases.\n lodash.prototype.first = lodash.prototype.head;\n\n if (symIterator) {\n lodash.prototype[symIterator] = wrapperToIterator;\n }\n return lodash;\n });\n\n /*--------------------------------------------------------------------------*/\n\n // Export lodash.\n var _ = runInContext();\n\n // Some AMD build optimizers, like r.js, check for condition patterns like:\n if (true) {\n // Expose Lodash on the global object to prevent errors when Lodash is\n // loaded by a script tag in the presence of an AMD loader.\n // See http://requirejs.org/docs/errors.html#mismatch for more details.\n // Use `_.noConflict` to remove Lodash from the global object.\n root._ = _;\n\n // Define as an anonymous module so, through path mapping, it can be\n // referenced as the \"underscore\" module.\n !(__WEBPACK_AMD_DEFINE_RESULT__ = (function() {\n return _;\n }).call(exports, __webpack_require__, exports, module),\n\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n }\n // Check for `exports` after `define` in case a build optimizer adds it.\n else {}\n}.call(this));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/lodash.js?", + ); + + /***/ + }, + + /***/ 5378: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var arrayMap = __webpack_require__(4932),\n baseIteratee = __webpack_require__(5389),\n baseMap = __webpack_require__(5128),\n isArray = __webpack_require__(6449);\n\n/**\n * Creates an array of values by running each element in `collection` thru\n * `iteratee`. The iteratee is invoked with three arguments:\n * (value, index|key, collection).\n *\n * Many lodash methods are guarded to work as iteratees for methods like\n * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.\n *\n * The guarded methods are:\n * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,\n * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,\n * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,\n * `template`, `trim`, `trimEnd`, `trimStart`, and `words`\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * _.map([4, 8], square);\n * // => [16, 64]\n *\n * _.map({ 'a': 4, 'b': 8 }, square);\n * // => [16, 64] (iteration order is not guaranteed)\n *\n * var users = [\n * { 'user': 'barney' },\n * { 'user': 'fred' }\n * ];\n *\n * // The `_.property` iteratee shorthand.\n * _.map(users, 'user');\n * // => ['barney', 'fred']\n */\nfunction map(collection, iteratee) {\n var func = isArray(collection) ? arrayMap : baseMap;\n return func(collection, baseIteratee(iteratee, 3));\n}\n\nmodule.exports = map;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/map.js?", + ); + + /***/ + }, + + /***/ 104: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var MapCache = __webpack_require__(3661);\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a function that memoizes the result of `func`. If `resolver` is\n * provided, it determines the cache key for storing the result based on the\n * arguments provided to the memoized function. By default, the first argument\n * provided to the memoized function is used as the map cache key. The `func`\n * is invoked with the `this` binding of the memoized function.\n *\n * **Note:** The cache is exposed as the `cache` property on the memoized\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\n * constructor with one whose instances implement the\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n * method interface of `clear`, `delete`, `get`, `has`, and `set`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to have its output memoized.\n * @param {Function} [resolver] The function to resolve the cache key.\n * @returns {Function} Returns the new memoized function.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n * var other = { 'c': 3, 'd': 4 };\n *\n * var values = _.memoize(_.values);\n * values(object);\n * // => [1, 2]\n *\n * values(other);\n * // => [3, 4]\n *\n * object.a = 2;\n * values(object);\n * // => [1, 2]\n *\n * // Modify the result cache.\n * values.cache.set(object, ['a', 'b']);\n * values(object);\n * // => ['a', 'b']\n *\n * // Replace `_.memoize.Cache`.\n * _.memoize.Cache = WeakMap;\n */\nfunction memoize(func, resolver) {\n if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var memoized = function() {\n var args = arguments,\n key = resolver ? resolver.apply(this, args) : args[0],\n cache = memoized.cache;\n\n if (cache.has(key)) {\n return cache.get(key);\n }\n var result = func.apply(this, args);\n memoized.cache = cache.set(key, result) || cache;\n return result;\n };\n memoized.cache = new (memoize.Cache || MapCache);\n return memoized;\n}\n\n// Expose `MapCache`.\nmemoize.Cache = MapCache;\n\nmodule.exports = memoize;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/memoize.js?", + ); + + /***/ + }, + + /***/ 3950: /***/ (module) => { + eval( + '/**\n * This method returns `undefined`.\n *\n * @static\n * @memberOf _\n * @since 2.3.0\n * @category Util\n * @example\n *\n * _.times(2, _.noop);\n * // => [undefined, undefined]\n */\nfunction noop() {\n // No operation performed.\n}\n\nmodule.exports = noop;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/noop.js?', + ); + + /***/ + }, + + /***/ 583: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var baseProperty = __webpack_require__(7237),\n basePropertyDeep = __webpack_require__(7255),\n isKey = __webpack_require__(8586),\n toKey = __webpack_require__(7797);\n\n/**\n * Creates a function that returns the value at `path` of a given object.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n * @example\n *\n * var objects = [\n * { 'a': { 'b': 2 } },\n * { 'a': { 'b': 1 } }\n * ];\n *\n * _.map(objects, _.property('a.b'));\n * // => [2, 1]\n *\n * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');\n * // => [1, 2]\n */\nfunction property(path) {\n return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);\n}\n\nmodule.exports = property;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/property.js?", + ); + + /***/ + }, + + /***/ 3345: /***/ (module) => { + eval( + '/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nmodule.exports = stubArray;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/stubArray.js?', + ); + + /***/ + }, + + /***/ 9935: /***/ (module) => { + eval( + '/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = stubFalse;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/stubFalse.js?', + ); + + /***/ + }, + + /***/ 3222: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var baseToString = __webpack_require__(7556);\n\n/**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\nfunction toString(value) {\n return value == null ? '' : baseToString(value);\n}\n\nmodule.exports = toString;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/toString.js?", + ); + + /***/ + }, + + /***/ 3375: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var baseUniq = __webpack_require__(5765);\n\n/**\n * Creates a duplicate-free version of an array, using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons, in which only the first occurrence of each element\n * is kept. The order of result values is determined by the order they occur\n * in the array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.uniq([2, 1, 2]);\n * // => [2, 1]\n */\nfunction uniq(array) {\n return (array && array.length) ? baseUniq(array) : [];\n}\n\nmodule.exports = uniq;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/uniq.js?', + ); + + /***/ + }, + + /***/ 14: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var baseIteratee = __webpack_require__(5389),\n baseUniq = __webpack_require__(5765);\n\n/**\n * This method is like `_.uniq` except that it accepts `iteratee` which is\n * invoked for each element in `array` to generate the criterion by which\n * uniqueness is computed. The order of result values is determined by the\n * order they occur in the array. The iteratee is invoked with one argument:\n * (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.uniqBy([2.1, 1.2, 2.3], Math.floor);\n * // => [2.1, 1.2]\n *\n * // The `_.property` iteratee shorthand.\n * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 1 }, { 'x': 2 }]\n */\nfunction uniqBy(array, iteratee) {\n return (array && array.length) ? baseUniq(array, baseIteratee(iteratee, 2)) : [];\n}\n\nmodule.exports = uniqBy;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/uniqBy.js?", + ); + + /***/ + }, + + /***/ 5177: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Afrikaans [af]\n//! author : Werner Mollentze : https://github.com/wernerm\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var af = moment.defineLocale('af', {\n months: 'Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember'.split(\n '_'\n ),\n monthsShort: 'Jan_Feb_Mrt_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des'.split('_'),\n weekdays: 'Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag'.split(\n '_'\n ),\n weekdaysShort: 'Son_Maa_Din_Woe_Don_Vry_Sat'.split('_'),\n weekdaysMin: 'So_Ma_Di_Wo_Do_Vr_Sa'.split('_'),\n meridiemParse: /vm|nm/i,\n isPM: function (input) {\n return /^nm$/i.test(input);\n },\n meridiem: function (hours, minutes, isLower) {\n if (hours < 12) {\n return isLower ? 'vm' : 'VM';\n } else {\n return isLower ? 'nm' : 'NM';\n }\n },\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Vandag om] LT',\n nextDay: '[Môre om] LT',\n nextWeek: 'dddd [om] LT',\n lastDay: '[Gister om] LT',\n lastWeek: '[Laas] dddd [om] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'oor %s',\n past: '%s gelede',\n s: \"'n paar sekondes\",\n ss: '%d sekondes',\n m: \"'n minuut\",\n mm: '%d minute',\n h: \"'n uur\",\n hh: '%d ure',\n d: \"'n dag\",\n dd: '%d dae',\n M: \"'n maand\",\n MM: '%d maande',\n y: \"'n jaar\",\n yy: '%d jaar',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(ste|de)/,\n ordinal: function (number) {\n return (\n number +\n (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de')\n ); // Thanks to Joris Röling : https://github.com/jjupiter\n },\n week: {\n dow: 1, // Maandag is die eerste dag van die week.\n doy: 4, // Die week wat die 4de Januarie bevat is die eerste week van die jaar.\n },\n });\n\n return af;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/af.js?", + ); + + /***/ + }, + + /***/ 1488: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Arabic (Algeria) [ar-dz]\n//! author : Amine Roukh: https://github.com/Amine27\n//! author : Abdel Said: https://github.com/abdelsaid\n//! author : Ahmed Elkhatib\n//! author : forabi https://github.com/forabi\n//! author : Noureddine LOUAHEDJ : https://github.com/noureddinem\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var pluralForm = function (n) {\n return n === 0\n ? 0\n : n === 1\n ? 1\n : n === 2\n ? 2\n : n % 100 >= 3 && n % 100 <= 10\n ? 3\n : n % 100 >= 11\n ? 4\n : 5;\n },\n plurals = {\n s: [\n 'أقل من ثانية',\n 'ثانية واحدة',\n ['ثانيتان', 'ثانيتين'],\n '%d ثوان',\n '%d ثانية',\n '%d ثانية',\n ],\n m: [\n 'أقل من دقيقة',\n 'دقيقة واحدة',\n ['دقيقتان', 'دقيقتين'],\n '%d دقائق',\n '%d دقيقة',\n '%d دقيقة',\n ],\n h: [\n 'أقل من ساعة',\n 'ساعة واحدة',\n ['ساعتان', 'ساعتين'],\n '%d ساعات',\n '%d ساعة',\n '%d ساعة',\n ],\n d: [\n 'أقل من يوم',\n 'يوم واحد',\n ['يومان', 'يومين'],\n '%d أيام',\n '%d يومًا',\n '%d يوم',\n ],\n M: [\n 'أقل من شهر',\n 'شهر واحد',\n ['شهران', 'شهرين'],\n '%d أشهر',\n '%d شهرا',\n '%d شهر',\n ],\n y: [\n 'أقل من عام',\n 'عام واحد',\n ['عامان', 'عامين'],\n '%d أعوام',\n '%d عامًا',\n '%d عام',\n ],\n },\n pluralize = function (u) {\n return function (number, withoutSuffix, string, isFuture) {\n var f = pluralForm(number),\n str = plurals[u][pluralForm(number)];\n if (f === 2) {\n str = str[withoutSuffix ? 0 : 1];\n }\n return str.replace(/%d/i, number);\n };\n },\n months = [\n 'جانفي',\n 'فيفري',\n 'مارس',\n 'أفريل',\n 'ماي',\n 'جوان',\n 'جويلية',\n 'أوت',\n 'سبتمبر',\n 'أكتوبر',\n 'نوفمبر',\n 'ديسمبر',\n ];\n\n var arDz = moment.defineLocale('ar-dz', {\n months: months,\n monthsShort: months,\n weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),\n weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'D/\\u200FM/\\u200FYYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n meridiemParse: /ص|م/,\n isPM: function (input) {\n return 'م' === input;\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 12) {\n return 'ص';\n } else {\n return 'م';\n }\n },\n calendar: {\n sameDay: '[اليوم عند الساعة] LT',\n nextDay: '[غدًا عند الساعة] LT',\n nextWeek: 'dddd [عند الساعة] LT',\n lastDay: '[أمس عند الساعة] LT',\n lastWeek: 'dddd [عند الساعة] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'بعد %s',\n past: 'منذ %s',\n s: pluralize('s'),\n ss: pluralize('s'),\n m: pluralize('m'),\n mm: pluralize('m'),\n h: pluralize('h'),\n hh: pluralize('h'),\n d: pluralize('d'),\n dd: pluralize('d'),\n M: pluralize('M'),\n MM: pluralize('M'),\n y: pluralize('y'),\n yy: pluralize('y'),\n },\n postformat: function (string) {\n return string.replace(/,/g, '،');\n },\n week: {\n dow: 0, // Sunday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return arDz;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/ar-dz.js?", + ); + + /***/ + }, + + /***/ 8676: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Arabic (Kuwait) [ar-kw]\n//! author : Nusret Parlak: https://github.com/nusretparlak\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var arKw = moment.defineLocale('ar-kw', {\n months: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(\n '_'\n ),\n monthsShort:\n 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(\n '_'\n ),\n weekdays: 'الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n weekdaysShort: 'احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'),\n weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[اليوم على الساعة] LT',\n nextDay: '[غدا على الساعة] LT',\n nextWeek: 'dddd [على الساعة] LT',\n lastDay: '[أمس على الساعة] LT',\n lastWeek: 'dddd [على الساعة] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'في %s',\n past: 'منذ %s',\n s: 'ثوان',\n ss: '%d ثانية',\n m: 'دقيقة',\n mm: '%d دقائق',\n h: 'ساعة',\n hh: '%d ساعات',\n d: 'يوم',\n dd: '%d أيام',\n M: 'شهر',\n MM: '%d أشهر',\n y: 'سنة',\n yy: '%d سنوات',\n },\n week: {\n dow: 0, // Sunday is the first day of the week.\n doy: 12, // The week that contains Jan 12th is the first week of the year.\n },\n });\n\n return arKw;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/ar-kw.js?", + ); + + /***/ + }, + + /***/ 2353: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Arabic (Libya) [ar-ly]\n//! author : Ali Hmer: https://github.com/kikoanis\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var symbolMap = {\n 1: '1',\n 2: '2',\n 3: '3',\n 4: '4',\n 5: '5',\n 6: '6',\n 7: '7',\n 8: '8',\n 9: '9',\n 0: '0',\n },\n pluralForm = function (n) {\n return n === 0\n ? 0\n : n === 1\n ? 1\n : n === 2\n ? 2\n : n % 100 >= 3 && n % 100 <= 10\n ? 3\n : n % 100 >= 11\n ? 4\n : 5;\n },\n plurals = {\n s: [\n 'أقل من ثانية',\n 'ثانية واحدة',\n ['ثانيتان', 'ثانيتين'],\n '%d ثوان',\n '%d ثانية',\n '%d ثانية',\n ],\n m: [\n 'أقل من دقيقة',\n 'دقيقة واحدة',\n ['دقيقتان', 'دقيقتين'],\n '%d دقائق',\n '%d دقيقة',\n '%d دقيقة',\n ],\n h: [\n 'أقل من ساعة',\n 'ساعة واحدة',\n ['ساعتان', 'ساعتين'],\n '%d ساعات',\n '%d ساعة',\n '%d ساعة',\n ],\n d: [\n 'أقل من يوم',\n 'يوم واحد',\n ['يومان', 'يومين'],\n '%d أيام',\n '%d يومًا',\n '%d يوم',\n ],\n M: [\n 'أقل من شهر',\n 'شهر واحد',\n ['شهران', 'شهرين'],\n '%d أشهر',\n '%d شهرا',\n '%d شهر',\n ],\n y: [\n 'أقل من عام',\n 'عام واحد',\n ['عامان', 'عامين'],\n '%d أعوام',\n '%d عامًا',\n '%d عام',\n ],\n },\n pluralize = function (u) {\n return function (number, withoutSuffix, string, isFuture) {\n var f = pluralForm(number),\n str = plurals[u][pluralForm(number)];\n if (f === 2) {\n str = str[withoutSuffix ? 0 : 1];\n }\n return str.replace(/%d/i, number);\n };\n },\n months = [\n 'يناير',\n 'فبراير',\n 'مارس',\n 'أبريل',\n 'مايو',\n 'يونيو',\n 'يوليو',\n 'أغسطس',\n 'سبتمبر',\n 'أكتوبر',\n 'نوفمبر',\n 'ديسمبر',\n ];\n\n var arLy = moment.defineLocale('ar-ly', {\n months: months,\n monthsShort: months,\n weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),\n weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'D/\\u200FM/\\u200FYYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n meridiemParse: /ص|م/,\n isPM: function (input) {\n return 'م' === input;\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 12) {\n return 'ص';\n } else {\n return 'م';\n }\n },\n calendar: {\n sameDay: '[اليوم عند الساعة] LT',\n nextDay: '[غدًا عند الساعة] LT',\n nextWeek: 'dddd [عند الساعة] LT',\n lastDay: '[أمس عند الساعة] LT',\n lastWeek: 'dddd [عند الساعة] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'بعد %s',\n past: 'منذ %s',\n s: pluralize('s'),\n ss: pluralize('s'),\n m: pluralize('m'),\n mm: pluralize('m'),\n h: pluralize('h'),\n hh: pluralize('h'),\n d: pluralize('d'),\n dd: pluralize('d'),\n M: pluralize('M'),\n MM: pluralize('M'),\n y: pluralize('y'),\n yy: pluralize('y'),\n },\n preparse: function (string) {\n return string.replace(/،/g, ',');\n },\n postformat: function (string) {\n return string\n .replace(/\\d/g, function (match) {\n return symbolMap[match];\n })\n .replace(/,/g, '،');\n },\n week: {\n dow: 6, // Saturday is the first day of the week.\n doy: 12, // The week that contains Jan 12th is the first week of the year.\n },\n });\n\n return arLy;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/ar-ly.js?", + ); + + /***/ + }, + + /***/ 4496: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Arabic (Morocco) [ar-ma]\n//! author : ElFadili Yassine : https://github.com/ElFadiliY\n//! author : Abdel Said : https://github.com/abdelsaid\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var arMa = moment.defineLocale('ar-ma', {\n months: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(\n '_'\n ),\n monthsShort:\n 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(\n '_'\n ),\n weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n weekdaysShort: 'احد_اثنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'),\n weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[اليوم على الساعة] LT',\n nextDay: '[غدا على الساعة] LT',\n nextWeek: 'dddd [على الساعة] LT',\n lastDay: '[أمس على الساعة] LT',\n lastWeek: 'dddd [على الساعة] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'في %s',\n past: 'منذ %s',\n s: 'ثوان',\n ss: '%d ثانية',\n m: 'دقيقة',\n mm: '%d دقائق',\n h: 'ساعة',\n hh: '%d ساعات',\n d: 'يوم',\n dd: '%d أيام',\n M: 'شهر',\n MM: '%d أشهر',\n y: 'سنة',\n yy: '%d سنوات',\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return arMa;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/ar-ma.js?", + ); + + /***/ + }, + + /***/ 6947: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Arabic (Palestine) [ar-ps]\n//! author : Majd Al-Shihabi : https://github.com/majdal\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var symbolMap = {\n 1: '١',\n 2: '٢',\n 3: '٣',\n 4: '٤',\n 5: '٥',\n 6: '٦',\n 7: '٧',\n 8: '٨',\n 9: '٩',\n 0: '٠',\n },\n numberMap = {\n '١': '1',\n '٢': '2',\n '٣': '3',\n '٤': '4',\n '٥': '5',\n '٦': '6',\n '٧': '7',\n '٨': '8',\n '٩': '9',\n '٠': '0',\n };\n\n var arPs = moment.defineLocale('ar-ps', {\n months: 'كانون الثاني_شباط_آذار_نيسان_أيّار_حزيران_تمّوز_آب_أيلول_تشري الأوّل_تشرين الثاني_كانون الأوّل'.split(\n '_'\n ),\n monthsShort:\n 'ك٢_شباط_آذار_نيسان_أيّار_حزيران_تمّوز_آب_أيلول_ت١_ت٢_ك١'.split('_'),\n weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),\n weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n meridiemParse: /ص|م/,\n isPM: function (input) {\n return 'م' === input;\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 12) {\n return 'ص';\n } else {\n return 'م';\n }\n },\n calendar: {\n sameDay: '[اليوم على الساعة] LT',\n nextDay: '[غدا على الساعة] LT',\n nextWeek: 'dddd [على الساعة] LT',\n lastDay: '[أمس على الساعة] LT',\n lastWeek: 'dddd [على الساعة] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'في %s',\n past: 'منذ %s',\n s: 'ثوان',\n ss: '%d ثانية',\n m: 'دقيقة',\n mm: '%d دقائق',\n h: 'ساعة',\n hh: '%d ساعات',\n d: 'يوم',\n dd: '%d أيام',\n M: 'شهر',\n MM: '%d أشهر',\n y: 'سنة',\n yy: '%d سنوات',\n },\n preparse: function (string) {\n return string\n .replace(/[٣٤٥٦٧٨٩٠]/g, function (match) {\n return numberMap[match];\n })\n .split('') // reversed since negative lookbehind not supported everywhere\n .reverse()\n .join('')\n .replace(/[١٢](?![\\u062a\\u0643])/g, function (match) {\n return numberMap[match];\n })\n .split('')\n .reverse()\n .join('')\n .replace(/،/g, ',');\n },\n postformat: function (string) {\n return string\n .replace(/\\d/g, function (match) {\n return symbolMap[match];\n })\n .replace(/,/g, '،');\n },\n week: {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n },\n });\n\n return arPs;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/ar-ps.js?", + ); + + /***/ + }, + + /***/ 2682: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Arabic (Saudi Arabia) [ar-sa]\n//! author : Suhail Alkowaileet : https://github.com/xsoh\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var symbolMap = {\n 1: '١',\n 2: '٢',\n 3: '٣',\n 4: '٤',\n 5: '٥',\n 6: '٦',\n 7: '٧',\n 8: '٨',\n 9: '٩',\n 0: '٠',\n },\n numberMap = {\n '١': '1',\n '٢': '2',\n '٣': '3',\n '٤': '4',\n '٥': '5',\n '٦': '6',\n '٧': '7',\n '٨': '8',\n '٩': '9',\n '٠': '0',\n };\n\n var arSa = moment.defineLocale('ar-sa', {\n months: 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(\n '_'\n ),\n monthsShort:\n 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(\n '_'\n ),\n weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),\n weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n meridiemParse: /ص|م/,\n isPM: function (input) {\n return 'م' === input;\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 12) {\n return 'ص';\n } else {\n return 'م';\n }\n },\n calendar: {\n sameDay: '[اليوم على الساعة] LT',\n nextDay: '[غدا على الساعة] LT',\n nextWeek: 'dddd [على الساعة] LT',\n lastDay: '[أمس على الساعة] LT',\n lastWeek: 'dddd [على الساعة] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'في %s',\n past: 'منذ %s',\n s: 'ثوان',\n ss: '%d ثانية',\n m: 'دقيقة',\n mm: '%d دقائق',\n h: 'ساعة',\n hh: '%d ساعات',\n d: 'يوم',\n dd: '%d أيام',\n M: 'شهر',\n MM: '%d أشهر',\n y: 'سنة',\n yy: '%d سنوات',\n },\n preparse: function (string) {\n return string\n .replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {\n return numberMap[match];\n })\n .replace(/،/g, ',');\n },\n postformat: function (string) {\n return string\n .replace(/\\d/g, function (match) {\n return symbolMap[match];\n })\n .replace(/,/g, '،');\n },\n week: {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n },\n });\n\n return arSa;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/ar-sa.js?", + ); + + /***/ + }, + + /***/ 9756: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Arabic (Tunisia) [ar-tn]\n//! author : Nader Toukabri : https://github.com/naderio\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var arTn = moment.defineLocale('ar-tn', {\n months: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(\n '_'\n ),\n monthsShort:\n 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(\n '_'\n ),\n weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),\n weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[اليوم على الساعة] LT',\n nextDay: '[غدا على الساعة] LT',\n nextWeek: 'dddd [على الساعة] LT',\n lastDay: '[أمس على الساعة] LT',\n lastWeek: 'dddd [على الساعة] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'في %s',\n past: 'منذ %s',\n s: 'ثوان',\n ss: '%d ثانية',\n m: 'دقيقة',\n mm: '%d دقائق',\n h: 'ساعة',\n hh: '%d ساعات',\n d: 'يوم',\n dd: '%d أيام',\n M: 'شهر',\n MM: '%d أشهر',\n y: 'سنة',\n yy: '%d سنوات',\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return arTn;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/ar-tn.js?", + ); + + /***/ + }, + + /***/ 1509: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Arabic [ar]\n//! author : Abdel Said: https://github.com/abdelsaid\n//! author : Ahmed Elkhatib\n//! author : forabi https://github.com/forabi\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var symbolMap = {\n 1: '١',\n 2: '٢',\n 3: '٣',\n 4: '٤',\n 5: '٥',\n 6: '٦',\n 7: '٧',\n 8: '٨',\n 9: '٩',\n 0: '٠',\n },\n numberMap = {\n '١': '1',\n '٢': '2',\n '٣': '3',\n '٤': '4',\n '٥': '5',\n '٦': '6',\n '٧': '7',\n '٨': '8',\n '٩': '9',\n '٠': '0',\n },\n pluralForm = function (n) {\n return n === 0\n ? 0\n : n === 1\n ? 1\n : n === 2\n ? 2\n : n % 100 >= 3 && n % 100 <= 10\n ? 3\n : n % 100 >= 11\n ? 4\n : 5;\n },\n plurals = {\n s: [\n 'أقل من ثانية',\n 'ثانية واحدة',\n ['ثانيتان', 'ثانيتين'],\n '%d ثوان',\n '%d ثانية',\n '%d ثانية',\n ],\n m: [\n 'أقل من دقيقة',\n 'دقيقة واحدة',\n ['دقيقتان', 'دقيقتين'],\n '%d دقائق',\n '%d دقيقة',\n '%d دقيقة',\n ],\n h: [\n 'أقل من ساعة',\n 'ساعة واحدة',\n ['ساعتان', 'ساعتين'],\n '%d ساعات',\n '%d ساعة',\n '%d ساعة',\n ],\n d: [\n 'أقل من يوم',\n 'يوم واحد',\n ['يومان', 'يومين'],\n '%d أيام',\n '%d يومًا',\n '%d يوم',\n ],\n M: [\n 'أقل من شهر',\n 'شهر واحد',\n ['شهران', 'شهرين'],\n '%d أشهر',\n '%d شهرا',\n '%d شهر',\n ],\n y: [\n 'أقل من عام',\n 'عام واحد',\n ['عامان', 'عامين'],\n '%d أعوام',\n '%d عامًا',\n '%d عام',\n ],\n },\n pluralize = function (u) {\n return function (number, withoutSuffix, string, isFuture) {\n var f = pluralForm(number),\n str = plurals[u][pluralForm(number)];\n if (f === 2) {\n str = str[withoutSuffix ? 0 : 1];\n }\n return str.replace(/%d/i, number);\n };\n },\n months = [\n 'يناير',\n 'فبراير',\n 'مارس',\n 'أبريل',\n 'مايو',\n 'يونيو',\n 'يوليو',\n 'أغسطس',\n 'سبتمبر',\n 'أكتوبر',\n 'نوفمبر',\n 'ديسمبر',\n ];\n\n var ar = moment.defineLocale('ar', {\n months: months,\n monthsShort: months,\n weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),\n weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'D/\\u200FM/\\u200FYYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n meridiemParse: /ص|م/,\n isPM: function (input) {\n return 'م' === input;\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 12) {\n return 'ص';\n } else {\n return 'م';\n }\n },\n calendar: {\n sameDay: '[اليوم عند الساعة] LT',\n nextDay: '[غدًا عند الساعة] LT',\n nextWeek: 'dddd [عند الساعة] LT',\n lastDay: '[أمس عند الساعة] LT',\n lastWeek: 'dddd [عند الساعة] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'بعد %s',\n past: 'منذ %s',\n s: pluralize('s'),\n ss: pluralize('s'),\n m: pluralize('m'),\n mm: pluralize('m'),\n h: pluralize('h'),\n hh: pluralize('h'),\n d: pluralize('d'),\n dd: pluralize('d'),\n M: pluralize('M'),\n MM: pluralize('M'),\n y: pluralize('y'),\n yy: pluralize('y'),\n },\n preparse: function (string) {\n return string\n .replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {\n return numberMap[match];\n })\n .replace(/،/g, ',');\n },\n postformat: function (string) {\n return string\n .replace(/\\d/g, function (match) {\n return symbolMap[match];\n })\n .replace(/,/g, '،');\n },\n week: {\n dow: 6, // Saturday is the first day of the week.\n doy: 12, // The week that contains Jan 12th is the first week of the year.\n },\n });\n\n return ar;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/ar.js?", + ); + + /***/ + }, + + /***/ 5533: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Azerbaijani [az]\n//! author : topchiyev : https://github.com/topchiyev\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var suffixes = {\n 1: '-inci',\n 5: '-inci',\n 8: '-inci',\n 70: '-inci',\n 80: '-inci',\n 2: '-nci',\n 7: '-nci',\n 20: '-nci',\n 50: '-nci',\n 3: '-üncü',\n 4: '-üncü',\n 100: '-üncü',\n 6: '-ncı',\n 9: '-uncu',\n 10: '-uncu',\n 30: '-uncu',\n 60: '-ıncı',\n 90: '-ıncı',\n };\n\n var az = moment.defineLocale('az', {\n months: 'yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr'.split(\n '_'\n ),\n monthsShort: 'yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek'.split('_'),\n weekdays:\n 'Bazar_Bazar ertəsi_Çərşənbə axşamı_Çərşənbə_Cümə axşamı_Cümə_Şənbə'.split(\n '_'\n ),\n weekdaysShort: 'Baz_BzE_ÇAx_Çər_CAx_Cüm_Şən'.split('_'),\n weekdaysMin: 'Bz_BE_ÇA_Çə_CA_Cü_Şə'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[bugün saat] LT',\n nextDay: '[sabah saat] LT',\n nextWeek: '[gələn həftə] dddd [saat] LT',\n lastDay: '[dünən] LT',\n lastWeek: '[keçən həftə] dddd [saat] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s sonra',\n past: '%s əvvəl',\n s: 'bir neçə saniyə',\n ss: '%d saniyə',\n m: 'bir dəqiqə',\n mm: '%d dəqiqə',\n h: 'bir saat',\n hh: '%d saat',\n d: 'bir gün',\n dd: '%d gün',\n M: 'bir ay',\n MM: '%d ay',\n y: 'bir il',\n yy: '%d il',\n },\n meridiemParse: /gecə|səhər|gündüz|axşam/,\n isPM: function (input) {\n return /^(gündüz|axşam)$/.test(input);\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 4) {\n return 'gecə';\n } else if (hour < 12) {\n return 'səhər';\n } else if (hour < 17) {\n return 'gündüz';\n } else {\n return 'axşam';\n }\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-(ıncı|inci|nci|üncü|ncı|uncu)/,\n ordinal: function (number) {\n if (number === 0) {\n // special case for zero\n return number + '-ıncı';\n }\n var a = number % 10,\n b = (number % 100) - a,\n c = number >= 100 ? 100 : null;\n return number + (suffixes[a] || suffixes[b] || suffixes[c]);\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return az;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/az.js?", + ); + + /***/ + }, + + /***/ 8959: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Belarusian [be]\n//! author : Dmitry Demidov : https://github.com/demidov91\n//! author: Praleska: http://praleska.pro/\n//! Author : Menelion Elensúle : https://github.com/Oire\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function plural(word, num) {\n var forms = word.split('_');\n return num % 10 === 1 && num % 100 !== 11\n ? forms[0]\n : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20)\n ? forms[1]\n : forms[2];\n }\n function relativeTimeWithPlural(number, withoutSuffix, key) {\n var format = {\n ss: withoutSuffix ? 'секунда_секунды_секунд' : 'секунду_секунды_секунд',\n mm: withoutSuffix ? 'хвіліна_хвіліны_хвілін' : 'хвіліну_хвіліны_хвілін',\n hh: withoutSuffix ? 'гадзіна_гадзіны_гадзін' : 'гадзіну_гадзіны_гадзін',\n dd: 'дзень_дні_дзён',\n MM: 'месяц_месяцы_месяцаў',\n yy: 'год_гады_гадоў',\n };\n if (key === 'm') {\n return withoutSuffix ? 'хвіліна' : 'хвіліну';\n } else if (key === 'h') {\n return withoutSuffix ? 'гадзіна' : 'гадзіну';\n } else {\n return number + ' ' + plural(format[key], +number);\n }\n }\n\n var be = moment.defineLocale('be', {\n months: {\n format: 'студзеня_лютага_сакавіка_красавіка_траўня_чэрвеня_ліпеня_жніўня_верасня_кастрычніка_лістапада_снежня'.split(\n '_'\n ),\n standalone:\n 'студзень_люты_сакавік_красавік_травень_чэрвень_ліпень_жнівень_верасень_кастрычнік_лістапад_снежань'.split(\n '_'\n ),\n },\n monthsShort:\n 'студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж'.split('_'),\n weekdays: {\n format: 'нядзелю_панядзелак_аўторак_сераду_чацвер_пятніцу_суботу'.split(\n '_'\n ),\n standalone:\n 'нядзеля_панядзелак_аўторак_серада_чацвер_пятніца_субота'.split(\n '_'\n ),\n isFormat: /\\[ ?[Ууў] ?(?:мінулую|наступную)? ?\\] ?dddd/,\n },\n weekdaysShort: 'нд_пн_ат_ср_чц_пт_сб'.split('_'),\n weekdaysMin: 'нд_пн_ат_ср_чц_пт_сб'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY г.',\n LLL: 'D MMMM YYYY г., HH:mm',\n LLLL: 'dddd, D MMMM YYYY г., HH:mm',\n },\n calendar: {\n sameDay: '[Сёння ў] LT',\n nextDay: '[Заўтра ў] LT',\n lastDay: '[Учора ў] LT',\n nextWeek: function () {\n return '[У] dddd [ў] LT';\n },\n lastWeek: function () {\n switch (this.day()) {\n case 0:\n case 3:\n case 5:\n case 6:\n return '[У мінулую] dddd [ў] LT';\n case 1:\n case 2:\n case 4:\n return '[У мінулы] dddd [ў] LT';\n }\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'праз %s',\n past: '%s таму',\n s: 'некалькі секунд',\n m: relativeTimeWithPlural,\n mm: relativeTimeWithPlural,\n h: relativeTimeWithPlural,\n hh: relativeTimeWithPlural,\n d: 'дзень',\n dd: relativeTimeWithPlural,\n M: 'месяц',\n MM: relativeTimeWithPlural,\n y: 'год',\n yy: relativeTimeWithPlural,\n },\n meridiemParse: /ночы|раніцы|дня|вечара/,\n isPM: function (input) {\n return /^(дня|вечара)$/.test(input);\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 4) {\n return 'ночы';\n } else if (hour < 12) {\n return 'раніцы';\n } else if (hour < 17) {\n return 'дня';\n } else {\n return 'вечара';\n }\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-(і|ы|га)/,\n ordinal: function (number, period) {\n switch (period) {\n case 'M':\n case 'd':\n case 'DDD':\n case 'w':\n case 'W':\n return (number % 10 === 2 || number % 10 === 3) &&\n number % 100 !== 12 &&\n number % 100 !== 13\n ? number + '-і'\n : number + '-ы';\n case 'D':\n return number + '-га';\n default:\n return number;\n }\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return be;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/be.js?", + ); + + /***/ + }, + + /***/ 7777: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Bulgarian [bg]\n//! author : Krasen Borisov : https://github.com/kraz\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var bg = moment.defineLocale('bg', {\n months: 'януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември'.split(\n '_'\n ),\n monthsShort: 'яну_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек'.split('_'),\n weekdays: 'неделя_понеделник_вторник_сряда_четвъртък_петък_събота'.split(\n '_'\n ),\n weekdaysShort: 'нед_пон_вто_сря_чет_пет_съб'.split('_'),\n weekdaysMin: 'нд_пн_вт_ср_чт_пт_сб'.split('_'),\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'D.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY H:mm',\n LLLL: 'dddd, D MMMM YYYY H:mm',\n },\n calendar: {\n sameDay: '[Днес в] LT',\n nextDay: '[Утре в] LT',\n nextWeek: 'dddd [в] LT',\n lastDay: '[Вчера в] LT',\n lastWeek: function () {\n switch (this.day()) {\n case 0:\n case 3:\n case 6:\n return '[Миналата] dddd [в] LT';\n case 1:\n case 2:\n case 4:\n case 5:\n return '[Миналия] dddd [в] LT';\n }\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'след %s',\n past: 'преди %s',\n s: 'няколко секунди',\n ss: '%d секунди',\n m: 'минута',\n mm: '%d минути',\n h: 'час',\n hh: '%d часа',\n d: 'ден',\n dd: '%d дена',\n w: 'седмица',\n ww: '%d седмици',\n M: 'месец',\n MM: '%d месеца',\n y: 'година',\n yy: '%d години',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-(ев|ен|ти|ви|ри|ми)/,\n ordinal: function (number) {\n var lastDigit = number % 10,\n last2Digits = number % 100;\n if (number === 0) {\n return number + '-ев';\n } else if (last2Digits === 0) {\n return number + '-ен';\n } else if (last2Digits > 10 && last2Digits < 20) {\n return number + '-ти';\n } else if (lastDigit === 1) {\n return number + '-ви';\n } else if (lastDigit === 2) {\n return number + '-ри';\n } else if (lastDigit === 7 || lastDigit === 8) {\n return number + '-ми';\n } else {\n return number + '-ти';\n }\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return bg;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/bg.js?", + ); + + /***/ + }, + + /***/ 4903: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Bambara [bm]\n//! author : Estelle Comment : https://github.com/estellecomment\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var bm = moment.defineLocale('bm', {\n months: 'Zanwuyekalo_Fewuruyekalo_Marisikalo_Awirilikalo_Mɛkalo_Zuwɛnkalo_Zuluyekalo_Utikalo_Sɛtanburukalo_ɔkutɔburukalo_Nowanburukalo_Desanburukalo'.split(\n '_'\n ),\n monthsShort: 'Zan_Few_Mar_Awi_Mɛ_Zuw_Zul_Uti_Sɛt_ɔku_Now_Des'.split('_'),\n weekdays: 'Kari_Ntɛnɛn_Tarata_Araba_Alamisa_Juma_Sibiri'.split('_'),\n weekdaysShort: 'Kar_Ntɛ_Tar_Ara_Ala_Jum_Sib'.split('_'),\n weekdaysMin: 'Ka_Nt_Ta_Ar_Al_Ju_Si'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'MMMM [tile] D [san] YYYY',\n LLL: 'MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm',\n LLLL: 'dddd MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm',\n },\n calendar: {\n sameDay: '[Bi lɛrɛ] LT',\n nextDay: '[Sini lɛrɛ] LT',\n nextWeek: 'dddd [don lɛrɛ] LT',\n lastDay: '[Kunu lɛrɛ] LT',\n lastWeek: 'dddd [tɛmɛnen lɛrɛ] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s kɔnɔ',\n past: 'a bɛ %s bɔ',\n s: 'sanga dama dama',\n ss: 'sekondi %d',\n m: 'miniti kelen',\n mm: 'miniti %d',\n h: 'lɛrɛ kelen',\n hh: 'lɛrɛ %d',\n d: 'tile kelen',\n dd: 'tile %d',\n M: 'kalo kelen',\n MM: 'kalo %d',\n y: 'san kelen',\n yy: 'san %d',\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return bm;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/bm.js?", + ); + + /***/ + }, + + /***/ 7357: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Bengali (Bangladesh) [bn-bd]\n//! author : Asraf Hossain Patoary : https://github.com/ashwoolford\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var symbolMap = {\n 1: '১',\n 2: '২',\n 3: '৩',\n 4: '৪',\n 5: '৫',\n 6: '৬',\n 7: '৭',\n 8: '৮',\n 9: '৯',\n 0: '০',\n },\n numberMap = {\n '১': '1',\n '২': '2',\n '৩': '3',\n '৪': '4',\n '৫': '5',\n '৬': '6',\n '৭': '7',\n '৮': '8',\n '৯': '9',\n '০': '0',\n };\n\n var bnBd = moment.defineLocale('bn-bd', {\n months: 'জানুয়ারি_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর'.split(\n '_'\n ),\n monthsShort:\n 'জানু_ফেব্রু_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্ট_অক্টো_নভে_ডিসে'.split(\n '_'\n ),\n weekdays: 'রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার'.split(\n '_'\n ),\n weekdaysShort: 'রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি'.split('_'),\n weekdaysMin: 'রবি_সোম_মঙ্গল_বুধ_বৃহ_শুক্র_শনি'.split('_'),\n longDateFormat: {\n LT: 'A h:mm সময়',\n LTS: 'A h:mm:ss সময়',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, A h:mm সময়',\n LLLL: 'dddd, D MMMM YYYY, A h:mm সময়',\n },\n calendar: {\n sameDay: '[আজ] LT',\n nextDay: '[আগামীকাল] LT',\n nextWeek: 'dddd, LT',\n lastDay: '[গতকাল] LT',\n lastWeek: '[গত] dddd, LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s পরে',\n past: '%s আগে',\n s: 'কয়েক সেকেন্ড',\n ss: '%d সেকেন্ড',\n m: 'এক মিনিট',\n mm: '%d মিনিট',\n h: 'এক ঘন্টা',\n hh: '%d ঘন্টা',\n d: 'এক দিন',\n dd: '%d দিন',\n M: 'এক মাস',\n MM: '%d মাস',\n y: 'এক বছর',\n yy: '%d বছর',\n },\n preparse: function (string) {\n return string.replace(/[১২৩৪৫৬৭৮৯০]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function (string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n\n meridiemParse: /রাত|ভোর|সকাল|দুপুর|বিকাল|সন্ধ্যা|রাত/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'রাত') {\n return hour < 4 ? hour : hour + 12;\n } else if (meridiem === 'ভোর') {\n return hour;\n } else if (meridiem === 'সকাল') {\n return hour;\n } else if (meridiem === 'দুপুর') {\n return hour >= 3 ? hour : hour + 12;\n } else if (meridiem === 'বিকাল') {\n return hour + 12;\n } else if (meridiem === 'সন্ধ্যা') {\n return hour + 12;\n }\n },\n\n meridiem: function (hour, minute, isLower) {\n if (hour < 4) {\n return 'রাত';\n } else if (hour < 6) {\n return 'ভোর';\n } else if (hour < 12) {\n return 'সকাল';\n } else if (hour < 15) {\n return 'দুপুর';\n } else if (hour < 18) {\n return 'বিকাল';\n } else if (hour < 20) {\n return 'সন্ধ্যা';\n } else {\n return 'রাত';\n }\n },\n week: {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n },\n });\n\n return bnBd;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/bn-bd.js?", + ); + + /***/ + }, + + /***/ 1290: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Bengali [bn]\n//! author : Kaushik Gandhi : https://github.com/kaushikgandhi\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var symbolMap = {\n 1: '১',\n 2: '২',\n 3: '৩',\n 4: '৪',\n 5: '৫',\n 6: '৬',\n 7: '৭',\n 8: '৮',\n 9: '৯',\n 0: '০',\n },\n numberMap = {\n '১': '1',\n '২': '2',\n '৩': '3',\n '৪': '4',\n '৫': '5',\n '৬': '6',\n '৭': '7',\n '৮': '8',\n '৯': '9',\n '০': '0',\n };\n\n var bn = moment.defineLocale('bn', {\n months: 'জানুয়ারি_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর'.split(\n '_'\n ),\n monthsShort:\n 'জানু_ফেব্রু_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্ট_অক্টো_নভে_ডিসে'.split(\n '_'\n ),\n weekdays: 'রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার'.split(\n '_'\n ),\n weekdaysShort: 'রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি'.split('_'),\n weekdaysMin: 'রবি_সোম_মঙ্গল_বুধ_বৃহ_শুক্র_শনি'.split('_'),\n longDateFormat: {\n LT: 'A h:mm সময়',\n LTS: 'A h:mm:ss সময়',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, A h:mm সময়',\n LLLL: 'dddd, D MMMM YYYY, A h:mm সময়',\n },\n calendar: {\n sameDay: '[আজ] LT',\n nextDay: '[আগামীকাল] LT',\n nextWeek: 'dddd, LT',\n lastDay: '[গতকাল] LT',\n lastWeek: '[গত] dddd, LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s পরে',\n past: '%s আগে',\n s: 'কয়েক সেকেন্ড',\n ss: '%d সেকেন্ড',\n m: 'এক মিনিট',\n mm: '%d মিনিট',\n h: 'এক ঘন্টা',\n hh: '%d ঘন্টা',\n d: 'এক দিন',\n dd: '%d দিন',\n M: 'এক মাস',\n MM: '%d মাস',\n y: 'এক বছর',\n yy: '%d বছর',\n },\n preparse: function (string) {\n return string.replace(/[১২৩৪৫৬৭৮৯০]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function (string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n meridiemParse: /রাত|সকাল|দুপুর|বিকাল|রাত/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (\n (meridiem === 'রাত' && hour >= 4) ||\n (meridiem === 'দুপুর' && hour < 5) ||\n meridiem === 'বিকাল'\n ) {\n return hour + 12;\n } else {\n return hour;\n }\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 4) {\n return 'রাত';\n } else if (hour < 10) {\n return 'সকাল';\n } else if (hour < 17) {\n return 'দুপুর';\n } else if (hour < 20) {\n return 'বিকাল';\n } else {\n return 'রাত';\n }\n },\n week: {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n },\n });\n\n return bn;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/bn.js?", + ); + + /***/ + }, + + /***/ 1545: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Tibetan [bo]\n//! author : Thupten N. Chakrishar : https://github.com/vajradog\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var symbolMap = {\n 1: '༡',\n 2: '༢',\n 3: '༣',\n 4: '༤',\n 5: '༥',\n 6: '༦',\n 7: '༧',\n 8: '༨',\n 9: '༩',\n 0: '༠',\n },\n numberMap = {\n '༡': '1',\n '༢': '2',\n '༣': '3',\n '༤': '4',\n '༥': '5',\n '༦': '6',\n '༧': '7',\n '༨': '8',\n '༩': '9',\n '༠': '0',\n };\n\n var bo = moment.defineLocale('bo', {\n months: 'ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ'.split(\n '_'\n ),\n monthsShort:\n 'ཟླ་1_ཟླ་2_ཟླ་3_ཟླ་4_ཟླ་5_ཟླ་6_ཟླ་7_ཟླ་8_ཟླ་9_ཟླ་10_ཟླ་11_ཟླ་12'.split(\n '_'\n ),\n monthsShortRegex: /^(ཟླ་\\d{1,2})/,\n monthsParseExact: true,\n weekdays:\n 'གཟའ་ཉི་མ་_གཟའ་ཟླ་བ་_གཟའ་མིག་དམར་_གཟའ་ལྷག་པ་_གཟའ་ཕུར་བུ_གཟའ་པ་སངས་_གཟའ་སྤེན་པ་'.split(\n '_'\n ),\n weekdaysShort: 'ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་'.split(\n '_'\n ),\n weekdaysMin: 'ཉི_ཟླ_མིག_ལྷག_ཕུར_སངས_སྤེན'.split('_'),\n longDateFormat: {\n LT: 'A h:mm',\n LTS: 'A h:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, A h:mm',\n LLLL: 'dddd, D MMMM YYYY, A h:mm',\n },\n calendar: {\n sameDay: '[དི་རིང] LT',\n nextDay: '[སང་ཉིན] LT',\n nextWeek: '[བདུན་ཕྲག་རྗེས་མ], LT',\n lastDay: '[ཁ་སང] LT',\n lastWeek: '[བདུན་ཕྲག་མཐའ་མ] dddd, LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s ལ་',\n past: '%s སྔན་ལ',\n s: 'ལམ་སང',\n ss: '%d སྐར་ཆ།',\n m: 'སྐར་མ་གཅིག',\n mm: '%d སྐར་མ',\n h: 'ཆུ་ཚོད་གཅིག',\n hh: '%d ཆུ་ཚོད',\n d: 'ཉིན་གཅིག',\n dd: '%d ཉིན་',\n M: 'ཟླ་བ་གཅིག',\n MM: '%d ཟླ་བ',\n y: 'ལོ་གཅིག',\n yy: '%d ལོ',\n },\n preparse: function (string) {\n return string.replace(/[༡༢༣༤༥༦༧༨༩༠]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function (string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n meridiemParse: /མཚན་མོ|ཞོགས་ཀས|ཉིན་གུང|དགོང་དག|མཚན་མོ/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (\n (meridiem === 'མཚན་མོ' && hour >= 4) ||\n (meridiem === 'ཉིན་གུང' && hour < 5) ||\n meridiem === 'དགོང་དག'\n ) {\n return hour + 12;\n } else {\n return hour;\n }\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 4) {\n return 'མཚན་མོ';\n } else if (hour < 10) {\n return 'ཞོགས་ཀས';\n } else if (hour < 17) {\n return 'ཉིན་གུང';\n } else if (hour < 20) {\n return 'དགོང་དག';\n } else {\n return 'མཚན་མོ';\n }\n },\n week: {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n },\n });\n\n return bo;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/bo.js?", + ); + + /***/ + }, + + /***/ 1470: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Breton [br]\n//! author : Jean-Baptiste Le Duigou : https://github.com/jbleduigou\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function relativeTimeWithMutation(number, withoutSuffix, key) {\n var format = {\n mm: 'munutenn',\n MM: 'miz',\n dd: 'devezh',\n };\n return number + ' ' + mutation(format[key], number);\n }\n function specialMutationForYears(number) {\n switch (lastNumber(number)) {\n case 1:\n case 3:\n case 4:\n case 5:\n case 9:\n return number + ' bloaz';\n default:\n return number + ' vloaz';\n }\n }\n function lastNumber(number) {\n if (number > 9) {\n return lastNumber(number % 10);\n }\n return number;\n }\n function mutation(text, number) {\n if (number === 2) {\n return softMutation(text);\n }\n return text;\n }\n function softMutation(text) {\n var mutationTable = {\n m: 'v',\n b: 'v',\n d: 'z',\n };\n if (mutationTable[text.charAt(0)] === undefined) {\n return text;\n }\n return mutationTable[text.charAt(0)] + text.substring(1);\n }\n\n var monthsParse = [\n /^gen/i,\n /^c[ʼ\\']hwe/i,\n /^meu/i,\n /^ebr/i,\n /^mae/i,\n /^(mez|eve)/i,\n /^gou/i,\n /^eos/i,\n /^gwe/i,\n /^her/i,\n /^du/i,\n /^ker/i,\n ],\n monthsRegex =\n /^(genver|c[ʼ\\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu|gen|c[ʼ\\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,\n monthsStrictRegex =\n /^(genver|c[ʼ\\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu)/i,\n monthsShortStrictRegex =\n /^(gen|c[ʼ\\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,\n fullWeekdaysParse = [\n /^sul/i,\n /^lun/i,\n /^meurzh/i,\n /^merc[ʼ\\']her/i,\n /^yaou/i,\n /^gwener/i,\n /^sadorn/i,\n ],\n shortWeekdaysParse = [\n /^Sul/i,\n /^Lun/i,\n /^Meu/i,\n /^Mer/i,\n /^Yao/i,\n /^Gwe/i,\n /^Sad/i,\n ],\n minWeekdaysParse = [\n /^Su/i,\n /^Lu/i,\n /^Me([^r]|$)/i,\n /^Mer/i,\n /^Ya/i,\n /^Gw/i,\n /^Sa/i,\n ];\n\n var br = moment.defineLocale('br', {\n months: 'Genver_Cʼhwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu'.split(\n '_'\n ),\n monthsShort: 'Gen_Cʼhwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker'.split('_'),\n weekdays: 'Sul_Lun_Meurzh_Mercʼher_Yaou_Gwener_Sadorn'.split('_'),\n weekdaysShort: 'Sul_Lun_Meu_Mer_Yao_Gwe_Sad'.split('_'),\n weekdaysMin: 'Su_Lu_Me_Mer_Ya_Gw_Sa'.split('_'),\n weekdaysParse: minWeekdaysParse,\n fullWeekdaysParse: fullWeekdaysParse,\n shortWeekdaysParse: shortWeekdaysParse,\n minWeekdaysParse: minWeekdaysParse,\n\n monthsRegex: monthsRegex,\n monthsShortRegex: monthsRegex,\n monthsStrictRegex: monthsStrictRegex,\n monthsShortStrictRegex: monthsShortStrictRegex,\n monthsParse: monthsParse,\n longMonthsParse: monthsParse,\n shortMonthsParse: monthsParse,\n\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D [a viz] MMMM YYYY',\n LLL: 'D [a viz] MMMM YYYY HH:mm',\n LLLL: 'dddd, D [a viz] MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Hiziv da] LT',\n nextDay: '[Warcʼhoazh da] LT',\n nextWeek: 'dddd [da] LT',\n lastDay: '[Decʼh da] LT',\n lastWeek: 'dddd [paset da] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'a-benn %s',\n past: '%s ʼzo',\n s: 'un nebeud segondennoù',\n ss: '%d eilenn',\n m: 'ur vunutenn',\n mm: relativeTimeWithMutation,\n h: 'un eur',\n hh: '%d eur',\n d: 'un devezh',\n dd: relativeTimeWithMutation,\n M: 'ur miz',\n MM: relativeTimeWithMutation,\n y: 'ur bloaz',\n yy: specialMutationForYears,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(añ|vet)/,\n ordinal: function (number) {\n var output = number === 1 ? 'añ' : 'vet';\n return number + output;\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n meridiemParse: /a.m.|g.m./, // goude merenn | a-raok merenn\n isPM: function (token) {\n return token === 'g.m.';\n },\n meridiem: function (hour, minute, isLower) {\n return hour < 12 ? 'a.m.' : 'g.m.';\n },\n });\n\n return br;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/br.js?", + ); + + /***/ + }, + + /***/ 4429: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Bosnian [bs]\n//! author : Nedim Cholich : https://github.com/frontyard\n//! author : Rasid Redzic : https://github.com/rasidre\n//! based on (hr) translation by Bojan Marković\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function processRelativeTime(number, withoutSuffix, key, isFuture) {\n switch (key) {\n case 'm':\n return withoutSuffix\n ? 'jedna minuta'\n : isFuture\n ? 'jednu minutu'\n : 'jedne minute';\n }\n }\n\n function translate(number, withoutSuffix, key) {\n var result = number + ' ';\n switch (key) {\n case 'ss':\n if (number === 1) {\n result += 'sekunda';\n } else if (number === 2 || number === 3 || number === 4) {\n result += 'sekunde';\n } else {\n result += 'sekundi';\n }\n return result;\n case 'mm':\n if (number === 1) {\n result += 'minuta';\n } else if (number === 2 || number === 3 || number === 4) {\n result += 'minute';\n } else {\n result += 'minuta';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'jedan sat' : 'jedan sat';\n case 'hh':\n if (number === 1) {\n result += 'sat';\n } else if (number === 2 || number === 3 || number === 4) {\n result += 'sata';\n } else {\n result += 'sati';\n }\n return result;\n case 'dd':\n if (number === 1) {\n result += 'dan';\n } else {\n result += 'dana';\n }\n return result;\n case 'MM':\n if (number === 1) {\n result += 'mjesec';\n } else if (number === 2 || number === 3 || number === 4) {\n result += 'mjeseca';\n } else {\n result += 'mjeseci';\n }\n return result;\n case 'yy':\n if (number === 1) {\n result += 'godina';\n } else if (number === 2 || number === 3 || number === 4) {\n result += 'godine';\n } else {\n result += 'godina';\n }\n return result;\n }\n }\n\n var bs = moment.defineLocale('bs', {\n months: 'januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar'.split(\n '_'\n ),\n monthsShort:\n 'jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split(\n '_'\n ),\n weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),\n weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY H:mm',\n LLLL: 'dddd, D. MMMM YYYY H:mm',\n },\n calendar: {\n sameDay: '[danas u] LT',\n nextDay: '[sutra u] LT',\n nextWeek: function () {\n switch (this.day()) {\n case 0:\n return '[u] [nedjelju] [u] LT';\n case 3:\n return '[u] [srijedu] [u] LT';\n case 6:\n return '[u] [subotu] [u] LT';\n case 1:\n case 2:\n case 4:\n case 5:\n return '[u] dddd [u] LT';\n }\n },\n lastDay: '[jučer u] LT',\n lastWeek: function () {\n switch (this.day()) {\n case 0:\n case 3:\n return '[prošlu] dddd [u] LT';\n case 6:\n return '[prošle] [subote] [u] LT';\n case 1:\n case 2:\n case 4:\n case 5:\n return '[prošli] dddd [u] LT';\n }\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'za %s',\n past: 'prije %s',\n s: 'par sekundi',\n ss: translate,\n m: processRelativeTime,\n mm: translate,\n h: translate,\n hh: translate,\n d: 'dan',\n dd: translate,\n M: 'mjesec',\n MM: translate,\n y: 'godinu',\n yy: translate,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return bs;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/bs.js?", + ); + + /***/ + }, + + /***/ 7306: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Catalan [ca]\n//! author : Juan G. Hurtado : https://github.com/juanghurtado\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var ca = moment.defineLocale('ca', {\n months: {\n standalone:\n 'gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre'.split(\n '_'\n ),\n format: \"de gener_de febrer_de març_d'abril_de maig_de juny_de juliol_d'agost_de setembre_d'octubre_de novembre_de desembre\".split(\n '_'\n ),\n isFormat: /D[oD]?(\\s)+MMMM/,\n },\n monthsShort:\n 'gen._febr._març_abr._maig_juny_jul._ag._set._oct._nov._des.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays:\n 'diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte'.split(\n '_'\n ),\n weekdaysShort: 'dg._dl._dt._dc._dj._dv._ds.'.split('_'),\n weekdaysMin: 'dg_dl_dt_dc_dj_dv_ds'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM [de] YYYY',\n ll: 'D MMM YYYY',\n LLL: 'D MMMM [de] YYYY [a les] H:mm',\n lll: 'D MMM YYYY, H:mm',\n LLLL: 'dddd D MMMM [de] YYYY [a les] H:mm',\n llll: 'ddd D MMM YYYY, H:mm',\n },\n calendar: {\n sameDay: function () {\n return '[avui a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';\n },\n nextDay: function () {\n return '[demà a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';\n },\n nextWeek: function () {\n return 'dddd [a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';\n },\n lastDay: function () {\n return '[ahir a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';\n },\n lastWeek: function () {\n return (\n '[el] dddd [passat a ' +\n (this.hours() !== 1 ? 'les' : 'la') +\n '] LT'\n );\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: \"d'aquí %s\",\n past: 'fa %s',\n s: 'uns segons',\n ss: '%d segons',\n m: 'un minut',\n mm: '%d minuts',\n h: 'una hora',\n hh: '%d hores',\n d: 'un dia',\n dd: '%d dies',\n M: 'un mes',\n MM: '%d mesos',\n y: 'un any',\n yy: '%d anys',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(r|n|t|è|a)/,\n ordinal: function (number, period) {\n var output =\n number === 1\n ? 'r'\n : number === 2\n ? 'n'\n : number === 3\n ? 'r'\n : number === 4\n ? 't'\n : 'è';\n if (period === 'w' || period === 'W') {\n output = 'a';\n }\n return number + output;\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return ca;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/ca.js?", + ); + + /***/ + }, + + /***/ 6464: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Czech [cs]\n//! author : petrbela : https://github.com/petrbela\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var months = {\n standalone:\n 'leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec'.split(\n '_'\n ),\n format: 'ledna_února_března_dubna_května_června_července_srpna_září_října_listopadu_prosince'.split(\n '_'\n ),\n isFormat: /DD?[o.]?(\\[[^\\[\\]]*\\]|\\s)+MMMM/,\n },\n monthsShort = 'led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro'.split('_'),\n monthsParse = [\n /^led/i,\n /^úno/i,\n /^bře/i,\n /^dub/i,\n /^kvě/i,\n /^(čvn|červen$|června)/i,\n /^(čvc|červenec|července)/i,\n /^srp/i,\n /^zář/i,\n /^říj/i,\n /^lis/i,\n /^pro/i,\n ],\n // NOTE: 'červen' is substring of 'červenec'; therefore 'červenec' must precede 'červen' in the regex to be fully matched.\n // Otherwise parser matches '1. červenec' as '1. červen' + 'ec'.\n monthsRegex =\n /^(leden|únor|březen|duben|květen|červenec|července|červen|června|srpen|září|říjen|listopad|prosinec|led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i;\n\n function plural(n) {\n return n > 1 && n < 5 && ~~(n / 10) !== 1;\n }\n function translate(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's': // a few seconds / in a few seconds / a few seconds ago\n return withoutSuffix || isFuture ? 'pár sekund' : 'pár sekundami';\n case 'ss': // 9 seconds / in 9 seconds / 9 seconds ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'sekundy' : 'sekund');\n } else {\n return result + 'sekundami';\n }\n case 'm': // a minute / in a minute / a minute ago\n return withoutSuffix ? 'minuta' : isFuture ? 'minutu' : 'minutou';\n case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'minuty' : 'minut');\n } else {\n return result + 'minutami';\n }\n case 'h': // an hour / in an hour / an hour ago\n return withoutSuffix ? 'hodina' : isFuture ? 'hodinu' : 'hodinou';\n case 'hh': // 9 hours / in 9 hours / 9 hours ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'hodiny' : 'hodin');\n } else {\n return result + 'hodinami';\n }\n case 'd': // a day / in a day / a day ago\n return withoutSuffix || isFuture ? 'den' : 'dnem';\n case 'dd': // 9 days / in 9 days / 9 days ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'dny' : 'dní');\n } else {\n return result + 'dny';\n }\n case 'M': // a month / in a month / a month ago\n return withoutSuffix || isFuture ? 'měsíc' : 'měsícem';\n case 'MM': // 9 months / in 9 months / 9 months ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'měsíce' : 'měsíců');\n } else {\n return result + 'měsíci';\n }\n case 'y': // a year / in a year / a year ago\n return withoutSuffix || isFuture ? 'rok' : 'rokem';\n case 'yy': // 9 years / in 9 years / 9 years ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'roky' : 'let');\n } else {\n return result + 'lety';\n }\n }\n }\n\n var cs = moment.defineLocale('cs', {\n months: months,\n monthsShort: monthsShort,\n monthsRegex: monthsRegex,\n monthsShortRegex: monthsRegex,\n // NOTE: 'červen' is substring of 'červenec'; therefore 'červenec' must precede 'červen' in the regex to be fully matched.\n // Otherwise parser matches '1. červenec' as '1. červen' + 'ec'.\n monthsStrictRegex:\n /^(leden|ledna|února|únor|březen|března|duben|dubna|květen|května|červenec|července|červen|června|srpen|srpna|září|říjen|října|listopadu|listopad|prosinec|prosince)/i,\n monthsShortStrictRegex:\n /^(led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i,\n monthsParse: monthsParse,\n longMonthsParse: monthsParse,\n shortMonthsParse: monthsParse,\n weekdays: 'neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota'.split('_'),\n weekdaysShort: 'ne_po_út_st_čt_pá_so'.split('_'),\n weekdaysMin: 'ne_po_út_st_čt_pá_so'.split('_'),\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY H:mm',\n LLLL: 'dddd D. MMMM YYYY H:mm',\n l: 'D. M. YYYY',\n },\n calendar: {\n sameDay: '[dnes v] LT',\n nextDay: '[zítra v] LT',\n nextWeek: function () {\n switch (this.day()) {\n case 0:\n return '[v neděli v] LT';\n case 1:\n case 2:\n return '[v] dddd [v] LT';\n case 3:\n return '[ve středu v] LT';\n case 4:\n return '[ve čtvrtek v] LT';\n case 5:\n return '[v pátek v] LT';\n case 6:\n return '[v sobotu v] LT';\n }\n },\n lastDay: '[včera v] LT',\n lastWeek: function () {\n switch (this.day()) {\n case 0:\n return '[minulou neděli v] LT';\n case 1:\n case 2:\n return '[minulé] dddd [v] LT';\n case 3:\n return '[minulou středu v] LT';\n case 4:\n case 5:\n return '[minulý] dddd [v] LT';\n case 6:\n return '[minulou sobotu v] LT';\n }\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'za %s',\n past: 'před %s',\n s: translate,\n ss: translate,\n m: translate,\n mm: translate,\n h: translate,\n hh: translate,\n d: translate,\n dd: translate,\n M: translate,\n MM: translate,\n y: translate,\n yy: translate,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return cs;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/cs.js?", + ); + + /***/ + }, + + /***/ 3635: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Chuvash [cv]\n//! author : Anatoly Mironov : https://github.com/mirontoli\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var cv = moment.defineLocale('cv', {\n months: 'кӑрлач_нарӑс_пуш_ака_май_ҫӗртме_утӑ_ҫурла_авӑн_юпа_чӳк_раштав'.split(\n '_'\n ),\n monthsShort: 'кӑр_нар_пуш_ака_май_ҫӗр_утӑ_ҫур_авн_юпа_чӳк_раш'.split('_'),\n weekdays:\n 'вырсарникун_тунтикун_ытларикун_юнкун_кӗҫнерникун_эрнекун_шӑматкун'.split(\n '_'\n ),\n weekdaysShort: 'выр_тун_ытл_юн_кӗҫ_эрн_шӑм'.split('_'),\n weekdaysMin: 'вр_тн_ыт_юн_кҫ_эр_шм'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD-MM-YYYY',\n LL: 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ]',\n LLL: 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm',\n LLLL: 'dddd, YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm',\n },\n calendar: {\n sameDay: '[Паян] LT [сехетре]',\n nextDay: '[Ыран] LT [сехетре]',\n lastDay: '[Ӗнер] LT [сехетре]',\n nextWeek: '[Ҫитес] dddd LT [сехетре]',\n lastWeek: '[Иртнӗ] dddd LT [сехетре]',\n sameElse: 'L',\n },\n relativeTime: {\n future: function (output) {\n var affix = /сехет$/i.exec(output)\n ? 'рен'\n : /ҫул$/i.exec(output)\n ? 'тан'\n : 'ран';\n return output + affix;\n },\n past: '%s каялла',\n s: 'пӗр-ик ҫеккунт',\n ss: '%d ҫеккунт',\n m: 'пӗр минут',\n mm: '%d минут',\n h: 'пӗр сехет',\n hh: '%d сехет',\n d: 'пӗр кун',\n dd: '%d кун',\n M: 'пӗр уйӑх',\n MM: '%d уйӑх',\n y: 'пӗр ҫул',\n yy: '%d ҫул',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-мӗш/,\n ordinal: '%d-мӗш',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return cv;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/cv.js?", + ); + + /***/ + }, + + /***/ 4226: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Welsh [cy]\n//! author : Robert Allen : https://github.com/robgallen\n//! author : https://github.com/ryangreaves\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var cy = moment.defineLocale('cy', {\n months: 'Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr'.split(\n '_'\n ),\n monthsShort: 'Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag'.split(\n '_'\n ),\n weekdays:\n 'Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn'.split(\n '_'\n ),\n weekdaysShort: 'Sul_Llun_Maw_Mer_Iau_Gwe_Sad'.split('_'),\n weekdaysMin: 'Su_Ll_Ma_Me_Ia_Gw_Sa'.split('_'),\n weekdaysParseExact: true,\n // time formats are the same as en-gb\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Heddiw am] LT',\n nextDay: '[Yfory am] LT',\n nextWeek: 'dddd [am] LT',\n lastDay: '[Ddoe am] LT',\n lastWeek: 'dddd [diwethaf am] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'mewn %s',\n past: '%s yn ôl',\n s: 'ychydig eiliadau',\n ss: '%d eiliad',\n m: 'munud',\n mm: '%d munud',\n h: 'awr',\n hh: '%d awr',\n d: 'diwrnod',\n dd: '%d diwrnod',\n M: 'mis',\n MM: '%d mis',\n y: 'blwyddyn',\n yy: '%d flynedd',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(fed|ain|af|il|ydd|ed|eg)/,\n // traditional ordinal numbers above 31 are not commonly used in colloquial Welsh\n ordinal: function (number) {\n var b = number,\n output = '',\n lookup = [\n '',\n 'af',\n 'il',\n 'ydd',\n 'ydd',\n 'ed',\n 'ed',\n 'ed',\n 'fed',\n 'fed',\n 'fed', // 1af to 10fed\n 'eg',\n 'fed',\n 'eg',\n 'eg',\n 'fed',\n 'eg',\n 'eg',\n 'fed',\n 'eg',\n 'fed', // 11eg to 20fed\n ];\n if (b > 20) {\n if (b === 40 || b === 50 || b === 60 || b === 80 || b === 100) {\n output = 'fed'; // not 30ain, 70ain or 90ain\n } else {\n output = 'ain';\n }\n } else if (b > 0) {\n output = lookup[b];\n }\n return number + output;\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return cy;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/cy.js?", + ); + + /***/ + }, + + /***/ 3601: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Danish [da]\n//! author : Ulrik Nielsen : https://github.com/mrbase\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var da = moment.defineLocale('da', {\n months: 'januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december'.split(\n '_'\n ),\n monthsShort: 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'),\n weekdays: 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'),\n weekdaysShort: 'søn_man_tir_ons_tor_fre_lør'.split('_'),\n weekdaysMin: 'sø_ma_ti_on_to_fr_lø'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY HH:mm',\n LLLL: 'dddd [d.] D. MMMM YYYY [kl.] HH:mm',\n },\n calendar: {\n sameDay: '[i dag kl.] LT',\n nextDay: '[i morgen kl.] LT',\n nextWeek: 'på dddd [kl.] LT',\n lastDay: '[i går kl.] LT',\n lastWeek: '[i] dddd[s kl.] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'om %s',\n past: '%s siden',\n s: 'få sekunder',\n ss: '%d sekunder',\n m: 'et minut',\n mm: '%d minutter',\n h: 'en time',\n hh: '%d timer',\n d: 'en dag',\n dd: '%d dage',\n M: 'en måned',\n MM: '%d måneder',\n y: 'et år',\n yy: '%d år',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return da;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/da.js?", + ); + + /***/ + }, + + /***/ 6111: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : German (Austria) [de-at]\n//! author : lluchs : https://github.com/lluchs\n//! author: Menelion Elensúle: https://github.com/Oire\n//! author : Martin Groller : https://github.com/MadMG\n//! author : Mikolaj Dadela : https://github.com/mik01aj\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var format = {\n m: ['eine Minute', 'einer Minute'],\n h: ['eine Stunde', 'einer Stunde'],\n d: ['ein Tag', 'einem Tag'],\n dd: [number + ' Tage', number + ' Tagen'],\n w: ['eine Woche', 'einer Woche'],\n M: ['ein Monat', 'einem Monat'],\n MM: [number + ' Monate', number + ' Monaten'],\n y: ['ein Jahr', 'einem Jahr'],\n yy: [number + ' Jahre', number + ' Jahren'],\n };\n return withoutSuffix ? format[key][0] : format[key][1];\n }\n\n var deAt = moment.defineLocale('de-at', {\n months: 'Jänner_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split(\n '_'\n ),\n monthsShort:\n 'Jän._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'),\n monthsParseExact: true,\n weekdays:\n 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split(\n '_'\n ),\n weekdaysShort: 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'),\n weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY HH:mm',\n LLLL: 'dddd, D. MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[heute um] LT [Uhr]',\n sameElse: 'L',\n nextDay: '[morgen um] LT [Uhr]',\n nextWeek: 'dddd [um] LT [Uhr]',\n lastDay: '[gestern um] LT [Uhr]',\n lastWeek: '[letzten] dddd [um] LT [Uhr]',\n },\n relativeTime: {\n future: 'in %s',\n past: 'vor %s',\n s: 'ein paar Sekunden',\n ss: '%d Sekunden',\n m: processRelativeTime,\n mm: '%d Minuten',\n h: processRelativeTime,\n hh: '%d Stunden',\n d: processRelativeTime,\n dd: processRelativeTime,\n w: processRelativeTime,\n ww: '%d Wochen',\n M: processRelativeTime,\n MM: processRelativeTime,\n y: processRelativeTime,\n yy: processRelativeTime,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return deAt;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/de-at.js?", + ); + + /***/ + }, + + /***/ 4697: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : German (Switzerland) [de-ch]\n//! author : sschueller : https://github.com/sschueller\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var format = {\n m: ['eine Minute', 'einer Minute'],\n h: ['eine Stunde', 'einer Stunde'],\n d: ['ein Tag', 'einem Tag'],\n dd: [number + ' Tage', number + ' Tagen'],\n w: ['eine Woche', 'einer Woche'],\n M: ['ein Monat', 'einem Monat'],\n MM: [number + ' Monate', number + ' Monaten'],\n y: ['ein Jahr', 'einem Jahr'],\n yy: [number + ' Jahre', number + ' Jahren'],\n };\n return withoutSuffix ? format[key][0] : format[key][1];\n }\n\n var deCh = moment.defineLocale('de-ch', {\n months: 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split(\n '_'\n ),\n monthsShort:\n 'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'),\n monthsParseExact: true,\n weekdays:\n 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split(\n '_'\n ),\n weekdaysShort: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),\n weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY HH:mm',\n LLLL: 'dddd, D. MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[heute um] LT [Uhr]',\n sameElse: 'L',\n nextDay: '[morgen um] LT [Uhr]',\n nextWeek: 'dddd [um] LT [Uhr]',\n lastDay: '[gestern um] LT [Uhr]',\n lastWeek: '[letzten] dddd [um] LT [Uhr]',\n },\n relativeTime: {\n future: 'in %s',\n past: 'vor %s',\n s: 'ein paar Sekunden',\n ss: '%d Sekunden',\n m: processRelativeTime,\n mm: '%d Minuten',\n h: processRelativeTime,\n hh: '%d Stunden',\n d: processRelativeTime,\n dd: processRelativeTime,\n w: processRelativeTime,\n ww: '%d Wochen',\n M: processRelativeTime,\n MM: processRelativeTime,\n y: processRelativeTime,\n yy: processRelativeTime,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return deCh;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/de-ch.js?", + ); + + /***/ + }, + + /***/ 7853: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : German [de]\n//! author : lluchs : https://github.com/lluchs\n//! author: Menelion Elensúle: https://github.com/Oire\n//! author : Mikolaj Dadela : https://github.com/mik01aj\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var format = {\n m: ['eine Minute', 'einer Minute'],\n h: ['eine Stunde', 'einer Stunde'],\n d: ['ein Tag', 'einem Tag'],\n dd: [number + ' Tage', number + ' Tagen'],\n w: ['eine Woche', 'einer Woche'],\n M: ['ein Monat', 'einem Monat'],\n MM: [number + ' Monate', number + ' Monaten'],\n y: ['ein Jahr', 'einem Jahr'],\n yy: [number + ' Jahre', number + ' Jahren'],\n };\n return withoutSuffix ? format[key][0] : format[key][1];\n }\n\n var de = moment.defineLocale('de', {\n months: 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split(\n '_'\n ),\n monthsShort:\n 'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'),\n monthsParseExact: true,\n weekdays:\n 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split(\n '_'\n ),\n weekdaysShort: 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'),\n weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY HH:mm',\n LLLL: 'dddd, D. MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[heute um] LT [Uhr]',\n sameElse: 'L',\n nextDay: '[morgen um] LT [Uhr]',\n nextWeek: 'dddd [um] LT [Uhr]',\n lastDay: '[gestern um] LT [Uhr]',\n lastWeek: '[letzten] dddd [um] LT [Uhr]',\n },\n relativeTime: {\n future: 'in %s',\n past: 'vor %s',\n s: 'ein paar Sekunden',\n ss: '%d Sekunden',\n m: processRelativeTime,\n mm: '%d Minuten',\n h: processRelativeTime,\n hh: '%d Stunden',\n d: processRelativeTime,\n dd: processRelativeTime,\n w: processRelativeTime,\n ww: '%d Wochen',\n M: processRelativeTime,\n MM: processRelativeTime,\n y: processRelativeTime,\n yy: processRelativeTime,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return de;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/de.js?", + ); + + /***/ + }, + + /***/ 708: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Maldivian [dv]\n//! author : Jawish Hameed : https://github.com/jawish\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var months = [\n 'ޖެނުއަރީ',\n 'ފެބްރުއަރީ',\n 'މާރިޗު',\n 'އޭޕްރީލު',\n 'މޭ',\n 'ޖޫން',\n 'ޖުލައި',\n 'އޯގަސްޓު',\n 'ސެޕްޓެމްބަރު',\n 'އޮކްޓޯބަރު',\n 'ނޮވެމްބަރު',\n 'ޑިސެމްބަރު',\n ],\n weekdays = [\n 'އާދިއްތަ',\n 'ހޯމަ',\n 'އަންގާރަ',\n 'ބުދަ',\n 'ބުރާސްފަތި',\n 'ހުކުރު',\n 'ހޮނިހިރު',\n ];\n\n var dv = moment.defineLocale('dv', {\n months: months,\n monthsShort: months,\n weekdays: weekdays,\n weekdaysShort: weekdays,\n weekdaysMin: 'އާދި_ހޯމަ_އަން_ބުދަ_ބުރާ_ހުކު_ހޮނި'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'D/M/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n meridiemParse: /މކ|މފ/,\n isPM: function (input) {\n return 'މފ' === input;\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 12) {\n return 'މކ';\n } else {\n return 'މފ';\n }\n },\n calendar: {\n sameDay: '[މިއަދު] LT',\n nextDay: '[މާދަމާ] LT',\n nextWeek: 'dddd LT',\n lastDay: '[އިއްޔެ] LT',\n lastWeek: '[ފާއިތުވި] dddd LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'ތެރޭގައި %s',\n past: 'ކުރިން %s',\n s: 'ސިކުންތުކޮޅެއް',\n ss: 'd% ސިކުންތު',\n m: 'މިނިޓެއް',\n mm: 'މިނިޓު %d',\n h: 'ގަޑިއިރެއް',\n hh: 'ގަޑިއިރު %d',\n d: 'ދުވަހެއް',\n dd: 'ދުވަސް %d',\n M: 'މަހެއް',\n MM: 'މަސް %d',\n y: 'އަހަރެއް',\n yy: 'އަހަރު %d',\n },\n preparse: function (string) {\n return string.replace(/،/g, ',');\n },\n postformat: function (string) {\n return string.replace(/,/g, '،');\n },\n week: {\n dow: 7, // Sunday is the first day of the week.\n doy: 12, // The week that contains Jan 12th is the first week of the year.\n },\n });\n\n return dv;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/dv.js?", + ); + + /***/ + }, + + /***/ 4691: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Greek [el]\n//! author : Aggelos Karalias : https://github.com/mehiel\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function isFunction(input) {\n return (\n (typeof Function !== 'undefined' && input instanceof Function) ||\n Object.prototype.toString.call(input) === '[object Function]'\n );\n }\n\n var el = moment.defineLocale('el', {\n monthsNominativeEl:\n 'Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος'.split(\n '_'\n ),\n monthsGenitiveEl:\n 'Ιανουαρίου_Φεβρουαρίου_Μαρτίου_Απριλίου_Μαΐου_Ιουνίου_Ιουλίου_Αυγούστου_Σεπτεμβρίου_Οκτωβρίου_Νοεμβρίου_Δεκεμβρίου'.split(\n '_'\n ),\n months: function (momentToFormat, format) {\n if (!momentToFormat) {\n return this._monthsNominativeEl;\n } else if (\n typeof format === 'string' &&\n /D/.test(format.substring(0, format.indexOf('MMMM')))\n ) {\n // if there is a day number before 'MMMM'\n return this._monthsGenitiveEl[momentToFormat.month()];\n } else {\n return this._monthsNominativeEl[momentToFormat.month()];\n }\n },\n monthsShort: 'Ιαν_Φεβ_Μαρ_Απρ_Μαϊ_Ιουν_Ιουλ_Αυγ_Σεπ_Οκτ_Νοε_Δεκ'.split('_'),\n weekdays: 'Κυριακή_Δευτέρα_Τρίτη_Τετάρτη_Πέμπτη_Παρασκευή_Σάββατο'.split(\n '_'\n ),\n weekdaysShort: 'Κυρ_Δευ_Τρι_Τετ_Πεμ_Παρ_Σαβ'.split('_'),\n weekdaysMin: 'Κυ_Δε_Τρ_Τε_Πε_Πα_Σα'.split('_'),\n meridiem: function (hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'μμ' : 'ΜΜ';\n } else {\n return isLower ? 'πμ' : 'ΠΜ';\n }\n },\n isPM: function (input) {\n return (input + '').toLowerCase()[0] === 'μ';\n },\n meridiemParse: /[ΠΜ]\\.?Μ?\\.?/i,\n longDateFormat: {\n LT: 'h:mm A',\n LTS: 'h:mm:ss A',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY h:mm A',\n LLLL: 'dddd, D MMMM YYYY h:mm A',\n },\n calendarEl: {\n sameDay: '[Σήμερα {}] LT',\n nextDay: '[Αύριο {}] LT',\n nextWeek: 'dddd [{}] LT',\n lastDay: '[Χθες {}] LT',\n lastWeek: function () {\n switch (this.day()) {\n case 6:\n return '[το προηγούμενο] dddd [{}] LT';\n default:\n return '[την προηγούμενη] dddd [{}] LT';\n }\n },\n sameElse: 'L',\n },\n calendar: function (key, mom) {\n var output = this._calendarEl[key],\n hours = mom && mom.hours();\n if (isFunction(output)) {\n output = output.apply(mom);\n }\n return output.replace('{}', hours % 12 === 1 ? 'στη' : 'στις');\n },\n relativeTime: {\n future: 'σε %s',\n past: '%s πριν',\n s: 'λίγα δευτερόλεπτα',\n ss: '%d δευτερόλεπτα',\n m: 'ένα λεπτό',\n mm: '%d λεπτά',\n h: 'μία ώρα',\n hh: '%d ώρες',\n d: 'μία μέρα',\n dd: '%d μέρες',\n M: 'ένας μήνας',\n MM: '%d μήνες',\n y: 'ένας χρόνος',\n yy: '%d χρόνια',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}η/,\n ordinal: '%dη',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4st is the first week of the year.\n },\n });\n\n return el;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/el.js?", + ); + + /***/ + }, + + /***/ 3872: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : English (Australia) [en-au]\n//! author : Jared Morse : https://github.com/jarcoal\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var enAu = moment.defineLocale('en-au', {\n months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n '_'\n ),\n monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(\n '_'\n ),\n weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n longDateFormat: {\n LT: 'h:mm A',\n LTS: 'h:mm:ss A',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY h:mm A',\n LLLL: 'dddd, D MMMM YYYY h:mm A',\n },\n calendar: {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n ~~((number % 100) / 10) === 1\n ? 'th'\n : b === 1\n ? 'st'\n : b === 2\n ? 'nd'\n : b === 3\n ? 'rd'\n : 'th';\n return number + output;\n },\n week: {\n dow: 0, // Sunday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return enAu;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/en-au.js?", + ); + + /***/ + }, + + /***/ 8298: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : English (Canada) [en-ca]\n//! author : Jonathan Abourbih : https://github.com/jonbca\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var enCa = moment.defineLocale('en-ca', {\n months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n '_'\n ),\n monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(\n '_'\n ),\n weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n longDateFormat: {\n LT: 'h:mm A',\n LTS: 'h:mm:ss A',\n L: 'YYYY-MM-DD',\n LL: 'MMMM D, YYYY',\n LLL: 'MMMM D, YYYY h:mm A',\n LLLL: 'dddd, MMMM D, YYYY h:mm A',\n },\n calendar: {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n ~~((number % 100) / 10) === 1\n ? 'th'\n : b === 1\n ? 'st'\n : b === 2\n ? 'nd'\n : b === 3\n ? 'rd'\n : 'th';\n return number + output;\n },\n });\n\n return enCa;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/en-ca.js?", + ); + + /***/ + }, + + /***/ 6195: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : English (United Kingdom) [en-gb]\n//! author : Chris Gedrim : https://github.com/chrisgedrim\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var enGb = moment.defineLocale('en-gb', {\n months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n '_'\n ),\n monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(\n '_'\n ),\n weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n ~~((number % 100) / 10) === 1\n ? 'th'\n : b === 1\n ? 'st'\n : b === 2\n ? 'nd'\n : b === 3\n ? 'rd'\n : 'th';\n return number + output;\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return enGb;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/en-gb.js?", + ); + + /***/ + }, + + /***/ 6584: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : English (Ireland) [en-ie]\n//! author : Chris Cartlidge : https://github.com/chriscartlidge\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var enIe = moment.defineLocale('en-ie', {\n months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n '_'\n ),\n monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(\n '_'\n ),\n weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n ~~((number % 100) / 10) === 1\n ? 'th'\n : b === 1\n ? 'st'\n : b === 2\n ? 'nd'\n : b === 3\n ? 'rd'\n : 'th';\n return number + output;\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return enIe;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/en-ie.js?", + ); + + /***/ + }, + + /***/ 5543: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : English (Israel) [en-il]\n//! author : Chris Gedrim : https://github.com/chrisgedrim\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var enIl = moment.defineLocale('en-il', {\n months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n '_'\n ),\n monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(\n '_'\n ),\n weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n ~~((number % 100) / 10) === 1\n ? 'th'\n : b === 1\n ? 'st'\n : b === 2\n ? 'nd'\n : b === 3\n ? 'rd'\n : 'th';\n return number + output;\n },\n });\n\n return enIl;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/en-il.js?", + ); + + /***/ + }, + + /***/ 9033: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : English (India) [en-in]\n//! author : Jatin Agrawal : https://github.com/jatinag22\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var enIn = moment.defineLocale('en-in', {\n months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n '_'\n ),\n monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(\n '_'\n ),\n weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n longDateFormat: {\n LT: 'h:mm A',\n LTS: 'h:mm:ss A',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY h:mm A',\n LLLL: 'dddd, D MMMM YYYY h:mm A',\n },\n calendar: {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n ~~((number % 100) / 10) === 1\n ? 'th'\n : b === 1\n ? 'st'\n : b === 2\n ? 'nd'\n : b === 3\n ? 'rd'\n : 'th';\n return number + output;\n },\n week: {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 1st is the first week of the year.\n },\n });\n\n return enIn;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/en-in.js?", + ); + + /***/ + }, + + /***/ 9402: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : English (New Zealand) [en-nz]\n//! author : Luke McGregor : https://github.com/lukemcgregor\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var enNz = moment.defineLocale('en-nz', {\n months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n '_'\n ),\n monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(\n '_'\n ),\n weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n longDateFormat: {\n LT: 'h:mm A',\n LTS: 'h:mm:ss A',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY h:mm A',\n LLLL: 'dddd, D MMMM YYYY h:mm A',\n },\n calendar: {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n ~~((number % 100) / 10) === 1\n ? 'th'\n : b === 1\n ? 'st'\n : b === 2\n ? 'nd'\n : b === 3\n ? 'rd'\n : 'th';\n return number + output;\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return enNz;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/en-nz.js?", + ); + + /***/ + }, + + /***/ 3004: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : English (Singapore) [en-sg]\n//! author : Matthew Castrillon-Madrigal : https://github.com/techdimension\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var enSg = moment.defineLocale('en-sg', {\n months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n '_'\n ),\n monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(\n '_'\n ),\n weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n ~~((number % 100) / 10) === 1\n ? 'th'\n : b === 1\n ? 'st'\n : b === 2\n ? 'nd'\n : b === 3\n ? 'rd'\n : 'th';\n return number + output;\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return enSg;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/en-sg.js?", + ); + + /***/ + }, + + /***/ 2934: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Esperanto [eo]\n//! author : Colin Dean : https://github.com/colindean\n//! author : Mia Nordentoft Imperatori : https://github.com/miestasmia\n//! comment : miestasmia corrected the translation by colindean\n//! comment : Vivakvo corrected the translation by colindean and miestasmia\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var eo = moment.defineLocale('eo', {\n months: 'januaro_februaro_marto_aprilo_majo_junio_julio_aŭgusto_septembro_oktobro_novembro_decembro'.split(\n '_'\n ),\n monthsShort: 'jan_feb_mart_apr_maj_jun_jul_aŭg_sept_okt_nov_dec'.split('_'),\n weekdays: 'dimanĉo_lundo_mardo_merkredo_ĵaŭdo_vendredo_sabato'.split('_'),\n weekdaysShort: 'dim_lun_mard_merk_ĵaŭ_ven_sab'.split('_'),\n weekdaysMin: 'di_lu_ma_me_ĵa_ve_sa'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'YYYY-MM-DD',\n LL: '[la] D[-an de] MMMM, YYYY',\n LLL: '[la] D[-an de] MMMM, YYYY HH:mm',\n LLLL: 'dddd[n], [la] D[-an de] MMMM, YYYY HH:mm',\n llll: 'ddd, [la] D[-an de] MMM, YYYY HH:mm',\n },\n meridiemParse: /[ap]\\.t\\.m/i,\n isPM: function (input) {\n return input.charAt(0).toLowerCase() === 'p';\n },\n meridiem: function (hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'p.t.m.' : 'P.T.M.';\n } else {\n return isLower ? 'a.t.m.' : 'A.T.M.';\n }\n },\n calendar: {\n sameDay: '[Hodiaŭ je] LT',\n nextDay: '[Morgaŭ je] LT',\n nextWeek: 'dddd[n je] LT',\n lastDay: '[Hieraŭ je] LT',\n lastWeek: '[pasintan] dddd[n je] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'post %s',\n past: 'antaŭ %s',\n s: 'kelkaj sekundoj',\n ss: '%d sekundoj',\n m: 'unu minuto',\n mm: '%d minutoj',\n h: 'unu horo',\n hh: '%d horoj',\n d: 'unu tago', //ne 'diurno', ĉar estas uzita por proksimumo\n dd: '%d tagoj',\n M: 'unu monato',\n MM: '%d monatoj',\n y: 'unu jaro',\n yy: '%d jaroj',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}a/,\n ordinal: '%da',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return eo;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/eo.js?", + ); + + /***/ + }, + + /***/ 838: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Spanish (Dominican Republic) [es-do]\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var monthsShortDot =\n 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split(\n '_'\n ),\n monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),\n monthsParse = [\n /^ene/i,\n /^feb/i,\n /^mar/i,\n /^abr/i,\n /^may/i,\n /^jun/i,\n /^jul/i,\n /^ago/i,\n /^sep/i,\n /^oct/i,\n /^nov/i,\n /^dic/i,\n ],\n monthsRegex =\n /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i;\n\n var esDo = moment.defineLocale('es-do', {\n months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split(\n '_'\n ),\n monthsShort: function (m, format) {\n if (!m) {\n return monthsShortDot;\n } else if (/-MMM-/.test(format)) {\n return monthsShort[m.month()];\n } else {\n return monthsShortDot[m.month()];\n }\n },\n monthsRegex: monthsRegex,\n monthsShortRegex: monthsRegex,\n monthsStrictRegex:\n /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,\n monthsShortStrictRegex:\n /^(ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i,\n monthsParse: monthsParse,\n longMonthsParse: monthsParse,\n shortMonthsParse: monthsParse,\n weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),\n weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),\n weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'h:mm A',\n LTS: 'h:mm:ss A',\n L: 'DD/MM/YYYY',\n LL: 'D [de] MMMM [de] YYYY',\n LLL: 'D [de] MMMM [de] YYYY h:mm A',\n LLLL: 'dddd, D [de] MMMM [de] YYYY h:mm A',\n },\n calendar: {\n sameDay: function () {\n return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n nextDay: function () {\n return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n nextWeek: function () {\n return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n lastDay: function () {\n return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n lastWeek: function () {\n return (\n '[el] dddd [pasado a la' +\n (this.hours() !== 1 ? 's' : '') +\n '] LT'\n );\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'en %s',\n past: 'hace %s',\n s: 'unos segundos',\n ss: '%d segundos',\n m: 'un minuto',\n mm: '%d minutos',\n h: 'una hora',\n hh: '%d horas',\n d: 'un día',\n dd: '%d días',\n w: 'una semana',\n ww: '%d semanas',\n M: 'un mes',\n MM: '%d meses',\n y: 'un año',\n yy: '%d años',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal: '%dº',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return esDo;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/es-do.js?", + ); + + /***/ + }, + + /***/ 7730: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Spanish (Mexico) [es-mx]\n//! author : JC Franco : https://github.com/jcfranco\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var monthsShortDot =\n 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split(\n '_'\n ),\n monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),\n monthsParse = [\n /^ene/i,\n /^feb/i,\n /^mar/i,\n /^abr/i,\n /^may/i,\n /^jun/i,\n /^jul/i,\n /^ago/i,\n /^sep/i,\n /^oct/i,\n /^nov/i,\n /^dic/i,\n ],\n monthsRegex =\n /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i;\n\n var esMx = moment.defineLocale('es-mx', {\n months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split(\n '_'\n ),\n monthsShort: function (m, format) {\n if (!m) {\n return monthsShortDot;\n } else if (/-MMM-/.test(format)) {\n return monthsShort[m.month()];\n } else {\n return monthsShortDot[m.month()];\n }\n },\n monthsRegex: monthsRegex,\n monthsShortRegex: monthsRegex,\n monthsStrictRegex:\n /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,\n monthsShortStrictRegex:\n /^(ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i,\n monthsParse: monthsParse,\n longMonthsParse: monthsParse,\n shortMonthsParse: monthsParse,\n weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),\n weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),\n weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D [de] MMMM [de] YYYY',\n LLL: 'D [de] MMMM [de] YYYY H:mm',\n LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm',\n },\n calendar: {\n sameDay: function () {\n return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n nextDay: function () {\n return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n nextWeek: function () {\n return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n lastDay: function () {\n return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n lastWeek: function () {\n return (\n '[el] dddd [pasado a la' +\n (this.hours() !== 1 ? 's' : '') +\n '] LT'\n );\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'en %s',\n past: 'hace %s',\n s: 'unos segundos',\n ss: '%d segundos',\n m: 'un minuto',\n mm: '%d minutos',\n h: 'una hora',\n hh: '%d horas',\n d: 'un día',\n dd: '%d días',\n w: 'una semana',\n ww: '%d semanas',\n M: 'un mes',\n MM: '%d meses',\n y: 'un año',\n yy: '%d años',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal: '%dº',\n week: {\n dow: 0, // Sunday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n invalidDate: 'Fecha inválida',\n });\n\n return esMx;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/es-mx.js?", + ); + + /***/ + }, + + /***/ 6575: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Spanish (United States) [es-us]\n//! author : bustta : https://github.com/bustta\n//! author : chrisrodz : https://github.com/chrisrodz\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var monthsShortDot =\n 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split(\n '_'\n ),\n monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),\n monthsParse = [\n /^ene/i,\n /^feb/i,\n /^mar/i,\n /^abr/i,\n /^may/i,\n /^jun/i,\n /^jul/i,\n /^ago/i,\n /^sep/i,\n /^oct/i,\n /^nov/i,\n /^dic/i,\n ],\n monthsRegex =\n /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i;\n\n var esUs = moment.defineLocale('es-us', {\n months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split(\n '_'\n ),\n monthsShort: function (m, format) {\n if (!m) {\n return monthsShortDot;\n } else if (/-MMM-/.test(format)) {\n return monthsShort[m.month()];\n } else {\n return monthsShortDot[m.month()];\n }\n },\n monthsRegex: monthsRegex,\n monthsShortRegex: monthsRegex,\n monthsStrictRegex:\n /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,\n monthsShortStrictRegex:\n /^(ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i,\n monthsParse: monthsParse,\n longMonthsParse: monthsParse,\n shortMonthsParse: monthsParse,\n weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),\n weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),\n weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'h:mm A',\n LTS: 'h:mm:ss A',\n L: 'MM/DD/YYYY',\n LL: 'D [de] MMMM [de] YYYY',\n LLL: 'D [de] MMMM [de] YYYY h:mm A',\n LLLL: 'dddd, D [de] MMMM [de] YYYY h:mm A',\n },\n calendar: {\n sameDay: function () {\n return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n nextDay: function () {\n return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n nextWeek: function () {\n return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n lastDay: function () {\n return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n lastWeek: function () {\n return (\n '[el] dddd [pasado a la' +\n (this.hours() !== 1 ? 's' : '') +\n '] LT'\n );\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'en %s',\n past: 'hace %s',\n s: 'unos segundos',\n ss: '%d segundos',\n m: 'un minuto',\n mm: '%d minutos',\n h: 'una hora',\n hh: '%d horas',\n d: 'un día',\n dd: '%d días',\n w: 'una semana',\n ww: '%d semanas',\n M: 'un mes',\n MM: '%d meses',\n y: 'un año',\n yy: '%d años',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal: '%dº',\n week: {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n },\n });\n\n return esUs;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/es-us.js?", + ); + + /***/ + }, + + /***/ 7650: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Spanish [es]\n//! author : Julio Napurí : https://github.com/julionc\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var monthsShortDot =\n 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split(\n '_'\n ),\n monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),\n monthsParse = [\n /^ene/i,\n /^feb/i,\n /^mar/i,\n /^abr/i,\n /^may/i,\n /^jun/i,\n /^jul/i,\n /^ago/i,\n /^sep/i,\n /^oct/i,\n /^nov/i,\n /^dic/i,\n ],\n monthsRegex =\n /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i;\n\n var es = moment.defineLocale('es', {\n months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split(\n '_'\n ),\n monthsShort: function (m, format) {\n if (!m) {\n return monthsShortDot;\n } else if (/-MMM-/.test(format)) {\n return monthsShort[m.month()];\n } else {\n return monthsShortDot[m.month()];\n }\n },\n monthsRegex: monthsRegex,\n monthsShortRegex: monthsRegex,\n monthsStrictRegex:\n /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,\n monthsShortStrictRegex:\n /^(ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i,\n monthsParse: monthsParse,\n longMonthsParse: monthsParse,\n shortMonthsParse: monthsParse,\n weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),\n weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),\n weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D [de] MMMM [de] YYYY',\n LLL: 'D [de] MMMM [de] YYYY H:mm',\n LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm',\n },\n calendar: {\n sameDay: function () {\n return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n nextDay: function () {\n return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n nextWeek: function () {\n return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n lastDay: function () {\n return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n lastWeek: function () {\n return (\n '[el] dddd [pasado a la' +\n (this.hours() !== 1 ? 's' : '') +\n '] LT'\n );\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'en %s',\n past: 'hace %s',\n s: 'unos segundos',\n ss: '%d segundos',\n m: 'un minuto',\n mm: '%d minutos',\n h: 'una hora',\n hh: '%d horas',\n d: 'un día',\n dd: '%d días',\n w: 'una semana',\n ww: '%d semanas',\n M: 'un mes',\n MM: '%d meses',\n y: 'un año',\n yy: '%d años',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal: '%dº',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n invalidDate: 'Fecha inválida',\n });\n\n return es;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/es.js?", + ); + + /***/ + }, + + /***/ 3035: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Estonian [et]\n//! author : Henry Kehlmann : https://github.com/madhenry\n//! improvements : Illimar Tambek : https://github.com/ragulka\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var format = {\n s: ['mõne sekundi', 'mõni sekund', 'paar sekundit'],\n ss: [number + 'sekundi', number + 'sekundit'],\n m: ['ühe minuti', 'üks minut'],\n mm: [number + ' minuti', number + ' minutit'],\n h: ['ühe tunni', 'tund aega', 'üks tund'],\n hh: [number + ' tunni', number + ' tundi'],\n d: ['ühe päeva', 'üks päev'],\n M: ['kuu aja', 'kuu aega', 'üks kuu'],\n MM: [number + ' kuu', number + ' kuud'],\n y: ['ühe aasta', 'aasta', 'üks aasta'],\n yy: [number + ' aasta', number + ' aastat'],\n };\n if (withoutSuffix) {\n return format[key][2] ? format[key][2] : format[key][1];\n }\n return isFuture ? format[key][0] : format[key][1];\n }\n\n var et = moment.defineLocale('et', {\n months: 'jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember'.split(\n '_'\n ),\n monthsShort:\n 'jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets'.split('_'),\n weekdays:\n 'pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev'.split(\n '_'\n ),\n weekdaysShort: 'P_E_T_K_N_R_L'.split('_'),\n weekdaysMin: 'P_E_T_K_N_R_L'.split('_'),\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY H:mm',\n LLLL: 'dddd, D. MMMM YYYY H:mm',\n },\n calendar: {\n sameDay: '[Täna,] LT',\n nextDay: '[Homme,] LT',\n nextWeek: '[Järgmine] dddd LT',\n lastDay: '[Eile,] LT',\n lastWeek: '[Eelmine] dddd LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s pärast',\n past: '%s tagasi',\n s: processRelativeTime,\n ss: processRelativeTime,\n m: processRelativeTime,\n mm: processRelativeTime,\n h: processRelativeTime,\n hh: processRelativeTime,\n d: processRelativeTime,\n dd: '%d päeva',\n M: processRelativeTime,\n MM: processRelativeTime,\n y: processRelativeTime,\n yy: processRelativeTime,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return et;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/et.js?", + ); + + /***/ + }, + + /***/ 3508: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Basque [eu]\n//! author : Eneko Illarramendi : https://github.com/eillarra\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var eu = moment.defineLocale('eu', {\n months: 'urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua'.split(\n '_'\n ),\n monthsShort:\n 'urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays:\n 'igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata'.split(\n '_'\n ),\n weekdaysShort: 'ig._al._ar._az._og._ol._lr.'.split('_'),\n weekdaysMin: 'ig_al_ar_az_og_ol_lr'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'YYYY-MM-DD',\n LL: 'YYYY[ko] MMMM[ren] D[a]',\n LLL: 'YYYY[ko] MMMM[ren] D[a] HH:mm',\n LLLL: 'dddd, YYYY[ko] MMMM[ren] D[a] HH:mm',\n l: 'YYYY-M-D',\n ll: 'YYYY[ko] MMM D[a]',\n lll: 'YYYY[ko] MMM D[a] HH:mm',\n llll: 'ddd, YYYY[ko] MMM D[a] HH:mm',\n },\n calendar: {\n sameDay: '[gaur] LT[etan]',\n nextDay: '[bihar] LT[etan]',\n nextWeek: 'dddd LT[etan]',\n lastDay: '[atzo] LT[etan]',\n lastWeek: '[aurreko] dddd LT[etan]',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s barru',\n past: 'duela %s',\n s: 'segundo batzuk',\n ss: '%d segundo',\n m: 'minutu bat',\n mm: '%d minutu',\n h: 'ordu bat',\n hh: '%d ordu',\n d: 'egun bat',\n dd: '%d egun',\n M: 'hilabete bat',\n MM: '%d hilabete',\n y: 'urte bat',\n yy: '%d urte',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return eu;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/eu.js?", + ); + + /***/ + }, + + /***/ 119: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Persian [fa]\n//! author : Ebrahim Byagowi : https://github.com/ebraminio\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var symbolMap = {\n 1: '۱',\n 2: '۲',\n 3: '۳',\n 4: '۴',\n 5: '۵',\n 6: '۶',\n 7: '۷',\n 8: '۸',\n 9: '۹',\n 0: '۰',\n },\n numberMap = {\n '۱': '1',\n '۲': '2',\n '۳': '3',\n '۴': '4',\n '۵': '5',\n '۶': '6',\n '۷': '7',\n '۸': '8',\n '۹': '9',\n '۰': '0',\n };\n\n var fa = moment.defineLocale('fa', {\n months: 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split(\n '_'\n ),\n monthsShort:\n 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split(\n '_'\n ),\n weekdays:\n 'یک\\u200cشنبه_دوشنبه_سه\\u200cشنبه_چهارشنبه_پنج\\u200cشنبه_جمعه_شنبه'.split(\n '_'\n ),\n weekdaysShort:\n 'یک\\u200cشنبه_دوشنبه_سه\\u200cشنبه_چهارشنبه_پنج\\u200cشنبه_جمعه_شنبه'.split(\n '_'\n ),\n weekdaysMin: 'ی_د_س_چ_پ_ج_ش'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n meridiemParse: /قبل از ظهر|بعد از ظهر/,\n isPM: function (input) {\n return /بعد از ظهر/.test(input);\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 12) {\n return 'قبل از ظهر';\n } else {\n return 'بعد از ظهر';\n }\n },\n calendar: {\n sameDay: '[امروز ساعت] LT',\n nextDay: '[فردا ساعت] LT',\n nextWeek: 'dddd [ساعت] LT',\n lastDay: '[دیروز ساعت] LT',\n lastWeek: 'dddd [پیش] [ساعت] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'در %s',\n past: '%s پیش',\n s: 'چند ثانیه',\n ss: '%d ثانیه',\n m: 'یک دقیقه',\n mm: '%d دقیقه',\n h: 'یک ساعت',\n hh: '%d ساعت',\n d: 'یک روز',\n dd: '%d روز',\n M: 'یک ماه',\n MM: '%d ماه',\n y: 'یک سال',\n yy: '%d سال',\n },\n preparse: function (string) {\n return string\n .replace(/[۰-۹]/g, function (match) {\n return numberMap[match];\n })\n .replace(/،/g, ',');\n },\n postformat: function (string) {\n return string\n .replace(/\\d/g, function (match) {\n return symbolMap[match];\n })\n .replace(/,/g, '،');\n },\n dayOfMonthOrdinalParse: /\\d{1,2}م/,\n ordinal: '%dم',\n week: {\n dow: 6, // Saturday is the first day of the week.\n doy: 12, // The week that contains Jan 12th is the first week of the year.\n },\n });\n\n return fa;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/fa.js?", + ); + + /***/ + }, + + /***/ 527: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Finnish [fi]\n//! author : Tarmo Aidantausta : https://github.com/bleadof\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var numbersPast =\n 'nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän'.split(\n ' '\n ),\n numbersFuture = [\n 'nolla',\n 'yhden',\n 'kahden',\n 'kolmen',\n 'neljän',\n 'viiden',\n 'kuuden',\n numbersPast[7],\n numbersPast[8],\n numbersPast[9],\n ];\n function translate(number, withoutSuffix, key, isFuture) {\n var result = '';\n switch (key) {\n case 's':\n return isFuture ? 'muutaman sekunnin' : 'muutama sekunti';\n case 'ss':\n result = isFuture ? 'sekunnin' : 'sekuntia';\n break;\n case 'm':\n return isFuture ? 'minuutin' : 'minuutti';\n case 'mm':\n result = isFuture ? 'minuutin' : 'minuuttia';\n break;\n case 'h':\n return isFuture ? 'tunnin' : 'tunti';\n case 'hh':\n result = isFuture ? 'tunnin' : 'tuntia';\n break;\n case 'd':\n return isFuture ? 'päivän' : 'päivä';\n case 'dd':\n result = isFuture ? 'päivän' : 'päivää';\n break;\n case 'M':\n return isFuture ? 'kuukauden' : 'kuukausi';\n case 'MM':\n result = isFuture ? 'kuukauden' : 'kuukautta';\n break;\n case 'y':\n return isFuture ? 'vuoden' : 'vuosi';\n case 'yy':\n result = isFuture ? 'vuoden' : 'vuotta';\n break;\n }\n result = verbalNumber(number, isFuture) + ' ' + result;\n return result;\n }\n function verbalNumber(number, isFuture) {\n return number < 10\n ? isFuture\n ? numbersFuture[number]\n : numbersPast[number]\n : number;\n }\n\n var fi = moment.defineLocale('fi', {\n months: 'tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu'.split(\n '_'\n ),\n monthsShort:\n 'tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu'.split(\n '_'\n ),\n weekdays:\n 'sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai'.split(\n '_'\n ),\n weekdaysShort: 'su_ma_ti_ke_to_pe_la'.split('_'),\n weekdaysMin: 'su_ma_ti_ke_to_pe_la'.split('_'),\n longDateFormat: {\n LT: 'HH.mm',\n LTS: 'HH.mm.ss',\n L: 'DD.MM.YYYY',\n LL: 'Do MMMM[ta] YYYY',\n LLL: 'Do MMMM[ta] YYYY, [klo] HH.mm',\n LLLL: 'dddd, Do MMMM[ta] YYYY, [klo] HH.mm',\n l: 'D.M.YYYY',\n ll: 'Do MMM YYYY',\n lll: 'Do MMM YYYY, [klo] HH.mm',\n llll: 'ddd, Do MMM YYYY, [klo] HH.mm',\n },\n calendar: {\n sameDay: '[tänään] [klo] LT',\n nextDay: '[huomenna] [klo] LT',\n nextWeek: 'dddd [klo] LT',\n lastDay: '[eilen] [klo] LT',\n lastWeek: '[viime] dddd[na] [klo] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s päästä',\n past: '%s sitten',\n s: translate,\n ss: translate,\n m: translate,\n mm: translate,\n h: translate,\n hh: translate,\n d: translate,\n dd: translate,\n M: translate,\n MM: translate,\n y: translate,\n yy: translate,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return fi;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/fi.js?", + ); + + /***/ + }, + + /***/ 8376: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Filipino [fil]\n//! author : Dan Hagman : https://github.com/hagmandan\n//! author : Matthew Co : https://github.com/matthewdeeco\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var fil = moment.defineLocale('fil', {\n months: 'Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre'.split(\n '_'\n ),\n monthsShort: 'Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis'.split('_'),\n weekdays: 'Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado'.split(\n '_'\n ),\n weekdaysShort: 'Lin_Lun_Mar_Miy_Huw_Biy_Sab'.split('_'),\n weekdaysMin: 'Li_Lu_Ma_Mi_Hu_Bi_Sab'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'MM/D/YYYY',\n LL: 'MMMM D, YYYY',\n LLL: 'MMMM D, YYYY HH:mm',\n LLLL: 'dddd, MMMM DD, YYYY HH:mm',\n },\n calendar: {\n sameDay: 'LT [ngayong araw]',\n nextDay: '[Bukas ng] LT',\n nextWeek: 'LT [sa susunod na] dddd',\n lastDay: 'LT [kahapon]',\n lastWeek: 'LT [noong nakaraang] dddd',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'sa loob ng %s',\n past: '%s ang nakalipas',\n s: 'ilang segundo',\n ss: '%d segundo',\n m: 'isang minuto',\n mm: '%d minuto',\n h: 'isang oras',\n hh: '%d oras',\n d: 'isang araw',\n dd: '%d araw',\n M: 'isang buwan',\n MM: '%d buwan',\n y: 'isang taon',\n yy: '%d taon',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}/,\n ordinal: function (number) {\n return number;\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return fil;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/fil.js?", + ); + + /***/ + }, + + /***/ 2477: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Faroese [fo]\n//! author : Ragnar Johannesen : https://github.com/ragnar123\n//! author : Kristian Sakarisson : https://github.com/sakarisson\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var fo = moment.defineLocale('fo', {\n months: 'januar_februar_mars_apríl_mai_juni_juli_august_september_oktober_november_desember'.split(\n '_'\n ),\n monthsShort: 'jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_'),\n weekdays:\n 'sunnudagur_mánadagur_týsdagur_mikudagur_hósdagur_fríggjadagur_leygardagur'.split(\n '_'\n ),\n weekdaysShort: 'sun_mán_týs_mik_hós_frí_ley'.split('_'),\n weekdaysMin: 'su_má_tý_mi_hó_fr_le'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D. MMMM, YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Í dag kl.] LT',\n nextDay: '[Í morgin kl.] LT',\n nextWeek: 'dddd [kl.] LT',\n lastDay: '[Í gjár kl.] LT',\n lastWeek: '[síðstu] dddd [kl] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'um %s',\n past: '%s síðani',\n s: 'fá sekund',\n ss: '%d sekundir',\n m: 'ein minuttur',\n mm: '%d minuttir',\n h: 'ein tími',\n hh: '%d tímar',\n d: 'ein dagur',\n dd: '%d dagar',\n M: 'ein mánaður',\n MM: '%d mánaðir',\n y: 'eitt ár',\n yy: '%d ár',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return fo;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/fo.js?", + ); + + /***/ + }, + + /***/ 6435: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : French (Canada) [fr-ca]\n//! author : Jonathan Abourbih : https://github.com/jonbca\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var frCa = moment.defineLocale('fr-ca', {\n months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split(\n '_'\n ),\n monthsShort:\n 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),\n weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),\n weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'YYYY-MM-DD',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Aujourd’hui à] LT',\n nextDay: '[Demain à] LT',\n nextWeek: 'dddd [à] LT',\n lastDay: '[Hier à] LT',\n lastWeek: 'dddd [dernier à] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'dans %s',\n past: 'il y a %s',\n s: 'quelques secondes',\n ss: '%d secondes',\n m: 'une minute',\n mm: '%d minutes',\n h: 'une heure',\n hh: '%d heures',\n d: 'un jour',\n dd: '%d jours',\n M: 'un mois',\n MM: '%d mois',\n y: 'un an',\n yy: '%d ans',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(er|e)/,\n ordinal: function (number, period) {\n switch (period) {\n // Words with masculine grammatical gender: mois, trimestre, jour\n default:\n case 'M':\n case 'Q':\n case 'D':\n case 'DDD':\n case 'd':\n return number + (number === 1 ? 'er' : 'e');\n\n // Words with feminine grammatical gender: semaine\n case 'w':\n case 'W':\n return number + (number === 1 ? 're' : 'e');\n }\n },\n });\n\n return frCa;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/fr-ca.js?", + ); + + /***/ + }, + + /***/ 7892: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : French (Switzerland) [fr-ch]\n//! author : Gaspard Bucher : https://github.com/gaspard\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var frCh = moment.defineLocale('fr-ch', {\n months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split(\n '_'\n ),\n monthsShort:\n 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),\n weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),\n weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Aujourd’hui à] LT',\n nextDay: '[Demain à] LT',\n nextWeek: 'dddd [à] LT',\n lastDay: '[Hier à] LT',\n lastWeek: 'dddd [dernier à] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'dans %s',\n past: 'il y a %s',\n s: 'quelques secondes',\n ss: '%d secondes',\n m: 'une minute',\n mm: '%d minutes',\n h: 'une heure',\n hh: '%d heures',\n d: 'un jour',\n dd: '%d jours',\n M: 'un mois',\n MM: '%d mois',\n y: 'un an',\n yy: '%d ans',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(er|e)/,\n ordinal: function (number, period) {\n switch (period) {\n // Words with masculine grammatical gender: mois, trimestre, jour\n default:\n case 'M':\n case 'Q':\n case 'D':\n case 'DDD':\n case 'd':\n return number + (number === 1 ? 'er' : 'e');\n\n // Words with feminine grammatical gender: semaine\n case 'w':\n case 'W':\n return number + (number === 1 ? 're' : 'e');\n }\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return frCh;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/fr-ch.js?", + ); + + /***/ + }, + + /***/ 5498: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : French [fr]\n//! author : John Fischer : https://github.com/jfroffice\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var monthsStrictRegex =\n /^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,\n monthsShortStrictRegex =\n /(janv\\.?|févr\\.?|mars|avr\\.?|mai|juin|juil\\.?|août|sept\\.?|oct\\.?|nov\\.?|déc\\.?)/i,\n monthsRegex =\n /(janv\\.?|févr\\.?|mars|avr\\.?|mai|juin|juil\\.?|août|sept\\.?|oct\\.?|nov\\.?|déc\\.?|janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,\n monthsParse = [\n /^janv/i,\n /^févr/i,\n /^mars/i,\n /^avr/i,\n /^mai/i,\n /^juin/i,\n /^juil/i,\n /^août/i,\n /^sept/i,\n /^oct/i,\n /^nov/i,\n /^déc/i,\n ];\n\n var fr = moment.defineLocale('fr', {\n months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split(\n '_'\n ),\n monthsShort:\n 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split(\n '_'\n ),\n monthsRegex: monthsRegex,\n monthsShortRegex: monthsRegex,\n monthsStrictRegex: monthsStrictRegex,\n monthsShortStrictRegex: monthsShortStrictRegex,\n monthsParse: monthsParse,\n longMonthsParse: monthsParse,\n shortMonthsParse: monthsParse,\n weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),\n weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),\n weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Aujourd’hui à] LT',\n nextDay: '[Demain à] LT',\n nextWeek: 'dddd [à] LT',\n lastDay: '[Hier à] LT',\n lastWeek: 'dddd [dernier à] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'dans %s',\n past: 'il y a %s',\n s: 'quelques secondes',\n ss: '%d secondes',\n m: 'une minute',\n mm: '%d minutes',\n h: 'une heure',\n hh: '%d heures',\n d: 'un jour',\n dd: '%d jours',\n w: 'une semaine',\n ww: '%d semaines',\n M: 'un mois',\n MM: '%d mois',\n y: 'un an',\n yy: '%d ans',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(er|)/,\n ordinal: function (number, period) {\n switch (period) {\n // TODO: Return 'e' when day of month > 1. Move this case inside\n // block for masculine words below.\n // See https://github.com/moment/moment/issues/3375\n case 'D':\n return number + (number === 1 ? 'er' : '');\n\n // Words with masculine grammatical gender: mois, trimestre, jour\n default:\n case 'M':\n case 'Q':\n case 'DDD':\n case 'd':\n return number + (number === 1 ? 'er' : 'e');\n\n // Words with feminine grammatical gender: semaine\n case 'w':\n case 'W':\n return number + (number === 1 ? 're' : 'e');\n }\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return fr;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/fr.js?", + ); + + /***/ + }, + + /***/ 7071: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Frisian [fy]\n//! author : Robin van der Vliet : https://github.com/robin0van0der0v\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var monthsShortWithDots =\n 'jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.'.split('_'),\n monthsShortWithoutDots =\n 'jan_feb_mrt_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_');\n\n var fy = moment.defineLocale('fy', {\n months: 'jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber'.split(\n '_'\n ),\n monthsShort: function (m, format) {\n if (!m) {\n return monthsShortWithDots;\n } else if (/-MMM-/.test(format)) {\n return monthsShortWithoutDots[m.month()];\n } else {\n return monthsShortWithDots[m.month()];\n }\n },\n monthsParseExact: true,\n weekdays: 'snein_moandei_tiisdei_woansdei_tongersdei_freed_sneon'.split(\n '_'\n ),\n weekdaysShort: 'si._mo._ti._wo._to._fr._so.'.split('_'),\n weekdaysMin: 'Si_Mo_Ti_Wo_To_Fr_So'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD-MM-YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[hjoed om] LT',\n nextDay: '[moarn om] LT',\n nextWeek: 'dddd [om] LT',\n lastDay: '[juster om] LT',\n lastWeek: '[ôfrûne] dddd [om] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'oer %s',\n past: '%s lyn',\n s: 'in pear sekonden',\n ss: '%d sekonden',\n m: 'ien minút',\n mm: '%d minuten',\n h: 'ien oere',\n hh: '%d oeren',\n d: 'ien dei',\n dd: '%d dagen',\n M: 'ien moanne',\n MM: '%d moannen',\n y: 'ien jier',\n yy: '%d jierren',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(ste|de)/,\n ordinal: function (number) {\n return (\n number +\n (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de')\n );\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return fy;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/fy.js?", + ); + + /***/ + }, + + /***/ 1734: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Irish or Irish Gaelic [ga]\n//! author : André Silva : https://github.com/askpt\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var months = [\n 'Eanáir',\n 'Feabhra',\n 'Márta',\n 'Aibreán',\n 'Bealtaine',\n 'Meitheamh',\n 'Iúil',\n 'Lúnasa',\n 'Meán Fómhair',\n 'Deireadh Fómhair',\n 'Samhain',\n 'Nollaig',\n ],\n monthsShort = [\n 'Ean',\n 'Feabh',\n 'Márt',\n 'Aib',\n 'Beal',\n 'Meith',\n 'Iúil',\n 'Lún',\n 'M.F.',\n 'D.F.',\n 'Samh',\n 'Noll',\n ],\n weekdays = [\n 'Dé Domhnaigh',\n 'Dé Luain',\n 'Dé Máirt',\n 'Dé Céadaoin',\n 'Déardaoin',\n 'Dé hAoine',\n 'Dé Sathairn',\n ],\n weekdaysShort = ['Domh', 'Luan', 'Máirt', 'Céad', 'Déar', 'Aoine', 'Sath'],\n weekdaysMin = ['Do', 'Lu', 'Má', 'Cé', 'Dé', 'A', 'Sa'];\n\n var ga = moment.defineLocale('ga', {\n months: months,\n monthsShort: monthsShort,\n monthsParseExact: true,\n weekdays: weekdays,\n weekdaysShort: weekdaysShort,\n weekdaysMin: weekdaysMin,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Inniu ag] LT',\n nextDay: '[Amárach ag] LT',\n nextWeek: 'dddd [ag] LT',\n lastDay: '[Inné ag] LT',\n lastWeek: 'dddd [seo caite] [ag] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'i %s',\n past: '%s ó shin',\n s: 'cúpla soicind',\n ss: '%d soicind',\n m: 'nóiméad',\n mm: '%d nóiméad',\n h: 'uair an chloig',\n hh: '%d uair an chloig',\n d: 'lá',\n dd: '%d lá',\n M: 'mí',\n MM: '%d míonna',\n y: 'bliain',\n yy: '%d bliain',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(d|na|mh)/,\n ordinal: function (number) {\n var output = number === 1 ? 'd' : number % 10 === 2 ? 'na' : 'mh';\n return number + output;\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return ga;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/ga.js?", + ); + + /***/ + }, + + /***/ 217: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Scottish Gaelic [gd]\n//! author : Jon Ashdown : https://github.com/jonashdown\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var months = [\n 'Am Faoilleach',\n 'An Gearran',\n 'Am Màrt',\n 'An Giblean',\n 'An Cèitean',\n 'An t-Ògmhios',\n 'An t-Iuchar',\n 'An Lùnastal',\n 'An t-Sultain',\n 'An Dàmhair',\n 'An t-Samhain',\n 'An Dùbhlachd',\n ],\n monthsShort = [\n 'Faoi',\n 'Gear',\n 'Màrt',\n 'Gibl',\n 'Cèit',\n 'Ògmh',\n 'Iuch',\n 'Lùn',\n 'Sult',\n 'Dàmh',\n 'Samh',\n 'Dùbh',\n ],\n weekdays = [\n 'Didòmhnaich',\n 'Diluain',\n 'Dimàirt',\n 'Diciadain',\n 'Diardaoin',\n 'Dihaoine',\n 'Disathairne',\n ],\n weekdaysShort = ['Did', 'Dil', 'Dim', 'Dic', 'Dia', 'Dih', 'Dis'],\n weekdaysMin = ['Dò', 'Lu', 'Mà', 'Ci', 'Ar', 'Ha', 'Sa'];\n\n var gd = moment.defineLocale('gd', {\n months: months,\n monthsShort: monthsShort,\n monthsParseExact: true,\n weekdays: weekdays,\n weekdaysShort: weekdaysShort,\n weekdaysMin: weekdaysMin,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[An-diugh aig] LT',\n nextDay: '[A-màireach aig] LT',\n nextWeek: 'dddd [aig] LT',\n lastDay: '[An-dè aig] LT',\n lastWeek: 'dddd [seo chaidh] [aig] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'ann an %s',\n past: 'bho chionn %s',\n s: 'beagan diogan',\n ss: '%d diogan',\n m: 'mionaid',\n mm: '%d mionaidean',\n h: 'uair',\n hh: '%d uairean',\n d: 'latha',\n dd: '%d latha',\n M: 'mìos',\n MM: '%d mìosan',\n y: 'bliadhna',\n yy: '%d bliadhna',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(d|na|mh)/,\n ordinal: function (number) {\n var output = number === 1 ? 'd' : number % 10 === 2 ? 'na' : 'mh';\n return number + output;\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return gd;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/gd.js?", + ); + + /***/ + }, + + /***/ 7329: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Galician [gl]\n//! author : Juan G. Hurtado : https://github.com/juanghurtado\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var gl = moment.defineLocale('gl', {\n months: 'xaneiro_febreiro_marzo_abril_maio_xuño_xullo_agosto_setembro_outubro_novembro_decembro'.split(\n '_'\n ),\n monthsShort:\n 'xan._feb._mar._abr._mai._xuñ._xul._ago._set._out._nov._dec.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays: 'domingo_luns_martes_mércores_xoves_venres_sábado'.split('_'),\n weekdaysShort: 'dom._lun._mar._mér._xov._ven._sáb.'.split('_'),\n weekdaysMin: 'do_lu_ma_mé_xo_ve_sá'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D [de] MMMM [de] YYYY',\n LLL: 'D [de] MMMM [de] YYYY H:mm',\n LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm',\n },\n calendar: {\n sameDay: function () {\n return '[hoxe ' + (this.hours() !== 1 ? 'ás' : 'á') + '] LT';\n },\n nextDay: function () {\n return '[mañá ' + (this.hours() !== 1 ? 'ás' : 'á') + '] LT';\n },\n nextWeek: function () {\n return 'dddd [' + (this.hours() !== 1 ? 'ás' : 'a') + '] LT';\n },\n lastDay: function () {\n return '[onte ' + (this.hours() !== 1 ? 'á' : 'a') + '] LT';\n },\n lastWeek: function () {\n return (\n '[o] dddd [pasado ' + (this.hours() !== 1 ? 'ás' : 'a') + '] LT'\n );\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: function (str) {\n if (str.indexOf('un') === 0) {\n return 'n' + str;\n }\n return 'en ' + str;\n },\n past: 'hai %s',\n s: 'uns segundos',\n ss: '%d segundos',\n m: 'un minuto',\n mm: '%d minutos',\n h: 'unha hora',\n hh: '%d horas',\n d: 'un día',\n dd: '%d días',\n M: 'un mes',\n MM: '%d meses',\n y: 'un ano',\n yy: '%d anos',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal: '%dº',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return gl;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/gl.js?", + ); + + /***/ + }, + + /***/ 2124: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Konkani Devanagari script [gom-deva]\n//! author : The Discoverer : https://github.com/WikiDiscoverer\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var format = {\n s: ['थोडया सॅकंडांनी', 'थोडे सॅकंड'],\n ss: [number + ' सॅकंडांनी', number + ' सॅकंड'],\n m: ['एका मिणटान', 'एक मिनूट'],\n mm: [number + ' मिणटांनी', number + ' मिणटां'],\n h: ['एका वरान', 'एक वर'],\n hh: [number + ' वरांनी', number + ' वरां'],\n d: ['एका दिसान', 'एक दीस'],\n dd: [number + ' दिसांनी', number + ' दीस'],\n M: ['एका म्हयन्यान', 'एक म्हयनो'],\n MM: [number + ' म्हयन्यानी', number + ' म्हयने'],\n y: ['एका वर्सान', 'एक वर्स'],\n yy: [number + ' वर्सांनी', number + ' वर्सां'],\n };\n return isFuture ? format[key][0] : format[key][1];\n }\n\n var gomDeva = moment.defineLocale('gom-deva', {\n months: {\n standalone:\n 'जानेवारी_फेब्रुवारी_मार्च_एप्रील_मे_जून_जुलय_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर'.split(\n '_'\n ),\n format: 'जानेवारीच्या_फेब्रुवारीच्या_मार्चाच्या_एप्रीलाच्या_मेयाच्या_जूनाच्या_जुलयाच्या_ऑगस्टाच्या_सप्टेंबराच्या_ऑक्टोबराच्या_नोव्हेंबराच्या_डिसेंबराच्या'.split(\n '_'\n ),\n isFormat: /MMMM(\\s)+D[oD]?/,\n },\n monthsShort:\n 'जाने._फेब्रु._मार्च_एप्री._मे_जून_जुल._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays: 'आयतार_सोमार_मंगळार_बुधवार_बिरेस्तार_सुक्रार_शेनवार'.split('_'),\n weekdaysShort: 'आयत._सोम._मंगळ._बुध._ब्रेस्त._सुक्र._शेन.'.split('_'),\n weekdaysMin: 'आ_सो_मं_बु_ब्रे_सु_शे'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'A h:mm [वाजतां]',\n LTS: 'A h:mm:ss [वाजतां]',\n L: 'DD-MM-YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY A h:mm [वाजतां]',\n LLLL: 'dddd, MMMM Do, YYYY, A h:mm [वाजतां]',\n llll: 'ddd, D MMM YYYY, A h:mm [वाजतां]',\n },\n calendar: {\n sameDay: '[आयज] LT',\n nextDay: '[फाल्यां] LT',\n nextWeek: '[फुडलो] dddd[,] LT',\n lastDay: '[काल] LT',\n lastWeek: '[फाटलो] dddd[,] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s',\n past: '%s आदीं',\n s: processRelativeTime,\n ss: processRelativeTime,\n m: processRelativeTime,\n mm: processRelativeTime,\n h: processRelativeTime,\n hh: processRelativeTime,\n d: processRelativeTime,\n dd: processRelativeTime,\n M: processRelativeTime,\n MM: processRelativeTime,\n y: processRelativeTime,\n yy: processRelativeTime,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(वेर)/,\n ordinal: function (number, period) {\n switch (period) {\n // the ordinal 'वेर' only applies to day of the month\n case 'D':\n return number + 'वेर';\n default:\n case 'M':\n case 'Q':\n case 'DDD':\n case 'd':\n case 'w':\n case 'W':\n return number;\n }\n },\n week: {\n dow: 0, // Sunday is the first day of the week\n doy: 3, // The week that contains Jan 4th is the first week of the year (7 + 0 - 4)\n },\n meridiemParse: /राती|सकाळीं|दनपारां|सांजे/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'राती') {\n return hour < 4 ? hour : hour + 12;\n } else if (meridiem === 'सकाळीं') {\n return hour;\n } else if (meridiem === 'दनपारां') {\n return hour > 12 ? hour : hour + 12;\n } else if (meridiem === 'सांजे') {\n return hour + 12;\n }\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 4) {\n return 'राती';\n } else if (hour < 12) {\n return 'सकाळीं';\n } else if (hour < 16) {\n return 'दनपारां';\n } else if (hour < 20) {\n return 'सांजे';\n } else {\n return 'राती';\n }\n },\n });\n\n return gomDeva;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/gom-deva.js?", + ); + + /***/ + }, + + /***/ 3383: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Konkani Latin script [gom-latn]\n//! author : The Discoverer : https://github.com/WikiDiscoverer\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var format = {\n s: ['thoddea sekondamni', 'thodde sekond'],\n ss: [number + ' sekondamni', number + ' sekond'],\n m: ['eka mintan', 'ek minut'],\n mm: [number + ' mintamni', number + ' mintam'],\n h: ['eka voran', 'ek vor'],\n hh: [number + ' voramni', number + ' voram'],\n d: ['eka disan', 'ek dis'],\n dd: [number + ' disamni', number + ' dis'],\n M: ['eka mhoinean', 'ek mhoino'],\n MM: [number + ' mhoineamni', number + ' mhoine'],\n y: ['eka vorsan', 'ek voros'],\n yy: [number + ' vorsamni', number + ' vorsam'],\n };\n return isFuture ? format[key][0] : format[key][1];\n }\n\n var gomLatn = moment.defineLocale('gom-latn', {\n months: {\n standalone:\n 'Janer_Febrer_Mars_Abril_Mai_Jun_Julai_Agost_Setembr_Otubr_Novembr_Dezembr'.split(\n '_'\n ),\n format: 'Janerachea_Febrerachea_Marsachea_Abrilachea_Maiachea_Junachea_Julaiachea_Agostachea_Setembrachea_Otubrachea_Novembrachea_Dezembrachea'.split(\n '_'\n ),\n isFormat: /MMMM(\\s)+D[oD]?/,\n },\n monthsShort:\n 'Jan._Feb._Mars_Abr._Mai_Jun_Jul._Ago._Set._Otu._Nov._Dez.'.split('_'),\n monthsParseExact: true,\n weekdays: \"Aitar_Somar_Mongllar_Budhvar_Birestar_Sukrar_Son'var\".split('_'),\n weekdaysShort: 'Ait._Som._Mon._Bud._Bre._Suk._Son.'.split('_'),\n weekdaysMin: 'Ai_Sm_Mo_Bu_Br_Su_Sn'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'A h:mm [vazta]',\n LTS: 'A h:mm:ss [vazta]',\n L: 'DD-MM-YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY A h:mm [vazta]',\n LLLL: 'dddd, MMMM Do, YYYY, A h:mm [vazta]',\n llll: 'ddd, D MMM YYYY, A h:mm [vazta]',\n },\n calendar: {\n sameDay: '[Aiz] LT',\n nextDay: '[Faleam] LT',\n nextWeek: '[Fuddlo] dddd[,] LT',\n lastDay: '[Kal] LT',\n lastWeek: '[Fattlo] dddd[,] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s',\n past: '%s adim',\n s: processRelativeTime,\n ss: processRelativeTime,\n m: processRelativeTime,\n mm: processRelativeTime,\n h: processRelativeTime,\n hh: processRelativeTime,\n d: processRelativeTime,\n dd: processRelativeTime,\n M: processRelativeTime,\n MM: processRelativeTime,\n y: processRelativeTime,\n yy: processRelativeTime,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(er)/,\n ordinal: function (number, period) {\n switch (period) {\n // the ordinal 'er' only applies to day of the month\n case 'D':\n return number + 'er';\n default:\n case 'M':\n case 'Q':\n case 'DDD':\n case 'd':\n case 'w':\n case 'W':\n return number;\n }\n },\n week: {\n dow: 0, // Sunday is the first day of the week\n doy: 3, // The week that contains Jan 4th is the first week of the year (7 + 0 - 4)\n },\n meridiemParse: /rati|sokallim|donparam|sanje/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'rati') {\n return hour < 4 ? hour : hour + 12;\n } else if (meridiem === 'sokallim') {\n return hour;\n } else if (meridiem === 'donparam') {\n return hour > 12 ? hour : hour + 12;\n } else if (meridiem === 'sanje') {\n return hour + 12;\n }\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 4) {\n return 'rati';\n } else if (hour < 12) {\n return 'sokallim';\n } else if (hour < 16) {\n return 'donparam';\n } else if (hour < 20) {\n return 'sanje';\n } else {\n return 'rati';\n }\n },\n });\n\n return gomLatn;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/gom-latn.js?", + ); + + /***/ + }, + + /***/ 5050: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Gujarati [gu]\n//! author : Kaushik Thanki : https://github.com/Kaushik1987\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var symbolMap = {\n 1: '૧',\n 2: '૨',\n 3: '૩',\n 4: '૪',\n 5: '૫',\n 6: '૬',\n 7: '૭',\n 8: '૮',\n 9: '૯',\n 0: '૦',\n },\n numberMap = {\n '૧': '1',\n '૨': '2',\n '૩': '3',\n '૪': '4',\n '૫': '5',\n '૬': '6',\n '૭': '7',\n '૮': '8',\n '૯': '9',\n '૦': '0',\n };\n\n var gu = moment.defineLocale('gu', {\n months: 'જાન્યુઆરી_ફેબ્રુઆરી_માર્ચ_એપ્રિલ_મે_જૂન_જુલાઈ_ઑગસ્ટ_સપ્ટેમ્બર_ઑક્ટ્બર_નવેમ્બર_ડિસેમ્બર'.split(\n '_'\n ),\n monthsShort:\n 'જાન્યુ._ફેબ્રુ._માર્ચ_એપ્રિ._મે_જૂન_જુલા._ઑગ._સપ્ટે._ઑક્ટ્._નવે._ડિસે.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays: 'રવિવાર_સોમવાર_મંગળવાર_બુધ્વાર_ગુરુવાર_શુક્રવાર_શનિવાર'.split(\n '_'\n ),\n weekdaysShort: 'રવિ_સોમ_મંગળ_બુધ્_ગુરુ_શુક્ર_શનિ'.split('_'),\n weekdaysMin: 'ર_સો_મં_બુ_ગુ_શુ_શ'.split('_'),\n longDateFormat: {\n LT: 'A h:mm વાગ્યે',\n LTS: 'A h:mm:ss વાગ્યે',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, A h:mm વાગ્યે',\n LLLL: 'dddd, D MMMM YYYY, A h:mm વાગ્યે',\n },\n calendar: {\n sameDay: '[આજ] LT',\n nextDay: '[કાલે] LT',\n nextWeek: 'dddd, LT',\n lastDay: '[ગઇકાલે] LT',\n lastWeek: '[પાછલા] dddd, LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s મા',\n past: '%s પહેલા',\n s: 'અમુક પળો',\n ss: '%d સેકંડ',\n m: 'એક મિનિટ',\n mm: '%d મિનિટ',\n h: 'એક કલાક',\n hh: '%d કલાક',\n d: 'એક દિવસ',\n dd: '%d દિવસ',\n M: 'એક મહિનો',\n MM: '%d મહિનો',\n y: 'એક વર્ષ',\n yy: '%d વર્ષ',\n },\n preparse: function (string) {\n return string.replace(/[૧૨૩૪૫૬૭૮૯૦]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function (string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n // Gujarati notation for meridiems are quite fuzzy in practice. While there exists\n // a rigid notion of a 'Pahar' it is not used as rigidly in modern Gujarati.\n meridiemParse: /રાત|બપોર|સવાર|સાંજ/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'રાત') {\n return hour < 4 ? hour : hour + 12;\n } else if (meridiem === 'સવાર') {\n return hour;\n } else if (meridiem === 'બપોર') {\n return hour >= 10 ? hour : hour + 12;\n } else if (meridiem === 'સાંજ') {\n return hour + 12;\n }\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 4) {\n return 'રાત';\n } else if (hour < 10) {\n return 'સવાર';\n } else if (hour < 17) {\n return 'બપોર';\n } else if (hour < 20) {\n return 'સાંજ';\n } else {\n return 'રાત';\n }\n },\n week: {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n },\n });\n\n return gu;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/gu.js?", + ); + + /***/ + }, + + /***/ 1713: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Hebrew [he]\n//! author : Tomer Cohen : https://github.com/tomer\n//! author : Moshe Simantov : https://github.com/DevelopmentIL\n//! author : Tal Ater : https://github.com/TalAter\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var he = moment.defineLocale('he', {\n months: 'ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר'.split(\n '_'\n ),\n monthsShort:\n 'ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳'.split('_'),\n weekdays: 'ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת'.split('_'),\n weekdaysShort: 'א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳'.split('_'),\n weekdaysMin: 'א_ב_ג_ד_ה_ו_ש'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D [ב]MMMM YYYY',\n LLL: 'D [ב]MMMM YYYY HH:mm',\n LLLL: 'dddd, D [ב]MMMM YYYY HH:mm',\n l: 'D/M/YYYY',\n ll: 'D MMM YYYY',\n lll: 'D MMM YYYY HH:mm',\n llll: 'ddd, D MMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[היום ב־]LT',\n nextDay: '[מחר ב־]LT',\n nextWeek: 'dddd [בשעה] LT',\n lastDay: '[אתמול ב־]LT',\n lastWeek: '[ביום] dddd [האחרון בשעה] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'בעוד %s',\n past: 'לפני %s',\n s: 'מספר שניות',\n ss: '%d שניות',\n m: 'דקה',\n mm: '%d דקות',\n h: 'שעה',\n hh: function (number) {\n if (number === 2) {\n return 'שעתיים';\n }\n return number + ' שעות';\n },\n d: 'יום',\n dd: function (number) {\n if (number === 2) {\n return 'יומיים';\n }\n return number + ' ימים';\n },\n M: 'חודש',\n MM: function (number) {\n if (number === 2) {\n return 'חודשיים';\n }\n return number + ' חודשים';\n },\n y: 'שנה',\n yy: function (number) {\n if (number === 2) {\n return 'שנתיים';\n } else if (number % 10 === 0 && number !== 10) {\n return number + ' שנה';\n }\n return number + ' שנים';\n },\n },\n meridiemParse:\n /אחה\"צ|לפנה\"צ|אחרי הצהריים|לפני הצהריים|לפנות בוקר|בבוקר|בערב/i,\n isPM: function (input) {\n return /^(אחה\"צ|אחרי הצהריים|בערב)$/.test(input);\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 5) {\n return 'לפנות בוקר';\n } else if (hour < 10) {\n return 'בבוקר';\n } else if (hour < 12) {\n return isLower ? 'לפנה\"צ' : 'לפני הצהריים';\n } else if (hour < 18) {\n return isLower ? 'אחה\"צ' : 'אחרי הצהריים';\n } else {\n return 'בערב';\n }\n },\n });\n\n return he;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/he.js?", + ); + + /***/ + }, + + /***/ 3861: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Hindi [hi]\n//! author : Mayank Singhal : https://github.com/mayanksinghal\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var symbolMap = {\n 1: '१',\n 2: '२',\n 3: '३',\n 4: '४',\n 5: '५',\n 6: '६',\n 7: '७',\n 8: '८',\n 9: '९',\n 0: '०',\n },\n numberMap = {\n '१': '1',\n '२': '2',\n '३': '3',\n '४': '4',\n '५': '5',\n '६': '6',\n '७': '7',\n '८': '8',\n '९': '9',\n '०': '0',\n },\n monthsParse = [\n /^जन/i,\n /^फ़र|फर/i,\n /^मार्च/i,\n /^अप्रै/i,\n /^मई/i,\n /^जून/i,\n /^जुल/i,\n /^अग/i,\n /^सितं|सित/i,\n /^अक्टू/i,\n /^नव|नवं/i,\n /^दिसं|दिस/i,\n ],\n shortMonthsParse = [\n /^जन/i,\n /^फ़र/i,\n /^मार्च/i,\n /^अप्रै/i,\n /^मई/i,\n /^जून/i,\n /^जुल/i,\n /^अग/i,\n /^सित/i,\n /^अक्टू/i,\n /^नव/i,\n /^दिस/i,\n ];\n\n var hi = moment.defineLocale('hi', {\n months: {\n format: 'जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर'.split(\n '_'\n ),\n standalone:\n 'जनवरी_फरवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितंबर_अक्टूबर_नवंबर_दिसंबर'.split(\n '_'\n ),\n },\n monthsShort:\n 'जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.'.split('_'),\n weekdays: 'रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'),\n weekdaysShort: 'रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि'.split('_'),\n weekdaysMin: 'र_सो_मं_बु_गु_शु_श'.split('_'),\n longDateFormat: {\n LT: 'A h:mm बजे',\n LTS: 'A h:mm:ss बजे',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, A h:mm बजे',\n LLLL: 'dddd, D MMMM YYYY, A h:mm बजे',\n },\n\n monthsParse: monthsParse,\n longMonthsParse: monthsParse,\n shortMonthsParse: shortMonthsParse,\n\n monthsRegex:\n /^(जनवरी|जन\\.?|फ़रवरी|फरवरी|फ़र\\.?|मार्च?|अप्रैल|अप्रै\\.?|मई?|जून?|जुलाई|जुल\\.?|अगस्त|अग\\.?|सितम्बर|सितंबर|सित\\.?|अक्टूबर|अक्टू\\.?|नवम्बर|नवंबर|नव\\.?|दिसम्बर|दिसंबर|दिस\\.?)/i,\n\n monthsShortRegex:\n /^(जनवरी|जन\\.?|फ़रवरी|फरवरी|फ़र\\.?|मार्च?|अप्रैल|अप्रै\\.?|मई?|जून?|जुलाई|जुल\\.?|अगस्त|अग\\.?|सितम्बर|सितंबर|सित\\.?|अक्टूबर|अक्टू\\.?|नवम्बर|नवंबर|नव\\.?|दिसम्बर|दिसंबर|दिस\\.?)/i,\n\n monthsStrictRegex:\n /^(जनवरी?|फ़रवरी|फरवरी?|मार्च?|अप्रैल?|मई?|जून?|जुलाई?|अगस्त?|सितम्बर|सितंबर|सित?\\.?|अक्टूबर|अक्टू\\.?|नवम्बर|नवंबर?|दिसम्बर|दिसंबर?)/i,\n\n monthsShortStrictRegex:\n /^(जन\\.?|फ़र\\.?|मार्च?|अप्रै\\.?|मई?|जून?|जुल\\.?|अग\\.?|सित\\.?|अक्टू\\.?|नव\\.?|दिस\\.?)/i,\n\n calendar: {\n sameDay: '[आज] LT',\n nextDay: '[कल] LT',\n nextWeek: 'dddd, LT',\n lastDay: '[कल] LT',\n lastWeek: '[पिछले] dddd, LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s में',\n past: '%s पहले',\n s: 'कुछ ही क्षण',\n ss: '%d सेकंड',\n m: 'एक मिनट',\n mm: '%d मिनट',\n h: 'एक घंटा',\n hh: '%d घंटे',\n d: 'एक दिन',\n dd: '%d दिन',\n M: 'एक महीने',\n MM: '%d महीने',\n y: 'एक वर्ष',\n yy: '%d वर्ष',\n },\n preparse: function (string) {\n return string.replace(/[१२३४५६७८९०]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function (string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n // Hindi notation for meridiems are quite fuzzy in practice. While there exists\n // a rigid notion of a 'Pahar' it is not used as rigidly in modern Hindi.\n meridiemParse: /रात|सुबह|दोपहर|शाम/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'रात') {\n return hour < 4 ? hour : hour + 12;\n } else if (meridiem === 'सुबह') {\n return hour;\n } else if (meridiem === 'दोपहर') {\n return hour >= 10 ? hour : hour + 12;\n } else if (meridiem === 'शाम') {\n return hour + 12;\n }\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 4) {\n return 'रात';\n } else if (hour < 10) {\n return 'सुबह';\n } else if (hour < 17) {\n return 'दोपहर';\n } else if (hour < 20) {\n return 'शाम';\n } else {\n return 'रात';\n }\n },\n week: {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n },\n });\n\n return hi;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/hi.js?", + ); + + /***/ + }, + + /***/ 6308: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Croatian [hr]\n//! author : Bojan Marković : https://github.com/bmarkovic\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function translate(number, withoutSuffix, key) {\n var result = number + ' ';\n switch (key) {\n case 'ss':\n if (number === 1) {\n result += 'sekunda';\n } else if (number === 2 || number === 3 || number === 4) {\n result += 'sekunde';\n } else {\n result += 'sekundi';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'jedna minuta' : 'jedne minute';\n case 'mm':\n if (number === 1) {\n result += 'minuta';\n } else if (number === 2 || number === 3 || number === 4) {\n result += 'minute';\n } else {\n result += 'minuta';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'jedan sat' : 'jednog sata';\n case 'hh':\n if (number === 1) {\n result += 'sat';\n } else if (number === 2 || number === 3 || number === 4) {\n result += 'sata';\n } else {\n result += 'sati';\n }\n return result;\n case 'dd':\n if (number === 1) {\n result += 'dan';\n } else {\n result += 'dana';\n }\n return result;\n case 'MM':\n if (number === 1) {\n result += 'mjesec';\n } else if (number === 2 || number === 3 || number === 4) {\n result += 'mjeseca';\n } else {\n result += 'mjeseci';\n }\n return result;\n case 'yy':\n if (number === 1) {\n result += 'godina';\n } else if (number === 2 || number === 3 || number === 4) {\n result += 'godine';\n } else {\n result += 'godina';\n }\n return result;\n }\n }\n\n var hr = moment.defineLocale('hr', {\n months: {\n format: 'siječnja_veljače_ožujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca'.split(\n '_'\n ),\n standalone:\n 'siječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac'.split(\n '_'\n ),\n },\n monthsShort:\n 'sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split(\n '_'\n ),\n weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),\n weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'Do MMMM YYYY',\n LLL: 'Do MMMM YYYY H:mm',\n LLLL: 'dddd, Do MMMM YYYY H:mm',\n },\n calendar: {\n sameDay: '[danas u] LT',\n nextDay: '[sutra u] LT',\n nextWeek: function () {\n switch (this.day()) {\n case 0:\n return '[u] [nedjelju] [u] LT';\n case 3:\n return '[u] [srijedu] [u] LT';\n case 6:\n return '[u] [subotu] [u] LT';\n case 1:\n case 2:\n case 4:\n case 5:\n return '[u] dddd [u] LT';\n }\n },\n lastDay: '[jučer u] LT',\n lastWeek: function () {\n switch (this.day()) {\n case 0:\n return '[prošlu] [nedjelju] [u] LT';\n case 3:\n return '[prošlu] [srijedu] [u] LT';\n case 6:\n return '[prošle] [subote] [u] LT';\n case 1:\n case 2:\n case 4:\n case 5:\n return '[prošli] dddd [u] LT';\n }\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'za %s',\n past: 'prije %s',\n s: 'par sekundi',\n ss: translate,\n m: translate,\n mm: translate,\n h: translate,\n hh: translate,\n d: 'dan',\n dd: translate,\n M: 'mjesec',\n MM: translate,\n y: 'godinu',\n yy: translate,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return hr;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/hr.js?", + ); + + /***/ + }, + + /***/ 609: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Hungarian [hu]\n//! author : Adam Brunner : https://github.com/adambrunner\n//! author : Peter Viszt : https://github.com/passatgt\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var weekEndings =\n 'vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton'.split(' ');\n function translate(number, withoutSuffix, key, isFuture) {\n var num = number;\n switch (key) {\n case 's':\n return isFuture || withoutSuffix\n ? 'néhány másodperc'\n : 'néhány másodperce';\n case 'ss':\n return num + (isFuture || withoutSuffix)\n ? ' másodperc'\n : ' másodperce';\n case 'm':\n return 'egy' + (isFuture || withoutSuffix ? ' perc' : ' perce');\n case 'mm':\n return num + (isFuture || withoutSuffix ? ' perc' : ' perce');\n case 'h':\n return 'egy' + (isFuture || withoutSuffix ? ' óra' : ' órája');\n case 'hh':\n return num + (isFuture || withoutSuffix ? ' óra' : ' órája');\n case 'd':\n return 'egy' + (isFuture || withoutSuffix ? ' nap' : ' napja');\n case 'dd':\n return num + (isFuture || withoutSuffix ? ' nap' : ' napja');\n case 'M':\n return 'egy' + (isFuture || withoutSuffix ? ' hónap' : ' hónapja');\n case 'MM':\n return num + (isFuture || withoutSuffix ? ' hónap' : ' hónapja');\n case 'y':\n return 'egy' + (isFuture || withoutSuffix ? ' év' : ' éve');\n case 'yy':\n return num + (isFuture || withoutSuffix ? ' év' : ' éve');\n }\n return '';\n }\n function week(isFuture) {\n return (\n (isFuture ? '' : '[múlt] ') +\n '[' +\n weekEndings[this.day()] +\n '] LT[-kor]'\n );\n }\n\n var hu = moment.defineLocale('hu', {\n months: 'január_február_március_április_május_június_július_augusztus_szeptember_október_november_december'.split(\n '_'\n ),\n monthsShort:\n 'jan._feb._márc._ápr._máj._jún._júl._aug._szept._okt._nov._dec.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays: 'vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat'.split('_'),\n weekdaysShort: 'vas_hét_kedd_sze_csüt_pén_szo'.split('_'),\n weekdaysMin: 'v_h_k_sze_cs_p_szo'.split('_'),\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'YYYY.MM.DD.',\n LL: 'YYYY. MMMM D.',\n LLL: 'YYYY. MMMM D. H:mm',\n LLLL: 'YYYY. MMMM D., dddd H:mm',\n },\n meridiemParse: /de|du/i,\n isPM: function (input) {\n return input.charAt(1).toLowerCase() === 'u';\n },\n meridiem: function (hours, minutes, isLower) {\n if (hours < 12) {\n return isLower === true ? 'de' : 'DE';\n } else {\n return isLower === true ? 'du' : 'DU';\n }\n },\n calendar: {\n sameDay: '[ma] LT[-kor]',\n nextDay: '[holnap] LT[-kor]',\n nextWeek: function () {\n return week.call(this, true);\n },\n lastDay: '[tegnap] LT[-kor]',\n lastWeek: function () {\n return week.call(this, false);\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s múlva',\n past: '%s',\n s: translate,\n ss: translate,\n m: translate,\n mm: translate,\n h: translate,\n hh: translate,\n d: translate,\n dd: translate,\n M: translate,\n MM: translate,\n y: translate,\n yy: translate,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return hu;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/hu.js?", + ); + + /***/ + }, + + /***/ 7160: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Armenian [hy-am]\n//! author : Armendarabyan : https://github.com/armendarabyan\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var hyAm = moment.defineLocale('hy-am', {\n months: {\n format: 'հունվարի_փետրվարի_մարտի_ապրիլի_մայիսի_հունիսի_հուլիսի_օգոստոսի_սեպտեմբերի_հոկտեմբերի_նոյեմբերի_դեկտեմբերի'.split(\n '_'\n ),\n standalone:\n 'հունվար_փետրվար_մարտ_ապրիլ_մայիս_հունիս_հուլիս_օգոստոս_սեպտեմբեր_հոկտեմբեր_նոյեմբեր_դեկտեմբեր'.split(\n '_'\n ),\n },\n monthsShort: 'հնվ_փտր_մրտ_ապր_մյս_հնս_հլս_օգս_սպտ_հկտ_նմբ_դկտ'.split('_'),\n weekdays:\n 'կիրակի_երկուշաբթի_երեքշաբթի_չորեքշաբթի_հինգշաբթի_ուրբաթ_շաբաթ'.split(\n '_'\n ),\n weekdaysShort: 'կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ'.split('_'),\n weekdaysMin: 'կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY թ.',\n LLL: 'D MMMM YYYY թ., HH:mm',\n LLLL: 'dddd, D MMMM YYYY թ., HH:mm',\n },\n calendar: {\n sameDay: '[այսօր] LT',\n nextDay: '[վաղը] LT',\n lastDay: '[երեկ] LT',\n nextWeek: function () {\n return 'dddd [օրը ժամը] LT';\n },\n lastWeek: function () {\n return '[անցած] dddd [օրը ժամը] LT';\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s հետո',\n past: '%s առաջ',\n s: 'մի քանի վայրկյան',\n ss: '%d վայրկյան',\n m: 'րոպե',\n mm: '%d րոպե',\n h: 'ժամ',\n hh: '%d ժամ',\n d: 'օր',\n dd: '%d օր',\n M: 'ամիս',\n MM: '%d ամիս',\n y: 'տարի',\n yy: '%d տարի',\n },\n meridiemParse: /գիշերվա|առավոտվա|ցերեկվա|երեկոյան/,\n isPM: function (input) {\n return /^(ցերեկվա|երեկոյան)$/.test(input);\n },\n meridiem: function (hour) {\n if (hour < 4) {\n return 'գիշերվա';\n } else if (hour < 12) {\n return 'առավոտվա';\n } else if (hour < 17) {\n return 'ցերեկվա';\n } else {\n return 'երեկոյան';\n }\n },\n dayOfMonthOrdinalParse: /\\d{1,2}|\\d{1,2}-(ին|րդ)/,\n ordinal: function (number, period) {\n switch (period) {\n case 'DDD':\n case 'w':\n case 'W':\n case 'DDDo':\n if (number === 1) {\n return number + '-ին';\n }\n return number + '-րդ';\n default:\n return number;\n }\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return hyAm;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/hy-am.js?", + ); + + /***/ + }, + + /***/ 4063: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Indonesian [id]\n//! author : Mohammad Satrio Utomo : https://github.com/tyok\n//! reference: http://id.wikisource.org/wiki/Pedoman_Umum_Ejaan_Bahasa_Indonesia_yang_Disempurnakan\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var id = moment.defineLocale('id', {\n months: 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember'.split(\n '_'\n ),\n monthsShort: 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Agt_Sep_Okt_Nov_Des'.split('_'),\n weekdays: 'Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu'.split('_'),\n weekdaysShort: 'Min_Sen_Sel_Rab_Kam_Jum_Sab'.split('_'),\n weekdaysMin: 'Mg_Sn_Sl_Rb_Km_Jm_Sb'.split('_'),\n longDateFormat: {\n LT: 'HH.mm',\n LTS: 'HH.mm.ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY [pukul] HH.mm',\n LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm',\n },\n meridiemParse: /pagi|siang|sore|malam/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'pagi') {\n return hour;\n } else if (meridiem === 'siang') {\n return hour >= 11 ? hour : hour + 12;\n } else if (meridiem === 'sore' || meridiem === 'malam') {\n return hour + 12;\n }\n },\n meridiem: function (hours, minutes, isLower) {\n if (hours < 11) {\n return 'pagi';\n } else if (hours < 15) {\n return 'siang';\n } else if (hours < 19) {\n return 'sore';\n } else {\n return 'malam';\n }\n },\n calendar: {\n sameDay: '[Hari ini pukul] LT',\n nextDay: '[Besok pukul] LT',\n nextWeek: 'dddd [pukul] LT',\n lastDay: '[Kemarin pukul] LT',\n lastWeek: 'dddd [lalu pukul] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'dalam %s',\n past: '%s yang lalu',\n s: 'beberapa detik',\n ss: '%d detik',\n m: 'semenit',\n mm: '%d menit',\n h: 'sejam',\n hh: '%d jam',\n d: 'sehari',\n dd: '%d hari',\n M: 'sebulan',\n MM: '%d bulan',\n y: 'setahun',\n yy: '%d tahun',\n },\n week: {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n },\n });\n\n return id;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/id.js?", + ); + + /***/ + }, + + /***/ 9374: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Icelandic [is]\n//! author : Hinrik Örn Sigurðsson : https://github.com/hinrik\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function plural(n) {\n if (n % 100 === 11) {\n return true;\n } else if (n % 10 === 1) {\n return false;\n }\n return true;\n }\n function translate(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nokkrar sekúndur'\n : 'nokkrum sekúndum';\n case 'ss':\n if (plural(number)) {\n return (\n result +\n (withoutSuffix || isFuture ? 'sekúndur' : 'sekúndum')\n );\n }\n return result + 'sekúnda';\n case 'm':\n return withoutSuffix ? 'mínúta' : 'mínútu';\n case 'mm':\n if (plural(number)) {\n return (\n result + (withoutSuffix || isFuture ? 'mínútur' : 'mínútum')\n );\n } else if (withoutSuffix) {\n return result + 'mínúta';\n }\n return result + 'mínútu';\n case 'hh':\n if (plural(number)) {\n return (\n result +\n (withoutSuffix || isFuture\n ? 'klukkustundir'\n : 'klukkustundum')\n );\n }\n return result + 'klukkustund';\n case 'd':\n if (withoutSuffix) {\n return 'dagur';\n }\n return isFuture ? 'dag' : 'degi';\n case 'dd':\n if (plural(number)) {\n if (withoutSuffix) {\n return result + 'dagar';\n }\n return result + (isFuture ? 'daga' : 'dögum');\n } else if (withoutSuffix) {\n return result + 'dagur';\n }\n return result + (isFuture ? 'dag' : 'degi');\n case 'M':\n if (withoutSuffix) {\n return 'mánuður';\n }\n return isFuture ? 'mánuð' : 'mánuði';\n case 'MM':\n if (plural(number)) {\n if (withoutSuffix) {\n return result + 'mánuðir';\n }\n return result + (isFuture ? 'mánuði' : 'mánuðum');\n } else if (withoutSuffix) {\n return result + 'mánuður';\n }\n return result + (isFuture ? 'mánuð' : 'mánuði');\n case 'y':\n return withoutSuffix || isFuture ? 'ár' : 'ári';\n case 'yy':\n if (plural(number)) {\n return result + (withoutSuffix || isFuture ? 'ár' : 'árum');\n }\n return result + (withoutSuffix || isFuture ? 'ár' : 'ári');\n }\n }\n\n var is = moment.defineLocale('is', {\n months: 'janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember'.split(\n '_'\n ),\n monthsShort: 'jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des'.split('_'),\n weekdays:\n 'sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur'.split(\n '_'\n ),\n weekdaysShort: 'sun_mán_þri_mið_fim_fös_lau'.split('_'),\n weekdaysMin: 'Su_Má_Þr_Mi_Fi_Fö_La'.split('_'),\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY [kl.] H:mm',\n LLLL: 'dddd, D. MMMM YYYY [kl.] H:mm',\n },\n calendar: {\n sameDay: '[í dag kl.] LT',\n nextDay: '[á morgun kl.] LT',\n nextWeek: 'dddd [kl.] LT',\n lastDay: '[í gær kl.] LT',\n lastWeek: '[síðasta] dddd [kl.] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'eftir %s',\n past: 'fyrir %s síðan',\n s: translate,\n ss: translate,\n m: translate,\n mm: translate,\n h: 'klukkustund',\n hh: translate,\n d: translate,\n dd: translate,\n M: translate,\n MM: translate,\n y: translate,\n yy: translate,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return is;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/is.js?", + ); + + /***/ + }, + + /***/ 1827: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Italian (Switzerland) [it-ch]\n//! author : xfh : https://github.com/xfh\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var itCh = moment.defineLocale('it-ch', {\n months: 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split(\n '_'\n ),\n monthsShort: 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'),\n weekdays: 'domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato'.split(\n '_'\n ),\n weekdaysShort: 'dom_lun_mar_mer_gio_ven_sab'.split('_'),\n weekdaysMin: 'do_lu_ma_me_gi_ve_sa'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Oggi alle] LT',\n nextDay: '[Domani alle] LT',\n nextWeek: 'dddd [alle] LT',\n lastDay: '[Ieri alle] LT',\n lastWeek: function () {\n switch (this.day()) {\n case 0:\n return '[la scorsa] dddd [alle] LT';\n default:\n return '[lo scorso] dddd [alle] LT';\n }\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: function (s) {\n return (/^[0-9].+$/.test(s) ? 'tra' : 'in') + ' ' + s;\n },\n past: '%s fa',\n s: 'alcuni secondi',\n ss: '%d secondi',\n m: 'un minuto',\n mm: '%d minuti',\n h: \"un'ora\",\n hh: '%d ore',\n d: 'un giorno',\n dd: '%d giorni',\n M: 'un mese',\n MM: '%d mesi',\n y: 'un anno',\n yy: '%d anni',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal: '%dº',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return itCh;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/it-ch.js?", + ); + + /***/ + }, + + /***/ 8383: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Italian [it]\n//! author : Lorenzo : https://github.com/aliem\n//! author: Mattia Larentis: https://github.com/nostalgiaz\n//! author: Marco : https://github.com/Manfre98\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var it = moment.defineLocale('it', {\n months: 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split(\n '_'\n ),\n monthsShort: 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'),\n weekdays: 'domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato'.split(\n '_'\n ),\n weekdaysShort: 'dom_lun_mar_mer_gio_ven_sab'.split('_'),\n weekdaysMin: 'do_lu_ma_me_gi_ve_sa'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: function () {\n return (\n '[Oggi a' +\n (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : \"ll'\") +\n ']LT'\n );\n },\n nextDay: function () {\n return (\n '[Domani a' +\n (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : \"ll'\") +\n ']LT'\n );\n },\n nextWeek: function () {\n return (\n 'dddd [a' +\n (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : \"ll'\") +\n ']LT'\n );\n },\n lastDay: function () {\n return (\n '[Ieri a' +\n (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : \"ll'\") +\n ']LT'\n );\n },\n lastWeek: function () {\n switch (this.day()) {\n case 0:\n return (\n '[La scorsa] dddd [a' +\n (this.hours() > 1\n ? 'lle '\n : this.hours() === 0\n ? ' '\n : \"ll'\") +\n ']LT'\n );\n default:\n return (\n '[Lo scorso] dddd [a' +\n (this.hours() > 1\n ? 'lle '\n : this.hours() === 0\n ? ' '\n : \"ll'\") +\n ']LT'\n );\n }\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'tra %s',\n past: '%s fa',\n s: 'alcuni secondi',\n ss: '%d secondi',\n m: 'un minuto',\n mm: '%d minuti',\n h: \"un'ora\",\n hh: '%d ore',\n d: 'un giorno',\n dd: '%d giorni',\n w: 'una settimana',\n ww: '%d settimane',\n M: 'un mese',\n MM: '%d mesi',\n y: 'un anno',\n yy: '%d anni',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal: '%dº',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return it;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/it.js?", + ); + + /***/ + }, + + /***/ 3827: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Japanese [ja]\n//! author : LI Long : https://github.com/baryon\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var ja = moment.defineLocale('ja', {\n eras: [\n {\n since: '2019-05-01',\n offset: 1,\n name: '令和',\n narrow: '㋿',\n abbr: 'R',\n },\n {\n since: '1989-01-08',\n until: '2019-04-30',\n offset: 1,\n name: '平成',\n narrow: '㍻',\n abbr: 'H',\n },\n {\n since: '1926-12-25',\n until: '1989-01-07',\n offset: 1,\n name: '昭和',\n narrow: '㍼',\n abbr: 'S',\n },\n {\n since: '1912-07-30',\n until: '1926-12-24',\n offset: 1,\n name: '大正',\n narrow: '㍽',\n abbr: 'T',\n },\n {\n since: '1873-01-01',\n until: '1912-07-29',\n offset: 6,\n name: '明治',\n narrow: '㍾',\n abbr: 'M',\n },\n {\n since: '0001-01-01',\n until: '1873-12-31',\n offset: 1,\n name: '西暦',\n narrow: 'AD',\n abbr: 'AD',\n },\n {\n since: '0000-12-31',\n until: -Infinity,\n offset: 1,\n name: '紀元前',\n narrow: 'BC',\n abbr: 'BC',\n },\n ],\n eraYearOrdinalRegex: /(元|\\d+)年/,\n eraYearOrdinalParse: function (input, match) {\n return match[1] === '元' ? 1 : parseInt(match[1] || input, 10);\n },\n months: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),\n monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(\n '_'\n ),\n weekdays: '日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日'.split('_'),\n weekdaysShort: '日_月_火_水_木_金_土'.split('_'),\n weekdaysMin: '日_月_火_水_木_金_土'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'YYYY/MM/DD',\n LL: 'YYYY年M月D日',\n LLL: 'YYYY年M月D日 HH:mm',\n LLLL: 'YYYY年M月D日 dddd HH:mm',\n l: 'YYYY/MM/DD',\n ll: 'YYYY年M月D日',\n lll: 'YYYY年M月D日 HH:mm',\n llll: 'YYYY年M月D日(ddd) HH:mm',\n },\n meridiemParse: /午前|午後/i,\n isPM: function (input) {\n return input === '午後';\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 12) {\n return '午前';\n } else {\n return '午後';\n }\n },\n calendar: {\n sameDay: '[今日] LT',\n nextDay: '[明日] LT',\n nextWeek: function (now) {\n if (now.week() !== this.week()) {\n return '[来週]dddd LT';\n } else {\n return 'dddd LT';\n }\n },\n lastDay: '[昨日] LT',\n lastWeek: function (now) {\n if (this.week() !== now.week()) {\n return '[先週]dddd LT';\n } else {\n return 'dddd LT';\n }\n },\n sameElse: 'L',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}日/,\n ordinal: function (number, period) {\n switch (period) {\n case 'y':\n return number === 1 ? '元年' : number + '年';\n case 'd':\n case 'D':\n case 'DDD':\n return number + '日';\n default:\n return number;\n }\n },\n relativeTime: {\n future: '%s後',\n past: '%s前',\n s: '数秒',\n ss: '%d秒',\n m: '1分',\n mm: '%d分',\n h: '1時間',\n hh: '%d時間',\n d: '1日',\n dd: '%d日',\n M: '1ヶ月',\n MM: '%dヶ月',\n y: '1年',\n yy: '%d年',\n },\n });\n\n return ja;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/ja.js?", + ); + + /***/ + }, + + /***/ 9722: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Javanese [jv]\n//! author : Rony Lantip : https://github.com/lantip\n//! reference: http://jv.wikipedia.org/wiki/Basa_Jawa\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var jv = moment.defineLocale('jv', {\n months: 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_Nopember_Desember'.split(\n '_'\n ),\n monthsShort: 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nop_Des'.split('_'),\n weekdays: 'Minggu_Senen_Seloso_Rebu_Kemis_Jemuwah_Septu'.split('_'),\n weekdaysShort: 'Min_Sen_Sel_Reb_Kem_Jem_Sep'.split('_'),\n weekdaysMin: 'Mg_Sn_Sl_Rb_Km_Jm_Sp'.split('_'),\n longDateFormat: {\n LT: 'HH.mm',\n LTS: 'HH.mm.ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY [pukul] HH.mm',\n LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm',\n },\n meridiemParse: /enjing|siyang|sonten|ndalu/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'enjing') {\n return hour;\n } else if (meridiem === 'siyang') {\n return hour >= 11 ? hour : hour + 12;\n } else if (meridiem === 'sonten' || meridiem === 'ndalu') {\n return hour + 12;\n }\n },\n meridiem: function (hours, minutes, isLower) {\n if (hours < 11) {\n return 'enjing';\n } else if (hours < 15) {\n return 'siyang';\n } else if (hours < 19) {\n return 'sonten';\n } else {\n return 'ndalu';\n }\n },\n calendar: {\n sameDay: '[Dinten puniko pukul] LT',\n nextDay: '[Mbenjang pukul] LT',\n nextWeek: 'dddd [pukul] LT',\n lastDay: '[Kala wingi pukul] LT',\n lastWeek: 'dddd [kepengker pukul] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'wonten ing %s',\n past: '%s ingkang kepengker',\n s: 'sawetawis detik',\n ss: '%d detik',\n m: 'setunggal menit',\n mm: '%d menit',\n h: 'setunggal jam',\n hh: '%d jam',\n d: 'sedinten',\n dd: '%d dinten',\n M: 'sewulan',\n MM: '%d wulan',\n y: 'setaun',\n yy: '%d taun',\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return jv;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/jv.js?", + ); + + /***/ + }, + + /***/ 1794: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Georgian [ka]\n//! author : Irakli Janiashvili : https://github.com/IrakliJani\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var ka = moment.defineLocale('ka', {\n months: 'იანვარი_თებერვალი_მარტი_აპრილი_მაისი_ივნისი_ივლისი_აგვისტო_სექტემბერი_ოქტომბერი_ნოემბერი_დეკემბერი'.split(\n '_'\n ),\n monthsShort: 'იან_თებ_მარ_აპრ_მაი_ივნ_ივლ_აგვ_სექ_ოქტ_ნოე_დეკ'.split('_'),\n weekdays: {\n standalone:\n 'კვირა_ორშაბათი_სამშაბათი_ოთხშაბათი_ხუთშაბათი_პარასკევი_შაბათი'.split(\n '_'\n ),\n format: 'კვირას_ორშაბათს_სამშაბათს_ოთხშაბათს_ხუთშაბათს_პარასკევს_შაბათს'.split(\n '_'\n ),\n isFormat: /(წინა|შემდეგ)/,\n },\n weekdaysShort: 'კვი_ორშ_სამ_ოთხ_ხუთ_პარ_შაბ'.split('_'),\n weekdaysMin: 'კვ_ორ_სა_ოთ_ხუ_პა_შა'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[დღეს] LT[-ზე]',\n nextDay: '[ხვალ] LT[-ზე]',\n lastDay: '[გუშინ] LT[-ზე]',\n nextWeek: '[შემდეგ] dddd LT[-ზე]',\n lastWeek: '[წინა] dddd LT-ზე',\n sameElse: 'L',\n },\n relativeTime: {\n future: function (s) {\n return s.replace(\n /(წამ|წუთ|საათ|წელ|დღ|თვ)(ი|ე)/,\n function ($0, $1, $2) {\n return $2 === 'ი' ? $1 + 'ში' : $1 + $2 + 'ში';\n }\n );\n },\n past: function (s) {\n if (/(წამი|წუთი|საათი|დღე|თვე)/.test(s)) {\n return s.replace(/(ი|ე)$/, 'ის წინ');\n }\n if (/წელი/.test(s)) {\n return s.replace(/წელი$/, 'წლის წინ');\n }\n return s;\n },\n s: 'რამდენიმე წამი',\n ss: '%d წამი',\n m: 'წუთი',\n mm: '%d წუთი',\n h: 'საათი',\n hh: '%d საათი',\n d: 'დღე',\n dd: '%d დღე',\n M: 'თვე',\n MM: '%d თვე',\n y: 'წელი',\n yy: '%d წელი',\n },\n dayOfMonthOrdinalParse: /0|1-ლი|მე-\\d{1,2}|\\d{1,2}-ე/,\n ordinal: function (number) {\n if (number === 0) {\n return number;\n }\n if (number === 1) {\n return number + '-ლი';\n }\n if (\n number < 20 ||\n (number <= 100 && number % 20 === 0) ||\n number % 100 === 0\n ) {\n return 'მე-' + number;\n }\n return number + '-ე';\n },\n week: {\n dow: 1,\n doy: 7,\n },\n });\n\n return ka;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/ka.js?", + ); + + /***/ + }, + + /***/ 7088: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Kazakh [kk]\n//! authors : Nurlan Rakhimzhanov : https://github.com/nurlan\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var suffixes = {\n 0: '-ші',\n 1: '-ші',\n 2: '-ші',\n 3: '-ші',\n 4: '-ші',\n 5: '-ші',\n 6: '-шы',\n 7: '-ші',\n 8: '-ші',\n 9: '-шы',\n 10: '-шы',\n 20: '-шы',\n 30: '-шы',\n 40: '-шы',\n 50: '-ші',\n 60: '-шы',\n 70: '-ші',\n 80: '-ші',\n 90: '-шы',\n 100: '-ші',\n };\n\n var kk = moment.defineLocale('kk', {\n months: 'қаңтар_ақпан_наурыз_сәуір_мамыр_маусым_шілде_тамыз_қыркүйек_қазан_қараша_желтоқсан'.split(\n '_'\n ),\n monthsShort: 'қаң_ақп_нау_сәу_мам_мау_шіл_там_қыр_қаз_қар_жел'.split('_'),\n weekdays: 'жексенбі_дүйсенбі_сейсенбі_сәрсенбі_бейсенбі_жұма_сенбі'.split(\n '_'\n ),\n weekdaysShort: 'жек_дүй_сей_сәр_бей_жұм_сен'.split('_'),\n weekdaysMin: 'жк_дй_сй_ср_бй_жм_сн'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Бүгін сағат] LT',\n nextDay: '[Ертең сағат] LT',\n nextWeek: 'dddd [сағат] LT',\n lastDay: '[Кеше сағат] LT',\n lastWeek: '[Өткен аптаның] dddd [сағат] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s ішінде',\n past: '%s бұрын',\n s: 'бірнеше секунд',\n ss: '%d секунд',\n m: 'бір минут',\n mm: '%d минут',\n h: 'бір сағат',\n hh: '%d сағат',\n d: 'бір күн',\n dd: '%d күн',\n M: 'бір ай',\n MM: '%d ай',\n y: 'бір жыл',\n yy: '%d жыл',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-(ші|шы)/,\n ordinal: function (number) {\n var a = number % 10,\n b = number >= 100 ? 100 : null;\n return number + (suffixes[number] || suffixes[a] || suffixes[b]);\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return kk;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/kk.js?", + ); + + /***/ + }, + + /***/ 6870: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Cambodian [km]\n//! author : Kruy Vanna : https://github.com/kruyvanna\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var symbolMap = {\n 1: '១',\n 2: '២',\n 3: '៣',\n 4: '៤',\n 5: '៥',\n 6: '៦',\n 7: '៧',\n 8: '៨',\n 9: '៩',\n 0: '០',\n },\n numberMap = {\n '១': '1',\n '២': '2',\n '៣': '3',\n '៤': '4',\n '៥': '5',\n '៦': '6',\n '៧': '7',\n '៨': '8',\n '៩': '9',\n '០': '0',\n };\n\n var km = moment.defineLocale('km', {\n months: 'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split(\n '_'\n ),\n monthsShort:\n 'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split(\n '_'\n ),\n weekdays: 'អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍'.split('_'),\n weekdaysShort: 'អា_ច_អ_ព_ព្រ_សុ_ស'.split('_'),\n weekdaysMin: 'អា_ច_អ_ព_ព្រ_សុ_ស'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n meridiemParse: /ព្រឹក|ល្ងាច/,\n isPM: function (input) {\n return input === 'ល្ងាច';\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 12) {\n return 'ព្រឹក';\n } else {\n return 'ល្ងាច';\n }\n },\n calendar: {\n sameDay: '[ថ្ងៃនេះ ម៉ោង] LT',\n nextDay: '[ស្អែក ម៉ោង] LT',\n nextWeek: 'dddd [ម៉ោង] LT',\n lastDay: '[ម្សិលមិញ ម៉ោង] LT',\n lastWeek: 'dddd [សប្តាហ៍មុន] [ម៉ោង] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%sទៀត',\n past: '%sមុន',\n s: 'ប៉ុន្មានវិនាទី',\n ss: '%d វិនាទី',\n m: 'មួយនាទី',\n mm: '%d នាទី',\n h: 'មួយម៉ោង',\n hh: '%d ម៉ោង',\n d: 'មួយថ្ងៃ',\n dd: '%d ថ្ងៃ',\n M: 'មួយខែ',\n MM: '%d ខែ',\n y: 'មួយឆ្នាំ',\n yy: '%d ឆ្នាំ',\n },\n dayOfMonthOrdinalParse: /ទី\\d{1,2}/,\n ordinal: 'ទី%d',\n preparse: function (string) {\n return string.replace(/[១២៣៤៥៦៧៨៩០]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function (string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return km;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/km.js?", + ); + + /***/ + }, + + /***/ 4451: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Kannada [kn]\n//! author : Rajeev Naik : https://github.com/rajeevnaikte\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var symbolMap = {\n 1: '೧',\n 2: '೨',\n 3: '೩',\n 4: '೪',\n 5: '೫',\n 6: '೬',\n 7: '೭',\n 8: '೮',\n 9: '೯',\n 0: '೦',\n },\n numberMap = {\n '೧': '1',\n '೨': '2',\n '೩': '3',\n '೪': '4',\n '೫': '5',\n '೬': '6',\n '೭': '7',\n '೮': '8',\n '೯': '9',\n '೦': '0',\n };\n\n var kn = moment.defineLocale('kn', {\n months: 'ಜನವರಿ_ಫೆಬ್ರವರಿ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂಬರ್_ಅಕ್ಟೋಬರ್_ನವೆಂಬರ್_ಡಿಸೆಂಬರ್'.split(\n '_'\n ),\n monthsShort:\n 'ಜನ_ಫೆಬ್ರ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂ_ಅಕ್ಟೋ_ನವೆಂ_ಡಿಸೆಂ'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays: 'ಭಾನುವಾರ_ಸೋಮವಾರ_ಮಂಗಳವಾರ_ಬುಧವಾರ_ಗುರುವಾರ_ಶುಕ್ರವಾರ_ಶನಿವಾರ'.split(\n '_'\n ),\n weekdaysShort: 'ಭಾನು_ಸೋಮ_ಮಂಗಳ_ಬುಧ_ಗುರು_ಶುಕ್ರ_ಶನಿ'.split('_'),\n weekdaysMin: 'ಭಾ_ಸೋ_ಮಂ_ಬು_ಗು_ಶು_ಶ'.split('_'),\n longDateFormat: {\n LT: 'A h:mm',\n LTS: 'A h:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, A h:mm',\n LLLL: 'dddd, D MMMM YYYY, A h:mm',\n },\n calendar: {\n sameDay: '[ಇಂದು] LT',\n nextDay: '[ನಾಳೆ] LT',\n nextWeek: 'dddd, LT',\n lastDay: '[ನಿನ್ನೆ] LT',\n lastWeek: '[ಕೊನೆಯ] dddd, LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s ನಂತರ',\n past: '%s ಹಿಂದೆ',\n s: 'ಕೆಲವು ಕ್ಷಣಗಳು',\n ss: '%d ಸೆಕೆಂಡುಗಳು',\n m: 'ಒಂದು ನಿಮಿಷ',\n mm: '%d ನಿಮಿಷ',\n h: 'ಒಂದು ಗಂಟೆ',\n hh: '%d ಗಂಟೆ',\n d: 'ಒಂದು ದಿನ',\n dd: '%d ದಿನ',\n M: 'ಒಂದು ತಿಂಗಳು',\n MM: '%d ತಿಂಗಳು',\n y: 'ಒಂದು ವರ್ಷ',\n yy: '%d ವರ್ಷ',\n },\n preparse: function (string) {\n return string.replace(/[೧೨೩೪೫೬೭೮೯೦]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function (string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n meridiemParse: /ರಾತ್ರಿ|ಬೆಳಿಗ್ಗೆ|ಮಧ್ಯಾಹ್ನ|ಸಂಜೆ/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'ರಾತ್ರಿ') {\n return hour < 4 ? hour : hour + 12;\n } else if (meridiem === 'ಬೆಳಿಗ್ಗೆ') {\n return hour;\n } else if (meridiem === 'ಮಧ್ಯಾಹ್ನ') {\n return hour >= 10 ? hour : hour + 12;\n } else if (meridiem === 'ಸಂಜೆ') {\n return hour + 12;\n }\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 4) {\n return 'ರಾತ್ರಿ';\n } else if (hour < 10) {\n return 'ಬೆಳಿಗ್ಗೆ';\n } else if (hour < 17) {\n return 'ಮಧ್ಯಾಹ್ನ';\n } else if (hour < 20) {\n return 'ಸಂಜೆ';\n } else {\n return 'ರಾತ್ರಿ';\n }\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(ನೇ)/,\n ordinal: function (number) {\n return number + 'ನೇ';\n },\n week: {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n },\n });\n\n return kn;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/kn.js?", + ); + + /***/ + }, + + /***/ 3164: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Korean [ko]\n//! author : Kyungwook, Park : https://github.com/kyungw00k\n//! author : Jeeeyul Lee <jeeeyul@gmail.com>\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var ko = moment.defineLocale('ko', {\n months: '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split('_'),\n monthsShort: '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split(\n '_'\n ),\n weekdays: '일요일_월요일_화요일_수요일_목요일_금요일_토요일'.split('_'),\n weekdaysShort: '일_월_화_수_목_금_토'.split('_'),\n weekdaysMin: '일_월_화_수_목_금_토'.split('_'),\n longDateFormat: {\n LT: 'A h:mm',\n LTS: 'A h:mm:ss',\n L: 'YYYY.MM.DD.',\n LL: 'YYYY년 MMMM D일',\n LLL: 'YYYY년 MMMM D일 A h:mm',\n LLLL: 'YYYY년 MMMM D일 dddd A h:mm',\n l: 'YYYY.MM.DD.',\n ll: 'YYYY년 MMMM D일',\n lll: 'YYYY년 MMMM D일 A h:mm',\n llll: 'YYYY년 MMMM D일 dddd A h:mm',\n },\n calendar: {\n sameDay: '오늘 LT',\n nextDay: '내일 LT',\n nextWeek: 'dddd LT',\n lastDay: '어제 LT',\n lastWeek: '지난주 dddd LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s 후',\n past: '%s 전',\n s: '몇 초',\n ss: '%d초',\n m: '1분',\n mm: '%d분',\n h: '한 시간',\n hh: '%d시간',\n d: '하루',\n dd: '%d일',\n M: '한 달',\n MM: '%d달',\n y: '일 년',\n yy: '%d년',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(일|월|주)/,\n ordinal: function (number, period) {\n switch (period) {\n case 'd':\n case 'D':\n case 'DDD':\n return number + '일';\n case 'M':\n return number + '월';\n case 'w':\n case 'W':\n return number + '주';\n default:\n return number;\n }\n },\n meridiemParse: /오전|오후/,\n isPM: function (token) {\n return token === '오후';\n },\n meridiem: function (hour, minute, isUpper) {\n return hour < 12 ? '오전' : '오후';\n },\n });\n\n return ko;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/ko.js?", + ); + + /***/ + }, + + /***/ 6181: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Northern Kurdish [ku-kmr]\n//! authors : Mazlum Özdogan : https://github.com/mergehez\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function processRelativeTime(num, withoutSuffix, key, isFuture) {\n var format = {\n s: ['çend sanîye', 'çend sanîyeyan'],\n ss: [num + ' sanîye', num + ' sanîyeyan'],\n m: ['deqîqeyek', 'deqîqeyekê'],\n mm: [num + ' deqîqe', num + ' deqîqeyan'],\n h: ['saetek', 'saetekê'],\n hh: [num + ' saet', num + ' saetan'],\n d: ['rojek', 'rojekê'],\n dd: [num + ' roj', num + ' rojan'],\n w: ['hefteyek', 'hefteyekê'],\n ww: [num + ' hefte', num + ' hefteyan'],\n M: ['mehek', 'mehekê'],\n MM: [num + ' meh', num + ' mehan'],\n y: ['salek', 'salekê'],\n yy: [num + ' sal', num + ' salan'],\n };\n return withoutSuffix ? format[key][0] : format[key][1];\n }\n // function obliqueNumSuffix(num) {\n // if(num.includes(':'))\n // num = parseInt(num.split(':')[0]);\n // else\n // num = parseInt(num);\n // return num == 0 || num % 10 == 1 ? 'ê'\n // : (num > 10 && num % 10 == 0 ? 'î' : 'an');\n // }\n function ezafeNumSuffix(num) {\n num = '' + num;\n var l = num.substring(num.length - 1),\n ll = num.length > 1 ? num.substring(num.length - 2) : '';\n if (\n !(ll == 12 || ll == 13) &&\n (l == '2' || l == '3' || ll == '50' || l == '70' || l == '80')\n )\n return 'yê';\n return 'ê';\n }\n\n var kuKmr = moment.defineLocale('ku-kmr', {\n // According to the spelling rules defined by the work group of Weqfa Mezopotamyayê (Mesopotamia Foundation)\n // this should be: 'Kanûna Paşîn_Sibat_Adar_Nîsan_Gulan_Hezîran_Tîrmeh_Tebax_Îlon_Çirîya Pêşîn_Çirîya Paşîn_Kanûna Pêşîn'\n // But the names below are more well known and handy\n months: 'Rêbendan_Sibat_Adar_Nîsan_Gulan_Hezîran_Tîrmeh_Tebax_Îlon_Cotmeh_Mijdar_Berfanbar'.split(\n '_'\n ),\n monthsShort: 'Rêb_Sib_Ada_Nîs_Gul_Hez_Tîr_Teb_Îlo_Cot_Mij_Ber'.split('_'),\n monthsParseExact: true,\n weekdays: 'Yekşem_Duşem_Sêşem_Çarşem_Pêncşem_În_Şemî'.split('_'),\n weekdaysShort: 'Yek_Du_Sê_Çar_Pên_În_Şem'.split('_'),\n weekdaysMin: 'Ye_Du_Sê_Ça_Pê_În_Şe'.split('_'),\n meridiem: function (hours, minutes, isLower) {\n if (hours < 12) {\n return isLower ? 'bn' : 'BN';\n } else {\n return isLower ? 'pn' : 'PN';\n }\n },\n meridiemParse: /bn|BN|pn|PN/,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'Do MMMM[a] YYYY[an]',\n LLL: 'Do MMMM[a] YYYY[an] HH:mm',\n LLLL: 'dddd, Do MMMM[a] YYYY[an] HH:mm',\n ll: 'Do MMM[.] YYYY[an]',\n lll: 'Do MMM[.] YYYY[an] HH:mm',\n llll: 'ddd[.], Do MMM[.] YYYY[an] HH:mm',\n },\n calendar: {\n sameDay: '[Îro di saet] LT [de]',\n nextDay: '[Sibê di saet] LT [de]',\n nextWeek: 'dddd [di saet] LT [de]',\n lastDay: '[Duh di saet] LT [de]',\n lastWeek: 'dddd[a borî di saet] LT [de]',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'di %s de',\n past: 'berî %s',\n s: processRelativeTime,\n ss: processRelativeTime,\n m: processRelativeTime,\n mm: processRelativeTime,\n h: processRelativeTime,\n hh: processRelativeTime,\n d: processRelativeTime,\n dd: processRelativeTime,\n w: processRelativeTime,\n ww: processRelativeTime,\n M: processRelativeTime,\n MM: processRelativeTime,\n y: processRelativeTime,\n yy: processRelativeTime,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(?:yê|ê|\\.)/,\n ordinal: function (num, period) {\n var p = period.toLowerCase();\n if (p.includes('w') || p.includes('m')) return num + '.';\n\n return num + ezafeNumSuffix(num);\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return kuKmr;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/ku-kmr.js?", + ); + + /***/ + }, + + /***/ 8174: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Kurdish [ku]\n//! author : Shahram Mebashar : https://github.com/ShahramMebashar\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var symbolMap = {\n 1: '١',\n 2: '٢',\n 3: '٣',\n 4: '٤',\n 5: '٥',\n 6: '٦',\n 7: '٧',\n 8: '٨',\n 9: '٩',\n 0: '٠',\n },\n numberMap = {\n '١': '1',\n '٢': '2',\n '٣': '3',\n '٤': '4',\n '٥': '5',\n '٦': '6',\n '٧': '7',\n '٨': '8',\n '٩': '9',\n '٠': '0',\n },\n months = [\n 'کانونی دووەم',\n 'شوبات',\n 'ئازار',\n 'نیسان',\n 'ئایار',\n 'حوزەیران',\n 'تەمموز',\n 'ئاب',\n 'ئەیلوول',\n 'تشرینی یەكەم',\n 'تشرینی دووەم',\n 'كانونی یەکەم',\n ];\n\n var ku = moment.defineLocale('ku', {\n months: months,\n monthsShort: months,\n weekdays:\n 'یه‌كشه‌ممه‌_دووشه‌ممه‌_سێشه‌ممه‌_چوارشه‌ممه‌_پێنجشه‌ممه‌_هه‌ینی_شه‌ممه‌'.split(\n '_'\n ),\n weekdaysShort:\n 'یه‌كشه‌م_دووشه‌م_سێشه‌م_چوارشه‌م_پێنجشه‌م_هه‌ینی_شه‌ممه‌'.split('_'),\n weekdaysMin: 'ی_د_س_چ_پ_ه_ش'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n meridiemParse: /ئێواره‌|به‌یانی/,\n isPM: function (input) {\n return /ئێواره‌/.test(input);\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 12) {\n return 'به‌یانی';\n } else {\n return 'ئێواره‌';\n }\n },\n calendar: {\n sameDay: '[ئه‌مرۆ كاتژمێر] LT',\n nextDay: '[به‌یانی كاتژمێر] LT',\n nextWeek: 'dddd [كاتژمێر] LT',\n lastDay: '[دوێنێ كاتژمێر] LT',\n lastWeek: 'dddd [كاتژمێر] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'له‌ %s',\n past: '%s',\n s: 'چه‌ند چركه‌یه‌ك',\n ss: 'چركه‌ %d',\n m: 'یه‌ك خوله‌ك',\n mm: '%d خوله‌ك',\n h: 'یه‌ك كاتژمێر',\n hh: '%d كاتژمێر',\n d: 'یه‌ك ڕۆژ',\n dd: '%d ڕۆژ',\n M: 'یه‌ك مانگ',\n MM: '%d مانگ',\n y: 'یه‌ك ساڵ',\n yy: '%d ساڵ',\n },\n preparse: function (string) {\n return string\n .replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {\n return numberMap[match];\n })\n .replace(/،/g, ',');\n },\n postformat: function (string) {\n return string\n .replace(/\\d/g, function (match) {\n return symbolMap[match];\n })\n .replace(/,/g, '،');\n },\n week: {\n dow: 6, // Saturday is the first day of the week.\n doy: 12, // The week that contains Jan 12th is the first week of the year.\n },\n });\n\n return ku;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/ku.js?", + ); + + /***/ + }, + + /***/ 8474: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Kyrgyz [ky]\n//! author : Chyngyz Arystan uulu : https://github.com/chyngyz\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var suffixes = {\n 0: '-чү',\n 1: '-чи',\n 2: '-чи',\n 3: '-чү',\n 4: '-чү',\n 5: '-чи',\n 6: '-чы',\n 7: '-чи',\n 8: '-чи',\n 9: '-чу',\n 10: '-чу',\n 20: '-чы',\n 30: '-чу',\n 40: '-чы',\n 50: '-чү',\n 60: '-чы',\n 70: '-чи',\n 80: '-чи',\n 90: '-чу',\n 100: '-чү',\n };\n\n var ky = moment.defineLocale('ky', {\n months: 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split(\n '_'\n ),\n monthsShort: 'янв_фев_март_апр_май_июнь_июль_авг_сен_окт_ноя_дек'.split(\n '_'\n ),\n weekdays: 'Жекшемби_Дүйшөмбү_Шейшемби_Шаршемби_Бейшемби_Жума_Ишемби'.split(\n '_'\n ),\n weekdaysShort: 'Жек_Дүй_Шей_Шар_Бей_Жум_Ише'.split('_'),\n weekdaysMin: 'Жк_Дй_Шй_Шр_Бй_Жм_Иш'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Бүгүн саат] LT',\n nextDay: '[Эртең саат] LT',\n nextWeek: 'dddd [саат] LT',\n lastDay: '[Кечээ саат] LT',\n lastWeek: '[Өткөн аптанын] dddd [күнү] [саат] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s ичинде',\n past: '%s мурун',\n s: 'бирнече секунд',\n ss: '%d секунд',\n m: 'бир мүнөт',\n mm: '%d мүнөт',\n h: 'бир саат',\n hh: '%d саат',\n d: 'бир күн',\n dd: '%d күн',\n M: 'бир ай',\n MM: '%d ай',\n y: 'бир жыл',\n yy: '%d жыл',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-(чи|чы|чү|чу)/,\n ordinal: function (number) {\n var a = number % 10,\n b = number >= 100 ? 100 : null;\n return number + (suffixes[number] || suffixes[a] || suffixes[b]);\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return ky;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/ky.js?", + ); + + /***/ + }, + + /***/ 9680: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Luxembourgish [lb]\n//! author : mweimerskirch : https://github.com/mweimerskirch\n//! author : David Raison : https://github.com/kwisatz\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var format = {\n m: ['eng Minutt', 'enger Minutt'],\n h: ['eng Stonn', 'enger Stonn'],\n d: ['een Dag', 'engem Dag'],\n M: ['ee Mount', 'engem Mount'],\n y: ['ee Joer', 'engem Joer'],\n };\n return withoutSuffix ? format[key][0] : format[key][1];\n }\n function processFutureTime(string) {\n var number = string.substr(0, string.indexOf(' '));\n if (eifelerRegelAppliesToNumber(number)) {\n return 'a ' + string;\n }\n return 'an ' + string;\n }\n function processPastTime(string) {\n var number = string.substr(0, string.indexOf(' '));\n if (eifelerRegelAppliesToNumber(number)) {\n return 'viru ' + string;\n }\n return 'virun ' + string;\n }\n /**\n * Returns true if the word before the given number loses the '-n' ending.\n * e.g. 'an 10 Deeg' but 'a 5 Deeg'\n *\n * @param number {integer}\n * @returns {boolean}\n */\n function eifelerRegelAppliesToNumber(number) {\n number = parseInt(number, 10);\n if (isNaN(number)) {\n return false;\n }\n if (number < 0) {\n // Negative Number --> always true\n return true;\n } else if (number < 10) {\n // Only 1 digit\n if (4 <= number && number <= 7) {\n return true;\n }\n return false;\n } else if (number < 100) {\n // 2 digits\n var lastDigit = number % 10,\n firstDigit = number / 10;\n if (lastDigit === 0) {\n return eifelerRegelAppliesToNumber(firstDigit);\n }\n return eifelerRegelAppliesToNumber(lastDigit);\n } else if (number < 10000) {\n // 3 or 4 digits --> recursively check first digit\n while (number >= 10) {\n number = number / 10;\n }\n return eifelerRegelAppliesToNumber(number);\n } else {\n // Anything larger than 4 digits: recursively check first n-3 digits\n number = number / 1000;\n return eifelerRegelAppliesToNumber(number);\n }\n }\n\n var lb = moment.defineLocale('lb', {\n months: 'Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember'.split(\n '_'\n ),\n monthsShort:\n 'Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays:\n 'Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg'.split(\n '_'\n ),\n weekdaysShort: 'So._Mé._Dë._Më._Do._Fr._Sa.'.split('_'),\n weekdaysMin: 'So_Mé_Dë_Më_Do_Fr_Sa'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm [Auer]',\n LTS: 'H:mm:ss [Auer]',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY H:mm [Auer]',\n LLLL: 'dddd, D. MMMM YYYY H:mm [Auer]',\n },\n calendar: {\n sameDay: '[Haut um] LT',\n sameElse: 'L',\n nextDay: '[Muer um] LT',\n nextWeek: 'dddd [um] LT',\n lastDay: '[Gëschter um] LT',\n lastWeek: function () {\n // Different date string for 'Dënschdeg' (Tuesday) and 'Donneschdeg' (Thursday) due to phonological rule\n switch (this.day()) {\n case 2:\n case 4:\n return '[Leschten] dddd [um] LT';\n default:\n return '[Leschte] dddd [um] LT';\n }\n },\n },\n relativeTime: {\n future: processFutureTime,\n past: processPastTime,\n s: 'e puer Sekonnen',\n ss: '%d Sekonnen',\n m: processRelativeTime,\n mm: '%d Minutten',\n h: processRelativeTime,\n hh: '%d Stonnen',\n d: processRelativeTime,\n dd: '%d Deeg',\n M: processRelativeTime,\n MM: '%d Méint',\n y: processRelativeTime,\n yy: '%d Joer',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return lb;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/lb.js?", + ); + + /***/ + }, + + /***/ 5867: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Lao [lo]\n//! author : Ryan Hart : https://github.com/ryanhart2\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var lo = moment.defineLocale('lo', {\n months: 'ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ'.split(\n '_'\n ),\n monthsShort:\n 'ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ'.split(\n '_'\n ),\n weekdays: 'ອາທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ'.split('_'),\n weekdaysShort: 'ທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ'.split('_'),\n weekdaysMin: 'ທ_ຈ_ອຄ_ພ_ພຫ_ສກ_ສ'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'ວັນdddd D MMMM YYYY HH:mm',\n },\n meridiemParse: /ຕອນເຊົ້າ|ຕອນແລງ/,\n isPM: function (input) {\n return input === 'ຕອນແລງ';\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 12) {\n return 'ຕອນເຊົ້າ';\n } else {\n return 'ຕອນແລງ';\n }\n },\n calendar: {\n sameDay: '[ມື້ນີ້ເວລາ] LT',\n nextDay: '[ມື້ອື່ນເວລາ] LT',\n nextWeek: '[ວັນ]dddd[ໜ້າເວລາ] LT',\n lastDay: '[ມື້ວານນີ້ເວລາ] LT',\n lastWeek: '[ວັນ]dddd[ແລ້ວນີ້ເວລາ] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'ອີກ %s',\n past: '%sຜ່ານມາ',\n s: 'ບໍ່ເທົ່າໃດວິນາທີ',\n ss: '%d ວິນາທີ',\n m: '1 ນາທີ',\n mm: '%d ນາທີ',\n h: '1 ຊົ່ວໂມງ',\n hh: '%d ຊົ່ວໂມງ',\n d: '1 ມື້',\n dd: '%d ມື້',\n M: '1 ເດືອນ',\n MM: '%d ເດືອນ',\n y: '1 ປີ',\n yy: '%d ປີ',\n },\n dayOfMonthOrdinalParse: /(ທີ່)\\d{1,2}/,\n ordinal: function (number) {\n return 'ທີ່' + number;\n },\n });\n\n return lo;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/lo.js?", + ); + + /***/ + }, + + /***/ 5766: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Lithuanian [lt]\n//! author : Mindaugas Mozūras : https://github.com/mmozuras\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var units = {\n ss: 'sekundė_sekundžių_sekundes',\n m: 'minutė_minutės_minutę',\n mm: 'minutės_minučių_minutes',\n h: 'valanda_valandos_valandą',\n hh: 'valandos_valandų_valandas',\n d: 'diena_dienos_dieną',\n dd: 'dienos_dienų_dienas',\n M: 'mėnuo_mėnesio_mėnesį',\n MM: 'mėnesiai_mėnesių_mėnesius',\n y: 'metai_metų_metus',\n yy: 'metai_metų_metus',\n };\n function translateSeconds(number, withoutSuffix, key, isFuture) {\n if (withoutSuffix) {\n return 'kelios sekundės';\n } else {\n return isFuture ? 'kelių sekundžių' : 'kelias sekundes';\n }\n }\n function translateSingular(number, withoutSuffix, key, isFuture) {\n return withoutSuffix\n ? forms(key)[0]\n : isFuture\n ? forms(key)[1]\n : forms(key)[2];\n }\n function special(number) {\n return number % 10 === 0 || (number > 10 && number < 20);\n }\n function forms(key) {\n return units[key].split('_');\n }\n function translate(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n if (number === 1) {\n return (\n result + translateSingular(number, withoutSuffix, key[0], isFuture)\n );\n } else if (withoutSuffix) {\n return result + (special(number) ? forms(key)[1] : forms(key)[0]);\n } else {\n if (isFuture) {\n return result + forms(key)[1];\n } else {\n return result + (special(number) ? forms(key)[1] : forms(key)[2]);\n }\n }\n }\n var lt = moment.defineLocale('lt', {\n months: {\n format: 'sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio'.split(\n '_'\n ),\n standalone:\n 'sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis'.split(\n '_'\n ),\n isFormat: /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?|MMMM?(\\[[^\\[\\]]*\\]|\\s)+D[oD]?/,\n },\n monthsShort: 'sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd'.split('_'),\n weekdays: {\n format: 'sekmadienį_pirmadienį_antradienį_trečiadienį_ketvirtadienį_penktadienį_šeštadienį'.split(\n '_'\n ),\n standalone:\n 'sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis'.split(\n '_'\n ),\n isFormat: /dddd HH:mm/,\n },\n weekdaysShort: 'Sek_Pir_Ant_Tre_Ket_Pen_Šeš'.split('_'),\n weekdaysMin: 'S_P_A_T_K_Pn_Š'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'YYYY-MM-DD',\n LL: 'YYYY [m.] MMMM D [d.]',\n LLL: 'YYYY [m.] MMMM D [d.], HH:mm [val.]',\n LLLL: 'YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]',\n l: 'YYYY-MM-DD',\n ll: 'YYYY [m.] MMMM D [d.]',\n lll: 'YYYY [m.] MMMM D [d.], HH:mm [val.]',\n llll: 'YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]',\n },\n calendar: {\n sameDay: '[Šiandien] LT',\n nextDay: '[Rytoj] LT',\n nextWeek: 'dddd LT',\n lastDay: '[Vakar] LT',\n lastWeek: '[Praėjusį] dddd LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'po %s',\n past: 'prieš %s',\n s: translateSeconds,\n ss: translate,\n m: translateSingular,\n mm: translate,\n h: translateSingular,\n hh: translate,\n d: translateSingular,\n dd: translate,\n M: translateSingular,\n MM: translate,\n y: translateSingular,\n yy: translate,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-oji/,\n ordinal: function (number) {\n return number + '-oji';\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return lt;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/lt.js?", + ); + + /***/ + }, + + /***/ 9532: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Latvian [lv]\n//! author : Kristaps Karlsons : https://github.com/skakri\n//! author : Jānis Elmeris : https://github.com/JanisE\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var units = {\n ss: 'sekundes_sekundēm_sekunde_sekundes'.split('_'),\n m: 'minūtes_minūtēm_minūte_minūtes'.split('_'),\n mm: 'minūtes_minūtēm_minūte_minūtes'.split('_'),\n h: 'stundas_stundām_stunda_stundas'.split('_'),\n hh: 'stundas_stundām_stunda_stundas'.split('_'),\n d: 'dienas_dienām_diena_dienas'.split('_'),\n dd: 'dienas_dienām_diena_dienas'.split('_'),\n M: 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'),\n MM: 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'),\n y: 'gada_gadiem_gads_gadi'.split('_'),\n yy: 'gada_gadiem_gads_gadi'.split('_'),\n };\n /**\n * @param withoutSuffix boolean true = a length of time; false = before/after a period of time.\n */\n function format(forms, number, withoutSuffix) {\n if (withoutSuffix) {\n // E.g. \"21 minūte\", \"3 minūtes\".\n return number % 10 === 1 && number % 100 !== 11 ? forms[2] : forms[3];\n } else {\n // E.g. \"21 minūtes\" as in \"pēc 21 minūtes\".\n // E.g. \"3 minūtēm\" as in \"pēc 3 minūtēm\".\n return number % 10 === 1 && number % 100 !== 11 ? forms[0] : forms[1];\n }\n }\n function relativeTimeWithPlural(number, withoutSuffix, key) {\n return number + ' ' + format(units[key], number, withoutSuffix);\n }\n function relativeTimeWithSingular(number, withoutSuffix, key) {\n return format(units[key], number, withoutSuffix);\n }\n function relativeSeconds(number, withoutSuffix) {\n return withoutSuffix ? 'dažas sekundes' : 'dažām sekundēm';\n }\n\n var lv = moment.defineLocale('lv', {\n months: 'janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris'.split(\n '_'\n ),\n monthsShort: 'jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec'.split('_'),\n weekdays:\n 'svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena'.split(\n '_'\n ),\n weekdaysShort: 'Sv_P_O_T_C_Pk_S'.split('_'),\n weekdaysMin: 'Sv_P_O_T_C_Pk_S'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY.',\n LL: 'YYYY. [gada] D. MMMM',\n LLL: 'YYYY. [gada] D. MMMM, HH:mm',\n LLLL: 'YYYY. [gada] D. MMMM, dddd, HH:mm',\n },\n calendar: {\n sameDay: '[Šodien pulksten] LT',\n nextDay: '[Rīt pulksten] LT',\n nextWeek: 'dddd [pulksten] LT',\n lastDay: '[Vakar pulksten] LT',\n lastWeek: '[Pagājušā] dddd [pulksten] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'pēc %s',\n past: 'pirms %s',\n s: relativeSeconds,\n ss: relativeTimeWithPlural,\n m: relativeTimeWithSingular,\n mm: relativeTimeWithPlural,\n h: relativeTimeWithSingular,\n hh: relativeTimeWithPlural,\n d: relativeTimeWithSingular,\n dd: relativeTimeWithPlural,\n M: relativeTimeWithSingular,\n MM: relativeTimeWithPlural,\n y: relativeTimeWithSingular,\n yy: relativeTimeWithPlural,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return lv;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/lv.js?", + ); + + /***/ + }, + + /***/ 8076: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Montenegrin [me]\n//! author : Miodrag Nikač <miodrag@restartit.me> : https://github.com/miodragnikac\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var translator = {\n words: {\n //Different grammatical cases\n ss: ['sekund', 'sekunda', 'sekundi'],\n m: ['jedan minut', 'jednog minuta'],\n mm: ['minut', 'minuta', 'minuta'],\n h: ['jedan sat', 'jednog sata'],\n hh: ['sat', 'sata', 'sati'],\n dd: ['dan', 'dana', 'dana'],\n MM: ['mjesec', 'mjeseca', 'mjeseci'],\n yy: ['godina', 'godine', 'godina'],\n },\n correctGrammaticalCase: function (number, wordKey) {\n return number === 1\n ? wordKey[0]\n : number >= 2 && number <= 4\n ? wordKey[1]\n : wordKey[2];\n },\n translate: function (number, withoutSuffix, key) {\n var wordKey = translator.words[key];\n if (key.length === 1) {\n return withoutSuffix ? wordKey[0] : wordKey[1];\n } else {\n return (\n number +\n ' ' +\n translator.correctGrammaticalCase(number, wordKey)\n );\n }\n },\n };\n\n var me = moment.defineLocale('me', {\n months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split(\n '_'\n ),\n monthsShort:\n 'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split('_'),\n monthsParseExact: true,\n weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split(\n '_'\n ),\n weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),\n weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY H:mm',\n LLLL: 'dddd, D. MMMM YYYY H:mm',\n },\n calendar: {\n sameDay: '[danas u] LT',\n nextDay: '[sjutra u] LT',\n\n nextWeek: function () {\n switch (this.day()) {\n case 0:\n return '[u] [nedjelju] [u] LT';\n case 3:\n return '[u] [srijedu] [u] LT';\n case 6:\n return '[u] [subotu] [u] LT';\n case 1:\n case 2:\n case 4:\n case 5:\n return '[u] dddd [u] LT';\n }\n },\n lastDay: '[juče u] LT',\n lastWeek: function () {\n var lastWeekDays = [\n '[prošle] [nedjelje] [u] LT',\n '[prošlog] [ponedjeljka] [u] LT',\n '[prošlog] [utorka] [u] LT',\n '[prošle] [srijede] [u] LT',\n '[prošlog] [četvrtka] [u] LT',\n '[prošlog] [petka] [u] LT',\n '[prošle] [subote] [u] LT',\n ];\n return lastWeekDays[this.day()];\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'za %s',\n past: 'prije %s',\n s: 'nekoliko sekundi',\n ss: translator.translate,\n m: translator.translate,\n mm: translator.translate,\n h: translator.translate,\n hh: translator.translate,\n d: 'dan',\n dd: translator.translate,\n M: 'mjesec',\n MM: translator.translate,\n y: 'godinu',\n yy: translator.translate,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return me;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/me.js?", + ); + + /***/ + }, + + /***/ 1848: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Maori [mi]\n//! author : John Corrigan <robbiecloset@gmail.com> : https://github.com/johnideal\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var mi = moment.defineLocale('mi', {\n months: 'Kohi-tāte_Hui-tanguru_Poutū-te-rangi_Paenga-whāwhā_Haratua_Pipiri_Hōngoingoi_Here-turi-kōkā_Mahuru_Whiringa-ā-nuku_Whiringa-ā-rangi_Hakihea'.split(\n '_'\n ),\n monthsShort:\n 'Kohi_Hui_Pou_Pae_Hara_Pipi_Hōngoi_Here_Mahu_Whi-nu_Whi-ra_Haki'.split(\n '_'\n ),\n monthsRegex: /(?:['a-z\\u0101\\u014D\\u016B]+\\-?){1,3}/i,\n monthsStrictRegex: /(?:['a-z\\u0101\\u014D\\u016B]+\\-?){1,3}/i,\n monthsShortRegex: /(?:['a-z\\u0101\\u014D\\u016B]+\\-?){1,3}/i,\n monthsShortStrictRegex: /(?:['a-z\\u0101\\u014D\\u016B]+\\-?){1,2}/i,\n weekdays: 'Rātapu_Mane_Tūrei_Wenerei_Tāite_Paraire_Hātarei'.split('_'),\n weekdaysShort: 'Ta_Ma_Tū_We_Tāi_Pa_Hā'.split('_'),\n weekdaysMin: 'Ta_Ma_Tū_We_Tāi_Pa_Hā'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY [i] HH:mm',\n LLLL: 'dddd, D MMMM YYYY [i] HH:mm',\n },\n calendar: {\n sameDay: '[i teie mahana, i] LT',\n nextDay: '[apopo i] LT',\n nextWeek: 'dddd [i] LT',\n lastDay: '[inanahi i] LT',\n lastWeek: 'dddd [whakamutunga i] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'i roto i %s',\n past: '%s i mua',\n s: 'te hēkona ruarua',\n ss: '%d hēkona',\n m: 'he meneti',\n mm: '%d meneti',\n h: 'te haora',\n hh: '%d haora',\n d: 'he ra',\n dd: '%d ra',\n M: 'he marama',\n MM: '%d marama',\n y: 'he tau',\n yy: '%d tau',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal: '%dº',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return mi;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/mi.js?", + ); + + /***/ + }, + + /***/ 306: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Macedonian [mk]\n//! author : Borislav Mickov : https://github.com/B0k0\n//! author : Sashko Todorov : https://github.com/bkyceh\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var mk = moment.defineLocale('mk', {\n months: 'јануари_февруари_март_април_мај_јуни_јули_август_септември_октомври_ноември_декември'.split(\n '_'\n ),\n monthsShort: 'јан_фев_мар_апр_мај_јун_јул_авг_сеп_окт_ное_дек'.split('_'),\n weekdays: 'недела_понеделник_вторник_среда_четврток_петок_сабота'.split(\n '_'\n ),\n weekdaysShort: 'нед_пон_вто_сре_чет_пет_саб'.split('_'),\n weekdaysMin: 'нe_пo_вт_ср_че_пе_сa'.split('_'),\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'D.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY H:mm',\n LLLL: 'dddd, D MMMM YYYY H:mm',\n },\n calendar: {\n sameDay: '[Денес во] LT',\n nextDay: '[Утре во] LT',\n nextWeek: '[Во] dddd [во] LT',\n lastDay: '[Вчера во] LT',\n lastWeek: function () {\n switch (this.day()) {\n case 0:\n case 3:\n case 6:\n return '[Изминатата] dddd [во] LT';\n case 1:\n case 2:\n case 4:\n case 5:\n return '[Изминатиот] dddd [во] LT';\n }\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'за %s',\n past: 'пред %s',\n s: 'неколку секунди',\n ss: '%d секунди',\n m: 'една минута',\n mm: '%d минути',\n h: 'еден час',\n hh: '%d часа',\n d: 'еден ден',\n dd: '%d дена',\n M: 'еден месец',\n MM: '%d месеци',\n y: 'една година',\n yy: '%d години',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-(ев|ен|ти|ви|ри|ми)/,\n ordinal: function (number) {\n var lastDigit = number % 10,\n last2Digits = number % 100;\n if (number === 0) {\n return number + '-ев';\n } else if (last2Digits === 0) {\n return number + '-ен';\n } else if (last2Digits > 10 && last2Digits < 20) {\n return number + '-ти';\n } else if (lastDigit === 1) {\n return number + '-ви';\n } else if (lastDigit === 2) {\n return number + '-ри';\n } else if (lastDigit === 7 || lastDigit === 8) {\n return number + '-ми';\n } else {\n return number + '-ти';\n }\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return mk;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/mk.js?", + ); + + /***/ + }, + + /***/ 3739: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Malayalam [ml]\n//! author : Floyd Pink : https://github.com/floydpink\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var ml = moment.defineLocale('ml', {\n months: 'ജനുവരി_ഫെബ്രുവരി_മാർച്ച്_ഏപ്രിൽ_മേയ്_ജൂൺ_ജൂലൈ_ഓഗസ്റ്റ്_സെപ്റ്റംബർ_ഒക്ടോബർ_നവംബർ_ഡിസംബർ'.split(\n '_'\n ),\n monthsShort:\n 'ജനു._ഫെബ്രു._മാർ._ഏപ്രി._മേയ്_ജൂൺ_ജൂലൈ._ഓഗ._സെപ്റ്റ._ഒക്ടോ._നവം._ഡിസം.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays:\n 'ഞായറാഴ്ച_തിങ്കളാഴ്ച_ചൊവ്വാഴ്ച_ബുധനാഴ്ച_വ്യാഴാഴ്ച_വെള്ളിയാഴ്ച_ശനിയാഴ്ച'.split(\n '_'\n ),\n weekdaysShort: 'ഞായർ_തിങ്കൾ_ചൊവ്വ_ബുധൻ_വ്യാഴം_വെള്ളി_ശനി'.split('_'),\n weekdaysMin: 'ഞാ_തി_ചൊ_ബു_വ്യാ_വെ_ശ'.split('_'),\n longDateFormat: {\n LT: 'A h:mm -നു',\n LTS: 'A h:mm:ss -നു',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, A h:mm -നു',\n LLLL: 'dddd, D MMMM YYYY, A h:mm -നു',\n },\n calendar: {\n sameDay: '[ഇന്ന്] LT',\n nextDay: '[നാളെ] LT',\n nextWeek: 'dddd, LT',\n lastDay: '[ഇന്നലെ] LT',\n lastWeek: '[കഴിഞ്ഞ] dddd, LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s കഴിഞ്ഞ്',\n past: '%s മുൻപ്',\n s: 'അൽപ നിമിഷങ്ങൾ',\n ss: '%d സെക്കൻഡ്',\n m: 'ഒരു മിനിറ്റ്',\n mm: '%d മിനിറ്റ്',\n h: 'ഒരു മണിക്കൂർ',\n hh: '%d മണിക്കൂർ',\n d: 'ഒരു ദിവസം',\n dd: '%d ദിവസം',\n M: 'ഒരു മാസം',\n MM: '%d മാസം',\n y: 'ഒരു വർഷം',\n yy: '%d വർഷം',\n },\n meridiemParse: /രാത്രി|രാവിലെ|ഉച്ച കഴിഞ്ഞ്|വൈകുന്നേരം|രാത്രി/i,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (\n (meridiem === 'രാത്രി' && hour >= 4) ||\n meridiem === 'ഉച്ച കഴിഞ്ഞ്' ||\n meridiem === 'വൈകുന്നേരം'\n ) {\n return hour + 12;\n } else {\n return hour;\n }\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 4) {\n return 'രാത്രി';\n } else if (hour < 12) {\n return 'രാവിലെ';\n } else if (hour < 17) {\n return 'ഉച്ച കഴിഞ്ഞ്';\n } else if (hour < 20) {\n return 'വൈകുന്നേരം';\n } else {\n return 'രാത്രി';\n }\n },\n });\n\n return ml;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/ml.js?", + ); + + /***/ + }, + + /***/ 9053: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Mongolian [mn]\n//! author : Javkhlantugs Nyamdorj : https://github.com/javkhaanj7\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function translate(number, withoutSuffix, key, isFuture) {\n switch (key) {\n case 's':\n return withoutSuffix ? 'хэдхэн секунд' : 'хэдхэн секундын';\n case 'ss':\n return number + (withoutSuffix ? ' секунд' : ' секундын');\n case 'm':\n case 'mm':\n return number + (withoutSuffix ? ' минут' : ' минутын');\n case 'h':\n case 'hh':\n return number + (withoutSuffix ? ' цаг' : ' цагийн');\n case 'd':\n case 'dd':\n return number + (withoutSuffix ? ' өдөр' : ' өдрийн');\n case 'M':\n case 'MM':\n return number + (withoutSuffix ? ' сар' : ' сарын');\n case 'y':\n case 'yy':\n return number + (withoutSuffix ? ' жил' : ' жилийн');\n default:\n return number;\n }\n }\n\n var mn = moment.defineLocale('mn', {\n months: 'Нэгдүгээр сар_Хоёрдугаар сар_Гуравдугаар сар_Дөрөвдүгээр сар_Тавдугаар сар_Зургадугаар сар_Долдугаар сар_Наймдугаар сар_Есдүгээр сар_Аравдугаар сар_Арван нэгдүгээр сар_Арван хоёрдугаар сар'.split(\n '_'\n ),\n monthsShort:\n '1 сар_2 сар_3 сар_4 сар_5 сар_6 сар_7 сар_8 сар_9 сар_10 сар_11 сар_12 сар'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays: 'Ням_Даваа_Мягмар_Лхагва_Пүрэв_Баасан_Бямба'.split('_'),\n weekdaysShort: 'Ням_Дав_Мяг_Лха_Пүр_Баа_Бям'.split('_'),\n weekdaysMin: 'Ня_Да_Мя_Лх_Пү_Ба_Бя'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'YYYY-MM-DD',\n LL: 'YYYY оны MMMMын D',\n LLL: 'YYYY оны MMMMын D HH:mm',\n LLLL: 'dddd, YYYY оны MMMMын D HH:mm',\n },\n meridiemParse: /ҮӨ|ҮХ/i,\n isPM: function (input) {\n return input === 'ҮХ';\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 12) {\n return 'ҮӨ';\n } else {\n return 'ҮХ';\n }\n },\n calendar: {\n sameDay: '[Өнөөдөр] LT',\n nextDay: '[Маргааш] LT',\n nextWeek: '[Ирэх] dddd LT',\n lastDay: '[Өчигдөр] LT',\n lastWeek: '[Өнгөрсөн] dddd LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s дараа',\n past: '%s өмнө',\n s: translate,\n ss: translate,\n m: translate,\n mm: translate,\n h: translate,\n hh: translate,\n d: translate,\n dd: translate,\n M: translate,\n MM: translate,\n y: translate,\n yy: translate,\n },\n dayOfMonthOrdinalParse: /\\d{1,2} өдөр/,\n ordinal: function (number, period) {\n switch (period) {\n case 'd':\n case 'D':\n case 'DDD':\n return number + ' өдөр';\n default:\n return number;\n }\n },\n });\n\n return mn;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/mn.js?", + ); + + /***/ + }, + + /***/ 6169: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Marathi [mr]\n//! author : Harshad Kale : https://github.com/kalehv\n//! author : Vivek Athalye : https://github.com/vnathalye\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var symbolMap = {\n 1: '१',\n 2: '२',\n 3: '३',\n 4: '४',\n 5: '५',\n 6: '६',\n 7: '७',\n 8: '८',\n 9: '९',\n 0: '०',\n },\n numberMap = {\n '१': '1',\n '२': '2',\n '३': '3',\n '४': '4',\n '५': '5',\n '६': '6',\n '७': '7',\n '८': '8',\n '९': '9',\n '०': '0',\n };\n\n function relativeTimeMr(number, withoutSuffix, string, isFuture) {\n var output = '';\n if (withoutSuffix) {\n switch (string) {\n case 's':\n output = 'काही सेकंद';\n break;\n case 'ss':\n output = '%d सेकंद';\n break;\n case 'm':\n output = 'एक मिनिट';\n break;\n case 'mm':\n output = '%d मिनिटे';\n break;\n case 'h':\n output = 'एक तास';\n break;\n case 'hh':\n output = '%d तास';\n break;\n case 'd':\n output = 'एक दिवस';\n break;\n case 'dd':\n output = '%d दिवस';\n break;\n case 'M':\n output = 'एक महिना';\n break;\n case 'MM':\n output = '%d महिने';\n break;\n case 'y':\n output = 'एक वर्ष';\n break;\n case 'yy':\n output = '%d वर्षे';\n break;\n }\n } else {\n switch (string) {\n case 's':\n output = 'काही सेकंदां';\n break;\n case 'ss':\n output = '%d सेकंदां';\n break;\n case 'm':\n output = 'एका मिनिटा';\n break;\n case 'mm':\n output = '%d मिनिटां';\n break;\n case 'h':\n output = 'एका तासा';\n break;\n case 'hh':\n output = '%d तासां';\n break;\n case 'd':\n output = 'एका दिवसा';\n break;\n case 'dd':\n output = '%d दिवसां';\n break;\n case 'M':\n output = 'एका महिन्या';\n break;\n case 'MM':\n output = '%d महिन्यां';\n break;\n case 'y':\n output = 'एका वर्षा';\n break;\n case 'yy':\n output = '%d वर्षां';\n break;\n }\n }\n return output.replace(/%d/i, number);\n }\n\n var mr = moment.defineLocale('mr', {\n months: 'जानेवारी_फेब्रुवारी_मार्च_एप्रिल_मे_जून_जुलै_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर'.split(\n '_'\n ),\n monthsShort:\n 'जाने._फेब्रु._मार्च._एप्रि._मे._जून._जुलै._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays: 'रविवार_सोमवार_मंगळवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'),\n weekdaysShort: 'रवि_सोम_मंगळ_बुध_गुरू_शुक्र_शनि'.split('_'),\n weekdaysMin: 'र_सो_मं_बु_गु_शु_श'.split('_'),\n longDateFormat: {\n LT: 'A h:mm वाजता',\n LTS: 'A h:mm:ss वाजता',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, A h:mm वाजता',\n LLLL: 'dddd, D MMMM YYYY, A h:mm वाजता',\n },\n calendar: {\n sameDay: '[आज] LT',\n nextDay: '[उद्या] LT',\n nextWeek: 'dddd, LT',\n lastDay: '[काल] LT',\n lastWeek: '[मागील] dddd, LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%sमध्ये',\n past: '%sपूर्वी',\n s: relativeTimeMr,\n ss: relativeTimeMr,\n m: relativeTimeMr,\n mm: relativeTimeMr,\n h: relativeTimeMr,\n hh: relativeTimeMr,\n d: relativeTimeMr,\n dd: relativeTimeMr,\n M: relativeTimeMr,\n MM: relativeTimeMr,\n y: relativeTimeMr,\n yy: relativeTimeMr,\n },\n preparse: function (string) {\n return string.replace(/[१२३४५६७८९०]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function (string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n meridiemParse: /पहाटे|सकाळी|दुपारी|सायंकाळी|रात्री/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'पहाटे' || meridiem === 'सकाळी') {\n return hour;\n } else if (\n meridiem === 'दुपारी' ||\n meridiem === 'सायंकाळी' ||\n meridiem === 'रात्री'\n ) {\n return hour >= 12 ? hour : hour + 12;\n }\n },\n meridiem: function (hour, minute, isLower) {\n if (hour >= 0 && hour < 6) {\n return 'पहाटे';\n } else if (hour < 12) {\n return 'सकाळी';\n } else if (hour < 17) {\n return 'दुपारी';\n } else if (hour < 20) {\n return 'सायंकाळी';\n } else {\n return 'रात्री';\n }\n },\n week: {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n },\n });\n\n return mr;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/mr.js?", + ); + + /***/ + }, + + /***/ 2297: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Malay [ms-my]\n//! note : DEPRECATED, the correct one is [ms]\n//! author : Weldan Jamili : https://github.com/weldan\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var msMy = moment.defineLocale('ms-my', {\n months: 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split(\n '_'\n ),\n monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'),\n weekdays: 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'),\n weekdaysShort: 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'),\n weekdaysMin: 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'),\n longDateFormat: {\n LT: 'HH.mm',\n LTS: 'HH.mm.ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY [pukul] HH.mm',\n LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm',\n },\n meridiemParse: /pagi|tengahari|petang|malam/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'pagi') {\n return hour;\n } else if (meridiem === 'tengahari') {\n return hour >= 11 ? hour : hour + 12;\n } else if (meridiem === 'petang' || meridiem === 'malam') {\n return hour + 12;\n }\n },\n meridiem: function (hours, minutes, isLower) {\n if (hours < 11) {\n return 'pagi';\n } else if (hours < 15) {\n return 'tengahari';\n } else if (hours < 19) {\n return 'petang';\n } else {\n return 'malam';\n }\n },\n calendar: {\n sameDay: '[Hari ini pukul] LT',\n nextDay: '[Esok pukul] LT',\n nextWeek: 'dddd [pukul] LT',\n lastDay: '[Kelmarin pukul] LT',\n lastWeek: 'dddd [lepas pukul] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'dalam %s',\n past: '%s yang lepas',\n s: 'beberapa saat',\n ss: '%d saat',\n m: 'seminit',\n mm: '%d minit',\n h: 'sejam',\n hh: '%d jam',\n d: 'sehari',\n dd: '%d hari',\n M: 'sebulan',\n MM: '%d bulan',\n y: 'setahun',\n yy: '%d tahun',\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return msMy;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/ms-my.js?", + ); + + /***/ + }, + + /***/ 3386: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Malay [ms]\n//! author : Weldan Jamili : https://github.com/weldan\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var ms = moment.defineLocale('ms', {\n months: 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split(\n '_'\n ),\n monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'),\n weekdays: 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'),\n weekdaysShort: 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'),\n weekdaysMin: 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'),\n longDateFormat: {\n LT: 'HH.mm',\n LTS: 'HH.mm.ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY [pukul] HH.mm',\n LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm',\n },\n meridiemParse: /pagi|tengahari|petang|malam/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'pagi') {\n return hour;\n } else if (meridiem === 'tengahari') {\n return hour >= 11 ? hour : hour + 12;\n } else if (meridiem === 'petang' || meridiem === 'malam') {\n return hour + 12;\n }\n },\n meridiem: function (hours, minutes, isLower) {\n if (hours < 11) {\n return 'pagi';\n } else if (hours < 15) {\n return 'tengahari';\n } else if (hours < 19) {\n return 'petang';\n } else {\n return 'malam';\n }\n },\n calendar: {\n sameDay: '[Hari ini pukul] LT',\n nextDay: '[Esok pukul] LT',\n nextWeek: 'dddd [pukul] LT',\n lastDay: '[Kelmarin pukul] LT',\n lastWeek: 'dddd [lepas pukul] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'dalam %s',\n past: '%s yang lepas',\n s: 'beberapa saat',\n ss: '%d saat',\n m: 'seminit',\n mm: '%d minit',\n h: 'sejam',\n hh: '%d jam',\n d: 'sehari',\n dd: '%d hari',\n M: 'sebulan',\n MM: '%d bulan',\n y: 'setahun',\n yy: '%d tahun',\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return ms;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/ms.js?", + ); + + /***/ + }, + + /***/ 7075: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Maltese (Malta) [mt]\n//! author : Alessandro Maruccia : https://github.com/alesma\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var mt = moment.defineLocale('mt', {\n months: 'Jannar_Frar_Marzu_April_Mejju_Ġunju_Lulju_Awwissu_Settembru_Ottubru_Novembru_Diċembru'.split(\n '_'\n ),\n monthsShort: 'Jan_Fra_Mar_Apr_Mej_Ġun_Lul_Aww_Set_Ott_Nov_Diċ'.split('_'),\n weekdays:\n 'Il-Ħadd_It-Tnejn_It-Tlieta_L-Erbgħa_Il-Ħamis_Il-Ġimgħa_Is-Sibt'.split(\n '_'\n ),\n weekdaysShort: 'Ħad_Tne_Tli_Erb_Ħam_Ġim_Sib'.split('_'),\n weekdaysMin: 'Ħa_Tn_Tl_Er_Ħa_Ġi_Si'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Illum fil-]LT',\n nextDay: '[Għada fil-]LT',\n nextWeek: 'dddd [fil-]LT',\n lastDay: '[Il-bieraħ fil-]LT',\n lastWeek: 'dddd [li għadda] [fil-]LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'f’ %s',\n past: '%s ilu',\n s: 'ftit sekondi',\n ss: '%d sekondi',\n m: 'minuta',\n mm: '%d minuti',\n h: 'siegħa',\n hh: '%d siegħat',\n d: 'ġurnata',\n dd: '%d ġranet',\n M: 'xahar',\n MM: '%d xhur',\n y: 'sena',\n yy: '%d sni',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal: '%dº',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return mt;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/mt.js?", + ); + + /***/ + }, + + /***/ 2264: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Burmese [my]\n//! author : Squar team, mysquar.com\n//! author : David Rossellat : https://github.com/gholadr\n//! author : Tin Aung Lin : https://github.com/thanyawzinmin\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var symbolMap = {\n 1: '၁',\n 2: '၂',\n 3: '၃',\n 4: '၄',\n 5: '၅',\n 6: '၆',\n 7: '၇',\n 8: '၈',\n 9: '၉',\n 0: '၀',\n },\n numberMap = {\n '၁': '1',\n '၂': '2',\n '၃': '3',\n '၄': '4',\n '၅': '5',\n '၆': '6',\n '၇': '7',\n '၈': '8',\n '၉': '9',\n '၀': '0',\n };\n\n var my = moment.defineLocale('my', {\n months: 'ဇန်နဝါရီ_ဖေဖော်ဝါရီ_မတ်_ဧပြီ_မေ_ဇွန်_ဇူလိုင်_သြဂုတ်_စက်တင်ဘာ_အောက်တိုဘာ_နိုဝင်ဘာ_ဒီဇင်ဘာ'.split(\n '_'\n ),\n monthsShort: 'ဇန်_ဖေ_မတ်_ပြီ_မေ_ဇွန်_လိုင်_သြ_စက်_အောက်_နို_ဒီ'.split('_'),\n weekdays: 'တနင်္ဂနွေ_တနင်္လာ_အင်္ဂါ_ဗုဒ္ဓဟူး_ကြာသပတေး_သောကြာ_စနေ'.split(\n '_'\n ),\n weekdaysShort: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'),\n weekdaysMin: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'),\n\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[ယနေ.] LT [မှာ]',\n nextDay: '[မနက်ဖြန်] LT [မှာ]',\n nextWeek: 'dddd LT [မှာ]',\n lastDay: '[မနေ.က] LT [မှာ]',\n lastWeek: '[ပြီးခဲ့သော] dddd LT [မှာ]',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'လာမည့် %s မှာ',\n past: 'လွန်ခဲ့သော %s က',\n s: 'စက္ကန်.အနည်းငယ်',\n ss: '%d စက္ကန့်',\n m: 'တစ်မိနစ်',\n mm: '%d မိနစ်',\n h: 'တစ်နာရီ',\n hh: '%d နာရီ',\n d: 'တစ်ရက်',\n dd: '%d ရက်',\n M: 'တစ်လ',\n MM: '%d လ',\n y: 'တစ်နှစ်',\n yy: '%d နှစ်',\n },\n preparse: function (string) {\n return string.replace(/[၁၂၃၄၅၆၇၈၉၀]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function (string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return my;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/my.js?", + ); + + /***/ + }, + + /***/ 2274: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Norwegian Bokmål [nb]\n//! authors : Espen Hovlandsdal : https://github.com/rexxars\n//! Sigurd Gartmann : https://github.com/sigurdga\n//! Stephen Ramthun : https://github.com/stephenramthun\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var nb = moment.defineLocale('nb', {\n months: 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split(\n '_'\n ),\n monthsShort:\n 'jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.'.split('_'),\n monthsParseExact: true,\n weekdays: 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'),\n weekdaysShort: 'sø._ma._ti._on._to._fr._lø.'.split('_'),\n weekdaysMin: 'sø_ma_ti_on_to_fr_lø'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY [kl.] HH:mm',\n LLLL: 'dddd D. MMMM YYYY [kl.] HH:mm',\n },\n calendar: {\n sameDay: '[i dag kl.] LT',\n nextDay: '[i morgen kl.] LT',\n nextWeek: 'dddd [kl.] LT',\n lastDay: '[i går kl.] LT',\n lastWeek: '[forrige] dddd [kl.] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'om %s',\n past: '%s siden',\n s: 'noen sekunder',\n ss: '%d sekunder',\n m: 'ett minutt',\n mm: '%d minutter',\n h: 'én time',\n hh: '%d timer',\n d: 'én dag',\n dd: '%d dager',\n w: 'én uke',\n ww: '%d uker',\n M: 'én måned',\n MM: '%d måneder',\n y: 'ett år',\n yy: '%d år',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return nb;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/nb.js?", + ); + + /***/ + }, + + /***/ 8235: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Nepalese [ne]\n//! author : suvash : https://github.com/suvash\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var symbolMap = {\n 1: '१',\n 2: '२',\n 3: '३',\n 4: '४',\n 5: '५',\n 6: '६',\n 7: '७',\n 8: '८',\n 9: '९',\n 0: '०',\n },\n numberMap = {\n '१': '1',\n '२': '2',\n '३': '3',\n '४': '4',\n '५': '5',\n '६': '6',\n '७': '7',\n '८': '8',\n '९': '9',\n '०': '0',\n };\n\n var ne = moment.defineLocale('ne', {\n months: 'जनवरी_फेब्रुवरी_मार्च_अप्रिल_मई_जुन_जुलाई_अगष्ट_सेप्टेम्बर_अक्टोबर_नोभेम्बर_डिसेम्बर'.split(\n '_'\n ),\n monthsShort:\n 'जन._फेब्रु._मार्च_अप्रि._मई_जुन_जुलाई._अग._सेप्ट._अक्टो._नोभे._डिसे.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays: 'आइतबार_सोमबार_मङ्गलबार_बुधबार_बिहिबार_शुक्रबार_शनिबार'.split(\n '_'\n ),\n weekdaysShort: 'आइत._सोम._मङ्गल._बुध._बिहि._शुक्र._शनि.'.split('_'),\n weekdaysMin: 'आ._सो._मं._बु._बि._शु._श.'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'Aको h:mm बजे',\n LTS: 'Aको h:mm:ss बजे',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, Aको h:mm बजे',\n LLLL: 'dddd, D MMMM YYYY, Aको h:mm बजे',\n },\n preparse: function (string) {\n return string.replace(/[१२३४५६७८९०]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function (string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n meridiemParse: /राति|बिहान|दिउँसो|साँझ/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'राति') {\n return hour < 4 ? hour : hour + 12;\n } else if (meridiem === 'बिहान') {\n return hour;\n } else if (meridiem === 'दिउँसो') {\n return hour >= 10 ? hour : hour + 12;\n } else if (meridiem === 'साँझ') {\n return hour + 12;\n }\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 3) {\n return 'राति';\n } else if (hour < 12) {\n return 'बिहान';\n } else if (hour < 16) {\n return 'दिउँसो';\n } else if (hour < 20) {\n return 'साँझ';\n } else {\n return 'राति';\n }\n },\n calendar: {\n sameDay: '[आज] LT',\n nextDay: '[भोलि] LT',\n nextWeek: '[आउँदो] dddd[,] LT',\n lastDay: '[हिजो] LT',\n lastWeek: '[गएको] dddd[,] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%sमा',\n past: '%s अगाडि',\n s: 'केही क्षण',\n ss: '%d सेकेण्ड',\n m: 'एक मिनेट',\n mm: '%d मिनेट',\n h: 'एक घण्टा',\n hh: '%d घण्टा',\n d: 'एक दिन',\n dd: '%d दिन',\n M: 'एक महिना',\n MM: '%d महिना',\n y: 'एक बर्ष',\n yy: '%d बर्ष',\n },\n week: {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n },\n });\n\n return ne;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/ne.js?", + ); + + /***/ + }, + + /***/ 3784: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Dutch (Belgium) [nl-be]\n//! author : Joris Röling : https://github.com/jorisroling\n//! author : Jacob Middag : https://github.com/middagj\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var monthsShortWithDots =\n 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split('_'),\n monthsShortWithoutDots =\n 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split('_'),\n monthsParse = [\n /^jan/i,\n /^feb/i,\n /^(maart|mrt\\.?)$/i,\n /^apr/i,\n /^mei$/i,\n /^jun[i.]?$/i,\n /^jul[i.]?$/i,\n /^aug/i,\n /^sep/i,\n /^okt/i,\n /^nov/i,\n /^dec/i,\n ],\n monthsRegex =\n /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\\.?|feb\\.?|mrt\\.?|apr\\.?|ju[nl]\\.?|aug\\.?|sep\\.?|okt\\.?|nov\\.?|dec\\.?)/i;\n\n var nlBe = moment.defineLocale('nl-be', {\n months: 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split(\n '_'\n ),\n monthsShort: function (m, format) {\n if (!m) {\n return monthsShortWithDots;\n } else if (/-MMM-/.test(format)) {\n return monthsShortWithoutDots[m.month()];\n } else {\n return monthsShortWithDots[m.month()];\n }\n },\n\n monthsRegex: monthsRegex,\n monthsShortRegex: monthsRegex,\n monthsStrictRegex:\n /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,\n monthsShortStrictRegex:\n /^(jan\\.?|feb\\.?|mrt\\.?|apr\\.?|mei|ju[nl]\\.?|aug\\.?|sep\\.?|okt\\.?|nov\\.?|dec\\.?)/i,\n\n monthsParse: monthsParse,\n longMonthsParse: monthsParse,\n shortMonthsParse: monthsParse,\n\n weekdays:\n 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split('_'),\n weekdaysShort: 'zo._ma._di._wo._do._vr._za.'.split('_'),\n weekdaysMin: 'zo_ma_di_wo_do_vr_za'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[vandaag om] LT',\n nextDay: '[morgen om] LT',\n nextWeek: 'dddd [om] LT',\n lastDay: '[gisteren om] LT',\n lastWeek: '[afgelopen] dddd [om] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'over %s',\n past: '%s geleden',\n s: 'een paar seconden',\n ss: '%d seconden',\n m: 'één minuut',\n mm: '%d minuten',\n h: 'één uur',\n hh: '%d uur',\n d: 'één dag',\n dd: '%d dagen',\n M: 'één maand',\n MM: '%d maanden',\n y: 'één jaar',\n yy: '%d jaar',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(ste|de)/,\n ordinal: function (number) {\n return (\n number +\n (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de')\n );\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return nlBe;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/nl-be.js?", + ); + + /***/ + }, + + /***/ 2572: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Dutch [nl]\n//! author : Joris Röling : https://github.com/jorisroling\n//! author : Jacob Middag : https://github.com/middagj\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var monthsShortWithDots =\n 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split('_'),\n monthsShortWithoutDots =\n 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split('_'),\n monthsParse = [\n /^jan/i,\n /^feb/i,\n /^(maart|mrt\\.?)$/i,\n /^apr/i,\n /^mei$/i,\n /^jun[i.]?$/i,\n /^jul[i.]?$/i,\n /^aug/i,\n /^sep/i,\n /^okt/i,\n /^nov/i,\n /^dec/i,\n ],\n monthsRegex =\n /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\\.?|feb\\.?|mrt\\.?|apr\\.?|ju[nl]\\.?|aug\\.?|sep\\.?|okt\\.?|nov\\.?|dec\\.?)/i;\n\n var nl = moment.defineLocale('nl', {\n months: 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split(\n '_'\n ),\n monthsShort: function (m, format) {\n if (!m) {\n return monthsShortWithDots;\n } else if (/-MMM-/.test(format)) {\n return monthsShortWithoutDots[m.month()];\n } else {\n return monthsShortWithDots[m.month()];\n }\n },\n\n monthsRegex: monthsRegex,\n monthsShortRegex: monthsRegex,\n monthsStrictRegex:\n /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,\n monthsShortStrictRegex:\n /^(jan\\.?|feb\\.?|mrt\\.?|apr\\.?|mei|ju[nl]\\.?|aug\\.?|sep\\.?|okt\\.?|nov\\.?|dec\\.?)/i,\n\n monthsParse: monthsParse,\n longMonthsParse: monthsParse,\n shortMonthsParse: monthsParse,\n\n weekdays:\n 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split('_'),\n weekdaysShort: 'zo._ma._di._wo._do._vr._za.'.split('_'),\n weekdaysMin: 'zo_ma_di_wo_do_vr_za'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD-MM-YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[vandaag om] LT',\n nextDay: '[morgen om] LT',\n nextWeek: 'dddd [om] LT',\n lastDay: '[gisteren om] LT',\n lastWeek: '[afgelopen] dddd [om] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'over %s',\n past: '%s geleden',\n s: 'een paar seconden',\n ss: '%d seconden',\n m: 'één minuut',\n mm: '%d minuten',\n h: 'één uur',\n hh: '%d uur',\n d: 'één dag',\n dd: '%d dagen',\n w: 'één week',\n ww: '%d weken',\n M: 'één maand',\n MM: '%d maanden',\n y: 'één jaar',\n yy: '%d jaar',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(ste|de)/,\n ordinal: function (number) {\n return (\n number +\n (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de')\n );\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return nl;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/nl.js?", + ); + + /***/ + }, + + /***/ 4566: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Nynorsk [nn]\n//! authors : https://github.com/mechuwind\n//! Stephen Ramthun : https://github.com/stephenramthun\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var nn = moment.defineLocale('nn', {\n months: 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split(\n '_'\n ),\n monthsShort:\n 'jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.'.split('_'),\n monthsParseExact: true,\n weekdays: 'sundag_måndag_tysdag_onsdag_torsdag_fredag_laurdag'.split('_'),\n weekdaysShort: 'su._må._ty._on._to._fr._lau.'.split('_'),\n weekdaysMin: 'su_må_ty_on_to_fr_la'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY [kl.] H:mm',\n LLLL: 'dddd D. MMMM YYYY [kl.] HH:mm',\n },\n calendar: {\n sameDay: '[I dag klokka] LT',\n nextDay: '[I morgon klokka] LT',\n nextWeek: 'dddd [klokka] LT',\n lastDay: '[I går klokka] LT',\n lastWeek: '[Føregåande] dddd [klokka] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'om %s',\n past: '%s sidan',\n s: 'nokre sekund',\n ss: '%d sekund',\n m: 'eit minutt',\n mm: '%d minutt',\n h: 'ein time',\n hh: '%d timar',\n d: 'ein dag',\n dd: '%d dagar',\n w: 'ei veke',\n ww: '%d veker',\n M: 'ein månad',\n MM: '%d månader',\n y: 'eit år',\n yy: '%d år',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return nn;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/nn.js?", + ); + + /***/ + }, + + /***/ 9330: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Occitan, lengadocian dialecte [oc-lnc]\n//! author : Quentin PAGÈS : https://github.com/Quenty31\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var ocLnc = moment.defineLocale('oc-lnc', {\n months: {\n standalone:\n 'genièr_febrièr_març_abril_mai_junh_julhet_agost_setembre_octòbre_novembre_decembre'.split(\n '_'\n ),\n format: \"de genièr_de febrièr_de març_d'abril_de mai_de junh_de julhet_d'agost_de setembre_d'octòbre_de novembre_de decembre\".split(\n '_'\n ),\n isFormat: /D[oD]?(\\s)+MMMM/,\n },\n monthsShort:\n 'gen._febr._març_abr._mai_junh_julh._ago._set._oct._nov._dec.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays: 'dimenge_diluns_dimars_dimècres_dijòus_divendres_dissabte'.split(\n '_'\n ),\n weekdaysShort: 'dg._dl._dm._dc._dj._dv._ds.'.split('_'),\n weekdaysMin: 'dg_dl_dm_dc_dj_dv_ds'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM [de] YYYY',\n ll: 'D MMM YYYY',\n LLL: 'D MMMM [de] YYYY [a] H:mm',\n lll: 'D MMM YYYY, H:mm',\n LLLL: 'dddd D MMMM [de] YYYY [a] H:mm',\n llll: 'ddd D MMM YYYY, H:mm',\n },\n calendar: {\n sameDay: '[uèi a] LT',\n nextDay: '[deman a] LT',\n nextWeek: 'dddd [a] LT',\n lastDay: '[ièr a] LT',\n lastWeek: 'dddd [passat a] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: \"d'aquí %s\",\n past: 'fa %s',\n s: 'unas segondas',\n ss: '%d segondas',\n m: 'una minuta',\n mm: '%d minutas',\n h: 'una ora',\n hh: '%d oras',\n d: 'un jorn',\n dd: '%d jorns',\n M: 'un mes',\n MM: '%d meses',\n y: 'un an',\n yy: '%d ans',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(r|n|t|è|a)/,\n ordinal: function (number, period) {\n var output =\n number === 1\n ? 'r'\n : number === 2\n ? 'n'\n : number === 3\n ? 'r'\n : number === 4\n ? 't'\n : 'è';\n if (period === 'w' || period === 'W') {\n output = 'a';\n }\n return number + output;\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4,\n },\n });\n\n return ocLnc;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/oc-lnc.js?", + ); + + /***/ + }, + + /***/ 9849: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Punjabi (India) [pa-in]\n//! author : Harpreet Singh : https://github.com/harpreetkhalsagtbit\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var symbolMap = {\n 1: '੧',\n 2: '੨',\n 3: '੩',\n 4: '੪',\n 5: '੫',\n 6: '੬',\n 7: '੭',\n 8: '੮',\n 9: '੯',\n 0: '੦',\n },\n numberMap = {\n '੧': '1',\n '੨': '2',\n '੩': '3',\n '੪': '4',\n '੫': '5',\n '੬': '6',\n '੭': '7',\n '੮': '8',\n '੯': '9',\n '੦': '0',\n };\n\n var paIn = moment.defineLocale('pa-in', {\n // There are months name as per Nanakshahi Calendar but they are not used as rigidly in modern Punjabi.\n months: 'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split(\n '_'\n ),\n monthsShort:\n 'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split(\n '_'\n ),\n weekdays: 'ਐਤਵਾਰ_ਸੋਮਵਾਰ_ਮੰਗਲਵਾਰ_ਬੁਧਵਾਰ_ਵੀਰਵਾਰ_ਸ਼ੁੱਕਰਵਾਰ_ਸ਼ਨੀਚਰਵਾਰ'.split(\n '_'\n ),\n weekdaysShort: 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'),\n weekdaysMin: 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'),\n longDateFormat: {\n LT: 'A h:mm ਵਜੇ',\n LTS: 'A h:mm:ss ਵਜੇ',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, A h:mm ਵਜੇ',\n LLLL: 'dddd, D MMMM YYYY, A h:mm ਵਜੇ',\n },\n calendar: {\n sameDay: '[ਅਜ] LT',\n nextDay: '[ਕਲ] LT',\n nextWeek: '[ਅਗਲਾ] dddd, LT',\n lastDay: '[ਕਲ] LT',\n lastWeek: '[ਪਿਛਲੇ] dddd, LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s ਵਿੱਚ',\n past: '%s ਪਿਛਲੇ',\n s: 'ਕੁਝ ਸਕਿੰਟ',\n ss: '%d ਸਕਿੰਟ',\n m: 'ਇਕ ਮਿੰਟ',\n mm: '%d ਮਿੰਟ',\n h: 'ਇੱਕ ਘੰਟਾ',\n hh: '%d ਘੰਟੇ',\n d: 'ਇੱਕ ਦਿਨ',\n dd: '%d ਦਿਨ',\n M: 'ਇੱਕ ਮਹੀਨਾ',\n MM: '%d ਮਹੀਨੇ',\n y: 'ਇੱਕ ਸਾਲ',\n yy: '%d ਸਾਲ',\n },\n preparse: function (string) {\n return string.replace(/[੧੨੩੪੫੬੭੮੯੦]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function (string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n // Punjabi notation for meridiems are quite fuzzy in practice. While there exists\n // a rigid notion of a 'Pahar' it is not used as rigidly in modern Punjabi.\n meridiemParse: /ਰਾਤ|ਸਵੇਰ|ਦੁਪਹਿਰ|ਸ਼ਾਮ/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'ਰਾਤ') {\n return hour < 4 ? hour : hour + 12;\n } else if (meridiem === 'ਸਵੇਰ') {\n return hour;\n } else if (meridiem === 'ਦੁਪਹਿਰ') {\n return hour >= 10 ? hour : hour + 12;\n } else if (meridiem === 'ਸ਼ਾਮ') {\n return hour + 12;\n }\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 4) {\n return 'ਰਾਤ';\n } else if (hour < 10) {\n return 'ਸਵੇਰ';\n } else if (hour < 17) {\n return 'ਦੁਪਹਿਰ';\n } else if (hour < 20) {\n return 'ਸ਼ਾਮ';\n } else {\n return 'ਰਾਤ';\n }\n },\n week: {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n },\n });\n\n return paIn;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/pa-in.js?", + ); + + /***/ + }, + + /***/ 4418: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Polish [pl]\n//! author : Rafal Hirsz : https://github.com/evoL\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var monthsNominative =\n 'styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień'.split(\n '_'\n ),\n monthsSubjective =\n 'stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia'.split(\n '_'\n ),\n monthsParse = [\n /^sty/i,\n /^lut/i,\n /^mar/i,\n /^kwi/i,\n /^maj/i,\n /^cze/i,\n /^lip/i,\n /^sie/i,\n /^wrz/i,\n /^paź/i,\n /^lis/i,\n /^gru/i,\n ];\n function plural(n) {\n return n % 10 < 5 && n % 10 > 1 && ~~(n / 10) % 10 !== 1;\n }\n function translate(number, withoutSuffix, key) {\n var result = number + ' ';\n switch (key) {\n case 'ss':\n return result + (plural(number) ? 'sekundy' : 'sekund');\n case 'm':\n return withoutSuffix ? 'minuta' : 'minutę';\n case 'mm':\n return result + (plural(number) ? 'minuty' : 'minut');\n case 'h':\n return withoutSuffix ? 'godzina' : 'godzinę';\n case 'hh':\n return result + (plural(number) ? 'godziny' : 'godzin');\n case 'ww':\n return result + (plural(number) ? 'tygodnie' : 'tygodni');\n case 'MM':\n return result + (plural(number) ? 'miesiące' : 'miesięcy');\n case 'yy':\n return result + (plural(number) ? 'lata' : 'lat');\n }\n }\n\n var pl = moment.defineLocale('pl', {\n months: function (momentToFormat, format) {\n if (!momentToFormat) {\n return monthsNominative;\n } else if (/D MMMM/.test(format)) {\n return monthsSubjective[momentToFormat.month()];\n } else {\n return monthsNominative[momentToFormat.month()];\n }\n },\n monthsShort: 'sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru'.split('_'),\n monthsParse: monthsParse,\n longMonthsParse: monthsParse,\n shortMonthsParse: monthsParse,\n weekdays:\n 'niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota'.split('_'),\n weekdaysShort: 'ndz_pon_wt_śr_czw_pt_sob'.split('_'),\n weekdaysMin: 'Nd_Pn_Wt_Śr_Cz_Pt_So'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Dziś o] LT',\n nextDay: '[Jutro o] LT',\n nextWeek: function () {\n switch (this.day()) {\n case 0:\n return '[W niedzielę o] LT';\n\n case 2:\n return '[We wtorek o] LT';\n\n case 3:\n return '[W środę o] LT';\n\n case 6:\n return '[W sobotę o] LT';\n\n default:\n return '[W] dddd [o] LT';\n }\n },\n lastDay: '[Wczoraj o] LT',\n lastWeek: function () {\n switch (this.day()) {\n case 0:\n return '[W zeszłą niedzielę o] LT';\n case 3:\n return '[W zeszłą środę o] LT';\n case 6:\n return '[W zeszłą sobotę o] LT';\n default:\n return '[W zeszły] dddd [o] LT';\n }\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'za %s',\n past: '%s temu',\n s: 'kilka sekund',\n ss: translate,\n m: translate,\n mm: translate,\n h: translate,\n hh: translate,\n d: '1 dzień',\n dd: '%d dni',\n w: 'tydzień',\n ww: translate,\n M: 'miesiąc',\n MM: translate,\n y: 'rok',\n yy: translate,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return pl;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/pl.js?", + ); + + /***/ + }, + + /***/ 684: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Portuguese (Brazil) [pt-br]\n//! author : Caio Ribeiro Pereira : https://github.com/caio-ribeiro-pereira\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var ptBr = moment.defineLocale('pt-br', {\n months: 'janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro'.split(\n '_'\n ),\n monthsShort: 'jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez'.split('_'),\n weekdays:\n 'domingo_segunda-feira_terça-feira_quarta-feira_quinta-feira_sexta-feira_sábado'.split(\n '_'\n ),\n weekdaysShort: 'dom_seg_ter_qua_qui_sex_sáb'.split('_'),\n weekdaysMin: 'do_2ª_3ª_4ª_5ª_6ª_sá'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D [de] MMMM [de] YYYY',\n LLL: 'D [de] MMMM [de] YYYY [às] HH:mm',\n LLLL: 'dddd, D [de] MMMM [de] YYYY [às] HH:mm',\n },\n calendar: {\n sameDay: '[Hoje às] LT',\n nextDay: '[Amanhã às] LT',\n nextWeek: 'dddd [às] LT',\n lastDay: '[Ontem às] LT',\n lastWeek: function () {\n return this.day() === 0 || this.day() === 6\n ? '[Último] dddd [às] LT' // Saturday + Sunday\n : '[Última] dddd [às] LT'; // Monday - Friday\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'em %s',\n past: 'há %s',\n s: 'poucos segundos',\n ss: '%d segundos',\n m: 'um minuto',\n mm: '%d minutos',\n h: 'uma hora',\n hh: '%d horas',\n d: 'um dia',\n dd: '%d dias',\n M: 'um mês',\n MM: '%d meses',\n y: 'um ano',\n yy: '%d anos',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal: '%dº',\n invalidDate: 'Data inválida',\n });\n\n return ptBr;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/pt-br.js?", + ); + + /***/ + }, + + /***/ 9834: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Portuguese [pt]\n//! author : Jefferson : https://github.com/jalex79\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var pt = moment.defineLocale('pt', {\n months: 'janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro'.split(\n '_'\n ),\n monthsShort: 'jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez'.split('_'),\n weekdays:\n 'Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado'.split(\n '_'\n ),\n weekdaysShort: 'Dom_Seg_Ter_Qua_Qui_Sex_Sáb'.split('_'),\n weekdaysMin: 'Do_2ª_3ª_4ª_5ª_6ª_Sá'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D [de] MMMM [de] YYYY',\n LLL: 'D [de] MMMM [de] YYYY HH:mm',\n LLLL: 'dddd, D [de] MMMM [de] YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Hoje às] LT',\n nextDay: '[Amanhã às] LT',\n nextWeek: 'dddd [às] LT',\n lastDay: '[Ontem às] LT',\n lastWeek: function () {\n return this.day() === 0 || this.day() === 6\n ? '[Último] dddd [às] LT' // Saturday + Sunday\n : '[Última] dddd [às] LT'; // Monday - Friday\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'em %s',\n past: 'há %s',\n s: 'segundos',\n ss: '%d segundos',\n m: 'um minuto',\n mm: '%d minutos',\n h: 'uma hora',\n hh: '%d horas',\n d: 'um dia',\n dd: '%d dias',\n w: 'uma semana',\n ww: '%d semanas',\n M: 'um mês',\n MM: '%d meses',\n y: 'um ano',\n yy: '%d anos',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal: '%dº',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return pt;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/pt.js?", + ); + + /***/ + }, + + /***/ 4457: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Romanian [ro]\n//! author : Vlad Gurdiga : https://github.com/gurdiga\n//! author : Valentin Agachi : https://github.com/avaly\n//! author : Emanuel Cepoi : https://github.com/cepem\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function relativeTimeWithPlural(number, withoutSuffix, key) {\n var format = {\n ss: 'secunde',\n mm: 'minute',\n hh: 'ore',\n dd: 'zile',\n ww: 'săptămâni',\n MM: 'luni',\n yy: 'ani',\n },\n separator = ' ';\n if (number % 100 >= 20 || (number >= 100 && number % 100 === 0)) {\n separator = ' de ';\n }\n return number + separator + format[key];\n }\n\n var ro = moment.defineLocale('ro', {\n months: 'ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie'.split(\n '_'\n ),\n monthsShort:\n 'ian._feb._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays: 'duminică_luni_marți_miercuri_joi_vineri_sâmbătă'.split('_'),\n weekdaysShort: 'Dum_Lun_Mar_Mie_Joi_Vin_Sâm'.split('_'),\n weekdaysMin: 'Du_Lu_Ma_Mi_Jo_Vi_Sâ'.split('_'),\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY H:mm',\n LLLL: 'dddd, D MMMM YYYY H:mm',\n },\n calendar: {\n sameDay: '[azi la] LT',\n nextDay: '[mâine la] LT',\n nextWeek: 'dddd [la] LT',\n lastDay: '[ieri la] LT',\n lastWeek: '[fosta] dddd [la] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'peste %s',\n past: '%s în urmă',\n s: 'câteva secunde',\n ss: relativeTimeWithPlural,\n m: 'un minut',\n mm: relativeTimeWithPlural,\n h: 'o oră',\n hh: relativeTimeWithPlural,\n d: 'o zi',\n dd: relativeTimeWithPlural,\n w: 'o săptămână',\n ww: relativeTimeWithPlural,\n M: 'o lună',\n MM: relativeTimeWithPlural,\n y: 'un an',\n yy: relativeTimeWithPlural,\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return ro;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/ro.js?", + ); + + /***/ + }, + + /***/ 2271: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Russian [ru]\n//! author : Viktorminator : https://github.com/Viktorminator\n//! author : Menelion Elensúle : https://github.com/Oire\n//! author : Коренберг Марк : https://github.com/socketpair\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function plural(word, num) {\n var forms = word.split('_');\n return num % 10 === 1 && num % 100 !== 11\n ? forms[0]\n : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20)\n ? forms[1]\n : forms[2];\n }\n function relativeTimeWithPlural(number, withoutSuffix, key) {\n var format = {\n ss: withoutSuffix ? 'секунда_секунды_секунд' : 'секунду_секунды_секунд',\n mm: withoutSuffix ? 'минута_минуты_минут' : 'минуту_минуты_минут',\n hh: 'час_часа_часов',\n dd: 'день_дня_дней',\n ww: 'неделя_недели_недель',\n MM: 'месяц_месяца_месяцев',\n yy: 'год_года_лет',\n };\n if (key === 'm') {\n return withoutSuffix ? 'минута' : 'минуту';\n } else {\n return number + ' ' + plural(format[key], +number);\n }\n }\n var monthsParse = [\n /^янв/i,\n /^фев/i,\n /^мар/i,\n /^апр/i,\n /^ма[йя]/i,\n /^июн/i,\n /^июл/i,\n /^авг/i,\n /^сен/i,\n /^окт/i,\n /^ноя/i,\n /^дек/i,\n ];\n\n // http://new.gramota.ru/spravka/rules/139-prop : § 103\n // Сокращения месяцев: http://new.gramota.ru/spravka/buro/search-answer?s=242637\n // CLDR data: http://www.unicode.org/cldr/charts/28/summary/ru.html#1753\n var ru = moment.defineLocale('ru', {\n months: {\n format: 'января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря'.split(\n '_'\n ),\n standalone:\n 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split(\n '_'\n ),\n },\n monthsShort: {\n // по CLDR именно \"июл.\" и \"июн.\", но какой смысл менять букву на точку?\n format: 'янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.'.split(\n '_'\n ),\n standalone:\n 'янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.'.split(\n '_'\n ),\n },\n weekdays: {\n standalone:\n 'воскресенье_понедельник_вторник_среда_четверг_пятница_суббота'.split(\n '_'\n ),\n format: 'воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу'.split(\n '_'\n ),\n isFormat: /\\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?] ?dddd/,\n },\n weekdaysShort: 'вс_пн_вт_ср_чт_пт_сб'.split('_'),\n weekdaysMin: 'вс_пн_вт_ср_чт_пт_сб'.split('_'),\n monthsParse: monthsParse,\n longMonthsParse: monthsParse,\n shortMonthsParse: monthsParse,\n\n // полные названия с падежами, по три буквы, для некоторых, по 4 буквы, сокращения с точкой и без точки\n monthsRegex:\n /^(январ[ья]|янв\\.?|феврал[ья]|февр?\\.?|марта?|мар\\.?|апрел[ья]|апр\\.?|ма[йя]|июн[ья]|июн\\.?|июл[ья]|июл\\.?|августа?|авг\\.?|сентябр[ья]|сент?\\.?|октябр[ья]|окт\\.?|ноябр[ья]|нояб?\\.?|декабр[ья]|дек\\.?)/i,\n\n // копия предыдущего\n monthsShortRegex:\n /^(январ[ья]|янв\\.?|феврал[ья]|февр?\\.?|марта?|мар\\.?|апрел[ья]|апр\\.?|ма[йя]|июн[ья]|июн\\.?|июл[ья]|июл\\.?|августа?|авг\\.?|сентябр[ья]|сент?\\.?|октябр[ья]|окт\\.?|ноябр[ья]|нояб?\\.?|декабр[ья]|дек\\.?)/i,\n\n // полные названия с падежами\n monthsStrictRegex:\n /^(январ[яь]|феврал[яь]|марта?|апрел[яь]|ма[яй]|июн[яь]|июл[яь]|августа?|сентябр[яь]|октябр[яь]|ноябр[яь]|декабр[яь])/i,\n\n // Выражение, которое соответствует только сокращённым формам\n monthsShortStrictRegex:\n /^(янв\\.|февр?\\.|мар[т.]|апр\\.|ма[яй]|июн[ья.]|июл[ья.]|авг\\.|сент?\\.|окт\\.|нояб?\\.|дек\\.)/i,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY г.',\n LLL: 'D MMMM YYYY г., H:mm',\n LLLL: 'dddd, D MMMM YYYY г., H:mm',\n },\n calendar: {\n sameDay: '[Сегодня, в] LT',\n nextDay: '[Завтра, в] LT',\n lastDay: '[Вчера, в] LT',\n nextWeek: function (now) {\n if (now.week() !== this.week()) {\n switch (this.day()) {\n case 0:\n return '[В следующее] dddd, [в] LT';\n case 1:\n case 2:\n case 4:\n return '[В следующий] dddd, [в] LT';\n case 3:\n case 5:\n case 6:\n return '[В следующую] dddd, [в] LT';\n }\n } else {\n if (this.day() === 2) {\n return '[Во] dddd, [в] LT';\n } else {\n return '[В] dddd, [в] LT';\n }\n }\n },\n lastWeek: function (now) {\n if (now.week() !== this.week()) {\n switch (this.day()) {\n case 0:\n return '[В прошлое] dddd, [в] LT';\n case 1:\n case 2:\n case 4:\n return '[В прошлый] dddd, [в] LT';\n case 3:\n case 5:\n case 6:\n return '[В прошлую] dddd, [в] LT';\n }\n } else {\n if (this.day() === 2) {\n return '[Во] dddd, [в] LT';\n } else {\n return '[В] dddd, [в] LT';\n }\n }\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'через %s',\n past: '%s назад',\n s: 'несколько секунд',\n ss: relativeTimeWithPlural,\n m: relativeTimeWithPlural,\n mm: relativeTimeWithPlural,\n h: 'час',\n hh: relativeTimeWithPlural,\n d: 'день',\n dd: relativeTimeWithPlural,\n w: 'неделя',\n ww: relativeTimeWithPlural,\n M: 'месяц',\n MM: relativeTimeWithPlural,\n y: 'год',\n yy: relativeTimeWithPlural,\n },\n meridiemParse: /ночи|утра|дня|вечера/i,\n isPM: function (input) {\n return /^(дня|вечера)$/.test(input);\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 4) {\n return 'ночи';\n } else if (hour < 12) {\n return 'утра';\n } else if (hour < 17) {\n return 'дня';\n } else {\n return 'вечера';\n }\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-(й|го|я)/,\n ordinal: function (number, period) {\n switch (period) {\n case 'M':\n case 'd':\n case 'DDD':\n return number + '-й';\n case 'D':\n return number + '-го';\n case 'w':\n case 'W':\n return number + '-я';\n default:\n return number;\n }\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return ru;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/ru.js?", + ); + + /***/ + }, + + /***/ 1221: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Sindhi [sd]\n//! author : Narain Sagar : https://github.com/narainsagar\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var months = [\n 'جنوري',\n 'فيبروري',\n 'مارچ',\n 'اپريل',\n 'مئي',\n 'جون',\n 'جولاءِ',\n 'آگسٽ',\n 'سيپٽمبر',\n 'آڪٽوبر',\n 'نومبر',\n 'ڊسمبر',\n ],\n days = ['آچر', 'سومر', 'اڱارو', 'اربع', 'خميس', 'جمع', 'ڇنڇر'];\n\n var sd = moment.defineLocale('sd', {\n months: months,\n monthsShort: months,\n weekdays: days,\n weekdaysShort: days,\n weekdaysMin: days,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd، D MMMM YYYY HH:mm',\n },\n meridiemParse: /صبح|شام/,\n isPM: function (input) {\n return 'شام' === input;\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 12) {\n return 'صبح';\n }\n return 'شام';\n },\n calendar: {\n sameDay: '[اڄ] LT',\n nextDay: '[سڀاڻي] LT',\n nextWeek: 'dddd [اڳين هفتي تي] LT',\n lastDay: '[ڪالهه] LT',\n lastWeek: '[گزريل هفتي] dddd [تي] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s پوء',\n past: '%s اڳ',\n s: 'چند سيڪنڊ',\n ss: '%d سيڪنڊ',\n m: 'هڪ منٽ',\n mm: '%d منٽ',\n h: 'هڪ ڪلاڪ',\n hh: '%d ڪلاڪ',\n d: 'هڪ ڏينهن',\n dd: '%d ڏينهن',\n M: 'هڪ مهينو',\n MM: '%d مهينا',\n y: 'هڪ سال',\n yy: '%d سال',\n },\n preparse: function (string) {\n return string.replace(/،/g, ',');\n },\n postformat: function (string) {\n return string.replace(/,/g, '،');\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return sd;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/sd.js?", + ); + + /***/ + }, + + /***/ 3478: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Northern Sami [se]\n//! authors : Bård Rolstad Henriksen : https://github.com/karamell\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var se = moment.defineLocale('se', {\n months: 'ođđajagemánnu_guovvamánnu_njukčamánnu_cuoŋománnu_miessemánnu_geassemánnu_suoidnemánnu_borgemánnu_čakčamánnu_golggotmánnu_skábmamánnu_juovlamánnu'.split(\n '_'\n ),\n monthsShort:\n 'ođđj_guov_njuk_cuo_mies_geas_suoi_borg_čakč_golg_skáb_juov'.split('_'),\n weekdays:\n 'sotnabeaivi_vuossárga_maŋŋebárga_gaskavahkku_duorastat_bearjadat_lávvardat'.split(\n '_'\n ),\n weekdaysShort: 'sotn_vuos_maŋ_gask_duor_bear_láv'.split('_'),\n weekdaysMin: 's_v_m_g_d_b_L'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'MMMM D. [b.] YYYY',\n LLL: 'MMMM D. [b.] YYYY [ti.] HH:mm',\n LLLL: 'dddd, MMMM D. [b.] YYYY [ti.] HH:mm',\n },\n calendar: {\n sameDay: '[otne ti] LT',\n nextDay: '[ihttin ti] LT',\n nextWeek: 'dddd [ti] LT',\n lastDay: '[ikte ti] LT',\n lastWeek: '[ovddit] dddd [ti] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s geažes',\n past: 'maŋit %s',\n s: 'moadde sekunddat',\n ss: '%d sekunddat',\n m: 'okta minuhta',\n mm: '%d minuhtat',\n h: 'okta diimmu',\n hh: '%d diimmut',\n d: 'okta beaivi',\n dd: '%d beaivvit',\n M: 'okta mánnu',\n MM: '%d mánut',\n y: 'okta jahki',\n yy: '%d jagit',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return se;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/se.js?", + ); + + /***/ + }, + + /***/ 7538: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Sinhalese [si]\n//! author : Sampath Sitinamaluwa : https://github.com/sampathsris\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n /*jshint -W100*/\n var si = moment.defineLocale('si', {\n months: 'ජනවාරි_පෙබරවාරි_මාර්තු_අප්‍රේල්_මැයි_ජූනි_ජූලි_අගෝස්තු_සැප්තැම්බර්_ඔක්තෝබර්_නොවැම්බර්_දෙසැම්බර්'.split(\n '_'\n ),\n monthsShort: 'ජන_පෙබ_මාර්_අප්_මැයි_ජූනි_ජූලි_අගෝ_සැප්_ඔක්_නොවැ_දෙසැ'.split(\n '_'\n ),\n weekdays:\n 'ඉරිදා_සඳුදා_අඟහරුවාදා_බදාදා_බ්‍රහස්පතින්දා_සිකුරාදා_සෙනසුරාදා'.split(\n '_'\n ),\n weekdaysShort: 'ඉරි_සඳු_අඟ_බදා_බ්‍රහ_සිකු_සෙන'.split('_'),\n weekdaysMin: 'ඉ_ස_අ_බ_බ්‍ර_සි_සෙ'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'a h:mm',\n LTS: 'a h:mm:ss',\n L: 'YYYY/MM/DD',\n LL: 'YYYY MMMM D',\n LLL: 'YYYY MMMM D, a h:mm',\n LLLL: 'YYYY MMMM D [වැනි] dddd, a h:mm:ss',\n },\n calendar: {\n sameDay: '[අද] LT[ට]',\n nextDay: '[හෙට] LT[ට]',\n nextWeek: 'dddd LT[ට]',\n lastDay: '[ඊයේ] LT[ට]',\n lastWeek: '[පසුගිය] dddd LT[ට]',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%sකින්',\n past: '%sකට පෙර',\n s: 'තත්පර කිහිපය',\n ss: 'තත්පර %d',\n m: 'මිනිත්තුව',\n mm: 'මිනිත්තු %d',\n h: 'පැය',\n hh: 'පැය %d',\n d: 'දිනය',\n dd: 'දින %d',\n M: 'මාසය',\n MM: 'මාස %d',\n y: 'වසර',\n yy: 'වසර %d',\n },\n dayOfMonthOrdinalParse: /\\d{1,2} වැනි/,\n ordinal: function (number) {\n return number + ' වැනි';\n },\n meridiemParse: /පෙර වරු|පස් වරු|පෙ.ව|ප.ව./,\n isPM: function (input) {\n return input === 'ප.ව.' || input === 'පස් වරු';\n },\n meridiem: function (hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'ප.ව.' : 'පස් වරු';\n } else {\n return isLower ? 'පෙ.ව.' : 'පෙර වරු';\n }\n },\n });\n\n return si;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/si.js?", + ); + + /***/ + }, + + /***/ 5784: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Slovak [sk]\n//! author : Martin Minka : https://github.com/k2s\n//! based on work of petrbela : https://github.com/petrbela\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var months =\n 'január_február_marec_apríl_máj_jún_júl_august_september_október_november_december'.split(\n '_'\n ),\n monthsShort = 'jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec'.split('_');\n function plural(n) {\n return n > 1 && n < 5;\n }\n function translate(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's': // a few seconds / in a few seconds / a few seconds ago\n return withoutSuffix || isFuture ? 'pár sekúnd' : 'pár sekundami';\n case 'ss': // 9 seconds / in 9 seconds / 9 seconds ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'sekundy' : 'sekúnd');\n } else {\n return result + 'sekundami';\n }\n case 'm': // a minute / in a minute / a minute ago\n return withoutSuffix ? 'minúta' : isFuture ? 'minútu' : 'minútou';\n case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'minúty' : 'minút');\n } else {\n return result + 'minútami';\n }\n case 'h': // an hour / in an hour / an hour ago\n return withoutSuffix ? 'hodina' : isFuture ? 'hodinu' : 'hodinou';\n case 'hh': // 9 hours / in 9 hours / 9 hours ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'hodiny' : 'hodín');\n } else {\n return result + 'hodinami';\n }\n case 'd': // a day / in a day / a day ago\n return withoutSuffix || isFuture ? 'deň' : 'dňom';\n case 'dd': // 9 days / in 9 days / 9 days ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'dni' : 'dní');\n } else {\n return result + 'dňami';\n }\n case 'M': // a month / in a month / a month ago\n return withoutSuffix || isFuture ? 'mesiac' : 'mesiacom';\n case 'MM': // 9 months / in 9 months / 9 months ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'mesiace' : 'mesiacov');\n } else {\n return result + 'mesiacmi';\n }\n case 'y': // a year / in a year / a year ago\n return withoutSuffix || isFuture ? 'rok' : 'rokom';\n case 'yy': // 9 years / in 9 years / 9 years ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'roky' : 'rokov');\n } else {\n return result + 'rokmi';\n }\n }\n }\n\n var sk = moment.defineLocale('sk', {\n months: months,\n monthsShort: monthsShort,\n weekdays: 'nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota'.split('_'),\n weekdaysShort: 'ne_po_ut_st_št_pi_so'.split('_'),\n weekdaysMin: 'ne_po_ut_st_št_pi_so'.split('_'),\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY H:mm',\n LLLL: 'dddd D. MMMM YYYY H:mm',\n },\n calendar: {\n sameDay: '[dnes o] LT',\n nextDay: '[zajtra o] LT',\n nextWeek: function () {\n switch (this.day()) {\n case 0:\n return '[v nedeľu o] LT';\n case 1:\n case 2:\n return '[v] dddd [o] LT';\n case 3:\n return '[v stredu o] LT';\n case 4:\n return '[vo štvrtok o] LT';\n case 5:\n return '[v piatok o] LT';\n case 6:\n return '[v sobotu o] LT';\n }\n },\n lastDay: '[včera o] LT',\n lastWeek: function () {\n switch (this.day()) {\n case 0:\n return '[minulú nedeľu o] LT';\n case 1:\n case 2:\n return '[minulý] dddd [o] LT';\n case 3:\n return '[minulú stredu o] LT';\n case 4:\n case 5:\n return '[minulý] dddd [o] LT';\n case 6:\n return '[minulú sobotu o] LT';\n }\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'za %s',\n past: 'pred %s',\n s: translate,\n ss: translate,\n m: translate,\n mm: translate,\n h: translate,\n hh: translate,\n d: translate,\n dd: translate,\n M: translate,\n MM: translate,\n y: translate,\n yy: translate,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return sk;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/sk.js?", + ); + + /***/ + }, + + /***/ 6637: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Slovenian [sl]\n//! author : Robert Sedovšek : https://github.com/sedovsek\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }\n\n var sl = moment.defineLocale('sl', {\n months: 'januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december'.split(\n '_'\n ),\n monthsShort:\n 'jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays: 'nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota'.split('_'),\n weekdaysShort: 'ned._pon._tor._sre._čet._pet._sob.'.split('_'),\n weekdaysMin: 'ne_po_to_sr_če_pe_so'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD. MM. YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY H:mm',\n LLLL: 'dddd, D. MMMM YYYY H:mm',\n },\n calendar: {\n sameDay: '[danes ob] LT',\n nextDay: '[jutri ob] LT',\n\n nextWeek: function () {\n switch (this.day()) {\n case 0:\n return '[v] [nedeljo] [ob] LT';\n case 3:\n return '[v] [sredo] [ob] LT';\n case 6:\n return '[v] [soboto] [ob] LT';\n case 1:\n case 2:\n case 4:\n case 5:\n return '[v] dddd [ob] LT';\n }\n },\n lastDay: '[včeraj ob] LT',\n lastWeek: function () {\n switch (this.day()) {\n case 0:\n return '[prejšnjo] [nedeljo] [ob] LT';\n case 3:\n return '[prejšnjo] [sredo] [ob] LT';\n case 6:\n return '[prejšnjo] [soboto] [ob] LT';\n case 1:\n case 2:\n case 4:\n case 5:\n return '[prejšnji] dddd [ob] LT';\n }\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'čez %s',\n past: 'pred %s',\n s: processRelativeTime,\n ss: processRelativeTime,\n m: processRelativeTime,\n mm: processRelativeTime,\n h: processRelativeTime,\n hh: processRelativeTime,\n d: processRelativeTime,\n dd: processRelativeTime,\n M: processRelativeTime,\n MM: processRelativeTime,\n y: processRelativeTime,\n yy: processRelativeTime,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return sl;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/sl.js?", + ); + + /***/ + }, + + /***/ 6794: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Albanian [sq]\n//! author : Flakërim Ismani : https://github.com/flakerimi\n//! author : Menelion Elensúle : https://github.com/Oire\n//! author : Oerd Cukalla : https://github.com/oerd\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var sq = moment.defineLocale('sq', {\n months: 'Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_Nëntor_Dhjetor'.split(\n '_'\n ),\n monthsShort: 'Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_Nën_Dhj'.split('_'),\n weekdays: 'E Diel_E Hënë_E Martë_E Mërkurë_E Enjte_E Premte_E Shtunë'.split(\n '_'\n ),\n weekdaysShort: 'Die_Hën_Mar_Mër_Enj_Pre_Sht'.split('_'),\n weekdaysMin: 'D_H_Ma_Më_E_P_Sh'.split('_'),\n weekdaysParseExact: true,\n meridiemParse: /PD|MD/,\n isPM: function (input) {\n return input.charAt(0) === 'M';\n },\n meridiem: function (hours, minutes, isLower) {\n return hours < 12 ? 'PD' : 'MD';\n },\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Sot në] LT',\n nextDay: '[Nesër në] LT',\n nextWeek: 'dddd [në] LT',\n lastDay: '[Dje në] LT',\n lastWeek: 'dddd [e kaluar në] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'në %s',\n past: '%s më parë',\n s: 'disa sekonda',\n ss: '%d sekonda',\n m: 'një minutë',\n mm: '%d minuta',\n h: 'një orë',\n hh: '%d orë',\n d: 'një ditë',\n dd: '%d ditë',\n M: 'një muaj',\n MM: '%d muaj',\n y: 'një vit',\n yy: '%d vite',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return sq;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/sq.js?", + ); + + /***/ + }, + + /***/ 3322: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Serbian Cyrillic [sr-cyrl]\n//! author : Milan Janačković<milanjanackovic@gmail.com> : https://github.com/milan-j\n//! author : Stefan Crnjaković <stefan@hotmail.rs> : https://github.com/crnjakovic\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var translator = {\n words: {\n //Different grammatical cases\n ss: ['секунда', 'секунде', 'секунди'],\n m: ['један минут', 'једног минута'],\n mm: ['минут', 'минута', 'минута'],\n h: ['један сат', 'једног сата'],\n hh: ['сат', 'сата', 'сати'],\n d: ['један дан', 'једног дана'],\n dd: ['дан', 'дана', 'дана'],\n M: ['један месец', 'једног месеца'],\n MM: ['месец', 'месеца', 'месеци'],\n y: ['једну годину', 'једне године'],\n yy: ['годину', 'године', 'година'],\n },\n correctGrammaticalCase: function (number, wordKey) {\n if (\n number % 10 >= 1 &&\n number % 10 <= 4 &&\n (number % 100 < 10 || number % 100 >= 20)\n ) {\n return number % 10 === 1 ? wordKey[0] : wordKey[1];\n }\n return wordKey[2];\n },\n translate: function (number, withoutSuffix, key, isFuture) {\n var wordKey = translator.words[key],\n word;\n\n if (key.length === 1) {\n // Nominativ\n if (key === 'y' && withoutSuffix) return 'једна година';\n return isFuture || withoutSuffix ? wordKey[0] : wordKey[1];\n }\n\n word = translator.correctGrammaticalCase(number, wordKey);\n // Nominativ\n if (key === 'yy' && withoutSuffix && word === 'годину') {\n return number + ' година';\n }\n\n return number + ' ' + word;\n },\n };\n\n var srCyrl = moment.defineLocale('sr-cyrl', {\n months: 'јануар_фебруар_март_април_мај_јун_јул_август_септембар_октобар_новембар_децембар'.split(\n '_'\n ),\n monthsShort:\n 'јан._феб._мар._апр._мај_јун_јул_авг._сеп._окт._нов._дец.'.split('_'),\n monthsParseExact: true,\n weekdays: 'недеља_понедељак_уторак_среда_четвртак_петак_субота'.split('_'),\n weekdaysShort: 'нед._пон._уто._сре._чет._пет._суб.'.split('_'),\n weekdaysMin: 'не_по_ут_ср_че_пе_су'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'D. M. YYYY.',\n LL: 'D. MMMM YYYY.',\n LLL: 'D. MMMM YYYY. H:mm',\n LLLL: 'dddd, D. MMMM YYYY. H:mm',\n },\n calendar: {\n sameDay: '[данас у] LT',\n nextDay: '[сутра у] LT',\n nextWeek: function () {\n switch (this.day()) {\n case 0:\n return '[у] [недељу] [у] LT';\n case 3:\n return '[у] [среду] [у] LT';\n case 6:\n return '[у] [суботу] [у] LT';\n case 1:\n case 2:\n case 4:\n case 5:\n return '[у] dddd [у] LT';\n }\n },\n lastDay: '[јуче у] LT',\n lastWeek: function () {\n var lastWeekDays = [\n '[прошле] [недеље] [у] LT',\n '[прошлог] [понедељка] [у] LT',\n '[прошлог] [уторка] [у] LT',\n '[прошле] [среде] [у] LT',\n '[прошлог] [четвртка] [у] LT',\n '[прошлог] [петка] [у] LT',\n '[прошле] [суботе] [у] LT',\n ];\n return lastWeekDays[this.day()];\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'за %s',\n past: 'пре %s',\n s: 'неколико секунди',\n ss: translator.translate,\n m: translator.translate,\n mm: translator.translate,\n h: translator.translate,\n hh: translator.translate,\n d: translator.translate,\n dd: translator.translate,\n M: translator.translate,\n MM: translator.translate,\n y: translator.translate,\n yy: translator.translate,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 1st is the first week of the year.\n },\n });\n\n return srCyrl;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/sr-cyrl.js?", + ); + + /***/ + }, + + /***/ 5719: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Serbian [sr]\n//! author : Milan Janačković<milanjanackovic@gmail.com> : https://github.com/milan-j\n//! author : Stefan Crnjaković <stefan@hotmail.rs> : https://github.com/crnjakovic\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var translator = {\n words: {\n //Different grammatical cases\n ss: ['sekunda', 'sekunde', 'sekundi'],\n m: ['jedan minut', 'jednog minuta'],\n mm: ['minut', 'minuta', 'minuta'],\n h: ['jedan sat', 'jednog sata'],\n hh: ['sat', 'sata', 'sati'],\n d: ['jedan dan', 'jednog dana'],\n dd: ['dan', 'dana', 'dana'],\n M: ['jedan mesec', 'jednog meseca'],\n MM: ['mesec', 'meseca', 'meseci'],\n y: ['jednu godinu', 'jedne godine'],\n yy: ['godinu', 'godine', 'godina'],\n },\n correctGrammaticalCase: function (number, wordKey) {\n if (\n number % 10 >= 1 &&\n number % 10 <= 4 &&\n (number % 100 < 10 || number % 100 >= 20)\n ) {\n return number % 10 === 1 ? wordKey[0] : wordKey[1];\n }\n return wordKey[2];\n },\n translate: function (number, withoutSuffix, key, isFuture) {\n var wordKey = translator.words[key],\n word;\n\n if (key.length === 1) {\n // Nominativ\n if (key === 'y' && withoutSuffix) return 'jedna godina';\n return isFuture || withoutSuffix ? wordKey[0] : wordKey[1];\n }\n\n word = translator.correctGrammaticalCase(number, wordKey);\n // Nominativ\n if (key === 'yy' && withoutSuffix && word === 'godinu') {\n return number + ' godina';\n }\n\n return number + ' ' + word;\n },\n };\n\n var sr = moment.defineLocale('sr', {\n months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split(\n '_'\n ),\n monthsShort:\n 'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split('_'),\n monthsParseExact: true,\n weekdays: 'nedelja_ponedeljak_utorak_sreda_četvrtak_petak_subota'.split(\n '_'\n ),\n weekdaysShort: 'ned._pon._uto._sre._čet._pet._sub.'.split('_'),\n weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'D. M. YYYY.',\n LL: 'D. MMMM YYYY.',\n LLL: 'D. MMMM YYYY. H:mm',\n LLLL: 'dddd, D. MMMM YYYY. H:mm',\n },\n calendar: {\n sameDay: '[danas u] LT',\n nextDay: '[sutra u] LT',\n nextWeek: function () {\n switch (this.day()) {\n case 0:\n return '[u] [nedelju] [u] LT';\n case 3:\n return '[u] [sredu] [u] LT';\n case 6:\n return '[u] [subotu] [u] LT';\n case 1:\n case 2:\n case 4:\n case 5:\n return '[u] dddd [u] LT';\n }\n },\n lastDay: '[juče u] LT',\n lastWeek: function () {\n var lastWeekDays = [\n '[prošle] [nedelje] [u] LT',\n '[prošlog] [ponedeljka] [u] LT',\n '[prošlog] [utorka] [u] LT',\n '[prošle] [srede] [u] LT',\n '[prošlog] [četvrtka] [u] LT',\n '[prošlog] [petka] [u] LT',\n '[prošle] [subote] [u] LT',\n ];\n return lastWeekDays[this.day()];\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'za %s',\n past: 'pre %s',\n s: 'nekoliko sekundi',\n ss: translator.translate,\n m: translator.translate,\n mm: translator.translate,\n h: translator.translate,\n hh: translator.translate,\n d: translator.translate,\n dd: translator.translate,\n M: translator.translate,\n MM: translator.translate,\n y: translator.translate,\n yy: translator.translate,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return sr;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/sr.js?", + ); + + /***/ + }, + + /***/ 6000: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : siSwati [ss]\n//! author : Nicolai Davies<mail@nicolai.io> : https://github.com/nicolaidavies\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var ss = moment.defineLocale('ss', {\n months: \"Bhimbidvwane_Indlovana_Indlov'lenkhulu_Mabasa_Inkhwekhweti_Inhlaba_Kholwane_Ingci_Inyoni_Imphala_Lweti_Ingongoni\".split(\n '_'\n ),\n monthsShort: 'Bhi_Ina_Inu_Mab_Ink_Inh_Kho_Igc_Iny_Imp_Lwe_Igo'.split('_'),\n weekdays:\n 'Lisontfo_Umsombuluko_Lesibili_Lesitsatfu_Lesine_Lesihlanu_Umgcibelo'.split(\n '_'\n ),\n weekdaysShort: 'Lis_Umb_Lsb_Les_Lsi_Lsh_Umg'.split('_'),\n weekdaysMin: 'Li_Us_Lb_Lt_Ls_Lh_Ug'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'h:mm A',\n LTS: 'h:mm:ss A',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY h:mm A',\n LLLL: 'dddd, D MMMM YYYY h:mm A',\n },\n calendar: {\n sameDay: '[Namuhla nga] LT',\n nextDay: '[Kusasa nga] LT',\n nextWeek: 'dddd [nga] LT',\n lastDay: '[Itolo nga] LT',\n lastWeek: 'dddd [leliphelile] [nga] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'nga %s',\n past: 'wenteka nga %s',\n s: 'emizuzwana lomcane',\n ss: '%d mzuzwana',\n m: 'umzuzu',\n mm: '%d emizuzu',\n h: 'lihora',\n hh: '%d emahora',\n d: 'lilanga',\n dd: '%d emalanga',\n M: 'inyanga',\n MM: '%d tinyanga',\n y: 'umnyaka',\n yy: '%d iminyaka',\n },\n meridiemParse: /ekuseni|emini|entsambama|ebusuku/,\n meridiem: function (hours, minutes, isLower) {\n if (hours < 11) {\n return 'ekuseni';\n } else if (hours < 15) {\n return 'emini';\n } else if (hours < 19) {\n return 'entsambama';\n } else {\n return 'ebusuku';\n }\n },\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'ekuseni') {\n return hour;\n } else if (meridiem === 'emini') {\n return hour >= 11 ? hour : hour + 12;\n } else if (meridiem === 'entsambama' || meridiem === 'ebusuku') {\n if (hour === 0) {\n return 0;\n }\n return hour + 12;\n }\n },\n dayOfMonthOrdinalParse: /\\d{1,2}/,\n ordinal: '%d',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return ss;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/ss.js?", + ); + + /***/ + }, + + /***/ 1011: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Swedish [sv]\n//! author : Jens Alm : https://github.com/ulmus\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var sv = moment.defineLocale('sv', {\n months: 'januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december'.split(\n '_'\n ),\n monthsShort: 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'),\n weekdays: 'söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag'.split('_'),\n weekdaysShort: 'sön_mån_tis_ons_tor_fre_lör'.split('_'),\n weekdaysMin: 'sö_må_ti_on_to_fr_lö'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'YYYY-MM-DD',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY [kl.] HH:mm',\n LLLL: 'dddd D MMMM YYYY [kl.] HH:mm',\n lll: 'D MMM YYYY HH:mm',\n llll: 'ddd D MMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Idag] LT',\n nextDay: '[Imorgon] LT',\n lastDay: '[Igår] LT',\n nextWeek: '[På] dddd LT',\n lastWeek: '[I] dddd[s] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'om %s',\n past: 'för %s sedan',\n s: 'några sekunder',\n ss: '%d sekunder',\n m: 'en minut',\n mm: '%d minuter',\n h: 'en timme',\n hh: '%d timmar',\n d: 'en dag',\n dd: '%d dagar',\n M: 'en månad',\n MM: '%d månader',\n y: 'ett år',\n yy: '%d år',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(\\:e|\\:a)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n ~~((number % 100) / 10) === 1\n ? ':e'\n : b === 1\n ? ':a'\n : b === 2\n ? ':a'\n : b === 3\n ? ':e'\n : ':e';\n return number + output;\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return sv;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/sv.js?", + ); + + /***/ + }, + + /***/ 748: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Swahili [sw]\n//! author : Fahad Kassim : https://github.com/fadsel\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var sw = moment.defineLocale('sw', {\n months: 'Januari_Februari_Machi_Aprili_Mei_Juni_Julai_Agosti_Septemba_Oktoba_Novemba_Desemba'.split(\n '_'\n ),\n monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ago_Sep_Okt_Nov_Des'.split('_'),\n weekdays:\n 'Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijumaa_Jumamosi'.split(\n '_'\n ),\n weekdaysShort: 'Jpl_Jtat_Jnne_Jtan_Alh_Ijm_Jmos'.split('_'),\n weekdaysMin: 'J2_J3_J4_J5_Al_Ij_J1'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'hh:mm A',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[leo saa] LT',\n nextDay: '[kesho saa] LT',\n nextWeek: '[wiki ijayo] dddd [saat] LT',\n lastDay: '[jana] LT',\n lastWeek: '[wiki iliyopita] dddd [saat] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s baadaye',\n past: 'tokea %s',\n s: 'hivi punde',\n ss: 'sekunde %d',\n m: 'dakika moja',\n mm: 'dakika %d',\n h: 'saa limoja',\n hh: 'masaa %d',\n d: 'siku moja',\n dd: 'siku %d',\n M: 'mwezi mmoja',\n MM: 'miezi %d',\n y: 'mwaka mmoja',\n yy: 'miaka %d',\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return sw;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/sw.js?", + ); + + /***/ + }, + + /***/ 1025: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Tamil [ta]\n//! author : Arjunkumar Krishnamoorthy : https://github.com/tk120404\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var symbolMap = {\n 1: '௧',\n 2: '௨',\n 3: '௩',\n 4: '௪',\n 5: '௫',\n 6: '௬',\n 7: '௭',\n 8: '௮',\n 9: '௯',\n 0: '௦',\n },\n numberMap = {\n '௧': '1',\n '௨': '2',\n '௩': '3',\n '௪': '4',\n '௫': '5',\n '௬': '6',\n '௭': '7',\n '௮': '8',\n '௯': '9',\n '௦': '0',\n };\n\n var ta = moment.defineLocale('ta', {\n months: 'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split(\n '_'\n ),\n monthsShort:\n 'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split(\n '_'\n ),\n weekdays:\n 'ஞாயிற்றுக்கிழமை_திங்கட்கிழமை_செவ்வாய்கிழமை_புதன்கிழமை_வியாழக்கிழமை_வெள்ளிக்கிழமை_சனிக்கிழமை'.split(\n '_'\n ),\n weekdaysShort: 'ஞாயிறு_திங்கள்_செவ்வாய்_புதன்_வியாழன்_வெள்ளி_சனி'.split(\n '_'\n ),\n weekdaysMin: 'ஞா_தி_செ_பு_வி_வெ_ச'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, HH:mm',\n LLLL: 'dddd, D MMMM YYYY, HH:mm',\n },\n calendar: {\n sameDay: '[இன்று] LT',\n nextDay: '[நாளை] LT',\n nextWeek: 'dddd, LT',\n lastDay: '[நேற்று] LT',\n lastWeek: '[கடந்த வாரம்] dddd, LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s இல்',\n past: '%s முன்',\n s: 'ஒரு சில விநாடிகள்',\n ss: '%d விநாடிகள்',\n m: 'ஒரு நிமிடம்',\n mm: '%d நிமிடங்கள்',\n h: 'ஒரு மணி நேரம்',\n hh: '%d மணி நேரம்',\n d: 'ஒரு நாள்',\n dd: '%d நாட்கள்',\n M: 'ஒரு மாதம்',\n MM: '%d மாதங்கள்',\n y: 'ஒரு வருடம்',\n yy: '%d ஆண்டுகள்',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}வது/,\n ordinal: function (number) {\n return number + 'வது';\n },\n preparse: function (string) {\n return string.replace(/[௧௨௩௪௫௬௭௮௯௦]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function (string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n // refer http://ta.wikipedia.org/s/1er1\n meridiemParse: /யாமம்|வைகறை|காலை|நண்பகல்|எற்பாடு|மாலை/,\n meridiem: function (hour, minute, isLower) {\n if (hour < 2) {\n return ' யாமம்';\n } else if (hour < 6) {\n return ' வைகறை'; // வைகறை\n } else if (hour < 10) {\n return ' காலை'; // காலை\n } else if (hour < 14) {\n return ' நண்பகல்'; // நண்பகல்\n } else if (hour < 18) {\n return ' எற்பாடு'; // எற்பாடு\n } else if (hour < 22) {\n return ' மாலை'; // மாலை\n } else {\n return ' யாமம்';\n }\n },\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'யாமம்') {\n return hour < 2 ? hour : hour + 12;\n } else if (meridiem === 'வைகறை' || meridiem === 'காலை') {\n return hour;\n } else if (meridiem === 'நண்பகல்') {\n return hour >= 10 ? hour : hour + 12;\n } else {\n return hour + 12;\n }\n },\n week: {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n },\n });\n\n return ta;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/ta.js?", + ); + + /***/ + }, + + /***/ 1885: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Telugu [te]\n//! author : Krishna Chaitanya Thota : https://github.com/kcthota\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var te = moment.defineLocale('te', {\n months: 'జనవరి_ఫిబ్రవరి_మార్చి_ఏప్రిల్_మే_జూన్_జులై_ఆగస్టు_సెప్టెంబర్_అక్టోబర్_నవంబర్_డిసెంబర్'.split(\n '_'\n ),\n monthsShort:\n 'జన._ఫిబ్ర._మార్చి_ఏప్రి._మే_జూన్_జులై_ఆగ._సెప్._అక్టో._నవ._డిసె.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays:\n 'ఆదివారం_సోమవారం_మంగళవారం_బుధవారం_గురువారం_శుక్రవారం_శనివారం'.split(\n '_'\n ),\n weekdaysShort: 'ఆది_సోమ_మంగళ_బుధ_గురు_శుక్ర_శని'.split('_'),\n weekdaysMin: 'ఆ_సో_మం_బు_గు_శు_శ'.split('_'),\n longDateFormat: {\n LT: 'A h:mm',\n LTS: 'A h:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, A h:mm',\n LLLL: 'dddd, D MMMM YYYY, A h:mm',\n },\n calendar: {\n sameDay: '[నేడు] LT',\n nextDay: '[రేపు] LT',\n nextWeek: 'dddd, LT',\n lastDay: '[నిన్న] LT',\n lastWeek: '[గత] dddd, LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s లో',\n past: '%s క్రితం',\n s: 'కొన్ని క్షణాలు',\n ss: '%d సెకన్లు',\n m: 'ఒక నిమిషం',\n mm: '%d నిమిషాలు',\n h: 'ఒక గంట',\n hh: '%d గంటలు',\n d: 'ఒక రోజు',\n dd: '%d రోజులు',\n M: 'ఒక నెల',\n MM: '%d నెలలు',\n y: 'ఒక సంవత్సరం',\n yy: '%d సంవత్సరాలు',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}వ/,\n ordinal: '%dవ',\n meridiemParse: /రాత్రి|ఉదయం|మధ్యాహ్నం|సాయంత్రం/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'రాత్రి') {\n return hour < 4 ? hour : hour + 12;\n } else if (meridiem === 'ఉదయం') {\n return hour;\n } else if (meridiem === 'మధ్యాహ్నం') {\n return hour >= 10 ? hour : hour + 12;\n } else if (meridiem === 'సాయంత్రం') {\n return hour + 12;\n }\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 4) {\n return 'రాత్రి';\n } else if (hour < 10) {\n return 'ఉదయం';\n } else if (hour < 17) {\n return 'మధ్యాహ్నం';\n } else if (hour < 20) {\n return 'సాయంత్రం';\n } else {\n return 'రాత్రి';\n }\n },\n week: {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n },\n });\n\n return te;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/te.js?", + ); + + /***/ + }, + + /***/ 8861: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Tetun Dili (East Timor) [tet]\n//! author : Joshua Brooks : https://github.com/joshbrooks\n//! author : Onorio De J. Afonso : https://github.com/marobo\n//! author : Sonia Simoes : https://github.com/soniasimoes\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var tet = moment.defineLocale('tet', {\n months: 'Janeiru_Fevereiru_Marsu_Abril_Maiu_Juñu_Jullu_Agustu_Setembru_Outubru_Novembru_Dezembru'.split(\n '_'\n ),\n monthsShort: 'Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez'.split('_'),\n weekdays: 'Domingu_Segunda_Tersa_Kuarta_Kinta_Sesta_Sabadu'.split('_'),\n weekdaysShort: 'Dom_Seg_Ters_Kua_Kint_Sest_Sab'.split('_'),\n weekdaysMin: 'Do_Seg_Te_Ku_Ki_Ses_Sa'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Ohin iha] LT',\n nextDay: '[Aban iha] LT',\n nextWeek: 'dddd [iha] LT',\n lastDay: '[Horiseik iha] LT',\n lastWeek: 'dddd [semana kotuk] [iha] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'iha %s',\n past: '%s liuba',\n s: 'segundu balun',\n ss: 'segundu %d',\n m: 'minutu ida',\n mm: 'minutu %d',\n h: 'oras ida',\n hh: 'oras %d',\n d: 'loron ida',\n dd: 'loron %d',\n M: 'fulan ida',\n MM: 'fulan %d',\n y: 'tinan ida',\n yy: 'tinan %d',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n ~~((number % 100) / 10) === 1\n ? 'th'\n : b === 1\n ? 'st'\n : b === 2\n ? 'nd'\n : b === 3\n ? 'rd'\n : 'th';\n return number + output;\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return tet;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/tet.js?", + ); + + /***/ + }, + + /***/ 6571: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Tajik [tg]\n//! author : Orif N. Jr. : https://github.com/orif-jr\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var suffixes = {\n 0: '-ум',\n 1: '-ум',\n 2: '-юм',\n 3: '-юм',\n 4: '-ум',\n 5: '-ум',\n 6: '-ум',\n 7: '-ум',\n 8: '-ум',\n 9: '-ум',\n 10: '-ум',\n 12: '-ум',\n 13: '-ум',\n 20: '-ум',\n 30: '-юм',\n 40: '-ум',\n 50: '-ум',\n 60: '-ум',\n 70: '-ум',\n 80: '-ум',\n 90: '-ум',\n 100: '-ум',\n };\n\n var tg = moment.defineLocale('tg', {\n months: {\n format: 'январи_феврали_марти_апрели_майи_июни_июли_августи_сентябри_октябри_ноябри_декабри'.split(\n '_'\n ),\n standalone:\n 'январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр'.split(\n '_'\n ),\n },\n monthsShort: 'янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек'.split('_'),\n weekdays: 'якшанбе_душанбе_сешанбе_чоршанбе_панҷшанбе_ҷумъа_шанбе'.split(\n '_'\n ),\n weekdaysShort: 'яшб_дшб_сшб_чшб_пшб_ҷум_шнб'.split('_'),\n weekdaysMin: 'яш_дш_сш_чш_пш_ҷм_шб'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Имрӯз соати] LT',\n nextDay: '[Фардо соати] LT',\n lastDay: '[Дирӯз соати] LT',\n nextWeek: 'dddd[и] [ҳафтаи оянда соати] LT',\n lastWeek: 'dddd[и] [ҳафтаи гузашта соати] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'баъди %s',\n past: '%s пеш',\n s: 'якчанд сония',\n m: 'як дақиқа',\n mm: '%d дақиқа',\n h: 'як соат',\n hh: '%d соат',\n d: 'як рӯз',\n dd: '%d рӯз',\n M: 'як моҳ',\n MM: '%d моҳ',\n y: 'як сол',\n yy: '%d сол',\n },\n meridiemParse: /шаб|субҳ|рӯз|бегоҳ/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'шаб') {\n return hour < 4 ? hour : hour + 12;\n } else if (meridiem === 'субҳ') {\n return hour;\n } else if (meridiem === 'рӯз') {\n return hour >= 11 ? hour : hour + 12;\n } else if (meridiem === 'бегоҳ') {\n return hour + 12;\n }\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 4) {\n return 'шаб';\n } else if (hour < 11) {\n return 'субҳ';\n } else if (hour < 16) {\n return 'рӯз';\n } else if (hour < 19) {\n return 'бегоҳ';\n } else {\n return 'шаб';\n }\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-(ум|юм)/,\n ordinal: function (number) {\n var a = number % 10,\n b = number >= 100 ? 100 : null;\n return number + (suffixes[number] || suffixes[a] || suffixes[b]);\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 1th is the first week of the year.\n },\n });\n\n return tg;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/tg.js?", + ); + + /***/ + }, + + /***/ 5802: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Thai [th]\n//! author : Kridsada Thanabulpong : https://github.com/sirn\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var th = moment.defineLocale('th', {\n months: 'มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม'.split(\n '_'\n ),\n monthsShort:\n 'ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays: 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์'.split('_'),\n weekdaysShort: 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์'.split('_'), // yes, three characters difference\n weekdaysMin: 'อา._จ._อ._พ._พฤ._ศ._ส.'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY เวลา H:mm',\n LLLL: 'วันddddที่ D MMMM YYYY เวลา H:mm',\n },\n meridiemParse: /ก่อนเที่ยง|หลังเที่ยง/,\n isPM: function (input) {\n return input === 'หลังเที่ยง';\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 12) {\n return 'ก่อนเที่ยง';\n } else {\n return 'หลังเที่ยง';\n }\n },\n calendar: {\n sameDay: '[วันนี้ เวลา] LT',\n nextDay: '[พรุ่งนี้ เวลา] LT',\n nextWeek: 'dddd[หน้า เวลา] LT',\n lastDay: '[เมื่อวานนี้ เวลา] LT',\n lastWeek: '[วัน]dddd[ที่แล้ว เวลา] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'อีก %s',\n past: '%sที่แล้ว',\n s: 'ไม่กี่วินาที',\n ss: '%d วินาที',\n m: '1 นาที',\n mm: '%d นาที',\n h: '1 ชั่วโมง',\n hh: '%d ชั่วโมง',\n d: '1 วัน',\n dd: '%d วัน',\n w: '1 สัปดาห์',\n ww: '%d สัปดาห์',\n M: '1 เดือน',\n MM: '%d เดือน',\n y: '1 ปี',\n yy: '%d ปี',\n },\n });\n\n return th;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/th.js?", + ); + + /***/ + }, + + /***/ 9527: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Turkmen [tk]\n//! author : Atamyrat Abdyrahmanov : https://github.com/atamyratabdy\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var suffixes = {\n 1: \"'inji\",\n 5: \"'inji\",\n 8: \"'inji\",\n 70: \"'inji\",\n 80: \"'inji\",\n 2: \"'nji\",\n 7: \"'nji\",\n 20: \"'nji\",\n 50: \"'nji\",\n 3: \"'ünji\",\n 4: \"'ünji\",\n 100: \"'ünji\",\n 6: \"'njy\",\n 9: \"'unjy\",\n 10: \"'unjy\",\n 30: \"'unjy\",\n 60: \"'ynjy\",\n 90: \"'ynjy\",\n };\n\n var tk = moment.defineLocale('tk', {\n months: 'Ýanwar_Fewral_Mart_Aprel_Maý_Iýun_Iýul_Awgust_Sentýabr_Oktýabr_Noýabr_Dekabr'.split(\n '_'\n ),\n monthsShort: 'Ýan_Few_Mar_Apr_Maý_Iýn_Iýl_Awg_Sen_Okt_Noý_Dek'.split('_'),\n weekdays: 'Ýekşenbe_Duşenbe_Sişenbe_Çarşenbe_Penşenbe_Anna_Şenbe'.split(\n '_'\n ),\n weekdaysShort: 'Ýek_Duş_Siş_Çar_Pen_Ann_Şen'.split('_'),\n weekdaysMin: 'Ýk_Dş_Sş_Çr_Pn_An_Şn'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[bugün sagat] LT',\n nextDay: '[ertir sagat] LT',\n nextWeek: '[indiki] dddd [sagat] LT',\n lastDay: '[düýn] LT',\n lastWeek: '[geçen] dddd [sagat] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s soň',\n past: '%s öň',\n s: 'birnäçe sekunt',\n m: 'bir minut',\n mm: '%d minut',\n h: 'bir sagat',\n hh: '%d sagat',\n d: 'bir gün',\n dd: '%d gün',\n M: 'bir aý',\n MM: '%d aý',\n y: 'bir ýyl',\n yy: '%d ýyl',\n },\n ordinal: function (number, period) {\n switch (period) {\n case 'd':\n case 'D':\n case 'Do':\n case 'DD':\n return number;\n default:\n if (number === 0) {\n // special case for zero\n return number + \"'unjy\";\n }\n var a = number % 10,\n b = (number % 100) - a,\n c = number >= 100 ? 100 : null;\n return number + (suffixes[a] || suffixes[b] || suffixes[c]);\n }\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return tk;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/tk.js?", + ); + + /***/ + }, + + /***/ 9231: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Tagalog (Philippines) [tl-ph]\n//! author : Dan Hagman : https://github.com/hagmandan\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var tlPh = moment.defineLocale('tl-ph', {\n months: 'Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre'.split(\n '_'\n ),\n monthsShort: 'Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis'.split('_'),\n weekdays: 'Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado'.split(\n '_'\n ),\n weekdaysShort: 'Lin_Lun_Mar_Miy_Huw_Biy_Sab'.split('_'),\n weekdaysMin: 'Li_Lu_Ma_Mi_Hu_Bi_Sab'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'MM/D/YYYY',\n LL: 'MMMM D, YYYY',\n LLL: 'MMMM D, YYYY HH:mm',\n LLLL: 'dddd, MMMM DD, YYYY HH:mm',\n },\n calendar: {\n sameDay: 'LT [ngayong araw]',\n nextDay: '[Bukas ng] LT',\n nextWeek: 'LT [sa susunod na] dddd',\n lastDay: 'LT [kahapon]',\n lastWeek: 'LT [noong nakaraang] dddd',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'sa loob ng %s',\n past: '%s ang nakalipas',\n s: 'ilang segundo',\n ss: '%d segundo',\n m: 'isang minuto',\n mm: '%d minuto',\n h: 'isang oras',\n hh: '%d oras',\n d: 'isang araw',\n dd: '%d araw',\n M: 'isang buwan',\n MM: '%d buwan',\n y: 'isang taon',\n yy: '%d taon',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}/,\n ordinal: function (number) {\n return number;\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return tlPh;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/tl-ph.js?", + ); + + /***/ + }, + + /***/ 1052: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Klingon [tlh]\n//! author : Dominika Kruk : https://github.com/amaranthrose\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var numbersNouns = 'pagh_wa’_cha’_wej_loS_vagh_jav_Soch_chorgh_Hut'.split('_');\n\n function translateFuture(output) {\n var time = output;\n time =\n output.indexOf('jaj') !== -1\n ? time.slice(0, -3) + 'leS'\n : output.indexOf('jar') !== -1\n ? time.slice(0, -3) + 'waQ'\n : output.indexOf('DIS') !== -1\n ? time.slice(0, -3) + 'nem'\n : time + ' pIq';\n return time;\n }\n\n function translatePast(output) {\n var time = output;\n time =\n output.indexOf('jaj') !== -1\n ? time.slice(0, -3) + 'Hu’'\n : output.indexOf('jar') !== -1\n ? time.slice(0, -3) + 'wen'\n : output.indexOf('DIS') !== -1\n ? time.slice(0, -3) + 'ben'\n : time + ' ret';\n return time;\n }\n\n function translate(number, withoutSuffix, string, isFuture) {\n var numberNoun = numberAsNoun(number);\n switch (string) {\n case 'ss':\n return numberNoun + ' lup';\n case 'mm':\n return numberNoun + ' tup';\n case 'hh':\n return numberNoun + ' rep';\n case 'dd':\n return numberNoun + ' jaj';\n case 'MM':\n return numberNoun + ' jar';\n case 'yy':\n return numberNoun + ' DIS';\n }\n }\n\n function numberAsNoun(number) {\n var hundred = Math.floor((number % 1000) / 100),\n ten = Math.floor((number % 100) / 10),\n one = number % 10,\n word = '';\n if (hundred > 0) {\n word += numbersNouns[hundred] + 'vatlh';\n }\n if (ten > 0) {\n word += (word !== '' ? ' ' : '') + numbersNouns[ten] + 'maH';\n }\n if (one > 0) {\n word += (word !== '' ? ' ' : '') + numbersNouns[one];\n }\n return word === '' ? 'pagh' : word;\n }\n\n var tlh = moment.defineLocale('tlh', {\n months: 'tera’ jar wa’_tera’ jar cha’_tera’ jar wej_tera’ jar loS_tera’ jar vagh_tera’ jar jav_tera’ jar Soch_tera’ jar chorgh_tera’ jar Hut_tera’ jar wa’maH_tera’ jar wa’maH wa’_tera’ jar wa’maH cha’'.split(\n '_'\n ),\n monthsShort:\n 'jar wa’_jar cha’_jar wej_jar loS_jar vagh_jar jav_jar Soch_jar chorgh_jar Hut_jar wa’maH_jar wa’maH wa’_jar wa’maH cha’'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays: 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split(\n '_'\n ),\n weekdaysShort:\n 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'),\n weekdaysMin:\n 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[DaHjaj] LT',\n nextDay: '[wa’leS] LT',\n nextWeek: 'LLL',\n lastDay: '[wa’Hu’] LT',\n lastWeek: 'LLL',\n sameElse: 'L',\n },\n relativeTime: {\n future: translateFuture,\n past: translatePast,\n s: 'puS lup',\n ss: translate,\n m: 'wa’ tup',\n mm: translate,\n h: 'wa’ rep',\n hh: translate,\n d: 'wa’ jaj',\n dd: translate,\n M: 'wa’ jar',\n MM: translate,\n y: 'wa’ DIS',\n yy: translate,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return tlh;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/tlh.js?", + ); + + /***/ + }, + + /***/ 5096: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Turkish [tr]\n//! authors : Erhan Gundogan : https://github.com/erhangundogan,\n//! Burak Yiğit Kaya: https://github.com/BYK\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var suffixes = {\n 1: \"'inci\",\n 5: \"'inci\",\n 8: \"'inci\",\n 70: \"'inci\",\n 80: \"'inci\",\n 2: \"'nci\",\n 7: \"'nci\",\n 20: \"'nci\",\n 50: \"'nci\",\n 3: \"'üncü\",\n 4: \"'üncü\",\n 100: \"'üncü\",\n 6: \"'ncı\",\n 9: \"'uncu\",\n 10: \"'uncu\",\n 30: \"'uncu\",\n 60: \"'ıncı\",\n 90: \"'ıncı\",\n };\n\n var tr = moment.defineLocale('tr', {\n months: 'Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık'.split(\n '_'\n ),\n monthsShort: 'Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara'.split('_'),\n weekdays: 'Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi'.split(\n '_'\n ),\n weekdaysShort: 'Paz_Pzt_Sal_Çar_Per_Cum_Cmt'.split('_'),\n weekdaysMin: 'Pz_Pt_Sa_Ça_Pe_Cu_Ct'.split('_'),\n meridiem: function (hours, minutes, isLower) {\n if (hours < 12) {\n return isLower ? 'öö' : 'ÖÖ';\n } else {\n return isLower ? 'ös' : 'ÖS';\n }\n },\n meridiemParse: /öö|ÖÖ|ös|ÖS/,\n isPM: function (input) {\n return input === 'ös' || input === 'ÖS';\n },\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[bugün saat] LT',\n nextDay: '[yarın saat] LT',\n nextWeek: '[gelecek] dddd [saat] LT',\n lastDay: '[dün] LT',\n lastWeek: '[geçen] dddd [saat] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s sonra',\n past: '%s önce',\n s: 'birkaç saniye',\n ss: '%d saniye',\n m: 'bir dakika',\n mm: '%d dakika',\n h: 'bir saat',\n hh: '%d saat',\n d: 'bir gün',\n dd: '%d gün',\n w: 'bir hafta',\n ww: '%d hafta',\n M: 'bir ay',\n MM: '%d ay',\n y: 'bir yıl',\n yy: '%d yıl',\n },\n ordinal: function (number, period) {\n switch (period) {\n case 'd':\n case 'D':\n case 'Do':\n case 'DD':\n return number;\n default:\n if (number === 0) {\n // special case for zero\n return number + \"'ıncı\";\n }\n var a = number % 10,\n b = (number % 100) - a,\n c = number >= 100 ? 100 : null;\n return number + (suffixes[a] || suffixes[b] || suffixes[c]);\n }\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return tr;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/tr.js?", + ); + + /***/ + }, + + /***/ 9846: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Talossan [tzl]\n//! author : Robin van der Vliet : https://github.com/robin0van0der0v\n//! author : Iustì Canun\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n // After the year there should be a slash and the amount of years since December 26, 1979 in Roman numerals.\n // This is currently too difficult (maybe even impossible) to add.\n var tzl = moment.defineLocale('tzl', {\n months: 'Januar_Fevraglh_Març_Avrïu_Mai_Gün_Julia_Guscht_Setemvar_Listopäts_Noemvar_Zecemvar'.split(\n '_'\n ),\n monthsShort: 'Jan_Fev_Mar_Avr_Mai_Gün_Jul_Gus_Set_Lis_Noe_Zec'.split('_'),\n weekdays: 'Súladi_Lúneçi_Maitzi_Márcuri_Xhúadi_Viénerçi_Sáturi'.split('_'),\n weekdaysShort: 'Súl_Lún_Mai_Már_Xhú_Vié_Sát'.split('_'),\n weekdaysMin: 'Sú_Lú_Ma_Má_Xh_Vi_Sá'.split('_'),\n longDateFormat: {\n LT: 'HH.mm',\n LTS: 'HH.mm.ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM [dallas] YYYY',\n LLL: 'D. MMMM [dallas] YYYY HH.mm',\n LLLL: 'dddd, [li] D. MMMM [dallas] YYYY HH.mm',\n },\n meridiemParse: /d\\'o|d\\'a/i,\n isPM: function (input) {\n return \"d'o\" === input.toLowerCase();\n },\n meridiem: function (hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? \"d'o\" : \"D'O\";\n } else {\n return isLower ? \"d'a\" : \"D'A\";\n }\n },\n calendar: {\n sameDay: '[oxhi à] LT',\n nextDay: '[demà à] LT',\n nextWeek: 'dddd [à] LT',\n lastDay: '[ieiri à] LT',\n lastWeek: '[sür el] dddd [lasteu à] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'osprei %s',\n past: 'ja%s',\n s: processRelativeTime,\n ss: processRelativeTime,\n m: processRelativeTime,\n mm: processRelativeTime,\n h: processRelativeTime,\n hh: processRelativeTime,\n d: processRelativeTime,\n dd: processRelativeTime,\n M: processRelativeTime,\n MM: processRelativeTime,\n y: processRelativeTime,\n yy: processRelativeTime,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var format = {\n s: ['viensas secunds', \"'iensas secunds\"],\n ss: [number + ' secunds', '' + number + ' secunds'],\n m: [\"'n míut\", \"'iens míut\"],\n mm: [number + ' míuts', '' + number + ' míuts'],\n h: [\"'n þora\", \"'iensa þora\"],\n hh: [number + ' þoras', '' + number + ' þoras'],\n d: [\"'n ziua\", \"'iensa ziua\"],\n dd: [number + ' ziuas', '' + number + ' ziuas'],\n M: [\"'n mes\", \"'iens mes\"],\n MM: [number + ' mesen', '' + number + ' mesen'],\n y: [\"'n ar\", \"'iens ar\"],\n yy: [number + ' ars', '' + number + ' ars'],\n };\n return isFuture\n ? format[key][0]\n : withoutSuffix\n ? format[key][0]\n : format[key][1];\n }\n\n return tzl;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/tzl.js?", + ); + + /***/ + }, + + /***/ 7711: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Central Atlas Tamazight Latin [tzm-latn]\n//! author : Abdel Said : https://github.com/abdelsaid\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var tzmLatn = moment.defineLocale('tzm-latn', {\n months: 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split(\n '_'\n ),\n monthsShort:\n 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split(\n '_'\n ),\n weekdays: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),\n weekdaysShort: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),\n weekdaysMin: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[asdkh g] LT',\n nextDay: '[aska g] LT',\n nextWeek: 'dddd [g] LT',\n lastDay: '[assant g] LT',\n lastWeek: 'dddd [g] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'dadkh s yan %s',\n past: 'yan %s',\n s: 'imik',\n ss: '%d imik',\n m: 'minuḍ',\n mm: '%d minuḍ',\n h: 'saɛa',\n hh: '%d tassaɛin',\n d: 'ass',\n dd: '%d ossan',\n M: 'ayowr',\n MM: '%d iyyirn',\n y: 'asgas',\n yy: '%d isgasn',\n },\n week: {\n dow: 6, // Saturday is the first day of the week.\n doy: 12, // The week that contains Jan 12th is the first week of the year.\n },\n });\n\n return tzmLatn;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/tzm-latn.js?", + ); + + /***/ + }, + + /***/ 1765: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Central Atlas Tamazight [tzm]\n//! author : Abdel Said : https://github.com/abdelsaid\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var tzm = moment.defineLocale('tzm', {\n months: 'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split(\n '_'\n ),\n monthsShort:\n 'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split(\n '_'\n ),\n weekdays: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),\n weekdaysShort: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),\n weekdaysMin: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[ⴰⵙⴷⵅ ⴴ] LT',\n nextDay: '[ⴰⵙⴽⴰ ⴴ] LT',\n nextWeek: 'dddd [ⴴ] LT',\n lastDay: '[ⴰⵚⴰⵏⵜ ⴴ] LT',\n lastWeek: 'dddd [ⴴ] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ %s',\n past: 'ⵢⴰⵏ %s',\n s: 'ⵉⵎⵉⴽ',\n ss: '%d ⵉⵎⵉⴽ',\n m: 'ⵎⵉⵏⵓⴺ',\n mm: '%d ⵎⵉⵏⵓⴺ',\n h: 'ⵙⴰⵄⴰ',\n hh: '%d ⵜⴰⵙⵙⴰⵄⵉⵏ',\n d: 'ⴰⵙⵙ',\n dd: '%d oⵙⵙⴰⵏ',\n M: 'ⴰⵢoⵓⵔ',\n MM: '%d ⵉⵢⵢⵉⵔⵏ',\n y: 'ⴰⵙⴳⴰⵙ',\n yy: '%d ⵉⵙⴳⴰⵙⵏ',\n },\n week: {\n dow: 6, // Saturday is the first day of the week.\n doy: 12, // The week that contains Jan 12th is the first week of the year.\n },\n });\n\n return tzm;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/tzm.js?", + ); + + /***/ + }, + + /***/ 8414: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Uyghur (China) [ug-cn]\n//! author: boyaq : https://github.com/boyaq\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var ugCn = moment.defineLocale('ug-cn', {\n months: 'يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر'.split(\n '_'\n ),\n monthsShort:\n 'يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر'.split(\n '_'\n ),\n weekdays: 'يەكشەنبە_دۈشەنبە_سەيشەنبە_چارشەنبە_پەيشەنبە_جۈمە_شەنبە'.split(\n '_'\n ),\n weekdaysShort: 'يە_دۈ_سە_چا_پە_جۈ_شە'.split('_'),\n weekdaysMin: 'يە_دۈ_سە_چا_پە_جۈ_شە'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'YYYY-MM-DD',\n LL: 'YYYY-يىلىM-ئاينىڭD-كۈنى',\n LLL: 'YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm',\n LLLL: 'dddd، YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm',\n },\n meridiemParse: /يېرىم كېچە|سەھەر|چۈشتىن بۇرۇن|چۈش|چۈشتىن كېيىن|كەچ/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (\n meridiem === 'يېرىم كېچە' ||\n meridiem === 'سەھەر' ||\n meridiem === 'چۈشتىن بۇرۇن'\n ) {\n return hour;\n } else if (meridiem === 'چۈشتىن كېيىن' || meridiem === 'كەچ') {\n return hour + 12;\n } else {\n return hour >= 11 ? hour : hour + 12;\n }\n },\n meridiem: function (hour, minute, isLower) {\n var hm = hour * 100 + minute;\n if (hm < 600) {\n return 'يېرىم كېچە';\n } else if (hm < 900) {\n return 'سەھەر';\n } else if (hm < 1130) {\n return 'چۈشتىن بۇرۇن';\n } else if (hm < 1230) {\n return 'چۈش';\n } else if (hm < 1800) {\n return 'چۈشتىن كېيىن';\n } else {\n return 'كەچ';\n }\n },\n calendar: {\n sameDay: '[بۈگۈن سائەت] LT',\n nextDay: '[ئەتە سائەت] LT',\n nextWeek: '[كېلەركى] dddd [سائەت] LT',\n lastDay: '[تۆنۈگۈن] LT',\n lastWeek: '[ئالدىنقى] dddd [سائەت] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s كېيىن',\n past: '%s بۇرۇن',\n s: 'نەچچە سېكونت',\n ss: '%d سېكونت',\n m: 'بىر مىنۇت',\n mm: '%d مىنۇت',\n h: 'بىر سائەت',\n hh: '%d سائەت',\n d: 'بىر كۈن',\n dd: '%d كۈن',\n M: 'بىر ئاي',\n MM: '%d ئاي',\n y: 'بىر يىل',\n yy: '%d يىل',\n },\n\n dayOfMonthOrdinalParse: /\\d{1,2}(-كۈنى|-ئاي|-ھەپتە)/,\n ordinal: function (number, period) {\n switch (period) {\n case 'd':\n case 'D':\n case 'DDD':\n return number + '-كۈنى';\n case 'w':\n case 'W':\n return number + '-ھەپتە';\n default:\n return number;\n }\n },\n preparse: function (string) {\n return string.replace(/،/g, ',');\n },\n postformat: function (string) {\n return string.replace(/,/g, '،');\n },\n week: {\n // GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 1st is the first week of the year.\n },\n });\n\n return ugCn;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/ug-cn.js?", + ); + + /***/ + }, + + /***/ 6618: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Ukrainian [uk]\n//! author : zemlanin : https://github.com/zemlanin\n//! Author : Menelion Elensúle : https://github.com/Oire\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function plural(word, num) {\n var forms = word.split('_');\n return num % 10 === 1 && num % 100 !== 11\n ? forms[0]\n : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20)\n ? forms[1]\n : forms[2];\n }\n function relativeTimeWithPlural(number, withoutSuffix, key) {\n var format = {\n ss: withoutSuffix ? 'секунда_секунди_секунд' : 'секунду_секунди_секунд',\n mm: withoutSuffix ? 'хвилина_хвилини_хвилин' : 'хвилину_хвилини_хвилин',\n hh: withoutSuffix ? 'година_години_годин' : 'годину_години_годин',\n dd: 'день_дні_днів',\n MM: 'місяць_місяці_місяців',\n yy: 'рік_роки_років',\n };\n if (key === 'm') {\n return withoutSuffix ? 'хвилина' : 'хвилину';\n } else if (key === 'h') {\n return withoutSuffix ? 'година' : 'годину';\n } else {\n return number + ' ' + plural(format[key], +number);\n }\n }\n function weekdaysCaseReplace(m, format) {\n var weekdays = {\n nominative:\n 'неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота'.split(\n '_'\n ),\n accusative:\n 'неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу'.split(\n '_'\n ),\n genitive:\n 'неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи'.split(\n '_'\n ),\n },\n nounCase;\n\n if (m === true) {\n return weekdays['nominative']\n .slice(1, 7)\n .concat(weekdays['nominative'].slice(0, 1));\n }\n if (!m) {\n return weekdays['nominative'];\n }\n\n nounCase = /(\\[[ВвУу]\\]) ?dddd/.test(format)\n ? 'accusative'\n : /\\[?(?:минулої|наступної)? ?\\] ?dddd/.test(format)\n ? 'genitive'\n : 'nominative';\n return weekdays[nounCase][m.day()];\n }\n function processHoursFunction(str) {\n return function () {\n return str + 'о' + (this.hours() === 11 ? 'б' : '') + '] LT';\n };\n }\n\n var uk = moment.defineLocale('uk', {\n months: {\n format: 'січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня'.split(\n '_'\n ),\n standalone:\n 'січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень'.split(\n '_'\n ),\n },\n monthsShort: 'січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд'.split(\n '_'\n ),\n weekdays: weekdaysCaseReplace,\n weekdaysShort: 'нд_пн_вт_ср_чт_пт_сб'.split('_'),\n weekdaysMin: 'нд_пн_вт_ср_чт_пт_сб'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY р.',\n LLL: 'D MMMM YYYY р., HH:mm',\n LLLL: 'dddd, D MMMM YYYY р., HH:mm',\n },\n calendar: {\n sameDay: processHoursFunction('[Сьогодні '),\n nextDay: processHoursFunction('[Завтра '),\n lastDay: processHoursFunction('[Вчора '),\n nextWeek: processHoursFunction('[У] dddd ['),\n lastWeek: function () {\n switch (this.day()) {\n case 0:\n case 3:\n case 5:\n case 6:\n return processHoursFunction('[Минулої] dddd [').call(this);\n case 1:\n case 2:\n case 4:\n return processHoursFunction('[Минулого] dddd [').call(this);\n }\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'за %s',\n past: '%s тому',\n s: 'декілька секунд',\n ss: relativeTimeWithPlural,\n m: relativeTimeWithPlural,\n mm: relativeTimeWithPlural,\n h: 'годину',\n hh: relativeTimeWithPlural,\n d: 'день',\n dd: relativeTimeWithPlural,\n M: 'місяць',\n MM: relativeTimeWithPlural,\n y: 'рік',\n yy: relativeTimeWithPlural,\n },\n // M. E.: those two are virtually unused but a user might want to implement them for his/her website for some reason\n meridiemParse: /ночі|ранку|дня|вечора/,\n isPM: function (input) {\n return /^(дня|вечора)$/.test(input);\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 4) {\n return 'ночі';\n } else if (hour < 12) {\n return 'ранку';\n } else if (hour < 17) {\n return 'дня';\n } else {\n return 'вечора';\n }\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-(й|го)/,\n ordinal: function (number, period) {\n switch (period) {\n case 'M':\n case 'd':\n case 'DDD':\n case 'w':\n case 'W':\n return number + '-й';\n case 'D':\n return number + '-го';\n default:\n return number;\n }\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return uk;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/uk.js?", + ); + + /***/ + }, + + /***/ 158: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Urdu [ur]\n//! author : Sawood Alam : https://github.com/ibnesayeed\n//! author : Zack : https://github.com/ZackVision\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var months = [\n 'جنوری',\n 'فروری',\n 'مارچ',\n 'اپریل',\n 'مئی',\n 'جون',\n 'جولائی',\n 'اگست',\n 'ستمبر',\n 'اکتوبر',\n 'نومبر',\n 'دسمبر',\n ],\n days = ['اتوار', 'پیر', 'منگل', 'بدھ', 'جمعرات', 'جمعہ', 'ہفتہ'];\n\n var ur = moment.defineLocale('ur', {\n months: months,\n monthsShort: months,\n weekdays: days,\n weekdaysShort: days,\n weekdaysMin: days,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd، D MMMM YYYY HH:mm',\n },\n meridiemParse: /صبح|شام/,\n isPM: function (input) {\n return 'شام' === input;\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 12) {\n return 'صبح';\n }\n return 'شام';\n },\n calendar: {\n sameDay: '[آج بوقت] LT',\n nextDay: '[کل بوقت] LT',\n nextWeek: 'dddd [بوقت] LT',\n lastDay: '[گذشتہ روز بوقت] LT',\n lastWeek: '[گذشتہ] dddd [بوقت] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s بعد',\n past: '%s قبل',\n s: 'چند سیکنڈ',\n ss: '%d سیکنڈ',\n m: 'ایک منٹ',\n mm: '%d منٹ',\n h: 'ایک گھنٹہ',\n hh: '%d گھنٹے',\n d: 'ایک دن',\n dd: '%d دن',\n M: 'ایک ماہ',\n MM: '%d ماہ',\n y: 'ایک سال',\n yy: '%d سال',\n },\n preparse: function (string) {\n return string.replace(/،/g, ',');\n },\n postformat: function (string) {\n return string.replace(/,/g, '،');\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return ur;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/ur.js?", + ); + + /***/ + }, + + /***/ 4856: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Uzbek Latin [uz-latn]\n//! author : Rasulbek Mirzayev : github.com/Rasulbeeek\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var uzLatn = moment.defineLocale('uz-latn', {\n months: 'Yanvar_Fevral_Mart_Aprel_May_Iyun_Iyul_Avgust_Sentabr_Oktabr_Noyabr_Dekabr'.split(\n '_'\n ),\n monthsShort: 'Yan_Fev_Mar_Apr_May_Iyun_Iyul_Avg_Sen_Okt_Noy_Dek'.split('_'),\n weekdays:\n 'Yakshanba_Dushanba_Seshanba_Chorshanba_Payshanba_Juma_Shanba'.split(\n '_'\n ),\n weekdaysShort: 'Yak_Dush_Sesh_Chor_Pay_Jum_Shan'.split('_'),\n weekdaysMin: 'Ya_Du_Se_Cho_Pa_Ju_Sha'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'D MMMM YYYY, dddd HH:mm',\n },\n calendar: {\n sameDay: '[Bugun soat] LT [da]',\n nextDay: '[Ertaga] LT [da]',\n nextWeek: 'dddd [kuni soat] LT [da]',\n lastDay: '[Kecha soat] LT [da]',\n lastWeek: \"[O'tgan] dddd [kuni soat] LT [da]\",\n sameElse: 'L',\n },\n relativeTime: {\n future: 'Yaqin %s ichida',\n past: 'Bir necha %s oldin',\n s: 'soniya',\n ss: '%d soniya',\n m: 'bir daqiqa',\n mm: '%d daqiqa',\n h: 'bir soat',\n hh: '%d soat',\n d: 'bir kun',\n dd: '%d kun',\n M: 'bir oy',\n MM: '%d oy',\n y: 'bir yil',\n yy: '%d yil',\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return uzLatn;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/uz-latn.js?", + ); + + /***/ + }, + + /***/ 7609: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Uzbek [uz]\n//! author : Sardor Muminov : https://github.com/muminoff\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var uz = moment.defineLocale('uz', {\n months: 'январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр'.split(\n '_'\n ),\n monthsShort: 'янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек'.split('_'),\n weekdays: 'Якшанба_Душанба_Сешанба_Чоршанба_Пайшанба_Жума_Шанба'.split('_'),\n weekdaysShort: 'Якш_Душ_Сеш_Чор_Пай_Жум_Шан'.split('_'),\n weekdaysMin: 'Як_Ду_Се_Чо_Па_Жу_Ша'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'D MMMM YYYY, dddd HH:mm',\n },\n calendar: {\n sameDay: '[Бугун соат] LT [да]',\n nextDay: '[Эртага] LT [да]',\n nextWeek: 'dddd [куни соат] LT [да]',\n lastDay: '[Кеча соат] LT [да]',\n lastWeek: '[Утган] dddd [куни соат] LT [да]',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'Якин %s ичида',\n past: 'Бир неча %s олдин',\n s: 'фурсат',\n ss: '%d фурсат',\n m: 'бир дакика',\n mm: '%d дакика',\n h: 'бир соат',\n hh: '%d соат',\n d: 'бир кун',\n dd: '%d кун',\n M: 'бир ой',\n MM: '%d ой',\n y: 'бир йил',\n yy: '%d йил',\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return uz;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/uz.js?", + ); + + /***/ + }, + + /***/ 1135: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Vietnamese [vi]\n//! author : Bang Nguyen : https://github.com/bangnk\n//! author : Chien Kira : https://github.com/chienkira\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var vi = moment.defineLocale('vi', {\n months: 'tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12'.split(\n '_'\n ),\n monthsShort:\n 'Thg 01_Thg 02_Thg 03_Thg 04_Thg 05_Thg 06_Thg 07_Thg 08_Thg 09_Thg 10_Thg 11_Thg 12'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays: 'chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy'.split(\n '_'\n ),\n weekdaysShort: 'CN_T2_T3_T4_T5_T6_T7'.split('_'),\n weekdaysMin: 'CN_T2_T3_T4_T5_T6_T7'.split('_'),\n weekdaysParseExact: true,\n meridiemParse: /sa|ch/i,\n isPM: function (input) {\n return /^ch$/i.test(input);\n },\n meridiem: function (hours, minutes, isLower) {\n if (hours < 12) {\n return isLower ? 'sa' : 'SA';\n } else {\n return isLower ? 'ch' : 'CH';\n }\n },\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM [năm] YYYY',\n LLL: 'D MMMM [năm] YYYY HH:mm',\n LLLL: 'dddd, D MMMM [năm] YYYY HH:mm',\n l: 'DD/M/YYYY',\n ll: 'D MMM YYYY',\n lll: 'D MMM YYYY HH:mm',\n llll: 'ddd, D MMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Hôm nay lúc] LT',\n nextDay: '[Ngày mai lúc] LT',\n nextWeek: 'dddd [tuần tới lúc] LT',\n lastDay: '[Hôm qua lúc] LT',\n lastWeek: 'dddd [tuần trước lúc] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s tới',\n past: '%s trước',\n s: 'vài giây',\n ss: '%d giây',\n m: 'một phút',\n mm: '%d phút',\n h: 'một giờ',\n hh: '%d giờ',\n d: 'một ngày',\n dd: '%d ngày',\n w: 'một tuần',\n ww: '%d tuần',\n M: 'một tháng',\n MM: '%d tháng',\n y: 'một năm',\n yy: '%d năm',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}/,\n ordinal: function (number) {\n return number;\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return vi;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/vi.js?", + ); + + /***/ + }, + + /***/ 4051: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Pseudo [x-pseudo]\n//! author : Andrew Hood : https://github.com/andrewhood125\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var xPseudo = moment.defineLocale('x-pseudo', {\n months: 'J~áñúá~rý_F~ébrú~árý_~Márc~h_Áp~ríl_~Máý_~Júñé~_Júl~ý_Áú~gúst~_Sép~témb~ér_Ó~ctób~ér_Ñ~óvém~bér_~Décé~mbér'.split(\n '_'\n ),\n monthsShort:\n 'J~áñ_~Féb_~Már_~Ápr_~Máý_~Júñ_~Júl_~Áúg_~Sép_~Óct_~Ñóv_~Déc'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays:\n 'S~úñdá~ý_Mó~ñdáý~_Túé~sdáý~_Wéd~ñésd~áý_T~húrs~dáý_~Fríd~áý_S~átúr~dáý'.split(\n '_'\n ),\n weekdaysShort: 'S~úñ_~Móñ_~Túé_~Wéd_~Thú_~Frí_~Sát'.split('_'),\n weekdaysMin: 'S~ú_Mó~_Tú_~Wé_T~h_Fr~_Sá'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[T~ódá~ý át] LT',\n nextDay: '[T~ómó~rró~w át] LT',\n nextWeek: 'dddd [át] LT',\n lastDay: '[Ý~ést~érdá~ý át] LT',\n lastWeek: '[L~ást] dddd [át] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'í~ñ %s',\n past: '%s á~gó',\n s: 'á ~féw ~sécó~ñds',\n ss: '%d s~écóñ~ds',\n m: 'á ~míñ~úté',\n mm: '%d m~íñú~tés',\n h: 'á~ñ hó~úr',\n hh: '%d h~óúrs',\n d: 'á ~dáý',\n dd: '%d d~áýs',\n M: 'á ~móñ~th',\n MM: '%d m~óñt~hs',\n y: 'á ~ýéár',\n yy: '%d ý~éárs',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n ~~((number % 100) / 10) === 1\n ? 'th'\n : b === 1\n ? 'st'\n : b === 2\n ? 'nd'\n : b === 3\n ? 'rd'\n : 'th';\n return number + output;\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return xPseudo;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/x-pseudo.js?", + ); + + /***/ + }, + + /***/ 2218: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Yoruba Nigeria [yo]\n//! author : Atolagbe Abisoye : https://github.com/andela-batolagbe\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var yo = moment.defineLocale('yo', {\n months: 'Sẹ́rẹ́_Èrèlè_Ẹrẹ̀nà_Ìgbé_Èbibi_Òkùdu_Agẹmo_Ògún_Owewe_Ọ̀wàrà_Bélú_Ọ̀pẹ̀̀'.split(\n '_'\n ),\n monthsShort: 'Sẹ́r_Èrl_Ẹrn_Ìgb_Èbi_Òkù_Agẹ_Ògú_Owe_Ọ̀wà_Bél_Ọ̀pẹ̀̀'.split('_'),\n weekdays: 'Àìkú_Ajé_Ìsẹ́gun_Ọjọ́rú_Ọjọ́bọ_Ẹtì_Àbámẹ́ta'.split('_'),\n weekdaysShort: 'Àìk_Ajé_Ìsẹ́_Ọjr_Ọjb_Ẹtì_Àbá'.split('_'),\n weekdaysMin: 'Àì_Aj_Ìs_Ọr_Ọb_Ẹt_Àb'.split('_'),\n longDateFormat: {\n LT: 'h:mm A',\n LTS: 'h:mm:ss A',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY h:mm A',\n LLLL: 'dddd, D MMMM YYYY h:mm A',\n },\n calendar: {\n sameDay: '[Ònì ni] LT',\n nextDay: '[Ọ̀la ni] LT',\n nextWeek: \"dddd [Ọsẹ̀ tón'bọ] [ni] LT\",\n lastDay: '[Àna ni] LT',\n lastWeek: 'dddd [Ọsẹ̀ tólọ́] [ni] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'ní %s',\n past: '%s kọjá',\n s: 'ìsẹjú aayá die',\n ss: 'aayá %d',\n m: 'ìsẹjú kan',\n mm: 'ìsẹjú %d',\n h: 'wákati kan',\n hh: 'wákati %d',\n d: 'ọjọ́ kan',\n dd: 'ọjọ́ %d',\n M: 'osù kan',\n MM: 'osù %d',\n y: 'ọdún kan',\n yy: 'ọdún %d',\n },\n dayOfMonthOrdinalParse: /ọjọ́\\s\\d{1,2}/,\n ordinal: 'ọjọ́ %d',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return yo;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/yo.js?", + ); + + /***/ + }, + + /***/ 2648: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Chinese (China) [zh-cn]\n//! author : suupic : https://github.com/suupic\n//! author : Zeno Zeng : https://github.com/zenozeng\n//! author : uu109 : https://github.com/uu109\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var zhCn = moment.defineLocale('zh-cn', {\n months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(\n '_'\n ),\n monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(\n '_'\n ),\n weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),\n weekdaysShort: '周日_周一_周二_周三_周四_周五_周六'.split('_'),\n weekdaysMin: '日_一_二_三_四_五_六'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'YYYY/MM/DD',\n LL: 'YYYY年M月D日',\n LLL: 'YYYY年M月D日Ah点mm分',\n LLLL: 'YYYY年M月D日ddddAh点mm分',\n l: 'YYYY/M/D',\n ll: 'YYYY年M月D日',\n lll: 'YYYY年M月D日 HH:mm',\n llll: 'YYYY年M月D日dddd HH:mm',\n },\n meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {\n return hour;\n } else if (meridiem === '下午' || meridiem === '晚上') {\n return hour + 12;\n } else {\n // '中午'\n return hour >= 11 ? hour : hour + 12;\n }\n },\n meridiem: function (hour, minute, isLower) {\n var hm = hour * 100 + minute;\n if (hm < 600) {\n return '凌晨';\n } else if (hm < 900) {\n return '早上';\n } else if (hm < 1130) {\n return '上午';\n } else if (hm < 1230) {\n return '中午';\n } else if (hm < 1800) {\n return '下午';\n } else {\n return '晚上';\n }\n },\n calendar: {\n sameDay: '[今天]LT',\n nextDay: '[明天]LT',\n nextWeek: function (now) {\n if (now.week() !== this.week()) {\n return '[下]dddLT';\n } else {\n return '[本]dddLT';\n }\n },\n lastDay: '[昨天]LT',\n lastWeek: function (now) {\n if (this.week() !== now.week()) {\n return '[上]dddLT';\n } else {\n return '[本]dddLT';\n }\n },\n sameElse: 'L',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(日|月|周)/,\n ordinal: function (number, period) {\n switch (period) {\n case 'd':\n case 'D':\n case 'DDD':\n return number + '日';\n case 'M':\n return number + '月';\n case 'w':\n case 'W':\n return number + '周';\n default:\n return number;\n }\n },\n relativeTime: {\n future: '%s后',\n past: '%s前',\n s: '几秒',\n ss: '%d 秒',\n m: '1 分钟',\n mm: '%d 分钟',\n h: '1 小时',\n hh: '%d 小时',\n d: '1 天',\n dd: '%d 天',\n w: '1 周',\n ww: '%d 周',\n M: '1 个月',\n MM: '%d 个月',\n y: '1 年',\n yy: '%d 年',\n },\n week: {\n // GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return zhCn;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/zh-cn.js?", + ); + + /***/ + }, + + /***/ 1632: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Chinese (Hong Kong) [zh-hk]\n//! author : Ben : https://github.com/ben-lin\n//! author : Chris Lam : https://github.com/hehachris\n//! author : Konstantin : https://github.com/skfd\n//! author : Anthony : https://github.com/anthonylau\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var zhHk = moment.defineLocale('zh-hk', {\n months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(\n '_'\n ),\n monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(\n '_'\n ),\n weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),\n weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'),\n weekdaysMin: '日_一_二_三_四_五_六'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'YYYY/MM/DD',\n LL: 'YYYY年M月D日',\n LLL: 'YYYY年M月D日 HH:mm',\n LLLL: 'YYYY年M月D日dddd HH:mm',\n l: 'YYYY/M/D',\n ll: 'YYYY年M月D日',\n lll: 'YYYY年M月D日 HH:mm',\n llll: 'YYYY年M月D日dddd HH:mm',\n },\n meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {\n return hour;\n } else if (meridiem === '中午') {\n return hour >= 11 ? hour : hour + 12;\n } else if (meridiem === '下午' || meridiem === '晚上') {\n return hour + 12;\n }\n },\n meridiem: function (hour, minute, isLower) {\n var hm = hour * 100 + minute;\n if (hm < 600) {\n return '凌晨';\n } else if (hm < 900) {\n return '早上';\n } else if (hm < 1200) {\n return '上午';\n } else if (hm === 1200) {\n return '中午';\n } else if (hm < 1800) {\n return '下午';\n } else {\n return '晚上';\n }\n },\n calendar: {\n sameDay: '[今天]LT',\n nextDay: '[明天]LT',\n nextWeek: '[下]ddddLT',\n lastDay: '[昨天]LT',\n lastWeek: '[上]ddddLT',\n sameElse: 'L',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(日|月|週)/,\n ordinal: function (number, period) {\n switch (period) {\n case 'd':\n case 'D':\n case 'DDD':\n return number + '日';\n case 'M':\n return number + '月';\n case 'w':\n case 'W':\n return number + '週';\n default:\n return number;\n }\n },\n relativeTime: {\n future: '%s後',\n past: '%s前',\n s: '幾秒',\n ss: '%d 秒',\n m: '1 分鐘',\n mm: '%d 分鐘',\n h: '1 小時',\n hh: '%d 小時',\n d: '1 天',\n dd: '%d 天',\n M: '1 個月',\n MM: '%d 個月',\n y: '1 年',\n yy: '%d 年',\n },\n });\n\n return zhHk;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/zh-hk.js?", + ); + + /***/ + }, + + /***/ 1541: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Chinese (Macau) [zh-mo]\n//! author : Ben : https://github.com/ben-lin\n//! author : Chris Lam : https://github.com/hehachris\n//! author : Tan Yuanhong : https://github.com/le0tan\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var zhMo = moment.defineLocale('zh-mo', {\n months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(\n '_'\n ),\n monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(\n '_'\n ),\n weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),\n weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'),\n weekdaysMin: '日_一_二_三_四_五_六'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'YYYY年M月D日',\n LLL: 'YYYY年M月D日 HH:mm',\n LLLL: 'YYYY年M月D日dddd HH:mm',\n l: 'D/M/YYYY',\n ll: 'YYYY年M月D日',\n lll: 'YYYY年M月D日 HH:mm',\n llll: 'YYYY年M月D日dddd HH:mm',\n },\n meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {\n return hour;\n } else if (meridiem === '中午') {\n return hour >= 11 ? hour : hour + 12;\n } else if (meridiem === '下午' || meridiem === '晚上') {\n return hour + 12;\n }\n },\n meridiem: function (hour, minute, isLower) {\n var hm = hour * 100 + minute;\n if (hm < 600) {\n return '凌晨';\n } else if (hm < 900) {\n return '早上';\n } else if (hm < 1130) {\n return '上午';\n } else if (hm < 1230) {\n return '中午';\n } else if (hm < 1800) {\n return '下午';\n } else {\n return '晚上';\n }\n },\n calendar: {\n sameDay: '[今天] LT',\n nextDay: '[明天] LT',\n nextWeek: '[下]dddd LT',\n lastDay: '[昨天] LT',\n lastWeek: '[上]dddd LT',\n sameElse: 'L',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(日|月|週)/,\n ordinal: function (number, period) {\n switch (period) {\n case 'd':\n case 'D':\n case 'DDD':\n return number + '日';\n case 'M':\n return number + '月';\n case 'w':\n case 'W':\n return number + '週';\n default:\n return number;\n }\n },\n relativeTime: {\n future: '%s內',\n past: '%s前',\n s: '幾秒',\n ss: '%d 秒',\n m: '1 分鐘',\n mm: '%d 分鐘',\n h: '1 小時',\n hh: '%d 小時',\n d: '1 天',\n dd: '%d 天',\n M: '1 個月',\n MM: '%d 個月',\n y: '1 年',\n yy: '%d 年',\n },\n });\n\n return zhMo;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/zh-mo.js?", + ); + + /***/ + }, + + /***/ 304: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Chinese (Taiwan) [zh-tw]\n//! author : Ben : https://github.com/ben-lin\n//! author : Chris Lam : https://github.com/hehachris\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var zhTw = moment.defineLocale('zh-tw', {\n months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(\n '_'\n ),\n monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(\n '_'\n ),\n weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),\n weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'),\n weekdaysMin: '日_一_二_三_四_五_六'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'YYYY/MM/DD',\n LL: 'YYYY年M月D日',\n LLL: 'YYYY年M月D日 HH:mm',\n LLLL: 'YYYY年M月D日dddd HH:mm',\n l: 'YYYY/M/D',\n ll: 'YYYY年M月D日',\n lll: 'YYYY年M月D日 HH:mm',\n llll: 'YYYY年M月D日dddd HH:mm',\n },\n meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {\n return hour;\n } else if (meridiem === '中午') {\n return hour >= 11 ? hour : hour + 12;\n } else if (meridiem === '下午' || meridiem === '晚上') {\n return hour + 12;\n }\n },\n meridiem: function (hour, minute, isLower) {\n var hm = hour * 100 + minute;\n if (hm < 600) {\n return '凌晨';\n } else if (hm < 900) {\n return '早上';\n } else if (hm < 1130) {\n return '上午';\n } else if (hm < 1230) {\n return '中午';\n } else if (hm < 1800) {\n return '下午';\n } else {\n return '晚上';\n }\n },\n calendar: {\n sameDay: '[今天] LT',\n nextDay: '[明天] LT',\n nextWeek: '[下]dddd LT',\n lastDay: '[昨天] LT',\n lastWeek: '[上]dddd LT',\n sameElse: 'L',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(日|月|週)/,\n ordinal: function (number, period) {\n switch (period) {\n case 'd':\n case 'D':\n case 'DDD':\n return number + '日';\n case 'M':\n return number + '月';\n case 'w':\n case 'W':\n return number + '週';\n default:\n return number;\n }\n },\n relativeTime: {\n future: '%s後',\n past: '%s前',\n s: '幾秒',\n ss: '%d 秒',\n m: '1 分鐘',\n mm: '%d 分鐘',\n h: '1 小時',\n hh: '%d 小時',\n d: '1 天',\n dd: '%d 天',\n M: '1 個月',\n MM: '%d 個月',\n y: '1 年',\n yy: '%d 年',\n },\n });\n\n return zhTw;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/zh-tw.js?", + ); + + /***/ + }, + + /***/ 5358: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var map = {\n\t"./af": 5177,\n\t"./af.js": 5177,\n\t"./ar": 1509,\n\t"./ar-dz": 1488,\n\t"./ar-dz.js": 1488,\n\t"./ar-kw": 8676,\n\t"./ar-kw.js": 8676,\n\t"./ar-ly": 2353,\n\t"./ar-ly.js": 2353,\n\t"./ar-ma": 4496,\n\t"./ar-ma.js": 4496,\n\t"./ar-ps": 6947,\n\t"./ar-ps.js": 6947,\n\t"./ar-sa": 2682,\n\t"./ar-sa.js": 2682,\n\t"./ar-tn": 9756,\n\t"./ar-tn.js": 9756,\n\t"./ar.js": 1509,\n\t"./az": 5533,\n\t"./az.js": 5533,\n\t"./be": 8959,\n\t"./be.js": 8959,\n\t"./bg": 7777,\n\t"./bg.js": 7777,\n\t"./bm": 4903,\n\t"./bm.js": 4903,\n\t"./bn": 1290,\n\t"./bn-bd": 7357,\n\t"./bn-bd.js": 7357,\n\t"./bn.js": 1290,\n\t"./bo": 1545,\n\t"./bo.js": 1545,\n\t"./br": 1470,\n\t"./br.js": 1470,\n\t"./bs": 4429,\n\t"./bs.js": 4429,\n\t"./ca": 7306,\n\t"./ca.js": 7306,\n\t"./cs": 6464,\n\t"./cs.js": 6464,\n\t"./cv": 3635,\n\t"./cv.js": 3635,\n\t"./cy": 4226,\n\t"./cy.js": 4226,\n\t"./da": 3601,\n\t"./da.js": 3601,\n\t"./de": 7853,\n\t"./de-at": 6111,\n\t"./de-at.js": 6111,\n\t"./de-ch": 4697,\n\t"./de-ch.js": 4697,\n\t"./de.js": 7853,\n\t"./dv": 708,\n\t"./dv.js": 708,\n\t"./el": 4691,\n\t"./el.js": 4691,\n\t"./en-au": 3872,\n\t"./en-au.js": 3872,\n\t"./en-ca": 8298,\n\t"./en-ca.js": 8298,\n\t"./en-gb": 6195,\n\t"./en-gb.js": 6195,\n\t"./en-ie": 6584,\n\t"./en-ie.js": 6584,\n\t"./en-il": 5543,\n\t"./en-il.js": 5543,\n\t"./en-in": 9033,\n\t"./en-in.js": 9033,\n\t"./en-nz": 9402,\n\t"./en-nz.js": 9402,\n\t"./en-sg": 3004,\n\t"./en-sg.js": 3004,\n\t"./eo": 2934,\n\t"./eo.js": 2934,\n\t"./es": 7650,\n\t"./es-do": 838,\n\t"./es-do.js": 838,\n\t"./es-mx": 7730,\n\t"./es-mx.js": 7730,\n\t"./es-us": 6575,\n\t"./es-us.js": 6575,\n\t"./es.js": 7650,\n\t"./et": 3035,\n\t"./et.js": 3035,\n\t"./eu": 3508,\n\t"./eu.js": 3508,\n\t"./fa": 119,\n\t"./fa.js": 119,\n\t"./fi": 527,\n\t"./fi.js": 527,\n\t"./fil": 8376,\n\t"./fil.js": 8376,\n\t"./fo": 2477,\n\t"./fo.js": 2477,\n\t"./fr": 5498,\n\t"./fr-ca": 6435,\n\t"./fr-ca.js": 6435,\n\t"./fr-ch": 7892,\n\t"./fr-ch.js": 7892,\n\t"./fr.js": 5498,\n\t"./fy": 7071,\n\t"./fy.js": 7071,\n\t"./ga": 1734,\n\t"./ga.js": 1734,\n\t"./gd": 217,\n\t"./gd.js": 217,\n\t"./gl": 7329,\n\t"./gl.js": 7329,\n\t"./gom-deva": 2124,\n\t"./gom-deva.js": 2124,\n\t"./gom-latn": 3383,\n\t"./gom-latn.js": 3383,\n\t"./gu": 5050,\n\t"./gu.js": 5050,\n\t"./he": 1713,\n\t"./he.js": 1713,\n\t"./hi": 3861,\n\t"./hi.js": 3861,\n\t"./hr": 6308,\n\t"./hr.js": 6308,\n\t"./hu": 609,\n\t"./hu.js": 609,\n\t"./hy-am": 7160,\n\t"./hy-am.js": 7160,\n\t"./id": 4063,\n\t"./id.js": 4063,\n\t"./is": 9374,\n\t"./is.js": 9374,\n\t"./it": 8383,\n\t"./it-ch": 1827,\n\t"./it-ch.js": 1827,\n\t"./it.js": 8383,\n\t"./ja": 3827,\n\t"./ja.js": 3827,\n\t"./jv": 9722,\n\t"./jv.js": 9722,\n\t"./ka": 1794,\n\t"./ka.js": 1794,\n\t"./kk": 7088,\n\t"./kk.js": 7088,\n\t"./km": 6870,\n\t"./km.js": 6870,\n\t"./kn": 4451,\n\t"./kn.js": 4451,\n\t"./ko": 3164,\n\t"./ko.js": 3164,\n\t"./ku": 8174,\n\t"./ku-kmr": 6181,\n\t"./ku-kmr.js": 6181,\n\t"./ku.js": 8174,\n\t"./ky": 8474,\n\t"./ky.js": 8474,\n\t"./lb": 9680,\n\t"./lb.js": 9680,\n\t"./lo": 5867,\n\t"./lo.js": 5867,\n\t"./lt": 5766,\n\t"./lt.js": 5766,\n\t"./lv": 9532,\n\t"./lv.js": 9532,\n\t"./me": 8076,\n\t"./me.js": 8076,\n\t"./mi": 1848,\n\t"./mi.js": 1848,\n\t"./mk": 306,\n\t"./mk.js": 306,\n\t"./ml": 3739,\n\t"./ml.js": 3739,\n\t"./mn": 9053,\n\t"./mn.js": 9053,\n\t"./mr": 6169,\n\t"./mr.js": 6169,\n\t"./ms": 3386,\n\t"./ms-my": 2297,\n\t"./ms-my.js": 2297,\n\t"./ms.js": 3386,\n\t"./mt": 7075,\n\t"./mt.js": 7075,\n\t"./my": 2264,\n\t"./my.js": 2264,\n\t"./nb": 2274,\n\t"./nb.js": 2274,\n\t"./ne": 8235,\n\t"./ne.js": 8235,\n\t"./nl": 2572,\n\t"./nl-be": 3784,\n\t"./nl-be.js": 3784,\n\t"./nl.js": 2572,\n\t"./nn": 4566,\n\t"./nn.js": 4566,\n\t"./oc-lnc": 9330,\n\t"./oc-lnc.js": 9330,\n\t"./pa-in": 9849,\n\t"./pa-in.js": 9849,\n\t"./pl": 4418,\n\t"./pl.js": 4418,\n\t"./pt": 9834,\n\t"./pt-br": 684,\n\t"./pt-br.js": 684,\n\t"./pt.js": 9834,\n\t"./ro": 4457,\n\t"./ro.js": 4457,\n\t"./ru": 2271,\n\t"./ru.js": 2271,\n\t"./sd": 1221,\n\t"./sd.js": 1221,\n\t"./se": 3478,\n\t"./se.js": 3478,\n\t"./si": 7538,\n\t"./si.js": 7538,\n\t"./sk": 5784,\n\t"./sk.js": 5784,\n\t"./sl": 6637,\n\t"./sl.js": 6637,\n\t"./sq": 6794,\n\t"./sq.js": 6794,\n\t"./sr": 5719,\n\t"./sr-cyrl": 3322,\n\t"./sr-cyrl.js": 3322,\n\t"./sr.js": 5719,\n\t"./ss": 6000,\n\t"./ss.js": 6000,\n\t"./sv": 1011,\n\t"./sv.js": 1011,\n\t"./sw": 748,\n\t"./sw.js": 748,\n\t"./ta": 1025,\n\t"./ta.js": 1025,\n\t"./te": 1885,\n\t"./te.js": 1885,\n\t"./tet": 8861,\n\t"./tet.js": 8861,\n\t"./tg": 6571,\n\t"./tg.js": 6571,\n\t"./th": 5802,\n\t"./th.js": 5802,\n\t"./tk": 9527,\n\t"./tk.js": 9527,\n\t"./tl-ph": 9231,\n\t"./tl-ph.js": 9231,\n\t"./tlh": 1052,\n\t"./tlh.js": 1052,\n\t"./tr": 5096,\n\t"./tr.js": 5096,\n\t"./tzl": 9846,\n\t"./tzl.js": 9846,\n\t"./tzm": 1765,\n\t"./tzm-latn": 7711,\n\t"./tzm-latn.js": 7711,\n\t"./tzm.js": 1765,\n\t"./ug-cn": 8414,\n\t"./ug-cn.js": 8414,\n\t"./uk": 6618,\n\t"./uk.js": 6618,\n\t"./ur": 158,\n\t"./ur.js": 158,\n\t"./uz": 7609,\n\t"./uz-latn": 4856,\n\t"./uz-latn.js": 4856,\n\t"./uz.js": 7609,\n\t"./vi": 1135,\n\t"./vi.js": 1135,\n\t"./x-pseudo": 4051,\n\t"./x-pseudo.js": 4051,\n\t"./yo": 2218,\n\t"./yo.js": 2218,\n\t"./zh-cn": 2648,\n\t"./zh-cn.js": 2648,\n\t"./zh-hk": 1632,\n\t"./zh-hk.js": 1632,\n\t"./zh-mo": 1541,\n\t"./zh-mo.js": 1541,\n\t"./zh-tw": 304,\n\t"./zh-tw.js": 304\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error("Cannot find module \'" + req + "\'");\n\t\te.code = \'MODULE_NOT_FOUND\';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 5358;\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/_sync_^\\.\\/.*$?', + ); + + /***/ + }, + + /***/ 5093: /***/ function (module, __unused_webpack_exports, __webpack_require__) { + eval( + "/* module decorator */ module = __webpack_require__.nmd(module);\n//! moment.js\n//! version : 2.30.1\n//! authors : Tim Wood, Iskren Chernev, Moment.js contributors\n//! license : MIT\n//! momentjs.com\n\n;(function (global, factory) {\n true ? module.exports = factory() :\n 0\n}(this, (function () { 'use strict';\n\n var hookCallback;\n\n function hooks() {\n return hookCallback.apply(null, arguments);\n }\n\n // This is done to register the method called with moment()\n // without creating circular dependencies.\n function setHookCallback(callback) {\n hookCallback = callback;\n }\n\n function isArray(input) {\n return (\n input instanceof Array ||\n Object.prototype.toString.call(input) === '[object Array]'\n );\n }\n\n function isObject(input) {\n // IE8 will treat undefined and null as object if it wasn't for\n // input != null\n return (\n input != null &&\n Object.prototype.toString.call(input) === '[object Object]'\n );\n }\n\n function hasOwnProp(a, b) {\n return Object.prototype.hasOwnProperty.call(a, b);\n }\n\n function isObjectEmpty(obj) {\n if (Object.getOwnPropertyNames) {\n return Object.getOwnPropertyNames(obj).length === 0;\n } else {\n var k;\n for (k in obj) {\n if (hasOwnProp(obj, k)) {\n return false;\n }\n }\n return true;\n }\n }\n\n function isUndefined(input) {\n return input === void 0;\n }\n\n function isNumber(input) {\n return (\n typeof input === 'number' ||\n Object.prototype.toString.call(input) === '[object Number]'\n );\n }\n\n function isDate(input) {\n return (\n input instanceof Date ||\n Object.prototype.toString.call(input) === '[object Date]'\n );\n }\n\n function map(arr, fn) {\n var res = [],\n i,\n arrLen = arr.length;\n for (i = 0; i < arrLen; ++i) {\n res.push(fn(arr[i], i));\n }\n return res;\n }\n\n function extend(a, b) {\n for (var i in b) {\n if (hasOwnProp(b, i)) {\n a[i] = b[i];\n }\n }\n\n if (hasOwnProp(b, 'toString')) {\n a.toString = b.toString;\n }\n\n if (hasOwnProp(b, 'valueOf')) {\n a.valueOf = b.valueOf;\n }\n\n return a;\n }\n\n function createUTC(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, true).utc();\n }\n\n function defaultParsingFlags() {\n // We need to deep clone this object.\n return {\n empty: false,\n unusedTokens: [],\n unusedInput: [],\n overflow: -2,\n charsLeftOver: 0,\n nullInput: false,\n invalidEra: null,\n invalidMonth: null,\n invalidFormat: false,\n userInvalidated: false,\n iso: false,\n parsedDateParts: [],\n era: null,\n meridiem: null,\n rfc2822: false,\n weekdayMismatch: false,\n };\n }\n\n function getParsingFlags(m) {\n if (m._pf == null) {\n m._pf = defaultParsingFlags();\n }\n return m._pf;\n }\n\n var some;\n if (Array.prototype.some) {\n some = Array.prototype.some;\n } else {\n some = function (fun) {\n var t = Object(this),\n len = t.length >>> 0,\n i;\n\n for (i = 0; i < len; i++) {\n if (i in t && fun.call(this, t[i], i, t)) {\n return true;\n }\n }\n\n return false;\n };\n }\n\n function isValid(m) {\n var flags = null,\n parsedParts = false,\n isNowValid = m._d && !isNaN(m._d.getTime());\n if (isNowValid) {\n flags = getParsingFlags(m);\n parsedParts = some.call(flags.parsedDateParts, function (i) {\n return i != null;\n });\n isNowValid =\n flags.overflow < 0 &&\n !flags.empty &&\n !flags.invalidEra &&\n !flags.invalidMonth &&\n !flags.invalidWeekday &&\n !flags.weekdayMismatch &&\n !flags.nullInput &&\n !flags.invalidFormat &&\n !flags.userInvalidated &&\n (!flags.meridiem || (flags.meridiem && parsedParts));\n if (m._strict) {\n isNowValid =\n isNowValid &&\n flags.charsLeftOver === 0 &&\n flags.unusedTokens.length === 0 &&\n flags.bigHour === undefined;\n }\n }\n if (Object.isFrozen == null || !Object.isFrozen(m)) {\n m._isValid = isNowValid;\n } else {\n return isNowValid;\n }\n return m._isValid;\n }\n\n function createInvalid(flags) {\n var m = createUTC(NaN);\n if (flags != null) {\n extend(getParsingFlags(m), flags);\n } else {\n getParsingFlags(m).userInvalidated = true;\n }\n\n return m;\n }\n\n // Plugins that add properties should also add the key here (null value),\n // so we can properly clone ourselves.\n var momentProperties = (hooks.momentProperties = []),\n updateInProgress = false;\n\n function copyConfig(to, from) {\n var i,\n prop,\n val,\n momentPropertiesLen = momentProperties.length;\n\n if (!isUndefined(from._isAMomentObject)) {\n to._isAMomentObject = from._isAMomentObject;\n }\n if (!isUndefined(from._i)) {\n to._i = from._i;\n }\n if (!isUndefined(from._f)) {\n to._f = from._f;\n }\n if (!isUndefined(from._l)) {\n to._l = from._l;\n }\n if (!isUndefined(from._strict)) {\n to._strict = from._strict;\n }\n if (!isUndefined(from._tzm)) {\n to._tzm = from._tzm;\n }\n if (!isUndefined(from._isUTC)) {\n to._isUTC = from._isUTC;\n }\n if (!isUndefined(from._offset)) {\n to._offset = from._offset;\n }\n if (!isUndefined(from._pf)) {\n to._pf = getParsingFlags(from);\n }\n if (!isUndefined(from._locale)) {\n to._locale = from._locale;\n }\n\n if (momentPropertiesLen > 0) {\n for (i = 0; i < momentPropertiesLen; i++) {\n prop = momentProperties[i];\n val = from[prop];\n if (!isUndefined(val)) {\n to[prop] = val;\n }\n }\n }\n\n return to;\n }\n\n // Moment prototype object\n function Moment(config) {\n copyConfig(this, config);\n this._d = new Date(config._d != null ? config._d.getTime() : NaN);\n if (!this.isValid()) {\n this._d = new Date(NaN);\n }\n // Prevent infinite loop in case updateOffset creates new moment\n // objects.\n if (updateInProgress === false) {\n updateInProgress = true;\n hooks.updateOffset(this);\n updateInProgress = false;\n }\n }\n\n function isMoment(obj) {\n return (\n obj instanceof Moment || (obj != null && obj._isAMomentObject != null)\n );\n }\n\n function warn(msg) {\n if (\n hooks.suppressDeprecationWarnings === false &&\n typeof console !== 'undefined' &&\n console.warn\n ) {\n console.warn('Deprecation warning: ' + msg);\n }\n }\n\n function deprecate(msg, fn) {\n var firstTime = true;\n\n return extend(function () {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(null, msg);\n }\n if (firstTime) {\n var args = [],\n arg,\n i,\n key,\n argLen = arguments.length;\n for (i = 0; i < argLen; i++) {\n arg = '';\n if (typeof arguments[i] === 'object') {\n arg += '\\n[' + i + '] ';\n for (key in arguments[0]) {\n if (hasOwnProp(arguments[0], key)) {\n arg += key + ': ' + arguments[0][key] + ', ';\n }\n }\n arg = arg.slice(0, -2); // Remove trailing comma and space\n } else {\n arg = arguments[i];\n }\n args.push(arg);\n }\n warn(\n msg +\n '\\nArguments: ' +\n Array.prototype.slice.call(args).join('') +\n '\\n' +\n new Error().stack\n );\n firstTime = false;\n }\n return fn.apply(this, arguments);\n }, fn);\n }\n\n var deprecations = {};\n\n function deprecateSimple(name, msg) {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(name, msg);\n }\n if (!deprecations[name]) {\n warn(msg);\n deprecations[name] = true;\n }\n }\n\n hooks.suppressDeprecationWarnings = false;\n hooks.deprecationHandler = null;\n\n function isFunction(input) {\n return (\n (typeof Function !== 'undefined' && input instanceof Function) ||\n Object.prototype.toString.call(input) === '[object Function]'\n );\n }\n\n function set(config) {\n var prop, i;\n for (i in config) {\n if (hasOwnProp(config, i)) {\n prop = config[i];\n if (isFunction(prop)) {\n this[i] = prop;\n } else {\n this['_' + i] = prop;\n }\n }\n }\n this._config = config;\n // Lenient ordinal parsing accepts just a number in addition to\n // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n this._dayOfMonthOrdinalParseLenient = new RegExp(\n (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +\n '|' +\n /\\d{1,2}/.source\n );\n }\n\n function mergeConfigs(parentConfig, childConfig) {\n var res = extend({}, parentConfig),\n prop;\n for (prop in childConfig) {\n if (hasOwnProp(childConfig, prop)) {\n if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {\n res[prop] = {};\n extend(res[prop], parentConfig[prop]);\n extend(res[prop], childConfig[prop]);\n } else if (childConfig[prop] != null) {\n res[prop] = childConfig[prop];\n } else {\n delete res[prop];\n }\n }\n }\n for (prop in parentConfig) {\n if (\n hasOwnProp(parentConfig, prop) &&\n !hasOwnProp(childConfig, prop) &&\n isObject(parentConfig[prop])\n ) {\n // make sure changes to properties don't modify parent config\n res[prop] = extend({}, res[prop]);\n }\n }\n return res;\n }\n\n function Locale(config) {\n if (config != null) {\n this.set(config);\n }\n }\n\n var keys;\n\n if (Object.keys) {\n keys = Object.keys;\n } else {\n keys = function (obj) {\n var i,\n res = [];\n for (i in obj) {\n if (hasOwnProp(obj, i)) {\n res.push(i);\n }\n }\n return res;\n };\n }\n\n var defaultCalendar = {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L',\n };\n\n function calendar(key, mom, now) {\n var output = this._calendar[key] || this._calendar['sameElse'];\n return isFunction(output) ? output.call(mom, now) : output;\n }\n\n function zeroFill(number, targetLength, forceSign) {\n var absNumber = '' + Math.abs(number),\n zerosToFill = targetLength - absNumber.length,\n sign = number >= 0;\n return (\n (sign ? (forceSign ? '+' : '') : '-') +\n Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) +\n absNumber\n );\n }\n\n var formattingTokens =\n /(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,\n localFormattingTokens = /(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g,\n formatFunctions = {},\n formatTokenFunctions = {};\n\n // token: 'M'\n // padded: ['MM', 2]\n // ordinal: 'Mo'\n // callback: function () { this.month() + 1 }\n function addFormatToken(token, padded, ordinal, callback) {\n var func = callback;\n if (typeof callback === 'string') {\n func = function () {\n return this[callback]();\n };\n }\n if (token) {\n formatTokenFunctions[token] = func;\n }\n if (padded) {\n formatTokenFunctions[padded[0]] = function () {\n return zeroFill(func.apply(this, arguments), padded[1], padded[2]);\n };\n }\n if (ordinal) {\n formatTokenFunctions[ordinal] = function () {\n return this.localeData().ordinal(\n func.apply(this, arguments),\n token\n );\n };\n }\n }\n\n function removeFormattingTokens(input) {\n if (input.match(/\\[[\\s\\S]/)) {\n return input.replace(/^\\[|\\]$/g, '');\n }\n return input.replace(/\\\\/g, '');\n }\n\n function makeFormatFunction(format) {\n var array = format.match(formattingTokens),\n i,\n length;\n\n for (i = 0, length = array.length; i < length; i++) {\n if (formatTokenFunctions[array[i]]) {\n array[i] = formatTokenFunctions[array[i]];\n } else {\n array[i] = removeFormattingTokens(array[i]);\n }\n }\n\n return function (mom) {\n var output = '',\n i;\n for (i = 0; i < length; i++) {\n output += isFunction(array[i])\n ? array[i].call(mom, format)\n : array[i];\n }\n return output;\n };\n }\n\n // format date using native date object\n function formatMoment(m, format) {\n if (!m.isValid()) {\n return m.localeData().invalidDate();\n }\n\n format = expandFormat(format, m.localeData());\n formatFunctions[format] =\n formatFunctions[format] || makeFormatFunction(format);\n\n return formatFunctions[format](m);\n }\n\n function expandFormat(format, locale) {\n var i = 5;\n\n function replaceLongDateFormatTokens(input) {\n return locale.longDateFormat(input) || input;\n }\n\n localFormattingTokens.lastIndex = 0;\n while (i >= 0 && localFormattingTokens.test(format)) {\n format = format.replace(\n localFormattingTokens,\n replaceLongDateFormatTokens\n );\n localFormattingTokens.lastIndex = 0;\n i -= 1;\n }\n\n return format;\n }\n\n var defaultLongDateFormat = {\n LTS: 'h:mm:ss A',\n LT: 'h:mm A',\n L: 'MM/DD/YYYY',\n LL: 'MMMM D, YYYY',\n LLL: 'MMMM D, YYYY h:mm A',\n LLLL: 'dddd, MMMM D, YYYY h:mm A',\n };\n\n function longDateFormat(key) {\n var format = this._longDateFormat[key],\n formatUpper = this._longDateFormat[key.toUpperCase()];\n\n if (format || !formatUpper) {\n return format;\n }\n\n this._longDateFormat[key] = formatUpper\n .match(formattingTokens)\n .map(function (tok) {\n if (\n tok === 'MMMM' ||\n tok === 'MM' ||\n tok === 'DD' ||\n tok === 'dddd'\n ) {\n return tok.slice(1);\n }\n return tok;\n })\n .join('');\n\n return this._longDateFormat[key];\n }\n\n var defaultInvalidDate = 'Invalid date';\n\n function invalidDate() {\n return this._invalidDate;\n }\n\n var defaultOrdinal = '%d',\n defaultDayOfMonthOrdinalParse = /\\d{1,2}/;\n\n function ordinal(number) {\n return this._ordinal.replace('%d', number);\n }\n\n var defaultRelativeTime = {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n w: 'a week',\n ww: '%d weeks',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years',\n };\n\n function relativeTime(number, withoutSuffix, string, isFuture) {\n var output = this._relativeTime[string];\n return isFunction(output)\n ? output(number, withoutSuffix, string, isFuture)\n : output.replace(/%d/i, number);\n }\n\n function pastFuture(diff, output) {\n var format = this._relativeTime[diff > 0 ? 'future' : 'past'];\n return isFunction(format) ? format(output) : format.replace(/%s/i, output);\n }\n\n var aliases = {\n D: 'date',\n dates: 'date',\n date: 'date',\n d: 'day',\n days: 'day',\n day: 'day',\n e: 'weekday',\n weekdays: 'weekday',\n weekday: 'weekday',\n E: 'isoWeekday',\n isoweekdays: 'isoWeekday',\n isoweekday: 'isoWeekday',\n DDD: 'dayOfYear',\n dayofyears: 'dayOfYear',\n dayofyear: 'dayOfYear',\n h: 'hour',\n hours: 'hour',\n hour: 'hour',\n ms: 'millisecond',\n milliseconds: 'millisecond',\n millisecond: 'millisecond',\n m: 'minute',\n minutes: 'minute',\n minute: 'minute',\n M: 'month',\n months: 'month',\n month: 'month',\n Q: 'quarter',\n quarters: 'quarter',\n quarter: 'quarter',\n s: 'second',\n seconds: 'second',\n second: 'second',\n gg: 'weekYear',\n weekyears: 'weekYear',\n weekyear: 'weekYear',\n GG: 'isoWeekYear',\n isoweekyears: 'isoWeekYear',\n isoweekyear: 'isoWeekYear',\n w: 'week',\n weeks: 'week',\n week: 'week',\n W: 'isoWeek',\n isoweeks: 'isoWeek',\n isoweek: 'isoWeek',\n y: 'year',\n years: 'year',\n year: 'year',\n };\n\n function normalizeUnits(units) {\n return typeof units === 'string'\n ? aliases[units] || aliases[units.toLowerCase()]\n : undefined;\n }\n\n function normalizeObjectUnits(inputObject) {\n var normalizedInput = {},\n normalizedProp,\n prop;\n\n for (prop in inputObject) {\n if (hasOwnProp(inputObject, prop)) {\n normalizedProp = normalizeUnits(prop);\n if (normalizedProp) {\n normalizedInput[normalizedProp] = inputObject[prop];\n }\n }\n }\n\n return normalizedInput;\n }\n\n var priorities = {\n date: 9,\n day: 11,\n weekday: 11,\n isoWeekday: 11,\n dayOfYear: 4,\n hour: 13,\n millisecond: 16,\n minute: 14,\n month: 8,\n quarter: 7,\n second: 15,\n weekYear: 1,\n isoWeekYear: 1,\n week: 5,\n isoWeek: 5,\n year: 1,\n };\n\n function getPrioritizedUnits(unitsObj) {\n var units = [],\n u;\n for (u in unitsObj) {\n if (hasOwnProp(unitsObj, u)) {\n units.push({ unit: u, priority: priorities[u] });\n }\n }\n units.sort(function (a, b) {\n return a.priority - b.priority;\n });\n return units;\n }\n\n var match1 = /\\d/, // 0 - 9\n match2 = /\\d\\d/, // 00 - 99\n match3 = /\\d{3}/, // 000 - 999\n match4 = /\\d{4}/, // 0000 - 9999\n match6 = /[+-]?\\d{6}/, // -999999 - 999999\n match1to2 = /\\d\\d?/, // 0 - 99\n match3to4 = /\\d\\d\\d\\d?/, // 999 - 9999\n match5to6 = /\\d\\d\\d\\d\\d\\d?/, // 99999 - 999999\n match1to3 = /\\d{1,3}/, // 0 - 999\n match1to4 = /\\d{1,4}/, // 0 - 9999\n match1to6 = /[+-]?\\d{1,6}/, // -999999 - 999999\n matchUnsigned = /\\d+/, // 0 - inf\n matchSigned = /[+-]?\\d+/, // -inf - inf\n matchOffset = /Z|[+-]\\d\\d:?\\d\\d/gi, // +00:00 -00:00 +0000 -0000 or Z\n matchShortOffset = /Z|[+-]\\d\\d(?::?\\d\\d)?/gi, // +00 -00 +00:00 -00:00 +0000 -0000 or Z\n matchTimestamp = /[+-]?\\d+(\\.\\d{1,3})?/, // 123456789 123456789.123\n // any word (or two) characters or numbers including two/three word month in arabic.\n // includes scottish gaelic two word and hyphenated months\n matchWord =\n /[0-9]{0,256}['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFF07\\uFF10-\\uFFEF]{1,256}|[\\u0600-\\u06FF\\/]{1,256}(\\s*?[\\u0600-\\u06FF]{1,256}){1,2}/i,\n match1to2NoLeadingZero = /^[1-9]\\d?/, // 1-99\n match1to2HasZero = /^([1-9]\\d|\\d)/, // 0-99\n regexes;\n\n regexes = {};\n\n function addRegexToken(token, regex, strictRegex) {\n regexes[token] = isFunction(regex)\n ? regex\n : function (isStrict, localeData) {\n return isStrict && strictRegex ? strictRegex : regex;\n };\n }\n\n function getParseRegexForToken(token, config) {\n if (!hasOwnProp(regexes, token)) {\n return new RegExp(unescapeFormat(token));\n }\n\n return regexes[token](config._strict, config._locale);\n }\n\n // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript\n function unescapeFormat(s) {\n return regexEscape(\n s\n .replace('\\\\', '')\n .replace(\n /\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g,\n function (matched, p1, p2, p3, p4) {\n return p1 || p2 || p3 || p4;\n }\n )\n );\n }\n\n function regexEscape(s) {\n return s.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n }\n\n function absFloor(number) {\n if (number < 0) {\n // -0 -> 0\n return Math.ceil(number) || 0;\n } else {\n return Math.floor(number);\n }\n }\n\n function toInt(argumentForCoercion) {\n var coercedNumber = +argumentForCoercion,\n value = 0;\n\n if (coercedNumber !== 0 && isFinite(coercedNumber)) {\n value = absFloor(coercedNumber);\n }\n\n return value;\n }\n\n var tokens = {};\n\n function addParseToken(token, callback) {\n var i,\n func = callback,\n tokenLen;\n if (typeof token === 'string') {\n token = [token];\n }\n if (isNumber(callback)) {\n func = function (input, array) {\n array[callback] = toInt(input);\n };\n }\n tokenLen = token.length;\n for (i = 0; i < tokenLen; i++) {\n tokens[token[i]] = func;\n }\n }\n\n function addWeekParseToken(token, callback) {\n addParseToken(token, function (input, array, config, token) {\n config._w = config._w || {};\n callback(input, config._w, config, token);\n });\n }\n\n function addTimeToArrayFromToken(token, input, config) {\n if (input != null && hasOwnProp(tokens, token)) {\n tokens[token](input, config._a, config, token);\n }\n }\n\n function isLeapYear(year) {\n return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n }\n\n var YEAR = 0,\n MONTH = 1,\n DATE = 2,\n HOUR = 3,\n MINUTE = 4,\n SECOND = 5,\n MILLISECOND = 6,\n WEEK = 7,\n WEEKDAY = 8;\n\n // FORMATTING\n\n addFormatToken('Y', 0, 0, function () {\n var y = this.year();\n return y <= 9999 ? zeroFill(y, 4) : '+' + y;\n });\n\n addFormatToken(0, ['YY', 2], 0, function () {\n return this.year() % 100;\n });\n\n addFormatToken(0, ['YYYY', 4], 0, 'year');\n addFormatToken(0, ['YYYYY', 5], 0, 'year');\n addFormatToken(0, ['YYYYYY', 6, true], 0, 'year');\n\n // PARSING\n\n addRegexToken('Y', matchSigned);\n addRegexToken('YY', match1to2, match2);\n addRegexToken('YYYY', match1to4, match4);\n addRegexToken('YYYYY', match1to6, match6);\n addRegexToken('YYYYYY', match1to6, match6);\n\n addParseToken(['YYYYY', 'YYYYYY'], YEAR);\n addParseToken('YYYY', function (input, array) {\n array[YEAR] =\n input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);\n });\n addParseToken('YY', function (input, array) {\n array[YEAR] = hooks.parseTwoDigitYear(input);\n });\n addParseToken('Y', function (input, array) {\n array[YEAR] = parseInt(input, 10);\n });\n\n // HELPERS\n\n function daysInYear(year) {\n return isLeapYear(year) ? 366 : 365;\n }\n\n // HOOKS\n\n hooks.parseTwoDigitYear = function (input) {\n return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);\n };\n\n // MOMENTS\n\n var getSetYear = makeGetSet('FullYear', true);\n\n function getIsLeapYear() {\n return isLeapYear(this.year());\n }\n\n function makeGetSet(unit, keepTime) {\n return function (value) {\n if (value != null) {\n set$1(this, unit, value);\n hooks.updateOffset(this, keepTime);\n return this;\n } else {\n return get(this, unit);\n }\n };\n }\n\n function get(mom, unit) {\n if (!mom.isValid()) {\n return NaN;\n }\n\n var d = mom._d,\n isUTC = mom._isUTC;\n\n switch (unit) {\n case 'Milliseconds':\n return isUTC ? d.getUTCMilliseconds() : d.getMilliseconds();\n case 'Seconds':\n return isUTC ? d.getUTCSeconds() : d.getSeconds();\n case 'Minutes':\n return isUTC ? d.getUTCMinutes() : d.getMinutes();\n case 'Hours':\n return isUTC ? d.getUTCHours() : d.getHours();\n case 'Date':\n return isUTC ? d.getUTCDate() : d.getDate();\n case 'Day':\n return isUTC ? d.getUTCDay() : d.getDay();\n case 'Month':\n return isUTC ? d.getUTCMonth() : d.getMonth();\n case 'FullYear':\n return isUTC ? d.getUTCFullYear() : d.getFullYear();\n default:\n return NaN; // Just in case\n }\n }\n\n function set$1(mom, unit, value) {\n var d, isUTC, year, month, date;\n\n if (!mom.isValid() || isNaN(value)) {\n return;\n }\n\n d = mom._d;\n isUTC = mom._isUTC;\n\n switch (unit) {\n case 'Milliseconds':\n return void (isUTC\n ? d.setUTCMilliseconds(value)\n : d.setMilliseconds(value));\n case 'Seconds':\n return void (isUTC ? d.setUTCSeconds(value) : d.setSeconds(value));\n case 'Minutes':\n return void (isUTC ? d.setUTCMinutes(value) : d.setMinutes(value));\n case 'Hours':\n return void (isUTC ? d.setUTCHours(value) : d.setHours(value));\n case 'Date':\n return void (isUTC ? d.setUTCDate(value) : d.setDate(value));\n // case 'Day': // Not real\n // return void (isUTC ? d.setUTCDay(value) : d.setDay(value));\n // case 'Month': // Not used because we need to pass two variables\n // return void (isUTC ? d.setUTCMonth(value) : d.setMonth(value));\n case 'FullYear':\n break; // See below ...\n default:\n return; // Just in case\n }\n\n year = value;\n month = mom.month();\n date = mom.date();\n date = date === 29 && month === 1 && !isLeapYear(year) ? 28 : date;\n void (isUTC\n ? d.setUTCFullYear(year, month, date)\n : d.setFullYear(year, month, date));\n }\n\n // MOMENTS\n\n function stringGet(units) {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units]();\n }\n return this;\n }\n\n function stringSet(units, value) {\n if (typeof units === 'object') {\n units = normalizeObjectUnits(units);\n var prioritized = getPrioritizedUnits(units),\n i,\n prioritizedLen = prioritized.length;\n for (i = 0; i < prioritizedLen; i++) {\n this[prioritized[i].unit](units[prioritized[i].unit]);\n }\n } else {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units](value);\n }\n }\n return this;\n }\n\n function mod(n, x) {\n return ((n % x) + x) % x;\n }\n\n var indexOf;\n\n if (Array.prototype.indexOf) {\n indexOf = Array.prototype.indexOf;\n } else {\n indexOf = function (o) {\n // I know\n var i;\n for (i = 0; i < this.length; ++i) {\n if (this[i] === o) {\n return i;\n }\n }\n return -1;\n };\n }\n\n function daysInMonth(year, month) {\n if (isNaN(year) || isNaN(month)) {\n return NaN;\n }\n var modMonth = mod(month, 12);\n year += (month - modMonth) / 12;\n return modMonth === 1\n ? isLeapYear(year)\n ? 29\n : 28\n : 31 - ((modMonth % 7) % 2);\n }\n\n // FORMATTING\n\n addFormatToken('M', ['MM', 2], 'Mo', function () {\n return this.month() + 1;\n });\n\n addFormatToken('MMM', 0, 0, function (format) {\n return this.localeData().monthsShort(this, format);\n });\n\n addFormatToken('MMMM', 0, 0, function (format) {\n return this.localeData().months(this, format);\n });\n\n // PARSING\n\n addRegexToken('M', match1to2, match1to2NoLeadingZero);\n addRegexToken('MM', match1to2, match2);\n addRegexToken('MMM', function (isStrict, locale) {\n return locale.monthsShortRegex(isStrict);\n });\n addRegexToken('MMMM', function (isStrict, locale) {\n return locale.monthsRegex(isStrict);\n });\n\n addParseToken(['M', 'MM'], function (input, array) {\n array[MONTH] = toInt(input) - 1;\n });\n\n addParseToken(['MMM', 'MMMM'], function (input, array, config, token) {\n var month = config._locale.monthsParse(input, token, config._strict);\n // if we didn't find a month name, mark the date as invalid.\n if (month != null) {\n array[MONTH] = month;\n } else {\n getParsingFlags(config).invalidMonth = input;\n }\n });\n\n // LOCALES\n\n var defaultLocaleMonths =\n 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n '_'\n ),\n defaultLocaleMonthsShort =\n 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n MONTHS_IN_FORMAT = /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?/,\n defaultMonthsShortRegex = matchWord,\n defaultMonthsRegex = matchWord;\n\n function localeMonths(m, format) {\n if (!m) {\n return isArray(this._months)\n ? this._months\n : this._months['standalone'];\n }\n return isArray(this._months)\n ? this._months[m.month()]\n : this._months[\n (this._months.isFormat || MONTHS_IN_FORMAT).test(format)\n ? 'format'\n : 'standalone'\n ][m.month()];\n }\n\n function localeMonthsShort(m, format) {\n if (!m) {\n return isArray(this._monthsShort)\n ? this._monthsShort\n : this._monthsShort['standalone'];\n }\n return isArray(this._monthsShort)\n ? this._monthsShort[m.month()]\n : this._monthsShort[\n MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'\n ][m.month()];\n }\n\n function handleStrictParse(monthName, format, strict) {\n var i,\n ii,\n mom,\n llc = monthName.toLocaleLowerCase();\n if (!this._monthsParse) {\n // this is not used\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n for (i = 0; i < 12; ++i) {\n mom = createUTC([2000, i]);\n this._shortMonthsParse[i] = this.monthsShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n }\n\n function localeMonthsParse(monthName, format, strict) {\n var i, mom, regex;\n\n if (this._monthsParseExact) {\n return handleStrictParse.call(this, monthName, format, strict);\n }\n\n if (!this._monthsParse) {\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n }\n\n // TODO: add sorting\n // Sorting makes sure if one month (or abbr) is a prefix of another\n // see sorting in computeMonthsParse\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n if (strict && !this._longMonthsParse[i]) {\n this._longMonthsParse[i] = new RegExp(\n '^' + this.months(mom, '').replace('.', '') + '$',\n 'i'\n );\n this._shortMonthsParse[i] = new RegExp(\n '^' + this.monthsShort(mom, '').replace('.', '') + '$',\n 'i'\n );\n }\n if (!strict && !this._monthsParse[i]) {\n regex =\n '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');\n this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'MMMM' &&\n this._longMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'MMM' &&\n this._shortMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (!strict && this._monthsParse[i].test(monthName)) {\n return i;\n }\n }\n }\n\n // MOMENTS\n\n function setMonth(mom, value) {\n if (!mom.isValid()) {\n // No op\n return mom;\n }\n\n if (typeof value === 'string') {\n if (/^\\d+$/.test(value)) {\n value = toInt(value);\n } else {\n value = mom.localeData().monthsParse(value);\n // TODO: Another silent failure?\n if (!isNumber(value)) {\n return mom;\n }\n }\n }\n\n var month = value,\n date = mom.date();\n\n date = date < 29 ? date : Math.min(date, daysInMonth(mom.year(), month));\n void (mom._isUTC\n ? mom._d.setUTCMonth(month, date)\n : mom._d.setMonth(month, date));\n return mom;\n }\n\n function getSetMonth(value) {\n if (value != null) {\n setMonth(this, value);\n hooks.updateOffset(this, true);\n return this;\n } else {\n return get(this, 'Month');\n }\n }\n\n function getDaysInMonth() {\n return daysInMonth(this.year(), this.month());\n }\n\n function monthsShortRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsShortStrictRegex;\n } else {\n return this._monthsShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsShortRegex')) {\n this._monthsShortRegex = defaultMonthsShortRegex;\n }\n return this._monthsShortStrictRegex && isStrict\n ? this._monthsShortStrictRegex\n : this._monthsShortRegex;\n }\n }\n\n function monthsRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsStrictRegex;\n } else {\n return this._monthsRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsRegex')) {\n this._monthsRegex = defaultMonthsRegex;\n }\n return this._monthsStrictRegex && isStrict\n ? this._monthsStrictRegex\n : this._monthsRegex;\n }\n }\n\n function computeMonthsParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom,\n shortP,\n longP;\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n shortP = regexEscape(this.monthsShort(mom, ''));\n longP = regexEscape(this.months(mom, ''));\n shortPieces.push(shortP);\n longPieces.push(longP);\n mixedPieces.push(longP);\n mixedPieces.push(shortP);\n }\n // Sorting makes sure if one month (or abbr) is a prefix of another it\n // will match the longer piece.\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n\n this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._monthsShortRegex = this._monthsRegex;\n this._monthsStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._monthsShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n }\n\n function createDate(y, m, d, h, M, s, ms) {\n // can't just apply() to create a date:\n // https://stackoverflow.com/q/181348\n var date;\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n date = new Date(y + 400, m, d, h, M, s, ms);\n if (isFinite(date.getFullYear())) {\n date.setFullYear(y);\n }\n } else {\n date = new Date(y, m, d, h, M, s, ms);\n }\n\n return date;\n }\n\n function createUTCDate(y) {\n var date, args;\n // the Date.UTC function remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n args = Array.prototype.slice.call(arguments);\n // preserve leap years using a full 400 year cycle, then reset\n args[0] = y + 400;\n date = new Date(Date.UTC.apply(null, args));\n if (isFinite(date.getUTCFullYear())) {\n date.setUTCFullYear(y);\n }\n } else {\n date = new Date(Date.UTC.apply(null, arguments));\n }\n\n return date;\n }\n\n // start-of-first-week - start-of-year\n function firstWeekOffset(year, dow, doy) {\n var // first-week day -- which january is always in the first week (4 for iso, 1 for other)\n fwd = 7 + dow - doy,\n // first-week day local weekday -- which local weekday is fwd\n fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;\n\n return -fwdlw + fwd - 1;\n }\n\n // https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday\n function dayOfYearFromWeeks(year, week, weekday, dow, doy) {\n var localWeekday = (7 + weekday - dow) % 7,\n weekOffset = firstWeekOffset(year, dow, doy),\n dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,\n resYear,\n resDayOfYear;\n\n if (dayOfYear <= 0) {\n resYear = year - 1;\n resDayOfYear = daysInYear(resYear) + dayOfYear;\n } else if (dayOfYear > daysInYear(year)) {\n resYear = year + 1;\n resDayOfYear = dayOfYear - daysInYear(year);\n } else {\n resYear = year;\n resDayOfYear = dayOfYear;\n }\n\n return {\n year: resYear,\n dayOfYear: resDayOfYear,\n };\n }\n\n function weekOfYear(mom, dow, doy) {\n var weekOffset = firstWeekOffset(mom.year(), dow, doy),\n week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,\n resWeek,\n resYear;\n\n if (week < 1) {\n resYear = mom.year() - 1;\n resWeek = week + weeksInYear(resYear, dow, doy);\n } else if (week > weeksInYear(mom.year(), dow, doy)) {\n resWeek = week - weeksInYear(mom.year(), dow, doy);\n resYear = mom.year() + 1;\n } else {\n resYear = mom.year();\n resWeek = week;\n }\n\n return {\n week: resWeek,\n year: resYear,\n };\n }\n\n function weeksInYear(year, dow, doy) {\n var weekOffset = firstWeekOffset(year, dow, doy),\n weekOffsetNext = firstWeekOffset(year + 1, dow, doy);\n return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;\n }\n\n // FORMATTING\n\n addFormatToken('w', ['ww', 2], 'wo', 'week');\n addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');\n\n // PARSING\n\n addRegexToken('w', match1to2, match1to2NoLeadingZero);\n addRegexToken('ww', match1to2, match2);\n addRegexToken('W', match1to2, match1to2NoLeadingZero);\n addRegexToken('WW', match1to2, match2);\n\n addWeekParseToken(\n ['w', 'ww', 'W', 'WW'],\n function (input, week, config, token) {\n week[token.substr(0, 1)] = toInt(input);\n }\n );\n\n // HELPERS\n\n // LOCALES\n\n function localeWeek(mom) {\n return weekOfYear(mom, this._week.dow, this._week.doy).week;\n }\n\n var defaultLocaleWeek = {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n };\n\n function localeFirstDayOfWeek() {\n return this._week.dow;\n }\n\n function localeFirstDayOfYear() {\n return this._week.doy;\n }\n\n // MOMENTS\n\n function getSetWeek(input) {\n var week = this.localeData().week(this);\n return input == null ? week : this.add((input - week) * 7, 'd');\n }\n\n function getSetISOWeek(input) {\n var week = weekOfYear(this, 1, 4).week;\n return input == null ? week : this.add((input - week) * 7, 'd');\n }\n\n // FORMATTING\n\n addFormatToken('d', 0, 'do', 'day');\n\n addFormatToken('dd', 0, 0, function (format) {\n return this.localeData().weekdaysMin(this, format);\n });\n\n addFormatToken('ddd', 0, 0, function (format) {\n return this.localeData().weekdaysShort(this, format);\n });\n\n addFormatToken('dddd', 0, 0, function (format) {\n return this.localeData().weekdays(this, format);\n });\n\n addFormatToken('e', 0, 0, 'weekday');\n addFormatToken('E', 0, 0, 'isoWeekday');\n\n // PARSING\n\n addRegexToken('d', match1to2);\n addRegexToken('e', match1to2);\n addRegexToken('E', match1to2);\n addRegexToken('dd', function (isStrict, locale) {\n return locale.weekdaysMinRegex(isStrict);\n });\n addRegexToken('ddd', function (isStrict, locale) {\n return locale.weekdaysShortRegex(isStrict);\n });\n addRegexToken('dddd', function (isStrict, locale) {\n return locale.weekdaysRegex(isStrict);\n });\n\n addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {\n var weekday = config._locale.weekdaysParse(input, token, config._strict);\n // if we didn't get a weekday name, mark the date as invalid\n if (weekday != null) {\n week.d = weekday;\n } else {\n getParsingFlags(config).invalidWeekday = input;\n }\n });\n\n addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {\n week[token] = toInt(input);\n });\n\n // HELPERS\n\n function parseWeekday(input, locale) {\n if (typeof input !== 'string') {\n return input;\n }\n\n if (!isNaN(input)) {\n return parseInt(input, 10);\n }\n\n input = locale.weekdaysParse(input);\n if (typeof input === 'number') {\n return input;\n }\n\n return null;\n }\n\n function parseIsoWeekday(input, locale) {\n if (typeof input === 'string') {\n return locale.weekdaysParse(input) % 7 || 7;\n }\n return isNaN(input) ? null : input;\n }\n\n // LOCALES\n function shiftWeekdays(ws, n) {\n return ws.slice(n, 7).concat(ws.slice(0, n));\n }\n\n var defaultLocaleWeekdays =\n 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n defaultWeekdaysRegex = matchWord,\n defaultWeekdaysShortRegex = matchWord,\n defaultWeekdaysMinRegex = matchWord;\n\n function localeWeekdays(m, format) {\n var weekdays = isArray(this._weekdays)\n ? this._weekdays\n : this._weekdays[\n m && m !== true && this._weekdays.isFormat.test(format)\n ? 'format'\n : 'standalone'\n ];\n return m === true\n ? shiftWeekdays(weekdays, this._week.dow)\n : m\n ? weekdays[m.day()]\n : weekdays;\n }\n\n function localeWeekdaysShort(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysShort, this._week.dow)\n : m\n ? this._weekdaysShort[m.day()]\n : this._weekdaysShort;\n }\n\n function localeWeekdaysMin(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysMin, this._week.dow)\n : m\n ? this._weekdaysMin[m.day()]\n : this._weekdaysMin;\n }\n\n function handleStrictParse$1(weekdayName, format, strict) {\n var i,\n ii,\n mom,\n llc = weekdayName.toLocaleLowerCase();\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._minWeekdaysParse = [];\n\n for (i = 0; i < 7; ++i) {\n mom = createUTC([2000, 1]).day(i);\n this._minWeekdaysParse[i] = this.weekdaysMin(\n mom,\n ''\n ).toLocaleLowerCase();\n this._shortWeekdaysParse[i] = this.weekdaysShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n }\n\n function localeWeekdaysParse(weekdayName, format, strict) {\n var i, mom, regex;\n\n if (this._weekdaysParseExact) {\n return handleStrictParse$1.call(this, weekdayName, format, strict);\n }\n\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._minWeekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._fullWeekdaysParse = [];\n }\n\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n\n mom = createUTC([2000, 1]).day(i);\n if (strict && !this._fullWeekdaysParse[i]) {\n this._fullWeekdaysParse[i] = new RegExp(\n '^' + this.weekdays(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._shortWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysShort(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._minWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysMin(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n }\n if (!this._weekdaysParse[i]) {\n regex =\n '^' +\n this.weekdays(mom, '') +\n '|^' +\n this.weekdaysShort(mom, '') +\n '|^' +\n this.weekdaysMin(mom, '');\n this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'dddd' &&\n this._fullWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'ddd' &&\n this._shortWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'dd' &&\n this._minWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {\n return i;\n }\n }\n }\n\n // MOMENTS\n\n function getSetDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n var day = get(this, 'Day');\n if (input != null) {\n input = parseWeekday(input, this.localeData());\n return this.add(input - day, 'd');\n } else {\n return day;\n }\n }\n\n function getSetLocaleDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;\n return input == null ? weekday : this.add(input - weekday, 'd');\n }\n\n function getSetISODayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n // behaves the same as moment#day except\n // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)\n // as a setter, sunday should belong to the previous week.\n\n if (input != null) {\n var weekday = parseIsoWeekday(input, this.localeData());\n return this.day(this.day() % 7 ? weekday : weekday - 7);\n } else {\n return this.day() || 7;\n }\n }\n\n function weekdaysRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysStrictRegex;\n } else {\n return this._weekdaysRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n this._weekdaysRegex = defaultWeekdaysRegex;\n }\n return this._weekdaysStrictRegex && isStrict\n ? this._weekdaysStrictRegex\n : this._weekdaysRegex;\n }\n }\n\n function weekdaysShortRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysShortStrictRegex;\n } else {\n return this._weekdaysShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysShortRegex')) {\n this._weekdaysShortRegex = defaultWeekdaysShortRegex;\n }\n return this._weekdaysShortStrictRegex && isStrict\n ? this._weekdaysShortStrictRegex\n : this._weekdaysShortRegex;\n }\n }\n\n function weekdaysMinRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysMinStrictRegex;\n } else {\n return this._weekdaysMinRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysMinRegex')) {\n this._weekdaysMinRegex = defaultWeekdaysMinRegex;\n }\n return this._weekdaysMinStrictRegex && isStrict\n ? this._weekdaysMinStrictRegex\n : this._weekdaysMinRegex;\n }\n }\n\n function computeWeekdaysParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var minPieces = [],\n shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom,\n minp,\n shortp,\n longp;\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, 1]).day(i);\n minp = regexEscape(this.weekdaysMin(mom, ''));\n shortp = regexEscape(this.weekdaysShort(mom, ''));\n longp = regexEscape(this.weekdays(mom, ''));\n minPieces.push(minp);\n shortPieces.push(shortp);\n longPieces.push(longp);\n mixedPieces.push(minp);\n mixedPieces.push(shortp);\n mixedPieces.push(longp);\n }\n // Sorting makes sure if one weekday (or abbr) is a prefix of another it\n // will match the longer piece.\n minPieces.sort(cmpLenRev);\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n\n this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._weekdaysShortRegex = this._weekdaysRegex;\n this._weekdaysMinRegex = this._weekdaysRegex;\n\n this._weekdaysStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysMinStrictRegex = new RegExp(\n '^(' + minPieces.join('|') + ')',\n 'i'\n );\n }\n\n // FORMATTING\n\n function hFormat() {\n return this.hours() % 12 || 12;\n }\n\n function kFormat() {\n return this.hours() || 24;\n }\n\n addFormatToken('H', ['HH', 2], 0, 'hour');\n addFormatToken('h', ['hh', 2], 0, hFormat);\n addFormatToken('k', ['kk', 2], 0, kFormat);\n\n addFormatToken('hmm', 0, 0, function () {\n return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);\n });\n\n addFormatToken('hmmss', 0, 0, function () {\n return (\n '' +\n hFormat.apply(this) +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n });\n\n addFormatToken('Hmm', 0, 0, function () {\n return '' + this.hours() + zeroFill(this.minutes(), 2);\n });\n\n addFormatToken('Hmmss', 0, 0, function () {\n return (\n '' +\n this.hours() +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n });\n\n function meridiem(token, lowercase) {\n addFormatToken(token, 0, 0, function () {\n return this.localeData().meridiem(\n this.hours(),\n this.minutes(),\n lowercase\n );\n });\n }\n\n meridiem('a', true);\n meridiem('A', false);\n\n // PARSING\n\n function matchMeridiem(isStrict, locale) {\n return locale._meridiemParse;\n }\n\n addRegexToken('a', matchMeridiem);\n addRegexToken('A', matchMeridiem);\n addRegexToken('H', match1to2, match1to2HasZero);\n addRegexToken('h', match1to2, match1to2NoLeadingZero);\n addRegexToken('k', match1to2, match1to2NoLeadingZero);\n addRegexToken('HH', match1to2, match2);\n addRegexToken('hh', match1to2, match2);\n addRegexToken('kk', match1to2, match2);\n\n addRegexToken('hmm', match3to4);\n addRegexToken('hmmss', match5to6);\n addRegexToken('Hmm', match3to4);\n addRegexToken('Hmmss', match5to6);\n\n addParseToken(['H', 'HH'], HOUR);\n addParseToken(['k', 'kk'], function (input, array, config) {\n var kInput = toInt(input);\n array[HOUR] = kInput === 24 ? 0 : kInput;\n });\n addParseToken(['a', 'A'], function (input, array, config) {\n config._isPm = config._locale.isPM(input);\n config._meridiem = input;\n });\n addParseToken(['h', 'hh'], function (input, array, config) {\n array[HOUR] = toInt(input);\n getParsingFlags(config).bigHour = true;\n });\n addParseToken('hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n getParsingFlags(config).bigHour = true;\n });\n addParseToken('hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n getParsingFlags(config).bigHour = true;\n });\n addParseToken('Hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n });\n addParseToken('Hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n });\n\n // LOCALES\n\n function localeIsPM(input) {\n // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays\n // Using charAt should be more compatible.\n return (input + '').toLowerCase().charAt(0) === 'p';\n }\n\n var defaultLocaleMeridiemParse = /[ap]\\.?m?\\.?/i,\n // Setting the hour should keep the time, because the user explicitly\n // specified which hour they want. So trying to maintain the same hour (in\n // a new timezone) makes sense. Adding/subtracting hours does not follow\n // this rule.\n getSetHour = makeGetSet('Hours', true);\n\n function localeMeridiem(hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'pm' : 'PM';\n } else {\n return isLower ? 'am' : 'AM';\n }\n }\n\n var baseConfig = {\n calendar: defaultCalendar,\n longDateFormat: defaultLongDateFormat,\n invalidDate: defaultInvalidDate,\n ordinal: defaultOrdinal,\n dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,\n relativeTime: defaultRelativeTime,\n\n months: defaultLocaleMonths,\n monthsShort: defaultLocaleMonthsShort,\n\n week: defaultLocaleWeek,\n\n weekdays: defaultLocaleWeekdays,\n weekdaysMin: defaultLocaleWeekdaysMin,\n weekdaysShort: defaultLocaleWeekdaysShort,\n\n meridiemParse: defaultLocaleMeridiemParse,\n };\n\n // internal storage for locale config files\n var locales = {},\n localeFamilies = {},\n globalLocale;\n\n function commonPrefix(arr1, arr2) {\n var i,\n minl = Math.min(arr1.length, arr2.length);\n for (i = 0; i < minl; i += 1) {\n if (arr1[i] !== arr2[i]) {\n return i;\n }\n }\n return minl;\n }\n\n function normalizeLocale(key) {\n return key ? key.toLowerCase().replace('_', '-') : key;\n }\n\n // pick the locale from the array\n // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each\n // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root\n function chooseLocale(names) {\n var i = 0,\n j,\n next,\n locale,\n split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (\n next &&\n next.length >= j &&\n commonPrefix(split, next) >= j - 1\n ) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return globalLocale;\n }\n\n function isLocaleNameSane(name) {\n // Prevent names that look like filesystem paths, i.e contain '/' or '\\'\n // Ensure name is available and function returns boolean\n return !!(name && name.match('^[^/\\\\\\\\]*$'));\n }\n\n function loadLocale(name) {\n var oldLocale = null,\n aliasedRequire;\n // TODO: Find a better way to register and load all the locales in Node\n if (\n locales[name] === undefined &&\n \"object\" !== 'undefined' &&\n module &&\n module.exports &&\n isLocaleNameSane(name)\n ) {\n try {\n oldLocale = globalLocale._abbr;\n aliasedRequire = undefined;\n __webpack_require__(5358)(\"./\" + name);\n getSetGlobalLocale(oldLocale);\n } catch (e) {\n // mark as not found to avoid repeating expensive file require call causing high CPU\n // when trying to find en-US, en_US, en-us for every format call\n locales[name] = null; // null means not found\n }\n }\n return locales[name];\n }\n\n // This function will load locale and then set the global locale. If\n // no arguments are passed in, it will simply return the current global\n // locale key.\n function getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn(\n 'Locale ' + key + ' not found. Did you forget to load it?'\n );\n }\n }\n }\n\n return globalLocale._abbr;\n }\n\n function defineLocale(name, config) {\n if (config !== null) {\n var locale,\n parentConfig = baseConfig;\n config.abbr = name;\n if (locales[name] != null) {\n deprecateSimple(\n 'defineLocaleOverride',\n 'use moment.updateLocale(localeName, config) to change ' +\n 'an existing locale. moment.defineLocale(localeName, ' +\n 'config) should only be used for creating a new locale ' +\n 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'\n );\n parentConfig = locales[name]._config;\n } else if (config.parentLocale != null) {\n if (locales[config.parentLocale] != null) {\n parentConfig = locales[config.parentLocale]._config;\n } else {\n locale = loadLocale(config.parentLocale);\n if (locale != null) {\n parentConfig = locale._config;\n } else {\n if (!localeFamilies[config.parentLocale]) {\n localeFamilies[config.parentLocale] = [];\n }\n localeFamilies[config.parentLocale].push({\n name: name,\n config: config,\n });\n return null;\n }\n }\n }\n locales[name] = new Locale(mergeConfigs(parentConfig, config));\n\n if (localeFamilies[name]) {\n localeFamilies[name].forEach(function (x) {\n defineLocale(x.name, x.config);\n });\n }\n\n // backwards compat for now: also set the locale\n // make sure we set the locale AFTER all child locales have been\n // created, so we won't end up with the child locale set.\n getSetGlobalLocale(name);\n\n return locales[name];\n } else {\n // useful for testing\n delete locales[name];\n return null;\n }\n }\n\n function updateLocale(name, config) {\n if (config != null) {\n var locale,\n tmpLocale,\n parentConfig = baseConfig;\n\n if (locales[name] != null && locales[name].parentLocale != null) {\n // Update existing child locale in-place to avoid memory-leaks\n locales[name].set(mergeConfigs(locales[name]._config, config));\n } else {\n // MERGE\n tmpLocale = loadLocale(name);\n if (tmpLocale != null) {\n parentConfig = tmpLocale._config;\n }\n config = mergeConfigs(parentConfig, config);\n if (tmpLocale == null) {\n // updateLocale is called for creating a new locale\n // Set abbr so it will have a name (getters return\n // undefined otherwise).\n config.abbr = name;\n }\n locale = new Locale(config);\n locale.parentLocale = locales[name];\n locales[name] = locale;\n }\n\n // backwards compat for now: also set the locale\n getSetGlobalLocale(name);\n } else {\n // pass null for config to unupdate, useful for tests\n if (locales[name] != null) {\n if (locales[name].parentLocale != null) {\n locales[name] = locales[name].parentLocale;\n if (name === getSetGlobalLocale()) {\n getSetGlobalLocale(name);\n }\n } else if (locales[name] != null) {\n delete locales[name];\n }\n }\n }\n return locales[name];\n }\n\n // returns locale data\n function getLocale(key) {\n var locale;\n\n if (key && key._locale && key._locale._abbr) {\n key = key._locale._abbr;\n }\n\n if (!key) {\n return globalLocale;\n }\n\n if (!isArray(key)) {\n //short-circuit everything else\n locale = loadLocale(key);\n if (locale) {\n return locale;\n }\n key = [key];\n }\n\n return chooseLocale(key);\n }\n\n function listLocales() {\n return keys(locales);\n }\n\n function checkOverflow(m) {\n var overflow,\n a = m._a;\n\n if (a && getParsingFlags(m).overflow === -2) {\n overflow =\n a[MONTH] < 0 || a[MONTH] > 11\n ? MONTH\n : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH])\n ? DATE\n : a[HOUR] < 0 ||\n a[HOUR] > 24 ||\n (a[HOUR] === 24 &&\n (a[MINUTE] !== 0 ||\n a[SECOND] !== 0 ||\n a[MILLISECOND] !== 0))\n ? HOUR\n : a[MINUTE] < 0 || a[MINUTE] > 59\n ? MINUTE\n : a[SECOND] < 0 || a[SECOND] > 59\n ? SECOND\n : a[MILLISECOND] < 0 || a[MILLISECOND] > 999\n ? MILLISECOND\n : -1;\n\n if (\n getParsingFlags(m)._overflowDayOfYear &&\n (overflow < YEAR || overflow > DATE)\n ) {\n overflow = DATE;\n }\n if (getParsingFlags(m)._overflowWeeks && overflow === -1) {\n overflow = WEEK;\n }\n if (getParsingFlags(m)._overflowWeekday && overflow === -1) {\n overflow = WEEKDAY;\n }\n\n getParsingFlags(m).overflow = overflow;\n }\n\n return m;\n }\n\n // iso 8601 regex\n // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)\n var extendedIsoRegex =\n /^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n basicIsoRegex =\n /^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d|))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n tzRegex = /Z|[+-]\\d\\d(?::?\\d\\d)?/,\n isoDates = [\n ['YYYYYY-MM-DD', /[+-]\\d{6}-\\d\\d-\\d\\d/],\n ['YYYY-MM-DD', /\\d{4}-\\d\\d-\\d\\d/],\n ['GGGG-[W]WW-E', /\\d{4}-W\\d\\d-\\d/],\n ['GGGG-[W]WW', /\\d{4}-W\\d\\d/, false],\n ['YYYY-DDD', /\\d{4}-\\d{3}/],\n ['YYYY-MM', /\\d{4}-\\d\\d/, false],\n ['YYYYYYMMDD', /[+-]\\d{10}/],\n ['YYYYMMDD', /\\d{8}/],\n ['GGGG[W]WWE', /\\d{4}W\\d{3}/],\n ['GGGG[W]WW', /\\d{4}W\\d{2}/, false],\n ['YYYYDDD', /\\d{7}/],\n ['YYYYMM', /\\d{6}/, false],\n ['YYYY', /\\d{4}/, false],\n ],\n // iso time formats and regexes\n isoTimes = [\n ['HH:mm:ss.SSSS', /\\d\\d:\\d\\d:\\d\\d\\.\\d+/],\n ['HH:mm:ss,SSSS', /\\d\\d:\\d\\d:\\d\\d,\\d+/],\n ['HH:mm:ss', /\\d\\d:\\d\\d:\\d\\d/],\n ['HH:mm', /\\d\\d:\\d\\d/],\n ['HHmmss.SSSS', /\\d\\d\\d\\d\\d\\d\\.\\d+/],\n ['HHmmss,SSSS', /\\d\\d\\d\\d\\d\\d,\\d+/],\n ['HHmmss', /\\d\\d\\d\\d\\d\\d/],\n ['HHmm', /\\d\\d\\d\\d/],\n ['HH', /\\d\\d/],\n ],\n aspNetJsonRegex = /^\\/?Date\\((-?\\d+)/i,\n // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3\n rfc2822 =\n /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\\d{4}))$/,\n obsOffsets = {\n UT: 0,\n GMT: 0,\n EDT: -4 * 60,\n EST: -5 * 60,\n CDT: -5 * 60,\n CST: -6 * 60,\n MDT: -6 * 60,\n MST: -7 * 60,\n PDT: -7 * 60,\n PST: -8 * 60,\n };\n\n // date from iso format\n function configFromISO(config) {\n var i,\n l,\n string = config._i,\n match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),\n allowTime,\n dateFormat,\n timeFormat,\n tzFormat,\n isoDatesLen = isoDates.length,\n isoTimesLen = isoTimes.length;\n\n if (match) {\n getParsingFlags(config).iso = true;\n for (i = 0, l = isoDatesLen; i < l; i++) {\n if (isoDates[i][1].exec(match[1])) {\n dateFormat = isoDates[i][0];\n allowTime = isoDates[i][2] !== false;\n break;\n }\n }\n if (dateFormat == null) {\n config._isValid = false;\n return;\n }\n if (match[3]) {\n for (i = 0, l = isoTimesLen; i < l; i++) {\n if (isoTimes[i][1].exec(match[3])) {\n // match[2] should be 'T' or space\n timeFormat = (match[2] || ' ') + isoTimes[i][0];\n break;\n }\n }\n if (timeFormat == null) {\n config._isValid = false;\n return;\n }\n }\n if (!allowTime && timeFormat != null) {\n config._isValid = false;\n return;\n }\n if (match[4]) {\n if (tzRegex.exec(match[4])) {\n tzFormat = 'Z';\n } else {\n config._isValid = false;\n return;\n }\n }\n config._f = dateFormat + (timeFormat || '') + (tzFormat || '');\n configFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n }\n\n function extractFromRFC2822Strings(\n yearStr,\n monthStr,\n dayStr,\n hourStr,\n minuteStr,\n secondStr\n ) {\n var result = [\n untruncateYear(yearStr),\n defaultLocaleMonthsShort.indexOf(monthStr),\n parseInt(dayStr, 10),\n parseInt(hourStr, 10),\n parseInt(minuteStr, 10),\n ];\n\n if (secondStr) {\n result.push(parseInt(secondStr, 10));\n }\n\n return result;\n }\n\n function untruncateYear(yearStr) {\n var year = parseInt(yearStr, 10);\n if (year <= 49) {\n return 2000 + year;\n } else if (year <= 999) {\n return 1900 + year;\n }\n return year;\n }\n\n function preprocessRFC2822(s) {\n // Remove comments and folding whitespace and replace multiple-spaces with a single space\n return s\n .replace(/\\([^()]*\\)|[\\n\\t]/g, ' ')\n .replace(/(\\s\\s+)/g, ' ')\n .replace(/^\\s\\s*/, '')\n .replace(/\\s\\s*$/, '');\n }\n\n function checkWeekday(weekdayStr, parsedInput, config) {\n if (weekdayStr) {\n // TODO: Replace the vanilla JS Date object with an independent day-of-week check.\n var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),\n weekdayActual = new Date(\n parsedInput[0],\n parsedInput[1],\n parsedInput[2]\n ).getDay();\n if (weekdayProvided !== weekdayActual) {\n getParsingFlags(config).weekdayMismatch = true;\n config._isValid = false;\n return false;\n }\n }\n return true;\n }\n\n function calculateOffset(obsOffset, militaryOffset, numOffset) {\n if (obsOffset) {\n return obsOffsets[obsOffset];\n } else if (militaryOffset) {\n // the only allowed military tz is Z\n return 0;\n } else {\n var hm = parseInt(numOffset, 10),\n m = hm % 100,\n h = (hm - m) / 100;\n return h * 60 + m;\n }\n }\n\n // date and time from ref 2822 format\n function configFromRFC2822(config) {\n var match = rfc2822.exec(preprocessRFC2822(config._i)),\n parsedArray;\n if (match) {\n parsedArray = extractFromRFC2822Strings(\n match[4],\n match[3],\n match[2],\n match[5],\n match[6],\n match[7]\n );\n if (!checkWeekday(match[1], parsedArray, config)) {\n return;\n }\n\n config._a = parsedArray;\n config._tzm = calculateOffset(match[8], match[9], match[10]);\n\n config._d = createUTCDate.apply(null, config._a);\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n\n getParsingFlags(config).rfc2822 = true;\n } else {\n config._isValid = false;\n }\n }\n\n // date from 1) ASP.NET, 2) ISO, 3) RFC 2822 formats, or 4) optional fallback if parsing isn't strict\n function configFromString(config) {\n var matched = aspNetJsonRegex.exec(config._i);\n if (matched !== null) {\n config._d = new Date(+matched[1]);\n return;\n }\n\n configFromISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n configFromRFC2822(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n if (config._strict) {\n config._isValid = false;\n } else {\n // Final attempt, use Input Fallback\n hooks.createFromInputFallback(config);\n }\n }\n\n hooks.createFromInputFallback = deprecate(\n 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +\n 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +\n 'discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.',\n function (config) {\n config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));\n }\n );\n\n // Pick the first defined of two or three arguments.\n function defaults(a, b, c) {\n if (a != null) {\n return a;\n }\n if (b != null) {\n return b;\n }\n return c;\n }\n\n function currentDateArray(config) {\n // hooks is actually the exported moment object\n var nowValue = new Date(hooks.now());\n if (config._useUTC) {\n return [\n nowValue.getUTCFullYear(),\n nowValue.getUTCMonth(),\n nowValue.getUTCDate(),\n ];\n }\n return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];\n }\n\n // convert an array to a date.\n // the array should mirror the parameters below\n // note: all values past the year are optional and will default to the lowest possible value.\n // [year, month, day , hour, minute, second, millisecond]\n function configFromArray(config) {\n var i,\n date,\n input = [],\n currentDate,\n expectedWeekday,\n yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear != null) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (\n config._dayOfYear > daysInYear(yearToUse) ||\n config._dayOfYear === 0\n ) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] =\n config._a[i] == null ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (\n config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0\n ) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(\n null,\n input\n );\n expectedWeekday = config._useUTC\n ? config._d.getUTCDay()\n : config._d.getDay();\n\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n\n // check for mismatching day of week\n if (\n config._w &&\n typeof config._w.d !== 'undefined' &&\n config._w.d !== expectedWeekday\n ) {\n getParsingFlags(config).weekdayMismatch = true;\n }\n }\n\n function dayOfYearFromWeekInfo(config) {\n var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek;\n\n w = config._w;\n if (w.GG != null || w.W != null || w.E != null) {\n dow = 1;\n doy = 4;\n\n // TODO: We need to take the current isoWeekYear, but that depends on\n // how we interpret now (local, utc, fixed offset). So create\n // a now version of current config (take local/utc/offset flags, and\n // create now).\n weekYear = defaults(\n w.GG,\n config._a[YEAR],\n weekOfYear(createLocal(), 1, 4).year\n );\n week = defaults(w.W, 1);\n weekday = defaults(w.E, 1);\n if (weekday < 1 || weekday > 7) {\n weekdayOverflow = true;\n }\n } else {\n dow = config._locale._week.dow;\n doy = config._locale._week.doy;\n\n curWeek = weekOfYear(createLocal(), dow, doy);\n\n weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);\n\n // Default to current week.\n week = defaults(w.w, curWeek.week);\n\n if (w.d != null) {\n // weekday -- low day numbers are considered next week\n weekday = w.d;\n if (weekday < 0 || weekday > 6) {\n weekdayOverflow = true;\n }\n } else if (w.e != null) {\n // local weekday -- counting starts from beginning of week\n weekday = w.e + dow;\n if (w.e < 0 || w.e > 6) {\n weekdayOverflow = true;\n }\n } else {\n // default to beginning of week\n weekday = dow;\n }\n }\n if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {\n getParsingFlags(config)._overflowWeeks = true;\n } else if (weekdayOverflow != null) {\n getParsingFlags(config)._overflowWeekday = true;\n } else {\n temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);\n config._a[YEAR] = temp.year;\n config._dayOfYear = temp.dayOfYear;\n }\n }\n\n // constant that refers to the ISO standard\n hooks.ISO_8601 = function () {};\n\n // constant that refers to the RFC 2822 form\n hooks.RFC_2822 = function () {};\n\n // date from string and format string\n function configFromStringAndFormat(config) {\n // TODO: Move this to another part of the creation flow to prevent circular deps\n if (config._f === hooks.ISO_8601) {\n configFromISO(config);\n return;\n }\n if (config._f === hooks.RFC_2822) {\n configFromRFC2822(config);\n return;\n }\n config._a = [];\n getParsingFlags(config).empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i,\n parsedInput,\n tokens,\n token,\n skipped,\n stringLength = string.length,\n totalParsedInputLength = 0,\n era,\n tokenLen;\n\n tokens =\n expandFormat(config._f, config._locale).match(formattingTokens) || [];\n tokenLen = tokens.length;\n for (i = 0; i < tokenLen; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) ||\n [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n getParsingFlags(config).unusedInput.push(skipped);\n }\n string = string.slice(\n string.indexOf(parsedInput) + parsedInput.length\n );\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n getParsingFlags(config).empty = false;\n } else {\n getParsingFlags(config).unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n } else if (config._strict && !parsedInput) {\n getParsingFlags(config).unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n getParsingFlags(config).charsLeftOver =\n stringLength - totalParsedInputLength;\n if (string.length > 0) {\n getParsingFlags(config).unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (\n config._a[HOUR] <= 12 &&\n getParsingFlags(config).bigHour === true &&\n config._a[HOUR] > 0\n ) {\n getParsingFlags(config).bigHour = undefined;\n }\n\n getParsingFlags(config).parsedDateParts = config._a.slice(0);\n getParsingFlags(config).meridiem = config._meridiem;\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(\n config._locale,\n config._a[HOUR],\n config._meridiem\n );\n\n // handle era\n era = getParsingFlags(config).era;\n if (era !== null) {\n config._a[YEAR] = config._locale.erasConvertYear(era, config._a[YEAR]);\n }\n\n configFromArray(config);\n checkOverflow(config);\n }\n\n function meridiemFixWrap(locale, hour, meridiem) {\n var isPm;\n\n if (meridiem == null) {\n // nothing to do\n return hour;\n }\n if (locale.meridiemHour != null) {\n return locale.meridiemHour(hour, meridiem);\n } else if (locale.isPM != null) {\n // Fallback\n isPm = locale.isPM(meridiem);\n if (isPm && hour < 12) {\n hour += 12;\n }\n if (!isPm && hour === 12) {\n hour = 0;\n }\n return hour;\n } else {\n // this is not supposed to happen\n return hour;\n }\n }\n\n // date from string and array of format strings\n function configFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n scoreToBeat,\n i,\n currentScore,\n validFormatFound,\n bestFormatIsValid = false,\n configfLen = config._f.length;\n\n if (configfLen === 0) {\n getParsingFlags(config).invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < configfLen; i++) {\n currentScore = 0;\n validFormatFound = false;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._f = config._f[i];\n configFromStringAndFormat(tempConfig);\n\n if (isValid(tempConfig)) {\n validFormatFound = true;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += getParsingFlags(tempConfig).charsLeftOver;\n\n //or tokens\n currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;\n\n getParsingFlags(tempConfig).score = currentScore;\n\n if (!bestFormatIsValid) {\n if (\n scoreToBeat == null ||\n currentScore < scoreToBeat ||\n validFormatFound\n ) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n if (validFormatFound) {\n bestFormatIsValid = true;\n }\n }\n } else {\n if (currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }\n\n function configFromObject(config) {\n if (config._d) {\n return;\n }\n\n var i = normalizeObjectUnits(config._i),\n dayOrDate = i.day === undefined ? i.date : i.day;\n config._a = map(\n [i.year, i.month, dayOrDate, i.hour, i.minute, i.second, i.millisecond],\n function (obj) {\n return obj && parseInt(obj, 10);\n }\n );\n\n configFromArray(config);\n }\n\n function createFromConfig(config) {\n var res = new Moment(checkOverflow(prepareConfig(config)));\n if (res._nextDay) {\n // Adding is smart enough around DST\n res.add(1, 'd');\n res._nextDay = undefined;\n }\n\n return res;\n }\n\n function prepareConfig(config) {\n var input = config._i,\n format = config._f;\n\n config._locale = config._locale || getLocale(config._l);\n\n if (input === null || (format === undefined && input === '')) {\n return createInvalid({ nullInput: true });\n }\n\n if (typeof input === 'string') {\n config._i = input = config._locale.preparse(input);\n }\n\n if (isMoment(input)) {\n return new Moment(checkOverflow(input));\n } else if (isDate(input)) {\n config._d = input;\n } else if (isArray(format)) {\n configFromStringAndArray(config);\n } else if (format) {\n configFromStringAndFormat(config);\n } else {\n configFromInput(config);\n }\n\n if (!isValid(config)) {\n config._d = null;\n }\n\n return config;\n }\n\n function configFromInput(config) {\n var input = config._i;\n if (isUndefined(input)) {\n config._d = new Date(hooks.now());\n } else if (isDate(input)) {\n config._d = new Date(input.valueOf());\n } else if (typeof input === 'string') {\n configFromString(config);\n } else if (isArray(input)) {\n config._a = map(input.slice(0), function (obj) {\n return parseInt(obj, 10);\n });\n configFromArray(config);\n } else if (isObject(input)) {\n configFromObject(config);\n } else if (isNumber(input)) {\n // from milliseconds\n config._d = new Date(input);\n } else {\n hooks.createFromInputFallback(config);\n }\n }\n\n function createLocalOrUTC(input, format, locale, strict, isUTC) {\n var c = {};\n\n if (format === true || format === false) {\n strict = format;\n format = undefined;\n }\n\n if (locale === true || locale === false) {\n strict = locale;\n locale = undefined;\n }\n\n if (\n (isObject(input) && isObjectEmpty(input)) ||\n (isArray(input) && input.length === 0)\n ) {\n input = undefined;\n }\n // object construction must be done this way.\n // https://github.com/moment/moment/issues/1423\n c._isAMomentObject = true;\n c._useUTC = c._isUTC = isUTC;\n c._l = locale;\n c._i = input;\n c._f = format;\n c._strict = strict;\n\n return createFromConfig(c);\n }\n\n function createLocal(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, false);\n }\n\n var prototypeMin = deprecate(\n 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other < this ? this : other;\n } else {\n return createInvalid();\n }\n }\n ),\n prototypeMax = deprecate(\n 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other > this ? this : other;\n } else {\n return createInvalid();\n }\n }\n );\n\n // Pick a moment m from moments so that m[fn](other) is true for all\n // other. This relies on the function fn to be transitive.\n //\n // moments should either be an array of moment objects or an array, whose\n // first element is an array of moment objects.\n function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }\n\n // TODO: Use [].sort instead?\n function min() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isBefore', args);\n }\n\n function max() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isAfter', args);\n }\n\n var now = function () {\n return Date.now ? Date.now() : +new Date();\n };\n\n var ordering = [\n 'year',\n 'quarter',\n 'month',\n 'week',\n 'day',\n 'hour',\n 'minute',\n 'second',\n 'millisecond',\n ];\n\n function isDurationValid(m) {\n var key,\n unitHasDecimal = false,\n i,\n orderLen = ordering.length;\n for (key in m) {\n if (\n hasOwnProp(m, key) &&\n !(\n indexOf.call(ordering, key) !== -1 &&\n (m[key] == null || !isNaN(m[key]))\n )\n ) {\n return false;\n }\n }\n\n for (i = 0; i < orderLen; ++i) {\n if (m[ordering[i]]) {\n if (unitHasDecimal) {\n return false; // only allow non-integers for smallest unit\n }\n if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {\n unitHasDecimal = true;\n }\n }\n }\n\n return true;\n }\n\n function isValid$1() {\n return this._isValid;\n }\n\n function createInvalid$1() {\n return createDuration(NaN);\n }\n\n function Duration(duration) {\n var normalizedInput = normalizeObjectUnits(duration),\n years = normalizedInput.year || 0,\n quarters = normalizedInput.quarter || 0,\n months = normalizedInput.month || 0,\n weeks = normalizedInput.week || normalizedInput.isoWeek || 0,\n days = normalizedInput.day || 0,\n hours = normalizedInput.hour || 0,\n minutes = normalizedInput.minute || 0,\n seconds = normalizedInput.second || 0,\n milliseconds = normalizedInput.millisecond || 0;\n\n this._isValid = isDurationValid(normalizedInput);\n\n // representation for dateAddRemove\n this._milliseconds =\n +milliseconds +\n seconds * 1e3 + // 1000\n minutes * 6e4 + // 1000 * 60\n hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978\n // Because of dateAddRemove treats 24 hours as different from a\n // day when working around DST, we need to store them separately\n this._days = +days + weeks * 7;\n // It is impossible to translate months into days without knowing\n // which months you are are talking about, so we have to store\n // it separately.\n this._months = +months + quarters * 3 + years * 12;\n\n this._data = {};\n\n this._locale = getLocale();\n\n this._bubble();\n }\n\n function isDuration(obj) {\n return obj instanceof Duration;\n }\n\n function absRound(number) {\n if (number < 0) {\n return Math.round(-1 * number) * -1;\n } else {\n return Math.round(number);\n }\n }\n\n // compare two arrays, return the number of differences\n function compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if (\n (dontConvert && array1[i] !== array2[i]) ||\n (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))\n ) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n }\n\n // FORMATTING\n\n function offset(token, separator) {\n addFormatToken(token, 0, 0, function () {\n var offset = this.utcOffset(),\n sign = '+';\n if (offset < 0) {\n offset = -offset;\n sign = '-';\n }\n return (\n sign +\n zeroFill(~~(offset / 60), 2) +\n separator +\n zeroFill(~~offset % 60, 2)\n );\n });\n }\n\n offset('Z', ':');\n offset('ZZ', '');\n\n // PARSING\n\n addRegexToken('Z', matchShortOffset);\n addRegexToken('ZZ', matchShortOffset);\n addParseToken(['Z', 'ZZ'], function (input, array, config) {\n config._useUTC = true;\n config._tzm = offsetFromString(matchShortOffset, input);\n });\n\n // HELPERS\n\n // timezone chunker\n // '+10:00' > ['10', '00']\n // '-1530' > ['-15', '30']\n var chunkOffset = /([\\+\\-]|\\d\\d)/gi;\n\n function offsetFromString(matcher, string) {\n var matches = (string || '').match(matcher),\n chunk,\n parts,\n minutes;\n\n if (matches === null) {\n return null;\n }\n\n chunk = matches[matches.length - 1] || [];\n parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];\n minutes = +(parts[1] * 60) + toInt(parts[2]);\n\n return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes;\n }\n\n // Return a moment from input, that is local/utc/zone equivalent to model.\n function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff =\n (isMoment(input) || isDate(input)\n ? input.valueOf()\n : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n }\n\n function getDateOffset(m) {\n // On Firefox.24 Date#getTimezoneOffset returns a floating point.\n // https://github.com/moment/moment/pull/1871\n return -Math.round(m._d.getTimezoneOffset());\n }\n\n // HOOKS\n\n // This function will be called whenever a moment is mutated.\n // It is intended to keep the offset in sync with the timezone.\n hooks.updateOffset = function () {};\n\n // MOMENTS\n\n // keepLocalTime = true means only change the timezone, without\n // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->\n // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset\n // +0200, so we adjust the time as needed, to be valid.\n //\n // Keeping the time actually adds/subtracts (one hour)\n // from the actual represented time. That is why we call updateOffset\n // a second time. In case it wants us to change the offset again\n // _changeInProgress == true case, then we have to adjust, because\n // there is no such time in the given timezone.\n function getSetOffset(input, keepLocalTime, keepMinutes) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16 && !keepMinutes) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(\n this,\n createDuration(input - offset, 'm'),\n 1,\n false\n );\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }\n\n function getSetZone(input, keepLocalTime) {\n if (input != null) {\n if (typeof input !== 'string') {\n input = -input;\n }\n\n this.utcOffset(input, keepLocalTime);\n\n return this;\n } else {\n return -this.utcOffset();\n }\n }\n\n function setOffsetToUTC(keepLocalTime) {\n return this.utcOffset(0, keepLocalTime);\n }\n\n function setOffsetToLocal(keepLocalTime) {\n if (this._isUTC) {\n this.utcOffset(0, keepLocalTime);\n this._isUTC = false;\n\n if (keepLocalTime) {\n this.subtract(getDateOffset(this), 'm');\n }\n }\n return this;\n }\n\n function setOffsetToParsedOffset() {\n if (this._tzm != null) {\n this.utcOffset(this._tzm, false, true);\n } else if (typeof this._i === 'string') {\n var tZone = offsetFromString(matchOffset, this._i);\n if (tZone != null) {\n this.utcOffset(tZone);\n } else {\n this.utcOffset(0, true);\n }\n }\n return this;\n }\n\n function hasAlignedHourOffset(input) {\n if (!this.isValid()) {\n return false;\n }\n input = input ? createLocal(input).utcOffset() : 0;\n\n return (this.utcOffset() - input) % 60 === 0;\n }\n\n function isDaylightSavingTime() {\n return (\n this.utcOffset() > this.clone().month(0).utcOffset() ||\n this.utcOffset() > this.clone().month(5).utcOffset()\n );\n }\n\n function isDaylightSavingTimeShifted() {\n if (!isUndefined(this._isDSTShifted)) {\n return this._isDSTShifted;\n }\n\n var c = {},\n other;\n\n copyConfig(c, this);\n c = prepareConfig(c);\n\n if (c._a) {\n other = c._isUTC ? createUTC(c._a) : createLocal(c._a);\n this._isDSTShifted =\n this.isValid() && compareArrays(c._a, other.toArray()) > 0;\n } else {\n this._isDSTShifted = false;\n }\n\n return this._isDSTShifted;\n }\n\n function isLocal() {\n return this.isValid() ? !this._isUTC : false;\n }\n\n function isUtcOffset() {\n return this.isValid() ? this._isUTC : false;\n }\n\n function isUtc() {\n return this.isValid() ? this._isUTC && this._offset === 0 : false;\n }\n\n // ASP.NET json date format regex\n var aspNetRegex = /^(-|\\+)?(?:(\\d*)[. ])?(\\d+):(\\d+)(?::(\\d+)(\\.\\d*)?)?$/,\n // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html\n // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere\n // and further modified to allow for strings containing both week and day\n isoRegex =\n /^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;\n\n function createDuration(input, key) {\n var duration = input,\n // matching against regexp is expensive, do it on demand\n match = null,\n sign,\n ret,\n diffRes;\n\n if (isDuration(input)) {\n duration = {\n ms: input._milliseconds,\n d: input._days,\n M: input._months,\n };\n } else if (isNumber(input) || !isNaN(+input)) {\n duration = {};\n if (key) {\n duration[key] = +input;\n } else {\n duration.milliseconds = +input;\n }\n } else if ((match = aspNetRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: 0,\n d: toInt(match[DATE]) * sign,\n h: toInt(match[HOUR]) * sign,\n m: toInt(match[MINUTE]) * sign,\n s: toInt(match[SECOND]) * sign,\n ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign, // the millisecond decimal point is included in the match\n };\n } else if ((match = isoRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: parseIso(match[2], sign),\n M: parseIso(match[3], sign),\n w: parseIso(match[4], sign),\n d: parseIso(match[5], sign),\n h: parseIso(match[6], sign),\n m: parseIso(match[7], sign),\n s: parseIso(match[8], sign),\n };\n } else if (duration == null) {\n // checks for null or undefined\n duration = {};\n } else if (\n typeof duration === 'object' &&\n ('from' in duration || 'to' in duration)\n ) {\n diffRes = momentsDifference(\n createLocal(duration.from),\n createLocal(duration.to)\n );\n\n duration = {};\n duration.ms = diffRes.milliseconds;\n duration.M = diffRes.months;\n }\n\n ret = new Duration(duration);\n\n if (isDuration(input) && hasOwnProp(input, '_locale')) {\n ret._locale = input._locale;\n }\n\n if (isDuration(input) && hasOwnProp(input, '_isValid')) {\n ret._isValid = input._isValid;\n }\n\n return ret;\n }\n\n createDuration.fn = Duration.prototype;\n createDuration.invalid = createInvalid$1;\n\n function parseIso(inp, sign) {\n // We'd normally use ~~inp for this, but unfortunately it also\n // converts floats to ints.\n // inp may be undefined, so careful calling replace on it.\n var res = inp && parseFloat(inp.replace(',', '.'));\n // apply sign while we're at it\n return (isNaN(res) ? 0 : res) * sign;\n }\n\n function positiveMomentsDifference(base, other) {\n var res = {};\n\n res.months =\n other.month() - base.month() + (other.year() - base.year()) * 12;\n if (base.clone().add(res.months, 'M').isAfter(other)) {\n --res.months;\n }\n\n res.milliseconds = +other - +base.clone().add(res.months, 'M');\n\n return res;\n }\n\n function momentsDifference(base, other) {\n var res;\n if (!(base.isValid() && other.isValid())) {\n return { milliseconds: 0, months: 0 };\n }\n\n other = cloneWithOffset(other, base);\n if (base.isBefore(other)) {\n res = positiveMomentsDifference(base, other);\n } else {\n res = positiveMomentsDifference(other, base);\n res.milliseconds = -res.milliseconds;\n res.months = -res.months;\n }\n\n return res;\n }\n\n // TODO: remove 'name' arg after deprecation is removed\n function createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(\n name,\n 'moment().' +\n name +\n '(period, number) is deprecated. Please use moment().' +\n name +\n '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n );\n tmp = val;\n val = period;\n period = tmp;\n }\n\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n }\n\n function addSubtract(mom, duration, isAdding, updateOffset) {\n var milliseconds = duration._milliseconds,\n days = absRound(duration._days),\n months = absRound(duration._months);\n\n if (!mom.isValid()) {\n // No op\n return;\n }\n\n updateOffset = updateOffset == null ? true : updateOffset;\n\n if (months) {\n setMonth(mom, get(mom, 'Month') + months * isAdding);\n }\n if (days) {\n set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);\n }\n if (milliseconds) {\n mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);\n }\n if (updateOffset) {\n hooks.updateOffset(mom, days || months);\n }\n }\n\n var add = createAdder(1, 'add'),\n subtract = createAdder(-1, 'subtract');\n\n function isString(input) {\n return typeof input === 'string' || input instanceof String;\n }\n\n // type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void; // null | undefined\n function isMomentInput(input) {\n return (\n isMoment(input) ||\n isDate(input) ||\n isString(input) ||\n isNumber(input) ||\n isNumberOrStringArray(input) ||\n isMomentInputObject(input) ||\n input === null ||\n input === undefined\n );\n }\n\n function isMomentInputObject(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'years',\n 'year',\n 'y',\n 'months',\n 'month',\n 'M',\n 'days',\n 'day',\n 'd',\n 'dates',\n 'date',\n 'D',\n 'hours',\n 'hour',\n 'h',\n 'minutes',\n 'minute',\n 'm',\n 'seconds',\n 'second',\n 's',\n 'milliseconds',\n 'millisecond',\n 'ms',\n ],\n i,\n property,\n propertyLen = properties.length;\n\n for (i = 0; i < propertyLen; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n }\n\n function isNumberOrStringArray(input) {\n var arrayTest = isArray(input),\n dataTypeTest = false;\n if (arrayTest) {\n dataTypeTest =\n input.filter(function (item) {\n return !isNumber(item) && isString(input);\n }).length === 0;\n }\n return arrayTest && dataTypeTest;\n }\n\n function isCalendarSpec(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'sameDay',\n 'nextDay',\n 'lastDay',\n 'nextWeek',\n 'lastWeek',\n 'sameElse',\n ],\n i,\n property;\n\n for (i = 0; i < properties.length; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n }\n\n function getCalendarFormat(myMoment, now) {\n var diff = myMoment.diff(now, 'days', true);\n return diff < -6\n ? 'sameElse'\n : diff < -1\n ? 'lastWeek'\n : diff < 0\n ? 'lastDay'\n : diff < 1\n ? 'sameDay'\n : diff < 2\n ? 'nextDay'\n : diff < 7\n ? 'nextWeek'\n : 'sameElse';\n }\n\n function calendar$1(time, formats) {\n // Support for single parameter, formats only overload to the calendar function\n if (arguments.length === 1) {\n if (!arguments[0]) {\n time = undefined;\n formats = undefined;\n } else if (isMomentInput(arguments[0])) {\n time = arguments[0];\n formats = undefined;\n } else if (isCalendarSpec(arguments[0])) {\n formats = arguments[0];\n time = undefined;\n }\n }\n // We want to compare the start of today, vs this.\n // Getting start-of-today depends on whether we're local/utc/offset or not.\n var now = time || createLocal(),\n sod = cloneWithOffset(now, this).startOf('day'),\n format = hooks.calendarFormat(this, sod) || 'sameElse',\n output =\n formats &&\n (isFunction(formats[format])\n ? formats[format].call(this, now)\n : formats[format]);\n\n return this.format(\n output || this.localeData().calendar(format, this, createLocal(now))\n );\n }\n\n function clone() {\n return new Moment(this);\n }\n\n function isAfter(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() > localInput.valueOf();\n } else {\n return localInput.valueOf() < this.clone().startOf(units).valueOf();\n }\n }\n\n function isBefore(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() < localInput.valueOf();\n } else {\n return this.clone().endOf(units).valueOf() < localInput.valueOf();\n }\n }\n\n function isBetween(from, to, units, inclusivity) {\n var localFrom = isMoment(from) ? from : createLocal(from),\n localTo = isMoment(to) ? to : createLocal(to);\n if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {\n return false;\n }\n inclusivity = inclusivity || '()';\n return (\n (inclusivity[0] === '('\n ? this.isAfter(localFrom, units)\n : !this.isBefore(localFrom, units)) &&\n (inclusivity[1] === ')'\n ? this.isBefore(localTo, units)\n : !this.isAfter(localTo, units))\n );\n }\n\n function isSame(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input),\n inputMs;\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() === localInput.valueOf();\n } else {\n inputMs = localInput.valueOf();\n return (\n this.clone().startOf(units).valueOf() <= inputMs &&\n inputMs <= this.clone().endOf(units).valueOf()\n );\n }\n }\n\n function isSameOrAfter(input, units) {\n return this.isSame(input, units) || this.isAfter(input, units);\n }\n\n function isSameOrBefore(input, units) {\n return this.isSame(input, units) || this.isBefore(input, units);\n }\n\n function diff(input, units, asFloat) {\n var that, zoneDelta, output;\n\n if (!this.isValid()) {\n return NaN;\n }\n\n that = cloneWithOffset(input, this);\n\n if (!that.isValid()) {\n return NaN;\n }\n\n zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;\n\n units = normalizeUnits(units);\n\n switch (units) {\n case 'year':\n output = monthDiff(this, that) / 12;\n break;\n case 'month':\n output = monthDiff(this, that);\n break;\n case 'quarter':\n output = monthDiff(this, that) / 3;\n break;\n case 'second':\n output = (this - that) / 1e3;\n break; // 1000\n case 'minute':\n output = (this - that) / 6e4;\n break; // 1000 * 60\n case 'hour':\n output = (this - that) / 36e5;\n break; // 1000 * 60 * 60\n case 'day':\n output = (this - that - zoneDelta) / 864e5;\n break; // 1000 * 60 * 60 * 24, negate dst\n case 'week':\n output = (this - that - zoneDelta) / 6048e5;\n break; // 1000 * 60 * 60 * 24 * 7, negate dst\n default:\n output = this - that;\n }\n\n return asFloat ? output : absFloor(output);\n }\n\n function monthDiff(a, b) {\n if (a.date() < b.date()) {\n // end-of-month calculations work correct when the start month has more\n // days than the end month.\n return -monthDiff(b, a);\n }\n // difference in months\n var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()),\n // b is in (anchor - 1 month, anchor + 1 month)\n anchor = a.clone().add(wholeMonthDiff, 'months'),\n anchor2,\n adjust;\n\n if (b - anchor < 0) {\n anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor - anchor2);\n } else {\n anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor2 - anchor);\n }\n\n //check for negative zero, return zero if negative zero\n return -(wholeMonthDiff + adjust) || 0;\n }\n\n hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';\n hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';\n\n function toString() {\n return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');\n }\n\n function toISOString(keepOffset) {\n if (!this.isValid()) {\n return null;\n }\n var utc = keepOffset !== true,\n m = utc ? this.clone().utc() : this;\n if (m.year() < 0 || m.year() > 9999) {\n return formatMoment(\n m,\n utc\n ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]'\n : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n }\n if (isFunction(Date.prototype.toISOString)) {\n // native implementation is ~50x faster, use it when we can\n if (utc) {\n return this.toDate().toISOString();\n } else {\n return new Date(this.valueOf() + this.utcOffset() * 60 * 1000)\n .toISOString()\n .replace('Z', formatMoment(m, 'Z'));\n }\n }\n return formatMoment(\n m,\n utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n }\n\n /**\n * Return a human readable representation of a moment that can\n * also be evaluated to get a new moment which is the same\n *\n * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects\n */\n function inspect() {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment',\n zone = '',\n prefix,\n year,\n datetime,\n suffix;\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n prefix = '[' + func + '(\"]';\n year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY';\n datetime = '-MM-DD[T]HH:mm:ss.SSS';\n suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n }\n\n function format(inputString) {\n if (!inputString) {\n inputString = this.isUtc()\n ? hooks.defaultFormatUtc\n : hooks.defaultFormat;\n }\n var output = formatMoment(this, inputString);\n return this.localeData().postformat(output);\n }\n\n function from(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ to: this, from: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n }\n\n function fromNow(withoutSuffix) {\n return this.from(createLocal(), withoutSuffix);\n }\n\n function to(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ from: this, to: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n }\n\n function toNow(withoutSuffix) {\n return this.to(createLocal(), withoutSuffix);\n }\n\n // If passed a locale key, it will set the locale for this\n // instance. Otherwise, it will return the locale configuration\n // variables for this instance.\n function locale(key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n }\n\n var lang = deprecate(\n 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',\n function (key) {\n if (key === undefined) {\n return this.localeData();\n } else {\n return this.locale(key);\n }\n }\n );\n\n function localeData() {\n return this._locale;\n }\n\n var MS_PER_SECOND = 1000,\n MS_PER_MINUTE = 60 * MS_PER_SECOND,\n MS_PER_HOUR = 60 * MS_PER_MINUTE,\n MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR;\n\n // actual modulo - handles negative numbers (for dates before 1970):\n function mod$1(dividend, divisor) {\n return ((dividend % divisor) + divisor) % divisor;\n }\n\n function localStartOfDate(y, m, d) {\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return new Date(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return new Date(y, m, d).valueOf();\n }\n }\n\n function utcStartOfDate(y, m, d) {\n // Date.UTC remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return Date.UTC(y, m, d);\n }\n }\n\n function startOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year(), 0, 1);\n break;\n case 'quarter':\n time = startOfDate(\n this.year(),\n this.month() - (this.month() % 3),\n 1\n );\n break;\n case 'month':\n time = startOfDate(this.year(), this.month(), 1);\n break;\n case 'week':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday()\n );\n break;\n case 'isoWeek':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1)\n );\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date());\n break;\n case 'hour':\n time = this._d.valueOf();\n time -= mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n );\n break;\n case 'minute':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_MINUTE);\n break;\n case 'second':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_SECOND);\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n }\n\n function endOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year() + 1, 0, 1) - 1;\n break;\n case 'quarter':\n time =\n startOfDate(\n this.year(),\n this.month() - (this.month() % 3) + 3,\n 1\n ) - 1;\n break;\n case 'month':\n time = startOfDate(this.year(), this.month() + 1, 1) - 1;\n break;\n case 'week':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday() + 7\n ) - 1;\n break;\n case 'isoWeek':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1) + 7\n ) - 1;\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;\n break;\n case 'hour':\n time = this._d.valueOf();\n time +=\n MS_PER_HOUR -\n mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n ) -\n 1;\n break;\n case 'minute':\n time = this._d.valueOf();\n time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1;\n break;\n case 'second':\n time = this._d.valueOf();\n time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1;\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n }\n\n function valueOf() {\n return this._d.valueOf() - (this._offset || 0) * 60000;\n }\n\n function unix() {\n return Math.floor(this.valueOf() / 1000);\n }\n\n function toDate() {\n return new Date(this.valueOf());\n }\n\n function toArray() {\n var m = this;\n return [\n m.year(),\n m.month(),\n m.date(),\n m.hour(),\n m.minute(),\n m.second(),\n m.millisecond(),\n ];\n }\n\n function toObject() {\n var m = this;\n return {\n years: m.year(),\n months: m.month(),\n date: m.date(),\n hours: m.hours(),\n minutes: m.minutes(),\n seconds: m.seconds(),\n milliseconds: m.milliseconds(),\n };\n }\n\n function toJSON() {\n // new Date(NaN).toJSON() === null\n return this.isValid() ? this.toISOString() : null;\n }\n\n function isValid$2() {\n return isValid(this);\n }\n\n function parsingFlags() {\n return extend({}, getParsingFlags(this));\n }\n\n function invalidAt() {\n return getParsingFlags(this).overflow;\n }\n\n function creationData() {\n return {\n input: this._i,\n format: this._f,\n locale: this._locale,\n isUTC: this._isUTC,\n strict: this._strict,\n };\n }\n\n addFormatToken('N', 0, 0, 'eraAbbr');\n addFormatToken('NN', 0, 0, 'eraAbbr');\n addFormatToken('NNN', 0, 0, 'eraAbbr');\n addFormatToken('NNNN', 0, 0, 'eraName');\n addFormatToken('NNNNN', 0, 0, 'eraNarrow');\n\n addFormatToken('y', ['y', 1], 'yo', 'eraYear');\n addFormatToken('y', ['yy', 2], 0, 'eraYear');\n addFormatToken('y', ['yyy', 3], 0, 'eraYear');\n addFormatToken('y', ['yyyy', 4], 0, 'eraYear');\n\n addRegexToken('N', matchEraAbbr);\n addRegexToken('NN', matchEraAbbr);\n addRegexToken('NNN', matchEraAbbr);\n addRegexToken('NNNN', matchEraName);\n addRegexToken('NNNNN', matchEraNarrow);\n\n addParseToken(\n ['N', 'NN', 'NNN', 'NNNN', 'NNNNN'],\n function (input, array, config, token) {\n var era = config._locale.erasParse(input, token, config._strict);\n if (era) {\n getParsingFlags(config).era = era;\n } else {\n getParsingFlags(config).invalidEra = input;\n }\n }\n );\n\n addRegexToken('y', matchUnsigned);\n addRegexToken('yy', matchUnsigned);\n addRegexToken('yyy', matchUnsigned);\n addRegexToken('yyyy', matchUnsigned);\n addRegexToken('yo', matchEraYearOrdinal);\n\n addParseToken(['y', 'yy', 'yyy', 'yyyy'], YEAR);\n addParseToken(['yo'], function (input, array, config, token) {\n var match;\n if (config._locale._eraYearOrdinalRegex) {\n match = input.match(config._locale._eraYearOrdinalRegex);\n }\n\n if (config._locale.eraYearOrdinalParse) {\n array[YEAR] = config._locale.eraYearOrdinalParse(input, match);\n } else {\n array[YEAR] = parseInt(input, 10);\n }\n });\n\n function localeEras(m, format) {\n var i,\n l,\n date,\n eras = this._eras || getLocale('en')._eras;\n for (i = 0, l = eras.length; i < l; ++i) {\n switch (typeof eras[i].since) {\n case 'string':\n // truncate time\n date = hooks(eras[i].since).startOf('day');\n eras[i].since = date.valueOf();\n break;\n }\n\n switch (typeof eras[i].until) {\n case 'undefined':\n eras[i].until = +Infinity;\n break;\n case 'string':\n // truncate time\n date = hooks(eras[i].until).startOf('day').valueOf();\n eras[i].until = date.valueOf();\n break;\n }\n }\n return eras;\n }\n\n function localeErasParse(eraName, format, strict) {\n var i,\n l,\n eras = this.eras(),\n name,\n abbr,\n narrow;\n eraName = eraName.toUpperCase();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n name = eras[i].name.toUpperCase();\n abbr = eras[i].abbr.toUpperCase();\n narrow = eras[i].narrow.toUpperCase();\n\n if (strict) {\n switch (format) {\n case 'N':\n case 'NN':\n case 'NNN':\n if (abbr === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNN':\n if (name === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNNN':\n if (narrow === eraName) {\n return eras[i];\n }\n break;\n }\n } else if ([name, abbr, narrow].indexOf(eraName) >= 0) {\n return eras[i];\n }\n }\n }\n\n function localeErasConvertYear(era, year) {\n var dir = era.since <= era.until ? +1 : -1;\n if (year === undefined) {\n return hooks(era.since).year();\n } else {\n return hooks(era.since).year() + (year - era.offset) * dir;\n }\n }\n\n function getEraName() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].name;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].name;\n }\n }\n\n return '';\n }\n\n function getEraNarrow() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].narrow;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].narrow;\n }\n }\n\n return '';\n }\n\n function getEraAbbr() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].abbr;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].abbr;\n }\n }\n\n return '';\n }\n\n function getEraYear() {\n var i,\n l,\n dir,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n dir = eras[i].since <= eras[i].until ? +1 : -1;\n\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (\n (eras[i].since <= val && val <= eras[i].until) ||\n (eras[i].until <= val && val <= eras[i].since)\n ) {\n return (\n (this.year() - hooks(eras[i].since).year()) * dir +\n eras[i].offset\n );\n }\n }\n\n return this.year();\n }\n\n function erasNameRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNameRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNameRegex : this._erasRegex;\n }\n\n function erasAbbrRegex(isStrict) {\n if (!hasOwnProp(this, '_erasAbbrRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasAbbrRegex : this._erasRegex;\n }\n\n function erasNarrowRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNarrowRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNarrowRegex : this._erasRegex;\n }\n\n function matchEraAbbr(isStrict, locale) {\n return locale.erasAbbrRegex(isStrict);\n }\n\n function matchEraName(isStrict, locale) {\n return locale.erasNameRegex(isStrict);\n }\n\n function matchEraNarrow(isStrict, locale) {\n return locale.erasNarrowRegex(isStrict);\n }\n\n function matchEraYearOrdinal(isStrict, locale) {\n return locale._eraYearOrdinalRegex || matchUnsigned;\n }\n\n function computeErasParse() {\n var abbrPieces = [],\n namePieces = [],\n narrowPieces = [],\n mixedPieces = [],\n i,\n l,\n erasName,\n erasAbbr,\n erasNarrow,\n eras = this.eras();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n erasName = regexEscape(eras[i].name);\n erasAbbr = regexEscape(eras[i].abbr);\n erasNarrow = regexEscape(eras[i].narrow);\n\n namePieces.push(erasName);\n abbrPieces.push(erasAbbr);\n narrowPieces.push(erasNarrow);\n mixedPieces.push(erasName);\n mixedPieces.push(erasAbbr);\n mixedPieces.push(erasNarrow);\n }\n\n this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._erasNameRegex = new RegExp('^(' + namePieces.join('|') + ')', 'i');\n this._erasAbbrRegex = new RegExp('^(' + abbrPieces.join('|') + ')', 'i');\n this._erasNarrowRegex = new RegExp(\n '^(' + narrowPieces.join('|') + ')',\n 'i'\n );\n }\n\n // FORMATTING\n\n addFormatToken(0, ['gg', 2], 0, function () {\n return this.weekYear() % 100;\n });\n\n addFormatToken(0, ['GG', 2], 0, function () {\n return this.isoWeekYear() % 100;\n });\n\n function addWeekYearFormatToken(token, getter) {\n addFormatToken(0, [token, token.length], 0, getter);\n }\n\n addWeekYearFormatToken('gggg', 'weekYear');\n addWeekYearFormatToken('ggggg', 'weekYear');\n addWeekYearFormatToken('GGGG', 'isoWeekYear');\n addWeekYearFormatToken('GGGGG', 'isoWeekYear');\n\n // ALIASES\n\n // PARSING\n\n addRegexToken('G', matchSigned);\n addRegexToken('g', matchSigned);\n addRegexToken('GG', match1to2, match2);\n addRegexToken('gg', match1to2, match2);\n addRegexToken('GGGG', match1to4, match4);\n addRegexToken('gggg', match1to4, match4);\n addRegexToken('GGGGG', match1to6, match6);\n addRegexToken('ggggg', match1to6, match6);\n\n addWeekParseToken(\n ['gggg', 'ggggg', 'GGGG', 'GGGGG'],\n function (input, week, config, token) {\n week[token.substr(0, 2)] = toInt(input);\n }\n );\n\n addWeekParseToken(['gg', 'GG'], function (input, week, config, token) {\n week[token] = hooks.parseTwoDigitYear(input);\n });\n\n // MOMENTS\n\n function getSetWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.week(),\n this.weekday() + this.localeData()._week.dow,\n this.localeData()._week.dow,\n this.localeData()._week.doy\n );\n }\n\n function getSetISOWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.isoWeek(),\n this.isoWeekday(),\n 1,\n 4\n );\n }\n\n function getISOWeeksInYear() {\n return weeksInYear(this.year(), 1, 4);\n }\n\n function getISOWeeksInISOWeekYear() {\n return weeksInYear(this.isoWeekYear(), 1, 4);\n }\n\n function getWeeksInYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);\n }\n\n function getWeeksInWeekYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.weekYear(), weekInfo.dow, weekInfo.doy);\n }\n\n function getSetWeekYearHelper(input, week, weekday, dow, doy) {\n var weeksTarget;\n if (input == null) {\n return weekOfYear(this, dow, doy).year;\n } else {\n weeksTarget = weeksInYear(input, dow, doy);\n if (week > weeksTarget) {\n week = weeksTarget;\n }\n return setWeekAll.call(this, input, week, weekday, dow, doy);\n }\n }\n\n function setWeekAll(weekYear, week, weekday, dow, doy) {\n var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),\n date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);\n\n this.year(date.getUTCFullYear());\n this.month(date.getUTCMonth());\n this.date(date.getUTCDate());\n return this;\n }\n\n // FORMATTING\n\n addFormatToken('Q', 0, 'Qo', 'quarter');\n\n // PARSING\n\n addRegexToken('Q', match1);\n addParseToken('Q', function (input, array) {\n array[MONTH] = (toInt(input) - 1) * 3;\n });\n\n // MOMENTS\n\n function getSetQuarter(input) {\n return input == null\n ? Math.ceil((this.month() + 1) / 3)\n : this.month((input - 1) * 3 + (this.month() % 3));\n }\n\n // FORMATTING\n\n addFormatToken('D', ['DD', 2], 'Do', 'date');\n\n // PARSING\n\n addRegexToken('D', match1to2, match1to2NoLeadingZero);\n addRegexToken('DD', match1to2, match2);\n addRegexToken('Do', function (isStrict, locale) {\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n return isStrict\n ? locale._dayOfMonthOrdinalParse || locale._ordinalParse\n : locale._dayOfMonthOrdinalParseLenient;\n });\n\n addParseToken(['D', 'DD'], DATE);\n addParseToken('Do', function (input, array) {\n array[DATE] = toInt(input.match(match1to2)[0]);\n });\n\n // MOMENTS\n\n var getSetDayOfMonth = makeGetSet('Date', true);\n\n // FORMATTING\n\n addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');\n\n // PARSING\n\n addRegexToken('DDD', match1to3);\n addRegexToken('DDDD', match3);\n addParseToken(['DDD', 'DDDD'], function (input, array, config) {\n config._dayOfYear = toInt(input);\n });\n\n // HELPERS\n\n // MOMENTS\n\n function getSetDayOfYear(input) {\n var dayOfYear =\n Math.round(\n (this.clone().startOf('day') - this.clone().startOf('year')) / 864e5\n ) + 1;\n return input == null ? dayOfYear : this.add(input - dayOfYear, 'd');\n }\n\n // FORMATTING\n\n addFormatToken('m', ['mm', 2], 0, 'minute');\n\n // PARSING\n\n addRegexToken('m', match1to2, match1to2HasZero);\n addRegexToken('mm', match1to2, match2);\n addParseToken(['m', 'mm'], MINUTE);\n\n // MOMENTS\n\n var getSetMinute = makeGetSet('Minutes', false);\n\n // FORMATTING\n\n addFormatToken('s', ['ss', 2], 0, 'second');\n\n // PARSING\n\n addRegexToken('s', match1to2, match1to2HasZero);\n addRegexToken('ss', match1to2, match2);\n addParseToken(['s', 'ss'], SECOND);\n\n // MOMENTS\n\n var getSetSecond = makeGetSet('Seconds', false);\n\n // FORMATTING\n\n addFormatToken('S', 0, 0, function () {\n return ~~(this.millisecond() / 100);\n });\n\n addFormatToken(0, ['SS', 2], 0, function () {\n return ~~(this.millisecond() / 10);\n });\n\n addFormatToken(0, ['SSS', 3], 0, 'millisecond');\n addFormatToken(0, ['SSSS', 4], 0, function () {\n return this.millisecond() * 10;\n });\n addFormatToken(0, ['SSSSS', 5], 0, function () {\n return this.millisecond() * 100;\n });\n addFormatToken(0, ['SSSSSS', 6], 0, function () {\n return this.millisecond() * 1000;\n });\n addFormatToken(0, ['SSSSSSS', 7], 0, function () {\n return this.millisecond() * 10000;\n });\n addFormatToken(0, ['SSSSSSSS', 8], 0, function () {\n return this.millisecond() * 100000;\n });\n addFormatToken(0, ['SSSSSSSSS', 9], 0, function () {\n return this.millisecond() * 1000000;\n });\n\n // PARSING\n\n addRegexToken('S', match1to3, match1);\n addRegexToken('SS', match1to3, match2);\n addRegexToken('SSS', match1to3, match3);\n\n var token, getSetMillisecond;\n for (token = 'SSSS'; token.length <= 9; token += 'S') {\n addRegexToken(token, matchUnsigned);\n }\n\n function parseMs(input, array) {\n array[MILLISECOND] = toInt(('0.' + input) * 1000);\n }\n\n for (token = 'S'; token.length <= 9; token += 'S') {\n addParseToken(token, parseMs);\n }\n\n getSetMillisecond = makeGetSet('Milliseconds', false);\n\n // FORMATTING\n\n addFormatToken('z', 0, 0, 'zoneAbbr');\n addFormatToken('zz', 0, 0, 'zoneName');\n\n // MOMENTS\n\n function getZoneAbbr() {\n return this._isUTC ? 'UTC' : '';\n }\n\n function getZoneName() {\n return this._isUTC ? 'Coordinated Universal Time' : '';\n }\n\n var proto = Moment.prototype;\n\n proto.add = add;\n proto.calendar = calendar$1;\n proto.clone = clone;\n proto.diff = diff;\n proto.endOf = endOf;\n proto.format = format;\n proto.from = from;\n proto.fromNow = fromNow;\n proto.to = to;\n proto.toNow = toNow;\n proto.get = stringGet;\n proto.invalidAt = invalidAt;\n proto.isAfter = isAfter;\n proto.isBefore = isBefore;\n proto.isBetween = isBetween;\n proto.isSame = isSame;\n proto.isSameOrAfter = isSameOrAfter;\n proto.isSameOrBefore = isSameOrBefore;\n proto.isValid = isValid$2;\n proto.lang = lang;\n proto.locale = locale;\n proto.localeData = localeData;\n proto.max = prototypeMax;\n proto.min = prototypeMin;\n proto.parsingFlags = parsingFlags;\n proto.set = stringSet;\n proto.startOf = startOf;\n proto.subtract = subtract;\n proto.toArray = toArray;\n proto.toObject = toObject;\n proto.toDate = toDate;\n proto.toISOString = toISOString;\n proto.inspect = inspect;\n if (typeof Symbol !== 'undefined' && Symbol.for != null) {\n proto[Symbol.for('nodejs.util.inspect.custom')] = function () {\n return 'Moment<' + this.format() + '>';\n };\n }\n proto.toJSON = toJSON;\n proto.toString = toString;\n proto.unix = unix;\n proto.valueOf = valueOf;\n proto.creationData = creationData;\n proto.eraName = getEraName;\n proto.eraNarrow = getEraNarrow;\n proto.eraAbbr = getEraAbbr;\n proto.eraYear = getEraYear;\n proto.year = getSetYear;\n proto.isLeapYear = getIsLeapYear;\n proto.weekYear = getSetWeekYear;\n proto.isoWeekYear = getSetISOWeekYear;\n proto.quarter = proto.quarters = getSetQuarter;\n proto.month = getSetMonth;\n proto.daysInMonth = getDaysInMonth;\n proto.week = proto.weeks = getSetWeek;\n proto.isoWeek = proto.isoWeeks = getSetISOWeek;\n proto.weeksInYear = getWeeksInYear;\n proto.weeksInWeekYear = getWeeksInWeekYear;\n proto.isoWeeksInYear = getISOWeeksInYear;\n proto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear;\n proto.date = getSetDayOfMonth;\n proto.day = proto.days = getSetDayOfWeek;\n proto.weekday = getSetLocaleDayOfWeek;\n proto.isoWeekday = getSetISODayOfWeek;\n proto.dayOfYear = getSetDayOfYear;\n proto.hour = proto.hours = getSetHour;\n proto.minute = proto.minutes = getSetMinute;\n proto.second = proto.seconds = getSetSecond;\n proto.millisecond = proto.milliseconds = getSetMillisecond;\n proto.utcOffset = getSetOffset;\n proto.utc = setOffsetToUTC;\n proto.local = setOffsetToLocal;\n proto.parseZone = setOffsetToParsedOffset;\n proto.hasAlignedHourOffset = hasAlignedHourOffset;\n proto.isDST = isDaylightSavingTime;\n proto.isLocal = isLocal;\n proto.isUtcOffset = isUtcOffset;\n proto.isUtc = isUtc;\n proto.isUTC = isUtc;\n proto.zoneAbbr = getZoneAbbr;\n proto.zoneName = getZoneName;\n proto.dates = deprecate(\n 'dates accessor is deprecated. Use date instead.',\n getSetDayOfMonth\n );\n proto.months = deprecate(\n 'months accessor is deprecated. Use month instead',\n getSetMonth\n );\n proto.years = deprecate(\n 'years accessor is deprecated. Use year instead',\n getSetYear\n );\n proto.zone = deprecate(\n 'moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/',\n getSetZone\n );\n proto.isDSTShifted = deprecate(\n 'isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information',\n isDaylightSavingTimeShifted\n );\n\n function createUnix(input) {\n return createLocal(input * 1000);\n }\n\n function createInZone() {\n return createLocal.apply(null, arguments).parseZone();\n }\n\n function preParsePostFormat(string) {\n return string;\n }\n\n var proto$1 = Locale.prototype;\n\n proto$1.calendar = calendar;\n proto$1.longDateFormat = longDateFormat;\n proto$1.invalidDate = invalidDate;\n proto$1.ordinal = ordinal;\n proto$1.preparse = preParsePostFormat;\n proto$1.postformat = preParsePostFormat;\n proto$1.relativeTime = relativeTime;\n proto$1.pastFuture = pastFuture;\n proto$1.set = set;\n proto$1.eras = localeEras;\n proto$1.erasParse = localeErasParse;\n proto$1.erasConvertYear = localeErasConvertYear;\n proto$1.erasAbbrRegex = erasAbbrRegex;\n proto$1.erasNameRegex = erasNameRegex;\n proto$1.erasNarrowRegex = erasNarrowRegex;\n\n proto$1.months = localeMonths;\n proto$1.monthsShort = localeMonthsShort;\n proto$1.monthsParse = localeMonthsParse;\n proto$1.monthsRegex = monthsRegex;\n proto$1.monthsShortRegex = monthsShortRegex;\n proto$1.week = localeWeek;\n proto$1.firstDayOfYear = localeFirstDayOfYear;\n proto$1.firstDayOfWeek = localeFirstDayOfWeek;\n\n proto$1.weekdays = localeWeekdays;\n proto$1.weekdaysMin = localeWeekdaysMin;\n proto$1.weekdaysShort = localeWeekdaysShort;\n proto$1.weekdaysParse = localeWeekdaysParse;\n\n proto$1.weekdaysRegex = weekdaysRegex;\n proto$1.weekdaysShortRegex = weekdaysShortRegex;\n proto$1.weekdaysMinRegex = weekdaysMinRegex;\n\n proto$1.isPM = localeIsPM;\n proto$1.meridiem = localeMeridiem;\n\n function get$1(format, index, field, setter) {\n var locale = getLocale(),\n utc = createUTC().set(setter, index);\n return locale[field](utc, format);\n }\n\n function listMonthsImpl(format, index, field) {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n\n if (index != null) {\n return get$1(format, index, field, 'month');\n }\n\n var i,\n out = [];\n for (i = 0; i < 12; i++) {\n out[i] = get$1(format, i, field, 'month');\n }\n return out;\n }\n\n // ()\n // (5)\n // (fmt, 5)\n // (fmt)\n // (true)\n // (true, 5)\n // (true, fmt, 5)\n // (true, fmt)\n function listWeekdaysImpl(localeSorted, format, index, field) {\n if (typeof localeSorted === 'boolean') {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n } else {\n format = localeSorted;\n index = format;\n localeSorted = false;\n\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n }\n\n var locale = getLocale(),\n shift = localeSorted ? locale._week.dow : 0,\n i,\n out = [];\n\n if (index != null) {\n return get$1(format, (index + shift) % 7, field, 'day');\n }\n\n for (i = 0; i < 7; i++) {\n out[i] = get$1(format, (i + shift) % 7, field, 'day');\n }\n return out;\n }\n\n function listMonths(format, index) {\n return listMonthsImpl(format, index, 'months');\n }\n\n function listMonthsShort(format, index) {\n return listMonthsImpl(format, index, 'monthsShort');\n }\n\n function listWeekdays(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdays');\n }\n\n function listWeekdaysShort(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');\n }\n\n function listWeekdaysMin(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');\n }\n\n getSetGlobalLocale('en', {\n eras: [\n {\n since: '0001-01-01',\n until: +Infinity,\n offset: 1,\n name: 'Anno Domini',\n narrow: 'AD',\n abbr: 'AD',\n },\n {\n since: '0000-12-31',\n until: -Infinity,\n offset: 1,\n name: 'Before Christ',\n narrow: 'BC',\n abbr: 'BC',\n },\n ],\n dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n toInt((number % 100) / 10) === 1\n ? 'th'\n : b === 1\n ? 'st'\n : b === 2\n ? 'nd'\n : b === 3\n ? 'rd'\n : 'th';\n return number + output;\n },\n });\n\n // Side effect imports\n\n hooks.lang = deprecate(\n 'moment.lang is deprecated. Use moment.locale instead.',\n getSetGlobalLocale\n );\n hooks.langData = deprecate(\n 'moment.langData is deprecated. Use moment.localeData instead.',\n getLocale\n );\n\n var mathAbs = Math.abs;\n\n function abs() {\n var data = this._data;\n\n this._milliseconds = mathAbs(this._milliseconds);\n this._days = mathAbs(this._days);\n this._months = mathAbs(this._months);\n\n data.milliseconds = mathAbs(data.milliseconds);\n data.seconds = mathAbs(data.seconds);\n data.minutes = mathAbs(data.minutes);\n data.hours = mathAbs(data.hours);\n data.months = mathAbs(data.months);\n data.years = mathAbs(data.years);\n\n return this;\n }\n\n function addSubtract$1(duration, input, value, direction) {\n var other = createDuration(input, value);\n\n duration._milliseconds += direction * other._milliseconds;\n duration._days += direction * other._days;\n duration._months += direction * other._months;\n\n return duration._bubble();\n }\n\n // supports only 2.0-style add(1, 's') or add(duration)\n function add$1(input, value) {\n return addSubtract$1(this, input, value, 1);\n }\n\n // supports only 2.0-style subtract(1, 's') or subtract(duration)\n function subtract$1(input, value) {\n return addSubtract$1(this, input, value, -1);\n }\n\n function absCeil(number) {\n if (number < 0) {\n return Math.floor(number);\n } else {\n return Math.ceil(number);\n }\n }\n\n function bubble() {\n var milliseconds = this._milliseconds,\n days = this._days,\n months = this._months,\n data = this._data,\n seconds,\n minutes,\n hours,\n years,\n monthsFromDays;\n\n // if we have a mix of positive and negative values, bubble down first\n // check: https://github.com/moment/moment/issues/2166\n if (\n !(\n (milliseconds >= 0 && days >= 0 && months >= 0) ||\n (milliseconds <= 0 && days <= 0 && months <= 0)\n )\n ) {\n milliseconds += absCeil(monthsToDays(months) + days) * 864e5;\n days = 0;\n months = 0;\n }\n\n // The following code bubbles up values, see the tests for\n // examples of what that means.\n data.milliseconds = milliseconds % 1000;\n\n seconds = absFloor(milliseconds / 1000);\n data.seconds = seconds % 60;\n\n minutes = absFloor(seconds / 60);\n data.minutes = minutes % 60;\n\n hours = absFloor(minutes / 60);\n data.hours = hours % 24;\n\n days += absFloor(hours / 24);\n\n // convert days to months\n monthsFromDays = absFloor(daysToMonths(days));\n months += monthsFromDays;\n days -= absCeil(monthsToDays(monthsFromDays));\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n data.days = days;\n data.months = months;\n data.years = years;\n\n return this;\n }\n\n function daysToMonths(days) {\n // 400 years have 146097 days (taking into account leap year rules)\n // 400 years have 12 months === 4800\n return (days * 4800) / 146097;\n }\n\n function monthsToDays(months) {\n // the reverse of daysToMonths\n return (months * 146097) / 4800;\n }\n\n function as(units) {\n if (!this.isValid()) {\n return NaN;\n }\n var days,\n months,\n milliseconds = this._milliseconds;\n\n units = normalizeUnits(units);\n\n if (units === 'month' || units === 'quarter' || units === 'year') {\n days = this._days + milliseconds / 864e5;\n months = this._months + daysToMonths(days);\n switch (units) {\n case 'month':\n return months;\n case 'quarter':\n return months / 3;\n case 'year':\n return months / 12;\n }\n } else {\n // handle milliseconds separately because of floating point math errors (issue #1867)\n days = this._days + Math.round(monthsToDays(this._months));\n switch (units) {\n case 'week':\n return days / 7 + milliseconds / 6048e5;\n case 'day':\n return days + milliseconds / 864e5;\n case 'hour':\n return days * 24 + milliseconds / 36e5;\n case 'minute':\n return days * 1440 + milliseconds / 6e4;\n case 'second':\n return days * 86400 + milliseconds / 1000;\n // Math.floor prevents floating point math errors here\n case 'millisecond':\n return Math.floor(days * 864e5) + milliseconds;\n default:\n throw new Error('Unknown unit ' + units);\n }\n }\n }\n\n function makeAs(alias) {\n return function () {\n return this.as(alias);\n };\n }\n\n var asMilliseconds = makeAs('ms'),\n asSeconds = makeAs('s'),\n asMinutes = makeAs('m'),\n asHours = makeAs('h'),\n asDays = makeAs('d'),\n asWeeks = makeAs('w'),\n asMonths = makeAs('M'),\n asQuarters = makeAs('Q'),\n asYears = makeAs('y'),\n valueOf$1 = asMilliseconds;\n\n function clone$1() {\n return createDuration(this);\n }\n\n function get$2(units) {\n units = normalizeUnits(units);\n return this.isValid() ? this[units + 's']() : NaN;\n }\n\n function makeGetter(name) {\n return function () {\n return this.isValid() ? this._data[name] : NaN;\n };\n }\n\n var milliseconds = makeGetter('milliseconds'),\n seconds = makeGetter('seconds'),\n minutes = makeGetter('minutes'),\n hours = makeGetter('hours'),\n days = makeGetter('days'),\n months = makeGetter('months'),\n years = makeGetter('years');\n\n function weeks() {\n return absFloor(this.days() / 7);\n }\n\n var round = Math.round,\n thresholds = {\n ss: 44, // a few seconds to seconds\n s: 45, // seconds to minute\n m: 45, // minutes to hour\n h: 22, // hours to day\n d: 26, // days to month/week\n w: null, // weeks to month\n M: 11, // months to year\n };\n\n // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize\n function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {\n return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);\n }\n\n function relativeTime$1(posNegDuration, withoutSuffix, thresholds, locale) {\n var duration = createDuration(posNegDuration).abs(),\n seconds = round(duration.as('s')),\n minutes = round(duration.as('m')),\n hours = round(duration.as('h')),\n days = round(duration.as('d')),\n months = round(duration.as('M')),\n weeks = round(duration.as('w')),\n years = round(duration.as('y')),\n a =\n (seconds <= thresholds.ss && ['s', seconds]) ||\n (seconds < thresholds.s && ['ss', seconds]) ||\n (minutes <= 1 && ['m']) ||\n (minutes < thresholds.m && ['mm', minutes]) ||\n (hours <= 1 && ['h']) ||\n (hours < thresholds.h && ['hh', hours]) ||\n (days <= 1 && ['d']) ||\n (days < thresholds.d && ['dd', days]);\n\n if (thresholds.w != null) {\n a =\n a ||\n (weeks <= 1 && ['w']) ||\n (weeks < thresholds.w && ['ww', weeks]);\n }\n a = a ||\n (months <= 1 && ['M']) ||\n (months < thresholds.M && ['MM', months]) ||\n (years <= 1 && ['y']) || ['yy', years];\n\n a[2] = withoutSuffix;\n a[3] = +posNegDuration > 0;\n a[4] = locale;\n return substituteTimeAgo.apply(null, a);\n }\n\n // This function allows you to set the rounding function for relative time strings\n function getSetRelativeTimeRounding(roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof roundingFunction === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n }\n\n // This function allows you to set a threshold for relative time strings\n function getSetRelativeTimeThreshold(threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }\n\n function humanize(argWithSuffix, argThresholds) {\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var withSuffix = false,\n th = thresholds,\n locale,\n output;\n\n if (typeof argWithSuffix === 'object') {\n argThresholds = argWithSuffix;\n argWithSuffix = false;\n }\n if (typeof argWithSuffix === 'boolean') {\n withSuffix = argWithSuffix;\n }\n if (typeof argThresholds === 'object') {\n th = Object.assign({}, thresholds, argThresholds);\n if (argThresholds.s != null && argThresholds.ss == null) {\n th.ss = argThresholds.s - 1;\n }\n }\n\n locale = this.localeData();\n output = relativeTime$1(this, !withSuffix, th, locale);\n\n if (withSuffix) {\n output = locale.pastFuture(+this, output);\n }\n\n return locale.postformat(output);\n }\n\n var abs$1 = Math.abs;\n\n function sign(x) {\n return (x > 0) - (x < 0) || +x;\n }\n\n function toISOString$1() {\n // for ISO strings we do not use the normal bubbling rules:\n // * milliseconds bubble up until they become hours\n // * days do not bubble at all\n // * months bubble up until they become years\n // This is because there is no context-free conversion between hours and days\n // (think of clock changes)\n // and also not between days and months (28-31 days per month)\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var seconds = abs$1(this._milliseconds) / 1000,\n days = abs$1(this._days),\n months = abs$1(this._months),\n minutes,\n hours,\n years,\n s,\n total = this.asSeconds(),\n totalSign,\n ymSign,\n daysSign,\n hmsSign;\n\n if (!total) {\n // this is the same as C#'s (Noda) and python (isodate)...\n // but not other JS (goog.date)\n return 'P0D';\n }\n\n // 3600 seconds -> 60 minutes -> 1 hour\n minutes = absFloor(seconds / 60);\n hours = absFloor(minutes / 60);\n seconds %= 60;\n minutes %= 60;\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js\n s = seconds ? seconds.toFixed(3).replace(/\\.?0+$/, '') : '';\n\n totalSign = total < 0 ? '-' : '';\n ymSign = sign(this._months) !== sign(total) ? '-' : '';\n daysSign = sign(this._days) !== sign(total) ? '-' : '';\n hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';\n\n return (\n totalSign +\n 'P' +\n (years ? ymSign + years + 'Y' : '') +\n (months ? ymSign + months + 'M' : '') +\n (days ? daysSign + days + 'D' : '') +\n (hours || minutes || seconds ? 'T' : '') +\n (hours ? hmsSign + hours + 'H' : '') +\n (minutes ? hmsSign + minutes + 'M' : '') +\n (seconds ? hmsSign + s + 'S' : '')\n );\n }\n\n var proto$2 = Duration.prototype;\n\n proto$2.isValid = isValid$1;\n proto$2.abs = abs;\n proto$2.add = add$1;\n proto$2.subtract = subtract$1;\n proto$2.as = as;\n proto$2.asMilliseconds = asMilliseconds;\n proto$2.asSeconds = asSeconds;\n proto$2.asMinutes = asMinutes;\n proto$2.asHours = asHours;\n proto$2.asDays = asDays;\n proto$2.asWeeks = asWeeks;\n proto$2.asMonths = asMonths;\n proto$2.asQuarters = asQuarters;\n proto$2.asYears = asYears;\n proto$2.valueOf = valueOf$1;\n proto$2._bubble = bubble;\n proto$2.clone = clone$1;\n proto$2.get = get$2;\n proto$2.milliseconds = milliseconds;\n proto$2.seconds = seconds;\n proto$2.minutes = minutes;\n proto$2.hours = hours;\n proto$2.days = days;\n proto$2.weeks = weeks;\n proto$2.months = months;\n proto$2.years = years;\n proto$2.humanize = humanize;\n proto$2.toISOString = toISOString$1;\n proto$2.toString = toISOString$1;\n proto$2.toJSON = toISOString$1;\n proto$2.locale = locale;\n proto$2.localeData = localeData;\n\n proto$2.toIsoString = deprecate(\n 'toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)',\n toISOString$1\n );\n proto$2.lang = lang;\n\n // FORMATTING\n\n addFormatToken('X', 0, 0, 'unix');\n addFormatToken('x', 0, 0, 'valueOf');\n\n // PARSING\n\n addRegexToken('x', matchSigned);\n addRegexToken('X', matchTimestamp);\n addParseToken('X', function (input, array, config) {\n config._d = new Date(parseFloat(input) * 1000);\n });\n addParseToken('x', function (input, array, config) {\n config._d = new Date(toInt(input));\n });\n\n //! moment.js\n\n hooks.version = '2.30.1';\n\n setHookCallback(createLocal);\n\n hooks.fn = proto;\n hooks.min = min;\n hooks.max = max;\n hooks.now = now;\n hooks.utc = createUTC;\n hooks.unix = createUnix;\n hooks.months = listMonths;\n hooks.isDate = isDate;\n hooks.locale = getSetGlobalLocale;\n hooks.invalid = createInvalid;\n hooks.duration = createDuration;\n hooks.isMoment = isMoment;\n hooks.weekdays = listWeekdays;\n hooks.parseZone = createInZone;\n hooks.localeData = getLocale;\n hooks.isDuration = isDuration;\n hooks.monthsShort = listMonthsShort;\n hooks.weekdaysMin = listWeekdaysMin;\n hooks.defineLocale = defineLocale;\n hooks.updateLocale = updateLocale;\n hooks.locales = listLocales;\n hooks.weekdaysShort = listWeekdaysShort;\n hooks.normalizeUnits = normalizeUnits;\n hooks.relativeTimeRounding = getSetRelativeTimeRounding;\n hooks.relativeTimeThreshold = getSetRelativeTimeThreshold;\n hooks.calendarFormat = getCalendarFormat;\n hooks.prototype = proto;\n\n // currently HTML5 input type only supports 24-hour formats\n hooks.HTML5_FMT = {\n DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // <input type=\"datetime-local\" />\n DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // <input type=\"datetime-local\" step=\"1\" />\n DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // <input type=\"datetime-local\" step=\"0.001\" />\n DATE: 'YYYY-MM-DD', // <input type=\"date\" />\n TIME: 'HH:mm', // <input type=\"time\" />\n TIME_SECONDS: 'HH:mm:ss', // <input type=\"time\" step=\"1\" />\n TIME_MS: 'HH:mm:ss.SSS', // <input type=\"time\" step=\"0.001\" />\n WEEK: 'GGGG-[W]WW', // <input type=\"week\" />\n MONTH: 'YYYY-MM', // <input type=\"month\" />\n };\n\n return hooks;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/moment.js?", + ); + + /***/ + }, + + /***/ 2128: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + 'use strict'; + eval( + '\n\nvar punycode = __webpack_require__(4876);\nvar mappingTable = __webpack_require__(7963);\n\nvar PROCESSING_OPTIONS = {\n TRANSITIONAL: 0,\n NONTRANSITIONAL: 1\n};\n\nfunction normalize(str) { // fix bug in v8\n return str.split(\'\\u0000\').map(function (s) { return s.normalize(\'NFC\'); }).join(\'\\u0000\');\n}\n\nfunction findStatus(val) {\n var start = 0;\n var end = mappingTable.length - 1;\n\n while (start <= end) {\n var mid = Math.floor((start + end) / 2);\n\n var target = mappingTable[mid];\n if (target[0][0] <= val && target[0][1] >= val) {\n return target;\n } else if (target[0][0] > val) {\n end = mid - 1;\n } else {\n start = mid + 1;\n }\n }\n\n return null;\n}\n\nvar regexAstralSymbols = /[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/g;\n\nfunction countSymbols(string) {\n return string\n // replace every surrogate pair with a BMP symbol\n .replace(regexAstralSymbols, \'_\')\n // then get the length\n .length;\n}\n\nfunction mapChars(domain_name, useSTD3, processing_option) {\n var hasError = false;\n var processed = "";\n\n var len = countSymbols(domain_name);\n for (var i = 0; i < len; ++i) {\n var codePoint = domain_name.codePointAt(i);\n var status = findStatus(codePoint);\n\n switch (status[1]) {\n case "disallowed":\n hasError = true;\n processed += String.fromCodePoint(codePoint);\n break;\n case "ignored":\n break;\n case "mapped":\n processed += String.fromCodePoint.apply(String, status[2]);\n break;\n case "deviation":\n if (processing_option === PROCESSING_OPTIONS.TRANSITIONAL) {\n processed += String.fromCodePoint.apply(String, status[2]);\n } else {\n processed += String.fromCodePoint(codePoint);\n }\n break;\n case "valid":\n processed += String.fromCodePoint(codePoint);\n break;\n case "disallowed_STD3_mapped":\n if (useSTD3) {\n hasError = true;\n processed += String.fromCodePoint(codePoint);\n } else {\n processed += String.fromCodePoint.apply(String, status[2]);\n }\n break;\n case "disallowed_STD3_valid":\n if (useSTD3) {\n hasError = true;\n }\n\n processed += String.fromCodePoint(codePoint);\n break;\n }\n }\n\n return {\n string: processed,\n error: hasError\n };\n}\n\nvar combiningMarksRegex = /[\\u0300-\\u036F\\u0483-\\u0489\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u0610-\\u061A\\u064B-\\u065F\\u0670\\u06D6-\\u06DC\\u06DF-\\u06E4\\u06E7\\u06E8\\u06EA-\\u06ED\\u0711\\u0730-\\u074A\\u07A6-\\u07B0\\u07EB-\\u07F3\\u0816-\\u0819\\u081B-\\u0823\\u0825-\\u0827\\u0829-\\u082D\\u0859-\\u085B\\u08E4-\\u0903\\u093A-\\u093C\\u093E-\\u094F\\u0951-\\u0957\\u0962\\u0963\\u0981-\\u0983\\u09BC\\u09BE-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CD\\u09D7\\u09E2\\u09E3\\u0A01-\\u0A03\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A70\\u0A71\\u0A75\\u0A81-\\u0A83\\u0ABC\\u0ABE-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AE2\\u0AE3\\u0B01-\\u0B03\\u0B3C\\u0B3E-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B56\\u0B57\\u0B62\\u0B63\\u0B82\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD7\\u0C00-\\u0C03\\u0C3E-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C62\\u0C63\\u0C81-\\u0C83\\u0CBC\\u0CBE-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0CE2\\u0CE3\\u0D01-\\u0D03\\u0D3E-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4D\\u0D57\\u0D62\\u0D63\\u0D82\\u0D83\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DF2\\u0DF3\\u0E31\\u0E34-\\u0E3A\\u0E47-\\u0E4E\\u0EB1\\u0EB4-\\u0EB9\\u0EBB\\u0EBC\\u0EC8-\\u0ECD\\u0F18\\u0F19\\u0F35\\u0F37\\u0F39\\u0F3E\\u0F3F\\u0F71-\\u0F84\\u0F86\\u0F87\\u0F8D-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u102B-\\u103E\\u1056-\\u1059\\u105E-\\u1060\\u1062-\\u1064\\u1067-\\u106D\\u1071-\\u1074\\u1082-\\u108D\\u108F\\u109A-\\u109D\\u135D-\\u135F\\u1712-\\u1714\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17B4-\\u17D3\\u17DD\\u180B-\\u180D\\u18A9\\u1920-\\u192B\\u1930-\\u193B\\u19B0-\\u19C0\\u19C8\\u19C9\\u1A17-\\u1A1B\\u1A55-\\u1A5E\\u1A60-\\u1A7C\\u1A7F\\u1AB0-\\u1ABE\\u1B00-\\u1B04\\u1B34-\\u1B44\\u1B6B-\\u1B73\\u1B80-\\u1B82\\u1BA1-\\u1BAD\\u1BE6-\\u1BF3\\u1C24-\\u1C37\\u1CD0-\\u1CD2\\u1CD4-\\u1CE8\\u1CED\\u1CF2-\\u1CF4\\u1CF8\\u1CF9\\u1DC0-\\u1DF5\\u1DFC-\\u1DFF\\u20D0-\\u20F0\\u2CEF-\\u2CF1\\u2D7F\\u2DE0-\\u2DFF\\u302A-\\u302F\\u3099\\u309A\\uA66F-\\uA672\\uA674-\\uA67D\\uA69F\\uA6F0\\uA6F1\\uA802\\uA806\\uA80B\\uA823-\\uA827\\uA880\\uA881\\uA8B4-\\uA8C4\\uA8E0-\\uA8F1\\uA926-\\uA92D\\uA947-\\uA953\\uA980-\\uA983\\uA9B3-\\uA9C0\\uA9E5\\uAA29-\\uAA36\\uAA43\\uAA4C\\uAA4D\\uAA7B-\\uAA7D\\uAAB0\\uAAB2-\\uAAB4\\uAAB7\\uAAB8\\uAABE\\uAABF\\uAAC1\\uAAEB-\\uAAEF\\uAAF5\\uAAF6\\uABE3-\\uABEA\\uABEC\\uABED\\uFB1E\\uFE00-\\uFE0F\\uFE20-\\uFE2D]|\\uD800[\\uDDFD\\uDEE0\\uDF76-\\uDF7A]|\\uD802[\\uDE01-\\uDE03\\uDE05\\uDE06\\uDE0C-\\uDE0F\\uDE38-\\uDE3A\\uDE3F\\uDEE5\\uDEE6]|\\uD804[\\uDC00-\\uDC02\\uDC38-\\uDC46\\uDC7F-\\uDC82\\uDCB0-\\uDCBA\\uDD00-\\uDD02\\uDD27-\\uDD34\\uDD73\\uDD80-\\uDD82\\uDDB3-\\uDDC0\\uDE2C-\\uDE37\\uDEDF-\\uDEEA\\uDF01-\\uDF03\\uDF3C\\uDF3E-\\uDF44\\uDF47\\uDF48\\uDF4B-\\uDF4D\\uDF57\\uDF62\\uDF63\\uDF66-\\uDF6C\\uDF70-\\uDF74]|\\uD805[\\uDCB0-\\uDCC3\\uDDAF-\\uDDB5\\uDDB8-\\uDDC0\\uDE30-\\uDE40\\uDEAB-\\uDEB7]|\\uD81A[\\uDEF0-\\uDEF4\\uDF30-\\uDF36]|\\uD81B[\\uDF51-\\uDF7E\\uDF8F-\\uDF92]|\\uD82F[\\uDC9D\\uDC9E]|\\uD834[\\uDD65-\\uDD69\\uDD6D-\\uDD72\\uDD7B-\\uDD82\\uDD85-\\uDD8B\\uDDAA-\\uDDAD\\uDE42-\\uDE44]|\\uD83A[\\uDCD0-\\uDCD6]|\\uDB40[\\uDD00-\\uDDEF]/;\n\nfunction validateLabel(label, processing_option) {\n if (label.substr(0, 4) === "xn--") {\n label = punycode.toUnicode(label);\n processing_option = PROCESSING_OPTIONS.NONTRANSITIONAL;\n }\n\n var error = false;\n\n if (normalize(label) !== label ||\n (label[3] === "-" && label[4] === "-") ||\n label[0] === "-" || label[label.length - 1] === "-" ||\n label.indexOf(".") !== -1 ||\n label.search(combiningMarksRegex) === 0) {\n error = true;\n }\n\n var len = countSymbols(label);\n for (var i = 0; i < len; ++i) {\n var status = findStatus(label.codePointAt(i));\n if ((processing === PROCESSING_OPTIONS.TRANSITIONAL && status[1] !== "valid") ||\n (processing === PROCESSING_OPTIONS.NONTRANSITIONAL &&\n status[1] !== "valid" && status[1] !== "deviation")) {\n error = true;\n break;\n }\n }\n\n return {\n label: label,\n error: error\n };\n}\n\nfunction processing(domain_name, useSTD3, processing_option) {\n var result = mapChars(domain_name, useSTD3, processing_option);\n result.string = normalize(result.string);\n\n var labels = result.string.split(".");\n for (var i = 0; i < labels.length; ++i) {\n try {\n var validation = validateLabel(labels[i]);\n labels[i] = validation.label;\n result.error = result.error || validation.error;\n } catch(e) {\n result.error = true;\n }\n }\n\n return {\n string: labels.join("."),\n error: result.error\n };\n}\n\nmodule.exports.toASCII = function(domain_name, useSTD3, processing_option, verifyDnsLength) {\n var result = processing(domain_name, useSTD3, processing_option);\n var labels = result.string.split(".");\n labels = labels.map(function(l) {\n try {\n return punycode.toASCII(l);\n } catch(e) {\n result.error = true;\n return l;\n }\n });\n\n if (verifyDnsLength) {\n var total = labels.slice(0, labels.length - 1).join(".").length;\n if (total.length > 253 || total.length === 0) {\n result.error = true;\n }\n\n for (var i=0; i < labels.length; ++i) {\n if (labels.length > 63 || labels.length === 0) {\n result.error = true;\n break;\n }\n }\n }\n\n if (result.error) return null;\n return labels.join(".");\n};\n\nmodule.exports.toUnicode = function(domain_name, useSTD3) {\n var result = processing(domain_name, useSTD3, PROCESSING_OPTIONS.NONTRANSITIONAL);\n\n return {\n domain: result.string,\n error: result.error\n };\n};\n\nmodule.exports.PROCESSING_OPTIONS = PROCESSING_OPTIONS;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/node-fetch/node_modules/tr46/index.js?', + ); + + /***/ + }, + + /***/ 1461: /***/ (module) => { + 'use strict'; + eval( + '\n\nvar conversions = {};\nmodule.exports = conversions;\n\nfunction sign(x) {\n return x < 0 ? -1 : 1;\n}\n\nfunction evenRound(x) {\n // Round x to the nearest integer, choosing the even integer if it lies halfway between two.\n if ((x % 1) === 0.5 && (x & 1) === 0) { // [even number].5; round down (i.e. floor)\n return Math.floor(x);\n } else {\n return Math.round(x);\n }\n}\n\nfunction createNumberConversion(bitLength, typeOpts) {\n if (!typeOpts.unsigned) {\n --bitLength;\n }\n const lowerBound = typeOpts.unsigned ? 0 : -Math.pow(2, bitLength);\n const upperBound = Math.pow(2, bitLength) - 1;\n\n const moduloVal = typeOpts.moduloBitLength ? Math.pow(2, typeOpts.moduloBitLength) : Math.pow(2, bitLength);\n const moduloBound = typeOpts.moduloBitLength ? Math.pow(2, typeOpts.moduloBitLength - 1) : Math.pow(2, bitLength - 1);\n\n return function(V, opts) {\n if (!opts) opts = {};\n\n let x = +V;\n\n if (opts.enforceRange) {\n if (!Number.isFinite(x)) {\n throw new TypeError("Argument is not a finite number");\n }\n\n x = sign(x) * Math.floor(Math.abs(x));\n if (x < lowerBound || x > upperBound) {\n throw new TypeError("Argument is not in byte range");\n }\n\n return x;\n }\n\n if (!isNaN(x) && opts.clamp) {\n x = evenRound(x);\n\n if (x < lowerBound) x = lowerBound;\n if (x > upperBound) x = upperBound;\n return x;\n }\n\n if (!Number.isFinite(x) || x === 0) {\n return 0;\n }\n\n x = sign(x) * Math.floor(Math.abs(x));\n x = x % moduloVal;\n\n if (!typeOpts.unsigned && x >= moduloBound) {\n return x - moduloVal;\n } else if (typeOpts.unsigned) {\n if (x < 0) {\n x += moduloVal;\n } else if (x === -0) { // don\'t return negative zero\n return 0;\n }\n }\n\n return x;\n }\n}\n\nconversions["void"] = function () {\n return undefined;\n};\n\nconversions["boolean"] = function (val) {\n return !!val;\n};\n\nconversions["byte"] = createNumberConversion(8, { unsigned: false });\nconversions["octet"] = createNumberConversion(8, { unsigned: true });\n\nconversions["short"] = createNumberConversion(16, { unsigned: false });\nconversions["unsigned short"] = createNumberConversion(16, { unsigned: true });\n\nconversions["long"] = createNumberConversion(32, { unsigned: false });\nconversions["unsigned long"] = createNumberConversion(32, { unsigned: true });\n\nconversions["long long"] = createNumberConversion(32, { unsigned: false, moduloBitLength: 64 });\nconversions["unsigned long long"] = createNumberConversion(32, { unsigned: true, moduloBitLength: 64 });\n\nconversions["double"] = function (V) {\n const x = +V;\n\n if (!Number.isFinite(x)) {\n throw new TypeError("Argument is not a finite floating-point value");\n }\n\n return x;\n};\n\nconversions["unrestricted double"] = function (V) {\n const x = +V;\n\n if (isNaN(x)) {\n throw new TypeError("Argument is NaN");\n }\n\n return x;\n};\n\n// not quite valid, but good enough for JS\nconversions["float"] = conversions["double"];\nconversions["unrestricted float"] = conversions["unrestricted double"];\n\nconversions["DOMString"] = function (V, opts) {\n if (!opts) opts = {};\n\n if (opts.treatNullAsEmptyString && V === null) {\n return "";\n }\n\n return String(V);\n};\n\nconversions["ByteString"] = function (V, opts) {\n const x = String(V);\n let c = undefined;\n for (let i = 0; (c = x.codePointAt(i)) !== undefined; ++i) {\n if (c > 255) {\n throw new TypeError("Argument is not a valid bytestring");\n }\n }\n\n return x;\n};\n\nconversions["USVString"] = function (V) {\n const S = String(V);\n const n = S.length;\n const U = [];\n for (let i = 0; i < n; ++i) {\n const c = S.charCodeAt(i);\n if (c < 0xD800 || c > 0xDFFF) {\n U.push(String.fromCodePoint(c));\n } else if (0xDC00 <= c && c <= 0xDFFF) {\n U.push(String.fromCodePoint(0xFFFD));\n } else {\n if (i === n - 1) {\n U.push(String.fromCodePoint(0xFFFD));\n } else {\n const d = S.charCodeAt(i + 1);\n if (0xDC00 <= d && d <= 0xDFFF) {\n const a = c & 0x3FF;\n const b = d & 0x3FF;\n U.push(String.fromCodePoint((2 << 15) + (2 << 9) * a + b));\n ++i;\n } else {\n U.push(String.fromCodePoint(0xFFFD));\n }\n }\n }\n }\n\n return U.join(\'\');\n};\n\nconversions["Date"] = function (V, opts) {\n if (!(V instanceof Date)) {\n throw new TypeError("Argument is not a Date object");\n }\n if (isNaN(V)) {\n return undefined;\n }\n\n return V;\n};\n\nconversions["RegExp"] = function (V, opts) {\n if (!(V instanceof RegExp)) {\n V = new RegExp(V);\n }\n\n return V;\n};\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/node-fetch/node_modules/webidl-conversions/lib/index.js?', + ); + + /***/ + }, + + /***/ 8832: /***/ (__unused_webpack_module, exports, __webpack_require__) => { + 'use strict'; + eval( + '\nconst usm = __webpack_require__(4569);\n\nexports.implementation = class URLImpl {\n constructor(constructorArgs) {\n const url = constructorArgs[0];\n const base = constructorArgs[1];\n\n let parsedBase = null;\n if (base !== undefined) {\n parsedBase = usm.basicURLParse(base);\n if (parsedBase === "failure") {\n throw new TypeError("Invalid base URL");\n }\n }\n\n const parsedURL = usm.basicURLParse(url, { baseURL: parsedBase });\n if (parsedURL === "failure") {\n throw new TypeError("Invalid URL");\n }\n\n this._url = parsedURL;\n\n // TODO: query stuff\n }\n\n get href() {\n return usm.serializeURL(this._url);\n }\n\n set href(v) {\n const parsedURL = usm.basicURLParse(v);\n if (parsedURL === "failure") {\n throw new TypeError("Invalid URL");\n }\n\n this._url = parsedURL;\n }\n\n get origin() {\n return usm.serializeURLOrigin(this._url);\n }\n\n get protocol() {\n return this._url.scheme + ":";\n }\n\n set protocol(v) {\n usm.basicURLParse(v + ":", { url: this._url, stateOverride: "scheme start" });\n }\n\n get username() {\n return this._url.username;\n }\n\n set username(v) {\n if (usm.cannotHaveAUsernamePasswordPort(this._url)) {\n return;\n }\n\n usm.setTheUsername(this._url, v);\n }\n\n get password() {\n return this._url.password;\n }\n\n set password(v) {\n if (usm.cannotHaveAUsernamePasswordPort(this._url)) {\n return;\n }\n\n usm.setThePassword(this._url, v);\n }\n\n get host() {\n const url = this._url;\n\n if (url.host === null) {\n return "";\n }\n\n if (url.port === null) {\n return usm.serializeHost(url.host);\n }\n\n return usm.serializeHost(url.host) + ":" + usm.serializeInteger(url.port);\n }\n\n set host(v) {\n if (this._url.cannotBeABaseURL) {\n return;\n }\n\n usm.basicURLParse(v, { url: this._url, stateOverride: "host" });\n }\n\n get hostname() {\n if (this._url.host === null) {\n return "";\n }\n\n return usm.serializeHost(this._url.host);\n }\n\n set hostname(v) {\n if (this._url.cannotBeABaseURL) {\n return;\n }\n\n usm.basicURLParse(v, { url: this._url, stateOverride: "hostname" });\n }\n\n get port() {\n if (this._url.port === null) {\n return "";\n }\n\n return usm.serializeInteger(this._url.port);\n }\n\n set port(v) {\n if (usm.cannotHaveAUsernamePasswordPort(this._url)) {\n return;\n }\n\n if (v === "") {\n this._url.port = null;\n } else {\n usm.basicURLParse(v, { url: this._url, stateOverride: "port" });\n }\n }\n\n get pathname() {\n if (this._url.cannotBeABaseURL) {\n return this._url.path[0];\n }\n\n if (this._url.path.length === 0) {\n return "";\n }\n\n return "/" + this._url.path.join("/");\n }\n\n set pathname(v) {\n if (this._url.cannotBeABaseURL) {\n return;\n }\n\n this._url.path = [];\n usm.basicURLParse(v, { url: this._url, stateOverride: "path start" });\n }\n\n get search() {\n if (this._url.query === null || this._url.query === "") {\n return "";\n }\n\n return "?" + this._url.query;\n }\n\n set search(v) {\n // TODO: query stuff\n\n const url = this._url;\n\n if (v === "") {\n url.query = null;\n return;\n }\n\n const input = v[0] === "?" ? v.substring(1) : v;\n url.query = "";\n usm.basicURLParse(input, { url, stateOverride: "query" });\n }\n\n get hash() {\n if (this._url.fragment === null || this._url.fragment === "") {\n return "";\n }\n\n return "#" + this._url.fragment;\n }\n\n set hash(v) {\n if (v === "") {\n this._url.fragment = null;\n return;\n }\n\n const input = v[0] === "#" ? v.substring(1) : v;\n this._url.fragment = "";\n usm.basicURLParse(input, { url: this._url, stateOverride: "fragment" });\n }\n\n toJSON() {\n return this.href;\n }\n};\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/node-fetch/node_modules/whatwg-url/lib/URL-impl.js?', + ); + + /***/ + }, + + /***/ 8265: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + 'use strict'; + eval( + '\n\nconst conversions = __webpack_require__(1461);\nconst utils = __webpack_require__(8673);\nconst Impl = __webpack_require__(8832);\n\nconst impl = utils.implSymbol;\n\nfunction URL(url) {\n if (!this || this[impl] || !(this instanceof URL)) {\n throw new TypeError("Failed to construct \'URL\': Please use the \'new\' operator, this DOM object constructor cannot be called as a function.");\n }\n if (arguments.length < 1) {\n throw new TypeError("Failed to construct \'URL\': 1 argument required, but only " + arguments.length + " present.");\n }\n const args = [];\n for (let i = 0; i < arguments.length && i < 2; ++i) {\n args[i] = arguments[i];\n }\n args[0] = conversions["USVString"](args[0]);\n if (args[1] !== undefined) {\n args[1] = conversions["USVString"](args[1]);\n }\n\n module.exports.setup(this, args);\n}\n\nURL.prototype.toJSON = function toJSON() {\n if (!this || !module.exports.is(this)) {\n throw new TypeError("Illegal invocation");\n }\n const args = [];\n for (let i = 0; i < arguments.length && i < 0; ++i) {\n args[i] = arguments[i];\n }\n return this[impl].toJSON.apply(this[impl], args);\n};\nObject.defineProperty(URL.prototype, "href", {\n get() {\n return this[impl].href;\n },\n set(V) {\n V = conversions["USVString"](V);\n this[impl].href = V;\n },\n enumerable: true,\n configurable: true\n});\n\nURL.prototype.toString = function () {\n if (!this || !module.exports.is(this)) {\n throw new TypeError("Illegal invocation");\n }\n return this.href;\n};\n\nObject.defineProperty(URL.prototype, "origin", {\n get() {\n return this[impl].origin;\n },\n enumerable: true,\n configurable: true\n});\n\nObject.defineProperty(URL.prototype, "protocol", {\n get() {\n return this[impl].protocol;\n },\n set(V) {\n V = conversions["USVString"](V);\n this[impl].protocol = V;\n },\n enumerable: true,\n configurable: true\n});\n\nObject.defineProperty(URL.prototype, "username", {\n get() {\n return this[impl].username;\n },\n set(V) {\n V = conversions["USVString"](V);\n this[impl].username = V;\n },\n enumerable: true,\n configurable: true\n});\n\nObject.defineProperty(URL.prototype, "password", {\n get() {\n return this[impl].password;\n },\n set(V) {\n V = conversions["USVString"](V);\n this[impl].password = V;\n },\n enumerable: true,\n configurable: true\n});\n\nObject.defineProperty(URL.prototype, "host", {\n get() {\n return this[impl].host;\n },\n set(V) {\n V = conversions["USVString"](V);\n this[impl].host = V;\n },\n enumerable: true,\n configurable: true\n});\n\nObject.defineProperty(URL.prototype, "hostname", {\n get() {\n return this[impl].hostname;\n },\n set(V) {\n V = conversions["USVString"](V);\n this[impl].hostname = V;\n },\n enumerable: true,\n configurable: true\n});\n\nObject.defineProperty(URL.prototype, "port", {\n get() {\n return this[impl].port;\n },\n set(V) {\n V = conversions["USVString"](V);\n this[impl].port = V;\n },\n enumerable: true,\n configurable: true\n});\n\nObject.defineProperty(URL.prototype, "pathname", {\n get() {\n return this[impl].pathname;\n },\n set(V) {\n V = conversions["USVString"](V);\n this[impl].pathname = V;\n },\n enumerable: true,\n configurable: true\n});\n\nObject.defineProperty(URL.prototype, "search", {\n get() {\n return this[impl].search;\n },\n set(V) {\n V = conversions["USVString"](V);\n this[impl].search = V;\n },\n enumerable: true,\n configurable: true\n});\n\nObject.defineProperty(URL.prototype, "hash", {\n get() {\n return this[impl].hash;\n },\n set(V) {\n V = conversions["USVString"](V);\n this[impl].hash = V;\n },\n enumerable: true,\n configurable: true\n});\n\n\nmodule.exports = {\n is(obj) {\n return !!obj && obj[impl] instanceof Impl.implementation;\n },\n create(constructorArgs, privateData) {\n let obj = Object.create(URL.prototype);\n this.setup(obj, constructorArgs, privateData);\n return obj;\n },\n setup(obj, constructorArgs, privateData) {\n if (!privateData) privateData = {};\n privateData.wrapper = obj;\n\n obj[impl] = new Impl.implementation(constructorArgs, privateData);\n obj[impl][utils.wrapperSymbol] = obj;\n },\n interface: URL,\n expose: {\n Window: { URL: URL },\n Worker: { URL: URL }\n }\n};\n\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/node-fetch/node_modules/whatwg-url/lib/URL.js?', + ); + + /***/ + }, + + /***/ 6862: /***/ (__unused_webpack_module, exports, __webpack_require__) => { + 'use strict'; + eval( + '\n\nexports.URL = __webpack_require__(8265)["interface"];\n/* unused reexport */ __webpack_require__(4569).serializeURL;\n/* unused reexport */ __webpack_require__(4569).serializeURLOrigin;\n/* unused reexport */ __webpack_require__(4569).basicURLParse;\n/* unused reexport */ __webpack_require__(4569).setTheUsername;\n/* unused reexport */ __webpack_require__(4569).setThePassword;\n/* unused reexport */ __webpack_require__(4569).serializeHost;\n/* unused reexport */ __webpack_require__(4569).serializeInteger;\n/* unused reexport */ __webpack_require__(4569).parseURL;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/node-fetch/node_modules/whatwg-url/lib/public-api.js?', + ); + + /***/ + }, + + /***/ 4569: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + 'use strict'; + eval( + '\r\nconst punycode = __webpack_require__(4876);\r\nconst tr46 = __webpack_require__(2128);\r\n\r\nconst specialSchemes = {\r\n ftp: 21,\r\n file: null,\r\n gopher: 70,\r\n http: 80,\r\n https: 443,\r\n ws: 80,\r\n wss: 443\r\n};\r\n\r\nconst failure = Symbol("failure");\r\n\r\nfunction countSymbols(str) {\r\n return punycode.ucs2.decode(str).length;\r\n}\r\n\r\nfunction at(input, idx) {\r\n const c = input[idx];\r\n return isNaN(c) ? undefined : String.fromCodePoint(c);\r\n}\r\n\r\nfunction isASCIIDigit(c) {\r\n return c >= 0x30 && c <= 0x39;\r\n}\r\n\r\nfunction isASCIIAlpha(c) {\r\n return (c >= 0x41 && c <= 0x5A) || (c >= 0x61 && c <= 0x7A);\r\n}\r\n\r\nfunction isASCIIAlphanumeric(c) {\r\n return isASCIIAlpha(c) || isASCIIDigit(c);\r\n}\r\n\r\nfunction isASCIIHex(c) {\r\n return isASCIIDigit(c) || (c >= 0x41 && c <= 0x46) || (c >= 0x61 && c <= 0x66);\r\n}\r\n\r\nfunction isSingleDot(buffer) {\r\n return buffer === "." || buffer.toLowerCase() === "%2e";\r\n}\r\n\r\nfunction isDoubleDot(buffer) {\r\n buffer = buffer.toLowerCase();\r\n return buffer === ".." || buffer === "%2e." || buffer === ".%2e" || buffer === "%2e%2e";\r\n}\r\n\r\nfunction isWindowsDriveLetterCodePoints(cp1, cp2) {\r\n return isASCIIAlpha(cp1) && (cp2 === 58 || cp2 === 124);\r\n}\r\n\r\nfunction isWindowsDriveLetterString(string) {\r\n return string.length === 2 && isASCIIAlpha(string.codePointAt(0)) && (string[1] === ":" || string[1] === "|");\r\n}\r\n\r\nfunction isNormalizedWindowsDriveLetterString(string) {\r\n return string.length === 2 && isASCIIAlpha(string.codePointAt(0)) && string[1] === ":";\r\n}\r\n\r\nfunction containsForbiddenHostCodePoint(string) {\r\n return string.search(/\\u0000|\\u0009|\\u000A|\\u000D|\\u0020|#|%|\\/|:|\\?|@|\\[|\\\\|\\]/) !== -1;\r\n}\r\n\r\nfunction containsForbiddenHostCodePointExcludingPercent(string) {\r\n return string.search(/\\u0000|\\u0009|\\u000A|\\u000D|\\u0020|#|\\/|:|\\?|@|\\[|\\\\|\\]/) !== -1;\r\n}\r\n\r\nfunction isSpecialScheme(scheme) {\r\n return specialSchemes[scheme] !== undefined;\r\n}\r\n\r\nfunction isSpecial(url) {\r\n return isSpecialScheme(url.scheme);\r\n}\r\n\r\nfunction defaultPort(scheme) {\r\n return specialSchemes[scheme];\r\n}\r\n\r\nfunction percentEncode(c) {\r\n let hex = c.toString(16).toUpperCase();\r\n if (hex.length === 1) {\r\n hex = "0" + hex;\r\n }\r\n\r\n return "%" + hex;\r\n}\r\n\r\nfunction utf8PercentEncode(c) {\r\n const buf = new Buffer(c);\r\n\r\n let str = "";\r\n\r\n for (let i = 0; i < buf.length; ++i) {\r\n str += percentEncode(buf[i]);\r\n }\r\n\r\n return str;\r\n}\r\n\r\nfunction utf8PercentDecode(str) {\r\n const input = new Buffer(str);\r\n const output = [];\r\n for (let i = 0; i < input.length; ++i) {\r\n if (input[i] !== 37) {\r\n output.push(input[i]);\r\n } else if (input[i] === 37 && isASCIIHex(input[i + 1]) && isASCIIHex(input[i + 2])) {\r\n output.push(parseInt(input.slice(i + 1, i + 3).toString(), 16));\r\n i += 2;\r\n } else {\r\n output.push(input[i]);\r\n }\r\n }\r\n return new Buffer(output).toString();\r\n}\r\n\r\nfunction isC0ControlPercentEncode(c) {\r\n return c <= 0x1F || c > 0x7E;\r\n}\r\n\r\nconst extraPathPercentEncodeSet = new Set([32, 34, 35, 60, 62, 63, 96, 123, 125]);\r\nfunction isPathPercentEncode(c) {\r\n return isC0ControlPercentEncode(c) || extraPathPercentEncodeSet.has(c);\r\n}\r\n\r\nconst extraUserinfoPercentEncodeSet =\r\n new Set([47, 58, 59, 61, 64, 91, 92, 93, 94, 124]);\r\nfunction isUserinfoPercentEncode(c) {\r\n return isPathPercentEncode(c) || extraUserinfoPercentEncodeSet.has(c);\r\n}\r\n\r\nfunction percentEncodeChar(c, encodeSetPredicate) {\r\n const cStr = String.fromCodePoint(c);\r\n\r\n if (encodeSetPredicate(c)) {\r\n return utf8PercentEncode(cStr);\r\n }\r\n\r\n return cStr;\r\n}\r\n\r\nfunction parseIPv4Number(input) {\r\n let R = 10;\r\n\r\n if (input.length >= 2 && input.charAt(0) === "0" && input.charAt(1).toLowerCase() === "x") {\r\n input = input.substring(2);\r\n R = 16;\r\n } else if (input.length >= 2 && input.charAt(0) === "0") {\r\n input = input.substring(1);\r\n R = 8;\r\n }\r\n\r\n if (input === "") {\r\n return 0;\r\n }\r\n\r\n const regex = R === 10 ? /[^0-9]/ : (R === 16 ? /[^0-9A-Fa-f]/ : /[^0-7]/);\r\n if (regex.test(input)) {\r\n return failure;\r\n }\r\n\r\n return parseInt(input, R);\r\n}\r\n\r\nfunction parseIPv4(input) {\r\n const parts = input.split(".");\r\n if (parts[parts.length - 1] === "") {\r\n if (parts.length > 1) {\r\n parts.pop();\r\n }\r\n }\r\n\r\n if (parts.length > 4) {\r\n return input;\r\n }\r\n\r\n const numbers = [];\r\n for (const part of parts) {\r\n if (part === "") {\r\n return input;\r\n }\r\n const n = parseIPv4Number(part);\r\n if (n === failure) {\r\n return input;\r\n }\r\n\r\n numbers.push(n);\r\n }\r\n\r\n for (let i = 0; i < numbers.length - 1; ++i) {\r\n if (numbers[i] > 255) {\r\n return failure;\r\n }\r\n }\r\n if (numbers[numbers.length - 1] >= Math.pow(256, 5 - numbers.length)) {\r\n return failure;\r\n }\r\n\r\n let ipv4 = numbers.pop();\r\n let counter = 0;\r\n\r\n for (const n of numbers) {\r\n ipv4 += n * Math.pow(256, 3 - counter);\r\n ++counter;\r\n }\r\n\r\n return ipv4;\r\n}\r\n\r\nfunction serializeIPv4(address) {\r\n let output = "";\r\n let n = address;\r\n\r\n for (let i = 1; i <= 4; ++i) {\r\n output = String(n % 256) + output;\r\n if (i !== 4) {\r\n output = "." + output;\r\n }\r\n n = Math.floor(n / 256);\r\n }\r\n\r\n return output;\r\n}\r\n\r\nfunction parseIPv6(input) {\r\n const address = [0, 0, 0, 0, 0, 0, 0, 0];\r\n let pieceIndex = 0;\r\n let compress = null;\r\n let pointer = 0;\r\n\r\n input = punycode.ucs2.decode(input);\r\n\r\n if (input[pointer] === 58) {\r\n if (input[pointer + 1] !== 58) {\r\n return failure;\r\n }\r\n\r\n pointer += 2;\r\n ++pieceIndex;\r\n compress = pieceIndex;\r\n }\r\n\r\n while (pointer < input.length) {\r\n if (pieceIndex === 8) {\r\n return failure;\r\n }\r\n\r\n if (input[pointer] === 58) {\r\n if (compress !== null) {\r\n return failure;\r\n }\r\n ++pointer;\r\n ++pieceIndex;\r\n compress = pieceIndex;\r\n continue;\r\n }\r\n\r\n let value = 0;\r\n let length = 0;\r\n\r\n while (length < 4 && isASCIIHex(input[pointer])) {\r\n value = value * 0x10 + parseInt(at(input, pointer), 16);\r\n ++pointer;\r\n ++length;\r\n }\r\n\r\n if (input[pointer] === 46) {\r\n if (length === 0) {\r\n return failure;\r\n }\r\n\r\n pointer -= length;\r\n\r\n if (pieceIndex > 6) {\r\n return failure;\r\n }\r\n\r\n let numbersSeen = 0;\r\n\r\n while (input[pointer] !== undefined) {\r\n let ipv4Piece = null;\r\n\r\n if (numbersSeen > 0) {\r\n if (input[pointer] === 46 && numbersSeen < 4) {\r\n ++pointer;\r\n } else {\r\n return failure;\r\n }\r\n }\r\n\r\n if (!isASCIIDigit(input[pointer])) {\r\n return failure;\r\n }\r\n\r\n while (isASCIIDigit(input[pointer])) {\r\n const number = parseInt(at(input, pointer));\r\n if (ipv4Piece === null) {\r\n ipv4Piece = number;\r\n } else if (ipv4Piece === 0) {\r\n return failure;\r\n } else {\r\n ipv4Piece = ipv4Piece * 10 + number;\r\n }\r\n if (ipv4Piece > 255) {\r\n return failure;\r\n }\r\n ++pointer;\r\n }\r\n\r\n address[pieceIndex] = address[pieceIndex] * 0x100 + ipv4Piece;\r\n\r\n ++numbersSeen;\r\n\r\n if (numbersSeen === 2 || numbersSeen === 4) {\r\n ++pieceIndex;\r\n }\r\n }\r\n\r\n if (numbersSeen !== 4) {\r\n return failure;\r\n }\r\n\r\n break;\r\n } else if (input[pointer] === 58) {\r\n ++pointer;\r\n if (input[pointer] === undefined) {\r\n return failure;\r\n }\r\n } else if (input[pointer] !== undefined) {\r\n return failure;\r\n }\r\n\r\n address[pieceIndex] = value;\r\n ++pieceIndex;\r\n }\r\n\r\n if (compress !== null) {\r\n let swaps = pieceIndex - compress;\r\n pieceIndex = 7;\r\n while (pieceIndex !== 0 && swaps > 0) {\r\n const temp = address[compress + swaps - 1];\r\n address[compress + swaps - 1] = address[pieceIndex];\r\n address[pieceIndex] = temp;\r\n --pieceIndex;\r\n --swaps;\r\n }\r\n } else if (compress === null && pieceIndex !== 8) {\r\n return failure;\r\n }\r\n\r\n return address;\r\n}\r\n\r\nfunction serializeIPv6(address) {\r\n let output = "";\r\n const seqResult = findLongestZeroSequence(address);\r\n const compress = seqResult.idx;\r\n let ignore0 = false;\r\n\r\n for (let pieceIndex = 0; pieceIndex <= 7; ++pieceIndex) {\r\n if (ignore0 && address[pieceIndex] === 0) {\r\n continue;\r\n } else if (ignore0) {\r\n ignore0 = false;\r\n }\r\n\r\n if (compress === pieceIndex) {\r\n const separator = pieceIndex === 0 ? "::" : ":";\r\n output += separator;\r\n ignore0 = true;\r\n continue;\r\n }\r\n\r\n output += address[pieceIndex].toString(16);\r\n\r\n if (pieceIndex !== 7) {\r\n output += ":";\r\n }\r\n }\r\n\r\n return output;\r\n}\r\n\r\nfunction parseHost(input, isSpecialArg) {\r\n if (input[0] === "[") {\r\n if (input[input.length - 1] !== "]") {\r\n return failure;\r\n }\r\n\r\n return parseIPv6(input.substring(1, input.length - 1));\r\n }\r\n\r\n if (!isSpecialArg) {\r\n return parseOpaqueHost(input);\r\n }\r\n\r\n const domain = utf8PercentDecode(input);\r\n const asciiDomain = tr46.toASCII(domain, false, tr46.PROCESSING_OPTIONS.NONTRANSITIONAL, false);\r\n if (asciiDomain === null) {\r\n return failure;\r\n }\r\n\r\n if (containsForbiddenHostCodePoint(asciiDomain)) {\r\n return failure;\r\n }\r\n\r\n const ipv4Host = parseIPv4(asciiDomain);\r\n if (typeof ipv4Host === "number" || ipv4Host === failure) {\r\n return ipv4Host;\r\n }\r\n\r\n return asciiDomain;\r\n}\r\n\r\nfunction parseOpaqueHost(input) {\r\n if (containsForbiddenHostCodePointExcludingPercent(input)) {\r\n return failure;\r\n }\r\n\r\n let output = "";\r\n const decoded = punycode.ucs2.decode(input);\r\n for (let i = 0; i < decoded.length; ++i) {\r\n output += percentEncodeChar(decoded[i], isC0ControlPercentEncode);\r\n }\r\n return output;\r\n}\r\n\r\nfunction findLongestZeroSequence(arr) {\r\n let maxIdx = null;\r\n let maxLen = 1; // only find elements > 1\r\n let currStart = null;\r\n let currLen = 0;\r\n\r\n for (let i = 0; i < arr.length; ++i) {\r\n if (arr[i] !== 0) {\r\n if (currLen > maxLen) {\r\n maxIdx = currStart;\r\n maxLen = currLen;\r\n }\r\n\r\n currStart = null;\r\n currLen = 0;\r\n } else {\r\n if (currStart === null) {\r\n currStart = i;\r\n }\r\n ++currLen;\r\n }\r\n }\r\n\r\n // if trailing zeros\r\n if (currLen > maxLen) {\r\n maxIdx = currStart;\r\n maxLen = currLen;\r\n }\r\n\r\n return {\r\n idx: maxIdx,\r\n len: maxLen\r\n };\r\n}\r\n\r\nfunction serializeHost(host) {\r\n if (typeof host === "number") {\r\n return serializeIPv4(host);\r\n }\r\n\r\n // IPv6 serializer\r\n if (host instanceof Array) {\r\n return "[" + serializeIPv6(host) + "]";\r\n }\r\n\r\n return host;\r\n}\r\n\r\nfunction trimControlChars(url) {\r\n return url.replace(/^[\\u0000-\\u001F\\u0020]+|[\\u0000-\\u001F\\u0020]+$/g, "");\r\n}\r\n\r\nfunction trimTabAndNewline(url) {\r\n return url.replace(/\\u0009|\\u000A|\\u000D/g, "");\r\n}\r\n\r\nfunction shortenPath(url) {\r\n const path = url.path;\r\n if (path.length === 0) {\r\n return;\r\n }\r\n if (url.scheme === "file" && path.length === 1 && isNormalizedWindowsDriveLetter(path[0])) {\r\n return;\r\n }\r\n\r\n path.pop();\r\n}\r\n\r\nfunction includesCredentials(url) {\r\n return url.username !== "" || url.password !== "";\r\n}\r\n\r\nfunction cannotHaveAUsernamePasswordPort(url) {\r\n return url.host === null || url.host === "" || url.cannotBeABaseURL || url.scheme === "file";\r\n}\r\n\r\nfunction isNormalizedWindowsDriveLetter(string) {\r\n return /^[A-Za-z]:$/.test(string);\r\n}\r\n\r\nfunction URLStateMachine(input, base, encodingOverride, url, stateOverride) {\r\n this.pointer = 0;\r\n this.input = input;\r\n this.base = base || null;\r\n this.encodingOverride = encodingOverride || "utf-8";\r\n this.stateOverride = stateOverride;\r\n this.url = url;\r\n this.failure = false;\r\n this.parseError = false;\r\n\r\n if (!this.url) {\r\n this.url = {\r\n scheme: "",\r\n username: "",\r\n password: "",\r\n host: null,\r\n port: null,\r\n path: [],\r\n query: null,\r\n fragment: null,\r\n\r\n cannotBeABaseURL: false\r\n };\r\n\r\n const res = trimControlChars(this.input);\r\n if (res !== this.input) {\r\n this.parseError = true;\r\n }\r\n this.input = res;\r\n }\r\n\r\n const res = trimTabAndNewline(this.input);\r\n if (res !== this.input) {\r\n this.parseError = true;\r\n }\r\n this.input = res;\r\n\r\n this.state = stateOverride || "scheme start";\r\n\r\n this.buffer = "";\r\n this.atFlag = false;\r\n this.arrFlag = false;\r\n this.passwordTokenSeenFlag = false;\r\n\r\n this.input = punycode.ucs2.decode(this.input);\r\n\r\n for (; this.pointer <= this.input.length; ++this.pointer) {\r\n const c = this.input[this.pointer];\r\n const cStr = isNaN(c) ? undefined : String.fromCodePoint(c);\r\n\r\n // exec state machine\r\n const ret = this["parse " + this.state](c, cStr);\r\n if (!ret) {\r\n break; // terminate algorithm\r\n } else if (ret === failure) {\r\n this.failure = true;\r\n break;\r\n }\r\n }\r\n}\r\n\r\nURLStateMachine.prototype["parse scheme start"] = function parseSchemeStart(c, cStr) {\r\n if (isASCIIAlpha(c)) {\r\n this.buffer += cStr.toLowerCase();\r\n this.state = "scheme";\r\n } else if (!this.stateOverride) {\r\n this.state = "no scheme";\r\n --this.pointer;\r\n } else {\r\n this.parseError = true;\r\n return failure;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype["parse scheme"] = function parseScheme(c, cStr) {\r\n if (isASCIIAlphanumeric(c) || c === 43 || c === 45 || c === 46) {\r\n this.buffer += cStr.toLowerCase();\r\n } else if (c === 58) {\r\n if (this.stateOverride) {\r\n if (isSpecial(this.url) && !isSpecialScheme(this.buffer)) {\r\n return false;\r\n }\r\n\r\n if (!isSpecial(this.url) && isSpecialScheme(this.buffer)) {\r\n return false;\r\n }\r\n\r\n if ((includesCredentials(this.url) || this.url.port !== null) && this.buffer === "file") {\r\n return false;\r\n }\r\n\r\n if (this.url.scheme === "file" && (this.url.host === "" || this.url.host === null)) {\r\n return false;\r\n }\r\n }\r\n this.url.scheme = this.buffer;\r\n this.buffer = "";\r\n if (this.stateOverride) {\r\n return false;\r\n }\r\n if (this.url.scheme === "file") {\r\n if (this.input[this.pointer + 1] !== 47 || this.input[this.pointer + 2] !== 47) {\r\n this.parseError = true;\r\n }\r\n this.state = "file";\r\n } else if (isSpecial(this.url) && this.base !== null && this.base.scheme === this.url.scheme) {\r\n this.state = "special relative or authority";\r\n } else if (isSpecial(this.url)) {\r\n this.state = "special authority slashes";\r\n } else if (this.input[this.pointer + 1] === 47) {\r\n this.state = "path or authority";\r\n ++this.pointer;\r\n } else {\r\n this.url.cannotBeABaseURL = true;\r\n this.url.path.push("");\r\n this.state = "cannot-be-a-base-URL path";\r\n }\r\n } else if (!this.stateOverride) {\r\n this.buffer = "";\r\n this.state = "no scheme";\r\n this.pointer = -1;\r\n } else {\r\n this.parseError = true;\r\n return failure;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype["parse no scheme"] = function parseNoScheme(c) {\r\n if (this.base === null || (this.base.cannotBeABaseURL && c !== 35)) {\r\n return failure;\r\n } else if (this.base.cannotBeABaseURL && c === 35) {\r\n this.url.scheme = this.base.scheme;\r\n this.url.path = this.base.path.slice();\r\n this.url.query = this.base.query;\r\n this.url.fragment = "";\r\n this.url.cannotBeABaseURL = true;\r\n this.state = "fragment";\r\n } else if (this.base.scheme === "file") {\r\n this.state = "file";\r\n --this.pointer;\r\n } else {\r\n this.state = "relative";\r\n --this.pointer;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype["parse special relative or authority"] = function parseSpecialRelativeOrAuthority(c) {\r\n if (c === 47 && this.input[this.pointer + 1] === 47) {\r\n this.state = "special authority ignore slashes";\r\n ++this.pointer;\r\n } else {\r\n this.parseError = true;\r\n this.state = "relative";\r\n --this.pointer;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype["parse path or authority"] = function parsePathOrAuthority(c) {\r\n if (c === 47) {\r\n this.state = "authority";\r\n } else {\r\n this.state = "path";\r\n --this.pointer;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype["parse relative"] = function parseRelative(c) {\r\n this.url.scheme = this.base.scheme;\r\n if (isNaN(c)) {\r\n this.url.username = this.base.username;\r\n this.url.password = this.base.password;\r\n this.url.host = this.base.host;\r\n this.url.port = this.base.port;\r\n this.url.path = this.base.path.slice();\r\n this.url.query = this.base.query;\r\n } else if (c === 47) {\r\n this.state = "relative slash";\r\n } else if (c === 63) {\r\n this.url.username = this.base.username;\r\n this.url.password = this.base.password;\r\n this.url.host = this.base.host;\r\n this.url.port = this.base.port;\r\n this.url.path = this.base.path.slice();\r\n this.url.query = "";\r\n this.state = "query";\r\n } else if (c === 35) {\r\n this.url.username = this.base.username;\r\n this.url.password = this.base.password;\r\n this.url.host = this.base.host;\r\n this.url.port = this.base.port;\r\n this.url.path = this.base.path.slice();\r\n this.url.query = this.base.query;\r\n this.url.fragment = "";\r\n this.state = "fragment";\r\n } else if (isSpecial(this.url) && c === 92) {\r\n this.parseError = true;\r\n this.state = "relative slash";\r\n } else {\r\n this.url.username = this.base.username;\r\n this.url.password = this.base.password;\r\n this.url.host = this.base.host;\r\n this.url.port = this.base.port;\r\n this.url.path = this.base.path.slice(0, this.base.path.length - 1);\r\n\r\n this.state = "path";\r\n --this.pointer;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype["parse relative slash"] = function parseRelativeSlash(c) {\r\n if (isSpecial(this.url) && (c === 47 || c === 92)) {\r\n if (c === 92) {\r\n this.parseError = true;\r\n }\r\n this.state = "special authority ignore slashes";\r\n } else if (c === 47) {\r\n this.state = "authority";\r\n } else {\r\n this.url.username = this.base.username;\r\n this.url.password = this.base.password;\r\n this.url.host = this.base.host;\r\n this.url.port = this.base.port;\r\n this.state = "path";\r\n --this.pointer;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype["parse special authority slashes"] = function parseSpecialAuthoritySlashes(c) {\r\n if (c === 47 && this.input[this.pointer + 1] === 47) {\r\n this.state = "special authority ignore slashes";\r\n ++this.pointer;\r\n } else {\r\n this.parseError = true;\r\n this.state = "special authority ignore slashes";\r\n --this.pointer;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype["parse special authority ignore slashes"] = function parseSpecialAuthorityIgnoreSlashes(c) {\r\n if (c !== 47 && c !== 92) {\r\n this.state = "authority";\r\n --this.pointer;\r\n } else {\r\n this.parseError = true;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype["parse authority"] = function parseAuthority(c, cStr) {\r\n if (c === 64) {\r\n this.parseError = true;\r\n if (this.atFlag) {\r\n this.buffer = "%40" + this.buffer;\r\n }\r\n this.atFlag = true;\r\n\r\n // careful, this is based on buffer and has its own pointer (this.pointer != pointer) and inner chars\r\n const len = countSymbols(this.buffer);\r\n for (let pointer = 0; pointer < len; ++pointer) {\r\n const codePoint = this.buffer.codePointAt(pointer);\r\n\r\n if (codePoint === 58 && !this.passwordTokenSeenFlag) {\r\n this.passwordTokenSeenFlag = true;\r\n continue;\r\n }\r\n const encodedCodePoints = percentEncodeChar(codePoint, isUserinfoPercentEncode);\r\n if (this.passwordTokenSeenFlag) {\r\n this.url.password += encodedCodePoints;\r\n } else {\r\n this.url.username += encodedCodePoints;\r\n }\r\n }\r\n this.buffer = "";\r\n } else if (isNaN(c) || c === 47 || c === 63 || c === 35 ||\r\n (isSpecial(this.url) && c === 92)) {\r\n if (this.atFlag && this.buffer === "") {\r\n this.parseError = true;\r\n return failure;\r\n }\r\n this.pointer -= countSymbols(this.buffer) + 1;\r\n this.buffer = "";\r\n this.state = "host";\r\n } else {\r\n this.buffer += cStr;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype["parse hostname"] =\r\nURLStateMachine.prototype["parse host"] = function parseHostName(c, cStr) {\r\n if (this.stateOverride && this.url.scheme === "file") {\r\n --this.pointer;\r\n this.state = "file host";\r\n } else if (c === 58 && !this.arrFlag) {\r\n if (this.buffer === "") {\r\n this.parseError = true;\r\n return failure;\r\n }\r\n\r\n const host = parseHost(this.buffer, isSpecial(this.url));\r\n if (host === failure) {\r\n return failure;\r\n }\r\n\r\n this.url.host = host;\r\n this.buffer = "";\r\n this.state = "port";\r\n if (this.stateOverride === "hostname") {\r\n return false;\r\n }\r\n } else if (isNaN(c) || c === 47 || c === 63 || c === 35 ||\r\n (isSpecial(this.url) && c === 92)) {\r\n --this.pointer;\r\n if (isSpecial(this.url) && this.buffer === "") {\r\n this.parseError = true;\r\n return failure;\r\n } else if (this.stateOverride && this.buffer === "" &&\r\n (includesCredentials(this.url) || this.url.port !== null)) {\r\n this.parseError = true;\r\n return false;\r\n }\r\n\r\n const host = parseHost(this.buffer, isSpecial(this.url));\r\n if (host === failure) {\r\n return failure;\r\n }\r\n\r\n this.url.host = host;\r\n this.buffer = "";\r\n this.state = "path start";\r\n if (this.stateOverride) {\r\n return false;\r\n }\r\n } else {\r\n if (c === 91) {\r\n this.arrFlag = true;\r\n } else if (c === 93) {\r\n this.arrFlag = false;\r\n }\r\n this.buffer += cStr;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype["parse port"] = function parsePort(c, cStr) {\r\n if (isASCIIDigit(c)) {\r\n this.buffer += cStr;\r\n } else if (isNaN(c) || c === 47 || c === 63 || c === 35 ||\r\n (isSpecial(this.url) && c === 92) ||\r\n this.stateOverride) {\r\n if (this.buffer !== "") {\r\n const port = parseInt(this.buffer);\r\n if (port > Math.pow(2, 16) - 1) {\r\n this.parseError = true;\r\n return failure;\r\n }\r\n this.url.port = port === defaultPort(this.url.scheme) ? null : port;\r\n this.buffer = "";\r\n }\r\n if (this.stateOverride) {\r\n return false;\r\n }\r\n this.state = "path start";\r\n --this.pointer;\r\n } else {\r\n this.parseError = true;\r\n return failure;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nconst fileOtherwiseCodePoints = new Set([47, 92, 63, 35]);\r\n\r\nURLStateMachine.prototype["parse file"] = function parseFile(c) {\r\n this.url.scheme = "file";\r\n\r\n if (c === 47 || c === 92) {\r\n if (c === 92) {\r\n this.parseError = true;\r\n }\r\n this.state = "file slash";\r\n } else if (this.base !== null && this.base.scheme === "file") {\r\n if (isNaN(c)) {\r\n this.url.host = this.base.host;\r\n this.url.path = this.base.path.slice();\r\n this.url.query = this.base.query;\r\n } else if (c === 63) {\r\n this.url.host = this.base.host;\r\n this.url.path = this.base.path.slice();\r\n this.url.query = "";\r\n this.state = "query";\r\n } else if (c === 35) {\r\n this.url.host = this.base.host;\r\n this.url.path = this.base.path.slice();\r\n this.url.query = this.base.query;\r\n this.url.fragment = "";\r\n this.state = "fragment";\r\n } else {\r\n if (this.input.length - this.pointer - 1 === 0 || // remaining consists of 0 code points\r\n !isWindowsDriveLetterCodePoints(c, this.input[this.pointer + 1]) ||\r\n (this.input.length - this.pointer - 1 >= 2 && // remaining has at least 2 code points\r\n !fileOtherwiseCodePoints.has(this.input[this.pointer + 2]))) {\r\n this.url.host = this.base.host;\r\n this.url.path = this.base.path.slice();\r\n shortenPath(this.url);\r\n } else {\r\n this.parseError = true;\r\n }\r\n\r\n this.state = "path";\r\n --this.pointer;\r\n }\r\n } else {\r\n this.state = "path";\r\n --this.pointer;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype["parse file slash"] = function parseFileSlash(c) {\r\n if (c === 47 || c === 92) {\r\n if (c === 92) {\r\n this.parseError = true;\r\n }\r\n this.state = "file host";\r\n } else {\r\n if (this.base !== null && this.base.scheme === "file") {\r\n if (isNormalizedWindowsDriveLetterString(this.base.path[0])) {\r\n this.url.path.push(this.base.path[0]);\r\n } else {\r\n this.url.host = this.base.host;\r\n }\r\n }\r\n this.state = "path";\r\n --this.pointer;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype["parse file host"] = function parseFileHost(c, cStr) {\r\n if (isNaN(c) || c === 47 || c === 92 || c === 63 || c === 35) {\r\n --this.pointer;\r\n if (!this.stateOverride && isWindowsDriveLetterString(this.buffer)) {\r\n this.parseError = true;\r\n this.state = "path";\r\n } else if (this.buffer === "") {\r\n this.url.host = "";\r\n if (this.stateOverride) {\r\n return false;\r\n }\r\n this.state = "path start";\r\n } else {\r\n let host = parseHost(this.buffer, isSpecial(this.url));\r\n if (host === failure) {\r\n return failure;\r\n }\r\n if (host === "localhost") {\r\n host = "";\r\n }\r\n this.url.host = host;\r\n\r\n if (this.stateOverride) {\r\n return false;\r\n }\r\n\r\n this.buffer = "";\r\n this.state = "path start";\r\n }\r\n } else {\r\n this.buffer += cStr;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype["parse path start"] = function parsePathStart(c) {\r\n if (isSpecial(this.url)) {\r\n if (c === 92) {\r\n this.parseError = true;\r\n }\r\n this.state = "path";\r\n\r\n if (c !== 47 && c !== 92) {\r\n --this.pointer;\r\n }\r\n } else if (!this.stateOverride && c === 63) {\r\n this.url.query = "";\r\n this.state = "query";\r\n } else if (!this.stateOverride && c === 35) {\r\n this.url.fragment = "";\r\n this.state = "fragment";\r\n } else if (c !== undefined) {\r\n this.state = "path";\r\n if (c !== 47) {\r\n --this.pointer;\r\n }\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype["parse path"] = function parsePath(c) {\r\n if (isNaN(c) || c === 47 || (isSpecial(this.url) && c === 92) ||\r\n (!this.stateOverride && (c === 63 || c === 35))) {\r\n if (isSpecial(this.url) && c === 92) {\r\n this.parseError = true;\r\n }\r\n\r\n if (isDoubleDot(this.buffer)) {\r\n shortenPath(this.url);\r\n if (c !== 47 && !(isSpecial(this.url) && c === 92)) {\r\n this.url.path.push("");\r\n }\r\n } else if (isSingleDot(this.buffer) && c !== 47 &&\r\n !(isSpecial(this.url) && c === 92)) {\r\n this.url.path.push("");\r\n } else if (!isSingleDot(this.buffer)) {\r\n if (this.url.scheme === "file" && this.url.path.length === 0 && isWindowsDriveLetterString(this.buffer)) {\r\n if (this.url.host !== "" && this.url.host !== null) {\r\n this.parseError = true;\r\n this.url.host = "";\r\n }\r\n this.buffer = this.buffer[0] + ":";\r\n }\r\n this.url.path.push(this.buffer);\r\n }\r\n this.buffer = "";\r\n if (this.url.scheme === "file" && (c === undefined || c === 63 || c === 35)) {\r\n while (this.url.path.length > 1 && this.url.path[0] === "") {\r\n this.parseError = true;\r\n this.url.path.shift();\r\n }\r\n }\r\n if (c === 63) {\r\n this.url.query = "";\r\n this.state = "query";\r\n }\r\n if (c === 35) {\r\n this.url.fragment = "";\r\n this.state = "fragment";\r\n }\r\n } else {\r\n // TODO: If c is not a URL code point and not "%", parse error.\r\n\r\n if (c === 37 &&\r\n (!isASCIIHex(this.input[this.pointer + 1]) ||\r\n !isASCIIHex(this.input[this.pointer + 2]))) {\r\n this.parseError = true;\r\n }\r\n\r\n this.buffer += percentEncodeChar(c, isPathPercentEncode);\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype["parse cannot-be-a-base-URL path"] = function parseCannotBeABaseURLPath(c) {\r\n if (c === 63) {\r\n this.url.query = "";\r\n this.state = "query";\r\n } else if (c === 35) {\r\n this.url.fragment = "";\r\n this.state = "fragment";\r\n } else {\r\n // TODO: Add: not a URL code point\r\n if (!isNaN(c) && c !== 37) {\r\n this.parseError = true;\r\n }\r\n\r\n if (c === 37 &&\r\n (!isASCIIHex(this.input[this.pointer + 1]) ||\r\n !isASCIIHex(this.input[this.pointer + 2]))) {\r\n this.parseError = true;\r\n }\r\n\r\n if (!isNaN(c)) {\r\n this.url.path[0] = this.url.path[0] + percentEncodeChar(c, isC0ControlPercentEncode);\r\n }\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype["parse query"] = function parseQuery(c, cStr) {\r\n if (isNaN(c) || (!this.stateOverride && c === 35)) {\r\n if (!isSpecial(this.url) || this.url.scheme === "ws" || this.url.scheme === "wss") {\r\n this.encodingOverride = "utf-8";\r\n }\r\n\r\n const buffer = new Buffer(this.buffer); // TODO: Use encoding override instead\r\n for (let i = 0; i < buffer.length; ++i) {\r\n if (buffer[i] < 0x21 || buffer[i] > 0x7E || buffer[i] === 0x22 || buffer[i] === 0x23 ||\r\n buffer[i] === 0x3C || buffer[i] === 0x3E) {\r\n this.url.query += percentEncode(buffer[i]);\r\n } else {\r\n this.url.query += String.fromCodePoint(buffer[i]);\r\n }\r\n }\r\n\r\n this.buffer = "";\r\n if (c === 35) {\r\n this.url.fragment = "";\r\n this.state = "fragment";\r\n }\r\n } else {\r\n // TODO: If c is not a URL code point and not "%", parse error.\r\n if (c === 37 &&\r\n (!isASCIIHex(this.input[this.pointer + 1]) ||\r\n !isASCIIHex(this.input[this.pointer + 2]))) {\r\n this.parseError = true;\r\n }\r\n\r\n this.buffer += cStr;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype["parse fragment"] = function parseFragment(c) {\r\n if (isNaN(c)) { // do nothing\r\n } else if (c === 0x0) {\r\n this.parseError = true;\r\n } else {\r\n // TODO: If c is not a URL code point and not "%", parse error.\r\n if (c === 37 &&\r\n (!isASCIIHex(this.input[this.pointer + 1]) ||\r\n !isASCIIHex(this.input[this.pointer + 2]))) {\r\n this.parseError = true;\r\n }\r\n\r\n this.url.fragment += percentEncodeChar(c, isC0ControlPercentEncode);\r\n }\r\n\r\n return true;\r\n};\r\n\r\nfunction serializeURL(url, excludeFragment) {\r\n let output = url.scheme + ":";\r\n if (url.host !== null) {\r\n output += "//";\r\n\r\n if (url.username !== "" || url.password !== "") {\r\n output += url.username;\r\n if (url.password !== "") {\r\n output += ":" + url.password;\r\n }\r\n output += "@";\r\n }\r\n\r\n output += serializeHost(url.host);\r\n\r\n if (url.port !== null) {\r\n output += ":" + url.port;\r\n }\r\n } else if (url.host === null && url.scheme === "file") {\r\n output += "//";\r\n }\r\n\r\n if (url.cannotBeABaseURL) {\r\n output += url.path[0];\r\n } else {\r\n for (const string of url.path) {\r\n output += "/" + string;\r\n }\r\n }\r\n\r\n if (url.query !== null) {\r\n output += "?" + url.query;\r\n }\r\n\r\n if (!excludeFragment && url.fragment !== null) {\r\n output += "#" + url.fragment;\r\n }\r\n\r\n return output;\r\n}\r\n\r\nfunction serializeOrigin(tuple) {\r\n let result = tuple.scheme + "://";\r\n result += serializeHost(tuple.host);\r\n\r\n if (tuple.port !== null) {\r\n result += ":" + tuple.port;\r\n }\r\n\r\n return result;\r\n}\r\n\r\nmodule.exports.serializeURL = serializeURL;\r\n\r\nmodule.exports.serializeURLOrigin = function (url) {\r\n // https://url.spec.whatwg.org/#concept-url-origin\r\n switch (url.scheme) {\r\n case "blob":\r\n try {\r\n return module.exports.serializeURLOrigin(module.exports.parseURL(url.path[0]));\r\n } catch (e) {\r\n // serializing an opaque origin returns "null"\r\n return "null";\r\n }\r\n case "ftp":\r\n case "gopher":\r\n case "http":\r\n case "https":\r\n case "ws":\r\n case "wss":\r\n return serializeOrigin({\r\n scheme: url.scheme,\r\n host: url.host,\r\n port: url.port\r\n });\r\n case "file":\r\n // spec says "exercise to the reader", chrome says "file://"\r\n return "file://";\r\n default:\r\n // serializing an opaque origin returns "null"\r\n return "null";\r\n }\r\n};\r\n\r\nmodule.exports.basicURLParse = function (input, options) {\r\n if (options === undefined) {\r\n options = {};\r\n }\r\n\r\n const usm = new URLStateMachine(input, options.baseURL, options.encodingOverride, options.url, options.stateOverride);\r\n if (usm.failure) {\r\n return "failure";\r\n }\r\n\r\n return usm.url;\r\n};\r\n\r\nmodule.exports.setTheUsername = function (url, username) {\r\n url.username = "";\r\n const decoded = punycode.ucs2.decode(username);\r\n for (let i = 0; i < decoded.length; ++i) {\r\n url.username += percentEncodeChar(decoded[i], isUserinfoPercentEncode);\r\n }\r\n};\r\n\r\nmodule.exports.setThePassword = function (url, password) {\r\n url.password = "";\r\n const decoded = punycode.ucs2.decode(password);\r\n for (let i = 0; i < decoded.length; ++i) {\r\n url.password += percentEncodeChar(decoded[i], isUserinfoPercentEncode);\r\n }\r\n};\r\n\r\nmodule.exports.serializeHost = serializeHost;\r\n\r\nmodule.exports.cannotHaveAUsernamePasswordPort = cannotHaveAUsernamePasswordPort;\r\n\r\nmodule.exports.serializeInteger = function (integer) {\r\n return String(integer);\r\n};\r\n\r\nmodule.exports.parseURL = function (input, options) {\r\n if (options === undefined) {\r\n options = {};\r\n }\r\n\r\n // We don\'t handle blobs, so this just delegates:\r\n return module.exports.basicURLParse(input, { baseURL: options.baseURL, encodingOverride: options.encodingOverride });\r\n};\r\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/node-fetch/node_modules/whatwg-url/lib/url-state-machine.js?', + ); + + /***/ + }, + + /***/ 8673: /***/ (module) => { + 'use strict'; + eval( + '\n\nmodule.exports.mixin = function mixin(target, source) {\n const keys = Object.getOwnPropertyNames(source);\n for (let i = 0; i < keys.length; ++i) {\n Object.defineProperty(target, keys[i], Object.getOwnPropertyDescriptor(source, keys[i]));\n }\n};\n\nmodule.exports.wrapperSymbol = Symbol("wrapper");\nmodule.exports.implSymbol = Symbol("impl");\n\nmodule.exports.wrapperForImpl = function (impl) {\n return impl[module.exports.wrapperSymbol];\n};\n\nmodule.exports.implForWrapper = function (wrapper) {\n return wrapper[module.exports.implSymbol];\n};\n\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/node-fetch/node_modules/whatwg-url/lib/utils.js?', + ); + + /***/ + }, + + /***/ 5228: /***/ (module) => { + 'use strict'; + eval( + "/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/object-assign/index.js?", + ); + + /***/ + }, + + /***/ 228: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + 'use strict'; + eval( + "/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\nvar printWarning = function() {};\n\nif (true) {\n var ReactPropTypesSecret = __webpack_require__(6925);\n var loggedTypeFailures = {};\n var has = __webpack_require__(9376);\n\n printWarning = function(text) {\n var message = 'Warning: ' + text;\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) { /**/ }\n };\n}\n\n/**\n * Assert that the values match with the type specs.\n * Error messages are memorized and will only be shown once.\n *\n * @param {object} typeSpecs Map of name to a ReactPropType\n * @param {object} values Runtime values that need to be type-checked\n * @param {string} location e.g. \"prop\", \"context\", \"child context\"\n * @param {string} componentName Name of the component for error messages.\n * @param {?Function} getStack Returns the component stack.\n * @private\n */\nfunction checkPropTypes(typeSpecs, values, location, componentName, getStack) {\n if (true) {\n for (var typeSpecName in typeSpecs) {\n if (has(typeSpecs, typeSpecName)) {\n var error;\n // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n if (typeof typeSpecs[typeSpecName] !== 'function') {\n var err = Error(\n (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +\n 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' +\n 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'\n );\n err.name = 'Invariant Violation';\n throw err;\n }\n error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);\n } catch (ex) {\n error = ex;\n }\n if (error && !(error instanceof Error)) {\n printWarning(\n (componentName || 'React class') + ': type specification of ' +\n location + ' `' + typeSpecName + '` is invalid; the type checker ' +\n 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +\n 'You may have forgotten to pass an argument to the type checker ' +\n 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +\n 'shape all require an argument).'\n );\n }\n if (error instanceof Error && !(error.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error.message] = true;\n\n var stack = getStack ? getStack() : '';\n\n printWarning(\n 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')\n );\n }\n }\n }\n }\n}\n\n/**\n * Resets warning cache when testing.\n *\n * @private\n */\ncheckPropTypes.resetWarningCache = function() {\n if (true) {\n loggedTypeFailures = {};\n }\n}\n\nmodule.exports = checkPropTypes;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/prop-types/checkPropTypes.js?", + ); + + /***/ + }, + + /***/ 4574: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + 'use strict'; + eval( + "/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\nvar ReactIs = __webpack_require__(4363);\nvar assign = __webpack_require__(5228);\n\nvar ReactPropTypesSecret = __webpack_require__(6925);\nvar has = __webpack_require__(9376);\nvar checkPropTypes = __webpack_require__(228);\n\nvar printWarning = function() {};\n\nif (true) {\n printWarning = function(text) {\n var message = 'Warning: ' + text;\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n };\n}\n\nfunction emptyFunctionThatReturnsNull() {\n return null;\n}\n\nmodule.exports = function(isValidElement, throwOnDirectAccess) {\n /* global Symbol */\n var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\n var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.\n\n /**\n * Returns the iterator method function contained on the iterable object.\n *\n * Be sure to invoke the function with the iterable as context:\n *\n * var iteratorFn = getIteratorFn(myIterable);\n * if (iteratorFn) {\n * var iterator = iteratorFn.call(myIterable);\n * ...\n * }\n *\n * @param {?object} maybeIterable\n * @return {?function}\n */\n function getIteratorFn(maybeIterable) {\n var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);\n if (typeof iteratorFn === 'function') {\n return iteratorFn;\n }\n }\n\n /**\n * Collection of methods that allow declaration and validation of props that are\n * supplied to React components. Example usage:\n *\n * var Props = require('ReactPropTypes');\n * var MyArticle = React.createClass({\n * propTypes: {\n * // An optional string prop named \"description\".\n * description: Props.string,\n *\n * // A required enum prop named \"category\".\n * category: Props.oneOf(['News','Photos']).isRequired,\n *\n * // A prop named \"dialog\" that requires an instance of Dialog.\n * dialog: Props.instanceOf(Dialog).isRequired\n * },\n * render: function() { ... }\n * });\n *\n * A more formal specification of how these methods are used:\n *\n * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)\n * decl := ReactPropTypes.{type}(.isRequired)?\n *\n * Each and every declaration produces a function with the same signature. This\n * allows the creation of custom validation functions. For example:\n *\n * var MyLink = React.createClass({\n * propTypes: {\n * // An optional string or URI prop named \"href\".\n * href: function(props, propName, componentName) {\n * var propValue = props[propName];\n * if (propValue != null && typeof propValue !== 'string' &&\n * !(propValue instanceof URI)) {\n * return new Error(\n * 'Expected a string or an URI for ' + propName + ' in ' +\n * componentName\n * );\n * }\n * }\n * },\n * render: function() {...}\n * });\n *\n * @internal\n */\n\n var ANONYMOUS = '<<anonymous>>';\n\n // Important!\n // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.\n var ReactPropTypes = {\n array: createPrimitiveTypeChecker('array'),\n bigint: createPrimitiveTypeChecker('bigint'),\n bool: createPrimitiveTypeChecker('boolean'),\n func: createPrimitiveTypeChecker('function'),\n number: createPrimitiveTypeChecker('number'),\n object: createPrimitiveTypeChecker('object'),\n string: createPrimitiveTypeChecker('string'),\n symbol: createPrimitiveTypeChecker('symbol'),\n\n any: createAnyTypeChecker(),\n arrayOf: createArrayOfTypeChecker,\n element: createElementTypeChecker(),\n elementType: createElementTypeTypeChecker(),\n instanceOf: createInstanceTypeChecker,\n node: createNodeChecker(),\n objectOf: createObjectOfTypeChecker,\n oneOf: createEnumTypeChecker,\n oneOfType: createUnionTypeChecker,\n shape: createShapeTypeChecker,\n exact: createStrictShapeTypeChecker,\n };\n\n /**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\n /*eslint-disable no-self-compare*/\n function is(x, y) {\n // SameValue algorithm\n if (x === y) {\n // Steps 1-5, 7-10\n // Steps 6.b-6.e: +0 != -0\n return x !== 0 || 1 / x === 1 / y;\n } else {\n // Step 6.a: NaN == NaN\n return x !== x && y !== y;\n }\n }\n /*eslint-enable no-self-compare*/\n\n /**\n * We use an Error-like object for backward compatibility as people may call\n * PropTypes directly and inspect their output. However, we don't use real\n * Errors anymore. We don't inspect their stack anyway, and creating them\n * is prohibitively expensive if they are created too often, such as what\n * happens in oneOfType() for any type before the one that matched.\n */\n function PropTypeError(message, data) {\n this.message = message;\n this.data = data && typeof data === 'object' ? data: {};\n this.stack = '';\n }\n // Make `instanceof Error` still work for returned errors.\n PropTypeError.prototype = Error.prototype;\n\n function createChainableTypeChecker(validate) {\n if (true) {\n var manualPropTypeCallCache = {};\n var manualPropTypeWarningCount = 0;\n }\n function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {\n componentName = componentName || ANONYMOUS;\n propFullName = propFullName || propName;\n\n if (secret !== ReactPropTypesSecret) {\n if (throwOnDirectAccess) {\n // New behavior only for users of `prop-types` package\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use `PropTypes.checkPropTypes()` to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n } else if ( true && typeof console !== 'undefined') {\n // Old behavior for people using React.PropTypes\n var cacheKey = componentName + ':' + propName;\n if (\n !manualPropTypeCallCache[cacheKey] &&\n // Avoid spamming the console because they are often not actionable except for lib authors\n manualPropTypeWarningCount < 3\n ) {\n printWarning(\n 'You are manually calling a React.PropTypes validation ' +\n 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +\n 'and will throw in the standalone `prop-types` package. ' +\n 'You may be seeing this warning due to a third-party PropTypes ' +\n 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'\n );\n manualPropTypeCallCache[cacheKey] = true;\n manualPropTypeWarningCount++;\n }\n }\n }\n if (props[propName] == null) {\n if (isRequired) {\n if (props[propName] === null) {\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));\n }\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));\n }\n return null;\n } else {\n return validate(props, propName, componentName, location, propFullName);\n }\n }\n\n var chainedCheckType = checkType.bind(null, false);\n chainedCheckType.isRequired = checkType.bind(null, true);\n\n return chainedCheckType;\n }\n\n function createPrimitiveTypeChecker(expectedType) {\n function validate(props, propName, componentName, location, propFullName, secret) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== expectedType) {\n // `propValue` being instance of, say, date/regexp, pass the 'object'\n // check, but we can offer a more precise error message here rather than\n // 'of type `object`'.\n var preciseType = getPreciseType(propValue);\n\n return new PropTypeError(\n 'Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'),\n {expectedType: expectedType}\n );\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createAnyTypeChecker() {\n return createChainableTypeChecker(emptyFunctionThatReturnsNull);\n }\n\n function createArrayOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');\n }\n var propValue = props[propName];\n if (!Array.isArray(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));\n }\n for (var i = 0; i < propValue.length; i++) {\n var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createElementTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (!isValidElement(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createElementTypeTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (!ReactIs.isValidElementType(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createInstanceTypeChecker(expectedClass) {\n function validate(props, propName, componentName, location, propFullName) {\n if (!(props[propName] instanceof expectedClass)) {\n var expectedClassName = expectedClass.name || ANONYMOUS;\n var actualClassName = getClassName(props[propName]);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createEnumTypeChecker(expectedValues) {\n if (!Array.isArray(expectedValues)) {\n if (true) {\n if (arguments.length > 1) {\n printWarning(\n 'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +\n 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'\n );\n } else {\n printWarning('Invalid argument supplied to oneOf, expected an array.');\n }\n }\n return emptyFunctionThatReturnsNull;\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n for (var i = 0; i < expectedValues.length; i++) {\n if (is(propValue, expectedValues[i])) {\n return null;\n }\n }\n\n var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {\n var type = getPreciseType(value);\n if (type === 'symbol') {\n return String(value);\n }\n return value;\n });\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createObjectOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');\n }\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));\n }\n for (var key in propValue) {\n if (has(propValue, key)) {\n var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createUnionTypeChecker(arrayOfTypeCheckers) {\n if (!Array.isArray(arrayOfTypeCheckers)) {\n true ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : 0;\n return emptyFunctionThatReturnsNull;\n }\n\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n if (typeof checker !== 'function') {\n printWarning(\n 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +\n 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'\n );\n return emptyFunctionThatReturnsNull;\n }\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n var expectedTypes = [];\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret);\n if (checkerResult == null) {\n return null;\n }\n if (checkerResult.data && has(checkerResult.data, 'expectedType')) {\n expectedTypes.push(checkerResult.data.expectedType);\n }\n }\n var expectedTypesMessage = (expectedTypes.length > 0) ? ', expected one of type [' + expectedTypes.join(', ') + ']': '';\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createNodeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n if (!isNode(props[propName])) {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function invalidValidatorError(componentName, location, propFullName, key, type) {\n return new PropTypeError(\n (componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' +\n 'it must be a function, usually from the `prop-types` package, but received `' + type + '`.'\n );\n }\n\n function createShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n for (var key in shapeTypes) {\n var checker = shapeTypes[key];\n if (typeof checker !== 'function') {\n return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createStrictShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n // We need to check all keys in case some are required but missing from props.\n var allKeys = assign({}, props[propName], shapeTypes);\n for (var key in allKeys) {\n var checker = shapeTypes[key];\n if (has(shapeTypes, key) && typeof checker !== 'function') {\n return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));\n }\n if (!checker) {\n return new PropTypeError(\n 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +\n '\\nBad object: ' + JSON.stringify(props[propName], null, ' ') +\n '\\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')\n );\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n\n return createChainableTypeChecker(validate);\n }\n\n function isNode(propValue) {\n switch (typeof propValue) {\n case 'number':\n case 'string':\n case 'undefined':\n return true;\n case 'boolean':\n return !propValue;\n case 'object':\n if (Array.isArray(propValue)) {\n return propValue.every(isNode);\n }\n if (propValue === null || isValidElement(propValue)) {\n return true;\n }\n\n var iteratorFn = getIteratorFn(propValue);\n if (iteratorFn) {\n var iterator = iteratorFn.call(propValue);\n var step;\n if (iteratorFn !== propValue.entries) {\n while (!(step = iterator.next()).done) {\n if (!isNode(step.value)) {\n return false;\n }\n }\n } else {\n // Iterator will provide entry [k,v] tuples rather than values.\n while (!(step = iterator.next()).done) {\n var entry = step.value;\n if (entry) {\n if (!isNode(entry[1])) {\n return false;\n }\n }\n }\n }\n } else {\n return false;\n }\n\n return true;\n default:\n return false;\n }\n }\n\n function isSymbol(propType, propValue) {\n // Native Symbol.\n if (propType === 'symbol') {\n return true;\n }\n\n // falsy value can't be a Symbol\n if (!propValue) {\n return false;\n }\n\n // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'\n if (propValue['@@toStringTag'] === 'Symbol') {\n return true;\n }\n\n // Fallback for non-spec compliant Symbols which are polyfilled.\n if (typeof Symbol === 'function' && propValue instanceof Symbol) {\n return true;\n }\n\n return false;\n }\n\n // Equivalent of `typeof` but with special handling for array and regexp.\n function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }\n\n // This handles more types than `getPropType`. Only used for error messages.\n // See `createPrimitiveTypeChecker`.\n function getPreciseType(propValue) {\n if (typeof propValue === 'undefined' || propValue === null) {\n return '' + propValue;\n }\n var propType = getPropType(propValue);\n if (propType === 'object') {\n if (propValue instanceof Date) {\n return 'date';\n } else if (propValue instanceof RegExp) {\n return 'regexp';\n }\n }\n return propType;\n }\n\n // Returns a string that is postfixed to a warning about an invalid type.\n // For example, \"undefined\" or \"of type array\"\n function getPostfixForTypeWarning(value) {\n var type = getPreciseType(value);\n switch (type) {\n case 'array':\n case 'object':\n return 'an ' + type;\n case 'boolean':\n case 'date':\n case 'regexp':\n return 'a ' + type;\n default:\n return type;\n }\n }\n\n // Returns class name of the object, if any.\n function getClassName(propValue) {\n if (!propValue.constructor || !propValue.constructor.name) {\n return ANONYMOUS;\n }\n return propValue.constructor.name;\n }\n\n ReactPropTypes.checkPropTypes = checkPropTypes;\n ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/prop-types/factoryWithTypeCheckers.js?", + ); + + /***/ + }, + + /***/ 5556: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + '/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (true) {\n var ReactIs = __webpack_require__(4363);\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = __webpack_require__(4574)(ReactIs.isElement, throwOnDirectAccess);\n} else {}\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/prop-types/index.js?', + ); + + /***/ + }, + + /***/ 6925: /***/ (module) => { + 'use strict'; + eval( + "/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/prop-types/lib/ReactPropTypesSecret.js?", + ); + + /***/ + }, + + /***/ 9376: /***/ (module) => { + eval( + 'module.exports = Function.call.bind(Object.prototype.hasOwnProperty);\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/prop-types/lib/has.js?', + ); + + /***/ + }, + + /***/ 8021: /***/ (__unused_webpack_module, exports, __webpack_require__) => { + 'use strict'; + eval( + "/**\n * @license React\n * react-dom-server-legacy.node.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\nif (true) {\n (function() {\n'use strict';\n\nvar React = __webpack_require__(6540);\nvar ReactDOM = __webpack_require__(961);\nvar stream = __webpack_require__(2203);\n\nvar ReactVersion = '18.3.0-canary-670811593-20240322';\n\nvar ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n\n// by calls to these methods by a Babel plugin.\n//\n// In PROD (or in packages without access to React internals),\n// they are left as they are instead.\n\nfunction warn(format) {\n {\n {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n printWarning('warn', format, args);\n }\n }\n}\nfunction error(format) {\n {\n {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n printWarning('error', format, args);\n }\n }\n}\n\nfunction printWarning(level, format, args) {\n // When changing this logic, you might want to also\n // update consoleWithStackDev.www.js as well.\n {\n var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n var stack = ReactDebugCurrentFrame.getStackAddendum();\n\n if (stack !== '') {\n format += '%s';\n args = args.concat([stack]);\n } // eslint-disable-next-line react-internal/safe-string-coercion\n\n\n var argsWithFormat = args.map(function (item) {\n return String(item);\n }); // Careful: RN currently depends on this prefix\n\n argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it\n // breaks IE9: https://github.com/facebook/react/issues/13610\n // eslint-disable-next-line react-internal/no-production-logging\n\n Function.prototype.apply.call(console[level], console, argsWithFormat);\n }\n}\n\n// ATTENTION\n// When adding new symbols to this file,\n// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'\n// The Symbol used to tag the ReactElement-like types.\nvar REACT_ELEMENT_TYPE = Symbol.for('react.element');\nvar REACT_PORTAL_TYPE = Symbol.for('react.portal');\nvar REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');\nvar REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');\nvar REACT_PROFILER_TYPE = Symbol.for('react.profiler');\nvar REACT_PROVIDER_TYPE = Symbol.for('react.provider'); // TODO: Delete with enableRenderableContext\n\nvar REACT_CONSUMER_TYPE = Symbol.for('react.consumer');\nvar REACT_CONTEXT_TYPE = Symbol.for('react.context');\nvar REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');\nvar REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');\nvar REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');\nvar REACT_MEMO_TYPE = Symbol.for('react.memo');\nvar REACT_LAZY_TYPE = Symbol.for('react.lazy');\nvar REACT_SCOPE_TYPE = Symbol.for('react.scope');\nvar REACT_DEBUG_TRACING_MODE_TYPE = Symbol.for('react.debug_trace_mode');\nvar REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');\nvar REACT_LEGACY_HIDDEN_TYPE = Symbol.for('react.legacy_hidden');\nvar REACT_CACHE_TYPE = Symbol.for('react.cache');\nvar MAYBE_ITERATOR_SYMBOL = Symbol.iterator;\nvar FAUX_ITERATOR_SYMBOL = '@@iterator';\nfunction getIteratorFn(maybeIterable) {\n if (maybeIterable === null || typeof maybeIterable !== 'object') {\n return null;\n }\n\n var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];\n\n if (typeof maybeIterator === 'function') {\n return maybeIterator;\n }\n\n return null;\n}\n\nvar isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare\n\nfunction isArray(a) {\n return isArrayImpl(a);\n}\n\n// in case they error.\n\nvar jsxPropsParents = new WeakMap();\nvar jsxChildrenParents = new WeakMap();\nfunction objectName(object) {\n // $FlowFixMe[method-unbinding]\n var name = Object.prototype.toString.call(object);\n return name.replace(/^\\[object (.*)\\]$/, function (m, p0) {\n return p0;\n });\n}\n\nfunction describeKeyForErrorMessage(key) {\n var encodedKey = JSON.stringify(key);\n return '\"' + key + '\"' === encodedKey ? key : encodedKey;\n}\n\nfunction describeValueForErrorMessage(value) {\n switch (typeof value) {\n case 'string':\n {\n return JSON.stringify(value.length <= 10 ? value : value.slice(0, 10) + '...');\n }\n\n case 'object':\n {\n if (isArray(value)) {\n return '[...]';\n }\n\n if (value !== null && value.$$typeof === CLIENT_REFERENCE_TAG) {\n return describeClientReference();\n }\n\n var name = objectName(value);\n\n if (name === 'Object') {\n return '{...}';\n }\n\n return name;\n }\n\n case 'function':\n {\n if (value.$$typeof === CLIENT_REFERENCE_TAG) {\n return describeClientReference();\n }\n\n var _name = value.displayName || value.name;\n\n return _name ? 'function ' + _name : 'function';\n }\n\n default:\n // eslint-disable-next-line react-internal/safe-string-coercion\n return String(value);\n }\n}\n\nfunction describeElementType(type) {\n if (typeof type === 'string') {\n return type;\n }\n\n switch (type) {\n case REACT_SUSPENSE_TYPE:\n return 'Suspense';\n\n case REACT_SUSPENSE_LIST_TYPE:\n return 'SuspenseList';\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_FORWARD_REF_TYPE:\n return describeElementType(type.render);\n\n case REACT_MEMO_TYPE:\n return describeElementType(type.type);\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n // Lazy may contain any component type so we recursively resolve it.\n return describeElementType(init(payload));\n } catch (x) {}\n }\n }\n }\n\n return '';\n}\n\nvar CLIENT_REFERENCE_TAG = Symbol.for('react.client.reference');\n\nfunction describeClientReference(ref) {\n return 'client';\n}\n\nfunction describeObjectForErrorMessage(objectOrArray, expandedName) {\n var objKind = objectName(objectOrArray);\n\n if (objKind !== 'Object' && objKind !== 'Array') {\n return objKind;\n }\n\n var str = '';\n var start = -1;\n var length = 0;\n\n if (isArray(objectOrArray)) {\n if (jsxChildrenParents.has(objectOrArray)) {\n // Print JSX Children\n var type = jsxChildrenParents.get(objectOrArray);\n str = '<' + describeElementType(type) + '>';\n var array = objectOrArray;\n\n for (var i = 0; i < array.length; i++) {\n var value = array[i];\n var substr = void 0;\n\n if (typeof value === 'string') {\n substr = value;\n } else if (typeof value === 'object' && value !== null) {\n substr = '{' + describeObjectForErrorMessage(value) + '}';\n } else {\n substr = '{' + describeValueForErrorMessage(value) + '}';\n }\n\n if ('' + i === expandedName) {\n start = str.length;\n length = substr.length;\n str += substr;\n } else if (substr.length < 15 && str.length + substr.length < 40) {\n str += substr;\n } else {\n str += '{...}';\n }\n }\n\n str += '</' + describeElementType(type) + '>';\n } else {\n // Print Array\n str = '[';\n var _array = objectOrArray;\n\n for (var _i = 0; _i < _array.length; _i++) {\n if (_i > 0) {\n str += ', ';\n }\n\n var _value = _array[_i];\n\n var _substr = void 0;\n\n if (typeof _value === 'object' && _value !== null) {\n _substr = describeObjectForErrorMessage(_value);\n } else {\n _substr = describeValueForErrorMessage(_value);\n }\n\n if ('' + _i === expandedName) {\n start = str.length;\n length = _substr.length;\n str += _substr;\n } else if (_substr.length < 10 && str.length + _substr.length < 40) {\n str += _substr;\n } else {\n str += '...';\n }\n }\n\n str += ']';\n }\n } else {\n if (objectOrArray.$$typeof === REACT_ELEMENT_TYPE) {\n str = '<' + describeElementType(objectOrArray.type) + '/>';\n } else if (objectOrArray.$$typeof === CLIENT_REFERENCE_TAG) {\n return describeClientReference();\n } else if (jsxPropsParents.has(objectOrArray)) {\n // Print JSX\n var _type = jsxPropsParents.get(objectOrArray);\n\n str = '<' + (describeElementType(_type) || '...');\n var object = objectOrArray;\n var names = Object.keys(object);\n\n for (var _i2 = 0; _i2 < names.length; _i2++) {\n str += ' ';\n var name = names[_i2];\n str += describeKeyForErrorMessage(name) + '=';\n var _value2 = object[name];\n\n var _substr2 = void 0;\n\n if (name === expandedName && typeof _value2 === 'object' && _value2 !== null) {\n _substr2 = describeObjectForErrorMessage(_value2);\n } else {\n _substr2 = describeValueForErrorMessage(_value2);\n }\n\n if (typeof _value2 !== 'string') {\n _substr2 = '{' + _substr2 + '}';\n }\n\n if (name === expandedName) {\n start = str.length;\n length = _substr2.length;\n str += _substr2;\n } else if (_substr2.length < 10 && str.length + _substr2.length < 40) {\n str += _substr2;\n } else {\n str += '...';\n }\n }\n\n str += '>';\n } else {\n // Print Object\n str = '{';\n var _object = objectOrArray;\n\n var _names = Object.keys(_object);\n\n for (var _i3 = 0; _i3 < _names.length; _i3++) {\n if (_i3 > 0) {\n str += ', ';\n }\n\n var _name2 = _names[_i3];\n str += describeKeyForErrorMessage(_name2) + ': ';\n var _value3 = _object[_name2];\n\n var _substr3 = void 0;\n\n if (typeof _value3 === 'object' && _value3 !== null) {\n _substr3 = describeObjectForErrorMessage(_value3);\n } else {\n _substr3 = describeValueForErrorMessage(_value3);\n }\n\n if (_name2 === expandedName) {\n start = str.length;\n length = _substr3.length;\n str += _substr3;\n } else if (_substr3.length < 10 && str.length + _substr3.length < 40) {\n str += _substr3;\n } else {\n str += '...';\n }\n }\n\n str += '}';\n }\n }\n\n if (expandedName === undefined) {\n return str;\n }\n\n if (start > -1 && length > 0) {\n var highlight = ' '.repeat(start) + '^'.repeat(length);\n return '\\n ' + str + '\\n ' + highlight;\n }\n\n return '\\n ' + str;\n}\n\n// A pure JS implementation of a string hashing function. We do not use it for\n// security or obfuscation purposes, only to create compact hashes. So we\n// prioritize speed over collision avoidance. For example, we use this to hash\n// the component key path used by useFormState for MPA-style submissions.\n//\n// In environments where built-in hashing functions are available, we prefer\n// those instead. Like Node's crypto module, or Bun.hash. Unfortunately this\n// does not include the web standard crypto API because those methods are all\n// async. For our purposes, we need it to be sync because the cost of context\n// switching is too high to be worth it.\n//\n// The most popular hashing algorithm that meets these requirements in the JS\n// ecosystem is MurmurHash3, and almost all implementations I could find used\n// some version of the implementation by Gary Court inlined below.\nfunction createFastHashJS(key) {\n return murmurhash3_32_gc(key, 0);\n}\n/* eslint-disable prefer-const, no-fallthrough */\n\n/**\n * @license\n *\n * JS Implementation of MurmurHash3 (r136) (as of May 20, 2011)\n *\n * Copyright (c) 2011 Gary Court\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\nfunction murmurhash3_32_gc(key, seed) {\n var remainder, bytes, h1, h1b, c1, c2, k1, i;\n remainder = key.length & 3; // key.length % 4\n\n bytes = key.length - remainder;\n h1 = seed;\n c1 = 0xcc9e2d51;\n c2 = 0x1b873593;\n i = 0;\n\n while (i < bytes) {\n k1 = key.charCodeAt(i) & 0xff | (key.charCodeAt(++i) & 0xff) << 8 | (key.charCodeAt(++i) & 0xff) << 16 | (key.charCodeAt(++i) & 0xff) << 24;\n ++i;\n k1 = (k1 & 0xffff) * c1 + (((k1 >>> 16) * c1 & 0xffff) << 16) & 0xffffffff;\n k1 = k1 << 15 | k1 >>> 17;\n k1 = (k1 & 0xffff) * c2 + (((k1 >>> 16) * c2 & 0xffff) << 16) & 0xffffffff;\n h1 ^= k1;\n h1 = h1 << 13 | h1 >>> 19;\n h1b = (h1 & 0xffff) * 5 + (((h1 >>> 16) * 5 & 0xffff) << 16) & 0xffffffff;\n h1 = (h1b & 0xffff) + 0x6b64 + (((h1b >>> 16) + 0xe654 & 0xffff) << 16);\n }\n\n k1 = 0;\n\n switch (remainder) {\n case 3:\n k1 ^= (key.charCodeAt(i + 2) & 0xff) << 16;\n\n case 2:\n k1 ^= (key.charCodeAt(i + 1) & 0xff) << 8;\n\n case 1:\n k1 ^= key.charCodeAt(i) & 0xff;\n k1 = (k1 & 0xffff) * c1 + (((k1 >>> 16) * c1 & 0xffff) << 16) & 0xffffffff;\n k1 = k1 << 15 | k1 >>> 17;\n k1 = (k1 & 0xffff) * c2 + (((k1 >>> 16) * c2 & 0xffff) << 16) & 0xffffffff;\n h1 ^= k1;\n }\n\n h1 ^= key.length;\n h1 ^= h1 >>> 16;\n h1 = (h1 & 0xffff) * 0x85ebca6b + (((h1 >>> 16) * 0x85ebca6b & 0xffff) << 16) & 0xffffffff;\n h1 ^= h1 >>> 13;\n h1 = (h1 & 0xffff) * 0xc2b2ae35 + (((h1 >>> 16) * 0xc2b2ae35 & 0xffff) << 16) & 0xffffffff;\n h1 ^= h1 >>> 16;\n return h1 >>> 0;\n}\n\nfunction scheduleWork(callback) {\n callback();\n}\nfunction beginWriting(destination) {}\nfunction writeChunk(destination, chunk) {\n writeChunkAndReturn(destination, chunk);\n}\nfunction writeChunkAndReturn(destination, chunk) {\n return destination.push(chunk);\n}\nfunction completeWriting(destination) {}\nfunction close(destination) {\n destination.push(null);\n}\nfunction stringToChunk(content) {\n return content;\n}\nfunction stringToPrecomputedChunk(content) {\n return content;\n}\nfunction closeWithError(destination, error) {\n // $FlowFixMe[incompatible-call]: This is an Error object or the destination accepts other types.\n destination.destroy(error);\n}\n\nvar assign = Object.assign;\n\n/*\n * The `'' + value` pattern (used in perf-sensitive code) throws for Symbol\n * and Temporal.* types. See https://github.com/facebook/react/pull/22064.\n *\n * The functions in this module will throw an easier-to-understand,\n * easier-to-debug exception with a clear errors message message explaining the\n * problem. (Instead of a confusing exception thrown inside the implementation\n * of the `value` object).\n */\n// $FlowFixMe[incompatible-return] only called in DEV, so void return is not possible.\nfunction typeName(value) {\n {\n // toStringTag is needed for namespaced types like Temporal.Instant\n var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;\n var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object'; // $FlowFixMe[incompatible-return]\n\n return type;\n }\n} // $FlowFixMe[incompatible-return] only called in DEV, so void return is not possible.\n\n\nfunction willCoercionThrow(value) {\n {\n try {\n testStringCoercion(value);\n return false;\n } catch (e) {\n return true;\n }\n }\n}\n\nfunction testStringCoercion(value) {\n // If you ended up here by following an exception call stack, here's what's\n // happened: you supplied an object or symbol value to React (as a prop, key,\n // DOM attribute, CSS property, string ref, etc.) and when React tried to\n // coerce it to a string using `'' + value`, an exception was thrown.\n //\n // The most common types that will cause this exception are `Symbol` instances\n // and Temporal objects like `Temporal.Instant`. But any object that has a\n // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this\n // exception. (Library authors do this to prevent users from using built-in\n // numeric operators like `+` or comparison operators like `>=` because custom\n // methods are needed to perform accurate arithmetic or comparison.)\n //\n // To fix the problem, coerce this object or symbol value to a string before\n // passing it to React. The most reliable way is usually `String(value)`.\n //\n // To find which value is throwing, check the browser or debugger console.\n // Before this exception was thrown, there should be `console.error` output\n // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the\n // problem and how that type was used: key, atrribute, input value prop, etc.\n // In most cases, this console output also shows the component and its\n // ancestor components where the exception happened.\n //\n // eslint-disable-next-line react-internal/safe-string-coercion\n return '' + value;\n}\n\nfunction checkAttributeStringCoercion(value, attributeName) {\n {\n if (willCoercionThrow(value)) {\n error('The provided `%s` attribute is an unsupported type %s.' + ' This value must be coerced to a string before using it here.', attributeName, typeName(value));\n\n return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n }\n }\n}\nfunction checkOptionStringCoercion(value, propName) {\n {\n if (willCoercionThrow(value)) {\n error('The provided `%s` option is an unsupported type %s.' + ' This value must be coerced to a string before using it here.', propName, typeName(value));\n\n return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n }\n }\n}\nfunction checkCSSPropertyStringCoercion(value, propName) {\n {\n if (willCoercionThrow(value)) {\n error('The provided `%s` CSS property is an unsupported type %s.' + ' This value must be coerced to a string before using it here.', propName, typeName(value));\n\n return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n }\n }\n}\nfunction checkHtmlStringCoercion(value) {\n {\n if (willCoercionThrow(value)) {\n error('The provided HTML markup uses a value of unsupported type %s.' + ' This value must be coerced to a string before using it here.', typeName(value));\n\n return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n }\n }\n}\n\n// -----------------------------------------------------------------------------\nvar enableFloat = true; // Enables unstable_useMemoCache hook, intended as a compilation target for\n// Ready for next major.\n//\n// Alias __NEXT_MAJOR__ to false for easier skimming.\n// -----------------------------------------------------------------------------\n\nvar __NEXT_MAJOR__ = false; // Removes legacy style context\nvar enableBigIntSupport = __NEXT_MAJOR__;\n\n// $FlowFixMe[method-unbinding]\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\n/* eslint-disable max-len */\n\nvar ATTRIBUTE_NAME_START_CHAR = \":A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD\";\n/* eslint-enable max-len */\n\nvar ATTRIBUTE_NAME_CHAR = ATTRIBUTE_NAME_START_CHAR + \"\\\\-.0-9\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040\";\nvar VALID_ATTRIBUTE_NAME_REGEX = new RegExp('^[' + ATTRIBUTE_NAME_START_CHAR + '][' + ATTRIBUTE_NAME_CHAR + ']*$');\nvar illegalAttributeNameCache = {};\nvar validatedAttributeNameCache = {};\nfunction isAttributeNameSafe(attributeName) {\n if (hasOwnProperty.call(validatedAttributeNameCache, attributeName)) {\n return true;\n }\n\n if (hasOwnProperty.call(illegalAttributeNameCache, attributeName)) {\n return false;\n }\n\n if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) {\n validatedAttributeNameCache[attributeName] = true;\n return true;\n }\n\n illegalAttributeNameCache[attributeName] = true;\n\n {\n error('Invalid attribute name: `%s`', attributeName);\n }\n\n return false;\n}\n\n/**\n * CSS properties which accept numbers but are not in units of \"px\".\n */\nvar unitlessNumbers = new Set(['animationIterationCount', 'aspectRatio', 'borderImageOutset', 'borderImageSlice', 'borderImageWidth', 'boxFlex', 'boxFlexGroup', 'boxOrdinalGroup', 'columnCount', 'columns', 'flex', 'flexGrow', 'flexPositive', 'flexShrink', 'flexNegative', 'flexOrder', 'gridArea', 'gridRow', 'gridRowEnd', 'gridRowSpan', 'gridRowStart', 'gridColumn', 'gridColumnEnd', 'gridColumnSpan', 'gridColumnStart', 'fontWeight', 'lineClamp', 'lineHeight', 'opacity', 'order', 'orphans', 'scale', 'tabSize', 'widows', 'zIndex', 'zoom', 'fillOpacity', // SVG-related properties\n'floodOpacity', 'stopOpacity', 'strokeDasharray', 'strokeDashoffset', 'strokeMiterlimit', 'strokeOpacity', 'strokeWidth', 'MozAnimationIterationCount', // Known Prefixed Properties\n'MozBoxFlex', // TODO: Remove these since they shouldn't be used in modern code\n'MozBoxFlexGroup', 'MozLineClamp', 'msAnimationIterationCount', 'msFlex', 'msZoom', 'msFlexGrow', 'msFlexNegative', 'msFlexOrder', 'msFlexPositive', 'msFlexShrink', 'msGridColumn', 'msGridColumnSpan', 'msGridRow', 'msGridRowSpan', 'WebkitAnimationIterationCount', 'WebkitBoxFlex', 'WebKitBoxFlexGroup', 'WebkitBoxOrdinalGroup', 'WebkitColumnCount', 'WebkitColumns', 'WebkitFlex', 'WebkitFlexGrow', 'WebkitFlexPositive', 'WebkitFlexShrink', 'WebkitLineClamp']);\nfunction isUnitlessNumber (name) {\n return unitlessNumbers.has(name);\n}\n\nvar aliases = new Map([['acceptCharset', 'accept-charset'], ['htmlFor', 'for'], ['httpEquiv', 'http-equiv'], // HTML and SVG attributes, but the SVG attribute is case sensitive.],\n['crossOrigin', 'crossorigin'], // This is a list of all SVG attributes that need special casing.\n// Regular attributes that just accept strings.],\n['accentHeight', 'accent-height'], ['alignmentBaseline', 'alignment-baseline'], ['arabicForm', 'arabic-form'], ['baselineShift', 'baseline-shift'], ['capHeight', 'cap-height'], ['clipPath', 'clip-path'], ['clipRule', 'clip-rule'], ['colorInterpolation', 'color-interpolation'], ['colorInterpolationFilters', 'color-interpolation-filters'], ['colorProfile', 'color-profile'], ['colorRendering', 'color-rendering'], ['dominantBaseline', 'dominant-baseline'], ['enableBackground', 'enable-background'], ['fillOpacity', 'fill-opacity'], ['fillRule', 'fill-rule'], ['floodColor', 'flood-color'], ['floodOpacity', 'flood-opacity'], ['fontFamily', 'font-family'], ['fontSize', 'font-size'], ['fontSizeAdjust', 'font-size-adjust'], ['fontStretch', 'font-stretch'], ['fontStyle', 'font-style'], ['fontVariant', 'font-variant'], ['fontWeight', 'font-weight'], ['glyphName', 'glyph-name'], ['glyphOrientationHorizontal', 'glyph-orientation-horizontal'], ['glyphOrientationVertical', 'glyph-orientation-vertical'], ['horizAdvX', 'horiz-adv-x'], ['horizOriginX', 'horiz-origin-x'], ['imageRendering', 'image-rendering'], ['letterSpacing', 'letter-spacing'], ['lightingColor', 'lighting-color'], ['markerEnd', 'marker-end'], ['markerMid', 'marker-mid'], ['markerStart', 'marker-start'], ['overlinePosition', 'overline-position'], ['overlineThickness', 'overline-thickness'], ['paintOrder', 'paint-order'], ['panose-1', 'panose-1'], ['pointerEvents', 'pointer-events'], ['renderingIntent', 'rendering-intent'], ['shapeRendering', 'shape-rendering'], ['stopColor', 'stop-color'], ['stopOpacity', 'stop-opacity'], ['strikethroughPosition', 'strikethrough-position'], ['strikethroughThickness', 'strikethrough-thickness'], ['strokeDasharray', 'stroke-dasharray'], ['strokeDashoffset', 'stroke-dashoffset'], ['strokeLinecap', 'stroke-linecap'], ['strokeLinejoin', 'stroke-linejoin'], ['strokeMiterlimit', 'stroke-miterlimit'], ['strokeOpacity', 'stroke-opacity'], ['strokeWidth', 'stroke-width'], ['textAnchor', 'text-anchor'], ['textDecoration', 'text-decoration'], ['textRendering', 'text-rendering'], ['transformOrigin', 'transform-origin'], ['underlinePosition', 'underline-position'], ['underlineThickness', 'underline-thickness'], ['unicodeBidi', 'unicode-bidi'], ['unicodeRange', 'unicode-range'], ['unitsPerEm', 'units-per-em'], ['vAlphabetic', 'v-alphabetic'], ['vHanging', 'v-hanging'], ['vIdeographic', 'v-ideographic'], ['vMathematical', 'v-mathematical'], ['vectorEffect', 'vector-effect'], ['vertAdvY', 'vert-adv-y'], ['vertOriginX', 'vert-origin-x'], ['vertOriginY', 'vert-origin-y'], ['wordSpacing', 'word-spacing'], ['writingMode', 'writing-mode'], ['xmlnsXlink', 'xmlns:xlink'], ['xHeight', 'x-height']]);\nfunction getAttributeAlias (name) {\n return aliases.get(name) || name;\n}\n\nvar hasReadOnlyValue = {\n button: true,\n checkbox: true,\n image: true,\n hidden: true,\n radio: true,\n reset: true,\n submit: true\n};\nfunction checkControlledValueProps(tagName, props) {\n {\n if (!(hasReadOnlyValue[props.type] || props.onChange || props.onInput || props.readOnly || props.disabled || props.value == null)) {\n if (tagName === 'select') {\n error('You provided a `value` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultValue`. Otherwise, set `onChange`.');\n } else {\n error('You provided a `value` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`.');\n }\n }\n\n if (!(props.onChange || props.readOnly || props.disabled || props.checked == null)) {\n error('You provided a `checked` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultChecked`. Otherwise, ' + 'set either `onChange` or `readOnly`.');\n }\n }\n}\n\nvar ariaProperties = {\n 'aria-current': 0,\n // state\n 'aria-description': 0,\n 'aria-details': 0,\n 'aria-disabled': 0,\n // state\n 'aria-hidden': 0,\n // state\n 'aria-invalid': 0,\n // state\n 'aria-keyshortcuts': 0,\n 'aria-label': 0,\n 'aria-roledescription': 0,\n // Widget Attributes\n 'aria-autocomplete': 0,\n 'aria-checked': 0,\n 'aria-expanded': 0,\n 'aria-haspopup': 0,\n 'aria-level': 0,\n 'aria-modal': 0,\n 'aria-multiline': 0,\n 'aria-multiselectable': 0,\n 'aria-orientation': 0,\n 'aria-placeholder': 0,\n 'aria-pressed': 0,\n 'aria-readonly': 0,\n 'aria-required': 0,\n 'aria-selected': 0,\n 'aria-sort': 0,\n 'aria-valuemax': 0,\n 'aria-valuemin': 0,\n 'aria-valuenow': 0,\n 'aria-valuetext': 0,\n // Live Region Attributes\n 'aria-atomic': 0,\n 'aria-busy': 0,\n 'aria-live': 0,\n 'aria-relevant': 0,\n // Drag-and-Drop Attributes\n 'aria-dropeffect': 0,\n 'aria-grabbed': 0,\n // Relationship Attributes\n 'aria-activedescendant': 0,\n 'aria-colcount': 0,\n 'aria-colindex': 0,\n 'aria-colspan': 0,\n 'aria-controls': 0,\n 'aria-describedby': 0,\n 'aria-errormessage': 0,\n 'aria-flowto': 0,\n 'aria-labelledby': 0,\n 'aria-owns': 0,\n 'aria-posinset': 0,\n 'aria-rowcount': 0,\n 'aria-rowindex': 0,\n 'aria-rowspan': 0,\n 'aria-setsize': 0\n};\n\nvar warnedProperties$1 = {};\nvar rARIA$1 = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$');\nvar rARIACamel$1 = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$');\n\nfunction validateProperty$1(tagName, name) {\n {\n if (hasOwnProperty.call(warnedProperties$1, name) && warnedProperties$1[name]) {\n return true;\n }\n\n if (rARIACamel$1.test(name)) {\n var ariaName = 'aria-' + name.slice(4).toLowerCase();\n var correctName = ariaProperties.hasOwnProperty(ariaName) ? ariaName : null; // If this is an aria-* attribute, but is not listed in the known DOM\n // DOM properties, then it is an invalid aria-* attribute.\n\n if (correctName == null) {\n error('Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.', name);\n\n warnedProperties$1[name] = true;\n return true;\n } // aria-* attributes should be lowercase; suggest the lowercase version.\n\n\n if (name !== correctName) {\n error('Invalid ARIA attribute `%s`. Did you mean `%s`?', name, correctName);\n\n warnedProperties$1[name] = true;\n return true;\n }\n }\n\n if (rARIA$1.test(name)) {\n var lowerCasedName = name.toLowerCase();\n var standardName = ariaProperties.hasOwnProperty(lowerCasedName) ? lowerCasedName : null; // If this is an aria-* attribute, but is not listed in the known DOM\n // DOM properties, then it is an invalid aria-* attribute.\n\n if (standardName == null) {\n warnedProperties$1[name] = true;\n return false;\n } // aria-* attributes should be lowercase; suggest the lowercase version.\n\n\n if (name !== standardName) {\n error('Unknown ARIA attribute `%s`. Did you mean `%s`?', name, standardName);\n\n warnedProperties$1[name] = true;\n return true;\n }\n }\n }\n\n return true;\n}\n\nfunction validateProperties$2(type, props) {\n {\n var invalidProps = [];\n\n for (var key in props) {\n var isValid = validateProperty$1(type, key);\n\n if (!isValid) {\n invalidProps.push(key);\n }\n }\n\n var unknownPropString = invalidProps.map(function (prop) {\n return '`' + prop + '`';\n }).join(', ');\n\n if (invalidProps.length === 1) {\n error('Invalid aria prop %s on <%s> tag. ' + 'For details, see https://react.dev/link/invalid-aria-props', unknownPropString, type);\n } else if (invalidProps.length > 1) {\n error('Invalid aria props %s on <%s> tag. ' + 'For details, see https://react.dev/link/invalid-aria-props', unknownPropString, type);\n }\n }\n}\n\nvar didWarnValueNull = false;\nfunction validateProperties$1(type, props) {\n {\n if (type !== 'input' && type !== 'textarea' && type !== 'select') {\n return;\n }\n\n if (props != null && props.value === null && !didWarnValueNull) {\n didWarnValueNull = true;\n\n if (type === 'select' && props.multiple) {\n error('`value` prop on `%s` should not be null. ' + 'Consider using an empty array when `multiple` is set to `true` ' + 'to clear the component or `undefined` for uncontrolled components.', type);\n } else {\n error('`value` prop on `%s` should not be null. ' + 'Consider using an empty string to clear the component or `undefined` ' + 'for uncontrolled components.', type);\n }\n }\n }\n}\n\nfunction isCustomElement(tagName, props) {\n if (tagName.indexOf('-') === -1) {\n return false;\n }\n\n switch (tagName) {\n // These are reserved SVG and MathML elements.\n // We don't mind this list too much because we expect it to never grow.\n // The alternative is to track the namespace in a few places which is convoluted.\n // https://html.spec.whatwg.org/multipage/custom-elements.html#custom-elements-core-concepts\n case 'annotation-xml':\n case 'color-profile':\n case 'font-face':\n case 'font-face-src':\n case 'font-face-uri':\n case 'font-face-format':\n case 'font-face-name':\n case 'missing-glyph':\n return false;\n\n default:\n return true;\n }\n}\n\n// also add them to this module to ensure casing and incorrect name\n// warnings.\n\nvar possibleStandardNames = {\n // HTML\n accept: 'accept',\n acceptcharset: 'acceptCharset',\n 'accept-charset': 'acceptCharset',\n accesskey: 'accessKey',\n action: 'action',\n allowfullscreen: 'allowFullScreen',\n alt: 'alt',\n as: 'as',\n async: 'async',\n autocapitalize: 'autoCapitalize',\n autocomplete: 'autoComplete',\n autocorrect: 'autoCorrect',\n autofocus: 'autoFocus',\n autoplay: 'autoPlay',\n autosave: 'autoSave',\n capture: 'capture',\n cellpadding: 'cellPadding',\n cellspacing: 'cellSpacing',\n challenge: 'challenge',\n charset: 'charSet',\n checked: 'checked',\n children: 'children',\n cite: 'cite',\n class: 'className',\n classid: 'classID',\n classname: 'className',\n cols: 'cols',\n colspan: 'colSpan',\n content: 'content',\n contenteditable: 'contentEditable',\n contextmenu: 'contextMenu',\n controls: 'controls',\n controlslist: 'controlsList',\n coords: 'coords',\n crossorigin: 'crossOrigin',\n dangerouslysetinnerhtml: 'dangerouslySetInnerHTML',\n data: 'data',\n datetime: 'dateTime',\n default: 'default',\n defaultchecked: 'defaultChecked',\n defaultvalue: 'defaultValue',\n defer: 'defer',\n dir: 'dir',\n disabled: 'disabled',\n disablepictureinpicture: 'disablePictureInPicture',\n disableremoteplayback: 'disableRemotePlayback',\n download: 'download',\n draggable: 'draggable',\n enctype: 'encType',\n enterkeyhint: 'enterKeyHint',\n fetchpriority: 'fetchPriority',\n for: 'htmlFor',\n form: 'form',\n formmethod: 'formMethod',\n formaction: 'formAction',\n formenctype: 'formEncType',\n formnovalidate: 'formNoValidate',\n formtarget: 'formTarget',\n frameborder: 'frameBorder',\n headers: 'headers',\n height: 'height',\n hidden: 'hidden',\n high: 'high',\n href: 'href',\n hreflang: 'hrefLang',\n htmlfor: 'htmlFor',\n httpequiv: 'httpEquiv',\n 'http-equiv': 'httpEquiv',\n icon: 'icon',\n id: 'id',\n imagesizes: 'imageSizes',\n imagesrcset: 'imageSrcSet',\n innerhtml: 'innerHTML',\n inputmode: 'inputMode',\n integrity: 'integrity',\n is: 'is',\n itemid: 'itemID',\n itemprop: 'itemProp',\n itemref: 'itemRef',\n itemscope: 'itemScope',\n itemtype: 'itemType',\n keyparams: 'keyParams',\n keytype: 'keyType',\n kind: 'kind',\n label: 'label',\n lang: 'lang',\n list: 'list',\n loop: 'loop',\n low: 'low',\n manifest: 'manifest',\n marginwidth: 'marginWidth',\n marginheight: 'marginHeight',\n max: 'max',\n maxlength: 'maxLength',\n media: 'media',\n mediagroup: 'mediaGroup',\n method: 'method',\n min: 'min',\n minlength: 'minLength',\n multiple: 'multiple',\n muted: 'muted',\n name: 'name',\n nomodule: 'noModule',\n nonce: 'nonce',\n novalidate: 'noValidate',\n open: 'open',\n optimum: 'optimum',\n pattern: 'pattern',\n placeholder: 'placeholder',\n playsinline: 'playsInline',\n poster: 'poster',\n preload: 'preload',\n profile: 'profile',\n radiogroup: 'radioGroup',\n readonly: 'readOnly',\n referrerpolicy: 'referrerPolicy',\n rel: 'rel',\n required: 'required',\n reversed: 'reversed',\n role: 'role',\n rows: 'rows',\n rowspan: 'rowSpan',\n sandbox: 'sandbox',\n scope: 'scope',\n scoped: 'scoped',\n scrolling: 'scrolling',\n seamless: 'seamless',\n selected: 'selected',\n shape: 'shape',\n size: 'size',\n sizes: 'sizes',\n span: 'span',\n spellcheck: 'spellCheck',\n src: 'src',\n srcdoc: 'srcDoc',\n srclang: 'srcLang',\n srcset: 'srcSet',\n start: 'start',\n step: 'step',\n style: 'style',\n summary: 'summary',\n tabindex: 'tabIndex',\n target: 'target',\n title: 'title',\n type: 'type',\n usemap: 'useMap',\n value: 'value',\n width: 'width',\n wmode: 'wmode',\n wrap: 'wrap',\n // SVG\n about: 'about',\n accentheight: 'accentHeight',\n 'accent-height': 'accentHeight',\n accumulate: 'accumulate',\n additive: 'additive',\n alignmentbaseline: 'alignmentBaseline',\n 'alignment-baseline': 'alignmentBaseline',\n allowreorder: 'allowReorder',\n alphabetic: 'alphabetic',\n amplitude: 'amplitude',\n arabicform: 'arabicForm',\n 'arabic-form': 'arabicForm',\n ascent: 'ascent',\n attributename: 'attributeName',\n attributetype: 'attributeType',\n autoreverse: 'autoReverse',\n azimuth: 'azimuth',\n basefrequency: 'baseFrequency',\n baselineshift: 'baselineShift',\n 'baseline-shift': 'baselineShift',\n baseprofile: 'baseProfile',\n bbox: 'bbox',\n begin: 'begin',\n bias: 'bias',\n by: 'by',\n calcmode: 'calcMode',\n capheight: 'capHeight',\n 'cap-height': 'capHeight',\n clip: 'clip',\n clippath: 'clipPath',\n 'clip-path': 'clipPath',\n clippathunits: 'clipPathUnits',\n cliprule: 'clipRule',\n 'clip-rule': 'clipRule',\n color: 'color',\n colorinterpolation: 'colorInterpolation',\n 'color-interpolation': 'colorInterpolation',\n colorinterpolationfilters: 'colorInterpolationFilters',\n 'color-interpolation-filters': 'colorInterpolationFilters',\n colorprofile: 'colorProfile',\n 'color-profile': 'colorProfile',\n colorrendering: 'colorRendering',\n 'color-rendering': 'colorRendering',\n contentscripttype: 'contentScriptType',\n contentstyletype: 'contentStyleType',\n cursor: 'cursor',\n cx: 'cx',\n cy: 'cy',\n d: 'd',\n datatype: 'datatype',\n decelerate: 'decelerate',\n descent: 'descent',\n diffuseconstant: 'diffuseConstant',\n direction: 'direction',\n display: 'display',\n divisor: 'divisor',\n dominantbaseline: 'dominantBaseline',\n 'dominant-baseline': 'dominantBaseline',\n dur: 'dur',\n dx: 'dx',\n dy: 'dy',\n edgemode: 'edgeMode',\n elevation: 'elevation',\n enablebackground: 'enableBackground',\n 'enable-background': 'enableBackground',\n end: 'end',\n exponent: 'exponent',\n externalresourcesrequired: 'externalResourcesRequired',\n fill: 'fill',\n fillopacity: 'fillOpacity',\n 'fill-opacity': 'fillOpacity',\n fillrule: 'fillRule',\n 'fill-rule': 'fillRule',\n filter: 'filter',\n filterres: 'filterRes',\n filterunits: 'filterUnits',\n floodopacity: 'floodOpacity',\n 'flood-opacity': 'floodOpacity',\n floodcolor: 'floodColor',\n 'flood-color': 'floodColor',\n focusable: 'focusable',\n fontfamily: 'fontFamily',\n 'font-family': 'fontFamily',\n fontsize: 'fontSize',\n 'font-size': 'fontSize',\n fontsizeadjust: 'fontSizeAdjust',\n 'font-size-adjust': 'fontSizeAdjust',\n fontstretch: 'fontStretch',\n 'font-stretch': 'fontStretch',\n fontstyle: 'fontStyle',\n 'font-style': 'fontStyle',\n fontvariant: 'fontVariant',\n 'font-variant': 'fontVariant',\n fontweight: 'fontWeight',\n 'font-weight': 'fontWeight',\n format: 'format',\n from: 'from',\n fx: 'fx',\n fy: 'fy',\n g1: 'g1',\n g2: 'g2',\n glyphname: 'glyphName',\n 'glyph-name': 'glyphName',\n glyphorientationhorizontal: 'glyphOrientationHorizontal',\n 'glyph-orientation-horizontal': 'glyphOrientationHorizontal',\n glyphorientationvertical: 'glyphOrientationVertical',\n 'glyph-orientation-vertical': 'glyphOrientationVertical',\n glyphref: 'glyphRef',\n gradienttransform: 'gradientTransform',\n gradientunits: 'gradientUnits',\n hanging: 'hanging',\n horizadvx: 'horizAdvX',\n 'horiz-adv-x': 'horizAdvX',\n horizoriginx: 'horizOriginX',\n 'horiz-origin-x': 'horizOriginX',\n ideographic: 'ideographic',\n imagerendering: 'imageRendering',\n 'image-rendering': 'imageRendering',\n in2: 'in2',\n in: 'in',\n inlist: 'inlist',\n intercept: 'intercept',\n k1: 'k1',\n k2: 'k2',\n k3: 'k3',\n k4: 'k4',\n k: 'k',\n kernelmatrix: 'kernelMatrix',\n kernelunitlength: 'kernelUnitLength',\n kerning: 'kerning',\n keypoints: 'keyPoints',\n keysplines: 'keySplines',\n keytimes: 'keyTimes',\n lengthadjust: 'lengthAdjust',\n letterspacing: 'letterSpacing',\n 'letter-spacing': 'letterSpacing',\n lightingcolor: 'lightingColor',\n 'lighting-color': 'lightingColor',\n limitingconeangle: 'limitingConeAngle',\n local: 'local',\n markerend: 'markerEnd',\n 'marker-end': 'markerEnd',\n markerheight: 'markerHeight',\n markermid: 'markerMid',\n 'marker-mid': 'markerMid',\n markerstart: 'markerStart',\n 'marker-start': 'markerStart',\n markerunits: 'markerUnits',\n markerwidth: 'markerWidth',\n mask: 'mask',\n maskcontentunits: 'maskContentUnits',\n maskunits: 'maskUnits',\n mathematical: 'mathematical',\n mode: 'mode',\n numoctaves: 'numOctaves',\n offset: 'offset',\n opacity: 'opacity',\n operator: 'operator',\n order: 'order',\n orient: 'orient',\n orientation: 'orientation',\n origin: 'origin',\n overflow: 'overflow',\n overlineposition: 'overlinePosition',\n 'overline-position': 'overlinePosition',\n overlinethickness: 'overlineThickness',\n 'overline-thickness': 'overlineThickness',\n paintorder: 'paintOrder',\n 'paint-order': 'paintOrder',\n panose1: 'panose1',\n 'panose-1': 'panose1',\n pathlength: 'pathLength',\n patterncontentunits: 'patternContentUnits',\n patterntransform: 'patternTransform',\n patternunits: 'patternUnits',\n pointerevents: 'pointerEvents',\n 'pointer-events': 'pointerEvents',\n points: 'points',\n pointsatx: 'pointsAtX',\n pointsaty: 'pointsAtY',\n pointsatz: 'pointsAtZ',\n prefix: 'prefix',\n preservealpha: 'preserveAlpha',\n preserveaspectratio: 'preserveAspectRatio',\n primitiveunits: 'primitiveUnits',\n property: 'property',\n r: 'r',\n radius: 'radius',\n refx: 'refX',\n refy: 'refY',\n renderingintent: 'renderingIntent',\n 'rendering-intent': 'renderingIntent',\n repeatcount: 'repeatCount',\n repeatdur: 'repeatDur',\n requiredextensions: 'requiredExtensions',\n requiredfeatures: 'requiredFeatures',\n resource: 'resource',\n restart: 'restart',\n result: 'result',\n results: 'results',\n rotate: 'rotate',\n rx: 'rx',\n ry: 'ry',\n scale: 'scale',\n security: 'security',\n seed: 'seed',\n shaperendering: 'shapeRendering',\n 'shape-rendering': 'shapeRendering',\n slope: 'slope',\n spacing: 'spacing',\n specularconstant: 'specularConstant',\n specularexponent: 'specularExponent',\n speed: 'speed',\n spreadmethod: 'spreadMethod',\n startoffset: 'startOffset',\n stddeviation: 'stdDeviation',\n stemh: 'stemh',\n stemv: 'stemv',\n stitchtiles: 'stitchTiles',\n stopcolor: 'stopColor',\n 'stop-color': 'stopColor',\n stopopacity: 'stopOpacity',\n 'stop-opacity': 'stopOpacity',\n strikethroughposition: 'strikethroughPosition',\n 'strikethrough-position': 'strikethroughPosition',\n strikethroughthickness: 'strikethroughThickness',\n 'strikethrough-thickness': 'strikethroughThickness',\n string: 'string',\n stroke: 'stroke',\n strokedasharray: 'strokeDasharray',\n 'stroke-dasharray': 'strokeDasharray',\n strokedashoffset: 'strokeDashoffset',\n 'stroke-dashoffset': 'strokeDashoffset',\n strokelinecap: 'strokeLinecap',\n 'stroke-linecap': 'strokeLinecap',\n strokelinejoin: 'strokeLinejoin',\n 'stroke-linejoin': 'strokeLinejoin',\n strokemiterlimit: 'strokeMiterlimit',\n 'stroke-miterlimit': 'strokeMiterlimit',\n strokewidth: 'strokeWidth',\n 'stroke-width': 'strokeWidth',\n strokeopacity: 'strokeOpacity',\n 'stroke-opacity': 'strokeOpacity',\n suppresscontenteditablewarning: 'suppressContentEditableWarning',\n suppresshydrationwarning: 'suppressHydrationWarning',\n surfacescale: 'surfaceScale',\n systemlanguage: 'systemLanguage',\n tablevalues: 'tableValues',\n targetx: 'targetX',\n targety: 'targetY',\n textanchor: 'textAnchor',\n 'text-anchor': 'textAnchor',\n textdecoration: 'textDecoration',\n 'text-decoration': 'textDecoration',\n textlength: 'textLength',\n textrendering: 'textRendering',\n 'text-rendering': 'textRendering',\n to: 'to',\n transform: 'transform',\n transformorigin: 'transformOrigin',\n 'transform-origin': 'transformOrigin',\n typeof: 'typeof',\n u1: 'u1',\n u2: 'u2',\n underlineposition: 'underlinePosition',\n 'underline-position': 'underlinePosition',\n underlinethickness: 'underlineThickness',\n 'underline-thickness': 'underlineThickness',\n unicode: 'unicode',\n unicodebidi: 'unicodeBidi',\n 'unicode-bidi': 'unicodeBidi',\n unicoderange: 'unicodeRange',\n 'unicode-range': 'unicodeRange',\n unitsperem: 'unitsPerEm',\n 'units-per-em': 'unitsPerEm',\n unselectable: 'unselectable',\n valphabetic: 'vAlphabetic',\n 'v-alphabetic': 'vAlphabetic',\n values: 'values',\n vectoreffect: 'vectorEffect',\n 'vector-effect': 'vectorEffect',\n version: 'version',\n vertadvy: 'vertAdvY',\n 'vert-adv-y': 'vertAdvY',\n vertoriginx: 'vertOriginX',\n 'vert-origin-x': 'vertOriginX',\n vertoriginy: 'vertOriginY',\n 'vert-origin-y': 'vertOriginY',\n vhanging: 'vHanging',\n 'v-hanging': 'vHanging',\n videographic: 'vIdeographic',\n 'v-ideographic': 'vIdeographic',\n viewbox: 'viewBox',\n viewtarget: 'viewTarget',\n visibility: 'visibility',\n vmathematical: 'vMathematical',\n 'v-mathematical': 'vMathematical',\n vocab: 'vocab',\n widths: 'widths',\n wordspacing: 'wordSpacing',\n 'word-spacing': 'wordSpacing',\n writingmode: 'writingMode',\n 'writing-mode': 'writingMode',\n x1: 'x1',\n x2: 'x2',\n x: 'x',\n xchannelselector: 'xChannelSelector',\n xheight: 'xHeight',\n 'x-height': 'xHeight',\n xlinkactuate: 'xlinkActuate',\n 'xlink:actuate': 'xlinkActuate',\n xlinkarcrole: 'xlinkArcrole',\n 'xlink:arcrole': 'xlinkArcrole',\n xlinkhref: 'xlinkHref',\n 'xlink:href': 'xlinkHref',\n xlinkrole: 'xlinkRole',\n 'xlink:role': 'xlinkRole',\n xlinkshow: 'xlinkShow',\n 'xlink:show': 'xlinkShow',\n xlinktitle: 'xlinkTitle',\n 'xlink:title': 'xlinkTitle',\n xlinktype: 'xlinkType',\n 'xlink:type': 'xlinkType',\n xmlbase: 'xmlBase',\n 'xml:base': 'xmlBase',\n xmllang: 'xmlLang',\n 'xml:lang': 'xmlLang',\n xmlns: 'xmlns',\n 'xml:space': 'xmlSpace',\n xmlnsxlink: 'xmlnsXlink',\n 'xmlns:xlink': 'xmlnsXlink',\n xmlspace: 'xmlSpace',\n y1: 'y1',\n y2: 'y2',\n y: 'y',\n ychannelselector: 'yChannelSelector',\n z: 'z',\n zoomandpan: 'zoomAndPan'\n};\n\nvar warnedProperties = {};\nvar EVENT_NAME_REGEX = /^on./;\nvar INVALID_EVENT_NAME_REGEX = /^on[^A-Z]/;\nvar rARIA = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$') ;\nvar rARIACamel = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$') ;\n\nfunction validateProperty(tagName, name, value, eventRegistry) {\n {\n if (hasOwnProperty.call(warnedProperties, name) && warnedProperties[name]) {\n return true;\n }\n\n var lowerCasedName = name.toLowerCase();\n\n if (lowerCasedName === 'onfocusin' || lowerCasedName === 'onfocusout') {\n error('React uses onFocus and onBlur instead of onFocusIn and onFocusOut. ' + 'All React events are normalized to bubble, so onFocusIn and onFocusOut ' + 'are not needed/supported by React.');\n\n warnedProperties[name] = true;\n return true;\n }\n\n {\n // Actions are special because unlike events they can have other value types.\n if (typeof value === 'function') {\n if (tagName === 'form' && name === 'action') {\n return true;\n }\n\n if (tagName === 'input' && name === 'formAction') {\n return true;\n }\n\n if (tagName === 'button' && name === 'formAction') {\n return true;\n }\n }\n } // We can't rely on the event system being injected on the server.\n\n\n if (eventRegistry != null) {\n var registrationNameDependencies = eventRegistry.registrationNameDependencies,\n possibleRegistrationNames = eventRegistry.possibleRegistrationNames;\n\n if (registrationNameDependencies.hasOwnProperty(name)) {\n return true;\n }\n\n var registrationName = possibleRegistrationNames.hasOwnProperty(lowerCasedName) ? possibleRegistrationNames[lowerCasedName] : null;\n\n if (registrationName != null) {\n error('Invalid event handler property `%s`. Did you mean `%s`?', name, registrationName);\n\n warnedProperties[name] = true;\n return true;\n }\n\n if (EVENT_NAME_REGEX.test(name)) {\n error('Unknown event handler property `%s`. It will be ignored.', name);\n\n warnedProperties[name] = true;\n return true;\n }\n } else if (EVENT_NAME_REGEX.test(name)) {\n // If no event plugins have been injected, we are in a server environment.\n // So we can't tell if the event name is correct for sure, but we can filter\n // out known bad ones like `onclick`. We can't suggest a specific replacement though.\n if (INVALID_EVENT_NAME_REGEX.test(name)) {\n error('Invalid event handler property `%s`. ' + 'React events use the camelCase naming convention, for example `onClick`.', name);\n }\n\n warnedProperties[name] = true;\n return true;\n } // Let the ARIA attribute hook validate ARIA attributes\n\n\n if (rARIA.test(name) || rARIACamel.test(name)) {\n return true;\n }\n\n if (lowerCasedName === 'innerhtml') {\n error('Directly setting property `innerHTML` is not permitted. ' + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.');\n\n warnedProperties[name] = true;\n return true;\n }\n\n if (lowerCasedName === 'aria') {\n error('The `aria` attribute is reserved for future use in React. ' + 'Pass individual `aria-` attributes instead.');\n\n warnedProperties[name] = true;\n return true;\n }\n\n if (lowerCasedName === 'is' && value !== null && value !== undefined && typeof value !== 'string') {\n error('Received a `%s` for a string attribute `is`. If this is expected, cast ' + 'the value to a string.', typeof value);\n\n warnedProperties[name] = true;\n return true;\n }\n\n if (typeof value === 'number' && isNaN(value)) {\n error('Received NaN for the `%s` attribute. If this is expected, cast ' + 'the value to a string.', name);\n\n warnedProperties[name] = true;\n return true;\n } // Known attributes should match the casing specified in the property config.\n\n\n if (possibleStandardNames.hasOwnProperty(lowerCasedName)) {\n var standardName = possibleStandardNames[lowerCasedName];\n\n if (standardName !== name) {\n error('Invalid DOM property `%s`. Did you mean `%s`?', name, standardName);\n\n warnedProperties[name] = true;\n return true;\n }\n } else if (name !== lowerCasedName) {\n // Unknown attributes should have lowercase casing since that's how they\n // will be cased anyway with server rendering.\n error('React does not recognize the `%s` prop on a DOM element. If you ' + 'intentionally want it to appear in the DOM as a custom ' + 'attribute, spell it as lowercase `%s` instead. ' + 'If you accidentally passed it from a parent component, remove ' + 'it from the DOM element.', name, lowerCasedName);\n\n warnedProperties[name] = true;\n return true;\n } // Now that we've validated casing, do not validate\n // data types for reserved props\n\n\n switch (name) {\n case 'dangerouslySetInnerHTML':\n case 'children':\n case 'style':\n case 'suppressContentEditableWarning':\n case 'suppressHydrationWarning':\n case 'defaultValue': // Reserved\n\n case 'defaultChecked':\n case 'innerHTML':\n case 'ref':\n {\n return true;\n }\n\n }\n\n switch (typeof value) {\n case 'boolean':\n {\n switch (name) {\n case 'autoFocus':\n case 'checked':\n case 'multiple':\n case 'muted':\n case 'selected':\n case 'contentEditable':\n case 'spellCheck':\n case 'draggable':\n case 'value':\n case 'autoReverse':\n case 'externalResourcesRequired':\n case 'focusable':\n case 'preserveAlpha':\n case 'allowFullScreen':\n case 'async':\n case 'autoPlay':\n case 'controls':\n case 'default':\n case 'defer':\n case 'disabled':\n case 'disablePictureInPicture':\n case 'disableRemotePlayback':\n case 'formNoValidate':\n case 'hidden':\n case 'loop':\n case 'noModule':\n case 'noValidate':\n case 'open':\n case 'playsInline':\n case 'readOnly':\n case 'required':\n case 'reversed':\n case 'scoped':\n case 'seamless':\n case 'itemScope':\n case 'capture':\n case 'download':\n {\n // Boolean properties can accept boolean values\n return true;\n }\n // fallthrough\n\n case 'inert':\n // fallthrough for new boolean props without the flag on\n\n default:\n {\n var prefix = name.toLowerCase().slice(0, 5);\n\n if (prefix === 'data-' || prefix === 'aria-') {\n return true;\n }\n\n if (value) {\n error('Received `%s` for a non-boolean attribute `%s`.\\n\\n' + 'If you want to write it to the DOM, pass a string instead: ' + '%s=\"%s\" or %s={value.toString()}.', value, name, name, value, name);\n } else {\n error('Received `%s` for a non-boolean attribute `%s`.\\n\\n' + 'If you want to write it to the DOM, pass a string instead: ' + '%s=\"%s\" or %s={value.toString()}.\\n\\n' + 'If you used to conditionally omit it with %s={condition && value}, ' + 'pass %s={condition ? value : undefined} instead.', value, name, name, value, name, name, name);\n }\n\n warnedProperties[name] = true;\n return true;\n }\n }\n }\n\n case 'function':\n case 'symbol':\n // eslint-disable-line\n // Warn when a known attribute is a bad type\n warnedProperties[name] = true;\n return false;\n\n case 'string':\n {\n // Warn when passing the strings 'false' or 'true' into a boolean prop\n if (value === 'false' || value === 'true') {\n switch (name) {\n case 'checked':\n case 'selected':\n case 'multiple':\n case 'muted':\n case 'allowFullScreen':\n case 'async':\n case 'autoPlay':\n case 'controls':\n case 'default':\n case 'defer':\n case 'disabled':\n case 'disablePictureInPicture':\n case 'disableRemotePlayback':\n case 'formNoValidate':\n case 'hidden':\n case 'loop':\n case 'noModule':\n case 'noValidate':\n case 'open':\n case 'playsInline':\n case 'readOnly':\n case 'required':\n case 'reversed':\n case 'scoped':\n case 'seamless':\n case 'itemScope':\n {\n break;\n }\n\n case 'inert':\n // fallthrough for new boolean props without the flag on\n\n default:\n {\n return true;\n }\n }\n\n error('Received the string `%s` for the boolean attribute `%s`. ' + '%s ' + 'Did you mean %s={%s}?', value, name, value === 'false' ? 'The browser will interpret it as a truthy value.' : 'Although this works, it will not work as expected if you pass the string \"false\".', name, value);\n\n warnedProperties[name] = true;\n return true;\n }\n }\n }\n\n return true;\n }\n}\n\nfunction warnUnknownProperties(type, props, eventRegistry) {\n {\n var unknownProps = [];\n\n for (var key in props) {\n var isValid = validateProperty(type, key, props[key], eventRegistry);\n\n if (!isValid) {\n unknownProps.push(key);\n }\n }\n\n var unknownPropString = unknownProps.map(function (prop) {\n return '`' + prop + '`';\n }).join(', ');\n\n if (unknownProps.length === 1) {\n error('Invalid value for prop %s on <%s> tag. Either remove it from the element, ' + 'or pass a string or number value to keep it in the DOM. ' + 'For details, see https://react.dev/link/attribute-behavior ', unknownPropString, type);\n } else if (unknownProps.length > 1) {\n error('Invalid values for props %s on <%s> tag. Either remove them from the element, ' + 'or pass a string or number value to keep them in the DOM. ' + 'For details, see https://react.dev/link/attribute-behavior ', unknownPropString, type);\n }\n }\n}\n\nfunction validateProperties(type, props, eventRegistry) {\n if (isCustomElement(type) || typeof props.is === 'string') {\n return;\n }\n\n warnUnknownProperties(type, props, eventRegistry);\n}\n\n// 'msTransform' is correct, but the other prefixes should be capitalized\nvar badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/;\nvar msPattern$1 = /^-ms-/;\nvar hyphenPattern = /-(.)/g; // style values shouldn't contain a semicolon\n\nvar badStyleValueWithSemicolonPattern = /;\\s*$/;\nvar warnedStyleNames = {};\nvar warnedStyleValues = {};\nvar warnedForNaNValue = false;\nvar warnedForInfinityValue = false;\n\nfunction camelize(string) {\n return string.replace(hyphenPattern, function (_, character) {\n return character.toUpperCase();\n });\n}\n\nfunction warnHyphenatedStyleName(name) {\n {\n if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {\n return;\n }\n\n warnedStyleNames[name] = true;\n\n error('Unsupported style property %s. Did you mean %s?', name, // As Andi Smith suggests\n // (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix\n // is converted to lowercase `ms`.\n camelize(name.replace(msPattern$1, 'ms-')));\n }\n}\n\nfunction warnBadVendoredStyleName(name) {\n {\n if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {\n return;\n }\n\n warnedStyleNames[name] = true;\n\n error('Unsupported vendor-prefixed style property %s. Did you mean %s?', name, name.charAt(0).toUpperCase() + name.slice(1));\n }\n}\n\nfunction warnStyleValueWithSemicolon(name, value) {\n {\n if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) {\n return;\n }\n\n warnedStyleValues[value] = true;\n\n error(\"Style property values shouldn't contain a semicolon. \" + 'Try \"%s: %s\" instead.', name, value.replace(badStyleValueWithSemicolonPattern, ''));\n }\n}\n\nfunction warnStyleValueIsNaN(name, value) {\n {\n if (warnedForNaNValue) {\n return;\n }\n\n warnedForNaNValue = true;\n\n error('`NaN` is an invalid value for the `%s` css style property.', name);\n }\n}\n\nfunction warnStyleValueIsInfinity(name, value) {\n {\n if (warnedForInfinityValue) {\n return;\n }\n\n warnedForInfinityValue = true;\n\n error('`Infinity` is an invalid value for the `%s` css style property.', name);\n }\n}\n\nfunction warnValidStyle(name, value) {\n {\n if (name.indexOf('-') > -1) {\n warnHyphenatedStyleName(name);\n } else if (badVendoredStyleNamePattern.test(name)) {\n warnBadVendoredStyleName(name);\n } else if (badStyleValueWithSemicolonPattern.test(value)) {\n warnStyleValueWithSemicolon(name, value);\n }\n\n if (typeof value === 'number') {\n if (isNaN(value)) {\n warnStyleValueIsNaN(name);\n } else if (!isFinite(value)) {\n warnStyleValueIsInfinity(name);\n }\n }\n }\n}\n\nfunction getCrossOriginString(input) {\n if (typeof input === 'string') {\n return input === 'use-credentials' ? input : '';\n }\n\n return undefined;\n}\n\n// code copied and modified from escape-html\nvar matchHtmlRegExp = /[\"'&<>]/;\n/**\n * Escapes special characters and HTML entities in a given html string.\n *\n * @param {string} string HTML string to escape for later insertion\n * @return {string}\n * @public\n */\n\nfunction escapeHtml(string) {\n {\n checkHtmlStringCoercion(string);\n }\n\n var str = '' + string;\n var match = matchHtmlRegExp.exec(str);\n\n if (!match) {\n return str;\n }\n\n var escape;\n var html = '';\n var index;\n var lastIndex = 0;\n\n for (index = match.index; index < str.length; index++) {\n switch (str.charCodeAt(index)) {\n case 34:\n // \"\n escape = '"';\n break;\n\n case 38:\n // &\n escape = '&';\n break;\n\n case 39:\n // '\n escape = '''; // modified from escape-html; used to be '''\n\n break;\n\n case 60:\n // <\n escape = '<';\n break;\n\n case 62:\n // >\n escape = '>';\n break;\n\n default:\n continue;\n }\n\n if (lastIndex !== index) {\n html += str.slice(lastIndex, index);\n }\n\n lastIndex = index + 1;\n html += escape;\n }\n\n return lastIndex !== index ? html + str.slice(lastIndex, index) : html;\n} // end code copied and modified from escape-html\n\n/**\n * Escapes text to prevent scripting attacks.\n *\n * @param {*} text Text value to escape.\n * @return {string} An escaped string.\n */\n\n\nfunction escapeTextForBrowser(text) {\n if (typeof text === 'boolean' || typeof text === 'number' || enableBigIntSupport ) {\n // this shortcircuit helps perf for types that we know will never have\n // special characters, especially given that this function is used often\n // for numeric dom ids.\n return '' + text;\n }\n\n return escapeHtml(text);\n}\n\nvar uppercasePattern = /([A-Z])/g;\nvar msPattern = /^ms-/;\n/**\n * Hyphenates a camelcased CSS property name, for example:\n *\n * > hyphenateStyleName('backgroundColor')\n * < \"background-color\"\n * > hyphenateStyleName('MozTransition')\n * < \"-moz-transition\"\n * > hyphenateStyleName('msTransition')\n * < \"-ms-transition\"\n *\n * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix\n * is converted to `-ms-`.\n */\n\nfunction hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}\n\n// and any newline or tab are filtered out as if they're not part of the URL.\n// https://url.spec.whatwg.org/#url-parsing\n// Tab or newline are defined as \\r\\n\\t:\n// https://infra.spec.whatwg.org/#ascii-tab-or-newline\n// A C0 control is a code point in the range \\u0000 NULL to \\u001F\n// INFORMATION SEPARATOR ONE, inclusive:\n// https://infra.spec.whatwg.org/#c0-control-or-space\n\n/* eslint-disable max-len */\n\nvar isJavaScriptProtocol = /^[\\u0000-\\u001F ]*j[\\r\\n\\t]*a[\\r\\n\\t]*v[\\r\\n\\t]*a[\\r\\n\\t]*s[\\r\\n\\t]*c[\\r\\n\\t]*r[\\r\\n\\t]*i[\\r\\n\\t]*p[\\r\\n\\t]*t[\\r\\n\\t]*\\:/i;\nvar didWarn = false;\n\nfunction sanitizeURL(url) {\n // We should never have symbols here because they get filtered out elsewhere.\n // eslint-disable-next-line react-internal/safe-string-coercion\n var stringifiedURL = '' + url;\n\n {\n if (!didWarn && isJavaScriptProtocol.test(stringifiedURL)) {\n didWarn = true;\n\n error('A future version of React will block javascript: URLs as a security precaution. ' + 'Use event handlers instead if you can. If you need to generate unsafe HTML try ' + 'using dangerouslySetInnerHTML instead. React was passed %s.', JSON.stringify(stringifiedURL));\n }\n }\n\n return url;\n}\n\n// The build script is at scripts/rollup/generate-inline-fizz-runtime.js.\n// Run `yarn generate-inline-fizz-runtime` to generate.\nvar clientRenderBoundary = '$RX=function(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data=\"$!\",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())};';\nvar completeBoundary = '$RC=function(b,c,e){c=document.getElementById(c);c.parentNode.removeChild(c);var a=document.getElementById(b);if(a){b=a.previousSibling;if(e)b.data=\"$!\",a.setAttribute(\"data-dgst\",e);else{e=b.parentNode;a=b.nextSibling;var f=0;do{if(a&&8===a.nodeType){var d=a.data;if(\"/$\"===d)if(0===f)break;else f--;else\"$\"!==d&&\"$?\"!==d&&\"$!\"!==d||f++}d=a.nextSibling;e.removeChild(a);a=d}while(a);for(;c.firstChild;)e.insertBefore(c.firstChild,a);b.data=\"$\"}b._reactRetry&&b._reactRetry()}};';\nvar completeBoundaryWithStyles = '$RM=new Map;\\n$RR=function(r,t,w){for(var u=$RC,n=$RM,p=new Map,q=document,g,b,h=q.querySelectorAll(\"link[data-precedence],style[data-precedence]\"),v=[],k=0;b=h[k++];)\"not all\"===b.getAttribute(\"media\")?v.push(b):(\"LINK\"===b.tagName&&n.set(b.getAttribute(\"href\"),b),p.set(b.dataset.precedence,g=b));b=0;h=[];var l,a;for(k=!0;;){if(k){var f=w[b++];if(!f){k=!1;b=0;continue}var c=!1,m=0;var d=f[m++];if(a=n.get(d)){var e=a._p;c=!0}else{a=q.createElement(\"link\");a.href=d;a.rel=\"stylesheet\";for(a.dataset.precedence=\\nl=f[m++];e=f[m++];)a.setAttribute(e,f[m++]);e=a._p=new Promise(function(x,y){a.onload=x;a.onerror=y});n.set(d,a)}d=a.getAttribute(\"media\");!e||\"l\"===e.s||d&&!matchMedia(d).matches||h.push(e);if(c)continue}else{a=v[b++];if(!a)break;l=a.getAttribute(\"data-precedence\");a.removeAttribute(\"media\")}c=p.get(l)||g;c===g&&(g=a);p.set(l,a);c?c.parentNode.insertBefore(a,c.nextSibling):(c=q.head,c.insertBefore(a,c.firstChild))}Promise.all(h).then(u.bind(null,r,t,\"\"),u.bind(null,r,t,\"Resource failed to load\"))};';\nvar completeSegment = '$RS=function(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};';\nvar formReplaying = 'addEventListener(\"submit\",function(a){if(!a.defaultPrevented){var c=a.target,d=a.submitter,e=c.action,b=d;if(d){var f=d.getAttribute(\"formAction\");null!=f&&(e=f,b=null)}\"javascript:throw new Error(\\'React form unexpectedly submitted.\\')\"===e&&(a.preventDefault(),b?(a=document.createElement(\"input\"),a.name=b.name,a.value=b.value,b.parentNode.insertBefore(a,b),b=new FormData(c),a.parentNode.removeChild(a)):b=new FormData(c),a=c.ownerDocument||c,(a.$$reactFormReplay=a.$$reactFormReplay||[]).push(c,d,b))}});';\n\nfunction getValueDescriptorExpectingObjectForWarning(thing) {\n return thing === null ? '`null`' : thing === undefined ? '`undefined`' : thing === '' ? 'an empty string' : \"something with type \\\"\" + typeof thing + \"\\\"\";\n}\n\n// same object across all transitions.\n\nvar sharedNotPendingObject = {\n pending: false,\n data: null,\n method: null,\n action: null\n};\nvar NotPending = Object.freeze(sharedNotPendingObject) ;\n\nvar ReactDOMSharedInternals = ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n\nvar ReactDOMCurrentDispatcher = ReactDOMSharedInternals.ReactDOMCurrentDispatcher;\nvar previousDispatcher = ReactDOMCurrentDispatcher.current;\nReactDOMCurrentDispatcher.current = {\n prefetchDNS: prefetchDNS,\n preconnect: preconnect,\n preload: preload,\n preloadModule: preloadModule,\n preinitScript: preinitScript,\n preinitStyle: preinitStyle,\n preinitModuleScript: preinitModuleScript\n}; // We make every property of the descriptor optional because it is not a contract that\nvar ScriptStreamingFormat = 0;\nvar DataStreamingFormat = 1;\nvar NothingSent\n/* */\n= 0;\nvar SentCompleteSegmentFunction\n/* */\n= 1;\nvar SentCompleteBoundaryFunction\n/* */\n= 2;\nvar SentClientRenderFunction\n/* */\n= 4;\nvar SentStyleInsertionFunction\n/* */\n= 8;\nvar SentFormReplayingRuntime\n/* */\n= 16; // Per request, global state that is not contextual to the rendering subtree.\n// This cannot be resumed and therefore should only contain things that are\n// temporary working state or are never used in the prerender pass.\n// Credentials here are things that affect whether a browser will make a request\n// as well as things that affect which connection the browser will use for that request.\n// We want these to be aligned across preloads and resources because otherwise the preload\n// will be wasted.\n// We investigated whether referrerPolicy should be included here but from experimentation\n// it seems that browsers do not treat this as part of the http cache key and does not affect\n// which connection is used.\n\nvar EXISTS = null; // This constant is to mark preloads that have no unique credentials\n// to convey. It should never be checked by identity and we should not\n// assume Preload values in ResumableState equal this value because they\n// will have come from some parsed input.\n\nvar PRELOAD_NO_CREDS = [];\n\n{\n Object.freeze(PRELOAD_NO_CREDS);\n} // Per response, global state that is not contextual to the rendering subtree.\n// This is resumable and therefore should be serializable.\n\n\nvar dataElementQuotedEnd = stringToPrecomputedChunk('\"></template>');\nvar startInlineScript = stringToPrecomputedChunk('<script>');\nvar endInlineScript = stringToPrecomputedChunk('</script>');\nvar startScriptSrc = stringToPrecomputedChunk('<script src=\"');\nvar startModuleSrc = stringToPrecomputedChunk('<script type=\"module\" src=\"');\nvar scriptNonce = stringToPrecomputedChunk('\" nonce=\"');\nvar scriptIntegirty = stringToPrecomputedChunk('\" integrity=\"');\nvar scriptCrossOrigin = stringToPrecomputedChunk('\" crossorigin=\"');\nvar endAsyncScript = stringToPrecomputedChunk('\" async=\"\"></script>');\n/**\n * This escaping function is designed to work with bootstrapScriptContent and importMap only.\n * because we know we are escaping the entire script. We can avoid for instance\n * escaping html comment string sequences that are valid javascript as well because\n * if there are no sebsequent <script sequences the html parser will never enter\n * script data double escaped state (see: https://www.w3.org/TR/html53/syntax.html#script-data-double-escaped-state)\n *\n * While untrusted script content should be made safe before using this api it will\n * ensure that the script cannot be early terminated or never terminated state\n */\n\nfunction escapeBootstrapAndImportMapScriptContent(scriptText) {\n {\n checkHtmlStringCoercion(scriptText);\n }\n\n return ('' + scriptText).replace(scriptRegex, scriptReplacer);\n}\n\nvar scriptRegex = /(<\\/|<)(s)(cript)/gi;\n\nvar scriptReplacer = function (match, prefix, s, suffix) {\n return \"\" + prefix + (s === 's' ? \"\\\\u0073\" : \"\\\\u0053\") + suffix;\n};\n\nvar importMapScriptStart = stringToPrecomputedChunk('<script type=\"importmap\">');\nvar importMapScriptEnd = stringToPrecomputedChunk('</script>'); // Since we store headers as strings we deal with their length in utf16 code units\n// rather than visual characters or the utf8 encoding that is used for most binary\n// serialization. Some common HTTP servers only allow for headers to be 4kB in length.\n// We choose a default length that is likely to be well under this already limited length however\n// pathological cases may still cause the utf-8 encoding of the headers to approach this limit.\n// It should also be noted that this maximum is a soft maximum. we have not reached the limit we will\n// allow one more header to be captured which means in practice if the limit is approached it will be exceeded\n\nvar DEFAULT_HEADERS_CAPACITY_IN_UTF16_CODE_UNITS = 2000;\n// if passed externalRuntimeConfig and the enableFizzExternalRuntime feature flag\n// is set, the server will send instructions via data attributes (instead of inline scripts)\n\n\nfunction createRenderState$1(resumableState, nonce, externalRuntimeConfig, importMap, onHeaders, maxHeadersLength) {\n var inlineScriptWithNonce = nonce === undefined ? startInlineScript : stringToPrecomputedChunk('<script nonce=\"' + escapeTextForBrowser(nonce) + '\">');\n var idPrefix = resumableState.idPrefix;\n var bootstrapChunks = [];\n var externalRuntimeScript = null;\n var bootstrapScriptContent = resumableState.bootstrapScriptContent,\n bootstrapScripts = resumableState.bootstrapScripts,\n bootstrapModules = resumableState.bootstrapModules;\n\n if (bootstrapScriptContent !== undefined) {\n bootstrapChunks.push(inlineScriptWithNonce, stringToChunk(escapeBootstrapAndImportMapScriptContent(bootstrapScriptContent)), endInlineScript);\n }\n\n {\n\n if (externalRuntimeConfig !== undefined) {\n if (typeof externalRuntimeConfig === 'string') {\n externalRuntimeScript = {\n src: externalRuntimeConfig,\n chunks: []\n };\n pushScriptImpl(externalRuntimeScript.chunks, {\n src: externalRuntimeConfig,\n async: true,\n integrity: undefined,\n nonce: nonce\n });\n } else {\n externalRuntimeScript = {\n src: externalRuntimeConfig.src,\n chunks: []\n };\n pushScriptImpl(externalRuntimeScript.chunks, {\n src: externalRuntimeConfig.src,\n async: true,\n integrity: externalRuntimeConfig.integrity,\n nonce: nonce\n });\n }\n }\n }\n\n var importMapChunks = [];\n\n if (importMap !== undefined) {\n var map = importMap;\n importMapChunks.push(importMapScriptStart);\n importMapChunks.push(stringToChunk(escapeBootstrapAndImportMapScriptContent(JSON.stringify(map))));\n importMapChunks.push(importMapScriptEnd);\n }\n\n {\n if (onHeaders && typeof maxHeadersLength === 'number') {\n if (maxHeadersLength <= 0) {\n error('React expected a positive non-zero `maxHeadersLength` option but found %s instead. When using the `onHeaders` option you may supply an optional `maxHeadersLength` option as well however, when setting this value to zero or less no headers will be captured.', maxHeadersLength === 0 ? 'zero' : maxHeadersLength);\n }\n }\n }\n\n var headers = onHeaders ? {\n preconnects: '',\n fontPreloads: '',\n highImagePreloads: '',\n remainingCapacity: typeof maxHeadersLength === 'number' ? maxHeadersLength : DEFAULT_HEADERS_CAPACITY_IN_UTF16_CODE_UNITS\n } : null;\n var renderState = {\n placeholderPrefix: stringToPrecomputedChunk(idPrefix + 'P:'),\n segmentPrefix: stringToPrecomputedChunk(idPrefix + 'S:'),\n boundaryPrefix: stringToPrecomputedChunk(idPrefix + 'B:'),\n startInlineScript: inlineScriptWithNonce,\n htmlChunks: null,\n headChunks: null,\n externalRuntimeScript: externalRuntimeScript,\n bootstrapChunks: bootstrapChunks,\n importMapChunks: importMapChunks,\n onHeaders: onHeaders,\n headers: headers,\n resets: {\n font: {},\n dns: {},\n connect: {\n default: {},\n anonymous: {},\n credentials: {}\n },\n image: {},\n style: {}\n },\n charsetChunks: [],\n viewportChunks: [],\n hoistableChunks: [],\n // cleared on flush\n preconnects: new Set(),\n fontPreloads: new Set(),\n highImagePreloads: new Set(),\n // usedImagePreloads: new Set(),\n styles: new Map(),\n bootstrapScripts: new Set(),\n scripts: new Set(),\n bulkPreloads: new Set(),\n preloads: {\n images: new Map(),\n stylesheets: new Map(),\n scripts: new Map(),\n moduleScripts: new Map()\n },\n nonce: nonce,\n // like a module global for currently rendering boundary\n hoistableState: null,\n stylesToHoist: false\n };\n\n if (bootstrapScripts !== undefined) {\n for (var i = 0; i < bootstrapScripts.length; i++) {\n var scriptConfig = bootstrapScripts[i];\n var src = void 0,\n crossOrigin = void 0,\n integrity = void 0;\n var props = {\n rel: 'preload',\n as: 'script',\n fetchPriority: 'low',\n nonce: nonce\n };\n\n if (typeof scriptConfig === 'string') {\n props.href = src = scriptConfig;\n } else {\n props.href = src = scriptConfig.src;\n props.integrity = integrity = typeof scriptConfig.integrity === 'string' ? scriptConfig.integrity : undefined;\n props.crossOrigin = crossOrigin = typeof scriptConfig === 'string' || scriptConfig.crossOrigin == null ? undefined : scriptConfig.crossOrigin === 'use-credentials' ? 'use-credentials' : '';\n }\n\n preloadBootstrapScriptOrModule(resumableState, renderState, src, props);\n bootstrapChunks.push(startScriptSrc, stringToChunk(escapeTextForBrowser(src)));\n\n if (nonce) {\n bootstrapChunks.push(scriptNonce, stringToChunk(escapeTextForBrowser(nonce)));\n }\n\n if (typeof integrity === 'string') {\n bootstrapChunks.push(scriptIntegirty, stringToChunk(escapeTextForBrowser(integrity)));\n }\n\n if (typeof crossOrigin === 'string') {\n bootstrapChunks.push(scriptCrossOrigin, stringToChunk(escapeTextForBrowser(crossOrigin)));\n }\n\n bootstrapChunks.push(endAsyncScript);\n }\n }\n\n if (bootstrapModules !== undefined) {\n for (var _i = 0; _i < bootstrapModules.length; _i++) {\n var _scriptConfig = bootstrapModules[_i];\n\n var _src = void 0,\n _crossOrigin = void 0,\n _integrity = void 0;\n\n var _props = {\n rel: 'modulepreload',\n fetchPriority: 'low',\n nonce: nonce\n };\n\n if (typeof _scriptConfig === 'string') {\n _props.href = _src = _scriptConfig;\n } else {\n _props.href = _src = _scriptConfig.src;\n _props.integrity = _integrity = typeof _scriptConfig.integrity === 'string' ? _scriptConfig.integrity : undefined;\n _props.crossOrigin = _crossOrigin = typeof _scriptConfig === 'string' || _scriptConfig.crossOrigin == null ? undefined : _scriptConfig.crossOrigin === 'use-credentials' ? 'use-credentials' : '';\n }\n\n preloadBootstrapScriptOrModule(resumableState, renderState, _src, _props);\n bootstrapChunks.push(startModuleSrc, stringToChunk(escapeTextForBrowser(_src)));\n\n if (nonce) {\n bootstrapChunks.push(scriptNonce, stringToChunk(escapeTextForBrowser(nonce)));\n }\n\n if (typeof _integrity === 'string') {\n bootstrapChunks.push(scriptIntegirty, stringToChunk(escapeTextForBrowser(_integrity)));\n }\n\n if (typeof _crossOrigin === 'string') {\n bootstrapChunks.push(scriptCrossOrigin, stringToChunk(escapeTextForBrowser(_crossOrigin)));\n }\n\n bootstrapChunks.push(endAsyncScript);\n }\n }\n\n return renderState;\n}\nfunction createResumableState(identifierPrefix, externalRuntimeConfig, bootstrapScriptContent, bootstrapScripts, bootstrapModules) {\n var idPrefix = identifierPrefix === undefined ? '' : identifierPrefix;\n var streamingFormat = ScriptStreamingFormat;\n\n {\n if (externalRuntimeConfig !== undefined) {\n streamingFormat = DataStreamingFormat;\n }\n }\n\n return {\n idPrefix: idPrefix,\n nextFormID: 0,\n streamingFormat: streamingFormat,\n bootstrapScriptContent: bootstrapScriptContent,\n bootstrapScripts: bootstrapScripts,\n bootstrapModules: bootstrapModules,\n instructions: NothingSent,\n hasBody: false,\n hasHtml: false,\n // @TODO add bootstrap script to implicit preloads\n // persistent\n unknownResources: {},\n dnsResources: {},\n connectResources: {\n default: {},\n anonymous: {},\n credentials: {}\n },\n imageResources: {},\n styleResources: {},\n scriptResources: {},\n moduleUnknownResources: {},\n moduleScriptResources: {}\n };\n}\n// modes. We only include the variants as they matter for the sake of our purposes.\n// We don't actually provide the namespace therefore we use constants instead of the string.\n\nvar ROOT_HTML_MODE = 0; // Used for the root most element tag.\n// We have a less than HTML_HTML_MODE check elsewhere. If you add more cases here, make sure it\n// still makes sense\n\nvar HTML_HTML_MODE = 1; // Used for the <html> if it is at the top level.\n\nvar HTML_MODE = 2;\nvar SVG_MODE = 3;\nvar MATHML_MODE = 4;\nvar HTML_TABLE_MODE = 5;\nvar HTML_TABLE_BODY_MODE = 6;\nvar HTML_TABLE_ROW_MODE = 7;\nvar HTML_COLGROUP_MODE = 8; // We have a greater than HTML_TABLE_MODE check elsewhere. If you add more cases here, make sure it\n// still makes sense\n\nvar NO_SCOPE =\n/* */\n0;\nvar NOSCRIPT_SCOPE =\n/* */\n1;\nvar PICTURE_SCOPE =\n/* */\n2; // Lets us keep track of contextual state and pick it back up after suspending.\n\nfunction createFormatContext(insertionMode, selectedValue, tagScope) {\n return {\n insertionMode: insertionMode,\n selectedValue: selectedValue,\n tagScope: tagScope\n };\n}\n\nfunction createRootFormatContext(namespaceURI) {\n var insertionMode = namespaceURI === 'http://www.w3.org/2000/svg' ? SVG_MODE : namespaceURI === 'http://www.w3.org/1998/Math/MathML' ? MATHML_MODE : ROOT_HTML_MODE;\n return createFormatContext(insertionMode, null, NO_SCOPE);\n}\nfunction getChildFormatContext(parentContext, type, props) {\n switch (type) {\n case 'noscript':\n return createFormatContext(HTML_MODE, null, parentContext.tagScope | NOSCRIPT_SCOPE);\n\n case 'select':\n return createFormatContext(HTML_MODE, props.value != null ? props.value : props.defaultValue, parentContext.tagScope);\n\n case 'svg':\n return createFormatContext(SVG_MODE, null, parentContext.tagScope);\n\n case 'picture':\n return createFormatContext(HTML_MODE, null, parentContext.tagScope | PICTURE_SCOPE);\n\n case 'math':\n return createFormatContext(MATHML_MODE, null, parentContext.tagScope);\n\n case 'foreignObject':\n return createFormatContext(HTML_MODE, null, parentContext.tagScope);\n // Table parents are special in that their children can only be created at all if they're\n // wrapped in a table parent. So we need to encode that we're entering this mode.\n\n case 'table':\n return createFormatContext(HTML_TABLE_MODE, null, parentContext.tagScope);\n\n case 'thead':\n case 'tbody':\n case 'tfoot':\n return createFormatContext(HTML_TABLE_BODY_MODE, null, parentContext.tagScope);\n\n case 'colgroup':\n return createFormatContext(HTML_COLGROUP_MODE, null, parentContext.tagScope);\n\n case 'tr':\n return createFormatContext(HTML_TABLE_ROW_MODE, null, parentContext.tagScope);\n }\n\n if (parentContext.insertionMode >= HTML_TABLE_MODE) {\n // Whatever tag this was, it wasn't a table parent or other special parent, so we must have\n // entered plain HTML again.\n return createFormatContext(HTML_MODE, null, parentContext.tagScope);\n }\n\n if (parentContext.insertionMode === ROOT_HTML_MODE) {\n if (type === 'html') {\n // We've emitted the root and is now in <html> mode.\n return createFormatContext(HTML_HTML_MODE, null, parentContext.tagScope);\n } else {\n // We've emitted the root and is now in plain HTML mode.\n return createFormatContext(HTML_MODE, null, parentContext.tagScope);\n }\n } else if (parentContext.insertionMode === HTML_HTML_MODE) {\n // We've emitted the document element and is now in plain HTML mode.\n return createFormatContext(HTML_MODE, null, parentContext.tagScope);\n }\n\n return parentContext;\n}\nfunction makeId(resumableState, treeId, localId) {\n var idPrefix = resumableState.idPrefix;\n var id = ':' + idPrefix + 'R' + treeId; // Unless this is the first id at this level, append a number at the end\n // that represents the position of this useId hook among all the useId\n // hooks for this fiber.\n\n if (localId > 0) {\n id += 'H' + localId.toString(32);\n }\n\n return id + ':';\n}\n\nfunction encodeHTMLTextNode(text) {\n return escapeTextForBrowser(text);\n}\n\nvar textSeparator = stringToPrecomputedChunk('<!-- -->');\nfunction pushTextInstance$1(target, text, renderState, textEmbedded) {\n if (text === '') {\n // Empty text doesn't have a DOM node representation and the hydration is aware of this.\n return textEmbedded;\n }\n\n if (textEmbedded) {\n target.push(textSeparator);\n }\n\n target.push(stringToChunk(encodeHTMLTextNode(text)));\n return true;\n} // Called when Fizz is done with a Segment. Currently the only purpose is to conditionally\n// emit a text separator when we don't know for sure it is safe to omit\n\nfunction pushSegmentFinale$1(target, renderState, lastPushedText, textEmbedded) {\n if (lastPushedText && textEmbedded) {\n target.push(textSeparator);\n }\n}\nvar styleNameCache = new Map();\n\nfunction processStyleName(styleName) {\n var chunk = styleNameCache.get(styleName);\n\n if (chunk !== undefined) {\n return chunk;\n }\n\n var result = stringToPrecomputedChunk(escapeTextForBrowser(hyphenateStyleName(styleName)));\n styleNameCache.set(styleName, result);\n return result;\n}\n\nvar styleAttributeStart = stringToPrecomputedChunk(' style=\"');\nvar styleAssign = stringToPrecomputedChunk(':');\nvar styleSeparator = stringToPrecomputedChunk(';');\n\nfunction pushStyleAttribute(target, style) {\n if (typeof style !== 'object') {\n throw new Error('The `style` prop expects a mapping from style properties to values, ' + \"not a string. For example, style={{marginRight: spacing + 'em'}} when \" + 'using JSX.');\n }\n\n var isFirst = true;\n\n for (var styleName in style) {\n if (!hasOwnProperty.call(style, styleName)) {\n continue;\n } // If you provide unsafe user data here they can inject arbitrary CSS\n // which may be problematic (I couldn't repro this):\n // https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet\n // http://www.thespanner.co.uk/2007/11/26/ultimate-xss-css-injection/\n // This is not an XSS hole but instead a potential CSS injection issue\n // which has lead to a greater discussion about how we're going to\n // trust URLs moving forward. See #2115901\n\n\n var styleValue = style[styleName];\n\n if (styleValue == null || typeof styleValue === 'boolean' || styleValue === '') {\n // TODO: We used to set empty string as a style with an empty value. Does that ever make sense?\n continue;\n }\n\n var nameChunk = void 0;\n var valueChunk = void 0;\n var isCustomProperty = styleName.indexOf('--') === 0;\n\n if (isCustomProperty) {\n nameChunk = stringToChunk(escapeTextForBrowser(styleName));\n\n {\n checkCSSPropertyStringCoercion(styleValue, styleName);\n }\n\n valueChunk = stringToChunk(escapeTextForBrowser(('' + styleValue).trim()));\n } else {\n {\n warnValidStyle(styleName, styleValue);\n }\n\n nameChunk = processStyleName(styleName);\n\n if (typeof styleValue === 'number') {\n if (styleValue !== 0 && !isUnitlessNumber(styleName)) {\n valueChunk = stringToChunk(styleValue + 'px'); // Presumes implicit 'px' suffix for unitless numbers\n } else {\n valueChunk = stringToChunk('' + styleValue);\n }\n } else {\n {\n checkCSSPropertyStringCoercion(styleValue, styleName);\n }\n\n valueChunk = stringToChunk(escapeTextForBrowser(('' + styleValue).trim()));\n }\n }\n\n if (isFirst) {\n isFirst = false; // If it's first, we don't need any separators prefixed.\n\n target.push(styleAttributeStart, nameChunk, styleAssign, valueChunk);\n } else {\n target.push(styleSeparator, nameChunk, styleAssign, valueChunk);\n }\n }\n\n if (!isFirst) {\n target.push(attributeEnd);\n }\n}\n\nvar attributeSeparator = stringToPrecomputedChunk(' ');\nvar attributeAssign = stringToPrecomputedChunk('=\"');\nvar attributeEnd = stringToPrecomputedChunk('\"');\nvar attributeEmptyString = stringToPrecomputedChunk('=\"\"');\n\nfunction pushBooleanAttribute(target, name, value) // not null or undefined\n{\n if (value && typeof value !== 'function' && typeof value !== 'symbol') {\n target.push(attributeSeparator, stringToChunk(name), attributeEmptyString);\n }\n}\n\nfunction pushStringAttribute(target, name, value) // not null or undefined\n{\n if (typeof value !== 'function' && typeof value !== 'symbol' && typeof value !== 'boolean') {\n target.push(attributeSeparator, stringToChunk(name), attributeAssign, stringToChunk(escapeTextForBrowser(value)), attributeEnd);\n }\n}\n\nfunction makeFormFieldPrefix(resumableState) {\n var id = resumableState.nextFormID++;\n return resumableState.idPrefix + id;\n} // Since this will likely be repeated a lot in the HTML, we use a more concise message\n// than on the client and hopefully it's googleable.\n\n\nvar actionJavaScriptURL = stringToPrecomputedChunk(escapeTextForBrowser( // eslint-disable-next-line no-script-url\n\"javascript:throw new Error('React form unexpectedly submitted.')\"));\nvar startHiddenInputChunk = stringToPrecomputedChunk('<input type=\"hidden\"');\n\nfunction pushAdditionalFormField(value, key) {\n var target = this;\n target.push(startHiddenInputChunk);\n\n if (typeof value !== 'string') {\n throw new Error('File/Blob fields are not yet supported in progressive forms. ' + 'It probably means you are closing over binary data or FormData in a Server Action.');\n }\n\n pushStringAttribute(target, 'name', key);\n pushStringAttribute(target, 'value', value);\n target.push(endOfStartTagSelfClosing);\n}\n\nfunction pushAdditionalFormFields(target, formData) {\n if (formData != null) {\n // $FlowFixMe[prop-missing]: FormData has forEach.\n formData.forEach(pushAdditionalFormField, target);\n }\n}\n\nfunction getCustomFormFields(resumableState, formAction) {\n var customAction = formAction.$$FORM_ACTION;\n\n if (typeof customAction === 'function') {\n var prefix = makeFormFieldPrefix(resumableState);\n\n try {\n return formAction.$$FORM_ACTION(prefix);\n } catch (x) {\n if (typeof x === 'object' && x !== null && typeof x.then === 'function') {\n // Rethrow suspense.\n throw x;\n } // If we fail to encode the form action for progressive enhancement for some reason,\n // fallback to trying replaying on the client instead of failing the page. It might\n // work there.\n\n\n {\n // TODO: Should this be some kind of recoverable error?\n error('Failed to serialize an action for progressive enhancement:\\n%s', x);\n }\n }\n }\n\n return null;\n}\n\nfunction pushFormActionAttribute(target, resumableState, renderState, formAction, formEncType, formMethod, formTarget, name) {\n var formData = null;\n\n if (typeof formAction === 'function') {\n // Function form actions cannot control the form properties\n {\n if (name !== null && !didWarnFormActionName) {\n didWarnFormActionName = true;\n\n error('Cannot specify a \"name\" prop for a button that specifies a function as a formAction. ' + 'React needs it to encode which action should be invoked. It will get overridden.');\n }\n\n if ((formEncType !== null || formMethod !== null) && !didWarnFormActionMethod) {\n didWarnFormActionMethod = true;\n\n error('Cannot specify a formEncType or formMethod for a button that specifies a ' + 'function as a formAction. React provides those automatically. They will get overridden.');\n }\n\n if (formTarget !== null && !didWarnFormActionTarget) {\n didWarnFormActionTarget = true;\n\n error('Cannot specify a formTarget for a button that specifies a function as a formAction. ' + 'The function will always be executed in the same window.');\n }\n }\n\n var customFields = getCustomFormFields(resumableState, formAction);\n\n if (customFields !== null) {\n // This action has a custom progressive enhancement form that can submit the form\n // back to the server if it's invoked before hydration. Such as a Server Action.\n name = customFields.name;\n formAction = customFields.action || '';\n formEncType = customFields.encType;\n formMethod = customFields.method;\n formTarget = customFields.target;\n formData = customFields.data;\n } else {\n // Set a javascript URL that doesn't do anything. We don't expect this to be invoked\n // because we'll preventDefault in the Fizz runtime, but it can happen if a form is\n // manually submitted or if someone calls stopPropagation before React gets the event.\n // If CSP is used to block javascript: URLs that's fine too. It just won't show this\n // error message but the URL will be logged.\n target.push(attributeSeparator, stringToChunk('formAction'), attributeAssign, actionJavaScriptURL, attributeEnd);\n name = null;\n formAction = null;\n formEncType = null;\n formMethod = null;\n formTarget = null;\n injectFormReplayingRuntime(resumableState, renderState);\n }\n }\n\n if (name != null) {\n pushAttribute(target, 'name', name);\n }\n\n if (formAction != null) {\n pushAttribute(target, 'formAction', formAction);\n }\n\n if (formEncType != null) {\n pushAttribute(target, 'formEncType', formEncType);\n }\n\n if (formMethod != null) {\n pushAttribute(target, 'formMethod', formMethod);\n }\n\n if (formTarget != null) {\n pushAttribute(target, 'formTarget', formTarget);\n }\n\n return formData;\n}\n\nfunction pushAttribute(target, name, value) // not null or undefined\n{\n switch (name) {\n // These are very common props and therefore are in the beginning of the switch.\n // TODO: aria-label is a very common prop but allows booleans so is not like the others\n // but should ideally go in this list too.\n case 'className':\n {\n pushStringAttribute(target, 'class', value);\n break;\n }\n\n case 'tabIndex':\n {\n pushStringAttribute(target, 'tabindex', value);\n break;\n }\n\n case 'dir':\n case 'role':\n case 'viewBox':\n case 'width':\n case 'height':\n {\n pushStringAttribute(target, name, value);\n break;\n }\n\n case 'style':\n {\n pushStyleAttribute(target, value);\n return;\n }\n\n case 'src':\n case 'href':\n // Fall through to the last case which shouldn't remove empty strings.\n\n case 'action':\n case 'formAction':\n {\n // TODO: Consider only special casing these for each tag.\n if (value == null || typeof value === 'function' || typeof value === 'symbol' || typeof value === 'boolean') {\n return;\n }\n\n {\n checkAttributeStringCoercion(value, name);\n }\n\n var sanitizedValue = sanitizeURL('' + value);\n target.push(attributeSeparator, stringToChunk(name), attributeAssign, stringToChunk(escapeTextForBrowser(sanitizedValue)), attributeEnd);\n return;\n }\n\n case 'defaultValue':\n case 'defaultChecked': // These shouldn't be set as attributes on generic HTML elements.\n\n case 'innerHTML': // Must use dangerouslySetInnerHTML instead.\n\n case 'suppressContentEditableWarning':\n case 'suppressHydrationWarning':\n case 'ref':\n // Ignored. These are built-in to React on the client.\n return;\n\n case 'autoFocus':\n case 'multiple':\n case 'muted':\n {\n pushBooleanAttribute(target, name.toLowerCase(), value);\n return;\n }\n\n case 'xlinkHref':\n {\n if (typeof value === 'function' || typeof value === 'symbol' || typeof value === 'boolean') {\n return;\n }\n\n {\n checkAttributeStringCoercion(value, name);\n }\n\n var _sanitizedValue = sanitizeURL('' + value);\n\n target.push(attributeSeparator, stringToChunk('xlink:href'), attributeAssign, stringToChunk(escapeTextForBrowser(_sanitizedValue)), attributeEnd);\n return;\n }\n\n case 'contentEditable':\n case 'spellCheck':\n case 'draggable':\n case 'value':\n case 'autoReverse':\n case 'externalResourcesRequired':\n case 'focusable':\n case 'preserveAlpha':\n {\n // Booleanish String\n // These are \"enumerated\" attributes that accept \"true\" and \"false\".\n // In React, we let users pass `true` and `false` even though technically\n // these aren't boolean attributes (they are coerced to strings).\n if (typeof value !== 'function' && typeof value !== 'symbol') {\n target.push(attributeSeparator, stringToChunk(name), attributeAssign, stringToChunk(escapeTextForBrowser(value)), attributeEnd);\n }\n\n return;\n }\n\n case 'allowFullScreen':\n case 'async':\n case 'autoPlay':\n case 'controls':\n case 'default':\n case 'defer':\n case 'disabled':\n case 'disablePictureInPicture':\n case 'disableRemotePlayback':\n case 'formNoValidate':\n case 'hidden':\n case 'loop':\n case 'noModule':\n case 'noValidate':\n case 'open':\n case 'playsInline':\n case 'readOnly':\n case 'required':\n case 'reversed':\n case 'scoped':\n case 'seamless':\n case 'itemScope':\n {\n // Boolean\n if (value && typeof value !== 'function' && typeof value !== 'symbol') {\n target.push(attributeSeparator, stringToChunk(name), attributeEmptyString);\n }\n\n return;\n }\n\n case 'capture':\n case 'download':\n {\n // Overloaded Boolean\n if (value === true) {\n target.push(attributeSeparator, stringToChunk(name), attributeEmptyString);\n } else if (value === false) ; else if (typeof value !== 'function' && typeof value !== 'symbol') {\n target.push(attributeSeparator, stringToChunk(name), attributeAssign, stringToChunk(escapeTextForBrowser(value)), attributeEnd);\n }\n\n return;\n }\n\n case 'cols':\n case 'rows':\n case 'size':\n case 'span':\n {\n // These are HTML attributes that must be positive numbers.\n if (typeof value !== 'function' && typeof value !== 'symbol' && !isNaN(value) && value >= 1) {\n target.push(attributeSeparator, stringToChunk(name), attributeAssign, stringToChunk(escapeTextForBrowser(value)), attributeEnd);\n }\n\n return;\n }\n\n case 'rowSpan':\n case 'start':\n {\n // These are HTML attributes that must be numbers.\n if (typeof value !== 'function' && typeof value !== 'symbol' && !isNaN(value)) {\n target.push(attributeSeparator, stringToChunk(name), attributeAssign, stringToChunk(escapeTextForBrowser(value)), attributeEnd);\n }\n\n return;\n }\n\n case 'xlinkActuate':\n pushStringAttribute(target, 'xlink:actuate', value);\n return;\n\n case 'xlinkArcrole':\n pushStringAttribute(target, 'xlink:arcrole', value);\n return;\n\n case 'xlinkRole':\n pushStringAttribute(target, 'xlink:role', value);\n return;\n\n case 'xlinkShow':\n pushStringAttribute(target, 'xlink:show', value);\n return;\n\n case 'xlinkTitle':\n pushStringAttribute(target, 'xlink:title', value);\n return;\n\n case 'xlinkType':\n pushStringAttribute(target, 'xlink:type', value);\n return;\n\n case 'xmlBase':\n pushStringAttribute(target, 'xml:base', value);\n return;\n\n case 'xmlLang':\n pushStringAttribute(target, 'xml:lang', value);\n return;\n\n case 'xmlSpace':\n pushStringAttribute(target, 'xml:space', value);\n return;\n\n case 'inert':\n // fallthrough for new boolean props without the flag on\n\n default:\n if ( // shouldIgnoreAttribute\n // We have already filtered out null/undefined and reserved words.\n name.length > 2 && (name[0] === 'o' || name[0] === 'O') && (name[1] === 'n' || name[1] === 'N')) {\n return;\n }\n\n var attributeName = getAttributeAlias(name);\n\n if (isAttributeNameSafe(attributeName)) {\n // shouldRemoveAttribute\n switch (typeof value) {\n case 'function':\n case 'symbol':\n // eslint-disable-line\n return;\n\n case 'boolean':\n {\n var prefix = attributeName.toLowerCase().slice(0, 5);\n\n if (prefix !== 'data-' && prefix !== 'aria-') {\n return;\n }\n }\n }\n\n target.push(attributeSeparator, stringToChunk(attributeName), attributeAssign, stringToChunk(escapeTextForBrowser(value)), attributeEnd);\n }\n\n }\n}\n\nvar endOfStartTag = stringToPrecomputedChunk('>');\nvar endOfStartTagSelfClosing = stringToPrecomputedChunk('/>');\n\nfunction pushInnerHTML(target, innerHTML, children) {\n if (innerHTML != null) {\n if (children != null) {\n throw new Error('Can only set one of `children` or `props.dangerouslySetInnerHTML`.');\n }\n\n if (typeof innerHTML !== 'object' || !('__html' in innerHTML)) {\n throw new Error('`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. ' + 'Please visit https://react.dev/link/dangerously-set-inner-html ' + 'for more information.');\n }\n\n var html = innerHTML.__html;\n\n if (html !== null && html !== undefined) {\n {\n checkHtmlStringCoercion(html);\n }\n\n target.push(stringToChunk('' + html));\n }\n }\n} // TODO: Move these to RenderState so that we warn for every request.\n// It would help debugging in stateful servers (e.g. service worker).\n\n\nvar didWarnDefaultInputValue = false;\nvar didWarnDefaultChecked = false;\nvar didWarnDefaultSelectValue = false;\nvar didWarnDefaultTextareaValue = false;\nvar didWarnInvalidOptionChildren = false;\nvar didWarnInvalidOptionInnerHTML = false;\nvar didWarnSelectedSetOnOption = false;\nvar didWarnFormActionType = false;\nvar didWarnFormActionName = false;\nvar didWarnFormActionTarget = false;\nvar didWarnFormActionMethod = false;\n\nfunction checkSelectProp(props, propName) {\n {\n var value = props[propName];\n\n if (value != null) {\n var array = isArray(value);\n\n if (props.multiple && !array) {\n error('The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.', propName);\n } else if (!props.multiple && array) {\n error('The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.', propName);\n }\n }\n }\n}\n\nfunction pushStartSelect(target, props) {\n {\n checkControlledValueProps('select', props);\n checkSelectProp(props, 'value');\n checkSelectProp(props, 'defaultValue');\n\n if (props.value !== undefined && props.defaultValue !== undefined && !didWarnDefaultSelectValue) {\n error('Select elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled select ' + 'element and remove one of these props. More info: ' + 'https://react.dev/link/controlled-components');\n\n didWarnDefaultSelectValue = true;\n }\n }\n\n target.push(startChunkForTag('select'));\n var children = null;\n var innerHTML = null;\n\n for (var propKey in props) {\n if (hasOwnProperty.call(props, propKey)) {\n var propValue = props[propKey];\n\n if (propValue == null) {\n continue;\n }\n\n switch (propKey) {\n case 'children':\n children = propValue;\n break;\n\n case 'dangerouslySetInnerHTML':\n // TODO: This doesn't really make sense for select since it can't use the controlled\n // value in the innerHTML.\n innerHTML = propValue;\n break;\n\n case 'defaultValue':\n case 'value':\n // These are set on the Context instead and applied to the nested options.\n break;\n\n default:\n pushAttribute(target, propKey, propValue);\n break;\n }\n }\n }\n\n target.push(endOfStartTag);\n pushInnerHTML(target, innerHTML, children);\n return children;\n}\n\nfunction flattenOptionChildren(children) {\n var content = ''; // Flatten children and warn if they aren't strings or numbers;\n // invalid types are ignored.\n\n React.Children.forEach(children, function (child) {\n if (child == null) {\n return;\n }\n\n content += child;\n\n {\n if (!didWarnInvalidOptionChildren && typeof child !== 'string' && typeof child !== 'number' && (!enableBigIntSupport)) {\n didWarnInvalidOptionChildren = true;\n\n error('Cannot infer the option value of complex children. ' + 'Pass a `value` prop or use a plain string as children to <option>.');\n }\n }\n });\n return content;\n}\n\nvar selectedMarkerAttribute = stringToPrecomputedChunk(' selected=\"\"');\n\nfunction pushStartOption(target, props, formatContext) {\n var selectedValue = formatContext.selectedValue;\n target.push(startChunkForTag('option'));\n var children = null;\n var value = null;\n var selected = null;\n var innerHTML = null;\n\n for (var propKey in props) {\n if (hasOwnProperty.call(props, propKey)) {\n var propValue = props[propKey];\n\n if (propValue == null) {\n continue;\n }\n\n switch (propKey) {\n case 'children':\n children = propValue;\n break;\n\n case 'selected':\n // ignore\n selected = propValue;\n\n {\n // TODO: Remove support for `selected` in <option>.\n if (!didWarnSelectedSetOnOption) {\n error('Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.');\n\n didWarnSelectedSetOnOption = true;\n }\n }\n\n break;\n\n case 'dangerouslySetInnerHTML':\n innerHTML = propValue;\n break;\n\n case 'value':\n value = propValue;\n // We intentionally fallthrough to also set the attribute on the node.\n\n default:\n pushAttribute(target, propKey, propValue);\n break;\n }\n }\n }\n\n if (selectedValue != null) {\n var stringValue;\n\n if (value !== null) {\n {\n checkAttributeStringCoercion(value, 'value');\n }\n\n stringValue = '' + value;\n } else {\n {\n if (innerHTML !== null) {\n if (!didWarnInvalidOptionInnerHTML) {\n didWarnInvalidOptionInnerHTML = true;\n\n error('Pass a `value` prop if you set dangerouslyInnerHTML so React knows ' + 'which value should be selected.');\n }\n }\n }\n\n stringValue = flattenOptionChildren(children);\n }\n\n if (isArray(selectedValue)) {\n // multiple\n for (var i = 0; i < selectedValue.length; i++) {\n {\n checkAttributeStringCoercion(selectedValue[i], 'value');\n }\n\n var v = '' + selectedValue[i];\n\n if (v === stringValue) {\n target.push(selectedMarkerAttribute);\n break;\n }\n }\n } else {\n {\n checkAttributeStringCoercion(selectedValue, 'select.value');\n }\n\n if ('' + selectedValue === stringValue) {\n target.push(selectedMarkerAttribute);\n }\n }\n } else if (selected) {\n target.push(selectedMarkerAttribute);\n }\n\n target.push(endOfStartTag);\n pushInnerHTML(target, innerHTML, children);\n return children;\n}\n\nvar formReplayingRuntimeScript = stringToPrecomputedChunk(formReplaying);\n\nfunction injectFormReplayingRuntime(resumableState, renderState) {\n // If we haven't sent it yet, inject the runtime that tracks submitted JS actions\n // for later replaying by Fiber. If we use an external runtime, we don't need\n // to emit anything. It's always used.\n if ((resumableState.instructions & SentFormReplayingRuntime) === NothingSent && (!renderState.externalRuntimeScript)) {\n resumableState.instructions |= SentFormReplayingRuntime;\n renderState.bootstrapChunks.unshift(renderState.startInlineScript, formReplayingRuntimeScript, endInlineScript);\n }\n}\n\nvar formStateMarkerIsMatching = stringToPrecomputedChunk('<!--F!-->');\nvar formStateMarkerIsNotMatching = stringToPrecomputedChunk('<!--F-->');\nfunction pushFormStateMarkerIsMatching(target) {\n target.push(formStateMarkerIsMatching);\n}\nfunction pushFormStateMarkerIsNotMatching(target) {\n target.push(formStateMarkerIsNotMatching);\n}\n\nfunction pushStartForm(target, props, resumableState, renderState) {\n target.push(startChunkForTag('form'));\n var children = null;\n var innerHTML = null;\n var formAction = null;\n var formEncType = null;\n var formMethod = null;\n var formTarget = null;\n\n for (var propKey in props) {\n if (hasOwnProperty.call(props, propKey)) {\n var propValue = props[propKey];\n\n if (propValue == null) {\n continue;\n }\n\n switch (propKey) {\n case 'children':\n children = propValue;\n break;\n\n case 'dangerouslySetInnerHTML':\n innerHTML = propValue;\n break;\n\n case 'action':\n formAction = propValue;\n break;\n\n case 'encType':\n formEncType = propValue;\n break;\n\n case 'method':\n formMethod = propValue;\n break;\n\n case 'target':\n formTarget = propValue;\n break;\n\n default:\n pushAttribute(target, propKey, propValue);\n break;\n }\n }\n }\n\n var formData = null;\n var formActionName = null;\n\n if (typeof formAction === 'function') {\n // Function form actions cannot control the form properties\n {\n if ((formEncType !== null || formMethod !== null) && !didWarnFormActionMethod) {\n didWarnFormActionMethod = true;\n\n error('Cannot specify a encType or method for a form that specifies a ' + 'function as the action. React provides those automatically. ' + 'They will get overridden.');\n }\n\n if (formTarget !== null && !didWarnFormActionTarget) {\n didWarnFormActionTarget = true;\n\n error('Cannot specify a target for a form that specifies a function as the action. ' + 'The function will always be executed in the same window.');\n }\n }\n\n var customFields = getCustomFormFields(resumableState, formAction);\n\n if (customFields !== null) {\n // This action has a custom progressive enhancement form that can submit the form\n // back to the server if it's invoked before hydration. Such as a Server Action.\n formAction = customFields.action || '';\n formEncType = customFields.encType;\n formMethod = customFields.method;\n formTarget = customFields.target;\n formData = customFields.data;\n formActionName = customFields.name;\n } else {\n // Set a javascript URL that doesn't do anything. We don't expect this to be invoked\n // because we'll preventDefault in the Fizz runtime, but it can happen if a form is\n // manually submitted or if someone calls stopPropagation before React gets the event.\n // If CSP is used to block javascript: URLs that's fine too. It just won't show this\n // error message but the URL will be logged.\n target.push(attributeSeparator, stringToChunk('action'), attributeAssign, actionJavaScriptURL, attributeEnd);\n formAction = null;\n formEncType = null;\n formMethod = null;\n formTarget = null;\n injectFormReplayingRuntime(resumableState, renderState);\n }\n }\n\n if (formAction != null) {\n pushAttribute(target, 'action', formAction);\n }\n\n if (formEncType != null) {\n pushAttribute(target, 'encType', formEncType);\n }\n\n if (formMethod != null) {\n pushAttribute(target, 'method', formMethod);\n }\n\n if (formTarget != null) {\n pushAttribute(target, 'target', formTarget);\n }\n\n target.push(endOfStartTag);\n\n if (formActionName !== null) {\n target.push(startHiddenInputChunk);\n pushStringAttribute(target, 'name', formActionName);\n target.push(endOfStartTagSelfClosing);\n pushAdditionalFormFields(target, formData);\n }\n\n pushInnerHTML(target, innerHTML, children);\n\n if (typeof children === 'string') {\n // Special case children as a string to avoid the unnecessary comment.\n // TODO: Remove this special case after the general optimization is in place.\n target.push(stringToChunk(encodeHTMLTextNode(children)));\n return null;\n }\n\n return children;\n}\n\nfunction pushInput(target, props, resumableState, renderState) {\n {\n checkControlledValueProps('input', props);\n }\n\n target.push(startChunkForTag('input'));\n var name = null;\n var formAction = null;\n var formEncType = null;\n var formMethod = null;\n var formTarget = null;\n var value = null;\n var defaultValue = null;\n var checked = null;\n var defaultChecked = null;\n\n for (var propKey in props) {\n if (hasOwnProperty.call(props, propKey)) {\n var propValue = props[propKey];\n\n if (propValue == null) {\n continue;\n }\n\n switch (propKey) {\n case 'children':\n case 'dangerouslySetInnerHTML':\n throw new Error('input' + \" is a self-closing tag and must neither have `children` nor \" + 'use `dangerouslySetInnerHTML`.');\n\n case 'name':\n name = propValue;\n break;\n\n case 'formAction':\n formAction = propValue;\n break;\n\n case 'formEncType':\n formEncType = propValue;\n break;\n\n case 'formMethod':\n formMethod = propValue;\n break;\n\n case 'formTarget':\n formTarget = propValue;\n break;\n\n case 'defaultChecked':\n defaultChecked = propValue;\n break;\n\n case 'defaultValue':\n defaultValue = propValue;\n break;\n\n case 'checked':\n checked = propValue;\n break;\n\n case 'value':\n value = propValue;\n break;\n\n default:\n pushAttribute(target, propKey, propValue);\n break;\n }\n }\n }\n\n {\n if (formAction !== null && props.type !== 'image' && props.type !== 'submit' && !didWarnFormActionType) {\n didWarnFormActionType = true;\n\n error('An input can only specify a formAction along with type=\"submit\" or type=\"image\".');\n }\n }\n\n var formData = pushFormActionAttribute(target, resumableState, renderState, formAction, formEncType, formMethod, formTarget, name);\n\n {\n if (checked !== null && defaultChecked !== null && !didWarnDefaultChecked) {\n error('%s contains an input of type %s with both checked and defaultChecked props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the checked prop, or the defaultChecked prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://react.dev/link/controlled-components', 'A component', props.type);\n\n didWarnDefaultChecked = true;\n }\n\n if (value !== null && defaultValue !== null && !didWarnDefaultInputValue) {\n error('%s contains an input of type %s with both value and defaultValue props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://react.dev/link/controlled-components', 'A component', props.type);\n\n didWarnDefaultInputValue = true;\n }\n }\n\n if (checked !== null) {\n pushBooleanAttribute(target, 'checked', checked);\n } else if (defaultChecked !== null) {\n pushBooleanAttribute(target, 'checked', defaultChecked);\n }\n\n if (value !== null) {\n pushAttribute(target, 'value', value);\n } else if (defaultValue !== null) {\n pushAttribute(target, 'value', defaultValue);\n }\n\n target.push(endOfStartTagSelfClosing); // We place any additional hidden form fields after the input.\n\n pushAdditionalFormFields(target, formData);\n return null;\n}\n\nfunction pushStartButton(target, props, resumableState, renderState) {\n target.push(startChunkForTag('button'));\n var children = null;\n var innerHTML = null;\n var name = null;\n var formAction = null;\n var formEncType = null;\n var formMethod = null;\n var formTarget = null;\n\n for (var propKey in props) {\n if (hasOwnProperty.call(props, propKey)) {\n var propValue = props[propKey];\n\n if (propValue == null) {\n continue;\n }\n\n switch (propKey) {\n case 'children':\n children = propValue;\n break;\n\n case 'dangerouslySetInnerHTML':\n innerHTML = propValue;\n break;\n\n case 'name':\n name = propValue;\n break;\n\n case 'formAction':\n formAction = propValue;\n break;\n\n case 'formEncType':\n formEncType = propValue;\n break;\n\n case 'formMethod':\n formMethod = propValue;\n break;\n\n case 'formTarget':\n formTarget = propValue;\n break;\n\n default:\n pushAttribute(target, propKey, propValue);\n break;\n }\n }\n }\n\n {\n if (formAction !== null && props.type != null && props.type !== 'submit' && !didWarnFormActionType) {\n didWarnFormActionType = true;\n\n error('A button can only specify a formAction along with type=\"submit\" or no type.');\n }\n }\n\n var formData = pushFormActionAttribute(target, resumableState, renderState, formAction, formEncType, formMethod, formTarget, name);\n target.push(endOfStartTag); // We place any additional hidden form fields we need to include inside the button itself.\n\n pushAdditionalFormFields(target, formData);\n pushInnerHTML(target, innerHTML, children);\n\n if (typeof children === 'string') {\n // Special case children as a string to avoid the unnecessary comment.\n // TODO: Remove this special case after the general optimization is in place.\n target.push(stringToChunk(encodeHTMLTextNode(children)));\n return null;\n }\n\n return children;\n}\n\nfunction pushStartTextArea(target, props) {\n {\n checkControlledValueProps('textarea', props);\n\n if (props.value !== undefined && props.defaultValue !== undefined && !didWarnDefaultTextareaValue) {\n error('Textarea elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled textarea ' + 'and remove one of these props. More info: ' + 'https://react.dev/link/controlled-components');\n\n didWarnDefaultTextareaValue = true;\n }\n }\n\n target.push(startChunkForTag('textarea'));\n var value = null;\n var defaultValue = null;\n var children = null;\n\n for (var propKey in props) {\n if (hasOwnProperty.call(props, propKey)) {\n var propValue = props[propKey];\n\n if (propValue == null) {\n continue;\n }\n\n switch (propKey) {\n case 'children':\n children = propValue;\n break;\n\n case 'value':\n value = propValue;\n break;\n\n case 'defaultValue':\n defaultValue = propValue;\n break;\n\n case 'dangerouslySetInnerHTML':\n throw new Error('`dangerouslySetInnerHTML` does not make sense on <textarea>.');\n\n default:\n pushAttribute(target, propKey, propValue);\n break;\n }\n }\n }\n\n if (value === null && defaultValue !== null) {\n value = defaultValue;\n }\n\n target.push(endOfStartTag); // TODO (yungsters): Remove support for children content in <textarea>.\n\n if (children != null) {\n {\n error('Use the `defaultValue` or `value` props instead of setting ' + 'children on <textarea>.');\n }\n\n if (value != null) {\n throw new Error('If you supply `defaultValue` on a <textarea>, do not pass children.');\n }\n\n if (isArray(children)) {\n if (children.length > 1) {\n throw new Error('<textarea> can only have at most one child.');\n } // TODO: remove the coercion and the DEV check below because it will\n // always be overwritten by the coercion several lines below it. #22309\n\n\n {\n checkHtmlStringCoercion(children[0]);\n }\n\n value = '' + children[0];\n }\n\n {\n checkHtmlStringCoercion(children);\n }\n\n value = '' + children;\n }\n\n if (typeof value === 'string' && value[0] === '\\n') {\n // text/html ignores the first character in these tags if it's a newline\n // Prefer to break application/xml over text/html (for now) by adding\n // a newline specifically to get eaten by the parser. (Alternately for\n // textareas, replacing \"^\\n\" with \"\\r\\n\" doesn't get eaten, and the first\n // \\r is normalized out by HTMLTextAreaElement#value.)\n // See: <http://www.w3.org/TR/html-polyglot/#newlines-in-textarea-and-pre>\n // See: <http://www.w3.org/TR/html5/syntax.html#element-restrictions>\n // See: <http://www.w3.org/TR/html5/syntax.html#newlines>\n // See: Parsing of \"textarea\" \"listing\" and \"pre\" elements\n // from <http://www.w3.org/TR/html5/syntax.html#parsing-main-inbody>\n target.push(leadingNewline);\n } // ToString and push directly instead of recurse over children.\n // We don't really support complex children in the value anyway.\n // This also currently avoids a trailing comment node which breaks textarea.\n\n\n if (value !== null) {\n {\n checkAttributeStringCoercion(value, 'value');\n }\n\n target.push(stringToChunk(encodeHTMLTextNode('' + value)));\n }\n\n return null;\n}\n\nfunction pushMeta(target, props, renderState, textEmbedded, insertionMode, noscriptTagInScope, isFallback) {\n {\n if (insertionMode === SVG_MODE || noscriptTagInScope || props.itemProp != null) {\n return pushSelfClosing(target, props, 'meta');\n } else {\n if (textEmbedded) {\n // This link follows text but we aren't writing a tag. while not as efficient as possible we need\n // to be safe and assume text will follow by inserting a textSeparator\n target.push(textSeparator);\n }\n\n if (isFallback) {\n // Hoistable Elements for fallbacks are simply omitted. we don't want to emit them early\n // because they are likely superceded by primary content and we want to avoid needing to clean\n // them up when the primary content is ready. They are never hydrated on the client anyway because\n // boundaries in fallback are awaited or client render, in either case there is never hydration\n return null;\n } else if (typeof props.charSet === 'string') {\n // \"charset\" Should really be config and not picked up from tags however since this is\n // the only way to embed the tag today we flush it on a special queue on the Request so it\n // can go before everything else. Like viewport this means that the tag will escape it's\n // parent container.\n return pushSelfClosing(renderState.charsetChunks, props, 'meta');\n } else if (props.name === 'viewport') {\n // \"viewport\" is flushed on the Request so it can go earlier that Float resources that\n // might be affected by it. This means it can escape the boundary it is rendered within.\n // This is a pragmatic solution to viewport being incredibly sensitive to document order\n // without requiring all hoistables to be flushed too early.\n return pushSelfClosing(renderState.viewportChunks, props, 'meta');\n } else {\n return pushSelfClosing(renderState.hoistableChunks, props, 'meta');\n }\n }\n }\n}\n\nfunction pushLink(target, props, resumableState, renderState, hoistableState, textEmbedded, insertionMode, noscriptTagInScope, isFallback) {\n {\n var rel = props.rel;\n var href = props.href;\n var precedence = props.precedence;\n\n if (insertionMode === SVG_MODE || noscriptTagInScope || props.itemProp != null || typeof rel !== 'string' || typeof href !== 'string' || href === '') {\n {\n if (rel === 'stylesheet' && typeof props.precedence === 'string') {\n if (typeof href !== 'string' || !href) {\n error('React encountered a `<link rel=\"stylesheet\" .../>` with a `precedence` prop and expected the `href` prop to be a non-empty string but ecountered %s instead. If your intent was to have React hoist and deduplciate this stylesheet using the `precedence` prop ensure there is a non-empty string `href` prop as well, otherwise remove the `precedence` prop.', getValueDescriptorExpectingObjectForWarning(href));\n }\n }\n }\n\n pushLinkImpl(target, props);\n return null;\n }\n\n if (props.rel === 'stylesheet') {\n // This <link> may hoistable as a Stylesheet Resource, otherwise it will emit in place\n var key = getResourceKey(href);\n\n if (typeof precedence !== 'string' || props.disabled != null || props.onLoad || props.onError) {\n // This stylesheet is either not opted into Resource semantics or has conflicting properties which\n // disqualify it for such. We can still create a preload resource to help it load faster on the\n // client\n {\n if (typeof precedence === 'string') {\n if (props.disabled != null) {\n error('React encountered a `<link rel=\"stylesheet\" .../>` with a `precedence` prop and a `disabled` prop. The presence of the `disabled` prop indicates an intent to manage the stylesheet active state from your from your Component code and React will not hoist or deduplicate this stylesheet. If your intent was to have React hoist and deduplciate this stylesheet using the `precedence` prop remove the `disabled` prop, otherwise remove the `precedence` prop.');\n } else if (props.onLoad || props.onError) {\n var propDescription = props.onLoad && props.onError ? '`onLoad` and `onError` props' : props.onLoad ? '`onLoad` prop' : '`onError` prop';\n\n error('React encountered a `<link rel=\"stylesheet\" .../>` with a `precedence` prop and %s. The presence of loading and error handlers indicates an intent to manage the stylesheet loading state from your from your Component code and React will not hoist or deduplicate this stylesheet. If your intent was to have React hoist and deduplciate this stylesheet using the `precedence` prop remove the %s, otherwise remove the `precedence` prop.', propDescription, propDescription);\n }\n }\n }\n\n return pushLinkImpl(target, props);\n } else {\n // This stylesheet refers to a Resource and we create a new one if necessary\n var styleQueue = renderState.styles.get(precedence);\n var hasKey = resumableState.styleResources.hasOwnProperty(key);\n var resourceState = hasKey ? resumableState.styleResources[key] : undefined;\n\n if (resourceState !== EXISTS) {\n // We are going to create this resource now so it is marked as Exists\n resumableState.styleResources[key] = EXISTS; // If this is the first time we've encountered this precedence we need\n // to create a StyleQueue\n\n if (!styleQueue) {\n styleQueue = {\n precedence: stringToChunk(escapeTextForBrowser(precedence)),\n rules: [],\n hrefs: [],\n sheets: new Map()\n };\n renderState.styles.set(precedence, styleQueue);\n }\n\n var resource = {\n state: PENDING$1,\n props: stylesheetPropsFromRawProps(props)\n };\n\n if (resourceState) {\n // When resourceState is truty it is a Preload state. We cast it for clarity\n var preloadState = resourceState;\n\n if (preloadState.length === 2) {\n adoptPreloadCredentials(resource.props, preloadState);\n }\n\n var preloadResource = renderState.preloads.stylesheets.get(key);\n\n if (preloadResource && preloadResource.length > 0) {\n // The Preload for this resource was created in this render pass and has not flushed yet so\n // we need to clear it to avoid it flushing.\n preloadResource.length = 0;\n } else {\n // Either the preload resource from this render already flushed in this render pass\n // or the preload flushed in a prior pass (prerender). In either case we need to mark\n // this resource as already having been preloaded.\n resource.state = PRELOADED;\n }\n } // We add the newly created resource to our StyleQueue and if necessary\n // track the resource with the currently rendering boundary\n\n\n styleQueue.sheets.set(key, resource);\n\n if (hoistableState) {\n hoistableState.stylesheets.add(resource);\n }\n } else {\n // We need to track whether this boundary should wait on this resource or not.\n // Typically this resource should always exist since we either had it or just created\n // it. However, it's possible when you resume that the style has already been emitted\n // and then it wouldn't be recreated in the RenderState and there's no need to track\n // it again since we should've hoisted it to the shell already.\n if (styleQueue) {\n var _resource = styleQueue.sheets.get(key);\n\n if (_resource) {\n if (hoistableState) {\n hoistableState.stylesheets.add(_resource);\n }\n }\n }\n }\n\n if (textEmbedded) {\n // This link follows text but we aren't writing a tag. while not as efficient as possible we need\n // to be safe and assume text will follow by inserting a textSeparator\n target.push(textSeparator);\n }\n\n return null;\n }\n } else if (props.onLoad || props.onError) {\n // When using load handlers we cannot hoist and need to emit links in place\n return pushLinkImpl(target, props);\n } else {\n // We can hoist this link so we may need to emit a text separator.\n // @TODO refactor text separators so we don't have to defensively add\n // them when we don't end up emitting a tag as a result of pushStartInstance\n if (textEmbedded) {\n // This link follows text but we aren't writing a tag. while not as efficient as possible we need\n // to be safe and assume text will follow by inserting a textSeparator\n target.push(textSeparator);\n }\n\n if (isFallback) {\n // Hoistable Elements for fallbacks are simply omitted. we don't want to emit them early\n // because they are likely superceded by primary content and we want to avoid needing to clean\n // them up when the primary content is ready. They are never hydrated on the client anyway because\n // boundaries in fallback are awaited or client render, in either case there is never hydration\n return null;\n } else {\n return pushLinkImpl(renderState.hoistableChunks, props);\n }\n }\n }\n}\n\nfunction pushLinkImpl(target, props) {\n target.push(startChunkForTag('link'));\n\n for (var propKey in props) {\n if (hasOwnProperty.call(props, propKey)) {\n var propValue = props[propKey];\n\n if (propValue == null) {\n continue;\n }\n\n switch (propKey) {\n case 'children':\n case 'dangerouslySetInnerHTML':\n throw new Error('link' + \" is a self-closing tag and must neither have `children` nor \" + 'use `dangerouslySetInnerHTML`.');\n\n default:\n pushAttribute(target, propKey, propValue);\n break;\n }\n }\n }\n\n target.push(endOfStartTagSelfClosing);\n return null;\n}\n\nfunction pushStyle(target, props, resumableState, renderState, hoistableState, textEmbedded, insertionMode, noscriptTagInScope) {\n {\n if (hasOwnProperty.call(props, 'children')) {\n var children = props.children;\n var child = Array.isArray(children) ? children.length < 2 ? children[0] : null : children;\n\n if (typeof child === 'function' || typeof child === 'symbol' || Array.isArray(child)) {\n var childType = typeof child === 'function' ? 'a Function' : typeof child === 'symbol' ? 'a Sybmol' : 'an Array';\n\n error('React expect children of <style> tags to be a string, number, or object with a `toString` method but found %s instead. ' + 'In browsers style Elements can only have `Text` Nodes as children.', childType);\n }\n }\n }\n\n {\n var precedence = props.precedence;\n var href = props.href;\n\n if (insertionMode === SVG_MODE || noscriptTagInScope || props.itemProp != null || typeof precedence !== 'string' || typeof href !== 'string' || href === '') {\n // This style tag is not able to be turned into a Style Resource\n return pushStyleImpl(target, props);\n }\n\n {\n if (href.includes(' ')) {\n error('React expected the `href` prop for a <style> tag opting into hoisting semantics using the `precedence` prop to not have any spaces but ecountered spaces instead. using spaces in this prop will cause hydration of this style to fail on the client. The href for the <style> where this ocurred is \"%s\".', href);\n }\n }\n\n var key = getResourceKey(href);\n var styleQueue = renderState.styles.get(precedence);\n var hasKey = resumableState.styleResources.hasOwnProperty(key);\n var resourceState = hasKey ? resumableState.styleResources[key] : undefined;\n\n if (resourceState !== EXISTS) {\n // We are going to create this resource now so it is marked as Exists\n resumableState.styleResources[key] = EXISTS;\n\n {\n if (resourceState) {\n error('React encountered a hoistable style tag for the same href as a preload: \"%s\". When using a style tag to inline styles you should not also preload it as a stylsheet.', href);\n }\n }\n\n if (!styleQueue) {\n // This is the first time we've encountered this precedence we need\n // to create a StyleQueue.\n styleQueue = {\n precedence: stringToChunk(escapeTextForBrowser(precedence)),\n rules: [],\n hrefs: [stringToChunk(escapeTextForBrowser(href))],\n sheets: new Map()\n };\n renderState.styles.set(precedence, styleQueue);\n } else {\n // We have seen this precedence before and need to track this href\n styleQueue.hrefs.push(stringToChunk(escapeTextForBrowser(href)));\n }\n\n pushStyleContents(styleQueue.rules, props);\n }\n\n if (styleQueue) {\n // We need to track whether this boundary should wait on this resource or not.\n // Typically this resource should always exist since we either had it or just created\n // it. However, it's possible when you resume that the style has already been emitted\n // and then it wouldn't be recreated in the RenderState and there's no need to track\n // it again since we should've hoisted it to the shell already.\n if (hoistableState) {\n hoistableState.styles.add(styleQueue);\n }\n }\n\n if (textEmbedded) {\n // This link follows text but we aren't writing a tag. while not as efficient as possible we need\n // to be safe and assume text will follow by inserting a textSeparator\n target.push(textSeparator);\n }\n }\n}\n\nfunction pushStyleImpl(target, props) {\n target.push(startChunkForTag('style'));\n var children = null;\n var innerHTML = null;\n\n for (var propKey in props) {\n if (hasOwnProperty.call(props, propKey)) {\n var propValue = props[propKey];\n\n if (propValue == null) {\n continue;\n }\n\n switch (propKey) {\n case 'children':\n children = propValue;\n break;\n\n case 'dangerouslySetInnerHTML':\n innerHTML = propValue;\n break;\n\n default:\n pushAttribute(target, propKey, propValue);\n break;\n }\n }\n }\n\n target.push(endOfStartTag);\n var child = Array.isArray(children) ? children.length < 2 ? children[0] : null : children;\n\n if (typeof child !== 'function' && typeof child !== 'symbol' && child !== null && child !== undefined) {\n // eslint-disable-next-line react-internal/safe-string-coercion\n target.push(stringToChunk(escapeTextForBrowser('' + child)));\n }\n\n pushInnerHTML(target, innerHTML, children);\n target.push(endChunkForTag('style'));\n return null;\n}\n\nfunction pushStyleContents(target, props) {\n var children = null;\n var innerHTML = null;\n\n for (var propKey in props) {\n if (hasOwnProperty.call(props, propKey)) {\n var propValue = props[propKey];\n\n if (propValue == null) {\n continue;\n }\n\n switch (propKey) {\n case 'children':\n children = propValue;\n break;\n\n case 'dangerouslySetInnerHTML':\n innerHTML = propValue;\n break;\n }\n }\n }\n\n var child = Array.isArray(children) ? children.length < 2 ? children[0] : null : children;\n\n if (typeof child !== 'function' && typeof child !== 'symbol' && child !== null && child !== undefined) {\n // eslint-disable-next-line react-internal/safe-string-coercion\n target.push(stringToChunk(escapeTextForBrowser('' + child)));\n }\n\n pushInnerHTML(target, innerHTML, children);\n return;\n}\n\nfunction pushImg(target, props, resumableState, renderState, pictureTagInScope) {\n var src = props.src,\n srcSet = props.srcSet;\n\n if (props.loading !== 'lazy' && (src || srcSet) && (typeof src === 'string' || src == null) && (typeof srcSet === 'string' || srcSet == null) && props.fetchPriority !== 'low' && pictureTagInScope === false && // We exclude data URIs in src and srcSet since these should not be preloaded\n !(typeof src === 'string' && src[4] === ':' && (src[0] === 'd' || src[0] === 'D') && (src[1] === 'a' || src[1] === 'A') && (src[2] === 't' || src[2] === 'T') && (src[3] === 'a' || src[3] === 'A')) && !(typeof srcSet === 'string' && srcSet[4] === ':' && (srcSet[0] === 'd' || srcSet[0] === 'D') && (srcSet[1] === 'a' || srcSet[1] === 'A') && (srcSet[2] === 't' || srcSet[2] === 'T') && (srcSet[3] === 'a' || srcSet[3] === 'A'))) {\n // We have a suspensey image and ought to preload it to optimize the loading of display blocking\n // resumableState.\n var sizes = typeof props.sizes === 'string' ? props.sizes : undefined;\n var key = getImageResourceKey(src, srcSet, sizes);\n var promotablePreloads = renderState.preloads.images;\n var resource = promotablePreloads.get(key);\n\n if (resource) {\n // We consider whether this preload can be promoted to higher priority flushing queue.\n // The only time a resource will exist here is if it was created during this render\n // and was not already in the high priority queue.\n if (props.fetchPriority === 'high' || renderState.highImagePreloads.size < 10) {\n // Delete the resource from the map since we are promoting it and don't want to\n // reenter this branch in a second pass for duplicate img hrefs.\n promotablePreloads.delete(key); // $FlowFixMe - Flow should understand that this is a Resource if the condition was true\n\n renderState.highImagePreloads.add(resource);\n }\n } else if (!resumableState.imageResources.hasOwnProperty(key)) {\n // We must construct a new preload resource\n resumableState.imageResources[key] = PRELOAD_NO_CREDS;\n var crossOrigin = getCrossOriginString(props.crossOrigin);\n var headers = renderState.headers;\n var header;\n\n if (headers && headers.remainingCapacity > 0 && ( // this is a hueristic similar to capping element preloads to 10 unless explicitly\n // fetchPriority=\"high\". We use length here which means it will fit fewer images when\n // the urls are long and more when short. arguably byte size is a better hueristic because\n // it directly translates to how much we send down before content is actually seen.\n // We could unify the counts and also make it so the total is tracked regardless of\n // flushing output but since the headers are likely to be go earlier than content\n // they don't really conflict so for now I've kept them separate\n props.fetchPriority === 'high' || headers.highImagePreloads.length < 500) && ( // We manually construct the options for the preload only from strings. We don't want to pollute\n // the params list with arbitrary props and if we copied everything over as it we might get\n // coercion errors. We have checks for this in Dev but it seems safer to just only accept values\n // that are strings\n header = getPreloadAsHeader(src, 'image', {\n imageSrcSet: props.srcSet,\n imageSizes: props.sizes,\n crossOrigin: crossOrigin,\n integrity: props.integrity,\n nonce: props.nonce,\n type: props.type,\n fetchPriority: props.fetchPriority,\n referrerPolicy: props.refererPolicy\n }), // We always consume the header length since once we find one header that doesn't fit\n // we assume all the rest won't as well. This is to avoid getting into a situation\n // where we have a very small remaining capacity but no headers will ever fit and we end\n // up constantly trying to see if the next resource might make it. In the future we can\n // make this behavior different between render and prerender since in the latter case\n // we are less sensitive to the current requests runtime per and more sensitive to maximizing\n // headers.\n (headers.remainingCapacity -= header.length) >= 2)) {\n // If we postpone in the shell we will still emit this preload so we track\n // it to make sure we don't reset it.\n renderState.resets.image[key] = PRELOAD_NO_CREDS;\n\n if (headers.highImagePreloads) {\n headers.highImagePreloads += ', ';\n } // $FlowFixMe[unsafe-addition]: we assign header during the if condition\n\n\n headers.highImagePreloads += header;\n } else {\n resource = [];\n pushLinkImpl(resource, {\n rel: 'preload',\n as: 'image',\n // There is a bug in Safari where imageSrcSet is not respected on preload links\n // so we omit the href here if we have imageSrcSet b/c safari will load the wrong image.\n // This harms older browers that do not support imageSrcSet by making their preloads not work\n // but this population is shrinking fast and is already small so we accept this tradeoff.\n href: srcSet ? undefined : src,\n imageSrcSet: srcSet,\n imageSizes: sizes,\n crossOrigin: crossOrigin,\n integrity: props.integrity,\n type: props.type,\n fetchPriority: props.fetchPriority,\n referrerPolicy: props.referrerPolicy\n });\n\n if (props.fetchPriority === 'high' || renderState.highImagePreloads.size < 10) {\n renderState.highImagePreloads.add(resource);\n } else {\n renderState.bulkPreloads.add(resource); // We can bump the priority up if the same img is rendered later\n // with fetchPriority=\"high\"\n\n promotablePreloads.set(key, resource);\n }\n }\n }\n }\n\n return pushSelfClosing(target, props, 'img');\n}\n\nfunction pushSelfClosing(target, props, tag) {\n target.push(startChunkForTag(tag));\n\n for (var propKey in props) {\n if (hasOwnProperty.call(props, propKey)) {\n var propValue = props[propKey];\n\n if (propValue == null) {\n continue;\n }\n\n switch (propKey) {\n case 'children':\n case 'dangerouslySetInnerHTML':\n throw new Error(tag + \" is a self-closing tag and must neither have `children` nor \" + 'use `dangerouslySetInnerHTML`.');\n\n default:\n pushAttribute(target, propKey, propValue);\n break;\n }\n }\n }\n\n target.push(endOfStartTagSelfClosing);\n return null;\n}\n\nfunction pushStartMenuItem(target, props) {\n target.push(startChunkForTag('menuitem'));\n\n for (var propKey in props) {\n if (hasOwnProperty.call(props, propKey)) {\n var propValue = props[propKey];\n\n if (propValue == null) {\n continue;\n }\n\n switch (propKey) {\n case 'children':\n case 'dangerouslySetInnerHTML':\n throw new Error('menuitems cannot have `children` nor `dangerouslySetInnerHTML`.');\n\n default:\n pushAttribute(target, propKey, propValue);\n break;\n }\n }\n }\n\n target.push(endOfStartTag);\n return null;\n}\n\nfunction pushTitle(target, props, renderState, insertionMode, noscriptTagInScope, isFallback) {\n {\n if (hasOwnProperty.call(props, 'children')) {\n var children = props.children;\n var child = Array.isArray(children) ? children.length < 2 ? children[0] : null : children;\n\n if (Array.isArray(children) && children.length > 1) {\n error('React expects the `children` prop of <title> tags to be a string, number%s, or object with a novel `toString` method but found an Array with length %s instead.' + ' Browsers treat all child Nodes of <title> tags as Text content and React expects to be able to convert `children` of <title> tags to a single string value' + ' which is why Arrays of length greater than 1 are not supported. When using JSX it can be commong to combine text nodes and value nodes.' + ' For example: <title>hello {nameOfUser}. While not immediately apparent, `children` in this case is an Array with length 2. If your `children` prop' + ' is using this form try rewriting it using a template string: {`hello ${nameOfUser}`}.', '', children.length);\n } else if (typeof child === 'function' || typeof child === 'symbol') {\n var childType = typeof child === 'function' ? 'a Function' : 'a Sybmol';\n\n error('React expect children of tags to be a string, number%s, or object with a novel `toString` method but found %s instead.' + ' Browsers treat all child Nodes of <title> tags as Text content and React expects to be able to convert children of <title>' + ' tags to a single string value.', '', childType);\n } else if (child && child.toString === {}.toString) {\n if (child.$$typeof != null) {\n error('React expects the `children` prop of <title> tags to be a string, number%s, or object with a novel `toString` method but found an object that appears to be' + ' a React element which never implements a suitable `toString` method. Browsers treat all child Nodes of <title> tags as Text content and React expects to' + ' be able to convert children of <title> tags to a single string value which is why rendering React elements is not supported. If the `children` of <title> is' + ' a React Component try moving the <title> tag into that component. If the `children` of <title> is some HTML markup change it to be Text only to be valid HTML.', '');\n } else {\n error('React expects the `children` prop of <title> tags to be a string, number%s, or object with a novel `toString` method but found an object that does not implement' + ' a suitable `toString` method. Browsers treat all child Nodes of <title> tags as Text content and React expects to be able to convert children of <title> tags' + ' to a single string value. Using the default `toString` method available on every object is almost certainly an error. Consider whether the `children` of this <title>' + ' is an object in error and change it to a string or number value if so. Otherwise implement a `toString` method that React can use to produce a valid <title>.', '');\n }\n }\n }\n }\n\n {\n if (insertionMode !== SVG_MODE && !noscriptTagInScope && props.itemProp == null) {\n if (isFallback) {\n // Hoistable Elements for fallbacks are simply omitted. we don't want to emit them early\n // because they are likely superceded by primary content and we want to avoid needing to clean\n // them up when the primary content is ready. They are never hydrated on the client anyway because\n // boundaries in fallback are awaited or client render, in either case there is never hydration\n return null;\n } else {\n pushTitleImpl(renderState.hoistableChunks, props);\n }\n } else {\n return pushTitleImpl(target, props);\n }\n }\n}\n\nfunction pushTitleImpl(target, props) {\n target.push(startChunkForTag('title'));\n var children = null;\n var innerHTML = null;\n\n for (var propKey in props) {\n if (hasOwnProperty.call(props, propKey)) {\n var propValue = props[propKey];\n\n if (propValue == null) {\n continue;\n }\n\n switch (propKey) {\n case 'children':\n children = propValue;\n break;\n\n case 'dangerouslySetInnerHTML':\n innerHTML = propValue;\n break;\n\n default:\n pushAttribute(target, propKey, propValue);\n break;\n }\n }\n }\n\n target.push(endOfStartTag);\n var child = Array.isArray(children) ? children.length < 2 ? children[0] : null : children;\n\n if (typeof child !== 'function' && typeof child !== 'symbol' && child !== null && child !== undefined) {\n // eslint-disable-next-line react-internal/safe-string-coercion\n target.push(stringToChunk(escapeTextForBrowser('' + child)));\n }\n\n pushInnerHTML(target, innerHTML, children);\n target.push(endChunkForTag('title'));\n return null;\n}\n\nfunction pushStartHead(target, props, renderState, insertionMode) {\n {\n if (insertionMode < HTML_MODE && renderState.headChunks === null) {\n // This <head> is the Document.head and should be part of the preamble\n renderState.headChunks = [];\n return pushStartGenericElement(renderState.headChunks, props, 'head');\n } else {\n // This <head> is deep and is likely just an error. we emit it inline though.\n // Validation should warn that this tag is the the wrong spot.\n return pushStartGenericElement(target, props, 'head');\n }\n }\n}\n\nfunction pushStartHtml(target, props, renderState, insertionMode) {\n {\n if (insertionMode === ROOT_HTML_MODE && renderState.htmlChunks === null) {\n // This <html> is the Document.documentElement and should be part of the preamble\n renderState.htmlChunks = [doctypeChunk];\n return pushStartGenericElement(renderState.htmlChunks, props, 'html');\n } else {\n // This <html> is deep and is likely just an error. we emit it inline though.\n // Validation should warn that this tag is the the wrong spot.\n return pushStartGenericElement(target, props, 'html');\n }\n }\n}\n\nfunction pushScript(target, props, resumableState, renderState, textEmbedded, insertionMode, noscriptTagInScope) {\n {\n var asyncProp = props.async;\n\n if (typeof props.src !== 'string' || !props.src || !(asyncProp && typeof asyncProp !== 'function' && typeof asyncProp !== 'symbol') || props.onLoad || props.onError || insertionMode === SVG_MODE || noscriptTagInScope || props.itemProp != null) {\n // This script will not be a resource, we bailout early and emit it in place.\n return pushScriptImpl(target, props);\n }\n\n var src = props.src;\n var key = getResourceKey(src); // We can make this <script> into a ScriptResource\n\n var resources, preloads;\n\n if (props.type === 'module') {\n resources = resumableState.moduleScriptResources;\n preloads = renderState.preloads.moduleScripts;\n } else {\n resources = resumableState.scriptResources;\n preloads = renderState.preloads.scripts;\n }\n\n var hasKey = resources.hasOwnProperty(key);\n var resourceState = hasKey ? resources[key] : undefined;\n\n if (resourceState !== EXISTS) {\n // We are going to create this resource now so it is marked as Exists\n resources[key] = EXISTS;\n var scriptProps = props;\n\n if (resourceState) {\n // When resourceState is truty it is a Preload state. We cast it for clarity\n var preloadState = resourceState;\n\n if (preloadState.length === 2) {\n scriptProps = assign({}, props);\n adoptPreloadCredentials(scriptProps, preloadState);\n }\n\n var preloadResource = preloads.get(key);\n\n if (preloadResource) {\n // the preload resource exists was created in this render. Now that we have\n // a script resource which will emit earlier than a preload would if it\n // hasn't already flushed we prevent it from flushing by zeroing the length\n preloadResource.length = 0;\n }\n }\n\n var resource = []; // Add to the script flushing queue\n\n renderState.scripts.add(resource); // encode the tag as Chunks\n\n pushScriptImpl(resource, scriptProps);\n }\n\n if (textEmbedded) {\n // This script follows text but we aren't writing a tag. while not as efficient as possible we need\n // to be safe and assume text will follow by inserting a textSeparator\n target.push(textSeparator);\n }\n\n return null;\n }\n}\n\nfunction pushScriptImpl(target, props) {\n target.push(startChunkForTag('script'));\n var children = null;\n var innerHTML = null;\n\n for (var propKey in props) {\n if (hasOwnProperty.call(props, propKey)) {\n var propValue = props[propKey];\n\n if (propValue == null) {\n continue;\n }\n\n switch (propKey) {\n case 'children':\n children = propValue;\n break;\n\n case 'dangerouslySetInnerHTML':\n innerHTML = propValue;\n break;\n\n default:\n pushAttribute(target, propKey, propValue);\n break;\n }\n }\n }\n\n target.push(endOfStartTag);\n\n {\n if (children != null && typeof children !== 'string') {\n var descriptiveStatement = typeof children === 'number' ? 'a number for children' : Array.isArray(children) ? 'an array for children' : 'something unexpected for children';\n\n error('A script element was rendered with %s. If script element has children it must be a single string.' + ' Consider using dangerouslySetInnerHTML or passing a plain string as children.', descriptiveStatement);\n }\n }\n\n pushInnerHTML(target, innerHTML, children);\n\n if (typeof children === 'string') {\n target.push(stringToChunk(encodeHTMLTextNode(children)));\n }\n\n target.push(endChunkForTag('script'));\n return null;\n}\n\nfunction pushStartGenericElement(target, props, tag) {\n target.push(startChunkForTag(tag));\n var children = null;\n var innerHTML = null;\n\n for (var propKey in props) {\n if (hasOwnProperty.call(props, propKey)) {\n var propValue = props[propKey];\n\n if (propValue == null) {\n continue;\n }\n\n switch (propKey) {\n case 'children':\n children = propValue;\n break;\n\n case 'dangerouslySetInnerHTML':\n innerHTML = propValue;\n break;\n\n default:\n pushAttribute(target, propKey, propValue);\n break;\n }\n }\n }\n\n target.push(endOfStartTag);\n pushInnerHTML(target, innerHTML, children);\n\n if (typeof children === 'string') {\n // Special case children as a string to avoid the unnecessary comment.\n // TODO: Remove this special case after the general optimization is in place.\n target.push(stringToChunk(encodeHTMLTextNode(children)));\n return null;\n }\n\n return children;\n}\n\nfunction pushStartCustomElement(target, props, tag) {\n target.push(startChunkForTag(tag));\n var children = null;\n var innerHTML = null;\n\n for (var propKey in props) {\n if (hasOwnProperty.call(props, propKey)) {\n var propValue = props[propKey];\n\n if (propValue == null) {\n continue;\n }\n\n var attributeName = propKey;\n\n switch (propKey) {\n case 'children':\n children = propValue;\n break;\n\n case 'dangerouslySetInnerHTML':\n innerHTML = propValue;\n break;\n\n case 'style':\n pushStyleAttribute(target, propValue);\n break;\n\n case 'suppressContentEditableWarning':\n case 'suppressHydrationWarning':\n case 'ref':\n // Ignored. These are built-in to React on the client.\n break;\n\n case 'className':\n\n // intentional fallthrough\n\n default:\n if (isAttributeNameSafe(propKey) && typeof propValue !== 'function' && typeof propValue !== 'symbol') {\n\n target.push(attributeSeparator, stringToChunk(attributeName), attributeAssign, stringToChunk(escapeTextForBrowser(propValue)), attributeEnd);\n }\n\n break;\n }\n }\n }\n\n target.push(endOfStartTag);\n pushInnerHTML(target, innerHTML, children);\n return children;\n}\n\nvar leadingNewline = stringToPrecomputedChunk('\\n');\n\nfunction pushStartPreformattedElement(target, props, tag) {\n target.push(startChunkForTag(tag));\n var children = null;\n var innerHTML = null;\n\n for (var propKey in props) {\n if (hasOwnProperty.call(props, propKey)) {\n var propValue = props[propKey];\n\n if (propValue == null) {\n continue;\n }\n\n switch (propKey) {\n case 'children':\n children = propValue;\n break;\n\n case 'dangerouslySetInnerHTML':\n innerHTML = propValue;\n break;\n\n default:\n pushAttribute(target, propKey, propValue);\n break;\n }\n }\n }\n\n target.push(endOfStartTag); // text/html ignores the first character in these tags if it's a newline\n // Prefer to break application/xml over text/html (for now) by adding\n // a newline specifically to get eaten by the parser. (Alternately for\n // textareas, replacing \"^\\n\" with \"\\r\\n\" doesn't get eaten, and the first\n // \\r is normalized out by HTMLTextAreaElement#value.)\n // See: <http://www.w3.org/TR/html-polyglot/#newlines-in-textarea-and-pre>\n // See: <http://www.w3.org/TR/html5/syntax.html#element-restrictions>\n // See: <http://www.w3.org/TR/html5/syntax.html#newlines>\n // See: Parsing of \"textarea\" \"listing\" and \"pre\" elements\n // from <http://www.w3.org/TR/html5/syntax.html#parsing-main-inbody>\n // TODO: This doesn't deal with the case where the child is an array\n // or component that returns a string.\n\n if (innerHTML != null) {\n if (children != null) {\n throw new Error('Can only set one of `children` or `props.dangerouslySetInnerHTML`.');\n }\n\n if (typeof innerHTML !== 'object' || !('__html' in innerHTML)) {\n throw new Error('`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. ' + 'Please visit https://react.dev/link/dangerously-set-inner-html ' + 'for more information.');\n }\n\n var html = innerHTML.__html;\n\n if (html !== null && html !== undefined) {\n if (typeof html === 'string' && html.length > 0 && html[0] === '\\n') {\n target.push(leadingNewline, stringToChunk(html));\n } else {\n {\n checkHtmlStringCoercion(html);\n }\n\n target.push(stringToChunk('' + html));\n }\n }\n }\n\n if (typeof children === 'string' && children[0] === '\\n') {\n target.push(leadingNewline);\n }\n\n return children;\n} // We accept any tag to be rendered but since this gets injected into arbitrary\n// HTML, we want to make sure that it's a safe tag.\n// http://www.w3.org/TR/REC-xml/#NT-Name\n\n\nvar VALID_TAG_REGEX = /^[a-zA-Z][a-zA-Z:_\\.\\-\\d]*$/; // Simplified subset\n\nvar validatedTagCache = new Map();\n\nfunction startChunkForTag(tag) {\n var tagStartChunk = validatedTagCache.get(tag);\n\n if (tagStartChunk === undefined) {\n if (!VALID_TAG_REGEX.test(tag)) {\n throw new Error(\"Invalid tag: \" + tag);\n }\n\n tagStartChunk = stringToPrecomputedChunk('<' + tag);\n validatedTagCache.set(tag, tagStartChunk);\n }\n\n return tagStartChunk;\n}\nfunction pushStartInstance(target, type, props, resumableState, renderState, hoistableState, formatContext, textEmbedded, isFallback) {\n {\n validateProperties$2(type, props);\n validateProperties$1(type, props);\n validateProperties(type, props, null);\n\n if (!props.suppressContentEditableWarning && props.contentEditable && props.children != null) {\n error('A component is `contentEditable` and contains `children` managed by ' + 'React. It is now your responsibility to guarantee that none of ' + 'those nodes are unexpectedly modified or duplicated. This is ' + 'probably not intentional.');\n }\n\n if (formatContext.insertionMode !== SVG_MODE && formatContext.insertionMode !== MATHML_MODE) {\n if (type.indexOf('-') === -1 && type.toLowerCase() !== type) {\n error('<%s /> is using incorrect casing. ' + 'Use PascalCase for React components, ' + 'or lowercase for HTML elements.', type);\n }\n }\n }\n\n switch (type) {\n case 'div':\n case 'span':\n case 'svg':\n case 'path':\n // Fast track very common tags\n break;\n\n case 'a':\n {\n break;\n }\n\n case 'g':\n case 'p':\n case 'li':\n // Fast track very common tags\n break;\n // Special tags\n\n case 'select':\n return pushStartSelect(target, props);\n\n case 'option':\n return pushStartOption(target, props, formatContext);\n\n case 'textarea':\n return pushStartTextArea(target, props);\n\n case 'input':\n return pushInput(target, props, resumableState, renderState);\n\n case 'button':\n return pushStartButton(target, props, resumableState, renderState);\n\n case 'form':\n return pushStartForm(target, props, resumableState, renderState);\n\n case 'menuitem':\n return pushStartMenuItem(target, props);\n\n case 'title':\n return pushTitle(target, props, renderState, formatContext.insertionMode, !!(formatContext.tagScope & NOSCRIPT_SCOPE), isFallback) ;\n\n case 'link':\n return pushLink(target, props, resumableState, renderState, hoistableState, textEmbedded, formatContext.insertionMode, !!(formatContext.tagScope & NOSCRIPT_SCOPE), isFallback);\n\n case 'script':\n return pushScript(target, props, resumableState, renderState, textEmbedded, formatContext.insertionMode, !!(formatContext.tagScope & NOSCRIPT_SCOPE)) ;\n\n case 'style':\n return pushStyle(target, props, resumableState, renderState, hoistableState, textEmbedded, formatContext.insertionMode, !!(formatContext.tagScope & NOSCRIPT_SCOPE));\n\n case 'meta':\n return pushMeta(target, props, renderState, textEmbedded, formatContext.insertionMode, !!(formatContext.tagScope & NOSCRIPT_SCOPE), isFallback);\n // Newline eating tags\n\n case 'listing':\n case 'pre':\n {\n return pushStartPreformattedElement(target, props, type);\n }\n\n case 'img':\n {\n return pushImg(target, props, resumableState, renderState, !!(formatContext.tagScope & PICTURE_SCOPE)) ;\n }\n // Omitted close tags\n\n case 'base':\n case 'area':\n case 'br':\n case 'col':\n case 'embed':\n case 'hr':\n case 'keygen':\n case 'param':\n case 'source':\n case 'track':\n case 'wbr':\n {\n return pushSelfClosing(target, props, type);\n }\n // These are reserved SVG and MathML elements, that are never custom elements.\n // https://html.spec.whatwg.org/multipage/custom-elements.html#custom-elements-core-concepts\n\n case 'annotation-xml':\n case 'color-profile':\n case 'font-face':\n case 'font-face-src':\n case 'font-face-uri':\n case 'font-face-format':\n case 'font-face-name':\n case 'missing-glyph':\n {\n break;\n }\n // Preamble start tags\n\n case 'head':\n return pushStartHead(target, props, renderState, formatContext.insertionMode);\n\n case 'html':\n {\n return pushStartHtml(target, props, renderState, formatContext.insertionMode);\n }\n\n default:\n {\n if (type.indexOf('-') !== -1) {\n // Custom element\n return pushStartCustomElement(target, props, type);\n }\n }\n } // Generic element\n\n\n return pushStartGenericElement(target, props, type);\n}\nvar endTagCache = new Map();\n\nfunction endChunkForTag(tag) {\n var chunk = endTagCache.get(tag);\n\n if (chunk === undefined) {\n chunk = stringToPrecomputedChunk('</' + tag + '>');\n endTagCache.set(tag, chunk);\n }\n\n return chunk;\n}\n\nfunction pushEndInstance(target, type, props, resumableState, formatContext) {\n switch (type) {\n // When float is on we expect title and script tags to always be pushed in\n // a unit and never return children. when we end up pushing the end tag we\n // want to ensure there is no extra closing tag pushed\n case 'title':\n case 'style':\n case 'script':\n // Omitted close tags\n // TODO: Instead of repeating this switch we could try to pass a flag from above.\n // That would require returning a tuple. Which might be ok if it gets inlined.\n\n case 'area':\n case 'base':\n case 'br':\n case 'col':\n case 'embed':\n case 'hr':\n case 'img':\n case 'input':\n case 'keygen':\n case 'link':\n case 'meta':\n case 'param':\n case 'source':\n case 'track':\n case 'wbr':\n {\n // No close tag needed.\n return;\n }\n // Postamble end tags\n // When float is enabled we omit the end tags for body and html when\n // they represent the Document.body and Document.documentElement Nodes.\n // This is so we can withhold them until the postamble when we know\n // we won't emit any more tags\n\n case 'body':\n {\n if (formatContext.insertionMode <= HTML_HTML_MODE) {\n resumableState.hasBody = true;\n return;\n }\n\n break;\n }\n\n case 'html':\n if (formatContext.insertionMode === ROOT_HTML_MODE) {\n resumableState.hasHtml = true;\n return;\n }\n\n break;\n }\n\n target.push(endChunkForTag(type));\n}\n\nfunction writeBootstrap(destination, renderState) {\n var bootstrapChunks = renderState.bootstrapChunks;\n var i = 0;\n\n for (; i < bootstrapChunks.length - 1; i++) {\n writeChunk(destination, bootstrapChunks[i]);\n }\n\n if (i < bootstrapChunks.length) {\n var lastChunk = bootstrapChunks[i];\n bootstrapChunks.length = 0;\n return writeChunkAndReturn(destination, lastChunk);\n }\n\n return true;\n}\n\nfunction writeCompletedRoot(destination, renderState) {\n return writeBootstrap(destination, renderState);\n} // Structural Nodes\n// A placeholder is a node inside a hidden partial tree that can be filled in later, but before\n// display. It's never visible to users. We use the template tag because it can be used in every\n// type of parent. <script> tags also work in every other tag except <colgroup>.\n\nvar placeholder1 = stringToPrecomputedChunk('<template id=\"');\nvar placeholder2 = stringToPrecomputedChunk('\"></template>');\nfunction writePlaceholder(destination, renderState, id) {\n writeChunk(destination, placeholder1);\n writeChunk(destination, renderState.placeholderPrefix);\n var formattedID = stringToChunk(id.toString(16));\n writeChunk(destination, formattedID);\n return writeChunkAndReturn(destination, placeholder2);\n} // Suspense boundaries are encoded as comments.\n\nvar startCompletedSuspenseBoundary = stringToPrecomputedChunk('<!--$-->');\nvar startPendingSuspenseBoundary1 = stringToPrecomputedChunk('<!--$?--><template id=\"');\nvar startPendingSuspenseBoundary2 = stringToPrecomputedChunk('\"></template>');\nvar startClientRenderedSuspenseBoundary = stringToPrecomputedChunk('<!--$!-->');\nvar endSuspenseBoundary = stringToPrecomputedChunk('<!--/$-->');\nvar clientRenderedSuspenseBoundaryError1 = stringToPrecomputedChunk('<template');\nvar clientRenderedSuspenseBoundaryErrorAttrInterstitial = stringToPrecomputedChunk('\"');\nvar clientRenderedSuspenseBoundaryError1A = stringToPrecomputedChunk(' data-dgst=\"');\nvar clientRenderedSuspenseBoundaryError1B = stringToPrecomputedChunk(' data-msg=\"');\nvar clientRenderedSuspenseBoundaryError1C = stringToPrecomputedChunk(' data-stck=\"');\nvar clientRenderedSuspenseBoundaryError2 = stringToPrecomputedChunk('></template>');\nfunction writeStartCompletedSuspenseBoundary$1(destination, renderState) {\n return writeChunkAndReturn(destination, startCompletedSuspenseBoundary);\n}\nfunction writeStartPendingSuspenseBoundary(destination, renderState, id) {\n writeChunk(destination, startPendingSuspenseBoundary1);\n\n if (id === null) {\n throw new Error('An ID must have been assigned before we can complete the boundary.');\n }\n\n writeChunk(destination, renderState.boundaryPrefix);\n writeChunk(destination, stringToChunk(id.toString(16)));\n return writeChunkAndReturn(destination, startPendingSuspenseBoundary2);\n}\nfunction writeStartClientRenderedSuspenseBoundary$1(destination, renderState, errorDigest, errorMesssage, errorComponentStack) {\n var result;\n result = writeChunkAndReturn(destination, startClientRenderedSuspenseBoundary);\n writeChunk(destination, clientRenderedSuspenseBoundaryError1);\n\n if (errorDigest) {\n writeChunk(destination, clientRenderedSuspenseBoundaryError1A);\n writeChunk(destination, stringToChunk(escapeTextForBrowser(errorDigest)));\n writeChunk(destination, clientRenderedSuspenseBoundaryErrorAttrInterstitial);\n }\n\n {\n if (errorMesssage) {\n writeChunk(destination, clientRenderedSuspenseBoundaryError1B);\n writeChunk(destination, stringToChunk(escapeTextForBrowser(errorMesssage)));\n writeChunk(destination, clientRenderedSuspenseBoundaryErrorAttrInterstitial);\n }\n\n if (errorComponentStack) {\n writeChunk(destination, clientRenderedSuspenseBoundaryError1C);\n writeChunk(destination, stringToChunk(escapeTextForBrowser(errorComponentStack)));\n writeChunk(destination, clientRenderedSuspenseBoundaryErrorAttrInterstitial);\n }\n }\n\n result = writeChunkAndReturn(destination, clientRenderedSuspenseBoundaryError2);\n return result;\n}\nfunction writeEndCompletedSuspenseBoundary$1(destination, renderState) {\n return writeChunkAndReturn(destination, endSuspenseBoundary);\n}\nfunction writeEndPendingSuspenseBoundary(destination, renderState) {\n return writeChunkAndReturn(destination, endSuspenseBoundary);\n}\nfunction writeEndClientRenderedSuspenseBoundary$1(destination, renderState) {\n return writeChunkAndReturn(destination, endSuspenseBoundary);\n}\nvar startSegmentHTML = stringToPrecomputedChunk('<div hidden id=\"');\nvar startSegmentHTML2 = stringToPrecomputedChunk('\">');\nvar endSegmentHTML = stringToPrecomputedChunk('</div>');\nvar startSegmentSVG = stringToPrecomputedChunk('<svg aria-hidden=\"true\" style=\"display:none\" id=\"');\nvar startSegmentSVG2 = stringToPrecomputedChunk('\">');\nvar endSegmentSVG = stringToPrecomputedChunk('</svg>');\nvar startSegmentMathML = stringToPrecomputedChunk('<math aria-hidden=\"true\" style=\"display:none\" id=\"');\nvar startSegmentMathML2 = stringToPrecomputedChunk('\">');\nvar endSegmentMathML = stringToPrecomputedChunk('</math>');\nvar startSegmentTable = stringToPrecomputedChunk('<table hidden id=\"');\nvar startSegmentTable2 = stringToPrecomputedChunk('\">');\nvar endSegmentTable = stringToPrecomputedChunk('</table>');\nvar startSegmentTableBody = stringToPrecomputedChunk('<table hidden><tbody id=\"');\nvar startSegmentTableBody2 = stringToPrecomputedChunk('\">');\nvar endSegmentTableBody = stringToPrecomputedChunk('</tbody></table>');\nvar startSegmentTableRow = stringToPrecomputedChunk('<table hidden><tr id=\"');\nvar startSegmentTableRow2 = stringToPrecomputedChunk('\">');\nvar endSegmentTableRow = stringToPrecomputedChunk('</tr></table>');\nvar startSegmentColGroup = stringToPrecomputedChunk('<table hidden><colgroup id=\"');\nvar startSegmentColGroup2 = stringToPrecomputedChunk('\">');\nvar endSegmentColGroup = stringToPrecomputedChunk('</colgroup></table>');\nfunction writeStartSegment(destination, renderState, formatContext, id) {\n switch (formatContext.insertionMode) {\n case ROOT_HTML_MODE:\n case HTML_HTML_MODE:\n case HTML_MODE:\n {\n writeChunk(destination, startSegmentHTML);\n writeChunk(destination, renderState.segmentPrefix);\n writeChunk(destination, stringToChunk(id.toString(16)));\n return writeChunkAndReturn(destination, startSegmentHTML2);\n }\n\n case SVG_MODE:\n {\n writeChunk(destination, startSegmentSVG);\n writeChunk(destination, renderState.segmentPrefix);\n writeChunk(destination, stringToChunk(id.toString(16)));\n return writeChunkAndReturn(destination, startSegmentSVG2);\n }\n\n case MATHML_MODE:\n {\n writeChunk(destination, startSegmentMathML);\n writeChunk(destination, renderState.segmentPrefix);\n writeChunk(destination, stringToChunk(id.toString(16)));\n return writeChunkAndReturn(destination, startSegmentMathML2);\n }\n\n case HTML_TABLE_MODE:\n {\n writeChunk(destination, startSegmentTable);\n writeChunk(destination, renderState.segmentPrefix);\n writeChunk(destination, stringToChunk(id.toString(16)));\n return writeChunkAndReturn(destination, startSegmentTable2);\n }\n // TODO: For the rest of these, there will be extra wrapper nodes that never\n // get deleted from the document. We need to delete the table too as part\n // of the injected scripts. They are invisible though so it's not too terrible\n // and it's kind of an edge case to suspend in a table. Totally supported though.\n\n case HTML_TABLE_BODY_MODE:\n {\n writeChunk(destination, startSegmentTableBody);\n writeChunk(destination, renderState.segmentPrefix);\n writeChunk(destination, stringToChunk(id.toString(16)));\n return writeChunkAndReturn(destination, startSegmentTableBody2);\n }\n\n case HTML_TABLE_ROW_MODE:\n {\n writeChunk(destination, startSegmentTableRow);\n writeChunk(destination, renderState.segmentPrefix);\n writeChunk(destination, stringToChunk(id.toString(16)));\n return writeChunkAndReturn(destination, startSegmentTableRow2);\n }\n\n case HTML_COLGROUP_MODE:\n {\n writeChunk(destination, startSegmentColGroup);\n writeChunk(destination, renderState.segmentPrefix);\n writeChunk(destination, stringToChunk(id.toString(16)));\n return writeChunkAndReturn(destination, startSegmentColGroup2);\n }\n\n default:\n {\n throw new Error('Unknown insertion mode. This is a bug in React.');\n }\n }\n}\nfunction writeEndSegment(destination, formatContext) {\n switch (formatContext.insertionMode) {\n case ROOT_HTML_MODE:\n case HTML_HTML_MODE:\n case HTML_MODE:\n {\n return writeChunkAndReturn(destination, endSegmentHTML);\n }\n\n case SVG_MODE:\n {\n return writeChunkAndReturn(destination, endSegmentSVG);\n }\n\n case MATHML_MODE:\n {\n return writeChunkAndReturn(destination, endSegmentMathML);\n }\n\n case HTML_TABLE_MODE:\n {\n return writeChunkAndReturn(destination, endSegmentTable);\n }\n\n case HTML_TABLE_BODY_MODE:\n {\n return writeChunkAndReturn(destination, endSegmentTableBody);\n }\n\n case HTML_TABLE_ROW_MODE:\n {\n return writeChunkAndReturn(destination, endSegmentTableRow);\n }\n\n case HTML_COLGROUP_MODE:\n {\n return writeChunkAndReturn(destination, endSegmentColGroup);\n }\n\n default:\n {\n throw new Error('Unknown insertion mode. This is a bug in React.');\n }\n }\n}\nvar completeSegmentScript1Full = stringToPrecomputedChunk(completeSegment + '$RS(\"');\nvar completeSegmentScript1Partial = stringToPrecomputedChunk('$RS(\"');\nvar completeSegmentScript2 = stringToPrecomputedChunk('\",\"');\nvar completeSegmentScriptEnd = stringToPrecomputedChunk('\")</script>');\nvar completeSegmentData1 = stringToPrecomputedChunk('<template data-rsi=\"\" data-sid=\"');\nvar completeSegmentData2 = stringToPrecomputedChunk('\" data-pid=\"');\nvar completeSegmentDataEnd = dataElementQuotedEnd;\nfunction writeCompletedSegmentInstruction(destination, resumableState, renderState, contentSegmentID) {\n var scriptFormat = resumableState.streamingFormat === ScriptStreamingFormat;\n\n if (scriptFormat) {\n writeChunk(destination, renderState.startInlineScript);\n\n if ((resumableState.instructions & SentCompleteSegmentFunction) === NothingSent) {\n // The first time we write this, we'll need to include the full implementation.\n resumableState.instructions |= SentCompleteSegmentFunction;\n writeChunk(destination, completeSegmentScript1Full);\n } else {\n // Future calls can just reuse the same function.\n writeChunk(destination, completeSegmentScript1Partial);\n }\n } else {\n writeChunk(destination, completeSegmentData1);\n } // Write function arguments, which are string literals\n\n\n writeChunk(destination, renderState.segmentPrefix);\n var formattedID = stringToChunk(contentSegmentID.toString(16));\n writeChunk(destination, formattedID);\n\n if (scriptFormat) {\n writeChunk(destination, completeSegmentScript2);\n } else {\n writeChunk(destination, completeSegmentData2);\n }\n\n writeChunk(destination, renderState.placeholderPrefix);\n writeChunk(destination, formattedID);\n\n if (scriptFormat) {\n return writeChunkAndReturn(destination, completeSegmentScriptEnd);\n } else {\n return writeChunkAndReturn(destination, completeSegmentDataEnd);\n }\n}\nvar completeBoundaryScript1Full = stringToPrecomputedChunk(completeBoundary + '$RC(\"');\nvar completeBoundaryScript1Partial = stringToPrecomputedChunk('$RC(\"');\nvar completeBoundaryWithStylesScript1FullBoth = stringToPrecomputedChunk(completeBoundary + completeBoundaryWithStyles + '$RR(\"');\nvar completeBoundaryWithStylesScript1FullPartial = stringToPrecomputedChunk(completeBoundaryWithStyles + '$RR(\"');\nvar completeBoundaryWithStylesScript1Partial = stringToPrecomputedChunk('$RR(\"');\nvar completeBoundaryScript2 = stringToPrecomputedChunk('\",\"');\nvar completeBoundaryScript3a = stringToPrecomputedChunk('\",');\nvar completeBoundaryScript3b = stringToPrecomputedChunk('\"');\nvar completeBoundaryScriptEnd = stringToPrecomputedChunk(')</script>');\nvar completeBoundaryData1 = stringToPrecomputedChunk('<template data-rci=\"\" data-bid=\"');\nvar completeBoundaryWithStylesData1 = stringToPrecomputedChunk('<template data-rri=\"\" data-bid=\"');\nvar completeBoundaryData2 = stringToPrecomputedChunk('\" data-sid=\"');\nvar completeBoundaryData3a = stringToPrecomputedChunk('\" data-sty=\"');\nvar completeBoundaryDataEnd = dataElementQuotedEnd;\nfunction writeCompletedBoundaryInstruction(destination, resumableState, renderState, id, hoistableState) {\n var requiresStyleInsertion;\n\n {\n requiresStyleInsertion = renderState.stylesToHoist; // If necessary stylesheets will be flushed with this instruction.\n // Any style tags not yet hoisted in the Document will also be hoisted.\n // We reset this state since after this instruction executes all styles\n // up to this point will have been hoisted\n\n renderState.stylesToHoist = false;\n }\n\n var scriptFormat = resumableState.streamingFormat === ScriptStreamingFormat;\n\n if (scriptFormat) {\n writeChunk(destination, renderState.startInlineScript);\n\n if (requiresStyleInsertion) {\n if ((resumableState.instructions & SentCompleteBoundaryFunction) === NothingSent) {\n resumableState.instructions |= SentStyleInsertionFunction | SentCompleteBoundaryFunction;\n writeChunk(destination, completeBoundaryWithStylesScript1FullBoth);\n } else if ((resumableState.instructions & SentStyleInsertionFunction) === NothingSent) {\n resumableState.instructions |= SentStyleInsertionFunction;\n writeChunk(destination, completeBoundaryWithStylesScript1FullPartial);\n } else {\n writeChunk(destination, completeBoundaryWithStylesScript1Partial);\n }\n } else {\n if ((resumableState.instructions & SentCompleteBoundaryFunction) === NothingSent) {\n resumableState.instructions |= SentCompleteBoundaryFunction;\n writeChunk(destination, completeBoundaryScript1Full);\n } else {\n writeChunk(destination, completeBoundaryScript1Partial);\n }\n }\n } else {\n if (requiresStyleInsertion) {\n writeChunk(destination, completeBoundaryWithStylesData1);\n } else {\n writeChunk(destination, completeBoundaryData1);\n }\n }\n\n var idChunk = stringToChunk(id.toString(16));\n writeChunk(destination, renderState.boundaryPrefix);\n writeChunk(destination, idChunk); // Write function arguments, which are string and array literals\n\n if (scriptFormat) {\n writeChunk(destination, completeBoundaryScript2);\n } else {\n writeChunk(destination, completeBoundaryData2);\n }\n\n writeChunk(destination, renderState.segmentPrefix);\n writeChunk(destination, idChunk);\n\n if (requiresStyleInsertion) {\n // Script and data writers must format this differently:\n // - script writer emits an array literal, whose string elements are\n // escaped for javascript e.g. [\"A\", \"B\"]\n // - data writer emits a string literal, which is escaped as html\n // e.g. ["A", "B"]\n if (scriptFormat) {\n writeChunk(destination, completeBoundaryScript3a); // hoistableState encodes an array literal\n\n writeStyleResourceDependenciesInJS(destination, hoistableState);\n } else {\n writeChunk(destination, completeBoundaryData3a);\n writeStyleResourceDependenciesInAttr(destination, hoistableState);\n }\n } else {\n if (scriptFormat) {\n writeChunk(destination, completeBoundaryScript3b);\n }\n }\n\n var writeMore;\n\n if (scriptFormat) {\n writeMore = writeChunkAndReturn(destination, completeBoundaryScriptEnd);\n } else {\n writeMore = writeChunkAndReturn(destination, completeBoundaryDataEnd);\n }\n\n return writeBootstrap(destination, renderState) && writeMore;\n}\nvar clientRenderScript1Full = stringToPrecomputedChunk(clientRenderBoundary + ';$RX(\"');\nvar clientRenderScript1Partial = stringToPrecomputedChunk('$RX(\"');\nvar clientRenderScript1A = stringToPrecomputedChunk('\"');\nvar clientRenderErrorScriptArgInterstitial = stringToPrecomputedChunk(',');\nvar clientRenderScriptEnd = stringToPrecomputedChunk(')</script>');\nvar clientRenderData1 = stringToPrecomputedChunk('<template data-rxi=\"\" data-bid=\"');\nvar clientRenderData2 = stringToPrecomputedChunk('\" data-dgst=\"');\nvar clientRenderData3 = stringToPrecomputedChunk('\" data-msg=\"');\nvar clientRenderData4 = stringToPrecomputedChunk('\" data-stck=\"');\nvar clientRenderDataEnd = dataElementQuotedEnd;\nfunction writeClientRenderBoundaryInstruction(destination, resumableState, renderState, id, errorDigest, errorMessage, errorComponentStack) {\n var scriptFormat = resumableState.streamingFormat === ScriptStreamingFormat;\n\n if (scriptFormat) {\n writeChunk(destination, renderState.startInlineScript);\n\n if ((resumableState.instructions & SentClientRenderFunction) === NothingSent) {\n // The first time we write this, we'll need to include the full implementation.\n resumableState.instructions |= SentClientRenderFunction;\n writeChunk(destination, clientRenderScript1Full);\n } else {\n // Future calls can just reuse the same function.\n writeChunk(destination, clientRenderScript1Partial);\n }\n } else {\n // <template data-rxi=\"\" data-bid=\"\n writeChunk(destination, clientRenderData1);\n }\n\n writeChunk(destination, renderState.boundaryPrefix);\n writeChunk(destination, stringToChunk(id.toString(16)));\n\n if (scriptFormat) {\n // \" needs to be inserted for scripts, since ArgInterstitual does not contain\n // leading or trailing quotes\n writeChunk(destination, clientRenderScript1A);\n }\n\n if (errorDigest || errorMessage || errorComponentStack) {\n if (scriptFormat) {\n // ,\"JSONString\"\n writeChunk(destination, clientRenderErrorScriptArgInterstitial);\n writeChunk(destination, stringToChunk(escapeJSStringsForInstructionScripts(errorDigest || '')));\n } else {\n // \" data-dgst=\"HTMLString\n writeChunk(destination, clientRenderData2);\n writeChunk(destination, stringToChunk(escapeTextForBrowser(errorDigest || '')));\n }\n }\n\n if (errorMessage || errorComponentStack) {\n if (scriptFormat) {\n // ,\"JSONString\"\n writeChunk(destination, clientRenderErrorScriptArgInterstitial);\n writeChunk(destination, stringToChunk(escapeJSStringsForInstructionScripts(errorMessage || '')));\n } else {\n // \" data-msg=\"HTMLString\n writeChunk(destination, clientRenderData3);\n writeChunk(destination, stringToChunk(escapeTextForBrowser(errorMessage || '')));\n }\n }\n\n if (errorComponentStack) {\n // ,\"JSONString\"\n if (scriptFormat) {\n writeChunk(destination, clientRenderErrorScriptArgInterstitial);\n writeChunk(destination, stringToChunk(escapeJSStringsForInstructionScripts(errorComponentStack)));\n } else {\n // \" data-stck=\"HTMLString\n writeChunk(destination, clientRenderData4);\n writeChunk(destination, stringToChunk(escapeTextForBrowser(errorComponentStack)));\n }\n }\n\n if (scriptFormat) {\n // ></script>\n return writeChunkAndReturn(destination, clientRenderScriptEnd);\n } else {\n // \"></template>\n return writeChunkAndReturn(destination, clientRenderDataEnd);\n }\n}\nvar regexForJSStringsInInstructionScripts = /[<\\u2028\\u2029]/g;\n\nfunction escapeJSStringsForInstructionScripts(input) {\n var escaped = JSON.stringify(input);\n return escaped.replace(regexForJSStringsInInstructionScripts, function (match) {\n switch (match) {\n // santizing breaking out of strings and script tags\n case '<':\n return \"\\\\u003c\";\n\n case \"\\u2028\":\n return \"\\\\u2028\";\n\n case \"\\u2029\":\n return \"\\\\u2029\";\n\n default:\n {\n // eslint-disable-next-line react-internal/prod-error-codes\n throw new Error('escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React');\n }\n }\n });\n}\n\nvar regexForJSStringsInScripts = /[&><\\u2028\\u2029]/g;\n\nfunction escapeJSObjectForInstructionScripts(input) {\n var escaped = JSON.stringify(input);\n return escaped.replace(regexForJSStringsInScripts, function (match) {\n switch (match) {\n // santizing breaking out of strings and script tags\n case '&':\n return \"\\\\u0026\";\n\n case '>':\n return \"\\\\u003e\";\n\n case '<':\n return \"\\\\u003c\";\n\n case \"\\u2028\":\n return \"\\\\u2028\";\n\n case \"\\u2029\":\n return \"\\\\u2029\";\n\n default:\n {\n // eslint-disable-next-line react-internal/prod-error-codes\n throw new Error('escapeJSObjectForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React');\n }\n }\n });\n}\n\nvar lateStyleTagResourceOpen1 = stringToPrecomputedChunk('<style media=\"not all\" data-precedence=\"');\nvar lateStyleTagResourceOpen2 = stringToPrecomputedChunk('\" data-href=\"');\nvar lateStyleTagResourceOpen3 = stringToPrecomputedChunk('\">');\nvar lateStyleTagTemplateClose = stringToPrecomputedChunk('</style>'); // Tracks whether the boundary currently flushing is flushign style tags or has any\n// stylesheet dependencies not flushed in the Preamble.\n\nvar currentlyRenderingBoundaryHasStylesToHoist = false; // Acts as a return value for the forEach execution of style tag flushing.\n\nvar destinationHasCapacity = true;\n\nfunction flushStyleTagsLateForBoundary(styleQueue) {\n var rules = styleQueue.rules;\n var hrefs = styleQueue.hrefs;\n\n {\n if (rules.length > 0 && hrefs.length === 0) {\n error('React expected to have at least one href for an a hoistable style but found none. This is a bug in React.');\n }\n }\n\n var i = 0;\n\n if (hrefs.length) {\n writeChunk(this, lateStyleTagResourceOpen1);\n writeChunk(this, styleQueue.precedence);\n writeChunk(this, lateStyleTagResourceOpen2);\n\n for (; i < hrefs.length - 1; i++) {\n writeChunk(this, hrefs[i]);\n writeChunk(this, spaceSeparator);\n }\n\n writeChunk(this, hrefs[i]);\n writeChunk(this, lateStyleTagResourceOpen3);\n\n for (i = 0; i < rules.length; i++) {\n writeChunk(this, rules[i]);\n }\n\n destinationHasCapacity = writeChunkAndReturn(this, lateStyleTagTemplateClose); // We wrote style tags for this boundary and we may need to emit a script\n // to hoist them.\n\n currentlyRenderingBoundaryHasStylesToHoist = true; // style resources can flush continuously since more rules may be written into\n // them with new hrefs. Instead of marking it flushed, we simply reset the chunks\n // and hrefs\n\n rules.length = 0;\n hrefs.length = 0;\n }\n}\n\nfunction hasStylesToHoist(stylesheet) {\n // We need to reveal boundaries with styles whenever a stylesheet it depends on is either\n // not flushed or flushed after the preamble (shell).\n if (stylesheet.state !== PREAMBLE) {\n currentlyRenderingBoundaryHasStylesToHoist = true;\n return true;\n }\n\n return false;\n}\n\nfunction writeHoistablesForBoundary(destination, hoistableState, renderState) {\n // Reset these on each invocation, they are only safe to read in this function\n currentlyRenderingBoundaryHasStylesToHoist = false;\n destinationHasCapacity = true; // Flush style tags for each precedence this boundary depends on\n\n hoistableState.styles.forEach(flushStyleTagsLateForBoundary, destination); // Determine if this boundary has stylesheets that need to be awaited upon completion\n\n hoistableState.stylesheets.forEach(hasStylesToHoist); // We don't actually want to flush any hoistables until the boundary is complete so we omit\n // any further writing here. This is becuase unlike Resources, Hoistable Elements act more like\n // regular elements, each rendered element has a unique representation in the DOM. We don't want\n // these elements to appear in the DOM early, before the boundary has actually completed\n\n if (currentlyRenderingBoundaryHasStylesToHoist) {\n renderState.stylesToHoist = true;\n }\n\n return destinationHasCapacity;\n}\n\nfunction flushResource(resource) {\n for (var i = 0; i < resource.length; i++) {\n writeChunk(this, resource[i]);\n }\n\n resource.length = 0;\n}\n\nvar stylesheetFlushingQueue = [];\n\nfunction flushStyleInPreamble(stylesheet, key, map) {\n // We still need to encode stylesheet chunks\n // because unlike most Hoistables and Resources we do not eagerly encode\n // them during render. This is because if we flush late we have to send a\n // different encoding and we don't want to encode multiple times\n pushLinkImpl(stylesheetFlushingQueue, stylesheet.props);\n\n for (var i = 0; i < stylesheetFlushingQueue.length; i++) {\n writeChunk(this, stylesheetFlushingQueue[i]);\n }\n\n stylesheetFlushingQueue.length = 0;\n stylesheet.state = PREAMBLE;\n}\n\nvar styleTagResourceOpen1 = stringToPrecomputedChunk('<style data-precedence=\"');\nvar styleTagResourceOpen2 = stringToPrecomputedChunk('\" data-href=\"');\nvar spaceSeparator = stringToPrecomputedChunk(' ');\nvar styleTagResourceOpen3 = stringToPrecomputedChunk('\">');\nvar styleTagResourceClose = stringToPrecomputedChunk('</style>');\n\nfunction flushStylesInPreamble(styleQueue, precedence) {\n var hasStylesheets = styleQueue.sheets.size > 0;\n styleQueue.sheets.forEach(flushStyleInPreamble, this);\n styleQueue.sheets.clear();\n var rules = styleQueue.rules;\n var hrefs = styleQueue.hrefs; // If we don't emit any stylesheets at this precedence we still need to maintain the precedence\n // order so even if there are no rules for style tags at this precedence we emit an empty style\n // tag with the data-precedence attribute\n\n if (!hasStylesheets || hrefs.length) {\n writeChunk(this, styleTagResourceOpen1);\n writeChunk(this, styleQueue.precedence);\n var i = 0;\n\n if (hrefs.length) {\n writeChunk(this, styleTagResourceOpen2);\n\n for (; i < hrefs.length - 1; i++) {\n writeChunk(this, hrefs[i]);\n writeChunk(this, spaceSeparator);\n }\n\n writeChunk(this, hrefs[i]);\n }\n\n writeChunk(this, styleTagResourceOpen3);\n\n for (i = 0; i < rules.length; i++) {\n writeChunk(this, rules[i]);\n }\n\n writeChunk(this, styleTagResourceClose); // style resources can flush continuously since more rules may be written into\n // them with new hrefs. Instead of marking it flushed, we simply reset the chunks\n // and hrefs\n\n rules.length = 0;\n hrefs.length = 0;\n }\n}\n\nfunction preloadLateStyle(stylesheet) {\n if (stylesheet.state === PENDING$1) {\n stylesheet.state = PRELOADED;\n var preloadProps = preloadAsStylePropsFromProps(stylesheet.props.href, stylesheet.props);\n pushLinkImpl(stylesheetFlushingQueue, preloadProps);\n\n for (var i = 0; i < stylesheetFlushingQueue.length; i++) {\n writeChunk(this, stylesheetFlushingQueue[i]);\n }\n\n stylesheetFlushingQueue.length = 0;\n }\n}\n\nfunction preloadLateStyles(styleQueue) {\n styleQueue.sheets.forEach(preloadLateStyle, this);\n styleQueue.sheets.clear();\n} // We don't bother reporting backpressure at the moment because we expect to\n// flush the entire preamble in a single pass. This probably should be modified\n// in the future to be backpressure sensitive but that requires a larger refactor\n// of the flushing code in Fizz.\n\n\nfunction writePreamble(destination, resumableState, renderState, willFlushAllSegments) {\n // This function must be called exactly once on every request\n if (!willFlushAllSegments && renderState.externalRuntimeScript) {\n // If the root segment is incomplete due to suspended tasks\n // (e.g. willFlushAllSegments = false) and we are using data\n // streaming format, ensure the external runtime is sent.\n // (User code could choose to send this even earlier by calling\n // preinit(...), if they know they will suspend).\n var _renderState$external = renderState.externalRuntimeScript,\n src = _renderState$external.src,\n chunks = _renderState$external.chunks;\n internalPreinitScript(resumableState, renderState, src, chunks);\n }\n\n var htmlChunks = renderState.htmlChunks;\n var headChunks = renderState.headChunks;\n var i = 0; // Emit open tags before Hoistables and Resources\n\n if (htmlChunks) {\n // We have an <html> to emit as part of the preamble\n for (i = 0; i < htmlChunks.length; i++) {\n writeChunk(destination, htmlChunks[i]);\n }\n\n if (headChunks) {\n for (i = 0; i < headChunks.length; i++) {\n writeChunk(destination, headChunks[i]);\n }\n } else {\n // We did not render a head but we emitted an <html> so we emit one now\n writeChunk(destination, startChunkForTag('head'));\n writeChunk(destination, endOfStartTag);\n }\n } else if (headChunks) {\n // We do not have an <html> but we do have a <head>\n for (i = 0; i < headChunks.length; i++) {\n writeChunk(destination, headChunks[i]);\n }\n } // Emit high priority Hoistables\n\n\n var charsetChunks = renderState.charsetChunks;\n\n for (i = 0; i < charsetChunks.length; i++) {\n writeChunk(destination, charsetChunks[i]);\n }\n\n charsetChunks.length = 0; // emit preconnect resources\n\n renderState.preconnects.forEach(flushResource, destination);\n renderState.preconnects.clear();\n var viewportChunks = renderState.viewportChunks;\n\n for (i = 0; i < viewportChunks.length; i++) {\n writeChunk(destination, viewportChunks[i]);\n }\n\n viewportChunks.length = 0;\n renderState.fontPreloads.forEach(flushResource, destination);\n renderState.fontPreloads.clear();\n renderState.highImagePreloads.forEach(flushResource, destination);\n renderState.highImagePreloads.clear(); // Flush unblocked stylesheets by precedence\n\n renderState.styles.forEach(flushStylesInPreamble, destination);\n var importMapChunks = renderState.importMapChunks;\n\n for (i = 0; i < importMapChunks.length; i++) {\n writeChunk(destination, importMapChunks[i]);\n }\n\n importMapChunks.length = 0;\n renderState.bootstrapScripts.forEach(flushResource, destination);\n renderState.scripts.forEach(flushResource, destination);\n renderState.scripts.clear();\n renderState.bulkPreloads.forEach(flushResource, destination);\n renderState.bulkPreloads.clear(); // Write embedding hoistableChunks\n\n var hoistableChunks = renderState.hoistableChunks;\n\n for (i = 0; i < hoistableChunks.length; i++) {\n writeChunk(destination, hoistableChunks[i]);\n }\n\n hoistableChunks.length = 0;\n\n if (htmlChunks && headChunks === null) {\n // we have an <html> but we inserted an implicit <head> tag. We need\n // to close it since the main content won't have it\n writeChunk(destination, endChunkForTag('head'));\n }\n} // We don't bother reporting backpressure at the moment because we expect to\n// flush the entire preamble in a single pass. This probably should be modified\n// in the future to be backpressure sensitive but that requires a larger refactor\n// of the flushing code in Fizz.\n\nfunction writeHoistables(destination, resumableState, renderState) {\n var i = 0; // Emit high priority Hoistables\n // We omit charsetChunks because we have already sent the shell and if it wasn't\n // already sent it is too late now.\n\n var viewportChunks = renderState.viewportChunks;\n\n for (i = 0; i < viewportChunks.length; i++) {\n writeChunk(destination, viewportChunks[i]);\n }\n\n viewportChunks.length = 0;\n renderState.preconnects.forEach(flushResource, destination);\n renderState.preconnects.clear();\n renderState.fontPreloads.forEach(flushResource, destination);\n renderState.fontPreloads.clear();\n renderState.highImagePreloads.forEach(flushResource, destination);\n renderState.highImagePreloads.clear(); // Preload any stylesheets. these will emit in a render instruction that follows this\n // but we want to kick off preloading as soon as possible\n\n renderState.styles.forEach(preloadLateStyles, destination); // We only hoist importmaps that are configured through createResponse and that will\n // always flush in the preamble. Generally we don't expect people to render them as\n // tags when using React but if you do they are going to be treated like regular inline\n // scripts and flush after other hoistables which is problematic\n // bootstrap scripts should flush above script priority but these can only flush in the preamble\n // so we elide the code here for performance\n\n renderState.scripts.forEach(flushResource, destination);\n renderState.scripts.clear();\n renderState.bulkPreloads.forEach(flushResource, destination);\n renderState.bulkPreloads.clear(); // Write embedding hoistableChunks\n\n var hoistableChunks = renderState.hoistableChunks;\n\n for (i = 0; i < hoistableChunks.length; i++) {\n writeChunk(destination, hoistableChunks[i]);\n }\n\n hoistableChunks.length = 0;\n}\nfunction writePostamble(destination, resumableState) {\n if (resumableState.hasBody) {\n writeChunk(destination, endChunkForTag('body'));\n }\n\n if (resumableState.hasHtml) {\n writeChunk(destination, endChunkForTag('html'));\n }\n}\nvar arrayFirstOpenBracket = stringToPrecomputedChunk('[');\nvar arraySubsequentOpenBracket = stringToPrecomputedChunk(',[');\nvar arrayInterstitial = stringToPrecomputedChunk(',');\nvar arrayCloseBracket = stringToPrecomputedChunk(']'); // This function writes a 2D array of strings to be embedded in javascript.\n// E.g.\n// [[\"JS_escaped_string1\", \"JS_escaped_string2\"]]\n\nfunction writeStyleResourceDependenciesInJS(destination, hoistableState) {\n writeChunk(destination, arrayFirstOpenBracket);\n var nextArrayOpenBrackChunk = arrayFirstOpenBracket;\n hoistableState.stylesheets.forEach(function (resource) {\n if (resource.state === PREAMBLE) ; else if (resource.state === LATE) {\n // We only need to emit the href because this resource flushed in an earlier\n // boundary already which encoded the attributes necessary to construct\n // the resource instance on the client.\n writeChunk(destination, nextArrayOpenBrackChunk);\n writeStyleResourceDependencyHrefOnlyInJS(destination, resource.props.href);\n writeChunk(destination, arrayCloseBracket);\n nextArrayOpenBrackChunk = arraySubsequentOpenBracket;\n } else {\n // We need to emit the whole resource for insertion on the client\n writeChunk(destination, nextArrayOpenBrackChunk);\n writeStyleResourceDependencyInJS(destination, resource.props.href, resource.props['data-precedence'], resource.props);\n writeChunk(destination, arrayCloseBracket);\n nextArrayOpenBrackChunk = arraySubsequentOpenBracket;\n resource.state = LATE;\n }\n });\n writeChunk(destination, arrayCloseBracket);\n}\n/* Helper functions */\n\n\nfunction writeStyleResourceDependencyHrefOnlyInJS(destination, href) {\n // We should actually enforce this earlier when the resource is created but for\n // now we make sure we are actually dealing with a string here.\n {\n checkAttributeStringCoercion(href, 'href');\n }\n\n var coercedHref = '' + href;\n writeChunk(destination, stringToChunk(escapeJSObjectForInstructionScripts(coercedHref)));\n}\n\nfunction writeStyleResourceDependencyInJS(destination, href, precedence, props) {\n // eslint-disable-next-line react-internal/safe-string-coercion\n var coercedHref = sanitizeURL('' + href);\n writeChunk(destination, stringToChunk(escapeJSObjectForInstructionScripts(coercedHref)));\n\n {\n checkAttributeStringCoercion(precedence, 'precedence');\n }\n\n var coercedPrecedence = '' + precedence;\n writeChunk(destination, arrayInterstitial);\n writeChunk(destination, stringToChunk(escapeJSObjectForInstructionScripts(coercedPrecedence)));\n\n for (var propKey in props) {\n if (hasOwnProperty.call(props, propKey)) {\n var propValue = props[propKey];\n\n if (propValue == null) {\n continue;\n }\n\n switch (propKey) {\n case 'href':\n case 'rel':\n case 'precedence':\n case 'data-precedence':\n {\n break;\n }\n\n case 'children':\n case 'dangerouslySetInnerHTML':\n throw new Error('link' + \" is a self-closing tag and must neither have `children` nor \" + 'use `dangerouslySetInnerHTML`.');\n\n default:\n writeStyleResourceAttributeInJS(destination, propKey, propValue);\n break;\n }\n }\n }\n\n return null;\n}\n\nfunction writeStyleResourceAttributeInJS(destination, name, value) // not null or undefined\n{\n var attributeName = name.toLowerCase();\n var attributeValue;\n\n switch (typeof value) {\n case 'function':\n case 'symbol':\n return;\n }\n\n switch (name) {\n // Reserved names\n case 'innerHTML':\n case 'dangerouslySetInnerHTML':\n case 'suppressContentEditableWarning':\n case 'suppressHydrationWarning':\n case 'style':\n case 'ref':\n // Ignored\n return;\n // Attribute renames\n\n case 'className':\n {\n attributeName = 'class';\n\n {\n checkAttributeStringCoercion(value, attributeName);\n }\n\n attributeValue = '' + value;\n break;\n }\n // Booleans\n\n case 'hidden':\n {\n if (value === false) {\n return;\n }\n\n attributeValue = '';\n break;\n }\n // Santized URLs\n\n case 'src':\n case 'href':\n {\n value = sanitizeURL(value);\n\n {\n checkAttributeStringCoercion(value, attributeName);\n }\n\n attributeValue = '' + value;\n break;\n }\n\n default:\n {\n if ( // unrecognized event handlers are not SSR'd and we (apparently)\n // use on* as hueristic for these handler props\n name.length > 2 && (name[0] === 'o' || name[0] === 'O') && (name[1] === 'n' || name[1] === 'N')) {\n return;\n }\n\n if (!isAttributeNameSafe(name)) {\n return;\n }\n\n {\n checkAttributeStringCoercion(value, attributeName);\n }\n\n attributeValue = '' + value;\n }\n }\n\n writeChunk(destination, arrayInterstitial);\n writeChunk(destination, stringToChunk(escapeJSObjectForInstructionScripts(attributeName)));\n writeChunk(destination, arrayInterstitial);\n writeChunk(destination, stringToChunk(escapeJSObjectForInstructionScripts(attributeValue)));\n} // This function writes a 2D array of strings to be embedded in an attribute\n// value and read with JSON.parse in ReactDOMServerExternalRuntime.js\n// E.g.\n// [["JSON_escaped_string1", "JSON_escaped_string2"]]\n\n\nfunction writeStyleResourceDependenciesInAttr(destination, hoistableState) {\n writeChunk(destination, arrayFirstOpenBracket);\n var nextArrayOpenBrackChunk = arrayFirstOpenBracket;\n hoistableState.stylesheets.forEach(function (resource) {\n if (resource.state === PREAMBLE) ; else if (resource.state === LATE) {\n // We only need to emit the href because this resource flushed in an earlier\n // boundary already which encoded the attributes necessary to construct\n // the resource instance on the client.\n writeChunk(destination, nextArrayOpenBrackChunk);\n writeStyleResourceDependencyHrefOnlyInAttr(destination, resource.props.href);\n writeChunk(destination, arrayCloseBracket);\n nextArrayOpenBrackChunk = arraySubsequentOpenBracket;\n } else {\n // We need to emit the whole resource for insertion on the client\n writeChunk(destination, nextArrayOpenBrackChunk);\n writeStyleResourceDependencyInAttr(destination, resource.props.href, resource.props['data-precedence'], resource.props);\n writeChunk(destination, arrayCloseBracket);\n nextArrayOpenBrackChunk = arraySubsequentOpenBracket;\n resource.state = LATE;\n }\n });\n writeChunk(destination, arrayCloseBracket);\n}\n/* Helper functions */\n\n\nfunction writeStyleResourceDependencyHrefOnlyInAttr(destination, href) {\n // We should actually enforce this earlier when the resource is created but for\n // now we make sure we are actually dealing with a string here.\n {\n checkAttributeStringCoercion(href, 'href');\n }\n\n var coercedHref = '' + href;\n writeChunk(destination, stringToChunk(escapeTextForBrowser(JSON.stringify(coercedHref))));\n}\n\nfunction writeStyleResourceDependencyInAttr(destination, href, precedence, props) {\n // eslint-disable-next-line react-internal/safe-string-coercion\n var coercedHref = sanitizeURL('' + href);\n writeChunk(destination, stringToChunk(escapeTextForBrowser(JSON.stringify(coercedHref))));\n\n {\n checkAttributeStringCoercion(precedence, 'precedence');\n }\n\n var coercedPrecedence = '' + precedence;\n writeChunk(destination, arrayInterstitial);\n writeChunk(destination, stringToChunk(escapeTextForBrowser(JSON.stringify(coercedPrecedence))));\n\n for (var propKey in props) {\n if (hasOwnProperty.call(props, propKey)) {\n var propValue = props[propKey];\n\n if (propValue == null) {\n continue;\n }\n\n switch (propKey) {\n case 'href':\n case 'rel':\n case 'precedence':\n case 'data-precedence':\n {\n break;\n }\n\n case 'children':\n case 'dangerouslySetInnerHTML':\n throw new Error('link' + \" is a self-closing tag and must neither have `children` nor \" + 'use `dangerouslySetInnerHTML`.');\n\n default:\n writeStyleResourceAttributeInAttr(destination, propKey, propValue);\n break;\n }\n }\n }\n\n return null;\n}\n\nfunction writeStyleResourceAttributeInAttr(destination, name, value) // not null or undefined\n{\n var attributeName = name.toLowerCase();\n var attributeValue;\n\n switch (typeof value) {\n case 'function':\n case 'symbol':\n return;\n }\n\n switch (name) {\n // Reserved names\n case 'innerHTML':\n case 'dangerouslySetInnerHTML':\n case 'suppressContentEditableWarning':\n case 'suppressHydrationWarning':\n case 'style':\n case 'ref':\n // Ignored\n return;\n // Attribute renames\n\n case 'className':\n {\n attributeName = 'class';\n\n {\n checkAttributeStringCoercion(value, attributeName);\n }\n\n attributeValue = '' + value;\n break;\n }\n // Booleans\n\n case 'hidden':\n {\n if (value === false) {\n return;\n }\n\n attributeValue = '';\n break;\n }\n // Santized URLs\n\n case 'src':\n case 'href':\n {\n value = sanitizeURL(value);\n\n {\n checkAttributeStringCoercion(value, attributeName);\n }\n\n attributeValue = '' + value;\n break;\n }\n\n default:\n {\n if ( // unrecognized event handlers are not SSR'd and we (apparently)\n // use on* as hueristic for these handler props\n name.length > 2 && (name[0] === 'o' || name[0] === 'O') && (name[1] === 'n' || name[1] === 'N')) {\n return;\n }\n\n if (!isAttributeNameSafe(name)) {\n return;\n }\n\n {\n checkAttributeStringCoercion(value, attributeName);\n }\n\n attributeValue = '' + value;\n }\n }\n\n writeChunk(destination, arrayInterstitial);\n writeChunk(destination, stringToChunk(escapeTextForBrowser(JSON.stringify(attributeName))));\n writeChunk(destination, arrayInterstitial);\n writeChunk(destination, stringToChunk(escapeTextForBrowser(JSON.stringify(attributeValue))));\n}\n/**\n * Resources\n */\n\n\nvar PENDING$1 = 0;\nvar PRELOADED = 1;\nvar PREAMBLE = 2;\nvar LATE = 3;\nfunction createHoistableState() {\n return {\n styles: new Set(),\n stylesheets: new Set()\n };\n}\n\nfunction getResourceKey(href) {\n return href;\n}\n\nfunction getImageResourceKey(href, imageSrcSet, imageSizes) {\n if (imageSrcSet) {\n return imageSrcSet + '\\n' + (imageSizes || '');\n }\n\n return href;\n}\n\nfunction prefetchDNS(href) {\n\n var request = resolveRequest();\n\n if (!request) {\n // In async contexts we can sometimes resolve resources from AsyncLocalStorage. If we can't we can also\n // possibly get them from the stack if we are not in an async context. Since we were not able to resolve\n // the resources for this call in either case we opt to do nothing. We can consider making this a warning\n // but there may be times where calling a function outside of render is intentional (i.e. to warm up data\n // fetching) and we don't want to warn in those cases.\n previousDispatcher.prefetchDNS(href);\n return;\n }\n\n var resumableState = getResumableState(request);\n var renderState = getRenderState(request);\n\n if (typeof href === 'string' && href) {\n var key = getResourceKey(href);\n\n if (!resumableState.dnsResources.hasOwnProperty(key)) {\n resumableState.dnsResources[key] = EXISTS;\n var headers = renderState.headers;\n var header;\n\n if (headers && headers.remainingCapacity > 0 && ( // Compute the header since we might be able to fit it in the max length\n header = getPrefetchDNSAsHeader(href), // We always consume the header length since once we find one header that doesn't fit\n // we assume all the rest won't as well. This is to avoid getting into a situation\n // where we have a very small remaining capacity but no headers will ever fit and we end\n // up constantly trying to see if the next resource might make it. In the future we can\n // make this behavior different between render and prerender since in the latter case\n // we are less sensitive to the current requests runtime per and more sensitive to maximizing\n // headers.\n (headers.remainingCapacity -= header.length) >= 2)) {\n // Store this as resettable in case we are prerendering and postpone in the Shell\n renderState.resets.dns[key] = EXISTS;\n\n if (headers.preconnects) {\n headers.preconnects += ', ';\n } // $FlowFixMe[unsafe-addition]: we assign header during the if condition\n\n\n headers.preconnects += header;\n } else {\n // Encode as element\n var resource = [];\n pushLinkImpl(resource, {\n href: href,\n rel: 'dns-prefetch'\n });\n renderState.preconnects.add(resource);\n }\n }\n\n flushResources(request);\n }\n}\n\nfunction preconnect(href, crossOrigin) {\n\n var request = resolveRequest();\n\n if (!request) {\n // In async contexts we can sometimes resolve resources from AsyncLocalStorage. If we can't we can also\n // possibly get them from the stack if we are not in an async context. Since we were not able to resolve\n // the resources for this call in either case we opt to do nothing. We can consider making this a warning\n // but there may be times where calling a function outside of render is intentional (i.e. to warm up data\n // fetching) and we don't want to warn in those cases.\n previousDispatcher.preconnect(href, crossOrigin);\n return;\n }\n\n var resumableState = getResumableState(request);\n var renderState = getRenderState(request);\n\n if (typeof href === 'string' && href) {\n var bucket = crossOrigin === 'use-credentials' ? 'credentials' : typeof crossOrigin === 'string' ? 'anonymous' : 'default';\n var key = getResourceKey(href);\n\n if (!resumableState.connectResources[bucket].hasOwnProperty(key)) {\n resumableState.connectResources[bucket][key] = EXISTS;\n var headers = renderState.headers;\n var header;\n\n if (headers && headers.remainingCapacity > 0 && ( // Compute the header since we might be able to fit it in the max length\n header = getPreconnectAsHeader(href, crossOrigin), // We always consume the header length since once we find one header that doesn't fit\n // we assume all the rest won't as well. This is to avoid getting into a situation\n // where we have a very small remaining capacity but no headers will ever fit and we end\n // up constantly trying to see if the next resource might make it. In the future we can\n // make this behavior different between render and prerender since in the latter case\n // we are less sensitive to the current requests runtime per and more sensitive to maximizing\n // headers.\n (headers.remainingCapacity -= header.length) >= 2)) {\n // Store this in resettableState in case we are prerending and postpone in the Shell\n renderState.resets.connect[bucket][key] = EXISTS;\n\n if (headers.preconnects) {\n headers.preconnects += ', ';\n } // $FlowFixMe[unsafe-addition]: we assign header during the if condition\n\n\n headers.preconnects += header;\n } else {\n var resource = [];\n pushLinkImpl(resource, {\n rel: 'preconnect',\n href: href,\n crossOrigin: crossOrigin\n });\n renderState.preconnects.add(resource);\n }\n }\n\n flushResources(request);\n }\n}\n\nfunction preload(href, as, options) {\n\n var request = resolveRequest();\n\n if (!request) {\n // In async contexts we can sometimes resolve resources from AsyncLocalStorage. If we can't we can also\n // possibly get them from the stack if we are not in an async context. Since we were not able to resolve\n // the resources for this call in either case we opt to do nothing. We can consider making this a warning\n // but there may be times where calling a function outside of render is intentional (i.e. to warm up data\n // fetching) and we don't want to warn in those cases.\n previousDispatcher.preload(href, as, options);\n return;\n }\n\n var resumableState = getResumableState(request);\n var renderState = getRenderState(request);\n\n if (as && href) {\n switch (as) {\n case 'image':\n {\n var imageSrcSet, imageSizes, fetchPriority;\n\n if (options) {\n imageSrcSet = options.imageSrcSet;\n imageSizes = options.imageSizes;\n fetchPriority = options.fetchPriority;\n }\n\n var key = getImageResourceKey(href, imageSrcSet, imageSizes);\n\n if (resumableState.imageResources.hasOwnProperty(key)) {\n // we can return if we already have this resource\n return;\n }\n\n resumableState.imageResources[key] = PRELOAD_NO_CREDS;\n var headers = renderState.headers;\n var header;\n\n if (headers && headers.remainingCapacity > 0 && fetchPriority === 'high' && ( // Compute the header since we might be able to fit it in the max length\n header = getPreloadAsHeader(href, as, options), // We always consume the header length since once we find one header that doesn't fit\n // we assume all the rest won't as well. This is to avoid getting into a situation\n // where we have a very small remaining capacity but no headers will ever fit and we end\n // up constantly trying to see if the next resource might make it. In the future we can\n // make this behavior different between render and prerender since in the latter case\n // we are less sensitive to the current requests runtime per and more sensitive to maximizing\n // headers.\n (headers.remainingCapacity -= header.length) >= 2)) {\n // If we postpone in the shell we will still emit a preload as a header so we\n // track this to make sure we don't reset it.\n renderState.resets.image[key] = PRELOAD_NO_CREDS;\n\n if (headers.highImagePreloads) {\n headers.highImagePreloads += ', ';\n } // $FlowFixMe[unsafe-addition]: we assign header during the if condition\n\n\n headers.highImagePreloads += header;\n } else {\n // If we don't have headers to write to we have to encode as elements to flush in the head\n // When we have imageSrcSet the browser probably cannot load the right version from headers\n // (this should be verified by testing). For now we assume these need to go in the head\n // as elements even if headers are available.\n var resource = [];\n pushLinkImpl(resource, assign({\n rel: 'preload',\n // There is a bug in Safari where imageSrcSet is not respected on preload links\n // so we omit the href here if we have imageSrcSet b/c safari will load the wrong image.\n // This harms older browers that do not support imageSrcSet by making their preloads not work\n // but this population is shrinking fast and is already small so we accept this tradeoff.\n href: imageSrcSet ? undefined : href,\n as: as\n }, options));\n\n if (fetchPriority === 'high') {\n renderState.highImagePreloads.add(resource);\n } else {\n renderState.bulkPreloads.add(resource); // Stash the resource in case we need to promote it to higher priority\n // when an img tag is rendered\n\n renderState.preloads.images.set(key, resource);\n }\n }\n\n break;\n }\n\n case 'style':\n {\n var _key = getResourceKey(href);\n\n if (resumableState.styleResources.hasOwnProperty(_key)) {\n // we can return if we already have this resource\n return;\n }\n\n var _resource2 = [];\n pushLinkImpl(_resource2, assign({\n rel: 'preload',\n href: href,\n as: as\n }, options));\n resumableState.styleResources[_key] = options && (typeof options.crossOrigin === 'string' || typeof options.integrity === 'string') ? [options.crossOrigin, options.integrity] : PRELOAD_NO_CREDS;\n renderState.preloads.stylesheets.set(_key, _resource2);\n renderState.bulkPreloads.add(_resource2);\n break;\n }\n\n case 'script':\n {\n var _key2 = getResourceKey(href);\n\n if (resumableState.scriptResources.hasOwnProperty(_key2)) {\n // we can return if we already have this resource\n return;\n }\n\n var _resource3 = [];\n renderState.preloads.scripts.set(_key2, _resource3);\n renderState.bulkPreloads.add(_resource3);\n pushLinkImpl(_resource3, assign({\n rel: 'preload',\n href: href,\n as: as\n }, options));\n resumableState.scriptResources[_key2] = options && (typeof options.crossOrigin === 'string' || typeof options.integrity === 'string') ? [options.crossOrigin, options.integrity] : PRELOAD_NO_CREDS;\n break;\n }\n\n default:\n {\n var _key3 = getResourceKey(href);\n\n var hasAsType = resumableState.unknownResources.hasOwnProperty(as);\n var resources;\n\n if (hasAsType) {\n resources = resumableState.unknownResources[as];\n\n if (resources.hasOwnProperty(_key3)) {\n // we can return if we already have this resource\n return;\n }\n } else {\n resources = {};\n resumableState.unknownResources[as] = resources;\n }\n\n resources[_key3] = PRELOAD_NO_CREDS;\n var _headers = renderState.headers;\n\n var _header;\n\n if (_headers && _headers.remainingCapacity > 0 && as === 'font' && ( // We compute the header here because we might be able to fit it in the max length\n _header = getPreloadAsHeader(href, as, options), // We always consume the header length since once we find one header that doesn't fit\n // we assume all the rest won't as well. This is to avoid getting into a situation\n // where we have a very small remaining capacity but no headers will ever fit and we end\n // up constantly trying to see if the next resource might make it. In the future we can\n // make this behavior different between render and prerender since in the latter case\n // we are less sensitive to the current requests runtime per and more sensitive to maximizing\n // headers.\n (_headers.remainingCapacity -= _header.length) >= 2)) {\n // If we postpone in the shell we will still emit this preload so we\n // track it here to prevent it from being reset.\n renderState.resets.font[_key3] = PRELOAD_NO_CREDS;\n\n if (_headers.fontPreloads) {\n _headers.fontPreloads += ', ';\n } // $FlowFixMe[unsafe-addition]: we assign header during the if condition\n\n\n _headers.fontPreloads += _header;\n } else {\n // We either don't have headers or we are preloading something that does\n // not warrant elevated priority so we encode as an element.\n var _resource4 = [];\n\n var props = assign({\n rel: 'preload',\n href: href,\n as: as\n }, options);\n\n pushLinkImpl(_resource4, props);\n\n switch (as) {\n case 'font':\n renderState.fontPreloads.add(_resource4);\n break;\n // intentional fall through\n\n default:\n renderState.bulkPreloads.add(_resource4);\n }\n }\n }\n } // If we got this far we created a new resource\n\n\n flushResources(request);\n }\n}\n\nfunction preloadModule(href, options) {\n\n var request = resolveRequest();\n\n if (!request) {\n // In async contexts we can sometimes resolve resources from AsyncLocalStorage. If we can't we can also\n // possibly get them from the stack if we are not in an async context. Since we were not able to resolve\n // the resources for this call in either case we opt to do nothing. We can consider making this a warning\n // but there may be times where calling a function outside of render is intentional (i.e. to warm up data\n // fetching) and we don't want to warn in those cases.\n previousDispatcher.preloadModule(href, options);\n return;\n }\n\n var resumableState = getResumableState(request);\n var renderState = getRenderState(request);\n\n if (href) {\n var key = getResourceKey(href);\n var as = options && typeof options.as === 'string' ? options.as : 'script';\n var resource;\n\n switch (as) {\n case 'script':\n {\n if (resumableState.moduleScriptResources.hasOwnProperty(key)) {\n // we can return if we already have this resource\n return;\n }\n\n resource = [];\n resumableState.moduleScriptResources[key] = options && (typeof options.crossOrigin === 'string' || typeof options.integrity === 'string') ? [options.crossOrigin, options.integrity] : PRELOAD_NO_CREDS;\n renderState.preloads.moduleScripts.set(key, resource);\n break;\n }\n\n default:\n {\n var hasAsType = resumableState.moduleUnknownResources.hasOwnProperty(as);\n var resources;\n\n if (hasAsType) {\n resources = resumableState.unknownResources[as];\n\n if (resources.hasOwnProperty(key)) {\n // we can return if we already have this resource\n return;\n }\n } else {\n resources = {};\n resumableState.moduleUnknownResources[as] = resources;\n }\n\n resource = [];\n resources[key] = PRELOAD_NO_CREDS;\n }\n }\n\n pushLinkImpl(resource, assign({\n rel: 'modulepreload',\n href: href\n }, options));\n renderState.bulkPreloads.add(resource); // If we got this far we created a new resource\n\n flushResources(request);\n }\n}\n\nfunction preinitStyle(href, precedence, options) {\n\n var request = resolveRequest();\n\n if (!request) {\n // In async contexts we can sometimes resolve resources from AsyncLocalStorage. If we can't we can also\n // possibly get them from the stack if we are not in an async context. Since we were not able to resolve\n // the resources for this call in either case we opt to do nothing. We can consider making this a warning\n // but there may be times where calling a function outside of render is intentional (i.e. to warm up data\n // fetching) and we don't want to warn in those cases.\n previousDispatcher.preinitStyle(href, precedence, options);\n return;\n }\n\n var resumableState = getResumableState(request);\n var renderState = getRenderState(request);\n\n if (href) {\n precedence = precedence || 'default';\n var key = getResourceKey(href);\n var styleQueue = renderState.styles.get(precedence);\n var hasKey = resumableState.styleResources.hasOwnProperty(key);\n var resourceState = hasKey ? resumableState.styleResources[key] : undefined;\n\n if (resourceState !== EXISTS) {\n // We are going to create this resource now so it is marked as Exists\n resumableState.styleResources[key] = EXISTS; // If this is the first time we've encountered this precedence we need\n // to create a StyleQueue\n\n if (!styleQueue) {\n styleQueue = {\n precedence: stringToChunk(escapeTextForBrowser(precedence)),\n rules: [],\n hrefs: [],\n sheets: new Map()\n };\n renderState.styles.set(precedence, styleQueue);\n }\n\n var resource = {\n state: PENDING$1,\n props: assign({\n rel: 'stylesheet',\n href: href,\n 'data-precedence': precedence\n }, options)\n };\n\n if (resourceState) {\n // When resourceState is truty it is a Preload state. We cast it for clarity\n var preloadState = resourceState;\n\n if (preloadState.length === 2) {\n adoptPreloadCredentials(resource.props, preloadState);\n }\n\n var preloadResource = renderState.preloads.stylesheets.get(key);\n\n if (preloadResource && preloadResource.length > 0) {\n // The Preload for this resource was created in this render pass and has not flushed yet so\n // we need to clear it to avoid it flushing.\n preloadResource.length = 0;\n } else {\n // Either the preload resource from this render already flushed in this render pass\n // or the preload flushed in a prior pass (prerender). In either case we need to mark\n // this resource as already having been preloaded.\n resource.state = PRELOADED;\n }\n } // We add the newly created resource to our StyleQueue and if necessary\n // track the resource with the currently rendering boundary\n\n\n styleQueue.sheets.set(key, resource); // Notify the request that there are resources to flush even if no work is currently happening\n\n flushResources(request);\n }\n }\n}\n\nfunction preinitScript(src, options) {\n\n var request = resolveRequest();\n\n if (!request) {\n // In async contexts we can sometimes resolve resources from AsyncLocalStorage. If we can't we can also\n // possibly get them from the stack if we are not in an async context. Since we were not able to resolve\n // the resources for this call in either case we opt to do nothing. We can consider making this a warning\n // but there may be times where calling a function outside of render is intentional (i.e. to warm up data\n // fetching) and we don't want to warn in those cases.\n previousDispatcher.preinitScript(src, options);\n return;\n }\n\n var resumableState = getResumableState(request);\n var renderState = getRenderState(request);\n\n if (src) {\n var key = getResourceKey(src);\n var hasKey = resumableState.scriptResources.hasOwnProperty(key);\n var resourceState = hasKey ? resumableState.scriptResources[key] : undefined;\n\n if (resourceState !== EXISTS) {\n // We are going to create this resource now so it is marked as Exists\n resumableState.scriptResources[key] = EXISTS;\n\n var props = assign({\n src: src,\n async: true\n }, options);\n\n if (resourceState) {\n // When resourceState is truty it is a Preload state. We cast it for clarity\n var preloadState = resourceState;\n\n if (preloadState.length === 2) {\n adoptPreloadCredentials(props, preloadState);\n }\n\n var preloadResource = renderState.preloads.scripts.get(key);\n\n if (preloadResource) {\n // the preload resource exists was created in this render. Now that we have\n // a script resource which will emit earlier than a preload would if it\n // hasn't already flushed we prevent it from flushing by zeroing the length\n preloadResource.length = 0;\n }\n }\n\n var resource = []; // Add to the script flushing queue\n\n renderState.scripts.add(resource); // encode the tag as Chunks\n\n pushScriptImpl(resource, props); // Notify the request that there are resources to flush even if no work is currently happening\n\n flushResources(request);\n }\n\n return;\n }\n}\n\nfunction preinitModuleScript(src, options) {\n\n var request = resolveRequest();\n\n if (!request) {\n // In async contexts we can sometimes resolve resources from AsyncLocalStorage. If we can't we can also\n // possibly get them from the stack if we are not in an async context. Since we were not able to resolve\n // the resources for this call in either case we opt to do nothing. We can consider making this a warning\n // but there may be times where calling a function outside of render is intentional (i.e. to warm up data\n // fetching) and we don't want to warn in those cases.\n previousDispatcher.preinitModuleScript(src, options);\n return;\n }\n\n var resumableState = getResumableState(request);\n var renderState = getRenderState(request);\n\n if (src) {\n var key = getResourceKey(src);\n var hasKey = resumableState.moduleScriptResources.hasOwnProperty(key);\n var resourceState = hasKey ? resumableState.moduleScriptResources[key] : undefined;\n\n if (resourceState !== EXISTS) {\n // We are going to create this resource now so it is marked as Exists\n resumableState.moduleScriptResources[key] = EXISTS;\n\n var props = assign({\n src: src,\n type: 'module',\n async: true\n }, options);\n\n if (resourceState) {\n // When resourceState is truty it is a Preload state. We cast it for clarity\n var preloadState = resourceState;\n\n if (preloadState.length === 2) {\n adoptPreloadCredentials(props, preloadState);\n }\n\n var preloadResource = renderState.preloads.moduleScripts.get(key);\n\n if (preloadResource) {\n // the preload resource exists was created in this render. Now that we have\n // a script resource which will emit earlier than a preload would if it\n // hasn't already flushed we prevent it from flushing by zeroing the length\n preloadResource.length = 0;\n }\n }\n\n var resource = []; // Add to the script flushing queue\n\n renderState.scripts.add(resource); // encode the tag as Chunks\n\n pushScriptImpl(resource, props); // Notify the request that there are resources to flush even if no work is currently happening\n\n flushResources(request);\n }\n\n return;\n }\n} // This function is only safe to call at Request start time since it assumes\n// that each module has not already been preloaded. If we find a need to preload\n// scripts at any other point in time we will need to check whether the preload\n// already exists and not assume it\n\n\nfunction preloadBootstrapScriptOrModule(resumableState, renderState, href, props) {\n\n var key = getResourceKey(href);\n\n {\n if (resumableState.scriptResources.hasOwnProperty(key) || resumableState.moduleScriptResources.hasOwnProperty(key)) {\n // This is coded as a React error because it should be impossible for a userspace preload to preempt this call\n // If a userspace preload can preempt it then this assumption is broken and we need to reconsider this strategy\n // rather than instruct the user to not preload their bootstrap scripts themselves\n error('Internal React Error: React expected bootstrap script or module with src \"%s\" to not have been preloaded already. please file an issue', href);\n }\n } // The href used for bootstrap scripts and bootstrap modules should never be\n // used to preinit the resource. If a script can be preinited then it shouldn't\n // be a bootstrap script/module and if it is a bootstrap script/module then it\n // must not be safe to emit early. To avoid possibly allowing for preinits of\n // bootstrap scripts/modules we occlude these keys.\n\n\n resumableState.scriptResources[key] = EXISTS;\n resumableState.moduleScriptResources[key] = EXISTS;\n var resource = [];\n pushLinkImpl(resource, props);\n renderState.bootstrapScripts.add(resource);\n}\n\nfunction internalPreinitScript(resumableState, renderState, src, chunks) {\n var key = getResourceKey(src);\n\n if (!resumableState.scriptResources.hasOwnProperty(key)) {\n var resource = chunks;\n resumableState.scriptResources[key] = EXISTS;\n renderState.scripts.add(resource);\n }\n\n return;\n}\n\nfunction preloadAsStylePropsFromProps(href, props) {\n return {\n rel: 'preload',\n as: 'style',\n href: href,\n crossOrigin: props.crossOrigin,\n fetchPriority: props.fetchPriority,\n integrity: props.integrity,\n media: props.media,\n hrefLang: props.hrefLang,\n referrerPolicy: props.referrerPolicy\n };\n}\n\nfunction stylesheetPropsFromRawProps(rawProps) {\n return assign({}, rawProps, {\n 'data-precedence': rawProps.precedence,\n precedence: null\n });\n}\n\nfunction adoptPreloadCredentials(target, preloadState) {\n if (target.crossOrigin == null) target.crossOrigin = preloadState[0];\n if (target.integrity == null) target.integrity = preloadState[1];\n}\n\nfunction getPrefetchDNSAsHeader(href) {\n var escapedHref = escapeHrefForLinkHeaderURLContext(href);\n return \"<\" + escapedHref + \">; rel=dns-prefetch\";\n}\n\nfunction getPreconnectAsHeader(href, crossOrigin) {\n var escapedHref = escapeHrefForLinkHeaderURLContext(href);\n var value = \"<\" + escapedHref + \">; rel=preconnect\";\n\n if (typeof crossOrigin === 'string') {\n var escapedCrossOrigin = escapeStringForLinkHeaderQuotedParamValueContext(crossOrigin, 'crossOrigin');\n value += \"; crossorigin=\\\"\" + escapedCrossOrigin + \"\\\"\";\n }\n\n return value;\n}\n\nfunction getPreloadAsHeader(href, as, params) {\n var escapedHref = escapeHrefForLinkHeaderURLContext(href);\n var escapedAs = escapeStringForLinkHeaderQuotedParamValueContext(as, 'as');\n var value = \"<\" + escapedHref + \">; rel=preload; as=\\\"\" + escapedAs + \"\\\"\";\n\n for (var paramName in params) {\n if (hasOwnProperty.call(params, paramName)) {\n var paramValue = params[paramName];\n\n if (typeof paramValue === 'string') {\n value += \"; \" + paramName.toLowerCase() + \"=\\\"\" + escapeStringForLinkHeaderQuotedParamValueContext(paramValue, paramName) + \"\\\"\";\n }\n }\n }\n\n return value;\n}\n\nfunction getStylesheetPreloadAsHeader(stylesheet) {\n var props = stylesheet.props;\n var preloadOptions = {\n crossOrigin: props.crossOrigin,\n integrity: props.integrity,\n nonce: props.nonce,\n type: props.type,\n fetchPriority: props.fetchPriority,\n referrerPolicy: props.referrerPolicy,\n media: props.media\n };\n return getPreloadAsHeader(props.href, 'style', preloadOptions);\n} // This escaping function is only safe to use for href values being written into\n// a \"Link\" header in between `<` and `>` characters. The primary concern with the href is\n// to escape the bounding characters as well as new lines. This is unsafe to use in any other\n// context\n\n\nvar regexForHrefInLinkHeaderURLContext = /[<>\\r\\n]/g;\n\nfunction escapeHrefForLinkHeaderURLContext(hrefInput) {\n {\n checkAttributeStringCoercion(hrefInput, 'href');\n }\n\n var coercedHref = '' + hrefInput;\n return coercedHref.replace(regexForHrefInLinkHeaderURLContext, escapeHrefForLinkHeaderURLContextReplacer);\n}\n\nfunction escapeHrefForLinkHeaderURLContextReplacer(match) {\n switch (match) {\n case '<':\n return '%3C';\n\n case '>':\n return '%3E';\n\n case '\\n':\n return '%0A';\n\n case '\\r':\n return '%0D';\n\n default:\n {\n // eslint-disable-next-line react-internal/prod-error-codes\n throw new Error('escapeLinkHrefForHeaderContextReplacer encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React');\n }\n }\n} // This escaping function is only safe to use for quoted param values in an HTTP header.\n// It is unsafe to use for any value not inside quote marks in parater value position.\n\n\nvar regexForLinkHeaderQuotedParamValueContext = /[\"';,\\r\\n]/g;\n\nfunction escapeStringForLinkHeaderQuotedParamValueContext(value, name) {\n {\n checkOptionStringCoercion(value, name);\n }\n\n var coerced = '' + value;\n return coerced.replace(regexForLinkHeaderQuotedParamValueContext, escapeStringForLinkHeaderQuotedParamValueContextReplacer);\n}\n\nfunction escapeStringForLinkHeaderQuotedParamValueContextReplacer(match) {\n switch (match) {\n case '\"':\n return '%22';\n\n case \"'\":\n return '%27';\n\n case ';':\n return '%3B';\n\n case ',':\n return '%2C';\n\n case '\\n':\n return '%0A';\n\n case '\\r':\n return '%0D';\n\n default:\n {\n // eslint-disable-next-line react-internal/prod-error-codes\n throw new Error('escapeStringForLinkHeaderQuotedParamValueContextReplacer encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React');\n }\n }\n}\n\nfunction hoistStyleQueueDependency(styleQueue) {\n this.styles.add(styleQueue);\n}\n\nfunction hoistStylesheetDependency(stylesheet) {\n this.stylesheets.add(stylesheet);\n}\n\nfunction hoistHoistables(parentState, childState) {\n childState.styles.forEach(hoistStyleQueueDependency, parentState);\n childState.stylesheets.forEach(hoistStylesheetDependency, parentState);\n} // This function is called at various times depending on whether we are rendering\n// or prerendering. In this implementation we only actually emit headers once and\n// subsequent calls are ignored. We track whether the request has a completed shell\n// to determine whether we will follow headers with a flush including stylesheets.\n// In the context of prerrender we don't have a completed shell when the request finishes\n// with a postpone in the shell. In the context of a render we don't have a completed shell\n// if this is called before the shell finishes rendering which usually will happen anytime\n// anything suspends in the shell.\n\nfunction emitEarlyPreloads(renderState, resumableState, shellComplete) {\n var onHeaders = renderState.onHeaders;\n\n if (onHeaders) {\n var headers = renderState.headers;\n\n if (headers) {\n // Even if onHeaders throws we don't want to call this again so\n // we drop the headers state from this point onwards.\n renderState.headers = null;\n var linkHeader = headers.preconnects;\n\n if (headers.fontPreloads) {\n if (linkHeader) {\n linkHeader += ', ';\n }\n\n linkHeader += headers.fontPreloads;\n }\n\n if (headers.highImagePreloads) {\n if (linkHeader) {\n linkHeader += ', ';\n }\n\n linkHeader += headers.highImagePreloads;\n }\n\n if (!shellComplete) {\n // We use raw iterators because we want to be able to halt iteration\n // We could refactor renderState to store these dually in arrays to\n // make this more efficient at the cost of additional memory and\n // write overhead. However this code only runs once per request so\n // for now I consider this sufficient.\n var queueIter = renderState.styles.values();\n\n outer: for (var queueStep = queueIter.next(); headers.remainingCapacity > 0 && !queueStep.done; queueStep = queueIter.next()) {\n var sheets = queueStep.value.sheets;\n var sheetIter = sheets.values();\n\n for (var sheetStep = sheetIter.next(); headers.remainingCapacity > 0 && !sheetStep.done; sheetStep = sheetIter.next()) {\n var sheet = sheetStep.value;\n var props = sheet.props;\n var key = getResourceKey(props.href);\n var header = getStylesheetPreloadAsHeader(sheet); // We mutate the capacity b/c we don't want to keep checking if later headers will fit.\n // This means that a particularly long header might close out the header queue where later\n // headers could still fit. We could in the future alter the behavior here based on prerender vs render\n // since during prerender we aren't as concerned with pure runtime performance.\n\n if ((headers.remainingCapacity -= header.length) >= 2) {\n renderState.resets.style[key] = PRELOAD_NO_CREDS;\n\n if (linkHeader) {\n linkHeader += ', ';\n }\n\n linkHeader += header; // We already track that the resource exists in resumableState however\n // if the resumableState resets because we postponed in the shell\n // which is what is happening in this branch if we are prerendering\n // then we will end up resetting the resumableState. When it resets we\n // want to record the fact that this stylesheet was already preloaded\n\n renderState.resets.style[key] = typeof props.crossOrigin === 'string' || typeof props.integrity === 'string' ? [props.crossOrigin, props.integrity] : PRELOAD_NO_CREDS;\n } else {\n break outer;\n }\n }\n }\n }\n\n if (linkHeader) {\n onHeaders({\n Link: linkHeader\n });\n } else {\n // We still call this with no headers because a user may be using it as a signal that\n // it React will not provide any headers\n onHeaders({});\n }\n\n return;\n }\n }\n}\n\nfunction createRenderState(resumableState, generateStaticMarkup) {\n var renderState = createRenderState$1(resumableState, undefined, undefined, undefined, undefined, undefined);\n return {\n // Keep this in sync with ReactFizzConfigDOM\n placeholderPrefix: renderState.placeholderPrefix,\n segmentPrefix: renderState.segmentPrefix,\n boundaryPrefix: renderState.boundaryPrefix,\n startInlineScript: renderState.startInlineScript,\n htmlChunks: renderState.htmlChunks,\n headChunks: renderState.headChunks,\n externalRuntimeScript: renderState.externalRuntimeScript,\n bootstrapChunks: renderState.bootstrapChunks,\n importMapChunks: renderState.importMapChunks,\n onHeaders: renderState.onHeaders,\n headers: renderState.headers,\n resets: renderState.resets,\n charsetChunks: renderState.charsetChunks,\n viewportChunks: renderState.viewportChunks,\n hoistableChunks: renderState.hoistableChunks,\n preconnects: renderState.preconnects,\n fontPreloads: renderState.fontPreloads,\n highImagePreloads: renderState.highImagePreloads,\n // usedImagePreloads: renderState.usedImagePreloads,\n styles: renderState.styles,\n bootstrapScripts: renderState.bootstrapScripts,\n scripts: renderState.scripts,\n bulkPreloads: renderState.bulkPreloads,\n preloads: renderState.preloads,\n stylesToHoist: renderState.stylesToHoist,\n // This is an extra field for the legacy renderer\n generateStaticMarkup: generateStaticMarkup\n };\n}\n\nvar doctypeChunk = stringToPrecomputedChunk('');\nfunction pushTextInstance(target, text, renderState, textEmbedded) {\n if (renderState.generateStaticMarkup) {\n target.push(stringToChunk(escapeTextForBrowser(text)));\n return false;\n } else {\n return pushTextInstance$1(target, text, renderState, textEmbedded);\n }\n}\nfunction pushSegmentFinale(target, renderState, lastPushedText, textEmbedded) {\n if (renderState.generateStaticMarkup) {\n return;\n } else {\n return pushSegmentFinale$1(target, renderState, lastPushedText, textEmbedded);\n }\n}\nfunction writeStartCompletedSuspenseBoundary(destination, renderState) {\n if (renderState.generateStaticMarkup) {\n // A completed boundary is done and doesn't need a representation in the HTML\n // if we're not going to be hydrating it.\n return true;\n }\n\n return writeStartCompletedSuspenseBoundary$1(destination);\n}\nfunction writeStartClientRenderedSuspenseBoundary(destination, renderState, // flushing these error arguments are not currently supported in this legacy streaming format.\nerrorDigest, errorMessage, errorComponentStack) {\n if (renderState.generateStaticMarkup) {\n // A client rendered boundary is done and doesn't need a representation in the HTML\n // since we'll never hydrate it. This is arguably an error in static generation.\n return true;\n }\n\n return writeStartClientRenderedSuspenseBoundary$1(destination, renderState, errorDigest, errorMessage, errorComponentStack);\n}\nfunction writeEndCompletedSuspenseBoundary(destination, renderState) {\n if (renderState.generateStaticMarkup) {\n return true;\n }\n\n return writeEndCompletedSuspenseBoundary$1(destination);\n}\nfunction writeEndClientRenderedSuspenseBoundary(destination, renderState) {\n if (renderState.generateStaticMarkup) {\n return true;\n }\n\n return writeEndClientRenderedSuspenseBoundary$1(destination);\n}\nvar NotPendingTransition = NotPending;\n\nfunction getWrappedName(outerType, innerType, wrapperName) {\n var displayName = outerType.displayName;\n\n if (displayName) {\n return displayName;\n }\n\n var functionName = innerType.displayName || innerType.name || '';\n return functionName !== '' ? wrapperName + \"(\" + functionName + \")\" : wrapperName;\n} // Keep in sync with react-reconciler/getComponentNameFromFiber\n\n\nfunction getContextName(type) {\n return type.displayName || 'Context';\n}\n\nvar REACT_CLIENT_REFERENCE = Symbol.for('react.client.reference'); // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead.\n\nfunction getComponentNameFromType(type) {\n if (type == null) {\n // Host root, text node or just invalid type.\n return null;\n }\n\n if (typeof type === 'function') {\n if (type.$$typeof === REACT_CLIENT_REFERENCE) {\n // TODO: Create a convention for naming client references with debug info.\n return null;\n }\n\n return type.displayName || type.name || null;\n }\n\n if (typeof type === 'string') {\n return type;\n }\n\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return 'Fragment';\n\n case REACT_PORTAL_TYPE:\n return 'Portal';\n\n case REACT_PROFILER_TYPE:\n return 'Profiler';\n\n case REACT_STRICT_MODE_TYPE:\n return 'StrictMode';\n\n case REACT_SUSPENSE_TYPE:\n return 'Suspense';\n\n case REACT_SUSPENSE_LIST_TYPE:\n return 'SuspenseList';\n\n case REACT_CACHE_TYPE:\n {\n return 'Cache';\n }\n\n }\n\n if (typeof type === 'object') {\n {\n if (typeof type.tag === 'number') {\n error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.');\n }\n }\n\n switch (type.$$typeof) {\n case REACT_PROVIDER_TYPE:\n {\n var provider = type;\n return getContextName(provider._context) + '.Provider';\n }\n\n case REACT_CONTEXT_TYPE:\n var context = type;\n\n {\n return getContextName(context) + '.Consumer';\n }\n\n case REACT_CONSUMER_TYPE:\n {\n return null;\n }\n\n case REACT_FORWARD_REF_TYPE:\n return getWrappedName(type, type.render, 'ForwardRef');\n\n case REACT_MEMO_TYPE:\n var outerName = type.displayName || null;\n\n if (outerName !== null) {\n return outerName;\n }\n\n return getComponentNameFromType(type.type) || 'Memo';\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n return getComponentNameFromType(init(payload));\n } catch (x) {\n return null;\n }\n }\n }\n }\n\n return null;\n}\n\nvar warnedAboutMissingGetChildContext;\n\n{\n warnedAboutMissingGetChildContext = {};\n}\n\nvar emptyContextObject = {};\n\n{\n Object.freeze(emptyContextObject);\n}\n\nfunction getMaskedContext(type, unmaskedContext) {\n {\n var contextTypes = type.contextTypes;\n\n if (!contextTypes) {\n return emptyContextObject;\n }\n\n var context = {};\n\n for (var key in contextTypes) {\n context[key] = unmaskedContext[key];\n }\n\n return context;\n }\n}\nfunction processChildContext(instance, type, parentContext, childContextTypes) {\n {\n // TODO (bvaughn) Replace this behavior with an invariant() in the future.\n // It has only been added in Fiber to match the (unintentional) behavior in Stack.\n if (typeof instance.getChildContext !== 'function') {\n {\n var componentName = getComponentNameFromType(type) || 'Unknown';\n\n if (!warnedAboutMissingGetChildContext[componentName]) {\n warnedAboutMissingGetChildContext[componentName] = true;\n\n error('%s.childContextTypes is specified but there is no getChildContext() method ' + 'on the instance. You can either define getChildContext() on %s or remove ' + 'childContextTypes from it.', componentName, componentName);\n }\n }\n\n return parentContext;\n }\n\n var childContext = instance.getChildContext();\n\n for (var contextKey in childContext) {\n if (!(contextKey in childContextTypes)) {\n throw new Error((getComponentNameFromType(type) || 'Unknown') + \".getChildContext(): key \\\"\" + contextKey + \"\\\" is not defined in childContextTypes.\");\n }\n }\n\n return assign({}, parentContext, childContext);\n }\n}\n\nvar rendererSigil;\n\n{\n // Use this to detect multiple renderers using the same context\n rendererSigil = {};\n} // Used to store the parent path of all context overrides in a shared linked list.\n// Forming a reverse tree.\n// The structure of a context snapshot is an implementation of this file.\n// Currently, it's implemented as tracking the current active node.\n\n\nvar rootContextSnapshot = null; // We assume that this runtime owns the \"current\" field on all ReactContext instances.\n// This global (actually thread local) state represents what state all those \"current\",\n// fields are currently in.\n\nvar currentActiveSnapshot = null;\n\nfunction popNode(prev) {\n {\n prev.context._currentValue2 = prev.parentValue;\n }\n}\n\nfunction pushNode(next) {\n {\n next.context._currentValue2 = next.value;\n }\n}\n\nfunction popToNearestCommonAncestor(prev, next) {\n if (prev === next) ; else {\n popNode(prev);\n var parentPrev = prev.parent;\n var parentNext = next.parent;\n\n if (parentPrev === null) {\n if (parentNext !== null) {\n throw new Error('The stacks must reach the root at the same time. This is a bug in React.');\n }\n } else {\n if (parentNext === null) {\n throw new Error('The stacks must reach the root at the same time. This is a bug in React.');\n }\n\n popToNearestCommonAncestor(parentPrev, parentNext);\n } // On the way back, we push the new ones that weren't common.\n\n\n pushNode(next);\n }\n}\n\nfunction popAllPrevious(prev) {\n popNode(prev);\n var parentPrev = prev.parent;\n\n if (parentPrev !== null) {\n popAllPrevious(parentPrev);\n }\n}\n\nfunction pushAllNext(next) {\n var parentNext = next.parent;\n\n if (parentNext !== null) {\n pushAllNext(parentNext);\n }\n\n pushNode(next);\n}\n\nfunction popPreviousToCommonLevel(prev, next) {\n popNode(prev);\n var parentPrev = prev.parent;\n\n if (parentPrev === null) {\n throw new Error('The depth must equal at least at zero before reaching the root. This is a bug in React.');\n }\n\n if (parentPrev.depth === next.depth) {\n // We found the same level. Now we just need to find a shared ancestor.\n popToNearestCommonAncestor(parentPrev, next);\n } else {\n // We must still be deeper.\n popPreviousToCommonLevel(parentPrev, next);\n }\n}\n\nfunction popNextToCommonLevel(prev, next) {\n var parentNext = next.parent;\n\n if (parentNext === null) {\n throw new Error('The depth must equal at least at zero before reaching the root. This is a bug in React.');\n }\n\n if (prev.depth === parentNext.depth) {\n // We found the same level. Now we just need to find a shared ancestor.\n popToNearestCommonAncestor(prev, parentNext);\n } else {\n // We must still be deeper.\n popNextToCommonLevel(prev, parentNext);\n }\n\n pushNode(next);\n} // Perform context switching to the new snapshot.\n// To make it cheap to read many contexts, while not suspending, we make the switch eagerly by\n// updating all the context's current values. That way reads, always just read the current value.\n// At the cost of updating contexts even if they're never read by this subtree.\n\n\nfunction switchContext(newSnapshot) {\n // The basic algorithm we need to do is to pop back any contexts that are no longer on the stack.\n // We also need to update any new contexts that are now on the stack with the deepest value.\n // The easiest way to update new contexts is to just reapply them in reverse order from the\n // perspective of the backpointers. To avoid allocating a lot when switching, we use the stack\n // for that. Therefore this algorithm is recursive.\n // 1) First we pop which ever snapshot tree was deepest. Popping old contexts as we go.\n // 2) Then we find the nearest common ancestor from there. Popping old contexts as we go.\n // 3) Then we reapply new contexts on the way back up the stack.\n var prev = currentActiveSnapshot;\n var next = newSnapshot;\n\n if (prev !== next) {\n if (prev === null) {\n // $FlowFixMe[incompatible-call]: This has to be non-null since it's not equal to prev.\n pushAllNext(next);\n } else if (next === null) {\n popAllPrevious(prev);\n } else if (prev.depth === next.depth) {\n popToNearestCommonAncestor(prev, next);\n } else if (prev.depth > next.depth) {\n popPreviousToCommonLevel(prev, next);\n } else {\n popNextToCommonLevel(prev, next);\n }\n\n currentActiveSnapshot = next;\n }\n}\nfunction pushProvider(context, nextValue) {\n var prevValue;\n\n {\n prevValue = context._currentValue2;\n context._currentValue2 = nextValue;\n\n {\n if (context._currentRenderer2 !== undefined && context._currentRenderer2 !== null && context._currentRenderer2 !== rendererSigil) {\n error('Detected multiple renderers concurrently rendering the ' + 'same context provider. This is currently unsupported.');\n }\n\n context._currentRenderer2 = rendererSigil;\n }\n }\n\n var prevNode = currentActiveSnapshot;\n var newNode = {\n parent: prevNode,\n depth: prevNode === null ? 0 : prevNode.depth + 1,\n context: context,\n parentValue: prevValue,\n value: nextValue\n };\n currentActiveSnapshot = newNode;\n return newNode;\n}\nfunction popProvider(context) {\n var prevSnapshot = currentActiveSnapshot;\n\n if (prevSnapshot === null) {\n throw new Error('Tried to pop a Context at the root of the app. This is a bug in React.');\n }\n\n {\n if (prevSnapshot.context !== context) {\n error('The parent context is not the expected context. This is probably a bug in React.');\n }\n }\n\n {\n var _value = prevSnapshot.parentValue;\n prevSnapshot.context._currentValue2 = _value;\n\n {\n if (context._currentRenderer2 !== undefined && context._currentRenderer2 !== null && context._currentRenderer2 !== rendererSigil) {\n error('Detected multiple renderers concurrently rendering the ' + 'same context provider. This is currently unsupported.');\n }\n\n context._currentRenderer2 = rendererSigil;\n }\n }\n\n return currentActiveSnapshot = prevSnapshot.parent;\n}\nfunction getActiveContext() {\n return currentActiveSnapshot;\n}\nfunction readContext$1(context) {\n var value = context._currentValue2;\n return value;\n}\n\n/**\n * `ReactInstanceMap` maintains a mapping from a public facing stateful\n * instance (key) and the internal representation (value). This allows public\n * methods to accept the user facing instance as an argument and map them back\n * to internal methods.\n *\n * Note that this module is currently shared and assumed to be stateless.\n * If this becomes an actual Map, that will break.\n */\nfunction get(key) {\n return key._reactInternals;\n}\nfunction set(key, value) {\n key._reactInternals = value;\n}\n\nvar didWarnAboutNoopUpdateForComponent = {};\nvar didWarnAboutDeprecatedWillMount = {};\nvar didWarnAboutUninitializedState;\nvar didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate;\nvar didWarnAboutLegacyLifecyclesAndDerivedState;\nvar didWarnAboutUndefinedDerivedState;\nvar didWarnAboutDirectlyAssigningPropsToState;\nvar didWarnAboutContextTypeAndContextTypes;\nvar didWarnAboutInvalidateContextType;\nvar didWarnOnInvalidCallback;\n\n{\n didWarnAboutUninitializedState = new Set();\n didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate = new Set();\n didWarnAboutLegacyLifecyclesAndDerivedState = new Set();\n didWarnAboutDirectlyAssigningPropsToState = new Set();\n didWarnAboutUndefinedDerivedState = new Set();\n didWarnAboutContextTypeAndContextTypes = new Set();\n didWarnAboutInvalidateContextType = new Set();\n didWarnOnInvalidCallback = new Set();\n}\n\nfunction warnOnInvalidCallback(callback) {\n {\n if (callback === null || typeof callback === 'function') {\n return;\n } // eslint-disable-next-line react-internal/safe-string-coercion\n\n\n var key = String(callback);\n\n if (!didWarnOnInvalidCallback.has(key)) {\n didWarnOnInvalidCallback.add(key);\n\n error('Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callback);\n }\n }\n}\n\nfunction warnOnUndefinedDerivedState(type, partialState) {\n {\n if (partialState === undefined) {\n var componentName = getComponentNameFromType(type) || 'Component';\n\n if (!didWarnAboutUndefinedDerivedState.has(componentName)) {\n didWarnAboutUndefinedDerivedState.add(componentName);\n\n error('%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. ' + 'You have returned undefined.', componentName);\n }\n }\n }\n}\n\nfunction warnNoop(publicInstance, callerName) {\n {\n var _constructor = publicInstance.constructor;\n var componentName = _constructor && getComponentNameFromType(_constructor) || 'ReactClass';\n var warningKey = componentName + '.' + callerName;\n\n if (didWarnAboutNoopUpdateForComponent[warningKey]) {\n return;\n }\n\n error('Can only update a mounting component. ' + 'This usually means you called %s() outside componentWillMount() on the server. ' + 'This is a no-op.\\n\\nPlease check the code for the %s component.', callerName, componentName);\n\n didWarnAboutNoopUpdateForComponent[warningKey] = true;\n }\n}\n\nvar classComponentUpdater = {\n isMounted: function (inst) {\n return false;\n },\n // $FlowFixMe[missing-local-annot]\n enqueueSetState: function (inst, payload, callback) {\n var internals = get(inst);\n\n if (internals.queue === null) {\n warnNoop(inst, 'setState');\n } else {\n internals.queue.push(payload);\n\n {\n if (callback !== undefined && callback !== null) {\n warnOnInvalidCallback(callback);\n }\n }\n }\n },\n enqueueReplaceState: function (inst, payload, callback) {\n var internals = get(inst);\n internals.replace = true;\n internals.queue = [payload];\n\n {\n if (callback !== undefined && callback !== null) {\n warnOnInvalidCallback(callback);\n }\n }\n },\n // $FlowFixMe[missing-local-annot]\n enqueueForceUpdate: function (inst, callback) {\n var internals = get(inst);\n\n if (internals.queue === null) {\n warnNoop(inst, 'forceUpdate');\n } else {\n {\n if (callback !== undefined && callback !== null) {\n warnOnInvalidCallback(callback);\n }\n }\n }\n }\n};\n\nfunction applyDerivedStateFromProps(instance, ctor, getDerivedStateFromProps, prevState, nextProps) {\n var partialState = getDerivedStateFromProps(nextProps, prevState);\n\n {\n warnOnUndefinedDerivedState(ctor, partialState);\n } // Merge the partial state and the previous state.\n\n\n var newState = partialState === null || partialState === undefined ? prevState : assign({}, prevState, partialState);\n return newState;\n}\n\nfunction constructClassInstance(ctor, props, maskedLegacyContext) {\n var context = emptyContextObject;\n var contextType = ctor.contextType;\n\n {\n if ('contextType' in ctor) {\n var isValid = // Allow null for conditional declaration\n contextType === null || contextType !== undefined && contextType.$$typeof === REACT_CONTEXT_TYPE;\n\n if (!isValid && !didWarnAboutInvalidateContextType.has(ctor)) {\n didWarnAboutInvalidateContextType.add(ctor);\n var addendum = '';\n\n if (contextType === undefined) {\n addendum = ' However, it is set to undefined. ' + 'This can be caused by a typo or by mixing up named and default imports. ' + 'This can also happen due to a circular dependency, so ' + 'try moving the createContext() call to a separate file.';\n } else if (typeof contextType !== 'object') {\n addendum = ' However, it is set to a ' + typeof contextType + '.';\n } else if (contextType.$$typeof === REACT_CONSUMER_TYPE) {\n addendum = ' Did you accidentally pass the Context.Consumer instead?';\n } else {\n addendum = ' However, it is set to an object with keys {' + Object.keys(contextType).join(', ') + '}.';\n }\n\n error('%s defines an invalid contextType. ' + 'contextType should point to the Context object returned by React.createContext().%s', getComponentNameFromType(ctor) || 'Component', addendum);\n }\n }\n }\n\n if (typeof contextType === 'object' && contextType !== null) {\n context = readContext$1(contextType);\n } else {\n context = maskedLegacyContext;\n }\n\n var instance = new ctor(props, context);\n\n {\n if (typeof ctor.getDerivedStateFromProps === 'function' && (instance.state === null || instance.state === undefined)) {\n var componentName = getComponentNameFromType(ctor) || 'Component';\n\n if (!didWarnAboutUninitializedState.has(componentName)) {\n didWarnAboutUninitializedState.add(componentName);\n\n error('`%s` uses `getDerivedStateFromProps` but its initial state is ' + '%s. This is not recommended. Instead, define the initial state by ' + 'assigning an object to `this.state` in the constructor of `%s`. ' + 'This ensures that `getDerivedStateFromProps` arguments have a consistent shape.', componentName, instance.state === null ? 'null' : 'undefined', componentName);\n }\n } // If new component APIs are defined, \"unsafe\" lifecycles won't be called.\n // Warn about these lifecycles if they are present.\n // Don't warn about react-lifecycles-compat polyfilled methods though.\n\n\n if (typeof ctor.getDerivedStateFromProps === 'function' || typeof instance.getSnapshotBeforeUpdate === 'function') {\n var foundWillMountName = null;\n var foundWillReceivePropsName = null;\n var foundWillUpdateName = null;\n\n if (typeof instance.componentWillMount === 'function' && instance.componentWillMount.__suppressDeprecationWarning !== true) {\n foundWillMountName = 'componentWillMount';\n } else if (typeof instance.UNSAFE_componentWillMount === 'function') {\n foundWillMountName = 'UNSAFE_componentWillMount';\n }\n\n if (typeof instance.componentWillReceiveProps === 'function' && instance.componentWillReceiveProps.__suppressDeprecationWarning !== true) {\n foundWillReceivePropsName = 'componentWillReceiveProps';\n } else if (typeof instance.UNSAFE_componentWillReceiveProps === 'function') {\n foundWillReceivePropsName = 'UNSAFE_componentWillReceiveProps';\n }\n\n if (typeof instance.componentWillUpdate === 'function' && instance.componentWillUpdate.__suppressDeprecationWarning !== true) {\n foundWillUpdateName = 'componentWillUpdate';\n } else if (typeof instance.UNSAFE_componentWillUpdate === 'function') {\n foundWillUpdateName = 'UNSAFE_componentWillUpdate';\n }\n\n if (foundWillMountName !== null || foundWillReceivePropsName !== null || foundWillUpdateName !== null) {\n var _componentName = getComponentNameFromType(ctor) || 'Component';\n\n var newApiName = typeof ctor.getDerivedStateFromProps === 'function' ? 'getDerivedStateFromProps()' : 'getSnapshotBeforeUpdate()';\n\n if (!didWarnAboutLegacyLifecyclesAndDerivedState.has(_componentName)) {\n didWarnAboutLegacyLifecyclesAndDerivedState.add(_componentName);\n\n error('Unsafe legacy lifecycles will not be called for components using new component APIs.\\n\\n' + '%s uses %s but also contains the following legacy lifecycles:%s%s%s\\n\\n' + 'The above lifecycles should be removed. Learn more about this warning here:\\n' + 'https://react.dev/link/unsafe-component-lifecycles', _componentName, newApiName, foundWillMountName !== null ? \"\\n \" + foundWillMountName : '', foundWillReceivePropsName !== null ? \"\\n \" + foundWillReceivePropsName : '', foundWillUpdateName !== null ? \"\\n \" + foundWillUpdateName : '');\n }\n }\n }\n }\n\n return instance;\n}\n\nfunction checkClassInstance(instance, ctor, newProps) {\n {\n var name = getComponentNameFromType(ctor) || 'Component';\n var renderPresent = instance.render;\n\n if (!renderPresent) {\n if (ctor.prototype && typeof ctor.prototype.render === 'function') {\n error('No `render` method found on the %s ' + 'instance: did you accidentally return an object from the constructor?', name);\n } else {\n error('No `render` method found on the %s ' + 'instance: you may have forgotten to define `render`.', name);\n }\n }\n\n if (instance.getInitialState && !instance.getInitialState.isReactClassApproved && !instance.state) {\n error('getInitialState was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Did you mean to define a state property instead?', name);\n }\n\n if (instance.getDefaultProps && !instance.getDefaultProps.isReactClassApproved) {\n error('getDefaultProps was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Use a static property to define defaultProps instead.', name);\n }\n\n if (instance.propTypes) {\n error('propTypes was defined as an instance property on %s. Use a static ' + 'property to define propTypes instead.', name);\n }\n\n if (instance.contextType) {\n error('contextType was defined as an instance property on %s. Use a static ' + 'property to define contextType instead.', name);\n }\n\n {\n if (instance.contextTypes) {\n error('contextTypes was defined as an instance property on %s. Use a static ' + 'property to define contextTypes instead.', name);\n }\n\n if (ctor.contextType && ctor.contextTypes && !didWarnAboutContextTypeAndContextTypes.has(ctor)) {\n didWarnAboutContextTypeAndContextTypes.add(ctor);\n\n error('%s declares both contextTypes and contextType static properties. ' + 'The legacy contextTypes property will be ignored.', name);\n }\n }\n\n if (typeof instance.componentShouldUpdate === 'function') {\n error('%s has a method called ' + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + 'The name is phrased as a question because the function is ' + 'expected to return a value.', name);\n }\n\n if (ctor.prototype && ctor.prototype.isPureReactComponent && typeof instance.shouldComponentUpdate !== 'undefined') {\n error('%s has a method called shouldComponentUpdate(). ' + 'shouldComponentUpdate should not be used when extending React.PureComponent. ' + 'Please extend React.Component if shouldComponentUpdate is used.', getComponentNameFromType(ctor) || 'A pure component');\n }\n\n if (typeof instance.componentDidUnmount === 'function') {\n error('%s has a method called ' + 'componentDidUnmount(). But there is no such lifecycle method. ' + 'Did you mean componentWillUnmount()?', name);\n }\n\n if (typeof instance.componentDidReceiveProps === 'function') {\n error('%s has a method called ' + 'componentDidReceiveProps(). But there is no such lifecycle method. ' + 'If you meant to update the state in response to changing props, ' + 'use componentWillReceiveProps(). If you meant to fetch data or ' + 'run side-effects or mutations after React has updated the UI, use componentDidUpdate().', name);\n }\n\n if (typeof instance.componentWillRecieveProps === 'function') {\n error('%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', name);\n }\n\n if (typeof instance.UNSAFE_componentWillRecieveProps === 'function') {\n error('%s has a method called ' + 'UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?', name);\n }\n\n var hasMutatedProps = instance.props !== newProps;\n\n if (instance.props !== undefined && hasMutatedProps) {\n error('When calling super() in `%s`, make sure to pass ' + \"up the same props that your component's constructor was passed.\", name);\n }\n\n if (instance.defaultProps) {\n error('Setting defaultProps as an instance property on %s is not supported and will be ignored.' + ' Instead, define defaultProps as a static property on %s.', name, name);\n }\n\n if (typeof instance.getSnapshotBeforeUpdate === 'function' && typeof instance.componentDidUpdate !== 'function' && !didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.has(ctor)) {\n didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.add(ctor);\n\n error('%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). ' + 'This component defines getSnapshotBeforeUpdate() only.', getComponentNameFromType(ctor));\n }\n\n if (typeof instance.getDerivedStateFromProps === 'function') {\n error('%s: getDerivedStateFromProps() is defined as an instance method ' + 'and will be ignored. Instead, declare it as a static method.', name);\n }\n\n if (typeof instance.getDerivedStateFromError === 'function') {\n error('%s: getDerivedStateFromError() is defined as an instance method ' + 'and will be ignored. Instead, declare it as a static method.', name);\n }\n\n if (typeof ctor.getSnapshotBeforeUpdate === 'function') {\n error('%s: getSnapshotBeforeUpdate() is defined as a static method ' + 'and will be ignored. Instead, declare it as an instance method.', name);\n }\n\n var state = instance.state;\n\n if (state && (typeof state !== 'object' || isArray(state))) {\n error('%s.state: must be set to an object or null', name);\n }\n\n if (typeof instance.getChildContext === 'function' && typeof ctor.childContextTypes !== 'object') {\n error('%s.getChildContext(): childContextTypes must be defined in order to ' + 'use getChildContext().', name);\n }\n }\n}\n\nfunction callComponentWillMount(type, instance) {\n var oldState = instance.state;\n\n if (typeof instance.componentWillMount === 'function') {\n {\n if (instance.componentWillMount.__suppressDeprecationWarning !== true) {\n var componentName = getComponentNameFromType(type) || 'Unknown';\n\n if (!didWarnAboutDeprecatedWillMount[componentName]) {\n warn( // keep this warning in sync with ReactStrictModeWarning.js\n 'componentWillMount has been renamed, and is not recommended for use. ' + 'See https://react.dev/link/unsafe-component-lifecycles for details.\\n\\n' + '* Move code from componentWillMount to componentDidMount (preferred in most cases) ' + 'or the constructor.\\n' + '\\nPlease update the following components: %s', componentName);\n\n didWarnAboutDeprecatedWillMount[componentName] = true;\n }\n }\n }\n\n instance.componentWillMount();\n }\n\n if (typeof instance.UNSAFE_componentWillMount === 'function') {\n instance.UNSAFE_componentWillMount();\n }\n\n if (oldState !== instance.state) {\n {\n error('%s.componentWillMount(): Assigning directly to this.state is ' + \"deprecated (except inside a component's \" + 'constructor). Use setState instead.', getComponentNameFromType(type) || 'Component');\n }\n\n classComponentUpdater.enqueueReplaceState(instance, instance.state, null);\n }\n}\n\nfunction processUpdateQueue(internalInstance, inst, props, maskedLegacyContext) {\n if (internalInstance.queue !== null && internalInstance.queue.length > 0) {\n var oldQueue = internalInstance.queue;\n var oldReplace = internalInstance.replace;\n internalInstance.queue = null;\n internalInstance.replace = false;\n\n if (oldReplace && oldQueue.length === 1) {\n inst.state = oldQueue[0];\n } else {\n var nextState = oldReplace ? oldQueue[0] : inst.state;\n var dontMutate = true;\n\n for (var i = oldReplace ? 1 : 0; i < oldQueue.length; i++) {\n var partial = oldQueue[i];\n var partialState = typeof partial === 'function' ? partial.call(inst, nextState, props, maskedLegacyContext) : partial;\n\n if (partialState != null) {\n if (dontMutate) {\n dontMutate = false;\n nextState = assign({}, nextState, partialState);\n } else {\n assign(nextState, partialState);\n }\n }\n }\n\n inst.state = nextState;\n }\n } else {\n internalInstance.queue = null;\n }\n} // Invokes the mount life-cycles on a previously never rendered instance.\n\n\nfunction mountClassInstance(instance, ctor, newProps, maskedLegacyContext) {\n {\n checkClassInstance(instance, ctor, newProps);\n }\n\n var initialState = instance.state !== undefined ? instance.state : null;\n instance.updater = classComponentUpdater;\n instance.props = newProps;\n instance.state = initialState; // We don't bother initializing the refs object on the server, since we're not going to resolve them anyway.\n // The internal instance will be used to manage updates that happen during this mount.\n\n var internalInstance = {\n queue: [],\n replace: false\n };\n set(instance, internalInstance);\n var contextType = ctor.contextType;\n\n if (typeof contextType === 'object' && contextType !== null) {\n instance.context = readContext$1(contextType);\n } else {\n instance.context = maskedLegacyContext;\n }\n\n {\n if (instance.state === newProps) {\n var componentName = getComponentNameFromType(ctor) || 'Component';\n\n if (!didWarnAboutDirectlyAssigningPropsToState.has(componentName)) {\n didWarnAboutDirectlyAssigningPropsToState.add(componentName);\n\n error('%s: It is not recommended to assign props directly to state ' + \"because updates to props won't be reflected in state. \" + 'In most cases, it is better to use props directly.', componentName);\n }\n }\n }\n\n var getDerivedStateFromProps = ctor.getDerivedStateFromProps;\n\n if (typeof getDerivedStateFromProps === 'function') {\n instance.state = applyDerivedStateFromProps(instance, ctor, getDerivedStateFromProps, initialState, newProps);\n } // In order to support react-lifecycles-compat polyfilled components,\n // Unsafe lifecycles should not be invoked for components using the new APIs.\n\n\n if (typeof ctor.getDerivedStateFromProps !== 'function' && typeof instance.getSnapshotBeforeUpdate !== 'function' && (typeof instance.UNSAFE_componentWillMount === 'function' || typeof instance.componentWillMount === 'function')) {\n callComponentWillMount(ctor, instance); // If we had additional state updates during this life-cycle, let's\n // process them now.\n\n processUpdateQueue(internalInstance, instance, newProps, maskedLegacyContext);\n }\n}\n\n// Ids are base 32 strings whose binary representation corresponds to the\n// position of a node in a tree.\n// Every time the tree forks into multiple children, we add additional bits to\n// the left of the sequence that represent the position of the child within the\n// current level of children.\n//\n// 00101 00010001011010101\n// ╰─┬─╯ ╰───────┬───────╯\n// Fork 5 of 20 Parent id\n//\n// The leading 0s are important. In the above example, you only need 3 bits to\n// represent slot 5. However, you need 5 bits to represent all the forks at\n// the current level, so we must account for the empty bits at the end.\n//\n// For this same reason, slots are 1-indexed instead of 0-indexed. Otherwise,\n// the zeroth id at a level would be indistinguishable from its parent.\n//\n// If a node has only one child, and does not materialize an id (i.e. does not\n// contain a useId hook), then we don't need to allocate any space in the\n// sequence. It's treated as a transparent indirection. For example, these two\n// trees produce the same ids:\n//\n// <> <>\n// <Indirection> <A />\n// <A /> <B />\n// </Indirection> </>\n// <B />\n// </>\n//\n// However, we cannot skip any node that materializes an id. Otherwise, a parent\n// id that does not fork would be indistinguishable from its child id. For\n// example, this tree does not fork, but the parent and child must have\n// different ids.\n//\n// <Parent>\n// <Child />\n// </Parent>\n//\n// To handle this scenario, every time we materialize an id, we allocate a\n// new level with a single slot. You can think of this as a fork with only one\n// prong, or an array of children with length 1.\n//\n// It's possible for the size of the sequence to exceed 32 bits, the max\n// size for bitwise operations. When this happens, we make more room by\n// converting the right part of the id to a string and storing it in an overflow\n// variable. We use a base 32 string representation, because 32 is the largest\n// power of 2 that is supported by toString(). We want the base to be large so\n// that the resulting ids are compact, and we want the base to be a power of 2\n// because every log2(base) bits corresponds to a single character, i.e. every\n// log2(32) = 5 bits. That means we can lop bits off the end 5 at a time without\n// affecting the final result.\nvar emptyTreeContext = {\n id: 1,\n overflow: ''\n};\nfunction getTreeId(context) {\n var overflow = context.overflow;\n var idWithLeadingBit = context.id;\n var id = idWithLeadingBit & ~getLeadingBit(idWithLeadingBit);\n return id.toString(32) + overflow;\n}\nfunction pushTreeContext(baseContext, totalChildren, index) {\n var baseIdWithLeadingBit = baseContext.id;\n var baseOverflow = baseContext.overflow; // The leftmost 1 marks the end of the sequence, non-inclusive. It's not part\n // of the id; we use it to account for leading 0s.\n\n var baseLength = getBitLength(baseIdWithLeadingBit) - 1;\n var baseId = baseIdWithLeadingBit & ~(1 << baseLength);\n var slot = index + 1;\n var length = getBitLength(totalChildren) + baseLength; // 30 is the max length we can store without overflowing, taking into\n // consideration the leading 1 we use to mark the end of the sequence.\n\n if (length > 30) {\n // We overflowed the bitwise-safe range. Fall back to slower algorithm.\n // This branch assumes the length of the base id is greater than 5; it won't\n // work for smaller ids, because you need 5 bits per character.\n //\n // We encode the id in multiple steps: first the base id, then the\n // remaining digits.\n //\n // Each 5 bit sequence corresponds to a single base 32 character. So for\n // example, if the current id is 23 bits long, we can convert 20 of those\n // bits into a string of 4 characters, with 3 bits left over.\n //\n // First calculate how many bits in the base id represent a complete\n // sequence of characters.\n var numberOfOverflowBits = baseLength - baseLength % 5; // Then create a bitmask that selects only those bits.\n\n var newOverflowBits = (1 << numberOfOverflowBits) - 1; // Select the bits, and convert them to a base 32 string.\n\n var newOverflow = (baseId & newOverflowBits).toString(32); // Now we can remove those bits from the base id.\n\n var restOfBaseId = baseId >> numberOfOverflowBits;\n var restOfBaseLength = baseLength - numberOfOverflowBits; // Finally, encode the rest of the bits using the normal algorithm. Because\n // we made more room, this time it won't overflow.\n\n var restOfLength = getBitLength(totalChildren) + restOfBaseLength;\n var restOfNewBits = slot << restOfBaseLength;\n var id = restOfNewBits | restOfBaseId;\n var overflow = newOverflow + baseOverflow;\n return {\n id: 1 << restOfLength | id,\n overflow: overflow\n };\n } else {\n // Normal path\n var newBits = slot << baseLength;\n\n var _id = newBits | baseId;\n\n var _overflow = baseOverflow;\n return {\n id: 1 << length | _id,\n overflow: _overflow\n };\n }\n}\n\nfunction getBitLength(number) {\n return 32 - clz32(number);\n}\n\nfunction getLeadingBit(id) {\n return 1 << getBitLength(id) - 1;\n} // TODO: Math.clz32 is supported in Node 12+. Maybe we can drop the fallback.\n\n\nvar clz32 = Math.clz32 ? Math.clz32 : clz32Fallback; // Count leading zeros.\n// Based on:\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/clz32\n\nvar log = Math.log;\nvar LN2 = Math.LN2;\n\nfunction clz32Fallback(x) {\n var asUint = x >>> 0;\n\n if (asUint === 0) {\n return 32;\n }\n\n return 31 - (log(asUint) / LN2 | 0) | 0;\n}\n\n// Corresponds to ReactFiberWakeable and ReactFlightWakeable modules. Generally,\n// changes to one module should be reflected in the others.\n// TODO: Rename this module and the corresponding Fiber one to \"Thenable\"\n// instead of \"Wakeable\". Or some other more appropriate name.\n// An error that is thrown (e.g. by `use`) to trigger Suspense. If we\n// detect this is caught by userspace, we'll log a warning in development.\nvar SuspenseException = new Error(\"Suspense Exception: This is not a real error! It's an implementation \" + 'detail of `use` to interrupt the current render. You must either ' + 'rethrow it immediately, or move the `use` call outside of the ' + '`try/catch` block. Capturing without rethrowing will lead to ' + 'unexpected behavior.\\n\\n' + 'To handle async errors, wrap your component in an error boundary, or ' + \"call the promise's `.catch` method and pass the result to `use`\");\nfunction createThenableState() {\n // The ThenableState is created the first time a component suspends. If it\n // suspends again, we'll reuse the same state.\n return [];\n}\n\nfunction noop$2() {}\n\nfunction trackUsedThenable(thenableState, thenable, index) {\n var previous = thenableState[index];\n\n if (previous === undefined) {\n thenableState.push(thenable);\n } else {\n if (previous !== thenable) {\n // Reuse the previous thenable, and drop the new one. We can assume\n // they represent the same value, because components are idempotent.\n // Avoid an unhandled rejection errors for the Promises that we'll\n // intentionally ignore.\n thenable.then(noop$2, noop$2);\n thenable = previous;\n }\n } // We use an expando to track the status and result of a thenable so that we\n // can synchronously unwrap the value. Think of this as an extension of the\n // Promise API, or a custom interface that is a superset of Thenable.\n //\n // If the thenable doesn't have a status, set it to \"pending\" and attach\n // a listener that will update its status and result when it resolves.\n\n\n switch (thenable.status) {\n case 'fulfilled':\n {\n var fulfilledValue = thenable.value;\n return fulfilledValue;\n }\n\n case 'rejected':\n {\n var rejectedError = thenable.reason;\n throw rejectedError;\n }\n\n default:\n {\n if (typeof thenable.status === 'string') ; else {\n var pendingThenable = thenable;\n pendingThenable.status = 'pending';\n pendingThenable.then(function (fulfilledValue) {\n if (thenable.status === 'pending') {\n var fulfilledThenable = thenable;\n fulfilledThenable.status = 'fulfilled';\n fulfilledThenable.value = fulfilledValue;\n }\n }, function (error) {\n if (thenable.status === 'pending') {\n var rejectedThenable = thenable;\n rejectedThenable.status = 'rejected';\n rejectedThenable.reason = error;\n }\n }); // Check one more time in case the thenable resolved synchronously\n\n switch (thenable.status) {\n case 'fulfilled':\n {\n var fulfilledThenable = thenable;\n return fulfilledThenable.value;\n }\n\n case 'rejected':\n {\n var rejectedThenable = thenable;\n throw rejectedThenable.reason;\n }\n }\n } // Suspend.\n //\n // Throwing here is an implementation detail that allows us to unwind the\n // call stack. But we shouldn't allow it to leak into userspace. Throw an\n // opaque placeholder value instead of the actual thenable. If it doesn't\n // get captured by the work loop, log a warning, because that means\n // something in userspace must have caught it.\n\n\n suspendedThenable = thenable;\n throw SuspenseException;\n }\n }\n} // This is used to track the actual thenable that suspended so it can be\n// passed to the rest of the Suspense implementation — which, for historical\n// reasons, expects to receive a thenable.\n\nvar suspendedThenable = null;\nfunction getSuspendedThenable() {\n // This is called right after `use` suspends by throwing an exception. `use`\n // throws an opaque value instead of the thenable itself so that it can't be\n // caught in userspace. Then the work loop accesses the actual thenable using\n // this function.\n if (suspendedThenable === null) {\n throw new Error('Expected a suspended thenable. This is a bug in React. Please file ' + 'an issue.');\n }\n\n var thenable = suspendedThenable;\n suspendedThenable = null;\n return thenable;\n}\n\n/**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\nfunction is(x, y) {\n return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y // eslint-disable-line no-self-compare\n ;\n}\n\nvar objectIs = // $FlowFixMe[method-unbinding]\ntypeof Object.is === 'function' ? Object.is : is;\n\nvar currentlyRenderingComponent = null;\nvar currentlyRenderingTask = null;\nvar currentlyRenderingRequest = null;\nvar currentlyRenderingKeyPath = null;\nvar firstWorkInProgressHook = null;\nvar workInProgressHook = null; // Whether the work-in-progress hook is a re-rendered hook\n\nvar isReRender = false; // Whether an update was scheduled during the currently executing render pass.\n\nvar didScheduleRenderPhaseUpdate = false; // Counts the number of useId hooks in this component\n\nvar localIdCounter = 0; // Chunks that should be pushed to the stream once the component\n// finishes rendering.\n// Counts the number of useFormState calls in this component\n\nvar formStateCounter = 0; // The index of the useFormState hook that matches the one passed in at the\n// root during an MPA navigation, if any.\n\nvar formStateMatchingIndex = -1; // Counts the number of use(thenable) calls in this component\n\nvar thenableIndexCounter = 0;\nvar thenableState = null; // Lazily created map of render-phase updates\n\nvar renderPhaseUpdates = null; // Counter to prevent infinite loops.\n\nvar numberOfReRenders = 0;\nvar RE_RENDER_LIMIT = 25;\nvar isInHookUserCodeInDev = false; // In DEV, this is the name of the currently executing primitive hook\n\nvar currentHookNameInDev;\n\nfunction resolveCurrentlyRenderingComponent() {\n if (currentlyRenderingComponent === null) {\n throw new Error('Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for' + ' one of the following reasons:\\n' + '1. You might have mismatching versions of React and the renderer (such as React DOM)\\n' + '2. You might be breaking the Rules of Hooks\\n' + '3. You might have more than one copy of React in the same app\\n' + 'See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.');\n }\n\n {\n if (isInHookUserCodeInDev) {\n error('Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. ' + 'You can only call Hooks at the top level of your React function. ' + 'For more information, see ' + 'https://react.dev/link/rules-of-hooks');\n }\n }\n\n return currentlyRenderingComponent;\n}\n\nfunction areHookInputsEqual(nextDeps, prevDeps) {\n if (prevDeps === null) {\n {\n error('%s received a final argument during this render, but not during ' + 'the previous render. Even though the final argument is optional, ' + 'its type cannot change between renders.', currentHookNameInDev);\n }\n\n return false;\n }\n\n {\n // Don't bother comparing lengths in prod because these arrays should be\n // passed inline.\n if (nextDeps.length !== prevDeps.length) {\n error('The final argument passed to %s changed size between renders. The ' + 'order and size of this array must remain constant.\\n\\n' + 'Previous: %s\\n' + 'Incoming: %s', currentHookNameInDev, \"[\" + nextDeps.join(', ') + \"]\", \"[\" + prevDeps.join(', ') + \"]\");\n }\n } // $FlowFixMe[incompatible-use] found when upgrading Flow\n\n\n for (var i = 0; i < prevDeps.length && i < nextDeps.length; i++) {\n // $FlowFixMe[incompatible-use] found when upgrading Flow\n if (objectIs(nextDeps[i], prevDeps[i])) {\n continue;\n }\n\n return false;\n }\n\n return true;\n}\n\nfunction createHook() {\n if (numberOfReRenders > 0) {\n throw new Error('Rendered more hooks than during the previous render');\n }\n\n return {\n memoizedState: null,\n queue: null,\n next: null\n };\n}\n\nfunction createWorkInProgressHook() {\n if (workInProgressHook === null) {\n // This is the first hook in the list\n if (firstWorkInProgressHook === null) {\n isReRender = false;\n firstWorkInProgressHook = workInProgressHook = createHook();\n } else {\n // There's already a work-in-progress. Reuse it.\n isReRender = true;\n workInProgressHook = firstWorkInProgressHook;\n }\n } else {\n if (workInProgressHook.next === null) {\n isReRender = false; // Append to the end of the list\n\n workInProgressHook = workInProgressHook.next = createHook();\n } else {\n // There's already a work-in-progress. Reuse it.\n isReRender = true;\n workInProgressHook = workInProgressHook.next;\n }\n }\n\n return workInProgressHook;\n}\n\nfunction prepareToUseHooks(request, task, keyPath, componentIdentity, prevThenableState) {\n currentlyRenderingComponent = componentIdentity;\n currentlyRenderingTask = task;\n currentlyRenderingRequest = request;\n currentlyRenderingKeyPath = keyPath;\n\n {\n isInHookUserCodeInDev = false;\n } // The following should have already been reset\n // didScheduleRenderPhaseUpdate = false;\n // firstWorkInProgressHook = null;\n // numberOfReRenders = 0;\n // renderPhaseUpdates = null;\n // workInProgressHook = null;\n\n\n localIdCounter = 0;\n formStateCounter = 0;\n formStateMatchingIndex = -1;\n thenableIndexCounter = 0;\n thenableState = prevThenableState;\n}\nfunction finishHooks(Component, props, children, refOrContext) {\n // This must be called after every function component to prevent hooks from\n // being used in classes.\n while (didScheduleRenderPhaseUpdate) {\n // Updates were scheduled during the render phase. They are stored in\n // the `renderPhaseUpdates` map. Call the component again, reusing the\n // work-in-progress hooks and applying the additional updates on top. Keep\n // restarting until no more updates are scheduled.\n didScheduleRenderPhaseUpdate = false;\n localIdCounter = 0;\n formStateCounter = 0;\n formStateMatchingIndex = -1;\n thenableIndexCounter = 0;\n numberOfReRenders += 1; // Start over from the beginning of the list\n\n workInProgressHook = null;\n children = Component(props, refOrContext);\n }\n\n resetHooksState();\n return children;\n}\nfunction getThenableStateAfterSuspending() {\n var state = thenableState;\n thenableState = null;\n return state;\n}\nfunction checkDidRenderIdHook() {\n // This should be called immediately after every finishHooks call.\n // Conceptually, it's part of the return value of finishHooks; it's only a\n // separate function to avoid using an array tuple.\n var didRenderIdHook = localIdCounter !== 0;\n return didRenderIdHook;\n}\nfunction getFormStateCount() {\n // This should be called immediately after every finishHooks call.\n // Conceptually, it's part of the return value of finishHooks; it's only a\n // separate function to avoid using an array tuple.\n return formStateCounter;\n}\nfunction getFormStateMatchingIndex() {\n // This should be called immediately after every finishHooks call.\n // Conceptually, it's part of the return value of finishHooks; it's only a\n // separate function to avoid using an array tuple.\n return formStateMatchingIndex;\n} // Reset the internal hooks state if an error occurs while rendering a component\n\nfunction resetHooksState() {\n {\n isInHookUserCodeInDev = false;\n }\n\n currentlyRenderingComponent = null;\n currentlyRenderingTask = null;\n currentlyRenderingRequest = null;\n currentlyRenderingKeyPath = null;\n didScheduleRenderPhaseUpdate = false;\n firstWorkInProgressHook = null;\n numberOfReRenders = 0;\n renderPhaseUpdates = null;\n workInProgressHook = null;\n}\n\nfunction readContext(context) {\n {\n if (isInHookUserCodeInDev) {\n error('Context can only be read while React is rendering. ' + 'In classes, you can read it in the render method or getDerivedStateFromProps. ' + 'In function components, you can read it directly in the function body, but not ' + 'inside Hooks like useReducer() or useMemo().');\n }\n }\n\n return readContext$1(context);\n}\n\nfunction useContext(context) {\n {\n currentHookNameInDev = 'useContext';\n }\n\n resolveCurrentlyRenderingComponent();\n return readContext$1(context);\n}\n\nfunction basicStateReducer(state, action) {\n // $FlowFixMe[incompatible-use]: Flow doesn't like mixed types\n return typeof action === 'function' ? action(state) : action;\n}\n\nfunction useState(initialState) {\n {\n currentHookNameInDev = 'useState';\n }\n\n return useReducer(basicStateReducer, // useReducer has a special case to support lazy useState initializers\n initialState);\n}\nfunction useReducer(reducer, initialArg, init) {\n {\n if (reducer !== basicStateReducer) {\n currentHookNameInDev = 'useReducer';\n }\n }\n\n currentlyRenderingComponent = resolveCurrentlyRenderingComponent();\n workInProgressHook = createWorkInProgressHook();\n\n if (isReRender) {\n // This is a re-render. Apply the new render phase updates to the previous\n // current hook.\n var queue = workInProgressHook.queue;\n var dispatch = queue.dispatch;\n\n if (renderPhaseUpdates !== null) {\n // Render phase updates are stored in a map of queue -> linked list\n var firstRenderPhaseUpdate = renderPhaseUpdates.get(queue);\n\n if (firstRenderPhaseUpdate !== undefined) {\n // $FlowFixMe[incompatible-use] found when upgrading Flow\n renderPhaseUpdates.delete(queue); // $FlowFixMe[incompatible-use] found when upgrading Flow\n\n var newState = workInProgressHook.memoizedState;\n var update = firstRenderPhaseUpdate;\n\n do {\n // Process this render phase update. We don't have to check the\n // priority because it will always be the same as the current\n // render's.\n var action = update.action;\n\n {\n isInHookUserCodeInDev = true;\n }\n\n newState = reducer(newState, action);\n\n {\n isInHookUserCodeInDev = false;\n } // $FlowFixMe[incompatible-type] we bail out when we get a null\n\n\n update = update.next;\n } while (update !== null); // $FlowFixMe[incompatible-use] found when upgrading Flow\n\n\n workInProgressHook.memoizedState = newState;\n return [newState, dispatch];\n }\n } // $FlowFixMe[incompatible-use] found when upgrading Flow\n\n\n return [workInProgressHook.memoizedState, dispatch];\n } else {\n {\n isInHookUserCodeInDev = true;\n }\n\n var initialState;\n\n if (reducer === basicStateReducer) {\n // Special case for `useState`.\n initialState = typeof initialArg === 'function' ? initialArg() : initialArg;\n } else {\n initialState = init !== undefined ? init(initialArg) : initialArg;\n }\n\n {\n isInHookUserCodeInDev = false;\n } // $FlowFixMe[incompatible-use] found when upgrading Flow\n\n\n workInProgressHook.memoizedState = initialState; // $FlowFixMe[incompatible-use] found when upgrading Flow\n\n var _queue = workInProgressHook.queue = {\n last: null,\n dispatch: null\n };\n\n var _dispatch = _queue.dispatch = dispatchAction.bind(null, currentlyRenderingComponent, _queue); // $FlowFixMe[incompatible-use] found when upgrading Flow\n\n\n return [workInProgressHook.memoizedState, _dispatch];\n }\n}\n\nfunction useMemo(nextCreate, deps) {\n currentlyRenderingComponent = resolveCurrentlyRenderingComponent();\n workInProgressHook = createWorkInProgressHook();\n var nextDeps = deps === undefined ? null : deps;\n\n if (workInProgressHook !== null) {\n var prevState = workInProgressHook.memoizedState;\n\n if (prevState !== null) {\n if (nextDeps !== null) {\n var prevDeps = prevState[1];\n\n if (areHookInputsEqual(nextDeps, prevDeps)) {\n return prevState[0];\n }\n }\n }\n }\n\n {\n isInHookUserCodeInDev = true;\n }\n\n var nextValue = nextCreate();\n\n {\n isInHookUserCodeInDev = false;\n } // $FlowFixMe[incompatible-use] found when upgrading Flow\n\n\n workInProgressHook.memoizedState = [nextValue, nextDeps];\n return nextValue;\n}\n\nfunction useRef(initialValue) {\n currentlyRenderingComponent = resolveCurrentlyRenderingComponent();\n workInProgressHook = createWorkInProgressHook();\n var previousRef = workInProgressHook.memoizedState;\n\n if (previousRef === null) {\n var ref = {\n current: initialValue\n };\n\n {\n Object.seal(ref);\n } // $FlowFixMe[incompatible-use] found when upgrading Flow\n\n\n workInProgressHook.memoizedState = ref;\n return ref;\n } else {\n return previousRef;\n }\n}\n\nfunction dispatchAction(componentIdentity, queue, action) {\n if (numberOfReRenders >= RE_RENDER_LIMIT) {\n throw new Error('Too many re-renders. React limits the number of renders to prevent ' + 'an infinite loop.');\n }\n\n if (componentIdentity === currentlyRenderingComponent) {\n // This is a render phase update. Stash it in a lazily-created map of\n // queue -> linked list of updates. After this render pass, we'll restart\n // and apply the stashed updates on top of the work-in-progress hook.\n didScheduleRenderPhaseUpdate = true;\n var update = {\n action: action,\n next: null\n };\n\n if (renderPhaseUpdates === null) {\n renderPhaseUpdates = new Map();\n }\n\n var firstRenderPhaseUpdate = renderPhaseUpdates.get(queue);\n\n if (firstRenderPhaseUpdate === undefined) {\n // $FlowFixMe[incompatible-use] found when upgrading Flow\n renderPhaseUpdates.set(queue, update);\n } else {\n // Append the update to the end of the list.\n var lastRenderPhaseUpdate = firstRenderPhaseUpdate;\n\n while (lastRenderPhaseUpdate.next !== null) {\n lastRenderPhaseUpdate = lastRenderPhaseUpdate.next;\n }\n\n lastRenderPhaseUpdate.next = update;\n }\n }\n}\n\nfunction useCallback(callback, deps) {\n return useMemo(function () {\n return callback;\n }, deps);\n}\n\nfunction useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {\n if (getServerSnapshot === undefined) {\n throw new Error('Missing getServerSnapshot, which is required for ' + 'server-rendered content. Will revert to client rendering.');\n }\n\n return getServerSnapshot();\n}\n\nfunction useDeferredValue(value, initialValue) {\n resolveCurrentlyRenderingComponent();\n\n {\n return value;\n }\n}\n\nfunction unsupportedStartTransition() {\n throw new Error('startTransition cannot be called during server rendering.');\n}\n\nfunction useTransition() {\n resolveCurrentlyRenderingComponent();\n return [false, unsupportedStartTransition];\n}\n\nfunction useHostTransitionStatus() {\n resolveCurrentlyRenderingComponent();\n return NotPendingTransition;\n}\n\nfunction unsupportedSetOptimisticState() {\n throw new Error('Cannot update optimistic state while rendering.');\n}\n\nfunction useOptimistic(passthrough, reducer) {\n resolveCurrentlyRenderingComponent();\n return [passthrough, unsupportedSetOptimisticState];\n}\n\nfunction createPostbackFormStateKey(permalink, componentKeyPath, hookIndex) {\n if (permalink !== undefined) {\n // Don't bother to hash a permalink-based key since it's already short.\n return 'p' + permalink;\n } else {\n // Append a node to the key path that represents the form state hook.\n var keyPath = [componentKeyPath, null, hookIndex]; // Key paths are hashed to reduce the size. It does not need to be secure,\n // and it's more important that it's fast than that it's completely\n // collision-free.\n\n var keyPathHash = createFastHashJS(JSON.stringify(keyPath));\n return 'k' + keyPathHash;\n }\n}\n\nfunction useFormState(action, initialState, permalink) {\n resolveCurrentlyRenderingComponent(); // Count the number of useFormState hooks per component. We also use this to\n // track the position of this useFormState hook relative to the other ones in\n // this component, so we can generate a unique key for each one.\n\n var formStateHookIndex = formStateCounter++;\n var request = currentlyRenderingRequest; // $FlowIgnore[prop-missing]\n\n var formAction = action.$$FORM_ACTION;\n\n if (typeof formAction === 'function') {\n // This is a server action. These have additional features to enable\n // MPA-style form submissions with progressive enhancement.\n // TODO: If the same permalink is passed to multiple useFormStates, and\n // they all have the same action signature, Fizz will pass the postback\n // state to all of them. We should probably only pass it to the first one,\n // and/or warn.\n // The key is lazily generated and deduped so the that the keypath doesn't\n // get JSON.stringify-ed unnecessarily, and at most once.\n var nextPostbackStateKey = null; // Determine the current form state. If we received state during an MPA form\n // submission, then we will reuse that, if the action identity matches.\n // Otherwise we'll use the initial state argument. We will emit a comment\n // marker into the stream that indicates whether the state was reused.\n\n var state = initialState;\n var componentKeyPath = currentlyRenderingKeyPath;\n var postbackFormState = getFormState(request); // $FlowIgnore[prop-missing]\n\n var isSignatureEqual = action.$$IS_SIGNATURE_EQUAL;\n\n if (postbackFormState !== null && typeof isSignatureEqual === 'function') {\n var postbackKey = postbackFormState[1];\n var postbackReferenceId = postbackFormState[2];\n var postbackBoundArity = postbackFormState[3];\n\n if (isSignatureEqual.call(action, postbackReferenceId, postbackBoundArity)) {\n nextPostbackStateKey = createPostbackFormStateKey(permalink, componentKeyPath, formStateHookIndex);\n\n if (postbackKey === nextPostbackStateKey) {\n // This was a match\n formStateMatchingIndex = formStateHookIndex; // Reuse the state that was submitted by the form.\n\n state = postbackFormState[0];\n }\n }\n } // Bind the state to the first argument of the action.\n\n\n var boundAction = action.bind(null, state); // Wrap the action so the return value is void.\n\n var dispatch = function (payload) {\n boundAction(payload);\n }; // $FlowIgnore[prop-missing]\n\n\n if (typeof boundAction.$$FORM_ACTION === 'function') {\n // $FlowIgnore[prop-missing]\n dispatch.$$FORM_ACTION = function (prefix) {\n var metadata = boundAction.$$FORM_ACTION(prefix); // Override the action URL\n\n if (permalink !== undefined) {\n {\n checkAttributeStringCoercion(permalink, 'target');\n }\n\n permalink += '';\n metadata.action = permalink;\n }\n\n var formData = metadata.data;\n\n if (formData) {\n if (nextPostbackStateKey === null) {\n nextPostbackStateKey = createPostbackFormStateKey(permalink, componentKeyPath, formStateHookIndex);\n }\n\n formData.append('$ACTION_KEY', nextPostbackStateKey);\n }\n\n return metadata;\n };\n }\n\n return [state, dispatch, false];\n } else {\n // This is not a server action, so the implementation is much simpler.\n // Bind the state to the first argument of the action.\n var _boundAction = action.bind(null, initialState); // Wrap the action so the return value is void.\n\n\n var _dispatch2 = function (payload) {\n _boundAction(payload);\n };\n\n return [initialState, _dispatch2, false];\n }\n}\n\nfunction useId() {\n var task = currentlyRenderingTask;\n var treeId = getTreeId(task.treeContext);\n var resumableState = currentResumableState;\n\n if (resumableState === null) {\n throw new Error('Invalid hook call. Hooks can only be called inside of the body of a function component.');\n }\n\n var localId = localIdCounter++;\n return makeId(resumableState, treeId, localId);\n}\n\nfunction use(usable) {\n if (usable !== null && typeof usable === 'object') {\n // $FlowFixMe[method-unbinding]\n if (typeof usable.then === 'function') {\n // This is a thenable.\n var thenable = usable;\n return unwrapThenable(thenable);\n } else if (usable.$$typeof === REACT_CONTEXT_TYPE) {\n var context = usable;\n return readContext(context);\n }\n } // eslint-disable-next-line react-internal/safe-string-coercion\n\n\n throw new Error('An unsupported type was passed to use(): ' + String(usable));\n}\n\nfunction unwrapThenable(thenable) {\n var index = thenableIndexCounter;\n thenableIndexCounter += 1;\n\n if (thenableState === null) {\n thenableState = createThenableState();\n }\n\n return trackUsedThenable(thenableState, thenable, index);\n}\n\nfunction unsupportedRefresh() {\n throw new Error('Cache cannot be refreshed during server rendering.');\n}\n\nfunction useCacheRefresh() {\n return unsupportedRefresh;\n}\n\nfunction noop$1() {}\n\nvar HooksDispatcher = {\n readContext: readContext,\n use: use,\n useContext: useContext,\n useMemo: useMemo,\n useReducer: useReducer,\n useRef: useRef,\n useState: useState,\n useInsertionEffect: noop$1,\n useLayoutEffect: noop$1,\n useCallback: useCallback,\n // useImperativeHandle is not run in the server environment\n useImperativeHandle: noop$1,\n // Effects are not run in the server environment.\n useEffect: noop$1,\n // Debugging effect\n useDebugValue: noop$1,\n useDeferredValue: useDeferredValue,\n useTransition: useTransition,\n useId: useId,\n // Subscriptions are not setup in a server environment.\n useSyncExternalStore: useSyncExternalStore\n};\n\n{\n HooksDispatcher.useCacheRefresh = useCacheRefresh;\n}\n\n{\n HooksDispatcher.useHostTransitionStatus = useHostTransitionStatus;\n}\n\n{\n HooksDispatcher.useOptimistic = useOptimistic;\n HooksDispatcher.useFormState = useFormState;\n}\n\nvar currentResumableState = null;\nfunction setCurrentResumableState(resumableState) {\n currentResumableState = resumableState;\n}\n\nfunction getCacheSignal() {\n throw new Error('Not implemented.');\n}\n\nfunction getCacheForType(resourceType) {\n throw new Error('Not implemented.');\n}\n\nvar DefaultCacheDispatcher = {\n getCacheSignal: getCacheSignal,\n getCacheForType: getCacheForType\n};\n\n// Helpers to patch console.logs to avoid logging during side-effect free\n// replaying on render function. This currently only patches the object\n// lazily which won't cover if the log function was extracted eagerly.\n// We could also eagerly patch the method.\nvar disabledDepth = 0;\nvar prevLog;\nvar prevInfo;\nvar prevWarn;\nvar prevError;\nvar prevGroup;\nvar prevGroupCollapsed;\nvar prevGroupEnd;\n\nfunction disabledLog() {}\n\ndisabledLog.__reactDisabledLog = true;\nfunction disableLogs() {\n {\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n prevLog = console.log;\n prevInfo = console.info;\n prevWarn = console.warn;\n prevError = console.error;\n prevGroup = console.group;\n prevGroupCollapsed = console.groupCollapsed;\n prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099\n\n var props = {\n configurable: true,\n enumerable: true,\n value: disabledLog,\n writable: true\n }; // $FlowFixMe[cannot-write] Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n info: props,\n log: props,\n warn: props,\n error: props,\n group: props,\n groupCollapsed: props,\n groupEnd: props\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n disabledDepth++;\n }\n}\nfunction reenableLogs() {\n {\n disabledDepth--;\n\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n var props = {\n configurable: true,\n enumerable: true,\n writable: true\n }; // $FlowFixMe[cannot-write] Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n log: assign({}, props, {\n value: prevLog\n }),\n info: assign({}, props, {\n value: prevInfo\n }),\n warn: assign({}, props, {\n value: prevWarn\n }),\n error: assign({}, props, {\n value: prevError\n }),\n group: assign({}, props, {\n value: prevGroup\n }),\n groupCollapsed: assign({}, props, {\n value: prevGroupCollapsed\n }),\n groupEnd: assign({}, props, {\n value: prevGroupEnd\n })\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n if (disabledDepth < 0) {\n error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');\n }\n }\n}\n\nvar ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher;\nvar prefix;\nfunction describeBuiltInComponentFrame(name, ownerFn) {\n {\n if (prefix === undefined) {\n // Extract the VM specific prefix used by each line.\n try {\n throw Error();\n } catch (x) {\n var match = x.stack.trim().match(/\\n( *(at )?)/);\n prefix = match && match[1] || '';\n }\n } // We use the prefix to ensure our stacks line up with native stack frames.\n\n\n return '\\n' + prefix + name;\n }\n}\nvar reentry = false;\nvar componentFrameCache;\n\n{\n var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;\n componentFrameCache = new PossiblyWeakMap();\n}\n/**\n * Leverages native browser/VM stack frames to get proper details (e.g.\n * filename, line + col number) for a single component in a component stack. We\n * do this by:\n * (1) throwing and catching an error in the function - this will be our\n * control error.\n * (2) calling the component which will eventually throw an error that we'll\n * catch - this will be our sample error.\n * (3) diffing the control and sample error stacks to find the stack frame\n * which represents our component.\n */\n\n\nfunction describeNativeComponentFrame(fn, construct) {\n // If something asked for a stack inside a fake render, it should get ignored.\n if (!fn || reentry) {\n return '';\n }\n\n {\n var frame = componentFrameCache.get(fn);\n\n if (frame !== undefined) {\n return frame;\n }\n }\n\n reentry = true;\n var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe[incompatible-type] It does accept undefined.\n\n Error.prepareStackTrace = undefined;\n var previousDispatcher;\n\n {\n previousDispatcher = ReactCurrentDispatcher$1.current; // Set the dispatcher in DEV because this might be call in the render function\n // for warnings.\n\n ReactCurrentDispatcher$1.current = null;\n disableLogs();\n }\n /**\n * Finding a common stack frame between sample and control errors can be\n * tricky given the different types and levels of stack trace truncation from\n * different JS VMs. So instead we'll attempt to control what that common\n * frame should be through this object method:\n * Having both the sample and control errors be in the function under the\n * `DescribeNativeComponentFrameRoot` property, + setting the `name` and\n * `displayName` properties of the function ensures that a stack\n * frame exists that has the method name `DescribeNativeComponentFrameRoot` in\n * it for both control and sample stacks.\n */\n\n\n var RunInRootFrame = {\n DetermineComponentFrameRoot: function () {\n var control;\n\n try {\n // This should throw.\n if (construct) {\n // Something should be setting the props in the constructor.\n var Fake = function () {\n throw Error();\n }; // $FlowFixMe[prop-missing]\n\n\n Object.defineProperty(Fake.prototype, 'props', {\n set: function () {\n // We use a throwing setter instead of frozen or non-writable props\n // because that won't throw in a non-strict mode function.\n throw Error();\n }\n });\n\n if (typeof Reflect === 'object' && Reflect.construct) {\n // We construct a different control for this case to include any extra\n // frames added by the construct call.\n try {\n Reflect.construct(Fake, []);\n } catch (x) {\n control = x;\n }\n\n Reflect.construct(fn, [], Fake);\n } else {\n try {\n Fake.call();\n } catch (x) {\n control = x;\n } // $FlowFixMe[prop-missing] found when upgrading Flow\n\n\n fn.call(Fake.prototype);\n }\n } else {\n try {\n throw Error();\n } catch (x) {\n control = x;\n } // TODO(luna): This will currently only throw if the function component\n // tries to access React/ReactDOM/props. We should probably make this throw\n // in simple components too\n\n\n var maybePromise = fn(); // If the function component returns a promise, it's likely an async\n // component, which we don't yet support. Attach a noop catch handler to\n // silence the error.\n // TODO: Implement component stacks for async client components?\n\n if (maybePromise && typeof maybePromise.catch === 'function') {\n maybePromise.catch(function () {});\n }\n }\n } catch (sample) {\n // This is inlined manually because closure doesn't do it for us.\n if (sample && control && typeof sample.stack === 'string') {\n return [sample.stack, control.stack];\n }\n }\n\n return [null, null];\n }\n }; // $FlowFixMe[prop-missing]\n\n RunInRootFrame.DetermineComponentFrameRoot.displayName = 'DetermineComponentFrameRoot';\n var namePropDescriptor = Object.getOwnPropertyDescriptor(RunInRootFrame.DetermineComponentFrameRoot, 'name'); // Before ES6, the `name` property was not configurable.\n\n if (namePropDescriptor && namePropDescriptor.configurable) {\n // V8 utilizes a function's `name` property when generating a stack trace.\n Object.defineProperty(RunInRootFrame.DetermineComponentFrameRoot, // Configurable properties can be updated even if its writable descriptor\n // is set to `false`.\n // $FlowFixMe[cannot-write]\n 'name', {\n value: 'DetermineComponentFrameRoot'\n });\n }\n\n try {\n var _RunInRootFrame$Deter = RunInRootFrame.DetermineComponentFrameRoot(),\n sampleStack = _RunInRootFrame$Deter[0],\n controlStack = _RunInRootFrame$Deter[1];\n\n if (sampleStack && controlStack) {\n // This extracts the first frame from the sample that isn't also in the control.\n // Skipping one frame that we assume is the frame that calls the two.\n var sampleLines = sampleStack.split('\\n');\n var controlLines = controlStack.split('\\n');\n var s = 0;\n var c = 0;\n\n while (s < sampleLines.length && !sampleLines[s].includes('DetermineComponentFrameRoot')) {\n s++;\n }\n\n while (c < controlLines.length && !controlLines[c].includes('DetermineComponentFrameRoot')) {\n c++;\n } // We couldn't find our intentionally injected common root frame, attempt\n // to find another common root frame by search from the bottom of the\n // control stack...\n\n\n if (s === sampleLines.length || c === controlLines.length) {\n s = sampleLines.length - 1;\n c = controlLines.length - 1;\n\n while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {\n // We expect at least one stack frame to be shared.\n // Typically this will be the root most one. However, stack frames may be\n // cut off due to maximum stack limits. In this case, one maybe cut off\n // earlier than the other. We assume that the sample is longer or the same\n // and there for cut off earlier. So we should find the root most frame in\n // the sample somewhere in the control.\n c--;\n }\n }\n\n for (; s >= 1 && c >= 0; s--, c--) {\n // Next we find the first one that isn't the same which should be the\n // frame that called our sample function and the control.\n if (sampleLines[s] !== controlLines[c]) {\n // In V8, the first line is describing the message but other VMs don't.\n // If we're about to return the first line, and the control is also on the same\n // line, that's a pretty good indicator that our sample threw at same line as\n // the control. I.e. before we entered the sample frame. So we ignore this result.\n // This can happen if you passed a class to function component, or non-function.\n if (s !== 1 || c !== 1) {\n do {\n s--;\n c--; // We may still have similar intermediate frames from the construct call.\n // The next one that isn't the same should be our match though.\n\n if (c < 0 || sampleLines[s] !== controlLines[c]) {\n // V8 adds a \"new\" prefix for native classes. Let's remove it to make it prettier.\n var _frame = '\\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled \"<anonymous>\"\n // but we have a user-provided \"displayName\"\n // splice it in to make the stack more readable.\n\n\n if (fn.displayName && _frame.includes('<anonymous>')) {\n _frame = _frame.replace('<anonymous>', fn.displayName);\n }\n\n if (true) {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, _frame);\n }\n } // Return the line we found.\n\n\n return _frame;\n }\n } while (s >= 1 && c >= 0);\n }\n\n break;\n }\n }\n }\n } finally {\n reentry = false;\n\n {\n ReactCurrentDispatcher$1.current = previousDispatcher;\n reenableLogs();\n }\n\n Error.prepareStackTrace = previousPrepareStackTrace;\n } // Fallback to just using the name if we couldn't make it throw.\n\n\n var name = fn ? fn.displayName || fn.name : '';\n var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';\n\n {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, syntheticFrame);\n }\n }\n\n return syntheticFrame;\n}\n\nfunction describeClassComponentFrame(ctor, ownerFn) {\n {\n return describeNativeComponentFrame(ctor, true);\n }\n}\nfunction describeFunctionComponentFrame(fn, ownerFn) {\n {\n return describeNativeComponentFrame(fn, false);\n }\n}\n\nfunction getStackByComponentStackNode(componentStack) {\n try {\n var info = '';\n var node = componentStack;\n\n do {\n switch (node.tag) {\n case 0:\n info += describeBuiltInComponentFrame(node.type, null);\n break;\n\n case 1:\n info += describeFunctionComponentFrame(node.type, null);\n break;\n\n case 2:\n info += describeClassComponentFrame(node.type, null);\n break;\n } // $FlowFixMe[incompatible-type] we bail out when we get a null\n\n\n node = node.parent;\n } while (node);\n\n return info;\n } catch (x) {\n return '\\nError generating stack: ' + x.message + '\\n' + x.stack;\n }\n}\n\nvar ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;\nvar ReactCurrentCache = ReactSharedInternals.ReactCurrentCache;\nvar ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; // Linked list representing the identity of a component given the component/tag name and key.\n// The name might be minified but we assume that it's going to be the same generated name. Typically\n// because it's just the same compiled output in practice.\n// resume with segmentID at the index\n\nvar CLIENT_RENDERED = 4; // if it errors or infinitely suspends\n\nvar PENDING = 0;\nvar COMPLETED = 1;\nvar FLUSHED = 2;\nvar ABORTED = 3;\nvar ERRORED = 4;\nvar POSTPONED = 5;\nvar OPEN = 0;\nvar CLOSING = 1;\nvar CLOSED = 2; // This is a default heuristic for how to split up the HTML content into progressive\n// loading. Our goal is to be able to display additional new content about every 500ms.\n// Faster than that is unnecessary and should be throttled on the client. It also\n// adds unnecessary overhead to do more splits. We don't know if it's a higher or lower\n// end device but higher end suffer less from the overhead than lower end does from\n// not getting small enough pieces. We error on the side of low end.\n// We base this on low end 3G speeds which is about 500kbits per second. We assume\n// that there can be a reasonable drop off from max bandwidth which leaves you with\n// as little as 80%. We can receive half of that each 500ms - at best. In practice,\n// a little bandwidth is lost to processing and contention - e.g. CSS and images that\n// are downloaded along with the main content. So we estimate about half of that to be\n// the lower end throughput. In other words, we expect that you can at least show\n// about 12.5kb of content per 500ms. Not counting starting latency for the first\n// paint.\n// 500 * 1024 / 8 * .8 * 0.5 / 2\n\nvar DEFAULT_PROGRESSIVE_CHUNK_SIZE = 12800;\n\nfunction defaultErrorHandler(error) {\n console['error'](error); // Don't transform to our wrapper\n\n return null;\n}\n\nfunction noop() {}\n\nfunction createRequest(children, resumableState, renderState, rootFormatContext, progressiveChunkSize, onError, onAllReady, onShellReady, onShellError, onFatalError, onPostpone, formState) {\n var pingedTasks = [];\n var abortSet = new Set();\n var request = {\n destination: null,\n flushScheduled: false,\n resumableState: resumableState,\n renderState: renderState,\n rootFormatContext: rootFormatContext,\n progressiveChunkSize: progressiveChunkSize === undefined ? DEFAULT_PROGRESSIVE_CHUNK_SIZE : progressiveChunkSize,\n status: OPEN,\n fatalError: null,\n nextSegmentId: 0,\n allPendingTasks: 0,\n pendingRootTasks: 0,\n completedRootSegment: null,\n abortableTasks: abortSet,\n pingedTasks: pingedTasks,\n clientRenderedBoundaries: [],\n completedBoundaries: [],\n partialBoundaries: [],\n trackedPostpones: null,\n onError: onError === undefined ? defaultErrorHandler : onError,\n onPostpone: onPostpone === undefined ? noop : onPostpone,\n onAllReady: onAllReady === undefined ? noop : onAllReady,\n onShellReady: onShellReady === undefined ? noop : onShellReady,\n onShellError: onShellError === undefined ? noop : onShellError,\n onFatalError: onFatalError === undefined ? noop : onFatalError,\n formState: formState === undefined ? null : formState\n }; // This segment represents the root fallback.\n\n var rootSegment = createPendingSegment(request, 0, null, rootFormatContext, // Root segments are never embedded in Text on either edge\n false, false); // There is no parent so conceptually, we're unblocked to flush this segment.\n\n rootSegment.parentFlushed = true;\n var rootTask = createRenderTask(request, null, children, -1, null, rootSegment, null, abortSet, null, rootFormatContext, emptyContextObject, rootContextSnapshot, emptyTreeContext, null, false);\n pingedTasks.push(rootTask);\n return request;\n}\nvar currentRequest = null;\nfunction resolveRequest() {\n if (currentRequest) return currentRequest;\n\n return null;\n}\n\nfunction pingTask(request, task) {\n var pingedTasks = request.pingedTasks;\n pingedTasks.push(task);\n\n if (request.pingedTasks.length === 1) {\n request.flushScheduled = request.destination !== null;\n scheduleWork(function () {\n return performWork(request);\n });\n }\n}\n\nfunction createSuspenseBoundary(request, fallbackAbortableTasks) {\n return {\n status: PENDING,\n rootSegmentID: -1,\n parentFlushed: false,\n pendingTasks: 0,\n completedSegments: [],\n byteSize: 0,\n fallbackAbortableTasks: fallbackAbortableTasks,\n errorDigest: null,\n contentState: createHoistableState(),\n fallbackState: createHoistableState(),\n trackedContentKeyPath: null,\n trackedFallbackNode: null\n };\n}\n\nfunction createRenderTask(request, thenableState, node, childIndex, blockedBoundary, blockedSegment, hoistableState, abortSet, keyPath, formatContext, legacyContext, context, treeContext, componentStack, isFallback) {\n request.allPendingTasks++;\n\n if (blockedBoundary === null) {\n request.pendingRootTasks++;\n } else {\n blockedBoundary.pendingTasks++;\n }\n\n var task = {\n replay: null,\n node: node,\n childIndex: childIndex,\n ping: function () {\n return pingTask(request, task);\n },\n blockedBoundary: blockedBoundary,\n blockedSegment: blockedSegment,\n hoistableState: hoistableState,\n abortSet: abortSet,\n keyPath: keyPath,\n formatContext: formatContext,\n legacyContext: legacyContext,\n context: context,\n treeContext: treeContext,\n componentStack: componentStack,\n thenableState: thenableState,\n isFallback: isFallback\n };\n abortSet.add(task);\n return task;\n}\n\nfunction createReplayTask(request, thenableState, replay, node, childIndex, blockedBoundary, hoistableState, abortSet, keyPath, formatContext, legacyContext, context, treeContext, componentStack, isFallback) {\n request.allPendingTasks++;\n\n if (blockedBoundary === null) {\n request.pendingRootTasks++;\n } else {\n blockedBoundary.pendingTasks++;\n }\n\n replay.pendingTasks++;\n var task = {\n replay: replay,\n node: node,\n childIndex: childIndex,\n ping: function () {\n return pingTask(request, task);\n },\n blockedBoundary: blockedBoundary,\n blockedSegment: null,\n hoistableState: hoistableState,\n abortSet: abortSet,\n keyPath: keyPath,\n formatContext: formatContext,\n legacyContext: legacyContext,\n context: context,\n treeContext: treeContext,\n componentStack: componentStack,\n thenableState: thenableState,\n isFallback: isFallback\n };\n abortSet.add(task);\n return task;\n}\n\nfunction createPendingSegment(request, index, boundary, parentFormatContext, lastPushedText, textEmbedded) {\n return {\n status: PENDING,\n id: -1,\n // lazily assigned later\n index: index,\n parentFlushed: false,\n chunks: [],\n children: [],\n parentFormatContext: parentFormatContext,\n boundary: boundary,\n lastPushedText: lastPushedText,\n textEmbedded: textEmbedded\n };\n} // DEV-only global reference to the currently executing task\n\n\nvar currentTaskInDEV = null;\n\nfunction getCurrentStackInDEV() {\n {\n if (currentTaskInDEV === null || currentTaskInDEV.componentStack === null) {\n return '';\n }\n\n return getStackByComponentStackNode(currentTaskInDEV.componentStack);\n }\n}\n\nfunction getStackFromNode(stackNode) {\n return getStackByComponentStackNode(stackNode);\n}\n\nfunction createBuiltInComponentStack(task, type) {\n return {\n tag: 0,\n parent: task.componentStack,\n type: type\n };\n}\n\nfunction createFunctionComponentStack(task, type) {\n return {\n tag: 1,\n parent: task.componentStack,\n type: type\n };\n}\n\nfunction createClassComponentStack(task, type) {\n return {\n tag: 2,\n parent: task.componentStack,\n type: type\n };\n} // While we track component stacks in prod all the time we only produce a reified stack in dev and\n// during prerender in Prod. The reason for this is that the stack is useful for prerender where the timeliness\n// of the request is less critical than the observability of the execution. For renders and resumes however we\n// prioritize speed of the request.\n\n\nfunction getThrownInfo(request, node) {\n if (node && ( // Always produce a stack in dev\n true )) {\n return {\n componentStack: getStackFromNode(node)\n };\n } else {\n return {};\n }\n}\n\nfunction encodeErrorForBoundary(boundary, digest, error, thrownInfo) {\n boundary.errorDigest = digest;\n\n {\n var message; // In dev we additionally encode the error message and component stack on the boundary\n\n if (error instanceof Error) {\n // eslint-disable-next-line react-internal/safe-string-coercion\n message = String(error.message);\n } else if (typeof error === 'object' && error !== null) {\n message = describeObjectForErrorMessage(error);\n } else {\n // eslint-disable-next-line react-internal/safe-string-coercion\n message = String(error);\n }\n\n boundary.errorMessage = message;\n boundary.errorComponentStack = thrownInfo.componentStack;\n }\n}\n\nfunction logRecoverableError(request, error$1, errorInfo) {\n // If this callback errors, we intentionally let that error bubble up to become a fatal error\n // so that someone fixes the error reporting instead of hiding it.\n var errorDigest = request.onError(error$1, errorInfo);\n\n if (errorDigest != null && typeof errorDigest !== 'string') {\n // We used to throw here but since this gets called from a variety of unprotected places it\n // seems better to just warn and discard the returned value.\n {\n error('onError returned something with a type other than \"string\". onError should return a string and may return null or undefined but must not return anything else. It received something of type \"%s\" instead', typeof errorDigest);\n }\n\n return;\n }\n\n return errorDigest;\n}\n\nfunction fatalError(request, error) {\n // This is called outside error handling code such as if the root errors outside\n // a suspense boundary or if the root suspense boundary's fallback errors.\n // It's also called if React itself or its host configs errors.\n var onShellError = request.onShellError;\n onShellError(error);\n var onFatalError = request.onFatalError;\n onFatalError(error);\n\n if (request.destination !== null) {\n request.status = CLOSED;\n closeWithError(request.destination, error);\n } else {\n request.status = CLOSING;\n request.fatalError = error;\n }\n}\n\nfunction renderSuspenseBoundary(request, someTask, keyPath, props) {\n if (someTask.replay !== null) {\n // If we're replaying through this pass, it means we're replaying through\n // an already completed Suspense boundary. It's too late to do anything about it\n // so we can just render through it.\n var _prevKeyPath = someTask.keyPath;\n someTask.keyPath = keyPath;\n var _content = props.children;\n\n try {\n renderNode(request, someTask, _content, -1);\n } finally {\n someTask.keyPath = _prevKeyPath;\n }\n\n return;\n } // $FlowFixMe: Refined.\n\n\n var task = someTask;\n var previousComponentStack = task.componentStack; // If we end up creating the fallback task we need it to have the correct stack which is\n // the stack for the boundary itself. We stash it here so we can use it if needed later\n\n var suspenseComponentStack = task.componentStack = createBuiltInComponentStack(task, 'Suspense');\n var prevKeyPath = task.keyPath;\n var parentBoundary = task.blockedBoundary;\n var parentHoistableState = task.hoistableState;\n var parentSegment = task.blockedSegment; // Each time we enter a suspense boundary, we split out into a new segment for\n // the fallback so that we can later replace that segment with the content.\n // This also lets us split out the main content even if it doesn't suspend,\n // in case it ends up generating a large subtree of content.\n\n var fallback = props.fallback;\n var content = props.children;\n var fallbackAbortSet = new Set();\n var newBoundary = createSuspenseBoundary(request, fallbackAbortSet);\n\n if (request.trackedPostpones !== null) {\n newBoundary.trackedContentKeyPath = keyPath;\n }\n\n var insertionIndex = parentSegment.chunks.length; // The children of the boundary segment is actually the fallback.\n\n var boundarySegment = createPendingSegment(request, insertionIndex, newBoundary, task.formatContext, // boundaries never require text embedding at their edges because comment nodes bound them\n false, false);\n parentSegment.children.push(boundarySegment); // The parentSegment has a child Segment at this index so we reset the lastPushedText marker on the parent\n\n parentSegment.lastPushedText = false; // This segment is the actual child content. We can start rendering that immediately.\n\n var contentRootSegment = createPendingSegment(request, 0, null, task.formatContext, // boundaries never require text embedding at their edges because comment nodes bound them\n false, false); // We mark the root segment as having its parent flushed. It's not really flushed but there is\n // no parent segment so there's nothing to wait on.\n\n contentRootSegment.parentFlushed = true; // Currently this is running synchronously. We could instead schedule this to pingedTasks.\n // I suspect that there might be some efficiency benefits from not creating the suspended task\n // and instead just using the stack if possible.\n // TODO: Call this directly instead of messing with saving and restoring contexts.\n // We can reuse the current context and task to render the content immediately without\n // context switching. We just need to temporarily switch which boundary and which segment\n // we're writing to. If something suspends, it'll spawn new suspended task with that context.\n\n task.blockedBoundary = newBoundary;\n task.hoistableState = newBoundary.contentState;\n task.blockedSegment = contentRootSegment;\n task.keyPath = keyPath;\n\n try {\n // We use the safe form because we don't handle suspending here. Only error handling.\n renderNode(request, task, content, -1);\n pushSegmentFinale(contentRootSegment.chunks, request.renderState, contentRootSegment.lastPushedText, contentRootSegment.textEmbedded);\n contentRootSegment.status = COMPLETED;\n queueCompletedSegment(newBoundary, contentRootSegment);\n\n if (newBoundary.pendingTasks === 0 && newBoundary.status === PENDING) {\n // This must have been the last segment we were waiting on. This boundary is now complete.\n // Therefore we won't need the fallback. We early return so that we don't have to create\n // the fallback.\n newBoundary.status = COMPLETED; // We are returning early so we need to restore the\n\n task.componentStack = previousComponentStack;\n return;\n }\n } catch (error) {\n contentRootSegment.status = ERRORED;\n newBoundary.status = CLIENT_RENDERED;\n var thrownInfo = getThrownInfo(request, task.componentStack);\n var errorDigest;\n\n {\n errorDigest = logRecoverableError(request, error, thrownInfo);\n }\n\n encodeErrorForBoundary(newBoundary, errorDigest, error, thrownInfo);\n untrackBoundary(request, newBoundary); // We don't need to decrement any task numbers because we didn't spawn any new task.\n // We don't need to schedule any task because we know the parent has written yet.\n // We do need to fallthrough to create the fallback though.\n } finally {\n task.blockedBoundary = parentBoundary;\n task.hoistableState = parentHoistableState;\n task.blockedSegment = parentSegment;\n task.keyPath = prevKeyPath;\n task.componentStack = previousComponentStack;\n }\n\n var fallbackKeyPath = [keyPath[0], 'Suspense Fallback', keyPath[2]];\n var trackedPostpones = request.trackedPostpones;\n\n if (trackedPostpones !== null) {\n // We create a detached replay node to track any postpones inside the fallback.\n var fallbackReplayNode = [fallbackKeyPath[1], fallbackKeyPath[2], [], null];\n trackedPostpones.workingMap.set(fallbackKeyPath, fallbackReplayNode);\n\n if (newBoundary.status === POSTPONED) {\n // This must exist now.\n var boundaryReplayNode = trackedPostpones.workingMap.get(keyPath);\n boundaryReplayNode[4] = fallbackReplayNode;\n } else {\n // We might not inject it into the postponed tree, unless the content actually\n // postpones too. We need to keep track of it until that happpens.\n newBoundary.trackedFallbackNode = fallbackReplayNode;\n }\n } // We create suspended task for the fallback because we don't want to actually work\n // on it yet in case we finish the main content, so we queue for later.\n\n\n var suspendedFallbackTask = createRenderTask(request, null, fallback, -1, parentBoundary, boundarySegment, newBoundary.fallbackState, fallbackAbortSet, fallbackKeyPath, task.formatContext, task.legacyContext, task.context, task.treeContext, // This stack should be the Suspense boundary stack because while the fallback is actually a child segment\n // of the parent boundary from a component standpoint the fallback is a child of the Suspense boundary itself\n suspenseComponentStack, true); // TODO: This should be queued at a separate lower priority queue so that we only work\n // on preparing fallbacks if we don't have any more main content to task on.\n\n request.pingedTasks.push(suspendedFallbackTask);\n}\n\nfunction replaySuspenseBoundary(request, task, keyPath, props, id, childNodes, childSlots, fallbackNodes, fallbackSlots) {\n var previousComponentStack = task.componentStack; // If we end up creating the fallback task we need it to have the correct stack which is\n // the stack for the boundary itself. We stash it here so we can use it if needed later\n\n var suspenseComponentStack = task.componentStack = createBuiltInComponentStack(task, 'Suspense');\n var prevKeyPath = task.keyPath;\n var previousReplaySet = task.replay;\n var parentBoundary = task.blockedBoundary;\n var parentHoistableState = task.hoistableState;\n var content = props.children;\n var fallback = props.fallback;\n var fallbackAbortSet = new Set();\n var resumedBoundary = createSuspenseBoundary(request, fallbackAbortSet);\n resumedBoundary.parentFlushed = true; // We restore the same id of this boundary as was used during prerender.\n\n resumedBoundary.rootSegmentID = id; // We can reuse the current context and task to render the content immediately without\n // context switching. We just need to temporarily switch which boundary and replay node\n // we're writing to. If something suspends, it'll spawn new suspended task with that context.\n\n task.blockedBoundary = resumedBoundary;\n task.hoistableState = resumedBoundary.contentState;\n task.replay = {\n nodes: childNodes,\n slots: childSlots,\n pendingTasks: 1\n };\n\n try {\n // We use the safe form because we don't handle suspending here. Only error handling.\n renderNode(request, task, content, -1);\n\n if (task.replay.pendingTasks === 1 && task.replay.nodes.length > 0) {\n throw new Error(\"Couldn't find all resumable slots by key/index during replaying. \" + \"The tree doesn't match so React will fallback to client rendering.\");\n }\n\n task.replay.pendingTasks--;\n\n if (resumedBoundary.pendingTasks === 0 && resumedBoundary.status === PENDING) {\n // This must have been the last segment we were waiting on. This boundary is now complete.\n // Therefore we won't need the fallback. We early return so that we don't have to create\n // the fallback.\n resumedBoundary.status = COMPLETED;\n request.completedBoundaries.push(resumedBoundary); // We restore the parent componentStack. Semantically this is the same as\n // popComponentStack(task) but we do this instead because it should be slightly\n // faster\n\n return;\n }\n } catch (error) {\n resumedBoundary.status = CLIENT_RENDERED;\n var thrownInfo = getThrownInfo(request, task.componentStack);\n var errorDigest;\n\n {\n errorDigest = logRecoverableError(request, error, thrownInfo);\n }\n\n encodeErrorForBoundary(resumedBoundary, errorDigest, error, thrownInfo);\n task.replay.pendingTasks--; // The parent already flushed in the prerender so we need to schedule this to be emitted.\n\n request.clientRenderedBoundaries.push(resumedBoundary); // We don't need to decrement any task numbers because we didn't spawn any new task.\n // We don't need to schedule any task because we know the parent has written yet.\n // We do need to fallthrough to create the fallback though.\n } finally {\n task.blockedBoundary = parentBoundary;\n task.hoistableState = parentHoistableState;\n task.replay = previousReplaySet;\n task.keyPath = prevKeyPath;\n task.componentStack = previousComponentStack;\n }\n\n var fallbackKeyPath = [keyPath[0], 'Suspense Fallback', keyPath[2]]; // We create suspended task for the fallback because we don't want to actually work\n // on it yet in case we finish the main content, so we queue for later.\n\n var fallbackReplay = {\n nodes: fallbackNodes,\n slots: fallbackSlots,\n pendingTasks: 0\n };\n var suspendedFallbackTask = createReplayTask(request, null, fallbackReplay, fallback, -1, parentBoundary, resumedBoundary.fallbackState, fallbackAbortSet, fallbackKeyPath, task.formatContext, task.legacyContext, task.context, task.treeContext, // This stack should be the Suspense boundary stack because while the fallback is actually a child segment\n // of the parent boundary from a component standpoint the fallback is a child of the Suspense boundary itself\n suspenseComponentStack, true); // TODO: This should be queued at a separate lower priority queue so that we only work\n // on preparing fallbacks if we don't have any more main content to task on.\n\n request.pingedTasks.push(suspendedFallbackTask);\n}\n\nfunction renderHostElement(request, task, keyPath, type, props) {\n var previousComponentStack = task.componentStack;\n task.componentStack = createBuiltInComponentStack(task, type);\n var segment = task.blockedSegment;\n\n if (segment === null) {\n // Replay\n var children = props.children; // TODO: Make this a Config for replaying.\n\n var prevContext = task.formatContext;\n var prevKeyPath = task.keyPath;\n task.formatContext = getChildFormatContext(prevContext, type, props);\n task.keyPath = keyPath; // We use the non-destructive form because if something suspends, we still\n // need to pop back up and finish this subtree of HTML.\n\n renderNode(request, task, children, -1); // We expect that errors will fatal the whole task and that we don't need\n // the correct context. Therefore this is not in a finally.\n\n task.formatContext = prevContext;\n task.keyPath = prevKeyPath;\n } else {\n // Render\n var _children = pushStartInstance(segment.chunks, type, props, request.resumableState, request.renderState, task.hoistableState, task.formatContext, segment.lastPushedText, task.isFallback);\n\n segment.lastPushedText = false;\n var _prevContext = task.formatContext;\n var _prevKeyPath2 = task.keyPath;\n task.formatContext = getChildFormatContext(_prevContext, type, props);\n task.keyPath = keyPath; // We use the non-destructive form because if something suspends, we still\n // need to pop back up and finish this subtree of HTML.\n\n renderNode(request, task, _children, -1); // We expect that errors will fatal the whole task and that we don't need\n // the correct context. Therefore this is not in a finally.\n\n task.formatContext = _prevContext;\n task.keyPath = _prevKeyPath2;\n pushEndInstance(segment.chunks, type, props, request.resumableState, _prevContext);\n segment.lastPushedText = false;\n }\n\n task.componentStack = previousComponentStack;\n}\n\nfunction shouldConstruct(Component) {\n return Component.prototype && Component.prototype.isReactComponent;\n}\n\nfunction renderWithHooks(request, task, keyPath, Component, props, secondArg) {\n // Reset the task's thenable state before continuing, so that if a later\n // component suspends we can reuse the same task object. If the same\n // component suspends again, the thenable state will be restored.\n var prevThenableState = task.thenableState;\n task.thenableState = null;\n var componentIdentity = {};\n prepareToUseHooks(request, task, keyPath, componentIdentity, prevThenableState);\n var result = Component(props, secondArg);\n return finishHooks(Component, props, result, secondArg);\n}\n\nfunction finishClassComponent(request, task, keyPath, instance, Component, props) {\n var nextChildren = instance.render();\n\n {\n if (instance.props !== props) {\n if (!didWarnAboutReassigningProps) {\n error('It looks like %s is reassigning its own `this.props` while rendering. ' + 'This is not supported and can lead to confusing bugs.', getComponentNameFromType(Component) || 'a component');\n }\n\n didWarnAboutReassigningProps = true;\n }\n }\n\n {\n var childContextTypes = Component.childContextTypes;\n\n if (childContextTypes !== null && childContextTypes !== undefined) {\n var previousContext = task.legacyContext;\n var mergedContext = processChildContext(instance, Component, previousContext, childContextTypes);\n task.legacyContext = mergedContext;\n renderNodeDestructive(request, task, nextChildren, -1);\n task.legacyContext = previousContext;\n return;\n }\n }\n\n var prevKeyPath = task.keyPath;\n task.keyPath = keyPath;\n renderNodeDestructive(request, task, nextChildren, -1);\n task.keyPath = prevKeyPath;\n}\n\nfunction renderClassComponent(request, task, keyPath, Component, props) {\n var previousComponentStack = task.componentStack;\n task.componentStack = createClassComponentStack(task, Component);\n var maskedContext = getMaskedContext(Component, task.legacyContext) ;\n var instance = constructClassInstance(Component, props, maskedContext);\n mountClassInstance(instance, Component, props, maskedContext);\n finishClassComponent(request, task, keyPath, instance, Component, props);\n task.componentStack = previousComponentStack;\n}\n\nvar didWarnAboutBadClass = {};\nvar didWarnAboutModulePatternComponent = {};\nvar didWarnAboutContextTypeOnFunctionComponent = {};\nvar didWarnAboutGetDerivedStateOnFunctionComponent = {};\nvar didWarnAboutReassigningProps = false;\nvar didWarnAboutDefaultPropsOnFunctionComponent = {};\nvar didWarnAboutGenerators = false;\nvar didWarnAboutMaps = false; // This would typically be a function component but we still support module pattern\n// components for some reason.\n\nfunction renderIndeterminateComponent(request, task, keyPath, Component, props) {\n var legacyContext;\n\n {\n legacyContext = getMaskedContext(Component, task.legacyContext);\n }\n\n var previousComponentStack = task.componentStack;\n task.componentStack = createFunctionComponentStack(task, Component);\n\n {\n if (Component.prototype && typeof Component.prototype.render === 'function') {\n var componentName = getComponentNameFromType(Component) || 'Unknown';\n\n if (!didWarnAboutBadClass[componentName]) {\n error(\"The <%s /> component appears to have a render method, but doesn't extend React.Component. \" + 'This is likely to cause errors. Change %s to extend React.Component instead.', componentName, componentName);\n\n didWarnAboutBadClass[componentName] = true;\n }\n }\n }\n\n var value = renderWithHooks(request, task, keyPath, Component, props, legacyContext);\n var hasId = checkDidRenderIdHook();\n var formStateCount = getFormStateCount();\n var formStateMatchingIndex = getFormStateMatchingIndex();\n\n {\n // Support for module components is deprecated and is removed behind a flag.\n // Whether or not it would crash later, we want to show a good message in DEV first.\n if (typeof value === 'object' && value !== null && typeof value.render === 'function' && value.$$typeof === undefined) {\n var _componentName = getComponentNameFromType(Component) || 'Unknown';\n\n if (!didWarnAboutModulePatternComponent[_componentName]) {\n error('The <%s /> component appears to be a function component that returns a class instance. ' + 'Change %s to a class that extends React.Component instead. ' + \"If you can't use a class try assigning the prototype on the function as a workaround. \" + \"`%s.prototype = React.Component.prototype`. Don't use an arrow function since it \" + 'cannot be called with `new` by React.', _componentName, _componentName, _componentName);\n\n didWarnAboutModulePatternComponent[_componentName] = true;\n }\n }\n }\n\n if ( // Run these checks in production only if the flag is off.\n // Eventually we'll delete this branch altogether.\n typeof value === 'object' && value !== null && typeof value.render === 'function' && value.$$typeof === undefined) {\n {\n var _componentName2 = getComponentNameFromType(Component) || 'Unknown';\n\n if (!didWarnAboutModulePatternComponent[_componentName2]) {\n error('The <%s /> component appears to be a function component that returns a class instance. ' + 'Change %s to a class that extends React.Component instead. ' + \"If you can't use a class try assigning the prototype on the function as a workaround. \" + \"`%s.prototype = React.Component.prototype`. Don't use an arrow function since it \" + 'cannot be called with `new` by React.', _componentName2, _componentName2, _componentName2);\n\n didWarnAboutModulePatternComponent[_componentName2] = true;\n }\n }\n\n mountClassInstance(value, Component, props, legacyContext);\n finishClassComponent(request, task, keyPath, value, Component, props);\n } else {\n\n {\n validateFunctionComponentInDev(Component);\n }\n\n finishFunctionComponent(request, task, keyPath, value, hasId, formStateCount, formStateMatchingIndex);\n }\n\n task.componentStack = previousComponentStack;\n}\n\nfunction finishFunctionComponent(request, task, keyPath, children, hasId, formStateCount, formStateMatchingIndex) {\n var didEmitFormStateMarkers = false;\n\n if (formStateCount !== 0 && request.formState !== null) {\n // For each useFormState hook, emit a marker that indicates whether we\n // rendered using the form state passed at the root. We only emit these\n // markers if form state is passed at the root.\n var segment = task.blockedSegment;\n\n if (segment === null) ; else {\n didEmitFormStateMarkers = true;\n var target = segment.chunks;\n\n for (var i = 0; i < formStateCount; i++) {\n if (i === formStateMatchingIndex) {\n pushFormStateMarkerIsMatching(target);\n } else {\n pushFormStateMarkerIsNotMatching(target);\n }\n }\n }\n }\n\n var prevKeyPath = task.keyPath;\n task.keyPath = keyPath;\n\n if (hasId) {\n // This component materialized an id. We treat this as its own level, with\n // a single \"child\" slot.\n var prevTreeContext = task.treeContext;\n var totalChildren = 1;\n var index = 0; // Modify the id context. Because we'll need to reset this if something\n // suspends or errors, we'll use the non-destructive render path.\n\n task.treeContext = pushTreeContext(prevTreeContext, totalChildren, index);\n renderNode(request, task, children, -1); // Like the other contexts, this does not need to be in a finally block\n // because renderNode takes care of unwinding the stack.\n\n task.treeContext = prevTreeContext;\n } else if (didEmitFormStateMarkers) {\n // If there were formState hooks, we must use the non-destructive path\n // because this component is not a pure indirection; we emitted markers\n // to the stream.\n renderNode(request, task, children, -1);\n } else {\n // We're now successfully past this task, and we haven't modified the\n // context stack. We don't have to pop back to the previous task every\n // again, so we can use the destructive recursive form.\n renderNodeDestructive(request, task, children, -1);\n }\n\n task.keyPath = prevKeyPath;\n}\n\nfunction validateFunctionComponentInDev(Component) {\n {\n if (Component) {\n if (Component.childContextTypes) {\n error('childContextTypes cannot be defined on a function component.\\n' + ' %s.childContextTypes = ...', Component.displayName || Component.name || 'Component');\n }\n }\n\n if (Component.defaultProps !== undefined) {\n var componentName = getComponentNameFromType(Component) || 'Unknown';\n\n if (!didWarnAboutDefaultPropsOnFunctionComponent[componentName]) {\n error('%s: Support for defaultProps will be removed from function components ' + 'in a future major release. Use JavaScript default parameters instead.', componentName);\n\n didWarnAboutDefaultPropsOnFunctionComponent[componentName] = true;\n }\n }\n\n if (typeof Component.getDerivedStateFromProps === 'function') {\n var _componentName3 = getComponentNameFromType(Component) || 'Unknown';\n\n if (!didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3]) {\n error('%s: Function components do not support getDerivedStateFromProps.', _componentName3);\n\n didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3] = true;\n }\n }\n\n if (typeof Component.contextType === 'object' && Component.contextType !== null) {\n var _componentName4 = getComponentNameFromType(Component) || 'Unknown';\n\n if (!didWarnAboutContextTypeOnFunctionComponent[_componentName4]) {\n error('%s: Function components do not support contextType.', _componentName4);\n\n didWarnAboutContextTypeOnFunctionComponent[_componentName4] = true;\n }\n }\n }\n}\n\nfunction resolveDefaultProps(Component, baseProps) {\n if (Component && Component.defaultProps) {\n // Resolve default props. Taken from ReactElement\n var props = assign({}, baseProps);\n var defaultProps = Component.defaultProps;\n\n for (var propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n\n return props;\n }\n\n return baseProps;\n}\n\nfunction renderForwardRef(request, task, keyPath, type, props, ref) {\n var previousComponentStack = task.componentStack;\n task.componentStack = createFunctionComponentStack(task, type.render);\n var propsWithoutRef;\n\n {\n propsWithoutRef = props;\n }\n\n var children = renderWithHooks(request, task, keyPath, type.render, propsWithoutRef, ref);\n var hasId = checkDidRenderIdHook();\n var formStateCount = getFormStateCount();\n var formStateMatchingIndex = getFormStateMatchingIndex();\n finishFunctionComponent(request, task, keyPath, children, hasId, formStateCount, formStateMatchingIndex);\n task.componentStack = previousComponentStack;\n}\n\nfunction renderMemo(request, task, keyPath, type, props, ref) {\n var innerType = type.type;\n var resolvedProps = resolveDefaultProps(innerType, props);\n renderElement(request, task, keyPath, innerType, resolvedProps, ref);\n}\n\nfunction renderContextConsumer(request, task, keyPath, context, props) {\n var render = props.children;\n\n {\n if (typeof render !== 'function') {\n error('A context consumer was rendered with multiple children, or a child ' + \"that isn't a function. A context consumer expects a single child \" + 'that is a function. If you did pass a function, make sure there ' + 'is no trailing or leading whitespace around it.');\n }\n }\n\n var newValue = readContext$1(context);\n var newChildren = render(newValue);\n var prevKeyPath = task.keyPath;\n task.keyPath = keyPath;\n renderNodeDestructive(request, task, newChildren, -1);\n task.keyPath = prevKeyPath;\n}\n\nfunction renderContextProvider(request, task, keyPath, context, props) {\n var value = props.value;\n var children = props.children;\n var prevSnapshot;\n\n {\n prevSnapshot = task.context;\n }\n\n var prevKeyPath = task.keyPath;\n task.context = pushProvider(context, value);\n task.keyPath = keyPath;\n renderNodeDestructive(request, task, children, -1);\n task.context = popProvider(context);\n task.keyPath = prevKeyPath;\n\n {\n if (prevSnapshot !== task.context) {\n error('Popping the context provider did not return back to the original snapshot. This is a bug in React.');\n }\n }\n}\n\nfunction renderLazyComponent(request, task, keyPath, lazyComponent, props, ref) {\n var previousComponentStack = task.componentStack;\n task.componentStack = createBuiltInComponentStack(task, 'Lazy');\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n var Component = init(payload);\n var resolvedProps = resolveDefaultProps(Component, props);\n renderElement(request, task, keyPath, Component, resolvedProps, ref);\n task.componentStack = previousComponentStack;\n}\n\nfunction renderOffscreen(request, task, keyPath, props) {\n var mode = props.mode;\n\n if (mode === 'hidden') ; else {\n // A visible Offscreen boundary is treated exactly like a fragment: a\n // pure indirection.\n var prevKeyPath = task.keyPath;\n task.keyPath = keyPath;\n renderNodeDestructive(request, task, props.children, -1);\n task.keyPath = prevKeyPath;\n }\n}\n\nfunction renderElement(request, task, keyPath, type, props, ref) {\n if (typeof type === 'function') {\n if (shouldConstruct(type)) {\n renderClassComponent(request, task, keyPath, type, props);\n return;\n } else {\n renderIndeterminateComponent(request, task, keyPath, type, props);\n return;\n }\n }\n\n if (typeof type === 'string') {\n renderHostElement(request, task, keyPath, type, props);\n return;\n }\n\n switch (type) {\n // LegacyHidden acts the same as a fragment. This only works because we\n // currently assume that every instance of LegacyHidden is accompanied by a\n // host component wrapper. In the hidden mode, the host component is given a\n // `hidden` attribute, which ensures that the initial HTML is not visible.\n // To support the use of LegacyHidden as a true fragment, without an extra\n // DOM node, we would have to hide the initial HTML in some other way.\n // TODO: Delete in LegacyHidden. It's an unstable API only used in the\n // www build. As a migration step, we could add a special prop to Offscreen\n // that simulates the old behavior (no hiding, no change to effects).\n case REACT_LEGACY_HIDDEN_TYPE:\n case REACT_DEBUG_TRACING_MODE_TYPE:\n case REACT_STRICT_MODE_TYPE:\n case REACT_PROFILER_TYPE:\n case REACT_FRAGMENT_TYPE:\n {\n var prevKeyPath = task.keyPath;\n task.keyPath = keyPath;\n renderNodeDestructive(request, task, props.children, -1);\n task.keyPath = prevKeyPath;\n return;\n }\n\n case REACT_OFFSCREEN_TYPE:\n {\n renderOffscreen(request, task, keyPath, props);\n return;\n }\n\n case REACT_SUSPENSE_LIST_TYPE:\n {\n var preiousComponentStack = task.componentStack;\n task.componentStack = createBuiltInComponentStack(task, 'SuspenseList'); // TODO: SuspenseList should control the boundaries.\n\n var _prevKeyPath3 = task.keyPath;\n task.keyPath = keyPath;\n renderNodeDestructive(request, task, props.children, -1);\n task.keyPath = _prevKeyPath3;\n task.componentStack = preiousComponentStack;\n return;\n }\n\n case REACT_SCOPE_TYPE:\n {\n\n throw new Error('ReactDOMServer does not yet support scope components.');\n }\n\n case REACT_SUSPENSE_TYPE:\n {\n {\n renderSuspenseBoundary(request, task, keyPath, props);\n }\n\n return;\n }\n }\n\n if (typeof type === 'object' && type !== null) {\n switch (type.$$typeof) {\n case REACT_FORWARD_REF_TYPE:\n {\n renderForwardRef(request, task, keyPath, type, props, ref);\n return;\n }\n\n case REACT_MEMO_TYPE:\n {\n renderMemo(request, task, keyPath, type, props, ref);\n return;\n }\n\n case REACT_PROVIDER_TYPE:\n {\n {\n var context = type._context;\n renderContextProvider(request, task, keyPath, context, props);\n return;\n } // Fall through\n\n }\n\n case REACT_CONTEXT_TYPE:\n {\n {\n var _context2 = type;\n\n {\n if (_context2._context !== undefined) {\n _context2 = _context2._context;\n }\n }\n\n renderContextConsumer(request, task, keyPath, _context2, props);\n return;\n }\n }\n\n case REACT_CONSUMER_TYPE:\n\n case REACT_LAZY_TYPE:\n {\n renderLazyComponent(request, task, keyPath, type, props);\n return;\n }\n }\n }\n\n var info = '';\n\n {\n if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {\n info += ' You likely forgot to export your component from the file ' + \"it's defined in, or you might have mixed up default and \" + 'named imports.';\n }\n }\n\n throw new Error('Element type is invalid: expected a string (for built-in ' + 'components) or a class/function (for composite components) ' + (\"but got: \" + (type == null ? type : typeof type) + \".\" + info));\n}\n\nfunction resumeNode(request, task, segmentId, node, childIndex) {\n var prevReplay = task.replay;\n var blockedBoundary = task.blockedBoundary;\n var resumedSegment = createPendingSegment(request, 0, null, task.formatContext, false, false);\n resumedSegment.id = segmentId;\n resumedSegment.parentFlushed = true;\n\n try {\n // Convert the current ReplayTask to a RenderTask.\n var renderTask = task;\n renderTask.replay = null;\n renderTask.blockedSegment = resumedSegment;\n renderNode(request, task, node, childIndex);\n resumedSegment.status = COMPLETED;\n\n if (blockedBoundary === null) {\n request.completedRootSegment = resumedSegment;\n } else {\n queueCompletedSegment(blockedBoundary, resumedSegment);\n\n if (blockedBoundary.parentFlushed) {\n request.partialBoundaries.push(blockedBoundary);\n }\n }\n } finally {\n // Restore to a ReplayTask.\n task.replay = prevReplay;\n task.blockedSegment = null;\n }\n}\n\nfunction replayElement(request, task, keyPath, name, keyOrIndex, childIndex, type, props, ref, replay) {\n // We're replaying. Find the path to follow.\n var replayNodes = replay.nodes;\n\n for (var i = 0; i < replayNodes.length; i++) {\n // Flow doesn't support refinement on tuples so we do it manually here.\n var node = replayNodes[i];\n\n if (keyOrIndex !== node[1]) {\n continue;\n }\n\n if (node.length === 4) {\n // Matched a replayable path.\n // Let's double check that the component name matches as a precaution.\n if (name !== null && name !== node[0]) {\n throw new Error('Expected the resume to render <' + node[0] + '> in this slot but instead it rendered <' + name + '>. ' + \"The tree doesn't match so React will fallback to client rendering.\");\n }\n\n var childNodes = node[2];\n var childSlots = node[3];\n var currentNode = task.node;\n task.replay = {\n nodes: childNodes,\n slots: childSlots,\n pendingTasks: 1\n };\n\n try {\n renderElement(request, task, keyPath, type, props, ref);\n\n if (task.replay.pendingTasks === 1 && task.replay.nodes.length > 0 // TODO check remaining slots\n ) {\n throw new Error(\"Couldn't find all resumable slots by key/index during replaying. \" + \"The tree doesn't match so React will fallback to client rendering.\");\n }\n\n task.replay.pendingTasks--;\n } catch (x) {\n if (typeof x === 'object' && x !== null && (x === SuspenseException || typeof x.then === 'function')) {\n // Suspend\n if (task.node === currentNode) {\n // This same element suspended so we need to pop the replay we just added.\n task.replay = replay;\n }\n\n throw x;\n }\n\n task.replay.pendingTasks--; // Unlike regular render, we don't terminate the siblings if we error\n // during a replay. That's because this component didn't actually error\n // in the original prerender. What's unable to complete is the child\n // replay nodes which might be Suspense boundaries which are able to\n // absorb the error and we can still continue with siblings.\n\n var thrownInfo = getThrownInfo(request, task.componentStack);\n erroredReplay(request, task.blockedBoundary, x, thrownInfo, childNodes, childSlots);\n }\n\n task.replay = replay;\n } else {\n // Let's double check that the component type matches.\n if (type !== REACT_SUSPENSE_TYPE) {\n var expectedType = 'Suspense';\n throw new Error('Expected the resume to render <' + expectedType + '> in this slot but instead it rendered <' + (getComponentNameFromType(type) || 'Unknown') + '>. ' + \"The tree doesn't match so React will fallback to client rendering.\");\n } // Matched a replayable path.\n\n\n replaySuspenseBoundary(request, task, keyPath, props, node[5], node[2], node[3], node[4] === null ? [] : node[4][2], node[4] === null ? null : node[4][3]);\n } // We finished rendering this node, so now we can consume this\n // slot. This must happen after in case we rerender this task.\n\n\n replayNodes.splice(i, 1);\n return;\n } // We didn't find any matching nodes. We assume that this element was already\n // rendered in the prelude and skip it.\n\n} // $FlowFixMe[missing-local-annot]\n\n\nfunction validateIterable(iterable, iteratorFn) {\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && iterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (iterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n }\n }\n}\n\nfunction warnOnFunctionType(invalidChild) {\n {\n var name = invalidChild.displayName || invalidChild.name || 'Component';\n\n error('Functions are not valid as a React child. This may happen if ' + 'you return %s instead of <%s /> from render. ' + 'Or maybe you meant to call this function rather than return it.', name, name);\n }\n}\n\nfunction warnOnSymbolType(invalidChild) {\n {\n // eslint-disable-next-line react-internal/safe-string-coercion\n var name = String(invalidChild);\n\n error('Symbols are not valid as a React child.\\n' + ' %s', name);\n }\n} // This function by it self renders a node and consumes the task by mutating it\n// to update the current execution state.\n\n\nfunction renderNodeDestructive(request, task, node, childIndex) {\n if (task.replay !== null && typeof task.replay.slots === 'number') {\n // TODO: Figure out a cheaper place than this hot path to do this check.\n var resumeSegmentID = task.replay.slots;\n resumeNode(request, task, resumeSegmentID, node, childIndex);\n return;\n } // Stash the node we're working on. We'll pick up from this task in case\n // something suspends.\n\n\n task.node = node;\n task.childIndex = childIndex;\n\n if (node === null) {\n return;\n } // Handle object types\n\n\n if (typeof node === 'object') {\n switch (node.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var element = node;\n var type = element.type;\n var key = element.key;\n var props = element.props;\n var ref;\n\n {\n ref = element.ref;\n }\n\n var name = getComponentNameFromType(type);\n var keyOrIndex = key == null ? childIndex === -1 ? 0 : childIndex : key;\n var keyPath = [task.keyPath, name, keyOrIndex];\n\n if (task.replay !== null) {\n replayElement(request, task, keyPath, name, keyOrIndex, childIndex, type, props, ref, task.replay); // No matches found for this node. We assume it's already emitted in the\n // prelude and skip it during the replay.\n } else {\n // We're doing a plain render.\n renderElement(request, task, keyPath, type, props, ref);\n }\n\n return;\n }\n\n case REACT_PORTAL_TYPE:\n throw new Error('Portals are not currently supported by the server renderer. ' + 'Render them conditionally so that they only appear on the client render.');\n\n case REACT_LAZY_TYPE:\n {\n var previousComponentStack = task.componentStack;\n task.componentStack = createBuiltInComponentStack(task, 'Lazy');\n var lazyNode = node;\n var payload = lazyNode._payload;\n var init = lazyNode._init;\n var resolvedNode = init(payload); // We restore the stack before rendering the resolved node because once the Lazy\n // has resolved any future errors\n\n task.componentStack = previousComponentStack; // Now we render the resolved node\n\n renderNodeDestructive(request, task, resolvedNode, childIndex);\n return;\n }\n }\n\n if (isArray(node)) {\n renderChildrenArray(request, task, node, childIndex);\n return;\n }\n\n var iteratorFn = getIteratorFn(node);\n\n if (iteratorFn) {\n {\n validateIterable(node, iteratorFn);\n }\n\n var iterator = iteratorFn.call(node);\n\n if (iterator) {\n // We need to know how many total children are in this set, so that we\n // can allocate enough id slots to acommodate them. So we must exhaust\n // the iterator before we start recursively rendering the children.\n // TODO: This is not great but I think it's inherent to the id\n // generation algorithm.\n var step = iterator.next(); // If there are not entries, we need to push an empty so we start by checking that.\n\n if (!step.done) {\n var children = [];\n\n do {\n children.push(step.value);\n step = iterator.next();\n } while (!step.done);\n\n renderChildrenArray(request, task, children, childIndex);\n return;\n }\n\n return;\n }\n } // Usables are a valid React node type. When React encounters a Usable in\n // a child position, it unwraps it using the same algorithm as `use`. For\n // example, for promises, React will throw an exception to unwind the\n // stack, then replay the component once the promise resolves.\n //\n // A difference from `use` is that React will keep unwrapping the value\n // until it reaches a non-Usable type.\n //\n // e.g. Usable<Usable<Usable<T>>> should resolve to T\n\n\n var maybeUsable = node;\n\n if (typeof maybeUsable.then === 'function') {\n // Clear any previous thenable state that was created by the unwrapping.\n task.thenableState = null;\n var thenable = maybeUsable;\n return renderNodeDestructive(request, task, unwrapThenable(thenable), childIndex);\n }\n\n if (maybeUsable.$$typeof === REACT_CONTEXT_TYPE) {\n var context = maybeUsable;\n return renderNodeDestructive(request, task, readContext$1(context), childIndex);\n } // $FlowFixMe[method-unbinding]\n\n\n var childString = Object.prototype.toString.call(node);\n throw new Error(\"Objects are not valid as a React child (found: \" + (childString === '[object Object]' ? 'object with keys {' + Object.keys(node).join(', ') + '}' : childString) + \"). \" + 'If you meant to render a collection of children, use an array ' + 'instead.');\n }\n\n if (typeof node === 'string') {\n var segment = task.blockedSegment;\n\n if (segment === null) ; else {\n segment.lastPushedText = pushTextInstance(segment.chunks, node, request.renderState, segment.lastPushedText);\n }\n\n return;\n }\n\n if (typeof node === 'number' || enableBigIntSupport ) {\n var _segment = task.blockedSegment;\n\n if (_segment === null) ; else {\n _segment.lastPushedText = pushTextInstance(_segment.chunks, '' + node, request.renderState, _segment.lastPushedText);\n }\n\n return;\n }\n\n {\n if (typeof node === 'function') {\n warnOnFunctionType(node);\n }\n\n if (typeof node === 'symbol') {\n warnOnSymbolType(node);\n }\n }\n}\n\nfunction replayFragment(request, task, children, childIndex) {\n // If we're supposed follow this array, we'd expect to see a ReplayNode matching\n // this fragment.\n var replay = task.replay;\n var replayNodes = replay.nodes;\n\n for (var j = 0; j < replayNodes.length; j++) {\n var node = replayNodes[j];\n\n if (node[1] !== childIndex) {\n continue;\n } // Matched a replayable path.\n\n\n var childNodes = node[2];\n var childSlots = node[3];\n task.replay = {\n nodes: childNodes,\n slots: childSlots,\n pendingTasks: 1\n };\n\n try {\n renderChildrenArray(request, task, children, -1);\n\n if (task.replay.pendingTasks === 1 && task.replay.nodes.length > 0) {\n throw new Error(\"Couldn't find all resumable slots by key/index during replaying. \" + \"The tree doesn't match so React will fallback to client rendering.\");\n }\n\n task.replay.pendingTasks--;\n } catch (x) {\n if (typeof x === 'object' && x !== null && (x === SuspenseException || typeof x.then === 'function')) {\n // Suspend\n throw x;\n }\n\n task.replay.pendingTasks--; // Unlike regular render, we don't terminate the siblings if we error\n // during a replay. That's because this component didn't actually error\n // in the original prerender. What's unable to complete is the child\n // replay nodes which might be Suspense boundaries which are able to\n // absorb the error and we can still continue with siblings.\n // This is an error, stash the component stack if it is null.\n\n var thrownInfo = getThrownInfo(request, task.componentStack);\n erroredReplay(request, task.blockedBoundary, x, thrownInfo, childNodes, childSlots);\n }\n\n task.replay = replay; // We finished rendering this node, so now we can consume this\n // slot. This must happen after in case we rerender this task.\n\n replayNodes.splice(j, 1);\n break;\n }\n}\n\nfunction renderChildrenArray(request, task, children, childIndex) {\n var prevKeyPath = task.keyPath;\n\n if (childIndex !== -1) {\n task.keyPath = [task.keyPath, 'Fragment', childIndex];\n\n if (task.replay !== null) {\n replayFragment(request, // $FlowFixMe: Refined.\n task, children, childIndex);\n task.keyPath = prevKeyPath;\n return;\n }\n }\n\n var prevTreeContext = task.treeContext;\n var totalChildren = children.length;\n\n if (task.replay !== null) {\n // Replay\n // First we need to check if we have any resume slots at this level.\n var resumeSlots = task.replay.slots;\n\n if (resumeSlots !== null && typeof resumeSlots === 'object') {\n for (var i = 0; i < totalChildren; i++) {\n var node = children[i];\n task.treeContext = pushTreeContext(prevTreeContext, totalChildren, i); // We need to use the non-destructive form so that we can safely pop back\n // up and render the sibling if something suspends.\n\n var resumeSegmentID = resumeSlots[i]; // TODO: If this errors we should still continue with the next sibling.\n\n if (typeof resumeSegmentID === 'number') {\n resumeNode(request, task, resumeSegmentID, node, i); // We finished rendering this node, so now we can consume this\n // slot. This must happen after in case we rerender this task.\n\n delete resumeSlots[i];\n } else {\n renderNode(request, task, node, i);\n }\n }\n\n task.treeContext = prevTreeContext;\n task.keyPath = prevKeyPath;\n return;\n }\n }\n\n for (var _i = 0; _i < totalChildren; _i++) {\n var _node = children[_i];\n task.treeContext = pushTreeContext(prevTreeContext, totalChildren, _i); // We need to use the non-destructive form so that we can safely pop back\n // up and render the sibling if something suspends.\n\n renderNode(request, task, _node, _i);\n } // Because this context is always set right before rendering every child, we\n // only need to reset it to the previous value at the very end.\n\n\n task.treeContext = prevTreeContext;\n task.keyPath = prevKeyPath;\n}\n// resume it.\n\n\nfunction untrackBoundary(request, boundary) {\n var trackedPostpones = request.trackedPostpones;\n\n if (trackedPostpones === null) {\n return;\n }\n\n var boundaryKeyPath = boundary.trackedContentKeyPath;\n\n if (boundaryKeyPath === null) {\n return;\n }\n\n var boundaryNode = trackedPostpones.workingMap.get(boundaryKeyPath);\n\n if (boundaryNode === undefined) {\n return;\n } // Downgrade to plain ReplayNode since we won't replay through it.\n // $FlowFixMe[cannot-write]: We intentionally downgrade this to the other tuple.\n\n\n boundaryNode.length = 4; // Remove any resumable slots.\n\n boundaryNode[2] = [];\n boundaryNode[3] = null; // TODO: We should really just remove the boundary from all parent paths too so\n // we don't replay the path to it.\n}\n\nfunction spawnNewSuspendedReplayTask(request, task, thenableState, x) {\n var newTask = createReplayTask(request, thenableState, task.replay, task.node, task.childIndex, task.blockedBoundary, task.hoistableState, task.abortSet, task.keyPath, task.formatContext, task.legacyContext, task.context, task.treeContext, // We pop one task off the stack because the node that suspended will be tried again,\n // which will add it back onto the stack.\n task.componentStack !== null ? task.componentStack.parent : null, task.isFallback);\n var ping = newTask.ping;\n x.then(ping, ping);\n}\n\nfunction spawnNewSuspendedRenderTask(request, task, thenableState, x) {\n // Something suspended, we'll need to create a new segment and resolve it later.\n var segment = task.blockedSegment;\n var insertionIndex = segment.chunks.length;\n var newSegment = createPendingSegment(request, insertionIndex, null, task.formatContext, // Adopt the parent segment's leading text embed\n segment.lastPushedText, // Assume we are text embedded at the trailing edge\n true);\n segment.children.push(newSegment); // Reset lastPushedText for current Segment since the new Segment \"consumed\" it\n\n segment.lastPushedText = false;\n var newTask = createRenderTask(request, thenableState, task.node, task.childIndex, task.blockedBoundary, newSegment, task.hoistableState, task.abortSet, task.keyPath, task.formatContext, task.legacyContext, task.context, task.treeContext, // We pop one task off the stack because the node that suspended will be tried again,\n // which will add it back onto the stack.\n task.componentStack !== null ? task.componentStack.parent : null, task.isFallback);\n var ping = newTask.ping;\n x.then(ping, ping);\n} // This is a non-destructive form of rendering a node. If it suspends it spawns\n// a new task and restores the context of this task to what it was before.\n\n\nfunction renderNode(request, task, node, childIndex) {\n // Snapshot the current context in case something throws to interrupt the\n // process.\n var previousFormatContext = task.formatContext;\n var previousLegacyContext = task.legacyContext;\n var previousContext = task.context;\n var previousKeyPath = task.keyPath;\n var previousTreeContext = task.treeContext;\n var previousComponentStack = task.componentStack;\n var x; // Store how much we've pushed at this point so we can reset it in case something\n // suspended partially through writing something.\n\n var segment = task.blockedSegment;\n\n if (segment === null) {\n // Replay\n try {\n return renderNodeDestructive(request, task, node, childIndex);\n } catch (thrownValue) {\n resetHooksState();\n x = thrownValue === SuspenseException ? // This is a special type of exception used for Suspense. For historical\n // reasons, the rest of the Suspense implementation expects the thrown\n // value to be a thenable, because before `use` existed that was the\n // (unstable) API for suspending. This implementation detail can change\n // later, once we deprecate the old API in favor of `use`.\n getSuspendedThenable() : thrownValue;\n\n if (typeof x === 'object' && x !== null) {\n // $FlowFixMe[method-unbinding]\n if (typeof x.then === 'function') {\n var wakeable = x;\n var thenableState = getThenableStateAfterSuspending();\n spawnNewSuspendedReplayTask(request, // $FlowFixMe: Refined.\n task, thenableState, wakeable); // Restore the context. We assume that this will be restored by the inner\n // functions in case nothing throws so we don't use \"finally\" here.\n\n task.formatContext = previousFormatContext;\n task.legacyContext = previousLegacyContext;\n task.context = previousContext;\n task.keyPath = previousKeyPath;\n task.treeContext = previousTreeContext;\n task.componentStack = previousComponentStack; // Restore all active ReactContexts to what they were before.\n\n switchContext(previousContext);\n return;\n }\n } // TODO: Abort any undiscovered Suspense boundaries in the ReplayNode.\n\n }\n } else {\n // Render\n var childrenLength = segment.children.length;\n var chunkLength = segment.chunks.length;\n\n try {\n return renderNodeDestructive(request, task, node, childIndex);\n } catch (thrownValue) {\n resetHooksState(); // Reset the write pointers to where we started.\n\n segment.children.length = childrenLength;\n segment.chunks.length = chunkLength;\n x = thrownValue === SuspenseException ? // This is a special type of exception used for Suspense. For historical\n // reasons, the rest of the Suspense implementation expects the thrown\n // value to be a thenable, because before `use` existed that was the\n // (unstable) API for suspending. This implementation detail can change\n // later, once we deprecate the old API in favor of `use`.\n getSuspendedThenable() : thrownValue;\n\n if (typeof x === 'object' && x !== null) {\n // $FlowFixMe[method-unbinding]\n if (typeof x.then === 'function') {\n var _wakeable = x;\n\n var _thenableState = getThenableStateAfterSuspending();\n\n spawnNewSuspendedRenderTask(request, // $FlowFixMe: Refined.\n task, _thenableState, _wakeable); // Restore the context. We assume that this will be restored by the inner\n // functions in case nothing throws so we don't use \"finally\" here.\n\n task.formatContext = previousFormatContext;\n task.legacyContext = previousLegacyContext;\n task.context = previousContext;\n task.keyPath = previousKeyPath;\n task.treeContext = previousTreeContext;\n task.componentStack = previousComponentStack; // Restore all active ReactContexts to what they were before.\n\n switchContext(previousContext);\n return;\n }\n }\n }\n } // Restore the context. We assume that this will be restored by the inner\n // functions in case nothing throws so we don't use \"finally\" here.\n\n\n task.formatContext = previousFormatContext;\n task.legacyContext = previousLegacyContext;\n task.context = previousContext;\n task.keyPath = previousKeyPath;\n task.treeContext = previousTreeContext; // We intentionally do not restore the component stack on the error pathway\n // Whatever handles the error needs to use this stack which is the location of the\n // error. We must restore the stack wherever we handle this\n // Restore all active ReactContexts to what they were before.\n\n switchContext(previousContext);\n throw x;\n}\n\nfunction erroredReplay(request, boundary, error, errorInfo, replayNodes, resumeSlots) {\n // Erroring during a replay doesn't actually cause an error by itself because\n // that component has already rendered. What causes the error is the resumable\n // points that we did not yet finish which will be below the point of the reset.\n // For example, if we're replaying a path to a Suspense boundary that is not done\n // that doesn't error the parent Suspense boundary.\n // This might be a bit strange that the error in a parent gets thrown at a child.\n // We log it only once and reuse the digest.\n var errorDigest;\n\n {\n errorDigest = logRecoverableError(request, error, errorInfo);\n }\n\n abortRemainingReplayNodes(request, boundary, replayNodes, resumeSlots, error, errorDigest, errorInfo);\n}\n\nfunction erroredTask(request, boundary, error, errorInfo) {\n // Report the error to a global handler.\n var errorDigest;\n\n {\n errorDigest = logRecoverableError(request, error, errorInfo);\n }\n\n if (boundary === null) {\n fatalError(request, error);\n } else {\n boundary.pendingTasks--;\n\n if (boundary.status !== CLIENT_RENDERED) {\n boundary.status = CLIENT_RENDERED;\n encodeErrorForBoundary(boundary, errorDigest, error, errorInfo);\n untrackBoundary(request, boundary); // Regardless of what happens next, this boundary won't be displayed,\n // so we can flush it, if the parent already flushed.\n\n if (boundary.parentFlushed) {\n // We don't have a preference where in the queue this goes since it's likely\n // to error on the client anyway. However, intentionally client-rendered\n // boundaries should be flushed earlier so that they can start on the client.\n // We reuse the same queue for errors.\n request.clientRenderedBoundaries.push(boundary);\n }\n }\n }\n\n request.allPendingTasks--;\n\n if (request.allPendingTasks === 0) {\n completeAll(request);\n }\n}\n\nfunction abortTaskSoft(task) {\n // This aborts task without aborting the parent boundary that it blocks.\n // It's used for when we didn't need this task to complete the tree.\n // If task was needed, then it should use abortTask instead.\n var request = this;\n var boundary = task.blockedBoundary;\n var segment = task.blockedSegment;\n\n if (segment !== null) {\n segment.status = ABORTED;\n finishedTask(request, boundary, segment);\n }\n}\n\nfunction abortRemainingSuspenseBoundary(request, rootSegmentID, error, errorDigest, errorInfo) {\n var resumedBoundary = createSuspenseBoundary(request, new Set());\n resumedBoundary.parentFlushed = true; // We restore the same id of this boundary as was used during prerender.\n\n resumedBoundary.rootSegmentID = rootSegmentID;\n resumedBoundary.status = CLIENT_RENDERED;\n var errorMessage = error;\n\n {\n var errorPrefix = 'The server did not finish this Suspense boundary: ';\n\n if (error && typeof error.message === 'string') {\n errorMessage = errorPrefix + error.message;\n } else {\n // eslint-disable-next-line react-internal/safe-string-coercion\n errorMessage = errorPrefix + String(error);\n }\n }\n\n encodeErrorForBoundary(resumedBoundary, errorDigest, errorMessage, errorInfo);\n\n if (resumedBoundary.parentFlushed) {\n request.clientRenderedBoundaries.push(resumedBoundary);\n }\n}\n\nfunction abortRemainingReplayNodes(request, boundary, nodes, slots, error, errorDigest, errorInfo) {\n for (var i = 0; i < nodes.length; i++) {\n var node = nodes[i];\n\n if (node.length === 4) {\n abortRemainingReplayNodes(request, boundary, node[2], node[3], error, errorDigest, errorInfo);\n } else {\n var boundaryNode = node;\n var rootSegmentID = boundaryNode[5];\n abortRemainingSuspenseBoundary(request, rootSegmentID, error, errorDigest, errorInfo);\n }\n } // Empty the set, since we've cleared it now.\n\n\n nodes.length = 0;\n\n if (slots !== null) {\n // We had something still to resume in the parent boundary. We must trigger\n // the error on the parent boundary since it's not able to complete.\n if (boundary === null) {\n throw new Error('We should not have any resumable nodes in the shell. ' + 'This is a bug in React.');\n } else if (boundary.status !== CLIENT_RENDERED) {\n boundary.status = CLIENT_RENDERED;\n encodeErrorForBoundary(boundary, errorDigest, error, errorInfo);\n\n if (boundary.parentFlushed) {\n request.clientRenderedBoundaries.push(boundary);\n }\n } // Empty the set\n\n\n if (typeof slots === 'object') {\n for (var index in slots) {\n delete slots[index];\n }\n }\n }\n}\n\nfunction abortTask(task, request, error) {\n // This aborts the task and aborts the parent that it blocks, putting it into\n // client rendered mode.\n var boundary = task.blockedBoundary;\n var segment = task.blockedSegment;\n\n if (segment !== null) {\n segment.status = ABORTED;\n }\n\n if (boundary === null) {\n var errorInfo = {};\n\n if (request.status !== CLOSING && request.status !== CLOSED) {\n var replay = task.replay;\n\n if (replay === null) {\n // We didn't complete the root so we have nothing to show. We can close\n // the request;\n {\n logRecoverableError(request, error, errorInfo);\n fatalError(request, error);\n }\n\n return;\n } else {\n // If the shell aborts during a replay, that's not a fatal error. Instead\n // we should be able to recover by client rendering all the root boundaries in\n // the ReplaySet.\n replay.pendingTasks--;\n\n if (replay.pendingTasks === 0 && replay.nodes.length > 0) {\n var errorDigest;\n\n {\n errorDigest = logRecoverableError(request, error, errorInfo);\n }\n\n abortRemainingReplayNodes(request, null, replay.nodes, replay.slots, error, errorDigest, errorInfo);\n }\n\n request.pendingRootTasks--;\n\n if (request.pendingRootTasks === 0) {\n completeShell(request);\n }\n }\n }\n } else {\n boundary.pendingTasks--;\n\n if (boundary.status !== CLIENT_RENDERED) {\n boundary.status = CLIENT_RENDERED; // We construct an errorInfo from the boundary's componentStack so the error in dev will indicate which\n // boundary the message is referring to\n\n var _errorInfo = getThrownInfo(request, task.componentStack);\n\n var _errorDigest;\n\n {\n _errorDigest = logRecoverableError(request, error, _errorInfo);\n }\n\n var errorMessage = error;\n\n {\n var errorPrefix = 'The server did not finish this Suspense boundary: ';\n\n if (error && typeof error.message === 'string') {\n errorMessage = errorPrefix + error.message;\n } else {\n // eslint-disable-next-line react-internal/safe-string-coercion\n errorMessage = errorPrefix + String(error);\n }\n }\n\n encodeErrorForBoundary(boundary, _errorDigest, errorMessage, _errorInfo);\n untrackBoundary(request, boundary);\n\n if (boundary.parentFlushed) {\n request.clientRenderedBoundaries.push(boundary);\n }\n } // If this boundary was still pending then we haven't already cancelled its fallbacks.\n // We'll need to abort the fallbacks, which will also error that parent boundary.\n\n\n boundary.fallbackAbortableTasks.forEach(function (fallbackTask) {\n return abortTask(fallbackTask, request, error);\n });\n boundary.fallbackAbortableTasks.clear();\n }\n\n request.allPendingTasks--;\n\n if (request.allPendingTasks === 0) {\n completeAll(request);\n }\n}\n\nfunction safelyEmitEarlyPreloads(request, shellComplete) {\n try {\n emitEarlyPreloads(request.renderState, request.resumableState, shellComplete);\n } catch (error) {\n // We assume preloads are optimistic and thus non-fatal if errored.\n var errorInfo = {};\n logRecoverableError(request, error, errorInfo);\n }\n} // I extracted this function out because we want to ensure we consistently emit preloads before\n// transitioning to the next request stage and this transition can happen in multiple places in this\n// implementation.\n\n\nfunction completeShell(request) {\n if (request.trackedPostpones === null) {\n // We only emit early preloads on shell completion for renders. For prerenders\n // we wait for the entire Request to finish because we are not responding to a\n // live request and can wait for as much data as possible.\n // we should only be calling completeShell when the shell is complete so we\n // just use a literal here\n var shellComplete = true;\n safelyEmitEarlyPreloads(request, shellComplete);\n } // We have completed the shell so the shell can't error anymore.\n\n\n request.onShellError = noop;\n var onShellReady = request.onShellReady;\n onShellReady();\n} // I extracted this function out because we want to ensure we consistently emit preloads before\n// transitioning to the next request stage and this transition can happen in multiple places in this\n// implementation.\n\n\nfunction completeAll(request) {\n // During a render the shell must be complete if the entire request is finished\n // however during a Prerender it is possible that the shell is incomplete because\n // it postponed. We cannot use rootPendingTasks in the prerender case because\n // those hit zero even when the shell postpones. Instead we look at the completedRootSegment\n var shellComplete = request.trackedPostpones === null ? // Render, we assume it is completed\n true : // Prerender Request, we use the state of the root segment\n request.completedRootSegment === null || request.completedRootSegment.status !== POSTPONED;\n safelyEmitEarlyPreloads(request, shellComplete);\n var onAllReady = request.onAllReady;\n onAllReady();\n}\n\nfunction queueCompletedSegment(boundary, segment) {\n if (segment.chunks.length === 0 && segment.children.length === 1 && segment.children[0].boundary === null && segment.children[0].id === -1) {\n // This is an empty segment. There's nothing to write, so we can instead transfer the ID\n // to the child. That way any existing references point to the child.\n var childSegment = segment.children[0];\n childSegment.id = segment.id;\n childSegment.parentFlushed = true;\n\n if (childSegment.status === COMPLETED) {\n queueCompletedSegment(boundary, childSegment);\n }\n } else {\n var completedSegments = boundary.completedSegments;\n completedSegments.push(segment);\n }\n}\n\nfunction finishedTask(request, boundary, segment) {\n if (boundary === null) {\n if (segment !== null && segment.parentFlushed) {\n if (request.completedRootSegment !== null) {\n throw new Error('There can only be one root segment. This is a bug in React.');\n }\n\n request.completedRootSegment = segment;\n }\n\n request.pendingRootTasks--;\n\n if (request.pendingRootTasks === 0) {\n completeShell(request);\n }\n } else {\n boundary.pendingTasks--;\n\n if (boundary.status === CLIENT_RENDERED) ; else if (boundary.pendingTasks === 0) {\n if (boundary.status === PENDING) {\n boundary.status = COMPLETED;\n } // This must have been the last segment we were waiting on. This boundary is now complete.\n\n\n if (segment !== null && segment.parentFlushed) {\n // Our parent segment already flushed, so we need to schedule this segment to be emitted.\n // If it is a segment that was aborted, we'll write other content instead so we don't need\n // to emit it.\n if (segment.status === COMPLETED) {\n queueCompletedSegment(boundary, segment);\n }\n }\n\n if (boundary.parentFlushed) {\n // The segment might be part of a segment that didn't flush yet, but if the boundary's\n // parent flushed, we need to schedule the boundary to be emitted.\n request.completedBoundaries.push(boundary);\n } // We can now cancel any pending task on the fallback since we won't need to show it anymore.\n // This needs to happen after we read the parentFlushed flags because aborting can finish\n // work which can trigger user code, which can start flushing, which can change those flags.\n // If the boundary was POSTPONED, we still need to finish the fallback first.\n\n\n if (boundary.status === COMPLETED) {\n boundary.fallbackAbortableTasks.forEach(abortTaskSoft, request);\n boundary.fallbackAbortableTasks.clear();\n }\n } else {\n if (segment !== null && segment.parentFlushed) {\n // Our parent already flushed, so we need to schedule this segment to be emitted.\n // If it is a segment that was aborted, we'll write other content instead so we don't need\n // to emit it.\n if (segment.status === COMPLETED) {\n queueCompletedSegment(boundary, segment);\n var completedSegments = boundary.completedSegments;\n\n if (completedSegments.length === 1) {\n // This is the first time since we last flushed that we completed anything.\n // We can schedule this boundary to emit its partially completed segments early\n // in case the parent has already been flushed.\n if (boundary.parentFlushed) {\n request.partialBoundaries.push(boundary);\n }\n }\n }\n }\n }\n }\n\n request.allPendingTasks--;\n\n if (request.allPendingTasks === 0) {\n completeAll(request);\n }\n}\n\nfunction retryTask(request, task) {\n var segment = task.blockedSegment;\n\n if (segment === null) {\n retryReplayTask(request, // $FlowFixMe: Refined.\n task);\n } else {\n retryRenderTask(request, // $FlowFixMe: Refined.\n task, segment);\n }\n}\n\nfunction retryRenderTask(request, task, segment) {\n if (segment.status !== PENDING) {\n // We completed this by other means before we had a chance to retry it.\n return;\n } // We restore the context to what it was when we suspended.\n // We don't restore it after we leave because it's likely that we'll end up\n // needing a very similar context soon again.\n\n\n switchContext(task.context);\n var prevTaskInDEV = null;\n\n {\n prevTaskInDEV = currentTaskInDEV;\n currentTaskInDEV = task;\n }\n\n var childrenLength = segment.children.length;\n var chunkLength = segment.chunks.length;\n\n try {\n // We call the destructive form that mutates this task. That way if something\n // suspends again, we can reuse the same task instead of spawning a new one.\n renderNodeDestructive(request, task, task.node, task.childIndex);\n pushSegmentFinale(segment.chunks, request.renderState, segment.lastPushedText, segment.textEmbedded);\n task.abortSet.delete(task);\n segment.status = COMPLETED;\n finishedTask(request, task.blockedBoundary, segment);\n } catch (thrownValue) {\n resetHooksState(); // Reset the write pointers to where we started.\n\n segment.children.length = childrenLength;\n segment.chunks.length = chunkLength;\n var x = thrownValue === SuspenseException ? // This is a special type of exception used for Suspense. For historical\n // reasons, the rest of the Suspense implementation expects the thrown\n // value to be a thenable, because before `use` existed that was the\n // (unstable) API for suspending. This implementation detail can change\n // later, once we deprecate the old API in favor of `use`.\n getSuspendedThenable() : thrownValue;\n\n if (typeof x === 'object' && x !== null) {\n // $FlowFixMe[method-unbinding]\n if (typeof x.then === 'function') {\n // Something suspended again, let's pick it back up later.\n var ping = task.ping;\n x.then(ping, ping);\n task.thenableState = getThenableStateAfterSuspending();\n return;\n }\n }\n\n var errorInfo = getThrownInfo(request, task.componentStack);\n task.abortSet.delete(task);\n segment.status = ERRORED;\n erroredTask(request, task.blockedBoundary, x, errorInfo);\n return;\n } finally {\n {\n currentTaskInDEV = prevTaskInDEV;\n }\n }\n}\n\nfunction retryReplayTask(request, task) {\n if (task.replay.pendingTasks === 0) {\n // There are no pending tasks working on this set, so we must have aborted.\n return;\n } // We restore the context to what it was when we suspended.\n // We don't restore it after we leave because it's likely that we'll end up\n // needing a very similar context soon again.\n\n\n switchContext(task.context);\n var prevTaskInDEV = null;\n\n {\n prevTaskInDEV = currentTaskInDEV;\n currentTaskInDEV = task;\n }\n\n try {\n // We call the destructive form that mutates this task. That way if something\n // suspends again, we can reuse the same task instead of spawning a new one.\n renderNodeDestructive(request, task, task.node, task.childIndex);\n\n if (task.replay.pendingTasks === 1 && task.replay.nodes.length > 0) {\n throw new Error(\"Couldn't find all resumable slots by key/index during replaying. \" + \"The tree doesn't match so React will fallback to client rendering.\");\n }\n\n task.replay.pendingTasks--;\n task.abortSet.delete(task);\n finishedTask(request, task.blockedBoundary, null);\n } catch (thrownValue) {\n resetHooksState();\n var x = thrownValue === SuspenseException ? // This is a special type of exception used for Suspense. For historical\n // reasons, the rest of the Suspense implementation expects the thrown\n // value to be a thenable, because before `use` existed that was the\n // (unstable) API for suspending. This implementation detail can change\n // later, once we deprecate the old API in favor of `use`.\n getSuspendedThenable() : thrownValue;\n\n if (typeof x === 'object' && x !== null) {\n // $FlowFixMe[method-unbinding]\n if (typeof x.then === 'function') {\n // Something suspended again, let's pick it back up later.\n var ping = task.ping;\n x.then(ping, ping);\n task.thenableState = getThenableStateAfterSuspending();\n return;\n }\n }\n\n task.replay.pendingTasks--;\n task.abortSet.delete(task);\n var errorInfo = getThrownInfo(request, task.componentStack);\n erroredReplay(request, task.blockedBoundary, x, errorInfo, task.replay.nodes, task.replay.slots);\n request.pendingRootTasks--;\n\n if (request.pendingRootTasks === 0) {\n completeShell(request);\n }\n\n request.allPendingTasks--;\n\n if (request.allPendingTasks === 0) {\n completeAll(request);\n }\n\n return;\n } finally {\n {\n currentTaskInDEV = prevTaskInDEV;\n }\n }\n}\n\nfunction performWork(request) {\n if (request.status === CLOSED) {\n return;\n }\n\n var prevContext = getActiveContext();\n var prevDispatcher = ReactCurrentDispatcher.current;\n ReactCurrentDispatcher.current = HooksDispatcher;\n var prevCacheDispatcher;\n\n {\n prevCacheDispatcher = ReactCurrentCache.current;\n ReactCurrentCache.current = DefaultCacheDispatcher;\n }\n\n var prevRequest = currentRequest;\n currentRequest = request;\n var prevGetCurrentStackImpl;\n\n {\n prevGetCurrentStackImpl = ReactDebugCurrentFrame.getCurrentStack;\n ReactDebugCurrentFrame.getCurrentStack = getCurrentStackInDEV;\n }\n\n var prevResumableState = currentResumableState;\n setCurrentResumableState(request.resumableState);\n\n try {\n var pingedTasks = request.pingedTasks;\n var i;\n\n for (i = 0; i < pingedTasks.length; i++) {\n var task = pingedTasks[i];\n retryTask(request, task);\n }\n\n pingedTasks.splice(0, i);\n\n if (request.destination !== null) {\n flushCompletedQueues(request, request.destination);\n }\n } catch (error) {\n var errorInfo = {};\n logRecoverableError(request, error, errorInfo);\n fatalError(request, error);\n } finally {\n setCurrentResumableState(prevResumableState);\n ReactCurrentDispatcher.current = prevDispatcher;\n\n {\n ReactCurrentCache.current = prevCacheDispatcher;\n }\n\n {\n ReactDebugCurrentFrame.getCurrentStack = prevGetCurrentStackImpl;\n }\n\n if (prevDispatcher === HooksDispatcher) {\n // This means that we were in a reentrant work loop. This could happen\n // in a renderer that supports synchronous work like renderToString,\n // when it's called from within another renderer.\n // Normally we don't bother switching the contexts to their root/default\n // values when leaving because we'll likely need the same or similar\n // context again. However, when we're inside a synchronous loop like this\n // we'll to restore the context to what it was before returning.\n switchContext(prevContext);\n }\n\n currentRequest = prevRequest;\n }\n}\n\nfunction flushPreamble(request, destination, rootSegment) {\n var willFlushAllSegments = request.allPendingTasks === 0 && request.trackedPostpones === null;\n writePreamble(destination, request.resumableState, request.renderState, willFlushAllSegments);\n}\n\nfunction flushSubtree(request, destination, segment, hoistableState) {\n segment.parentFlushed = true;\n\n switch (segment.status) {\n case PENDING:\n {\n // We're emitting a placeholder for this segment to be filled in later.\n // Therefore we'll need to assign it an ID - to refer to it by.\n segment.id = request.nextSegmentId++; // Fallthrough\n }\n\n case POSTPONED:\n {\n var segmentID = segment.id; // When this segment finally completes it won't be embedded in text since it will flush separately\n\n segment.lastPushedText = false;\n segment.textEmbedded = false;\n return writePlaceholder(destination, request.renderState, segmentID);\n }\n\n case COMPLETED:\n {\n segment.status = FLUSHED;\n var r = true;\n var chunks = segment.chunks;\n var chunkIdx = 0;\n var children = segment.children;\n\n for (var childIdx = 0; childIdx < children.length; childIdx++) {\n var nextChild = children[childIdx]; // Write all the chunks up until the next child.\n\n for (; chunkIdx < nextChild.index; chunkIdx++) {\n writeChunk(destination, chunks[chunkIdx]);\n }\n\n r = flushSegment(request, destination, nextChild, hoistableState);\n } // Finally just write all the remaining chunks\n\n\n for (; chunkIdx < chunks.length - 1; chunkIdx++) {\n writeChunk(destination, chunks[chunkIdx]);\n }\n\n if (chunkIdx < chunks.length) {\n r = writeChunkAndReturn(destination, chunks[chunkIdx]);\n }\n\n return r;\n }\n\n default:\n {\n throw new Error('Aborted, errored or already flushed boundaries should not be flushed again. This is a bug in React.');\n }\n }\n}\n\nfunction flushSegment(request, destination, segment, hoistableState) {\n var boundary = segment.boundary;\n\n if (boundary === null) {\n // Not a suspense boundary.\n return flushSubtree(request, destination, segment, hoistableState);\n }\n\n boundary.parentFlushed = true; // This segment is a Suspense boundary. We need to decide whether to\n // emit the content or the fallback now.\n\n if (boundary.status === CLIENT_RENDERED) {\n // Emit a client rendered suspense boundary wrapper.\n // We never queue the inner boundary so we'll never emit its content or partial segments.\n writeStartClientRenderedSuspenseBoundary(destination, request.renderState, boundary.errorDigest, boundary.errorMessage, boundary.errorComponentStack); // Flush the fallback.\n\n flushSubtree(request, destination, segment, hoistableState);\n return writeEndClientRenderedSuspenseBoundary(destination, request.renderState);\n } else if (boundary.status !== COMPLETED) {\n if (boundary.status === PENDING) {\n // For pending boundaries we lazily assign an ID to the boundary\n // and root segment.\n boundary.rootSegmentID = request.nextSegmentId++;\n }\n\n if (boundary.completedSegments.length > 0) {\n // If this is at least partially complete, we can queue it to be partially emitted early.\n request.partialBoundaries.push(boundary);\n } // This boundary is still loading. Emit a pending suspense boundary wrapper.\n\n\n var id = boundary.rootSegmentID;\n writeStartPendingSuspenseBoundary(destination, request.renderState, id); // We are going to flush the fallback so we need to hoist the fallback\n // state to the parent boundary\n\n {\n if (hoistableState) {\n hoistHoistables(hoistableState, boundary.fallbackState);\n }\n } // Flush the fallback.\n\n\n flushSubtree(request, destination, segment, hoistableState);\n return writeEndPendingSuspenseBoundary(destination);\n } else if (boundary.byteSize > request.progressiveChunkSize) {\n // This boundary is large and will be emitted separately so that we can progressively show\n // other content. We add it to the queue during the flush because we have to ensure that\n // the parent flushes first so that there's something to inject it into.\n // We also have to make sure that it's emitted into the queue in a deterministic slot.\n // I.e. we can't insert it here when it completes.\n // Assign an ID to refer to the future content by.\n boundary.rootSegmentID = request.nextSegmentId++;\n request.completedBoundaries.push(boundary); // Emit a pending rendered suspense boundary wrapper.\n\n writeStartPendingSuspenseBoundary(destination, request.renderState, boundary.rootSegmentID); // While we are going to flush the fallback we are going to follow it up with\n // the completed boundary immediately so we make the choice to omit fallback\n // boundary state from the parent since it will be replaced when the boundary\n // flushes later in this pass or in a future flush\n // Flush the fallback.\n\n flushSubtree(request, destination, segment, hoistableState);\n return writeEndPendingSuspenseBoundary(destination);\n } else {\n {\n if (hoistableState) {\n hoistHoistables(hoistableState, boundary.contentState);\n }\n } // We can inline this boundary's content as a complete boundary.\n\n\n writeStartCompletedSuspenseBoundary(destination, request.renderState);\n var completedSegments = boundary.completedSegments;\n\n if (completedSegments.length !== 1) {\n throw new Error('A previously unvisited boundary must have exactly one root segment. This is a bug in React.');\n }\n\n var contentSegment = completedSegments[0];\n flushSegment(request, destination, contentSegment, hoistableState);\n return writeEndCompletedSuspenseBoundary(destination, request.renderState);\n }\n}\n\nfunction flushClientRenderedBoundary(request, destination, boundary) {\n return writeClientRenderBoundaryInstruction(destination, request.resumableState, request.renderState, boundary.rootSegmentID, boundary.errorDigest, boundary.errorMessage, boundary.errorComponentStack);\n}\n\nfunction flushSegmentContainer(request, destination, segment, hoistableState) {\n writeStartSegment(destination, request.renderState, segment.parentFormatContext, segment.id);\n flushSegment(request, destination, segment, hoistableState);\n return writeEndSegment(destination, segment.parentFormatContext);\n}\n\nfunction flushCompletedBoundary(request, destination, boundary) {\n var completedSegments = boundary.completedSegments;\n var i = 0;\n\n for (; i < completedSegments.length; i++) {\n var segment = completedSegments[i];\n flushPartiallyCompletedSegment(request, destination, boundary, segment);\n }\n\n completedSegments.length = 0;\n\n {\n writeHoistablesForBoundary(destination, boundary.contentState, request.renderState);\n }\n\n return writeCompletedBoundaryInstruction(destination, request.resumableState, request.renderState, boundary.rootSegmentID, boundary.contentState);\n}\n\nfunction flushPartialBoundary(request, destination, boundary) {\n var completedSegments = boundary.completedSegments;\n var i = 0;\n\n for (; i < completedSegments.length; i++) {\n var segment = completedSegments[i];\n\n if (!flushPartiallyCompletedSegment(request, destination, boundary, segment)) {\n i++;\n completedSegments.splice(0, i); // Only write as much as the buffer wants. Something higher priority\n // might want to write later.\n\n return false;\n }\n }\n\n completedSegments.splice(0, i);\n\n {\n return writeHoistablesForBoundary(destination, boundary.contentState, request.renderState);\n }\n}\n\nfunction flushPartiallyCompletedSegment(request, destination, boundary, segment) {\n if (segment.status === FLUSHED) {\n // We've already flushed this inline.\n return true;\n }\n\n var hoistableState = boundary.contentState;\n var segmentID = segment.id;\n\n if (segmentID === -1) {\n // This segment wasn't previously referred to. This happens at the root of\n // a boundary. We make kind of a leap here and assume this is the root.\n var rootSegmentID = segment.id = boundary.rootSegmentID;\n\n if (rootSegmentID === -1) {\n throw new Error('A root segment ID must have been assigned by now. This is a bug in React.');\n }\n\n return flushSegmentContainer(request, destination, segment, hoistableState);\n } else if (segmentID === boundary.rootSegmentID) {\n // When we emit postponed boundaries, we might have assigned the ID already\n // but it's still the root segment so we can't inject it into the parent yet.\n return flushSegmentContainer(request, destination, segment, hoistableState);\n } else {\n flushSegmentContainer(request, destination, segment, hoistableState);\n return writeCompletedSegmentInstruction(destination, request.resumableState, request.renderState, segmentID);\n }\n}\n\nfunction flushCompletedQueues(request, destination) {\n\n try {\n // The structure of this is to go through each queue one by one and write\n // until the sink tells us to stop. When we should stop, we still finish writing\n // that item fully and then yield. At that point we remove the already completed\n // items up until the point we completed them.\n var i;\n var completedRootSegment = request.completedRootSegment;\n\n if (completedRootSegment !== null) {\n if (completedRootSegment.status === POSTPONED) {\n // We postponed the root, so we write nothing.\n return;\n } else if (request.pendingRootTasks === 0) {\n if (enableFloat) {\n flushPreamble(request, destination, completedRootSegment);\n }\n\n flushSegment(request, destination, completedRootSegment, null);\n request.completedRootSegment = null;\n writeCompletedRoot(destination, request.renderState);\n } else {\n // We haven't flushed the root yet so we don't need to check any other branches further down\n return;\n }\n }\n\n if (enableFloat) {\n writeHoistables(destination, request.resumableState, request.renderState);\n } // We emit client rendering instructions for already emitted boundaries first.\n // This is so that we can signal to the client to start client rendering them as\n // soon as possible.\n\n\n var clientRenderedBoundaries = request.clientRenderedBoundaries;\n\n for (i = 0; i < clientRenderedBoundaries.length; i++) {\n var boundary = clientRenderedBoundaries[i];\n\n if (!flushClientRenderedBoundary(request, destination, boundary)) {\n request.destination = null;\n i++;\n clientRenderedBoundaries.splice(0, i);\n return;\n }\n }\n\n clientRenderedBoundaries.splice(0, i); // Next we emit any complete boundaries. It's better to favor boundaries\n // that are completely done since we can actually show them, than it is to emit\n // any individual segments from a partially complete boundary.\n\n var completedBoundaries = request.completedBoundaries;\n\n for (i = 0; i < completedBoundaries.length; i++) {\n var _boundary = completedBoundaries[i];\n\n if (!flushCompletedBoundary(request, destination, _boundary)) {\n request.destination = null;\n i++;\n completedBoundaries.splice(0, i);\n return;\n }\n }\n\n completedBoundaries.splice(0, i); // Allow anything written so far to flush to the underlying sink before\n // we continue with lower priorities.\n\n completeWriting(destination);\n beginWriting(destination); // TODO: Here we'll emit data used by hydration.\n // Next we emit any segments of any boundaries that are partially complete\n // but not deeply complete.\n\n var partialBoundaries = request.partialBoundaries;\n\n for (i = 0; i < partialBoundaries.length; i++) {\n var _boundary2 = partialBoundaries[i];\n\n if (!flushPartialBoundary(request, destination, _boundary2)) {\n request.destination = null;\n i++;\n partialBoundaries.splice(0, i);\n return;\n }\n }\n\n partialBoundaries.splice(0, i); // Next we check the completed boundaries again. This may have had\n // boundaries added to it in case they were too larged to be inlined.\n // New ones might be added in this loop.\n\n var largeBoundaries = request.completedBoundaries;\n\n for (i = 0; i < largeBoundaries.length; i++) {\n var _boundary3 = largeBoundaries[i];\n\n if (!flushCompletedBoundary(request, destination, _boundary3)) {\n request.destination = null;\n i++;\n largeBoundaries.splice(0, i);\n return;\n }\n }\n\n largeBoundaries.splice(0, i);\n } finally {\n if (request.allPendingTasks === 0 && request.pingedTasks.length === 0 && request.clientRenderedBoundaries.length === 0 && request.completedBoundaries.length === 0 // We don't need to check any partially completed segments because\n // either they have pending task or they're complete.\n ) {\n request.flushScheduled = false;\n\n {\n // We write the trailing tags but only if don't have any data to resume.\n // If we need to resume we'll write the postamble in the resume instead.\n {\n writePostamble(destination, request.resumableState);\n }\n }\n\n {\n if (request.abortableTasks.size !== 0) {\n error('There was still abortable task at the root when we closed. This is a bug in React.');\n }\n } // We're done.\n\n\n close(destination); // We need to stop flowing now because we do not want any async contexts which might call\n // float methods to initiate any flushes after this point\n\n stopFlowing(request);\n }\n }\n}\n\nfunction startWork(request) {\n request.flushScheduled = request.destination !== null;\n\n {\n scheduleWork(function () {\n return performWork(request);\n });\n }\n\n if (request.trackedPostpones === null) {\n // this is either a regular render or a resume. For regular render we want\n // to call emitEarlyPreloads after the first performWork because we want\n // are responding to a live request and need to balance sending something early\n // (i.e. don't want for the shell to finish) but we need something to send.\n // The only implementation of this is for DOM at the moment and during resumes nothing\n // actually emits but the code paths here are the same.\n // During a prerender we don't want to be too aggressive in emitting early preloads\n // because we aren't responding to a live request and we can wait for the prerender to\n // postpone before we emit anything.\n {\n scheduleWork(function () {\n return enqueueEarlyPreloadsAfterInitialWork(request);\n });\n }\n }\n}\n\nfunction enqueueEarlyPreloadsAfterInitialWork(request) {\n var shellComplete = request.pendingRootTasks === 0;\n safelyEmitEarlyPreloads(request, shellComplete);\n}\n\nfunction enqueueFlush(request) {\n if (request.flushScheduled === false && // If there are pinged tasks we are going to flush anyway after work completes\n request.pingedTasks.length === 0 && // If there is no destination there is nothing we can flush to. A flush will\n // happen when we start flowing again\n request.destination !== null) {\n request.flushScheduled = true;\n scheduleWork(function () {\n // We need to existence check destination again here because it might go away\n // in between the enqueueFlush call and the work execution\n var destination = request.destination;\n\n if (destination) {\n flushCompletedQueues(request, destination);\n } else {\n request.flushScheduled = false;\n }\n });\n }\n} // This function is intented to only be called during the pipe function for the Node builds.\nfunction startFlowing(request, destination) {\n if (request.status === CLOSING) {\n request.status = CLOSED;\n closeWithError(destination, request.fatalError);\n return;\n }\n\n if (request.status === CLOSED) {\n return;\n }\n\n if (request.destination !== null) {\n // We're already flowing.\n return;\n }\n\n request.destination = destination;\n\n try {\n flushCompletedQueues(request, destination);\n } catch (error) {\n var errorInfo = {};\n logRecoverableError(request, error, errorInfo);\n fatalError(request, error);\n }\n}\nfunction stopFlowing(request) {\n request.destination = null;\n} // This is called to early terminate a request. It puts all pending boundaries in client rendered state.\n\nfunction abort(request, reason) {\n try {\n var abortableTasks = request.abortableTasks;\n\n if (abortableTasks.size > 0) {\n var error = reason === undefined ? new Error('The render was aborted by the server without a reason.') : reason;\n abortableTasks.forEach(function (task) {\n return abortTask(task, request, error);\n });\n abortableTasks.clear();\n }\n\n if (request.destination !== null) {\n flushCompletedQueues(request, request.destination);\n }\n } catch (error) {\n var errorInfo = {};\n logRecoverableError(request, error, errorInfo);\n fatalError(request, error);\n }\n}\nfunction flushResources(request) {\n enqueueFlush(request);\n}\nfunction getFormState(request) {\n return request.formState;\n}\nfunction getResumableState(request) {\n return request.resumableState;\n}\nfunction getRenderState(request) {\n return request.renderState;\n}\n\nfunction onError$1() {// Non-fatal errors are ignored.\n}\n\nfunction renderToStringImpl(children, options, generateStaticMarkup, abortReason) {\n var didFatal = false;\n var fatalError = null;\n var result = '';\n var destination = {\n // $FlowFixMe[missing-local-annot]\n push: function (chunk) {\n if (chunk !== null) {\n result += chunk;\n }\n\n return true;\n },\n // $FlowFixMe[missing-local-annot]\n destroy: function (error) {\n didFatal = true;\n fatalError = error;\n }\n };\n var readyToStream = false;\n\n function onShellReady() {\n readyToStream = true;\n }\n\n var resumableState = createResumableState(options ? options.identifierPrefix : undefined, undefined);\n var request = createRequest(children, resumableState, createRenderState(resumableState, generateStaticMarkup), createRootFormatContext(), Infinity, onError$1, undefined, onShellReady, undefined, undefined, undefined);\n startWork(request); // If anything suspended and is still pending, we'll abort it before writing.\n // That way we write only client-rendered boundaries from the start.\n\n abort(request, abortReason);\n startFlowing(request, destination);\n\n if (didFatal && fatalError !== abortReason) {\n throw fatalError;\n }\n\n if (!readyToStream) {\n // Note: This error message is the one we use on the client. It doesn't\n // really make sense here. But this is the legacy server renderer, anyway.\n // We're going to delete it soon.\n throw new Error('A component suspended while responding to synchronous input. This ' + 'will cause the UI to be replaced with a loading indicator. To fix, ' + 'updates that suspend should be wrapped with startTransition.');\n }\n\n return result;\n}\n\nfunction _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n}\n\nvar ReactMarkupReadableStream = /*#__PURE__*/function (_Readable) {\n _inheritsLoose(ReactMarkupReadableStream, _Readable);\n\n function ReactMarkupReadableStream() {\n var _this;\n\n // Calls the stream.Readable(options) constructor. Consider exposing built-in\n // features like highWaterMark in the future.\n _this = _Readable.call(this, {}) || this;\n _this.request = void 0;\n _this.startedFlowing = void 0;\n _this.request = null;\n _this.startedFlowing = false;\n return _this;\n } // $FlowFixMe[missing-local-annot]\n\n\n var _proto = ReactMarkupReadableStream.prototype;\n\n _proto._destroy = function _destroy(err, callback) {\n abort(this.request);\n callback(err);\n } // $FlowFixMe[missing-local-annot]\n ;\n\n _proto._read = function _read(size) {\n if (this.startedFlowing) {\n startFlowing(this.request, this);\n }\n };\n\n return ReactMarkupReadableStream;\n}(stream.Readable);\n\nfunction onError() {// Non-fatal errors are ignored.\n}\n\nfunction renderToNodeStreamImpl(children, options, generateStaticMarkup) {\n function onAllReady() {\n // We wait until everything has loaded before starting to write.\n // That way we only end up with fully resolved HTML even if we suspend.\n destination.startedFlowing = true;\n startFlowing(request, destination);\n }\n\n var destination = new ReactMarkupReadableStream();\n var resumableState = createResumableState(options ? options.identifierPrefix : undefined, undefined);\n var request = createRequest(children, resumableState, createRenderState(resumableState, generateStaticMarkup), createRootFormatContext(), Infinity, onError, onAllReady, undefined, undefined, undefined);\n destination.request = request;\n startWork(request);\n return destination;\n}\n\nfunction renderToNodeStream(children, options) {\n {\n error('renderToNodeStream is deprecated. Use renderToPipeableStream instead.');\n }\n\n return renderToNodeStreamImpl(children, options, false);\n}\n\nfunction renderToStaticNodeStream(children, options) {\n return renderToNodeStreamImpl(children, options, true);\n}\n\nfunction renderToString(children, options) {\n return renderToStringImpl(children, options, false, 'The server used \"renderToString\" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to \"renderToPipeableStream\" which supports Suspense on the server');\n}\n\nfunction renderToStaticMarkup(children, options) {\n return renderToStringImpl(children, options, true, 'The server used \"renderToStaticMarkup\" which does not support Suspense. If you intended to have the server wait for the suspended component please switch to \"renderToPipeableStream\" which supports Suspense on the server');\n}\n\nexports.renderToNodeStream = renderToNodeStream;\nexports.renderToStaticMarkup = renderToStaticMarkup;\nexports.renderToStaticNodeStream = renderToStaticNodeStream;\nexports.renderToString = renderToString;\nexports.version = ReactVersion;\n })();\n}\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/react-dom/cjs/react-dom-server-legacy.node.development.js?", + ); + + /***/ + }, + + /***/ 3771: /***/ (__unused_webpack_module, exports, __webpack_require__) => { + 'use strict'; + eval( + "/**\n * @license React\n * react-dom-server.node.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\nif (true) {\n (function() {\n'use strict';\n\nvar React = __webpack_require__(6540);\nvar util = __webpack_require__(9023);\nvar crypto = __webpack_require__(6982);\nvar async_hooks = __webpack_require__(290);\nvar ReactDOM = __webpack_require__(961);\n\nvar ReactVersion = '18.3.0-canary-670811593-20240322';\n\nvar ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n\n// by calls to these methods by a Babel plugin.\n//\n// In PROD (or in packages without access to React internals),\n// they are left as they are instead.\n\nfunction warn(format) {\n {\n {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n printWarning('warn', format, args);\n }\n }\n}\nfunction error(format) {\n {\n {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n printWarning('error', format, args);\n }\n }\n}\n\nfunction printWarning(level, format, args) {\n // When changing this logic, you might want to also\n // update consoleWithStackDev.www.js as well.\n {\n var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n var stack = ReactDebugCurrentFrame.getStackAddendum();\n\n if (stack !== '') {\n format += '%s';\n args = args.concat([stack]);\n } // eslint-disable-next-line react-internal/safe-string-coercion\n\n\n var argsWithFormat = args.map(function (item) {\n return String(item);\n }); // Careful: RN currently depends on this prefix\n\n argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it\n // breaks IE9: https://github.com/facebook/react/issues/13610\n // eslint-disable-next-line react-internal/no-production-logging\n\n Function.prototype.apply.call(console[level], console, argsWithFormat);\n }\n}\n\n// ATTENTION\n// When adding new symbols to this file,\n// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'\n// The Symbol used to tag the ReactElement-like types.\nvar REACT_ELEMENT_TYPE = Symbol.for('react.element');\nvar REACT_PORTAL_TYPE = Symbol.for('react.portal');\nvar REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');\nvar REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');\nvar REACT_PROFILER_TYPE = Symbol.for('react.profiler');\nvar REACT_PROVIDER_TYPE = Symbol.for('react.provider'); // TODO: Delete with enableRenderableContext\n\nvar REACT_CONSUMER_TYPE = Symbol.for('react.consumer');\nvar REACT_CONTEXT_TYPE = Symbol.for('react.context');\nvar REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');\nvar REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');\nvar REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');\nvar REACT_MEMO_TYPE = Symbol.for('react.memo');\nvar REACT_LAZY_TYPE = Symbol.for('react.lazy');\nvar REACT_SCOPE_TYPE = Symbol.for('react.scope');\nvar REACT_DEBUG_TRACING_MODE_TYPE = Symbol.for('react.debug_trace_mode');\nvar REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');\nvar REACT_LEGACY_HIDDEN_TYPE = Symbol.for('react.legacy_hidden');\nvar REACT_CACHE_TYPE = Symbol.for('react.cache');\nvar MAYBE_ITERATOR_SYMBOL = Symbol.iterator;\nvar FAUX_ITERATOR_SYMBOL = '@@iterator';\nfunction getIteratorFn(maybeIterable) {\n if (maybeIterable === null || typeof maybeIterable !== 'object') {\n return null;\n }\n\n var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];\n\n if (typeof maybeIterator === 'function') {\n return maybeIterator;\n }\n\n return null;\n}\n\nvar isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare\n\nfunction isArray(a) {\n return isArrayImpl(a);\n}\n\n// in case they error.\n\nvar jsxPropsParents = new WeakMap();\nvar jsxChildrenParents = new WeakMap();\nfunction objectName(object) {\n // $FlowFixMe[method-unbinding]\n var name = Object.prototype.toString.call(object);\n return name.replace(/^\\[object (.*)\\]$/, function (m, p0) {\n return p0;\n });\n}\n\nfunction describeKeyForErrorMessage(key) {\n var encodedKey = JSON.stringify(key);\n return '\"' + key + '\"' === encodedKey ? key : encodedKey;\n}\n\nfunction describeValueForErrorMessage(value) {\n switch (typeof value) {\n case 'string':\n {\n return JSON.stringify(value.length <= 10 ? value : value.slice(0, 10) + '...');\n }\n\n case 'object':\n {\n if (isArray(value)) {\n return '[...]';\n }\n\n if (value !== null && value.$$typeof === CLIENT_REFERENCE_TAG) {\n return describeClientReference();\n }\n\n var name = objectName(value);\n\n if (name === 'Object') {\n return '{...}';\n }\n\n return name;\n }\n\n case 'function':\n {\n if (value.$$typeof === CLIENT_REFERENCE_TAG) {\n return describeClientReference();\n }\n\n var _name = value.displayName || value.name;\n\n return _name ? 'function ' + _name : 'function';\n }\n\n default:\n // eslint-disable-next-line react-internal/safe-string-coercion\n return String(value);\n }\n}\n\nfunction describeElementType(type) {\n if (typeof type === 'string') {\n return type;\n }\n\n switch (type) {\n case REACT_SUSPENSE_TYPE:\n return 'Suspense';\n\n case REACT_SUSPENSE_LIST_TYPE:\n return 'SuspenseList';\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_FORWARD_REF_TYPE:\n return describeElementType(type.render);\n\n case REACT_MEMO_TYPE:\n return describeElementType(type.type);\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n // Lazy may contain any component type so we recursively resolve it.\n return describeElementType(init(payload));\n } catch (x) {}\n }\n }\n }\n\n return '';\n}\n\nvar CLIENT_REFERENCE_TAG = Symbol.for('react.client.reference');\n\nfunction describeClientReference(ref) {\n return 'client';\n}\n\nfunction describeObjectForErrorMessage(objectOrArray, expandedName) {\n var objKind = objectName(objectOrArray);\n\n if (objKind !== 'Object' && objKind !== 'Array') {\n return objKind;\n }\n\n var str = '';\n var start = -1;\n var length = 0;\n\n if (isArray(objectOrArray)) {\n if (jsxChildrenParents.has(objectOrArray)) {\n // Print JSX Children\n var type = jsxChildrenParents.get(objectOrArray);\n str = '<' + describeElementType(type) + '>';\n var array = objectOrArray;\n\n for (var i = 0; i < array.length; i++) {\n var value = array[i];\n var substr = void 0;\n\n if (typeof value === 'string') {\n substr = value;\n } else if (typeof value === 'object' && value !== null) {\n substr = '{' + describeObjectForErrorMessage(value) + '}';\n } else {\n substr = '{' + describeValueForErrorMessage(value) + '}';\n }\n\n if ('' + i === expandedName) {\n start = str.length;\n length = substr.length;\n str += substr;\n } else if (substr.length < 15 && str.length + substr.length < 40) {\n str += substr;\n } else {\n str += '{...}';\n }\n }\n\n str += '</' + describeElementType(type) + '>';\n } else {\n // Print Array\n str = '[';\n var _array = objectOrArray;\n\n for (var _i = 0; _i < _array.length; _i++) {\n if (_i > 0) {\n str += ', ';\n }\n\n var _value = _array[_i];\n\n var _substr = void 0;\n\n if (typeof _value === 'object' && _value !== null) {\n _substr = describeObjectForErrorMessage(_value);\n } else {\n _substr = describeValueForErrorMessage(_value);\n }\n\n if ('' + _i === expandedName) {\n start = str.length;\n length = _substr.length;\n str += _substr;\n } else if (_substr.length < 10 && str.length + _substr.length < 40) {\n str += _substr;\n } else {\n str += '...';\n }\n }\n\n str += ']';\n }\n } else {\n if (objectOrArray.$$typeof === REACT_ELEMENT_TYPE) {\n str = '<' + describeElementType(objectOrArray.type) + '/>';\n } else if (objectOrArray.$$typeof === CLIENT_REFERENCE_TAG) {\n return describeClientReference();\n } else if (jsxPropsParents.has(objectOrArray)) {\n // Print JSX\n var _type = jsxPropsParents.get(objectOrArray);\n\n str = '<' + (describeElementType(_type) || '...');\n var object = objectOrArray;\n var names = Object.keys(object);\n\n for (var _i2 = 0; _i2 < names.length; _i2++) {\n str += ' ';\n var name = names[_i2];\n str += describeKeyForErrorMessage(name) + '=';\n var _value2 = object[name];\n\n var _substr2 = void 0;\n\n if (name === expandedName && typeof _value2 === 'object' && _value2 !== null) {\n _substr2 = describeObjectForErrorMessage(_value2);\n } else {\n _substr2 = describeValueForErrorMessage(_value2);\n }\n\n if (typeof _value2 !== 'string') {\n _substr2 = '{' + _substr2 + '}';\n }\n\n if (name === expandedName) {\n start = str.length;\n length = _substr2.length;\n str += _substr2;\n } else if (_substr2.length < 10 && str.length + _substr2.length < 40) {\n str += _substr2;\n } else {\n str += '...';\n }\n }\n\n str += '>';\n } else {\n // Print Object\n str = '{';\n var _object = objectOrArray;\n\n var _names = Object.keys(_object);\n\n for (var _i3 = 0; _i3 < _names.length; _i3++) {\n if (_i3 > 0) {\n str += ', ';\n }\n\n var _name2 = _names[_i3];\n str += describeKeyForErrorMessage(_name2) + ': ';\n var _value3 = _object[_name2];\n\n var _substr3 = void 0;\n\n if (typeof _value3 === 'object' && _value3 !== null) {\n _substr3 = describeObjectForErrorMessage(_value3);\n } else {\n _substr3 = describeValueForErrorMessage(_value3);\n }\n\n if (_name2 === expandedName) {\n start = str.length;\n length = _substr3.length;\n str += _substr3;\n } else if (_substr3.length < 10 && str.length + _substr3.length < 40) {\n str += _substr3;\n } else {\n str += '...';\n }\n }\n\n str += '}';\n }\n }\n\n if (expandedName === undefined) {\n return str;\n }\n\n if (start > -1 && length > 0) {\n var highlight = ' '.repeat(start) + '^'.repeat(length);\n return '\\n ' + str + '\\n ' + highlight;\n }\n\n return '\\n ' + str;\n}\n\nfunction scheduleWork(callback) {\n setImmediate(callback);\n}\nfunction flushBuffered(destination) {\n // If we don't have any more data to send right now.\n // Flush whatever is in the buffer to the wire.\n if (typeof destination.flush === 'function') {\n // By convention the Zlib streams provide a flush function for this purpose.\n // For Express, compression middleware adds this method.\n destination.flush();\n }\n}\nvar VIEW_SIZE = 2048;\nvar currentView = null;\nvar writtenBytes = 0;\nvar destinationHasCapacity$1 = true;\nfunction beginWriting(destination) {\n currentView = new Uint8Array(VIEW_SIZE);\n writtenBytes = 0;\n destinationHasCapacity$1 = true;\n}\n\nfunction writeStringChunk(destination, stringChunk) {\n if (stringChunk.length === 0) {\n return;\n } // maximum possible view needed to encode entire string\n\n\n if (stringChunk.length * 3 > VIEW_SIZE) {\n if (writtenBytes > 0) {\n writeToDestination(destination, currentView.subarray(0, writtenBytes));\n currentView = new Uint8Array(VIEW_SIZE);\n writtenBytes = 0;\n }\n\n writeToDestination(destination, textEncoder.encode(stringChunk));\n return;\n }\n\n var target = currentView;\n\n if (writtenBytes > 0) {\n target = currentView.subarray(writtenBytes);\n }\n\n var _textEncoder$encodeIn = textEncoder.encodeInto(stringChunk, target),\n read = _textEncoder$encodeIn.read,\n written = _textEncoder$encodeIn.written;\n\n writtenBytes += written;\n\n if (read < stringChunk.length) {\n writeToDestination(destination, currentView.subarray(0, writtenBytes));\n currentView = new Uint8Array(VIEW_SIZE);\n writtenBytes = textEncoder.encodeInto(stringChunk.slice(read), currentView).written;\n }\n\n if (writtenBytes === VIEW_SIZE) {\n writeToDestination(destination, currentView);\n currentView = new Uint8Array(VIEW_SIZE);\n writtenBytes = 0;\n }\n}\n\nfunction writeViewChunk(destination, chunk) {\n if (chunk.byteLength === 0) {\n return;\n }\n\n if (chunk.byteLength > VIEW_SIZE) {\n // this chunk may overflow a single view which implies it was not\n // one that is cached by the streaming renderer. We will enqueu\n // it directly and expect it is not re-used\n if (writtenBytes > 0) {\n writeToDestination(destination, currentView.subarray(0, writtenBytes));\n currentView = new Uint8Array(VIEW_SIZE);\n writtenBytes = 0;\n }\n\n writeToDestination(destination, chunk);\n return;\n }\n\n var bytesToWrite = chunk;\n var allowableBytes = currentView.length - writtenBytes;\n\n if (allowableBytes < bytesToWrite.byteLength) {\n // this chunk would overflow the current view. We enqueue a full view\n // and start a new view with the remaining chunk\n if (allowableBytes === 0) {\n // the current view is already full, send it\n writeToDestination(destination, currentView);\n } else {\n // fill up the current view and apply the remaining chunk bytes\n // to a new view.\n currentView.set(bytesToWrite.subarray(0, allowableBytes), writtenBytes);\n writtenBytes += allowableBytes;\n writeToDestination(destination, currentView);\n bytesToWrite = bytesToWrite.subarray(allowableBytes);\n }\n\n currentView = new Uint8Array(VIEW_SIZE);\n writtenBytes = 0;\n }\n\n currentView.set(bytesToWrite, writtenBytes);\n writtenBytes += bytesToWrite.byteLength;\n\n if (writtenBytes === VIEW_SIZE) {\n writeToDestination(destination, currentView);\n currentView = new Uint8Array(VIEW_SIZE);\n writtenBytes = 0;\n }\n}\n\nfunction writeChunk(destination, chunk) {\n if (typeof chunk === 'string') {\n writeStringChunk(destination, chunk);\n } else {\n writeViewChunk(destination, chunk);\n }\n}\n\nfunction writeToDestination(destination, view) {\n var currentHasCapacity = destination.write(view);\n destinationHasCapacity$1 = destinationHasCapacity$1 && currentHasCapacity;\n}\n\nfunction writeChunkAndReturn(destination, chunk) {\n writeChunk(destination, chunk);\n return destinationHasCapacity$1;\n}\nfunction completeWriting(destination) {\n if (currentView && writtenBytes > 0) {\n destination.write(currentView.subarray(0, writtenBytes));\n }\n\n currentView = null;\n writtenBytes = 0;\n destinationHasCapacity$1 = true;\n}\nfunction close(destination) {\n destination.end();\n}\nvar textEncoder = new util.TextEncoder();\nfunction stringToChunk(content) {\n return content;\n}\nfunction stringToPrecomputedChunk(content) {\n var precomputedChunk = textEncoder.encode(content);\n\n {\n if (precomputedChunk.byteLength > VIEW_SIZE) {\n error('precomputed chunks must be smaller than the view size configured for this host. This is a bug in React.');\n }\n }\n\n return precomputedChunk;\n}\nfunction closeWithError(destination, error) {\n // $FlowFixMe[incompatible-call]: This is an Error object or the destination accepts other types.\n destination.destroy(error);\n}\nfunction createFastHash(input) {\n var hash = crypto.createHash('md5');\n hash.update(input);\n return hash.digest('hex');\n}\n\nvar assign = Object.assign;\n\n/*\n * The `'' + value` pattern (used in perf-sensitive code) throws for Symbol\n * and Temporal.* types. See https://github.com/facebook/react/pull/22064.\n *\n * The functions in this module will throw an easier-to-understand,\n * easier-to-debug exception with a clear errors message message explaining the\n * problem. (Instead of a confusing exception thrown inside the implementation\n * of the `value` object).\n */\n// $FlowFixMe[incompatible-return] only called in DEV, so void return is not possible.\nfunction typeName(value) {\n {\n // toStringTag is needed for namespaced types like Temporal.Instant\n var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;\n var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object'; // $FlowFixMe[incompatible-return]\n\n return type;\n }\n} // $FlowFixMe[incompatible-return] only called in DEV, so void return is not possible.\n\n\nfunction willCoercionThrow(value) {\n {\n try {\n testStringCoercion(value);\n return false;\n } catch (e) {\n return true;\n }\n }\n}\n\nfunction testStringCoercion(value) {\n // If you ended up here by following an exception call stack, here's what's\n // happened: you supplied an object or symbol value to React (as a prop, key,\n // DOM attribute, CSS property, string ref, etc.) and when React tried to\n // coerce it to a string using `'' + value`, an exception was thrown.\n //\n // The most common types that will cause this exception are `Symbol` instances\n // and Temporal objects like `Temporal.Instant`. But any object that has a\n // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this\n // exception. (Library authors do this to prevent users from using built-in\n // numeric operators like `+` or comparison operators like `>=` because custom\n // methods are needed to perform accurate arithmetic or comparison.)\n //\n // To fix the problem, coerce this object or symbol value to a string before\n // passing it to React. The most reliable way is usually `String(value)`.\n //\n // To find which value is throwing, check the browser or debugger console.\n // Before this exception was thrown, there should be `console.error` output\n // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the\n // problem and how that type was used: key, atrribute, input value prop, etc.\n // In most cases, this console output also shows the component and its\n // ancestor components where the exception happened.\n //\n // eslint-disable-next-line react-internal/safe-string-coercion\n return '' + value;\n}\n\nfunction checkAttributeStringCoercion(value, attributeName) {\n {\n if (willCoercionThrow(value)) {\n error('The provided `%s` attribute is an unsupported type %s.' + ' This value must be coerced to a string before using it here.', attributeName, typeName(value));\n\n return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n }\n }\n}\nfunction checkOptionStringCoercion(value, propName) {\n {\n if (willCoercionThrow(value)) {\n error('The provided `%s` option is an unsupported type %s.' + ' This value must be coerced to a string before using it here.', propName, typeName(value));\n\n return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n }\n }\n}\nfunction checkCSSPropertyStringCoercion(value, propName) {\n {\n if (willCoercionThrow(value)) {\n error('The provided `%s` CSS property is an unsupported type %s.' + ' This value must be coerced to a string before using it here.', propName, typeName(value));\n\n return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n }\n }\n}\nfunction checkHtmlStringCoercion(value) {\n {\n if (willCoercionThrow(value)) {\n error('The provided HTML markup uses a value of unsupported type %s.' + ' This value must be coerced to a string before using it here.', typeName(value));\n\n return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n }\n }\n}\n\n// -----------------------------------------------------------------------------\nvar enableFloat = true; // Enables unstable_useMemoCache hook, intended as a compilation target for\n// Ready for next major.\n//\n// Alias __NEXT_MAJOR__ to false for easier skimming.\n// -----------------------------------------------------------------------------\n\nvar __NEXT_MAJOR__ = false; // Removes legacy style context\nvar enableBigIntSupport = __NEXT_MAJOR__;\n\n// $FlowFixMe[method-unbinding]\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\n/* eslint-disable max-len */\n\nvar ATTRIBUTE_NAME_START_CHAR = \":A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD\";\n/* eslint-enable max-len */\n\nvar ATTRIBUTE_NAME_CHAR = ATTRIBUTE_NAME_START_CHAR + \"\\\\-.0-9\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040\";\nvar VALID_ATTRIBUTE_NAME_REGEX = new RegExp('^[' + ATTRIBUTE_NAME_START_CHAR + '][' + ATTRIBUTE_NAME_CHAR + ']*$');\nvar illegalAttributeNameCache = {};\nvar validatedAttributeNameCache = {};\nfunction isAttributeNameSafe(attributeName) {\n if (hasOwnProperty.call(validatedAttributeNameCache, attributeName)) {\n return true;\n }\n\n if (hasOwnProperty.call(illegalAttributeNameCache, attributeName)) {\n return false;\n }\n\n if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) {\n validatedAttributeNameCache[attributeName] = true;\n return true;\n }\n\n illegalAttributeNameCache[attributeName] = true;\n\n {\n error('Invalid attribute name: `%s`', attributeName);\n }\n\n return false;\n}\n\n/**\n * CSS properties which accept numbers but are not in units of \"px\".\n */\nvar unitlessNumbers = new Set(['animationIterationCount', 'aspectRatio', 'borderImageOutset', 'borderImageSlice', 'borderImageWidth', 'boxFlex', 'boxFlexGroup', 'boxOrdinalGroup', 'columnCount', 'columns', 'flex', 'flexGrow', 'flexPositive', 'flexShrink', 'flexNegative', 'flexOrder', 'gridArea', 'gridRow', 'gridRowEnd', 'gridRowSpan', 'gridRowStart', 'gridColumn', 'gridColumnEnd', 'gridColumnSpan', 'gridColumnStart', 'fontWeight', 'lineClamp', 'lineHeight', 'opacity', 'order', 'orphans', 'scale', 'tabSize', 'widows', 'zIndex', 'zoom', 'fillOpacity', // SVG-related properties\n'floodOpacity', 'stopOpacity', 'strokeDasharray', 'strokeDashoffset', 'strokeMiterlimit', 'strokeOpacity', 'strokeWidth', 'MozAnimationIterationCount', // Known Prefixed Properties\n'MozBoxFlex', // TODO: Remove these since they shouldn't be used in modern code\n'MozBoxFlexGroup', 'MozLineClamp', 'msAnimationIterationCount', 'msFlex', 'msZoom', 'msFlexGrow', 'msFlexNegative', 'msFlexOrder', 'msFlexPositive', 'msFlexShrink', 'msGridColumn', 'msGridColumnSpan', 'msGridRow', 'msGridRowSpan', 'WebkitAnimationIterationCount', 'WebkitBoxFlex', 'WebKitBoxFlexGroup', 'WebkitBoxOrdinalGroup', 'WebkitColumnCount', 'WebkitColumns', 'WebkitFlex', 'WebkitFlexGrow', 'WebkitFlexPositive', 'WebkitFlexShrink', 'WebkitLineClamp']);\nfunction isUnitlessNumber (name) {\n return unitlessNumbers.has(name);\n}\n\nvar aliases = new Map([['acceptCharset', 'accept-charset'], ['htmlFor', 'for'], ['httpEquiv', 'http-equiv'], // HTML and SVG attributes, but the SVG attribute is case sensitive.],\n['crossOrigin', 'crossorigin'], // This is a list of all SVG attributes that need special casing.\n// Regular attributes that just accept strings.],\n['accentHeight', 'accent-height'], ['alignmentBaseline', 'alignment-baseline'], ['arabicForm', 'arabic-form'], ['baselineShift', 'baseline-shift'], ['capHeight', 'cap-height'], ['clipPath', 'clip-path'], ['clipRule', 'clip-rule'], ['colorInterpolation', 'color-interpolation'], ['colorInterpolationFilters', 'color-interpolation-filters'], ['colorProfile', 'color-profile'], ['colorRendering', 'color-rendering'], ['dominantBaseline', 'dominant-baseline'], ['enableBackground', 'enable-background'], ['fillOpacity', 'fill-opacity'], ['fillRule', 'fill-rule'], ['floodColor', 'flood-color'], ['floodOpacity', 'flood-opacity'], ['fontFamily', 'font-family'], ['fontSize', 'font-size'], ['fontSizeAdjust', 'font-size-adjust'], ['fontStretch', 'font-stretch'], ['fontStyle', 'font-style'], ['fontVariant', 'font-variant'], ['fontWeight', 'font-weight'], ['glyphName', 'glyph-name'], ['glyphOrientationHorizontal', 'glyph-orientation-horizontal'], ['glyphOrientationVertical', 'glyph-orientation-vertical'], ['horizAdvX', 'horiz-adv-x'], ['horizOriginX', 'horiz-origin-x'], ['imageRendering', 'image-rendering'], ['letterSpacing', 'letter-spacing'], ['lightingColor', 'lighting-color'], ['markerEnd', 'marker-end'], ['markerMid', 'marker-mid'], ['markerStart', 'marker-start'], ['overlinePosition', 'overline-position'], ['overlineThickness', 'overline-thickness'], ['paintOrder', 'paint-order'], ['panose-1', 'panose-1'], ['pointerEvents', 'pointer-events'], ['renderingIntent', 'rendering-intent'], ['shapeRendering', 'shape-rendering'], ['stopColor', 'stop-color'], ['stopOpacity', 'stop-opacity'], ['strikethroughPosition', 'strikethrough-position'], ['strikethroughThickness', 'strikethrough-thickness'], ['strokeDasharray', 'stroke-dasharray'], ['strokeDashoffset', 'stroke-dashoffset'], ['strokeLinecap', 'stroke-linecap'], ['strokeLinejoin', 'stroke-linejoin'], ['strokeMiterlimit', 'stroke-miterlimit'], ['strokeOpacity', 'stroke-opacity'], ['strokeWidth', 'stroke-width'], ['textAnchor', 'text-anchor'], ['textDecoration', 'text-decoration'], ['textRendering', 'text-rendering'], ['transformOrigin', 'transform-origin'], ['underlinePosition', 'underline-position'], ['underlineThickness', 'underline-thickness'], ['unicodeBidi', 'unicode-bidi'], ['unicodeRange', 'unicode-range'], ['unitsPerEm', 'units-per-em'], ['vAlphabetic', 'v-alphabetic'], ['vHanging', 'v-hanging'], ['vIdeographic', 'v-ideographic'], ['vMathematical', 'v-mathematical'], ['vectorEffect', 'vector-effect'], ['vertAdvY', 'vert-adv-y'], ['vertOriginX', 'vert-origin-x'], ['vertOriginY', 'vert-origin-y'], ['wordSpacing', 'word-spacing'], ['writingMode', 'writing-mode'], ['xmlnsXlink', 'xmlns:xlink'], ['xHeight', 'x-height']]);\nfunction getAttributeAlias (name) {\n return aliases.get(name) || name;\n}\n\nvar hasReadOnlyValue = {\n button: true,\n checkbox: true,\n image: true,\n hidden: true,\n radio: true,\n reset: true,\n submit: true\n};\nfunction checkControlledValueProps(tagName, props) {\n {\n if (!(hasReadOnlyValue[props.type] || props.onChange || props.onInput || props.readOnly || props.disabled || props.value == null)) {\n if (tagName === 'select') {\n error('You provided a `value` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultValue`. Otherwise, set `onChange`.');\n } else {\n error('You provided a `value` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`.');\n }\n }\n\n if (!(props.onChange || props.readOnly || props.disabled || props.checked == null)) {\n error('You provided a `checked` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultChecked`. Otherwise, ' + 'set either `onChange` or `readOnly`.');\n }\n }\n}\n\nvar ariaProperties = {\n 'aria-current': 0,\n // state\n 'aria-description': 0,\n 'aria-details': 0,\n 'aria-disabled': 0,\n // state\n 'aria-hidden': 0,\n // state\n 'aria-invalid': 0,\n // state\n 'aria-keyshortcuts': 0,\n 'aria-label': 0,\n 'aria-roledescription': 0,\n // Widget Attributes\n 'aria-autocomplete': 0,\n 'aria-checked': 0,\n 'aria-expanded': 0,\n 'aria-haspopup': 0,\n 'aria-level': 0,\n 'aria-modal': 0,\n 'aria-multiline': 0,\n 'aria-multiselectable': 0,\n 'aria-orientation': 0,\n 'aria-placeholder': 0,\n 'aria-pressed': 0,\n 'aria-readonly': 0,\n 'aria-required': 0,\n 'aria-selected': 0,\n 'aria-sort': 0,\n 'aria-valuemax': 0,\n 'aria-valuemin': 0,\n 'aria-valuenow': 0,\n 'aria-valuetext': 0,\n // Live Region Attributes\n 'aria-atomic': 0,\n 'aria-busy': 0,\n 'aria-live': 0,\n 'aria-relevant': 0,\n // Drag-and-Drop Attributes\n 'aria-dropeffect': 0,\n 'aria-grabbed': 0,\n // Relationship Attributes\n 'aria-activedescendant': 0,\n 'aria-colcount': 0,\n 'aria-colindex': 0,\n 'aria-colspan': 0,\n 'aria-controls': 0,\n 'aria-describedby': 0,\n 'aria-errormessage': 0,\n 'aria-flowto': 0,\n 'aria-labelledby': 0,\n 'aria-owns': 0,\n 'aria-posinset': 0,\n 'aria-rowcount': 0,\n 'aria-rowindex': 0,\n 'aria-rowspan': 0,\n 'aria-setsize': 0\n};\n\nvar warnedProperties$1 = {};\nvar rARIA$1 = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$');\nvar rARIACamel$1 = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$');\n\nfunction validateProperty$1(tagName, name) {\n {\n if (hasOwnProperty.call(warnedProperties$1, name) && warnedProperties$1[name]) {\n return true;\n }\n\n if (rARIACamel$1.test(name)) {\n var ariaName = 'aria-' + name.slice(4).toLowerCase();\n var correctName = ariaProperties.hasOwnProperty(ariaName) ? ariaName : null; // If this is an aria-* attribute, but is not listed in the known DOM\n // DOM properties, then it is an invalid aria-* attribute.\n\n if (correctName == null) {\n error('Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.', name);\n\n warnedProperties$1[name] = true;\n return true;\n } // aria-* attributes should be lowercase; suggest the lowercase version.\n\n\n if (name !== correctName) {\n error('Invalid ARIA attribute `%s`. Did you mean `%s`?', name, correctName);\n\n warnedProperties$1[name] = true;\n return true;\n }\n }\n\n if (rARIA$1.test(name)) {\n var lowerCasedName = name.toLowerCase();\n var standardName = ariaProperties.hasOwnProperty(lowerCasedName) ? lowerCasedName : null; // If this is an aria-* attribute, but is not listed in the known DOM\n // DOM properties, then it is an invalid aria-* attribute.\n\n if (standardName == null) {\n warnedProperties$1[name] = true;\n return false;\n } // aria-* attributes should be lowercase; suggest the lowercase version.\n\n\n if (name !== standardName) {\n error('Unknown ARIA attribute `%s`. Did you mean `%s`?', name, standardName);\n\n warnedProperties$1[name] = true;\n return true;\n }\n }\n }\n\n return true;\n}\n\nfunction validateProperties$2(type, props) {\n {\n var invalidProps = [];\n\n for (var key in props) {\n var isValid = validateProperty$1(type, key);\n\n if (!isValid) {\n invalidProps.push(key);\n }\n }\n\n var unknownPropString = invalidProps.map(function (prop) {\n return '`' + prop + '`';\n }).join(', ');\n\n if (invalidProps.length === 1) {\n error('Invalid aria prop %s on <%s> tag. ' + 'For details, see https://react.dev/link/invalid-aria-props', unknownPropString, type);\n } else if (invalidProps.length > 1) {\n error('Invalid aria props %s on <%s> tag. ' + 'For details, see https://react.dev/link/invalid-aria-props', unknownPropString, type);\n }\n }\n}\n\nvar didWarnValueNull = false;\nfunction validateProperties$1(type, props) {\n {\n if (type !== 'input' && type !== 'textarea' && type !== 'select') {\n return;\n }\n\n if (props != null && props.value === null && !didWarnValueNull) {\n didWarnValueNull = true;\n\n if (type === 'select' && props.multiple) {\n error('`value` prop on `%s` should not be null. ' + 'Consider using an empty array when `multiple` is set to `true` ' + 'to clear the component or `undefined` for uncontrolled components.', type);\n } else {\n error('`value` prop on `%s` should not be null. ' + 'Consider using an empty string to clear the component or `undefined` ' + 'for uncontrolled components.', type);\n }\n }\n }\n}\n\nfunction isCustomElement(tagName, props) {\n if (tagName.indexOf('-') === -1) {\n return false;\n }\n\n switch (tagName) {\n // These are reserved SVG and MathML elements.\n // We don't mind this list too much because we expect it to never grow.\n // The alternative is to track the namespace in a few places which is convoluted.\n // https://html.spec.whatwg.org/multipage/custom-elements.html#custom-elements-core-concepts\n case 'annotation-xml':\n case 'color-profile':\n case 'font-face':\n case 'font-face-src':\n case 'font-face-uri':\n case 'font-face-format':\n case 'font-face-name':\n case 'missing-glyph':\n return false;\n\n default:\n return true;\n }\n}\n\n// also add them to this module to ensure casing and incorrect name\n// warnings.\n\nvar possibleStandardNames = {\n // HTML\n accept: 'accept',\n acceptcharset: 'acceptCharset',\n 'accept-charset': 'acceptCharset',\n accesskey: 'accessKey',\n action: 'action',\n allowfullscreen: 'allowFullScreen',\n alt: 'alt',\n as: 'as',\n async: 'async',\n autocapitalize: 'autoCapitalize',\n autocomplete: 'autoComplete',\n autocorrect: 'autoCorrect',\n autofocus: 'autoFocus',\n autoplay: 'autoPlay',\n autosave: 'autoSave',\n capture: 'capture',\n cellpadding: 'cellPadding',\n cellspacing: 'cellSpacing',\n challenge: 'challenge',\n charset: 'charSet',\n checked: 'checked',\n children: 'children',\n cite: 'cite',\n class: 'className',\n classid: 'classID',\n classname: 'className',\n cols: 'cols',\n colspan: 'colSpan',\n content: 'content',\n contenteditable: 'contentEditable',\n contextmenu: 'contextMenu',\n controls: 'controls',\n controlslist: 'controlsList',\n coords: 'coords',\n crossorigin: 'crossOrigin',\n dangerouslysetinnerhtml: 'dangerouslySetInnerHTML',\n data: 'data',\n datetime: 'dateTime',\n default: 'default',\n defaultchecked: 'defaultChecked',\n defaultvalue: 'defaultValue',\n defer: 'defer',\n dir: 'dir',\n disabled: 'disabled',\n disablepictureinpicture: 'disablePictureInPicture',\n disableremoteplayback: 'disableRemotePlayback',\n download: 'download',\n draggable: 'draggable',\n enctype: 'encType',\n enterkeyhint: 'enterKeyHint',\n fetchpriority: 'fetchPriority',\n for: 'htmlFor',\n form: 'form',\n formmethod: 'formMethod',\n formaction: 'formAction',\n formenctype: 'formEncType',\n formnovalidate: 'formNoValidate',\n formtarget: 'formTarget',\n frameborder: 'frameBorder',\n headers: 'headers',\n height: 'height',\n hidden: 'hidden',\n high: 'high',\n href: 'href',\n hreflang: 'hrefLang',\n htmlfor: 'htmlFor',\n httpequiv: 'httpEquiv',\n 'http-equiv': 'httpEquiv',\n icon: 'icon',\n id: 'id',\n imagesizes: 'imageSizes',\n imagesrcset: 'imageSrcSet',\n innerhtml: 'innerHTML',\n inputmode: 'inputMode',\n integrity: 'integrity',\n is: 'is',\n itemid: 'itemID',\n itemprop: 'itemProp',\n itemref: 'itemRef',\n itemscope: 'itemScope',\n itemtype: 'itemType',\n keyparams: 'keyParams',\n keytype: 'keyType',\n kind: 'kind',\n label: 'label',\n lang: 'lang',\n list: 'list',\n loop: 'loop',\n low: 'low',\n manifest: 'manifest',\n marginwidth: 'marginWidth',\n marginheight: 'marginHeight',\n max: 'max',\n maxlength: 'maxLength',\n media: 'media',\n mediagroup: 'mediaGroup',\n method: 'method',\n min: 'min',\n minlength: 'minLength',\n multiple: 'multiple',\n muted: 'muted',\n name: 'name',\n nomodule: 'noModule',\n nonce: 'nonce',\n novalidate: 'noValidate',\n open: 'open',\n optimum: 'optimum',\n pattern: 'pattern',\n placeholder: 'placeholder',\n playsinline: 'playsInline',\n poster: 'poster',\n preload: 'preload',\n profile: 'profile',\n radiogroup: 'radioGroup',\n readonly: 'readOnly',\n referrerpolicy: 'referrerPolicy',\n rel: 'rel',\n required: 'required',\n reversed: 'reversed',\n role: 'role',\n rows: 'rows',\n rowspan: 'rowSpan',\n sandbox: 'sandbox',\n scope: 'scope',\n scoped: 'scoped',\n scrolling: 'scrolling',\n seamless: 'seamless',\n selected: 'selected',\n shape: 'shape',\n size: 'size',\n sizes: 'sizes',\n span: 'span',\n spellcheck: 'spellCheck',\n src: 'src',\n srcdoc: 'srcDoc',\n srclang: 'srcLang',\n srcset: 'srcSet',\n start: 'start',\n step: 'step',\n style: 'style',\n summary: 'summary',\n tabindex: 'tabIndex',\n target: 'target',\n title: 'title',\n type: 'type',\n usemap: 'useMap',\n value: 'value',\n width: 'width',\n wmode: 'wmode',\n wrap: 'wrap',\n // SVG\n about: 'about',\n accentheight: 'accentHeight',\n 'accent-height': 'accentHeight',\n accumulate: 'accumulate',\n additive: 'additive',\n alignmentbaseline: 'alignmentBaseline',\n 'alignment-baseline': 'alignmentBaseline',\n allowreorder: 'allowReorder',\n alphabetic: 'alphabetic',\n amplitude: 'amplitude',\n arabicform: 'arabicForm',\n 'arabic-form': 'arabicForm',\n ascent: 'ascent',\n attributename: 'attributeName',\n attributetype: 'attributeType',\n autoreverse: 'autoReverse',\n azimuth: 'azimuth',\n basefrequency: 'baseFrequency',\n baselineshift: 'baselineShift',\n 'baseline-shift': 'baselineShift',\n baseprofile: 'baseProfile',\n bbox: 'bbox',\n begin: 'begin',\n bias: 'bias',\n by: 'by',\n calcmode: 'calcMode',\n capheight: 'capHeight',\n 'cap-height': 'capHeight',\n clip: 'clip',\n clippath: 'clipPath',\n 'clip-path': 'clipPath',\n clippathunits: 'clipPathUnits',\n cliprule: 'clipRule',\n 'clip-rule': 'clipRule',\n color: 'color',\n colorinterpolation: 'colorInterpolation',\n 'color-interpolation': 'colorInterpolation',\n colorinterpolationfilters: 'colorInterpolationFilters',\n 'color-interpolation-filters': 'colorInterpolationFilters',\n colorprofile: 'colorProfile',\n 'color-profile': 'colorProfile',\n colorrendering: 'colorRendering',\n 'color-rendering': 'colorRendering',\n contentscripttype: 'contentScriptType',\n contentstyletype: 'contentStyleType',\n cursor: 'cursor',\n cx: 'cx',\n cy: 'cy',\n d: 'd',\n datatype: 'datatype',\n decelerate: 'decelerate',\n descent: 'descent',\n diffuseconstant: 'diffuseConstant',\n direction: 'direction',\n display: 'display',\n divisor: 'divisor',\n dominantbaseline: 'dominantBaseline',\n 'dominant-baseline': 'dominantBaseline',\n dur: 'dur',\n dx: 'dx',\n dy: 'dy',\n edgemode: 'edgeMode',\n elevation: 'elevation',\n enablebackground: 'enableBackground',\n 'enable-background': 'enableBackground',\n end: 'end',\n exponent: 'exponent',\n externalresourcesrequired: 'externalResourcesRequired',\n fill: 'fill',\n fillopacity: 'fillOpacity',\n 'fill-opacity': 'fillOpacity',\n fillrule: 'fillRule',\n 'fill-rule': 'fillRule',\n filter: 'filter',\n filterres: 'filterRes',\n filterunits: 'filterUnits',\n floodopacity: 'floodOpacity',\n 'flood-opacity': 'floodOpacity',\n floodcolor: 'floodColor',\n 'flood-color': 'floodColor',\n focusable: 'focusable',\n fontfamily: 'fontFamily',\n 'font-family': 'fontFamily',\n fontsize: 'fontSize',\n 'font-size': 'fontSize',\n fontsizeadjust: 'fontSizeAdjust',\n 'font-size-adjust': 'fontSizeAdjust',\n fontstretch: 'fontStretch',\n 'font-stretch': 'fontStretch',\n fontstyle: 'fontStyle',\n 'font-style': 'fontStyle',\n fontvariant: 'fontVariant',\n 'font-variant': 'fontVariant',\n fontweight: 'fontWeight',\n 'font-weight': 'fontWeight',\n format: 'format',\n from: 'from',\n fx: 'fx',\n fy: 'fy',\n g1: 'g1',\n g2: 'g2',\n glyphname: 'glyphName',\n 'glyph-name': 'glyphName',\n glyphorientationhorizontal: 'glyphOrientationHorizontal',\n 'glyph-orientation-horizontal': 'glyphOrientationHorizontal',\n glyphorientationvertical: 'glyphOrientationVertical',\n 'glyph-orientation-vertical': 'glyphOrientationVertical',\n glyphref: 'glyphRef',\n gradienttransform: 'gradientTransform',\n gradientunits: 'gradientUnits',\n hanging: 'hanging',\n horizadvx: 'horizAdvX',\n 'horiz-adv-x': 'horizAdvX',\n horizoriginx: 'horizOriginX',\n 'horiz-origin-x': 'horizOriginX',\n ideographic: 'ideographic',\n imagerendering: 'imageRendering',\n 'image-rendering': 'imageRendering',\n in2: 'in2',\n in: 'in',\n inlist: 'inlist',\n intercept: 'intercept',\n k1: 'k1',\n k2: 'k2',\n k3: 'k3',\n k4: 'k4',\n k: 'k',\n kernelmatrix: 'kernelMatrix',\n kernelunitlength: 'kernelUnitLength',\n kerning: 'kerning',\n keypoints: 'keyPoints',\n keysplines: 'keySplines',\n keytimes: 'keyTimes',\n lengthadjust: 'lengthAdjust',\n letterspacing: 'letterSpacing',\n 'letter-spacing': 'letterSpacing',\n lightingcolor: 'lightingColor',\n 'lighting-color': 'lightingColor',\n limitingconeangle: 'limitingConeAngle',\n local: 'local',\n markerend: 'markerEnd',\n 'marker-end': 'markerEnd',\n markerheight: 'markerHeight',\n markermid: 'markerMid',\n 'marker-mid': 'markerMid',\n markerstart: 'markerStart',\n 'marker-start': 'markerStart',\n markerunits: 'markerUnits',\n markerwidth: 'markerWidth',\n mask: 'mask',\n maskcontentunits: 'maskContentUnits',\n maskunits: 'maskUnits',\n mathematical: 'mathematical',\n mode: 'mode',\n numoctaves: 'numOctaves',\n offset: 'offset',\n opacity: 'opacity',\n operator: 'operator',\n order: 'order',\n orient: 'orient',\n orientation: 'orientation',\n origin: 'origin',\n overflow: 'overflow',\n overlineposition: 'overlinePosition',\n 'overline-position': 'overlinePosition',\n overlinethickness: 'overlineThickness',\n 'overline-thickness': 'overlineThickness',\n paintorder: 'paintOrder',\n 'paint-order': 'paintOrder',\n panose1: 'panose1',\n 'panose-1': 'panose1',\n pathlength: 'pathLength',\n patterncontentunits: 'patternContentUnits',\n patterntransform: 'patternTransform',\n patternunits: 'patternUnits',\n pointerevents: 'pointerEvents',\n 'pointer-events': 'pointerEvents',\n points: 'points',\n pointsatx: 'pointsAtX',\n pointsaty: 'pointsAtY',\n pointsatz: 'pointsAtZ',\n prefix: 'prefix',\n preservealpha: 'preserveAlpha',\n preserveaspectratio: 'preserveAspectRatio',\n primitiveunits: 'primitiveUnits',\n property: 'property',\n r: 'r',\n radius: 'radius',\n refx: 'refX',\n refy: 'refY',\n renderingintent: 'renderingIntent',\n 'rendering-intent': 'renderingIntent',\n repeatcount: 'repeatCount',\n repeatdur: 'repeatDur',\n requiredextensions: 'requiredExtensions',\n requiredfeatures: 'requiredFeatures',\n resource: 'resource',\n restart: 'restart',\n result: 'result',\n results: 'results',\n rotate: 'rotate',\n rx: 'rx',\n ry: 'ry',\n scale: 'scale',\n security: 'security',\n seed: 'seed',\n shaperendering: 'shapeRendering',\n 'shape-rendering': 'shapeRendering',\n slope: 'slope',\n spacing: 'spacing',\n specularconstant: 'specularConstant',\n specularexponent: 'specularExponent',\n speed: 'speed',\n spreadmethod: 'spreadMethod',\n startoffset: 'startOffset',\n stddeviation: 'stdDeviation',\n stemh: 'stemh',\n stemv: 'stemv',\n stitchtiles: 'stitchTiles',\n stopcolor: 'stopColor',\n 'stop-color': 'stopColor',\n stopopacity: 'stopOpacity',\n 'stop-opacity': 'stopOpacity',\n strikethroughposition: 'strikethroughPosition',\n 'strikethrough-position': 'strikethroughPosition',\n strikethroughthickness: 'strikethroughThickness',\n 'strikethrough-thickness': 'strikethroughThickness',\n string: 'string',\n stroke: 'stroke',\n strokedasharray: 'strokeDasharray',\n 'stroke-dasharray': 'strokeDasharray',\n strokedashoffset: 'strokeDashoffset',\n 'stroke-dashoffset': 'strokeDashoffset',\n strokelinecap: 'strokeLinecap',\n 'stroke-linecap': 'strokeLinecap',\n strokelinejoin: 'strokeLinejoin',\n 'stroke-linejoin': 'strokeLinejoin',\n strokemiterlimit: 'strokeMiterlimit',\n 'stroke-miterlimit': 'strokeMiterlimit',\n strokewidth: 'strokeWidth',\n 'stroke-width': 'strokeWidth',\n strokeopacity: 'strokeOpacity',\n 'stroke-opacity': 'strokeOpacity',\n suppresscontenteditablewarning: 'suppressContentEditableWarning',\n suppresshydrationwarning: 'suppressHydrationWarning',\n surfacescale: 'surfaceScale',\n systemlanguage: 'systemLanguage',\n tablevalues: 'tableValues',\n targetx: 'targetX',\n targety: 'targetY',\n textanchor: 'textAnchor',\n 'text-anchor': 'textAnchor',\n textdecoration: 'textDecoration',\n 'text-decoration': 'textDecoration',\n textlength: 'textLength',\n textrendering: 'textRendering',\n 'text-rendering': 'textRendering',\n to: 'to',\n transform: 'transform',\n transformorigin: 'transformOrigin',\n 'transform-origin': 'transformOrigin',\n typeof: 'typeof',\n u1: 'u1',\n u2: 'u2',\n underlineposition: 'underlinePosition',\n 'underline-position': 'underlinePosition',\n underlinethickness: 'underlineThickness',\n 'underline-thickness': 'underlineThickness',\n unicode: 'unicode',\n unicodebidi: 'unicodeBidi',\n 'unicode-bidi': 'unicodeBidi',\n unicoderange: 'unicodeRange',\n 'unicode-range': 'unicodeRange',\n unitsperem: 'unitsPerEm',\n 'units-per-em': 'unitsPerEm',\n unselectable: 'unselectable',\n valphabetic: 'vAlphabetic',\n 'v-alphabetic': 'vAlphabetic',\n values: 'values',\n vectoreffect: 'vectorEffect',\n 'vector-effect': 'vectorEffect',\n version: 'version',\n vertadvy: 'vertAdvY',\n 'vert-adv-y': 'vertAdvY',\n vertoriginx: 'vertOriginX',\n 'vert-origin-x': 'vertOriginX',\n vertoriginy: 'vertOriginY',\n 'vert-origin-y': 'vertOriginY',\n vhanging: 'vHanging',\n 'v-hanging': 'vHanging',\n videographic: 'vIdeographic',\n 'v-ideographic': 'vIdeographic',\n viewbox: 'viewBox',\n viewtarget: 'viewTarget',\n visibility: 'visibility',\n vmathematical: 'vMathematical',\n 'v-mathematical': 'vMathematical',\n vocab: 'vocab',\n widths: 'widths',\n wordspacing: 'wordSpacing',\n 'word-spacing': 'wordSpacing',\n writingmode: 'writingMode',\n 'writing-mode': 'writingMode',\n x1: 'x1',\n x2: 'x2',\n x: 'x',\n xchannelselector: 'xChannelSelector',\n xheight: 'xHeight',\n 'x-height': 'xHeight',\n xlinkactuate: 'xlinkActuate',\n 'xlink:actuate': 'xlinkActuate',\n xlinkarcrole: 'xlinkArcrole',\n 'xlink:arcrole': 'xlinkArcrole',\n xlinkhref: 'xlinkHref',\n 'xlink:href': 'xlinkHref',\n xlinkrole: 'xlinkRole',\n 'xlink:role': 'xlinkRole',\n xlinkshow: 'xlinkShow',\n 'xlink:show': 'xlinkShow',\n xlinktitle: 'xlinkTitle',\n 'xlink:title': 'xlinkTitle',\n xlinktype: 'xlinkType',\n 'xlink:type': 'xlinkType',\n xmlbase: 'xmlBase',\n 'xml:base': 'xmlBase',\n xmllang: 'xmlLang',\n 'xml:lang': 'xmlLang',\n xmlns: 'xmlns',\n 'xml:space': 'xmlSpace',\n xmlnsxlink: 'xmlnsXlink',\n 'xmlns:xlink': 'xmlnsXlink',\n xmlspace: 'xmlSpace',\n y1: 'y1',\n y2: 'y2',\n y: 'y',\n ychannelselector: 'yChannelSelector',\n z: 'z',\n zoomandpan: 'zoomAndPan'\n};\n\nvar warnedProperties = {};\nvar EVENT_NAME_REGEX = /^on./;\nvar INVALID_EVENT_NAME_REGEX = /^on[^A-Z]/;\nvar rARIA = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$') ;\nvar rARIACamel = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$') ;\n\nfunction validateProperty(tagName, name, value, eventRegistry) {\n {\n if (hasOwnProperty.call(warnedProperties, name) && warnedProperties[name]) {\n return true;\n }\n\n var lowerCasedName = name.toLowerCase();\n\n if (lowerCasedName === 'onfocusin' || lowerCasedName === 'onfocusout') {\n error('React uses onFocus and onBlur instead of onFocusIn and onFocusOut. ' + 'All React events are normalized to bubble, so onFocusIn and onFocusOut ' + 'are not needed/supported by React.');\n\n warnedProperties[name] = true;\n return true;\n }\n\n {\n // Actions are special because unlike events they can have other value types.\n if (typeof value === 'function') {\n if (tagName === 'form' && name === 'action') {\n return true;\n }\n\n if (tagName === 'input' && name === 'formAction') {\n return true;\n }\n\n if (tagName === 'button' && name === 'formAction') {\n return true;\n }\n }\n } // We can't rely on the event system being injected on the server.\n\n\n if (eventRegistry != null) {\n var registrationNameDependencies = eventRegistry.registrationNameDependencies,\n possibleRegistrationNames = eventRegistry.possibleRegistrationNames;\n\n if (registrationNameDependencies.hasOwnProperty(name)) {\n return true;\n }\n\n var registrationName = possibleRegistrationNames.hasOwnProperty(lowerCasedName) ? possibleRegistrationNames[lowerCasedName] : null;\n\n if (registrationName != null) {\n error('Invalid event handler property `%s`. Did you mean `%s`?', name, registrationName);\n\n warnedProperties[name] = true;\n return true;\n }\n\n if (EVENT_NAME_REGEX.test(name)) {\n error('Unknown event handler property `%s`. It will be ignored.', name);\n\n warnedProperties[name] = true;\n return true;\n }\n } else if (EVENT_NAME_REGEX.test(name)) {\n // If no event plugins have been injected, we are in a server environment.\n // So we can't tell if the event name is correct for sure, but we can filter\n // out known bad ones like `onclick`. We can't suggest a specific replacement though.\n if (INVALID_EVENT_NAME_REGEX.test(name)) {\n error('Invalid event handler property `%s`. ' + 'React events use the camelCase naming convention, for example `onClick`.', name);\n }\n\n warnedProperties[name] = true;\n return true;\n } // Let the ARIA attribute hook validate ARIA attributes\n\n\n if (rARIA.test(name) || rARIACamel.test(name)) {\n return true;\n }\n\n if (lowerCasedName === 'innerhtml') {\n error('Directly setting property `innerHTML` is not permitted. ' + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.');\n\n warnedProperties[name] = true;\n return true;\n }\n\n if (lowerCasedName === 'aria') {\n error('The `aria` attribute is reserved for future use in React. ' + 'Pass individual `aria-` attributes instead.');\n\n warnedProperties[name] = true;\n return true;\n }\n\n if (lowerCasedName === 'is' && value !== null && value !== undefined && typeof value !== 'string') {\n error('Received a `%s` for a string attribute `is`. If this is expected, cast ' + 'the value to a string.', typeof value);\n\n warnedProperties[name] = true;\n return true;\n }\n\n if (typeof value === 'number' && isNaN(value)) {\n error('Received NaN for the `%s` attribute. If this is expected, cast ' + 'the value to a string.', name);\n\n warnedProperties[name] = true;\n return true;\n } // Known attributes should match the casing specified in the property config.\n\n\n if (possibleStandardNames.hasOwnProperty(lowerCasedName)) {\n var standardName = possibleStandardNames[lowerCasedName];\n\n if (standardName !== name) {\n error('Invalid DOM property `%s`. Did you mean `%s`?', name, standardName);\n\n warnedProperties[name] = true;\n return true;\n }\n } else if (name !== lowerCasedName) {\n // Unknown attributes should have lowercase casing since that's how they\n // will be cased anyway with server rendering.\n error('React does not recognize the `%s` prop on a DOM element. If you ' + 'intentionally want it to appear in the DOM as a custom ' + 'attribute, spell it as lowercase `%s` instead. ' + 'If you accidentally passed it from a parent component, remove ' + 'it from the DOM element.', name, lowerCasedName);\n\n warnedProperties[name] = true;\n return true;\n } // Now that we've validated casing, do not validate\n // data types for reserved props\n\n\n switch (name) {\n case 'dangerouslySetInnerHTML':\n case 'children':\n case 'style':\n case 'suppressContentEditableWarning':\n case 'suppressHydrationWarning':\n case 'defaultValue': // Reserved\n\n case 'defaultChecked':\n case 'innerHTML':\n case 'ref':\n {\n return true;\n }\n\n }\n\n switch (typeof value) {\n case 'boolean':\n {\n switch (name) {\n case 'autoFocus':\n case 'checked':\n case 'multiple':\n case 'muted':\n case 'selected':\n case 'contentEditable':\n case 'spellCheck':\n case 'draggable':\n case 'value':\n case 'autoReverse':\n case 'externalResourcesRequired':\n case 'focusable':\n case 'preserveAlpha':\n case 'allowFullScreen':\n case 'async':\n case 'autoPlay':\n case 'controls':\n case 'default':\n case 'defer':\n case 'disabled':\n case 'disablePictureInPicture':\n case 'disableRemotePlayback':\n case 'formNoValidate':\n case 'hidden':\n case 'loop':\n case 'noModule':\n case 'noValidate':\n case 'open':\n case 'playsInline':\n case 'readOnly':\n case 'required':\n case 'reversed':\n case 'scoped':\n case 'seamless':\n case 'itemScope':\n case 'capture':\n case 'download':\n {\n // Boolean properties can accept boolean values\n return true;\n }\n // fallthrough\n\n case 'inert':\n // fallthrough for new boolean props without the flag on\n\n default:\n {\n var prefix = name.toLowerCase().slice(0, 5);\n\n if (prefix === 'data-' || prefix === 'aria-') {\n return true;\n }\n\n if (value) {\n error('Received `%s` for a non-boolean attribute `%s`.\\n\\n' + 'If you want to write it to the DOM, pass a string instead: ' + '%s=\"%s\" or %s={value.toString()}.', value, name, name, value, name);\n } else {\n error('Received `%s` for a non-boolean attribute `%s`.\\n\\n' + 'If you want to write it to the DOM, pass a string instead: ' + '%s=\"%s\" or %s={value.toString()}.\\n\\n' + 'If you used to conditionally omit it with %s={condition && value}, ' + 'pass %s={condition ? value : undefined} instead.', value, name, name, value, name, name, name);\n }\n\n warnedProperties[name] = true;\n return true;\n }\n }\n }\n\n case 'function':\n case 'symbol':\n // eslint-disable-line\n // Warn when a known attribute is a bad type\n warnedProperties[name] = true;\n return false;\n\n case 'string':\n {\n // Warn when passing the strings 'false' or 'true' into a boolean prop\n if (value === 'false' || value === 'true') {\n switch (name) {\n case 'checked':\n case 'selected':\n case 'multiple':\n case 'muted':\n case 'allowFullScreen':\n case 'async':\n case 'autoPlay':\n case 'controls':\n case 'default':\n case 'defer':\n case 'disabled':\n case 'disablePictureInPicture':\n case 'disableRemotePlayback':\n case 'formNoValidate':\n case 'hidden':\n case 'loop':\n case 'noModule':\n case 'noValidate':\n case 'open':\n case 'playsInline':\n case 'readOnly':\n case 'required':\n case 'reversed':\n case 'scoped':\n case 'seamless':\n case 'itemScope':\n {\n break;\n }\n\n case 'inert':\n // fallthrough for new boolean props without the flag on\n\n default:\n {\n return true;\n }\n }\n\n error('Received the string `%s` for the boolean attribute `%s`. ' + '%s ' + 'Did you mean %s={%s}?', value, name, value === 'false' ? 'The browser will interpret it as a truthy value.' : 'Although this works, it will not work as expected if you pass the string \"false\".', name, value);\n\n warnedProperties[name] = true;\n return true;\n }\n }\n }\n\n return true;\n }\n}\n\nfunction warnUnknownProperties(type, props, eventRegistry) {\n {\n var unknownProps = [];\n\n for (var key in props) {\n var isValid = validateProperty(type, key, props[key], eventRegistry);\n\n if (!isValid) {\n unknownProps.push(key);\n }\n }\n\n var unknownPropString = unknownProps.map(function (prop) {\n return '`' + prop + '`';\n }).join(', ');\n\n if (unknownProps.length === 1) {\n error('Invalid value for prop %s on <%s> tag. Either remove it from the element, ' + 'or pass a string or number value to keep it in the DOM. ' + 'For details, see https://react.dev/link/attribute-behavior ', unknownPropString, type);\n } else if (unknownProps.length > 1) {\n error('Invalid values for props %s on <%s> tag. Either remove them from the element, ' + 'or pass a string or number value to keep them in the DOM. ' + 'For details, see https://react.dev/link/attribute-behavior ', unknownPropString, type);\n }\n }\n}\n\nfunction validateProperties(type, props, eventRegistry) {\n if (isCustomElement(type) || typeof props.is === 'string') {\n return;\n }\n\n warnUnknownProperties(type, props, eventRegistry);\n}\n\n// 'msTransform' is correct, but the other prefixes should be capitalized\nvar badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/;\nvar msPattern$1 = /^-ms-/;\nvar hyphenPattern = /-(.)/g; // style values shouldn't contain a semicolon\n\nvar badStyleValueWithSemicolonPattern = /;\\s*$/;\nvar warnedStyleNames = {};\nvar warnedStyleValues = {};\nvar warnedForNaNValue = false;\nvar warnedForInfinityValue = false;\n\nfunction camelize(string) {\n return string.replace(hyphenPattern, function (_, character) {\n return character.toUpperCase();\n });\n}\n\nfunction warnHyphenatedStyleName(name) {\n {\n if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {\n return;\n }\n\n warnedStyleNames[name] = true;\n\n error('Unsupported style property %s. Did you mean %s?', name, // As Andi Smith suggests\n // (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix\n // is converted to lowercase `ms`.\n camelize(name.replace(msPattern$1, 'ms-')));\n }\n}\n\nfunction warnBadVendoredStyleName(name) {\n {\n if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {\n return;\n }\n\n warnedStyleNames[name] = true;\n\n error('Unsupported vendor-prefixed style property %s. Did you mean %s?', name, name.charAt(0).toUpperCase() + name.slice(1));\n }\n}\n\nfunction warnStyleValueWithSemicolon(name, value) {\n {\n if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) {\n return;\n }\n\n warnedStyleValues[value] = true;\n\n error(\"Style property values shouldn't contain a semicolon. \" + 'Try \"%s: %s\" instead.', name, value.replace(badStyleValueWithSemicolonPattern, ''));\n }\n}\n\nfunction warnStyleValueIsNaN(name, value) {\n {\n if (warnedForNaNValue) {\n return;\n }\n\n warnedForNaNValue = true;\n\n error('`NaN` is an invalid value for the `%s` css style property.', name);\n }\n}\n\nfunction warnStyleValueIsInfinity(name, value) {\n {\n if (warnedForInfinityValue) {\n return;\n }\n\n warnedForInfinityValue = true;\n\n error('`Infinity` is an invalid value for the `%s` css style property.', name);\n }\n}\n\nfunction warnValidStyle(name, value) {\n {\n if (name.indexOf('-') > -1) {\n warnHyphenatedStyleName(name);\n } else if (badVendoredStyleNamePattern.test(name)) {\n warnBadVendoredStyleName(name);\n } else if (badStyleValueWithSemicolonPattern.test(value)) {\n warnStyleValueWithSemicolon(name, value);\n }\n\n if (typeof value === 'number') {\n if (isNaN(value)) {\n warnStyleValueIsNaN(name);\n } else if (!isFinite(value)) {\n warnStyleValueIsInfinity(name);\n }\n }\n }\n}\n\nfunction getCrossOriginString(input) {\n if (typeof input === 'string') {\n return input === 'use-credentials' ? input : '';\n }\n\n return undefined;\n}\n\n// code copied and modified from escape-html\nvar matchHtmlRegExp = /[\"'&<>]/;\n/**\n * Escapes special characters and HTML entities in a given html string.\n *\n * @param {string} string HTML string to escape for later insertion\n * @return {string}\n * @public\n */\n\nfunction escapeHtml(string) {\n {\n checkHtmlStringCoercion(string);\n }\n\n var str = '' + string;\n var match = matchHtmlRegExp.exec(str);\n\n if (!match) {\n return str;\n }\n\n var escape;\n var html = '';\n var index;\n var lastIndex = 0;\n\n for (index = match.index; index < str.length; index++) {\n switch (str.charCodeAt(index)) {\n case 34:\n // \"\n escape = '"';\n break;\n\n case 38:\n // &\n escape = '&';\n break;\n\n case 39:\n // '\n escape = '''; // modified from escape-html; used to be '''\n\n break;\n\n case 60:\n // <\n escape = '<';\n break;\n\n case 62:\n // >\n escape = '>';\n break;\n\n default:\n continue;\n }\n\n if (lastIndex !== index) {\n html += str.slice(lastIndex, index);\n }\n\n lastIndex = index + 1;\n html += escape;\n }\n\n return lastIndex !== index ? html + str.slice(lastIndex, index) : html;\n} // end code copied and modified from escape-html\n\n/**\n * Escapes text to prevent scripting attacks.\n *\n * @param {*} text Text value to escape.\n * @return {string} An escaped string.\n */\n\n\nfunction escapeTextForBrowser(text) {\n if (typeof text === 'boolean' || typeof text === 'number' || enableBigIntSupport ) {\n // this shortcircuit helps perf for types that we know will never have\n // special characters, especially given that this function is used often\n // for numeric dom ids.\n return '' + text;\n }\n\n return escapeHtml(text);\n}\n\nvar uppercasePattern = /([A-Z])/g;\nvar msPattern = /^ms-/;\n/**\n * Hyphenates a camelcased CSS property name, for example:\n *\n * > hyphenateStyleName('backgroundColor')\n * < \"background-color\"\n * > hyphenateStyleName('MozTransition')\n * < \"-moz-transition\"\n * > hyphenateStyleName('msTransition')\n * < \"-ms-transition\"\n *\n * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix\n * is converted to `-ms-`.\n */\n\nfunction hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}\n\n// and any newline or tab are filtered out as if they're not part of the URL.\n// https://url.spec.whatwg.org/#url-parsing\n// Tab or newline are defined as \\r\\n\\t:\n// https://infra.spec.whatwg.org/#ascii-tab-or-newline\n// A C0 control is a code point in the range \\u0000 NULL to \\u001F\n// INFORMATION SEPARATOR ONE, inclusive:\n// https://infra.spec.whatwg.org/#c0-control-or-space\n\n/* eslint-disable max-len */\n\nvar isJavaScriptProtocol = /^[\\u0000-\\u001F ]*j[\\r\\n\\t]*a[\\r\\n\\t]*v[\\r\\n\\t]*a[\\r\\n\\t]*s[\\r\\n\\t]*c[\\r\\n\\t]*r[\\r\\n\\t]*i[\\r\\n\\t]*p[\\r\\n\\t]*t[\\r\\n\\t]*\\:/i;\nvar didWarn = false;\n\nfunction sanitizeURL(url) {\n // We should never have symbols here because they get filtered out elsewhere.\n // eslint-disable-next-line react-internal/safe-string-coercion\n var stringifiedURL = '' + url;\n\n {\n if (!didWarn && isJavaScriptProtocol.test(stringifiedURL)) {\n didWarn = true;\n\n error('A future version of React will block javascript: URLs as a security precaution. ' + 'Use event handlers instead if you can. If you need to generate unsafe HTML try ' + 'using dangerouslySetInnerHTML instead. React was passed %s.', JSON.stringify(stringifiedURL));\n }\n }\n\n return url;\n}\n\n// The build script is at scripts/rollup/generate-inline-fizz-runtime.js.\n// Run `yarn generate-inline-fizz-runtime` to generate.\nvar clientRenderBoundary = '$RX=function(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data=\"$!\",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())};';\nvar completeBoundary = '$RC=function(b,c,e){c=document.getElementById(c);c.parentNode.removeChild(c);var a=document.getElementById(b);if(a){b=a.previousSibling;if(e)b.data=\"$!\",a.setAttribute(\"data-dgst\",e);else{e=b.parentNode;a=b.nextSibling;var f=0;do{if(a&&8===a.nodeType){var d=a.data;if(\"/$\"===d)if(0===f)break;else f--;else\"$\"!==d&&\"$?\"!==d&&\"$!\"!==d||f++}d=a.nextSibling;e.removeChild(a);a=d}while(a);for(;c.firstChild;)e.insertBefore(c.firstChild,a);b.data=\"$\"}b._reactRetry&&b._reactRetry()}};';\nvar completeBoundaryWithStyles = '$RM=new Map;\\n$RR=function(r,t,w){for(var u=$RC,n=$RM,p=new Map,q=document,g,b,h=q.querySelectorAll(\"link[data-precedence],style[data-precedence]\"),v=[],k=0;b=h[k++];)\"not all\"===b.getAttribute(\"media\")?v.push(b):(\"LINK\"===b.tagName&&n.set(b.getAttribute(\"href\"),b),p.set(b.dataset.precedence,g=b));b=0;h=[];var l,a;for(k=!0;;){if(k){var f=w[b++];if(!f){k=!1;b=0;continue}var c=!1,m=0;var d=f[m++];if(a=n.get(d)){var e=a._p;c=!0}else{a=q.createElement(\"link\");a.href=d;a.rel=\"stylesheet\";for(a.dataset.precedence=\\nl=f[m++];e=f[m++];)a.setAttribute(e,f[m++]);e=a._p=new Promise(function(x,y){a.onload=x;a.onerror=y});n.set(d,a)}d=a.getAttribute(\"media\");!e||\"l\"===e.s||d&&!matchMedia(d).matches||h.push(e);if(c)continue}else{a=v[b++];if(!a)break;l=a.getAttribute(\"data-precedence\");a.removeAttribute(\"media\")}c=p.get(l)||g;c===g&&(g=a);p.set(l,a);c?c.parentNode.insertBefore(a,c.nextSibling):(c=q.head,c.insertBefore(a,c.firstChild))}Promise.all(h).then(u.bind(null,r,t,\"\"),u.bind(null,r,t,\"Resource failed to load\"))};';\nvar completeSegment = '$RS=function(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};';\nvar formReplaying = 'addEventListener(\"submit\",function(a){if(!a.defaultPrevented){var c=a.target,d=a.submitter,e=c.action,b=d;if(d){var f=d.getAttribute(\"formAction\");null!=f&&(e=f,b=null)}\"javascript:throw new Error(\\'React form unexpectedly submitted.\\')\"===e&&(a.preventDefault(),b?(a=document.createElement(\"input\"),a.name=b.name,a.value=b.value,b.parentNode.insertBefore(a,b),b=new FormData(c),a.parentNode.removeChild(a)):b=new FormData(c),a=c.ownerDocument||c,(a.$$reactFormReplay=a.$$reactFormReplay||[]).push(c,d,b))}});';\n\nfunction getValueDescriptorExpectingObjectForWarning(thing) {\n return thing === null ? '`null`' : thing === undefined ? '`undefined`' : thing === '' ? 'an empty string' : \"something with type \\\"\" + typeof thing + \"\\\"\";\n}\n\n// same object across all transitions.\n\nvar sharedNotPendingObject = {\n pending: false,\n data: null,\n method: null,\n action: null\n};\nvar NotPending = Object.freeze(sharedNotPendingObject) ;\n\nvar ReactDOMSharedInternals = ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n\nvar ReactDOMCurrentDispatcher = ReactDOMSharedInternals.ReactDOMCurrentDispatcher;\nvar previousDispatcher = ReactDOMCurrentDispatcher.current;\nReactDOMCurrentDispatcher.current = {\n prefetchDNS: prefetchDNS,\n preconnect: preconnect,\n preload: preload,\n preloadModule: preloadModule,\n preinitScript: preinitScript,\n preinitStyle: preinitStyle,\n preinitModuleScript: preinitModuleScript\n}; // We make every property of the descriptor optional because it is not a contract that\nvar ScriptStreamingFormat = 0;\nvar DataStreamingFormat = 1;\nvar NothingSent\n/* */\n= 0;\nvar SentCompleteSegmentFunction\n/* */\n= 1;\nvar SentCompleteBoundaryFunction\n/* */\n= 2;\nvar SentClientRenderFunction\n/* */\n= 4;\nvar SentStyleInsertionFunction\n/* */\n= 8;\nvar SentFormReplayingRuntime\n/* */\n= 16; // Per request, global state that is not contextual to the rendering subtree.\n// This cannot be resumed and therefore should only contain things that are\n// temporary working state or are never used in the prerender pass.\n// Credentials here are things that affect whether a browser will make a request\n// as well as things that affect which connection the browser will use for that request.\n// We want these to be aligned across preloads and resources because otherwise the preload\n// will be wasted.\n// We investigated whether referrerPolicy should be included here but from experimentation\n// it seems that browsers do not treat this as part of the http cache key and does not affect\n// which connection is used.\n\nvar EXISTS = null; // This constant is to mark preloads that have no unique credentials\n// to convey. It should never be checked by identity and we should not\n// assume Preload values in ResumableState equal this value because they\n// will have come from some parsed input.\n\nvar PRELOAD_NO_CREDS = [];\n\n{\n Object.freeze(PRELOAD_NO_CREDS);\n} // Per response, global state that is not contextual to the rendering subtree.\n// This is resumable and therefore should be serializable.\n\n\nvar dataElementQuotedEnd = stringToPrecomputedChunk('\"></template>');\nvar startInlineScript = stringToPrecomputedChunk('<script>');\nvar endInlineScript = stringToPrecomputedChunk('</script>');\nvar startScriptSrc = stringToPrecomputedChunk('<script src=\"');\nvar startModuleSrc = stringToPrecomputedChunk('<script type=\"module\" src=\"');\nvar scriptNonce = stringToPrecomputedChunk('\" nonce=\"');\nvar scriptIntegirty = stringToPrecomputedChunk('\" integrity=\"');\nvar scriptCrossOrigin = stringToPrecomputedChunk('\" crossorigin=\"');\nvar endAsyncScript = stringToPrecomputedChunk('\" async=\"\"></script>');\n/**\n * This escaping function is designed to work with bootstrapScriptContent and importMap only.\n * because we know we are escaping the entire script. We can avoid for instance\n * escaping html comment string sequences that are valid javascript as well because\n * if there are no sebsequent <script sequences the html parser will never enter\n * script data double escaped state (see: https://www.w3.org/TR/html53/syntax.html#script-data-double-escaped-state)\n *\n * While untrusted script content should be made safe before using this api it will\n * ensure that the script cannot be early terminated or never terminated state\n */\n\nfunction escapeBootstrapAndImportMapScriptContent(scriptText) {\n {\n checkHtmlStringCoercion(scriptText);\n }\n\n return ('' + scriptText).replace(scriptRegex, scriptReplacer);\n}\n\nvar scriptRegex = /(<\\/|<)(s)(cript)/gi;\n\nvar scriptReplacer = function (match, prefix, s, suffix) {\n return \"\" + prefix + (s === 's' ? \"\\\\u0073\" : \"\\\\u0053\") + suffix;\n};\n\nvar importMapScriptStart = stringToPrecomputedChunk('<script type=\"importmap\">');\nvar importMapScriptEnd = stringToPrecomputedChunk('</script>'); // Since we store headers as strings we deal with their length in utf16 code units\n// rather than visual characters or the utf8 encoding that is used for most binary\n// serialization. Some common HTTP servers only allow for headers to be 4kB in length.\n// We choose a default length that is likely to be well under this already limited length however\n// pathological cases may still cause the utf-8 encoding of the headers to approach this limit.\n// It should also be noted that this maximum is a soft maximum. we have not reached the limit we will\n// allow one more header to be captured which means in practice if the limit is approached it will be exceeded\n\nvar DEFAULT_HEADERS_CAPACITY_IN_UTF16_CODE_UNITS = 2000;\n// if passed externalRuntimeConfig and the enableFizzExternalRuntime feature flag\n// is set, the server will send instructions via data attributes (instead of inline scripts)\n\n\nfunction createRenderState(resumableState, nonce, externalRuntimeConfig, importMap, onHeaders, maxHeadersLength) {\n var inlineScriptWithNonce = nonce === undefined ? startInlineScript : stringToPrecomputedChunk('<script nonce=\"' + escapeTextForBrowser(nonce) + '\">');\n var idPrefix = resumableState.idPrefix;\n var bootstrapChunks = [];\n var externalRuntimeScript = null;\n var bootstrapScriptContent = resumableState.bootstrapScriptContent,\n bootstrapScripts = resumableState.bootstrapScripts,\n bootstrapModules = resumableState.bootstrapModules;\n\n if (bootstrapScriptContent !== undefined) {\n bootstrapChunks.push(inlineScriptWithNonce, stringToChunk(escapeBootstrapAndImportMapScriptContent(bootstrapScriptContent)), endInlineScript);\n }\n\n {\n\n if (externalRuntimeConfig !== undefined) {\n if (typeof externalRuntimeConfig === 'string') {\n externalRuntimeScript = {\n src: externalRuntimeConfig,\n chunks: []\n };\n pushScriptImpl(externalRuntimeScript.chunks, {\n src: externalRuntimeConfig,\n async: true,\n integrity: undefined,\n nonce: nonce\n });\n } else {\n externalRuntimeScript = {\n src: externalRuntimeConfig.src,\n chunks: []\n };\n pushScriptImpl(externalRuntimeScript.chunks, {\n src: externalRuntimeConfig.src,\n async: true,\n integrity: externalRuntimeConfig.integrity,\n nonce: nonce\n });\n }\n }\n }\n\n var importMapChunks = [];\n\n if (importMap !== undefined) {\n var map = importMap;\n importMapChunks.push(importMapScriptStart);\n importMapChunks.push(stringToChunk(escapeBootstrapAndImportMapScriptContent(JSON.stringify(map))));\n importMapChunks.push(importMapScriptEnd);\n }\n\n {\n if (onHeaders && typeof maxHeadersLength === 'number') {\n if (maxHeadersLength <= 0) {\n error('React expected a positive non-zero `maxHeadersLength` option but found %s instead. When using the `onHeaders` option you may supply an optional `maxHeadersLength` option as well however, when setting this value to zero or less no headers will be captured.', maxHeadersLength === 0 ? 'zero' : maxHeadersLength);\n }\n }\n }\n\n var headers = onHeaders ? {\n preconnects: '',\n fontPreloads: '',\n highImagePreloads: '',\n remainingCapacity: typeof maxHeadersLength === 'number' ? maxHeadersLength : DEFAULT_HEADERS_CAPACITY_IN_UTF16_CODE_UNITS\n } : null;\n var renderState = {\n placeholderPrefix: stringToPrecomputedChunk(idPrefix + 'P:'),\n segmentPrefix: stringToPrecomputedChunk(idPrefix + 'S:'),\n boundaryPrefix: stringToPrecomputedChunk(idPrefix + 'B:'),\n startInlineScript: inlineScriptWithNonce,\n htmlChunks: null,\n headChunks: null,\n externalRuntimeScript: externalRuntimeScript,\n bootstrapChunks: bootstrapChunks,\n importMapChunks: importMapChunks,\n onHeaders: onHeaders,\n headers: headers,\n resets: {\n font: {},\n dns: {},\n connect: {\n default: {},\n anonymous: {},\n credentials: {}\n },\n image: {},\n style: {}\n },\n charsetChunks: [],\n viewportChunks: [],\n hoistableChunks: [],\n // cleared on flush\n preconnects: new Set(),\n fontPreloads: new Set(),\n highImagePreloads: new Set(),\n // usedImagePreloads: new Set(),\n styles: new Map(),\n bootstrapScripts: new Set(),\n scripts: new Set(),\n bulkPreloads: new Set(),\n preloads: {\n images: new Map(),\n stylesheets: new Map(),\n scripts: new Map(),\n moduleScripts: new Map()\n },\n nonce: nonce,\n // like a module global for currently rendering boundary\n hoistableState: null,\n stylesToHoist: false\n };\n\n if (bootstrapScripts !== undefined) {\n for (var i = 0; i < bootstrapScripts.length; i++) {\n var scriptConfig = bootstrapScripts[i];\n var src = void 0,\n crossOrigin = void 0,\n integrity = void 0;\n var props = {\n rel: 'preload',\n as: 'script',\n fetchPriority: 'low',\n nonce: nonce\n };\n\n if (typeof scriptConfig === 'string') {\n props.href = src = scriptConfig;\n } else {\n props.href = src = scriptConfig.src;\n props.integrity = integrity = typeof scriptConfig.integrity === 'string' ? scriptConfig.integrity : undefined;\n props.crossOrigin = crossOrigin = typeof scriptConfig === 'string' || scriptConfig.crossOrigin == null ? undefined : scriptConfig.crossOrigin === 'use-credentials' ? 'use-credentials' : '';\n }\n\n preloadBootstrapScriptOrModule(resumableState, renderState, src, props);\n bootstrapChunks.push(startScriptSrc, stringToChunk(escapeTextForBrowser(src)));\n\n if (nonce) {\n bootstrapChunks.push(scriptNonce, stringToChunk(escapeTextForBrowser(nonce)));\n }\n\n if (typeof integrity === 'string') {\n bootstrapChunks.push(scriptIntegirty, stringToChunk(escapeTextForBrowser(integrity)));\n }\n\n if (typeof crossOrigin === 'string') {\n bootstrapChunks.push(scriptCrossOrigin, stringToChunk(escapeTextForBrowser(crossOrigin)));\n }\n\n bootstrapChunks.push(endAsyncScript);\n }\n }\n\n if (bootstrapModules !== undefined) {\n for (var _i = 0; _i < bootstrapModules.length; _i++) {\n var _scriptConfig = bootstrapModules[_i];\n\n var _src = void 0,\n _crossOrigin = void 0,\n _integrity = void 0;\n\n var _props = {\n rel: 'modulepreload',\n fetchPriority: 'low',\n nonce: nonce\n };\n\n if (typeof _scriptConfig === 'string') {\n _props.href = _src = _scriptConfig;\n } else {\n _props.href = _src = _scriptConfig.src;\n _props.integrity = _integrity = typeof _scriptConfig.integrity === 'string' ? _scriptConfig.integrity : undefined;\n _props.crossOrigin = _crossOrigin = typeof _scriptConfig === 'string' || _scriptConfig.crossOrigin == null ? undefined : _scriptConfig.crossOrigin === 'use-credentials' ? 'use-credentials' : '';\n }\n\n preloadBootstrapScriptOrModule(resumableState, renderState, _src, _props);\n bootstrapChunks.push(startModuleSrc, stringToChunk(escapeTextForBrowser(_src)));\n\n if (nonce) {\n bootstrapChunks.push(scriptNonce, stringToChunk(escapeTextForBrowser(nonce)));\n }\n\n if (typeof _integrity === 'string') {\n bootstrapChunks.push(scriptIntegirty, stringToChunk(escapeTextForBrowser(_integrity)));\n }\n\n if (typeof _crossOrigin === 'string') {\n bootstrapChunks.push(scriptCrossOrigin, stringToChunk(escapeTextForBrowser(_crossOrigin)));\n }\n\n bootstrapChunks.push(endAsyncScript);\n }\n }\n\n return renderState;\n}\nfunction createResumableState(identifierPrefix, externalRuntimeConfig, bootstrapScriptContent, bootstrapScripts, bootstrapModules) {\n var idPrefix = identifierPrefix === undefined ? '' : identifierPrefix;\n var streamingFormat = ScriptStreamingFormat;\n\n {\n if (externalRuntimeConfig !== undefined) {\n streamingFormat = DataStreamingFormat;\n }\n }\n\n return {\n idPrefix: idPrefix,\n nextFormID: 0,\n streamingFormat: streamingFormat,\n bootstrapScriptContent: bootstrapScriptContent,\n bootstrapScripts: bootstrapScripts,\n bootstrapModules: bootstrapModules,\n instructions: NothingSent,\n hasBody: false,\n hasHtml: false,\n // @TODO add bootstrap script to implicit preloads\n // persistent\n unknownResources: {},\n dnsResources: {},\n connectResources: {\n default: {},\n anonymous: {},\n credentials: {}\n },\n imageResources: {},\n styleResources: {},\n scriptResources: {},\n moduleUnknownResources: {},\n moduleScriptResources: {}\n };\n}\n// modes. We only include the variants as they matter for the sake of our purposes.\n// We don't actually provide the namespace therefore we use constants instead of the string.\n\nvar ROOT_HTML_MODE = 0; // Used for the root most element tag.\n// We have a less than HTML_HTML_MODE check elsewhere. If you add more cases here, make sure it\n// still makes sense\n\nvar HTML_HTML_MODE = 1; // Used for the <html> if it is at the top level.\n\nvar HTML_MODE = 2;\nvar SVG_MODE = 3;\nvar MATHML_MODE = 4;\nvar HTML_TABLE_MODE = 5;\nvar HTML_TABLE_BODY_MODE = 6;\nvar HTML_TABLE_ROW_MODE = 7;\nvar HTML_COLGROUP_MODE = 8; // We have a greater than HTML_TABLE_MODE check elsewhere. If you add more cases here, make sure it\n// still makes sense\n\nvar NO_SCOPE =\n/* */\n0;\nvar NOSCRIPT_SCOPE =\n/* */\n1;\nvar PICTURE_SCOPE =\n/* */\n2; // Lets us keep track of contextual state and pick it back up after suspending.\n\nfunction createFormatContext(insertionMode, selectedValue, tagScope) {\n return {\n insertionMode: insertionMode,\n selectedValue: selectedValue,\n tagScope: tagScope\n };\n}\n\nfunction createRootFormatContext(namespaceURI) {\n var insertionMode = namespaceURI === 'http://www.w3.org/2000/svg' ? SVG_MODE : namespaceURI === 'http://www.w3.org/1998/Math/MathML' ? MATHML_MODE : ROOT_HTML_MODE;\n return createFormatContext(insertionMode, null, NO_SCOPE);\n}\nfunction getChildFormatContext(parentContext, type, props) {\n switch (type) {\n case 'noscript':\n return createFormatContext(HTML_MODE, null, parentContext.tagScope | NOSCRIPT_SCOPE);\n\n case 'select':\n return createFormatContext(HTML_MODE, props.value != null ? props.value : props.defaultValue, parentContext.tagScope);\n\n case 'svg':\n return createFormatContext(SVG_MODE, null, parentContext.tagScope);\n\n case 'picture':\n return createFormatContext(HTML_MODE, null, parentContext.tagScope | PICTURE_SCOPE);\n\n case 'math':\n return createFormatContext(MATHML_MODE, null, parentContext.tagScope);\n\n case 'foreignObject':\n return createFormatContext(HTML_MODE, null, parentContext.tagScope);\n // Table parents are special in that their children can only be created at all if they're\n // wrapped in a table parent. So we need to encode that we're entering this mode.\n\n case 'table':\n return createFormatContext(HTML_TABLE_MODE, null, parentContext.tagScope);\n\n case 'thead':\n case 'tbody':\n case 'tfoot':\n return createFormatContext(HTML_TABLE_BODY_MODE, null, parentContext.tagScope);\n\n case 'colgroup':\n return createFormatContext(HTML_COLGROUP_MODE, null, parentContext.tagScope);\n\n case 'tr':\n return createFormatContext(HTML_TABLE_ROW_MODE, null, parentContext.tagScope);\n }\n\n if (parentContext.insertionMode >= HTML_TABLE_MODE) {\n // Whatever tag this was, it wasn't a table parent or other special parent, so we must have\n // entered plain HTML again.\n return createFormatContext(HTML_MODE, null, parentContext.tagScope);\n }\n\n if (parentContext.insertionMode === ROOT_HTML_MODE) {\n if (type === 'html') {\n // We've emitted the root and is now in <html> mode.\n return createFormatContext(HTML_HTML_MODE, null, parentContext.tagScope);\n } else {\n // We've emitted the root and is now in plain HTML mode.\n return createFormatContext(HTML_MODE, null, parentContext.tagScope);\n }\n } else if (parentContext.insertionMode === HTML_HTML_MODE) {\n // We've emitted the document element and is now in plain HTML mode.\n return createFormatContext(HTML_MODE, null, parentContext.tagScope);\n }\n\n return parentContext;\n}\nfunction makeId(resumableState, treeId, localId) {\n var idPrefix = resumableState.idPrefix;\n var id = ':' + idPrefix + 'R' + treeId; // Unless this is the first id at this level, append a number at the end\n // that represents the position of this useId hook among all the useId\n // hooks for this fiber.\n\n if (localId > 0) {\n id += 'H' + localId.toString(32);\n }\n\n return id + ':';\n}\n\nfunction encodeHTMLTextNode(text) {\n return escapeTextForBrowser(text);\n}\n\nvar textSeparator = stringToPrecomputedChunk('<!-- -->');\nfunction pushTextInstance(target, text, renderState, textEmbedded) {\n if (text === '') {\n // Empty text doesn't have a DOM node representation and the hydration is aware of this.\n return textEmbedded;\n }\n\n if (textEmbedded) {\n target.push(textSeparator);\n }\n\n target.push(stringToChunk(encodeHTMLTextNode(text)));\n return true;\n} // Called when Fizz is done with a Segment. Currently the only purpose is to conditionally\n// emit a text separator when we don't know for sure it is safe to omit\n\nfunction pushSegmentFinale(target, renderState, lastPushedText, textEmbedded) {\n if (lastPushedText && textEmbedded) {\n target.push(textSeparator);\n }\n}\nvar styleNameCache = new Map();\n\nfunction processStyleName(styleName) {\n var chunk = styleNameCache.get(styleName);\n\n if (chunk !== undefined) {\n return chunk;\n }\n\n var result = stringToPrecomputedChunk(escapeTextForBrowser(hyphenateStyleName(styleName)));\n styleNameCache.set(styleName, result);\n return result;\n}\n\nvar styleAttributeStart = stringToPrecomputedChunk(' style=\"');\nvar styleAssign = stringToPrecomputedChunk(':');\nvar styleSeparator = stringToPrecomputedChunk(';');\n\nfunction pushStyleAttribute(target, style) {\n if (typeof style !== 'object') {\n throw new Error('The `style` prop expects a mapping from style properties to values, ' + \"not a string. For example, style={{marginRight: spacing + 'em'}} when \" + 'using JSX.');\n }\n\n var isFirst = true;\n\n for (var styleName in style) {\n if (!hasOwnProperty.call(style, styleName)) {\n continue;\n } // If you provide unsafe user data here they can inject arbitrary CSS\n // which may be problematic (I couldn't repro this):\n // https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet\n // http://www.thespanner.co.uk/2007/11/26/ultimate-xss-css-injection/\n // This is not an XSS hole but instead a potential CSS injection issue\n // which has lead to a greater discussion about how we're going to\n // trust URLs moving forward. See #2115901\n\n\n var styleValue = style[styleName];\n\n if (styleValue == null || typeof styleValue === 'boolean' || styleValue === '') {\n // TODO: We used to set empty string as a style with an empty value. Does that ever make sense?\n continue;\n }\n\n var nameChunk = void 0;\n var valueChunk = void 0;\n var isCustomProperty = styleName.indexOf('--') === 0;\n\n if (isCustomProperty) {\n nameChunk = stringToChunk(escapeTextForBrowser(styleName));\n\n {\n checkCSSPropertyStringCoercion(styleValue, styleName);\n }\n\n valueChunk = stringToChunk(escapeTextForBrowser(('' + styleValue).trim()));\n } else {\n {\n warnValidStyle(styleName, styleValue);\n }\n\n nameChunk = processStyleName(styleName);\n\n if (typeof styleValue === 'number') {\n if (styleValue !== 0 && !isUnitlessNumber(styleName)) {\n valueChunk = stringToChunk(styleValue + 'px'); // Presumes implicit 'px' suffix for unitless numbers\n } else {\n valueChunk = stringToChunk('' + styleValue);\n }\n } else {\n {\n checkCSSPropertyStringCoercion(styleValue, styleName);\n }\n\n valueChunk = stringToChunk(escapeTextForBrowser(('' + styleValue).trim()));\n }\n }\n\n if (isFirst) {\n isFirst = false; // If it's first, we don't need any separators prefixed.\n\n target.push(styleAttributeStart, nameChunk, styleAssign, valueChunk);\n } else {\n target.push(styleSeparator, nameChunk, styleAssign, valueChunk);\n }\n }\n\n if (!isFirst) {\n target.push(attributeEnd);\n }\n}\n\nvar attributeSeparator = stringToPrecomputedChunk(' ');\nvar attributeAssign = stringToPrecomputedChunk('=\"');\nvar attributeEnd = stringToPrecomputedChunk('\"');\nvar attributeEmptyString = stringToPrecomputedChunk('=\"\"');\n\nfunction pushBooleanAttribute(target, name, value) // not null or undefined\n{\n if (value && typeof value !== 'function' && typeof value !== 'symbol') {\n target.push(attributeSeparator, stringToChunk(name), attributeEmptyString);\n }\n}\n\nfunction pushStringAttribute(target, name, value) // not null or undefined\n{\n if (typeof value !== 'function' && typeof value !== 'symbol' && typeof value !== 'boolean') {\n target.push(attributeSeparator, stringToChunk(name), attributeAssign, stringToChunk(escapeTextForBrowser(value)), attributeEnd);\n }\n}\n\nfunction makeFormFieldPrefix(resumableState) {\n var id = resumableState.nextFormID++;\n return resumableState.idPrefix + id;\n} // Since this will likely be repeated a lot in the HTML, we use a more concise message\n// than on the client and hopefully it's googleable.\n\n\nvar actionJavaScriptURL = stringToPrecomputedChunk(escapeTextForBrowser( // eslint-disable-next-line no-script-url\n\"javascript:throw new Error('React form unexpectedly submitted.')\"));\nvar startHiddenInputChunk = stringToPrecomputedChunk('<input type=\"hidden\"');\n\nfunction pushAdditionalFormField(value, key) {\n var target = this;\n target.push(startHiddenInputChunk);\n\n if (typeof value !== 'string') {\n throw new Error('File/Blob fields are not yet supported in progressive forms. ' + 'It probably means you are closing over binary data or FormData in a Server Action.');\n }\n\n pushStringAttribute(target, 'name', key);\n pushStringAttribute(target, 'value', value);\n target.push(endOfStartTagSelfClosing);\n}\n\nfunction pushAdditionalFormFields(target, formData) {\n if (formData != null) {\n // $FlowFixMe[prop-missing]: FormData has forEach.\n formData.forEach(pushAdditionalFormField, target);\n }\n}\n\nfunction getCustomFormFields(resumableState, formAction) {\n var customAction = formAction.$$FORM_ACTION;\n\n if (typeof customAction === 'function') {\n var prefix = makeFormFieldPrefix(resumableState);\n\n try {\n return formAction.$$FORM_ACTION(prefix);\n } catch (x) {\n if (typeof x === 'object' && x !== null && typeof x.then === 'function') {\n // Rethrow suspense.\n throw x;\n } // If we fail to encode the form action for progressive enhancement for some reason,\n // fallback to trying replaying on the client instead of failing the page. It might\n // work there.\n\n\n {\n // TODO: Should this be some kind of recoverable error?\n error('Failed to serialize an action for progressive enhancement:\\n%s', x);\n }\n }\n }\n\n return null;\n}\n\nfunction pushFormActionAttribute(target, resumableState, renderState, formAction, formEncType, formMethod, formTarget, name) {\n var formData = null;\n\n if (typeof formAction === 'function') {\n // Function form actions cannot control the form properties\n {\n if (name !== null && !didWarnFormActionName) {\n didWarnFormActionName = true;\n\n error('Cannot specify a \"name\" prop for a button that specifies a function as a formAction. ' + 'React needs it to encode which action should be invoked. It will get overridden.');\n }\n\n if ((formEncType !== null || formMethod !== null) && !didWarnFormActionMethod) {\n didWarnFormActionMethod = true;\n\n error('Cannot specify a formEncType or formMethod for a button that specifies a ' + 'function as a formAction. React provides those automatically. They will get overridden.');\n }\n\n if (formTarget !== null && !didWarnFormActionTarget) {\n didWarnFormActionTarget = true;\n\n error('Cannot specify a formTarget for a button that specifies a function as a formAction. ' + 'The function will always be executed in the same window.');\n }\n }\n\n var customFields = getCustomFormFields(resumableState, formAction);\n\n if (customFields !== null) {\n // This action has a custom progressive enhancement form that can submit the form\n // back to the server if it's invoked before hydration. Such as a Server Action.\n name = customFields.name;\n formAction = customFields.action || '';\n formEncType = customFields.encType;\n formMethod = customFields.method;\n formTarget = customFields.target;\n formData = customFields.data;\n } else {\n // Set a javascript URL that doesn't do anything. We don't expect this to be invoked\n // because we'll preventDefault in the Fizz runtime, but it can happen if a form is\n // manually submitted or if someone calls stopPropagation before React gets the event.\n // If CSP is used to block javascript: URLs that's fine too. It just won't show this\n // error message but the URL will be logged.\n target.push(attributeSeparator, stringToChunk('formAction'), attributeAssign, actionJavaScriptURL, attributeEnd);\n name = null;\n formAction = null;\n formEncType = null;\n formMethod = null;\n formTarget = null;\n injectFormReplayingRuntime(resumableState, renderState);\n }\n }\n\n if (name != null) {\n pushAttribute(target, 'name', name);\n }\n\n if (formAction != null) {\n pushAttribute(target, 'formAction', formAction);\n }\n\n if (formEncType != null) {\n pushAttribute(target, 'formEncType', formEncType);\n }\n\n if (formMethod != null) {\n pushAttribute(target, 'formMethod', formMethod);\n }\n\n if (formTarget != null) {\n pushAttribute(target, 'formTarget', formTarget);\n }\n\n return formData;\n}\n\nfunction pushAttribute(target, name, value) // not null or undefined\n{\n switch (name) {\n // These are very common props and therefore are in the beginning of the switch.\n // TODO: aria-label is a very common prop but allows booleans so is not like the others\n // but should ideally go in this list too.\n case 'className':\n {\n pushStringAttribute(target, 'class', value);\n break;\n }\n\n case 'tabIndex':\n {\n pushStringAttribute(target, 'tabindex', value);\n break;\n }\n\n case 'dir':\n case 'role':\n case 'viewBox':\n case 'width':\n case 'height':\n {\n pushStringAttribute(target, name, value);\n break;\n }\n\n case 'style':\n {\n pushStyleAttribute(target, value);\n return;\n }\n\n case 'src':\n case 'href':\n // Fall through to the last case which shouldn't remove empty strings.\n\n case 'action':\n case 'formAction':\n {\n // TODO: Consider only special casing these for each tag.\n if (value == null || typeof value === 'function' || typeof value === 'symbol' || typeof value === 'boolean') {\n return;\n }\n\n {\n checkAttributeStringCoercion(value, name);\n }\n\n var sanitizedValue = sanitizeURL('' + value);\n target.push(attributeSeparator, stringToChunk(name), attributeAssign, stringToChunk(escapeTextForBrowser(sanitizedValue)), attributeEnd);\n return;\n }\n\n case 'defaultValue':\n case 'defaultChecked': // These shouldn't be set as attributes on generic HTML elements.\n\n case 'innerHTML': // Must use dangerouslySetInnerHTML instead.\n\n case 'suppressContentEditableWarning':\n case 'suppressHydrationWarning':\n case 'ref':\n // Ignored. These are built-in to React on the client.\n return;\n\n case 'autoFocus':\n case 'multiple':\n case 'muted':\n {\n pushBooleanAttribute(target, name.toLowerCase(), value);\n return;\n }\n\n case 'xlinkHref':\n {\n if (typeof value === 'function' || typeof value === 'symbol' || typeof value === 'boolean') {\n return;\n }\n\n {\n checkAttributeStringCoercion(value, name);\n }\n\n var _sanitizedValue = sanitizeURL('' + value);\n\n target.push(attributeSeparator, stringToChunk('xlink:href'), attributeAssign, stringToChunk(escapeTextForBrowser(_sanitizedValue)), attributeEnd);\n return;\n }\n\n case 'contentEditable':\n case 'spellCheck':\n case 'draggable':\n case 'value':\n case 'autoReverse':\n case 'externalResourcesRequired':\n case 'focusable':\n case 'preserveAlpha':\n {\n // Booleanish String\n // These are \"enumerated\" attributes that accept \"true\" and \"false\".\n // In React, we let users pass `true` and `false` even though technically\n // these aren't boolean attributes (they are coerced to strings).\n if (typeof value !== 'function' && typeof value !== 'symbol') {\n target.push(attributeSeparator, stringToChunk(name), attributeAssign, stringToChunk(escapeTextForBrowser(value)), attributeEnd);\n }\n\n return;\n }\n\n case 'allowFullScreen':\n case 'async':\n case 'autoPlay':\n case 'controls':\n case 'default':\n case 'defer':\n case 'disabled':\n case 'disablePictureInPicture':\n case 'disableRemotePlayback':\n case 'formNoValidate':\n case 'hidden':\n case 'loop':\n case 'noModule':\n case 'noValidate':\n case 'open':\n case 'playsInline':\n case 'readOnly':\n case 'required':\n case 'reversed':\n case 'scoped':\n case 'seamless':\n case 'itemScope':\n {\n // Boolean\n if (value && typeof value !== 'function' && typeof value !== 'symbol') {\n target.push(attributeSeparator, stringToChunk(name), attributeEmptyString);\n }\n\n return;\n }\n\n case 'capture':\n case 'download':\n {\n // Overloaded Boolean\n if (value === true) {\n target.push(attributeSeparator, stringToChunk(name), attributeEmptyString);\n } else if (value === false) ; else if (typeof value !== 'function' && typeof value !== 'symbol') {\n target.push(attributeSeparator, stringToChunk(name), attributeAssign, stringToChunk(escapeTextForBrowser(value)), attributeEnd);\n }\n\n return;\n }\n\n case 'cols':\n case 'rows':\n case 'size':\n case 'span':\n {\n // These are HTML attributes that must be positive numbers.\n if (typeof value !== 'function' && typeof value !== 'symbol' && !isNaN(value) && value >= 1) {\n target.push(attributeSeparator, stringToChunk(name), attributeAssign, stringToChunk(escapeTextForBrowser(value)), attributeEnd);\n }\n\n return;\n }\n\n case 'rowSpan':\n case 'start':\n {\n // These are HTML attributes that must be numbers.\n if (typeof value !== 'function' && typeof value !== 'symbol' && !isNaN(value)) {\n target.push(attributeSeparator, stringToChunk(name), attributeAssign, stringToChunk(escapeTextForBrowser(value)), attributeEnd);\n }\n\n return;\n }\n\n case 'xlinkActuate':\n pushStringAttribute(target, 'xlink:actuate', value);\n return;\n\n case 'xlinkArcrole':\n pushStringAttribute(target, 'xlink:arcrole', value);\n return;\n\n case 'xlinkRole':\n pushStringAttribute(target, 'xlink:role', value);\n return;\n\n case 'xlinkShow':\n pushStringAttribute(target, 'xlink:show', value);\n return;\n\n case 'xlinkTitle':\n pushStringAttribute(target, 'xlink:title', value);\n return;\n\n case 'xlinkType':\n pushStringAttribute(target, 'xlink:type', value);\n return;\n\n case 'xmlBase':\n pushStringAttribute(target, 'xml:base', value);\n return;\n\n case 'xmlLang':\n pushStringAttribute(target, 'xml:lang', value);\n return;\n\n case 'xmlSpace':\n pushStringAttribute(target, 'xml:space', value);\n return;\n\n case 'inert':\n // fallthrough for new boolean props without the flag on\n\n default:\n if ( // shouldIgnoreAttribute\n // We have already filtered out null/undefined and reserved words.\n name.length > 2 && (name[0] === 'o' || name[0] === 'O') && (name[1] === 'n' || name[1] === 'N')) {\n return;\n }\n\n var attributeName = getAttributeAlias(name);\n\n if (isAttributeNameSafe(attributeName)) {\n // shouldRemoveAttribute\n switch (typeof value) {\n case 'function':\n case 'symbol':\n // eslint-disable-line\n return;\n\n case 'boolean':\n {\n var prefix = attributeName.toLowerCase().slice(0, 5);\n\n if (prefix !== 'data-' && prefix !== 'aria-') {\n return;\n }\n }\n }\n\n target.push(attributeSeparator, stringToChunk(attributeName), attributeAssign, stringToChunk(escapeTextForBrowser(value)), attributeEnd);\n }\n\n }\n}\n\nvar endOfStartTag = stringToPrecomputedChunk('>');\nvar endOfStartTagSelfClosing = stringToPrecomputedChunk('/>');\n\nfunction pushInnerHTML(target, innerHTML, children) {\n if (innerHTML != null) {\n if (children != null) {\n throw new Error('Can only set one of `children` or `props.dangerouslySetInnerHTML`.');\n }\n\n if (typeof innerHTML !== 'object' || !('__html' in innerHTML)) {\n throw new Error('`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. ' + 'Please visit https://react.dev/link/dangerously-set-inner-html ' + 'for more information.');\n }\n\n var html = innerHTML.__html;\n\n if (html !== null && html !== undefined) {\n {\n checkHtmlStringCoercion(html);\n }\n\n target.push(stringToChunk('' + html));\n }\n }\n} // TODO: Move these to RenderState so that we warn for every request.\n// It would help debugging in stateful servers (e.g. service worker).\n\n\nvar didWarnDefaultInputValue = false;\nvar didWarnDefaultChecked = false;\nvar didWarnDefaultSelectValue = false;\nvar didWarnDefaultTextareaValue = false;\nvar didWarnInvalidOptionChildren = false;\nvar didWarnInvalidOptionInnerHTML = false;\nvar didWarnSelectedSetOnOption = false;\nvar didWarnFormActionType = false;\nvar didWarnFormActionName = false;\nvar didWarnFormActionTarget = false;\nvar didWarnFormActionMethod = false;\n\nfunction checkSelectProp(props, propName) {\n {\n var value = props[propName];\n\n if (value != null) {\n var array = isArray(value);\n\n if (props.multiple && !array) {\n error('The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.', propName);\n } else if (!props.multiple && array) {\n error('The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.', propName);\n }\n }\n }\n}\n\nfunction pushStartSelect(target, props) {\n {\n checkControlledValueProps('select', props);\n checkSelectProp(props, 'value');\n checkSelectProp(props, 'defaultValue');\n\n if (props.value !== undefined && props.defaultValue !== undefined && !didWarnDefaultSelectValue) {\n error('Select elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled select ' + 'element and remove one of these props. More info: ' + 'https://react.dev/link/controlled-components');\n\n didWarnDefaultSelectValue = true;\n }\n }\n\n target.push(startChunkForTag('select'));\n var children = null;\n var innerHTML = null;\n\n for (var propKey in props) {\n if (hasOwnProperty.call(props, propKey)) {\n var propValue = props[propKey];\n\n if (propValue == null) {\n continue;\n }\n\n switch (propKey) {\n case 'children':\n children = propValue;\n break;\n\n case 'dangerouslySetInnerHTML':\n // TODO: This doesn't really make sense for select since it can't use the controlled\n // value in the innerHTML.\n innerHTML = propValue;\n break;\n\n case 'defaultValue':\n case 'value':\n // These are set on the Context instead and applied to the nested options.\n break;\n\n default:\n pushAttribute(target, propKey, propValue);\n break;\n }\n }\n }\n\n target.push(endOfStartTag);\n pushInnerHTML(target, innerHTML, children);\n return children;\n}\n\nfunction flattenOptionChildren(children) {\n var content = ''; // Flatten children and warn if they aren't strings or numbers;\n // invalid types are ignored.\n\n React.Children.forEach(children, function (child) {\n if (child == null) {\n return;\n }\n\n content += child;\n\n {\n if (!didWarnInvalidOptionChildren && typeof child !== 'string' && typeof child !== 'number' && (!enableBigIntSupport)) {\n didWarnInvalidOptionChildren = true;\n\n error('Cannot infer the option value of complex children. ' + 'Pass a `value` prop or use a plain string as children to <option>.');\n }\n }\n });\n return content;\n}\n\nvar selectedMarkerAttribute = stringToPrecomputedChunk(' selected=\"\"');\n\nfunction pushStartOption(target, props, formatContext) {\n var selectedValue = formatContext.selectedValue;\n target.push(startChunkForTag('option'));\n var children = null;\n var value = null;\n var selected = null;\n var innerHTML = null;\n\n for (var propKey in props) {\n if (hasOwnProperty.call(props, propKey)) {\n var propValue = props[propKey];\n\n if (propValue == null) {\n continue;\n }\n\n switch (propKey) {\n case 'children':\n children = propValue;\n break;\n\n case 'selected':\n // ignore\n selected = propValue;\n\n {\n // TODO: Remove support for `selected` in <option>.\n if (!didWarnSelectedSetOnOption) {\n error('Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.');\n\n didWarnSelectedSetOnOption = true;\n }\n }\n\n break;\n\n case 'dangerouslySetInnerHTML':\n innerHTML = propValue;\n break;\n\n case 'value':\n value = propValue;\n // We intentionally fallthrough to also set the attribute on the node.\n\n default:\n pushAttribute(target, propKey, propValue);\n break;\n }\n }\n }\n\n if (selectedValue != null) {\n var stringValue;\n\n if (value !== null) {\n {\n checkAttributeStringCoercion(value, 'value');\n }\n\n stringValue = '' + value;\n } else {\n {\n if (innerHTML !== null) {\n if (!didWarnInvalidOptionInnerHTML) {\n didWarnInvalidOptionInnerHTML = true;\n\n error('Pass a `value` prop if you set dangerouslyInnerHTML so React knows ' + 'which value should be selected.');\n }\n }\n }\n\n stringValue = flattenOptionChildren(children);\n }\n\n if (isArray(selectedValue)) {\n // multiple\n for (var i = 0; i < selectedValue.length; i++) {\n {\n checkAttributeStringCoercion(selectedValue[i], 'value');\n }\n\n var v = '' + selectedValue[i];\n\n if (v === stringValue) {\n target.push(selectedMarkerAttribute);\n break;\n }\n }\n } else {\n {\n checkAttributeStringCoercion(selectedValue, 'select.value');\n }\n\n if ('' + selectedValue === stringValue) {\n target.push(selectedMarkerAttribute);\n }\n }\n } else if (selected) {\n target.push(selectedMarkerAttribute);\n }\n\n target.push(endOfStartTag);\n pushInnerHTML(target, innerHTML, children);\n return children;\n}\n\nvar formReplayingRuntimeScript = stringToPrecomputedChunk(formReplaying);\n\nfunction injectFormReplayingRuntime(resumableState, renderState) {\n // If we haven't sent it yet, inject the runtime that tracks submitted JS actions\n // for later replaying by Fiber. If we use an external runtime, we don't need\n // to emit anything. It's always used.\n if ((resumableState.instructions & SentFormReplayingRuntime) === NothingSent && (!renderState.externalRuntimeScript)) {\n resumableState.instructions |= SentFormReplayingRuntime;\n renderState.bootstrapChunks.unshift(renderState.startInlineScript, formReplayingRuntimeScript, endInlineScript);\n }\n}\n\nvar formStateMarkerIsMatching = stringToPrecomputedChunk('<!--F!-->');\nvar formStateMarkerIsNotMatching = stringToPrecomputedChunk('<!--F-->');\nfunction pushFormStateMarkerIsMatching(target) {\n target.push(formStateMarkerIsMatching);\n}\nfunction pushFormStateMarkerIsNotMatching(target) {\n target.push(formStateMarkerIsNotMatching);\n}\n\nfunction pushStartForm(target, props, resumableState, renderState) {\n target.push(startChunkForTag('form'));\n var children = null;\n var innerHTML = null;\n var formAction = null;\n var formEncType = null;\n var formMethod = null;\n var formTarget = null;\n\n for (var propKey in props) {\n if (hasOwnProperty.call(props, propKey)) {\n var propValue = props[propKey];\n\n if (propValue == null) {\n continue;\n }\n\n switch (propKey) {\n case 'children':\n children = propValue;\n break;\n\n case 'dangerouslySetInnerHTML':\n innerHTML = propValue;\n break;\n\n case 'action':\n formAction = propValue;\n break;\n\n case 'encType':\n formEncType = propValue;\n break;\n\n case 'method':\n formMethod = propValue;\n break;\n\n case 'target':\n formTarget = propValue;\n break;\n\n default:\n pushAttribute(target, propKey, propValue);\n break;\n }\n }\n }\n\n var formData = null;\n var formActionName = null;\n\n if (typeof formAction === 'function') {\n // Function form actions cannot control the form properties\n {\n if ((formEncType !== null || formMethod !== null) && !didWarnFormActionMethod) {\n didWarnFormActionMethod = true;\n\n error('Cannot specify a encType or method for a form that specifies a ' + 'function as the action. React provides those automatically. ' + 'They will get overridden.');\n }\n\n if (formTarget !== null && !didWarnFormActionTarget) {\n didWarnFormActionTarget = true;\n\n error('Cannot specify a target for a form that specifies a function as the action. ' + 'The function will always be executed in the same window.');\n }\n }\n\n var customFields = getCustomFormFields(resumableState, formAction);\n\n if (customFields !== null) {\n // This action has a custom progressive enhancement form that can submit the form\n // back to the server if it's invoked before hydration. Such as a Server Action.\n formAction = customFields.action || '';\n formEncType = customFields.encType;\n formMethod = customFields.method;\n formTarget = customFields.target;\n formData = customFields.data;\n formActionName = customFields.name;\n } else {\n // Set a javascript URL that doesn't do anything. We don't expect this to be invoked\n // because we'll preventDefault in the Fizz runtime, but it can happen if a form is\n // manually submitted or if someone calls stopPropagation before React gets the event.\n // If CSP is used to block javascript: URLs that's fine too. It just won't show this\n // error message but the URL will be logged.\n target.push(attributeSeparator, stringToChunk('action'), attributeAssign, actionJavaScriptURL, attributeEnd);\n formAction = null;\n formEncType = null;\n formMethod = null;\n formTarget = null;\n injectFormReplayingRuntime(resumableState, renderState);\n }\n }\n\n if (formAction != null) {\n pushAttribute(target, 'action', formAction);\n }\n\n if (formEncType != null) {\n pushAttribute(target, 'encType', formEncType);\n }\n\n if (formMethod != null) {\n pushAttribute(target, 'method', formMethod);\n }\n\n if (formTarget != null) {\n pushAttribute(target, 'target', formTarget);\n }\n\n target.push(endOfStartTag);\n\n if (formActionName !== null) {\n target.push(startHiddenInputChunk);\n pushStringAttribute(target, 'name', formActionName);\n target.push(endOfStartTagSelfClosing);\n pushAdditionalFormFields(target, formData);\n }\n\n pushInnerHTML(target, innerHTML, children);\n\n if (typeof children === 'string') {\n // Special case children as a string to avoid the unnecessary comment.\n // TODO: Remove this special case after the general optimization is in place.\n target.push(stringToChunk(encodeHTMLTextNode(children)));\n return null;\n }\n\n return children;\n}\n\nfunction pushInput(target, props, resumableState, renderState) {\n {\n checkControlledValueProps('input', props);\n }\n\n target.push(startChunkForTag('input'));\n var name = null;\n var formAction = null;\n var formEncType = null;\n var formMethod = null;\n var formTarget = null;\n var value = null;\n var defaultValue = null;\n var checked = null;\n var defaultChecked = null;\n\n for (var propKey in props) {\n if (hasOwnProperty.call(props, propKey)) {\n var propValue = props[propKey];\n\n if (propValue == null) {\n continue;\n }\n\n switch (propKey) {\n case 'children':\n case 'dangerouslySetInnerHTML':\n throw new Error('input' + \" is a self-closing tag and must neither have `children` nor \" + 'use `dangerouslySetInnerHTML`.');\n\n case 'name':\n name = propValue;\n break;\n\n case 'formAction':\n formAction = propValue;\n break;\n\n case 'formEncType':\n formEncType = propValue;\n break;\n\n case 'formMethod':\n formMethod = propValue;\n break;\n\n case 'formTarget':\n formTarget = propValue;\n break;\n\n case 'defaultChecked':\n defaultChecked = propValue;\n break;\n\n case 'defaultValue':\n defaultValue = propValue;\n break;\n\n case 'checked':\n checked = propValue;\n break;\n\n case 'value':\n value = propValue;\n break;\n\n default:\n pushAttribute(target, propKey, propValue);\n break;\n }\n }\n }\n\n {\n if (formAction !== null && props.type !== 'image' && props.type !== 'submit' && !didWarnFormActionType) {\n didWarnFormActionType = true;\n\n error('An input can only specify a formAction along with type=\"submit\" or type=\"image\".');\n }\n }\n\n var formData = pushFormActionAttribute(target, resumableState, renderState, formAction, formEncType, formMethod, formTarget, name);\n\n {\n if (checked !== null && defaultChecked !== null && !didWarnDefaultChecked) {\n error('%s contains an input of type %s with both checked and defaultChecked props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the checked prop, or the defaultChecked prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://react.dev/link/controlled-components', 'A component', props.type);\n\n didWarnDefaultChecked = true;\n }\n\n if (value !== null && defaultValue !== null && !didWarnDefaultInputValue) {\n error('%s contains an input of type %s with both value and defaultValue props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://react.dev/link/controlled-components', 'A component', props.type);\n\n didWarnDefaultInputValue = true;\n }\n }\n\n if (checked !== null) {\n pushBooleanAttribute(target, 'checked', checked);\n } else if (defaultChecked !== null) {\n pushBooleanAttribute(target, 'checked', defaultChecked);\n }\n\n if (value !== null) {\n pushAttribute(target, 'value', value);\n } else if (defaultValue !== null) {\n pushAttribute(target, 'value', defaultValue);\n }\n\n target.push(endOfStartTagSelfClosing); // We place any additional hidden form fields after the input.\n\n pushAdditionalFormFields(target, formData);\n return null;\n}\n\nfunction pushStartButton(target, props, resumableState, renderState) {\n target.push(startChunkForTag('button'));\n var children = null;\n var innerHTML = null;\n var name = null;\n var formAction = null;\n var formEncType = null;\n var formMethod = null;\n var formTarget = null;\n\n for (var propKey in props) {\n if (hasOwnProperty.call(props, propKey)) {\n var propValue = props[propKey];\n\n if (propValue == null) {\n continue;\n }\n\n switch (propKey) {\n case 'children':\n children = propValue;\n break;\n\n case 'dangerouslySetInnerHTML':\n innerHTML = propValue;\n break;\n\n case 'name':\n name = propValue;\n break;\n\n case 'formAction':\n formAction = propValue;\n break;\n\n case 'formEncType':\n formEncType = propValue;\n break;\n\n case 'formMethod':\n formMethod = propValue;\n break;\n\n case 'formTarget':\n formTarget = propValue;\n break;\n\n default:\n pushAttribute(target, propKey, propValue);\n break;\n }\n }\n }\n\n {\n if (formAction !== null && props.type != null && props.type !== 'submit' && !didWarnFormActionType) {\n didWarnFormActionType = true;\n\n error('A button can only specify a formAction along with type=\"submit\" or no type.');\n }\n }\n\n var formData = pushFormActionAttribute(target, resumableState, renderState, formAction, formEncType, formMethod, formTarget, name);\n target.push(endOfStartTag); // We place any additional hidden form fields we need to include inside the button itself.\n\n pushAdditionalFormFields(target, formData);\n pushInnerHTML(target, innerHTML, children);\n\n if (typeof children === 'string') {\n // Special case children as a string to avoid the unnecessary comment.\n // TODO: Remove this special case after the general optimization is in place.\n target.push(stringToChunk(encodeHTMLTextNode(children)));\n return null;\n }\n\n return children;\n}\n\nfunction pushStartTextArea(target, props) {\n {\n checkControlledValueProps('textarea', props);\n\n if (props.value !== undefined && props.defaultValue !== undefined && !didWarnDefaultTextareaValue) {\n error('Textarea elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled textarea ' + 'and remove one of these props. More info: ' + 'https://react.dev/link/controlled-components');\n\n didWarnDefaultTextareaValue = true;\n }\n }\n\n target.push(startChunkForTag('textarea'));\n var value = null;\n var defaultValue = null;\n var children = null;\n\n for (var propKey in props) {\n if (hasOwnProperty.call(props, propKey)) {\n var propValue = props[propKey];\n\n if (propValue == null) {\n continue;\n }\n\n switch (propKey) {\n case 'children':\n children = propValue;\n break;\n\n case 'value':\n value = propValue;\n break;\n\n case 'defaultValue':\n defaultValue = propValue;\n break;\n\n case 'dangerouslySetInnerHTML':\n throw new Error('`dangerouslySetInnerHTML` does not make sense on <textarea>.');\n\n default:\n pushAttribute(target, propKey, propValue);\n break;\n }\n }\n }\n\n if (value === null && defaultValue !== null) {\n value = defaultValue;\n }\n\n target.push(endOfStartTag); // TODO (yungsters): Remove support for children content in <textarea>.\n\n if (children != null) {\n {\n error('Use the `defaultValue` or `value` props instead of setting ' + 'children on <textarea>.');\n }\n\n if (value != null) {\n throw new Error('If you supply `defaultValue` on a <textarea>, do not pass children.');\n }\n\n if (isArray(children)) {\n if (children.length > 1) {\n throw new Error('<textarea> can only have at most one child.');\n } // TODO: remove the coercion and the DEV check below because it will\n // always be overwritten by the coercion several lines below it. #22309\n\n\n {\n checkHtmlStringCoercion(children[0]);\n }\n\n value = '' + children[0];\n }\n\n {\n checkHtmlStringCoercion(children);\n }\n\n value = '' + children;\n }\n\n if (typeof value === 'string' && value[0] === '\\n') {\n // text/html ignores the first character in these tags if it's a newline\n // Prefer to break application/xml over text/html (for now) by adding\n // a newline specifically to get eaten by the parser. (Alternately for\n // textareas, replacing \"^\\n\" with \"\\r\\n\" doesn't get eaten, and the first\n // \\r is normalized out by HTMLTextAreaElement#value.)\n // See: <http://www.w3.org/TR/html-polyglot/#newlines-in-textarea-and-pre>\n // See: <http://www.w3.org/TR/html5/syntax.html#element-restrictions>\n // See: <http://www.w3.org/TR/html5/syntax.html#newlines>\n // See: Parsing of \"textarea\" \"listing\" and \"pre\" elements\n // from <http://www.w3.org/TR/html5/syntax.html#parsing-main-inbody>\n target.push(leadingNewline);\n } // ToString and push directly instead of recurse over children.\n // We don't really support complex children in the value anyway.\n // This also currently avoids a trailing comment node which breaks textarea.\n\n\n if (value !== null) {\n {\n checkAttributeStringCoercion(value, 'value');\n }\n\n target.push(stringToChunk(encodeHTMLTextNode('' + value)));\n }\n\n return null;\n}\n\nfunction pushMeta(target, props, renderState, textEmbedded, insertionMode, noscriptTagInScope, isFallback) {\n {\n if (insertionMode === SVG_MODE || noscriptTagInScope || props.itemProp != null) {\n return pushSelfClosing(target, props, 'meta');\n } else {\n if (textEmbedded) {\n // This link follows text but we aren't writing a tag. while not as efficient as possible we need\n // to be safe and assume text will follow by inserting a textSeparator\n target.push(textSeparator);\n }\n\n if (isFallback) {\n // Hoistable Elements for fallbacks are simply omitted. we don't want to emit them early\n // because they are likely superceded by primary content and we want to avoid needing to clean\n // them up when the primary content is ready. They are never hydrated on the client anyway because\n // boundaries in fallback are awaited or client render, in either case there is never hydration\n return null;\n } else if (typeof props.charSet === 'string') {\n // \"charset\" Should really be config and not picked up from tags however since this is\n // the only way to embed the tag today we flush it on a special queue on the Request so it\n // can go before everything else. Like viewport this means that the tag will escape it's\n // parent container.\n return pushSelfClosing(renderState.charsetChunks, props, 'meta');\n } else if (props.name === 'viewport') {\n // \"viewport\" is flushed on the Request so it can go earlier that Float resources that\n // might be affected by it. This means it can escape the boundary it is rendered within.\n // This is a pragmatic solution to viewport being incredibly sensitive to document order\n // without requiring all hoistables to be flushed too early.\n return pushSelfClosing(renderState.viewportChunks, props, 'meta');\n } else {\n return pushSelfClosing(renderState.hoistableChunks, props, 'meta');\n }\n }\n }\n}\n\nfunction pushLink(target, props, resumableState, renderState, hoistableState, textEmbedded, insertionMode, noscriptTagInScope, isFallback) {\n {\n var rel = props.rel;\n var href = props.href;\n var precedence = props.precedence;\n\n if (insertionMode === SVG_MODE || noscriptTagInScope || props.itemProp != null || typeof rel !== 'string' || typeof href !== 'string' || href === '') {\n {\n if (rel === 'stylesheet' && typeof props.precedence === 'string') {\n if (typeof href !== 'string' || !href) {\n error('React encountered a `<link rel=\"stylesheet\" .../>` with a `precedence` prop and expected the `href` prop to be a non-empty string but ecountered %s instead. If your intent was to have React hoist and deduplciate this stylesheet using the `precedence` prop ensure there is a non-empty string `href` prop as well, otherwise remove the `precedence` prop.', getValueDescriptorExpectingObjectForWarning(href));\n }\n }\n }\n\n pushLinkImpl(target, props);\n return null;\n }\n\n if (props.rel === 'stylesheet') {\n // This <link> may hoistable as a Stylesheet Resource, otherwise it will emit in place\n var key = getResourceKey(href);\n\n if (typeof precedence !== 'string' || props.disabled != null || props.onLoad || props.onError) {\n // This stylesheet is either not opted into Resource semantics or has conflicting properties which\n // disqualify it for such. We can still create a preload resource to help it load faster on the\n // client\n {\n if (typeof precedence === 'string') {\n if (props.disabled != null) {\n error('React encountered a `<link rel=\"stylesheet\" .../>` with a `precedence` prop and a `disabled` prop. The presence of the `disabled` prop indicates an intent to manage the stylesheet active state from your from your Component code and React will not hoist or deduplicate this stylesheet. If your intent was to have React hoist and deduplciate this stylesheet using the `precedence` prop remove the `disabled` prop, otherwise remove the `precedence` prop.');\n } else if (props.onLoad || props.onError) {\n var propDescription = props.onLoad && props.onError ? '`onLoad` and `onError` props' : props.onLoad ? '`onLoad` prop' : '`onError` prop';\n\n error('React encountered a `<link rel=\"stylesheet\" .../>` with a `precedence` prop and %s. The presence of loading and error handlers indicates an intent to manage the stylesheet loading state from your from your Component code and React will not hoist or deduplicate this stylesheet. If your intent was to have React hoist and deduplciate this stylesheet using the `precedence` prop remove the %s, otherwise remove the `precedence` prop.', propDescription, propDescription);\n }\n }\n }\n\n return pushLinkImpl(target, props);\n } else {\n // This stylesheet refers to a Resource and we create a new one if necessary\n var styleQueue = renderState.styles.get(precedence);\n var hasKey = resumableState.styleResources.hasOwnProperty(key);\n var resourceState = hasKey ? resumableState.styleResources[key] : undefined;\n\n if (resourceState !== EXISTS) {\n // We are going to create this resource now so it is marked as Exists\n resumableState.styleResources[key] = EXISTS; // If this is the first time we've encountered this precedence we need\n // to create a StyleQueue\n\n if (!styleQueue) {\n styleQueue = {\n precedence: stringToChunk(escapeTextForBrowser(precedence)),\n rules: [],\n hrefs: [],\n sheets: new Map()\n };\n renderState.styles.set(precedence, styleQueue);\n }\n\n var resource = {\n state: PENDING$1,\n props: stylesheetPropsFromRawProps(props)\n };\n\n if (resourceState) {\n // When resourceState is truty it is a Preload state. We cast it for clarity\n var preloadState = resourceState;\n\n if (preloadState.length === 2) {\n adoptPreloadCredentials(resource.props, preloadState);\n }\n\n var preloadResource = renderState.preloads.stylesheets.get(key);\n\n if (preloadResource && preloadResource.length > 0) {\n // The Preload for this resource was created in this render pass and has not flushed yet so\n // we need to clear it to avoid it flushing.\n preloadResource.length = 0;\n } else {\n // Either the preload resource from this render already flushed in this render pass\n // or the preload flushed in a prior pass (prerender). In either case we need to mark\n // this resource as already having been preloaded.\n resource.state = PRELOADED;\n }\n } // We add the newly created resource to our StyleQueue and if necessary\n // track the resource with the currently rendering boundary\n\n\n styleQueue.sheets.set(key, resource);\n\n if (hoistableState) {\n hoistableState.stylesheets.add(resource);\n }\n } else {\n // We need to track whether this boundary should wait on this resource or not.\n // Typically this resource should always exist since we either had it or just created\n // it. However, it's possible when you resume that the style has already been emitted\n // and then it wouldn't be recreated in the RenderState and there's no need to track\n // it again since we should've hoisted it to the shell already.\n if (styleQueue) {\n var _resource = styleQueue.sheets.get(key);\n\n if (_resource) {\n if (hoistableState) {\n hoistableState.stylesheets.add(_resource);\n }\n }\n }\n }\n\n if (textEmbedded) {\n // This link follows text but we aren't writing a tag. while not as efficient as possible we need\n // to be safe and assume text will follow by inserting a textSeparator\n target.push(textSeparator);\n }\n\n return null;\n }\n } else if (props.onLoad || props.onError) {\n // When using load handlers we cannot hoist and need to emit links in place\n return pushLinkImpl(target, props);\n } else {\n // We can hoist this link so we may need to emit a text separator.\n // @TODO refactor text separators so we don't have to defensively add\n // them when we don't end up emitting a tag as a result of pushStartInstance\n if (textEmbedded) {\n // This link follows text but we aren't writing a tag. while not as efficient as possible we need\n // to be safe and assume text will follow by inserting a textSeparator\n target.push(textSeparator);\n }\n\n if (isFallback) {\n // Hoistable Elements for fallbacks are simply omitted. we don't want to emit them early\n // because they are likely superceded by primary content and we want to avoid needing to clean\n // them up when the primary content is ready. They are never hydrated on the client anyway because\n // boundaries in fallback are awaited or client render, in either case there is never hydration\n return null;\n } else {\n return pushLinkImpl(renderState.hoistableChunks, props);\n }\n }\n }\n}\n\nfunction pushLinkImpl(target, props) {\n target.push(startChunkForTag('link'));\n\n for (var propKey in props) {\n if (hasOwnProperty.call(props, propKey)) {\n var propValue = props[propKey];\n\n if (propValue == null) {\n continue;\n }\n\n switch (propKey) {\n case 'children':\n case 'dangerouslySetInnerHTML':\n throw new Error('link' + \" is a self-closing tag and must neither have `children` nor \" + 'use `dangerouslySetInnerHTML`.');\n\n default:\n pushAttribute(target, propKey, propValue);\n break;\n }\n }\n }\n\n target.push(endOfStartTagSelfClosing);\n return null;\n}\n\nfunction pushStyle(target, props, resumableState, renderState, hoistableState, textEmbedded, insertionMode, noscriptTagInScope) {\n {\n if (hasOwnProperty.call(props, 'children')) {\n var children = props.children;\n var child = Array.isArray(children) ? children.length < 2 ? children[0] : null : children;\n\n if (typeof child === 'function' || typeof child === 'symbol' || Array.isArray(child)) {\n var childType = typeof child === 'function' ? 'a Function' : typeof child === 'symbol' ? 'a Sybmol' : 'an Array';\n\n error('React expect children of <style> tags to be a string, number, or object with a `toString` method but found %s instead. ' + 'In browsers style Elements can only have `Text` Nodes as children.', childType);\n }\n }\n }\n\n {\n var precedence = props.precedence;\n var href = props.href;\n\n if (insertionMode === SVG_MODE || noscriptTagInScope || props.itemProp != null || typeof precedence !== 'string' || typeof href !== 'string' || href === '') {\n // This style tag is not able to be turned into a Style Resource\n return pushStyleImpl(target, props);\n }\n\n {\n if (href.includes(' ')) {\n error('React expected the `href` prop for a <style> tag opting into hoisting semantics using the `precedence` prop to not have any spaces but ecountered spaces instead. using spaces in this prop will cause hydration of this style to fail on the client. The href for the <style> where this ocurred is \"%s\".', href);\n }\n }\n\n var key = getResourceKey(href);\n var styleQueue = renderState.styles.get(precedence);\n var hasKey = resumableState.styleResources.hasOwnProperty(key);\n var resourceState = hasKey ? resumableState.styleResources[key] : undefined;\n\n if (resourceState !== EXISTS) {\n // We are going to create this resource now so it is marked as Exists\n resumableState.styleResources[key] = EXISTS;\n\n {\n if (resourceState) {\n error('React encountered a hoistable style tag for the same href as a preload: \"%s\". When using a style tag to inline styles you should not also preload it as a stylsheet.', href);\n }\n }\n\n if (!styleQueue) {\n // This is the first time we've encountered this precedence we need\n // to create a StyleQueue.\n styleQueue = {\n precedence: stringToChunk(escapeTextForBrowser(precedence)),\n rules: [],\n hrefs: [stringToChunk(escapeTextForBrowser(href))],\n sheets: new Map()\n };\n renderState.styles.set(precedence, styleQueue);\n } else {\n // We have seen this precedence before and need to track this href\n styleQueue.hrefs.push(stringToChunk(escapeTextForBrowser(href)));\n }\n\n pushStyleContents(styleQueue.rules, props);\n }\n\n if (styleQueue) {\n // We need to track whether this boundary should wait on this resource or not.\n // Typically this resource should always exist since we either had it or just created\n // it. However, it's possible when you resume that the style has already been emitted\n // and then it wouldn't be recreated in the RenderState and there's no need to track\n // it again since we should've hoisted it to the shell already.\n if (hoistableState) {\n hoistableState.styles.add(styleQueue);\n }\n }\n\n if (textEmbedded) {\n // This link follows text but we aren't writing a tag. while not as efficient as possible we need\n // to be safe and assume text will follow by inserting a textSeparator\n target.push(textSeparator);\n }\n }\n}\n\nfunction pushStyleImpl(target, props) {\n target.push(startChunkForTag('style'));\n var children = null;\n var innerHTML = null;\n\n for (var propKey in props) {\n if (hasOwnProperty.call(props, propKey)) {\n var propValue = props[propKey];\n\n if (propValue == null) {\n continue;\n }\n\n switch (propKey) {\n case 'children':\n children = propValue;\n break;\n\n case 'dangerouslySetInnerHTML':\n innerHTML = propValue;\n break;\n\n default:\n pushAttribute(target, propKey, propValue);\n break;\n }\n }\n }\n\n target.push(endOfStartTag);\n var child = Array.isArray(children) ? children.length < 2 ? children[0] : null : children;\n\n if (typeof child !== 'function' && typeof child !== 'symbol' && child !== null && child !== undefined) {\n // eslint-disable-next-line react-internal/safe-string-coercion\n target.push(stringToChunk(escapeTextForBrowser('' + child)));\n }\n\n pushInnerHTML(target, innerHTML, children);\n target.push(endChunkForTag('style'));\n return null;\n}\n\nfunction pushStyleContents(target, props) {\n var children = null;\n var innerHTML = null;\n\n for (var propKey in props) {\n if (hasOwnProperty.call(props, propKey)) {\n var propValue = props[propKey];\n\n if (propValue == null) {\n continue;\n }\n\n switch (propKey) {\n case 'children':\n children = propValue;\n break;\n\n case 'dangerouslySetInnerHTML':\n innerHTML = propValue;\n break;\n }\n }\n }\n\n var child = Array.isArray(children) ? children.length < 2 ? children[0] : null : children;\n\n if (typeof child !== 'function' && typeof child !== 'symbol' && child !== null && child !== undefined) {\n // eslint-disable-next-line react-internal/safe-string-coercion\n target.push(stringToChunk(escapeTextForBrowser('' + child)));\n }\n\n pushInnerHTML(target, innerHTML, children);\n return;\n}\n\nfunction pushImg(target, props, resumableState, renderState, pictureTagInScope) {\n var src = props.src,\n srcSet = props.srcSet;\n\n if (props.loading !== 'lazy' && (src || srcSet) && (typeof src === 'string' || src == null) && (typeof srcSet === 'string' || srcSet == null) && props.fetchPriority !== 'low' && pictureTagInScope === false && // We exclude data URIs in src and srcSet since these should not be preloaded\n !(typeof src === 'string' && src[4] === ':' && (src[0] === 'd' || src[0] === 'D') && (src[1] === 'a' || src[1] === 'A') && (src[2] === 't' || src[2] === 'T') && (src[3] === 'a' || src[3] === 'A')) && !(typeof srcSet === 'string' && srcSet[4] === ':' && (srcSet[0] === 'd' || srcSet[0] === 'D') && (srcSet[1] === 'a' || srcSet[1] === 'A') && (srcSet[2] === 't' || srcSet[2] === 'T') && (srcSet[3] === 'a' || srcSet[3] === 'A'))) {\n // We have a suspensey image and ought to preload it to optimize the loading of display blocking\n // resumableState.\n var sizes = typeof props.sizes === 'string' ? props.sizes : undefined;\n var key = getImageResourceKey(src, srcSet, sizes);\n var promotablePreloads = renderState.preloads.images;\n var resource = promotablePreloads.get(key);\n\n if (resource) {\n // We consider whether this preload can be promoted to higher priority flushing queue.\n // The only time a resource will exist here is if it was created during this render\n // and was not already in the high priority queue.\n if (props.fetchPriority === 'high' || renderState.highImagePreloads.size < 10) {\n // Delete the resource from the map since we are promoting it and don't want to\n // reenter this branch in a second pass for duplicate img hrefs.\n promotablePreloads.delete(key); // $FlowFixMe - Flow should understand that this is a Resource if the condition was true\n\n renderState.highImagePreloads.add(resource);\n }\n } else if (!resumableState.imageResources.hasOwnProperty(key)) {\n // We must construct a new preload resource\n resumableState.imageResources[key] = PRELOAD_NO_CREDS;\n var crossOrigin = getCrossOriginString(props.crossOrigin);\n var headers = renderState.headers;\n var header;\n\n if (headers && headers.remainingCapacity > 0 && ( // this is a hueristic similar to capping element preloads to 10 unless explicitly\n // fetchPriority=\"high\". We use length here which means it will fit fewer images when\n // the urls are long and more when short. arguably byte size is a better hueristic because\n // it directly translates to how much we send down before content is actually seen.\n // We could unify the counts and also make it so the total is tracked regardless of\n // flushing output but since the headers are likely to be go earlier than content\n // they don't really conflict so for now I've kept them separate\n props.fetchPriority === 'high' || headers.highImagePreloads.length < 500) && ( // We manually construct the options for the preload only from strings. We don't want to pollute\n // the params list with arbitrary props and if we copied everything over as it we might get\n // coercion errors. We have checks for this in Dev but it seems safer to just only accept values\n // that are strings\n header = getPreloadAsHeader(src, 'image', {\n imageSrcSet: props.srcSet,\n imageSizes: props.sizes,\n crossOrigin: crossOrigin,\n integrity: props.integrity,\n nonce: props.nonce,\n type: props.type,\n fetchPriority: props.fetchPriority,\n referrerPolicy: props.refererPolicy\n }), // We always consume the header length since once we find one header that doesn't fit\n // we assume all the rest won't as well. This is to avoid getting into a situation\n // where we have a very small remaining capacity but no headers will ever fit and we end\n // up constantly trying to see if the next resource might make it. In the future we can\n // make this behavior different between render and prerender since in the latter case\n // we are less sensitive to the current requests runtime per and more sensitive to maximizing\n // headers.\n (headers.remainingCapacity -= header.length) >= 2)) {\n // If we postpone in the shell we will still emit this preload so we track\n // it to make sure we don't reset it.\n renderState.resets.image[key] = PRELOAD_NO_CREDS;\n\n if (headers.highImagePreloads) {\n headers.highImagePreloads += ', ';\n } // $FlowFixMe[unsafe-addition]: we assign header during the if condition\n\n\n headers.highImagePreloads += header;\n } else {\n resource = [];\n pushLinkImpl(resource, {\n rel: 'preload',\n as: 'image',\n // There is a bug in Safari where imageSrcSet is not respected on preload links\n // so we omit the href here if we have imageSrcSet b/c safari will load the wrong image.\n // This harms older browers that do not support imageSrcSet by making their preloads not work\n // but this population is shrinking fast and is already small so we accept this tradeoff.\n href: srcSet ? undefined : src,\n imageSrcSet: srcSet,\n imageSizes: sizes,\n crossOrigin: crossOrigin,\n integrity: props.integrity,\n type: props.type,\n fetchPriority: props.fetchPriority,\n referrerPolicy: props.referrerPolicy\n });\n\n if (props.fetchPriority === 'high' || renderState.highImagePreloads.size < 10) {\n renderState.highImagePreloads.add(resource);\n } else {\n renderState.bulkPreloads.add(resource); // We can bump the priority up if the same img is rendered later\n // with fetchPriority=\"high\"\n\n promotablePreloads.set(key, resource);\n }\n }\n }\n }\n\n return pushSelfClosing(target, props, 'img');\n}\n\nfunction pushSelfClosing(target, props, tag) {\n target.push(startChunkForTag(tag));\n\n for (var propKey in props) {\n if (hasOwnProperty.call(props, propKey)) {\n var propValue = props[propKey];\n\n if (propValue == null) {\n continue;\n }\n\n switch (propKey) {\n case 'children':\n case 'dangerouslySetInnerHTML':\n throw new Error(tag + \" is a self-closing tag and must neither have `children` nor \" + 'use `dangerouslySetInnerHTML`.');\n\n default:\n pushAttribute(target, propKey, propValue);\n break;\n }\n }\n }\n\n target.push(endOfStartTagSelfClosing);\n return null;\n}\n\nfunction pushStartMenuItem(target, props) {\n target.push(startChunkForTag('menuitem'));\n\n for (var propKey in props) {\n if (hasOwnProperty.call(props, propKey)) {\n var propValue = props[propKey];\n\n if (propValue == null) {\n continue;\n }\n\n switch (propKey) {\n case 'children':\n case 'dangerouslySetInnerHTML':\n throw new Error('menuitems cannot have `children` nor `dangerouslySetInnerHTML`.');\n\n default:\n pushAttribute(target, propKey, propValue);\n break;\n }\n }\n }\n\n target.push(endOfStartTag);\n return null;\n}\n\nfunction pushTitle(target, props, renderState, insertionMode, noscriptTagInScope, isFallback) {\n {\n if (hasOwnProperty.call(props, 'children')) {\n var children = props.children;\n var child = Array.isArray(children) ? children.length < 2 ? children[0] : null : children;\n\n if (Array.isArray(children) && children.length > 1) {\n error('React expects the `children` prop of <title> tags to be a string, number%s, or object with a novel `toString` method but found an Array with length %s instead.' + ' Browsers treat all child Nodes of <title> tags as Text content and React expects to be able to convert `children` of <title> tags to a single string value' + ' which is why Arrays of length greater than 1 are not supported. When using JSX it can be commong to combine text nodes and value nodes.' + ' For example: <title>hello {nameOfUser}. While not immediately apparent, `children` in this case is an Array with length 2. If your `children` prop' + ' is using this form try rewriting it using a template string: {`hello ${nameOfUser}`}.', '', children.length);\n } else if (typeof child === 'function' || typeof child === 'symbol') {\n var childType = typeof child === 'function' ? 'a Function' : 'a Sybmol';\n\n error('React expect children of tags to be a string, number%s, or object with a novel `toString` method but found %s instead.' + ' Browsers treat all child Nodes of <title> tags as Text content and React expects to be able to convert children of <title>' + ' tags to a single string value.', '', childType);\n } else if (child && child.toString === {}.toString) {\n if (child.$$typeof != null) {\n error('React expects the `children` prop of <title> tags to be a string, number%s, or object with a novel `toString` method but found an object that appears to be' + ' a React element which never implements a suitable `toString` method. Browsers treat all child Nodes of <title> tags as Text content and React expects to' + ' be able to convert children of <title> tags to a single string value which is why rendering React elements is not supported. If the `children` of <title> is' + ' a React Component try moving the <title> tag into that component. If the `children` of <title> is some HTML markup change it to be Text only to be valid HTML.', '');\n } else {\n error('React expects the `children` prop of <title> tags to be a string, number%s, or object with a novel `toString` method but found an object that does not implement' + ' a suitable `toString` method. Browsers treat all child Nodes of <title> tags as Text content and React expects to be able to convert children of <title> tags' + ' to a single string value. Using the default `toString` method available on every object is almost certainly an error. Consider whether the `children` of this <title>' + ' is an object in error and change it to a string or number value if so. Otherwise implement a `toString` method that React can use to produce a valid <title>.', '');\n }\n }\n }\n }\n\n {\n if (insertionMode !== SVG_MODE && !noscriptTagInScope && props.itemProp == null) {\n if (isFallback) {\n // Hoistable Elements for fallbacks are simply omitted. we don't want to emit them early\n // because they are likely superceded by primary content and we want to avoid needing to clean\n // them up when the primary content is ready. They are never hydrated on the client anyway because\n // boundaries in fallback are awaited or client render, in either case there is never hydration\n return null;\n } else {\n pushTitleImpl(renderState.hoistableChunks, props);\n }\n } else {\n return pushTitleImpl(target, props);\n }\n }\n}\n\nfunction pushTitleImpl(target, props) {\n target.push(startChunkForTag('title'));\n var children = null;\n var innerHTML = null;\n\n for (var propKey in props) {\n if (hasOwnProperty.call(props, propKey)) {\n var propValue = props[propKey];\n\n if (propValue == null) {\n continue;\n }\n\n switch (propKey) {\n case 'children':\n children = propValue;\n break;\n\n case 'dangerouslySetInnerHTML':\n innerHTML = propValue;\n break;\n\n default:\n pushAttribute(target, propKey, propValue);\n break;\n }\n }\n }\n\n target.push(endOfStartTag);\n var child = Array.isArray(children) ? children.length < 2 ? children[0] : null : children;\n\n if (typeof child !== 'function' && typeof child !== 'symbol' && child !== null && child !== undefined) {\n // eslint-disable-next-line react-internal/safe-string-coercion\n target.push(stringToChunk(escapeTextForBrowser('' + child)));\n }\n\n pushInnerHTML(target, innerHTML, children);\n target.push(endChunkForTag('title'));\n return null;\n}\n\nfunction pushStartHead(target, props, renderState, insertionMode) {\n {\n if (insertionMode < HTML_MODE && renderState.headChunks === null) {\n // This <head> is the Document.head and should be part of the preamble\n renderState.headChunks = [];\n return pushStartGenericElement(renderState.headChunks, props, 'head');\n } else {\n // This <head> is deep and is likely just an error. we emit it inline though.\n // Validation should warn that this tag is the the wrong spot.\n return pushStartGenericElement(target, props, 'head');\n }\n }\n}\n\nfunction pushStartHtml(target, props, renderState, insertionMode) {\n {\n if (insertionMode === ROOT_HTML_MODE && renderState.htmlChunks === null) {\n // This <html> is the Document.documentElement and should be part of the preamble\n renderState.htmlChunks = [doctypeChunk];\n return pushStartGenericElement(renderState.htmlChunks, props, 'html');\n } else {\n // This <html> is deep and is likely just an error. we emit it inline though.\n // Validation should warn that this tag is the the wrong spot.\n return pushStartGenericElement(target, props, 'html');\n }\n }\n}\n\nfunction pushScript(target, props, resumableState, renderState, textEmbedded, insertionMode, noscriptTagInScope) {\n {\n var asyncProp = props.async;\n\n if (typeof props.src !== 'string' || !props.src || !(asyncProp && typeof asyncProp !== 'function' && typeof asyncProp !== 'symbol') || props.onLoad || props.onError || insertionMode === SVG_MODE || noscriptTagInScope || props.itemProp != null) {\n // This script will not be a resource, we bailout early and emit it in place.\n return pushScriptImpl(target, props);\n }\n\n var src = props.src;\n var key = getResourceKey(src); // We can make this <script> into a ScriptResource\n\n var resources, preloads;\n\n if (props.type === 'module') {\n resources = resumableState.moduleScriptResources;\n preloads = renderState.preloads.moduleScripts;\n } else {\n resources = resumableState.scriptResources;\n preloads = renderState.preloads.scripts;\n }\n\n var hasKey = resources.hasOwnProperty(key);\n var resourceState = hasKey ? resources[key] : undefined;\n\n if (resourceState !== EXISTS) {\n // We are going to create this resource now so it is marked as Exists\n resources[key] = EXISTS;\n var scriptProps = props;\n\n if (resourceState) {\n // When resourceState is truty it is a Preload state. We cast it for clarity\n var preloadState = resourceState;\n\n if (preloadState.length === 2) {\n scriptProps = assign({}, props);\n adoptPreloadCredentials(scriptProps, preloadState);\n }\n\n var preloadResource = preloads.get(key);\n\n if (preloadResource) {\n // the preload resource exists was created in this render. Now that we have\n // a script resource which will emit earlier than a preload would if it\n // hasn't already flushed we prevent it from flushing by zeroing the length\n preloadResource.length = 0;\n }\n }\n\n var resource = []; // Add to the script flushing queue\n\n renderState.scripts.add(resource); // encode the tag as Chunks\n\n pushScriptImpl(resource, scriptProps);\n }\n\n if (textEmbedded) {\n // This script follows text but we aren't writing a tag. while not as efficient as possible we need\n // to be safe and assume text will follow by inserting a textSeparator\n target.push(textSeparator);\n }\n\n return null;\n }\n}\n\nfunction pushScriptImpl(target, props) {\n target.push(startChunkForTag('script'));\n var children = null;\n var innerHTML = null;\n\n for (var propKey in props) {\n if (hasOwnProperty.call(props, propKey)) {\n var propValue = props[propKey];\n\n if (propValue == null) {\n continue;\n }\n\n switch (propKey) {\n case 'children':\n children = propValue;\n break;\n\n case 'dangerouslySetInnerHTML':\n innerHTML = propValue;\n break;\n\n default:\n pushAttribute(target, propKey, propValue);\n break;\n }\n }\n }\n\n target.push(endOfStartTag);\n\n {\n if (children != null && typeof children !== 'string') {\n var descriptiveStatement = typeof children === 'number' ? 'a number for children' : Array.isArray(children) ? 'an array for children' : 'something unexpected for children';\n\n error('A script element was rendered with %s. If script element has children it must be a single string.' + ' Consider using dangerouslySetInnerHTML or passing a plain string as children.', descriptiveStatement);\n }\n }\n\n pushInnerHTML(target, innerHTML, children);\n\n if (typeof children === 'string') {\n target.push(stringToChunk(encodeHTMLTextNode(children)));\n }\n\n target.push(endChunkForTag('script'));\n return null;\n}\n\nfunction pushStartGenericElement(target, props, tag) {\n target.push(startChunkForTag(tag));\n var children = null;\n var innerHTML = null;\n\n for (var propKey in props) {\n if (hasOwnProperty.call(props, propKey)) {\n var propValue = props[propKey];\n\n if (propValue == null) {\n continue;\n }\n\n switch (propKey) {\n case 'children':\n children = propValue;\n break;\n\n case 'dangerouslySetInnerHTML':\n innerHTML = propValue;\n break;\n\n default:\n pushAttribute(target, propKey, propValue);\n break;\n }\n }\n }\n\n target.push(endOfStartTag);\n pushInnerHTML(target, innerHTML, children);\n\n if (typeof children === 'string') {\n // Special case children as a string to avoid the unnecessary comment.\n // TODO: Remove this special case after the general optimization is in place.\n target.push(stringToChunk(encodeHTMLTextNode(children)));\n return null;\n }\n\n return children;\n}\n\nfunction pushStartCustomElement(target, props, tag) {\n target.push(startChunkForTag(tag));\n var children = null;\n var innerHTML = null;\n\n for (var propKey in props) {\n if (hasOwnProperty.call(props, propKey)) {\n var propValue = props[propKey];\n\n if (propValue == null) {\n continue;\n }\n\n var attributeName = propKey;\n\n switch (propKey) {\n case 'children':\n children = propValue;\n break;\n\n case 'dangerouslySetInnerHTML':\n innerHTML = propValue;\n break;\n\n case 'style':\n pushStyleAttribute(target, propValue);\n break;\n\n case 'suppressContentEditableWarning':\n case 'suppressHydrationWarning':\n case 'ref':\n // Ignored. These are built-in to React on the client.\n break;\n\n case 'className':\n\n // intentional fallthrough\n\n default:\n if (isAttributeNameSafe(propKey) && typeof propValue !== 'function' && typeof propValue !== 'symbol') {\n\n target.push(attributeSeparator, stringToChunk(attributeName), attributeAssign, stringToChunk(escapeTextForBrowser(propValue)), attributeEnd);\n }\n\n break;\n }\n }\n }\n\n target.push(endOfStartTag);\n pushInnerHTML(target, innerHTML, children);\n return children;\n}\n\nvar leadingNewline = stringToPrecomputedChunk('\\n');\n\nfunction pushStartPreformattedElement(target, props, tag) {\n target.push(startChunkForTag(tag));\n var children = null;\n var innerHTML = null;\n\n for (var propKey in props) {\n if (hasOwnProperty.call(props, propKey)) {\n var propValue = props[propKey];\n\n if (propValue == null) {\n continue;\n }\n\n switch (propKey) {\n case 'children':\n children = propValue;\n break;\n\n case 'dangerouslySetInnerHTML':\n innerHTML = propValue;\n break;\n\n default:\n pushAttribute(target, propKey, propValue);\n break;\n }\n }\n }\n\n target.push(endOfStartTag); // text/html ignores the first character in these tags if it's a newline\n // Prefer to break application/xml over text/html (for now) by adding\n // a newline specifically to get eaten by the parser. (Alternately for\n // textareas, replacing \"^\\n\" with \"\\r\\n\" doesn't get eaten, and the first\n // \\r is normalized out by HTMLTextAreaElement#value.)\n // See: <http://www.w3.org/TR/html-polyglot/#newlines-in-textarea-and-pre>\n // See: <http://www.w3.org/TR/html5/syntax.html#element-restrictions>\n // See: <http://www.w3.org/TR/html5/syntax.html#newlines>\n // See: Parsing of \"textarea\" \"listing\" and \"pre\" elements\n // from <http://www.w3.org/TR/html5/syntax.html#parsing-main-inbody>\n // TODO: This doesn't deal with the case where the child is an array\n // or component that returns a string.\n\n if (innerHTML != null) {\n if (children != null) {\n throw new Error('Can only set one of `children` or `props.dangerouslySetInnerHTML`.');\n }\n\n if (typeof innerHTML !== 'object' || !('__html' in innerHTML)) {\n throw new Error('`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. ' + 'Please visit https://react.dev/link/dangerously-set-inner-html ' + 'for more information.');\n }\n\n var html = innerHTML.__html;\n\n if (html !== null && html !== undefined) {\n if (typeof html === 'string' && html.length > 0 && html[0] === '\\n') {\n target.push(leadingNewline, stringToChunk(html));\n } else {\n {\n checkHtmlStringCoercion(html);\n }\n\n target.push(stringToChunk('' + html));\n }\n }\n }\n\n if (typeof children === 'string' && children[0] === '\\n') {\n target.push(leadingNewline);\n }\n\n return children;\n} // We accept any tag to be rendered but since this gets injected into arbitrary\n// HTML, we want to make sure that it's a safe tag.\n// http://www.w3.org/TR/REC-xml/#NT-Name\n\n\nvar VALID_TAG_REGEX = /^[a-zA-Z][a-zA-Z:_\\.\\-\\d]*$/; // Simplified subset\n\nvar validatedTagCache = new Map();\n\nfunction startChunkForTag(tag) {\n var tagStartChunk = validatedTagCache.get(tag);\n\n if (tagStartChunk === undefined) {\n if (!VALID_TAG_REGEX.test(tag)) {\n throw new Error(\"Invalid tag: \" + tag);\n }\n\n tagStartChunk = stringToPrecomputedChunk('<' + tag);\n validatedTagCache.set(tag, tagStartChunk);\n }\n\n return tagStartChunk;\n}\n\nvar doctypeChunk = stringToPrecomputedChunk('<!DOCTYPE html>');\nfunction pushStartInstance(target, type, props, resumableState, renderState, hoistableState, formatContext, textEmbedded, isFallback) {\n {\n validateProperties$2(type, props);\n validateProperties$1(type, props);\n validateProperties(type, props, null);\n\n if (!props.suppressContentEditableWarning && props.contentEditable && props.children != null) {\n error('A component is `contentEditable` and contains `children` managed by ' + 'React. It is now your responsibility to guarantee that none of ' + 'those nodes are unexpectedly modified or duplicated. This is ' + 'probably not intentional.');\n }\n\n if (formatContext.insertionMode !== SVG_MODE && formatContext.insertionMode !== MATHML_MODE) {\n if (type.indexOf('-') === -1 && type.toLowerCase() !== type) {\n error('<%s /> is using incorrect casing. ' + 'Use PascalCase for React components, ' + 'or lowercase for HTML elements.', type);\n }\n }\n }\n\n switch (type) {\n case 'div':\n case 'span':\n case 'svg':\n case 'path':\n // Fast track very common tags\n break;\n\n case 'a':\n {\n break;\n }\n\n case 'g':\n case 'p':\n case 'li':\n // Fast track very common tags\n break;\n // Special tags\n\n case 'select':\n return pushStartSelect(target, props);\n\n case 'option':\n return pushStartOption(target, props, formatContext);\n\n case 'textarea':\n return pushStartTextArea(target, props);\n\n case 'input':\n return pushInput(target, props, resumableState, renderState);\n\n case 'button':\n return pushStartButton(target, props, resumableState, renderState);\n\n case 'form':\n return pushStartForm(target, props, resumableState, renderState);\n\n case 'menuitem':\n return pushStartMenuItem(target, props);\n\n case 'title':\n return pushTitle(target, props, renderState, formatContext.insertionMode, !!(formatContext.tagScope & NOSCRIPT_SCOPE), isFallback) ;\n\n case 'link':\n return pushLink(target, props, resumableState, renderState, hoistableState, textEmbedded, formatContext.insertionMode, !!(formatContext.tagScope & NOSCRIPT_SCOPE), isFallback);\n\n case 'script':\n return pushScript(target, props, resumableState, renderState, textEmbedded, formatContext.insertionMode, !!(formatContext.tagScope & NOSCRIPT_SCOPE)) ;\n\n case 'style':\n return pushStyle(target, props, resumableState, renderState, hoistableState, textEmbedded, formatContext.insertionMode, !!(formatContext.tagScope & NOSCRIPT_SCOPE));\n\n case 'meta':\n return pushMeta(target, props, renderState, textEmbedded, formatContext.insertionMode, !!(formatContext.tagScope & NOSCRIPT_SCOPE), isFallback);\n // Newline eating tags\n\n case 'listing':\n case 'pre':\n {\n return pushStartPreformattedElement(target, props, type);\n }\n\n case 'img':\n {\n return pushImg(target, props, resumableState, renderState, !!(formatContext.tagScope & PICTURE_SCOPE)) ;\n }\n // Omitted close tags\n\n case 'base':\n case 'area':\n case 'br':\n case 'col':\n case 'embed':\n case 'hr':\n case 'keygen':\n case 'param':\n case 'source':\n case 'track':\n case 'wbr':\n {\n return pushSelfClosing(target, props, type);\n }\n // These are reserved SVG and MathML elements, that are never custom elements.\n // https://html.spec.whatwg.org/multipage/custom-elements.html#custom-elements-core-concepts\n\n case 'annotation-xml':\n case 'color-profile':\n case 'font-face':\n case 'font-face-src':\n case 'font-face-uri':\n case 'font-face-format':\n case 'font-face-name':\n case 'missing-glyph':\n {\n break;\n }\n // Preamble start tags\n\n case 'head':\n return pushStartHead(target, props, renderState, formatContext.insertionMode);\n\n case 'html':\n {\n return pushStartHtml(target, props, renderState, formatContext.insertionMode);\n }\n\n default:\n {\n if (type.indexOf('-') !== -1) {\n // Custom element\n return pushStartCustomElement(target, props, type);\n }\n }\n } // Generic element\n\n\n return pushStartGenericElement(target, props, type);\n}\nvar endTagCache = new Map();\n\nfunction endChunkForTag(tag) {\n var chunk = endTagCache.get(tag);\n\n if (chunk === undefined) {\n chunk = stringToPrecomputedChunk('</' + tag + '>');\n endTagCache.set(tag, chunk);\n }\n\n return chunk;\n}\n\nfunction pushEndInstance(target, type, props, resumableState, formatContext) {\n switch (type) {\n // When float is on we expect title and script tags to always be pushed in\n // a unit and never return children. when we end up pushing the end tag we\n // want to ensure there is no extra closing tag pushed\n case 'title':\n case 'style':\n case 'script':\n // Omitted close tags\n // TODO: Instead of repeating this switch we could try to pass a flag from above.\n // That would require returning a tuple. Which might be ok if it gets inlined.\n\n case 'area':\n case 'base':\n case 'br':\n case 'col':\n case 'embed':\n case 'hr':\n case 'img':\n case 'input':\n case 'keygen':\n case 'link':\n case 'meta':\n case 'param':\n case 'source':\n case 'track':\n case 'wbr':\n {\n // No close tag needed.\n return;\n }\n // Postamble end tags\n // When float is enabled we omit the end tags for body and html when\n // they represent the Document.body and Document.documentElement Nodes.\n // This is so we can withhold them until the postamble when we know\n // we won't emit any more tags\n\n case 'body':\n {\n if (formatContext.insertionMode <= HTML_HTML_MODE) {\n resumableState.hasBody = true;\n return;\n }\n\n break;\n }\n\n case 'html':\n if (formatContext.insertionMode === ROOT_HTML_MODE) {\n resumableState.hasHtml = true;\n return;\n }\n\n break;\n }\n\n target.push(endChunkForTag(type));\n}\n\nfunction writeBootstrap(destination, renderState) {\n var bootstrapChunks = renderState.bootstrapChunks;\n var i = 0;\n\n for (; i < bootstrapChunks.length - 1; i++) {\n writeChunk(destination, bootstrapChunks[i]);\n }\n\n if (i < bootstrapChunks.length) {\n var lastChunk = bootstrapChunks[i];\n bootstrapChunks.length = 0;\n return writeChunkAndReturn(destination, lastChunk);\n }\n\n return true;\n}\n\nfunction writeCompletedRoot(destination, renderState) {\n return writeBootstrap(destination, renderState);\n} // Structural Nodes\n// A placeholder is a node inside a hidden partial tree that can be filled in later, but before\n// display. It's never visible to users. We use the template tag because it can be used in every\n// type of parent. <script> tags also work in every other tag except <colgroup>.\n\nvar placeholder1 = stringToPrecomputedChunk('<template id=\"');\nvar placeholder2 = stringToPrecomputedChunk('\"></template>');\nfunction writePlaceholder(destination, renderState, id) {\n writeChunk(destination, placeholder1);\n writeChunk(destination, renderState.placeholderPrefix);\n var formattedID = stringToChunk(id.toString(16));\n writeChunk(destination, formattedID);\n return writeChunkAndReturn(destination, placeholder2);\n} // Suspense boundaries are encoded as comments.\n\nvar startCompletedSuspenseBoundary = stringToPrecomputedChunk('<!--$-->');\nvar startPendingSuspenseBoundary1 = stringToPrecomputedChunk('<!--$?--><template id=\"');\nvar startPendingSuspenseBoundary2 = stringToPrecomputedChunk('\"></template>');\nvar startClientRenderedSuspenseBoundary = stringToPrecomputedChunk('<!--$!-->');\nvar endSuspenseBoundary = stringToPrecomputedChunk('<!--/$-->');\nvar clientRenderedSuspenseBoundaryError1 = stringToPrecomputedChunk('<template');\nvar clientRenderedSuspenseBoundaryErrorAttrInterstitial = stringToPrecomputedChunk('\"');\nvar clientRenderedSuspenseBoundaryError1A = stringToPrecomputedChunk(' data-dgst=\"');\nvar clientRenderedSuspenseBoundaryError1B = stringToPrecomputedChunk(' data-msg=\"');\nvar clientRenderedSuspenseBoundaryError1C = stringToPrecomputedChunk(' data-stck=\"');\nvar clientRenderedSuspenseBoundaryError2 = stringToPrecomputedChunk('></template>');\nfunction writeStartCompletedSuspenseBoundary(destination, renderState) {\n return writeChunkAndReturn(destination, startCompletedSuspenseBoundary);\n}\nfunction writeStartPendingSuspenseBoundary(destination, renderState, id) {\n writeChunk(destination, startPendingSuspenseBoundary1);\n\n if (id === null) {\n throw new Error('An ID must have been assigned before we can complete the boundary.');\n }\n\n writeChunk(destination, renderState.boundaryPrefix);\n writeChunk(destination, stringToChunk(id.toString(16)));\n return writeChunkAndReturn(destination, startPendingSuspenseBoundary2);\n}\nfunction writeStartClientRenderedSuspenseBoundary(destination, renderState, errorDigest, errorMesssage, errorComponentStack) {\n var result;\n result = writeChunkAndReturn(destination, startClientRenderedSuspenseBoundary);\n writeChunk(destination, clientRenderedSuspenseBoundaryError1);\n\n if (errorDigest) {\n writeChunk(destination, clientRenderedSuspenseBoundaryError1A);\n writeChunk(destination, stringToChunk(escapeTextForBrowser(errorDigest)));\n writeChunk(destination, clientRenderedSuspenseBoundaryErrorAttrInterstitial);\n }\n\n {\n if (errorMesssage) {\n writeChunk(destination, clientRenderedSuspenseBoundaryError1B);\n writeChunk(destination, stringToChunk(escapeTextForBrowser(errorMesssage)));\n writeChunk(destination, clientRenderedSuspenseBoundaryErrorAttrInterstitial);\n }\n\n if (errorComponentStack) {\n writeChunk(destination, clientRenderedSuspenseBoundaryError1C);\n writeChunk(destination, stringToChunk(escapeTextForBrowser(errorComponentStack)));\n writeChunk(destination, clientRenderedSuspenseBoundaryErrorAttrInterstitial);\n }\n }\n\n result = writeChunkAndReturn(destination, clientRenderedSuspenseBoundaryError2);\n return result;\n}\nfunction writeEndCompletedSuspenseBoundary(destination, renderState) {\n return writeChunkAndReturn(destination, endSuspenseBoundary);\n}\nfunction writeEndPendingSuspenseBoundary(destination, renderState) {\n return writeChunkAndReturn(destination, endSuspenseBoundary);\n}\nfunction writeEndClientRenderedSuspenseBoundary(destination, renderState) {\n return writeChunkAndReturn(destination, endSuspenseBoundary);\n}\nvar startSegmentHTML = stringToPrecomputedChunk('<div hidden id=\"');\nvar startSegmentHTML2 = stringToPrecomputedChunk('\">');\nvar endSegmentHTML = stringToPrecomputedChunk('</div>');\nvar startSegmentSVG = stringToPrecomputedChunk('<svg aria-hidden=\"true\" style=\"display:none\" id=\"');\nvar startSegmentSVG2 = stringToPrecomputedChunk('\">');\nvar endSegmentSVG = stringToPrecomputedChunk('</svg>');\nvar startSegmentMathML = stringToPrecomputedChunk('<math aria-hidden=\"true\" style=\"display:none\" id=\"');\nvar startSegmentMathML2 = stringToPrecomputedChunk('\">');\nvar endSegmentMathML = stringToPrecomputedChunk('</math>');\nvar startSegmentTable = stringToPrecomputedChunk('<table hidden id=\"');\nvar startSegmentTable2 = stringToPrecomputedChunk('\">');\nvar endSegmentTable = stringToPrecomputedChunk('</table>');\nvar startSegmentTableBody = stringToPrecomputedChunk('<table hidden><tbody id=\"');\nvar startSegmentTableBody2 = stringToPrecomputedChunk('\">');\nvar endSegmentTableBody = stringToPrecomputedChunk('</tbody></table>');\nvar startSegmentTableRow = stringToPrecomputedChunk('<table hidden><tr id=\"');\nvar startSegmentTableRow2 = stringToPrecomputedChunk('\">');\nvar endSegmentTableRow = stringToPrecomputedChunk('</tr></table>');\nvar startSegmentColGroup = stringToPrecomputedChunk('<table hidden><colgroup id=\"');\nvar startSegmentColGroup2 = stringToPrecomputedChunk('\">');\nvar endSegmentColGroup = stringToPrecomputedChunk('</colgroup></table>');\nfunction writeStartSegment(destination, renderState, formatContext, id) {\n switch (formatContext.insertionMode) {\n case ROOT_HTML_MODE:\n case HTML_HTML_MODE:\n case HTML_MODE:\n {\n writeChunk(destination, startSegmentHTML);\n writeChunk(destination, renderState.segmentPrefix);\n writeChunk(destination, stringToChunk(id.toString(16)));\n return writeChunkAndReturn(destination, startSegmentHTML2);\n }\n\n case SVG_MODE:\n {\n writeChunk(destination, startSegmentSVG);\n writeChunk(destination, renderState.segmentPrefix);\n writeChunk(destination, stringToChunk(id.toString(16)));\n return writeChunkAndReturn(destination, startSegmentSVG2);\n }\n\n case MATHML_MODE:\n {\n writeChunk(destination, startSegmentMathML);\n writeChunk(destination, renderState.segmentPrefix);\n writeChunk(destination, stringToChunk(id.toString(16)));\n return writeChunkAndReturn(destination, startSegmentMathML2);\n }\n\n case HTML_TABLE_MODE:\n {\n writeChunk(destination, startSegmentTable);\n writeChunk(destination, renderState.segmentPrefix);\n writeChunk(destination, stringToChunk(id.toString(16)));\n return writeChunkAndReturn(destination, startSegmentTable2);\n }\n // TODO: For the rest of these, there will be extra wrapper nodes that never\n // get deleted from the document. We need to delete the table too as part\n // of the injected scripts. They are invisible though so it's not too terrible\n // and it's kind of an edge case to suspend in a table. Totally supported though.\n\n case HTML_TABLE_BODY_MODE:\n {\n writeChunk(destination, startSegmentTableBody);\n writeChunk(destination, renderState.segmentPrefix);\n writeChunk(destination, stringToChunk(id.toString(16)));\n return writeChunkAndReturn(destination, startSegmentTableBody2);\n }\n\n case HTML_TABLE_ROW_MODE:\n {\n writeChunk(destination, startSegmentTableRow);\n writeChunk(destination, renderState.segmentPrefix);\n writeChunk(destination, stringToChunk(id.toString(16)));\n return writeChunkAndReturn(destination, startSegmentTableRow2);\n }\n\n case HTML_COLGROUP_MODE:\n {\n writeChunk(destination, startSegmentColGroup);\n writeChunk(destination, renderState.segmentPrefix);\n writeChunk(destination, stringToChunk(id.toString(16)));\n return writeChunkAndReturn(destination, startSegmentColGroup2);\n }\n\n default:\n {\n throw new Error('Unknown insertion mode. This is a bug in React.');\n }\n }\n}\nfunction writeEndSegment(destination, formatContext) {\n switch (formatContext.insertionMode) {\n case ROOT_HTML_MODE:\n case HTML_HTML_MODE:\n case HTML_MODE:\n {\n return writeChunkAndReturn(destination, endSegmentHTML);\n }\n\n case SVG_MODE:\n {\n return writeChunkAndReturn(destination, endSegmentSVG);\n }\n\n case MATHML_MODE:\n {\n return writeChunkAndReturn(destination, endSegmentMathML);\n }\n\n case HTML_TABLE_MODE:\n {\n return writeChunkAndReturn(destination, endSegmentTable);\n }\n\n case HTML_TABLE_BODY_MODE:\n {\n return writeChunkAndReturn(destination, endSegmentTableBody);\n }\n\n case HTML_TABLE_ROW_MODE:\n {\n return writeChunkAndReturn(destination, endSegmentTableRow);\n }\n\n case HTML_COLGROUP_MODE:\n {\n return writeChunkAndReturn(destination, endSegmentColGroup);\n }\n\n default:\n {\n throw new Error('Unknown insertion mode. This is a bug in React.');\n }\n }\n}\nvar completeSegmentScript1Full = stringToPrecomputedChunk(completeSegment + '$RS(\"');\nvar completeSegmentScript1Partial = stringToPrecomputedChunk('$RS(\"');\nvar completeSegmentScript2 = stringToPrecomputedChunk('\",\"');\nvar completeSegmentScriptEnd = stringToPrecomputedChunk('\")</script>');\nvar completeSegmentData1 = stringToPrecomputedChunk('<template data-rsi=\"\" data-sid=\"');\nvar completeSegmentData2 = stringToPrecomputedChunk('\" data-pid=\"');\nvar completeSegmentDataEnd = dataElementQuotedEnd;\nfunction writeCompletedSegmentInstruction(destination, resumableState, renderState, contentSegmentID) {\n var scriptFormat = resumableState.streamingFormat === ScriptStreamingFormat;\n\n if (scriptFormat) {\n writeChunk(destination, renderState.startInlineScript);\n\n if ((resumableState.instructions & SentCompleteSegmentFunction) === NothingSent) {\n // The first time we write this, we'll need to include the full implementation.\n resumableState.instructions |= SentCompleteSegmentFunction;\n writeChunk(destination, completeSegmentScript1Full);\n } else {\n // Future calls can just reuse the same function.\n writeChunk(destination, completeSegmentScript1Partial);\n }\n } else {\n writeChunk(destination, completeSegmentData1);\n } // Write function arguments, which are string literals\n\n\n writeChunk(destination, renderState.segmentPrefix);\n var formattedID = stringToChunk(contentSegmentID.toString(16));\n writeChunk(destination, formattedID);\n\n if (scriptFormat) {\n writeChunk(destination, completeSegmentScript2);\n } else {\n writeChunk(destination, completeSegmentData2);\n }\n\n writeChunk(destination, renderState.placeholderPrefix);\n writeChunk(destination, formattedID);\n\n if (scriptFormat) {\n return writeChunkAndReturn(destination, completeSegmentScriptEnd);\n } else {\n return writeChunkAndReturn(destination, completeSegmentDataEnd);\n }\n}\nvar completeBoundaryScript1Full = stringToPrecomputedChunk(completeBoundary + '$RC(\"');\nvar completeBoundaryScript1Partial = stringToPrecomputedChunk('$RC(\"');\nvar completeBoundaryWithStylesScript1FullBoth = stringToPrecomputedChunk(completeBoundary + completeBoundaryWithStyles + '$RR(\"');\nvar completeBoundaryWithStylesScript1FullPartial = stringToPrecomputedChunk(completeBoundaryWithStyles + '$RR(\"');\nvar completeBoundaryWithStylesScript1Partial = stringToPrecomputedChunk('$RR(\"');\nvar completeBoundaryScript2 = stringToPrecomputedChunk('\",\"');\nvar completeBoundaryScript3a = stringToPrecomputedChunk('\",');\nvar completeBoundaryScript3b = stringToPrecomputedChunk('\"');\nvar completeBoundaryScriptEnd = stringToPrecomputedChunk(')</script>');\nvar completeBoundaryData1 = stringToPrecomputedChunk('<template data-rci=\"\" data-bid=\"');\nvar completeBoundaryWithStylesData1 = stringToPrecomputedChunk('<template data-rri=\"\" data-bid=\"');\nvar completeBoundaryData2 = stringToPrecomputedChunk('\" data-sid=\"');\nvar completeBoundaryData3a = stringToPrecomputedChunk('\" data-sty=\"');\nvar completeBoundaryDataEnd = dataElementQuotedEnd;\nfunction writeCompletedBoundaryInstruction(destination, resumableState, renderState, id, hoistableState) {\n var requiresStyleInsertion;\n\n {\n requiresStyleInsertion = renderState.stylesToHoist; // If necessary stylesheets will be flushed with this instruction.\n // Any style tags not yet hoisted in the Document will also be hoisted.\n // We reset this state since after this instruction executes all styles\n // up to this point will have been hoisted\n\n renderState.stylesToHoist = false;\n }\n\n var scriptFormat = resumableState.streamingFormat === ScriptStreamingFormat;\n\n if (scriptFormat) {\n writeChunk(destination, renderState.startInlineScript);\n\n if (requiresStyleInsertion) {\n if ((resumableState.instructions & SentCompleteBoundaryFunction) === NothingSent) {\n resumableState.instructions |= SentStyleInsertionFunction | SentCompleteBoundaryFunction;\n writeChunk(destination, completeBoundaryWithStylesScript1FullBoth);\n } else if ((resumableState.instructions & SentStyleInsertionFunction) === NothingSent) {\n resumableState.instructions |= SentStyleInsertionFunction;\n writeChunk(destination, completeBoundaryWithStylesScript1FullPartial);\n } else {\n writeChunk(destination, completeBoundaryWithStylesScript1Partial);\n }\n } else {\n if ((resumableState.instructions & SentCompleteBoundaryFunction) === NothingSent) {\n resumableState.instructions |= SentCompleteBoundaryFunction;\n writeChunk(destination, completeBoundaryScript1Full);\n } else {\n writeChunk(destination, completeBoundaryScript1Partial);\n }\n }\n } else {\n if (requiresStyleInsertion) {\n writeChunk(destination, completeBoundaryWithStylesData1);\n } else {\n writeChunk(destination, completeBoundaryData1);\n }\n }\n\n var idChunk = stringToChunk(id.toString(16));\n writeChunk(destination, renderState.boundaryPrefix);\n writeChunk(destination, idChunk); // Write function arguments, which are string and array literals\n\n if (scriptFormat) {\n writeChunk(destination, completeBoundaryScript2);\n } else {\n writeChunk(destination, completeBoundaryData2);\n }\n\n writeChunk(destination, renderState.segmentPrefix);\n writeChunk(destination, idChunk);\n\n if (requiresStyleInsertion) {\n // Script and data writers must format this differently:\n // - script writer emits an array literal, whose string elements are\n // escaped for javascript e.g. [\"A\", \"B\"]\n // - data writer emits a string literal, which is escaped as html\n // e.g. ["A", "B"]\n if (scriptFormat) {\n writeChunk(destination, completeBoundaryScript3a); // hoistableState encodes an array literal\n\n writeStyleResourceDependenciesInJS(destination, hoistableState);\n } else {\n writeChunk(destination, completeBoundaryData3a);\n writeStyleResourceDependenciesInAttr(destination, hoistableState);\n }\n } else {\n if (scriptFormat) {\n writeChunk(destination, completeBoundaryScript3b);\n }\n }\n\n var writeMore;\n\n if (scriptFormat) {\n writeMore = writeChunkAndReturn(destination, completeBoundaryScriptEnd);\n } else {\n writeMore = writeChunkAndReturn(destination, completeBoundaryDataEnd);\n }\n\n return writeBootstrap(destination, renderState) && writeMore;\n}\nvar clientRenderScript1Full = stringToPrecomputedChunk(clientRenderBoundary + ';$RX(\"');\nvar clientRenderScript1Partial = stringToPrecomputedChunk('$RX(\"');\nvar clientRenderScript1A = stringToPrecomputedChunk('\"');\nvar clientRenderErrorScriptArgInterstitial = stringToPrecomputedChunk(',');\nvar clientRenderScriptEnd = stringToPrecomputedChunk(')</script>');\nvar clientRenderData1 = stringToPrecomputedChunk('<template data-rxi=\"\" data-bid=\"');\nvar clientRenderData2 = stringToPrecomputedChunk('\" data-dgst=\"');\nvar clientRenderData3 = stringToPrecomputedChunk('\" data-msg=\"');\nvar clientRenderData4 = stringToPrecomputedChunk('\" data-stck=\"');\nvar clientRenderDataEnd = dataElementQuotedEnd;\nfunction writeClientRenderBoundaryInstruction(destination, resumableState, renderState, id, errorDigest, errorMessage, errorComponentStack) {\n var scriptFormat = resumableState.streamingFormat === ScriptStreamingFormat;\n\n if (scriptFormat) {\n writeChunk(destination, renderState.startInlineScript);\n\n if ((resumableState.instructions & SentClientRenderFunction) === NothingSent) {\n // The first time we write this, we'll need to include the full implementation.\n resumableState.instructions |= SentClientRenderFunction;\n writeChunk(destination, clientRenderScript1Full);\n } else {\n // Future calls can just reuse the same function.\n writeChunk(destination, clientRenderScript1Partial);\n }\n } else {\n // <template data-rxi=\"\" data-bid=\"\n writeChunk(destination, clientRenderData1);\n }\n\n writeChunk(destination, renderState.boundaryPrefix);\n writeChunk(destination, stringToChunk(id.toString(16)));\n\n if (scriptFormat) {\n // \" needs to be inserted for scripts, since ArgInterstitual does not contain\n // leading or trailing quotes\n writeChunk(destination, clientRenderScript1A);\n }\n\n if (errorDigest || errorMessage || errorComponentStack) {\n if (scriptFormat) {\n // ,\"JSONString\"\n writeChunk(destination, clientRenderErrorScriptArgInterstitial);\n writeChunk(destination, stringToChunk(escapeJSStringsForInstructionScripts(errorDigest || '')));\n } else {\n // \" data-dgst=\"HTMLString\n writeChunk(destination, clientRenderData2);\n writeChunk(destination, stringToChunk(escapeTextForBrowser(errorDigest || '')));\n }\n }\n\n if (errorMessage || errorComponentStack) {\n if (scriptFormat) {\n // ,\"JSONString\"\n writeChunk(destination, clientRenderErrorScriptArgInterstitial);\n writeChunk(destination, stringToChunk(escapeJSStringsForInstructionScripts(errorMessage || '')));\n } else {\n // \" data-msg=\"HTMLString\n writeChunk(destination, clientRenderData3);\n writeChunk(destination, stringToChunk(escapeTextForBrowser(errorMessage || '')));\n }\n }\n\n if (errorComponentStack) {\n // ,\"JSONString\"\n if (scriptFormat) {\n writeChunk(destination, clientRenderErrorScriptArgInterstitial);\n writeChunk(destination, stringToChunk(escapeJSStringsForInstructionScripts(errorComponentStack)));\n } else {\n // \" data-stck=\"HTMLString\n writeChunk(destination, clientRenderData4);\n writeChunk(destination, stringToChunk(escapeTextForBrowser(errorComponentStack)));\n }\n }\n\n if (scriptFormat) {\n // ></script>\n return writeChunkAndReturn(destination, clientRenderScriptEnd);\n } else {\n // \"></template>\n return writeChunkAndReturn(destination, clientRenderDataEnd);\n }\n}\nvar regexForJSStringsInInstructionScripts = /[<\\u2028\\u2029]/g;\n\nfunction escapeJSStringsForInstructionScripts(input) {\n var escaped = JSON.stringify(input);\n return escaped.replace(regexForJSStringsInInstructionScripts, function (match) {\n switch (match) {\n // santizing breaking out of strings and script tags\n case '<':\n return \"\\\\u003c\";\n\n case \"\\u2028\":\n return \"\\\\u2028\";\n\n case \"\\u2029\":\n return \"\\\\u2029\";\n\n default:\n {\n // eslint-disable-next-line react-internal/prod-error-codes\n throw new Error('escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React');\n }\n }\n });\n}\n\nvar regexForJSStringsInScripts = /[&><\\u2028\\u2029]/g;\n\nfunction escapeJSObjectForInstructionScripts(input) {\n var escaped = JSON.stringify(input);\n return escaped.replace(regexForJSStringsInScripts, function (match) {\n switch (match) {\n // santizing breaking out of strings and script tags\n case '&':\n return \"\\\\u0026\";\n\n case '>':\n return \"\\\\u003e\";\n\n case '<':\n return \"\\\\u003c\";\n\n case \"\\u2028\":\n return \"\\\\u2028\";\n\n case \"\\u2029\":\n return \"\\\\u2029\";\n\n default:\n {\n // eslint-disable-next-line react-internal/prod-error-codes\n throw new Error('escapeJSObjectForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React');\n }\n }\n });\n}\n\nvar lateStyleTagResourceOpen1 = stringToPrecomputedChunk('<style media=\"not all\" data-precedence=\"');\nvar lateStyleTagResourceOpen2 = stringToPrecomputedChunk('\" data-href=\"');\nvar lateStyleTagResourceOpen3 = stringToPrecomputedChunk('\">');\nvar lateStyleTagTemplateClose = stringToPrecomputedChunk('</style>'); // Tracks whether the boundary currently flushing is flushign style tags or has any\n// stylesheet dependencies not flushed in the Preamble.\n\nvar currentlyRenderingBoundaryHasStylesToHoist = false; // Acts as a return value for the forEach execution of style tag flushing.\n\nvar destinationHasCapacity = true;\n\nfunction flushStyleTagsLateForBoundary(styleQueue) {\n var rules = styleQueue.rules;\n var hrefs = styleQueue.hrefs;\n\n {\n if (rules.length > 0 && hrefs.length === 0) {\n error('React expected to have at least one href for an a hoistable style but found none. This is a bug in React.');\n }\n }\n\n var i = 0;\n\n if (hrefs.length) {\n writeChunk(this, lateStyleTagResourceOpen1);\n writeChunk(this, styleQueue.precedence);\n writeChunk(this, lateStyleTagResourceOpen2);\n\n for (; i < hrefs.length - 1; i++) {\n writeChunk(this, hrefs[i]);\n writeChunk(this, spaceSeparator);\n }\n\n writeChunk(this, hrefs[i]);\n writeChunk(this, lateStyleTagResourceOpen3);\n\n for (i = 0; i < rules.length; i++) {\n writeChunk(this, rules[i]);\n }\n\n destinationHasCapacity = writeChunkAndReturn(this, lateStyleTagTemplateClose); // We wrote style tags for this boundary and we may need to emit a script\n // to hoist them.\n\n currentlyRenderingBoundaryHasStylesToHoist = true; // style resources can flush continuously since more rules may be written into\n // them with new hrefs. Instead of marking it flushed, we simply reset the chunks\n // and hrefs\n\n rules.length = 0;\n hrefs.length = 0;\n }\n}\n\nfunction hasStylesToHoist(stylesheet) {\n // We need to reveal boundaries with styles whenever a stylesheet it depends on is either\n // not flushed or flushed after the preamble (shell).\n if (stylesheet.state !== PREAMBLE) {\n currentlyRenderingBoundaryHasStylesToHoist = true;\n return true;\n }\n\n return false;\n}\n\nfunction writeHoistablesForBoundary(destination, hoistableState, renderState) {\n // Reset these on each invocation, they are only safe to read in this function\n currentlyRenderingBoundaryHasStylesToHoist = false;\n destinationHasCapacity = true; // Flush style tags for each precedence this boundary depends on\n\n hoistableState.styles.forEach(flushStyleTagsLateForBoundary, destination); // Determine if this boundary has stylesheets that need to be awaited upon completion\n\n hoistableState.stylesheets.forEach(hasStylesToHoist); // We don't actually want to flush any hoistables until the boundary is complete so we omit\n // any further writing here. This is becuase unlike Resources, Hoistable Elements act more like\n // regular elements, each rendered element has a unique representation in the DOM. We don't want\n // these elements to appear in the DOM early, before the boundary has actually completed\n\n if (currentlyRenderingBoundaryHasStylesToHoist) {\n renderState.stylesToHoist = true;\n }\n\n return destinationHasCapacity;\n}\n\nfunction flushResource(resource) {\n for (var i = 0; i < resource.length; i++) {\n writeChunk(this, resource[i]);\n }\n\n resource.length = 0;\n}\n\nvar stylesheetFlushingQueue = [];\n\nfunction flushStyleInPreamble(stylesheet, key, map) {\n // We still need to encode stylesheet chunks\n // because unlike most Hoistables and Resources we do not eagerly encode\n // them during render. This is because if we flush late we have to send a\n // different encoding and we don't want to encode multiple times\n pushLinkImpl(stylesheetFlushingQueue, stylesheet.props);\n\n for (var i = 0; i < stylesheetFlushingQueue.length; i++) {\n writeChunk(this, stylesheetFlushingQueue[i]);\n }\n\n stylesheetFlushingQueue.length = 0;\n stylesheet.state = PREAMBLE;\n}\n\nvar styleTagResourceOpen1 = stringToPrecomputedChunk('<style data-precedence=\"');\nvar styleTagResourceOpen2 = stringToPrecomputedChunk('\" data-href=\"');\nvar spaceSeparator = stringToPrecomputedChunk(' ');\nvar styleTagResourceOpen3 = stringToPrecomputedChunk('\">');\nvar styleTagResourceClose = stringToPrecomputedChunk('</style>');\n\nfunction flushStylesInPreamble(styleQueue, precedence) {\n var hasStylesheets = styleQueue.sheets.size > 0;\n styleQueue.sheets.forEach(flushStyleInPreamble, this);\n styleQueue.sheets.clear();\n var rules = styleQueue.rules;\n var hrefs = styleQueue.hrefs; // If we don't emit any stylesheets at this precedence we still need to maintain the precedence\n // order so even if there are no rules for style tags at this precedence we emit an empty style\n // tag with the data-precedence attribute\n\n if (!hasStylesheets || hrefs.length) {\n writeChunk(this, styleTagResourceOpen1);\n writeChunk(this, styleQueue.precedence);\n var i = 0;\n\n if (hrefs.length) {\n writeChunk(this, styleTagResourceOpen2);\n\n for (; i < hrefs.length - 1; i++) {\n writeChunk(this, hrefs[i]);\n writeChunk(this, spaceSeparator);\n }\n\n writeChunk(this, hrefs[i]);\n }\n\n writeChunk(this, styleTagResourceOpen3);\n\n for (i = 0; i < rules.length; i++) {\n writeChunk(this, rules[i]);\n }\n\n writeChunk(this, styleTagResourceClose); // style resources can flush continuously since more rules may be written into\n // them with new hrefs. Instead of marking it flushed, we simply reset the chunks\n // and hrefs\n\n rules.length = 0;\n hrefs.length = 0;\n }\n}\n\nfunction preloadLateStyle(stylesheet) {\n if (stylesheet.state === PENDING$1) {\n stylesheet.state = PRELOADED;\n var preloadProps = preloadAsStylePropsFromProps(stylesheet.props.href, stylesheet.props);\n pushLinkImpl(stylesheetFlushingQueue, preloadProps);\n\n for (var i = 0; i < stylesheetFlushingQueue.length; i++) {\n writeChunk(this, stylesheetFlushingQueue[i]);\n }\n\n stylesheetFlushingQueue.length = 0;\n }\n}\n\nfunction preloadLateStyles(styleQueue) {\n styleQueue.sheets.forEach(preloadLateStyle, this);\n styleQueue.sheets.clear();\n} // We don't bother reporting backpressure at the moment because we expect to\n// flush the entire preamble in a single pass. This probably should be modified\n// in the future to be backpressure sensitive but that requires a larger refactor\n// of the flushing code in Fizz.\n\n\nfunction writePreamble(destination, resumableState, renderState, willFlushAllSegments) {\n // This function must be called exactly once on every request\n if (!willFlushAllSegments && renderState.externalRuntimeScript) {\n // If the root segment is incomplete due to suspended tasks\n // (e.g. willFlushAllSegments = false) and we are using data\n // streaming format, ensure the external runtime is sent.\n // (User code could choose to send this even earlier by calling\n // preinit(...), if they know they will suspend).\n var _renderState$external = renderState.externalRuntimeScript,\n src = _renderState$external.src,\n chunks = _renderState$external.chunks;\n internalPreinitScript(resumableState, renderState, src, chunks);\n }\n\n var htmlChunks = renderState.htmlChunks;\n var headChunks = renderState.headChunks;\n var i = 0; // Emit open tags before Hoistables and Resources\n\n if (htmlChunks) {\n // We have an <html> to emit as part of the preamble\n for (i = 0; i < htmlChunks.length; i++) {\n writeChunk(destination, htmlChunks[i]);\n }\n\n if (headChunks) {\n for (i = 0; i < headChunks.length; i++) {\n writeChunk(destination, headChunks[i]);\n }\n } else {\n // We did not render a head but we emitted an <html> so we emit one now\n writeChunk(destination, startChunkForTag('head'));\n writeChunk(destination, endOfStartTag);\n }\n } else if (headChunks) {\n // We do not have an <html> but we do have a <head>\n for (i = 0; i < headChunks.length; i++) {\n writeChunk(destination, headChunks[i]);\n }\n } // Emit high priority Hoistables\n\n\n var charsetChunks = renderState.charsetChunks;\n\n for (i = 0; i < charsetChunks.length; i++) {\n writeChunk(destination, charsetChunks[i]);\n }\n\n charsetChunks.length = 0; // emit preconnect resources\n\n renderState.preconnects.forEach(flushResource, destination);\n renderState.preconnects.clear();\n var viewportChunks = renderState.viewportChunks;\n\n for (i = 0; i < viewportChunks.length; i++) {\n writeChunk(destination, viewportChunks[i]);\n }\n\n viewportChunks.length = 0;\n renderState.fontPreloads.forEach(flushResource, destination);\n renderState.fontPreloads.clear();\n renderState.highImagePreloads.forEach(flushResource, destination);\n renderState.highImagePreloads.clear(); // Flush unblocked stylesheets by precedence\n\n renderState.styles.forEach(flushStylesInPreamble, destination);\n var importMapChunks = renderState.importMapChunks;\n\n for (i = 0; i < importMapChunks.length; i++) {\n writeChunk(destination, importMapChunks[i]);\n }\n\n importMapChunks.length = 0;\n renderState.bootstrapScripts.forEach(flushResource, destination);\n renderState.scripts.forEach(flushResource, destination);\n renderState.scripts.clear();\n renderState.bulkPreloads.forEach(flushResource, destination);\n renderState.bulkPreloads.clear(); // Write embedding hoistableChunks\n\n var hoistableChunks = renderState.hoistableChunks;\n\n for (i = 0; i < hoistableChunks.length; i++) {\n writeChunk(destination, hoistableChunks[i]);\n }\n\n hoistableChunks.length = 0;\n\n if (htmlChunks && headChunks === null) {\n // we have an <html> but we inserted an implicit <head> tag. We need\n // to close it since the main content won't have it\n writeChunk(destination, endChunkForTag('head'));\n }\n} // We don't bother reporting backpressure at the moment because we expect to\n// flush the entire preamble in a single pass. This probably should be modified\n// in the future to be backpressure sensitive but that requires a larger refactor\n// of the flushing code in Fizz.\n\nfunction writeHoistables(destination, resumableState, renderState) {\n var i = 0; // Emit high priority Hoistables\n // We omit charsetChunks because we have already sent the shell and if it wasn't\n // already sent it is too late now.\n\n var viewportChunks = renderState.viewportChunks;\n\n for (i = 0; i < viewportChunks.length; i++) {\n writeChunk(destination, viewportChunks[i]);\n }\n\n viewportChunks.length = 0;\n renderState.preconnects.forEach(flushResource, destination);\n renderState.preconnects.clear();\n renderState.fontPreloads.forEach(flushResource, destination);\n renderState.fontPreloads.clear();\n renderState.highImagePreloads.forEach(flushResource, destination);\n renderState.highImagePreloads.clear(); // Preload any stylesheets. these will emit in a render instruction that follows this\n // but we want to kick off preloading as soon as possible\n\n renderState.styles.forEach(preloadLateStyles, destination); // We only hoist importmaps that are configured through createResponse and that will\n // always flush in the preamble. Generally we don't expect people to render them as\n // tags when using React but if you do they are going to be treated like regular inline\n // scripts and flush after other hoistables which is problematic\n // bootstrap scripts should flush above script priority but these can only flush in the preamble\n // so we elide the code here for performance\n\n renderState.scripts.forEach(flushResource, destination);\n renderState.scripts.clear();\n renderState.bulkPreloads.forEach(flushResource, destination);\n renderState.bulkPreloads.clear(); // Write embedding hoistableChunks\n\n var hoistableChunks = renderState.hoistableChunks;\n\n for (i = 0; i < hoistableChunks.length; i++) {\n writeChunk(destination, hoistableChunks[i]);\n }\n\n hoistableChunks.length = 0;\n}\nfunction writePostamble(destination, resumableState) {\n if (resumableState.hasBody) {\n writeChunk(destination, endChunkForTag('body'));\n }\n\n if (resumableState.hasHtml) {\n writeChunk(destination, endChunkForTag('html'));\n }\n}\nvar arrayFirstOpenBracket = stringToPrecomputedChunk('[');\nvar arraySubsequentOpenBracket = stringToPrecomputedChunk(',[');\nvar arrayInterstitial = stringToPrecomputedChunk(',');\nvar arrayCloseBracket = stringToPrecomputedChunk(']'); // This function writes a 2D array of strings to be embedded in javascript.\n// E.g.\n// [[\"JS_escaped_string1\", \"JS_escaped_string2\"]]\n\nfunction writeStyleResourceDependenciesInJS(destination, hoistableState) {\n writeChunk(destination, arrayFirstOpenBracket);\n var nextArrayOpenBrackChunk = arrayFirstOpenBracket;\n hoistableState.stylesheets.forEach(function (resource) {\n if (resource.state === PREAMBLE) ; else if (resource.state === LATE) {\n // We only need to emit the href because this resource flushed in an earlier\n // boundary already which encoded the attributes necessary to construct\n // the resource instance on the client.\n writeChunk(destination, nextArrayOpenBrackChunk);\n writeStyleResourceDependencyHrefOnlyInJS(destination, resource.props.href);\n writeChunk(destination, arrayCloseBracket);\n nextArrayOpenBrackChunk = arraySubsequentOpenBracket;\n } else {\n // We need to emit the whole resource for insertion on the client\n writeChunk(destination, nextArrayOpenBrackChunk);\n writeStyleResourceDependencyInJS(destination, resource.props.href, resource.props['data-precedence'], resource.props);\n writeChunk(destination, arrayCloseBracket);\n nextArrayOpenBrackChunk = arraySubsequentOpenBracket;\n resource.state = LATE;\n }\n });\n writeChunk(destination, arrayCloseBracket);\n}\n/* Helper functions */\n\n\nfunction writeStyleResourceDependencyHrefOnlyInJS(destination, href) {\n // We should actually enforce this earlier when the resource is created but for\n // now we make sure we are actually dealing with a string here.\n {\n checkAttributeStringCoercion(href, 'href');\n }\n\n var coercedHref = '' + href;\n writeChunk(destination, stringToChunk(escapeJSObjectForInstructionScripts(coercedHref)));\n}\n\nfunction writeStyleResourceDependencyInJS(destination, href, precedence, props) {\n // eslint-disable-next-line react-internal/safe-string-coercion\n var coercedHref = sanitizeURL('' + href);\n writeChunk(destination, stringToChunk(escapeJSObjectForInstructionScripts(coercedHref)));\n\n {\n checkAttributeStringCoercion(precedence, 'precedence');\n }\n\n var coercedPrecedence = '' + precedence;\n writeChunk(destination, arrayInterstitial);\n writeChunk(destination, stringToChunk(escapeJSObjectForInstructionScripts(coercedPrecedence)));\n\n for (var propKey in props) {\n if (hasOwnProperty.call(props, propKey)) {\n var propValue = props[propKey];\n\n if (propValue == null) {\n continue;\n }\n\n switch (propKey) {\n case 'href':\n case 'rel':\n case 'precedence':\n case 'data-precedence':\n {\n break;\n }\n\n case 'children':\n case 'dangerouslySetInnerHTML':\n throw new Error('link' + \" is a self-closing tag and must neither have `children` nor \" + 'use `dangerouslySetInnerHTML`.');\n\n default:\n writeStyleResourceAttributeInJS(destination, propKey, propValue);\n break;\n }\n }\n }\n\n return null;\n}\n\nfunction writeStyleResourceAttributeInJS(destination, name, value) // not null or undefined\n{\n var attributeName = name.toLowerCase();\n var attributeValue;\n\n switch (typeof value) {\n case 'function':\n case 'symbol':\n return;\n }\n\n switch (name) {\n // Reserved names\n case 'innerHTML':\n case 'dangerouslySetInnerHTML':\n case 'suppressContentEditableWarning':\n case 'suppressHydrationWarning':\n case 'style':\n case 'ref':\n // Ignored\n return;\n // Attribute renames\n\n case 'className':\n {\n attributeName = 'class';\n\n {\n checkAttributeStringCoercion(value, attributeName);\n }\n\n attributeValue = '' + value;\n break;\n }\n // Booleans\n\n case 'hidden':\n {\n if (value === false) {\n return;\n }\n\n attributeValue = '';\n break;\n }\n // Santized URLs\n\n case 'src':\n case 'href':\n {\n value = sanitizeURL(value);\n\n {\n checkAttributeStringCoercion(value, attributeName);\n }\n\n attributeValue = '' + value;\n break;\n }\n\n default:\n {\n if ( // unrecognized event handlers are not SSR'd and we (apparently)\n // use on* as hueristic for these handler props\n name.length > 2 && (name[0] === 'o' || name[0] === 'O') && (name[1] === 'n' || name[1] === 'N')) {\n return;\n }\n\n if (!isAttributeNameSafe(name)) {\n return;\n }\n\n {\n checkAttributeStringCoercion(value, attributeName);\n }\n\n attributeValue = '' + value;\n }\n }\n\n writeChunk(destination, arrayInterstitial);\n writeChunk(destination, stringToChunk(escapeJSObjectForInstructionScripts(attributeName)));\n writeChunk(destination, arrayInterstitial);\n writeChunk(destination, stringToChunk(escapeJSObjectForInstructionScripts(attributeValue)));\n} // This function writes a 2D array of strings to be embedded in an attribute\n// value and read with JSON.parse in ReactDOMServerExternalRuntime.js\n// E.g.\n// [["JSON_escaped_string1", "JSON_escaped_string2"]]\n\n\nfunction writeStyleResourceDependenciesInAttr(destination, hoistableState) {\n writeChunk(destination, arrayFirstOpenBracket);\n var nextArrayOpenBrackChunk = arrayFirstOpenBracket;\n hoistableState.stylesheets.forEach(function (resource) {\n if (resource.state === PREAMBLE) ; else if (resource.state === LATE) {\n // We only need to emit the href because this resource flushed in an earlier\n // boundary already which encoded the attributes necessary to construct\n // the resource instance on the client.\n writeChunk(destination, nextArrayOpenBrackChunk);\n writeStyleResourceDependencyHrefOnlyInAttr(destination, resource.props.href);\n writeChunk(destination, arrayCloseBracket);\n nextArrayOpenBrackChunk = arraySubsequentOpenBracket;\n } else {\n // We need to emit the whole resource for insertion on the client\n writeChunk(destination, nextArrayOpenBrackChunk);\n writeStyleResourceDependencyInAttr(destination, resource.props.href, resource.props['data-precedence'], resource.props);\n writeChunk(destination, arrayCloseBracket);\n nextArrayOpenBrackChunk = arraySubsequentOpenBracket;\n resource.state = LATE;\n }\n });\n writeChunk(destination, arrayCloseBracket);\n}\n/* Helper functions */\n\n\nfunction writeStyleResourceDependencyHrefOnlyInAttr(destination, href) {\n // We should actually enforce this earlier when the resource is created but for\n // now we make sure we are actually dealing with a string here.\n {\n checkAttributeStringCoercion(href, 'href');\n }\n\n var coercedHref = '' + href;\n writeChunk(destination, stringToChunk(escapeTextForBrowser(JSON.stringify(coercedHref))));\n}\n\nfunction writeStyleResourceDependencyInAttr(destination, href, precedence, props) {\n // eslint-disable-next-line react-internal/safe-string-coercion\n var coercedHref = sanitizeURL('' + href);\n writeChunk(destination, stringToChunk(escapeTextForBrowser(JSON.stringify(coercedHref))));\n\n {\n checkAttributeStringCoercion(precedence, 'precedence');\n }\n\n var coercedPrecedence = '' + precedence;\n writeChunk(destination, arrayInterstitial);\n writeChunk(destination, stringToChunk(escapeTextForBrowser(JSON.stringify(coercedPrecedence))));\n\n for (var propKey in props) {\n if (hasOwnProperty.call(props, propKey)) {\n var propValue = props[propKey];\n\n if (propValue == null) {\n continue;\n }\n\n switch (propKey) {\n case 'href':\n case 'rel':\n case 'precedence':\n case 'data-precedence':\n {\n break;\n }\n\n case 'children':\n case 'dangerouslySetInnerHTML':\n throw new Error('link' + \" is a self-closing tag and must neither have `children` nor \" + 'use `dangerouslySetInnerHTML`.');\n\n default:\n writeStyleResourceAttributeInAttr(destination, propKey, propValue);\n break;\n }\n }\n }\n\n return null;\n}\n\nfunction writeStyleResourceAttributeInAttr(destination, name, value) // not null or undefined\n{\n var attributeName = name.toLowerCase();\n var attributeValue;\n\n switch (typeof value) {\n case 'function':\n case 'symbol':\n return;\n }\n\n switch (name) {\n // Reserved names\n case 'innerHTML':\n case 'dangerouslySetInnerHTML':\n case 'suppressContentEditableWarning':\n case 'suppressHydrationWarning':\n case 'style':\n case 'ref':\n // Ignored\n return;\n // Attribute renames\n\n case 'className':\n {\n attributeName = 'class';\n\n {\n checkAttributeStringCoercion(value, attributeName);\n }\n\n attributeValue = '' + value;\n break;\n }\n // Booleans\n\n case 'hidden':\n {\n if (value === false) {\n return;\n }\n\n attributeValue = '';\n break;\n }\n // Santized URLs\n\n case 'src':\n case 'href':\n {\n value = sanitizeURL(value);\n\n {\n checkAttributeStringCoercion(value, attributeName);\n }\n\n attributeValue = '' + value;\n break;\n }\n\n default:\n {\n if ( // unrecognized event handlers are not SSR'd and we (apparently)\n // use on* as hueristic for these handler props\n name.length > 2 && (name[0] === 'o' || name[0] === 'O') && (name[1] === 'n' || name[1] === 'N')) {\n return;\n }\n\n if (!isAttributeNameSafe(name)) {\n return;\n }\n\n {\n checkAttributeStringCoercion(value, attributeName);\n }\n\n attributeValue = '' + value;\n }\n }\n\n writeChunk(destination, arrayInterstitial);\n writeChunk(destination, stringToChunk(escapeTextForBrowser(JSON.stringify(attributeName))));\n writeChunk(destination, arrayInterstitial);\n writeChunk(destination, stringToChunk(escapeTextForBrowser(JSON.stringify(attributeValue))));\n}\n/**\n * Resources\n */\n\n\nvar PENDING$1 = 0;\nvar PRELOADED = 1;\nvar PREAMBLE = 2;\nvar LATE = 3;\nfunction createHoistableState() {\n return {\n styles: new Set(),\n stylesheets: new Set()\n };\n}\n\nfunction getResourceKey(href) {\n return href;\n}\n\nfunction getImageResourceKey(href, imageSrcSet, imageSizes) {\n if (imageSrcSet) {\n return imageSrcSet + '\\n' + (imageSizes || '');\n }\n\n return href;\n}\n\nfunction prefetchDNS(href) {\n\n var request = resolveRequest();\n\n if (!request) {\n // In async contexts we can sometimes resolve resources from AsyncLocalStorage. If we can't we can also\n // possibly get them from the stack if we are not in an async context. Since we were not able to resolve\n // the resources for this call in either case we opt to do nothing. We can consider making this a warning\n // but there may be times where calling a function outside of render is intentional (i.e. to warm up data\n // fetching) and we don't want to warn in those cases.\n previousDispatcher.prefetchDNS(href);\n return;\n }\n\n var resumableState = getResumableState(request);\n var renderState = getRenderState(request);\n\n if (typeof href === 'string' && href) {\n var key = getResourceKey(href);\n\n if (!resumableState.dnsResources.hasOwnProperty(key)) {\n resumableState.dnsResources[key] = EXISTS;\n var headers = renderState.headers;\n var header;\n\n if (headers && headers.remainingCapacity > 0 && ( // Compute the header since we might be able to fit it in the max length\n header = getPrefetchDNSAsHeader(href), // We always consume the header length since once we find one header that doesn't fit\n // we assume all the rest won't as well. This is to avoid getting into a situation\n // where we have a very small remaining capacity but no headers will ever fit and we end\n // up constantly trying to see if the next resource might make it. In the future we can\n // make this behavior different between render and prerender since in the latter case\n // we are less sensitive to the current requests runtime per and more sensitive to maximizing\n // headers.\n (headers.remainingCapacity -= header.length) >= 2)) {\n // Store this as resettable in case we are prerendering and postpone in the Shell\n renderState.resets.dns[key] = EXISTS;\n\n if (headers.preconnects) {\n headers.preconnects += ', ';\n } // $FlowFixMe[unsafe-addition]: we assign header during the if condition\n\n\n headers.preconnects += header;\n } else {\n // Encode as element\n var resource = [];\n pushLinkImpl(resource, {\n href: href,\n rel: 'dns-prefetch'\n });\n renderState.preconnects.add(resource);\n }\n }\n\n flushResources(request);\n }\n}\n\nfunction preconnect(href, crossOrigin) {\n\n var request = resolveRequest();\n\n if (!request) {\n // In async contexts we can sometimes resolve resources from AsyncLocalStorage. If we can't we can also\n // possibly get them from the stack if we are not in an async context. Since we were not able to resolve\n // the resources for this call in either case we opt to do nothing. We can consider making this a warning\n // but there may be times where calling a function outside of render is intentional (i.e. to warm up data\n // fetching) and we don't want to warn in those cases.\n previousDispatcher.preconnect(href, crossOrigin);\n return;\n }\n\n var resumableState = getResumableState(request);\n var renderState = getRenderState(request);\n\n if (typeof href === 'string' && href) {\n var bucket = crossOrigin === 'use-credentials' ? 'credentials' : typeof crossOrigin === 'string' ? 'anonymous' : 'default';\n var key = getResourceKey(href);\n\n if (!resumableState.connectResources[bucket].hasOwnProperty(key)) {\n resumableState.connectResources[bucket][key] = EXISTS;\n var headers = renderState.headers;\n var header;\n\n if (headers && headers.remainingCapacity > 0 && ( // Compute the header since we might be able to fit it in the max length\n header = getPreconnectAsHeader(href, crossOrigin), // We always consume the header length since once we find one header that doesn't fit\n // we assume all the rest won't as well. This is to avoid getting into a situation\n // where we have a very small remaining capacity but no headers will ever fit and we end\n // up constantly trying to see if the next resource might make it. In the future we can\n // make this behavior different between render and prerender since in the latter case\n // we are less sensitive to the current requests runtime per and more sensitive to maximizing\n // headers.\n (headers.remainingCapacity -= header.length) >= 2)) {\n // Store this in resettableState in case we are prerending and postpone in the Shell\n renderState.resets.connect[bucket][key] = EXISTS;\n\n if (headers.preconnects) {\n headers.preconnects += ', ';\n } // $FlowFixMe[unsafe-addition]: we assign header during the if condition\n\n\n headers.preconnects += header;\n } else {\n var resource = [];\n pushLinkImpl(resource, {\n rel: 'preconnect',\n href: href,\n crossOrigin: crossOrigin\n });\n renderState.preconnects.add(resource);\n }\n }\n\n flushResources(request);\n }\n}\n\nfunction preload(href, as, options) {\n\n var request = resolveRequest();\n\n if (!request) {\n // In async contexts we can sometimes resolve resources from AsyncLocalStorage. If we can't we can also\n // possibly get them from the stack if we are not in an async context. Since we were not able to resolve\n // the resources for this call in either case we opt to do nothing. We can consider making this a warning\n // but there may be times where calling a function outside of render is intentional (i.e. to warm up data\n // fetching) and we don't want to warn in those cases.\n previousDispatcher.preload(href, as, options);\n return;\n }\n\n var resumableState = getResumableState(request);\n var renderState = getRenderState(request);\n\n if (as && href) {\n switch (as) {\n case 'image':\n {\n var imageSrcSet, imageSizes, fetchPriority;\n\n if (options) {\n imageSrcSet = options.imageSrcSet;\n imageSizes = options.imageSizes;\n fetchPriority = options.fetchPriority;\n }\n\n var key = getImageResourceKey(href, imageSrcSet, imageSizes);\n\n if (resumableState.imageResources.hasOwnProperty(key)) {\n // we can return if we already have this resource\n return;\n }\n\n resumableState.imageResources[key] = PRELOAD_NO_CREDS;\n var headers = renderState.headers;\n var header;\n\n if (headers && headers.remainingCapacity > 0 && fetchPriority === 'high' && ( // Compute the header since we might be able to fit it in the max length\n header = getPreloadAsHeader(href, as, options), // We always consume the header length since once we find one header that doesn't fit\n // we assume all the rest won't as well. This is to avoid getting into a situation\n // where we have a very small remaining capacity but no headers will ever fit and we end\n // up constantly trying to see if the next resource might make it. In the future we can\n // make this behavior different between render and prerender since in the latter case\n // we are less sensitive to the current requests runtime per and more sensitive to maximizing\n // headers.\n (headers.remainingCapacity -= header.length) >= 2)) {\n // If we postpone in the shell we will still emit a preload as a header so we\n // track this to make sure we don't reset it.\n renderState.resets.image[key] = PRELOAD_NO_CREDS;\n\n if (headers.highImagePreloads) {\n headers.highImagePreloads += ', ';\n } // $FlowFixMe[unsafe-addition]: we assign header during the if condition\n\n\n headers.highImagePreloads += header;\n } else {\n // If we don't have headers to write to we have to encode as elements to flush in the head\n // When we have imageSrcSet the browser probably cannot load the right version from headers\n // (this should be verified by testing). For now we assume these need to go in the head\n // as elements even if headers are available.\n var resource = [];\n pushLinkImpl(resource, assign({\n rel: 'preload',\n // There is a bug in Safari where imageSrcSet is not respected on preload links\n // so we omit the href here if we have imageSrcSet b/c safari will load the wrong image.\n // This harms older browers that do not support imageSrcSet by making their preloads not work\n // but this population is shrinking fast and is already small so we accept this tradeoff.\n href: imageSrcSet ? undefined : href,\n as: as\n }, options));\n\n if (fetchPriority === 'high') {\n renderState.highImagePreloads.add(resource);\n } else {\n renderState.bulkPreloads.add(resource); // Stash the resource in case we need to promote it to higher priority\n // when an img tag is rendered\n\n renderState.preloads.images.set(key, resource);\n }\n }\n\n break;\n }\n\n case 'style':\n {\n var _key = getResourceKey(href);\n\n if (resumableState.styleResources.hasOwnProperty(_key)) {\n // we can return if we already have this resource\n return;\n }\n\n var _resource2 = [];\n pushLinkImpl(_resource2, assign({\n rel: 'preload',\n href: href,\n as: as\n }, options));\n resumableState.styleResources[_key] = options && (typeof options.crossOrigin === 'string' || typeof options.integrity === 'string') ? [options.crossOrigin, options.integrity] : PRELOAD_NO_CREDS;\n renderState.preloads.stylesheets.set(_key, _resource2);\n renderState.bulkPreloads.add(_resource2);\n break;\n }\n\n case 'script':\n {\n var _key2 = getResourceKey(href);\n\n if (resumableState.scriptResources.hasOwnProperty(_key2)) {\n // we can return if we already have this resource\n return;\n }\n\n var _resource3 = [];\n renderState.preloads.scripts.set(_key2, _resource3);\n renderState.bulkPreloads.add(_resource3);\n pushLinkImpl(_resource3, assign({\n rel: 'preload',\n href: href,\n as: as\n }, options));\n resumableState.scriptResources[_key2] = options && (typeof options.crossOrigin === 'string' || typeof options.integrity === 'string') ? [options.crossOrigin, options.integrity] : PRELOAD_NO_CREDS;\n break;\n }\n\n default:\n {\n var _key3 = getResourceKey(href);\n\n var hasAsType = resumableState.unknownResources.hasOwnProperty(as);\n var resources;\n\n if (hasAsType) {\n resources = resumableState.unknownResources[as];\n\n if (resources.hasOwnProperty(_key3)) {\n // we can return if we already have this resource\n return;\n }\n } else {\n resources = {};\n resumableState.unknownResources[as] = resources;\n }\n\n resources[_key3] = PRELOAD_NO_CREDS;\n var _headers = renderState.headers;\n\n var _header;\n\n if (_headers && _headers.remainingCapacity > 0 && as === 'font' && ( // We compute the header here because we might be able to fit it in the max length\n _header = getPreloadAsHeader(href, as, options), // We always consume the header length since once we find one header that doesn't fit\n // we assume all the rest won't as well. This is to avoid getting into a situation\n // where we have a very small remaining capacity but no headers will ever fit and we end\n // up constantly trying to see if the next resource might make it. In the future we can\n // make this behavior different between render and prerender since in the latter case\n // we are less sensitive to the current requests runtime per and more sensitive to maximizing\n // headers.\n (_headers.remainingCapacity -= _header.length) >= 2)) {\n // If we postpone in the shell we will still emit this preload so we\n // track it here to prevent it from being reset.\n renderState.resets.font[_key3] = PRELOAD_NO_CREDS;\n\n if (_headers.fontPreloads) {\n _headers.fontPreloads += ', ';\n } // $FlowFixMe[unsafe-addition]: we assign header during the if condition\n\n\n _headers.fontPreloads += _header;\n } else {\n // We either don't have headers or we are preloading something that does\n // not warrant elevated priority so we encode as an element.\n var _resource4 = [];\n\n var props = assign({\n rel: 'preload',\n href: href,\n as: as\n }, options);\n\n pushLinkImpl(_resource4, props);\n\n switch (as) {\n case 'font':\n renderState.fontPreloads.add(_resource4);\n break;\n // intentional fall through\n\n default:\n renderState.bulkPreloads.add(_resource4);\n }\n }\n }\n } // If we got this far we created a new resource\n\n\n flushResources(request);\n }\n}\n\nfunction preloadModule(href, options) {\n\n var request = resolveRequest();\n\n if (!request) {\n // In async contexts we can sometimes resolve resources from AsyncLocalStorage. If we can't we can also\n // possibly get them from the stack if we are not in an async context. Since we were not able to resolve\n // the resources for this call in either case we opt to do nothing. We can consider making this a warning\n // but there may be times where calling a function outside of render is intentional (i.e. to warm up data\n // fetching) and we don't want to warn in those cases.\n previousDispatcher.preloadModule(href, options);\n return;\n }\n\n var resumableState = getResumableState(request);\n var renderState = getRenderState(request);\n\n if (href) {\n var key = getResourceKey(href);\n var as = options && typeof options.as === 'string' ? options.as : 'script';\n var resource;\n\n switch (as) {\n case 'script':\n {\n if (resumableState.moduleScriptResources.hasOwnProperty(key)) {\n // we can return if we already have this resource\n return;\n }\n\n resource = [];\n resumableState.moduleScriptResources[key] = options && (typeof options.crossOrigin === 'string' || typeof options.integrity === 'string') ? [options.crossOrigin, options.integrity] : PRELOAD_NO_CREDS;\n renderState.preloads.moduleScripts.set(key, resource);\n break;\n }\n\n default:\n {\n var hasAsType = resumableState.moduleUnknownResources.hasOwnProperty(as);\n var resources;\n\n if (hasAsType) {\n resources = resumableState.unknownResources[as];\n\n if (resources.hasOwnProperty(key)) {\n // we can return if we already have this resource\n return;\n }\n } else {\n resources = {};\n resumableState.moduleUnknownResources[as] = resources;\n }\n\n resource = [];\n resources[key] = PRELOAD_NO_CREDS;\n }\n }\n\n pushLinkImpl(resource, assign({\n rel: 'modulepreload',\n href: href\n }, options));\n renderState.bulkPreloads.add(resource); // If we got this far we created a new resource\n\n flushResources(request);\n }\n}\n\nfunction preinitStyle(href, precedence, options) {\n\n var request = resolveRequest();\n\n if (!request) {\n // In async contexts we can sometimes resolve resources from AsyncLocalStorage. If we can't we can also\n // possibly get them from the stack if we are not in an async context. Since we were not able to resolve\n // the resources for this call in either case we opt to do nothing. We can consider making this a warning\n // but there may be times where calling a function outside of render is intentional (i.e. to warm up data\n // fetching) and we don't want to warn in those cases.\n previousDispatcher.preinitStyle(href, precedence, options);\n return;\n }\n\n var resumableState = getResumableState(request);\n var renderState = getRenderState(request);\n\n if (href) {\n precedence = precedence || 'default';\n var key = getResourceKey(href);\n var styleQueue = renderState.styles.get(precedence);\n var hasKey = resumableState.styleResources.hasOwnProperty(key);\n var resourceState = hasKey ? resumableState.styleResources[key] : undefined;\n\n if (resourceState !== EXISTS) {\n // We are going to create this resource now so it is marked as Exists\n resumableState.styleResources[key] = EXISTS; // If this is the first time we've encountered this precedence we need\n // to create a StyleQueue\n\n if (!styleQueue) {\n styleQueue = {\n precedence: stringToChunk(escapeTextForBrowser(precedence)),\n rules: [],\n hrefs: [],\n sheets: new Map()\n };\n renderState.styles.set(precedence, styleQueue);\n }\n\n var resource = {\n state: PENDING$1,\n props: assign({\n rel: 'stylesheet',\n href: href,\n 'data-precedence': precedence\n }, options)\n };\n\n if (resourceState) {\n // When resourceState is truty it is a Preload state. We cast it for clarity\n var preloadState = resourceState;\n\n if (preloadState.length === 2) {\n adoptPreloadCredentials(resource.props, preloadState);\n }\n\n var preloadResource = renderState.preloads.stylesheets.get(key);\n\n if (preloadResource && preloadResource.length > 0) {\n // The Preload for this resource was created in this render pass and has not flushed yet so\n // we need to clear it to avoid it flushing.\n preloadResource.length = 0;\n } else {\n // Either the preload resource from this render already flushed in this render pass\n // or the preload flushed in a prior pass (prerender). In either case we need to mark\n // this resource as already having been preloaded.\n resource.state = PRELOADED;\n }\n } // We add the newly created resource to our StyleQueue and if necessary\n // track the resource with the currently rendering boundary\n\n\n styleQueue.sheets.set(key, resource); // Notify the request that there are resources to flush even if no work is currently happening\n\n flushResources(request);\n }\n }\n}\n\nfunction preinitScript(src, options) {\n\n var request = resolveRequest();\n\n if (!request) {\n // In async contexts we can sometimes resolve resources from AsyncLocalStorage. If we can't we can also\n // possibly get them from the stack if we are not in an async context. Since we were not able to resolve\n // the resources for this call in either case we opt to do nothing. We can consider making this a warning\n // but there may be times where calling a function outside of render is intentional (i.e. to warm up data\n // fetching) and we don't want to warn in those cases.\n previousDispatcher.preinitScript(src, options);\n return;\n }\n\n var resumableState = getResumableState(request);\n var renderState = getRenderState(request);\n\n if (src) {\n var key = getResourceKey(src);\n var hasKey = resumableState.scriptResources.hasOwnProperty(key);\n var resourceState = hasKey ? resumableState.scriptResources[key] : undefined;\n\n if (resourceState !== EXISTS) {\n // We are going to create this resource now so it is marked as Exists\n resumableState.scriptResources[key] = EXISTS;\n\n var props = assign({\n src: src,\n async: true\n }, options);\n\n if (resourceState) {\n // When resourceState is truty it is a Preload state. We cast it for clarity\n var preloadState = resourceState;\n\n if (preloadState.length === 2) {\n adoptPreloadCredentials(props, preloadState);\n }\n\n var preloadResource = renderState.preloads.scripts.get(key);\n\n if (preloadResource) {\n // the preload resource exists was created in this render. Now that we have\n // a script resource which will emit earlier than a preload would if it\n // hasn't already flushed we prevent it from flushing by zeroing the length\n preloadResource.length = 0;\n }\n }\n\n var resource = []; // Add to the script flushing queue\n\n renderState.scripts.add(resource); // encode the tag as Chunks\n\n pushScriptImpl(resource, props); // Notify the request that there are resources to flush even if no work is currently happening\n\n flushResources(request);\n }\n\n return;\n }\n}\n\nfunction preinitModuleScript(src, options) {\n\n var request = resolveRequest();\n\n if (!request) {\n // In async contexts we can sometimes resolve resources from AsyncLocalStorage. If we can't we can also\n // possibly get them from the stack if we are not in an async context. Since we were not able to resolve\n // the resources for this call in either case we opt to do nothing. We can consider making this a warning\n // but there may be times where calling a function outside of render is intentional (i.e. to warm up data\n // fetching) and we don't want to warn in those cases.\n previousDispatcher.preinitModuleScript(src, options);\n return;\n }\n\n var resumableState = getResumableState(request);\n var renderState = getRenderState(request);\n\n if (src) {\n var key = getResourceKey(src);\n var hasKey = resumableState.moduleScriptResources.hasOwnProperty(key);\n var resourceState = hasKey ? resumableState.moduleScriptResources[key] : undefined;\n\n if (resourceState !== EXISTS) {\n // We are going to create this resource now so it is marked as Exists\n resumableState.moduleScriptResources[key] = EXISTS;\n\n var props = assign({\n src: src,\n type: 'module',\n async: true\n }, options);\n\n if (resourceState) {\n // When resourceState is truty it is a Preload state. We cast it for clarity\n var preloadState = resourceState;\n\n if (preloadState.length === 2) {\n adoptPreloadCredentials(props, preloadState);\n }\n\n var preloadResource = renderState.preloads.moduleScripts.get(key);\n\n if (preloadResource) {\n // the preload resource exists was created in this render. Now that we have\n // a script resource which will emit earlier than a preload would if it\n // hasn't already flushed we prevent it from flushing by zeroing the length\n preloadResource.length = 0;\n }\n }\n\n var resource = []; // Add to the script flushing queue\n\n renderState.scripts.add(resource); // encode the tag as Chunks\n\n pushScriptImpl(resource, props); // Notify the request that there are resources to flush even if no work is currently happening\n\n flushResources(request);\n }\n\n return;\n }\n} // This function is only safe to call at Request start time since it assumes\n// that each module has not already been preloaded. If we find a need to preload\n// scripts at any other point in time we will need to check whether the preload\n// already exists and not assume it\n\n\nfunction preloadBootstrapScriptOrModule(resumableState, renderState, href, props) {\n\n var key = getResourceKey(href);\n\n {\n if (resumableState.scriptResources.hasOwnProperty(key) || resumableState.moduleScriptResources.hasOwnProperty(key)) {\n // This is coded as a React error because it should be impossible for a userspace preload to preempt this call\n // If a userspace preload can preempt it then this assumption is broken and we need to reconsider this strategy\n // rather than instruct the user to not preload their bootstrap scripts themselves\n error('Internal React Error: React expected bootstrap script or module with src \"%s\" to not have been preloaded already. please file an issue', href);\n }\n } // The href used for bootstrap scripts and bootstrap modules should never be\n // used to preinit the resource. If a script can be preinited then it shouldn't\n // be a bootstrap script/module and if it is a bootstrap script/module then it\n // must not be safe to emit early. To avoid possibly allowing for preinits of\n // bootstrap scripts/modules we occlude these keys.\n\n\n resumableState.scriptResources[key] = EXISTS;\n resumableState.moduleScriptResources[key] = EXISTS;\n var resource = [];\n pushLinkImpl(resource, props);\n renderState.bootstrapScripts.add(resource);\n}\n\nfunction internalPreinitScript(resumableState, renderState, src, chunks) {\n var key = getResourceKey(src);\n\n if (!resumableState.scriptResources.hasOwnProperty(key)) {\n var resource = chunks;\n resumableState.scriptResources[key] = EXISTS;\n renderState.scripts.add(resource);\n }\n\n return;\n}\n\nfunction preloadAsStylePropsFromProps(href, props) {\n return {\n rel: 'preload',\n as: 'style',\n href: href,\n crossOrigin: props.crossOrigin,\n fetchPriority: props.fetchPriority,\n integrity: props.integrity,\n media: props.media,\n hrefLang: props.hrefLang,\n referrerPolicy: props.referrerPolicy\n };\n}\n\nfunction stylesheetPropsFromRawProps(rawProps) {\n return assign({}, rawProps, {\n 'data-precedence': rawProps.precedence,\n precedence: null\n });\n}\n\nfunction adoptPreloadCredentials(target, preloadState) {\n if (target.crossOrigin == null) target.crossOrigin = preloadState[0];\n if (target.integrity == null) target.integrity = preloadState[1];\n}\n\nfunction getPrefetchDNSAsHeader(href) {\n var escapedHref = escapeHrefForLinkHeaderURLContext(href);\n return \"<\" + escapedHref + \">; rel=dns-prefetch\";\n}\n\nfunction getPreconnectAsHeader(href, crossOrigin) {\n var escapedHref = escapeHrefForLinkHeaderURLContext(href);\n var value = \"<\" + escapedHref + \">; rel=preconnect\";\n\n if (typeof crossOrigin === 'string') {\n var escapedCrossOrigin = escapeStringForLinkHeaderQuotedParamValueContext(crossOrigin, 'crossOrigin');\n value += \"; crossorigin=\\\"\" + escapedCrossOrigin + \"\\\"\";\n }\n\n return value;\n}\n\nfunction getPreloadAsHeader(href, as, params) {\n var escapedHref = escapeHrefForLinkHeaderURLContext(href);\n var escapedAs = escapeStringForLinkHeaderQuotedParamValueContext(as, 'as');\n var value = \"<\" + escapedHref + \">; rel=preload; as=\\\"\" + escapedAs + \"\\\"\";\n\n for (var paramName in params) {\n if (hasOwnProperty.call(params, paramName)) {\n var paramValue = params[paramName];\n\n if (typeof paramValue === 'string') {\n value += \"; \" + paramName.toLowerCase() + \"=\\\"\" + escapeStringForLinkHeaderQuotedParamValueContext(paramValue, paramName) + \"\\\"\";\n }\n }\n }\n\n return value;\n}\n\nfunction getStylesheetPreloadAsHeader(stylesheet) {\n var props = stylesheet.props;\n var preloadOptions = {\n crossOrigin: props.crossOrigin,\n integrity: props.integrity,\n nonce: props.nonce,\n type: props.type,\n fetchPriority: props.fetchPriority,\n referrerPolicy: props.referrerPolicy,\n media: props.media\n };\n return getPreloadAsHeader(props.href, 'style', preloadOptions);\n} // This escaping function is only safe to use for href values being written into\n// a \"Link\" header in between `<` and `>` characters. The primary concern with the href is\n// to escape the bounding characters as well as new lines. This is unsafe to use in any other\n// context\n\n\nvar regexForHrefInLinkHeaderURLContext = /[<>\\r\\n]/g;\n\nfunction escapeHrefForLinkHeaderURLContext(hrefInput) {\n {\n checkAttributeStringCoercion(hrefInput, 'href');\n }\n\n var coercedHref = '' + hrefInput;\n return coercedHref.replace(regexForHrefInLinkHeaderURLContext, escapeHrefForLinkHeaderURLContextReplacer);\n}\n\nfunction escapeHrefForLinkHeaderURLContextReplacer(match) {\n switch (match) {\n case '<':\n return '%3C';\n\n case '>':\n return '%3E';\n\n case '\\n':\n return '%0A';\n\n case '\\r':\n return '%0D';\n\n default:\n {\n // eslint-disable-next-line react-internal/prod-error-codes\n throw new Error('escapeLinkHrefForHeaderContextReplacer encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React');\n }\n }\n} // This escaping function is only safe to use for quoted param values in an HTTP header.\n// It is unsafe to use for any value not inside quote marks in parater value position.\n\n\nvar regexForLinkHeaderQuotedParamValueContext = /[\"';,\\r\\n]/g;\n\nfunction escapeStringForLinkHeaderQuotedParamValueContext(value, name) {\n {\n checkOptionStringCoercion(value, name);\n }\n\n var coerced = '' + value;\n return coerced.replace(regexForLinkHeaderQuotedParamValueContext, escapeStringForLinkHeaderQuotedParamValueContextReplacer);\n}\n\nfunction escapeStringForLinkHeaderQuotedParamValueContextReplacer(match) {\n switch (match) {\n case '\"':\n return '%22';\n\n case \"'\":\n return '%27';\n\n case ';':\n return '%3B';\n\n case ',':\n return '%2C';\n\n case '\\n':\n return '%0A';\n\n case '\\r':\n return '%0D';\n\n default:\n {\n // eslint-disable-next-line react-internal/prod-error-codes\n throw new Error('escapeStringForLinkHeaderQuotedParamValueContextReplacer encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React');\n }\n }\n}\n\nfunction hoistStyleQueueDependency(styleQueue) {\n this.styles.add(styleQueue);\n}\n\nfunction hoistStylesheetDependency(stylesheet) {\n this.stylesheets.add(stylesheet);\n}\n\nfunction hoistHoistables(parentState, childState) {\n childState.styles.forEach(hoistStyleQueueDependency, parentState);\n childState.stylesheets.forEach(hoistStylesheetDependency, parentState);\n} // This function is called at various times depending on whether we are rendering\n// or prerendering. In this implementation we only actually emit headers once and\n// subsequent calls are ignored. We track whether the request has a completed shell\n// to determine whether we will follow headers with a flush including stylesheets.\n// In the context of prerrender we don't have a completed shell when the request finishes\n// with a postpone in the shell. In the context of a render we don't have a completed shell\n// if this is called before the shell finishes rendering which usually will happen anytime\n// anything suspends in the shell.\n\nfunction emitEarlyPreloads(renderState, resumableState, shellComplete) {\n var onHeaders = renderState.onHeaders;\n\n if (onHeaders) {\n var headers = renderState.headers;\n\n if (headers) {\n // Even if onHeaders throws we don't want to call this again so\n // we drop the headers state from this point onwards.\n renderState.headers = null;\n var linkHeader = headers.preconnects;\n\n if (headers.fontPreloads) {\n if (linkHeader) {\n linkHeader += ', ';\n }\n\n linkHeader += headers.fontPreloads;\n }\n\n if (headers.highImagePreloads) {\n if (linkHeader) {\n linkHeader += ', ';\n }\n\n linkHeader += headers.highImagePreloads;\n }\n\n if (!shellComplete) {\n // We use raw iterators because we want to be able to halt iteration\n // We could refactor renderState to store these dually in arrays to\n // make this more efficient at the cost of additional memory and\n // write overhead. However this code only runs once per request so\n // for now I consider this sufficient.\n var queueIter = renderState.styles.values();\n\n outer: for (var queueStep = queueIter.next(); headers.remainingCapacity > 0 && !queueStep.done; queueStep = queueIter.next()) {\n var sheets = queueStep.value.sheets;\n var sheetIter = sheets.values();\n\n for (var sheetStep = sheetIter.next(); headers.remainingCapacity > 0 && !sheetStep.done; sheetStep = sheetIter.next()) {\n var sheet = sheetStep.value;\n var props = sheet.props;\n var key = getResourceKey(props.href);\n var header = getStylesheetPreloadAsHeader(sheet); // We mutate the capacity b/c we don't want to keep checking if later headers will fit.\n // This means that a particularly long header might close out the header queue where later\n // headers could still fit. We could in the future alter the behavior here based on prerender vs render\n // since during prerender we aren't as concerned with pure runtime performance.\n\n if ((headers.remainingCapacity -= header.length) >= 2) {\n renderState.resets.style[key] = PRELOAD_NO_CREDS;\n\n if (linkHeader) {\n linkHeader += ', ';\n }\n\n linkHeader += header; // We already track that the resource exists in resumableState however\n // if the resumableState resets because we postponed in the shell\n // which is what is happening in this branch if we are prerendering\n // then we will end up resetting the resumableState. When it resets we\n // want to record the fact that this stylesheet was already preloaded\n\n renderState.resets.style[key] = typeof props.crossOrigin === 'string' || typeof props.integrity === 'string' ? [props.crossOrigin, props.integrity] : PRELOAD_NO_CREDS;\n } else {\n break outer;\n }\n }\n }\n }\n\n if (linkHeader) {\n onHeaders({\n Link: linkHeader\n });\n } else {\n // We still call this with no headers because a user may be using it as a signal that\n // it React will not provide any headers\n onHeaders({});\n }\n\n return;\n }\n }\n}\nvar NotPendingTransition = NotPending;\n\nvar requestStorage = new async_hooks.AsyncLocalStorage();\n\nfunction getWrappedName(outerType, innerType, wrapperName) {\n var displayName = outerType.displayName;\n\n if (displayName) {\n return displayName;\n }\n\n var functionName = innerType.displayName || innerType.name || '';\n return functionName !== '' ? wrapperName + \"(\" + functionName + \")\" : wrapperName;\n} // Keep in sync with react-reconciler/getComponentNameFromFiber\n\n\nfunction getContextName(type) {\n return type.displayName || 'Context';\n}\n\nvar REACT_CLIENT_REFERENCE = Symbol.for('react.client.reference'); // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead.\n\nfunction getComponentNameFromType(type) {\n if (type == null) {\n // Host root, text node or just invalid type.\n return null;\n }\n\n if (typeof type === 'function') {\n if (type.$$typeof === REACT_CLIENT_REFERENCE) {\n // TODO: Create a convention for naming client references with debug info.\n return null;\n }\n\n return type.displayName || type.name || null;\n }\n\n if (typeof type === 'string') {\n return type;\n }\n\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return 'Fragment';\n\n case REACT_PORTAL_TYPE:\n return 'Portal';\n\n case REACT_PROFILER_TYPE:\n return 'Profiler';\n\n case REACT_STRICT_MODE_TYPE:\n return 'StrictMode';\n\n case REACT_SUSPENSE_TYPE:\n return 'Suspense';\n\n case REACT_SUSPENSE_LIST_TYPE:\n return 'SuspenseList';\n\n case REACT_CACHE_TYPE:\n {\n return 'Cache';\n }\n\n }\n\n if (typeof type === 'object') {\n {\n if (typeof type.tag === 'number') {\n error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.');\n }\n }\n\n switch (type.$$typeof) {\n case REACT_PROVIDER_TYPE:\n {\n var provider = type;\n return getContextName(provider._context) + '.Provider';\n }\n\n case REACT_CONTEXT_TYPE:\n var context = type;\n\n {\n return getContextName(context) + '.Consumer';\n }\n\n case REACT_CONSUMER_TYPE:\n {\n return null;\n }\n\n case REACT_FORWARD_REF_TYPE:\n return getWrappedName(type, type.render, 'ForwardRef');\n\n case REACT_MEMO_TYPE:\n var outerName = type.displayName || null;\n\n if (outerName !== null) {\n return outerName;\n }\n\n return getComponentNameFromType(type.type) || 'Memo';\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n return getComponentNameFromType(init(payload));\n } catch (x) {\n return null;\n }\n }\n }\n }\n\n return null;\n}\n\nvar warnedAboutMissingGetChildContext;\n\n{\n warnedAboutMissingGetChildContext = {};\n}\n\nvar emptyContextObject = {};\n\n{\n Object.freeze(emptyContextObject);\n}\n\nfunction getMaskedContext(type, unmaskedContext) {\n {\n var contextTypes = type.contextTypes;\n\n if (!contextTypes) {\n return emptyContextObject;\n }\n\n var context = {};\n\n for (var key in contextTypes) {\n context[key] = unmaskedContext[key];\n }\n\n return context;\n }\n}\nfunction processChildContext(instance, type, parentContext, childContextTypes) {\n {\n // TODO (bvaughn) Replace this behavior with an invariant() in the future.\n // It has only been added in Fiber to match the (unintentional) behavior in Stack.\n if (typeof instance.getChildContext !== 'function') {\n {\n var componentName = getComponentNameFromType(type) || 'Unknown';\n\n if (!warnedAboutMissingGetChildContext[componentName]) {\n warnedAboutMissingGetChildContext[componentName] = true;\n\n error('%s.childContextTypes is specified but there is no getChildContext() method ' + 'on the instance. You can either define getChildContext() on %s or remove ' + 'childContextTypes from it.', componentName, componentName);\n }\n }\n\n return parentContext;\n }\n\n var childContext = instance.getChildContext();\n\n for (var contextKey in childContext) {\n if (!(contextKey in childContextTypes)) {\n throw new Error((getComponentNameFromType(type) || 'Unknown') + \".getChildContext(): key \\\"\" + contextKey + \"\\\" is not defined in childContextTypes.\");\n }\n }\n\n return assign({}, parentContext, childContext);\n }\n}\n\nvar rendererSigil;\n\n{\n // Use this to detect multiple renderers using the same context\n rendererSigil = {};\n} // Used to store the parent path of all context overrides in a shared linked list.\n// Forming a reverse tree.\n// The structure of a context snapshot is an implementation of this file.\n// Currently, it's implemented as tracking the current active node.\n\n\nvar rootContextSnapshot = null; // We assume that this runtime owns the \"current\" field on all ReactContext instances.\n// This global (actually thread local) state represents what state all those \"current\",\n// fields are currently in.\n\nvar currentActiveSnapshot = null;\n\nfunction popNode(prev) {\n {\n prev.context._currentValue = prev.parentValue;\n }\n}\n\nfunction pushNode(next) {\n {\n next.context._currentValue = next.value;\n }\n}\n\nfunction popToNearestCommonAncestor(prev, next) {\n if (prev === next) ; else {\n popNode(prev);\n var parentPrev = prev.parent;\n var parentNext = next.parent;\n\n if (parentPrev === null) {\n if (parentNext !== null) {\n throw new Error('The stacks must reach the root at the same time. This is a bug in React.');\n }\n } else {\n if (parentNext === null) {\n throw new Error('The stacks must reach the root at the same time. This is a bug in React.');\n }\n\n popToNearestCommonAncestor(parentPrev, parentNext);\n } // On the way back, we push the new ones that weren't common.\n\n\n pushNode(next);\n }\n}\n\nfunction popAllPrevious(prev) {\n popNode(prev);\n var parentPrev = prev.parent;\n\n if (parentPrev !== null) {\n popAllPrevious(parentPrev);\n }\n}\n\nfunction pushAllNext(next) {\n var parentNext = next.parent;\n\n if (parentNext !== null) {\n pushAllNext(parentNext);\n }\n\n pushNode(next);\n}\n\nfunction popPreviousToCommonLevel(prev, next) {\n popNode(prev);\n var parentPrev = prev.parent;\n\n if (parentPrev === null) {\n throw new Error('The depth must equal at least at zero before reaching the root. This is a bug in React.');\n }\n\n if (parentPrev.depth === next.depth) {\n // We found the same level. Now we just need to find a shared ancestor.\n popToNearestCommonAncestor(parentPrev, next);\n } else {\n // We must still be deeper.\n popPreviousToCommonLevel(parentPrev, next);\n }\n}\n\nfunction popNextToCommonLevel(prev, next) {\n var parentNext = next.parent;\n\n if (parentNext === null) {\n throw new Error('The depth must equal at least at zero before reaching the root. This is a bug in React.');\n }\n\n if (prev.depth === parentNext.depth) {\n // We found the same level. Now we just need to find a shared ancestor.\n popToNearestCommonAncestor(prev, parentNext);\n } else {\n // We must still be deeper.\n popNextToCommonLevel(prev, parentNext);\n }\n\n pushNode(next);\n} // Perform context switching to the new snapshot.\n// To make it cheap to read many contexts, while not suspending, we make the switch eagerly by\n// updating all the context's current values. That way reads, always just read the current value.\n// At the cost of updating contexts even if they're never read by this subtree.\n\n\nfunction switchContext(newSnapshot) {\n // The basic algorithm we need to do is to pop back any contexts that are no longer on the stack.\n // We also need to update any new contexts that are now on the stack with the deepest value.\n // The easiest way to update new contexts is to just reapply them in reverse order from the\n // perspective of the backpointers. To avoid allocating a lot when switching, we use the stack\n // for that. Therefore this algorithm is recursive.\n // 1) First we pop which ever snapshot tree was deepest. Popping old contexts as we go.\n // 2) Then we find the nearest common ancestor from there. Popping old contexts as we go.\n // 3) Then we reapply new contexts on the way back up the stack.\n var prev = currentActiveSnapshot;\n var next = newSnapshot;\n\n if (prev !== next) {\n if (prev === null) {\n // $FlowFixMe[incompatible-call]: This has to be non-null since it's not equal to prev.\n pushAllNext(next);\n } else if (next === null) {\n popAllPrevious(prev);\n } else if (prev.depth === next.depth) {\n popToNearestCommonAncestor(prev, next);\n } else if (prev.depth > next.depth) {\n popPreviousToCommonLevel(prev, next);\n } else {\n popNextToCommonLevel(prev, next);\n }\n\n currentActiveSnapshot = next;\n }\n}\nfunction pushProvider(context, nextValue) {\n var prevValue;\n\n {\n prevValue = context._currentValue;\n context._currentValue = nextValue;\n\n {\n if (context._currentRenderer !== undefined && context._currentRenderer !== null && context._currentRenderer !== rendererSigil) {\n error('Detected multiple renderers concurrently rendering the ' + 'same context provider. This is currently unsupported.');\n }\n\n context._currentRenderer = rendererSigil;\n }\n }\n\n var prevNode = currentActiveSnapshot;\n var newNode = {\n parent: prevNode,\n depth: prevNode === null ? 0 : prevNode.depth + 1,\n context: context,\n parentValue: prevValue,\n value: nextValue\n };\n currentActiveSnapshot = newNode;\n return newNode;\n}\nfunction popProvider(context) {\n var prevSnapshot = currentActiveSnapshot;\n\n if (prevSnapshot === null) {\n throw new Error('Tried to pop a Context at the root of the app. This is a bug in React.');\n }\n\n {\n if (prevSnapshot.context !== context) {\n error('The parent context is not the expected context. This is probably a bug in React.');\n }\n }\n\n {\n var value = prevSnapshot.parentValue;\n prevSnapshot.context._currentValue = value;\n\n {\n if (context._currentRenderer !== undefined && context._currentRenderer !== null && context._currentRenderer !== rendererSigil) {\n error('Detected multiple renderers concurrently rendering the ' + 'same context provider. This is currently unsupported.');\n }\n\n context._currentRenderer = rendererSigil;\n }\n }\n\n return currentActiveSnapshot = prevSnapshot.parent;\n}\nfunction getActiveContext() {\n return currentActiveSnapshot;\n}\nfunction readContext$1(context) {\n var value = context._currentValue ;\n return value;\n}\n\n/**\n * `ReactInstanceMap` maintains a mapping from a public facing stateful\n * instance (key) and the internal representation (value). This allows public\n * methods to accept the user facing instance as an argument and map them back\n * to internal methods.\n *\n * Note that this module is currently shared and assumed to be stateless.\n * If this becomes an actual Map, that will break.\n */\nfunction get(key) {\n return key._reactInternals;\n}\nfunction set(key, value) {\n key._reactInternals = value;\n}\n\nvar didWarnAboutNoopUpdateForComponent = {};\nvar didWarnAboutDeprecatedWillMount = {};\nvar didWarnAboutUninitializedState;\nvar didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate;\nvar didWarnAboutLegacyLifecyclesAndDerivedState;\nvar didWarnAboutUndefinedDerivedState;\nvar didWarnAboutDirectlyAssigningPropsToState;\nvar didWarnAboutContextTypeAndContextTypes;\nvar didWarnAboutInvalidateContextType;\nvar didWarnOnInvalidCallback;\n\n{\n didWarnAboutUninitializedState = new Set();\n didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate = new Set();\n didWarnAboutLegacyLifecyclesAndDerivedState = new Set();\n didWarnAboutDirectlyAssigningPropsToState = new Set();\n didWarnAboutUndefinedDerivedState = new Set();\n didWarnAboutContextTypeAndContextTypes = new Set();\n didWarnAboutInvalidateContextType = new Set();\n didWarnOnInvalidCallback = new Set();\n}\n\nfunction warnOnInvalidCallback(callback) {\n {\n if (callback === null || typeof callback === 'function') {\n return;\n } // eslint-disable-next-line react-internal/safe-string-coercion\n\n\n var key = String(callback);\n\n if (!didWarnOnInvalidCallback.has(key)) {\n didWarnOnInvalidCallback.add(key);\n\n error('Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callback);\n }\n }\n}\n\nfunction warnOnUndefinedDerivedState(type, partialState) {\n {\n if (partialState === undefined) {\n var componentName = getComponentNameFromType(type) || 'Component';\n\n if (!didWarnAboutUndefinedDerivedState.has(componentName)) {\n didWarnAboutUndefinedDerivedState.add(componentName);\n\n error('%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. ' + 'You have returned undefined.', componentName);\n }\n }\n }\n}\n\nfunction warnNoop(publicInstance, callerName) {\n {\n var _constructor = publicInstance.constructor;\n var componentName = _constructor && getComponentNameFromType(_constructor) || 'ReactClass';\n var warningKey = componentName + '.' + callerName;\n\n if (didWarnAboutNoopUpdateForComponent[warningKey]) {\n return;\n }\n\n error('Can only update a mounting component. ' + 'This usually means you called %s() outside componentWillMount() on the server. ' + 'This is a no-op.\\n\\nPlease check the code for the %s component.', callerName, componentName);\n\n didWarnAboutNoopUpdateForComponent[warningKey] = true;\n }\n}\n\nvar classComponentUpdater = {\n isMounted: function (inst) {\n return false;\n },\n // $FlowFixMe[missing-local-annot]\n enqueueSetState: function (inst, payload, callback) {\n var internals = get(inst);\n\n if (internals.queue === null) {\n warnNoop(inst, 'setState');\n } else {\n internals.queue.push(payload);\n\n {\n if (callback !== undefined && callback !== null) {\n warnOnInvalidCallback(callback);\n }\n }\n }\n },\n enqueueReplaceState: function (inst, payload, callback) {\n var internals = get(inst);\n internals.replace = true;\n internals.queue = [payload];\n\n {\n if (callback !== undefined && callback !== null) {\n warnOnInvalidCallback(callback);\n }\n }\n },\n // $FlowFixMe[missing-local-annot]\n enqueueForceUpdate: function (inst, callback) {\n var internals = get(inst);\n\n if (internals.queue === null) {\n warnNoop(inst, 'forceUpdate');\n } else {\n {\n if (callback !== undefined && callback !== null) {\n warnOnInvalidCallback(callback);\n }\n }\n }\n }\n};\n\nfunction applyDerivedStateFromProps(instance, ctor, getDerivedStateFromProps, prevState, nextProps) {\n var partialState = getDerivedStateFromProps(nextProps, prevState);\n\n {\n warnOnUndefinedDerivedState(ctor, partialState);\n } // Merge the partial state and the previous state.\n\n\n var newState = partialState === null || partialState === undefined ? prevState : assign({}, prevState, partialState);\n return newState;\n}\n\nfunction constructClassInstance(ctor, props, maskedLegacyContext) {\n var context = emptyContextObject;\n var contextType = ctor.contextType;\n\n {\n if ('contextType' in ctor) {\n var isValid = // Allow null for conditional declaration\n contextType === null || contextType !== undefined && contextType.$$typeof === REACT_CONTEXT_TYPE;\n\n if (!isValid && !didWarnAboutInvalidateContextType.has(ctor)) {\n didWarnAboutInvalidateContextType.add(ctor);\n var addendum = '';\n\n if (contextType === undefined) {\n addendum = ' However, it is set to undefined. ' + 'This can be caused by a typo or by mixing up named and default imports. ' + 'This can also happen due to a circular dependency, so ' + 'try moving the createContext() call to a separate file.';\n } else if (typeof contextType !== 'object') {\n addendum = ' However, it is set to a ' + typeof contextType + '.';\n } else if (contextType.$$typeof === REACT_CONSUMER_TYPE) {\n addendum = ' Did you accidentally pass the Context.Consumer instead?';\n } else {\n addendum = ' However, it is set to an object with keys {' + Object.keys(contextType).join(', ') + '}.';\n }\n\n error('%s defines an invalid contextType. ' + 'contextType should point to the Context object returned by React.createContext().%s', getComponentNameFromType(ctor) || 'Component', addendum);\n }\n }\n }\n\n if (typeof contextType === 'object' && contextType !== null) {\n context = readContext$1(contextType);\n } else {\n context = maskedLegacyContext;\n }\n\n var instance = new ctor(props, context);\n\n {\n if (typeof ctor.getDerivedStateFromProps === 'function' && (instance.state === null || instance.state === undefined)) {\n var componentName = getComponentNameFromType(ctor) || 'Component';\n\n if (!didWarnAboutUninitializedState.has(componentName)) {\n didWarnAboutUninitializedState.add(componentName);\n\n error('`%s` uses `getDerivedStateFromProps` but its initial state is ' + '%s. This is not recommended. Instead, define the initial state by ' + 'assigning an object to `this.state` in the constructor of `%s`. ' + 'This ensures that `getDerivedStateFromProps` arguments have a consistent shape.', componentName, instance.state === null ? 'null' : 'undefined', componentName);\n }\n } // If new component APIs are defined, \"unsafe\" lifecycles won't be called.\n // Warn about these lifecycles if they are present.\n // Don't warn about react-lifecycles-compat polyfilled methods though.\n\n\n if (typeof ctor.getDerivedStateFromProps === 'function' || typeof instance.getSnapshotBeforeUpdate === 'function') {\n var foundWillMountName = null;\n var foundWillReceivePropsName = null;\n var foundWillUpdateName = null;\n\n if (typeof instance.componentWillMount === 'function' && instance.componentWillMount.__suppressDeprecationWarning !== true) {\n foundWillMountName = 'componentWillMount';\n } else if (typeof instance.UNSAFE_componentWillMount === 'function') {\n foundWillMountName = 'UNSAFE_componentWillMount';\n }\n\n if (typeof instance.componentWillReceiveProps === 'function' && instance.componentWillReceiveProps.__suppressDeprecationWarning !== true) {\n foundWillReceivePropsName = 'componentWillReceiveProps';\n } else if (typeof instance.UNSAFE_componentWillReceiveProps === 'function') {\n foundWillReceivePropsName = 'UNSAFE_componentWillReceiveProps';\n }\n\n if (typeof instance.componentWillUpdate === 'function' && instance.componentWillUpdate.__suppressDeprecationWarning !== true) {\n foundWillUpdateName = 'componentWillUpdate';\n } else if (typeof instance.UNSAFE_componentWillUpdate === 'function') {\n foundWillUpdateName = 'UNSAFE_componentWillUpdate';\n }\n\n if (foundWillMountName !== null || foundWillReceivePropsName !== null || foundWillUpdateName !== null) {\n var _componentName = getComponentNameFromType(ctor) || 'Component';\n\n var newApiName = typeof ctor.getDerivedStateFromProps === 'function' ? 'getDerivedStateFromProps()' : 'getSnapshotBeforeUpdate()';\n\n if (!didWarnAboutLegacyLifecyclesAndDerivedState.has(_componentName)) {\n didWarnAboutLegacyLifecyclesAndDerivedState.add(_componentName);\n\n error('Unsafe legacy lifecycles will not be called for components using new component APIs.\\n\\n' + '%s uses %s but also contains the following legacy lifecycles:%s%s%s\\n\\n' + 'The above lifecycles should be removed. Learn more about this warning here:\\n' + 'https://react.dev/link/unsafe-component-lifecycles', _componentName, newApiName, foundWillMountName !== null ? \"\\n \" + foundWillMountName : '', foundWillReceivePropsName !== null ? \"\\n \" + foundWillReceivePropsName : '', foundWillUpdateName !== null ? \"\\n \" + foundWillUpdateName : '');\n }\n }\n }\n }\n\n return instance;\n}\n\nfunction checkClassInstance(instance, ctor, newProps) {\n {\n var name = getComponentNameFromType(ctor) || 'Component';\n var renderPresent = instance.render;\n\n if (!renderPresent) {\n if (ctor.prototype && typeof ctor.prototype.render === 'function') {\n error('No `render` method found on the %s ' + 'instance: did you accidentally return an object from the constructor?', name);\n } else {\n error('No `render` method found on the %s ' + 'instance: you may have forgotten to define `render`.', name);\n }\n }\n\n if (instance.getInitialState && !instance.getInitialState.isReactClassApproved && !instance.state) {\n error('getInitialState was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Did you mean to define a state property instead?', name);\n }\n\n if (instance.getDefaultProps && !instance.getDefaultProps.isReactClassApproved) {\n error('getDefaultProps was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Use a static property to define defaultProps instead.', name);\n }\n\n if (instance.propTypes) {\n error('propTypes was defined as an instance property on %s. Use a static ' + 'property to define propTypes instead.', name);\n }\n\n if (instance.contextType) {\n error('contextType was defined as an instance property on %s. Use a static ' + 'property to define contextType instead.', name);\n }\n\n {\n if (instance.contextTypes) {\n error('contextTypes was defined as an instance property on %s. Use a static ' + 'property to define contextTypes instead.', name);\n }\n\n if (ctor.contextType && ctor.contextTypes && !didWarnAboutContextTypeAndContextTypes.has(ctor)) {\n didWarnAboutContextTypeAndContextTypes.add(ctor);\n\n error('%s declares both contextTypes and contextType static properties. ' + 'The legacy contextTypes property will be ignored.', name);\n }\n }\n\n if (typeof instance.componentShouldUpdate === 'function') {\n error('%s has a method called ' + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + 'The name is phrased as a question because the function is ' + 'expected to return a value.', name);\n }\n\n if (ctor.prototype && ctor.prototype.isPureReactComponent && typeof instance.shouldComponentUpdate !== 'undefined') {\n error('%s has a method called shouldComponentUpdate(). ' + 'shouldComponentUpdate should not be used when extending React.PureComponent. ' + 'Please extend React.Component if shouldComponentUpdate is used.', getComponentNameFromType(ctor) || 'A pure component');\n }\n\n if (typeof instance.componentDidUnmount === 'function') {\n error('%s has a method called ' + 'componentDidUnmount(). But there is no such lifecycle method. ' + 'Did you mean componentWillUnmount()?', name);\n }\n\n if (typeof instance.componentDidReceiveProps === 'function') {\n error('%s has a method called ' + 'componentDidReceiveProps(). But there is no such lifecycle method. ' + 'If you meant to update the state in response to changing props, ' + 'use componentWillReceiveProps(). If you meant to fetch data or ' + 'run side-effects or mutations after React has updated the UI, use componentDidUpdate().', name);\n }\n\n if (typeof instance.componentWillRecieveProps === 'function') {\n error('%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', name);\n }\n\n if (typeof instance.UNSAFE_componentWillRecieveProps === 'function') {\n error('%s has a method called ' + 'UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?', name);\n }\n\n var hasMutatedProps = instance.props !== newProps;\n\n if (instance.props !== undefined && hasMutatedProps) {\n error('When calling super() in `%s`, make sure to pass ' + \"up the same props that your component's constructor was passed.\", name);\n }\n\n if (instance.defaultProps) {\n error('Setting defaultProps as an instance property on %s is not supported and will be ignored.' + ' Instead, define defaultProps as a static property on %s.', name, name);\n }\n\n if (typeof instance.getSnapshotBeforeUpdate === 'function' && typeof instance.componentDidUpdate !== 'function' && !didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.has(ctor)) {\n didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.add(ctor);\n\n error('%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). ' + 'This component defines getSnapshotBeforeUpdate() only.', getComponentNameFromType(ctor));\n }\n\n if (typeof instance.getDerivedStateFromProps === 'function') {\n error('%s: getDerivedStateFromProps() is defined as an instance method ' + 'and will be ignored. Instead, declare it as a static method.', name);\n }\n\n if (typeof instance.getDerivedStateFromError === 'function') {\n error('%s: getDerivedStateFromError() is defined as an instance method ' + 'and will be ignored. Instead, declare it as a static method.', name);\n }\n\n if (typeof ctor.getSnapshotBeforeUpdate === 'function') {\n error('%s: getSnapshotBeforeUpdate() is defined as a static method ' + 'and will be ignored. Instead, declare it as an instance method.', name);\n }\n\n var state = instance.state;\n\n if (state && (typeof state !== 'object' || isArray(state))) {\n error('%s.state: must be set to an object or null', name);\n }\n\n if (typeof instance.getChildContext === 'function' && typeof ctor.childContextTypes !== 'object') {\n error('%s.getChildContext(): childContextTypes must be defined in order to ' + 'use getChildContext().', name);\n }\n }\n}\n\nfunction callComponentWillMount(type, instance) {\n var oldState = instance.state;\n\n if (typeof instance.componentWillMount === 'function') {\n {\n if (instance.componentWillMount.__suppressDeprecationWarning !== true) {\n var componentName = getComponentNameFromType(type) || 'Unknown';\n\n if (!didWarnAboutDeprecatedWillMount[componentName]) {\n warn( // keep this warning in sync with ReactStrictModeWarning.js\n 'componentWillMount has been renamed, and is not recommended for use. ' + 'See https://react.dev/link/unsafe-component-lifecycles for details.\\n\\n' + '* Move code from componentWillMount to componentDidMount (preferred in most cases) ' + 'or the constructor.\\n' + '\\nPlease update the following components: %s', componentName);\n\n didWarnAboutDeprecatedWillMount[componentName] = true;\n }\n }\n }\n\n instance.componentWillMount();\n }\n\n if (typeof instance.UNSAFE_componentWillMount === 'function') {\n instance.UNSAFE_componentWillMount();\n }\n\n if (oldState !== instance.state) {\n {\n error('%s.componentWillMount(): Assigning directly to this.state is ' + \"deprecated (except inside a component's \" + 'constructor). Use setState instead.', getComponentNameFromType(type) || 'Component');\n }\n\n classComponentUpdater.enqueueReplaceState(instance, instance.state, null);\n }\n}\n\nfunction processUpdateQueue(internalInstance, inst, props, maskedLegacyContext) {\n if (internalInstance.queue !== null && internalInstance.queue.length > 0) {\n var oldQueue = internalInstance.queue;\n var oldReplace = internalInstance.replace;\n internalInstance.queue = null;\n internalInstance.replace = false;\n\n if (oldReplace && oldQueue.length === 1) {\n inst.state = oldQueue[0];\n } else {\n var nextState = oldReplace ? oldQueue[0] : inst.state;\n var dontMutate = true;\n\n for (var i = oldReplace ? 1 : 0; i < oldQueue.length; i++) {\n var partial = oldQueue[i];\n var partialState = typeof partial === 'function' ? partial.call(inst, nextState, props, maskedLegacyContext) : partial;\n\n if (partialState != null) {\n if (dontMutate) {\n dontMutate = false;\n nextState = assign({}, nextState, partialState);\n } else {\n assign(nextState, partialState);\n }\n }\n }\n\n inst.state = nextState;\n }\n } else {\n internalInstance.queue = null;\n }\n} // Invokes the mount life-cycles on a previously never rendered instance.\n\n\nfunction mountClassInstance(instance, ctor, newProps, maskedLegacyContext) {\n {\n checkClassInstance(instance, ctor, newProps);\n }\n\n var initialState = instance.state !== undefined ? instance.state : null;\n instance.updater = classComponentUpdater;\n instance.props = newProps;\n instance.state = initialState; // We don't bother initializing the refs object on the server, since we're not going to resolve them anyway.\n // The internal instance will be used to manage updates that happen during this mount.\n\n var internalInstance = {\n queue: [],\n replace: false\n };\n set(instance, internalInstance);\n var contextType = ctor.contextType;\n\n if (typeof contextType === 'object' && contextType !== null) {\n instance.context = readContext$1(contextType);\n } else {\n instance.context = maskedLegacyContext;\n }\n\n {\n if (instance.state === newProps) {\n var componentName = getComponentNameFromType(ctor) || 'Component';\n\n if (!didWarnAboutDirectlyAssigningPropsToState.has(componentName)) {\n didWarnAboutDirectlyAssigningPropsToState.add(componentName);\n\n error('%s: It is not recommended to assign props directly to state ' + \"because updates to props won't be reflected in state. \" + 'In most cases, it is better to use props directly.', componentName);\n }\n }\n }\n\n var getDerivedStateFromProps = ctor.getDerivedStateFromProps;\n\n if (typeof getDerivedStateFromProps === 'function') {\n instance.state = applyDerivedStateFromProps(instance, ctor, getDerivedStateFromProps, initialState, newProps);\n } // In order to support react-lifecycles-compat polyfilled components,\n // Unsafe lifecycles should not be invoked for components using the new APIs.\n\n\n if (typeof ctor.getDerivedStateFromProps !== 'function' && typeof instance.getSnapshotBeforeUpdate !== 'function' && (typeof instance.UNSAFE_componentWillMount === 'function' || typeof instance.componentWillMount === 'function')) {\n callComponentWillMount(ctor, instance); // If we had additional state updates during this life-cycle, let's\n // process them now.\n\n processUpdateQueue(internalInstance, instance, newProps, maskedLegacyContext);\n }\n}\n\n// Ids are base 32 strings whose binary representation corresponds to the\n// position of a node in a tree.\n// Every time the tree forks into multiple children, we add additional bits to\n// the left of the sequence that represent the position of the child within the\n// current level of children.\n//\n// 00101 00010001011010101\n// ╰─┬─╯ ╰───────┬───────╯\n// Fork 5 of 20 Parent id\n//\n// The leading 0s are important. In the above example, you only need 3 bits to\n// represent slot 5. However, you need 5 bits to represent all the forks at\n// the current level, so we must account for the empty bits at the end.\n//\n// For this same reason, slots are 1-indexed instead of 0-indexed. Otherwise,\n// the zeroth id at a level would be indistinguishable from its parent.\n//\n// If a node has only one child, and does not materialize an id (i.e. does not\n// contain a useId hook), then we don't need to allocate any space in the\n// sequence. It's treated as a transparent indirection. For example, these two\n// trees produce the same ids:\n//\n// <> <>\n// <Indirection> <A />\n// <A /> <B />\n// </Indirection> </>\n// <B />\n// </>\n//\n// However, we cannot skip any node that materializes an id. Otherwise, a parent\n// id that does not fork would be indistinguishable from its child id. For\n// example, this tree does not fork, but the parent and child must have\n// different ids.\n//\n// <Parent>\n// <Child />\n// </Parent>\n//\n// To handle this scenario, every time we materialize an id, we allocate a\n// new level with a single slot. You can think of this as a fork with only one\n// prong, or an array of children with length 1.\n//\n// It's possible for the size of the sequence to exceed 32 bits, the max\n// size for bitwise operations. When this happens, we make more room by\n// converting the right part of the id to a string and storing it in an overflow\n// variable. We use a base 32 string representation, because 32 is the largest\n// power of 2 that is supported by toString(). We want the base to be large so\n// that the resulting ids are compact, and we want the base to be a power of 2\n// because every log2(base) bits corresponds to a single character, i.e. every\n// log2(32) = 5 bits. That means we can lop bits off the end 5 at a time without\n// affecting the final result.\nvar emptyTreeContext = {\n id: 1,\n overflow: ''\n};\nfunction getTreeId(context) {\n var overflow = context.overflow;\n var idWithLeadingBit = context.id;\n var id = idWithLeadingBit & ~getLeadingBit(idWithLeadingBit);\n return id.toString(32) + overflow;\n}\nfunction pushTreeContext(baseContext, totalChildren, index) {\n var baseIdWithLeadingBit = baseContext.id;\n var baseOverflow = baseContext.overflow; // The leftmost 1 marks the end of the sequence, non-inclusive. It's not part\n // of the id; we use it to account for leading 0s.\n\n var baseLength = getBitLength(baseIdWithLeadingBit) - 1;\n var baseId = baseIdWithLeadingBit & ~(1 << baseLength);\n var slot = index + 1;\n var length = getBitLength(totalChildren) + baseLength; // 30 is the max length we can store without overflowing, taking into\n // consideration the leading 1 we use to mark the end of the sequence.\n\n if (length > 30) {\n // We overflowed the bitwise-safe range. Fall back to slower algorithm.\n // This branch assumes the length of the base id is greater than 5; it won't\n // work for smaller ids, because you need 5 bits per character.\n //\n // We encode the id in multiple steps: first the base id, then the\n // remaining digits.\n //\n // Each 5 bit sequence corresponds to a single base 32 character. So for\n // example, if the current id is 23 bits long, we can convert 20 of those\n // bits into a string of 4 characters, with 3 bits left over.\n //\n // First calculate how many bits in the base id represent a complete\n // sequence of characters.\n var numberOfOverflowBits = baseLength - baseLength % 5; // Then create a bitmask that selects only those bits.\n\n var newOverflowBits = (1 << numberOfOverflowBits) - 1; // Select the bits, and convert them to a base 32 string.\n\n var newOverflow = (baseId & newOverflowBits).toString(32); // Now we can remove those bits from the base id.\n\n var restOfBaseId = baseId >> numberOfOverflowBits;\n var restOfBaseLength = baseLength - numberOfOverflowBits; // Finally, encode the rest of the bits using the normal algorithm. Because\n // we made more room, this time it won't overflow.\n\n var restOfLength = getBitLength(totalChildren) + restOfBaseLength;\n var restOfNewBits = slot << restOfBaseLength;\n var id = restOfNewBits | restOfBaseId;\n var overflow = newOverflow + baseOverflow;\n return {\n id: 1 << restOfLength | id,\n overflow: overflow\n };\n } else {\n // Normal path\n var newBits = slot << baseLength;\n\n var _id = newBits | baseId;\n\n var _overflow = baseOverflow;\n return {\n id: 1 << length | _id,\n overflow: _overflow\n };\n }\n}\n\nfunction getBitLength(number) {\n return 32 - clz32(number);\n}\n\nfunction getLeadingBit(id) {\n return 1 << getBitLength(id) - 1;\n} // TODO: Math.clz32 is supported in Node 12+. Maybe we can drop the fallback.\n\n\nvar clz32 = Math.clz32 ? Math.clz32 : clz32Fallback; // Count leading zeros.\n// Based on:\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/clz32\n\nvar log = Math.log;\nvar LN2 = Math.LN2;\n\nfunction clz32Fallback(x) {\n var asUint = x >>> 0;\n\n if (asUint === 0) {\n return 32;\n }\n\n return 31 - (log(asUint) / LN2 | 0) | 0;\n}\n\n// Corresponds to ReactFiberWakeable and ReactFlightWakeable modules. Generally,\n// changes to one module should be reflected in the others.\n// TODO: Rename this module and the corresponding Fiber one to \"Thenable\"\n// instead of \"Wakeable\". Or some other more appropriate name.\n// An error that is thrown (e.g. by `use`) to trigger Suspense. If we\n// detect this is caught by userspace, we'll log a warning in development.\nvar SuspenseException = new Error(\"Suspense Exception: This is not a real error! It's an implementation \" + 'detail of `use` to interrupt the current render. You must either ' + 'rethrow it immediately, or move the `use` call outside of the ' + '`try/catch` block. Capturing without rethrowing will lead to ' + 'unexpected behavior.\\n\\n' + 'To handle async errors, wrap your component in an error boundary, or ' + \"call the promise's `.catch` method and pass the result to `use`\");\nfunction createThenableState() {\n // The ThenableState is created the first time a component suspends. If it\n // suspends again, we'll reuse the same state.\n return [];\n}\n\nfunction noop$2() {}\n\nfunction trackUsedThenable(thenableState, thenable, index) {\n var previous = thenableState[index];\n\n if (previous === undefined) {\n thenableState.push(thenable);\n } else {\n if (previous !== thenable) {\n // Reuse the previous thenable, and drop the new one. We can assume\n // they represent the same value, because components are idempotent.\n // Avoid an unhandled rejection errors for the Promises that we'll\n // intentionally ignore.\n thenable.then(noop$2, noop$2);\n thenable = previous;\n }\n } // We use an expando to track the status and result of a thenable so that we\n // can synchronously unwrap the value. Think of this as an extension of the\n // Promise API, or a custom interface that is a superset of Thenable.\n //\n // If the thenable doesn't have a status, set it to \"pending\" and attach\n // a listener that will update its status and result when it resolves.\n\n\n switch (thenable.status) {\n case 'fulfilled':\n {\n var fulfilledValue = thenable.value;\n return fulfilledValue;\n }\n\n case 'rejected':\n {\n var rejectedError = thenable.reason;\n throw rejectedError;\n }\n\n default:\n {\n if (typeof thenable.status === 'string') ; else {\n var pendingThenable = thenable;\n pendingThenable.status = 'pending';\n pendingThenable.then(function (fulfilledValue) {\n if (thenable.status === 'pending') {\n var fulfilledThenable = thenable;\n fulfilledThenable.status = 'fulfilled';\n fulfilledThenable.value = fulfilledValue;\n }\n }, function (error) {\n if (thenable.status === 'pending') {\n var rejectedThenable = thenable;\n rejectedThenable.status = 'rejected';\n rejectedThenable.reason = error;\n }\n }); // Check one more time in case the thenable resolved synchronously\n\n switch (thenable.status) {\n case 'fulfilled':\n {\n var fulfilledThenable = thenable;\n return fulfilledThenable.value;\n }\n\n case 'rejected':\n {\n var rejectedThenable = thenable;\n throw rejectedThenable.reason;\n }\n }\n } // Suspend.\n //\n // Throwing here is an implementation detail that allows us to unwind the\n // call stack. But we shouldn't allow it to leak into userspace. Throw an\n // opaque placeholder value instead of the actual thenable. If it doesn't\n // get captured by the work loop, log a warning, because that means\n // something in userspace must have caught it.\n\n\n suspendedThenable = thenable;\n throw SuspenseException;\n }\n }\n} // This is used to track the actual thenable that suspended so it can be\n// passed to the rest of the Suspense implementation — which, for historical\n// reasons, expects to receive a thenable.\n\nvar suspendedThenable = null;\nfunction getSuspendedThenable() {\n // This is called right after `use` suspends by throwing an exception. `use`\n // throws an opaque value instead of the thenable itself so that it can't be\n // caught in userspace. Then the work loop accesses the actual thenable using\n // this function.\n if (suspendedThenable === null) {\n throw new Error('Expected a suspended thenable. This is a bug in React. Please file ' + 'an issue.');\n }\n\n var thenable = suspendedThenable;\n suspendedThenable = null;\n return thenable;\n}\n\n/**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\nfunction is(x, y) {\n return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y // eslint-disable-line no-self-compare\n ;\n}\n\nvar objectIs = // $FlowFixMe[method-unbinding]\ntypeof Object.is === 'function' ? Object.is : is;\n\nvar currentlyRenderingComponent = null;\nvar currentlyRenderingTask = null;\nvar currentlyRenderingRequest = null;\nvar currentlyRenderingKeyPath = null;\nvar firstWorkInProgressHook = null;\nvar workInProgressHook = null; // Whether the work-in-progress hook is a re-rendered hook\n\nvar isReRender = false; // Whether an update was scheduled during the currently executing render pass.\n\nvar didScheduleRenderPhaseUpdate = false; // Counts the number of useId hooks in this component\n\nvar localIdCounter = 0; // Chunks that should be pushed to the stream once the component\n// finishes rendering.\n// Counts the number of useFormState calls in this component\n\nvar formStateCounter = 0; // The index of the useFormState hook that matches the one passed in at the\n// root during an MPA navigation, if any.\n\nvar formStateMatchingIndex = -1; // Counts the number of use(thenable) calls in this component\n\nvar thenableIndexCounter = 0;\nvar thenableState = null; // Lazily created map of render-phase updates\n\nvar renderPhaseUpdates = null; // Counter to prevent infinite loops.\n\nvar numberOfReRenders = 0;\nvar RE_RENDER_LIMIT = 25;\nvar isInHookUserCodeInDev = false; // In DEV, this is the name of the currently executing primitive hook\n\nvar currentHookNameInDev;\n\nfunction resolveCurrentlyRenderingComponent() {\n if (currentlyRenderingComponent === null) {\n throw new Error('Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for' + ' one of the following reasons:\\n' + '1. You might have mismatching versions of React and the renderer (such as React DOM)\\n' + '2. You might be breaking the Rules of Hooks\\n' + '3. You might have more than one copy of React in the same app\\n' + 'See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.');\n }\n\n {\n if (isInHookUserCodeInDev) {\n error('Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. ' + 'You can only call Hooks at the top level of your React function. ' + 'For more information, see ' + 'https://react.dev/link/rules-of-hooks');\n }\n }\n\n return currentlyRenderingComponent;\n}\n\nfunction areHookInputsEqual(nextDeps, prevDeps) {\n if (prevDeps === null) {\n {\n error('%s received a final argument during this render, but not during ' + 'the previous render. Even though the final argument is optional, ' + 'its type cannot change between renders.', currentHookNameInDev);\n }\n\n return false;\n }\n\n {\n // Don't bother comparing lengths in prod because these arrays should be\n // passed inline.\n if (nextDeps.length !== prevDeps.length) {\n error('The final argument passed to %s changed size between renders. The ' + 'order and size of this array must remain constant.\\n\\n' + 'Previous: %s\\n' + 'Incoming: %s', currentHookNameInDev, \"[\" + nextDeps.join(', ') + \"]\", \"[\" + prevDeps.join(', ') + \"]\");\n }\n } // $FlowFixMe[incompatible-use] found when upgrading Flow\n\n\n for (var i = 0; i < prevDeps.length && i < nextDeps.length; i++) {\n // $FlowFixMe[incompatible-use] found when upgrading Flow\n if (objectIs(nextDeps[i], prevDeps[i])) {\n continue;\n }\n\n return false;\n }\n\n return true;\n}\n\nfunction createHook() {\n if (numberOfReRenders > 0) {\n throw new Error('Rendered more hooks than during the previous render');\n }\n\n return {\n memoizedState: null,\n queue: null,\n next: null\n };\n}\n\nfunction createWorkInProgressHook() {\n if (workInProgressHook === null) {\n // This is the first hook in the list\n if (firstWorkInProgressHook === null) {\n isReRender = false;\n firstWorkInProgressHook = workInProgressHook = createHook();\n } else {\n // There's already a work-in-progress. Reuse it.\n isReRender = true;\n workInProgressHook = firstWorkInProgressHook;\n }\n } else {\n if (workInProgressHook.next === null) {\n isReRender = false; // Append to the end of the list\n\n workInProgressHook = workInProgressHook.next = createHook();\n } else {\n // There's already a work-in-progress. Reuse it.\n isReRender = true;\n workInProgressHook = workInProgressHook.next;\n }\n }\n\n return workInProgressHook;\n}\n\nfunction prepareToUseHooks(request, task, keyPath, componentIdentity, prevThenableState) {\n currentlyRenderingComponent = componentIdentity;\n currentlyRenderingTask = task;\n currentlyRenderingRequest = request;\n currentlyRenderingKeyPath = keyPath;\n\n {\n isInHookUserCodeInDev = false;\n } // The following should have already been reset\n // didScheduleRenderPhaseUpdate = false;\n // firstWorkInProgressHook = null;\n // numberOfReRenders = 0;\n // renderPhaseUpdates = null;\n // workInProgressHook = null;\n\n\n localIdCounter = 0;\n formStateCounter = 0;\n formStateMatchingIndex = -1;\n thenableIndexCounter = 0;\n thenableState = prevThenableState;\n}\nfunction finishHooks(Component, props, children, refOrContext) {\n // This must be called after every function component to prevent hooks from\n // being used in classes.\n while (didScheduleRenderPhaseUpdate) {\n // Updates were scheduled during the render phase. They are stored in\n // the `renderPhaseUpdates` map. Call the component again, reusing the\n // work-in-progress hooks and applying the additional updates on top. Keep\n // restarting until no more updates are scheduled.\n didScheduleRenderPhaseUpdate = false;\n localIdCounter = 0;\n formStateCounter = 0;\n formStateMatchingIndex = -1;\n thenableIndexCounter = 0;\n numberOfReRenders += 1; // Start over from the beginning of the list\n\n workInProgressHook = null;\n children = Component(props, refOrContext);\n }\n\n resetHooksState();\n return children;\n}\nfunction getThenableStateAfterSuspending() {\n var state = thenableState;\n thenableState = null;\n return state;\n}\nfunction checkDidRenderIdHook() {\n // This should be called immediately after every finishHooks call.\n // Conceptually, it's part of the return value of finishHooks; it's only a\n // separate function to avoid using an array tuple.\n var didRenderIdHook = localIdCounter !== 0;\n return didRenderIdHook;\n}\nfunction getFormStateCount() {\n // This should be called immediately after every finishHooks call.\n // Conceptually, it's part of the return value of finishHooks; it's only a\n // separate function to avoid using an array tuple.\n return formStateCounter;\n}\nfunction getFormStateMatchingIndex() {\n // This should be called immediately after every finishHooks call.\n // Conceptually, it's part of the return value of finishHooks; it's only a\n // separate function to avoid using an array tuple.\n return formStateMatchingIndex;\n} // Reset the internal hooks state if an error occurs while rendering a component\n\nfunction resetHooksState() {\n {\n isInHookUserCodeInDev = false;\n }\n\n currentlyRenderingComponent = null;\n currentlyRenderingTask = null;\n currentlyRenderingRequest = null;\n currentlyRenderingKeyPath = null;\n didScheduleRenderPhaseUpdate = false;\n firstWorkInProgressHook = null;\n numberOfReRenders = 0;\n renderPhaseUpdates = null;\n workInProgressHook = null;\n}\n\nfunction readContext(context) {\n {\n if (isInHookUserCodeInDev) {\n error('Context can only be read while React is rendering. ' + 'In classes, you can read it in the render method or getDerivedStateFromProps. ' + 'In function components, you can read it directly in the function body, but not ' + 'inside Hooks like useReducer() or useMemo().');\n }\n }\n\n return readContext$1(context);\n}\n\nfunction useContext(context) {\n {\n currentHookNameInDev = 'useContext';\n }\n\n resolveCurrentlyRenderingComponent();\n return readContext$1(context);\n}\n\nfunction basicStateReducer(state, action) {\n // $FlowFixMe[incompatible-use]: Flow doesn't like mixed types\n return typeof action === 'function' ? action(state) : action;\n}\n\nfunction useState(initialState) {\n {\n currentHookNameInDev = 'useState';\n }\n\n return useReducer(basicStateReducer, // useReducer has a special case to support lazy useState initializers\n initialState);\n}\nfunction useReducer(reducer, initialArg, init) {\n {\n if (reducer !== basicStateReducer) {\n currentHookNameInDev = 'useReducer';\n }\n }\n\n currentlyRenderingComponent = resolveCurrentlyRenderingComponent();\n workInProgressHook = createWorkInProgressHook();\n\n if (isReRender) {\n // This is a re-render. Apply the new render phase updates to the previous\n // current hook.\n var queue = workInProgressHook.queue;\n var dispatch = queue.dispatch;\n\n if (renderPhaseUpdates !== null) {\n // Render phase updates are stored in a map of queue -> linked list\n var firstRenderPhaseUpdate = renderPhaseUpdates.get(queue);\n\n if (firstRenderPhaseUpdate !== undefined) {\n // $FlowFixMe[incompatible-use] found when upgrading Flow\n renderPhaseUpdates.delete(queue); // $FlowFixMe[incompatible-use] found when upgrading Flow\n\n var newState = workInProgressHook.memoizedState;\n var update = firstRenderPhaseUpdate;\n\n do {\n // Process this render phase update. We don't have to check the\n // priority because it will always be the same as the current\n // render's.\n var action = update.action;\n\n {\n isInHookUserCodeInDev = true;\n }\n\n newState = reducer(newState, action);\n\n {\n isInHookUserCodeInDev = false;\n } // $FlowFixMe[incompatible-type] we bail out when we get a null\n\n\n update = update.next;\n } while (update !== null); // $FlowFixMe[incompatible-use] found when upgrading Flow\n\n\n workInProgressHook.memoizedState = newState;\n return [newState, dispatch];\n }\n } // $FlowFixMe[incompatible-use] found when upgrading Flow\n\n\n return [workInProgressHook.memoizedState, dispatch];\n } else {\n {\n isInHookUserCodeInDev = true;\n }\n\n var initialState;\n\n if (reducer === basicStateReducer) {\n // Special case for `useState`.\n initialState = typeof initialArg === 'function' ? initialArg() : initialArg;\n } else {\n initialState = init !== undefined ? init(initialArg) : initialArg;\n }\n\n {\n isInHookUserCodeInDev = false;\n } // $FlowFixMe[incompatible-use] found when upgrading Flow\n\n\n workInProgressHook.memoizedState = initialState; // $FlowFixMe[incompatible-use] found when upgrading Flow\n\n var _queue = workInProgressHook.queue = {\n last: null,\n dispatch: null\n };\n\n var _dispatch = _queue.dispatch = dispatchAction.bind(null, currentlyRenderingComponent, _queue); // $FlowFixMe[incompatible-use] found when upgrading Flow\n\n\n return [workInProgressHook.memoizedState, _dispatch];\n }\n}\n\nfunction useMemo(nextCreate, deps) {\n currentlyRenderingComponent = resolveCurrentlyRenderingComponent();\n workInProgressHook = createWorkInProgressHook();\n var nextDeps = deps === undefined ? null : deps;\n\n if (workInProgressHook !== null) {\n var prevState = workInProgressHook.memoizedState;\n\n if (prevState !== null) {\n if (nextDeps !== null) {\n var prevDeps = prevState[1];\n\n if (areHookInputsEqual(nextDeps, prevDeps)) {\n return prevState[0];\n }\n }\n }\n }\n\n {\n isInHookUserCodeInDev = true;\n }\n\n var nextValue = nextCreate();\n\n {\n isInHookUserCodeInDev = false;\n } // $FlowFixMe[incompatible-use] found when upgrading Flow\n\n\n workInProgressHook.memoizedState = [nextValue, nextDeps];\n return nextValue;\n}\n\nfunction useRef(initialValue) {\n currentlyRenderingComponent = resolveCurrentlyRenderingComponent();\n workInProgressHook = createWorkInProgressHook();\n var previousRef = workInProgressHook.memoizedState;\n\n if (previousRef === null) {\n var ref = {\n current: initialValue\n };\n\n {\n Object.seal(ref);\n } // $FlowFixMe[incompatible-use] found when upgrading Flow\n\n\n workInProgressHook.memoizedState = ref;\n return ref;\n } else {\n return previousRef;\n }\n}\n\nfunction dispatchAction(componentIdentity, queue, action) {\n if (numberOfReRenders >= RE_RENDER_LIMIT) {\n throw new Error('Too many re-renders. React limits the number of renders to prevent ' + 'an infinite loop.');\n }\n\n if (componentIdentity === currentlyRenderingComponent) {\n // This is a render phase update. Stash it in a lazily-created map of\n // queue -> linked list of updates. After this render pass, we'll restart\n // and apply the stashed updates on top of the work-in-progress hook.\n didScheduleRenderPhaseUpdate = true;\n var update = {\n action: action,\n next: null\n };\n\n if (renderPhaseUpdates === null) {\n renderPhaseUpdates = new Map();\n }\n\n var firstRenderPhaseUpdate = renderPhaseUpdates.get(queue);\n\n if (firstRenderPhaseUpdate === undefined) {\n // $FlowFixMe[incompatible-use] found when upgrading Flow\n renderPhaseUpdates.set(queue, update);\n } else {\n // Append the update to the end of the list.\n var lastRenderPhaseUpdate = firstRenderPhaseUpdate;\n\n while (lastRenderPhaseUpdate.next !== null) {\n lastRenderPhaseUpdate = lastRenderPhaseUpdate.next;\n }\n\n lastRenderPhaseUpdate.next = update;\n }\n }\n}\n\nfunction useCallback(callback, deps) {\n return useMemo(function () {\n return callback;\n }, deps);\n}\n\nfunction useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {\n if (getServerSnapshot === undefined) {\n throw new Error('Missing getServerSnapshot, which is required for ' + 'server-rendered content. Will revert to client rendering.');\n }\n\n return getServerSnapshot();\n}\n\nfunction useDeferredValue(value, initialValue) {\n resolveCurrentlyRenderingComponent();\n\n {\n return value;\n }\n}\n\nfunction unsupportedStartTransition() {\n throw new Error('startTransition cannot be called during server rendering.');\n}\n\nfunction useTransition() {\n resolveCurrentlyRenderingComponent();\n return [false, unsupportedStartTransition];\n}\n\nfunction useHostTransitionStatus() {\n resolveCurrentlyRenderingComponent();\n return NotPendingTransition;\n}\n\nfunction unsupportedSetOptimisticState() {\n throw new Error('Cannot update optimistic state while rendering.');\n}\n\nfunction useOptimistic(passthrough, reducer) {\n resolveCurrentlyRenderingComponent();\n return [passthrough, unsupportedSetOptimisticState];\n}\n\nfunction createPostbackFormStateKey(permalink, componentKeyPath, hookIndex) {\n if (permalink !== undefined) {\n // Don't bother to hash a permalink-based key since it's already short.\n return 'p' + permalink;\n } else {\n // Append a node to the key path that represents the form state hook.\n var keyPath = [componentKeyPath, null, hookIndex]; // Key paths are hashed to reduce the size. It does not need to be secure,\n // and it's more important that it's fast than that it's completely\n // collision-free.\n\n var keyPathHash = createFastHash(JSON.stringify(keyPath));\n return 'k' + keyPathHash;\n }\n}\n\nfunction useFormState(action, initialState, permalink) {\n resolveCurrentlyRenderingComponent(); // Count the number of useFormState hooks per component. We also use this to\n // track the position of this useFormState hook relative to the other ones in\n // this component, so we can generate a unique key for each one.\n\n var formStateHookIndex = formStateCounter++;\n var request = currentlyRenderingRequest; // $FlowIgnore[prop-missing]\n\n var formAction = action.$$FORM_ACTION;\n\n if (typeof formAction === 'function') {\n // This is a server action. These have additional features to enable\n // MPA-style form submissions with progressive enhancement.\n // TODO: If the same permalink is passed to multiple useFormStates, and\n // they all have the same action signature, Fizz will pass the postback\n // state to all of them. We should probably only pass it to the first one,\n // and/or warn.\n // The key is lazily generated and deduped so the that the keypath doesn't\n // get JSON.stringify-ed unnecessarily, and at most once.\n var nextPostbackStateKey = null; // Determine the current form state. If we received state during an MPA form\n // submission, then we will reuse that, if the action identity matches.\n // Otherwise we'll use the initial state argument. We will emit a comment\n // marker into the stream that indicates whether the state was reused.\n\n var state = initialState;\n var componentKeyPath = currentlyRenderingKeyPath;\n var postbackFormState = getFormState(request); // $FlowIgnore[prop-missing]\n\n var isSignatureEqual = action.$$IS_SIGNATURE_EQUAL;\n\n if (postbackFormState !== null && typeof isSignatureEqual === 'function') {\n var postbackKey = postbackFormState[1];\n var postbackReferenceId = postbackFormState[2];\n var postbackBoundArity = postbackFormState[3];\n\n if (isSignatureEqual.call(action, postbackReferenceId, postbackBoundArity)) {\n nextPostbackStateKey = createPostbackFormStateKey(permalink, componentKeyPath, formStateHookIndex);\n\n if (postbackKey === nextPostbackStateKey) {\n // This was a match\n formStateMatchingIndex = formStateHookIndex; // Reuse the state that was submitted by the form.\n\n state = postbackFormState[0];\n }\n }\n } // Bind the state to the first argument of the action.\n\n\n var boundAction = action.bind(null, state); // Wrap the action so the return value is void.\n\n var dispatch = function (payload) {\n boundAction(payload);\n }; // $FlowIgnore[prop-missing]\n\n\n if (typeof boundAction.$$FORM_ACTION === 'function') {\n // $FlowIgnore[prop-missing]\n dispatch.$$FORM_ACTION = function (prefix) {\n var metadata = boundAction.$$FORM_ACTION(prefix); // Override the action URL\n\n if (permalink !== undefined) {\n {\n checkAttributeStringCoercion(permalink, 'target');\n }\n\n permalink += '';\n metadata.action = permalink;\n }\n\n var formData = metadata.data;\n\n if (formData) {\n if (nextPostbackStateKey === null) {\n nextPostbackStateKey = createPostbackFormStateKey(permalink, componentKeyPath, formStateHookIndex);\n }\n\n formData.append('$ACTION_KEY', nextPostbackStateKey);\n }\n\n return metadata;\n };\n }\n\n return [state, dispatch, false];\n } else {\n // This is not a server action, so the implementation is much simpler.\n // Bind the state to the first argument of the action.\n var _boundAction = action.bind(null, initialState); // Wrap the action so the return value is void.\n\n\n var _dispatch2 = function (payload) {\n _boundAction(payload);\n };\n\n return [initialState, _dispatch2, false];\n }\n}\n\nfunction useId() {\n var task = currentlyRenderingTask;\n var treeId = getTreeId(task.treeContext);\n var resumableState = currentResumableState;\n\n if (resumableState === null) {\n throw new Error('Invalid hook call. Hooks can only be called inside of the body of a function component.');\n }\n\n var localId = localIdCounter++;\n return makeId(resumableState, treeId, localId);\n}\n\nfunction use(usable) {\n if (usable !== null && typeof usable === 'object') {\n // $FlowFixMe[method-unbinding]\n if (typeof usable.then === 'function') {\n // This is a thenable.\n var thenable = usable;\n return unwrapThenable(thenable);\n } else if (usable.$$typeof === REACT_CONTEXT_TYPE) {\n var context = usable;\n return readContext(context);\n }\n } // eslint-disable-next-line react-internal/safe-string-coercion\n\n\n throw new Error('An unsupported type was passed to use(): ' + String(usable));\n}\n\nfunction unwrapThenable(thenable) {\n var index = thenableIndexCounter;\n thenableIndexCounter += 1;\n\n if (thenableState === null) {\n thenableState = createThenableState();\n }\n\n return trackUsedThenable(thenableState, thenable, index);\n}\n\nfunction unsupportedRefresh() {\n throw new Error('Cache cannot be refreshed during server rendering.');\n}\n\nfunction useCacheRefresh() {\n return unsupportedRefresh;\n}\n\nfunction noop$1() {}\n\nvar HooksDispatcher = {\n readContext: readContext,\n use: use,\n useContext: useContext,\n useMemo: useMemo,\n useReducer: useReducer,\n useRef: useRef,\n useState: useState,\n useInsertionEffect: noop$1,\n useLayoutEffect: noop$1,\n useCallback: useCallback,\n // useImperativeHandle is not run in the server environment\n useImperativeHandle: noop$1,\n // Effects are not run in the server environment.\n useEffect: noop$1,\n // Debugging effect\n useDebugValue: noop$1,\n useDeferredValue: useDeferredValue,\n useTransition: useTransition,\n useId: useId,\n // Subscriptions are not setup in a server environment.\n useSyncExternalStore: useSyncExternalStore\n};\n\n{\n HooksDispatcher.useCacheRefresh = useCacheRefresh;\n}\n\n{\n HooksDispatcher.useHostTransitionStatus = useHostTransitionStatus;\n}\n\n{\n HooksDispatcher.useOptimistic = useOptimistic;\n HooksDispatcher.useFormState = useFormState;\n}\n\nvar currentResumableState = null;\nfunction setCurrentResumableState(resumableState) {\n currentResumableState = resumableState;\n}\n\nfunction getCacheSignal() {\n throw new Error('Not implemented.');\n}\n\nfunction getCacheForType(resourceType) {\n throw new Error('Not implemented.');\n}\n\nvar DefaultCacheDispatcher = {\n getCacheSignal: getCacheSignal,\n getCacheForType: getCacheForType\n};\n\n// Helpers to patch console.logs to avoid logging during side-effect free\n// replaying on render function. This currently only patches the object\n// lazily which won't cover if the log function was extracted eagerly.\n// We could also eagerly patch the method.\nvar disabledDepth = 0;\nvar prevLog;\nvar prevInfo;\nvar prevWarn;\nvar prevError;\nvar prevGroup;\nvar prevGroupCollapsed;\nvar prevGroupEnd;\n\nfunction disabledLog() {}\n\ndisabledLog.__reactDisabledLog = true;\nfunction disableLogs() {\n {\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n prevLog = console.log;\n prevInfo = console.info;\n prevWarn = console.warn;\n prevError = console.error;\n prevGroup = console.group;\n prevGroupCollapsed = console.groupCollapsed;\n prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099\n\n var props = {\n configurable: true,\n enumerable: true,\n value: disabledLog,\n writable: true\n }; // $FlowFixMe[cannot-write] Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n info: props,\n log: props,\n warn: props,\n error: props,\n group: props,\n groupCollapsed: props,\n groupEnd: props\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n disabledDepth++;\n }\n}\nfunction reenableLogs() {\n {\n disabledDepth--;\n\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n var props = {\n configurable: true,\n enumerable: true,\n writable: true\n }; // $FlowFixMe[cannot-write] Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n log: assign({}, props, {\n value: prevLog\n }),\n info: assign({}, props, {\n value: prevInfo\n }),\n warn: assign({}, props, {\n value: prevWarn\n }),\n error: assign({}, props, {\n value: prevError\n }),\n group: assign({}, props, {\n value: prevGroup\n }),\n groupCollapsed: assign({}, props, {\n value: prevGroupCollapsed\n }),\n groupEnd: assign({}, props, {\n value: prevGroupEnd\n })\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n if (disabledDepth < 0) {\n error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');\n }\n }\n}\n\nvar ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher;\nvar prefix;\nfunction describeBuiltInComponentFrame(name, ownerFn) {\n {\n if (prefix === undefined) {\n // Extract the VM specific prefix used by each line.\n try {\n throw Error();\n } catch (x) {\n var match = x.stack.trim().match(/\\n( *(at )?)/);\n prefix = match && match[1] || '';\n }\n } // We use the prefix to ensure our stacks line up with native stack frames.\n\n\n return '\\n' + prefix + name;\n }\n}\nvar reentry = false;\nvar componentFrameCache;\n\n{\n var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;\n componentFrameCache = new PossiblyWeakMap();\n}\n/**\n * Leverages native browser/VM stack frames to get proper details (e.g.\n * filename, line + col number) for a single component in a component stack. We\n * do this by:\n * (1) throwing and catching an error in the function - this will be our\n * control error.\n * (2) calling the component which will eventually throw an error that we'll\n * catch - this will be our sample error.\n * (3) diffing the control and sample error stacks to find the stack frame\n * which represents our component.\n */\n\n\nfunction describeNativeComponentFrame(fn, construct) {\n // If something asked for a stack inside a fake render, it should get ignored.\n if (!fn || reentry) {\n return '';\n }\n\n {\n var frame = componentFrameCache.get(fn);\n\n if (frame !== undefined) {\n return frame;\n }\n }\n\n reentry = true;\n var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe[incompatible-type] It does accept undefined.\n\n Error.prepareStackTrace = undefined;\n var previousDispatcher;\n\n {\n previousDispatcher = ReactCurrentDispatcher$1.current; // Set the dispatcher in DEV because this might be call in the render function\n // for warnings.\n\n ReactCurrentDispatcher$1.current = null;\n disableLogs();\n }\n /**\n * Finding a common stack frame between sample and control errors can be\n * tricky given the different types and levels of stack trace truncation from\n * different JS VMs. So instead we'll attempt to control what that common\n * frame should be through this object method:\n * Having both the sample and control errors be in the function under the\n * `DescribeNativeComponentFrameRoot` property, + setting the `name` and\n * `displayName` properties of the function ensures that a stack\n * frame exists that has the method name `DescribeNativeComponentFrameRoot` in\n * it for both control and sample stacks.\n */\n\n\n var RunInRootFrame = {\n DetermineComponentFrameRoot: function () {\n var control;\n\n try {\n // This should throw.\n if (construct) {\n // Something should be setting the props in the constructor.\n var Fake = function () {\n throw Error();\n }; // $FlowFixMe[prop-missing]\n\n\n Object.defineProperty(Fake.prototype, 'props', {\n set: function () {\n // We use a throwing setter instead of frozen or non-writable props\n // because that won't throw in a non-strict mode function.\n throw Error();\n }\n });\n\n if (typeof Reflect === 'object' && Reflect.construct) {\n // We construct a different control for this case to include any extra\n // frames added by the construct call.\n try {\n Reflect.construct(Fake, []);\n } catch (x) {\n control = x;\n }\n\n Reflect.construct(fn, [], Fake);\n } else {\n try {\n Fake.call();\n } catch (x) {\n control = x;\n } // $FlowFixMe[prop-missing] found when upgrading Flow\n\n\n fn.call(Fake.prototype);\n }\n } else {\n try {\n throw Error();\n } catch (x) {\n control = x;\n } // TODO(luna): This will currently only throw if the function component\n // tries to access React/ReactDOM/props. We should probably make this throw\n // in simple components too\n\n\n var maybePromise = fn(); // If the function component returns a promise, it's likely an async\n // component, which we don't yet support. Attach a noop catch handler to\n // silence the error.\n // TODO: Implement component stacks for async client components?\n\n if (maybePromise && typeof maybePromise.catch === 'function') {\n maybePromise.catch(function () {});\n }\n }\n } catch (sample) {\n // This is inlined manually because closure doesn't do it for us.\n if (sample && control && typeof sample.stack === 'string') {\n return [sample.stack, control.stack];\n }\n }\n\n return [null, null];\n }\n }; // $FlowFixMe[prop-missing]\n\n RunInRootFrame.DetermineComponentFrameRoot.displayName = 'DetermineComponentFrameRoot';\n var namePropDescriptor = Object.getOwnPropertyDescriptor(RunInRootFrame.DetermineComponentFrameRoot, 'name'); // Before ES6, the `name` property was not configurable.\n\n if (namePropDescriptor && namePropDescriptor.configurable) {\n // V8 utilizes a function's `name` property when generating a stack trace.\n Object.defineProperty(RunInRootFrame.DetermineComponentFrameRoot, // Configurable properties can be updated even if its writable descriptor\n // is set to `false`.\n // $FlowFixMe[cannot-write]\n 'name', {\n value: 'DetermineComponentFrameRoot'\n });\n }\n\n try {\n var _RunInRootFrame$Deter = RunInRootFrame.DetermineComponentFrameRoot(),\n sampleStack = _RunInRootFrame$Deter[0],\n controlStack = _RunInRootFrame$Deter[1];\n\n if (sampleStack && controlStack) {\n // This extracts the first frame from the sample that isn't also in the control.\n // Skipping one frame that we assume is the frame that calls the two.\n var sampleLines = sampleStack.split('\\n');\n var controlLines = controlStack.split('\\n');\n var s = 0;\n var c = 0;\n\n while (s < sampleLines.length && !sampleLines[s].includes('DetermineComponentFrameRoot')) {\n s++;\n }\n\n while (c < controlLines.length && !controlLines[c].includes('DetermineComponentFrameRoot')) {\n c++;\n } // We couldn't find our intentionally injected common root frame, attempt\n // to find another common root frame by search from the bottom of the\n // control stack...\n\n\n if (s === sampleLines.length || c === controlLines.length) {\n s = sampleLines.length - 1;\n c = controlLines.length - 1;\n\n while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {\n // We expect at least one stack frame to be shared.\n // Typically this will be the root most one. However, stack frames may be\n // cut off due to maximum stack limits. In this case, one maybe cut off\n // earlier than the other. We assume that the sample is longer or the same\n // and there for cut off earlier. So we should find the root most frame in\n // the sample somewhere in the control.\n c--;\n }\n }\n\n for (; s >= 1 && c >= 0; s--, c--) {\n // Next we find the first one that isn't the same which should be the\n // frame that called our sample function and the control.\n if (sampleLines[s] !== controlLines[c]) {\n // In V8, the first line is describing the message but other VMs don't.\n // If we're about to return the first line, and the control is also on the same\n // line, that's a pretty good indicator that our sample threw at same line as\n // the control. I.e. before we entered the sample frame. So we ignore this result.\n // This can happen if you passed a class to function component, or non-function.\n if (s !== 1 || c !== 1) {\n do {\n s--;\n c--; // We may still have similar intermediate frames from the construct call.\n // The next one that isn't the same should be our match though.\n\n if (c < 0 || sampleLines[s] !== controlLines[c]) {\n // V8 adds a \"new\" prefix for native classes. Let's remove it to make it prettier.\n var _frame = '\\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled \"<anonymous>\"\n // but we have a user-provided \"displayName\"\n // splice it in to make the stack more readable.\n\n\n if (fn.displayName && _frame.includes('<anonymous>')) {\n _frame = _frame.replace('<anonymous>', fn.displayName);\n }\n\n if (true) {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, _frame);\n }\n } // Return the line we found.\n\n\n return _frame;\n }\n } while (s >= 1 && c >= 0);\n }\n\n break;\n }\n }\n }\n } finally {\n reentry = false;\n\n {\n ReactCurrentDispatcher$1.current = previousDispatcher;\n reenableLogs();\n }\n\n Error.prepareStackTrace = previousPrepareStackTrace;\n } // Fallback to just using the name if we couldn't make it throw.\n\n\n var name = fn ? fn.displayName || fn.name : '';\n var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';\n\n {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, syntheticFrame);\n }\n }\n\n return syntheticFrame;\n}\n\nfunction describeClassComponentFrame(ctor, ownerFn) {\n {\n return describeNativeComponentFrame(ctor, true);\n }\n}\nfunction describeFunctionComponentFrame(fn, ownerFn) {\n {\n return describeNativeComponentFrame(fn, false);\n }\n}\n\nfunction getStackByComponentStackNode(componentStack) {\n try {\n var info = '';\n var node = componentStack;\n\n do {\n switch (node.tag) {\n case 0:\n info += describeBuiltInComponentFrame(node.type, null);\n break;\n\n case 1:\n info += describeFunctionComponentFrame(node.type, null);\n break;\n\n case 2:\n info += describeClassComponentFrame(node.type, null);\n break;\n } // $FlowFixMe[incompatible-type] we bail out when we get a null\n\n\n node = node.parent;\n } while (node);\n\n return info;\n } catch (x) {\n return '\\nError generating stack: ' + x.message + '\\n' + x.stack;\n }\n}\n\nvar ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;\nvar ReactCurrentCache = ReactSharedInternals.ReactCurrentCache;\nvar ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; // Linked list representing the identity of a component given the component/tag name and key.\n// The name might be minified but we assume that it's going to be the same generated name. Typically\n// because it's just the same compiled output in practice.\n// resume with segmentID at the index\n\nvar CLIENT_RENDERED = 4; // if it errors or infinitely suspends\n\nvar PENDING = 0;\nvar COMPLETED = 1;\nvar FLUSHED = 2;\nvar ABORTED = 3;\nvar ERRORED = 4;\nvar POSTPONED = 5;\nvar OPEN = 0;\nvar CLOSING = 1;\nvar CLOSED = 2; // This is a default heuristic for how to split up the HTML content into progressive\n// loading. Our goal is to be able to display additional new content about every 500ms.\n// Faster than that is unnecessary and should be throttled on the client. It also\n// adds unnecessary overhead to do more splits. We don't know if it's a higher or lower\n// end device but higher end suffer less from the overhead than lower end does from\n// not getting small enough pieces. We error on the side of low end.\n// We base this on low end 3G speeds which is about 500kbits per second. We assume\n// that there can be a reasonable drop off from max bandwidth which leaves you with\n// as little as 80%. We can receive half of that each 500ms - at best. In practice,\n// a little bandwidth is lost to processing and contention - e.g. CSS and images that\n// are downloaded along with the main content. So we estimate about half of that to be\n// the lower end throughput. In other words, we expect that you can at least show\n// about 12.5kb of content per 500ms. Not counting starting latency for the first\n// paint.\n// 500 * 1024 / 8 * .8 * 0.5 / 2\n\nvar DEFAULT_PROGRESSIVE_CHUNK_SIZE = 12800;\n\nfunction defaultErrorHandler(error) {\n console['error'](error); // Don't transform to our wrapper\n\n return null;\n}\n\nfunction noop() {}\n\nfunction createRequest(children, resumableState, renderState, rootFormatContext, progressiveChunkSize, onError, onAllReady, onShellReady, onShellError, onFatalError, onPostpone, formState) {\n var pingedTasks = [];\n var abortSet = new Set();\n var request = {\n destination: null,\n flushScheduled: false,\n resumableState: resumableState,\n renderState: renderState,\n rootFormatContext: rootFormatContext,\n progressiveChunkSize: progressiveChunkSize === undefined ? DEFAULT_PROGRESSIVE_CHUNK_SIZE : progressiveChunkSize,\n status: OPEN,\n fatalError: null,\n nextSegmentId: 0,\n allPendingTasks: 0,\n pendingRootTasks: 0,\n completedRootSegment: null,\n abortableTasks: abortSet,\n pingedTasks: pingedTasks,\n clientRenderedBoundaries: [],\n completedBoundaries: [],\n partialBoundaries: [],\n trackedPostpones: null,\n onError: onError === undefined ? defaultErrorHandler : onError,\n onPostpone: onPostpone === undefined ? noop : onPostpone,\n onAllReady: onAllReady === undefined ? noop : onAllReady,\n onShellReady: onShellReady === undefined ? noop : onShellReady,\n onShellError: onShellError === undefined ? noop : onShellError,\n onFatalError: onFatalError === undefined ? noop : onFatalError,\n formState: formState === undefined ? null : formState\n }; // This segment represents the root fallback.\n\n var rootSegment = createPendingSegment(request, 0, null, rootFormatContext, // Root segments are never embedded in Text on either edge\n false, false); // There is no parent so conceptually, we're unblocked to flush this segment.\n\n rootSegment.parentFlushed = true;\n var rootTask = createRenderTask(request, null, children, -1, null, rootSegment, null, abortSet, null, rootFormatContext, emptyContextObject, rootContextSnapshot, emptyTreeContext, null, false);\n pingedTasks.push(rootTask);\n return request;\n}\nvar currentRequest = null;\nfunction resolveRequest() {\n if (currentRequest) return currentRequest;\n\n {\n var store = requestStorage.getStore();\n if (store) return store;\n }\n\n return null;\n}\n\nfunction pingTask(request, task) {\n var pingedTasks = request.pingedTasks;\n pingedTasks.push(task);\n\n if (request.pingedTasks.length === 1) {\n request.flushScheduled = request.destination !== null;\n scheduleWork(function () {\n return performWork(request);\n });\n }\n}\n\nfunction createSuspenseBoundary(request, fallbackAbortableTasks) {\n return {\n status: PENDING,\n rootSegmentID: -1,\n parentFlushed: false,\n pendingTasks: 0,\n completedSegments: [],\n byteSize: 0,\n fallbackAbortableTasks: fallbackAbortableTasks,\n errorDigest: null,\n contentState: createHoistableState(),\n fallbackState: createHoistableState(),\n trackedContentKeyPath: null,\n trackedFallbackNode: null\n };\n}\n\nfunction createRenderTask(request, thenableState, node, childIndex, blockedBoundary, blockedSegment, hoistableState, abortSet, keyPath, formatContext, legacyContext, context, treeContext, componentStack, isFallback) {\n request.allPendingTasks++;\n\n if (blockedBoundary === null) {\n request.pendingRootTasks++;\n } else {\n blockedBoundary.pendingTasks++;\n }\n\n var task = {\n replay: null,\n node: node,\n childIndex: childIndex,\n ping: function () {\n return pingTask(request, task);\n },\n blockedBoundary: blockedBoundary,\n blockedSegment: blockedSegment,\n hoistableState: hoistableState,\n abortSet: abortSet,\n keyPath: keyPath,\n formatContext: formatContext,\n legacyContext: legacyContext,\n context: context,\n treeContext: treeContext,\n componentStack: componentStack,\n thenableState: thenableState,\n isFallback: isFallback\n };\n abortSet.add(task);\n return task;\n}\n\nfunction createReplayTask(request, thenableState, replay, node, childIndex, blockedBoundary, hoistableState, abortSet, keyPath, formatContext, legacyContext, context, treeContext, componentStack, isFallback) {\n request.allPendingTasks++;\n\n if (blockedBoundary === null) {\n request.pendingRootTasks++;\n } else {\n blockedBoundary.pendingTasks++;\n }\n\n replay.pendingTasks++;\n var task = {\n replay: replay,\n node: node,\n childIndex: childIndex,\n ping: function () {\n return pingTask(request, task);\n },\n blockedBoundary: blockedBoundary,\n blockedSegment: null,\n hoistableState: hoistableState,\n abortSet: abortSet,\n keyPath: keyPath,\n formatContext: formatContext,\n legacyContext: legacyContext,\n context: context,\n treeContext: treeContext,\n componentStack: componentStack,\n thenableState: thenableState,\n isFallback: isFallback\n };\n abortSet.add(task);\n return task;\n}\n\nfunction createPendingSegment(request, index, boundary, parentFormatContext, lastPushedText, textEmbedded) {\n return {\n status: PENDING,\n id: -1,\n // lazily assigned later\n index: index,\n parentFlushed: false,\n chunks: [],\n children: [],\n parentFormatContext: parentFormatContext,\n boundary: boundary,\n lastPushedText: lastPushedText,\n textEmbedded: textEmbedded\n };\n} // DEV-only global reference to the currently executing task\n\n\nvar currentTaskInDEV = null;\n\nfunction getCurrentStackInDEV() {\n {\n if (currentTaskInDEV === null || currentTaskInDEV.componentStack === null) {\n return '';\n }\n\n return getStackByComponentStackNode(currentTaskInDEV.componentStack);\n }\n}\n\nfunction getStackFromNode(stackNode) {\n return getStackByComponentStackNode(stackNode);\n}\n\nfunction createBuiltInComponentStack(task, type) {\n return {\n tag: 0,\n parent: task.componentStack,\n type: type\n };\n}\n\nfunction createFunctionComponentStack(task, type) {\n return {\n tag: 1,\n parent: task.componentStack,\n type: type\n };\n}\n\nfunction createClassComponentStack(task, type) {\n return {\n tag: 2,\n parent: task.componentStack,\n type: type\n };\n} // While we track component stacks in prod all the time we only produce a reified stack in dev and\n// during prerender in Prod. The reason for this is that the stack is useful for prerender where the timeliness\n// of the request is less critical than the observability of the execution. For renders and resumes however we\n// prioritize speed of the request.\n\n\nfunction getThrownInfo(request, node) {\n if (node && ( // Always produce a stack in dev\n true )) {\n return {\n componentStack: getStackFromNode(node)\n };\n } else {\n return {};\n }\n}\n\nfunction encodeErrorForBoundary(boundary, digest, error, thrownInfo) {\n boundary.errorDigest = digest;\n\n {\n var message; // In dev we additionally encode the error message and component stack on the boundary\n\n if (error instanceof Error) {\n // eslint-disable-next-line react-internal/safe-string-coercion\n message = String(error.message);\n } else if (typeof error === 'object' && error !== null) {\n message = describeObjectForErrorMessage(error);\n } else {\n // eslint-disable-next-line react-internal/safe-string-coercion\n message = String(error);\n }\n\n boundary.errorMessage = message;\n boundary.errorComponentStack = thrownInfo.componentStack;\n }\n}\n\nfunction logRecoverableError(request, error$1, errorInfo) {\n // If this callback errors, we intentionally let that error bubble up to become a fatal error\n // so that someone fixes the error reporting instead of hiding it.\n var errorDigest = request.onError(error$1, errorInfo);\n\n if (errorDigest != null && typeof errorDigest !== 'string') {\n // We used to throw here but since this gets called from a variety of unprotected places it\n // seems better to just warn and discard the returned value.\n {\n error('onError returned something with a type other than \"string\". onError should return a string and may return null or undefined but must not return anything else. It received something of type \"%s\" instead', typeof errorDigest);\n }\n\n return;\n }\n\n return errorDigest;\n}\n\nfunction fatalError(request, error) {\n // This is called outside error handling code such as if the root errors outside\n // a suspense boundary or if the root suspense boundary's fallback errors.\n // It's also called if React itself or its host configs errors.\n var onShellError = request.onShellError;\n onShellError(error);\n var onFatalError = request.onFatalError;\n onFatalError(error);\n\n if (request.destination !== null) {\n request.status = CLOSED;\n closeWithError(request.destination, error);\n } else {\n request.status = CLOSING;\n request.fatalError = error;\n }\n}\n\nfunction renderSuspenseBoundary(request, someTask, keyPath, props) {\n if (someTask.replay !== null) {\n // If we're replaying through this pass, it means we're replaying through\n // an already completed Suspense boundary. It's too late to do anything about it\n // so we can just render through it.\n var _prevKeyPath = someTask.keyPath;\n someTask.keyPath = keyPath;\n var _content = props.children;\n\n try {\n renderNode(request, someTask, _content, -1);\n } finally {\n someTask.keyPath = _prevKeyPath;\n }\n\n return;\n } // $FlowFixMe: Refined.\n\n\n var task = someTask;\n var previousComponentStack = task.componentStack; // If we end up creating the fallback task we need it to have the correct stack which is\n // the stack for the boundary itself. We stash it here so we can use it if needed later\n\n var suspenseComponentStack = task.componentStack = createBuiltInComponentStack(task, 'Suspense');\n var prevKeyPath = task.keyPath;\n var parentBoundary = task.blockedBoundary;\n var parentHoistableState = task.hoistableState;\n var parentSegment = task.blockedSegment; // Each time we enter a suspense boundary, we split out into a new segment for\n // the fallback so that we can later replace that segment with the content.\n // This also lets us split out the main content even if it doesn't suspend,\n // in case it ends up generating a large subtree of content.\n\n var fallback = props.fallback;\n var content = props.children;\n var fallbackAbortSet = new Set();\n var newBoundary = createSuspenseBoundary(request, fallbackAbortSet);\n\n if (request.trackedPostpones !== null) {\n newBoundary.trackedContentKeyPath = keyPath;\n }\n\n var insertionIndex = parentSegment.chunks.length; // The children of the boundary segment is actually the fallback.\n\n var boundarySegment = createPendingSegment(request, insertionIndex, newBoundary, task.formatContext, // boundaries never require text embedding at their edges because comment nodes bound them\n false, false);\n parentSegment.children.push(boundarySegment); // The parentSegment has a child Segment at this index so we reset the lastPushedText marker on the parent\n\n parentSegment.lastPushedText = false; // This segment is the actual child content. We can start rendering that immediately.\n\n var contentRootSegment = createPendingSegment(request, 0, null, task.formatContext, // boundaries never require text embedding at their edges because comment nodes bound them\n false, false); // We mark the root segment as having its parent flushed. It's not really flushed but there is\n // no parent segment so there's nothing to wait on.\n\n contentRootSegment.parentFlushed = true; // Currently this is running synchronously. We could instead schedule this to pingedTasks.\n // I suspect that there might be some efficiency benefits from not creating the suspended task\n // and instead just using the stack if possible.\n // TODO: Call this directly instead of messing with saving and restoring contexts.\n // We can reuse the current context and task to render the content immediately without\n // context switching. We just need to temporarily switch which boundary and which segment\n // we're writing to. If something suspends, it'll spawn new suspended task with that context.\n\n task.blockedBoundary = newBoundary;\n task.hoistableState = newBoundary.contentState;\n task.blockedSegment = contentRootSegment;\n task.keyPath = keyPath;\n\n try {\n // We use the safe form because we don't handle suspending here. Only error handling.\n renderNode(request, task, content, -1);\n pushSegmentFinale(contentRootSegment.chunks, request.renderState, contentRootSegment.lastPushedText, contentRootSegment.textEmbedded);\n contentRootSegment.status = COMPLETED;\n queueCompletedSegment(newBoundary, contentRootSegment);\n\n if (newBoundary.pendingTasks === 0 && newBoundary.status === PENDING) {\n // This must have been the last segment we were waiting on. This boundary is now complete.\n // Therefore we won't need the fallback. We early return so that we don't have to create\n // the fallback.\n newBoundary.status = COMPLETED; // We are returning early so we need to restore the\n\n task.componentStack = previousComponentStack;\n return;\n }\n } catch (error) {\n contentRootSegment.status = ERRORED;\n newBoundary.status = CLIENT_RENDERED;\n var thrownInfo = getThrownInfo(request, task.componentStack);\n var errorDigest;\n\n {\n errorDigest = logRecoverableError(request, error, thrownInfo);\n }\n\n encodeErrorForBoundary(newBoundary, errorDigest, error, thrownInfo);\n untrackBoundary(request, newBoundary); // We don't need to decrement any task numbers because we didn't spawn any new task.\n // We don't need to schedule any task because we know the parent has written yet.\n // We do need to fallthrough to create the fallback though.\n } finally {\n task.blockedBoundary = parentBoundary;\n task.hoistableState = parentHoistableState;\n task.blockedSegment = parentSegment;\n task.keyPath = prevKeyPath;\n task.componentStack = previousComponentStack;\n }\n\n var fallbackKeyPath = [keyPath[0], 'Suspense Fallback', keyPath[2]];\n var trackedPostpones = request.trackedPostpones;\n\n if (trackedPostpones !== null) {\n // We create a detached replay node to track any postpones inside the fallback.\n var fallbackReplayNode = [fallbackKeyPath[1], fallbackKeyPath[2], [], null];\n trackedPostpones.workingMap.set(fallbackKeyPath, fallbackReplayNode);\n\n if (newBoundary.status === POSTPONED) {\n // This must exist now.\n var boundaryReplayNode = trackedPostpones.workingMap.get(keyPath);\n boundaryReplayNode[4] = fallbackReplayNode;\n } else {\n // We might not inject it into the postponed tree, unless the content actually\n // postpones too. We need to keep track of it until that happpens.\n newBoundary.trackedFallbackNode = fallbackReplayNode;\n }\n } // We create suspended task for the fallback because we don't want to actually work\n // on it yet in case we finish the main content, so we queue for later.\n\n\n var suspendedFallbackTask = createRenderTask(request, null, fallback, -1, parentBoundary, boundarySegment, newBoundary.fallbackState, fallbackAbortSet, fallbackKeyPath, task.formatContext, task.legacyContext, task.context, task.treeContext, // This stack should be the Suspense boundary stack because while the fallback is actually a child segment\n // of the parent boundary from a component standpoint the fallback is a child of the Suspense boundary itself\n suspenseComponentStack, true); // TODO: This should be queued at a separate lower priority queue so that we only work\n // on preparing fallbacks if we don't have any more main content to task on.\n\n request.pingedTasks.push(suspendedFallbackTask);\n}\n\nfunction replaySuspenseBoundary(request, task, keyPath, props, id, childNodes, childSlots, fallbackNodes, fallbackSlots) {\n var previousComponentStack = task.componentStack; // If we end up creating the fallback task we need it to have the correct stack which is\n // the stack for the boundary itself. We stash it here so we can use it if needed later\n\n var suspenseComponentStack = task.componentStack = createBuiltInComponentStack(task, 'Suspense');\n var prevKeyPath = task.keyPath;\n var previousReplaySet = task.replay;\n var parentBoundary = task.blockedBoundary;\n var parentHoistableState = task.hoistableState;\n var content = props.children;\n var fallback = props.fallback;\n var fallbackAbortSet = new Set();\n var resumedBoundary = createSuspenseBoundary(request, fallbackAbortSet);\n resumedBoundary.parentFlushed = true; // We restore the same id of this boundary as was used during prerender.\n\n resumedBoundary.rootSegmentID = id; // We can reuse the current context and task to render the content immediately without\n // context switching. We just need to temporarily switch which boundary and replay node\n // we're writing to. If something suspends, it'll spawn new suspended task with that context.\n\n task.blockedBoundary = resumedBoundary;\n task.hoistableState = resumedBoundary.contentState;\n task.replay = {\n nodes: childNodes,\n slots: childSlots,\n pendingTasks: 1\n };\n\n try {\n // We use the safe form because we don't handle suspending here. Only error handling.\n renderNode(request, task, content, -1);\n\n if (task.replay.pendingTasks === 1 && task.replay.nodes.length > 0) {\n throw new Error(\"Couldn't find all resumable slots by key/index during replaying. \" + \"The tree doesn't match so React will fallback to client rendering.\");\n }\n\n task.replay.pendingTasks--;\n\n if (resumedBoundary.pendingTasks === 0 && resumedBoundary.status === PENDING) {\n // This must have been the last segment we were waiting on. This boundary is now complete.\n // Therefore we won't need the fallback. We early return so that we don't have to create\n // the fallback.\n resumedBoundary.status = COMPLETED;\n request.completedBoundaries.push(resumedBoundary); // We restore the parent componentStack. Semantically this is the same as\n // popComponentStack(task) but we do this instead because it should be slightly\n // faster\n\n return;\n }\n } catch (error) {\n resumedBoundary.status = CLIENT_RENDERED;\n var thrownInfo = getThrownInfo(request, task.componentStack);\n var errorDigest;\n\n {\n errorDigest = logRecoverableError(request, error, thrownInfo);\n }\n\n encodeErrorForBoundary(resumedBoundary, errorDigest, error, thrownInfo);\n task.replay.pendingTasks--; // The parent already flushed in the prerender so we need to schedule this to be emitted.\n\n request.clientRenderedBoundaries.push(resumedBoundary); // We don't need to decrement any task numbers because we didn't spawn any new task.\n // We don't need to schedule any task because we know the parent has written yet.\n // We do need to fallthrough to create the fallback though.\n } finally {\n task.blockedBoundary = parentBoundary;\n task.hoistableState = parentHoistableState;\n task.replay = previousReplaySet;\n task.keyPath = prevKeyPath;\n task.componentStack = previousComponentStack;\n }\n\n var fallbackKeyPath = [keyPath[0], 'Suspense Fallback', keyPath[2]]; // We create suspended task for the fallback because we don't want to actually work\n // on it yet in case we finish the main content, so we queue for later.\n\n var fallbackReplay = {\n nodes: fallbackNodes,\n slots: fallbackSlots,\n pendingTasks: 0\n };\n var suspendedFallbackTask = createReplayTask(request, null, fallbackReplay, fallback, -1, parentBoundary, resumedBoundary.fallbackState, fallbackAbortSet, fallbackKeyPath, task.formatContext, task.legacyContext, task.context, task.treeContext, // This stack should be the Suspense boundary stack because while the fallback is actually a child segment\n // of the parent boundary from a component standpoint the fallback is a child of the Suspense boundary itself\n suspenseComponentStack, true); // TODO: This should be queued at a separate lower priority queue so that we only work\n // on preparing fallbacks if we don't have any more main content to task on.\n\n request.pingedTasks.push(suspendedFallbackTask);\n}\n\nfunction renderHostElement(request, task, keyPath, type, props) {\n var previousComponentStack = task.componentStack;\n task.componentStack = createBuiltInComponentStack(task, type);\n var segment = task.blockedSegment;\n\n if (segment === null) {\n // Replay\n var children = props.children; // TODO: Make this a Config for replaying.\n\n var prevContext = task.formatContext;\n var prevKeyPath = task.keyPath;\n task.formatContext = getChildFormatContext(prevContext, type, props);\n task.keyPath = keyPath; // We use the non-destructive form because if something suspends, we still\n // need to pop back up and finish this subtree of HTML.\n\n renderNode(request, task, children, -1); // We expect that errors will fatal the whole task and that we don't need\n // the correct context. Therefore this is not in a finally.\n\n task.formatContext = prevContext;\n task.keyPath = prevKeyPath;\n } else {\n // Render\n var _children = pushStartInstance(segment.chunks, type, props, request.resumableState, request.renderState, task.hoistableState, task.formatContext, segment.lastPushedText, task.isFallback);\n\n segment.lastPushedText = false;\n var _prevContext = task.formatContext;\n var _prevKeyPath2 = task.keyPath;\n task.formatContext = getChildFormatContext(_prevContext, type, props);\n task.keyPath = keyPath; // We use the non-destructive form because if something suspends, we still\n // need to pop back up and finish this subtree of HTML.\n\n renderNode(request, task, _children, -1); // We expect that errors will fatal the whole task and that we don't need\n // the correct context. Therefore this is not in a finally.\n\n task.formatContext = _prevContext;\n task.keyPath = _prevKeyPath2;\n pushEndInstance(segment.chunks, type, props, request.resumableState, _prevContext);\n segment.lastPushedText = false;\n }\n\n task.componentStack = previousComponentStack;\n}\n\nfunction shouldConstruct(Component) {\n return Component.prototype && Component.prototype.isReactComponent;\n}\n\nfunction renderWithHooks(request, task, keyPath, Component, props, secondArg) {\n // Reset the task's thenable state before continuing, so that if a later\n // component suspends we can reuse the same task object. If the same\n // component suspends again, the thenable state will be restored.\n var prevThenableState = task.thenableState;\n task.thenableState = null;\n var componentIdentity = {};\n prepareToUseHooks(request, task, keyPath, componentIdentity, prevThenableState);\n var result = Component(props, secondArg);\n return finishHooks(Component, props, result, secondArg);\n}\n\nfunction finishClassComponent(request, task, keyPath, instance, Component, props) {\n var nextChildren = instance.render();\n\n {\n if (instance.props !== props) {\n if (!didWarnAboutReassigningProps) {\n error('It looks like %s is reassigning its own `this.props` while rendering. ' + 'This is not supported and can lead to confusing bugs.', getComponentNameFromType(Component) || 'a component');\n }\n\n didWarnAboutReassigningProps = true;\n }\n }\n\n {\n var childContextTypes = Component.childContextTypes;\n\n if (childContextTypes !== null && childContextTypes !== undefined) {\n var previousContext = task.legacyContext;\n var mergedContext = processChildContext(instance, Component, previousContext, childContextTypes);\n task.legacyContext = mergedContext;\n renderNodeDestructive(request, task, nextChildren, -1);\n task.legacyContext = previousContext;\n return;\n }\n }\n\n var prevKeyPath = task.keyPath;\n task.keyPath = keyPath;\n renderNodeDestructive(request, task, nextChildren, -1);\n task.keyPath = prevKeyPath;\n}\n\nfunction renderClassComponent(request, task, keyPath, Component, props) {\n var previousComponentStack = task.componentStack;\n task.componentStack = createClassComponentStack(task, Component);\n var maskedContext = getMaskedContext(Component, task.legacyContext) ;\n var instance = constructClassInstance(Component, props, maskedContext);\n mountClassInstance(instance, Component, props, maskedContext);\n finishClassComponent(request, task, keyPath, instance, Component, props);\n task.componentStack = previousComponentStack;\n}\n\nvar didWarnAboutBadClass = {};\nvar didWarnAboutModulePatternComponent = {};\nvar didWarnAboutContextTypeOnFunctionComponent = {};\nvar didWarnAboutGetDerivedStateOnFunctionComponent = {};\nvar didWarnAboutReassigningProps = false;\nvar didWarnAboutDefaultPropsOnFunctionComponent = {};\nvar didWarnAboutGenerators = false;\nvar didWarnAboutMaps = false; // This would typically be a function component but we still support module pattern\n// components for some reason.\n\nfunction renderIndeterminateComponent(request, task, keyPath, Component, props) {\n var legacyContext;\n\n {\n legacyContext = getMaskedContext(Component, task.legacyContext);\n }\n\n var previousComponentStack = task.componentStack;\n task.componentStack = createFunctionComponentStack(task, Component);\n\n {\n if (Component.prototype && typeof Component.prototype.render === 'function') {\n var componentName = getComponentNameFromType(Component) || 'Unknown';\n\n if (!didWarnAboutBadClass[componentName]) {\n error(\"The <%s /> component appears to have a render method, but doesn't extend React.Component. \" + 'This is likely to cause errors. Change %s to extend React.Component instead.', componentName, componentName);\n\n didWarnAboutBadClass[componentName] = true;\n }\n }\n }\n\n var value = renderWithHooks(request, task, keyPath, Component, props, legacyContext);\n var hasId = checkDidRenderIdHook();\n var formStateCount = getFormStateCount();\n var formStateMatchingIndex = getFormStateMatchingIndex();\n\n {\n // Support for module components is deprecated and is removed behind a flag.\n // Whether or not it would crash later, we want to show a good message in DEV first.\n if (typeof value === 'object' && value !== null && typeof value.render === 'function' && value.$$typeof === undefined) {\n var _componentName = getComponentNameFromType(Component) || 'Unknown';\n\n if (!didWarnAboutModulePatternComponent[_componentName]) {\n error('The <%s /> component appears to be a function component that returns a class instance. ' + 'Change %s to a class that extends React.Component instead. ' + \"If you can't use a class try assigning the prototype on the function as a workaround. \" + \"`%s.prototype = React.Component.prototype`. Don't use an arrow function since it \" + 'cannot be called with `new` by React.', _componentName, _componentName, _componentName);\n\n didWarnAboutModulePatternComponent[_componentName] = true;\n }\n }\n }\n\n if ( // Run these checks in production only if the flag is off.\n // Eventually we'll delete this branch altogether.\n typeof value === 'object' && value !== null && typeof value.render === 'function' && value.$$typeof === undefined) {\n {\n var _componentName2 = getComponentNameFromType(Component) || 'Unknown';\n\n if (!didWarnAboutModulePatternComponent[_componentName2]) {\n error('The <%s /> component appears to be a function component that returns a class instance. ' + 'Change %s to a class that extends React.Component instead. ' + \"If you can't use a class try assigning the prototype on the function as a workaround. \" + \"`%s.prototype = React.Component.prototype`. Don't use an arrow function since it \" + 'cannot be called with `new` by React.', _componentName2, _componentName2, _componentName2);\n\n didWarnAboutModulePatternComponent[_componentName2] = true;\n }\n }\n\n mountClassInstance(value, Component, props, legacyContext);\n finishClassComponent(request, task, keyPath, value, Component, props);\n } else {\n\n {\n validateFunctionComponentInDev(Component);\n }\n\n finishFunctionComponent(request, task, keyPath, value, hasId, formStateCount, formStateMatchingIndex);\n }\n\n task.componentStack = previousComponentStack;\n}\n\nfunction finishFunctionComponent(request, task, keyPath, children, hasId, formStateCount, formStateMatchingIndex) {\n var didEmitFormStateMarkers = false;\n\n if (formStateCount !== 0 && request.formState !== null) {\n // For each useFormState hook, emit a marker that indicates whether we\n // rendered using the form state passed at the root. We only emit these\n // markers if form state is passed at the root.\n var segment = task.blockedSegment;\n\n if (segment === null) ; else {\n didEmitFormStateMarkers = true;\n var target = segment.chunks;\n\n for (var i = 0; i < formStateCount; i++) {\n if (i === formStateMatchingIndex) {\n pushFormStateMarkerIsMatching(target);\n } else {\n pushFormStateMarkerIsNotMatching(target);\n }\n }\n }\n }\n\n var prevKeyPath = task.keyPath;\n task.keyPath = keyPath;\n\n if (hasId) {\n // This component materialized an id. We treat this as its own level, with\n // a single \"child\" slot.\n var prevTreeContext = task.treeContext;\n var totalChildren = 1;\n var index = 0; // Modify the id context. Because we'll need to reset this if something\n // suspends or errors, we'll use the non-destructive render path.\n\n task.treeContext = pushTreeContext(prevTreeContext, totalChildren, index);\n renderNode(request, task, children, -1); // Like the other contexts, this does not need to be in a finally block\n // because renderNode takes care of unwinding the stack.\n\n task.treeContext = prevTreeContext;\n } else if (didEmitFormStateMarkers) {\n // If there were formState hooks, we must use the non-destructive path\n // because this component is not a pure indirection; we emitted markers\n // to the stream.\n renderNode(request, task, children, -1);\n } else {\n // We're now successfully past this task, and we haven't modified the\n // context stack. We don't have to pop back to the previous task every\n // again, so we can use the destructive recursive form.\n renderNodeDestructive(request, task, children, -1);\n }\n\n task.keyPath = prevKeyPath;\n}\n\nfunction validateFunctionComponentInDev(Component) {\n {\n if (Component) {\n if (Component.childContextTypes) {\n error('childContextTypes cannot be defined on a function component.\\n' + ' %s.childContextTypes = ...', Component.displayName || Component.name || 'Component');\n }\n }\n\n if (Component.defaultProps !== undefined) {\n var componentName = getComponentNameFromType(Component) || 'Unknown';\n\n if (!didWarnAboutDefaultPropsOnFunctionComponent[componentName]) {\n error('%s: Support for defaultProps will be removed from function components ' + 'in a future major release. Use JavaScript default parameters instead.', componentName);\n\n didWarnAboutDefaultPropsOnFunctionComponent[componentName] = true;\n }\n }\n\n if (typeof Component.getDerivedStateFromProps === 'function') {\n var _componentName3 = getComponentNameFromType(Component) || 'Unknown';\n\n if (!didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3]) {\n error('%s: Function components do not support getDerivedStateFromProps.', _componentName3);\n\n didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3] = true;\n }\n }\n\n if (typeof Component.contextType === 'object' && Component.contextType !== null) {\n var _componentName4 = getComponentNameFromType(Component) || 'Unknown';\n\n if (!didWarnAboutContextTypeOnFunctionComponent[_componentName4]) {\n error('%s: Function components do not support contextType.', _componentName4);\n\n didWarnAboutContextTypeOnFunctionComponent[_componentName4] = true;\n }\n }\n }\n}\n\nfunction resolveDefaultProps(Component, baseProps) {\n if (Component && Component.defaultProps) {\n // Resolve default props. Taken from ReactElement\n var props = assign({}, baseProps);\n var defaultProps = Component.defaultProps;\n\n for (var propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n\n return props;\n }\n\n return baseProps;\n}\n\nfunction renderForwardRef(request, task, keyPath, type, props, ref) {\n var previousComponentStack = task.componentStack;\n task.componentStack = createFunctionComponentStack(task, type.render);\n var propsWithoutRef;\n\n {\n propsWithoutRef = props;\n }\n\n var children = renderWithHooks(request, task, keyPath, type.render, propsWithoutRef, ref);\n var hasId = checkDidRenderIdHook();\n var formStateCount = getFormStateCount();\n var formStateMatchingIndex = getFormStateMatchingIndex();\n finishFunctionComponent(request, task, keyPath, children, hasId, formStateCount, formStateMatchingIndex);\n task.componentStack = previousComponentStack;\n}\n\nfunction renderMemo(request, task, keyPath, type, props, ref) {\n var innerType = type.type;\n var resolvedProps = resolveDefaultProps(innerType, props);\n renderElement(request, task, keyPath, innerType, resolvedProps, ref);\n}\n\nfunction renderContextConsumer(request, task, keyPath, context, props) {\n var render = props.children;\n\n {\n if (typeof render !== 'function') {\n error('A context consumer was rendered with multiple children, or a child ' + \"that isn't a function. A context consumer expects a single child \" + 'that is a function. If you did pass a function, make sure there ' + 'is no trailing or leading whitespace around it.');\n }\n }\n\n var newValue = readContext$1(context);\n var newChildren = render(newValue);\n var prevKeyPath = task.keyPath;\n task.keyPath = keyPath;\n renderNodeDestructive(request, task, newChildren, -1);\n task.keyPath = prevKeyPath;\n}\n\nfunction renderContextProvider(request, task, keyPath, context, props) {\n var value = props.value;\n var children = props.children;\n var prevSnapshot;\n\n {\n prevSnapshot = task.context;\n }\n\n var prevKeyPath = task.keyPath;\n task.context = pushProvider(context, value);\n task.keyPath = keyPath;\n renderNodeDestructive(request, task, children, -1);\n task.context = popProvider(context);\n task.keyPath = prevKeyPath;\n\n {\n if (prevSnapshot !== task.context) {\n error('Popping the context provider did not return back to the original snapshot. This is a bug in React.');\n }\n }\n}\n\nfunction renderLazyComponent(request, task, keyPath, lazyComponent, props, ref) {\n var previousComponentStack = task.componentStack;\n task.componentStack = createBuiltInComponentStack(task, 'Lazy');\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n var Component = init(payload);\n var resolvedProps = resolveDefaultProps(Component, props);\n renderElement(request, task, keyPath, Component, resolvedProps, ref);\n task.componentStack = previousComponentStack;\n}\n\nfunction renderOffscreen(request, task, keyPath, props) {\n var mode = props.mode;\n\n if (mode === 'hidden') ; else {\n // A visible Offscreen boundary is treated exactly like a fragment: a\n // pure indirection.\n var prevKeyPath = task.keyPath;\n task.keyPath = keyPath;\n renderNodeDestructive(request, task, props.children, -1);\n task.keyPath = prevKeyPath;\n }\n}\n\nfunction renderElement(request, task, keyPath, type, props, ref) {\n if (typeof type === 'function') {\n if (shouldConstruct(type)) {\n renderClassComponent(request, task, keyPath, type, props);\n return;\n } else {\n renderIndeterminateComponent(request, task, keyPath, type, props);\n return;\n }\n }\n\n if (typeof type === 'string') {\n renderHostElement(request, task, keyPath, type, props);\n return;\n }\n\n switch (type) {\n // LegacyHidden acts the same as a fragment. This only works because we\n // currently assume that every instance of LegacyHidden is accompanied by a\n // host component wrapper. In the hidden mode, the host component is given a\n // `hidden` attribute, which ensures that the initial HTML is not visible.\n // To support the use of LegacyHidden as a true fragment, without an extra\n // DOM node, we would have to hide the initial HTML in some other way.\n // TODO: Delete in LegacyHidden. It's an unstable API only used in the\n // www build. As a migration step, we could add a special prop to Offscreen\n // that simulates the old behavior (no hiding, no change to effects).\n case REACT_LEGACY_HIDDEN_TYPE:\n case REACT_DEBUG_TRACING_MODE_TYPE:\n case REACT_STRICT_MODE_TYPE:\n case REACT_PROFILER_TYPE:\n case REACT_FRAGMENT_TYPE:\n {\n var prevKeyPath = task.keyPath;\n task.keyPath = keyPath;\n renderNodeDestructive(request, task, props.children, -1);\n task.keyPath = prevKeyPath;\n return;\n }\n\n case REACT_OFFSCREEN_TYPE:\n {\n renderOffscreen(request, task, keyPath, props);\n return;\n }\n\n case REACT_SUSPENSE_LIST_TYPE:\n {\n var preiousComponentStack = task.componentStack;\n task.componentStack = createBuiltInComponentStack(task, 'SuspenseList'); // TODO: SuspenseList should control the boundaries.\n\n var _prevKeyPath3 = task.keyPath;\n task.keyPath = keyPath;\n renderNodeDestructive(request, task, props.children, -1);\n task.keyPath = _prevKeyPath3;\n task.componentStack = preiousComponentStack;\n return;\n }\n\n case REACT_SCOPE_TYPE:\n {\n\n throw new Error('ReactDOMServer does not yet support scope components.');\n }\n\n case REACT_SUSPENSE_TYPE:\n {\n {\n renderSuspenseBoundary(request, task, keyPath, props);\n }\n\n return;\n }\n }\n\n if (typeof type === 'object' && type !== null) {\n switch (type.$$typeof) {\n case REACT_FORWARD_REF_TYPE:\n {\n renderForwardRef(request, task, keyPath, type, props, ref);\n return;\n }\n\n case REACT_MEMO_TYPE:\n {\n renderMemo(request, task, keyPath, type, props, ref);\n return;\n }\n\n case REACT_PROVIDER_TYPE:\n {\n {\n var context = type._context;\n renderContextProvider(request, task, keyPath, context, props);\n return;\n } // Fall through\n\n }\n\n case REACT_CONTEXT_TYPE:\n {\n {\n var _context2 = type;\n\n {\n if (_context2._context !== undefined) {\n _context2 = _context2._context;\n }\n }\n\n renderContextConsumer(request, task, keyPath, _context2, props);\n return;\n }\n }\n\n case REACT_CONSUMER_TYPE:\n\n case REACT_LAZY_TYPE:\n {\n renderLazyComponent(request, task, keyPath, type, props);\n return;\n }\n }\n }\n\n var info = '';\n\n {\n if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {\n info += ' You likely forgot to export your component from the file ' + \"it's defined in, or you might have mixed up default and \" + 'named imports.';\n }\n }\n\n throw new Error('Element type is invalid: expected a string (for built-in ' + 'components) or a class/function (for composite components) ' + (\"but got: \" + (type == null ? type : typeof type) + \".\" + info));\n}\n\nfunction resumeNode(request, task, segmentId, node, childIndex) {\n var prevReplay = task.replay;\n var blockedBoundary = task.blockedBoundary;\n var resumedSegment = createPendingSegment(request, 0, null, task.formatContext, false, false);\n resumedSegment.id = segmentId;\n resumedSegment.parentFlushed = true;\n\n try {\n // Convert the current ReplayTask to a RenderTask.\n var renderTask = task;\n renderTask.replay = null;\n renderTask.blockedSegment = resumedSegment;\n renderNode(request, task, node, childIndex);\n resumedSegment.status = COMPLETED;\n\n if (blockedBoundary === null) {\n request.completedRootSegment = resumedSegment;\n } else {\n queueCompletedSegment(blockedBoundary, resumedSegment);\n\n if (blockedBoundary.parentFlushed) {\n request.partialBoundaries.push(blockedBoundary);\n }\n }\n } finally {\n // Restore to a ReplayTask.\n task.replay = prevReplay;\n task.blockedSegment = null;\n }\n}\n\nfunction replayElement(request, task, keyPath, name, keyOrIndex, childIndex, type, props, ref, replay) {\n // We're replaying. Find the path to follow.\n var replayNodes = replay.nodes;\n\n for (var i = 0; i < replayNodes.length; i++) {\n // Flow doesn't support refinement on tuples so we do it manually here.\n var node = replayNodes[i];\n\n if (keyOrIndex !== node[1]) {\n continue;\n }\n\n if (node.length === 4) {\n // Matched a replayable path.\n // Let's double check that the component name matches as a precaution.\n if (name !== null && name !== node[0]) {\n throw new Error('Expected the resume to render <' + node[0] + '> in this slot but instead it rendered <' + name + '>. ' + \"The tree doesn't match so React will fallback to client rendering.\");\n }\n\n var childNodes = node[2];\n var childSlots = node[3];\n var currentNode = task.node;\n task.replay = {\n nodes: childNodes,\n slots: childSlots,\n pendingTasks: 1\n };\n\n try {\n renderElement(request, task, keyPath, type, props, ref);\n\n if (task.replay.pendingTasks === 1 && task.replay.nodes.length > 0 // TODO check remaining slots\n ) {\n throw new Error(\"Couldn't find all resumable slots by key/index during replaying. \" + \"The tree doesn't match so React will fallback to client rendering.\");\n }\n\n task.replay.pendingTasks--;\n } catch (x) {\n if (typeof x === 'object' && x !== null && (x === SuspenseException || typeof x.then === 'function')) {\n // Suspend\n if (task.node === currentNode) {\n // This same element suspended so we need to pop the replay we just added.\n task.replay = replay;\n }\n\n throw x;\n }\n\n task.replay.pendingTasks--; // Unlike regular render, we don't terminate the siblings if we error\n // during a replay. That's because this component didn't actually error\n // in the original prerender. What's unable to complete is the child\n // replay nodes which might be Suspense boundaries which are able to\n // absorb the error and we can still continue with siblings.\n\n var thrownInfo = getThrownInfo(request, task.componentStack);\n erroredReplay(request, task.blockedBoundary, x, thrownInfo, childNodes, childSlots);\n }\n\n task.replay = replay;\n } else {\n // Let's double check that the component type matches.\n if (type !== REACT_SUSPENSE_TYPE) {\n var expectedType = 'Suspense';\n throw new Error('Expected the resume to render <' + expectedType + '> in this slot but instead it rendered <' + (getComponentNameFromType(type) || 'Unknown') + '>. ' + \"The tree doesn't match so React will fallback to client rendering.\");\n } // Matched a replayable path.\n\n\n replaySuspenseBoundary(request, task, keyPath, props, node[5], node[2], node[3], node[4] === null ? [] : node[4][2], node[4] === null ? null : node[4][3]);\n } // We finished rendering this node, so now we can consume this\n // slot. This must happen after in case we rerender this task.\n\n\n replayNodes.splice(i, 1);\n return;\n } // We didn't find any matching nodes. We assume that this element was already\n // rendered in the prelude and skip it.\n\n} // $FlowFixMe[missing-local-annot]\n\n\nfunction validateIterable(iterable, iteratorFn) {\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && iterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (iterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n }\n }\n}\n\nfunction warnOnFunctionType(invalidChild) {\n {\n var name = invalidChild.displayName || invalidChild.name || 'Component';\n\n error('Functions are not valid as a React child. This may happen if ' + 'you return %s instead of <%s /> from render. ' + 'Or maybe you meant to call this function rather than return it.', name, name);\n }\n}\n\nfunction warnOnSymbolType(invalidChild) {\n {\n // eslint-disable-next-line react-internal/safe-string-coercion\n var name = String(invalidChild);\n\n error('Symbols are not valid as a React child.\\n' + ' %s', name);\n }\n} // This function by it self renders a node and consumes the task by mutating it\n// to update the current execution state.\n\n\nfunction renderNodeDestructive(request, task, node, childIndex) {\n if (task.replay !== null && typeof task.replay.slots === 'number') {\n // TODO: Figure out a cheaper place than this hot path to do this check.\n var resumeSegmentID = task.replay.slots;\n resumeNode(request, task, resumeSegmentID, node, childIndex);\n return;\n } // Stash the node we're working on. We'll pick up from this task in case\n // something suspends.\n\n\n task.node = node;\n task.childIndex = childIndex;\n\n if (node === null) {\n return;\n } // Handle object types\n\n\n if (typeof node === 'object') {\n switch (node.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var element = node;\n var type = element.type;\n var key = element.key;\n var props = element.props;\n var ref;\n\n {\n ref = element.ref;\n }\n\n var name = getComponentNameFromType(type);\n var keyOrIndex = key == null ? childIndex === -1 ? 0 : childIndex : key;\n var keyPath = [task.keyPath, name, keyOrIndex];\n\n if (task.replay !== null) {\n replayElement(request, task, keyPath, name, keyOrIndex, childIndex, type, props, ref, task.replay); // No matches found for this node. We assume it's already emitted in the\n // prelude and skip it during the replay.\n } else {\n // We're doing a plain render.\n renderElement(request, task, keyPath, type, props, ref);\n }\n\n return;\n }\n\n case REACT_PORTAL_TYPE:\n throw new Error('Portals are not currently supported by the server renderer. ' + 'Render them conditionally so that they only appear on the client render.');\n\n case REACT_LAZY_TYPE:\n {\n var previousComponentStack = task.componentStack;\n task.componentStack = createBuiltInComponentStack(task, 'Lazy');\n var lazyNode = node;\n var payload = lazyNode._payload;\n var init = lazyNode._init;\n var resolvedNode = init(payload); // We restore the stack before rendering the resolved node because once the Lazy\n // has resolved any future errors\n\n task.componentStack = previousComponentStack; // Now we render the resolved node\n\n renderNodeDestructive(request, task, resolvedNode, childIndex);\n return;\n }\n }\n\n if (isArray(node)) {\n renderChildrenArray(request, task, node, childIndex);\n return;\n }\n\n var iteratorFn = getIteratorFn(node);\n\n if (iteratorFn) {\n {\n validateIterable(node, iteratorFn);\n }\n\n var iterator = iteratorFn.call(node);\n\n if (iterator) {\n // We need to know how many total children are in this set, so that we\n // can allocate enough id slots to acommodate them. So we must exhaust\n // the iterator before we start recursively rendering the children.\n // TODO: This is not great but I think it's inherent to the id\n // generation algorithm.\n var step = iterator.next(); // If there are not entries, we need to push an empty so we start by checking that.\n\n if (!step.done) {\n var children = [];\n\n do {\n children.push(step.value);\n step = iterator.next();\n } while (!step.done);\n\n renderChildrenArray(request, task, children, childIndex);\n return;\n }\n\n return;\n }\n } // Usables are a valid React node type. When React encounters a Usable in\n // a child position, it unwraps it using the same algorithm as `use`. For\n // example, for promises, React will throw an exception to unwind the\n // stack, then replay the component once the promise resolves.\n //\n // A difference from `use` is that React will keep unwrapping the value\n // until it reaches a non-Usable type.\n //\n // e.g. Usable<Usable<Usable<T>>> should resolve to T\n\n\n var maybeUsable = node;\n\n if (typeof maybeUsable.then === 'function') {\n // Clear any previous thenable state that was created by the unwrapping.\n task.thenableState = null;\n var thenable = maybeUsable;\n return renderNodeDestructive(request, task, unwrapThenable(thenable), childIndex);\n }\n\n if (maybeUsable.$$typeof === REACT_CONTEXT_TYPE) {\n var context = maybeUsable;\n return renderNodeDestructive(request, task, readContext$1(context), childIndex);\n } // $FlowFixMe[method-unbinding]\n\n\n var childString = Object.prototype.toString.call(node);\n throw new Error(\"Objects are not valid as a React child (found: \" + (childString === '[object Object]' ? 'object with keys {' + Object.keys(node).join(', ') + '}' : childString) + \"). \" + 'If you meant to render a collection of children, use an array ' + 'instead.');\n }\n\n if (typeof node === 'string') {\n var segment = task.blockedSegment;\n\n if (segment === null) ; else {\n segment.lastPushedText = pushTextInstance(segment.chunks, node, request.renderState, segment.lastPushedText);\n }\n\n return;\n }\n\n if (typeof node === 'number' || enableBigIntSupport ) {\n var _segment = task.blockedSegment;\n\n if (_segment === null) ; else {\n _segment.lastPushedText = pushTextInstance(_segment.chunks, '' + node, request.renderState, _segment.lastPushedText);\n }\n\n return;\n }\n\n {\n if (typeof node === 'function') {\n warnOnFunctionType(node);\n }\n\n if (typeof node === 'symbol') {\n warnOnSymbolType(node);\n }\n }\n}\n\nfunction replayFragment(request, task, children, childIndex) {\n // If we're supposed follow this array, we'd expect to see a ReplayNode matching\n // this fragment.\n var replay = task.replay;\n var replayNodes = replay.nodes;\n\n for (var j = 0; j < replayNodes.length; j++) {\n var node = replayNodes[j];\n\n if (node[1] !== childIndex) {\n continue;\n } // Matched a replayable path.\n\n\n var childNodes = node[2];\n var childSlots = node[3];\n task.replay = {\n nodes: childNodes,\n slots: childSlots,\n pendingTasks: 1\n };\n\n try {\n renderChildrenArray(request, task, children, -1);\n\n if (task.replay.pendingTasks === 1 && task.replay.nodes.length > 0) {\n throw new Error(\"Couldn't find all resumable slots by key/index during replaying. \" + \"The tree doesn't match so React will fallback to client rendering.\");\n }\n\n task.replay.pendingTasks--;\n } catch (x) {\n if (typeof x === 'object' && x !== null && (x === SuspenseException || typeof x.then === 'function')) {\n // Suspend\n throw x;\n }\n\n task.replay.pendingTasks--; // Unlike regular render, we don't terminate the siblings if we error\n // during a replay. That's because this component didn't actually error\n // in the original prerender. What's unable to complete is the child\n // replay nodes which might be Suspense boundaries which are able to\n // absorb the error and we can still continue with siblings.\n // This is an error, stash the component stack if it is null.\n\n var thrownInfo = getThrownInfo(request, task.componentStack);\n erroredReplay(request, task.blockedBoundary, x, thrownInfo, childNodes, childSlots);\n }\n\n task.replay = replay; // We finished rendering this node, so now we can consume this\n // slot. This must happen after in case we rerender this task.\n\n replayNodes.splice(j, 1);\n break;\n }\n}\n\nfunction renderChildrenArray(request, task, children, childIndex) {\n var prevKeyPath = task.keyPath;\n\n if (childIndex !== -1) {\n task.keyPath = [task.keyPath, 'Fragment', childIndex];\n\n if (task.replay !== null) {\n replayFragment(request, // $FlowFixMe: Refined.\n task, children, childIndex);\n task.keyPath = prevKeyPath;\n return;\n }\n }\n\n var prevTreeContext = task.treeContext;\n var totalChildren = children.length;\n\n if (task.replay !== null) {\n // Replay\n // First we need to check if we have any resume slots at this level.\n var resumeSlots = task.replay.slots;\n\n if (resumeSlots !== null && typeof resumeSlots === 'object') {\n for (var i = 0; i < totalChildren; i++) {\n var node = children[i];\n task.treeContext = pushTreeContext(prevTreeContext, totalChildren, i); // We need to use the non-destructive form so that we can safely pop back\n // up and render the sibling if something suspends.\n\n var resumeSegmentID = resumeSlots[i]; // TODO: If this errors we should still continue with the next sibling.\n\n if (typeof resumeSegmentID === 'number') {\n resumeNode(request, task, resumeSegmentID, node, i); // We finished rendering this node, so now we can consume this\n // slot. This must happen after in case we rerender this task.\n\n delete resumeSlots[i];\n } else {\n renderNode(request, task, node, i);\n }\n }\n\n task.treeContext = prevTreeContext;\n task.keyPath = prevKeyPath;\n return;\n }\n }\n\n for (var _i = 0; _i < totalChildren; _i++) {\n var _node = children[_i];\n task.treeContext = pushTreeContext(prevTreeContext, totalChildren, _i); // We need to use the non-destructive form so that we can safely pop back\n // up and render the sibling if something suspends.\n\n renderNode(request, task, _node, _i);\n } // Because this context is always set right before rendering every child, we\n // only need to reset it to the previous value at the very end.\n\n\n task.treeContext = prevTreeContext;\n task.keyPath = prevKeyPath;\n}\n// resume it.\n\n\nfunction untrackBoundary(request, boundary) {\n var trackedPostpones = request.trackedPostpones;\n\n if (trackedPostpones === null) {\n return;\n }\n\n var boundaryKeyPath = boundary.trackedContentKeyPath;\n\n if (boundaryKeyPath === null) {\n return;\n }\n\n var boundaryNode = trackedPostpones.workingMap.get(boundaryKeyPath);\n\n if (boundaryNode === undefined) {\n return;\n } // Downgrade to plain ReplayNode since we won't replay through it.\n // $FlowFixMe[cannot-write]: We intentionally downgrade this to the other tuple.\n\n\n boundaryNode.length = 4; // Remove any resumable slots.\n\n boundaryNode[2] = [];\n boundaryNode[3] = null; // TODO: We should really just remove the boundary from all parent paths too so\n // we don't replay the path to it.\n}\n\nfunction spawnNewSuspendedReplayTask(request, task, thenableState, x) {\n var newTask = createReplayTask(request, thenableState, task.replay, task.node, task.childIndex, task.blockedBoundary, task.hoistableState, task.abortSet, task.keyPath, task.formatContext, task.legacyContext, task.context, task.treeContext, // We pop one task off the stack because the node that suspended will be tried again,\n // which will add it back onto the stack.\n task.componentStack !== null ? task.componentStack.parent : null, task.isFallback);\n var ping = newTask.ping;\n x.then(ping, ping);\n}\n\nfunction spawnNewSuspendedRenderTask(request, task, thenableState, x) {\n // Something suspended, we'll need to create a new segment and resolve it later.\n var segment = task.blockedSegment;\n var insertionIndex = segment.chunks.length;\n var newSegment = createPendingSegment(request, insertionIndex, null, task.formatContext, // Adopt the parent segment's leading text embed\n segment.lastPushedText, // Assume we are text embedded at the trailing edge\n true);\n segment.children.push(newSegment); // Reset lastPushedText for current Segment since the new Segment \"consumed\" it\n\n segment.lastPushedText = false;\n var newTask = createRenderTask(request, thenableState, task.node, task.childIndex, task.blockedBoundary, newSegment, task.hoistableState, task.abortSet, task.keyPath, task.formatContext, task.legacyContext, task.context, task.treeContext, // We pop one task off the stack because the node that suspended will be tried again,\n // which will add it back onto the stack.\n task.componentStack !== null ? task.componentStack.parent : null, task.isFallback);\n var ping = newTask.ping;\n x.then(ping, ping);\n} // This is a non-destructive form of rendering a node. If it suspends it spawns\n// a new task and restores the context of this task to what it was before.\n\n\nfunction renderNode(request, task, node, childIndex) {\n // Snapshot the current context in case something throws to interrupt the\n // process.\n var previousFormatContext = task.formatContext;\n var previousLegacyContext = task.legacyContext;\n var previousContext = task.context;\n var previousKeyPath = task.keyPath;\n var previousTreeContext = task.treeContext;\n var previousComponentStack = task.componentStack;\n var x; // Store how much we've pushed at this point so we can reset it in case something\n // suspended partially through writing something.\n\n var segment = task.blockedSegment;\n\n if (segment === null) {\n // Replay\n try {\n return renderNodeDestructive(request, task, node, childIndex);\n } catch (thrownValue) {\n resetHooksState();\n x = thrownValue === SuspenseException ? // This is a special type of exception used for Suspense. For historical\n // reasons, the rest of the Suspense implementation expects the thrown\n // value to be a thenable, because before `use` existed that was the\n // (unstable) API for suspending. This implementation detail can change\n // later, once we deprecate the old API in favor of `use`.\n getSuspendedThenable() : thrownValue;\n\n if (typeof x === 'object' && x !== null) {\n // $FlowFixMe[method-unbinding]\n if (typeof x.then === 'function') {\n var wakeable = x;\n var thenableState = getThenableStateAfterSuspending();\n spawnNewSuspendedReplayTask(request, // $FlowFixMe: Refined.\n task, thenableState, wakeable); // Restore the context. We assume that this will be restored by the inner\n // functions in case nothing throws so we don't use \"finally\" here.\n\n task.formatContext = previousFormatContext;\n task.legacyContext = previousLegacyContext;\n task.context = previousContext;\n task.keyPath = previousKeyPath;\n task.treeContext = previousTreeContext;\n task.componentStack = previousComponentStack; // Restore all active ReactContexts to what they were before.\n\n switchContext(previousContext);\n return;\n }\n } // TODO: Abort any undiscovered Suspense boundaries in the ReplayNode.\n\n }\n } else {\n // Render\n var childrenLength = segment.children.length;\n var chunkLength = segment.chunks.length;\n\n try {\n return renderNodeDestructive(request, task, node, childIndex);\n } catch (thrownValue) {\n resetHooksState(); // Reset the write pointers to where we started.\n\n segment.children.length = childrenLength;\n segment.chunks.length = chunkLength;\n x = thrownValue === SuspenseException ? // This is a special type of exception used for Suspense. For historical\n // reasons, the rest of the Suspense implementation expects the thrown\n // value to be a thenable, because before `use` existed that was the\n // (unstable) API for suspending. This implementation detail can change\n // later, once we deprecate the old API in favor of `use`.\n getSuspendedThenable() : thrownValue;\n\n if (typeof x === 'object' && x !== null) {\n // $FlowFixMe[method-unbinding]\n if (typeof x.then === 'function') {\n var _wakeable = x;\n\n var _thenableState = getThenableStateAfterSuspending();\n\n spawnNewSuspendedRenderTask(request, // $FlowFixMe: Refined.\n task, _thenableState, _wakeable); // Restore the context. We assume that this will be restored by the inner\n // functions in case nothing throws so we don't use \"finally\" here.\n\n task.formatContext = previousFormatContext;\n task.legacyContext = previousLegacyContext;\n task.context = previousContext;\n task.keyPath = previousKeyPath;\n task.treeContext = previousTreeContext;\n task.componentStack = previousComponentStack; // Restore all active ReactContexts to what they were before.\n\n switchContext(previousContext);\n return;\n }\n }\n }\n } // Restore the context. We assume that this will be restored by the inner\n // functions in case nothing throws so we don't use \"finally\" here.\n\n\n task.formatContext = previousFormatContext;\n task.legacyContext = previousLegacyContext;\n task.context = previousContext;\n task.keyPath = previousKeyPath;\n task.treeContext = previousTreeContext; // We intentionally do not restore the component stack on the error pathway\n // Whatever handles the error needs to use this stack which is the location of the\n // error. We must restore the stack wherever we handle this\n // Restore all active ReactContexts to what they were before.\n\n switchContext(previousContext);\n throw x;\n}\n\nfunction erroredReplay(request, boundary, error, errorInfo, replayNodes, resumeSlots) {\n // Erroring during a replay doesn't actually cause an error by itself because\n // that component has already rendered. What causes the error is the resumable\n // points that we did not yet finish which will be below the point of the reset.\n // For example, if we're replaying a path to a Suspense boundary that is not done\n // that doesn't error the parent Suspense boundary.\n // This might be a bit strange that the error in a parent gets thrown at a child.\n // We log it only once and reuse the digest.\n var errorDigest;\n\n {\n errorDigest = logRecoverableError(request, error, errorInfo);\n }\n\n abortRemainingReplayNodes(request, boundary, replayNodes, resumeSlots, error, errorDigest, errorInfo);\n}\n\nfunction erroredTask(request, boundary, error, errorInfo) {\n // Report the error to a global handler.\n var errorDigest;\n\n {\n errorDigest = logRecoverableError(request, error, errorInfo);\n }\n\n if (boundary === null) {\n fatalError(request, error);\n } else {\n boundary.pendingTasks--;\n\n if (boundary.status !== CLIENT_RENDERED) {\n boundary.status = CLIENT_RENDERED;\n encodeErrorForBoundary(boundary, errorDigest, error, errorInfo);\n untrackBoundary(request, boundary); // Regardless of what happens next, this boundary won't be displayed,\n // so we can flush it, if the parent already flushed.\n\n if (boundary.parentFlushed) {\n // We don't have a preference where in the queue this goes since it's likely\n // to error on the client anyway. However, intentionally client-rendered\n // boundaries should be flushed earlier so that they can start on the client.\n // We reuse the same queue for errors.\n request.clientRenderedBoundaries.push(boundary);\n }\n }\n }\n\n request.allPendingTasks--;\n\n if (request.allPendingTasks === 0) {\n completeAll(request);\n }\n}\n\nfunction abortTaskSoft(task) {\n // This aborts task without aborting the parent boundary that it blocks.\n // It's used for when we didn't need this task to complete the tree.\n // If task was needed, then it should use abortTask instead.\n var request = this;\n var boundary = task.blockedBoundary;\n var segment = task.blockedSegment;\n\n if (segment !== null) {\n segment.status = ABORTED;\n finishedTask(request, boundary, segment);\n }\n}\n\nfunction abortRemainingSuspenseBoundary(request, rootSegmentID, error, errorDigest, errorInfo) {\n var resumedBoundary = createSuspenseBoundary(request, new Set());\n resumedBoundary.parentFlushed = true; // We restore the same id of this boundary as was used during prerender.\n\n resumedBoundary.rootSegmentID = rootSegmentID;\n resumedBoundary.status = CLIENT_RENDERED;\n var errorMessage = error;\n\n {\n var errorPrefix = 'The server did not finish this Suspense boundary: ';\n\n if (error && typeof error.message === 'string') {\n errorMessage = errorPrefix + error.message;\n } else {\n // eslint-disable-next-line react-internal/safe-string-coercion\n errorMessage = errorPrefix + String(error);\n }\n }\n\n encodeErrorForBoundary(resumedBoundary, errorDigest, errorMessage, errorInfo);\n\n if (resumedBoundary.parentFlushed) {\n request.clientRenderedBoundaries.push(resumedBoundary);\n }\n}\n\nfunction abortRemainingReplayNodes(request, boundary, nodes, slots, error, errorDigest, errorInfo) {\n for (var i = 0; i < nodes.length; i++) {\n var node = nodes[i];\n\n if (node.length === 4) {\n abortRemainingReplayNodes(request, boundary, node[2], node[3], error, errorDigest, errorInfo);\n } else {\n var boundaryNode = node;\n var rootSegmentID = boundaryNode[5];\n abortRemainingSuspenseBoundary(request, rootSegmentID, error, errorDigest, errorInfo);\n }\n } // Empty the set, since we've cleared it now.\n\n\n nodes.length = 0;\n\n if (slots !== null) {\n // We had something still to resume in the parent boundary. We must trigger\n // the error on the parent boundary since it's not able to complete.\n if (boundary === null) {\n throw new Error('We should not have any resumable nodes in the shell. ' + 'This is a bug in React.');\n } else if (boundary.status !== CLIENT_RENDERED) {\n boundary.status = CLIENT_RENDERED;\n encodeErrorForBoundary(boundary, errorDigest, error, errorInfo);\n\n if (boundary.parentFlushed) {\n request.clientRenderedBoundaries.push(boundary);\n }\n } // Empty the set\n\n\n if (typeof slots === 'object') {\n for (var index in slots) {\n delete slots[index];\n }\n }\n }\n}\n\nfunction abortTask(task, request, error) {\n // This aborts the task and aborts the parent that it blocks, putting it into\n // client rendered mode.\n var boundary = task.blockedBoundary;\n var segment = task.blockedSegment;\n\n if (segment !== null) {\n segment.status = ABORTED;\n }\n\n if (boundary === null) {\n var errorInfo = {};\n\n if (request.status !== CLOSING && request.status !== CLOSED) {\n var replay = task.replay;\n\n if (replay === null) {\n // We didn't complete the root so we have nothing to show. We can close\n // the request;\n {\n logRecoverableError(request, error, errorInfo);\n fatalError(request, error);\n }\n\n return;\n } else {\n // If the shell aborts during a replay, that's not a fatal error. Instead\n // we should be able to recover by client rendering all the root boundaries in\n // the ReplaySet.\n replay.pendingTasks--;\n\n if (replay.pendingTasks === 0 && replay.nodes.length > 0) {\n var errorDigest;\n\n {\n errorDigest = logRecoverableError(request, error, errorInfo);\n }\n\n abortRemainingReplayNodes(request, null, replay.nodes, replay.slots, error, errorDigest, errorInfo);\n }\n\n request.pendingRootTasks--;\n\n if (request.pendingRootTasks === 0) {\n completeShell(request);\n }\n }\n }\n } else {\n boundary.pendingTasks--;\n\n if (boundary.status !== CLIENT_RENDERED) {\n boundary.status = CLIENT_RENDERED; // We construct an errorInfo from the boundary's componentStack so the error in dev will indicate which\n // boundary the message is referring to\n\n var _errorInfo = getThrownInfo(request, task.componentStack);\n\n var _errorDigest;\n\n {\n _errorDigest = logRecoverableError(request, error, _errorInfo);\n }\n\n var errorMessage = error;\n\n {\n var errorPrefix = 'The server did not finish this Suspense boundary: ';\n\n if (error && typeof error.message === 'string') {\n errorMessage = errorPrefix + error.message;\n } else {\n // eslint-disable-next-line react-internal/safe-string-coercion\n errorMessage = errorPrefix + String(error);\n }\n }\n\n encodeErrorForBoundary(boundary, _errorDigest, errorMessage, _errorInfo);\n untrackBoundary(request, boundary);\n\n if (boundary.parentFlushed) {\n request.clientRenderedBoundaries.push(boundary);\n }\n } // If this boundary was still pending then we haven't already cancelled its fallbacks.\n // We'll need to abort the fallbacks, which will also error that parent boundary.\n\n\n boundary.fallbackAbortableTasks.forEach(function (fallbackTask) {\n return abortTask(fallbackTask, request, error);\n });\n boundary.fallbackAbortableTasks.clear();\n }\n\n request.allPendingTasks--;\n\n if (request.allPendingTasks === 0) {\n completeAll(request);\n }\n}\n\nfunction safelyEmitEarlyPreloads(request, shellComplete) {\n try {\n emitEarlyPreloads(request.renderState, request.resumableState, shellComplete);\n } catch (error) {\n // We assume preloads are optimistic and thus non-fatal if errored.\n var errorInfo = {};\n logRecoverableError(request, error, errorInfo);\n }\n} // I extracted this function out because we want to ensure we consistently emit preloads before\n// transitioning to the next request stage and this transition can happen in multiple places in this\n// implementation.\n\n\nfunction completeShell(request) {\n if (request.trackedPostpones === null) {\n // We only emit early preloads on shell completion for renders. For prerenders\n // we wait for the entire Request to finish because we are not responding to a\n // live request and can wait for as much data as possible.\n // we should only be calling completeShell when the shell is complete so we\n // just use a literal here\n var shellComplete = true;\n safelyEmitEarlyPreloads(request, shellComplete);\n } // We have completed the shell so the shell can't error anymore.\n\n\n request.onShellError = noop;\n var onShellReady = request.onShellReady;\n onShellReady();\n} // I extracted this function out because we want to ensure we consistently emit preloads before\n// transitioning to the next request stage and this transition can happen in multiple places in this\n// implementation.\n\n\nfunction completeAll(request) {\n // During a render the shell must be complete if the entire request is finished\n // however during a Prerender it is possible that the shell is incomplete because\n // it postponed. We cannot use rootPendingTasks in the prerender case because\n // those hit zero even when the shell postpones. Instead we look at the completedRootSegment\n var shellComplete = request.trackedPostpones === null ? // Render, we assume it is completed\n true : // Prerender Request, we use the state of the root segment\n request.completedRootSegment === null || request.completedRootSegment.status !== POSTPONED;\n safelyEmitEarlyPreloads(request, shellComplete);\n var onAllReady = request.onAllReady;\n onAllReady();\n}\n\nfunction queueCompletedSegment(boundary, segment) {\n if (segment.chunks.length === 0 && segment.children.length === 1 && segment.children[0].boundary === null && segment.children[0].id === -1) {\n // This is an empty segment. There's nothing to write, so we can instead transfer the ID\n // to the child. That way any existing references point to the child.\n var childSegment = segment.children[0];\n childSegment.id = segment.id;\n childSegment.parentFlushed = true;\n\n if (childSegment.status === COMPLETED) {\n queueCompletedSegment(boundary, childSegment);\n }\n } else {\n var completedSegments = boundary.completedSegments;\n completedSegments.push(segment);\n }\n}\n\nfunction finishedTask(request, boundary, segment) {\n if (boundary === null) {\n if (segment !== null && segment.parentFlushed) {\n if (request.completedRootSegment !== null) {\n throw new Error('There can only be one root segment. This is a bug in React.');\n }\n\n request.completedRootSegment = segment;\n }\n\n request.pendingRootTasks--;\n\n if (request.pendingRootTasks === 0) {\n completeShell(request);\n }\n } else {\n boundary.pendingTasks--;\n\n if (boundary.status === CLIENT_RENDERED) ; else if (boundary.pendingTasks === 0) {\n if (boundary.status === PENDING) {\n boundary.status = COMPLETED;\n } // This must have been the last segment we were waiting on. This boundary is now complete.\n\n\n if (segment !== null && segment.parentFlushed) {\n // Our parent segment already flushed, so we need to schedule this segment to be emitted.\n // If it is a segment that was aborted, we'll write other content instead so we don't need\n // to emit it.\n if (segment.status === COMPLETED) {\n queueCompletedSegment(boundary, segment);\n }\n }\n\n if (boundary.parentFlushed) {\n // The segment might be part of a segment that didn't flush yet, but if the boundary's\n // parent flushed, we need to schedule the boundary to be emitted.\n request.completedBoundaries.push(boundary);\n } // We can now cancel any pending task on the fallback since we won't need to show it anymore.\n // This needs to happen after we read the parentFlushed flags because aborting can finish\n // work which can trigger user code, which can start flushing, which can change those flags.\n // If the boundary was POSTPONED, we still need to finish the fallback first.\n\n\n if (boundary.status === COMPLETED) {\n boundary.fallbackAbortableTasks.forEach(abortTaskSoft, request);\n boundary.fallbackAbortableTasks.clear();\n }\n } else {\n if (segment !== null && segment.parentFlushed) {\n // Our parent already flushed, so we need to schedule this segment to be emitted.\n // If it is a segment that was aborted, we'll write other content instead so we don't need\n // to emit it.\n if (segment.status === COMPLETED) {\n queueCompletedSegment(boundary, segment);\n var completedSegments = boundary.completedSegments;\n\n if (completedSegments.length === 1) {\n // This is the first time since we last flushed that we completed anything.\n // We can schedule this boundary to emit its partially completed segments early\n // in case the parent has already been flushed.\n if (boundary.parentFlushed) {\n request.partialBoundaries.push(boundary);\n }\n }\n }\n }\n }\n }\n\n request.allPendingTasks--;\n\n if (request.allPendingTasks === 0) {\n completeAll(request);\n }\n}\n\nfunction retryTask(request, task) {\n var segment = task.blockedSegment;\n\n if (segment === null) {\n retryReplayTask(request, // $FlowFixMe: Refined.\n task);\n } else {\n retryRenderTask(request, // $FlowFixMe: Refined.\n task, segment);\n }\n}\n\nfunction retryRenderTask(request, task, segment) {\n if (segment.status !== PENDING) {\n // We completed this by other means before we had a chance to retry it.\n return;\n } // We restore the context to what it was when we suspended.\n // We don't restore it after we leave because it's likely that we'll end up\n // needing a very similar context soon again.\n\n\n switchContext(task.context);\n var prevTaskInDEV = null;\n\n {\n prevTaskInDEV = currentTaskInDEV;\n currentTaskInDEV = task;\n }\n\n var childrenLength = segment.children.length;\n var chunkLength = segment.chunks.length;\n\n try {\n // We call the destructive form that mutates this task. That way if something\n // suspends again, we can reuse the same task instead of spawning a new one.\n renderNodeDestructive(request, task, task.node, task.childIndex);\n pushSegmentFinale(segment.chunks, request.renderState, segment.lastPushedText, segment.textEmbedded);\n task.abortSet.delete(task);\n segment.status = COMPLETED;\n finishedTask(request, task.blockedBoundary, segment);\n } catch (thrownValue) {\n resetHooksState(); // Reset the write pointers to where we started.\n\n segment.children.length = childrenLength;\n segment.chunks.length = chunkLength;\n var x = thrownValue === SuspenseException ? // This is a special type of exception used for Suspense. For historical\n // reasons, the rest of the Suspense implementation expects the thrown\n // value to be a thenable, because before `use` existed that was the\n // (unstable) API for suspending. This implementation detail can change\n // later, once we deprecate the old API in favor of `use`.\n getSuspendedThenable() : thrownValue;\n\n if (typeof x === 'object' && x !== null) {\n // $FlowFixMe[method-unbinding]\n if (typeof x.then === 'function') {\n // Something suspended again, let's pick it back up later.\n var ping = task.ping;\n x.then(ping, ping);\n task.thenableState = getThenableStateAfterSuspending();\n return;\n }\n }\n\n var errorInfo = getThrownInfo(request, task.componentStack);\n task.abortSet.delete(task);\n segment.status = ERRORED;\n erroredTask(request, task.blockedBoundary, x, errorInfo);\n return;\n } finally {\n {\n currentTaskInDEV = prevTaskInDEV;\n }\n }\n}\n\nfunction retryReplayTask(request, task) {\n if (task.replay.pendingTasks === 0) {\n // There are no pending tasks working on this set, so we must have aborted.\n return;\n } // We restore the context to what it was when we suspended.\n // We don't restore it after we leave because it's likely that we'll end up\n // needing a very similar context soon again.\n\n\n switchContext(task.context);\n var prevTaskInDEV = null;\n\n {\n prevTaskInDEV = currentTaskInDEV;\n currentTaskInDEV = task;\n }\n\n try {\n // We call the destructive form that mutates this task. That way if something\n // suspends again, we can reuse the same task instead of spawning a new one.\n renderNodeDestructive(request, task, task.node, task.childIndex);\n\n if (task.replay.pendingTasks === 1 && task.replay.nodes.length > 0) {\n throw new Error(\"Couldn't find all resumable slots by key/index during replaying. \" + \"The tree doesn't match so React will fallback to client rendering.\");\n }\n\n task.replay.pendingTasks--;\n task.abortSet.delete(task);\n finishedTask(request, task.blockedBoundary, null);\n } catch (thrownValue) {\n resetHooksState();\n var x = thrownValue === SuspenseException ? // This is a special type of exception used for Suspense. For historical\n // reasons, the rest of the Suspense implementation expects the thrown\n // value to be a thenable, because before `use` existed that was the\n // (unstable) API for suspending. This implementation detail can change\n // later, once we deprecate the old API in favor of `use`.\n getSuspendedThenable() : thrownValue;\n\n if (typeof x === 'object' && x !== null) {\n // $FlowFixMe[method-unbinding]\n if (typeof x.then === 'function') {\n // Something suspended again, let's pick it back up later.\n var ping = task.ping;\n x.then(ping, ping);\n task.thenableState = getThenableStateAfterSuspending();\n return;\n }\n }\n\n task.replay.pendingTasks--;\n task.abortSet.delete(task);\n var errorInfo = getThrownInfo(request, task.componentStack);\n erroredReplay(request, task.blockedBoundary, x, errorInfo, task.replay.nodes, task.replay.slots);\n request.pendingRootTasks--;\n\n if (request.pendingRootTasks === 0) {\n completeShell(request);\n }\n\n request.allPendingTasks--;\n\n if (request.allPendingTasks === 0) {\n completeAll(request);\n }\n\n return;\n } finally {\n {\n currentTaskInDEV = prevTaskInDEV;\n }\n }\n}\n\nfunction performWork(request) {\n if (request.status === CLOSED) {\n return;\n }\n\n var prevContext = getActiveContext();\n var prevDispatcher = ReactCurrentDispatcher.current;\n ReactCurrentDispatcher.current = HooksDispatcher;\n var prevCacheDispatcher;\n\n {\n prevCacheDispatcher = ReactCurrentCache.current;\n ReactCurrentCache.current = DefaultCacheDispatcher;\n }\n\n var prevRequest = currentRequest;\n currentRequest = request;\n var prevGetCurrentStackImpl;\n\n {\n prevGetCurrentStackImpl = ReactDebugCurrentFrame.getCurrentStack;\n ReactDebugCurrentFrame.getCurrentStack = getCurrentStackInDEV;\n }\n\n var prevResumableState = currentResumableState;\n setCurrentResumableState(request.resumableState);\n\n try {\n var pingedTasks = request.pingedTasks;\n var i;\n\n for (i = 0; i < pingedTasks.length; i++) {\n var task = pingedTasks[i];\n retryTask(request, task);\n }\n\n pingedTasks.splice(0, i);\n\n if (request.destination !== null) {\n flushCompletedQueues(request, request.destination);\n }\n } catch (error) {\n var errorInfo = {};\n logRecoverableError(request, error, errorInfo);\n fatalError(request, error);\n } finally {\n setCurrentResumableState(prevResumableState);\n ReactCurrentDispatcher.current = prevDispatcher;\n\n {\n ReactCurrentCache.current = prevCacheDispatcher;\n }\n\n {\n ReactDebugCurrentFrame.getCurrentStack = prevGetCurrentStackImpl;\n }\n\n if (prevDispatcher === HooksDispatcher) {\n // This means that we were in a reentrant work loop. This could happen\n // in a renderer that supports synchronous work like renderToString,\n // when it's called from within another renderer.\n // Normally we don't bother switching the contexts to their root/default\n // values when leaving because we'll likely need the same or similar\n // context again. However, when we're inside a synchronous loop like this\n // we'll to restore the context to what it was before returning.\n switchContext(prevContext);\n }\n\n currentRequest = prevRequest;\n }\n}\n\nfunction flushPreamble(request, destination, rootSegment) {\n var willFlushAllSegments = request.allPendingTasks === 0 && request.trackedPostpones === null;\n writePreamble(destination, request.resumableState, request.renderState, willFlushAllSegments);\n}\n\nfunction flushSubtree(request, destination, segment, hoistableState) {\n segment.parentFlushed = true;\n\n switch (segment.status) {\n case PENDING:\n {\n // We're emitting a placeholder for this segment to be filled in later.\n // Therefore we'll need to assign it an ID - to refer to it by.\n segment.id = request.nextSegmentId++; // Fallthrough\n }\n\n case POSTPONED:\n {\n var segmentID = segment.id; // When this segment finally completes it won't be embedded in text since it will flush separately\n\n segment.lastPushedText = false;\n segment.textEmbedded = false;\n return writePlaceholder(destination, request.renderState, segmentID);\n }\n\n case COMPLETED:\n {\n segment.status = FLUSHED;\n var r = true;\n var chunks = segment.chunks;\n var chunkIdx = 0;\n var children = segment.children;\n\n for (var childIdx = 0; childIdx < children.length; childIdx++) {\n var nextChild = children[childIdx]; // Write all the chunks up until the next child.\n\n for (; chunkIdx < nextChild.index; chunkIdx++) {\n writeChunk(destination, chunks[chunkIdx]);\n }\n\n r = flushSegment(request, destination, nextChild, hoistableState);\n } // Finally just write all the remaining chunks\n\n\n for (; chunkIdx < chunks.length - 1; chunkIdx++) {\n writeChunk(destination, chunks[chunkIdx]);\n }\n\n if (chunkIdx < chunks.length) {\n r = writeChunkAndReturn(destination, chunks[chunkIdx]);\n }\n\n return r;\n }\n\n default:\n {\n throw new Error('Aborted, errored or already flushed boundaries should not be flushed again. This is a bug in React.');\n }\n }\n}\n\nfunction flushSegment(request, destination, segment, hoistableState) {\n var boundary = segment.boundary;\n\n if (boundary === null) {\n // Not a suspense boundary.\n return flushSubtree(request, destination, segment, hoistableState);\n }\n\n boundary.parentFlushed = true; // This segment is a Suspense boundary. We need to decide whether to\n // emit the content or the fallback now.\n\n if (boundary.status === CLIENT_RENDERED) {\n // Emit a client rendered suspense boundary wrapper.\n // We never queue the inner boundary so we'll never emit its content or partial segments.\n writeStartClientRenderedSuspenseBoundary(destination, request.renderState, boundary.errorDigest, boundary.errorMessage, boundary.errorComponentStack); // Flush the fallback.\n\n flushSubtree(request, destination, segment, hoistableState);\n return writeEndClientRenderedSuspenseBoundary(destination);\n } else if (boundary.status !== COMPLETED) {\n if (boundary.status === PENDING) {\n // For pending boundaries we lazily assign an ID to the boundary\n // and root segment.\n boundary.rootSegmentID = request.nextSegmentId++;\n }\n\n if (boundary.completedSegments.length > 0) {\n // If this is at least partially complete, we can queue it to be partially emitted early.\n request.partialBoundaries.push(boundary);\n } // This boundary is still loading. Emit a pending suspense boundary wrapper.\n\n\n var id = boundary.rootSegmentID;\n writeStartPendingSuspenseBoundary(destination, request.renderState, id); // We are going to flush the fallback so we need to hoist the fallback\n // state to the parent boundary\n\n {\n if (hoistableState) {\n hoistHoistables(hoistableState, boundary.fallbackState);\n }\n } // Flush the fallback.\n\n\n flushSubtree(request, destination, segment, hoistableState);\n return writeEndPendingSuspenseBoundary(destination);\n } else if (boundary.byteSize > request.progressiveChunkSize) {\n // This boundary is large and will be emitted separately so that we can progressively show\n // other content. We add it to the queue during the flush because we have to ensure that\n // the parent flushes first so that there's something to inject it into.\n // We also have to make sure that it's emitted into the queue in a deterministic slot.\n // I.e. we can't insert it here when it completes.\n // Assign an ID to refer to the future content by.\n boundary.rootSegmentID = request.nextSegmentId++;\n request.completedBoundaries.push(boundary); // Emit a pending rendered suspense boundary wrapper.\n\n writeStartPendingSuspenseBoundary(destination, request.renderState, boundary.rootSegmentID); // While we are going to flush the fallback we are going to follow it up with\n // the completed boundary immediately so we make the choice to omit fallback\n // boundary state from the parent since it will be replaced when the boundary\n // flushes later in this pass or in a future flush\n // Flush the fallback.\n\n flushSubtree(request, destination, segment, hoistableState);\n return writeEndPendingSuspenseBoundary(destination);\n } else {\n {\n if (hoistableState) {\n hoistHoistables(hoistableState, boundary.contentState);\n }\n } // We can inline this boundary's content as a complete boundary.\n\n\n writeStartCompletedSuspenseBoundary(destination);\n var completedSegments = boundary.completedSegments;\n\n if (completedSegments.length !== 1) {\n throw new Error('A previously unvisited boundary must have exactly one root segment. This is a bug in React.');\n }\n\n var contentSegment = completedSegments[0];\n flushSegment(request, destination, contentSegment, hoistableState);\n return writeEndCompletedSuspenseBoundary(destination);\n }\n}\n\nfunction flushClientRenderedBoundary(request, destination, boundary) {\n return writeClientRenderBoundaryInstruction(destination, request.resumableState, request.renderState, boundary.rootSegmentID, boundary.errorDigest, boundary.errorMessage, boundary.errorComponentStack);\n}\n\nfunction flushSegmentContainer(request, destination, segment, hoistableState) {\n writeStartSegment(destination, request.renderState, segment.parentFormatContext, segment.id);\n flushSegment(request, destination, segment, hoistableState);\n return writeEndSegment(destination, segment.parentFormatContext);\n}\n\nfunction flushCompletedBoundary(request, destination, boundary) {\n var completedSegments = boundary.completedSegments;\n var i = 0;\n\n for (; i < completedSegments.length; i++) {\n var segment = completedSegments[i];\n flushPartiallyCompletedSegment(request, destination, boundary, segment);\n }\n\n completedSegments.length = 0;\n\n {\n writeHoistablesForBoundary(destination, boundary.contentState, request.renderState);\n }\n\n return writeCompletedBoundaryInstruction(destination, request.resumableState, request.renderState, boundary.rootSegmentID, boundary.contentState);\n}\n\nfunction flushPartialBoundary(request, destination, boundary) {\n var completedSegments = boundary.completedSegments;\n var i = 0;\n\n for (; i < completedSegments.length; i++) {\n var segment = completedSegments[i];\n\n if (!flushPartiallyCompletedSegment(request, destination, boundary, segment)) {\n i++;\n completedSegments.splice(0, i); // Only write as much as the buffer wants. Something higher priority\n // might want to write later.\n\n return false;\n }\n }\n\n completedSegments.splice(0, i);\n\n {\n return writeHoistablesForBoundary(destination, boundary.contentState, request.renderState);\n }\n}\n\nfunction flushPartiallyCompletedSegment(request, destination, boundary, segment) {\n if (segment.status === FLUSHED) {\n // We've already flushed this inline.\n return true;\n }\n\n var hoistableState = boundary.contentState;\n var segmentID = segment.id;\n\n if (segmentID === -1) {\n // This segment wasn't previously referred to. This happens at the root of\n // a boundary. We make kind of a leap here and assume this is the root.\n var rootSegmentID = segment.id = boundary.rootSegmentID;\n\n if (rootSegmentID === -1) {\n throw new Error('A root segment ID must have been assigned by now. This is a bug in React.');\n }\n\n return flushSegmentContainer(request, destination, segment, hoistableState);\n } else if (segmentID === boundary.rootSegmentID) {\n // When we emit postponed boundaries, we might have assigned the ID already\n // but it's still the root segment so we can't inject it into the parent yet.\n return flushSegmentContainer(request, destination, segment, hoistableState);\n } else {\n flushSegmentContainer(request, destination, segment, hoistableState);\n return writeCompletedSegmentInstruction(destination, request.resumableState, request.renderState, segmentID);\n }\n}\n\nfunction flushCompletedQueues(request, destination) {\n beginWriting();\n\n try {\n // The structure of this is to go through each queue one by one and write\n // until the sink tells us to stop. When we should stop, we still finish writing\n // that item fully and then yield. At that point we remove the already completed\n // items up until the point we completed them.\n var i;\n var completedRootSegment = request.completedRootSegment;\n\n if (completedRootSegment !== null) {\n if (completedRootSegment.status === POSTPONED) {\n // We postponed the root, so we write nothing.\n return;\n } else if (request.pendingRootTasks === 0) {\n if (enableFloat) {\n flushPreamble(request, destination, completedRootSegment);\n }\n\n flushSegment(request, destination, completedRootSegment, null);\n request.completedRootSegment = null;\n writeCompletedRoot(destination, request.renderState);\n } else {\n // We haven't flushed the root yet so we don't need to check any other branches further down\n return;\n }\n }\n\n if (enableFloat) {\n writeHoistables(destination, request.resumableState, request.renderState);\n } // We emit client rendering instructions for already emitted boundaries first.\n // This is so that we can signal to the client to start client rendering them as\n // soon as possible.\n\n\n var clientRenderedBoundaries = request.clientRenderedBoundaries;\n\n for (i = 0; i < clientRenderedBoundaries.length; i++) {\n var boundary = clientRenderedBoundaries[i];\n\n if (!flushClientRenderedBoundary(request, destination, boundary)) {\n request.destination = null;\n i++;\n clientRenderedBoundaries.splice(0, i);\n return;\n }\n }\n\n clientRenderedBoundaries.splice(0, i); // Next we emit any complete boundaries. It's better to favor boundaries\n // that are completely done since we can actually show them, than it is to emit\n // any individual segments from a partially complete boundary.\n\n var completedBoundaries = request.completedBoundaries;\n\n for (i = 0; i < completedBoundaries.length; i++) {\n var _boundary = completedBoundaries[i];\n\n if (!flushCompletedBoundary(request, destination, _boundary)) {\n request.destination = null;\n i++;\n completedBoundaries.splice(0, i);\n return;\n }\n }\n\n completedBoundaries.splice(0, i); // Allow anything written so far to flush to the underlying sink before\n // we continue with lower priorities.\n\n completeWriting(destination);\n beginWriting(destination); // TODO: Here we'll emit data used by hydration.\n // Next we emit any segments of any boundaries that are partially complete\n // but not deeply complete.\n\n var partialBoundaries = request.partialBoundaries;\n\n for (i = 0; i < partialBoundaries.length; i++) {\n var _boundary2 = partialBoundaries[i];\n\n if (!flushPartialBoundary(request, destination, _boundary2)) {\n request.destination = null;\n i++;\n partialBoundaries.splice(0, i);\n return;\n }\n }\n\n partialBoundaries.splice(0, i); // Next we check the completed boundaries again. This may have had\n // boundaries added to it in case they were too larged to be inlined.\n // New ones might be added in this loop.\n\n var largeBoundaries = request.completedBoundaries;\n\n for (i = 0; i < largeBoundaries.length; i++) {\n var _boundary3 = largeBoundaries[i];\n\n if (!flushCompletedBoundary(request, destination, _boundary3)) {\n request.destination = null;\n i++;\n largeBoundaries.splice(0, i);\n return;\n }\n }\n\n largeBoundaries.splice(0, i);\n } finally {\n if (request.allPendingTasks === 0 && request.pingedTasks.length === 0 && request.clientRenderedBoundaries.length === 0 && request.completedBoundaries.length === 0 // We don't need to check any partially completed segments because\n // either they have pending task or they're complete.\n ) {\n request.flushScheduled = false;\n\n {\n // We write the trailing tags but only if don't have any data to resume.\n // If we need to resume we'll write the postamble in the resume instead.\n {\n writePostamble(destination, request.resumableState);\n }\n }\n\n completeWriting(destination);\n flushBuffered(destination);\n\n {\n if (request.abortableTasks.size !== 0) {\n error('There was still abortable task at the root when we closed. This is a bug in React.');\n }\n } // We're done.\n\n\n close(destination); // We need to stop flowing now because we do not want any async contexts which might call\n // float methods to initiate any flushes after this point\n\n stopFlowing(request);\n } else {\n completeWriting(destination);\n flushBuffered(destination);\n }\n }\n}\n\nfunction startWork(request) {\n request.flushScheduled = request.destination !== null;\n\n {\n scheduleWork(function () {\n return requestStorage.run(request, performWork, request);\n });\n }\n\n if (request.trackedPostpones === null) {\n // this is either a regular render or a resume. For regular render we want\n // to call emitEarlyPreloads after the first performWork because we want\n // are responding to a live request and need to balance sending something early\n // (i.e. don't want for the shell to finish) but we need something to send.\n // The only implementation of this is for DOM at the moment and during resumes nothing\n // actually emits but the code paths here are the same.\n // During a prerender we don't want to be too aggressive in emitting early preloads\n // because we aren't responding to a live request and we can wait for the prerender to\n // postpone before we emit anything.\n {\n scheduleWork(function () {\n return requestStorage.run(request, enqueueEarlyPreloadsAfterInitialWork, request);\n });\n }\n }\n}\n\nfunction enqueueEarlyPreloadsAfterInitialWork(request) {\n var shellComplete = request.pendingRootTasks === 0;\n safelyEmitEarlyPreloads(request, shellComplete);\n}\n\nfunction enqueueFlush(request) {\n if (request.flushScheduled === false && // If there are pinged tasks we are going to flush anyway after work completes\n request.pingedTasks.length === 0 && // If there is no destination there is nothing we can flush to. A flush will\n // happen when we start flowing again\n request.destination !== null) {\n request.flushScheduled = true;\n scheduleWork(function () {\n // We need to existence check destination again here because it might go away\n // in between the enqueueFlush call and the work execution\n var destination = request.destination;\n\n if (destination) {\n flushCompletedQueues(request, destination);\n } else {\n request.flushScheduled = false;\n }\n });\n }\n} // This function is intented to only be called during the pipe function for the Node builds.\n// The reason we need this is because `renderToPipeableStream` is the only API which allows\n// you to start flowing before the shell is complete and we've had a chance to emit early\n// preloads already. This is really just defensive programming to ensure that we give hosts an\n// opportunity to flush early preloads before streaming begins in case they are in an environment\n// that only supports a single call to emitEarlyPreloads like the DOM renderers. It's unfortunate\n// to put this Node only function directly in ReactFizzServer but it'd be more ackward to factor it\n// by moving the implementation into ReactServerStreamConfigNode and even then we may not be able to\n// eliminate all the wasted branching.\n\n\nfunction prepareForStartFlowingIfBeforeAllReady(request) {\n var shellComplete = request.trackedPostpones === null ? // Render Request, we define shell complete by the pending root tasks\n request.pendingRootTasks === 0 : // Prerender Request, we define shell complete by completedRootSegemtn\n request.completedRootSegment === null ? request.pendingRootTasks === 0 : request.completedRootSegment.status !== POSTPONED;\n safelyEmitEarlyPreloads(request, shellComplete);\n}\nfunction startFlowing(request, destination) {\n if (request.status === CLOSING) {\n request.status = CLOSED;\n closeWithError(destination, request.fatalError);\n return;\n }\n\n if (request.status === CLOSED) {\n return;\n }\n\n if (request.destination !== null) {\n // We're already flowing.\n return;\n }\n\n request.destination = destination;\n\n try {\n flushCompletedQueues(request, destination);\n } catch (error) {\n var errorInfo = {};\n logRecoverableError(request, error, errorInfo);\n fatalError(request, error);\n }\n}\nfunction stopFlowing(request) {\n request.destination = null;\n} // This is called to early terminate a request. It puts all pending boundaries in client rendered state.\n\nfunction abort(request, reason) {\n try {\n var abortableTasks = request.abortableTasks;\n\n if (abortableTasks.size > 0) {\n var error = reason === undefined ? new Error('The render was aborted by the server without a reason.') : reason;\n abortableTasks.forEach(function (task) {\n return abortTask(task, request, error);\n });\n abortableTasks.clear();\n }\n\n if (request.destination !== null) {\n flushCompletedQueues(request, request.destination);\n }\n } catch (error) {\n var errorInfo = {};\n logRecoverableError(request, error, errorInfo);\n fatalError(request, error);\n }\n}\nfunction flushResources(request) {\n enqueueFlush(request);\n}\nfunction getFormState(request) {\n return request.formState;\n}\nfunction getResumableState(request) {\n return request.resumableState;\n}\nfunction getRenderState(request) {\n return request.renderState;\n}\n\nfunction createDrainHandler(destination, request) {\n return function () {\n return startFlowing(request, destination);\n };\n}\n\nfunction createCancelHandler(request, reason) {\n return function () {\n stopFlowing(request); // eslint-disable-next-line react-internal/prod-error-codes\n\n abort(request, new Error(reason));\n };\n}\n\nfunction createRequestImpl(children, options) {\n var resumableState = createResumableState(options ? options.identifierPrefix : undefined, options ? options.unstable_externalRuntimeSrc : undefined, options ? options.bootstrapScriptContent : undefined, options ? options.bootstrapScripts : undefined, options ? options.bootstrapModules : undefined);\n return createRequest(children, resumableState, createRenderState(resumableState, options ? options.nonce : undefined, options ? options.unstable_externalRuntimeSrc : undefined, options ? options.importMap : undefined, options ? options.onHeaders : undefined, options ? options.maxHeadersLength : undefined), createRootFormatContext(options ? options.namespaceURI : undefined), options ? options.progressiveChunkSize : undefined, options ? options.onError : undefined, options ? options.onAllReady : undefined, options ? options.onShellReady : undefined, options ? options.onShellError : undefined, undefined, options ? options.onPostpone : undefined, options ? options.formState : undefined);\n}\n\nfunction renderToPipeableStream(children, options) {\n var request = createRequestImpl(children, options);\n var hasStartedFlowing = false;\n startWork(request);\n return {\n pipe: function (destination) {\n if (hasStartedFlowing) {\n throw new Error('React currently only supports piping to one writable stream.');\n }\n\n hasStartedFlowing = true;\n prepareForStartFlowingIfBeforeAllReady(request);\n startFlowing(request, destination);\n destination.on('drain', createDrainHandler(destination, request));\n destination.on('error', createCancelHandler(request, 'The destination stream errored while writing data.'));\n destination.on('close', createCancelHandler(request, 'The destination stream closed early.'));\n return destination;\n },\n abort: function (reason) {\n abort(request, reason);\n }\n };\n}\n\nexports.renderToPipeableStream = renderToPipeableStream;\nexports.version = ReactVersion;\n })();\n}\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/react-dom/cjs/react-dom-server.node.development.js?", + ); + + /***/ + }, + + /***/ 1557: /***/ (__unused_webpack_module, exports, __webpack_require__) => { + 'use strict'; + eval( + "/**\n * @license React\n * react-dom.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\nif (true) {\n (function() {\n\n 'use strict';\n\n/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\nif (\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart ===\n 'function'\n) {\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());\n}\n var React = __webpack_require__(6540);\nvar Scheduler = __webpack_require__(9982);\n\nfunction noop$3() {}\n\nvar DefaultDispatcher = {\n prefetchDNS: noop$3,\n preconnect: noop$3,\n preload: noop$3,\n preloadModule: noop$3,\n preinitScript: noop$3,\n preinitStyle: noop$3,\n preinitModuleScript: noop$3\n};\nvar Internals = {\n usingClientEntryPoint: false,\n Events: null,\n ReactDOMCurrentDispatcher: {\n current: DefaultDispatcher\n }\n};\n\nvar ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n\nvar suppressWarning = false;\nfunction setSuppressWarning(newSuppressWarning) {\n {\n suppressWarning = newSuppressWarning;\n }\n} // In DEV, calls to console.warn and console.error get replaced\n// by calls to these methods by a Babel plugin.\n//\n// In PROD (or in packages without access to React internals),\n// they are left as they are instead.\n\nfunction warn(format) {\n {\n if (!suppressWarning) {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n printWarning('warn', format, args);\n }\n }\n}\nfunction error(format) {\n {\n if (!suppressWarning) {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n printWarning('error', format, args);\n }\n }\n}\n\nfunction printWarning(level, format, args) {\n // When changing this logic, you might want to also\n // update consoleWithStackDev.www.js as well.\n {\n var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n var stack = ReactDebugCurrentFrame.getStackAddendum();\n\n if (stack !== '') {\n format += '%s';\n args = args.concat([stack]);\n } // eslint-disable-next-line react-internal/safe-string-coercion\n\n\n var argsWithFormat = args.map(function (item) {\n return String(item);\n }); // Careful: RN currently depends on this prefix\n\n argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it\n // breaks IE9: https://github.com/facebook/react/issues/13610\n // eslint-disable-next-line react-internal/no-production-logging\n\n Function.prototype.apply.call(console[level], console, argsWithFormat);\n }\n}\n\n// -----------------------------------------------------------------------------\n// Killswitch\n//\n// Flags that exist solely to turn off a change in case it causes a regression\n// when it rolls out to prod. We should remove these as soon as possible.\n// -----------------------------------------------------------------------------\n// -----------------------------------------------------------------------------\n// Land or remove (moderate effort)\n//\n// Flags that can be probably deleted or landed, but might require extra effort\n// like migrating internal callers or performance testing.\n// -----------------------------------------------------------------------------\n// TODO: Finish rolling out in www\n\nvar enableClientRenderFallbackOnTextMismatch = true;\nvar enableFormActions = true;\nvar enableAsyncActions = true; // Need to remove didTimeout argument from Scheduler before landing\n// Slated for removal in the future (significant effort)\n//\n// These are experiments that didn't work out, and never shipped, but we can't\n// delete from the codebase until we migrate internal callers.\n// -----------------------------------------------------------------------------\n// Add a callback property to suspense to notify which promises are currently\n// in the update queue. This allows reporting and tracing of what is causing\n// the user to see a loading state.\n//\n// Also allows hydration callbacks to fire when a dehydrated boundary gets\n// hydrated or deleted.\n//\n// This will eventually be replaced by the Transition Tracing proposal.\n\nvar enableSuspenseCallback = false; // Experimental Scope support.\n\nvar enableLazyContextPropagation = false; // FB-only usage. The new API has different semantics.\n\nvar enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber\nvar alwaysThrottleRetries = true;\nvar syncLaneExpirationMs = 250;\nvar transitionLaneExpirationMs = 5000; // -----------------------------------------------------------------------------\n// Ready for next major.\n//\n// Alias __NEXT_MAJOR__ to false for easier skimming.\n// -----------------------------------------------------------------------------\n\nvar __NEXT_MAJOR__ = false; // Removes legacy style context\nvar enableBigIntSupport = __NEXT_MAJOR__;\n// React DOM Chopping Block\n//\n// Similar to main Chopping Block but only flags related to React DOM. These are\n// grouped because we will likely batch all of them into a single major release.\n// -----------------------------------------------------------------------------\n// Disable support for comment nodes as React DOM containers. Already disabled\n// in open source, but www codebase still relies on it. Need to remove.\n\nvar disableCommentsAsDOMContainers = true;\n// Debugging and DevTools\n// -----------------------------------------------------------------------------\n// Adds user timing marks for e.g. state updates, suspense, and work loop stuff,\n// for an experimental timeline tool.\n\nvar enableSchedulingProfiler = true; // Helps identify side effects in render-phase lifecycle hooks and setState\n\nvar enableProfilerTimer = true; // Record durations for commit and passive effects phases.\n\nvar enableProfilerCommitHooks = true; // Phase param passed to onRender callback differentiates between an \"update\" and a \"cascading-update\".\n\nvar enableProfilerNestedUpdatePhase = true; // Adds verbose console logging for e.g. state updates, suspense, and work loop\n\nvar assign = Object.assign;\n\nvar ReactCurrentDispatcher$3 = ReactSharedInternals.ReactCurrentDispatcher; // Since the \"not pending\" value is always the same, we can reuse the\n// same object across all transitions.\n\nvar sharedNotPendingObject = {\n pending: false,\n data: null,\n method: null,\n action: null\n};\nvar NotPending = Object.freeze(sharedNotPendingObject) ;\n\nfunction resolveDispatcher() {\n // Copied from react/src/ReactHooks.js. It's the same thing but in a\n // different package.\n var dispatcher = ReactCurrentDispatcher$3.current;\n\n {\n if (dispatcher === null) {\n error('Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for' + ' one of the following reasons:\\n' + '1. You might have mismatching versions of React and the renderer (such as React DOM)\\n' + '2. You might be breaking the Rules of Hooks\\n' + '3. You might have more than one copy of React in the same app\\n' + 'See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.');\n }\n } // Will result in a null access error if accessed outside render phase. We\n // intentionally don't throw our own error because this is in a hot path.\n // Also helps ensure this is inlined.\n\n\n return dispatcher;\n}\n\nfunction useFormStatus() {\n {\n var dispatcher = resolveDispatcher(); // $FlowFixMe[not-a-function] We know this exists because of the feature check above.\n\n return dispatcher.useHostTransitionStatus();\n }\n}\nfunction useFormState(action, initialState, permalink) {\n {\n var dispatcher = resolveDispatcher(); // $FlowFixMe[not-a-function] This is unstable, thus optional\n\n return dispatcher.useFormState(action, initialState, permalink);\n }\n}\n\nvar valueStack = [];\nvar fiberStack;\n\n{\n fiberStack = [];\n}\n\nvar index = -1;\n\nfunction createCursor(defaultValue) {\n return {\n current: defaultValue\n };\n}\n\nfunction pop(cursor, fiber) {\n if (index < 0) {\n {\n error('Unexpected pop.');\n }\n\n return;\n }\n\n {\n if (fiber !== fiberStack[index]) {\n error('Unexpected Fiber popped.');\n }\n }\n\n cursor.current = valueStack[index];\n valueStack[index] = null;\n\n {\n fiberStack[index] = null;\n }\n\n index--;\n}\n\nfunction push(cursor, value, fiber) {\n index++;\n valueStack[index] = cursor.current;\n\n {\n fiberStack[index] = fiber;\n }\n\n cursor.current = value;\n}\n\n// ATTENTION\n// When adding new symbols to this file,\n// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'\n// The Symbol used to tag the ReactElement-like types.\nvar REACT_ELEMENT_TYPE = Symbol.for('react.element');\nvar REACT_PORTAL_TYPE = Symbol.for('react.portal');\nvar REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');\nvar REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');\nvar REACT_PROFILER_TYPE = Symbol.for('react.profiler');\nvar REACT_PROVIDER_TYPE = Symbol.for('react.provider'); // TODO: Delete with enableRenderableContext\n\nvar REACT_CONSUMER_TYPE = Symbol.for('react.consumer');\nvar REACT_CONTEXT_TYPE = Symbol.for('react.context');\nvar REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');\nvar REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');\nvar REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');\nvar REACT_MEMO_TYPE = Symbol.for('react.memo');\nvar REACT_LAZY_TYPE = Symbol.for('react.lazy');\nvar REACT_SCOPE_TYPE = Symbol.for('react.scope');\nvar REACT_DEBUG_TRACING_MODE_TYPE = Symbol.for('react.debug_trace_mode');\nvar REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');\nvar REACT_LEGACY_HIDDEN_TYPE = Symbol.for('react.legacy_hidden');\nvar REACT_CACHE_TYPE = Symbol.for('react.cache');\nvar REACT_TRACING_MARKER_TYPE = Symbol.for('react.tracing_marker');\nvar MAYBE_ITERATOR_SYMBOL = Symbol.iterator;\nvar FAUX_ITERATOR_SYMBOL = '@@iterator';\nfunction getIteratorFn(maybeIterable) {\n if (maybeIterable === null || typeof maybeIterable !== 'object') {\n return null;\n }\n\n var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];\n\n if (typeof maybeIterator === 'function') {\n return maybeIterator;\n }\n\n return null;\n}\n\nvar contextStackCursor$1 = createCursor(null);\nvar contextFiberStackCursor = createCursor(null);\nvar rootInstanceStackCursor = createCursor(null); // Represents the nearest host transition provider (in React DOM, a <form />)\n// NOTE: Since forms cannot be nested, and this feature is only implemented by\n// React DOM, we don't technically need this to be a stack. It could be a single\n// module variable instead.\n\nvar hostTransitionProviderCursor = createCursor(null); // TODO: This should initialize to NotPendingTransition, a constant\n// imported from the fiber config. However, because of a cycle in the module\n// graph, that value isn't defined during this module's initialization. I can't\n// think of a way to work around this without moving that value out of the\n// fiber config. For now, the \"no provider\" case is handled when reading,\n// inside useHostTransitionStatus.\n\nvar HostTransitionContext = {\n $$typeof: REACT_CONTEXT_TYPE,\n Provider: null,\n Consumer: null,\n _currentValue: null,\n _currentValue2: null,\n _threadCount: 0\n};\n\nfunction requiredContext(c) {\n {\n if (c === null) {\n error('Expected host context to exist. This error is likely caused by a bug ' + 'in React. Please file an issue.');\n }\n }\n\n return c;\n}\n\nfunction getCurrentRootHostContainer() {\n return rootInstanceStackCursor.current;\n}\n\nfunction getRootHostContainer() {\n var rootInstance = requiredContext(rootInstanceStackCursor.current);\n return rootInstance;\n}\n\nfunction pushHostContainer(fiber, nextRootInstance) {\n // Push current root instance onto the stack;\n // This allows us to reset root when portals are popped.\n push(rootInstanceStackCursor, nextRootInstance, fiber); // Track the context and the Fiber that provided it.\n // This enables us to pop only Fibers that provide unique contexts.\n\n push(contextFiberStackCursor, fiber, fiber); // Finally, we need to push the host context to the stack.\n // However, we can't just call getRootHostContext() and push it because\n // we'd have a different number of entries on the stack depending on\n // whether getRootHostContext() throws somewhere in renderer code or not.\n // So we push an empty value first. This lets us safely unwind on errors.\n\n push(contextStackCursor$1, null, fiber);\n var nextRootContext = getRootHostContext(nextRootInstance); // Now that we know this function doesn't throw, replace it.\n\n pop(contextStackCursor$1, fiber);\n push(contextStackCursor$1, nextRootContext, fiber);\n}\n\nfunction popHostContainer(fiber) {\n pop(contextStackCursor$1, fiber);\n pop(contextFiberStackCursor, fiber);\n pop(rootInstanceStackCursor, fiber);\n}\n\nfunction getHostContext() {\n var context = requiredContext(contextStackCursor$1.current);\n return context;\n}\n\nfunction pushHostContext(fiber) {\n {\n var stateHook = fiber.memoizedState;\n\n if (stateHook !== null) {\n // Only provide context if this fiber has been upgraded by a host\n // transition. We use the same optimization for regular host context below.\n push(hostTransitionProviderCursor, fiber, fiber);\n }\n }\n\n var context = requiredContext(contextStackCursor$1.current);\n var nextContext = getChildHostContext(context, fiber.type); // Don't push this Fiber's context unless it's unique.\n\n if (context !== nextContext) {\n // Track the context and the Fiber that provided it.\n // This enables us to pop only Fibers that provide unique contexts.\n push(contextFiberStackCursor, fiber, fiber);\n push(contextStackCursor$1, nextContext, fiber);\n }\n}\n\nfunction popHostContext(fiber) {\n if (contextFiberStackCursor.current === fiber) {\n // Do not pop unless this Fiber provided the current context.\n // pushHostContext() only pushes Fibers that provide unique contexts.\n pop(contextStackCursor$1, fiber);\n pop(contextFiberStackCursor, fiber);\n }\n\n {\n if (hostTransitionProviderCursor.current === fiber) {\n // Do not pop unless this Fiber provided the current context. This is mostly\n // a performance optimization, but conveniently it also prevents a potential\n // data race where a host provider is upgraded (i.e. memoizedState becomes\n // non-null) during a concurrent event. This is a bit of a flaw in the way\n // we upgrade host components, but because we're accounting for it here, it\n // should be fine.\n pop(hostTransitionProviderCursor, fiber); // When popping the transition provider, we reset the context value back\n // to `null`. We can do this because you're not allowd to nest forms. If\n // we allowed for multiple nested host transition providers, then we'd\n // need to reset this to the parent provider's status.\n\n {\n HostTransitionContext._currentValue = null;\n }\n }\n }\n}\n\nvar NoFlags$1 =\n/* */\n0;\nvar PerformedWork =\n/* */\n1;\nvar Placement =\n/* */\n2;\nvar DidCapture =\n/* */\n128;\nvar Hydrating =\n/* */\n4096; // You can change the rest (and add more).\n\nvar Update =\n/* */\n4;\n/* Skipped value: 0b0000000000000000000000001000; */\n\nvar ChildDeletion =\n/* */\n16;\nvar ContentReset =\n/* */\n32;\nvar Callback =\n/* */\n64;\n/* Used by DidCapture: 0b0000000000000000000010000000; */\n\nvar ForceClientRender =\n/* */\n256;\nvar Ref =\n/* */\n512;\nvar Snapshot =\n/* */\n1024;\nvar Passive$1 =\n/* */\n2048;\n/* Used by Hydrating: 0b0000000000000001000000000000; */\n\nvar Visibility =\n/* */\n8192;\nvar StoreConsistency =\n/* */\n16384; // It's OK to reuse these bits because these flags are mutually exclusive for\n// different fiber types. We should really be doing this for as many flags as\n// possible, because we're about to run out of bits.\n\nvar ScheduleRetry = StoreConsistency;\nvar ShouldSuspendCommit = Visibility;\nvar DidDefer = ContentReset;\nvar LifecycleEffectMask = Passive$1 | Update | Callback | Ref | Snapshot | StoreConsistency; // Union of all commit flags (flags with the lifetime of a particular commit)\n\nvar HostEffectMask =\n/* */\n32767; // These are not really side effects, but we still reuse this field.\n\nvar Incomplete =\n/* */\n32768;\nvar ShouldCapture =\n/* */\n65536;\nvar ForceUpdateForLegacySuspense =\n/* */\n131072;\nvar Forked =\n/* */\n1048576; // Static tags describe aspects of a fiber that are not specific to a render,\n// e.g. a fiber uses a passive effect (even if there are no updates on this particular render).\n// This enables us to defer more work in the unmount case,\n// since we can defer traversing the tree during layout to look for Passive effects,\n// and instead rely on the static flag as a signal that there may be cleanup work.\n\nvar RefStatic =\n/* */\n2097152;\nvar LayoutStatic =\n/* */\n4194304;\nvar PassiveStatic =\n/* */\n8388608;\nvar MaySuspendCommit =\n/* */\n16777216; // Flag used to identify newly inserted fibers. It isn't reset after commit unlike `Placement`.\n\nvar PlacementDEV =\n/* */\n33554432;\nvar MountLayoutDev =\n/* */\n67108864;\nvar MountPassiveDev =\n/* */\n134217728; // Groups of flags that are used in the commit phase to skip over trees that\n// don't contain effects, by checking subtreeFlags.\n\nvar BeforeMutationMask = // TODO: Remove Update flag from before mutation phase by re-landing Visibility\n// flag logic (see #20043)\nUpdate | Snapshot | (0);\nvar MutationMask = Placement | Update | ChildDeletion | ContentReset | Ref | Hydrating | Visibility;\nvar LayoutMask = Update | Callback | Ref | Visibility; // TODO: Split into PassiveMountMask and PassiveUnmountMask\n\nvar PassiveMask = Passive$1 | Visibility | ChildDeletion; // Union of tags that don't get reset on clones.\n// This allows certain concepts to persist without recalculating them,\n// e.g. whether a subtree contains passive effects or portals.\n\nvar StaticMask = LayoutStatic | PassiveStatic | RefStatic | MaySuspendCommit;\n\n// This module only exists as an ESM wrapper around the external CommonJS\nvar scheduleCallback$3 = Scheduler.unstable_scheduleCallback;\nvar cancelCallback$1 = Scheduler.unstable_cancelCallback;\nvar shouldYield = Scheduler.unstable_shouldYield;\nvar requestPaint = Scheduler.unstable_requestPaint;\nvar now$1 = Scheduler.unstable_now;\nvar getCurrentPriorityLevel = Scheduler.unstable_getCurrentPriorityLevel;\nvar ImmediatePriority = Scheduler.unstable_ImmediatePriority;\nvar UserBlockingPriority = Scheduler.unstable_UserBlockingPriority;\nvar NormalPriority$1 = Scheduler.unstable_NormalPriority;\nvar LowPriority = Scheduler.unstable_LowPriority;\nvar IdlePriority = Scheduler.unstable_IdlePriority; // this doesn't actually exist on the scheduler, but it *does*\n// on scheduler/unstable_mock, which we'll need for internal testing\n\nvar log$1 = Scheduler.log;\nvar unstable_setDisableYieldValue = Scheduler.unstable_setDisableYieldValue;\n\n// Helpers to patch console.logs to avoid logging during side-effect free\n// replaying on render function. This currently only patches the object\n// lazily which won't cover if the log function was extracted eagerly.\n// We could also eagerly patch the method.\nvar disabledDepth = 0;\nvar prevLog;\nvar prevInfo;\nvar prevWarn;\nvar prevError;\nvar prevGroup;\nvar prevGroupCollapsed;\nvar prevGroupEnd;\n\nfunction disabledLog() {}\n\ndisabledLog.__reactDisabledLog = true;\nfunction disableLogs() {\n {\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n prevLog = console.log;\n prevInfo = console.info;\n prevWarn = console.warn;\n prevError = console.error;\n prevGroup = console.group;\n prevGroupCollapsed = console.groupCollapsed;\n prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099\n\n var props = {\n configurable: true,\n enumerable: true,\n value: disabledLog,\n writable: true\n }; // $FlowFixMe[cannot-write] Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n info: props,\n log: props,\n warn: props,\n error: props,\n group: props,\n groupCollapsed: props,\n groupEnd: props\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n disabledDepth++;\n }\n}\nfunction reenableLogs() {\n {\n disabledDepth--;\n\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n var props = {\n configurable: true,\n enumerable: true,\n writable: true\n }; // $FlowFixMe[cannot-write] Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n log: assign({}, props, {\n value: prevLog\n }),\n info: assign({}, props, {\n value: prevInfo\n }),\n warn: assign({}, props, {\n value: prevWarn\n }),\n error: assign({}, props, {\n value: prevError\n }),\n group: assign({}, props, {\n value: prevGroup\n }),\n groupCollapsed: assign({}, props, {\n value: prevGroupCollapsed\n }),\n groupEnd: assign({}, props, {\n value: prevGroupEnd\n })\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n if (disabledDepth < 0) {\n error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');\n }\n }\n}\n\nvar rendererID = null;\nvar injectedHook = null;\nvar injectedProfilingHooks = null;\nvar hasLoggedError = false;\nvar isDevToolsPresent = typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined';\nfunction injectInternals(internals) {\n if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined') {\n // No DevTools\n return false;\n }\n\n var hook = __REACT_DEVTOOLS_GLOBAL_HOOK__;\n\n if (hook.isDisabled) {\n // This isn't a real property on the hook, but it can be set to opt out\n // of DevTools integration and associated warnings and logs.\n // https://github.com/facebook/react/issues/3877\n return true;\n }\n\n if (!hook.supportsFiber) {\n {\n error('The installed version of React DevTools is too old and will not work ' + 'with the current version of React. Please update React DevTools. ' + 'https://react.dev/link/react-devtools');\n } // DevTools exists, even though it doesn't support Fiber.\n\n\n return true;\n }\n\n try {\n if (enableSchedulingProfiler) {\n // Conditionally inject these hooks only if Timeline profiler is supported by this build.\n // This gives DevTools a way to feature detect that isn't tied to version number\n // (since profiling and timeline are controlled by different feature flags).\n internals = assign({}, internals, {\n getLaneLabelMap: getLaneLabelMap,\n injectProfilingHooks: injectProfilingHooks\n });\n }\n\n rendererID = hook.inject(internals); // We have successfully injected, so now it is safe to set up hooks.\n\n injectedHook = hook;\n } catch (err) {\n // Catch all errors because it is unsafe to throw during initialization.\n {\n error('React instrumentation encountered an error: %s.', err);\n }\n }\n\n if (hook.checkDCE) {\n // This is the real DevTools.\n return true;\n } else {\n // This is likely a hook installed by Fast Refresh runtime.\n return false;\n }\n}\nfunction onScheduleRoot(root, children) {\n {\n if (injectedHook && typeof injectedHook.onScheduleFiberRoot === 'function') {\n try {\n injectedHook.onScheduleFiberRoot(rendererID, root, children);\n } catch (err) {\n if (!hasLoggedError) {\n hasLoggedError = true;\n\n error('React instrumentation encountered an error: %s', err);\n }\n }\n }\n }\n}\nfunction onCommitRoot$1(root, eventPriority) {\n if (injectedHook && typeof injectedHook.onCommitFiberRoot === 'function') {\n try {\n var didError = (root.current.flags & DidCapture) === DidCapture;\n\n if (enableProfilerTimer) {\n var schedulerPriority;\n\n switch (eventPriority) {\n case DiscreteEventPriority:\n schedulerPriority = ImmediatePriority;\n break;\n\n case ContinuousEventPriority:\n schedulerPriority = UserBlockingPriority;\n break;\n\n case DefaultEventPriority:\n schedulerPriority = NormalPriority$1;\n break;\n\n case IdleEventPriority:\n schedulerPriority = IdlePriority;\n break;\n\n default:\n schedulerPriority = NormalPriority$1;\n break;\n }\n\n injectedHook.onCommitFiberRoot(rendererID, root, schedulerPriority, didError);\n }\n } catch (err) {\n {\n if (!hasLoggedError) {\n hasLoggedError = true;\n\n error('React instrumentation encountered an error: %s', err);\n }\n }\n }\n }\n}\nfunction onPostCommitRoot(root) {\n if (injectedHook && typeof injectedHook.onPostCommitFiberRoot === 'function') {\n try {\n injectedHook.onPostCommitFiberRoot(rendererID, root);\n } catch (err) {\n {\n if (!hasLoggedError) {\n hasLoggedError = true;\n\n error('React instrumentation encountered an error: %s', err);\n }\n }\n }\n }\n}\nfunction onCommitUnmount(fiber) {\n if (injectedHook && typeof injectedHook.onCommitFiberUnmount === 'function') {\n try {\n injectedHook.onCommitFiberUnmount(rendererID, fiber);\n } catch (err) {\n {\n if (!hasLoggedError) {\n hasLoggedError = true;\n\n error('React instrumentation encountered an error: %s', err);\n }\n }\n }\n }\n}\nfunction setIsStrictModeForDevtools(newIsStrictMode) {\n {\n if (typeof log$1 === 'function') {\n // We're in a test because Scheduler.log only exists\n // in SchedulerMock. To reduce the noise in strict mode tests,\n // suppress warnings and disable scheduler yielding during the double render\n unstable_setDisableYieldValue(newIsStrictMode);\n setSuppressWarning(newIsStrictMode);\n }\n\n if (injectedHook && typeof injectedHook.setStrictMode === 'function') {\n try {\n injectedHook.setStrictMode(rendererID, newIsStrictMode);\n } catch (err) {\n {\n if (!hasLoggedError) {\n hasLoggedError = true;\n\n error('React instrumentation encountered an error: %s', err);\n }\n }\n }\n }\n }\n} // Profiler API hooks\n\nfunction injectProfilingHooks(profilingHooks) {\n injectedProfilingHooks = profilingHooks;\n}\n\nfunction getLaneLabelMap() {\n {\n var map = new Map();\n var lane = 1;\n\n for (var index = 0; index < TotalLanes; index++) {\n var label = getLabelForLane(lane);\n map.set(lane, label);\n lane *= 2;\n }\n\n return map;\n }\n}\n\nfunction markCommitStarted(lanes) {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markCommitStarted === 'function') {\n injectedProfilingHooks.markCommitStarted(lanes);\n }\n }\n}\nfunction markCommitStopped() {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markCommitStopped === 'function') {\n injectedProfilingHooks.markCommitStopped();\n }\n }\n}\nfunction markComponentRenderStarted(fiber) {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentRenderStarted === 'function') {\n injectedProfilingHooks.markComponentRenderStarted(fiber);\n }\n }\n}\nfunction markComponentRenderStopped() {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentRenderStopped === 'function') {\n injectedProfilingHooks.markComponentRenderStopped();\n }\n }\n}\nfunction markComponentPassiveEffectMountStarted(fiber) {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentPassiveEffectMountStarted === 'function') {\n injectedProfilingHooks.markComponentPassiveEffectMountStarted(fiber);\n }\n }\n}\nfunction markComponentPassiveEffectMountStopped() {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentPassiveEffectMountStopped === 'function') {\n injectedProfilingHooks.markComponentPassiveEffectMountStopped();\n }\n }\n}\nfunction markComponentPassiveEffectUnmountStarted(fiber) {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentPassiveEffectUnmountStarted === 'function') {\n injectedProfilingHooks.markComponentPassiveEffectUnmountStarted(fiber);\n }\n }\n}\nfunction markComponentPassiveEffectUnmountStopped() {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentPassiveEffectUnmountStopped === 'function') {\n injectedProfilingHooks.markComponentPassiveEffectUnmountStopped();\n }\n }\n}\nfunction markComponentLayoutEffectMountStarted(fiber) {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentLayoutEffectMountStarted === 'function') {\n injectedProfilingHooks.markComponentLayoutEffectMountStarted(fiber);\n }\n }\n}\nfunction markComponentLayoutEffectMountStopped() {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentLayoutEffectMountStopped === 'function') {\n injectedProfilingHooks.markComponentLayoutEffectMountStopped();\n }\n }\n}\nfunction markComponentLayoutEffectUnmountStarted(fiber) {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentLayoutEffectUnmountStarted === 'function') {\n injectedProfilingHooks.markComponentLayoutEffectUnmountStarted(fiber);\n }\n }\n}\nfunction markComponentLayoutEffectUnmountStopped() {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentLayoutEffectUnmountStopped === 'function') {\n injectedProfilingHooks.markComponentLayoutEffectUnmountStopped();\n }\n }\n}\nfunction markComponentErrored(fiber, thrownValue, lanes) {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentErrored === 'function') {\n injectedProfilingHooks.markComponentErrored(fiber, thrownValue, lanes);\n }\n }\n}\nfunction markComponentSuspended(fiber, wakeable, lanes) {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentSuspended === 'function') {\n injectedProfilingHooks.markComponentSuspended(fiber, wakeable, lanes);\n }\n }\n}\nfunction markLayoutEffectsStarted(lanes) {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markLayoutEffectsStarted === 'function') {\n injectedProfilingHooks.markLayoutEffectsStarted(lanes);\n }\n }\n}\nfunction markLayoutEffectsStopped() {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markLayoutEffectsStopped === 'function') {\n injectedProfilingHooks.markLayoutEffectsStopped();\n }\n }\n}\nfunction markPassiveEffectsStarted(lanes) {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markPassiveEffectsStarted === 'function') {\n injectedProfilingHooks.markPassiveEffectsStarted(lanes);\n }\n }\n}\nfunction markPassiveEffectsStopped() {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markPassiveEffectsStopped === 'function') {\n injectedProfilingHooks.markPassiveEffectsStopped();\n }\n }\n}\nfunction markRenderStarted(lanes) {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markRenderStarted === 'function') {\n injectedProfilingHooks.markRenderStarted(lanes);\n }\n }\n}\nfunction markRenderYielded() {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markRenderYielded === 'function') {\n injectedProfilingHooks.markRenderYielded();\n }\n }\n}\nfunction markRenderStopped() {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markRenderStopped === 'function') {\n injectedProfilingHooks.markRenderStopped();\n }\n }\n}\nfunction markRenderScheduled(lane) {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markRenderScheduled === 'function') {\n injectedProfilingHooks.markRenderScheduled(lane);\n }\n }\n}\nfunction markForceUpdateScheduled(fiber, lane) {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markForceUpdateScheduled === 'function') {\n injectedProfilingHooks.markForceUpdateScheduled(fiber, lane);\n }\n }\n}\nfunction markStateUpdateScheduled(fiber, lane) {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markStateUpdateScheduled === 'function') {\n injectedProfilingHooks.markStateUpdateScheduled(fiber, lane);\n }\n }\n}\n\nvar NoMode =\n/* */\n0; // TODO: Remove ConcurrentMode by reading from the root tag instead\n\nvar ConcurrentMode =\n/* */\n1;\nvar ProfileMode =\n/* */\n2;\nvar StrictLegacyMode =\n/* */\n8;\nvar StrictEffectsMode =\n/* */\n16;\nvar NoStrictPassiveEffectsMode =\n/* */\n64;\n\n// TODO: This is pretty well supported by browsers. Maybe we can drop it.\nvar clz32 = Math.clz32 ? Math.clz32 : clz32Fallback; // Count leading zeros.\n// Based on:\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/clz32\n\nvar log = Math.log;\nvar LN2 = Math.LN2;\n\nfunction clz32Fallback(x) {\n var asUint = x >>> 0;\n\n if (asUint === 0) {\n return 32;\n }\n\n return 31 - (log(asUint) / LN2 | 0) | 0;\n}\n\n// If those values are changed that package should be rebuilt and redeployed.\n\nvar TotalLanes = 31;\nvar NoLanes =\n/* */\n0;\nvar NoLane =\n/* */\n0;\nvar SyncHydrationLane =\n/* */\n1;\nvar SyncLane =\n/* */\n2;\nvar SyncLaneIndex = 1;\nvar InputContinuousHydrationLane =\n/* */\n4;\nvar InputContinuousLane =\n/* */\n8;\nvar DefaultHydrationLane =\n/* */\n16;\nvar DefaultLane =\n/* */\n32;\nvar SyncUpdateLanes = SyncLane | InputContinuousLane | DefaultLane ;\nvar TransitionHydrationLane =\n/* */\n64;\nvar TransitionLanes =\n/* */\n4194176;\nvar TransitionLane1 =\n/* */\n128;\nvar TransitionLane2 =\n/* */\n256;\nvar TransitionLane3 =\n/* */\n512;\nvar TransitionLane4 =\n/* */\n1024;\nvar TransitionLane5 =\n/* */\n2048;\nvar TransitionLane6 =\n/* */\n4096;\nvar TransitionLane7 =\n/* */\n8192;\nvar TransitionLane8 =\n/* */\n16384;\nvar TransitionLane9 =\n/* */\n32768;\nvar TransitionLane10 =\n/* */\n65536;\nvar TransitionLane11 =\n/* */\n131072;\nvar TransitionLane12 =\n/* */\n262144;\nvar TransitionLane13 =\n/* */\n524288;\nvar TransitionLane14 =\n/* */\n1048576;\nvar TransitionLane15 =\n/* */\n2097152;\nvar RetryLanes =\n/* */\n62914560;\nvar RetryLane1 =\n/* */\n4194304;\nvar RetryLane2 =\n/* */\n8388608;\nvar RetryLane3 =\n/* */\n16777216;\nvar RetryLane4 =\n/* */\n33554432;\nvar SomeRetryLane = RetryLane1;\nvar SelectiveHydrationLane =\n/* */\n67108864;\nvar NonIdleLanes =\n/* */\n134217727;\nvar IdleHydrationLane =\n/* */\n134217728;\nvar IdleLane =\n/* */\n268435456;\nvar OffscreenLane =\n/* */\n536870912;\nvar DeferredLane =\n/* */\n1073741824; // Any lane that might schedule an update. This is used to detect infinite\n// update loops, so it doesn't include hydration lanes or retries.\n\nvar UpdateLanes = SyncLane | InputContinuousLane | DefaultLane | TransitionLanes; // This function is used for the experimental timeline (react-devtools-timeline)\n// It should be kept in sync with the Lanes values above.\n\nfunction getLabelForLane(lane) {\n {\n if (lane & SyncHydrationLane) {\n return 'SyncHydrationLane';\n }\n\n if (lane & SyncLane) {\n return 'Sync';\n }\n\n if (lane & InputContinuousHydrationLane) {\n return 'InputContinuousHydration';\n }\n\n if (lane & InputContinuousLane) {\n return 'InputContinuous';\n }\n\n if (lane & DefaultHydrationLane) {\n return 'DefaultHydration';\n }\n\n if (lane & DefaultLane) {\n return 'Default';\n }\n\n if (lane & TransitionHydrationLane) {\n return 'TransitionHydration';\n }\n\n if (lane & TransitionLanes) {\n return 'Transition';\n }\n\n if (lane & RetryLanes) {\n return 'Retry';\n }\n\n if (lane & SelectiveHydrationLane) {\n return 'SelectiveHydration';\n }\n\n if (lane & IdleHydrationLane) {\n return 'IdleHydration';\n }\n\n if (lane & IdleLane) {\n return 'Idle';\n }\n\n if (lane & OffscreenLane) {\n return 'Offscreen';\n }\n\n if (lane & DeferredLane) {\n return 'Deferred';\n }\n }\n}\nvar NoTimestamp = -1;\nvar nextTransitionLane = TransitionLane1;\nvar nextRetryLane = RetryLane1;\n\nfunction getHighestPriorityLanes(lanes) {\n {\n var pendingSyncLanes = lanes & SyncUpdateLanes;\n\n if (pendingSyncLanes !== 0) {\n return pendingSyncLanes;\n }\n }\n\n switch (getHighestPriorityLane(lanes)) {\n case SyncHydrationLane:\n return SyncHydrationLane;\n\n case SyncLane:\n return SyncLane;\n\n case InputContinuousHydrationLane:\n return InputContinuousHydrationLane;\n\n case InputContinuousLane:\n return InputContinuousLane;\n\n case DefaultHydrationLane:\n return DefaultHydrationLane;\n\n case DefaultLane:\n return DefaultLane;\n\n case TransitionHydrationLane:\n return TransitionHydrationLane;\n\n case TransitionLane1:\n case TransitionLane2:\n case TransitionLane3:\n case TransitionLane4:\n case TransitionLane5:\n case TransitionLane6:\n case TransitionLane7:\n case TransitionLane8:\n case TransitionLane9:\n case TransitionLane10:\n case TransitionLane11:\n case TransitionLane12:\n case TransitionLane13:\n case TransitionLane14:\n case TransitionLane15:\n return lanes & TransitionLanes;\n\n case RetryLane1:\n case RetryLane2:\n case RetryLane3:\n case RetryLane4:\n return lanes & RetryLanes;\n\n case SelectiveHydrationLane:\n return SelectiveHydrationLane;\n\n case IdleHydrationLane:\n return IdleHydrationLane;\n\n case IdleLane:\n return IdleLane;\n\n case OffscreenLane:\n return OffscreenLane;\n\n case DeferredLane:\n // This shouldn't be reachable because deferred work is always entangled\n // with something else.\n return NoLanes;\n\n default:\n {\n error('Should have found matching lanes. This is a bug in React.');\n } // This shouldn't be reachable, but as a fallback, return the entire bitmask.\n\n\n return lanes;\n }\n}\n\nfunction getNextLanes(root, wipLanes) {\n // Early bailout if there's no pending work left.\n var pendingLanes = root.pendingLanes;\n\n if (pendingLanes === NoLanes) {\n return NoLanes;\n }\n\n var nextLanes = NoLanes;\n var suspendedLanes = root.suspendedLanes;\n var pingedLanes = root.pingedLanes; // Do not work on any idle work until all the non-idle work has finished,\n // even if the work is suspended.\n\n var nonIdlePendingLanes = pendingLanes & NonIdleLanes;\n\n if (nonIdlePendingLanes !== NoLanes) {\n var nonIdleUnblockedLanes = nonIdlePendingLanes & ~suspendedLanes;\n\n if (nonIdleUnblockedLanes !== NoLanes) {\n nextLanes = getHighestPriorityLanes(nonIdleUnblockedLanes);\n } else {\n var nonIdlePingedLanes = nonIdlePendingLanes & pingedLanes;\n\n if (nonIdlePingedLanes !== NoLanes) {\n nextLanes = getHighestPriorityLanes(nonIdlePingedLanes);\n }\n }\n } else {\n // The only remaining work is Idle.\n var unblockedLanes = pendingLanes & ~suspendedLanes;\n\n if (unblockedLanes !== NoLanes) {\n nextLanes = getHighestPriorityLanes(unblockedLanes);\n } else {\n if (pingedLanes !== NoLanes) {\n nextLanes = getHighestPriorityLanes(pingedLanes);\n }\n }\n }\n\n if (nextLanes === NoLanes) {\n // This should only be reachable if we're suspended\n // TODO: Consider warning in this path if a fallback timer is not scheduled.\n return NoLanes;\n } // If we're already in the middle of a render, switching lanes will interrupt\n // it and we'll lose our progress. We should only do this if the new lanes are\n // higher priority.\n\n\n if (wipLanes !== NoLanes && wipLanes !== nextLanes && // If we already suspended with a delay, then interrupting is fine. Don't\n // bother waiting until the root is complete.\n (wipLanes & suspendedLanes) === NoLanes) {\n var nextLane = getHighestPriorityLane(nextLanes);\n var wipLane = getHighestPriorityLane(wipLanes);\n\n if ( // Tests whether the next lane is equal or lower priority than the wip\n // one. This works because the bits decrease in priority as you go left.\n nextLane >= wipLane || // Default priority updates should not interrupt transition updates. The\n // only difference between default updates and transition updates is that\n // default updates do not support refresh transitions.\n nextLane === DefaultLane && (wipLane & TransitionLanes) !== NoLanes) {\n // Keep working on the existing in-progress tree. Do not interrupt.\n return wipLanes;\n }\n }\n\n return nextLanes;\n}\nfunction getEntangledLanes(root, renderLanes) {\n var entangledLanes = renderLanes;\n\n if ((entangledLanes & InputContinuousLane) !== NoLanes) {\n // When updates are sync by default, we entangle continuous priority updates\n // and default updates, so they render in the same batch. The only reason\n // they use separate lanes is because continuous updates should interrupt\n // transitions, but default updates should not.\n entangledLanes |= entangledLanes & DefaultLane;\n } // Check for entangled lanes and add them to the batch.\n //\n // A lane is said to be entangled with another when it's not allowed to render\n // in a batch that does not also include the other lane. Typically we do this\n // when multiple updates have the same source, and we only want to respond to\n // the most recent event from that source.\n //\n // Note that we apply entanglements *after* checking for partial work above.\n // This means that if a lane is entangled during an interleaved event while\n // it's already rendering, we won't interrupt it. This is intentional, since\n // entanglement is usually \"best effort\": we'll try our best to render the\n // lanes in the same batch, but it's not worth throwing out partially\n // completed work in order to do it.\n // TODO: Reconsider this. The counter-argument is that the partial work\n // represents an intermediate state, which we don't want to show to the user.\n // And by spending extra time finishing it, we're increasing the amount of\n // time it takes to show the final state, which is what they are actually\n // waiting for.\n //\n // For those exceptions where entanglement is semantically important,\n // we should ensure that there is no partial work at the\n // time we apply the entanglement.\n\n\n var allEntangledLanes = root.entangledLanes;\n\n if (allEntangledLanes !== NoLanes) {\n var entanglements = root.entanglements;\n var lanes = entangledLanes & allEntangledLanes;\n\n while (lanes > 0) {\n var index = pickArbitraryLaneIndex(lanes);\n var lane = 1 << index;\n entangledLanes |= entanglements[index];\n lanes &= ~lane;\n }\n }\n\n return entangledLanes;\n}\n\nfunction computeExpirationTime(lane, currentTime) {\n switch (lane) {\n case SyncHydrationLane:\n case SyncLane:\n case InputContinuousHydrationLane:\n case InputContinuousLane:\n // User interactions should expire slightly more quickly.\n //\n // NOTE: This is set to the corresponding constant as in Scheduler.js.\n // When we made it larger, a product metric in www regressed, suggesting\n // there's a user interaction that's being starved by a series of\n // synchronous updates. If that theory is correct, the proper solution is\n // to fix the starvation. However, this scenario supports the idea that\n // expiration times are an important safeguard when starvation\n // does happen.\n return currentTime + syncLaneExpirationMs;\n\n case DefaultHydrationLane:\n case DefaultLane:\n case TransitionHydrationLane:\n case TransitionLane1:\n case TransitionLane2:\n case TransitionLane3:\n case TransitionLane4:\n case TransitionLane5:\n case TransitionLane6:\n case TransitionLane7:\n case TransitionLane8:\n case TransitionLane9:\n case TransitionLane10:\n case TransitionLane11:\n case TransitionLane12:\n case TransitionLane13:\n case TransitionLane14:\n case TransitionLane15:\n return currentTime + transitionLaneExpirationMs;\n\n case RetryLane1:\n case RetryLane2:\n case RetryLane3:\n case RetryLane4:\n // TODO: Retries should be allowed to expire if they are CPU bound for\n // too long, but when I made this change it caused a spike in browser\n // crashes. There must be some other underlying bug; not super urgent but\n // ideally should figure out why and fix it. Unfortunately we don't have\n // a repro for the crashes, only detected via production metrics.\n return NoTimestamp;\n\n case SelectiveHydrationLane:\n case IdleHydrationLane:\n case IdleLane:\n case OffscreenLane:\n case DeferredLane:\n // Anything idle priority or lower should never expire.\n return NoTimestamp;\n\n default:\n {\n error('Should have found matching lanes. This is a bug in React.');\n }\n\n return NoTimestamp;\n }\n}\n\nfunction markStarvedLanesAsExpired(root, currentTime) {\n // TODO: This gets called every time we yield. We can optimize by storing\n // the earliest expiration time on the root. Then use that to quickly bail out\n // of this function.\n var pendingLanes = root.pendingLanes;\n var suspendedLanes = root.suspendedLanes;\n var pingedLanes = root.pingedLanes;\n var expirationTimes = root.expirationTimes; // Iterate through the pending lanes and check if we've reached their\n // expiration time. If so, we'll assume the update is being starved and mark\n // it as expired to force it to finish.\n // TODO: We should be able to replace this with upgradePendingLanesToSync\n //\n // We exclude retry lanes because those must always be time sliced, in order\n // to unwrap uncached promises.\n // TODO: Write a test for this\n\n var lanes = pendingLanes & ~RetryLanes;\n\n while (lanes > 0) {\n var index = pickArbitraryLaneIndex(lanes);\n var lane = 1 << index;\n var expirationTime = expirationTimes[index];\n\n if (expirationTime === NoTimestamp) {\n // Found a pending lane with no expiration time. If it's not suspended, or\n // if it's pinged, assume it's CPU-bound. Compute a new expiration time\n // using the current time.\n if ((lane & suspendedLanes) === NoLanes || (lane & pingedLanes) !== NoLanes) {\n // Assumes timestamps are monotonically increasing.\n expirationTimes[index] = computeExpirationTime(lane, currentTime);\n }\n } else if (expirationTime <= currentTime) {\n // This lane expired\n root.expiredLanes |= lane;\n }\n\n lanes &= ~lane;\n }\n} // This returns the highest priority pending lanes regardless of whether they\n// are suspended.\n\nfunction getHighestPriorityPendingLanes(root) {\n return getHighestPriorityLanes(root.pendingLanes);\n}\nfunction getLanesToRetrySynchronouslyOnError(root, originallyAttemptedLanes) {\n if (root.errorRecoveryDisabledLanes & originallyAttemptedLanes) {\n // The error recovery mechanism is disabled until these lanes are cleared.\n return NoLanes;\n }\n\n var everythingButOffscreen = root.pendingLanes & ~OffscreenLane;\n\n if (everythingButOffscreen !== NoLanes) {\n return everythingButOffscreen;\n }\n\n if (everythingButOffscreen & OffscreenLane) {\n return OffscreenLane;\n }\n\n return NoLanes;\n}\nfunction includesSyncLane(lanes) {\n return (lanes & (SyncLane | SyncHydrationLane)) !== NoLanes;\n}\nfunction includesNonIdleWork(lanes) {\n return (lanes & NonIdleLanes) !== NoLanes;\n}\nfunction includesOnlyRetries(lanes) {\n return (lanes & RetryLanes) === lanes;\n}\nfunction includesOnlyNonUrgentLanes(lanes) {\n // TODO: Should hydration lanes be included here? This function is only\n // used in `updateDeferredValueImpl`.\n var UrgentLanes = SyncLane | InputContinuousLane | DefaultLane;\n return (lanes & UrgentLanes) === NoLanes;\n}\nfunction includesOnlyTransitions(lanes) {\n return (lanes & TransitionLanes) === lanes;\n}\nfunction includesBlockingLane(root, lanes) {\n\n var SyncDefaultLanes = InputContinuousHydrationLane | InputContinuousLane | DefaultHydrationLane | DefaultLane;\n return (lanes & SyncDefaultLanes) !== NoLanes;\n}\nfunction includesExpiredLane(root, lanes) {\n // This is a separate check from includesBlockingLane because a lane can\n // expire after a render has already started.\n return (lanes & root.expiredLanes) !== NoLanes;\n}\nfunction isTransitionLane(lane) {\n return (lane & TransitionLanes) !== NoLanes;\n}\nfunction claimNextTransitionLane() {\n // Cycle through the lanes, assigning each new transition to the next lane.\n // In most cases, this means every transition gets its own lane, until we\n // run out of lanes and cycle back to the beginning.\n var lane = nextTransitionLane;\n nextTransitionLane <<= 1;\n\n if ((nextTransitionLane & TransitionLanes) === NoLanes) {\n nextTransitionLane = TransitionLane1;\n }\n\n return lane;\n}\nfunction claimNextRetryLane() {\n var lane = nextRetryLane;\n nextRetryLane <<= 1;\n\n if ((nextRetryLane & RetryLanes) === NoLanes) {\n nextRetryLane = RetryLane1;\n }\n\n return lane;\n}\nfunction getHighestPriorityLane(lanes) {\n return lanes & -lanes;\n}\nfunction pickArbitraryLane(lanes) {\n // This wrapper function gets inlined. Only exists so to communicate that it\n // doesn't matter which bit is selected; you can pick any bit without\n // affecting the algorithms where its used. Here I'm using\n // getHighestPriorityLane because it requires the fewest operations.\n return getHighestPriorityLane(lanes);\n}\n\nfunction pickArbitraryLaneIndex(lanes) {\n return 31 - clz32(lanes);\n}\n\nfunction laneToIndex(lane) {\n return pickArbitraryLaneIndex(lane);\n}\n\nfunction includesSomeLane(a, b) {\n return (a & b) !== NoLanes;\n}\nfunction isSubsetOfLanes(set, subset) {\n return (set & subset) === subset;\n}\nfunction mergeLanes(a, b) {\n return a | b;\n}\nfunction removeLanes(set, subset) {\n return set & ~subset;\n}\nfunction intersectLanes(a, b) {\n return a & b;\n} // Seems redundant, but it changes the type from a single lane (used for\n// updates) to a group of lanes (used for flushing work).\n\nfunction laneToLanes(lane) {\n return lane;\n}\nfunction higherPriorityLane(a, b) {\n // This works because the bit ranges decrease in priority as you go left.\n return a !== NoLane && a < b ? a : b;\n}\nfunction createLaneMap(initial) {\n // Intentionally pushing one by one.\n // https://v8.dev/blog/elements-kinds#avoid-creating-holes\n var laneMap = [];\n\n for (var i = 0; i < TotalLanes; i++) {\n laneMap.push(initial);\n }\n\n return laneMap;\n}\nfunction markRootUpdated$1(root, updateLane) {\n root.pendingLanes |= updateLane; // If there are any suspended transitions, it's possible this new update\n // could unblock them. Clear the suspended lanes so that we can try rendering\n // them again.\n //\n // TODO: We really only need to unsuspend only lanes that are in the\n // `subtreeLanes` of the updated fiber, or the update lanes of the return\n // path. This would exclude suspended updates in an unrelated sibling tree,\n // since there's no way for this update to unblock it.\n //\n // We don't do this if the incoming update is idle, because we never process\n // idle updates until after all the regular updates have finished; there's no\n // way it could unblock a transition.\n\n if (updateLane !== IdleLane) {\n root.suspendedLanes = NoLanes;\n root.pingedLanes = NoLanes;\n }\n}\nfunction markRootSuspended$1(root, suspendedLanes, spawnedLane) {\n root.suspendedLanes |= suspendedLanes;\n root.pingedLanes &= ~suspendedLanes; // The suspended lanes are no longer CPU-bound. Clear their expiration times.\n\n var expirationTimes = root.expirationTimes;\n var lanes = suspendedLanes;\n\n while (lanes > 0) {\n var index = pickArbitraryLaneIndex(lanes);\n var lane = 1 << index;\n expirationTimes[index] = NoTimestamp;\n lanes &= ~lane;\n }\n\n if (spawnedLane !== NoLane) {\n markSpawnedDeferredLane(root, spawnedLane, suspendedLanes);\n }\n}\nfunction markRootPinged$1(root, pingedLanes) {\n root.pingedLanes |= root.suspendedLanes & pingedLanes;\n}\nfunction markRootFinished(root, remainingLanes, spawnedLane) {\n var noLongerPendingLanes = root.pendingLanes & ~remainingLanes;\n root.pendingLanes = remainingLanes; // Let's try everything again\n\n root.suspendedLanes = NoLanes;\n root.pingedLanes = NoLanes;\n root.expiredLanes &= remainingLanes;\n root.entangledLanes &= remainingLanes;\n root.errorRecoveryDisabledLanes &= remainingLanes;\n root.shellSuspendCounter = 0;\n var entanglements = root.entanglements;\n var expirationTimes = root.expirationTimes;\n var hiddenUpdates = root.hiddenUpdates; // Clear the lanes that no longer have pending work\n\n var lanes = noLongerPendingLanes;\n\n while (lanes > 0) {\n var index = pickArbitraryLaneIndex(lanes);\n var lane = 1 << index;\n entanglements[index] = NoLanes;\n expirationTimes[index] = NoTimestamp;\n var hiddenUpdatesForLane = hiddenUpdates[index];\n\n if (hiddenUpdatesForLane !== null) {\n hiddenUpdates[index] = null; // \"Hidden\" updates are updates that were made to a hidden component. They\n // have special logic associated with them because they may be entangled\n // with updates that occur outside that tree. But once the outer tree\n // commits, they behave like regular updates.\n\n for (var i = 0; i < hiddenUpdatesForLane.length; i++) {\n var update = hiddenUpdatesForLane[i];\n\n if (update !== null) {\n update.lane &= ~OffscreenLane;\n }\n }\n }\n\n lanes &= ~lane;\n }\n\n if (spawnedLane !== NoLane) {\n markSpawnedDeferredLane(root, spawnedLane, // This render finished successfully without suspending, so we don't need\n // to entangle the spawned task with the parent task.\n NoLanes);\n }\n}\n\nfunction markSpawnedDeferredLane(root, spawnedLane, entangledLanes) {\n // This render spawned a deferred task. Mark it as pending.\n root.pendingLanes |= spawnedLane;\n root.suspendedLanes &= ~spawnedLane; // Entangle the spawned lane with the DeferredLane bit so that we know it\n // was the result of another render. This lets us avoid a useDeferredValue\n // waterfall — only the first level will defer.\n\n var spawnedLaneIndex = laneToIndex(spawnedLane);\n root.entangledLanes |= spawnedLane;\n root.entanglements[spawnedLaneIndex] |= DeferredLane | // If the parent render task suspended, we must also entangle those lanes\n // with the spawned task, so that the deferred task includes all the same\n // updates that the parent task did. We can exclude any lane that is not\n // used for updates (e.g. Offscreen).\n entangledLanes & UpdateLanes;\n}\n\nfunction markRootEntangled(root, entangledLanes) {\n // In addition to entangling each of the given lanes with each other, we also\n // have to consider _transitive_ entanglements. For each lane that is already\n // entangled with *any* of the given lanes, that lane is now transitively\n // entangled with *all* the given lanes.\n //\n // Translated: If C is entangled with A, then entangling A with B also\n // entangles C with B.\n //\n // If this is hard to grasp, it might help to intentionally break this\n // function and look at the tests that fail in ReactTransition-test.js. Try\n // commenting out one of the conditions below.\n var rootEntangledLanes = root.entangledLanes |= entangledLanes;\n var entanglements = root.entanglements;\n var lanes = rootEntangledLanes;\n\n while (lanes) {\n var index = pickArbitraryLaneIndex(lanes);\n var lane = 1 << index;\n\n if ( // Is this one of the newly entangled lanes?\n lane & entangledLanes | // Is this lane transitively entangled with the newly entangled lanes?\n entanglements[index] & entangledLanes) {\n entanglements[index] |= entangledLanes;\n }\n\n lanes &= ~lane;\n }\n}\nfunction upgradePendingLaneToSync(root, lane) {\n // Since we're upgrading the priority of the given lane, there is now pending\n // sync work.\n root.pendingLanes |= SyncLane; // Entangle the sync lane with the lane we're upgrading. This means SyncLane\n // will not be allowed to finish without also finishing the given lane.\n\n root.entangledLanes |= SyncLane;\n root.entanglements[SyncLaneIndex] |= lane;\n}\nfunction upgradePendingLanesToSync(root, lanesToUpgrade) {\n // Same as upgradePendingLaneToSync but accepts multiple lanes, so it's a\n // bit slower.\n root.pendingLanes |= SyncLane;\n root.entangledLanes |= SyncLane;\n var lanes = lanesToUpgrade;\n\n while (lanes) {\n var index = pickArbitraryLaneIndex(lanes);\n var lane = 1 << index;\n root.entanglements[SyncLaneIndex] |= lane;\n lanes &= ~lane;\n }\n}\nfunction markHiddenUpdate(root, update, lane) {\n var index = laneToIndex(lane);\n var hiddenUpdates = root.hiddenUpdates;\n var hiddenUpdatesForLane = hiddenUpdates[index];\n\n if (hiddenUpdatesForLane === null) {\n hiddenUpdates[index] = [update];\n } else {\n hiddenUpdatesForLane.push(update);\n }\n\n update.lane = lane | OffscreenLane;\n}\nfunction getBumpedLaneForHydration(root, renderLanes) {\n var renderLane = getHighestPriorityLane(renderLanes);\n var lane;\n\n if ((renderLane & SyncUpdateLanes) !== NoLane) {\n lane = SyncHydrationLane;\n } else {\n switch (renderLane) {\n case SyncLane:\n lane = SyncHydrationLane;\n break;\n\n case InputContinuousLane:\n lane = InputContinuousHydrationLane;\n break;\n\n case DefaultLane:\n lane = DefaultHydrationLane;\n break;\n\n case TransitionLane1:\n case TransitionLane2:\n case TransitionLane3:\n case TransitionLane4:\n case TransitionLane5:\n case TransitionLane6:\n case TransitionLane7:\n case TransitionLane8:\n case TransitionLane9:\n case TransitionLane10:\n case TransitionLane11:\n case TransitionLane12:\n case TransitionLane13:\n case TransitionLane14:\n case TransitionLane15:\n case RetryLane1:\n case RetryLane2:\n case RetryLane3:\n case RetryLane4:\n lane = TransitionHydrationLane;\n break;\n\n case IdleLane:\n lane = IdleHydrationLane;\n break;\n\n default:\n // Everything else is already either a hydration lane, or shouldn't\n // be retried at a hydration lane.\n lane = NoLane;\n break;\n }\n } // Check if the lane we chose is suspended. If so, that indicates that we\n // already attempted and failed to hydrate at that level. Also check if we're\n // already rendering that lane, which is rare but could happen.\n\n\n if ((lane & (root.suspendedLanes | renderLanes)) !== NoLane) {\n // Give up trying to hydrate and fall back to client render.\n return NoLane;\n }\n\n return lane;\n}\nfunction addFiberToLanesMap(root, fiber, lanes) {\n\n if (!isDevToolsPresent) {\n return;\n }\n\n var pendingUpdatersLaneMap = root.pendingUpdatersLaneMap;\n\n while (lanes > 0) {\n var index = laneToIndex(lanes);\n var lane = 1 << index;\n var updaters = pendingUpdatersLaneMap[index];\n updaters.add(fiber);\n lanes &= ~lane;\n }\n}\nfunction movePendingFibersToMemoized(root, lanes) {\n\n if (!isDevToolsPresent) {\n return;\n }\n\n var pendingUpdatersLaneMap = root.pendingUpdatersLaneMap;\n var memoizedUpdaters = root.memoizedUpdaters;\n\n while (lanes > 0) {\n var index = laneToIndex(lanes);\n var lane = 1 << index;\n var updaters = pendingUpdatersLaneMap[index];\n\n if (updaters.size > 0) {\n updaters.forEach(function (fiber) {\n var alternate = fiber.alternate;\n\n if (alternate === null || !memoizedUpdaters.has(alternate)) {\n memoizedUpdaters.add(fiber);\n }\n });\n updaters.clear();\n }\n\n lanes &= ~lane;\n }\n}\nfunction getTransitionsForLanes(root, lanes) {\n {\n return null;\n }\n}\n\nvar DiscreteEventPriority = SyncLane;\nvar ContinuousEventPriority = InputContinuousLane;\nvar DefaultEventPriority = DefaultLane;\nvar IdleEventPriority = IdleLane;\nvar currentUpdatePriority = NoLane;\nfunction getCurrentUpdatePriority() {\n return currentUpdatePriority;\n}\nfunction setCurrentUpdatePriority(newPriority) {\n currentUpdatePriority = newPriority;\n}\nfunction runWithPriority(priority, fn) {\n var previousPriority = currentUpdatePriority;\n\n try {\n currentUpdatePriority = priority;\n return fn();\n } finally {\n currentUpdatePriority = previousPriority;\n }\n}\nfunction higherEventPriority(a, b) {\n return a !== 0 && a < b ? a : b;\n}\nfunction lowerEventPriority(a, b) {\n return a === 0 || a > b ? a : b;\n}\nfunction isHigherEventPriority(a, b) {\n return a !== 0 && a < b;\n}\nfunction lanesToEventPriority(lanes) {\n var lane = getHighestPriorityLane(lanes);\n\n if (!isHigherEventPriority(DiscreteEventPriority, lane)) {\n return DiscreteEventPriority;\n }\n\n if (!isHigherEventPriority(ContinuousEventPriority, lane)) {\n return ContinuousEventPriority;\n }\n\n if (includesNonIdleWork(lane)) {\n return DefaultEventPriority;\n }\n\n return IdleEventPriority;\n}\n\n// $FlowFixMe[method-unbinding]\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\n/*\n * The `'' + value` pattern (used in perf-sensitive code) throws for Symbol\n * and Temporal.* types. See https://github.com/facebook/react/pull/22064.\n *\n * The functions in this module will throw an easier-to-understand,\n * easier-to-debug exception with a clear errors message message explaining the\n * problem. (Instead of a confusing exception thrown inside the implementation\n * of the `value` object).\n */\n// $FlowFixMe[incompatible-return] only called in DEV, so void return is not possible.\nfunction typeName(value) {\n {\n // toStringTag is needed for namespaced types like Temporal.Instant\n var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;\n var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object'; // $FlowFixMe[incompatible-return]\n\n return type;\n }\n} // $FlowFixMe[incompatible-return] only called in DEV, so void return is not possible.\n\n\nfunction willCoercionThrow(value) {\n {\n try {\n testStringCoercion(value);\n return false;\n } catch (e) {\n return true;\n }\n }\n}\n\nfunction testStringCoercion(value) {\n // If you ended up here by following an exception call stack, here's what's\n // happened: you supplied an object or symbol value to React (as a prop, key,\n // DOM attribute, CSS property, string ref, etc.) and when React tried to\n // coerce it to a string using `'' + value`, an exception was thrown.\n //\n // The most common types that will cause this exception are `Symbol` instances\n // and Temporal objects like `Temporal.Instant`. But any object that has a\n // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this\n // exception. (Library authors do this to prevent users from using built-in\n // numeric operators like `+` or comparison operators like `>=` because custom\n // methods are needed to perform accurate arithmetic or comparison.)\n //\n // To fix the problem, coerce this object or symbol value to a string before\n // passing it to React. The most reliable way is usually `String(value)`.\n //\n // To find which value is throwing, check the browser or debugger console.\n // Before this exception was thrown, there should be `console.error` output\n // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the\n // problem and how that type was used: key, atrribute, input value prop, etc.\n // In most cases, this console output also shows the component and its\n // ancestor components where the exception happened.\n //\n // eslint-disable-next-line react-internal/safe-string-coercion\n return '' + value;\n}\n\nfunction checkAttributeStringCoercion(value, attributeName) {\n {\n if (willCoercionThrow(value)) {\n error('The provided `%s` attribute is an unsupported type %s.' + ' This value must be coerced to a string before using it here.', attributeName, typeName(value));\n\n return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n }\n }\n}\nfunction checkKeyStringCoercion(value) {\n {\n if (willCoercionThrow(value)) {\n error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before using it here.', typeName(value));\n\n return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n }\n }\n}\nfunction checkPropStringCoercion(value, propName) {\n {\n if (willCoercionThrow(value)) {\n error('The provided `%s` prop is an unsupported type %s.' + ' This value must be coerced to a string before using it here.', propName, typeName(value));\n\n return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n }\n }\n}\nfunction checkCSSPropertyStringCoercion(value, propName) {\n {\n if (willCoercionThrow(value)) {\n error('The provided `%s` CSS property is an unsupported type %s.' + ' This value must be coerced to a string before using it here.', propName, typeName(value));\n\n return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n }\n }\n}\nfunction checkHtmlStringCoercion(value) {\n {\n if (willCoercionThrow(value)) {\n error('The provided HTML markup uses a value of unsupported type %s.' + ' This value must be coerced to a string before using it here.', typeName(value));\n\n return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n }\n }\n}\nfunction checkFormFieldValueStringCoercion(value) {\n {\n if (willCoercionThrow(value)) {\n error('Form field values (value, checked, defaultValue, or defaultChecked props)' + ' must be strings, not %s.' + ' This value must be coerced to a string before using it here.', typeName(value));\n\n return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n }\n }\n}\n\nvar FunctionComponent = 0;\nvar ClassComponent = 1;\nvar IndeterminateComponent = 2; // Before we know whether it is function or class\n\nvar HostRoot = 3; // Root of a host tree. Could be nested inside another node.\n\nvar HostPortal = 4; // A subtree. Could be an entry point to a different renderer.\n\nvar HostComponent = 5;\nvar HostText = 6;\nvar Fragment = 7;\nvar Mode = 8;\nvar ContextConsumer = 9;\nvar ContextProvider = 10;\nvar ForwardRef = 11;\nvar Profiler = 12;\nvar SuspenseComponent = 13;\nvar MemoComponent = 14;\nvar SimpleMemoComponent = 15;\nvar LazyComponent = 16;\nvar IncompleteClassComponent = 17;\nvar DehydratedFragment = 18;\nvar SuspenseListComponent = 19;\nvar ScopeComponent = 21;\nvar OffscreenComponent = 22;\nvar LegacyHiddenComponent = 23;\nvar CacheComponent = 24;\nvar TracingMarkerComponent = 25;\nvar HostHoistable = 26;\nvar HostSingleton = 27;\n\nvar randomKey = Math.random().toString(36).slice(2);\nvar internalInstanceKey = '__reactFiber$' + randomKey;\nvar internalPropsKey = '__reactProps$' + randomKey;\nvar internalContainerInstanceKey = '__reactContainer$' + randomKey;\nvar internalEventHandlersKey = '__reactEvents$' + randomKey;\nvar internalEventHandlerListenersKey = '__reactListeners$' + randomKey;\nvar internalEventHandlesSetKey = '__reactHandles$' + randomKey;\nvar internalRootNodeResourcesKey = '__reactResources$' + randomKey;\nvar internalHoistableMarker = '__reactMarker$' + randomKey;\nfunction detachDeletedInstance(node) {\n // TODO: This function is only called on host components. I don't think all of\n // these fields are relevant.\n delete node[internalInstanceKey];\n delete node[internalPropsKey];\n delete node[internalEventHandlersKey];\n delete node[internalEventHandlerListenersKey];\n delete node[internalEventHandlesSetKey];\n}\nfunction precacheFiberNode(hostInst, node) {\n node[internalInstanceKey] = hostInst;\n}\nfunction markContainerAsRoot(hostRoot, node) {\n // $FlowFixMe[prop-missing]\n node[internalContainerInstanceKey] = hostRoot;\n}\nfunction unmarkContainerAsRoot(node) {\n // $FlowFixMe[prop-missing]\n node[internalContainerInstanceKey] = null;\n}\nfunction isContainerMarkedAsRoot(node) {\n // $FlowFixMe[prop-missing]\n return !!node[internalContainerInstanceKey];\n} // Given a DOM node, return the closest HostComponent or HostText fiber ancestor.\n// If the target node is part of a hydrated or not yet rendered subtree, then\n// this may also return a SuspenseComponent or HostRoot to indicate that.\n// Conceptually the HostRoot fiber is a child of the Container node. So if you\n// pass the Container node as the targetNode, you will not actually get the\n// HostRoot back. To get to the HostRoot, you need to pass a child of it.\n// The same thing applies to Suspense boundaries.\n\nfunction getClosestInstanceFromNode(targetNode) {\n var targetInst = targetNode[internalInstanceKey];\n\n if (targetInst) {\n // Don't return HostRoot or SuspenseComponent here.\n return targetInst;\n } // If the direct event target isn't a React owned DOM node, we need to look\n // to see if one of its parents is a React owned DOM node.\n\n\n var parentNode = targetNode.parentNode;\n\n while (parentNode) {\n // We'll check if this is a container root that could include\n // React nodes in the future. We need to check this first because\n // if we're a child of a dehydrated container, we need to first\n // find that inner container before moving on to finding the parent\n // instance. Note that we don't check this field on the targetNode\n // itself because the fibers are conceptually between the container\n // node and the first child. It isn't surrounding the container node.\n // If it's not a container, we check if it's an instance.\n targetInst = parentNode[internalContainerInstanceKey] || parentNode[internalInstanceKey];\n\n if (targetInst) {\n // Since this wasn't the direct target of the event, we might have\n // stepped past dehydrated DOM nodes to get here. However they could\n // also have been non-React nodes. We need to answer which one.\n // If we the instance doesn't have any children, then there can't be\n // a nested suspense boundary within it. So we can use this as a fast\n // bailout. Most of the time, when people add non-React children to\n // the tree, it is using a ref to a child-less DOM node.\n // Normally we'd only need to check one of the fibers because if it\n // has ever gone from having children to deleting them or vice versa\n // it would have deleted the dehydrated boundary nested inside already.\n // However, since the HostRoot starts out with an alternate it might\n // have one on the alternate so we need to check in case this was a\n // root.\n var alternate = targetInst.alternate;\n\n if (targetInst.child !== null || alternate !== null && alternate.child !== null) {\n // Next we need to figure out if the node that skipped past is\n // nested within a dehydrated boundary and if so, which one.\n var suspenseInstance = getParentSuspenseInstance(targetNode);\n\n while (suspenseInstance !== null) {\n // We found a suspense instance. That means that we haven't\n // hydrated it yet. Even though we leave the comments in the\n // DOM after hydrating, and there are boundaries in the DOM\n // that could already be hydrated, we wouldn't have found them\n // through this pass since if the target is hydrated it would\n // have had an internalInstanceKey on it.\n // Let's get the fiber associated with the SuspenseComponent\n // as the deepest instance.\n // $FlowFixMe[prop-missing]\n var targetSuspenseInst = suspenseInstance[internalInstanceKey];\n\n if (targetSuspenseInst) {\n return targetSuspenseInst;\n } // If we don't find a Fiber on the comment, it might be because\n // we haven't gotten to hydrate it yet. There might still be a\n // parent boundary that hasn't above this one so we need to find\n // the outer most that is known.\n\n\n suspenseInstance = getParentSuspenseInstance(suspenseInstance); // If we don't find one, then that should mean that the parent\n // host component also hasn't hydrated yet. We can return it\n // below since it will bail out on the isMounted check later.\n }\n }\n\n return targetInst;\n }\n\n targetNode = parentNode;\n parentNode = targetNode.parentNode;\n }\n\n return null;\n}\n/**\n * Given a DOM node, return the ReactDOMComponent or ReactDOMTextComponent\n * instance, or null if the node was not rendered by this React.\n */\n\nfunction getInstanceFromNode(node) {\n var inst = node[internalInstanceKey] || node[internalContainerInstanceKey];\n\n if (inst) {\n var tag = inst.tag;\n\n if (tag === HostComponent || tag === HostText || tag === SuspenseComponent || (tag === HostHoistable ) || tag === HostSingleton || tag === HostRoot) {\n return inst;\n } else {\n return null;\n }\n }\n\n return null;\n}\n/**\n * Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding\n * DOM node.\n */\n\nfunction getNodeFromInstance(inst) {\n var tag = inst.tag;\n\n if (tag === HostComponent || (tag === HostHoistable ) || tag === HostSingleton || tag === HostText) {\n // In Fiber this, is just the state node right now. We assume it will be\n // a host component or host text.\n return inst.stateNode;\n } // Without this first invariant, passing a non-DOM-component triggers the next\n // invariant for a missing parent, which is super confusing.\n\n\n throw new Error('getNodeFromInstance: Invalid argument.');\n}\nfunction getFiberCurrentPropsFromNode(node) {\n return node[internalPropsKey] || null;\n}\nfunction updateFiberProps(node, props) {\n node[internalPropsKey] = props;\n}\nfunction getEventListenerSet(node) {\n var elementListenerSet = node[internalEventHandlersKey];\n\n if (elementListenerSet === undefined) {\n elementListenerSet = node[internalEventHandlersKey] = new Set();\n }\n\n return elementListenerSet;\n}\nfunction getResourcesFromRoot(root) {\n var resources = root[internalRootNodeResourcesKey];\n\n if (!resources) {\n resources = root[internalRootNodeResourcesKey] = {\n hoistableStyles: new Map(),\n hoistableScripts: new Map()\n };\n }\n\n return resources;\n}\nfunction isMarkedHoistable(node) {\n return !!node[internalHoistableMarker];\n}\nfunction markNodeAsHoistable(node) {\n node[internalHoistableMarker] = true;\n}\nfunction isOwnedInstance(node) {\n return !!(node[internalHoistableMarker] || node[internalInstanceKey]);\n}\n\nvar allNativeEvents = new Set();\n/**\n * Mapping from registration name to event name\n */\n\n\nvar registrationNameDependencies = {};\n/**\n * Mapping from lowercase registration names to the properly cased version,\n * used to warn in the case of missing event handlers. Available\n * only in __DEV__.\n * @type {Object}\n */\n\nvar possibleRegistrationNames = {} ; // Trust the developer to only use possibleRegistrationNames in true\n\nfunction registerTwoPhaseEvent(registrationName, dependencies) {\n registerDirectEvent(registrationName, dependencies);\n registerDirectEvent(registrationName + 'Capture', dependencies);\n}\nfunction registerDirectEvent(registrationName, dependencies) {\n {\n if (registrationNameDependencies[registrationName]) {\n error('EventRegistry: More than one plugin attempted to publish the same ' + 'registration name, `%s`.', registrationName);\n }\n }\n\n registrationNameDependencies[registrationName] = dependencies;\n\n {\n var lowerCasedName = registrationName.toLowerCase();\n possibleRegistrationNames[lowerCasedName] = registrationName;\n\n if (registrationName === 'onDoubleClick') {\n possibleRegistrationNames.ondblclick = registrationName;\n }\n }\n\n for (var i = 0; i < dependencies.length; i++) {\n allNativeEvents.add(dependencies[i]);\n }\n}\n\nvar canUseDOM = !!(typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined');\n\nvar hasReadOnlyValue = {\n button: true,\n checkbox: true,\n image: true,\n hidden: true,\n radio: true,\n reset: true,\n submit: true\n};\nfunction checkControlledValueProps(tagName, props) {\n {\n if (!(hasReadOnlyValue[props.type] || props.onChange || props.onInput || props.readOnly || props.disabled || props.value == null)) {\n if (tagName === 'select') {\n error('You provided a `value` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultValue`. Otherwise, set `onChange`.');\n } else {\n error('You provided a `value` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`.');\n }\n }\n\n if (!(props.onChange || props.readOnly || props.disabled || props.checked == null)) {\n error('You provided a `checked` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultChecked`. Otherwise, ' + 'set either `onChange` or `readOnly`.');\n }\n }\n}\n\n/* eslint-disable max-len */\n\nvar ATTRIBUTE_NAME_START_CHAR = \":A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD\";\n/* eslint-enable max-len */\n\nvar ATTRIBUTE_NAME_CHAR = ATTRIBUTE_NAME_START_CHAR + \"\\\\-.0-9\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040\";\nvar VALID_ATTRIBUTE_NAME_REGEX = new RegExp('^[' + ATTRIBUTE_NAME_START_CHAR + '][' + ATTRIBUTE_NAME_CHAR + ']*$');\nvar illegalAttributeNameCache = {};\nvar validatedAttributeNameCache = {};\nfunction isAttributeNameSafe(attributeName) {\n if (hasOwnProperty.call(validatedAttributeNameCache, attributeName)) {\n return true;\n }\n\n if (hasOwnProperty.call(illegalAttributeNameCache, attributeName)) {\n return false;\n }\n\n if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) {\n validatedAttributeNameCache[attributeName] = true;\n return true;\n }\n\n illegalAttributeNameCache[attributeName] = true;\n\n {\n error('Invalid attribute name: `%s`', attributeName);\n }\n\n return false;\n}\n\n/**\n * Get the value for a attribute on a node. Only used in DEV for SSR validation.\n * The third argument is used as a hint of what the expected value is. Some\n * attributes have multiple equivalent values.\n */\n\nfunction getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n\n if (!node.hasAttribute(name)) {\n // shouldRemoveAttribute\n switch (typeof expected) {\n case 'function':\n case 'symbol':\n // eslint-disable-line\n return expected;\n\n case 'boolean':\n {\n var prefix = name.toLowerCase().slice(0, 5);\n\n if (prefix !== 'data-' && prefix !== 'aria-') {\n return expected;\n }\n }\n }\n\n return expected === undefined ? undefined : null;\n }\n\n var value = node.getAttribute(name);\n\n {\n checkAttributeStringCoercion(expected, name);\n }\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n}\nfunction getValueForAttributeOnCustomComponent(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n\n if (!node.hasAttribute(name)) {\n // shouldRemoveAttribute\n switch (typeof expected) {\n case 'symbol':\n case 'object':\n // Symbols and objects are ignored when they're emitted so\n // it would be expected that they end up not having an attribute.\n return expected;\n\n }\n\n return expected === undefined ? undefined : null;\n }\n\n var value = node.getAttribute(name);\n\n {\n checkAttributeStringCoercion(expected, name);\n }\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n}\nfunction setValueForAttribute(node, name, value) {\n if (isAttributeNameSafe(name)) {\n // If the prop isn't in the special list, treat it as a simple attribute.\n // shouldRemoveAttribute\n if (value === null) {\n node.removeAttribute(name);\n return;\n }\n\n switch (typeof value) {\n case 'undefined':\n case 'function':\n case 'symbol':\n // eslint-disable-line\n node.removeAttribute(name);\n return;\n\n case 'boolean':\n {\n var prefix = name.toLowerCase().slice(0, 5);\n\n if (prefix !== 'data-' && prefix !== 'aria-') {\n node.removeAttribute(name);\n return;\n }\n }\n }\n\n {\n checkAttributeStringCoercion(value, name);\n }\n\n node.setAttribute(name, '' + value);\n }\n}\nfunction setValueForKnownAttribute(node, name, value) {\n if (value === null) {\n node.removeAttribute(name);\n return;\n }\n\n switch (typeof value) {\n case 'undefined':\n case 'function':\n case 'symbol':\n case 'boolean':\n {\n node.removeAttribute(name);\n return;\n }\n }\n\n {\n checkAttributeStringCoercion(value, name);\n }\n\n node.setAttribute(name, '' + value);\n}\nfunction setValueForNamespacedAttribute(node, namespace, name, value) {\n if (value === null) {\n node.removeAttribute(name);\n return;\n }\n\n switch (typeof value) {\n case 'undefined':\n case 'function':\n case 'symbol':\n case 'boolean':\n {\n node.removeAttribute(name);\n return;\n }\n }\n\n {\n checkAttributeStringCoercion(value, name);\n }\n\n node.setAttributeNS(namespace, name, '' + value);\n}\n\nvar ReactCurrentDispatcher$2 = ReactSharedInternals.ReactCurrentDispatcher;\nvar prefix;\nfunction describeBuiltInComponentFrame(name, ownerFn) {\n {\n if (prefix === undefined) {\n // Extract the VM specific prefix used by each line.\n try {\n throw Error();\n } catch (x) {\n var match = x.stack.trim().match(/\\n( *(at )?)/);\n prefix = match && match[1] || '';\n }\n } // We use the prefix to ensure our stacks line up with native stack frames.\n\n\n return '\\n' + prefix + name;\n }\n}\nfunction describeDebugInfoFrame(name, env) {\n return describeBuiltInComponentFrame(name + (env ? ' (' + env + ')' : ''));\n}\nvar reentry = false;\nvar componentFrameCache;\n\n{\n var PossiblyWeakMap$1 = typeof WeakMap === 'function' ? WeakMap : Map;\n componentFrameCache = new PossiblyWeakMap$1();\n}\n/**\n * Leverages native browser/VM stack frames to get proper details (e.g.\n * filename, line + col number) for a single component in a component stack. We\n * do this by:\n * (1) throwing and catching an error in the function - this will be our\n * control error.\n * (2) calling the component which will eventually throw an error that we'll\n * catch - this will be our sample error.\n * (3) diffing the control and sample error stacks to find the stack frame\n * which represents our component.\n */\n\n\nfunction describeNativeComponentFrame(fn, construct) {\n // If something asked for a stack inside a fake render, it should get ignored.\n if (!fn || reentry) {\n return '';\n }\n\n {\n var frame = componentFrameCache.get(fn);\n\n if (frame !== undefined) {\n return frame;\n }\n }\n\n reentry = true;\n var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe[incompatible-type] It does accept undefined.\n\n Error.prepareStackTrace = undefined;\n var previousDispatcher;\n\n {\n previousDispatcher = ReactCurrentDispatcher$2.current; // Set the dispatcher in DEV because this might be call in the render function\n // for warnings.\n\n ReactCurrentDispatcher$2.current = null;\n disableLogs();\n }\n /**\n * Finding a common stack frame between sample and control errors can be\n * tricky given the different types and levels of stack trace truncation from\n * different JS VMs. So instead we'll attempt to control what that common\n * frame should be through this object method:\n * Having both the sample and control errors be in the function under the\n * `DescribeNativeComponentFrameRoot` property, + setting the `name` and\n * `displayName` properties of the function ensures that a stack\n * frame exists that has the method name `DescribeNativeComponentFrameRoot` in\n * it for both control and sample stacks.\n */\n\n\n var RunInRootFrame = {\n DetermineComponentFrameRoot: function () {\n var control;\n\n try {\n // This should throw.\n if (construct) {\n // Something should be setting the props in the constructor.\n var Fake = function () {\n throw Error();\n }; // $FlowFixMe[prop-missing]\n\n\n Object.defineProperty(Fake.prototype, 'props', {\n set: function () {\n // We use a throwing setter instead of frozen or non-writable props\n // because that won't throw in a non-strict mode function.\n throw Error();\n }\n });\n\n if (typeof Reflect === 'object' && Reflect.construct) {\n // We construct a different control for this case to include any extra\n // frames added by the construct call.\n try {\n Reflect.construct(Fake, []);\n } catch (x) {\n control = x;\n }\n\n Reflect.construct(fn, [], Fake);\n } else {\n try {\n Fake.call();\n } catch (x) {\n control = x;\n } // $FlowFixMe[prop-missing] found when upgrading Flow\n\n\n fn.call(Fake.prototype);\n }\n } else {\n try {\n throw Error();\n } catch (x) {\n control = x;\n } // TODO(luna): This will currently only throw if the function component\n // tries to access React/ReactDOM/props. We should probably make this throw\n // in simple components too\n\n\n var maybePromise = fn(); // If the function component returns a promise, it's likely an async\n // component, which we don't yet support. Attach a noop catch handler to\n // silence the error.\n // TODO: Implement component stacks for async client components?\n\n if (maybePromise && typeof maybePromise.catch === 'function') {\n maybePromise.catch(function () {});\n }\n }\n } catch (sample) {\n // This is inlined manually because closure doesn't do it for us.\n if (sample && control && typeof sample.stack === 'string') {\n return [sample.stack, control.stack];\n }\n }\n\n return [null, null];\n }\n }; // $FlowFixMe[prop-missing]\n\n RunInRootFrame.DetermineComponentFrameRoot.displayName = 'DetermineComponentFrameRoot';\n var namePropDescriptor = Object.getOwnPropertyDescriptor(RunInRootFrame.DetermineComponentFrameRoot, 'name'); // Before ES6, the `name` property was not configurable.\n\n if (namePropDescriptor && namePropDescriptor.configurable) {\n // V8 utilizes a function's `name` property when generating a stack trace.\n Object.defineProperty(RunInRootFrame.DetermineComponentFrameRoot, // Configurable properties can be updated even if its writable descriptor\n // is set to `false`.\n // $FlowFixMe[cannot-write]\n 'name', {\n value: 'DetermineComponentFrameRoot'\n });\n }\n\n try {\n var _RunInRootFrame$Deter = RunInRootFrame.DetermineComponentFrameRoot(),\n sampleStack = _RunInRootFrame$Deter[0],\n controlStack = _RunInRootFrame$Deter[1];\n\n if (sampleStack && controlStack) {\n // This extracts the first frame from the sample that isn't also in the control.\n // Skipping one frame that we assume is the frame that calls the two.\n var sampleLines = sampleStack.split('\\n');\n var controlLines = controlStack.split('\\n');\n var s = 0;\n var c = 0;\n\n while (s < sampleLines.length && !sampleLines[s].includes('DetermineComponentFrameRoot')) {\n s++;\n }\n\n while (c < controlLines.length && !controlLines[c].includes('DetermineComponentFrameRoot')) {\n c++;\n } // We couldn't find our intentionally injected common root frame, attempt\n // to find another common root frame by search from the bottom of the\n // control stack...\n\n\n if (s === sampleLines.length || c === controlLines.length) {\n s = sampleLines.length - 1;\n c = controlLines.length - 1;\n\n while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {\n // We expect at least one stack frame to be shared.\n // Typically this will be the root most one. However, stack frames may be\n // cut off due to maximum stack limits. In this case, one maybe cut off\n // earlier than the other. We assume that the sample is longer or the same\n // and there for cut off earlier. So we should find the root most frame in\n // the sample somewhere in the control.\n c--;\n }\n }\n\n for (; s >= 1 && c >= 0; s--, c--) {\n // Next we find the first one that isn't the same which should be the\n // frame that called our sample function and the control.\n if (sampleLines[s] !== controlLines[c]) {\n // In V8, the first line is describing the message but other VMs don't.\n // If we're about to return the first line, and the control is also on the same\n // line, that's a pretty good indicator that our sample threw at same line as\n // the control. I.e. before we entered the sample frame. So we ignore this result.\n // This can happen if you passed a class to function component, or non-function.\n if (s !== 1 || c !== 1) {\n do {\n s--;\n c--; // We may still have similar intermediate frames from the construct call.\n // The next one that isn't the same should be our match though.\n\n if (c < 0 || sampleLines[s] !== controlLines[c]) {\n // V8 adds a \"new\" prefix for native classes. Let's remove it to make it prettier.\n var _frame = '\\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled \"<anonymous>\"\n // but we have a user-provided \"displayName\"\n // splice it in to make the stack more readable.\n\n\n if (fn.displayName && _frame.includes('<anonymous>')) {\n _frame = _frame.replace('<anonymous>', fn.displayName);\n }\n\n if (true) {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, _frame);\n }\n } // Return the line we found.\n\n\n return _frame;\n }\n } while (s >= 1 && c >= 0);\n }\n\n break;\n }\n }\n }\n } finally {\n reentry = false;\n\n {\n ReactCurrentDispatcher$2.current = previousDispatcher;\n reenableLogs();\n }\n\n Error.prepareStackTrace = previousPrepareStackTrace;\n } // Fallback to just using the name if we couldn't make it throw.\n\n\n var name = fn ? fn.displayName || fn.name : '';\n var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';\n\n {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, syntheticFrame);\n }\n }\n\n return syntheticFrame;\n}\n\nfunction describeClassComponentFrame(ctor, ownerFn) {\n {\n return describeNativeComponentFrame(ctor, true);\n }\n}\nfunction describeFunctionComponentFrame(fn, ownerFn) {\n {\n return describeNativeComponentFrame(fn, false);\n }\n}\n\nfunction describeFiber(fiber) {\n\n switch (fiber.tag) {\n case HostHoistable:\n case HostSingleton:\n case HostComponent:\n return describeBuiltInComponentFrame(fiber.type);\n\n case LazyComponent:\n return describeBuiltInComponentFrame('Lazy');\n\n case SuspenseComponent:\n return describeBuiltInComponentFrame('Suspense');\n\n case SuspenseListComponent:\n return describeBuiltInComponentFrame('SuspenseList');\n\n case FunctionComponent:\n case IndeterminateComponent:\n case SimpleMemoComponent:\n return describeFunctionComponentFrame(fiber.type);\n\n case ForwardRef:\n return describeFunctionComponentFrame(fiber.type.render);\n\n case ClassComponent:\n return describeClassComponentFrame(fiber.type);\n\n default:\n return '';\n }\n}\n\nfunction getStackByFiberInDevAndProd(workInProgress) {\n try {\n var info = '';\n var node = workInProgress;\n\n do {\n info += describeFiber(node);\n\n if (true) {\n // Add any Server Component stack frames in reverse order.\n var debugInfo = node._debugInfo;\n\n if (debugInfo) {\n for (var i = debugInfo.length - 1; i >= 0; i--) {\n var entry = debugInfo[i];\n\n if (typeof entry.name === 'string') {\n info += describeDebugInfoFrame(entry.name, entry.env);\n }\n }\n }\n } // $FlowFixMe[incompatible-type] we bail out when we get a null\n\n\n node = node.return;\n } while (node);\n\n return info;\n } catch (x) {\n return '\\nError generating stack: ' + x.message + '\\n' + x.stack;\n }\n}\n\nfunction getWrappedName$1(outerType, innerType, wrapperName) {\n var displayName = outerType.displayName;\n\n if (displayName) {\n return displayName;\n }\n\n var functionName = innerType.displayName || innerType.name || '';\n return functionName !== '' ? wrapperName + \"(\" + functionName + \")\" : wrapperName;\n} // Keep in sync with react-reconciler/getComponentNameFromFiber\n\n\nfunction getContextName$1(type) {\n return type.displayName || 'Context';\n}\n\nvar REACT_CLIENT_REFERENCE = Symbol.for('react.client.reference'); // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead.\n\nfunction getComponentNameFromType(type) {\n if (type == null) {\n // Host root, text node or just invalid type.\n return null;\n }\n\n if (typeof type === 'function') {\n if (type.$$typeof === REACT_CLIENT_REFERENCE) {\n // TODO: Create a convention for naming client references with debug info.\n return null;\n }\n\n return type.displayName || type.name || null;\n }\n\n if (typeof type === 'string') {\n return type;\n }\n\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return 'Fragment';\n\n case REACT_PORTAL_TYPE:\n return 'Portal';\n\n case REACT_PROFILER_TYPE:\n return 'Profiler';\n\n case REACT_STRICT_MODE_TYPE:\n return 'StrictMode';\n\n case REACT_SUSPENSE_TYPE:\n return 'Suspense';\n\n case REACT_SUSPENSE_LIST_TYPE:\n return 'SuspenseList';\n\n case REACT_CACHE_TYPE:\n {\n return 'Cache';\n }\n\n }\n\n if (typeof type === 'object') {\n {\n if (typeof type.tag === 'number') {\n error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.');\n }\n }\n\n switch (type.$$typeof) {\n case REACT_PROVIDER_TYPE:\n {\n var provider = type;\n return getContextName$1(provider._context) + '.Provider';\n }\n\n case REACT_CONTEXT_TYPE:\n var context = type;\n\n {\n return getContextName$1(context) + '.Consumer';\n }\n\n case REACT_CONSUMER_TYPE:\n {\n return null;\n }\n\n case REACT_FORWARD_REF_TYPE:\n return getWrappedName$1(type, type.render, 'ForwardRef');\n\n case REACT_MEMO_TYPE:\n var outerName = type.displayName || null;\n\n if (outerName !== null) {\n return outerName;\n }\n\n return getComponentNameFromType(type.type) || 'Memo';\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n return getComponentNameFromType(init(payload));\n } catch (x) {\n return null;\n }\n }\n }\n }\n\n return null;\n}\n\nfunction getWrappedName(outerType, innerType, wrapperName) {\n var functionName = innerType.displayName || innerType.name || '';\n return outerType.displayName || (functionName !== '' ? wrapperName + \"(\" + functionName + \")\" : wrapperName);\n} // Keep in sync with shared/getComponentNameFromType\n\n\nfunction getContextName(type) {\n return type.displayName || 'Context';\n}\n\nfunction getComponentNameFromFiber(fiber) {\n var tag = fiber.tag,\n type = fiber.type;\n\n switch (tag) {\n case CacheComponent:\n return 'Cache';\n\n case ContextConsumer:\n {\n var context = type;\n return getContextName(context) + '.Consumer';\n }\n\n case ContextProvider:\n {\n var provider = type;\n return getContextName(provider._context) + '.Provider';\n }\n\n case DehydratedFragment:\n return 'DehydratedFragment';\n\n case ForwardRef:\n return getWrappedName(type, type.render, 'ForwardRef');\n\n case Fragment:\n return 'Fragment';\n\n case HostHoistable:\n case HostSingleton:\n case HostComponent:\n // Host component type is the display name (e.g. \"div\", \"View\")\n return type;\n\n case HostPortal:\n return 'Portal';\n\n case HostRoot:\n return 'Root';\n\n case HostText:\n return 'Text';\n\n case LazyComponent:\n // Name comes from the type in this case; we don't have a tag.\n return getComponentNameFromType(type);\n\n case Mode:\n if (type === REACT_STRICT_MODE_TYPE) {\n // Don't be less specific than shared/getComponentNameFromType\n return 'StrictMode';\n }\n\n return 'Mode';\n\n case OffscreenComponent:\n return 'Offscreen';\n\n case Profiler:\n return 'Profiler';\n\n case ScopeComponent:\n return 'Scope';\n\n case SuspenseComponent:\n return 'Suspense';\n\n case SuspenseListComponent:\n return 'SuspenseList';\n\n case TracingMarkerComponent:\n return 'TracingMarker';\n // The display name for this tags come from the user-provided type:\n\n case ClassComponent:\n case FunctionComponent:\n case IncompleteClassComponent:\n case IndeterminateComponent:\n case MemoComponent:\n case SimpleMemoComponent:\n if (typeof type === 'function') {\n return type.displayName || type.name || null;\n }\n\n if (typeof type === 'string') {\n return type;\n }\n\n break;\n\n }\n\n return null;\n}\n\nvar ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\nvar current = null;\nvar isRendering = false;\nfunction getCurrentFiberOwnerNameInDevOrNull() {\n {\n if (current === null) {\n return null;\n }\n\n var owner = current._debugOwner;\n\n if (owner !== null && typeof owner !== 'undefined') {\n return getComponentNameFromFiber(owner);\n }\n }\n\n return null;\n}\n\nfunction getCurrentFiberStackInDev() {\n {\n if (current === null) {\n return '';\n } // Safe because if current fiber exists, we are reconciling,\n // and it is guaranteed to be the work-in-progress version.\n\n\n return getStackByFiberInDevAndProd(current);\n }\n}\n\nfunction resetCurrentFiber() {\n {\n ReactDebugCurrentFrame.getCurrentStack = null;\n current = null;\n isRendering = false;\n }\n}\nfunction setCurrentFiber(fiber) {\n {\n ReactDebugCurrentFrame.getCurrentStack = fiber === null ? null : getCurrentFiberStackInDev;\n current = fiber;\n isRendering = false;\n }\n}\nfunction getCurrentFiber() {\n {\n return current;\n }\n}\nfunction setIsRendering(rendering) {\n {\n isRendering = rendering;\n }\n}\n\n// around this limitation, we use an opaque type that can only be obtained by\n// passing the value through getToStringValue first.\n\nfunction toString(value) {\n // The coercion safety check is performed in getToStringValue().\n // eslint-disable-next-line react-internal/safe-string-coercion\n return '' + value;\n}\nfunction getToStringValue(value) {\n switch (typeof value) {\n case 'bigint':\n {\n // bigint is assigned as empty string\n return '';\n }\n\n // fallthrough for BigInt support\n\n case 'boolean':\n case 'number':\n case 'string':\n case 'undefined':\n return value;\n\n case 'object':\n {\n checkFormFieldValueStringCoercion(value);\n }\n\n return value;\n\n default:\n // function, symbol are assigned as empty strings\n return '';\n }\n}\n\nfunction isCheckable(elem) {\n var type = elem.type;\n var nodeName = elem.nodeName;\n return nodeName && nodeName.toLowerCase() === 'input' && (type === 'checkbox' || type === 'radio');\n}\n\nfunction getTracker(node) {\n return node._valueTracker;\n}\n\nfunction detachTracker(node) {\n node._valueTracker = null;\n}\n\nfunction getValueFromNode(node) {\n var value = '';\n\n if (!node) {\n return value;\n }\n\n if (isCheckable(node)) {\n value = node.checked ? 'true' : 'false';\n } else {\n value = node.value;\n }\n\n return value;\n}\n\nfunction trackValueOnNode(node) {\n var valueField = isCheckable(node) ? 'checked' : 'value';\n var descriptor = Object.getOwnPropertyDescriptor(node.constructor.prototype, valueField);\n\n {\n checkFormFieldValueStringCoercion(node[valueField]);\n }\n\n var currentValue = '' + node[valueField]; // if someone has already defined a value or Safari, then bail\n // and don't track value will cause over reporting of changes,\n // but it's better then a hard failure\n // (needed for certain tests that spyOn input values and Safari)\n\n if (node.hasOwnProperty(valueField) || typeof descriptor === 'undefined' || typeof descriptor.get !== 'function' || typeof descriptor.set !== 'function') {\n return;\n }\n\n var get = descriptor.get,\n set = descriptor.set;\n Object.defineProperty(node, valueField, {\n configurable: true,\n // $FlowFixMe[missing-this-annot]\n get: function () {\n return get.call(this);\n },\n // $FlowFixMe[missing-local-annot]\n // $FlowFixMe[missing-this-annot]\n set: function (value) {\n {\n checkFormFieldValueStringCoercion(value);\n }\n\n currentValue = '' + value;\n set.call(this, value);\n }\n }); // We could've passed this the first time\n // but it triggers a bug in IE11 and Edge 14/15.\n // Calling defineProperty() again should be equivalent.\n // https://github.com/facebook/react/issues/11768\n\n Object.defineProperty(node, valueField, {\n enumerable: descriptor.enumerable\n });\n var tracker = {\n getValue: function () {\n return currentValue;\n },\n setValue: function (value) {\n {\n checkFormFieldValueStringCoercion(value);\n }\n\n currentValue = '' + value;\n },\n stopTracking: function () {\n detachTracker(node);\n delete node[valueField];\n }\n };\n return tracker;\n}\n\nfunction track(node) {\n if (getTracker(node)) {\n return;\n }\n\n node._valueTracker = trackValueOnNode(node);\n}\nfunction updateValueIfChanged(node) {\n if (!node) {\n return false;\n }\n\n var tracker = getTracker(node); // if there is no tracker at this point it's unlikely\n // that trying again will succeed\n\n if (!tracker) {\n return true;\n }\n\n var lastValue = tracker.getValue();\n var nextValue = getValueFromNode(node);\n\n if (nextValue !== lastValue) {\n tracker.setValue(nextValue);\n return true;\n }\n\n return false;\n}\n\nfunction getActiveElement(doc) {\n doc = doc || (typeof document !== 'undefined' ? document : undefined);\n\n if (typeof doc === 'undefined') {\n return null;\n }\n\n try {\n return doc.activeElement || doc.body;\n } catch (e) {\n return doc.body;\n }\n}\n\n// When passing user input into querySelector(All) the embedded string must not alter\n// the semantics of the query. This escape function is safe to use when we know the\n// provided value is going to be wrapped in double quotes as part of an attribute selector\n// Do not use it anywhere else\n// we escape double quotes and backslashes\nvar escapeSelectorAttributeValueInsideDoubleQuotesRegex = /[\\n\\\"\\\\]/g;\nfunction escapeSelectorAttributeValueInsideDoubleQuotes(value) {\n return value.replace(escapeSelectorAttributeValueInsideDoubleQuotesRegex, function (ch) {\n return '\\\\' + ch.charCodeAt(0).toString(16) + ' ';\n });\n}\n\nvar didWarnValueDefaultValue$1 = false;\nvar didWarnCheckedDefaultChecked = false;\n/**\n * Implements an <input> host component that allows setting these optional\n * props: `checked`, `value`, `defaultChecked`, and `defaultValue`.\n *\n * If `checked` or `value` are not supplied (or null/undefined), user actions\n * that affect the checked state or value will trigger updates to the element.\n *\n * If they are supplied (and not null/undefined), the rendered element will not\n * trigger updates to the element. Instead, the props must change in order for\n * the rendered element to be updated.\n *\n * The rendered element will be initialized as unchecked (or `defaultChecked`)\n * with an empty value (or `defaultValue`).\n *\n * See http://www.w3.org/TR/2012/WD-html5-20121025/the-input-element.html\n */\n\nfunction validateInputProps(element, props) {\n {\n // Normally we check for undefined and null the same, but explicitly specifying both\n // properties, at all is probably worth warning for. We could move this either direction\n // and just make it ok to pass null or just check hasOwnProperty.\n if (props.checked !== undefined && props.defaultChecked !== undefined && !didWarnCheckedDefaultChecked) {\n error('%s contains an input of type %s with both checked and defaultChecked props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the checked prop, or the defaultChecked prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://react.dev/link/controlled-components', getCurrentFiberOwnerNameInDevOrNull() || 'A component', props.type);\n\n didWarnCheckedDefaultChecked = true;\n }\n\n if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue$1) {\n error('%s contains an input of type %s with both value and defaultValue props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://react.dev/link/controlled-components', getCurrentFiberOwnerNameInDevOrNull() || 'A component', props.type);\n\n didWarnValueDefaultValue$1 = true;\n }\n }\n}\nfunction updateInput(element, value, defaultValue, lastDefaultValue, checked, defaultChecked, type, name) {\n var node = element; // Temporarily disconnect the input from any radio buttons.\n // Changing the type or name as the same time as changing the checked value\n // needs to be atomically applied. We can only ensure that by disconnecting\n // the name while do the mutations and then reapply the name after that's done.\n\n node.name = '';\n\n if (type != null && typeof type !== 'function' && typeof type !== 'symbol' && typeof type !== 'boolean') {\n {\n checkAttributeStringCoercion(type, 'type');\n }\n\n node.type = type;\n } else {\n node.removeAttribute('type');\n }\n\n if (value != null) {\n if (type === 'number') {\n if ( // $FlowFixMe[incompatible-type]\n value === 0 && node.value === '' || // We explicitly want to coerce to number here if possible.\n // eslint-disable-next-line\n node.value != value) {\n node.value = toString(getToStringValue(value));\n }\n } else if (node.value !== toString(getToStringValue(value))) {\n node.value = toString(getToStringValue(value));\n }\n } else if (type === 'submit' || type === 'reset') {\n // Submit/reset inputs need the attribute removed completely to avoid\n // blank-text buttons.\n node.removeAttribute('value');\n }\n\n {\n // When syncing the value attribute, the value comes from a cascade of\n // properties:\n // 1. The value React property\n // 2. The defaultValue React property\n // 3. Otherwise there should be no change\n if (value != null) {\n setDefaultValue(node, type, getToStringValue(value));\n } else if (defaultValue != null) {\n setDefaultValue(node, type, getToStringValue(defaultValue));\n } else if (lastDefaultValue != null) {\n node.removeAttribute('value');\n }\n }\n\n {\n // When syncing the checked attribute, it only changes when it needs\n // to be removed, such as transitioning from a checkbox into a text input\n if (checked == null && defaultChecked != null) {\n node.defaultChecked = !!defaultChecked;\n }\n }\n\n if (checked != null) {\n // Important to set this even if it's not a change in order to update input\n // value tracking with radio buttons\n // TODO: Should really update input value tracking for the whole radio\n // button group in an effect or something (similar to #27024)\n node.checked = checked && typeof checked !== 'function' && typeof checked !== 'symbol';\n }\n\n if (name != null && typeof name !== 'function' && typeof name !== 'symbol' && typeof name !== 'boolean') {\n {\n checkAttributeStringCoercion(name, 'name');\n }\n\n node.name = toString(getToStringValue(name));\n } else {\n node.removeAttribute('name');\n }\n}\nfunction initInput(element, value, defaultValue, checked, defaultChecked, type, name, isHydrating) {\n var node = element;\n\n if (type != null && typeof type !== 'function' && typeof type !== 'symbol' && typeof type !== 'boolean') {\n {\n checkAttributeStringCoercion(type, 'type');\n }\n\n node.type = type;\n }\n\n if (value != null || defaultValue != null) {\n var isButton = type === 'submit' || type === 'reset'; // Avoid setting value attribute on submit/reset inputs as it overrides the\n // default value provided by the browser. See: #12872\n\n if (isButton && (value === undefined || value === null)) {\n return;\n }\n\n var defaultValueStr = defaultValue != null ? toString(getToStringValue(defaultValue)) : '';\n var initialValue = value != null ? toString(getToStringValue(value)) : defaultValueStr; // Do not assign value if it is already set. This prevents user text input\n // from being lost during SSR hydration.\n\n if (!isHydrating) {\n {\n // When syncing the value attribute, the value property should use\n // the wrapperState._initialValue property. This uses:\n //\n // 1. The value React property when present\n // 2. The defaultValue React property when present\n // 3. An empty string\n if (initialValue !== node.value) {\n node.value = initialValue;\n }\n }\n }\n\n {\n // Otherwise, the value attribute is synchronized to the property,\n // so we assign defaultValue to the same thing as the value property\n // assignment step above.\n node.defaultValue = initialValue;\n }\n } // Normally, we'd just do `node.checked = node.checked` upon initial mount, less this bug\n // this is needed to work around a chrome bug where setting defaultChecked\n // will sometimes influence the value of checked (even after detachment).\n // Reference: https://bugs.chromium.org/p/chromium/issues/detail?id=608416\n // We need to temporarily unset name to avoid disrupting radio button groups.\n\n\n var checkedOrDefault = checked != null ? checked : defaultChecked; // TODO: This 'function' or 'symbol' check isn't replicated in other places\n // so this semantic is inconsistent.\n\n var initialChecked = typeof checkedOrDefault !== 'function' && typeof checkedOrDefault !== 'symbol' && !!checkedOrDefault;\n\n if (isHydrating) {\n // Detach .checked from .defaultChecked but leave user input alone\n node.checked = node.checked;\n } else {\n node.checked = !!initialChecked;\n }\n\n {\n // When syncing the checked attribute, both the checked property and\n // attribute are assigned at the same time using defaultChecked. This uses:\n //\n // 1. The checked React property when present\n // 2. The defaultChecked React property when present\n // 3. Otherwise, false\n node.defaultChecked = !node.defaultChecked;\n node.defaultChecked = !!initialChecked;\n } // Name needs to be set at the end so that it applies atomically to connected radio buttons.\n\n\n if (name != null && typeof name !== 'function' && typeof name !== 'symbol' && typeof name !== 'boolean') {\n {\n checkAttributeStringCoercion(name, 'name');\n }\n\n node.name = name;\n }\n}\nfunction restoreControlledInputState(element, props) {\n var rootNode = element;\n updateInput(rootNode, props.value, props.defaultValue, props.defaultValue, props.checked, props.defaultChecked, props.type, props.name);\n var name = props.name;\n\n if (props.type === 'radio' && name != null) {\n var queryRoot = rootNode;\n\n while (queryRoot.parentNode) {\n queryRoot = queryRoot.parentNode;\n } // If `rootNode.form` was non-null, then we could try `form.elements`,\n // but that sometimes behaves strangely in IE8. We could also try using\n // `form.getElementsByName`, but that will only return direct children\n // and won't include inputs that use the HTML5 `form=` attribute. Since\n // the input might not even be in a form. It might not even be in the\n // document. Let's just use the local `querySelectorAll` to ensure we don't\n // miss anything.\n\n\n {\n checkAttributeStringCoercion(name, 'name');\n }\n\n var group = queryRoot.querySelectorAll('input[name=\"' + escapeSelectorAttributeValueInsideDoubleQuotes('' + name) + '\"][type=\"radio\"]');\n\n for (var i = 0; i < group.length; i++) {\n var otherNode = group[i];\n\n if (otherNode === rootNode || otherNode.form !== rootNode.form) {\n continue;\n } // This will throw if radio buttons rendered by different copies of React\n // and the same name are rendered into the same form (same as #1939).\n // That's probably okay; we don't support it just as we don't support\n // mixing React radio buttons with non-React ones.\n\n\n var otherProps = getFiberCurrentPropsFromNode(otherNode);\n\n if (!otherProps) {\n throw new Error('ReactDOMInput: Mixing React and non-React radio inputs with the ' + 'same `name` is not supported.');\n } // If this is a controlled radio button group, forcing the input that\n // was previously checked to update will cause it to be come re-checked\n // as appropriate.\n\n\n updateInput(otherNode, otherProps.value, otherProps.defaultValue, otherProps.defaultValue, otherProps.checked, otherProps.defaultChecked, otherProps.type, otherProps.name);\n } // If any updateInput() call set .checked to true, an input in this group\n // (often, `rootNode` itself) may have become unchecked\n\n\n for (var _i = 0; _i < group.length; _i++) {\n var _otherNode = group[_i];\n\n if (_otherNode.form !== rootNode.form) {\n continue;\n }\n\n updateValueIfChanged(_otherNode);\n }\n }\n} // In Chrome, assigning defaultValue to certain input types triggers input validation.\n// For number inputs, the display value loses trailing decimal points. For email inputs,\n// Chrome raises \"The specified value <x> is not a valid email address\".\n//\n// Here we check to see if the defaultValue has actually changed, avoiding these problems\n// when the user is inputting text\n//\n// https://github.com/facebook/react/issues/7253\n\nfunction setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}\n\nvar didWarnSelectedSetOnOption = false;\nvar didWarnInvalidChild = false;\nvar didWarnInvalidInnerHTML = false;\n/**\n * Implements an <option> host component that warns when `selected` is set.\n */\n\nfunction validateOptionProps(element, props) {\n {\n // If a value is not provided, then the children must be simple.\n if (props.value == null) {\n if (typeof props.children === 'object' && props.children !== null) {\n React.Children.forEach(props.children, function (child) {\n if (child == null) {\n return;\n }\n\n if (typeof child === 'string' || typeof child === 'number' || enableBigIntSupport ) {\n return;\n }\n\n if (!didWarnInvalidChild) {\n didWarnInvalidChild = true;\n\n error('Cannot infer the option value of complex children. ' + 'Pass a `value` prop or use a plain string as children to <option>.');\n }\n });\n } else if (props.dangerouslySetInnerHTML != null) {\n if (!didWarnInvalidInnerHTML) {\n didWarnInvalidInnerHTML = true;\n\n error('Pass a `value` prop if you set dangerouslyInnerHTML so React knows ' + 'which value should be selected.');\n }\n }\n } // TODO: Remove support for `selected` in <option>.\n\n\n if (props.selected != null && !didWarnSelectedSetOnOption) {\n error('Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.');\n\n didWarnSelectedSetOnOption = true;\n }\n }\n}\n\nvar isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare\n\nfunction isArray(a) {\n return isArrayImpl(a);\n}\n\nvar didWarnValueDefaultValue;\n\n{\n didWarnValueDefaultValue = false;\n}\n\nfunction getDeclarationErrorAddendum() {\n var ownerName = getCurrentFiberOwnerNameInDevOrNull();\n\n if (ownerName) {\n return '\\n\\nCheck the render method of `' + ownerName + '`.';\n }\n\n return '';\n}\n\nvar valuePropNames = ['value', 'defaultValue'];\n/**\n * Validation function for `value` and `defaultValue`.\n */\n\nfunction checkSelectPropTypes(props) {\n {\n for (var i = 0; i < valuePropNames.length; i++) {\n var propName = valuePropNames[i];\n\n if (props[propName] == null) {\n continue;\n }\n\n var propNameIsArray = isArray(props[propName]);\n\n if (props.multiple && !propNameIsArray) {\n error('The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum());\n } else if (!props.multiple && propNameIsArray) {\n error('The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum());\n }\n }\n }\n}\n\nfunction updateOptions(node, multiple, propValue, setDefaultSelected) {\n var options = node.options;\n\n if (multiple) {\n var selectedValues = propValue;\n var selectedValue = {};\n\n for (var i = 0; i < selectedValues.length; i++) {\n // Prefix to avoid chaos with special keys.\n selectedValue['$' + selectedValues[i]] = true;\n }\n\n for (var _i = 0; _i < options.length; _i++) {\n var selected = selectedValue.hasOwnProperty('$' + options[_i].value);\n\n if (options[_i].selected !== selected) {\n options[_i].selected = selected;\n }\n\n if (selected && setDefaultSelected) {\n options[_i].defaultSelected = true;\n }\n }\n } else {\n // Do not set `select.value` as exact behavior isn't consistent across all\n // browsers for all cases.\n var _selectedValue = toString(getToStringValue(propValue));\n\n var defaultSelected = null;\n\n for (var _i2 = 0; _i2 < options.length; _i2++) {\n if (options[_i2].value === _selectedValue) {\n options[_i2].selected = true;\n\n if (setDefaultSelected) {\n options[_i2].defaultSelected = true;\n }\n\n return;\n }\n\n if (defaultSelected === null && !options[_i2].disabled) {\n defaultSelected = options[_i2];\n }\n }\n\n if (defaultSelected !== null) {\n defaultSelected.selected = true;\n }\n }\n}\n/**\n * Implements a <select> host component that allows optionally setting the\n * props `value` and `defaultValue`. If `multiple` is false, the prop must be a\n * stringable. If `multiple` is true, the prop must be an array of stringables.\n *\n * If `value` is not supplied (or null/undefined), user actions that change the\n * selected option will trigger updates to the rendered options.\n *\n * If it is supplied (and not null/undefined), the rendered options will not\n * update in response to user actions. Instead, the `value` prop must change in\n * order for the rendered options to update.\n *\n * If `defaultValue` is provided, any options with the supplied values will be\n * selected.\n */\n\n\nfunction validateSelectProps(element, props) {\n {\n checkSelectPropTypes(props);\n\n if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue) {\n error('Select elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled select ' + 'element and remove one of these props. More info: ' + 'https://react.dev/link/controlled-components');\n\n didWarnValueDefaultValue = true;\n }\n }\n}\nfunction initSelect(element, value, defaultValue, multiple) {\n var node = element;\n node.multiple = !!multiple;\n\n if (value != null) {\n updateOptions(node, !!multiple, value, false);\n } else if (defaultValue != null) {\n updateOptions(node, !!multiple, defaultValue, true);\n }\n}\nfunction updateSelect(element, value, defaultValue, multiple, wasMultiple) {\n var node = element;\n\n if (value != null) {\n updateOptions(node, !!multiple, value, false);\n } else if (!!wasMultiple !== !!multiple) {\n // For simplicity, reapply `defaultValue` if `multiple` is toggled.\n if (defaultValue != null) {\n updateOptions(node, !!multiple, defaultValue, true);\n } else {\n // Revert the select back to its default unselected state.\n updateOptions(node, !!multiple, multiple ? [] : '', false);\n }\n }\n}\nfunction restoreControlledSelectState(element, props) {\n var node = element;\n var value = props.value;\n\n if (value != null) {\n updateOptions(node, !!props.multiple, value, false);\n }\n}\n\nvar didWarnValDefaultVal = false;\n/**\n * Implements a <textarea> host component that allows setting `value`, and\n * `defaultValue`. This differs from the traditional DOM API because value is\n * usually set as PCDATA children.\n *\n * If `value` is not supplied (or null/undefined), user actions that affect the\n * value will trigger updates to the element.\n *\n * If `value` is supplied (and not null/undefined), the rendered element will\n * not trigger updates to the element. Instead, the `value` prop must change in\n * order for the rendered element to be updated.\n *\n * The rendered element will be initialized with an empty value, the prop\n * `defaultValue` if specified, or the children content (deprecated).\n */\n\nfunction validateTextareaProps(element, props) {\n {\n if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValDefaultVal) {\n error('%s contains a textarea with both value and defaultValue props. ' + 'Textarea elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled textarea ' + 'and remove one of these props. More info: ' + 'https://react.dev/link/controlled-components', getCurrentFiberOwnerNameInDevOrNull() || 'A component');\n\n didWarnValDefaultVal = true;\n }\n\n if (props.children != null && props.value == null) {\n error('Use the `defaultValue` or `value` props instead of setting ' + 'children on <textarea>.');\n }\n }\n}\nfunction updateTextarea(element, value, defaultValue) {\n var node = element;\n\n if (value != null) {\n // Cast `value` to a string to ensure the value is set correctly. While\n // browsers typically do this as necessary, jsdom doesn't.\n var newValue = toString(getToStringValue(value)); // To avoid side effects (such as losing text selection), only set value if changed\n\n if (newValue !== node.value) {\n node.value = newValue;\n } // TOOO: This should respect disableInputAttributeSyncing flag.\n\n\n if (defaultValue == null) {\n if (node.defaultValue !== newValue) {\n node.defaultValue = newValue;\n }\n\n return;\n }\n }\n\n if (defaultValue != null) {\n node.defaultValue = toString(getToStringValue(defaultValue));\n } else {\n node.defaultValue = '';\n }\n}\nfunction initTextarea(element, value, defaultValue, children) {\n var node = element;\n var initialValue = value; // Only bother fetching default value if we're going to use it\n\n if (initialValue == null) {\n if (children != null) {\n {\n if (defaultValue != null) {\n throw new Error('If you supply `defaultValue` on a <textarea>, do not pass children.');\n }\n\n if (isArray(children)) {\n if (children.length > 1) {\n throw new Error('<textarea> can only have at most one child.');\n }\n\n children = children[0];\n }\n\n defaultValue = children;\n }\n }\n\n if (defaultValue == null) {\n defaultValue = '';\n }\n\n initialValue = defaultValue;\n }\n\n var stringValue = getToStringValue(initialValue);\n node.defaultValue = stringValue; // This will be toString:ed.\n // This is in postMount because we need access to the DOM node, which is not\n // available until after the component has mounted.\n\n var textContent = node.textContent; // Only set node.value if textContent is equal to the expected\n // initial value. In IE10/IE11 there is a bug where the placeholder attribute\n // will populate textContent as well.\n // https://developer.microsoft.com/microsoft-edge/platform/issues/101525/\n\n if (textContent === stringValue) {\n if (textContent !== '' && textContent !== null) {\n node.value = textContent;\n }\n }\n}\nfunction restoreControlledTextareaState(element, props) {\n // DOM component is still mounted; update\n updateTextarea(element, props.value, props.defaultValue);\n}\n\n// This validation code was written based on the HTML5 parsing spec:\n// https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope\n//\n// Note: this does not catch all invalid nesting, nor does it try to (as it's\n// not clear what practical benefit doing so provides); instead, we warn only\n// for cases where the parser will give a parse tree differing from what React\n// intended. For example, <b><div></div></b> is invalid but we don't warn\n// because it still parses correctly; we do warn for other cases like nested\n// <p> tags where the beginning of the second element implicitly closes the\n// first, causing a confusing mess.\n// https://html.spec.whatwg.org/multipage/syntax.html#special\nvar specialTags = ['address', 'applet', 'area', 'article', 'aside', 'base', 'basefont', 'bgsound', 'blockquote', 'body', 'br', 'button', 'caption', 'center', 'col', 'colgroup', 'dd', 'details', 'dir', 'div', 'dl', 'dt', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'frame', 'frameset', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'iframe', 'img', 'input', 'isindex', 'li', 'link', 'listing', 'main', 'marquee', 'menu', 'menuitem', 'meta', 'nav', 'noembed', 'noframes', 'noscript', 'object', 'ol', 'p', 'param', 'plaintext', 'pre', 'script', 'section', 'select', 'source', 'style', 'summary', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'title', 'tr', 'track', 'ul', 'wbr', 'xmp']; // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope\n\nvar inScopeTags = ['applet', 'caption', 'html', 'table', 'td', 'th', 'marquee', 'object', 'template', // https://html.spec.whatwg.org/multipage/syntax.html#html-integration-point\n// TODO: Distinguish by namespace here -- for <title>, including it here\n// errs on the side of fewer warnings\n'foreignObject', 'desc', 'title']; // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-button-scope\n\nvar buttonScopeTags = inScopeTags.concat(['button']) ; // https://html.spec.whatwg.org/multipage/syntax.html#generate-implied-end-tags\n\nvar impliedEndTags = ['dd', 'dt', 'li', 'option', 'optgroup', 'p', 'rp', 'rt'];\nvar emptyAncestorInfoDev = {\n current: null,\n formTag: null,\n aTagInScope: null,\n buttonTagInScope: null,\n nobrTagInScope: null,\n pTagInButtonScope: null,\n listItemTagAutoclosing: null,\n dlItemTagAutoclosing: null,\n containerTagInScope: null\n};\n\nfunction updatedAncestorInfoDev(oldInfo, tag) {\n {\n var ancestorInfo = assign({}, oldInfo || emptyAncestorInfoDev);\n\n var info = {\n tag: tag\n };\n\n if (inScopeTags.indexOf(tag) !== -1) {\n ancestorInfo.aTagInScope = null;\n ancestorInfo.buttonTagInScope = null;\n ancestorInfo.nobrTagInScope = null;\n }\n\n if (buttonScopeTags.indexOf(tag) !== -1) {\n ancestorInfo.pTagInButtonScope = null;\n } // See rules for 'li', 'dd', 'dt' start tags in\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody\n\n\n if (specialTags.indexOf(tag) !== -1 && tag !== 'address' && tag !== 'div' && tag !== 'p') {\n ancestorInfo.listItemTagAutoclosing = null;\n ancestorInfo.dlItemTagAutoclosing = null;\n }\n\n ancestorInfo.current = info;\n\n if (tag === 'form') {\n ancestorInfo.formTag = info;\n }\n\n if (tag === 'a') {\n ancestorInfo.aTagInScope = info;\n }\n\n if (tag === 'button') {\n ancestorInfo.buttonTagInScope = info;\n }\n\n if (tag === 'nobr') {\n ancestorInfo.nobrTagInScope = info;\n }\n\n if (tag === 'p') {\n ancestorInfo.pTagInButtonScope = info;\n }\n\n if (tag === 'li') {\n ancestorInfo.listItemTagAutoclosing = info;\n }\n\n if (tag === 'dd' || tag === 'dt') {\n ancestorInfo.dlItemTagAutoclosing = info;\n }\n\n if (tag === '#document' || tag === 'html') {\n ancestorInfo.containerTagInScope = null;\n } else if (!ancestorInfo.containerTagInScope) {\n ancestorInfo.containerTagInScope = info;\n }\n\n return ancestorInfo;\n }\n}\n/**\n * Returns whether\n */\n\n\nfunction isTagValidWithParent(tag, parentTag) {\n // First, let's check if we're in an unusual parsing mode...\n switch (parentTag) {\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inselect\n case 'select':\n return tag === 'hr' || tag === 'option' || tag === 'optgroup' || tag === '#text';\n\n case 'optgroup':\n return tag === 'option' || tag === '#text';\n // Strictly speaking, seeing an <option> doesn't mean we're in a <select>\n // but\n\n case 'option':\n return tag === '#text';\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intd\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incaption\n // No special behavior since these rules fall back to \"in body\" mode for\n // all except special table nodes which cause bad parsing behavior anyway.\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intr\n\n case 'tr':\n return tag === 'th' || tag === 'td' || tag === 'style' || tag === 'script' || tag === 'template';\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intbody\n\n case 'tbody':\n case 'thead':\n case 'tfoot':\n return tag === 'tr' || tag === 'style' || tag === 'script' || tag === 'template';\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incolgroup\n\n case 'colgroup':\n return tag === 'col' || tag === 'template';\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intable\n\n case 'table':\n return tag === 'caption' || tag === 'colgroup' || tag === 'tbody' || tag === 'tfoot' || tag === 'thead' || tag === 'style' || tag === 'script' || tag === 'template';\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inhead\n\n case 'head':\n return tag === 'base' || tag === 'basefont' || tag === 'bgsound' || tag === 'link' || tag === 'meta' || tag === 'title' || tag === 'noscript' || tag === 'noframes' || tag === 'style' || tag === 'script' || tag === 'template';\n // https://html.spec.whatwg.org/multipage/semantics.html#the-html-element\n\n case 'html':\n return tag === 'head' || tag === 'body' || tag === 'frameset';\n\n case 'frameset':\n return tag === 'frame';\n\n case '#document':\n return tag === 'html';\n } // Probably in the \"in body\" parsing mode, so we outlaw only tag combos\n // where the parsing rules cause implicit opens or closes to be added.\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody\n\n\n switch (tag) {\n case 'h1':\n case 'h2':\n case 'h3':\n case 'h4':\n case 'h5':\n case 'h6':\n return parentTag !== 'h1' && parentTag !== 'h2' && parentTag !== 'h3' && parentTag !== 'h4' && parentTag !== 'h5' && parentTag !== 'h6';\n\n case 'rp':\n case 'rt':\n return impliedEndTags.indexOf(parentTag) === -1;\n\n case 'body':\n case 'caption':\n case 'col':\n case 'colgroup':\n case 'frameset':\n case 'frame':\n case 'head':\n case 'html':\n case 'tbody':\n case 'td':\n case 'tfoot':\n case 'th':\n case 'thead':\n case 'tr':\n // These tags are only valid with a few parents that have special child\n // parsing rules -- if we're down here, then none of those matched and\n // so we allow it only if we don't know what the parent is, as all other\n // cases are invalid.\n return parentTag == null;\n }\n\n return true;\n}\n/**\n * Returns whether\n */\n\n\nfunction findInvalidAncestorForTag(tag, ancestorInfo) {\n switch (tag) {\n case 'address':\n case 'article':\n case 'aside':\n case 'blockquote':\n case 'center':\n case 'details':\n case 'dialog':\n case 'dir':\n case 'div':\n case 'dl':\n case 'fieldset':\n case 'figcaption':\n case 'figure':\n case 'footer':\n case 'header':\n case 'hgroup':\n case 'main':\n case 'menu':\n case 'nav':\n case 'ol':\n case 'p':\n case 'section':\n case 'summary':\n case 'ul':\n case 'pre':\n case 'listing':\n case 'table':\n case 'hr':\n case 'xmp':\n case 'h1':\n case 'h2':\n case 'h3':\n case 'h4':\n case 'h5':\n case 'h6':\n return ancestorInfo.pTagInButtonScope;\n\n case 'form':\n return ancestorInfo.formTag || ancestorInfo.pTagInButtonScope;\n\n case 'li':\n return ancestorInfo.listItemTagAutoclosing;\n\n case 'dd':\n case 'dt':\n return ancestorInfo.dlItemTagAutoclosing;\n\n case 'button':\n return ancestorInfo.buttonTagInScope;\n\n case 'a':\n // Spec says something about storing a list of markers, but it sounds\n // equivalent to this check.\n return ancestorInfo.aTagInScope;\n\n case 'nobr':\n return ancestorInfo.nobrTagInScope;\n }\n\n return null;\n}\n\nvar didWarn$1 = {};\n\nfunction validateDOMNesting(childTag, ancestorInfo) {\n {\n ancestorInfo = ancestorInfo || emptyAncestorInfoDev;\n var parentInfo = ancestorInfo.current;\n var parentTag = parentInfo && parentInfo.tag;\n var invalidParent = isTagValidWithParent(childTag, parentTag) ? null : parentInfo;\n var invalidAncestor = invalidParent ? null : findInvalidAncestorForTag(childTag, ancestorInfo);\n var invalidParentOrAncestor = invalidParent || invalidAncestor;\n\n if (!invalidParentOrAncestor) {\n return true;\n }\n\n var ancestorTag = invalidParentOrAncestor.tag;\n var warnKey = // eslint-disable-next-line react-internal/safe-string-coercion\n String(!!invalidParent) + '|' + childTag + '|' + ancestorTag;\n\n if (didWarn$1[warnKey]) {\n return false;\n }\n\n didWarn$1[warnKey] = true;\n var tagDisplayName = '<' + childTag + '>';\n\n if (invalidParent) {\n var info = '';\n\n if (ancestorTag === 'table' && childTag === 'tr') {\n info += ' Add a <tbody>, <thead> or <tfoot> to your code to match the DOM tree generated by ' + 'the browser.';\n }\n\n error('In HTML, %s cannot be a child of <%s>.%s\\n' + 'This will cause a hydration error.', tagDisplayName, ancestorTag, info);\n } else {\n error('In HTML, %s cannot be a descendant of <%s>.\\n' + 'This will cause a hydration error.', tagDisplayName, ancestorTag);\n }\n\n return false;\n }\n}\n\nfunction validateTextNesting(childText, parentTag) {\n {\n if (isTagValidWithParent('#text', parentTag)) {\n return true;\n } // eslint-disable-next-line react-internal/safe-string-coercion\n\n\n var warnKey = '#text|' + parentTag;\n\n if (didWarn$1[warnKey]) {\n return false;\n }\n\n didWarn$1[warnKey] = true;\n\n if (/\\S/.test(childText)) {\n error('In HTML, text nodes cannot be a child of <%s>.\\n' + 'This will cause a hydration error.', parentTag);\n } else {\n error('In HTML, whitespace text nodes cannot be a child of <%s>. ' + \"Make sure you don't have any extra whitespace between tags on \" + 'each line of your source code.\\n' + 'This will cause a hydration error.', parentTag);\n }\n\n return false;\n }\n}\n\nvar MATH_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';\nvar SVG_NAMESPACE = 'http://www.w3.org/2000/svg';\n\nvar reusableSVGContainer;\n\nfunction setInnerHTMLImpl(node, html) {\n if (node.namespaceURI === SVG_NAMESPACE) {\n\n if (!('innerHTML' in node)) {\n // IE does not have innerHTML for SVG nodes, so instead we inject the\n // new markup in a temp node and then move the child nodes across into\n // the target node\n reusableSVGContainer = reusableSVGContainer || document.createElement('div');\n reusableSVGContainer.innerHTML = '<svg>' + html.valueOf().toString() + '</svg>';\n var svgNode = reusableSVGContainer.firstChild;\n\n while (node.firstChild) {\n node.removeChild(node.firstChild);\n } // $FlowFixMe[incompatible-use]\n // $FlowFixMe[incompatible-type]\n\n\n while (svgNode.firstChild) {\n node.appendChild(svgNode.firstChild);\n }\n\n return;\n }\n }\n\n node.innerHTML = html;\n}\n\nvar setInnerHTML = setInnerHTMLImpl; // $FlowFixMe[cannot-resolve-name]\n\nif (typeof MSApp !== 'undefined' && MSApp.execUnsafeLocalFunction) {\n /**\n * Create a function which has 'unsafe' privileges (required by windows8 apps)\n */\n setInnerHTML = function (node, html) {\n // $FlowFixMe[cannot-resolve-name]\n return MSApp.execUnsafeLocalFunction(function () {\n return setInnerHTMLImpl(node, html);\n });\n };\n}\n\nvar setInnerHTML$1 = setInnerHTML;\n\n/**\n * HTML nodeType values that represent the type of the node\n */\nvar ELEMENT_NODE = 1;\nvar TEXT_NODE = 3;\nvar COMMENT_NODE = 8;\nvar DOCUMENT_NODE = 9;\nvar DOCUMENT_TYPE_NODE = 10;\nvar DOCUMENT_FRAGMENT_NODE = 11;\n\n/**\n * Set the textContent property of a node. For text updates, it's faster\n * to set the `nodeValue` of the Text node directly instead of using\n * `.textContent` which will remove the existing node and create a new one.\n *\n * @param {DOMElement} node\n * @param {string} text\n * @internal\n */\n\nfunction setTextContent(node, text) {\n if (text) {\n var firstChild = node.firstChild;\n\n if (firstChild && firstChild === node.lastChild && firstChild.nodeType === TEXT_NODE) {\n firstChild.nodeValue = text;\n return;\n }\n }\n\n node.textContent = text;\n}\n\n// List derived from Gecko source code:\n// https://github.com/mozilla/gecko-dev/blob/4e638efc71/layout/style/test/property_database.js\nvar shorthandToLonghand = {\n animation: ['animationDelay', 'animationDirection', 'animationDuration', 'animationFillMode', 'animationIterationCount', 'animationName', 'animationPlayState', 'animationTimingFunction'],\n background: ['backgroundAttachment', 'backgroundClip', 'backgroundColor', 'backgroundImage', 'backgroundOrigin', 'backgroundPositionX', 'backgroundPositionY', 'backgroundRepeat', 'backgroundSize'],\n backgroundPosition: ['backgroundPositionX', 'backgroundPositionY'],\n border: ['borderBottomColor', 'borderBottomStyle', 'borderBottomWidth', 'borderImageOutset', 'borderImageRepeat', 'borderImageSlice', 'borderImageSource', 'borderImageWidth', 'borderLeftColor', 'borderLeftStyle', 'borderLeftWidth', 'borderRightColor', 'borderRightStyle', 'borderRightWidth', 'borderTopColor', 'borderTopStyle', 'borderTopWidth'],\n borderBlockEnd: ['borderBlockEndColor', 'borderBlockEndStyle', 'borderBlockEndWidth'],\n borderBlockStart: ['borderBlockStartColor', 'borderBlockStartStyle', 'borderBlockStartWidth'],\n borderBottom: ['borderBottomColor', 'borderBottomStyle', 'borderBottomWidth'],\n borderColor: ['borderBottomColor', 'borderLeftColor', 'borderRightColor', 'borderTopColor'],\n borderImage: ['borderImageOutset', 'borderImageRepeat', 'borderImageSlice', 'borderImageSource', 'borderImageWidth'],\n borderInlineEnd: ['borderInlineEndColor', 'borderInlineEndStyle', 'borderInlineEndWidth'],\n borderInlineStart: ['borderInlineStartColor', 'borderInlineStartStyle', 'borderInlineStartWidth'],\n borderLeft: ['borderLeftColor', 'borderLeftStyle', 'borderLeftWidth'],\n borderRadius: ['borderBottomLeftRadius', 'borderBottomRightRadius', 'borderTopLeftRadius', 'borderTopRightRadius'],\n borderRight: ['borderRightColor', 'borderRightStyle', 'borderRightWidth'],\n borderStyle: ['borderBottomStyle', 'borderLeftStyle', 'borderRightStyle', 'borderTopStyle'],\n borderTop: ['borderTopColor', 'borderTopStyle', 'borderTopWidth'],\n borderWidth: ['borderBottomWidth', 'borderLeftWidth', 'borderRightWidth', 'borderTopWidth'],\n columnRule: ['columnRuleColor', 'columnRuleStyle', 'columnRuleWidth'],\n columns: ['columnCount', 'columnWidth'],\n flex: ['flexBasis', 'flexGrow', 'flexShrink'],\n flexFlow: ['flexDirection', 'flexWrap'],\n font: ['fontFamily', 'fontFeatureSettings', 'fontKerning', 'fontLanguageOverride', 'fontSize', 'fontSizeAdjust', 'fontStretch', 'fontStyle', 'fontVariant', 'fontVariantAlternates', 'fontVariantCaps', 'fontVariantEastAsian', 'fontVariantLigatures', 'fontVariantNumeric', 'fontVariantPosition', 'fontWeight', 'lineHeight'],\n fontVariant: ['fontVariantAlternates', 'fontVariantCaps', 'fontVariantEastAsian', 'fontVariantLigatures', 'fontVariantNumeric', 'fontVariantPosition'],\n gap: ['columnGap', 'rowGap'],\n grid: ['gridAutoColumns', 'gridAutoFlow', 'gridAutoRows', 'gridTemplateAreas', 'gridTemplateColumns', 'gridTemplateRows'],\n gridArea: ['gridColumnEnd', 'gridColumnStart', 'gridRowEnd', 'gridRowStart'],\n gridColumn: ['gridColumnEnd', 'gridColumnStart'],\n gridColumnGap: ['columnGap'],\n gridGap: ['columnGap', 'rowGap'],\n gridRow: ['gridRowEnd', 'gridRowStart'],\n gridRowGap: ['rowGap'],\n gridTemplate: ['gridTemplateAreas', 'gridTemplateColumns', 'gridTemplateRows'],\n listStyle: ['listStyleImage', 'listStylePosition', 'listStyleType'],\n margin: ['marginBottom', 'marginLeft', 'marginRight', 'marginTop'],\n marker: ['markerEnd', 'markerMid', 'markerStart'],\n mask: ['maskClip', 'maskComposite', 'maskImage', 'maskMode', 'maskOrigin', 'maskPositionX', 'maskPositionY', 'maskRepeat', 'maskSize'],\n maskPosition: ['maskPositionX', 'maskPositionY'],\n outline: ['outlineColor', 'outlineStyle', 'outlineWidth'],\n overflow: ['overflowX', 'overflowY'],\n padding: ['paddingBottom', 'paddingLeft', 'paddingRight', 'paddingTop'],\n placeContent: ['alignContent', 'justifyContent'],\n placeItems: ['alignItems', 'justifyItems'],\n placeSelf: ['alignSelf', 'justifySelf'],\n textDecoration: ['textDecorationColor', 'textDecorationLine', 'textDecorationStyle'],\n textEmphasis: ['textEmphasisColor', 'textEmphasisStyle'],\n transition: ['transitionDelay', 'transitionDuration', 'transitionProperty', 'transitionTimingFunction'],\n wordWrap: ['overflowWrap']\n};\n\nvar uppercasePattern = /([A-Z])/g;\nvar msPattern$1 = /^ms-/;\n/**\n * Hyphenates a camelcased CSS property name, for example:\n *\n * > hyphenateStyleName('backgroundColor')\n * < \"background-color\"\n * > hyphenateStyleName('MozTransition')\n * < \"-moz-transition\"\n * > hyphenateStyleName('msTransition')\n * < \"-ms-transition\"\n *\n * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix\n * is converted to `-ms-`.\n */\n\nfunction hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern$1, '-ms-');\n}\n\n// 'msTransform' is correct, but the other prefixes should be capitalized\nvar badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/;\nvar msPattern = /^-ms-/;\nvar hyphenPattern = /-(.)/g; // style values shouldn't contain a semicolon\n\nvar badStyleValueWithSemicolonPattern = /;\\s*$/;\nvar warnedStyleNames = {};\nvar warnedStyleValues = {};\nvar warnedForNaNValue = false;\nvar warnedForInfinityValue = false;\n\nfunction camelize(string) {\n return string.replace(hyphenPattern, function (_, character) {\n return character.toUpperCase();\n });\n}\n\nfunction warnHyphenatedStyleName(name) {\n {\n if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {\n return;\n }\n\n warnedStyleNames[name] = true;\n\n error('Unsupported style property %s. Did you mean %s?', name, // As Andi Smith suggests\n // (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix\n // is converted to lowercase `ms`.\n camelize(name.replace(msPattern, 'ms-')));\n }\n}\n\nfunction warnBadVendoredStyleName(name) {\n {\n if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {\n return;\n }\n\n warnedStyleNames[name] = true;\n\n error('Unsupported vendor-prefixed style property %s. Did you mean %s?', name, name.charAt(0).toUpperCase() + name.slice(1));\n }\n}\n\nfunction warnStyleValueWithSemicolon(name, value) {\n {\n if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) {\n return;\n }\n\n warnedStyleValues[value] = true;\n\n error(\"Style property values shouldn't contain a semicolon. \" + 'Try \"%s: %s\" instead.', name, value.replace(badStyleValueWithSemicolonPattern, ''));\n }\n}\n\nfunction warnStyleValueIsNaN(name, value) {\n {\n if (warnedForNaNValue) {\n return;\n }\n\n warnedForNaNValue = true;\n\n error('`NaN` is an invalid value for the `%s` css style property.', name);\n }\n}\n\nfunction warnStyleValueIsInfinity(name, value) {\n {\n if (warnedForInfinityValue) {\n return;\n }\n\n warnedForInfinityValue = true;\n\n error('`Infinity` is an invalid value for the `%s` css style property.', name);\n }\n}\n\nfunction warnValidStyle(name, value) {\n {\n if (name.indexOf('-') > -1) {\n warnHyphenatedStyleName(name);\n } else if (badVendoredStyleNamePattern.test(name)) {\n warnBadVendoredStyleName(name);\n } else if (badStyleValueWithSemicolonPattern.test(value)) {\n warnStyleValueWithSemicolon(name, value);\n }\n\n if (typeof value === 'number') {\n if (isNaN(value)) {\n warnStyleValueIsNaN(name);\n } else if (!isFinite(value)) {\n warnStyleValueIsInfinity(name);\n }\n }\n }\n}\n\n/**\n * CSS properties which accept numbers but are not in units of \"px\".\n */\nvar unitlessNumbers = new Set(['animationIterationCount', 'aspectRatio', 'borderImageOutset', 'borderImageSlice', 'borderImageWidth', 'boxFlex', 'boxFlexGroup', 'boxOrdinalGroup', 'columnCount', 'columns', 'flex', 'flexGrow', 'flexPositive', 'flexShrink', 'flexNegative', 'flexOrder', 'gridArea', 'gridRow', 'gridRowEnd', 'gridRowSpan', 'gridRowStart', 'gridColumn', 'gridColumnEnd', 'gridColumnSpan', 'gridColumnStart', 'fontWeight', 'lineClamp', 'lineHeight', 'opacity', 'order', 'orphans', 'scale', 'tabSize', 'widows', 'zIndex', 'zoom', 'fillOpacity', // SVG-related properties\n'floodOpacity', 'stopOpacity', 'strokeDasharray', 'strokeDashoffset', 'strokeMiterlimit', 'strokeOpacity', 'strokeWidth', 'MozAnimationIterationCount', // Known Prefixed Properties\n'MozBoxFlex', // TODO: Remove these since they shouldn't be used in modern code\n'MozBoxFlexGroup', 'MozLineClamp', 'msAnimationIterationCount', 'msFlex', 'msZoom', 'msFlexGrow', 'msFlexNegative', 'msFlexOrder', 'msFlexPositive', 'msFlexShrink', 'msGridColumn', 'msGridColumnSpan', 'msGridRow', 'msGridRowSpan', 'WebkitAnimationIterationCount', 'WebkitBoxFlex', 'WebKitBoxFlexGroup', 'WebkitBoxOrdinalGroup', 'WebkitColumnCount', 'WebkitColumns', 'WebkitFlex', 'WebkitFlexGrow', 'WebkitFlexPositive', 'WebkitFlexShrink', 'WebkitLineClamp']);\nfunction isUnitlessNumber (name) {\n return unitlessNumbers.has(name);\n}\n\n/**\n * Operations for dealing with CSS properties.\n */\n\n/**\n * This creates a string that is expected to be equivalent to the style\n * attribute generated by server-side rendering. It by-passes warnings and\n * security checks so it's not safe to use this value for anything other than\n * comparison. It is only used in DEV for SSR validation.\n */\n\nfunction createDangerousStringForStyles(styles) {\n {\n var serialized = '';\n var delimiter = '';\n\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n\n var value = styles[styleName];\n\n if (value != null && typeof value !== 'boolean' && value !== '') {\n var isCustomProperty = styleName.indexOf('--') === 0;\n\n if (isCustomProperty) {\n {\n checkCSSPropertyStringCoercion(value, styleName);\n }\n\n serialized += delimiter + styleName + ':' + ('' + value).trim();\n } else {\n if (typeof value === 'number' && value !== 0 && !isUnitlessNumber(styleName)) {\n serialized += delimiter + hyphenateStyleName(styleName) + ':' + value + 'px';\n } else {\n {\n checkCSSPropertyStringCoercion(value, styleName);\n }\n\n serialized += delimiter + hyphenateStyleName(styleName) + ':' + ('' + value).trim();\n }\n }\n\n delimiter = ';';\n }\n }\n\n return serialized || null;\n }\n}\n\nfunction setValueForStyle(style, styleName, value) {\n var isCustomProperty = styleName.indexOf('--') === 0;\n\n {\n if (!isCustomProperty) {\n warnValidStyle(styleName, value);\n }\n }\n\n if (value == null || typeof value === 'boolean' || value === '') {\n if (isCustomProperty) {\n style.setProperty(styleName, '');\n } else if (styleName === 'float') {\n style.cssFloat = '';\n } else {\n style[styleName] = '';\n }\n } else if (isCustomProperty) {\n style.setProperty(styleName, value);\n } else if (typeof value === 'number' && value !== 0 && !isUnitlessNumber(styleName)) {\n style[styleName] = value + 'px'; // Presumes implicit 'px' suffix for unitless numbers\n } else {\n if (styleName === 'float') {\n style.cssFloat = value;\n } else {\n {\n checkCSSPropertyStringCoercion(value, styleName);\n }\n\n style[styleName] = ('' + value).trim();\n }\n }\n}\n/**\n * Sets the value for multiple styles on a node. If a value is specified as\n * '' (empty string), the corresponding style property will be unset.\n *\n * @param {DOMElement} node\n * @param {object} styles\n */\n\n\nfunction setValueForStyles(node, styles, prevStyles) {\n if (styles != null && typeof styles !== 'object') {\n throw new Error('The `style` prop expects a mapping from style properties to values, ' + \"not a string. For example, style={{marginRight: spacing + 'em'}} when \" + 'using JSX.');\n }\n\n {\n if (styles) {\n // Freeze the next style object so that we can assume it won't be\n // mutated. We have already warned for this in the past.\n Object.freeze(styles);\n }\n }\n\n var style = node.style;\n\n if (prevStyles != null) {\n {\n validateShorthandPropertyCollisionInDev(prevStyles, styles);\n }\n\n for (var styleName in prevStyles) {\n if (prevStyles.hasOwnProperty(styleName) && (styles == null || !styles.hasOwnProperty(styleName))) {\n // Clear style\n var isCustomProperty = styleName.indexOf('--') === 0;\n\n if (isCustomProperty) {\n style.setProperty(styleName, '');\n } else if (styleName === 'float') {\n style.cssFloat = '';\n } else {\n style[styleName] = '';\n }\n }\n }\n\n for (var _styleName in styles) {\n var value = styles[_styleName];\n\n if (styles.hasOwnProperty(_styleName) && prevStyles[_styleName] !== value) {\n setValueForStyle(style, _styleName, value);\n }\n }\n } else {\n for (var _styleName2 in styles) {\n if (styles.hasOwnProperty(_styleName2)) {\n var _value = styles[_styleName2];\n setValueForStyle(style, _styleName2, _value);\n }\n }\n }\n}\n\nfunction isValueEmpty(value) {\n return value == null || typeof value === 'boolean' || value === '';\n}\n/**\n * Given {color: 'red', overflow: 'hidden'} returns {\n * color: 'color',\n * overflowX: 'overflow',\n * overflowY: 'overflow',\n * }. This can be read as \"the overflowY property was set by the overflow\n * shorthand\". That is, the values are the property that each was derived from.\n */\n\n\nfunction expandShorthandMap(styles) {\n var expanded = {};\n\n for (var key in styles) {\n var longhands = shorthandToLonghand[key] || [key];\n\n for (var i = 0; i < longhands.length; i++) {\n expanded[longhands[i]] = key;\n }\n }\n\n return expanded;\n}\n/**\n * When mixing shorthand and longhand property names, we warn during updates if\n * we expect an incorrect result to occur. In particular, we warn for:\n *\n * Updating a shorthand property (longhand gets overwritten):\n * {font: 'foo', fontVariant: 'bar'} -> {font: 'baz', fontVariant: 'bar'}\n * becomes .style.font = 'baz'\n * Removing a shorthand property (longhand gets lost too):\n * {font: 'foo', fontVariant: 'bar'} -> {fontVariant: 'bar'}\n * becomes .style.font = ''\n * Removing a longhand property (should revert to shorthand; doesn't):\n * {font: 'foo', fontVariant: 'bar'} -> {font: 'foo'}\n * becomes .style.fontVariant = ''\n */\n\n\nfunction validateShorthandPropertyCollisionInDev(prevStyles, nextStyles) {\n {\n if (!nextStyles) {\n return;\n } // Compute the diff as it would happen elsewhere.\n\n\n var expandedUpdates = {};\n\n if (prevStyles) {\n for (var key in prevStyles) {\n if (prevStyles.hasOwnProperty(key) && !nextStyles.hasOwnProperty(key)) {\n var longhands = shorthandToLonghand[key] || [key];\n\n for (var i = 0; i < longhands.length; i++) {\n expandedUpdates[longhands[i]] = key;\n }\n }\n }\n }\n\n for (var _key in nextStyles) {\n if (nextStyles.hasOwnProperty(_key) && (!prevStyles || prevStyles[_key] !== nextStyles[_key])) {\n var _longhands = shorthandToLonghand[_key] || [_key];\n\n for (var _i = 0; _i < _longhands.length; _i++) {\n expandedUpdates[_longhands[_i]] = _key;\n }\n }\n }\n\n var expandedStyles = expandShorthandMap(nextStyles);\n var warnedAbout = {};\n\n for (var _key2 in expandedUpdates) {\n var originalKey = expandedUpdates[_key2];\n var correctOriginalKey = expandedStyles[_key2];\n\n if (correctOriginalKey && originalKey !== correctOriginalKey) {\n var warningKey = originalKey + ',' + correctOriginalKey;\n\n if (warnedAbout[warningKey]) {\n continue;\n }\n\n warnedAbout[warningKey] = true;\n\n error('%s a style property during rerender (%s) when a ' + 'conflicting property is set (%s) can lead to styling bugs. To ' + \"avoid this, don't mix shorthand and non-shorthand properties \" + 'for the same value; instead, replace the shorthand with ' + 'separate values.', isValueEmpty(nextStyles[originalKey]) ? 'Removing' : 'Updating', originalKey, correctOriginalKey);\n }\n }\n }\n}\n\nfunction isCustomElement(tagName, props) {\n if (tagName.indexOf('-') === -1) {\n return false;\n }\n\n switch (tagName) {\n // These are reserved SVG and MathML elements.\n // We don't mind this list too much because we expect it to never grow.\n // The alternative is to track the namespace in a few places which is convoluted.\n // https://html.spec.whatwg.org/multipage/custom-elements.html#custom-elements-core-concepts\n case 'annotation-xml':\n case 'color-profile':\n case 'font-face':\n case 'font-face-src':\n case 'font-face-uri':\n case 'font-face-format':\n case 'font-face-name':\n case 'missing-glyph':\n return false;\n\n default:\n return true;\n }\n}\n\nvar aliases = new Map([['acceptCharset', 'accept-charset'], ['htmlFor', 'for'], ['httpEquiv', 'http-equiv'], // HTML and SVG attributes, but the SVG attribute is case sensitive.],\n['crossOrigin', 'crossorigin'], // This is a list of all SVG attributes that need special casing.\n// Regular attributes that just accept strings.],\n['accentHeight', 'accent-height'], ['alignmentBaseline', 'alignment-baseline'], ['arabicForm', 'arabic-form'], ['baselineShift', 'baseline-shift'], ['capHeight', 'cap-height'], ['clipPath', 'clip-path'], ['clipRule', 'clip-rule'], ['colorInterpolation', 'color-interpolation'], ['colorInterpolationFilters', 'color-interpolation-filters'], ['colorProfile', 'color-profile'], ['colorRendering', 'color-rendering'], ['dominantBaseline', 'dominant-baseline'], ['enableBackground', 'enable-background'], ['fillOpacity', 'fill-opacity'], ['fillRule', 'fill-rule'], ['floodColor', 'flood-color'], ['floodOpacity', 'flood-opacity'], ['fontFamily', 'font-family'], ['fontSize', 'font-size'], ['fontSizeAdjust', 'font-size-adjust'], ['fontStretch', 'font-stretch'], ['fontStyle', 'font-style'], ['fontVariant', 'font-variant'], ['fontWeight', 'font-weight'], ['glyphName', 'glyph-name'], ['glyphOrientationHorizontal', 'glyph-orientation-horizontal'], ['glyphOrientationVertical', 'glyph-orientation-vertical'], ['horizAdvX', 'horiz-adv-x'], ['horizOriginX', 'horiz-origin-x'], ['imageRendering', 'image-rendering'], ['letterSpacing', 'letter-spacing'], ['lightingColor', 'lighting-color'], ['markerEnd', 'marker-end'], ['markerMid', 'marker-mid'], ['markerStart', 'marker-start'], ['overlinePosition', 'overline-position'], ['overlineThickness', 'overline-thickness'], ['paintOrder', 'paint-order'], ['panose-1', 'panose-1'], ['pointerEvents', 'pointer-events'], ['renderingIntent', 'rendering-intent'], ['shapeRendering', 'shape-rendering'], ['stopColor', 'stop-color'], ['stopOpacity', 'stop-opacity'], ['strikethroughPosition', 'strikethrough-position'], ['strikethroughThickness', 'strikethrough-thickness'], ['strokeDasharray', 'stroke-dasharray'], ['strokeDashoffset', 'stroke-dashoffset'], ['strokeLinecap', 'stroke-linecap'], ['strokeLinejoin', 'stroke-linejoin'], ['strokeMiterlimit', 'stroke-miterlimit'], ['strokeOpacity', 'stroke-opacity'], ['strokeWidth', 'stroke-width'], ['textAnchor', 'text-anchor'], ['textDecoration', 'text-decoration'], ['textRendering', 'text-rendering'], ['transformOrigin', 'transform-origin'], ['underlinePosition', 'underline-position'], ['underlineThickness', 'underline-thickness'], ['unicodeBidi', 'unicode-bidi'], ['unicodeRange', 'unicode-range'], ['unitsPerEm', 'units-per-em'], ['vAlphabetic', 'v-alphabetic'], ['vHanging', 'v-hanging'], ['vIdeographic', 'v-ideographic'], ['vMathematical', 'v-mathematical'], ['vectorEffect', 'vector-effect'], ['vertAdvY', 'vert-adv-y'], ['vertOriginX', 'vert-origin-x'], ['vertOriginY', 'vert-origin-y'], ['wordSpacing', 'word-spacing'], ['writingMode', 'writing-mode'], ['xmlnsXlink', 'xmlns:xlink'], ['xHeight', 'x-height']]);\nfunction getAttributeAlias (name) {\n return aliases.get(name) || name;\n}\n\n// also add them to this module to ensure casing and incorrect name\n// warnings.\n\nvar possibleStandardNames = {\n // HTML\n accept: 'accept',\n acceptcharset: 'acceptCharset',\n 'accept-charset': 'acceptCharset',\n accesskey: 'accessKey',\n action: 'action',\n allowfullscreen: 'allowFullScreen',\n alt: 'alt',\n as: 'as',\n async: 'async',\n autocapitalize: 'autoCapitalize',\n autocomplete: 'autoComplete',\n autocorrect: 'autoCorrect',\n autofocus: 'autoFocus',\n autoplay: 'autoPlay',\n autosave: 'autoSave',\n capture: 'capture',\n cellpadding: 'cellPadding',\n cellspacing: 'cellSpacing',\n challenge: 'challenge',\n charset: 'charSet',\n checked: 'checked',\n children: 'children',\n cite: 'cite',\n class: 'className',\n classid: 'classID',\n classname: 'className',\n cols: 'cols',\n colspan: 'colSpan',\n content: 'content',\n contenteditable: 'contentEditable',\n contextmenu: 'contextMenu',\n controls: 'controls',\n controlslist: 'controlsList',\n coords: 'coords',\n crossorigin: 'crossOrigin',\n dangerouslysetinnerhtml: 'dangerouslySetInnerHTML',\n data: 'data',\n datetime: 'dateTime',\n default: 'default',\n defaultchecked: 'defaultChecked',\n defaultvalue: 'defaultValue',\n defer: 'defer',\n dir: 'dir',\n disabled: 'disabled',\n disablepictureinpicture: 'disablePictureInPicture',\n disableremoteplayback: 'disableRemotePlayback',\n download: 'download',\n draggable: 'draggable',\n enctype: 'encType',\n enterkeyhint: 'enterKeyHint',\n fetchpriority: 'fetchPriority',\n for: 'htmlFor',\n form: 'form',\n formmethod: 'formMethod',\n formaction: 'formAction',\n formenctype: 'formEncType',\n formnovalidate: 'formNoValidate',\n formtarget: 'formTarget',\n frameborder: 'frameBorder',\n headers: 'headers',\n height: 'height',\n hidden: 'hidden',\n high: 'high',\n href: 'href',\n hreflang: 'hrefLang',\n htmlfor: 'htmlFor',\n httpequiv: 'httpEquiv',\n 'http-equiv': 'httpEquiv',\n icon: 'icon',\n id: 'id',\n imagesizes: 'imageSizes',\n imagesrcset: 'imageSrcSet',\n innerhtml: 'innerHTML',\n inputmode: 'inputMode',\n integrity: 'integrity',\n is: 'is',\n itemid: 'itemID',\n itemprop: 'itemProp',\n itemref: 'itemRef',\n itemscope: 'itemScope',\n itemtype: 'itemType',\n keyparams: 'keyParams',\n keytype: 'keyType',\n kind: 'kind',\n label: 'label',\n lang: 'lang',\n list: 'list',\n loop: 'loop',\n low: 'low',\n manifest: 'manifest',\n marginwidth: 'marginWidth',\n marginheight: 'marginHeight',\n max: 'max',\n maxlength: 'maxLength',\n media: 'media',\n mediagroup: 'mediaGroup',\n method: 'method',\n min: 'min',\n minlength: 'minLength',\n multiple: 'multiple',\n muted: 'muted',\n name: 'name',\n nomodule: 'noModule',\n nonce: 'nonce',\n novalidate: 'noValidate',\n open: 'open',\n optimum: 'optimum',\n pattern: 'pattern',\n placeholder: 'placeholder',\n playsinline: 'playsInline',\n poster: 'poster',\n preload: 'preload',\n profile: 'profile',\n radiogroup: 'radioGroup',\n readonly: 'readOnly',\n referrerpolicy: 'referrerPolicy',\n rel: 'rel',\n required: 'required',\n reversed: 'reversed',\n role: 'role',\n rows: 'rows',\n rowspan: 'rowSpan',\n sandbox: 'sandbox',\n scope: 'scope',\n scoped: 'scoped',\n scrolling: 'scrolling',\n seamless: 'seamless',\n selected: 'selected',\n shape: 'shape',\n size: 'size',\n sizes: 'sizes',\n span: 'span',\n spellcheck: 'spellCheck',\n src: 'src',\n srcdoc: 'srcDoc',\n srclang: 'srcLang',\n srcset: 'srcSet',\n start: 'start',\n step: 'step',\n style: 'style',\n summary: 'summary',\n tabindex: 'tabIndex',\n target: 'target',\n title: 'title',\n type: 'type',\n usemap: 'useMap',\n value: 'value',\n width: 'width',\n wmode: 'wmode',\n wrap: 'wrap',\n // SVG\n about: 'about',\n accentheight: 'accentHeight',\n 'accent-height': 'accentHeight',\n accumulate: 'accumulate',\n additive: 'additive',\n alignmentbaseline: 'alignmentBaseline',\n 'alignment-baseline': 'alignmentBaseline',\n allowreorder: 'allowReorder',\n alphabetic: 'alphabetic',\n amplitude: 'amplitude',\n arabicform: 'arabicForm',\n 'arabic-form': 'arabicForm',\n ascent: 'ascent',\n attributename: 'attributeName',\n attributetype: 'attributeType',\n autoreverse: 'autoReverse',\n azimuth: 'azimuth',\n basefrequency: 'baseFrequency',\n baselineshift: 'baselineShift',\n 'baseline-shift': 'baselineShift',\n baseprofile: 'baseProfile',\n bbox: 'bbox',\n begin: 'begin',\n bias: 'bias',\n by: 'by',\n calcmode: 'calcMode',\n capheight: 'capHeight',\n 'cap-height': 'capHeight',\n clip: 'clip',\n clippath: 'clipPath',\n 'clip-path': 'clipPath',\n clippathunits: 'clipPathUnits',\n cliprule: 'clipRule',\n 'clip-rule': 'clipRule',\n color: 'color',\n colorinterpolation: 'colorInterpolation',\n 'color-interpolation': 'colorInterpolation',\n colorinterpolationfilters: 'colorInterpolationFilters',\n 'color-interpolation-filters': 'colorInterpolationFilters',\n colorprofile: 'colorProfile',\n 'color-profile': 'colorProfile',\n colorrendering: 'colorRendering',\n 'color-rendering': 'colorRendering',\n contentscripttype: 'contentScriptType',\n contentstyletype: 'contentStyleType',\n cursor: 'cursor',\n cx: 'cx',\n cy: 'cy',\n d: 'd',\n datatype: 'datatype',\n decelerate: 'decelerate',\n descent: 'descent',\n diffuseconstant: 'diffuseConstant',\n direction: 'direction',\n display: 'display',\n divisor: 'divisor',\n dominantbaseline: 'dominantBaseline',\n 'dominant-baseline': 'dominantBaseline',\n dur: 'dur',\n dx: 'dx',\n dy: 'dy',\n edgemode: 'edgeMode',\n elevation: 'elevation',\n enablebackground: 'enableBackground',\n 'enable-background': 'enableBackground',\n end: 'end',\n exponent: 'exponent',\n externalresourcesrequired: 'externalResourcesRequired',\n fill: 'fill',\n fillopacity: 'fillOpacity',\n 'fill-opacity': 'fillOpacity',\n fillrule: 'fillRule',\n 'fill-rule': 'fillRule',\n filter: 'filter',\n filterres: 'filterRes',\n filterunits: 'filterUnits',\n floodopacity: 'floodOpacity',\n 'flood-opacity': 'floodOpacity',\n floodcolor: 'floodColor',\n 'flood-color': 'floodColor',\n focusable: 'focusable',\n fontfamily: 'fontFamily',\n 'font-family': 'fontFamily',\n fontsize: 'fontSize',\n 'font-size': 'fontSize',\n fontsizeadjust: 'fontSizeAdjust',\n 'font-size-adjust': 'fontSizeAdjust',\n fontstretch: 'fontStretch',\n 'font-stretch': 'fontStretch',\n fontstyle: 'fontStyle',\n 'font-style': 'fontStyle',\n fontvariant: 'fontVariant',\n 'font-variant': 'fontVariant',\n fontweight: 'fontWeight',\n 'font-weight': 'fontWeight',\n format: 'format',\n from: 'from',\n fx: 'fx',\n fy: 'fy',\n g1: 'g1',\n g2: 'g2',\n glyphname: 'glyphName',\n 'glyph-name': 'glyphName',\n glyphorientationhorizontal: 'glyphOrientationHorizontal',\n 'glyph-orientation-horizontal': 'glyphOrientationHorizontal',\n glyphorientationvertical: 'glyphOrientationVertical',\n 'glyph-orientation-vertical': 'glyphOrientationVertical',\n glyphref: 'glyphRef',\n gradienttransform: 'gradientTransform',\n gradientunits: 'gradientUnits',\n hanging: 'hanging',\n horizadvx: 'horizAdvX',\n 'horiz-adv-x': 'horizAdvX',\n horizoriginx: 'horizOriginX',\n 'horiz-origin-x': 'horizOriginX',\n ideographic: 'ideographic',\n imagerendering: 'imageRendering',\n 'image-rendering': 'imageRendering',\n in2: 'in2',\n in: 'in',\n inlist: 'inlist',\n intercept: 'intercept',\n k1: 'k1',\n k2: 'k2',\n k3: 'k3',\n k4: 'k4',\n k: 'k',\n kernelmatrix: 'kernelMatrix',\n kernelunitlength: 'kernelUnitLength',\n kerning: 'kerning',\n keypoints: 'keyPoints',\n keysplines: 'keySplines',\n keytimes: 'keyTimes',\n lengthadjust: 'lengthAdjust',\n letterspacing: 'letterSpacing',\n 'letter-spacing': 'letterSpacing',\n lightingcolor: 'lightingColor',\n 'lighting-color': 'lightingColor',\n limitingconeangle: 'limitingConeAngle',\n local: 'local',\n markerend: 'markerEnd',\n 'marker-end': 'markerEnd',\n markerheight: 'markerHeight',\n markermid: 'markerMid',\n 'marker-mid': 'markerMid',\n markerstart: 'markerStart',\n 'marker-start': 'markerStart',\n markerunits: 'markerUnits',\n markerwidth: 'markerWidth',\n mask: 'mask',\n maskcontentunits: 'maskContentUnits',\n maskunits: 'maskUnits',\n mathematical: 'mathematical',\n mode: 'mode',\n numoctaves: 'numOctaves',\n offset: 'offset',\n opacity: 'opacity',\n operator: 'operator',\n order: 'order',\n orient: 'orient',\n orientation: 'orientation',\n origin: 'origin',\n overflow: 'overflow',\n overlineposition: 'overlinePosition',\n 'overline-position': 'overlinePosition',\n overlinethickness: 'overlineThickness',\n 'overline-thickness': 'overlineThickness',\n paintorder: 'paintOrder',\n 'paint-order': 'paintOrder',\n panose1: 'panose1',\n 'panose-1': 'panose1',\n pathlength: 'pathLength',\n patterncontentunits: 'patternContentUnits',\n patterntransform: 'patternTransform',\n patternunits: 'patternUnits',\n pointerevents: 'pointerEvents',\n 'pointer-events': 'pointerEvents',\n points: 'points',\n pointsatx: 'pointsAtX',\n pointsaty: 'pointsAtY',\n pointsatz: 'pointsAtZ',\n prefix: 'prefix',\n preservealpha: 'preserveAlpha',\n preserveaspectratio: 'preserveAspectRatio',\n primitiveunits: 'primitiveUnits',\n property: 'property',\n r: 'r',\n radius: 'radius',\n refx: 'refX',\n refy: 'refY',\n renderingintent: 'renderingIntent',\n 'rendering-intent': 'renderingIntent',\n repeatcount: 'repeatCount',\n repeatdur: 'repeatDur',\n requiredextensions: 'requiredExtensions',\n requiredfeatures: 'requiredFeatures',\n resource: 'resource',\n restart: 'restart',\n result: 'result',\n results: 'results',\n rotate: 'rotate',\n rx: 'rx',\n ry: 'ry',\n scale: 'scale',\n security: 'security',\n seed: 'seed',\n shaperendering: 'shapeRendering',\n 'shape-rendering': 'shapeRendering',\n slope: 'slope',\n spacing: 'spacing',\n specularconstant: 'specularConstant',\n specularexponent: 'specularExponent',\n speed: 'speed',\n spreadmethod: 'spreadMethod',\n startoffset: 'startOffset',\n stddeviation: 'stdDeviation',\n stemh: 'stemh',\n stemv: 'stemv',\n stitchtiles: 'stitchTiles',\n stopcolor: 'stopColor',\n 'stop-color': 'stopColor',\n stopopacity: 'stopOpacity',\n 'stop-opacity': 'stopOpacity',\n strikethroughposition: 'strikethroughPosition',\n 'strikethrough-position': 'strikethroughPosition',\n strikethroughthickness: 'strikethroughThickness',\n 'strikethrough-thickness': 'strikethroughThickness',\n string: 'string',\n stroke: 'stroke',\n strokedasharray: 'strokeDasharray',\n 'stroke-dasharray': 'strokeDasharray',\n strokedashoffset: 'strokeDashoffset',\n 'stroke-dashoffset': 'strokeDashoffset',\n strokelinecap: 'strokeLinecap',\n 'stroke-linecap': 'strokeLinecap',\n strokelinejoin: 'strokeLinejoin',\n 'stroke-linejoin': 'strokeLinejoin',\n strokemiterlimit: 'strokeMiterlimit',\n 'stroke-miterlimit': 'strokeMiterlimit',\n strokewidth: 'strokeWidth',\n 'stroke-width': 'strokeWidth',\n strokeopacity: 'strokeOpacity',\n 'stroke-opacity': 'strokeOpacity',\n suppresscontenteditablewarning: 'suppressContentEditableWarning',\n suppresshydrationwarning: 'suppressHydrationWarning',\n surfacescale: 'surfaceScale',\n systemlanguage: 'systemLanguage',\n tablevalues: 'tableValues',\n targetx: 'targetX',\n targety: 'targetY',\n textanchor: 'textAnchor',\n 'text-anchor': 'textAnchor',\n textdecoration: 'textDecoration',\n 'text-decoration': 'textDecoration',\n textlength: 'textLength',\n textrendering: 'textRendering',\n 'text-rendering': 'textRendering',\n to: 'to',\n transform: 'transform',\n transformorigin: 'transformOrigin',\n 'transform-origin': 'transformOrigin',\n typeof: 'typeof',\n u1: 'u1',\n u2: 'u2',\n underlineposition: 'underlinePosition',\n 'underline-position': 'underlinePosition',\n underlinethickness: 'underlineThickness',\n 'underline-thickness': 'underlineThickness',\n unicode: 'unicode',\n unicodebidi: 'unicodeBidi',\n 'unicode-bidi': 'unicodeBidi',\n unicoderange: 'unicodeRange',\n 'unicode-range': 'unicodeRange',\n unitsperem: 'unitsPerEm',\n 'units-per-em': 'unitsPerEm',\n unselectable: 'unselectable',\n valphabetic: 'vAlphabetic',\n 'v-alphabetic': 'vAlphabetic',\n values: 'values',\n vectoreffect: 'vectorEffect',\n 'vector-effect': 'vectorEffect',\n version: 'version',\n vertadvy: 'vertAdvY',\n 'vert-adv-y': 'vertAdvY',\n vertoriginx: 'vertOriginX',\n 'vert-origin-x': 'vertOriginX',\n vertoriginy: 'vertOriginY',\n 'vert-origin-y': 'vertOriginY',\n vhanging: 'vHanging',\n 'v-hanging': 'vHanging',\n videographic: 'vIdeographic',\n 'v-ideographic': 'vIdeographic',\n viewbox: 'viewBox',\n viewtarget: 'viewTarget',\n visibility: 'visibility',\n vmathematical: 'vMathematical',\n 'v-mathematical': 'vMathematical',\n vocab: 'vocab',\n widths: 'widths',\n wordspacing: 'wordSpacing',\n 'word-spacing': 'wordSpacing',\n writingmode: 'writingMode',\n 'writing-mode': 'writingMode',\n x1: 'x1',\n x2: 'x2',\n x: 'x',\n xchannelselector: 'xChannelSelector',\n xheight: 'xHeight',\n 'x-height': 'xHeight',\n xlinkactuate: 'xlinkActuate',\n 'xlink:actuate': 'xlinkActuate',\n xlinkarcrole: 'xlinkArcrole',\n 'xlink:arcrole': 'xlinkArcrole',\n xlinkhref: 'xlinkHref',\n 'xlink:href': 'xlinkHref',\n xlinkrole: 'xlinkRole',\n 'xlink:role': 'xlinkRole',\n xlinkshow: 'xlinkShow',\n 'xlink:show': 'xlinkShow',\n xlinktitle: 'xlinkTitle',\n 'xlink:title': 'xlinkTitle',\n xlinktype: 'xlinkType',\n 'xlink:type': 'xlinkType',\n xmlbase: 'xmlBase',\n 'xml:base': 'xmlBase',\n xmllang: 'xmlLang',\n 'xml:lang': 'xmlLang',\n xmlns: 'xmlns',\n 'xml:space': 'xmlSpace',\n xmlnsxlink: 'xmlnsXlink',\n 'xmlns:xlink': 'xmlnsXlink',\n xmlspace: 'xmlSpace',\n y1: 'y1',\n y2: 'y2',\n y: 'y',\n ychannelselector: 'yChannelSelector',\n z: 'z',\n zoomandpan: 'zoomAndPan'\n};\n\nvar ariaProperties = {\n 'aria-current': 0,\n // state\n 'aria-description': 0,\n 'aria-details': 0,\n 'aria-disabled': 0,\n // state\n 'aria-hidden': 0,\n // state\n 'aria-invalid': 0,\n // state\n 'aria-keyshortcuts': 0,\n 'aria-label': 0,\n 'aria-roledescription': 0,\n // Widget Attributes\n 'aria-autocomplete': 0,\n 'aria-checked': 0,\n 'aria-expanded': 0,\n 'aria-haspopup': 0,\n 'aria-level': 0,\n 'aria-modal': 0,\n 'aria-multiline': 0,\n 'aria-multiselectable': 0,\n 'aria-orientation': 0,\n 'aria-placeholder': 0,\n 'aria-pressed': 0,\n 'aria-readonly': 0,\n 'aria-required': 0,\n 'aria-selected': 0,\n 'aria-sort': 0,\n 'aria-valuemax': 0,\n 'aria-valuemin': 0,\n 'aria-valuenow': 0,\n 'aria-valuetext': 0,\n // Live Region Attributes\n 'aria-atomic': 0,\n 'aria-busy': 0,\n 'aria-live': 0,\n 'aria-relevant': 0,\n // Drag-and-Drop Attributes\n 'aria-dropeffect': 0,\n 'aria-grabbed': 0,\n // Relationship Attributes\n 'aria-activedescendant': 0,\n 'aria-colcount': 0,\n 'aria-colindex': 0,\n 'aria-colspan': 0,\n 'aria-controls': 0,\n 'aria-describedby': 0,\n 'aria-errormessage': 0,\n 'aria-flowto': 0,\n 'aria-labelledby': 0,\n 'aria-owns': 0,\n 'aria-posinset': 0,\n 'aria-rowcount': 0,\n 'aria-rowindex': 0,\n 'aria-rowspan': 0,\n 'aria-setsize': 0\n};\n\nvar warnedProperties$1 = {};\nvar rARIA$1 = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$');\nvar rARIACamel$1 = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$');\n\nfunction validateProperty$1(tagName, name) {\n {\n if (hasOwnProperty.call(warnedProperties$1, name) && warnedProperties$1[name]) {\n return true;\n }\n\n if (rARIACamel$1.test(name)) {\n var ariaName = 'aria-' + name.slice(4).toLowerCase();\n var correctName = ariaProperties.hasOwnProperty(ariaName) ? ariaName : null; // If this is an aria-* attribute, but is not listed in the known DOM\n // DOM properties, then it is an invalid aria-* attribute.\n\n if (correctName == null) {\n error('Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.', name);\n\n warnedProperties$1[name] = true;\n return true;\n } // aria-* attributes should be lowercase; suggest the lowercase version.\n\n\n if (name !== correctName) {\n error('Invalid ARIA attribute `%s`. Did you mean `%s`?', name, correctName);\n\n warnedProperties$1[name] = true;\n return true;\n }\n }\n\n if (rARIA$1.test(name)) {\n var lowerCasedName = name.toLowerCase();\n var standardName = ariaProperties.hasOwnProperty(lowerCasedName) ? lowerCasedName : null; // If this is an aria-* attribute, but is not listed in the known DOM\n // DOM properties, then it is an invalid aria-* attribute.\n\n if (standardName == null) {\n warnedProperties$1[name] = true;\n return false;\n } // aria-* attributes should be lowercase; suggest the lowercase version.\n\n\n if (name !== standardName) {\n error('Unknown ARIA attribute `%s`. Did you mean `%s`?', name, standardName);\n\n warnedProperties$1[name] = true;\n return true;\n }\n }\n }\n\n return true;\n}\n\nfunction validateProperties$2(type, props) {\n {\n var invalidProps = [];\n\n for (var key in props) {\n var isValid = validateProperty$1(type, key);\n\n if (!isValid) {\n invalidProps.push(key);\n }\n }\n\n var unknownPropString = invalidProps.map(function (prop) {\n return '`' + prop + '`';\n }).join(', ');\n\n if (invalidProps.length === 1) {\n error('Invalid aria prop %s on <%s> tag. ' + 'For details, see https://react.dev/link/invalid-aria-props', unknownPropString, type);\n } else if (invalidProps.length > 1) {\n error('Invalid aria props %s on <%s> tag. ' + 'For details, see https://react.dev/link/invalid-aria-props', unknownPropString, type);\n }\n }\n}\n\nvar didWarnValueNull = false;\nfunction validateProperties$1(type, props) {\n {\n if (type !== 'input' && type !== 'textarea' && type !== 'select') {\n return;\n }\n\n if (props != null && props.value === null && !didWarnValueNull) {\n didWarnValueNull = true;\n\n if (type === 'select' && props.multiple) {\n error('`value` prop on `%s` should not be null. ' + 'Consider using an empty array when `multiple` is set to `true` ' + 'to clear the component or `undefined` for uncontrolled components.', type);\n } else {\n error('`value` prop on `%s` should not be null. ' + 'Consider using an empty string to clear the component or `undefined` ' + 'for uncontrolled components.', type);\n }\n }\n }\n}\n\nvar warnedProperties = {};\nvar EVENT_NAME_REGEX = /^on./;\nvar INVALID_EVENT_NAME_REGEX = /^on[^A-Z]/;\nvar rARIA = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$') ;\nvar rARIACamel = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$') ;\n\nfunction validateProperty(tagName, name, value, eventRegistry) {\n {\n if (hasOwnProperty.call(warnedProperties, name) && warnedProperties[name]) {\n return true;\n }\n\n var lowerCasedName = name.toLowerCase();\n\n if (lowerCasedName === 'onfocusin' || lowerCasedName === 'onfocusout') {\n error('React uses onFocus and onBlur instead of onFocusIn and onFocusOut. ' + 'All React events are normalized to bubble, so onFocusIn and onFocusOut ' + 'are not needed/supported by React.');\n\n warnedProperties[name] = true;\n return true;\n }\n\n {\n // Actions are special because unlike events they can have other value types.\n if (typeof value === 'function') {\n if (tagName === 'form' && name === 'action') {\n return true;\n }\n\n if (tagName === 'input' && name === 'formAction') {\n return true;\n }\n\n if (tagName === 'button' && name === 'formAction') {\n return true;\n }\n }\n } // We can't rely on the event system being injected on the server.\n\n\n if (eventRegistry != null) {\n var registrationNameDependencies = eventRegistry.registrationNameDependencies,\n possibleRegistrationNames = eventRegistry.possibleRegistrationNames;\n\n if (registrationNameDependencies.hasOwnProperty(name)) {\n return true;\n }\n\n var registrationName = possibleRegistrationNames.hasOwnProperty(lowerCasedName) ? possibleRegistrationNames[lowerCasedName] : null;\n\n if (registrationName != null) {\n error('Invalid event handler property `%s`. Did you mean `%s`?', name, registrationName);\n\n warnedProperties[name] = true;\n return true;\n }\n\n if (EVENT_NAME_REGEX.test(name)) {\n error('Unknown event handler property `%s`. It will be ignored.', name);\n\n warnedProperties[name] = true;\n return true;\n }\n } else if (EVENT_NAME_REGEX.test(name)) {\n // If no event plugins have been injected, we are in a server environment.\n // So we can't tell if the event name is correct for sure, but we can filter\n // out known bad ones like `onclick`. We can't suggest a specific replacement though.\n if (INVALID_EVENT_NAME_REGEX.test(name)) {\n error('Invalid event handler property `%s`. ' + 'React events use the camelCase naming convention, for example `onClick`.', name);\n }\n\n warnedProperties[name] = true;\n return true;\n } // Let the ARIA attribute hook validate ARIA attributes\n\n\n if (rARIA.test(name) || rARIACamel.test(name)) {\n return true;\n }\n\n if (lowerCasedName === 'innerhtml') {\n error('Directly setting property `innerHTML` is not permitted. ' + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.');\n\n warnedProperties[name] = true;\n return true;\n }\n\n if (lowerCasedName === 'aria') {\n error('The `aria` attribute is reserved for future use in React. ' + 'Pass individual `aria-` attributes instead.');\n\n warnedProperties[name] = true;\n return true;\n }\n\n if (lowerCasedName === 'is' && value !== null && value !== undefined && typeof value !== 'string') {\n error('Received a `%s` for a string attribute `is`. If this is expected, cast ' + 'the value to a string.', typeof value);\n\n warnedProperties[name] = true;\n return true;\n }\n\n if (typeof value === 'number' && isNaN(value)) {\n error('Received NaN for the `%s` attribute. If this is expected, cast ' + 'the value to a string.', name);\n\n warnedProperties[name] = true;\n return true;\n } // Known attributes should match the casing specified in the property config.\n\n\n if (possibleStandardNames.hasOwnProperty(lowerCasedName)) {\n var standardName = possibleStandardNames[lowerCasedName];\n\n if (standardName !== name) {\n error('Invalid DOM property `%s`. Did you mean `%s`?', name, standardName);\n\n warnedProperties[name] = true;\n return true;\n }\n } else if (name !== lowerCasedName) {\n // Unknown attributes should have lowercase casing since that's how they\n // will be cased anyway with server rendering.\n error('React does not recognize the `%s` prop on a DOM element. If you ' + 'intentionally want it to appear in the DOM as a custom ' + 'attribute, spell it as lowercase `%s` instead. ' + 'If you accidentally passed it from a parent component, remove ' + 'it from the DOM element.', name, lowerCasedName);\n\n warnedProperties[name] = true;\n return true;\n } // Now that we've validated casing, do not validate\n // data types for reserved props\n\n\n switch (name) {\n case 'dangerouslySetInnerHTML':\n case 'children':\n case 'style':\n case 'suppressContentEditableWarning':\n case 'suppressHydrationWarning':\n case 'defaultValue': // Reserved\n\n case 'defaultChecked':\n case 'innerHTML':\n case 'ref':\n {\n return true;\n }\n\n }\n\n switch (typeof value) {\n case 'boolean':\n {\n switch (name) {\n case 'autoFocus':\n case 'checked':\n case 'multiple':\n case 'muted':\n case 'selected':\n case 'contentEditable':\n case 'spellCheck':\n case 'draggable':\n case 'value':\n case 'autoReverse':\n case 'externalResourcesRequired':\n case 'focusable':\n case 'preserveAlpha':\n case 'allowFullScreen':\n case 'async':\n case 'autoPlay':\n case 'controls':\n case 'default':\n case 'defer':\n case 'disabled':\n case 'disablePictureInPicture':\n case 'disableRemotePlayback':\n case 'formNoValidate':\n case 'hidden':\n case 'loop':\n case 'noModule':\n case 'noValidate':\n case 'open':\n case 'playsInline':\n case 'readOnly':\n case 'required':\n case 'reversed':\n case 'scoped':\n case 'seamless':\n case 'itemScope':\n case 'capture':\n case 'download':\n {\n // Boolean properties can accept boolean values\n return true;\n }\n // fallthrough\n\n case 'inert':\n // fallthrough for new boolean props without the flag on\n\n default:\n {\n var prefix = name.toLowerCase().slice(0, 5);\n\n if (prefix === 'data-' || prefix === 'aria-') {\n return true;\n }\n\n if (value) {\n error('Received `%s` for a non-boolean attribute `%s`.\\n\\n' + 'If you want to write it to the DOM, pass a string instead: ' + '%s=\"%s\" or %s={value.toString()}.', value, name, name, value, name);\n } else {\n error('Received `%s` for a non-boolean attribute `%s`.\\n\\n' + 'If you want to write it to the DOM, pass a string instead: ' + '%s=\"%s\" or %s={value.toString()}.\\n\\n' + 'If you used to conditionally omit it with %s={condition && value}, ' + 'pass %s={condition ? value : undefined} instead.', value, name, name, value, name, name, name);\n }\n\n warnedProperties[name] = true;\n return true;\n }\n }\n }\n\n case 'function':\n case 'symbol':\n // eslint-disable-line\n // Warn when a known attribute is a bad type\n warnedProperties[name] = true;\n return false;\n\n case 'string':\n {\n // Warn when passing the strings 'false' or 'true' into a boolean prop\n if (value === 'false' || value === 'true') {\n switch (name) {\n case 'checked':\n case 'selected':\n case 'multiple':\n case 'muted':\n case 'allowFullScreen':\n case 'async':\n case 'autoPlay':\n case 'controls':\n case 'default':\n case 'defer':\n case 'disabled':\n case 'disablePictureInPicture':\n case 'disableRemotePlayback':\n case 'formNoValidate':\n case 'hidden':\n case 'loop':\n case 'noModule':\n case 'noValidate':\n case 'open':\n case 'playsInline':\n case 'readOnly':\n case 'required':\n case 'reversed':\n case 'scoped':\n case 'seamless':\n case 'itemScope':\n {\n break;\n }\n\n case 'inert':\n // fallthrough for new boolean props without the flag on\n\n default:\n {\n return true;\n }\n }\n\n error('Received the string `%s` for the boolean attribute `%s`. ' + '%s ' + 'Did you mean %s={%s}?', value, name, value === 'false' ? 'The browser will interpret it as a truthy value.' : 'Although this works, it will not work as expected if you pass the string \"false\".', name, value);\n\n warnedProperties[name] = true;\n return true;\n }\n }\n }\n\n return true;\n }\n}\n\nfunction warnUnknownProperties(type, props, eventRegistry) {\n {\n var unknownProps = [];\n\n for (var key in props) {\n var isValid = validateProperty(type, key, props[key], eventRegistry);\n\n if (!isValid) {\n unknownProps.push(key);\n }\n }\n\n var unknownPropString = unknownProps.map(function (prop) {\n return '`' + prop + '`';\n }).join(', ');\n\n if (unknownProps.length === 1) {\n error('Invalid value for prop %s on <%s> tag. Either remove it from the element, ' + 'or pass a string or number value to keep it in the DOM. ' + 'For details, see https://react.dev/link/attribute-behavior ', unknownPropString, type);\n } else if (unknownProps.length > 1) {\n error('Invalid values for props %s on <%s> tag. Either remove them from the element, ' + 'or pass a string or number value to keep them in the DOM. ' + 'For details, see https://react.dev/link/attribute-behavior ', unknownPropString, type);\n }\n }\n}\n\nfunction validateProperties(type, props, eventRegistry) {\n if (isCustomElement(type) || typeof props.is === 'string') {\n return;\n }\n\n warnUnknownProperties(type, props, eventRegistry);\n}\n\n// and any newline or tab are filtered out as if they're not part of the URL.\n// https://url.spec.whatwg.org/#url-parsing\n// Tab or newline are defined as \\r\\n\\t:\n// https://infra.spec.whatwg.org/#ascii-tab-or-newline\n// A C0 control is a code point in the range \\u0000 NULL to \\u001F\n// INFORMATION SEPARATOR ONE, inclusive:\n// https://infra.spec.whatwg.org/#c0-control-or-space\n\n/* eslint-disable max-len */\n\nvar isJavaScriptProtocol = /^[\\u0000-\\u001F ]*j[\\r\\n\\t]*a[\\r\\n\\t]*v[\\r\\n\\t]*a[\\r\\n\\t]*s[\\r\\n\\t]*c[\\r\\n\\t]*r[\\r\\n\\t]*i[\\r\\n\\t]*p[\\r\\n\\t]*t[\\r\\n\\t]*\\:/i;\nvar didWarn = false;\n\nfunction sanitizeURL(url) {\n // We should never have symbols here because they get filtered out elsewhere.\n // eslint-disable-next-line react-internal/safe-string-coercion\n var stringifiedURL = '' + url;\n\n {\n if (!didWarn && isJavaScriptProtocol.test(stringifiedURL)) {\n didWarn = true;\n\n error('A future version of React will block javascript: URLs as a security precaution. ' + 'Use event handlers instead if you can. If you need to generate unsafe HTML try ' + 'using dangerouslySetInnerHTML instead. React was passed %s.', JSON.stringify(stringifiedURL));\n }\n }\n\n return url;\n}\n\nvar IS_EVENT_HANDLE_NON_MANAGED_NODE = 1;\nvar IS_NON_DELEGATED = 1 << 1;\nvar IS_CAPTURE_PHASE = 1 << 2;\n// set to LEGACY_FB_SUPPORT. LEGACY_FB_SUPPORT only gets set when\n// we call willDeferLaterForLegacyFBSupport, thus not bailing out\n// will result in endless cycles like an infinite loop.\n// We also don't want to defer during event replaying.\n\nvar SHOULD_NOT_PROCESS_POLYFILL_EVENT_PLUGINS = IS_EVENT_HANDLE_NON_MANAGED_NODE | IS_NON_DELEGATED | IS_CAPTURE_PHASE;\n\n// This exists to avoid circular dependency between ReactDOMEventReplaying\n// and DOMPluginEventSystem.\nvar currentReplayingEvent = null;\nfunction setReplayingEvent(event) {\n {\n if (currentReplayingEvent !== null) {\n error('Expected currently replaying event to be null. This error ' + 'is likely caused by a bug in React. Please file an issue.');\n }\n }\n\n currentReplayingEvent = event;\n}\nfunction resetReplayingEvent() {\n {\n if (currentReplayingEvent === null) {\n error('Expected currently replaying event to not be null. This error ' + 'is likely caused by a bug in React. Please file an issue.');\n }\n }\n\n currentReplayingEvent = null;\n}\nfunction isReplayingEvent(event) {\n return event === currentReplayingEvent;\n}\n\n/**\n * Gets the target node from a native browser event by accounting for\n * inconsistencies in browser DOM APIs.\n *\n * @param {object} nativeEvent Native browser event.\n * @return {DOMEventTarget} Target node.\n */\n\nfunction getEventTarget(nativeEvent) {\n // Fallback to nativeEvent.srcElement for IE9\n // https://github.com/facebook/react/issues/12506\n var target = nativeEvent.target || nativeEvent.srcElement || window; // Normalize SVG <use> element events #4963\n\n if (target.correspondingUseElement) {\n target = target.correspondingUseElement;\n } // Safari may fire events on text nodes (Node.TEXT_NODE is 3).\n // @see http://www.quirksmode.org/js/events_properties.html\n\n\n return target.nodeType === TEXT_NODE ? target.parentNode : target;\n}\n\nvar restoreTarget = null;\nvar restoreQueue = null;\n\nfunction restoreStateOfTarget(target) {\n // We perform this translation at the end of the event loop so that we\n // always receive the correct fiber here\n var internalInstance = getInstanceFromNode(target);\n\n if (!internalInstance) {\n // Unmounted\n return;\n }\n\n var stateNode = internalInstance.stateNode; // Guard against Fiber being unmounted.\n\n if (stateNode) {\n var props = getFiberCurrentPropsFromNode(stateNode);\n restoreControlledState(internalInstance.stateNode, internalInstance.type, props);\n }\n}\n\nfunction enqueueStateRestore(target) {\n if (restoreTarget) {\n if (restoreQueue) {\n restoreQueue.push(target);\n } else {\n restoreQueue = [target];\n }\n } else {\n restoreTarget = target;\n }\n}\nfunction needsStateRestore() {\n return restoreTarget !== null || restoreQueue !== null;\n}\nfunction restoreStateIfNeeded() {\n if (!restoreTarget) {\n return;\n }\n\n var target = restoreTarget;\n var queuedTargets = restoreQueue;\n restoreTarget = null;\n restoreQueue = null;\n restoreStateOfTarget(target);\n\n if (queuedTargets) {\n for (var i = 0; i < queuedTargets.length; i++) {\n restoreStateOfTarget(queuedTargets[i]);\n }\n }\n}\n\n/**\n * `ReactInstanceMap` maintains a mapping from a public facing stateful\n * instance (key) and the internal representation (value). This allows public\n * methods to accept the user facing instance as an argument and map them back\n * to internal methods.\n *\n * Note that this module is currently shared and assumed to be stateless.\n * If this becomes an actual Map, that will break.\n */\nfunction get(key) {\n return key._reactInternals;\n}\nfunction has(key) {\n return key._reactInternals !== undefined;\n}\nfunction set(key, value) {\n key._reactInternals = value;\n}\n\nvar ReactCurrentOwner$3 = ReactSharedInternals.ReactCurrentOwner;\nfunction getNearestMountedFiber(fiber) {\n var node = fiber;\n var nearestMounted = fiber;\n\n if (!fiber.alternate) {\n // If there is no alternate, this might be a new tree that isn't inserted\n // yet. If it is, then it will have a pending insertion effect on it.\n var nextNode = node;\n\n do {\n node = nextNode;\n\n if ((node.flags & (Placement | Hydrating)) !== NoFlags$1) {\n // This is an insertion or in-progress hydration. The nearest possible\n // mounted fiber is the parent but we need to continue to figure out\n // if that one is still mounted.\n nearestMounted = node.return;\n } // $FlowFixMe[incompatible-type] we bail out when we get a null\n\n\n nextNode = node.return;\n } while (nextNode);\n } else {\n while (node.return) {\n node = node.return;\n }\n }\n\n if (node.tag === HostRoot) {\n // TODO: Check if this was a nested HostRoot when used with\n // renderContainerIntoSubtree.\n return nearestMounted;\n } // If we didn't hit the root, that means that we're in an disconnected tree\n // that has been unmounted.\n\n\n return null;\n}\nfunction getSuspenseInstanceFromFiber(fiber) {\n if (fiber.tag === SuspenseComponent) {\n var suspenseState = fiber.memoizedState;\n\n if (suspenseState === null) {\n var current = fiber.alternate;\n\n if (current !== null) {\n suspenseState = current.memoizedState;\n }\n }\n\n if (suspenseState !== null) {\n return suspenseState.dehydrated;\n }\n }\n\n return null;\n}\nfunction getContainerFromFiber(fiber) {\n return fiber.tag === HostRoot ? fiber.stateNode.containerInfo : null;\n}\nfunction isFiberMounted(fiber) {\n return getNearestMountedFiber(fiber) === fiber;\n}\nfunction isMounted(component) {\n {\n var owner = ReactCurrentOwner$3.current;\n\n if (owner !== null && owner.tag === ClassComponent) {\n var ownerFiber = owner;\n var instance = ownerFiber.stateNode;\n\n if (!instance._warnedAboutRefsInRender) {\n error('%s is accessing isMounted inside its render() function. ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', getComponentNameFromFiber(ownerFiber) || 'A component');\n }\n\n instance._warnedAboutRefsInRender = true;\n }\n }\n\n var fiber = get(component);\n\n if (!fiber) {\n return false;\n }\n\n return getNearestMountedFiber(fiber) === fiber;\n}\n\nfunction assertIsMounted(fiber) {\n if (getNearestMountedFiber(fiber) !== fiber) {\n throw new Error('Unable to find node on an unmounted component.');\n }\n}\n\nfunction findCurrentFiberUsingSlowPath(fiber) {\n var alternate = fiber.alternate;\n\n if (!alternate) {\n // If there is no alternate, then we only need to check if it is mounted.\n var nearestMounted = getNearestMountedFiber(fiber);\n\n if (nearestMounted === null) {\n throw new Error('Unable to find node on an unmounted component.');\n }\n\n if (nearestMounted !== fiber) {\n return null;\n }\n\n return fiber;\n } // If we have two possible branches, we'll walk backwards up to the root\n // to see what path the root points to. On the way we may hit one of the\n // special cases and we'll deal with them.\n\n\n var a = fiber;\n var b = alternate;\n\n while (true) {\n var parentA = a.return;\n\n if (parentA === null) {\n // We're at the root.\n break;\n }\n\n var parentB = parentA.alternate;\n\n if (parentB === null) {\n // There is no alternate. This is an unusual case. Currently, it only\n // happens when a Suspense component is hidden. An extra fragment fiber\n // is inserted in between the Suspense fiber and its children. Skip\n // over this extra fragment fiber and proceed to the next parent.\n var nextParent = parentA.return;\n\n if (nextParent !== null) {\n a = b = nextParent;\n continue;\n } // If there's no parent, we're at the root.\n\n\n break;\n } // If both copies of the parent fiber point to the same child, we can\n // assume that the child is current. This happens when we bailout on low\n // priority: the bailed out fiber's child reuses the current child.\n\n\n if (parentA.child === parentB.child) {\n var child = parentA.child;\n\n while (child) {\n if (child === a) {\n // We've determined that A is the current branch.\n assertIsMounted(parentA);\n return fiber;\n }\n\n if (child === b) {\n // We've determined that B is the current branch.\n assertIsMounted(parentA);\n return alternate;\n }\n\n child = child.sibling;\n } // We should never have an alternate for any mounting node. So the only\n // way this could possibly happen is if this was unmounted, if at all.\n\n\n throw new Error('Unable to find node on an unmounted component.');\n }\n\n if (a.return !== b.return) {\n // The return pointer of A and the return pointer of B point to different\n // fibers. We assume that return pointers never criss-cross, so A must\n // belong to the child set of A.return, and B must belong to the child\n // set of B.return.\n a = parentA;\n b = parentB;\n } else {\n // The return pointers point to the same fiber. We'll have to use the\n // default, slow path: scan the child sets of each parent alternate to see\n // which child belongs to which set.\n //\n // Search parent A's child set\n var didFindChild = false;\n var _child = parentA.child;\n\n while (_child) {\n if (_child === a) {\n didFindChild = true;\n a = parentA;\n b = parentB;\n break;\n }\n\n if (_child === b) {\n didFindChild = true;\n b = parentA;\n a = parentB;\n break;\n }\n\n _child = _child.sibling;\n }\n\n if (!didFindChild) {\n // Search parent B's child set\n _child = parentB.child;\n\n while (_child) {\n if (_child === a) {\n didFindChild = true;\n a = parentB;\n b = parentA;\n break;\n }\n\n if (_child === b) {\n didFindChild = true;\n b = parentB;\n a = parentA;\n break;\n }\n\n _child = _child.sibling;\n }\n\n if (!didFindChild) {\n throw new Error('Child was not found in either parent set. This indicates a bug ' + 'in React related to the return pointer. Please file an issue.');\n }\n }\n }\n\n if (a.alternate !== b) {\n throw new Error(\"Return fibers should always be each others' alternates. \" + 'This error is likely caused by a bug in React. Please file an issue.');\n }\n } // If the root is not a host container, we're in a disconnected tree. I.e.\n // unmounted.\n\n\n if (a.tag !== HostRoot) {\n throw new Error('Unable to find node on an unmounted component.');\n }\n\n if (a.stateNode.current === a) {\n // We've determined that A is the current branch.\n return fiber;\n } // Otherwise B has to be current branch.\n\n\n return alternate;\n}\nfunction findCurrentHostFiber(parent) {\n var currentParent = findCurrentFiberUsingSlowPath(parent);\n return currentParent !== null ? findCurrentHostFiberImpl(currentParent) : null;\n}\n\nfunction findCurrentHostFiberImpl(node) {\n // Next we'll drill down this component to find the first HostComponent/Text.\n var tag = node.tag;\n\n if (tag === HostComponent || (tag === HostHoistable ) || tag === HostSingleton || tag === HostText) {\n return node;\n }\n\n var child = node.child;\n\n while (child !== null) {\n var match = findCurrentHostFiberImpl(child);\n\n if (match !== null) {\n return match;\n }\n\n child = child.sibling;\n }\n\n return null;\n}\n\nfunction findCurrentHostFiberWithNoPortals(parent) {\n var currentParent = findCurrentFiberUsingSlowPath(parent);\n return currentParent !== null ? findCurrentHostFiberWithNoPortalsImpl(currentParent) : null;\n}\n\nfunction findCurrentHostFiberWithNoPortalsImpl(node) {\n // Next we'll drill down this component to find the first HostComponent/Text.\n var tag = node.tag;\n\n if (tag === HostComponent || (tag === HostHoistable ) || tag === HostSingleton || tag === HostText) {\n return node;\n }\n\n var child = node.child;\n\n while (child !== null) {\n if (child.tag !== HostPortal) {\n var match = findCurrentHostFiberWithNoPortalsImpl(child);\n\n if (match !== null) {\n return match;\n }\n }\n\n child = child.sibling;\n }\n\n return null;\n}\n\nvar warnedAboutMissingGetChildContext;\n\n{\n warnedAboutMissingGetChildContext = {};\n}\n\nvar emptyContextObject = {};\n\n{\n Object.freeze(emptyContextObject);\n} // A cursor to the current merged context object on the stack.\n\n\nvar contextStackCursor = createCursor(emptyContextObject); // A cursor to a boolean indicating whether the context has changed.\n\nvar didPerformWorkStackCursor = createCursor(false); // Keep track of the previous context object that was on the stack.\n// We use this to get access to the parent context after we have already\n// pushed the next context provider, and now need to merge their contexts.\n\nvar previousContext = emptyContextObject;\n\nfunction getUnmaskedContext(workInProgress, Component, didPushOwnContextIfProvider) {\n {\n if (didPushOwnContextIfProvider && isContextProvider(Component)) {\n // If the fiber is a context provider itself, when we read its context\n // we may have already pushed its own child context on the stack. A context\n // provider should not \"see\" its own child context. Therefore we read the\n // previous (parent) context instead for a context provider.\n return previousContext;\n }\n\n return contextStackCursor.current;\n }\n}\n\nfunction cacheContext(workInProgress, unmaskedContext, maskedContext) {\n {\n var instance = workInProgress.stateNode;\n instance.__reactInternalMemoizedUnmaskedChildContext = unmaskedContext;\n instance.__reactInternalMemoizedMaskedChildContext = maskedContext;\n }\n}\n\nfunction getMaskedContext(workInProgress, unmaskedContext) {\n {\n var type = workInProgress.type;\n var contextTypes = type.contextTypes;\n\n if (!contextTypes) {\n return emptyContextObject;\n } // Avoid recreating masked context unless unmasked context has changed.\n // Failing to do this will result in unnecessary calls to componentWillReceiveProps.\n // This may trigger infinite loops if componentWillReceiveProps calls setState.\n\n\n var instance = workInProgress.stateNode;\n\n if (instance && instance.__reactInternalMemoizedUnmaskedChildContext === unmaskedContext) {\n return instance.__reactInternalMemoizedMaskedChildContext;\n }\n\n var context = {};\n\n for (var key in contextTypes) {\n context[key] = unmaskedContext[key];\n } // Cache unmasked context so we can avoid recreating masked context unless necessary.\n // Context is created before the class component is instantiated so check for instance.\n\n\n if (instance) {\n cacheContext(workInProgress, unmaskedContext, context);\n }\n\n return context;\n }\n}\n\nfunction hasContextChanged() {\n {\n return didPerformWorkStackCursor.current;\n }\n}\n\nfunction isContextProvider(type) {\n {\n var childContextTypes = type.childContextTypes;\n return childContextTypes !== null && childContextTypes !== undefined;\n }\n}\n\nfunction popContext(fiber) {\n {\n pop(didPerformWorkStackCursor, fiber);\n pop(contextStackCursor, fiber);\n }\n}\n\nfunction popTopLevelContextObject(fiber) {\n {\n pop(didPerformWorkStackCursor, fiber);\n pop(contextStackCursor, fiber);\n }\n}\n\nfunction pushTopLevelContextObject(fiber, context, didChange) {\n {\n if (contextStackCursor.current !== emptyContextObject) {\n throw new Error('Unexpected context found on stack. ' + 'This error is likely caused by a bug in React. Please file an issue.');\n }\n\n push(contextStackCursor, context, fiber);\n push(didPerformWorkStackCursor, didChange, fiber);\n }\n}\n\nfunction processChildContext(fiber, type, parentContext) {\n {\n var instance = fiber.stateNode;\n var childContextTypes = type.childContextTypes; // TODO (bvaughn) Replace this behavior with an invariant() in the future.\n // It has only been added in Fiber to match the (unintentional) behavior in Stack.\n\n if (typeof instance.getChildContext !== 'function') {\n {\n var componentName = getComponentNameFromFiber(fiber) || 'Unknown';\n\n if (!warnedAboutMissingGetChildContext[componentName]) {\n warnedAboutMissingGetChildContext[componentName] = true;\n\n error('%s.childContextTypes is specified but there is no getChildContext() method ' + 'on the instance. You can either define getChildContext() on %s or remove ' + 'childContextTypes from it.', componentName, componentName);\n }\n }\n\n return parentContext;\n }\n\n var childContext = instance.getChildContext();\n\n for (var contextKey in childContext) {\n if (!(contextKey in childContextTypes)) {\n throw new Error((getComponentNameFromFiber(fiber) || 'Unknown') + \".getChildContext(): key \\\"\" + contextKey + \"\\\" is not defined in childContextTypes.\");\n }\n }\n\n return assign({}, parentContext, childContext);\n }\n}\n\nfunction pushContextProvider(workInProgress) {\n {\n var instance = workInProgress.stateNode; // We push the context as early as possible to ensure stack integrity.\n // If the instance does not exist yet, we will push null at first,\n // and replace it on the stack later when invalidating the context.\n\n var memoizedMergedChildContext = instance && instance.__reactInternalMemoizedMergedChildContext || emptyContextObject; // Remember the parent context so we can merge with it later.\n // Inherit the parent's did-perform-work value to avoid inadvertently blocking updates.\n\n previousContext = contextStackCursor.current;\n push(contextStackCursor, memoizedMergedChildContext, workInProgress);\n push(didPerformWorkStackCursor, didPerformWorkStackCursor.current, workInProgress);\n return true;\n }\n}\n\nfunction invalidateContextProvider(workInProgress, type, didChange) {\n {\n var instance = workInProgress.stateNode;\n\n if (!instance) {\n throw new Error('Expected to have an instance by this point. ' + 'This error is likely caused by a bug in React. Please file an issue.');\n }\n\n if (didChange) {\n // Merge parent and own context.\n // Skip this if we're not updating due to sCU.\n // This avoids unnecessarily recomputing memoized values.\n var mergedContext = processChildContext(workInProgress, type, previousContext);\n instance.__reactInternalMemoizedMergedChildContext = mergedContext; // Replace the old (or empty) context with the new one.\n // It is important to unwind the context in the reverse order.\n\n pop(didPerformWorkStackCursor, workInProgress);\n pop(contextStackCursor, workInProgress); // Now push the new context and mark that it has changed.\n\n push(contextStackCursor, mergedContext, workInProgress);\n push(didPerformWorkStackCursor, didChange, workInProgress);\n } else {\n pop(didPerformWorkStackCursor, workInProgress);\n push(didPerformWorkStackCursor, didChange, workInProgress);\n }\n }\n}\n\nfunction findCurrentUnmaskedContext(fiber) {\n {\n // Currently this is only used with renderSubtreeIntoContainer; not sure if it\n // makes sense elsewhere\n if (!isFiberMounted(fiber) || fiber.tag !== ClassComponent) {\n throw new Error('Expected subtree parent to be a mounted class component. ' + 'This error is likely caused by a bug in React. Please file an issue.');\n }\n\n var node = fiber;\n\n do {\n switch (node.tag) {\n case HostRoot:\n return node.stateNode.context;\n\n case ClassComponent:\n {\n var Component = node.type;\n\n if (isContextProvider(Component)) {\n return node.stateNode.__reactInternalMemoizedMergedChildContext;\n }\n\n break;\n }\n } // $FlowFixMe[incompatible-type] we bail out when we get a null\n\n\n node = node.return;\n } while (node !== null);\n\n throw new Error('Found unexpected detached subtree parent. ' + 'This error is likely caused by a bug in React. Please file an issue.');\n }\n}\n\nvar LegacyRoot = 0;\nvar ConcurrentRoot = 1;\n\n// We use the existence of the state object as an indicator that the component\n// is hidden.\nvar OffscreenVisible =\n/* */\n1;\nvar OffscreenDetached =\n/* */\n2;\nvar OffscreenPassiveEffectsConnected =\n/* */\n4;\nfunction isOffscreenManual(offscreenFiber) {\n return offscreenFiber.memoizedProps !== null && offscreenFiber.memoizedProps.mode === 'manual';\n}\n\n/**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\nfunction is(x, y) {\n return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y // eslint-disable-line no-self-compare\n ;\n}\n\nvar objectIs = // $FlowFixMe[method-unbinding]\ntypeof Object.is === 'function' ? Object.is : is;\n\n// This is imported by the event replaying implementation in React DOM. It's\n// in a separate file to break a circular dependency between the renderer and\n// the reconciler.\nfunction isRootDehydrated(root) {\n var currentState = root.current.memoizedState;\n return currentState.isDehydrated;\n}\n\n// Intentionally not using it yet to derisk the initial implementation, because\n// the way we push/pop these values is a bit unusual. If there's a mistake, I'd\n// rather the ids be wrong than crash the whole reconciler.\n\nvar forkStack = [];\nvar forkStackIndex = 0;\nvar treeForkProvider = null;\nvar treeForkCount = 0;\nvar idStack = [];\nvar idStackIndex = 0;\nvar treeContextProvider = null;\nvar treeContextId = 1;\nvar treeContextOverflow = '';\nfunction isForkedChild(workInProgress) {\n warnIfNotHydrating();\n return (workInProgress.flags & Forked) !== NoFlags$1;\n}\nfunction getForksAtLevel(workInProgress) {\n warnIfNotHydrating();\n return treeForkCount;\n}\nfunction getTreeId() {\n var overflow = treeContextOverflow;\n var idWithLeadingBit = treeContextId;\n var id = idWithLeadingBit & ~getLeadingBit(idWithLeadingBit);\n return id.toString(32) + overflow;\n}\nfunction pushTreeFork(workInProgress, totalChildren) {\n // This is called right after we reconcile an array (or iterator) of child\n // fibers, because that's the only place where we know how many children in\n // the whole set without doing extra work later, or storing addtional\n // information on the fiber.\n //\n // That's why this function is separate from pushTreeId — it's called during\n // the render phase of the fork parent, not the child, which is where we push\n // the other context values.\n //\n // In the Fizz implementation this is much simpler because the child is\n // rendered in the same callstack as the parent.\n //\n // It might be better to just add a `forks` field to the Fiber type. It would\n // make this module simpler.\n warnIfNotHydrating();\n forkStack[forkStackIndex++] = treeForkCount;\n forkStack[forkStackIndex++] = treeForkProvider;\n treeForkProvider = workInProgress;\n treeForkCount = totalChildren;\n}\nfunction pushTreeId(workInProgress, totalChildren, index) {\n warnIfNotHydrating();\n idStack[idStackIndex++] = treeContextId;\n idStack[idStackIndex++] = treeContextOverflow;\n idStack[idStackIndex++] = treeContextProvider;\n treeContextProvider = workInProgress;\n var baseIdWithLeadingBit = treeContextId;\n var baseOverflow = treeContextOverflow; // The leftmost 1 marks the end of the sequence, non-inclusive. It's not part\n // of the id; we use it to account for leading 0s.\n\n var baseLength = getBitLength(baseIdWithLeadingBit) - 1;\n var baseId = baseIdWithLeadingBit & ~(1 << baseLength);\n var slot = index + 1;\n var length = getBitLength(totalChildren) + baseLength; // 30 is the max length we can store without overflowing, taking into\n // consideration the leading 1 we use to mark the end of the sequence.\n\n if (length > 30) {\n // We overflowed the bitwise-safe range. Fall back to slower algorithm.\n // This branch assumes the length of the base id is greater than 5; it won't\n // work for smaller ids, because you need 5 bits per character.\n //\n // We encode the id in multiple steps: first the base id, then the\n // remaining digits.\n //\n // Each 5 bit sequence corresponds to a single base 32 character. So for\n // example, if the current id is 23 bits long, we can convert 20 of those\n // bits into a string of 4 characters, with 3 bits left over.\n //\n // First calculate how many bits in the base id represent a complete\n // sequence of characters.\n var numberOfOverflowBits = baseLength - baseLength % 5; // Then create a bitmask that selects only those bits.\n\n var newOverflowBits = (1 << numberOfOverflowBits) - 1; // Select the bits, and convert them to a base 32 string.\n\n var newOverflow = (baseId & newOverflowBits).toString(32); // Now we can remove those bits from the base id.\n\n var restOfBaseId = baseId >> numberOfOverflowBits;\n var restOfBaseLength = baseLength - numberOfOverflowBits; // Finally, encode the rest of the bits using the normal algorithm. Because\n // we made more room, this time it won't overflow.\n\n var restOfLength = getBitLength(totalChildren) + restOfBaseLength;\n var restOfNewBits = slot << restOfBaseLength;\n var id = restOfNewBits | restOfBaseId;\n var overflow = newOverflow + baseOverflow;\n treeContextId = 1 << restOfLength | id;\n treeContextOverflow = overflow;\n } else {\n // Normal path\n var newBits = slot << baseLength;\n\n var _id = newBits | baseId;\n\n var _overflow = baseOverflow;\n treeContextId = 1 << length | _id;\n treeContextOverflow = _overflow;\n }\n}\nfunction pushMaterializedTreeId(workInProgress) {\n warnIfNotHydrating(); // This component materialized an id. This will affect any ids that appear\n // in its children.\n\n var returnFiber = workInProgress.return;\n\n if (returnFiber !== null) {\n var numberOfForks = 1;\n var slotIndex = 0;\n pushTreeFork(workInProgress, numberOfForks);\n pushTreeId(workInProgress, numberOfForks, slotIndex);\n }\n}\n\nfunction getBitLength(number) {\n return 32 - clz32(number);\n}\n\nfunction getLeadingBit(id) {\n return 1 << getBitLength(id) - 1;\n}\n\nfunction popTreeContext(workInProgress) {\n // Restore the previous values.\n // This is a bit more complicated than other context-like modules in Fiber\n // because the same Fiber may appear on the stack multiple times and for\n // different reasons. We have to keep popping until the work-in-progress is\n // no longer at the top of the stack.\n while (workInProgress === treeForkProvider) {\n treeForkProvider = forkStack[--forkStackIndex];\n forkStack[forkStackIndex] = null;\n treeForkCount = forkStack[--forkStackIndex];\n forkStack[forkStackIndex] = null;\n }\n\n while (workInProgress === treeContextProvider) {\n treeContextProvider = idStack[--idStackIndex];\n idStack[idStackIndex] = null;\n treeContextOverflow = idStack[--idStackIndex];\n idStack[idStackIndex] = null;\n treeContextId = idStack[--idStackIndex];\n idStack[idStackIndex] = null;\n }\n}\nfunction getSuspendedTreeContext() {\n warnIfNotHydrating();\n\n if (treeContextProvider !== null) {\n return {\n id: treeContextId,\n overflow: treeContextOverflow\n };\n } else {\n return null;\n }\n}\nfunction restoreSuspendedTreeContext(workInProgress, suspendedContext) {\n warnIfNotHydrating();\n idStack[idStackIndex++] = treeContextId;\n idStack[idStackIndex++] = treeContextOverflow;\n idStack[idStackIndex++] = treeContextProvider;\n treeContextId = suspendedContext.id;\n treeContextOverflow = suspendedContext.overflow;\n treeContextProvider = workInProgress;\n}\n\nfunction warnIfNotHydrating() {\n {\n if (!getIsHydrating()) {\n error('Expected to be hydrating. This is a bug in React. Please file ' + 'an issue.');\n }\n }\n}\n\n// This may have been an insertion or a hydration.\n\nvar hydrationParentFiber = null;\nvar nextHydratableInstance = null;\nvar isHydrating = false; // This flag allows for warning supression when we expect there to be mismatches\n// due to earlier mismatches or a suspended fiber.\n\nvar didSuspendOrErrorDEV = false; // Hydration errors that were thrown inside this boundary\n\nvar hydrationErrors = null;\nvar rootOrSingletonContext = false;\n\nfunction warnIfHydrating() {\n {\n if (isHydrating) {\n error('We should not be hydrating here. This is a bug in React. Please file a bug.');\n }\n }\n}\n\nfunction markDidThrowWhileHydratingDEV() {\n {\n didSuspendOrErrorDEV = true;\n }\n}\n\nfunction enterHydrationState(fiber) {\n\n var parentInstance = fiber.stateNode.containerInfo;\n nextHydratableInstance = getFirstHydratableChildWithinContainer(parentInstance);\n hydrationParentFiber = fiber;\n isHydrating = true;\n hydrationErrors = null;\n didSuspendOrErrorDEV = false;\n rootOrSingletonContext = true;\n return true;\n}\n\nfunction reenterHydrationStateFromDehydratedSuspenseInstance(fiber, suspenseInstance, treeContext) {\n\n nextHydratableInstance = getFirstHydratableChildWithinSuspenseInstance(suspenseInstance);\n hydrationParentFiber = fiber;\n isHydrating = true;\n hydrationErrors = null;\n didSuspendOrErrorDEV = false;\n rootOrSingletonContext = false;\n\n if (treeContext !== null) {\n restoreSuspendedTreeContext(fiber, treeContext);\n }\n\n return true;\n}\n\nfunction warnUnhydratedInstance(returnFiber, instance) {\n {\n switch (returnFiber.tag) {\n case HostRoot:\n {\n didNotHydrateInstanceWithinContainer(returnFiber.stateNode.containerInfo, instance);\n break;\n }\n\n case HostSingleton:\n case HostComponent:\n {\n var isConcurrentMode = (returnFiber.mode & ConcurrentMode) !== NoMode;\n didNotHydrateInstance(returnFiber.type, returnFiber.memoizedProps, returnFiber.stateNode, instance, // TODO: Delete this argument when we remove the legacy root API.\n isConcurrentMode);\n break;\n }\n\n case SuspenseComponent:\n {\n var suspenseState = returnFiber.memoizedState;\n if (suspenseState.dehydrated !== null) didNotHydrateInstanceWithinSuspenseInstance(suspenseState.dehydrated, instance);\n break;\n }\n }\n }\n}\n\nfunction deleteHydratableInstance(returnFiber, instance) {\n var childToDelete = createFiberFromHostInstanceForDeletion();\n childToDelete.stateNode = instance;\n childToDelete.return = returnFiber;\n var deletions = returnFiber.deletions;\n\n if (deletions === null) {\n returnFiber.deletions = [childToDelete];\n returnFiber.flags |= ChildDeletion;\n } else {\n deletions.push(childToDelete);\n }\n}\n\nfunction warnNonHydratedInstance(returnFiber, fiber) {\n {\n if (didSuspendOrErrorDEV) {\n // Inside a boundary that already suspended. We're currently rendering the\n // siblings of a suspended node. The mismatch may be due to the missing\n // data, so it's probably a false positive.\n return;\n }\n\n switch (returnFiber.tag) {\n case HostRoot:\n {\n var parentContainer = returnFiber.stateNode.containerInfo;\n\n switch (fiber.tag) {\n case HostSingleton:\n case HostComponent:\n var type = fiber.type;\n didNotFindHydratableInstanceWithinContainer(parentContainer, type);\n break;\n\n case HostText:\n var text = fiber.pendingProps;\n didNotFindHydratableTextInstanceWithinContainer(parentContainer, text);\n break;\n }\n\n break;\n }\n\n case HostSingleton:\n case HostComponent:\n {\n var parentType = returnFiber.type;\n var parentProps = returnFiber.memoizedProps;\n var parentInstance = returnFiber.stateNode;\n\n switch (fiber.tag) {\n case HostSingleton:\n case HostComponent:\n {\n var _type = fiber.type;\n var _props = fiber.pendingProps;\n var isConcurrentMode = (returnFiber.mode & ConcurrentMode) !== NoMode;\n didNotFindHydratableInstance(parentType, parentProps, parentInstance, _type, _props, // TODO: Delete this argument when we remove the legacy root API.\n isConcurrentMode);\n break;\n }\n\n case HostText:\n {\n var _text = fiber.pendingProps;\n\n var _isConcurrentMode = (returnFiber.mode & ConcurrentMode) !== NoMode;\n\n didNotFindHydratableTextInstance(parentType, parentProps, parentInstance, _text, // TODO: Delete this argument when we remove the legacy root API.\n _isConcurrentMode);\n break;\n }\n }\n\n break;\n }\n\n case SuspenseComponent:\n {\n var suspenseState = returnFiber.memoizedState;\n var _parentInstance = suspenseState.dehydrated;\n if (_parentInstance !== null) switch (fiber.tag) {\n case HostSingleton:\n case HostComponent:\n var _type2 = fiber.type;\n didNotFindHydratableInstanceWithinSuspenseInstance(_parentInstance, _type2);\n break;\n\n case HostText:\n var _text2 = fiber.pendingProps;\n didNotFindHydratableTextInstanceWithinSuspenseInstance(_parentInstance, _text2);\n break;\n }\n break;\n }\n\n default:\n return;\n }\n }\n}\n\nfunction insertNonHydratedInstance(returnFiber, fiber) {\n fiber.flags = fiber.flags & ~Hydrating | Placement;\n}\n\nfunction tryHydrateInstance(fiber, nextInstance) {\n // fiber is a HostComponent Fiber\n var instance = canHydrateInstance(nextInstance, fiber.type, fiber.pendingProps, rootOrSingletonContext);\n\n if (instance !== null) {\n fiber.stateNode = instance;\n hydrationParentFiber = fiber;\n nextHydratableInstance = getFirstHydratableChild(instance);\n rootOrSingletonContext = false;\n return true;\n }\n\n return false;\n}\n\nfunction tryHydrateText(fiber, nextInstance) {\n // fiber is a HostText Fiber\n var text = fiber.pendingProps;\n var textInstance = canHydrateTextInstance(nextInstance, text, rootOrSingletonContext);\n\n if (textInstance !== null) {\n fiber.stateNode = textInstance;\n hydrationParentFiber = fiber; // Text Instances don't have children so there's nothing to hydrate.\n\n nextHydratableInstance = null;\n return true;\n }\n\n return false;\n}\n\nfunction tryHydrateSuspense(fiber, nextInstance) {\n // fiber is a SuspenseComponent Fiber\n var suspenseInstance = canHydrateSuspenseInstance(nextInstance, rootOrSingletonContext);\n\n if (suspenseInstance !== null) {\n var suspenseState = {\n dehydrated: suspenseInstance,\n treeContext: getSuspendedTreeContext(),\n retryLane: OffscreenLane\n };\n fiber.memoizedState = suspenseState; // Store the dehydrated fragment as a child fiber.\n // This simplifies the code for getHostSibling and deleting nodes,\n // since it doesn't have to consider all Suspense boundaries and\n // check if they're dehydrated ones or not.\n\n var dehydratedFragment = createFiberFromDehydratedFragment(suspenseInstance);\n dehydratedFragment.return = fiber;\n fiber.child = dehydratedFragment;\n hydrationParentFiber = fiber; // While a Suspense Instance does have children, we won't step into\n // it during the first pass. Instead, we'll reenter it later.\n\n nextHydratableInstance = null;\n return true;\n }\n\n return false;\n}\n\nfunction shouldClientRenderOnMismatch(fiber) {\n return (fiber.mode & ConcurrentMode) !== NoMode && (fiber.flags & DidCapture) === NoFlags$1;\n}\n\nfunction throwOnHydrationMismatch(fiber) {\n throw new Error('Hydration failed because the initial UI does not match what was ' + 'rendered on the server.');\n}\n\nfunction claimHydratableSingleton(fiber) {\n {\n if (!isHydrating) {\n return;\n }\n\n var currentRootContainer = getRootHostContainer();\n var currentHostContext = getHostContext();\n var instance = fiber.stateNode = resolveSingletonInstance(fiber.type, fiber.pendingProps, currentRootContainer, currentHostContext, false);\n hydrationParentFiber = fiber;\n rootOrSingletonContext = true;\n nextHydratableInstance = getFirstHydratableChild(instance);\n }\n}\n\nfunction tryToClaimNextHydratableInstance(fiber) {\n if (!isHydrating) {\n return;\n } // Validate that this is ok to render here before any mismatches.\n\n\n var currentHostContext = getHostContext();\n var shouldKeepWarning = validateHydratableInstance(fiber.type, fiber.pendingProps, currentHostContext);\n var initialInstance = nextHydratableInstance;\n var nextInstance = nextHydratableInstance;\n\n if (!nextInstance) {\n if (shouldClientRenderOnMismatch(fiber)) {\n if (shouldKeepWarning) {\n warnNonHydratedInstance(hydrationParentFiber, fiber);\n }\n\n throwOnHydrationMismatch();\n } // Nothing to hydrate. Make it an insertion.\n\n\n insertNonHydratedInstance(hydrationParentFiber, fiber);\n\n if (shouldKeepWarning) {\n warnNonHydratedInstance(hydrationParentFiber, fiber);\n }\n\n isHydrating = false;\n hydrationParentFiber = fiber;\n nextHydratableInstance = initialInstance;\n return;\n }\n\n var firstAttemptedInstance = nextInstance;\n\n if (!tryHydrateInstance(fiber, nextInstance)) {\n if (shouldClientRenderOnMismatch(fiber)) {\n if (shouldKeepWarning) {\n warnNonHydratedInstance(hydrationParentFiber, fiber);\n }\n\n throwOnHydrationMismatch();\n } // If we can't hydrate this instance let's try the next one.\n // We use this as a heuristic. It's based on intuition and not data so it\n // might be flawed or unnecessary.\n\n\n nextHydratableInstance = getNextHydratableSibling(nextInstance);\n var prevHydrationParentFiber = hydrationParentFiber;\n\n if (!nextHydratableInstance || !tryHydrateInstance(fiber, nextHydratableInstance)) {\n // Nothing to hydrate. Make it an insertion.\n insertNonHydratedInstance(hydrationParentFiber, fiber);\n\n if (shouldKeepWarning) {\n warnNonHydratedInstance(hydrationParentFiber, fiber);\n }\n\n isHydrating = false;\n hydrationParentFiber = fiber;\n nextHydratableInstance = initialInstance;\n return;\n } // We matched the next one, we'll now assume that the first one was\n // superfluous and we'll delete it. Since we can't eagerly delete it\n // we'll have to schedule a deletion. To do that, this node needs a dummy\n // fiber associated with it.\n\n\n if (shouldKeepWarning) {\n warnUnhydratedInstance(prevHydrationParentFiber, firstAttemptedInstance);\n }\n\n deleteHydratableInstance(prevHydrationParentFiber, firstAttemptedInstance);\n }\n}\n\nfunction tryToClaimNextHydratableTextInstance(fiber) {\n if (!isHydrating) {\n return;\n }\n\n var text = fiber.pendingProps;\n var shouldKeepWarning = true; // Validate that this is ok to render here before any mismatches.\n\n var currentHostContext = getHostContext();\n shouldKeepWarning = validateHydratableTextInstance(text, currentHostContext);\n var initialInstance = nextHydratableInstance;\n var nextInstance = nextHydratableInstance;\n\n if (!nextInstance) {\n // We exclude non hydrabable text because we know there are no matching hydratables.\n // We either throw or insert depending on the render mode.\n if (shouldClientRenderOnMismatch(fiber)) {\n if (shouldKeepWarning) {\n warnNonHydratedInstance(hydrationParentFiber, fiber);\n }\n\n throwOnHydrationMismatch();\n } // Nothing to hydrate. Make it an insertion.\n\n\n insertNonHydratedInstance(hydrationParentFiber, fiber);\n\n if (shouldKeepWarning) {\n warnNonHydratedInstance(hydrationParentFiber, fiber);\n }\n\n isHydrating = false;\n hydrationParentFiber = fiber;\n nextHydratableInstance = initialInstance;\n return;\n }\n\n var firstAttemptedInstance = nextInstance;\n\n if (!tryHydrateText(fiber, nextInstance)) {\n if (shouldClientRenderOnMismatch(fiber)) {\n if (shouldKeepWarning) {\n warnNonHydratedInstance(hydrationParentFiber, fiber);\n }\n\n throwOnHydrationMismatch();\n } // If we can't hydrate this instance let's try the next one.\n // We use this as a heuristic. It's based on intuition and not data so it\n // might be flawed or unnecessary.\n\n\n nextHydratableInstance = getNextHydratableSibling(nextInstance);\n var prevHydrationParentFiber = hydrationParentFiber;\n\n if (!nextHydratableInstance || !tryHydrateText(fiber, nextHydratableInstance)) {\n // Nothing to hydrate. Make it an insertion.\n insertNonHydratedInstance(hydrationParentFiber, fiber);\n\n if (shouldKeepWarning) {\n warnNonHydratedInstance(hydrationParentFiber, fiber);\n }\n\n isHydrating = false;\n hydrationParentFiber = fiber;\n nextHydratableInstance = initialInstance;\n return;\n } // We matched the next one, we'll now assume that the first one was\n // superfluous and we'll delete it. Since we can't eagerly delete it\n // we'll have to schedule a deletion. To do that, this node needs a dummy\n // fiber associated with it.\n\n\n if (shouldKeepWarning) {\n warnUnhydratedInstance(prevHydrationParentFiber, firstAttemptedInstance);\n }\n\n deleteHydratableInstance(prevHydrationParentFiber, firstAttemptedInstance);\n }\n}\n\nfunction tryToClaimNextHydratableSuspenseInstance(fiber) {\n if (!isHydrating) {\n return;\n }\n\n var initialInstance = nextHydratableInstance;\n var nextInstance = nextHydratableInstance;\n\n if (!nextInstance) {\n if (shouldClientRenderOnMismatch(fiber)) {\n warnNonHydratedInstance(hydrationParentFiber, fiber);\n throwOnHydrationMismatch();\n } // Nothing to hydrate. Make it an insertion.\n\n\n insertNonHydratedInstance(hydrationParentFiber, fiber);\n warnNonHydratedInstance(hydrationParentFiber, fiber);\n isHydrating = false;\n hydrationParentFiber = fiber;\n nextHydratableInstance = initialInstance;\n return;\n }\n\n var firstAttemptedInstance = nextInstance;\n\n if (!tryHydrateSuspense(fiber, nextInstance)) {\n if (shouldClientRenderOnMismatch(fiber)) {\n warnNonHydratedInstance(hydrationParentFiber, fiber);\n throwOnHydrationMismatch();\n } // If we can't hydrate this instance let's try the next one.\n // We use this as a heuristic. It's based on intuition and not data so it\n // might be flawed or unnecessary.\n\n\n nextHydratableInstance = getNextHydratableSibling(nextInstance);\n var prevHydrationParentFiber = hydrationParentFiber;\n\n if (!nextHydratableInstance || !tryHydrateSuspense(fiber, nextHydratableInstance)) {\n // Nothing to hydrate. Make it an insertion.\n insertNonHydratedInstance(hydrationParentFiber, fiber);\n warnNonHydratedInstance(hydrationParentFiber, fiber);\n isHydrating = false;\n hydrationParentFiber = fiber;\n nextHydratableInstance = initialInstance;\n return;\n } // We matched the next one, we'll now assume that the first one was\n // superfluous and we'll delete it. Since we can't eagerly delete it\n // we'll have to schedule a deletion. To do that, this node needs a dummy\n // fiber associated with it.\n\n\n warnUnhydratedInstance(prevHydrationParentFiber, firstAttemptedInstance);\n deleteHydratableInstance(prevHydrationParentFiber, firstAttemptedInstance);\n }\n}\n\nfunction tryToClaimNextHydratableFormMarkerInstance(fiber) {\n if (!isHydrating) {\n return false;\n }\n\n if (nextHydratableInstance) {\n var markerInstance = canHydrateFormStateMarker(nextHydratableInstance, rootOrSingletonContext);\n\n if (markerInstance) {\n // Found the marker instance.\n nextHydratableInstance = getNextHydratableSibling(markerInstance); // Return true if this marker instance should use the state passed\n // to hydrateRoot.\n // TODO: As an optimization, Fizz should only emit these markers if form\n // state is passed at the root.\n\n return isFormStateMarkerMatching(markerInstance);\n }\n } // Should have found a marker instance. Throw an error to trigger client\n // rendering. We don't bother to check if we're in a concurrent root because\n // useFormState is a new API, so backwards compat is not an issue.\n\n\n throwOnHydrationMismatch();\n return false;\n}\n\nfunction prepareToHydrateHostInstance(fiber, hostContext) {\n\n var instance = fiber.stateNode;\n var shouldWarnIfMismatchDev = !didSuspendOrErrorDEV;\n hydrateInstance(instance, fiber.type, fiber.memoizedProps, hostContext, fiber, shouldWarnIfMismatchDev);\n}\n\nfunction prepareToHydrateHostTextInstance(fiber) {\n\n var textInstance = fiber.stateNode;\n var textContent = fiber.memoizedProps;\n var shouldWarnIfMismatchDev = !didSuspendOrErrorDEV;\n var shouldUpdate = hydrateTextInstance(textInstance, textContent, fiber);\n\n if (shouldUpdate) {\n // We assume that prepareToHydrateHostTextInstance is called in a context where the\n // hydration parent is the parent host component of this host text.\n var returnFiber = hydrationParentFiber;\n\n if (returnFiber !== null) {\n switch (returnFiber.tag) {\n case HostRoot:\n {\n var parentContainer = returnFiber.stateNode.containerInfo;\n var isConcurrentMode = (returnFiber.mode & ConcurrentMode) !== NoMode;\n didNotMatchHydratedContainerTextInstance(parentContainer, textInstance, textContent, // TODO: Delete this argument when we remove the legacy root API.\n isConcurrentMode, shouldWarnIfMismatchDev);\n\n if (isConcurrentMode && enableClientRenderFallbackOnTextMismatch) {\n // In concurrent mode we never update the mismatched text,\n // even if the error was ignored.\n return false;\n }\n\n break;\n }\n\n case HostSingleton:\n case HostComponent:\n {\n var parentType = returnFiber.type;\n var parentProps = returnFiber.memoizedProps;\n var parentInstance = returnFiber.stateNode;\n\n var _isConcurrentMode2 = (returnFiber.mode & ConcurrentMode) !== NoMode;\n\n didNotMatchHydratedTextInstance(parentType, parentProps, parentInstance, textInstance, textContent, // TODO: Delete this argument when we remove the legacy root API.\n _isConcurrentMode2, shouldWarnIfMismatchDev);\n\n if (_isConcurrentMode2 && enableClientRenderFallbackOnTextMismatch) {\n // In concurrent mode we never update the mismatched text,\n // even if the error was ignored.\n return false;\n }\n\n break;\n }\n }\n }\n }\n\n return shouldUpdate;\n}\n\nfunction prepareToHydrateHostSuspenseInstance(fiber) {\n\n var suspenseState = fiber.memoizedState;\n var suspenseInstance = suspenseState !== null ? suspenseState.dehydrated : null;\n\n if (!suspenseInstance) {\n throw new Error('Expected to have a hydrated suspense instance. ' + 'This error is likely caused by a bug in React. Please file an issue.');\n }\n\n hydrateSuspenseInstance(suspenseInstance, fiber);\n}\n\nfunction skipPastDehydratedSuspenseInstance(fiber) {\n\n var suspenseState = fiber.memoizedState;\n var suspenseInstance = suspenseState !== null ? suspenseState.dehydrated : null;\n\n if (!suspenseInstance) {\n throw new Error('Expected to have a hydrated suspense instance. ' + 'This error is likely caused by a bug in React. Please file an issue.');\n }\n\n return getNextHydratableInstanceAfterSuspenseInstance(suspenseInstance);\n}\n\nfunction popToNextHostParent(fiber) {\n hydrationParentFiber = fiber.return;\n\n while (hydrationParentFiber) {\n switch (hydrationParentFiber.tag) {\n case HostRoot:\n case HostSingleton:\n rootOrSingletonContext = true;\n return;\n\n case HostComponent:\n case SuspenseComponent:\n rootOrSingletonContext = false;\n return;\n\n default:\n hydrationParentFiber = hydrationParentFiber.return;\n }\n }\n}\n\nfunction popHydrationState(fiber) {\n\n if (fiber !== hydrationParentFiber) {\n // We're deeper than the current hydration context, inside an inserted\n // tree.\n return false;\n }\n\n if (!isHydrating) {\n // If we're not currently hydrating but we're in a hydration context, then\n // we were an insertion and now need to pop up reenter hydration of our\n // siblings.\n popToNextHostParent(fiber);\n isHydrating = true;\n return false;\n }\n\n var shouldClear = false;\n\n {\n // With float we never clear the Root, or Singleton instances. We also do not clear Instances\n // that have singleton text content\n if (fiber.tag !== HostRoot && fiber.tag !== HostSingleton && !(fiber.tag === HostComponent && (!shouldDeleteUnhydratedTailInstances(fiber.type) || shouldSetTextContent(fiber.type, fiber.memoizedProps)))) {\n shouldClear = true;\n }\n }\n\n if (shouldClear) {\n var nextInstance = nextHydratableInstance;\n\n if (nextInstance) {\n if (shouldClientRenderOnMismatch(fiber)) {\n warnIfUnhydratedTailNodes(fiber);\n throwOnHydrationMismatch();\n } else {\n while (nextInstance) {\n warnUnhydratedInstance(fiber, nextInstance);\n deleteHydratableInstance(fiber, nextInstance);\n nextInstance = getNextHydratableSibling(nextInstance);\n }\n }\n }\n }\n\n popToNextHostParent(fiber);\n\n if (fiber.tag === SuspenseComponent) {\n nextHydratableInstance = skipPastDehydratedSuspenseInstance(fiber);\n } else {\n nextHydratableInstance = hydrationParentFiber ? getNextHydratableSibling(fiber.stateNode) : null;\n }\n\n return true;\n}\n\nfunction warnIfUnhydratedTailNodes(fiber) {\n var nextInstance = nextHydratableInstance;\n\n while (nextInstance) {\n warnUnhydratedInstance(fiber, nextInstance);\n nextInstance = getNextHydratableSibling(nextInstance);\n }\n}\n\nfunction resetHydrationState() {\n\n hydrationParentFiber = null;\n nextHydratableInstance = null;\n isHydrating = false;\n didSuspendOrErrorDEV = false;\n}\n\nfunction upgradeHydrationErrorsToRecoverable() {\n if (hydrationErrors !== null) {\n // Successfully completed a forced client render. The errors that occurred\n // during the hydration attempt are now recovered. We will log them in\n // commit phase, once the entire tree has finished.\n queueRecoverableErrors(hydrationErrors);\n hydrationErrors = null;\n }\n}\n\nfunction getIsHydrating() {\n return isHydrating;\n}\n\nfunction queueHydrationError(error) {\n if (hydrationErrors === null) {\n hydrationErrors = [error];\n } else {\n hydrationErrors.push(error);\n }\n}\n\n// we wait until the current render is over (either finished or interrupted)\n// before adding it to the fiber/hook queue. Push to this array so we can\n// access the queue, fiber, update, et al later.\n\nvar concurrentQueues = [];\nvar concurrentQueuesIndex = 0;\nvar concurrentlyUpdatedLanes = NoLanes;\nfunction finishQueueingConcurrentUpdates() {\n var endIndex = concurrentQueuesIndex;\n concurrentQueuesIndex = 0;\n concurrentlyUpdatedLanes = NoLanes;\n var i = 0;\n\n while (i < endIndex) {\n var fiber = concurrentQueues[i];\n concurrentQueues[i++] = null;\n var queue = concurrentQueues[i];\n concurrentQueues[i++] = null;\n var update = concurrentQueues[i];\n concurrentQueues[i++] = null;\n var lane = concurrentQueues[i];\n concurrentQueues[i++] = null;\n\n if (queue !== null && update !== null) {\n var pending = queue.pending;\n\n if (pending === null) {\n // This is the first update. Create a circular list.\n update.next = update;\n } else {\n update.next = pending.next;\n pending.next = update;\n }\n\n queue.pending = update;\n }\n\n if (lane !== NoLane) {\n markUpdateLaneFromFiberToRoot(fiber, update, lane);\n }\n }\n}\nfunction getConcurrentlyUpdatedLanes() {\n return concurrentlyUpdatedLanes;\n}\n\nfunction enqueueUpdate$1(fiber, queue, update, lane) {\n // Don't update the `childLanes` on the return path yet. If we already in\n // the middle of rendering, wait until after it has completed.\n concurrentQueues[concurrentQueuesIndex++] = fiber;\n concurrentQueues[concurrentQueuesIndex++] = queue;\n concurrentQueues[concurrentQueuesIndex++] = update;\n concurrentQueues[concurrentQueuesIndex++] = lane;\n concurrentlyUpdatedLanes = mergeLanes(concurrentlyUpdatedLanes, lane); // The fiber's `lane` field is used in some places to check if any work is\n // scheduled, to perform an eager bailout, so we need to update it immediately.\n // TODO: We should probably move this to the \"shared\" queue instead.\n\n fiber.lanes = mergeLanes(fiber.lanes, lane);\n var alternate = fiber.alternate;\n\n if (alternate !== null) {\n alternate.lanes = mergeLanes(alternate.lanes, lane);\n }\n}\n\nfunction enqueueConcurrentHookUpdate(fiber, queue, update, lane) {\n var concurrentQueue = queue;\n var concurrentUpdate = update;\n enqueueUpdate$1(fiber, concurrentQueue, concurrentUpdate, lane);\n return getRootForUpdatedFiber(fiber);\n}\nfunction enqueueConcurrentHookUpdateAndEagerlyBailout(fiber, queue, update) {\n // This function is used to queue an update that doesn't need a rerender. The\n // only reason we queue it is in case there's a subsequent higher priority\n // update that causes it to be rebased.\n var lane = NoLane;\n var concurrentQueue = queue;\n var concurrentUpdate = update;\n enqueueUpdate$1(fiber, concurrentQueue, concurrentUpdate, lane); // Usually we can rely on the upcoming render phase to process the concurrent\n // queue. However, since this is a bail out, we're not scheduling any work\n // here. So the update we just queued will leak until something else happens\n // to schedule work (if ever).\n //\n // Check if we're currently in the middle of rendering a tree, and if not,\n // process the queue immediately to prevent a leak.\n\n var isConcurrentlyRendering = getWorkInProgressRoot() !== null;\n\n if (!isConcurrentlyRendering) {\n finishQueueingConcurrentUpdates();\n }\n}\nfunction enqueueConcurrentClassUpdate(fiber, queue, update, lane) {\n var concurrentQueue = queue;\n var concurrentUpdate = update;\n enqueueUpdate$1(fiber, concurrentQueue, concurrentUpdate, lane);\n return getRootForUpdatedFiber(fiber);\n}\nfunction enqueueConcurrentRenderForLane(fiber, lane) {\n enqueueUpdate$1(fiber, null, null, lane);\n return getRootForUpdatedFiber(fiber);\n} // Calling this function outside this module should only be done for backwards\n// compatibility and should always be accompanied by a warning.\n\nfunction unsafe_markUpdateLaneFromFiberToRoot(sourceFiber, lane) {\n // NOTE: For Hyrum's Law reasons, if an infinite update loop is detected, it\n // should throw before `markUpdateLaneFromFiberToRoot` is called. But this is\n // undefined behavior and we can change it if we need to; it just so happens\n // that, at the time of this writing, there's an internal product test that\n // happens to rely on this.\n var root = getRootForUpdatedFiber(sourceFiber);\n markUpdateLaneFromFiberToRoot(sourceFiber, null, lane);\n return root;\n}\n\nfunction markUpdateLaneFromFiberToRoot(sourceFiber, update, lane) {\n // Update the source fiber's lanes\n sourceFiber.lanes = mergeLanes(sourceFiber.lanes, lane);\n var alternate = sourceFiber.alternate;\n\n if (alternate !== null) {\n alternate.lanes = mergeLanes(alternate.lanes, lane);\n } // Walk the parent path to the root and update the child lanes.\n\n\n var isHidden = false;\n var parent = sourceFiber.return;\n var node = sourceFiber;\n\n while (parent !== null) {\n parent.childLanes = mergeLanes(parent.childLanes, lane);\n alternate = parent.alternate;\n\n if (alternate !== null) {\n alternate.childLanes = mergeLanes(alternate.childLanes, lane);\n }\n\n if (parent.tag === OffscreenComponent) {\n // Check if this offscreen boundary is currently hidden.\n //\n // The instance may be null if the Offscreen parent was unmounted. Usually\n // the parent wouldn't be reachable in that case because we disconnect\n // fibers from the tree when they are deleted. However, there's a weird\n // edge case where setState is called on a fiber that was interrupted\n // before it ever mounted. Because it never mounts, it also never gets\n // deleted. Because it never gets deleted, its return pointer never gets\n // disconnected. Which means it may be attached to a deleted Offscreen\n // parent node. (This discovery suggests it may be better for memory usage\n // if we don't attach the `return` pointer until the commit phase, though\n // in order to do that we'd need some other way to track the return\n // pointer during the initial render, like on the stack.)\n //\n // This case is always accompanied by a warning, but we still need to\n // account for it. (There may be other cases that we haven't discovered,\n // too.)\n var offscreenInstance = parent.stateNode;\n\n if (offscreenInstance !== null && !(offscreenInstance._visibility & OffscreenVisible)) {\n isHidden = true;\n }\n }\n\n node = parent;\n parent = parent.return;\n }\n\n if (isHidden && update !== null && node.tag === HostRoot) {\n var root = node.stateNode;\n markHiddenUpdate(root, update, lane);\n }\n}\n\nfunction getRootForUpdatedFiber(sourceFiber) {\n // TODO: We will detect and infinite update loop and throw even if this fiber\n // has already unmounted. This isn't really necessary but it happens to be the\n // current behavior we've used for several release cycles. Consider not\n // performing this check if the updated fiber already unmounted, since it's\n // not possible for that to cause an infinite update loop.\n throwIfInfiniteUpdateLoopDetected(); // When a setState happens, we must ensure the root is scheduled. Because\n // update queues do not have a backpointer to the root, the only way to do\n // this currently is to walk up the return path. This used to not be a big\n // deal because we would have to walk up the return path to set\n // the `childLanes`, anyway, but now those two traversals happen at\n // different times.\n // TODO: Consider adding a `root` backpointer on the update queue.\n\n detectUpdateOnUnmountedFiber(sourceFiber, sourceFiber);\n var node = sourceFiber;\n var parent = node.return;\n\n while (parent !== null) {\n detectUpdateOnUnmountedFiber(sourceFiber, node);\n node = parent;\n parent = node.return;\n }\n\n return node.tag === HostRoot ? node.stateNode : null;\n}\n\nfunction detectUpdateOnUnmountedFiber(sourceFiber, parent) {\n {\n var alternate = parent.alternate;\n\n if (alternate === null && (parent.flags & (Placement | Hydrating)) !== NoFlags$1) {\n warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber);\n }\n }\n}\n\nvar ReactCurrentActQueue$3 = ReactSharedInternals.ReactCurrentActQueue; // A linked list of all the roots with pending work. In an idiomatic app,\n// there's only a single root, but we do support multi root apps, hence this\n// extra complexity. But this module is optimized for the single root case.\n\nvar firstScheduledRoot = null;\nvar lastScheduledRoot = null; // Used to prevent redundant mircotasks from being scheduled.\n\nvar didScheduleMicrotask = false; // `act` \"microtasks\" are scheduled on the `act` queue instead of an actual\n// microtask, so we have to dedupe those separately. This wouldn't be an issue\n// if we required all `act` calls to be awaited, which we might in the future.\n\nvar didScheduleMicrotask_act = false; // Used to quickly bail out of flushSync if there's no sync work to do.\n\nvar mightHavePendingSyncWork = false;\nvar isFlushingWork = false;\nvar currentEventTransitionLane = NoLane;\nfunction ensureRootIsScheduled(root) {\n // This function is called whenever a root receives an update. It does two\n // things 1) it ensures the root is in the root schedule, and 2) it ensures\n // there's a pending microtask to process the root schedule.\n //\n // Most of the actual scheduling logic does not happen until\n // `scheduleTaskForRootDuringMicrotask` runs.\n // Add the root to the schedule\n if (root === lastScheduledRoot || root.next !== null) ; else {\n if (lastScheduledRoot === null) {\n firstScheduledRoot = lastScheduledRoot = root;\n } else {\n lastScheduledRoot.next = root;\n lastScheduledRoot = root;\n }\n } // Any time a root received an update, we set this to true until the next time\n // we process the schedule. If it's false, then we can quickly exit flushSync\n // without consulting the schedule.\n\n\n mightHavePendingSyncWork = true; // At the end of the current event, go through each of the roots and ensure\n // there's a task scheduled for each one at the correct priority.\n\n if (ReactCurrentActQueue$3.current !== null) {\n // We're inside an `act` scope.\n if (!didScheduleMicrotask_act) {\n didScheduleMicrotask_act = true;\n scheduleImmediateTask(processRootScheduleInMicrotask);\n }\n } else {\n if (!didScheduleMicrotask) {\n didScheduleMicrotask = true;\n scheduleImmediateTask(processRootScheduleInMicrotask);\n }\n }\n\n if (ReactCurrentActQueue$3.isBatchingLegacy && root.tag === LegacyRoot) {\n // Special `act` case: Record whenever a legacy update is scheduled.\n ReactCurrentActQueue$3.didScheduleLegacyUpdate = true;\n }\n}\nfunction flushSyncWorkOnAllRoots() {\n // This is allowed to be called synchronously, but the caller should check\n // the execution context first.\n flushSyncWorkAcrossRoots_impl(false);\n}\nfunction flushSyncWorkOnLegacyRootsOnly() {\n // This is allowed to be called synchronously, but the caller should check\n // the execution context first.\n flushSyncWorkAcrossRoots_impl(true);\n}\n\nfunction flushSyncWorkAcrossRoots_impl(onlyLegacy) {\n if (isFlushingWork) {\n // Prevent reentrancy.\n // TODO: Is this overly defensive? The callers must check the execution\n // context first regardless.\n return;\n }\n\n if (!mightHavePendingSyncWork) {\n // Fast path. There's no sync work to do.\n return;\n } // There may or may not be synchronous work scheduled. Let's check.\n\n\n var didPerformSomeWork;\n var errors = null;\n isFlushingWork = true;\n\n do {\n didPerformSomeWork = false;\n var root = firstScheduledRoot;\n\n while (root !== null) {\n if (onlyLegacy && root.tag !== LegacyRoot) ; else {\n var workInProgressRoot = getWorkInProgressRoot();\n var workInProgressRootRenderLanes = getWorkInProgressRootRenderLanes();\n var nextLanes = getNextLanes(root, root === workInProgressRoot ? workInProgressRootRenderLanes : NoLanes);\n\n if (includesSyncLane(nextLanes)) {\n // This root has pending sync work. Flush it now.\n try {\n didPerformSomeWork = true;\n performSyncWorkOnRoot(root, nextLanes);\n } catch (error) {\n // Collect errors so we can rethrow them at the end\n if (errors === null) {\n errors = [error];\n } else {\n errors.push(error);\n }\n }\n }\n }\n\n root = root.next;\n }\n } while (didPerformSomeWork);\n\n isFlushingWork = false; // If any errors were thrown, rethrow them right before exiting.\n // TODO: Consider returning these to the caller, to allow them to decide\n // how/when to rethrow.\n\n if (errors !== null) {\n if (errors.length > 1) {\n if (typeof AggregateError === 'function') {\n // eslint-disable-next-line no-undef\n throw new AggregateError(errors);\n } else {\n for (var i = 1; i < errors.length; i++) {\n scheduleImmediateTask(throwError.bind(null, errors[i]));\n }\n\n var firstError = errors[0];\n throw firstError;\n }\n } else {\n var error = errors[0];\n throw error;\n }\n }\n}\n\nfunction throwError(error) {\n throw error;\n}\n\nfunction processRootScheduleInMicrotask() {\n // This function is always called inside a microtask. It should never be\n // called synchronously.\n didScheduleMicrotask = false;\n\n {\n didScheduleMicrotask_act = false;\n } // We'll recompute this as we iterate through all the roots and schedule them.\n\n\n mightHavePendingSyncWork = false;\n var currentTime = now$1();\n var prev = null;\n var root = firstScheduledRoot;\n\n while (root !== null) {\n var next = root.next;\n\n if (currentEventTransitionLane !== NoLane && shouldAttemptEagerTransition()) {\n // A transition was scheduled during an event, but we're going to try to\n // render it synchronously anyway. We do this during a popstate event to\n // preserve the scroll position of the previous page.\n upgradePendingLaneToSync(root, currentEventTransitionLane);\n }\n\n var nextLanes = scheduleTaskForRootDuringMicrotask(root, currentTime);\n\n if (nextLanes === NoLane) {\n // This root has no more pending work. Remove it from the schedule. To\n // guard against subtle reentrancy bugs, this microtask is the only place\n // we do this — you can add roots to the schedule whenever, but you can\n // only remove them here.\n // Null this out so we know it's been removed from the schedule.\n root.next = null;\n\n if (prev === null) {\n // This is the new head of the list\n firstScheduledRoot = next;\n } else {\n prev.next = next;\n }\n\n if (next === null) {\n // This is the new tail of the list\n lastScheduledRoot = prev;\n }\n } else {\n // This root still has work. Keep it in the list.\n prev = root;\n\n if (includesSyncLane(nextLanes)) {\n mightHavePendingSyncWork = true;\n }\n }\n\n root = next;\n }\n\n currentEventTransitionLane = NoLane; // At the end of the microtask, flush any pending synchronous work. This has\n // to come at the end, because it does actual rendering work that might throw.\n\n flushSyncWorkOnAllRoots();\n}\n\nfunction scheduleTaskForRootDuringMicrotask(root, currentTime) {\n // This function is always called inside a microtask, or at the very end of a\n // rendering task right before we yield to the main thread. It should never be\n // called synchronously.\n //\n // TODO: Unless enableDeferRootSchedulingToMicrotask is off. We need to land\n // that ASAP to unblock additional features we have planned.\n //\n // This function also never performs React work synchronously; it should\n // only schedule work to be performed later, in a separate task or microtask.\n // Check if any lanes are being starved by other work. If so, mark them as\n // expired so we know to work on those next.\n markStarvedLanesAsExpired(root, currentTime); // Determine the next lanes to work on, and their priority.\n\n var workInProgressRoot = getWorkInProgressRoot();\n var workInProgressRootRenderLanes = getWorkInProgressRootRenderLanes();\n var nextLanes = getNextLanes(root, root === workInProgressRoot ? workInProgressRootRenderLanes : NoLanes);\n var existingCallbackNode = root.callbackNode;\n\n if ( // Check if there's nothing to work on\n nextLanes === NoLanes || // If this root is currently suspended and waiting for data to resolve, don't\n // schedule a task to render it. We'll either wait for a ping, or wait to\n // receive an update.\n //\n // Suspended render phase\n root === workInProgressRoot && isWorkLoopSuspendedOnData() || // Suspended commit phase\n root.cancelPendingCommit !== null) {\n // Fast path: There's nothing to work on.\n if (existingCallbackNode !== null) {\n cancelCallback(existingCallbackNode);\n }\n\n root.callbackNode = null;\n root.callbackPriority = NoLane;\n return NoLane;\n } // Schedule a new callback in the host environment.\n\n\n if (includesSyncLane(nextLanes)) {\n // Synchronous work is always flushed at the end of the microtask, so we\n // don't need to schedule an additional task.\n if (existingCallbackNode !== null) {\n cancelCallback(existingCallbackNode);\n }\n\n root.callbackPriority = SyncLane;\n root.callbackNode = null;\n return SyncLane;\n } else {\n // We use the highest priority lane to represent the priority of the callback.\n var existingCallbackPriority = root.callbackPriority;\n var newCallbackPriority = getHighestPriorityLane(nextLanes);\n\n if (newCallbackPriority === existingCallbackPriority && // Special case related to `act`. If the currently scheduled task is a\n // Scheduler task, rather than an `act` task, cancel it and re-schedule\n // on the `act` queue.\n !(ReactCurrentActQueue$3.current !== null && existingCallbackNode !== fakeActCallbackNode$1)) {\n // The priority hasn't changed. We can reuse the existing task.\n return newCallbackPriority;\n } else {\n // Cancel the existing callback. We'll schedule a new one below.\n cancelCallback(existingCallbackNode);\n }\n\n var schedulerPriorityLevel;\n\n switch (lanesToEventPriority(nextLanes)) {\n case DiscreteEventPriority:\n schedulerPriorityLevel = ImmediatePriority;\n break;\n\n case ContinuousEventPriority:\n schedulerPriorityLevel = UserBlockingPriority;\n break;\n\n case DefaultEventPriority:\n schedulerPriorityLevel = NormalPriority$1;\n break;\n\n case IdleEventPriority:\n schedulerPriorityLevel = IdlePriority;\n break;\n\n default:\n schedulerPriorityLevel = NormalPriority$1;\n break;\n }\n\n var newCallbackNode = scheduleCallback$2(schedulerPriorityLevel, performConcurrentWorkOnRoot.bind(null, root));\n root.callbackPriority = newCallbackPriority;\n root.callbackNode = newCallbackNode;\n return newCallbackPriority;\n }\n}\n\nfunction getContinuationForRoot(root, originalCallbackNode) {\n // This is called at the end of `performConcurrentWorkOnRoot` to determine\n // if we need to schedule a continuation task.\n //\n // Usually `scheduleTaskForRootDuringMicrotask` only runs inside a microtask;\n // however, since most of the logic for determining if we need a continuation\n // versus a new task is the same, we cheat a bit and call it here. This is\n // only safe to do because we know we're at the end of the browser task.\n // So although it's not an actual microtask, it might as well be.\n scheduleTaskForRootDuringMicrotask(root, now$1());\n\n if (root.callbackNode === originalCallbackNode) {\n // The task node scheduled for this root is the same one that's\n // currently executed. Need to return a continuation.\n return performConcurrentWorkOnRoot.bind(null, root);\n }\n\n return null;\n}\nvar fakeActCallbackNode$1 = {};\n\nfunction scheduleCallback$2(priorityLevel, callback) {\n if (ReactCurrentActQueue$3.current !== null) {\n // Special case: We're inside an `act` scope (a testing utility).\n // Instead of scheduling work in the host environment, add it to a\n // fake internal queue that's managed by the `act` implementation.\n ReactCurrentActQueue$3.current.push(callback);\n return fakeActCallbackNode$1;\n } else {\n return scheduleCallback$3(priorityLevel, callback);\n }\n}\n\nfunction cancelCallback(callbackNode) {\n if (callbackNode === fakeActCallbackNode$1) ; else if (callbackNode !== null) {\n cancelCallback$1(callbackNode);\n }\n}\n\nfunction scheduleImmediateTask(cb) {\n if (ReactCurrentActQueue$3.current !== null) {\n // Special case: Inside an `act` scope, we push microtasks to the fake `act`\n // callback queue. This is because we currently support calling `act`\n // without awaiting the result. The plan is to deprecate that, and require\n // that you always await the result so that the microtasks have a chance to\n // run. But it hasn't happened yet.\n ReactCurrentActQueue$3.current.push(function () {\n cb();\n return null;\n });\n } // TODO: Can we land supportsMicrotasks? Which environments don't support it?\n // Alternatively, can we move this check to the host config?\n\n\n {\n scheduleMicrotask(function () {\n // In Safari, appending an iframe forces microtasks to run.\n // https://github.com/facebook/react/issues/22459\n // We don't support running callbacks in the middle of render\n // or commit so we need to check against that.\n var executionContext = getExecutionContext();\n\n if ((executionContext & (RenderContext | CommitContext)) !== NoContext) {\n // Note that this would still prematurely flush the callbacks\n // if this happens outside render or commit phase (e.g. in an event).\n // Intentionally using a macrotask instead of a microtask here. This is\n // wrong semantically but it prevents an infinite loop. The bug is\n // Safari's, not ours, so we just do our best to not crash even though\n // the behavior isn't completely correct.\n scheduleCallback$3(ImmediatePriority, cb);\n return;\n }\n\n cb();\n });\n }\n}\n\nfunction requestTransitionLane( // This argument isn't used, it's only here to encourage the caller to\n// check that it's inside a transition before calling this function.\n// TODO: Make this non-nullable. Requires a tweak to useOptimistic.\ntransition) {\n // The algorithm for assigning an update to a lane should be stable for all\n // updates at the same priority within the same event. To do this, the\n // inputs to the algorithm must be the same.\n //\n // The trick we use is to cache the first of each of these inputs within an\n // event. Then reset the cached values once we can be sure the event is\n // over. Our heuristic for that is whenever we enter a concurrent work loop.\n if (currentEventTransitionLane === NoLane) {\n // All transitions within the same event are assigned the same lane.\n currentEventTransitionLane = claimNextTransitionLane();\n }\n\n return currentEventTransitionLane;\n}\n\n// transition updates that occur while the async action is still in progress\n// are treated as part of the action.\n//\n// The ideal behavior would be to treat each async function as an independent\n// action. However, without a mechanism like AsyncContext, we can't tell which\n// action an update corresponds to. So instead, we entangle them all into one.\n// The listeners to notify once the entangled scope completes.\n\nvar currentEntangledListeners = null; // The number of pending async actions in the entangled scope.\n\nvar currentEntangledPendingCount = 0; // The transition lane shared by all updates in the entangled scope.\n\nvar currentEntangledLane = NoLane; // A thenable that resolves when the entangled scope completes. It does not\n// resolve to a particular value because it's only used for suspending the UI\n// until the async action scope has completed.\n\nvar currentEntangledActionThenable = null;\nfunction entangleAsyncAction(transition, thenable) {\n // `thenable` is the return value of the async action scope function. Create\n // a combined thenable that resolves once every entangled scope function\n // has finished.\n if (currentEntangledListeners === null) {\n // There's no outer async action scope. Create a new one.\n var entangledListeners = currentEntangledListeners = [];\n currentEntangledPendingCount = 0;\n currentEntangledLane = requestTransitionLane();\n var entangledThenable = {\n status: 'pending',\n value: undefined,\n then: function (resolve) {\n entangledListeners.push(resolve);\n }\n };\n currentEntangledActionThenable = entangledThenable;\n }\n\n currentEntangledPendingCount++;\n thenable.then(pingEngtangledActionScope, pingEngtangledActionScope);\n return thenable;\n}\n\nfunction pingEngtangledActionScope() {\n if (currentEntangledListeners !== null && --currentEntangledPendingCount === 0) {\n // All the actions have finished. Close the entangled async action scope\n // and notify all the listeners.\n if (currentEntangledActionThenable !== null) {\n var fulfilledThenable = currentEntangledActionThenable;\n fulfilledThenable.status = 'fulfilled';\n }\n\n var listeners = currentEntangledListeners;\n currentEntangledListeners = null;\n currentEntangledLane = NoLane;\n currentEntangledActionThenable = null;\n\n for (var i = 0; i < listeners.length; i++) {\n var listener = listeners[i];\n listener();\n }\n }\n}\n\nfunction chainThenableValue(thenable, result) {\n // Equivalent to: Promise.resolve(thenable).then(() => result), except we can\n // cheat a bit since we know that that this thenable is only ever consumed\n // by React.\n //\n // We don't technically require promise support on the client yet, hence this\n // extra code.\n var listeners = [];\n var thenableWithOverride = {\n status: 'pending',\n value: null,\n reason: null,\n then: function (resolve) {\n listeners.push(resolve);\n }\n };\n thenable.then(function (value) {\n var fulfilledThenable = thenableWithOverride;\n fulfilledThenable.status = 'fulfilled';\n fulfilledThenable.value = result;\n\n for (var i = 0; i < listeners.length; i++) {\n var listener = listeners[i];\n listener(result);\n }\n }, function (error) {\n var rejectedThenable = thenableWithOverride;\n rejectedThenable.status = 'rejected';\n rejectedThenable.reason = error;\n\n for (var i = 0; i < listeners.length; i++) {\n var listener = listeners[i]; // This is a perf hack where we call the `onFulfill` ping function\n // instead of `onReject`, because we know that React is the only\n // consumer of these promises, and it passes the same listener to both.\n // We also know that it will read the error directly off the\n // `.reason` field.\n\n listener(undefined);\n }\n });\n return thenableWithOverride;\n}\nfunction peekEntangledActionLane() {\n return currentEntangledLane;\n}\nfunction peekEntangledActionThenable() {\n return currentEntangledActionThenable;\n}\n\nvar UpdateState = 0;\nvar ReplaceState = 1;\nvar ForceUpdate = 2;\nvar CaptureUpdate = 3; // Global state that is reset at the beginning of calling `processUpdateQueue`.\n// It should only be read right after calling `processUpdateQueue`, via\n// `checkHasForceUpdateAfterProcessing`.\n\nvar hasForceUpdate = false;\nvar didWarnUpdateInsideUpdate;\nvar currentlyProcessingQueue;\n\n{\n didWarnUpdateInsideUpdate = false;\n currentlyProcessingQueue = null;\n}\n\nfunction initializeUpdateQueue(fiber) {\n var queue = {\n baseState: fiber.memoizedState,\n firstBaseUpdate: null,\n lastBaseUpdate: null,\n shared: {\n pending: null,\n lanes: NoLanes,\n hiddenCallbacks: null\n },\n callbacks: null\n };\n fiber.updateQueue = queue;\n}\nfunction cloneUpdateQueue(current, workInProgress) {\n // Clone the update queue from current. Unless it's already a clone.\n var queue = workInProgress.updateQueue;\n var currentQueue = current.updateQueue;\n\n if (queue === currentQueue) {\n var clone = {\n baseState: currentQueue.baseState,\n firstBaseUpdate: currentQueue.firstBaseUpdate,\n lastBaseUpdate: currentQueue.lastBaseUpdate,\n shared: currentQueue.shared,\n callbacks: null\n };\n workInProgress.updateQueue = clone;\n }\n}\nfunction createUpdate(lane) {\n var update = {\n lane: lane,\n tag: UpdateState,\n payload: null,\n callback: null,\n next: null\n };\n return update;\n}\nfunction enqueueUpdate(fiber, update, lane) {\n var updateQueue = fiber.updateQueue;\n\n if (updateQueue === null) {\n // Only occurs if the fiber has been unmounted.\n return null;\n }\n\n var sharedQueue = updateQueue.shared;\n\n {\n if (currentlyProcessingQueue === sharedQueue && !didWarnUpdateInsideUpdate) {\n var componentName = getComponentNameFromFiber(fiber);\n\n error('An update (setState, replaceState, or forceUpdate) was scheduled ' + 'from inside an update function. Update functions should be pure, ' + 'with zero side-effects. Consider using componentDidUpdate or a ' + 'callback.\\n\\nPlease update the following component: %s', componentName);\n\n didWarnUpdateInsideUpdate = true;\n }\n }\n\n if (isUnsafeClassRenderPhaseUpdate()) {\n // This is an unsafe render phase update. Add directly to the update\n // queue so we can process it immediately during the current render.\n var pending = sharedQueue.pending;\n\n if (pending === null) {\n // This is the first update. Create a circular list.\n update.next = update;\n } else {\n update.next = pending.next;\n pending.next = update;\n }\n\n sharedQueue.pending = update; // Update the childLanes even though we're most likely already rendering\n // this fiber. This is for backwards compatibility in the case where you\n // update a different component during render phase than the one that is\n // currently renderings (a pattern that is accompanied by a warning).\n\n return unsafe_markUpdateLaneFromFiberToRoot(fiber, lane);\n } else {\n return enqueueConcurrentClassUpdate(fiber, sharedQueue, update, lane);\n }\n}\nfunction entangleTransitions(root, fiber, lane) {\n var updateQueue = fiber.updateQueue;\n\n if (updateQueue === null) {\n // Only occurs if the fiber has been unmounted.\n return;\n }\n\n var sharedQueue = updateQueue.shared;\n\n if (isTransitionLane(lane)) {\n var queueLanes = sharedQueue.lanes; // If any entangled lanes are no longer pending on the root, then they must\n // have finished. We can remove them from the shared queue, which represents\n // a superset of the actually pending lanes. In some cases we may entangle\n // more than we need to, but that's OK. In fact it's worse if we *don't*\n // entangle when we should.\n\n queueLanes = intersectLanes(queueLanes, root.pendingLanes); // Entangle the new transition lane with the other transition lanes.\n\n var newQueueLanes = mergeLanes(queueLanes, lane);\n sharedQueue.lanes = newQueueLanes; // Even if queue.lanes already include lane, we don't know for certain if\n // the lane finished since the last time we entangled it. So we need to\n // entangle it again, just to be sure.\n\n markRootEntangled(root, newQueueLanes);\n }\n}\nfunction enqueueCapturedUpdate(workInProgress, capturedUpdate) {\n // Captured updates are updates that are thrown by a child during the render\n // phase. They should be discarded if the render is aborted. Therefore,\n // we should only put them on the work-in-progress queue, not the current one.\n var queue = workInProgress.updateQueue; // Check if the work-in-progress queue is a clone.\n\n var current = workInProgress.alternate;\n\n if (current !== null) {\n var currentQueue = current.updateQueue;\n\n if (queue === currentQueue) {\n // The work-in-progress queue is the same as current. This happens when\n // we bail out on a parent fiber that then captures an error thrown by\n // a child. Since we want to append the update only to the work-in\n // -progress queue, we need to clone the updates. We usually clone during\n // processUpdateQueue, but that didn't happen in this case because we\n // skipped over the parent when we bailed out.\n var newFirst = null;\n var newLast = null;\n var firstBaseUpdate = queue.firstBaseUpdate;\n\n if (firstBaseUpdate !== null) {\n // Loop through the updates and clone them.\n var update = firstBaseUpdate;\n\n do {\n var clone = {\n lane: update.lane,\n tag: update.tag,\n payload: update.payload,\n // When this update is rebased, we should not fire its\n // callback again.\n callback: null,\n next: null\n };\n\n if (newLast === null) {\n newFirst = newLast = clone;\n } else {\n newLast.next = clone;\n newLast = clone;\n } // $FlowFixMe[incompatible-type] we bail out when we get a null\n\n\n update = update.next;\n } while (update !== null); // Append the captured update the end of the cloned list.\n\n\n if (newLast === null) {\n newFirst = newLast = capturedUpdate;\n } else {\n newLast.next = capturedUpdate;\n newLast = capturedUpdate;\n }\n } else {\n // There are no base updates.\n newFirst = newLast = capturedUpdate;\n }\n\n queue = {\n baseState: currentQueue.baseState,\n firstBaseUpdate: newFirst,\n lastBaseUpdate: newLast,\n shared: currentQueue.shared,\n callbacks: currentQueue.callbacks\n };\n workInProgress.updateQueue = queue;\n return;\n }\n } // Append the update to the end of the list.\n\n\n var lastBaseUpdate = queue.lastBaseUpdate;\n\n if (lastBaseUpdate === null) {\n queue.firstBaseUpdate = capturedUpdate;\n } else {\n lastBaseUpdate.next = capturedUpdate;\n }\n\n queue.lastBaseUpdate = capturedUpdate;\n}\n\nfunction getStateFromUpdate(workInProgress, queue, update, prevState, nextProps, instance) {\n switch (update.tag) {\n case ReplaceState:\n {\n var payload = update.payload;\n\n if (typeof payload === 'function') {\n // Updater function\n {\n enterDisallowedContextReadInDEV();\n }\n\n var nextState = payload.call(instance, prevState, nextProps);\n\n {\n if (workInProgress.mode & StrictLegacyMode) {\n setIsStrictModeForDevtools(true);\n\n try {\n payload.call(instance, prevState, nextProps);\n } finally {\n setIsStrictModeForDevtools(false);\n }\n }\n\n exitDisallowedContextReadInDEV();\n }\n\n return nextState;\n } // State object\n\n\n return payload;\n }\n\n case CaptureUpdate:\n {\n workInProgress.flags = workInProgress.flags & ~ShouldCapture | DidCapture;\n }\n // Intentional fallthrough\n\n case UpdateState:\n {\n var _payload = update.payload;\n var partialState;\n\n if (typeof _payload === 'function') {\n // Updater function\n {\n enterDisallowedContextReadInDEV();\n }\n\n partialState = _payload.call(instance, prevState, nextProps);\n\n {\n if (workInProgress.mode & StrictLegacyMode) {\n setIsStrictModeForDevtools(true);\n\n try {\n _payload.call(instance, prevState, nextProps);\n } finally {\n setIsStrictModeForDevtools(false);\n }\n }\n\n exitDisallowedContextReadInDEV();\n }\n } else {\n // Partial state object\n partialState = _payload;\n }\n\n if (partialState === null || partialState === undefined) {\n // Null and undefined are treated as no-ops.\n return prevState;\n } // Merge the partial state and the previous state.\n\n\n return assign({}, prevState, partialState);\n }\n\n case ForceUpdate:\n {\n hasForceUpdate = true;\n return prevState;\n }\n }\n\n return prevState;\n}\n\nvar didReadFromEntangledAsyncAction = false; // Each call to processUpdateQueue should be accompanied by a call to this. It's\n// only in a separate function because in updateHostRoot, it must happen after\n// all the context stacks have been pushed to, to prevent a stack mismatch. A\n// bit unfortunate.\n\nfunction suspendIfUpdateReadFromEntangledAsyncAction() {\n // Check if this update is part of a pending async action. If so, we'll\n // need to suspend until the action has finished, so that it's batched\n // together with future updates in the same action.\n // TODO: Once we support hooks inside useMemo (or an equivalent\n // memoization boundary like Forget), hoist this logic so that it only\n // suspends if the memo boundary produces a new value.\n if (didReadFromEntangledAsyncAction) {\n var entangledActionThenable = peekEntangledActionThenable();\n\n if (entangledActionThenable !== null) {\n // TODO: Instead of the throwing the thenable directly, throw a\n // special object like `use` does so we can detect if it's captured\n // by userspace.\n throw entangledActionThenable;\n }\n }\n}\nfunction processUpdateQueue(workInProgress, props, instance, renderLanes) {\n didReadFromEntangledAsyncAction = false; // This is always non-null on a ClassComponent or HostRoot\n\n var queue = workInProgress.updateQueue;\n hasForceUpdate = false;\n\n {\n currentlyProcessingQueue = queue.shared;\n }\n\n var firstBaseUpdate = queue.firstBaseUpdate;\n var lastBaseUpdate = queue.lastBaseUpdate; // Check if there are pending updates. If so, transfer them to the base queue.\n\n var pendingQueue = queue.shared.pending;\n\n if (pendingQueue !== null) {\n queue.shared.pending = null; // The pending queue is circular. Disconnect the pointer between first\n // and last so that it's non-circular.\n\n var lastPendingUpdate = pendingQueue;\n var firstPendingUpdate = lastPendingUpdate.next;\n lastPendingUpdate.next = null; // Append pending updates to base queue\n\n if (lastBaseUpdate === null) {\n firstBaseUpdate = firstPendingUpdate;\n } else {\n lastBaseUpdate.next = firstPendingUpdate;\n }\n\n lastBaseUpdate = lastPendingUpdate; // If there's a current queue, and it's different from the base queue, then\n // we need to transfer the updates to that queue, too. Because the base\n // queue is a singly-linked list with no cycles, we can append to both\n // lists and take advantage of structural sharing.\n // TODO: Pass `current` as argument\n\n var current = workInProgress.alternate;\n\n if (current !== null) {\n // This is always non-null on a ClassComponent or HostRoot\n var currentQueue = current.updateQueue;\n var currentLastBaseUpdate = currentQueue.lastBaseUpdate;\n\n if (currentLastBaseUpdate !== lastBaseUpdate) {\n if (currentLastBaseUpdate === null) {\n currentQueue.firstBaseUpdate = firstPendingUpdate;\n } else {\n currentLastBaseUpdate.next = firstPendingUpdate;\n }\n\n currentQueue.lastBaseUpdate = lastPendingUpdate;\n }\n }\n } // These values may change as we process the queue.\n\n\n if (firstBaseUpdate !== null) {\n // Iterate through the list of updates to compute the result.\n var newState = queue.baseState; // TODO: Don't need to accumulate this. Instead, we can remove renderLanes\n // from the original lanes.\n\n var newLanes = NoLanes;\n var newBaseState = null;\n var newFirstBaseUpdate = null;\n var newLastBaseUpdate = null;\n var update = firstBaseUpdate;\n\n do {\n // An extra OffscreenLane bit is added to updates that were made to\n // a hidden tree, so that we can distinguish them from updates that were\n // already there when the tree was hidden.\n var updateLane = removeLanes(update.lane, OffscreenLane);\n var isHiddenUpdate = updateLane !== update.lane; // Check if this update was made while the tree was hidden. If so, then\n // it's not a \"base\" update and we should disregard the extra base lanes\n // that were added to renderLanes when we entered the Offscreen tree.\n\n var shouldSkipUpdate = isHiddenUpdate ? !isSubsetOfLanes(getWorkInProgressRootRenderLanes(), updateLane) : !isSubsetOfLanes(renderLanes, updateLane);\n\n if (shouldSkipUpdate) {\n // Priority is insufficient. Skip this update. If this is the first\n // skipped update, the previous update/state is the new base\n // update/state.\n var clone = {\n lane: updateLane,\n tag: update.tag,\n payload: update.payload,\n callback: update.callback,\n next: null\n };\n\n if (newLastBaseUpdate === null) {\n newFirstBaseUpdate = newLastBaseUpdate = clone;\n newBaseState = newState;\n } else {\n newLastBaseUpdate = newLastBaseUpdate.next = clone;\n } // Update the remaining priority in the queue.\n\n\n newLanes = mergeLanes(newLanes, updateLane);\n } else {\n // This update does have sufficient priority.\n // Check if this update is part of a pending async action. If so,\n // we'll need to suspend until the action has finished, so that it's\n // batched together with future updates in the same action.\n if (updateLane !== NoLane && updateLane === peekEntangledActionLane()) {\n didReadFromEntangledAsyncAction = true;\n }\n\n if (newLastBaseUpdate !== null) {\n var _clone = {\n // This update is going to be committed so we never want uncommit\n // it. Using NoLane works because 0 is a subset of all bitmasks, so\n // this will never be skipped by the check above.\n lane: NoLane,\n tag: update.tag,\n payload: update.payload,\n // When this update is rebased, we should not fire its\n // callback again.\n callback: null,\n next: null\n };\n newLastBaseUpdate = newLastBaseUpdate.next = _clone;\n } // Process this update.\n\n\n newState = getStateFromUpdate(workInProgress, queue, update, newState, props, instance);\n var callback = update.callback;\n\n if (callback !== null) {\n workInProgress.flags |= Callback;\n\n if (isHiddenUpdate) {\n workInProgress.flags |= Visibility;\n }\n\n var callbacks = queue.callbacks;\n\n if (callbacks === null) {\n queue.callbacks = [callback];\n } else {\n callbacks.push(callback);\n }\n }\n } // $FlowFixMe[incompatible-type] we bail out when we get a null\n\n\n update = update.next;\n\n if (update === null) {\n pendingQueue = queue.shared.pending;\n\n if (pendingQueue === null) {\n break;\n } else {\n // An update was scheduled from inside a reducer. Add the new\n // pending updates to the end of the list and keep processing.\n var _lastPendingUpdate = pendingQueue; // Intentionally unsound. Pending updates form a circular list, but we\n // unravel them when transferring them to the base queue.\n\n var _firstPendingUpdate = _lastPendingUpdate.next;\n _lastPendingUpdate.next = null;\n update = _firstPendingUpdate;\n queue.lastBaseUpdate = _lastPendingUpdate;\n queue.shared.pending = null;\n }\n }\n } while (true);\n\n if (newLastBaseUpdate === null) {\n newBaseState = newState;\n }\n\n queue.baseState = newBaseState;\n queue.firstBaseUpdate = newFirstBaseUpdate;\n queue.lastBaseUpdate = newLastBaseUpdate;\n\n if (firstBaseUpdate === null) {\n // `queue.lanes` is used for entangling transitions. We can set it back to\n // zero once the queue is empty.\n queue.shared.lanes = NoLanes;\n } // Set the remaining expiration time to be whatever is remaining in the queue.\n // This should be fine because the only two other things that contribute to\n // expiration time are props and context. We're already in the middle of the\n // begin phase by the time we start processing the queue, so we've already\n // dealt with the props. Context in components that specify\n // shouldComponentUpdate is tricky; but we'll have to account for\n // that regardless.\n\n\n markSkippedUpdateLanes(newLanes);\n workInProgress.lanes = newLanes;\n workInProgress.memoizedState = newState;\n }\n\n {\n currentlyProcessingQueue = null;\n }\n}\n\nfunction callCallback(callback, context) {\n if (typeof callback !== 'function') {\n throw new Error('Invalid argument passed as callback. Expected a function. Instead ' + (\"received: \" + callback));\n }\n\n callback.call(context);\n}\n\nfunction resetHasForceUpdateBeforeProcessing() {\n hasForceUpdate = false;\n}\nfunction checkHasForceUpdateAfterProcessing() {\n return hasForceUpdate;\n}\nfunction deferHiddenCallbacks(updateQueue) {\n // When an update finishes on a hidden component, its callback should not\n // be fired until/unless the component is made visible again. Stash the\n // callback on the shared queue object so it can be fired later.\n var newHiddenCallbacks = updateQueue.callbacks;\n\n if (newHiddenCallbacks !== null) {\n var existingHiddenCallbacks = updateQueue.shared.hiddenCallbacks;\n\n if (existingHiddenCallbacks === null) {\n updateQueue.shared.hiddenCallbacks = newHiddenCallbacks;\n } else {\n updateQueue.shared.hiddenCallbacks = existingHiddenCallbacks.concat(newHiddenCallbacks);\n }\n }\n}\nfunction commitHiddenCallbacks(updateQueue, context) {\n // This component is switching from hidden -> visible. Commit any callbacks\n // that were previously deferred.\n var hiddenCallbacks = updateQueue.shared.hiddenCallbacks;\n\n if (hiddenCallbacks !== null) {\n updateQueue.shared.hiddenCallbacks = null;\n\n for (var i = 0; i < hiddenCallbacks.length; i++) {\n var callback = hiddenCallbacks[i];\n callCallback(callback, context);\n }\n }\n}\nfunction commitCallbacks(updateQueue, context) {\n var callbacks = updateQueue.callbacks;\n\n if (callbacks !== null) {\n updateQueue.callbacks = null;\n\n for (var i = 0; i < callbacks.length; i++) {\n var callback = callbacks[i];\n callCallback(callback, context);\n }\n }\n}\n\n/**\n * Performs equality by iterating through keys on an object and returning false\n * when any key has values which are not strictly equal between the arguments.\n * Returns true when the values of all keys are strictly equal.\n */\n\nfunction shallowEqual(objA, objB) {\n if (objectIs(objA, objB)) {\n return true;\n }\n\n if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n return false;\n }\n\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) {\n return false;\n } // Test for A's keys different from B.\n\n\n for (var i = 0; i < keysA.length; i++) {\n var currentKey = keysA[i];\n\n if (!hasOwnProperty.call(objB, currentKey) || // $FlowFixMe[incompatible-use] lost refinement of `objB`\n !objectIs(objA[currentKey], objB[currentKey])) {\n return false;\n }\n }\n\n return true;\n}\n\nvar ReactStrictModeWarnings = {\n recordUnsafeLifecycleWarnings: function (fiber, instance) {},\n flushPendingUnsafeLifecycleWarnings: function () {},\n recordLegacyContextWarning: function (fiber, instance) {},\n flushLegacyContextWarning: function () {},\n discardPendingWarnings: function () {}\n};\n\n{\n var findStrictRoot = function (fiber) {\n var maybeStrictRoot = null;\n var node = fiber;\n\n while (node !== null) {\n if (node.mode & StrictLegacyMode) {\n maybeStrictRoot = node;\n }\n\n node = node.return;\n }\n\n return maybeStrictRoot;\n };\n\n var setToSortedString = function (set) {\n var array = [];\n set.forEach(function (value) {\n array.push(value);\n });\n return array.sort().join(', ');\n };\n\n var pendingComponentWillMountWarnings = [];\n var pendingUNSAFE_ComponentWillMountWarnings = [];\n var pendingComponentWillReceivePropsWarnings = [];\n var pendingUNSAFE_ComponentWillReceivePropsWarnings = [];\n var pendingComponentWillUpdateWarnings = [];\n var pendingUNSAFE_ComponentWillUpdateWarnings = []; // Tracks components we have already warned about.\n\n var didWarnAboutUnsafeLifecycles = new Set();\n\n ReactStrictModeWarnings.recordUnsafeLifecycleWarnings = function (fiber, instance) {\n // Dedupe strategy: Warn once per component.\n if (didWarnAboutUnsafeLifecycles.has(fiber.type)) {\n return;\n }\n\n if (typeof instance.componentWillMount === 'function' && // Don't warn about react-lifecycles-compat polyfilled components.\n instance.componentWillMount.__suppressDeprecationWarning !== true) {\n pendingComponentWillMountWarnings.push(fiber);\n }\n\n if (fiber.mode & StrictLegacyMode && typeof instance.UNSAFE_componentWillMount === 'function') {\n pendingUNSAFE_ComponentWillMountWarnings.push(fiber);\n }\n\n if (typeof instance.componentWillReceiveProps === 'function' && instance.componentWillReceiveProps.__suppressDeprecationWarning !== true) {\n pendingComponentWillReceivePropsWarnings.push(fiber);\n }\n\n if (fiber.mode & StrictLegacyMode && typeof instance.UNSAFE_componentWillReceiveProps === 'function') {\n pendingUNSAFE_ComponentWillReceivePropsWarnings.push(fiber);\n }\n\n if (typeof instance.componentWillUpdate === 'function' && instance.componentWillUpdate.__suppressDeprecationWarning !== true) {\n pendingComponentWillUpdateWarnings.push(fiber);\n }\n\n if (fiber.mode & StrictLegacyMode && typeof instance.UNSAFE_componentWillUpdate === 'function') {\n pendingUNSAFE_ComponentWillUpdateWarnings.push(fiber);\n }\n };\n\n ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings = function () {\n // We do an initial pass to gather component names\n var componentWillMountUniqueNames = new Set();\n\n if (pendingComponentWillMountWarnings.length > 0) {\n pendingComponentWillMountWarnings.forEach(function (fiber) {\n componentWillMountUniqueNames.add(getComponentNameFromFiber(fiber) || 'Component');\n didWarnAboutUnsafeLifecycles.add(fiber.type);\n });\n pendingComponentWillMountWarnings = [];\n }\n\n var UNSAFE_componentWillMountUniqueNames = new Set();\n\n if (pendingUNSAFE_ComponentWillMountWarnings.length > 0) {\n pendingUNSAFE_ComponentWillMountWarnings.forEach(function (fiber) {\n UNSAFE_componentWillMountUniqueNames.add(getComponentNameFromFiber(fiber) || 'Component');\n didWarnAboutUnsafeLifecycles.add(fiber.type);\n });\n pendingUNSAFE_ComponentWillMountWarnings = [];\n }\n\n var componentWillReceivePropsUniqueNames = new Set();\n\n if (pendingComponentWillReceivePropsWarnings.length > 0) {\n pendingComponentWillReceivePropsWarnings.forEach(function (fiber) {\n componentWillReceivePropsUniqueNames.add(getComponentNameFromFiber(fiber) || 'Component');\n didWarnAboutUnsafeLifecycles.add(fiber.type);\n });\n pendingComponentWillReceivePropsWarnings = [];\n }\n\n var UNSAFE_componentWillReceivePropsUniqueNames = new Set();\n\n if (pendingUNSAFE_ComponentWillReceivePropsWarnings.length > 0) {\n pendingUNSAFE_ComponentWillReceivePropsWarnings.forEach(function (fiber) {\n UNSAFE_componentWillReceivePropsUniqueNames.add(getComponentNameFromFiber(fiber) || 'Component');\n didWarnAboutUnsafeLifecycles.add(fiber.type);\n });\n pendingUNSAFE_ComponentWillReceivePropsWarnings = [];\n }\n\n var componentWillUpdateUniqueNames = new Set();\n\n if (pendingComponentWillUpdateWarnings.length > 0) {\n pendingComponentWillUpdateWarnings.forEach(function (fiber) {\n componentWillUpdateUniqueNames.add(getComponentNameFromFiber(fiber) || 'Component');\n didWarnAboutUnsafeLifecycles.add(fiber.type);\n });\n pendingComponentWillUpdateWarnings = [];\n }\n\n var UNSAFE_componentWillUpdateUniqueNames = new Set();\n\n if (pendingUNSAFE_ComponentWillUpdateWarnings.length > 0) {\n pendingUNSAFE_ComponentWillUpdateWarnings.forEach(function (fiber) {\n UNSAFE_componentWillUpdateUniqueNames.add(getComponentNameFromFiber(fiber) || 'Component');\n didWarnAboutUnsafeLifecycles.add(fiber.type);\n });\n pendingUNSAFE_ComponentWillUpdateWarnings = [];\n } // Finally, we flush all the warnings\n // UNSAFE_ ones before the deprecated ones, since they'll be 'louder'\n\n\n if (UNSAFE_componentWillMountUniqueNames.size > 0) {\n var sortedNames = setToSortedString(UNSAFE_componentWillMountUniqueNames);\n\n error('Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. ' + 'See https://react.dev/link/unsafe-component-lifecycles for details.\\n\\n' + '* Move code with side effects to componentDidMount, and set initial state in the constructor.\\n' + '\\nPlease update the following components: %s', sortedNames);\n }\n\n if (UNSAFE_componentWillReceivePropsUniqueNames.size > 0) {\n var _sortedNames = setToSortedString(UNSAFE_componentWillReceivePropsUniqueNames);\n\n error('Using UNSAFE_componentWillReceiveProps in strict mode is not recommended ' + 'and may indicate bugs in your code. ' + 'See https://react.dev/link/unsafe-component-lifecycles for details.\\n\\n' + '* Move data fetching code or side effects to componentDidUpdate.\\n' + \"* If you're updating state whenever props change, \" + 'refactor your code to use memoization techniques or move it to ' + 'static getDerivedStateFromProps. Learn more at: https://react.dev/link/derived-state\\n' + '\\nPlease update the following components: %s', _sortedNames);\n }\n\n if (UNSAFE_componentWillUpdateUniqueNames.size > 0) {\n var _sortedNames2 = setToSortedString(UNSAFE_componentWillUpdateUniqueNames);\n\n error('Using UNSAFE_componentWillUpdate in strict mode is not recommended ' + 'and may indicate bugs in your code. ' + 'See https://react.dev/link/unsafe-component-lifecycles for details.\\n\\n' + '* Move data fetching code or side effects to componentDidUpdate.\\n' + '\\nPlease update the following components: %s', _sortedNames2);\n }\n\n if (componentWillMountUniqueNames.size > 0) {\n var _sortedNames3 = setToSortedString(componentWillMountUniqueNames);\n\n warn('componentWillMount has been renamed, and is not recommended for use. ' + 'See https://react.dev/link/unsafe-component-lifecycles for details.\\n\\n' + '* Move code with side effects to componentDidMount, and set initial state in the constructor.\\n' + '* Rename componentWillMount to UNSAFE_componentWillMount to suppress ' + 'this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. ' + 'To rename all deprecated lifecycles to their new names, you can run ' + '`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\\n' + '\\nPlease update the following components: %s', _sortedNames3);\n }\n\n if (componentWillReceivePropsUniqueNames.size > 0) {\n var _sortedNames4 = setToSortedString(componentWillReceivePropsUniqueNames);\n\n warn('componentWillReceiveProps has been renamed, and is not recommended for use. ' + 'See https://react.dev/link/unsafe-component-lifecycles for details.\\n\\n' + '* Move data fetching code or side effects to componentDidUpdate.\\n' + \"* If you're updating state whenever props change, refactor your \" + 'code to use memoization techniques or move it to ' + 'static getDerivedStateFromProps. Learn more at: https://react.dev/link/derived-state\\n' + '* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress ' + 'this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. ' + 'To rename all deprecated lifecycles to their new names, you can run ' + '`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\\n' + '\\nPlease update the following components: %s', _sortedNames4);\n }\n\n if (componentWillUpdateUniqueNames.size > 0) {\n var _sortedNames5 = setToSortedString(componentWillUpdateUniqueNames);\n\n warn('componentWillUpdate has been renamed, and is not recommended for use. ' + 'See https://react.dev/link/unsafe-component-lifecycles for details.\\n\\n' + '* Move data fetching code or side effects to componentDidUpdate.\\n' + '* Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress ' + 'this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. ' + 'To rename all deprecated lifecycles to their new names, you can run ' + '`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\\n' + '\\nPlease update the following components: %s', _sortedNames5);\n }\n };\n\n var pendingLegacyContextWarning = new Map(); // Tracks components we have already warned about.\n\n var didWarnAboutLegacyContext = new Set();\n\n ReactStrictModeWarnings.recordLegacyContextWarning = function (fiber, instance) {\n var strictRoot = findStrictRoot(fiber);\n\n if (strictRoot === null) {\n error('Expected to find a StrictMode component in a strict mode tree. ' + 'This error is likely caused by a bug in React. Please file an issue.');\n\n return;\n } // Dedup strategy: Warn once per component.\n\n\n if (didWarnAboutLegacyContext.has(fiber.type)) {\n return;\n }\n\n var warningsForRoot = pendingLegacyContextWarning.get(strictRoot);\n\n if (fiber.type.contextTypes != null || fiber.type.childContextTypes != null || instance !== null && typeof instance.getChildContext === 'function') {\n if (warningsForRoot === undefined) {\n warningsForRoot = [];\n pendingLegacyContextWarning.set(strictRoot, warningsForRoot);\n }\n\n warningsForRoot.push(fiber);\n }\n };\n\n ReactStrictModeWarnings.flushLegacyContextWarning = function () {\n pendingLegacyContextWarning.forEach(function (fiberArray, strictRoot) {\n if (fiberArray.length === 0) {\n return;\n }\n\n var firstFiber = fiberArray[0];\n var uniqueNames = new Set();\n fiberArray.forEach(function (fiber) {\n uniqueNames.add(getComponentNameFromFiber(fiber) || 'Component');\n didWarnAboutLegacyContext.add(fiber.type);\n });\n var sortedNames = setToSortedString(uniqueNames);\n\n try {\n setCurrentFiber(firstFiber);\n\n error('Legacy context API has been detected within a strict-mode tree.' + '\\n\\nThe old API will be supported in all 16.x releases, but applications ' + 'using it should migrate to the new version.' + '\\n\\nPlease update the following components: %s' + '\\n\\nLearn more about this warning here: https://react.dev/link/legacy-context', sortedNames);\n } finally {\n resetCurrentFiber();\n }\n });\n };\n\n ReactStrictModeWarnings.discardPendingWarnings = function () {\n pendingComponentWillMountWarnings = [];\n pendingUNSAFE_ComponentWillMountWarnings = [];\n pendingComponentWillReceivePropsWarnings = [];\n pendingUNSAFE_ComponentWillReceivePropsWarnings = [];\n pendingComponentWillUpdateWarnings = [];\n pendingUNSAFE_ComponentWillUpdateWarnings = [];\n pendingLegacyContextWarning = new Map();\n };\n}\n\nvar ReactCurrentActQueue$2 = ReactSharedInternals.ReactCurrentActQueue;\n\nfunction getThenablesFromState(state) {\n {\n var devState = state;\n return devState.thenables;\n }\n} // An error that is thrown (e.g. by `use`) to trigger Suspense. If we\n// detect this is caught by userspace, we'll log a warning in development.\n\n\nvar SuspenseException = new Error(\"Suspense Exception: This is not a real error! It's an implementation \" + 'detail of `use` to interrupt the current render. You must either ' + 'rethrow it immediately, or move the `use` call outside of the ' + '`try/catch` block. Capturing without rethrowing will lead to ' + 'unexpected behavior.\\n\\n' + 'To handle async errors, wrap your component in an error boundary, or ' + \"call the promise's `.catch` method and pass the result to `use`\");\nvar SuspenseyCommitException = new Error('Suspense Exception: This is not a real error, and should not leak into ' + \"userspace. If you're seeing this, it's likely a bug in React.\"); // This is a noop thenable that we use to trigger a fallback in throwException.\n// TODO: It would be better to refactor throwException into multiple functions\n// so we can trigger a fallback directly without having to check the type. But\n// for now this will do.\n\nvar noopSuspenseyCommitThenable = {\n then: function () {\n {\n error('Internal React error: A listener was unexpectedly attached to a ' + '\"noop\" thenable. This is a bug in React. Please file an issue.');\n }\n }\n};\nfunction createThenableState() {\n // The ThenableState is created the first time a component suspends. If it\n // suspends again, we'll reuse the same state.\n {\n return {\n didWarnAboutUncachedPromise: false,\n thenables: []\n };\n }\n}\nfunction isThenableResolved(thenable) {\n var status = thenable.status;\n return status === 'fulfilled' || status === 'rejected';\n}\n\nfunction noop$2() {}\n\nfunction trackUsedThenable(thenableState, thenable, index) {\n if (ReactCurrentActQueue$2.current !== null) {\n ReactCurrentActQueue$2.didUsePromise = true;\n }\n\n var trackedThenables = getThenablesFromState(thenableState);\n var previous = trackedThenables[index];\n\n if (previous === undefined) {\n trackedThenables.push(thenable);\n } else {\n if (previous !== thenable) {\n // Reuse the previous thenable, and drop the new one. We can assume\n // they represent the same value, because components are idempotent.\n {\n var thenableStateDev = thenableState;\n\n if (!thenableStateDev.didWarnAboutUncachedPromise) {\n // We should only warn the first time an uncached thenable is\n // discovered per component, because if there are multiple, the\n // subsequent ones are likely derived from the first.\n //\n // We track this on the thenableState instead of deduping using the\n // component name like we usually do, because in the case of a\n // promise-as-React-node, the owner component is likely different from\n // the parent that's currently being reconciled. We'd have to track\n // the owner using state, which we're trying to move away from. Though\n // since this is dev-only, maybe that'd be OK.\n //\n // However, another benefit of doing it this way is we might\n // eventually have a thenableState per memo/Forget boundary instead\n // of per component, so this would allow us to have more\n // granular warnings.\n thenableStateDev.didWarnAboutUncachedPromise = true; // TODO: This warning should link to a corresponding docs page.\n\n error('A component was suspended by an uncached promise. Creating ' + 'promises inside a Client Component or hook is not yet ' + 'supported, except via a Suspense-compatible library or framework.');\n }\n } // Avoid an unhandled rejection errors for the Promises that we'll\n // intentionally ignore.\n\n\n thenable.then(noop$2, noop$2);\n thenable = previous;\n }\n } // We use an expando to track the status and result of a thenable so that we\n // can synchronously unwrap the value. Think of this as an extension of the\n // Promise API, or a custom interface that is a superset of Thenable.\n //\n // If the thenable doesn't have a status, set it to \"pending\" and attach\n // a listener that will update its status and result when it resolves.\n\n\n switch (thenable.status) {\n case 'fulfilled':\n {\n var fulfilledValue = thenable.value;\n return fulfilledValue;\n }\n\n case 'rejected':\n {\n var rejectedError = thenable.reason;\n checkIfUseWrappedInAsyncCatch(rejectedError);\n throw rejectedError;\n }\n\n default:\n {\n if (typeof thenable.status === 'string') {\n // Only instrument the thenable if the status if not defined. If\n // it's defined, but an unknown value, assume it's been instrumented by\n // some custom userspace implementation. We treat it as \"pending\".\n // Attach a dummy listener, to ensure that any lazy initialization can\n // happen. Flight lazily parses JSON when the value is actually awaited.\n thenable.then(noop$2, noop$2);\n } else {\n // This is an uncached thenable that we haven't seen before.\n // Detect infinite ping loops caused by uncached promises.\n var root = getWorkInProgressRoot();\n\n if (root !== null && root.shellSuspendCounter > 100) {\n // This root has suspended repeatedly in the shell without making any\n // progress (i.e. committing something). This is highly suggestive of\n // an infinite ping loop, often caused by an accidental Async Client\n // Component.\n //\n // During a transition, we can suspend the work loop until the promise\n // to resolve, but this is a sync render, so that's not an option. We\n // also can't show a fallback, because none was provided. So our last\n // resort is to throw an error.\n //\n // TODO: Remove this error in a future release. Other ways of handling\n // this case include forcing a concurrent render, or putting the whole\n // root into offscreen mode.\n throw new Error('async/await is not yet supported in Client Components, only ' + 'Server Components. This error is often caused by accidentally ' + \"adding `'use client'` to a module that was originally written \" + 'for the server.');\n }\n\n var pendingThenable = thenable;\n pendingThenable.status = 'pending';\n pendingThenable.then(function (fulfilledValue) {\n if (thenable.status === 'pending') {\n var fulfilledThenable = thenable;\n fulfilledThenable.status = 'fulfilled';\n fulfilledThenable.value = fulfilledValue;\n }\n }, function (error) {\n if (thenable.status === 'pending') {\n var rejectedThenable = thenable;\n rejectedThenable.status = 'rejected';\n rejectedThenable.reason = error;\n }\n });\n } // Check one more time in case the thenable resolved synchronously.\n\n\n switch (thenable.status) {\n case 'fulfilled':\n {\n var fulfilledThenable = thenable;\n return fulfilledThenable.value;\n }\n\n case 'rejected':\n {\n var rejectedThenable = thenable;\n var _rejectedError = rejectedThenable.reason;\n checkIfUseWrappedInAsyncCatch(_rejectedError);\n throw _rejectedError;\n }\n } // Suspend.\n //\n // Throwing here is an implementation detail that allows us to unwind the\n // call stack. But we shouldn't allow it to leak into userspace. Throw an\n // opaque placeholder value instead of the actual thenable. If it doesn't\n // get captured by the work loop, log a warning, because that means\n // something in userspace must have caught it.\n\n\n suspendedThenable = thenable;\n\n {\n needsToResetSuspendedThenableDEV = true;\n }\n\n throw SuspenseException;\n }\n }\n}\nfunction suspendCommit() {\n // This extra indirection only exists so it can handle passing\n // noopSuspenseyCommitThenable through to throwException.\n // TODO: Factor the thenable check out of throwException\n suspendedThenable = noopSuspenseyCommitThenable;\n throw SuspenseyCommitException;\n} // This is used to track the actual thenable that suspended so it can be\n// passed to the rest of the Suspense implementation — which, for historical\n// reasons, expects to receive a thenable.\n\nvar suspendedThenable = null;\nvar needsToResetSuspendedThenableDEV = false;\nfunction getSuspendedThenable() {\n // This is called right after `use` suspends by throwing an exception. `use`\n // throws an opaque value instead of the thenable itself so that it can't be\n // caught in userspace. Then the work loop accesses the actual thenable using\n // this function.\n if (suspendedThenable === null) {\n throw new Error('Expected a suspended thenable. This is a bug in React. Please file ' + 'an issue.');\n }\n\n var thenable = suspendedThenable;\n suspendedThenable = null;\n\n {\n needsToResetSuspendedThenableDEV = false;\n }\n\n return thenable;\n}\nfunction checkIfUseWrappedInTryCatch() {\n {\n // This was set right before SuspenseException was thrown, and it should\n // have been cleared when the exception was handled. If it wasn't,\n // it must have been caught by userspace.\n if (needsToResetSuspendedThenableDEV) {\n needsToResetSuspendedThenableDEV = false;\n return true;\n }\n }\n\n return false;\n}\nfunction checkIfUseWrappedInAsyncCatch(rejectedReason) {\n // This check runs in prod, too, because it prevents a more confusing\n // downstream error, where SuspenseException is caught by a promise and\n // thrown asynchronously.\n // TODO: Another way to prevent SuspenseException from leaking into an async\n // execution context is to check the dispatcher every time `use` is called,\n // or some equivalent. That might be preferable for other reasons, too, since\n // it matches how we prevent similar mistakes for other hooks.\n if (rejectedReason === SuspenseException) {\n throw new Error('Hooks are not supported inside an async component. This ' + \"error is often caused by accidentally adding `'use client'` \" + 'to a module that was originally written for the server.');\n }\n}\n\nvar thenableState$1 = null;\nvar thenableIndexCounter$1 = 0;\n\nfunction mergeDebugInfo(outer, inner) {\n\n if (inner == null) {\n return outer;\n } else if (outer === null) {\n return inner;\n } else {\n // If we have two debugInfo, we need to create a new one. This makes the array no longer\n // live so we'll miss any future updates if we received more so ideally we should always\n // do this after both have fully resolved/unsuspended.\n return outer.concat(inner);\n }\n}\n\nvar didWarnAboutMaps;\nvar didWarnAboutGenerators;\nvar didWarnAboutStringRefs;\nvar ownerHasKeyUseWarning;\nvar ownerHasFunctionTypeWarning;\nvar ownerHasSymbolTypeWarning;\n\nvar warnForMissingKey = function (child, returnFiber) {};\n\n{\n didWarnAboutMaps = false;\n didWarnAboutGenerators = false;\n didWarnAboutStringRefs = {};\n /**\n * Warn if there's no key explicitly set on dynamic arrays of children or\n * object keys are not valid. This allows us to keep track of children between\n * updates.\n */\n\n ownerHasKeyUseWarning = {};\n ownerHasFunctionTypeWarning = {};\n ownerHasSymbolTypeWarning = {};\n\n warnForMissingKey = function (child, returnFiber) {\n if (child === null || typeof child !== 'object') {\n return;\n }\n\n if (!child._store || child._store.validated || child.key != null) {\n return;\n }\n\n if (typeof child._store !== 'object') {\n throw new Error('React Component in warnForMissingKey should have a _store. ' + 'This error is likely caused by a bug in React. Please file an issue.');\n } // $FlowFixMe[cannot-write] unable to narrow type from mixed to writable object\n\n\n child._store.validated = true;\n var componentName = getComponentNameFromFiber(returnFiber) || 'Component';\n\n if (ownerHasKeyUseWarning[componentName]) {\n return;\n }\n\n ownerHasKeyUseWarning[componentName] = true;\n\n error('Each child in a list should have a unique ' + '\"key\" prop. See https://react.dev/link/warning-keys for ' + 'more information.');\n };\n}\n\nfunction isReactClass(type) {\n return type.prototype && type.prototype.isReactComponent;\n}\n\nfunction unwrapThenable(thenable) {\n var index = thenableIndexCounter$1;\n thenableIndexCounter$1 += 1;\n\n if (thenableState$1 === null) {\n thenableState$1 = createThenableState();\n }\n\n return trackUsedThenable(thenableState$1, thenable, index);\n}\n\nfunction convertStringRefToCallbackRef(returnFiber, current, element, mixedRef) {\n {\n checkPropStringCoercion(mixedRef, 'ref');\n }\n\n var stringRef = '' + mixedRef;\n var owner = element._owner;\n\n if (!owner) {\n throw new Error(\"Element ref was specified as a string (\" + stringRef + \") but no owner was set. This could happen for one of\" + ' the following reasons:\\n' + '1. You may be adding a ref to a function component\\n' + \"2. You may be adding a ref to a component that was not created inside a component's render method\\n\" + '3. You have multiple copies of React loaded\\n' + 'See https://react.dev/link/refs-must-have-owner for more information.');\n }\n\n if (owner.tag !== ClassComponent) {\n throw new Error('Function components cannot have string refs. ' + 'We recommend using useRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://react.dev/link/strict-mode-string-ref');\n }\n\n {\n if ( // Will already warn with \"Function components cannot be given refs\"\n !(typeof element.type === 'function' && !isReactClass(element.type))) {\n var componentName = getComponentNameFromFiber(returnFiber) || 'Component';\n\n if (!didWarnAboutStringRefs[componentName]) {\n error('Component \"%s\" contains the string ref \"%s\". Support for string refs ' + 'will be removed in a future major release. We recommend using ' + 'useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://react.dev/link/strict-mode-string-ref', componentName, stringRef);\n\n didWarnAboutStringRefs[componentName] = true;\n }\n }\n }\n\n var inst = owner.stateNode;\n\n if (!inst) {\n throw new Error(\"Missing owner for string ref \" + stringRef + \". This error is likely caused by a \" + 'bug in React. Please file an issue.');\n } // Check if previous string ref matches new string ref\n\n\n if (current !== null && current.ref !== null && typeof current.ref === 'function' && current.ref._stringRef === stringRef) {\n // Reuse the existing string ref\n var currentRef = current.ref;\n return currentRef;\n } // Create a new string ref\n\n\n var ref = function (value) {\n var refs = inst.refs;\n\n if (value === null) {\n delete refs[stringRef];\n } else {\n refs[stringRef] = value;\n }\n };\n\n ref._stringRef = stringRef;\n return ref;\n}\n\nfunction coerceRef(returnFiber, current, workInProgress, element) {\n var mixedRef;\n\n {\n // Old behavior.\n mixedRef = element.ref;\n }\n\n var coercedRef;\n\n if ((typeof mixedRef === 'string' || typeof mixedRef === 'number' || typeof mixedRef === 'boolean')) {\n coercedRef = convertStringRefToCallbackRef(returnFiber, current, element, mixedRef);\n } else {\n coercedRef = mixedRef;\n } // TODO: If enableRefAsProp is on, we shouldn't use the `ref` field. We\n // should always read the ref from the prop.\n\n\n workInProgress.ref = coercedRef;\n}\n\nfunction throwOnInvalidObjectType(returnFiber, newChild) {\n // $FlowFixMe[method-unbinding]\n var childString = Object.prototype.toString.call(newChild);\n throw new Error(\"Objects are not valid as a React child (found: \" + (childString === '[object Object]' ? 'object with keys {' + Object.keys(newChild).join(', ') + '}' : childString) + \"). \" + 'If you meant to render a collection of children, use an array ' + 'instead.');\n}\n\nfunction warnOnFunctionType(returnFiber, invalidChild) {\n {\n var parentName = getComponentNameFromFiber(returnFiber) || 'Component';\n\n if (ownerHasFunctionTypeWarning[parentName]) {\n return;\n }\n\n ownerHasFunctionTypeWarning[parentName] = true;\n var name = invalidChild.displayName || invalidChild.name || 'Component';\n\n if (returnFiber.tag === HostRoot) {\n error('Functions are not valid as a React child. This may happen if ' + 'you return %s instead of <%s /> from render. ' + 'Or maybe you meant to call this function rather than return it.\\n' + ' root.render(%s)', name, name, name);\n } else {\n error('Functions are not valid as a React child. This may happen if ' + 'you return %s instead of <%s /> from render. ' + 'Or maybe you meant to call this function rather than return it.\\n' + ' <%s>{%s}</%s>', name, name, parentName, name, parentName);\n }\n }\n}\n\nfunction warnOnSymbolType(returnFiber, invalidChild) {\n {\n var parentName = getComponentNameFromFiber(returnFiber) || 'Component';\n\n if (ownerHasSymbolTypeWarning[parentName]) {\n return;\n }\n\n ownerHasSymbolTypeWarning[parentName] = true; // eslint-disable-next-line react-internal/safe-string-coercion\n\n var name = String(invalidChild);\n\n if (returnFiber.tag === HostRoot) {\n error('Symbols are not valid as a React child.\\n' + ' root.render(%s)', name);\n } else {\n error('Symbols are not valid as a React child.\\n' + ' <%s>%s</%s>', parentName, name, parentName);\n }\n }\n}\n\nfunction resolveLazy(lazyType) {\n var payload = lazyType._payload;\n var init = lazyType._init;\n return init(payload);\n} // This wrapper function exists because I expect to clone the code in each path\n// to be able to optimize each path individually by branching early. This needs\n// a compiler or we can do it manually. Helpers that don't need this branching\n// live outside of this function.\n\n\nfunction createChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n }\n\n var deletions = returnFiber.deletions;\n\n if (deletions === null) {\n returnFiber.deletions = [childToDelete];\n returnFiber.flags |= ChildDeletion;\n } else {\n deletions.push(childToDelete);\n }\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // During hydration, the useId algorithm needs to know which fibers are\n // part of a list of children (arrays, iterators).\n newFiber.flags |= Forked;\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.flags |= Placement | PlacementDEV;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.flags |= Placement | PlacementDEV;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.flags |= Placement | PlacementDEV;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, lanes, debugInfo) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n\n {\n created._debugInfo = debugInfo;\n }\n\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n\n {\n existing._debugInfo = debugInfo;\n }\n\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, lanes, debugInfo) {\n var elementType = element.type;\n\n if (elementType === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, current, element.props.children, lanes, element.key, debugInfo);\n }\n\n if (current !== null) {\n if (current.elementType === elementType || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element) ) || // Lazy types should reconcile their resolved type.\n // We need to do this after the Hot Reloading check above,\n // because hot reloading has different semantics than prod because\n // it doesn't resuspend. So we can't let the call below suspend.\n typeof elementType === 'object' && elementType !== null && elementType.$$typeof === REACT_LAZY_TYPE && resolveLazy(elementType) === current.type) {\n // Move based on index\n var existing = useFiber(current, element.props);\n coerceRef(returnFiber, current, existing, element);\n existing.return = returnFiber;\n\n {\n existing._debugOwner = element._owner;\n existing._debugInfo = debugInfo;\n }\n\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, lanes);\n coerceRef(returnFiber, current, created, element);\n created.return = returnFiber;\n\n {\n created._debugInfo = debugInfo;\n }\n\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, lanes, debugInfo) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n\n {\n created._debugInfo = debugInfo;\n }\n\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n\n {\n existing._debugInfo = debugInfo;\n }\n\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, lanes, key, debugInfo) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, lanes, key);\n created.return = returnFiber;\n\n {\n created._debugInfo = debugInfo;\n }\n\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n\n {\n existing._debugInfo = debugInfo;\n }\n\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, lanes, debugInfo) {\n if (typeof newChild === 'string' && newChild !== '' || typeof newChild === 'number' || enableBigIntSupport ) {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText( // $FlowFixMe[unsafe-addition] Flow doesn't want us to use `+` operator with string and bigint\n '' + newChild, returnFiber.mode, lanes);\n created.return = returnFiber;\n\n {\n created._debugInfo = debugInfo;\n }\n\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, lanes);\n\n coerceRef(returnFiber, null, _created, newChild);\n _created.return = returnFiber;\n\n {\n _created._debugInfo = mergeDebugInfo(debugInfo, newChild._debugInfo);\n }\n\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, lanes);\n\n _created2.return = returnFiber;\n\n {\n _created2._debugInfo = debugInfo;\n }\n\n return _created2;\n }\n\n case REACT_LAZY_TYPE:\n {\n var payload = newChild._payload;\n var init = newChild._init;\n return createChild(returnFiber, init(payload), lanes, mergeDebugInfo(debugInfo, newChild._debugInfo) // call merge after init\n );\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, lanes, null);\n\n _created3.return = returnFiber;\n\n {\n _created3._debugInfo = mergeDebugInfo(debugInfo, newChild._debugInfo);\n }\n\n return _created3;\n } // Usable node types\n //\n // Unwrap the inner value and recursively call this function again.\n\n\n if (typeof newChild.then === 'function') {\n var thenable = newChild;\n return createChild(returnFiber, unwrapThenable(thenable), lanes, mergeDebugInfo(debugInfo, newChild._debugInfo));\n }\n\n if (newChild.$$typeof === REACT_CONTEXT_TYPE) {\n var context = newChild;\n return createChild(returnFiber, readContextDuringReconciliation(returnFiber, context, lanes), lanes, debugInfo);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber, newChild);\n }\n\n if (typeof newChild === 'symbol') {\n warnOnSymbolType(returnFiber, newChild);\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, lanes, debugInfo) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' && newChild !== '' || typeof newChild === 'number' || enableBigIntSupport ) {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, // $FlowFixMe[unsafe-addition] Flow doesn't want us to use `+` operator with string and bigint\n '' + newChild, lanes, debugInfo);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n return updateElement(returnFiber, oldFiber, newChild, lanes, mergeDebugInfo(debugInfo, newChild._debugInfo));\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, lanes, debugInfo);\n } else {\n return null;\n }\n }\n\n case REACT_LAZY_TYPE:\n {\n var payload = newChild._payload;\n var init = newChild._init;\n return updateSlot(returnFiber, oldFiber, init(payload), lanes, mergeDebugInfo(debugInfo, newChild._debugInfo));\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, lanes, null, mergeDebugInfo(debugInfo, newChild._debugInfo));\n } // Usable node types\n //\n // Unwrap the inner value and recursively call this function again.\n\n\n if (typeof newChild.then === 'function') {\n var thenable = newChild;\n return updateSlot(returnFiber, oldFiber, unwrapThenable(thenable), lanes, debugInfo);\n }\n\n if (newChild.$$typeof === REACT_CONTEXT_TYPE) {\n var context = newChild;\n return updateSlot(returnFiber, oldFiber, readContextDuringReconciliation(returnFiber, context, lanes), lanes, debugInfo);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber, newChild);\n }\n\n if (typeof newChild === 'symbol') {\n warnOnSymbolType(returnFiber, newChild);\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, lanes, debugInfo) {\n if (typeof newChild === 'string' && newChild !== '' || typeof newChild === 'number' || enableBigIntSupport ) {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, // $FlowFixMe[unsafe-addition] Flow doesn't want us to use `+` operator with string and bigint\n '' + newChild, lanes, debugInfo);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updateElement(returnFiber, _matchedFiber, newChild, lanes, mergeDebugInfo(debugInfo, newChild._debugInfo));\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, lanes, debugInfo);\n }\n\n case REACT_LAZY_TYPE:\n var payload = newChild._payload;\n var init = newChild._init;\n return updateFromMap(existingChildren, returnFiber, newIdx, init(payload), lanes, mergeDebugInfo(debugInfo, newChild._debugInfo));\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, lanes, null, mergeDebugInfo(debugInfo, newChild._debugInfo));\n } // Usable node types\n //\n // Unwrap the inner value and recursively call this function again.\n\n\n if (typeof newChild.then === 'function') {\n var thenable = newChild;\n return updateFromMap(existingChildren, returnFiber, newIdx, unwrapThenable(thenable), lanes, debugInfo);\n }\n\n if (newChild.$$typeof === REACT_CONTEXT_TYPE) {\n var context = newChild;\n return updateFromMap(existingChildren, returnFiber, newIdx, readContextDuringReconciliation(returnFiber, context, lanes), lanes, debugInfo);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber, newChild);\n }\n\n if (typeof newChild === 'symbol') {\n warnOnSymbolType(returnFiber, newChild);\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys, returnFiber) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child, returnFiber);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n\n break;\n\n case REACT_LAZY_TYPE:\n var payload = child._payload;\n var init = child._init;\n warnOnInvalidKey(init(payload), knownKeys, returnFiber);\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, lanes, debugInfo) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], lanes, debugInfo);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n\n if (getIsHydrating()) {\n var numberOfForks = newIdx;\n pushTreeFork(returnFiber, numberOfForks);\n }\n\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], lanes, debugInfo);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n if (getIsHydrating()) {\n var _numberOfForks = newIdx;\n pushTreeFork(returnFiber, _numberOfForks);\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], lanes, debugInfo);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n if (getIsHydrating()) {\n var _numberOfForks2 = newIdx;\n pushTreeFork(returnFiber, _numberOfForks2);\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, lanes, debugInfo) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (typeof iteratorFn !== 'function') {\n throw new Error('An object is not an iterable. This error is likely caused by a bug in ' + 'React. Please file an issue.');\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe[prop-missing] Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (newChildren == null) {\n throw new Error('An iterable object provided no iterator.');\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, lanes, debugInfo);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n\n if (getIsHydrating()) {\n var numberOfForks = newIdx;\n pushTreeFork(returnFiber, numberOfForks);\n }\n\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, lanes, debugInfo);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n if (getIsHydrating()) {\n var _numberOfForks3 = newIdx;\n pushTreeFork(returnFiber, _numberOfForks3);\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, lanes, debugInfo);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n if (getIsHydrating()) {\n var _numberOfForks4 = newIdx;\n pushTreeFork(returnFiber, _numberOfForks4);\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, lanes) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, lanes, debugInfo) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n var elementType = element.type;\n\n if (elementType === REACT_FRAGMENT_TYPE) {\n if (child.tag === Fragment) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n\n {\n existing._debugOwner = element._owner;\n existing._debugInfo = debugInfo;\n }\n\n return existing;\n }\n } else {\n if (child.elementType === elementType || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element) ) || // Lazy types should reconcile their resolved type.\n // We need to do this after the Hot Reloading check above,\n // because hot reloading has different semantics than prod because\n // it doesn't resuspend. So we can't let the call below suspend.\n typeof elementType === 'object' && elementType !== null && elementType.$$typeof === REACT_LAZY_TYPE && resolveLazy(elementType) === child.type) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing = useFiber(child, element.props);\n\n coerceRef(returnFiber, child, _existing, element);\n _existing.return = returnFiber;\n\n {\n _existing._debugOwner = element._owner;\n _existing._debugInfo = debugInfo;\n }\n\n return _existing;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, lanes, element.key);\n created.return = returnFiber;\n\n {\n created._debugInfo = debugInfo;\n }\n\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, lanes);\n\n coerceRef(returnFiber, currentFirstChild, _created4, element);\n _created4.return = returnFiber;\n\n {\n _created4._debugInfo = debugInfo;\n }\n\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, lanes, debugInfo) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibersImpl(returnFiber, currentFirstChild, newChild, lanes, debugInfo) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n // TODO: Let's use recursion like we do for Usable nodes?\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, lanes, mergeDebugInfo(debugInfo, newChild._debugInfo)));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, lanes));\n\n case REACT_LAZY_TYPE:\n var payload = newChild._payload;\n var init = newChild._init;\n return reconcileChildFibersImpl(returnFiber, currentFirstChild, init(payload), lanes, mergeDebugInfo(debugInfo, newChild._debugInfo));\n }\n\n if (isArray(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, lanes, mergeDebugInfo(debugInfo, newChild._debugInfo));\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, lanes, mergeDebugInfo(debugInfo, newChild._debugInfo));\n } // Usables are a valid React node type. When React encounters a Usable in\n // a child position, it unwraps it using the same algorithm as `use`. For\n // example, for promises, React will throw an exception to unwind the\n // stack, then replay the component once the promise resolves.\n //\n // A difference from `use` is that React will keep unwrapping the value\n // until it reaches a non-Usable type.\n //\n // e.g. Usable<Usable<Usable<T>>> should resolve to T\n //\n // The structure is a bit unfortunate. Ideally, we shouldn't need to\n // replay the entire begin phase of the parent fiber in order to reconcile\n // the children again. This would require a somewhat significant refactor,\n // because reconcilation happens deep within the begin phase, and\n // depending on the type of work, not always at the end. We should\n // consider as an future improvement.\n\n\n if (typeof newChild.then === 'function') {\n var thenable = newChild;\n return reconcileChildFibersImpl(returnFiber, currentFirstChild, unwrapThenable(thenable), lanes, mergeDebugInfo(debugInfo, thenable._debugInfo));\n }\n\n if (newChild.$$typeof === REACT_CONTEXT_TYPE) {\n var context = newChild;\n return reconcileChildFibersImpl(returnFiber, currentFirstChild, readContextDuringReconciliation(returnFiber, context, lanes), lanes, debugInfo);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n if (typeof newChild === 'string' && newChild !== '' || typeof newChild === 'number' || enableBigIntSupport ) {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, // $FlowFixMe[unsafe-addition] Flow doesn't want us to use `+` operator with string and bigint\n '' + newChild, lanes));\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber, newChild);\n }\n\n if (typeof newChild === 'symbol') {\n warnOnSymbolType(returnFiber, newChild);\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, lanes) {\n // This indirection only exists so we can reset `thenableState` at the end.\n // It should get inlined by Closure.\n thenableIndexCounter$1 = 0;\n var firstChildFiber = reconcileChildFibersImpl(returnFiber, currentFirstChild, newChild, lanes, null // debugInfo\n );\n thenableState$1 = null; // Don't bother to reset `thenableIndexCounter` to 0 because it always gets\n // set at the beginning.\n\n return firstChildFiber;\n }\n\n return reconcileChildFibers;\n}\n\nvar reconcileChildFibers = createChildReconciler(true);\nvar mountChildFibers = createChildReconciler(false);\nfunction resetChildReconcilerOnUnwind() {\n // On unwind, clear any pending thenables that were used.\n thenableState$1 = null;\n thenableIndexCounter$1 = 0;\n}\nfunction cloneChildFibers(current, workInProgress) {\n if (current !== null && workInProgress.child !== current.child) {\n throw new Error('Resuming work not yet implemented.');\n }\n\n if (workInProgress.child === null) {\n return;\n }\n\n var currentChild = workInProgress.child;\n var newChild = createWorkInProgress(currentChild, currentChild.pendingProps);\n workInProgress.child = newChild;\n newChild.return = workInProgress;\n\n while (currentChild.sibling !== null) {\n currentChild = currentChild.sibling;\n newChild = newChild.sibling = createWorkInProgress(currentChild, currentChild.pendingProps);\n newChild.return = workInProgress;\n }\n\n newChild.sibling = null;\n} // Reset a workInProgress child set to prepare it for a second pass.\n\nfunction resetChildFibers(workInProgress, lanes) {\n var child = workInProgress.child;\n\n while (child !== null) {\n resetWorkInProgress(child, lanes);\n child = child.sibling;\n }\n}\n\n// TODO: This isn't being used yet, but it's intended to replace the\n// InvisibleParentContext that is currently managed by SuspenseContext.\n\nvar currentTreeHiddenStackCursor = createCursor(null);\nvar prevEntangledRenderLanesCursor = createCursor(NoLanes);\nfunction pushHiddenContext(fiber, context) {\n var prevEntangledRenderLanes = getEntangledRenderLanes();\n push(prevEntangledRenderLanesCursor, prevEntangledRenderLanes, fiber);\n push(currentTreeHiddenStackCursor, context, fiber); // When rendering a subtree that's currently hidden, we must include all\n // lanes that would have rendered if the hidden subtree hadn't been deferred.\n // That is, in order to reveal content from hidden -> visible, we must commit\n // all the updates that we skipped when we originally hid the tree.\n\n setEntangledRenderLanes(mergeLanes(prevEntangledRenderLanes, context.baseLanes));\n}\nfunction reuseHiddenContextOnStack(fiber) {\n // This subtree is not currently hidden, so we don't need to add any lanes\n // to the render lanes. But we still need to push something to avoid a\n // context mismatch. Reuse the existing context on the stack.\n push(prevEntangledRenderLanesCursor, getEntangledRenderLanes(), fiber);\n push(currentTreeHiddenStackCursor, currentTreeHiddenStackCursor.current, fiber);\n}\nfunction popHiddenContext(fiber) {\n // Restore the previous render lanes from the stack\n setEntangledRenderLanes(prevEntangledRenderLanesCursor.current);\n pop(currentTreeHiddenStackCursor, fiber);\n pop(prevEntangledRenderLanesCursor, fiber);\n}\nfunction isCurrentTreeHidden() {\n return currentTreeHiddenStackCursor.current !== null;\n}\n\n// suspends, i.e. it's the nearest `catch` block on the stack.\n\nvar suspenseHandlerStackCursor = createCursor(null); // Represents the outermost boundary that is not visible in the current tree.\n// Everything above this is the \"shell\". When this is null, it means we're\n// rendering in the shell of the app. If it's non-null, it means we're rendering\n// deeper than the shell, inside a new tree that wasn't already visible.\n//\n// The main way we use this concept is to determine whether showing a fallback\n// would result in a desirable or undesirable loading state. Activing a fallback\n// in the shell is considered an undersirable loading state, because it would\n// mean hiding visible (albeit stale) content in the current tree — we prefer to\n// show the stale content, rather than switch to a fallback. But showing a\n// fallback in a new tree is fine, because there's no stale content to\n// prefer instead.\n\nvar shellBoundary = null;\nfunction getShellBoundary() {\n return shellBoundary;\n}\nfunction pushPrimaryTreeSuspenseHandler(handler) {\n // TODO: Pass as argument\n var current = handler.alternate;\n // propagated a single level. For example, when ForceSuspenseFallback is set,\n // it should only force the nearest Suspense boundary into fallback mode.\n\n pushSuspenseListContext(handler, setDefaultShallowSuspenseListContext(suspenseStackCursor.current)); // Experimental feature: Some Suspense boundaries are marked as having an\n // to push a nested Suspense handler, because it will get replaced by the\n // outer fallback, anyway. Consider this as a future optimization.\n\n\n push(suspenseHandlerStackCursor, handler, handler);\n\n if (shellBoundary === null) {\n if (current === null || isCurrentTreeHidden()) {\n // This boundary is not visible in the current UI.\n shellBoundary = handler;\n } else {\n var prevState = current.memoizedState;\n\n if (prevState !== null) {\n // This boundary is showing a fallback in the current UI.\n shellBoundary = handler;\n }\n }\n }\n}\nfunction pushFallbackTreeSuspenseHandler(fiber) {\n // We're about to render the fallback. If something in the fallback suspends,\n // it's akin to throwing inside of a `catch` block. This boundary should not\n // capture. Reuse the existing handler on the stack.\n reuseSuspenseHandlerOnStack(fiber);\n}\nfunction pushOffscreenSuspenseHandler(fiber) {\n if (fiber.tag === OffscreenComponent) {\n // A SuspenseList context is only pushed here to avoid a push/pop mismatch.\n // Reuse the current value on the stack.\n // TODO: We can avoid needing to push here by by forking popSuspenseHandler\n // into separate functions for Suspense and Offscreen.\n pushSuspenseListContext(fiber, suspenseStackCursor.current);\n push(suspenseHandlerStackCursor, fiber, fiber);\n\n if (shellBoundary !== null) ; else {\n var current = fiber.alternate;\n\n if (current !== null) {\n var prevState = current.memoizedState;\n\n if (prevState !== null) {\n // This is the first boundary in the stack that's already showing\n // a fallback. So everything outside is considered the shell.\n shellBoundary = fiber;\n }\n }\n }\n } else {\n // This is a LegacyHidden component.\n reuseSuspenseHandlerOnStack(fiber);\n }\n}\nfunction reuseSuspenseHandlerOnStack(fiber) {\n pushSuspenseListContext(fiber, suspenseStackCursor.current);\n push(suspenseHandlerStackCursor, getSuspenseHandler(), fiber);\n}\nfunction getSuspenseHandler() {\n return suspenseHandlerStackCursor.current;\n}\nfunction popSuspenseHandler(fiber) {\n pop(suspenseHandlerStackCursor, fiber);\n\n if (shellBoundary === fiber) {\n // Popping back into the shell.\n shellBoundary = null;\n }\n\n popSuspenseListContext(fiber);\n} // SuspenseList context\n// TODO: Move to a separate module? We may change the SuspenseList\n// implementation to hide/show in the commit phase, anyway.\n\nvar DefaultSuspenseContext = 0;\nvar SubtreeSuspenseContextMask = 1; // ForceSuspenseFallback can be used by SuspenseList to force newly added\n// items into their fallback state during one of the render passes.\n\nvar ForceSuspenseFallback = 2;\nvar suspenseStackCursor = createCursor(DefaultSuspenseContext);\nfunction hasSuspenseListContext(parentContext, flag) {\n return (parentContext & flag) !== 0;\n}\nfunction setDefaultShallowSuspenseListContext(parentContext) {\n return parentContext & SubtreeSuspenseContextMask;\n}\nfunction setShallowSuspenseListContext(parentContext, shallowContext) {\n return parentContext & SubtreeSuspenseContextMask | shallowContext;\n}\nfunction pushSuspenseListContext(fiber, newContext) {\n push(suspenseStackCursor, newContext, fiber);\n}\nfunction popSuspenseListContext(fiber) {\n pop(suspenseStackCursor, fiber);\n}\n\n// A non-null SuspenseState means that it is blocked for one reason or another.\n// - A non-null dehydrated field means it's blocked pending hydration.\n// - A non-null dehydrated field can use isSuspenseInstancePending or\n// isSuspenseInstanceFallback to query the reason for being dehydrated.\n// - A null dehydrated field means it's blocked by something suspending and\n// we're currently showing a fallback instead.\n\nfunction findFirstSuspended(row) {\n var node = row;\n\n while (node !== null) {\n if (node.tag === SuspenseComponent) {\n var state = node.memoizedState;\n\n if (state !== null) {\n var dehydrated = state.dehydrated;\n\n if (dehydrated === null || isSuspenseInstancePending(dehydrated) || isSuspenseInstanceFallback(dehydrated)) {\n return node;\n }\n }\n } else if (node.tag === SuspenseListComponent && // revealOrder undefined can't be trusted because it don't\n // keep track of whether it suspended or not.\n node.memoizedProps.revealOrder !== undefined) {\n var didSuspend = (node.flags & DidCapture) !== NoFlags$1;\n\n if (didSuspend) {\n return node;\n }\n } else if (node.child !== null) {\n node.child.return = node;\n node = node.child;\n continue;\n }\n\n if (node === row) {\n return null;\n }\n\n while (node.sibling === null) {\n if (node.return === null || node.return === row) {\n return null;\n }\n\n node = node.return;\n }\n\n node.sibling.return = node.return;\n node = node.sibling;\n }\n\n return null;\n}\n\nvar NoFlags =\n/* */\n0; // Represents whether effect should fire.\n\nvar HasEffect =\n/* */\n1; // Represents the phase in which the effect (not the clean-up) fires.\n\nvar Insertion =\n/* */\n2;\nvar Layout =\n/* */\n4;\nvar Passive =\n/* */\n8;\n\nvar ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher,\n ReactCurrentBatchConfig$3 = ReactSharedInternals.ReactCurrentBatchConfig;\nvar didWarnAboutMismatchedHooksForComponent;\nvar didWarnUncachedGetSnapshot;\nvar didWarnAboutUseWrappedInTryCatch;\nvar didWarnAboutAsyncClientComponent;\n\n{\n didWarnAboutMismatchedHooksForComponent = new Set();\n didWarnAboutUseWrappedInTryCatch = new Set();\n didWarnAboutAsyncClientComponent = new Set();\n} // The effect \"instance\" is a shared object that remains the same for the entire\n// lifetime of an effect. In Rust terms, a RefCell. We use it to store the\n// \"destroy\" function that is returned from an effect, because that is stateful.\n// The field is `undefined` if the effect is unmounted, or if the effect ran\n// but is not stateful. We don't explicitly track whether the effect is mounted\n// or unmounted because that can be inferred by the hiddenness of the fiber in\n// the tree, i.e. whether there is a hidden Offscreen fiber above it.\n//\n// It's unfortunate that this is stored on a separate object, because it adds\n// more memory per effect instance, but it's conceptually sound. I think there's\n// likely a better data structure we could use for effects; perhaps just one\n// array of effect instances per fiber. But I think this is OK for now despite\n// the additional memory and we can follow up with performance\n// optimizations later.\n// These are set right before calling the component.\n\n\nvar renderLanes = NoLanes; // The work-in-progress fiber. I've named it differently to distinguish it from\n// the work-in-progress hook.\n\nvar currentlyRenderingFiber$1 = null; // Hooks are stored as a linked list on the fiber's memoizedState field. The\n// current hook list is the list that belongs to the current fiber. The\n// work-in-progress hook list is a new list that will be added to the\n// work-in-progress fiber.\n\nvar currentHook = null;\nvar workInProgressHook = null; // Whether an update was scheduled at any point during the render phase. This\n// does not get reset if we do another render pass; only when we're completely\n// finished evaluating this component. This is an optimization so we know\n// whether we need to clear render phase updates after a throw.\n\nvar didScheduleRenderPhaseUpdate = false; // Where an update was scheduled only during the current render pass. This\n// gets reset after each attempt.\n// TODO: Maybe there's some way to consolidate this with\n// `didScheduleRenderPhaseUpdate`. Or with `numberOfReRenders`.\n\nvar didScheduleRenderPhaseUpdateDuringThisPass = false;\nvar shouldDoubleInvokeUserFnsInHooksDEV = false; // Counts the number of useId hooks in this component.\n\nvar localIdCounter = 0; // Counts number of `use`-d thenables\n\nvar thenableIndexCounter = 0;\nvar thenableState = null; // Used for ids that are generated completely client-side (i.e. not during\n// hydration). This counter is global, so client ids are not stable across\n// render attempts.\n\nvar globalClientIdCounter = 0;\nvar RE_RENDER_LIMIT = 25; // In DEV, this is the name of the currently executing primitive hook\n\nvar currentHookNameInDev = null; // In DEV, this list ensures that hooks are called in the same order between renders.\n// The list stores the order of hooks used during the initial render (mount).\n// Subsequent renders (updates) reference this list.\n\nvar hookTypesDev = null;\nvar hookTypesUpdateIndexDev = -1; // In DEV, this tracks whether currently rendering component needs to ignore\n// the dependencies for Hooks that need them (e.g. useEffect or useMemo).\n// When true, such Hooks will always be \"remounted\". Only used during hot reload.\n\nvar ignorePreviousDependencies = false;\n\nfunction mountHookTypesDev() {\n {\n var hookName = currentHookNameInDev;\n\n if (hookTypesDev === null) {\n hookTypesDev = [hookName];\n } else {\n hookTypesDev.push(hookName);\n }\n }\n}\n\nfunction updateHookTypesDev() {\n {\n var hookName = currentHookNameInDev;\n\n if (hookTypesDev !== null) {\n hookTypesUpdateIndexDev++;\n\n if (hookTypesDev[hookTypesUpdateIndexDev] !== hookName) {\n warnOnHookMismatchInDev(hookName);\n }\n }\n }\n}\n\nfunction checkDepsAreArrayDev(deps) {\n {\n if (deps !== undefined && deps !== null && !isArray(deps)) {\n // Verify deps, but only on mount to avoid extra checks.\n // It's unlikely their type would change as usually you define them inline.\n error('%s received a final argument that is not an array (instead, received `%s`). When ' + 'specified, the final argument must be an array.', currentHookNameInDev, typeof deps);\n }\n }\n}\n\nfunction warnOnHookMismatchInDev(currentHookName) {\n {\n var componentName = getComponentNameFromFiber(currentlyRenderingFiber$1);\n\n if (!didWarnAboutMismatchedHooksForComponent.has(componentName)) {\n didWarnAboutMismatchedHooksForComponent.add(componentName);\n\n if (hookTypesDev !== null) {\n var table = '';\n var secondColumnStart = 30;\n\n for (var i = 0; i <= hookTypesUpdateIndexDev; i++) {\n var oldHookName = hookTypesDev[i];\n var newHookName = i === hookTypesUpdateIndexDev ? currentHookName : oldHookName;\n var row = i + 1 + \". \" + oldHookName; // Extra space so second column lines up\n // lol @ IE not supporting String#repeat\n\n while (row.length < secondColumnStart) {\n row += ' ';\n }\n\n row += newHookName + '\\n';\n table += row;\n }\n\n error('React has detected a change in the order of Hooks called by %s. ' + 'This will lead to bugs and errors if not fixed. ' + 'For more information, read the Rules of Hooks: https://react.dev/link/rules-of-hooks\\n\\n' + ' Previous render Next render\\n' + ' ------------------------------------------------------\\n' + '%s' + ' ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\\n', componentName, table);\n }\n }\n }\n}\n\nfunction warnIfAsyncClientComponent(Component) {\n {\n // This dev-only check only works for detecting native async functions,\n // not transpiled ones. There's also a prod check that we use to prevent\n // async client components from crashing the app; the prod one works even\n // for transpiled async functions. Neither mechanism is completely\n // bulletproof but together they cover the most common cases.\n var isAsyncFunction = // $FlowIgnore[method-unbinding]\n Object.prototype.toString.call(Component) === '[object AsyncFunction]';\n\n if (isAsyncFunction) {\n // Encountered an async Client Component. This is not yet supported.\n var componentName = getComponentNameFromFiber(currentlyRenderingFiber$1);\n\n if (!didWarnAboutAsyncClientComponent.has(componentName)) {\n didWarnAboutAsyncClientComponent.add(componentName);\n\n error('async/await is not yet supported in Client Components, only ' + 'Server Components. This error is often caused by accidentally ' + \"adding `'use client'` to a module that was originally written \" + 'for the server.');\n }\n }\n }\n}\n\nfunction throwInvalidHookError() {\n throw new Error('Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for' + ' one of the following reasons:\\n' + '1. You might have mismatching versions of React and the renderer (such as React DOM)\\n' + '2. You might be breaking the Rules of Hooks\\n' + '3. You might have more than one copy of React in the same app\\n' + 'See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.');\n}\n\nfunction areHookInputsEqual(nextDeps, prevDeps) {\n {\n if (ignorePreviousDependencies) {\n // Only true when this component is being hot reloaded.\n return false;\n }\n }\n\n if (prevDeps === null) {\n {\n error('%s received a final argument during this render, but not during ' + 'the previous render. Even though the final argument is optional, ' + 'its type cannot change between renders.', currentHookNameInDev);\n }\n\n return false;\n }\n\n {\n // Don't bother comparing lengths in prod because these arrays should be\n // passed inline.\n if (nextDeps.length !== prevDeps.length) {\n error('The final argument passed to %s changed size between renders. The ' + 'order and size of this array must remain constant.\\n\\n' + 'Previous: %s\\n' + 'Incoming: %s', currentHookNameInDev, \"[\" + prevDeps.join(', ') + \"]\", \"[\" + nextDeps.join(', ') + \"]\");\n }\n } // $FlowFixMe[incompatible-use] found when upgrading Flow\n\n\n for (var i = 0; i < prevDeps.length && i < nextDeps.length; i++) {\n // $FlowFixMe[incompatible-use] found when upgrading Flow\n if (objectIs(nextDeps[i], prevDeps[i])) {\n continue;\n }\n\n return false;\n }\n\n return true;\n}\n\nfunction renderWithHooks(current, workInProgress, Component, props, secondArg, nextRenderLanes) {\n renderLanes = nextRenderLanes;\n currentlyRenderingFiber$1 = workInProgress;\n\n {\n hookTypesDev = current !== null ? current._debugHookTypes : null;\n hookTypesUpdateIndexDev = -1; // Used for hot reloading:\n\n ignorePreviousDependencies = current !== null && current.type !== workInProgress.type;\n warnIfAsyncClientComponent(Component);\n }\n\n workInProgress.memoizedState = null;\n workInProgress.updateQueue = null;\n workInProgress.lanes = NoLanes; // The following should have already been reset\n // currentHook = null;\n // workInProgressHook = null;\n // didScheduleRenderPhaseUpdate = false;\n // localIdCounter = 0;\n // thenableIndexCounter = 0;\n // thenableState = null;\n // TODO Warn if no hooks are used at all during mount, then some are used during update.\n // Currently we will identify the update render as a mount because memoizedState === null.\n // This is tricky because it's valid for certain types of components (e.g. React.lazy)\n // Using memoizedState to differentiate between mount/update only works if at least one stateful hook is used.\n // Non-stateful hooks (e.g. context) don't get added to memoizedState,\n // so memoizedState would be null during updates and mounts.\n\n {\n if (current !== null && current.memoizedState !== null) {\n ReactCurrentDispatcher$1.current = HooksDispatcherOnUpdateInDEV;\n } else if (hookTypesDev !== null) {\n // This dispatcher handles an edge case where a component is updating,\n // but no stateful hooks have been used.\n // We want to match the production code behavior (which will use HooksDispatcherOnMount),\n // but with the extra DEV validation to ensure hooks ordering hasn't changed.\n // This dispatcher does that.\n ReactCurrentDispatcher$1.current = HooksDispatcherOnMountWithHookTypesInDEV;\n } else {\n ReactCurrentDispatcher$1.current = HooksDispatcherOnMountInDEV;\n }\n } // In Strict Mode, during development, user functions are double invoked to\n // help detect side effects. The logic for how this is implemented for in\n // hook components is a bit complex so let's break it down.\n //\n // We will invoke the entire component function twice. However, during the\n // second invocation of the component, the hook state from the first\n // invocation will be reused. That means things like `useMemo` functions won't\n // run again, because the deps will match and the memoized result will\n // be reused.\n //\n // We want memoized functions to run twice, too, so account for this, user\n // functions are double invoked during the *first* invocation of the component\n // function, and are *not* double invoked during the second incovation:\n //\n // - First execution of component function: user functions are double invoked\n // - Second execution of component function (in Strict Mode, during\n // development): user functions are not double invoked.\n //\n // This is intentional for a few reasons; most importantly, it's because of\n // how `use` works when something suspends: it reuses the promise that was\n // passed during the first attempt. This is itself a form of memoization.\n // We need to be able to memoize the reactive inputs to the `use` call using\n // a hook (i.e. `useMemo`), which means, the reactive inputs to `use` must\n // come from the same component invocation as the output.\n //\n // There are plenty of tests to ensure this behavior is correct.\n\n\n var shouldDoubleRenderDEV = (workInProgress.mode & StrictLegacyMode) !== NoMode;\n shouldDoubleInvokeUserFnsInHooksDEV = shouldDoubleRenderDEV;\n var children = Component(props, secondArg);\n shouldDoubleInvokeUserFnsInHooksDEV = false; // Check if there was a render phase update\n\n if (didScheduleRenderPhaseUpdateDuringThisPass) {\n // Keep rendering until the component stabilizes (there are no more render\n // phase updates).\n children = renderWithHooksAgain(workInProgress, Component, props, secondArg);\n }\n\n if (shouldDoubleRenderDEV) {\n // In development, components are invoked twice to help detect side effects.\n setIsStrictModeForDevtools(true);\n\n try {\n children = renderWithHooksAgain(workInProgress, Component, props, secondArg);\n } finally {\n setIsStrictModeForDevtools(false);\n }\n }\n\n finishRenderingHooks(current, workInProgress);\n return children;\n}\n\nfunction finishRenderingHooks(current, workInProgress, Component) {\n {\n workInProgress._debugHookTypes = hookTypesDev;\n } // We can assume the previous dispatcher is always this one, since we set it\n // at the beginning of the render phase and there's no re-entrance.\n\n\n ReactCurrentDispatcher$1.current = ContextOnlyDispatcher; // This check uses currentHook so that it works the same in DEV and prod bundles.\n // hookTypesDev could catch more cases (e.g. context) but only in DEV bundles.\n\n var didRenderTooFewHooks = currentHook !== null && currentHook.next !== null;\n renderLanes = NoLanes;\n currentlyRenderingFiber$1 = null;\n currentHook = null;\n workInProgressHook = null;\n\n {\n currentHookNameInDev = null;\n hookTypesDev = null;\n hookTypesUpdateIndexDev = -1; // Confirm that a static flag was not added or removed since the last\n // render. If this fires, it suggests that we incorrectly reset the static\n // flags in some other part of the codebase. This has happened before, for\n // example, in the SuspenseList implementation.\n\n if (current !== null && (current.flags & StaticMask) !== (workInProgress.flags & StaticMask) && // Disable this warning in legacy mode, because legacy Suspense is weird\n // and creates false positives. To make this work in legacy mode, we'd\n // need to mark fibers that commit in an incomplete state, somehow. For\n // now I'll disable the warning that most of the bugs that would trigger\n // it are either exclusive to concurrent mode or exist in both.\n (current.mode & ConcurrentMode) !== NoMode) {\n error('Internal React error: Expected static flag was missing. Please ' + 'notify the React team.');\n }\n }\n\n didScheduleRenderPhaseUpdate = false; // This is reset by checkDidRenderIdHook\n // localIdCounter = 0;\n\n thenableIndexCounter = 0;\n thenableState = null;\n\n if (didRenderTooFewHooks) {\n throw new Error('Rendered fewer hooks than expected. This may be caused by an accidental ' + 'early return statement.');\n }\n\n {\n if (checkIfUseWrappedInTryCatch()) {\n var componentName = getComponentNameFromFiber(workInProgress) || 'Unknown';\n\n if (!didWarnAboutUseWrappedInTryCatch.has(componentName) && // This warning also fires if you suspend with `use` inside an\n // async component. Since we warn for that above, we'll silence this\n // second warning by checking here.\n !didWarnAboutAsyncClientComponent.has(componentName)) {\n didWarnAboutUseWrappedInTryCatch.add(componentName);\n\n error('`use` was called from inside a try/catch block. This is not allowed ' + 'and can lead to unexpected behavior. To handle errors triggered ' + 'by `use`, wrap your component in a error boundary.');\n }\n }\n }\n}\n\nfunction replaySuspendedComponentWithHooks(current, workInProgress, Component, props, secondArg) {\n // This function is used to replay a component that previously suspended,\n // after its data resolves.\n //\n // It's a simplified version of renderWithHooks, but it doesn't need to do\n // most of the set up work because they weren't reset when we suspended; they\n // only get reset when the component either completes (finishRenderingHooks)\n // or unwinds (resetHooksOnUnwind).\n {\n hookTypesUpdateIndexDev = -1; // Used for hot reloading:\n\n ignorePreviousDependencies = current !== null && current.type !== workInProgress.type;\n }\n\n var children = renderWithHooksAgain(workInProgress, Component, props, secondArg);\n finishRenderingHooks(current, workInProgress);\n return children;\n}\n\nfunction renderWithHooksAgain(workInProgress, Component, props, secondArg) {\n // This is used to perform another render pass. It's used when setState is\n // called during render, and for double invoking components in Strict Mode\n // during development.\n //\n // The state from the previous pass is reused whenever possible. So, state\n // updates that were already processed are not processed again, and memoized\n // functions (`useMemo`) are not invoked again.\n //\n // Keep rendering in a loop for as long as render phase updates continue to\n // be scheduled. Use a counter to prevent infinite loops.\n currentlyRenderingFiber$1 = workInProgress;\n var numberOfReRenders = 0;\n var children;\n\n do {\n if (didScheduleRenderPhaseUpdateDuringThisPass) {\n // It's possible that a use() value depended on a state that was updated in\n // this rerender, so we need to watch for different thenables this time.\n thenableState = null;\n }\n\n thenableIndexCounter = 0;\n didScheduleRenderPhaseUpdateDuringThisPass = false;\n\n if (numberOfReRenders >= RE_RENDER_LIMIT) {\n throw new Error('Too many re-renders. React limits the number of renders to prevent ' + 'an infinite loop.');\n }\n\n numberOfReRenders += 1;\n\n {\n // Even when hot reloading, allow dependencies to stabilize\n // after first render to prevent infinite render phase updates.\n ignorePreviousDependencies = false;\n } // Start over from the beginning of the list\n\n\n currentHook = null;\n workInProgressHook = null;\n workInProgress.updateQueue = null;\n\n {\n // Also validate hook order for cascading updates.\n hookTypesUpdateIndexDev = -1;\n }\n\n ReactCurrentDispatcher$1.current = HooksDispatcherOnRerenderInDEV ;\n children = Component(props, secondArg);\n } while (didScheduleRenderPhaseUpdateDuringThisPass);\n\n return children;\n}\n\nfunction renderTransitionAwareHostComponentWithHooks(current, workInProgress, lanes) {\n\n return renderWithHooks(current, workInProgress, TransitionAwareHostComponent, null, null, lanes);\n}\nfunction TransitionAwareHostComponent() {\n\n var dispatcher = ReactCurrentDispatcher$1.current;\n\n var _dispatcher$useState = dispatcher.useState(),\n maybeThenable = _dispatcher$useState[0];\n\n if (typeof maybeThenable.then === 'function') {\n var thenable = maybeThenable;\n return useThenable(thenable);\n } else {\n var status = maybeThenable;\n return status;\n }\n}\nfunction checkDidRenderIdHook() {\n // This should be called immediately after every renderWithHooks call.\n // Conceptually, it's part of the return value of renderWithHooks; it's only a\n // separate function to avoid using an array tuple.\n var didRenderIdHook = localIdCounter !== 0;\n localIdCounter = 0;\n return didRenderIdHook;\n}\nfunction bailoutHooks(current, workInProgress, lanes) {\n workInProgress.updateQueue = current.updateQueue; // TODO: Don't need to reset the flags here, because they're reset in the\n // complete phase (bubbleProperties).\n\n if ((workInProgress.mode & StrictEffectsMode) !== NoMode) {\n workInProgress.flags &= ~(MountPassiveDev | MountLayoutDev | Passive$1 | Update);\n } else {\n workInProgress.flags &= ~(Passive$1 | Update);\n }\n\n current.lanes = removeLanes(current.lanes, lanes);\n}\nfunction resetHooksAfterThrow() {\n // This is called immediaetly after a throw. It shouldn't reset the entire\n // module state, because the work loop might decide to replay the component\n // again without rewinding.\n //\n // It should only reset things like the current dispatcher, to prevent hooks\n // from being called outside of a component.\n currentlyRenderingFiber$1 = null; // We can assume the previous dispatcher is always this one, since we set it\n // at the beginning of the render phase and there's no re-entrance.\n\n ReactCurrentDispatcher$1.current = ContextOnlyDispatcher;\n}\nfunction resetHooksOnUnwind(workInProgress) {\n if (didScheduleRenderPhaseUpdate) {\n // There were render phase updates. These are only valid for this render\n // phase, which we are now aborting. Remove the updates from the queues so\n // they do not persist to the next render. Do not remove updates from hooks\n // that weren't processed.\n //\n // Only reset the updates from the queue if it has a clone. If it does\n // not have a clone, that means it wasn't processed, and the updates were\n // scheduled before we entered the render phase.\n var hook = workInProgress.memoizedState;\n\n while (hook !== null) {\n var queue = hook.queue;\n\n if (queue !== null) {\n queue.pending = null;\n }\n\n hook = hook.next;\n }\n\n didScheduleRenderPhaseUpdate = false;\n }\n\n renderLanes = NoLanes;\n currentlyRenderingFiber$1 = null;\n currentHook = null;\n workInProgressHook = null;\n\n {\n hookTypesDev = null;\n hookTypesUpdateIndexDev = -1;\n currentHookNameInDev = null;\n }\n\n didScheduleRenderPhaseUpdateDuringThisPass = false;\n localIdCounter = 0;\n thenableIndexCounter = 0;\n thenableState = null;\n}\n\nfunction mountWorkInProgressHook() {\n var hook = {\n memoizedState: null,\n baseState: null,\n baseQueue: null,\n queue: null,\n next: null\n };\n\n if (workInProgressHook === null) {\n // This is the first hook in the list\n currentlyRenderingFiber$1.memoizedState = workInProgressHook = hook;\n } else {\n // Append to the end of the list\n workInProgressHook = workInProgressHook.next = hook;\n }\n\n return workInProgressHook;\n}\n\nfunction updateWorkInProgressHook() {\n // This function is used both for updates and for re-renders triggered by a\n // render phase update. It assumes there is either a current hook we can\n // clone, or a work-in-progress hook from a previous render pass that we can\n // use as a base.\n var nextCurrentHook;\n\n if (currentHook === null) {\n var current = currentlyRenderingFiber$1.alternate;\n\n if (current !== null) {\n nextCurrentHook = current.memoizedState;\n } else {\n nextCurrentHook = null;\n }\n } else {\n nextCurrentHook = currentHook.next;\n }\n\n var nextWorkInProgressHook;\n\n if (workInProgressHook === null) {\n nextWorkInProgressHook = currentlyRenderingFiber$1.memoizedState;\n } else {\n nextWorkInProgressHook = workInProgressHook.next;\n }\n\n if (nextWorkInProgressHook !== null) {\n // There's already a work-in-progress. Reuse it.\n workInProgressHook = nextWorkInProgressHook;\n nextWorkInProgressHook = workInProgressHook.next;\n currentHook = nextCurrentHook;\n } else {\n // Clone from the current hook.\n if (nextCurrentHook === null) {\n var currentFiber = currentlyRenderingFiber$1.alternate;\n\n if (currentFiber === null) {\n // This is the initial render. This branch is reached when the component\n // suspends, resumes, then renders an additional hook.\n // Should never be reached because we should switch to the mount dispatcher first.\n throw new Error('Update hook called on initial render. This is likely a bug in React. Please file an issue.');\n } else {\n // This is an update. We should always have a current hook.\n throw new Error('Rendered more hooks than during the previous render.');\n }\n }\n\n currentHook = nextCurrentHook;\n var newHook = {\n memoizedState: currentHook.memoizedState,\n baseState: currentHook.baseState,\n baseQueue: currentHook.baseQueue,\n queue: currentHook.queue,\n next: null\n };\n\n if (workInProgressHook === null) {\n // This is the first hook in the list.\n currentlyRenderingFiber$1.memoizedState = workInProgressHook = newHook;\n } else {\n // Append to the end of the list.\n workInProgressHook = workInProgressHook.next = newHook;\n }\n }\n\n return workInProgressHook;\n} // NOTE: defining two versions of this function to avoid size impact when this feature is disabled.\n// Previously this function was inlined, the additional `memoCache` property makes it not inlined.\n\n\nvar createFunctionComponentUpdateQueue;\n\n{\n createFunctionComponentUpdateQueue = function () {\n return {\n lastEffect: null,\n events: null,\n stores: null\n };\n };\n}\n\nfunction useThenable(thenable) {\n // Track the position of the thenable within this fiber.\n var index = thenableIndexCounter;\n thenableIndexCounter += 1;\n\n if (thenableState === null) {\n thenableState = createThenableState();\n }\n\n var result = trackUsedThenable(thenableState, thenable, index);\n\n if (currentlyRenderingFiber$1.alternate === null && (workInProgressHook === null ? currentlyRenderingFiber$1.memoizedState === null : workInProgressHook.next === null)) {\n // Initial render, and either this is the first time the component is\n // called, or there were no Hooks called after this use() the previous\n // time (perhaps because it threw). Subsequent Hook calls should use the\n // mount dispatcher.\n {\n ReactCurrentDispatcher$1.current = HooksDispatcherOnMountInDEV;\n }\n }\n\n return result;\n}\n\nfunction use(usable) {\n if (usable !== null && typeof usable === 'object') {\n // $FlowFixMe[method-unbinding]\n if (typeof usable.then === 'function') {\n // This is a thenable.\n var thenable = usable;\n return useThenable(thenable);\n } else if (usable.$$typeof === REACT_CONTEXT_TYPE) {\n var context = usable;\n return readContext(context);\n }\n } // eslint-disable-next-line react-internal/safe-string-coercion\n\n\n throw new Error('An unsupported type was passed to use(): ' + String(usable));\n}\n\nfunction basicStateReducer(state, action) {\n // $FlowFixMe[incompatible-use]: Flow doesn't like mixed types\n return typeof action === 'function' ? action(state) : action;\n}\n\nfunction mountReducer(reducer, initialArg, init) {\n var hook = mountWorkInProgressHook();\n var initialState;\n\n if (init !== undefined) {\n initialState = init(initialArg);\n\n if (shouldDoubleInvokeUserFnsInHooksDEV) {\n setIsStrictModeForDevtools(true);\n init(initialArg);\n setIsStrictModeForDevtools(false);\n }\n } else {\n initialState = initialArg;\n }\n\n hook.memoizedState = hook.baseState = initialState;\n var queue = {\n pending: null,\n lanes: NoLanes,\n dispatch: null,\n lastRenderedReducer: reducer,\n lastRenderedState: initialState\n };\n hook.queue = queue;\n var dispatch = queue.dispatch = dispatchReducerAction.bind(null, currentlyRenderingFiber$1, queue);\n return [hook.memoizedState, dispatch];\n}\n\nfunction updateReducer(reducer, initialArg, init) {\n var hook = updateWorkInProgressHook();\n return updateReducerImpl(hook, currentHook, reducer);\n}\n\nfunction updateReducerImpl(hook, current, reducer) {\n var queue = hook.queue;\n\n if (queue === null) {\n throw new Error('Should have a queue. This is likely a bug in React. Please file an issue.');\n }\n\n queue.lastRenderedReducer = reducer; // The last rebase update that is NOT part of the base state.\n\n var baseQueue = hook.baseQueue; // The last pending update that hasn't been processed yet.\n\n var pendingQueue = queue.pending;\n\n if (pendingQueue !== null) {\n // We have new updates that haven't been processed yet.\n // We'll add them to the base queue.\n if (baseQueue !== null) {\n // Merge the pending queue and the base queue.\n var baseFirst = baseQueue.next;\n var pendingFirst = pendingQueue.next;\n baseQueue.next = pendingFirst;\n pendingQueue.next = baseFirst;\n }\n\n {\n if (current.baseQueue !== baseQueue) {\n // Internal invariant that should never happen, but feasibly could in\n // the future if we implement resuming, or some form of that.\n error('Internal error: Expected work-in-progress queue to be a clone. ' + 'This is a bug in React.');\n }\n }\n\n current.baseQueue = baseQueue = pendingQueue;\n queue.pending = null;\n }\n\n var baseState = hook.baseState;\n\n if (baseQueue === null) {\n // If there are no pending updates, then the memoized state should be the\n // same as the base state. Currently these only diverge in the case of\n // useOptimistic, because useOptimistic accepts a new baseState on\n // every render.\n hook.memoizedState = baseState; // We don't need to call markWorkInProgressReceivedUpdate because\n // baseState is derived from other reactive values.\n } else {\n // We have a queue to process.\n var first = baseQueue.next;\n var newState = baseState;\n var newBaseState = null;\n var newBaseQueueFirst = null;\n var newBaseQueueLast = null;\n var update = first;\n var didReadFromEntangledAsyncAction = false;\n\n do {\n // An extra OffscreenLane bit is added to updates that were made to\n // a hidden tree, so that we can distinguish them from updates that were\n // already there when the tree was hidden.\n var updateLane = removeLanes(update.lane, OffscreenLane);\n var isHiddenUpdate = updateLane !== update.lane; // Check if this update was made while the tree was hidden. If so, then\n // it's not a \"base\" update and we should disregard the extra base lanes\n // that were added to renderLanes when we entered the Offscreen tree.\n\n var shouldSkipUpdate = isHiddenUpdate ? !isSubsetOfLanes(getWorkInProgressRootRenderLanes(), updateLane) : !isSubsetOfLanes(renderLanes, updateLane);\n\n if (shouldSkipUpdate) {\n // Priority is insufficient. Skip this update. If this is the first\n // skipped update, the previous update/state is the new base\n // update/state.\n var clone = {\n lane: updateLane,\n revertLane: update.revertLane,\n action: update.action,\n hasEagerState: update.hasEagerState,\n eagerState: update.eagerState,\n next: null\n };\n\n if (newBaseQueueLast === null) {\n newBaseQueueFirst = newBaseQueueLast = clone;\n newBaseState = newState;\n } else {\n newBaseQueueLast = newBaseQueueLast.next = clone;\n } // Update the remaining priority in the queue.\n // TODO: Don't need to accumulate this. Instead, we can remove\n // renderLanes from the original lanes.\n\n\n currentlyRenderingFiber$1.lanes = mergeLanes(currentlyRenderingFiber$1.lanes, updateLane);\n markSkippedUpdateLanes(updateLane);\n } else {\n // This update does have sufficient priority.\n // Check if this is an optimistic update.\n var revertLane = update.revertLane;\n\n if (revertLane === NoLane) {\n // This is not an optimistic update, and we're going to apply it now.\n // But, if there were earlier updates that were skipped, we need to\n // leave this update in the queue so it can be rebased later.\n if (newBaseQueueLast !== null) {\n var _clone = {\n // This update is going to be committed so we never want uncommit\n // it. Using NoLane works because 0 is a subset of all bitmasks, so\n // this will never be skipped by the check above.\n lane: NoLane,\n revertLane: NoLane,\n action: update.action,\n hasEagerState: update.hasEagerState,\n eagerState: update.eagerState,\n next: null\n };\n newBaseQueueLast = newBaseQueueLast.next = _clone;\n } // Check if this update is part of a pending async action. If so,\n // we'll need to suspend until the action has finished, so that it's\n // batched together with future updates in the same action.\n\n\n if (updateLane === peekEntangledActionLane()) {\n didReadFromEntangledAsyncAction = true;\n }\n } else {\n // This is an optimistic update. If the \"revert\" priority is\n // sufficient, don't apply the update. Otherwise, apply the update,\n // but leave it in the queue so it can be either reverted or\n // rebased in a subsequent render.\n if (isSubsetOfLanes(renderLanes, revertLane)) {\n // The transition that this optimistic update is associated with\n // has finished. Pretend the update doesn't exist by skipping\n // over it.\n update = update.next; // Check if this update is part of a pending async action. If so,\n // we'll need to suspend until the action has finished, so that it's\n // batched together with future updates in the same action.\n\n if (revertLane === peekEntangledActionLane()) {\n didReadFromEntangledAsyncAction = true;\n }\n\n continue;\n } else {\n var _clone2 = {\n // Once we commit an optimistic update, we shouldn't uncommit it\n // until the transition it is associated with has finished\n // (represented by revertLane). Using NoLane here works because 0\n // is a subset of all bitmasks, so this will never be skipped by\n // the check above.\n lane: NoLane,\n // Reuse the same revertLane so we know when the transition\n // has finished.\n revertLane: update.revertLane,\n action: update.action,\n hasEagerState: update.hasEagerState,\n eagerState: update.eagerState,\n next: null\n };\n\n if (newBaseQueueLast === null) {\n newBaseQueueFirst = newBaseQueueLast = _clone2;\n newBaseState = newState;\n } else {\n newBaseQueueLast = newBaseQueueLast.next = _clone2;\n } // Update the remaining priority in the queue.\n // TODO: Don't need to accumulate this. Instead, we can remove\n // renderLanes from the original lanes.\n\n\n currentlyRenderingFiber$1.lanes = mergeLanes(currentlyRenderingFiber$1.lanes, revertLane);\n markSkippedUpdateLanes(revertLane);\n }\n } // Process this update.\n\n\n var action = update.action;\n\n if (shouldDoubleInvokeUserFnsInHooksDEV) {\n reducer(newState, action);\n }\n\n if (update.hasEagerState) {\n // If this update is a state update (not a reducer) and was processed eagerly,\n // we can use the eagerly computed state\n newState = update.eagerState;\n } else {\n newState = reducer(newState, action);\n }\n }\n\n update = update.next;\n } while (update !== null && update !== first);\n\n if (newBaseQueueLast === null) {\n newBaseState = newState;\n } else {\n newBaseQueueLast.next = newBaseQueueFirst;\n } // Mark that the fiber performed work, but only if the new state is\n // different from the current state.\n\n\n if (!objectIs(newState, hook.memoizedState)) {\n markWorkInProgressReceivedUpdate(); // Check if this update is part of a pending async action. If so, we'll\n // need to suspend until the action has finished, so that it's batched\n // together with future updates in the same action.\n // TODO: Once we support hooks inside useMemo (or an equivalent\n // memoization boundary like Forget), hoist this logic so that it only\n // suspends if the memo boundary produces a new value.\n\n if (didReadFromEntangledAsyncAction) {\n var entangledActionThenable = peekEntangledActionThenable();\n\n if (entangledActionThenable !== null) {\n // TODO: Instead of the throwing the thenable directly, throw a\n // special object like `use` does so we can detect if it's captured\n // by userspace.\n throw entangledActionThenable;\n }\n }\n }\n\n hook.memoizedState = newState;\n hook.baseState = newBaseState;\n hook.baseQueue = newBaseQueueLast;\n queue.lastRenderedState = newState;\n }\n\n if (baseQueue === null) {\n // `queue.lanes` is used for entangling transitions. We can set it back to\n // zero once the queue is empty.\n queue.lanes = NoLanes;\n }\n\n var dispatch = queue.dispatch;\n return [hook.memoizedState, dispatch];\n}\n\nfunction rerenderReducer(reducer, initialArg, init) {\n var hook = updateWorkInProgressHook();\n var queue = hook.queue;\n\n if (queue === null) {\n throw new Error('Should have a queue. This is likely a bug in React. Please file an issue.');\n }\n\n queue.lastRenderedReducer = reducer; // This is a re-render. Apply the new render phase updates to the previous\n // work-in-progress hook.\n\n var dispatch = queue.dispatch;\n var lastRenderPhaseUpdate = queue.pending;\n var newState = hook.memoizedState;\n\n if (lastRenderPhaseUpdate !== null) {\n // The queue doesn't persist past this render pass.\n queue.pending = null;\n var firstRenderPhaseUpdate = lastRenderPhaseUpdate.next;\n var update = firstRenderPhaseUpdate;\n\n do {\n // Process this render phase update. We don't have to check the\n // priority because it will always be the same as the current\n // render's.\n var action = update.action;\n newState = reducer(newState, action);\n update = update.next;\n } while (update !== firstRenderPhaseUpdate); // Mark that the fiber performed work, but only if the new state is\n // different from the current state.\n\n\n if (!objectIs(newState, hook.memoizedState)) {\n markWorkInProgressReceivedUpdate();\n }\n\n hook.memoizedState = newState; // Don't persist the state accumulated from the render phase updates to\n // the base state unless the queue is empty.\n // TODO: Not sure if this is the desired semantics, but it's what we\n // do for gDSFP. I can't remember why.\n\n if (hook.baseQueue === null) {\n hook.baseState = newState;\n }\n\n queue.lastRenderedState = newState;\n }\n\n return [newState, dispatch];\n}\n\nfunction mountSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {\n var fiber = currentlyRenderingFiber$1;\n var hook = mountWorkInProgressHook();\n var nextSnapshot;\n var isHydrating = getIsHydrating();\n\n if (isHydrating) {\n if (getServerSnapshot === undefined) {\n throw new Error('Missing getServerSnapshot, which is required for ' + 'server-rendered content. Will revert to client rendering.');\n }\n\n nextSnapshot = getServerSnapshot();\n\n {\n if (!didWarnUncachedGetSnapshot) {\n if (nextSnapshot !== getServerSnapshot()) {\n error('The result of getServerSnapshot should be cached to avoid an infinite loop');\n\n didWarnUncachedGetSnapshot = true;\n }\n }\n }\n } else {\n nextSnapshot = getSnapshot();\n\n {\n if (!didWarnUncachedGetSnapshot) {\n var cachedSnapshot = getSnapshot();\n\n if (!objectIs(nextSnapshot, cachedSnapshot)) {\n error('The result of getSnapshot should be cached to avoid an infinite loop');\n\n didWarnUncachedGetSnapshot = true;\n }\n }\n } // Unless we're rendering a blocking lane, schedule a consistency check.\n // Right before committing, we will walk the tree and check if any of the\n // stores were mutated.\n //\n // We won't do this if we're hydrating server-rendered content, because if\n // the content is stale, it's already visible anyway. Instead we'll patch\n // it up in a passive effect.\n\n\n var root = getWorkInProgressRoot();\n\n if (root === null) {\n throw new Error('Expected a work-in-progress root. This is a bug in React. Please file an issue.');\n }\n\n var rootRenderLanes = getWorkInProgressRootRenderLanes();\n\n if (!includesBlockingLane(root, rootRenderLanes)) {\n pushStoreConsistencyCheck(fiber, getSnapshot, nextSnapshot);\n }\n } // Read the current snapshot from the store on every render. This breaks the\n // normal rules of React, and only works because store updates are\n // always synchronous.\n\n\n hook.memoizedState = nextSnapshot;\n var inst = {\n value: nextSnapshot,\n getSnapshot: getSnapshot\n };\n hook.queue = inst; // Schedule an effect to subscribe to the store.\n\n mountEffect(subscribeToStore.bind(null, fiber, inst, subscribe), [subscribe]); // Schedule an effect to update the mutable instance fields. We will update\n // this whenever subscribe, getSnapshot, or value changes. Because there's no\n // clean-up function, and we track the deps correctly, we can call pushEffect\n // directly, without storing any additional state. For the same reason, we\n // don't need to set a static flag, either.\n\n fiber.flags |= Passive$1;\n pushEffect(HasEffect | Passive, updateStoreInstance.bind(null, fiber, inst, nextSnapshot, getSnapshot), createEffectInstance(), null);\n return nextSnapshot;\n}\n\nfunction updateSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {\n var fiber = currentlyRenderingFiber$1;\n var hook = updateWorkInProgressHook(); // Read the current snapshot from the store on every render. This breaks the\n // normal rules of React, and only works because store updates are\n // always synchronous.\n\n var nextSnapshot;\n var isHydrating = getIsHydrating();\n\n if (isHydrating) {\n // Needed for strict mode double render\n if (getServerSnapshot === undefined) {\n throw new Error('Missing getServerSnapshot, which is required for ' + 'server-rendered content. Will revert to client rendering.');\n }\n\n nextSnapshot = getServerSnapshot();\n } else {\n nextSnapshot = getSnapshot();\n\n {\n if (!didWarnUncachedGetSnapshot) {\n var cachedSnapshot = getSnapshot();\n\n if (!objectIs(nextSnapshot, cachedSnapshot)) {\n error('The result of getSnapshot should be cached to avoid an infinite loop');\n\n didWarnUncachedGetSnapshot = true;\n }\n }\n }\n }\n\n var prevSnapshot = (currentHook || hook).memoizedState;\n var snapshotChanged = !objectIs(prevSnapshot, nextSnapshot);\n\n if (snapshotChanged) {\n hook.memoizedState = nextSnapshot;\n markWorkInProgressReceivedUpdate();\n }\n\n var inst = hook.queue;\n updateEffect(subscribeToStore.bind(null, fiber, inst, subscribe), [subscribe]); // Whenever getSnapshot or subscribe changes, we need to check in the\n // commit phase if there was an interleaved mutation. In concurrent mode\n // this can happen all the time, but even in synchronous mode, an earlier\n // effect may have mutated the store.\n\n if (inst.getSnapshot !== getSnapshot || snapshotChanged || // Check if the subscribe function changed. We can save some memory by\n // checking whether we scheduled a subscription effect above.\n workInProgressHook !== null && workInProgressHook.memoizedState.tag & HasEffect) {\n fiber.flags |= Passive$1;\n pushEffect(HasEffect | Passive, updateStoreInstance.bind(null, fiber, inst, nextSnapshot, getSnapshot), createEffectInstance(), null); // Unless we're rendering a blocking lane, schedule a consistency check.\n // Right before committing, we will walk the tree and check if any of the\n // stores were mutated.\n\n var root = getWorkInProgressRoot();\n\n if (root === null) {\n throw new Error('Expected a work-in-progress root. This is a bug in React. Please file an issue.');\n }\n\n if (!isHydrating && !includesBlockingLane(root, renderLanes)) {\n pushStoreConsistencyCheck(fiber, getSnapshot, nextSnapshot);\n }\n }\n\n return nextSnapshot;\n}\n\nfunction pushStoreConsistencyCheck(fiber, getSnapshot, renderedSnapshot) {\n fiber.flags |= StoreConsistency;\n var check = {\n getSnapshot: getSnapshot,\n value: renderedSnapshot\n };\n var componentUpdateQueue = currentlyRenderingFiber$1.updateQueue;\n\n if (componentUpdateQueue === null) {\n componentUpdateQueue = createFunctionComponentUpdateQueue();\n currentlyRenderingFiber$1.updateQueue = componentUpdateQueue;\n componentUpdateQueue.stores = [check];\n } else {\n var stores = componentUpdateQueue.stores;\n\n if (stores === null) {\n componentUpdateQueue.stores = [check];\n } else {\n stores.push(check);\n }\n }\n}\n\nfunction updateStoreInstance(fiber, inst, nextSnapshot, getSnapshot) {\n // These are updated in the passive phase\n inst.value = nextSnapshot;\n inst.getSnapshot = getSnapshot; // Something may have been mutated in between render and commit. This could\n // have been in an event that fired before the passive effects, or it could\n // have been in a layout effect. In that case, we would have used the old\n // snapsho and getSnapshot values to bail out. We need to check one more time.\n\n if (checkIfSnapshotChanged(inst)) {\n // Force a re-render.\n forceStoreRerender(fiber);\n }\n}\n\nfunction subscribeToStore(fiber, inst, subscribe) {\n var handleStoreChange = function () {\n // The store changed. Check if the snapshot changed since the last time we\n // read from the store.\n if (checkIfSnapshotChanged(inst)) {\n // Force a re-render.\n forceStoreRerender(fiber);\n }\n }; // Subscribe to the store and return a clean-up function.\n\n\n return subscribe(handleStoreChange);\n}\n\nfunction checkIfSnapshotChanged(inst) {\n var latestGetSnapshot = inst.getSnapshot;\n var prevValue = inst.value;\n\n try {\n var nextValue = latestGetSnapshot();\n return !objectIs(prevValue, nextValue);\n } catch (error) {\n return true;\n }\n}\n\nfunction forceStoreRerender(fiber) {\n var root = enqueueConcurrentRenderForLane(fiber, SyncLane);\n\n if (root !== null) {\n scheduleUpdateOnFiber(root, fiber, SyncLane);\n }\n}\n\nfunction mountStateImpl(initialState) {\n var hook = mountWorkInProgressHook();\n\n if (typeof initialState === 'function') {\n var initialStateInitializer = initialState; // $FlowFixMe[incompatible-use]: Flow doesn't like mixed types\n\n initialState = initialStateInitializer();\n\n if (shouldDoubleInvokeUserFnsInHooksDEV) {\n setIsStrictModeForDevtools(true); // $FlowFixMe[incompatible-use]: Flow doesn't like mixed types\n\n initialStateInitializer();\n setIsStrictModeForDevtools(false);\n }\n }\n\n hook.memoizedState = hook.baseState = initialState;\n var queue = {\n pending: null,\n lanes: NoLanes,\n dispatch: null,\n lastRenderedReducer: basicStateReducer,\n lastRenderedState: initialState\n };\n hook.queue = queue;\n return hook;\n}\n\nfunction mountState(initialState) {\n var hook = mountStateImpl(initialState);\n var queue = hook.queue;\n var dispatch = dispatchSetState.bind(null, currentlyRenderingFiber$1, queue);\n queue.dispatch = dispatch;\n return [hook.memoizedState, dispatch];\n}\n\nfunction updateState(initialState) {\n return updateReducer(basicStateReducer);\n}\n\nfunction rerenderState(initialState) {\n return rerenderReducer(basicStateReducer);\n}\n\nfunction mountOptimistic(passthrough, reducer) {\n var hook = mountWorkInProgressHook();\n hook.memoizedState = hook.baseState = passthrough;\n var queue = {\n pending: null,\n lanes: NoLanes,\n dispatch: null,\n // Optimistic state does not use the eager update optimization.\n lastRenderedReducer: null,\n lastRenderedState: null\n };\n hook.queue = queue; // This is different than the normal setState function.\n\n var dispatch = dispatchOptimisticSetState.bind(null, currentlyRenderingFiber$1, true, queue);\n queue.dispatch = dispatch;\n return [passthrough, dispatch];\n}\n\nfunction updateOptimistic(passthrough, reducer) {\n var hook = updateWorkInProgressHook();\n return updateOptimisticImpl(hook, currentHook, passthrough, reducer);\n}\n\nfunction updateOptimisticImpl(hook, current, passthrough, reducer) {\n // Optimistic updates are always rebased on top of the latest value passed in\n // as an argument. It's called a passthrough because if there are no pending\n // updates, it will be returned as-is.\n //\n // Reset the base state to the passthrough. Future updates will be applied\n // on top of this.\n hook.baseState = passthrough; // If a reducer is not provided, default to the same one used by useState.\n\n var resolvedReducer = typeof reducer === 'function' ? reducer : basicStateReducer;\n return updateReducerImpl(hook, currentHook, resolvedReducer);\n}\n\nfunction rerenderOptimistic(passthrough, reducer) {\n // Unlike useState, useOptimistic doesn't support render phase updates.\n // Also unlike useState, we need to replay all pending updates again in case\n // the passthrough value changed.\n //\n // So instead of a forked re-render implementation that knows how to handle\n // render phase udpates, we can use the same implementation as during a\n // regular mount or update.\n var hook = updateWorkInProgressHook();\n\n if (currentHook !== null) {\n // This is an update. Process the update queue.\n return updateOptimisticImpl(hook, currentHook, passthrough, reducer);\n } // This is a mount. No updates to process.\n // Reset the base state to the passthrough. Future updates will be applied\n // on top of this.\n\n\n hook.baseState = passthrough;\n var dispatch = hook.queue.dispatch;\n return [passthrough, dispatch];\n} // useFormState actions run sequentially, because each action receives the\n// previous state as an argument. We store pending actions on a queue.\n\n\nfunction dispatchFormState(fiber, actionQueue, setPendingState, setState, payload) {\n if (isRenderPhaseUpdate(fiber)) {\n throw new Error('Cannot update form state while rendering.');\n }\n\n var last = actionQueue.pending;\n\n if (last === null) {\n // There are no pending actions; this is the first one. We can run\n // it immediately.\n var newLast = {\n payload: payload,\n next: null // circular\n\n };\n newLast.next = actionQueue.pending = newLast;\n runFormStateAction(actionQueue, setPendingState, setState, payload);\n } else {\n // There's already an action running. Add to the queue.\n var first = last.next;\n var _newLast = {\n payload: payload,\n next: first\n };\n actionQueue.pending = last.next = _newLast;\n }\n}\n\nfunction runFormStateAction(actionQueue, setPendingState, setState, payload) {\n var action = actionQueue.action;\n var prevState = actionQueue.state; // This is a fork of startTransition\n\n var prevTransition = ReactCurrentBatchConfig$3.transition;\n var currentTransition = {\n _callbacks: new Set()\n };\n ReactCurrentBatchConfig$3.transition = currentTransition;\n\n {\n ReactCurrentBatchConfig$3.transition._updatedFibers = new Set();\n } // Optimistically update the pending state, similar to useTransition.\n // This will be reverted automatically when all actions are finished.\n\n\n setPendingState(true);\n\n try {\n var returnValue = action(prevState, payload);\n\n if (returnValue !== null && typeof returnValue === 'object' && // $FlowFixMe[method-unbinding]\n typeof returnValue.then === 'function') {\n var thenable = returnValue;\n notifyTransitionCallbacks(currentTransition, thenable); // Attach a listener to read the return state of the action. As soon as\n // this resolves, we can run the next action in the sequence.\n\n thenable.then(function (nextState) {\n actionQueue.state = nextState;\n finishRunningFormStateAction(actionQueue, setPendingState, setState);\n }, function () {\n return finishRunningFormStateAction(actionQueue, setPendingState, setState);\n });\n setState(thenable);\n } else {\n setState(returnValue);\n var nextState = returnValue;\n actionQueue.state = nextState;\n finishRunningFormStateAction(actionQueue, setPendingState, setState);\n }\n } catch (error) {\n // This is a trick to get the `useFormState` hook to rethrow the error.\n // When it unwraps the thenable with the `use` algorithm, the error\n // will be thrown.\n var rejectedThenable = {\n then: function () {},\n status: 'rejected',\n reason: error // $FlowFixMe: Not sure why this doesn't work\n\n };\n setState(rejectedThenable);\n finishRunningFormStateAction(actionQueue, setPendingState, setState);\n } finally {\n ReactCurrentBatchConfig$3.transition = prevTransition;\n\n {\n if (prevTransition === null && currentTransition._updatedFibers) {\n var updatedFibersCount = currentTransition._updatedFibers.size;\n\n currentTransition._updatedFibers.clear();\n\n if (updatedFibersCount > 10) {\n warn('Detected a large number of updates inside startTransition. ' + 'If this is due to a subscription please re-write it to use React provided hooks. ' + 'Otherwise concurrent mode guarantees are off the table.');\n }\n }\n }\n }\n}\n\nfunction finishRunningFormStateAction(actionQueue, setPendingState, setState) {\n // The action finished running. Pop it from the queue and run the next pending\n // action, if there are any.\n var last = actionQueue.pending;\n\n if (last !== null) {\n var first = last.next;\n\n if (first === last) {\n // This was the last action in the queue.\n actionQueue.pending = null;\n } else {\n // Remove the first node from the circular queue.\n var next = first.next;\n last.next = next; // Run the next action.\n\n runFormStateAction(actionQueue, setPendingState, setState, next.payload);\n }\n }\n}\n\nfunction formStateReducer(oldState, newState) {\n return newState;\n}\n\nfunction mountFormState(action, initialStateProp, permalink) {\n var initialState = initialStateProp;\n\n if (getIsHydrating()) {\n var root = getWorkInProgressRoot();\n var ssrFormState = root.formState; // If a formState option was passed to the root, there are form state\n // markers that we need to hydrate. These indicate whether the form state\n // matches this hook instance.\n\n if (ssrFormState !== null) {\n var isMatching = tryToClaimNextHydratableFormMarkerInstance();\n\n if (isMatching) {\n initialState = ssrFormState[0];\n }\n }\n } // State hook. The state is stored in a thenable which is then unwrapped by\n // the `use` algorithm during render.\n\n\n var stateHook = mountWorkInProgressHook();\n stateHook.memoizedState = stateHook.baseState = initialState; // TODO: Typing this \"correctly\" results in recursion limit errors\n // const stateQueue: UpdateQueue<S | Awaited<S>, S | Awaited<S>> = {\n\n var stateQueue = {\n pending: null,\n lanes: NoLanes,\n dispatch: null,\n lastRenderedReducer: formStateReducer,\n lastRenderedState: initialState\n };\n stateHook.queue = stateQueue;\n var setState = dispatchSetState.bind(null, currentlyRenderingFiber$1, stateQueue);\n stateQueue.dispatch = setState; // Pending state. This is used to store the pending state of the action.\n // Tracked optimistically, like a transition pending state.\n\n var pendingStateHook = mountStateImpl(false);\n var setPendingState = dispatchOptimisticSetState.bind(null, currentlyRenderingFiber$1, false, pendingStateHook.queue); // Action queue hook. This is used to queue pending actions. The queue is\n // shared between all instances of the hook. Similar to a regular state queue,\n // but different because the actions are run sequentially, and they run in\n // an event instead of during render.\n\n var actionQueueHook = mountWorkInProgressHook();\n var actionQueue = {\n state: initialState,\n dispatch: null,\n // circular\n action: action,\n pending: null\n };\n actionQueueHook.queue = actionQueue;\n var dispatch = dispatchFormState.bind(null, currentlyRenderingFiber$1, actionQueue, setPendingState, setState);\n actionQueue.dispatch = dispatch; // Stash the action function on the memoized state of the hook. We'll use this\n // to detect when the action function changes so we can update it in\n // an effect.\n\n actionQueueHook.memoizedState = action;\n return [initialState, dispatch, false];\n}\n\nfunction updateFormState(action, initialState, permalink) {\n var stateHook = updateWorkInProgressHook();\n var currentStateHook = currentHook;\n return updateFormStateImpl(stateHook, currentStateHook, action);\n}\n\nfunction updateFormStateImpl(stateHook, currentStateHook, action, initialState, permalink) {\n var _updateReducerImpl = updateReducerImpl(stateHook, currentStateHook, formStateReducer),\n actionResult = _updateReducerImpl[0];\n\n var _updateState = updateState(),\n isPending = _updateState[0]; // This will suspend until the action finishes.\n\n\n var state = typeof actionResult === 'object' && actionResult !== null && // $FlowFixMe[method-unbinding]\n typeof actionResult.then === 'function' ? useThenable(actionResult) : actionResult;\n var actionQueueHook = updateWorkInProgressHook();\n var actionQueue = actionQueueHook.queue;\n var dispatch = actionQueue.dispatch; // Check if a new action was passed. If so, update it in an effect.\n\n var prevAction = actionQueueHook.memoizedState;\n\n if (action !== prevAction) {\n currentlyRenderingFiber$1.flags |= Passive$1;\n pushEffect(HasEffect | Passive, formStateActionEffect.bind(null, actionQueue, action), createEffectInstance(), null);\n }\n\n return [state, dispatch, isPending];\n}\n\nfunction formStateActionEffect(actionQueue, action) {\n actionQueue.action = action;\n}\n\nfunction rerenderFormState(action, initialState, permalink) {\n // Unlike useState, useFormState doesn't support render phase updates.\n // Also unlike useState, we need to replay all pending updates again in case\n // the passthrough value changed.\n //\n // So instead of a forked re-render implementation that knows how to handle\n // render phase udpates, we can use the same implementation as during a\n // regular mount or update.\n var stateHook = updateWorkInProgressHook();\n var currentStateHook = currentHook;\n\n if (currentStateHook !== null) {\n // This is an update. Process the update queue.\n return updateFormStateImpl(stateHook, currentStateHook, action);\n }\n\n updateWorkInProgressHook(); // State\n // This is a mount. No updates to process.\n\n var state = stateHook.memoizedState;\n var actionQueueHook = updateWorkInProgressHook();\n var actionQueue = actionQueueHook.queue;\n var dispatch = actionQueue.dispatch; // This may have changed during the rerender.\n\n actionQueueHook.memoizedState = action; // For mount, pending is always false.\n\n return [state, dispatch, false];\n}\n\nfunction pushEffect(tag, create, inst, deps) {\n var effect = {\n tag: tag,\n create: create,\n inst: inst,\n deps: deps,\n // Circular\n next: null\n };\n var componentUpdateQueue = currentlyRenderingFiber$1.updateQueue;\n\n if (componentUpdateQueue === null) {\n componentUpdateQueue = createFunctionComponentUpdateQueue();\n currentlyRenderingFiber$1.updateQueue = componentUpdateQueue;\n componentUpdateQueue.lastEffect = effect.next = effect;\n } else {\n var lastEffect = componentUpdateQueue.lastEffect;\n\n if (lastEffect === null) {\n componentUpdateQueue.lastEffect = effect.next = effect;\n } else {\n var firstEffect = lastEffect.next;\n lastEffect.next = effect;\n effect.next = firstEffect;\n componentUpdateQueue.lastEffect = effect;\n }\n }\n\n return effect;\n}\n\nfunction createEffectInstance() {\n return {\n destroy: undefined\n };\n}\n\nfunction mountRef(initialValue) {\n var hook = mountWorkInProgressHook();\n\n {\n var _ref2 = {\n current: initialValue\n };\n hook.memoizedState = _ref2;\n return _ref2;\n }\n}\n\nfunction updateRef(initialValue) {\n var hook = updateWorkInProgressHook();\n return hook.memoizedState;\n}\n\nfunction mountEffectImpl(fiberFlags, hookFlags, create, deps) {\n var hook = mountWorkInProgressHook();\n var nextDeps = deps === undefined ? null : deps;\n currentlyRenderingFiber$1.flags |= fiberFlags;\n hook.memoizedState = pushEffect(HasEffect | hookFlags, create, createEffectInstance(), nextDeps);\n}\n\nfunction updateEffectImpl(fiberFlags, hookFlags, create, deps) {\n var hook = updateWorkInProgressHook();\n var nextDeps = deps === undefined ? null : deps;\n var effect = hook.memoizedState;\n var inst = effect.inst; // currentHook is null on initial mount when rerendering after a render phase\n // state update or for strict mode.\n\n if (currentHook !== null) {\n if (nextDeps !== null) {\n var prevEffect = currentHook.memoizedState;\n var prevDeps = prevEffect.deps;\n\n if (areHookInputsEqual(nextDeps, prevDeps)) {\n hook.memoizedState = pushEffect(hookFlags, create, inst, nextDeps);\n return;\n }\n }\n }\n\n currentlyRenderingFiber$1.flags |= fiberFlags;\n hook.memoizedState = pushEffect(HasEffect | hookFlags, create, inst, nextDeps);\n}\n\nfunction mountEffect(create, deps) {\n if ((currentlyRenderingFiber$1.mode & StrictEffectsMode) !== NoMode && (currentlyRenderingFiber$1.mode & NoStrictPassiveEffectsMode) === NoMode) {\n mountEffectImpl(MountPassiveDev | Passive$1 | PassiveStatic, Passive, create, deps);\n } else {\n mountEffectImpl(Passive$1 | PassiveStatic, Passive, create, deps);\n }\n}\n\nfunction updateEffect(create, deps) {\n updateEffectImpl(Passive$1, Passive, create, deps);\n}\n\nfunction mountInsertionEffect(create, deps) {\n mountEffectImpl(Update, Insertion, create, deps);\n}\n\nfunction updateInsertionEffect(create, deps) {\n return updateEffectImpl(Update, Insertion, create, deps);\n}\n\nfunction mountLayoutEffect(create, deps) {\n var fiberFlags = Update | LayoutStatic;\n\n if ((currentlyRenderingFiber$1.mode & StrictEffectsMode) !== NoMode) {\n fiberFlags |= MountLayoutDev;\n }\n\n return mountEffectImpl(fiberFlags, Layout, create, deps);\n}\n\nfunction updateLayoutEffect(create, deps) {\n return updateEffectImpl(Update, Layout, create, deps);\n}\n\nfunction imperativeHandleEffect(create, ref) {\n if (typeof ref === 'function') {\n var refCallback = ref;\n var inst = create();\n refCallback(inst);\n return function () {\n refCallback(null);\n };\n } else if (ref !== null && ref !== undefined) {\n var refObject = ref;\n\n {\n if (!refObject.hasOwnProperty('current')) {\n error('Expected useImperativeHandle() first argument to either be a ' + 'ref callback or React.createRef() object. Instead received: %s.', 'an object with keys {' + Object.keys(refObject).join(', ') + '}');\n }\n }\n\n var _inst = create();\n\n refObject.current = _inst;\n return function () {\n refObject.current = null;\n };\n }\n}\n\nfunction mountImperativeHandle(ref, create, deps) {\n {\n if (typeof create !== 'function') {\n error('Expected useImperativeHandle() second argument to be a function ' + 'that creates a handle. Instead received: %s.', create !== null ? typeof create : 'null');\n }\n } // TODO: If deps are provided, should we skip comparing the ref itself?\n\n\n var effectDeps = deps !== null && deps !== undefined ? deps.concat([ref]) : null;\n var fiberFlags = Update | LayoutStatic;\n\n if ((currentlyRenderingFiber$1.mode & StrictEffectsMode) !== NoMode) {\n fiberFlags |= MountLayoutDev;\n }\n\n mountEffectImpl(fiberFlags, Layout, imperativeHandleEffect.bind(null, create, ref), effectDeps);\n}\n\nfunction updateImperativeHandle(ref, create, deps) {\n {\n if (typeof create !== 'function') {\n error('Expected useImperativeHandle() second argument to be a function ' + 'that creates a handle. Instead received: %s.', create !== null ? typeof create : 'null');\n }\n } // TODO: If deps are provided, should we skip comparing the ref itself?\n\n\n var effectDeps = deps !== null && deps !== undefined ? deps.concat([ref]) : null;\n updateEffectImpl(Update, Layout, imperativeHandleEffect.bind(null, create, ref), effectDeps);\n}\n\nfunction mountDebugValue(value, formatterFn) {// This hook is normally a no-op.\n // The react-debug-hooks package injects its own implementation\n // so that e.g. DevTools can display custom hook values.\n}\n\nvar updateDebugValue = mountDebugValue;\n\nfunction mountCallback(callback, deps) {\n var hook = mountWorkInProgressHook();\n var nextDeps = deps === undefined ? null : deps;\n hook.memoizedState = [callback, nextDeps];\n return callback;\n}\n\nfunction updateCallback(callback, deps) {\n var hook = updateWorkInProgressHook();\n var nextDeps = deps === undefined ? null : deps;\n var prevState = hook.memoizedState;\n\n if (nextDeps !== null) {\n var prevDeps = prevState[1];\n\n if (areHookInputsEqual(nextDeps, prevDeps)) {\n return prevState[0];\n }\n }\n\n hook.memoizedState = [callback, nextDeps];\n return callback;\n}\n\nfunction mountMemo(nextCreate, deps) {\n var hook = mountWorkInProgressHook();\n var nextDeps = deps === undefined ? null : deps;\n var nextValue = nextCreate();\n\n if (shouldDoubleInvokeUserFnsInHooksDEV) {\n setIsStrictModeForDevtools(true);\n nextCreate();\n setIsStrictModeForDevtools(false);\n }\n\n hook.memoizedState = [nextValue, nextDeps];\n return nextValue;\n}\n\nfunction updateMemo(nextCreate, deps) {\n var hook = updateWorkInProgressHook();\n var nextDeps = deps === undefined ? null : deps;\n var prevState = hook.memoizedState; // Assume these are defined. If they're not, areHookInputsEqual will warn.\n\n if (nextDeps !== null) {\n var prevDeps = prevState[1];\n\n if (areHookInputsEqual(nextDeps, prevDeps)) {\n return prevState[0];\n }\n }\n\n var nextValue = nextCreate();\n\n if (shouldDoubleInvokeUserFnsInHooksDEV) {\n setIsStrictModeForDevtools(true);\n nextCreate();\n setIsStrictModeForDevtools(false);\n }\n\n hook.memoizedState = [nextValue, nextDeps];\n return nextValue;\n}\n\nfunction mountDeferredValue(value, initialValue) {\n var hook = mountWorkInProgressHook();\n return mountDeferredValueImpl(hook, value);\n}\n\nfunction updateDeferredValue(value, initialValue) {\n var hook = updateWorkInProgressHook();\n var resolvedCurrentHook = currentHook;\n var prevValue = resolvedCurrentHook.memoizedState;\n return updateDeferredValueImpl(hook, prevValue, value);\n}\n\nfunction rerenderDeferredValue(value, initialValue) {\n var hook = updateWorkInProgressHook();\n\n if (currentHook === null) {\n // This is a rerender during a mount.\n return mountDeferredValueImpl(hook, value);\n } else {\n // This is a rerender during an update.\n var prevValue = currentHook.memoizedState;\n return updateDeferredValueImpl(hook, prevValue, value);\n }\n}\n\nfunction mountDeferredValueImpl(hook, value, initialValue) {\n {\n hook.memoizedState = value;\n return value;\n }\n}\n\nfunction updateDeferredValueImpl(hook, prevValue, value, initialValue) {\n if (objectIs(value, prevValue)) {\n // The incoming value is referentially identical to the currently rendered\n // value, so we can bail out quickly.\n return value;\n } else {\n // Received a new value that's different from the current value.\n // Check if we're inside a hidden tree\n if (isCurrentTreeHidden()) {\n // Revealing a prerendered tree is considered the same as mounting new\n // one, so we reuse the \"mount\" path in this case.\n var resultValue = mountDeferredValueImpl(hook, value); // Unlike during an actual mount, we need to mark this as an update if\n // the value changed.\n\n if (!objectIs(resultValue, prevValue)) {\n markWorkInProgressReceivedUpdate();\n }\n\n return resultValue;\n }\n\n var shouldDeferValue = !includesOnlyNonUrgentLanes(renderLanes);\n\n if (shouldDeferValue) {\n // This is an urgent update. Since the value has changed, keep using the\n // previous value and spawn a deferred render to update it later.\n // Schedule a deferred render\n var deferredLane = requestDeferredLane();\n currentlyRenderingFiber$1.lanes = mergeLanes(currentlyRenderingFiber$1.lanes, deferredLane);\n markSkippedUpdateLanes(deferredLane); // Reuse the previous value. We do not need to mark this as an update,\n // because we did not render a new value.\n\n return prevValue;\n } else {\n // This is not an urgent update, so we can use the latest value regardless\n // of what it is. No need to defer it.\n // Mark this as an update to prevent the fiber from bailing out.\n markWorkInProgressReceivedUpdate();\n hook.memoizedState = value;\n return value;\n }\n }\n}\n\nfunction startTransition(fiber, queue, pendingState, finishedState, callback, options) {\n var previousPriority = getCurrentUpdatePriority();\n setCurrentUpdatePriority(higherEventPriority(previousPriority, ContinuousEventPriority));\n var prevTransition = ReactCurrentBatchConfig$3.transition;\n var currentTransition = {\n _callbacks: new Set()\n };\n\n {\n // We don't really need to use an optimistic update here, because we\n // schedule a second \"revert\" update below (which we use to suspend the\n // transition until the async action scope has finished). But we'll use an\n // optimistic update anyway to make it less likely the behavior accidentally\n // diverges; for example, both an optimistic update and this one should\n // share the same lane.\n ReactCurrentBatchConfig$3.transition = currentTransition;\n dispatchOptimisticSetState(fiber, false, queue, pendingState);\n }\n\n {\n ReactCurrentBatchConfig$3.transition._updatedFibers = new Set();\n }\n\n try {\n if (enableAsyncActions) {\n var returnValue = callback(); // Check if we're inside an async action scope. If so, we'll entangle\n // this new action with the existing scope.\n //\n // If we're not already inside an async action scope, and this action is\n // async, then we'll create a new async scope.\n //\n // In the async case, the resulting render will suspend until the async\n // action scope has finished.\n\n if (returnValue !== null && typeof returnValue === 'object' && typeof returnValue.then === 'function') {\n var thenable = returnValue;\n notifyTransitionCallbacks(currentTransition, thenable); // Create a thenable that resolves to `finishedState` once the async\n // action has completed.\n\n var thenableForFinishedState = chainThenableValue(thenable, finishedState);\n dispatchSetState(fiber, queue, thenableForFinishedState);\n } else {\n dispatchSetState(fiber, queue, finishedState);\n }\n }\n } catch (error) {\n {\n // This is a trick to get the `useTransition` hook to rethrow the error.\n // When it unwraps the thenable with the `use` algorithm, the error\n // will be thrown.\n var rejectedThenable = {\n then: function () {},\n status: 'rejected',\n reason: error\n };\n dispatchSetState(fiber, queue, rejectedThenable);\n }\n } finally {\n setCurrentUpdatePriority(previousPriority);\n ReactCurrentBatchConfig$3.transition = prevTransition;\n\n {\n if (prevTransition === null && currentTransition._updatedFibers) {\n var updatedFibersCount = currentTransition._updatedFibers.size;\n\n currentTransition._updatedFibers.clear();\n\n if (updatedFibersCount > 10) {\n warn('Detected a large number of updates inside startTransition. ' + 'If this is due to a subscription please re-write it to use React provided hooks. ' + 'Otherwise concurrent mode guarantees are off the table.');\n }\n }\n }\n }\n}\n\nfunction startHostTransition(formFiber, pendingState, callback, formData) {\n\n if (formFiber.tag !== HostComponent) {\n throw new Error('Expected the form instance to be a HostComponent. This ' + 'is a bug in React.');\n }\n\n var queue;\n\n if (formFiber.memoizedState === null) {\n // Upgrade this host component fiber to be stateful. We're going to pretend\n // it was stateful all along so we can reuse most of the implementation\n // for function components and useTransition.\n //\n // Create the state hook used by TransitionAwareHostComponent. This is\n // essentially an inlined version of mountState.\n var newQueue = {\n pending: null,\n lanes: NoLanes,\n // We're going to cheat and intentionally not create a bound dispatch\n // method, because we can call it directly in startTransition.\n dispatch: null,\n lastRenderedReducer: basicStateReducer,\n lastRenderedState: NotPendingTransition\n };\n queue = newQueue;\n var stateHook = {\n memoizedState: NotPendingTransition,\n baseState: NotPendingTransition,\n baseQueue: null,\n queue: newQueue,\n next: null\n }; // Add the state hook to both fiber alternates. The idea is that the fiber\n // had this hook all along.\n\n formFiber.memoizedState = stateHook;\n var alternate = formFiber.alternate;\n\n if (alternate !== null) {\n alternate.memoizedState = stateHook;\n }\n } else {\n // This fiber was already upgraded to be stateful.\n var _stateHook = formFiber.memoizedState;\n queue = _stateHook.queue;\n }\n\n startTransition(formFiber, queue, pendingState, NotPendingTransition, // TODO: We can avoid this extra wrapper, somehow. Figure out layering\n // once more of this function is implemented.\n function () {\n return callback(formData);\n });\n}\n\nfunction mountTransition() {\n var stateHook = mountStateImpl(false); // The `start` method never changes.\n\n var start = startTransition.bind(null, currentlyRenderingFiber$1, stateHook.queue, true, false);\n var hook = mountWorkInProgressHook();\n hook.memoizedState = start;\n return [false, start];\n}\n\nfunction updateTransition() {\n var _updateState2 = updateState(),\n booleanOrThenable = _updateState2[0];\n\n var hook = updateWorkInProgressHook();\n var start = hook.memoizedState;\n var isPending = typeof booleanOrThenable === 'boolean' ? booleanOrThenable : // This will suspend until the async action scope has finished.\n useThenable(booleanOrThenable);\n return [isPending, start];\n}\n\nfunction rerenderTransition() {\n var _rerenderState = rerenderState(),\n booleanOrThenable = _rerenderState[0];\n\n var hook = updateWorkInProgressHook();\n var start = hook.memoizedState;\n var isPending = typeof booleanOrThenable === 'boolean' ? booleanOrThenable : // This will suspend until the async action scope has finished.\n useThenable(booleanOrThenable);\n return [isPending, start];\n}\n\nfunction useHostTransitionStatus() {\n\n var status = readContext(HostTransitionContext);\n return status !== null ? status : NotPendingTransition;\n}\n\nfunction mountId() {\n var hook = mountWorkInProgressHook();\n var root = getWorkInProgressRoot(); // TODO: In Fizz, id generation is specific to each server config. Maybe we\n // should do this in Fiber, too? Deferring this decision for now because\n // there's no other place to store the prefix except for an internal field on\n // the public createRoot object, which the fiber tree does not currently have\n // a reference to.\n\n var identifierPrefix = root.identifierPrefix;\n var id;\n\n if (getIsHydrating()) {\n var treeId = getTreeId(); // Use a captial R prefix for server-generated ids.\n\n id = ':' + identifierPrefix + 'R' + treeId; // Unless this is the first id at this level, append a number at the end\n // that represents the position of this useId hook among all the useId\n // hooks for this fiber.\n\n var localId = localIdCounter++;\n\n if (localId > 0) {\n id += 'H' + localId.toString(32);\n }\n\n id += ':';\n } else {\n // Use a lowercase r prefix for client-generated ids.\n var globalClientId = globalClientIdCounter++;\n id = ':' + identifierPrefix + 'r' + globalClientId.toString(32) + ':';\n }\n\n hook.memoizedState = id;\n return id;\n}\n\nfunction updateId() {\n var hook = updateWorkInProgressHook();\n var id = hook.memoizedState;\n return id;\n}\n\nfunction mountRefresh() {\n var hook = mountWorkInProgressHook();\n var refresh = hook.memoizedState = refreshCache.bind(null, currentlyRenderingFiber$1);\n return refresh;\n}\n\nfunction updateRefresh() {\n var hook = updateWorkInProgressHook();\n return hook.memoizedState;\n}\n\nfunction refreshCache(fiber, seedKey, seedValue) {\n // TODO: Consider warning if the refresh is at discrete priority, or if we\n // otherwise suspect that it wasn't batched properly.\n\n\n var provider = fiber.return;\n\n while (provider !== null) {\n switch (provider.tag) {\n case CacheComponent:\n case HostRoot:\n {\n // Schedule an update on the cache boundary to trigger a refresh.\n var lane = requestUpdateLane(provider);\n var refreshUpdate = createUpdate(lane);\n var root = enqueueUpdate(provider, refreshUpdate, lane);\n\n if (root !== null) {\n scheduleUpdateOnFiber(root, provider, lane);\n entangleTransitions(root, provider, lane);\n } // TODO: If a refresh never commits, the new cache created here must be\n // released. A simple case is start refreshing a cache boundary, but then\n // unmount that boundary before the refresh completes.\n\n\n var seededCache = createCache();\n\n if (seedKey !== null && seedKey !== undefined && root !== null) {\n {\n {\n error('The seed argument is not enabled outside experimental channels.');\n }\n }\n }\n\n var payload = {\n cache: seededCache\n };\n refreshUpdate.payload = payload;\n return;\n }\n }\n\n provider = provider.return;\n } // TODO: Warn if unmounted?\n\n}\n\nfunction dispatchReducerAction(fiber, queue, action) {\n {\n if (typeof arguments[3] === 'function') {\n error(\"State updates from the useState() and useReducer() Hooks don't support the \" + 'second callback argument. To execute a side effect after ' + 'rendering, declare it in the component body with useEffect().');\n }\n }\n\n var lane = requestUpdateLane(fiber);\n var update = {\n lane: lane,\n revertLane: NoLane,\n action: action,\n hasEagerState: false,\n eagerState: null,\n next: null\n };\n\n if (isRenderPhaseUpdate(fiber)) {\n enqueueRenderPhaseUpdate(queue, update);\n } else {\n var root = enqueueConcurrentHookUpdate(fiber, queue, update, lane);\n\n if (root !== null) {\n scheduleUpdateOnFiber(root, fiber, lane);\n entangleTransitionUpdate(root, queue, lane);\n }\n }\n\n markUpdateInDevTools(fiber, lane);\n}\n\nfunction dispatchSetState(fiber, queue, action) {\n {\n if (typeof arguments[3] === 'function') {\n error(\"State updates from the useState() and useReducer() Hooks don't support the \" + 'second callback argument. To execute a side effect after ' + 'rendering, declare it in the component body with useEffect().');\n }\n }\n\n var lane = requestUpdateLane(fiber);\n var update = {\n lane: lane,\n revertLane: NoLane,\n action: action,\n hasEagerState: false,\n eagerState: null,\n next: null\n };\n\n if (isRenderPhaseUpdate(fiber)) {\n enqueueRenderPhaseUpdate(queue, update);\n } else {\n var alternate = fiber.alternate;\n\n if (fiber.lanes === NoLanes && (alternate === null || alternate.lanes === NoLanes)) {\n // The queue is currently empty, which means we can eagerly compute the\n // next state before entering the render phase. If the new state is the\n // same as the current state, we may be able to bail out entirely.\n var lastRenderedReducer = queue.lastRenderedReducer;\n\n if (lastRenderedReducer !== null) {\n var prevDispatcher;\n\n {\n prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n }\n\n try {\n var currentState = queue.lastRenderedState;\n var eagerState = lastRenderedReducer(currentState, action); // Stash the eagerly computed state, and the reducer used to compute\n // it, on the update object. If the reducer hasn't changed by the\n // time we enter the render phase, then the eager state can be used\n // without calling the reducer again.\n\n update.hasEagerState = true;\n update.eagerState = eagerState;\n\n if (objectIs(eagerState, currentState)) {\n // Fast path. We can bail out without scheduling React to re-render.\n // It's still possible that we'll need to rebase this update later,\n // if the component re-renders for a different reason and by that\n // time the reducer has changed.\n // TODO: Do we still need to entangle transitions in this case?\n enqueueConcurrentHookUpdateAndEagerlyBailout(fiber, queue, update);\n return;\n }\n } catch (error) {// Suppress the error. It will throw again in the render phase.\n } finally {\n {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n }\n }\n }\n\n var root = enqueueConcurrentHookUpdate(fiber, queue, update, lane);\n\n if (root !== null) {\n scheduleUpdateOnFiber(root, fiber, lane);\n entangleTransitionUpdate(root, queue, lane);\n }\n }\n\n markUpdateInDevTools(fiber, lane);\n}\n\nfunction dispatchOptimisticSetState(fiber, throwIfDuringRender, queue, action) {\n var transition = requestCurrentTransition();\n\n {\n if (transition === null) {\n // An optimistic update occurred, but startTransition is not on the stack.\n // There are two likely scenarios.\n // One possibility is that the optimistic update is triggered by a regular\n // event handler (e.g. `onSubmit`) instead of an action. This is a mistake\n // and we will warn.\n // The other possibility is the optimistic update is inside an async\n // action, but after an `await`. In this case, we can make it \"just work\"\n // by associating the optimistic update with the pending async action.\n // Technically it's possible that the optimistic update is unrelated to\n // the pending action, but we don't have a way of knowing this for sure\n // because browsers currently do not provide a way to track async scope.\n // (The AsyncContext proposal, if it lands, will solve this in the\n // future.) However, this is no different than the problem of unrelated\n // transitions being grouped together — it's not wrong per se, but it's\n // not ideal.\n // Once AsyncContext starts landing in browsers, we will provide better\n // warnings in development for these cases.\n if (peekEntangledActionLane() !== NoLane) ; else {\n // There's no pending async action. The most likely cause is that we're\n // inside a regular event handler (e.g. onSubmit) instead of an action.\n error('An optimistic state update occurred outside a transition or ' + 'action. To fix, move the update to an action, or wrap ' + 'with startTransition.');\n }\n }\n }\n\n var update = {\n // An optimistic update commits synchronously.\n lane: SyncLane,\n // After committing, the optimistic update is \"reverted\" using the same\n // lane as the transition it's associated with.\n revertLane: requestTransitionLane(),\n action: action,\n hasEagerState: false,\n eagerState: null,\n next: null\n };\n\n if (isRenderPhaseUpdate(fiber)) {\n // When calling startTransition during render, this warns instead of\n // throwing because throwing would be a breaking change. setOptimisticState\n // is a new API so it's OK to throw.\n if (throwIfDuringRender) {\n throw new Error('Cannot update optimistic state while rendering.');\n } else {\n // startTransition was called during render. We don't need to do anything\n // besides warn here because the render phase update would be overidden by\n // the second update, anyway. We can remove this branch and make it throw\n // in a future release.\n {\n error('Cannot call startTransition while rendering.');\n }\n }\n } else {\n var root = enqueueConcurrentHookUpdate(fiber, queue, update, SyncLane);\n\n if (root !== null) {\n // NOTE: The optimistic update implementation assumes that the transition\n // will never be attempted before the optimistic update. This currently\n // holds because the optimistic update is always synchronous. If we ever\n // change that, we'll need to account for this.\n scheduleUpdateOnFiber(root, fiber, SyncLane); // Optimistic updates are always synchronous, so we don't need to call\n // entangleTransitionUpdate here.\n }\n }\n\n markUpdateInDevTools(fiber, SyncLane);\n}\n\nfunction isRenderPhaseUpdate(fiber) {\n var alternate = fiber.alternate;\n return fiber === currentlyRenderingFiber$1 || alternate !== null && alternate === currentlyRenderingFiber$1;\n}\n\nfunction enqueueRenderPhaseUpdate(queue, update) {\n // This is a render phase update. Stash it in a lazily-created map of\n // queue -> linked list of updates. After this render pass, we'll restart\n // and apply the stashed updates on top of the work-in-progress hook.\n didScheduleRenderPhaseUpdateDuringThisPass = didScheduleRenderPhaseUpdate = true;\n var pending = queue.pending;\n\n if (pending === null) {\n // This is the first update. Create a circular list.\n update.next = update;\n } else {\n update.next = pending.next;\n pending.next = update;\n }\n\n queue.pending = update;\n} // TODO: Move to ReactFiberConcurrentUpdates?\n\n\nfunction entangleTransitionUpdate(root, queue, lane) {\n if (isTransitionLane(lane)) {\n var queueLanes = queue.lanes; // If any entangled lanes are no longer pending on the root, then they\n // must have finished. We can remove them from the shared queue, which\n // represents a superset of the actually pending lanes. In some cases we\n // may entangle more than we need to, but that's OK. In fact it's worse if\n // we *don't* entangle when we should.\n\n queueLanes = intersectLanes(queueLanes, root.pendingLanes); // Entangle the new transition lane with the other transition lanes.\n\n var newQueueLanes = mergeLanes(queueLanes, lane);\n queue.lanes = newQueueLanes; // Even if queue.lanes already include lane, we don't know for certain if\n // the lane finished since the last time we entangled it. So we need to\n // entangle it again, just to be sure.\n\n markRootEntangled(root, newQueueLanes);\n }\n}\n\nfunction markUpdateInDevTools(fiber, lane, action) {\n\n {\n markStateUpdateScheduled(fiber, lane);\n }\n}\n\nvar ContextOnlyDispatcher = {\n readContext: readContext,\n use: use,\n useCallback: throwInvalidHookError,\n useContext: throwInvalidHookError,\n useEffect: throwInvalidHookError,\n useImperativeHandle: throwInvalidHookError,\n useLayoutEffect: throwInvalidHookError,\n useInsertionEffect: throwInvalidHookError,\n useMemo: throwInvalidHookError,\n useReducer: throwInvalidHookError,\n useRef: throwInvalidHookError,\n useState: throwInvalidHookError,\n useDebugValue: throwInvalidHookError,\n useDeferredValue: throwInvalidHookError,\n useTransition: throwInvalidHookError,\n useSyncExternalStore: throwInvalidHookError,\n useId: throwInvalidHookError\n};\n\n{\n ContextOnlyDispatcher.useCacheRefresh = throwInvalidHookError;\n}\n\n{\n ContextOnlyDispatcher.useHostTransitionStatus = throwInvalidHookError;\n ContextOnlyDispatcher.useFormState = throwInvalidHookError;\n}\n\n{\n ContextOnlyDispatcher.useOptimistic = throwInvalidHookError;\n}\n\nvar HooksDispatcherOnMountInDEV = null;\nvar HooksDispatcherOnMountWithHookTypesInDEV = null;\nvar HooksDispatcherOnUpdateInDEV = null;\nvar HooksDispatcherOnRerenderInDEV = null;\nvar InvalidNestedHooksDispatcherOnMountInDEV = null;\nvar InvalidNestedHooksDispatcherOnUpdateInDEV = null;\nvar InvalidNestedHooksDispatcherOnRerenderInDEV = null;\n\n{\n var warnInvalidContextAccess = function () {\n error('Context can only be read while React is rendering. ' + 'In classes, you can read it in the render method or getDerivedStateFromProps. ' + 'In function components, you can read it directly in the function body, but not ' + 'inside Hooks like useReducer() or useMemo().');\n };\n\n var warnInvalidHookAccess = function () {\n error('Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. ' + 'You can only call Hooks at the top level of your React function. ' + 'For more information, see ' + 'https://react.dev/link/rules-of-hooks');\n };\n\n HooksDispatcherOnMountInDEV = {\n readContext: function (context) {\n return readContext(context);\n },\n use: use,\n useCallback: function (callback, deps) {\n currentHookNameInDev = 'useCallback';\n mountHookTypesDev();\n checkDepsAreArrayDev(deps);\n return mountCallback(callback, deps);\n },\n useContext: function (context) {\n currentHookNameInDev = 'useContext';\n mountHookTypesDev();\n return readContext(context);\n },\n useEffect: function (create, deps) {\n currentHookNameInDev = 'useEffect';\n mountHookTypesDev();\n checkDepsAreArrayDev(deps);\n return mountEffect(create, deps);\n },\n useImperativeHandle: function (ref, create, deps) {\n currentHookNameInDev = 'useImperativeHandle';\n mountHookTypesDev();\n checkDepsAreArrayDev(deps);\n return mountImperativeHandle(ref, create, deps);\n },\n useInsertionEffect: function (create, deps) {\n currentHookNameInDev = 'useInsertionEffect';\n mountHookTypesDev();\n checkDepsAreArrayDev(deps);\n return mountInsertionEffect(create, deps);\n },\n useLayoutEffect: function (create, deps) {\n currentHookNameInDev = 'useLayoutEffect';\n mountHookTypesDev();\n checkDepsAreArrayDev(deps);\n return mountLayoutEffect(create, deps);\n },\n useMemo: function (create, deps) {\n currentHookNameInDev = 'useMemo';\n mountHookTypesDev();\n checkDepsAreArrayDev(deps);\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n try {\n return mountMemo(create, deps);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useReducer: function (reducer, initialArg, init) {\n currentHookNameInDev = 'useReducer';\n mountHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n try {\n return mountReducer(reducer, initialArg, init);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useRef: function (initialValue) {\n currentHookNameInDev = 'useRef';\n mountHookTypesDev();\n return mountRef(initialValue);\n },\n useState: function (initialState) {\n currentHookNameInDev = 'useState';\n mountHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n try {\n return mountState(initialState);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useDebugValue: function (value, formatterFn) {\n currentHookNameInDev = 'useDebugValue';\n mountHookTypesDev();\n return mountDebugValue();\n },\n useDeferredValue: function (value, initialValue) {\n currentHookNameInDev = 'useDeferredValue';\n mountHookTypesDev();\n return mountDeferredValue(value);\n },\n useTransition: function () {\n currentHookNameInDev = 'useTransition';\n mountHookTypesDev();\n return mountTransition();\n },\n useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {\n currentHookNameInDev = 'useSyncExternalStore';\n mountHookTypesDev();\n return mountSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);\n },\n useId: function () {\n currentHookNameInDev = 'useId';\n mountHookTypesDev();\n return mountId();\n }\n };\n\n {\n HooksDispatcherOnMountInDEV.useCacheRefresh = function useCacheRefresh() {\n currentHookNameInDev = 'useCacheRefresh';\n mountHookTypesDev();\n return mountRefresh();\n };\n }\n\n {\n HooksDispatcherOnMountInDEV.useHostTransitionStatus = useHostTransitionStatus;\n\n HooksDispatcherOnMountInDEV.useFormState = function useFormState(action, initialState, permalink) {\n currentHookNameInDev = 'useFormState';\n mountHookTypesDev();\n return mountFormState(action, initialState);\n };\n }\n\n {\n HooksDispatcherOnMountInDEV.useOptimistic = function useOptimistic(passthrough, reducer) {\n currentHookNameInDev = 'useOptimistic';\n mountHookTypesDev();\n return mountOptimistic(passthrough);\n };\n }\n\n HooksDispatcherOnMountWithHookTypesInDEV = {\n readContext: function (context) {\n return readContext(context);\n },\n use: use,\n useCallback: function (callback, deps) {\n currentHookNameInDev = 'useCallback';\n updateHookTypesDev();\n return mountCallback(callback, deps);\n },\n useContext: function (context) {\n currentHookNameInDev = 'useContext';\n updateHookTypesDev();\n return readContext(context);\n },\n useEffect: function (create, deps) {\n currentHookNameInDev = 'useEffect';\n updateHookTypesDev();\n return mountEffect(create, deps);\n },\n useImperativeHandle: function (ref, create, deps) {\n currentHookNameInDev = 'useImperativeHandle';\n updateHookTypesDev();\n return mountImperativeHandle(ref, create, deps);\n },\n useInsertionEffect: function (create, deps) {\n currentHookNameInDev = 'useInsertionEffect';\n updateHookTypesDev();\n return mountInsertionEffect(create, deps);\n },\n useLayoutEffect: function (create, deps) {\n currentHookNameInDev = 'useLayoutEffect';\n updateHookTypesDev();\n return mountLayoutEffect(create, deps);\n },\n useMemo: function (create, deps) {\n currentHookNameInDev = 'useMemo';\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n try {\n return mountMemo(create, deps);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useReducer: function (reducer, initialArg, init) {\n currentHookNameInDev = 'useReducer';\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n try {\n return mountReducer(reducer, initialArg, init);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useRef: function (initialValue) {\n currentHookNameInDev = 'useRef';\n updateHookTypesDev();\n return mountRef(initialValue);\n },\n useState: function (initialState) {\n currentHookNameInDev = 'useState';\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n try {\n return mountState(initialState);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useDebugValue: function (value, formatterFn) {\n currentHookNameInDev = 'useDebugValue';\n updateHookTypesDev();\n return mountDebugValue();\n },\n useDeferredValue: function (value, initialValue) {\n currentHookNameInDev = 'useDeferredValue';\n updateHookTypesDev();\n return mountDeferredValue(value);\n },\n useTransition: function () {\n currentHookNameInDev = 'useTransition';\n updateHookTypesDev();\n return mountTransition();\n },\n useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {\n currentHookNameInDev = 'useSyncExternalStore';\n updateHookTypesDev();\n return mountSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);\n },\n useId: function () {\n currentHookNameInDev = 'useId';\n updateHookTypesDev();\n return mountId();\n }\n };\n\n {\n HooksDispatcherOnMountWithHookTypesInDEV.useCacheRefresh = function useCacheRefresh() {\n currentHookNameInDev = 'useCacheRefresh';\n updateHookTypesDev();\n return mountRefresh();\n };\n }\n\n {\n HooksDispatcherOnMountWithHookTypesInDEV.useHostTransitionStatus = useHostTransitionStatus;\n\n HooksDispatcherOnMountWithHookTypesInDEV.useFormState = function useFormState(action, initialState, permalink) {\n currentHookNameInDev = 'useFormState';\n updateHookTypesDev();\n return mountFormState(action, initialState);\n };\n }\n\n {\n HooksDispatcherOnMountWithHookTypesInDEV.useOptimistic = function useOptimistic(passthrough, reducer) {\n currentHookNameInDev = 'useOptimistic';\n updateHookTypesDev();\n return mountOptimistic(passthrough);\n };\n }\n\n HooksDispatcherOnUpdateInDEV = {\n readContext: function (context) {\n return readContext(context);\n },\n use: use,\n useCallback: function (callback, deps) {\n currentHookNameInDev = 'useCallback';\n updateHookTypesDev();\n return updateCallback(callback, deps);\n },\n useContext: function (context) {\n currentHookNameInDev = 'useContext';\n updateHookTypesDev();\n return readContext(context);\n },\n useEffect: function (create, deps) {\n currentHookNameInDev = 'useEffect';\n updateHookTypesDev();\n return updateEffect(create, deps);\n },\n useImperativeHandle: function (ref, create, deps) {\n currentHookNameInDev = 'useImperativeHandle';\n updateHookTypesDev();\n return updateImperativeHandle(ref, create, deps);\n },\n useInsertionEffect: function (create, deps) {\n currentHookNameInDev = 'useInsertionEffect';\n updateHookTypesDev();\n return updateInsertionEffect(create, deps);\n },\n useLayoutEffect: function (create, deps) {\n currentHookNameInDev = 'useLayoutEffect';\n updateHookTypesDev();\n return updateLayoutEffect(create, deps);\n },\n useMemo: function (create, deps) {\n currentHookNameInDev = 'useMemo';\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n try {\n return updateMemo(create, deps);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useReducer: function (reducer, initialArg, init) {\n currentHookNameInDev = 'useReducer';\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n try {\n return updateReducer(reducer, initialArg, init);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useRef: function (initialValue) {\n currentHookNameInDev = 'useRef';\n updateHookTypesDev();\n return updateRef();\n },\n useState: function (initialState) {\n currentHookNameInDev = 'useState';\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n try {\n return updateState(initialState);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useDebugValue: function (value, formatterFn) {\n currentHookNameInDev = 'useDebugValue';\n updateHookTypesDev();\n return updateDebugValue();\n },\n useDeferredValue: function (value, initialValue) {\n currentHookNameInDev = 'useDeferredValue';\n updateHookTypesDev();\n return updateDeferredValue(value);\n },\n useTransition: function () {\n currentHookNameInDev = 'useTransition';\n updateHookTypesDev();\n return updateTransition();\n },\n useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {\n currentHookNameInDev = 'useSyncExternalStore';\n updateHookTypesDev();\n return updateSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);\n },\n useId: function () {\n currentHookNameInDev = 'useId';\n updateHookTypesDev();\n return updateId();\n }\n };\n\n {\n HooksDispatcherOnUpdateInDEV.useCacheRefresh = function useCacheRefresh() {\n currentHookNameInDev = 'useCacheRefresh';\n updateHookTypesDev();\n return updateRefresh();\n };\n }\n\n {\n HooksDispatcherOnUpdateInDEV.useHostTransitionStatus = useHostTransitionStatus;\n\n HooksDispatcherOnUpdateInDEV.useFormState = function useFormState(action, initialState, permalink) {\n currentHookNameInDev = 'useFormState';\n updateHookTypesDev();\n return updateFormState(action);\n };\n }\n\n {\n HooksDispatcherOnUpdateInDEV.useOptimistic = function useOptimistic(passthrough, reducer) {\n currentHookNameInDev = 'useOptimistic';\n updateHookTypesDev();\n return updateOptimistic(passthrough, reducer);\n };\n }\n\n HooksDispatcherOnRerenderInDEV = {\n readContext: function (context) {\n return readContext(context);\n },\n use: use,\n useCallback: function (callback, deps) {\n currentHookNameInDev = 'useCallback';\n updateHookTypesDev();\n return updateCallback(callback, deps);\n },\n useContext: function (context) {\n currentHookNameInDev = 'useContext';\n updateHookTypesDev();\n return readContext(context);\n },\n useEffect: function (create, deps) {\n currentHookNameInDev = 'useEffect';\n updateHookTypesDev();\n return updateEffect(create, deps);\n },\n useImperativeHandle: function (ref, create, deps) {\n currentHookNameInDev = 'useImperativeHandle';\n updateHookTypesDev();\n return updateImperativeHandle(ref, create, deps);\n },\n useInsertionEffect: function (create, deps) {\n currentHookNameInDev = 'useInsertionEffect';\n updateHookTypesDev();\n return updateInsertionEffect(create, deps);\n },\n useLayoutEffect: function (create, deps) {\n currentHookNameInDev = 'useLayoutEffect';\n updateHookTypesDev();\n return updateLayoutEffect(create, deps);\n },\n useMemo: function (create, deps) {\n currentHookNameInDev = 'useMemo';\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnRerenderInDEV;\n\n try {\n return updateMemo(create, deps);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useReducer: function (reducer, initialArg, init) {\n currentHookNameInDev = 'useReducer';\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnRerenderInDEV;\n\n try {\n return rerenderReducer(reducer, initialArg, init);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useRef: function (initialValue) {\n currentHookNameInDev = 'useRef';\n updateHookTypesDev();\n return updateRef();\n },\n useState: function (initialState) {\n currentHookNameInDev = 'useState';\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnRerenderInDEV;\n\n try {\n return rerenderState(initialState);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useDebugValue: function (value, formatterFn) {\n currentHookNameInDev = 'useDebugValue';\n updateHookTypesDev();\n return updateDebugValue();\n },\n useDeferredValue: function (value, initialValue) {\n currentHookNameInDev = 'useDeferredValue';\n updateHookTypesDev();\n return rerenderDeferredValue(value);\n },\n useTransition: function () {\n currentHookNameInDev = 'useTransition';\n updateHookTypesDev();\n return rerenderTransition();\n },\n useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {\n currentHookNameInDev = 'useSyncExternalStore';\n updateHookTypesDev();\n return updateSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);\n },\n useId: function () {\n currentHookNameInDev = 'useId';\n updateHookTypesDev();\n return updateId();\n }\n };\n\n {\n HooksDispatcherOnRerenderInDEV.useCacheRefresh = function useCacheRefresh() {\n currentHookNameInDev = 'useCacheRefresh';\n updateHookTypesDev();\n return updateRefresh();\n };\n }\n\n {\n HooksDispatcherOnRerenderInDEV.useHostTransitionStatus = useHostTransitionStatus;\n\n HooksDispatcherOnRerenderInDEV.useFormState = function useFormState(action, initialState, permalink) {\n currentHookNameInDev = 'useFormState';\n updateHookTypesDev();\n return rerenderFormState(action);\n };\n }\n\n {\n HooksDispatcherOnRerenderInDEV.useOptimistic = function useOptimistic(passthrough, reducer) {\n currentHookNameInDev = 'useOptimistic';\n updateHookTypesDev();\n return rerenderOptimistic(passthrough, reducer);\n };\n }\n\n InvalidNestedHooksDispatcherOnMountInDEV = {\n readContext: function (context) {\n warnInvalidContextAccess();\n return readContext(context);\n },\n use: function (usable) {\n warnInvalidHookAccess();\n return use(usable);\n },\n useCallback: function (callback, deps) {\n currentHookNameInDev = 'useCallback';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountCallback(callback, deps);\n },\n useContext: function (context) {\n currentHookNameInDev = 'useContext';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return readContext(context);\n },\n useEffect: function (create, deps) {\n currentHookNameInDev = 'useEffect';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountEffect(create, deps);\n },\n useImperativeHandle: function (ref, create, deps) {\n currentHookNameInDev = 'useImperativeHandle';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountImperativeHandle(ref, create, deps);\n },\n useInsertionEffect: function (create, deps) {\n currentHookNameInDev = 'useInsertionEffect';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountInsertionEffect(create, deps);\n },\n useLayoutEffect: function (create, deps) {\n currentHookNameInDev = 'useLayoutEffect';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountLayoutEffect(create, deps);\n },\n useMemo: function (create, deps) {\n currentHookNameInDev = 'useMemo';\n warnInvalidHookAccess();\n mountHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n try {\n return mountMemo(create, deps);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useReducer: function (reducer, initialArg, init) {\n currentHookNameInDev = 'useReducer';\n warnInvalidHookAccess();\n mountHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n try {\n return mountReducer(reducer, initialArg, init);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useRef: function (initialValue) {\n currentHookNameInDev = 'useRef';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountRef(initialValue);\n },\n useState: function (initialState) {\n currentHookNameInDev = 'useState';\n warnInvalidHookAccess();\n mountHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n try {\n return mountState(initialState);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useDebugValue: function (value, formatterFn) {\n currentHookNameInDev = 'useDebugValue';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountDebugValue();\n },\n useDeferredValue: function (value, initialValue) {\n currentHookNameInDev = 'useDeferredValue';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountDeferredValue(value);\n },\n useTransition: function () {\n currentHookNameInDev = 'useTransition';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountTransition();\n },\n useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {\n currentHookNameInDev = 'useSyncExternalStore';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);\n },\n useId: function () {\n currentHookNameInDev = 'useId';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountId();\n }\n };\n\n {\n InvalidNestedHooksDispatcherOnMountInDEV.useCacheRefresh = function useCacheRefresh() {\n currentHookNameInDev = 'useCacheRefresh';\n mountHookTypesDev();\n return mountRefresh();\n };\n }\n\n {\n InvalidNestedHooksDispatcherOnMountInDEV.useHostTransitionStatus = useHostTransitionStatus;\n\n InvalidNestedHooksDispatcherOnMountInDEV.useFormState = function useFormState(action, initialState, permalink) {\n currentHookNameInDev = 'useFormState';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountFormState(action, initialState);\n };\n }\n\n {\n InvalidNestedHooksDispatcherOnMountInDEV.useOptimistic = function useOptimistic(passthrough, reducer) {\n currentHookNameInDev = 'useOptimistic';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountOptimistic(passthrough);\n };\n }\n\n InvalidNestedHooksDispatcherOnUpdateInDEV = {\n readContext: function (context) {\n warnInvalidContextAccess();\n return readContext(context);\n },\n use: function (usable) {\n warnInvalidHookAccess();\n return use(usable);\n },\n useCallback: function (callback, deps) {\n currentHookNameInDev = 'useCallback';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateCallback(callback, deps);\n },\n useContext: function (context) {\n currentHookNameInDev = 'useContext';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return readContext(context);\n },\n useEffect: function (create, deps) {\n currentHookNameInDev = 'useEffect';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateEffect(create, deps);\n },\n useImperativeHandle: function (ref, create, deps) {\n currentHookNameInDev = 'useImperativeHandle';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateImperativeHandle(ref, create, deps);\n },\n useInsertionEffect: function (create, deps) {\n currentHookNameInDev = 'useInsertionEffect';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateInsertionEffect(create, deps);\n },\n useLayoutEffect: function (create, deps) {\n currentHookNameInDev = 'useLayoutEffect';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateLayoutEffect(create, deps);\n },\n useMemo: function (create, deps) {\n currentHookNameInDev = 'useMemo';\n warnInvalidHookAccess();\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n try {\n return updateMemo(create, deps);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useReducer: function (reducer, initialArg, init) {\n currentHookNameInDev = 'useReducer';\n warnInvalidHookAccess();\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n try {\n return updateReducer(reducer, initialArg, init);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useRef: function (initialValue) {\n currentHookNameInDev = 'useRef';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateRef();\n },\n useState: function (initialState) {\n currentHookNameInDev = 'useState';\n warnInvalidHookAccess();\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n try {\n return updateState(initialState);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useDebugValue: function (value, formatterFn) {\n currentHookNameInDev = 'useDebugValue';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateDebugValue();\n },\n useDeferredValue: function (value, initialValue) {\n currentHookNameInDev = 'useDeferredValue';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateDeferredValue(value);\n },\n useTransition: function () {\n currentHookNameInDev = 'useTransition';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateTransition();\n },\n useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {\n currentHookNameInDev = 'useSyncExternalStore';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);\n },\n useId: function () {\n currentHookNameInDev = 'useId';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateId();\n }\n };\n\n {\n InvalidNestedHooksDispatcherOnUpdateInDEV.useCacheRefresh = function useCacheRefresh() {\n currentHookNameInDev = 'useCacheRefresh';\n updateHookTypesDev();\n return updateRefresh();\n };\n }\n\n {\n InvalidNestedHooksDispatcherOnUpdateInDEV.useHostTransitionStatus = useHostTransitionStatus;\n\n InvalidNestedHooksDispatcherOnUpdateInDEV.useFormState = function useFormState(action, initialState, permalink) {\n currentHookNameInDev = 'useFormState';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateFormState(action);\n };\n }\n\n {\n InvalidNestedHooksDispatcherOnUpdateInDEV.useOptimistic = function useOptimistic(passthrough, reducer) {\n currentHookNameInDev = 'useOptimistic';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateOptimistic(passthrough, reducer);\n };\n }\n\n InvalidNestedHooksDispatcherOnRerenderInDEV = {\n readContext: function (context) {\n warnInvalidContextAccess();\n return readContext(context);\n },\n use: function (usable) {\n warnInvalidHookAccess();\n return use(usable);\n },\n useCallback: function (callback, deps) {\n currentHookNameInDev = 'useCallback';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateCallback(callback, deps);\n },\n useContext: function (context) {\n currentHookNameInDev = 'useContext';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return readContext(context);\n },\n useEffect: function (create, deps) {\n currentHookNameInDev = 'useEffect';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateEffect(create, deps);\n },\n useImperativeHandle: function (ref, create, deps) {\n currentHookNameInDev = 'useImperativeHandle';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateImperativeHandle(ref, create, deps);\n },\n useInsertionEffect: function (create, deps) {\n currentHookNameInDev = 'useInsertionEffect';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateInsertionEffect(create, deps);\n },\n useLayoutEffect: function (create, deps) {\n currentHookNameInDev = 'useLayoutEffect';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateLayoutEffect(create, deps);\n },\n useMemo: function (create, deps) {\n currentHookNameInDev = 'useMemo';\n warnInvalidHookAccess();\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n try {\n return updateMemo(create, deps);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useReducer: function (reducer, initialArg, init) {\n currentHookNameInDev = 'useReducer';\n warnInvalidHookAccess();\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n try {\n return rerenderReducer(reducer, initialArg, init);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useRef: function (initialValue) {\n currentHookNameInDev = 'useRef';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateRef();\n },\n useState: function (initialState) {\n currentHookNameInDev = 'useState';\n warnInvalidHookAccess();\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n try {\n return rerenderState(initialState);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useDebugValue: function (value, formatterFn) {\n currentHookNameInDev = 'useDebugValue';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateDebugValue();\n },\n useDeferredValue: function (value, initialValue) {\n currentHookNameInDev = 'useDeferredValue';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return rerenderDeferredValue(value);\n },\n useTransition: function () {\n currentHookNameInDev = 'useTransition';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return rerenderTransition();\n },\n useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {\n currentHookNameInDev = 'useSyncExternalStore';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);\n },\n useId: function () {\n currentHookNameInDev = 'useId';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateId();\n }\n };\n\n {\n InvalidNestedHooksDispatcherOnRerenderInDEV.useCacheRefresh = function useCacheRefresh() {\n currentHookNameInDev = 'useCacheRefresh';\n updateHookTypesDev();\n return updateRefresh();\n };\n }\n\n {\n InvalidNestedHooksDispatcherOnRerenderInDEV.useHostTransitionStatus = useHostTransitionStatus;\n\n InvalidNestedHooksDispatcherOnRerenderInDEV.useFormState = function useFormState(action, initialState, permalink) {\n currentHookNameInDev = 'useFormState';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return rerenderFormState(action);\n };\n }\n\n {\n InvalidNestedHooksDispatcherOnRerenderInDEV.useOptimistic = function useOptimistic(passthrough, reducer) {\n currentHookNameInDev = 'useOptimistic';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return rerenderOptimistic(passthrough, reducer);\n };\n }\n}\n\nvar now = Scheduler.unstable_now;\nvar commitTime = 0;\nvar layoutEffectStartTime = -1;\nvar profilerStartTime = -1;\nvar passiveEffectStartTime = -1;\n/**\n * Tracks whether the current update was a nested/cascading update (scheduled from a layout effect).\n *\n * The overall sequence is:\n * 1. render\n * 2. commit (and call `onRender`, `onCommit`)\n * 3. check for nested updates\n * 4. flush passive effects (and call `onPostCommit`)\n *\n * Nested updates are identified in step 3 above,\n * but step 4 still applies to the work that was just committed.\n * We use two flags to track nested updates then:\n * one tracks whether the upcoming update is a nested update,\n * and the other tracks whether the current update was a nested update.\n * The first value gets synced to the second at the start of the render phase.\n */\n\nvar currentUpdateIsNested = false;\nvar nestedUpdateScheduled = false;\n\nfunction isCurrentUpdateNested() {\n return currentUpdateIsNested;\n}\n\nfunction markNestedUpdateScheduled() {\n {\n nestedUpdateScheduled = true;\n }\n}\n\nfunction resetNestedUpdateFlag() {\n {\n currentUpdateIsNested = false;\n nestedUpdateScheduled = false;\n }\n}\n\nfunction syncNestedUpdateFlag() {\n {\n currentUpdateIsNested = nestedUpdateScheduled;\n nestedUpdateScheduled = false;\n }\n}\n\nfunction getCommitTime() {\n return commitTime;\n}\n\nfunction recordCommitTime() {\n\n commitTime = now();\n}\n\nfunction startProfilerTimer(fiber) {\n\n profilerStartTime = now();\n\n if (fiber.actualStartTime < 0) {\n fiber.actualStartTime = now();\n }\n}\n\nfunction stopProfilerTimerIfRunning(fiber) {\n\n profilerStartTime = -1;\n}\n\nfunction stopProfilerTimerIfRunningAndRecordDelta(fiber, overrideBaseTime) {\n\n if (profilerStartTime >= 0) {\n var elapsedTime = now() - profilerStartTime;\n fiber.actualDuration += elapsedTime;\n\n if (overrideBaseTime) {\n fiber.selfBaseDuration = elapsedTime;\n }\n\n profilerStartTime = -1;\n }\n}\n\nfunction recordLayoutEffectDuration(fiber) {\n\n if (layoutEffectStartTime >= 0) {\n var elapsedTime = now() - layoutEffectStartTime;\n layoutEffectStartTime = -1; // Store duration on the next nearest Profiler ancestor\n // Or the root (for the DevTools Profiler to read)\n\n var parentFiber = fiber.return;\n\n while (parentFiber !== null) {\n switch (parentFiber.tag) {\n case HostRoot:\n var root = parentFiber.stateNode;\n root.effectDuration += elapsedTime;\n return;\n\n case Profiler:\n var parentStateNode = parentFiber.stateNode;\n parentStateNode.effectDuration += elapsedTime;\n return;\n }\n\n parentFiber = parentFiber.return;\n }\n }\n}\n\nfunction recordPassiveEffectDuration(fiber) {\n\n if (passiveEffectStartTime >= 0) {\n var elapsedTime = now() - passiveEffectStartTime;\n passiveEffectStartTime = -1; // Store duration on the next nearest Profiler ancestor\n // Or the root (for the DevTools Profiler to read)\n\n var parentFiber = fiber.return;\n\n while (parentFiber !== null) {\n switch (parentFiber.tag) {\n case HostRoot:\n var root = parentFiber.stateNode;\n\n if (root !== null) {\n root.passiveEffectDuration += elapsedTime;\n }\n\n return;\n\n case Profiler:\n var parentStateNode = parentFiber.stateNode;\n\n if (parentStateNode !== null) {\n // Detached fibers have their state node cleared out.\n // In this case, the return pointer is also cleared out,\n // so we won't be able to report the time spent in this Profiler's subtree.\n parentStateNode.passiveEffectDuration += elapsedTime;\n }\n\n return;\n }\n\n parentFiber = parentFiber.return;\n }\n }\n}\n\nfunction startLayoutEffectTimer() {\n\n layoutEffectStartTime = now();\n}\n\nfunction startPassiveEffectTimer() {\n\n passiveEffectStartTime = now();\n}\n\nfunction transferActualDuration(fiber) {\n // Transfer time spent rendering these children so we don't lose it\n // after we rerender. This is used as a helper in special cases\n // where we should count the work of multiple passes.\n var child = fiber.child;\n\n while (child) {\n // $FlowFixMe[unsafe-addition] addition with possible null/undefined value\n fiber.actualDuration += child.actualDuration;\n child = child.sibling;\n }\n}\n\nfunction resolveDefaultProps(Component, baseProps) {\n if (Component && Component.defaultProps) {\n // Resolve default props. Taken from ReactElement\n var props = assign({}, baseProps);\n var defaultProps = Component.defaultProps;\n\n for (var propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n\n return props;\n }\n\n return baseProps;\n}\n\nvar fakeInternalInstance = {};\nvar didWarnAboutStateAssignmentForComponent;\nvar didWarnAboutUninitializedState;\nvar didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate;\nvar didWarnAboutLegacyLifecyclesAndDerivedState;\nvar didWarnAboutUndefinedDerivedState;\nvar didWarnAboutDirectlyAssigningPropsToState;\nvar didWarnAboutContextTypeAndContextTypes;\nvar didWarnAboutInvalidateContextType;\nvar didWarnOnInvalidCallback;\n\n{\n didWarnAboutStateAssignmentForComponent = new Set();\n didWarnAboutUninitializedState = new Set();\n didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate = new Set();\n didWarnAboutLegacyLifecyclesAndDerivedState = new Set();\n didWarnAboutDirectlyAssigningPropsToState = new Set();\n didWarnAboutUndefinedDerivedState = new Set();\n didWarnAboutContextTypeAndContextTypes = new Set();\n didWarnAboutInvalidateContextType = new Set();\n didWarnOnInvalidCallback = new Set(); // This is so gross but it's at least non-critical and can be removed if\n // it causes problems. This is meant to give a nicer error message for\n // ReactDOM15.unstable_renderSubtreeIntoContainer(reactDOM16Component,\n // ...)) which otherwise throws a \"_processChildContext is not a function\"\n // exception.\n\n Object.defineProperty(fakeInternalInstance, '_processChildContext', {\n enumerable: false,\n value: function () {\n throw new Error('_processChildContext is not available in React 16+. This likely ' + 'means you have multiple copies of React and are attempting to nest ' + 'a React 15 tree inside a React 16 tree using ' + \"unstable_renderSubtreeIntoContainer, which isn't supported. Try \" + 'to make sure you have only one copy of React (and ideally, switch ' + 'to ReactDOM.createPortal).');\n }\n });\n Object.freeze(fakeInternalInstance);\n}\n\nfunction warnOnInvalidCallback$1(callback) {\n {\n if (callback === null || typeof callback === 'function') {\n return;\n } // eslint-disable-next-line react-internal/safe-string-coercion\n\n\n var key = String(callback);\n\n if (!didWarnOnInvalidCallback.has(key)) {\n didWarnOnInvalidCallback.add(key);\n\n error('Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callback);\n }\n }\n}\n\nfunction warnOnUndefinedDerivedState(type, partialState) {\n {\n if (partialState === undefined) {\n var componentName = getComponentNameFromType(type) || 'Component';\n\n if (!didWarnAboutUndefinedDerivedState.has(componentName)) {\n didWarnAboutUndefinedDerivedState.add(componentName);\n\n error('%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. ' + 'You have returned undefined.', componentName);\n }\n }\n }\n}\n\nfunction applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, nextProps) {\n var prevState = workInProgress.memoizedState;\n var partialState = getDerivedStateFromProps(nextProps, prevState);\n\n {\n if (workInProgress.mode & StrictLegacyMode) {\n setIsStrictModeForDevtools(true);\n\n try {\n // Invoke the function an extra time to help detect side-effects.\n partialState = getDerivedStateFromProps(nextProps, prevState);\n } finally {\n setIsStrictModeForDevtools(false);\n }\n }\n\n warnOnUndefinedDerivedState(ctor, partialState);\n } // Merge the partial state and the previous state.\n\n\n var memoizedState = partialState === null || partialState === undefined ? prevState : assign({}, prevState, partialState);\n workInProgress.memoizedState = memoizedState; // Once the update queue is empty, persist the derived state onto the\n // base state.\n\n if (workInProgress.lanes === NoLanes) {\n // Queue is always non-null for classes\n var updateQueue = workInProgress.updateQueue;\n updateQueue.baseState = memoizedState;\n }\n}\n\nvar classComponentUpdater = {\n isMounted: isMounted,\n // $FlowFixMe[missing-local-annot]\n enqueueSetState: function (inst, payload, callback) {\n var fiber = get(inst);\n var lane = requestUpdateLane(fiber);\n var update = createUpdate(lane);\n update.payload = payload;\n\n if (callback !== undefined && callback !== null) {\n {\n warnOnInvalidCallback$1(callback);\n }\n\n update.callback = callback;\n }\n\n var root = enqueueUpdate(fiber, update, lane);\n\n if (root !== null) {\n scheduleUpdateOnFiber(root, fiber, lane);\n entangleTransitions(root, fiber, lane);\n }\n\n {\n markStateUpdateScheduled(fiber, lane);\n }\n },\n enqueueReplaceState: function (inst, payload, callback) {\n var fiber = get(inst);\n var lane = requestUpdateLane(fiber);\n var update = createUpdate(lane);\n update.tag = ReplaceState;\n update.payload = payload;\n\n if (callback !== undefined && callback !== null) {\n {\n warnOnInvalidCallback$1(callback);\n }\n\n update.callback = callback;\n }\n\n var root = enqueueUpdate(fiber, update, lane);\n\n if (root !== null) {\n scheduleUpdateOnFiber(root, fiber, lane);\n entangleTransitions(root, fiber, lane);\n }\n\n {\n markStateUpdateScheduled(fiber, lane);\n }\n },\n // $FlowFixMe[missing-local-annot]\n enqueueForceUpdate: function (inst, callback) {\n var fiber = get(inst);\n var lane = requestUpdateLane(fiber);\n var update = createUpdate(lane);\n update.tag = ForceUpdate;\n\n if (callback !== undefined && callback !== null) {\n {\n warnOnInvalidCallback$1(callback);\n }\n\n update.callback = callback;\n }\n\n var root = enqueueUpdate(fiber, update, lane);\n\n if (root !== null) {\n scheduleUpdateOnFiber(root, fiber, lane);\n entangleTransitions(root, fiber, lane);\n }\n\n {\n markForceUpdateScheduled(fiber, lane);\n }\n }\n};\n\nfunction checkShouldComponentUpdate(workInProgress, ctor, oldProps, newProps, oldState, newState, nextContext) {\n var instance = workInProgress.stateNode;\n\n if (typeof instance.shouldComponentUpdate === 'function') {\n var shouldUpdate = instance.shouldComponentUpdate(newProps, newState, nextContext);\n\n {\n if (workInProgress.mode & StrictLegacyMode) {\n setIsStrictModeForDevtools(true);\n\n try {\n // Invoke the function an extra time to help detect side-effects.\n shouldUpdate = instance.shouldComponentUpdate(newProps, newState, nextContext);\n } finally {\n setIsStrictModeForDevtools(false);\n }\n }\n\n if (shouldUpdate === undefined) {\n error('%s.shouldComponentUpdate(): Returned undefined instead of a ' + 'boolean value. Make sure to return true or false.', getComponentNameFromType(ctor) || 'Component');\n }\n }\n\n return shouldUpdate;\n }\n\n if (ctor.prototype && ctor.prototype.isPureReactComponent) {\n return !shallowEqual(oldProps, newProps) || !shallowEqual(oldState, newState);\n }\n\n return true;\n}\n\nfunction checkClassInstance(workInProgress, ctor, newProps) {\n var instance = workInProgress.stateNode;\n\n {\n var name = getComponentNameFromType(ctor) || 'Component';\n var renderPresent = instance.render;\n\n if (!renderPresent) {\n if (ctor.prototype && typeof ctor.prototype.render === 'function') {\n error('No `render` method found on the %s ' + 'instance: did you accidentally return an object from the constructor?', name);\n } else {\n error('No `render` method found on the %s ' + 'instance: you may have forgotten to define `render`.', name);\n }\n }\n\n if (instance.getInitialState && !instance.getInitialState.isReactClassApproved && !instance.state) {\n error('getInitialState was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Did you mean to define a state property instead?', name);\n }\n\n if (instance.getDefaultProps && !instance.getDefaultProps.isReactClassApproved) {\n error('getDefaultProps was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Use a static property to define defaultProps instead.', name);\n }\n\n if (instance.propTypes) {\n error('propTypes was defined as an instance property on %s. Use a static ' + 'property to define propTypes instead.', name);\n }\n\n if (instance.contextType) {\n error('contextType was defined as an instance property on %s. Use a static ' + 'property to define contextType instead.', name);\n }\n\n {\n if (instance.contextTypes) {\n error('contextTypes was defined as an instance property on %s. Use a static ' + 'property to define contextTypes instead.', name);\n }\n\n if (ctor.contextType && ctor.contextTypes && !didWarnAboutContextTypeAndContextTypes.has(ctor)) {\n didWarnAboutContextTypeAndContextTypes.add(ctor);\n\n error('%s declares both contextTypes and contextType static properties. ' + 'The legacy contextTypes property will be ignored.', name);\n }\n }\n\n if (typeof instance.componentShouldUpdate === 'function') {\n error('%s has a method called ' + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + 'The name is phrased as a question because the function is ' + 'expected to return a value.', name);\n }\n\n if (ctor.prototype && ctor.prototype.isPureReactComponent && typeof instance.shouldComponentUpdate !== 'undefined') {\n error('%s has a method called shouldComponentUpdate(). ' + 'shouldComponentUpdate should not be used when extending React.PureComponent. ' + 'Please extend React.Component if shouldComponentUpdate is used.', getComponentNameFromType(ctor) || 'A pure component');\n }\n\n if (typeof instance.componentDidUnmount === 'function') {\n error('%s has a method called ' + 'componentDidUnmount(). But there is no such lifecycle method. ' + 'Did you mean componentWillUnmount()?', name);\n }\n\n if (typeof instance.componentDidReceiveProps === 'function') {\n error('%s has a method called ' + 'componentDidReceiveProps(). But there is no such lifecycle method. ' + 'If you meant to update the state in response to changing props, ' + 'use componentWillReceiveProps(). If you meant to fetch data or ' + 'run side-effects or mutations after React has updated the UI, use componentDidUpdate().', name);\n }\n\n if (typeof instance.componentWillRecieveProps === 'function') {\n error('%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', name);\n }\n\n if (typeof instance.UNSAFE_componentWillRecieveProps === 'function') {\n error('%s has a method called ' + 'UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?', name);\n }\n\n var hasMutatedProps = instance.props !== newProps;\n\n if (instance.props !== undefined && hasMutatedProps) {\n error('When calling super() in `%s`, make sure to pass ' + \"up the same props that your component's constructor was passed.\", name);\n }\n\n if (instance.defaultProps) {\n error('Setting defaultProps as an instance property on %s is not supported and will be ignored.' + ' Instead, define defaultProps as a static property on %s.', name, name);\n }\n\n if (typeof instance.getSnapshotBeforeUpdate === 'function' && typeof instance.componentDidUpdate !== 'function' && !didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.has(ctor)) {\n didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.add(ctor);\n\n error('%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). ' + 'This component defines getSnapshotBeforeUpdate() only.', getComponentNameFromType(ctor));\n }\n\n if (typeof instance.getDerivedStateFromProps === 'function') {\n error('%s: getDerivedStateFromProps() is defined as an instance method ' + 'and will be ignored. Instead, declare it as a static method.', name);\n }\n\n if (typeof instance.getDerivedStateFromError === 'function') {\n error('%s: getDerivedStateFromError() is defined as an instance method ' + 'and will be ignored. Instead, declare it as a static method.', name);\n }\n\n if (typeof ctor.getSnapshotBeforeUpdate === 'function') {\n error('%s: getSnapshotBeforeUpdate() is defined as a static method ' + 'and will be ignored. Instead, declare it as an instance method.', name);\n }\n\n var state = instance.state;\n\n if (state && (typeof state !== 'object' || isArray(state))) {\n error('%s.state: must be set to an object or null', name);\n }\n\n if (typeof instance.getChildContext === 'function' && typeof ctor.childContextTypes !== 'object') {\n error('%s.getChildContext(): childContextTypes must be defined in order to ' + 'use getChildContext().', name);\n }\n }\n}\n\nfunction adoptClassInstance(workInProgress, instance) {\n instance.updater = classComponentUpdater;\n workInProgress.stateNode = instance; // The instance needs access to the fiber so that it can schedule updates\n\n set(instance, workInProgress);\n\n {\n instance._reactInternalInstance = fakeInternalInstance;\n }\n}\n\nfunction constructClassInstance(workInProgress, ctor, props) {\n var isLegacyContextConsumer = false;\n var unmaskedContext = emptyContextObject;\n var context = emptyContextObject;\n var contextType = ctor.contextType;\n\n {\n if ('contextType' in ctor) {\n var isValid = // Allow null for conditional declaration\n contextType === null || contextType !== undefined && contextType.$$typeof === REACT_CONTEXT_TYPE;\n\n if (!isValid && !didWarnAboutInvalidateContextType.has(ctor)) {\n didWarnAboutInvalidateContextType.add(ctor);\n var addendum = '';\n\n if (contextType === undefined) {\n addendum = ' However, it is set to undefined. ' + 'This can be caused by a typo or by mixing up named and default imports. ' + 'This can also happen due to a circular dependency, so ' + 'try moving the createContext() call to a separate file.';\n } else if (typeof contextType !== 'object') {\n addendum = ' However, it is set to a ' + typeof contextType + '.';\n } else if (contextType.$$typeof === REACT_CONSUMER_TYPE) {\n addendum = ' Did you accidentally pass the Context.Consumer instead?';\n } else {\n addendum = ' However, it is set to an object with keys {' + Object.keys(contextType).join(', ') + '}.';\n }\n\n error('%s defines an invalid contextType. ' + 'contextType should point to the Context object returned by React.createContext().%s', getComponentNameFromType(ctor) || 'Component', addendum);\n }\n }\n }\n\n if (typeof contextType === 'object' && contextType !== null) {\n context = readContext(contextType);\n } else {\n unmaskedContext = getUnmaskedContext(workInProgress, ctor, true);\n var contextTypes = ctor.contextTypes;\n isLegacyContextConsumer = contextTypes !== null && contextTypes !== undefined;\n context = isLegacyContextConsumer ? getMaskedContext(workInProgress, unmaskedContext) : emptyContextObject;\n }\n\n var instance = new ctor(props, context); // Instantiate twice to help detect side-effects.\n\n {\n if (workInProgress.mode & StrictLegacyMode) {\n setIsStrictModeForDevtools(true);\n\n try {\n instance = new ctor(props, context); // eslint-disable-line no-new\n } finally {\n setIsStrictModeForDevtools(false);\n }\n }\n }\n\n var state = workInProgress.memoizedState = instance.state !== null && instance.state !== undefined ? instance.state : null;\n adoptClassInstance(workInProgress, instance);\n\n {\n if (typeof ctor.getDerivedStateFromProps === 'function' && state === null) {\n var componentName = getComponentNameFromType(ctor) || 'Component';\n\n if (!didWarnAboutUninitializedState.has(componentName)) {\n didWarnAboutUninitializedState.add(componentName);\n\n error('`%s` uses `getDerivedStateFromProps` but its initial state is ' + '%s. This is not recommended. Instead, define the initial state by ' + 'assigning an object to `this.state` in the constructor of `%s`. ' + 'This ensures that `getDerivedStateFromProps` arguments have a consistent shape.', componentName, instance.state === null ? 'null' : 'undefined', componentName);\n }\n } // If new component APIs are defined, \"unsafe\" lifecycles won't be called.\n // Warn about these lifecycles if they are present.\n // Don't warn about react-lifecycles-compat polyfilled methods though.\n\n\n if (typeof ctor.getDerivedStateFromProps === 'function' || typeof instance.getSnapshotBeforeUpdate === 'function') {\n var foundWillMountName = null;\n var foundWillReceivePropsName = null;\n var foundWillUpdateName = null;\n\n if (typeof instance.componentWillMount === 'function' && instance.componentWillMount.__suppressDeprecationWarning !== true) {\n foundWillMountName = 'componentWillMount';\n } else if (typeof instance.UNSAFE_componentWillMount === 'function') {\n foundWillMountName = 'UNSAFE_componentWillMount';\n }\n\n if (typeof instance.componentWillReceiveProps === 'function' && instance.componentWillReceiveProps.__suppressDeprecationWarning !== true) {\n foundWillReceivePropsName = 'componentWillReceiveProps';\n } else if (typeof instance.UNSAFE_componentWillReceiveProps === 'function') {\n foundWillReceivePropsName = 'UNSAFE_componentWillReceiveProps';\n }\n\n if (typeof instance.componentWillUpdate === 'function' && instance.componentWillUpdate.__suppressDeprecationWarning !== true) {\n foundWillUpdateName = 'componentWillUpdate';\n } else if (typeof instance.UNSAFE_componentWillUpdate === 'function') {\n foundWillUpdateName = 'UNSAFE_componentWillUpdate';\n }\n\n if (foundWillMountName !== null || foundWillReceivePropsName !== null || foundWillUpdateName !== null) {\n var _componentName = getComponentNameFromType(ctor) || 'Component';\n\n var newApiName = typeof ctor.getDerivedStateFromProps === 'function' ? 'getDerivedStateFromProps()' : 'getSnapshotBeforeUpdate()';\n\n if (!didWarnAboutLegacyLifecyclesAndDerivedState.has(_componentName)) {\n didWarnAboutLegacyLifecyclesAndDerivedState.add(_componentName);\n\n error('Unsafe legacy lifecycles will not be called for components using new component APIs.\\n\\n' + '%s uses %s but also contains the following legacy lifecycles:%s%s%s\\n\\n' + 'The above lifecycles should be removed. Learn more about this warning here:\\n' + 'https://react.dev/link/unsafe-component-lifecycles', _componentName, newApiName, foundWillMountName !== null ? \"\\n \" + foundWillMountName : '', foundWillReceivePropsName !== null ? \"\\n \" + foundWillReceivePropsName : '', foundWillUpdateName !== null ? \"\\n \" + foundWillUpdateName : '');\n }\n }\n }\n } // Cache unmasked context so we can avoid recreating masked context unless necessary.\n // ReactFiberContext usually updates this cache but can't for newly-created instances.\n\n\n if (isLegacyContextConsumer) {\n cacheContext(workInProgress, unmaskedContext, context);\n }\n\n return instance;\n}\n\nfunction callComponentWillMount(workInProgress, instance) {\n var oldState = instance.state;\n\n if (typeof instance.componentWillMount === 'function') {\n instance.componentWillMount();\n }\n\n if (typeof instance.UNSAFE_componentWillMount === 'function') {\n instance.UNSAFE_componentWillMount();\n }\n\n if (oldState !== instance.state) {\n {\n error('%s.componentWillMount(): Assigning directly to this.state is ' + \"deprecated (except inside a component's \" + 'constructor). Use setState instead.', getComponentNameFromFiber(workInProgress) || 'Component');\n }\n\n classComponentUpdater.enqueueReplaceState(instance, instance.state, null);\n }\n}\n\nfunction callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext) {\n var oldState = instance.state;\n\n if (typeof instance.componentWillReceiveProps === 'function') {\n instance.componentWillReceiveProps(newProps, nextContext);\n }\n\n if (typeof instance.UNSAFE_componentWillReceiveProps === 'function') {\n instance.UNSAFE_componentWillReceiveProps(newProps, nextContext);\n }\n\n if (instance.state !== oldState) {\n {\n var componentName = getComponentNameFromFiber(workInProgress) || 'Component';\n\n if (!didWarnAboutStateAssignmentForComponent.has(componentName)) {\n didWarnAboutStateAssignmentForComponent.add(componentName);\n\n error('%s.componentWillReceiveProps(): Assigning directly to ' + \"this.state is deprecated (except inside a component's \" + 'constructor). Use setState instead.', componentName);\n }\n }\n\n classComponentUpdater.enqueueReplaceState(instance, instance.state, null);\n }\n} // Invokes the mount life-cycles on a previously never rendered instance.\n\n\nfunction mountClassInstance(workInProgress, ctor, newProps, renderLanes) {\n {\n checkClassInstance(workInProgress, ctor, newProps);\n }\n\n var instance = workInProgress.stateNode;\n instance.props = newProps;\n instance.state = workInProgress.memoizedState;\n instance.refs = {};\n initializeUpdateQueue(workInProgress);\n var contextType = ctor.contextType;\n\n if (typeof contextType === 'object' && contextType !== null) {\n instance.context = readContext(contextType);\n } else {\n var unmaskedContext = getUnmaskedContext(workInProgress, ctor, true);\n instance.context = getMaskedContext(workInProgress, unmaskedContext);\n }\n\n {\n if (instance.state === newProps) {\n var componentName = getComponentNameFromType(ctor) || 'Component';\n\n if (!didWarnAboutDirectlyAssigningPropsToState.has(componentName)) {\n didWarnAboutDirectlyAssigningPropsToState.add(componentName);\n\n error('%s: It is not recommended to assign props directly to state ' + \"because updates to props won't be reflected in state. \" + 'In most cases, it is better to use props directly.', componentName);\n }\n }\n\n if (workInProgress.mode & StrictLegacyMode) {\n ReactStrictModeWarnings.recordLegacyContextWarning(workInProgress, instance);\n }\n\n ReactStrictModeWarnings.recordUnsafeLifecycleWarnings(workInProgress, instance);\n }\n\n instance.state = workInProgress.memoizedState;\n var getDerivedStateFromProps = ctor.getDerivedStateFromProps;\n\n if (typeof getDerivedStateFromProps === 'function') {\n applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps);\n instance.state = workInProgress.memoizedState;\n } // In order to support react-lifecycles-compat polyfilled components,\n // Unsafe lifecycles should not be invoked for components using the new APIs.\n\n\n if (typeof ctor.getDerivedStateFromProps !== 'function' && typeof instance.getSnapshotBeforeUpdate !== 'function' && (typeof instance.UNSAFE_componentWillMount === 'function' || typeof instance.componentWillMount === 'function')) {\n callComponentWillMount(workInProgress, instance); // If we had additional state updates during this life-cycle, let's\n // process them now.\n\n processUpdateQueue(workInProgress, newProps, instance, renderLanes);\n suspendIfUpdateReadFromEntangledAsyncAction();\n instance.state = workInProgress.memoizedState;\n }\n\n if (typeof instance.componentDidMount === 'function') {\n workInProgress.flags |= Update | LayoutStatic;\n }\n\n if ((workInProgress.mode & StrictEffectsMode) !== NoMode) {\n workInProgress.flags |= MountLayoutDev;\n }\n}\n\nfunction resumeMountClassInstance(workInProgress, ctor, newProps, renderLanes) {\n var instance = workInProgress.stateNode;\n var oldProps = workInProgress.memoizedProps;\n instance.props = oldProps;\n var oldContext = instance.context;\n var contextType = ctor.contextType;\n var nextContext = emptyContextObject;\n\n if (typeof contextType === 'object' && contextType !== null) {\n nextContext = readContext(contextType);\n } else {\n var nextLegacyUnmaskedContext = getUnmaskedContext(workInProgress, ctor, true);\n nextContext = getMaskedContext(workInProgress, nextLegacyUnmaskedContext);\n }\n\n var getDerivedStateFromProps = ctor.getDerivedStateFromProps;\n var hasNewLifecycles = typeof getDerivedStateFromProps === 'function' || typeof instance.getSnapshotBeforeUpdate === 'function'; // Note: During these life-cycles, instance.props/instance.state are what\n // ever the previously attempted to render - not the \"current\". However,\n // during componentDidUpdate we pass the \"current\" props.\n // In order to support react-lifecycles-compat polyfilled components,\n // Unsafe lifecycles should not be invoked for components using the new APIs.\n\n if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillReceiveProps === 'function' || typeof instance.componentWillReceiveProps === 'function')) {\n if (oldProps !== newProps || oldContext !== nextContext) {\n callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext);\n }\n }\n\n resetHasForceUpdateBeforeProcessing();\n var oldState = workInProgress.memoizedState;\n var newState = instance.state = oldState;\n processUpdateQueue(workInProgress, newProps, instance, renderLanes);\n suspendIfUpdateReadFromEntangledAsyncAction();\n newState = workInProgress.memoizedState;\n\n if (oldProps === newProps && oldState === newState && !hasContextChanged() && !checkHasForceUpdateAfterProcessing()) {\n // If an update was already in progress, we should schedule an Update\n // effect even though we're bailing out, so that cWU/cDU are called.\n if (typeof instance.componentDidMount === 'function') {\n workInProgress.flags |= Update | LayoutStatic;\n }\n\n if ((workInProgress.mode & StrictEffectsMode) !== NoMode) {\n workInProgress.flags |= MountLayoutDev;\n }\n\n return false;\n }\n\n if (typeof getDerivedStateFromProps === 'function') {\n applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps);\n newState = workInProgress.memoizedState;\n }\n\n var shouldUpdate = checkHasForceUpdateAfterProcessing() || checkShouldComponentUpdate(workInProgress, ctor, oldProps, newProps, oldState, newState, nextContext);\n\n if (shouldUpdate) {\n // In order to support react-lifecycles-compat polyfilled components,\n // Unsafe lifecycles should not be invoked for components using the new APIs.\n if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillMount === 'function' || typeof instance.componentWillMount === 'function')) {\n if (typeof instance.componentWillMount === 'function') {\n instance.componentWillMount();\n }\n\n if (typeof instance.UNSAFE_componentWillMount === 'function') {\n instance.UNSAFE_componentWillMount();\n }\n }\n\n if (typeof instance.componentDidMount === 'function') {\n workInProgress.flags |= Update | LayoutStatic;\n }\n\n if ((workInProgress.mode & StrictEffectsMode) !== NoMode) {\n workInProgress.flags |= MountLayoutDev;\n }\n } else {\n // If an update was already in progress, we should schedule an Update\n // effect even though we're bailing out, so that cWU/cDU are called.\n if (typeof instance.componentDidMount === 'function') {\n workInProgress.flags |= Update | LayoutStatic;\n }\n\n if ((workInProgress.mode & StrictEffectsMode) !== NoMode) {\n workInProgress.flags |= MountLayoutDev;\n } // If shouldComponentUpdate returned false, we should still update the\n // memoized state to indicate that this work can be reused.\n\n\n workInProgress.memoizedProps = newProps;\n workInProgress.memoizedState = newState;\n } // Update the existing instance's state, props, and context pointers even\n // if shouldComponentUpdate returns false.\n\n\n instance.props = newProps;\n instance.state = newState;\n instance.context = nextContext;\n return shouldUpdate;\n} // Invokes the update life-cycles and returns false if it shouldn't rerender.\n\n\nfunction updateClassInstance(current, workInProgress, ctor, newProps, renderLanes) {\n var instance = workInProgress.stateNode;\n cloneUpdateQueue(current, workInProgress);\n var unresolvedOldProps = workInProgress.memoizedProps;\n var oldProps = workInProgress.type === workInProgress.elementType ? unresolvedOldProps : resolveDefaultProps(workInProgress.type, unresolvedOldProps);\n instance.props = oldProps;\n var unresolvedNewProps = workInProgress.pendingProps;\n var oldContext = instance.context;\n var contextType = ctor.contextType;\n var nextContext = emptyContextObject;\n\n if (typeof contextType === 'object' && contextType !== null) {\n nextContext = readContext(contextType);\n } else {\n var nextUnmaskedContext = getUnmaskedContext(workInProgress, ctor, true);\n nextContext = getMaskedContext(workInProgress, nextUnmaskedContext);\n }\n\n var getDerivedStateFromProps = ctor.getDerivedStateFromProps;\n var hasNewLifecycles = typeof getDerivedStateFromProps === 'function' || typeof instance.getSnapshotBeforeUpdate === 'function'; // Note: During these life-cycles, instance.props/instance.state are what\n // ever the previously attempted to render - not the \"current\". However,\n // during componentDidUpdate we pass the \"current\" props.\n // In order to support react-lifecycles-compat polyfilled components,\n // Unsafe lifecycles should not be invoked for components using the new APIs.\n\n if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillReceiveProps === 'function' || typeof instance.componentWillReceiveProps === 'function')) {\n if (unresolvedOldProps !== unresolvedNewProps || oldContext !== nextContext) {\n callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext);\n }\n }\n\n resetHasForceUpdateBeforeProcessing();\n var oldState = workInProgress.memoizedState;\n var newState = instance.state = oldState;\n processUpdateQueue(workInProgress, newProps, instance, renderLanes);\n suspendIfUpdateReadFromEntangledAsyncAction();\n newState = workInProgress.memoizedState;\n\n if (unresolvedOldProps === unresolvedNewProps && oldState === newState && !hasContextChanged() && !checkHasForceUpdateAfterProcessing() && !(enableLazyContextPropagation )) {\n // If an update was already in progress, we should schedule an Update\n // effect even though we're bailing out, so that cWU/cDU are called.\n if (typeof instance.componentDidUpdate === 'function') {\n if (unresolvedOldProps !== current.memoizedProps || oldState !== current.memoizedState) {\n workInProgress.flags |= Update;\n }\n }\n\n if (typeof instance.getSnapshotBeforeUpdate === 'function') {\n if (unresolvedOldProps !== current.memoizedProps || oldState !== current.memoizedState) {\n workInProgress.flags |= Snapshot;\n }\n }\n\n return false;\n }\n\n if (typeof getDerivedStateFromProps === 'function') {\n applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps);\n newState = workInProgress.memoizedState;\n }\n\n var shouldUpdate = checkHasForceUpdateAfterProcessing() || checkShouldComponentUpdate(workInProgress, ctor, oldProps, newProps, oldState, newState, nextContext) || // TODO: In some cases, we'll end up checking if context has changed twice,\n // both before and after `shouldComponentUpdate` has been called. Not ideal,\n // but I'm loath to refactor this function. This only happens for memoized\n // components so it's not that common.\n enableLazyContextPropagation ;\n\n if (shouldUpdate) {\n // In order to support react-lifecycles-compat polyfilled components,\n // Unsafe lifecycles should not be invoked for components using the new APIs.\n if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillUpdate === 'function' || typeof instance.componentWillUpdate === 'function')) {\n if (typeof instance.componentWillUpdate === 'function') {\n instance.componentWillUpdate(newProps, newState, nextContext);\n }\n\n if (typeof instance.UNSAFE_componentWillUpdate === 'function') {\n instance.UNSAFE_componentWillUpdate(newProps, newState, nextContext);\n }\n }\n\n if (typeof instance.componentDidUpdate === 'function') {\n workInProgress.flags |= Update;\n }\n\n if (typeof instance.getSnapshotBeforeUpdate === 'function') {\n workInProgress.flags |= Snapshot;\n }\n } else {\n // If an update was already in progress, we should schedule an Update\n // effect even though we're bailing out, so that cWU/cDU are called.\n if (typeof instance.componentDidUpdate === 'function') {\n if (unresolvedOldProps !== current.memoizedProps || oldState !== current.memoizedState) {\n workInProgress.flags |= Update;\n }\n }\n\n if (typeof instance.getSnapshotBeforeUpdate === 'function') {\n if (unresolvedOldProps !== current.memoizedProps || oldState !== current.memoizedState) {\n workInProgress.flags |= Snapshot;\n }\n } // If shouldComponentUpdate returned false, we should still update the\n // memoized props/state to indicate that this work can be reused.\n\n\n workInProgress.memoizedProps = newProps;\n workInProgress.memoizedState = newState;\n } // Update the existing instance's state, props, and context pointers even\n // if shouldComponentUpdate returns false.\n\n\n instance.props = newProps;\n instance.state = newState;\n instance.context = nextContext;\n return shouldUpdate;\n}\n\nvar CapturedStacks = new WeakMap();\nfunction createCapturedValueAtFiber(value, source) {\n // If the value is an error, call this function immediately after it is thrown\n // so the stack is accurate.\n var stack;\n\n if (typeof value === 'object' && value !== null) {\n var capturedStack = CapturedStacks.get(value);\n\n if (typeof capturedStack === 'string') {\n stack = capturedStack;\n } else {\n stack = getStackByFiberInDevAndProd(source);\n CapturedStacks.set(value, stack);\n }\n } else {\n stack = getStackByFiberInDevAndProd(source);\n }\n\n return {\n value: value,\n source: source,\n stack: stack,\n digest: null\n };\n}\nfunction createCapturedValueFromError(value, digest, stack) {\n if (typeof stack === 'string') {\n CapturedStacks.set(value, stack);\n }\n\n return {\n value: value,\n source: null,\n stack: stack != null ? stack : null,\n digest: digest != null ? digest : null\n };\n}\n\n// This module is forked in different environments.\n// By default, return `true` to log errors to the console.\n// Forks can return `false` if this isn't desirable.\nfunction showErrorDialog(boundary, errorInfo) {\n return true;\n}\n\nfunction logCapturedError(boundary, errorInfo) {\n try {\n var logError = showErrorDialog(boundary, errorInfo); // Allow injected showErrorDialog() to prevent default console.error logging.\n // This enables renderers like ReactNative to better manage redbox behavior.\n\n if (logError === false) {\n return;\n }\n\n var error = errorInfo.value;\n\n if (true) {\n var source = errorInfo.source;\n var stack = errorInfo.stack;\n var componentStack = stack !== null ? stack : ''; // TODO: There's no longer a way to silence these warnings e.g. for tests.\n // See https://github.com/facebook/react/pull/13384\n\n var componentName = source ? getComponentNameFromFiber(source) : null;\n var componentNameMessage = componentName ? \"The above error occurred in the <\" + componentName + \"> component:\" : 'The above error occurred in one of your React components:';\n var errorBoundaryMessage;\n\n if (boundary.tag === HostRoot) {\n errorBoundaryMessage = 'Consider adding an error boundary to your tree to customize error handling behavior.\\n' + 'Visit https://react.dev/link/error-boundaries to learn more about error boundaries.';\n } else {\n var errorBoundaryName = getComponentNameFromFiber(boundary) || 'Anonymous';\n errorBoundaryMessage = \"React will try to recreate this component tree from scratch \" + (\"using the error boundary you provided, \" + errorBoundaryName + \".\");\n } // In development, we provide our own message which includes the component stack\n // in addition to the error.\n\n\n console['error']( // Don't transform to our wrapper\n '%o\\n\\n%s\\n%s\\n\\n%s', error, componentNameMessage, componentStack, errorBoundaryMessage);\n }\n } catch (e) {\n // This method must not throw, or React internal state will get messed up.\n // If console.error is overridden, or logCapturedError() shows a dialog that throws,\n // we want to report this error outside of the normal stack as a last resort.\n // https://github.com/facebook/react/issues/13188\n setTimeout(function () {\n throw e;\n });\n }\n}\n\nfunction createRootErrorUpdate(fiber, errorInfo, lane) {\n var update = createUpdate(lane); // Unmount the root by rendering null.\n\n update.tag = CaptureUpdate; // Caution: React DevTools currently depends on this property\n // being called \"element\".\n\n update.payload = {\n element: null\n };\n var error = errorInfo.value;\n\n update.callback = function () {\n onUncaughtError(error);\n logCapturedError(fiber, errorInfo);\n };\n\n return update;\n}\n\nfunction createClassErrorUpdate(fiber, errorInfo, lane) {\n var update = createUpdate(lane);\n update.tag = CaptureUpdate;\n var getDerivedStateFromError = fiber.type.getDerivedStateFromError;\n\n if (typeof getDerivedStateFromError === 'function') {\n var error$1 = errorInfo.value;\n\n update.payload = function () {\n return getDerivedStateFromError(error$1);\n };\n\n update.callback = function () {\n {\n markFailedErrorBoundaryForHotReloading(fiber);\n }\n\n logCapturedError(fiber, errorInfo);\n };\n }\n\n var inst = fiber.stateNode;\n\n if (inst !== null && typeof inst.componentDidCatch === 'function') {\n // $FlowFixMe[missing-this-annot]\n update.callback = function callback() {\n {\n markFailedErrorBoundaryForHotReloading(fiber);\n }\n\n logCapturedError(fiber, errorInfo);\n\n if (typeof getDerivedStateFromError !== 'function') {\n // To preserve the preexisting retry behavior of error boundaries,\n // we keep track of which ones already failed during this batch.\n // This gets reset before we yield back to the browser.\n // TODO: Warn in strict mode if getDerivedStateFromError is\n // not defined.\n markLegacyErrorBoundaryAsFailed(this);\n }\n\n var error$1 = errorInfo.value;\n var stack = errorInfo.stack;\n this.componentDidCatch(error$1, {\n componentStack: stack !== null ? stack : ''\n });\n\n {\n if (typeof getDerivedStateFromError !== 'function') {\n // If componentDidCatch is the only error boundary method defined,\n // then it needs to call setState to recover from errors.\n // If no state update is scheduled then the boundary will swallow the error.\n if (!includesSomeLane(fiber.lanes, SyncLane)) {\n error('%s: Error boundaries should implement getDerivedStateFromError(). ' + 'In that method, return a state update to display an error message or fallback UI.', getComponentNameFromFiber(fiber) || 'Unknown');\n }\n }\n }\n };\n }\n\n return update;\n}\n\nfunction resetSuspendedComponent(sourceFiber, rootRenderLanes) {\n // A legacy mode Suspense quirk, only relevant to hook components.\n\n\n var tag = sourceFiber.tag;\n\n if ((sourceFiber.mode & ConcurrentMode) === NoMode && (tag === FunctionComponent || tag === ForwardRef || tag === SimpleMemoComponent)) {\n var currentSource = sourceFiber.alternate;\n\n if (currentSource) {\n sourceFiber.updateQueue = currentSource.updateQueue;\n sourceFiber.memoizedState = currentSource.memoizedState;\n sourceFiber.lanes = currentSource.lanes;\n } else {\n sourceFiber.updateQueue = null;\n sourceFiber.memoizedState = null;\n }\n }\n}\n\nfunction markSuspenseBoundaryShouldCapture(suspenseBoundary, returnFiber, sourceFiber, root, rootRenderLanes) {\n // This marks a Suspense boundary so that when we're unwinding the stack,\n // it captures the suspended \"exception\" and does a second (fallback) pass.\n if ((suspenseBoundary.mode & ConcurrentMode) === NoMode) {\n // Legacy Mode Suspense\n //\n // If the boundary is in legacy mode, we should *not*\n // suspend the commit. Pretend as if the suspended component rendered\n // null and keep rendering. When the Suspense boundary completes,\n // we'll do a second pass to render the fallback.\n if (suspenseBoundary === returnFiber) {\n // Special case where we suspended while reconciling the children of\n // a Suspense boundary's inner Offscreen wrapper fiber. This happens\n // when a React.lazy component is a direct child of a\n // Suspense boundary.\n //\n // Suspense boundaries are implemented as multiple fibers, but they\n // are a single conceptual unit. The legacy mode behavior where we\n // pretend the suspended fiber committed as `null` won't work,\n // because in this case the \"suspended\" fiber is the inner\n // Offscreen wrapper.\n //\n // Because the contents of the boundary haven't started rendering\n // yet (i.e. nothing in the tree has partially rendered) we can\n // switch to the regular, concurrent mode behavior: mark the\n // boundary with ShouldCapture and enter the unwind phase.\n suspenseBoundary.flags |= ShouldCapture;\n } else {\n suspenseBoundary.flags |= DidCapture;\n sourceFiber.flags |= ForceUpdateForLegacySuspense; // We're going to commit this fiber even though it didn't complete.\n // But we shouldn't call any lifecycle methods or callbacks. Remove\n // all lifecycle effect tags.\n\n sourceFiber.flags &= ~(LifecycleEffectMask | Incomplete);\n\n if (sourceFiber.tag === ClassComponent) {\n var currentSourceFiber = sourceFiber.alternate;\n\n if (currentSourceFiber === null) {\n // This is a new mount. Change the tag so it's not mistaken for a\n // completed class component. For example, we should not call\n // componentWillUnmount if it is deleted.\n sourceFiber.tag = IncompleteClassComponent;\n } else {\n // When we try rendering again, we should not reuse the current fiber,\n // since it's known to be in an inconsistent state. Use a force update to\n // prevent a bail out.\n var update = createUpdate(SyncLane);\n update.tag = ForceUpdate;\n enqueueUpdate(sourceFiber, update, SyncLane);\n }\n } // The source fiber did not complete. Mark it with Sync priority to\n // indicate that it still has pending work.\n\n\n sourceFiber.lanes = mergeLanes(sourceFiber.lanes, SyncLane);\n }\n\n return suspenseBoundary;\n } // Confirmed that the boundary is in a concurrent mode tree. Continue\n // with the normal suspend path.\n //\n // After this we'll use a set of heuristics to determine whether this\n // render pass will run to completion or restart or \"suspend\" the commit.\n // The actual logic for this is spread out in different places.\n //\n // This first principle is that if we're going to suspend when we complete\n // a root, then we should also restart if we get an update or ping that\n // might unsuspend it, and vice versa. The only reason to suspend is\n // because you think you might want to restart before committing. However,\n // it doesn't make sense to restart only while in the period we're suspended.\n //\n // Restarting too aggressively is also not good because it starves out any\n // intermediate loading state. So we use heuristics to determine when.\n // Suspense Heuristics\n //\n // If nothing threw a Promise or all the same fallbacks are already showing,\n // then don't suspend/restart.\n //\n // If this is an initial render of a new tree of Suspense boundaries and\n // those trigger a fallback, then don't suspend/restart. We want to ensure\n // that we can show the initial loading state as quickly as possible.\n //\n // If we hit a \"Delayed\" case, such as when we'd switch from content back into\n // a fallback, then we should always suspend/restart. Transitions apply\n // to this case. If none is defined, JND is used instead.\n //\n // If we're already showing a fallback and it gets \"retried\", allowing us to show\n // another level, but there's still an inner boundary that would show a fallback,\n // then we suspend/restart for 500ms since the last time we showed a fallback\n // anywhere in the tree. This effectively throttles progressive loading into a\n // consistent train of commits. This also gives us an opportunity to restart to\n // get to the completed state slightly earlier.\n //\n // If there's ambiguity due to batching it's resolved in preference of:\n // 1) \"delayed\", 2) \"initial render\", 3) \"retry\".\n //\n // We want to ensure that a \"busy\" state doesn't get force committed. We want to\n // ensure that new initial loading states can commit as soon as possible.\n\n\n suspenseBoundary.flags |= ShouldCapture; // TODO: I think we can remove this, since we now use `DidCapture` in\n // the begin phase to prevent an early bailout.\n\n suspenseBoundary.lanes = rootRenderLanes;\n return suspenseBoundary;\n}\n\nfunction throwException(root, returnFiber, sourceFiber, value, rootRenderLanes) {\n // The source fiber did not complete.\n sourceFiber.flags |= Incomplete;\n\n {\n if (isDevToolsPresent) {\n // If we have pending work still, restore the original updaters\n restorePendingUpdaters(root, rootRenderLanes);\n }\n }\n\n if (value !== null && typeof value === 'object') {\n\n if (typeof value.then === 'function') {\n // This is a wakeable. The component suspended.\n var wakeable = value;\n resetSuspendedComponent(sourceFiber);\n\n {\n if (getIsHydrating() && sourceFiber.mode & ConcurrentMode) {\n markDidThrowWhileHydratingDEV();\n }\n }\n\n\n var suspenseBoundary = getSuspenseHandler();\n\n if (suspenseBoundary !== null) {\n switch (suspenseBoundary.tag) {\n case SuspenseComponent:\n {\n // If this suspense boundary is not already showing a fallback, mark\n // the in-progress render as suspended. We try to perform this logic\n // as soon as soon as possible during the render phase, so the work\n // loop can know things like whether it's OK to switch to other tasks,\n // or whether it can wait for data to resolve before continuing.\n // TODO: Most of these checks are already performed when entering a\n // Suspense boundary. We should track the information on the stack so\n // we don't have to recompute it on demand. This would also allow us\n // to unify with `use` which needs to perform this logic even sooner,\n // before `throwException` is called.\n if (sourceFiber.mode & ConcurrentMode) {\n if (getShellBoundary() === null) {\n // Suspended in the \"shell\" of the app. This is an undesirable\n // loading state. We should avoid committing this tree.\n renderDidSuspendDelayIfPossible();\n } else {\n // If we suspended deeper than the shell, we don't need to delay\n // the commmit. However, we still call renderDidSuspend if this is\n // a new boundary, to tell the work loop that a new fallback has\n // appeared during this render.\n // TODO: Theoretically we should be able to delete this branch.\n // It's currently used for two things: 1) to throttle the\n // appearance of successive loading states, and 2) in\n // SuspenseList, to determine whether the children include any\n // pending fallbacks. For 1, we should apply throttling to all\n // retries, not just ones that render an additional fallback. For\n // 2, we should check subtreeFlags instead. Then we can delete\n // this branch.\n var current = suspenseBoundary.alternate;\n\n if (current === null) {\n renderDidSuspend();\n }\n }\n }\n\n suspenseBoundary.flags &= ~ForceClientRender;\n markSuspenseBoundaryShouldCapture(suspenseBoundary, returnFiber, sourceFiber, root, rootRenderLanes); // Retry listener\n //\n // If the fallback does commit, we need to attach a different type of\n // listener. This one schedules an update on the Suspense boundary to\n // turn the fallback state off.\n //\n // Stash the wakeable on the boundary fiber so we can access it in the\n // commit phase.\n //\n // When the wakeable resolves, we'll attempt to render the boundary\n // again (\"retry\").\n // Check if this is a Suspensey resource. We do not attach retry\n // listeners to these, because we don't actually need them for\n // rendering. Only for committing. Instead, if a fallback commits\n // and the only thing that suspended was a Suspensey resource, we\n // retry immediately.\n // TODO: Refactor throwException so that we don't have to do this type\n // check. The caller already knows what the cause was.\n\n var isSuspenseyResource = wakeable === noopSuspenseyCommitThenable;\n\n if (isSuspenseyResource) {\n suspenseBoundary.flags |= ScheduleRetry;\n } else {\n var retryQueue = suspenseBoundary.updateQueue;\n\n if (retryQueue === null) {\n suspenseBoundary.updateQueue = new Set([wakeable]);\n } else {\n retryQueue.add(wakeable);\n } // We only attach ping listeners in concurrent mode. Legacy\n // Suspense always commits fallbacks synchronously, so there are\n // no pings.\n\n\n if (suspenseBoundary.mode & ConcurrentMode) {\n attachPingListener(root, wakeable, rootRenderLanes);\n }\n }\n\n return false;\n }\n\n case OffscreenComponent:\n {\n if (suspenseBoundary.mode & ConcurrentMode) {\n suspenseBoundary.flags |= ShouldCapture;\n\n var _isSuspenseyResource = wakeable === noopSuspenseyCommitThenable;\n\n if (_isSuspenseyResource) {\n suspenseBoundary.flags |= ScheduleRetry;\n } else {\n var offscreenQueue = suspenseBoundary.updateQueue;\n\n if (offscreenQueue === null) {\n var newOffscreenQueue = {\n transitions: null,\n markerInstances: null,\n retryQueue: new Set([wakeable])\n };\n suspenseBoundary.updateQueue = newOffscreenQueue;\n } else {\n var _retryQueue = offscreenQueue.retryQueue;\n\n if (_retryQueue === null) {\n offscreenQueue.retryQueue = new Set([wakeable]);\n } else {\n _retryQueue.add(wakeable);\n }\n }\n\n attachPingListener(root, wakeable, rootRenderLanes);\n }\n\n return false;\n }\n }\n }\n\n throw new Error(\"Unexpected Suspense handler tag (\" + suspenseBoundary.tag + \"). This \" + 'is a bug in React.');\n } else {\n // No boundary was found. Unless this is a sync update, this is OK.\n // We can suspend and wait for more data to arrive.\n if (root.tag === ConcurrentRoot) {\n // In a concurrent root, suspending without a Suspense boundary is\n // allowed. It will suspend indefinitely without committing.\n //\n // TODO: Should we have different behavior for discrete updates? What\n // about flushSync? Maybe it should put the tree into an inert state,\n // and potentially log a warning. Revisit this for a future release.\n attachPingListener(root, wakeable, rootRenderLanes);\n renderDidSuspendDelayIfPossible();\n return false;\n } else {\n // In a legacy root, suspending without a boundary is always an error.\n var uncaughtSuspenseError = new Error('A component suspended while responding to synchronous input. This ' + 'will cause the UI to be replaced with a loading indicator. To ' + 'fix, updates that suspend should be wrapped ' + 'with startTransition.');\n value = uncaughtSuspenseError;\n }\n }\n }\n } // This is a regular error, not a Suspense wakeable.\n\n\n if (getIsHydrating() && sourceFiber.mode & ConcurrentMode) {\n markDidThrowWhileHydratingDEV();\n\n var _suspenseBoundary = getSuspenseHandler(); // If the error was thrown during hydration, we may be able to recover by\n // discarding the dehydrated content and switching to a client render.\n // Instead of surfacing the error, find the nearest Suspense boundary\n // and render it again without hydration.\n\n\n if (_suspenseBoundary !== null) {\n if ((_suspenseBoundary.flags & ShouldCapture) === NoFlags$1) {\n // Set a flag to indicate that we should try rendering the normal\n // children again, not the fallback.\n _suspenseBoundary.flags |= ForceClientRender;\n }\n\n markSuspenseBoundaryShouldCapture(_suspenseBoundary, returnFiber, sourceFiber, root, rootRenderLanes); // Even though the user may not be affected by this error, we should\n // still log it so it can be fixed.\n\n queueHydrationError(createCapturedValueAtFiber(value, sourceFiber));\n return false;\n }\n }\n\n value = createCapturedValueAtFiber(value, sourceFiber);\n renderDidError(value); // We didn't find a boundary that could handle this type of exception. Start\n // over and traverse parent path again, this time treating the exception\n // as an error.\n\n if (returnFiber === null) {\n // There's no return fiber, which means the root errored. This should never\n // happen. Return `true` to trigger a fatal error (panic).\n return true;\n }\n\n var workInProgress = returnFiber;\n\n do {\n switch (workInProgress.tag) {\n case HostRoot:\n {\n var _errorInfo = value;\n workInProgress.flags |= ShouldCapture;\n var lane = pickArbitraryLane(rootRenderLanes);\n workInProgress.lanes = mergeLanes(workInProgress.lanes, lane);\n var update = createRootErrorUpdate(workInProgress, _errorInfo, lane);\n enqueueCapturedUpdate(workInProgress, update);\n return false;\n }\n\n case ClassComponent:\n // Capture and retry\n var errorInfo = value;\n var ctor = workInProgress.type;\n var instance = workInProgress.stateNode;\n\n if ((workInProgress.flags & DidCapture) === NoFlags$1 && (typeof ctor.getDerivedStateFromError === 'function' || instance !== null && typeof instance.componentDidCatch === 'function' && !isAlreadyFailedLegacyErrorBoundary(instance))) {\n workInProgress.flags |= ShouldCapture;\n\n var _lane = pickArbitraryLane(rootRenderLanes);\n\n workInProgress.lanes = mergeLanes(workInProgress.lanes, _lane); // Schedule the error boundary to re-render using updated state\n\n var _update = createClassErrorUpdate(workInProgress, errorInfo, _lane);\n\n enqueueCapturedUpdate(workInProgress, _update);\n return false;\n }\n\n break;\n } // $FlowFixMe[incompatible-type] we bail out when we get a null\n\n\n workInProgress = workInProgress.return;\n } while (workInProgress !== null);\n\n return false;\n}\n\nvar ReactCurrentOwner$2 = ReactSharedInternals.ReactCurrentOwner; // A special exception that's used to unwind the stack when an update flows\n// into a dehydrated boundary.\n\nvar SelectiveHydrationException = new Error(\"This is not a real error. It's an implementation detail of React's \" + \"selective hydration feature. If this leaks into userspace, it's a bug in \" + 'React. Please file an issue.');\nvar didReceiveUpdate = false;\nvar didWarnAboutBadClass;\nvar didWarnAboutModulePatternComponent;\nvar didWarnAboutContextTypeOnFunctionComponent;\nvar didWarnAboutGetDerivedStateOnFunctionComponent;\nvar didWarnAboutFunctionRefs;\nvar didWarnAboutReassigningProps;\nvar didWarnAboutRevealOrder;\nvar didWarnAboutTailOptions;\nvar didWarnAboutDefaultPropsOnFunctionComponent;\n\n{\n didWarnAboutBadClass = {};\n didWarnAboutModulePatternComponent = {};\n didWarnAboutContextTypeOnFunctionComponent = {};\n didWarnAboutGetDerivedStateOnFunctionComponent = {};\n didWarnAboutFunctionRefs = {};\n didWarnAboutReassigningProps = false;\n didWarnAboutRevealOrder = {};\n didWarnAboutTailOptions = {};\n didWarnAboutDefaultPropsOnFunctionComponent = {};\n}\n\nfunction reconcileChildren(current, workInProgress, nextChildren, renderLanes) {\n if (current === null) {\n // If this is a fresh new component that hasn't been rendered yet, we\n // won't update its child set by applying minimal side-effects. Instead,\n // we will add them all to the child before it gets rendered. That means\n // we can optimize this reconciliation pass by not tracking side-effects.\n workInProgress.child = mountChildFibers(workInProgress, null, nextChildren, renderLanes);\n } else {\n // If the current child is the same as the work in progress, it means that\n // we haven't yet started any work on these children. Therefore, we use\n // the clone algorithm to create a copy of all the current children.\n // If we had any progressed work already, that is invalid at this point so\n // let's throw it out.\n workInProgress.child = reconcileChildFibers(workInProgress, current.child, nextChildren, renderLanes);\n }\n}\n\nfunction forceUnmountCurrentAndReconcile(current, workInProgress, nextChildren, renderLanes) {\n // This function is fork of reconcileChildren. It's used in cases where we\n // want to reconcile without matching against the existing set. This has the\n // effect of all current children being unmounted; even if the type and key\n // are the same, the old child is unmounted and a new child is created.\n //\n // To do this, we're going to go through the reconcile algorithm twice. In\n // the first pass, we schedule a deletion for all the current children by\n // passing null.\n workInProgress.child = reconcileChildFibers(workInProgress, current.child, null, renderLanes); // In the second pass, we mount the new children. The trick here is that we\n // pass null in place of where we usually pass the current child set. This has\n // the effect of remounting all children regardless of whether their\n // identities match.\n\n workInProgress.child = reconcileChildFibers(workInProgress, null, nextChildren, renderLanes);\n}\n\nfunction updateForwardRef(current, workInProgress, Component, nextProps, renderLanes) {\n // TODO: current can be non-null here even if the component\n // hasn't yet mounted. This happens after the first render suspends.\n // We'll need to figure out if this is fine or can cause issues.\n var render = Component.render;\n var ref = workInProgress.ref;\n var propsWithoutRef;\n\n {\n propsWithoutRef = nextProps;\n } // The rest is a fork of updateFunctionComponent\n\n\n var nextChildren;\n var hasId;\n prepareToReadContext(workInProgress, renderLanes);\n\n {\n markComponentRenderStarted(workInProgress);\n }\n\n {\n ReactCurrentOwner$2.current = workInProgress;\n setIsRendering(true);\n nextChildren = renderWithHooks(current, workInProgress, render, propsWithoutRef, ref, renderLanes);\n hasId = checkDidRenderIdHook();\n setIsRendering(false);\n }\n\n {\n markComponentRenderStopped();\n }\n\n if (current !== null && !didReceiveUpdate) {\n bailoutHooks(current, workInProgress, renderLanes);\n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n }\n\n if (getIsHydrating() && hasId) {\n pushMaterializedTreeId(workInProgress);\n } // React DevTools reads this flag.\n\n\n workInProgress.flags |= PerformedWork;\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n return workInProgress.child;\n}\n\nfunction updateMemoComponent(current, workInProgress, Component, nextProps, renderLanes) {\n if (current === null) {\n var type = Component.type;\n\n if (isSimpleFunctionComponent(type) && Component.compare === null && // SimpleMemoComponent codepath doesn't resolve outer props either.\n Component.defaultProps === undefined) {\n var resolvedType = type;\n\n {\n resolvedType = resolveFunctionForHotReloading(type);\n } // If this is a plain function component without default props,\n // and with only the default shallow comparison, we upgrade it\n // to a SimpleMemoComponent to allow fast path updates.\n\n\n workInProgress.tag = SimpleMemoComponent;\n workInProgress.type = resolvedType;\n\n {\n validateFunctionComponentInDev(workInProgress, type);\n }\n\n return updateSimpleMemoComponent(current, workInProgress, resolvedType, nextProps, renderLanes);\n }\n\n {\n if (Component.defaultProps !== undefined) {\n var componentName = getComponentNameFromType(type) || 'Unknown';\n\n if (!didWarnAboutDefaultPropsOnFunctionComponent[componentName]) {\n error('%s: Support for defaultProps will be removed from memo components ' + 'in a future major release. Use JavaScript default parameters instead.', componentName);\n\n didWarnAboutDefaultPropsOnFunctionComponent[componentName] = true;\n }\n }\n }\n\n var child = createFiberFromTypeAndProps(Component.type, null, nextProps, workInProgress, workInProgress.mode, renderLanes);\n child.ref = workInProgress.ref;\n child.return = workInProgress;\n workInProgress.child = child;\n return child;\n }\n\n var currentChild = current.child; // This is always exactly one child\n\n var hasScheduledUpdateOrContext = checkScheduledUpdateOrContext(current, renderLanes);\n\n if (!hasScheduledUpdateOrContext) {\n // This will be the props with resolved defaultProps,\n // unlike current.memoizedProps which will be the unresolved ones.\n var prevProps = currentChild.memoizedProps; // Default to shallow comparison\n\n var compare = Component.compare;\n compare = compare !== null ? compare : shallowEqual;\n\n if (compare(prevProps, nextProps) && current.ref === workInProgress.ref) {\n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n }\n } // React DevTools reads this flag.\n\n\n workInProgress.flags |= PerformedWork;\n var newChild = createWorkInProgress(currentChild, nextProps);\n newChild.ref = workInProgress.ref;\n newChild.return = workInProgress;\n workInProgress.child = newChild;\n return newChild;\n}\n\nfunction updateSimpleMemoComponent(current, workInProgress, Component, nextProps, renderLanes) {\n // TODO: current can be non-null here even if the component\n // hasn't yet mounted. This happens when the inner render suspends.\n // We'll need to figure out if this is fine or can cause issues.\n if (current !== null) {\n var prevProps = current.memoizedProps;\n\n if (shallowEqual(prevProps, nextProps) && current.ref === workInProgress.ref && ( // Prevent bailout if the implementation changed due to hot reload.\n workInProgress.type === current.type )) {\n didReceiveUpdate = false; // The props are shallowly equal. Reuse the previous props object, like we\n // would during a normal fiber bailout.\n //\n // We don't have strong guarantees that the props object is referentially\n // equal during updates where we can't bail out anyway — like if the props\n // are shallowly equal, but there's a local state or context update in the\n // same batch.\n //\n // However, as a principle, we should aim to make the behavior consistent\n // across different ways of memoizing a component. For example, React.memo\n // has a different internal Fiber layout if you pass a normal function\n // component (SimpleMemoComponent) versus if you pass a different type\n // like forwardRef (MemoComponent). But this is an implementation detail.\n // Wrapping a component in forwardRef (or React.lazy, etc) shouldn't\n // affect whether the props object is reused during a bailout.\n\n workInProgress.pendingProps = nextProps = prevProps;\n\n if (!checkScheduledUpdateOrContext(current, renderLanes)) {\n // The pending lanes were cleared at the beginning of beginWork. We're\n // about to bail out, but there might be other lanes that weren't\n // included in the current render. Usually, the priority level of the\n // remaining updates is accumulated during the evaluation of the\n // component (i.e. when processing the update queue). But since since\n // we're bailing out early *without* evaluating the component, we need\n // to account for it here, too. Reset to the value of the current fiber.\n // NOTE: This only applies to SimpleMemoComponent, not MemoComponent,\n // because a MemoComponent fiber does not have hooks or an update queue;\n // rather, it wraps around an inner component, which may or may not\n // contains hooks.\n // TODO: Move the reset at in beginWork out of the common path so that\n // this is no longer necessary.\n workInProgress.lanes = current.lanes;\n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n } else if ((current.flags & ForceUpdateForLegacySuspense) !== NoFlags$1) {\n // This is a special case that only exists for legacy mode.\n // See https://github.com/facebook/react/pull/19216.\n didReceiveUpdate = true;\n }\n }\n }\n\n return updateFunctionComponent(current, workInProgress, Component, nextProps, renderLanes);\n}\n\nfunction updateOffscreenComponent(current, workInProgress, renderLanes) {\n var nextProps = workInProgress.pendingProps;\n var nextChildren = nextProps.children;\n var nextIsDetached = (workInProgress.stateNode._pendingVisibility & OffscreenDetached) !== 0;\n var prevState = current !== null ? current.memoizedState : null;\n markRef(current, workInProgress);\n\n if (nextProps.mode === 'hidden' || enableLegacyHidden || nextIsDetached) {\n // Rendering a hidden tree.\n var didSuspend = (workInProgress.flags & DidCapture) !== NoFlags$1;\n\n if (didSuspend) {\n // Something suspended inside a hidden tree\n // Include the base lanes from the last render\n var nextBaseLanes = prevState !== null ? mergeLanes(prevState.baseLanes, renderLanes) : renderLanes;\n\n if (current !== null) {\n // Reset to the current children\n var currentChild = workInProgress.child = current.child; // The current render suspended, but there may be other lanes with\n // pending work. We can't read `childLanes` from the current Offscreen\n // fiber because we reset it when it was deferred; however, we can read\n // the pending lanes from the child fibers.\n\n var currentChildLanes = NoLanes;\n\n while (currentChild !== null) {\n currentChildLanes = mergeLanes(mergeLanes(currentChildLanes, currentChild.lanes), currentChild.childLanes);\n currentChild = currentChild.sibling;\n }\n\n var lanesWeJustAttempted = nextBaseLanes;\n var remainingChildLanes = removeLanes(currentChildLanes, lanesWeJustAttempted);\n workInProgress.childLanes = remainingChildLanes;\n } else {\n workInProgress.childLanes = NoLanes;\n workInProgress.child = null;\n }\n\n return deferHiddenOffscreenComponent(current, workInProgress, nextBaseLanes);\n }\n\n if ((workInProgress.mode & ConcurrentMode) === NoMode) {\n // In legacy sync mode, don't defer the subtree. Render it now.\n // TODO: Consider how Offscreen should work with transitions in the future\n var nextState = {\n baseLanes: NoLanes,\n cachePool: null\n };\n workInProgress.memoizedState = nextState;\n\n {\n // push the cache pool even though we're going to bail out\n // because otherwise there'd be a context mismatch\n if (current !== null) {\n pushTransition(workInProgress, null);\n }\n }\n\n reuseHiddenContextOnStack(workInProgress);\n pushOffscreenSuspenseHandler(workInProgress);\n } else if (!includesSomeLane(renderLanes, OffscreenLane)) {\n // We're hidden, and we're not rendering at Offscreen. We will bail out\n // and resume this tree later.\n // Schedule this fiber to re-render at Offscreen priority\n workInProgress.lanes = workInProgress.childLanes = laneToLanes(OffscreenLane); // Include the base lanes from the last render\n\n var _nextBaseLanes = prevState !== null ? mergeLanes(prevState.baseLanes, renderLanes) : renderLanes;\n\n return deferHiddenOffscreenComponent(current, workInProgress, _nextBaseLanes);\n } else {\n // This is the second render. The surrounding visible content has already\n // committed. Now we resume rendering the hidden tree.\n // Rendering at offscreen, so we can clear the base lanes.\n var _nextState = {\n baseLanes: NoLanes,\n cachePool: null\n };\n workInProgress.memoizedState = _nextState;\n\n if (current !== null) {\n // If the render that spawned this one accessed the cache pool, resume\n // using the same cache. Unless the parent changed, since that means\n // there was a refresh.\n var prevCachePool = prevState !== null ? prevState.cachePool : null; // TODO: Consider if and how Offscreen pre-rendering should\n // be attributed to the transition that spawned it\n\n pushTransition(workInProgress, prevCachePool);\n } // Push the lanes that were skipped when we bailed out.\n\n\n if (prevState !== null) {\n pushHiddenContext(workInProgress, prevState);\n } else {\n reuseHiddenContextOnStack(workInProgress);\n }\n\n pushOffscreenSuspenseHandler(workInProgress);\n }\n } else {\n // Rendering a visible tree.\n if (prevState !== null) {\n // We're going from hidden -> visible.\n var _prevCachePool = null;\n\n {\n // If the render that spawned this one accessed the cache pool, resume\n // using the same cache. Unless the parent changed, since that means\n // there was a refresh.\n _prevCachePool = prevState.cachePool;\n }\n\n pushTransition(workInProgress, _prevCachePool); // Push the lanes that were skipped when we bailed out.\n\n pushHiddenContext(workInProgress, prevState);\n reuseSuspenseHandlerOnStack(workInProgress); // Since we're not hidden anymore, reset the state\n\n workInProgress.memoizedState = null;\n } else {\n // We weren't previously hidden, and we still aren't, so there's nothing\n // special to do. Need to push to the stack regardless, though, to avoid\n // a push/pop misalignment.\n {\n // If the render that spawned this one accessed the cache pool, resume\n // using the same cache. Unless the parent changed, since that means\n // there was a refresh.\n if (current !== null) {\n pushTransition(workInProgress, null);\n }\n } // We're about to bail out, but we need to push this to the stack anyway\n // to avoid a push/pop misalignment.\n\n\n reuseHiddenContextOnStack(workInProgress);\n reuseSuspenseHandlerOnStack(workInProgress);\n }\n }\n\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n return workInProgress.child;\n}\n\nfunction deferHiddenOffscreenComponent(current, workInProgress, nextBaseLanes, renderLanes) {\n var nextState = {\n baseLanes: nextBaseLanes,\n // Save the cache pool so we can resume later.\n cachePool: getOffscreenDeferredCache() \n };\n workInProgress.memoizedState = nextState;\n\n {\n // push the cache pool even though we're going to bail out\n // because otherwise there'd be a context mismatch\n if (current !== null) {\n pushTransition(workInProgress, null);\n }\n } // We're about to bail out, but we need to push this to the stack anyway\n // to avoid a push/pop misalignment.\n\n\n reuseHiddenContextOnStack(workInProgress);\n pushOffscreenSuspenseHandler(workInProgress);\n\n return null;\n} // Note: These happen to have identical begin phases, for now. We shouldn't hold\n\nfunction updateCacheComponent(current, workInProgress, renderLanes) {\n\n prepareToReadContext(workInProgress, renderLanes);\n var parentCache = readContext(CacheContext);\n\n if (current === null) {\n // Initial mount. Request a fresh cache from the pool.\n var freshCache = requestCacheFromPool(renderLanes);\n var initialState = {\n parent: parentCache,\n cache: freshCache\n };\n workInProgress.memoizedState = initialState;\n initializeUpdateQueue(workInProgress);\n pushCacheProvider(workInProgress, freshCache);\n } else {\n // Check for updates\n if (includesSomeLane(current.lanes, renderLanes)) {\n cloneUpdateQueue(current, workInProgress);\n processUpdateQueue(workInProgress, null, null, renderLanes);\n suspendIfUpdateReadFromEntangledAsyncAction();\n }\n\n var prevState = current.memoizedState;\n var nextState = workInProgress.memoizedState; // Compare the new parent cache to the previous to see detect there was\n // a refresh.\n\n if (prevState.parent !== parentCache) {\n // Refresh in parent. Update the parent.\n var derivedState = {\n parent: parentCache,\n cache: parentCache\n }; // Copied from getDerivedStateFromProps implementation. Once the update\n // queue is empty, persist the derived state onto the base state.\n\n workInProgress.memoizedState = derivedState;\n\n if (workInProgress.lanes === NoLanes) {\n var updateQueue = workInProgress.updateQueue;\n workInProgress.memoizedState = updateQueue.baseState = derivedState;\n }\n\n pushCacheProvider(workInProgress, parentCache); // No need to propagate a context change because the refreshed parent\n // already did.\n } else {\n // The parent didn't refresh. Now check if this cache did.\n var nextCache = nextState.cache;\n pushCacheProvider(workInProgress, nextCache);\n\n if (nextCache !== prevState.cache) {\n // This cache refreshed. Propagate a context change.\n propagateContextChange(workInProgress, CacheContext, renderLanes);\n }\n }\n }\n\n var nextChildren = workInProgress.pendingProps.children;\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n return workInProgress.child;\n} // This should only be called if the name changes\n\nfunction updateFragment(current, workInProgress, renderLanes) {\n var nextChildren = workInProgress.pendingProps;\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n return workInProgress.child;\n}\n\nfunction updateMode(current, workInProgress, renderLanes) {\n var nextChildren = workInProgress.pendingProps.children;\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n return workInProgress.child;\n}\n\nfunction updateProfiler(current, workInProgress, renderLanes) {\n {\n workInProgress.flags |= Update;\n\n {\n // Reset effect durations for the next eventual effect phase.\n // These are reset during render to allow the DevTools commit hook a chance to read them,\n var stateNode = workInProgress.stateNode;\n stateNode.effectDuration = 0;\n stateNode.passiveEffectDuration = 0;\n }\n }\n\n var nextProps = workInProgress.pendingProps;\n var nextChildren = nextProps.children;\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n return workInProgress.child;\n}\n\nfunction markRef(current, workInProgress) {\n // TODO: Check props.ref instead of fiber.ref when enableRefAsProp is on.\n var ref = workInProgress.ref;\n\n if (ref === null) {\n if (current !== null && current.ref !== null) {\n // Schedule a Ref effect\n workInProgress.flags |= Ref | RefStatic;\n }\n } else {\n if (typeof ref !== 'function' && typeof ref !== 'object') {\n throw new Error('Expected ref to be a function, an object returned by React.createRef(), or undefined/null.');\n }\n\n if (current === null || current.ref !== ref) {\n // Schedule a Ref effect\n workInProgress.flags |= Ref | RefStatic;\n }\n }\n}\n\nfunction updateFunctionComponent(current, workInProgress, Component, nextProps, renderLanes) {\n var context;\n\n {\n var unmaskedContext = getUnmaskedContext(workInProgress, Component, true);\n context = getMaskedContext(workInProgress, unmaskedContext);\n }\n\n var nextChildren;\n var hasId;\n prepareToReadContext(workInProgress, renderLanes);\n\n {\n markComponentRenderStarted(workInProgress);\n }\n\n {\n ReactCurrentOwner$2.current = workInProgress;\n setIsRendering(true);\n nextChildren = renderWithHooks(current, workInProgress, Component, nextProps, context, renderLanes);\n hasId = checkDidRenderIdHook();\n setIsRendering(false);\n }\n\n {\n markComponentRenderStopped();\n }\n\n if (current !== null && !didReceiveUpdate) {\n bailoutHooks(current, workInProgress, renderLanes);\n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n }\n\n if (getIsHydrating() && hasId) {\n pushMaterializedTreeId(workInProgress);\n } // React DevTools reads this flag.\n\n\n workInProgress.flags |= PerformedWork;\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n return workInProgress.child;\n}\n\nfunction replayFunctionComponent(current, workInProgress, nextProps, Component, secondArg, renderLanes) {\n // This function is used to replay a component that previously suspended,\n // after its data resolves. It's a simplified version of\n // updateFunctionComponent that reuses the hooks from the previous attempt.\n prepareToReadContext(workInProgress, renderLanes);\n\n {\n markComponentRenderStarted(workInProgress);\n }\n\n var nextChildren = replaySuspendedComponentWithHooks(current, workInProgress, Component, nextProps, secondArg);\n var hasId = checkDidRenderIdHook();\n\n {\n markComponentRenderStopped();\n }\n\n if (current !== null && !didReceiveUpdate) {\n bailoutHooks(current, workInProgress, renderLanes);\n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n }\n\n if (getIsHydrating() && hasId) {\n pushMaterializedTreeId(workInProgress);\n } // React DevTools reads this flag.\n\n\n workInProgress.flags |= PerformedWork;\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n return workInProgress.child;\n}\n\nfunction updateClassComponent(current, workInProgress, Component, nextProps, renderLanes) {\n {\n // This is used by DevTools to force a boundary to error.\n switch (shouldError(workInProgress)) {\n case false:\n {\n var _instance = workInProgress.stateNode;\n var ctor = workInProgress.type; // TODO This way of resetting the error boundary state is a hack.\n // Is there a better way to do this?\n\n var tempInstance = new ctor(workInProgress.memoizedProps, _instance.context);\n var state = tempInstance.state;\n\n _instance.updater.enqueueSetState(_instance, state, null);\n\n break;\n }\n\n case true:\n {\n workInProgress.flags |= DidCapture;\n workInProgress.flags |= ShouldCapture; // eslint-disable-next-line react-internal/prod-error-codes\n\n var error$1 = new Error('Simulated error coming from DevTools');\n var lane = pickArbitraryLane(renderLanes);\n workInProgress.lanes = mergeLanes(workInProgress.lanes, lane); // Schedule the error boundary to re-render using updated state\n\n var update = createClassErrorUpdate(workInProgress, createCapturedValueAtFiber(error$1, workInProgress), lane);\n enqueueCapturedUpdate(workInProgress, update);\n break;\n }\n }\n } // Push context providers early to prevent context stack mismatches.\n // During mounting we don't know the child context yet as the instance doesn't exist.\n // We will invalidate the child context in finishClassComponent() right after rendering.\n\n\n var hasContext;\n\n if (isContextProvider(Component)) {\n hasContext = true;\n pushContextProvider(workInProgress);\n } else {\n hasContext = false;\n }\n\n prepareToReadContext(workInProgress, renderLanes);\n var instance = workInProgress.stateNode;\n var shouldUpdate;\n\n if (instance === null) {\n resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress); // In the initial pass we might need to construct the instance.\n\n constructClassInstance(workInProgress, Component, nextProps);\n mountClassInstance(workInProgress, Component, nextProps, renderLanes);\n shouldUpdate = true;\n } else if (current === null) {\n // In a resume, we'll already have an instance we can reuse.\n shouldUpdate = resumeMountClassInstance(workInProgress, Component, nextProps, renderLanes);\n } else {\n shouldUpdate = updateClassInstance(current, workInProgress, Component, nextProps, renderLanes);\n }\n\n var nextUnitOfWork = finishClassComponent(current, workInProgress, Component, shouldUpdate, hasContext, renderLanes);\n\n {\n var inst = workInProgress.stateNode;\n\n if (shouldUpdate && inst.props !== nextProps) {\n if (!didWarnAboutReassigningProps) {\n error('It looks like %s is reassigning its own `this.props` while rendering. ' + 'This is not supported and can lead to confusing bugs.', getComponentNameFromFiber(workInProgress) || 'a component');\n }\n\n didWarnAboutReassigningProps = true;\n }\n }\n\n return nextUnitOfWork;\n}\n\nfunction finishClassComponent(current, workInProgress, Component, shouldUpdate, hasContext, renderLanes) {\n // Refs should update even if shouldComponentUpdate returns false\n markRef(current, workInProgress);\n var didCaptureError = (workInProgress.flags & DidCapture) !== NoFlags$1;\n\n if (!shouldUpdate && !didCaptureError) {\n // Context providers should defer to sCU for rendering\n if (hasContext) {\n invalidateContextProvider(workInProgress, Component, false);\n }\n\n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n }\n\n var instance = workInProgress.stateNode; // Rerender\n\n ReactCurrentOwner$2.current = workInProgress;\n var nextChildren;\n\n if (didCaptureError && typeof Component.getDerivedStateFromError !== 'function') {\n // If we captured an error, but getDerivedStateFromError is not defined,\n // unmount all the children. componentDidCatch will schedule an update to\n // re-render a fallback. This is temporary until we migrate everyone to\n // the new API.\n // TODO: Warn in a future release.\n nextChildren = null;\n\n {\n stopProfilerTimerIfRunning();\n }\n } else {\n {\n markComponentRenderStarted(workInProgress);\n }\n\n {\n setIsRendering(true);\n nextChildren = instance.render();\n\n if (workInProgress.mode & StrictLegacyMode) {\n setIsStrictModeForDevtools(true);\n\n try {\n instance.render();\n } finally {\n setIsStrictModeForDevtools(false);\n }\n }\n\n setIsRendering(false);\n }\n\n {\n markComponentRenderStopped();\n }\n } // React DevTools reads this flag.\n\n\n workInProgress.flags |= PerformedWork;\n\n if (current !== null && didCaptureError) {\n // If we're recovering from an error, reconcile without reusing any of\n // the existing children. Conceptually, the normal children and the children\n // that are shown on error are two different sets, so we shouldn't reuse\n // normal children even if their identities match.\n forceUnmountCurrentAndReconcile(current, workInProgress, nextChildren, renderLanes);\n } else {\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n } // Memoize state using the values we just used to render.\n // TODO: Restructure so we never read values from the instance.\n\n\n workInProgress.memoizedState = instance.state; // The context might have changed so we need to recalculate it.\n\n if (hasContext) {\n invalidateContextProvider(workInProgress, Component, true);\n }\n\n return workInProgress.child;\n}\n\nfunction pushHostRootContext(workInProgress) {\n var root = workInProgress.stateNode;\n\n if (root.pendingContext) {\n pushTopLevelContextObject(workInProgress, root.pendingContext, root.pendingContext !== root.context);\n } else if (root.context) {\n // Should always be set\n pushTopLevelContextObject(workInProgress, root.context, false);\n }\n\n pushHostContainer(workInProgress, root.containerInfo);\n}\n\nfunction updateHostRoot(current, workInProgress, renderLanes) {\n pushHostRootContext(workInProgress);\n\n if (current === null) {\n throw new Error('Should have a current fiber. This is a bug in React.');\n }\n\n var nextProps = workInProgress.pendingProps;\n var prevState = workInProgress.memoizedState;\n var prevChildren = prevState.element;\n cloneUpdateQueue(current, workInProgress);\n processUpdateQueue(workInProgress, nextProps, null, renderLanes);\n var nextState = workInProgress.memoizedState;\n\n {\n var nextCache = nextState.cache;\n pushCacheProvider(workInProgress, nextCache);\n\n if (nextCache !== prevState.cache) {\n // The root cache refreshed.\n propagateContextChange(workInProgress, CacheContext, renderLanes);\n }\n } // This would ideally go inside processUpdateQueue, but because it suspends,\n // it needs to happen after the `pushCacheProvider` call above to avoid a\n // context stack mismatch. A bit unfortunate.\n\n\n suspendIfUpdateReadFromEntangledAsyncAction(); // Caution: React DevTools currently depends on this property\n // being called \"element\".\n\n var nextChildren = nextState.element;\n\n if (prevState.isDehydrated) {\n // This is a hydration root whose shell has not yet hydrated. We should\n // attempt to hydrate.\n // Flip isDehydrated to false to indicate that when this render\n // finishes, the root will no longer be dehydrated.\n var overrideState = {\n element: nextChildren,\n isDehydrated: false,\n cache: nextState.cache\n };\n var updateQueue = workInProgress.updateQueue; // `baseState` can always be the last state because the root doesn't\n // have reducer functions so it doesn't need rebasing.\n\n updateQueue.baseState = overrideState;\n workInProgress.memoizedState = overrideState;\n\n if (workInProgress.flags & ForceClientRender) {\n // Something errored during a previous attempt to hydrate the shell, so we\n // forced a client render.\n var recoverableError = createCapturedValueAtFiber(new Error('There was an error while hydrating. Because the error happened outside ' + 'of a Suspense boundary, the entire root will switch to ' + 'client rendering.'), workInProgress);\n return mountHostRootWithoutHydrating(current, workInProgress, nextChildren, renderLanes, recoverableError);\n } else if (nextChildren !== prevChildren) {\n var _recoverableError = createCapturedValueAtFiber(new Error('This root received an early update, before anything was able ' + 'hydrate. Switched the entire root to client rendering.'), workInProgress);\n\n return mountHostRootWithoutHydrating(current, workInProgress, nextChildren, renderLanes, _recoverableError);\n } else {\n // The outermost shell has not hydrated yet. Start hydrating.\n enterHydrationState(workInProgress);\n var child = mountChildFibers(workInProgress, null, nextChildren, renderLanes);\n workInProgress.child = child;\n var node = child;\n\n while (node) {\n // Mark each child as hydrating. This is a fast path to know whether this\n // tree is part of a hydrating tree. This is used to determine if a child\n // node has fully mounted yet, and for scheduling event replaying.\n // Conceptually this is similar to Placement in that a new subtree is\n // inserted into the React tree here. It just happens to not need DOM\n // mutations because it already exists.\n node.flags = node.flags & ~Placement | Hydrating;\n node = node.sibling;\n }\n }\n } else {\n // Root is not dehydrated. Either this is a client-only root, or it\n // already hydrated.\n resetHydrationState();\n\n if (nextChildren === prevChildren) {\n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n }\n\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n }\n\n return workInProgress.child;\n}\n\nfunction mountHostRootWithoutHydrating(current, workInProgress, nextChildren, renderLanes, recoverableError) {\n // Revert to client rendering.\n resetHydrationState();\n queueHydrationError(recoverableError);\n workInProgress.flags |= ForceClientRender;\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n return workInProgress.child;\n}\n\nfunction updateHostComponent$1(current, workInProgress, renderLanes) {\n if (current === null) {\n tryToClaimNextHydratableInstance(workInProgress);\n }\n\n pushHostContext(workInProgress);\n var type = workInProgress.type;\n var nextProps = workInProgress.pendingProps;\n var prevProps = current !== null ? current.memoizedProps : null;\n var nextChildren = nextProps.children;\n var isDirectTextChild = shouldSetTextContent(type, nextProps);\n\n if (isDirectTextChild) {\n // We special case a direct text child of a host node. This is a common\n // case. We won't handle it as a reified child. We will instead handle\n // this in the host environment that also has access to this prop. That\n // avoids allocating another HostText fiber and traversing it.\n nextChildren = null;\n } else if (prevProps !== null && shouldSetTextContent(type, prevProps)) {\n // If we're switching from a direct text child to a normal child, or to\n // empty, we need to schedule the text content to be reset.\n workInProgress.flags |= ContentReset;\n }\n\n {\n var memoizedState = workInProgress.memoizedState;\n\n if (memoizedState !== null) {\n // This fiber has been upgraded to a stateful component. The only way\n // happens currently is for form actions. We use hooks to track the\n // pending and error state of the form.\n //\n // Once a fiber is upgraded to be stateful, it remains stateful for the\n // rest of its lifetime.\n var newState = renderTransitionAwareHostComponentWithHooks(current, workInProgress, renderLanes); // If the transition state changed, propagate the change to all the\n // descendents. We use Context as an implementation detail for this.\n //\n // This is intentionally set here instead of pushHostContext because\n // pushHostContext gets called before we process the state hook, to avoid\n // a state mismatch in the event that something suspends.\n //\n // NOTE: This assumes that there cannot be nested transition providers,\n // because the only renderer that implements this feature is React DOM,\n // and forms cannot be nested. If we did support nested providers, then\n // we would need to push a context value even for host fibers that\n // haven't been upgraded yet.\n\n {\n HostTransitionContext._currentValue = newState;\n }\n\n {\n if (didReceiveUpdate) {\n if (current !== null) {\n var oldStateHook = current.memoizedState;\n var oldState = oldStateHook.memoizedState; // This uses regular equality instead of Object.is because we assume\n // that host transition state doesn't include NaN as a valid type.\n\n if (oldState !== newState) {\n propagateContextChange(workInProgress, HostTransitionContext, renderLanes);\n }\n }\n }\n }\n }\n }\n\n markRef(current, workInProgress);\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n return workInProgress.child;\n}\n\nfunction updateHostHoistable(current, workInProgress, renderLanes) {\n markRef(current, workInProgress);\n var currentProps = current === null ? null : current.memoizedProps;\n var resource = workInProgress.memoizedState = getResource(workInProgress.type, currentProps, workInProgress.pendingProps);\n\n if (current === null) {\n if (!getIsHydrating() && resource === null) {\n // This is not a Resource Hoistable and we aren't hydrating so we construct the instance.\n workInProgress.stateNode = createHoistableInstance(workInProgress.type, workInProgress.pendingProps, getRootHostContainer(), workInProgress);\n }\n } // Resources never have reconciler managed children. It is possible for\n // the host implementation of getResource to consider children in the\n // resource construction but they will otherwise be discarded. In practice\n // this precludes all but the simplest children and Host specific warnings\n // should be implemented to warn when children are passsed when otherwise not\n // expected\n\n\n return null;\n}\n\nfunction updateHostSingleton(current, workInProgress, renderLanes) {\n pushHostContext(workInProgress);\n\n if (current === null) {\n claimHydratableSingleton(workInProgress);\n }\n\n var nextChildren = workInProgress.pendingProps.children;\n\n if (current === null && !getIsHydrating()) {\n // Similar to Portals we append Singleton children in the commit phase. So we\n // Track insertions even on mount.\n // TODO: Consider unifying this with how the root works.\n workInProgress.child = reconcileChildFibers(workInProgress, null, nextChildren, renderLanes);\n } else {\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n }\n\n markRef(current, workInProgress);\n return workInProgress.child;\n}\n\nfunction updateHostText$1(current, workInProgress) {\n if (current === null) {\n tryToClaimNextHydratableTextInstance(workInProgress);\n } // Nothing to do here. This is terminal. We'll do the completion step\n // immediately after.\n\n\n return null;\n}\n\nfunction mountLazyComponent(_current, workInProgress, elementType, renderLanes) {\n resetSuspendedCurrentOnMountInLegacyMode(_current, workInProgress);\n var props = workInProgress.pendingProps;\n var lazyComponent = elementType;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n var Component = init(payload); // Store the unwrapped component in the type.\n\n workInProgress.type = Component;\n var resolvedTag = workInProgress.tag = resolveLazyComponentTag(Component);\n var resolvedProps = resolveDefaultProps(Component, props);\n var child;\n\n switch (resolvedTag) {\n case FunctionComponent:\n {\n {\n validateFunctionComponentInDev(workInProgress, Component);\n workInProgress.type = Component = resolveFunctionForHotReloading(Component);\n }\n\n child = updateFunctionComponent(null, workInProgress, Component, resolvedProps, renderLanes);\n return child;\n }\n\n case ClassComponent:\n {\n {\n workInProgress.type = Component = resolveClassForHotReloading(Component);\n }\n\n child = updateClassComponent(null, workInProgress, Component, resolvedProps, renderLanes);\n return child;\n }\n\n case ForwardRef:\n {\n {\n workInProgress.type = Component = resolveForwardRefForHotReloading(Component);\n }\n\n child = updateForwardRef(null, workInProgress, Component, resolvedProps, renderLanes);\n return child;\n }\n\n case MemoComponent:\n {\n child = updateMemoComponent(null, workInProgress, Component, resolveDefaultProps(Component.type, resolvedProps), // The inner type can have defaults too\n renderLanes);\n return child;\n }\n }\n\n var hint = '';\n\n {\n if (Component !== null && typeof Component === 'object' && Component.$$typeof === REACT_LAZY_TYPE) {\n hint = ' Did you wrap a component in React.lazy() more than once?';\n }\n } // This message intentionally doesn't mention ForwardRef or MemoComponent\n // because the fact that it's a separate type of work is an\n // implementation detail.\n\n\n throw new Error(\"Element type is invalid. Received a promise that resolves to: \" + Component + \". \" + (\"Lazy element type must resolve to a class or function.\" + hint));\n}\n\nfunction mountIncompleteClassComponent(_current, workInProgress, Component, nextProps, renderLanes) {\n resetSuspendedCurrentOnMountInLegacyMode(_current, workInProgress); // Promote the fiber to a class and try rendering again.\n\n workInProgress.tag = ClassComponent; // The rest of this function is a fork of `updateClassComponent`\n // Push context providers early to prevent context stack mismatches.\n // During mounting we don't know the child context yet as the instance doesn't exist.\n // We will invalidate the child context in finishClassComponent() right after rendering.\n\n var hasContext;\n\n if (isContextProvider(Component)) {\n hasContext = true;\n pushContextProvider(workInProgress);\n } else {\n hasContext = false;\n }\n\n prepareToReadContext(workInProgress, renderLanes);\n constructClassInstance(workInProgress, Component, nextProps);\n mountClassInstance(workInProgress, Component, nextProps, renderLanes);\n return finishClassComponent(null, workInProgress, Component, true, hasContext, renderLanes);\n}\n\nfunction mountIndeterminateComponent(_current, workInProgress, Component, renderLanes) {\n resetSuspendedCurrentOnMountInLegacyMode(_current, workInProgress);\n var props = workInProgress.pendingProps;\n var context;\n\n {\n var unmaskedContext = getUnmaskedContext(workInProgress, Component, false);\n context = getMaskedContext(workInProgress, unmaskedContext);\n }\n\n prepareToReadContext(workInProgress, renderLanes);\n var value;\n var hasId;\n\n {\n markComponentRenderStarted(workInProgress);\n }\n\n {\n if (Component.prototype && typeof Component.prototype.render === 'function') {\n var componentName = getComponentNameFromType(Component) || 'Unknown';\n\n if (!didWarnAboutBadClass[componentName]) {\n error(\"The <%s /> component appears to have a render method, but doesn't extend React.Component. \" + 'This is likely to cause errors. Change %s to extend React.Component instead.', componentName, componentName);\n\n didWarnAboutBadClass[componentName] = true;\n }\n }\n\n if (workInProgress.mode & StrictLegacyMode) {\n ReactStrictModeWarnings.recordLegacyContextWarning(workInProgress, null);\n }\n\n setIsRendering(true);\n ReactCurrentOwner$2.current = workInProgress;\n value = renderWithHooks(null, workInProgress, Component, props, context, renderLanes);\n hasId = checkDidRenderIdHook();\n setIsRendering(false);\n }\n\n {\n markComponentRenderStopped();\n } // React DevTools reads this flag.\n\n\n workInProgress.flags |= PerformedWork;\n\n {\n // Support for module components is deprecated and is removed behind a flag.\n // Whether or not it would crash later, we want to show a good message in DEV first.\n if (typeof value === 'object' && value !== null && typeof value.render === 'function' && value.$$typeof === undefined) {\n var _componentName = getComponentNameFromType(Component) || 'Unknown';\n\n if (!didWarnAboutModulePatternComponent[_componentName]) {\n error('The <%s /> component appears to be a function component that returns a class instance. ' + 'Change %s to a class that extends React.Component instead. ' + \"If you can't use a class try assigning the prototype on the function as a workaround. \" + \"`%s.prototype = React.Component.prototype`. Don't use an arrow function since it \" + 'cannot be called with `new` by React.', _componentName, _componentName, _componentName);\n\n didWarnAboutModulePatternComponent[_componentName] = true;\n }\n }\n }\n\n if ( // Run these checks in production only if the flag is off.\n // Eventually we'll delete this branch altogether.\n typeof value === 'object' && value !== null && typeof value.render === 'function' && value.$$typeof === undefined) {\n {\n var _componentName2 = getComponentNameFromType(Component) || 'Unknown';\n\n if (!didWarnAboutModulePatternComponent[_componentName2]) {\n error('The <%s /> component appears to be a function component that returns a class instance. ' + 'Change %s to a class that extends React.Component instead. ' + \"If you can't use a class try assigning the prototype on the function as a workaround. \" + \"`%s.prototype = React.Component.prototype`. Don't use an arrow function since it \" + 'cannot be called with `new` by React.', _componentName2, _componentName2, _componentName2);\n\n didWarnAboutModulePatternComponent[_componentName2] = true;\n }\n } // Proceed under the assumption that this is a class instance\n\n\n workInProgress.tag = ClassComponent; // Throw out any hooks that were used.\n\n workInProgress.memoizedState = null;\n workInProgress.updateQueue = null; // Push context providers early to prevent context stack mismatches.\n // During mounting we don't know the child context yet as the instance doesn't exist.\n // We will invalidate the child context in finishClassComponent() right after rendering.\n\n var hasContext = false;\n\n if (isContextProvider(Component)) {\n hasContext = true;\n pushContextProvider(workInProgress);\n } else {\n hasContext = false;\n }\n\n workInProgress.memoizedState = value.state !== null && value.state !== undefined ? value.state : null;\n initializeUpdateQueue(workInProgress);\n adoptClassInstance(workInProgress, value);\n mountClassInstance(workInProgress, Component, props, renderLanes);\n return finishClassComponent(null, workInProgress, Component, true, hasContext, renderLanes);\n } else {\n // Proceed under the assumption that this is a function component\n workInProgress.tag = FunctionComponent;\n\n if (getIsHydrating() && hasId) {\n pushMaterializedTreeId(workInProgress);\n }\n\n reconcileChildren(null, workInProgress, value, renderLanes);\n\n {\n validateFunctionComponentInDev(workInProgress, Component);\n }\n\n return workInProgress.child;\n }\n}\n\nfunction validateFunctionComponentInDev(workInProgress, Component) {\n {\n if (Component) {\n if (Component.childContextTypes) {\n error('childContextTypes cannot be defined on a function component.\\n' + ' %s.childContextTypes = ...', Component.displayName || Component.name || 'Component');\n }\n }\n\n if (workInProgress.ref !== null) {\n var info = '';\n var componentName = getComponentNameFromType(Component) || 'Unknown';\n var ownerName = getCurrentFiberOwnerNameInDevOrNull();\n\n if (ownerName) {\n info += '\\n\\nCheck the render method of `' + ownerName + '`.';\n }\n\n var warningKey = componentName + '|' + (ownerName || '');\n\n if (!didWarnAboutFunctionRefs[warningKey]) {\n didWarnAboutFunctionRefs[warningKey] = true;\n\n error('Function components cannot be given refs. ' + 'Attempts to access this ref will fail. ' + 'Did you mean to use React.forwardRef()?%s', info);\n }\n }\n\n if (Component.defaultProps !== undefined) {\n var _componentName3 = getComponentNameFromType(Component) || 'Unknown';\n\n if (!didWarnAboutDefaultPropsOnFunctionComponent[_componentName3]) {\n error('%s: Support for defaultProps will be removed from function components ' + 'in a future major release. Use JavaScript default parameters instead.', _componentName3);\n\n didWarnAboutDefaultPropsOnFunctionComponent[_componentName3] = true;\n }\n }\n\n if (typeof Component.getDerivedStateFromProps === 'function') {\n var _componentName4 = getComponentNameFromType(Component) || 'Unknown';\n\n if (!didWarnAboutGetDerivedStateOnFunctionComponent[_componentName4]) {\n error('%s: Function components do not support getDerivedStateFromProps.', _componentName4);\n\n didWarnAboutGetDerivedStateOnFunctionComponent[_componentName4] = true;\n }\n }\n\n if (typeof Component.contextType === 'object' && Component.contextType !== null) {\n var _componentName5 = getComponentNameFromType(Component) || 'Unknown';\n\n if (!didWarnAboutContextTypeOnFunctionComponent[_componentName5]) {\n error('%s: Function components do not support contextType.', _componentName5);\n\n didWarnAboutContextTypeOnFunctionComponent[_componentName5] = true;\n }\n }\n }\n}\n\nvar SUSPENDED_MARKER = {\n dehydrated: null,\n treeContext: null,\n retryLane: NoLane\n};\n\nfunction mountSuspenseOffscreenState(renderLanes) {\n return {\n baseLanes: renderLanes,\n cachePool: getSuspendedCache()\n };\n}\n\nfunction updateSuspenseOffscreenState(prevOffscreenState, renderLanes) {\n var cachePool = null;\n\n {\n var prevCachePool = prevOffscreenState.cachePool;\n\n if (prevCachePool !== null) {\n var parentCache = CacheContext._currentValue ;\n\n if (prevCachePool.parent !== parentCache) {\n // Detected a refresh in the parent. This overrides any previously\n // suspended cache.\n cachePool = {\n parent: parentCache,\n pool: parentCache\n };\n } else {\n // We can reuse the cache from last time. The only thing that would have\n // overridden it is a parent refresh, which we checked for above.\n cachePool = prevCachePool;\n }\n } else {\n // If there's no previous cache pool, grab the current one.\n cachePool = getSuspendedCache();\n }\n }\n\n return {\n baseLanes: mergeLanes(prevOffscreenState.baseLanes, renderLanes),\n cachePool: cachePool\n };\n} // TODO: Probably should inline this back\n\n\nfunction shouldRemainOnFallback(current, workInProgress, renderLanes) {\n // If we're already showing a fallback, there are cases where we need to\n // remain on that fallback regardless of whether the content has resolved.\n // For example, SuspenseList coordinates when nested content appears.\n // TODO: For compatibility with offscreen prerendering, this should also check\n // whether the current fiber (if it exists) was visible in the previous tree.\n if (current !== null) {\n var suspenseState = current.memoizedState;\n\n if (suspenseState === null) {\n // Currently showing content. Don't hide it, even if ForceSuspenseFallback\n // is true. More precise name might be \"ForceRemainSuspenseFallback\".\n // Note: This is a factoring smell. Can't remain on a fallback if there's\n // no fallback to remain on.\n return false;\n }\n } // Not currently showing content. Consult the Suspense context.\n\n\n var suspenseContext = suspenseStackCursor.current;\n return hasSuspenseListContext(suspenseContext, ForceSuspenseFallback);\n}\n\nfunction getRemainingWorkInPrimaryTree(current, primaryTreeDidDefer, renderLanes) {\n var remainingLanes = current !== null ? removeLanes(current.childLanes, renderLanes) : NoLanes;\n\n if (primaryTreeDidDefer) {\n // A useDeferredValue hook spawned a deferred task inside the primary tree.\n // Ensure that we retry this component at the deferred priority.\n // TODO: We could make this a per-subtree value instead of a global one.\n // Would need to track it on the context stack somehow, similar to what\n // we'd have to do for resumable contexts.\n remainingLanes = mergeLanes(remainingLanes, peekDeferredLane());\n }\n\n return remainingLanes;\n}\n\nfunction updateSuspenseComponent(current, workInProgress, renderLanes) {\n var nextProps = workInProgress.pendingProps; // This is used by DevTools to force a boundary to suspend.\n\n {\n if (shouldSuspend(workInProgress)) {\n workInProgress.flags |= DidCapture;\n }\n }\n\n var showFallback = false;\n var didSuspend = (workInProgress.flags & DidCapture) !== NoFlags$1;\n\n if (didSuspend || shouldRemainOnFallback(current)) {\n // Something in this boundary's subtree already suspended. Switch to\n // rendering the fallback children.\n showFallback = true;\n workInProgress.flags &= ~DidCapture;\n } // Check if the primary children spawned a deferred task (useDeferredValue)\n // during the first pass.\n\n\n var didPrimaryChildrenDefer = (workInProgress.flags & DidDefer) !== NoFlags$1;\n workInProgress.flags &= ~DidDefer; // OK, the next part is confusing. We're about to reconcile the Suspense\n // boundary's children. This involves some custom reconciliation logic. Two\n // main reasons this is so complicated.\n //\n // First, Legacy Mode has different semantics for backwards compatibility. The\n // primary tree will commit in an inconsistent state, so when we do the\n // second pass to render the fallback, we do some exceedingly, uh, clever\n // hacks to make that not totally break. Like transferring effects and\n // deletions from hidden tree. In Concurrent Mode, it's much simpler,\n // because we bailout on the primary tree completely and leave it in its old\n // state, no effects. Same as what we do for Offscreen (except that\n // Offscreen doesn't have the first render pass).\n //\n // Second is hydration. During hydration, the Suspense fiber has a slightly\n // different layout, where the child points to a dehydrated fragment, which\n // contains the DOM rendered by the server.\n //\n // Third, even if you set all that aside, Suspense is like error boundaries in\n // that we first we try to render one tree, and if that fails, we render again\n // and switch to a different tree. Like a try/catch block. So we have to track\n // which branch we're currently rendering. Ideally we would model this using\n // a stack.\n\n if (current === null) {\n // Initial mount\n // Special path for hydration\n // If we're currently hydrating, try to hydrate this boundary.\n if (getIsHydrating()) {\n // We must push the suspense handler context *before* attempting to\n // hydrate, to avoid a mismatch in case it errors.\n if (showFallback) {\n pushPrimaryTreeSuspenseHandler(workInProgress);\n } else {\n pushFallbackTreeSuspenseHandler(workInProgress);\n }\n\n tryToClaimNextHydratableSuspenseInstance(workInProgress); // This could've been a dehydrated suspense component.\n\n var suspenseState = workInProgress.memoizedState;\n\n if (suspenseState !== null) {\n var dehydrated = suspenseState.dehydrated;\n\n if (dehydrated !== null) {\n return mountDehydratedSuspenseComponent(workInProgress, dehydrated);\n }\n } // If hydration didn't succeed, fall through to the normal Suspense path.\n // To avoid a stack mismatch we need to pop the Suspense handler that we\n // pushed above. This will become less awkward when move the hydration\n // logic to its own fiber.\n\n\n popSuspenseHandler(workInProgress);\n }\n\n var nextPrimaryChildren = nextProps.children;\n var nextFallbackChildren = nextProps.fallback;\n\n if (showFallback) {\n pushFallbackTreeSuspenseHandler(workInProgress);\n var fallbackFragment = mountSuspenseFallbackChildren(workInProgress, nextPrimaryChildren, nextFallbackChildren, renderLanes);\n var primaryChildFragment = workInProgress.child;\n primaryChildFragment.memoizedState = mountSuspenseOffscreenState(renderLanes);\n primaryChildFragment.childLanes = getRemainingWorkInPrimaryTree(current, didPrimaryChildrenDefer, renderLanes);\n workInProgress.memoizedState = SUSPENDED_MARKER;\n\n return fallbackFragment;\n } else {\n pushPrimaryTreeSuspenseHandler(workInProgress);\n return mountSuspensePrimaryChildren(workInProgress, nextPrimaryChildren);\n }\n } else {\n // This is an update.\n // Special path for hydration\n var prevState = current.memoizedState;\n\n if (prevState !== null) {\n var _dehydrated = prevState.dehydrated;\n\n if (_dehydrated !== null) {\n return updateDehydratedSuspenseComponent(current, workInProgress, didSuspend, didPrimaryChildrenDefer, nextProps, _dehydrated, prevState, renderLanes);\n }\n }\n\n if (showFallback) {\n pushFallbackTreeSuspenseHandler(workInProgress);\n var _nextFallbackChildren = nextProps.fallback;\n var _nextPrimaryChildren = nextProps.children;\n var fallbackChildFragment = updateSuspenseFallbackChildren(current, workInProgress, _nextPrimaryChildren, _nextFallbackChildren, renderLanes);\n var _primaryChildFragment2 = workInProgress.child;\n var prevOffscreenState = current.child.memoizedState;\n _primaryChildFragment2.memoizedState = prevOffscreenState === null ? mountSuspenseOffscreenState(renderLanes) : updateSuspenseOffscreenState(prevOffscreenState, renderLanes);\n\n _primaryChildFragment2.childLanes = getRemainingWorkInPrimaryTree(current, didPrimaryChildrenDefer, renderLanes);\n workInProgress.memoizedState = SUSPENDED_MARKER;\n return fallbackChildFragment;\n } else {\n pushPrimaryTreeSuspenseHandler(workInProgress);\n var _nextPrimaryChildren2 = nextProps.children;\n\n var _primaryChildFragment3 = updateSuspensePrimaryChildren(current, workInProgress, _nextPrimaryChildren2, renderLanes);\n\n workInProgress.memoizedState = null;\n return _primaryChildFragment3;\n }\n }\n}\n\nfunction mountSuspensePrimaryChildren(workInProgress, primaryChildren, renderLanes) {\n var mode = workInProgress.mode;\n var primaryChildProps = {\n mode: 'visible',\n children: primaryChildren\n };\n var primaryChildFragment = mountWorkInProgressOffscreenFiber(primaryChildProps, mode);\n primaryChildFragment.return = workInProgress;\n workInProgress.child = primaryChildFragment;\n return primaryChildFragment;\n}\n\nfunction mountSuspenseFallbackChildren(workInProgress, primaryChildren, fallbackChildren, renderLanes) {\n var mode = workInProgress.mode;\n var progressedPrimaryFragment = workInProgress.child;\n var primaryChildProps = {\n mode: 'hidden',\n children: primaryChildren\n };\n var primaryChildFragment;\n var fallbackChildFragment;\n\n if ((mode & ConcurrentMode) === NoMode && progressedPrimaryFragment !== null) {\n // In legacy mode, we commit the primary tree as if it successfully\n // completed, even though it's in an inconsistent state.\n primaryChildFragment = progressedPrimaryFragment;\n primaryChildFragment.childLanes = NoLanes;\n primaryChildFragment.pendingProps = primaryChildProps;\n\n if (workInProgress.mode & ProfileMode) {\n // Reset the durations from the first pass so they aren't included in the\n // final amounts. This seems counterintuitive, since we're intentionally\n // not measuring part of the render phase, but this makes it match what we\n // do in Concurrent Mode.\n primaryChildFragment.actualDuration = 0;\n primaryChildFragment.actualStartTime = -1;\n primaryChildFragment.selfBaseDuration = 0;\n primaryChildFragment.treeBaseDuration = 0;\n }\n\n fallbackChildFragment = createFiberFromFragment(fallbackChildren, mode, renderLanes, null);\n } else {\n primaryChildFragment = mountWorkInProgressOffscreenFiber(primaryChildProps, mode);\n fallbackChildFragment = createFiberFromFragment(fallbackChildren, mode, renderLanes, null);\n }\n\n primaryChildFragment.return = workInProgress;\n fallbackChildFragment.return = workInProgress;\n primaryChildFragment.sibling = fallbackChildFragment;\n workInProgress.child = primaryChildFragment;\n return fallbackChildFragment;\n}\n\nfunction mountWorkInProgressOffscreenFiber(offscreenProps, mode, renderLanes) {\n // The props argument to `createFiberFromOffscreen` is `any` typed, so we use\n // this wrapper function to constrain it.\n return createFiberFromOffscreen(offscreenProps, mode, NoLanes, null);\n}\n\nfunction updateWorkInProgressOffscreenFiber(current, offscreenProps) {\n // The props argument to `createWorkInProgress` is `any` typed, so we use this\n // wrapper function to constrain it.\n return createWorkInProgress(current, offscreenProps);\n}\n\nfunction updateSuspensePrimaryChildren(current, workInProgress, primaryChildren, renderLanes) {\n var currentPrimaryChildFragment = current.child;\n var currentFallbackChildFragment = currentPrimaryChildFragment.sibling;\n var primaryChildFragment = updateWorkInProgressOffscreenFiber(currentPrimaryChildFragment, {\n mode: 'visible',\n children: primaryChildren\n });\n\n if ((workInProgress.mode & ConcurrentMode) === NoMode) {\n primaryChildFragment.lanes = renderLanes;\n }\n\n primaryChildFragment.return = workInProgress;\n primaryChildFragment.sibling = null;\n\n if (currentFallbackChildFragment !== null) {\n // Delete the fallback child fragment\n var deletions = workInProgress.deletions;\n\n if (deletions === null) {\n workInProgress.deletions = [currentFallbackChildFragment];\n workInProgress.flags |= ChildDeletion;\n } else {\n deletions.push(currentFallbackChildFragment);\n }\n }\n\n workInProgress.child = primaryChildFragment;\n return primaryChildFragment;\n}\n\nfunction updateSuspenseFallbackChildren(current, workInProgress, primaryChildren, fallbackChildren, renderLanes) {\n var mode = workInProgress.mode;\n var currentPrimaryChildFragment = current.child;\n var currentFallbackChildFragment = currentPrimaryChildFragment.sibling;\n var primaryChildProps = {\n mode: 'hidden',\n children: primaryChildren\n };\n var primaryChildFragment;\n\n if ( // In legacy mode, we commit the primary tree as if it successfully\n // completed, even though it's in an inconsistent state.\n (mode & ConcurrentMode) === NoMode && // Make sure we're on the second pass, i.e. the primary child fragment was\n // already cloned. In legacy mode, the only case where this isn't true is\n // when DevTools forces us to display a fallback; we skip the first render\n // pass entirely and go straight to rendering the fallback. (In Concurrent\n // Mode, SuspenseList can also trigger this scenario, but this is a legacy-\n // only codepath.)\n workInProgress.child !== currentPrimaryChildFragment) {\n var progressedPrimaryFragment = workInProgress.child;\n primaryChildFragment = progressedPrimaryFragment;\n primaryChildFragment.childLanes = NoLanes;\n primaryChildFragment.pendingProps = primaryChildProps;\n\n if (workInProgress.mode & ProfileMode) {\n // Reset the durations from the first pass so they aren't included in the\n // final amounts. This seems counterintuitive, since we're intentionally\n // not measuring part of the render phase, but this makes it match what we\n // do in Concurrent Mode.\n primaryChildFragment.actualDuration = 0;\n primaryChildFragment.actualStartTime = -1;\n primaryChildFragment.selfBaseDuration = currentPrimaryChildFragment.selfBaseDuration;\n primaryChildFragment.treeBaseDuration = currentPrimaryChildFragment.treeBaseDuration;\n } // The fallback fiber was added as a deletion during the first pass.\n // However, since we're going to remain on the fallback, we no longer want\n // to delete it.\n\n\n workInProgress.deletions = null;\n } else {\n primaryChildFragment = updateWorkInProgressOffscreenFiber(currentPrimaryChildFragment, primaryChildProps); // Since we're reusing a current tree, we need to reuse the flags, too.\n // (We don't do this in legacy mode, because in legacy mode we don't re-use\n // the current tree; see previous branch.)\n\n primaryChildFragment.subtreeFlags = currentPrimaryChildFragment.subtreeFlags & StaticMask;\n }\n\n var fallbackChildFragment;\n\n if (currentFallbackChildFragment !== null) {\n fallbackChildFragment = createWorkInProgress(currentFallbackChildFragment, fallbackChildren);\n } else {\n fallbackChildFragment = createFiberFromFragment(fallbackChildren, mode, renderLanes, null); // Needs a placement effect because the parent (the Suspense boundary) already\n // mounted but this is a new fiber.\n\n fallbackChildFragment.flags |= Placement;\n }\n\n fallbackChildFragment.return = workInProgress;\n primaryChildFragment.return = workInProgress;\n primaryChildFragment.sibling = fallbackChildFragment;\n workInProgress.child = primaryChildFragment;\n return fallbackChildFragment;\n}\n\nfunction retrySuspenseComponentWithoutHydrating(current, workInProgress, renderLanes, recoverableError) {\n // Falling back to client rendering. Because this has performance\n // implications, it's considered a recoverable error, even though the user\n // likely won't observe anything wrong with the UI.\n //\n // The error is passed in as an argument to enforce that every caller provide\n // a custom message, or explicitly opt out (currently the only path that opts\n // out is legacy mode; every concurrent path provides an error).\n if (recoverableError !== null) {\n queueHydrationError(recoverableError);\n } // This will add the old fiber to the deletion list\n\n\n reconcileChildFibers(workInProgress, current.child, null, renderLanes); // We're now not suspended nor dehydrated.\n\n var nextProps = workInProgress.pendingProps;\n var primaryChildren = nextProps.children;\n var primaryChildFragment = mountSuspensePrimaryChildren(workInProgress, primaryChildren); // Needs a placement effect because the parent (the Suspense boundary) already\n // mounted but this is a new fiber.\n\n primaryChildFragment.flags |= Placement;\n workInProgress.memoizedState = null;\n return primaryChildFragment;\n}\n\nfunction mountSuspenseFallbackAfterRetryWithoutHydrating(current, workInProgress, primaryChildren, fallbackChildren, renderLanes) {\n var fiberMode = workInProgress.mode;\n var primaryChildProps = {\n mode: 'visible',\n children: primaryChildren\n };\n var primaryChildFragment = mountWorkInProgressOffscreenFiber(primaryChildProps, fiberMode);\n var fallbackChildFragment = createFiberFromFragment(fallbackChildren, fiberMode, renderLanes, null); // Needs a placement effect because the parent (the Suspense\n // boundary) already mounted but this is a new fiber.\n\n fallbackChildFragment.flags |= Placement;\n primaryChildFragment.return = workInProgress;\n fallbackChildFragment.return = workInProgress;\n primaryChildFragment.sibling = fallbackChildFragment;\n workInProgress.child = primaryChildFragment;\n\n if ((workInProgress.mode & ConcurrentMode) !== NoMode) {\n // We will have dropped the effect list which contains the\n // deletion. We need to reconcile to delete the current child.\n reconcileChildFibers(workInProgress, current.child, null, renderLanes);\n }\n\n return fallbackChildFragment;\n}\n\nfunction mountDehydratedSuspenseComponent(workInProgress, suspenseInstance, renderLanes) {\n // During the first pass, we'll bail out and not drill into the children.\n // Instead, we'll leave the content in place and try to hydrate it later.\n if ((workInProgress.mode & ConcurrentMode) === NoMode) {\n {\n error('Cannot hydrate Suspense in legacy mode. Switch from ' + 'ReactDOM.hydrate(element, container) to ' + 'ReactDOMClient.hydrateRoot(container, <App />)' + '.render(element) or remove the Suspense components from ' + 'the server rendered components.');\n }\n\n workInProgress.lanes = laneToLanes(SyncLane);\n } else if (isSuspenseInstanceFallback(suspenseInstance)) {\n // This is a client-only boundary. Since we won't get any content from the server\n // for this, we need to schedule that at a higher priority based on when it would\n // have timed out. In theory we could render it in this pass but it would have the\n // wrong priority associated with it and will prevent hydration of parent path.\n // Instead, we'll leave work left on it to render it in a separate commit.\n // TODO This time should be the time at which the server rendered response that is\n // a parent to this boundary was displayed. However, since we currently don't have\n // a protocol to transfer that time, we'll just estimate it by using the current\n // time. This will mean that Suspense timeouts are slightly shifted to later than\n // they should be.\n // Schedule a normal pri update to render this content.\n workInProgress.lanes = laneToLanes(DefaultHydrationLane);\n } else {\n // We'll continue hydrating the rest at offscreen priority since we'll already\n // be showing the right content coming from the server, it is no rush.\n workInProgress.lanes = laneToLanes(OffscreenLane);\n }\n\n return null;\n}\n\nfunction updateDehydratedSuspenseComponent(current, workInProgress, didSuspend, didPrimaryChildrenDefer, nextProps, suspenseInstance, suspenseState, renderLanes) {\n if (!didSuspend) {\n // This is the first render pass. Attempt to hydrate.\n pushPrimaryTreeSuspenseHandler(workInProgress); // We should never be hydrating at this point because it is the first pass,\n // but after we've already committed once.\n\n warnIfHydrating();\n\n if ((workInProgress.mode & ConcurrentMode) === NoMode) {\n return retrySuspenseComponentWithoutHydrating(current, workInProgress, renderLanes, null);\n }\n\n if (isSuspenseInstanceFallback(suspenseInstance)) {\n // This boundary is in a permanent fallback state. In this case, we'll never\n // get an update and we'll never be able to hydrate the final content. Let's just try the\n // client side render instead.\n var digest;\n var message, stack;\n\n {\n var _getSuspenseInstanceF = getSuspenseInstanceFallbackErrorDetails(suspenseInstance);\n\n digest = _getSuspenseInstanceF.digest;\n message = _getSuspenseInstanceF.message;\n stack = _getSuspenseInstanceF.stack;\n }\n\n var capturedValue = null; // TODO: Figure out a better signal than encoding a magic digest value.\n\n {\n var error;\n\n if (message) {\n // eslint-disable-next-line react-internal/prod-error-codes\n error = new Error(message);\n } else {\n error = new Error('The server could not finish this Suspense boundary, likely ' + 'due to an error during server rendering. Switched to ' + 'client rendering.');\n }\n\n error.digest = digest;\n capturedValue = createCapturedValueFromError(error, digest, stack);\n }\n\n return retrySuspenseComponentWithoutHydrating(current, workInProgress, renderLanes, capturedValue);\n }\n // any context has changed, we need to treat is as if the input might have changed.\n\n\n var hasContextChanged = includesSomeLane(renderLanes, current.childLanes);\n\n if (didReceiveUpdate || hasContextChanged) {\n // This boundary has changed since the first render. This means that we are now unable to\n // hydrate it. We might still be able to hydrate it using a higher priority lane.\n var root = getWorkInProgressRoot();\n\n if (root !== null) {\n var attemptHydrationAtLane = getBumpedLaneForHydration(root, renderLanes);\n\n if (attemptHydrationAtLane !== NoLane && attemptHydrationAtLane !== suspenseState.retryLane) {\n // Intentionally mutating since this render will get interrupted. This\n // is one of the very rare times where we mutate the current tree\n // during the render phase.\n suspenseState.retryLane = attemptHydrationAtLane;\n enqueueConcurrentRenderForLane(current, attemptHydrationAtLane);\n scheduleUpdateOnFiber(root, current, attemptHydrationAtLane); // Throw a special object that signals to the work loop that it should\n // interrupt the current render.\n //\n // Because we're inside a React-only execution stack, we don't\n // strictly need to throw here — we could instead modify some internal\n // work loop state. But using an exception means we don't need to\n // check for this case on every iteration of the work loop. So doing\n // it this way moves the check out of the fast path.\n\n throw SelectiveHydrationException;\n }\n } // If we did not selectively hydrate, we'll continue rendering without\n // hydrating. Mark this tree as suspended to prevent it from committing\n // outside a transition.\n //\n // This path should only happen if the hydration lane already suspended.\n // Currently, it also happens during sync updates because there is no\n // hydration lane for sync updates.\n // TODO: We should ideally have a sync hydration lane that we can apply to do\n // a pass where we hydrate this subtree in place using the previous Context and then\n // reapply the update afterwards.\n\n\n if (isSuspenseInstancePending(suspenseInstance)) ; else {\n renderDidSuspendDelayIfPossible();\n }\n\n return retrySuspenseComponentWithoutHydrating(current, workInProgress, renderLanes, null);\n } else if (isSuspenseInstancePending(suspenseInstance)) {\n // This component is still pending more data from the server, so we can't hydrate its\n // content. We treat it as if this component suspended itself. It might seem as if\n // we could just try to render it client-side instead. However, this will perform a\n // lot of unnecessary work and is unlikely to complete since it often will suspend\n // on missing data anyway. Additionally, the server might be able to render more\n // than we can on the client yet. In that case we'd end up with more fallback states\n // on the client than if we just leave it alone. If the server times out or errors\n // these should update this boundary to the permanent Fallback state instead.\n // Mark it as having captured (i.e. suspended).\n workInProgress.flags |= DidCapture; // Leave the child in place. I.e. the dehydrated fragment.\n\n workInProgress.child = current.child; // Register a callback to retry this boundary once the server has sent the result.\n\n var retry = retryDehydratedSuspenseBoundary.bind(null, current);\n registerSuspenseInstanceRetry(suspenseInstance, retry);\n return null;\n } else {\n // This is the first attempt.\n reenterHydrationStateFromDehydratedSuspenseInstance(workInProgress, suspenseInstance, suspenseState.treeContext);\n var primaryChildren = nextProps.children;\n var primaryChildFragment = mountSuspensePrimaryChildren(workInProgress, primaryChildren); // Mark the children as hydrating. This is a fast path to know whether this\n // tree is part of a hydrating tree. This is used to determine if a child\n // node has fully mounted yet, and for scheduling event replaying.\n // Conceptually this is similar to Placement in that a new subtree is\n // inserted into the React tree here. It just happens to not need DOM\n // mutations because it already exists.\n\n primaryChildFragment.flags |= Hydrating;\n return primaryChildFragment;\n }\n } else {\n // This is the second render pass. We already attempted to hydrated, but\n // something either suspended or errored.\n if (workInProgress.flags & ForceClientRender) {\n // Something errored during hydration. Try again without hydrating.\n pushPrimaryTreeSuspenseHandler(workInProgress);\n workInProgress.flags &= ~ForceClientRender;\n\n var _capturedValue = createCapturedValueFromError(new Error('There was an error while hydrating this Suspense boundary. ' + 'Switched to client rendering.'));\n\n return retrySuspenseComponentWithoutHydrating(current, workInProgress, renderLanes, _capturedValue);\n } else if (workInProgress.memoizedState !== null) {\n // Something suspended and we should still be in dehydrated mode.\n // Leave the existing child in place.\n // Push to avoid a mismatch\n pushFallbackTreeSuspenseHandler(workInProgress);\n workInProgress.child = current.child; // The dehydrated completion pass expects this flag to be there\n // but the normal suspense pass doesn't.\n\n workInProgress.flags |= DidCapture;\n return null;\n } else {\n // Suspended but we should no longer be in dehydrated mode.\n // Therefore we now have to render the fallback.\n pushFallbackTreeSuspenseHandler(workInProgress);\n var nextPrimaryChildren = nextProps.children;\n var nextFallbackChildren = nextProps.fallback;\n var fallbackChildFragment = mountSuspenseFallbackAfterRetryWithoutHydrating(current, workInProgress, nextPrimaryChildren, nextFallbackChildren, renderLanes);\n var _primaryChildFragment4 = workInProgress.child;\n _primaryChildFragment4.memoizedState = mountSuspenseOffscreenState(renderLanes);\n _primaryChildFragment4.childLanes = getRemainingWorkInPrimaryTree(current, didPrimaryChildrenDefer, renderLanes);\n workInProgress.memoizedState = SUSPENDED_MARKER;\n return fallbackChildFragment;\n }\n }\n}\n\nfunction scheduleSuspenseWorkOnFiber(fiber, renderLanes, propagationRoot) {\n fiber.lanes = mergeLanes(fiber.lanes, renderLanes);\n var alternate = fiber.alternate;\n\n if (alternate !== null) {\n alternate.lanes = mergeLanes(alternate.lanes, renderLanes);\n }\n\n scheduleContextWorkOnParentPath(fiber.return, renderLanes, propagationRoot);\n}\n\nfunction propagateSuspenseContextChange(workInProgress, firstChild, renderLanes) {\n // Mark any Suspense boundaries with fallbacks as having work to do.\n // If they were previously forced into fallbacks, they may now be able\n // to unblock.\n var node = firstChild;\n\n while (node !== null) {\n if (node.tag === SuspenseComponent) {\n var state = node.memoizedState;\n\n if (state !== null) {\n scheduleSuspenseWorkOnFiber(node, renderLanes, workInProgress);\n }\n } else if (node.tag === SuspenseListComponent) {\n // If the tail is hidden there might not be an Suspense boundaries\n // to schedule work on. In this case we have to schedule it on the\n // list itself.\n // We don't have to traverse to the children of the list since\n // the list will propagate the change when it rerenders.\n scheduleSuspenseWorkOnFiber(node, renderLanes, workInProgress);\n } else if (node.child !== null) {\n node.child.return = node;\n node = node.child;\n continue;\n }\n\n if (node === workInProgress) {\n return;\n } // $FlowFixMe[incompatible-use] found when upgrading Flow\n\n\n while (node.sibling === null) {\n // $FlowFixMe[incompatible-use] found when upgrading Flow\n if (node.return === null || node.return === workInProgress) {\n return;\n }\n\n node = node.return;\n } // $FlowFixMe[incompatible-use] found when upgrading Flow\n\n\n node.sibling.return = node.return;\n node = node.sibling;\n }\n}\n\nfunction findLastContentRow(firstChild) {\n // This is going to find the last row among these children that is already\n // showing content on the screen, as opposed to being in fallback state or\n // new. If a row has multiple Suspense boundaries, any of them being in the\n // fallback state, counts as the whole row being in a fallback state.\n // Note that the \"rows\" will be workInProgress, but any nested children\n // will still be current since we haven't rendered them yet. The mounted\n // order may not be the same as the new order. We use the new order.\n var row = firstChild;\n var lastContentRow = null;\n\n while (row !== null) {\n var currentRow = row.alternate; // New rows can't be content rows.\n\n if (currentRow !== null && findFirstSuspended(currentRow) === null) {\n lastContentRow = row;\n }\n\n row = row.sibling;\n }\n\n return lastContentRow;\n}\n\nfunction validateRevealOrder(revealOrder) {\n {\n if (revealOrder !== undefined && revealOrder !== 'forwards' && revealOrder !== 'backwards' && revealOrder !== 'together' && !didWarnAboutRevealOrder[revealOrder]) {\n didWarnAboutRevealOrder[revealOrder] = true;\n\n if (typeof revealOrder === 'string') {\n switch (revealOrder.toLowerCase()) {\n case 'together':\n case 'forwards':\n case 'backwards':\n {\n error('\"%s\" is not a valid value for revealOrder on <SuspenseList />. ' + 'Use lowercase \"%s\" instead.', revealOrder, revealOrder.toLowerCase());\n\n break;\n }\n\n case 'forward':\n case 'backward':\n {\n error('\"%s\" is not a valid value for revealOrder on <SuspenseList />. ' + 'React uses the -s suffix in the spelling. Use \"%ss\" instead.', revealOrder, revealOrder.toLowerCase());\n\n break;\n }\n\n default:\n error('\"%s\" is not a supported revealOrder on <SuspenseList />. ' + 'Did you mean \"together\", \"forwards\" or \"backwards\"?', revealOrder);\n\n break;\n }\n } else {\n error('%s is not a supported value for revealOrder on <SuspenseList />. ' + 'Did you mean \"together\", \"forwards\" or \"backwards\"?', revealOrder);\n }\n }\n }\n}\n\nfunction validateTailOptions(tailMode, revealOrder) {\n {\n if (tailMode !== undefined && !didWarnAboutTailOptions[tailMode]) {\n if (tailMode !== 'collapsed' && tailMode !== 'hidden') {\n didWarnAboutTailOptions[tailMode] = true;\n\n error('\"%s\" is not a supported value for tail on <SuspenseList />. ' + 'Did you mean \"collapsed\" or \"hidden\"?', tailMode);\n } else if (revealOrder !== 'forwards' && revealOrder !== 'backwards') {\n didWarnAboutTailOptions[tailMode] = true;\n\n error('<SuspenseList tail=\"%s\" /> is only valid if revealOrder is ' + '\"forwards\" or \"backwards\". ' + 'Did you mean to specify revealOrder=\"forwards\"?', tailMode);\n }\n }\n }\n}\n\nfunction validateSuspenseListNestedChild(childSlot, index) {\n {\n var isAnArray = isArray(childSlot);\n var isIterable = !isAnArray && typeof getIteratorFn(childSlot) === 'function';\n\n if (isAnArray || isIterable) {\n var type = isAnArray ? 'array' : 'iterable';\n\n error('A nested %s was passed to row #%s in <SuspenseList />. Wrap it in ' + 'an additional SuspenseList to configure its revealOrder: ' + '<SuspenseList revealOrder=...> ... ' + '<SuspenseList revealOrder=...>{%s}</SuspenseList> ... ' + '</SuspenseList>', type, index, type);\n\n return false;\n }\n }\n\n return true;\n}\n\nfunction validateSuspenseListChildren(children, revealOrder) {\n {\n if ((revealOrder === 'forwards' || revealOrder === 'backwards') && children !== undefined && children !== null && children !== false) {\n if (isArray(children)) {\n for (var i = 0; i < children.length; i++) {\n if (!validateSuspenseListNestedChild(children[i], i)) {\n return;\n }\n }\n } else {\n var iteratorFn = getIteratorFn(children);\n\n if (typeof iteratorFn === 'function') {\n var childrenIterator = iteratorFn.call(children);\n\n if (childrenIterator) {\n var step = childrenIterator.next();\n var _i = 0;\n\n for (; !step.done; step = childrenIterator.next()) {\n if (!validateSuspenseListNestedChild(step.value, _i)) {\n return;\n }\n\n _i++;\n }\n }\n } else {\n error('A single row was passed to a <SuspenseList revealOrder=\"%s\" />. ' + 'This is not useful since it needs multiple rows. ' + 'Did you mean to pass multiple children or an array?', revealOrder);\n }\n }\n }\n }\n}\n\nfunction initSuspenseListRenderState(workInProgress, isBackwards, tail, lastContentRow, tailMode) {\n var renderState = workInProgress.memoizedState;\n\n if (renderState === null) {\n workInProgress.memoizedState = {\n isBackwards: isBackwards,\n rendering: null,\n renderingStartTime: 0,\n last: lastContentRow,\n tail: tail,\n tailMode: tailMode\n };\n } else {\n // We can reuse the existing object from previous renders.\n renderState.isBackwards = isBackwards;\n renderState.rendering = null;\n renderState.renderingStartTime = 0;\n renderState.last = lastContentRow;\n renderState.tail = tail;\n renderState.tailMode = tailMode;\n }\n} // This can end up rendering this component multiple passes.\n// The first pass splits the children fibers into two sets. A head and tail.\n// We first render the head. If anything is in fallback state, we do another\n// pass through beginWork to rerender all children (including the tail) with\n// the force suspend context. If the first render didn't have anything in\n// in fallback state. Then we render each row in the tail one-by-one.\n// That happens in the completeWork phase without going back to beginWork.\n\n\nfunction updateSuspenseListComponent(current, workInProgress, renderLanes) {\n var nextProps = workInProgress.pendingProps;\n var revealOrder = nextProps.revealOrder;\n var tailMode = nextProps.tail;\n var newChildren = nextProps.children;\n validateRevealOrder(revealOrder);\n validateTailOptions(tailMode, revealOrder);\n validateSuspenseListChildren(newChildren, revealOrder);\n reconcileChildren(current, workInProgress, newChildren, renderLanes);\n var suspenseContext = suspenseStackCursor.current;\n var shouldForceFallback = hasSuspenseListContext(suspenseContext, ForceSuspenseFallback);\n\n if (shouldForceFallback) {\n suspenseContext = setShallowSuspenseListContext(suspenseContext, ForceSuspenseFallback);\n workInProgress.flags |= DidCapture;\n } else {\n var didSuspendBefore = current !== null && (current.flags & DidCapture) !== NoFlags$1;\n\n if (didSuspendBefore) {\n // If we previously forced a fallback, we need to schedule work\n // on any nested boundaries to let them know to try to render\n // again. This is the same as context updating.\n propagateSuspenseContextChange(workInProgress, workInProgress.child, renderLanes);\n }\n\n suspenseContext = setDefaultShallowSuspenseListContext(suspenseContext);\n }\n\n pushSuspenseListContext(workInProgress, suspenseContext);\n\n if ((workInProgress.mode & ConcurrentMode) === NoMode) {\n // In legacy mode, SuspenseList doesn't work so we just\n // use make it a noop by treating it as the default revealOrder.\n workInProgress.memoizedState = null;\n } else {\n switch (revealOrder) {\n case 'forwards':\n {\n var lastContentRow = findLastContentRow(workInProgress.child);\n var tail;\n\n if (lastContentRow === null) {\n // The whole list is part of the tail.\n // TODO: We could fast path by just rendering the tail now.\n tail = workInProgress.child;\n workInProgress.child = null;\n } else {\n // Disconnect the tail rows after the content row.\n // We're going to render them separately later.\n tail = lastContentRow.sibling;\n lastContentRow.sibling = null;\n }\n\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n tail, lastContentRow, tailMode);\n break;\n }\n\n case 'backwards':\n {\n // We're going to find the first row that has existing content.\n // At the same time we're going to reverse the list of everything\n // we pass in the meantime. That's going to be our tail in reverse\n // order.\n var _tail = null;\n var row = workInProgress.child;\n workInProgress.child = null;\n\n while (row !== null) {\n var currentRow = row.alternate; // New rows can't be content rows.\n\n if (currentRow !== null && findFirstSuspended(currentRow) === null) {\n // This is the beginning of the main content.\n workInProgress.child = row;\n break;\n }\n\n var nextRow = row.sibling;\n row.sibling = _tail;\n _tail = row;\n row = nextRow;\n } // TODO: If workInProgress.child is null, we can continue on the tail immediately.\n\n\n initSuspenseListRenderState(workInProgress, true, // isBackwards\n _tail, null, // last\n tailMode);\n break;\n }\n\n case 'together':\n {\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n null, // tail\n null, // last\n undefined);\n break;\n }\n\n default:\n {\n // The default reveal order is the same as not having\n // a boundary.\n workInProgress.memoizedState = null;\n }\n }\n }\n\n return workInProgress.child;\n}\n\nfunction updatePortalComponent(current, workInProgress, renderLanes) {\n pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);\n var nextChildren = workInProgress.pendingProps;\n\n if (current === null) {\n // Portals are special because we don't append the children during mount\n // but at commit. Therefore we need to track insertions which the normal\n // flow doesn't do during mount. This doesn't happen at the root because\n // the root always starts with a \"current\" with a null child.\n // TODO: Consider unifying this with how the root works.\n workInProgress.child = reconcileChildFibers(workInProgress, null, nextChildren, renderLanes);\n } else {\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n }\n\n return workInProgress.child;\n}\n\nvar hasWarnedAboutUsingNoValuePropOnContextProvider = false;\n\nfunction updateContextProvider(current, workInProgress, renderLanes) {\n var context;\n\n {\n context = workInProgress.type._context;\n }\n\n var newProps = workInProgress.pendingProps;\n var oldProps = workInProgress.memoizedProps;\n var newValue = newProps.value;\n\n {\n if (!('value' in newProps)) {\n if (!hasWarnedAboutUsingNoValuePropOnContextProvider) {\n hasWarnedAboutUsingNoValuePropOnContextProvider = true;\n\n error('The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?');\n }\n }\n }\n\n pushProvider(workInProgress, context, newValue);\n\n {\n if (oldProps !== null) {\n var oldValue = oldProps.value;\n\n if (objectIs(oldValue, newValue)) {\n // No change. Bailout early if children are the same.\n if (oldProps.children === newProps.children && !hasContextChanged()) {\n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n }\n } else {\n // The context value changed. Search for matching consumers and schedule\n // them to update.\n propagateContextChange(workInProgress, context, renderLanes);\n }\n }\n }\n\n var newChildren = newProps.children;\n reconcileChildren(current, workInProgress, newChildren, renderLanes);\n return workInProgress.child;\n}\n\nfunction updateContextConsumer(current, workInProgress, renderLanes) {\n var context;\n\n {\n context = workInProgress.type;\n\n {\n if (context._context !== undefined) {\n context = context._context;\n }\n }\n }\n\n var newProps = workInProgress.pendingProps;\n var render = newProps.children;\n\n {\n if (typeof render !== 'function') {\n error('A context consumer was rendered with multiple children, or a child ' + \"that isn't a function. A context consumer expects a single child \" + 'that is a function. If you did pass a function, make sure there ' + 'is no trailing or leading whitespace around it.');\n }\n }\n\n prepareToReadContext(workInProgress, renderLanes);\n var newValue = readContext(context);\n\n {\n markComponentRenderStarted(workInProgress);\n }\n\n var newChildren;\n\n {\n ReactCurrentOwner$2.current = workInProgress;\n setIsRendering(true);\n newChildren = render(newValue);\n setIsRendering(false);\n }\n\n {\n markComponentRenderStopped();\n } // React DevTools reads this flag.\n\n\n workInProgress.flags |= PerformedWork;\n reconcileChildren(current, workInProgress, newChildren, renderLanes);\n return workInProgress.child;\n}\n\nfunction markWorkInProgressReceivedUpdate() {\n didReceiveUpdate = true;\n}\n\nfunction resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress) {\n if ((workInProgress.mode & ConcurrentMode) === NoMode) {\n if (current !== null) {\n // A lazy component only mounts if it suspended inside a non-\n // concurrent tree, in an inconsistent state. We want to treat it like\n // a new mount, even though an empty version of it already committed.\n // Disconnect the alternate pointers.\n current.alternate = null;\n workInProgress.alternate = null; // Since this is conceptually a new fiber, schedule a Placement effect\n\n workInProgress.flags |= Placement;\n }\n }\n}\n\nfunction bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes) {\n if (current !== null) {\n // Reuse previous dependencies\n workInProgress.dependencies = current.dependencies;\n }\n\n {\n // Don't update \"base\" render times for bailouts.\n stopProfilerTimerIfRunning();\n }\n\n markSkippedUpdateLanes(workInProgress.lanes); // Check if the children have any pending work.\n\n if (!includesSomeLane(renderLanes, workInProgress.childLanes)) {\n // The children don't have any work either. We can skip them.\n // TODO: Once we add back resuming, we should check if the children are\n // a work-in-progress set. If so, we need to transfer their effects.\n {\n return null;\n }\n } // This fiber doesn't have work, but its subtree does. Clone the child\n // fibers and continue.\n\n\n cloneChildFibers(current, workInProgress);\n return workInProgress.child;\n}\n\nfunction remountFiber(current, oldWorkInProgress, newWorkInProgress) {\n {\n var returnFiber = oldWorkInProgress.return;\n\n if (returnFiber === null) {\n // eslint-disable-next-line react-internal/prod-error-codes\n throw new Error('Cannot swap the root fiber.');\n } // Disconnect from the old current.\n // It will get deleted.\n\n\n current.alternate = null;\n oldWorkInProgress.alternate = null; // Connect to the new tree.\n\n newWorkInProgress.index = oldWorkInProgress.index;\n newWorkInProgress.sibling = oldWorkInProgress.sibling;\n newWorkInProgress.return = oldWorkInProgress.return;\n newWorkInProgress.ref = oldWorkInProgress.ref;\n\n {\n newWorkInProgress._debugInfo = oldWorkInProgress._debugInfo;\n } // Replace the child/sibling pointers above it.\n\n\n if (oldWorkInProgress === returnFiber.child) {\n returnFiber.child = newWorkInProgress;\n } else {\n var prevSibling = returnFiber.child;\n\n if (prevSibling === null) {\n // eslint-disable-next-line react-internal/prod-error-codes\n throw new Error('Expected parent to have a child.');\n } // $FlowFixMe[incompatible-use] found when upgrading Flow\n\n\n while (prevSibling.sibling !== oldWorkInProgress) {\n // $FlowFixMe[incompatible-use] found when upgrading Flow\n prevSibling = prevSibling.sibling;\n\n if (prevSibling === null) {\n // eslint-disable-next-line react-internal/prod-error-codes\n throw new Error('Expected to find the previous sibling.');\n }\n } // $FlowFixMe[incompatible-use] found when upgrading Flow\n\n\n prevSibling.sibling = newWorkInProgress;\n } // Delete the old fiber and place the new one.\n // Since the old fiber is disconnected, we have to schedule it manually.\n\n\n var deletions = returnFiber.deletions;\n\n if (deletions === null) {\n returnFiber.deletions = [current];\n returnFiber.flags |= ChildDeletion;\n } else {\n deletions.push(current);\n }\n\n newWorkInProgress.flags |= Placement; // Restart work from the new fiber.\n\n return newWorkInProgress;\n }\n}\n\nfunction checkScheduledUpdateOrContext(current, renderLanes) {\n // Before performing an early bailout, we must check if there are pending\n // updates or context.\n var updateLanes = current.lanes;\n\n if (includesSomeLane(updateLanes, renderLanes)) {\n return true;\n } // No pending update, but because context is propagated lazily, we need\n\n return false;\n}\n\nfunction attemptEarlyBailoutIfNoScheduledUpdate(current, workInProgress, renderLanes) {\n // This fiber does not have any pending work. Bailout without entering\n // the begin phase. There's still some bookkeeping we that needs to be done\n // in this optimized path, mostly pushing stuff onto the stack.\n switch (workInProgress.tag) {\n case HostRoot:\n pushHostRootContext(workInProgress);\n\n {\n var cache = current.memoizedState.cache;\n pushCacheProvider(workInProgress, cache);\n }\n\n resetHydrationState();\n break;\n\n case HostSingleton:\n case HostComponent:\n pushHostContext(workInProgress);\n break;\n\n case ClassComponent:\n {\n var Component = workInProgress.type;\n\n if (isContextProvider(Component)) {\n pushContextProvider(workInProgress);\n }\n\n break;\n }\n\n case HostPortal:\n pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);\n break;\n\n case ContextProvider:\n {\n var newValue = workInProgress.memoizedProps.value;\n var context;\n\n {\n context = workInProgress.type._context;\n }\n\n pushProvider(workInProgress, context, newValue);\n break;\n }\n\n case Profiler:\n {\n // Profiler should only call onRender when one of its descendants actually rendered.\n var hasChildWork = includesSomeLane(renderLanes, workInProgress.childLanes);\n\n if (hasChildWork) {\n workInProgress.flags |= Update;\n }\n\n {\n // Reset effect durations for the next eventual effect phase.\n // These are reset during render to allow the DevTools commit hook a chance to read them,\n var stateNode = workInProgress.stateNode;\n stateNode.effectDuration = 0;\n stateNode.passiveEffectDuration = 0;\n }\n }\n\n break;\n\n case SuspenseComponent:\n {\n var state = workInProgress.memoizedState;\n\n if (state !== null) {\n if (state.dehydrated !== null) {\n // We're not going to render the children, so this is just to maintain\n // push/pop symmetry\n pushPrimaryTreeSuspenseHandler(workInProgress); // We know that this component will suspend again because if it has\n // been unsuspended it has committed as a resolved Suspense component.\n // If it needs to be retried, it should have work scheduled on it.\n\n workInProgress.flags |= DidCapture; // We should never render the children of a dehydrated boundary until we\n // upgrade it. We return null instead of bailoutOnAlreadyFinishedWork.\n\n return null;\n } // If this boundary is currently timed out, we need to decide\n // whether to retry the primary children, or to skip over it and\n // go straight to the fallback. Check the priority of the primary\n // child fragment.\n\n\n var primaryChildFragment = workInProgress.child;\n var primaryChildLanes = primaryChildFragment.childLanes;\n\n if (includesSomeLane(renderLanes, primaryChildLanes)) {\n // The primary children have pending work. Use the normal path\n // to attempt to render the primary children again.\n return updateSuspenseComponent(current, workInProgress, renderLanes);\n } else {\n // The primary child fragment does not have pending work marked\n // on it\n pushPrimaryTreeSuspenseHandler(workInProgress); // The primary children do not have pending work with sufficient\n // priority. Bailout.\n\n var child = bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n\n if (child !== null) {\n // The fallback children have pending work. Skip over the\n // primary children and work on the fallback.\n return child.sibling;\n } else {\n // Note: We can return `null` here because we already checked\n // whether there were nested context consumers, via the call to\n // `bailoutOnAlreadyFinishedWork` above.\n return null;\n }\n }\n } else {\n pushPrimaryTreeSuspenseHandler(workInProgress);\n }\n\n break;\n }\n\n case SuspenseListComponent:\n {\n var didSuspendBefore = (current.flags & DidCapture) !== NoFlags$1;\n\n var _hasChildWork = includesSomeLane(renderLanes, workInProgress.childLanes);\n\n if (didSuspendBefore) {\n if (_hasChildWork) {\n // If something was in fallback state last time, and we have all the\n // same children then we're still in progressive loading state.\n // Something might get unblocked by state updates or retries in the\n // tree which will affect the tail. So we need to use the normal\n // path to compute the correct tail.\n return updateSuspenseListComponent(current, workInProgress, renderLanes);\n } // If none of the children had any work, that means that none of\n // them got retried so they'll still be blocked in the same way\n // as before. We can fast bail out.\n\n\n workInProgress.flags |= DidCapture;\n } // If nothing suspended before and we're rendering the same children,\n // then the tail doesn't matter. Anything new that suspends will work\n // in the \"together\" mode, so we can continue from the state we had.\n\n\n var renderState = workInProgress.memoizedState;\n\n if (renderState !== null) {\n // Reset to the \"together\" mode in case we've started a different\n // update in the past but didn't complete it.\n renderState.rendering = null;\n renderState.tail = null;\n renderState.lastEffect = null;\n }\n\n pushSuspenseListContext(workInProgress, suspenseStackCursor.current);\n\n if (_hasChildWork) {\n break;\n } else {\n // If none of the children had any work, that means that none of\n // them got retried so they'll still be blocked in the same way\n // as before. We can fast bail out.\n return null;\n }\n }\n\n case OffscreenComponent:\n case LegacyHiddenComponent:\n {\n // Need to check if the tree still needs to be deferred. This is\n // almost identical to the logic used in the normal update path,\n // so we'll just enter that. The only difference is we'll bail out\n // at the next level instead of this one, because the child props\n // have not changed. Which is fine.\n // TODO: Probably should refactor `beginWork` to split the bailout\n // path from the normal path. I'm tempted to do a labeled break here\n // but I won't :)\n workInProgress.lanes = NoLanes;\n return updateOffscreenComponent(current, workInProgress, renderLanes);\n }\n\n case CacheComponent:\n {\n {\n var _cache = current.memoizedState.cache;\n pushCacheProvider(workInProgress, _cache);\n }\n\n break;\n }\n }\n\n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n}\n\nfunction beginWork(current, workInProgress, renderLanes) {\n {\n if (workInProgress._debugNeedsRemount && current !== null) {\n // This will restart the begin phase with a new fiber.\n return remountFiber(current, workInProgress, createFiberFromTypeAndProps(workInProgress.type, workInProgress.key, workInProgress.pendingProps, workInProgress._debugOwner || null, workInProgress.mode, workInProgress.lanes));\n }\n }\n\n if (current !== null) {\n var oldProps = current.memoizedProps;\n var newProps = workInProgress.pendingProps;\n\n if (oldProps !== newProps || hasContextChanged() || ( // Force a re-render if the implementation changed due to hot reload:\n workInProgress.type !== current.type )) {\n // If props or context changed, mark the fiber as having performed work.\n // This may be unset if the props are determined to be equal later (memo).\n didReceiveUpdate = true;\n } else {\n // Neither props nor legacy context changes. Check if there's a pending\n // update or context change.\n var hasScheduledUpdateOrContext = checkScheduledUpdateOrContext(current, renderLanes);\n\n if (!hasScheduledUpdateOrContext && // If this is the second pass of an error or suspense boundary, there\n // may not be work scheduled on `current`, so we check for this flag.\n (workInProgress.flags & DidCapture) === NoFlags$1) {\n // No pending updates or context. Bail out now.\n didReceiveUpdate = false;\n return attemptEarlyBailoutIfNoScheduledUpdate(current, workInProgress, renderLanes);\n }\n\n if ((current.flags & ForceUpdateForLegacySuspense) !== NoFlags$1) {\n // This is a special case that only exists for legacy mode.\n // See https://github.com/facebook/react/pull/19216.\n didReceiveUpdate = true;\n } else {\n // An update was scheduled on this fiber, but there are no new props\n // nor legacy context. Set this to false. If an update queue or context\n // consumer produces a changed value, it will set this to true. Otherwise,\n // the component will assume the children have not changed and bail out.\n didReceiveUpdate = false;\n }\n }\n } else {\n didReceiveUpdate = false;\n\n if (getIsHydrating() && isForkedChild(workInProgress)) {\n // Check if this child belongs to a list of muliple children in\n // its parent.\n //\n // In a true multi-threaded implementation, we would render children on\n // parallel threads. This would represent the beginning of a new render\n // thread for this subtree.\n //\n // We only use this for id generation during hydration, which is why the\n // logic is located in this special branch.\n var slotIndex = workInProgress.index;\n var numberOfForks = getForksAtLevel();\n pushTreeId(workInProgress, numberOfForks, slotIndex);\n }\n } // Before entering the begin phase, clear pending update priority.\n // TODO: This assumes that we're about to evaluate the component and process\n // the update queue. However, there's an exception: SimpleMemoComponent\n // sometimes bails out later in the begin phase. This indicates that we should\n // move this assignment out of the common path and into each branch.\n\n\n workInProgress.lanes = NoLanes;\n\n switch (workInProgress.tag) {\n case IndeterminateComponent:\n {\n return mountIndeterminateComponent(current, workInProgress, workInProgress.type, renderLanes);\n }\n\n case LazyComponent:\n {\n var elementType = workInProgress.elementType;\n return mountLazyComponent(current, workInProgress, elementType, renderLanes);\n }\n\n case FunctionComponent:\n {\n var Component = workInProgress.type;\n var unresolvedProps = workInProgress.pendingProps;\n var resolvedProps = workInProgress.elementType === Component ? unresolvedProps : resolveDefaultProps(Component, unresolvedProps);\n return updateFunctionComponent(current, workInProgress, Component, resolvedProps, renderLanes);\n }\n\n case ClassComponent:\n {\n var _Component = workInProgress.type;\n var _unresolvedProps = workInProgress.pendingProps;\n\n var _resolvedProps = workInProgress.elementType === _Component ? _unresolvedProps : resolveDefaultProps(_Component, _unresolvedProps);\n\n return updateClassComponent(current, workInProgress, _Component, _resolvedProps, renderLanes);\n }\n\n case HostRoot:\n return updateHostRoot(current, workInProgress, renderLanes);\n\n case HostHoistable:\n {\n return updateHostHoistable(current, workInProgress);\n }\n\n // Fall through\n\n case HostSingleton:\n {\n return updateHostSingleton(current, workInProgress, renderLanes);\n }\n\n // Fall through\n\n case HostComponent:\n return updateHostComponent$1(current, workInProgress, renderLanes);\n\n case HostText:\n return updateHostText$1(current, workInProgress);\n\n case SuspenseComponent:\n return updateSuspenseComponent(current, workInProgress, renderLanes);\n\n case HostPortal:\n return updatePortalComponent(current, workInProgress, renderLanes);\n\n case ForwardRef:\n {\n var type = workInProgress.type;\n var _unresolvedProps2 = workInProgress.pendingProps;\n\n var _resolvedProps2 = workInProgress.elementType === type ? _unresolvedProps2 : resolveDefaultProps(type, _unresolvedProps2);\n\n return updateForwardRef(current, workInProgress, type, _resolvedProps2, renderLanes);\n }\n\n case Fragment:\n return updateFragment(current, workInProgress, renderLanes);\n\n case Mode:\n return updateMode(current, workInProgress, renderLanes);\n\n case Profiler:\n return updateProfiler(current, workInProgress, renderLanes);\n\n case ContextProvider:\n return updateContextProvider(current, workInProgress, renderLanes);\n\n case ContextConsumer:\n return updateContextConsumer(current, workInProgress, renderLanes);\n\n case MemoComponent:\n {\n var _type = workInProgress.type;\n var _unresolvedProps3 = workInProgress.pendingProps; // Resolve outer props first, then resolve inner props.\n\n var _resolvedProps3 = resolveDefaultProps(_type, _unresolvedProps3);\n\n _resolvedProps3 = resolveDefaultProps(_type.type, _resolvedProps3);\n return updateMemoComponent(current, workInProgress, _type, _resolvedProps3, renderLanes);\n }\n\n case SimpleMemoComponent:\n {\n return updateSimpleMemoComponent(current, workInProgress, workInProgress.type, workInProgress.pendingProps, renderLanes);\n }\n\n case IncompleteClassComponent:\n {\n var _Component2 = workInProgress.type;\n var _unresolvedProps4 = workInProgress.pendingProps;\n\n var _resolvedProps4 = workInProgress.elementType === _Component2 ? _unresolvedProps4 : resolveDefaultProps(_Component2, _unresolvedProps4);\n\n return mountIncompleteClassComponent(current, workInProgress, _Component2, _resolvedProps4, renderLanes);\n }\n\n case SuspenseListComponent:\n {\n return updateSuspenseListComponent(current, workInProgress, renderLanes);\n }\n\n case ScopeComponent:\n {\n\n break;\n }\n\n case OffscreenComponent:\n {\n return updateOffscreenComponent(current, workInProgress, renderLanes);\n }\n\n case LegacyHiddenComponent:\n {\n\n break;\n }\n\n case CacheComponent:\n {\n {\n return updateCacheComponent(current, workInProgress, renderLanes);\n }\n }\n }\n\n throw new Error(\"Unknown unit of work tag (\" + workInProgress.tag + \"). This error is likely caused by a bug in \" + 'React. Please file an issue.');\n}\n\nvar valueCursor = createCursor(null);\nvar rendererCursorDEV;\n\n{\n rendererCursorDEV = createCursor(null);\n}\n\nvar rendererSigil;\n\n{\n // Use this to detect multiple renderers using the same context\n rendererSigil = {};\n}\n\nvar currentlyRenderingFiber = null;\nvar lastContextDependency = null;\nvar lastFullyObservedContext = null;\nvar isDisallowedContextReadInDEV = false;\nfunction resetContextDependencies() {\n // This is called right before React yields execution, to ensure `readContext`\n // cannot be called outside the render phase.\n currentlyRenderingFiber = null;\n lastContextDependency = null;\n lastFullyObservedContext = null;\n\n {\n isDisallowedContextReadInDEV = false;\n }\n}\nfunction enterDisallowedContextReadInDEV() {\n {\n isDisallowedContextReadInDEV = true;\n }\n}\nfunction exitDisallowedContextReadInDEV() {\n {\n isDisallowedContextReadInDEV = false;\n }\n}\nfunction pushProvider(providerFiber, context, nextValue) {\n {\n push(valueCursor, context._currentValue, providerFiber);\n context._currentValue = nextValue;\n\n {\n push(rendererCursorDEV, context._currentRenderer, providerFiber);\n\n if (context._currentRenderer !== undefined && context._currentRenderer !== null && context._currentRenderer !== rendererSigil) {\n error('Detected multiple renderers concurrently rendering the ' + 'same context provider. This is currently unsupported.');\n }\n\n context._currentRenderer = rendererSigil;\n }\n }\n}\nfunction popProvider(context, providerFiber) {\n var currentValue = valueCursor.current;\n\n {\n context._currentValue = currentValue;\n\n {\n var currentRenderer = rendererCursorDEV.current;\n pop(rendererCursorDEV, providerFiber);\n context._currentRenderer = currentRenderer;\n }\n }\n\n pop(valueCursor, providerFiber);\n}\nfunction scheduleContextWorkOnParentPath(parent, renderLanes, propagationRoot) {\n // Update the child lanes of all the ancestors, including the alternates.\n var node = parent;\n\n while (node !== null) {\n var alternate = node.alternate;\n\n if (!isSubsetOfLanes(node.childLanes, renderLanes)) {\n node.childLanes = mergeLanes(node.childLanes, renderLanes);\n\n if (alternate !== null) {\n alternate.childLanes = mergeLanes(alternate.childLanes, renderLanes);\n }\n } else if (alternate !== null && !isSubsetOfLanes(alternate.childLanes, renderLanes)) {\n alternate.childLanes = mergeLanes(alternate.childLanes, renderLanes);\n } else ;\n\n if (node === propagationRoot) {\n break;\n }\n\n node = node.return;\n }\n\n {\n if (node !== propagationRoot) {\n error('Expected to find the propagation root when scheduling context work. ' + 'This error is likely caused by a bug in React. Please file an issue.');\n }\n }\n}\nfunction propagateContextChange(workInProgress, context, renderLanes) {\n {\n propagateContextChange_eager(workInProgress, context, renderLanes);\n }\n}\n\nfunction propagateContextChange_eager(workInProgress, context, renderLanes) {\n\n var fiber = workInProgress.child;\n\n if (fiber !== null) {\n // Set the return pointer of the child to the work-in-progress fiber.\n fiber.return = workInProgress;\n }\n\n while (fiber !== null) {\n var nextFiber = void 0; // Visit this fiber.\n\n var list = fiber.dependencies;\n\n if (list !== null) {\n nextFiber = fiber.child;\n var dependency = list.firstContext;\n\n while (dependency !== null) {\n // Check if the context matches.\n if (dependency.context === context) {\n // Match! Schedule an update on this fiber.\n if (fiber.tag === ClassComponent) {\n // Schedule a force update on the work-in-progress.\n var lane = pickArbitraryLane(renderLanes);\n var update = createUpdate(lane);\n update.tag = ForceUpdate; // TODO: Because we don't have a work-in-progress, this will add the\n // update to the current fiber, too, which means it will persist even if\n // this render is thrown away. Since it's a race condition, not sure it's\n // worth fixing.\n // Inlined `enqueueUpdate` to remove interleaved update check\n\n var updateQueue = fiber.updateQueue;\n\n if (updateQueue === null) ; else {\n var sharedQueue = updateQueue.shared;\n var pending = sharedQueue.pending;\n\n if (pending === null) {\n // This is the first update. Create a circular list.\n update.next = update;\n } else {\n update.next = pending.next;\n pending.next = update;\n }\n\n sharedQueue.pending = update;\n }\n }\n\n fiber.lanes = mergeLanes(fiber.lanes, renderLanes);\n var alternate = fiber.alternate;\n\n if (alternate !== null) {\n alternate.lanes = mergeLanes(alternate.lanes, renderLanes);\n }\n\n scheduleContextWorkOnParentPath(fiber.return, renderLanes, workInProgress); // Mark the updated lanes on the list, too.\n\n list.lanes = mergeLanes(list.lanes, renderLanes); // Since we already found a match, we can stop traversing the\n // dependency list.\n\n break;\n }\n\n dependency = dependency.next;\n }\n } else if (fiber.tag === ContextProvider) {\n // Don't scan deeper if this is a matching provider\n nextFiber = fiber.type === workInProgress.type ? null : fiber.child;\n } else if (fiber.tag === DehydratedFragment) {\n // If a dehydrated suspense boundary is in this subtree, we don't know\n // if it will have any context consumers in it. The best we can do is\n // mark it as having updates.\n var parentSuspense = fiber.return;\n\n if (parentSuspense === null) {\n throw new Error('We just came from a parent so we must have had a parent. This is a bug in React.');\n }\n\n parentSuspense.lanes = mergeLanes(parentSuspense.lanes, renderLanes);\n var _alternate = parentSuspense.alternate;\n\n if (_alternate !== null) {\n _alternate.lanes = mergeLanes(_alternate.lanes, renderLanes);\n } // This is intentionally passing this fiber as the parent\n // because we want to schedule this fiber as having work\n // on its children. We'll use the childLanes on\n // this fiber to indicate that a context has changed.\n\n\n scheduleContextWorkOnParentPath(parentSuspense, renderLanes, workInProgress);\n nextFiber = fiber.sibling;\n } else {\n // Traverse down.\n nextFiber = fiber.child;\n }\n\n if (nextFiber !== null) {\n // Set the return pointer of the child to the work-in-progress fiber.\n nextFiber.return = fiber;\n } else {\n // No child. Traverse to next sibling.\n nextFiber = fiber;\n\n while (nextFiber !== null) {\n if (nextFiber === workInProgress) {\n // We're back to the root of this subtree. Exit.\n nextFiber = null;\n break;\n }\n\n var sibling = nextFiber.sibling;\n\n if (sibling !== null) {\n // Set the return pointer of the sibling to the work-in-progress fiber.\n sibling.return = nextFiber.return;\n nextFiber = sibling;\n break;\n } // No more siblings. Traverse up.\n\n\n nextFiber = nextFiber.return;\n }\n }\n\n fiber = nextFiber;\n }\n}\nfunction prepareToReadContext(workInProgress, renderLanes) {\n currentlyRenderingFiber = workInProgress;\n lastContextDependency = null;\n lastFullyObservedContext = null;\n var dependencies = workInProgress.dependencies;\n\n if (dependencies !== null) {\n {\n var firstContext = dependencies.firstContext;\n\n if (firstContext !== null) {\n if (includesSomeLane(dependencies.lanes, renderLanes)) {\n // Context list has a pending update. Mark that this fiber performed work.\n markWorkInProgressReceivedUpdate();\n } // Reset the work-in-progress list\n\n\n dependencies.firstContext = null;\n }\n }\n }\n}\nfunction readContext(context) {\n {\n // This warning would fire if you read context inside a Hook like useMemo.\n // Unlike the class check below, it's not enforced in production for perf.\n if (isDisallowedContextReadInDEV) {\n error('Context can only be read while React is rendering. ' + 'In classes, you can read it in the render method or getDerivedStateFromProps. ' + 'In function components, you can read it directly in the function body, but not ' + 'inside Hooks like useReducer() or useMemo().');\n }\n }\n\n return readContextForConsumer(currentlyRenderingFiber, context);\n}\nfunction readContextDuringReconciliation(consumer, context, renderLanes) {\n if (currentlyRenderingFiber === null) {\n prepareToReadContext(consumer, renderLanes);\n }\n\n return readContextForConsumer(consumer, context);\n}\n\nfunction readContextForConsumer(consumer, context) {\n var value = context._currentValue ;\n\n if (lastFullyObservedContext === context) ; else {\n var contextItem = {\n context: context,\n memoizedValue: value,\n next: null\n };\n\n if (lastContextDependency === null) {\n if (consumer === null) {\n throw new Error('Context can only be read while React is rendering. ' + 'In classes, you can read it in the render method or getDerivedStateFromProps. ' + 'In function components, you can read it directly in the function body, but not ' + 'inside Hooks like useReducer() or useMemo().');\n } // This is the first dependency for this component. Create a new list.\n\n\n lastContextDependency = contextItem;\n consumer.dependencies = {\n lanes: NoLanes,\n firstContext: contextItem\n };\n } else {\n // Append a new context item.\n lastContextDependency = lastContextDependency.next = contextItem;\n }\n }\n\n return value;\n}\n\n// replace it with a lightweight shim that only has the features we use.\n\nvar AbortControllerLocal = typeof AbortController !== 'undefined' ? AbortController : // $FlowFixMe[missing-this-annot]\n// $FlowFixMe[prop-missing]\nfunction AbortControllerShim() {\n var listeners = [];\n var signal = this.signal = {\n aborted: false,\n addEventListener: function (type, listener) {\n listeners.push(listener);\n }\n };\n\n this.abort = function () {\n signal.aborted = true;\n listeners.forEach(function (listener) {\n return listener();\n });\n };\n} ; // Intentionally not named imports because Rollup would\n// use dynamic dispatch for CommonJS interop named imports.\n\nvar scheduleCallback$1 = Scheduler.unstable_scheduleCallback,\n NormalPriority = Scheduler.unstable_NormalPriority;\nvar CacheContext = {\n $$typeof: REACT_CONTEXT_TYPE,\n // We don't use Consumer/Provider for Cache components. So we'll cheat.\n Consumer: null,\n Provider: null,\n // We'll initialize these at the root.\n _currentValue: null,\n _currentValue2: null,\n _threadCount: 0\n} ;\n\n{\n CacheContext._currentRenderer = null;\n CacheContext._currentRenderer2 = null;\n} // Creates a new empty Cache instance with a ref-count of 0. The caller is responsible\n// for retaining the cache once it is in use (retainCache), and releasing the cache\n// once it is no longer needed (releaseCache).\n\n\nfunction createCache() {\n\n var cache = {\n controller: new AbortControllerLocal(),\n data: new Map(),\n refCount: 0\n };\n return cache;\n}\nfunction retainCache(cache) {\n\n {\n if (cache.controller.signal.aborted) {\n warn('A cache instance was retained after it was already freed. ' + 'This likely indicates a bug in React.');\n }\n }\n\n cache.refCount++;\n} // Cleanup a cache instance, potentially freeing it if there are no more references\n\nfunction releaseCache(cache) {\n\n cache.refCount--;\n\n {\n if (cache.refCount < 0) {\n warn('A cache instance was released after it was already freed. ' + 'This likely indicates a bug in React.');\n }\n }\n\n if (cache.refCount === 0) {\n scheduleCallback$1(NormalPriority, function () {\n cache.controller.abort();\n });\n }\n}\nfunction pushCacheProvider(workInProgress, cache) {\n\n pushProvider(workInProgress, CacheContext, cache);\n}\nfunction popCacheProvider(workInProgress, cache) {\n\n popProvider(CacheContext, workInProgress);\n}\n\nvar ReactCurrentBatchConfig$2 = ReactSharedInternals.ReactCurrentBatchConfig;\nfunction requestCurrentTransition() {\n var transition = ReactCurrentBatchConfig$2.transition;\n\n if (transition !== null) {\n // Whenever a transition update is scheduled, register a callback on the\n // transition object so we can get the return value of the scope function.\n transition._callbacks.add(handleAsyncAction);\n }\n\n return transition;\n}\n\nfunction handleAsyncAction(transition, thenable) {\n {\n // This is an async action.\n entangleAsyncAction(transition, thenable);\n }\n}\n\nfunction notifyTransitionCallbacks(transition, returnValue) {\n var callbacks = transition._callbacks;\n callbacks.forEach(function (callback) {\n return callback(transition, returnValue);\n });\n} // When retrying a Suspense/Offscreen boundary, we restore the cache that was\n// used during the previous render by placing it here, on the stack.\n\nvar resumedCache = createCursor(null); // During the render/synchronous commit phase, we don't actually process the\n\nfunction peekCacheFromPool() {\n // If we're rendering inside a Suspense boundary that is currently hidden,\n // we should use the same cache that we used during the previous render, if\n // one exists.\n\n\n var cacheResumedFromPreviousRender = resumedCache.current;\n\n if (cacheResumedFromPreviousRender !== null) {\n return cacheResumedFromPreviousRender;\n } // Otherwise, check the root's cache pool.\n\n\n var root = getWorkInProgressRoot();\n var cacheFromRootCachePool = root.pooledCache;\n return cacheFromRootCachePool;\n}\n\nfunction requestCacheFromPool(renderLanes) {\n // Similar to previous function, except if there's not already a cache in the\n // pool, we allocate a new one.\n var cacheFromPool = peekCacheFromPool();\n\n if (cacheFromPool !== null) {\n return cacheFromPool;\n } // Create a fresh cache and add it to the root cache pool. A cache can have\n // multiple owners:\n // - A cache pool that lives on the FiberRoot. This is where all fresh caches\n // are originally created (TODO: except during refreshes, until we implement\n // this correctly). The root takes ownership immediately when the cache is\n // created. Conceptually, root.pooledCache is an Option<Arc<Cache>> (owned),\n // and the return value of this function is a &Arc<Cache> (borrowed).\n // - One of several fiber types: host root, cache boundary, suspense\n // component. These retain and release in the commit phase.\n\n\n var root = getWorkInProgressRoot();\n var freshCache = createCache();\n root.pooledCache = freshCache;\n retainCache(freshCache);\n\n if (freshCache !== null) {\n root.pooledCacheLanes |= renderLanes;\n }\n\n return freshCache;\n}\nfunction pushTransition(offscreenWorkInProgress, prevCachePool, newTransitions) {\n {\n if (prevCachePool === null) {\n push(resumedCache, resumedCache.current, offscreenWorkInProgress);\n } else {\n push(resumedCache, prevCachePool.pool, offscreenWorkInProgress);\n }\n }\n}\nfunction popTransition(workInProgress, current) {\n if (current !== null) {\n\n {\n pop(resumedCache, workInProgress);\n }\n }\n}\nfunction getSuspendedCache() {\n // cache that would have been used to render fresh data during this render,\n // if there was any, so that we can resume rendering with the same cache when\n // we receive more data.\n\n\n var cacheFromPool = peekCacheFromPool();\n\n if (cacheFromPool === null) {\n return null;\n }\n\n return {\n // We must also save the parent, so that when we resume we can detect\n // a refresh.\n parent: CacheContext._currentValue ,\n pool: cacheFromPool\n };\n}\nfunction getOffscreenDeferredCache() {\n\n var cacheFromPool = peekCacheFromPool();\n\n if (cacheFromPool === null) {\n return null;\n }\n\n return {\n // We must also store the parent, so that when we resume we can detect\n // a refresh.\n parent: CacheContext._currentValue ,\n pool: cacheFromPool\n };\n}\n\n/**\n * Tag the fiber with an update effect. This turns a Placement into\n * a PlacementAndUpdate.\n */\n\nfunction markUpdate(workInProgress) {\n workInProgress.flags |= Update;\n}\n\nfunction appendAllChildren(parent, workInProgress, needsVisibilityToggle, isHidden) {\n {\n // We only have the top Fiber that was created but we need recurse down its\n // children to find all the terminal nodes.\n var node = workInProgress.child;\n\n while (node !== null) {\n if (node.tag === HostComponent || node.tag === HostText) {\n appendInitialChild(parent, node.stateNode);\n } else if (node.tag === HostPortal || (node.tag === HostSingleton )) ; else if (node.child !== null) {\n node.child.return = node;\n node = node.child;\n continue;\n }\n\n if (node === workInProgress) {\n return;\n } // $FlowFixMe[incompatible-use] found when upgrading Flow\n\n\n while (node.sibling === null) {\n // $FlowFixMe[incompatible-use] found when upgrading Flow\n if (node.return === null || node.return === workInProgress) {\n return;\n }\n\n node = node.return;\n } // $FlowFixMe[incompatible-use] found when upgrading Flow\n\n\n node.sibling.return = node.return;\n node = node.sibling;\n }\n }\n} // An unfortunate fork of appendAllChildren because we have two different parent types.\n\nfunction updateHostComponent(current, workInProgress, type, newProps, renderLanes) {\n {\n // If we have an alternate, that means this is an update and we need to\n // schedule a side-effect to do the updates.\n var oldProps = current.memoizedProps;\n\n if (oldProps === newProps) {\n // In mutation mode, this is sufficient for a bailout because\n // we won't touch this node even if children changed.\n return;\n }\n\n markUpdate(workInProgress);\n }\n} // This function must be called at the very end of the complete phase, because\n// it might throw to suspend, and if the resource immediately loads, the work\n// loop will resume rendering as if the work-in-progress completed. So it must\n// fully complete.\n// TODO: This should ideally move to begin phase, but currently the instance is\n// not created until the complete phase. For our existing use cases, host nodes\n// that suspend don't have children, so it doesn't matter. But that might not\n// always be true in the future.\n\n\nfunction preloadInstanceAndSuspendIfNeeded(workInProgress, type, props, renderLanes) {\n {\n // If this flag was set previously, we can remove it. The flag\n // represents whether this particular set of props might ever need to\n // suspend. The safest thing to do is for maySuspendCommit to always\n // return true, but if the renderer is reasonably confident that the\n // underlying resource won't be evicted, it can return false as a\n // performance optimization.\n workInProgress.flags &= ~MaySuspendCommit;\n return;\n } // Mark this fiber with a flag. This gets set on all host instances\n}\n\nfunction preloadResourceAndSuspendIfNeeded(workInProgress, resource, type, props, renderLanes) {\n // This is a fork of preloadInstanceAndSuspendIfNeeded, but for resources.\n if (!mayResourceSuspendCommit(resource)) {\n workInProgress.flags &= ~MaySuspendCommit;\n return;\n }\n\n workInProgress.flags |= MaySuspendCommit;\n var rootRenderLanes = getWorkInProgressRootRenderLanes();\n\n if (!includesOnlyNonUrgentLanes(rootRenderLanes)) ; else {\n var isReady = preloadResource(resource);\n\n if (!isReady) {\n if (shouldRemainOnPreviousScreen()) {\n workInProgress.flags |= ShouldSuspendCommit;\n } else {\n suspendCommit();\n }\n }\n }\n}\n\nfunction scheduleRetryEffect(workInProgress, retryQueue) {\n var wakeables = retryQueue;\n\n if (wakeables !== null) {\n // Schedule an effect to attach a retry listener to the promise.\n // TODO: Move to passive phase\n workInProgress.flags |= Update;\n } else {\n // This boundary suspended, but no wakeables were added to the retry\n // queue. Check if the renderer suspended commit. If so, this means\n // that once the fallback is committed, we can immediately retry\n // rendering again, because rendering wasn't actually blocked. Only\n // the commit phase.\n // TODO: Consider a model where we always schedule an immediate retry, even\n // for normal Suspense. That way the retry can partially render up to the\n // first thing that suspends.\n if (workInProgress.flags & ScheduleRetry) {\n var retryLane = // TODO: This check should probably be moved into claimNextRetryLane\n // I also suspect that we need some further consolidation of offscreen\n // and retry lanes.\n workInProgress.tag !== OffscreenComponent ? claimNextRetryLane() : OffscreenLane;\n workInProgress.lanes = mergeLanes(workInProgress.lanes, retryLane);\n }\n }\n}\n\nfunction updateHostText(current, workInProgress, oldText, newText) {\n {\n // If the text differs, mark it as an update. All the work in done in commitWork.\n if (oldText !== newText) {\n markUpdate(workInProgress);\n }\n }\n}\n\nfunction cutOffTailIfNeeded(renderState, hasRenderedATailFallback) {\n if (getIsHydrating()) {\n // If we're hydrating, we should consume as many items as we can\n // so we don't leave any behind.\n return;\n }\n\n switch (renderState.tailMode) {\n case 'hidden':\n {\n // Any insertions at the end of the tail list after this point\n // should be invisible. If there are already mounted boundaries\n // anything before them are not considered for collapsing.\n // Therefore we need to go through the whole tail to find if\n // there are any.\n var tailNode = renderState.tail;\n var lastTailNode = null;\n\n while (tailNode !== null) {\n if (tailNode.alternate !== null) {\n lastTailNode = tailNode;\n }\n\n tailNode = tailNode.sibling;\n } // Next we're simply going to delete all insertions after the\n // last rendered item.\n\n\n if (lastTailNode === null) {\n // All remaining items in the tail are insertions.\n renderState.tail = null;\n } else {\n // Detach the insertion after the last node that was already\n // inserted.\n lastTailNode.sibling = null;\n }\n\n break;\n }\n\n case 'collapsed':\n {\n // Any insertions at the end of the tail list after this point\n // should be invisible. If there are already mounted boundaries\n // anything before them are not considered for collapsing.\n // Therefore we need to go through the whole tail to find if\n // there are any.\n var _tailNode = renderState.tail;\n var _lastTailNode = null;\n\n while (_tailNode !== null) {\n if (_tailNode.alternate !== null) {\n _lastTailNode = _tailNode;\n }\n\n _tailNode = _tailNode.sibling;\n } // Next we're simply going to delete all insertions after the\n // last rendered item.\n\n\n if (_lastTailNode === null) {\n // All remaining items in the tail are insertions.\n if (!hasRenderedATailFallback && renderState.tail !== null) {\n // We suspended during the head. We want to show at least one\n // row at the tail. So we'll keep on and cut off the rest.\n renderState.tail.sibling = null;\n } else {\n renderState.tail = null;\n }\n } else {\n // Detach the insertion after the last node that was already\n // inserted.\n _lastTailNode.sibling = null;\n }\n\n break;\n }\n }\n}\n\nfunction bubbleProperties(completedWork) {\n var didBailout = completedWork.alternate !== null && completedWork.alternate.child === completedWork.child;\n var newChildLanes = NoLanes;\n var subtreeFlags = NoFlags$1;\n\n if (!didBailout) {\n // Bubble up the earliest expiration time.\n if ((completedWork.mode & ProfileMode) !== NoMode) {\n // In profiling mode, resetChildExpirationTime is also used to reset\n // profiler durations.\n var actualDuration = completedWork.actualDuration;\n var treeBaseDuration = completedWork.selfBaseDuration;\n var child = completedWork.child;\n\n while (child !== null) {\n newChildLanes = mergeLanes(newChildLanes, mergeLanes(child.lanes, child.childLanes));\n subtreeFlags |= child.subtreeFlags;\n subtreeFlags |= child.flags; // When a fiber is cloned, its actualDuration is reset to 0. This value will\n // only be updated if work is done on the fiber (i.e. it doesn't bailout).\n // When work is done, it should bubble to the parent's actualDuration. If\n // the fiber has not been cloned though, (meaning no work was done), then\n // this value will reflect the amount of time spent working on a previous\n // render. In that case it should not bubble. We determine whether it was\n // cloned by comparing the child pointer.\n // $FlowFixMe[unsafe-addition] addition with possible null/undefined value\n\n actualDuration += child.actualDuration; // $FlowFixMe[unsafe-addition] addition with possible null/undefined value\n\n treeBaseDuration += child.treeBaseDuration;\n child = child.sibling;\n }\n\n completedWork.actualDuration = actualDuration;\n completedWork.treeBaseDuration = treeBaseDuration;\n } else {\n var _child = completedWork.child;\n\n while (_child !== null) {\n newChildLanes = mergeLanes(newChildLanes, mergeLanes(_child.lanes, _child.childLanes));\n subtreeFlags |= _child.subtreeFlags;\n subtreeFlags |= _child.flags; // Update the return pointer so the tree is consistent. This is a code\n // smell because it assumes the commit phase is never concurrent with\n // the render phase. Will address during refactor to alternate model.\n\n _child.return = completedWork;\n _child = _child.sibling;\n }\n }\n\n completedWork.subtreeFlags |= subtreeFlags;\n } else {\n // Bubble up the earliest expiration time.\n if ((completedWork.mode & ProfileMode) !== NoMode) {\n // In profiling mode, resetChildExpirationTime is also used to reset\n // profiler durations.\n var _treeBaseDuration = completedWork.selfBaseDuration;\n var _child2 = completedWork.child;\n\n while (_child2 !== null) {\n newChildLanes = mergeLanes(newChildLanes, mergeLanes(_child2.lanes, _child2.childLanes)); // \"Static\" flags share the lifetime of the fiber/hook they belong to,\n // so we should bubble those up even during a bailout. All the other\n // flags have a lifetime only of a single render + commit, so we should\n // ignore them.\n\n subtreeFlags |= _child2.subtreeFlags & StaticMask;\n subtreeFlags |= _child2.flags & StaticMask; // $FlowFixMe[unsafe-addition] addition with possible null/undefined value\n\n _treeBaseDuration += _child2.treeBaseDuration;\n _child2 = _child2.sibling;\n }\n\n completedWork.treeBaseDuration = _treeBaseDuration;\n } else {\n var _child3 = completedWork.child;\n\n while (_child3 !== null) {\n newChildLanes = mergeLanes(newChildLanes, mergeLanes(_child3.lanes, _child3.childLanes)); // \"Static\" flags share the lifetime of the fiber/hook they belong to,\n // so we should bubble those up even during a bailout. All the other\n // flags have a lifetime only of a single render + commit, so we should\n // ignore them.\n\n subtreeFlags |= _child3.subtreeFlags & StaticMask;\n subtreeFlags |= _child3.flags & StaticMask; // Update the return pointer so the tree is consistent. This is a code\n // smell because it assumes the commit phase is never concurrent with\n // the render phase. Will address during refactor to alternate model.\n\n _child3.return = completedWork;\n _child3 = _child3.sibling;\n }\n }\n\n completedWork.subtreeFlags |= subtreeFlags;\n }\n\n completedWork.childLanes = newChildLanes;\n return didBailout;\n}\n\nfunction completeDehydratedSuspenseBoundary(current, workInProgress, nextState) {\n var wasHydrated = popHydrationState(workInProgress);\n\n if (nextState !== null && nextState.dehydrated !== null) {\n // We might be inside a hydration state the first time we're picking up this\n // Suspense boundary, and also after we've reentered it for further hydration.\n if (current === null) {\n if (!wasHydrated) {\n throw new Error('A dehydrated suspense component was completed without a hydrated node. ' + 'This is probably a bug in React.');\n }\n\n prepareToHydrateHostSuspenseInstance(workInProgress);\n bubbleProperties(workInProgress);\n\n {\n if ((workInProgress.mode & ProfileMode) !== NoMode) {\n var isTimedOutSuspense = nextState !== null;\n\n if (isTimedOutSuspense) {\n // Don't count time spent in a timed out Suspense subtree as part of the base duration.\n var primaryChildFragment = workInProgress.child;\n\n if (primaryChildFragment !== null) {\n // $FlowFixMe[unsafe-arithmetic] Flow doesn't support type casting in combination with the -= operator\n workInProgress.treeBaseDuration -= primaryChildFragment.treeBaseDuration;\n }\n }\n }\n }\n\n return false;\n } else {\n // We might have reentered this boundary to hydrate it. If so, we need to reset the hydration\n // state since we're now exiting out of it. popHydrationState doesn't do that for us.\n resetHydrationState();\n\n if ((workInProgress.flags & DidCapture) === NoFlags$1) {\n // This boundary did not suspend so it's now hydrated and unsuspended.\n workInProgress.memoizedState = null;\n } // If nothing suspended, we need to schedule an effect to mark this boundary\n // as having hydrated so events know that they're free to be invoked.\n // It's also a signal to replay events and the suspense callback.\n // If something suspended, schedule an effect to attach retry listeners.\n // So we might as well always mark this.\n\n\n workInProgress.flags |= Update;\n bubbleProperties(workInProgress);\n\n {\n if ((workInProgress.mode & ProfileMode) !== NoMode) {\n var _isTimedOutSuspense = nextState !== null;\n\n if (_isTimedOutSuspense) {\n // Don't count time spent in a timed out Suspense subtree as part of the base duration.\n var _primaryChildFragment = workInProgress.child;\n\n if (_primaryChildFragment !== null) {\n // $FlowFixMe[unsafe-arithmetic] Flow doesn't support type casting in combination with the -= operator\n workInProgress.treeBaseDuration -= _primaryChildFragment.treeBaseDuration;\n }\n }\n }\n }\n\n return false;\n }\n } else {\n // Successfully completed this tree. If this was a forced client render,\n // there may have been recoverable errors during first hydration\n // attempt. If so, add them to a queue so we can log them in the\n // commit phase.\n upgradeHydrationErrorsToRecoverable(); // Fall through to normal Suspense path\n\n return true;\n }\n}\n\nfunction completeWork(current, workInProgress, renderLanes) {\n var newProps = workInProgress.pendingProps; // Note: This intentionally doesn't check if we're hydrating because comparing\n // to the current tree provider fiber is just as fast and less error-prone.\n // Ideally we would have a special version of the work loop only\n // for hydration.\n\n popTreeContext(workInProgress);\n\n switch (workInProgress.tag) {\n case IndeterminateComponent:\n case LazyComponent:\n case SimpleMemoComponent:\n case FunctionComponent:\n case ForwardRef:\n case Fragment:\n case Mode:\n case Profiler:\n case ContextConsumer:\n case MemoComponent:\n bubbleProperties(workInProgress);\n return null;\n\n case ClassComponent:\n {\n var Component = workInProgress.type;\n\n if (isContextProvider(Component)) {\n popContext(workInProgress);\n }\n\n bubbleProperties(workInProgress);\n return null;\n }\n\n case HostRoot:\n {\n var fiberRoot = workInProgress.stateNode;\n\n {\n var previousCache = null;\n\n if (current !== null) {\n previousCache = current.memoizedState.cache;\n }\n\n var cache = workInProgress.memoizedState.cache;\n\n if (cache !== previousCache) {\n // Run passive effects to retain/release the cache.\n workInProgress.flags |= Passive$1;\n }\n\n popCacheProvider(workInProgress);\n }\n popHostContainer(workInProgress);\n popTopLevelContextObject(workInProgress);\n\n if (fiberRoot.pendingContext) {\n fiberRoot.context = fiberRoot.pendingContext;\n fiberRoot.pendingContext = null;\n }\n\n if (current === null || current.child === null) {\n // If we hydrated, pop so that we can delete any remaining children\n // that weren't hydrated.\n var wasHydrated = popHydrationState(workInProgress);\n\n if (wasHydrated) {\n // If we hydrated, then we'll need to schedule an update for\n // the commit side-effects on the root.\n markUpdate(workInProgress);\n } else {\n if (current !== null) {\n var prevState = current.memoizedState;\n\n if ( // Check if this is a client root\n !prevState.isDehydrated || // Check if we reverted to client rendering (e.g. due to an error)\n (workInProgress.flags & ForceClientRender) !== NoFlags$1) {\n // Schedule an effect to clear this container at the start of the\n // next commit. This handles the case of React rendering into a\n // container with previous children. It's also safe to do for\n // updates too, because current.child would only be null if the\n // previous render was null (so the container would already\n // be empty).\n workInProgress.flags |= Snapshot; // If this was a forced client render, there may have been\n // recoverable errors during first hydration attempt. If so, add\n // them to a queue so we can log them in the commit phase.\n\n upgradeHydrationErrorsToRecoverable();\n }\n }\n }\n }\n bubbleProperties(workInProgress);\n\n return null;\n }\n\n case HostHoistable:\n {\n {\n var nextResource = workInProgress.memoizedState;\n\n if (current === null) {\n // We are mounting and must Update this Hoistable in this commit\n // @TODO refactor this block to create the instance here in complete\n // phase if we are not hydrating.\n markUpdate(workInProgress);\n\n if (nextResource !== null) {\n // This is a Hoistable Resource\n // This must come at the very end of the complete phase.\n bubbleProperties(workInProgress);\n preloadResourceAndSuspendIfNeeded(workInProgress, nextResource);\n return null;\n } else {\n // This is a Hoistable Instance\n // This must come at the very end of the complete phase.\n bubbleProperties(workInProgress);\n preloadInstanceAndSuspendIfNeeded(workInProgress);\n return null;\n }\n } else {\n // We are updating.\n var currentResource = current.memoizedState;\n\n if (nextResource !== currentResource) {\n // We are transitioning to, from, or between Hoistable Resources\n // and require an update\n markUpdate(workInProgress);\n }\n\n if (nextResource !== null) {\n // This is a Hoistable Resource\n // This must come at the very end of the complete phase.\n bubbleProperties(workInProgress);\n\n if (nextResource === currentResource) {\n workInProgress.flags &= ~MaySuspendCommit;\n } else {\n preloadResourceAndSuspendIfNeeded(workInProgress, nextResource);\n }\n\n return null;\n } else {\n // This is a Hoistable Instance\n // We may have props to update on the Hoistable instance.\n {\n var oldProps = current.memoizedProps;\n\n if (oldProps !== newProps) {\n markUpdate(workInProgress);\n }\n } // This must come at the very end of the complete phase.\n\n\n bubbleProperties(workInProgress);\n preloadInstanceAndSuspendIfNeeded(workInProgress);\n return null;\n }\n }\n } // Fall through\n\n }\n\n case HostSingleton:\n {\n {\n popHostContext(workInProgress);\n var rootContainerInstance = getRootHostContainer();\n var _type = workInProgress.type;\n\n if (current !== null && workInProgress.stateNode != null) {\n {\n var _oldProps2 = current.memoizedProps;\n\n if (_oldProps2 !== newProps) {\n markUpdate(workInProgress);\n }\n }\n } else {\n if (!newProps) {\n if (workInProgress.stateNode === null) {\n throw new Error('We must have new props for new mounts. This error is likely ' + 'caused by a bug in React. Please file an issue.');\n } // This can happen when we abort work.\n\n\n bubbleProperties(workInProgress);\n return null;\n }\n\n var currentHostContext = getHostContext();\n\n var _wasHydrated = popHydrationState(workInProgress);\n\n var instance;\n\n if (_wasHydrated) {\n // We ignore the boolean indicating there is an updateQueue because\n // it is used only to set text children and HostSingletons do not\n // use them.\n prepareToHydrateHostInstance(workInProgress, currentHostContext);\n instance = workInProgress.stateNode;\n } else {\n instance = resolveSingletonInstance(_type, newProps, rootContainerInstance, currentHostContext, true);\n workInProgress.stateNode = instance;\n markUpdate(workInProgress);\n }\n }\n\n bubbleProperties(workInProgress);\n return null;\n } // Fall through\n\n }\n\n case HostComponent:\n {\n popHostContext(workInProgress);\n var _type2 = workInProgress.type;\n\n if (current !== null && workInProgress.stateNode != null) {\n updateHostComponent(current, workInProgress, _type2, newProps);\n } else {\n if (!newProps) {\n if (workInProgress.stateNode === null) {\n throw new Error('We must have new props for new mounts. This error is likely ' + 'caused by a bug in React. Please file an issue.');\n } // This can happen when we abort work.\n\n\n bubbleProperties(workInProgress);\n return null;\n }\n\n var _currentHostContext = getHostContext(); // TODO: Move createInstance to beginWork and keep it on a context\n // \"stack\" as the parent. Then append children as we go in beginWork\n // or completeWork depending on whether we want to add them top->down or\n // bottom->up. Top->down is faster in IE11.\n\n\n var _wasHydrated2 = popHydrationState(workInProgress);\n\n if (_wasHydrated2) {\n // TODO: Move this and createInstance step into the beginPhase\n // to consolidate.\n prepareToHydrateHostInstance(workInProgress, _currentHostContext);\n } else {\n var _rootContainerInstance = getRootHostContainer();\n\n var _instance3 = createInstance(_type2, newProps, _rootContainerInstance, _currentHostContext, workInProgress); // TODO: For persistent renderers, we should pass children as part\n // of the initial instance creation\n\n\n appendAllChildren(_instance3, workInProgress);\n workInProgress.stateNode = _instance3; // Certain renderers require commit-time effects for initial mount.\n // (eg DOM renderer supports auto-focus for certain elements).\n // Make sure such renderers get scheduled for later work.\n\n if (finalizeInitialChildren(_instance3, _type2, newProps)) {\n markUpdate(workInProgress);\n }\n }\n }\n\n bubbleProperties(workInProgress); // This must come at the very end of the complete phase, because it might\n // throw to suspend, and if the resource immediately loads, the work loop\n // will resume rendering as if the work-in-progress completed. So it must\n // fully complete.\n\n preloadInstanceAndSuspendIfNeeded(workInProgress);\n return null;\n }\n\n case HostText:\n {\n var newText = newProps;\n\n if (current && workInProgress.stateNode != null) {\n var oldText = current.memoizedProps; // If we have an alternate, that means this is an update and we need\n // to schedule a side-effect to do the updates.\n\n updateHostText(current, workInProgress, oldText, newText);\n } else {\n if (typeof newText !== 'string') {\n if (workInProgress.stateNode === null) {\n throw new Error('We must have new props for new mounts. This error is likely ' + 'caused by a bug in React. Please file an issue.');\n } // This can happen when we abort work.\n\n }\n\n var _rootContainerInstance2 = getRootHostContainer();\n\n var _currentHostContext2 = getHostContext();\n\n var _wasHydrated3 = popHydrationState(workInProgress);\n\n if (_wasHydrated3) {\n if (prepareToHydrateHostTextInstance(workInProgress)) {\n markUpdate(workInProgress);\n }\n } else {\n workInProgress.stateNode = createTextInstance(newText, _rootContainerInstance2, _currentHostContext2, workInProgress);\n }\n }\n\n bubbleProperties(workInProgress);\n return null;\n }\n\n case SuspenseComponent:\n {\n var nextState = workInProgress.memoizedState; // Special path for dehydrated boundaries. We may eventually move this\n // to its own fiber type so that we can add other kinds of hydration\n // boundaries that aren't associated with a Suspense tree. In anticipation\n // of such a refactor, all the hydration logic is contained in\n // this branch.\n\n if (current === null || current.memoizedState !== null && current.memoizedState.dehydrated !== null) {\n var fallthroughToNormalSuspensePath = completeDehydratedSuspenseBoundary(current, workInProgress, nextState);\n\n if (!fallthroughToNormalSuspensePath) {\n if (workInProgress.flags & ForceClientRender) {\n popSuspenseHandler(workInProgress); // Special case. There were remaining unhydrated nodes. We treat\n // this as a mismatch. Revert to client rendering.\n\n return workInProgress;\n } else {\n popSuspenseHandler(workInProgress); // Did not finish hydrating, either because this is the initial\n // render or because something suspended.\n\n return null;\n }\n } // Continue with the normal Suspense path.\n\n }\n\n popSuspenseHandler(workInProgress);\n\n if ((workInProgress.flags & DidCapture) !== NoFlags$1) {\n // Something suspended. Re-render with the fallback children.\n workInProgress.lanes = renderLanes; // Do not reset the effect list.\n\n if ((workInProgress.mode & ProfileMode) !== NoMode) {\n transferActualDuration(workInProgress);\n } // Don't bubble properties in this case.\n\n\n return workInProgress;\n }\n\n var nextDidTimeout = nextState !== null;\n var prevDidTimeout = current !== null && current.memoizedState !== null;\n\n if (nextDidTimeout) {\n var offscreenFiber = workInProgress.child;\n var _previousCache = null;\n\n if (offscreenFiber.alternate !== null && offscreenFiber.alternate.memoizedState !== null && offscreenFiber.alternate.memoizedState.cachePool !== null) {\n _previousCache = offscreenFiber.alternate.memoizedState.cachePool.pool;\n }\n\n var _cache = null;\n\n if (offscreenFiber.memoizedState !== null && offscreenFiber.memoizedState.cachePool !== null) {\n _cache = offscreenFiber.memoizedState.cachePool.pool;\n }\n\n if (_cache !== _previousCache) {\n // Run passive effects to retain/release the cache.\n offscreenFiber.flags |= Passive$1;\n }\n } // If the suspended state of the boundary changes, we need to schedule\n // a passive effect, which is when we process the transitions\n\n\n if (nextDidTimeout !== prevDidTimeout) {\n // an effect to toggle the subtree's visibility. When we switch from\n // fallback -> primary, the inner Offscreen fiber schedules this effect\n // as part of its normal complete phase. But when we switch from\n // primary -> fallback, the inner Offscreen fiber does not have a complete\n // phase. So we need to schedule its effect here.\n //\n // We also use this flag to connect/disconnect the effects, but the same\n // logic applies: when re-connecting, the Offscreen fiber's complete\n // phase will handle scheduling the effect. It's only when the fallback\n // is active that we have to do anything special.\n\n\n if (nextDidTimeout) {\n var _offscreenFiber2 = workInProgress.child;\n _offscreenFiber2.flags |= Visibility;\n }\n }\n\n var retryQueue = workInProgress.updateQueue;\n scheduleRetryEffect(workInProgress, retryQueue);\n\n bubbleProperties(workInProgress);\n\n {\n if ((workInProgress.mode & ProfileMode) !== NoMode) {\n if (nextDidTimeout) {\n // Don't count time spent in a timed out Suspense subtree as part of the base duration.\n var primaryChildFragment = workInProgress.child;\n\n if (primaryChildFragment !== null) {\n // $FlowFixMe[unsafe-arithmetic] Flow doesn't support type casting in combination with the -= operator\n workInProgress.treeBaseDuration -= primaryChildFragment.treeBaseDuration;\n }\n }\n }\n }\n\n return null;\n }\n\n case HostPortal:\n popHostContainer(workInProgress);\n\n if (current === null) {\n preparePortalMount(workInProgress.stateNode.containerInfo);\n }\n\n bubbleProperties(workInProgress);\n return null;\n\n case ContextProvider:\n // Pop provider fiber\n var context;\n\n {\n context = workInProgress.type._context;\n }\n\n popProvider(context, workInProgress);\n bubbleProperties(workInProgress);\n return null;\n\n case IncompleteClassComponent:\n {\n // Same as class component case. I put it down here so that the tags are\n // sequential to ensure this switch is compiled to a jump table.\n var _Component = workInProgress.type;\n\n if (isContextProvider(_Component)) {\n popContext(workInProgress);\n }\n\n bubbleProperties(workInProgress);\n return null;\n }\n\n case SuspenseListComponent:\n {\n popSuspenseListContext(workInProgress);\n var renderState = workInProgress.memoizedState;\n\n if (renderState === null) {\n // We're running in the default, \"independent\" mode.\n // We don't do anything in this mode.\n bubbleProperties(workInProgress);\n return null;\n }\n\n var didSuspendAlready = (workInProgress.flags & DidCapture) !== NoFlags$1;\n var renderedTail = renderState.rendering;\n\n if (renderedTail === null) {\n // We just rendered the head.\n if (!didSuspendAlready) {\n // This is the first pass. We need to figure out if anything is still\n // suspended in the rendered set.\n // If new content unsuspended, but there's still some content that\n // didn't. Then we need to do a second pass that forces everything\n // to keep showing their fallbacks.\n // We might be suspended if something in this render pass suspended, or\n // something in the previous committed pass suspended. Otherwise,\n // there's no chance so we can skip the expensive call to\n // findFirstSuspended.\n var cannotBeSuspended = renderHasNotSuspendedYet() && (current === null || (current.flags & DidCapture) === NoFlags$1);\n\n if (!cannotBeSuspended) {\n var row = workInProgress.child;\n\n while (row !== null) {\n var suspended = findFirstSuspended(row);\n\n if (suspended !== null) {\n didSuspendAlready = true;\n workInProgress.flags |= DidCapture;\n cutOffTailIfNeeded(renderState, false); // If this is a newly suspended tree, it might not get committed as\n // part of the second pass. In that case nothing will subscribe to\n // its thenables. Instead, we'll transfer its thenables to the\n // SuspenseList so that it can retry if they resolve.\n // There might be multiple of these in the list but since we're\n // going to wait for all of them anyway, it doesn't really matter\n // which ones gets to ping. In theory we could get clever and keep\n // track of how many dependencies remain but it gets tricky because\n // in the meantime, we can add/remove/change items and dependencies.\n // We might bail out of the loop before finding any but that\n // doesn't matter since that means that the other boundaries that\n // we did find already has their listeners attached.\n\n var _retryQueue = suspended.updateQueue;\n workInProgress.updateQueue = _retryQueue;\n scheduleRetryEffect(workInProgress, _retryQueue); // Rerender the whole list, but this time, we'll force fallbacks\n // to stay in place.\n // Reset the effect flags before doing the second pass since that's now invalid.\n // Reset the child fibers to their original state.\n\n workInProgress.subtreeFlags = NoFlags$1;\n resetChildFibers(workInProgress, renderLanes); // Set up the Suspense List Context to force suspense and\n // immediately rerender the children.\n\n pushSuspenseListContext(workInProgress, setShallowSuspenseListContext(suspenseStackCursor.current, ForceSuspenseFallback)); // Don't bubble properties in this case.\n\n return workInProgress.child;\n }\n\n row = row.sibling;\n }\n }\n\n if (renderState.tail !== null && now$1() > getRenderTargetTime()) {\n // We have already passed our CPU deadline but we still have rows\n // left in the tail. We'll just give up further attempts to render\n // the main content and only render fallbacks.\n workInProgress.flags |= DidCapture;\n didSuspendAlready = true;\n cutOffTailIfNeeded(renderState, false); // Since nothing actually suspended, there will nothing to ping this\n // to get it started back up to attempt the next item. While in terms\n // of priority this work has the same priority as this current render,\n // it's not part of the same transition once the transition has\n // committed. If it's sync, we still want to yield so that it can be\n // painted. Conceptually, this is really the same as pinging.\n // We can use any RetryLane even if it's the one currently rendering\n // since we're leaving it behind on this node.\n\n workInProgress.lanes = SomeRetryLane;\n }\n } else {\n cutOffTailIfNeeded(renderState, false);\n } // Next we're going to render the tail.\n\n } else {\n // Append the rendered row to the child list.\n if (!didSuspendAlready) {\n var _suspended = findFirstSuspended(renderedTail);\n\n if (_suspended !== null) {\n workInProgress.flags |= DidCapture;\n didSuspendAlready = true; // Ensure we transfer the update queue to the parent so that it doesn't\n // get lost if this row ends up dropped during a second pass.\n\n var _retryQueue2 = _suspended.updateQueue;\n workInProgress.updateQueue = _retryQueue2;\n scheduleRetryEffect(workInProgress, _retryQueue2);\n cutOffTailIfNeeded(renderState, true); // This might have been modified.\n\n if (renderState.tail === null && renderState.tailMode === 'hidden' && !renderedTail.alternate && !getIsHydrating() // We don't cut it if we're hydrating.\n ) {\n // We're done.\n bubbleProperties(workInProgress);\n return null;\n }\n } else if ( // The time it took to render last row is greater than the remaining\n // time we have to render. So rendering one more row would likely\n // exceed it.\n now$1() * 2 - renderState.renderingStartTime > getRenderTargetTime() && renderLanes !== OffscreenLane) {\n // We have now passed our CPU deadline and we'll just give up further\n // attempts to render the main content and only render fallbacks.\n // The assumption is that this is usually faster.\n workInProgress.flags |= DidCapture;\n didSuspendAlready = true;\n cutOffTailIfNeeded(renderState, false); // Since nothing actually suspended, there will nothing to ping this\n // to get it started back up to attempt the next item. While in terms\n // of priority this work has the same priority as this current render,\n // it's not part of the same transition once the transition has\n // committed. If it's sync, we still want to yield so that it can be\n // painted. Conceptually, this is really the same as pinging.\n // We can use any RetryLane even if it's the one currently rendering\n // since we're leaving it behind on this node.\n\n workInProgress.lanes = SomeRetryLane;\n }\n }\n\n if (renderState.isBackwards) {\n // The effect list of the backwards tail will have been added\n // to the end. This breaks the guarantee that life-cycles fire in\n // sibling order but that isn't a strong guarantee promised by React.\n // Especially since these might also just pop in during future commits.\n // Append to the beginning of the list.\n renderedTail.sibling = workInProgress.child;\n workInProgress.child = renderedTail;\n } else {\n var previousSibling = renderState.last;\n\n if (previousSibling !== null) {\n previousSibling.sibling = renderedTail;\n } else {\n workInProgress.child = renderedTail;\n }\n\n renderState.last = renderedTail;\n }\n }\n\n if (renderState.tail !== null) {\n // We still have tail rows to render.\n // Pop a row.\n var next = renderState.tail;\n renderState.rendering = next;\n renderState.tail = next.sibling;\n renderState.renderingStartTime = now$1();\n next.sibling = null; // Restore the context.\n // TODO: We can probably just avoid popping it instead and only\n // setting it the first time we go from not suspended to suspended.\n\n var suspenseContext = suspenseStackCursor.current;\n\n if (didSuspendAlready) {\n suspenseContext = setShallowSuspenseListContext(suspenseContext, ForceSuspenseFallback);\n } else {\n suspenseContext = setDefaultShallowSuspenseListContext(suspenseContext);\n }\n\n pushSuspenseListContext(workInProgress, suspenseContext); // Do a pass over the next row.\n // Don't bubble properties in this case.\n\n return next;\n }\n\n bubbleProperties(workInProgress);\n return null;\n }\n\n case ScopeComponent:\n {\n\n break;\n }\n\n case OffscreenComponent:\n case LegacyHiddenComponent:\n {\n popSuspenseHandler(workInProgress);\n popHiddenContext(workInProgress);\n var _nextState = workInProgress.memoizedState;\n var nextIsHidden = _nextState !== null; // Schedule a Visibility effect if the visibility has changed\n\n {\n if (current !== null) {\n var _prevState = current.memoizedState;\n var prevIsHidden = _prevState !== null;\n\n if (prevIsHidden !== nextIsHidden) {\n workInProgress.flags |= Visibility;\n }\n } else {\n // On initial mount, we only need a Visibility effect if the tree\n // is hidden.\n if (nextIsHidden) {\n workInProgress.flags |= Visibility;\n }\n }\n }\n\n if (!nextIsHidden || (workInProgress.mode & ConcurrentMode) === NoMode) {\n bubbleProperties(workInProgress);\n } else {\n // Don't bubble properties for hidden children unless we're rendering\n // at offscreen priority.\n if (includesSomeLane(renderLanes, OffscreenLane) && // Also don't bubble if the tree suspended\n (workInProgress.flags & DidCapture) === NoLanes) {\n bubbleProperties(workInProgress); // Check if there was an insertion or update in the hidden subtree.\n // If so, we need to hide those nodes in the commit phase, so\n // schedule a visibility effect.\n\n if (workInProgress.subtreeFlags & (Placement | Update)) {\n workInProgress.flags |= Visibility;\n }\n }\n }\n\n var offscreenQueue = workInProgress.updateQueue;\n\n if (offscreenQueue !== null) {\n var _retryQueue3 = offscreenQueue.retryQueue;\n scheduleRetryEffect(workInProgress, _retryQueue3);\n }\n\n {\n var _previousCache2 = null;\n\n if (current !== null && current.memoizedState !== null && current.memoizedState.cachePool !== null) {\n _previousCache2 = current.memoizedState.cachePool.pool;\n }\n\n var _cache2 = null;\n\n if (workInProgress.memoizedState !== null && workInProgress.memoizedState.cachePool !== null) {\n _cache2 = workInProgress.memoizedState.cachePool.pool;\n }\n\n if (_cache2 !== _previousCache2) {\n // Run passive effects to retain/release the cache.\n workInProgress.flags |= Passive$1;\n }\n }\n\n popTransition(workInProgress, current);\n return null;\n }\n\n case CacheComponent:\n {\n {\n var _previousCache3 = null;\n\n if (current !== null) {\n _previousCache3 = current.memoizedState.cache;\n }\n\n var _cache3 = workInProgress.memoizedState.cache;\n\n if (_cache3 !== _previousCache3) {\n // Run passive effects to retain/release the cache.\n workInProgress.flags |= Passive$1;\n }\n\n popCacheProvider(workInProgress);\n bubbleProperties(workInProgress);\n }\n\n return null;\n }\n\n case TracingMarkerComponent:\n {\n\n return null;\n }\n }\n\n throw new Error(\"Unknown unit of work tag (\" + workInProgress.tag + \"). This error is likely caused by a bug in \" + 'React. Please file an issue.');\n}\n\nfunction unwindWork(current, workInProgress, renderLanes) {\n // Note: This intentionally doesn't check if we're hydrating because comparing\n // to the current tree provider fiber is just as fast and less error-prone.\n // Ideally we would have a special version of the work loop only\n // for hydration.\n popTreeContext(workInProgress);\n\n switch (workInProgress.tag) {\n case ClassComponent:\n {\n var Component = workInProgress.type;\n\n if (isContextProvider(Component)) {\n popContext(workInProgress);\n }\n\n var flags = workInProgress.flags;\n\n if (flags & ShouldCapture) {\n workInProgress.flags = flags & ~ShouldCapture | DidCapture;\n\n if ((workInProgress.mode & ProfileMode) !== NoMode) {\n transferActualDuration(workInProgress);\n }\n\n return workInProgress;\n }\n\n return null;\n }\n\n case HostRoot:\n {\n\n {\n popCacheProvider(workInProgress);\n }\n popHostContainer(workInProgress);\n popTopLevelContextObject(workInProgress);\n var _flags = workInProgress.flags;\n\n if ((_flags & ShouldCapture) !== NoFlags$1 && (_flags & DidCapture) === NoFlags$1) {\n // There was an error during render that wasn't captured by a suspense\n // boundary. Do a second pass on the root to unmount the children.\n workInProgress.flags = _flags & ~ShouldCapture | DidCapture;\n return workInProgress;\n } // We unwound to the root without completing it. Exit.\n\n\n return null;\n }\n\n case HostHoistable:\n case HostSingleton:\n case HostComponent:\n {\n // TODO: popHydrationState\n popHostContext(workInProgress);\n return null;\n }\n\n case SuspenseComponent:\n {\n popSuspenseHandler(workInProgress);\n var suspenseState = workInProgress.memoizedState;\n\n if (suspenseState !== null && suspenseState.dehydrated !== null) {\n if (workInProgress.alternate === null) {\n throw new Error('Threw in newly mounted dehydrated component. This is likely a bug in ' + 'React. Please file an issue.');\n }\n\n resetHydrationState();\n }\n\n var _flags2 = workInProgress.flags;\n\n if (_flags2 & ShouldCapture) {\n workInProgress.flags = _flags2 & ~ShouldCapture | DidCapture; // Captured a suspense effect. Re-render the boundary.\n\n if ((workInProgress.mode & ProfileMode) !== NoMode) {\n transferActualDuration(workInProgress);\n }\n\n return workInProgress;\n }\n\n return null;\n }\n\n case SuspenseListComponent:\n {\n popSuspenseListContext(workInProgress); // SuspenseList doesn't actually catch anything. It should've been\n // caught by a nested boundary. If not, it should bubble through.\n\n return null;\n }\n\n case HostPortal:\n popHostContainer(workInProgress);\n return null;\n\n case ContextProvider:\n var context;\n\n {\n context = workInProgress.type._context;\n }\n\n popProvider(context, workInProgress);\n return null;\n\n case OffscreenComponent:\n case LegacyHiddenComponent:\n {\n popSuspenseHandler(workInProgress);\n popHiddenContext(workInProgress);\n popTransition(workInProgress, current);\n var _flags3 = workInProgress.flags;\n\n if (_flags3 & ShouldCapture) {\n workInProgress.flags = _flags3 & ~ShouldCapture | DidCapture; // Captured a suspense effect. Re-render the boundary.\n\n if ((workInProgress.mode & ProfileMode) !== NoMode) {\n transferActualDuration(workInProgress);\n }\n\n return workInProgress;\n }\n\n return null;\n }\n\n case CacheComponent:\n {\n popCacheProvider(workInProgress);\n }\n\n return null;\n\n case TracingMarkerComponent:\n\n return null;\n\n default:\n return null;\n }\n}\n\nfunction unwindInterruptedWork(current, interruptedWork, renderLanes) {\n // Note: This intentionally doesn't check if we're hydrating because comparing\n // to the current tree provider fiber is just as fast and less error-prone.\n // Ideally we would have a special version of the work loop only\n // for hydration.\n popTreeContext(interruptedWork);\n\n switch (interruptedWork.tag) {\n case ClassComponent:\n {\n var childContextTypes = interruptedWork.type.childContextTypes;\n\n if (childContextTypes !== null && childContextTypes !== undefined) {\n popContext(interruptedWork);\n }\n\n break;\n }\n\n case HostRoot:\n {\n\n {\n popCacheProvider(interruptedWork);\n }\n popHostContainer(interruptedWork);\n popTopLevelContextObject(interruptedWork);\n break;\n }\n\n case HostHoistable:\n case HostSingleton:\n case HostComponent:\n {\n popHostContext(interruptedWork);\n break;\n }\n\n case HostPortal:\n popHostContainer(interruptedWork);\n break;\n\n case SuspenseComponent:\n popSuspenseHandler(interruptedWork);\n break;\n\n case SuspenseListComponent:\n popSuspenseListContext(interruptedWork);\n break;\n\n case ContextProvider:\n var context;\n\n {\n context = interruptedWork.type._context;\n }\n\n popProvider(context, interruptedWork);\n break;\n\n case OffscreenComponent:\n case LegacyHiddenComponent:\n popSuspenseHandler(interruptedWork);\n popHiddenContext(interruptedWork);\n popTransition(interruptedWork, current);\n break;\n\n case CacheComponent:\n {\n popCacheProvider(interruptedWork);\n }\n\n break;\n }\n}\n\nvar didWarnAboutUndefinedSnapshotBeforeUpdate = null;\n\n{\n didWarnAboutUndefinedSnapshotBeforeUpdate = new Set();\n} // Used during the commit phase to track the state of the Offscreen component stack.\n// Allows us to avoid traversing the return path to find the nearest Offscreen ancestor.\n\n\nvar offscreenSubtreeIsHidden = false;\nvar offscreenSubtreeWasHidden = false;\nvar PossiblyWeakSet = typeof WeakSet === 'function' ? WeakSet : Set;\nvar nextEffect = null; // Used for Profiling builds to track updaters.\n\nvar inProgressLanes = null;\nvar inProgressRoot = null;\n\nfunction shouldProfile(current) {\n return (current.mode & ProfileMode) !== NoMode && (getExecutionContext() & CommitContext) !== NoContext;\n}\n\nfunction callComponentWillUnmountWithTimer(current, instance) {\n instance.props = current.memoizedProps;\n instance.state = current.memoizedState;\n\n if (shouldProfile(current)) {\n try {\n startLayoutEffectTimer();\n instance.componentWillUnmount();\n } finally {\n recordLayoutEffectDuration(current);\n }\n } else {\n instance.componentWillUnmount();\n }\n} // Capture errors so they don't interrupt unmounting.\n\n\nfunction safelyCallComponentWillUnmount(current, nearestMountedAncestor, instance) {\n try {\n callComponentWillUnmountWithTimer(current, instance);\n } catch (error) {\n captureCommitPhaseError(current, nearestMountedAncestor, error);\n }\n} // Capture errors so they don't interrupt mounting.\n\n\nfunction safelyAttachRef(current, nearestMountedAncestor) {\n try {\n commitAttachRef(current);\n } catch (error) {\n captureCommitPhaseError(current, nearestMountedAncestor, error);\n }\n}\n\nfunction safelyDetachRef(current, nearestMountedAncestor) {\n var ref = current.ref;\n var refCleanup = current.refCleanup;\n\n if (ref !== null) {\n if (typeof refCleanup === 'function') {\n try {\n if (shouldProfile(current)) {\n try {\n startLayoutEffectTimer();\n refCleanup();\n } finally {\n recordLayoutEffectDuration(current);\n }\n } else {\n refCleanup();\n }\n } catch (error) {\n captureCommitPhaseError(current, nearestMountedAncestor, error);\n } finally {\n // `refCleanup` has been called. Nullify all references to it to prevent double invocation.\n current.refCleanup = null;\n var finishedWork = current.alternate;\n\n if (finishedWork != null) {\n finishedWork.refCleanup = null;\n }\n }\n } else if (typeof ref === 'function') {\n var retVal;\n\n try {\n if (shouldProfile(current)) {\n try {\n startLayoutEffectTimer();\n retVal = ref(null);\n } finally {\n recordLayoutEffectDuration(current);\n }\n } else {\n retVal = ref(null);\n }\n } catch (error) {\n captureCommitPhaseError(current, nearestMountedAncestor, error);\n }\n\n {\n if (typeof retVal === 'function') {\n error('Unexpected return value from a callback ref in %s. ' + 'A callback ref should not return a function.', getComponentNameFromFiber(current));\n }\n }\n } else {\n // $FlowFixMe[incompatible-use] unable to narrow type to RefObject\n ref.current = null;\n }\n }\n}\n\nfunction safelyCallDestroy(current, nearestMountedAncestor, destroy) {\n try {\n destroy();\n } catch (error) {\n captureCommitPhaseError(current, nearestMountedAncestor, error);\n }\n}\nvar shouldFireAfterActiveInstanceBlur = false;\nfunction commitBeforeMutationEffects(root, firstChild) {\n prepareForCommit();\n nextEffect = firstChild;\n commitBeforeMutationEffects_begin(); // We no longer need to track the active instance fiber\n\n var shouldFire = shouldFireAfterActiveInstanceBlur;\n shouldFireAfterActiveInstanceBlur = false;\n return shouldFire;\n}\n\nfunction commitBeforeMutationEffects_begin() {\n while (nextEffect !== null) {\n var fiber = nextEffect; // This phase is only used for beforeActiveInstanceBlur.\n\n var child = fiber.child;\n\n if ((fiber.subtreeFlags & BeforeMutationMask) !== NoFlags$1 && child !== null) {\n child.return = fiber;\n nextEffect = child;\n } else {\n commitBeforeMutationEffects_complete();\n }\n }\n}\n\nfunction commitBeforeMutationEffects_complete() {\n while (nextEffect !== null) {\n var fiber = nextEffect;\n setCurrentFiber(fiber);\n\n try {\n commitBeforeMutationEffectsOnFiber(fiber);\n } catch (error) {\n captureCommitPhaseError(fiber, fiber.return, error);\n }\n\n resetCurrentFiber();\n var sibling = fiber.sibling;\n\n if (sibling !== null) {\n sibling.return = fiber.return;\n nextEffect = sibling;\n return;\n }\n\n nextEffect = fiber.return;\n }\n}\n\nfunction commitBeforeMutationEffectsOnFiber(finishedWork) {\n var current = finishedWork.alternate;\n var flags = finishedWork.flags;\n\n if ((flags & Snapshot) !== NoFlags$1) {\n setCurrentFiber(finishedWork);\n }\n\n switch (finishedWork.tag) {\n case FunctionComponent:\n {\n\n break;\n }\n\n case ForwardRef:\n case SimpleMemoComponent:\n {\n break;\n }\n\n case ClassComponent:\n {\n if ((flags & Snapshot) !== NoFlags$1) {\n if (current !== null) {\n var prevProps = current.memoizedProps;\n var prevState = current.memoizedState;\n var instance = finishedWork.stateNode; // We could update instance props and state here,\n // but instead we rely on them being set during last render.\n // TODO: revisit this when we implement resuming.\n\n {\n if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {\n if (instance.props !== finishedWork.memoizedProps) {\n error('Expected %s props to match memoized props before ' + 'getSnapshotBeforeUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentNameFromFiber(finishedWork) || 'instance');\n }\n\n if (instance.state !== finishedWork.memoizedState) {\n error('Expected %s state to match memoized state before ' + 'getSnapshotBeforeUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.state`. ' + 'Please file an issue.', getComponentNameFromFiber(finishedWork) || 'instance');\n }\n }\n }\n\n var snapshot = instance.getSnapshotBeforeUpdate(finishedWork.elementType === finishedWork.type ? prevProps : resolveDefaultProps(finishedWork.type, prevProps), prevState);\n\n {\n var didWarnSet = didWarnAboutUndefinedSnapshotBeforeUpdate;\n\n if (snapshot === undefined && !didWarnSet.has(finishedWork.type)) {\n didWarnSet.add(finishedWork.type);\n\n error('%s.getSnapshotBeforeUpdate(): A snapshot value (or null) ' + 'must be returned. You have returned undefined.', getComponentNameFromFiber(finishedWork));\n }\n }\n\n instance.__reactInternalSnapshotBeforeUpdate = snapshot;\n }\n }\n\n break;\n }\n\n case HostRoot:\n {\n if ((flags & Snapshot) !== NoFlags$1) {\n {\n var root = finishedWork.stateNode;\n clearContainer(root.containerInfo);\n }\n }\n\n break;\n }\n\n case HostComponent:\n case HostHoistable:\n case HostSingleton:\n case HostText:\n case HostPortal:\n case IncompleteClassComponent:\n // Nothing to do for these component types\n break;\n\n default:\n {\n if ((flags & Snapshot) !== NoFlags$1) {\n throw new Error('This unit of work tag should not have side-effects. This error is ' + 'likely caused by a bug in React. Please file an issue.');\n }\n }\n }\n\n if ((flags & Snapshot) !== NoFlags$1) {\n resetCurrentFiber();\n }\n}\n\nfunction commitHookEffectListUnmount(flags, finishedWork, nearestMountedAncestor) {\n var updateQueue = finishedWork.updateQueue;\n var lastEffect = updateQueue !== null ? updateQueue.lastEffect : null;\n\n if (lastEffect !== null) {\n var firstEffect = lastEffect.next;\n var effect = firstEffect;\n\n do {\n if ((effect.tag & flags) === flags) {\n // Unmount\n var inst = effect.inst;\n var destroy = inst.destroy;\n\n if (destroy !== undefined) {\n inst.destroy = undefined;\n\n {\n if ((flags & Passive) !== NoFlags) {\n markComponentPassiveEffectUnmountStarted(finishedWork);\n } else if ((flags & Layout) !== NoFlags) {\n markComponentLayoutEffectUnmountStarted(finishedWork);\n }\n }\n\n {\n if ((flags & Insertion) !== NoFlags) {\n setIsRunningInsertionEffect(true);\n }\n }\n\n safelyCallDestroy(finishedWork, nearestMountedAncestor, destroy);\n\n {\n if ((flags & Insertion) !== NoFlags) {\n setIsRunningInsertionEffect(false);\n }\n }\n\n {\n if ((flags & Passive) !== NoFlags) {\n markComponentPassiveEffectUnmountStopped();\n } else if ((flags & Layout) !== NoFlags) {\n markComponentLayoutEffectUnmountStopped();\n }\n }\n }\n }\n\n effect = effect.next;\n } while (effect !== firstEffect);\n }\n}\n\nfunction commitHookEffectListMount(flags, finishedWork) {\n var updateQueue = finishedWork.updateQueue;\n var lastEffect = updateQueue !== null ? updateQueue.lastEffect : null;\n\n if (lastEffect !== null) {\n var firstEffect = lastEffect.next;\n var effect = firstEffect;\n\n do {\n if ((effect.tag & flags) === flags) {\n {\n if ((flags & Passive) !== NoFlags) {\n markComponentPassiveEffectMountStarted(finishedWork);\n } else if ((flags & Layout) !== NoFlags) {\n markComponentLayoutEffectMountStarted(finishedWork);\n }\n } // Mount\n\n\n var create = effect.create;\n\n {\n if ((flags & Insertion) !== NoFlags) {\n setIsRunningInsertionEffect(true);\n }\n }\n\n var inst = effect.inst;\n var destroy = create();\n inst.destroy = destroy;\n\n {\n if ((flags & Insertion) !== NoFlags) {\n setIsRunningInsertionEffect(false);\n }\n }\n\n {\n if ((flags & Passive) !== NoFlags) {\n markComponentPassiveEffectMountStopped();\n } else if ((flags & Layout) !== NoFlags) {\n markComponentLayoutEffectMountStopped();\n }\n }\n\n {\n if (destroy !== undefined && typeof destroy !== 'function') {\n var hookName = void 0;\n\n if ((effect.tag & Layout) !== NoFlags$1) {\n hookName = 'useLayoutEffect';\n } else if ((effect.tag & Insertion) !== NoFlags$1) {\n hookName = 'useInsertionEffect';\n } else {\n hookName = 'useEffect';\n }\n\n var addendum = void 0;\n\n if (destroy === null) {\n addendum = ' You returned null. If your effect does not require clean ' + 'up, return undefined (or nothing).';\n } else if (typeof destroy.then === 'function') {\n addendum = '\\n\\nIt looks like you wrote ' + hookName + '(async () => ...) or returned a Promise. ' + 'Instead, write the async function inside your effect ' + 'and call it immediately:\\n\\n' + hookName + '(() => {\\n' + ' async function fetchData() {\\n' + ' // You can await here\\n' + ' const response = await MyAPI.getData(someId);\\n' + ' // ...\\n' + ' }\\n' + ' fetchData();\\n' + \"}, [someId]); // Or [] if effect doesn't need props or state\\n\\n\" + 'Learn more about data fetching with Hooks: https://react.dev/link/hooks-data-fetching';\n } else {\n addendum = ' You returned: ' + destroy;\n }\n\n error('%s must not return anything besides a function, ' + 'which is used for clean-up.%s', hookName, addendum);\n }\n }\n }\n\n effect = effect.next;\n } while (effect !== firstEffect);\n }\n}\n\nfunction commitPassiveEffectDurations(finishedRoot, finishedWork) {\n if (getExecutionContext() & CommitContext) {\n // Only Profilers with work in their subtree will have an Update effect scheduled.\n if ((finishedWork.flags & Update) !== NoFlags$1) {\n switch (finishedWork.tag) {\n case Profiler:\n {\n var passiveEffectDuration = finishedWork.stateNode.passiveEffectDuration;\n var _finishedWork$memoize = finishedWork.memoizedProps,\n id = _finishedWork$memoize.id,\n onPostCommit = _finishedWork$memoize.onPostCommit; // This value will still reflect the previous commit phase.\n // It does not get reset until the start of the next commit phase.\n\n var commitTime = getCommitTime();\n var phase = finishedWork.alternate === null ? 'mount' : 'update';\n\n {\n if (isCurrentUpdateNested()) {\n phase = 'nested-update';\n }\n }\n\n if (typeof onPostCommit === 'function') {\n onPostCommit(id, phase, passiveEffectDuration, commitTime);\n } // Bubble times to the next nearest ancestor Profiler.\n // After we process that Profiler, we'll bubble further up.\n\n\n var parentFiber = finishedWork.return;\n\n outer: while (parentFiber !== null) {\n switch (parentFiber.tag) {\n case HostRoot:\n var root = parentFiber.stateNode;\n root.passiveEffectDuration += passiveEffectDuration;\n break outer;\n\n case Profiler:\n var parentStateNode = parentFiber.stateNode;\n parentStateNode.passiveEffectDuration += passiveEffectDuration;\n break outer;\n }\n\n parentFiber = parentFiber.return;\n }\n\n break;\n }\n }\n }\n }\n}\n\nfunction commitHookLayoutEffects(finishedWork, hookFlags) {\n // At this point layout effects have already been destroyed (during mutation phase).\n // This is done to prevent sibling component effects from interfering with each other,\n // e.g. a destroy function in one component should never override a ref set\n // by a create function in another component during the same commit.\n if (shouldProfile(finishedWork)) {\n try {\n startLayoutEffectTimer();\n commitHookEffectListMount(hookFlags, finishedWork);\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n\n recordLayoutEffectDuration(finishedWork);\n } else {\n try {\n commitHookEffectListMount(hookFlags, finishedWork);\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n }\n}\n\nfunction commitClassLayoutLifecycles(finishedWork, current) {\n var instance = finishedWork.stateNode;\n\n if (current === null) {\n // We could update instance props and state here,\n // but instead we rely on them being set during last render.\n // TODO: revisit this when we implement resuming.\n {\n if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {\n if (instance.props !== finishedWork.memoizedProps) {\n error('Expected %s props to match memoized props before ' + 'componentDidMount. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentNameFromFiber(finishedWork) || 'instance');\n }\n\n if (instance.state !== finishedWork.memoizedState) {\n error('Expected %s state to match memoized state before ' + 'componentDidMount. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.state`. ' + 'Please file an issue.', getComponentNameFromFiber(finishedWork) || 'instance');\n }\n }\n }\n\n if (shouldProfile(finishedWork)) {\n try {\n startLayoutEffectTimer();\n instance.componentDidMount();\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n\n recordLayoutEffectDuration(finishedWork);\n } else {\n try {\n instance.componentDidMount();\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n }\n } else {\n var prevProps = finishedWork.elementType === finishedWork.type ? current.memoizedProps : resolveDefaultProps(finishedWork.type, current.memoizedProps);\n var prevState = current.memoizedState; // We could update instance props and state here,\n // but instead we rely on them being set during last render.\n // TODO: revisit this when we implement resuming.\n\n {\n if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {\n if (instance.props !== finishedWork.memoizedProps) {\n error('Expected %s props to match memoized props before ' + 'componentDidUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentNameFromFiber(finishedWork) || 'instance');\n }\n\n if (instance.state !== finishedWork.memoizedState) {\n error('Expected %s state to match memoized state before ' + 'componentDidUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.state`. ' + 'Please file an issue.', getComponentNameFromFiber(finishedWork) || 'instance');\n }\n }\n }\n\n if (shouldProfile(finishedWork)) {\n try {\n startLayoutEffectTimer();\n instance.componentDidUpdate(prevProps, prevState, instance.__reactInternalSnapshotBeforeUpdate);\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n\n recordLayoutEffectDuration(finishedWork);\n } else {\n try {\n instance.componentDidUpdate(prevProps, prevState, instance.__reactInternalSnapshotBeforeUpdate);\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n }\n }\n}\n\nfunction commitClassCallbacks(finishedWork) {\n // TODO: I think this is now always non-null by the time it reaches the\n // commit phase. Consider removing the type check.\n var updateQueue = finishedWork.updateQueue;\n\n if (updateQueue !== null) {\n var instance = finishedWork.stateNode;\n\n {\n if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {\n if (instance.props !== finishedWork.memoizedProps) {\n error('Expected %s props to match memoized props before ' + 'processing the update queue. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentNameFromFiber(finishedWork) || 'instance');\n }\n\n if (instance.state !== finishedWork.memoizedState) {\n error('Expected %s state to match memoized state before ' + 'processing the update queue. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.state`. ' + 'Please file an issue.', getComponentNameFromFiber(finishedWork) || 'instance');\n }\n }\n } // We could update instance props and state here,\n // but instead we rely on them being set during last render.\n // TODO: revisit this when we implement resuming.\n\n\n try {\n commitCallbacks(updateQueue, instance);\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n }\n}\n\nfunction commitHostComponentMount(finishedWork) {\n var type = finishedWork.type;\n var props = finishedWork.memoizedProps;\n var instance = finishedWork.stateNode;\n\n try {\n commitMount(instance, type, props, finishedWork);\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n}\n\nfunction commitProfilerUpdate(finishedWork, current) {\n if (getExecutionContext() & CommitContext) {\n try {\n var _finishedWork$memoize2 = finishedWork.memoizedProps,\n onCommit = _finishedWork$memoize2.onCommit,\n onRender = _finishedWork$memoize2.onRender;\n var effectDuration = finishedWork.stateNode.effectDuration;\n var commitTime = getCommitTime();\n var phase = current === null ? 'mount' : 'update';\n\n if (enableProfilerNestedUpdatePhase) {\n if (isCurrentUpdateNested()) {\n phase = 'nested-update';\n }\n }\n\n if (typeof onRender === 'function') {\n onRender(finishedWork.memoizedProps.id, phase, finishedWork.actualDuration, finishedWork.treeBaseDuration, finishedWork.actualStartTime, commitTime);\n }\n\n if (enableProfilerCommitHooks) {\n if (typeof onCommit === 'function') {\n onCommit(finishedWork.memoizedProps.id, phase, effectDuration, commitTime);\n } // Schedule a passive effect for this Profiler to call onPostCommit hooks.\n // This effect should be scheduled even if there is no onPostCommit callback for this Profiler,\n // because the effect is also where times bubble to parent Profilers.\n\n\n enqueuePendingPassiveProfilerEffect(finishedWork); // Propagate layout effect durations to the next nearest Profiler ancestor.\n // Do not reset these values until the next render so DevTools has a chance to read them first.\n\n var parentFiber = finishedWork.return;\n\n outer: while (parentFiber !== null) {\n switch (parentFiber.tag) {\n case HostRoot:\n var root = parentFiber.stateNode;\n root.effectDuration += effectDuration;\n break outer;\n\n case Profiler:\n var parentStateNode = parentFiber.stateNode;\n parentStateNode.effectDuration += effectDuration;\n break outer;\n }\n\n parentFiber = parentFiber.return;\n }\n }\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n }\n}\n\nfunction commitLayoutEffectOnFiber(finishedRoot, current, finishedWork, committedLanes) {\n // When updating this function, also update reappearLayoutEffects, which does\n // most of the same things when an offscreen tree goes from hidden -> visible.\n var flags = finishedWork.flags;\n\n switch (finishedWork.tag) {\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);\n\n if (flags & Update) {\n commitHookLayoutEffects(finishedWork, Layout | HasEffect);\n }\n\n break;\n }\n\n case ClassComponent:\n {\n recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);\n\n if (flags & Update) {\n commitClassLayoutLifecycles(finishedWork, current);\n }\n\n if (flags & Callback) {\n commitClassCallbacks(finishedWork);\n }\n\n if (flags & Ref) {\n safelyAttachRef(finishedWork, finishedWork.return);\n }\n\n break;\n }\n\n case HostRoot:\n {\n recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);\n\n if (flags & Callback) {\n // TODO: I think this is now always non-null by the time it reaches the\n // commit phase. Consider removing the type check.\n var updateQueue = finishedWork.updateQueue;\n\n if (updateQueue !== null) {\n var instance = null;\n\n if (finishedWork.child !== null) {\n switch (finishedWork.child.tag) {\n case HostSingleton:\n case HostComponent:\n instance = getPublicInstance(finishedWork.child.stateNode);\n break;\n\n case ClassComponent:\n instance = finishedWork.child.stateNode;\n break;\n }\n }\n\n try {\n commitCallbacks(updateQueue, instance);\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n }\n }\n\n break;\n }\n\n case HostHoistable:\n {\n {\n recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);\n\n if (flags & Ref) {\n safelyAttachRef(finishedWork, finishedWork.return);\n }\n\n break;\n } // Fall through\n\n }\n\n case HostSingleton:\n case HostComponent:\n {\n recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); // Renderers may schedule work to be done after host components are mounted\n // (eg DOM renderer may schedule auto-focus for inputs and form controls).\n // These effects should only be committed when components are first mounted,\n // aka when there is no current/alternate.\n\n if (current === null && flags & Update) {\n commitHostComponentMount(finishedWork);\n }\n\n if (flags & Ref) {\n safelyAttachRef(finishedWork, finishedWork.return);\n }\n\n break;\n }\n\n case Profiler:\n {\n recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); // TODO: Should this fire inside an offscreen tree? Or should it wait to\n // fire when the tree becomes visible again.\n\n if (flags & Update) {\n commitProfilerUpdate(finishedWork, current);\n }\n\n break;\n }\n\n case SuspenseComponent:\n {\n recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);\n\n if (flags & Update) {\n commitSuspenseHydrationCallbacks(finishedRoot, finishedWork);\n }\n\n break;\n }\n\n case OffscreenComponent:\n {\n var isModernRoot = (finishedWork.mode & ConcurrentMode) !== NoMode;\n\n if (isModernRoot) {\n var isHidden = finishedWork.memoizedState !== null;\n var newOffscreenSubtreeIsHidden = isHidden || offscreenSubtreeIsHidden;\n\n if (newOffscreenSubtreeIsHidden) ; else {\n // The Offscreen tree is visible.\n var wasHidden = current !== null && current.memoizedState !== null;\n var newOffscreenSubtreeWasHidden = wasHidden || offscreenSubtreeWasHidden;\n var prevOffscreenSubtreeIsHidden = offscreenSubtreeIsHidden;\n var prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden;\n offscreenSubtreeIsHidden = newOffscreenSubtreeIsHidden;\n offscreenSubtreeWasHidden = newOffscreenSubtreeWasHidden;\n\n if (offscreenSubtreeWasHidden && !prevOffscreenSubtreeWasHidden) {\n // This is the root of a reappearing boundary. As we continue\n // traversing the layout effects, we must also re-mount layout\n // effects that were unmounted when the Offscreen subtree was\n // hidden. So this is a superset of the normal commitLayoutEffects.\n var includeWorkInProgressEffects = (finishedWork.subtreeFlags & LayoutMask) !== NoFlags$1;\n recursivelyTraverseReappearLayoutEffects(finishedRoot, finishedWork, includeWorkInProgressEffects);\n } else {\n recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);\n }\n\n offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden;\n offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden;\n }\n } else {\n recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);\n }\n\n if (flags & Ref) {\n var props = finishedWork.memoizedProps;\n\n if (props.mode === 'manual') {\n safelyAttachRef(finishedWork, finishedWork.return);\n } else {\n safelyDetachRef(finishedWork, finishedWork.return);\n }\n }\n\n break;\n }\n\n default:\n {\n recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);\n break;\n }\n }\n}\n\nfunction hideOrUnhideAllChildren(finishedWork, isHidden) {\n // Only hide or unhide the top-most host nodes.\n var hostSubtreeRoot = null;\n\n {\n // We only have the top Fiber that was inserted but we need to recurse down its\n // children to find all the terminal nodes.\n var node = finishedWork;\n\n while (true) {\n if (node.tag === HostComponent || (node.tag === HostHoistable ) || (node.tag === HostSingleton )) {\n if (hostSubtreeRoot === null) {\n hostSubtreeRoot = node;\n\n try {\n var instance = node.stateNode;\n\n if (isHidden) {\n hideInstance(instance);\n } else {\n unhideInstance(node.stateNode, node.memoizedProps);\n }\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n }\n } else if (node.tag === HostText) {\n if (hostSubtreeRoot === null) {\n try {\n var _instance = node.stateNode;\n\n if (isHidden) {\n hideTextInstance(_instance);\n } else {\n unhideTextInstance(_instance, node.memoizedProps);\n }\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n }\n } else if ((node.tag === OffscreenComponent || node.tag === LegacyHiddenComponent) && node.memoizedState !== null && node !== finishedWork) ; else if (node.child !== null) {\n node.child.return = node;\n node = node.child;\n continue;\n }\n\n if (node === finishedWork) {\n return;\n }\n\n while (node.sibling === null) {\n if (node.return === null || node.return === finishedWork) {\n return;\n }\n\n if (hostSubtreeRoot === node) {\n hostSubtreeRoot = null;\n }\n\n node = node.return;\n }\n\n if (hostSubtreeRoot === node) {\n hostSubtreeRoot = null;\n }\n\n node.sibling.return = node.return;\n node = node.sibling;\n }\n }\n}\n\nfunction commitAttachRef(finishedWork) {\n var ref = finishedWork.ref;\n\n if (ref !== null) {\n var instance = finishedWork.stateNode;\n var instanceToUse;\n\n switch (finishedWork.tag) {\n case HostHoistable:\n case HostSingleton:\n case HostComponent:\n instanceToUse = getPublicInstance(instance);\n break;\n\n default:\n instanceToUse = instance;\n } // Moved outside to ensure DCE works with this flag\n\n if (typeof ref === 'function') {\n if (shouldProfile(finishedWork)) {\n try {\n startLayoutEffectTimer();\n finishedWork.refCleanup = ref(instanceToUse);\n } finally {\n recordLayoutEffectDuration(finishedWork);\n }\n } else {\n finishedWork.refCleanup = ref(instanceToUse);\n }\n } else {\n {\n // TODO: We should move these warnings to happen during the render\n // phase (markRef).\n if (!ref.hasOwnProperty('current')) {\n error('Unexpected ref object provided for %s. ' + 'Use either a ref-setter function or React.createRef().', getComponentNameFromFiber(finishedWork));\n }\n } // $FlowFixMe[incompatible-use] unable to narrow type to the non-function case\n\n\n ref.current = instanceToUse;\n }\n }\n}\n\nfunction detachFiberMutation(fiber) {\n // Cut off the return pointer to disconnect it from the tree.\n // This enables us to detect and warn against state updates on an unmounted component.\n // It also prevents events from bubbling from within disconnected components.\n //\n // Ideally, we should also clear the child pointer of the parent alternate to let this\n // get GC:ed but we don't know which for sure which parent is the current\n // one so we'll settle for GC:ing the subtree of this child.\n // This child itself will be GC:ed when the parent updates the next time.\n //\n // Note that we can't clear child or sibling pointers yet.\n // They're needed for passive effects and for findDOMNode.\n // We defer those fields, and all other cleanup, to the passive phase (see detachFiberAfterEffects).\n //\n // Don't reset the alternate yet, either. We need that so we can detach the\n // alternate's fields in the passive phase. Clearing the return pointer is\n // sufficient for findDOMNode semantics.\n var alternate = fiber.alternate;\n\n if (alternate !== null) {\n alternate.return = null;\n }\n\n fiber.return = null;\n}\n\nfunction detachFiberAfterEffects(fiber) {\n var alternate = fiber.alternate;\n\n if (alternate !== null) {\n fiber.alternate = null;\n detachFiberAfterEffects(alternate);\n } // Clear cyclical Fiber fields. This level alone is designed to roughly\n // approximate the planned Fiber refactor. In that world, `setState` will be\n // bound to a special \"instance\" object instead of a Fiber. The Instance\n // object will not have any of these fields. It will only be connected to\n // the fiber tree via a single link at the root. So if this level alone is\n // sufficient to fix memory issues, that bodes well for our plans.\n\n\n fiber.child = null;\n fiber.deletions = null;\n fiber.sibling = null; // The `stateNode` is cyclical because on host nodes it points to the host\n // tree, which has its own pointers to children, parents, and siblings.\n // The other host nodes also point back to fibers, so we should detach that\n // one, too.\n\n if (fiber.tag === HostComponent) {\n var hostInstance = fiber.stateNode;\n\n if (hostInstance !== null) {\n detachDeletedInstance(hostInstance);\n }\n }\n\n fiber.stateNode = null;\n\n {\n fiber._debugOwner = null;\n } // Theoretically, nothing in here should be necessary, because we already\n // disconnected the fiber from the tree. So even if something leaks this\n // particular fiber, it won't leak anything else.\n\n\n fiber.return = null;\n fiber.dependencies = null;\n fiber.memoizedProps = null;\n fiber.memoizedState = null;\n fiber.pendingProps = null;\n fiber.stateNode = null; // TODO: Move to `commitPassiveUnmountInsideDeletedTreeOnFiber` instead.\n\n fiber.updateQueue = null;\n}\n\nfunction getHostParentFiber(fiber) {\n var parent = fiber.return;\n\n while (parent !== null) {\n if (isHostParent(parent)) {\n return parent;\n }\n\n parent = parent.return;\n }\n\n throw new Error('Expected to find a host parent. This error is likely caused by a bug ' + 'in React. Please file an issue.');\n}\n\nfunction isHostParent(fiber) {\n return fiber.tag === HostComponent || fiber.tag === HostRoot || (fiber.tag === HostHoistable ) || (fiber.tag === HostSingleton ) || fiber.tag === HostPortal;\n}\n\nfunction getHostSibling(fiber) {\n // We're going to search forward into the tree until we find a sibling host\n // node. Unfortunately, if multiple insertions are done in a row we have to\n // search past them. This leads to exponential search for the next sibling.\n // TODO: Find a more efficient way to do this.\n var node = fiber;\n\n siblings: while (true) {\n // If we didn't find anything, let's try the next sibling.\n while (node.sibling === null) {\n if (node.return === null || isHostParent(node.return)) {\n // If we pop out of the root or hit the parent the fiber we are the\n // last sibling.\n return null;\n } // $FlowFixMe[incompatible-type] found when upgrading Flow\n\n\n node = node.return;\n }\n\n node.sibling.return = node.return;\n node = node.sibling;\n\n while (node.tag !== HostComponent && node.tag !== HostText && (node.tag !== HostSingleton) && node.tag !== DehydratedFragment) {\n // If it is not host node and, we might have a host node inside it.\n // Try to search down until we find one.\n if (node.flags & Placement) {\n // If we don't have a child, try the siblings instead.\n continue siblings;\n } // If we don't have a child, try the siblings instead.\n // We also skip portals because they are not part of this host tree.\n\n\n if (node.child === null || node.tag === HostPortal) {\n continue siblings;\n } else {\n node.child.return = node;\n node = node.child;\n }\n } // Check if this host node is stable or about to be placed.\n\n\n if (!(node.flags & Placement)) {\n // Found it!\n return node.stateNode;\n }\n }\n}\n\nfunction commitPlacement(finishedWork) {\n\n {\n if (finishedWork.tag === HostSingleton) {\n // Singletons are already in the Host and don't need to be placed\n // Since they operate somewhat like Portals though their children will\n // have Placement and will get placed inside them\n return;\n }\n } // Recursively insert all host nodes into the parent.\n\n\n var parentFiber = getHostParentFiber(finishedWork);\n\n switch (parentFiber.tag) {\n case HostSingleton:\n {\n {\n var parent = parentFiber.stateNode;\n var before = getHostSibling(finishedWork); // We only have the top Fiber that was inserted but we need to recurse down its\n // children to find all the terminal nodes.\n\n insertOrAppendPlacementNode(finishedWork, before, parent);\n break;\n } // Fall through\n\n }\n\n case HostComponent:\n {\n var _parent = parentFiber.stateNode;\n\n if (parentFiber.flags & ContentReset) {\n // Reset the text content of the parent before doing any insertions\n resetTextContent(_parent); // Clear ContentReset from the effect tag\n\n parentFiber.flags &= ~ContentReset;\n }\n\n var _before = getHostSibling(finishedWork); // We only have the top Fiber that was inserted but we need to recurse down its\n // children to find all the terminal nodes.\n\n\n insertOrAppendPlacementNode(finishedWork, _before, _parent);\n break;\n }\n\n case HostRoot:\n case HostPortal:\n {\n var _parent2 = parentFiber.stateNode.containerInfo;\n\n var _before2 = getHostSibling(finishedWork);\n\n insertOrAppendPlacementNodeIntoContainer(finishedWork, _before2, _parent2);\n break;\n }\n\n default:\n throw new Error('Invalid host parent fiber. This error is likely caused by a bug ' + 'in React. Please file an issue.');\n }\n}\n\nfunction insertOrAppendPlacementNodeIntoContainer(node, before, parent) {\n var tag = node.tag;\n var isHost = tag === HostComponent || tag === HostText;\n\n if (isHost) {\n var stateNode = node.stateNode;\n\n if (before) {\n insertInContainerBefore(parent, stateNode, before);\n } else {\n appendChildToContainer(parent, stateNode);\n }\n } else if (tag === HostPortal || (tag === HostSingleton )) ; else {\n var child = node.child;\n\n if (child !== null) {\n insertOrAppendPlacementNodeIntoContainer(child, before, parent);\n var sibling = child.sibling;\n\n while (sibling !== null) {\n insertOrAppendPlacementNodeIntoContainer(sibling, before, parent);\n sibling = sibling.sibling;\n }\n }\n }\n}\n\nfunction insertOrAppendPlacementNode(node, before, parent) {\n var tag = node.tag;\n var isHost = tag === HostComponent || tag === HostText;\n\n if (isHost) {\n var stateNode = node.stateNode;\n\n if (before) {\n insertBefore(parent, stateNode, before);\n } else {\n appendChild(parent, stateNode);\n }\n } else if (tag === HostPortal || (tag === HostSingleton )) ; else {\n var child = node.child;\n\n if (child !== null) {\n insertOrAppendPlacementNode(child, before, parent);\n var sibling = child.sibling;\n\n while (sibling !== null) {\n insertOrAppendPlacementNode(sibling, before, parent);\n sibling = sibling.sibling;\n }\n }\n }\n} // These are tracked on the stack as we recursively traverse a\n// deleted subtree.\n// TODO: Update these during the whole mutation phase, not just during\n// a deletion.\n\n\nvar hostParent = null;\nvar hostParentIsContainer = false;\n\nfunction commitDeletionEffects(root, returnFiber, deletedFiber) {\n {\n // We only have the top Fiber that was deleted but we need to recurse down its\n // children to find all the terminal nodes.\n // Recursively delete all host nodes from the parent, detach refs, clean\n // up mounted layout effects, and call componentWillUnmount.\n // We only need to remove the topmost host child in each branch. But then we\n // still need to keep traversing to unmount effects, refs, and cWU. TODO: We\n // could split this into two separate traversals functions, where the second\n // one doesn't include any removeChild logic. This is maybe the same\n // function as \"disappearLayoutEffects\" (or whatever that turns into after\n // the layout phase is refactored to use recursion).\n // Before starting, find the nearest host parent on the stack so we know\n // which instance/container to remove the children from.\n // TODO: Instead of searching up the fiber return path on every deletion, we\n // can track the nearest host component on the JS stack as we traverse the\n // tree during the commit phase. This would make insertions faster, too.\n var parent = returnFiber;\n\n findParent: while (parent !== null) {\n switch (parent.tag) {\n case HostSingleton:\n case HostComponent:\n {\n hostParent = parent.stateNode;\n hostParentIsContainer = false;\n break findParent;\n }\n\n case HostRoot:\n {\n hostParent = parent.stateNode.containerInfo;\n hostParentIsContainer = true;\n break findParent;\n }\n\n case HostPortal:\n {\n hostParent = parent.stateNode.containerInfo;\n hostParentIsContainer = true;\n break findParent;\n }\n }\n\n parent = parent.return;\n }\n\n if (hostParent === null) {\n throw new Error('Expected to find a host parent. This error is likely caused by ' + 'a bug in React. Please file an issue.');\n }\n\n commitDeletionEffectsOnFiber(root, returnFiber, deletedFiber);\n hostParent = null;\n hostParentIsContainer = false;\n }\n\n detachFiberMutation(deletedFiber);\n}\n\nfunction recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, parent) {\n // TODO: Use a static flag to skip trees that don't have unmount effects\n var child = parent.child;\n\n while (child !== null) {\n commitDeletionEffectsOnFiber(finishedRoot, nearestMountedAncestor, child);\n child = child.sibling;\n }\n}\n\nfunction commitDeletionEffectsOnFiber(finishedRoot, nearestMountedAncestor, deletedFiber) {\n onCommitUnmount(deletedFiber); // The cases in this outer switch modify the stack before they traverse\n // into their subtree. There are simpler cases in the inner switch\n // that don't modify the stack.\n\n switch (deletedFiber.tag) {\n case HostHoistable:\n {\n {\n if (!offscreenSubtreeWasHidden) {\n safelyDetachRef(deletedFiber, nearestMountedAncestor);\n }\n\n recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber);\n\n if (deletedFiber.memoizedState) {\n releaseResource(deletedFiber.memoizedState);\n } else if (deletedFiber.stateNode) {\n unmountHoistable(deletedFiber.stateNode);\n }\n\n return;\n } // Fall through\n\n }\n\n case HostSingleton:\n {\n {\n if (!offscreenSubtreeWasHidden) {\n safelyDetachRef(deletedFiber, nearestMountedAncestor);\n }\n\n var prevHostParent = hostParent;\n var prevHostParentIsContainer = hostParentIsContainer;\n hostParent = deletedFiber.stateNode;\n recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber); // Normally this is called in passive unmount effect phase however with\n // HostSingleton we warn if you acquire one that is already associated to\n // a different fiber. To increase our chances of avoiding this, specifically\n // if you keyed a HostSingleton so there will be a delete followed by a Placement\n // we treat detach eagerly here\n\n releaseSingletonInstance(deletedFiber.stateNode);\n hostParent = prevHostParent;\n hostParentIsContainer = prevHostParentIsContainer;\n return;\n } // Fall through\n\n }\n\n case HostComponent:\n {\n if (!offscreenSubtreeWasHidden) {\n safelyDetachRef(deletedFiber, nearestMountedAncestor);\n } // Intentional fallthrough to next branch\n\n }\n\n case HostText:\n {\n // We only need to remove the nearest host child. Set the host parent\n // to `null` on the stack to indicate that nested children don't\n // need to be removed.\n {\n var _prevHostParent = hostParent;\n var _prevHostParentIsContainer = hostParentIsContainer;\n hostParent = null;\n recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber);\n hostParent = _prevHostParent;\n hostParentIsContainer = _prevHostParentIsContainer;\n\n if (hostParent !== null) {\n // Now that all the child effects have unmounted, we can remove the\n // node from the tree.\n if (hostParentIsContainer) {\n removeChildFromContainer(hostParent, deletedFiber.stateNode);\n } else {\n removeChild(hostParent, deletedFiber.stateNode);\n }\n }\n }\n\n return;\n }\n\n case DehydratedFragment:\n {\n // Delete the dehydrated suspense boundary and all of its content.\n\n\n {\n if (hostParent !== null) {\n if (hostParentIsContainer) {\n clearSuspenseBoundaryFromContainer(hostParent, deletedFiber.stateNode);\n } else {\n clearSuspenseBoundary(hostParent, deletedFiber.stateNode);\n }\n }\n }\n\n return;\n }\n\n case HostPortal:\n {\n {\n // When we go into a portal, it becomes the parent to remove from.\n var _prevHostParent2 = hostParent;\n var _prevHostParentIsContainer2 = hostParentIsContainer;\n hostParent = deletedFiber.stateNode.containerInfo;\n hostParentIsContainer = true;\n recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber);\n hostParent = _prevHostParent2;\n hostParentIsContainer = _prevHostParentIsContainer2;\n }\n\n return;\n }\n\n case FunctionComponent:\n case ForwardRef:\n case MemoComponent:\n case SimpleMemoComponent:\n {\n if (!offscreenSubtreeWasHidden) {\n var updateQueue = deletedFiber.updateQueue;\n\n if (updateQueue !== null) {\n var lastEffect = updateQueue.lastEffect;\n\n if (lastEffect !== null) {\n var firstEffect = lastEffect.next;\n var effect = firstEffect;\n\n do {\n var tag = effect.tag;\n var inst = effect.inst;\n var destroy = inst.destroy;\n\n if (destroy !== undefined) {\n if ((tag & Insertion) !== NoFlags) {\n inst.destroy = undefined;\n safelyCallDestroy(deletedFiber, nearestMountedAncestor, destroy);\n } else if ((tag & Layout) !== NoFlags) {\n {\n markComponentLayoutEffectUnmountStarted(deletedFiber);\n }\n\n if (shouldProfile(deletedFiber)) {\n startLayoutEffectTimer();\n inst.destroy = undefined;\n safelyCallDestroy(deletedFiber, nearestMountedAncestor, destroy);\n recordLayoutEffectDuration(deletedFiber);\n } else {\n inst.destroy = undefined;\n safelyCallDestroy(deletedFiber, nearestMountedAncestor, destroy);\n }\n\n {\n markComponentLayoutEffectUnmountStopped();\n }\n }\n }\n\n effect = effect.next;\n } while (effect !== firstEffect);\n }\n }\n }\n\n recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber);\n return;\n }\n\n case ClassComponent:\n {\n if (!offscreenSubtreeWasHidden) {\n safelyDetachRef(deletedFiber, nearestMountedAncestor);\n var instance = deletedFiber.stateNode;\n\n if (typeof instance.componentWillUnmount === 'function') {\n safelyCallComponentWillUnmount(deletedFiber, nearestMountedAncestor, instance);\n }\n }\n\n recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber);\n return;\n }\n\n case ScopeComponent:\n {\n\n recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber);\n return;\n }\n\n case OffscreenComponent:\n {\n safelyDetachRef(deletedFiber, nearestMountedAncestor);\n\n if (deletedFiber.mode & ConcurrentMode) {\n // If this offscreen component is hidden, we already unmounted it. Before\n // deleting the children, track that it's already unmounted so that we\n // don't attempt to unmount the effects again.\n // TODO: If the tree is hidden, in most cases we should be able to skip\n // over the nested children entirely. An exception is we haven't yet found\n // the topmost host node to delete, which we already track on the stack.\n // But the other case is portals, which need to be detached no matter how\n // deeply they are nested. We should use a subtree flag to track whether a\n // subtree includes a nested portal.\n var prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden;\n offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden || deletedFiber.memoizedState !== null;\n recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber);\n offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden;\n } else {\n recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber);\n }\n\n break;\n }\n\n default:\n {\n recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber);\n return;\n }\n }\n}\n\nfunction commitSuspenseCallback(finishedWork) {\n}\n\nfunction commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) {\n\n var newState = finishedWork.memoizedState;\n\n if (newState === null) {\n var current = finishedWork.alternate;\n\n if (current !== null) {\n var prevState = current.memoizedState;\n\n if (prevState !== null) {\n var suspenseInstance = prevState.dehydrated;\n\n if (suspenseInstance !== null) {\n try {\n commitHydratedSuspenseInstance(suspenseInstance);\n\n var hydrationCallbacks, onHydrated; if (enableSuspenseCallback) ;\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n }\n }\n }\n }\n}\n\nfunction getRetryCache(finishedWork) {\n // TODO: Unify the interface for the retry cache so we don't have to switch\n // on the tag like this.\n switch (finishedWork.tag) {\n case SuspenseComponent:\n case SuspenseListComponent:\n {\n var retryCache = finishedWork.stateNode;\n\n if (retryCache === null) {\n retryCache = finishedWork.stateNode = new PossiblyWeakSet();\n }\n\n return retryCache;\n }\n\n case OffscreenComponent:\n {\n var instance = finishedWork.stateNode;\n var _retryCache = instance._retryCache;\n\n if (_retryCache === null) {\n _retryCache = instance._retryCache = new PossiblyWeakSet();\n }\n\n return _retryCache;\n }\n\n default:\n {\n throw new Error(\"Unexpected Suspense handler tag (\" + finishedWork.tag + \"). This is a \" + 'bug in React.');\n }\n }\n}\n\nfunction detachOffscreenInstance(instance) {\n var fiber = instance._current;\n\n if (fiber === null) {\n throw new Error('Calling Offscreen.detach before instance handle has been set.');\n }\n\n if ((instance._pendingVisibility & OffscreenDetached) !== NoFlags$1) {\n // The instance is already detached, this is a noop.\n return;\n } // TODO: There is an opportunity to optimise this by not entering commit phase\n // and unmounting effects directly.\n\n\n var root = enqueueConcurrentRenderForLane(fiber, SyncLane);\n\n if (root !== null) {\n instance._pendingVisibility |= OffscreenDetached;\n scheduleUpdateOnFiber(root, fiber, SyncLane);\n }\n}\nfunction attachOffscreenInstance(instance) {\n var fiber = instance._current;\n\n if (fiber === null) {\n throw new Error('Calling Offscreen.detach before instance handle has been set.');\n }\n\n if ((instance._pendingVisibility & OffscreenDetached) === NoFlags$1) {\n // The instance is already attached, this is a noop.\n return;\n }\n\n var root = enqueueConcurrentRenderForLane(fiber, SyncLane);\n\n if (root !== null) {\n instance._pendingVisibility &= ~OffscreenDetached;\n scheduleUpdateOnFiber(root, fiber, SyncLane);\n }\n}\n\nfunction attachSuspenseRetryListeners(finishedWork, wakeables) {\n // If this boundary just timed out, then it will have a set of wakeables.\n // For each wakeable, attach a listener so that when it resolves, React\n // attempts to re-render the boundary in the primary (pre-timeout) state.\n var retryCache = getRetryCache(finishedWork);\n wakeables.forEach(function (wakeable) {\n // Memoize using the boundary fiber to prevent redundant listeners.\n var retry = resolveRetryWakeable.bind(null, finishedWork, wakeable);\n\n if (!retryCache.has(wakeable)) {\n retryCache.add(wakeable);\n\n {\n if (isDevToolsPresent) {\n if (inProgressLanes !== null && inProgressRoot !== null) {\n // If we have pending work still, associate the original updaters with it.\n restorePendingUpdaters(inProgressRoot, inProgressLanes);\n } else {\n throw Error('Expected finished root and lanes to be set. This is a bug in React.');\n }\n }\n }\n\n wakeable.then(retry, retry);\n }\n });\n} // This function detects when a Suspense boundary goes from visible to hidden.\nfunction commitMutationEffects(root, finishedWork, committedLanes) {\n inProgressLanes = committedLanes;\n inProgressRoot = root;\n setCurrentFiber(finishedWork);\n commitMutationEffectsOnFiber(finishedWork, root);\n setCurrentFiber(finishedWork);\n inProgressLanes = null;\n inProgressRoot = null;\n}\n\nfunction recursivelyTraverseMutationEffects(root, parentFiber, lanes) {\n // Deletions effects can be scheduled on any fiber type. They need to happen\n // before the children effects hae fired.\n var deletions = parentFiber.deletions;\n\n if (deletions !== null) {\n for (var i = 0; i < deletions.length; i++) {\n var childToDelete = deletions[i];\n\n try {\n commitDeletionEffects(root, parentFiber, childToDelete);\n } catch (error) {\n captureCommitPhaseError(childToDelete, parentFiber, error);\n }\n }\n }\n\n var prevDebugFiber = getCurrentFiber();\n\n if (parentFiber.subtreeFlags & MutationMask) {\n var child = parentFiber.child;\n\n while (child !== null) {\n setCurrentFiber(child);\n commitMutationEffectsOnFiber(child, root);\n child = child.sibling;\n }\n }\n\n setCurrentFiber(prevDebugFiber);\n}\n\nvar currentHoistableRoot = null;\n\nfunction commitMutationEffectsOnFiber(finishedWork, root, lanes) {\n var current = finishedWork.alternate;\n var flags = finishedWork.flags; // The effect flag should be checked *after* we refine the type of fiber,\n // because the fiber tag is more specific. An exception is any flag related\n // to reconciliation, because those can be set on all fiber types.\n\n switch (finishedWork.tag) {\n case FunctionComponent:\n case ForwardRef:\n case MemoComponent:\n case SimpleMemoComponent:\n {\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n\n if (flags & Update) {\n try {\n commitHookEffectListUnmount(Insertion | HasEffect, finishedWork, finishedWork.return);\n commitHookEffectListMount(Insertion | HasEffect, finishedWork);\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n } // Layout effects are destroyed during the mutation phase so that all\n // destroy functions for all fibers are called before any create functions.\n // This prevents sibling component effects from interfering with each other,\n // e.g. a destroy function in one component should never override a ref set\n // by a create function in another component during the same commit.\n\n\n if (shouldProfile(finishedWork)) {\n try {\n startLayoutEffectTimer();\n commitHookEffectListUnmount(Layout | HasEffect, finishedWork, finishedWork.return);\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n\n recordLayoutEffectDuration(finishedWork);\n } else {\n try {\n commitHookEffectListUnmount(Layout | HasEffect, finishedWork, finishedWork.return);\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n }\n }\n\n return;\n }\n\n case ClassComponent:\n {\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n\n if (flags & Ref) {\n if (current !== null) {\n safelyDetachRef(current, current.return);\n }\n }\n\n if (flags & Callback && offscreenSubtreeIsHidden) {\n var updateQueue = finishedWork.updateQueue;\n\n if (updateQueue !== null) {\n deferHiddenCallbacks(updateQueue);\n }\n }\n\n return;\n }\n\n case HostHoistable:\n {\n {\n // We cast because we always set the root at the React root and so it cannot be\n // null while we are processing mutation effects\n var hoistableRoot = currentHoistableRoot;\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n\n if (flags & Ref) {\n if (current !== null) {\n safelyDetachRef(current, current.return);\n }\n }\n\n if (flags & Update) {\n var currentResource = current !== null ? current.memoizedState : null;\n var newResource = finishedWork.memoizedState;\n\n if (current === null) {\n // We are mounting a new HostHoistable Fiber. We fork the mount\n // behavior based on whether this instance is a Hoistable Instance\n // or a Hoistable Resource\n if (newResource === null) {\n if (finishedWork.stateNode === null) {\n finishedWork.stateNode = hydrateHoistable(hoistableRoot, finishedWork.type, finishedWork.memoizedProps, finishedWork);\n } else {\n mountHoistable(hoistableRoot, finishedWork.type, finishedWork.stateNode);\n }\n } else {\n finishedWork.stateNode = acquireResource(hoistableRoot, newResource, finishedWork.memoizedProps);\n }\n } else if (currentResource !== newResource) {\n // We are moving to or from Hoistable Resource, or between different Hoistable Resources\n if (currentResource === null) {\n if (current.stateNode !== null) {\n unmountHoistable(current.stateNode);\n }\n } else {\n releaseResource(currentResource);\n }\n\n if (newResource === null) {\n mountHoistable(hoistableRoot, finishedWork.type, finishedWork.stateNode);\n } else {\n acquireResource(hoistableRoot, newResource, finishedWork.memoizedProps);\n }\n } else if (newResource === null && finishedWork.stateNode !== null) {\n // We may have an update on a Hoistable element\n var updatePayload = finishedWork.updateQueue;\n finishedWork.updateQueue = null;\n\n try {\n commitUpdate(finishedWork.stateNode, updatePayload, finishedWork.type, current.memoizedProps, finishedWork.memoizedProps, finishedWork);\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n }\n }\n\n return;\n } // Fall through\n\n }\n\n case HostSingleton:\n {\n {\n if (flags & Update) {\n var previousWork = finishedWork.alternate;\n\n if (previousWork === null) {\n var singleton = finishedWork.stateNode;\n var props = finishedWork.memoizedProps; // This was a new mount, we need to clear and set initial properties\n\n clearSingleton(singleton);\n acquireSingletonInstance(finishedWork.type, props, singleton, finishedWork);\n }\n }\n } // Fall through\n\n }\n\n case HostComponent:\n {\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n\n if (flags & Ref) {\n if (current !== null) {\n safelyDetachRef(current, current.return);\n }\n }\n\n {\n // TODO: ContentReset gets cleared by the children during the commit\n // phase. This is a refactor hazard because it means we must read\n // flags the flags after `commitReconciliationEffects` has already run;\n // the order matters. We should refactor so that ContentReset does not\n // rely on mutating the flag during commit. Like by setting a flag\n // during the render phase instead.\n if (finishedWork.flags & ContentReset) {\n var instance = finishedWork.stateNode;\n\n try {\n resetTextContent(instance);\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n }\n\n if (flags & Update) {\n var _instance2 = finishedWork.stateNode;\n\n if (_instance2 != null) {\n // Commit the work prepared earlier.\n var newProps = finishedWork.memoizedProps; // For hydration we reuse the update path but we treat the oldProps\n // as the newProps. The updatePayload will contain the real change in\n // this case.\n\n var oldProps = current !== null ? current.memoizedProps : newProps;\n var type = finishedWork.type; // TODO: Type the updateQueue to be specific to host components.\n\n var _updatePayload = finishedWork.updateQueue;\n finishedWork.updateQueue = null;\n\n try {\n commitUpdate(_instance2, _updatePayload, type, oldProps, newProps, finishedWork);\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n }\n }\n }\n\n return;\n }\n\n case HostText:\n {\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n\n if (flags & Update) {\n {\n if (finishedWork.stateNode === null) {\n throw new Error('This should have a text node initialized. This error is likely ' + 'caused by a bug in React. Please file an issue.');\n }\n\n var textInstance = finishedWork.stateNode;\n var newText = finishedWork.memoizedProps; // For hydration we reuse the update path but we treat the oldProps\n // as the newProps. The updatePayload will contain the real change in\n // this case.\n\n var oldText = current !== null ? current.memoizedProps : newText;\n\n try {\n commitTextUpdate(textInstance, oldText, newText);\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n }\n }\n\n return;\n }\n\n case HostRoot:\n {\n {\n prepareToCommitHoistables();\n var previousHoistableRoot = currentHoistableRoot;\n currentHoistableRoot = getHoistableRoot(root.containerInfo);\n recursivelyTraverseMutationEffects(root, finishedWork);\n currentHoistableRoot = previousHoistableRoot;\n commitReconciliationEffects(finishedWork);\n }\n\n if (flags & Update) {\n {\n if (current !== null) {\n var prevRootState = current.memoizedState;\n\n if (prevRootState.isDehydrated) {\n try {\n commitHydratedContainer(root.containerInfo);\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n }\n }\n }\n }\n\n return;\n }\n\n case HostPortal:\n {\n {\n var _previousHoistableRoot = currentHoistableRoot;\n currentHoistableRoot = getHoistableRoot(finishedWork.stateNode.containerInfo);\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n currentHoistableRoot = _previousHoistableRoot;\n }\n\n return;\n }\n\n case SuspenseComponent:\n {\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork); // TODO: We should mark a flag on the Suspense fiber itself, rather than\n // relying on the Offscreen fiber having a flag also being marked. The\n // reason is that this offscreen fiber might not be part of the work-in-\n // progress tree! It could have been reused from a previous render. This\n // doesn't lead to incorrect behavior because we don't rely on the flag\n // check alone; we also compare the states explicitly below. But for\n // modeling purposes, we _should_ be able to rely on the flag check alone.\n // So this is a bit fragile.\n //\n // Also, all this logic could/should move to the passive phase so it\n // doesn't block paint.\n\n var offscreenFiber = finishedWork.child;\n\n if (offscreenFiber.flags & Visibility) {\n // Throttle the appearance and disappearance of Suspense fallbacks.\n var isShowingFallback = finishedWork.memoizedState !== null;\n var wasShowingFallback = current !== null && current.memoizedState !== null;\n\n {\n if (isShowingFallback !== wasShowingFallback) {\n // A fallback is either appearing or disappearing.\n markCommitTimeOfFallback();\n }\n }\n }\n\n if (flags & Update) {\n try {\n commitSuspenseCallback(finishedWork);\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n\n var retryQueue = finishedWork.updateQueue;\n\n if (retryQueue !== null) {\n finishedWork.updateQueue = null;\n attachSuspenseRetryListeners(finishedWork, retryQueue);\n }\n }\n\n return;\n }\n\n case OffscreenComponent:\n {\n if (flags & Ref) {\n if (current !== null) {\n safelyDetachRef(current, current.return);\n }\n }\n\n var newState = finishedWork.memoizedState;\n var isHidden = newState !== null;\n var wasHidden = current !== null && current.memoizedState !== null;\n\n if (finishedWork.mode & ConcurrentMode) {\n // Before committing the children, track on the stack whether this\n // offscreen subtree was already hidden, so that we don't unmount the\n // effects again.\n var prevOffscreenSubtreeIsHidden = offscreenSubtreeIsHidden;\n var prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden;\n offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden || isHidden;\n offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden || wasHidden;\n recursivelyTraverseMutationEffects(root, finishedWork);\n offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden;\n offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden;\n } else {\n recursivelyTraverseMutationEffects(root, finishedWork);\n }\n\n commitReconciliationEffects(finishedWork);\n var offscreenInstance = finishedWork.stateNode; // TODO: Add explicit effect flag to set _current.\n\n offscreenInstance._current = finishedWork; // Offscreen stores pending changes to visibility in `_pendingVisibility`. This is\n // to support batching of `attach` and `detach` calls.\n\n offscreenInstance._visibility &= ~OffscreenDetached;\n offscreenInstance._visibility |= offscreenInstance._pendingVisibility & OffscreenDetached;\n\n if (flags & Visibility) {\n // Track the current state on the Offscreen instance so we can\n // read it during an event\n if (isHidden) {\n offscreenInstance._visibility &= ~OffscreenVisible;\n } else {\n offscreenInstance._visibility |= OffscreenVisible;\n }\n\n if (isHidden) {\n var isUpdate = current !== null;\n var wasHiddenByAncestorOffscreen = offscreenSubtreeIsHidden || offscreenSubtreeWasHidden; // Only trigger disapper layout effects if:\n // - This is an update, not first mount.\n // - This Offscreen was not hidden before.\n // - Ancestor Offscreen was not hidden in previous commit.\n\n if (isUpdate && !wasHidden && !wasHiddenByAncestorOffscreen) {\n if ((finishedWork.mode & ConcurrentMode) !== NoMode) {\n // Disappear the layout effects of all the children\n recursivelyTraverseDisappearLayoutEffects(finishedWork);\n }\n }\n } // Offscreen with manual mode manages visibility manually.\n\n\n if (!isOffscreenManual(finishedWork)) {\n // TODO: This needs to run whenever there's an insertion or update\n // inside a hidden Offscreen tree.\n hideOrUnhideAllChildren(finishedWork, isHidden);\n }\n } // TODO: Move to passive phase\n\n\n if (flags & Update) {\n var offscreenQueue = finishedWork.updateQueue;\n\n if (offscreenQueue !== null) {\n var _retryQueue = offscreenQueue.retryQueue;\n\n if (_retryQueue !== null) {\n offscreenQueue.retryQueue = null;\n attachSuspenseRetryListeners(finishedWork, _retryQueue);\n }\n }\n }\n\n return;\n }\n\n case SuspenseListComponent:\n {\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n\n if (flags & Update) {\n var _retryQueue2 = finishedWork.updateQueue;\n\n if (_retryQueue2 !== null) {\n finishedWork.updateQueue = null;\n attachSuspenseRetryListeners(finishedWork, _retryQueue2);\n }\n }\n\n return;\n }\n\n case ScopeComponent:\n {\n\n return;\n }\n\n default:\n {\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n return;\n }\n }\n}\n\nfunction commitReconciliationEffects(finishedWork) {\n // Placement effects (insertions, reorders) can be scheduled on any fiber\n // type. They needs to happen after the children effects have fired, but\n // before the effects on this fiber have fired.\n var flags = finishedWork.flags;\n\n if (flags & Placement) {\n try {\n commitPlacement(finishedWork);\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n } // Clear the \"placement\" from effect tag so that we know that this is\n // inserted, before any life-cycles like componentDidMount gets called.\n // TODO: findDOMNode doesn't rely on this any more but isMounted does\n // and isMounted is deprecated anyway so we should be able to kill this.\n\n\n finishedWork.flags &= ~Placement;\n }\n\n if (flags & Hydrating) {\n finishedWork.flags &= ~Hydrating;\n }\n}\n\nfunction commitLayoutEffects(finishedWork, root, committedLanes) {\n inProgressLanes = committedLanes;\n inProgressRoot = root;\n var current = finishedWork.alternate;\n commitLayoutEffectOnFiber(root, current, finishedWork);\n inProgressLanes = null;\n inProgressRoot = null;\n}\n\nfunction recursivelyTraverseLayoutEffects(root, parentFiber, lanes) {\n var prevDebugFiber = getCurrentFiber();\n\n if (parentFiber.subtreeFlags & LayoutMask) {\n var child = parentFiber.child;\n\n while (child !== null) {\n setCurrentFiber(child);\n var current = child.alternate;\n commitLayoutEffectOnFiber(root, current, child);\n child = child.sibling;\n }\n }\n\n setCurrentFiber(prevDebugFiber);\n}\n\nfunction disappearLayoutEffects(finishedWork) {\n switch (finishedWork.tag) {\n case FunctionComponent:\n case ForwardRef:\n case MemoComponent:\n case SimpleMemoComponent:\n {\n // TODO (Offscreen) Check: flags & LayoutStatic\n if (shouldProfile(finishedWork)) {\n try {\n startLayoutEffectTimer();\n commitHookEffectListUnmount(Layout, finishedWork, finishedWork.return);\n } finally {\n recordLayoutEffectDuration(finishedWork);\n }\n } else {\n commitHookEffectListUnmount(Layout, finishedWork, finishedWork.return);\n }\n\n recursivelyTraverseDisappearLayoutEffects(finishedWork);\n break;\n }\n\n case ClassComponent:\n {\n // TODO (Offscreen) Check: flags & RefStatic\n safelyDetachRef(finishedWork, finishedWork.return);\n var instance = finishedWork.stateNode;\n\n if (typeof instance.componentWillUnmount === 'function') {\n safelyCallComponentWillUnmount(finishedWork, finishedWork.return, instance);\n }\n\n recursivelyTraverseDisappearLayoutEffects(finishedWork);\n break;\n }\n\n case HostHoistable:\n case HostSingleton:\n case HostComponent:\n {\n // TODO (Offscreen) Check: flags & RefStatic\n safelyDetachRef(finishedWork, finishedWork.return);\n recursivelyTraverseDisappearLayoutEffects(finishedWork);\n break;\n }\n\n case OffscreenComponent:\n {\n // TODO (Offscreen) Check: flags & RefStatic\n safelyDetachRef(finishedWork, finishedWork.return);\n var isHidden = finishedWork.memoizedState !== null;\n\n if (isHidden) ; else {\n recursivelyTraverseDisappearLayoutEffects(finishedWork);\n }\n\n break;\n }\n\n default:\n {\n recursivelyTraverseDisappearLayoutEffects(finishedWork);\n break;\n }\n }\n}\n\nfunction recursivelyTraverseDisappearLayoutEffects(parentFiber) {\n // TODO (Offscreen) Check: flags & (RefStatic | LayoutStatic)\n var child = parentFiber.child;\n\n while (child !== null) {\n disappearLayoutEffects(child);\n child = child.sibling;\n }\n}\n\nfunction reappearLayoutEffects(finishedRoot, current, finishedWork, // This function visits both newly finished work and nodes that were re-used\n// from a previously committed tree. We cannot check non-static flags if the\n// node was reused.\nincludeWorkInProgressEffects) {\n // Turn on layout effects in a tree that previously disappeared.\n var flags = finishedWork.flags;\n\n switch (finishedWork.tag) {\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n recursivelyTraverseReappearLayoutEffects(finishedRoot, finishedWork, includeWorkInProgressEffects); // TODO: Check flags & LayoutStatic\n\n commitHookLayoutEffects(finishedWork, Layout);\n break;\n }\n\n case ClassComponent:\n {\n recursivelyTraverseReappearLayoutEffects(finishedRoot, finishedWork, includeWorkInProgressEffects); // TODO: Check for LayoutStatic flag\n\n var instance = finishedWork.stateNode;\n\n if (typeof instance.componentDidMount === 'function') {\n try {\n instance.componentDidMount();\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n } // Commit any callbacks that would have fired while the component\n // was hidden.\n\n\n var updateQueue = finishedWork.updateQueue;\n\n if (updateQueue !== null) {\n commitHiddenCallbacks(updateQueue, instance);\n } // If this is newly finished work, check for setState callbacks\n\n\n if (includeWorkInProgressEffects && flags & Callback) {\n commitClassCallbacks(finishedWork);\n } // TODO: Check flags & RefStatic\n\n\n safelyAttachRef(finishedWork, finishedWork.return);\n break;\n }\n // Unlike commitLayoutEffectsOnFiber, we don't need to handle HostRoot\n // because this function only visits nodes that are inside an\n // Offscreen fiber.\n // case HostRoot: {\n // ...\n // }\n\n case HostHoistable:\n case HostSingleton:\n case HostComponent:\n {\n recursivelyTraverseReappearLayoutEffects(finishedRoot, finishedWork, includeWorkInProgressEffects); // Renderers may schedule work to be done after host components are mounted\n // (eg DOM renderer may schedule auto-focus for inputs and form controls).\n // These effects should only be committed when components are first mounted,\n // aka when there is no current/alternate.\n\n if (includeWorkInProgressEffects && current === null && flags & Update) {\n commitHostComponentMount(finishedWork);\n } // TODO: Check flags & Ref\n\n\n safelyAttachRef(finishedWork, finishedWork.return);\n break;\n }\n\n case Profiler:\n {\n recursivelyTraverseReappearLayoutEffects(finishedRoot, finishedWork, includeWorkInProgressEffects); // TODO: Figure out how Profiler updates should work with Offscreen\n\n if (includeWorkInProgressEffects && flags & Update) {\n commitProfilerUpdate(finishedWork, current);\n }\n\n break;\n }\n\n case SuspenseComponent:\n {\n recursivelyTraverseReappearLayoutEffects(finishedRoot, finishedWork, includeWorkInProgressEffects); // TODO: Figure out how Suspense hydration callbacks should work\n // with Offscreen.\n\n if (includeWorkInProgressEffects && flags & Update) {\n commitSuspenseHydrationCallbacks(finishedRoot, finishedWork);\n }\n\n break;\n }\n\n case OffscreenComponent:\n {\n var offscreenState = finishedWork.memoizedState;\n var isHidden = offscreenState !== null;\n\n if (isHidden) ; else {\n recursivelyTraverseReappearLayoutEffects(finishedRoot, finishedWork, includeWorkInProgressEffects);\n } // TODO: Check flags & Ref\n\n\n safelyAttachRef(finishedWork, finishedWork.return);\n break;\n }\n\n default:\n {\n recursivelyTraverseReappearLayoutEffects(finishedRoot, finishedWork, includeWorkInProgressEffects);\n break;\n }\n }\n}\n\nfunction recursivelyTraverseReappearLayoutEffects(finishedRoot, parentFiber, includeWorkInProgressEffects) {\n // This function visits both newly finished work and nodes that were re-used\n // from a previously committed tree. We cannot check non-static flags if the\n // node was reused.\n var childShouldIncludeWorkInProgressEffects = includeWorkInProgressEffects && (parentFiber.subtreeFlags & LayoutMask) !== NoFlags$1; // TODO (Offscreen) Check: flags & (RefStatic | LayoutStatic)\n\n var prevDebugFiber = getCurrentFiber();\n var child = parentFiber.child;\n\n while (child !== null) {\n var current = child.alternate;\n reappearLayoutEffects(finishedRoot, current, child, childShouldIncludeWorkInProgressEffects);\n child = child.sibling;\n }\n\n setCurrentFiber(prevDebugFiber);\n}\n\nfunction commitHookPassiveMountEffects(finishedWork, hookFlags) {\n if (shouldProfile(finishedWork)) {\n startPassiveEffectTimer();\n\n try {\n commitHookEffectListMount(hookFlags, finishedWork);\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n\n recordPassiveEffectDuration(finishedWork);\n } else {\n try {\n commitHookEffectListMount(hookFlags, finishedWork);\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n }\n}\n\nfunction commitOffscreenPassiveMountEffects(current, finishedWork, instance) {\n {\n var previousCache = null;\n\n if (current !== null && current.memoizedState !== null && current.memoizedState.cachePool !== null) {\n previousCache = current.memoizedState.cachePool.pool;\n }\n\n var nextCache = null;\n\n if (finishedWork.memoizedState !== null && finishedWork.memoizedState.cachePool !== null) {\n nextCache = finishedWork.memoizedState.cachePool.pool;\n } // Retain/release the cache used for pending (suspended) nodes.\n // Note that this is only reached in the non-suspended/visible case:\n // when the content is suspended/hidden, the retain/release occurs\n // via the parent Suspense component (see case above).\n\n\n if (nextCache !== previousCache) {\n if (nextCache != null) {\n retainCache(nextCache);\n }\n\n if (previousCache != null) {\n releaseCache(previousCache);\n }\n }\n }\n}\n\nfunction commitCachePassiveMountEffect(current, finishedWork) {\n {\n var previousCache = null;\n\n if (finishedWork.alternate !== null) {\n previousCache = finishedWork.alternate.memoizedState.cache;\n }\n\n var nextCache = finishedWork.memoizedState.cache; // Retain/release the cache. In theory the cache component\n // could be \"borrowing\" a cache instance owned by some parent,\n // in which case we could avoid retaining/releasing. But it\n // is non-trivial to determine when that is the case, so we\n // always retain/release.\n\n if (nextCache !== previousCache) {\n retainCache(nextCache);\n\n if (previousCache != null) {\n releaseCache(previousCache);\n }\n }\n }\n}\n\nfunction commitPassiveMountEffects(root, finishedWork, committedLanes, committedTransitions) {\n setCurrentFiber(finishedWork);\n commitPassiveMountOnFiber(root, finishedWork, committedLanes, committedTransitions);\n resetCurrentFiber();\n}\n\nfunction recursivelyTraversePassiveMountEffects(root, parentFiber, committedLanes, committedTransitions) {\n var prevDebugFiber = getCurrentFiber();\n\n if (parentFiber.subtreeFlags & PassiveMask) {\n var child = parentFiber.child;\n\n while (child !== null) {\n setCurrentFiber(child);\n commitPassiveMountOnFiber(root, child, committedLanes, committedTransitions);\n child = child.sibling;\n }\n }\n\n setCurrentFiber(prevDebugFiber);\n}\n\nfunction commitPassiveMountOnFiber(finishedRoot, finishedWork, committedLanes, committedTransitions) {\n // When updating this function, also update reconnectPassiveEffects, which does\n // most of the same things when an offscreen tree goes from hidden -> visible,\n // or when toggling effects inside a hidden tree.\n var flags = finishedWork.flags;\n\n switch (finishedWork.tag) {\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n recursivelyTraversePassiveMountEffects(finishedRoot, finishedWork, committedLanes, committedTransitions);\n\n if (flags & Passive$1) {\n commitHookPassiveMountEffects(finishedWork, Passive | HasEffect);\n }\n\n break;\n }\n\n case HostRoot:\n {\n recursivelyTraversePassiveMountEffects(finishedRoot, finishedWork, committedLanes, committedTransitions);\n\n if (flags & Passive$1) {\n {\n var previousCache = null;\n\n if (finishedWork.alternate !== null) {\n previousCache = finishedWork.alternate.memoizedState.cache;\n }\n\n var nextCache = finishedWork.memoizedState.cache; // Retain/release the root cache.\n // Note that on initial mount, previousCache and nextCache will be the same\n // and this retain won't occur. To counter this, we instead retain the HostRoot's\n // initial cache when creating the root itself (see createFiberRoot() in\n // ReactFiberRoot.js). Subsequent updates that change the cache are reflected\n // here, such that previous/next caches are retained correctly.\n\n if (nextCache !== previousCache) {\n retainCache(nextCache);\n\n if (previousCache != null) {\n releaseCache(previousCache);\n }\n }\n }\n }\n\n break;\n }\n\n case LegacyHiddenComponent:\n {\n\n break;\n }\n\n case OffscreenComponent:\n {\n // TODO: Pass `current` as argument to this function\n var _instance3 = finishedWork.stateNode;\n var nextState = finishedWork.memoizedState;\n var isHidden = nextState !== null;\n\n if (isHidden) {\n if (_instance3._visibility & OffscreenPassiveEffectsConnected) {\n // The effects are currently connected. Update them.\n recursivelyTraversePassiveMountEffects(finishedRoot, finishedWork, committedLanes, committedTransitions);\n } else {\n if (finishedWork.mode & ConcurrentMode) {\n // The effects are currently disconnected. Since the tree is hidden,\n // don't connect them. This also applies to the initial render.\n {\n // \"Atomic\" effects are ones that need to fire on every commit,\n // even during pre-rendering. An example is updating the reference\n // count on cache instances.\n recursivelyTraverseAtomicPassiveEffects(finishedRoot, finishedWork);\n }\n } else {\n // Legacy Mode: Fire the effects even if the tree is hidden.\n _instance3._visibility |= OffscreenPassiveEffectsConnected;\n recursivelyTraversePassiveMountEffects(finishedRoot, finishedWork, committedLanes, committedTransitions);\n }\n }\n } else {\n // Tree is visible\n if (_instance3._visibility & OffscreenPassiveEffectsConnected) {\n // The effects are currently connected. Update them.\n recursivelyTraversePassiveMountEffects(finishedRoot, finishedWork, committedLanes, committedTransitions);\n } else {\n // The effects are currently disconnected. Reconnect them, while also\n // firing effects inside newly mounted trees. This also applies to\n // the initial render.\n _instance3._visibility |= OffscreenPassiveEffectsConnected;\n var includeWorkInProgressEffects = (finishedWork.subtreeFlags & PassiveMask) !== NoFlags$1;\n recursivelyTraverseReconnectPassiveEffects(finishedRoot, finishedWork, committedLanes, committedTransitions, includeWorkInProgressEffects);\n }\n }\n\n if (flags & Passive$1) {\n var _current = finishedWork.alternate;\n commitOffscreenPassiveMountEffects(_current, finishedWork);\n }\n\n break;\n }\n\n case CacheComponent:\n {\n recursivelyTraversePassiveMountEffects(finishedRoot, finishedWork, committedLanes, committedTransitions);\n\n if (flags & Passive$1) {\n // TODO: Pass `current` as argument to this function\n var _current2 = finishedWork.alternate;\n commitCachePassiveMountEffect(_current2, finishedWork);\n }\n\n break;\n }\n\n case TracingMarkerComponent:\n\n default:\n {\n recursivelyTraversePassiveMountEffects(finishedRoot, finishedWork, committedLanes, committedTransitions);\n break;\n }\n }\n}\n\nfunction recursivelyTraverseReconnectPassiveEffects(finishedRoot, parentFiber, committedLanes, committedTransitions, includeWorkInProgressEffects) {\n // This function visits both newly finished work and nodes that were re-used\n // from a previously committed tree. We cannot check non-static flags if the\n // node was reused.\n var childShouldIncludeWorkInProgressEffects = includeWorkInProgressEffects && (parentFiber.subtreeFlags & PassiveMask) !== NoFlags$1; // TODO (Offscreen) Check: flags & (RefStatic | LayoutStatic)\n\n var prevDebugFiber = getCurrentFiber();\n var child = parentFiber.child;\n\n while (child !== null) {\n reconnectPassiveEffects(finishedRoot, child, committedLanes, committedTransitions, childShouldIncludeWorkInProgressEffects);\n child = child.sibling;\n }\n\n setCurrentFiber(prevDebugFiber);\n}\n\nfunction reconnectPassiveEffects(finishedRoot, finishedWork, committedLanes, committedTransitions, // This function visits both newly finished work and nodes that were re-used\n// from a previously committed tree. We cannot check non-static flags if the\n// node was reused.\nincludeWorkInProgressEffects) {\n var flags = finishedWork.flags;\n\n switch (finishedWork.tag) {\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n recursivelyTraverseReconnectPassiveEffects(finishedRoot, finishedWork, committedLanes, committedTransitions, includeWorkInProgressEffects); // TODO: Check for PassiveStatic flag\n\n commitHookPassiveMountEffects(finishedWork, Passive);\n break;\n }\n // Unlike commitPassiveMountOnFiber, we don't need to handle HostRoot\n // because this function only visits nodes that are inside an\n // Offscreen fiber.\n // case HostRoot: {\n // ...\n // }\n\n case LegacyHiddenComponent:\n {\n\n break;\n }\n\n case OffscreenComponent:\n {\n var _instance4 = finishedWork.stateNode;\n var nextState = finishedWork.memoizedState;\n var isHidden = nextState !== null;\n\n if (isHidden) {\n if (_instance4._visibility & OffscreenPassiveEffectsConnected) {\n // The effects are currently connected. Update them.\n recursivelyTraverseReconnectPassiveEffects(finishedRoot, finishedWork, committedLanes, committedTransitions, includeWorkInProgressEffects);\n } else {\n if (finishedWork.mode & ConcurrentMode) {\n // The effects are currently disconnected. Since the tree is hidden,\n // don't connect them. This also applies to the initial render.\n {\n // \"Atomic\" effects are ones that need to fire on every commit,\n // even during pre-rendering. An example is updating the reference\n // count on cache instances.\n recursivelyTraverseAtomicPassiveEffects(finishedRoot, finishedWork);\n }\n } else {\n // Legacy Mode: Fire the effects even if the tree is hidden.\n _instance4._visibility |= OffscreenPassiveEffectsConnected;\n recursivelyTraverseReconnectPassiveEffects(finishedRoot, finishedWork, committedLanes, committedTransitions, includeWorkInProgressEffects);\n }\n }\n } else {\n // Tree is visible\n // Since we're already inside a reconnecting tree, it doesn't matter\n // whether the effects are currently connected. In either case, we'll\n // continue traversing the tree and firing all the effects.\n //\n // We do need to set the \"connected\" flag on the instance, though.\n _instance4._visibility |= OffscreenPassiveEffectsConnected;\n recursivelyTraverseReconnectPassiveEffects(finishedRoot, finishedWork, committedLanes, committedTransitions, includeWorkInProgressEffects);\n }\n\n if (includeWorkInProgressEffects && flags & Passive$1) {\n // TODO: Pass `current` as argument to this function\n var _current3 = finishedWork.alternate;\n commitOffscreenPassiveMountEffects(_current3, finishedWork);\n }\n\n break;\n }\n\n case CacheComponent:\n {\n recursivelyTraverseReconnectPassiveEffects(finishedRoot, finishedWork, committedLanes, committedTransitions, includeWorkInProgressEffects);\n\n if (includeWorkInProgressEffects && flags & Passive$1) {\n // TODO: Pass `current` as argument to this function\n var _current4 = finishedWork.alternate;\n commitCachePassiveMountEffect(_current4, finishedWork);\n }\n\n break;\n }\n\n case TracingMarkerComponent:\n\n default:\n {\n recursivelyTraverseReconnectPassiveEffects(finishedRoot, finishedWork, committedLanes, committedTransitions, includeWorkInProgressEffects);\n break;\n }\n }\n}\n\nfunction recursivelyTraverseAtomicPassiveEffects(finishedRoot, parentFiber, committedLanes, committedTransitions) {\n // \"Atomic\" effects are ones that need to fire on every commit, even during\n // pre-rendering. We call this function when traversing a hidden tree whose\n // regular effects are currently disconnected.\n var prevDebugFiber = getCurrentFiber(); // TODO: Add special flag for atomic effects\n\n if (parentFiber.subtreeFlags & PassiveMask) {\n var child = parentFiber.child;\n\n while (child !== null) {\n setCurrentFiber(child);\n commitAtomicPassiveEffects(finishedRoot, child);\n child = child.sibling;\n }\n }\n\n setCurrentFiber(prevDebugFiber);\n}\n\nfunction commitAtomicPassiveEffects(finishedRoot, finishedWork, committedLanes, committedTransitions) {\n // \"Atomic\" effects are ones that need to fire on every commit, even during\n // pre-rendering. We call this function when traversing a hidden tree whose\n // regular effects are currently disconnected.\n var flags = finishedWork.flags;\n\n switch (finishedWork.tag) {\n case OffscreenComponent:\n {\n recursivelyTraverseAtomicPassiveEffects(finishedRoot, finishedWork);\n\n if (flags & Passive$1) {\n // TODO: Pass `current` as argument to this function\n var current = finishedWork.alternate;\n commitOffscreenPassiveMountEffects(current, finishedWork);\n }\n\n break;\n }\n\n case CacheComponent:\n {\n recursivelyTraverseAtomicPassiveEffects(finishedRoot, finishedWork);\n\n if (flags & Passive$1) {\n // TODO: Pass `current` as argument to this function\n var _current5 = finishedWork.alternate;\n commitCachePassiveMountEffect(_current5, finishedWork);\n }\n\n break;\n }\n\n default:\n {\n recursivelyTraverseAtomicPassiveEffects(finishedRoot, finishedWork);\n break;\n }\n }\n}\n\nfunction commitPassiveUnmountEffects(finishedWork) {\n setCurrentFiber(finishedWork);\n commitPassiveUnmountOnFiber(finishedWork);\n resetCurrentFiber();\n} // If we're inside a brand new tree, or a tree that was already visible, then we\n// should only suspend host components that have a ShouldSuspendCommit flag.\n// Components without it haven't changed since the last commit, so we can skip\n// over those.\n//\n// When we enter a tree that is being revealed (going from hidden -> visible),\n// we need to suspend _any_ component that _may_ suspend. Even if they're\n// already in the \"current\" tree. Because their visibility has changed, the\n// browser may not have prerendered them yet. So we check the MaySuspendCommit\n// flag instead.\n\nvar suspenseyCommitFlag = ShouldSuspendCommit;\nfunction accumulateSuspenseyCommit(finishedWork) {\n accumulateSuspenseyCommitOnFiber(finishedWork);\n}\n\nfunction recursivelyAccumulateSuspenseyCommit(parentFiber) {\n if (parentFiber.subtreeFlags & suspenseyCommitFlag) {\n var child = parentFiber.child;\n\n while (child !== null) {\n accumulateSuspenseyCommitOnFiber(child);\n child = child.sibling;\n }\n }\n}\n\nfunction accumulateSuspenseyCommitOnFiber(fiber) {\n switch (fiber.tag) {\n case HostHoistable:\n {\n recursivelyAccumulateSuspenseyCommit(fiber);\n\n if (fiber.flags & suspenseyCommitFlag) {\n if (fiber.memoizedState !== null) {\n suspendResource( // This should always be set by visiting HostRoot first\n currentHoistableRoot, fiber.memoizedState, fiber.memoizedProps);\n }\n }\n\n break;\n }\n\n case HostComponent:\n {\n recursivelyAccumulateSuspenseyCommit(fiber);\n\n break;\n }\n\n case HostRoot:\n case HostPortal:\n {\n {\n var previousHoistableRoot = currentHoistableRoot;\n var container = fiber.stateNode.containerInfo;\n currentHoistableRoot = getHoistableRoot(container);\n recursivelyAccumulateSuspenseyCommit(fiber);\n currentHoistableRoot = previousHoistableRoot;\n }\n\n break;\n }\n\n case OffscreenComponent:\n {\n var isHidden = fiber.memoizedState !== null;\n\n if (isHidden) ; else {\n var current = fiber.alternate;\n var wasHidden = current !== null && current.memoizedState !== null;\n\n if (wasHidden) {\n // This tree is being revealed. Visit all newly visible suspensey\n // instances, even if they're in the current tree.\n var prevFlags = suspenseyCommitFlag;\n suspenseyCommitFlag = MaySuspendCommit;\n recursivelyAccumulateSuspenseyCommit(fiber);\n suspenseyCommitFlag = prevFlags;\n } else {\n recursivelyAccumulateSuspenseyCommit(fiber);\n }\n }\n\n break;\n }\n\n default:\n {\n recursivelyAccumulateSuspenseyCommit(fiber);\n }\n }\n}\n\nfunction detachAlternateSiblings(parentFiber) {\n // A fiber was deleted from this parent fiber, but it's still part of the\n // previous (alternate) parent fiber's list of children. Because children\n // are a linked list, an earlier sibling that's still alive will be\n // connected to the deleted fiber via its `alternate`:\n //\n // live fiber --alternate--> previous live fiber --sibling--> deleted\n // fiber\n //\n // We can't disconnect `alternate` on nodes that haven't been deleted yet,\n // but we can disconnect the `sibling` and `child` pointers.\n var previousFiber = parentFiber.alternate;\n\n if (previousFiber !== null) {\n var detachedChild = previousFiber.child;\n\n if (detachedChild !== null) {\n previousFiber.child = null;\n\n do {\n // $FlowFixMe[incompatible-use] found when upgrading Flow\n var detachedSibling = detachedChild.sibling; // $FlowFixMe[incompatible-use] found when upgrading Flow\n\n detachedChild.sibling = null;\n detachedChild = detachedSibling;\n } while (detachedChild !== null);\n }\n }\n}\n\nfunction commitHookPassiveUnmountEffects(finishedWork, nearestMountedAncestor, hookFlags) {\n if (shouldProfile(finishedWork)) {\n startPassiveEffectTimer();\n commitHookEffectListUnmount(hookFlags, finishedWork, nearestMountedAncestor);\n recordPassiveEffectDuration(finishedWork);\n } else {\n commitHookEffectListUnmount(hookFlags, finishedWork, nearestMountedAncestor);\n }\n}\n\nfunction recursivelyTraversePassiveUnmountEffects(parentFiber) {\n // Deletions effects can be scheduled on any fiber type. They need to happen\n // before the children effects have fired.\n var deletions = parentFiber.deletions;\n\n if ((parentFiber.flags & ChildDeletion) !== NoFlags$1) {\n if (deletions !== null) {\n for (var i = 0; i < deletions.length; i++) {\n var childToDelete = deletions[i]; // TODO: Convert this to use recursion\n\n nextEffect = childToDelete;\n commitPassiveUnmountEffectsInsideOfDeletedTree_begin(childToDelete, parentFiber);\n }\n }\n\n detachAlternateSiblings(parentFiber);\n }\n\n var prevDebugFiber = getCurrentFiber(); // TODO: Split PassiveMask into separate masks for mount and unmount?\n\n if (parentFiber.subtreeFlags & PassiveMask) {\n var child = parentFiber.child;\n\n while (child !== null) {\n setCurrentFiber(child);\n commitPassiveUnmountOnFiber(child);\n child = child.sibling;\n }\n }\n\n setCurrentFiber(prevDebugFiber);\n}\n\nfunction commitPassiveUnmountOnFiber(finishedWork) {\n switch (finishedWork.tag) {\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n recursivelyTraversePassiveUnmountEffects(finishedWork);\n\n if (finishedWork.flags & Passive$1) {\n commitHookPassiveUnmountEffects(finishedWork, finishedWork.return, Passive | HasEffect);\n }\n\n break;\n }\n\n case OffscreenComponent:\n {\n var instance = finishedWork.stateNode;\n var nextState = finishedWork.memoizedState;\n var isHidden = nextState !== null;\n\n if (isHidden && instance._visibility & OffscreenPassiveEffectsConnected && ( // For backwards compatibility, don't unmount when a tree suspends. In\n // the future we may change this to unmount after a delay.\n finishedWork.return === null || finishedWork.return.tag !== SuspenseComponent)) {\n // The effects are currently connected. Disconnect them.\n // TODO: Add option or heuristic to delay before disconnecting the\n // effects. Then if the tree reappears before the delay has elapsed, we\n // can skip toggling the effects entirely.\n instance._visibility &= ~OffscreenPassiveEffectsConnected;\n recursivelyTraverseDisconnectPassiveEffects(finishedWork);\n } else {\n recursivelyTraversePassiveUnmountEffects(finishedWork);\n }\n\n break;\n }\n\n default:\n {\n recursivelyTraversePassiveUnmountEffects(finishedWork);\n break;\n }\n }\n}\n\nfunction recursivelyTraverseDisconnectPassiveEffects(parentFiber) {\n // Deletions effects can be scheduled on any fiber type. They need to happen\n // before the children effects have fired.\n var deletions = parentFiber.deletions;\n\n if ((parentFiber.flags & ChildDeletion) !== NoFlags$1) {\n if (deletions !== null) {\n for (var i = 0; i < deletions.length; i++) {\n var childToDelete = deletions[i]; // TODO: Convert this to use recursion\n\n nextEffect = childToDelete;\n commitPassiveUnmountEffectsInsideOfDeletedTree_begin(childToDelete, parentFiber);\n }\n }\n\n detachAlternateSiblings(parentFiber);\n }\n\n var prevDebugFiber = getCurrentFiber(); // TODO: Check PassiveStatic flag\n\n var child = parentFiber.child;\n\n while (child !== null) {\n setCurrentFiber(child);\n disconnectPassiveEffect(child);\n child = child.sibling;\n }\n\n setCurrentFiber(prevDebugFiber);\n}\n\nfunction disconnectPassiveEffect(finishedWork) {\n switch (finishedWork.tag) {\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n // TODO: Check PassiveStatic flag\n commitHookPassiveUnmountEffects(finishedWork, finishedWork.return, Passive); // When disconnecting passive effects, we fire the effects in the same\n // order as during a deletiong: parent before child\n\n recursivelyTraverseDisconnectPassiveEffects(finishedWork);\n break;\n }\n\n case OffscreenComponent:\n {\n var instance = finishedWork.stateNode;\n\n if (instance._visibility & OffscreenPassiveEffectsConnected) {\n instance._visibility &= ~OffscreenPassiveEffectsConnected;\n recursivelyTraverseDisconnectPassiveEffects(finishedWork);\n }\n\n break;\n }\n\n default:\n {\n recursivelyTraverseDisconnectPassiveEffects(finishedWork);\n break;\n }\n }\n}\n\nfunction commitPassiveUnmountEffectsInsideOfDeletedTree_begin(deletedSubtreeRoot, nearestMountedAncestor) {\n while (nextEffect !== null) {\n var fiber = nextEffect; // Deletion effects fire in parent -> child order\n // TODO: Check if fiber has a PassiveStatic flag\n\n setCurrentFiber(fiber);\n commitPassiveUnmountInsideDeletedTreeOnFiber(fiber, nearestMountedAncestor);\n resetCurrentFiber();\n var child = fiber.child; // TODO: Only traverse subtree if it has a PassiveStatic flag.\n\n if (child !== null) {\n child.return = fiber;\n nextEffect = child;\n } else {\n commitPassiveUnmountEffectsInsideOfDeletedTree_complete(deletedSubtreeRoot);\n }\n }\n}\n\nfunction commitPassiveUnmountEffectsInsideOfDeletedTree_complete(deletedSubtreeRoot) {\n while (nextEffect !== null) {\n var fiber = nextEffect;\n var sibling = fiber.sibling;\n var returnFiber = fiber.return; // Recursively traverse the entire deleted tree and clean up fiber fields.\n // This is more aggressive than ideal, and the long term goal is to only\n // have to detach the deleted tree at the root.\n\n detachFiberAfterEffects(fiber);\n\n if (fiber === deletedSubtreeRoot) {\n nextEffect = null;\n return;\n }\n\n if (sibling !== null) {\n sibling.return = returnFiber;\n nextEffect = sibling;\n return;\n }\n\n nextEffect = returnFiber;\n }\n}\n\nfunction commitPassiveUnmountInsideDeletedTreeOnFiber(current, nearestMountedAncestor) {\n switch (current.tag) {\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n commitHookPassiveUnmountEffects(current, nearestMountedAncestor, Passive);\n break;\n }\n // TODO: run passive unmount effects when unmounting a root.\n // Because passive unmount effects are not currently run,\n // the cache instance owned by the root will never be freed.\n // When effects are run, the cache should be freed here:\n // case HostRoot: {\n // if (enableCache) {\n // const cache = current.memoizedState.cache;\n // releaseCache(cache);\n // }\n // break;\n // }\n\n case LegacyHiddenComponent:\n case OffscreenComponent:\n {\n {\n if (current.memoizedState !== null && current.memoizedState.cachePool !== null) {\n var cache = current.memoizedState.cachePool.pool; // Retain/release the cache used for pending (suspended) nodes.\n // Note that this is only reached in the non-suspended/visible case:\n // when the content is suspended/hidden, the retain/release occurs\n // via the parent Suspense component (see case above).\n\n if (cache != null) {\n retainCache(cache);\n }\n }\n }\n\n break;\n }\n\n case SuspenseComponent:\n {\n\n break;\n }\n\n case CacheComponent:\n {\n {\n var _cache = current.memoizedState.cache;\n releaseCache(_cache);\n }\n\n break;\n }\n }\n}\n\nfunction invokeLayoutEffectMountInDEV(fiber) {\n {\n // We don't need to re-check StrictEffectsMode here.\n // This function is only called if that check has already passed.\n switch (fiber.tag) {\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n try {\n commitHookEffectListMount(Layout | HasEffect, fiber);\n } catch (error) {\n captureCommitPhaseError(fiber, fiber.return, error);\n }\n\n break;\n }\n\n case ClassComponent:\n {\n var instance = fiber.stateNode;\n\n if (typeof instance.componentDidMount === 'function') {\n try {\n instance.componentDidMount();\n } catch (error) {\n captureCommitPhaseError(fiber, fiber.return, error);\n }\n }\n\n break;\n }\n }\n }\n}\n\nfunction invokePassiveEffectMountInDEV(fiber) {\n {\n // We don't need to re-check StrictEffectsMode here.\n // This function is only called if that check has already passed.\n switch (fiber.tag) {\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n try {\n commitHookEffectListMount(Passive | HasEffect, fiber);\n } catch (error) {\n captureCommitPhaseError(fiber, fiber.return, error);\n }\n\n break;\n }\n }\n }\n}\n\nfunction invokeLayoutEffectUnmountInDEV(fiber) {\n {\n // We don't need to re-check StrictEffectsMode here.\n // This function is only called if that check has already passed.\n switch (fiber.tag) {\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n try {\n commitHookEffectListUnmount(Layout | HasEffect, fiber, fiber.return);\n } catch (error) {\n captureCommitPhaseError(fiber, fiber.return, error);\n }\n\n break;\n }\n\n case ClassComponent:\n {\n var instance = fiber.stateNode;\n\n if (typeof instance.componentWillUnmount === 'function') {\n safelyCallComponentWillUnmount(fiber, fiber.return, instance);\n }\n\n break;\n }\n }\n }\n}\n\nfunction invokePassiveEffectUnmountInDEV(fiber) {\n {\n // We don't need to re-check StrictEffectsMode here.\n // This function is only called if that check has already passed.\n switch (fiber.tag) {\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n try {\n commitHookEffectListUnmount(Passive | HasEffect, fiber, fiber.return);\n } catch (error) {\n captureCommitPhaseError(fiber, fiber.return, error);\n }\n }\n }\n }\n}\n\nfunction getCacheSignal() {\n\n var cache = readContext(CacheContext);\n return cache.controller.signal;\n}\n\nfunction getCacheForType(resourceType) {\n\n var cache = readContext(CacheContext);\n var cacheForType = cache.data.get(resourceType);\n\n if (cacheForType === undefined) {\n cacheForType = resourceType();\n cache.data.set(resourceType, cacheForType);\n }\n\n return cacheForType;\n}\n\nvar DefaultCacheDispatcher = {\n getCacheSignal: getCacheSignal,\n getCacheForType: getCacheForType\n};\n\nif (typeof Symbol === 'function' && Symbol.for) {\n var symbolFor = Symbol.for;\n symbolFor('selector.component');\n symbolFor('selector.has_pseudo_class');\n symbolFor('selector.role');\n symbolFor('selector.test_id');\n symbolFor('selector.text');\n}\nvar commitHooks = [];\nfunction onCommitRoot() {\n {\n commitHooks.forEach(function (commitHook) {\n return commitHook();\n });\n }\n}\n\nvar ReactCurrentActQueue$1 = ReactSharedInternals.ReactCurrentActQueue;\nfunction isLegacyActEnvironment(fiber) {\n {\n // Legacy mode. We preserve the behavior of React 17's act. It assumes an\n // act environment whenever `jest` is defined, but you can still turn off\n // spurious warnings by setting IS_REACT_ACT_ENVIRONMENT explicitly\n // to false.\n var isReactActEnvironmentGlobal = // $FlowFixMe[cannot-resolve-name] Flow doesn't know about IS_REACT_ACT_ENVIRONMENT global\n typeof IS_REACT_ACT_ENVIRONMENT !== 'undefined' ? // $FlowFixMe[cannot-resolve-name]\n IS_REACT_ACT_ENVIRONMENT : undefined; // $FlowFixMe[cannot-resolve-name] - Flow doesn't know about jest\n\n var jestIsDefined = typeof jest !== 'undefined';\n return jestIsDefined && isReactActEnvironmentGlobal !== false;\n }\n}\nfunction isConcurrentActEnvironment() {\n {\n var isReactActEnvironmentGlobal = // $FlowFixMe[cannot-resolve-name] Flow doesn't know about IS_REACT_ACT_ENVIRONMENT global\n typeof IS_REACT_ACT_ENVIRONMENT !== 'undefined' ? // $FlowFixMe[cannot-resolve-name]\n IS_REACT_ACT_ENVIRONMENT : undefined;\n\n if (!isReactActEnvironmentGlobal && ReactCurrentActQueue$1.current !== null) {\n // TODO: Include link to relevant documentation page.\n error('The current testing environment is not configured to support ' + 'act(...)');\n }\n\n return isReactActEnvironmentGlobal;\n }\n}\n\nvar PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;\nvar ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher,\n ReactCurrentCache = ReactSharedInternals.ReactCurrentCache,\n ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner,\n ReactCurrentBatchConfig$1 = ReactSharedInternals.ReactCurrentBatchConfig,\n ReactCurrentActQueue = ReactSharedInternals.ReactCurrentActQueue;\nvar NoContext =\n/* */\n0;\nvar BatchedContext =\n/* */\n1;\nvar RenderContext =\n/* */\n2;\nvar CommitContext =\n/* */\n4;\nvar RootInProgress = 0;\nvar RootFatalErrored = 1;\nvar RootErrored = 2;\nvar RootSuspended = 3;\nvar RootSuspendedWithDelay = 4;\nvar RootCompleted = 5;\nvar RootDidNotComplete = 6; // Describes where we are in the React execution stack\n\nvar executionContext = NoContext; // The root we're working on\n\nvar workInProgressRoot = null; // The fiber we're working on\n\nvar workInProgress = null; // The lanes we're rendering\n\nvar workInProgressRootRenderLanes = NoLanes;\nvar NotSuspended = 0;\nvar SuspendedOnError = 1;\nvar SuspendedOnData = 2;\nvar SuspendedOnImmediate = 3;\nvar SuspendedOnInstance = 4;\nvar SuspendedOnInstanceAndReadyToContinue = 5;\nvar SuspendedOnDeprecatedThrowPromise = 6;\nvar SuspendedAndReadyToContinue = 7;\nvar SuspendedOnHydration = 8; // When this is true, the work-in-progress fiber just suspended (or errored) and\n// we've yet to unwind the stack. In some cases, we may yield to the main thread\n// after this happens. If the fiber is pinged before we resume, we can retry\n// immediately instead of unwinding the stack.\n\nvar workInProgressSuspendedReason = NotSuspended;\nvar workInProgressThrownValue = null; // Whether a ping listener was attached during this render. This is slightly\n// different that whether something suspended, because we don't add multiple\n// listeners to a promise we've already seen (per root and lane).\n\nvar workInProgressRootDidAttachPingListener = false; // A contextual version of workInProgressRootRenderLanes. It is a superset of\n// the lanes that we started working on at the root. When we enter a subtree\n// that is currently hidden, we add the lanes that would have committed if\n// the hidden tree hadn't been deferred. This is modified by the\n// HiddenContext module.\n//\n// Most things in the work loop should deal with workInProgressRootRenderLanes.\n// Most things in begin/complete phases should deal with entangledRenderLanes.\n\nvar entangledRenderLanes = NoLanes; // Whether to root completed, errored, suspended, etc.\n\nvar workInProgressRootExitStatus = RootInProgress; // A fatal error, if one is thrown\n\nvar workInProgressRootFatalError = null; // The work left over by components that were visited during this render. Only\n// includes unprocessed updates, not work in bailed out children.\n\nvar workInProgressRootSkippedLanes = NoLanes; // Lanes that were updated (in an interleaved event) during this render.\n\nvar workInProgressRootInterleavedUpdatedLanes = NoLanes; // Lanes that were updated during the render phase (*not* an interleaved event).\n\nvar workInProgressRootPingedLanes = NoLanes; // If this lane scheduled deferred work, this is the lane of the deferred task.\n\nvar workInProgressDeferredLane = NoLane; // Errors that are thrown during the render phase.\n\nvar workInProgressRootConcurrentErrors = null; // These are errors that we recovered from without surfacing them to the UI.\n// We will log them once the tree commits.\n\nvar workInProgressRootRecoverableErrors = null; // Tracks when an update occurs during the render phase.\n\nvar workInProgressRootDidIncludeRecursiveRenderUpdate = false; // Thacks when an update occurs during the commit phase. It's a separate\n// variable from the one for renders because the commit phase may run\n// concurrently to a render phase.\n\nvar didIncludeCommitPhaseUpdate = false; // The most recent time we either committed a fallback, or when a fallback was\n// filled in with the resolved UI. This lets us throttle the appearance of new\n// content as it streams in, to minimize jank.\n// TODO: Think of a better name for this variable?\n\nvar globalMostRecentFallbackTime = 0;\nvar FALLBACK_THROTTLE_MS = 300; // The absolute time for when we should start giving up on rendering\n// more and prefer CPU suspense heuristics instead.\n\nvar workInProgressRootRenderTargetTime = Infinity; // How long a render is supposed to take before we start following CPU\n// suspense heuristics and opt out of rendering more content.\n\nvar RENDER_TIMEOUT_MS = 500;\nvar workInProgressTransitions = null;\n\nfunction resetRenderTimer() {\n workInProgressRootRenderTargetTime = now$1() + RENDER_TIMEOUT_MS;\n}\n\nfunction getRenderTargetTime() {\n return workInProgressRootRenderTargetTime;\n}\nvar hasUncaughtError = false;\nvar firstUncaughtError = null;\nvar legacyErrorBoundariesThatAlreadyFailed = null;\nvar rootDoesHavePassiveEffects = false;\nvar rootWithPendingPassiveEffects = null;\nvar pendingPassiveEffectsLanes = NoLanes;\nvar pendingPassiveProfilerEffects = [];\nvar pendingPassiveEffectsRemainingLanes = NoLanes;\nvar pendingPassiveTransitions = null; // Use these to prevent an infinite loop of nested updates\n\nvar NESTED_UPDATE_LIMIT = 50;\nvar nestedUpdateCount = 0;\nvar rootWithNestedUpdates = null;\nvar isFlushingPassiveEffects = false;\nvar didScheduleUpdateDuringPassiveEffects = false;\nvar NESTED_PASSIVE_UPDATE_LIMIT = 50;\nvar nestedPassiveUpdateCount = 0;\nvar rootWithPassiveNestedUpdates = null;\nvar isRunningInsertionEffect = false;\nfunction getWorkInProgressRoot() {\n return workInProgressRoot;\n}\nfunction getWorkInProgressRootRenderLanes() {\n return workInProgressRootRenderLanes;\n}\nfunction isWorkLoopSuspendedOnData() {\n return workInProgressSuspendedReason === SuspendedOnData;\n}\nfunction requestUpdateLane(fiber) {\n // Special cases\n var mode = fiber.mode;\n\n if ((mode & ConcurrentMode) === NoMode) {\n return SyncLane;\n } else if ((executionContext & RenderContext) !== NoContext && workInProgressRootRenderLanes !== NoLanes) {\n // This is a render phase update. These are not officially supported. The\n // old behavior is to give this the same \"thread\" (lanes) as\n // whatever is currently rendering. So if you call `setState` on a component\n // that happens later in the same render, it will flush. Ideally, we want to\n // remove the special case and treat them as if they came from an\n // interleaved event. Regardless, this pattern is not officially supported.\n // This behavior is only a fallback. The flag only exists until we can roll\n // out the setState warning, since existing code might accidentally rely on\n // the current behavior.\n return pickArbitraryLane(workInProgressRootRenderLanes);\n }\n\n var transition = requestCurrentTransition();\n\n if (transition !== null) {\n {\n var batchConfigTransition = ReactCurrentBatchConfig$1.transition;\n\n if (!batchConfigTransition._updatedFibers) {\n batchConfigTransition._updatedFibers = new Set();\n }\n\n batchConfigTransition._updatedFibers.add(fiber);\n }\n\n var actionScopeLane = peekEntangledActionLane();\n return actionScopeLane !== NoLane ? // We're inside an async action scope. Reuse the same lane.\n actionScopeLane : // We may or may not be inside an async action scope. If we are, this\n // is the first update in that scope. Either way, we need to get a\n // fresh transition lane.\n requestTransitionLane();\n } // Updates originating inside certain React methods, like flushSync, have\n // their priority set by tracking it with a context variable.\n //\n // The opaque type returned by the host config is internally a lane, so we can\n // use that directly.\n // TODO: Move this type conversion to the event priority module.\n\n\n var updateLane = getCurrentUpdatePriority();\n\n if (updateLane !== NoLane) {\n return updateLane;\n } // This update originated outside React. Ask the host environment for an\n // appropriate priority, based on the type of event.\n //\n // The opaque type returned by the host config is internally a lane, so we can\n // use that directly.\n // TODO: Move this type conversion to the event priority module.\n\n\n var eventLane = getCurrentEventPriority();\n return eventLane;\n}\n\nfunction requestRetryLane(fiber) {\n // This is a fork of `requestUpdateLane` designed specifically for Suspense\n // \"retries\" — a special update that attempts to flip a Suspense boundary\n // from its placeholder state to its primary/resolved state.\n // Special cases\n var mode = fiber.mode;\n\n if ((mode & ConcurrentMode) === NoMode) {\n return SyncLane;\n }\n\n return claimNextRetryLane();\n}\n\nfunction requestDeferredLane() {\n if (workInProgressDeferredLane === NoLane) {\n // If there are multiple useDeferredValue hooks in the same render, the\n // tasks that they spawn should all be batched together, so they should all\n // receive the same lane.\n // Check the priority of the current render to decide the priority of the\n // deferred task.\n // OffscreenLane is used for prerendering, but we also use OffscreenLane\n // for incremental hydration. It's given the lowest priority because the\n // initial HTML is the same as the final UI. But useDeferredValue during\n // hydration is an exception — we need to upgrade the UI to the final\n // value. So if we're currently hydrating, we treat it like a transition.\n var isPrerendering = includesSomeLane(workInProgressRootRenderLanes, OffscreenLane) && !getIsHydrating();\n\n if (isPrerendering) {\n // There's only one OffscreenLane, so if it contains deferred work, we\n // should just reschedule using the same lane.\n workInProgressDeferredLane = OffscreenLane;\n } else {\n // Everything else is spawned as a transition.\n workInProgressDeferredLane = claimNextTransitionLane();\n }\n } // Mark the parent Suspense boundary so it knows to spawn the deferred lane.\n\n\n var suspenseHandler = getSuspenseHandler();\n\n if (suspenseHandler !== null) {\n // TODO: As an optimization, we shouldn't entangle the lanes at the root; we\n // can entangle them using the baseLanes of the Suspense boundary instead.\n // We only need to do something special if there's no Suspense boundary.\n suspenseHandler.flags |= DidDefer;\n }\n\n return workInProgressDeferredLane;\n}\nfunction peekDeferredLane() {\n return workInProgressDeferredLane;\n}\nfunction scheduleUpdateOnFiber(root, fiber, lane) {\n {\n if (isRunningInsertionEffect) {\n error('useInsertionEffect must not schedule updates.');\n }\n }\n\n {\n if (isFlushingPassiveEffects) {\n didScheduleUpdateDuringPassiveEffects = true;\n }\n } // Check if the work loop is currently suspended and waiting for data to\n // finish loading.\n\n\n if ( // Suspended render phase\n root === workInProgressRoot && workInProgressSuspendedReason === SuspendedOnData || // Suspended commit phase\n root.cancelPendingCommit !== null) {\n // The incoming update might unblock the current render. Interrupt the\n // current attempt and restart from the top.\n prepareFreshStack(root, NoLanes);\n markRootSuspended(root, workInProgressRootRenderLanes, workInProgressDeferredLane);\n } // Mark that the root has a pending update.\n\n\n markRootUpdated(root, lane);\n\n if ((executionContext & RenderContext) !== NoLanes && root === workInProgressRoot) {\n // This update was dispatched during the render phase. This is a mistake\n // if the update originates from user space (with the exception of local\n // hook updates, which are handled differently and don't reach this\n // function), but there are some internal React features that use this as\n // an implementation detail, like selective hydration.\n warnAboutRenderPhaseUpdatesInDEV(fiber); // Track lanes that were updated during the render phase\n } else {\n // This is a normal update, scheduled from outside the render phase. For\n // example, during an input event.\n {\n if (isDevToolsPresent) {\n addFiberToLanesMap(root, fiber, lane);\n }\n }\n\n warnIfUpdatesNotWrappedWithActDEV(fiber);\n\n if (root === workInProgressRoot) {\n // Received an update to a tree that's in the middle of rendering. Mark\n // that there was an interleaved update work on this root.\n if ((executionContext & RenderContext) === NoContext) {\n workInProgressRootInterleavedUpdatedLanes = mergeLanes(workInProgressRootInterleavedUpdatedLanes, lane);\n }\n\n if (workInProgressRootExitStatus === RootSuspendedWithDelay) {\n // The root already suspended with a delay, which means this render\n // definitely won't finish. Since we have a new update, let's mark it as\n // suspended now, right before marking the incoming update. This has the\n // effect of interrupting the current render and switching to the update.\n // TODO: Make sure this doesn't override pings that happen while we've\n // already started rendering.\n markRootSuspended(root, workInProgressRootRenderLanes, workInProgressDeferredLane);\n }\n }\n\n ensureRootIsScheduled(root);\n\n if (lane === SyncLane && executionContext === NoContext && (fiber.mode & ConcurrentMode) === NoMode) {\n if (ReactCurrentActQueue.isBatchingLegacy) ; else {\n // Flush the synchronous work now, unless we're already working or inside\n // a batch. This is intentionally inside scheduleUpdateOnFiber instead of\n // scheduleCallbackForFiber to preserve the ability to schedule a callback\n // without immediately flushing it. We only do this for user-initiated\n // updates, to preserve historical behavior of legacy mode.\n resetRenderTimer();\n flushSyncWorkOnLegacyRootsOnly();\n }\n }\n }\n}\nfunction scheduleInitialHydrationOnRoot(root, lane) {\n // This is a special fork of scheduleUpdateOnFiber that is only used to\n // schedule the initial hydration of a root that has just been created. Most\n // of the stuff in scheduleUpdateOnFiber can be skipped.\n //\n // The main reason for this separate path, though, is to distinguish the\n // initial children from subsequent updates. In fully client-rendered roots\n // (createRoot instead of hydrateRoot), all top-level renders are modeled as\n // updates, but hydration roots are special because the initial render must\n // match what was rendered on the server.\n var current = root.current;\n current.lanes = lane;\n markRootUpdated(root, lane);\n ensureRootIsScheduled(root);\n}\nfunction isUnsafeClassRenderPhaseUpdate(fiber) {\n // Check if this is a render phase update. Only called by class components,\n // which special (deprecated) behavior for UNSAFE_componentWillReceive props.\n return (executionContext & RenderContext) !== NoContext;\n} // This is the entry point for every concurrent task, i.e. anything that\n// goes through Scheduler.\n\nfunction performConcurrentWorkOnRoot(root, didTimeout) {\n {\n resetNestedUpdateFlag();\n }\n\n if ((executionContext & (RenderContext | CommitContext)) !== NoContext) {\n throw new Error('Should not already be working.');\n } // Flush any pending passive effects before deciding which lanes to work on,\n // in case they schedule additional work.\n\n\n var originalCallbackNode = root.callbackNode;\n var didFlushPassiveEffects = flushPassiveEffects();\n\n if (didFlushPassiveEffects) {\n // Something in the passive effect phase may have canceled the current task.\n // Check if the task node for this root was changed.\n if (root.callbackNode !== originalCallbackNode) {\n // The current task was canceled. Exit. We don't need to call\n // `ensureRootIsScheduled` because the check above implies either that\n // there's a new task, or that there's no remaining work on this root.\n return null;\n }\n } // Determine the next lanes to work on, using the fields stored\n // on the root.\n // TODO: This was already computed in the caller. Pass it as an argument.\n\n\n var lanes = getNextLanes(root, root === workInProgressRoot ? workInProgressRootRenderLanes : NoLanes);\n\n if (lanes === NoLanes) {\n // Defensive coding. This is never expected to happen.\n return null;\n } // We disable time-slicing in some cases: if the work has been CPU-bound\n // for too long (\"expired\" work, to prevent starvation), or we're in\n // sync-updates-by-default mode.\n // TODO: We only check `didTimeout` defensively, to account for a Scheduler\n // bug we're still investigating. Once the bug in Scheduler is fixed,\n // we can remove this, since we track expiration ourselves.\n\n\n var shouldTimeSlice = !includesBlockingLane(root, lanes) && !includesExpiredLane(root, lanes) && (!didTimeout);\n var exitStatus = shouldTimeSlice ? renderRootConcurrent(root, lanes) : renderRootSync(root, lanes);\n\n if (exitStatus !== RootInProgress) {\n var renderWasConcurrent = shouldTimeSlice;\n\n do {\n if (exitStatus === RootDidNotComplete) {\n // The render unwound without completing the tree. This happens in special\n // cases where need to exit the current render without producing a\n // consistent tree or committing.\n markRootSuspended(root, lanes, NoLane);\n } else {\n // The render completed.\n // Check if this render may have yielded to a concurrent event, and if so,\n // confirm that any newly rendered stores are consistent.\n // TODO: It's possible that even a concurrent render may never have yielded\n // to the main thread, if it was fast enough, or if it expired. We could\n // skip the consistency check in that case, too.\n var finishedWork = root.current.alternate;\n\n if (renderWasConcurrent && !isRenderConsistentWithExternalStores(finishedWork)) {\n // A store was mutated in an interleaved event. Render again,\n // synchronously, to block further mutations.\n exitStatus = renderRootSync(root, lanes); // We assume the tree is now consistent because we didn't yield to any\n // concurrent events.\n\n renderWasConcurrent = false; // Need to check the exit status again.\n\n continue;\n } // Check if something threw\n\n\n if (exitStatus === RootErrored) {\n var originallyAttemptedLanes = lanes;\n var errorRetryLanes = getLanesToRetrySynchronouslyOnError(root, originallyAttemptedLanes);\n\n if (errorRetryLanes !== NoLanes) {\n lanes = errorRetryLanes;\n exitStatus = recoverFromConcurrentError(root, originallyAttemptedLanes, errorRetryLanes);\n renderWasConcurrent = false;\n }\n }\n\n if (exitStatus === RootFatalErrored) {\n var fatalError = workInProgressRootFatalError;\n prepareFreshStack(root, NoLanes);\n markRootSuspended(root, lanes, NoLane);\n ensureRootIsScheduled(root);\n throw fatalError;\n } // We now have a consistent tree. The next step is either to commit it,\n // or, if something suspended, wait to commit it after a timeout.\n\n\n root.finishedWork = finishedWork;\n root.finishedLanes = lanes;\n finishConcurrentRender(root, exitStatus, finishedWork, lanes);\n }\n\n break;\n } while (true);\n }\n\n ensureRootIsScheduled(root);\n return getContinuationForRoot(root, originalCallbackNode);\n}\n\nfunction recoverFromConcurrentError(root, originallyAttemptedLanes, errorRetryLanes) {\n // If an error occurred during hydration, discard server response and fall\n // back to client side render.\n // Before rendering again, save the errors from the previous attempt.\n var errorsFromFirstAttempt = workInProgressRootConcurrentErrors;\n var wasRootDehydrated = isRootDehydrated(root);\n\n if (wasRootDehydrated) {\n // The shell failed to hydrate. Set a flag to force a client rendering\n // during the next attempt. To do this, we call prepareFreshStack now\n // to create the root work-in-progress fiber. This is a bit weird in terms\n // of factoring, because it relies on renderRootSync not calling\n // prepareFreshStack again in the call below, which happens because the\n // root and lanes haven't changed.\n //\n // TODO: I think what we should do is set ForceClientRender inside\n // throwException, like we do for nested Suspense boundaries. The reason\n // it's here instead is so we can switch to the synchronous work loop, too.\n // Something to consider for a future refactor.\n var rootWorkInProgress = prepareFreshStack(root, errorRetryLanes);\n rootWorkInProgress.flags |= ForceClientRender;\n\n {\n errorHydratingContainer(root.containerInfo);\n }\n }\n\n var exitStatus = renderRootSync(root, errorRetryLanes);\n\n if (exitStatus !== RootErrored) {\n // Successfully finished rendering on retry\n if (workInProgressRootDidAttachPingListener && !wasRootDehydrated) {\n // During the synchronous render, we attached additional ping listeners.\n // This is highly suggestive of an uncached promise (though it's not the\n // only reason this would happen). If it was an uncached promise, then\n // it may have masked a downstream error from ocurring without actually\n // fixing it. Example:\n //\n // use(Promise.resolve('uncached'))\n // throw new Error('Oops!')\n //\n // When this happens, there's a conflict between blocking potential\n // concurrent data races and unwrapping uncached promise values. We\n // have to choose one or the other. Because the data race recovery is\n // a last ditch effort, we'll disable it.\n root.errorRecoveryDisabledLanes = mergeLanes(root.errorRecoveryDisabledLanes, originallyAttemptedLanes); // Mark the current render as suspended and force it to restart. Once\n // these lanes finish successfully, we'll re-enable the error recovery\n // mechanism for subsequent updates.\n\n workInProgressRootInterleavedUpdatedLanes |= originallyAttemptedLanes;\n return RootSuspendedWithDelay;\n } // The errors from the failed first attempt have been recovered. Add\n // them to the collection of recoverable errors. We'll log them in the\n // commit phase.\n\n\n var errorsFromSecondAttempt = workInProgressRootRecoverableErrors;\n workInProgressRootRecoverableErrors = errorsFromFirstAttempt; // The errors from the second attempt should be queued after the errors\n // from the first attempt, to preserve the causal sequence.\n\n if (errorsFromSecondAttempt !== null) {\n queueRecoverableErrors(errorsFromSecondAttempt);\n }\n }\n\n return exitStatus;\n}\n\nfunction queueRecoverableErrors(errors) {\n if (workInProgressRootRecoverableErrors === null) {\n workInProgressRootRecoverableErrors = errors;\n } else {\n // $FlowFixMe[method-unbinding]\n workInProgressRootRecoverableErrors.push.apply(workInProgressRootRecoverableErrors, errors);\n }\n}\n\nfunction finishConcurrentRender(root, exitStatus, finishedWork, lanes) {\n // TODO: The fact that most of these branches are identical suggests that some\n // of the exit statuses are not best modeled as exit statuses and should be\n // tracked orthogonally.\n switch (exitStatus) {\n case RootInProgress:\n case RootFatalErrored:\n {\n throw new Error('Root did not complete. This is a bug in React.');\n }\n\n case RootSuspendedWithDelay:\n {\n if (includesOnlyTransitions(lanes)) {\n // This is a transition, so we should exit without committing a\n // placeholder and without scheduling a timeout. Delay indefinitely\n // until we receive more data.\n markRootSuspended(root, lanes, workInProgressDeferredLane);\n return;\n } // Commit the placeholder.\n\n\n break;\n }\n\n case RootErrored:\n case RootSuspended:\n case RootCompleted:\n {\n break;\n }\n\n default:\n {\n throw new Error('Unknown root exit status.');\n }\n }\n\n if (shouldForceFlushFallbacksInDEV()) {\n // We're inside an `act` scope. Commit immediately.\n commitRoot(root, workInProgressRootRecoverableErrors, workInProgressTransitions, workInProgressRootDidIncludeRecursiveRenderUpdate, workInProgressDeferredLane);\n } else {\n if (includesOnlyRetries(lanes) && (alwaysThrottleRetries )) {\n // This render only included retries, no updates. Throttle committing\n // retries so that we don't show too many loading states too quickly.\n var msUntilTimeout = globalMostRecentFallbackTime + FALLBACK_THROTTLE_MS - now$1(); // Don't bother with a very short suspense time.\n\n if (msUntilTimeout > 10) {\n markRootSuspended(root, lanes, workInProgressDeferredLane);\n var nextLanes = getNextLanes(root, NoLanes);\n\n if (nextLanes !== NoLanes) {\n // There's additional work we can do on this root. We might as well\n // attempt to work on that while we're suspended.\n return;\n } // The render is suspended, it hasn't timed out, and there's no\n // lower priority work to do. Instead of committing the fallback\n // immediately, wait for more data to arrive.\n // TODO: Combine retry throttling with Suspensey commits. Right now they\n // run one after the other.\n\n\n root.timeoutHandle = scheduleTimeout(commitRootWhenReady.bind(null, root, finishedWork, workInProgressRootRecoverableErrors, workInProgressTransitions, workInProgressRootDidIncludeRecursiveRenderUpdate, lanes, workInProgressDeferredLane), msUntilTimeout);\n return;\n }\n }\n\n commitRootWhenReady(root, finishedWork, workInProgressRootRecoverableErrors, workInProgressTransitions, workInProgressRootDidIncludeRecursiveRenderUpdate, lanes, workInProgressDeferredLane);\n }\n}\n\nfunction commitRootWhenReady(root, finishedWork, recoverableErrors, transitions, didIncludeRenderPhaseUpdate, lanes, spawnedLane) {\n // TODO: Combine retry throttling with Suspensey commits. Right now they run\n // one after the other.\n if (includesOnlyNonUrgentLanes(lanes)) {\n // Before committing, ask the renderer whether the host tree is ready.\n // If it's not, we'll wait until it notifies us.\n startSuspendingCommit(); // This will walk the completed fiber tree and attach listeners to all\n // the suspensey resources. The renderer is responsible for accumulating\n // all the load events. This all happens in a single synchronous\n // transaction, so it track state in its own module scope.\n\n accumulateSuspenseyCommit(finishedWork); // At the end, ask the renderer if it's ready to commit, or if we should\n // suspend. If it's not ready, it will return a callback to subscribe to\n // a ready event.\n\n var schedulePendingCommit = waitForCommitToBeReady();\n\n if (schedulePendingCommit !== null) {\n // NOTE: waitForCommitToBeReady returns a subscribe function so that we\n // only allocate a function if the commit isn't ready yet. The other\n // pattern would be to always pass a callback to waitForCommitToBeReady.\n // Not yet ready to commit. Delay the commit until the renderer notifies\n // us that it's ready. This will be canceled if we start work on the\n // root again.\n root.cancelPendingCommit = schedulePendingCommit(commitRoot.bind(null, root, recoverableErrors, transitions, didIncludeRenderPhaseUpdate));\n markRootSuspended(root, lanes, spawnedLane);\n return;\n }\n } // Otherwise, commit immediately.\n\n\n commitRoot(root, recoverableErrors, transitions, didIncludeRenderPhaseUpdate, spawnedLane);\n}\n\nfunction isRenderConsistentWithExternalStores(finishedWork) {\n // Search the rendered tree for external store reads, and check whether the\n // stores were mutated in a concurrent event. Intentionally using an iterative\n // loop instead of recursion so we can exit early.\n var node = finishedWork;\n\n while (true) {\n if (node.flags & StoreConsistency) {\n var updateQueue = node.updateQueue;\n\n if (updateQueue !== null) {\n var checks = updateQueue.stores;\n\n if (checks !== null) {\n for (var i = 0; i < checks.length; i++) {\n var check = checks[i];\n var getSnapshot = check.getSnapshot;\n var renderedValue = check.value;\n\n try {\n if (!objectIs(getSnapshot(), renderedValue)) {\n // Found an inconsistent store.\n return false;\n }\n } catch (error) {\n // If `getSnapshot` throws, return `false`. This will schedule\n // a re-render, and the error will be rethrown during render.\n return false;\n }\n }\n }\n }\n }\n\n var child = node.child;\n\n if (node.subtreeFlags & StoreConsistency && child !== null) {\n child.return = node;\n node = child;\n continue;\n }\n\n if (node === finishedWork) {\n return true;\n }\n\n while (node.sibling === null) {\n if (node.return === null || node.return === finishedWork) {\n return true;\n }\n\n node = node.return;\n }\n\n node.sibling.return = node.return;\n node = node.sibling;\n } // Flow doesn't know this is unreachable, but eslint does\n // eslint-disable-next-line no-unreachable\n\n\n return true;\n} // The extra indirections around markRootUpdated and markRootSuspended is\n// needed to avoid a circular dependency between this module and\n// ReactFiberLane. There's probably a better way to split up these modules and\n// avoid this problem. Perhaps all the root-marking functions should move into\n// the work loop.\n\n\nfunction markRootUpdated(root, updatedLanes) {\n markRootUpdated$1(root, updatedLanes);\n\n {\n // Check for recursive updates\n if (executionContext & RenderContext) {\n workInProgressRootDidIncludeRecursiveRenderUpdate = true;\n } else if (executionContext & CommitContext) {\n didIncludeCommitPhaseUpdate = true;\n }\n\n throwIfInfiniteUpdateLoopDetected();\n }\n}\n\nfunction markRootPinged(root, pingedLanes) {\n markRootPinged$1(root, pingedLanes);\n\n {\n // Check for recursive pings. Pings are conceptually different from updates in\n // other contexts but we call it an \"update\" in this context because\n // repeatedly pinging a suspended render can cause a recursive render loop.\n // The relevant property is that it can result in a new render attempt\n // being scheduled.\n if (executionContext & RenderContext) {\n workInProgressRootDidIncludeRecursiveRenderUpdate = true;\n } else if (executionContext & CommitContext) {\n didIncludeCommitPhaseUpdate = true;\n }\n\n throwIfInfiniteUpdateLoopDetected();\n }\n}\n\nfunction markRootSuspended(root, suspendedLanes, spawnedLane) {\n // When suspending, we should always exclude lanes that were pinged or (more\n // rarely, since we try to avoid it) updated during the render phase.\n suspendedLanes = removeLanes(suspendedLanes, workInProgressRootPingedLanes);\n suspendedLanes = removeLanes(suspendedLanes, workInProgressRootInterleavedUpdatedLanes);\n\n markRootSuspended$1(root, suspendedLanes, spawnedLane);\n} // This is the entry point for synchronous tasks that don't go\n// through Scheduler\n\n\nfunction performSyncWorkOnRoot(root, lanes) {\n if ((executionContext & (RenderContext | CommitContext)) !== NoContext) {\n throw new Error('Should not already be working.');\n }\n\n var didFlushPassiveEffects = flushPassiveEffects();\n\n if (didFlushPassiveEffects) {\n // If passive effects were flushed, exit to the outer work loop in the root\n // scheduler, so we can recompute the priority.\n // TODO: We don't actually need this `ensureRootIsScheduled` call because\n // this path is only reachable if the root is already part of the schedule.\n // I'm including it only for consistency with the other exit points from\n // this function. Can address in a subsequent refactor.\n ensureRootIsScheduled(root);\n return null;\n }\n\n {\n syncNestedUpdateFlag();\n }\n\n var exitStatus = renderRootSync(root, lanes);\n\n if (root.tag !== LegacyRoot && exitStatus === RootErrored) {\n // If something threw an error, try rendering one more time. We'll render\n // synchronously to block concurrent data mutations, and we'll includes\n // all pending updates are included. If it still fails after the second\n // attempt, we'll give up and commit the resulting tree.\n var originallyAttemptedLanes = lanes;\n var errorRetryLanes = getLanesToRetrySynchronouslyOnError(root, originallyAttemptedLanes);\n\n if (errorRetryLanes !== NoLanes) {\n lanes = errorRetryLanes;\n exitStatus = recoverFromConcurrentError(root, originallyAttemptedLanes, errorRetryLanes);\n }\n }\n\n if (exitStatus === RootFatalErrored) {\n var fatalError = workInProgressRootFatalError;\n prepareFreshStack(root, NoLanes);\n markRootSuspended(root, lanes, NoLane);\n ensureRootIsScheduled(root);\n throw fatalError;\n }\n\n if (exitStatus === RootDidNotComplete) {\n // The render unwound without completing the tree. This happens in special\n // cases where need to exit the current render without producing a\n // consistent tree or committing.\n markRootSuspended(root, lanes, workInProgressDeferredLane);\n ensureRootIsScheduled(root);\n return null;\n } // We now have a consistent tree. Because this is a sync render, we\n // will commit it even if something suspended.\n\n\n var finishedWork = root.current.alternate;\n root.finishedWork = finishedWork;\n root.finishedLanes = lanes;\n commitRoot(root, workInProgressRootRecoverableErrors, workInProgressTransitions, workInProgressRootDidIncludeRecursiveRenderUpdate, workInProgressDeferredLane); // Before exiting, make sure there's a callback scheduled for the next\n // pending level.\n\n ensureRootIsScheduled(root);\n return null;\n}\nfunction flushRoot(root, lanes) {\n if (lanes !== NoLanes) {\n upgradePendingLanesToSync(root, lanes);\n ensureRootIsScheduled(root);\n\n if ((executionContext & (RenderContext | CommitContext)) === NoContext) {\n resetRenderTimer(); // TODO: For historical reasons this flushes all sync work across all\n // roots. It shouldn't really matter either way, but we could change this\n // to only flush the given root.\n\n flushSyncWorkOnAllRoots();\n }\n }\n}\nfunction getExecutionContext() {\n return executionContext;\n}\nfunction batchedUpdates$1(fn, a) {\n var prevExecutionContext = executionContext;\n executionContext |= BatchedContext;\n\n try {\n return fn(a);\n } finally {\n executionContext = prevExecutionContext; // If there were legacy sync updates, flush them at the end of the outer\n // most batchedUpdates-like method.\n\n if (executionContext === NoContext && // Treat `act` as if it's inside `batchedUpdates`, even in legacy mode.\n !(ReactCurrentActQueue.isBatchingLegacy)) {\n resetRenderTimer();\n flushSyncWorkOnLegacyRootsOnly();\n }\n }\n}\n// Warning, this opts-out of checking the function body.\n// eslint-disable-next-line no-unused-vars\n// eslint-disable-next-line no-redeclare\n// eslint-disable-next-line no-redeclare\n\nfunction flushSync$1(fn) {\n // In legacy mode, we flush pending passive effects at the beginning of the\n // next event, not at the end of the previous one.\n if (rootWithPendingPassiveEffects !== null && rootWithPendingPassiveEffects.tag === LegacyRoot && (executionContext & (RenderContext | CommitContext)) === NoContext) {\n flushPassiveEffects();\n }\n\n var prevExecutionContext = executionContext;\n executionContext |= BatchedContext;\n var prevTransition = ReactCurrentBatchConfig$1.transition;\n var previousPriority = getCurrentUpdatePriority();\n\n try {\n ReactCurrentBatchConfig$1.transition = null;\n setCurrentUpdatePriority(DiscreteEventPriority);\n\n if (fn) {\n return fn();\n } else {\n return undefined;\n }\n } finally {\n setCurrentUpdatePriority(previousPriority);\n ReactCurrentBatchConfig$1.transition = prevTransition;\n executionContext = prevExecutionContext; // Flush the immediate callbacks that were scheduled during this batch.\n // Note that this will happen even if batchedUpdates is higher up\n // the stack.\n\n if ((executionContext & (RenderContext | CommitContext)) === NoContext) {\n flushSyncWorkOnAllRoots();\n }\n }\n}\nfunction isAlreadyRendering() {\n // Used by the renderer to print a warning if certain APIs are called from\n // the wrong context.\n return (executionContext & (RenderContext | CommitContext)) !== NoContext;\n}\n// hidden subtree. The stack logic is managed there because that's the only\n// place that ever modifies it. Which module it lives in doesn't matter for\n// performance because this function will get inlined regardless\n\nfunction setEntangledRenderLanes(newEntangledRenderLanes) {\n entangledRenderLanes = newEntangledRenderLanes;\n}\nfunction getEntangledRenderLanes() {\n return entangledRenderLanes;\n}\n\nfunction resetWorkInProgressStack() {\n if (workInProgress === null) return;\n var interruptedWork;\n\n if (workInProgressSuspendedReason === NotSuspended) {\n // Normal case. Work-in-progress hasn't started yet. Unwind all\n // its parents.\n interruptedWork = workInProgress.return;\n } else {\n // Work-in-progress is in suspended state. Reset the work loop and unwind\n // both the suspended fiber and all its parents.\n resetSuspendedWorkLoopOnUnwind(workInProgress);\n interruptedWork = workInProgress;\n }\n\n while (interruptedWork !== null) {\n var current = interruptedWork.alternate;\n unwindInterruptedWork(current, interruptedWork);\n interruptedWork = interruptedWork.return;\n }\n\n workInProgress = null;\n}\n\nfunction prepareFreshStack(root, lanes) {\n root.finishedWork = null;\n root.finishedLanes = NoLanes;\n var timeoutHandle = root.timeoutHandle;\n\n if (timeoutHandle !== noTimeout) {\n // The root previous suspended and scheduled a timeout to commit a fallback\n // state. Now that we have additional work, cancel the timeout.\n root.timeoutHandle = noTimeout; // $FlowFixMe[incompatible-call] Complains noTimeout is not a TimeoutID, despite the check above\n\n cancelTimeout(timeoutHandle);\n }\n\n var cancelPendingCommit = root.cancelPendingCommit;\n\n if (cancelPendingCommit !== null) {\n root.cancelPendingCommit = null;\n cancelPendingCommit();\n }\n\n resetWorkInProgressStack();\n workInProgressRoot = root;\n var rootWorkInProgress = createWorkInProgress(root.current, null);\n workInProgress = rootWorkInProgress;\n workInProgressRootRenderLanes = lanes;\n workInProgressSuspendedReason = NotSuspended;\n workInProgressThrownValue = null;\n workInProgressRootDidAttachPingListener = false;\n workInProgressRootExitStatus = RootInProgress;\n workInProgressRootFatalError = null;\n workInProgressRootSkippedLanes = NoLanes;\n workInProgressRootInterleavedUpdatedLanes = NoLanes;\n workInProgressRootPingedLanes = NoLanes;\n workInProgressDeferredLane = NoLane;\n workInProgressRootConcurrentErrors = null;\n workInProgressRootRecoverableErrors = null;\n workInProgressRootDidIncludeRecursiveRenderUpdate = false; // Get the lanes that are entangled with whatever we're about to render. We\n // track these separately so we can distinguish the priority of the render\n // task from the priority of the lanes it is entangled with. For example, a\n // transition may not be allowed to finish unless it includes the Sync lane,\n // which is currently suspended. We should be able to render the Transition\n // and Sync lane in the same batch, but at Transition priority, because the\n // Sync lane already suspended.\n\n entangledRenderLanes = getEntangledLanes(root, lanes);\n finishQueueingConcurrentUpdates();\n\n {\n ReactStrictModeWarnings.discardPendingWarnings();\n }\n\n return rootWorkInProgress;\n}\n\nfunction resetSuspendedWorkLoopOnUnwind(fiber) {\n // Reset module-level state that was set during the render phase.\n resetContextDependencies();\n resetHooksOnUnwind(fiber);\n resetChildReconcilerOnUnwind();\n}\n\nfunction handleThrow(root, thrownValue) {\n // A component threw an exception. Usually this is because it suspended, but\n // it also includes regular program errors.\n //\n // We're either going to unwind the stack to show a Suspense or error\n // boundary, or we're going to replay the component again. Like after a\n // promise resolves.\n //\n // Until we decide whether we're going to unwind or replay, we should preserve\n // the current state of the work loop without resetting anything.\n //\n // If we do decide to unwind the stack, module-level variables will be reset\n // in resetSuspendedWorkLoopOnUnwind.\n // These should be reset immediately because they're only supposed to be set\n // when React is executing user code.\n resetHooksAfterThrow();\n resetCurrentFiber();\n ReactCurrentOwner$1.current = null;\n\n if (thrownValue === SuspenseException) {\n // This is a special type of exception used for Suspense. For historical\n // reasons, the rest of the Suspense implementation expects the thrown value\n // to be a thenable, because before `use` existed that was the (unstable)\n // API for suspending. This implementation detail can change later, once we\n // deprecate the old API in favor of `use`.\n thrownValue = getSuspendedThenable();\n workInProgressSuspendedReason = shouldRemainOnPreviousScreen() && // Check if there are other pending updates that might possibly unblock this\n // component from suspending. This mirrors the check in\n // renderDidSuspendDelayIfPossible. We should attempt to unify them somehow.\n // TODO: Consider unwinding immediately, using the\n // SuspendedOnHydration mechanism.\n !includesNonIdleWork(workInProgressRootSkippedLanes) && !includesNonIdleWork(workInProgressRootInterleavedUpdatedLanes) ? // Suspend work loop until data resolves\n SuspendedOnData : // Don't suspend work loop, except to check if the data has\n // immediately resolved (i.e. in a microtask). Otherwise, trigger the\n // nearest Suspense fallback.\n SuspendedOnImmediate;\n } else if (thrownValue === SuspenseyCommitException) {\n thrownValue = getSuspendedThenable();\n workInProgressSuspendedReason = SuspendedOnInstance;\n } else if (thrownValue === SelectiveHydrationException) {\n // An update flowed into a dehydrated boundary. Before we can apply the\n // update, we need to finish hydrating. Interrupt the work-in-progress\n // render so we can restart at the hydration lane.\n //\n // The ideal implementation would be able to switch contexts without\n // unwinding the current stack.\n //\n // We could name this something more general but as of now it's the only\n // case where we think this should happen.\n workInProgressSuspendedReason = SuspendedOnHydration;\n } else {\n // This is a regular error.\n var isWakeable = thrownValue !== null && typeof thrownValue === 'object' && typeof thrownValue.then === 'function';\n workInProgressSuspendedReason = isWakeable ? // A wakeable object was thrown by a legacy Suspense implementation.\n // This has slightly different behavior than suspending with `use`.\n SuspendedOnDeprecatedThrowPromise : // This is a regular error. If something earlier in the component already\n // suspended, we must clear the thenable state to unblock the work loop.\n SuspendedOnError;\n }\n\n workInProgressThrownValue = thrownValue;\n var erroredWork = workInProgress;\n\n if (erroredWork === null) {\n // This is a fatal error\n workInProgressRootExitStatus = RootFatalErrored;\n workInProgressRootFatalError = thrownValue;\n return;\n }\n\n if (erroredWork.mode & ProfileMode) {\n // Record the time spent rendering before an error was thrown. This\n // avoids inaccurate Profiler durations in the case of a\n // suspended render.\n stopProfilerTimerIfRunningAndRecordDelta(erroredWork, true);\n }\n\n {\n markComponentRenderStopped();\n\n switch (workInProgressSuspendedReason) {\n case SuspendedOnError:\n {\n markComponentErrored(erroredWork, thrownValue, workInProgressRootRenderLanes);\n break;\n }\n\n case SuspendedOnData:\n case SuspendedOnImmediate:\n case SuspendedOnDeprecatedThrowPromise:\n case SuspendedAndReadyToContinue:\n {\n var wakeable = thrownValue;\n markComponentSuspended(erroredWork, wakeable, workInProgressRootRenderLanes);\n break;\n }\n }\n }\n}\n\nfunction shouldRemainOnPreviousScreen() {\n // This is asking whether it's better to suspend the transition and remain\n // on the previous screen, versus showing a fallback as soon as possible. It\n // takes into account both the priority of render and also whether showing a\n // fallback would produce a desirable user experience.\n var handler = getSuspenseHandler();\n\n if (handler === null) {\n // There's no Suspense boundary that can provide a fallback. We have no\n // choice but to remain on the previous screen.\n // NOTE: We do this even for sync updates, for lack of any better option. In\n // the future, we may change how we handle this, like by putting the whole\n // root into a \"detached\" mode.\n return true;\n } // TODO: Once `use` has fully replaced the `throw promise` pattern, we should\n // be able to remove the equivalent check in finishConcurrentRender, and rely\n // just on this one.\n\n\n if (includesOnlyTransitions(workInProgressRootRenderLanes)) {\n if (getShellBoundary() === null) {\n // We're rendering inside the \"shell\" of the app. Activating the nearest\n // fallback would cause visible content to disappear. It's better to\n // suspend the transition and remain on the previous screen.\n return true;\n } else {\n // We're rendering content that wasn't part of the previous screen.\n // Rather than block the transition, it's better to show a fallback as\n // soon as possible. The appearance of any nested fallbacks will be\n // throttled to avoid jank.\n return false;\n }\n }\n\n if (includesOnlyRetries(workInProgressRootRenderLanes) || // In this context, an OffscreenLane counts as a Retry\n // TODO: It's become increasingly clear that Retries and Offscreen are\n // deeply connected. They probably can be unified further.\n includesSomeLane(workInProgressRootRenderLanes, OffscreenLane)) {\n // During a retry, we can suspend rendering if the nearest Suspense boundary\n // is the boundary of the \"shell\", because we're guaranteed not to block\n // any new content from appearing.\n //\n // The reason we must check if this is a retry is because it guarantees\n // that suspending the work loop won't block an actual update, because\n // retries don't \"update\" anything; they fill in fallbacks that were left\n // behind by a previous transition.\n return handler === getShellBoundary();\n } // For all other Lanes besides Transitions and Retries, we should not wait\n // for the data to load.\n\n\n return false;\n}\n\nfunction pushDispatcher(container) {\n var prevDispatcher = ReactCurrentDispatcher.current;\n ReactCurrentDispatcher.current = ContextOnlyDispatcher;\n\n if (prevDispatcher === null) {\n // The React isomorphic package does not include a default dispatcher.\n // Instead the first renderer will lazily attach one, in order to give\n // nicer error messages.\n return ContextOnlyDispatcher;\n } else {\n return prevDispatcher;\n }\n}\n\nfunction popDispatcher(prevDispatcher) {\n ReactCurrentDispatcher.current = prevDispatcher;\n}\n\nfunction pushCacheDispatcher() {\n {\n var prevCacheDispatcher = ReactCurrentCache.current;\n ReactCurrentCache.current = DefaultCacheDispatcher;\n return prevCacheDispatcher;\n }\n}\n\nfunction popCacheDispatcher(prevCacheDispatcher) {\n {\n ReactCurrentCache.current = prevCacheDispatcher;\n }\n}\n\nfunction markCommitTimeOfFallback() {\n globalMostRecentFallbackTime = now$1();\n}\nfunction markSkippedUpdateLanes(lane) {\n workInProgressRootSkippedLanes = mergeLanes(lane, workInProgressRootSkippedLanes);\n}\nfunction renderDidSuspend() {\n if (workInProgressRootExitStatus === RootInProgress) {\n workInProgressRootExitStatus = RootSuspended;\n }\n}\nfunction renderDidSuspendDelayIfPossible() {\n workInProgressRootExitStatus = RootSuspendedWithDelay; // Check if there are updates that we skipped tree that might have unblocked\n // this render.\n\n if ((includesNonIdleWork(workInProgressRootSkippedLanes) || includesNonIdleWork(workInProgressRootInterleavedUpdatedLanes)) && workInProgressRoot !== null) {\n // Mark the current render as suspended so that we switch to working on\n // the updates that were skipped. Usually we only suspend at the end of\n // the render phase.\n // TODO: We should probably always mark the root as suspended immediately\n // (inside this function), since by suspending at the end of the render\n // phase introduces a potential mistake where we suspend lanes that were\n // pinged or updated while we were rendering.\n // TODO: Consider unwinding immediately, using the\n // SuspendedOnHydration mechanism.\n markRootSuspended(workInProgressRoot, workInProgressRootRenderLanes, workInProgressDeferredLane);\n }\n}\nfunction renderDidError(error) {\n if (workInProgressRootExitStatus !== RootSuspendedWithDelay) {\n workInProgressRootExitStatus = RootErrored;\n }\n\n if (workInProgressRootConcurrentErrors === null) {\n workInProgressRootConcurrentErrors = [error];\n } else {\n workInProgressRootConcurrentErrors.push(error);\n }\n} // Called during render to determine if anything has suspended.\n// Returns false if we're not sure.\n\nfunction renderHasNotSuspendedYet() {\n // If something errored or completed, we can't really be sure,\n // so those are false.\n return workInProgressRootExitStatus === RootInProgress;\n} // TODO: Over time, this function and renderRootConcurrent have become more\n// and more similar. Not sure it makes sense to maintain forked paths. Consider\n// unifying them again.\n\nfunction renderRootSync(root, lanes) {\n var prevExecutionContext = executionContext;\n executionContext |= RenderContext;\n var prevDispatcher = pushDispatcher();\n var prevCacheDispatcher = pushCacheDispatcher(); // If the root or lanes have changed, throw out the existing stack\n // and prepare a fresh one. Otherwise we'll continue where we left off.\n\n if (workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes) {\n {\n if (isDevToolsPresent) {\n var memoizedUpdaters = root.memoizedUpdaters;\n\n if (memoizedUpdaters.size > 0) {\n restorePendingUpdaters(root, workInProgressRootRenderLanes);\n memoizedUpdaters.clear();\n } // At this point, move Fibers that scheduled the upcoming work from the Map to the Set.\n // If we bailout on this work, we'll move them back (like above).\n // It's important to move them now in case the work spawns more work at the same priority with different updaters.\n // That way we can keep the current update and future updates separate.\n\n\n movePendingFibersToMemoized(root, lanes);\n }\n }\n\n workInProgressTransitions = getTransitionsForLanes();\n prepareFreshStack(root, lanes);\n }\n\n {\n markRenderStarted(lanes);\n }\n\n var didSuspendInShell = false;\n\n outer: do {\n try {\n if (workInProgressSuspendedReason !== NotSuspended && workInProgress !== null) {\n // The work loop is suspended. During a synchronous render, we don't\n // yield to the main thread. Immediately unwind the stack. This will\n // trigger either a fallback or an error boundary.\n // TODO: For discrete and \"default\" updates (anything that's not\n // flushSync), we want to wait for the microtasks the flush before\n // unwinding. Will probably implement this using renderRootConcurrent,\n // or merge renderRootSync and renderRootConcurrent into the same\n // function and fork the behavior some other way.\n var unitOfWork = workInProgress;\n var thrownValue = workInProgressThrownValue;\n\n switch (workInProgressSuspendedReason) {\n case SuspendedOnHydration:\n {\n // Selective hydration. An update flowed into a dehydrated tree.\n // Interrupt the current render so the work loop can switch to the\n // hydration lane.\n resetWorkInProgressStack();\n workInProgressRootExitStatus = RootDidNotComplete;\n break outer;\n }\n\n case SuspendedOnImmediate:\n case SuspendedOnData:\n {\n if (!didSuspendInShell && getSuspenseHandler() === null) {\n didSuspendInShell = true;\n } // Intentional fallthrough\n\n }\n\n default:\n {\n // Unwind then continue with the normal work loop.\n workInProgressSuspendedReason = NotSuspended;\n workInProgressThrownValue = null;\n throwAndUnwindWorkLoop(root, unitOfWork, thrownValue);\n break;\n }\n }\n }\n\n workLoopSync();\n break;\n } catch (thrownValue) {\n handleThrow(root, thrownValue);\n }\n } while (true); // Check if something suspended in the shell. We use this to detect an\n // infinite ping loop caused by an uncached promise.\n //\n // Only increment this counter once per synchronous render attempt across the\n // whole tree. Even if there are many sibling components that suspend, this\n // counter only gets incremented once.\n\n\n if (didSuspendInShell) {\n root.shellSuspendCounter++;\n }\n\n resetContextDependencies();\n executionContext = prevExecutionContext;\n popDispatcher(prevDispatcher);\n popCacheDispatcher(prevCacheDispatcher);\n\n if (workInProgress !== null) {\n // This is a sync render, so we should have finished the whole tree.\n throw new Error('Cannot commit an incomplete root. This error is likely caused by a ' + 'bug in React. Please file an issue.');\n }\n\n {\n markRenderStopped();\n } // Set this to null to indicate there's no in-progress render.\n\n\n workInProgressRoot = null;\n workInProgressRootRenderLanes = NoLanes; // It's safe to process the queue now that the render phase is complete.\n\n finishQueueingConcurrentUpdates();\n return workInProgressRootExitStatus;\n} // The work loop is an extremely hot path. Tell Closure not to inline it.\n\n/** @noinline */\n\n\nfunction workLoopSync() {\n // Perform work without checking if we need to yield between fiber.\n while (workInProgress !== null) {\n performUnitOfWork(workInProgress);\n }\n}\n\nfunction renderRootConcurrent(root, lanes) {\n var prevExecutionContext = executionContext;\n executionContext |= RenderContext;\n var prevDispatcher = pushDispatcher();\n var prevCacheDispatcher = pushCacheDispatcher(); // If the root or lanes have changed, throw out the existing stack\n // and prepare a fresh one. Otherwise we'll continue where we left off.\n\n if (workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes) {\n {\n if (isDevToolsPresent) {\n var memoizedUpdaters = root.memoizedUpdaters;\n\n if (memoizedUpdaters.size > 0) {\n restorePendingUpdaters(root, workInProgressRootRenderLanes);\n memoizedUpdaters.clear();\n } // At this point, move Fibers that scheduled the upcoming work from the Map to the Set.\n // If we bailout on this work, we'll move them back (like above).\n // It's important to move them now in case the work spawns more work at the same priority with different updaters.\n // That way we can keep the current update and future updates separate.\n\n\n movePendingFibersToMemoized(root, lanes);\n }\n }\n\n workInProgressTransitions = getTransitionsForLanes();\n resetRenderTimer();\n prepareFreshStack(root, lanes);\n }\n\n {\n markRenderStarted(lanes);\n }\n\n outer: do {\n try {\n if (workInProgressSuspendedReason !== NotSuspended && workInProgress !== null) {\n // The work loop is suspended. We need to either unwind the stack or\n // replay the suspended component.\n var unitOfWork = workInProgress;\n var thrownValue = workInProgressThrownValue;\n\n resumeOrUnwind: switch (workInProgressSuspendedReason) {\n case SuspendedOnError:\n {\n // Unwind then continue with the normal work loop.\n workInProgressSuspendedReason = NotSuspended;\n workInProgressThrownValue = null;\n throwAndUnwindWorkLoop(root, unitOfWork, thrownValue);\n break;\n }\n\n case SuspendedOnData:\n {\n var thenable = thrownValue;\n\n if (isThenableResolved(thenable)) {\n // The data resolved. Try rendering the component again.\n workInProgressSuspendedReason = NotSuspended;\n workInProgressThrownValue = null;\n replaySuspendedUnitOfWork(unitOfWork);\n break;\n } // The work loop is suspended on data. We should wait for it to\n // resolve before continuing to render.\n // TODO: Handle the case where the promise resolves synchronously.\n // Usually this is handled when we instrument the promise to add a\n // `status` field, but if the promise already has a status, we won't\n // have added a listener until right here.\n\n\n var onResolution = function () {\n // Check if the root is still suspended on this promise.\n if (workInProgressSuspendedReason === SuspendedOnData && workInProgressRoot === root) {\n // Mark the root as ready to continue rendering.\n workInProgressSuspendedReason = SuspendedAndReadyToContinue;\n } // Ensure the root is scheduled. We should do this even if we're\n // currently working on a different root, so that we resume\n // rendering later.\n\n\n ensureRootIsScheduled(root);\n };\n\n thenable.then(onResolution, onResolution);\n break outer;\n }\n\n case SuspendedOnImmediate:\n {\n // If this fiber just suspended, it's possible the data is already\n // cached. Yield to the main thread to give it a chance to ping. If\n // it does, we can retry immediately without unwinding the stack.\n workInProgressSuspendedReason = SuspendedAndReadyToContinue;\n break outer;\n }\n\n case SuspendedOnInstance:\n {\n workInProgressSuspendedReason = SuspendedOnInstanceAndReadyToContinue;\n break outer;\n }\n\n case SuspendedAndReadyToContinue:\n {\n var _thenable = thrownValue;\n\n if (isThenableResolved(_thenable)) {\n // The data resolved. Try rendering the component again.\n workInProgressSuspendedReason = NotSuspended;\n workInProgressThrownValue = null;\n replaySuspendedUnitOfWork(unitOfWork);\n } else {\n // Otherwise, unwind then continue with the normal work loop.\n workInProgressSuspendedReason = NotSuspended;\n workInProgressThrownValue = null;\n throwAndUnwindWorkLoop(root, unitOfWork, thrownValue);\n }\n\n break;\n }\n\n case SuspendedOnInstanceAndReadyToContinue:\n {\n switch (workInProgress.tag) {\n case HostComponent:\n case HostHoistable:\n case HostSingleton:\n {\n // Before unwinding the stack, check one more time if the\n // instance is ready. It may have loaded when React yielded to\n // the main thread.\n // Assigning this to a constant so Flow knows the binding won't\n // be mutated by `preloadInstance`.\n var hostFiber = workInProgress;\n var type = hostFiber.type;\n var props = hostFiber.pendingProps;\n var isReady = preloadInstance(type, props);\n\n if (isReady) {\n // The data resolved. Resume the work loop as if nothing\n // suspended. Unlike when a user component suspends, we don't\n // have to replay anything because the host fiber\n // already completed.\n workInProgressSuspendedReason = NotSuspended;\n workInProgressThrownValue = null;\n var sibling = hostFiber.sibling;\n\n if (sibling !== null) {\n workInProgress = sibling;\n } else {\n var returnFiber = hostFiber.return;\n\n if (returnFiber !== null) {\n workInProgress = returnFiber;\n completeUnitOfWork(returnFiber);\n } else {\n workInProgress = null;\n }\n }\n\n break resumeOrUnwind;\n }\n\n break;\n }\n\n default:\n {\n // This will fail gracefully but it's not correct, so log a\n // warning in dev.\n if (true) {\n error('Unexpected type of fiber triggered a suspensey commit. ' + 'This is a bug in React.');\n }\n\n break;\n }\n } // Otherwise, unwind then continue with the normal work loop.\n\n\n workInProgressSuspendedReason = NotSuspended;\n workInProgressThrownValue = null;\n throwAndUnwindWorkLoop(root, unitOfWork, thrownValue);\n break;\n }\n\n case SuspendedOnDeprecatedThrowPromise:\n {\n // Suspended by an old implementation that uses the `throw promise`\n // pattern. The newer replaying behavior can cause subtle issues\n // like infinite ping loops. So we maintain the old behavior and\n // always unwind.\n workInProgressSuspendedReason = NotSuspended;\n workInProgressThrownValue = null;\n throwAndUnwindWorkLoop(root, unitOfWork, thrownValue);\n break;\n }\n\n case SuspendedOnHydration:\n {\n // Selective hydration. An update flowed into a dehydrated tree.\n // Interrupt the current render so the work loop can switch to the\n // hydration lane.\n resetWorkInProgressStack();\n workInProgressRootExitStatus = RootDidNotComplete;\n break outer;\n }\n\n default:\n {\n throw new Error('Unexpected SuspendedReason. This is a bug in React.');\n }\n }\n }\n\n if ( true && ReactCurrentActQueue.current !== null) {\n // `act` special case: If we're inside an `act` scope, don't consult\n // `shouldYield`. Always keep working until the render is complete.\n // This is not just an optimization: in a unit test environment, we\n // can't trust the result of `shouldYield`, because the host I/O is\n // likely mocked.\n workLoopSync();\n } else {\n workLoopConcurrent();\n }\n\n break;\n } catch (thrownValue) {\n handleThrow(root, thrownValue);\n }\n } while (true);\n\n resetContextDependencies();\n popDispatcher(prevDispatcher);\n popCacheDispatcher(prevCacheDispatcher);\n executionContext = prevExecutionContext;\n\n\n if (workInProgress !== null) {\n // Still work remaining.\n {\n markRenderYielded();\n }\n\n return RootInProgress;\n } else {\n // Completed the tree.\n {\n markRenderStopped();\n } // Set this to null to indicate there's no in-progress render.\n\n\n workInProgressRoot = null;\n workInProgressRootRenderLanes = NoLanes; // It's safe to process the queue now that the render phase is complete.\n\n finishQueueingConcurrentUpdates(); // Return the final exit status.\n\n return workInProgressRootExitStatus;\n }\n}\n/** @noinline */\n\n\nfunction workLoopConcurrent() {\n // Perform work until Scheduler asks us to yield\n while (workInProgress !== null && !shouldYield()) {\n // $FlowFixMe[incompatible-call] found when upgrading Flow\n performUnitOfWork(workInProgress);\n }\n}\n\nfunction performUnitOfWork(unitOfWork) {\n // The current, flushed, state of this fiber is the alternate. Ideally\n // nothing should rely on this, but relying on it here means that we don't\n // need an additional field on the work in progress.\n var current = unitOfWork.alternate;\n setCurrentFiber(unitOfWork);\n var next;\n\n if ((unitOfWork.mode & ProfileMode) !== NoMode) {\n startProfilerTimer(unitOfWork);\n next = beginWork(current, unitOfWork, entangledRenderLanes);\n stopProfilerTimerIfRunningAndRecordDelta(unitOfWork, true);\n } else {\n next = beginWork(current, unitOfWork, entangledRenderLanes);\n }\n\n resetCurrentFiber();\n unitOfWork.memoizedProps = unitOfWork.pendingProps;\n\n if (next === null) {\n // If this doesn't spawn new work, complete the current work.\n completeUnitOfWork(unitOfWork);\n } else {\n workInProgress = next;\n }\n\n ReactCurrentOwner$1.current = null;\n}\n\nfunction replaySuspendedUnitOfWork(unitOfWork) {\n // This is a fork of performUnitOfWork specifcally for replaying a fiber that\n // just suspended.\n //\n var current = unitOfWork.alternate;\n setCurrentFiber(unitOfWork);\n var next;\n setCurrentFiber(unitOfWork);\n var isProfilingMode = (unitOfWork.mode & ProfileMode) !== NoMode;\n\n if (isProfilingMode) {\n startProfilerTimer(unitOfWork);\n }\n\n switch (unitOfWork.tag) {\n case IndeterminateComponent:\n {\n // Because it suspended with `use`, we can assume it's a\n // function component.\n unitOfWork.tag = FunctionComponent; // Fallthrough to the next branch.\n }\n\n case SimpleMemoComponent:\n case FunctionComponent:\n {\n // Resolve `defaultProps`. This logic is copied from `beginWork`.\n // TODO: Consider moving this switch statement into that module. Also,\n // could maybe use this as an opportunity to say `use` doesn't work with\n // `defaultProps` :)\n var Component = unitOfWork.type;\n var unresolvedProps = unitOfWork.pendingProps;\n var resolvedProps = unitOfWork.elementType === Component ? unresolvedProps : resolveDefaultProps(Component, unresolvedProps);\n var context;\n\n {\n var unmaskedContext = getUnmaskedContext(unitOfWork, Component, true);\n context = getMaskedContext(unitOfWork, unmaskedContext);\n }\n\n next = replayFunctionComponent(current, unitOfWork, resolvedProps, Component, context, workInProgressRootRenderLanes);\n break;\n }\n\n case ForwardRef:\n {\n // Resolve `defaultProps`. This logic is copied from `beginWork`.\n // TODO: Consider moving this switch statement into that module. Also,\n // could maybe use this as an opportunity to say `use` doesn't work with\n // `defaultProps` :)\n var _Component = unitOfWork.type.render;\n var _unresolvedProps = unitOfWork.pendingProps;\n\n var _resolvedProps = unitOfWork.elementType === _Component ? _unresolvedProps : resolveDefaultProps(_Component, _unresolvedProps);\n\n next = replayFunctionComponent(current, unitOfWork, _resolvedProps, _Component, unitOfWork.ref, workInProgressRootRenderLanes);\n break;\n }\n\n case HostComponent:\n {\n // Some host components are stateful (that's how we implement form\n // actions) but we don't bother to reuse the memoized state because it's\n // not worth the extra code. The main reason to reuse the previous hooks\n // is to reuse uncached promises, but we happen to know that the only\n // promises that a host component might suspend on are definitely cached\n // because they are controlled by us. So don't bother.\n resetHooksOnUnwind(unitOfWork); // Fallthrough to the next branch.\n }\n\n default:\n {\n // Other types besides function components are reset completely before\n // being replayed. Currently this only happens when a Usable type is\n // reconciled — the reconciler will suspend.\n //\n // We reset the fiber back to its original state; however, this isn't\n // a full \"unwind\" because we're going to reuse the promises that were\n // reconciled previously. So it's intentional that we don't call\n // resetSuspendedWorkLoopOnUnwind here.\n unwindInterruptedWork(current, unitOfWork);\n unitOfWork = workInProgress = resetWorkInProgress(unitOfWork, entangledRenderLanes);\n next = beginWork(current, unitOfWork, entangledRenderLanes);\n break;\n }\n }\n\n if (isProfilingMode) {\n stopProfilerTimerIfRunningAndRecordDelta(unitOfWork, true);\n } // The begin phase finished successfully without suspending. Return to the\n // normal work loop.\n\n\n resetCurrentFiber();\n unitOfWork.memoizedProps = unitOfWork.pendingProps;\n\n if (next === null) {\n // If this doesn't spawn new work, complete the current work.\n completeUnitOfWork(unitOfWork);\n } else {\n workInProgress = next;\n }\n\n ReactCurrentOwner$1.current = null;\n}\n\nfunction throwAndUnwindWorkLoop(root, unitOfWork, thrownValue) {\n // This is a fork of performUnitOfWork specifcally for unwinding a fiber\n // that threw an exception.\n //\n // Return to the normal work loop. This will unwind the stack, and potentially\n // result in showing a fallback.\n resetSuspendedWorkLoopOnUnwind(unitOfWork);\n var returnFiber = unitOfWork.return;\n\n try {\n // Find and mark the nearest Suspense or error boundary that can handle\n // this \"exception\".\n var didFatal = throwException(root, returnFiber, unitOfWork, thrownValue, workInProgressRootRenderLanes);\n\n if (didFatal) {\n panicOnRootError(thrownValue);\n return;\n }\n } catch (error) {\n // We had trouble processing the error. An example of this happening is\n // when accessing the `componentDidCatch` property of an error boundary\n // throws an error. A weird edge case. There's a regression test for this.\n // To prevent an infinite loop, bubble the error up to the next parent.\n if (returnFiber !== null) {\n workInProgress = returnFiber;\n throw error;\n } else {\n panicOnRootError(thrownValue);\n return;\n }\n }\n\n if (unitOfWork.flags & Incomplete) {\n // Unwind the stack until we reach the nearest boundary.\n unwindUnitOfWork(unitOfWork);\n } else {\n // Although the fiber suspended, we're intentionally going to commit it in\n // an inconsistent state. We can do this safely in cases where we know the\n // inconsistent tree will be hidden.\n //\n // This currently only applies to Legacy Suspense implementation, but we may\n // port a version of this to concurrent roots, too, when performing a\n // synchronous render. Because that will allow us to mutate the tree as we\n // go instead of buffering mutations until the end. Though it's unclear if\n // this particular path is how that would be implemented.\n completeUnitOfWork(unitOfWork);\n }\n}\n\nfunction panicOnRootError(error) {\n // There's no ancestor that can handle this exception. This should never\n // happen because the root is supposed to capture all errors that weren't\n // caught by an error boundary. This is a fatal error, or panic condition,\n // because we've run out of ways to recover.\n workInProgressRootExitStatus = RootFatalErrored;\n workInProgressRootFatalError = error; // Set `workInProgress` to null. This represents advancing to the next\n // sibling, or the parent if there are no siblings. But since the root\n // has no siblings nor a parent, we set it to null. Usually this is\n // handled by `completeUnitOfWork` or `unwindWork`, but since we're\n // intentionally not calling those, we need set it here.\n // TODO: Consider calling `unwindWork` to pop the contexts.\n\n workInProgress = null;\n}\n\nfunction completeUnitOfWork(unitOfWork) {\n // Attempt to complete the current unit of work, then move to the next\n // sibling. If there are no more siblings, return to the parent fiber.\n var completedWork = unitOfWork;\n\n do {\n {\n if ((completedWork.flags & Incomplete) !== NoFlags$1) {\n // NOTE: If we re-enable sibling prerendering in some cases, this branch\n // is where we would switch to the unwinding path.\n error('Internal React error: Expected this fiber to be complete, but ' + \"it isn't. It should have been unwound. This is a bug in React.\");\n }\n } // The current, flushed, state of this fiber is the alternate. Ideally\n // nothing should rely on this, but relying on it here means that we don't\n // need an additional field on the work in progress.\n\n\n var current = completedWork.alternate;\n var returnFiber = completedWork.return;\n setCurrentFiber(completedWork);\n var next = void 0;\n\n if ((completedWork.mode & ProfileMode) === NoMode) {\n next = completeWork(current, completedWork, entangledRenderLanes);\n } else {\n startProfilerTimer(completedWork);\n next = completeWork(current, completedWork, entangledRenderLanes); // Update render duration assuming we didn't error.\n\n stopProfilerTimerIfRunningAndRecordDelta(completedWork, false);\n }\n\n resetCurrentFiber();\n\n if (next !== null) {\n // Completing this fiber spawned new work. Work on that next.\n workInProgress = next;\n return;\n }\n\n var siblingFiber = completedWork.sibling;\n\n if (siblingFiber !== null) {\n // If there is more work to do in this returnFiber, do that next.\n workInProgress = siblingFiber;\n return;\n } // Otherwise, return to the parent\n // $FlowFixMe[incompatible-type] we bail out when we get a null\n\n\n completedWork = returnFiber; // Update the next thing we're working on in case something throws.\n\n workInProgress = completedWork;\n } while (completedWork !== null); // We've reached the root.\n\n\n if (workInProgressRootExitStatus === RootInProgress) {\n workInProgressRootExitStatus = RootCompleted;\n }\n}\n\nfunction unwindUnitOfWork(unitOfWork) {\n var incompleteWork = unitOfWork;\n\n do {\n // The current, flushed, state of this fiber is the alternate. Ideally\n // nothing should rely on this, but relying on it here means that we don't\n // need an additional field on the work in progress.\n var current = incompleteWork.alternate; // This fiber did not complete because something threw. Pop values off\n // the stack without entering the complete phase. If this is a boundary,\n // capture values if possible.\n\n var next = unwindWork(current, incompleteWork); // Because this fiber did not complete, don't reset its lanes.\n\n if (next !== null) {\n // Found a boundary that can handle this exception. Re-renter the\n // begin phase. This branch will return us to the normal work loop.\n //\n // Since we're restarting, remove anything that is not a host effect\n // from the effect tag.\n next.flags &= HostEffectMask;\n workInProgress = next;\n return;\n } // Keep unwinding until we reach either a boundary or the root.\n\n\n if ((incompleteWork.mode & ProfileMode) !== NoMode) {\n // Record the render duration for the fiber that errored.\n stopProfilerTimerIfRunningAndRecordDelta(incompleteWork, false); // Include the time spent working on failed children before continuing.\n\n var actualDuration = incompleteWork.actualDuration;\n var child = incompleteWork.child;\n\n while (child !== null) {\n // $FlowFixMe[unsafe-addition] addition with possible null/undefined value\n actualDuration += child.actualDuration;\n child = child.sibling;\n }\n\n incompleteWork.actualDuration = actualDuration;\n } // TODO: Once we stop prerendering siblings, instead of resetting the parent\n // of the node being unwound, we should be able to reset node itself as we\n // unwind the stack. Saves an additional null check.\n\n\n var returnFiber = incompleteWork.return;\n\n if (returnFiber !== null) {\n // Mark the parent fiber as incomplete and clear its subtree flags.\n // TODO: Once we stop prerendering siblings, we may be able to get rid of\n // the Incomplete flag because unwinding to the nearest boundary will\n // happen synchronously.\n returnFiber.flags |= Incomplete;\n returnFiber.subtreeFlags = NoFlags$1;\n returnFiber.deletions = null;\n } // NOTE: If we re-enable sibling prerendering in some cases, here we\n // would switch to the normal completion path: check if a sibling\n // exists, and if so, begin work on it.\n // Otherwise, return to the parent\n // $FlowFixMe[incompatible-type] we bail out when we get a null\n\n\n incompleteWork = returnFiber; // Update the next thing we're working on in case something throws.\n\n workInProgress = incompleteWork;\n } while (incompleteWork !== null); // We've unwound all the way to the root.\n\n\n workInProgressRootExitStatus = RootDidNotComplete;\n workInProgress = null;\n}\n\nfunction commitRoot(root, recoverableErrors, transitions, didIncludeRenderPhaseUpdate, spawnedLane) {\n // TODO: This no longer makes any sense. We already wrap the mutation and\n // layout phases. Should be able to remove.\n var previousUpdateLanePriority = getCurrentUpdatePriority();\n var prevTransition = ReactCurrentBatchConfig$1.transition;\n\n try {\n ReactCurrentBatchConfig$1.transition = null;\n setCurrentUpdatePriority(DiscreteEventPriority);\n commitRootImpl(root, recoverableErrors, transitions, didIncludeRenderPhaseUpdate, previousUpdateLanePriority, spawnedLane);\n } finally {\n ReactCurrentBatchConfig$1.transition = prevTransition;\n setCurrentUpdatePriority(previousUpdateLanePriority);\n }\n\n return null;\n}\n\nfunction commitRootImpl(root, recoverableErrors, transitions, didIncludeRenderPhaseUpdate, renderPriorityLevel, spawnedLane) {\n do {\n // `flushPassiveEffects` will call `flushSyncUpdateQueue` at the end, which\n // means `flushPassiveEffects` will sometimes result in additional\n // passive effects. So we need to keep flushing in a loop until there are\n // no more pending effects.\n // TODO: Might be better if `flushPassiveEffects` did not automatically\n // flush synchronous work at the end, to avoid factoring hazards like this.\n flushPassiveEffects();\n } while (rootWithPendingPassiveEffects !== null);\n\n flushRenderPhaseStrictModeWarningsInDEV();\n\n if ((executionContext & (RenderContext | CommitContext)) !== NoContext) {\n throw new Error('Should not already be working.');\n }\n\n var finishedWork = root.finishedWork;\n var lanes = root.finishedLanes;\n\n {\n markCommitStarted(lanes);\n }\n\n if (finishedWork === null) {\n\n {\n markCommitStopped();\n }\n\n return null;\n } else {\n {\n if (lanes === NoLanes) {\n error('root.finishedLanes should not be empty during a commit. This is a ' + 'bug in React.');\n }\n }\n }\n\n root.finishedWork = null;\n root.finishedLanes = NoLanes;\n\n if (finishedWork === root.current) {\n throw new Error('Cannot commit the same tree as before. This error is likely caused by ' + 'a bug in React. Please file an issue.');\n } // commitRoot never returns a continuation; it always finishes synchronously.\n // So we can clear these now to allow a new callback to be scheduled.\n\n\n root.callbackNode = null;\n root.callbackPriority = NoLane;\n root.cancelPendingCommit = null; // Check which lanes no longer have any work scheduled on them, and mark\n // those as finished.\n\n var remainingLanes = mergeLanes(finishedWork.lanes, finishedWork.childLanes); // Make sure to account for lanes that were updated by a concurrent event\n // during the render phase; don't mark them as finished.\n\n var concurrentlyUpdatedLanes = getConcurrentlyUpdatedLanes();\n remainingLanes = mergeLanes(remainingLanes, concurrentlyUpdatedLanes);\n markRootFinished(root, remainingLanes, spawnedLane); // Reset this before firing side effects so we can detect recursive updates.\n\n didIncludeCommitPhaseUpdate = false;\n\n if (root === workInProgressRoot) {\n // We can reset these now that they are finished.\n workInProgressRoot = null;\n workInProgress = null;\n workInProgressRootRenderLanes = NoLanes;\n } // If there are pending passive effects, schedule a callback to process them.\n // Do this as early as possible, so it is queued before anything else that\n // might get scheduled in the commit phase. (See #16714.)\n // TODO: Delete all other places that schedule the passive effect callback\n // They're redundant.\n\n\n if ((finishedWork.subtreeFlags & PassiveMask) !== NoFlags$1 || (finishedWork.flags & PassiveMask) !== NoFlags$1) {\n if (!rootDoesHavePassiveEffects) {\n rootDoesHavePassiveEffects = true;\n pendingPassiveEffectsRemainingLanes = remainingLanes; // workInProgressTransitions might be overwritten, so we want\n // to store it in pendingPassiveTransitions until they get processed\n // We need to pass this through as an argument to commitRoot\n // because workInProgressTransitions might have changed between\n // the previous render and commit if we throttle the commit\n // with setTimeout\n\n pendingPassiveTransitions = transitions;\n scheduleCallback(NormalPriority$1, function () {\n flushPassiveEffects(); // This render triggered passive effects: release the root cache pool\n // *after* passive effects fire to avoid freeing a cache pool that may\n // be referenced by a node in the tree (HostRoot, Cache boundary etc)\n\n return null;\n });\n }\n } // Check if there are any effects in the whole tree.\n // TODO: This is left over from the effect list implementation, where we had\n // to check for the existence of `firstEffect` to satisfy Flow. I think the\n // only other reason this optimization exists is because it affects profiling.\n // Reconsider whether this is necessary.\n\n\n var subtreeHasEffects = (finishedWork.subtreeFlags & (BeforeMutationMask | MutationMask | LayoutMask | PassiveMask)) !== NoFlags$1;\n var rootHasEffect = (finishedWork.flags & (BeforeMutationMask | MutationMask | LayoutMask | PassiveMask)) !== NoFlags$1;\n\n if (subtreeHasEffects || rootHasEffect) {\n var prevTransition = ReactCurrentBatchConfig$1.transition;\n ReactCurrentBatchConfig$1.transition = null;\n var previousPriority = getCurrentUpdatePriority();\n setCurrentUpdatePriority(DiscreteEventPriority);\n var prevExecutionContext = executionContext;\n executionContext |= CommitContext; // Reset this to null before calling lifecycles\n\n ReactCurrentOwner$1.current = null; // The commit phase is broken into several sub-phases. We do a separate pass\n // of the effect list for each phase: all mutation effects come before all\n // layout effects, and so on.\n // The first phase a \"before mutation\" phase. We use this phase to read the\n // state of the host tree right before we mutate it. This is where\n // getSnapshotBeforeUpdate is called.\n\n commitBeforeMutationEffects(root, finishedWork);\n\n {\n // Mark the current commit time to be shared by all Profilers in this\n // batch. This enables them to be grouped later.\n recordCommitTime();\n } // The next phase is the mutation phase, where we mutate the host tree.\n\n\n commitMutationEffects(root, finishedWork, lanes);\n\n resetAfterCommit(); // The work-in-progress tree is now the current tree. This must come after\n // the mutation phase, so that the previous tree is still current during\n // componentWillUnmount, but before the layout phase, so that the finished\n // work is current during componentDidMount/Update.\n\n root.current = finishedWork; // The next phase is the layout phase, where we call effects that read\n\n {\n markLayoutEffectsStarted(lanes);\n }\n\n commitLayoutEffects(finishedWork, root, lanes);\n\n {\n markLayoutEffectsStopped();\n } // Tell Scheduler to yield at the end of the frame, so the browser has an\n // opportunity to paint.\n\n\n requestPaint();\n executionContext = prevExecutionContext; // Reset the priority to the previous non-sync value.\n\n setCurrentUpdatePriority(previousPriority);\n ReactCurrentBatchConfig$1.transition = prevTransition;\n } else {\n // No effects.\n root.current = finishedWork; // Measure these anyway so the flamegraph explicitly shows that there were\n // no effects.\n // TODO: Maybe there's a better way to report this.\n\n {\n recordCommitTime();\n }\n }\n\n var rootDidHavePassiveEffects = rootDoesHavePassiveEffects;\n\n if (rootDoesHavePassiveEffects) {\n // This commit has passive effects. Stash a reference to them. But don't\n // schedule a callback until after flushing layout work.\n rootDoesHavePassiveEffects = false;\n rootWithPendingPassiveEffects = root;\n pendingPassiveEffectsLanes = lanes;\n } else {\n // There were no passive effects, so we can immediately release the cache\n // pool for this render.\n releaseRootPooledCache(root, remainingLanes);\n\n {\n nestedPassiveUpdateCount = 0;\n rootWithPassiveNestedUpdates = null;\n }\n } // Read this again, since an effect might have updated it\n\n\n remainingLanes = root.pendingLanes; // Check if there's remaining work on this root\n // TODO: This is part of the `componentDidCatch` implementation. Its purpose\n // is to detect whether something might have called setState inside\n // `componentDidCatch`. The mechanism is known to be flawed because `setState`\n // inside `componentDidCatch` is itself flawed — that's why we recommend\n // `getDerivedStateFromError` instead. However, it could be improved by\n // checking if remainingLanes includes Sync work, instead of whether there's\n // any work remaining at all (which would also include stuff like Suspense\n // retries or transitions). It's been like this for a while, though, so fixing\n // it probably isn't that urgent.\n\n if (remainingLanes === NoLanes) {\n // If there's no remaining work, we can clear the set of already failed\n // error boundaries.\n legacyErrorBoundariesThatAlreadyFailed = null;\n }\n\n {\n if (!rootDidHavePassiveEffects) {\n commitDoubleInvokeEffectsInDEV(root, false);\n }\n }\n\n onCommitRoot$1(finishedWork.stateNode, renderPriorityLevel);\n\n {\n if (isDevToolsPresent) {\n root.memoizedUpdaters.clear();\n }\n }\n\n {\n onCommitRoot();\n } // Always call this before exiting `commitRoot`, to ensure that any\n // additional work on this root is scheduled.\n\n\n ensureRootIsScheduled(root);\n\n if (recoverableErrors !== null) {\n // There were errors during this render, but recovered from them without\n // needing to surface it to the UI. We log them here.\n var onRecoverableError = root.onRecoverableError;\n\n for (var i = 0; i < recoverableErrors.length; i++) {\n var recoverableError = recoverableErrors[i];\n var errorInfo = makeErrorInfo(recoverableError.digest, recoverableError.stack);\n onRecoverableError(recoverableError.value, errorInfo);\n }\n }\n\n if (hasUncaughtError) {\n hasUncaughtError = false;\n var error$1 = firstUncaughtError;\n firstUncaughtError = null;\n throw error$1;\n } // If the passive effects are the result of a discrete render, flush them\n // synchronously at the end of the current task so that the result is\n // immediately observable. Otherwise, we assume that they are not\n // order-dependent and do not need to be observed by external systems, so we\n // can wait until after paint.\n // TODO: We can optimize this by not scheduling the callback earlier. Since we\n // currently schedule the callback in multiple places, will wait until those\n // are consolidated.\n\n\n if (includesSyncLane(pendingPassiveEffectsLanes) && root.tag !== LegacyRoot) {\n flushPassiveEffects();\n } // Read this again, since a passive effect might have updated it\n\n\n remainingLanes = root.pendingLanes; // Check if this render scheduled a cascading synchronous update. This is a\n // heurstic to detect infinite update loops. We are intentionally excluding\n // hydration lanes in this check, because render triggered by selective\n // hydration is conceptually not an update.\n\n if ( // Check if there was a recursive update spawned by this render, in either\n // the render phase or the commit phase. We track these explicitly because\n // we can't infer from the remaining lanes alone.\n (didIncludeRenderPhaseUpdate || didIncludeCommitPhaseUpdate) || // Was the finished render the result of an update (not hydration)?\n includesSomeLane(lanes, UpdateLanes) && // Did it schedule a sync update?\n includesSomeLane(remainingLanes, SyncUpdateLanes)) {\n {\n markNestedUpdateScheduled();\n } // Count the number of times the root synchronously re-renders without\n // finishing. If there are too many, it indicates an infinite update loop.\n\n\n if (root === rootWithNestedUpdates) {\n nestedUpdateCount++;\n } else {\n nestedUpdateCount = 0;\n rootWithNestedUpdates = root;\n }\n } else {\n nestedUpdateCount = 0;\n } // If layout work was scheduled, flush it now.\n\n\n flushSyncWorkOnAllRoots();\n\n {\n markCommitStopped();\n }\n\n return null;\n}\n\nfunction makeErrorInfo(digest, componentStack) {\n {\n var errorInfo = {\n componentStack: componentStack,\n digest: digest\n };\n Object.defineProperty(errorInfo, 'digest', {\n configurable: false,\n enumerable: true,\n get: function () {\n error('You are accessing \"digest\" from the errorInfo object passed to onRecoverableError.' + ' This property is deprecated and will be removed in a future version of React.' + ' To access the digest of an Error look for this property on the Error instance itself.');\n\n return digest;\n }\n });\n return errorInfo;\n }\n}\n\nfunction releaseRootPooledCache(root, remainingLanes) {\n {\n var pooledCacheLanes = root.pooledCacheLanes &= remainingLanes;\n\n if (pooledCacheLanes === NoLanes) {\n // None of the remaining work relies on the cache pool. Clear it so\n // subsequent requests get a new cache\n var pooledCache = root.pooledCache;\n\n if (pooledCache != null) {\n root.pooledCache = null;\n releaseCache(pooledCache);\n }\n }\n }\n}\n\nfunction flushPassiveEffects() {\n // Returns whether passive effects were flushed.\n // TODO: Combine this check with the one in flushPassiveEFfectsImpl. We should\n // probably just combine the two functions. I believe they were only separate\n // in the first place because we used to wrap it with\n // `Scheduler.runWithPriority`, which accepts a function. But now we track the\n // priority within React itself, so we can mutate the variable directly.\n if (rootWithPendingPassiveEffects !== null) {\n // Cache the root since rootWithPendingPassiveEffects is cleared in\n // flushPassiveEffectsImpl\n var root = rootWithPendingPassiveEffects; // Cache and clear the remaining lanes flag; it must be reset since this\n // method can be called from various places, not always from commitRoot\n // where the remaining lanes are known\n\n var remainingLanes = pendingPassiveEffectsRemainingLanes;\n pendingPassiveEffectsRemainingLanes = NoLanes;\n var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes);\n var priority = lowerEventPriority(DefaultEventPriority, renderPriority);\n var prevTransition = ReactCurrentBatchConfig$1.transition;\n var previousPriority = getCurrentUpdatePriority();\n\n try {\n ReactCurrentBatchConfig$1.transition = null;\n setCurrentUpdatePriority(priority);\n return flushPassiveEffectsImpl();\n } finally {\n setCurrentUpdatePriority(previousPriority);\n ReactCurrentBatchConfig$1.transition = prevTransition; // Once passive effects have run for the tree - giving components a\n // chance to retain cache instances they use - release the pooled\n // cache at the root (if there is one)\n\n releaseRootPooledCache(root, remainingLanes);\n }\n }\n\n return false;\n}\nfunction enqueuePendingPassiveProfilerEffect(fiber) {\n {\n pendingPassiveProfilerEffects.push(fiber);\n\n if (!rootDoesHavePassiveEffects) {\n rootDoesHavePassiveEffects = true;\n scheduleCallback(NormalPriority$1, function () {\n flushPassiveEffects();\n return null;\n });\n }\n }\n}\n\nfunction flushPassiveEffectsImpl() {\n if (rootWithPendingPassiveEffects === null) {\n return false;\n } // Cache and clear the transitions flag\n\n\n var transitions = pendingPassiveTransitions;\n pendingPassiveTransitions = null;\n var root = rootWithPendingPassiveEffects;\n var lanes = pendingPassiveEffectsLanes;\n rootWithPendingPassiveEffects = null; // TODO: This is sometimes out of sync with rootWithPendingPassiveEffects.\n // Figure out why and fix it. It's not causing any known issues (probably\n // because it's only used for profiling), but it's a refactor hazard.\n\n pendingPassiveEffectsLanes = NoLanes;\n\n if ((executionContext & (RenderContext | CommitContext)) !== NoContext) {\n throw new Error('Cannot flush passive effects while already rendering.');\n }\n\n {\n isFlushingPassiveEffects = true;\n didScheduleUpdateDuringPassiveEffects = false;\n }\n\n {\n markPassiveEffectsStarted(lanes);\n }\n\n var prevExecutionContext = executionContext;\n executionContext |= CommitContext;\n commitPassiveUnmountEffects(root.current);\n commitPassiveMountEffects(root, root.current, lanes, transitions); // TODO: Move to commitPassiveMountEffects\n\n {\n var profilerEffects = pendingPassiveProfilerEffects;\n pendingPassiveProfilerEffects = [];\n\n for (var i = 0; i < profilerEffects.length; i++) {\n var fiber = profilerEffects[i];\n commitPassiveEffectDurations(root, fiber);\n }\n }\n\n {\n markPassiveEffectsStopped();\n }\n\n {\n commitDoubleInvokeEffectsInDEV(root, true);\n }\n\n executionContext = prevExecutionContext;\n flushSyncWorkOnAllRoots();\n\n {\n // If additional passive effects were scheduled, increment a counter. If this\n // exceeds the limit, we'll fire a warning.\n if (didScheduleUpdateDuringPassiveEffects) {\n if (root === rootWithPassiveNestedUpdates) {\n nestedPassiveUpdateCount++;\n } else {\n nestedPassiveUpdateCount = 0;\n rootWithPassiveNestedUpdates = root;\n }\n } else {\n nestedPassiveUpdateCount = 0;\n }\n\n isFlushingPassiveEffects = false;\n didScheduleUpdateDuringPassiveEffects = false;\n } // TODO: Move to commitPassiveMountEffects\n\n\n onPostCommitRoot(root);\n\n {\n var stateNode = root.current.stateNode;\n stateNode.effectDuration = 0;\n stateNode.passiveEffectDuration = 0;\n }\n\n return true;\n}\n\nfunction isAlreadyFailedLegacyErrorBoundary(instance) {\n return legacyErrorBoundariesThatAlreadyFailed !== null && legacyErrorBoundariesThatAlreadyFailed.has(instance);\n}\nfunction markLegacyErrorBoundaryAsFailed(instance) {\n if (legacyErrorBoundariesThatAlreadyFailed === null) {\n legacyErrorBoundariesThatAlreadyFailed = new Set([instance]);\n } else {\n legacyErrorBoundariesThatAlreadyFailed.add(instance);\n }\n}\n\nfunction prepareToThrowUncaughtError(error) {\n if (!hasUncaughtError) {\n hasUncaughtError = true;\n firstUncaughtError = error;\n }\n}\n\nvar onUncaughtError = prepareToThrowUncaughtError;\n\nfunction captureCommitPhaseErrorOnRoot(rootFiber, sourceFiber, error) {\n var errorInfo = createCapturedValueAtFiber(error, sourceFiber);\n var update = createRootErrorUpdate(rootFiber, errorInfo, SyncLane);\n var root = enqueueUpdate(rootFiber, update, SyncLane);\n\n if (root !== null) {\n markRootUpdated(root, SyncLane);\n ensureRootIsScheduled(root);\n }\n}\n\nfunction captureCommitPhaseError(sourceFiber, nearestMountedAncestor, error$1) {\n {\n setIsRunningInsertionEffect(false);\n }\n\n if (sourceFiber.tag === HostRoot) {\n // Error was thrown at the root. There is no parent, so the root\n // itself should capture it.\n captureCommitPhaseErrorOnRoot(sourceFiber, sourceFiber, error$1);\n return;\n }\n\n var fiber = nearestMountedAncestor;\n\n while (fiber !== null) {\n if (fiber.tag === HostRoot) {\n captureCommitPhaseErrorOnRoot(fiber, sourceFiber, error$1);\n return;\n } else if (fiber.tag === ClassComponent) {\n var ctor = fiber.type;\n var instance = fiber.stateNode;\n\n if (typeof ctor.getDerivedStateFromError === 'function' || typeof instance.componentDidCatch === 'function' && !isAlreadyFailedLegacyErrorBoundary(instance)) {\n var errorInfo = createCapturedValueAtFiber(error$1, sourceFiber);\n var update = createClassErrorUpdate(fiber, errorInfo, SyncLane);\n var root = enqueueUpdate(fiber, update, SyncLane);\n\n if (root !== null) {\n markRootUpdated(root, SyncLane);\n ensureRootIsScheduled(root);\n }\n\n return;\n }\n }\n\n fiber = fiber.return;\n }\n\n {\n error('Internal React error: Attempted to capture a commit phase error ' + 'inside a detached tree. This indicates a bug in React. Potential ' + 'causes include deleting the same fiber more than once, committing an ' + 'already-finished tree, or an inconsistent return pointer.\\n\\n' + 'Error message:\\n\\n%s', error$1);\n }\n}\nfunction attachPingListener(root, wakeable, lanes) {\n // Attach a ping listener\n //\n // The data might resolve before we have a chance to commit the fallback. Or,\n // in the case of a refresh, we'll never commit a fallback. So we need to\n // attach a listener now. When it resolves (\"pings\"), we can decide whether to\n // try rendering the tree again.\n //\n // Only attach a listener if one does not already exist for the lanes\n // we're currently rendering (which acts like a \"thread ID\" here).\n //\n // We only need to do this in concurrent mode. Legacy Suspense always\n // commits fallbacks synchronously, so there are no pings.\n var pingCache = root.pingCache;\n var threadIDs;\n\n if (pingCache === null) {\n pingCache = root.pingCache = new PossiblyWeakMap();\n threadIDs = new Set();\n pingCache.set(wakeable, threadIDs);\n } else {\n threadIDs = pingCache.get(wakeable);\n\n if (threadIDs === undefined) {\n threadIDs = new Set();\n pingCache.set(wakeable, threadIDs);\n }\n }\n\n if (!threadIDs.has(lanes)) {\n workInProgressRootDidAttachPingListener = true; // Memoize using the thread ID to prevent redundant listeners.\n\n threadIDs.add(lanes);\n var ping = pingSuspendedRoot.bind(null, root, wakeable, lanes);\n\n {\n if (isDevToolsPresent) {\n // If we have pending work still, restore the original updaters\n restorePendingUpdaters(root, lanes);\n }\n }\n\n wakeable.then(ping, ping);\n }\n}\n\nfunction pingSuspendedRoot(root, wakeable, pingedLanes) {\n var pingCache = root.pingCache;\n\n if (pingCache !== null) {\n // The wakeable resolved, so we no longer need to memoize, because it will\n // never be thrown again.\n pingCache.delete(wakeable);\n }\n\n markRootPinged(root, pingedLanes);\n warnIfSuspenseResolutionNotWrappedWithActDEV(root);\n\n if (workInProgressRoot === root && isSubsetOfLanes(workInProgressRootRenderLanes, pingedLanes)) {\n // Received a ping at the same priority level at which we're currently\n // rendering. We might want to restart this render. This should mirror\n // the logic of whether or not a root suspends once it completes.\n // TODO: If we're rendering sync either due to Sync, Batched or expired,\n // we should probably never restart.\n // If we're suspended with delay, or if it's a retry, we'll always suspend\n // so we can always restart.\n if (workInProgressRootExitStatus === RootSuspendedWithDelay || workInProgressRootExitStatus === RootSuspended && includesOnlyRetries(workInProgressRootRenderLanes) && now$1() - globalMostRecentFallbackTime < FALLBACK_THROTTLE_MS) {\n // Force a restart from the root by unwinding the stack. Unless this is\n // being called from the render phase, because that would cause a crash.\n if ((executionContext & RenderContext) === NoContext) {\n prepareFreshStack(root, NoLanes);\n }\n } else {\n // Even though we can't restart right now, we might get an\n // opportunity later. So we mark this render as having a ping.\n workInProgressRootPingedLanes = mergeLanes(workInProgressRootPingedLanes, pingedLanes);\n }\n }\n\n ensureRootIsScheduled(root);\n}\n\nfunction retryTimedOutBoundary(boundaryFiber, retryLane) {\n // The boundary fiber (a Suspense component or SuspenseList component)\n // previously was rendered in its fallback state. One of the promises that\n // suspended it has resolved, which means at least part of the tree was\n // likely unblocked. Try rendering again, at a new lanes.\n if (retryLane === NoLane) {\n // TODO: Assign this to `suspenseState.retryLane`? to avoid\n // unnecessary entanglement?\n retryLane = requestRetryLane(boundaryFiber);\n } // TODO: Special case idle priority?\n\n\n var root = enqueueConcurrentRenderForLane(boundaryFiber, retryLane);\n\n if (root !== null) {\n markRootUpdated(root, retryLane);\n ensureRootIsScheduled(root);\n }\n}\n\nfunction retryDehydratedSuspenseBoundary(boundaryFiber) {\n var suspenseState = boundaryFiber.memoizedState;\n var retryLane = NoLane;\n\n if (suspenseState !== null) {\n retryLane = suspenseState.retryLane;\n }\n\n retryTimedOutBoundary(boundaryFiber, retryLane);\n}\nfunction resolveRetryWakeable(boundaryFiber, wakeable) {\n var retryLane = NoLane; // Default\n\n var retryCache;\n\n switch (boundaryFiber.tag) {\n case SuspenseComponent:\n retryCache = boundaryFiber.stateNode;\n var suspenseState = boundaryFiber.memoizedState;\n\n if (suspenseState !== null) {\n retryLane = suspenseState.retryLane;\n }\n\n break;\n\n case SuspenseListComponent:\n retryCache = boundaryFiber.stateNode;\n break;\n\n case OffscreenComponent:\n {\n var instance = boundaryFiber.stateNode;\n retryCache = instance._retryCache;\n break;\n }\n\n default:\n throw new Error('Pinged unknown suspense boundary type. ' + 'This is probably a bug in React.');\n }\n\n if (retryCache !== null) {\n // The wakeable resolved, so we no longer need to memoize, because it will\n // never be thrown again.\n retryCache.delete(wakeable);\n }\n\n retryTimedOutBoundary(boundaryFiber, retryLane);\n}\nfunction throwIfInfiniteUpdateLoopDetected() {\n if (nestedUpdateCount > NESTED_UPDATE_LIMIT) {\n nestedUpdateCount = 0;\n nestedPassiveUpdateCount = 0;\n rootWithNestedUpdates = null;\n rootWithPassiveNestedUpdates = null;\n\n {\n if (executionContext & RenderContext && workInProgressRoot !== null) {\n // We're in the render phase. Disable the concurrent error recovery\n // mechanism to ensure that the error we're about to throw gets handled.\n // We need it to trigger the nearest error boundary so that the infinite\n // update loop is broken.\n workInProgressRoot.errorRecoveryDisabledLanes = mergeLanes(workInProgressRoot.errorRecoveryDisabledLanes, workInProgressRootRenderLanes);\n }\n }\n\n throw new Error('Maximum update depth exceeded. This can happen when a component ' + 'repeatedly calls setState inside componentWillUpdate or ' + 'componentDidUpdate. React limits the number of nested updates to ' + 'prevent infinite loops.');\n }\n\n {\n if (nestedPassiveUpdateCount > NESTED_PASSIVE_UPDATE_LIMIT) {\n nestedPassiveUpdateCount = 0;\n rootWithPassiveNestedUpdates = null;\n\n error('Maximum update depth exceeded. This can happen when a component ' + \"calls setState inside useEffect, but useEffect either doesn't \" + 'have a dependency array, or one of the dependencies changes on ' + 'every render.');\n }\n }\n}\n\nfunction flushRenderPhaseStrictModeWarningsInDEV() {\n {\n ReactStrictModeWarnings.flushLegacyContextWarning();\n ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings();\n }\n}\n\nfunction commitDoubleInvokeEffectsInDEV(root, hasPassiveEffects) {\n {\n {\n legacyCommitDoubleInvokeEffectsInDEV(root.current, hasPassiveEffects);\n }\n }\n}\n\nfunction legacyCommitDoubleInvokeEffectsInDEV(fiber, hasPassiveEffects) {\n // TODO (StrictEffects) Should we set a marker on the root if it contains strict effects\n // so we don't traverse unnecessarily? similar to subtreeFlags but just at the root level.\n // Maybe not a big deal since this is DEV only behavior.\n setCurrentFiber(fiber);\n invokeEffectsInDev(fiber, MountLayoutDev, invokeLayoutEffectUnmountInDEV);\n\n if (hasPassiveEffects) {\n invokeEffectsInDev(fiber, MountPassiveDev, invokePassiveEffectUnmountInDEV);\n }\n\n invokeEffectsInDev(fiber, MountLayoutDev, invokeLayoutEffectMountInDEV);\n\n if (hasPassiveEffects) {\n invokeEffectsInDev(fiber, MountPassiveDev, invokePassiveEffectMountInDEV);\n }\n\n resetCurrentFiber();\n}\n\nfunction invokeEffectsInDev(firstChild, fiberFlags, invokeEffectFn) {\n var current = firstChild;\n var subtreeRoot = null;\n\n while (current != null) {\n var primarySubtreeFlag = current.subtreeFlags & fiberFlags;\n\n if (current !== subtreeRoot && current.child != null && primarySubtreeFlag !== NoFlags$1) {\n current = current.child;\n } else {\n if ((current.flags & fiberFlags) !== NoFlags$1) {\n invokeEffectFn(current);\n }\n\n if (current.sibling !== null) {\n current = current.sibling;\n } else {\n current = subtreeRoot = current.return;\n }\n }\n }\n}\n\nvar didWarnStateUpdateForNotYetMountedComponent = null;\nfunction warnAboutUpdateOnNotYetMountedFiberInDEV(fiber) {\n {\n if ((executionContext & RenderContext) !== NoContext) {\n // We let the other warning about render phase updates deal with this one.\n return;\n }\n\n if (!(fiber.mode & ConcurrentMode)) {\n return;\n }\n\n var tag = fiber.tag;\n\n if (tag !== IndeterminateComponent && tag !== HostRoot && tag !== ClassComponent && tag !== FunctionComponent && tag !== ForwardRef && tag !== MemoComponent && tag !== SimpleMemoComponent) {\n // Only warn for user-defined components, not internal ones like Suspense.\n return;\n } // We show the whole stack but dedupe on the top component's name because\n // the problematic code almost always lies inside that component.\n\n\n var componentName = getComponentNameFromFiber(fiber) || 'ReactComponent';\n\n if (didWarnStateUpdateForNotYetMountedComponent !== null) {\n if (didWarnStateUpdateForNotYetMountedComponent.has(componentName)) {\n return;\n } // $FlowFixMe[incompatible-use] found when upgrading Flow\n\n\n didWarnStateUpdateForNotYetMountedComponent.add(componentName);\n } else {\n didWarnStateUpdateForNotYetMountedComponent = new Set([componentName]);\n }\n\n var previousFiber = current;\n\n try {\n setCurrentFiber(fiber);\n\n error(\"Can't perform a React state update on a component that hasn't mounted yet. \" + 'This indicates that you have a side-effect in your render function that ' + 'asynchronously later calls tries to update the component. Move this work to ' + 'useEffect instead.');\n } finally {\n if (previousFiber) {\n setCurrentFiber(fiber);\n } else {\n resetCurrentFiber();\n }\n }\n }\n}\nvar didWarnAboutUpdateInRender = false;\nvar didWarnAboutUpdateInRenderForAnotherComponent;\n\n{\n didWarnAboutUpdateInRenderForAnotherComponent = new Set();\n}\n\nfunction warnAboutRenderPhaseUpdatesInDEV(fiber) {\n {\n if (isRendering) {\n switch (fiber.tag) {\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n var renderingComponentName = workInProgress && getComponentNameFromFiber(workInProgress) || 'Unknown'; // Dedupe by the rendering component because it's the one that needs to be fixed.\n\n var dedupeKey = renderingComponentName;\n\n if (!didWarnAboutUpdateInRenderForAnotherComponent.has(dedupeKey)) {\n didWarnAboutUpdateInRenderForAnotherComponent.add(dedupeKey);\n var setStateComponentName = getComponentNameFromFiber(fiber) || 'Unknown';\n\n error('Cannot update a component (`%s`) while rendering a ' + 'different component (`%s`). To locate the bad setState() call inside `%s`, ' + 'follow the stack trace as described in https://react.dev/link/setstate-in-render', setStateComponentName, renderingComponentName, renderingComponentName);\n }\n\n break;\n }\n\n case ClassComponent:\n {\n if (!didWarnAboutUpdateInRender) {\n error('Cannot update during an existing state transition (such as ' + 'within `render`). Render methods should be a pure ' + 'function of props and state.');\n\n didWarnAboutUpdateInRender = true;\n }\n\n break;\n }\n }\n }\n }\n}\n\nfunction restorePendingUpdaters(root, lanes) {\n {\n if (isDevToolsPresent) {\n var memoizedUpdaters = root.memoizedUpdaters;\n memoizedUpdaters.forEach(function (schedulingFiber) {\n addFiberToLanesMap(root, schedulingFiber, lanes);\n }); // This function intentionally does not clear memoized updaters.\n // Those may still be relevant to the current commit\n // and a future one (e.g. Suspense).\n }\n }\n}\nvar fakeActCallbackNode = {}; // $FlowFixMe[missing-local-annot]\n\nfunction scheduleCallback(priorityLevel, callback) {\n {\n // If we're currently inside an `act` scope, bypass Scheduler and push to\n // the `act` queue instead.\n var actQueue = ReactCurrentActQueue.current;\n\n if (actQueue !== null) {\n actQueue.push(callback);\n return fakeActCallbackNode;\n } else {\n return scheduleCallback$3(priorityLevel, callback);\n }\n }\n}\n\nfunction shouldForceFlushFallbacksInDEV() {\n // Never force flush in production. This function should get stripped out.\n return ReactCurrentActQueue.current !== null;\n}\n\nfunction warnIfUpdatesNotWrappedWithActDEV(fiber) {\n {\n if (fiber.mode & ConcurrentMode) {\n if (!isConcurrentActEnvironment()) {\n // Not in an act environment. No need to warn.\n return;\n }\n } else {\n // Legacy mode has additional cases where we suppress a warning.\n if (!isLegacyActEnvironment()) {\n // Not in an act environment. No need to warn.\n return;\n }\n\n if (executionContext !== NoContext) {\n // Legacy mode doesn't warn if the update is batched, i.e.\n // batchedUpdates or flushSync.\n return;\n }\n\n if (fiber.tag !== FunctionComponent && fiber.tag !== ForwardRef && fiber.tag !== SimpleMemoComponent) {\n // For backwards compatibility with pre-hooks code, legacy mode only\n // warns for updates that originate from a hook.\n return;\n }\n }\n\n if (ReactCurrentActQueue.current === null) {\n var previousFiber = current;\n\n try {\n setCurrentFiber(fiber);\n\n error('An update to %s inside a test was not wrapped in act(...).\\n\\n' + 'When testing, code that causes React state updates should be ' + 'wrapped into act(...):\\n\\n' + 'act(() => {\\n' + ' /* fire events that update state */\\n' + '});\\n' + '/* assert on the output */\\n\\n' + \"This ensures that you're testing the behavior the user would see \" + 'in the browser.' + ' Learn more at https://react.dev/link/wrap-tests-with-act', getComponentNameFromFiber(fiber));\n } finally {\n if (previousFiber) {\n setCurrentFiber(fiber);\n } else {\n resetCurrentFiber();\n }\n }\n }\n }\n}\n\nfunction warnIfSuspenseResolutionNotWrappedWithActDEV(root) {\n {\n if (root.tag !== LegacyRoot && isConcurrentActEnvironment() && ReactCurrentActQueue.current === null) {\n error('A suspended resource finished loading inside a test, but the event ' + 'was not wrapped in act(...).\\n\\n' + 'When testing, code that resolves suspended data should be wrapped ' + 'into act(...):\\n\\n' + 'act(() => {\\n' + ' /* finish loading suspended data */\\n' + '});\\n' + '/* assert on the output */\\n\\n' + \"This ensures that you're testing the behavior the user would see \" + 'in the browser.' + ' Learn more at https://react.dev/link/wrap-tests-with-act');\n }\n }\n}\n\nfunction setIsRunningInsertionEffect(isRunning) {\n {\n isRunningInsertionEffect = isRunning;\n }\n}\n\n/* eslint-disable react-internal/prod-error-codes */\n// Used by React Refresh runtime through DevTools Global Hook.\n\nvar resolveFamily = null;\nvar failedBoundaries = null;\nvar setRefreshHandler = function (handler) {\n {\n resolveFamily = handler;\n }\n};\nfunction resolveFunctionForHotReloading(type) {\n {\n if (resolveFamily === null) {\n // Hot reloading is disabled.\n return type;\n }\n\n var family = resolveFamily(type);\n\n if (family === undefined) {\n return type;\n } // Use the latest known implementation.\n\n\n return family.current;\n }\n}\nfunction resolveClassForHotReloading(type) {\n // No implementation differences.\n return resolveFunctionForHotReloading(type);\n}\nfunction resolveForwardRefForHotReloading(type) {\n {\n if (resolveFamily === null) {\n // Hot reloading is disabled.\n return type;\n }\n\n var family = resolveFamily(type);\n\n if (family === undefined) {\n // Check if we're dealing with a real forwardRef. Don't want to crash early.\n if (type !== null && type !== undefined && typeof type.render === 'function') {\n // ForwardRef is special because its resolved .type is an object,\n // but it's possible that we only have its inner render function in the map.\n // If that inner render function is different, we'll build a new forwardRef type.\n var currentRender = resolveFunctionForHotReloading(type.render);\n\n if (type.render !== currentRender) {\n var syntheticType = {\n $$typeof: REACT_FORWARD_REF_TYPE,\n render: currentRender\n };\n\n if (type.displayName !== undefined) {\n syntheticType.displayName = type.displayName;\n }\n\n return syntheticType;\n }\n }\n\n return type;\n } // Use the latest known implementation.\n\n\n return family.current;\n }\n}\nfunction isCompatibleFamilyForHotReloading(fiber, element) {\n {\n if (resolveFamily === null) {\n // Hot reloading is disabled.\n return false;\n }\n\n var prevType = fiber.elementType;\n var nextType = element.type; // If we got here, we know types aren't === equal.\n\n var needsCompareFamilies = false;\n var $$typeofNextType = typeof nextType === 'object' && nextType !== null ? nextType.$$typeof : null;\n\n switch (fiber.tag) {\n case ClassComponent:\n {\n if (typeof nextType === 'function') {\n needsCompareFamilies = true;\n }\n\n break;\n }\n\n case FunctionComponent:\n {\n if (typeof nextType === 'function') {\n needsCompareFamilies = true;\n } else if ($$typeofNextType === REACT_LAZY_TYPE) {\n // We don't know the inner type yet.\n // We're going to assume that the lazy inner type is stable,\n // and so it is sufficient to avoid reconciling it away.\n // We're not going to unwrap or actually use the new lazy type.\n needsCompareFamilies = true;\n }\n\n break;\n }\n\n case ForwardRef:\n {\n if ($$typeofNextType === REACT_FORWARD_REF_TYPE) {\n needsCompareFamilies = true;\n } else if ($$typeofNextType === REACT_LAZY_TYPE) {\n needsCompareFamilies = true;\n }\n\n break;\n }\n\n case MemoComponent:\n case SimpleMemoComponent:\n {\n if ($$typeofNextType === REACT_MEMO_TYPE) {\n // TODO: if it was but can no longer be simple,\n // we shouldn't set this.\n needsCompareFamilies = true;\n } else if ($$typeofNextType === REACT_LAZY_TYPE) {\n needsCompareFamilies = true;\n }\n\n break;\n }\n\n default:\n return false;\n } // Check if both types have a family and it's the same one.\n\n\n if (needsCompareFamilies) {\n // Note: memo() and forwardRef() we'll compare outer rather than inner type.\n // This means both of them need to be registered to preserve state.\n // If we unwrapped and compared the inner types for wrappers instead,\n // then we would risk falsely saying two separate memo(Foo)\n // calls are equivalent because they wrap the same Foo function.\n var prevFamily = resolveFamily(prevType); // $FlowFixMe[not-a-function] found when upgrading Flow\n\n if (prevFamily !== undefined && prevFamily === resolveFamily(nextType)) {\n return true;\n }\n }\n\n return false;\n }\n}\nfunction markFailedErrorBoundaryForHotReloading(fiber) {\n {\n if (resolveFamily === null) {\n // Hot reloading is disabled.\n return;\n }\n\n if (typeof WeakSet !== 'function') {\n return;\n }\n\n if (failedBoundaries === null) {\n failedBoundaries = new WeakSet();\n }\n\n failedBoundaries.add(fiber);\n }\n}\nvar scheduleRefresh = function (root, update) {\n {\n if (resolveFamily === null) {\n // Hot reloading is disabled.\n return;\n }\n\n var staleFamilies = update.staleFamilies,\n updatedFamilies = update.updatedFamilies;\n flushPassiveEffects();\n flushSync$1(function () {\n scheduleFibersWithFamiliesRecursively(root.current, updatedFamilies, staleFamilies);\n });\n }\n};\nvar scheduleRoot = function (root, element) {\n {\n if (root.context !== emptyContextObject) {\n // Super edge case: root has a legacy _renderSubtree context\n // but we don't know the parentComponent so we can't pass it.\n // Just ignore. We'll delete this with _renderSubtree code path later.\n return;\n }\n\n flushPassiveEffects();\n flushSync$1(function () {\n updateContainer(element, root, null, null);\n });\n }\n};\n\nfunction scheduleFibersWithFamiliesRecursively(fiber, updatedFamilies, staleFamilies) {\n {\n var alternate = fiber.alternate,\n child = fiber.child,\n sibling = fiber.sibling,\n tag = fiber.tag,\n type = fiber.type;\n var candidateType = null;\n\n switch (tag) {\n case FunctionComponent:\n case SimpleMemoComponent:\n case ClassComponent:\n candidateType = type;\n break;\n\n case ForwardRef:\n candidateType = type.render;\n break;\n }\n\n if (resolveFamily === null) {\n throw new Error('Expected resolveFamily to be set during hot reload.');\n }\n\n var needsRender = false;\n var needsRemount = false;\n\n if (candidateType !== null) {\n var family = resolveFamily(candidateType);\n\n if (family !== undefined) {\n if (staleFamilies.has(family)) {\n needsRemount = true;\n } else if (updatedFamilies.has(family)) {\n if (tag === ClassComponent) {\n needsRemount = true;\n } else {\n needsRender = true;\n }\n }\n }\n }\n\n if (failedBoundaries !== null) {\n if (failedBoundaries.has(fiber) || // $FlowFixMe[incompatible-use] found when upgrading Flow\n alternate !== null && failedBoundaries.has(alternate)) {\n needsRemount = true;\n }\n }\n\n if (needsRemount) {\n fiber._debugNeedsRemount = true;\n }\n\n if (needsRemount || needsRender) {\n var root = enqueueConcurrentRenderForLane(fiber, SyncLane);\n\n if (root !== null) {\n scheduleUpdateOnFiber(root, fiber, SyncLane);\n }\n }\n\n if (child !== null && !needsRemount) {\n scheduleFibersWithFamiliesRecursively(child, updatedFamilies, staleFamilies);\n }\n\n if (sibling !== null) {\n scheduleFibersWithFamiliesRecursively(sibling, updatedFamilies, staleFamilies);\n }\n }\n}\n\nvar findHostInstancesForRefresh = function (root, families) {\n {\n var hostInstances = new Set();\n var types = new Set(families.map(function (family) {\n return family.current;\n }));\n findHostInstancesForMatchingFibersRecursively(root.current, types, hostInstances);\n return hostInstances;\n }\n};\n\nfunction findHostInstancesForMatchingFibersRecursively(fiber, types, hostInstances) {\n {\n var child = fiber.child,\n sibling = fiber.sibling,\n tag = fiber.tag,\n type = fiber.type;\n var candidateType = null;\n\n switch (tag) {\n case FunctionComponent:\n case SimpleMemoComponent:\n case ClassComponent:\n candidateType = type;\n break;\n\n case ForwardRef:\n candidateType = type.render;\n break;\n }\n\n var didMatch = false;\n\n if (candidateType !== null) {\n if (types.has(candidateType)) {\n didMatch = true;\n }\n }\n\n if (didMatch) {\n // We have a match. This only drills down to the closest host components.\n // There's no need to search deeper because for the purpose of giving\n // visual feedback, \"flashing\" outermost parent rectangles is sufficient.\n findHostInstancesForFiberShallowly(fiber, hostInstances);\n } else {\n // If there's no match, maybe there will be one further down in the child tree.\n if (child !== null) {\n findHostInstancesForMatchingFibersRecursively(child, types, hostInstances);\n }\n }\n\n if (sibling !== null) {\n findHostInstancesForMatchingFibersRecursively(sibling, types, hostInstances);\n }\n }\n}\n\nfunction findHostInstancesForFiberShallowly(fiber, hostInstances) {\n {\n var foundHostInstances = findChildHostInstancesForFiberShallowly(fiber, hostInstances);\n\n if (foundHostInstances) {\n return;\n } // If we didn't find any host children, fallback to closest host parent.\n\n\n var node = fiber;\n\n while (true) {\n switch (node.tag) {\n case HostSingleton:\n case HostComponent:\n hostInstances.add(node.stateNode);\n return;\n\n case HostPortal:\n hostInstances.add(node.stateNode.containerInfo);\n return;\n\n case HostRoot:\n hostInstances.add(node.stateNode.containerInfo);\n return;\n }\n\n if (node.return === null) {\n throw new Error('Expected to reach root first.');\n }\n\n node = node.return;\n }\n }\n}\n\nfunction findChildHostInstancesForFiberShallowly(fiber, hostInstances) {\n {\n var node = fiber;\n var foundHostInstances = false;\n\n while (true) {\n if (node.tag === HostComponent || (node.tag === HostHoistable ) || (node.tag === HostSingleton )) {\n // We got a match.\n foundHostInstances = true;\n hostInstances.add(node.stateNode); // There may still be more, so keep searching.\n } else if (node.child !== null) {\n node.child.return = node;\n node = node.child;\n continue;\n }\n\n if (node === fiber) {\n return foundHostInstances;\n }\n\n while (node.sibling === null) {\n if (node.return === null || node.return === fiber) {\n return foundHostInstances;\n }\n\n node = node.return;\n }\n\n node.sibling.return = node.return;\n node = node.sibling;\n }\n }\n\n return false;\n}\n\nvar hasBadMapPolyfill;\n\n{\n hasBadMapPolyfill = false;\n\n try {\n var nonExtensibleObject = Object.preventExtensions({});\n /* eslint-disable no-new */\n\n new Map([[nonExtensibleObject, null]]);\n new Set([nonExtensibleObject]);\n /* eslint-enable no-new */\n } catch (e) {\n // TODO: Consider warning about bad polyfills\n hasBadMapPolyfill = true;\n }\n}\n\nfunction FiberNode(tag, pendingProps, key, mode) {\n // Instance\n this.tag = tag;\n this.key = key;\n this.elementType = null;\n this.type = null;\n this.stateNode = null; // Fiber\n\n this.return = null;\n this.child = null;\n this.sibling = null;\n this.index = 0;\n this.ref = null;\n this.refCleanup = null;\n this.pendingProps = pendingProps;\n this.memoizedProps = null;\n this.updateQueue = null;\n this.memoizedState = null;\n this.dependencies = null;\n this.mode = mode; // Effects\n\n this.flags = NoFlags$1;\n this.subtreeFlags = NoFlags$1;\n this.deletions = null;\n this.lanes = NoLanes;\n this.childLanes = NoLanes;\n this.alternate = null;\n\n {\n // Note: The following is done to avoid a v8 performance cliff.\n //\n // Initializing the fields below to smis and later updating them with\n // double values will cause Fibers to end up having separate shapes.\n // This behavior/bug has something to do with Object.preventExtension().\n // Fortunately this only impacts DEV builds.\n // Unfortunately it makes React unusably slow for some applications.\n // To work around this, initialize the fields below with doubles.\n //\n // Learn more about this here:\n // https://github.com/facebook/react/issues/14365\n // https://bugs.chromium.org/p/v8/issues/detail?id=8538\n this.actualDuration = Number.NaN;\n this.actualStartTime = Number.NaN;\n this.selfBaseDuration = Number.NaN;\n this.treeBaseDuration = Number.NaN; // It's okay to replace the initial doubles with smis after initialization.\n // This won't trigger the performance cliff mentioned above,\n // and it simplifies other profiler code (including DevTools).\n\n this.actualDuration = 0;\n this.actualStartTime = -1;\n this.selfBaseDuration = 0;\n this.treeBaseDuration = 0;\n }\n\n {\n // This isn't directly used but is handy for debugging internals:\n this._debugInfo = null;\n this._debugOwner = null;\n this._debugNeedsRemount = false;\n this._debugHookTypes = null;\n\n if (!hasBadMapPolyfill && typeof Object.preventExtensions === 'function') {\n Object.preventExtensions(this);\n }\n }\n} // This is a constructor function, rather than a POJO constructor, still\n// please ensure we do the following:\n// 1) Nobody should add any instance methods on this. Instance methods can be\n// more difficult to predict when they get optimized and they are almost\n// never inlined properly in static compilers.\n// 2) Nobody should rely on `instanceof Fiber` for type testing. We should\n// always know when it is a fiber.\n// 3) We might want to experiment with using numeric keys since they are easier\n// to optimize in a non-JIT environment.\n// 4) We can easily go from a constructor to a createFiber object literal if that\n// is faster.\n// 5) It should be easy to port this to a C struct and keep a C implementation\n// compatible.\n\n\nfunction createFiber(tag, pendingProps, key, mode) {\n // $FlowFixMe[invalid-constructor]: the shapes are exact here but Flow doesn't like constructors\n return new FiberNode(tag, pendingProps, key, mode);\n}\n\nfunction shouldConstruct(Component) {\n var prototype = Component.prototype;\n return !!(prototype && prototype.isReactComponent);\n}\n\nfunction isSimpleFunctionComponent(type) {\n return typeof type === 'function' && !shouldConstruct(type) && type.defaultProps === undefined;\n}\nfunction resolveLazyComponentTag(Component) {\n if (typeof Component === 'function') {\n return shouldConstruct(Component) ? ClassComponent : FunctionComponent;\n } else if (Component !== undefined && Component !== null) {\n var $$typeof = Component.$$typeof;\n\n if ($$typeof === REACT_FORWARD_REF_TYPE) {\n return ForwardRef;\n }\n\n if ($$typeof === REACT_MEMO_TYPE) {\n return MemoComponent;\n }\n }\n\n return IndeterminateComponent;\n} // This is used to create an alternate fiber to do work on.\n\nfunction createWorkInProgress(current, pendingProps) {\n var workInProgress = current.alternate;\n\n if (workInProgress === null) {\n // We use a double buffering pooling technique because we know that we'll\n // only ever need at most two versions of a tree. We pool the \"other\" unused\n // node that we're free to reuse. This is lazily created to avoid allocating\n // extra objects for things that are never updated. It also allow us to\n // reclaim the extra memory if needed.\n workInProgress = createFiber(current.tag, pendingProps, current.key, current.mode);\n workInProgress.elementType = current.elementType;\n workInProgress.type = current.type;\n workInProgress.stateNode = current.stateNode;\n\n {\n // DEV-only fields\n workInProgress._debugOwner = current._debugOwner;\n workInProgress._debugHookTypes = current._debugHookTypes;\n }\n\n workInProgress.alternate = current;\n current.alternate = workInProgress;\n } else {\n workInProgress.pendingProps = pendingProps; // Needed because Blocks store data on type.\n\n workInProgress.type = current.type; // We already have an alternate.\n // Reset the effect tag.\n\n workInProgress.flags = NoFlags$1; // The effects are no longer valid.\n\n workInProgress.subtreeFlags = NoFlags$1;\n workInProgress.deletions = null;\n\n {\n // We intentionally reset, rather than copy, actualDuration & actualStartTime.\n // This prevents time from endlessly accumulating in new commits.\n // This has the downside of resetting values for different priority renders,\n // But works for yielding (the common case) and should support resuming.\n workInProgress.actualDuration = 0;\n workInProgress.actualStartTime = -1;\n }\n } // Reset all effects except static ones.\n // Static effects are not specific to a render.\n\n\n workInProgress.flags = current.flags & StaticMask;\n workInProgress.childLanes = current.childLanes;\n workInProgress.lanes = current.lanes;\n workInProgress.child = current.child;\n workInProgress.memoizedProps = current.memoizedProps;\n workInProgress.memoizedState = current.memoizedState;\n workInProgress.updateQueue = current.updateQueue; // Clone the dependencies object. This is mutated during the render phase, so\n // it cannot be shared with the current fiber.\n\n var currentDependencies = current.dependencies;\n workInProgress.dependencies = currentDependencies === null ? null : {\n lanes: currentDependencies.lanes,\n firstContext: currentDependencies.firstContext\n }; // These will be overridden during the parent's reconciliation\n\n workInProgress.sibling = current.sibling;\n workInProgress.index = current.index;\n workInProgress.ref = current.ref;\n workInProgress.refCleanup = current.refCleanup;\n\n {\n workInProgress.selfBaseDuration = current.selfBaseDuration;\n workInProgress.treeBaseDuration = current.treeBaseDuration;\n }\n\n {\n workInProgress._debugInfo = current._debugInfo;\n workInProgress._debugNeedsRemount = current._debugNeedsRemount;\n\n switch (workInProgress.tag) {\n case IndeterminateComponent:\n case FunctionComponent:\n case SimpleMemoComponent:\n workInProgress.type = resolveFunctionForHotReloading(current.type);\n break;\n\n case ClassComponent:\n workInProgress.type = resolveClassForHotReloading(current.type);\n break;\n\n case ForwardRef:\n workInProgress.type = resolveForwardRefForHotReloading(current.type);\n break;\n }\n }\n\n return workInProgress;\n} // Used to reuse a Fiber for a second pass.\n\nfunction resetWorkInProgress(workInProgress, renderLanes) {\n // This resets the Fiber to what createFiber or createWorkInProgress would\n // have set the values to before during the first pass. Ideally this wouldn't\n // be necessary but unfortunately many code paths reads from the workInProgress\n // when they should be reading from current and writing to workInProgress.\n // We assume pendingProps, index, key, ref, return are still untouched to\n // avoid doing another reconciliation.\n // Reset the effect flags but keep any Placement tags, since that's something\n // that child fiber is setting, not the reconciliation.\n workInProgress.flags &= StaticMask | Placement; // The effects are no longer valid.\n\n var current = workInProgress.alternate;\n\n if (current === null) {\n // Reset to createFiber's initial values.\n workInProgress.childLanes = NoLanes;\n workInProgress.lanes = renderLanes;\n workInProgress.child = null;\n workInProgress.subtreeFlags = NoFlags$1;\n workInProgress.memoizedProps = null;\n workInProgress.memoizedState = null;\n workInProgress.updateQueue = null;\n workInProgress.dependencies = null;\n workInProgress.stateNode = null;\n\n {\n // Note: We don't reset the actualTime counts. It's useful to accumulate\n // actual time across multiple render passes.\n workInProgress.selfBaseDuration = 0;\n workInProgress.treeBaseDuration = 0;\n }\n } else {\n // Reset to the cloned values that createWorkInProgress would've.\n workInProgress.childLanes = current.childLanes;\n workInProgress.lanes = current.lanes;\n workInProgress.child = current.child;\n workInProgress.subtreeFlags = NoFlags$1;\n workInProgress.deletions = null;\n workInProgress.memoizedProps = current.memoizedProps;\n workInProgress.memoizedState = current.memoizedState;\n workInProgress.updateQueue = current.updateQueue; // Needed because Blocks store data on type.\n\n workInProgress.type = current.type; // Clone the dependencies object. This is mutated during the render phase, so\n // it cannot be shared with the current fiber.\n\n var currentDependencies = current.dependencies;\n workInProgress.dependencies = currentDependencies === null ? null : {\n lanes: currentDependencies.lanes,\n firstContext: currentDependencies.firstContext\n };\n\n {\n // Note: We don't reset the actualTime counts. It's useful to accumulate\n // actual time across multiple render passes.\n workInProgress.selfBaseDuration = current.selfBaseDuration;\n workInProgress.treeBaseDuration = current.treeBaseDuration;\n }\n }\n\n return workInProgress;\n}\nfunction createHostRootFiber(tag, isStrictMode, concurrentUpdatesByDefaultOverride) {\n var mode;\n\n if (tag === ConcurrentRoot) {\n mode = ConcurrentMode;\n\n if (isStrictMode === true) {\n mode |= StrictLegacyMode | StrictEffectsMode;\n }\n } else {\n mode = NoMode;\n }\n\n if (isDevToolsPresent) {\n // Always collect profile timings when DevTools are present.\n // This enables DevTools to start capturing timing at any point–\n // Without some nodes in the tree having empty base times.\n mode |= ProfileMode;\n }\n\n return createFiber(HostRoot, null, null, mode);\n}\nfunction createFiberFromTypeAndProps(type, // React$ElementType\nkey, pendingProps, owner, mode, lanes) {\n var fiberTag = IndeterminateComponent; // The resolved type is set if we know what the final type will be. I.e. it's not lazy.\n\n var resolvedType = type;\n\n if (typeof type === 'function') {\n if (shouldConstruct(type)) {\n fiberTag = ClassComponent;\n\n {\n resolvedType = resolveClassForHotReloading(resolvedType);\n }\n } else {\n {\n resolvedType = resolveFunctionForHotReloading(resolvedType);\n }\n }\n } else if (typeof type === 'string') {\n {\n var hostContext = getHostContext();\n fiberTag = isHostHoistableType(type, pendingProps, hostContext) ? HostHoistable : isHostSingletonType(type) ? HostSingleton : HostComponent;\n }\n } else {\n getTag: switch (type) {\n case REACT_FRAGMENT_TYPE:\n return createFiberFromFragment(pendingProps.children, mode, lanes, key);\n\n case REACT_STRICT_MODE_TYPE:\n fiberTag = Mode;\n mode |= StrictLegacyMode;\n\n if ((mode & ConcurrentMode) !== NoMode) {\n // Strict effects should never run on legacy roots\n mode |= StrictEffectsMode;\n }\n\n break;\n\n case REACT_PROFILER_TYPE:\n return createFiberFromProfiler(pendingProps, mode, lanes, key);\n\n case REACT_SUSPENSE_TYPE:\n return createFiberFromSuspense(pendingProps, mode, lanes, key);\n\n case REACT_SUSPENSE_LIST_TYPE:\n return createFiberFromSuspenseList(pendingProps, mode, lanes, key);\n\n case REACT_OFFSCREEN_TYPE:\n return createFiberFromOffscreen(pendingProps, mode, lanes, key);\n\n case REACT_LEGACY_HIDDEN_TYPE:\n\n // Fall through\n\n case REACT_SCOPE_TYPE:\n\n // Fall through\n\n case REACT_CACHE_TYPE:\n {\n return createFiberFromCache(pendingProps, mode, lanes, key);\n }\n\n // Fall through\n\n case REACT_TRACING_MARKER_TYPE:\n\n // Fall through\n\n case REACT_DEBUG_TRACING_MODE_TYPE:\n\n // Fall through\n\n default:\n {\n if (typeof type === 'object' && type !== null) {\n switch (type.$$typeof) {\n case REACT_PROVIDER_TYPE:\n {\n fiberTag = ContextProvider;\n break getTag;\n }\n\n // Fall through\n\n case REACT_CONTEXT_TYPE:\n {\n fiberTag = ContextConsumer;\n break getTag;\n }\n\n case REACT_CONSUMER_TYPE:\n\n // Fall through\n\n case REACT_FORWARD_REF_TYPE:\n fiberTag = ForwardRef;\n\n {\n resolvedType = resolveForwardRefForHotReloading(resolvedType);\n }\n\n break getTag;\n\n case REACT_MEMO_TYPE:\n fiberTag = MemoComponent;\n break getTag;\n\n case REACT_LAZY_TYPE:\n fiberTag = LazyComponent;\n resolvedType = null;\n break getTag;\n }\n }\n\n var info = '';\n\n {\n if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {\n info += ' You likely forgot to export your component from the file ' + \"it's defined in, or you might have mixed up default and \" + 'named imports.';\n }\n\n var ownerName = owner ? getComponentNameFromFiber(owner) : null;\n\n if (ownerName) {\n info += '\\n\\nCheck the render method of `' + ownerName + '`.';\n }\n }\n\n throw new Error('Element type is invalid: expected a string (for built-in ' + 'components) or a class/function (for composite components) ' + (\"but got: \" + (type == null ? type : typeof type) + \".\" + info));\n }\n }\n }\n\n var fiber = createFiber(fiberTag, pendingProps, key, mode);\n fiber.elementType = type;\n fiber.type = resolvedType;\n fiber.lanes = lanes;\n\n {\n fiber._debugOwner = owner;\n }\n\n return fiber;\n}\nfunction createFiberFromElement(element, mode, lanes) {\n var owner = null;\n\n {\n owner = element._owner;\n }\n\n var type = element.type;\n var key = element.key;\n var pendingProps = element.props;\n var fiber = createFiberFromTypeAndProps(type, key, pendingProps, owner, mode, lanes);\n\n {\n fiber._debugOwner = element._owner;\n }\n\n return fiber;\n}\nfunction createFiberFromFragment(elements, mode, lanes, key) {\n var fiber = createFiber(Fragment, elements, key, mode);\n fiber.lanes = lanes;\n return fiber;\n}\n\nfunction createFiberFromProfiler(pendingProps, mode, lanes, key) {\n {\n if (typeof pendingProps.id !== 'string') {\n error('Profiler must specify an \"id\" of type `string` as a prop. Received the type `%s` instead.', typeof pendingProps.id);\n }\n }\n\n var fiber = createFiber(Profiler, pendingProps, key, mode | ProfileMode);\n fiber.elementType = REACT_PROFILER_TYPE;\n fiber.lanes = lanes;\n\n {\n fiber.stateNode = {\n effectDuration: 0,\n passiveEffectDuration: 0\n };\n }\n\n return fiber;\n}\n\nfunction createFiberFromSuspense(pendingProps, mode, lanes, key) {\n var fiber = createFiber(SuspenseComponent, pendingProps, key, mode);\n fiber.elementType = REACT_SUSPENSE_TYPE;\n fiber.lanes = lanes;\n return fiber;\n}\nfunction createFiberFromSuspenseList(pendingProps, mode, lanes, key) {\n var fiber = createFiber(SuspenseListComponent, pendingProps, key, mode);\n fiber.elementType = REACT_SUSPENSE_LIST_TYPE;\n fiber.lanes = lanes;\n return fiber;\n}\nfunction createFiberFromOffscreen(pendingProps, mode, lanes, key) {\n var fiber = createFiber(OffscreenComponent, pendingProps, key, mode);\n fiber.elementType = REACT_OFFSCREEN_TYPE;\n fiber.lanes = lanes;\n var primaryChildInstance = {\n _visibility: OffscreenVisible,\n _pendingVisibility: OffscreenVisible,\n _pendingMarkers: null,\n _retryCache: null,\n _transitions: null,\n _current: null,\n detach: function () {\n return detachOffscreenInstance(primaryChildInstance);\n },\n attach: function () {\n return attachOffscreenInstance(primaryChildInstance);\n }\n };\n fiber.stateNode = primaryChildInstance;\n return fiber;\n}\nfunction createFiberFromCache(pendingProps, mode, lanes, key) {\n var fiber = createFiber(CacheComponent, pendingProps, key, mode);\n fiber.elementType = REACT_CACHE_TYPE;\n fiber.lanes = lanes;\n return fiber;\n}\nfunction createFiberFromText(content, mode, lanes) {\n var fiber = createFiber(HostText, content, null, mode);\n fiber.lanes = lanes;\n return fiber;\n}\nfunction createFiberFromHostInstanceForDeletion() {\n var fiber = createFiber(HostComponent, null, null, NoMode);\n fiber.elementType = 'DELETED';\n return fiber;\n}\nfunction createFiberFromDehydratedFragment(dehydratedNode) {\n var fiber = createFiber(DehydratedFragment, null, null, NoMode);\n fiber.stateNode = dehydratedNode;\n return fiber;\n}\nfunction createFiberFromPortal(portal, mode, lanes) {\n var pendingProps = portal.children !== null ? portal.children : [];\n var fiber = createFiber(HostPortal, pendingProps, portal.key, mode);\n fiber.lanes = lanes;\n fiber.stateNode = {\n containerInfo: portal.containerInfo,\n pendingChildren: null,\n // Used by persistent updates\n implementation: portal.implementation\n };\n return fiber;\n}\n\nfunction FiberRootNode(containerInfo, // $FlowFixMe[missing-local-annot]\ntag, hydrate, identifierPrefix, onRecoverableError, formState) {\n this.tag = tag;\n this.containerInfo = containerInfo;\n this.pendingChildren = null;\n this.current = null;\n this.pingCache = null;\n this.finishedWork = null;\n this.timeoutHandle = noTimeout;\n this.cancelPendingCommit = null;\n this.context = null;\n this.pendingContext = null;\n this.next = null;\n this.callbackNode = null;\n this.callbackPriority = NoLane;\n this.expirationTimes = createLaneMap(NoTimestamp);\n this.pendingLanes = NoLanes;\n this.suspendedLanes = NoLanes;\n this.pingedLanes = NoLanes;\n this.expiredLanes = NoLanes;\n this.finishedLanes = NoLanes;\n this.errorRecoveryDisabledLanes = NoLanes;\n this.shellSuspendCounter = 0;\n this.entangledLanes = NoLanes;\n this.entanglements = createLaneMap(NoLanes);\n this.hiddenUpdates = createLaneMap(null);\n this.identifierPrefix = identifierPrefix;\n this.onRecoverableError = onRecoverableError;\n\n {\n this.pooledCache = null;\n this.pooledCacheLanes = NoLanes;\n }\n\n this.formState = formState;\n this.incompleteTransitions = new Map();\n\n {\n this.effectDuration = 0;\n this.passiveEffectDuration = 0;\n }\n\n {\n this.memoizedUpdaters = new Set();\n var pendingUpdatersLaneMap = this.pendingUpdatersLaneMap = [];\n\n for (var _i = 0; _i < TotalLanes; _i++) {\n pendingUpdatersLaneMap.push(new Set());\n }\n }\n\n {\n switch (tag) {\n case ConcurrentRoot:\n this._debugRootType = hydrate ? 'hydrateRoot()' : 'createRoot()';\n break;\n\n case LegacyRoot:\n this._debugRootType = hydrate ? 'hydrate()' : 'render()';\n break;\n }\n }\n}\n\nfunction createFiberRoot(containerInfo, tag, hydrate, initialChildren, hydrationCallbacks, isStrictMode, concurrentUpdatesByDefaultOverride, // TODO: We have several of these arguments that are conceptually part of the\n// host config, but because they are passed in at runtime, we have to thread\n// them through the root constructor. Perhaps we should put them all into a\n// single type, like a DynamicHostConfig that is defined by the renderer.\nidentifierPrefix, onRecoverableError, transitionCallbacks, formState) {\n // $FlowFixMe[invalid-constructor] Flow no longer supports calling new on functions\n var root = new FiberRootNode(containerInfo, tag, hydrate, identifierPrefix, onRecoverableError, formState);\n // stateNode is any.\n\n\n var uninitializedFiber = createHostRootFiber(tag, isStrictMode);\n root.current = uninitializedFiber;\n uninitializedFiber.stateNode = root;\n\n {\n var initialCache = createCache();\n retainCache(initialCache); // The pooledCache is a fresh cache instance that is used temporarily\n // for newly mounted boundaries during a render. In general, the\n // pooledCache is always cleared from the root at the end of a render:\n // it is either released when render commits, or moved to an Offscreen\n // component if rendering suspends. Because the lifetime of the pooled\n // cache is distinct from the main memoizedState.cache, it must be\n // retained separately.\n\n root.pooledCache = initialCache;\n retainCache(initialCache);\n var initialState = {\n element: initialChildren,\n isDehydrated: hydrate,\n cache: initialCache\n };\n uninitializedFiber.memoizedState = initialState;\n }\n\n initializeUpdateQueue(uninitializedFiber);\n return root;\n}\n\nvar ReactVersion = '18.3.0-canary-670811593-20240322';\n\nfunction createPortal$1(children, containerInfo, // TODO: figure out the API for cross-renderer implementation.\nimplementation) {\n var key = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;\n\n {\n checkKeyStringCoercion(key);\n }\n\n return {\n // This tag allow us to uniquely identify this as a React Portal\n $$typeof: REACT_PORTAL_TYPE,\n key: key == null ? null : '' + key,\n children: children,\n containerInfo: containerInfo,\n implementation: implementation\n };\n}\n\n// Might add PROFILE later.\n\nvar didWarnAboutNestedUpdates;\nvar didWarnAboutFindNodeInStrictMode;\n\n{\n didWarnAboutNestedUpdates = false;\n didWarnAboutFindNodeInStrictMode = {};\n}\n\nfunction getContextForSubtree(parentComponent) {\n if (!parentComponent) {\n return emptyContextObject;\n }\n\n var fiber = get(parentComponent);\n var parentContext = findCurrentUnmaskedContext(fiber);\n\n if (fiber.tag === ClassComponent) {\n var Component = fiber.type;\n\n if (isContextProvider(Component)) {\n return processChildContext(fiber, Component, parentContext);\n }\n }\n\n return parentContext;\n}\n\nfunction findHostInstanceWithWarning(component, methodName) {\n {\n var fiber = get(component);\n\n if (fiber === undefined) {\n if (typeof component.render === 'function') {\n throw new Error('Unable to find node on an unmounted component.');\n } else {\n var keys = Object.keys(component).join(',');\n throw new Error(\"Argument appears to not be a ReactComponent. Keys: \" + keys);\n }\n }\n\n var hostFiber = findCurrentHostFiber(fiber);\n\n if (hostFiber === null) {\n return null;\n }\n\n if (hostFiber.mode & StrictLegacyMode) {\n var componentName = getComponentNameFromFiber(fiber) || 'Component';\n\n if (!didWarnAboutFindNodeInStrictMode[componentName]) {\n didWarnAboutFindNodeInStrictMode[componentName] = true;\n var previousFiber = current;\n\n try {\n setCurrentFiber(hostFiber);\n\n if (fiber.mode & StrictLegacyMode) {\n error('%s is deprecated in StrictMode. ' + '%s was passed an instance of %s which is inside StrictMode. ' + 'Instead, add a ref directly to the element you want to reference. ' + 'Learn more about using refs safely here: ' + 'https://react.dev/link/strict-mode-find-node', methodName, methodName, componentName);\n } else {\n error('%s is deprecated in StrictMode. ' + '%s was passed an instance of %s which renders StrictMode children. ' + 'Instead, add a ref directly to the element you want to reference. ' + 'Learn more about using refs safely here: ' + 'https://react.dev/link/strict-mode-find-node', methodName, methodName, componentName);\n }\n } finally {\n // Ideally this should reset to previous but this shouldn't be called in\n // render and there's another warning for that anyway.\n if (previousFiber) {\n setCurrentFiber(previousFiber);\n } else {\n resetCurrentFiber();\n }\n }\n }\n }\n\n return getPublicInstance(hostFiber.stateNode);\n }\n}\n\nfunction createContainer(containerInfo, tag, hydrationCallbacks, isStrictMode, concurrentUpdatesByDefaultOverride, identifierPrefix, onRecoverableError, transitionCallbacks) {\n var hydrate = false;\n var initialChildren = null;\n return createFiberRoot(containerInfo, tag, hydrate, initialChildren, hydrationCallbacks, isStrictMode, concurrentUpdatesByDefaultOverride, identifierPrefix, onRecoverableError, transitionCallbacks, null);\n}\nfunction createHydrationContainer(initialChildren, // TODO: Remove `callback` when we delete legacy mode.\ncallback, containerInfo, tag, hydrationCallbacks, isStrictMode, concurrentUpdatesByDefaultOverride, identifierPrefix, onRecoverableError, transitionCallbacks, formState) {\n var hydrate = true;\n var root = createFiberRoot(containerInfo, tag, hydrate, initialChildren, hydrationCallbacks, isStrictMode, concurrentUpdatesByDefaultOverride, identifierPrefix, onRecoverableError, transitionCallbacks, formState); // TODO: Move this to FiberRoot constructor\n\n root.context = getContextForSubtree(null); // Schedule the initial render. In a hydration root, this is different from\n // a regular update because the initial render must match was was rendered\n // on the server.\n // NOTE: This update intentionally doesn't have a payload. We're only using\n // the update to schedule work on the root fiber (and, for legacy roots, to\n // enqueue the callback if one is provided).\n\n var current = root.current;\n var lane = requestUpdateLane(current);\n var update = createUpdate(lane);\n update.callback = callback !== undefined && callback !== null ? callback : null;\n enqueueUpdate(current, update, lane);\n scheduleInitialHydrationOnRoot(root, lane);\n return root;\n}\nfunction updateContainer(element, container, parentComponent, callback) {\n {\n onScheduleRoot(container, element);\n }\n\n var current$1 = container.current;\n var lane = requestUpdateLane(current$1);\n\n {\n markRenderScheduled(lane);\n }\n\n var context = getContextForSubtree(parentComponent);\n\n if (container.context === null) {\n container.context = context;\n } else {\n container.pendingContext = context;\n }\n\n {\n if (isRendering && current !== null && !didWarnAboutNestedUpdates) {\n didWarnAboutNestedUpdates = true;\n\n error('Render methods should be a pure function of props and state; ' + 'triggering nested component updates from render is not allowed. ' + 'If necessary, trigger nested updates in componentDidUpdate.\\n\\n' + 'Check the render method of %s.', getComponentNameFromFiber(current) || 'Unknown');\n }\n }\n\n var update = createUpdate(lane); // Caution: React DevTools currently depends on this property\n // being called \"element\".\n\n update.payload = {\n element: element\n };\n callback = callback === undefined ? null : callback;\n\n if (callback !== null) {\n {\n if (typeof callback !== 'function') {\n error('Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callback);\n }\n }\n\n update.callback = callback;\n }\n\n var root = enqueueUpdate(current$1, update, lane);\n\n if (root !== null) {\n scheduleUpdateOnFiber(root, current$1, lane);\n entangleTransitions(root, current$1, lane);\n }\n\n return lane;\n}\nfunction getPublicRootInstance(container) {\n var containerFiber = container.current;\n\n if (!containerFiber.child) {\n return null;\n }\n\n switch (containerFiber.child.tag) {\n case HostSingleton:\n case HostComponent:\n return getPublicInstance(containerFiber.child.stateNode);\n\n default:\n return containerFiber.child.stateNode;\n }\n}\nfunction attemptSynchronousHydration(fiber) {\n switch (fiber.tag) {\n case HostRoot:\n {\n var root = fiber.stateNode;\n\n if (isRootDehydrated(root)) {\n // Flush the first scheduled \"update\".\n var lanes = getHighestPriorityPendingLanes(root);\n flushRoot(root, lanes);\n }\n\n break;\n }\n\n case SuspenseComponent:\n {\n flushSync$1(function () {\n var root = enqueueConcurrentRenderForLane(fiber, SyncLane);\n\n if (root !== null) {\n scheduleUpdateOnFiber(root, fiber, SyncLane);\n }\n }); // If we're still blocked after this, we need to increase\n // the priority of any promises resolving within this\n // boundary so that they next attempt also has higher pri.\n\n var retryLane = SyncLane;\n markRetryLaneIfNotHydrated(fiber, retryLane);\n break;\n }\n }\n}\n\nfunction markRetryLaneImpl(fiber, retryLane) {\n var suspenseState = fiber.memoizedState;\n\n if (suspenseState !== null && suspenseState.dehydrated !== null) {\n suspenseState.retryLane = higherPriorityLane(suspenseState.retryLane, retryLane);\n }\n} // Increases the priority of thenables when they resolve within this boundary.\n\n\nfunction markRetryLaneIfNotHydrated(fiber, retryLane) {\n markRetryLaneImpl(fiber, retryLane);\n var alternate = fiber.alternate;\n\n if (alternate) {\n markRetryLaneImpl(alternate, retryLane);\n }\n}\n\nfunction attemptContinuousHydration(fiber) {\n if (fiber.tag !== SuspenseComponent) {\n // We ignore HostRoots here because we can't increase\n // their priority and they should not suspend on I/O,\n // since you have to wrap anything that might suspend in\n // Suspense.\n return;\n }\n\n var lane = SelectiveHydrationLane;\n var root = enqueueConcurrentRenderForLane(fiber, lane);\n\n if (root !== null) {\n scheduleUpdateOnFiber(root, fiber, lane);\n }\n\n markRetryLaneIfNotHydrated(fiber, lane);\n}\nfunction attemptHydrationAtCurrentPriority(fiber) {\n if (fiber.tag !== SuspenseComponent) {\n // We ignore HostRoots here because we can't increase\n // their priority other than synchronously flush it.\n return;\n }\n\n var lane = requestUpdateLane(fiber);\n var root = enqueueConcurrentRenderForLane(fiber, lane);\n\n if (root !== null) {\n scheduleUpdateOnFiber(root, fiber, lane);\n }\n\n markRetryLaneIfNotHydrated(fiber, lane);\n}\nfunction findHostInstanceWithNoPortals(fiber) {\n var hostFiber = findCurrentHostFiberWithNoPortals(fiber);\n\n if (hostFiber === null) {\n return null;\n }\n\n return getPublicInstance(hostFiber.stateNode);\n}\n\nvar shouldErrorImpl = function (fiber) {\n return null;\n};\n\nfunction shouldError(fiber) {\n return shouldErrorImpl(fiber);\n}\n\nvar shouldSuspendImpl = function (fiber) {\n return false;\n};\n\nfunction shouldSuspend(fiber) {\n return shouldSuspendImpl(fiber);\n}\nvar overrideHookState = null;\nvar overrideHookStateDeletePath = null;\nvar overrideHookStateRenamePath = null;\nvar overrideProps = null;\nvar overridePropsDeletePath = null;\nvar overridePropsRenamePath = null;\nvar scheduleUpdate = null;\nvar setErrorHandler = null;\nvar setSuspenseHandler = null;\n\n{\n var copyWithDeleteImpl = function (obj, path, index) {\n var key = path[index];\n var updated = isArray(obj) ? obj.slice() : assign({}, obj);\n\n if (index + 1 === path.length) {\n if (isArray(updated)) {\n updated.splice(key, 1);\n } else {\n delete updated[key];\n }\n\n return updated;\n } // $FlowFixMe[incompatible-use] number or string is fine here\n\n\n updated[key] = copyWithDeleteImpl(obj[key], path, index + 1);\n return updated;\n };\n\n var copyWithDelete = function (obj, path) {\n return copyWithDeleteImpl(obj, path, 0);\n };\n\n var copyWithRenameImpl = function (obj, oldPath, newPath, index) {\n var oldKey = oldPath[index];\n var updated = isArray(obj) ? obj.slice() : assign({}, obj);\n\n if (index + 1 === oldPath.length) {\n var newKey = newPath[index]; // $FlowFixMe[incompatible-use] number or string is fine here\n\n updated[newKey] = updated[oldKey];\n\n if (isArray(updated)) {\n updated.splice(oldKey, 1);\n } else {\n delete updated[oldKey];\n }\n } else {\n // $FlowFixMe[incompatible-use] number or string is fine here\n updated[oldKey] = copyWithRenameImpl( // $FlowFixMe[incompatible-use] number or string is fine here\n obj[oldKey], oldPath, newPath, index + 1);\n }\n\n return updated;\n };\n\n var copyWithRename = function (obj, oldPath, newPath) {\n if (oldPath.length !== newPath.length) {\n warn('copyWithRename() expects paths of the same length');\n\n return;\n } else {\n for (var i = 0; i < newPath.length - 1; i++) {\n if (oldPath[i] !== newPath[i]) {\n warn('copyWithRename() expects paths to be the same except for the deepest key');\n\n return;\n }\n }\n }\n\n return copyWithRenameImpl(obj, oldPath, newPath, 0);\n };\n\n var copyWithSetImpl = function (obj, path, index, value) {\n if (index >= path.length) {\n return value;\n }\n\n var key = path[index];\n var updated = isArray(obj) ? obj.slice() : assign({}, obj); // $FlowFixMe[incompatible-use] number or string is fine here\n\n updated[key] = copyWithSetImpl(obj[key], path, index + 1, value);\n return updated;\n };\n\n var copyWithSet = function (obj, path, value) {\n return copyWithSetImpl(obj, path, 0, value);\n };\n\n var findHook = function (fiber, id) {\n // For now, the \"id\" of stateful hooks is just the stateful hook index.\n // This may change in the future with e.g. nested hooks.\n var currentHook = fiber.memoizedState;\n\n while (currentHook !== null && id > 0) {\n currentHook = currentHook.next;\n id--;\n }\n\n return currentHook;\n }; // Support DevTools editable values for useState and useReducer.\n\n\n overrideHookState = function (fiber, id, path, value) {\n var hook = findHook(fiber, id);\n\n if (hook !== null) {\n var newState = copyWithSet(hook.memoizedState, path, value);\n hook.memoizedState = newState;\n hook.baseState = newState; // We aren't actually adding an update to the queue,\n // because there is no update we can add for useReducer hooks that won't trigger an error.\n // (There's no appropriate action type for DevTools overrides.)\n // As a result though, React will see the scheduled update as a noop and bailout.\n // Shallow cloning props works as a workaround for now to bypass the bailout check.\n\n fiber.memoizedProps = assign({}, fiber.memoizedProps);\n var root = enqueueConcurrentRenderForLane(fiber, SyncLane);\n\n if (root !== null) {\n scheduleUpdateOnFiber(root, fiber, SyncLane);\n }\n }\n };\n\n overrideHookStateDeletePath = function (fiber, id, path) {\n var hook = findHook(fiber, id);\n\n if (hook !== null) {\n var newState = copyWithDelete(hook.memoizedState, path);\n hook.memoizedState = newState;\n hook.baseState = newState; // We aren't actually adding an update to the queue,\n // because there is no update we can add for useReducer hooks that won't trigger an error.\n // (There's no appropriate action type for DevTools overrides.)\n // As a result though, React will see the scheduled update as a noop and bailout.\n // Shallow cloning props works as a workaround for now to bypass the bailout check.\n\n fiber.memoizedProps = assign({}, fiber.memoizedProps);\n var root = enqueueConcurrentRenderForLane(fiber, SyncLane);\n\n if (root !== null) {\n scheduleUpdateOnFiber(root, fiber, SyncLane);\n }\n }\n };\n\n overrideHookStateRenamePath = function (fiber, id, oldPath, newPath) {\n var hook = findHook(fiber, id);\n\n if (hook !== null) {\n var newState = copyWithRename(hook.memoizedState, oldPath, newPath);\n hook.memoizedState = newState;\n hook.baseState = newState; // We aren't actually adding an update to the queue,\n // because there is no update we can add for useReducer hooks that won't trigger an error.\n // (There's no appropriate action type for DevTools overrides.)\n // As a result though, React will see the scheduled update as a noop and bailout.\n // Shallow cloning props works as a workaround for now to bypass the bailout check.\n\n fiber.memoizedProps = assign({}, fiber.memoizedProps);\n var root = enqueueConcurrentRenderForLane(fiber, SyncLane);\n\n if (root !== null) {\n scheduleUpdateOnFiber(root, fiber, SyncLane);\n }\n }\n }; // Support DevTools props for function components, forwardRef, memo, host components, etc.\n\n\n overrideProps = function (fiber, path, value) {\n fiber.pendingProps = copyWithSet(fiber.memoizedProps, path, value);\n\n if (fiber.alternate) {\n fiber.alternate.pendingProps = fiber.pendingProps;\n }\n\n var root = enqueueConcurrentRenderForLane(fiber, SyncLane);\n\n if (root !== null) {\n scheduleUpdateOnFiber(root, fiber, SyncLane);\n }\n };\n\n overridePropsDeletePath = function (fiber, path) {\n fiber.pendingProps = copyWithDelete(fiber.memoizedProps, path);\n\n if (fiber.alternate) {\n fiber.alternate.pendingProps = fiber.pendingProps;\n }\n\n var root = enqueueConcurrentRenderForLane(fiber, SyncLane);\n\n if (root !== null) {\n scheduleUpdateOnFiber(root, fiber, SyncLane);\n }\n };\n\n overridePropsRenamePath = function (fiber, oldPath, newPath) {\n fiber.pendingProps = copyWithRename(fiber.memoizedProps, oldPath, newPath);\n\n if (fiber.alternate) {\n fiber.alternate.pendingProps = fiber.pendingProps;\n }\n\n var root = enqueueConcurrentRenderForLane(fiber, SyncLane);\n\n if (root !== null) {\n scheduleUpdateOnFiber(root, fiber, SyncLane);\n }\n };\n\n scheduleUpdate = function (fiber) {\n var root = enqueueConcurrentRenderForLane(fiber, SyncLane);\n\n if (root !== null) {\n scheduleUpdateOnFiber(root, fiber, SyncLane);\n }\n };\n\n setErrorHandler = function (newShouldErrorImpl) {\n shouldErrorImpl = newShouldErrorImpl;\n };\n\n setSuspenseHandler = function (newShouldSuspendImpl) {\n shouldSuspendImpl = newShouldSuspendImpl;\n };\n}\n\nfunction findHostInstanceByFiber(fiber) {\n var hostFiber = findCurrentHostFiber(fiber);\n\n if (hostFiber === null) {\n return null;\n }\n\n return hostFiber.stateNode;\n}\n\nfunction emptyFindFiberByHostInstance(instance) {\n return null;\n}\n\nfunction getCurrentFiberForDevTools() {\n return current;\n}\n\nfunction injectIntoDevTools(devToolsConfig) {\n var findFiberByHostInstance = devToolsConfig.findFiberByHostInstance;\n var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;\n return injectInternals({\n bundleType: devToolsConfig.bundleType,\n version: devToolsConfig.version,\n rendererPackageName: devToolsConfig.rendererPackageName,\n rendererConfig: devToolsConfig.rendererConfig,\n overrideHookState: overrideHookState,\n overrideHookStateDeletePath: overrideHookStateDeletePath,\n overrideHookStateRenamePath: overrideHookStateRenamePath,\n overrideProps: overrideProps,\n overridePropsDeletePath: overridePropsDeletePath,\n overridePropsRenamePath: overridePropsRenamePath,\n setErrorHandler: setErrorHandler,\n setSuspenseHandler: setSuspenseHandler,\n scheduleUpdate: scheduleUpdate,\n currentDispatcherRef: ReactCurrentDispatcher,\n findHostInstanceByFiber: findHostInstanceByFiber,\n findFiberByHostInstance: findFiberByHostInstance || emptyFindFiberByHostInstance,\n // React Refresh\n findHostInstancesForRefresh: findHostInstancesForRefresh ,\n scheduleRefresh: scheduleRefresh ,\n scheduleRoot: scheduleRoot ,\n setRefreshHandler: setRefreshHandler ,\n // Enables DevTools to append owner stacks to error messages in DEV mode.\n getCurrentFiber: getCurrentFiberForDevTools ,\n // Enables DevTools to detect reconciler version rather than renderer version\n // which may not match for third party renderers.\n reconcilerVersion: ReactVersion\n });\n}\n\n// the renderer. Such as when we're dispatching events or if third party\n// libraries need to call batchedUpdates. Eventually, this API will go away when\n// everything is batched by default. We'll then have a similar API to opt-out of\n// scheduled work and instead do synchronous work.\n\nvar isInsideEventHandler = false;\n\nfunction finishEventHandler() {\n // Here we wait until all updates have propagated, which is important\n // when using controlled components within layers:\n // https://github.com/facebook/react/issues/1698\n // Then we restore state of any controlled component.\n var controlledComponentsHavePendingUpdates = needsStateRestore();\n\n if (controlledComponentsHavePendingUpdates) {\n // If a controlled event was fired, we may need to restore the state of\n // the DOM node back to the controlled value. This is necessary when React\n // bails out of the update without touching the DOM.\n // TODO: Restore state in the microtask, after the discrete updates flush,\n // instead of early flushing them here.\n flushSync$1();\n restoreStateIfNeeded();\n }\n}\n\nfunction batchedUpdates(fn, a, b) {\n if (isInsideEventHandler) {\n // If we are currently inside another batch, we need to wait until it\n // fully completes before restoring state.\n return fn(a, b);\n }\n\n isInsideEventHandler = true;\n\n try {\n return batchedUpdates$1(fn, a, b);\n } finally {\n isInsideEventHandler = false;\n finishEventHandler();\n }\n} // TODO: Replace with flushSync\n\nfunction isInteractive(tag) {\n return tag === 'button' || tag === 'input' || tag === 'select' || tag === 'textarea';\n}\n\nfunction shouldPreventMouseEvent(name, type, props) {\n switch (name) {\n case 'onClick':\n case 'onClickCapture':\n case 'onDoubleClick':\n case 'onDoubleClickCapture':\n case 'onMouseDown':\n case 'onMouseDownCapture':\n case 'onMouseMove':\n case 'onMouseMoveCapture':\n case 'onMouseUp':\n case 'onMouseUpCapture':\n case 'onMouseEnter':\n return !!(props.disabled && isInteractive(type));\n\n default:\n return false;\n }\n}\n/**\n * @param {object} inst The instance, which is the source of events.\n * @param {string} registrationName Name of listener (e.g. `onClick`).\n * @return {?function} The stored callback.\n */\n\n\nfunction getListener(inst, registrationName) {\n var stateNode = inst.stateNode;\n\n if (stateNode === null) {\n // Work in progress (ex: onload events in incremental mode).\n return null;\n }\n\n var props = getFiberCurrentPropsFromNode(stateNode);\n\n if (props === null) {\n // Work in progress.\n return null;\n }\n\n var listener = props[registrationName];\n\n if (shouldPreventMouseEvent(registrationName, inst.type, props)) {\n return null;\n }\n\n if (listener && typeof listener !== 'function') {\n throw new Error(\"Expected `\" + registrationName + \"` listener to be a function, instead got a value of `\" + typeof listener + \"` type.\");\n }\n\n return listener;\n}\n\nvar passiveBrowserEventsSupported = false; // Check if browser support events with passive listeners\n// https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#Safely_detecting_option_support\n\nif (canUseDOM) {\n try {\n var options = {};\n Object.defineProperty(options, 'passive', {\n get: function () {\n passiveBrowserEventsSupported = true;\n }\n });\n window.addEventListener('test', options, options);\n window.removeEventListener('test', options, options);\n } catch (e) {\n passiveBrowserEventsSupported = false;\n }\n}\n\n/**\n * `charCode` represents the actual \"character code\" and is safe to use with\n * `String.fromCharCode`. As such, only keys that correspond to printable\n * characters produce a valid `charCode`, the only exception to this is Enter.\n * The Tab-key is considered non-printable and does not have a `charCode`,\n * presumably because it does not produce a tab-character in browsers.\n *\n * @param {object} nativeEvent Native browser event.\n * @return {number} Normalized `charCode` property.\n */\nfunction getEventCharCode(nativeEvent) {\n var charCode;\n var keyCode = nativeEvent.keyCode;\n\n if ('charCode' in nativeEvent) {\n charCode = nativeEvent.charCode; // FF does not set `charCode` for the Enter-key, check against `keyCode`.\n\n if (charCode === 0 && keyCode === 13) {\n charCode = 13;\n }\n } else {\n // IE8 does not implement `charCode`, but `keyCode` has the correct value.\n charCode = keyCode;\n } // IE and Edge (on Windows) and Chrome / Safari (on Windows and Linux)\n // report Enter as charCode 10 when ctrl is pressed.\n\n\n if (charCode === 10) {\n charCode = 13;\n } // Some non-printable keys are reported in `charCode`/`keyCode`, discard them.\n // Must not discard the (non-)printable Enter-key.\n\n\n if (charCode >= 32 || charCode === 13) {\n return charCode;\n }\n\n return 0;\n}\n\nfunction functionThatReturnsTrue() {\n return true;\n}\n\nfunction functionThatReturnsFalse() {\n return false;\n} // This is intentionally a factory so that we have different returned constructors.\n// If we had a single constructor, it would be megamorphic and engines would deopt.\n\n\nfunction createSyntheticEvent(Interface) {\n /**\n * Synthetic events are dispatched by event plugins, typically in response to a\n * top-level event delegation handler.\n *\n * These systems should generally use pooling to reduce the frequency of garbage\n * collection. The system should check `isPersistent` to determine whether the\n * event should be released into the pool after being dispatched. Users that\n * need a persisted event should invoke `persist`.\n *\n * Synthetic events (and subclasses) implement the DOM Level 3 Events API by\n * normalizing browser quirks. Subclasses do not necessarily have to implement a\n * DOM interface; custom application-specific events can also subclass this.\n */\n // $FlowFixMe[missing-this-annot]\n function SyntheticBaseEvent(reactName, reactEventType, targetInst, nativeEvent, nativeEventTarget) {\n this._reactName = reactName;\n this._targetInst = targetInst;\n this.type = reactEventType;\n this.nativeEvent = nativeEvent;\n this.target = nativeEventTarget;\n this.currentTarget = null;\n\n for (var propName in Interface) {\n if (!Interface.hasOwnProperty(propName)) {\n continue;\n }\n\n var normalize = Interface[propName];\n\n if (normalize) {\n this[propName] = normalize(nativeEvent);\n } else {\n this[propName] = nativeEvent[propName];\n }\n }\n\n var defaultPrevented = nativeEvent.defaultPrevented != null ? nativeEvent.defaultPrevented : nativeEvent.returnValue === false;\n\n if (defaultPrevented) {\n this.isDefaultPrevented = functionThatReturnsTrue;\n } else {\n this.isDefaultPrevented = functionThatReturnsFalse;\n }\n\n this.isPropagationStopped = functionThatReturnsFalse;\n return this;\n } // $FlowFixMe[prop-missing] found when upgrading Flow\n\n\n assign(SyntheticBaseEvent.prototype, {\n // $FlowFixMe[missing-this-annot]\n preventDefault: function () {\n this.defaultPrevented = true;\n var event = this.nativeEvent;\n\n if (!event) {\n return;\n }\n\n if (event.preventDefault) {\n event.preventDefault(); // $FlowFixMe[illegal-typeof] - flow is not aware of `unknown` in IE\n } else if (typeof event.returnValue !== 'unknown') {\n event.returnValue = false;\n }\n\n this.isDefaultPrevented = functionThatReturnsTrue;\n },\n // $FlowFixMe[missing-this-annot]\n stopPropagation: function () {\n var event = this.nativeEvent;\n\n if (!event) {\n return;\n }\n\n if (event.stopPropagation) {\n event.stopPropagation(); // $FlowFixMe[illegal-typeof] - flow is not aware of `unknown` in IE\n } else if (typeof event.cancelBubble !== 'unknown') {\n // The ChangeEventPlugin registers a \"propertychange\" event for\n // IE. This event does not support bubbling or cancelling, and\n // any references to cancelBubble throw \"Member not found\". A\n // typeof check of \"unknown\" circumvents this issue (and is also\n // IE specific).\n event.cancelBubble = true;\n }\n\n this.isPropagationStopped = functionThatReturnsTrue;\n },\n\n /**\n * We release all dispatched `SyntheticEvent`s after each event loop, adding\n * them back into the pool. This allows a way to hold onto a reference that\n * won't be added back into the pool.\n */\n persist: function () {// Modern event system doesn't use pooling.\n },\n\n /**\n * Checks if this event should be released back into the pool.\n *\n * @return {boolean} True if this should not be released, false otherwise.\n */\n isPersistent: functionThatReturnsTrue\n });\n return SyntheticBaseEvent;\n}\n/**\n * @interface Event\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\n\n\nvar EventInterface = {\n eventPhase: 0,\n bubbles: 0,\n cancelable: 0,\n timeStamp: function (event) {\n return event.timeStamp || Date.now();\n },\n defaultPrevented: 0,\n isTrusted: 0\n};\nvar SyntheticEvent = createSyntheticEvent(EventInterface);\n\nvar UIEventInterface = assign({}, EventInterface, {\n view: 0,\n detail: 0\n});\n\nvar SyntheticUIEvent = createSyntheticEvent(UIEventInterface);\nvar lastMovementX;\nvar lastMovementY;\nvar lastMouseEvent;\n\nfunction updateMouseMovementPolyfillState(event) {\n if (event !== lastMouseEvent) {\n if (lastMouseEvent && event.type === 'mousemove') {\n // $FlowFixMe[unsafe-arithmetic] assuming this is a number\n lastMovementX = event.screenX - lastMouseEvent.screenX; // $FlowFixMe[unsafe-arithmetic] assuming this is a number\n\n lastMovementY = event.screenY - lastMouseEvent.screenY;\n } else {\n lastMovementX = 0;\n lastMovementY = 0;\n }\n\n lastMouseEvent = event;\n }\n}\n/**\n * @interface MouseEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\n\n\nvar MouseEventInterface = assign({}, UIEventInterface, {\n screenX: 0,\n screenY: 0,\n clientX: 0,\n clientY: 0,\n pageX: 0,\n pageY: 0,\n ctrlKey: 0,\n shiftKey: 0,\n altKey: 0,\n metaKey: 0,\n getModifierState: getEventModifierState,\n button: 0,\n buttons: 0,\n relatedTarget: function (event) {\n if (event.relatedTarget === undefined) return event.fromElement === event.srcElement ? event.toElement : event.fromElement;\n return event.relatedTarget;\n },\n movementX: function (event) {\n if ('movementX' in event) {\n return event.movementX;\n }\n\n updateMouseMovementPolyfillState(event);\n return lastMovementX;\n },\n movementY: function (event) {\n if ('movementY' in event) {\n return event.movementY;\n } // Don't need to call updateMouseMovementPolyfillState() here\n // because it's guaranteed to have already run when movementX\n // was copied.\n\n\n return lastMovementY;\n }\n});\n\nvar SyntheticMouseEvent = createSyntheticEvent(MouseEventInterface);\n/**\n * @interface DragEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\n\nvar DragEventInterface = assign({}, MouseEventInterface, {\n dataTransfer: 0\n});\n\nvar SyntheticDragEvent = createSyntheticEvent(DragEventInterface);\n/**\n * @interface FocusEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\n\nvar FocusEventInterface = assign({}, UIEventInterface, {\n relatedTarget: 0\n});\n\nvar SyntheticFocusEvent = createSyntheticEvent(FocusEventInterface);\n/**\n * @interface Event\n * @see http://www.w3.org/TR/css3-animations/#AnimationEvent-interface\n * @see https://developer.mozilla.org/en-US/docs/Web/API/AnimationEvent\n */\n\nvar AnimationEventInterface = assign({}, EventInterface, {\n animationName: 0,\n elapsedTime: 0,\n pseudoElement: 0\n});\n\nvar SyntheticAnimationEvent = createSyntheticEvent(AnimationEventInterface);\n/**\n * @interface Event\n * @see http://www.w3.org/TR/clipboard-apis/\n */\n\nvar ClipboardEventInterface = assign({}, EventInterface, {\n clipboardData: function (event) {\n return 'clipboardData' in event ? event.clipboardData : window.clipboardData;\n }\n});\n\nvar SyntheticClipboardEvent = createSyntheticEvent(ClipboardEventInterface);\n/**\n * @interface Event\n * @see http://www.w3.org/TR/DOM-Level-3-Events/#events-compositionevents\n */\n\nvar CompositionEventInterface = assign({}, EventInterface, {\n data: 0\n});\n\nvar SyntheticCompositionEvent = createSyntheticEvent(CompositionEventInterface);\n/**\n * @interface Event\n * @see http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105\n * /#events-inputevents\n */\n// Happens to share the same list for now.\n\nvar SyntheticInputEvent = SyntheticCompositionEvent;\n/**\n * Normalization of deprecated HTML5 `key` values\n * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names\n */\n\nvar normalizeKey = {\n Esc: 'Escape',\n Spacebar: ' ',\n Left: 'ArrowLeft',\n Up: 'ArrowUp',\n Right: 'ArrowRight',\n Down: 'ArrowDown',\n Del: 'Delete',\n Win: 'OS',\n Menu: 'ContextMenu',\n Apps: 'ContextMenu',\n Scroll: 'ScrollLock',\n MozPrintableKey: 'Unidentified'\n};\n/**\n * Translation from legacy `keyCode` to HTML5 `key`\n * Only special keys supported, all others depend on keyboard layout or browser\n * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names\n */\n\nvar translateToKey = {\n '8': 'Backspace',\n '9': 'Tab',\n '12': 'Clear',\n '13': 'Enter',\n '16': 'Shift',\n '17': 'Control',\n '18': 'Alt',\n '19': 'Pause',\n '20': 'CapsLock',\n '27': 'Escape',\n '32': ' ',\n '33': 'PageUp',\n '34': 'PageDown',\n '35': 'End',\n '36': 'Home',\n '37': 'ArrowLeft',\n '38': 'ArrowUp',\n '39': 'ArrowRight',\n '40': 'ArrowDown',\n '45': 'Insert',\n '46': 'Delete',\n '112': 'F1',\n '113': 'F2',\n '114': 'F3',\n '115': 'F4',\n '116': 'F5',\n '117': 'F6',\n '118': 'F7',\n '119': 'F8',\n '120': 'F9',\n '121': 'F10',\n '122': 'F11',\n '123': 'F12',\n '144': 'NumLock',\n '145': 'ScrollLock',\n '224': 'Meta'\n};\n/**\n * @param {object} nativeEvent Native browser event.\n * @return {string} Normalized `key` property.\n */\n\nfunction getEventKey(nativeEvent) {\n if (nativeEvent.key) {\n // Normalize inconsistent values reported by browsers due to\n // implementations of a working draft specification.\n // FireFox implements `key` but returns `MozPrintableKey` for all\n // printable characters (normalized to `Unidentified`), ignore it.\n var key = // $FlowFixMe[invalid-computed-prop] unable to index with a `mixed` value\n normalizeKey[nativeEvent.key] || nativeEvent.key;\n\n if (key !== 'Unidentified') {\n return key;\n }\n } // Browser does not implement `key`, polyfill as much of it as we can.\n\n\n if (nativeEvent.type === 'keypress') {\n var charCode = getEventCharCode( // $FlowFixMe[incompatible-call] unable to narrow to `KeyboardEvent`\n nativeEvent); // The enter-key is technically both printable and non-printable and can\n // thus be captured by `keypress`, no other non-printable key should.\n\n return charCode === 13 ? 'Enter' : String.fromCharCode(charCode);\n }\n\n if (nativeEvent.type === 'keydown' || nativeEvent.type === 'keyup') {\n // While user keyboard layout determines the actual meaning of each\n // `keyCode` value, almost all function keys have a universal value.\n // $FlowFixMe[invalid-computed-prop] unable to index with a `mixed` value\n return translateToKey[nativeEvent.keyCode] || 'Unidentified';\n }\n\n return '';\n}\n/**\n * Translation from modifier key to the associated property in the event.\n * @see http://www.w3.org/TR/DOM-Level-3-Events/#keys-Modifiers\n */\n\n\nvar modifierKeyToProp = {\n Alt: 'altKey',\n Control: 'ctrlKey',\n Meta: 'metaKey',\n Shift: 'shiftKey'\n}; // Older browsers (Safari <= 10, iOS Safari <= 10.2) do not support\n// getModifierState. If getModifierState is not supported, we map it to a set of\n// modifier keys exposed by the event. In this case, Lock-keys are not supported.\n// $FlowFixMe[missing-local-annot]\n// $FlowFixMe[missing-this-annot]\n\nfunction modifierStateGetter(keyArg) {\n var syntheticEvent = this;\n var nativeEvent = syntheticEvent.nativeEvent;\n\n if (nativeEvent.getModifierState) {\n return nativeEvent.getModifierState(keyArg);\n }\n\n var keyProp = modifierKeyToProp[keyArg];\n return keyProp ? !!nativeEvent[keyProp] : false;\n}\n\nfunction getEventModifierState(nativeEvent) {\n return modifierStateGetter;\n}\n/**\n * @interface KeyboardEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\n\n\nvar KeyboardEventInterface = assign({}, UIEventInterface, {\n key: getEventKey,\n code: 0,\n location: 0,\n ctrlKey: 0,\n shiftKey: 0,\n altKey: 0,\n metaKey: 0,\n repeat: 0,\n locale: 0,\n getModifierState: getEventModifierState,\n // Legacy Interface\n charCode: function (event) {\n // `charCode` is the result of a KeyPress event and represents the value of\n // the actual printable character.\n // KeyPress is deprecated, but its replacement is not yet final and not\n // implemented in any major browser. Only KeyPress has charCode.\n if (event.type === 'keypress') {\n return getEventCharCode( // $FlowFixMe[incompatible-call] unable to narrow to `KeyboardEvent`\n event);\n }\n\n return 0;\n },\n keyCode: function (event) {\n // `keyCode` is the result of a KeyDown/Up event and represents the value of\n // physical keyboard key.\n // The actual meaning of the value depends on the users' keyboard layout\n // which cannot be detected. Assuming that it is a US keyboard layout\n // provides a surprisingly accurate mapping for US and European users.\n // Due to this, it is left to the user to implement at this time.\n if (event.type === 'keydown' || event.type === 'keyup') {\n return event.keyCode;\n }\n\n return 0;\n },\n which: function (event) {\n // `which` is an alias for either `keyCode` or `charCode` depending on the\n // type of the event.\n if (event.type === 'keypress') {\n return getEventCharCode( // $FlowFixMe[incompatible-call] unable to narrow to `KeyboardEvent`\n event);\n }\n\n if (event.type === 'keydown' || event.type === 'keyup') {\n return event.keyCode;\n }\n\n return 0;\n }\n});\n\nvar SyntheticKeyboardEvent = createSyntheticEvent(KeyboardEventInterface);\n/**\n * @interface PointerEvent\n * @see http://www.w3.org/TR/pointerevents/\n */\n\nvar PointerEventInterface = assign({}, MouseEventInterface, {\n pointerId: 0,\n width: 0,\n height: 0,\n pressure: 0,\n tangentialPressure: 0,\n tiltX: 0,\n tiltY: 0,\n twist: 0,\n pointerType: 0,\n isPrimary: 0\n});\n\nvar SyntheticPointerEvent = createSyntheticEvent(PointerEventInterface);\n/**\n * @interface TouchEvent\n * @see http://www.w3.org/TR/touch-events/\n */\n\nvar TouchEventInterface = assign({}, UIEventInterface, {\n touches: 0,\n targetTouches: 0,\n changedTouches: 0,\n altKey: 0,\n metaKey: 0,\n ctrlKey: 0,\n shiftKey: 0,\n getModifierState: getEventModifierState\n});\n\nvar SyntheticTouchEvent = createSyntheticEvent(TouchEventInterface);\n/**\n * @interface Event\n * @see http://www.w3.org/TR/2009/WD-css3-transitions-20090320/#transition-events-\n * @see https://developer.mozilla.org/en-US/docs/Web/API/TransitionEvent\n */\n\nvar TransitionEventInterface = assign({}, EventInterface, {\n propertyName: 0,\n elapsedTime: 0,\n pseudoElement: 0\n});\n\nvar SyntheticTransitionEvent = createSyntheticEvent(TransitionEventInterface);\n/**\n * @interface WheelEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\n\nvar WheelEventInterface = assign({}, MouseEventInterface, {\n deltaX: function (event) {\n return 'deltaX' in event ? event.deltaX : // Fallback to `wheelDeltaX` for Webkit and normalize (right is positive).\n 'wheelDeltaX' in event ? // $FlowFixMe[unsafe-arithmetic] assuming this is a number\n -event.wheelDeltaX : 0;\n },\n deltaY: function (event) {\n return 'deltaY' in event ? event.deltaY : // Fallback to `wheelDeltaY` for Webkit and normalize (down is positive).\n 'wheelDeltaY' in event ? // $FlowFixMe[unsafe-arithmetic] assuming this is a number\n -event.wheelDeltaY : // Fallback to `wheelDelta` for IE<9 and normalize (down is positive).\n 'wheelDelta' in event ? // $FlowFixMe[unsafe-arithmetic] assuming this is a number\n -event.wheelDelta : 0;\n },\n deltaZ: 0,\n // Browsers without \"deltaMode\" is reporting in raw wheel delta where one\n // notch on the scroll is always +/- 120, roughly equivalent to pixels.\n // A good approximation of DOM_DELTA_LINE (1) is 5% of viewport size or\n // ~40 pixels, for DOM_DELTA_SCREEN (2) it is 87.5% of viewport size.\n deltaMode: 0\n});\n\nvar SyntheticWheelEvent = createSyntheticEvent(WheelEventInterface);\n\n/**\n * This plugin invokes action functions on forms, inputs and buttons if\n * the form doesn't prevent default.\n */\n\nfunction extractEvents$6(dispatchQueue, domEventName, maybeTargetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {\n if (domEventName !== 'submit') {\n return;\n }\n\n if (!maybeTargetInst || maybeTargetInst.stateNode !== nativeEventTarget) {\n // If we're inside a parent root that itself is a parent of this root, then\n // its deepest target won't be the actual form that's being submitted.\n return;\n }\n\n var formInst = maybeTargetInst;\n var form = nativeEventTarget;\n var action = getFiberCurrentPropsFromNode(form).action;\n var submitter = nativeEvent.submitter;\n var submitterAction;\n\n if (submitter) {\n var submitterProps = getFiberCurrentPropsFromNode(submitter);\n submitterAction = submitterProps ? submitterProps.formAction : submitter.getAttribute('formAction');\n\n if (submitterAction != null) {\n // The submitter overrides the form action.\n action = submitterAction; // If the action is a function, we don't want to pass its name\n // value to the FormData since it's controlled by the server.\n\n submitter = null;\n }\n }\n\n if (typeof action !== 'function') {\n return;\n }\n\n var event = new SyntheticEvent('action', 'action', null, nativeEvent, nativeEventTarget);\n\n function submitForm() {\n if (nativeEvent.defaultPrevented) {\n // We let earlier events to prevent the action from submitting.\n return;\n } // Prevent native navigation.\n\n\n event.preventDefault();\n var formData;\n\n if (submitter) {\n // The submitter's value should be included in the FormData.\n // It should be in the document order in the form.\n // Since the FormData constructor invokes the formdata event it also\n // needs to be available before that happens so after construction it's too\n // late. We use a temporary fake node for the duration of this event.\n // TODO: FormData takes a second argument that it's the submitter but this\n // is fairly new so not all browsers support it yet. Switch to that technique\n // when available.\n var temp = submitter.ownerDocument.createElement('input');\n temp.name = submitter.name;\n temp.value = submitter.value;\n submitter.parentNode.insertBefore(temp, submitter);\n formData = new FormData(form);\n temp.parentNode.removeChild(temp);\n } else {\n formData = new FormData(form);\n }\n\n var pendingState = {\n pending: true,\n data: formData,\n method: form.method,\n action: action\n };\n\n {\n Object.freeze(pendingState);\n }\n\n startHostTransition(formInst, pendingState, action, formData);\n }\n\n dispatchQueue.push({\n event: event,\n listeners: [{\n instance: null,\n listener: submitForm,\n currentTarget: form\n }]\n });\n}\nfunction dispatchReplayedFormAction(formInst, form, action, formData) {\n var pendingState = {\n pending: true,\n data: formData,\n method: form.method,\n action: action\n };\n\n {\n Object.freeze(pendingState);\n }\n\n startHostTransition(formInst, pendingState, action, formData);\n}\n\n// has this definition built-in.\n\nvar hasScheduledReplayAttempt = false; // The last of each continuous event type. We only need to replay the last one\n// if the last target was dehydrated.\n\nvar queuedFocus = null;\nvar queuedDrag = null;\nvar queuedMouse = null; // For pointer events there can be one latest event per pointerId.\n\nvar queuedPointers = new Map();\nvar queuedPointerCaptures = new Map(); // We could consider replaying selectionchange and touchmoves too.\n\nvar queuedExplicitHydrationTargets = [];\nvar discreteReplayableEvents = ['mousedown', 'mouseup', 'touchcancel', 'touchend', 'touchstart', 'auxclick', 'dblclick', 'pointercancel', 'pointerdown', 'pointerup', 'dragend', 'dragstart', 'drop', 'compositionend', 'compositionstart', 'keydown', 'keypress', 'keyup', 'input', 'textInput', // Intentionally camelCase\n'copy', 'cut', 'paste', 'click', 'change', 'contextmenu', 'reset' // 'submit', // stopPropagation blocks the replay mechanism\n];\nfunction isDiscreteEventThatRequiresHydration(eventType) {\n return discreteReplayableEvents.indexOf(eventType) > -1;\n}\n\nfunction createQueuedReplayableEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent) {\n return {\n blockedOn: blockedOn,\n domEventName: domEventName,\n eventSystemFlags: eventSystemFlags,\n nativeEvent: nativeEvent,\n targetContainers: [targetContainer]\n };\n} // Resets the replaying for this type of continuous event to no event.\n\n\nfunction clearIfContinuousEvent(domEventName, nativeEvent) {\n switch (domEventName) {\n case 'focusin':\n case 'focusout':\n queuedFocus = null;\n break;\n\n case 'dragenter':\n case 'dragleave':\n queuedDrag = null;\n break;\n\n case 'mouseover':\n case 'mouseout':\n queuedMouse = null;\n break;\n\n case 'pointerover':\n case 'pointerout':\n {\n var pointerId = nativeEvent.pointerId;\n queuedPointers.delete(pointerId);\n break;\n }\n\n case 'gotpointercapture':\n case 'lostpointercapture':\n {\n var _pointerId = nativeEvent.pointerId;\n queuedPointerCaptures.delete(_pointerId);\n break;\n }\n }\n}\n\nfunction accumulateOrCreateContinuousQueuedReplayableEvent(existingQueuedEvent, blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent) {\n if (existingQueuedEvent === null || existingQueuedEvent.nativeEvent !== nativeEvent) {\n var queuedEvent = createQueuedReplayableEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent);\n\n if (blockedOn !== null) {\n var fiber = getInstanceFromNode(blockedOn);\n\n if (fiber !== null) {\n // Attempt to increase the priority of this target.\n attemptContinuousHydration(fiber);\n }\n }\n\n return queuedEvent;\n } // If we have already queued this exact event, then it's because\n // the different event systems have different DOM event listeners.\n // We can accumulate the flags, and the targetContainers, and\n // store a single event to be replayed.\n\n\n existingQueuedEvent.eventSystemFlags |= eventSystemFlags;\n var targetContainers = existingQueuedEvent.targetContainers;\n\n if (targetContainer !== null && targetContainers.indexOf(targetContainer) === -1) {\n targetContainers.push(targetContainer);\n }\n\n return existingQueuedEvent;\n}\n\nfunction queueIfContinuousEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent) {\n // These set relatedTarget to null because the replayed event will be treated as if we\n // moved from outside the window (no target) onto the target once it hydrates.\n // Instead of mutating we could clone the event.\n switch (domEventName) {\n case 'focusin':\n {\n var focusEvent = nativeEvent;\n queuedFocus = accumulateOrCreateContinuousQueuedReplayableEvent(queuedFocus, blockedOn, domEventName, eventSystemFlags, targetContainer, focusEvent);\n return true;\n }\n\n case 'dragenter':\n {\n var dragEvent = nativeEvent;\n queuedDrag = accumulateOrCreateContinuousQueuedReplayableEvent(queuedDrag, blockedOn, domEventName, eventSystemFlags, targetContainer, dragEvent);\n return true;\n }\n\n case 'mouseover':\n {\n var mouseEvent = nativeEvent;\n queuedMouse = accumulateOrCreateContinuousQueuedReplayableEvent(queuedMouse, blockedOn, domEventName, eventSystemFlags, targetContainer, mouseEvent);\n return true;\n }\n\n case 'pointerover':\n {\n var pointerEvent = nativeEvent;\n var pointerId = pointerEvent.pointerId;\n queuedPointers.set(pointerId, accumulateOrCreateContinuousQueuedReplayableEvent(queuedPointers.get(pointerId) || null, blockedOn, domEventName, eventSystemFlags, targetContainer, pointerEvent));\n return true;\n }\n\n case 'gotpointercapture':\n {\n var _pointerEvent = nativeEvent;\n var _pointerId2 = _pointerEvent.pointerId;\n queuedPointerCaptures.set(_pointerId2, accumulateOrCreateContinuousQueuedReplayableEvent(queuedPointerCaptures.get(_pointerId2) || null, blockedOn, domEventName, eventSystemFlags, targetContainer, _pointerEvent));\n return true;\n }\n }\n\n return false;\n} // Check if this target is unblocked. Returns true if it's unblocked.\n\nfunction attemptExplicitHydrationTarget(queuedTarget) {\n // TODO: This function shares a lot of logic with findInstanceBlockingEvent.\n // Try to unify them. It's a bit tricky since it would require two return\n // values.\n var targetInst = getClosestInstanceFromNode(queuedTarget.target);\n\n if (targetInst !== null) {\n var nearestMounted = getNearestMountedFiber(targetInst);\n\n if (nearestMounted !== null) {\n var tag = nearestMounted.tag;\n\n if (tag === SuspenseComponent) {\n var instance = getSuspenseInstanceFromFiber(nearestMounted);\n\n if (instance !== null) {\n // We're blocked on hydrating this boundary.\n // Increase its priority.\n queuedTarget.blockedOn = instance;\n runWithPriority(queuedTarget.priority, function () {\n attemptHydrationAtCurrentPriority(nearestMounted);\n });\n return;\n }\n } else if (tag === HostRoot) {\n var root = nearestMounted.stateNode;\n\n if (isRootDehydrated(root)) {\n queuedTarget.blockedOn = getContainerFromFiber(nearestMounted); // We don't currently have a way to increase the priority of\n // a root other than sync.\n\n return;\n }\n }\n }\n }\n\n queuedTarget.blockedOn = null;\n}\n\nfunction queueExplicitHydrationTarget(target) {\n // TODO: This will read the priority if it's dispatched by the React\n // event system but not native events. Should read window.event.type, like\n // we do for updates (getCurrentEventPriority).\n var updatePriority = getCurrentUpdatePriority();\n var queuedTarget = {\n blockedOn: null,\n target: target,\n priority: updatePriority\n };\n var i = 0;\n\n for (; i < queuedExplicitHydrationTargets.length; i++) {\n // Stop once we hit the first target with lower priority than\n if (!isHigherEventPriority(updatePriority, queuedExplicitHydrationTargets[i].priority)) {\n break;\n }\n }\n\n queuedExplicitHydrationTargets.splice(i, 0, queuedTarget);\n\n if (i === 0) {\n attemptExplicitHydrationTarget(queuedTarget);\n }\n}\n\nfunction attemptReplayContinuousQueuedEvent(queuedEvent) {\n if (queuedEvent.blockedOn !== null) {\n return false;\n }\n\n var targetContainers = queuedEvent.targetContainers;\n\n while (targetContainers.length > 0) {\n var nextBlockedOn = findInstanceBlockingEvent(queuedEvent.nativeEvent);\n\n if (nextBlockedOn === null) {\n var nativeEvent = queuedEvent.nativeEvent;\n var nativeEventClone = new nativeEvent.constructor(nativeEvent.type, nativeEvent);\n setReplayingEvent(nativeEventClone);\n nativeEvent.target.dispatchEvent(nativeEventClone);\n resetReplayingEvent();\n } else {\n // We're still blocked. Try again later.\n var fiber = getInstanceFromNode(nextBlockedOn);\n\n if (fiber !== null) {\n attemptContinuousHydration(fiber);\n }\n\n queuedEvent.blockedOn = nextBlockedOn;\n return false;\n } // This target container was successfully dispatched. Try the next.\n\n\n targetContainers.shift();\n }\n\n return true;\n}\n\nfunction attemptReplayContinuousQueuedEventInMap(queuedEvent, key, map) {\n if (attemptReplayContinuousQueuedEvent(queuedEvent)) {\n map.delete(key);\n }\n}\n\nfunction replayUnblockedEvents() {\n hasScheduledReplayAttempt = false; // Replay any continuous events.\n\n if (queuedFocus !== null && attemptReplayContinuousQueuedEvent(queuedFocus)) {\n queuedFocus = null;\n }\n\n if (queuedDrag !== null && attemptReplayContinuousQueuedEvent(queuedDrag)) {\n queuedDrag = null;\n }\n\n if (queuedMouse !== null && attemptReplayContinuousQueuedEvent(queuedMouse)) {\n queuedMouse = null;\n }\n\n queuedPointers.forEach(attemptReplayContinuousQueuedEventInMap);\n queuedPointerCaptures.forEach(attemptReplayContinuousQueuedEventInMap);\n}\n\nfunction scheduleCallbackIfUnblocked(queuedEvent, unblocked) {\n if (queuedEvent.blockedOn === unblocked) {\n queuedEvent.blockedOn = null;\n\n if (!hasScheduledReplayAttempt) {\n hasScheduledReplayAttempt = true; // Schedule a callback to attempt replaying as many events as are\n // now unblocked. This first might not actually be unblocked yet.\n // We could check it early to avoid scheduling an unnecessary callback.\n\n Scheduler.unstable_scheduleCallback(Scheduler.unstable_NormalPriority, replayUnblockedEvents);\n }\n }\n} // [form, submitter or action, formData...]\n\n\nvar lastScheduledReplayQueue = null;\n\nfunction replayUnblockedFormActions(formReplayingQueue) {\n if (lastScheduledReplayQueue === formReplayingQueue) {\n lastScheduledReplayQueue = null;\n }\n\n for (var i = 0; i < formReplayingQueue.length; i += 3) {\n var form = formReplayingQueue[i];\n var submitterOrAction = formReplayingQueue[i + 1];\n var formData = formReplayingQueue[i + 2];\n\n if (typeof submitterOrAction !== 'function') {\n // This action is not hydrated yet. This might be because it's blocked on\n // a different React instance or higher up our tree.\n var blockedOn = findInstanceBlockingTarget(submitterOrAction || form);\n\n if (blockedOn === null) {\n // We're not blocked but we don't have an action. This must mean that\n // this is in another React instance. We'll just skip past it.\n continue;\n } else {\n // We're blocked on something in this React instance. We'll retry later.\n break;\n }\n }\n\n var formInst = getInstanceFromNode(form);\n\n if (formInst !== null) {\n // This is part of our instance.\n // We're ready to replay this. Let's delete it from the queue.\n formReplayingQueue.splice(i, 3);\n i -= 3;\n dispatchReplayedFormAction(formInst, form, submitterOrAction, formData); // Continue without incrementing the index.\n\n continue;\n } // This form must've been part of a different React instance.\n // If we want to preserve ordering between React instances on the same root\n // we'd need some way for the other instance to ping us when it's done.\n // We'll just skip this and let the other instance execute it.\n\n }\n}\n\nfunction scheduleReplayQueueIfNeeded(formReplayingQueue) {\n // Schedule a callback to execute any unblocked form actions in.\n // We only keep track of the last queue which means that if multiple React oscillate\n // commits, we could schedule more callbacks than necessary but it's not a big deal\n // and we only really except one instance.\n if (lastScheduledReplayQueue !== formReplayingQueue) {\n lastScheduledReplayQueue = formReplayingQueue;\n Scheduler.unstable_scheduleCallback(Scheduler.unstable_NormalPriority, function () {\n return replayUnblockedFormActions(formReplayingQueue);\n });\n }\n}\n\nfunction retryIfBlockedOn(unblocked) {\n if (queuedFocus !== null) {\n scheduleCallbackIfUnblocked(queuedFocus, unblocked);\n }\n\n if (queuedDrag !== null) {\n scheduleCallbackIfUnblocked(queuedDrag, unblocked);\n }\n\n if (queuedMouse !== null) {\n scheduleCallbackIfUnblocked(queuedMouse, unblocked);\n }\n\n var unblock = function (queuedEvent) {\n return scheduleCallbackIfUnblocked(queuedEvent, unblocked);\n };\n\n queuedPointers.forEach(unblock);\n queuedPointerCaptures.forEach(unblock);\n\n for (var i = 0; i < queuedExplicitHydrationTargets.length; i++) {\n var queuedTarget = queuedExplicitHydrationTargets[i];\n\n if (queuedTarget.blockedOn === unblocked) {\n queuedTarget.blockedOn = null;\n }\n }\n\n while (queuedExplicitHydrationTargets.length > 0) {\n var nextExplicitTarget = queuedExplicitHydrationTargets[0];\n\n if (nextExplicitTarget.blockedOn !== null) {\n // We're still blocked.\n break;\n } else {\n attemptExplicitHydrationTarget(nextExplicitTarget);\n\n if (nextExplicitTarget.blockedOn === null) {\n // We're unblocked.\n queuedExplicitHydrationTargets.shift();\n }\n }\n }\n\n {\n // Check the document if there are any queued form actions.\n // If there's no ownerDocument, then this is the document.\n var root = unblocked.ownerDocument || unblocked;\n var formReplayingQueue = root.$$reactFormReplay;\n\n if (formReplayingQueue != null) {\n for (var _i = 0; _i < formReplayingQueue.length; _i += 3) {\n var form = formReplayingQueue[_i];\n var submitterOrAction = formReplayingQueue[_i + 1];\n var formProps = getFiberCurrentPropsFromNode(form);\n\n if (typeof submitterOrAction === 'function') {\n // This action has already resolved. We're just waiting to dispatch it.\n if (!formProps) {\n // This was not part of this React instance. It might have been recently\n // unblocking us from dispatching our events. So let's make sure we schedule\n // a retry.\n scheduleReplayQueueIfNeeded(formReplayingQueue);\n }\n\n continue;\n }\n\n var target = form;\n\n if (formProps) {\n // This form belongs to this React instance but the submitter might\n // not be done yet.\n var action = null;\n var submitter = submitterOrAction;\n\n if (submitter && submitter.hasAttribute('formAction')) {\n // The submitter is the one that is responsible for the action.\n target = submitter;\n var submitterProps = getFiberCurrentPropsFromNode(submitter);\n\n if (submitterProps) {\n // The submitter is part of this instance.\n action = submitterProps.formAction;\n } else {\n var blockedOn = findInstanceBlockingTarget(target);\n\n if (blockedOn !== null) {\n // The submitter is not hydrated yet. We'll wait for it.\n continue;\n } // The submitter must have been a part of a different React instance.\n // Except the form isn't. We don't dispatch actions in this scenario.\n\n }\n } else {\n action = formProps.action;\n }\n\n if (typeof action === 'function') {\n formReplayingQueue[_i + 1] = action;\n } else {\n // Something went wrong so let's just delete this action.\n formReplayingQueue.splice(_i, 3);\n _i -= 3;\n } // Schedule a replay in case this unblocked something.\n\n\n scheduleReplayQueueIfNeeded(formReplayingQueue);\n continue;\n } // Something above this target is still blocked so we can't continue yet.\n // We're not sure if this target is actually part of this React instance\n // yet. It could be a different React as a child but at least some parent is.\n // We must continue for any further queued actions.\n\n }\n }\n }\n}\n\nvar ReactCurrentBatchConfig = ReactSharedInternals.ReactCurrentBatchConfig; // TODO: can we stop exporting these?\n\nvar _enabled = true; // This is exported in FB builds for use by legacy FB layer infra.\n// We'd like to remove this but it's not clear if this is safe.\n\nfunction setEnabled(enabled) {\n _enabled = !!enabled;\n}\nfunction isEnabled() {\n return _enabled;\n}\nfunction createEventListenerWrapperWithPriority(targetContainer, domEventName, eventSystemFlags) {\n var eventPriority = getEventPriority(domEventName);\n var listenerWrapper;\n\n switch (eventPriority) {\n case DiscreteEventPriority:\n listenerWrapper = dispatchDiscreteEvent;\n break;\n\n case ContinuousEventPriority:\n listenerWrapper = dispatchContinuousEvent;\n break;\n\n case DefaultEventPriority:\n default:\n listenerWrapper = dispatchEvent;\n break;\n }\n\n return listenerWrapper.bind(null, domEventName, eventSystemFlags, targetContainer);\n}\n\nfunction dispatchDiscreteEvent(domEventName, eventSystemFlags, container, nativeEvent) {\n var previousPriority = getCurrentUpdatePriority();\n var prevTransition = ReactCurrentBatchConfig.transition;\n ReactCurrentBatchConfig.transition = null;\n\n try {\n setCurrentUpdatePriority(DiscreteEventPriority);\n dispatchEvent(domEventName, eventSystemFlags, container, nativeEvent);\n } finally {\n setCurrentUpdatePriority(previousPriority);\n ReactCurrentBatchConfig.transition = prevTransition;\n }\n}\n\nfunction dispatchContinuousEvent(domEventName, eventSystemFlags, container, nativeEvent) {\n var previousPriority = getCurrentUpdatePriority();\n var prevTransition = ReactCurrentBatchConfig.transition;\n ReactCurrentBatchConfig.transition = null;\n\n try {\n setCurrentUpdatePriority(ContinuousEventPriority);\n dispatchEvent(domEventName, eventSystemFlags, container, nativeEvent);\n } finally {\n setCurrentUpdatePriority(previousPriority);\n ReactCurrentBatchConfig.transition = prevTransition;\n }\n}\n\nfunction dispatchEvent(domEventName, eventSystemFlags, targetContainer, nativeEvent) {\n if (!_enabled) {\n return;\n }\n\n var blockedOn = findInstanceBlockingEvent(nativeEvent);\n\n if (blockedOn === null) {\n dispatchEventForPluginEventSystem(domEventName, eventSystemFlags, nativeEvent, return_targetInst, targetContainer);\n clearIfContinuousEvent(domEventName, nativeEvent);\n return;\n }\n\n if (queueIfContinuousEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent)) {\n nativeEvent.stopPropagation();\n return;\n } // We need to clear only if we didn't queue because\n // queueing is accumulative.\n\n\n clearIfContinuousEvent(domEventName, nativeEvent);\n\n if (eventSystemFlags & IS_CAPTURE_PHASE && isDiscreteEventThatRequiresHydration(domEventName)) {\n while (blockedOn !== null) {\n var fiber = getInstanceFromNode(blockedOn);\n\n if (fiber !== null) {\n attemptSynchronousHydration(fiber);\n }\n\n var nextBlockedOn = findInstanceBlockingEvent(nativeEvent);\n\n if (nextBlockedOn === null) {\n dispatchEventForPluginEventSystem(domEventName, eventSystemFlags, nativeEvent, return_targetInst, targetContainer);\n }\n\n if (nextBlockedOn === blockedOn) {\n break;\n }\n\n blockedOn = nextBlockedOn;\n }\n\n if (blockedOn !== null) {\n nativeEvent.stopPropagation();\n }\n\n return;\n } // This is not replayable so we'll invoke it but without a target,\n // in case the event system needs to trace it.\n\n\n dispatchEventForPluginEventSystem(domEventName, eventSystemFlags, nativeEvent, null, targetContainer);\n}\nfunction findInstanceBlockingEvent(nativeEvent) {\n var nativeEventTarget = getEventTarget(nativeEvent);\n return findInstanceBlockingTarget(nativeEventTarget);\n}\nvar return_targetInst = null; // Returns a SuspenseInstance or Container if it's blocked.\n// The return_targetInst field above is conceptually part of the return value.\n\nfunction findInstanceBlockingTarget(targetNode) {\n // TODO: Warn if _enabled is false.\n return_targetInst = null;\n var targetInst = getClosestInstanceFromNode(targetNode);\n\n if (targetInst !== null) {\n var nearestMounted = getNearestMountedFiber(targetInst);\n\n if (nearestMounted === null) {\n // This tree has been unmounted already. Dispatch without a target.\n targetInst = null;\n } else {\n var tag = nearestMounted.tag;\n\n if (tag === SuspenseComponent) {\n var instance = getSuspenseInstanceFromFiber(nearestMounted);\n\n if (instance !== null) {\n // Queue the event to be replayed later. Abort dispatching since we\n // don't want this event dispatched twice through the event system.\n // TODO: If this is the first discrete event in the queue. Schedule an increased\n // priority for this boundary.\n return instance;\n } // This shouldn't happen, something went wrong but to avoid blocking\n // the whole system, dispatch the event without a target.\n // TODO: Warn.\n\n\n targetInst = null;\n } else if (tag === HostRoot) {\n var root = nearestMounted.stateNode;\n\n if (isRootDehydrated(root)) {\n // If this happens during a replay something went wrong and it might block\n // the whole system.\n return getContainerFromFiber(nearestMounted);\n }\n\n targetInst = null;\n } else if (nearestMounted !== targetInst) {\n // If we get an event (ex: img onload) before committing that\n // component's mount, ignore it for now (that is, treat it as if it was an\n // event on a non-React tree). We might also consider queueing events and\n // dispatching them after the mount.\n targetInst = null;\n }\n }\n }\n\n return_targetInst = targetInst; // We're not blocked on anything.\n\n return null;\n}\nfunction getEventPriority(domEventName) {\n switch (domEventName) {\n // Used by SimpleEventPlugin:\n case 'cancel':\n case 'click':\n case 'close':\n case 'contextmenu':\n case 'copy':\n case 'cut':\n case 'auxclick':\n case 'dblclick':\n case 'dragend':\n case 'dragstart':\n case 'drop':\n case 'focusin':\n case 'focusout':\n case 'input':\n case 'invalid':\n case 'keydown':\n case 'keypress':\n case 'keyup':\n case 'mousedown':\n case 'mouseup':\n case 'paste':\n case 'pause':\n case 'play':\n case 'pointercancel':\n case 'pointerdown':\n case 'pointerup':\n case 'ratechange':\n case 'reset':\n case 'resize':\n case 'seeked':\n case 'submit':\n case 'touchcancel':\n case 'touchend':\n case 'touchstart':\n case 'volumechange': // Used by polyfills: (fall through)\n\n case 'change':\n case 'selectionchange':\n case 'textInput':\n case 'compositionstart':\n case 'compositionend':\n case 'compositionupdate': // Only enableCreateEventHandleAPI: (fall through)\n\n case 'beforeblur':\n case 'afterblur': // Not used by React but could be by user code: (fall through)\n\n case 'beforeinput':\n case 'blur':\n case 'fullscreenchange':\n case 'focus':\n case 'hashchange':\n case 'popstate':\n case 'select':\n case 'selectstart':\n return DiscreteEventPriority;\n\n case 'drag':\n case 'dragenter':\n case 'dragexit':\n case 'dragleave':\n case 'dragover':\n case 'mousemove':\n case 'mouseout':\n case 'mouseover':\n case 'pointermove':\n case 'pointerout':\n case 'pointerover':\n case 'scroll':\n case 'toggle':\n case 'touchmove':\n case 'wheel': // Not used by React but could be by user code: (fall through)\n\n case 'mouseenter':\n case 'mouseleave':\n case 'pointerenter':\n case 'pointerleave':\n return ContinuousEventPriority;\n\n case 'message':\n {\n // We might be in the Scheduler callback.\n // Eventually this mechanism will be replaced by a check\n // of the current priority on the native scheduler.\n var schedulerPriority = getCurrentPriorityLevel();\n\n switch (schedulerPriority) {\n case ImmediatePriority:\n return DiscreteEventPriority;\n\n case UserBlockingPriority:\n return ContinuousEventPriority;\n\n case NormalPriority$1:\n case LowPriority:\n // TODO: Handle LowSchedulerPriority, somehow. Maybe the same lane as hydration.\n return DefaultEventPriority;\n\n case IdlePriority:\n return IdleEventPriority;\n\n default:\n return DefaultEventPriority;\n }\n }\n\n default:\n return DefaultEventPriority;\n }\n}\n\nfunction addEventBubbleListener(target, eventType, listener) {\n target.addEventListener(eventType, listener, false);\n return listener;\n}\nfunction addEventCaptureListener(target, eventType, listener) {\n target.addEventListener(eventType, listener, true);\n return listener;\n}\nfunction addEventCaptureListenerWithPassiveFlag(target, eventType, listener, passive) {\n target.addEventListener(eventType, listener, {\n capture: true,\n passive: passive\n });\n return listener;\n}\nfunction addEventBubbleListenerWithPassiveFlag(target, eventType, listener, passive) {\n target.addEventListener(eventType, listener, {\n passive: passive\n });\n return listener;\n}\n\n/**\n * These variables store information about text content of a target node,\n * allowing comparison of content before and after a given event.\n *\n * Identify the node where selection currently begins, then observe\n * both its text content and its current position in the DOM. Since the\n * browser may natively replace the target node during composition, we can\n * use its position to find its replacement.\n *\n *\n */\nvar root = null;\nvar startText = null;\nvar fallbackText = null;\nfunction initialize(nativeEventTarget) {\n root = nativeEventTarget;\n startText = getText();\n return true;\n}\nfunction reset() {\n root = null;\n startText = null;\n fallbackText = null;\n}\nfunction getData() {\n if (fallbackText) {\n return fallbackText;\n }\n\n var start;\n var startValue = startText;\n var startLength = startValue.length;\n var end;\n var endValue = getText();\n var endLength = endValue.length;\n\n for (start = 0; start < startLength; start++) {\n if (startValue[start] !== endValue[start]) {\n break;\n }\n }\n\n var minEnd = startLength - start;\n\n for (end = 1; end <= minEnd; end++) {\n if (startValue[startLength - end] !== endValue[endLength - end]) {\n break;\n }\n }\n\n var sliceTail = end > 1 ? 1 - end : undefined;\n fallbackText = endValue.slice(start, sliceTail);\n return fallbackText;\n}\nfunction getText() {\n if ('value' in root) {\n return root.value;\n }\n\n return root.textContent;\n}\n\nvar END_KEYCODES = [9, 13, 27, 32]; // Tab, Return, Esc, Space\n\nvar START_KEYCODE = 229;\nvar canUseCompositionEvent = canUseDOM && 'CompositionEvent' in window;\nvar documentMode = null;\n\nif (canUseDOM && 'documentMode' in document) {\n documentMode = document.documentMode;\n} // Webkit offers a very useful `textInput` event that can be used to\n// directly represent `beforeInput`. The IE `textinput` event is not as\n// useful, so we don't use it.\n\n\nvar canUseTextInputEvent = canUseDOM && 'TextEvent' in window && !documentMode; // In IE9+, we have access to composition events, but the data supplied\n// by the native compositionend event may be incorrect. Japanese ideographic\n// spaces, for instance (\\u3000) are not recorded correctly.\n\nvar useFallbackCompositionData = canUseDOM && (!canUseCompositionEvent || documentMode && documentMode > 8 && documentMode <= 11);\nvar SPACEBAR_CODE = 32;\nvar SPACEBAR_CHAR = String.fromCharCode(SPACEBAR_CODE);\n\nfunction registerEvents$3() {\n registerTwoPhaseEvent('onBeforeInput', ['compositionend', 'keypress', 'textInput', 'paste']);\n registerTwoPhaseEvent('onCompositionEnd', ['compositionend', 'focusout', 'keydown', 'keypress', 'keyup', 'mousedown']);\n registerTwoPhaseEvent('onCompositionStart', ['compositionstart', 'focusout', 'keydown', 'keypress', 'keyup', 'mousedown']);\n registerTwoPhaseEvent('onCompositionUpdate', ['compositionupdate', 'focusout', 'keydown', 'keypress', 'keyup', 'mousedown']);\n} // Track whether we've ever handled a keypress on the space key.\n\n\nvar hasSpaceKeypress = false;\n/**\n * Return whether a native keypress event is assumed to be a command.\n * This is required because Firefox fires `keypress` events for key commands\n * (cut, copy, select-all, etc.) even though no character is inserted.\n */\n\nfunction isKeypressCommand(nativeEvent) {\n return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) && // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n !(nativeEvent.ctrlKey && nativeEvent.altKey);\n}\n/**\n * Translate native top level events into event types.\n */\n\n\nfunction getCompositionEventType(domEventName) {\n switch (domEventName) {\n case 'compositionstart':\n return 'onCompositionStart';\n\n case 'compositionend':\n return 'onCompositionEnd';\n\n case 'compositionupdate':\n return 'onCompositionUpdate';\n }\n}\n/**\n * Does our fallback best-guess model think this event signifies that\n * composition has begun?\n */\n\n\nfunction isFallbackCompositionStart(domEventName, nativeEvent) {\n return domEventName === 'keydown' && nativeEvent.keyCode === START_KEYCODE;\n}\n/**\n * Does our fallback mode think that this event is the end of composition?\n */\n\n\nfunction isFallbackCompositionEnd(domEventName, nativeEvent) {\n switch (domEventName) {\n case 'keyup':\n // Command keys insert or clear IME input.\n return END_KEYCODES.indexOf(nativeEvent.keyCode) !== -1;\n\n case 'keydown':\n // Expect IME keyCode on each keydown. If we get any other\n // code we must have exited earlier.\n return nativeEvent.keyCode !== START_KEYCODE;\n\n case 'keypress':\n case 'mousedown':\n case 'focusout':\n // Events are not possible without cancelling IME.\n return true;\n\n default:\n return false;\n }\n}\n/**\n * Google Input Tools provides composition data via a CustomEvent,\n * with the `data` property populated in the `detail` object. If this\n * is available on the event object, use it. If not, this is a plain\n * composition event and we have nothing special to extract.\n *\n * @param {object} nativeEvent\n * @return {?string}\n */\n\n\nfunction getDataFromCustomEvent(nativeEvent) {\n var detail = nativeEvent.detail;\n\n if (typeof detail === 'object' && 'data' in detail) {\n return detail.data;\n }\n\n return null;\n}\n/**\n * Check if a composition event was triggered by Korean IME.\n * Our fallback mode does not work well with IE's Korean IME,\n * so just use native composition events when Korean IME is used.\n * Although CompositionEvent.locale property is deprecated,\n * it is available in IE, where our fallback mode is enabled.\n *\n * @param {object} nativeEvent\n * @return {boolean}\n */\n\n\nfunction isUsingKoreanIME(nativeEvent) {\n return nativeEvent.locale === 'ko';\n} // Track the current IME composition status, if any.\n\n\nvar isComposing = false;\n/**\n * @return {?object} A SyntheticCompositionEvent.\n */\n\nfunction extractCompositionEvent(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget) {\n var eventType;\n var fallbackData;\n\n if (canUseCompositionEvent) {\n eventType = getCompositionEventType(domEventName);\n } else if (!isComposing) {\n if (isFallbackCompositionStart(domEventName, nativeEvent)) {\n eventType = 'onCompositionStart';\n }\n } else if (isFallbackCompositionEnd(domEventName, nativeEvent)) {\n eventType = 'onCompositionEnd';\n }\n\n if (!eventType) {\n return null;\n }\n\n if (useFallbackCompositionData && !isUsingKoreanIME(nativeEvent)) {\n // The current composition is stored statically and must not be\n // overwritten while composition continues.\n if (!isComposing && eventType === 'onCompositionStart') {\n isComposing = initialize(nativeEventTarget);\n } else if (eventType === 'onCompositionEnd') {\n if (isComposing) {\n fallbackData = getData();\n }\n }\n }\n\n var listeners = accumulateTwoPhaseListeners(targetInst, eventType);\n\n if (listeners.length > 0) {\n var event = new SyntheticCompositionEvent(eventType, domEventName, null, nativeEvent, nativeEventTarget);\n dispatchQueue.push({\n event: event,\n listeners: listeners\n });\n\n if (fallbackData) {\n // Inject data generated from fallback path into the synthetic event.\n // This matches the property of native CompositionEventInterface.\n // $FlowFixMe[incompatible-use]\n event.data = fallbackData;\n } else {\n var customData = getDataFromCustomEvent(nativeEvent);\n\n if (customData !== null) {\n // $FlowFixMe[incompatible-use]\n event.data = customData;\n }\n }\n }\n}\n\nfunction getNativeBeforeInputChars(domEventName, nativeEvent) {\n switch (domEventName) {\n case 'compositionend':\n return getDataFromCustomEvent(nativeEvent);\n\n case 'keypress':\n /**\n * If native `textInput` events are available, our goal is to make\n * use of them. However, there is a special case: the spacebar key.\n * In Webkit, preventing default on a spacebar `textInput` event\n * cancels character insertion, but it *also* causes the browser\n * to fall back to its default spacebar behavior of scrolling the\n * page.\n *\n * Tracking at:\n * https://code.google.com/p/chromium/issues/detail?id=355103\n *\n * To avoid this issue, use the keypress event as if no `textInput`\n * event is available.\n */\n var which = nativeEvent.which;\n\n if (which !== SPACEBAR_CODE) {\n return null;\n }\n\n hasSpaceKeypress = true;\n return SPACEBAR_CHAR;\n\n case 'textInput':\n // Record the characters to be added to the DOM.\n var chars = nativeEvent.data; // If it's a spacebar character, assume that we have already handled\n // it at the keypress level and bail immediately. Android Chrome\n // doesn't give us keycodes, so we need to ignore it.\n\n if (chars === SPACEBAR_CHAR && hasSpaceKeypress) {\n return null;\n }\n\n return chars;\n\n default:\n // For other native event types, do nothing.\n return null;\n }\n}\n/**\n * For browsers that do not provide the `textInput` event, extract the\n * appropriate string to use for SyntheticInputEvent.\n */\n\n\nfunction getFallbackBeforeInputChars(domEventName, nativeEvent) {\n // If we are currently composing (IME) and using a fallback to do so,\n // try to extract the composed characters from the fallback object.\n // If composition event is available, we extract a string only at\n // compositionevent, otherwise extract it at fallback events.\n if (isComposing) {\n if (domEventName === 'compositionend' || !canUseCompositionEvent && isFallbackCompositionEnd(domEventName, nativeEvent)) {\n var chars = getData();\n reset();\n isComposing = false;\n return chars;\n }\n\n return null;\n }\n\n switch (domEventName) {\n case 'paste':\n // If a paste event occurs after a keypress, throw out the input\n // chars. Paste events should not lead to BeforeInput events.\n return null;\n\n case 'keypress':\n /**\n * As of v27, Firefox may fire keypress events even when no character\n * will be inserted. A few possibilities:\n *\n * - `which` is `0`. Arrow keys, Esc key, etc.\n *\n * - `which` is the pressed key code, but no char is available.\n * Ex: 'AltGr + d` in Polish. There is no modified character for\n * this key combination and no character is inserted into the\n * document, but FF fires the keypress for char code `100` anyway.\n * No `input` event will occur.\n *\n * - `which` is the pressed key code, but a command combination is\n * being used. Ex: `Cmd+C`. No character is inserted, and no\n * `input` event will occur.\n */\n if (!isKeypressCommand(nativeEvent)) {\n // IE fires the `keypress` event when a user types an emoji via\n // Touch keyboard of Windows. In such a case, the `char` property\n // holds an emoji character like `\\uD83D\\uDE0A`. Because its length\n // is 2, the property `which` does not represent an emoji correctly.\n // In such a case, we directly return the `char` property instead of\n // using `which`.\n if (nativeEvent.char && nativeEvent.char.length > 1) {\n return nativeEvent.char;\n } else if (nativeEvent.which) {\n return String.fromCharCode(nativeEvent.which);\n }\n }\n\n return null;\n\n case 'compositionend':\n return useFallbackCompositionData && !isUsingKoreanIME(nativeEvent) ? null : nativeEvent.data;\n\n default:\n return null;\n }\n}\n/**\n * Extract a SyntheticInputEvent for `beforeInput`, based on either native\n * `textInput` or fallback behavior.\n *\n * @return {?object} A SyntheticInputEvent.\n */\n\n\nfunction extractBeforeInputEvent(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget) {\n var chars;\n\n if (canUseTextInputEvent) {\n chars = getNativeBeforeInputChars(domEventName, nativeEvent);\n } else {\n chars = getFallbackBeforeInputChars(domEventName, nativeEvent);\n } // If no characters are being inserted, no BeforeInput event should\n // be fired.\n\n\n if (!chars) {\n return null;\n }\n\n var listeners = accumulateTwoPhaseListeners(targetInst, 'onBeforeInput');\n\n if (listeners.length > 0) {\n var event = new SyntheticInputEvent('onBeforeInput', 'beforeinput', null, nativeEvent, nativeEventTarget);\n dispatchQueue.push({\n event: event,\n listeners: listeners\n }); // $FlowFixMe[incompatible-use]\n\n event.data = chars;\n }\n}\n/**\n * Create an `onBeforeInput` event to match\n * http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105/#events-inputevents.\n *\n * This event plugin is based on the native `textInput` event\n * available in Chrome, Safari, Opera, and IE. This event fires after\n * `onKeyPress` and `onCompositionEnd`, but before `onInput`.\n *\n * `beforeInput` is spec'd but not implemented in any browsers, and\n * the `input` event does not provide any useful information about what has\n * actually been added, contrary to the spec. Thus, `textInput` is the best\n * available event to identify the characters that have actually been inserted\n * into the target node.\n *\n * This plugin is also responsible for emitting `composition` events, thus\n * allowing us to share composition fallback code for both `beforeInput` and\n * `composition` event types.\n */\n\n\nfunction extractEvents$5(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {\n extractCompositionEvent(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);\n extractBeforeInputEvent(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);\n}\n\n/**\n * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary\n */\nvar supportedInputTypes = {\n color: true,\n date: true,\n datetime: true,\n 'datetime-local': true,\n email: true,\n month: true,\n number: true,\n password: true,\n range: true,\n search: true,\n tel: true,\n text: true,\n time: true,\n url: true,\n week: true\n};\n\nfunction isTextInputElement(elem) {\n var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();\n\n if (nodeName === 'input') {\n return !!supportedInputTypes[elem.type];\n }\n\n if (nodeName === 'textarea') {\n return true;\n }\n\n return false;\n}\n\n/**\n * Checks if an event is supported in the current execution environment.\n *\n * NOTE: This will not work correctly for non-generic events such as `change`,\n * `reset`, `load`, `error`, and `select`.\n *\n * Borrows from Modernizr.\n *\n * @param {string} eventNameSuffix Event name, e.g. \"click\".\n * @return {boolean} True if the event is supported.\n * @internal\n * @license Modernizr 3.0.0pre (Custom Build) | MIT\n */\n\nfunction isEventSupported(eventNameSuffix) {\n if (!canUseDOM) {\n return false;\n }\n\n var eventName = 'on' + eventNameSuffix;\n var isSupported = (eventName in document);\n\n if (!isSupported) {\n var element = document.createElement('div');\n element.setAttribute(eventName, 'return;');\n isSupported = typeof element[eventName] === 'function';\n }\n\n return isSupported;\n}\n\nfunction registerEvents$2() {\n registerTwoPhaseEvent('onChange', ['change', 'click', 'focusin', 'focusout', 'input', 'keydown', 'keyup', 'selectionchange']);\n}\n\nfunction createAndAccumulateChangeEvent(dispatchQueue, inst, nativeEvent, target) {\n // Flag this event loop as needing state restore.\n enqueueStateRestore(target);\n var listeners = accumulateTwoPhaseListeners(inst, 'onChange');\n\n if (listeners.length > 0) {\n var event = new SyntheticEvent('onChange', 'change', null, nativeEvent, target);\n dispatchQueue.push({\n event: event,\n listeners: listeners\n });\n }\n}\n/**\n * For IE shims\n */\n\n\nvar activeElement$1 = null;\nvar activeElementInst$1 = null;\n/**\n * SECTION: handle `change` event\n */\n\nfunction shouldUseChangeEvent(elem) {\n var nodeName = elem.nodeName && elem.nodeName.toLowerCase();\n return nodeName === 'select' || nodeName === 'input' && elem.type === 'file';\n}\n\nfunction manualDispatchChangeEvent(nativeEvent) {\n var dispatchQueue = [];\n createAndAccumulateChangeEvent(dispatchQueue, activeElementInst$1, nativeEvent, getEventTarget(nativeEvent)); // If change and propertychange bubbled, we'd just bind to it like all the\n // other events and have it go through ReactBrowserEventEmitter. Since it\n // doesn't, we manually listen for the events and so we have to enqueue and\n // process the abstract event manually.\n //\n // Batching is necessary here in order to ensure that all event handlers run\n // before the next rerender (including event handlers attached to ancestor\n // elements instead of directly on the input). Without this, controlled\n // components don't work properly in conjunction with event bubbling because\n // the component is rerendered and the value reverted before all the event\n // handlers can run. See https://github.com/facebook/react/issues/708.\n\n batchedUpdates(runEventInBatch, dispatchQueue);\n}\n\nfunction runEventInBatch(dispatchQueue) {\n processDispatchQueue(dispatchQueue, 0);\n}\n\nfunction getInstIfValueChanged(targetInst) {\n var targetNode = getNodeFromInstance(targetInst);\n\n if (updateValueIfChanged(targetNode)) {\n return targetInst;\n }\n}\n\nfunction getTargetInstForChangeEvent(domEventName, targetInst) {\n if (domEventName === 'change') {\n return targetInst;\n }\n}\n/**\n * SECTION: handle `input` event\n */\n\n\nvar isInputEventSupported = false;\n\nif (canUseDOM) {\n // IE9 claims to support the input event but fails to trigger it when\n // deleting text, so we ignore its input events.\n isInputEventSupported = isEventSupported('input') && (!document.documentMode || document.documentMode > 9);\n}\n/**\n * (For IE <=9) Starts tracking propertychange events on the passed-in element\n * and override the value property so that we can distinguish user events from\n * value changes in JS.\n */\n\n\nfunction startWatchingForValueChange(target, targetInst) {\n activeElement$1 = target;\n activeElementInst$1 = targetInst;\n activeElement$1.attachEvent('onpropertychange', handlePropertyChange);\n}\n/**\n * (For IE <=9) Removes the event listeners from the currently-tracked element,\n * if any exists.\n */\n\n\nfunction stopWatchingForValueChange() {\n if (!activeElement$1) {\n return;\n }\n\n activeElement$1.detachEvent('onpropertychange', handlePropertyChange);\n activeElement$1 = null;\n activeElementInst$1 = null;\n}\n/**\n * (For IE <=9) Handles a propertychange event, sending a `change` event if\n * the value of the active element has changed.\n */\n// $FlowFixMe[missing-local-annot]\n\n\nfunction handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n\n if (getInstIfValueChanged(activeElementInst$1)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n}\n\nfunction handleEventsForInputEventPolyfill(domEventName, target, targetInst) {\n if (domEventName === 'focusin') {\n // In IE9, propertychange fires for most input events but is buggy and\n // doesn't fire when text is deleted, but conveniently, selectionchange\n // appears to fire in all of the remaining cases so we catch those and\n // forward the event if the value has changed\n // In either case, we don't want to call the event handler if the value\n // is changed from JS so we redefine a setter for `.value` that updates\n // our activeElementValue variable, allowing us to ignore those changes\n //\n // stopWatching() should be a noop here but we call it just in case we\n // missed a blur event somehow.\n stopWatchingForValueChange();\n startWatchingForValueChange(target, targetInst);\n } else if (domEventName === 'focusout') {\n stopWatchingForValueChange();\n }\n} // For IE8 and IE9.\n\n\nfunction getTargetInstForInputEventPolyfill(domEventName, targetInst) {\n if (domEventName === 'selectionchange' || domEventName === 'keyup' || domEventName === 'keydown') {\n // On the selectionchange event, the target is just document which isn't\n // helpful for us so just check activeElement instead.\n //\n // 99% of the time, keydown and keyup aren't necessary. IE8 fails to fire\n // propertychange on the first input event after setting `value` from a\n // script and fires only keydown, keypress, keyup. Catching keyup usually\n // gets it and catching keydown lets us fire an event for the first\n // keystroke if user does a key repeat (it'll be a little delayed: right\n // before the second keystroke). Other input methods (e.g., paste) seem to\n // fire selectionchange normally.\n return getInstIfValueChanged(activeElementInst$1);\n }\n}\n/**\n * SECTION: handle `click` event\n */\n\n\nfunction shouldUseClickEvent(elem) {\n // Use the `click` event to detect changes to checkbox and radio inputs.\n // This approach works across all browsers, whereas `change` does not fire\n // until `blur` in IE8.\n var nodeName = elem.nodeName;\n return nodeName && nodeName.toLowerCase() === 'input' && (elem.type === 'checkbox' || elem.type === 'radio');\n}\n\nfunction getTargetInstForClickEvent(domEventName, targetInst) {\n if (domEventName === 'click') {\n return getInstIfValueChanged(targetInst);\n }\n}\n\nfunction getTargetInstForInputOrChangeEvent(domEventName, targetInst) {\n if (domEventName === 'input' || domEventName === 'change') {\n return getInstIfValueChanged(targetInst);\n }\n}\n\nfunction handleControlledInputBlur(node, props) {\n if (node.type !== 'number') {\n return;\n }\n\n {\n var isControlled = props.value != null;\n\n if (isControlled) {\n // If controlled, assign the value attribute to the current value on blur\n setDefaultValue(node, 'number', node.value);\n }\n }\n}\n/**\n * This plugin creates an `onChange` event that normalizes change events\n * across form elements. This event fires at a time when it's possible to\n * change the element's value without seeing a flicker.\n *\n * Supported elements are:\n * - input (see `isTextInputElement`)\n * - textarea\n * - select\n */\n\n\nfunction extractEvents$4(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {\n var targetNode = targetInst ? getNodeFromInstance(targetInst) : window;\n var getTargetInstFunc, handleEventFunc;\n\n if (shouldUseChangeEvent(targetNode)) {\n getTargetInstFunc = getTargetInstForChangeEvent;\n } else if (isTextInputElement(targetNode)) {\n if (isInputEventSupported) {\n getTargetInstFunc = getTargetInstForInputOrChangeEvent;\n } else {\n getTargetInstFunc = getTargetInstForInputEventPolyfill;\n handleEventFunc = handleEventsForInputEventPolyfill;\n }\n } else if (shouldUseClickEvent(targetNode)) {\n getTargetInstFunc = getTargetInstForClickEvent;\n } else ;\n\n if (getTargetInstFunc) {\n var inst = getTargetInstFunc(domEventName, targetInst);\n\n if (inst) {\n createAndAccumulateChangeEvent(dispatchQueue, inst, nativeEvent, nativeEventTarget);\n return;\n }\n }\n\n if (handleEventFunc) {\n handleEventFunc(domEventName, targetNode, targetInst);\n } // When blurring, set the value attribute for number inputs\n\n\n if (domEventName === 'focusout' && targetInst) {\n // These props aren't necessarily the most current but we warn for changing\n // between controlled and uncontrolled, so it doesn't matter and the previous\n // code was also broken for changes.\n var props = targetInst.memoizedProps;\n handleControlledInputBlur(targetNode, props);\n }\n}\n\nfunction registerEvents$1() {\n registerDirectEvent('onMouseEnter', ['mouseout', 'mouseover']);\n registerDirectEvent('onMouseLeave', ['mouseout', 'mouseover']);\n registerDirectEvent('onPointerEnter', ['pointerout', 'pointerover']);\n registerDirectEvent('onPointerLeave', ['pointerout', 'pointerover']);\n}\n/**\n * For almost every interaction we care about, there will be both a top-level\n * `mouseover` and `mouseout` event that occurs. Only use `mouseout` so that\n * we do not extract duplicate events. However, moving the mouse into the\n * browser from outside will not fire a `mouseout` event. In this case, we use\n * the `mouseover` top-level event.\n */\n\n\nfunction extractEvents$3(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {\n var isOverEvent = domEventName === 'mouseover' || domEventName === 'pointerover';\n var isOutEvent = domEventName === 'mouseout' || domEventName === 'pointerout';\n\n if (isOverEvent && !isReplayingEvent(nativeEvent)) {\n // If this is an over event with a target, we might have already dispatched\n // the event in the out event of the other target. If this is replayed,\n // then it's because we couldn't dispatch against this target previously\n // so we have to do it now instead.\n var related = nativeEvent.relatedTarget || nativeEvent.fromElement;\n\n if (related) {\n // If the related node is managed by React, we can assume that we have\n // already dispatched the corresponding events during its mouseout.\n if (getClosestInstanceFromNode(related) || isContainerMarkedAsRoot(related)) {\n return;\n }\n }\n }\n\n if (!isOutEvent && !isOverEvent) {\n // Must not be a mouse or pointer in or out - ignoring.\n return;\n }\n\n var win; // TODO: why is this nullable in the types but we read from it?\n\n if (nativeEventTarget.window === nativeEventTarget) {\n // `nativeEventTarget` is probably a window object.\n win = nativeEventTarget;\n } else {\n // TODO: Figure out why `ownerDocument` is sometimes undefined in IE8.\n var doc = nativeEventTarget.ownerDocument;\n\n if (doc) {\n win = doc.defaultView || doc.parentWindow;\n } else {\n win = window;\n }\n }\n\n var from;\n var to;\n\n if (isOutEvent) {\n var _related = nativeEvent.relatedTarget || nativeEvent.toElement;\n\n from = targetInst;\n to = _related ? getClosestInstanceFromNode(_related) : null;\n\n if (to !== null) {\n var nearestMounted = getNearestMountedFiber(to);\n var tag = to.tag;\n\n if (to !== nearestMounted || tag !== HostComponent && tag !== HostSingleton && tag !== HostText) {\n to = null;\n }\n }\n } else {\n // Moving to a node from outside the window.\n from = null;\n to = targetInst;\n }\n\n if (from === to) {\n // Nothing pertains to our managed components.\n return;\n }\n\n var SyntheticEventCtor = SyntheticMouseEvent;\n var leaveEventType = 'onMouseLeave';\n var enterEventType = 'onMouseEnter';\n var eventTypePrefix = 'mouse';\n\n if (domEventName === 'pointerout' || domEventName === 'pointerover') {\n SyntheticEventCtor = SyntheticPointerEvent;\n leaveEventType = 'onPointerLeave';\n enterEventType = 'onPointerEnter';\n eventTypePrefix = 'pointer';\n }\n\n var fromNode = from == null ? win : getNodeFromInstance(from);\n var toNode = to == null ? win : getNodeFromInstance(to);\n var leave = new SyntheticEventCtor(leaveEventType, eventTypePrefix + 'leave', from, nativeEvent, nativeEventTarget);\n leave.target = fromNode;\n leave.relatedTarget = toNode;\n var enter = null; // We should only process this nativeEvent if we are processing\n // the first ancestor. Next time, we will ignore the event.\n\n var nativeTargetInst = getClosestInstanceFromNode(nativeEventTarget);\n\n if (nativeTargetInst === targetInst) {\n var enterEvent = new SyntheticEventCtor(enterEventType, eventTypePrefix + 'enter', to, nativeEvent, nativeEventTarget);\n enterEvent.target = toNode;\n enterEvent.relatedTarget = fromNode;\n enter = enterEvent;\n }\n\n accumulateEnterLeaveTwoPhaseListeners(dispatchQueue, leave, enter, from, to);\n}\n\n/**\n * Given any node return the first leaf node without children.\n *\n * @param {DOMElement|DOMTextNode} node\n * @return {DOMElement|DOMTextNode}\n */\n\nfunction getLeafNode(node) {\n while (node && node.firstChild) {\n node = node.firstChild;\n }\n\n return node;\n}\n/**\n * Get the next sibling within a container. This will walk up the\n * DOM if a node's siblings have been exhausted.\n *\n * @param {DOMElement|DOMTextNode} node\n * @return {?DOMElement|DOMTextNode}\n */\n\n\nfunction getSiblingNode(node) {\n while (node) {\n if (node.nextSibling) {\n return node.nextSibling;\n }\n\n node = node.parentNode;\n }\n}\n/**\n * Get object describing the nodes which contain characters at offset.\n *\n * @param {DOMElement|DOMTextNode} root\n * @param {number} offset\n * @return {?object}\n */\n\n\nfunction getNodeForCharacterOffset(root, offset) {\n var node = getLeafNode(root);\n var nodeStart = 0;\n var nodeEnd = 0;\n\n while (node) {\n if (node.nodeType === TEXT_NODE) {\n nodeEnd = nodeStart + node.textContent.length;\n\n if (nodeStart <= offset && nodeEnd >= offset) {\n return {\n node: node,\n offset: offset - nodeStart\n };\n }\n\n nodeStart = nodeEnd;\n }\n\n node = getLeafNode(getSiblingNode(node));\n }\n}\n\n/**\n * @param {DOMElement} outerNode\n * @return {?object}\n */\n\nfunction getOffsets(outerNode) {\n var ownerDocument = outerNode.ownerDocument;\n var win = ownerDocument && ownerDocument.defaultView || window;\n var selection = win.getSelection && win.getSelection();\n\n if (!selection || selection.rangeCount === 0) {\n return null;\n }\n\n var anchorNode = selection.anchorNode,\n anchorOffset = selection.anchorOffset,\n focusNode = selection.focusNode,\n focusOffset = selection.focusOffset; // In Firefox, anchorNode and focusNode can be \"anonymous divs\", e.g. the\n // up/down buttons on an <input type=\"number\">. Anonymous divs do not seem to\n // expose properties, triggering a \"Permission denied error\" if any of its\n // properties are accessed. The only seemingly possible way to avoid erroring\n // is to access a property that typically works for non-anonymous divs and\n // catch any error that may otherwise arise. See\n // https://bugzilla.mozilla.org/show_bug.cgi?id=208427\n\n try {\n /* eslint-disable ft-flow/no-unused-expressions */\n anchorNode.nodeType;\n focusNode.nodeType;\n /* eslint-enable ft-flow/no-unused-expressions */\n } catch (e) {\n return null;\n }\n\n return getModernOffsetsFromPoints(outerNode, anchorNode, anchorOffset, focusNode, focusOffset);\n}\n/**\n * Returns {start, end} where `start` is the character/codepoint index of\n * (anchorNode, anchorOffset) within the textContent of `outerNode`, and\n * `end` is the index of (focusNode, focusOffset).\n *\n * Returns null if you pass in garbage input but we should probably just crash.\n *\n * Exported only for testing.\n */\n\nfunction getModernOffsetsFromPoints(outerNode, anchorNode, anchorOffset, focusNode, focusOffset) {\n var length = 0;\n var start = -1;\n var end = -1;\n var indexWithinAnchor = 0;\n var indexWithinFocus = 0;\n var node = outerNode;\n var parentNode = null;\n\n outer: while (true) {\n var next = null;\n\n while (true) {\n if (node === anchorNode && (anchorOffset === 0 || node.nodeType === TEXT_NODE)) {\n start = length + anchorOffset;\n }\n\n if (node === focusNode && (focusOffset === 0 || node.nodeType === TEXT_NODE)) {\n end = length + focusOffset;\n }\n\n if (node.nodeType === TEXT_NODE) {\n length += node.nodeValue.length;\n }\n\n if ((next = node.firstChild) === null) {\n break;\n } // Moving from `node` to its first child `next`.\n\n\n parentNode = node;\n node = next;\n }\n\n while (true) {\n if (node === outerNode) {\n // If `outerNode` has children, this is always the second time visiting\n // it. If it has no children, this is still the first loop, and the only\n // valid selection is anchorNode and focusNode both equal to this node\n // and both offsets 0, in which case we will have handled above.\n break outer;\n }\n\n if (parentNode === anchorNode && ++indexWithinAnchor === anchorOffset) {\n start = length;\n }\n\n if (parentNode === focusNode && ++indexWithinFocus === focusOffset) {\n end = length;\n }\n\n if ((next = node.nextSibling) !== null) {\n break;\n }\n\n node = parentNode;\n parentNode = node.parentNode;\n } // Moving from `node` to its next sibling `next`.\n\n\n node = next;\n }\n\n if (start === -1 || end === -1) {\n // This should never happen. (Would happen if the anchor/focus nodes aren't\n // actually inside the passed-in node.)\n return null;\n }\n\n return {\n start: start,\n end: end\n };\n}\n/**\n * In modern non-IE browsers, we can support both forward and backward\n * selections.\n *\n * Note: IE10+ supports the Selection object, but it does not support\n * the `extend` method, which means that even in modern IE, it's not possible\n * to programmatically create a backward selection. Thus, for all IE\n * versions, we use the old IE API to create our selections.\n *\n * @param {DOMElement|DOMTextNode} node\n * @param {object} offsets\n */\n\nfunction setOffsets(node, offsets) {\n var doc = node.ownerDocument || document;\n var win = doc && doc.defaultView || window; // Edge fails with \"Object expected\" in some scenarios.\n // (For instance: TinyMCE editor used in a list component that supports pasting to add more,\n // fails when pasting 100+ items)\n\n if (!win.getSelection) {\n return;\n }\n\n var selection = win.getSelection();\n var length = node.textContent.length;\n var start = Math.min(offsets.start, length);\n var end = offsets.end === undefined ? start : Math.min(offsets.end, length); // IE 11 uses modern selection, but doesn't support the extend method.\n // Flip backward selections, so we can set with a single range.\n\n if (!selection.extend && start > end) {\n var temp = end;\n end = start;\n start = temp;\n }\n\n var startMarker = getNodeForCharacterOffset(node, start);\n var endMarker = getNodeForCharacterOffset(node, end);\n\n if (startMarker && endMarker) {\n if (selection.rangeCount === 1 && selection.anchorNode === startMarker.node && selection.anchorOffset === startMarker.offset && selection.focusNode === endMarker.node && selection.focusOffset === endMarker.offset) {\n return;\n }\n\n var range = doc.createRange();\n range.setStart(startMarker.node, startMarker.offset);\n selection.removeAllRanges();\n\n if (start > end) {\n selection.addRange(range);\n selection.extend(endMarker.node, endMarker.offset);\n } else {\n range.setEnd(endMarker.node, endMarker.offset);\n selection.addRange(range);\n }\n }\n}\n\nfunction isTextNode(node) {\n return node && node.nodeType === TEXT_NODE;\n}\n\nfunction containsNode(outerNode, innerNode) {\n if (!outerNode || !innerNode) {\n return false;\n } else if (outerNode === innerNode) {\n return true;\n } else if (isTextNode(outerNode)) {\n return false;\n } else if (isTextNode(innerNode)) {\n return containsNode(outerNode, innerNode.parentNode);\n } else if ('contains' in outerNode) {\n return outerNode.contains(innerNode);\n } else if (outerNode.compareDocumentPosition) {\n return !!(outerNode.compareDocumentPosition(innerNode) & 16);\n } else {\n return false;\n }\n}\n\nfunction isInDocument(node) {\n return node && node.ownerDocument && containsNode(node.ownerDocument.documentElement, node);\n}\n\nfunction isSameOriginFrame(iframe) {\n try {\n // Accessing the contentDocument of a HTMLIframeElement can cause the browser\n // to throw, e.g. if it has a cross-origin src attribute.\n // Safari will show an error in the console when the access results in \"Blocked a frame with origin\". e.g:\n // iframe.contentDocument.defaultView;\n // A safety way is to access one of the cross origin properties: Window or Location\n // Which might result in \"SecurityError\" DOM Exception and it is compatible to Safari.\n // https://html.spec.whatwg.org/multipage/browsers.html#integration-with-idl\n return typeof iframe.contentWindow.location.href === 'string';\n } catch (err) {\n return false;\n }\n}\n\nfunction getActiveElementDeep() {\n var win = window;\n var element = getActiveElement();\n\n while (element instanceof win.HTMLIFrameElement) {\n if (isSameOriginFrame(element)) {\n win = element.contentWindow;\n } else {\n return element;\n }\n\n element = getActiveElement(win.document);\n }\n\n return element;\n}\n/**\n * @ReactInputSelection: React input selection module. Based on Selection.js,\n * but modified to be suitable for react and has a couple of bug fixes (doesn't\n * assume buttons have range selections allowed).\n * Input selection module for React.\n */\n\n/**\n * @hasSelectionCapabilities: we get the element types that support selection\n * from https://html.spec.whatwg.org/#do-not-apply, looking at `selectionStart`\n * and `selectionEnd` rows.\n */\n\n\nfunction hasSelectionCapabilities(elem) {\n var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();\n return nodeName && (nodeName === 'input' && (elem.type === 'text' || elem.type === 'search' || elem.type === 'tel' || elem.type === 'url' || elem.type === 'password') || nodeName === 'textarea' || elem.contentEditable === 'true');\n}\nfunction getSelectionInformation() {\n var focusedElem = getActiveElementDeep();\n return {\n focusedElem: focusedElem,\n selectionRange: hasSelectionCapabilities(focusedElem) ? getSelection$1(focusedElem) : null\n };\n}\n/**\n * @restoreSelection: If any selection information was potentially lost,\n * restore it. This is useful when performing operations that could remove dom\n * nodes and place them back in, resulting in focus being lost.\n */\n\nfunction restoreSelection(priorSelectionInformation) {\n var curFocusedElem = getActiveElementDeep();\n var priorFocusedElem = priorSelectionInformation.focusedElem;\n var priorSelectionRange = priorSelectionInformation.selectionRange;\n\n if (curFocusedElem !== priorFocusedElem && isInDocument(priorFocusedElem)) {\n if (priorSelectionRange !== null && hasSelectionCapabilities(priorFocusedElem)) {\n setSelection(priorFocusedElem, priorSelectionRange);\n } // Focusing a node can change the scroll position, which is undesirable\n\n\n var ancestors = [];\n var ancestor = priorFocusedElem;\n\n while (ancestor = ancestor.parentNode) {\n if (ancestor.nodeType === ELEMENT_NODE) {\n ancestors.push({\n element: ancestor,\n left: ancestor.scrollLeft,\n top: ancestor.scrollTop\n });\n }\n }\n\n if (typeof priorFocusedElem.focus === 'function') {\n priorFocusedElem.focus();\n }\n\n for (var i = 0; i < ancestors.length; i++) {\n var info = ancestors[i];\n info.element.scrollLeft = info.left;\n info.element.scrollTop = info.top;\n }\n }\n}\n/**\n * @getSelection: Gets the selection bounds of a focused textarea, input or\n * contentEditable node.\n * -@input: Look up selection bounds of this input\n * -@return {start: selectionStart, end: selectionEnd}\n */\n\nfunction getSelection$1(input) {\n var selection;\n\n if ('selectionStart' in input) {\n // Modern browser with input or textarea.\n selection = {\n start: input.selectionStart,\n end: input.selectionEnd\n };\n } else {\n // Content editable or old IE textarea.\n selection = getOffsets(input);\n }\n\n return selection || {\n start: 0,\n end: 0\n };\n}\n/**\n * @setSelection: Sets the selection bounds of a textarea or input and focuses\n * the input.\n * -@input Set selection bounds of this input or textarea\n * -@offsets Object of same form that is returned from get*\n */\n\nfunction setSelection(input, offsets) {\n var start = offsets.start;\n var end = offsets.end;\n\n if (end === undefined) {\n end = start;\n }\n\n if ('selectionStart' in input) {\n input.selectionStart = start;\n input.selectionEnd = Math.min(end, input.value.length);\n } else {\n setOffsets(input, offsets);\n }\n}\n\nvar skipSelectionChangeEvent = canUseDOM && 'documentMode' in document && document.documentMode <= 11;\n\nfunction registerEvents() {\n registerTwoPhaseEvent('onSelect', ['focusout', 'contextmenu', 'dragend', 'focusin', 'keydown', 'keyup', 'mousedown', 'mouseup', 'selectionchange']);\n}\n\nvar activeElement = null;\nvar activeElementInst = null;\nvar lastSelection = null;\nvar mouseDown = false;\n/**\n * Get an object which is a unique representation of the current selection.\n *\n * The return value will not be consistent across nodes or browsers, but\n * two identical selections on the same node will return identical objects.\n */\n\nfunction getSelection(node) {\n if ('selectionStart' in node && hasSelectionCapabilities(node)) {\n return {\n start: node.selectionStart,\n end: node.selectionEnd\n };\n } else {\n var win = node.ownerDocument && node.ownerDocument.defaultView || window;\n var selection = win.getSelection();\n return {\n anchorNode: selection.anchorNode,\n anchorOffset: selection.anchorOffset,\n focusNode: selection.focusNode,\n focusOffset: selection.focusOffset\n };\n }\n}\n/**\n * Get document associated with the event target.\n */\n\n\nfunction getEventTargetDocument(eventTarget) {\n return eventTarget.window === eventTarget ? eventTarget.document : eventTarget.nodeType === DOCUMENT_NODE ? eventTarget : eventTarget.ownerDocument;\n}\n/**\n * Poll selection to see whether it's changed.\n *\n * @param {object} nativeEvent\n * @param {object} nativeEventTarget\n * @return {?SyntheticEvent}\n */\n\n\nfunction constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget) {\n // Ensure we have the right element, and that the user is not dragging a\n // selection (this matches native `select` event behavior). In HTML5, select\n // fires only on input and textarea thus if there's no focused element we\n // won't dispatch.\n var doc = getEventTargetDocument(nativeEventTarget);\n\n if (mouseDown || activeElement == null || activeElement !== getActiveElement(doc)) {\n return;\n } // Only fire when selection has actually changed.\n\n\n var currentSelection = getSelection(activeElement);\n\n if (!lastSelection || !shallowEqual(lastSelection, currentSelection)) {\n lastSelection = currentSelection;\n var listeners = accumulateTwoPhaseListeners(activeElementInst, 'onSelect');\n\n if (listeners.length > 0) {\n var event = new SyntheticEvent('onSelect', 'select', null, nativeEvent, nativeEventTarget);\n dispatchQueue.push({\n event: event,\n listeners: listeners\n });\n event.target = activeElement;\n }\n }\n}\n/**\n * This plugin creates an `onSelect` event that normalizes select events\n * across form elements.\n *\n * Supported elements are:\n * - input (see `isTextInputElement`)\n * - textarea\n * - contentEditable\n *\n * This differs from native browser implementations in the following ways:\n * - Fires on contentEditable fields as well as inputs.\n * - Fires for collapsed selection.\n * - Fires after user input.\n */\n\n\nfunction extractEvents$2(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {\n var targetNode = targetInst ? getNodeFromInstance(targetInst) : window;\n\n switch (domEventName) {\n // Track the input node that has focus.\n case 'focusin':\n if (isTextInputElement(targetNode) || targetNode.contentEditable === 'true') {\n activeElement = targetNode;\n activeElementInst = targetInst;\n lastSelection = null;\n }\n\n break;\n\n case 'focusout':\n activeElement = null;\n activeElementInst = null;\n lastSelection = null;\n break;\n // Don't fire the event while the user is dragging. This matches the\n // semantics of the native select event.\n\n case 'mousedown':\n mouseDown = true;\n break;\n\n case 'contextmenu':\n case 'mouseup':\n case 'dragend':\n mouseDown = false;\n constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget);\n break;\n // Chrome and IE fire non-standard event when selection is changed (and\n // sometimes when it hasn't). IE's event fires out of order with respect\n // to key and input events on deletion, so we discard it.\n //\n // Firefox doesn't support selectionchange, so check selection status\n // after each key entry. The selection changes after keydown and before\n // keyup, but we check on keydown as well in the case of holding down a\n // key, when multiple keydown events are fired but only one keyup is.\n // This is also our approach for IE handling, for the reason above.\n\n case 'selectionchange':\n if (skipSelectionChangeEvent) {\n break;\n }\n\n // falls through\n\n case 'keydown':\n case 'keyup':\n constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget);\n }\n}\n\n/**\n * Generate a mapping of standard vendor prefixes using the defined style property and event name.\n *\n * @param {string} styleProp\n * @param {string} eventName\n * @returns {object}\n */\n\nfunction makePrefixMap(styleProp, eventName) {\n var prefixes = {};\n prefixes[styleProp.toLowerCase()] = eventName.toLowerCase();\n prefixes['Webkit' + styleProp] = 'webkit' + eventName;\n prefixes['Moz' + styleProp] = 'moz' + eventName;\n return prefixes;\n}\n/**\n * A list of event names to a configurable list of vendor prefixes.\n */\n\n\nvar vendorPrefixes = {\n animationend: makePrefixMap('Animation', 'AnimationEnd'),\n animationiteration: makePrefixMap('Animation', 'AnimationIteration'),\n animationstart: makePrefixMap('Animation', 'AnimationStart'),\n transitionend: makePrefixMap('Transition', 'TransitionEnd')\n};\n/**\n * Event names that have already been detected and prefixed (if applicable).\n */\n\nvar prefixedEventNames = {};\n/**\n * Element to check for prefixes on.\n */\n\nvar style = {};\n/**\n * Bootstrap if a DOM exists.\n */\n\nif (canUseDOM) {\n style = document.createElement('div').style; // On some platforms, in particular some releases of Android 4.x,\n // the un-prefixed \"animation\" and \"transition\" properties are defined on the\n // style object but the events that fire will still be prefixed, so we need\n // to check if the un-prefixed events are usable, and if not remove them from the map.\n\n if (!('AnimationEvent' in window)) {\n delete vendorPrefixes.animationend.animation;\n delete vendorPrefixes.animationiteration.animation;\n delete vendorPrefixes.animationstart.animation;\n } // Same as above\n\n\n if (!('TransitionEvent' in window)) {\n delete vendorPrefixes.transitionend.transition;\n }\n}\n/**\n * Attempts to determine the correct vendor prefixed event name.\n *\n * @param {string} eventName\n * @returns {string}\n */\n\n\nfunction getVendorPrefixedEventName(eventName) {\n if (prefixedEventNames[eventName]) {\n return prefixedEventNames[eventName];\n } else if (!vendorPrefixes[eventName]) {\n return eventName;\n }\n\n var prefixMap = vendorPrefixes[eventName];\n\n for (var styleProp in prefixMap) {\n if (prefixMap.hasOwnProperty(styleProp) && styleProp in style) {\n return prefixedEventNames[eventName] = prefixMap[styleProp];\n }\n }\n\n return eventName;\n}\n\nvar ANIMATION_END = getVendorPrefixedEventName('animationend');\nvar ANIMATION_ITERATION = getVendorPrefixedEventName('animationiteration');\nvar ANIMATION_START = getVendorPrefixedEventName('animationstart');\nvar TRANSITION_END = getVendorPrefixedEventName('transitionend');\n\nvar topLevelEventsToReactNames = new Map(); // NOTE: Capitalization is important in this list!\n//\n// E.g. it needs \"pointerDown\", not \"pointerdown\".\n// This is because we derive both React name (\"onPointerDown\")\n// and DOM name (\"pointerdown\") from the same list.\n//\n// Exceptions that don't match this convention are listed separately.\n//\n// prettier-ignore\n\nvar simpleEventPluginEvents = ['abort', 'auxClick', 'cancel', 'canPlay', 'canPlayThrough', 'click', 'close', 'contextMenu', 'copy', 'cut', 'drag', 'dragEnd', 'dragEnter', 'dragExit', 'dragLeave', 'dragOver', 'dragStart', 'drop', 'durationChange', 'emptied', 'encrypted', 'ended', 'error', 'gotPointerCapture', 'input', 'invalid', 'keyDown', 'keyPress', 'keyUp', 'load', 'loadedData', 'loadedMetadata', 'loadStart', 'lostPointerCapture', 'mouseDown', 'mouseMove', 'mouseOut', 'mouseOver', 'mouseUp', 'paste', 'pause', 'play', 'playing', 'pointerCancel', 'pointerDown', 'pointerMove', 'pointerOut', 'pointerOver', 'pointerUp', 'progress', 'rateChange', 'reset', 'resize', 'seeked', 'seeking', 'stalled', 'submit', 'suspend', 'timeUpdate', 'touchCancel', 'touchEnd', 'touchStart', 'volumeChange', 'scroll', 'scrollEnd', 'toggle', 'touchMove', 'waiting', 'wheel'];\n\nfunction registerSimpleEvent(domEventName, reactName) {\n topLevelEventsToReactNames.set(domEventName, reactName);\n registerTwoPhaseEvent(reactName, [domEventName]);\n}\n\nfunction registerSimpleEvents() {\n for (var i = 0; i < simpleEventPluginEvents.length; i++) {\n var eventName = simpleEventPluginEvents[i];\n var domEventName = eventName.toLowerCase();\n var capitalizedEvent = eventName[0].toUpperCase() + eventName.slice(1);\n registerSimpleEvent(domEventName, 'on' + capitalizedEvent);\n } // Special cases where event names don't match.\n\n\n registerSimpleEvent(ANIMATION_END, 'onAnimationEnd');\n registerSimpleEvent(ANIMATION_ITERATION, 'onAnimationIteration');\n registerSimpleEvent(ANIMATION_START, 'onAnimationStart');\n registerSimpleEvent('dblclick', 'onDoubleClick');\n registerSimpleEvent('focusin', 'onFocus');\n registerSimpleEvent('focusout', 'onBlur');\n registerSimpleEvent(TRANSITION_END, 'onTransitionEnd');\n}\n\nfunction extractEvents$1(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {\n var reactName = topLevelEventsToReactNames.get(domEventName);\n\n if (reactName === undefined) {\n return;\n }\n\n var SyntheticEventCtor = SyntheticEvent;\n var reactEventType = domEventName;\n\n switch (domEventName) {\n case 'keypress':\n // Firefox creates a keypress event for function keys too. This removes\n // the unwanted keypress events. Enter is however both printable and\n // non-printable. One would expect Tab to be as well (but it isn't).\n // TODO: Fixed in https://bugzilla.mozilla.org/show_bug.cgi?id=968056. Can\n // probably remove.\n if (getEventCharCode(nativeEvent) === 0) {\n return;\n }\n\n /* falls through */\n\n case 'keydown':\n case 'keyup':\n SyntheticEventCtor = SyntheticKeyboardEvent;\n break;\n\n case 'focusin':\n reactEventType = 'focus';\n SyntheticEventCtor = SyntheticFocusEvent;\n break;\n\n case 'focusout':\n reactEventType = 'blur';\n SyntheticEventCtor = SyntheticFocusEvent;\n break;\n\n case 'beforeblur':\n case 'afterblur':\n SyntheticEventCtor = SyntheticFocusEvent;\n break;\n\n case 'click':\n // Firefox creates a click event on right mouse clicks. This removes the\n // unwanted click events.\n // TODO: Fixed in https://phabricator.services.mozilla.com/D26793. Can\n // probably remove.\n if (nativeEvent.button === 2) {\n return;\n }\n\n /* falls through */\n\n case 'auxclick':\n case 'dblclick':\n case 'mousedown':\n case 'mousemove':\n case 'mouseup': // TODO: Disabled elements should not respond to mouse events\n\n /* falls through */\n\n case 'mouseout':\n case 'mouseover':\n case 'contextmenu':\n SyntheticEventCtor = SyntheticMouseEvent;\n break;\n\n case 'drag':\n case 'dragend':\n case 'dragenter':\n case 'dragexit':\n case 'dragleave':\n case 'dragover':\n case 'dragstart':\n case 'drop':\n SyntheticEventCtor = SyntheticDragEvent;\n break;\n\n case 'touchcancel':\n case 'touchend':\n case 'touchmove':\n case 'touchstart':\n SyntheticEventCtor = SyntheticTouchEvent;\n break;\n\n case ANIMATION_END:\n case ANIMATION_ITERATION:\n case ANIMATION_START:\n SyntheticEventCtor = SyntheticAnimationEvent;\n break;\n\n case TRANSITION_END:\n SyntheticEventCtor = SyntheticTransitionEvent;\n break;\n\n case 'scroll':\n case 'scrollend':\n SyntheticEventCtor = SyntheticUIEvent;\n break;\n\n case 'wheel':\n SyntheticEventCtor = SyntheticWheelEvent;\n break;\n\n case 'copy':\n case 'cut':\n case 'paste':\n SyntheticEventCtor = SyntheticClipboardEvent;\n break;\n\n case 'gotpointercapture':\n case 'lostpointercapture':\n case 'pointercancel':\n case 'pointerdown':\n case 'pointermove':\n case 'pointerout':\n case 'pointerover':\n case 'pointerup':\n SyntheticEventCtor = SyntheticPointerEvent;\n break;\n }\n\n var inCapturePhase = (eventSystemFlags & IS_CAPTURE_PHASE) !== 0;\n\n {\n // Some events don't bubble in the browser.\n // In the past, React has always bubbled them, but this can be surprising.\n // We're going to try aligning closer to the browser behavior by not bubbling\n // them in React either. We'll start by not bubbling onScroll, and then expand.\n var accumulateTargetOnly = !inCapturePhase && ( // TODO: ideally, we'd eventually add all events from\n // nonDelegatedEvents list in DOMPluginEventSystem.\n // Then we can remove this special list.\n // This is a breaking change that can wait until React 18.\n domEventName === 'scroll' || domEventName === 'scrollend');\n\n var _listeners = accumulateSinglePhaseListeners(targetInst, reactName, nativeEvent.type, inCapturePhase, accumulateTargetOnly);\n\n if (_listeners.length > 0) {\n // Intentionally create event lazily.\n var _event = new SyntheticEventCtor(reactName, reactEventType, null, nativeEvent, nativeEventTarget);\n\n dispatchQueue.push({\n event: _event,\n listeners: _listeners\n });\n }\n }\n}\n\nregisterSimpleEvents();\nregisterEvents$1();\nregisterEvents$2();\nregisterEvents();\nregisterEvents$3();\n\nfunction extractEvents(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {\n // TODO: we should remove the concept of a \"SimpleEventPlugin\".\n // This is the basic functionality of the event system. All\n // the other plugins are essentially polyfills. So the plugin\n // should probably be inlined somewhere and have its logic\n // be core the to event system. This would potentially allow\n // us to ship builds of React without the polyfilled plugins below.\n extractEvents$1(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags);\n var shouldProcessPolyfillPlugins = (eventSystemFlags & SHOULD_NOT_PROCESS_POLYFILL_EVENT_PLUGINS) === 0; // We don't process these events unless we are in the\n // event's native \"bubble\" phase, which means that we're\n // not in the capture phase. That's because we emulate\n // the capture phase here still. This is a trade-off,\n // because in an ideal world we would not emulate and use\n // the phases properly, like we do with the SimpleEvent\n // plugin. However, the plugins below either expect\n // emulation (EnterLeave) or use state localized to that\n // plugin (BeforeInput, Change, Select). The state in\n // these modules complicates things, as you'll essentially\n // get the case where the capture phase event might change\n // state, only for the following bubble event to come in\n // later and not trigger anything as the state now\n // invalidates the heuristics of the event plugin. We\n // could alter all these plugins to work in such ways, but\n // that might cause other unknown side-effects that we\n // can't foresee right now.\n\n if (shouldProcessPolyfillPlugins) {\n extractEvents$3(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);\n extractEvents$4(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);\n extractEvents$2(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);\n extractEvents$5(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);\n\n {\n extractEvents$6(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);\n }\n }\n} // List of events that need to be individually attached to media elements.\n\n\nvar mediaEventTypes = ['abort', 'canplay', 'canplaythrough', 'durationchange', 'emptied', 'encrypted', 'ended', 'error', 'loadeddata', 'loadedmetadata', 'loadstart', 'pause', 'play', 'playing', 'progress', 'ratechange', 'resize', 'seeked', 'seeking', 'stalled', 'suspend', 'timeupdate', 'volumechange', 'waiting']; // We should not delegate these events to the container, but rather\n// set them on the actual target element itself. This is primarily\n// because these events do not consistently bubble in the DOM.\n\nvar nonDelegatedEvents = new Set(['cancel', 'close', 'invalid', 'load', 'scroll', 'scrollend', 'toggle'].concat(mediaEventTypes));\nvar hasError = false;\nvar caughtError = null;\n\nfunction executeDispatch(event, listener, currentTarget) {\n event.currentTarget = currentTarget;\n\n try {\n listener(event);\n } catch (error) {\n if (!hasError) {\n hasError = true;\n caughtError = error;\n }\n }\n\n event.currentTarget = null;\n}\n\nfunction processDispatchQueueItemsInOrder(event, dispatchListeners, inCapturePhase) {\n var previousInstance;\n\n if (inCapturePhase) {\n for (var i = dispatchListeners.length - 1; i >= 0; i--) {\n var _dispatchListeners$i = dispatchListeners[i],\n instance = _dispatchListeners$i.instance,\n currentTarget = _dispatchListeners$i.currentTarget,\n listener = _dispatchListeners$i.listener;\n\n if (instance !== previousInstance && event.isPropagationStopped()) {\n return;\n }\n\n executeDispatch(event, listener, currentTarget);\n previousInstance = instance;\n }\n } else {\n for (var _i = 0; _i < dispatchListeners.length; _i++) {\n var _dispatchListeners$_i = dispatchListeners[_i],\n _instance = _dispatchListeners$_i.instance,\n _currentTarget = _dispatchListeners$_i.currentTarget,\n _listener = _dispatchListeners$_i.listener;\n\n if (_instance !== previousInstance && event.isPropagationStopped()) {\n return;\n }\n\n executeDispatch(event, _listener, _currentTarget);\n previousInstance = _instance;\n }\n }\n}\n\nfunction processDispatchQueue(dispatchQueue, eventSystemFlags) {\n var inCapturePhase = (eventSystemFlags & IS_CAPTURE_PHASE) !== 0;\n\n for (var i = 0; i < dispatchQueue.length; i++) {\n var _dispatchQueue$i = dispatchQueue[i],\n event = _dispatchQueue$i.event,\n listeners = _dispatchQueue$i.listeners;\n processDispatchQueueItemsInOrder(event, listeners, inCapturePhase); // event system doesn't use pooling.\n } // This would be a good time to rethrow if any of the event handlers threw.\n\n\n if (hasError) {\n var error = caughtError;\n hasError = false;\n caughtError = null;\n throw error;\n }\n}\n\nfunction dispatchEventsForPlugins(domEventName, eventSystemFlags, nativeEvent, targetInst, targetContainer) {\n var nativeEventTarget = getEventTarget(nativeEvent);\n var dispatchQueue = [];\n extractEvents(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags);\n processDispatchQueue(dispatchQueue, eventSystemFlags);\n}\n\nfunction listenToNonDelegatedEvent(domEventName, targetElement) {\n {\n if (!nonDelegatedEvents.has(domEventName)) {\n error('Did not expect a listenToNonDelegatedEvent() call for \"%s\". ' + 'This is a bug in React. Please file an issue.', domEventName);\n }\n }\n\n var isCapturePhaseListener = false;\n var listenerSet = getEventListenerSet(targetElement);\n var listenerSetKey = getListenerSetKey(domEventName, isCapturePhaseListener);\n\n if (!listenerSet.has(listenerSetKey)) {\n addTrappedEventListener(targetElement, domEventName, IS_NON_DELEGATED, isCapturePhaseListener);\n listenerSet.add(listenerSetKey);\n }\n}\nfunction listenToNativeEvent(domEventName, isCapturePhaseListener, target) {\n {\n if (nonDelegatedEvents.has(domEventName) && !isCapturePhaseListener) {\n error('Did not expect a listenToNativeEvent() call for \"%s\" in the bubble phase. ' + 'This is a bug in React. Please file an issue.', domEventName);\n }\n }\n\n var eventSystemFlags = 0;\n\n if (isCapturePhaseListener) {\n eventSystemFlags |= IS_CAPTURE_PHASE;\n }\n\n addTrappedEventListener(target, domEventName, eventSystemFlags, isCapturePhaseListener);\n} // This is only used by createEventHandle when the\nvar listeningMarker = '_reactListening' + Math.random().toString(36).slice(2);\nfunction listenToAllSupportedEvents(rootContainerElement) {\n if (!rootContainerElement[listeningMarker]) {\n rootContainerElement[listeningMarker] = true;\n allNativeEvents.forEach(function (domEventName) {\n // We handle selectionchange separately because it\n // doesn't bubble and needs to be on the document.\n if (domEventName !== 'selectionchange') {\n if (!nonDelegatedEvents.has(domEventName)) {\n listenToNativeEvent(domEventName, false, rootContainerElement);\n }\n\n listenToNativeEvent(domEventName, true, rootContainerElement);\n }\n });\n var ownerDocument = rootContainerElement.nodeType === DOCUMENT_NODE ? rootContainerElement : rootContainerElement.ownerDocument;\n\n if (ownerDocument !== null) {\n // The selectionchange event also needs deduplication\n // but it is attached to the document.\n if (!ownerDocument[listeningMarker]) {\n ownerDocument[listeningMarker] = true;\n listenToNativeEvent('selectionchange', false, ownerDocument);\n }\n }\n }\n}\n\nfunction addTrappedEventListener(targetContainer, domEventName, eventSystemFlags, isCapturePhaseListener, isDeferredListenerForLegacyFBSupport) {\n var listener = createEventListenerWrapperWithPriority(targetContainer, domEventName, eventSystemFlags); // If passive option is not supported, then the event will be\n // active and not passive.\n\n var isPassiveListener = undefined;\n\n if (passiveBrowserEventsSupported) {\n // Browsers introduced an intervention, making these events\n // passive by default on document. React doesn't bind them\n // to document anymore, but changing this now would undo\n // the performance wins from the change. So we emulate\n // the existing behavior manually on the roots now.\n // https://github.com/facebook/react/issues/19651\n if (domEventName === 'touchstart' || domEventName === 'touchmove' || domEventName === 'wheel') {\n isPassiveListener = true;\n }\n }\n\n targetContainer = targetContainer;\n\n\n if (isCapturePhaseListener) {\n if (isPassiveListener !== undefined) {\n addEventCaptureListenerWithPassiveFlag(targetContainer, domEventName, listener, isPassiveListener);\n } else {\n addEventCaptureListener(targetContainer, domEventName, listener);\n }\n } else {\n if (isPassiveListener !== undefined) {\n addEventBubbleListenerWithPassiveFlag(targetContainer, domEventName, listener, isPassiveListener);\n } else {\n addEventBubbleListener(targetContainer, domEventName, listener);\n }\n }\n}\n\nfunction isMatchingRootContainer(grandContainer, targetContainer) {\n return grandContainer === targetContainer || grandContainer.nodeType === COMMENT_NODE && grandContainer.parentNode === targetContainer;\n}\n\nfunction dispatchEventForPluginEventSystem(domEventName, eventSystemFlags, nativeEvent, targetInst, targetContainer) {\n var ancestorInst = targetInst;\n\n if ((eventSystemFlags & IS_EVENT_HANDLE_NON_MANAGED_NODE) === 0 && (eventSystemFlags & IS_NON_DELEGATED) === 0) {\n var targetContainerNode = targetContainer; // If we are using the legacy FB support flag, we\n\n if (targetInst !== null) {\n // The below logic attempts to work out if we need to change\n // the target fiber to a different ancestor. We had similar logic\n // in the legacy event system, except the big difference between\n // systems is that the modern event system now has an event listener\n // attached to each React Root and React Portal Root. Together,\n // the DOM nodes representing these roots are the \"rootContainer\".\n // To figure out which ancestor instance we should use, we traverse\n // up the fiber tree from the target instance and attempt to find\n // root boundaries that match that of our current \"rootContainer\".\n // If we find that \"rootContainer\", we find the parent fiber\n // sub-tree for that root and make that our ancestor instance.\n var node = targetInst;\n\n mainLoop: while (true) {\n if (node === null) {\n return;\n }\n\n var nodeTag = node.tag;\n\n if (nodeTag === HostRoot || nodeTag === HostPortal) {\n var container = node.stateNode.containerInfo;\n\n if (isMatchingRootContainer(container, targetContainerNode)) {\n break;\n }\n\n if (nodeTag === HostPortal) {\n // The target is a portal, but it's not the rootContainer we're looking for.\n // Normally portals handle their own events all the way down to the root.\n // So we should be able to stop now. However, we don't know if this portal\n // was part of *our* root.\n var grandNode = node.return;\n\n while (grandNode !== null) {\n var grandTag = grandNode.tag;\n\n if (grandTag === HostRoot || grandTag === HostPortal) {\n var grandContainer = grandNode.stateNode.containerInfo;\n\n if (isMatchingRootContainer(grandContainer, targetContainerNode)) {\n // This is the rootContainer we're looking for and we found it as\n // a parent of the Portal. That means we can ignore it because the\n // Portal will bubble through to us.\n return;\n }\n }\n\n grandNode = grandNode.return;\n }\n } // Now we need to find it's corresponding host fiber in the other\n // tree. To do this we can use getClosestInstanceFromNode, but we\n // need to validate that the fiber is a host instance, otherwise\n // we need to traverse up through the DOM till we find the correct\n // node that is from the other tree.\n\n\n while (container !== null) {\n var parentNode = getClosestInstanceFromNode(container);\n\n if (parentNode === null) {\n return;\n }\n\n var parentTag = parentNode.tag;\n\n if (parentTag === HostComponent || parentTag === HostText || (parentTag === HostHoistable ) || parentTag === HostSingleton) {\n node = ancestorInst = parentNode;\n continue mainLoop;\n }\n\n container = container.parentNode;\n }\n }\n\n node = node.return;\n }\n }\n }\n\n batchedUpdates(function () {\n return dispatchEventsForPlugins(domEventName, eventSystemFlags, nativeEvent, ancestorInst);\n });\n}\n\nfunction createDispatchListener(instance, listener, currentTarget) {\n return {\n instance: instance,\n listener: listener,\n currentTarget: currentTarget\n };\n}\n\nfunction accumulateSinglePhaseListeners(targetFiber, reactName, nativeEventType, inCapturePhase, accumulateTargetOnly, nativeEvent) {\n var captureName = reactName !== null ? reactName + 'Capture' : null;\n var reactEventName = inCapturePhase ? captureName : reactName;\n var listeners = [];\n var instance = targetFiber;\n var lastHostComponent = null; // Accumulate all instances and listeners via the target -> root path.\n\n while (instance !== null) {\n var _instance2 = instance,\n stateNode = _instance2.stateNode,\n tag = _instance2.tag; // Handle listeners that are on HostComponents (i.e. <div>)\n\n if ((tag === HostComponent || (tag === HostHoistable ) || tag === HostSingleton) && stateNode !== null) {\n lastHostComponent = stateNode; // createEventHandle listeners\n\n\n if (reactEventName !== null) {\n var listener = getListener(instance, reactEventName);\n\n if (listener != null) {\n listeners.push(createDispatchListener(instance, listener, lastHostComponent));\n }\n }\n } // If we are only accumulating events for the target, then we don't\n // continue to propagate through the React fiber tree to find other\n // listeners.\n\n\n if (accumulateTargetOnly) {\n break;\n } // If we are processing the onBeforeBlur event, then we need to take\n\n instance = instance.return;\n }\n\n return listeners;\n} // We should only use this function for:\n// - BeforeInputEventPlugin\n// - ChangeEventPlugin\n// - SelectEventPlugin\n// This is because we only process these plugins\n// in the bubble phase, so we need to accumulate two\n// phase event listeners (via emulation).\n\nfunction accumulateTwoPhaseListeners(targetFiber, reactName) {\n var captureName = reactName + 'Capture';\n var listeners = [];\n var instance = targetFiber; // Accumulate all instances and listeners via the target -> root path.\n\n while (instance !== null) {\n var _instance3 = instance,\n stateNode = _instance3.stateNode,\n tag = _instance3.tag; // Handle listeners that are on HostComponents (i.e. <div>)\n\n if ((tag === HostComponent || (tag === HostHoistable ) || tag === HostSingleton) && stateNode !== null) {\n var currentTarget = stateNode;\n var captureListener = getListener(instance, captureName);\n\n if (captureListener != null) {\n listeners.unshift(createDispatchListener(instance, captureListener, currentTarget));\n }\n\n var bubbleListener = getListener(instance, reactName);\n\n if (bubbleListener != null) {\n listeners.push(createDispatchListener(instance, bubbleListener, currentTarget));\n }\n }\n\n instance = instance.return;\n }\n\n return listeners;\n}\n\nfunction getParent(inst) {\n if (inst === null) {\n return null;\n }\n\n do {\n // $FlowFixMe[incompatible-use] found when upgrading Flow\n inst = inst.return; // TODO: If this is a HostRoot we might want to bail out.\n // That is depending on if we want nested subtrees (layers) to bubble\n // events to their parent. We could also go through parentNode on the\n // host node but that wouldn't work for React Native and doesn't let us\n // do the portal feature.\n } while (inst && inst.tag !== HostComponent && inst.tag !== HostSingleton);\n\n if (inst) {\n return inst;\n }\n\n return null;\n}\n/**\n * Return the lowest common ancestor of A and B, or null if they are in\n * different trees.\n */\n\n\nfunction getLowestCommonAncestor(instA, instB) {\n var nodeA = instA;\n var nodeB = instB;\n var depthA = 0;\n\n for (var tempA = nodeA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = nodeB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n nodeA = getParent(nodeA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n nodeB = getParent(nodeB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (nodeA === nodeB || nodeB !== null && nodeA === nodeB.alternate) {\n return nodeA;\n }\n\n nodeA = getParent(nodeA);\n nodeB = getParent(nodeB);\n }\n\n return null;\n}\n\nfunction accumulateEnterLeaveListenersForEvent(dispatchQueue, event, target, common, inCapturePhase) {\n var registrationName = event._reactName;\n var listeners = [];\n var instance = target;\n\n while (instance !== null) {\n if (instance === common) {\n break;\n }\n\n var _instance4 = instance,\n alternate = _instance4.alternate,\n stateNode = _instance4.stateNode,\n tag = _instance4.tag;\n\n if (alternate !== null && alternate === common) {\n break;\n }\n\n if ((tag === HostComponent || (tag === HostHoistable ) || tag === HostSingleton) && stateNode !== null) {\n var currentTarget = stateNode;\n\n if (inCapturePhase) {\n var captureListener = getListener(instance, registrationName);\n\n if (captureListener != null) {\n listeners.unshift(createDispatchListener(instance, captureListener, currentTarget));\n }\n } else if (!inCapturePhase) {\n var bubbleListener = getListener(instance, registrationName);\n\n if (bubbleListener != null) {\n listeners.push(createDispatchListener(instance, bubbleListener, currentTarget));\n }\n }\n }\n\n instance = instance.return;\n }\n\n if (listeners.length !== 0) {\n dispatchQueue.push({\n event: event,\n listeners: listeners\n });\n }\n} // We should only use this function for:\n// - EnterLeaveEventPlugin\n// This is because we only process this plugin\n// in the bubble phase, so we need to accumulate two\n// phase event listeners.\n\n\nfunction accumulateEnterLeaveTwoPhaseListeners(dispatchQueue, leaveEvent, enterEvent, from, to) {\n var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\n if (from !== null) {\n accumulateEnterLeaveListenersForEvent(dispatchQueue, leaveEvent, from, common, false);\n }\n\n if (to !== null && enterEvent !== null) {\n accumulateEnterLeaveListenersForEvent(dispatchQueue, enterEvent, to, common, true);\n }\n}\nfunction getListenerSetKey(domEventName, capture) {\n return domEventName + \"__\" + (capture ? 'capture' : 'bubble');\n}\n\nvar didWarnControlledToUncontrolled = false;\nvar didWarnUncontrolledToControlled = false;\nvar didWarnInvalidHydration = false;\nvar didWarnFormActionType = false;\nvar didWarnFormActionName = false;\nvar didWarnFormActionTarget = false;\nvar didWarnFormActionMethod = false;\nvar canDiffStyleForHydrationWarning;\n\n{\n // browsers. It adds spaces and sorts the properties in some\n // non-alphabetical order. Handling that would require sorting CSS\n // properties in the client & server versions or applying\n // `expectedStyle` to a temporary DOM node to read its `style` attribute\n // normalized. Since it only affects IE, we're skipping style warnings\n // in that browser completely in favor of doing all that work.\n // See https://github.com/facebook/react/issues/11807\n\n canDiffStyleForHydrationWarning = canUseDOM && !document.documentMode;\n}\n\nfunction validatePropertiesInDevelopment(type, props) {\n {\n validateProperties$2(type, props);\n validateProperties$1(type, props);\n validateProperties(type, props, {\n registrationNameDependencies: registrationNameDependencies,\n possibleRegistrationNames: possibleRegistrationNames\n });\n\n if (props.contentEditable && !props.suppressContentEditableWarning && props.children != null) {\n error('A component is `contentEditable` and contains `children` managed by ' + 'React. It is now your responsibility to guarantee that none of ' + 'those nodes are unexpectedly modified or duplicated. This is ' + 'probably not intentional.');\n }\n }\n}\n\nfunction validateFormActionInDevelopment(tag, key, value, props) {\n {\n if (value == null) {\n return;\n }\n\n if (tag === 'form') {\n if (key === 'formAction') {\n error('You can only pass the formAction prop to <input> or <button>. Use the action prop on <form>.');\n } else if (typeof value === 'function') {\n if ((props.encType != null || props.method != null) && !didWarnFormActionMethod) {\n didWarnFormActionMethod = true;\n\n error('Cannot specify a encType or method for a form that specifies a ' + 'function as the action. React provides those automatically. ' + 'They will get overridden.');\n }\n\n if (props.target != null && !didWarnFormActionTarget) {\n didWarnFormActionTarget = true;\n\n error('Cannot specify a target for a form that specifies a function as the action. ' + 'The function will always be executed in the same window.');\n }\n }\n } else if (tag === 'input' || tag === 'button') {\n if (key === 'action') {\n error('You can only pass the action prop to <form>. Use the formAction prop on <input> or <button>.');\n } else if (tag === 'input' && props.type !== 'submit' && props.type !== 'image' && !didWarnFormActionType) {\n didWarnFormActionType = true;\n\n error('An input can only specify a formAction along with type=\"submit\" or type=\"image\".');\n } else if (tag === 'button' && props.type != null && props.type !== 'submit' && !didWarnFormActionType) {\n didWarnFormActionType = true;\n\n error('A button can only specify a formAction along with type=\"submit\" or no type.');\n } else if (typeof value === 'function') {\n // Function form actions cannot control the form properties\n if (props.name != null && !didWarnFormActionName) {\n didWarnFormActionName = true;\n\n error('Cannot specify a \"name\" prop for a button that specifies a function as a formAction. ' + 'React needs it to encode which action should be invoked. It will get overridden.');\n }\n\n if ((props.formEncType != null || props.formMethod != null) && !didWarnFormActionMethod) {\n didWarnFormActionMethod = true;\n\n error('Cannot specify a formEncType or formMethod for a button that specifies a ' + 'function as a formAction. React provides those automatically. They will get overridden.');\n }\n\n if (props.formTarget != null && !didWarnFormActionTarget) {\n didWarnFormActionTarget = true;\n\n error('Cannot specify a formTarget for a button that specifies a function as a formAction. ' + 'The function will always be executed in the same window.');\n }\n }\n } else {\n if (key === 'action') {\n error('You can only pass the action prop to <form>.');\n } else {\n error('You can only pass the formAction prop to <input> or <button>.');\n }\n }\n }\n}\n\nfunction warnForPropDifference(propName, serverValue, clientValue) {\n {\n if (didWarnInvalidHydration) {\n return;\n }\n\n if (serverValue === clientValue) {\n return;\n }\n\n var normalizedClientValue = normalizeMarkupForTextOrAttribute(clientValue);\n var normalizedServerValue = normalizeMarkupForTextOrAttribute(serverValue);\n\n if (normalizedServerValue === normalizedClientValue) {\n return;\n }\n\n didWarnInvalidHydration = true;\n\n error('Prop `%s` did not match. Server: %s Client: %s', propName, JSON.stringify(normalizedServerValue), JSON.stringify(normalizedClientValue));\n }\n}\n\nfunction warnForExtraAttributes(attributeNames) {\n {\n if (didWarnInvalidHydration) {\n return;\n }\n\n didWarnInvalidHydration = true;\n var names = [];\n attributeNames.forEach(function (name) {\n names.push(name);\n });\n\n error('Extra attributes from the server: %s', names);\n }\n}\n\nfunction warnForInvalidEventListener(registrationName, listener) {\n {\n if (listener === false) {\n error('Expected `%s` listener to be a function, instead got `false`.\\n\\n' + 'If you used to conditionally omit it with %s={condition && value}, ' + 'pass %s={condition ? value : undefined} instead.', registrationName, registrationName, registrationName);\n } else {\n error('Expected `%s` listener to be a function, instead got a value of `%s` type.', registrationName, typeof listener);\n }\n }\n} // Parse the HTML and read it back to normalize the HTML string so that it\n// can be used for comparison.\n\n\nfunction normalizeHTML(parent, html) {\n {\n // We could have created a separate document here to avoid\n // re-initializing custom elements if they exist. But this breaks\n // how <noscript> is being handled. So we use the same document.\n // See the discussion in https://github.com/facebook/react/pull/11157.\n var testElement = parent.namespaceURI === MATH_NAMESPACE || parent.namespaceURI === SVG_NAMESPACE ? parent.ownerDocument.createElementNS(parent.namespaceURI, parent.tagName) : parent.ownerDocument.createElement(parent.tagName);\n testElement.innerHTML = html;\n return testElement.innerHTML;\n }\n} // HTML parsing normalizes CR and CRLF to LF.\n// It also can turn \\u0000 into \\uFFFD inside attributes.\n// https://www.w3.org/TR/html5/single-page.html#preprocessing-the-input-stream\n// If we have a mismatch, it might be caused by that.\n// We will still patch up in this case but not fire the warning.\n\n\nvar NORMALIZE_NEWLINES_REGEX = /\\r\\n?/g;\nvar NORMALIZE_NULL_AND_REPLACEMENT_REGEX = /\\u0000|\\uFFFD/g;\n\nfunction normalizeMarkupForTextOrAttribute(markup) {\n {\n checkHtmlStringCoercion(markup);\n }\n\n var markupString = typeof markup === 'string' ? markup : '' + markup;\n return markupString.replace(NORMALIZE_NEWLINES_REGEX, '\\n').replace(NORMALIZE_NULL_AND_REPLACEMENT_REGEX, '');\n}\n\nfunction checkForUnmatchedText(serverText, clientText, isConcurrentMode, shouldWarnDev) {\n var normalizedClientText = normalizeMarkupForTextOrAttribute(clientText);\n var normalizedServerText = normalizeMarkupForTextOrAttribute(serverText);\n\n if (normalizedServerText === normalizedClientText) {\n return;\n }\n\n if (shouldWarnDev) {\n {\n if (!didWarnInvalidHydration) {\n didWarnInvalidHydration = true;\n\n error('Text content did not match. Server: \"%s\" Client: \"%s\"', normalizedServerText, normalizedClientText);\n }\n }\n }\n\n if (isConcurrentMode && enableClientRenderFallbackOnTextMismatch) {\n // In concurrent roots, we throw when there's a text mismatch and revert to\n // client rendering, up to the nearest Suspense boundary.\n throw new Error('Text content does not match server-rendered HTML.');\n }\n}\n\nfunction noop$1() {}\n\nfunction trapClickOnNonInteractiveElement(node) {\n // Mobile Safari does not fire properly bubble click events on\n // non-interactive elements, which means delegated click listeners do not\n // fire. The workaround for this bug involves attaching an empty click\n // listener on the target node.\n // https://www.quirksmode.org/blog/archives/2010/09/click_event_del.html\n // Just set it using the onclick property so that we don't have to manage any\n // bookkeeping for it. Not sure if we need to clear it when the listener is\n // removed.\n // TODO: Only do this for the relevant Safaris maybe?\n node.onclick = noop$1;\n}\nvar xlinkNamespace = 'http://www.w3.org/1999/xlink';\nvar xmlNamespace = 'http://www.w3.org/XML/1998/namespace';\n\nfunction setProp(domElement, tag, key, value, props, prevValue) {\n switch (key) {\n case 'children':\n {\n if (typeof value === 'string') {\n {\n validateTextNesting(value, tag);\n } // Avoid setting initial textContent when the text is empty. In IE11 setting\n // textContent on a <textarea> will cause the placeholder to not\n // show within the <textarea> until it has been focused and blurred again.\n // https://github.com/facebook/react/issues/6731#issuecomment-254874553\n\n\n var canSetTextContent = tag !== 'body' && (tag !== 'textarea' || value !== '');\n\n if (canSetTextContent) {\n setTextContent(domElement, value);\n }\n } else if (typeof value === 'number' || enableBigIntSupport ) {\n {\n // $FlowFixMe[unsafe-addition] Flow doesn't want us to use `+` operator with string and bigint\n validateTextNesting('' + value, tag);\n }\n\n var _canSetTextContent = tag !== 'body';\n\n if (_canSetTextContent) {\n // $FlowFixMe[unsafe-addition] Flow doesn't want us to use `+` operator with string and bigint\n setTextContent(domElement, '' + value);\n }\n }\n\n break;\n }\n // These are very common props and therefore are in the beginning of the switch.\n // TODO: aria-label is a very common prop but allows booleans so is not like the others\n // but should ideally go in this list too.\n\n case 'className':\n setValueForKnownAttribute(domElement, 'class', value);\n break;\n\n case 'tabIndex':\n // This has to be case sensitive in SVG.\n setValueForKnownAttribute(domElement, 'tabindex', value);\n break;\n\n case 'dir':\n case 'role':\n case 'viewBox':\n case 'width':\n case 'height':\n {\n setValueForKnownAttribute(domElement, key, value);\n break;\n }\n\n case 'style':\n {\n setValueForStyles(domElement, value, prevValue);\n break;\n }\n // These attributes accept URLs. These must not allow javascript: URLS.\n\n case 'src':\n case 'href':\n {\n\n if (value == null || typeof value === 'function' || typeof value === 'symbol' || typeof value === 'boolean') {\n domElement.removeAttribute(key);\n break;\n } // `setAttribute` with objects becomes only `[object]` in IE8/9,\n // ('' + value) makes it output the correct toString()-value.\n\n\n {\n checkAttributeStringCoercion(value, key);\n }\n\n var sanitizedValue = sanitizeURL('' + value);\n domElement.setAttribute(key, sanitizedValue);\n break;\n }\n\n case 'action':\n case 'formAction':\n {\n // TODO: Consider moving these special cases to the form, input and button tags.\n {\n validateFormActionInDevelopment(tag, key, value, props);\n }\n\n {\n if (typeof value === 'function') {\n // Set a javascript URL that doesn't do anything. We don't expect this to be invoked\n // because we'll preventDefault, but it can happen if a form is manually submitted or\n // if someone calls stopPropagation before React gets the event.\n // If CSP is used to block javascript: URLs that's fine too. It just won't show this\n // error message but the URL will be logged.\n domElement.setAttribute(key, // eslint-disable-next-line no-script-url\n \"javascript:throw new Error('\" + 'A React form was unexpectedly submitted. If you called form.submit() manually, ' + \"consider using form.requestSubmit() instead. If you\\\\'re trying to use \" + 'event.stopPropagation() in a submit event handler, consider also calling ' + 'event.preventDefault().' + \"')\");\n break;\n } else if (typeof prevValue === 'function') {\n // When we're switching off a Server Action that was originally hydrated.\n // The server control these fields during SSR that are now trailing.\n // The regular diffing doesn't apply since we compare against the previous props.\n // Instead, we need to force them to be set to whatever they should be now.\n // This would be a lot cleaner if we did this whole fork in the per-tag approach.\n if (key === 'formAction') {\n if (tag !== 'input') {\n // Setting the name here isn't completely safe for inputs if this is switching\n // to become a radio button. In that case we let the tag based override take\n // control.\n setProp(domElement, tag, 'name', props.name, props, null);\n }\n\n setProp(domElement, tag, 'formEncType', props.formEncType, props, null);\n setProp(domElement, tag, 'formMethod', props.formMethod, props, null);\n setProp(domElement, tag, 'formTarget', props.formTarget, props, null);\n } else {\n setProp(domElement, tag, 'encType', props.encType, props, null);\n setProp(domElement, tag, 'method', props.method, props, null);\n setProp(domElement, tag, 'target', props.target, props, null);\n }\n }\n }\n\n if (value == null || !enableFormActions || typeof value === 'symbol' || typeof value === 'boolean') {\n domElement.removeAttribute(key);\n break;\n } // `setAttribute` with objects becomes only `[object]` in IE8/9,\n // ('' + value) makes it output the correct toString()-value.\n\n\n {\n checkAttributeStringCoercion(value, key);\n }\n\n var _sanitizedValue = sanitizeURL('' + value);\n\n domElement.setAttribute(key, _sanitizedValue);\n break;\n }\n\n case 'onClick':\n {\n // TODO: This cast may not be sound for SVG, MathML or custom elements.\n if (value != null) {\n if (typeof value !== 'function') {\n warnForInvalidEventListener(key, value);\n }\n\n trapClickOnNonInteractiveElement(domElement);\n }\n\n break;\n }\n\n case 'onScroll':\n {\n if (value != null) {\n if (typeof value !== 'function') {\n warnForInvalidEventListener(key, value);\n }\n\n listenToNonDelegatedEvent('scroll', domElement);\n }\n\n break;\n }\n\n case 'onScrollEnd':\n {\n if (value != null) {\n if (typeof value !== 'function') {\n warnForInvalidEventListener(key, value);\n }\n\n listenToNonDelegatedEvent('scrollend', domElement);\n }\n\n break;\n }\n\n case 'dangerouslySetInnerHTML':\n {\n if (value != null) {\n if (typeof value !== 'object' || !('__html' in value)) {\n throw new Error('`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. ' + 'Please visit https://react.dev/link/dangerously-set-inner-html ' + 'for more information.');\n }\n\n var nextHtml = value.__html;\n\n if (nextHtml != null) {\n if (props.children != null) {\n throw new Error('Can only set one of `children` or `props.dangerouslySetInnerHTML`.');\n }\n\n {\n setInnerHTML$1(domElement, nextHtml);\n }\n }\n }\n\n break;\n }\n // Note: `option.selected` is not updated if `select.multiple` is\n // disabled with `removeAttribute`. We have special logic for handling this.\n\n case 'multiple':\n {\n domElement.multiple = value && typeof value !== 'function' && typeof value !== 'symbol';\n break;\n }\n\n case 'muted':\n {\n domElement.muted = value && typeof value !== 'function' && typeof value !== 'symbol';\n break;\n }\n\n case 'suppressContentEditableWarning':\n case 'suppressHydrationWarning':\n case 'defaultValue': // Reserved\n\n case 'defaultChecked':\n case 'innerHTML':\n case 'ref':\n {\n // TODO: `ref` is pretty common, should we move it up?\n // Noop\n break;\n }\n\n case 'autoFocus':\n {\n // We polyfill it separately on the client during commit.\n // We could have excluded it in the property list instead of\n // adding a special case here, but then it wouldn't be emitted\n // on server rendering (but we *do* want to emit it in SSR).\n break;\n }\n\n case 'xlinkHref':\n {\n if (value == null || typeof value === 'function' || typeof value === 'boolean' || typeof value === 'symbol') {\n domElement.removeAttribute('xlink:href');\n break;\n } // `setAttribute` with objects becomes only `[object]` in IE8/9,\n // ('' + value) makes it output the correct toString()-value.\n\n\n {\n checkAttributeStringCoercion(value, key);\n }\n\n var _sanitizedValue2 = sanitizeURL('' + value);\n\n domElement.setAttributeNS(xlinkNamespace, 'xlink:href', _sanitizedValue2);\n break;\n }\n\n case 'contentEditable':\n case 'spellCheck':\n case 'draggable':\n case 'value':\n case 'autoReverse':\n case 'externalResourcesRequired':\n case 'focusable':\n case 'preserveAlpha':\n {\n // Booleanish String\n // These are \"enumerated\" attributes that accept \"true\" and \"false\".\n // In React, we let users pass `true` and `false` even though technically\n // these aren't boolean attributes (they are coerced to strings).\n // The SVG attributes are case-sensitive. Since the HTML attributes are\n // insensitive they also work even though we canonically use lower case.\n if (value != null && typeof value !== 'function' && typeof value !== 'symbol') {\n {\n checkAttributeStringCoercion(value, key);\n }\n\n domElement.setAttribute(key, '' + value);\n } else {\n domElement.removeAttribute(key);\n }\n\n break;\n }\n // Boolean\n\n case 'inert':\n {\n setValueForAttribute(domElement, key, value);\n break;\n }\n\n // fallthrough for new boolean props without the flag on\n\n case 'allowFullScreen':\n case 'async':\n case 'autoPlay':\n case 'controls':\n case 'default':\n case 'defer':\n case 'disabled':\n case 'disablePictureInPicture':\n case 'disableRemotePlayback':\n case 'formNoValidate':\n case 'hidden':\n case 'loop':\n case 'noModule':\n case 'noValidate':\n case 'open':\n case 'playsInline':\n case 'readOnly':\n case 'required':\n case 'reversed':\n case 'scoped':\n case 'seamless':\n case 'itemScope':\n {\n if (value && typeof value !== 'function' && typeof value !== 'symbol') {\n domElement.setAttribute(key, '');\n } else {\n domElement.removeAttribute(key);\n }\n\n break;\n }\n // Overloaded Boolean\n\n case 'capture':\n case 'download':\n {\n // An attribute that can be used as a flag as well as with a value.\n // When true, it should be present (set either to an empty string or its name).\n // When false, it should be omitted.\n // For any other value, should be present with that value.\n if (value === true) {\n domElement.setAttribute(key, '');\n } else if (value !== false && value != null && typeof value !== 'function' && typeof value !== 'symbol') {\n {\n checkAttributeStringCoercion(value, key);\n }\n\n domElement.setAttribute(key, value);\n } else {\n domElement.removeAttribute(key);\n }\n\n break;\n }\n\n case 'cols':\n case 'rows':\n case 'size':\n case 'span':\n {\n // These are HTML attributes that must be positive numbers.\n if (value != null && typeof value !== 'function' && typeof value !== 'symbol' && !isNaN(value) && value >= 1) {\n {\n checkAttributeStringCoercion(value, key);\n }\n\n domElement.setAttribute(key, value);\n } else {\n domElement.removeAttribute(key);\n }\n\n break;\n }\n\n case 'rowSpan':\n case 'start':\n {\n // These are HTML attributes that must be numbers.\n if (value != null && typeof value !== 'function' && typeof value !== 'symbol' && !isNaN(value)) {\n {\n checkAttributeStringCoercion(value, key);\n }\n\n domElement.setAttribute(key, value);\n } else {\n domElement.removeAttribute(key);\n }\n\n break;\n }\n\n case 'xlinkActuate':\n setValueForNamespacedAttribute(domElement, xlinkNamespace, 'xlink:actuate', value);\n break;\n\n case 'xlinkArcrole':\n setValueForNamespacedAttribute(domElement, xlinkNamespace, 'xlink:arcrole', value);\n break;\n\n case 'xlinkRole':\n setValueForNamespacedAttribute(domElement, xlinkNamespace, 'xlink:role', value);\n break;\n\n case 'xlinkShow':\n setValueForNamespacedAttribute(domElement, xlinkNamespace, 'xlink:show', value);\n break;\n\n case 'xlinkTitle':\n setValueForNamespacedAttribute(domElement, xlinkNamespace, 'xlink:title', value);\n break;\n\n case 'xlinkType':\n setValueForNamespacedAttribute(domElement, xlinkNamespace, 'xlink:type', value);\n break;\n\n case 'xmlBase':\n setValueForNamespacedAttribute(domElement, xmlNamespace, 'xml:base', value);\n break;\n\n case 'xmlLang':\n setValueForNamespacedAttribute(domElement, xmlNamespace, 'xml:lang', value);\n break;\n\n case 'xmlSpace':\n setValueForNamespacedAttribute(domElement, xmlNamespace, 'xml:space', value);\n break;\n // Properties that should not be allowed on custom elements.\n\n case 'is':\n {\n {\n if (prevValue != null) {\n error('Cannot update the \"is\" prop after it has been initialized.');\n }\n } // TODO: We shouldn't actually set this attribute, because we've already\n // passed it to createElement. We don't also need the attribute.\n // However, our tests currently query for it so it's plausible someone\n // else does too so it's break.\n\n\n setValueForAttribute(domElement, 'is', value);\n break;\n }\n\n case 'innerText':\n case 'textContent':\n\n // Fall through\n\n default:\n {\n if (key.length > 2 && (key[0] === 'o' || key[0] === 'O') && (key[1] === 'n' || key[1] === 'N')) {\n if (registrationNameDependencies.hasOwnProperty(key) && value != null && typeof value !== 'function') {\n warnForInvalidEventListener(key, value);\n }\n } else {\n var attributeName = getAttributeAlias(key);\n setValueForAttribute(domElement, attributeName, value);\n }\n }\n }\n}\n\nfunction setPropOnCustomElement(domElement, tag, key, value, props, prevValue) {\n switch (key) {\n case 'style':\n {\n setValueForStyles(domElement, value, prevValue);\n break;\n }\n\n case 'dangerouslySetInnerHTML':\n {\n if (value != null) {\n if (typeof value !== 'object' || !('__html' in value)) {\n throw new Error('`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. ' + 'Please visit https://react.dev/link/dangerously-set-inner-html ' + 'for more information.');\n }\n\n var nextHtml = value.__html;\n\n if (nextHtml != null) {\n if (props.children != null) {\n throw new Error('Can only set one of `children` or `props.dangerouslySetInnerHTML`.');\n }\n\n {\n setInnerHTML$1(domElement, nextHtml);\n }\n }\n }\n\n break;\n }\n\n case 'children':\n {\n if (typeof value === 'string') {\n setTextContent(domElement, value);\n } else if (typeof value === 'number' || enableBigIntSupport ) {\n // $FlowFixMe[unsafe-addition] Flow doesn't want us to use `+` operator with string and bigint\n setTextContent(domElement, '' + value);\n }\n\n break;\n }\n\n case 'onScroll':\n {\n if (value != null) {\n if (typeof value !== 'function') {\n warnForInvalidEventListener(key, value);\n }\n\n listenToNonDelegatedEvent('scroll', domElement);\n }\n\n break;\n }\n\n case 'onScrollEnd':\n {\n if (value != null) {\n if (typeof value !== 'function') {\n warnForInvalidEventListener(key, value);\n }\n\n listenToNonDelegatedEvent('scrollend', domElement);\n }\n\n break;\n }\n\n case 'onClick':\n {\n // TODO: This cast may not be sound for SVG, MathML or custom elements.\n if (value != null) {\n if (typeof value !== 'function') {\n warnForInvalidEventListener(key, value);\n }\n\n trapClickOnNonInteractiveElement(domElement);\n }\n\n break;\n }\n\n case 'suppressContentEditableWarning':\n case 'suppressHydrationWarning':\n case 'innerHTML':\n case 'ref':\n {\n // Noop\n break;\n }\n\n case 'innerText': // Properties\n\n case 'textContent':\n\n // Fall through\n\n default:\n {\n if (registrationNameDependencies.hasOwnProperty(key)) {\n if (value != null && typeof value !== 'function') {\n warnForInvalidEventListener(key, value);\n }\n } else {\n {\n if (typeof value === 'boolean') {\n // Special case before the new flag is on\n value = '' + value;\n }\n\n setValueForAttribute(domElement, key, value);\n }\n }\n }\n }\n}\n\nfunction setInitialProperties(domElement, tag, props) {\n {\n validatePropertiesInDevelopment(tag, props);\n } // TODO: Make sure that we check isMounted before firing any of these events.\n\n\n switch (tag) {\n case 'div':\n case 'span':\n case 'svg':\n case 'path':\n case 'a':\n case 'g':\n case 'p':\n case 'li':\n {\n // Fast track the most common tag types\n break;\n }\n\n case 'input':\n {\n {\n checkControlledValueProps('input', props);\n } // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the invalid event.\n\n\n listenToNonDelegatedEvent('invalid', domElement);\n var name = null;\n var type = null;\n var value = null;\n var defaultValue = null;\n var checked = null;\n var defaultChecked = null;\n\n for (var propKey in props) {\n if (!props.hasOwnProperty(propKey)) {\n continue;\n }\n\n var propValue = props[propKey];\n\n if (propValue == null) {\n continue;\n }\n\n switch (propKey) {\n case 'name':\n {\n name = propValue;\n break;\n }\n\n case 'type':\n {\n type = propValue;\n break;\n }\n\n case 'checked':\n {\n checked = propValue;\n break;\n }\n\n case 'defaultChecked':\n {\n defaultChecked = propValue;\n break;\n }\n\n case 'value':\n {\n value = propValue;\n break;\n }\n\n case 'defaultValue':\n {\n defaultValue = propValue;\n break;\n }\n\n case 'children':\n case 'dangerouslySetInnerHTML':\n {\n if (propValue != null) {\n throw new Error(tag + \" is a void element tag and must neither have `children` nor \" + 'use `dangerouslySetInnerHTML`.');\n }\n\n break;\n }\n\n default:\n {\n setProp(domElement, tag, propKey, propValue, props, null);\n }\n }\n } // TODO: Make sure we check if this is still unmounted or do any clean\n // up necessary since we never stop tracking anymore.\n\n\n validateInputProps(domElement, props);\n initInput(domElement, value, defaultValue, checked, defaultChecked, type, name, false);\n track(domElement);\n return;\n }\n\n case 'select':\n {\n {\n checkControlledValueProps('select', props);\n } // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the invalid event.\n\n\n listenToNonDelegatedEvent('invalid', domElement);\n var _value = null;\n var _defaultValue = null;\n var multiple = null;\n\n for (var _propKey in props) {\n if (!props.hasOwnProperty(_propKey)) {\n continue;\n }\n\n var _propValue = props[_propKey];\n\n if (_propValue == null) {\n continue;\n }\n\n switch (_propKey) {\n case 'value':\n {\n _value = _propValue; // This is handled by initSelect below.\n\n break;\n }\n\n case 'defaultValue':\n {\n _defaultValue = _propValue; // This is handled by initSelect below.\n\n break;\n }\n\n case 'multiple':\n {\n multiple = _propValue; // TODO: We don't actually have to fall through here because we set it\n // in initSelect anyway. We can remove the special case in setProp.\n }\n // Fallthrough\n\n default:\n {\n setProp(domElement, tag, _propKey, _propValue, props, null);\n }\n }\n }\n\n validateSelectProps(domElement, props);\n initSelect(domElement, _value, _defaultValue, multiple);\n return;\n }\n\n case 'textarea':\n {\n {\n checkControlledValueProps('textarea', props);\n } // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the invalid event.\n\n\n listenToNonDelegatedEvent('invalid', domElement);\n var _value2 = null;\n var _defaultValue2 = null;\n var children = null;\n\n for (var _propKey2 in props) {\n if (!props.hasOwnProperty(_propKey2)) {\n continue;\n }\n\n var _propValue2 = props[_propKey2];\n\n if (_propValue2 == null) {\n continue;\n }\n\n switch (_propKey2) {\n case 'value':\n {\n _value2 = _propValue2; // This is handled by initTextarea below.\n\n break;\n }\n\n case 'defaultValue':\n {\n _defaultValue2 = _propValue2;\n break;\n }\n\n case 'children':\n {\n children = _propValue2; // Handled by initTextarea above.\n\n break;\n }\n\n case 'dangerouslySetInnerHTML':\n {\n if (_propValue2 != null) {\n // TODO: Do we really need a special error message for this. It's also pretty blunt.\n throw new Error('`dangerouslySetInnerHTML` does not make sense on <textarea>.');\n }\n\n break;\n }\n\n default:\n {\n setProp(domElement, tag, _propKey2, _propValue2, props, null);\n }\n }\n } // TODO: Make sure we check if this is still unmounted or do any clean\n // up necessary since we never stop tracking anymore.\n\n\n validateTextareaProps(domElement, props);\n initTextarea(domElement, _value2, _defaultValue2, children);\n track(domElement);\n return;\n }\n\n case 'option':\n {\n validateOptionProps(domElement, props);\n\n for (var _propKey3 in props) {\n if (!props.hasOwnProperty(_propKey3)) {\n continue;\n }\n\n var _propValue3 = props[_propKey3];\n\n if (_propValue3 == null) {\n continue;\n }\n\n switch (_propKey3) {\n case 'selected':\n {\n // TODO: Remove support for selected on option.\n domElement.selected = _propValue3 && typeof _propValue3 !== 'function' && typeof _propValue3 !== 'symbol';\n break;\n }\n\n default:\n {\n setProp(domElement, tag, _propKey3, _propValue3, props, null);\n }\n }\n }\n\n return;\n }\n\n case 'dialog':\n {\n listenToNonDelegatedEvent('cancel', domElement);\n listenToNonDelegatedEvent('close', domElement);\n break;\n }\n\n case 'iframe':\n case 'object':\n {\n // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the load event.\n listenToNonDelegatedEvent('load', domElement);\n break;\n }\n\n case 'video':\n case 'audio':\n {\n // We listen to these events in case to ensure emulated bubble\n // listeners still fire for all the media events.\n for (var i = 0; i < mediaEventTypes.length; i++) {\n listenToNonDelegatedEvent(mediaEventTypes[i], domElement);\n }\n\n break;\n }\n\n case 'image':\n {\n // We listen to these events in case to ensure emulated bubble\n // listeners still fire for error and load events.\n listenToNonDelegatedEvent('error', domElement);\n listenToNonDelegatedEvent('load', domElement);\n break;\n }\n\n case 'details':\n {\n // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the toggle event.\n listenToNonDelegatedEvent('toggle', domElement);\n break;\n }\n\n case 'embed':\n case 'source':\n case 'img':\n case 'link':\n {\n // These are void elements that also need delegated events.\n listenToNonDelegatedEvent('error', domElement);\n listenToNonDelegatedEvent('load', domElement); // We fallthrough to the return of the void elements\n }\n\n case 'area':\n case 'base':\n case 'br':\n case 'col':\n case 'hr':\n case 'keygen':\n case 'meta':\n case 'param':\n case 'track':\n case 'wbr':\n case 'menuitem':\n {\n // Void elements\n for (var _propKey4 in props) {\n if (!props.hasOwnProperty(_propKey4)) {\n continue;\n }\n\n var _propValue4 = props[_propKey4];\n\n if (_propValue4 == null) {\n continue;\n }\n\n switch (_propKey4) {\n case 'children':\n case 'dangerouslySetInnerHTML':\n {\n // TODO: Can we make this a DEV warning to avoid this deny list?\n throw new Error(tag + \" is a void element tag and must neither have `children` nor \" + 'use `dangerouslySetInnerHTML`.');\n }\n // defaultChecked and defaultValue are ignored by setProp\n\n default:\n {\n setProp(domElement, tag, _propKey4, _propValue4, props, null);\n }\n }\n }\n\n return;\n }\n\n default:\n {\n if (isCustomElement(tag)) {\n for (var _propKey5 in props) {\n if (!props.hasOwnProperty(_propKey5)) {\n continue;\n }\n\n var _propValue5 = props[_propKey5];\n\n if (_propValue5 == null) {\n continue;\n }\n\n setPropOnCustomElement(domElement, tag, _propKey5, _propValue5, props, null);\n }\n\n return;\n }\n }\n }\n\n for (var _propKey6 in props) {\n if (!props.hasOwnProperty(_propKey6)) {\n continue;\n }\n\n var _propValue6 = props[_propKey6];\n\n if (_propValue6 == null) {\n continue;\n }\n\n setProp(domElement, tag, _propKey6, _propValue6, props, null);\n }\n}\nfunction updateProperties(domElement, tag, lastProps, nextProps) {\n {\n validatePropertiesInDevelopment(tag, nextProps);\n }\n\n switch (tag) {\n case 'div':\n case 'span':\n case 'svg':\n case 'path':\n case 'a':\n case 'g':\n case 'p':\n case 'li':\n {\n // Fast track the most common tag types\n break;\n }\n\n case 'input':\n {\n var name = null;\n var type = null;\n var value = null;\n var defaultValue = null;\n var lastDefaultValue = null;\n var checked = null;\n var defaultChecked = null;\n\n for (var propKey in lastProps) {\n var lastProp = lastProps[propKey];\n\n if (lastProps.hasOwnProperty(propKey) && lastProp != null) {\n switch (propKey) {\n case 'checked':\n {\n break;\n }\n\n case 'value':\n {\n // This is handled by updateWrapper below.\n break;\n }\n\n case 'defaultValue':\n {\n lastDefaultValue = lastProp;\n }\n // defaultChecked and defaultValue are ignored by setProp\n // Fallthrough\n\n default:\n {\n if (!nextProps.hasOwnProperty(propKey)) setProp(domElement, tag, propKey, null, nextProps, lastProp);\n }\n }\n }\n }\n\n for (var _propKey7 in nextProps) {\n var nextProp = nextProps[_propKey7];\n var _lastProp = lastProps[_propKey7];\n\n if (nextProps.hasOwnProperty(_propKey7) && (nextProp != null || _lastProp != null)) {\n switch (_propKey7) {\n case 'type':\n {\n type = nextProp;\n break;\n }\n\n case 'name':\n {\n name = nextProp;\n break;\n }\n\n case 'checked':\n {\n checked = nextProp;\n break;\n }\n\n case 'defaultChecked':\n {\n defaultChecked = nextProp;\n break;\n }\n\n case 'value':\n {\n value = nextProp;\n break;\n }\n\n case 'defaultValue':\n {\n defaultValue = nextProp;\n break;\n }\n\n case 'children':\n case 'dangerouslySetInnerHTML':\n {\n if (nextProp != null) {\n throw new Error(tag + \" is a void element tag and must neither have `children` nor \" + 'use `dangerouslySetInnerHTML`.');\n }\n\n break;\n }\n\n default:\n {\n if (nextProp !== _lastProp) setProp(domElement, tag, _propKey7, nextProp, nextProps, _lastProp);\n }\n }\n }\n }\n\n {\n var wasControlled = lastProps.type === 'checkbox' || lastProps.type === 'radio' ? lastProps.checked != null : lastProps.value != null;\n var isControlled = nextProps.type === 'checkbox' || nextProps.type === 'radio' ? nextProps.checked != null : nextProps.value != null;\n\n if (!wasControlled && isControlled && !didWarnUncontrolledToControlled) {\n error('A component is changing an uncontrolled input to be controlled. ' + 'This is likely caused by the value changing from undefined to ' + 'a defined value, which should not happen. ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://react.dev/link/controlled-components');\n\n didWarnUncontrolledToControlled = true;\n }\n\n if (wasControlled && !isControlled && !didWarnControlledToUncontrolled) {\n error('A component is changing a controlled input to be uncontrolled. ' + 'This is likely caused by the value changing from a defined to ' + 'undefined, which should not happen. ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://react.dev/link/controlled-components');\n\n didWarnControlledToUncontrolled = true;\n }\n } // Update the wrapper around inputs *after* updating props. This has to\n // happen after updating the rest of props. Otherwise HTML5 input validations\n // raise warnings and prevent the new value from being assigned.\n\n\n updateInput(domElement, value, defaultValue, lastDefaultValue, checked, defaultChecked, type, name);\n return;\n }\n\n case 'select':\n {\n var _value3 = null;\n var _defaultValue3 = null;\n var multiple = null;\n var wasMultiple = null;\n\n for (var _propKey8 in lastProps) {\n var _lastProp2 = lastProps[_propKey8];\n\n if (lastProps.hasOwnProperty(_propKey8) && _lastProp2 != null) {\n switch (_propKey8) {\n case 'value':\n {\n // This is handled by updateWrapper below.\n break;\n }\n // defaultValue are ignored by setProp\n\n case 'multiple':\n {\n wasMultiple = _lastProp2; // TODO: Move special case in here from setProp.\n }\n // Fallthrough\n\n default:\n {\n if (!nextProps.hasOwnProperty(_propKey8)) setProp(domElement, tag, _propKey8, null, nextProps, _lastProp2);\n }\n }\n }\n }\n\n for (var _propKey9 in nextProps) {\n var _nextProp = nextProps[_propKey9];\n var _lastProp3 = lastProps[_propKey9];\n\n if (nextProps.hasOwnProperty(_propKey9) && (_nextProp != null || _lastProp3 != null)) {\n switch (_propKey9) {\n case 'value':\n {\n _value3 = _nextProp; // This is handled by updateSelect below.\n\n break;\n }\n\n case 'defaultValue':\n {\n _defaultValue3 = _nextProp;\n break;\n }\n\n case 'multiple':\n {\n multiple = _nextProp; // TODO: Just move the special case in here from setProp.\n }\n // Fallthrough\n\n default:\n {\n if (_nextProp !== _lastProp3) setProp(domElement, tag, _propKey9, _nextProp, nextProps, _lastProp3);\n }\n }\n }\n } // <select> value update needs to occur after <option> children\n // reconciliation\n\n\n updateSelect(domElement, _value3, _defaultValue3, multiple, wasMultiple);\n return;\n }\n\n case 'textarea':\n {\n var _value4 = null;\n var _defaultValue4 = null;\n\n for (var _propKey10 in lastProps) {\n var _lastProp4 = lastProps[_propKey10];\n\n if (lastProps.hasOwnProperty(_propKey10) && _lastProp4 != null && !nextProps.hasOwnProperty(_propKey10)) {\n switch (_propKey10) {\n case 'value':\n {\n // This is handled by updateTextarea below.\n break;\n }\n\n case 'children':\n {\n // TODO: This doesn't actually do anything if it updates.\n break;\n }\n // defaultValue is ignored by setProp\n\n default:\n {\n setProp(domElement, tag, _propKey10, null, nextProps, _lastProp4);\n }\n }\n }\n }\n\n for (var _propKey11 in nextProps) {\n var _nextProp2 = nextProps[_propKey11];\n var _lastProp5 = lastProps[_propKey11];\n\n if (nextProps.hasOwnProperty(_propKey11) && (_nextProp2 != null || _lastProp5 != null)) {\n switch (_propKey11) {\n case 'value':\n {\n _value4 = _nextProp2; // This is handled by updateTextarea below.\n\n break;\n }\n\n case 'defaultValue':\n {\n _defaultValue4 = _nextProp2;\n break;\n }\n\n case 'children':\n {\n // TODO: This doesn't actually do anything if it updates.\n break;\n }\n\n case 'dangerouslySetInnerHTML':\n {\n if (_nextProp2 != null) {\n // TODO: Do we really need a special error message for this. It's also pretty blunt.\n throw new Error('`dangerouslySetInnerHTML` does not make sense on <textarea>.');\n }\n\n break;\n }\n\n default:\n {\n if (_nextProp2 !== _lastProp5) setProp(domElement, tag, _propKey11, _nextProp2, nextProps, _lastProp5);\n }\n }\n }\n }\n\n updateTextarea(domElement, _value4, _defaultValue4);\n return;\n }\n\n case 'option':\n {\n for (var _propKey12 in lastProps) {\n var _lastProp6 = lastProps[_propKey12];\n\n if (lastProps.hasOwnProperty(_propKey12) && _lastProp6 != null && !nextProps.hasOwnProperty(_propKey12)) {\n switch (_propKey12) {\n case 'selected':\n {\n // TODO: Remove support for selected on option.\n domElement.selected = false;\n break;\n }\n\n default:\n {\n setProp(domElement, tag, _propKey12, null, nextProps, _lastProp6);\n }\n }\n }\n }\n\n for (var _propKey13 in nextProps) {\n var _nextProp3 = nextProps[_propKey13];\n var _lastProp7 = lastProps[_propKey13];\n\n if (nextProps.hasOwnProperty(_propKey13) && _nextProp3 !== _lastProp7 && (_nextProp3 != null || _lastProp7 != null)) {\n switch (_propKey13) {\n case 'selected':\n {\n // TODO: Remove support for selected on option.\n domElement.selected = _nextProp3 && typeof _nextProp3 !== 'function' && typeof _nextProp3 !== 'symbol';\n break;\n }\n\n default:\n {\n setProp(domElement, tag, _propKey13, _nextProp3, nextProps, _lastProp7);\n }\n }\n }\n }\n\n return;\n }\n\n case 'img':\n case 'link':\n case 'area':\n case 'base':\n case 'br':\n case 'col':\n case 'embed':\n case 'hr':\n case 'keygen':\n case 'meta':\n case 'param':\n case 'source':\n case 'track':\n case 'wbr':\n case 'menuitem':\n {\n // Void elements\n for (var _propKey14 in lastProps) {\n var _lastProp8 = lastProps[_propKey14];\n\n if (lastProps.hasOwnProperty(_propKey14) && _lastProp8 != null && !nextProps.hasOwnProperty(_propKey14)) {\n setProp(domElement, tag, _propKey14, null, nextProps, _lastProp8);\n }\n }\n\n for (var _propKey15 in nextProps) {\n var _nextProp4 = nextProps[_propKey15];\n var _lastProp9 = lastProps[_propKey15];\n\n if (nextProps.hasOwnProperty(_propKey15) && _nextProp4 !== _lastProp9 && (_nextProp4 != null || _lastProp9 != null)) {\n switch (_propKey15) {\n case 'children':\n case 'dangerouslySetInnerHTML':\n {\n if (_nextProp4 != null) {\n // TODO: Can we make this a DEV warning to avoid this deny list?\n throw new Error(tag + \" is a void element tag and must neither have `children` nor \" + 'use `dangerouslySetInnerHTML`.');\n }\n\n break;\n }\n // defaultChecked and defaultValue are ignored by setProp\n\n default:\n {\n setProp(domElement, tag, _propKey15, _nextProp4, nextProps, _lastProp9);\n }\n }\n }\n }\n\n return;\n }\n\n default:\n {\n if (isCustomElement(tag)) {\n for (var _propKey16 in lastProps) {\n var _lastProp10 = lastProps[_propKey16];\n\n if (lastProps.hasOwnProperty(_propKey16) && _lastProp10 != null && !nextProps.hasOwnProperty(_propKey16)) {\n setPropOnCustomElement(domElement, tag, _propKey16, null, nextProps, _lastProp10);\n }\n }\n\n for (var _propKey17 in nextProps) {\n var _nextProp5 = nextProps[_propKey17];\n var _lastProp11 = lastProps[_propKey17];\n\n if (nextProps.hasOwnProperty(_propKey17) && _nextProp5 !== _lastProp11 && (_nextProp5 != null || _lastProp11 != null)) {\n setPropOnCustomElement(domElement, tag, _propKey17, _nextProp5, nextProps, _lastProp11);\n }\n }\n\n return;\n }\n }\n }\n\n for (var _propKey18 in lastProps) {\n var _lastProp12 = lastProps[_propKey18];\n\n if (lastProps.hasOwnProperty(_propKey18) && _lastProp12 != null && !nextProps.hasOwnProperty(_propKey18)) {\n setProp(domElement, tag, _propKey18, null, nextProps, _lastProp12);\n }\n }\n\n for (var _propKey19 in nextProps) {\n var _nextProp6 = nextProps[_propKey19];\n var _lastProp13 = lastProps[_propKey19];\n\n if (nextProps.hasOwnProperty(_propKey19) && _nextProp6 !== _lastProp13 && (_nextProp6 != null || _lastProp13 != null)) {\n setProp(domElement, tag, _propKey19, _nextProp6, nextProps, _lastProp13);\n }\n }\n}\n\nfunction getPossibleStandardName(propName) {\n {\n var lowerCasedName = propName.toLowerCase();\n\n if (!possibleStandardNames.hasOwnProperty(lowerCasedName)) {\n return null;\n }\n\n return possibleStandardNames[lowerCasedName] || null;\n }\n}\n\nfunction diffHydratedStyles(domElement, value) {\n if (value != null && typeof value !== 'object') {\n throw new Error('The `style` prop expects a mapping from style properties to values, ' + \"not a string. For example, style={{marginRight: spacing + 'em'}} when \" + 'using JSX.');\n }\n\n if (canDiffStyleForHydrationWarning) {\n var expectedStyle = createDangerousStringForStyles(value);\n var serverValue = domElement.getAttribute('style');\n warnForPropDifference('style', serverValue, expectedStyle);\n }\n}\n\nfunction hydrateAttribute(domElement, propKey, attributeName, value, extraAttributes) {\n extraAttributes.delete(attributeName);\n var serverValue = domElement.getAttribute(attributeName);\n\n if (serverValue === null) {\n switch (typeof value) {\n case 'undefined':\n case 'function':\n case 'symbol':\n case 'boolean':\n return;\n }\n } else {\n if (value == null) ; else {\n switch (typeof value) {\n case 'function':\n case 'symbol':\n case 'boolean':\n break;\n\n default:\n {\n {\n checkAttributeStringCoercion(value, propKey);\n }\n\n if (serverValue === '' + value) {\n return;\n }\n }\n }\n }\n }\n\n warnForPropDifference(propKey, serverValue, value);\n}\n\nfunction hydrateBooleanAttribute(domElement, propKey, attributeName, value, extraAttributes) {\n extraAttributes.delete(attributeName);\n var serverValue = domElement.getAttribute(attributeName);\n\n if (serverValue === null) {\n switch (typeof value) {\n case 'function':\n case 'symbol':\n return;\n }\n\n if (!value) {\n return;\n }\n } else {\n switch (typeof value) {\n case 'function':\n case 'symbol':\n break;\n\n default:\n {\n if (value) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n // As long as it's positive.\n return;\n }\n }\n }\n }\n\n warnForPropDifference(propKey, serverValue, value);\n}\n\nfunction hydrateOverloadedBooleanAttribute(domElement, propKey, attributeName, value, extraAttributes) {\n extraAttributes.delete(attributeName);\n var serverValue = domElement.getAttribute(attributeName);\n\n if (serverValue === null) {\n switch (typeof value) {\n case 'undefined':\n case 'function':\n case 'symbol':\n return;\n\n default:\n if (value === false) {\n return;\n }\n\n }\n } else {\n if (value == null) ; else {\n switch (typeof value) {\n case 'function':\n case 'symbol':\n break;\n\n case 'boolean':\n if (value === true && serverValue === '') {\n return;\n }\n\n break;\n\n default:\n {\n {\n checkAttributeStringCoercion(value, propKey);\n }\n\n if (serverValue === '' + value) {\n return;\n }\n }\n }\n }\n }\n\n warnForPropDifference(propKey, serverValue, value);\n}\n\nfunction hydrateBooleanishAttribute(domElement, propKey, attributeName, value, extraAttributes) {\n extraAttributes.delete(attributeName);\n var serverValue = domElement.getAttribute(attributeName);\n\n if (serverValue === null) {\n switch (typeof value) {\n case 'undefined':\n case 'function':\n case 'symbol':\n return;\n }\n } else {\n if (value == null) ; else {\n switch (typeof value) {\n case 'function':\n case 'symbol':\n break;\n\n default:\n {\n {\n checkAttributeStringCoercion(value, attributeName);\n }\n\n if (serverValue === '' + value) {\n return;\n }\n }\n }\n }\n }\n\n warnForPropDifference(propKey, serverValue, value);\n}\n\nfunction hydrateNumericAttribute(domElement, propKey, attributeName, value, extraAttributes) {\n extraAttributes.delete(attributeName);\n var serverValue = domElement.getAttribute(attributeName);\n\n if (serverValue === null) {\n switch (typeof value) {\n case 'undefined':\n case 'function':\n case 'symbol':\n case 'boolean':\n return;\n\n default:\n if (isNaN(value)) {\n return;\n }\n\n }\n } else {\n if (value == null) ; else {\n switch (typeof value) {\n case 'function':\n case 'symbol':\n case 'boolean':\n break;\n\n default:\n {\n if (isNaN(value)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n break;\n }\n\n {\n checkAttributeStringCoercion(value, propKey);\n }\n\n if (serverValue === '' + value) {\n return;\n }\n }\n }\n }\n }\n\n warnForPropDifference(propKey, serverValue, value);\n}\n\nfunction hydratePositiveNumericAttribute(domElement, propKey, attributeName, value, extraAttributes) {\n extraAttributes.delete(attributeName);\n var serverValue = domElement.getAttribute(attributeName);\n\n if (serverValue === null) {\n switch (typeof value) {\n case 'undefined':\n case 'function':\n case 'symbol':\n case 'boolean':\n return;\n\n default:\n if (isNaN(value) || value < 1) {\n return;\n }\n\n }\n } else {\n if (value == null) ; else {\n switch (typeof value) {\n case 'function':\n case 'symbol':\n case 'boolean':\n break;\n\n default:\n {\n if (isNaN(value) || value < 1) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n break;\n }\n\n {\n checkAttributeStringCoercion(value, propKey);\n }\n\n if (serverValue === '' + value) {\n return;\n }\n }\n }\n }\n }\n\n warnForPropDifference(propKey, serverValue, value);\n}\n\nfunction hydrateSanitizedAttribute(domElement, propKey, attributeName, value, extraAttributes) {\n extraAttributes.delete(attributeName);\n var serverValue = domElement.getAttribute(attributeName);\n\n if (serverValue === null) {\n switch (typeof value) {\n case 'undefined':\n case 'function':\n case 'symbol':\n case 'boolean':\n return;\n }\n } else {\n if (value == null) ; else {\n switch (typeof value) {\n case 'function':\n case 'symbol':\n case 'boolean':\n break;\n\n default:\n {\n {\n checkAttributeStringCoercion(value, propKey);\n }\n\n var sanitizedValue = sanitizeURL('' + value);\n\n if (serverValue === sanitizedValue) {\n return;\n }\n }\n }\n }\n }\n\n warnForPropDifference(propKey, serverValue, value);\n}\n\nfunction diffHydratedCustomComponent(domElement, tag, props, hostContext, extraAttributes) {\n for (var propKey in props) {\n if (!props.hasOwnProperty(propKey)) {\n continue;\n }\n\n var value = props[propKey];\n\n if (value == null) {\n continue;\n }\n\n if (registrationNameDependencies.hasOwnProperty(propKey)) {\n if (typeof value !== 'function') {\n warnForInvalidEventListener(propKey, value);\n }\n\n continue;\n }\n\n if (props.suppressHydrationWarning === true) {\n // Don't bother comparing. We're ignoring all these warnings.\n continue;\n } // Validate that the properties correspond to their expected values.\n\n\n switch (propKey) {\n case 'children': // Checked above already\n\n case 'suppressContentEditableWarning':\n case 'suppressHydrationWarning':\n case 'defaultValue':\n case 'defaultChecked':\n case 'innerHTML':\n case 'ref':\n // Noop\n continue;\n\n case 'dangerouslySetInnerHTML':\n var serverHTML = domElement.innerHTML;\n var nextHtml = value ? value.__html : undefined;\n\n if (nextHtml != null) {\n var expectedHTML = normalizeHTML(domElement, nextHtml);\n warnForPropDifference(propKey, serverHTML, expectedHTML);\n }\n\n continue;\n\n case 'style':\n extraAttributes.delete(propKey);\n diffHydratedStyles(domElement, value);\n continue;\n\n case 'offsetParent':\n case 'offsetTop':\n case 'offsetLeft':\n case 'offsetWidth':\n case 'offsetHeight':\n case 'isContentEditable':\n case 'outerText':\n case 'outerHTML':\n\n // Fall through\n\n case 'className':\n\n // Fall through\n\n default:\n {\n // This is a DEV-only path\n var hostContextDev = hostContext;\n var hostContextProd = hostContextDev.context;\n\n if (hostContextProd === HostContextNamespaceNone && tag !== 'svg' && tag !== 'math') {\n extraAttributes.delete(propKey.toLowerCase());\n } else {\n extraAttributes.delete(propKey);\n }\n\n var _serverValue = getValueForAttributeOnCustomComponent(domElement, propKey, value);\n\n warnForPropDifference(propKey, _serverValue, value);\n }\n }\n }\n} // This is the exact URL string we expect that Fizz renders if we provide a function action.\n// We use this for hydration warnings. It needs to be in sync with Fizz. Maybe makes sense\n// as a shared module for that reason.\n\n\nvar EXPECTED_FORM_ACTION_URL = // eslint-disable-next-line no-script-url\n\"javascript:throw new Error('React form unexpectedly submitted.')\";\n\nfunction diffHydratedGenericElement(domElement, tag, props, hostContext, extraAttributes) {\n for (var propKey in props) {\n if (!props.hasOwnProperty(propKey)) {\n continue;\n }\n\n var value = props[propKey];\n\n if (value == null) {\n continue;\n }\n\n if (registrationNameDependencies.hasOwnProperty(propKey)) {\n if (typeof value !== 'function') {\n warnForInvalidEventListener(propKey, value);\n }\n\n continue;\n }\n\n if (props.suppressHydrationWarning === true) {\n // Don't bother comparing. We're ignoring all these warnings.\n continue;\n } // Validate that the properties correspond to their expected values.\n\n\n switch (propKey) {\n case 'children': // Checked above already\n\n case 'suppressContentEditableWarning':\n case 'suppressHydrationWarning':\n case 'value': // Controlled attributes are not validated\n\n case 'checked': // TODO: Only ignore them on controlled tags.\n\n case 'selected':\n case 'defaultValue':\n case 'defaultChecked':\n case 'innerHTML':\n case 'ref':\n // Noop\n continue;\n\n case 'dangerouslySetInnerHTML':\n var serverHTML = domElement.innerHTML;\n var nextHtml = value ? value.__html : undefined;\n\n if (nextHtml != null) {\n var expectedHTML = normalizeHTML(domElement, nextHtml);\n warnForPropDifference(propKey, serverHTML, expectedHTML);\n }\n\n continue;\n\n case 'className':\n hydrateAttribute(domElement, propKey, 'class', value, extraAttributes);\n continue;\n\n case 'tabIndex':\n hydrateAttribute(domElement, propKey, 'tabindex', value, extraAttributes);\n continue;\n\n case 'style':\n extraAttributes.delete(propKey);\n diffHydratedStyles(domElement, value);\n continue;\n\n case 'multiple':\n {\n extraAttributes.delete(propKey);\n var serverValue = domElement.multiple;\n warnForPropDifference(propKey, serverValue, value);\n continue;\n }\n\n case 'muted':\n {\n extraAttributes.delete(propKey);\n var _serverValue2 = domElement.muted;\n warnForPropDifference(propKey, _serverValue2, value);\n continue;\n }\n\n case 'autoFocus':\n {\n extraAttributes.delete('autofocus');\n var _serverValue3 = domElement.autofocus;\n warnForPropDifference(propKey, _serverValue3, value);\n continue;\n }\n\n case 'src':\n case 'href':\n\n hydrateSanitizedAttribute(domElement, propKey, propKey, value, extraAttributes);\n continue;\n\n case 'action':\n case 'formAction':\n {\n var _serverValue4 = domElement.getAttribute(propKey);\n\n if (typeof value === 'function') {\n extraAttributes.delete(propKey.toLowerCase()); // The server can set these extra properties to implement actions.\n // So we remove them from the extra attributes warnings.\n\n if (propKey === 'formAction') {\n extraAttributes.delete('name');\n extraAttributes.delete('formenctype');\n extraAttributes.delete('formmethod');\n extraAttributes.delete('formtarget');\n } else {\n extraAttributes.delete('enctype');\n extraAttributes.delete('method');\n extraAttributes.delete('target');\n } // Ideally we should be able to warn if the server value was not a function\n // however since the function can return any of these attributes any way it\n // wants as a custom progressive enhancement, there's nothing to compare to.\n // We can check if the function has the $FORM_ACTION property on the client\n // and if it's not, warn, but that's an unnecessary constraint that they\n // have to have the extra extension that doesn't do anything on the client.\n\n\n continue;\n } else if (_serverValue4 === EXPECTED_FORM_ACTION_URL) {\n extraAttributes.delete(propKey.toLowerCase());\n warnForPropDifference(propKey, 'function', value);\n continue;\n }\n }\n\n hydrateSanitizedAttribute(domElement, propKey, propKey.toLowerCase(), value, extraAttributes);\n continue;\n\n case 'xlinkHref':\n hydrateSanitizedAttribute(domElement, propKey, 'xlink:href', value, extraAttributes);\n continue;\n\n case 'contentEditable':\n {\n // Lower-case Booleanish String\n hydrateBooleanishAttribute(domElement, propKey, 'contenteditable', value, extraAttributes);\n continue;\n }\n\n case 'spellCheck':\n {\n // Lower-case Booleanish String\n hydrateBooleanishAttribute(domElement, propKey, 'spellcheck', value, extraAttributes);\n continue;\n }\n\n case 'draggable':\n case 'autoReverse':\n case 'externalResourcesRequired':\n case 'focusable':\n case 'preserveAlpha':\n {\n // Case-sensitive Booleanish String\n hydrateBooleanishAttribute(domElement, propKey, propKey, value, extraAttributes);\n continue;\n }\n\n case 'allowFullScreen':\n case 'async':\n case 'autoPlay':\n case 'controls':\n case 'default':\n case 'defer':\n case 'disabled':\n case 'disablePictureInPicture':\n case 'disableRemotePlayback':\n case 'formNoValidate':\n case 'hidden':\n case 'loop':\n case 'noModule':\n case 'noValidate':\n case 'open':\n case 'playsInline':\n case 'readOnly':\n case 'required':\n case 'reversed':\n case 'scoped':\n case 'seamless':\n case 'itemScope':\n {\n // Some of these need to be lower case to remove them from the extraAttributes list.\n hydrateBooleanAttribute(domElement, propKey, propKey.toLowerCase(), value, extraAttributes);\n continue;\n }\n\n case 'capture':\n case 'download':\n {\n hydrateOverloadedBooleanAttribute(domElement, propKey, propKey, value, extraAttributes);\n continue;\n }\n\n case 'cols':\n case 'rows':\n case 'size':\n case 'span':\n {\n hydratePositiveNumericAttribute(domElement, propKey, propKey, value, extraAttributes);\n continue;\n }\n\n case 'rowSpan':\n {\n hydrateNumericAttribute(domElement, propKey, 'rowspan', value, extraAttributes);\n continue;\n }\n\n case 'start':\n {\n hydrateNumericAttribute(domElement, propKey, propKey, value, extraAttributes);\n continue;\n }\n\n case 'xHeight':\n hydrateAttribute(domElement, propKey, 'x-height', value, extraAttributes);\n continue;\n\n case 'xlinkActuate':\n hydrateAttribute(domElement, propKey, 'xlink:actuate', value, extraAttributes);\n continue;\n\n case 'xlinkArcrole':\n hydrateAttribute(domElement, propKey, 'xlink:arcrole', value, extraAttributes);\n continue;\n\n case 'xlinkRole':\n hydrateAttribute(domElement, propKey, 'xlink:role', value, extraAttributes);\n continue;\n\n case 'xlinkShow':\n hydrateAttribute(domElement, propKey, 'xlink:show', value, extraAttributes);\n continue;\n\n case 'xlinkTitle':\n hydrateAttribute(domElement, propKey, 'xlink:title', value, extraAttributes);\n continue;\n\n case 'xlinkType':\n hydrateAttribute(domElement, propKey, 'xlink:type', value, extraAttributes);\n continue;\n\n case 'xmlBase':\n hydrateAttribute(domElement, propKey, 'xml:base', value, extraAttributes);\n continue;\n\n case 'xmlLang':\n hydrateAttribute(domElement, propKey, 'xml:lang', value, extraAttributes);\n continue;\n\n case 'xmlSpace':\n hydrateAttribute(domElement, propKey, 'xml:space', value, extraAttributes);\n continue;\n\n case 'inert':\n\n // fallthrough for new boolean props without the flag on\n\n default:\n {\n if ( // shouldIgnoreAttribute\n // We have already filtered out null/undefined and reserved words.\n propKey.length > 2 && (propKey[0] === 'o' || propKey[0] === 'O') && (propKey[1] === 'n' || propKey[1] === 'N')) {\n continue;\n }\n\n var attributeName = getAttributeAlias(propKey);\n var isMismatchDueToBadCasing = false; // This is a DEV-only path\n\n var hostContextDev = hostContext;\n var hostContextProd = hostContextDev.context;\n\n if (hostContextProd === HostContextNamespaceNone && tag !== 'svg' && tag !== 'math') {\n extraAttributes.delete(attributeName.toLowerCase());\n } else {\n var standardName = getPossibleStandardName(propKey);\n\n if (standardName !== null && standardName !== propKey) {\n // If an SVG prop is supplied with bad casing, it will\n // be successfully parsed from HTML, but will produce a mismatch\n // (and would be incorrectly rendered on the client).\n // However, we already warn about bad casing elsewhere.\n // So we'll skip the misleading extra mismatch warning in this case.\n isMismatchDueToBadCasing = true;\n extraAttributes.delete(standardName);\n }\n\n extraAttributes.delete(attributeName);\n }\n\n var _serverValue5 = getValueForAttribute(domElement, attributeName, value);\n\n if (!isMismatchDueToBadCasing) {\n warnForPropDifference(propKey, _serverValue5, value);\n }\n }\n }\n }\n}\n\nfunction diffHydratedProperties(domElement, tag, props, isConcurrentMode, shouldWarnDev, hostContext) {\n {\n validatePropertiesInDevelopment(tag, props);\n } // TODO: Make sure that we check isMounted before firing any of these events.\n\n\n switch (tag) {\n case 'dialog':\n listenToNonDelegatedEvent('cancel', domElement);\n listenToNonDelegatedEvent('close', domElement);\n break;\n\n case 'iframe':\n case 'object':\n case 'embed':\n // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the load event.\n listenToNonDelegatedEvent('load', domElement);\n break;\n\n case 'video':\n case 'audio':\n // We listen to these events in case to ensure emulated bubble\n // listeners still fire for all the media events.\n for (var i = 0; i < mediaEventTypes.length; i++) {\n listenToNonDelegatedEvent(mediaEventTypes[i], domElement);\n }\n\n break;\n\n case 'source':\n // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the error event.\n listenToNonDelegatedEvent('error', domElement);\n break;\n\n case 'img':\n case 'image':\n case 'link':\n // We listen to these events in case to ensure emulated bubble\n // listeners still fire for error and load events.\n listenToNonDelegatedEvent('error', domElement);\n listenToNonDelegatedEvent('load', domElement);\n break;\n\n case 'details':\n // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the toggle event.\n listenToNonDelegatedEvent('toggle', domElement);\n break;\n\n case 'input':\n {\n checkControlledValueProps('input', props);\n } // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the invalid event.\n\n\n listenToNonDelegatedEvent('invalid', domElement); // TODO: Make sure we check if this is still unmounted or do any clean\n // up necessary since we never stop tracking anymore.\n\n validateInputProps(domElement, props); // For input and textarea we current always set the value property at\n // post mount to force it to diverge from attributes. However, for\n // option and select we don't quite do the same thing and select\n // is not resilient to the DOM state changing so we don't do that here.\n // TODO: Consider not doing this for input and textarea.\n\n initInput(domElement, props.value, props.defaultValue, props.checked, props.defaultChecked, props.type, props.name, true);\n track(domElement);\n break;\n\n case 'option':\n validateOptionProps(domElement, props);\n break;\n\n case 'select':\n {\n checkControlledValueProps('select', props);\n } // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the invalid event.\n\n\n listenToNonDelegatedEvent('invalid', domElement);\n validateSelectProps(domElement, props);\n break;\n\n case 'textarea':\n {\n checkControlledValueProps('textarea', props);\n } // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the invalid event.\n\n\n listenToNonDelegatedEvent('invalid', domElement); // TODO: Make sure we check if this is still unmounted or do any clean\n // up necessary since we never stop tracking anymore.\n\n validateTextareaProps(domElement, props);\n initTextarea(domElement, props.value, props.defaultValue, props.children);\n track(domElement);\n break;\n }\n\n var children = props.children; // For text content children we compare against textContent. This\n // might match additional HTML that is hidden when we read it using\n // textContent. E.g. \"foo\" will match \"f<span>oo</span>\" but that still\n // satisfies our requirement. Our requirement is not to produce perfect\n // HTML and attributes. Ideally we should preserve structure but it's\n // ok not to if the visible content is still enough to indicate what\n // even listeners these nodes might be wired up to.\n // TODO: Warn if there is more than a single textNode as a child.\n // TODO: Should we use domElement.firstChild.nodeValue to compare?\n\n if (typeof children === 'string' || typeof children === 'number' || enableBigIntSupport ) {\n // $FlowFixMe[unsafe-addition] Flow doesn't want us to use `+` operator with string and bigint\n if (domElement.textContent !== '' + children) {\n if (props.suppressHydrationWarning !== true) {\n checkForUnmatchedText(domElement.textContent, children, isConcurrentMode, shouldWarnDev);\n }\n\n if (!isConcurrentMode || !enableClientRenderFallbackOnTextMismatch) {\n // We really should be patching this in the commit phase but since\n // this only affects legacy mode hydration which is deprecated anyway\n // we can get away with it.\n // Host singletons get their children appended and don't use the text\n // content mechanism.\n if (tag !== 'body') {\n domElement.textContent = children;\n }\n }\n }\n }\n\n if (props.onScroll != null) {\n listenToNonDelegatedEvent('scroll', domElement);\n }\n\n if (props.onScrollEnd != null) {\n listenToNonDelegatedEvent('scrollend', domElement);\n }\n\n if (props.onClick != null) {\n // TODO: This cast may not be sound for SVG, MathML or custom elements.\n trapClickOnNonInteractiveElement(domElement);\n }\n\n if (shouldWarnDev) {\n var extraAttributes = new Set();\n var attributes = domElement.attributes;\n\n for (var _i = 0; _i < attributes.length; _i++) {\n var name = attributes[_i].name.toLowerCase();\n\n switch (name) {\n // Controlled attributes are not validated\n // TODO: Only ignore them on controlled tags.\n case 'value':\n break;\n\n case 'checked':\n break;\n\n case 'selected':\n break;\n\n default:\n // Intentionally use the original name.\n // See discussion in https://github.com/facebook/react/pull/10676.\n extraAttributes.add(attributes[_i].name);\n }\n }\n\n if (isCustomElement(tag)) {\n diffHydratedCustomComponent(domElement, tag, props, hostContext, extraAttributes);\n } else {\n diffHydratedGenericElement(domElement, tag, props, hostContext, extraAttributes);\n }\n\n if (extraAttributes.size > 0 && props.suppressHydrationWarning !== true) {\n warnForExtraAttributes(extraAttributes);\n }\n }\n}\nfunction diffHydratedText(textNode, text, isConcurrentMode) {\n var isDifferent = textNode.nodeValue !== text;\n return isDifferent;\n}\nfunction warnForDeletedHydratableElement(parentNode, child) {\n {\n if (didWarnInvalidHydration) {\n return;\n }\n\n didWarnInvalidHydration = true;\n\n error('Did not expect server HTML to contain a <%s> in <%s>.', child.nodeName.toLowerCase(), parentNode.nodeName.toLowerCase());\n }\n}\nfunction warnForDeletedHydratableText(parentNode, child) {\n {\n if (didWarnInvalidHydration) {\n return;\n }\n\n didWarnInvalidHydration = true;\n\n error('Did not expect server HTML to contain the text node \"%s\" in <%s>.', child.nodeValue, parentNode.nodeName.toLowerCase());\n }\n}\nfunction warnForInsertedHydratedElement(parentNode, tag, props) {\n {\n if (didWarnInvalidHydration) {\n return;\n }\n\n didWarnInvalidHydration = true;\n\n error('Expected server HTML to contain a matching <%s> in <%s>.', tag, parentNode.nodeName.toLowerCase());\n }\n}\nfunction warnForInsertedHydratedText(parentNode, text) {\n {\n if (didWarnInvalidHydration) {\n return;\n }\n\n didWarnInvalidHydration = true;\n\n error('Expected server HTML to contain a matching text node for \"%s\" in <%s>.', text, parentNode.nodeName.toLowerCase());\n }\n}\nfunction restoreControlledState(domElement, tag, props) {\n switch (tag) {\n case 'input':\n restoreControlledInputState(domElement, props);\n return;\n\n case 'textarea':\n restoreControlledTextareaState(domElement, props);\n return;\n\n case 'select':\n restoreControlledSelectState(domElement, props);\n return;\n }\n}\n\nfunction validateLinkPropsForStyleResource(props) {\n {\n // This should only be called when we know we are opting into Resource semantics (i.e. precedence is not null)\n var href = props.href,\n onLoad = props.onLoad,\n onError = props.onError,\n disabled = props.disabled;\n var includedProps = [];\n if (onLoad) includedProps.push('`onLoad`');\n if (onError) includedProps.push('`onError`');\n if (disabled != null) includedProps.push('`disabled`');\n var includedPropsPhrase = propNamesListJoin(includedProps, 'and');\n includedPropsPhrase += includedProps.length === 1 ? ' prop' : ' props';\n var withArticlePhrase = includedProps.length === 1 ? 'an ' + includedPropsPhrase : 'the ' + includedPropsPhrase;\n\n if (includedProps.length) {\n error('React encountered a <link rel=\"stylesheet\" href=\"%s\" ... /> with a `precedence` prop that' + ' also included %s. The presence of loading and error handlers indicates an intent to manage' + ' the stylesheet loading state from your from your Component code and React will not hoist or' + ' deduplicate this stylesheet. If your intent was to have React hoist and deduplciate this stylesheet' + ' using the `precedence` prop remove the %s, otherwise remove the `precedence` prop.', href, withArticlePhrase, includedPropsPhrase);\n\n return true;\n }\n }\n\n return false;\n}\n\nfunction propNamesListJoin(list, combinator) {\n switch (list.length) {\n case 0:\n return '';\n\n case 1:\n return list[0];\n\n case 2:\n return list[0] + ' ' + combinator + ' ' + list[1];\n\n default:\n return list.slice(0, -1).join(', ') + ', ' + combinator + ' ' + list[list.length - 1];\n }\n}\n\nvar ReactDOMCurrentDispatcher$1 = Internals.ReactDOMCurrentDispatcher; // Unused\n\nvar SUPPRESS_HYDRATION_WARNING = 'suppressHydrationWarning';\nvar SUSPENSE_START_DATA = '$';\nvar SUSPENSE_END_DATA = '/$';\nvar SUSPENSE_PENDING_START_DATA = '$?';\nvar SUSPENSE_FALLBACK_START_DATA = '$!';\nvar FORM_STATE_IS_MATCHING = 'F!';\nvar FORM_STATE_IS_NOT_MATCHING = 'F';\nvar STYLE = 'style';\nvar HostContextNamespaceNone = 0;\nvar HostContextNamespaceSvg = 1;\nvar HostContextNamespaceMath = 2;\nvar eventsEnabled = null;\nvar selectionInformation = null;\n\nfunction getOwnerDocumentFromRootContainer(rootContainerElement) {\n return rootContainerElement.nodeType === DOCUMENT_NODE ? rootContainerElement : rootContainerElement.ownerDocument;\n}\n\nfunction getRootHostContext(rootContainerInstance) {\n var type;\n var context;\n var nodeType = rootContainerInstance.nodeType;\n\n switch (nodeType) {\n case DOCUMENT_NODE:\n case DOCUMENT_FRAGMENT_NODE:\n {\n type = nodeType === DOCUMENT_NODE ? '#document' : '#fragment';\n var root = rootContainerInstance.documentElement;\n\n if (root) {\n var namespaceURI = root.namespaceURI;\n context = namespaceURI ? getOwnHostContext(namespaceURI) : HostContextNamespaceNone;\n } else {\n context = HostContextNamespaceNone;\n }\n\n break;\n }\n\n default:\n {\n var container = nodeType === COMMENT_NODE ? rootContainerInstance.parentNode : rootContainerInstance;\n type = container.tagName;\n var _namespaceURI = container.namespaceURI;\n\n if (!_namespaceURI) {\n switch (type) {\n case 'svg':\n context = HostContextNamespaceSvg;\n break;\n\n case 'math':\n context = HostContextNamespaceMath;\n break;\n\n default:\n context = HostContextNamespaceNone;\n break;\n }\n } else {\n var ownContext = getOwnHostContext(_namespaceURI);\n context = getChildHostContextProd(ownContext, type);\n }\n\n break;\n }\n }\n\n {\n var validatedTag = type.toLowerCase();\n var ancestorInfo = updatedAncestorInfoDev(null, validatedTag);\n return {\n context: context,\n ancestorInfo: ancestorInfo\n };\n }\n}\n\nfunction getOwnHostContext(namespaceURI) {\n switch (namespaceURI) {\n case SVG_NAMESPACE:\n return HostContextNamespaceSvg;\n\n case MATH_NAMESPACE:\n return HostContextNamespaceMath;\n\n default:\n return HostContextNamespaceNone;\n }\n}\n\nfunction getChildHostContextProd(parentNamespace, type) {\n if (parentNamespace === HostContextNamespaceNone) {\n // No (or default) parent namespace: potential entry point.\n switch (type) {\n case 'svg':\n return HostContextNamespaceSvg;\n\n case 'math':\n return HostContextNamespaceMath;\n\n default:\n return HostContextNamespaceNone;\n }\n }\n\n if (parentNamespace === HostContextNamespaceSvg && type === 'foreignObject') {\n // We're leaving SVG.\n return HostContextNamespaceNone;\n } // By default, pass namespace below.\n\n\n return parentNamespace;\n}\n\nfunction getChildHostContext(parentHostContext, type) {\n {\n var parentHostContextDev = parentHostContext;\n var context = getChildHostContextProd(parentHostContextDev.context, type);\n var ancestorInfo = updatedAncestorInfoDev(parentHostContextDev.ancestorInfo, type);\n return {\n context: context,\n ancestorInfo: ancestorInfo\n };\n }\n}\nfunction getPublicInstance(instance) {\n return instance;\n}\nfunction prepareForCommit(containerInfo) {\n eventsEnabled = isEnabled();\n selectionInformation = getSelectionInformation();\n var activeInstance = null;\n\n setEnabled(false);\n return activeInstance;\n}\nfunction resetAfterCommit(containerInfo) {\n restoreSelection(selectionInformation);\n setEnabled(eventsEnabled);\n eventsEnabled = null;\n selectionInformation = null;\n}\nfunction createHoistableInstance(type, props, rootContainerInstance, internalInstanceHandle) {\n var ownerDocument = getOwnerDocumentFromRootContainer(rootContainerInstance);\n var domElement = ownerDocument.createElement(type);\n precacheFiberNode(internalInstanceHandle, domElement);\n updateFiberProps(domElement, props);\n setInitialProperties(domElement, type, props);\n markNodeAsHoistable(domElement);\n return domElement;\n}\nvar warnedUnknownTags = {\n // There are working polyfills for <dialog>. Let people use it.\n dialog: true,\n // Electron ships a custom <webview> tag to display external web content in\n // an isolated frame and process.\n // This tag is not present in non Electron environments such as JSDom which\n // is often used for testing purposes.\n // @see https://electronjs.org/docs/api/webview-tag\n webview: true\n};\nfunction createInstance(type, props, rootContainerInstance, hostContext, internalInstanceHandle) {\n var hostContextProd;\n\n {\n // TODO: take namespace into account when validating.\n var hostContextDev = hostContext;\n validateDOMNesting(type, hostContextDev.ancestorInfo);\n hostContextProd = hostContextDev.context;\n }\n\n var ownerDocument = getOwnerDocumentFromRootContainer(rootContainerInstance);\n var domElement;\n\n switch (hostContextProd) {\n case HostContextNamespaceSvg:\n domElement = ownerDocument.createElementNS(SVG_NAMESPACE, type);\n break;\n\n case HostContextNamespaceMath:\n domElement = ownerDocument.createElementNS(MATH_NAMESPACE, type);\n break;\n\n default:\n switch (type) {\n case 'svg':\n {\n domElement = ownerDocument.createElementNS(SVG_NAMESPACE, type);\n break;\n }\n\n case 'math':\n {\n domElement = ownerDocument.createElementNS(MATH_NAMESPACE, type);\n break;\n }\n\n case 'script':\n {\n // Create the script via .innerHTML so its \"parser-inserted\" flag is\n // set to true and it does not execute\n var div = ownerDocument.createElement('div');\n\n div.innerHTML = '<script><' + '/script>'; // eslint-disable-line\n // This is guaranteed to yield a script element.\n\n var firstChild = div.firstChild;\n domElement = div.removeChild(firstChild);\n break;\n }\n\n case 'select':\n {\n if (typeof props.is === 'string') {\n domElement = ownerDocument.createElement('select', {\n is: props.is\n });\n } else {\n // Separate else branch instead of using `props.is || undefined` above because of a Firefox bug.\n // See discussion in https://github.com/facebook/react/pull/6896\n // and discussion in https://bugzilla.mozilla.org/show_bug.cgi?id=1276240\n domElement = ownerDocument.createElement('select');\n }\n\n if (props.multiple) {\n domElement.multiple = true;\n } else if (props.size) {\n // Setting a size greater than 1 causes a select to behave like `multiple=true`, where\n // it is possible that no option is selected.\n //\n // This is only necessary when a select in \"single selection mode\".\n domElement.size = props.size;\n }\n\n break;\n }\n\n default:\n {\n if (typeof props.is === 'string') {\n domElement = ownerDocument.createElement(type, {\n is: props.is\n });\n } else {\n // Separate else branch instead of using `props.is || undefined` above because of a Firefox bug.\n // See discussion in https://github.com/facebook/react/pull/6896\n // and discussion in https://bugzilla.mozilla.org/show_bug.cgi?id=1276240\n domElement = ownerDocument.createElement(type);\n }\n\n {\n if (type.indexOf('-') === -1) {\n // We're not SVG/MathML and we don't have a dash, so we're not a custom element\n // Even if you use `is`, these should be of known type and lower case.\n if (type !== type.toLowerCase()) {\n error('<%s /> is using incorrect casing. ' + 'Use PascalCase for React components, ' + 'or lowercase for HTML elements.', type);\n }\n\n if ( // $FlowFixMe[method-unbinding]\n Object.prototype.toString.call(domElement) === '[object HTMLUnknownElement]' && !hasOwnProperty.call(warnedUnknownTags, type)) {\n warnedUnknownTags[type] = true;\n\n error('The tag <%s> is unrecognized in this browser. ' + 'If you meant to render a React component, start its name with ' + 'an uppercase letter.', type);\n }\n }\n }\n }\n }\n\n }\n\n precacheFiberNode(internalInstanceHandle, domElement);\n updateFiberProps(domElement, props);\n return domElement;\n}\nfunction appendInitialChild(parentInstance, child) {\n parentInstance.appendChild(child);\n}\nfunction finalizeInitialChildren(domElement, type, props, hostContext) {\n setInitialProperties(domElement, type, props);\n\n switch (type) {\n case 'button':\n case 'input':\n case 'select':\n case 'textarea':\n return !!props.autoFocus;\n\n case 'img':\n return true;\n\n default:\n return false;\n }\n}\nfunction shouldSetTextContent(type, props) {\n return type === 'textarea' || type === 'noscript' || typeof props.children === 'string' || typeof props.children === 'number' || enableBigIntSupport || typeof props.dangerouslySetInnerHTML === 'object' && props.dangerouslySetInnerHTML !== null && props.dangerouslySetInnerHTML.__html != null;\n}\nfunction createTextInstance(text, rootContainerInstance, hostContext, internalInstanceHandle) {\n {\n var hostContextDev = hostContext;\n var ancestor = hostContextDev.ancestorInfo.current;\n\n if (ancestor != null) {\n validateTextNesting(text, ancestor.tag);\n }\n }\n\n var textNode = getOwnerDocumentFromRootContainer(rootContainerInstance).createTextNode(text);\n precacheFiberNode(internalInstanceHandle, textNode);\n return textNode;\n}\nfunction getCurrentEventPriority() {\n var currentEvent = window.event;\n\n if (currentEvent === undefined) {\n return DefaultEventPriority;\n }\n\n return getEventPriority(currentEvent.type);\n}\nvar currentPopstateTransitionEvent = null;\nfunction shouldAttemptEagerTransition() {\n var event = window.event;\n\n if (event && event.type === 'popstate') {\n // This is a popstate event. Attempt to render any transition during this\n // event synchronously. Unless we already attempted during this event.\n if (event === currentPopstateTransitionEvent) {\n // We already attempted to render this popstate transition synchronously.\n // Any subsequent attempts must have happened as the result of a derived\n // update, like startTransition inside useEffect, or useDV. Switch back to\n // the default behavior for all remaining transitions during the current\n // popstate event.\n return false;\n } else {\n // Cache the current event in case a derived transition is scheduled.\n // (Refer to previous branch.)\n currentPopstateTransitionEvent = event;\n return true;\n }\n } // We're not inside a popstate event.\n\n\n currentPopstateTransitionEvent = null;\n return false;\n}\n// if a component just imports ReactDOM (e.g. for findDOMNode).\n// Some environments might not have setTimeout or clearTimeout.\n\nvar scheduleTimeout = typeof setTimeout === 'function' ? setTimeout : undefined;\nvar cancelTimeout = typeof clearTimeout === 'function' ? clearTimeout : undefined;\nvar noTimeout = -1;\nvar localPromise = typeof Promise === 'function' ? Promise : undefined;\nfunction preparePortalMount(portalInstance) {\n listenToAllSupportedEvents(portalInstance);\n}\nvar scheduleMicrotask = typeof queueMicrotask === 'function' ? queueMicrotask : typeof localPromise !== 'undefined' ? function (callback) {\n return localPromise.resolve(null).then(callback).catch(handleErrorInNextTick);\n} : scheduleTimeout; // TODO: Determine the best fallback here.\n\nfunction handleErrorInNextTick(error) {\n setTimeout(function () {\n throw error;\n });\n} // -------------------\nfunction commitMount(domElement, type, newProps, internalInstanceHandle) {\n // Despite the naming that might imply otherwise, this method only\n // fires if there is an `Update` effect scheduled during mounting.\n // This happens if `finalizeInitialChildren` returns `true` (which it\n // does to implement the `autoFocus` attribute on the client). But\n // there are also other cases when this might happen (such as patching\n // up text content during hydration mismatch). So we'll check this again.\n switch (type) {\n case 'button':\n case 'input':\n case 'select':\n case 'textarea':\n if (newProps.autoFocus) {\n domElement.focus();\n }\n\n return;\n\n case 'img':\n {\n if (newProps.src) {\n domElement.src = newProps.src;\n }\n\n return;\n }\n }\n}\nfunction commitUpdate(domElement, updatePayload, type, oldProps, newProps, internalInstanceHandle) {\n // Diff and update the properties.\n updateProperties(domElement, type, oldProps, newProps); // Update the props handle so that we know which props are the ones with\n // with current event handlers.\n\n updateFiberProps(domElement, newProps);\n}\nfunction resetTextContent(domElement) {\n setTextContent(domElement, '');\n}\nfunction commitTextUpdate(textInstance, oldText, newText) {\n textInstance.nodeValue = newText;\n}\nfunction appendChild(parentInstance, child) {\n parentInstance.appendChild(child);\n}\nfunction appendChildToContainer(container, child) {\n var parentNode;\n\n if (container.nodeType === COMMENT_NODE) {\n parentNode = container.parentNode;\n parentNode.insertBefore(child, container);\n } else {\n parentNode = container;\n parentNode.appendChild(child);\n } // This container might be used for a portal.\n // If something inside a portal is clicked, that click should bubble\n // through the React tree. However, on Mobile Safari the click would\n // never bubble through the *DOM* tree unless an ancestor with onclick\n // event exists. So we wouldn't see it and dispatch it.\n // This is why we ensure that non React root containers have inline onclick\n // defined.\n // https://github.com/facebook/react/issues/11918\n\n\n var reactRootContainer = container._reactRootContainer;\n\n if ((reactRootContainer === null || reactRootContainer === undefined) && parentNode.onclick === null) {\n // TODO: This cast may not be sound for SVG, MathML or custom elements.\n trapClickOnNonInteractiveElement(parentNode);\n }\n}\nfunction insertBefore(parentInstance, child, beforeChild) {\n parentInstance.insertBefore(child, beforeChild);\n}\nfunction insertInContainerBefore(container, child, beforeChild) {\n if (container.nodeType === COMMENT_NODE) {\n container.parentNode.insertBefore(child, beforeChild);\n } else {\n container.insertBefore(child, beforeChild);\n }\n}\n\nfunction removeChild(parentInstance, child) {\n parentInstance.removeChild(child);\n}\nfunction removeChildFromContainer(container, child) {\n if (container.nodeType === COMMENT_NODE) {\n container.parentNode.removeChild(child);\n } else {\n container.removeChild(child);\n }\n}\nfunction clearSuspenseBoundary(parentInstance, suspenseInstance) {\n var node = suspenseInstance; // Delete all nodes within this suspense boundary.\n // There might be nested nodes so we need to keep track of how\n // deep we are and only break out when we're back on top.\n\n var depth = 0;\n\n do {\n var nextNode = node.nextSibling;\n parentInstance.removeChild(node);\n\n if (nextNode && nextNode.nodeType === COMMENT_NODE) {\n var data = nextNode.data;\n\n if (data === SUSPENSE_END_DATA) {\n if (depth === 0) {\n parentInstance.removeChild(nextNode); // Retry if any event replaying was blocked on this.\n\n retryIfBlockedOn(suspenseInstance);\n return;\n } else {\n depth--;\n }\n } else if (data === SUSPENSE_START_DATA || data === SUSPENSE_PENDING_START_DATA || data === SUSPENSE_FALLBACK_START_DATA) {\n depth++;\n }\n } // $FlowFixMe[incompatible-type] we bail out when we get a null\n\n\n node = nextNode;\n } while (node); // TODO: Warn, we didn't find the end comment boundary.\n // Retry if any event replaying was blocked on this.\n\n\n retryIfBlockedOn(suspenseInstance);\n}\nfunction clearSuspenseBoundaryFromContainer(container, suspenseInstance) {\n if (container.nodeType === COMMENT_NODE) {\n clearSuspenseBoundary(container.parentNode, suspenseInstance);\n } else if (container.nodeType === ELEMENT_NODE) {\n clearSuspenseBoundary(container, suspenseInstance);\n } else ; // Retry if any event replaying was blocked on this.\n\n\n retryIfBlockedOn(container);\n}\nfunction hideInstance(instance) {\n // TODO: Does this work for all element types? What about MathML? Should we\n // pass host context to this method?\n instance = instance;\n var style = instance.style; // $FlowFixMe[method-unbinding]\n\n if (typeof style.setProperty === 'function') {\n style.setProperty('display', 'none', 'important');\n } else {\n style.display = 'none';\n }\n}\nfunction hideTextInstance(textInstance) {\n textInstance.nodeValue = '';\n}\nfunction unhideInstance(instance, props) {\n instance = instance;\n var styleProp = props[STYLE];\n var display = styleProp !== undefined && styleProp !== null && styleProp.hasOwnProperty('display') ? styleProp.display : null;\n instance.style.display = display == null || typeof display === 'boolean' ? '' : // The value would've errored already if it wasn't safe.\n // eslint-disable-next-line react-internal/safe-string-coercion\n ('' + display).trim();\n}\nfunction unhideTextInstance(textInstance, text) {\n textInstance.nodeValue = text;\n}\nfunction clearContainer(container) {\n var nodeType = container.nodeType;\n\n if (nodeType === DOCUMENT_NODE) {\n clearContainerSparingly(container);\n } else if (nodeType === ELEMENT_NODE) {\n switch (container.nodeName) {\n case 'HEAD':\n case 'HTML':\n case 'BODY':\n clearContainerSparingly(container);\n return;\n\n default:\n {\n container.textContent = '';\n }\n }\n }\n}\n\nfunction clearContainerSparingly(container) {\n var node;\n var nextNode = container.firstChild;\n\n if (nextNode && nextNode.nodeType === DOCUMENT_TYPE_NODE) {\n nextNode = nextNode.nextSibling;\n }\n\n while (nextNode) {\n node = nextNode;\n nextNode = nextNode.nextSibling;\n\n switch (node.nodeName) {\n case 'HTML':\n case 'HEAD':\n case 'BODY':\n {\n var element = node;\n clearContainerSparingly(element); // If these singleton instances had previously been rendered with React they\n // may still hold on to references to the previous fiber tree. We detatch them\n // prospectively to reset them to a baseline starting state since we cannot create\n // new instances.\n\n detachDeletedInstance(element);\n continue;\n }\n // Script tags are retained to avoid an edge case bug. Normally scripts will execute if they\n // are ever inserted into the DOM. However when streaming if a script tag is opened but not\n // yet closed some browsers create and insert the script DOM Node but the script cannot execute\n // yet until the closing tag is parsed. If something causes React to call clearContainer while\n // this DOM node is in the document but not yet executable the DOM node will be removed from the\n // document and when the script closing tag comes in the script will not end up running. This seems\n // to happen in Chrome/Firefox but not Safari at the moment though this is not necessarily specified\n // behavior so it could change in future versions of browsers. While leaving all scripts is broader\n // than strictly necessary this is the least amount of additional code to avoid this breaking\n // edge case.\n //\n // Style tags are retained because they may likely come from 3rd party scripts and extensions\n\n case 'SCRIPT':\n case 'STYLE':\n {\n continue;\n }\n // Stylesheet tags are retained because tehy may likely come from 3rd party scripts and extensions\n\n case 'LINK':\n {\n if (node.rel.toLowerCase() === 'stylesheet') {\n continue;\n }\n }\n }\n\n container.removeChild(node);\n }\n\n return;\n} // Making this so we can eventually move all of the instance caching to the commit phase.\nfunction canHydrateInstance(instance, type, props, inRootOrSingleton) {\n while (instance.nodeType === ELEMENT_NODE) {\n var element = instance;\n var anyProps = props;\n\n if (element.nodeName.toLowerCase() !== type.toLowerCase()) {\n if (!inRootOrSingleton) {\n // Usually we error for mismatched tags.\n if (element.nodeName === 'INPUT' && element.type === 'hidden') ; else {\n return null;\n }\n } // In root or singleton parents we skip past mismatched instances.\n\n } else if (!inRootOrSingleton) {\n // Match\n if (type === 'input' && element.type === 'hidden') {\n {\n checkAttributeStringCoercion(anyProps.name, 'name');\n }\n\n var name = anyProps.name == null ? null : '' + anyProps.name;\n\n if (anyProps.type !== 'hidden' || element.getAttribute('name') !== name) ; else {\n return element;\n }\n } else {\n return element;\n }\n } else if (isMarkedHoistable(element)) ; else {\n // We have an Element with the right type.\n // We are going to try to exclude it if we can definitely identify it as a hoisted Node or if\n // we can guess that the node is likely hoisted or was inserted by a 3rd party script or browser extension\n // using high entropy attributes for certain types. This technique will fail for strange insertions like\n // extension prepending <div> in the <body> but that already breaks before and that is an edge case.\n switch (type) {\n // case 'title':\n //We assume all titles are matchable. You should only have one in the Document, at least in a hoistable scope\n // and if you are a HostComponent with type title we must either be in an <svg> context or this title must have an `itemProp` prop.\n case 'meta':\n {\n // The only way to opt out of hoisting meta tags is to give it an itemprop attribute. We assume there will be\n // not 3rd party meta tags that are prepended, accepting the cases where this isn't true because meta tags\n // are usually only functional for SSR so even in a rare case where we did bind to an injected tag the runtime\n // implications are minimal\n if (!element.hasAttribute('itemprop')) {\n // This is a Hoistable\n break;\n }\n\n return element;\n }\n\n case 'link':\n {\n // Links come in many forms and we do expect 3rd parties to inject them into <head> / <body>. We exclude known resources\n // and then use high-entroy attributes like href which are almost always used and almost always unique to filter out unlikely\n // matches.\n var rel = element.getAttribute('rel');\n\n if (rel === 'stylesheet' && element.hasAttribute('data-precedence')) {\n // This is a stylesheet resource\n break;\n } else if (rel !== anyProps.rel || element.getAttribute('href') !== (anyProps.href == null ? null : anyProps.href) || element.getAttribute('crossorigin') !== (anyProps.crossOrigin == null ? null : anyProps.crossOrigin) || element.getAttribute('title') !== (anyProps.title == null ? null : anyProps.title)) {\n // rel + href should usually be enough to uniquely identify a link however crossOrigin can vary for rel preconnect\n // and title could vary for rel alternate\n break;\n }\n\n return element;\n }\n\n case 'style':\n {\n // Styles are hard to match correctly. We can exclude known resources but otherwise we accept the fact that a non-hoisted style tags\n // in <head> or <body> are likely never going to be unmounted given their position in the document and the fact they likely hold global styles\n if (element.hasAttribute('data-precedence')) {\n // This is a style resource\n break;\n }\n\n return element;\n }\n\n case 'script':\n {\n // Scripts are a little tricky, we exclude known resources and then similar to links try to use high-entropy attributes\n // to reject poor matches. One challenge with scripts are inline scripts. We don't attempt to check text content which could\n // in theory lead to a hydration error later if a 3rd party injected an inline script before the React rendered nodes.\n // Falling back to client rendering if this happens should be seemless though so we will try this hueristic and revisit later\n // if we learn it is problematic\n var srcAttr = element.getAttribute('src');\n\n if (srcAttr !== (anyProps.src == null ? null : anyProps.src) || element.getAttribute('type') !== (anyProps.type == null ? null : anyProps.type) || element.getAttribute('crossorigin') !== (anyProps.crossOrigin == null ? null : anyProps.crossOrigin)) {\n // This script is for a different src/type/crossOrigin. It may be a script resource\n // or it may just be a mistmatch\n if (srcAttr && element.hasAttribute('async') && !element.hasAttribute('itemprop')) {\n // This is an async script resource\n break;\n }\n }\n\n return element;\n }\n\n default:\n {\n // We have excluded the most likely cases of mismatch between hoistable tags, 3rd party script inserted tags,\n // and browser extension inserted tags. While it is possible this is not the right match it is a decent hueristic\n // that should work in the vast majority of cases.\n return element;\n }\n }\n }\n\n var nextInstance = getNextHydratableSibling(element);\n\n if (nextInstance === null) {\n break;\n }\n\n instance = nextInstance;\n } // This is a suspense boundary or Text node or we got the end.\n // Suspense Boundaries are never expected to be injected by 3rd parties. If we see one it should be matched\n // and this is a hydration error.\n // Text Nodes are also not expected to be injected by 3rd parties. This is less of a guarantee for <body>\n // but it seems reasonable and conservative to reject this as a hydration error as well\n\n\n return null;\n}\nfunction canHydrateTextInstance(instance, text, inRootOrSingleton) {\n // Empty strings are not parsed by HTML so there won't be a correct match here.\n if (text === '') return null;\n\n while (instance.nodeType !== TEXT_NODE) {\n if (instance.nodeType === ELEMENT_NODE && instance.nodeName === 'INPUT' && instance.type === 'hidden') ; else if (!inRootOrSingleton) {\n return null;\n }\n\n var nextInstance = getNextHydratableSibling(instance);\n\n if (nextInstance === null) {\n return null;\n }\n\n instance = nextInstance;\n } // This has now been refined to a text node.\n\n\n return instance;\n}\nfunction canHydrateSuspenseInstance(instance, inRootOrSingleton) {\n while (instance.nodeType !== COMMENT_NODE) {\n if (!inRootOrSingleton) {\n return null;\n }\n\n var nextInstance = getNextHydratableSibling(instance);\n\n if (nextInstance === null) {\n return null;\n }\n\n instance = nextInstance;\n } // This has now been refined to a suspense node.\n\n\n return instance;\n}\nfunction isSuspenseInstancePending(instance) {\n return instance.data === SUSPENSE_PENDING_START_DATA;\n}\nfunction isSuspenseInstanceFallback(instance) {\n return instance.data === SUSPENSE_FALLBACK_START_DATA;\n}\nfunction getSuspenseInstanceFallbackErrorDetails(instance) {\n var dataset = instance.nextSibling && instance.nextSibling.dataset;\n var digest, message, stack;\n\n if (dataset) {\n digest = dataset.dgst;\n\n {\n message = dataset.msg;\n stack = dataset.stck;\n }\n }\n\n {\n return {\n message: message,\n digest: digest,\n stack: stack\n };\n }\n}\nfunction registerSuspenseInstanceRetry(instance, callback) {\n instance._reactRetry = callback;\n}\nfunction canHydrateFormStateMarker(instance, inRootOrSingleton) {\n while (instance.nodeType !== COMMENT_NODE) {\n if (!inRootOrSingleton) {\n return null;\n }\n\n var nextInstance = getNextHydratableSibling(instance);\n\n if (nextInstance === null) {\n return null;\n }\n\n instance = nextInstance;\n }\n\n var nodeData = instance.data;\n\n if (nodeData === FORM_STATE_IS_MATCHING || nodeData === FORM_STATE_IS_NOT_MATCHING) {\n var markerInstance = instance;\n return markerInstance;\n }\n\n return null;\n}\nfunction isFormStateMarkerMatching(markerInstance) {\n return markerInstance.data === FORM_STATE_IS_MATCHING;\n}\n\nfunction getNextHydratable(node) {\n // Skip non-hydratable nodes.\n for (; node != null; node = node.nextSibling) {\n var nodeType = node.nodeType;\n\n if (nodeType === ELEMENT_NODE || nodeType === TEXT_NODE) {\n break;\n }\n\n if (nodeType === COMMENT_NODE) {\n var nodeData = node.data;\n\n if (nodeData === SUSPENSE_START_DATA || nodeData === SUSPENSE_FALLBACK_START_DATA || nodeData === SUSPENSE_PENDING_START_DATA || (nodeData === FORM_STATE_IS_MATCHING || nodeData === FORM_STATE_IS_NOT_MATCHING)) {\n break;\n }\n\n if (nodeData === SUSPENSE_END_DATA) {\n return null;\n }\n }\n }\n\n return node;\n}\n\nfunction getNextHydratableSibling(instance) {\n return getNextHydratable(instance.nextSibling);\n}\nfunction getFirstHydratableChild(parentInstance) {\n return getNextHydratable(parentInstance.firstChild);\n}\nfunction getFirstHydratableChildWithinContainer(parentContainer) {\n return getNextHydratable(parentContainer.firstChild);\n}\nfunction getFirstHydratableChildWithinSuspenseInstance(parentInstance) {\n return getNextHydratable(parentInstance.nextSibling);\n}\nfunction validateHydratableInstance(type, props, hostContext) {\n {\n // TODO: take namespace into account when validating.\n var hostContextDev = hostContext;\n return validateDOMNesting(type, hostContextDev.ancestorInfo);\n }\n}\nfunction hydrateInstance(instance, type, props, hostContext, internalInstanceHandle, shouldWarnDev) {\n precacheFiberNode(internalInstanceHandle, instance); // TODO: Possibly defer this until the commit phase where all the events\n // get attached.\n\n updateFiberProps(instance, props); // TODO: Temporary hack to check if we're in a concurrent root. We can delete\n // when the legacy root API is removed.\n\n var isConcurrentMode = (internalInstanceHandle.mode & ConcurrentMode) !== NoMode;\n diffHydratedProperties(instance, type, props, isConcurrentMode, shouldWarnDev, hostContext);\n}\nfunction validateHydratableTextInstance(text, hostContext) {\n {\n var hostContextDev = hostContext;\n var ancestor = hostContextDev.ancestorInfo.current;\n\n if (ancestor != null) {\n return validateTextNesting(text, ancestor.tag);\n }\n }\n\n return true;\n}\nfunction hydrateTextInstance(textInstance, text, internalInstanceHandle, shouldWarnDev) {\n precacheFiberNode(internalInstanceHandle, textInstance); // TODO: Temporary hack to check if we're in a concurrent root. We can delete\n return diffHydratedText(textInstance, text);\n}\nfunction hydrateSuspenseInstance(suspenseInstance, internalInstanceHandle) {\n precacheFiberNode(internalInstanceHandle, suspenseInstance);\n}\nfunction getNextHydratableInstanceAfterSuspenseInstance(suspenseInstance) {\n var node = suspenseInstance.nextSibling; // Skip past all nodes within this suspense boundary.\n // There might be nested nodes so we need to keep track of how\n // deep we are and only break out when we're back on top.\n\n var depth = 0;\n\n while (node) {\n if (node.nodeType === COMMENT_NODE) {\n var data = node.data;\n\n if (data === SUSPENSE_END_DATA) {\n if (depth === 0) {\n return getNextHydratableSibling(node);\n } else {\n depth--;\n }\n } else if (data === SUSPENSE_START_DATA || data === SUSPENSE_FALLBACK_START_DATA || data === SUSPENSE_PENDING_START_DATA) {\n depth++;\n }\n }\n\n node = node.nextSibling;\n } // TODO: Warn, we didn't find the end comment boundary.\n\n\n return null;\n} // Returns the SuspenseInstance if this node is a direct child of a\n// SuspenseInstance. I.e. if its previous sibling is a Comment with\n// SUSPENSE_x_START_DATA. Otherwise, null.\n\nfunction getParentSuspenseInstance(targetInstance) {\n var node = targetInstance.previousSibling; // Skip past all nodes within this suspense boundary.\n // There might be nested nodes so we need to keep track of how\n // deep we are and only break out when we're back on top.\n\n var depth = 0;\n\n while (node) {\n if (node.nodeType === COMMENT_NODE) {\n var data = node.data;\n\n if (data === SUSPENSE_START_DATA || data === SUSPENSE_FALLBACK_START_DATA || data === SUSPENSE_PENDING_START_DATA) {\n if (depth === 0) {\n return node;\n } else {\n depth--;\n }\n } else if (data === SUSPENSE_END_DATA) {\n depth++;\n }\n }\n\n node = node.previousSibling;\n }\n\n return null;\n}\nfunction commitHydratedContainer(container) {\n // Retry if any event replaying was blocked on this.\n retryIfBlockedOn(container);\n}\nfunction commitHydratedSuspenseInstance(suspenseInstance) {\n // Retry if any event replaying was blocked on this.\n retryIfBlockedOn(suspenseInstance);\n}\nfunction shouldDeleteUnhydratedTailInstances(parentType) {\n return parentType !== 'form' && parentType !== 'button';\n}\nfunction didNotMatchHydratedContainerTextInstance(parentContainer, textInstance, text, isConcurrentMode, shouldWarnDev) {\n checkForUnmatchedText(textInstance.nodeValue, text, isConcurrentMode, shouldWarnDev);\n}\nfunction didNotMatchHydratedTextInstance(parentType, parentProps, parentInstance, textInstance, text, isConcurrentMode, shouldWarnDev) {\n if (parentProps[SUPPRESS_HYDRATION_WARNING] !== true) {\n checkForUnmatchedText(textInstance.nodeValue, text, isConcurrentMode, shouldWarnDev);\n }\n}\nfunction didNotHydrateInstanceWithinContainer(parentContainer, instance) {\n {\n if (instance.nodeType === ELEMENT_NODE) {\n warnForDeletedHydratableElement(parentContainer, instance);\n } else if (instance.nodeType === COMMENT_NODE) ; else {\n warnForDeletedHydratableText(parentContainer, instance);\n }\n }\n}\nfunction didNotHydrateInstanceWithinSuspenseInstance(parentInstance, instance) {\n {\n // $FlowFixMe[incompatible-type]: Only Element or Document can be parent nodes.\n var parentNode = parentInstance.parentNode;\n\n if (parentNode !== null) {\n if (instance.nodeType === ELEMENT_NODE) {\n warnForDeletedHydratableElement(parentNode, instance);\n } else if (instance.nodeType === COMMENT_NODE) ; else {\n warnForDeletedHydratableText(parentNode, instance);\n }\n }\n }\n}\nfunction didNotHydrateInstance(parentType, parentProps, parentInstance, instance, isConcurrentMode) {\n {\n if (isConcurrentMode || parentProps[SUPPRESS_HYDRATION_WARNING] !== true) {\n if (instance.nodeType === ELEMENT_NODE) {\n warnForDeletedHydratableElement(parentInstance, instance);\n } else if (instance.nodeType === COMMENT_NODE) ; else {\n warnForDeletedHydratableText(parentInstance, instance);\n }\n }\n }\n}\nfunction didNotFindHydratableInstanceWithinContainer(parentContainer, type, props) {\n {\n warnForInsertedHydratedElement(parentContainer, type);\n }\n}\nfunction didNotFindHydratableTextInstanceWithinContainer(parentContainer, text) {\n {\n warnForInsertedHydratedText(parentContainer, text);\n }\n}\nfunction didNotFindHydratableInstanceWithinSuspenseInstance(parentInstance, type, props) {\n {\n // $FlowFixMe[incompatible-type]: Only Element or Document can be parent nodes.\n var parentNode = parentInstance.parentNode;\n if (parentNode !== null) warnForInsertedHydratedElement(parentNode, type);\n }\n}\nfunction didNotFindHydratableTextInstanceWithinSuspenseInstance(parentInstance, text) {\n {\n // $FlowFixMe[incompatible-type]: Only Element or Document can be parent nodes.\n var parentNode = parentInstance.parentNode;\n if (parentNode !== null) warnForInsertedHydratedText(parentNode, text);\n }\n}\nfunction didNotFindHydratableInstance(parentType, parentProps, parentInstance, type, props, isConcurrentMode) {\n {\n if (isConcurrentMode || parentProps[SUPPRESS_HYDRATION_WARNING] !== true) {\n warnForInsertedHydratedElement(parentInstance, type);\n }\n }\n}\nfunction didNotFindHydratableTextInstance(parentType, parentProps, parentInstance, text, isConcurrentMode) {\n {\n if (isConcurrentMode || parentProps[SUPPRESS_HYDRATION_WARNING] !== true) {\n warnForInsertedHydratedText(parentInstance, text);\n }\n }\n}\nfunction errorHydratingContainer(parentContainer) {\n {\n // TODO: This gets logged by onRecoverableError, too, so we should be\n // able to remove it.\n error('An error occurred during hydration. The server HTML was replaced with client content in <%s>.', parentContainer.nodeName.toLowerCase());\n }\n} // -------------------\nfunction isHostSingletonType(type) {\n return type === 'html' || type === 'head' || type === 'body';\n}\nfunction resolveSingletonInstance(type, props, rootContainerInstance, hostContext, validateDOMNestingDev) {\n {\n var hostContextDev = hostContext;\n\n if (validateDOMNestingDev) {\n validateDOMNesting(type, hostContextDev.ancestorInfo);\n }\n }\n\n var ownerDocument = getOwnerDocumentFromRootContainer(rootContainerInstance);\n\n switch (type) {\n case 'html':\n {\n var documentElement = ownerDocument.documentElement;\n\n if (!documentElement) {\n throw new Error('React expected an <html> element (document.documentElement) to exist in the Document but one was' + ' not found. React never removes the documentElement for any Document it renders into so' + ' the cause is likely in some other script running on this page.');\n }\n\n return documentElement;\n }\n\n case 'head':\n {\n var head = ownerDocument.head;\n\n if (!head) {\n throw new Error('React expected a <head> element (document.head) to exist in the Document but one was' + ' not found. React never removes the head for any Document it renders into so' + ' the cause is likely in some other script running on this page.');\n }\n\n return head;\n }\n\n case 'body':\n {\n var body = ownerDocument.body;\n\n if (!body) {\n throw new Error('React expected a <body> element (document.body) to exist in the Document but one was' + ' not found. React never removes the body for any Document it renders into so' + ' the cause is likely in some other script running on this page.');\n }\n\n return body;\n }\n\n default:\n {\n throw new Error('resolveSingletonInstance was called with an element type that is not supported. This is a bug in React.');\n }\n }\n}\nfunction acquireSingletonInstance(type, props, instance, internalInstanceHandle) {\n {\n var currentInstanceHandle = getInstanceFromNode(instance);\n\n if (currentInstanceHandle) {\n var tagName = instance.tagName.toLowerCase();\n\n error('You are mounting a new %s component when a previous one has not first unmounted. It is an' + ' error to render more than one %s component at a time and attributes and children of these' + ' components will likely fail in unpredictable ways. Please only render a single instance of' + ' <%s> and if you need to mount a new one, ensure any previous ones have unmounted first.', tagName, tagName, tagName);\n }\n\n switch (type) {\n case 'html':\n case 'head':\n case 'body':\n {\n break;\n }\n\n default:\n {\n error('acquireSingletonInstance was called with an element type that is not supported. This is a bug in React.');\n }\n }\n }\n\n var attributes = instance.attributes;\n\n while (attributes.length) {\n instance.removeAttributeNode(attributes[0]);\n }\n\n setInitialProperties(instance, type, props);\n precacheFiberNode(internalInstanceHandle, instance);\n updateFiberProps(instance, props);\n}\nfunction releaseSingletonInstance(instance) {\n var attributes = instance.attributes;\n\n while (attributes.length) {\n instance.removeAttributeNode(attributes[0]);\n }\n\n detachDeletedInstance(instance);\n}\nfunction clearSingleton(instance) {\n var element = instance;\n var node = element.firstChild;\n\n while (node) {\n var nextNode = node.nextSibling;\n var nodeName = node.nodeName;\n\n if (isMarkedHoistable(node) || nodeName === 'HEAD' || nodeName === 'BODY' || nodeName === 'SCRIPT' || nodeName === 'STYLE' || nodeName === 'LINK' && node.rel.toLowerCase() === 'stylesheet') ; else {\n element.removeChild(node);\n }\n\n node = nextNode;\n }\n\n return;\n} // -------------------\nvar NotLoaded =\n/* */\n0;\nvar Loaded =\n/* */\n1;\nvar Errored =\n/* */\n2;\nvar Settled =\n/* */\n3;\nvar Inserted =\n/* */\n4;\nfunction prepareToCommitHoistables() {\n tagCaches = null;\n} // global collections of Resources\n\nvar preloadPropsMap = new Map();\nvar preconnectsSet = new Set(); // getRootNode is missing from IE and old jsdom versions\n\nfunction getHoistableRoot(container) {\n // $FlowFixMe[method-unbinding]\n return typeof container.getRootNode === 'function' ?\n /* $FlowFixMe[incompatible-return] Flow types this as returning a `Node`,\n * but it's either a `Document` or `ShadowRoot`. */\n container.getRootNode() : container.ownerDocument;\n}\n\nfunction getCurrentResourceRoot() {\n var currentContainer = getCurrentRootHostContainer();\n return currentContainer ? getHoistableRoot(currentContainer) : null;\n}\n\nfunction getDocumentFromRoot(root) {\n return root.ownerDocument || root;\n}\n\nvar previousDispatcher = ReactDOMCurrentDispatcher$1.current;\nReactDOMCurrentDispatcher$1.current = {\n prefetchDNS: prefetchDNS$1,\n preconnect: preconnect$1,\n preload: preload$1,\n preloadModule: preloadModule$1,\n preinitStyle: preinitStyle,\n preinitScript: preinitScript,\n preinitModuleScript: preinitModuleScript\n}; // We expect this to get inlined. It is a function mostly to communicate the special nature of\n// how we resolve the HoistableRoot for ReactDOM.pre*() methods. Because we support calling\n// these methods outside of render there is no way to know which Document or ShadowRoot is 'scoped'\n// and so we have to fall back to something universal. Currently we just refer to the global document.\n// This is notable because nowhere else in ReactDOM do we actually reference the global document or window\n// because we may be rendering inside an iframe.\n\nvar globalDocument = typeof document === 'undefined' ? null : document;\n\nfunction getGlobalDocument() {\n return globalDocument;\n}\n\nfunction preconnectAs(rel, href, crossOrigin) {\n var ownerDocument = getGlobalDocument();\n\n if (ownerDocument && typeof href === 'string' && href) {\n var limitedEscapedHref = escapeSelectorAttributeValueInsideDoubleQuotes(href);\n var key = \"link[rel=\\\"\" + rel + \"\\\"][href=\\\"\" + limitedEscapedHref + \"\\\"]\";\n\n if (typeof crossOrigin === 'string') {\n key += \"[crossorigin=\\\"\" + crossOrigin + \"\\\"]\";\n }\n\n if (!preconnectsSet.has(key)) {\n preconnectsSet.add(key);\n var preconnectProps = {\n rel: rel,\n crossOrigin: crossOrigin,\n href: href\n };\n\n if (null === ownerDocument.querySelector(key)) {\n var instance = ownerDocument.createElement('link');\n setInitialProperties(instance, 'link', preconnectProps);\n markNodeAsHoistable(instance);\n ownerDocument.head.appendChild(instance);\n }\n }\n }\n}\n\nfunction prefetchDNS$1(href) {\n\n previousDispatcher.prefetchDNS(href);\n preconnectAs('dns-prefetch', href, null);\n}\n\nfunction preconnect$1(href, crossOrigin) {\n\n previousDispatcher.preconnect(href, crossOrigin);\n preconnectAs('preconnect', href, crossOrigin);\n}\n\nfunction preload$1(href, as, options) {\n\n previousDispatcher.preload(href, as, options);\n var ownerDocument = getGlobalDocument();\n\n if (ownerDocument && href && as) {\n var preloadSelector = \"link[rel=\\\"preload\\\"][as=\\\"\" + escapeSelectorAttributeValueInsideDoubleQuotes(as) + \"\\\"]\";\n\n if (as === 'image') {\n if (options && options.imageSrcSet) {\n preloadSelector += \"[imagesrcset=\\\"\" + escapeSelectorAttributeValueInsideDoubleQuotes(options.imageSrcSet) + \"\\\"]\";\n\n if (typeof options.imageSizes === 'string') {\n preloadSelector += \"[imagesizes=\\\"\" + escapeSelectorAttributeValueInsideDoubleQuotes(options.imageSizes) + \"\\\"]\";\n }\n } else {\n preloadSelector += \"[href=\\\"\" + escapeSelectorAttributeValueInsideDoubleQuotes(href) + \"\\\"]\";\n }\n } else {\n preloadSelector += \"[href=\\\"\" + escapeSelectorAttributeValueInsideDoubleQuotes(href) + \"\\\"]\";\n } // Some preloads are keyed under their selector. This happens when the preload is for\n // an arbitrary type. Other preloads are keyed under the resource key they represent a preload for.\n // Here we figure out which key to use to determine if we have a preload already.\n\n\n var key = preloadSelector;\n\n switch (as) {\n case 'style':\n key = getStyleKey(href);\n break;\n\n case 'script':\n key = getScriptKey(href);\n break;\n }\n\n if (!preloadPropsMap.has(key)) {\n var preloadProps = assign({\n rel: 'preload',\n // There is a bug in Safari where imageSrcSet is not respected on preload links\n // so we omit the href here if we have imageSrcSet b/c safari will load the wrong image.\n // This harms older browers that do not support imageSrcSet by making their preloads not work\n // but this population is shrinking fast and is already small so we accept this tradeoff.\n href: as === 'image' && options && options.imageSrcSet ? undefined : href,\n as: as\n }, options);\n\n preloadPropsMap.set(key, preloadProps);\n\n if (null === ownerDocument.querySelector(preloadSelector)) {\n if (as === 'style' && ownerDocument.querySelector(getStylesheetSelectorFromKey(key))) {\n // We already have a stylesheet for this key. We don't need to preload it.\n return;\n } else if (as === 'script' && ownerDocument.querySelector(getScriptSelectorFromKey(key))) {\n // We already have a stylesheet for this key. We don't need to preload it.\n return;\n }\n\n var instance = ownerDocument.createElement('link');\n setInitialProperties(instance, 'link', preloadProps);\n markNodeAsHoistable(instance);\n ownerDocument.head.appendChild(instance);\n }\n }\n }\n}\n\nfunction preloadModule$1(href, options) {\n\n previousDispatcher.preloadModule(href, options);\n var ownerDocument = getGlobalDocument();\n\n if (ownerDocument && href) {\n var as = options && typeof options.as === 'string' ? options.as : 'script';\n var preloadSelector = \"link[rel=\\\"modulepreload\\\"][as=\\\"\" + escapeSelectorAttributeValueInsideDoubleQuotes(as) + \"\\\"][href=\\\"\" + escapeSelectorAttributeValueInsideDoubleQuotes(href) + \"\\\"]\"; // Some preloads are keyed under their selector. This happens when the preload is for\n // an arbitrary type. Other preloads are keyed under the resource key they represent a preload for.\n // Here we figure out which key to use to determine if we have a preload already.\n\n var key = preloadSelector;\n\n switch (as) {\n case 'audioworklet':\n case 'paintworklet':\n case 'serviceworker':\n case 'sharedworker':\n case 'worker':\n case 'script':\n {\n key = getScriptKey(href);\n break;\n }\n }\n\n if (!preloadPropsMap.has(key)) {\n var props = assign({\n rel: 'modulepreload',\n href: href\n }, options);\n\n preloadPropsMap.set(key, props);\n\n if (null === ownerDocument.querySelector(preloadSelector)) {\n switch (as) {\n case 'audioworklet':\n case 'paintworklet':\n case 'serviceworker':\n case 'sharedworker':\n case 'worker':\n case 'script':\n {\n if (ownerDocument.querySelector(getScriptSelectorFromKey(key))) {\n return;\n }\n }\n }\n\n var instance = ownerDocument.createElement('link');\n setInitialProperties(instance, 'link', props);\n markNodeAsHoistable(instance);\n ownerDocument.head.appendChild(instance);\n }\n }\n }\n}\n\nfunction preinitStyle(href, precedence, options) {\n\n previousDispatcher.preinitStyle(href, precedence, options);\n var ownerDocument = getGlobalDocument();\n\n if (ownerDocument && href) {\n var styles = getResourcesFromRoot(ownerDocument).hoistableStyles;\n var key = getStyleKey(href);\n precedence = precedence || 'default'; // Check if this resource already exists\n\n var resource = styles.get(key);\n\n if (resource) {\n // We can early return. The resource exists and there is nothing\n // more to do\n return;\n }\n\n var state = {\n loading: NotLoaded,\n preload: null\n }; // Attempt to hydrate instance from DOM\n\n var instance = ownerDocument.querySelector(getStylesheetSelectorFromKey(key));\n\n if (instance) {\n state.loading = Loaded | Inserted;\n } else {\n // Construct a new instance and insert it\n var stylesheetProps = assign({\n rel: 'stylesheet',\n href: href,\n 'data-precedence': precedence\n }, options);\n\n var preloadProps = preloadPropsMap.get(key);\n\n if (preloadProps) {\n adoptPreloadPropsForStylesheet(stylesheetProps, preloadProps);\n }\n\n var link = instance = ownerDocument.createElement('link');\n markNodeAsHoistable(link);\n setInitialProperties(link, 'link', stylesheetProps);\n link._p = new Promise(function (resolve, reject) {\n link.onload = resolve;\n link.onerror = reject;\n });\n link.addEventListener('load', function () {\n state.loading |= Loaded;\n });\n link.addEventListener('error', function () {\n state.loading |= Errored;\n });\n state.loading |= Inserted;\n insertStylesheet(instance, precedence, ownerDocument);\n } // Construct a Resource and cache it\n\n\n resource = {\n type: 'stylesheet',\n instance: instance,\n count: 1,\n state: state\n };\n styles.set(key, resource);\n return;\n }\n}\n\nfunction preinitScript(src, options) {\n\n previousDispatcher.preinitScript(src, options);\n var ownerDocument = getGlobalDocument();\n\n if (ownerDocument && src) {\n var scripts = getResourcesFromRoot(ownerDocument).hoistableScripts;\n var key = getScriptKey(src); // Check if this resource already exists\n\n var resource = scripts.get(key);\n\n if (resource) {\n // We can early return. The resource exists and there is nothing\n // more to do\n return;\n } // Attempt to hydrate instance from DOM\n\n\n var instance = ownerDocument.querySelector(getScriptSelectorFromKey(key));\n\n if (!instance) {\n // Construct a new instance and insert it\n var scriptProps = assign({\n src: src,\n async: true\n }, options); // Adopt certain preload props\n\n\n var preloadProps = preloadPropsMap.get(key);\n\n if (preloadProps) {\n adoptPreloadPropsForScript(scriptProps, preloadProps);\n }\n\n instance = ownerDocument.createElement('script');\n markNodeAsHoistable(instance);\n setInitialProperties(instance, 'link', scriptProps);\n ownerDocument.head.appendChild(instance);\n } // Construct a Resource and cache it\n\n\n resource = {\n type: 'script',\n instance: instance,\n count: 1,\n state: null\n };\n scripts.set(key, resource);\n return;\n }\n}\n\nfunction preinitModuleScript(src, options) {\n\n previousDispatcher.preinitModuleScript(src, options);\n var ownerDocument = getGlobalDocument();\n\n if (ownerDocument && src) {\n var scripts = getResourcesFromRoot(ownerDocument).hoistableScripts;\n var key = getScriptKey(src); // Check if this resource already exists\n\n var resource = scripts.get(key);\n\n if (resource) {\n // We can early return. The resource exists and there is nothing\n // more to do\n return;\n } // Attempt to hydrate instance from DOM\n\n\n var instance = ownerDocument.querySelector(getScriptSelectorFromKey(key));\n\n if (!instance) {\n // Construct a new instance and insert it\n var scriptProps = assign({\n src: src,\n async: true,\n type: 'module'\n }, options); // Adopt certain preload props\n\n\n var preloadProps = preloadPropsMap.get(key);\n\n if (preloadProps) {\n adoptPreloadPropsForScript(scriptProps, preloadProps);\n }\n\n instance = ownerDocument.createElement('script');\n markNodeAsHoistable(instance);\n setInitialProperties(instance, 'link', scriptProps);\n ownerDocument.head.appendChild(instance);\n } // Construct a Resource and cache it\n\n\n resource = {\n type: 'script',\n instance: instance,\n count: 1,\n state: null\n };\n scripts.set(key, resource);\n return;\n }\n} // This function is called in begin work and we should always have a currentDocument set\n\n\nfunction getResource(type, currentProps, pendingProps) {\n var resourceRoot = getCurrentResourceRoot();\n\n if (!resourceRoot) {\n throw new Error('\"resourceRoot\" was expected to exist. This is a bug in React.');\n }\n\n switch (type) {\n case 'meta':\n case 'title':\n {\n return null;\n }\n\n case 'style':\n {\n if (typeof pendingProps.precedence === 'string' && typeof pendingProps.href === 'string') {\n var key = getStyleKey(pendingProps.href);\n var styles = getResourcesFromRoot(resourceRoot).hoistableStyles;\n var resource = styles.get(key);\n\n if (!resource) {\n resource = {\n type: 'style',\n instance: null,\n count: 0,\n state: null\n };\n styles.set(key, resource);\n }\n\n return resource;\n }\n\n return {\n type: 'void',\n instance: null,\n count: 0,\n state: null\n };\n }\n\n case 'link':\n {\n if (pendingProps.rel === 'stylesheet' && typeof pendingProps.href === 'string' && typeof pendingProps.precedence === 'string') {\n var qualifiedProps = pendingProps;\n\n var _key = getStyleKey(qualifiedProps.href);\n\n var _styles = getResourcesFromRoot(resourceRoot).hoistableStyles;\n\n var _resource = _styles.get(_key);\n\n if (!_resource) {\n // We asserted this above but Flow can't figure out that the type satisfies\n var ownerDocument = getDocumentFromRoot(resourceRoot);\n _resource = {\n type: 'stylesheet',\n instance: null,\n count: 0,\n state: {\n loading: NotLoaded,\n preload: null\n }\n };\n\n _styles.set(_key, _resource);\n\n if (!preloadPropsMap.has(_key)) {\n preloadStylesheet(ownerDocument, _key, preloadPropsFromStylesheet(qualifiedProps), _resource.state);\n }\n }\n\n return _resource;\n }\n\n return null;\n }\n\n case 'script':\n {\n if (typeof pendingProps.src === 'string' && pendingProps.async === true) {\n var scriptProps = pendingProps;\n\n var _key2 = getScriptKey(scriptProps.src);\n\n var scripts = getResourcesFromRoot(resourceRoot).hoistableScripts;\n\n var _resource2 = scripts.get(_key2);\n\n if (!_resource2) {\n _resource2 = {\n type: 'script',\n instance: null,\n count: 0,\n state: null\n };\n scripts.set(_key2, _resource2);\n }\n\n return _resource2;\n }\n\n return {\n type: 'void',\n instance: null,\n count: 0,\n state: null\n };\n }\n\n default:\n {\n throw new Error(\"getResource encountered a type it did not expect: \\\"\" + type + \"\\\". this is a bug in React.\");\n }\n }\n}\n\nfunction styleTagPropsFromRawProps(rawProps) {\n return assign({}, rawProps, {\n 'data-href': rawProps.href,\n 'data-precedence': rawProps.precedence,\n href: null,\n precedence: null\n });\n}\n\nfunction getStyleKey(href) {\n var limitedEscapedHref = escapeSelectorAttributeValueInsideDoubleQuotes(href);\n return \"href=\\\"\" + limitedEscapedHref + \"\\\"\";\n}\n\nfunction getStyleTagSelector(href) {\n var limitedEscapedHref = escapeSelectorAttributeValueInsideDoubleQuotes(href);\n return \"style[data-href~=\\\"\" + limitedEscapedHref + \"\\\"]\";\n}\n\nfunction getStylesheetSelectorFromKey(key) {\n return \"link[rel=\\\"stylesheet\\\"][\" + key + \"]\";\n}\n\nfunction getPreloadStylesheetSelectorFromKey(key) {\n return \"link[rel=\\\"preload\\\"][as=\\\"style\\\"][\" + key + \"]\";\n}\n\nfunction stylesheetPropsFromRawProps(rawProps) {\n return assign({}, rawProps, {\n 'data-precedence': rawProps.precedence,\n precedence: null\n });\n}\n\nfunction preloadStylesheet(ownerDocument, key, preloadProps, state) {\n preloadPropsMap.set(key, preloadProps);\n\n if (!ownerDocument.querySelector(getStylesheetSelectorFromKey(key))) {\n // There is no matching stylesheet instance in the Document.\n // We will insert a preload now to kick off loading because\n // we expect this stylesheet to commit\n var preloadEl = ownerDocument.querySelector(getPreloadStylesheetSelectorFromKey(key));\n\n if (preloadEl) {\n // If we find a preload already it was SSR'd and we won't have an actual\n // loading state to track. For now we will just assume it is loaded\n state.loading = Loaded;\n } else {\n var instance = ownerDocument.createElement('link');\n state.preload = instance;\n instance.addEventListener('load', function () {\n return state.loading |= Loaded;\n });\n instance.addEventListener('error', function () {\n return state.loading |= Errored;\n });\n setInitialProperties(instance, 'link', preloadProps);\n markNodeAsHoistable(instance);\n ownerDocument.head.appendChild(instance);\n }\n }\n}\n\nfunction preloadPropsFromStylesheet(props) {\n return {\n rel: 'preload',\n as: 'style',\n href: props.href,\n crossOrigin: props.crossOrigin,\n integrity: props.integrity,\n media: props.media,\n hrefLang: props.hrefLang,\n referrerPolicy: props.referrerPolicy\n };\n}\n\nfunction getScriptKey(src) {\n var limitedEscapedSrc = escapeSelectorAttributeValueInsideDoubleQuotes(src);\n return \"[src=\\\"\" + limitedEscapedSrc + \"\\\"]\";\n}\n\nfunction getScriptSelectorFromKey(key) {\n return 'script[async]' + key;\n}\n\nfunction acquireResource(hoistableRoot, resource, props) {\n resource.count++;\n\n if (resource.instance === null) {\n switch (resource.type) {\n case 'style':\n {\n var qualifiedProps = props; // Attempt to hydrate instance from DOM\n\n var instance = hoistableRoot.querySelector(getStyleTagSelector(qualifiedProps.href));\n\n if (instance) {\n resource.instance = instance;\n markNodeAsHoistable(instance);\n return instance;\n }\n\n var styleProps = styleTagPropsFromRawProps(props);\n var ownerDocument = getDocumentFromRoot(hoistableRoot);\n instance = ownerDocument.createElement('style');\n markNodeAsHoistable(instance);\n setInitialProperties(instance, 'style', styleProps); // TODO: `style` does not have loading state for tracking insertions. I\n // guess because these aren't suspensey? Not sure whether this is a\n // factoring smell.\n // resource.state.loading |= Inserted;\n\n insertStylesheet(instance, qualifiedProps.precedence, hoistableRoot);\n resource.instance = instance;\n return instance;\n }\n\n case 'stylesheet':\n {\n // This typing is enforce by `getResource`. If we change the logic\n // there for what qualifies as a stylesheet resource we need to ensure\n // this cast still makes sense;\n var _qualifiedProps = props;\n var key = getStyleKey(_qualifiedProps.href); // Attempt to hydrate instance from DOM\n\n var _instance = hoistableRoot.querySelector(getStylesheetSelectorFromKey(key));\n\n if (_instance) {\n resource.state.loading |= Inserted;\n resource.instance = _instance;\n markNodeAsHoistable(_instance);\n return _instance;\n }\n\n var stylesheetProps = stylesheetPropsFromRawProps(props);\n var preloadProps = preloadPropsMap.get(key);\n\n if (preloadProps) {\n adoptPreloadPropsForStylesheet(stylesheetProps, preloadProps);\n } // Construct and insert a new instance\n\n\n var _ownerDocument = getDocumentFromRoot(hoistableRoot);\n\n _instance = _ownerDocument.createElement('link');\n markNodeAsHoistable(_instance);\n var linkInstance = _instance;\n linkInstance._p = new Promise(function (resolve, reject) {\n linkInstance.onload = resolve;\n linkInstance.onerror = reject;\n });\n setInitialProperties(_instance, 'link', stylesheetProps);\n resource.state.loading |= Inserted;\n insertStylesheet(_instance, _qualifiedProps.precedence, hoistableRoot);\n resource.instance = _instance;\n return _instance;\n }\n\n case 'script':\n {\n // This typing is enforce by `getResource`. If we change the logic\n // there for what qualifies as a stylesheet resource we need to ensure\n // this cast still makes sense;\n var borrowedScriptProps = props;\n\n var _key3 = getScriptKey(borrowedScriptProps.src); // Attempt to hydrate instance from DOM\n\n\n var _instance2 = hoistableRoot.querySelector(getScriptSelectorFromKey(_key3));\n\n if (_instance2) {\n resource.instance = _instance2;\n markNodeAsHoistable(_instance2);\n return _instance2;\n }\n\n var scriptProps = borrowedScriptProps;\n\n var _preloadProps = preloadPropsMap.get(_key3);\n\n if (_preloadProps) {\n scriptProps = assign({}, borrowedScriptProps);\n adoptPreloadPropsForScript(scriptProps, _preloadProps);\n } // Construct and insert a new instance\n\n\n var _ownerDocument2 = getDocumentFromRoot(hoistableRoot);\n\n _instance2 = _ownerDocument2.createElement('script');\n markNodeAsHoistable(_instance2);\n setInitialProperties(_instance2, 'link', scriptProps);\n\n _ownerDocument2.head.appendChild(_instance2);\n\n resource.instance = _instance2;\n return _instance2;\n }\n\n case 'void':\n {\n return null;\n }\n\n default:\n {\n throw new Error(\"acquireResource encountered a resource type it did not expect: \\\"\" + resource.type + \"\\\". this is a bug in React.\");\n }\n }\n } else {\n // In the case of stylesheets, they might have already been assigned an\n // instance during `suspendResource`. But that doesn't mean they were\n // inserted, because the commit might have been interrupted. So we need to\n // check now.\n //\n // The other resource types are unaffected because they are not\n // yet suspensey.\n //\n // TODO: This is a bit of a code smell. Consider refactoring how\n // `suspendResource` and `acquireResource` work together. The idea is that\n // `suspendResource` does all the same stuff as `acquireResource` except\n // for the insertion.\n if (resource.type === 'stylesheet' && (resource.state.loading & Inserted) === NotLoaded) {\n var _qualifiedProps2 = props;\n var _instance3 = resource.instance;\n resource.state.loading |= Inserted;\n insertStylesheet(_instance3, _qualifiedProps2.precedence, hoistableRoot);\n }\n }\n\n return resource.instance;\n}\nfunction releaseResource(resource) {\n resource.count--;\n}\n\nfunction insertStylesheet(instance, precedence, root) {\n var nodes = root.querySelectorAll('link[rel=\"stylesheet\"][data-precedence],style[data-precedence]');\n var last = nodes.length ? nodes[nodes.length - 1] : null;\n var prior = last;\n\n for (var i = 0; i < nodes.length; i++) {\n var node = nodes[i];\n var nodePrecedence = node.dataset.precedence;\n\n if (nodePrecedence === precedence) {\n prior = node;\n } else if (prior !== last) {\n break;\n }\n }\n\n if (prior) {\n // We get the prior from the document so we know it is in the tree.\n // We also know that links can't be the topmost Node so the parentNode\n // must exist.\n prior.parentNode.insertBefore(instance, prior.nextSibling);\n } else {\n var parent = root.nodeType === DOCUMENT_NODE ? root.head : root;\n parent.insertBefore(instance, parent.firstChild);\n }\n}\n\nfunction adoptPreloadPropsForStylesheet(stylesheetProps, preloadProps) {\n if (stylesheetProps.crossOrigin == null) stylesheetProps.crossOrigin = preloadProps.crossOrigin;\n if (stylesheetProps.referrerPolicy == null) stylesheetProps.referrerPolicy = preloadProps.referrerPolicy;\n if (stylesheetProps.title == null) stylesheetProps.title = preloadProps.title;\n}\n\nfunction adoptPreloadPropsForScript(scriptProps, preloadProps) {\n if (scriptProps.crossOrigin == null) scriptProps.crossOrigin = preloadProps.crossOrigin;\n if (scriptProps.referrerPolicy == null) scriptProps.referrerPolicy = preloadProps.referrerPolicy;\n if (scriptProps.integrity == null) scriptProps.integrity = preloadProps.integrity;\n}\n\nvar tagCaches = null;\nfunction hydrateHoistable(hoistableRoot, type, props, internalInstanceHandle) {\n var ownerDocument = getDocumentFromRoot(hoistableRoot);\n var instance = null;\n\n getInstance: switch (type) {\n case 'title':\n {\n instance = ownerDocument.getElementsByTagName('title')[0];\n\n if (!instance || isOwnedInstance(instance) || instance.namespaceURI === SVG_NAMESPACE || instance.hasAttribute('itemprop')) {\n instance = ownerDocument.createElement(type);\n ownerDocument.head.insertBefore(instance, ownerDocument.querySelector('head > title'));\n }\n\n setInitialProperties(instance, type, props);\n precacheFiberNode(internalInstanceHandle, instance);\n markNodeAsHoistable(instance);\n return instance;\n }\n\n case 'link':\n {\n var cache = getHydratableHoistableCache('link', 'href', ownerDocument);\n var key = type + (props.href || '');\n var maybeNodes = cache.get(key);\n\n if (maybeNodes) {\n var nodes = maybeNodes;\n\n for (var i = 0; i < nodes.length; i++) {\n var node = nodes[i];\n\n if (node.getAttribute('href') !== (props.href == null ? null : props.href) || node.getAttribute('rel') !== (props.rel == null ? null : props.rel) || node.getAttribute('title') !== (props.title == null ? null : props.title) || node.getAttribute('crossorigin') !== (props.crossOrigin == null ? null : props.crossOrigin)) {\n // mismatch, try the next node;\n continue;\n }\n\n instance = node;\n nodes.splice(i, 1);\n break getInstance;\n }\n }\n\n instance = ownerDocument.createElement(type);\n setInitialProperties(instance, type, props);\n ownerDocument.head.appendChild(instance);\n break;\n }\n\n case 'meta':\n {\n var _cache = getHydratableHoistableCache('meta', 'content', ownerDocument);\n\n var _key4 = type + (props.content || '');\n\n var _maybeNodes = _cache.get(_key4);\n\n if (_maybeNodes) {\n var _nodes = _maybeNodes;\n\n for (var _i = 0; _i < _nodes.length; _i++) {\n var _node = _nodes[_i]; // We coerce content to string because it is the most likely one to\n // use a `toString` capable value. For the rest we just do identity match\n // passing non-strings here is not really valid anyway.\n\n {\n checkAttributeStringCoercion(props.content, 'content');\n }\n\n if (_node.getAttribute('content') !== (props.content == null ? null : '' + props.content) || _node.getAttribute('name') !== (props.name == null ? null : props.name) || _node.getAttribute('property') !== (props.property == null ? null : props.property) || _node.getAttribute('http-equiv') !== (props.httpEquiv == null ? null : props.httpEquiv) || _node.getAttribute('charset') !== (props.charSet == null ? null : props.charSet)) {\n // mismatch, try the next node;\n continue;\n }\n\n instance = _node;\n\n _nodes.splice(_i, 1);\n\n break getInstance;\n }\n }\n\n instance = ownerDocument.createElement(type);\n setInitialProperties(instance, type, props);\n ownerDocument.head.appendChild(instance);\n break;\n }\n\n default:\n throw new Error(\"getNodesForType encountered a type it did not expect: \\\"\" + type + \"\\\". This is a bug in React.\");\n } // This node is a match\n\n\n precacheFiberNode(internalInstanceHandle, instance);\n markNodeAsHoistable(instance);\n return instance;\n}\n\nfunction getHydratableHoistableCache(type, keyAttribute, ownerDocument) {\n var cache;\n var caches;\n\n if (tagCaches === null) {\n cache = new Map();\n caches = tagCaches = new Map();\n caches.set(ownerDocument, cache);\n } else {\n caches = tagCaches;\n var maybeCache = caches.get(ownerDocument);\n\n if (!maybeCache) {\n cache = new Map();\n caches.set(ownerDocument, cache);\n } else {\n cache = maybeCache;\n }\n }\n\n if (cache.has(type)) {\n // We use type as a special key that signals that this cache has been seeded for this type\n return cache;\n } // Mark this cache as seeded for this type\n\n\n cache.set(type, null);\n var nodes = ownerDocument.getElementsByTagName(type);\n\n for (var i = 0; i < nodes.length; i++) {\n var node = nodes[i];\n\n if (!isOwnedInstance(node) && (type !== 'link' || node.getAttribute('rel') !== 'stylesheet') && node.namespaceURI !== SVG_NAMESPACE) {\n var nodeKey = node.getAttribute(keyAttribute) || '';\n var key = type + nodeKey;\n var existing = cache.get(key);\n\n if (existing) {\n existing.push(node);\n } else {\n cache.set(key, [node]);\n }\n }\n }\n\n return cache;\n}\n\nfunction mountHoistable(hoistableRoot, type, instance) {\n var ownerDocument = getDocumentFromRoot(hoistableRoot);\n ownerDocument.head.insertBefore(instance, type === 'title' ? ownerDocument.querySelector('head > title') : null);\n}\nfunction unmountHoistable(instance) {\n instance.parentNode.removeChild(instance);\n}\nfunction isHostHoistableType(type, props, hostContext) {\n var outsideHostContainerContext;\n var hostContextProd;\n\n {\n var hostContextDev = hostContext; // We can only render resources when we are not within the host container context\n\n outsideHostContainerContext = !hostContextDev.ancestorInfo.containerTagInScope;\n hostContextProd = hostContextDev.context;\n } // Global opt out of hoisting for anything in SVG Namespace or anything with an itemProp inside an itemScope\n\n\n if (hostContextProd === HostContextNamespaceSvg || props.itemProp != null) {\n {\n if (outsideHostContainerContext && props.itemProp != null && (type === 'meta' || type === 'title' || type === 'style' || type === 'link' || type === 'script')) {\n error('Cannot render a <%s> outside the main document if it has an `itemProp` prop. `itemProp` suggests the tag belongs to an' + ' `itemScope` which can appear anywhere in the DOM. If you were intending for React to hoist this <%s> remove the `itemProp` prop.' + ' Otherwise, try moving this tag into the <head> or <body> of the Document.', type, type);\n }\n }\n\n return false;\n }\n\n switch (type) {\n case 'meta':\n case 'title':\n {\n return true;\n }\n\n case 'style':\n {\n if (typeof props.precedence !== 'string' || typeof props.href !== 'string' || props.href === '') {\n {\n if (outsideHostContainerContext) {\n error('Cannot render a <style> outside the main document without knowing its precedence and a unique href key.' + ' React can hoist and deduplicate <style> tags if you provide a `precedence` prop along with an `href` prop that' + ' does not conflic with the `href` values used in any other hoisted <style> or <link rel=\"stylesheet\" ...> tags. ' + ' Note that hoisting <style> tags is considered an advanced feature that most will not use directly.' + ' Consider moving the <style> tag to the <head> or consider adding a `precedence=\"default\"` and `href=\"some unique resource identifier\"`, or move the <style>' + ' to the <style> tag.');\n }\n }\n\n return false;\n }\n\n return true;\n }\n\n case 'link':\n {\n if (typeof props.rel !== 'string' || typeof props.href !== 'string' || props.href === '' || props.onLoad || props.onError) {\n {\n if (props.rel === 'stylesheet' && typeof props.precedence === 'string') {\n validateLinkPropsForStyleResource(props);\n }\n\n if (outsideHostContainerContext) {\n if (typeof props.rel !== 'string' || typeof props.href !== 'string' || props.href === '') {\n error('Cannot render a <link> outside the main document without a `rel` and `href` prop.' + ' Try adding a `rel` and/or `href` prop to this <link> or moving the link into the <head> tag');\n } else if (props.onError || props.onLoad) {\n error('Cannot render a <link> with onLoad or onError listeners outside the main document.' + ' Try removing onLoad={...} and onError={...} or moving it into the root <head> tag or' + ' somewhere in the <body>.');\n }\n }\n }\n\n return false;\n }\n\n switch (props.rel) {\n case 'stylesheet':\n {\n var precedence = props.precedence,\n disabled = props.disabled;\n\n {\n if (typeof precedence !== 'string') {\n if (outsideHostContainerContext) {\n error('Cannot render a <link rel=\"stylesheet\" /> outside the main document without knowing its precedence.' + ' Consider adding precedence=\"default\" or moving it into the root <head> tag.');\n }\n }\n }\n\n return typeof precedence === 'string' && disabled == null;\n }\n\n default:\n {\n return true;\n }\n }\n }\n\n case 'script':\n {\n if (props.async !== true || props.onLoad || props.onError || typeof props.src !== 'string' || !props.src) {\n {\n if (outsideHostContainerContext) {\n if (props.async !== true) {\n error('Cannot render a sync or defer <script> outside the main document without knowing its order.' + ' Try adding async=\"\" or moving it into the root <head> tag.');\n } else if (props.onLoad || props.onError) {\n error('Cannot render a <script> with onLoad or onError listeners outside the main document.' + ' Try removing onLoad={...} and onError={...} or moving it into the root <head> tag or' + ' somewhere in the <body>.');\n } else {\n error('Cannot render a <script> outside the main document without `async={true}` and a non-empty `src` prop.' + ' Ensure there is a valid `src` and either make the script async or move it into the root <head> tag or' + ' somewhere in the <body>.');\n }\n }\n }\n\n return false;\n }\n\n return true;\n }\n\n case 'noscript':\n case 'template':\n {\n {\n if (outsideHostContainerContext) {\n error('Cannot render <%s> outside the main document. Try moving it into the root <head> tag.', type);\n }\n }\n\n return false;\n }\n }\n\n return false;\n}\nfunction mayResourceSuspendCommit(resource) {\n return resource.type === 'stylesheet' && (resource.state.loading & Inserted) === NotLoaded;\n}\nfunction preloadInstance(type, props) {\n // Return true to indicate it's already loaded\n return true;\n}\nfunction preloadResource(resource) {\n if (resource.type === 'stylesheet' && (resource.state.loading & Settled) === NotLoaded) {\n // we have not finished loading the underlying stylesheet yet.\n return false;\n } // Return true to indicate it's already loaded\n\n\n return true;\n}\nvar suspendedState = null; // We use a noop function when we begin suspending because if possible we want the\n// waitfor step to finish synchronously. If it doesn't we'll return a function to\n// provide the actual unsuspend function and that will get completed when the count\n// hits zero or it will get cancelled if the root starts new work.\n\nfunction noop() {}\n\nfunction startSuspendingCommit() {\n suspendedState = {\n stylesheets: null,\n count: 0,\n unsuspend: noop\n };\n}\nfunction suspendResource(hoistableRoot, resource, props) {\n if (suspendedState === null) {\n throw new Error('Internal React Error: suspendedState null when it was expected to exists. Please report this as a React bug.');\n }\n\n var state = suspendedState;\n\n if (resource.type === 'stylesheet') {\n if (typeof props.media === 'string') {\n // If we don't currently match media we avoid suspending on this resource\n // and let it insert on the mutation path\n if (matchMedia(props.media).matches === false) {\n return;\n }\n }\n\n if ((resource.state.loading & Inserted) === NotLoaded) {\n if (resource.instance === null) {\n var qualifiedProps = props;\n var key = getStyleKey(qualifiedProps.href); // Attempt to hydrate instance from DOM\n\n var instance = hoistableRoot.querySelector(getStylesheetSelectorFromKey(key));\n\n if (instance) {\n // If this instance has a loading state it came from the Fizz runtime.\n // If there is not loading state it is assumed to have been server rendered\n // as part of the preamble and therefore synchronously loaded. It could have\n // errored however which we still do not yet have a means to detect. For now\n // we assume it is loaded.\n var maybeLoadingState = instance._p;\n\n if (maybeLoadingState !== null && typeof maybeLoadingState === 'object' && // $FlowFixMe[method-unbinding]\n typeof maybeLoadingState.then === 'function') {\n var loadingState = maybeLoadingState;\n state.count++;\n var ping = onUnsuspend.bind(state);\n loadingState.then(ping, ping);\n }\n\n resource.state.loading |= Inserted;\n resource.instance = instance;\n markNodeAsHoistable(instance);\n return;\n }\n\n var ownerDocument = getDocumentFromRoot(hoistableRoot);\n var stylesheetProps = stylesheetPropsFromRawProps(props);\n var preloadProps = preloadPropsMap.get(key);\n\n if (preloadProps) {\n adoptPreloadPropsForStylesheet(stylesheetProps, preloadProps);\n } // Construct and insert a new instance\n\n\n instance = ownerDocument.createElement('link');\n markNodeAsHoistable(instance);\n var linkInstance = instance; // This Promise is a loading state used by the Fizz runtime. We need this incase there is a race\n // between this resource being rendered on the client and being rendered with a late completed boundary.\n\n linkInstance._p = new Promise(function (resolve, reject) {\n linkInstance.onload = resolve;\n linkInstance.onerror = reject;\n });\n setInitialProperties(instance, 'link', stylesheetProps);\n resource.instance = instance;\n }\n\n if (state.stylesheets === null) {\n state.stylesheets = new Map();\n }\n\n state.stylesheets.set(resource, hoistableRoot);\n var preloadEl = resource.state.preload;\n\n if (preloadEl && (resource.state.loading & Settled) === NotLoaded) {\n state.count++;\n\n var _ping = onUnsuspend.bind(state);\n\n preloadEl.addEventListener('load', _ping);\n preloadEl.addEventListener('error', _ping);\n }\n }\n }\n}\nfunction waitForCommitToBeReady() {\n if (suspendedState === null) {\n throw new Error('Internal React Error: suspendedState null when it was expected to exists. Please report this as a React bug.');\n }\n\n var state = suspendedState;\n\n if (state.stylesheets && state.count === 0) {\n // We are not currently blocked but we have not inserted all stylesheets.\n // If this insertion happens and loads or errors synchronously then we can\n // avoid suspending the commit. To do this we check the count again immediately after\n insertSuspendedStylesheets(state, state.stylesheets);\n } // We need to check the count again because the inserted stylesheets may have led to new\n // tasks to wait on.\n\n\n if (state.count > 0) {\n return function (commit) {\n // We almost never want to show content before its styles have loaded. But\n // eventually we will give up and allow unstyled content. So this number is\n // somewhat arbitrary — big enough that you'd only reach it under\n // extreme circumstances.\n // TODO: Figure out what the browser engines do during initial page load and\n // consider aligning our behavior with that.\n var stylesheetTimer = setTimeout(function () {\n if (state.stylesheets) {\n insertSuspendedStylesheets(state, state.stylesheets);\n }\n\n if (state.unsuspend) {\n var unsuspend = state.unsuspend;\n state.unsuspend = null;\n unsuspend();\n }\n }, 60000); // one minute\n\n state.unsuspend = commit;\n return function () {\n state.unsuspend = null;\n clearTimeout(stylesheetTimer);\n };\n };\n }\n\n return null;\n}\n\nfunction onUnsuspend() {\n this.count--;\n\n if (this.count === 0) {\n if (this.stylesheets) {\n // If we haven't actually inserted the stylesheets yet we need to do so now before starting the commit.\n // The reason we do this after everything else has finished is because we want to have all the stylesheets\n // load synchronously right before mutating. Ideally the new styles will cause a single recalc only on the\n // new tree. When we filled up stylesheets we only inlcuded stylesheets with matching media attributes so we\n // wait for them to load before actually continuing. We expect this to increase the count above zero\n insertSuspendedStylesheets(this, this.stylesheets);\n } else if (this.unsuspend) {\n var unsuspend = this.unsuspend;\n this.unsuspend = null;\n unsuspend();\n }\n }\n} // We use a value that is type distinct from precedence to track which one is last.\n// This ensures there is no collision with user defined precedences. Normally we would\n// just track this in module scope but since the precedences are tracked per HoistableRoot\n// we need to associate it to something other than a global scope hence why we try to\n// colocate it with the map of precedences in the first place\n\n\nvar LAST_PRECEDENCE = null; // This is typecast to non-null because it will always be set before read.\n// it is important that this not be used except when the stack guarantees it exists.\n// Currentlyt his is only during insertSuspendedStylesheet.\n\nvar precedencesByRoot = null;\n\nfunction insertSuspendedStylesheets(state, resources) {\n // We need to clear this out so we don't try to reinsert after the stylesheets have loaded\n state.stylesheets = null;\n\n if (state.unsuspend === null) {\n // The suspended commit was cancelled. We don't need to insert any stylesheets.\n return;\n } // Temporarily increment count. we don't want any synchronously loaded stylesheets to try to unsuspend\n // before we finish inserting all stylesheets.\n\n\n state.count++;\n precedencesByRoot = new Map();\n resources.forEach(insertStylesheetIntoRoot, state);\n precedencesByRoot = null; // We can remove our temporary count and if we're still at zero we can unsuspend.\n // If we are in the synchronous phase before deciding if the commit should suspend and this\n // ends up hitting the unsuspend path it will just invoke the noop unsuspend.\n\n onUnsuspend.call(state);\n}\n\nfunction insertStylesheetIntoRoot(root, resource, map) {\n if (resource.state.loading & Inserted) {\n // This resource was inserted by another root committing. we don't need to insert it again\n return;\n }\n\n var last;\n var precedences = precedencesByRoot.get(root);\n\n if (!precedences) {\n precedences = new Map();\n precedencesByRoot.set(root, precedences);\n var nodes = root.querySelectorAll('link[data-precedence],style[data-precedence]');\n\n for (var i = 0; i < nodes.length; i++) {\n var node = nodes[i];\n\n if (node.nodeName === 'link' || // We omit style tags with media=\"not all\" because they are not in the right position\n // and will be hoisted by the Fizz runtime imminently.\n node.getAttribute('media') !== 'not all') {\n precedences.set(node.dataset.precedence, node);\n last = node;\n }\n }\n\n if (last) {\n precedences.set(LAST_PRECEDENCE, last);\n }\n } else {\n last = precedences.get(LAST_PRECEDENCE);\n } // We only call this after we have constructed an instance so we assume it here\n\n\n var instance = resource.instance; // We will always have a precedence for stylesheet instances\n\n var precedence = instance.getAttribute('data-precedence');\n var prior = precedences.get(precedence) || last;\n\n if (prior === last) {\n precedences.set(LAST_PRECEDENCE, instance);\n }\n\n precedences.set(precedence, instance);\n this.count++;\n var onComplete = onUnsuspend.bind(this);\n instance.addEventListener('load', onComplete);\n instance.addEventListener('error', onComplete);\n\n if (prior) {\n prior.parentNode.insertBefore(instance, prior.nextSibling);\n } else {\n var parent = root.nodeType === DOCUMENT_NODE ? root.head : root;\n parent.insertBefore(instance, parent.firstChild);\n }\n\n resource.state.loading |= Inserted;\n}\n\nvar NotPendingTransition = NotPending;\n\n/* global reportError */\n\nvar defaultOnRecoverableError = typeof reportError === 'function' ? // In modern browsers, reportError will dispatch an error event,\n// emulating an uncaught JavaScript error.\nreportError : function (error) {\n // In older browsers and test environments, fallback to console.error.\n // eslint-disable-next-line react-internal/no-production-logging\n console['error'](error);\n}; // $FlowFixMe[missing-this-annot]\n\nfunction ReactDOMRoot(internalRoot) {\n this._internalRoot = internalRoot;\n} // $FlowFixMe[prop-missing] found when upgrading Flow\n\n\nReactDOMHydrationRoot.prototype.render = ReactDOMRoot.prototype.render = // $FlowFixMe[missing-this-annot]\nfunction (children) {\n var root = this._internalRoot;\n\n if (root === null) {\n throw new Error('Cannot update an unmounted root.');\n }\n\n {\n if (typeof arguments[1] === 'function') {\n error('does not support the second callback argument. ' + 'To execute a side effect after rendering, declare it in a component body with useEffect().');\n } else if (isValidContainer(arguments[1])) {\n error('You passed a container to the second argument of root.render(...). ' + \"You don't need to pass it again since you already passed it to create the root.\");\n } else if (typeof arguments[1] !== 'undefined') {\n error('You passed a second argument to root.render(...) but it only accepts ' + 'one argument.');\n }\n }\n\n updateContainer(children, root, null, null);\n}; // $FlowFixMe[prop-missing] found when upgrading Flow\n\n\nReactDOMHydrationRoot.prototype.unmount = ReactDOMRoot.prototype.unmount = // $FlowFixMe[missing-this-annot]\nfunction () {\n {\n if (typeof arguments[0] === 'function') {\n error('does not support a callback argument. ' + 'To execute a side effect after rendering, declare it in a component body with useEffect().');\n }\n }\n\n var root = this._internalRoot;\n\n if (root !== null) {\n this._internalRoot = null;\n var container = root.containerInfo;\n\n {\n if (isAlreadyRendering()) {\n error('Attempted to synchronously unmount a root while React was already ' + 'rendering. React cannot finish unmounting the root until the ' + 'current render has completed, which may lead to a race condition.');\n }\n }\n\n flushSync$1(function () {\n updateContainer(null, root, null, null);\n });\n unmarkContainerAsRoot(container);\n }\n};\n\nfunction createRoot$1(container, options) {\n if (!isValidContainer(container)) {\n throw new Error('Target container is not a DOM element.');\n }\n\n warnIfReactDOMContainerInDEV(container);\n var isStrictMode = false;\n var concurrentUpdatesByDefaultOverride = false;\n var identifierPrefix = '';\n var onRecoverableError = defaultOnRecoverableError;\n var transitionCallbacks = null;\n\n if (options !== null && options !== undefined) {\n {\n if (options.hydrate) {\n warn('hydrate through createRoot is deprecated. Use ReactDOMClient.hydrateRoot(container, <App />) instead.');\n } else {\n if (typeof options === 'object' && options !== null && options.$$typeof === REACT_ELEMENT_TYPE) {\n error('You passed a JSX element to createRoot. You probably meant to ' + 'call root.render instead. ' + 'Example usage:\\n\\n' + ' let root = createRoot(domContainer);\\n' + ' root.render(<App />);');\n }\n }\n }\n\n if (options.unstable_strictMode === true) {\n isStrictMode = true;\n }\n\n if (options.identifierPrefix !== undefined) {\n identifierPrefix = options.identifierPrefix;\n }\n\n if (options.onRecoverableError !== undefined) {\n onRecoverableError = options.onRecoverableError;\n }\n\n if (options.unstable_transitionCallbacks !== undefined) {\n transitionCallbacks = options.unstable_transitionCallbacks;\n }\n }\n\n var root = createContainer(container, ConcurrentRoot, null, isStrictMode, concurrentUpdatesByDefaultOverride, identifierPrefix, onRecoverableError, transitionCallbacks);\n markContainerAsRoot(root.current, container);\n var rootContainerElement = container.nodeType === COMMENT_NODE ? container.parentNode : container;\n listenToAllSupportedEvents(rootContainerElement); // $FlowFixMe[invalid-constructor] Flow no longer supports calling new on functions\n\n return new ReactDOMRoot(root);\n} // $FlowFixMe[missing-this-annot]\n\nfunction ReactDOMHydrationRoot(internalRoot) {\n this._internalRoot = internalRoot;\n}\n\nfunction scheduleHydration(target) {\n if (target) {\n queueExplicitHydrationTarget(target);\n }\n} // $FlowFixMe[prop-missing] found when upgrading Flow\n\n\nReactDOMHydrationRoot.prototype.unstable_scheduleHydration = scheduleHydration;\nfunction hydrateRoot$1(container, initialChildren, options) {\n if (!isValidContainer(container)) {\n throw new Error('Target container is not a DOM element.');\n }\n\n warnIfReactDOMContainerInDEV(container);\n\n {\n if (initialChildren === undefined) {\n error('Must provide initial children as second argument to hydrateRoot. ' + 'Example usage: hydrateRoot(domContainer, <App />)');\n }\n } // For now we reuse the whole bag of options since they contain\n // the hydration callbacks.\n\n\n var hydrationCallbacks = options != null ? options : null;\n var isStrictMode = false;\n var concurrentUpdatesByDefaultOverride = false;\n var identifierPrefix = '';\n var onRecoverableError = defaultOnRecoverableError;\n var transitionCallbacks = null;\n var formState = null;\n\n if (options !== null && options !== undefined) {\n if (options.unstable_strictMode === true) {\n isStrictMode = true;\n }\n\n if (options.identifierPrefix !== undefined) {\n identifierPrefix = options.identifierPrefix;\n }\n\n if (options.onRecoverableError !== undefined) {\n onRecoverableError = options.onRecoverableError;\n }\n\n if (options.unstable_transitionCallbacks !== undefined) {\n transitionCallbacks = options.unstable_transitionCallbacks;\n }\n\n {\n if (options.formState !== undefined) {\n formState = options.formState;\n }\n }\n }\n\n var root = createHydrationContainer(initialChildren, null, container, ConcurrentRoot, hydrationCallbacks, isStrictMode, concurrentUpdatesByDefaultOverride, identifierPrefix, onRecoverableError, transitionCallbacks, formState);\n markContainerAsRoot(root.current, container); // This can't be a comment node since hydration doesn't work on comment nodes anyway.\n\n listenToAllSupportedEvents(container); // $FlowFixMe[invalid-constructor] Flow no longer supports calling new on functions\n\n return new ReactDOMHydrationRoot(root);\n}\nfunction isValidContainer(node) {\n return !!(node && (node.nodeType === ELEMENT_NODE || node.nodeType === DOCUMENT_NODE || node.nodeType === DOCUMENT_FRAGMENT_NODE || !disableCommentsAsDOMContainers ));\n} // TODO: Remove this function which also includes comment nodes.\n// We only use it in places that are currently more relaxed.\n\nfunction isValidContainerLegacy(node) {\n return !!(node && (node.nodeType === ELEMENT_NODE || node.nodeType === DOCUMENT_NODE || node.nodeType === DOCUMENT_FRAGMENT_NODE || node.nodeType === COMMENT_NODE && node.nodeValue === ' react-mount-point-unstable '));\n}\n\nfunction warnIfReactDOMContainerInDEV(container) {\n {\n if (isContainerMarkedAsRoot(container)) {\n if (container._reactRootContainer) {\n error('You are calling ReactDOMClient.createRoot() on a container that was previously ' + 'passed to ReactDOM.render(). This is not supported.');\n } else {\n error('You are calling ReactDOMClient.createRoot() on a container that ' + 'has already been passed to createRoot() before. Instead, call ' + 'root.render() on the existing root instead if you want to update it.');\n }\n }\n }\n}\n\nvar ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;\nvar topLevelUpdateWarnings;\n\n{\n topLevelUpdateWarnings = function (container) {\n if (container._reactRootContainer && container.nodeType !== COMMENT_NODE) {\n var hostInstance = findHostInstanceWithNoPortals(container._reactRootContainer.current);\n\n if (hostInstance) {\n if (hostInstance.parentNode !== container) {\n error('It looks like the React-rendered content of this ' + 'container was removed without using React. This is not ' + 'supported and will cause errors. Instead, call ' + 'ReactDOM.unmountComponentAtNode to empty a container.');\n }\n }\n }\n\n var isRootRenderedBySomeReact = !!container._reactRootContainer;\n var rootEl = getReactRootElementInContainer(container);\n var hasNonRootReactChild = !!(rootEl && getInstanceFromNode(rootEl));\n\n if (hasNonRootReactChild && !isRootRenderedBySomeReact) {\n error('Replacing React-rendered children with a new root ' + 'component. If you intended to update the children of this node, ' + 'you should instead have the existing children update their state ' + 'and render the new components instead of calling ReactDOM.render.');\n }\n };\n}\n\nfunction getReactRootElementInContainer(container) {\n if (!container) {\n return null;\n }\n\n if (container.nodeType === DOCUMENT_NODE) {\n return container.documentElement;\n } else {\n return container.firstChild;\n }\n}\n\nfunction noopOnRecoverableError() {// This isn't reachable because onRecoverableError isn't called in the\n // legacy API.\n}\n\nfunction legacyCreateRootFromDOMContainer(container, initialChildren, parentComponent, callback, isHydrationContainer) {\n if (isHydrationContainer) {\n if (typeof callback === 'function') {\n var originalCallback = callback;\n\n callback = function () {\n var instance = getPublicRootInstance(root);\n originalCallback.call(instance);\n };\n }\n\n var root = createHydrationContainer(initialChildren, callback, container, LegacyRoot, null, // hydrationCallbacks\n false, // isStrictMode\n false, // concurrentUpdatesByDefaultOverride,\n '', // identifierPrefix\n noopOnRecoverableError, // TODO(luna) Support hydration later\n null, null);\n container._reactRootContainer = root;\n markContainerAsRoot(root.current, container);\n var rootContainerElement = container.nodeType === COMMENT_NODE ? container.parentNode : container; // $FlowFixMe[incompatible-call]\n\n listenToAllSupportedEvents(rootContainerElement);\n flushSync$1();\n return root;\n } else {\n // First clear any existing content.\n clearContainer(container);\n\n if (typeof callback === 'function') {\n var _originalCallback = callback;\n\n callback = function () {\n var instance = getPublicRootInstance(_root);\n\n _originalCallback.call(instance);\n };\n }\n\n var _root = createContainer(container, LegacyRoot, null, // hydrationCallbacks\n false, // isStrictMode\n false, // concurrentUpdatesByDefaultOverride,\n '', // identifierPrefix\n noopOnRecoverableError, // onRecoverableError\n null // transitionCallbacks\n );\n\n container._reactRootContainer = _root;\n markContainerAsRoot(_root.current, container);\n\n var _rootContainerElement = container.nodeType === COMMENT_NODE ? container.parentNode : container; // $FlowFixMe[incompatible-call]\n\n\n listenToAllSupportedEvents(_rootContainerElement); // Initial mount should not be batched.\n\n flushSync$1(function () {\n updateContainer(initialChildren, _root, parentComponent, callback);\n });\n return _root;\n }\n}\n\nfunction warnOnInvalidCallback(callback) {\n {\n if (callback !== null && typeof callback !== 'function') {\n error('Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callback);\n }\n }\n}\n\nfunction legacyRenderSubtreeIntoContainer(parentComponent, children, container, forceHydrate, callback) {\n {\n topLevelUpdateWarnings(container);\n warnOnInvalidCallback(callback === undefined ? null : callback);\n }\n\n var maybeRoot = container._reactRootContainer;\n var root;\n\n if (!maybeRoot) {\n // Initial mount\n root = legacyCreateRootFromDOMContainer(container, children, parentComponent, callback, forceHydrate);\n } else {\n root = maybeRoot;\n\n if (typeof callback === 'function') {\n var originalCallback = callback;\n\n callback = function () {\n var instance = getPublicRootInstance(root);\n originalCallback.call(instance);\n };\n } // Update\n\n\n updateContainer(children, root, parentComponent, callback);\n }\n\n return getPublicRootInstance(root);\n}\n\nfunction findDOMNode(componentOrElement) {\n {\n var owner = ReactCurrentOwner.current;\n\n if (owner !== null && owner.stateNode !== null) {\n var warnedAboutRefsInRender = owner.stateNode._warnedAboutRefsInRender;\n\n if (!warnedAboutRefsInRender) {\n error('%s is accessing findDOMNode inside its render(). ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', getComponentNameFromType(owner.type) || 'A component');\n }\n\n owner.stateNode._warnedAboutRefsInRender = true;\n }\n }\n\n if (componentOrElement == null) {\n return null;\n }\n\n if (componentOrElement.nodeType === ELEMENT_NODE) {\n return componentOrElement;\n }\n\n {\n return findHostInstanceWithWarning(componentOrElement, 'findDOMNode');\n }\n}\nfunction hydrate(element, container, callback) {\n\n {\n error('ReactDOM.hydrate is no longer supported in React 18. Use hydrateRoot ' + 'instead. Until you switch to the new API, your app will behave as ' + \"if it's running React 17. Learn \" + 'more: https://react.dev/link/switch-to-createroot');\n }\n\n if (!isValidContainerLegacy(container)) {\n throw new Error('Target container is not a DOM element.');\n }\n\n {\n var isModernRoot = isContainerMarkedAsRoot(container) && container._reactRootContainer === undefined;\n\n if (isModernRoot) {\n error('You are calling ReactDOM.hydrate() on a container that was previously ' + 'passed to ReactDOMClient.createRoot(). This is not supported. ' + 'Did you mean to call hydrateRoot(container, element)?');\n }\n } // TODO: throw or warn if we couldn't hydrate?\n\n\n return legacyRenderSubtreeIntoContainer(null, element, container, true, callback);\n}\nfunction render(element, container, callback) {\n\n {\n error('ReactDOM.render is no longer supported in React 18. Use createRoot ' + 'instead. Until you switch to the new API, your app will behave as ' + \"if it's running React 17. Learn \" + 'more: https://react.dev/link/switch-to-createroot');\n }\n\n if (!isValidContainerLegacy(container)) {\n throw new Error('Target container is not a DOM element.');\n }\n\n {\n var isModernRoot = isContainerMarkedAsRoot(container) && container._reactRootContainer === undefined;\n\n if (isModernRoot) {\n error('You are calling ReactDOM.render() on a container that was previously ' + 'passed to ReactDOMClient.createRoot(). This is not supported. ' + 'Did you mean to call root.render(element)?');\n }\n }\n\n return legacyRenderSubtreeIntoContainer(null, element, container, false, callback);\n}\nfunction unstable_renderSubtreeIntoContainer(parentComponent, element, containerNode, callback) {\n\n {\n error('ReactDOM.unstable_renderSubtreeIntoContainer() is no longer supported ' + 'in React 18. Consider using a portal instead. Until you switch to ' + \"the createRoot API, your app will behave as if it's running React \" + '17. Learn more: https://react.dev/link/switch-to-createroot');\n }\n\n if (!isValidContainerLegacy(containerNode)) {\n throw new Error('Target container is not a DOM element.');\n }\n\n if (parentComponent == null || !has(parentComponent)) {\n throw new Error('parentComponent must be a valid React Component');\n }\n\n return legacyRenderSubtreeIntoContainer(parentComponent, element, containerNode, false, callback);\n}\nfunction unmountComponentAtNode(container) {\n if (!isValidContainerLegacy(container)) {\n throw new Error('Target container is not a DOM element.');\n }\n\n {\n var isModernRoot = isContainerMarkedAsRoot(container) && container._reactRootContainer === undefined;\n\n if (isModernRoot) {\n error('You are calling ReactDOM.unmountComponentAtNode() on a container that was previously ' + 'passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call root.unmount()?');\n }\n }\n\n if (container._reactRootContainer) {\n {\n var rootEl = getReactRootElementInContainer(container);\n var renderedByDifferentReact = rootEl && !getInstanceFromNode(rootEl);\n\n if (renderedByDifferentReact) {\n error(\"unmountComponentAtNode(): The node you're attempting to unmount \" + 'was rendered by another copy of React.');\n }\n } // Unmount should not be batched.\n\n\n flushSync$1(function () {\n legacyRenderSubtreeIntoContainer(null, null, container, false, function () {\n // $FlowFixMe[incompatible-type] This should probably use `delete container._reactRootContainer`\n container._reactRootContainer = null;\n unmarkContainerAsRoot(container);\n });\n }); // If you call unmountComponentAtNode twice in quick succession, you'll\n // get `true` twice. That's probably fine?\n\n return true;\n } else {\n {\n var _rootEl = getReactRootElementInContainer(container);\n\n var hasNonRootReactChild = !!(_rootEl && getInstanceFromNode(_rootEl)); // Check if the container itself is a React root node.\n\n var isContainerReactRoot = container.nodeType === ELEMENT_NODE && isValidContainerLegacy(container.parentNode) && // $FlowFixMe[prop-missing]\n // $FlowFixMe[incompatible-use]\n !!container.parentNode._reactRootContainer;\n\n if (hasNonRootReactChild) {\n error(\"unmountComponentAtNode(): The node you're attempting to unmount \" + 'was rendered by React and is not a top-level container. %s', isContainerReactRoot ? 'You may have accidentally passed in a React root node instead ' + 'of its container.' : 'Instead, have the parent component update its state and ' + 'rerender in order to remove this component.');\n }\n }\n\n return false;\n }\n}\n\nfunction getCrossOriginString(input) {\n if (typeof input === 'string') {\n return input === 'use-credentials' ? input : '';\n }\n\n return undefined;\n}\nfunction getCrossOriginStringAs(as, input) {\n if (as === 'font') {\n return '';\n }\n\n if (typeof input === 'string') {\n return input === 'use-credentials' ? input : '';\n }\n\n return undefined;\n}\n\nvar ReactDOMCurrentDispatcher = Internals.ReactDOMCurrentDispatcher;\nfunction prefetchDNS(href) {\n {\n if (typeof href !== 'string' || !href) {\n error('ReactDOM.prefetchDNS(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.', getValueDescriptorExpectingObjectForWarning(href));\n } else if (arguments.length > 1) {\n var options = arguments[1];\n\n if (typeof options === 'object' && options.hasOwnProperty('crossOrigin')) {\n error('ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. It looks like the you are attempting to set a crossOrigin property for this DNS lookup hint. Browsers do not perform DNS queries using CORS and setting this attribute on the resource hint has no effect. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.', getValueDescriptorExpectingEnumForWarning(options));\n } else {\n error('ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.', getValueDescriptorExpectingEnumForWarning(options));\n }\n }\n }\n\n if (typeof href === 'string') {\n ReactDOMCurrentDispatcher.current.prefetchDNS(href);\n } // We don't error because preconnect needs to be resilient to being called in a variety of scopes\n // and the runtime may not be capable of responding. The function is optimistic and not critical\n // so we favor silent bailout over warning or erroring.\n\n}\nfunction preconnect(href, options) {\n {\n if (typeof href !== 'string' || !href) {\n error('ReactDOM.preconnect(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.', getValueDescriptorExpectingObjectForWarning(href));\n } else if (options != null && typeof options !== 'object') {\n error('ReactDOM.preconnect(): Expected the `options` argument (second) to be an object but encountered %s instead. The only supported option at this time is `crossOrigin` which accepts a string.', getValueDescriptorExpectingEnumForWarning(options));\n } else if (options != null && typeof options.crossOrigin !== 'string') {\n error('ReactDOM.preconnect(): Expected the `crossOrigin` option (second argument) to be a string but encountered %s instead. Try removing this option or passing a string value instead.', getValueDescriptorExpectingObjectForWarning(options.crossOrigin));\n }\n }\n\n if (typeof href === 'string') {\n var crossOrigin = options ? getCrossOriginString(options.crossOrigin) : null;\n ReactDOMCurrentDispatcher.current.preconnect(href, crossOrigin);\n } // We don't error because preconnect needs to be resilient to being called in a variety of scopes\n // and the runtime may not be capable of responding. The function is optimistic and not critical\n // so we favor silent bailout over warning or erroring.\n\n}\nfunction preload(href, options) {\n {\n var encountered = '';\n\n if (typeof href !== 'string' || !href) {\n encountered += \" The `href` argument encountered was \" + getValueDescriptorExpectingObjectForWarning(href) + \".\";\n }\n\n if (options == null || typeof options !== 'object') {\n encountered += \" The `options` argument encountered was \" + getValueDescriptorExpectingObjectForWarning(options) + \".\";\n } else if (typeof options.as !== 'string' || !options.as) {\n encountered += \" The `as` option encountered was \" + getValueDescriptorExpectingObjectForWarning(options.as) + \".\";\n }\n\n if (encountered) {\n error('ReactDOM.preload(): Expected two arguments, a non-empty `href` string and an `options` object with an `as` property valid for a `<link rel=\"preload\" as=\"...\" />` tag.%s', encountered);\n }\n }\n\n if (typeof href === 'string' && // We check existence because we cannot enforce this function is actually called with the stated type\n typeof options === 'object' && options !== null && typeof options.as === 'string') {\n var as = options.as;\n var crossOrigin = getCrossOriginStringAs(as, options.crossOrigin);\n ReactDOMCurrentDispatcher.current.preload(href, as, {\n crossOrigin: crossOrigin,\n integrity: typeof options.integrity === 'string' ? options.integrity : undefined,\n nonce: typeof options.nonce === 'string' ? options.nonce : undefined,\n type: typeof options.type === 'string' ? options.type : undefined,\n fetchPriority: typeof options.fetchPriority === 'string' ? options.fetchPriority : undefined,\n referrerPolicy: typeof options.referrerPolicy === 'string' ? options.referrerPolicy : undefined,\n imageSrcSet: typeof options.imageSrcSet === 'string' ? options.imageSrcSet : undefined,\n imageSizes: typeof options.imageSizes === 'string' ? options.imageSizes : undefined\n });\n } // We don't error because preload needs to be resilient to being called in a variety of scopes\n // and the runtime may not be capable of responding. The function is optimistic and not critical\n // so we favor silent bailout over warning or erroring.\n\n}\nfunction preloadModule(href, options) {\n {\n var encountered = '';\n\n if (typeof href !== 'string' || !href) {\n encountered += \" The `href` argument encountered was \" + getValueDescriptorExpectingObjectForWarning(href) + \".\";\n }\n\n if (options !== undefined && typeof options !== 'object') {\n encountered += \" The `options` argument encountered was \" + getValueDescriptorExpectingObjectForWarning(options) + \".\";\n } else if (options && 'as' in options && typeof options.as !== 'string') {\n encountered += \" The `as` option encountered was \" + getValueDescriptorExpectingObjectForWarning(options.as) + \".\";\n }\n\n if (encountered) {\n error('ReactDOM.preloadModule(): Expected two arguments, a non-empty `href` string and, optionally, an `options` object with an `as` property valid for a `<link rel=\"modulepreload\" as=\"...\" />` tag.%s', encountered);\n }\n }\n\n if (typeof href === 'string') {\n if (options) {\n var crossOrigin = getCrossOriginStringAs(options.as, options.crossOrigin);\n ReactDOMCurrentDispatcher.current.preloadModule(href, {\n as: typeof options.as === 'string' && options.as !== 'script' ? options.as : undefined,\n crossOrigin: crossOrigin,\n integrity: typeof options.integrity === 'string' ? options.integrity : undefined\n });\n } else {\n ReactDOMCurrentDispatcher.current.preloadModule(href);\n }\n } // We don't error because preload needs to be resilient to being called in a variety of scopes\n // and the runtime may not be capable of responding. The function is optimistic and not critical\n // so we favor silent bailout over warning or erroring.\n\n}\nfunction preinit(href, options) {\n {\n if (typeof href !== 'string' || !href) {\n error('ReactDOM.preinit(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.', getValueDescriptorExpectingObjectForWarning(href));\n } else if (options == null || typeof options !== 'object') {\n error('ReactDOM.preinit(): Expected the `options` argument (second) to be an object with an `as` property describing the type of resource to be preinitialized but encountered %s instead.', getValueDescriptorExpectingEnumForWarning(options));\n } else if (options.as !== 'style' && options.as !== 'script') {\n error('ReactDOM.preinit(): Expected the `as` property in the `options` argument (second) to contain a valid value describing the type of resource to be preinitialized but encountered %s instead. Valid values for `as` are \"style\" and \"script\".', getValueDescriptorExpectingEnumForWarning(options.as));\n }\n }\n\n if (typeof href === 'string' && options && typeof options.as === 'string') {\n var as = options.as;\n var crossOrigin = getCrossOriginStringAs(as, options.crossOrigin);\n var integrity = typeof options.integrity === 'string' ? options.integrity : undefined;\n var fetchPriority = typeof options.fetchPriority === 'string' ? options.fetchPriority : undefined;\n\n if (as === 'style') {\n ReactDOMCurrentDispatcher.current.preinitStyle(href, typeof options.precedence === 'string' ? options.precedence : undefined, {\n crossOrigin: crossOrigin,\n integrity: integrity,\n fetchPriority: fetchPriority\n });\n } else if (as === 'script') {\n ReactDOMCurrentDispatcher.current.preinitScript(href, {\n crossOrigin: crossOrigin,\n integrity: integrity,\n fetchPriority: fetchPriority,\n nonce: typeof options.nonce === 'string' ? options.nonce : undefined\n });\n }\n } // We don't error because preinit needs to be resilient to being called in a variety of scopes\n // and the runtime may not be capable of responding. The function is optimistic and not critical\n // so we favor silent bailout over warning or erroring.\n\n}\nfunction preinitModule(href, options) {\n {\n var encountered = '';\n\n if (typeof href !== 'string' || !href) {\n encountered += \" The `href` argument encountered was \" + getValueDescriptorExpectingObjectForWarning(href) + \".\";\n }\n\n if (options !== undefined && typeof options !== 'object') {\n encountered += \" The `options` argument encountered was \" + getValueDescriptorExpectingObjectForWarning(options) + \".\";\n } else if (options && 'as' in options && options.as !== 'script') {\n encountered += \" The `as` option encountered was \" + getValueDescriptorExpectingEnumForWarning(options.as) + \".\";\n }\n\n if (encountered) {\n error('ReactDOM.preinitModule(): Expected up to two arguments, a non-empty `href` string and, optionally, an `options` object with a valid `as` property.%s', encountered);\n } else {\n var as = options && typeof options.as === 'string' ? options.as : 'script';\n\n switch (as) {\n case 'script':\n {\n break;\n }\n // We have an invalid as type and need to warn\n\n default:\n {\n var typeOfAs = getValueDescriptorExpectingEnumForWarning(as);\n\n error('ReactDOM.preinitModule(): Currently the only supported \"as\" type for this function is \"script\"' + ' but received \"%s\" instead. This warning was generated for `href` \"%s\". In the future other' + ' module types will be supported, aligning with the import-attributes proposal. Learn more here:' + ' (https://github.com/tc39/proposal-import-attributes)', typeOfAs, href);\n }\n }\n }\n }\n\n if (typeof href === 'string') {\n if (typeof options === 'object' && options !== null) {\n if (options.as == null || options.as === 'script') {\n var crossOrigin = getCrossOriginStringAs(options.as, options.crossOrigin);\n ReactDOMCurrentDispatcher.current.preinitModuleScript(href, {\n crossOrigin: crossOrigin,\n integrity: typeof options.integrity === 'string' ? options.integrity : undefined,\n nonce: typeof options.nonce === 'string' ? options.nonce : undefined\n });\n }\n } else if (options == null) {\n ReactDOMCurrentDispatcher.current.preinitModuleScript(href);\n }\n } // We don't error because preinit needs to be resilient to being called in a variety of scopes\n // and the runtime may not be capable of responding. The function is optimistic and not critical\n // so we favor silent bailout over warning or erroring.\n\n}\n\nfunction getValueDescriptorExpectingObjectForWarning(thing) {\n return thing === null ? '`null`' : thing === undefined ? '`undefined`' : thing === '' ? 'an empty string' : \"something with type \\\"\" + typeof thing + \"\\\"\";\n}\n\nfunction getValueDescriptorExpectingEnumForWarning(thing) {\n return thing === null ? '`null`' : thing === undefined ? '`undefined`' : thing === '' ? 'an empty string' : typeof thing === 'string' ? JSON.stringify(thing) : typeof thing === 'number' ? '`' + thing + '`' : \"something with type \\\"\" + typeof thing + \"\\\"\";\n}\n\n{\n if (typeof Map !== 'function' || // $FlowFixMe[prop-missing] Flow incorrectly thinks Map has no prototype\n Map.prototype == null || typeof Map.prototype.forEach !== 'function' || typeof Set !== 'function' || // $FlowFixMe[prop-missing] Flow incorrectly thinks Set has no prototype\n Set.prototype == null || typeof Set.prototype.clear !== 'function' || typeof Set.prototype.forEach !== 'function') {\n error('React depends on Map and Set built-in types. Make sure that you load a ' + 'polyfill in older browsers. https://react.dev/link/react-polyfills');\n }\n}\n\nfunction createPortal(children, container) {\n var key = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n\n if (!isValidContainer(container)) {\n throw new Error('Target container is not a DOM element.');\n } // TODO: pass ReactDOM portal implementation as third argument\n // $FlowFixMe[incompatible-return] The Flow type is opaque but there's no way to actually create it.\n\n\n return createPortal$1(children, container, null, key);\n}\n\nfunction renderSubtreeIntoContainer(parentComponent, element, containerNode, callback) {\n return unstable_renderSubtreeIntoContainer(parentComponent, element, containerNode, callback);\n}\n\nfunction createRoot(container, options) {\n {\n if (!Internals.usingClientEntryPoint && !false) {\n error('You are importing createRoot from \"react-dom\" which is not supported. ' + 'You should instead import it from \"react-dom/client\".');\n }\n }\n\n return createRoot$1(container, options);\n}\n\nfunction hydrateRoot(container, initialChildren, options) {\n {\n if (!Internals.usingClientEntryPoint && !false) {\n error('You are importing hydrateRoot from \"react-dom\" which is not supported. ' + 'You should instead import it from \"react-dom/client\".');\n }\n }\n\n return hydrateRoot$1(container, initialChildren, options);\n} // Overload the definition to the two valid signatures.\n// Warning, this opts-out of checking the function body.\n// eslint-disable-next-line no-redeclare\n// eslint-disable-next-line no-redeclare\n\n\nfunction flushSync(fn) {\n {\n if (isAlreadyRendering()) {\n error('flushSync was called from inside a lifecycle method. React cannot ' + 'flush when React is already rendering. Consider moving this call to ' + 'a scheduler task or micro task.');\n }\n }\n\n return flushSync$1(fn);\n}\n// This is an array for better minification.\n\nInternals.Events = [getInstanceFromNode, getNodeFromInstance, getFiberCurrentPropsFromNode, enqueueStateRestore, restoreStateIfNeeded, batchedUpdates$1];\nvar foundDevTools = injectIntoDevTools({\n findFiberByHostInstance: getClosestInstanceFromNode,\n bundleType: 1 ,\n version: ReactVersion,\n rendererPackageName: 'react-dom'\n});\n\n{\n if (!foundDevTools && canUseDOM && window.top === window.self) {\n // If we're in Chrome or Firefox, provide a download link if not installed.\n if (navigator.userAgent.indexOf('Chrome') > -1 && navigator.userAgent.indexOf('Edge') === -1 || navigator.userAgent.indexOf('Firefox') > -1) {\n var protocol = window.location.protocol; // Don't warn in exotic cases like chrome-extension://.\n\n if (/^(https?|file):$/.test(protocol)) {\n // eslint-disable-next-line react-internal/no-production-logging\n console.info('%cDownload the React DevTools ' + 'for a better development experience: ' + 'https://react.dev/link/react-devtools' + (protocol === 'file:' ? '\\nYou might need to use a local HTTP server (instead of file://): ' + 'https://react.dev/link/react-devtools-faq' : ''), 'font-weight:bold');\n }\n }\n }\n}\n\nexports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Internals;\nexports.createPortal = createPortal;\nexports.createRoot = createRoot;\nexports.findDOMNode = findDOMNode;\nexports.flushSync = flushSync;\nexports.hydrate = hydrate;\nexports.hydrateRoot = hydrateRoot;\nexports.preconnect = preconnect;\nexports.prefetchDNS = prefetchDNS;\nexports.preinit = preinit;\nexports.preinitModule = preinitModule;\nexports.preload = preload;\nexports.preloadModule = preloadModule;\nexports.render = render;\nexports.unmountComponentAtNode = unmountComponentAtNode;\nexports.unstable_batchedUpdates = batchedUpdates$1;\nexports.unstable_renderSubtreeIntoContainer = renderSubtreeIntoContainer;\nexports.useFormState = useFormState;\nexports.useFormStatus = useFormStatus;\nexports.version = ReactVersion;\n /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\nif (\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop ===\n 'function'\n) {\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());\n}\n \n })();\n}\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/react-dom/cjs/react-dom.development.js?", + ); + + /***/ + }, + + /***/ 5338: /***/ (__unused_webpack_module, exports, __webpack_require__) => { + 'use strict'; + eval( + '\n\nvar m = __webpack_require__(961);\nif (false) {} else {\n var i = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n exports.createRoot = function (c, o) {\n i.usingClientEntryPoint = true;\n try {\n return m.createRoot(c, o);\n } finally {\n i.usingClientEntryPoint = false;\n }\n };\n exports.hydrateRoot = function (c, h, o) {\n i.usingClientEntryPoint = true;\n try {\n return m.hydrateRoot(c, h, o);\n } finally {\n i.usingClientEntryPoint = false;\n }\n };\n}\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/react-dom/client.js?', + ); + + /***/ + }, + + /***/ 961: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + 'use strict'; + eval( + "\n\nfunction checkDCE() {\n /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\n if (\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined' ||\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== 'function'\n ) {\n return;\n }\n if (true) {\n // This branch is unreachable because this function is only called\n // in production, but the condition is true only in development.\n // Therefore if the branch is still here, dead code elimination wasn't\n // properly applied.\n // Don't change the message. React DevTools relies on it. Also make sure\n // this message doesn't occur elsewhere in this function, or it will cause\n // a false positive.\n throw new Error('^_^');\n }\n try {\n // Verify that the code above has been dead code eliminated (DCE'd).\n __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE);\n } catch (err) {\n // DevTools shouldn't crash React, no matter what.\n // We should still report in case we break this code.\n console.error(err);\n }\n}\n\nif (false) {} else {\n module.exports = __webpack_require__(1557);\n}\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/react-dom/index.js?", + ); + + /***/ + }, + + /***/ 4362: /***/ (__unused_webpack_module, exports, __webpack_require__) => { + 'use strict'; + eval( + '\n\nvar l, s;\nif (false) {} else {\n l = __webpack_require__(8021);\n s = __webpack_require__(3771);\n}\n\nexports.version = l.version;\nexports.renderToString = l.renderToString;\nexports.renderToStaticMarkup = l.renderToStaticMarkup;\nexports.renderToNodeStream = l.renderToNodeStream;\nexports.renderToStaticNodeStream = l.renderToStaticNodeStream;\nexports.renderToPipeableStream = s.renderToPipeableStream;\nif (s.resumeToPipeableStream) {\n exports.resumeToPipeableStream = s.resumeToPipeableStream;\n}\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/react-dom/server.node.js?', + ); + + /***/ + }, + + /***/ 115: /***/ (module) => { + eval( + "/* global Map:readonly, Set:readonly, ArrayBuffer:readonly */\n\nvar hasElementType = typeof Element !== 'undefined';\nvar hasMap = typeof Map === 'function';\nvar hasSet = typeof Set === 'function';\nvar hasArrayBuffer = typeof ArrayBuffer === 'function' && !!ArrayBuffer.isView;\n\n// Note: We **don't** need `envHasBigInt64Array` in fde es6/index.js\n\nfunction equal(a, b) {\n // START: fast-deep-equal es6/index.js 3.1.3\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n\n var length, i, keys;\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n // START: Modifications:\n // 1. Extra `has<Type> &&` helpers in initial condition allow es6 code\n // to co-exist with es5.\n // 2. Replace `for of` with es5 compliant iteration using `for`.\n // Basically, take:\n //\n // ```js\n // for (i of a.entries())\n // if (!b.has(i[0])) return false;\n // ```\n //\n // ... and convert to:\n //\n // ```js\n // it = a.entries();\n // while (!(i = it.next()).done)\n // if (!b.has(i.value[0])) return false;\n // ```\n //\n // **Note**: `i` access switches to `i.value`.\n var it;\n if (hasMap && (a instanceof Map) && (b instanceof Map)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!equal(i.value[1], b.get(i.value[0]))) return false;\n return true;\n }\n\n if (hasSet && (a instanceof Set) && (b instanceof Set)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n return true;\n }\n // END: Modifications\n\n if (hasArrayBuffer && ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (a[i] !== b[i]) return false;\n return true;\n }\n\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n // START: Modifications:\n // Apply guards for `Object.create(null)` handling. See:\n // - https://github.com/FormidableLabs/react-fast-compare/issues/64\n // - https://github.com/epoberezkin/fast-deep-equal/issues/49\n if (a.valueOf !== Object.prototype.valueOf && typeof a.valueOf === 'function' && typeof b.valueOf === 'function') return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString && typeof a.toString === 'function' && typeof b.toString === 'function') return a.toString() === b.toString();\n // END: Modifications\n\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0;)\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n // END: fast-deep-equal\n\n // START: react-fast-compare\n // custom handling for DOM elements\n if (hasElementType && a instanceof Element) return false;\n\n // custom handling for React/Preact\n for (i = length; i-- !== 0;) {\n if ((keys[i] === '_owner' || keys[i] === '__v' || keys[i] === '__o') && a.$$typeof) {\n // React-specific: avoid traversing React elements' _owner\n // Preact-specific: avoid traversing Preact elements' __v and __o\n // __v = $_original / $_vnode\n // __o = $_owner\n // These properties contain circular references and are not needed when\n // comparing the actual elements (and not their owners)\n // .$$typeof and ._store on just reasonable markers of elements\n\n continue;\n }\n\n // all other properties should be traversed as usual\n if (!equal(a[keys[i]], b[keys[i]])) return false;\n }\n // END: react-fast-compare\n\n // START: fast-deep-equal\n return true;\n }\n\n return a !== a && b !== b;\n}\n// end fast-deep-equal\n\nmodule.exports = function isEqual(a, b) {\n try {\n return equal(a, b);\n } catch (error) {\n if (((error.message || '').match(/stack|recursion/i))) {\n // warn on circular references, don't crash\n // browsers give this different errors name and messages:\n // chrome/safari: \"RangeError\", \"Maximum call stack size exceeded\"\n // firefox: \"InternalError\", too much recursion\"\n // edge: \"Error\", \"Out of stack space\"\n console.warn('react-fast-compare cannot handle circular refs');\n return false;\n }\n // some other error. we should definitely know about these\n throw error;\n }\n};\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/react-fast-compare/index.js?", + ); + + /***/ + }, + + /***/ 8154: /***/ (__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ m: () => (/* binding */ HelmetExport)\n/* harmony export */ });\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(5556);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var react_side_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2098);\n/* harmony import */ var react_side_effect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_side_effect__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react_fast_compare__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(115);\n/* harmony import */ var react_fast_compare__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_fast_compare__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6540);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var object_assign__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(5228);\n/* harmony import */ var object_assign__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(object_assign__WEBPACK_IMPORTED_MODULE_3__);\n\n\n\n\n\n\nvar ATTRIBUTE_NAMES = {\n BODY: "bodyAttributes",\n HTML: "htmlAttributes",\n TITLE: "titleAttributes"\n};\n\nvar TAG_NAMES = {\n BASE: "base",\n BODY: "body",\n HEAD: "head",\n HTML: "html",\n LINK: "link",\n META: "meta",\n NOSCRIPT: "noscript",\n SCRIPT: "script",\n STYLE: "style",\n TITLE: "title"\n};\n\nvar VALID_TAG_NAMES = Object.keys(TAG_NAMES).map(function (name) {\n return TAG_NAMES[name];\n});\n\nvar TAG_PROPERTIES = {\n CHARSET: "charset",\n CSS_TEXT: "cssText",\n HREF: "href",\n HTTPEQUIV: "http-equiv",\n INNER_HTML: "innerHTML",\n ITEM_PROP: "itemprop",\n NAME: "name",\n PROPERTY: "property",\n REL: "rel",\n SRC: "src",\n TARGET: "target"\n};\n\nvar REACT_TAG_MAP = {\n accesskey: "accessKey",\n charset: "charSet",\n class: "className",\n contenteditable: "contentEditable",\n contextmenu: "contextMenu",\n "http-equiv": "httpEquiv",\n itemprop: "itemProp",\n tabindex: "tabIndex"\n};\n\nvar HELMET_PROPS = {\n DEFAULT_TITLE: "defaultTitle",\n DEFER: "defer",\n ENCODE_SPECIAL_CHARACTERS: "encodeSpecialCharacters",\n ON_CHANGE_CLIENT_STATE: "onChangeClientState",\n TITLE_TEMPLATE: "titleTemplate"\n};\n\nvar HTML_TAG_MAP = Object.keys(REACT_TAG_MAP).reduce(function (obj, key) {\n obj[REACT_TAG_MAP[key]] = key;\n return obj;\n}, {});\n\nvar SELF_CLOSING_TAGS = [TAG_NAMES.NOSCRIPT, TAG_NAMES.SCRIPT, TAG_NAMES.STYLE];\n\nvar HELMET_ATTRIBUTE = "data-react-helmet";\n\nvar _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {\n return typeof obj;\n} : function (obj) {\n return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;\n};\n\nvar classCallCheck = function (instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError("Cannot call a class as a function");\n }\n};\n\nvar createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if ("value" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\n\nvar _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n};\n\nvar inherits = function (subClass, superClass) {\n if (typeof superClass !== "function" && superClass !== null) {\n throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n};\n\nvar objectWithoutProperties = function (obj, keys) {\n var target = {};\n\n for (var i in obj) {\n if (keys.indexOf(i) >= 0) continue;\n if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;\n target[i] = obj[i];\n }\n\n return target;\n};\n\nvar possibleConstructorReturn = function (self, call) {\n if (!self) {\n throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");\n }\n\n return call && (typeof call === "object" || typeof call === "function") ? call : self;\n};\n\nvar encodeSpecialCharacters = function encodeSpecialCharacters(str) {\n var encode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n\n if (encode === false) {\n return String(str);\n }\n\n return String(str).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/\'/g, "'");\n};\n\nvar getTitleFromPropsList = function getTitleFromPropsList(propsList) {\n var innermostTitle = getInnermostProperty(propsList, TAG_NAMES.TITLE);\n var innermostTemplate = getInnermostProperty(propsList, HELMET_PROPS.TITLE_TEMPLATE);\n\n if (innermostTemplate && innermostTitle) {\n // use function arg to avoid need to escape $ characters\n return innermostTemplate.replace(/%s/g, function () {\n return Array.isArray(innermostTitle) ? innermostTitle.join("") : innermostTitle;\n });\n }\n\n var innermostDefaultTitle = getInnermostProperty(propsList, HELMET_PROPS.DEFAULT_TITLE);\n\n return innermostTitle || innermostDefaultTitle || undefined;\n};\n\nvar getOnChangeClientState = function getOnChangeClientState(propsList) {\n return getInnermostProperty(propsList, HELMET_PROPS.ON_CHANGE_CLIENT_STATE) || function () {};\n};\n\nvar getAttributesFromPropsList = function getAttributesFromPropsList(tagType, propsList) {\n return propsList.filter(function (props) {\n return typeof props[tagType] !== "undefined";\n }).map(function (props) {\n return props[tagType];\n }).reduce(function (tagAttrs, current) {\n return _extends({}, tagAttrs, current);\n }, {});\n};\n\nvar getBaseTagFromPropsList = function getBaseTagFromPropsList(primaryAttributes, propsList) {\n return propsList.filter(function (props) {\n return typeof props[TAG_NAMES.BASE] !== "undefined";\n }).map(function (props) {\n return props[TAG_NAMES.BASE];\n }).reverse().reduce(function (innermostBaseTag, tag) {\n if (!innermostBaseTag.length) {\n var keys = Object.keys(tag);\n\n for (var i = 0; i < keys.length; i++) {\n var attributeKey = keys[i];\n var lowerCaseAttributeKey = attributeKey.toLowerCase();\n\n if (primaryAttributes.indexOf(lowerCaseAttributeKey) !== -1 && tag[lowerCaseAttributeKey]) {\n return innermostBaseTag.concat(tag);\n }\n }\n }\n\n return innermostBaseTag;\n }, []);\n};\n\nvar getTagsFromPropsList = function getTagsFromPropsList(tagName, primaryAttributes, propsList) {\n // Calculate list of tags, giving priority innermost component (end of the propslist)\n var approvedSeenTags = {};\n\n return propsList.filter(function (props) {\n if (Array.isArray(props[tagName])) {\n return true;\n }\n if (typeof props[tagName] !== "undefined") {\n warn("Helmet: " + tagName + " should be of type \\"Array\\". Instead found type \\"" + _typeof(props[tagName]) + "\\"");\n }\n return false;\n }).map(function (props) {\n return props[tagName];\n }).reverse().reduce(function (approvedTags, instanceTags) {\n var instanceSeenTags = {};\n\n instanceTags.filter(function (tag) {\n var primaryAttributeKey = void 0;\n var keys = Object.keys(tag);\n for (var i = 0; i < keys.length; i++) {\n var attributeKey = keys[i];\n var lowerCaseAttributeKey = attributeKey.toLowerCase();\n\n // Special rule with link tags, since rel and href are both primary tags, rel takes priority\n if (primaryAttributes.indexOf(lowerCaseAttributeKey) !== -1 && !(primaryAttributeKey === TAG_PROPERTIES.REL && tag[primaryAttributeKey].toLowerCase() === "canonical") && !(lowerCaseAttributeKey === TAG_PROPERTIES.REL && tag[lowerCaseAttributeKey].toLowerCase() === "stylesheet")) {\n primaryAttributeKey = lowerCaseAttributeKey;\n }\n // Special case for innerHTML which doesn\'t work lowercased\n if (primaryAttributes.indexOf(attributeKey) !== -1 && (attributeKey === TAG_PROPERTIES.INNER_HTML || attributeKey === TAG_PROPERTIES.CSS_TEXT || attributeKey === TAG_PROPERTIES.ITEM_PROP)) {\n primaryAttributeKey = attributeKey;\n }\n }\n\n if (!primaryAttributeKey || !tag[primaryAttributeKey]) {\n return false;\n }\n\n var value = tag[primaryAttributeKey].toLowerCase();\n\n if (!approvedSeenTags[primaryAttributeKey]) {\n approvedSeenTags[primaryAttributeKey] = {};\n }\n\n if (!instanceSeenTags[primaryAttributeKey]) {\n instanceSeenTags[primaryAttributeKey] = {};\n }\n\n if (!approvedSeenTags[primaryAttributeKey][value]) {\n instanceSeenTags[primaryAttributeKey][value] = true;\n return true;\n }\n\n return false;\n }).reverse().forEach(function (tag) {\n return approvedTags.push(tag);\n });\n\n // Update seen tags with tags from this instance\n var keys = Object.keys(instanceSeenTags);\n for (var i = 0; i < keys.length; i++) {\n var attributeKey = keys[i];\n var tagUnion = object_assign__WEBPACK_IMPORTED_MODULE_3___default()({}, approvedSeenTags[attributeKey], instanceSeenTags[attributeKey]);\n\n approvedSeenTags[attributeKey] = tagUnion;\n }\n\n return approvedTags;\n }, []).reverse();\n};\n\nvar getInnermostProperty = function getInnermostProperty(propsList, property) {\n for (var i = propsList.length - 1; i >= 0; i--) {\n var props = propsList[i];\n\n if (props.hasOwnProperty(property)) {\n return props[property];\n }\n }\n\n return null;\n};\n\nvar reducePropsToState = function reducePropsToState(propsList) {\n return {\n baseTag: getBaseTagFromPropsList([TAG_PROPERTIES.HREF, TAG_PROPERTIES.TARGET], propsList),\n bodyAttributes: getAttributesFromPropsList(ATTRIBUTE_NAMES.BODY, propsList),\n defer: getInnermostProperty(propsList, HELMET_PROPS.DEFER),\n encode: getInnermostProperty(propsList, HELMET_PROPS.ENCODE_SPECIAL_CHARACTERS),\n htmlAttributes: getAttributesFromPropsList(ATTRIBUTE_NAMES.HTML, propsList),\n linkTags: getTagsFromPropsList(TAG_NAMES.LINK, [TAG_PROPERTIES.REL, TAG_PROPERTIES.HREF], propsList),\n metaTags: getTagsFromPropsList(TAG_NAMES.META, [TAG_PROPERTIES.NAME, TAG_PROPERTIES.CHARSET, TAG_PROPERTIES.HTTPEQUIV, TAG_PROPERTIES.PROPERTY, TAG_PROPERTIES.ITEM_PROP], propsList),\n noscriptTags: getTagsFromPropsList(TAG_NAMES.NOSCRIPT, [TAG_PROPERTIES.INNER_HTML], propsList),\n onChangeClientState: getOnChangeClientState(propsList),\n scriptTags: getTagsFromPropsList(TAG_NAMES.SCRIPT, [TAG_PROPERTIES.SRC, TAG_PROPERTIES.INNER_HTML], propsList),\n styleTags: getTagsFromPropsList(TAG_NAMES.STYLE, [TAG_PROPERTIES.CSS_TEXT], propsList),\n title: getTitleFromPropsList(propsList),\n titleAttributes: getAttributesFromPropsList(ATTRIBUTE_NAMES.TITLE, propsList)\n };\n};\n\nvar rafPolyfill = function () {\n var clock = Date.now();\n\n return function (callback) {\n var currentTime = Date.now();\n\n if (currentTime - clock > 16) {\n clock = currentTime;\n callback(currentTime);\n } else {\n setTimeout(function () {\n rafPolyfill(callback);\n }, 0);\n }\n };\n}();\n\nvar cafPolyfill = function cafPolyfill(id) {\n return clearTimeout(id);\n};\n\nvar requestAnimationFrame = typeof window !== "undefined" ? window.requestAnimationFrame && window.requestAnimationFrame.bind(window) || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || rafPolyfill : global.requestAnimationFrame || rafPolyfill;\n\nvar cancelAnimationFrame = typeof window !== "undefined" ? window.cancelAnimationFrame || window.webkitCancelAnimationFrame || window.mozCancelAnimationFrame || cafPolyfill : global.cancelAnimationFrame || cafPolyfill;\n\nvar warn = function warn(msg) {\n return console && typeof console.warn === "function" && console.warn(msg);\n};\n\nvar _helmetCallback = null;\n\nvar handleClientStateChange = function handleClientStateChange(newState) {\n if (_helmetCallback) {\n cancelAnimationFrame(_helmetCallback);\n }\n\n if (newState.defer) {\n _helmetCallback = requestAnimationFrame(function () {\n commitTagChanges(newState, function () {\n _helmetCallback = null;\n });\n });\n } else {\n commitTagChanges(newState);\n _helmetCallback = null;\n }\n};\n\nvar commitTagChanges = function commitTagChanges(newState, cb) {\n var baseTag = newState.baseTag,\n bodyAttributes = newState.bodyAttributes,\n htmlAttributes = newState.htmlAttributes,\n linkTags = newState.linkTags,\n metaTags = newState.metaTags,\n noscriptTags = newState.noscriptTags,\n onChangeClientState = newState.onChangeClientState,\n scriptTags = newState.scriptTags,\n styleTags = newState.styleTags,\n title = newState.title,\n titleAttributes = newState.titleAttributes;\n\n updateAttributes(TAG_NAMES.BODY, bodyAttributes);\n updateAttributes(TAG_NAMES.HTML, htmlAttributes);\n\n updateTitle(title, titleAttributes);\n\n var tagUpdates = {\n baseTag: updateTags(TAG_NAMES.BASE, baseTag),\n linkTags: updateTags(TAG_NAMES.LINK, linkTags),\n metaTags: updateTags(TAG_NAMES.META, metaTags),\n noscriptTags: updateTags(TAG_NAMES.NOSCRIPT, noscriptTags),\n scriptTags: updateTags(TAG_NAMES.SCRIPT, scriptTags),\n styleTags: updateTags(TAG_NAMES.STYLE, styleTags)\n };\n\n var addedTags = {};\n var removedTags = {};\n\n Object.keys(tagUpdates).forEach(function (tagType) {\n var _tagUpdates$tagType = tagUpdates[tagType],\n newTags = _tagUpdates$tagType.newTags,\n oldTags = _tagUpdates$tagType.oldTags;\n\n\n if (newTags.length) {\n addedTags[tagType] = newTags;\n }\n if (oldTags.length) {\n removedTags[tagType] = tagUpdates[tagType].oldTags;\n }\n });\n\n cb && cb();\n\n onChangeClientState(newState, addedTags, removedTags);\n};\n\nvar flattenArray = function flattenArray(possibleArray) {\n return Array.isArray(possibleArray) ? possibleArray.join("") : possibleArray;\n};\n\nvar updateTitle = function updateTitle(title, attributes) {\n if (typeof title !== "undefined" && document.title !== title) {\n document.title = flattenArray(title);\n }\n\n updateAttributes(TAG_NAMES.TITLE, attributes);\n};\n\nvar updateAttributes = function updateAttributes(tagName, attributes) {\n var elementTag = document.getElementsByTagName(tagName)[0];\n\n if (!elementTag) {\n return;\n }\n\n var helmetAttributeString = elementTag.getAttribute(HELMET_ATTRIBUTE);\n var helmetAttributes = helmetAttributeString ? helmetAttributeString.split(",") : [];\n var attributesToRemove = [].concat(helmetAttributes);\n var attributeKeys = Object.keys(attributes);\n\n for (var i = 0; i < attributeKeys.length; i++) {\n var attribute = attributeKeys[i];\n var value = attributes[attribute] || "";\n\n if (elementTag.getAttribute(attribute) !== value) {\n elementTag.setAttribute(attribute, value);\n }\n\n if (helmetAttributes.indexOf(attribute) === -1) {\n helmetAttributes.push(attribute);\n }\n\n var indexToSave = attributesToRemove.indexOf(attribute);\n if (indexToSave !== -1) {\n attributesToRemove.splice(indexToSave, 1);\n }\n }\n\n for (var _i = attributesToRemove.length - 1; _i >= 0; _i--) {\n elementTag.removeAttribute(attributesToRemove[_i]);\n }\n\n if (helmetAttributes.length === attributesToRemove.length) {\n elementTag.removeAttribute(HELMET_ATTRIBUTE);\n } else if (elementTag.getAttribute(HELMET_ATTRIBUTE) !== attributeKeys.join(",")) {\n elementTag.setAttribute(HELMET_ATTRIBUTE, attributeKeys.join(","));\n }\n};\n\nvar updateTags = function updateTags(type, tags) {\n var headElement = document.head || document.querySelector(TAG_NAMES.HEAD);\n var tagNodes = headElement.querySelectorAll(type + "[" + HELMET_ATTRIBUTE + "]");\n var oldTags = Array.prototype.slice.call(tagNodes);\n var newTags = [];\n var indexToDelete = void 0;\n\n if (tags && tags.length) {\n tags.forEach(function (tag) {\n var newElement = document.createElement(type);\n\n for (var attribute in tag) {\n if (tag.hasOwnProperty(attribute)) {\n if (attribute === TAG_PROPERTIES.INNER_HTML) {\n newElement.innerHTML = tag.innerHTML;\n } else if (attribute === TAG_PROPERTIES.CSS_TEXT) {\n if (newElement.styleSheet) {\n newElement.styleSheet.cssText = tag.cssText;\n } else {\n newElement.appendChild(document.createTextNode(tag.cssText));\n }\n } else {\n var value = typeof tag[attribute] === "undefined" ? "" : tag[attribute];\n newElement.setAttribute(attribute, value);\n }\n }\n }\n\n newElement.setAttribute(HELMET_ATTRIBUTE, "true");\n\n // Remove a duplicate tag from domTagstoRemove, so it isn\'t cleared.\n if (oldTags.some(function (existingTag, index) {\n indexToDelete = index;\n return newElement.isEqualNode(existingTag);\n })) {\n oldTags.splice(indexToDelete, 1);\n } else {\n newTags.push(newElement);\n }\n });\n }\n\n oldTags.forEach(function (tag) {\n return tag.parentNode.removeChild(tag);\n });\n newTags.forEach(function (tag) {\n return headElement.appendChild(tag);\n });\n\n return {\n oldTags: oldTags,\n newTags: newTags\n };\n};\n\nvar generateElementAttributesAsString = function generateElementAttributesAsString(attributes) {\n return Object.keys(attributes).reduce(function (str, key) {\n var attr = typeof attributes[key] !== "undefined" ? key + "=\\"" + attributes[key] + "\\"" : "" + key;\n return str ? str + " " + attr : attr;\n }, "");\n};\n\nvar generateTitleAsString = function generateTitleAsString(type, title, attributes, encode) {\n var attributeString = generateElementAttributesAsString(attributes);\n var flattenedTitle = flattenArray(title);\n return attributeString ? "<" + type + " " + HELMET_ATTRIBUTE + "=\\"true\\" " + attributeString + ">" + encodeSpecialCharacters(flattenedTitle, encode) + "</" + type + ">" : "<" + type + " " + HELMET_ATTRIBUTE + "=\\"true\\">" + encodeSpecialCharacters(flattenedTitle, encode) + "</" + type + ">";\n};\n\nvar generateTagsAsString = function generateTagsAsString(type, tags, encode) {\n return tags.reduce(function (str, tag) {\n var attributeHtml = Object.keys(tag).filter(function (attribute) {\n return !(attribute === TAG_PROPERTIES.INNER_HTML || attribute === TAG_PROPERTIES.CSS_TEXT);\n }).reduce(function (string, attribute) {\n var attr = typeof tag[attribute] === "undefined" ? attribute : attribute + "=\\"" + encodeSpecialCharacters(tag[attribute], encode) + "\\"";\n return string ? string + " " + attr : attr;\n }, "");\n\n var tagContent = tag.innerHTML || tag.cssText || "";\n\n var isSelfClosing = SELF_CLOSING_TAGS.indexOf(type) === -1;\n\n return str + "<" + type + " " + HELMET_ATTRIBUTE + "=\\"true\\" " + attributeHtml + (isSelfClosing ? "/>" : ">" + tagContent + "</" + type + ">");\n }, "");\n};\n\nvar convertElementAttributestoReactProps = function convertElementAttributestoReactProps(attributes) {\n var initProps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n return Object.keys(attributes).reduce(function (obj, key) {\n obj[REACT_TAG_MAP[key] || key] = attributes[key];\n return obj;\n }, initProps);\n};\n\nvar convertReactPropstoHtmlAttributes = function convertReactPropstoHtmlAttributes(props) {\n var initAttributes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n return Object.keys(props).reduce(function (obj, key) {\n obj[HTML_TAG_MAP[key] || key] = props[key];\n return obj;\n }, initAttributes);\n};\n\nvar generateTitleAsReactComponent = function generateTitleAsReactComponent(type, title, attributes) {\n var _initProps;\n\n // assigning into an array to define toString function on it\n var initProps = (_initProps = {\n key: title\n }, _initProps[HELMET_ATTRIBUTE] = true, _initProps);\n var props = convertElementAttributestoReactProps(attributes, initProps);\n\n return [react__WEBPACK_IMPORTED_MODULE_2___default().createElement(TAG_NAMES.TITLE, props, title)];\n};\n\nvar generateTagsAsReactComponent = function generateTagsAsReactComponent(type, tags) {\n return tags.map(function (tag, i) {\n var _mappedTag;\n\n var mappedTag = (_mappedTag = {\n key: i\n }, _mappedTag[HELMET_ATTRIBUTE] = true, _mappedTag);\n\n Object.keys(tag).forEach(function (attribute) {\n var mappedAttribute = REACT_TAG_MAP[attribute] || attribute;\n\n if (mappedAttribute === TAG_PROPERTIES.INNER_HTML || mappedAttribute === TAG_PROPERTIES.CSS_TEXT) {\n var content = tag.innerHTML || tag.cssText;\n mappedTag.dangerouslySetInnerHTML = { __html: content };\n } else {\n mappedTag[mappedAttribute] = tag[attribute];\n }\n });\n\n return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(type, mappedTag);\n });\n};\n\nvar getMethodsForTag = function getMethodsForTag(type, tags, encode) {\n switch (type) {\n case TAG_NAMES.TITLE:\n return {\n toComponent: function toComponent() {\n return generateTitleAsReactComponent(type, tags.title, tags.titleAttributes, encode);\n },\n toString: function toString() {\n return generateTitleAsString(type, tags.title, tags.titleAttributes, encode);\n }\n };\n case ATTRIBUTE_NAMES.BODY:\n case ATTRIBUTE_NAMES.HTML:\n return {\n toComponent: function toComponent() {\n return convertElementAttributestoReactProps(tags);\n },\n toString: function toString() {\n return generateElementAttributesAsString(tags);\n }\n };\n default:\n return {\n toComponent: function toComponent() {\n return generateTagsAsReactComponent(type, tags);\n },\n toString: function toString() {\n return generateTagsAsString(type, tags, encode);\n }\n };\n }\n};\n\nvar mapStateOnServer = function mapStateOnServer(_ref) {\n var baseTag = _ref.baseTag,\n bodyAttributes = _ref.bodyAttributes,\n encode = _ref.encode,\n htmlAttributes = _ref.htmlAttributes,\n linkTags = _ref.linkTags,\n metaTags = _ref.metaTags,\n noscriptTags = _ref.noscriptTags,\n scriptTags = _ref.scriptTags,\n styleTags = _ref.styleTags,\n _ref$title = _ref.title,\n title = _ref$title === undefined ? "" : _ref$title,\n titleAttributes = _ref.titleAttributes;\n return {\n base: getMethodsForTag(TAG_NAMES.BASE, baseTag, encode),\n bodyAttributes: getMethodsForTag(ATTRIBUTE_NAMES.BODY, bodyAttributes, encode),\n htmlAttributes: getMethodsForTag(ATTRIBUTE_NAMES.HTML, htmlAttributes, encode),\n link: getMethodsForTag(TAG_NAMES.LINK, linkTags, encode),\n meta: getMethodsForTag(TAG_NAMES.META, metaTags, encode),\n noscript: getMethodsForTag(TAG_NAMES.NOSCRIPT, noscriptTags, encode),\n script: getMethodsForTag(TAG_NAMES.SCRIPT, scriptTags, encode),\n style: getMethodsForTag(TAG_NAMES.STYLE, styleTags, encode),\n title: getMethodsForTag(TAG_NAMES.TITLE, { title: title, titleAttributes: titleAttributes }, encode)\n };\n};\n\nvar Helmet = function Helmet(Component) {\n var _class, _temp;\n\n return _temp = _class = function (_React$Component) {\n inherits(HelmetWrapper, _React$Component);\n\n function HelmetWrapper() {\n classCallCheck(this, HelmetWrapper);\n return possibleConstructorReturn(this, _React$Component.apply(this, arguments));\n }\n\n HelmetWrapper.prototype.shouldComponentUpdate = function shouldComponentUpdate(nextProps) {\n return !react_fast_compare__WEBPACK_IMPORTED_MODULE_1___default()(this.props, nextProps);\n };\n\n HelmetWrapper.prototype.mapNestedChildrenToProps = function mapNestedChildrenToProps(child, nestedChildren) {\n if (!nestedChildren) {\n return null;\n }\n\n switch (child.type) {\n case TAG_NAMES.SCRIPT:\n case TAG_NAMES.NOSCRIPT:\n return {\n innerHTML: nestedChildren\n };\n\n case TAG_NAMES.STYLE:\n return {\n cssText: nestedChildren\n };\n }\n\n throw new Error("<" + child.type + " /> elements are self-closing and can not contain children. Refer to our API for more information.");\n };\n\n HelmetWrapper.prototype.flattenArrayTypeChildren = function flattenArrayTypeChildren(_ref) {\n var _babelHelpers$extends;\n\n var child = _ref.child,\n arrayTypeChildren = _ref.arrayTypeChildren,\n newChildProps = _ref.newChildProps,\n nestedChildren = _ref.nestedChildren;\n\n return _extends({}, arrayTypeChildren, (_babelHelpers$extends = {}, _babelHelpers$extends[child.type] = [].concat(arrayTypeChildren[child.type] || [], [_extends({}, newChildProps, this.mapNestedChildrenToProps(child, nestedChildren))]), _babelHelpers$extends));\n };\n\n HelmetWrapper.prototype.mapObjectTypeChildren = function mapObjectTypeChildren(_ref2) {\n var _babelHelpers$extends2, _babelHelpers$extends3;\n\n var child = _ref2.child,\n newProps = _ref2.newProps,\n newChildProps = _ref2.newChildProps,\n nestedChildren = _ref2.nestedChildren;\n\n switch (child.type) {\n case TAG_NAMES.TITLE:\n return _extends({}, newProps, (_babelHelpers$extends2 = {}, _babelHelpers$extends2[child.type] = nestedChildren, _babelHelpers$extends2.titleAttributes = _extends({}, newChildProps), _babelHelpers$extends2));\n\n case TAG_NAMES.BODY:\n return _extends({}, newProps, {\n bodyAttributes: _extends({}, newChildProps)\n });\n\n case TAG_NAMES.HTML:\n return _extends({}, newProps, {\n htmlAttributes: _extends({}, newChildProps)\n });\n }\n\n return _extends({}, newProps, (_babelHelpers$extends3 = {}, _babelHelpers$extends3[child.type] = _extends({}, newChildProps), _babelHelpers$extends3));\n };\n\n HelmetWrapper.prototype.mapArrayTypeChildrenToProps = function mapArrayTypeChildrenToProps(arrayTypeChildren, newProps) {\n var newFlattenedProps = _extends({}, newProps);\n\n Object.keys(arrayTypeChildren).forEach(function (arrayChildName) {\n var _babelHelpers$extends4;\n\n newFlattenedProps = _extends({}, newFlattenedProps, (_babelHelpers$extends4 = {}, _babelHelpers$extends4[arrayChildName] = arrayTypeChildren[arrayChildName], _babelHelpers$extends4));\n });\n\n return newFlattenedProps;\n };\n\n HelmetWrapper.prototype.warnOnInvalidChildren = function warnOnInvalidChildren(child, nestedChildren) {\n if (true) {\n if (!VALID_TAG_NAMES.some(function (name) {\n return child.type === name;\n })) {\n if (typeof child.type === "function") {\n return warn("You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information.");\n }\n\n return warn("Only elements types " + VALID_TAG_NAMES.join(", ") + " are allowed. Helmet does not support rendering <" + child.type + "> elements. Refer to our API for more information.");\n }\n\n if (nestedChildren && typeof nestedChildren !== "string" && (!Array.isArray(nestedChildren) || nestedChildren.some(function (nestedChild) {\n return typeof nestedChild !== "string";\n }))) {\n throw new Error("Helmet expects a string as a child of <" + child.type + ">. Did you forget to wrap your children in braces? ( <" + child.type + ">{``}</" + child.type + "> ) Refer to our API for more information.");\n }\n }\n\n return true;\n };\n\n HelmetWrapper.prototype.mapChildrenToProps = function mapChildrenToProps(children, newProps) {\n var _this2 = this;\n\n var arrayTypeChildren = {};\n\n react__WEBPACK_IMPORTED_MODULE_2___default().Children.forEach(children, function (child) {\n if (!child || !child.props) {\n return;\n }\n\n var _child$props = child.props,\n nestedChildren = _child$props.children,\n childProps = objectWithoutProperties(_child$props, ["children"]);\n\n var newChildProps = convertReactPropstoHtmlAttributes(childProps);\n\n _this2.warnOnInvalidChildren(child, nestedChildren);\n\n switch (child.type) {\n case TAG_NAMES.LINK:\n case TAG_NAMES.META:\n case TAG_NAMES.NOSCRIPT:\n case TAG_NAMES.SCRIPT:\n case TAG_NAMES.STYLE:\n arrayTypeChildren = _this2.flattenArrayTypeChildren({\n child: child,\n arrayTypeChildren: arrayTypeChildren,\n newChildProps: newChildProps,\n nestedChildren: nestedChildren\n });\n break;\n\n default:\n newProps = _this2.mapObjectTypeChildren({\n child: child,\n newProps: newProps,\n newChildProps: newChildProps,\n nestedChildren: nestedChildren\n });\n break;\n }\n });\n\n newProps = this.mapArrayTypeChildrenToProps(arrayTypeChildren, newProps);\n return newProps;\n };\n\n HelmetWrapper.prototype.render = function render() {\n var _props = this.props,\n children = _props.children,\n props = objectWithoutProperties(_props, ["children"]);\n\n var newProps = _extends({}, props);\n\n if (children) {\n newProps = this.mapChildrenToProps(children, newProps);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(Component, newProps);\n };\n\n createClass(HelmetWrapper, null, [{\n key: "canUseDOM",\n\n\n // Component.peek comes from react-side-effect:\n // For testing, you may use a static peek() method available on the returned component.\n // It lets you get the current state without resetting the mounted instance stack.\n // Don’t use it for anything other than testing.\n\n /**\n * @param {Object} base: {"target": "_blank", "href": "http://mysite.com/"}\n * @param {Object} bodyAttributes: {"className": "root"}\n * @param {String} defaultTitle: "Default Title"\n * @param {Boolean} defer: true\n * @param {Boolean} encodeSpecialCharacters: true\n * @param {Object} htmlAttributes: {"lang": "en", "amp": undefined}\n * @param {Array} link: [{"rel": "canonical", "href": "http://mysite.com/example"}]\n * @param {Array} meta: [{"name": "description", "content": "Test description"}]\n * @param {Array} noscript: [{"innerHTML": "<img src=\'http://mysite.com/js/test.js\'"}]\n * @param {Function} onChangeClientState: "(newState) => console.log(newState)"\n * @param {Array} script: [{"type": "text/javascript", "src": "http://mysite.com/js/test.js"}]\n * @param {Array} style: [{"type": "text/css", "cssText": "div { display: block; color: blue; }"}]\n * @param {String} title: "Title"\n * @param {Object} titleAttributes: {"itemprop": "name"}\n * @param {String} titleTemplate: "MySite.com - %s"\n */\n set: function set$$1(canUseDOM) {\n Component.canUseDOM = canUseDOM;\n }\n }]);\n return HelmetWrapper;\n }((react__WEBPACK_IMPORTED_MODULE_2___default().Component)), _class.propTypes = {\n base: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().object),\n bodyAttributes: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().object),\n children: prop_types__WEBPACK_IMPORTED_MODULE_4___default().oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_4___default().arrayOf((prop_types__WEBPACK_IMPORTED_MODULE_4___default().node)), (prop_types__WEBPACK_IMPORTED_MODULE_4___default().node)]),\n defaultTitle: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().string),\n defer: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().bool),\n encodeSpecialCharacters: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().bool),\n htmlAttributes: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().object),\n link: prop_types__WEBPACK_IMPORTED_MODULE_4___default().arrayOf((prop_types__WEBPACK_IMPORTED_MODULE_4___default().object)),\n meta: prop_types__WEBPACK_IMPORTED_MODULE_4___default().arrayOf((prop_types__WEBPACK_IMPORTED_MODULE_4___default().object)),\n noscript: prop_types__WEBPACK_IMPORTED_MODULE_4___default().arrayOf((prop_types__WEBPACK_IMPORTED_MODULE_4___default().object)),\n onChangeClientState: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().func),\n script: prop_types__WEBPACK_IMPORTED_MODULE_4___default().arrayOf((prop_types__WEBPACK_IMPORTED_MODULE_4___default().object)),\n style: prop_types__WEBPACK_IMPORTED_MODULE_4___default().arrayOf((prop_types__WEBPACK_IMPORTED_MODULE_4___default().object)),\n title: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().string),\n titleAttributes: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().object),\n titleTemplate: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().string)\n }, _class.defaultProps = {\n defer: true,\n encodeSpecialCharacters: true\n }, _class.peek = Component.peek, _class.rewind = function () {\n var mappedState = Component.rewind();\n if (!mappedState) {\n // provide fallback if mappedState is undefined\n mappedState = mapStateOnServer({\n baseTag: [],\n bodyAttributes: {},\n encodeSpecialCharacters: true,\n htmlAttributes: {},\n linkTags: [],\n metaTags: [],\n noscriptTags: [],\n scriptTags: [],\n styleTags: [],\n title: "",\n titleAttributes: {}\n });\n }\n\n return mappedState;\n }, _temp;\n};\n\nvar NullComponent = function NullComponent() {\n return null;\n};\n\nvar HelmetSideEffects = react_side_effect__WEBPACK_IMPORTED_MODULE_0___default()(reducePropsToState, handleClientStateChange, mapStateOnServer)(NullComponent);\n\nvar HelmetExport = Helmet(HelmetSideEffects);\nHelmetExport.renderStatic = HelmetExport.rewind;\n\n/* unused harmony default export */ var __WEBPACK_DEFAULT_EXPORT__ = ((/* unused pure expression or super */ null && (HelmetExport)));\n\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/react-helmet/es/Helmet.js?', + ); + + /***/ + }, + + /***/ 8413: /***/ (__unused_webpack_module, exports) => { + 'use strict'; + eval( + "/** @license React v16.13.1\n * react-is.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\n\n\nif (true) {\n (function() {\n'use strict';\n\n// The Symbol used to tag the ReactElement-like types. If there is no native Symbol\n// nor polyfill, then a plain number is used for performance.\nvar hasSymbol = typeof Symbol === 'function' && Symbol.for;\nvar REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;\nvar REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;\nvar REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;\nvar REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;\nvar REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;\nvar REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;\nvar REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary\n// (unstable) APIs that have been removed. Can we remove the symbols?\n\nvar REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;\nvar REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;\nvar REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;\nvar REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;\nvar REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;\nvar REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;\nvar REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;\nvar REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;\nvar REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;\nvar REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;\nvar REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;\n\nfunction isValidElementType(type) {\n return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.\n type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);\n}\n\nfunction typeOf(object) {\n if (typeof object === 'object' && object !== null) {\n var $$typeof = object.$$typeof;\n\n switch ($$typeof) {\n case REACT_ELEMENT_TYPE:\n var type = object.type;\n\n switch (type) {\n case REACT_ASYNC_MODE_TYPE:\n case REACT_CONCURRENT_MODE_TYPE:\n case REACT_FRAGMENT_TYPE:\n case REACT_PROFILER_TYPE:\n case REACT_STRICT_MODE_TYPE:\n case REACT_SUSPENSE_TYPE:\n return type;\n\n default:\n var $$typeofType = type && type.$$typeof;\n\n switch ($$typeofType) {\n case REACT_CONTEXT_TYPE:\n case REACT_FORWARD_REF_TYPE:\n case REACT_LAZY_TYPE:\n case REACT_MEMO_TYPE:\n case REACT_PROVIDER_TYPE:\n return $$typeofType;\n\n default:\n return $$typeof;\n }\n\n }\n\n case REACT_PORTAL_TYPE:\n return $$typeof;\n }\n }\n\n return undefined;\n} // AsyncMode is deprecated along with isAsyncMode\n\nvar AsyncMode = REACT_ASYNC_MODE_TYPE;\nvar ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;\nvar ContextConsumer = REACT_CONTEXT_TYPE;\nvar ContextProvider = REACT_PROVIDER_TYPE;\nvar Element = REACT_ELEMENT_TYPE;\nvar ForwardRef = REACT_FORWARD_REF_TYPE;\nvar Fragment = REACT_FRAGMENT_TYPE;\nvar Lazy = REACT_LAZY_TYPE;\nvar Memo = REACT_MEMO_TYPE;\nvar Portal = REACT_PORTAL_TYPE;\nvar Profiler = REACT_PROFILER_TYPE;\nvar StrictMode = REACT_STRICT_MODE_TYPE;\nvar Suspense = REACT_SUSPENSE_TYPE;\nvar hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated\n\nfunction isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint\n\n console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}\nfunction isConcurrentMode(object) {\n return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;\n}\nfunction isContextConsumer(object) {\n return typeOf(object) === REACT_CONTEXT_TYPE;\n}\nfunction isContextProvider(object) {\n return typeOf(object) === REACT_PROVIDER_TYPE;\n}\nfunction isElement(object) {\n return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n}\nfunction isForwardRef(object) {\n return typeOf(object) === REACT_FORWARD_REF_TYPE;\n}\nfunction isFragment(object) {\n return typeOf(object) === REACT_FRAGMENT_TYPE;\n}\nfunction isLazy(object) {\n return typeOf(object) === REACT_LAZY_TYPE;\n}\nfunction isMemo(object) {\n return typeOf(object) === REACT_MEMO_TYPE;\n}\nfunction isPortal(object) {\n return typeOf(object) === REACT_PORTAL_TYPE;\n}\nfunction isProfiler(object) {\n return typeOf(object) === REACT_PROFILER_TYPE;\n}\nfunction isStrictMode(object) {\n return typeOf(object) === REACT_STRICT_MODE_TYPE;\n}\nfunction isSuspense(object) {\n return typeOf(object) === REACT_SUSPENSE_TYPE;\n}\n\nexports.AsyncMode = AsyncMode;\nexports.ConcurrentMode = ConcurrentMode;\nexports.ContextConsumer = ContextConsumer;\nexports.ContextProvider = ContextProvider;\nexports.Element = Element;\nexports.ForwardRef = ForwardRef;\nexports.Fragment = Fragment;\nexports.Lazy = Lazy;\nexports.Memo = Memo;\nexports.Portal = Portal;\nexports.Profiler = Profiler;\nexports.StrictMode = StrictMode;\nexports.Suspense = Suspense;\nexports.isAsyncMode = isAsyncMode;\nexports.isConcurrentMode = isConcurrentMode;\nexports.isContextConsumer = isContextConsumer;\nexports.isContextProvider = isContextProvider;\nexports.isElement = isElement;\nexports.isForwardRef = isForwardRef;\nexports.isFragment = isFragment;\nexports.isLazy = isLazy;\nexports.isMemo = isMemo;\nexports.isPortal = isPortal;\nexports.isProfiler = isProfiler;\nexports.isStrictMode = isStrictMode;\nexports.isSuspense = isSuspense;\nexports.isValidElementType = isValidElementType;\nexports.typeOf = typeOf;\n })();\n}\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/react-is/cjs/react-is.development.js?", + ); + + /***/ + }, + + /***/ 4363: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + 'use strict'; + eval( + '\n\nif (false) {} else {\n module.exports = __webpack_require__(8413);\n}\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/react-is/index.js?', + ); + + /***/ + }, + + /***/ 3: /***/ (__unused_webpack_module, exports) => { + 'use strict'; + eval( + "\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports[\"default\"] = {\n authenticityToken: function () {\n var token = document.querySelector('meta[name=\"csrf-token\"]');\n if (token instanceof HTMLMetaElement) {\n return token.content;\n }\n return null;\n },\n authenticityHeaders: function (otherHeaders) {\n if (otherHeaders === void 0) { otherHeaders = {}; }\n return Object.assign(otherHeaders, {\n 'X-CSRF-Token': this.authenticityToken(),\n 'X-Requested-With': 'XMLHttpRequest',\n });\n },\n};\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/react-on-rails/node_package/lib/Authenticity.js?", + ); + + /***/ + }, + + /***/ 2184: /***/ function (__unused_webpack_module, exports, __webpack_require__) { + 'use strict'; + eval( + '\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { "default": mod };\n};\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nvar isRenderFunction_1 = __importDefault(__webpack_require__(8238));\nvar registeredComponents = new Map();\nexports["default"] = {\n /**\n * @param components { component1: component1, component2: component2, etc. }\n */\n register: function (components) {\n Object.keys(components).forEach(function (name) {\n if (registeredComponents.has(name)) {\n console.warn(\'Called register for component that is already registered\', name);\n }\n var component = components[name];\n if (!component) {\n throw new Error("Called register with null component named ".concat(name));\n }\n var renderFunction = (0, isRenderFunction_1.default)(component);\n var isRenderer = renderFunction && component.length === 3;\n registeredComponents.set(name, {\n name: name,\n component: component,\n renderFunction: renderFunction,\n isRenderer: isRenderer,\n });\n });\n },\n /**\n * @param name\n * @returns { name, component, isRenderFunction, isRenderer }\n */\n get: function (name) {\n var registeredComponent = registeredComponents.get(name);\n if (registeredComponent !== undefined) {\n return registeredComponent;\n }\n var keys = Array.from(registeredComponents.keys()).join(\', \');\n throw new Error("Could not find component registered with name ".concat(name, ". Registered component names include [ ").concat(keys, " ]. Maybe you forgot to register the component?"));\n },\n /**\n * Get a Map containing all registered components. Useful for debugging.\n * @returns Map where key is the component name and values are the\n * { name, component, renderFunction, isRenderer}\n */\n components: function () {\n return registeredComponents;\n },\n};\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/react-on-rails/node_package/lib/ComponentRegistry.js?', + ); + + /***/ + }, + + /***/ 2765: /***/ function (__unused_webpack_module, exports, __webpack_require__) { + 'use strict'; + eval( + '\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, "default", { enumerable: true, value: v });\n}) : function(o, v) {\n o["default"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { "default": mod };\n};\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nvar ClientStartup = __importStar(__webpack_require__(5564));\nvar handleError_1 = __importDefault(__webpack_require__(9556));\nvar ComponentRegistry_1 = __importDefault(__webpack_require__(2184));\nvar StoreRegistry_1 = __importDefault(__webpack_require__(2706));\nvar serverRenderReactComponent_1 = __importStar(__webpack_require__(2239));\nvar buildConsoleReplay_1 = __importDefault(__webpack_require__(7288));\nvar createReactOutput_1 = __importDefault(__webpack_require__(4598));\nvar Authenticity_1 = __importDefault(__webpack_require__(3));\nvar context_1 = __importDefault(__webpack_require__(4055));\nvar reactHydrateOrRender_1 = __importDefault(__webpack_require__(501));\nvar ctx = (0, context_1.default)();\nif (ctx === undefined) {\n throw new Error("The context (usually Window or NodeJS\'s Global) is undefined.");\n}\nif (ctx.ReactOnRails !== undefined) {\n throw new Error("\\n The ReactOnRails value exists in the ".concat(ctx, " scope, it may not be safe to overwrite it.\\n \\n This could be caused by setting Webpack\'s optimization.runtimeChunk to \\"true\\" or \\"multiple,\\" rather than \\"single.\\" Check your Webpack configuration.\\n \\n Read more at https://github.com/shakacode/react_on_rails/issues/1558.\\n "));\n}\nvar DEFAULT_OPTIONS = {\n traceTurbolinks: false,\n turbo: false,\n};\nctx.ReactOnRails = {\n options: {},\n /**\n * Main entry point to using the react-on-rails npm package. This is how Rails will be able to\n * find you components for rendering.\n * @param components (key is component name, value is component)\n */\n register: function (components) {\n ComponentRegistry_1.default.register(components);\n },\n registerStore: function (stores) {\n this.registerStoreGenerators(stores);\n },\n /**\n * Allows registration of store generators to be used by multiple React components on one Rails\n * view. store generators are functions that take one arg, props, and return a store. Note that\n * the setStore API is different in that it\'s the actual store hydrated with props.\n * @param storeGenerators (keys are store names, values are the store generators)\n */\n registerStoreGenerators: function (storeGenerators) {\n if (!storeGenerators) {\n throw new Error(\'Called ReactOnRails.registerStoreGenerators with a null or undefined, rather than \' +\n \'an Object with keys being the store names and the values are the store generators.\');\n }\n StoreRegistry_1.default.register(storeGenerators);\n },\n /**\n * Allows retrieval of the store by name. This store will be hydrated by any Rails form props.\n * Pass optional param throwIfMissing = false if you want to use this call to get back null if the\n * store with name is not registered.\n * @param name\n * @param throwIfMissing Defaults to true. Set to false to have this call return undefined if\n * there is no store with the given name.\n * @returns Redux Store, possibly hydrated\n */\n getStore: function (name, throwIfMissing) {\n if (throwIfMissing === void 0) { throwIfMissing = true; }\n return StoreRegistry_1.default.getStore(name, throwIfMissing);\n },\n /**\n * Renders or hydrates the react element passed. In case react version is >=18 will use the new api.\n * @param domNode\n * @param reactElement\n * @param hydrate if true will perform hydration, if false will render\n * @returns {Root|ReactComponent|ReactElement|null}\n */\n reactHydrateOrRender: function (domNode, reactElement, hydrate) {\n return (0, reactHydrateOrRender_1.default)(domNode, reactElement, hydrate);\n },\n /**\n * Set options for ReactOnRails, typically before you call ReactOnRails.register\n * Available Options:\n * `traceTurbolinks: true|false Gives you debugging messages on Turbolinks events\n * `turbo: true|false Turbo (the follower of Turbolinks) events will be registered, if set to true.\n */\n setOptions: function (newOptions) {\n if (typeof newOptions.traceTurbolinks !== \'undefined\') {\n this.options.traceTurbolinks = newOptions.traceTurbolinks;\n // eslint-disable-next-line no-param-reassign\n delete newOptions.traceTurbolinks;\n }\n if (typeof newOptions.turbo !== \'undefined\') {\n this.options.turbo = newOptions.turbo;\n // eslint-disable-next-line no-param-reassign\n delete newOptions.turbo;\n }\n if (Object.keys(newOptions).length > 0) {\n throw new Error("Invalid options passed to ReactOnRails.options: ".concat(JSON.stringify(newOptions)));\n }\n },\n /**\n * Allow directly calling the page loaded script in case the default events that trigger react\n * rendering are not sufficient, such as when loading JavaScript asynchronously with TurboLinks:\n * More details can be found here:\n * https://github.com/shakacode/react_on_rails/blob/master/docs/additional-reading/turbolinks.md\n */\n reactOnRailsPageLoaded: function () {\n ClientStartup.reactOnRailsPageLoaded();\n },\n reactOnRailsComponentLoaded: function (domId) {\n ClientStartup.reactOnRailsComponentLoaded(domId);\n },\n /**\n * Returns CSRF authenticity token inserted by Rails csrf_meta_tags\n * @returns String or null\n */\n authenticityToken: function () {\n return Authenticity_1.default.authenticityToken();\n },\n /**\n * Returns header with csrf authenticity token and XMLHttpRequest\n * @param otherHeaders Other headers\n * @returns {*} header\n */\n authenticityHeaders: function (otherHeaders) {\n if (otherHeaders === void 0) { otherHeaders = {}; }\n return Authenticity_1.default.authenticityHeaders(otherHeaders);\n },\n // /////////////////////////////////////////////////////////////////////////////\n // INTERNALLY USED APIs\n // /////////////////////////////////////////////////////////////////////////////\n /**\n * Retrieve an option by key.\n * @param key\n * @returns option value\n */\n option: function (key) {\n return this.options[key];\n },\n /**\n * Allows retrieval of the store generator by name. This is used internally by ReactOnRails after\n * a Rails form loads to prepare stores.\n * @param name\n * @returns Redux Store generator function\n */\n getStoreGenerator: function (name) {\n return StoreRegistry_1.default.getStoreGenerator(name);\n },\n /**\n * Allows saving the store populated by Rails form props. Used internally by ReactOnRails.\n * @param name\n * @returns Redux Store, possibly hydrated\n */\n setStore: function (name, store) {\n return StoreRegistry_1.default.setStore(name, store);\n },\n /**\n * Clears hydratedStores to avoid accidental usage of wrong store hydrated in previous/parallel\n * request.\n */\n clearHydratedStores: function () {\n StoreRegistry_1.default.clearHydratedStores();\n },\n /**\n * @example\n * ReactOnRails.render("HelloWorldApp", {name: "Stranger"}, \'app\');\n *\n * Does this:\n * ```js\n * ReactDOM.render(React.createElement(HelloWorldApp, {name: "Stranger"}),\n * document.getElementById(\'app\'))\n * ```\n * under React 16/17 and\n * ```js\n * const root = ReactDOMClient.createRoot(document.getElementById(\'app\'))\n * root.render(React.createElement(HelloWorldApp, {name: "Stranger"}))\n * return root\n * ```\n * under React 18+.\n *\n * @param name Name of your registered component\n * @param props Props to pass to your component\n * @param domNodeId\n * @param hydrate Pass truthy to update server rendered html. Default is falsy\n * @returns {Root|ReactComponent|ReactElement} Under React 18+: the created React root\n * (see "What is a root?" in https://github.com/reactwg/react-18/discussions/5).\n * Under React 16/17: Reference to your component\'s backing instance or `null` for stateless components.\n */\n render: function (name, props, domNodeId, hydrate) {\n var componentObj = ComponentRegistry_1.default.get(name);\n var reactElement = (0, createReactOutput_1.default)({ componentObj: componentObj, props: props, domNodeId: domNodeId });\n return (0, reactHydrateOrRender_1.default)(document.getElementById(domNodeId), reactElement, hydrate);\n },\n /**\n * Get the component that you registered\n * @param name\n * @returns {name, component, renderFunction, isRenderer}\n */\n getComponent: function (name) {\n return ComponentRegistry_1.default.get(name);\n },\n /**\n * Used by server rendering by Rails\n * @param options\n */\n serverRenderReactComponent: function (options) {\n return (0, serverRenderReactComponent_1.default)(options);\n },\n /**\n * Used by server rendering by Rails\n * @param options\n */\n streamServerRenderedReactComponent: function (options) {\n return (0, serverRenderReactComponent_1.streamServerRenderedReactComponent)(options);\n },\n /**\n * Used by Rails to catch errors in rendering\n * @param options\n */\n handleError: function (options) {\n return (0, handleError_1.default)(options);\n },\n /**\n * Used by Rails server rendering to replay console messages.\n */\n buildConsoleReplay: function () {\n return (0, buildConsoleReplay_1.default)();\n },\n /**\n * Get an Object containing all registered components. Useful for debugging.\n * @returns {*}\n */\n registeredComponents: function () {\n return ComponentRegistry_1.default.components();\n },\n /**\n * Get an Object containing all registered store generators. Useful for debugging.\n * @returns {*}\n */\n storeGenerators: function () {\n return StoreRegistry_1.default.storeGenerators();\n },\n /**\n * Get an Object containing all hydrated stores. Useful for debugging.\n * @returns {*}\n */\n stores: function () {\n return StoreRegistry_1.default.stores();\n },\n resetOptions: function () {\n this.options = Object.assign({}, DEFAULT_OPTIONS);\n },\n};\nctx.ReactOnRails.resetOptions();\nClientStartup.clientStartup(ctx);\n__exportStar(__webpack_require__(9146), exports);\nexports["default"] = ctx.ReactOnRails;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/react-on-rails/node_package/lib/ReactOnRails.js?', + ); + + /***/ + }, + + /***/ 402: /***/ (__unused_webpack_module, exports) => { + 'use strict'; + eval( + '\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports["default"] = {\n wrapInScriptTags: function (scriptId, scriptBody) {\n if (!scriptBody) {\n return \'\';\n }\n return "\\n<script id=\\"".concat(scriptId, "\\">\\n").concat(scriptBody, "\\n</script>");\n },\n};\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/react-on-rails/node_package/lib/RenderUtils.js?', + ); + + /***/ + }, + + /***/ 2706: /***/ (__unused_webpack_module, exports) => { + 'use strict'; + eval( + '\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nvar registeredStoreGenerators = new Map();\nvar hydratedStores = new Map();\nexports["default"] = {\n /**\n * Register a store generator, a function that takes props and returns a store.\n * @param storeGenerators { name1: storeGenerator1, name2: storeGenerator2 }\n */\n register: function (storeGenerators) {\n Object.keys(storeGenerators).forEach(function (name) {\n if (registeredStoreGenerators.has(name)) {\n console.warn(\'Called registerStore for store that is already registered\', name);\n }\n var store = storeGenerators[name];\n if (!store) {\n throw new Error(\'Called ReactOnRails.registerStores with a null or undefined as a value \' +\n "for the store generator with key ".concat(name, "."));\n }\n registeredStoreGenerators.set(name, store);\n });\n },\n /**\n * Used by components to get the hydrated store which contains props.\n * @param name\n * @param throwIfMissing Defaults to true. Set to false to have this call return undefined if\n * there is no store with the given name.\n * @returns Redux Store, possibly hydrated\n */\n getStore: function (name, throwIfMissing) {\n if (throwIfMissing === void 0) { throwIfMissing = true; }\n if (hydratedStores.has(name)) {\n return hydratedStores.get(name);\n }\n var storeKeys = Array.from(hydratedStores.keys()).join(\', \');\n if (storeKeys.length === 0) {\n var msg = "There are no stores hydrated and you are requesting the store ".concat(name, ".\\nThis can happen if you are server rendering and either:\\n1. You do not call redux_store near the top of your controller action\'s view (not the layout)\\n and before any call to react_component.\\n2. You do not render redux_store_hydration_data anywhere on your page.");\n throw new Error(msg);\n }\n if (throwIfMissing) {\n console.log(\'storeKeys\', storeKeys);\n throw new Error("Could not find hydrated store with name \'".concat(name, "\'. ") +\n "Hydrated store names include [".concat(storeKeys, "]."));\n }\n return undefined;\n },\n /**\n * Internally used function to get the store creator that was passed to `register`.\n * @param name\n * @returns storeCreator with given name\n */\n getStoreGenerator: function (name) {\n var registeredStoreGenerator = registeredStoreGenerators.get(name);\n if (registeredStoreGenerator) {\n return registeredStoreGenerator;\n }\n var storeKeys = Array.from(registeredStoreGenerators.keys()).join(\', \');\n throw new Error("Could not find store registered with name \'".concat(name, "\'. Registered store ") +\n "names include [ ".concat(storeKeys, " ]. Maybe you forgot to register the store?"));\n },\n /**\n * Internally used function to set the hydrated store after a Rails page is loaded.\n * @param name\n * @param store (not the storeGenerator, but the hydrated store)\n */\n setStore: function (name, store) {\n hydratedStores.set(name, store);\n },\n /**\n * Internally used function to completely clear hydratedStores Map.\n */\n clearHydratedStores: function () {\n hydratedStores.clear();\n },\n /**\n * Get a Map containing all registered store generators. Useful for debugging.\n * @returns Map where key is the component name and values are the store generators.\n */\n storeGenerators: function () {\n return registeredStoreGenerators;\n },\n /**\n * Get a Map containing all hydrated stores. Useful for debugging.\n * @returns Map where key is the component name and values are the hydrated stores.\n */\n stores: function () {\n return hydratedStores;\n },\n};\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/react-on-rails/node_package/lib/StoreRegistry.js?', + ); + + /***/ + }, + + /***/ 7288: /***/ function (__unused_webpack_module, exports, __webpack_require__) { + 'use strict'; + eval( + '\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { "default": mod };\n};\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.consoleReplay = consoleReplay;\nexports["default"] = buildConsoleReplay;\nvar RenderUtils_1 = __importDefault(__webpack_require__(402));\nvar scriptSanitizedVal_1 = __importDefault(__webpack_require__(873));\nfunction consoleReplay(customConsoleHistory, numberOfMessagesToSkip) {\n if (customConsoleHistory === void 0) { customConsoleHistory = undefined; }\n if (numberOfMessagesToSkip === void 0) { numberOfMessagesToSkip = 0; }\n // console.history is a global polyfill used in server rendering.\n var consoleHistory = customConsoleHistory !== null && customConsoleHistory !== void 0 ? customConsoleHistory : console.history;\n if (!(Array.isArray(consoleHistory))) {\n return \'\';\n }\n var lines = consoleHistory.slice(numberOfMessagesToSkip).map(function (msg) {\n var stringifiedList = msg.arguments.map(function (arg) {\n var val;\n try {\n if (typeof arg === \'string\') {\n val = arg;\n }\n else if (arg instanceof String) {\n val = String(arg);\n }\n else {\n val = JSON.stringify(arg);\n }\n if (val === undefined) {\n val = \'undefined\';\n }\n }\n catch (e) {\n val = "".concat(e.message, ": ").concat(arg);\n }\n return (0, scriptSanitizedVal_1.default)(val);\n });\n return "console.".concat(msg.level, ".apply(console, ").concat(JSON.stringify(stringifiedList), ");");\n });\n return lines.join(\'\\n\');\n}\nfunction buildConsoleReplay(customConsoleHistory, numberOfMessagesToSkip) {\n if (customConsoleHistory === void 0) { customConsoleHistory = undefined; }\n if (numberOfMessagesToSkip === void 0) { numberOfMessagesToSkip = 0; }\n return RenderUtils_1.default.wrapInScriptTags(\'consoleReplayLog\', consoleReplay(customConsoleHistory, numberOfMessagesToSkip));\n}\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/react-on-rails/node_package/lib/buildConsoleReplay.js?', + ); + + /***/ + }, + + /***/ 5564: /***/ function (__unused_webpack_module, exports, __webpack_require__) { + 'use strict'; + eval( + "\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.reactOnRailsPageLoaded = reactOnRailsPageLoaded;\nexports.reactOnRailsComponentLoaded = reactOnRailsComponentLoaded;\nexports.clientStartup = clientStartup;\nvar react_dom_1 = __importDefault(__webpack_require__(961));\nvar createReactOutput_1 = __importDefault(__webpack_require__(4598));\nvar isServerRenderResult_1 = __webpack_require__(7840);\nvar reactHydrateOrRender_1 = __importDefault(__webpack_require__(501));\nvar reactApis_1 = __webpack_require__(282);\nvar REACT_ON_RAILS_STORE_ATTRIBUTE = 'data-js-react-on-rails-store';\nfunction findContext() {\n if (typeof window.ReactOnRails !== 'undefined') {\n return window;\n }\n else if (typeof ReactOnRails !== 'undefined') {\n return global;\n }\n throw new Error(\"ReactOnRails is undefined in both global and window namespaces.\\n \");\n}\nfunction debugTurbolinks() {\n var msg = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n msg[_i] = arguments[_i];\n }\n if (!window) {\n return;\n }\n var context = findContext();\n if (context.ReactOnRails && context.ReactOnRails.option('traceTurbolinks')) {\n console.log.apply(console, __spreadArray(['TURBO:'], msg, false));\n }\n}\nfunction turbolinksInstalled() {\n return (typeof Turbolinks !== 'undefined');\n}\nfunction turboInstalled() {\n var context = findContext();\n if (context.ReactOnRails) {\n return context.ReactOnRails.option('turbo') === true;\n }\n return false;\n}\nfunction reactOnRailsHtmlElements() {\n return document.getElementsByClassName('js-react-on-rails-component');\n}\nfunction initializeStore(el, context, railsContext) {\n var name = el.getAttribute(REACT_ON_RAILS_STORE_ATTRIBUTE) || '';\n var props = (el.textContent !== null) ? JSON.parse(el.textContent) : {};\n var storeGenerator = context.ReactOnRails.getStoreGenerator(name);\n var store = storeGenerator(props, railsContext);\n context.ReactOnRails.setStore(name, store);\n}\nfunction forEachStore(context, railsContext) {\n var els = document.querySelectorAll(\"[\".concat(REACT_ON_RAILS_STORE_ATTRIBUTE, \"]\"));\n for (var i = 0; i < els.length; i += 1) {\n initializeStore(els[i], context, railsContext);\n }\n}\nfunction turbolinksVersion5() {\n return (typeof Turbolinks.controller !== 'undefined');\n}\nfunction turbolinksSupported() {\n return Turbolinks.supported;\n}\nfunction delegateToRenderer(componentObj, props, railsContext, domNodeId, trace) {\n var name = componentObj.name, component = componentObj.component, isRenderer = componentObj.isRenderer;\n if (isRenderer) {\n if (trace) {\n console.log(\"DELEGATING TO RENDERER \".concat(name, \" for dom node with id: \").concat(domNodeId, \" with props, railsContext:\"), props, railsContext);\n }\n component(props, railsContext, domNodeId);\n return true;\n }\n return false;\n}\nfunction domNodeIdForEl(el) {\n return el.getAttribute('data-dom-id') || '';\n}\n/**\n * Used for client rendering by ReactOnRails. Either calls ReactDOM.hydrate, ReactDOM.render, or\n * delegates to a renderer registered by the user.\n */\nfunction render(el, context, railsContext) {\n // This must match lib/react_on_rails/helper.rb\n var name = el.getAttribute('data-component-name') || '';\n var domNodeId = domNodeIdForEl(el);\n var props = (el.textContent !== null) ? JSON.parse(el.textContent) : {};\n var trace = el.getAttribute('data-trace') === 'true';\n try {\n var domNode = document.getElementById(domNodeId);\n if (domNode) {\n var componentObj = context.ReactOnRails.getComponent(name);\n if (delegateToRenderer(componentObj, props, railsContext, domNodeId, trace)) {\n return;\n }\n // Hydrate if available and was server rendered\n // @ts-expect-error potentially present if React 18 or greater\n var shouldHydrate = !!(react_dom_1.default.hydrate || react_dom_1.default.hydrateRoot) && !!domNode.innerHTML;\n var reactElementOrRouterResult = (0, createReactOutput_1.default)({\n componentObj: componentObj,\n props: props,\n domNodeId: domNodeId,\n trace: trace,\n railsContext: railsContext,\n shouldHydrate: shouldHydrate,\n });\n if ((0, isServerRenderResult_1.isServerRenderHash)(reactElementOrRouterResult)) {\n throw new Error(\"You returned a server side type of react-router error: \".concat(JSON.stringify(reactElementOrRouterResult), \"\\nYou should return a React.Component always for the client side entry point.\"));\n }\n else {\n var rootOrElement = (0, reactHydrateOrRender_1.default)(domNode, reactElementOrRouterResult, shouldHydrate);\n if (reactApis_1.supportsRootApi) {\n context.roots.push(rootOrElement);\n }\n }\n }\n }\n catch (e) {\n console.error(e.message);\n e.message = \"ReactOnRails encountered an error while rendering component: \".concat(name, \". See above error message.\");\n throw e;\n }\n}\nfunction forEachReactOnRailsComponentRender(context, railsContext) {\n var els = reactOnRailsHtmlElements();\n for (var i = 0; i < els.length; i += 1) {\n render(els[i], context, railsContext);\n }\n}\nfunction parseRailsContext() {\n var el = document.getElementById('js-react-on-rails-context');\n if (!el) {\n // The HTML page will not have an element with ID 'js-react-on-rails-context' if there are no\n // react on rails components\n return null;\n }\n if (!el.textContent) {\n throw new Error('The HTML element with ID \\'js-react-on-rails-context\\' has no textContent');\n }\n return JSON.parse(el.textContent);\n}\nfunction reactOnRailsPageLoaded() {\n debugTurbolinks('reactOnRailsPageLoaded');\n var railsContext = parseRailsContext();\n // If no react on rails components\n if (!railsContext)\n return;\n var context = findContext();\n if (reactApis_1.supportsRootApi) {\n context.roots = [];\n }\n forEachStore(context, railsContext);\n forEachReactOnRailsComponentRender(context, railsContext);\n}\nfunction reactOnRailsComponentLoaded(domId) {\n debugTurbolinks(\"reactOnRailsComponentLoaded \".concat(domId));\n var railsContext = parseRailsContext();\n // If no react on rails components\n if (!railsContext)\n return;\n var context = findContext();\n if (reactApis_1.supportsRootApi) {\n context.roots = [];\n }\n var el = document.querySelector(\"[data-dom-id=\".concat(domId, \"]\"));\n if (!el)\n return;\n render(el, context, railsContext);\n}\nfunction unmount(el) {\n var domNodeId = domNodeIdForEl(el);\n var domNode = document.getElementById(domNodeId);\n if (domNode === null) {\n return;\n }\n try {\n react_dom_1.default.unmountComponentAtNode(domNode);\n }\n catch (e) {\n console.info(\"Caught error calling unmountComponentAtNode: \".concat(e.message, \" for domNode\"), domNode, e);\n }\n}\nfunction reactOnRailsPageUnloaded() {\n debugTurbolinks('reactOnRailsPageUnloaded');\n if (reactApis_1.supportsRootApi) {\n var roots = findContext().roots;\n // If no react on rails components\n if (!roots)\n return;\n for (var _i = 0, roots_1 = roots; _i < roots_1.length; _i++) {\n var root = roots_1[_i];\n root.unmount();\n }\n }\n else {\n var els = reactOnRailsHtmlElements();\n for (var i = 0; i < els.length; i += 1) {\n unmount(els[i]);\n }\n }\n}\nfunction renderInit() {\n // Install listeners when running on the client (browser).\n // We must do this check for turbolinks AFTER the document is loaded because we load the\n // Webpack bundles first.\n if ((!turbolinksInstalled() || !turbolinksSupported()) && !turboInstalled()) {\n debugTurbolinks('NOT USING TURBOLINKS: calling reactOnRailsPageLoaded');\n reactOnRailsPageLoaded();\n return;\n }\n if (turboInstalled()) {\n debugTurbolinks('USING TURBO: document added event listeners ' +\n 'turbo:before-render and turbo:render.');\n document.addEventListener('turbo:before-render', reactOnRailsPageUnloaded);\n document.addEventListener('turbo:render', reactOnRailsPageLoaded);\n reactOnRailsPageLoaded();\n }\n else if (turbolinksVersion5()) {\n debugTurbolinks('USING TURBOLINKS 5: document added event listeners ' +\n 'turbolinks:before-render and turbolinks:render.');\n document.addEventListener('turbolinks:before-render', reactOnRailsPageUnloaded);\n document.addEventListener('turbolinks:render', reactOnRailsPageLoaded);\n reactOnRailsPageLoaded();\n }\n else {\n debugTurbolinks('USING TURBOLINKS 2: document added event listeners page:before-unload and ' +\n 'page:change.');\n document.addEventListener('page:before-unload', reactOnRailsPageUnloaded);\n document.addEventListener('page:change', reactOnRailsPageLoaded);\n }\n}\nfunction isWindow(context) {\n return context.document !== undefined;\n}\nfunction onPageReady(callback) {\n if (document.readyState === \"complete\") {\n callback();\n }\n else {\n document.addEventListener(\"readystatechange\", function onReadyStateChange() {\n onPageReady(callback);\n document.removeEventListener(\"readystatechange\", onReadyStateChange);\n });\n }\n}\nfunction clientStartup(context) {\n // Check if server rendering\n if (!isWindow(context)) {\n return;\n }\n // Tried with a file local variable, but the install handler gets called twice.\n // eslint-disable-next-line no-underscore-dangle\n if (context.__REACT_ON_RAILS_EVENT_HANDLERS_RAN_ONCE__) {\n return;\n }\n // eslint-disable-next-line no-underscore-dangle, no-param-reassign\n context.__REACT_ON_RAILS_EVENT_HANDLERS_RAN_ONCE__ = true;\n onPageReady(renderInit);\n}\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/react-on-rails/node_package/lib/clientStartup.js?", + ); + + /***/ + }, + + /***/ 4055: /***/ (__unused_webpack_module, exports) => { + 'use strict'; + eval( + '\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports["default"] = context;\n/**\n * Get the context, be it window or global\n * @returns {boolean|Window|*|context}\n */\nfunction context() {\n return ((typeof window !== \'undefined\') && window) ||\n ((typeof global !== \'undefined\') && global) ||\n this;\n}\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/react-on-rails/node_package/lib/context.js?', + ); + + /***/ + }, + + /***/ 4598: /***/ function (__unused_webpack_module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n/* eslint-disable react/prop-types */\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { "default": mod };\n};\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports["default"] = createReactOutput;\nvar react_1 = __importDefault(__webpack_require__(6540));\nvar isServerRenderResult_1 = __webpack_require__(7840);\n/**\n * Logic to either call the renderFunction or call React.createElement to get the\n * React.Component\n * @param options\n * @param options.componentObj\n * @param options.props\n * @param options.domNodeId\n * @param options.trace\n * @param options.location\n * @returns {ReactElement}\n */\nfunction createReactOutput(_a) {\n var componentObj = _a.componentObj, props = _a.props, railsContext = _a.railsContext, domNodeId = _a.domNodeId, trace = _a.trace, shouldHydrate = _a.shouldHydrate;\n var name = componentObj.name, component = componentObj.component, renderFunction = componentObj.renderFunction;\n if (trace) {\n if (railsContext && railsContext.serverSide) {\n console.log("RENDERED ".concat(name, " to dom node with id: ").concat(domNodeId));\n }\n else if (shouldHydrate) {\n console.log("HYDRATED ".concat(name, " in dom node with id: ").concat(domNodeId, " using props, railsContext:"), props, railsContext);\n }\n else {\n console.log("RENDERED ".concat(name, " to dom node with id: ").concat(domNodeId, " with props, railsContext:"), props, railsContext);\n }\n }\n if (renderFunction) {\n // Let\'s invoke the function to get the result\n if (trace) {\n console.log("".concat(name, " is a renderFunction"));\n }\n var renderFunctionResult = component(props, railsContext);\n if ((0, isServerRenderResult_1.isServerRenderHash)(renderFunctionResult)) {\n // We just return at this point, because calling function knows how to handle this case and\n // we can\'t call React.createElement with this type of Object.\n return renderFunctionResult;\n }\n if ((0, isServerRenderResult_1.isPromise)(renderFunctionResult)) {\n // We just return at this point, because calling function knows how to handle this case and\n // we can\'t call React.createElement with this type of Object.\n return renderFunctionResult;\n }\n if (react_1.default.isValidElement(renderFunctionResult)) {\n // If already a ReactElement, then just return it.\n console.error("Warning: ReactOnRails: Your registered render-function (ReactOnRails.register) for ".concat(name, "\\nincorrectly returned a React Element (JSX). Instead, return a React Function Component by\\nwrapping your JSX in a function. ReactOnRails v13 will throw error on this, as React Hooks do not\\nwork if you return JSX. Update by wrapping the result JSX of ").concat(name, " in a fat arrow function."));\n return renderFunctionResult;\n }\n // If a component, then wrap in an element\n var reactComponent = renderFunctionResult;\n return react_1.default.createElement(reactComponent, props);\n }\n // else\n return react_1.default.createElement(component, props);\n}\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/react-on-rails/node_package/lib/createReactOutput.js?', + ); + + /***/ + }, + + /***/ 9556: /***/ function (__unused_webpack_module, exports, __webpack_require__) { + 'use strict'; + eval( + '\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { "default": mod };\n};\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nvar react_1 = __importDefault(__webpack_require__(6540));\nvar server_1 = __importDefault(__webpack_require__(4362));\nfunction handleRenderFunctionIssue(options) {\n var e = options.e, name = options.name;\n var msg = \'\';\n if (name) {\n var lastLine = \'A Render-Function takes a single arg of props (and the location for react-router) \' +\n \'and returns a ReactElement.\';\n var shouldBeRenderFunctionError = "ERROR: ReactOnRails is incorrectly detecting Render-Function to be false. The React\\ncomponent \'".concat(name, "\' seems to be a Render-Function.\\n").concat(lastLine);\n var reMatchShouldBeGeneratorError = /Can\'t add property context, object is not extensible/;\n if (reMatchShouldBeGeneratorError.test(e.message)) {\n msg += "".concat(shouldBeRenderFunctionError, "\\n\\n");\n console.error(shouldBeRenderFunctionError);\n }\n shouldBeRenderFunctionError =\n "ERROR: ReactOnRails is incorrectly detecting renderFunction to be true, but the React\\ncomponent \'".concat(name, "\' is not a Render-Function.\\n").concat(lastLine);\n var reMatchShouldNotBeGeneratorError = /Cannot call a class as a function/;\n if (reMatchShouldNotBeGeneratorError.test(e.message)) {\n msg += "".concat(shouldBeRenderFunctionError, "\\n\\n");\n console.error(shouldBeRenderFunctionError);\n }\n }\n return msg;\n}\nvar handleError = function (options) {\n var e = options.e, jsCode = options.jsCode, serverSide = options.serverSide;\n console.error(\'Exception in rendering!\');\n var msg = handleRenderFunctionIssue(options);\n if (jsCode) {\n console.error("JS code was: ".concat(jsCode));\n }\n if (e.fileName) {\n console.error("location: ".concat(e.fileName, ":").concat(e.lineNumber));\n }\n console.error("message: ".concat(e.message));\n console.error("stack: ".concat(e.stack));\n if (serverSide) {\n msg += "Exception in rendering!\\n".concat(e.fileName ? "\\nlocation: ".concat(e.fileName, ":").concat(e.lineNumber) : \'\', "\\nMessage: ").concat(e.message, "\\n\\n").concat(e.stack);\n var reactElement = react_1.default.createElement(\'pre\', null, msg);\n return server_1.default.renderToString(reactElement);\n }\n return "undefined";\n};\nexports["default"] = handleError;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/react-on-rails/node_package/lib/handleError.js?', + ); + + /***/ + }, + + /***/ 8238: /***/ (__unused_webpack_module, exports) => { + 'use strict'; + eval( + '\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports["default"] = isRenderFunction;\n/**\n * Used to determine we\'ll call be calling React.createElement on the component of if this is a\n * Render-Function used return a function that takes props to return a React element\n * @param component\n * @returns {boolean}\n */\nfunction isRenderFunction(component) {\n var _a;\n // No for es5 or es6 React Component\n if ((_a = component.prototype) === null || _a === void 0 ? void 0 : _a.isReactComponent) {\n return false;\n }\n if (component.renderFunction) {\n return true;\n }\n // If zero or one args, then we know that this is a regular function that will\n // return a React component\n if (component.length >= 2) {\n return true;\n }\n return false;\n}\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/react-on-rails/node_package/lib/isRenderFunction.js?', + ); + + /***/ + }, + + /***/ 7840: /***/ (__unused_webpack_module, exports) => { + 'use strict'; + eval( + '\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.isServerRenderHash = isServerRenderHash;\nexports.isPromise = isPromise;\nfunction isServerRenderHash(testValue) {\n return !!(testValue.renderedHtml ||\n testValue.redirectLocation ||\n testValue.routeError ||\n testValue.error);\n}\nfunction isPromise(testValue) {\n return !!(testValue === null || testValue === void 0 ? void 0 : testValue.then);\n}\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/react-on-rails/node_package/lib/isServerRenderResult.js?', + ); + + /***/ + }, + + /***/ 282: /***/ function (__unused_webpack_module, exports, __webpack_require__) { + 'use strict'; + eval( + '\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { "default": mod };\n};\nvar _a;\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.supportsRootApi = void 0;\nvar react_dom_1 = __importDefault(__webpack_require__(961));\nvar reactMajorVersion = Number((_a = react_dom_1.default.version) === null || _a === void 0 ? void 0 : _a.split(\'.\')[0]) || 16;\n// TODO: once we require React 18, we can remove this and inline everything guarded by it.\n// Not the default export because others may be added for future React versions.\n// eslint-disable-next-line import/prefer-default-export\nexports.supportsRootApi = reactMajorVersion >= 18;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/react-on-rails/node_package/lib/reactApis.js?', + ); + + /***/ + }, + + /***/ 501: /***/ function (__unused_webpack_module, exports, __webpack_require__) { + 'use strict'; + eval( + '\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { "default": mod };\n};\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.reactHydrate = void 0;\nexports.reactRender = reactRender;\nexports["default"] = reactHydrateOrRender;\nvar react_dom_1 = __importDefault(__webpack_require__(961));\nvar reactApis_1 = __webpack_require__(282);\n// TODO: once React dependency is updated to >= 18, we can remove this and just\n// import ReactDOM from \'react-dom/client\';\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nvar reactDomClient;\nif (reactApis_1.supportsRootApi) {\n // This will never throw an exception, but it\'s the way to tell Webpack the dependency is optional\n // https://github.com/webpack/webpack/issues/339#issuecomment-47739112\n // Unfortunately, it only converts the error to a warning.\n try {\n // eslint-disable-next-line global-require,import/no-unresolved\n reactDomClient = __webpack_require__(5338);\n }\n catch (e) {\n // We should never get here, but if we do, we\'ll just use the default ReactDOM\n // and live with the warning.\n reactDomClient = react_dom_1.default;\n }\n}\nexports.reactHydrate = reactApis_1.supportsRootApi ?\n reactDomClient.hydrateRoot :\n function (domNode, reactElement) { return react_dom_1.default.hydrate(reactElement, domNode); };\nfunction reactRender(domNode, reactElement) {\n if (reactApis_1.supportsRootApi) {\n var root = reactDomClient.createRoot(domNode);\n root.render(reactElement);\n return root;\n }\n // eslint-disable-next-line react/no-render-return-value\n return react_dom_1.default.render(reactElement, domNode);\n}\nfunction reactHydrateOrRender(domNode, reactElement, hydrate) {\n return hydrate ? (0, exports.reactHydrate)(domNode, reactElement) : reactRender(domNode, reactElement);\n}\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/react-on-rails/node_package/lib/reactHydrateOrRender.js?', + ); + + /***/ + }, + + /***/ 873: /***/ (__unused_webpack_module, exports) => { + 'use strict'; + eval( + '\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports["default"] = (function (val) {\n // Replace closing\n var re = /<\\/\\W*script/gi;\n return val.replace(re, \'(/script\');\n});\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/react-on-rails/node_package/lib/scriptSanitizedVal.js?', + ); + + /***/ + }, + + /***/ 2239: /***/ function (__unused_webpack_module, exports, __webpack_require__) { + 'use strict'; + eval( + '\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);\n return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError("Generator is already executing.");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { "default": mod };\n};\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.streamServerRenderedReactComponent = void 0;\nvar server_1 = __importDefault(__webpack_require__(4362));\nvar stream_1 = __webpack_require__(2203);\nvar ComponentRegistry_1 = __importDefault(__webpack_require__(2184));\nvar createReactOutput_1 = __importDefault(__webpack_require__(4598));\nvar isServerRenderResult_1 = __webpack_require__(7840);\nvar buildConsoleReplay_1 = __importDefault(__webpack_require__(7288));\nvar handleError_1 = __importDefault(__webpack_require__(9556));\nfunction convertToError(e) {\n return e instanceof Error ? e : new Error(String(e));\n}\nfunction validateComponent(componentObj, componentName) {\n if (componentObj.isRenderer) {\n throw new Error("Detected a renderer while server rendering component \'".concat(componentName, "\'. See https://github.com/shakacode/react_on_rails#renderer-functions"));\n }\n}\nfunction processServerRenderHash(result, options) {\n var redirectLocation = result.redirectLocation, routeError = result.routeError;\n var hasErrors = !!routeError;\n if (hasErrors) {\n console.error("React Router ERROR: ".concat(JSON.stringify(routeError)));\n }\n var htmlResult;\n if (redirectLocation) {\n if (options.trace) {\n var redirectPath = redirectLocation.pathname + redirectLocation.search;\n console.log("ROUTER REDIRECT: ".concat(options.componentName, " to dom node with id: ").concat(options.domNodeId, ", redirect to ").concat(redirectPath));\n }\n // For redirects on server rendering, we can\'t stop Rails from returning the same result.\n // Possibly, someday, we could have the Rails server redirect.\n htmlResult = \'\';\n }\n else {\n htmlResult = result.renderedHtml;\n }\n return { result: htmlResult, hasErrors: hasErrors };\n}\nfunction processPromise(result, renderingReturnsPromises) {\n if (!renderingReturnsPromises) {\n console.error(\'Your render function returned a Promise, which is only supported by a node renderer, not ExecJS.\');\n // If the app is using server rendering with ExecJS, then the promise will not be awaited.\n // And when a promise is passed to JSON.stringify, it will be converted to \'{}\'.\n return \'{}\';\n }\n return result;\n}\nfunction processReactElement(result) {\n try {\n return server_1.default.renderToString(result);\n }\n catch (error) {\n console.error("Invalid call to renderToString. Possibly you have a renderFunction, a function that already\\ncalls renderToString, that takes one parameter. You need to add an extra unused parameter to identify this function\\nas a renderFunction and not a simple React Function Component.");\n throw error;\n }\n}\nfunction processRenderingResult(result, options) {\n if ((0, isServerRenderResult_1.isServerRenderHash)(result)) {\n return processServerRenderHash(result, options);\n }\n if ((0, isServerRenderResult_1.isPromise)(result)) {\n return { result: processPromise(result, options.renderingReturnsPromises), hasErrors: false };\n }\n return { result: processReactElement(result), hasErrors: false };\n}\nfunction handleRenderingError(e, options) {\n if (options.throwJsErrors) {\n throw e;\n }\n var error = convertToError(e);\n return {\n hasErrors: true,\n result: (0, handleError_1.default)({ e: error, name: options.componentName, serverSide: true }),\n error: error,\n };\n}\nfunction createResultObject(html, consoleReplayScript, renderState) {\n return {\n html: html,\n consoleReplayScript: consoleReplayScript,\n hasErrors: renderState.hasErrors,\n renderingError: renderState.error && { message: renderState.error.message, stack: renderState.error.stack },\n isShellReady: \'isShellReady\' in renderState ? renderState.isShellReady : undefined,\n };\n}\nfunction createPromiseResult(renderState, componentName, throwJsErrors) {\n return __awaiter(this, void 0, void 0, function () {\n var consoleHistory, html, consoleReplayScript, e_1, errorRenderState, consoleReplayScript;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n consoleHistory = console.history;\n _a.label = 1;\n case 1:\n _a.trys.push([1, 3, , 4]);\n return [4 /*yield*/, renderState.result];\n case 2:\n html = _a.sent();\n consoleReplayScript = (0, buildConsoleReplay_1.default)(consoleHistory);\n return [2 /*return*/, createResultObject(html, consoleReplayScript, renderState)];\n case 3:\n e_1 = _a.sent();\n errorRenderState = handleRenderingError(e_1, { componentName: componentName, throwJsErrors: throwJsErrors });\n consoleReplayScript = (0, buildConsoleReplay_1.default)(consoleHistory);\n return [2 /*return*/, createResultObject(errorRenderState.result, consoleReplayScript, renderState)];\n case 4: return [2 /*return*/];\n }\n });\n });\n}\nfunction createFinalResult(renderState, componentName, throwJsErrors) {\n var result = renderState.result;\n if ((0, isServerRenderResult_1.isPromise)(result)) {\n return createPromiseResult(__assign(__assign({}, renderState), { result: result }), componentName, throwJsErrors);\n }\n var consoleReplayScript = (0, buildConsoleReplay_1.default)();\n return JSON.stringify(createResultObject(result, consoleReplayScript, renderState));\n}\nfunction serverRenderReactComponentInternal(options) {\n var componentName = options.name, domNodeId = options.domNodeId, trace = options.trace, props = options.props, railsContext = options.railsContext, renderingReturnsPromises = options.renderingReturnsPromises, throwJsErrors = options.throwJsErrors;\n var renderState = {\n result: null,\n hasErrors: false,\n };\n try {\n var componentObj = ComponentRegistry_1.default.get(componentName);\n validateComponent(componentObj, componentName);\n // Renders the component or executes the render function\n // - If the registered component is a React element or component, it renders it\n // - If it\'s a render function, it executes the function and processes the result:\n // - For React elements or components, it renders them\n // - For promises, it returns them without awaiting (for async rendering)\n // - For other values (e.g., strings), it returns them directly\n // Note: Only synchronous operations are performed at this stage\n var reactRenderingResult = (0, createReactOutput_1.default)({ componentObj: componentObj, domNodeId: domNodeId, trace: trace, props: props, railsContext: railsContext });\n // Processes the result from createReactOutput:\n // 1. Converts React elements to HTML strings\n // 2. Returns rendered HTML from serverRenderHash\n // 3. Handles promises for async rendering\n renderState = processRenderingResult(reactRenderingResult, { componentName: componentName, domNodeId: domNodeId, trace: trace, renderingReturnsPromises: renderingReturnsPromises });\n }\n catch (e) {\n renderState = handleRenderingError(e, { componentName: componentName, throwJsErrors: throwJsErrors });\n }\n // Finalize the rendering result and prepare it for server response\n // 1. Builds the consoleReplayScript for client-side console replay\n // 2. Extract the result from promise (if needed) by awaiting it\n // 3. Constructs a JSON object with the following properties:\n // - html: string | null (The rendered component HTML)\n // - consoleReplayScript: string (Script to replay console outputs on the client)\n // - hasErrors: boolean (Indicates if any errors occurred during rendering)\n // - renderingError: Error | null (The error object if an error occurred, null otherwise)\n // 4. For Promise results, it awaits resolution before creating the final JSON\n return createFinalResult(renderState, componentName, throwJsErrors);\n}\nvar serverRenderReactComponent = function (options) {\n try {\n return serverRenderReactComponentInternal(options);\n }\n finally {\n // Reset console history after each render.\n // See `RubyEmbeddedJavaScript.console_polyfill` for initialization.\n // This is necessary when ExecJS and old versions of node renderer are used.\n // New versions of node renderer reset the console history automatically.\n console.history = [];\n }\n};\nvar stringToStream = function (str) {\n var stream = new stream_1.PassThrough();\n stream.write(str);\n stream.end();\n return stream;\n};\nvar transformRenderStreamChunksToResultObject = function (renderState) {\n var consoleHistory = console.history;\n var previouslyReplayedConsoleMessages = 0;\n var transformStream = new stream_1.PassThrough({\n transform: function (chunk, _, callback) {\n var htmlChunk = chunk.toString();\n var consoleReplayScript = (0, buildConsoleReplay_1.default)(consoleHistory, previouslyReplayedConsoleMessages);\n previouslyReplayedConsoleMessages = (consoleHistory === null || consoleHistory === void 0 ? void 0 : consoleHistory.length) || 0;\n var jsonChunk = JSON.stringify(createResultObject(htmlChunk, consoleReplayScript, renderState));\n this.push("".concat(jsonChunk, "\\n"));\n callback();\n }\n });\n var pipedStream = null;\n var pipeToTransform = function (pipeableStream) {\n pipeableStream.pipe(transformStream);\n pipedStream = pipeableStream;\n };\n // We need to wrap the transformStream in a Readable stream to properly handle errors:\n // 1. If we returned transformStream directly, we couldn\'t emit errors into it externally\n // 2. If an error is emitted into the transformStream, it would cause the render to fail\n // 3. By wrapping in Readable.from(), we can explicitly emit errors into the readableStream without affecting the transformStream\n // Note: Readable.from can merge multiple chunks into a single chunk, so we need to ensure that we can separate them later\n var readableStream = stream_1.Readable.from(transformStream);\n var writeChunk = function (chunk) { return transformStream.write(chunk); };\n var emitError = function (error) { return readableStream.emit(\'error\', error); };\n var endStream = function () {\n transformStream.end();\n pipedStream === null || pipedStream === void 0 ? void 0 : pipedStream.abort();\n };\n return { readableStream: readableStream, pipeToTransform: pipeToTransform, writeChunk: writeChunk, emitError: emitError, endStream: endStream };\n};\nvar streamRenderReactComponent = function (reactRenderingResult, options) {\n var componentName = options.name, throwJsErrors = options.throwJsErrors;\n var renderState = {\n result: null,\n hasErrors: false,\n isShellReady: false\n };\n var _a = transformRenderStreamChunksToResultObject(renderState), readableStream = _a.readableStream, pipeToTransform = _a.pipeToTransform, writeChunk = _a.writeChunk, emitError = _a.emitError, endStream = _a.endStream;\n var renderingStream = server_1.default.renderToPipeableStream(reactRenderingResult, {\n onShellError: function (e) {\n var error = convertToError(e);\n renderState.hasErrors = true;\n renderState.error = error;\n if (throwJsErrors) {\n emitError(error);\n }\n var errorHtml = (0, handleError_1.default)({ e: error, name: componentName, serverSide: true });\n writeChunk(errorHtml);\n endStream();\n },\n onShellReady: function () {\n renderState.isShellReady = true;\n pipeToTransform(renderingStream);\n },\n onError: function (e) {\n if (!renderState.isShellReady) {\n return;\n }\n var error = convertToError(e);\n if (throwJsErrors) {\n emitError(error);\n }\n renderState.hasErrors = true;\n renderState.error = error;\n },\n });\n return readableStream;\n};\nvar streamServerRenderedReactComponent = function (options) {\n var componentName = options.name, domNodeId = options.domNodeId, trace = options.trace, props = options.props, railsContext = options.railsContext, throwJsErrors = options.throwJsErrors;\n try {\n var componentObj = ComponentRegistry_1.default.get(componentName);\n validateComponent(componentObj, componentName);\n var reactRenderingResult = (0, createReactOutput_1.default)({\n componentObj: componentObj,\n domNodeId: domNodeId,\n trace: trace,\n props: props,\n railsContext: railsContext,\n });\n if ((0, isServerRenderResult_1.isServerRenderHash)(reactRenderingResult) || (0, isServerRenderResult_1.isPromise)(reactRenderingResult)) {\n throw new Error(\'Server rendering of streams is not supported for server render hashes or promises.\');\n }\n return streamRenderReactComponent(reactRenderingResult, options);\n }\n catch (e) {\n if (throwJsErrors) {\n throw e;\n }\n var error = convertToError(e);\n var htmlResult = (0, handleError_1.default)({ e: error, name: componentName, serverSide: true });\n var jsonResult = JSON.stringify(createResultObject(htmlResult, (0, buildConsoleReplay_1.default)(), { hasErrors: true, error: error, result: null }));\n return stringToStream(jsonResult);\n }\n};\nexports.streamServerRenderedReactComponent = streamServerRenderedReactComponent;\nexports["default"] = serverRenderReactComponent;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/react-on-rails/node_package/lib/serverRenderReactComponent.js?', + ); + + /***/ + }, + + /***/ 9146: /***/ (__unused_webpack_module, exports) => { + 'use strict'; + eval( + '\nObject.defineProperty(exports, "__esModule", ({ value: true }));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/react-on-rails/node_package/lib/types/index.js?', + ); + + /***/ + }, + + /***/ 4976: /***/ (__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + 'var react_dom__WEBPACK_IMPORTED_MODULE_1___namespace_cache;\n__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ AbortedDeferredError: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_2__.AbortedDeferredError),\n/* harmony export */ Await: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.Await),\n/* harmony export */ BrowserRouter: () => (/* binding */ BrowserRouter),\n/* harmony export */ Form: () => (/* binding */ Form),\n/* harmony export */ HashRouter: () => (/* binding */ HashRouter),\n/* harmony export */ Link: () => (/* binding */ Link),\n/* harmony export */ MemoryRouter: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.MemoryRouter),\n/* harmony export */ NavLink: () => (/* binding */ NavLink),\n/* harmony export */ Navigate: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.Navigate),\n/* harmony export */ NavigationType: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_2__.Action),\n/* harmony export */ Outlet: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.Outlet),\n/* harmony export */ Route: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.Route),\n/* harmony export */ Router: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.Router),\n/* harmony export */ RouterProvider: () => (/* binding */ RouterProvider),\n/* harmony export */ Routes: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.Routes),\n/* harmony export */ ScrollRestoration: () => (/* binding */ ScrollRestoration),\n/* harmony export */ UNSAFE_DataRouterContext: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.UNSAFE_DataRouterContext),\n/* harmony export */ UNSAFE_DataRouterStateContext: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.UNSAFE_DataRouterStateContext),\n/* harmony export */ UNSAFE_ErrorResponseImpl: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_2__.UNSAFE_ErrorResponseImpl),\n/* harmony export */ UNSAFE_FetchersContext: () => (/* binding */ FetchersContext),\n/* harmony export */ UNSAFE_LocationContext: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.UNSAFE_LocationContext),\n/* harmony export */ UNSAFE_NavigationContext: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.UNSAFE_NavigationContext),\n/* harmony export */ UNSAFE_RouteContext: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.UNSAFE_RouteContext),\n/* harmony export */ UNSAFE_ViewTransitionContext: () => (/* binding */ ViewTransitionContext),\n/* harmony export */ UNSAFE_useRouteId: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.UNSAFE_useRouteId),\n/* harmony export */ UNSAFE_useScrollRestoration: () => (/* binding */ useScrollRestoration),\n/* harmony export */ createBrowserRouter: () => (/* binding */ createBrowserRouter),\n/* harmony export */ createHashRouter: () => (/* binding */ createHashRouter),\n/* harmony export */ createMemoryRouter: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.createMemoryRouter),\n/* harmony export */ createPath: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_2__.createPath),\n/* harmony export */ createRoutesFromChildren: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.createRoutesFromChildren),\n/* harmony export */ createRoutesFromElements: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.createRoutesFromElements),\n/* harmony export */ createSearchParams: () => (/* binding */ createSearchParams),\n/* harmony export */ defer: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_2__.defer),\n/* harmony export */ generatePath: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_2__.generatePath),\n/* harmony export */ isRouteErrorResponse: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_2__.isRouteErrorResponse),\n/* harmony export */ json: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_2__.json),\n/* harmony export */ matchPath: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_2__.matchPath),\n/* harmony export */ matchRoutes: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_2__.matchRoutes),\n/* harmony export */ parsePath: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_2__.parsePath),\n/* harmony export */ redirect: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_2__.redirect),\n/* harmony export */ redirectDocument: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_2__.redirectDocument),\n/* harmony export */ renderMatches: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.renderMatches),\n/* harmony export */ resolvePath: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_2__.resolvePath),\n/* harmony export */ unstable_HistoryRouter: () => (/* binding */ HistoryRouter),\n/* harmony export */ unstable_usePrompt: () => (/* binding */ usePrompt),\n/* harmony export */ unstable_useViewTransitionState: () => (/* binding */ useViewTransitionState),\n/* harmony export */ useActionData: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.useActionData),\n/* harmony export */ useAsyncError: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.useAsyncError),\n/* harmony export */ useAsyncValue: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.useAsyncValue),\n/* harmony export */ useBeforeUnload: () => (/* binding */ useBeforeUnload),\n/* harmony export */ useBlocker: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.useBlocker),\n/* harmony export */ useFetcher: () => (/* binding */ useFetcher),\n/* harmony export */ useFetchers: () => (/* binding */ useFetchers),\n/* harmony export */ useFormAction: () => (/* binding */ useFormAction),\n/* harmony export */ useHref: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.useHref),\n/* harmony export */ useInRouterContext: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.useInRouterContext),\n/* harmony export */ useLinkClickHandler: () => (/* binding */ useLinkClickHandler),\n/* harmony export */ useLoaderData: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.useLoaderData),\n/* harmony export */ useLocation: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.useLocation),\n/* harmony export */ useMatch: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.useMatch),\n/* harmony export */ useMatches: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.useMatches),\n/* harmony export */ useNavigate: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.useNavigate),\n/* harmony export */ useNavigation: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.useNavigation),\n/* harmony export */ useNavigationType: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.useNavigationType),\n/* harmony export */ useOutlet: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.useOutlet),\n/* harmony export */ useOutletContext: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.useOutletContext),\n/* harmony export */ useParams: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.useParams),\n/* harmony export */ useResolvedPath: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.useResolvedPath),\n/* harmony export */ useRevalidator: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.useRevalidator),\n/* harmony export */ useRouteError: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.useRouteError),\n/* harmony export */ useRouteLoaderData: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.useRouteLoaderData),\n/* harmony export */ useRoutes: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.useRoutes),\n/* harmony export */ useSearchParams: () => (/* binding */ useSearchParams),\n/* harmony export */ useSubmit: () => (/* binding */ useSubmit)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6540);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(961);\n/* harmony import */ var react_router__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(7767);\n/* harmony import */ var react_router__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5588);\n/**\n * React Router DOM v6.24.1\n *\n * Copyright (c) Remix Software Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE.md file in the root directory of this source tree.\n *\n * @license MIT\n */\n\n\n\n\n\n\n\nfunction _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n return target;\n}\n\nconst defaultMethod = "get";\nconst defaultEncType = "application/x-www-form-urlencoded";\nfunction isHtmlElement(object) {\n return object != null && typeof object.tagName === "string";\n}\nfunction isButtonElement(object) {\n return isHtmlElement(object) && object.tagName.toLowerCase() === "button";\n}\nfunction isFormElement(object) {\n return isHtmlElement(object) && object.tagName.toLowerCase() === "form";\n}\nfunction isInputElement(object) {\n return isHtmlElement(object) && object.tagName.toLowerCase() === "input";\n}\nfunction isModifiedEvent(event) {\n return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);\n}\nfunction shouldProcessLinkClick(event, target) {\n return event.button === 0 && (\n // Ignore everything but left clicks\n !target || target === "_self") &&\n // Let browser handle "target=_blank" etc.\n !isModifiedEvent(event) // Ignore clicks with modifier keys\n ;\n}\n/**\n * Creates a URLSearchParams object using the given initializer.\n *\n * This is identical to `new URLSearchParams(init)` except it also\n * supports arrays as values in the object form of the initializer\n * instead of just strings. This is convenient when you need multiple\n * values for a given key, but don\'t want to use an array initializer.\n *\n * For example, instead of:\n *\n * let searchParams = new URLSearchParams([\n * [\'sort\', \'name\'],\n * [\'sort\', \'price\']\n * ]);\n *\n * you can do:\n *\n * let searchParams = createSearchParams({\n * sort: [\'name\', \'price\']\n * });\n */\nfunction createSearchParams(init) {\n if (init === void 0) {\n init = "";\n }\n return new URLSearchParams(typeof init === "string" || Array.isArray(init) || init instanceof URLSearchParams ? init : Object.keys(init).reduce((memo, key) => {\n let value = init[key];\n return memo.concat(Array.isArray(value) ? value.map(v => [key, v]) : [[key, value]]);\n }, []));\n}\nfunction getSearchParamsForLocation(locationSearch, defaultSearchParams) {\n let searchParams = createSearchParams(locationSearch);\n if (defaultSearchParams) {\n // Use `defaultSearchParams.forEach(...)` here instead of iterating of\n // `defaultSearchParams.keys()` to work-around a bug in Firefox related to\n // web extensions. Relevant Bugzilla tickets:\n // https://bugzilla.mozilla.org/show_bug.cgi?id=1414602\n // https://bugzilla.mozilla.org/show_bug.cgi?id=1023984\n defaultSearchParams.forEach((_, key) => {\n if (!searchParams.has(key)) {\n defaultSearchParams.getAll(key).forEach(value => {\n searchParams.append(key, value);\n });\n }\n });\n }\n return searchParams;\n}\n// One-time check for submitter support\nlet _formDataSupportsSubmitter = null;\nfunction isFormDataSubmitterSupported() {\n if (_formDataSupportsSubmitter === null) {\n try {\n new FormData(document.createElement("form"),\n // @ts-expect-error if FormData supports the submitter parameter, this will throw\n 0);\n _formDataSupportsSubmitter = false;\n } catch (e) {\n _formDataSupportsSubmitter = true;\n }\n }\n return _formDataSupportsSubmitter;\n}\nconst supportedFormEncTypes = new Set(["application/x-www-form-urlencoded", "multipart/form-data", "text/plain"]);\nfunction getFormEncType(encType) {\n if (encType != null && !supportedFormEncTypes.has(encType)) {\n true ? (0,react_router__WEBPACK_IMPORTED_MODULE_2__.UNSAFE_warning)(false, "\\"" + encType + "\\" is not a valid `encType` for `<Form>`/`<fetcher.Form>` " + ("and will default to \\"" + defaultEncType + "\\"")) : 0;\n return null;\n }\n return encType;\n}\nfunction getFormSubmissionInfo(target, basename) {\n let method;\n let action;\n let encType;\n let formData;\n let body;\n if (isFormElement(target)) {\n // When grabbing the action from the element, it will have had the basename\n // prefixed to ensure non-JS scenarios work, so strip it since we\'ll\n // re-prefix in the router\n let attr = target.getAttribute("action");\n action = attr ? (0,react_router__WEBPACK_IMPORTED_MODULE_2__.stripBasename)(attr, basename) : null;\n method = target.getAttribute("method") || defaultMethod;\n encType = getFormEncType(target.getAttribute("enctype")) || defaultEncType;\n formData = new FormData(target);\n } else if (isButtonElement(target) || isInputElement(target) && (target.type === "submit" || target.type === "image")) {\n let form = target.form;\n if (form == null) {\n throw new Error("Cannot submit a <button> or <input type=\\"submit\\"> without a <form>");\n }\n // <button>/<input type="submit"> may override attributes of <form>\n // When grabbing the action from the element, it will have had the basename\n // prefixed to ensure non-JS scenarios work, so strip it since we\'ll\n // re-prefix in the router\n let attr = target.getAttribute("formaction") || form.getAttribute("action");\n action = attr ? (0,react_router__WEBPACK_IMPORTED_MODULE_2__.stripBasename)(attr, basename) : null;\n method = target.getAttribute("formmethod") || form.getAttribute("method") || defaultMethod;\n encType = getFormEncType(target.getAttribute("formenctype")) || getFormEncType(form.getAttribute("enctype")) || defaultEncType;\n // Build a FormData object populated from a form and submitter\n formData = new FormData(form, target);\n // If this browser doesn\'t support the `FormData(el, submitter)` format,\n // then tack on the submitter value at the end. This is a lightweight\n // solution that is not 100% spec compliant. For complete support in older\n // browsers, consider using the `formdata-submitter-polyfill` package\n if (!isFormDataSubmitterSupported()) {\n let {\n name,\n type,\n value\n } = target;\n if (type === "image") {\n let prefix = name ? name + "." : "";\n formData.append(prefix + "x", "0");\n formData.append(prefix + "y", "0");\n } else if (name) {\n formData.append(name, value);\n }\n }\n } else if (isHtmlElement(target)) {\n throw new Error("Cannot submit element that is not <form>, <button>, or " + "<input type=\\"submit|image\\">");\n } else {\n method = defaultMethod;\n action = null;\n encType = defaultEncType;\n body = target;\n }\n // Send body for <Form encType="text/plain" so we encode it into text\n if (formData && encType === "text/plain") {\n body = formData;\n formData = undefined;\n }\n return {\n action,\n method: method.toLowerCase(),\n encType,\n formData,\n body\n };\n}\n\nconst _excluded = ["onClick", "relative", "reloadDocument", "replace", "state", "target", "to", "preventScrollReset", "unstable_viewTransition"],\n _excluded2 = ["aria-current", "caseSensitive", "className", "end", "style", "to", "unstable_viewTransition", "children"],\n _excluded3 = ["fetcherKey", "navigate", "reloadDocument", "replace", "state", "method", "action", "onSubmit", "relative", "preventScrollReset", "unstable_viewTransition"];\n// HEY YOU! DON\'T TOUCH THIS VARIABLE!\n//\n// It is replaced with the proper version at build time via a babel plugin in\n// the rollup config.\n//\n// Export a global property onto the window for React Router detection by the\n// Core Web Vitals Technology Report. This way they can configure the `wappalyzer`\n// to detect and properly classify live websites as being built with React Router:\n// https://github.com/HTTPArchive/wappalyzer/blob/main/src/technologies/r.json\nconst REACT_ROUTER_VERSION = "6";\ntry {\n window.__reactRouterVersion = REACT_ROUTER_VERSION;\n} catch (e) {\n // no-op\n}\nfunction createBrowserRouter(routes, opts) {\n return (0,react_router__WEBPACK_IMPORTED_MODULE_2__.createRouter)({\n basename: opts == null ? void 0 : opts.basename,\n future: _extends({}, opts == null ? void 0 : opts.future, {\n v7_prependBasename: true\n }),\n history: (0,react_router__WEBPACK_IMPORTED_MODULE_2__.createBrowserHistory)({\n window: opts == null ? void 0 : opts.window\n }),\n hydrationData: (opts == null ? void 0 : opts.hydrationData) || parseHydrationData(),\n routes,\n mapRouteProperties: react_router__WEBPACK_IMPORTED_MODULE_3__.UNSAFE_mapRouteProperties,\n unstable_dataStrategy: opts == null ? void 0 : opts.unstable_dataStrategy,\n unstable_patchRoutesOnMiss: opts == null ? void 0 : opts.unstable_patchRoutesOnMiss,\n window: opts == null ? void 0 : opts.window\n }).initialize();\n}\nfunction createHashRouter(routes, opts) {\n return (0,react_router__WEBPACK_IMPORTED_MODULE_2__.createRouter)({\n basename: opts == null ? void 0 : opts.basename,\n future: _extends({}, opts == null ? void 0 : opts.future, {\n v7_prependBasename: true\n }),\n history: (0,react_router__WEBPACK_IMPORTED_MODULE_2__.createHashHistory)({\n window: opts == null ? void 0 : opts.window\n }),\n hydrationData: (opts == null ? void 0 : opts.hydrationData) || parseHydrationData(),\n routes,\n mapRouteProperties: react_router__WEBPACK_IMPORTED_MODULE_3__.UNSAFE_mapRouteProperties,\n unstable_dataStrategy: opts == null ? void 0 : opts.unstable_dataStrategy,\n unstable_patchRoutesOnMiss: opts == null ? void 0 : opts.unstable_patchRoutesOnMiss,\n window: opts == null ? void 0 : opts.window\n }).initialize();\n}\nfunction parseHydrationData() {\n var _window;\n let state = (_window = window) == null ? void 0 : _window.__staticRouterHydrationData;\n if (state && state.errors) {\n state = _extends({}, state, {\n errors: deserializeErrors(state.errors)\n });\n }\n return state;\n}\nfunction deserializeErrors(errors) {\n if (!errors) return null;\n let entries = Object.entries(errors);\n let serialized = {};\n for (let [key, val] of entries) {\n // Hey you! If you change this, please change the corresponding logic in\n // serializeErrors in react-router-dom/server.tsx :)\n if (val && val.__type === "RouteErrorResponse") {\n serialized[key] = new react_router__WEBPACK_IMPORTED_MODULE_2__.UNSAFE_ErrorResponseImpl(val.status, val.statusText, val.data, val.internal === true);\n } else if (val && val.__type === "Error") {\n // Attempt to reconstruct the right type of Error (i.e., ReferenceError)\n if (val.__subType) {\n let ErrorConstructor = window[val.__subType];\n if (typeof ErrorConstructor === "function") {\n try {\n // @ts-expect-error\n let error = new ErrorConstructor(val.message);\n // Wipe away the client-side stack trace. Nothing to fill it in with\n // because we don\'t serialize SSR stack traces for security reasons\n error.stack = "";\n serialized[key] = error;\n } catch (e) {\n // no-op - fall through and create a normal Error\n }\n }\n }\n if (serialized[key] == null) {\n let error = new Error(val.message);\n // Wipe away the client-side stack trace. Nothing to fill it in with\n // because we don\'t serialize SSR stack traces for security reasons\n error.stack = "";\n serialized[key] = error;\n }\n } else {\n serialized[key] = val;\n }\n }\n return serialized;\n}\nconst ViewTransitionContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createContext({\n isTransitioning: false\n});\nif (true) {\n ViewTransitionContext.displayName = "ViewTransition";\n}\nconst FetchersContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createContext(new Map());\nif (true) {\n FetchersContext.displayName = "Fetchers";\n}\n//#endregion\n////////////////////////////////////////////////////////////////////////////////\n//#region Components\n////////////////////////////////////////////////////////////////////////////////\n/**\n Webpack + React 17 fails to compile on any of the following because webpack\n complains that `startTransition` doesn\'t exist in `React`:\n * import { startTransition } from "react"\n * import * as React from from "react";\n "startTransition" in React ? React.startTransition(() => setState()) : setState()\n * import * as React from from "react";\n "startTransition" in React ? React["startTransition"](() => setState()) : setState()\n\n Moving it to a constant such as the following solves the Webpack/React 17 issue:\n * import * as React from from "react";\n const START_TRANSITION = "startTransition";\n START_TRANSITION in React ? React[START_TRANSITION](() => setState()) : setState()\n\n However, that introduces webpack/terser minification issues in production builds\n in React 18 where minification/obfuscation ends up removing the call of\n React.startTransition entirely from the first half of the ternary. Grabbing\n this exported reference once up front resolves that issue.\n\n See https://github.com/remix-run/react-router/issues/10579\n*/\nconst START_TRANSITION = "startTransition";\nconst startTransitionImpl = react__WEBPACK_IMPORTED_MODULE_0__[START_TRANSITION];\nconst FLUSH_SYNC = "flushSync";\nconst flushSyncImpl = /*#__PURE__*/ (react_dom__WEBPACK_IMPORTED_MODULE_1___namespace_cache || (react_dom__WEBPACK_IMPORTED_MODULE_1___namespace_cache = __webpack_require__.t(react_dom__WEBPACK_IMPORTED_MODULE_1__, 2)))[FLUSH_SYNC];\nconst USE_ID = "useId";\nconst useIdImpl = react__WEBPACK_IMPORTED_MODULE_0__[USE_ID];\nfunction startTransitionSafe(cb) {\n if (startTransitionImpl) {\n startTransitionImpl(cb);\n } else {\n cb();\n }\n}\nfunction flushSyncSafe(cb) {\n if (flushSyncImpl) {\n flushSyncImpl(cb);\n } else {\n cb();\n }\n}\nclass Deferred {\n constructor() {\n this.status = "pending";\n this.promise = new Promise((resolve, reject) => {\n this.resolve = value => {\n if (this.status === "pending") {\n this.status = "resolved";\n resolve(value);\n }\n };\n this.reject = reason => {\n if (this.status === "pending") {\n this.status = "rejected";\n reject(reason);\n }\n };\n });\n }\n}\n/**\n * Given a Remix Router instance, render the appropriate UI\n */\nfunction RouterProvider(_ref) {\n let {\n fallbackElement,\n router,\n future\n } = _ref;\n let [state, setStateImpl] = react__WEBPACK_IMPORTED_MODULE_0__.useState(router.state);\n let [pendingState, setPendingState] = react__WEBPACK_IMPORTED_MODULE_0__.useState();\n let [vtContext, setVtContext] = react__WEBPACK_IMPORTED_MODULE_0__.useState({\n isTransitioning: false\n });\n let [renderDfd, setRenderDfd] = react__WEBPACK_IMPORTED_MODULE_0__.useState();\n let [transition, setTransition] = react__WEBPACK_IMPORTED_MODULE_0__.useState();\n let [interruption, setInterruption] = react__WEBPACK_IMPORTED_MODULE_0__.useState();\n let fetcherData = react__WEBPACK_IMPORTED_MODULE_0__.useRef(new Map());\n let {\n v7_startTransition\n } = future || {};\n let optInStartTransition = react__WEBPACK_IMPORTED_MODULE_0__.useCallback(cb => {\n if (v7_startTransition) {\n startTransitionSafe(cb);\n } else {\n cb();\n }\n }, [v7_startTransition]);\n let setState = react__WEBPACK_IMPORTED_MODULE_0__.useCallback((newState, _ref2) => {\n let {\n deletedFetchers,\n unstable_flushSync: flushSync,\n unstable_viewTransitionOpts: viewTransitionOpts\n } = _ref2;\n deletedFetchers.forEach(key => fetcherData.current.delete(key));\n newState.fetchers.forEach((fetcher, key) => {\n if (fetcher.data !== undefined) {\n fetcherData.current.set(key, fetcher.data);\n }\n });\n let isViewTransitionUnavailable = router.window == null || router.window.document == null || typeof router.window.document.startViewTransition !== "function";\n // If this isn\'t a view transition or it\'s not available in this browser,\n // just update and be done with it\n if (!viewTransitionOpts || isViewTransitionUnavailable) {\n if (flushSync) {\n flushSyncSafe(() => setStateImpl(newState));\n } else {\n optInStartTransition(() => setStateImpl(newState));\n }\n return;\n }\n // flushSync + startViewTransition\n if (flushSync) {\n // Flush through the context to mark DOM elements as transition=ing\n flushSyncSafe(() => {\n // Cancel any pending transitions\n if (transition) {\n renderDfd && renderDfd.resolve();\n transition.skipTransition();\n }\n setVtContext({\n isTransitioning: true,\n flushSync: true,\n currentLocation: viewTransitionOpts.currentLocation,\n nextLocation: viewTransitionOpts.nextLocation\n });\n });\n // Update the DOM\n let t = router.window.document.startViewTransition(() => {\n flushSyncSafe(() => setStateImpl(newState));\n });\n // Clean up after the animation completes\n t.finished.finally(() => {\n flushSyncSafe(() => {\n setRenderDfd(undefined);\n setTransition(undefined);\n setPendingState(undefined);\n setVtContext({\n isTransitioning: false\n });\n });\n });\n flushSyncSafe(() => setTransition(t));\n return;\n }\n // startTransition + startViewTransition\n if (transition) {\n // Interrupting an in-progress transition, cancel and let everything flush\n // out, and then kick off a new transition from the interruption state\n renderDfd && renderDfd.resolve();\n transition.skipTransition();\n setInterruption({\n state: newState,\n currentLocation: viewTransitionOpts.currentLocation,\n nextLocation: viewTransitionOpts.nextLocation\n });\n } else {\n // Completed navigation update with opted-in view transitions, let \'er rip\n setPendingState(newState);\n setVtContext({\n isTransitioning: true,\n flushSync: false,\n currentLocation: viewTransitionOpts.currentLocation,\n nextLocation: viewTransitionOpts.nextLocation\n });\n }\n }, [router.window, transition, renderDfd, fetcherData, optInStartTransition]);\n // Need to use a layout effect here so we are subscribed early enough to\n // pick up on any render-driven redirects/navigations (useEffect/<Navigate>)\n react__WEBPACK_IMPORTED_MODULE_0__.useLayoutEffect(() => router.subscribe(setState), [router, setState]);\n // When we start a view transition, create a Deferred we can use for the\n // eventual "completed" render\n react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => {\n if (vtContext.isTransitioning && !vtContext.flushSync) {\n setRenderDfd(new Deferred());\n }\n }, [vtContext]);\n // Once the deferred is created, kick off startViewTransition() to update the\n // DOM and then wait on the Deferred to resolve (indicating the DOM update has\n // happened)\n react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => {\n if (renderDfd && pendingState && router.window) {\n let newState = pendingState;\n let renderPromise = renderDfd.promise;\n let transition = router.window.document.startViewTransition(async () => {\n optInStartTransition(() => setStateImpl(newState));\n await renderPromise;\n });\n transition.finished.finally(() => {\n setRenderDfd(undefined);\n setTransition(undefined);\n setPendingState(undefined);\n setVtContext({\n isTransitioning: false\n });\n });\n setTransition(transition);\n }\n }, [optInStartTransition, pendingState, renderDfd, router.window]);\n // When the new location finally renders and is committed to the DOM, this\n // effect will run to resolve the transition\n react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => {\n if (renderDfd && pendingState && state.location.key === pendingState.location.key) {\n renderDfd.resolve();\n }\n }, [renderDfd, transition, state.location, pendingState]);\n // If we get interrupted with a new navigation during a transition, we skip\n // the active transition, let it cleanup, then kick it off again here\n react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => {\n if (!vtContext.isTransitioning && interruption) {\n setPendingState(interruption.state);\n setVtContext({\n isTransitioning: true,\n flushSync: false,\n currentLocation: interruption.currentLocation,\n nextLocation: interruption.nextLocation\n });\n setInterruption(undefined);\n }\n }, [vtContext.isTransitioning, interruption]);\n react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => {\n true ? (0,react_router__WEBPACK_IMPORTED_MODULE_2__.UNSAFE_warning)(fallbackElement == null || !router.future.v7_partialHydration, "`<RouterProvider fallbackElement>` is deprecated when using " + "`v7_partialHydration`, use a `HydrateFallback` component instead") : 0;\n // Only log this once on initial mount\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n let navigator = react__WEBPACK_IMPORTED_MODULE_0__.useMemo(() => {\n return {\n createHref: router.createHref,\n encodeLocation: router.encodeLocation,\n go: n => router.navigate(n),\n push: (to, state, opts) => router.navigate(to, {\n state,\n preventScrollReset: opts == null ? void 0 : opts.preventScrollReset\n }),\n replace: (to, state, opts) => router.navigate(to, {\n replace: true,\n state,\n preventScrollReset: opts == null ? void 0 : opts.preventScrollReset\n })\n };\n }, [router]);\n let basename = router.basename || "/";\n let dataRouterContext = react__WEBPACK_IMPORTED_MODULE_0__.useMemo(() => ({\n router,\n navigator,\n static: false,\n basename\n }), [router, navigator, basename]);\n // The fragment and {null} here are important! We need them to keep React 18\'s\n // useId happy when we are server-rendering since we may have a <script> here\n // containing the hydrated server-side staticContext (from StaticRouterProvider).\n // useId relies on the component tree structure to generate deterministic id\'s\n // so we need to ensure it remains the same on the client even though\n // we don\'t need the <script> tag\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(react_router__WEBPACK_IMPORTED_MODULE_3__.UNSAFE_DataRouterContext.Provider, {\n value: dataRouterContext\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(react_router__WEBPACK_IMPORTED_MODULE_3__.UNSAFE_DataRouterStateContext.Provider, {\n value: state\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(FetchersContext.Provider, {\n value: fetcherData.current\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(ViewTransitionContext.Provider, {\n value: vtContext\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(react_router__WEBPACK_IMPORTED_MODULE_3__.Router, {\n basename: basename,\n location: state.location,\n navigationType: state.historyAction,\n navigator: navigator,\n future: {\n v7_relativeSplatPath: router.future.v7_relativeSplatPath\n }\n }, state.initialized || router.future.v7_partialHydration ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(DataRoutes, {\n routes: router.routes,\n future: router.future,\n state: state\n }) : fallbackElement))))), null);\n}\nfunction DataRoutes(_ref3) {\n let {\n routes,\n future,\n state\n } = _ref3;\n return (0,react_router__WEBPACK_IMPORTED_MODULE_3__.UNSAFE_useRoutesImpl)(routes, undefined, state, future);\n}\n/**\n * A `<Router>` for use in web browsers. Provides the cleanest URLs.\n */\nfunction BrowserRouter(_ref4) {\n let {\n basename,\n children,\n future,\n window\n } = _ref4;\n let historyRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef();\n if (historyRef.current == null) {\n historyRef.current = (0,react_router__WEBPACK_IMPORTED_MODULE_2__.createBrowserHistory)({\n window,\n v5Compat: true\n });\n }\n let history = historyRef.current;\n let [state, setStateImpl] = react__WEBPACK_IMPORTED_MODULE_0__.useState({\n action: history.action,\n location: history.location\n });\n let {\n v7_startTransition\n } = future || {};\n let setState = react__WEBPACK_IMPORTED_MODULE_0__.useCallback(newState => {\n v7_startTransition && startTransitionImpl ? startTransitionImpl(() => setStateImpl(newState)) : setStateImpl(newState);\n }, [setStateImpl, v7_startTransition]);\n react__WEBPACK_IMPORTED_MODULE_0__.useLayoutEffect(() => history.listen(setState), [history, setState]);\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(react_router__WEBPACK_IMPORTED_MODULE_3__.Router, {\n basename: basename,\n children: children,\n location: state.location,\n navigationType: state.action,\n navigator: history,\n future: future\n });\n}\n/**\n * A `<Router>` for use in web browsers. Stores the location in the hash\n * portion of the URL so it is not sent to the server.\n */\nfunction HashRouter(_ref5) {\n let {\n basename,\n children,\n future,\n window\n } = _ref5;\n let historyRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef();\n if (historyRef.current == null) {\n historyRef.current = (0,react_router__WEBPACK_IMPORTED_MODULE_2__.createHashHistory)({\n window,\n v5Compat: true\n });\n }\n let history = historyRef.current;\n let [state, setStateImpl] = react__WEBPACK_IMPORTED_MODULE_0__.useState({\n action: history.action,\n location: history.location\n });\n let {\n v7_startTransition\n } = future || {};\n let setState = react__WEBPACK_IMPORTED_MODULE_0__.useCallback(newState => {\n v7_startTransition && startTransitionImpl ? startTransitionImpl(() => setStateImpl(newState)) : setStateImpl(newState);\n }, [setStateImpl, v7_startTransition]);\n react__WEBPACK_IMPORTED_MODULE_0__.useLayoutEffect(() => history.listen(setState), [history, setState]);\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(react_router__WEBPACK_IMPORTED_MODULE_3__.Router, {\n basename: basename,\n children: children,\n location: state.location,\n navigationType: state.action,\n navigator: history,\n future: future\n });\n}\n/**\n * A `<Router>` that accepts a pre-instantiated history object. It\'s important\n * to note that using your own history object is highly discouraged and may add\n * two versions of the history library to your bundles unless you use the same\n * version of the history library that React Router uses internally.\n */\nfunction HistoryRouter(_ref6) {\n let {\n basename,\n children,\n future,\n history\n } = _ref6;\n let [state, setStateImpl] = react__WEBPACK_IMPORTED_MODULE_0__.useState({\n action: history.action,\n location: history.location\n });\n let {\n v7_startTransition\n } = future || {};\n let setState = react__WEBPACK_IMPORTED_MODULE_0__.useCallback(newState => {\n v7_startTransition && startTransitionImpl ? startTransitionImpl(() => setStateImpl(newState)) : setStateImpl(newState);\n }, [setStateImpl, v7_startTransition]);\n react__WEBPACK_IMPORTED_MODULE_0__.useLayoutEffect(() => history.listen(setState), [history, setState]);\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(react_router__WEBPACK_IMPORTED_MODULE_3__.Router, {\n basename: basename,\n children: children,\n location: state.location,\n navigationType: state.action,\n navigator: history,\n future: future\n });\n}\nif (true) {\n HistoryRouter.displayName = "unstable_HistoryRouter";\n}\nconst isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined";\nconst ABSOLUTE_URL_REGEX = /^(?:[a-z][a-z0-9+.-]*:|\\/\\/)/i;\n/**\n * The public API for rendering a history-aware `<a>`.\n */\nconst Link = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(function LinkWithRef(_ref7, ref) {\n let {\n onClick,\n relative,\n reloadDocument,\n replace,\n state,\n target,\n to,\n preventScrollReset,\n unstable_viewTransition\n } = _ref7,\n rest = _objectWithoutPropertiesLoose(_ref7, _excluded);\n let {\n basename\n } = react__WEBPACK_IMPORTED_MODULE_0__.useContext(react_router__WEBPACK_IMPORTED_MODULE_3__.UNSAFE_NavigationContext);\n // Rendered into <a href> for absolute URLs\n let absoluteHref;\n let isExternal = false;\n if (typeof to === "string" && ABSOLUTE_URL_REGEX.test(to)) {\n // Render the absolute href server- and client-side\n absoluteHref = to;\n // Only check for external origins client-side\n if (isBrowser) {\n try {\n let currentUrl = new URL(window.location.href);\n let targetUrl = to.startsWith("//") ? new URL(currentUrl.protocol + to) : new URL(to);\n let path = (0,react_router__WEBPACK_IMPORTED_MODULE_2__.stripBasename)(targetUrl.pathname, basename);\n if (targetUrl.origin === currentUrl.origin && path != null) {\n // Strip the protocol/origin/basename for same-origin absolute URLs\n to = path + targetUrl.search + targetUrl.hash;\n } else {\n isExternal = true;\n }\n } catch (e) {\n // We can\'t do external URL detection without a valid URL\n true ? (0,react_router__WEBPACK_IMPORTED_MODULE_2__.UNSAFE_warning)(false, "<Link to=\\"" + to + "\\"> contains an invalid URL which will probably break " + "when clicked - please update to a valid URL path.") : 0;\n }\n }\n }\n // Rendered into <a href> for relative URLs\n let href = (0,react_router__WEBPACK_IMPORTED_MODULE_3__.useHref)(to, {\n relative\n });\n let internalOnClick = useLinkClickHandler(to, {\n replace,\n state,\n target,\n preventScrollReset,\n relative,\n unstable_viewTransition\n });\n function handleClick(event) {\n if (onClick) onClick(event);\n if (!event.defaultPrevented) {\n internalOnClick(event);\n }\n }\n return (\n /*#__PURE__*/\n // eslint-disable-next-line jsx-a11y/anchor-has-content\n react__WEBPACK_IMPORTED_MODULE_0__.createElement("a", _extends({}, rest, {\n href: absoluteHref || href,\n onClick: isExternal || reloadDocument ? onClick : handleClick,\n ref: ref,\n target: target\n }))\n );\n});\nif (true) {\n Link.displayName = "Link";\n}\n/**\n * A `<Link>` wrapper that knows if it\'s "active" or not.\n */\nconst NavLink = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(function NavLinkWithRef(_ref8, ref) {\n let {\n "aria-current": ariaCurrentProp = "page",\n caseSensitive = false,\n className: classNameProp = "",\n end = false,\n style: styleProp,\n to,\n unstable_viewTransition,\n children\n } = _ref8,\n rest = _objectWithoutPropertiesLoose(_ref8, _excluded2);\n let path = (0,react_router__WEBPACK_IMPORTED_MODULE_3__.useResolvedPath)(to, {\n relative: rest.relative\n });\n let location = (0,react_router__WEBPACK_IMPORTED_MODULE_3__.useLocation)();\n let routerState = react__WEBPACK_IMPORTED_MODULE_0__.useContext(react_router__WEBPACK_IMPORTED_MODULE_3__.UNSAFE_DataRouterStateContext);\n let {\n navigator,\n basename\n } = react__WEBPACK_IMPORTED_MODULE_0__.useContext(react_router__WEBPACK_IMPORTED_MODULE_3__.UNSAFE_NavigationContext);\n let isTransitioning = routerState != null &&\n // Conditional usage is OK here because the usage of a data router is static\n // eslint-disable-next-line react-hooks/rules-of-hooks\n useViewTransitionState(path) && unstable_viewTransition === true;\n let toPathname = navigator.encodeLocation ? navigator.encodeLocation(path).pathname : path.pathname;\n let locationPathname = location.pathname;\n let nextLocationPathname = routerState && routerState.navigation && routerState.navigation.location ? routerState.navigation.location.pathname : null;\n if (!caseSensitive) {\n locationPathname = locationPathname.toLowerCase();\n nextLocationPathname = nextLocationPathname ? nextLocationPathname.toLowerCase() : null;\n toPathname = toPathname.toLowerCase();\n }\n if (nextLocationPathname && basename) {\n nextLocationPathname = (0,react_router__WEBPACK_IMPORTED_MODULE_2__.stripBasename)(nextLocationPathname, basename) || nextLocationPathname;\n }\n // If the `to` has a trailing slash, look at that exact spot. Otherwise,\n // we\'re looking for a slash _after_ what\'s in `to`. For example:\n //\n // <NavLink to="/users"> and <NavLink to="/users/">\n // both want to look for a / at index 6 to match URL `/users/matt`\n const endSlashPosition = toPathname !== "/" && toPathname.endsWith("/") ? toPathname.length - 1 : toPathname.length;\n let isActive = locationPathname === toPathname || !end && locationPathname.startsWith(toPathname) && locationPathname.charAt(endSlashPosition) === "/";\n let isPending = nextLocationPathname != null && (nextLocationPathname === toPathname || !end && nextLocationPathname.startsWith(toPathname) && nextLocationPathname.charAt(toPathname.length) === "/");\n let renderProps = {\n isActive,\n isPending,\n isTransitioning\n };\n let ariaCurrent = isActive ? ariaCurrentProp : undefined;\n let className;\n if (typeof classNameProp === "function") {\n className = classNameProp(renderProps);\n } else {\n // If the className prop is not a function, we use a default `active`\n // class for <NavLink />s that are active. In v5 `active` was the default\n // value for `activeClassName`, but we are removing that API and can still\n // use the old default behavior for a cleaner upgrade path and keep the\n // simple styling rules working as they currently do.\n className = [classNameProp, isActive ? "active" : null, isPending ? "pending" : null, isTransitioning ? "transitioning" : null].filter(Boolean).join(" ");\n }\n let style = typeof styleProp === "function" ? styleProp(renderProps) : styleProp;\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(Link, _extends({}, rest, {\n "aria-current": ariaCurrent,\n className: className,\n ref: ref,\n style: style,\n to: to,\n unstable_viewTransition: unstable_viewTransition\n }), typeof children === "function" ? children(renderProps) : children);\n});\nif (true) {\n NavLink.displayName = "NavLink";\n}\n/**\n * A `@remix-run/router`-aware `<form>`. It behaves like a normal form except\n * that the interaction with the server is with `fetch` instead of new document\n * requests, allowing components to add nicer UX to the page as the form is\n * submitted and returns with data.\n */\nconst Form = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.forwardRef((_ref9, forwardedRef) => {\n let {\n fetcherKey,\n navigate,\n reloadDocument,\n replace,\n state,\n method = defaultMethod,\n action,\n onSubmit,\n relative,\n preventScrollReset,\n unstable_viewTransition\n } = _ref9,\n props = _objectWithoutPropertiesLoose(_ref9, _excluded3);\n let submit = useSubmit();\n let formAction = useFormAction(action, {\n relative\n });\n let formMethod = method.toLowerCase() === "get" ? "get" : "post";\n let submitHandler = event => {\n onSubmit && onSubmit(event);\n if (event.defaultPrevented) return;\n event.preventDefault();\n let submitter = event.nativeEvent.submitter;\n let submitMethod = (submitter == null ? void 0 : submitter.getAttribute("formmethod")) || method;\n submit(submitter || event.currentTarget, {\n fetcherKey,\n method: submitMethod,\n navigate,\n replace,\n state,\n relative,\n preventScrollReset,\n unstable_viewTransition\n });\n };\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("form", _extends({\n ref: forwardedRef,\n method: formMethod,\n action: formAction,\n onSubmit: reloadDocument ? onSubmit : submitHandler\n }, props));\n});\nif (true) {\n Form.displayName = "Form";\n}\n/**\n * This component will emulate the browser\'s scroll restoration on location\n * changes.\n */\nfunction ScrollRestoration(_ref10) {\n let {\n getKey,\n storageKey\n } = _ref10;\n useScrollRestoration({\n getKey,\n storageKey\n });\n return null;\n}\nif (true) {\n ScrollRestoration.displayName = "ScrollRestoration";\n}\n//#endregion\n////////////////////////////////////////////////////////////////////////////////\n//#region Hooks\n////////////////////////////////////////////////////////////////////////////////\nvar DataRouterHook;\n(function (DataRouterHook) {\n DataRouterHook["UseScrollRestoration"] = "useScrollRestoration";\n DataRouterHook["UseSubmit"] = "useSubmit";\n DataRouterHook["UseSubmitFetcher"] = "useSubmitFetcher";\n DataRouterHook["UseFetcher"] = "useFetcher";\n DataRouterHook["useViewTransitionState"] = "useViewTransitionState";\n})(DataRouterHook || (DataRouterHook = {}));\nvar DataRouterStateHook;\n(function (DataRouterStateHook) {\n DataRouterStateHook["UseFetcher"] = "useFetcher";\n DataRouterStateHook["UseFetchers"] = "useFetchers";\n DataRouterStateHook["UseScrollRestoration"] = "useScrollRestoration";\n})(DataRouterStateHook || (DataRouterStateHook = {}));\n// Internal hooks\nfunction getDataRouterConsoleError(hookName) {\n return hookName + " must be used within a data router. See https://reactrouter.com/routers/picking-a-router.";\n}\nfunction useDataRouterContext(hookName) {\n let ctx = react__WEBPACK_IMPORTED_MODULE_0__.useContext(react_router__WEBPACK_IMPORTED_MODULE_3__.UNSAFE_DataRouterContext);\n !ctx ? true ? (0,react_router__WEBPACK_IMPORTED_MODULE_2__.UNSAFE_invariant)(false, getDataRouterConsoleError(hookName)) : 0 : void 0;\n return ctx;\n}\nfunction useDataRouterState(hookName) {\n let state = react__WEBPACK_IMPORTED_MODULE_0__.useContext(react_router__WEBPACK_IMPORTED_MODULE_3__.UNSAFE_DataRouterStateContext);\n !state ? true ? (0,react_router__WEBPACK_IMPORTED_MODULE_2__.UNSAFE_invariant)(false, getDataRouterConsoleError(hookName)) : 0 : void 0;\n return state;\n}\n// External hooks\n/**\n * Handles the click behavior for router `<Link>` components. This is useful if\n * you need to create custom `<Link>` components with the same click behavior we\n * use in our exported `<Link>`.\n */\nfunction useLinkClickHandler(to, _temp) {\n let {\n target,\n replace: replaceProp,\n state,\n preventScrollReset,\n relative,\n unstable_viewTransition\n } = _temp === void 0 ? {} : _temp;\n let navigate = (0,react_router__WEBPACK_IMPORTED_MODULE_3__.useNavigate)();\n let location = (0,react_router__WEBPACK_IMPORTED_MODULE_3__.useLocation)();\n let path = (0,react_router__WEBPACK_IMPORTED_MODULE_3__.useResolvedPath)(to, {\n relative\n });\n return react__WEBPACK_IMPORTED_MODULE_0__.useCallback(event => {\n if (shouldProcessLinkClick(event, target)) {\n event.preventDefault();\n // If the URL hasn\'t changed, a regular <a> will do a replace instead of\n // a push, so do the same here unless the replace prop is explicitly set\n let replace = replaceProp !== undefined ? replaceProp : (0,react_router__WEBPACK_IMPORTED_MODULE_2__.createPath)(location) === (0,react_router__WEBPACK_IMPORTED_MODULE_2__.createPath)(path);\n navigate(to, {\n replace,\n state,\n preventScrollReset,\n relative,\n unstable_viewTransition\n });\n }\n }, [location, navigate, path, replaceProp, state, target, to, preventScrollReset, relative, unstable_viewTransition]);\n}\n/**\n * A convenient wrapper for reading and writing search parameters via the\n * URLSearchParams interface.\n */\nfunction useSearchParams(defaultInit) {\n true ? (0,react_router__WEBPACK_IMPORTED_MODULE_2__.UNSAFE_warning)(typeof URLSearchParams !== "undefined", "You cannot use the `useSearchParams` hook in a browser that does not " + "support the URLSearchParams API. If you need to support Internet " + "Explorer 11, we recommend you load a polyfill such as " + "https://github.com/ungap/url-search-params.") : 0;\n let defaultSearchParamsRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(createSearchParams(defaultInit));\n let hasSetSearchParamsRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(false);\n let location = (0,react_router__WEBPACK_IMPORTED_MODULE_3__.useLocation)();\n let searchParams = react__WEBPACK_IMPORTED_MODULE_0__.useMemo(() =>\n // Only merge in the defaults if we haven\'t yet called setSearchParams.\n // Once we call that we want those to take precedence, otherwise you can\'t\n // remove a param with setSearchParams({}) if it has an initial value\n getSearchParamsForLocation(location.search, hasSetSearchParamsRef.current ? null : defaultSearchParamsRef.current), [location.search]);\n let navigate = (0,react_router__WEBPACK_IMPORTED_MODULE_3__.useNavigate)();\n let setSearchParams = react__WEBPACK_IMPORTED_MODULE_0__.useCallback((nextInit, navigateOptions) => {\n const newSearchParams = createSearchParams(typeof nextInit === "function" ? nextInit(searchParams) : nextInit);\n hasSetSearchParamsRef.current = true;\n navigate("?" + newSearchParams, navigateOptions);\n }, [navigate, searchParams]);\n return [searchParams, setSearchParams];\n}\nfunction validateClientSideSubmission() {\n if (typeof document === "undefined") {\n throw new Error("You are calling submit during the server render. " + "Try calling submit within a `useEffect` or callback instead.");\n }\n}\nlet fetcherId = 0;\nlet getUniqueFetcherId = () => "__" + String(++fetcherId) + "__";\n/**\n * Returns a function that may be used to programmatically submit a form (or\n * some arbitrary data) to the server.\n */\nfunction useSubmit() {\n let {\n router\n } = useDataRouterContext(DataRouterHook.UseSubmit);\n let {\n basename\n } = react__WEBPACK_IMPORTED_MODULE_0__.useContext(react_router__WEBPACK_IMPORTED_MODULE_3__.UNSAFE_NavigationContext);\n let currentRouteId = (0,react_router__WEBPACK_IMPORTED_MODULE_3__.UNSAFE_useRouteId)();\n return react__WEBPACK_IMPORTED_MODULE_0__.useCallback(function (target, options) {\n if (options === void 0) {\n options = {};\n }\n validateClientSideSubmission();\n let {\n action,\n method,\n encType,\n formData,\n body\n } = getFormSubmissionInfo(target, basename);\n if (options.navigate === false) {\n let key = options.fetcherKey || getUniqueFetcherId();\n router.fetch(key, currentRouteId, options.action || action, {\n preventScrollReset: options.preventScrollReset,\n formData,\n body,\n formMethod: options.method || method,\n formEncType: options.encType || encType,\n unstable_flushSync: options.unstable_flushSync\n });\n } else {\n router.navigate(options.action || action, {\n preventScrollReset: options.preventScrollReset,\n formData,\n body,\n formMethod: options.method || method,\n formEncType: options.encType || encType,\n replace: options.replace,\n state: options.state,\n fromRouteId: currentRouteId,\n unstable_flushSync: options.unstable_flushSync,\n unstable_viewTransition: options.unstable_viewTransition\n });\n }\n }, [router, basename, currentRouteId]);\n}\n// v7: Eventually we should deprecate this entirely in favor of using the\n// router method directly?\nfunction useFormAction(action, _temp2) {\n let {\n relative\n } = _temp2 === void 0 ? {} : _temp2;\n let {\n basename\n } = react__WEBPACK_IMPORTED_MODULE_0__.useContext(react_router__WEBPACK_IMPORTED_MODULE_3__.UNSAFE_NavigationContext);\n let routeContext = react__WEBPACK_IMPORTED_MODULE_0__.useContext(react_router__WEBPACK_IMPORTED_MODULE_3__.UNSAFE_RouteContext);\n !routeContext ? true ? (0,react_router__WEBPACK_IMPORTED_MODULE_2__.UNSAFE_invariant)(false, "useFormAction must be used inside a RouteContext") : 0 : void 0;\n let [match] = routeContext.matches.slice(-1);\n // Shallow clone path so we can modify it below, otherwise we modify the\n // object referenced by useMemo inside useResolvedPath\n let path = _extends({}, (0,react_router__WEBPACK_IMPORTED_MODULE_3__.useResolvedPath)(action ? action : ".", {\n relative\n }));\n // If no action was specified, browsers will persist current search params\n // when determining the path, so match that behavior\n // https://github.com/remix-run/remix/issues/927\n let location = (0,react_router__WEBPACK_IMPORTED_MODULE_3__.useLocation)();\n if (action == null) {\n // Safe to write to this directly here since if action was undefined, we\n // would have called useResolvedPath(".") which will never include a search\n path.search = location.search;\n // When grabbing search params from the URL, remove any included ?index param\n // since it might not apply to our contextual route. We add it back based\n // on match.route.index below\n let params = new URLSearchParams(path.search);\n if (params.has("index") && params.get("index") === "") {\n params.delete("index");\n path.search = params.toString() ? "?" + params.toString() : "";\n }\n }\n if ((!action || action === ".") && match.route.index) {\n path.search = path.search ? path.search.replace(/^\\?/, "?index&") : "?index";\n }\n // If we\'re operating within a basename, prepend it to the pathname prior\n // to creating the form action. If this is a root navigation, then just use\n // the raw basename which allows the basename to have full control over the\n // presence of a trailing slash on root actions\n if (basename !== "/") {\n path.pathname = path.pathname === "/" ? basename : (0,react_router__WEBPACK_IMPORTED_MODULE_2__.joinPaths)([basename, path.pathname]);\n }\n return (0,react_router__WEBPACK_IMPORTED_MODULE_2__.createPath)(path);\n}\n// TODO: (v7) Change the useFetcher generic default from `any` to `unknown`\n/**\n * Interacts with route loaders and actions without causing a navigation. Great\n * for any interaction that stays on the same page.\n */\nfunction useFetcher(_temp3) {\n var _route$matches;\n let {\n key\n } = _temp3 === void 0 ? {} : _temp3;\n let {\n router\n } = useDataRouterContext(DataRouterHook.UseFetcher);\n let state = useDataRouterState(DataRouterStateHook.UseFetcher);\n let fetcherData = react__WEBPACK_IMPORTED_MODULE_0__.useContext(FetchersContext);\n let route = react__WEBPACK_IMPORTED_MODULE_0__.useContext(react_router__WEBPACK_IMPORTED_MODULE_3__.UNSAFE_RouteContext);\n let routeId = (_route$matches = route.matches[route.matches.length - 1]) == null ? void 0 : _route$matches.route.id;\n !fetcherData ? true ? (0,react_router__WEBPACK_IMPORTED_MODULE_2__.UNSAFE_invariant)(false, "useFetcher must be used inside a FetchersContext") : 0 : void 0;\n !route ? true ? (0,react_router__WEBPACK_IMPORTED_MODULE_2__.UNSAFE_invariant)(false, "useFetcher must be used inside a RouteContext") : 0 : void 0;\n !(routeId != null) ? true ? (0,react_router__WEBPACK_IMPORTED_MODULE_2__.UNSAFE_invariant)(false, "useFetcher can only be used on routes that contain a unique \\"id\\"") : 0 : void 0;\n // Fetcher key handling\n // OK to call conditionally to feature detect `useId`\n // eslint-disable-next-line react-hooks/rules-of-hooks\n let defaultKey = useIdImpl ? useIdImpl() : "";\n let [fetcherKey, setFetcherKey] = react__WEBPACK_IMPORTED_MODULE_0__.useState(key || defaultKey);\n if (key && key !== fetcherKey) {\n setFetcherKey(key);\n } else if (!fetcherKey) {\n // We will only fall through here when `useId` is not available\n setFetcherKey(getUniqueFetcherId());\n }\n // Registration/cleanup\n react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => {\n router.getFetcher(fetcherKey);\n return () => {\n // Tell the router we\'ve unmounted - if v7_fetcherPersist is enabled this\n // will not delete immediately but instead queue up a delete after the\n // fetcher returns to an `idle` state\n router.deleteFetcher(fetcherKey);\n };\n }, [router, fetcherKey]);\n // Fetcher additions\n let load = react__WEBPACK_IMPORTED_MODULE_0__.useCallback((href, opts) => {\n !routeId ? true ? (0,react_router__WEBPACK_IMPORTED_MODULE_2__.UNSAFE_invariant)(false, "No routeId available for fetcher.load()") : 0 : void 0;\n router.fetch(fetcherKey, routeId, href, opts);\n }, [fetcherKey, routeId, router]);\n let submitImpl = useSubmit();\n let submit = react__WEBPACK_IMPORTED_MODULE_0__.useCallback((target, opts) => {\n submitImpl(target, _extends({}, opts, {\n navigate: false,\n fetcherKey\n }));\n }, [fetcherKey, submitImpl]);\n let FetcherForm = react__WEBPACK_IMPORTED_MODULE_0__.useMemo(() => {\n let FetcherForm = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.forwardRef((props, ref) => {\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(Form, _extends({}, props, {\n navigate: false,\n fetcherKey: fetcherKey,\n ref: ref\n }));\n });\n if (true) {\n FetcherForm.displayName = "fetcher.Form";\n }\n return FetcherForm;\n }, [fetcherKey]);\n // Exposed FetcherWithComponents\n let fetcher = state.fetchers.get(fetcherKey) || react_router__WEBPACK_IMPORTED_MODULE_2__.IDLE_FETCHER;\n let data = fetcherData.get(fetcherKey);\n let fetcherWithComponents = react__WEBPACK_IMPORTED_MODULE_0__.useMemo(() => _extends({\n Form: FetcherForm,\n submit,\n load\n }, fetcher, {\n data\n }), [FetcherForm, submit, load, fetcher, data]);\n return fetcherWithComponents;\n}\n/**\n * Provides all fetchers currently on the page. Useful for layouts and parent\n * routes that need to provide pending/optimistic UI regarding the fetch.\n */\nfunction useFetchers() {\n let state = useDataRouterState(DataRouterStateHook.UseFetchers);\n return Array.from(state.fetchers.entries()).map(_ref11 => {\n let [key, fetcher] = _ref11;\n return _extends({}, fetcher, {\n key\n });\n });\n}\nconst SCROLL_RESTORATION_STORAGE_KEY = "react-router-scroll-positions";\nlet savedScrollPositions = {};\n/**\n * When rendered inside a RouterProvider, will restore scroll positions on navigations\n */\nfunction useScrollRestoration(_temp4) {\n let {\n getKey,\n storageKey\n } = _temp4 === void 0 ? {} : _temp4;\n let {\n router\n } = useDataRouterContext(DataRouterHook.UseScrollRestoration);\n let {\n restoreScrollPosition,\n preventScrollReset\n } = useDataRouterState(DataRouterStateHook.UseScrollRestoration);\n let {\n basename\n } = react__WEBPACK_IMPORTED_MODULE_0__.useContext(react_router__WEBPACK_IMPORTED_MODULE_3__.UNSAFE_NavigationContext);\n let location = (0,react_router__WEBPACK_IMPORTED_MODULE_3__.useLocation)();\n let matches = (0,react_router__WEBPACK_IMPORTED_MODULE_3__.useMatches)();\n let navigation = (0,react_router__WEBPACK_IMPORTED_MODULE_3__.useNavigation)();\n // Trigger manual scroll restoration while we\'re active\n react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => {\n window.history.scrollRestoration = "manual";\n return () => {\n window.history.scrollRestoration = "auto";\n };\n }, []);\n // Save positions on pagehide\n usePageHide(react__WEBPACK_IMPORTED_MODULE_0__.useCallback(() => {\n if (navigation.state === "idle") {\n let key = (getKey ? getKey(location, matches) : null) || location.key;\n savedScrollPositions[key] = window.scrollY;\n }\n try {\n sessionStorage.setItem(storageKey || SCROLL_RESTORATION_STORAGE_KEY, JSON.stringify(savedScrollPositions));\n } catch (error) {\n true ? (0,react_router__WEBPACK_IMPORTED_MODULE_2__.UNSAFE_warning)(false, "Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (" + error + ").") : 0;\n }\n window.history.scrollRestoration = "auto";\n }, [storageKey, getKey, navigation.state, location, matches]));\n // Read in any saved scroll locations\n if (typeof document !== "undefined") {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n react__WEBPACK_IMPORTED_MODULE_0__.useLayoutEffect(() => {\n try {\n let sessionPositions = sessionStorage.getItem(storageKey || SCROLL_RESTORATION_STORAGE_KEY);\n if (sessionPositions) {\n savedScrollPositions = JSON.parse(sessionPositions);\n }\n } catch (e) {\n // no-op, use default empty object\n }\n }, [storageKey]);\n // Enable scroll restoration in the router\n // eslint-disable-next-line react-hooks/rules-of-hooks\n react__WEBPACK_IMPORTED_MODULE_0__.useLayoutEffect(() => {\n let getKeyWithoutBasename = getKey && basename !== "/" ? (location, matches) => getKey( // Strip the basename to match useLocation()\n _extends({}, location, {\n pathname: (0,react_router__WEBPACK_IMPORTED_MODULE_2__.stripBasename)(location.pathname, basename) || location.pathname\n }), matches) : getKey;\n let disableScrollRestoration = router == null ? void 0 : router.enableScrollRestoration(savedScrollPositions, () => window.scrollY, getKeyWithoutBasename);\n return () => disableScrollRestoration && disableScrollRestoration();\n }, [router, basename, getKey]);\n // Restore scrolling when state.restoreScrollPosition changes\n // eslint-disable-next-line react-hooks/rules-of-hooks\n react__WEBPACK_IMPORTED_MODULE_0__.useLayoutEffect(() => {\n // Explicit false means don\'t do anything (used for submissions)\n if (restoreScrollPosition === false) {\n return;\n }\n // been here before, scroll to it\n if (typeof restoreScrollPosition === "number") {\n window.scrollTo(0, restoreScrollPosition);\n return;\n }\n // try to scroll to the hash\n if (location.hash) {\n let el = document.getElementById(decodeURIComponent(location.hash.slice(1)));\n if (el) {\n el.scrollIntoView();\n return;\n }\n }\n // Don\'t reset if this navigation opted out\n if (preventScrollReset === true) {\n return;\n }\n // otherwise go to the top on new locations\n window.scrollTo(0, 0);\n }, [location, restoreScrollPosition, preventScrollReset]);\n }\n}\n/**\n * Setup a callback to be fired on the window\'s `beforeunload` event. This is\n * useful for saving some data to `window.localStorage` just before the page\n * refreshes.\n *\n * Note: The `callback` argument should be a function created with\n * `React.useCallback()`.\n */\nfunction useBeforeUnload(callback, options) {\n let {\n capture\n } = options || {};\n react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => {\n let opts = capture != null ? {\n capture\n } : undefined;\n window.addEventListener("beforeunload", callback, opts);\n return () => {\n window.removeEventListener("beforeunload", callback, opts);\n };\n }, [callback, capture]);\n}\n/**\n * Setup a callback to be fired on the window\'s `pagehide` event. This is\n * useful for saving some data to `window.localStorage` just before the page\n * refreshes. This event is better supported than beforeunload across browsers.\n *\n * Note: The `callback` argument should be a function created with\n * `React.useCallback()`.\n */\nfunction usePageHide(callback, options) {\n let {\n capture\n } = options || {};\n react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => {\n let opts = capture != null ? {\n capture\n } : undefined;\n window.addEventListener("pagehide", callback, opts);\n return () => {\n window.removeEventListener("pagehide", callback, opts);\n };\n }, [callback, capture]);\n}\n/**\n * Wrapper around useBlocker to show a window.confirm prompt to users instead\n * of building a custom UI with useBlocker.\n *\n * Warning: This has *a lot of rough edges* and behaves very differently (and\n * very incorrectly in some cases) across browsers if user click addition\n * back/forward navigations while the confirm is open. Use at your own risk.\n */\nfunction usePrompt(_ref12) {\n let {\n when,\n message\n } = _ref12;\n let blocker = (0,react_router__WEBPACK_IMPORTED_MODULE_3__.useBlocker)(when);\n react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => {\n if (blocker.state === "blocked") {\n let proceed = window.confirm(message);\n if (proceed) {\n // This timeout is needed to avoid a weird "race" on POP navigations\n // between the `window.history` revert navigation and the result of\n // `window.confirm`\n setTimeout(blocker.proceed, 0);\n } else {\n blocker.reset();\n }\n }\n }, [blocker, message]);\n react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => {\n if (blocker.state === "blocked" && !when) {\n blocker.reset();\n }\n }, [blocker, when]);\n}\n/**\n * Return a boolean indicating if there is an active view transition to the\n * given href. You can use this value to render CSS classes or viewTransitionName\n * styles onto your elements\n *\n * @param href The destination href\n * @param [opts.relative] Relative routing type ("route" | "path")\n */\nfunction useViewTransitionState(to, opts) {\n if (opts === void 0) {\n opts = {};\n }\n let vtContext = react__WEBPACK_IMPORTED_MODULE_0__.useContext(ViewTransitionContext);\n !(vtContext != null) ? true ? (0,react_router__WEBPACK_IMPORTED_MODULE_2__.UNSAFE_invariant)(false, "`unstable_useViewTransitionState` must be used within `react-router-dom`\'s `RouterProvider`. " + "Did you accidentally import `RouterProvider` from `react-router`?") : 0 : void 0;\n let {\n basename\n } = useDataRouterContext(DataRouterHook.useViewTransitionState);\n let path = (0,react_router__WEBPACK_IMPORTED_MODULE_3__.useResolvedPath)(to, {\n relative: opts.relative\n });\n if (!vtContext.isTransitioning) {\n return false;\n }\n let currentPath = (0,react_router__WEBPACK_IMPORTED_MODULE_2__.stripBasename)(vtContext.currentLocation.pathname, basename) || vtContext.currentLocation.pathname;\n let nextPath = (0,react_router__WEBPACK_IMPORTED_MODULE_2__.stripBasename)(vtContext.nextLocation.pathname, basename) || vtContext.nextLocation.pathname;\n // Transition is active if we\'re going to or coming from the indicated\n // destination. This ensures that other PUSH navigations that reverse\n // an indicated transition apply. I.e., on the list view you have:\n //\n // <NavLink to="/details/1" unstable_viewTransition>\n //\n // If you click the breadcrumb back to the list view:\n //\n // <NavLink to="/list" unstable_viewTransition>\n //\n // We should apply the transition because it\'s indicated as active going\n // from /list -> /details/1 and therefore should be active on the reverse\n // (even though this isn\'t strictly a POP reverse)\n return (0,react_router__WEBPACK_IMPORTED_MODULE_2__.matchPath)(path.pathname, nextPath) != null || (0,react_router__WEBPACK_IMPORTED_MODULE_2__.matchPath)(path.pathname, currentPath) != null;\n}\n//#endregion\n\n\n//# sourceMappingURL=index.js.map\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/react-router-dom/dist/index.js?', + ); + + /***/ + }, + + /***/ 3984: /***/ (__unused_webpack_module, exports, __webpack_require__) => { + 'use strict'; + eval( + 'var __webpack_unused_export__;\n\n\n__webpack_unused_export__ = ({ value: true });\n\nvar React = __webpack_require__(6540);\nvar router = __webpack_require__(5588);\nvar reactRouter = __webpack_require__(7767);\nvar reactRouterDom = __webpack_require__(4976);\n\nfunction _interopNamespace(e) {\n if (e && e.__esModule) return e;\n var n = Object.create(null);\n if (e) {\n Object.keys(e).forEach(function (k) {\n if (k !== \'default\') {\n var d = Object.getOwnPropertyDescriptor(e, k);\n Object.defineProperty(n, k, d.get ? d : {\n enumerable: true,\n get: function () { return e[k]; }\n });\n }\n });\n }\n n["default"] = e;\n return Object.freeze(n);\n}\n\nvar React__namespace = /*#__PURE__*/_interopNamespace(React);\n\n/**\n * A `<Router>` that may not navigate to any other location. This is useful\n * on the server where there is no stateful UI.\n */\nfunction StaticRouter({\n basename,\n children,\n location: locationProp = "/",\n future\n}) {\n if (typeof locationProp === "string") {\n locationProp = reactRouterDom.parsePath(locationProp);\n }\n let action = router.Action.Pop;\n let location = {\n pathname: locationProp.pathname || "/",\n search: locationProp.search || "",\n hash: locationProp.hash || "",\n state: locationProp.state != null ? locationProp.state : null,\n key: locationProp.key || "default"\n };\n let staticNavigator = getStatelessNavigator();\n return /*#__PURE__*/React__namespace.createElement(reactRouterDom.Router, {\n basename: basename,\n children: children,\n location: location,\n navigationType: action,\n navigator: staticNavigator,\n future: future,\n static: true\n });\n}\n/**\n * A Data Router that may not navigate to any other location. This is useful\n * on the server where there is no stateful UI.\n */\nfunction StaticRouterProvider({\n context,\n router: router$1,\n hydrate = true,\n nonce\n}) {\n !(router$1 && context) ? true ? router.UNSAFE_invariant(false, "You must provide `router` and `context` to <StaticRouterProvider>") : 0 : void 0;\n let dataRouterContext = {\n router: router$1,\n navigator: getStatelessNavigator(),\n static: true,\n staticContext: context,\n basename: context.basename || "/"\n };\n let fetchersContext = new Map();\n let hydrateScript = "";\n if (hydrate !== false) {\n let data = {\n loaderData: context.loaderData,\n actionData: context.actionData,\n errors: serializeErrors(context.errors)\n };\n // Use JSON.parse here instead of embedding a raw JS object here to speed\n // up parsing on the client. Dual-stringify is needed to ensure all quotes\n // are properly escaped in the resulting string. See:\n // https://v8.dev/blog/cost-of-javascript-2019#json\n let json = htmlEscape(JSON.stringify(JSON.stringify(data)));\n hydrateScript = `window.__staticRouterHydrationData = JSON.parse(${json});`;\n }\n let {\n state\n } = dataRouterContext.router;\n return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement(reactRouterDom.UNSAFE_DataRouterContext.Provider, {\n value: dataRouterContext\n }, /*#__PURE__*/React__namespace.createElement(reactRouterDom.UNSAFE_DataRouterStateContext.Provider, {\n value: state\n }, /*#__PURE__*/React__namespace.createElement(reactRouterDom.UNSAFE_FetchersContext.Provider, {\n value: fetchersContext\n }, /*#__PURE__*/React__namespace.createElement(reactRouterDom.UNSAFE_ViewTransitionContext.Provider, {\n value: {\n isTransitioning: false\n }\n }, /*#__PURE__*/React__namespace.createElement(reactRouterDom.Router, {\n basename: dataRouterContext.basename,\n location: state.location,\n navigationType: state.historyAction,\n navigator: dataRouterContext.navigator,\n static: dataRouterContext.static,\n future: {\n v7_relativeSplatPath: router$1.future.v7_relativeSplatPath\n }\n }, /*#__PURE__*/React__namespace.createElement(DataRoutes, {\n routes: router$1.routes,\n future: router$1.future,\n state: state\n })))))), hydrateScript ? /*#__PURE__*/React__namespace.createElement("script", {\n suppressHydrationWarning: true,\n nonce: nonce,\n dangerouslySetInnerHTML: {\n __html: hydrateScript\n }\n }) : null);\n}\nfunction DataRoutes({\n routes,\n future,\n state\n}) {\n return reactRouter.UNSAFE_useRoutesImpl(routes, undefined, state, future);\n}\nfunction serializeErrors(errors) {\n if (!errors) return null;\n let entries = Object.entries(errors);\n let serialized = {};\n for (let [key, val] of entries) {\n // Hey you! If you change this, please change the corresponding logic in\n // deserializeErrors in react-router-dom/index.tsx :)\n if (router.isRouteErrorResponse(val)) {\n serialized[key] = {\n ...val,\n __type: "RouteErrorResponse"\n };\n } else if (val instanceof Error) {\n // Do not serialize stack traces from SSR for security reasons\n serialized[key] = {\n message: val.message,\n __type: "Error",\n // If this is a subclass (i.e., ReferenceError), send up the type so we\n // can re-create the same type during hydration.\n ...(val.name !== "Error" ? {\n __subType: val.name\n } : {})\n };\n } else {\n serialized[key] = val;\n }\n }\n return serialized;\n}\nfunction getStatelessNavigator() {\n return {\n createHref,\n encodeLocation,\n push(to) {\n throw new Error(`You cannot use navigator.push() on the server because it is a stateless ` + `environment. This error was probably triggered when you did a ` + `\\`navigate(${JSON.stringify(to)})\\` somewhere in your app.`);\n },\n replace(to) {\n throw new Error(`You cannot use navigator.replace() on the server because it is a stateless ` + `environment. This error was probably triggered when you did a ` + `\\`navigate(${JSON.stringify(to)}, { replace: true })\\` somewhere ` + `in your app.`);\n },\n go(delta) {\n throw new Error(`You cannot use navigator.go() on the server because it is a stateless ` + `environment. This error was probably triggered when you did a ` + `\\`navigate(${delta})\\` somewhere in your app.`);\n },\n back() {\n throw new Error(`You cannot use navigator.back() on the server because it is a stateless ` + `environment.`);\n },\n forward() {\n throw new Error(`You cannot use navigator.forward() on the server because it is a stateless ` + `environment.`);\n }\n };\n}\nfunction createStaticHandler(routes, opts) {\n return router.createStaticHandler(routes, {\n ...opts,\n mapRouteProperties: reactRouter.UNSAFE_mapRouteProperties\n });\n}\nfunction createStaticRouter(routes, context, opts = {}) {\n let manifest = {};\n let dataRoutes = router.UNSAFE_convertRoutesToDataRoutes(routes, reactRouter.UNSAFE_mapRouteProperties, undefined, manifest);\n // Because our context matches may be from a framework-agnostic set of\n // routes passed to createStaticHandler(), we update them here with our\n // newly created/enhanced data routes\n let matches = context.matches.map(match => {\n let route = manifest[match.route.id] || match.route;\n return {\n ...match,\n route\n };\n });\n let msg = method => `You cannot use router.${method}() on the server because it is a stateless environment`;\n return {\n get basename() {\n return context.basename;\n },\n get future() {\n return {\n v7_fetcherPersist: false,\n v7_normalizeFormMethod: false,\n v7_partialHydration: opts.future?.v7_partialHydration === true,\n v7_prependBasename: false,\n v7_relativeSplatPath: opts.future?.v7_relativeSplatPath === true,\n unstable_skipActionErrorRevalidation: false\n };\n },\n get state() {\n return {\n historyAction: router.Action.Pop,\n location: context.location,\n matches,\n loaderData: context.loaderData,\n actionData: context.actionData,\n errors: context.errors,\n initialized: true,\n navigation: router.IDLE_NAVIGATION,\n restoreScrollPosition: null,\n preventScrollReset: false,\n revalidation: "idle",\n fetchers: new Map(),\n blockers: new Map()\n };\n },\n get routes() {\n return dataRoutes;\n },\n get window() {\n return undefined;\n },\n initialize() {\n throw msg("initialize");\n },\n subscribe() {\n throw msg("subscribe");\n },\n enableScrollRestoration() {\n throw msg("enableScrollRestoration");\n },\n navigate() {\n throw msg("navigate");\n },\n fetch() {\n throw msg("fetch");\n },\n revalidate() {\n throw msg("revalidate");\n },\n createHref,\n encodeLocation,\n getFetcher() {\n return router.IDLE_FETCHER;\n },\n deleteFetcher() {\n throw msg("deleteFetcher");\n },\n dispose() {\n throw msg("dispose");\n },\n getBlocker() {\n return router.IDLE_BLOCKER;\n },\n deleteBlocker() {\n throw msg("deleteBlocker");\n },\n patchRoutes() {\n throw msg("patchRoutes");\n },\n _internalFetchControllers: new Map(),\n _internalActiveDeferreds: new Map(),\n _internalSetRoutes() {\n throw msg("_internalSetRoutes");\n }\n };\n}\nfunction createHref(to) {\n return typeof to === "string" ? to : reactRouterDom.createPath(to);\n}\nfunction encodeLocation(to) {\n let href = typeof to === "string" ? to : reactRouterDom.createPath(to);\n // Treating this as a full URL will strip any trailing spaces so we need to\n // pre-encode them since they might be part of a matching splat param from\n // an ancestor route\n href = href.replace(/ $/, "%20");\n let encoded = ABSOLUTE_URL_REGEX.test(href) ? new URL(href) : new URL(href, "http://localhost");\n return {\n pathname: encoded.pathname,\n search: encoded.search,\n hash: encoded.hash\n };\n}\nconst ABSOLUTE_URL_REGEX = /^(?:[a-z][a-z0-9+.-]*:|\\/\\/)/i;\n// This utility is based on https://github.com/zertosh/htmlescape\n// License: https://github.com/zertosh/htmlescape/blob/0527ca7156a524d256101bb310a9f970f63078ad/LICENSE\nconst ESCAPE_LOOKUP = {\n "&": "\\\\u0026",\n ">": "\\\\u003e",\n "<": "\\\\u003c",\n "\\u2028": "\\\\u2028",\n "\\u2029": "\\\\u2029"\n};\nconst ESCAPE_REGEX = /[&><\\u2028\\u2029]/g;\nfunction htmlEscape(str) {\n return str.replace(ESCAPE_REGEX, match => ESCAPE_LOOKUP[match]);\n}\n\nexports.kO = StaticRouter;\nexports.je = StaticRouterProvider;\nexports.d6 = createStaticHandler;\nexports.KD = createStaticRouter;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/react-router-dom/server.js?', + ); + + /***/ + }, + + /***/ 7767: /***/ (__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ AbortedDeferredError: () => (/* reexport safe */ _remix_run_router__WEBPACK_IMPORTED_MODULE_1__.AbortedDeferredError),\n/* harmony export */ Await: () => (/* binding */ Await),\n/* harmony export */ MemoryRouter: () => (/* binding */ MemoryRouter),\n/* harmony export */ Navigate: () => (/* binding */ Navigate),\n/* harmony export */ NavigationType: () => (/* reexport safe */ _remix_run_router__WEBPACK_IMPORTED_MODULE_1__.Action),\n/* harmony export */ Outlet: () => (/* binding */ Outlet),\n/* harmony export */ Route: () => (/* binding */ Route),\n/* harmony export */ Router: () => (/* binding */ Router),\n/* harmony export */ RouterProvider: () => (/* binding */ RouterProvider),\n/* harmony export */ Routes: () => (/* binding */ Routes),\n/* harmony export */ UNSAFE_DataRouterContext: () => (/* binding */ DataRouterContext),\n/* harmony export */ UNSAFE_DataRouterStateContext: () => (/* binding */ DataRouterStateContext),\n/* harmony export */ UNSAFE_LocationContext: () => (/* binding */ LocationContext),\n/* harmony export */ UNSAFE_NavigationContext: () => (/* binding */ NavigationContext),\n/* harmony export */ UNSAFE_RouteContext: () => (/* binding */ RouteContext),\n/* harmony export */ UNSAFE_mapRouteProperties: () => (/* binding */ mapRouteProperties),\n/* harmony export */ UNSAFE_useRouteId: () => (/* binding */ useRouteId),\n/* harmony export */ UNSAFE_useRoutesImpl: () => (/* binding */ useRoutesImpl),\n/* harmony export */ createMemoryRouter: () => (/* binding */ createMemoryRouter),\n/* harmony export */ createPath: () => (/* reexport safe */ _remix_run_router__WEBPACK_IMPORTED_MODULE_1__.createPath),\n/* harmony export */ createRoutesFromChildren: () => (/* binding */ createRoutesFromChildren),\n/* harmony export */ createRoutesFromElements: () => (/* binding */ createRoutesFromChildren),\n/* harmony export */ defer: () => (/* reexport safe */ _remix_run_router__WEBPACK_IMPORTED_MODULE_1__.defer),\n/* harmony export */ generatePath: () => (/* reexport safe */ _remix_run_router__WEBPACK_IMPORTED_MODULE_1__.generatePath),\n/* harmony export */ isRouteErrorResponse: () => (/* reexport safe */ _remix_run_router__WEBPACK_IMPORTED_MODULE_1__.isRouteErrorResponse),\n/* harmony export */ json: () => (/* reexport safe */ _remix_run_router__WEBPACK_IMPORTED_MODULE_1__.json),\n/* harmony export */ matchPath: () => (/* reexport safe */ _remix_run_router__WEBPACK_IMPORTED_MODULE_1__.matchPath),\n/* harmony export */ matchRoutes: () => (/* reexport safe */ _remix_run_router__WEBPACK_IMPORTED_MODULE_1__.matchRoutes),\n/* harmony export */ parsePath: () => (/* reexport safe */ _remix_run_router__WEBPACK_IMPORTED_MODULE_1__.parsePath),\n/* harmony export */ redirect: () => (/* reexport safe */ _remix_run_router__WEBPACK_IMPORTED_MODULE_1__.redirect),\n/* harmony export */ redirectDocument: () => (/* reexport safe */ _remix_run_router__WEBPACK_IMPORTED_MODULE_1__.redirectDocument),\n/* harmony export */ renderMatches: () => (/* binding */ renderMatches),\n/* harmony export */ resolvePath: () => (/* reexport safe */ _remix_run_router__WEBPACK_IMPORTED_MODULE_1__.resolvePath),\n/* harmony export */ useActionData: () => (/* binding */ useActionData),\n/* harmony export */ useAsyncError: () => (/* binding */ useAsyncError),\n/* harmony export */ useAsyncValue: () => (/* binding */ useAsyncValue),\n/* harmony export */ useBlocker: () => (/* binding */ useBlocker),\n/* harmony export */ useHref: () => (/* binding */ useHref),\n/* harmony export */ useInRouterContext: () => (/* binding */ useInRouterContext),\n/* harmony export */ useLoaderData: () => (/* binding */ useLoaderData),\n/* harmony export */ useLocation: () => (/* binding */ useLocation),\n/* harmony export */ useMatch: () => (/* binding */ useMatch),\n/* harmony export */ useMatches: () => (/* binding */ useMatches),\n/* harmony export */ useNavigate: () => (/* binding */ useNavigate),\n/* harmony export */ useNavigation: () => (/* binding */ useNavigation),\n/* harmony export */ useNavigationType: () => (/* binding */ useNavigationType),\n/* harmony export */ useOutlet: () => (/* binding */ useOutlet),\n/* harmony export */ useOutletContext: () => (/* binding */ useOutletContext),\n/* harmony export */ useParams: () => (/* binding */ useParams),\n/* harmony export */ useResolvedPath: () => (/* binding */ useResolvedPath),\n/* harmony export */ useRevalidator: () => (/* binding */ useRevalidator),\n/* harmony export */ useRouteError: () => (/* binding */ useRouteError),\n/* harmony export */ useRouteLoaderData: () => (/* binding */ useRouteLoaderData),\n/* harmony export */ useRoutes: () => (/* binding */ useRoutes)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6540);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _remix_run_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5588);\n/**\n * React Router v6.24.1\n *\n * Copyright (c) Remix Software Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE.md file in the root directory of this source tree.\n *\n * @license MIT\n */\n\n\n\n\nfunction _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}\n\n// Create react-specific types from the agnostic types in @remix-run/router to\n// export from react-router\nconst DataRouterContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createContext(null);\nif (true) {\n DataRouterContext.displayName = "DataRouter";\n}\nconst DataRouterStateContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createContext(null);\nif (true) {\n DataRouterStateContext.displayName = "DataRouterState";\n}\nconst AwaitContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createContext(null);\nif (true) {\n AwaitContext.displayName = "Await";\n}\n\n/**\n * A Navigator is a "location changer"; it\'s how you get to different locations.\n *\n * Every history instance conforms to the Navigator interface, but the\n * distinction is useful primarily when it comes to the low-level `<Router>` API\n * where both the location and a navigator must be provided separately in order\n * to avoid "tearing" that may occur in a suspense-enabled app if the action\n * and/or location were to be read directly from the history instance.\n */\n\nconst NavigationContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createContext(null);\nif (true) {\n NavigationContext.displayName = "Navigation";\n}\nconst LocationContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createContext(null);\nif (true) {\n LocationContext.displayName = "Location";\n}\nconst RouteContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createContext({\n outlet: null,\n matches: [],\n isDataRoute: false\n});\nif (true) {\n RouteContext.displayName = "Route";\n}\nconst RouteErrorContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createContext(null);\nif (true) {\n RouteErrorContext.displayName = "RouteError";\n}\n\n/**\n * Returns the full href for the given "to" value. This is useful for building\n * custom links that are also accessible and preserve right-click behavior.\n *\n * @see https://reactrouter.com/hooks/use-href\n */\nfunction useHref(to, _temp) {\n let {\n relative\n } = _temp === void 0 ? {} : _temp;\n !useInRouterContext() ? true ? (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.UNSAFE_invariant)(false, // TODO: This error is probably because they somehow have 2 versions of the\n // router loaded. We can help them understand how to avoid that.\n "useHref() may be used only in the context of a <Router> component.") : 0 : void 0;\n let {\n basename,\n navigator\n } = react__WEBPACK_IMPORTED_MODULE_0__.useContext(NavigationContext);\n let {\n hash,\n pathname,\n search\n } = useResolvedPath(to, {\n relative\n });\n let joinedPathname = pathname;\n\n // If we\'re operating within a basename, prepend it to the pathname prior\n // to creating the href. If this is a root navigation, then just use the raw\n // basename which allows the basename to have full control over the presence\n // of a trailing slash on root links\n if (basename !== "/") {\n joinedPathname = pathname === "/" ? basename : (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.joinPaths)([basename, pathname]);\n }\n return navigator.createHref({\n pathname: joinedPathname,\n search,\n hash\n });\n}\n\n/**\n * Returns true if this component is a descendant of a `<Router>`.\n *\n * @see https://reactrouter.com/hooks/use-in-router-context\n */\nfunction useInRouterContext() {\n return react__WEBPACK_IMPORTED_MODULE_0__.useContext(LocationContext) != null;\n}\n\n/**\n * Returns the current location object, which represents the current URL in web\n * browsers.\n *\n * Note: If you\'re using this it may mean you\'re doing some of your own\n * "routing" in your app, and we\'d like to know what your use case is. We may\n * be able to provide something higher-level to better suit your needs.\n *\n * @see https://reactrouter.com/hooks/use-location\n */\nfunction useLocation() {\n !useInRouterContext() ? true ? (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.UNSAFE_invariant)(false, // TODO: This error is probably because they somehow have 2 versions of the\n // router loaded. We can help them understand how to avoid that.\n "useLocation() may be used only in the context of a <Router> component.") : 0 : void 0;\n return react__WEBPACK_IMPORTED_MODULE_0__.useContext(LocationContext).location;\n}\n\n/**\n * Returns the current navigation action which describes how the router came to\n * the current location, either by a pop, push, or replace on the history stack.\n *\n * @see https://reactrouter.com/hooks/use-navigation-type\n */\nfunction useNavigationType() {\n return react__WEBPACK_IMPORTED_MODULE_0__.useContext(LocationContext).navigationType;\n}\n\n/**\n * Returns a PathMatch object if the given pattern matches the current URL.\n * This is useful for components that need to know "active" state, e.g.\n * `<NavLink>`.\n *\n * @see https://reactrouter.com/hooks/use-match\n */\nfunction useMatch(pattern) {\n !useInRouterContext() ? true ? (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.UNSAFE_invariant)(false, // TODO: This error is probably because they somehow have 2 versions of the\n // router loaded. We can help them understand how to avoid that.\n "useMatch() may be used only in the context of a <Router> component.") : 0 : void 0;\n let {\n pathname\n } = useLocation();\n return react__WEBPACK_IMPORTED_MODULE_0__.useMemo(() => (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.matchPath)(pattern, pathname), [pathname, pattern]);\n}\n\n/**\n * The interface for the navigate() function returned from useNavigate().\n */\n\nconst navigateEffectWarning = "You should call navigate() in a React.useEffect(), not when " + "your component is first rendered.";\n\n// Mute warnings for calls to useNavigate in SSR environments\nfunction useIsomorphicLayoutEffect(cb) {\n let isStatic = react__WEBPACK_IMPORTED_MODULE_0__.useContext(NavigationContext).static;\n if (!isStatic) {\n // We should be able to get rid of this once react 18.3 is released\n // See: https://github.com/facebook/react/pull/26395\n // eslint-disable-next-line react-hooks/rules-of-hooks\n react__WEBPACK_IMPORTED_MODULE_0__.useLayoutEffect(cb);\n }\n}\n\n/**\n * Returns an imperative method for changing the location. Used by `<Link>`s, but\n * may also be used by other elements to change the location.\n *\n * @see https://reactrouter.com/hooks/use-navigate\n */\nfunction useNavigate() {\n let {\n isDataRoute\n } = react__WEBPACK_IMPORTED_MODULE_0__.useContext(RouteContext);\n // Conditional usage is OK here because the usage of a data router is static\n // eslint-disable-next-line react-hooks/rules-of-hooks\n return isDataRoute ? useNavigateStable() : useNavigateUnstable();\n}\nfunction useNavigateUnstable() {\n !useInRouterContext() ? true ? (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.UNSAFE_invariant)(false, // TODO: This error is probably because they somehow have 2 versions of the\n // router loaded. We can help them understand how to avoid that.\n "useNavigate() may be used only in the context of a <Router> component.") : 0 : void 0;\n let dataRouterContext = react__WEBPACK_IMPORTED_MODULE_0__.useContext(DataRouterContext);\n let {\n basename,\n future,\n navigator\n } = react__WEBPACK_IMPORTED_MODULE_0__.useContext(NavigationContext);\n let {\n matches\n } = react__WEBPACK_IMPORTED_MODULE_0__.useContext(RouteContext);\n let {\n pathname: locationPathname\n } = useLocation();\n let routePathnamesJson = JSON.stringify((0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.UNSAFE_getResolveToMatches)(matches, future.v7_relativeSplatPath));\n let activeRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(false);\n useIsomorphicLayoutEffect(() => {\n activeRef.current = true;\n });\n let navigate = react__WEBPACK_IMPORTED_MODULE_0__.useCallback(function (to, options) {\n if (options === void 0) {\n options = {};\n }\n true ? (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.UNSAFE_warning)(activeRef.current, navigateEffectWarning) : 0;\n\n // Short circuit here since if this happens on first render the navigate\n // is useless because we haven\'t wired up our history listener yet\n if (!activeRef.current) return;\n if (typeof to === "number") {\n navigator.go(to);\n return;\n }\n let path = (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.resolveTo)(to, JSON.parse(routePathnamesJson), locationPathname, options.relative === "path");\n\n // If we\'re operating within a basename, prepend it to the pathname prior\n // to handing off to history (but only if we\'re not in a data router,\n // otherwise it\'ll prepend the basename inside of the router).\n // If this is a root navigation, then we navigate to the raw basename\n // which allows the basename to have full control over the presence of a\n // trailing slash on root links\n if (dataRouterContext == null && basename !== "/") {\n path.pathname = path.pathname === "/" ? basename : (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.joinPaths)([basename, path.pathname]);\n }\n (!!options.replace ? navigator.replace : navigator.push)(path, options.state, options);\n }, [basename, navigator, routePathnamesJson, locationPathname, dataRouterContext]);\n return navigate;\n}\nconst OutletContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createContext(null);\n\n/**\n * Returns the context (if provided) for the child route at this level of the route\n * hierarchy.\n * @see https://reactrouter.com/hooks/use-outlet-context\n */\nfunction useOutletContext() {\n return react__WEBPACK_IMPORTED_MODULE_0__.useContext(OutletContext);\n}\n\n/**\n * Returns the element for the child route at this level of the route\n * hierarchy. Used internally by `<Outlet>` to render child routes.\n *\n * @see https://reactrouter.com/hooks/use-outlet\n */\nfunction useOutlet(context) {\n let outlet = react__WEBPACK_IMPORTED_MODULE_0__.useContext(RouteContext).outlet;\n if (outlet) {\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(OutletContext.Provider, {\n value: context\n }, outlet);\n }\n return outlet;\n}\n\n/**\n * Returns an object of key/value pairs of the dynamic params from the current\n * URL that were matched by the route path.\n *\n * @see https://reactrouter.com/hooks/use-params\n */\nfunction useParams() {\n let {\n matches\n } = react__WEBPACK_IMPORTED_MODULE_0__.useContext(RouteContext);\n let routeMatch = matches[matches.length - 1];\n return routeMatch ? routeMatch.params : {};\n}\n\n/**\n * Resolves the pathname of the given `to` value against the current location.\n *\n * @see https://reactrouter.com/hooks/use-resolved-path\n */\nfunction useResolvedPath(to, _temp2) {\n let {\n relative\n } = _temp2 === void 0 ? {} : _temp2;\n let {\n future\n } = react__WEBPACK_IMPORTED_MODULE_0__.useContext(NavigationContext);\n let {\n matches\n } = react__WEBPACK_IMPORTED_MODULE_0__.useContext(RouteContext);\n let {\n pathname: locationPathname\n } = useLocation();\n let routePathnamesJson = JSON.stringify((0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.UNSAFE_getResolveToMatches)(matches, future.v7_relativeSplatPath));\n return react__WEBPACK_IMPORTED_MODULE_0__.useMemo(() => (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.resolveTo)(to, JSON.parse(routePathnamesJson), locationPathname, relative === "path"), [to, routePathnamesJson, locationPathname, relative]);\n}\n\n/**\n * Returns the element of the route that matched the current location, prepared\n * with the correct context to render the remainder of the route tree. Route\n * elements in the tree must render an `<Outlet>` to render their child route\'s\n * element.\n *\n * @see https://reactrouter.com/hooks/use-routes\n */\nfunction useRoutes(routes, locationArg) {\n return useRoutesImpl(routes, locationArg);\n}\n\n// Internal implementation with accept optional param for RouterProvider usage\nfunction useRoutesImpl(routes, locationArg, dataRouterState, future) {\n !useInRouterContext() ? true ? (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.UNSAFE_invariant)(false, // TODO: This error is probably because they somehow have 2 versions of the\n // router loaded. We can help them understand how to avoid that.\n "useRoutes() may be used only in the context of a <Router> component.") : 0 : void 0;\n let {\n navigator\n } = react__WEBPACK_IMPORTED_MODULE_0__.useContext(NavigationContext);\n let {\n matches: parentMatches\n } = react__WEBPACK_IMPORTED_MODULE_0__.useContext(RouteContext);\n let routeMatch = parentMatches[parentMatches.length - 1];\n let parentParams = routeMatch ? routeMatch.params : {};\n let parentPathname = routeMatch ? routeMatch.pathname : "/";\n let parentPathnameBase = routeMatch ? routeMatch.pathnameBase : "/";\n let parentRoute = routeMatch && routeMatch.route;\n if (true) {\n // You won\'t get a warning about 2 different <Routes> under a <Route>\n // without a trailing *, but this is a best-effort warning anyway since we\n // cannot even give the warning unless they land at the parent route.\n //\n // Example:\n //\n // <Routes>\n // {/* This route path MUST end with /* because otherwise\n // it will never match /blog/post/123 */}\n // <Route path="blog" element={<Blog />} />\n // <Route path="blog/feed" element={<BlogFeed />} />\n // </Routes>\n //\n // function Blog() {\n // return (\n // <Routes>\n // <Route path="post/:id" element={<Post />} />\n // </Routes>\n // );\n // }\n let parentPath = parentRoute && parentRoute.path || "";\n warningOnce(parentPathname, !parentRoute || parentPath.endsWith("*"), "You rendered descendant <Routes> (or called `useRoutes()`) at " + ("\\"" + parentPathname + "\\" (under <Route path=\\"" + parentPath + "\\">) but the ") + "parent route path has no trailing \\"*\\". This means if you navigate " + "deeper, the parent won\'t match anymore and therefore the child " + "routes will never render.\\n\\n" + ("Please change the parent <Route path=\\"" + parentPath + "\\"> to <Route ") + ("path=\\"" + (parentPath === "/" ? "*" : parentPath + "/*") + "\\">."));\n }\n let locationFromContext = useLocation();\n let location;\n if (locationArg) {\n var _parsedLocationArg$pa;\n let parsedLocationArg = typeof locationArg === "string" ? (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.parsePath)(locationArg) : locationArg;\n !(parentPathnameBase === "/" || ((_parsedLocationArg$pa = parsedLocationArg.pathname) == null ? void 0 : _parsedLocationArg$pa.startsWith(parentPathnameBase))) ? true ? (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.UNSAFE_invariant)(false, "When overriding the location using `<Routes location>` or `useRoutes(routes, location)`, " + "the location pathname must begin with the portion of the URL pathname that was " + ("matched by all parent routes. The current pathname base is \\"" + parentPathnameBase + "\\" ") + ("but pathname \\"" + parsedLocationArg.pathname + "\\" was given in the `location` prop.")) : 0 : void 0;\n location = parsedLocationArg;\n } else {\n location = locationFromContext;\n }\n let pathname = location.pathname || "/";\n let remainingPathname = pathname;\n if (parentPathnameBase !== "/") {\n // Determine the remaining pathname by removing the # of URL segments the\n // parentPathnameBase has, instead of removing based on character count.\n // This is because we can\'t guarantee that incoming/outgoing encodings/\n // decodings will match exactly.\n // We decode paths before matching on a per-segment basis with\n // decodeURIComponent(), but we re-encode pathnames via `new URL()` so they\n // match what `window.location.pathname` would reflect. Those don\'t 100%\n // align when it comes to encoded URI characters such as % and &.\n //\n // So we may end up with:\n // pathname: "/descendant/a%25b/match"\n // parentPathnameBase: "/descendant/a%b"\n //\n // And the direct substring removal approach won\'t work :/\n let parentSegments = parentPathnameBase.replace(/^\\//, "").split("/");\n let segments = pathname.replace(/^\\//, "").split("/");\n remainingPathname = "/" + segments.slice(parentSegments.length).join("/");\n }\n let matches = (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.matchRoutes)(routes, {\n pathname: remainingPathname\n });\n if (true) {\n true ? (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.UNSAFE_warning)(parentRoute || matches != null, "No routes matched location \\"" + location.pathname + location.search + location.hash + "\\" ") : 0;\n true ? (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.UNSAFE_warning)(matches == null || matches[matches.length - 1].route.element !== undefined || matches[matches.length - 1].route.Component !== undefined || matches[matches.length - 1].route.lazy !== undefined, "Matched leaf route at location \\"" + location.pathname + location.search + location.hash + "\\" " + "does not have an element or Component. This means it will render an <Outlet /> with a " + "null value by default resulting in an \\"empty\\" page.") : 0;\n }\n let renderedMatches = _renderMatches(matches && matches.map(match => Object.assign({}, match, {\n params: Object.assign({}, parentParams, match.params),\n pathname: (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.joinPaths)([parentPathnameBase,\n // Re-encode pathnames that were decoded inside matchRoutes\n navigator.encodeLocation ? navigator.encodeLocation(match.pathname).pathname : match.pathname]),\n pathnameBase: match.pathnameBase === "/" ? parentPathnameBase : (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.joinPaths)([parentPathnameBase,\n // Re-encode pathnames that were decoded inside matchRoutes\n navigator.encodeLocation ? navigator.encodeLocation(match.pathnameBase).pathname : match.pathnameBase])\n })), parentMatches, dataRouterState, future);\n\n // When a user passes in a `locationArg`, the associated routes need to\n // be wrapped in a new `LocationContext.Provider` in order for `useLocation`\n // to use the scoped location instead of the global location.\n if (locationArg && renderedMatches) {\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(LocationContext.Provider, {\n value: {\n location: _extends({\n pathname: "/",\n search: "",\n hash: "",\n state: null,\n key: "default"\n }, location),\n navigationType: _remix_run_router__WEBPACK_IMPORTED_MODULE_1__.Action.Pop\n }\n }, renderedMatches);\n }\n return renderedMatches;\n}\nfunction DefaultErrorComponent() {\n let error = useRouteError();\n let message = (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.isRouteErrorResponse)(error) ? error.status + " " + error.statusText : error instanceof Error ? error.message : JSON.stringify(error);\n let stack = error instanceof Error ? error.stack : null;\n let lightgrey = "rgba(200,200,200, 0.5)";\n let preStyles = {\n padding: "0.5rem",\n backgroundColor: lightgrey\n };\n let codeStyles = {\n padding: "2px 4px",\n backgroundColor: lightgrey\n };\n let devInfo = null;\n if (true) {\n console.error("Error handled by React Router default ErrorBoundary:", error);\n devInfo = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("p", null, "\\uD83D\\uDCBF Hey developer \\uD83D\\uDC4B"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("p", null, "You can provide a way better UX than this when your app throws errors by providing your own ", /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("code", {\n style: codeStyles\n }, "ErrorBoundary"), " or", " ", /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("code", {\n style: codeStyles\n }, "errorElement"), " prop on your route."));\n }\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("h2", null, "Unexpected Application Error!"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("h3", {\n style: {\n fontStyle: "italic"\n }\n }, message), stack ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("pre", {\n style: preStyles\n }, stack) : null, devInfo);\n}\nconst defaultErrorElement = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(DefaultErrorComponent, null);\nclass RenderErrorBoundary extends react__WEBPACK_IMPORTED_MODULE_0__.Component {\n constructor(props) {\n super(props);\n this.state = {\n location: props.location,\n revalidation: props.revalidation,\n error: props.error\n };\n }\n static getDerivedStateFromError(error) {\n return {\n error: error\n };\n }\n static getDerivedStateFromProps(props, state) {\n // When we get into an error state, the user will likely click "back" to the\n // previous page that didn\'t have an error. Because this wraps the entire\n // application, that will have no effect--the error page continues to display.\n // This gives us a mechanism to recover from the error when the location changes.\n //\n // Whether we\'re in an error state or not, we update the location in state\n // so that when we are in an error state, it gets reset when a new location\n // comes in and the user recovers from the error.\n if (state.location !== props.location || state.revalidation !== "idle" && props.revalidation === "idle") {\n return {\n error: props.error,\n location: props.location,\n revalidation: props.revalidation\n };\n }\n\n // If we\'re not changing locations, preserve the location but still surface\n // any new errors that may come through. We retain the existing error, we do\n // this because the error provided from the app state may be cleared without\n // the location changing.\n return {\n error: props.error !== undefined ? props.error : state.error,\n location: state.location,\n revalidation: props.revalidation || state.revalidation\n };\n }\n componentDidCatch(error, errorInfo) {\n console.error("React Router caught the following error during render", error, errorInfo);\n }\n render() {\n return this.state.error !== undefined ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(RouteContext.Provider, {\n value: this.props.routeContext\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(RouteErrorContext.Provider, {\n value: this.state.error,\n children: this.props.component\n })) : this.props.children;\n }\n}\nfunction RenderedRoute(_ref) {\n let {\n routeContext,\n match,\n children\n } = _ref;\n let dataRouterContext = react__WEBPACK_IMPORTED_MODULE_0__.useContext(DataRouterContext);\n\n // Track how deep we got in our render pass to emulate SSR componentDidCatch\n // in a DataStaticRouter\n if (dataRouterContext && dataRouterContext.static && dataRouterContext.staticContext && (match.route.errorElement || match.route.ErrorBoundary)) {\n dataRouterContext.staticContext._deepestRenderedBoundaryId = match.route.id;\n }\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(RouteContext.Provider, {\n value: routeContext\n }, children);\n}\nfunction _renderMatches(matches, parentMatches, dataRouterState, future) {\n var _dataRouterState2;\n if (parentMatches === void 0) {\n parentMatches = [];\n }\n if (dataRouterState === void 0) {\n dataRouterState = null;\n }\n if (future === void 0) {\n future = null;\n }\n if (matches == null) {\n var _dataRouterState;\n if ((_dataRouterState = dataRouterState) != null && _dataRouterState.errors) {\n // Don\'t bail if we have data router errors so we can render them in the\n // boundary. Use the pre-matched (or shimmed) matches\n matches = dataRouterState.matches;\n } else {\n return null;\n }\n }\n let renderedMatches = matches;\n\n // If we have data errors, trim matches to the highest error boundary\n let errors = (_dataRouterState2 = dataRouterState) == null ? void 0 : _dataRouterState2.errors;\n if (errors != null) {\n let errorIndex = renderedMatches.findIndex(m => m.route.id && (errors == null ? void 0 : errors[m.route.id]) !== undefined);\n !(errorIndex >= 0) ? true ? (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.UNSAFE_invariant)(false, "Could not find a matching route for errors on route IDs: " + Object.keys(errors).join(",")) : 0 : void 0;\n renderedMatches = renderedMatches.slice(0, Math.min(renderedMatches.length, errorIndex + 1));\n }\n\n // If we\'re in a partial hydration mode, detect if we need to render down to\n // a given HydrateFallback while we load the rest of the hydration data\n let renderFallback = false;\n let fallbackIndex = -1;\n if (dataRouterState && future && future.v7_partialHydration) {\n for (let i = 0; i < renderedMatches.length; i++) {\n let match = renderedMatches[i];\n // Track the deepest fallback up until the first route without data\n if (match.route.HydrateFallback || match.route.hydrateFallbackElement) {\n fallbackIndex = i;\n }\n if (match.route.id) {\n let {\n loaderData,\n errors\n } = dataRouterState;\n let needsToRunLoader = match.route.loader && loaderData[match.route.id] === undefined && (!errors || errors[match.route.id] === undefined);\n if (match.route.lazy || needsToRunLoader) {\n // We found the first route that\'s not ready to render (waiting on\n // lazy, or has a loader that hasn\'t run yet). Flag that we need to\n // render a fallback and render up until the appropriate fallback\n renderFallback = true;\n if (fallbackIndex >= 0) {\n renderedMatches = renderedMatches.slice(0, fallbackIndex + 1);\n } else {\n renderedMatches = [renderedMatches[0]];\n }\n break;\n }\n }\n }\n }\n return renderedMatches.reduceRight((outlet, match, index) => {\n // Only data routers handle errors/fallbacks\n let error;\n let shouldRenderHydrateFallback = false;\n let errorElement = null;\n let hydrateFallbackElement = null;\n if (dataRouterState) {\n error = errors && match.route.id ? errors[match.route.id] : undefined;\n errorElement = match.route.errorElement || defaultErrorElement;\n if (renderFallback) {\n if (fallbackIndex < 0 && index === 0) {\n warningOnce("route-fallback", false, "No `HydrateFallback` element provided to render during initial hydration");\n shouldRenderHydrateFallback = true;\n hydrateFallbackElement = null;\n } else if (fallbackIndex === index) {\n shouldRenderHydrateFallback = true;\n hydrateFallbackElement = match.route.hydrateFallbackElement || null;\n }\n }\n }\n let matches = parentMatches.concat(renderedMatches.slice(0, index + 1));\n let getChildren = () => {\n let children;\n if (error) {\n children = errorElement;\n } else if (shouldRenderHydrateFallback) {\n children = hydrateFallbackElement;\n } else if (match.route.Component) {\n // Note: This is a de-optimized path since React won\'t re-use the\n // ReactElement since it\'s identity changes with each new\n // React.createElement call. We keep this so folks can use\n // `<Route Component={...}>` in `<Routes>` but generally `Component`\n // usage is only advised in `RouterProvider` when we can convert it to\n // `element` ahead of time.\n children = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(match.route.Component, null);\n } else if (match.route.element) {\n children = match.route.element;\n } else {\n children = outlet;\n }\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(RenderedRoute, {\n match: match,\n routeContext: {\n outlet,\n matches,\n isDataRoute: dataRouterState != null\n },\n children: children\n });\n };\n // Only wrap in an error boundary within data router usages when we have an\n // ErrorBoundary/errorElement on this route. Otherwise let it bubble up to\n // an ancestor ErrorBoundary/errorElement\n return dataRouterState && (match.route.ErrorBoundary || match.route.errorElement || index === 0) ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(RenderErrorBoundary, {\n location: dataRouterState.location,\n revalidation: dataRouterState.revalidation,\n component: errorElement,\n error: error,\n children: getChildren(),\n routeContext: {\n outlet: null,\n matches,\n isDataRoute: true\n }\n }) : getChildren();\n }, null);\n}\nvar DataRouterHook = /*#__PURE__*/function (DataRouterHook) {\n DataRouterHook["UseBlocker"] = "useBlocker";\n DataRouterHook["UseRevalidator"] = "useRevalidator";\n DataRouterHook["UseNavigateStable"] = "useNavigate";\n return DataRouterHook;\n}(DataRouterHook || {});\nvar DataRouterStateHook = /*#__PURE__*/function (DataRouterStateHook) {\n DataRouterStateHook["UseBlocker"] = "useBlocker";\n DataRouterStateHook["UseLoaderData"] = "useLoaderData";\n DataRouterStateHook["UseActionData"] = "useActionData";\n DataRouterStateHook["UseRouteError"] = "useRouteError";\n DataRouterStateHook["UseNavigation"] = "useNavigation";\n DataRouterStateHook["UseRouteLoaderData"] = "useRouteLoaderData";\n DataRouterStateHook["UseMatches"] = "useMatches";\n DataRouterStateHook["UseRevalidator"] = "useRevalidator";\n DataRouterStateHook["UseNavigateStable"] = "useNavigate";\n DataRouterStateHook["UseRouteId"] = "useRouteId";\n return DataRouterStateHook;\n}(DataRouterStateHook || {});\nfunction getDataRouterConsoleError(hookName) {\n return hookName + " must be used within a data router. See https://reactrouter.com/routers/picking-a-router.";\n}\nfunction useDataRouterContext(hookName) {\n let ctx = react__WEBPACK_IMPORTED_MODULE_0__.useContext(DataRouterContext);\n !ctx ? true ? (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.UNSAFE_invariant)(false, getDataRouterConsoleError(hookName)) : 0 : void 0;\n return ctx;\n}\nfunction useDataRouterState(hookName) {\n let state = react__WEBPACK_IMPORTED_MODULE_0__.useContext(DataRouterStateContext);\n !state ? true ? (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.UNSAFE_invariant)(false, getDataRouterConsoleError(hookName)) : 0 : void 0;\n return state;\n}\nfunction useRouteContext(hookName) {\n let route = react__WEBPACK_IMPORTED_MODULE_0__.useContext(RouteContext);\n !route ? true ? (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.UNSAFE_invariant)(false, getDataRouterConsoleError(hookName)) : 0 : void 0;\n return route;\n}\n\n// Internal version with hookName-aware debugging\nfunction useCurrentRouteId(hookName) {\n let route = useRouteContext(hookName);\n let thisRoute = route.matches[route.matches.length - 1];\n !thisRoute.route.id ? true ? (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.UNSAFE_invariant)(false, hookName + " can only be used on routes that contain a unique \\"id\\"") : 0 : void 0;\n return thisRoute.route.id;\n}\n\n/**\n * Returns the ID for the nearest contextual route\n */\nfunction useRouteId() {\n return useCurrentRouteId(DataRouterStateHook.UseRouteId);\n}\n\n/**\n * Returns the current navigation, defaulting to an "idle" navigation when\n * no navigation is in progress\n */\nfunction useNavigation() {\n let state = useDataRouterState(DataRouterStateHook.UseNavigation);\n return state.navigation;\n}\n\n/**\n * Returns a revalidate function for manually triggering revalidation, as well\n * as the current state of any manual revalidations\n */\nfunction useRevalidator() {\n let dataRouterContext = useDataRouterContext(DataRouterHook.UseRevalidator);\n let state = useDataRouterState(DataRouterStateHook.UseRevalidator);\n return react__WEBPACK_IMPORTED_MODULE_0__.useMemo(() => ({\n revalidate: dataRouterContext.router.revalidate,\n state: state.revalidation\n }), [dataRouterContext.router.revalidate, state.revalidation]);\n}\n\n/**\n * Returns the active route matches, useful for accessing loaderData for\n * parent/child routes or the route "handle" property\n */\nfunction useMatches() {\n let {\n matches,\n loaderData\n } = useDataRouterState(DataRouterStateHook.UseMatches);\n return react__WEBPACK_IMPORTED_MODULE_0__.useMemo(() => matches.map(m => (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.UNSAFE_convertRouteMatchToUiMatch)(m, loaderData)), [matches, loaderData]);\n}\n\n/**\n * Returns the loader data for the nearest ancestor Route loader\n */\nfunction useLoaderData() {\n let state = useDataRouterState(DataRouterStateHook.UseLoaderData);\n let routeId = useCurrentRouteId(DataRouterStateHook.UseLoaderData);\n if (state.errors && state.errors[routeId] != null) {\n console.error("You cannot `useLoaderData` in an errorElement (routeId: " + routeId + ")");\n return undefined;\n }\n return state.loaderData[routeId];\n}\n\n/**\n * Returns the loaderData for the given routeId\n */\nfunction useRouteLoaderData(routeId) {\n let state = useDataRouterState(DataRouterStateHook.UseRouteLoaderData);\n return state.loaderData[routeId];\n}\n\n/**\n * Returns the action data for the nearest ancestor Route action\n */\nfunction useActionData() {\n let state = useDataRouterState(DataRouterStateHook.UseActionData);\n let routeId = useCurrentRouteId(DataRouterStateHook.UseLoaderData);\n return state.actionData ? state.actionData[routeId] : undefined;\n}\n\n/**\n * Returns the nearest ancestor Route error, which could be a loader/action\n * error or a render error. This is intended to be called from your\n * ErrorBoundary/errorElement to display a proper error message.\n */\nfunction useRouteError() {\n var _state$errors;\n let error = react__WEBPACK_IMPORTED_MODULE_0__.useContext(RouteErrorContext);\n let state = useDataRouterState(DataRouterStateHook.UseRouteError);\n let routeId = useCurrentRouteId(DataRouterStateHook.UseRouteError);\n\n // If this was a render error, we put it in a RouteError context inside\n // of RenderErrorBoundary\n if (error !== undefined) {\n return error;\n }\n\n // Otherwise look for errors from our data router state\n return (_state$errors = state.errors) == null ? void 0 : _state$errors[routeId];\n}\n\n/**\n * Returns the happy-path data from the nearest ancestor `<Await />` value\n */\nfunction useAsyncValue() {\n let value = react__WEBPACK_IMPORTED_MODULE_0__.useContext(AwaitContext);\n return value == null ? void 0 : value._data;\n}\n\n/**\n * Returns the error from the nearest ancestor `<Await />` value\n */\nfunction useAsyncError() {\n let value = react__WEBPACK_IMPORTED_MODULE_0__.useContext(AwaitContext);\n return value == null ? void 0 : value._error;\n}\nlet blockerId = 0;\n\n/**\n * Allow the application to block navigations within the SPA and present the\n * user a confirmation dialog to confirm the navigation. Mostly used to avoid\n * using half-filled form data. This does not handle hard-reloads or\n * cross-origin navigations.\n */\nfunction useBlocker(shouldBlock) {\n let {\n router,\n basename\n } = useDataRouterContext(DataRouterHook.UseBlocker);\n let state = useDataRouterState(DataRouterStateHook.UseBlocker);\n let [blockerKey, setBlockerKey] = react__WEBPACK_IMPORTED_MODULE_0__.useState("");\n let blockerFunction = react__WEBPACK_IMPORTED_MODULE_0__.useCallback(arg => {\n if (typeof shouldBlock !== "function") {\n return !!shouldBlock;\n }\n if (basename === "/") {\n return shouldBlock(arg);\n }\n\n // If they provided us a function and we\'ve got an active basename, strip\n // it from the locations we expose to the user to match the behavior of\n // useLocation\n let {\n currentLocation,\n nextLocation,\n historyAction\n } = arg;\n return shouldBlock({\n currentLocation: _extends({}, currentLocation, {\n pathname: (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.stripBasename)(currentLocation.pathname, basename) || currentLocation.pathname\n }),\n nextLocation: _extends({}, nextLocation, {\n pathname: (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.stripBasename)(nextLocation.pathname, basename) || nextLocation.pathname\n }),\n historyAction\n });\n }, [basename, shouldBlock]);\n\n // This effect is in charge of blocker key assignment and deletion (which is\n // tightly coupled to the key)\n react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => {\n let key = String(++blockerId);\n setBlockerKey(key);\n return () => router.deleteBlocker(key);\n }, [router]);\n\n // This effect handles assigning the blockerFunction. This is to handle\n // unstable blocker function identities, and happens only after the prior\n // effect so we don\'t get an orphaned blockerFunction in the router with a\n // key of "". Until then we just have the IDLE_BLOCKER.\n react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => {\n if (blockerKey !== "") {\n router.getBlocker(blockerKey, blockerFunction);\n }\n }, [router, blockerKey, blockerFunction]);\n\n // Prefer the blocker from `state` not `router.state` since DataRouterContext\n // is memoized so this ensures we update on blocker state updates\n return blockerKey && state.blockers.has(blockerKey) ? state.blockers.get(blockerKey) : _remix_run_router__WEBPACK_IMPORTED_MODULE_1__.IDLE_BLOCKER;\n}\n\n/**\n * Stable version of useNavigate that is used when we are in the context of\n * a RouterProvider.\n */\nfunction useNavigateStable() {\n let {\n router\n } = useDataRouterContext(DataRouterHook.UseNavigateStable);\n let id = useCurrentRouteId(DataRouterStateHook.UseNavigateStable);\n let activeRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(false);\n useIsomorphicLayoutEffect(() => {\n activeRef.current = true;\n });\n let navigate = react__WEBPACK_IMPORTED_MODULE_0__.useCallback(function (to, options) {\n if (options === void 0) {\n options = {};\n }\n true ? (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.UNSAFE_warning)(activeRef.current, navigateEffectWarning) : 0;\n\n // Short circuit here since if this happens on first render the navigate\n // is useless because we haven\'t wired up our router subscriber yet\n if (!activeRef.current) return;\n if (typeof to === "number") {\n router.navigate(to);\n } else {\n router.navigate(to, _extends({\n fromRouteId: id\n }, options));\n }\n }, [router, id]);\n return navigate;\n}\nconst alreadyWarned = {};\nfunction warningOnce(key, cond, message) {\n if (!cond && !alreadyWarned[key]) {\n alreadyWarned[key] = true;\n true ? (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.UNSAFE_warning)(false, message) : 0;\n }\n}\n\n/**\n Webpack + React 17 fails to compile on any of the following because webpack\n complains that `startTransition` doesn\'t exist in `React`:\n * import { startTransition } from "react"\n * import * as React from from "react";\n "startTransition" in React ? React.startTransition(() => setState()) : setState()\n * import * as React from from "react";\n "startTransition" in React ? React["startTransition"](() => setState()) : setState()\n\n Moving it to a constant such as the following solves the Webpack/React 17 issue:\n * import * as React from from "react";\n const START_TRANSITION = "startTransition";\n START_TRANSITION in React ? React[START_TRANSITION](() => setState()) : setState()\n\n However, that introduces webpack/terser minification issues in production builds\n in React 18 where minification/obfuscation ends up removing the call of\n React.startTransition entirely from the first half of the ternary. Grabbing\n this exported reference once up front resolves that issue.\n\n See https://github.com/remix-run/react-router/issues/10579\n*/\nconst START_TRANSITION = "startTransition";\nconst startTransitionImpl = react__WEBPACK_IMPORTED_MODULE_0__[START_TRANSITION];\n\n/**\n * Given a Remix Router instance, render the appropriate UI\n */\nfunction RouterProvider(_ref) {\n let {\n fallbackElement,\n router,\n future\n } = _ref;\n let [state, setStateImpl] = react__WEBPACK_IMPORTED_MODULE_0__.useState(router.state);\n let {\n v7_startTransition\n } = future || {};\n let setState = react__WEBPACK_IMPORTED_MODULE_0__.useCallback(newState => {\n if (v7_startTransition && startTransitionImpl) {\n startTransitionImpl(() => setStateImpl(newState));\n } else {\n setStateImpl(newState);\n }\n }, [setStateImpl, v7_startTransition]);\n\n // Need to use a layout effect here so we are subscribed early enough to\n // pick up on any render-driven redirects/navigations (useEffect/<Navigate>)\n react__WEBPACK_IMPORTED_MODULE_0__.useLayoutEffect(() => router.subscribe(setState), [router, setState]);\n react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => {\n true ? (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.UNSAFE_warning)(fallbackElement == null || !router.future.v7_partialHydration, "`<RouterProvider fallbackElement>` is deprecated when using " + "`v7_partialHydration`, use a `HydrateFallback` component instead") : 0;\n // Only log this once on initial mount\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n let navigator = react__WEBPACK_IMPORTED_MODULE_0__.useMemo(() => {\n return {\n createHref: router.createHref,\n encodeLocation: router.encodeLocation,\n go: n => router.navigate(n),\n push: (to, state, opts) => router.navigate(to, {\n state,\n preventScrollReset: opts == null ? void 0 : opts.preventScrollReset\n }),\n replace: (to, state, opts) => router.navigate(to, {\n replace: true,\n state,\n preventScrollReset: opts == null ? void 0 : opts.preventScrollReset\n })\n };\n }, [router]);\n let basename = router.basename || "/";\n let dataRouterContext = react__WEBPACK_IMPORTED_MODULE_0__.useMemo(() => ({\n router,\n navigator,\n static: false,\n basename\n }), [router, navigator, basename]);\n\n // The fragment and {null} here are important! We need them to keep React 18\'s\n // useId happy when we are server-rendering since we may have a <script> here\n // containing the hydrated server-side staticContext (from StaticRouterProvider).\n // useId relies on the component tree structure to generate deterministic id\'s\n // so we need to ensure it remains the same on the client even though\n // we don\'t need the <script> tag\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(DataRouterContext.Provider, {\n value: dataRouterContext\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(DataRouterStateContext.Provider, {\n value: state\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(Router, {\n basename: basename,\n location: state.location,\n navigationType: state.historyAction,\n navigator: navigator,\n future: {\n v7_relativeSplatPath: router.future.v7_relativeSplatPath\n }\n }, state.initialized || router.future.v7_partialHydration ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(DataRoutes, {\n routes: router.routes,\n future: router.future,\n state: state\n }) : fallbackElement))), null);\n}\nfunction DataRoutes(_ref2) {\n let {\n routes,\n future,\n state\n } = _ref2;\n return useRoutesImpl(routes, undefined, state, future);\n}\n/**\n * A `<Router>` that stores all entries in memory.\n *\n * @see https://reactrouter.com/router-components/memory-router\n */\nfunction MemoryRouter(_ref3) {\n let {\n basename,\n children,\n initialEntries,\n initialIndex,\n future\n } = _ref3;\n let historyRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef();\n if (historyRef.current == null) {\n historyRef.current = (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.createMemoryHistory)({\n initialEntries,\n initialIndex,\n v5Compat: true\n });\n }\n let history = historyRef.current;\n let [state, setStateImpl] = react__WEBPACK_IMPORTED_MODULE_0__.useState({\n action: history.action,\n location: history.location\n });\n let {\n v7_startTransition\n } = future || {};\n let setState = react__WEBPACK_IMPORTED_MODULE_0__.useCallback(newState => {\n v7_startTransition && startTransitionImpl ? startTransitionImpl(() => setStateImpl(newState)) : setStateImpl(newState);\n }, [setStateImpl, v7_startTransition]);\n react__WEBPACK_IMPORTED_MODULE_0__.useLayoutEffect(() => history.listen(setState), [history, setState]);\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(Router, {\n basename: basename,\n children: children,\n location: state.location,\n navigationType: state.action,\n navigator: history,\n future: future\n });\n}\n/**\n * Changes the current location.\n *\n * Note: This API is mostly useful in React.Component subclasses that are not\n * able to use hooks. In functional components, we recommend you use the\n * `useNavigate` hook instead.\n *\n * @see https://reactrouter.com/components/navigate\n */\nfunction Navigate(_ref4) {\n let {\n to,\n replace,\n state,\n relative\n } = _ref4;\n !useInRouterContext() ? true ? (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.UNSAFE_invariant)(false, // TODO: This error is probably because they somehow have 2 versions of\n // the router loaded. We can help them understand how to avoid that.\n "<Navigate> may be used only in the context of a <Router> component.") : 0 : void 0;\n let {\n future,\n static: isStatic\n } = react__WEBPACK_IMPORTED_MODULE_0__.useContext(NavigationContext);\n true ? (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.UNSAFE_warning)(!isStatic, "<Navigate> must not be used on the initial render in a <StaticRouter>. " + "This is a no-op, but you should modify your code so the <Navigate> is " + "only ever rendered in response to some user interaction or state change.") : 0;\n let {\n matches\n } = react__WEBPACK_IMPORTED_MODULE_0__.useContext(RouteContext);\n let {\n pathname: locationPathname\n } = useLocation();\n let navigate = useNavigate();\n\n // Resolve the path outside of the effect so that when effects run twice in\n // StrictMode they navigate to the same place\n let path = (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.resolveTo)(to, (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.UNSAFE_getResolveToMatches)(matches, future.v7_relativeSplatPath), locationPathname, relative === "path");\n let jsonPath = JSON.stringify(path);\n react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => navigate(JSON.parse(jsonPath), {\n replace,\n state,\n relative\n }), [navigate, jsonPath, relative, replace, state]);\n return null;\n}\n/**\n * Renders the child route\'s element, if there is one.\n *\n * @see https://reactrouter.com/components/outlet\n */\nfunction Outlet(props) {\n return useOutlet(props.context);\n}\n/**\n * Declares an element that should be rendered at a certain URL path.\n *\n * @see https://reactrouter.com/components/route\n */\nfunction Route(_props) {\n true ? (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.UNSAFE_invariant)(false, "A <Route> is only ever to be used as the child of <Routes> element, " + "never rendered directly. Please wrap your <Route> in a <Routes>.") : 0 ;\n}\n/**\n * Provides location context for the rest of the app.\n *\n * Note: You usually won\'t render a `<Router>` directly. Instead, you\'ll render a\n * router that is more specific to your environment such as a `<BrowserRouter>`\n * in web browsers or a `<StaticRouter>` for server rendering.\n *\n * @see https://reactrouter.com/router-components/router\n */\nfunction Router(_ref5) {\n let {\n basename: basenameProp = "/",\n children = null,\n location: locationProp,\n navigationType = _remix_run_router__WEBPACK_IMPORTED_MODULE_1__.Action.Pop,\n navigator,\n static: staticProp = false,\n future\n } = _ref5;\n !!useInRouterContext() ? true ? (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.UNSAFE_invariant)(false, "You cannot render a <Router> inside another <Router>." + " You should never have more than one in your app.") : 0 : void 0;\n\n // Preserve trailing slashes on basename, so we can let the user control\n // the enforcement of trailing slashes throughout the app\n let basename = basenameProp.replace(/^\\/*/, "/");\n let navigationContext = react__WEBPACK_IMPORTED_MODULE_0__.useMemo(() => ({\n basename,\n navigator,\n static: staticProp,\n future: _extends({\n v7_relativeSplatPath: false\n }, future)\n }), [basename, future, navigator, staticProp]);\n if (typeof locationProp === "string") {\n locationProp = (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.parsePath)(locationProp);\n }\n let {\n pathname = "/",\n search = "",\n hash = "",\n state = null,\n key = "default"\n } = locationProp;\n let locationContext = react__WEBPACK_IMPORTED_MODULE_0__.useMemo(() => {\n let trailingPathname = (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.stripBasename)(pathname, basename);\n if (trailingPathname == null) {\n return null;\n }\n return {\n location: {\n pathname: trailingPathname,\n search,\n hash,\n state,\n key\n },\n navigationType\n };\n }, [basename, pathname, search, hash, state, key, navigationType]);\n true ? (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.UNSAFE_warning)(locationContext != null, "<Router basename=\\"" + basename + "\\"> is not able to match the URL " + ("\\"" + pathname + search + hash + "\\" because it does not start with the ") + "basename, so the <Router> won\'t render anything.") : 0;\n if (locationContext == null) {\n return null;\n }\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(NavigationContext.Provider, {\n value: navigationContext\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(LocationContext.Provider, {\n children: children,\n value: locationContext\n }));\n}\n/**\n * A container for a nested tree of `<Route>` elements that renders the branch\n * that best matches the current location.\n *\n * @see https://reactrouter.com/components/routes\n */\nfunction Routes(_ref6) {\n let {\n children,\n location\n } = _ref6;\n return useRoutes(createRoutesFromChildren(children), location);\n}\n/**\n * Component to use for rendering lazily loaded data from returning defer()\n * in a loader function\n */\nfunction Await(_ref7) {\n let {\n children,\n errorElement,\n resolve\n } = _ref7;\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(AwaitErrorBoundary, {\n resolve: resolve,\n errorElement: errorElement\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(ResolveAwait, null, children));\n}\nvar AwaitRenderStatus = /*#__PURE__*/function (AwaitRenderStatus) {\n AwaitRenderStatus[AwaitRenderStatus["pending"] = 0] = "pending";\n AwaitRenderStatus[AwaitRenderStatus["success"] = 1] = "success";\n AwaitRenderStatus[AwaitRenderStatus["error"] = 2] = "error";\n return AwaitRenderStatus;\n}(AwaitRenderStatus || {});\nconst neverSettledPromise = new Promise(() => {});\nclass AwaitErrorBoundary extends react__WEBPACK_IMPORTED_MODULE_0__.Component {\n constructor(props) {\n super(props);\n this.state = {\n error: null\n };\n }\n static getDerivedStateFromError(error) {\n return {\n error\n };\n }\n componentDidCatch(error, errorInfo) {\n console.error("<Await> caught the following error during render", error, errorInfo);\n }\n render() {\n let {\n children,\n errorElement,\n resolve\n } = this.props;\n let promise = null;\n let status = AwaitRenderStatus.pending;\n if (!(resolve instanceof Promise)) {\n // Didn\'t get a promise - provide as a resolved promise\n status = AwaitRenderStatus.success;\n promise = Promise.resolve();\n Object.defineProperty(promise, "_tracked", {\n get: () => true\n });\n Object.defineProperty(promise, "_data", {\n get: () => resolve\n });\n } else if (this.state.error) {\n // Caught a render error, provide it as a rejected promise\n status = AwaitRenderStatus.error;\n let renderError = this.state.error;\n promise = Promise.reject().catch(() => {}); // Avoid unhandled rejection warnings\n Object.defineProperty(promise, "_tracked", {\n get: () => true\n });\n Object.defineProperty(promise, "_error", {\n get: () => renderError\n });\n } else if (resolve._tracked) {\n // Already tracked promise - check contents\n promise = resolve;\n status = "_error" in promise ? AwaitRenderStatus.error : "_data" in promise ? AwaitRenderStatus.success : AwaitRenderStatus.pending;\n } else {\n // Raw (untracked) promise - track it\n status = AwaitRenderStatus.pending;\n Object.defineProperty(resolve, "_tracked", {\n get: () => true\n });\n promise = resolve.then(data => Object.defineProperty(resolve, "_data", {\n get: () => data\n }), error => Object.defineProperty(resolve, "_error", {\n get: () => error\n }));\n }\n if (status === AwaitRenderStatus.error && promise._error instanceof _remix_run_router__WEBPACK_IMPORTED_MODULE_1__.AbortedDeferredError) {\n // Freeze the UI by throwing a never resolved promise\n throw neverSettledPromise;\n }\n if (status === AwaitRenderStatus.error && !errorElement) {\n // No errorElement, throw to the nearest route-level error boundary\n throw promise._error;\n }\n if (status === AwaitRenderStatus.error) {\n // Render via our errorElement\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(AwaitContext.Provider, {\n value: promise,\n children: errorElement\n });\n }\n if (status === AwaitRenderStatus.success) {\n // Render children with resolved value\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(AwaitContext.Provider, {\n value: promise,\n children: children\n });\n }\n\n // Throw to the suspense boundary\n throw promise;\n }\n}\n\n/**\n * @private\n * Indirection to leverage useAsyncValue for a render-prop API on `<Await>`\n */\nfunction ResolveAwait(_ref8) {\n let {\n children\n } = _ref8;\n let data = useAsyncValue();\n let toRender = typeof children === "function" ? children(data) : children;\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, toRender);\n}\n\n///////////////////////////////////////////////////////////////////////////////\n// UTILS\n///////////////////////////////////////////////////////////////////////////////\n\n/**\n * Creates a route config from a React "children" object, which is usually\n * either a `<Route>` element or an array of them. Used internally by\n * `<Routes>` to create a route config from its children.\n *\n * @see https://reactrouter.com/utils/create-routes-from-children\n */\nfunction createRoutesFromChildren(children, parentPath) {\n if (parentPath === void 0) {\n parentPath = [];\n }\n let routes = [];\n react__WEBPACK_IMPORTED_MODULE_0__.Children.forEach(children, (element, index) => {\n if (! /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.isValidElement(element)) {\n // Ignore non-elements. This allows people to more easily inline\n // conditionals in their route config.\n return;\n }\n let treePath = [...parentPath, index];\n if (element.type === react__WEBPACK_IMPORTED_MODULE_0__.Fragment) {\n // Transparently support React.Fragment and its children.\n routes.push.apply(routes, createRoutesFromChildren(element.props.children, treePath));\n return;\n }\n !(element.type === Route) ? true ? (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.UNSAFE_invariant)(false, "[" + (typeof element.type === "string" ? element.type : element.type.name) + "] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>") : 0 : void 0;\n !(!element.props.index || !element.props.children) ? true ? (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.UNSAFE_invariant)(false, "An index route cannot have child routes.") : 0 : void 0;\n let route = {\n id: element.props.id || treePath.join("-"),\n caseSensitive: element.props.caseSensitive,\n element: element.props.element,\n Component: element.props.Component,\n index: element.props.index,\n path: element.props.path,\n loader: element.props.loader,\n action: element.props.action,\n errorElement: element.props.errorElement,\n ErrorBoundary: element.props.ErrorBoundary,\n hasErrorBoundary: element.props.ErrorBoundary != null || element.props.errorElement != null,\n shouldRevalidate: element.props.shouldRevalidate,\n handle: element.props.handle,\n lazy: element.props.lazy\n };\n if (element.props.children) {\n route.children = createRoutesFromChildren(element.props.children, treePath);\n }\n routes.push(route);\n });\n return routes;\n}\n\n/**\n * Renders the result of `matchRoutes()` into a React element.\n */\nfunction renderMatches(matches) {\n return _renderMatches(matches);\n}\n\nfunction mapRouteProperties(route) {\n let updates = {\n // Note: this check also occurs in createRoutesFromChildren so update\n // there if you change this -- please and thank you!\n hasErrorBoundary: route.ErrorBoundary != null || route.errorElement != null\n };\n if (route.Component) {\n if (true) {\n if (route.element) {\n true ? (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.UNSAFE_warning)(false, "You should not include both `Component` and `element` on your route - " + "`Component` will be used.") : 0;\n }\n }\n Object.assign(updates, {\n element: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(route.Component),\n Component: undefined\n });\n }\n if (route.HydrateFallback) {\n if (true) {\n if (route.hydrateFallbackElement) {\n true ? (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.UNSAFE_warning)(false, "You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - " + "`HydrateFallback` will be used.") : 0;\n }\n }\n Object.assign(updates, {\n hydrateFallbackElement: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(route.HydrateFallback),\n HydrateFallback: undefined\n });\n }\n if (route.ErrorBoundary) {\n if (true) {\n if (route.errorElement) {\n true ? (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.UNSAFE_warning)(false, "You should not include both `ErrorBoundary` and `errorElement` on your route - " + "`ErrorBoundary` will be used.") : 0;\n }\n }\n Object.assign(updates, {\n errorElement: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(route.ErrorBoundary),\n ErrorBoundary: undefined\n });\n }\n return updates;\n}\nfunction createMemoryRouter(routes, opts) {\n return (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.createRouter)({\n basename: opts == null ? void 0 : opts.basename,\n future: _extends({}, opts == null ? void 0 : opts.future, {\n v7_prependBasename: true\n }),\n history: (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.createMemoryHistory)({\n initialEntries: opts == null ? void 0 : opts.initialEntries,\n initialIndex: opts == null ? void 0 : opts.initialIndex\n }),\n hydrationData: opts == null ? void 0 : opts.hydrationData,\n routes,\n mapRouteProperties,\n unstable_dataStrategy: opts == null ? void 0 : opts.unstable_dataStrategy,\n unstable_patchRoutesOnMiss: opts == null ? void 0 : opts.unstable_patchRoutesOnMiss\n }).initialize();\n}\n\n\n//# sourceMappingURL=index.js.map\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/react-router/dist/index.js?', + ); + + /***/ + }, + + /***/ 2098: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + 'use strict'; + eval( + "\n\nfunction _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }\n\nvar React = __webpack_require__(6540);\nvar React__default = _interopDefault(React);\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n}\n\nvar canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);\nfunction withSideEffect(reducePropsToState, handleStateChangeOnClient, mapStateOnServer) {\n if (typeof reducePropsToState !== 'function') {\n throw new Error('Expected reducePropsToState to be a function.');\n }\n\n if (typeof handleStateChangeOnClient !== 'function') {\n throw new Error('Expected handleStateChangeOnClient to be a function.');\n }\n\n if (typeof mapStateOnServer !== 'undefined' && typeof mapStateOnServer !== 'function') {\n throw new Error('Expected mapStateOnServer to either be undefined or a function.');\n }\n\n function getDisplayName(WrappedComponent) {\n return WrappedComponent.displayName || WrappedComponent.name || 'Component';\n }\n\n return function wrap(WrappedComponent) {\n if (typeof WrappedComponent !== 'function') {\n throw new Error('Expected WrappedComponent to be a React component.');\n }\n\n var mountedInstances = [];\n var state;\n\n function emitChange() {\n state = reducePropsToState(mountedInstances.map(function (instance) {\n return instance.props;\n }));\n\n if (SideEffect.canUseDOM) {\n handleStateChangeOnClient(state);\n } else if (mapStateOnServer) {\n state = mapStateOnServer(state);\n }\n }\n\n var SideEffect =\n /*#__PURE__*/\n function (_PureComponent) {\n _inheritsLoose(SideEffect, _PureComponent);\n\n function SideEffect() {\n return _PureComponent.apply(this, arguments) || this;\n }\n\n // Try to use displayName of wrapped component\n // Expose canUseDOM so tests can monkeypatch it\n SideEffect.peek = function peek() {\n return state;\n };\n\n SideEffect.rewind = function rewind() {\n if (SideEffect.canUseDOM) {\n throw new Error('You may only call rewind() on the server. Call peek() to read the current state.');\n }\n\n var recordedState = state;\n state = undefined;\n mountedInstances = [];\n return recordedState;\n };\n\n var _proto = SideEffect.prototype;\n\n _proto.UNSAFE_componentWillMount = function UNSAFE_componentWillMount() {\n mountedInstances.push(this);\n emitChange();\n };\n\n _proto.componentDidUpdate = function componentDidUpdate() {\n emitChange();\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n var index = mountedInstances.indexOf(this);\n mountedInstances.splice(index, 1);\n emitChange();\n };\n\n _proto.render = function render() {\n return React__default.createElement(WrappedComponent, this.props);\n };\n\n return SideEffect;\n }(React.PureComponent);\n\n _defineProperty(SideEffect, \"displayName\", \"SideEffect(\" + getDisplayName(WrappedComponent) + \")\");\n\n _defineProperty(SideEffect, \"canUseDOM\", canUseDOM);\n\n return SideEffect;\n };\n}\n\nmodule.exports = withSideEffect;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/react-side-effect/lib/index.js?", + ); + + /***/ + }, + + /***/ 4837: /***/ (module, exports, __webpack_require__) => { + 'use strict'; + eval( + "/* module decorator */ module = __webpack_require__.nmd(module);\n/**\n * @license React\n * react.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\nif (true) {\n (function() {\n\n 'use strict';\n\n/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\nif (\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart ===\n 'function'\n) {\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());\n}\n var ReactVersion = '18.3.0-canary-670811593-20240322';\n\n// ATTENTION\n// When adding new symbols to this file,\n// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'\n// The Symbol used to tag the ReactElement-like types.\nvar REACT_ELEMENT_TYPE = Symbol.for('react.element');\nvar REACT_PORTAL_TYPE = Symbol.for('react.portal');\nvar REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');\nvar REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');\nvar REACT_PROFILER_TYPE = Symbol.for('react.profiler');\nvar REACT_PROVIDER_TYPE = Symbol.for('react.provider'); // TODO: Delete with enableRenderableContext\n\nvar REACT_CONSUMER_TYPE = Symbol.for('react.consumer');\nvar REACT_CONTEXT_TYPE = Symbol.for('react.context');\nvar REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');\nvar REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');\nvar REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');\nvar REACT_MEMO_TYPE = Symbol.for('react.memo');\nvar REACT_LAZY_TYPE = Symbol.for('react.lazy');\nvar REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');\nvar REACT_CACHE_TYPE = Symbol.for('react.cache');\nvar MAYBE_ITERATOR_SYMBOL = Symbol.iterator;\nvar FAUX_ITERATOR_SYMBOL = '@@iterator';\nfunction getIteratorFn(maybeIterable) {\n if (maybeIterable === null || typeof maybeIterable !== 'object') {\n return null;\n }\n\n var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];\n\n if (typeof maybeIterator === 'function') {\n return maybeIterator;\n }\n\n return null;\n}\n\n/**\n * Keeps track of the current dispatcher.\n */\nvar ReactCurrentDispatcher$1 = {\n current: null\n};\n\n/**\n * Keeps track of the current Cache dispatcher.\n */\nvar ReactCurrentCache = {\n current: null\n};\n\n/**\n * Keeps track of the current batch's configuration such as how long an update\n * should suspend for if it needs to.\n */\nvar ReactCurrentBatchConfig = {\n transition: null\n};\n\nvar ReactCurrentActQueue = {\n current: null,\n // Used to reproduce behavior of `batchedUpdates` in legacy mode.\n isBatchingLegacy: false,\n didScheduleLegacyUpdate: false,\n // Tracks whether something called `use` during the current batch of work.\n // Determines whether we should yield to microtasks to unwrap already resolved\n // promises without suspending.\n didUsePromise: false\n};\n\n/**\n * Keeps track of the current owner.\n *\n * The current owner is the component who should own any components that are\n * currently being constructed.\n */\nvar ReactCurrentOwner$1 = {\n /**\n * @internal\n * @type {ReactComponent}\n */\n current: null\n};\n\nvar ReactDebugCurrentFrame$1 = {};\nvar currentExtraStackFrame = null;\n\n{\n ReactDebugCurrentFrame$1.setExtraStackFrame = function (stack) {\n {\n currentExtraStackFrame = stack;\n }\n }; // Stack implementation injected by the current renderer.\n\n\n ReactDebugCurrentFrame$1.getCurrentStack = null;\n\n ReactDebugCurrentFrame$1.getStackAddendum = function () {\n var stack = ''; // Add an extra top frame while an element is being validated\n\n if (currentExtraStackFrame) {\n stack += currentExtraStackFrame;\n } // Delegate to the injected renderer-specific implementation\n\n\n var impl = ReactDebugCurrentFrame$1.getCurrentStack;\n\n if (impl) {\n stack += impl() || '';\n }\n\n return stack;\n };\n}\n\nvar ReactSharedInternals = {\n ReactCurrentDispatcher: ReactCurrentDispatcher$1,\n ReactCurrentCache: ReactCurrentCache,\n ReactCurrentBatchConfig: ReactCurrentBatchConfig,\n ReactCurrentOwner: ReactCurrentOwner$1\n};\n\n{\n ReactSharedInternals.ReactDebugCurrentFrame = ReactDebugCurrentFrame$1;\n ReactSharedInternals.ReactCurrentActQueue = ReactCurrentActQueue;\n}\n\n// by calls to these methods by a Babel plugin.\n//\n// In PROD (or in packages without access to React internals),\n// they are left as they are instead.\n\nfunction warn(format) {\n {\n {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n printWarning('warn', format, args);\n }\n }\n}\nfunction error(format) {\n {\n {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n printWarning('error', format, args);\n }\n }\n}\n\nfunction printWarning(level, format, args) {\n // When changing this logic, you might want to also\n // update consoleWithStackDev.www.js as well.\n {\n var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n var stack = ReactDebugCurrentFrame.getStackAddendum();\n\n if (stack !== '') {\n format += '%s';\n args = args.concat([stack]);\n } // eslint-disable-next-line react-internal/safe-string-coercion\n\n\n var argsWithFormat = args.map(function (item) {\n return String(item);\n }); // Careful: RN currently depends on this prefix\n\n argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it\n // breaks IE9: https://github.com/facebook/react/issues/13610\n // eslint-disable-next-line react-internal/no-production-logging\n\n Function.prototype.apply.call(console[level], console, argsWithFormat);\n }\n}\n\nvar didWarnStateUpdateForUnmountedComponent = {};\n\nfunction warnNoop(publicInstance, callerName) {\n {\n var _constructor = publicInstance.constructor;\n var componentName = _constructor && (_constructor.displayName || _constructor.name) || 'ReactClass';\n var warningKey = componentName + \".\" + callerName;\n\n if (didWarnStateUpdateForUnmountedComponent[warningKey]) {\n return;\n }\n\n error(\"Can't call %s on a component that is not yet mounted. \" + 'This is a no-op, but it might indicate a bug in your application. ' + 'Instead, assign to `this.state` directly or define a `state = {};` ' + 'class property with the desired state in the %s component.', callerName, componentName);\n\n didWarnStateUpdateForUnmountedComponent[warningKey] = true;\n }\n}\n/**\n * This is the abstract API for an update queue.\n */\n\n\nvar ReactNoopUpdateQueue = {\n /**\n * Checks whether or not this composite component is mounted.\n * @param {ReactClass} publicInstance The instance we want to test.\n * @return {boolean} True if mounted, false otherwise.\n * @protected\n * @final\n */\n isMounted: function (publicInstance) {\n return false;\n },\n\n /**\n * Forces an update. This should only be invoked when it is known with\n * certainty that we are **not** in a DOM transaction.\n *\n * You may want to call this when you know that some deeper aspect of the\n * component's state has changed but `setState` was not called.\n *\n * This will not invoke `shouldComponentUpdate`, but it will invoke\n * `componentWillUpdate` and `componentDidUpdate`.\n *\n * @param {ReactClass} publicInstance The instance that should rerender.\n * @param {?function} callback Called after component is updated.\n * @param {?string} callerName name of the calling function in the public API.\n * @internal\n */\n enqueueForceUpdate: function (publicInstance, callback, callerName) {\n warnNoop(publicInstance, 'forceUpdate');\n },\n\n /**\n * Replaces all of the state. Always use this or `setState` to mutate state.\n * You should treat `this.state` as immutable.\n *\n * There is no guarantee that `this.state` will be immediately updated, so\n * accessing `this.state` after calling this method may return the old value.\n *\n * @param {ReactClass} publicInstance The instance that should rerender.\n * @param {object} completeState Next state.\n * @param {?function} callback Called after component is updated.\n * @param {?string} callerName name of the calling function in the public API.\n * @internal\n */\n enqueueReplaceState: function (publicInstance, completeState, callback, callerName) {\n warnNoop(publicInstance, 'replaceState');\n },\n\n /**\n * Sets a subset of the state. This only exists because _pendingState is\n * internal. This provides a merging strategy that is not available to deep\n * properties which is confusing. TODO: Expose pendingState or don't use it\n * during the merge.\n *\n * @param {ReactClass} publicInstance The instance that should rerender.\n * @param {object} partialState Next partial state to be merged with state.\n * @param {?function} callback Called after component is updated.\n * @param {?string} Name of the calling function in the public API.\n * @internal\n */\n enqueueSetState: function (publicInstance, partialState, callback, callerName) {\n warnNoop(publicInstance, 'setState');\n }\n};\n\nvar assign = Object.assign;\n\nvar emptyObject = {};\n\n{\n Object.freeze(emptyObject);\n}\n/**\n * Base class helpers for the updating state of a component.\n */\n\n\nfunction Component(props, context, updater) {\n this.props = props;\n this.context = context; // If a component has string refs, we will assign a different object later.\n\n this.refs = emptyObject; // We initialize the default updater but the real one gets injected by the\n // renderer.\n\n this.updater = updater || ReactNoopUpdateQueue;\n}\n\nComponent.prototype.isReactComponent = {};\n/**\n * Sets a subset of the state. Always use this to mutate\n * state. You should treat `this.state` as immutable.\n *\n * There is no guarantee that `this.state` will be immediately updated, so\n * accessing `this.state` after calling this method may return the old value.\n *\n * There is no guarantee that calls to `setState` will run synchronously,\n * as they may eventually be batched together. You can provide an optional\n * callback that will be executed when the call to setState is actually\n * completed.\n *\n * When a function is provided to setState, it will be called at some point in\n * the future (not synchronously). It will be called with the up to date\n * component arguments (state, props, context). These values can be different\n * from this.* because your function may be called after receiveProps but before\n * shouldComponentUpdate, and this new state, props, and context will not yet be\n * assigned to this.\n *\n * @param {object|function} partialState Next partial state or function to\n * produce next partial state to be merged with current state.\n * @param {?function} callback Called after state is updated.\n * @final\n * @protected\n */\n\nComponent.prototype.setState = function (partialState, callback) {\n if (typeof partialState !== 'object' && typeof partialState !== 'function' && partialState != null) {\n throw new Error('takes an object of state variables to update or a ' + 'function which returns an object of state variables.');\n }\n\n this.updater.enqueueSetState(this, partialState, callback, 'setState');\n};\n/**\n * Forces an update. This should only be invoked when it is known with\n * certainty that we are **not** in a DOM transaction.\n *\n * You may want to call this when you know that some deeper aspect of the\n * component's state has changed but `setState` was not called.\n *\n * This will not invoke `shouldComponentUpdate`, but it will invoke\n * `componentWillUpdate` and `componentDidUpdate`.\n *\n * @param {?function} callback Called after update is complete.\n * @final\n * @protected\n */\n\n\nComponent.prototype.forceUpdate = function (callback) {\n this.updater.enqueueForceUpdate(this, callback, 'forceUpdate');\n};\n/**\n * Deprecated APIs. These APIs used to exist on classic React classes but since\n * we would like to deprecate them, we're not going to move them over to this\n * modern base class. Instead, we define a getter that warns if it's accessed.\n */\n\n\n{\n var deprecatedAPIs = {\n isMounted: ['isMounted', 'Instead, make sure to clean up subscriptions and pending requests in ' + 'componentWillUnmount to prevent memory leaks.'],\n replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).']\n };\n\n var defineDeprecationWarning = function (methodName, info) {\n Object.defineProperty(Component.prototype, methodName, {\n get: function () {\n warn('%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]);\n\n return undefined;\n }\n });\n };\n\n for (var fnName in deprecatedAPIs) {\n if (deprecatedAPIs.hasOwnProperty(fnName)) {\n defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);\n }\n }\n}\n\nfunction ComponentDummy() {}\n\nComponentDummy.prototype = Component.prototype;\n/**\n * Convenience component with default shallow equality check for sCU.\n */\n\nfunction PureComponent(props, context, updater) {\n this.props = props;\n this.context = context; // If a component has string refs, we will assign a different object later.\n\n this.refs = emptyObject;\n this.updater = updater || ReactNoopUpdateQueue;\n}\n\nvar pureComponentPrototype = PureComponent.prototype = new ComponentDummy();\npureComponentPrototype.constructor = PureComponent; // Avoid an extra prototype jump for these methods.\n\nassign(pureComponentPrototype, Component.prototype);\npureComponentPrototype.isPureReactComponent = true;\n\n// an immutable object with a single mutable value\nfunction createRef() {\n var refObject = {\n current: null\n };\n\n {\n Object.seal(refObject);\n }\n\n return refObject;\n}\n\nvar isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare\n\nfunction isArray(a) {\n return isArrayImpl(a);\n}\n\n// -----------------------------------------------------------------------------\n\nvar enableScopeAPI = false; // Experimental Create Event Handle API.\nvar enableCacheElement = false;\nvar enableTransitionTracing = false; // No known bugs, but needs performance testing\n\nvar enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber\nvar enableRenderableContext = false;\n// Ready for next major.\n//\n// Alias __NEXT_MAJOR__ to false for easier skimming.\n// -----------------------------------------------------------------------------\n\nvar __NEXT_MAJOR__ = false; // Removes legacy style context\n// as a normal prop instead of stripping it from the props object.\n// Passes `ref` as a normal prop instead of stripping it from the props object\n// during element creation.\n\nvar enableRefAsProp = __NEXT_MAJOR__;\n// stuff. Intended to enable React core members to more easily debug scheduling\n// issues in DEV builds.\n\nvar enableDebugTracing = false;\n\n/*\n * The `'' + value` pattern (used in perf-sensitive code) throws for Symbol\n * and Temporal.* types. See https://github.com/facebook/react/pull/22064.\n *\n * The functions in this module will throw an easier-to-understand,\n * easier-to-debug exception with a clear errors message message explaining the\n * problem. (Instead of a confusing exception thrown inside the implementation\n * of the `value` object).\n */\n// $FlowFixMe[incompatible-return] only called in DEV, so void return is not possible.\nfunction typeName(value) {\n {\n // toStringTag is needed for namespaced types like Temporal.Instant\n var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;\n var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object'; // $FlowFixMe[incompatible-return]\n\n return type;\n }\n} // $FlowFixMe[incompatible-return] only called in DEV, so void return is not possible.\n\n\nfunction willCoercionThrow(value) {\n {\n try {\n testStringCoercion(value);\n return false;\n } catch (e) {\n return true;\n }\n }\n}\n\nfunction testStringCoercion(value) {\n // If you ended up here by following an exception call stack, here's what's\n // happened: you supplied an object or symbol value to React (as a prop, key,\n // DOM attribute, CSS property, string ref, etc.) and when React tried to\n // coerce it to a string using `'' + value`, an exception was thrown.\n //\n // The most common types that will cause this exception are `Symbol` instances\n // and Temporal objects like `Temporal.Instant`. But any object that has a\n // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this\n // exception. (Library authors do this to prevent users from using built-in\n // numeric operators like `+` or comparison operators like `>=` because custom\n // methods are needed to perform accurate arithmetic or comparison.)\n //\n // To fix the problem, coerce this object or symbol value to a string before\n // passing it to React. The most reliable way is usually `String(value)`.\n //\n // To find which value is throwing, check the browser or debugger console.\n // Before this exception was thrown, there should be `console.error` output\n // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the\n // problem and how that type was used: key, atrribute, input value prop, etc.\n // In most cases, this console output also shows the component and its\n // ancestor components where the exception happened.\n //\n // eslint-disable-next-line react-internal/safe-string-coercion\n return '' + value;\n}\nfunction checkKeyStringCoercion(value) {\n {\n if (willCoercionThrow(value)) {\n error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before using it here.', typeName(value));\n\n return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n }\n }\n}\n\nfunction getWrappedName(outerType, innerType, wrapperName) {\n var displayName = outerType.displayName;\n\n if (displayName) {\n return displayName;\n }\n\n var functionName = innerType.displayName || innerType.name || '';\n return functionName !== '' ? wrapperName + \"(\" + functionName + \")\" : wrapperName;\n} // Keep in sync with react-reconciler/getComponentNameFromFiber\n\n\nfunction getContextName(type) {\n return type.displayName || 'Context';\n}\n\nvar REACT_CLIENT_REFERENCE$2 = Symbol.for('react.client.reference'); // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead.\n\nfunction getComponentNameFromType(type) {\n if (type == null) {\n // Host root, text node or just invalid type.\n return null;\n }\n\n if (typeof type === 'function') {\n if (type.$$typeof === REACT_CLIENT_REFERENCE$2) {\n // TODO: Create a convention for naming client references with debug info.\n return null;\n }\n\n return type.displayName || type.name || null;\n }\n\n if (typeof type === 'string') {\n return type;\n }\n\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return 'Fragment';\n\n case REACT_PORTAL_TYPE:\n return 'Portal';\n\n case REACT_PROFILER_TYPE:\n return 'Profiler';\n\n case REACT_STRICT_MODE_TYPE:\n return 'StrictMode';\n\n case REACT_SUSPENSE_TYPE:\n return 'Suspense';\n\n case REACT_SUSPENSE_LIST_TYPE:\n return 'SuspenseList';\n\n case REACT_CACHE_TYPE:\n {\n return 'Cache';\n }\n\n }\n\n if (typeof type === 'object') {\n {\n if (typeof type.tag === 'number') {\n error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.');\n }\n }\n\n switch (type.$$typeof) {\n case REACT_PROVIDER_TYPE:\n {\n var provider = type;\n return getContextName(provider._context) + '.Provider';\n }\n\n case REACT_CONTEXT_TYPE:\n var context = type;\n\n {\n return getContextName(context) + '.Consumer';\n }\n\n case REACT_CONSUMER_TYPE:\n {\n return null;\n }\n\n case REACT_FORWARD_REF_TYPE:\n return getWrappedName(type, type.render, 'ForwardRef');\n\n case REACT_MEMO_TYPE:\n var outerName = type.displayName || null;\n\n if (outerName !== null) {\n return outerName;\n }\n\n return getComponentNameFromType(type.type) || 'Memo';\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n return getComponentNameFromType(init(payload));\n } catch (x) {\n return null;\n }\n }\n }\n }\n\n return null;\n}\n\n// $FlowFixMe[method-unbinding]\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nvar REACT_CLIENT_REFERENCE$1 = Symbol.for('react.client.reference');\nfunction isValidElementType(type) {\n if (typeof type === 'string' || typeof type === 'function') {\n return true;\n } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).\n\n\n if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing ) {\n return true;\n }\n\n if (typeof type === 'object' && type !== null) {\n if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || enableRenderableContext || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object\n // types supported by any Flight configuration anywhere since\n // we don't know which Flight build this will end up being used\n // with.\n type.$$typeof === REACT_CLIENT_REFERENCE$1 || type.getModuleId !== undefined) {\n return true;\n }\n }\n\n return false;\n}\n\n// Helpers to patch console.logs to avoid logging during side-effect free\n// replaying on render function. This currently only patches the object\n// lazily which won't cover if the log function was extracted eagerly.\n// We could also eagerly patch the method.\nvar disabledDepth = 0;\nvar prevLog;\nvar prevInfo;\nvar prevWarn;\nvar prevError;\nvar prevGroup;\nvar prevGroupCollapsed;\nvar prevGroupEnd;\n\nfunction disabledLog() {}\n\ndisabledLog.__reactDisabledLog = true;\nfunction disableLogs() {\n {\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n prevLog = console.log;\n prevInfo = console.info;\n prevWarn = console.warn;\n prevError = console.error;\n prevGroup = console.group;\n prevGroupCollapsed = console.groupCollapsed;\n prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099\n\n var props = {\n configurable: true,\n enumerable: true,\n value: disabledLog,\n writable: true\n }; // $FlowFixMe[cannot-write] Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n info: props,\n log: props,\n warn: props,\n error: props,\n group: props,\n groupCollapsed: props,\n groupEnd: props\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n disabledDepth++;\n }\n}\nfunction reenableLogs() {\n {\n disabledDepth--;\n\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n var props = {\n configurable: true,\n enumerable: true,\n writable: true\n }; // $FlowFixMe[cannot-write] Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n log: assign({}, props, {\n value: prevLog\n }),\n info: assign({}, props, {\n value: prevInfo\n }),\n warn: assign({}, props, {\n value: prevWarn\n }),\n error: assign({}, props, {\n value: prevError\n }),\n group: assign({}, props, {\n value: prevGroup\n }),\n groupCollapsed: assign({}, props, {\n value: prevGroupCollapsed\n }),\n groupEnd: assign({}, props, {\n value: prevGroupEnd\n })\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n if (disabledDepth < 0) {\n error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');\n }\n }\n}\n\nvar ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;\nvar prefix;\nfunction describeBuiltInComponentFrame(name, ownerFn) {\n {\n if (prefix === undefined) {\n // Extract the VM specific prefix used by each line.\n try {\n throw Error();\n } catch (x) {\n var match = x.stack.trim().match(/\\n( *(at )?)/);\n prefix = match && match[1] || '';\n }\n } // We use the prefix to ensure our stacks line up with native stack frames.\n\n\n return '\\n' + prefix + name;\n }\n}\nvar reentry = false;\nvar componentFrameCache;\n\n{\n var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;\n componentFrameCache = new PossiblyWeakMap();\n}\n/**\n * Leverages native browser/VM stack frames to get proper details (e.g.\n * filename, line + col number) for a single component in a component stack. We\n * do this by:\n * (1) throwing and catching an error in the function - this will be our\n * control error.\n * (2) calling the component which will eventually throw an error that we'll\n * catch - this will be our sample error.\n * (3) diffing the control and sample error stacks to find the stack frame\n * which represents our component.\n */\n\n\nfunction describeNativeComponentFrame(fn, construct) {\n // If something asked for a stack inside a fake render, it should get ignored.\n if (!fn || reentry) {\n return '';\n }\n\n {\n var frame = componentFrameCache.get(fn);\n\n if (frame !== undefined) {\n return frame;\n }\n }\n\n reentry = true;\n var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe[incompatible-type] It does accept undefined.\n\n Error.prepareStackTrace = undefined;\n var previousDispatcher;\n\n {\n previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function\n // for warnings.\n\n ReactCurrentDispatcher.current = null;\n disableLogs();\n }\n /**\n * Finding a common stack frame between sample and control errors can be\n * tricky given the different types and levels of stack trace truncation from\n * different JS VMs. So instead we'll attempt to control what that common\n * frame should be through this object method:\n * Having both the sample and control errors be in the function under the\n * `DescribeNativeComponentFrameRoot` property, + setting the `name` and\n * `displayName` properties of the function ensures that a stack\n * frame exists that has the method name `DescribeNativeComponentFrameRoot` in\n * it for both control and sample stacks.\n */\n\n\n var RunInRootFrame = {\n DetermineComponentFrameRoot: function () {\n var control;\n\n try {\n // This should throw.\n if (construct) {\n // Something should be setting the props in the constructor.\n var Fake = function () {\n throw Error();\n }; // $FlowFixMe[prop-missing]\n\n\n Object.defineProperty(Fake.prototype, 'props', {\n set: function () {\n // We use a throwing setter instead of frozen or non-writable props\n // because that won't throw in a non-strict mode function.\n throw Error();\n }\n });\n\n if (typeof Reflect === 'object' && Reflect.construct) {\n // We construct a different control for this case to include any extra\n // frames added by the construct call.\n try {\n Reflect.construct(Fake, []);\n } catch (x) {\n control = x;\n }\n\n Reflect.construct(fn, [], Fake);\n } else {\n try {\n Fake.call();\n } catch (x) {\n control = x;\n } // $FlowFixMe[prop-missing] found when upgrading Flow\n\n\n fn.call(Fake.prototype);\n }\n } else {\n try {\n throw Error();\n } catch (x) {\n control = x;\n } // TODO(luna): This will currently only throw if the function component\n // tries to access React/ReactDOM/props. We should probably make this throw\n // in simple components too\n\n\n var maybePromise = fn(); // If the function component returns a promise, it's likely an async\n // component, which we don't yet support. Attach a noop catch handler to\n // silence the error.\n // TODO: Implement component stacks for async client components?\n\n if (maybePromise && typeof maybePromise.catch === 'function') {\n maybePromise.catch(function () {});\n }\n }\n } catch (sample) {\n // This is inlined manually because closure doesn't do it for us.\n if (sample && control && typeof sample.stack === 'string') {\n return [sample.stack, control.stack];\n }\n }\n\n return [null, null];\n }\n }; // $FlowFixMe[prop-missing]\n\n RunInRootFrame.DetermineComponentFrameRoot.displayName = 'DetermineComponentFrameRoot';\n var namePropDescriptor = Object.getOwnPropertyDescriptor(RunInRootFrame.DetermineComponentFrameRoot, 'name'); // Before ES6, the `name` property was not configurable.\n\n if (namePropDescriptor && namePropDescriptor.configurable) {\n // V8 utilizes a function's `name` property when generating a stack trace.\n Object.defineProperty(RunInRootFrame.DetermineComponentFrameRoot, // Configurable properties can be updated even if its writable descriptor\n // is set to `false`.\n // $FlowFixMe[cannot-write]\n 'name', {\n value: 'DetermineComponentFrameRoot'\n });\n }\n\n try {\n var _RunInRootFrame$Deter = RunInRootFrame.DetermineComponentFrameRoot(),\n sampleStack = _RunInRootFrame$Deter[0],\n controlStack = _RunInRootFrame$Deter[1];\n\n if (sampleStack && controlStack) {\n // This extracts the first frame from the sample that isn't also in the control.\n // Skipping one frame that we assume is the frame that calls the two.\n var sampleLines = sampleStack.split('\\n');\n var controlLines = controlStack.split('\\n');\n var s = 0;\n var c = 0;\n\n while (s < sampleLines.length && !sampleLines[s].includes('DetermineComponentFrameRoot')) {\n s++;\n }\n\n while (c < controlLines.length && !controlLines[c].includes('DetermineComponentFrameRoot')) {\n c++;\n } // We couldn't find our intentionally injected common root frame, attempt\n // to find another common root frame by search from the bottom of the\n // control stack...\n\n\n if (s === sampleLines.length || c === controlLines.length) {\n s = sampleLines.length - 1;\n c = controlLines.length - 1;\n\n while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {\n // We expect at least one stack frame to be shared.\n // Typically this will be the root most one. However, stack frames may be\n // cut off due to maximum stack limits. In this case, one maybe cut off\n // earlier than the other. We assume that the sample is longer or the same\n // and there for cut off earlier. So we should find the root most frame in\n // the sample somewhere in the control.\n c--;\n }\n }\n\n for (; s >= 1 && c >= 0; s--, c--) {\n // Next we find the first one that isn't the same which should be the\n // frame that called our sample function and the control.\n if (sampleLines[s] !== controlLines[c]) {\n // In V8, the first line is describing the message but other VMs don't.\n // If we're about to return the first line, and the control is also on the same\n // line, that's a pretty good indicator that our sample threw at same line as\n // the control. I.e. before we entered the sample frame. So we ignore this result.\n // This can happen if you passed a class to function component, or non-function.\n if (s !== 1 || c !== 1) {\n do {\n s--;\n c--; // We may still have similar intermediate frames from the construct call.\n // The next one that isn't the same should be our match though.\n\n if (c < 0 || sampleLines[s] !== controlLines[c]) {\n // V8 adds a \"new\" prefix for native classes. Let's remove it to make it prettier.\n var _frame = '\\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled \"<anonymous>\"\n // but we have a user-provided \"displayName\"\n // splice it in to make the stack more readable.\n\n\n if (fn.displayName && _frame.includes('<anonymous>')) {\n _frame = _frame.replace('<anonymous>', fn.displayName);\n }\n\n if (true) {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, _frame);\n }\n } // Return the line we found.\n\n\n return _frame;\n }\n } while (s >= 1 && c >= 0);\n }\n\n break;\n }\n }\n }\n } finally {\n reentry = false;\n\n {\n ReactCurrentDispatcher.current = previousDispatcher;\n reenableLogs();\n }\n\n Error.prepareStackTrace = previousPrepareStackTrace;\n } // Fallback to just using the name if we couldn't make it throw.\n\n\n var name = fn ? fn.displayName || fn.name : '';\n var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';\n\n {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, syntheticFrame);\n }\n }\n\n return syntheticFrame;\n}\nfunction describeFunctionComponentFrame(fn, ownerFn) {\n {\n return describeNativeComponentFrame(fn, false);\n }\n}\n\nfunction shouldConstruct(Component) {\n var prototype = Component.prototype;\n return !!(prototype && prototype.isReactComponent);\n}\n\nfunction describeUnknownElementTypeFrameInDEV(type, ownerFn) {\n\n if (type == null) {\n return '';\n }\n\n if (typeof type === 'function') {\n {\n return describeNativeComponentFrame(type, shouldConstruct(type));\n }\n }\n\n if (typeof type === 'string') {\n return describeBuiltInComponentFrame(type);\n }\n\n switch (type) {\n case REACT_SUSPENSE_TYPE:\n return describeBuiltInComponentFrame('Suspense');\n\n case REACT_SUSPENSE_LIST_TYPE:\n return describeBuiltInComponentFrame('SuspenseList');\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_FORWARD_REF_TYPE:\n return describeFunctionComponentFrame(type.render);\n\n case REACT_MEMO_TYPE:\n // Memo may contain any component type so we recursively resolve it.\n return describeUnknownElementTypeFrameInDEV(type.type, ownerFn);\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n // Lazy may contain any component type so we recursively resolve it.\n return describeUnknownElementTypeFrameInDEV(init(payload), ownerFn);\n } catch (x) {}\n }\n }\n }\n\n return '';\n}\n\nvar ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;\nvar ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\nvar REACT_CLIENT_REFERENCE = Symbol.for('react.client.reference');\nvar specialPropKeyWarningShown;\nvar specialPropRefWarningShown;\nvar didWarnAboutStringRefs;\n\n{\n didWarnAboutStringRefs = {};\n}\n\nfunction hasValidRef(config) {\n {\n if (hasOwnProperty.call(config, 'ref')) {\n var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;\n\n if (getter && getter.isReactWarning) {\n return false;\n }\n }\n }\n\n return config.ref !== undefined;\n}\n\nfunction hasValidKey(config) {\n {\n if (hasOwnProperty.call(config, 'key')) {\n var getter = Object.getOwnPropertyDescriptor(config, 'key').get;\n\n if (getter && getter.isReactWarning) {\n return false;\n }\n }\n }\n\n return config.key !== undefined;\n}\n\nfunction warnIfStringRefCannotBeAutoConverted(config, self) {\n {\n if (typeof config.ref === 'string' && ReactCurrentOwner.current && self && ReactCurrentOwner.current.stateNode !== self) {\n var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);\n\n if (!didWarnAboutStringRefs[componentName]) {\n error('Component \"%s\" contains the string ref \"%s\". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://react.dev/link/strict-mode-string-ref', getComponentNameFromType(ReactCurrentOwner.current.type), config.ref);\n\n didWarnAboutStringRefs[componentName] = true;\n }\n }\n }\n}\n\nfunction defineKeyPropWarningGetter(props, displayName) {\n {\n var warnAboutAccessingKey = function () {\n if (!specialPropKeyWarningShown) {\n specialPropKeyWarningShown = true;\n\n error('%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://react.dev/link/special-props)', displayName);\n }\n };\n\n warnAboutAccessingKey.isReactWarning = true;\n Object.defineProperty(props, 'key', {\n get: warnAboutAccessingKey,\n configurable: true\n });\n }\n}\n\nfunction defineRefPropWarningGetter(props, displayName) {\n {\n {\n var warnAboutAccessingRef = function () {\n if (!specialPropRefWarningShown) {\n specialPropRefWarningShown = true;\n\n error('%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://react.dev/link/special-props)', displayName);\n }\n };\n\n warnAboutAccessingRef.isReactWarning = true;\n Object.defineProperty(props, 'ref', {\n get: warnAboutAccessingRef,\n configurable: true\n });\n }\n }\n}\n/**\n * Factory method to create a new React element. This no longer adheres to\n * the class pattern, so do not use new to call it. Also, instanceof check\n * will not work. Instead test $$typeof field against Symbol.for('react.element') to check\n * if something is a React Element.\n *\n * @param {*} type\n * @param {*} props\n * @param {*} key\n * @param {string|object} ref\n * @param {*} owner\n * @param {*} self A *temporary* helper to detect places where `this` is\n * different from the `owner` when React.createElement is called, so that we\n * can warn. We want to get rid of owner and replace string `ref`s with arrow\n * functions, and as long as `this` and owner are the same, there will be no\n * change in behavior.\n * @param {*} source An annotation object (added by a transpiler or otherwise)\n * indicating filename, line number, and/or other information.\n * @internal\n */\n\n\nfunction ReactElement(type, key, _ref, self, source, owner, props) {\n var ref;\n\n {\n ref = _ref;\n }\n\n var element;\n\n {\n // In prod, `ref` is a regular property. It will be removed in a\n // future release.\n element = {\n // This tag allows us to uniquely identify this as a React Element\n $$typeof: REACT_ELEMENT_TYPE,\n // Built-in properties that belong on the element\n type: type,\n key: key,\n ref: ref,\n props: props,\n // Record the component responsible for creating this element.\n _owner: owner\n };\n }\n\n {\n // The validation flag is currently mutative. We put it on\n // an external backing store so that we can freeze the whole object.\n // This can be replaced with a WeakMap once they are implemented in\n // commonly used development environments.\n element._store = {}; // To make comparing ReactElements easier for testing purposes, we make\n // the validation flag non-enumerable (where possible, which should\n // include every environment we run tests in), so the test framework\n // ignores it.\n\n Object.defineProperty(element._store, 'validated', {\n configurable: false,\n enumerable: false,\n writable: true,\n value: false\n }); // debugInfo contains Server Component debug information.\n\n Object.defineProperty(element, '_debugInfo', {\n configurable: false,\n enumerable: false,\n writable: true,\n value: null\n });\n\n if (Object.freeze) {\n Object.freeze(element.props);\n Object.freeze(element);\n }\n }\n\n return element;\n}\n/**\n * Create and return a new ReactElement of the given type.\n * See https://reactjs.org/docs/react-api.html#createelement\n */\n\nfunction createElement(type, config, children) {\n {\n if (!isValidElementType(type)) {\n // This is an invalid element type.\n //\n // We warn in this case but don't throw. We expect the element creation to\n // succeed and there will likely be errors in render.\n var info = '';\n\n if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {\n info += ' You likely forgot to export your component from the file ' + \"it's defined in, or you might have mixed up default and named imports.\";\n }\n\n var typeString;\n\n if (type === null) {\n typeString = 'null';\n } else if (isArray(type)) {\n typeString = 'array';\n } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {\n typeString = \"<\" + (getComponentNameFromType(type.type) || 'Unknown') + \" />\";\n info = ' Did you accidentally export a JSX literal instead of a component?';\n } else {\n typeString = typeof type;\n }\n\n error('React.createElement: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);\n } else {\n // This is a valid element type.\n // Skip key warning if the type isn't valid since our key validation logic\n // doesn't expect a non-string/function type and can throw confusing\n // errors. We don't want exception behavior to differ between dev and\n // prod. (Rendering will throw with a helpful message and as soon as the\n // type is fixed, the key warnings will appear.)\n for (var i = 2; i < arguments.length; i++) {\n validateChildKeys(arguments[i], type);\n }\n } // Unlike the jsx() runtime, createElement() doesn't warn about key spread.\n\n }\n\n var propName; // Reserved names are extracted\n\n var props = {};\n var key = null;\n var ref = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n {\n ref = config.ref;\n }\n\n {\n warnIfStringRefCannotBeAutoConverted(config, config.__self);\n }\n }\n\n if (hasValidKey(config)) {\n {\n checkKeyStringCoercion(config.key);\n }\n\n key = '' + config.key;\n } // Remaining properties are added to a new props object\n\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && // Skip over reserved prop names\n propName !== 'key' && (propName !== 'ref') && // Even though we don't use these anymore in the runtime, we don't want\n // them to appear as props, so in createElement we filter them out.\n // We don't have to do this in the jsx() runtime because the jsx()\n // transform never passed these as props; it used separate arguments.\n propName !== '__self' && propName !== '__source') {\n props[propName] = config[propName];\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var _i = 0; _i < childrenLength; _i++) {\n childArray[_i] = arguments[_i + 2];\n }\n\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n\n props.children = childArray;\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n {\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n\n var element = ReactElement(type, key, ref, undefined, undefined, ReactCurrentOwner.current, props);\n\n if (type === REACT_FRAGMENT_TYPE) {\n validateFragmentProps(element);\n }\n\n return element;\n}\nvar didWarnAboutDeprecatedCreateFactory = false;\n/**\n * Return a function that produces ReactElements of a given type.\n * See https://reactjs.org/docs/react-api.html#createfactory\n */\n\nfunction createFactory(type) {\n var factory = createElement.bind(null, type); // Expose the type on the factory and the prototype so that it can be\n // easily accessed on elements. E.g. `<Foo />.type === Foo`.\n // This should not be named `constructor` since this may not be the function\n // that created the element, and it may not even be a constructor.\n // Legacy hook: remove it\n\n factory.type = type;\n\n {\n if (!didWarnAboutDeprecatedCreateFactory) {\n didWarnAboutDeprecatedCreateFactory = true;\n\n warn('React.createFactory() is deprecated and will be removed in ' + 'a future major release. Consider using JSX ' + 'or use React.createElement() directly instead.');\n } // Legacy hook: remove it\n\n\n Object.defineProperty(factory, 'type', {\n enumerable: false,\n get: function () {\n warn('Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.');\n\n Object.defineProperty(this, 'type', {\n value: type\n });\n return type;\n }\n });\n }\n\n return factory;\n}\nfunction cloneAndReplaceKey(oldElement, newKey) {\n return ReactElement(oldElement.type, newKey, // When enableRefAsProp is on, this argument is ignored. This check only\n // exists to avoid the `ref` access warning.\n oldElement.ref, undefined, undefined, oldElement._owner, oldElement.props);\n}\n/**\n * Clone and return a new ReactElement using element as the starting point.\n * See https://reactjs.org/docs/react-api.html#cloneelement\n */\n\nfunction cloneElement(element, config, children) {\n if (element === null || element === undefined) {\n throw new Error(\"The argument must be a React element, but you passed \" + element + \".\");\n }\n\n var propName; // Original props are copied\n\n var props = assign({}, element.props); // Reserved names are extracted\n\n var key = element.key;\n var ref = element.ref; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n {\n // Silently steal the ref from the parent.\n ref = config.ref;\n }\n\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n {\n checkKeyStringCoercion(config.key);\n }\n\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && // Skip over reserved prop names\n propName !== 'key' && (propName !== 'ref') && // ...and maybe these, too, though we currently rely on them for\n // warnings and debug information in dev. Need to decide if we're OK\n // with dropping them. In the jsx() runtime it's not an issue because\n // the data gets passed as separate arguments instead of props, but\n // it would be nice to stop relying on them entirely so we can drop\n // them from the internal Fiber field.\n propName !== '__self' && propName !== '__source' && // Undefined `ref` is ignored by cloneElement. We treat it the same as\n // if the property were missing. This is mostly for\n // backwards compatibility.\n !(enableRefAsProp )) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n var clonedElement = ReactElement(element.type, key, ref, undefined, undefined, owner, props);\n\n for (var _i2 = 2; _i2 < arguments.length; _i2++) {\n validateChildKeys(arguments[_i2], clonedElement.type);\n }\n\n return clonedElement;\n}\n\nfunction getDeclarationErrorAddendum() {\n {\n if (ReactCurrentOwner.current) {\n var name = getComponentNameFromType(ReactCurrentOwner.current.type);\n\n if (name) {\n return '\\n\\nCheck the render method of `' + name + '`.';\n }\n }\n\n return '';\n }\n}\n/**\n * Ensure that every element either is passed in a static location, in an\n * array with an explicit keys property defined, or in an object literal\n * with valid key property.\n *\n * @internal\n * @param {ReactNode} node Statically passed child of any type.\n * @param {*} parentType node's parent's type.\n */\n\n\nfunction validateChildKeys(node, parentType) {\n {\n if (typeof node !== 'object' || !node) {\n return;\n }\n\n if (node.$$typeof === REACT_CLIENT_REFERENCE) ; else if (isArray(node)) {\n for (var i = 0; i < node.length; i++) {\n var child = node[i];\n\n if (isValidElement(child)) {\n validateExplicitKey(child, parentType);\n }\n }\n } else if (isValidElement(node)) {\n // This element was passed in a valid location.\n if (node._store) {\n node._store.validated = true;\n }\n } else {\n var iteratorFn = getIteratorFn(node);\n\n if (typeof iteratorFn === 'function') {\n // Entry iterators used to provide implicit keys,\n // but now we print a separate warning for them later.\n if (iteratorFn !== node.entries) {\n var iterator = iteratorFn.call(node);\n var step;\n\n while (!(step = iterator.next()).done) {\n if (isValidElement(step.value)) {\n validateExplicitKey(step.value, parentType);\n }\n }\n }\n }\n }\n }\n}\n/**\n * Verifies the object is a ReactElement.\n * See https://reactjs.org/docs/react-api.html#isvalidelement\n * @param {?object} object\n * @return {boolean} True if `object` is a ReactElement.\n * @final\n */\n\n\nfunction isValidElement(object) {\n return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n}\nvar ownerHasKeyUseWarning = {};\n/**\n * Warn if the element doesn't have an explicit key assigned to it.\n * This element is in an array. The array could grow and shrink or be\n * reordered. All children that haven't already been validated are required to\n * have a \"key\" property assigned to it. Error statuses are cached so a warning\n * will only be shown once.\n *\n * @internal\n * @param {ReactElement} element Element that requires a key.\n * @param {*} parentType element's parent's type.\n */\n\nfunction validateExplicitKey(element, parentType) {\n {\n if (!element._store || element._store.validated || element.key != null) {\n return;\n }\n\n element._store.validated = true;\n var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);\n\n if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {\n return;\n }\n\n ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a\n // property, it may be the creator of the child that's responsible for\n // assigning it a key.\n\n var childOwner = '';\n\n if (element && element._owner && element._owner !== ReactCurrentOwner.current) {\n // Give the component that originally created this child.\n childOwner = \" It was passed a child from \" + getComponentNameFromType(element._owner.type) + \".\";\n }\n\n setCurrentlyValidatingElement(element);\n\n error('Each child in a list should have a unique \"key\" prop.' + '%s%s See https://react.dev/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);\n\n setCurrentlyValidatingElement(null);\n }\n}\n\nfunction setCurrentlyValidatingElement(element) {\n {\n if (element) {\n var owner = element._owner;\n var stack = describeUnknownElementTypeFrameInDEV(element.type, owner ? owner.type : null);\n ReactDebugCurrentFrame.setExtraStackFrame(stack);\n } else {\n ReactDebugCurrentFrame.setExtraStackFrame(null);\n }\n }\n}\n\nfunction getCurrentComponentErrorInfo(parentType) {\n {\n var info = getDeclarationErrorAddendum();\n\n if (!info) {\n var parentName = getComponentNameFromType(parentType);\n\n if (parentName) {\n info = \"\\n\\nCheck the top-level render call using <\" + parentName + \">.\";\n }\n }\n\n return info;\n }\n}\n/**\n * Given a fragment, validate that it can only be provided with fragment props\n * @param {ReactElement} fragment\n */\n\n\nfunction validateFragmentProps(fragment) {\n // TODO: Move this to render phase instead of at element creation.\n {\n var keys = Object.keys(fragment.props);\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n\n if (key !== 'children' && key !== 'key') {\n setCurrentlyValidatingElement(fragment);\n\n error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);\n\n setCurrentlyValidatingElement(null);\n break;\n }\n }\n\n if (fragment.ref !== null) {\n setCurrentlyValidatingElement(fragment);\n\n error('Invalid attribute `ref` supplied to `React.Fragment`.');\n\n setCurrentlyValidatingElement(null);\n }\n }\n}\n\nvar SEPARATOR = '.';\nvar SUBSEPARATOR = ':';\n/**\n * Escape and wrap key so it is safe to use as a reactid\n *\n * @param {string} key to be escaped.\n * @return {string} the escaped key.\n */\n\nfunction escape(key) {\n var escapeRegex = /[=:]/g;\n var escaperLookup = {\n '=': '=0',\n ':': '=2'\n };\n var escapedString = key.replace(escapeRegex, function (match) {\n return escaperLookup[match];\n });\n return '$' + escapedString;\n}\n/**\n * TODO: Test that a single child and an array with one item have the same key\n * pattern.\n */\n\n\nvar didWarnAboutMaps = false;\nvar userProvidedKeyEscapeRegex = /\\/+/g;\n\nfunction escapeUserProvidedKey(text) {\n return text.replace(userProvidedKeyEscapeRegex, '$&/');\n}\n/**\n * Generate a key string that identifies a element within a set.\n *\n * @param {*} element A element that could contain a manual key.\n * @param {number} index Index that is used if a manual key is not provided.\n * @return {string}\n */\n\n\nfunction getElementKey(element, index) {\n // Do some typechecking here since we call this blindly. We want to ensure\n // that we don't block potential future ES APIs.\n if (typeof element === 'object' && element !== null && element.key != null) {\n // Explicit key\n {\n checkKeyStringCoercion(element.key);\n }\n\n return escape('' + element.key);\n } // Implicit key determined by the index in the set\n\n\n return index.toString(36);\n}\n\nfunction noop$1() {}\n\nfunction resolveThenable(thenable) {\n switch (thenable.status) {\n case 'fulfilled':\n {\n var fulfilledValue = thenable.value;\n return fulfilledValue;\n }\n\n case 'rejected':\n {\n var rejectedError = thenable.reason;\n throw rejectedError;\n }\n\n default:\n {\n if (typeof thenable.status === 'string') {\n // Only instrument the thenable if the status if not defined. If\n // it's defined, but an unknown value, assume it's been instrumented by\n // some custom userspace implementation. We treat it as \"pending\".\n // Attach a dummy listener, to ensure that any lazy initialization can\n // happen. Flight lazily parses JSON when the value is actually awaited.\n thenable.then(noop$1, noop$1);\n } else {\n // This is an uncached thenable that we haven't seen before.\n // TODO: Detect infinite ping loops caused by uncached promises.\n var pendingThenable = thenable;\n pendingThenable.status = 'pending';\n pendingThenable.then(function (fulfilledValue) {\n if (thenable.status === 'pending') {\n var fulfilledThenable = thenable;\n fulfilledThenable.status = 'fulfilled';\n fulfilledThenable.value = fulfilledValue;\n }\n }, function (error) {\n if (thenable.status === 'pending') {\n var rejectedThenable = thenable;\n rejectedThenable.status = 'rejected';\n rejectedThenable.reason = error;\n }\n });\n } // Check one more time in case the thenable resolved synchronously.\n\n\n switch (thenable.status) {\n case 'fulfilled':\n {\n var fulfilledThenable = thenable;\n return fulfilledThenable.value;\n }\n\n case 'rejected':\n {\n var rejectedThenable = thenable;\n var _rejectedError = rejectedThenable.reason;\n throw _rejectedError;\n }\n }\n }\n }\n\n throw thenable;\n}\n\nfunction mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {\n var type = typeof children;\n\n if (type === 'undefined' || type === 'boolean') {\n // All of the above are perceived as null.\n children = null;\n }\n\n var invokeCallback = false;\n\n if (children === null) {\n invokeCallback = true;\n } else {\n switch (type) {\n case 'bigint':\n {\n break;\n }\n\n // fallthrough for enabled BigInt support\n\n case 'string':\n case 'number':\n invokeCallback = true;\n break;\n\n case 'object':\n switch (children.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n invokeCallback = true;\n break;\n\n case REACT_LAZY_TYPE:\n var payload = children._payload;\n var init = children._init;\n return mapIntoArray(init(payload), array, escapedPrefix, nameSoFar, callback);\n }\n\n }\n }\n\n if (invokeCallback) {\n var _child = children;\n var mappedChild = callback(_child); // If it's the only child, treat the name as if it was wrapped in an array\n // so that it's consistent if the number of children grows:\n\n var childKey = nameSoFar === '' ? SEPARATOR + getElementKey(_child, 0) : nameSoFar;\n\n if (isArray(mappedChild)) {\n var escapedChildKey = '';\n\n if (childKey != null) {\n escapedChildKey = escapeUserProvidedKey(childKey) + '/';\n }\n\n mapIntoArray(mappedChild, array, escapedChildKey, '', function (c) {\n return c;\n });\n } else if (mappedChild != null) {\n if (isValidElement(mappedChild)) {\n {\n // The `if` statement here prevents auto-disabling of the safe\n // coercion ESLint rule, so we must manually disable it below.\n // $FlowFixMe[incompatible-type] Flow incorrectly thinks React.Portal doesn't have a key\n if (mappedChild.key && (!_child || _child.key !== mappedChild.key)) {\n checkKeyStringCoercion(mappedChild.key);\n }\n }\n\n mappedChild = cloneAndReplaceKey(mappedChild, // Keep both the (mapped) and old keys if they differ, just as\n // traverseAllChildren used to do for objects as children\n escapedPrefix + ( // $FlowFixMe[incompatible-type] Flow incorrectly thinks React.Portal doesn't have a key\n mappedChild.key && (!_child || _child.key !== mappedChild.key) ? escapeUserProvidedKey( // $FlowFixMe[unsafe-addition]\n '' + mappedChild.key // eslint-disable-line react-internal/safe-string-coercion\n ) + '/' : '') + childKey);\n }\n\n array.push(mappedChild);\n }\n\n return 1;\n }\n\n var child;\n var nextName;\n var subtreeCount = 0; // Count of children found in the current subtree.\n\n var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;\n\n if (isArray(children)) {\n for (var i = 0; i < children.length; i++) {\n child = children[i];\n nextName = nextNamePrefix + getElementKey(child, i);\n subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback);\n }\n } else {\n var iteratorFn = getIteratorFn(children);\n\n if (typeof iteratorFn === 'function') {\n var iterableChildren = children;\n\n {\n // Warn about using Maps as children\n if (iteratorFn === iterableChildren.entries) {\n if (!didWarnAboutMaps) {\n warn('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n }\n }\n\n var iterator = iteratorFn.call(iterableChildren);\n var step;\n var ii = 0; // $FlowFixMe[incompatible-use] `iteratorFn` might return null according to typing.\n\n while (!(step = iterator.next()).done) {\n child = step.value;\n nextName = nextNamePrefix + getElementKey(child, ii++);\n subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback);\n }\n } else if (type === 'object') {\n if (typeof children.then === 'function') {\n return mapIntoArray(resolveThenable(children), array, escapedPrefix, nameSoFar, callback);\n } // eslint-disable-next-line react-internal/safe-string-coercion\n\n\n var childrenString = String(children);\n throw new Error(\"Objects are not valid as a React child (found: \" + (childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString) + \"). \" + 'If you meant to render a collection of children, use an array ' + 'instead.');\n }\n }\n\n return subtreeCount;\n}\n/**\n * Maps children that are typically specified as `props.children`.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrenmap\n *\n * The provided mapFunction(child, index) will be called for each\n * leaf child.\n *\n * @param {?*} children Children tree container.\n * @param {function(*, int)} func The map function.\n * @param {*} context Context for mapFunction.\n * @return {object} Object containing the ordered map of results.\n */\n\n\nfunction mapChildren(children, func, context) {\n if (children == null) {\n // $FlowFixMe limitation refining abstract types in Flow\n return children;\n }\n\n var result = [];\n var count = 0;\n mapIntoArray(children, result, '', '', function (child) {\n return func.call(context, child, count++);\n });\n return result;\n}\n/**\n * Count the number of children that are typically specified as\n * `props.children`.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrencount\n *\n * @param {?*} children Children tree container.\n * @return {number} The number of children.\n */\n\n\nfunction countChildren(children) {\n var n = 0;\n mapChildren(children, function () {\n n++; // Don't return anything\n });\n return n;\n}\n/**\n * Iterates through children that are typically specified as `props.children`.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrenforeach\n *\n * The provided forEachFunc(child, index) will be called for each\n * leaf child.\n *\n * @param {?*} children Children tree container.\n * @param {function(*, int)} forEachFunc\n * @param {*} forEachContext Context for forEachContext.\n */\n\n\nfunction forEachChildren(children, forEachFunc, forEachContext) {\n mapChildren(children, // $FlowFixMe[missing-this-annot]\n function () {\n forEachFunc.apply(this, arguments); // Don't return anything.\n }, forEachContext);\n}\n/**\n * Flatten a children object (typically specified as `props.children`) and\n * return an array with appropriately re-keyed children.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrentoarray\n */\n\n\nfunction toArray(children) {\n return mapChildren(children, function (child) {\n return child;\n }) || [];\n}\n/**\n * Returns the first child in a collection of children and verifies that there\n * is only one child in the collection.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrenonly\n *\n * The current implementation of this function assumes that a single child gets\n * passed without a wrapper, but the purpose of this helper function is to\n * abstract away the particular structure of children.\n *\n * @param {?object} children Child collection structure.\n * @return {ReactElement} The first and only `ReactElement` contained in the\n * structure.\n */\n\n\nfunction onlyChild(children) {\n if (!isValidElement(children)) {\n throw new Error('React.Children.only expected to receive a single React element child.');\n }\n\n return children;\n}\n\nfunction createContext(defaultValue) {\n // TODO: Second argument used to be an optional `calculateChangedBits`\n // function. Warn to reserve for future use?\n var context = {\n $$typeof: REACT_CONTEXT_TYPE,\n // As a workaround to support multiple concurrent renderers, we categorize\n // some renderers as primary and others as secondary. We only expect\n // there to be two concurrent renderers at most: React Native (primary) and\n // Fabric (secondary); React DOM (primary) and React ART (secondary).\n // Secondary renderers store their context values on separate fields.\n _currentValue: defaultValue,\n _currentValue2: defaultValue,\n // Used to track how many concurrent renderers this context currently\n // supports within in a single renderer. Such as parallel server rendering.\n _threadCount: 0,\n // These are circular\n Provider: null,\n Consumer: null\n };\n\n {\n context.Provider = {\n $$typeof: REACT_PROVIDER_TYPE,\n _context: context\n };\n\n {\n var Consumer = {\n $$typeof: REACT_CONTEXT_TYPE,\n _context: context\n };\n Object.defineProperties(Consumer, {\n Provider: {\n get: function () {\n return context.Provider;\n },\n set: function (_Provider) {\n context.Provider = _Provider;\n }\n },\n _currentValue: {\n get: function () {\n return context._currentValue;\n },\n set: function (_currentValue) {\n context._currentValue = _currentValue;\n }\n },\n _currentValue2: {\n get: function () {\n return context._currentValue2;\n },\n set: function (_currentValue2) {\n context._currentValue2 = _currentValue2;\n }\n },\n _threadCount: {\n get: function () {\n return context._threadCount;\n },\n set: function (_threadCount) {\n context._threadCount = _threadCount;\n }\n },\n Consumer: {\n get: function () {\n return context.Consumer;\n }\n },\n displayName: {\n get: function () {\n return context.displayName;\n },\n set: function (displayName) {}\n }\n });\n context.Consumer = Consumer;\n }\n }\n\n {\n context._currentRenderer = null;\n context._currentRenderer2 = null;\n }\n\n return context;\n}\n\nvar Uninitialized = -1;\nvar Pending = 0;\nvar Resolved = 1;\nvar Rejected = 2;\n\nfunction lazyInitializer(payload) {\n if (payload._status === Uninitialized) {\n var ctor = payload._result;\n var thenable = ctor(); // Transition to the next state.\n // This might throw either because it's missing or throws. If so, we treat it\n // as still uninitialized and try again next time. Which is the same as what\n // happens if the ctor or any wrappers processing the ctor throws. This might\n // end up fixing it if the resolution was a concurrency bug.\n\n thenable.then(function (moduleObject) {\n if (payload._status === Pending || payload._status === Uninitialized) {\n // Transition to the next state.\n var resolved = payload;\n resolved._status = Resolved;\n resolved._result = moduleObject;\n }\n }, function (error) {\n if (payload._status === Pending || payload._status === Uninitialized) {\n // Transition to the next state.\n var rejected = payload;\n rejected._status = Rejected;\n rejected._result = error;\n }\n });\n\n if (payload._status === Uninitialized) {\n // In case, we're still uninitialized, then we're waiting for the thenable\n // to resolve. Set it as pending in the meantime.\n var pending = payload;\n pending._status = Pending;\n pending._result = thenable;\n }\n }\n\n if (payload._status === Resolved) {\n var moduleObject = payload._result;\n\n {\n if (moduleObject === undefined) {\n error('lazy: Expected the result of a dynamic imp' + 'ort() call. ' + 'Instead received: %s\\n\\nYour code should look like: \\n ' + // Break up imports to avoid accidentally parsing them as dependencies.\n 'const MyComponent = lazy(() => imp' + \"ort('./MyComponent'))\\n\\n\" + 'Did you accidentally put curly braces around the import?', moduleObject);\n }\n }\n\n {\n if (!('default' in moduleObject)) {\n error('lazy: Expected the result of a dynamic imp' + 'ort() call. ' + 'Instead received: %s\\n\\nYour code should look like: \\n ' + // Break up imports to avoid accidentally parsing them as dependencies.\n 'const MyComponent = lazy(() => imp' + \"ort('./MyComponent'))\", moduleObject);\n }\n }\n\n return moduleObject.default;\n } else {\n throw payload._result;\n }\n}\n\nfunction lazy(ctor) {\n var payload = {\n // We use these fields to store the result.\n _status: Uninitialized,\n _result: ctor\n };\n var lazyType = {\n $$typeof: REACT_LAZY_TYPE,\n _payload: payload,\n _init: lazyInitializer\n };\n\n {\n // In production, this would just set it on the object.\n var defaultProps;\n var propTypes; // $FlowFixMe[prop-missing]\n\n Object.defineProperties(lazyType, {\n defaultProps: {\n configurable: true,\n get: function () {\n return defaultProps;\n },\n // $FlowFixMe[missing-local-annot]\n set: function (newDefaultProps) {\n error('It is not supported to assign `defaultProps` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.');\n\n defaultProps = newDefaultProps; // Match production behavior more closely:\n // $FlowFixMe[prop-missing]\n\n Object.defineProperty(lazyType, 'defaultProps', {\n enumerable: true\n });\n }\n },\n propTypes: {\n configurable: true,\n get: function () {\n return propTypes;\n },\n // $FlowFixMe[missing-local-annot]\n set: function (newPropTypes) {\n error('It is not supported to assign `propTypes` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.');\n\n propTypes = newPropTypes; // Match production behavior more closely:\n // $FlowFixMe[prop-missing]\n\n Object.defineProperty(lazyType, 'propTypes', {\n enumerable: true\n });\n }\n }\n });\n }\n\n return lazyType;\n}\n\nfunction forwardRef(render) {\n {\n if (render != null && render.$$typeof === REACT_MEMO_TYPE) {\n error('forwardRef requires a render function but received a `memo` ' + 'component. Instead of forwardRef(memo(...)), use ' + 'memo(forwardRef(...)).');\n } else if (typeof render !== 'function') {\n error('forwardRef requires a render function but was given %s.', render === null ? 'null' : typeof render);\n } else {\n if (render.length !== 0 && render.length !== 2) {\n error('forwardRef render functions accept exactly two parameters: props and ref. %s', render.length === 1 ? 'Did you forget to use the ref parameter?' : 'Any additional parameter will be undefined.');\n }\n }\n\n if (render != null) {\n if (render.defaultProps != null) {\n error('forwardRef render functions do not support defaultProps. ' + 'Did you accidentally pass a React component?');\n }\n }\n }\n\n var elementType = {\n $$typeof: REACT_FORWARD_REF_TYPE,\n render: render\n };\n\n {\n var ownName;\n Object.defineProperty(elementType, 'displayName', {\n enumerable: false,\n configurable: true,\n get: function () {\n return ownName;\n },\n set: function (name) {\n ownName = name; // The inner component shouldn't inherit this display name in most cases,\n // because the component may be used elsewhere.\n // But it's nice for anonymous functions to inherit the name,\n // so that our component-stack generation logic will display their frames.\n // An anonymous function generally suggests a pattern like:\n // React.forwardRef((props, ref) => {...});\n // This kind of inner function is not used elsewhere so the side effect is okay.\n\n if (!render.name && !render.displayName) {\n render.displayName = name;\n }\n }\n });\n }\n\n return elementType;\n}\n\nfunction memo(type, compare) {\n {\n if (!isValidElementType(type)) {\n error('memo: The first argument must be a component. Instead ' + 'received: %s', type === null ? 'null' : typeof type);\n }\n }\n\n var elementType = {\n $$typeof: REACT_MEMO_TYPE,\n type: type,\n compare: compare === undefined ? null : compare\n };\n\n {\n var ownName;\n Object.defineProperty(elementType, 'displayName', {\n enumerable: false,\n configurable: true,\n get: function () {\n return ownName;\n },\n set: function (name) {\n ownName = name; // The inner component shouldn't inherit this display name in most cases,\n // because the component may be used elsewhere.\n // But it's nice for anonymous functions to inherit the name,\n // so that our component-stack generation logic will display their frames.\n // An anonymous function generally suggests a pattern like:\n // React.memo((props) => {...});\n // This kind of inner function is not used elsewhere so the side effect is okay.\n\n if (!type.name && !type.displayName) {\n type.displayName = name;\n }\n }\n });\n }\n\n return elementType;\n}\n\nvar UNTERMINATED = 0;\nvar TERMINATED = 1;\nvar ERRORED = 2;\n\nfunction createCacheRoot() {\n return new WeakMap();\n}\n\nfunction createCacheNode() {\n return {\n s: UNTERMINATED,\n // status, represents whether the cached computation returned a value or threw an error\n v: undefined,\n // value, either the cached result or an error, depending on s\n o: null,\n // object cache, a WeakMap where non-primitive arguments are stored\n p: null // primitive cache, a regular Map where primitive arguments are stored.\n\n };\n}\n\nfunction cache$1(fn) {\n return function () {\n var dispatcher = ReactCurrentCache.current;\n\n if (!dispatcher) {\n // If there is no dispatcher, then we treat this as not being cached.\n // $FlowFixMe[incompatible-call]: We don't want to use rest arguments since we transpile the code.\n return fn.apply(null, arguments);\n }\n\n var fnMap = dispatcher.getCacheForType(createCacheRoot);\n var fnNode = fnMap.get(fn);\n var cacheNode;\n\n if (fnNode === undefined) {\n cacheNode = createCacheNode();\n fnMap.set(fn, cacheNode);\n } else {\n cacheNode = fnNode;\n }\n\n for (var i = 0, l = arguments.length; i < l; i++) {\n var arg = arguments[i];\n\n if (typeof arg === 'function' || typeof arg === 'object' && arg !== null) {\n // Objects go into a WeakMap\n var objectCache = cacheNode.o;\n\n if (objectCache === null) {\n cacheNode.o = objectCache = new WeakMap();\n }\n\n var objectNode = objectCache.get(arg);\n\n if (objectNode === undefined) {\n cacheNode = createCacheNode();\n objectCache.set(arg, cacheNode);\n } else {\n cacheNode = objectNode;\n }\n } else {\n // Primitives go into a regular Map\n var primitiveCache = cacheNode.p;\n\n if (primitiveCache === null) {\n cacheNode.p = primitiveCache = new Map();\n }\n\n var primitiveNode = primitiveCache.get(arg);\n\n if (primitiveNode === undefined) {\n cacheNode = createCacheNode();\n primitiveCache.set(arg, cacheNode);\n } else {\n cacheNode = primitiveNode;\n }\n }\n }\n\n if (cacheNode.s === TERMINATED) {\n return cacheNode.v;\n }\n\n if (cacheNode.s === ERRORED) {\n throw cacheNode.v;\n }\n\n try {\n // $FlowFixMe[incompatible-call]: We don't want to use rest arguments since we transpile the code.\n var result = fn.apply(null, arguments);\n var terminatedNode = cacheNode;\n terminatedNode.s = TERMINATED;\n terminatedNode.v = result;\n return result;\n } catch (error) {\n // We store the first error that's thrown and rethrow it.\n var erroredNode = cacheNode;\n erroredNode.s = ERRORED;\n erroredNode.v = error;\n throw error;\n }\n };\n}\n\nvar cache = cache$1;\n\nfunction resolveDispatcher() {\n var dispatcher = ReactCurrentDispatcher$1.current;\n\n {\n if (dispatcher === null) {\n error('Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for' + ' one of the following reasons:\\n' + '1. You might have mismatching versions of React and the renderer (such as React DOM)\\n' + '2. You might be breaking the Rules of Hooks\\n' + '3. You might have more than one copy of React in the same app\\n' + 'See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.');\n }\n } // Will result in a null access error if accessed outside render phase. We\n // intentionally don't throw our own error because this is in a hot path.\n // Also helps ensure this is inlined.\n\n\n return dispatcher;\n}\nfunction useContext(Context) {\n var dispatcher = resolveDispatcher();\n\n {\n if (Context.$$typeof === REACT_CONSUMER_TYPE) {\n error('Calling useContext(Context.Consumer) is not supported and will cause bugs. ' + 'Did you mean to call useContext(Context) instead?');\n }\n }\n\n return dispatcher.useContext(Context);\n}\nfunction useState(initialState) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useState(initialState);\n}\nfunction useReducer(reducer, initialArg, init) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useReducer(reducer, initialArg, init);\n}\nfunction useRef(initialValue) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useRef(initialValue);\n}\nfunction useEffect(create, deps) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useEffect(create, deps);\n}\nfunction useInsertionEffect(create, deps) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useInsertionEffect(create, deps);\n}\nfunction useLayoutEffect(create, deps) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useLayoutEffect(create, deps);\n}\nfunction useCallback(callback, deps) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useCallback(callback, deps);\n}\nfunction useMemo(create, deps) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useMemo(create, deps);\n}\nfunction useImperativeHandle(ref, create, deps) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useImperativeHandle(ref, create, deps);\n}\nfunction useDebugValue(value, formatterFn) {\n {\n var dispatcher = resolveDispatcher();\n return dispatcher.useDebugValue(value, formatterFn);\n }\n}\nfunction useTransition() {\n var dispatcher = resolveDispatcher();\n return dispatcher.useTransition();\n}\nfunction useDeferredValue(value, initialValue) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useDeferredValue(value, initialValue);\n}\nfunction useId() {\n var dispatcher = resolveDispatcher();\n return dispatcher.useId();\n}\nfunction useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);\n}\nfunction useCacheRefresh() {\n var dispatcher = resolveDispatcher(); // $FlowFixMe[not-a-function] This is unstable, thus optional\n\n return dispatcher.useCacheRefresh();\n}\nfunction use(usable) {\n var dispatcher = resolveDispatcher();\n return dispatcher.use(usable);\n}\nfunction useOptimistic(passthrough, reducer) {\n var dispatcher = resolveDispatcher(); // $FlowFixMe[not-a-function] This is unstable, thus optional\n\n return dispatcher.useOptimistic(passthrough, reducer);\n}\n\nfunction startTransition(scope, options) {\n var prevTransition = ReactCurrentBatchConfig.transition; // Each renderer registers a callback to receive the return value of\n // the scope function. This is used to implement async actions.\n\n var callbacks = new Set();\n var transition = {\n _callbacks: callbacks\n };\n ReactCurrentBatchConfig.transition = transition;\n var currentTransition = ReactCurrentBatchConfig.transition;\n\n {\n ReactCurrentBatchConfig.transition._updatedFibers = new Set();\n }\n\n {\n try {\n var returnValue = scope();\n\n if (typeof returnValue === 'object' && returnValue !== null && typeof returnValue.then === 'function') {\n callbacks.forEach(function (callback) {\n return callback(currentTransition, returnValue);\n });\n returnValue.then(noop, onError);\n }\n } catch (error) {\n onError(error);\n } finally {\n warnAboutTransitionSubscriptions(prevTransition, currentTransition);\n ReactCurrentBatchConfig.transition = prevTransition;\n }\n }\n}\n\nfunction warnAboutTransitionSubscriptions(prevTransition, currentTransition) {\n {\n if (prevTransition === null && currentTransition._updatedFibers) {\n var updatedFibersCount = currentTransition._updatedFibers.size;\n\n currentTransition._updatedFibers.clear();\n\n if (updatedFibersCount > 10) {\n warn('Detected a large number of updates inside startTransition. ' + 'If this is due to a subscription please re-write it to use React provided hooks. ' + 'Otherwise concurrent mode guarantees are off the table.');\n }\n }\n }\n}\n\nfunction noop() {} // Use reportError, if it exists. Otherwise console.error. This is the same as\n// the default for onRecoverableError.\n\n\nvar onError = typeof reportError === 'function' ? // In modern browsers, reportError will dispatch an error event,\n// emulating an uncaught JavaScript error.\nreportError : function (error) {\n // In older browsers and test environments, fallback to console.error.\n // eslint-disable-next-line react-internal/no-production-logging\n console['error'](error);\n};\n\nvar didWarnAboutMessageChannel = false;\nvar enqueueTaskImpl = null;\nfunction enqueueTask(task) {\n if (enqueueTaskImpl === null) {\n try {\n // read require off the module object to get around the bundlers.\n // we don't want them to detect a require and bundle a Node polyfill.\n var requireString = ('require' + Math.random()).slice(0, 7);\n var nodeRequire = module && module[requireString]; // assuming we're in node, let's try to get node's\n // version of setImmediate, bypassing fake timers if any.\n\n enqueueTaskImpl = nodeRequire.call(module, 'timers').setImmediate;\n } catch (_err) {\n // we're in a browser\n // we can't use regular timers because they may still be faked\n // so we try MessageChannel+postMessage instead\n enqueueTaskImpl = function (callback) {\n {\n if (didWarnAboutMessageChannel === false) {\n didWarnAboutMessageChannel = true;\n\n if (typeof MessageChannel === 'undefined') {\n error('This browser does not have a MessageChannel implementation, ' + 'so enqueuing tasks via await act(async () => ...) will fail. ' + 'Please file an issue at https://github.com/facebook/react/issues ' + 'if you encounter this warning.');\n }\n }\n }\n\n var channel = new MessageChannel();\n channel.port1.onmessage = callback;\n channel.port2.postMessage(undefined);\n };\n }\n }\n\n return enqueueTaskImpl(task);\n}\n\n// number of `act` scopes on the stack.\n\nvar actScopeDepth = 0; // We only warn the first time you neglect to await an async `act` scope.\n\nvar didWarnNoAwaitAct = false;\nfunction act(callback) {\n {\n // When ReactCurrentActQueue.current is not null, it signals to React that\n // we're currently inside an `act` scope. React will push all its tasks to\n // this queue instead of scheduling them with platform APIs.\n //\n // We set this to an empty array when we first enter an `act` scope, and\n // only unset it once we've left the outermost `act` scope — remember that\n // `act` calls can be nested.\n //\n // If we're already inside an `act` scope, reuse the existing queue.\n var prevIsBatchingLegacy = ReactCurrentActQueue.isBatchingLegacy;\n var prevActQueue = ReactCurrentActQueue.current;\n var prevActScopeDepth = actScopeDepth;\n actScopeDepth++;\n var queue = ReactCurrentActQueue.current = prevActQueue !== null ? prevActQueue : []; // Used to reproduce behavior of `batchedUpdates` in legacy mode. Only\n // set to `true` while the given callback is executed, not for updates\n // triggered during an async event, because this is how the legacy\n // implementation of `act` behaved.\n\n ReactCurrentActQueue.isBatchingLegacy = true;\n var result; // This tracks whether the `act` call is awaited. In certain cases, not\n // awaiting it is a mistake, so we will detect that and warn.\n\n var didAwaitActCall = false;\n\n try {\n // Reset this to `false` right before entering the React work loop. The\n // only place we ever read this fields is just below, right after running\n // the callback. So we don't need to reset after the callback runs.\n ReactCurrentActQueue.didScheduleLegacyUpdate = false;\n result = callback();\n var didScheduleLegacyUpdate = ReactCurrentActQueue.didScheduleLegacyUpdate; // Replicate behavior of original `act` implementation in legacy mode,\n // which flushed updates immediately after the scope function exits, even\n // if it's an async function.\n\n if (!prevIsBatchingLegacy && didScheduleLegacyUpdate) {\n flushActQueue(queue);\n } // `isBatchingLegacy` gets reset using the regular stack, not the async\n // one used to track `act` scopes. Why, you may be wondering? Because\n // that's how it worked before version 18. Yes, it's confusing! We should\n // delete legacy mode!!\n\n\n ReactCurrentActQueue.isBatchingLegacy = prevIsBatchingLegacy;\n } catch (error) {\n // `isBatchingLegacy` gets reset using the regular stack, not the async\n // one used to track `act` scopes. Why, you may be wondering? Because\n // that's how it worked before version 18. Yes, it's confusing! We should\n // delete legacy mode!!\n ReactCurrentActQueue.isBatchingLegacy = prevIsBatchingLegacy;\n popActScope(prevActQueue, prevActScopeDepth);\n throw error;\n }\n\n if (result !== null && typeof result === 'object' && // $FlowFixMe[method-unbinding]\n typeof result.then === 'function') {\n // A promise/thenable was returned from the callback. Wait for it to\n // resolve before flushing the queue.\n //\n // If `act` were implemented as an async function, this whole block could\n // be a single `await` call. That's really the only difference between\n // this branch and the next one.\n var thenable = result; // Warn if the an `act` call with an async scope is not awaited. In a\n // future release, consider making this an error.\n\n queueSeveralMicrotasks(function () {\n if (!didAwaitActCall && !didWarnNoAwaitAct) {\n didWarnNoAwaitAct = true;\n\n error('You called act(async () => ...) without await. ' + 'This could lead to unexpected testing behaviour, ' + 'interleaving multiple act calls and mixing their ' + 'scopes. ' + 'You should - await act(async () => ...);');\n }\n });\n return {\n then: function (resolve, reject) {\n didAwaitActCall = true;\n thenable.then(function (returnValue) {\n popActScope(prevActQueue, prevActScopeDepth);\n\n if (prevActScopeDepth === 0) {\n // We're exiting the outermost `act` scope. Flush the queue.\n try {\n flushActQueue(queue);\n enqueueTask(function () {\n return (// Recursively flush tasks scheduled by a microtask.\n recursivelyFlushAsyncActWork(returnValue, resolve, reject)\n );\n });\n } catch (error) {\n // `thenable` might not be a real promise, and `flushActQueue`\n // might throw, so we need to wrap `flushActQueue` in a\n // try/catch.\n reject(error);\n }\n } else {\n resolve(returnValue);\n }\n }, function (error) {\n popActScope(prevActQueue, prevActScopeDepth);\n reject(error);\n });\n }\n };\n } else {\n var returnValue = result; // The callback is not an async function. Exit the current\n // scope immediately.\n\n popActScope(prevActQueue, prevActScopeDepth);\n\n if (prevActScopeDepth === 0) {\n // We're exiting the outermost `act` scope. Flush the queue.\n flushActQueue(queue); // If the queue is not empty, it implies that we intentionally yielded\n // to the main thread, because something suspended. We will continue\n // in an asynchronous task.\n //\n // Warn if something suspends but the `act` call is not awaited.\n // In a future release, consider making this an error.\n\n if (queue.length !== 0) {\n queueSeveralMicrotasks(function () {\n if (!didAwaitActCall && !didWarnNoAwaitAct) {\n didWarnNoAwaitAct = true;\n\n error('A component suspended inside an `act` scope, but the ' + '`act` call was not awaited. When testing React ' + 'components that depend on asynchronous data, you must ' + 'await the result:\\n\\n' + 'await act(() => ...)');\n }\n });\n } // Like many things in this module, this is next part is confusing.\n //\n // We do not currently require every `act` call that is passed a\n // callback to be awaited, through arguably we should. Since this\n // callback was synchronous, we need to exit the current scope before\n // returning.\n //\n // However, if thenable we're about to return *is* awaited, we'll\n // immediately restore the current scope. So it shouldn't observable.\n //\n // This doesn't affect the case where the scope callback is async,\n // because we always require those calls to be awaited.\n //\n // TODO: In a future version, consider always requiring all `act` calls\n // to be awaited, regardless of whether the callback is sync or async.\n\n\n ReactCurrentActQueue.current = null;\n }\n\n return {\n then: function (resolve, reject) {\n didAwaitActCall = true;\n\n if (prevActScopeDepth === 0) {\n // If the `act` call is awaited, restore the queue we were\n // using before (see long comment above) so we can flush it.\n ReactCurrentActQueue.current = queue;\n enqueueTask(function () {\n return (// Recursively flush tasks scheduled by a microtask.\n recursivelyFlushAsyncActWork(returnValue, resolve, reject)\n );\n });\n } else {\n resolve(returnValue);\n }\n }\n };\n }\n }\n}\n\nfunction popActScope(prevActQueue, prevActScopeDepth) {\n {\n if (prevActScopeDepth !== actScopeDepth - 1) {\n error('You seem to have overlapping act() calls, this is not supported. ' + 'Be sure to await previous act() calls before making a new one. ');\n }\n\n actScopeDepth = prevActScopeDepth;\n }\n}\n\nfunction recursivelyFlushAsyncActWork(returnValue, resolve, reject) {\n {\n // Check if any tasks were scheduled asynchronously.\n var queue = ReactCurrentActQueue.current;\n\n if (queue !== null) {\n if (queue.length !== 0) {\n // Async tasks were scheduled, mostly likely in a microtask.\n // Keep flushing until there are no more.\n try {\n flushActQueue(queue); // The work we just performed may have schedule additional async\n // tasks. Wait a macrotask and check again.\n\n enqueueTask(function () {\n return recursivelyFlushAsyncActWork(returnValue, resolve, reject);\n });\n } catch (error) {\n // Leave remaining tasks on the queue if something throws.\n reject(error);\n }\n } else {\n // The queue is empty. We can finish.\n ReactCurrentActQueue.current = null;\n resolve(returnValue);\n }\n } else {\n resolve(returnValue);\n }\n }\n}\n\nvar isFlushing = false;\n\nfunction flushActQueue(queue) {\n {\n if (!isFlushing) {\n // Prevent re-entrance.\n isFlushing = true;\n var i = 0;\n\n try {\n for (; i < queue.length; i++) {\n var callback = queue[i];\n\n do {\n ReactCurrentActQueue.didUsePromise = false;\n var continuation = callback(false);\n\n if (continuation !== null) {\n if (ReactCurrentActQueue.didUsePromise) {\n // The component just suspended. Yield to the main thread in\n // case the promise is already resolved. If so, it will ping in\n // a microtask and we can resume without unwinding the stack.\n queue[i] = callback;\n queue.splice(0, i);\n return;\n }\n\n callback = continuation;\n } else {\n break;\n }\n } while (true);\n } // We flushed the entire queue.\n\n\n queue.length = 0;\n } catch (error) {\n // If something throws, leave the remaining callbacks on the queue.\n queue.splice(0, i + 1);\n throw error;\n } finally {\n isFlushing = false;\n }\n }\n }\n} // Some of our warnings attempt to detect if the `act` call is awaited by\n// checking in an asynchronous task. Wait a few microtasks before checking. The\n// only reason one isn't sufficient is we want to accommodate the case where an\n// `act` call is returned from an async function without first being awaited,\n// since that's a somewhat common pattern. If you do this too many times in a\n// nested sequence, you might get a warning, but you can always fix by awaiting\n// the call.\n//\n// A macrotask would also work (and is the fallback) but depending on the test\n// environment it may cause the warning to fire too late.\n\n\nvar queueSeveralMicrotasks = typeof queueMicrotask === 'function' ? function (callback) {\n queueMicrotask(function () {\n return queueMicrotask(callback);\n });\n} : enqueueTask;\n\nvar Children = {\n map: mapChildren,\n forEach: forEachChildren,\n count: countChildren,\n toArray: toArray,\n only: onlyChild\n};\n\nexports.Children = Children;\nexports.Component = Component;\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.Profiler = REACT_PROFILER_TYPE;\nexports.PureComponent = PureComponent;\nexports.StrictMode = REACT_STRICT_MODE_TYPE;\nexports.Suspense = REACT_SUSPENSE_TYPE;\nexports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactSharedInternals;\nexports.act = act;\nexports.cache = cache;\nexports.cloneElement = cloneElement;\nexports.createContext = createContext;\nexports.createElement = createElement;\nexports.createFactory = createFactory;\nexports.createRef = createRef;\nexports.forwardRef = forwardRef;\nexports.isValidElement = isValidElement;\nexports.lazy = lazy;\nexports.memo = memo;\nexports.startTransition = startTransition;\nexports.unstable_useCacheRefresh = useCacheRefresh;\nexports.use = use;\nexports.useCallback = useCallback;\nexports.useContext = useContext;\nexports.useDebugValue = useDebugValue;\nexports.useDeferredValue = useDeferredValue;\nexports.useEffect = useEffect;\nexports.useId = useId;\nexports.useImperativeHandle = useImperativeHandle;\nexports.useInsertionEffect = useInsertionEffect;\nexports.useLayoutEffect = useLayoutEffect;\nexports.useMemo = useMemo;\nexports.useOptimistic = useOptimistic;\nexports.useReducer = useReducer;\nexports.useRef = useRef;\nexports.useState = useState;\nexports.useSyncExternalStore = useSyncExternalStore;\nexports.useTransition = useTransition;\nexports.version = ReactVersion;\n /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\nif (\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop ===\n 'function'\n) {\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());\n}\n \n })();\n}\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/react/cjs/react.development.js?", + ); + + /***/ + }, + + /***/ 6540: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + 'use strict'; + eval( + '\n\nif (false) {} else {\n module.exports = __webpack_require__(4837);\n}\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/react/index.js?', + ); + + /***/ + }, + + /***/ 7243: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + 'use strict'; + eval( + "\nif (false) {}\n// We don't want bundlers to error when they encounter usage of any of these exports.\n// It's up to the package author to ensure that if they access React internals,\n// they do so in a safe way that won't break if React changes how they use these internals.\n// (e.g. only access them in development, and only in an optional way that won't\n// break if internals are not there or do not have the expected structure)\n// @ts-ignore\nmodule.exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = undefined;\n// @ts-ignore\nmodule.exports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = undefined;\n// @ts-ignore\nmodule.exports.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = undefined;\n// Here we actually pull in the React library and add everything\n// it exports to our own `module.exports`.\n// If React suddenly were to add one of the above \"polyfilled\" exports,\n// the React version would overwrite our version, so this should be\n// future-proof.\nObject.assign(module.exports, __webpack_require__(6540));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/rehackt/index.js?", + ); + + /***/ + }, + + /***/ 213: /***/ (__unused_webpack_module, exports) => { + 'use strict'; + eval( + "/**\n * @license React\n * scheduler.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\nif (true) {\n (function() {\n\n 'use strict';\n\n/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\nif (\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart ===\n 'function'\n) {\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());\n}\n var enableSchedulerDebugging = false;\nvar enableProfiling = false;\nvar frameYieldMs = 5;\nvar userBlockingPriorityTimeout = 250;\nvar normalPriorityTimeout = 5000;\nvar lowPriorityTimeout = 10000;\n\nfunction push(heap, node) {\n var index = heap.length;\n heap.push(node);\n siftUp(heap, node, index);\n}\nfunction peek(heap) {\n return heap.length === 0 ? null : heap[0];\n}\nfunction pop(heap) {\n if (heap.length === 0) {\n return null;\n }\n\n var first = heap[0];\n var last = heap.pop();\n\n if (last !== first) {\n heap[0] = last;\n siftDown(heap, last, 0);\n }\n\n return first;\n}\n\nfunction siftUp(heap, node, i) {\n var index = i;\n\n while (index > 0) {\n var parentIndex = index - 1 >>> 1;\n var parent = heap[parentIndex];\n\n if (compare(parent, node) > 0) {\n // The parent is larger. Swap positions.\n heap[parentIndex] = node;\n heap[index] = parent;\n index = parentIndex;\n } else {\n // The parent is smaller. Exit.\n return;\n }\n }\n}\n\nfunction siftDown(heap, node, i) {\n var index = i;\n var length = heap.length;\n var halfLength = length >>> 1;\n\n while (index < halfLength) {\n var leftIndex = (index + 1) * 2 - 1;\n var left = heap[leftIndex];\n var rightIndex = leftIndex + 1;\n var right = heap[rightIndex]; // If the left or right node is smaller, swap with the smaller of those.\n\n if (compare(left, node) < 0) {\n if (rightIndex < length && compare(right, left) < 0) {\n heap[index] = right;\n heap[rightIndex] = node;\n index = rightIndex;\n } else {\n heap[index] = left;\n heap[leftIndex] = node;\n index = leftIndex;\n }\n } else if (rightIndex < length && compare(right, node) < 0) {\n heap[index] = right;\n heap[rightIndex] = node;\n index = rightIndex;\n } else {\n // Neither child is smaller. Exit.\n return;\n }\n }\n}\n\nfunction compare(a, b) {\n // Compare sort index first, then task id.\n var diff = a.sortIndex - b.sortIndex;\n return diff !== 0 ? diff : a.id - b.id;\n}\n\n// TODO: Use symbols?\nvar ImmediatePriority = 1;\nvar UserBlockingPriority = 2;\nvar NormalPriority = 3;\nvar LowPriority = 4;\nvar IdlePriority = 5;\n\nfunction markTaskErrored(task, ms) {\n}\n\n/* eslint-disable no-var */\nexports.unstable_now = void 0;\nvar hasPerformanceNow = // $FlowFixMe[method-unbinding]\ntypeof performance === 'object' && typeof performance.now === 'function';\n\nif (hasPerformanceNow) {\n var localPerformance = performance;\n\n exports.unstable_now = function () {\n return localPerformance.now();\n };\n} else {\n var localDate = Date;\n var initialTime = localDate.now();\n\n exports.unstable_now = function () {\n return localDate.now() - initialTime;\n };\n} // Max 31 bit integer. The max integer size in V8 for 32-bit systems.\n// Math.pow(2, 30) - 1\n// 0b111111111111111111111111111111\n\n\nvar maxSigned31BitInt = 1073741823; // Tasks are stored on a min heap\n\nvar taskQueue = [];\nvar timerQueue = []; // Incrementing id counter. Used to maintain insertion order.\n\nvar taskIdCounter = 1; // Pausing the scheduler is useful for debugging.\nvar currentTask = null;\nvar currentPriorityLevel = NormalPriority; // This is set while performing work, to prevent re-entrance.\n\nvar isPerformingWork = false;\nvar isHostCallbackScheduled = false;\nvar isHostTimeoutScheduled = false; // Capture local references to native APIs, in case a polyfill overrides them.\n\nvar localSetTimeout = typeof setTimeout === 'function' ? setTimeout : null;\nvar localClearTimeout = typeof clearTimeout === 'function' ? clearTimeout : null;\nvar localSetImmediate = typeof setImmediate !== 'undefined' ? setImmediate : null; // IE and Node.js + jsdom\n\nfunction advanceTimers(currentTime) {\n // Check for tasks that are no longer delayed and add them to the queue.\n var timer = peek(timerQueue);\n\n while (timer !== null) {\n if (timer.callback === null) {\n // Timer was cancelled.\n pop(timerQueue);\n } else if (timer.startTime <= currentTime) {\n // Timer fired. Transfer to the task queue.\n pop(timerQueue);\n timer.sortIndex = timer.expirationTime;\n push(taskQueue, timer);\n } else {\n // Remaining timers are pending.\n return;\n }\n\n timer = peek(timerQueue);\n }\n}\n\nfunction handleTimeout(currentTime) {\n isHostTimeoutScheduled = false;\n advanceTimers(currentTime);\n\n if (!isHostCallbackScheduled) {\n if (peek(taskQueue) !== null) {\n isHostCallbackScheduled = true;\n requestHostCallback();\n } else {\n var firstTimer = peek(timerQueue);\n\n if (firstTimer !== null) {\n requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime);\n }\n }\n }\n}\n\nfunction flushWork(initialTime) {\n\n\n isHostCallbackScheduled = false;\n\n if (isHostTimeoutScheduled) {\n // We scheduled a timeout but it's no longer needed. Cancel it.\n isHostTimeoutScheduled = false;\n cancelHostTimeout();\n }\n\n isPerformingWork = true;\n var previousPriorityLevel = currentPriorityLevel;\n\n try {\n var currentTime; if (enableProfiling) ; else {\n // No catch in prod code path.\n return workLoop(initialTime);\n }\n } finally {\n currentTask = null;\n currentPriorityLevel = previousPriorityLevel;\n isPerformingWork = false;\n }\n}\n\nfunction workLoop(initialTime) {\n var currentTime = initialTime;\n advanceTimers(currentTime);\n currentTask = peek(taskQueue);\n\n while (currentTask !== null && !(enableSchedulerDebugging )) {\n if (currentTask.expirationTime > currentTime && shouldYieldToHost()) {\n // This currentTask hasn't expired, and we've reached the deadline.\n break;\n } // $FlowFixMe[incompatible-use] found when upgrading Flow\n\n\n var callback = currentTask.callback;\n\n if (typeof callback === 'function') {\n // $FlowFixMe[incompatible-use] found when upgrading Flow\n currentTask.callback = null; // $FlowFixMe[incompatible-use] found when upgrading Flow\n\n currentPriorityLevel = currentTask.priorityLevel; // $FlowFixMe[incompatible-use] found when upgrading Flow\n\n var didUserCallbackTimeout = currentTask.expirationTime <= currentTime;\n\n var continuationCallback = callback(didUserCallbackTimeout);\n currentTime = exports.unstable_now();\n\n if (typeof continuationCallback === 'function') {\n // If a continuation is returned, immediately yield to the main thread\n // regardless of how much time is left in the current time slice.\n // $FlowFixMe[incompatible-use] found when upgrading Flow\n currentTask.callback = continuationCallback;\n\n advanceTimers(currentTime);\n return true;\n } else {\n\n if (currentTask === peek(taskQueue)) {\n pop(taskQueue);\n }\n\n advanceTimers(currentTime);\n }\n } else {\n pop(taskQueue);\n }\n\n currentTask = peek(taskQueue);\n } // Return whether there's additional work\n\n\n if (currentTask !== null) {\n return true;\n } else {\n var firstTimer = peek(timerQueue);\n\n if (firstTimer !== null) {\n requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime);\n }\n\n return false;\n }\n}\n\nfunction unstable_runWithPriority(priorityLevel, eventHandler) {\n switch (priorityLevel) {\n case ImmediatePriority:\n case UserBlockingPriority:\n case NormalPriority:\n case LowPriority:\n case IdlePriority:\n break;\n\n default:\n priorityLevel = NormalPriority;\n }\n\n var previousPriorityLevel = currentPriorityLevel;\n currentPriorityLevel = priorityLevel;\n\n try {\n return eventHandler();\n } finally {\n currentPriorityLevel = previousPriorityLevel;\n }\n}\n\nfunction unstable_next(eventHandler) {\n var priorityLevel;\n\n switch (currentPriorityLevel) {\n case ImmediatePriority:\n case UserBlockingPriority:\n case NormalPriority:\n // Shift down to normal priority\n priorityLevel = NormalPriority;\n break;\n\n default:\n // Anything lower than normal priority should remain at the current level.\n priorityLevel = currentPriorityLevel;\n break;\n }\n\n var previousPriorityLevel = currentPriorityLevel;\n currentPriorityLevel = priorityLevel;\n\n try {\n return eventHandler();\n } finally {\n currentPriorityLevel = previousPriorityLevel;\n }\n}\n\nfunction unstable_wrapCallback(callback) {\n var parentPriorityLevel = currentPriorityLevel; // $FlowFixMe[incompatible-return]\n // $FlowFixMe[missing-this-annot]\n\n return function () {\n // This is a fork of runWithPriority, inlined for performance.\n var previousPriorityLevel = currentPriorityLevel;\n currentPriorityLevel = parentPriorityLevel;\n\n try {\n return callback.apply(this, arguments);\n } finally {\n currentPriorityLevel = previousPriorityLevel;\n }\n };\n}\n\nfunction unstable_scheduleCallback(priorityLevel, callback, options) {\n var currentTime = exports.unstable_now();\n var startTime;\n\n if (typeof options === 'object' && options !== null) {\n var delay = options.delay;\n\n if (typeof delay === 'number' && delay > 0) {\n startTime = currentTime + delay;\n } else {\n startTime = currentTime;\n }\n } else {\n startTime = currentTime;\n }\n\n var timeout;\n\n switch (priorityLevel) {\n case ImmediatePriority:\n // Times out immediately\n timeout = -1;\n break;\n\n case UserBlockingPriority:\n // Eventually times out\n timeout = userBlockingPriorityTimeout;\n break;\n\n case IdlePriority:\n // Never times out\n timeout = maxSigned31BitInt;\n break;\n\n case LowPriority:\n // Eventually times out\n timeout = lowPriorityTimeout;\n break;\n\n case NormalPriority:\n default:\n // Eventually times out\n timeout = normalPriorityTimeout;\n break;\n }\n\n var expirationTime = startTime + timeout;\n var newTask = {\n id: taskIdCounter++,\n callback: callback,\n priorityLevel: priorityLevel,\n startTime: startTime,\n expirationTime: expirationTime,\n sortIndex: -1\n };\n\n if (startTime > currentTime) {\n // This is a delayed task.\n newTask.sortIndex = startTime;\n push(timerQueue, newTask);\n\n if (peek(taskQueue) === null && newTask === peek(timerQueue)) {\n // All tasks are delayed, and this is the task with the earliest delay.\n if (isHostTimeoutScheduled) {\n // Cancel an existing timeout.\n cancelHostTimeout();\n } else {\n isHostTimeoutScheduled = true;\n } // Schedule a timeout.\n\n\n requestHostTimeout(handleTimeout, startTime - currentTime);\n }\n } else {\n newTask.sortIndex = expirationTime;\n push(taskQueue, newTask);\n // wait until the next time we yield.\n\n\n if (!isHostCallbackScheduled && !isPerformingWork) {\n isHostCallbackScheduled = true;\n requestHostCallback();\n }\n }\n\n return newTask;\n}\n\nfunction unstable_pauseExecution() {\n}\n\nfunction unstable_continueExecution() {\n\n if (!isHostCallbackScheduled && !isPerformingWork) {\n isHostCallbackScheduled = true;\n requestHostCallback();\n }\n}\n\nfunction unstable_getFirstCallbackNode() {\n return peek(taskQueue);\n}\n\nfunction unstable_cancelCallback(task) {\n // remove from the queue because you can't remove arbitrary nodes from an\n // array based heap, only the first one.)\n\n\n task.callback = null;\n}\n\nfunction unstable_getCurrentPriorityLevel() {\n return currentPriorityLevel;\n}\n\nvar isMessageLoopRunning = false;\nvar taskTimeoutID = -1; // Scheduler periodically yields in case there is other work on the main\n// thread, like user events. By default, it yields multiple times per frame.\n// It does not attempt to align with frame boundaries, since most tasks don't\n// need to be frame aligned; for those that do, use requestAnimationFrame.\n\nvar frameInterval = frameYieldMs;\nvar startTime = -1;\n\nfunction shouldYieldToHost() {\n var timeElapsed = exports.unstable_now() - startTime;\n\n if (timeElapsed < frameInterval) {\n // The main thread has only been blocked for a really short amount of time;\n // smaller than a single frame. Don't yield yet.\n return false;\n } // Yield now.\n\n\n return true;\n}\n\nfunction requestPaint() {}\n\nfunction forceFrameRate(fps) {\n if (fps < 0 || fps > 125) {\n // Using console['error'] to evade Babel and ESLint\n console['error']('forceFrameRate takes a positive int between 0 and 125, ' + 'forcing frame rates higher than 125 fps is not supported');\n return;\n }\n\n if (fps > 0) {\n frameInterval = Math.floor(1000 / fps);\n } else {\n // reset the framerate\n frameInterval = frameYieldMs;\n }\n}\n\nvar performWorkUntilDeadline = function () {\n if (isMessageLoopRunning) {\n var currentTime = exports.unstable_now(); // Keep track of the start time so we can measure how long the main thread\n // has been blocked.\n\n startTime = currentTime; // If a scheduler task throws, exit the current browser task so the\n // error can be observed.\n //\n // Intentionally not using a try-catch, since that makes some debugging\n // techniques harder. Instead, if `flushWork` errors, then `hasMoreWork` will\n // remain true, and we'll continue the work loop.\n\n var hasMoreWork = true;\n\n try {\n hasMoreWork = flushWork(currentTime);\n } finally {\n if (hasMoreWork) {\n // If there's more work, schedule the next message event at the end\n // of the preceding one.\n schedulePerformWorkUntilDeadline();\n } else {\n isMessageLoopRunning = false;\n }\n }\n }\n};\n\nvar schedulePerformWorkUntilDeadline;\n\nif (typeof localSetImmediate === 'function') {\n // Node.js and old IE.\n // There's a few reasons for why we prefer setImmediate.\n //\n // Unlike MessageChannel, it doesn't prevent a Node.js process from exiting.\n // (Even though this is a DOM fork of the Scheduler, you could get here\n // with a mix of Node.js 15+, which has a MessageChannel, and jsdom.)\n // https://github.com/facebook/react/issues/20756\n //\n // But also, it runs earlier which is the semantic we want.\n // If other browsers ever implement it, it's better to use it.\n // Although both of these would be inferior to native scheduling.\n schedulePerformWorkUntilDeadline = function () {\n localSetImmediate(performWorkUntilDeadline);\n };\n} else if (typeof MessageChannel !== 'undefined') {\n // DOM and Worker environments.\n // We prefer MessageChannel because of the 4ms setTimeout clamping.\n var channel = new MessageChannel();\n var port = channel.port2;\n channel.port1.onmessage = performWorkUntilDeadline;\n\n schedulePerformWorkUntilDeadline = function () {\n port.postMessage(null);\n };\n} else {\n // We should only fallback here in non-browser environments.\n schedulePerformWorkUntilDeadline = function () {\n // $FlowFixMe[not-a-function] nullable value\n localSetTimeout(performWorkUntilDeadline, 0);\n };\n}\n\nfunction requestHostCallback() {\n if (!isMessageLoopRunning) {\n isMessageLoopRunning = true;\n schedulePerformWorkUntilDeadline();\n }\n}\n\nfunction requestHostTimeout(callback, ms) {\n // $FlowFixMe[not-a-function] nullable value\n taskTimeoutID = localSetTimeout(function () {\n callback(exports.unstable_now());\n }, ms);\n}\n\nfunction cancelHostTimeout() {\n // $FlowFixMe[not-a-function] nullable value\n localClearTimeout(taskTimeoutID);\n taskTimeoutID = -1;\n}\nvar unstable_Profiling = null;\n\nexports.unstable_IdlePriority = IdlePriority;\nexports.unstable_ImmediatePriority = ImmediatePriority;\nexports.unstable_LowPriority = LowPriority;\nexports.unstable_NormalPriority = NormalPriority;\nexports.unstable_Profiling = unstable_Profiling;\nexports.unstable_UserBlockingPriority = UserBlockingPriority;\nexports.unstable_cancelCallback = unstable_cancelCallback;\nexports.unstable_continueExecution = unstable_continueExecution;\nexports.unstable_forceFrameRate = forceFrameRate;\nexports.unstable_getCurrentPriorityLevel = unstable_getCurrentPriorityLevel;\nexports.unstable_getFirstCallbackNode = unstable_getFirstCallbackNode;\nexports.unstable_next = unstable_next;\nexports.unstable_pauseExecution = unstable_pauseExecution;\nexports.unstable_requestPaint = requestPaint;\nexports.unstable_runWithPriority = unstable_runWithPriority;\nexports.unstable_scheduleCallback = unstable_scheduleCallback;\nexports.unstable_shouldYield = shouldYieldToHost;\nexports.unstable_wrapCallback = unstable_wrapCallback;\n /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\nif (\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop ===\n 'function'\n) {\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());\n}\n \n })();\n}\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/scheduler/cjs/scheduler.development.js?", + ); + + /***/ + }, + + /***/ 9982: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + 'use strict'; + eval( + '\n\nif (false) {} else {\n module.exports = __webpack_require__(213);\n}\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/scheduler/index.js?', + ); + + /***/ + }, + + /***/ 290: /***/ (module) => { + 'use strict'; + module.exports = require('async_hooks'); + + /***/ + }, + + /***/ 6982: /***/ (module) => { + 'use strict'; + module.exports = require('crypto'); + + /***/ + }, + + /***/ 9896: /***/ (module) => { + 'use strict'; + module.exports = require('fs'); + + /***/ + }, + + /***/ 6928: /***/ (module) => { + 'use strict'; + module.exports = require('path'); + + /***/ + }, + + /***/ 4876: /***/ (module) => { + 'use strict'; + module.exports = require('punycode'); + + /***/ + }, + + /***/ 2203: /***/ (module) => { + 'use strict'; + module.exports = require('stream'); + + /***/ + }, + + /***/ 9023: /***/ (module) => { + 'use strict'; + module.exports = require('util'); + + /***/ + }, + + /***/ 2475: /***/ (module) => { + eval( + 'function _assertThisInitialized(e) {\n if (void 0 === e) throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");\n return e;\n}\nmodule.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports["default"] = module.exports;\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@babel/runtime/helpers/assertThisInitialized.js?', + ); + + /***/ + }, + + /***/ 4634: /***/ (module) => { + eval( + 'function _extends() {\n return module.exports = _extends = Object.assign ? Object.assign.bind() : function (n) {\n for (var e = 1; e < arguments.length; e++) {\n var t = arguments[e];\n for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);\n }\n return n;\n }, module.exports.__esModule = true, module.exports["default"] = module.exports, _extends.apply(null, arguments);\n}\nmodule.exports = _extends, module.exports.__esModule = true, module.exports["default"] = module.exports;\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@babel/runtime/helpers/extends.js?', + ); + + /***/ + }, + + /***/ 6221: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var setPrototypeOf = __webpack_require__(3255);\nfunction _inheritsLoose(t, o) {\n t.prototype = Object.create(o.prototype), t.prototype.constructor = t, setPrototypeOf(t, o);\n}\nmodule.exports = _inheritsLoose, module.exports.__esModule = true, module.exports["default"] = module.exports;\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@babel/runtime/helpers/inheritsLoose.js?', + ); + + /***/ + }, + + /***/ 4893: /***/ (module) => { + eval( + 'function _objectWithoutPropertiesLoose(r, e) {\n if (null == r) return {};\n var t = {};\n for (var n in r) if ({}.hasOwnProperty.call(r, n)) {\n if (e.includes(n)) continue;\n t[n] = r[n];\n }\n return t;\n}\nmodule.exports = _objectWithoutPropertiesLoose, module.exports.__esModule = true, module.exports["default"] = module.exports;\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js?', + ); + + /***/ + }, + + /***/ 3255: /***/ (module) => { + eval( + 'function _setPrototypeOf(t, e) {\n return module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {\n return t.__proto__ = e, t;\n }, module.exports.__esModule = true, module.exports["default"] = module.exports, _setPrototypeOf(t, e);\n}\nmodule.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@babel/runtime/helpers/setPrototypeOf.js?', + ); + + /***/ + }, + + /***/ 7404: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '\n// EXPORTS\n__webpack_require__.d(__webpack_exports__, {\n D: () => (/* binding */ InMemoryCache)\n});\n\n// EXTERNAL MODULE: ./node_modules/tslib/tslib.es6.mjs\nvar tslib_es6 = __webpack_require__(1635);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/globals/index.js + 4 modules\nvar globals = __webpack_require__(6319);\n// EXTERNAL MODULE: ./node_modules/optimism/lib/index.js + 7 modules\nvar lib = __webpack_require__(1161);\n// EXTERNAL MODULE: ./node_modules/@wry/equality/lib/index.js\nvar equality_lib = __webpack_require__(5381);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/graphql/fragments.js\nvar graphql_fragments = __webpack_require__(5215);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/caching/sizes.js\nvar sizes = __webpack_require__(1212);\n// EXTERNAL MODULE: ./node_modules/zen-observable-ts/module.js\nvar zen_observable_ts_module = __webpack_require__(3401);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/common/mergeDeep.js\nvar mergeDeep = __webpack_require__(2922);\n// EXTERNAL MODULE: ./node_modules/@wry/caches/lib/weak.js\nvar weak = __webpack_require__(1744);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/caching/getMemoryInternals.js\nvar getMemoryInternals = __webpack_require__(5051);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/core/equalByQuery.js\nvar equalByQuery = __webpack_require__(9080);\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/cache/core/cache.js\n\n\n\n\n\n\nvar ApolloCache = /** @class */ (function () {\n function ApolloCache() {\n this.assumeImmutableResults = false;\n // Make sure we compute the same (===) fragment query document every\n // time we receive the same fragment in readFragment.\n this.getFragmentDoc = (0,lib/* wrap */.LV)(graphql_fragments/* getFragmentQueryDocument */.ct, {\n max: sizes/* cacheSizes */.v["cache.fragmentQueryDocuments"] ||\n 1000 /* defaultCacheSizes["cache.fragmentQueryDocuments"] */,\n cache: weak/* WeakCache */.l,\n });\n }\n // Transactional API\n // The batch method is intended to replace/subsume both performTransaction\n // and recordOptimisticTransaction, but performTransaction came first, so we\n // provide a default batch implementation that\'s just another way of calling\n // performTransaction. Subclasses of ApolloCache (such as InMemoryCache) can\n // override the batch method to do more interesting things with its options.\n ApolloCache.prototype.batch = function (options) {\n var _this = this;\n var optimisticId = typeof options.optimistic === "string" ? options.optimistic\n : options.optimistic === false ? null\n : void 0;\n var updateResult;\n this.performTransaction(function () { return (updateResult = options.update(_this)); }, optimisticId);\n return updateResult;\n };\n ApolloCache.prototype.recordOptimisticTransaction = function (transaction, optimisticId) {\n this.performTransaction(transaction, optimisticId);\n };\n // Optional API\n // Called once per input document, allowing the cache to make static changes\n // to the query, such as adding __typename fields.\n ApolloCache.prototype.transformDocument = function (document) {\n return document;\n };\n // Called before each ApolloLink request, allowing the cache to make dynamic\n // changes to the query, such as filling in missing fragment definitions.\n ApolloCache.prototype.transformForLink = function (document) {\n return document;\n };\n ApolloCache.prototype.identify = function (object) {\n return;\n };\n ApolloCache.prototype.gc = function () {\n return [];\n };\n ApolloCache.prototype.modify = function (options) {\n return false;\n };\n // DataProxy API\n ApolloCache.prototype.readQuery = function (options, optimistic) {\n if (optimistic === void 0) { optimistic = !!options.optimistic; }\n return this.read((0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, options), { rootId: options.id || "ROOT_QUERY", optimistic: optimistic }));\n };\n /** {@inheritDoc @apollo/client!ApolloClient#watchFragment:member(1)} */\n ApolloCache.prototype.watchFragment = function (options) {\n var _this = this;\n var fragment = options.fragment, fragmentName = options.fragmentName, from = options.from, _a = options.optimistic, optimistic = _a === void 0 ? true : _a;\n var query = this.getFragmentDoc(fragment, fragmentName);\n var diffOptions = {\n returnPartialData: true,\n id: typeof from === "string" ? from : this.identify(from),\n query: query,\n optimistic: optimistic,\n };\n var latestDiff;\n return new zen_observable_ts_module/* Observable */.c(function (observer) {\n return _this.watch((0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, diffOptions), { immediate: true, callback: function (diff) {\n if (\n // Always ensure we deliver the first result\n latestDiff &&\n (0,equalByQuery/* equalByQuery */.a)(query, { data: latestDiff === null || latestDiff === void 0 ? void 0 : latestDiff.result }, { data: diff.result })) {\n return;\n }\n var result = {\n data: diff.result,\n complete: !!diff.complete,\n };\n if (diff.missing) {\n result.missing = (0,mergeDeep/* mergeDeepArray */.IM)(diff.missing.map(function (error) { return error.missing; }));\n }\n latestDiff = diff;\n observer.next(result);\n } }));\n });\n };\n ApolloCache.prototype.readFragment = function (options, optimistic) {\n if (optimistic === void 0) { optimistic = !!options.optimistic; }\n return this.read((0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, options), { query: this.getFragmentDoc(options.fragment, options.fragmentName), rootId: options.id, optimistic: optimistic }));\n };\n ApolloCache.prototype.writeQuery = function (_a) {\n var id = _a.id, data = _a.data, options = (0,tslib_es6/* __rest */.Tt)(_a, ["id", "data"]);\n return this.write(Object.assign(options, {\n dataId: id || "ROOT_QUERY",\n result: data,\n }));\n };\n ApolloCache.prototype.writeFragment = function (_a) {\n var id = _a.id, data = _a.data, fragment = _a.fragment, fragmentName = _a.fragmentName, options = (0,tslib_es6/* __rest */.Tt)(_a, ["id", "data", "fragment", "fragmentName"]);\n return this.write(Object.assign(options, {\n query: this.getFragmentDoc(fragment, fragmentName),\n dataId: id,\n result: data,\n }));\n };\n ApolloCache.prototype.updateQuery = function (options, update) {\n return this.batch({\n update: function (cache) {\n var value = cache.readQuery(options);\n var data = update(value);\n if (data === void 0 || data === null)\n return value;\n cache.writeQuery((0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, options), { data: data }));\n return data;\n },\n });\n };\n ApolloCache.prototype.updateFragment = function (options, update) {\n return this.batch({\n update: function (cache) {\n var value = cache.readFragment(options);\n var data = update(value);\n if (data === void 0 || data === null)\n return value;\n cache.writeFragment((0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, options), { data: data }));\n return data;\n },\n });\n };\n return ApolloCache;\n}());\n\nif (globalThis.__DEV__ !== false) {\n ApolloCache.prototype.getMemoryInternals = getMemoryInternals/* getApolloCacheMemoryInternals */.tQ;\n}\n//# sourceMappingURL=cache.js.map\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/cache/core/types/common.js\n\nvar MissingFieldError = /** @class */ (function (_super) {\n (0,tslib_es6/* __extends */.C6)(MissingFieldError, _super);\n function MissingFieldError(message, path, query, variables) {\n var _a;\n // \'Error\' breaks prototype chain here\n var _this = _super.call(this, message) || this;\n _this.message = message;\n _this.path = path;\n _this.query = query;\n _this.variables = variables;\n if (Array.isArray(_this.path)) {\n _this.missing = _this.message;\n for (var i = _this.path.length - 1; i >= 0; --i) {\n _this.missing = (_a = {}, _a[_this.path[i]] = _this.missing, _a);\n }\n }\n else {\n _this.missing = _this.path;\n }\n // We\'re not using `Object.setPrototypeOf` here as it isn\'t fully supported\n // on Android (see issue #3236).\n _this.__proto__ = MissingFieldError.prototype;\n return _this;\n }\n return MissingFieldError;\n}(Error));\n\n//# sourceMappingURL=common.js.map\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/graphql/DocumentTransform.js\nvar DocumentTransform = __webpack_require__(9993);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/graphql/transform.js\nvar transform = __webpack_require__(3902);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/common/canonicalStringify.js\nvar canonicalStringify = __webpack_require__(6269);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/graphql/print.js + 2 modules\nvar print = __webpack_require__(2417);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/graphql/storeUtils.js\nvar storeUtils = __webpack_require__(7194);\n// EXTERNAL MODULE: ./node_modules/graphql/language/kinds.mjs\nvar kinds = __webpack_require__(3298);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/common/canUse.js\nvar canUse = __webpack_require__(2619);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/common/compact.js\nvar compact = __webpack_require__(7945);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/graphql/getFromAST.js\nvar getFromAST = __webpack_require__(4824);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/graphql/directives.js\nvar directives = __webpack_require__(1250);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/common/maybeDeepFreeze.js\nvar maybeDeepFreeze = __webpack_require__(1469);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/common/objects.js\nvar objects = __webpack_require__(2456);\n// EXTERNAL MODULE: ./node_modules/@wry/trie/lib/index.js\nvar trie_lib = __webpack_require__(2453);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/common/arrays.js\nvar arrays = __webpack_require__(5636);\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/cache/inmemory/helpers.js\n\nvar hasOwn = Object.prototype.hasOwnProperty;\nfunction isNullish(value) {\n return value === null || value === void 0;\n}\n\nfunction defaultDataIdFromObject(_a, context) {\n var __typename = _a.__typename, id = _a.id, _id = _a._id;\n if (typeof __typename === "string") {\n if (context) {\n context.keyObject =\n !isNullish(id) ? { id: id }\n : !isNullish(_id) ? { _id: _id }\n : void 0;\n }\n // If there is no object.id, fall back to object._id.\n if (isNullish(id) && !isNullish(_id)) {\n id = _id;\n }\n if (!isNullish(id)) {\n return "".concat(__typename, ":").concat(typeof id === "number" || typeof id === "string" ?\n id\n : JSON.stringify(id));\n }\n }\n}\nvar defaultConfig = {\n dataIdFromObject: defaultDataIdFromObject,\n addTypename: true,\n resultCaching: true,\n // Thanks to the shouldCanonizeResults helper, this should be the only line\n // you have to change to reenable canonization by default in the future.\n canonizeResults: false,\n};\nfunction normalizeConfig(config) {\n return (0,compact/* compact */.o)(defaultConfig, config);\n}\nfunction shouldCanonizeResults(config) {\n var value = config.canonizeResults;\n return value === void 0 ? defaultConfig.canonizeResults : value;\n}\nfunction getTypenameFromStoreObject(store, objectOrReference) {\n return (0,storeUtils/* isReference */.A_)(objectOrReference) ?\n store.get(objectOrReference.__ref, "__typename")\n : objectOrReference && objectOrReference.__typename;\n}\nvar TypeOrFieldNameRegExp = /^[_a-z][_0-9a-z]*/i;\nfunction fieldNameFromStoreName(storeFieldName) {\n var match = storeFieldName.match(TypeOrFieldNameRegExp);\n return match ? match[0] : storeFieldName;\n}\nfunction selectionSetMatchesResult(selectionSet, result, variables) {\n if ((0,objects/* isNonNullObject */.U)(result)) {\n return (0,arrays/* isArray */.c)(result) ?\n result.every(function (item) {\n return selectionSetMatchesResult(selectionSet, item, variables);\n })\n : selectionSet.selections.every(function (field) {\n if ((0,storeUtils/* isField */.dt)(field) && (0,directives/* shouldInclude */.MS)(field, variables)) {\n var key = (0,storeUtils/* resultKeyNameFromField */.ue)(field);\n return (hasOwn.call(result, key) &&\n (!field.selectionSet ||\n selectionSetMatchesResult(field.selectionSet, result[key], variables)));\n }\n // If the selection has been skipped with @skip(true) or\n // @include(false), it should not count against the matching. If\n // the selection is not a field, it must be a fragment (inline or\n // named). We will determine if selectionSetMatchesResult for that\n // fragment when we get to it, so for now we return true.\n return true;\n });\n }\n return false;\n}\nfunction storeValueIsStoreObject(value) {\n return (0,objects/* isNonNullObject */.U)(value) && !(0,storeUtils/* isReference */.A_)(value) && !(0,arrays/* isArray */.c)(value);\n}\nfunction makeProcessedFieldsMerger() {\n return new mergeDeep/* DeepMerger */.ZI();\n}\nfunction extractFragmentContext(document, fragments) {\n // FragmentMap consisting only of fragments defined directly in document, not\n // including other fragments registered in the FragmentRegistry.\n var fragmentMap = (0,graphql_fragments/* createFragmentMap */.JG)((0,getFromAST/* getFragmentDefinitions */.zK)(document));\n return {\n fragmentMap: fragmentMap,\n lookupFragment: function (name) {\n var def = fragmentMap[name];\n if (!def && fragments) {\n def = fragments.lookup(name);\n }\n return def || null;\n },\n };\n}\n//# sourceMappingURL=helpers.js.map\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/cache/inmemory/entityStore.js\n\n\n\n\n\n\n\nvar DELETE = Object.create(null);\nvar delModifier = function () { return DELETE; };\nvar INVALIDATE = Object.create(null);\nvar EntityStore = /** @class */ (function () {\n function EntityStore(policies, group) {\n var _this = this;\n this.policies = policies;\n this.group = group;\n this.data = Object.create(null);\n // Maps root entity IDs to the number of times they have been retained, minus\n // the number of times they have been released. Retained entities keep other\n // entities they reference (even indirectly) from being garbage collected.\n this.rootIds = Object.create(null);\n // Lazily tracks { __ref: <dataId> } strings contained by this.data[dataId].\n this.refs = Object.create(null);\n // Bound function that can be passed around to provide easy access to fields\n // of Reference objects as well as ordinary objects.\n this.getFieldValue = function (objectOrReference, storeFieldName) {\n return (0,maybeDeepFreeze/* maybeDeepFreeze */.G)((0,storeUtils/* isReference */.A_)(objectOrReference) ?\n _this.get(objectOrReference.__ref, storeFieldName)\n : objectOrReference && objectOrReference[storeFieldName]);\n };\n // Returns true for non-normalized StoreObjects and non-dangling\n // References, indicating that readField(name, objOrRef) has a chance of\n // working. Useful for filtering out dangling references from lists.\n this.canRead = function (objOrRef) {\n return (0,storeUtils/* isReference */.A_)(objOrRef) ?\n _this.has(objOrRef.__ref)\n : typeof objOrRef === "object";\n };\n // Bound function that converts an id or an object with a __typename and\n // primary key fields to a Reference object. If called with a Reference object,\n // that same Reference object is returned. Pass true for mergeIntoStore to persist\n // an object into the store.\n this.toReference = function (objOrIdOrRef, mergeIntoStore) {\n if (typeof objOrIdOrRef === "string") {\n return (0,storeUtils/* makeReference */.WU)(objOrIdOrRef);\n }\n if ((0,storeUtils/* isReference */.A_)(objOrIdOrRef)) {\n return objOrIdOrRef;\n }\n var id = _this.policies.identify(objOrIdOrRef)[0];\n if (id) {\n var ref = (0,storeUtils/* makeReference */.WU)(id);\n if (mergeIntoStore) {\n _this.merge(id, objOrIdOrRef);\n }\n return ref;\n }\n };\n }\n // Although the EntityStore class is abstract, it contains concrete\n // implementations of the various NormalizedCache interface methods that\n // are inherited by the Root and Layer subclasses.\n EntityStore.prototype.toObject = function () {\n return (0,tslib_es6/* __assign */.Cl)({}, this.data);\n };\n EntityStore.prototype.has = function (dataId) {\n return this.lookup(dataId, true) !== void 0;\n };\n EntityStore.prototype.get = function (dataId, fieldName) {\n this.group.depend(dataId, fieldName);\n if (hasOwn.call(this.data, dataId)) {\n var storeObject = this.data[dataId];\n if (storeObject && hasOwn.call(storeObject, fieldName)) {\n return storeObject[fieldName];\n }\n }\n if (fieldName === "__typename" &&\n hasOwn.call(this.policies.rootTypenamesById, dataId)) {\n return this.policies.rootTypenamesById[dataId];\n }\n if (this instanceof Layer) {\n return this.parent.get(dataId, fieldName);\n }\n };\n EntityStore.prototype.lookup = function (dataId, dependOnExistence) {\n // The has method (above) calls lookup with dependOnExistence = true, so\n // that it can later be invalidated when we add or remove a StoreObject for\n // this dataId. Any consumer who cares about the contents of the StoreObject\n // should not rely on this dependency, since the contents could change\n // without the object being added or removed.\n if (dependOnExistence)\n this.group.depend(dataId, "__exists");\n if (hasOwn.call(this.data, dataId)) {\n return this.data[dataId];\n }\n if (this instanceof Layer) {\n return this.parent.lookup(dataId, dependOnExistence);\n }\n if (this.policies.rootTypenamesById[dataId]) {\n return Object.create(null);\n }\n };\n EntityStore.prototype.merge = function (older, newer) {\n var _this = this;\n var dataId;\n // Convert unexpected references to ID strings.\n if ((0,storeUtils/* isReference */.A_)(older))\n older = older.__ref;\n if ((0,storeUtils/* isReference */.A_)(newer))\n newer = newer.__ref;\n var existing = typeof older === "string" ? this.lookup((dataId = older)) : older;\n var incoming = typeof newer === "string" ? this.lookup((dataId = newer)) : newer;\n // If newer was a string ID, but that ID was not defined in this store,\n // then there are no fields to be merged, so we\'re done.\n if (!incoming)\n return;\n (0,globals/* invariant */.V1)(typeof dataId === "string", 1);\n var merged = new mergeDeep/* DeepMerger */.ZI(storeObjectReconciler).merge(existing, incoming);\n // Even if merged === existing, existing may have come from a lower\n // layer, so we always need to set this.data[dataId] on this level.\n this.data[dataId] = merged;\n if (merged !== existing) {\n delete this.refs[dataId];\n if (this.group.caching) {\n var fieldsToDirty_1 = Object.create(null);\n // If we added a new StoreObject where there was previously none, dirty\n // anything that depended on the existence of this dataId, such as the\n // EntityStore#has method.\n if (!existing)\n fieldsToDirty_1.__exists = 1;\n // Now invalidate dependents who called getFieldValue for any fields\n // that are changing as a result of this merge.\n Object.keys(incoming).forEach(function (storeFieldName) {\n if (!existing ||\n existing[storeFieldName] !== merged[storeFieldName]) {\n // Always dirty the full storeFieldName, which may include\n // serialized arguments following the fieldName prefix.\n fieldsToDirty_1[storeFieldName] = 1;\n // Also dirty fieldNameFromStoreName(storeFieldName) if it\'s\n // different from storeFieldName and this field does not have\n // keyArgs configured, because that means the cache can\'t make\n // any assumptions about how field values with the same field\n // name but different arguments might be interrelated, so it\n // must err on the side of invalidating all field values that\n // share the same short fieldName, regardless of arguments.\n var fieldName = fieldNameFromStoreName(storeFieldName);\n if (fieldName !== storeFieldName &&\n !_this.policies.hasKeyArgs(merged.__typename, fieldName)) {\n fieldsToDirty_1[fieldName] = 1;\n }\n // If merged[storeFieldName] has become undefined, and this is the\n // Root layer, actually delete the property from the merged object,\n // which is guaranteed to have been created fresh in this method.\n if (merged[storeFieldName] === void 0 && !(_this instanceof Layer)) {\n delete merged[storeFieldName];\n }\n }\n });\n if (fieldsToDirty_1.__typename &&\n !(existing && existing.__typename) &&\n // Since we return default root __typename strings\n // automatically from store.get, we don\'t need to dirty the\n // ROOT_QUERY.__typename field if merged.__typename is equal\n // to the default string (usually "Query").\n this.policies.rootTypenamesById[dataId] === merged.__typename) {\n delete fieldsToDirty_1.__typename;\n }\n Object.keys(fieldsToDirty_1).forEach(function (fieldName) {\n return _this.group.dirty(dataId, fieldName);\n });\n }\n }\n };\n EntityStore.prototype.modify = function (dataId, fields) {\n var _this = this;\n var storeObject = this.lookup(dataId);\n if (storeObject) {\n var changedFields_1 = Object.create(null);\n var needToMerge_1 = false;\n var allDeleted_1 = true;\n var sharedDetails_1 = {\n DELETE: DELETE,\n INVALIDATE: INVALIDATE,\n isReference: storeUtils/* isReference */.A_,\n toReference: this.toReference,\n canRead: this.canRead,\n readField: function (fieldNameOrOptions, from) {\n return _this.policies.readField(typeof fieldNameOrOptions === "string" ?\n {\n fieldName: fieldNameOrOptions,\n from: from || (0,storeUtils/* makeReference */.WU)(dataId),\n }\n : fieldNameOrOptions, { store: _this });\n },\n };\n Object.keys(storeObject).forEach(function (storeFieldName) {\n var fieldName = fieldNameFromStoreName(storeFieldName);\n var fieldValue = storeObject[storeFieldName];\n if (fieldValue === void 0)\n return;\n var modify = typeof fields === "function" ? fields : (fields[storeFieldName] || fields[fieldName]);\n if (modify) {\n var newValue = modify === delModifier ? DELETE : (modify((0,maybeDeepFreeze/* maybeDeepFreeze */.G)(fieldValue), (0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, sharedDetails_1), { fieldName: fieldName, storeFieldName: storeFieldName, storage: _this.getStorage(dataId, storeFieldName) })));\n if (newValue === INVALIDATE) {\n _this.group.dirty(dataId, storeFieldName);\n }\n else {\n if (newValue === DELETE)\n newValue = void 0;\n if (newValue !== fieldValue) {\n changedFields_1[storeFieldName] = newValue;\n needToMerge_1 = true;\n fieldValue = newValue;\n if (globalThis.__DEV__ !== false) {\n var checkReference = function (ref) {\n if (_this.lookup(ref.__ref) === undefined) {\n globalThis.__DEV__ !== false && globals/* invariant */.V1.warn(2, ref);\n return true;\n }\n };\n if ((0,storeUtils/* isReference */.A_)(newValue)) {\n checkReference(newValue);\n }\n else if (Array.isArray(newValue)) {\n // Warn about writing "mixed" arrays of Reference and non-Reference objects\n var seenReference = false;\n var someNonReference = void 0;\n for (var _i = 0, newValue_1 = newValue; _i < newValue_1.length; _i++) {\n var value = newValue_1[_i];\n if ((0,storeUtils/* isReference */.A_)(value)) {\n seenReference = true;\n if (checkReference(value))\n break;\n }\n else {\n // Do not warn on primitive values, since those could never be represented\n // by a reference. This is a valid (albeit uncommon) use case.\n if (typeof value === "object" && !!value) {\n var id = _this.policies.identify(value)[0];\n // check if object could even be referenced, otherwise we are not interested in it for this warning\n if (id) {\n someNonReference = value;\n }\n }\n }\n if (seenReference && someNonReference !== undefined) {\n globalThis.__DEV__ !== false && globals/* invariant */.V1.warn(3, someNonReference);\n break;\n }\n }\n }\n }\n }\n }\n }\n if (fieldValue !== void 0) {\n allDeleted_1 = false;\n }\n });\n if (needToMerge_1) {\n this.merge(dataId, changedFields_1);\n if (allDeleted_1) {\n if (this instanceof Layer) {\n this.data[dataId] = void 0;\n }\n else {\n delete this.data[dataId];\n }\n this.group.dirty(dataId, "__exists");\n }\n return true;\n }\n }\n return false;\n };\n // If called with only one argument, removes the entire entity\n // identified by dataId. If called with a fieldName as well, removes all\n // fields of that entity whose names match fieldName according to the\n // fieldNameFromStoreName helper function. If called with a fieldName\n // and variables, removes all fields of that entity whose names match fieldName\n // and whose arguments when cached exactly match the variables passed.\n EntityStore.prototype.delete = function (dataId, fieldName, args) {\n var _a;\n var storeObject = this.lookup(dataId);\n if (storeObject) {\n var typename = this.getFieldValue(storeObject, "__typename");\n var storeFieldName = fieldName && args ?\n this.policies.getStoreFieldName({ typename: typename, fieldName: fieldName, args: args })\n : fieldName;\n return this.modify(dataId, storeFieldName ? (_a = {},\n _a[storeFieldName] = delModifier,\n _a) : delModifier);\n }\n return false;\n };\n EntityStore.prototype.evict = function (options, limit) {\n var evicted = false;\n if (options.id) {\n if (hasOwn.call(this.data, options.id)) {\n evicted = this.delete(options.id, options.fieldName, options.args);\n }\n if (this instanceof Layer && this !== limit) {\n evicted = this.parent.evict(options, limit) || evicted;\n }\n // Always invalidate the field to trigger rereading of watched\n // queries, even if no cache data was modified by the eviction,\n // because queries may depend on computed fields with custom read\n // functions, whose values are not stored in the EntityStore.\n if (options.fieldName || evicted) {\n this.group.dirty(options.id, options.fieldName || "__exists");\n }\n }\n return evicted;\n };\n EntityStore.prototype.clear = function () {\n this.replace(null);\n };\n EntityStore.prototype.extract = function () {\n var _this = this;\n var obj = this.toObject();\n var extraRootIds = [];\n this.getRootIdSet().forEach(function (id) {\n if (!hasOwn.call(_this.policies.rootTypenamesById, id)) {\n extraRootIds.push(id);\n }\n });\n if (extraRootIds.length) {\n obj.__META = { extraRootIds: extraRootIds.sort() };\n }\n return obj;\n };\n EntityStore.prototype.replace = function (newData) {\n var _this = this;\n Object.keys(this.data).forEach(function (dataId) {\n if (!(newData && hasOwn.call(newData, dataId))) {\n _this.delete(dataId);\n }\n });\n if (newData) {\n var __META = newData.__META, rest_1 = (0,tslib_es6/* __rest */.Tt)(newData, ["__META"]);\n Object.keys(rest_1).forEach(function (dataId) {\n _this.merge(dataId, rest_1[dataId]);\n });\n if (__META) {\n __META.extraRootIds.forEach(this.retain, this);\n }\n }\n };\n EntityStore.prototype.retain = function (rootId) {\n return (this.rootIds[rootId] = (this.rootIds[rootId] || 0) + 1);\n };\n EntityStore.prototype.release = function (rootId) {\n if (this.rootIds[rootId] > 0) {\n var count = --this.rootIds[rootId];\n if (!count)\n delete this.rootIds[rootId];\n return count;\n }\n return 0;\n };\n // Return a Set<string> of all the ID strings that have been retained by\n // this layer/root *and* any layers/roots beneath it.\n EntityStore.prototype.getRootIdSet = function (ids) {\n if (ids === void 0) { ids = new Set(); }\n Object.keys(this.rootIds).forEach(ids.add, ids);\n if (this instanceof Layer) {\n this.parent.getRootIdSet(ids);\n }\n else {\n // Official singleton IDs like ROOT_QUERY and ROOT_MUTATION are\n // always considered roots for garbage collection, regardless of\n // their retainment counts in this.rootIds.\n Object.keys(this.policies.rootTypenamesById).forEach(ids.add, ids);\n }\n return ids;\n };\n // The goal of garbage collection is to remove IDs from the Root layer of the\n // store that are no longer reachable starting from any IDs that have been\n // explicitly retained (see retain and release, above). Returns an array of\n // dataId strings that were removed from the store.\n EntityStore.prototype.gc = function () {\n var _this = this;\n var ids = this.getRootIdSet();\n var snapshot = this.toObject();\n ids.forEach(function (id) {\n if (hasOwn.call(snapshot, id)) {\n // Because we are iterating over an ECMAScript Set, the IDs we add here\n // will be visited in later iterations of the forEach loop only if they\n // were not previously contained by the Set.\n Object.keys(_this.findChildRefIds(id)).forEach(ids.add, ids);\n // By removing IDs from the snapshot object here, we protect them from\n // getting removed from the root store layer below.\n delete snapshot[id];\n }\n });\n var idsToRemove = Object.keys(snapshot);\n if (idsToRemove.length) {\n var root_1 = this;\n while (root_1 instanceof Layer)\n root_1 = root_1.parent;\n idsToRemove.forEach(function (id) { return root_1.delete(id); });\n }\n return idsToRemove;\n };\n EntityStore.prototype.findChildRefIds = function (dataId) {\n if (!hasOwn.call(this.refs, dataId)) {\n var found_1 = (this.refs[dataId] = Object.create(null));\n var root = this.data[dataId];\n if (!root)\n return found_1;\n var workSet_1 = new Set([root]);\n // Within the store, only arrays and objects can contain child entity\n // references, so we can prune the traversal using this predicate:\n workSet_1.forEach(function (obj) {\n if ((0,storeUtils/* isReference */.A_)(obj)) {\n found_1[obj.__ref] = true;\n // In rare cases, a { __ref } Reference object may have other fields.\n // This often indicates a mismerging of References with StoreObjects,\n // but garbage collection should not be fooled by a stray __ref\n // property in a StoreObject (ignoring all the other fields just\n // because the StoreObject looks like a Reference). To avoid this\n // premature termination of findChildRefIds recursion, we fall through\n // to the code below, which will handle any other properties of obj.\n }\n if ((0,objects/* isNonNullObject */.U)(obj)) {\n Object.keys(obj).forEach(function (key) {\n var child = obj[key];\n // No need to add primitive values to the workSet, since they cannot\n // contain reference objects.\n if ((0,objects/* isNonNullObject */.U)(child)) {\n workSet_1.add(child);\n }\n });\n }\n });\n }\n return this.refs[dataId];\n };\n EntityStore.prototype.makeCacheKey = function () {\n return this.group.keyMaker.lookupArray(arguments);\n };\n return EntityStore;\n}());\n\n// A single CacheGroup represents a set of one or more EntityStore objects,\n// typically the Root store in a CacheGroup by itself, and all active Layer\n// stores in a group together. A single EntityStore object belongs to only\n// one CacheGroup, store.group. The CacheGroup is responsible for tracking\n// dependencies, so store.group is helpful for generating unique keys for\n// cached results that need to be invalidated when/if those dependencies\n// change. If we used the EntityStore objects themselves as cache keys (that\n// is, store rather than store.group), the cache would become unnecessarily\n// fragmented by all the different Layer objects. Instead, the CacheGroup\n// approach allows all optimistic Layer objects in the same linked list to\n// belong to one CacheGroup, with the non-optimistic Root object belonging\n// to another CacheGroup, allowing resultCaching dependencies to be tracked\n// separately for optimistic and non-optimistic entity data.\nvar CacheGroup = /** @class */ (function () {\n function CacheGroup(caching, parent) {\n if (parent === void 0) { parent = null; }\n this.caching = caching;\n this.parent = parent;\n this.d = null;\n this.resetCaching();\n }\n CacheGroup.prototype.resetCaching = function () {\n this.d = this.caching ? (0,lib/* dep */.yN)() : null;\n this.keyMaker = new trie_lib/* Trie */.b(canUse/* canUseWeakMap */.et);\n };\n CacheGroup.prototype.depend = function (dataId, storeFieldName) {\n if (this.d) {\n this.d(makeDepKey(dataId, storeFieldName));\n var fieldName = fieldNameFromStoreName(storeFieldName);\n if (fieldName !== storeFieldName) {\n // Fields with arguments that contribute extra identifying\n // information to the fieldName (thus forming the storeFieldName)\n // depend not only on the full storeFieldName but also on the\n // short fieldName, so the field can be invalidated using either\n // level of specificity.\n this.d(makeDepKey(dataId, fieldName));\n }\n if (this.parent) {\n this.parent.depend(dataId, storeFieldName);\n }\n }\n };\n CacheGroup.prototype.dirty = function (dataId, storeFieldName) {\n if (this.d) {\n this.d.dirty(makeDepKey(dataId, storeFieldName), \n // When storeFieldName === "__exists", that means the entity identified\n // by dataId has either disappeared from the cache or was newly added,\n // so the result caching system would do well to "forget everything it\n // knows" about that object. To achieve that kind of invalidation, we\n // not only dirty the associated result cache entry, but also remove it\n // completely from the dependency graph. For the optimism implementation\n // details, see https://github.com/benjamn/optimism/pull/195.\n storeFieldName === "__exists" ? "forget" : "setDirty");\n }\n };\n return CacheGroup;\n}());\nfunction makeDepKey(dataId, storeFieldName) {\n // Since field names cannot have \'#\' characters in them, this method\n // of joining the field name and the ID should be unambiguous, and much\n // cheaper than JSON.stringify([dataId, fieldName]).\n return storeFieldName + "#" + dataId;\n}\nfunction maybeDependOnExistenceOfEntity(store, entityId) {\n if (supportsResultCaching(store)) {\n // We use this pseudo-field __exists elsewhere in the EntityStore code to\n // represent changes in the existence of the entity object identified by\n // entityId. This dependency gets reliably dirtied whenever an object with\n // this ID is deleted (or newly created) within this group, so any result\n // cache entries (for example, StoreReader#executeSelectionSet results) that\n // depend on __exists for this entityId will get dirtied as well, leading to\n // the eventual recomputation (instead of reuse) of those result objects the\n // next time someone reads them from the cache.\n store.group.depend(entityId, "__exists");\n }\n}\n(function (EntityStore) {\n // Refer to this class as EntityStore.Root outside this namespace.\n var Root = /** @class */ (function (_super) {\n (0,tslib_es6/* __extends */.C6)(Root, _super);\n function Root(_a) {\n var policies = _a.policies, _b = _a.resultCaching, resultCaching = _b === void 0 ? true : _b, seed = _a.seed;\n var _this = _super.call(this, policies, new CacheGroup(resultCaching)) || this;\n _this.stump = new Stump(_this);\n _this.storageTrie = new trie_lib/* Trie */.b(canUse/* canUseWeakMap */.et);\n if (seed)\n _this.replace(seed);\n return _this;\n }\n Root.prototype.addLayer = function (layerId, replay) {\n // Adding an optimistic Layer on top of the Root actually adds the Layer\n // on top of the Stump, so the Stump always comes between the Root and\n // any Layer objects that we\'ve added.\n return this.stump.addLayer(layerId, replay);\n };\n Root.prototype.removeLayer = function () {\n // Never remove the root layer.\n return this;\n };\n Root.prototype.getStorage = function () {\n return this.storageTrie.lookupArray(arguments);\n };\n return Root;\n }(EntityStore));\n EntityStore.Root = Root;\n})(EntityStore || (EntityStore = {}));\n// Not exported, since all Layer instances are created by the addLayer method\n// of the EntityStore.Root class.\nvar Layer = /** @class */ (function (_super) {\n (0,tslib_es6/* __extends */.C6)(Layer, _super);\n function Layer(id, parent, replay, group) {\n var _this = _super.call(this, parent.policies, group) || this;\n _this.id = id;\n _this.parent = parent;\n _this.replay = replay;\n _this.group = group;\n replay(_this);\n return _this;\n }\n Layer.prototype.addLayer = function (layerId, replay) {\n return new Layer(layerId, this, replay, this.group);\n };\n Layer.prototype.removeLayer = function (layerId) {\n var _this = this;\n // Remove all instances of the given id, not just the first one.\n var parent = this.parent.removeLayer(layerId);\n if (layerId === this.id) {\n if (this.group.caching) {\n // Dirty every ID we\'re removing. Technically we might be able to avoid\n // dirtying fields that have values in higher layers, but we don\'t have\n // easy access to higher layers here, and we\'re about to recreate those\n // layers anyway (see parent.addLayer below).\n Object.keys(this.data).forEach(function (dataId) {\n var ownStoreObject = _this.data[dataId];\n var parentStoreObject = parent["lookup"](dataId);\n if (!parentStoreObject) {\n // The StoreObject identified by dataId was defined in this layer\n // but will be undefined in the parent layer, so we can delete the\n // whole entity using this.delete(dataId). Since we\'re about to\n // throw this layer away, the only goal of this deletion is to dirty\n // the removed fields.\n _this.delete(dataId);\n }\n else if (!ownStoreObject) {\n // This layer had an entry for dataId but it was undefined, which\n // means the entity was deleted in this layer, and it\'s about to\n // become undeleted when we remove this layer, so we need to dirty\n // all fields that are about to be reexposed.\n _this.group.dirty(dataId, "__exists");\n Object.keys(parentStoreObject).forEach(function (storeFieldName) {\n _this.group.dirty(dataId, storeFieldName);\n });\n }\n else if (ownStoreObject !== parentStoreObject) {\n // If ownStoreObject is not exactly the same as parentStoreObject,\n // dirty any fields whose values will change as a result of this\n // removal.\n Object.keys(ownStoreObject).forEach(function (storeFieldName) {\n if (!(0,equality_lib/* equal */.L)(ownStoreObject[storeFieldName], parentStoreObject[storeFieldName])) {\n _this.group.dirty(dataId, storeFieldName);\n }\n });\n }\n });\n }\n return parent;\n }\n // No changes are necessary if the parent chain remains identical.\n if (parent === this.parent)\n return this;\n // Recreate this layer on top of the new parent.\n return parent.addLayer(this.id, this.replay);\n };\n Layer.prototype.toObject = function () {\n return (0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, this.parent.toObject()), this.data);\n };\n Layer.prototype.findChildRefIds = function (dataId) {\n var fromParent = this.parent.findChildRefIds(dataId);\n return hasOwn.call(this.data, dataId) ? (0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, fromParent), _super.prototype.findChildRefIds.call(this, dataId)) : fromParent;\n };\n Layer.prototype.getStorage = function () {\n var p = this.parent;\n while (p.parent)\n p = p.parent;\n return p.getStorage.apply(p, \n // @ts-expect-error\n arguments);\n };\n return Layer;\n}(EntityStore));\n// Represents a Layer permanently installed just above the Root, which allows\n// reading optimistically (and registering optimistic dependencies) even when\n// no optimistic layers are currently active. The stump.group CacheGroup object\n// is shared by any/all Layer objects added on top of the Stump.\nvar Stump = /** @class */ (function (_super) {\n (0,tslib_es6/* __extends */.C6)(Stump, _super);\n function Stump(root) {\n return _super.call(this, "EntityStore.Stump", root, function () { }, new CacheGroup(root.group.caching, root.group)) || this;\n }\n Stump.prototype.removeLayer = function () {\n // Never remove the Stump layer.\n return this;\n };\n Stump.prototype.merge = function (older, newer) {\n // We never want to write any data into the Stump, so we forward any merge\n // calls to the Root instead. Another option here would be to throw an\n // exception, but the toReference(object, true) function can sometimes\n // trigger Stump writes (which used to be Root writes, before the Stump\n // concept was introduced).\n return this.parent.merge(older, newer);\n };\n return Stump;\n}(Layer));\nfunction storeObjectReconciler(existingObject, incomingObject, property) {\n var existingValue = existingObject[property];\n var incomingValue = incomingObject[property];\n // Wherever there is a key collision, prefer the incoming value, unless\n // it is deeply equal to the existing value. It\'s worth checking deep\n // equality here (even though blindly returning incoming would be\n // logically correct) because preserving the referential identity of\n // existing data can prevent needless rereading and rerendering.\n return (0,equality_lib/* equal */.L)(existingValue, incomingValue) ? existingValue : incomingValue;\n}\nfunction supportsResultCaching(store) {\n // When result caching is disabled, store.depend will be null.\n return !!(store instanceof EntityStore && store.group.caching);\n}\n//# sourceMappingURL=entityStore.js.map\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/cache/inmemory/object-canon.js\n\n\n\n\nfunction shallowCopy(value) {\n if ((0,objects/* isNonNullObject */.U)(value)) {\n return (0,arrays/* isArray */.c)(value) ?\n value.slice(0)\n : (0,tslib_es6/* __assign */.Cl)({ __proto__: Object.getPrototypeOf(value) }, value);\n }\n return value;\n}\n// When programmers talk about the "canonical form" of an object, they\n// usually have the following meaning in mind, which I\'ve copied from\n// https://en.wiktionary.org/wiki/canonical_form:\n//\n// 1. A standard or normal presentation of a mathematical entity [or\n// object]. A canonical form is an element of a set of representatives\n// of equivalence classes of forms such that there is a function or\n// procedure which projects every element of each equivalence class\n// onto that one element, the canonical form of that equivalence\n// class. The canonical form is expected to be simpler than the rest of\n// the forms in some way.\n//\n// That\'s a long-winded way of saying any two objects that have the same\n// canonical form may be considered equivalent, even if they are !==,\n// which usually means the objects are structurally equivalent (deeply\n// equal), but don\'t necessarily use the same memory.\n//\n// Like a literary or musical canon, this ObjectCanon class represents a\n// collection of unique canonical items (JavaScript objects), with the\n// important property that canon.admit(a) === canon.admit(b) if a and b\n// are deeply equal to each other. In terms of the definition above, the\n// canon.admit method is the "function or procedure which projects every"\n// object "onto that one element, the canonical form."\n//\n// In the worst case, the canonicalization process may involve looking at\n// every property in the provided object tree, so it takes the same order\n// of time as deep equality checking. Fortunately, already-canonicalized\n// objects are returned immediately from canon.admit, so the presence of\n// canonical subtrees tends to speed up canonicalization.\n//\n// Since consumers of canonical objects can check for deep equality in\n// constant time, canonicalizing cache results can massively improve the\n// performance of application code that skips re-rendering unchanged\n// results, such as "pure" UI components in a framework like React.\n//\n// Of course, since canonical objects may be shared widely between\n// unrelated consumers, it\'s important to think of them as immutable, even\n// though they are not actually frozen with Object.freeze in production,\n// due to the extra performance overhead that comes with frozen objects.\n//\n// Custom scalar objects whose internal class name is neither Array nor\n// Object can be included safely in the admitted tree, but they will not\n// be replaced with a canonical version (to put it another way, they are\n// assumed to be canonical already).\n//\n// If we ignore custom objects, no detection of cycles or repeated object\n// references is currently required by the StoreReader class, since\n// GraphQL result objects are JSON-serializable trees (and thus contain\n// neither cycles nor repeated subtrees), so we can avoid the complexity\n// of keeping track of objects we\'ve already seen during the recursion of\n// the admit method.\n//\n// In the future, we may consider adding additional cases to the switch\n// statement to handle other common object types, such as "[object Date]"\n// objects, as needed.\nvar ObjectCanon = /** @class */ (function () {\n function ObjectCanon() {\n // Set of all canonical objects this ObjectCanon has admitted, allowing\n // canon.admit to return previously-canonicalized objects immediately.\n this.known = new (canUse/* canUseWeakSet */.En ? WeakSet : Set)();\n // Efficient storage/lookup structure for canonical objects.\n this.pool = new trie_lib/* Trie */.b(canUse/* canUseWeakMap */.et);\n // Make the ObjectCanon assume this value has already been\n // canonicalized.\n this.passes = new WeakMap();\n // Arrays that contain the same elements in a different order can share\n // the same SortedKeysInfo object, to save memory.\n this.keysByJSON = new Map();\n // This has to come last because it depends on keysByJSON.\n this.empty = this.admit({});\n }\n ObjectCanon.prototype.isKnown = function (value) {\n return (0,objects/* isNonNullObject */.U)(value) && this.known.has(value);\n };\n ObjectCanon.prototype.pass = function (value) {\n if ((0,objects/* isNonNullObject */.U)(value)) {\n var copy = shallowCopy(value);\n this.passes.set(copy, value);\n return copy;\n }\n return value;\n };\n ObjectCanon.prototype.admit = function (value) {\n var _this = this;\n if ((0,objects/* isNonNullObject */.U)(value)) {\n var original = this.passes.get(value);\n if (original)\n return original;\n var proto = Object.getPrototypeOf(value);\n switch (proto) {\n case Array.prototype: {\n if (this.known.has(value))\n return value;\n var array = value.map(this.admit, this);\n // Arrays are looked up in the Trie using their recursively\n // canonicalized elements, and the known version of the array is\n // preserved as node.array.\n var node = this.pool.lookupArray(array);\n if (!node.array) {\n this.known.add((node.array = array));\n // Since canonical arrays may be shared widely between\n // unrelated consumers, it\'s important to regard them as\n // immutable, even if they are not frozen in production.\n if (globalThis.__DEV__ !== false) {\n Object.freeze(array);\n }\n }\n return node.array;\n }\n case null:\n case Object.prototype: {\n if (this.known.has(value))\n return value;\n var proto_1 = Object.getPrototypeOf(value);\n var array_1 = [proto_1];\n var keys = this.sortedKeys(value);\n array_1.push(keys.json);\n var firstValueIndex_1 = array_1.length;\n keys.sorted.forEach(function (key) {\n array_1.push(_this.admit(value[key]));\n });\n // Objects are looked up in the Trie by their prototype (which\n // is *not* recursively canonicalized), followed by a JSON\n // representation of their (sorted) keys, followed by the\n // sequence of recursively canonicalized values corresponding to\n // those keys. To keep the final results unambiguous with other\n // sequences (such as arrays that just happen to contain [proto,\n // keys.json, value1, value2, ...]), the known version of the\n // object is stored as node.object.\n var node = this.pool.lookupArray(array_1);\n if (!node.object) {\n var obj_1 = (node.object = Object.create(proto_1));\n this.known.add(obj_1);\n keys.sorted.forEach(function (key, i) {\n obj_1[key] = array_1[firstValueIndex_1 + i];\n });\n // Since canonical objects may be shared widely between\n // unrelated consumers, it\'s important to regard them as\n // immutable, even if they are not frozen in production.\n if (globalThis.__DEV__ !== false) {\n Object.freeze(obj_1);\n }\n }\n return node.object;\n }\n }\n }\n return value;\n };\n // It\'s worthwhile to cache the sorting of arrays of strings, since the\n // same initial unsorted arrays tend to be encountered many times.\n // Fortunately, we can reuse the Trie machinery to look up the sorted\n // arrays in linear time (which is faster than sorting large arrays).\n ObjectCanon.prototype.sortedKeys = function (obj) {\n var keys = Object.keys(obj);\n var node = this.pool.lookupArray(keys);\n if (!node.keys) {\n keys.sort();\n var json = JSON.stringify(keys);\n if (!(node.keys = this.keysByJSON.get(json))) {\n this.keysByJSON.set(json, (node.keys = { sorted: keys, json: json }));\n }\n }\n return node.keys;\n };\n return ObjectCanon;\n}());\n\n//# sourceMappingURL=object-canon.js.map\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/cache/inmemory/readFromStore.js\n\n\n\n\n\n\n\n\n\nfunction execSelectionSetKeyArgs(options) {\n return [\n options.selectionSet,\n options.objectOrReference,\n options.context,\n // We split out this property so we can pass different values\n // independently without modifying options.context itself.\n options.context.canonizeResults,\n ];\n}\nvar StoreReader = /** @class */ (function () {\n function StoreReader(config) {\n var _this = this;\n this.knownResults = new (canUse/* canUseWeakMap */.et ? WeakMap : Map)();\n this.config = (0,compact/* compact */.o)(config, {\n addTypename: config.addTypename !== false,\n canonizeResults: shouldCanonizeResults(config),\n });\n this.canon = config.canon || new ObjectCanon();\n // memoized functions in this class will be "garbage-collected"\n // by recreating the whole `StoreReader` in\n // `InMemoryCache.resetResultsCache`\n // (triggered from `InMemoryCache.gc` with `resetResultCache: true`)\n this.executeSelectionSet = (0,lib/* wrap */.LV)(function (options) {\n var _a;\n var canonizeResults = options.context.canonizeResults;\n var peekArgs = execSelectionSetKeyArgs(options);\n // Negate this boolean option so we can find out if we\'ve already read\n // this result using the other boolean value.\n peekArgs[3] = !canonizeResults;\n var other = (_a = _this.executeSelectionSet).peek.apply(_a, peekArgs);\n if (other) {\n if (canonizeResults) {\n return (0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, other), { \n // If we previously read this result without canonizing it, we can\n // reuse that result simply by canonizing it now.\n result: _this.canon.admit(other.result) });\n }\n // If we previously read this result with canonization enabled, we can\n // return that canonized result as-is.\n return other;\n }\n maybeDependOnExistenceOfEntity(options.context.store, options.enclosingRef.__ref);\n // Finally, if we didn\'t find any useful previous results, run the real\n // execSelectionSetImpl method with the given options.\n return _this.execSelectionSetImpl(options);\n }, {\n max: this.config.resultCacheMaxSize ||\n sizes/* cacheSizes */.v["inMemoryCache.executeSelectionSet"] ||\n 50000 /* defaultCacheSizes["inMemoryCache.executeSelectionSet"] */,\n keyArgs: execSelectionSetKeyArgs,\n // Note that the parameters of makeCacheKey are determined by the\n // array returned by keyArgs.\n makeCacheKey: function (selectionSet, parent, context, canonizeResults) {\n if (supportsResultCaching(context.store)) {\n return context.store.makeCacheKey(selectionSet, (0,storeUtils/* isReference */.A_)(parent) ? parent.__ref : parent, context.varString, canonizeResults);\n }\n },\n });\n this.executeSubSelectedArray = (0,lib/* wrap */.LV)(function (options) {\n maybeDependOnExistenceOfEntity(options.context.store, options.enclosingRef.__ref);\n return _this.execSubSelectedArrayImpl(options);\n }, {\n max: this.config.resultCacheMaxSize ||\n sizes/* cacheSizes */.v["inMemoryCache.executeSubSelectedArray"] ||\n 10000 /* defaultCacheSizes["inMemoryCache.executeSubSelectedArray"] */,\n makeCacheKey: function (_a) {\n var field = _a.field, array = _a.array, context = _a.context;\n if (supportsResultCaching(context.store)) {\n return context.store.makeCacheKey(field, array, context.varString);\n }\n },\n });\n }\n StoreReader.prototype.resetCanon = function () {\n this.canon = new ObjectCanon();\n };\n /**\n * Given a store and a query, return as much of the result as possible and\n * identify if any data was missing from the store.\n */\n StoreReader.prototype.diffQueryAgainstStore = function (_a) {\n var store = _a.store, query = _a.query, _b = _a.rootId, rootId = _b === void 0 ? "ROOT_QUERY" : _b, variables = _a.variables, _c = _a.returnPartialData, returnPartialData = _c === void 0 ? true : _c, _d = _a.canonizeResults, canonizeResults = _d === void 0 ? this.config.canonizeResults : _d;\n var policies = this.config.cache.policies;\n variables = (0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, (0,getFromAST/* getDefaultValues */.wY)((0,getFromAST/* getQueryDefinition */.AT)(query))), variables);\n var rootRef = (0,storeUtils/* makeReference */.WU)(rootId);\n var execResult = this.executeSelectionSet({\n selectionSet: (0,getFromAST/* getMainDefinition */.Vn)(query).selectionSet,\n objectOrReference: rootRef,\n enclosingRef: rootRef,\n context: (0,tslib_es6/* __assign */.Cl)({ store: store, query: query, policies: policies, variables: variables, varString: (0,canonicalStringify/* canonicalStringify */.M)(variables), canonizeResults: canonizeResults }, extractFragmentContext(query, this.config.fragments)),\n });\n var missing;\n if (execResult.missing) {\n // For backwards compatibility we still report an array of\n // MissingFieldError objects, even though there will only ever be at most\n // one of them, now that all missing field error messages are grouped\n // together in the execResult.missing tree.\n missing = [\n new MissingFieldError(firstMissing(execResult.missing), execResult.missing, query, variables),\n ];\n if (!returnPartialData) {\n throw missing[0];\n }\n }\n return {\n result: execResult.result,\n complete: !missing,\n missing: missing,\n };\n };\n StoreReader.prototype.isFresh = function (result, parent, selectionSet, context) {\n if (supportsResultCaching(context.store) &&\n this.knownResults.get(result) === selectionSet) {\n var latest = this.executeSelectionSet.peek(selectionSet, parent, context, \n // If result is canonical, then it could only have been previously\n // cached by the canonizing version of executeSelectionSet, so we can\n // avoid checking both possibilities here.\n this.canon.isKnown(result));\n if (latest && result === latest.result) {\n return true;\n }\n }\n return false;\n };\n // Uncached version of executeSelectionSet.\n StoreReader.prototype.execSelectionSetImpl = function (_a) {\n var _this = this;\n var selectionSet = _a.selectionSet, objectOrReference = _a.objectOrReference, enclosingRef = _a.enclosingRef, context = _a.context;\n if ((0,storeUtils/* isReference */.A_)(objectOrReference) &&\n !context.policies.rootTypenamesById[objectOrReference.__ref] &&\n !context.store.has(objectOrReference.__ref)) {\n return {\n result: this.canon.empty,\n missing: "Dangling reference to missing ".concat(objectOrReference.__ref, " object"),\n };\n }\n var variables = context.variables, policies = context.policies, store = context.store;\n var typename = store.getFieldValue(objectOrReference, "__typename");\n var objectsToMerge = [];\n var missing;\n var missingMerger = new mergeDeep/* DeepMerger */.ZI();\n if (this.config.addTypename &&\n typeof typename === "string" &&\n !policies.rootIdsByTypename[typename]) {\n // Ensure we always include a default value for the __typename\n // field, if we have one, and this.config.addTypename is true. Note\n // that this field can be overridden by other merged objects.\n objectsToMerge.push({ __typename: typename });\n }\n function handleMissing(result, resultName) {\n var _a;\n if (result.missing) {\n missing = missingMerger.merge(missing, (_a = {},\n _a[resultName] = result.missing,\n _a));\n }\n return result.result;\n }\n var workSet = new Set(selectionSet.selections);\n workSet.forEach(function (selection) {\n var _a, _b;\n // Omit fields with directives @skip(if: <truthy value>) or\n // @include(if: <falsy value>).\n if (!(0,directives/* shouldInclude */.MS)(selection, variables))\n return;\n if ((0,storeUtils/* isField */.dt)(selection)) {\n var fieldValue = policies.readField({\n fieldName: selection.name.value,\n field: selection,\n variables: context.variables,\n from: objectOrReference,\n }, context);\n var resultName = (0,storeUtils/* resultKeyNameFromField */.ue)(selection);\n if (fieldValue === void 0) {\n if (!transform/* addTypenameToDocument */.XY.added(selection)) {\n missing = missingMerger.merge(missing, (_a = {},\n _a[resultName] = "Can\'t find field \'".concat(selection.name.value, "\' on ").concat((0,storeUtils/* isReference */.A_)(objectOrReference) ?\n objectOrReference.__ref + " object"\n : "object " + JSON.stringify(objectOrReference, null, 2)),\n _a));\n }\n }\n else if ((0,arrays/* isArray */.c)(fieldValue)) {\n if (fieldValue.length > 0) {\n fieldValue = handleMissing(_this.executeSubSelectedArray({\n field: selection,\n array: fieldValue,\n enclosingRef: enclosingRef,\n context: context,\n }), resultName);\n }\n }\n else if (!selection.selectionSet) {\n // If the field does not have a selection set, then we handle it\n // as a scalar value. To keep this.canon from canonicalizing\n // this value, we use this.canon.pass to wrap fieldValue in a\n // Pass object that this.canon.admit will later unwrap as-is.\n if (context.canonizeResults) {\n fieldValue = _this.canon.pass(fieldValue);\n }\n }\n else if (fieldValue != null) {\n // In this case, because we know the field has a selection set,\n // it must be trying to query a GraphQLObjectType, which is why\n // fieldValue must be != null.\n fieldValue = handleMissing(_this.executeSelectionSet({\n selectionSet: selection.selectionSet,\n objectOrReference: fieldValue,\n enclosingRef: (0,storeUtils/* isReference */.A_)(fieldValue) ? fieldValue : enclosingRef,\n context: context,\n }), resultName);\n }\n if (fieldValue !== void 0) {\n objectsToMerge.push((_b = {}, _b[resultName] = fieldValue, _b));\n }\n }\n else {\n var fragment = (0,graphql_fragments/* getFragmentFromSelection */.HQ)(selection, context.lookupFragment);\n if (!fragment && selection.kind === kinds/* Kind */.b.FRAGMENT_SPREAD) {\n throw (0,globals/* newInvariantError */.vA)(9, selection.name.value);\n }\n if (fragment && policies.fragmentMatches(fragment, typename)) {\n fragment.selectionSet.selections.forEach(workSet.add, workSet);\n }\n }\n });\n var result = (0,mergeDeep/* mergeDeepArray */.IM)(objectsToMerge);\n var finalResult = { result: result, missing: missing };\n var frozen = context.canonizeResults ?\n this.canon.admit(finalResult)\n // Since this.canon is normally responsible for freezing results (only in\n // development), freeze them manually if canonization is disabled.\n : (0,maybeDeepFreeze/* maybeDeepFreeze */.G)(finalResult);\n // Store this result with its selection set so that we can quickly\n // recognize it again in the StoreReader#isFresh method.\n if (frozen.result) {\n this.knownResults.set(frozen.result, selectionSet);\n }\n return frozen;\n };\n // Uncached version of executeSubSelectedArray.\n StoreReader.prototype.execSubSelectedArrayImpl = function (_a) {\n var _this = this;\n var field = _a.field, array = _a.array, enclosingRef = _a.enclosingRef, context = _a.context;\n var missing;\n var missingMerger = new mergeDeep/* DeepMerger */.ZI();\n function handleMissing(childResult, i) {\n var _a;\n if (childResult.missing) {\n missing = missingMerger.merge(missing, (_a = {}, _a[i] = childResult.missing, _a));\n }\n return childResult.result;\n }\n if (field.selectionSet) {\n array = array.filter(context.store.canRead);\n }\n array = array.map(function (item, i) {\n // null value in array\n if (item === null) {\n return null;\n }\n // This is a nested array, recurse\n if ((0,arrays/* isArray */.c)(item)) {\n return handleMissing(_this.executeSubSelectedArray({\n field: field,\n array: item,\n enclosingRef: enclosingRef,\n context: context,\n }), i);\n }\n // This is an object, run the selection set on it\n if (field.selectionSet) {\n return handleMissing(_this.executeSelectionSet({\n selectionSet: field.selectionSet,\n objectOrReference: item,\n enclosingRef: (0,storeUtils/* isReference */.A_)(item) ? item : enclosingRef,\n context: context,\n }), i);\n }\n if (globalThis.__DEV__ !== false) {\n assertSelectionSetForIdValue(context.store, field, item);\n }\n return item;\n });\n return {\n result: context.canonizeResults ? this.canon.admit(array) : array,\n missing: missing,\n };\n };\n return StoreReader;\n}());\n\nfunction firstMissing(tree) {\n try {\n JSON.stringify(tree, function (_, value) {\n if (typeof value === "string")\n throw value;\n return value;\n });\n }\n catch (result) {\n return result;\n }\n}\nfunction assertSelectionSetForIdValue(store, field, fieldValue) {\n if (!field.selectionSet) {\n var workSet_1 = new Set([fieldValue]);\n workSet_1.forEach(function (value) {\n if ((0,objects/* isNonNullObject */.U)(value)) {\n (0,globals/* invariant */.V1)(\n !(0,storeUtils/* isReference */.A_)(value),\n 10,\n getTypenameFromStoreObject(store, value),\n field.name.value\n );\n Object.values(value).forEach(workSet_1.add, workSet_1);\n }\n });\n }\n}\n//# sourceMappingURL=readFromStore.js.map\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/common/cloneDeep.js\nvar cloneDeep = __webpack_require__(1495);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/common/stringifyForDisplay.js\nvar stringifyForDisplay = __webpack_require__(6194);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/cache/inmemory/reactiveVars.js\nvar reactiveVars = __webpack_require__(738);\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/cache/inmemory/key-extractor.js\n\n\n\n// Mapping from JSON-encoded KeySpecifier strings to associated information.\nvar specifierInfoCache = Object.create(null);\nfunction lookupSpecifierInfo(spec) {\n // It\'s safe to encode KeySpecifier arrays with JSON.stringify, since they\'re\n // just arrays of strings or nested KeySpecifier arrays, and the order of the\n // array elements is important (and suitably preserved by JSON.stringify).\n var cacheKey = JSON.stringify(spec);\n return (specifierInfoCache[cacheKey] ||\n (specifierInfoCache[cacheKey] = Object.create(null)));\n}\nfunction keyFieldsFnFromSpecifier(specifier) {\n var info = lookupSpecifierInfo(specifier);\n return (info.keyFieldsFn || (info.keyFieldsFn = function (object, context) {\n var extract = function (from, key) {\n return context.readField(key, from);\n };\n var keyObject = (context.keyObject = collectSpecifierPaths(specifier, function (schemaKeyPath) {\n var extracted = extractKeyPath(context.storeObject, schemaKeyPath, \n // Using context.readField to extract paths from context.storeObject\n // allows the extraction to see through Reference objects and respect\n // custom read functions.\n extract);\n if (extracted === void 0 &&\n object !== context.storeObject &&\n hasOwn.call(object, schemaKeyPath[0])) {\n // If context.storeObject fails to provide a value for the requested\n // path, fall back to the raw result object, if it has a top-level key\n // matching the first key in the path (schemaKeyPath[0]). This allows\n // key fields included in the written data to be saved in the cache\n // even if they are not selected explicitly in context.selectionSet.\n // Not being mentioned by context.selectionSet is convenient here,\n // since it means these extra fields cannot be affected by field\n // aliasing, which is why we can use extractKey instead of\n // context.readField for this extraction.\n extracted = extractKeyPath(object, schemaKeyPath, extractKey);\n }\n (0,globals/* invariant */.V1)(extracted !== void 0, 4, schemaKeyPath.join("."), object);\n return extracted;\n }));\n return "".concat(context.typename, ":").concat(JSON.stringify(keyObject));\n }));\n}\n// The keyArgs extraction process is roughly analogous to keyFields extraction,\n// but there are no aliases involved, missing fields are tolerated (by merely\n// omitting them from the key), and drawing from field.directives or variables\n// is allowed (in addition to drawing from the field\'s arguments object).\n// Concretely, these differences mean passing a different key path extractor\n// function to collectSpecifierPaths, reusing the shared extractKeyPath helper\n// wherever possible.\nfunction keyArgsFnFromSpecifier(specifier) {\n var info = lookupSpecifierInfo(specifier);\n return (info.keyArgsFn ||\n (info.keyArgsFn = function (args, _a) {\n var field = _a.field, variables = _a.variables, fieldName = _a.fieldName;\n var collected = collectSpecifierPaths(specifier, function (keyPath) {\n var firstKey = keyPath[0];\n var firstChar = firstKey.charAt(0);\n if (firstChar === "@") {\n if (field && (0,arrays/* isNonEmptyArray */.E)(field.directives)) {\n var directiveName_1 = firstKey.slice(1);\n // If the directive appears multiple times, only the first\n // occurrence\'s arguments will be used. TODO Allow repetition?\n // TODO Cache this work somehow, a la aliasMap?\n var d = field.directives.find(function (d) { return d.name.value === directiveName_1; });\n // Fortunately argumentsObjectFromField works for DirectiveNode!\n var directiveArgs = d && (0,storeUtils/* argumentsObjectFromField */.MB)(d, variables);\n // For directives without arguments (d defined, but directiveArgs ===\n // null), the presence or absence of the directive still counts as\n // part of the field key, so we return null in those cases. If no\n // directive with this name was found for this field (d undefined and\n // thus directiveArgs undefined), we return undefined, which causes\n // this value to be omitted from the key object returned by\n // collectSpecifierPaths.\n return (directiveArgs &&\n extractKeyPath(directiveArgs, \n // If keyPath.length === 1, this code calls extractKeyPath with an\n // empty path, which works because it uses directiveArgs as the\n // extracted value.\n keyPath.slice(1)));\n }\n // If the key started with @ but there was no corresponding directive,\n // we want to omit this value from the key object, not fall through to\n // treating @whatever as a normal argument name.\n return;\n }\n if (firstChar === "$") {\n var variableName = firstKey.slice(1);\n if (variables && hasOwn.call(variables, variableName)) {\n var varKeyPath = keyPath.slice(0);\n varKeyPath[0] = variableName;\n return extractKeyPath(variables, varKeyPath);\n }\n // If the key started with $ but there was no corresponding variable, we\n // want to omit this value from the key object, not fall through to\n // treating $whatever as a normal argument name.\n return;\n }\n if (args) {\n return extractKeyPath(args, keyPath);\n }\n });\n var suffix = JSON.stringify(collected);\n // If no arguments were passed to this field, and it didn\'t have any other\n // field key contributions from directives or variables, hide the empty\n // :{} suffix from the field key. However, a field passed no arguments can\n // still end up with a non-empty :{...} suffix if its key configuration\n // refers to directives or variables.\n if (args || suffix !== "{}") {\n fieldName += ":" + suffix;\n }\n return fieldName;\n }));\n}\nfunction collectSpecifierPaths(specifier, extractor) {\n // For each path specified by specifier, invoke the extractor, and repeatedly\n // merge the results together, with appropriate ancestor context.\n var merger = new mergeDeep/* DeepMerger */.ZI();\n return getSpecifierPaths(specifier).reduce(function (collected, path) {\n var _a;\n var toMerge = extractor(path);\n if (toMerge !== void 0) {\n // This path is not expected to contain array indexes, so the toMerge\n // reconstruction will not contain arrays. TODO Fix this?\n for (var i = path.length - 1; i >= 0; --i) {\n toMerge = (_a = {}, _a[path[i]] = toMerge, _a);\n }\n collected = merger.merge(collected, toMerge);\n }\n return collected;\n }, Object.create(null));\n}\nfunction getSpecifierPaths(spec) {\n var info = lookupSpecifierInfo(spec);\n if (!info.paths) {\n var paths_1 = (info.paths = []);\n var currentPath_1 = [];\n spec.forEach(function (s, i) {\n if ((0,arrays/* isArray */.c)(s)) {\n getSpecifierPaths(s).forEach(function (p) { return paths_1.push(currentPath_1.concat(p)); });\n currentPath_1.length = 0;\n }\n else {\n currentPath_1.push(s);\n if (!(0,arrays/* isArray */.c)(spec[i + 1])) {\n paths_1.push(currentPath_1.slice(0));\n currentPath_1.length = 0;\n }\n }\n });\n }\n return info.paths;\n}\nfunction extractKey(object, key) {\n return object[key];\n}\nfunction extractKeyPath(object, path, extract) {\n // For each key in path, extract the corresponding child property from obj,\n // flattening arrays if encountered (uncommon for keyFields and keyArgs, but\n // possible). The final result of path.reduce is normalized so unexpected leaf\n // objects have their keys safely sorted. That final result is difficult to\n // type as anything other than any. You\'re welcome to try to improve the\n // return type, but keep in mind extractKeyPath is not a public function\n // (exported only for testing), so the effort may not be worthwhile unless the\n // limited set of actual callers (see above) pass arguments that TypeScript\n // can statically type. If we know only that path is some array of strings\n // (and not, say, a specific tuple of statically known strings), any (or\n // possibly unknown) is the honest answer.\n extract = extract || extractKey;\n return normalize(path.reduce(function reducer(obj, key) {\n return (0,arrays/* isArray */.c)(obj) ?\n obj.map(function (child) { return reducer(child, key); })\n : obj && extract(obj, key);\n }, object));\n}\nfunction normalize(value) {\n // Usually the extracted value will be a scalar value, since most primary\n // key fields are scalar, but just in case we get an object or an array, we\n // need to do some normalization of the order of (nested) keys.\n if ((0,objects/* isNonNullObject */.U)(value)) {\n if ((0,arrays/* isArray */.c)(value)) {\n return value.map(normalize);\n }\n return collectSpecifierPaths(Object.keys(value).sort(), function (path) {\n return extractKeyPath(value, path);\n });\n }\n return value;\n}\n//# sourceMappingURL=key-extractor.js.map\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/cache/inmemory/policies.js\n\n\n\n\n\n\nfunction argsFromFieldSpecifier(spec) {\n return (spec.args !== void 0 ? spec.args\n : spec.field ? (0,storeUtils/* argumentsObjectFromField */.MB)(spec.field, spec.variables)\n : null);\n}\nvar nullKeyFieldsFn = function () { return void 0; };\nvar simpleKeyArgsFn = function (_args, context) { return context.fieldName; };\n// These merge functions can be selected by specifying merge:true or\n// merge:false in a field policy.\nvar mergeTrueFn = function (existing, incoming, _a) {\n var mergeObjects = _a.mergeObjects;\n return mergeObjects(existing, incoming);\n};\nvar mergeFalseFn = function (_, incoming) { return incoming; };\nvar Policies = /** @class */ (function () {\n function Policies(config) {\n this.config = config;\n this.typePolicies = Object.create(null);\n this.toBeAdded = Object.create(null);\n // Map from subtype names to sets of supertype names. Note that this\n // representation inverts the structure of possibleTypes (whose keys are\n // supertypes and whose values are arrays of subtypes) because it tends\n // to be much more efficient to search upwards than downwards.\n this.supertypeMap = new Map();\n // Any fuzzy subtypes specified by possibleTypes will be converted to\n // RegExp objects and recorded here. Every key of this map can also be\n // found in supertypeMap. In many cases this Map will be empty, which\n // means no fuzzy subtype checking will happen in fragmentMatches.\n this.fuzzySubtypes = new Map();\n this.rootIdsByTypename = Object.create(null);\n this.rootTypenamesById = Object.create(null);\n this.usingPossibleTypes = false;\n this.config = (0,tslib_es6/* __assign */.Cl)({ dataIdFromObject: defaultDataIdFromObject }, config);\n this.cache = this.config.cache;\n this.setRootTypename("Query");\n this.setRootTypename("Mutation");\n this.setRootTypename("Subscription");\n if (config.possibleTypes) {\n this.addPossibleTypes(config.possibleTypes);\n }\n if (config.typePolicies) {\n this.addTypePolicies(config.typePolicies);\n }\n }\n Policies.prototype.identify = function (object, partialContext) {\n var _a;\n var policies = this;\n var typename = (partialContext &&\n (partialContext.typename || ((_a = partialContext.storeObject) === null || _a === void 0 ? void 0 : _a.__typename))) ||\n object.__typename;\n // It should be possible to write root Query fields with writeFragment,\n // using { __typename: "Query", ... } as the data, but it does not make\n // sense to allow the same identification behavior for the Mutation and\n // Subscription types, since application code should never be writing\n // directly to (or reading directly from) those root objects.\n if (typename === this.rootTypenamesById.ROOT_QUERY) {\n return ["ROOT_QUERY"];\n }\n // Default context.storeObject to object if not otherwise provided.\n var storeObject = (partialContext && partialContext.storeObject) || object;\n var context = (0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, partialContext), { typename: typename, storeObject: storeObject, readField: (partialContext && partialContext.readField) ||\n function () {\n var options = normalizeReadFieldOptions(arguments, storeObject);\n return policies.readField(options, {\n store: policies.cache["data"],\n variables: options.variables,\n });\n } });\n var id;\n var policy = typename && this.getTypePolicy(typename);\n var keyFn = (policy && policy.keyFn) || this.config.dataIdFromObject;\n while (keyFn) {\n var specifierOrId = keyFn((0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, object), storeObject), context);\n if ((0,arrays/* isArray */.c)(specifierOrId)) {\n keyFn = keyFieldsFnFromSpecifier(specifierOrId);\n }\n else {\n id = specifierOrId;\n break;\n }\n }\n id = id ? String(id) : void 0;\n return context.keyObject ? [id, context.keyObject] : [id];\n };\n Policies.prototype.addTypePolicies = function (typePolicies) {\n var _this = this;\n Object.keys(typePolicies).forEach(function (typename) {\n var _a = typePolicies[typename], queryType = _a.queryType, mutationType = _a.mutationType, subscriptionType = _a.subscriptionType, incoming = (0,tslib_es6/* __rest */.Tt)(_a, ["queryType", "mutationType", "subscriptionType"]);\n // Though {query,mutation,subscription}Type configurations are rare,\n // it\'s important to call setRootTypename as early as possible,\n // since these configurations should apply consistently for the\n // entire lifetime of the cache. Also, since only one __typename can\n // qualify as one of these root types, these three properties cannot\n // be inherited, unlike the rest of the incoming properties. That\n // restriction is convenient, because the purpose of this.toBeAdded\n // is to delay the processing of type/field policies until the first\n // time they\'re used, allowing policies to be added in any order as\n // long as all relevant policies (including policies for supertypes)\n // have been added by the time a given policy is used for the first\n // time. In other words, since inheritance doesn\'t matter for these\n // properties, there\'s also no need to delay their processing using\n // the this.toBeAdded queue.\n if (queryType)\n _this.setRootTypename("Query", typename);\n if (mutationType)\n _this.setRootTypename("Mutation", typename);\n if (subscriptionType)\n _this.setRootTypename("Subscription", typename);\n if (hasOwn.call(_this.toBeAdded, typename)) {\n _this.toBeAdded[typename].push(incoming);\n }\n else {\n _this.toBeAdded[typename] = [incoming];\n }\n });\n };\n Policies.prototype.updateTypePolicy = function (typename, incoming) {\n var _this = this;\n var existing = this.getTypePolicy(typename);\n var keyFields = incoming.keyFields, fields = incoming.fields;\n function setMerge(existing, merge) {\n existing.merge =\n typeof merge === "function" ? merge\n // Pass merge:true as a shorthand for a merge implementation\n // that returns options.mergeObjects(existing, incoming).\n : merge === true ? mergeTrueFn\n // Pass merge:false to make incoming always replace existing\n // without any warnings about data clobbering.\n : merge === false ? mergeFalseFn\n : existing.merge;\n }\n // Type policies can define merge functions, as an alternative to\n // using field policies to merge child objects.\n setMerge(existing, incoming.merge);\n existing.keyFn =\n // Pass false to disable normalization for this typename.\n keyFields === false ? nullKeyFieldsFn\n // Pass an array of strings to use those fields to compute a\n // composite ID for objects of this typename.\n : (0,arrays/* isArray */.c)(keyFields) ? keyFieldsFnFromSpecifier(keyFields)\n // Pass a function to take full control over identification.\n : typeof keyFields === "function" ? keyFields\n // Leave existing.keyFn unchanged if above cases fail.\n : existing.keyFn;\n if (fields) {\n Object.keys(fields).forEach(function (fieldName) {\n var existing = _this.getFieldPolicy(typename, fieldName, true);\n var incoming = fields[fieldName];\n if (typeof incoming === "function") {\n existing.read = incoming;\n }\n else {\n var keyArgs = incoming.keyArgs, read = incoming.read, merge = incoming.merge;\n existing.keyFn =\n // Pass false to disable argument-based differentiation of\n // field identities.\n keyArgs === false ? simpleKeyArgsFn\n // Pass an array of strings to use named arguments to\n // compute a composite identity for the field.\n : (0,arrays/* isArray */.c)(keyArgs) ? keyArgsFnFromSpecifier(keyArgs)\n // Pass a function to take full control over field identity.\n : typeof keyArgs === "function" ? keyArgs\n // Leave existing.keyFn unchanged if above cases fail.\n : existing.keyFn;\n if (typeof read === "function") {\n existing.read = read;\n }\n setMerge(existing, merge);\n }\n if (existing.read && existing.merge) {\n // If we have both a read and a merge function, assume\n // keyArgs:false, because read and merge together can take\n // responsibility for interpreting arguments in and out. This\n // default assumption can always be overridden by specifying\n // keyArgs explicitly in the FieldPolicy.\n existing.keyFn = existing.keyFn || simpleKeyArgsFn;\n }\n });\n }\n };\n Policies.prototype.setRootTypename = function (which, typename) {\n if (typename === void 0) { typename = which; }\n var rootId = "ROOT_" + which.toUpperCase();\n var old = this.rootTypenamesById[rootId];\n if (typename !== old) {\n (0,globals/* invariant */.V1)(!old || old === which, 5, which);\n // First, delete any old __typename associated with this rootId from\n // rootIdsByTypename.\n if (old)\n delete this.rootIdsByTypename[old];\n // Now make this the only __typename that maps to this rootId.\n this.rootIdsByTypename[typename] = rootId;\n // Finally, update the __typename associated with this rootId.\n this.rootTypenamesById[rootId] = typename;\n }\n };\n Policies.prototype.addPossibleTypes = function (possibleTypes) {\n var _this = this;\n this.usingPossibleTypes = true;\n Object.keys(possibleTypes).forEach(function (supertype) {\n // Make sure all types have an entry in this.supertypeMap, even if\n // their supertype set is empty, so we can return false immediately\n // from policies.fragmentMatches for unknown supertypes.\n _this.getSupertypeSet(supertype, true);\n possibleTypes[supertype].forEach(function (subtype) {\n _this.getSupertypeSet(subtype, true).add(supertype);\n var match = subtype.match(TypeOrFieldNameRegExp);\n if (!match || match[0] !== subtype) {\n // TODO Don\'t interpret just any invalid typename as a RegExp.\n _this.fuzzySubtypes.set(subtype, new RegExp(subtype));\n }\n });\n });\n };\n Policies.prototype.getTypePolicy = function (typename) {\n var _this = this;\n if (!hasOwn.call(this.typePolicies, typename)) {\n var policy_1 = (this.typePolicies[typename] = Object.create(null));\n policy_1.fields = Object.create(null);\n // When the TypePolicy for typename is first accessed, instead of\n // starting with an empty policy object, inherit any properties or\n // fields from the type policies of the supertypes of typename.\n //\n // Any properties or fields defined explicitly within the TypePolicy\n // for typename will take precedence, and if there are multiple\n // supertypes, the properties of policies whose types were added\n // later via addPossibleTypes will take precedence over those of\n // earlier supertypes. TODO Perhaps we should warn about these\n // conflicts in development, and recommend defining the property\n // explicitly in the subtype policy?\n //\n // Field policy inheritance is atomic/shallow: you can\'t inherit a\n // field policy and then override just its read function, since read\n // and merge functions often need to cooperate, so changing only one\n // of them would be a recipe for inconsistency.\n //\n // Once the TypePolicy for typename has been accessed, its properties can\n // still be updated directly using addTypePolicies, but future changes to\n // inherited supertype policies will not be reflected in this subtype\n // policy, because this code runs at most once per typename.\n var supertypes_1 = this.supertypeMap.get(typename);\n if (!supertypes_1 && this.fuzzySubtypes.size) {\n // To make the inheritance logic work for unknown typename strings that\n // may have fuzzy supertypes, we give this typename an empty supertype\n // set and then populate it with any fuzzy supertypes that match.\n supertypes_1 = this.getSupertypeSet(typename, true);\n // This only works for typenames that are directly matched by a fuzzy\n // supertype. What if there is an intermediate chain of supertypes?\n // While possible, that situation can only be solved effectively by\n // specifying the intermediate relationships via possibleTypes, manually\n // and in a non-fuzzy way.\n this.fuzzySubtypes.forEach(function (regExp, fuzzy) {\n if (regExp.test(typename)) {\n // The fuzzy parameter is just the original string version of regExp\n // (not a valid __typename string), but we can look up the\n // associated supertype(s) in this.supertypeMap.\n var fuzzySupertypes = _this.supertypeMap.get(fuzzy);\n if (fuzzySupertypes) {\n fuzzySupertypes.forEach(function (supertype) {\n return supertypes_1.add(supertype);\n });\n }\n }\n });\n }\n if (supertypes_1 && supertypes_1.size) {\n supertypes_1.forEach(function (supertype) {\n var _a = _this.getTypePolicy(supertype), fields = _a.fields, rest = (0,tslib_es6/* __rest */.Tt)(_a, ["fields"]);\n Object.assign(policy_1, rest);\n Object.assign(policy_1.fields, fields);\n });\n }\n }\n var inbox = this.toBeAdded[typename];\n if (inbox && inbox.length) {\n // Merge the pending policies into this.typePolicies, in the order they\n // were originally passed to addTypePolicy.\n inbox.splice(0).forEach(function (policy) {\n _this.updateTypePolicy(typename, policy);\n });\n }\n return this.typePolicies[typename];\n };\n Policies.prototype.getFieldPolicy = function (typename, fieldName, createIfMissing) {\n if (typename) {\n var fieldPolicies = this.getTypePolicy(typename).fields;\n return (fieldPolicies[fieldName] ||\n (createIfMissing && (fieldPolicies[fieldName] = Object.create(null))));\n }\n };\n Policies.prototype.getSupertypeSet = function (subtype, createIfMissing) {\n var supertypeSet = this.supertypeMap.get(subtype);\n if (!supertypeSet && createIfMissing) {\n this.supertypeMap.set(subtype, (supertypeSet = new Set()));\n }\n return supertypeSet;\n };\n Policies.prototype.fragmentMatches = function (fragment, typename, result, variables) {\n var _this = this;\n if (!fragment.typeCondition)\n return true;\n // If the fragment has a type condition but the object we\'re matching\n // against does not have a __typename, the fragment cannot match.\n if (!typename)\n return false;\n var supertype = fragment.typeCondition.name.value;\n // Common case: fragment type condition and __typename are the same.\n if (typename === supertype)\n return true;\n if (this.usingPossibleTypes && this.supertypeMap.has(supertype)) {\n var typenameSupertypeSet = this.getSupertypeSet(typename, true);\n var workQueue_1 = [typenameSupertypeSet];\n var maybeEnqueue_1 = function (subtype) {\n var supertypeSet = _this.getSupertypeSet(subtype, false);\n if (supertypeSet &&\n supertypeSet.size &&\n workQueue_1.indexOf(supertypeSet) < 0) {\n workQueue_1.push(supertypeSet);\n }\n };\n // We need to check fuzzy subtypes only if we encountered fuzzy\n // subtype strings in addPossibleTypes, and only while writing to\n // the cache, since that\'s when selectionSetMatchesResult gives a\n // strong signal of fragment matching. The StoreReader class calls\n // policies.fragmentMatches without passing a result object, so\n // needToCheckFuzzySubtypes is always false while reading.\n var needToCheckFuzzySubtypes = !!(result && this.fuzzySubtypes.size);\n var checkingFuzzySubtypes = false;\n // It\'s important to keep evaluating workQueue.length each time through\n // the loop, because the queue can grow while we\'re iterating over it.\n for (var i = 0; i < workQueue_1.length; ++i) {\n var supertypeSet = workQueue_1[i];\n if (supertypeSet.has(supertype)) {\n if (!typenameSupertypeSet.has(supertype)) {\n if (checkingFuzzySubtypes) {\n globalThis.__DEV__ !== false && globals/* invariant */.V1.warn(6, typename, supertype);\n }\n // Record positive results for faster future lookup.\n // Unfortunately, we cannot safely cache negative results,\n // because new possibleTypes data could always be added to the\n // Policies class.\n typenameSupertypeSet.add(supertype);\n }\n return true;\n }\n supertypeSet.forEach(maybeEnqueue_1);\n if (needToCheckFuzzySubtypes &&\n // Start checking fuzzy subtypes only after exhausting all\n // non-fuzzy subtypes (after the final iteration of the loop).\n i === workQueue_1.length - 1 &&\n // We could wait to compare fragment.selectionSet to result\n // after we verify the supertype, but this check is often less\n // expensive than that search, and we will have to do the\n // comparison anyway whenever we find a potential match.\n selectionSetMatchesResult(fragment.selectionSet, result, variables)) {\n // We don\'t always need to check fuzzy subtypes (if no result\n // was provided, or !this.fuzzySubtypes.size), but, when we do,\n // we only want to check them once.\n needToCheckFuzzySubtypes = false;\n checkingFuzzySubtypes = true;\n // If we find any fuzzy subtypes that match typename, extend the\n // workQueue to search through the supertypes of those fuzzy\n // subtypes. Otherwise the for-loop will terminate and we\'ll\n // return false below.\n this.fuzzySubtypes.forEach(function (regExp, fuzzyString) {\n var match = typename.match(regExp);\n if (match && match[0] === typename) {\n maybeEnqueue_1(fuzzyString);\n }\n });\n }\n }\n }\n return false;\n };\n Policies.prototype.hasKeyArgs = function (typename, fieldName) {\n var policy = this.getFieldPolicy(typename, fieldName, false);\n return !!(policy && policy.keyFn);\n };\n Policies.prototype.getStoreFieldName = function (fieldSpec) {\n var typename = fieldSpec.typename, fieldName = fieldSpec.fieldName;\n var policy = this.getFieldPolicy(typename, fieldName, false);\n var storeFieldName;\n var keyFn = policy && policy.keyFn;\n if (keyFn && typename) {\n var context = {\n typename: typename,\n fieldName: fieldName,\n field: fieldSpec.field || null,\n variables: fieldSpec.variables,\n };\n var args = argsFromFieldSpecifier(fieldSpec);\n while (keyFn) {\n var specifierOrString = keyFn(args, context);\n if ((0,arrays/* isArray */.c)(specifierOrString)) {\n keyFn = keyArgsFnFromSpecifier(specifierOrString);\n }\n else {\n // If the custom keyFn returns a falsy value, fall back to\n // fieldName instead.\n storeFieldName = specifierOrString || fieldName;\n break;\n }\n }\n }\n if (storeFieldName === void 0) {\n storeFieldName =\n fieldSpec.field ?\n (0,storeUtils/* storeKeyNameFromField */.Ii)(fieldSpec.field, fieldSpec.variables)\n : (0,storeUtils/* getStoreKeyName */.o5)(fieldName, argsFromFieldSpecifier(fieldSpec));\n }\n // Returning false from a keyArgs function is like configuring\n // keyArgs: false, but more dynamic.\n if (storeFieldName === false) {\n return fieldName;\n }\n // Make sure custom field names start with the actual field.name.value\n // of the field, so we can always figure out which properties of a\n // StoreObject correspond to which original field names.\n return fieldName === fieldNameFromStoreName(storeFieldName) ? storeFieldName\n : fieldName + ":" + storeFieldName;\n };\n Policies.prototype.readField = function (options, context) {\n var objectOrReference = options.from;\n if (!objectOrReference)\n return;\n var nameOrField = options.field || options.fieldName;\n if (!nameOrField)\n return;\n if (options.typename === void 0) {\n var typename = context.store.getFieldValue(objectOrReference, "__typename");\n if (typename)\n options.typename = typename;\n }\n var storeFieldName = this.getStoreFieldName(options);\n var fieldName = fieldNameFromStoreName(storeFieldName);\n var existing = context.store.getFieldValue(objectOrReference, storeFieldName);\n var policy = this.getFieldPolicy(options.typename, fieldName, false);\n var read = policy && policy.read;\n if (read) {\n var readOptions = makeFieldFunctionOptions(this, objectOrReference, options, context, context.store.getStorage((0,storeUtils/* isReference */.A_)(objectOrReference) ?\n objectOrReference.__ref\n : objectOrReference, storeFieldName));\n // Call read(existing, readOptions) with cacheSlot holding this.cache.\n return reactiveVars/* cacheSlot */.bl.withValue(this.cache, read, [\n existing,\n readOptions,\n ]);\n }\n return existing;\n };\n Policies.prototype.getReadFunction = function (typename, fieldName) {\n var policy = this.getFieldPolicy(typename, fieldName, false);\n return policy && policy.read;\n };\n Policies.prototype.getMergeFunction = function (parentTypename, fieldName, childTypename) {\n var policy = this.getFieldPolicy(parentTypename, fieldName, false);\n var merge = policy && policy.merge;\n if (!merge && childTypename) {\n policy = this.getTypePolicy(childTypename);\n merge = policy && policy.merge;\n }\n return merge;\n };\n Policies.prototype.runMergeFunction = function (existing, incoming, _a, context, storage) {\n var field = _a.field, typename = _a.typename, merge = _a.merge;\n if (merge === mergeTrueFn) {\n // Instead of going to the trouble of creating a full\n // FieldFunctionOptions object and calling mergeTrueFn, we can\n // simply call mergeObjects, as mergeTrueFn would.\n return makeMergeObjectsFunction(context.store)(existing, incoming);\n }\n if (merge === mergeFalseFn) {\n // Likewise for mergeFalseFn, whose implementation is even simpler.\n return incoming;\n }\n // If cache.writeQuery or cache.writeFragment was called with\n // options.overwrite set to true, we still call merge functions, but\n // the existing data is always undefined, so the merge function will\n // not attempt to combine the incoming data with the existing data.\n if (context.overwrite) {\n existing = void 0;\n }\n return merge(existing, incoming, makeFieldFunctionOptions(this, \n // Unlike options.readField for read functions, we do not fall\n // back to the current object if no foreignObjOrRef is provided,\n // because it\'s not clear what the current object should be for\n // merge functions: the (possibly undefined) existing object, or\n // the incoming object? If you think your merge function needs\n // to read sibling fields in order to produce a new value for\n // the current field, you might want to rethink your strategy,\n // because that\'s a recipe for making merge behavior sensitive\n // to the order in which fields are written into the cache.\n // However, readField(name, ref) is useful for merge functions\n // that need to deduplicate child objects and references.\n void 0, {\n typename: typename,\n fieldName: field.name.value,\n field: field,\n variables: context.variables,\n }, context, storage || Object.create(null)));\n };\n return Policies;\n}());\n\nfunction makeFieldFunctionOptions(policies, objectOrReference, fieldSpec, context, storage) {\n var storeFieldName = policies.getStoreFieldName(fieldSpec);\n var fieldName = fieldNameFromStoreName(storeFieldName);\n var variables = fieldSpec.variables || context.variables;\n var _a = context.store, toReference = _a.toReference, canRead = _a.canRead;\n return {\n args: argsFromFieldSpecifier(fieldSpec),\n field: fieldSpec.field || null,\n fieldName: fieldName,\n storeFieldName: storeFieldName,\n variables: variables,\n isReference: storeUtils/* isReference */.A_,\n toReference: toReference,\n storage: storage,\n cache: policies.cache,\n canRead: canRead,\n readField: function () {\n return policies.readField(normalizeReadFieldOptions(arguments, objectOrReference, variables), context);\n },\n mergeObjects: makeMergeObjectsFunction(context.store),\n };\n}\nfunction normalizeReadFieldOptions(readFieldArgs, objectOrReference, variables) {\n var fieldNameOrOptions = readFieldArgs[0], from = readFieldArgs[1], argc = readFieldArgs.length;\n var options;\n if (typeof fieldNameOrOptions === "string") {\n options = {\n fieldName: fieldNameOrOptions,\n // Default to objectOrReference only when no second argument was\n // passed for the from parameter, not when undefined is explicitly\n // passed as the second argument.\n from: argc > 1 ? from : objectOrReference,\n };\n }\n else {\n options = (0,tslib_es6/* __assign */.Cl)({}, fieldNameOrOptions);\n // Default to objectOrReference only when fieldNameOrOptions.from is\n // actually omitted, rather than just undefined.\n if (!hasOwn.call(options, "from")) {\n options.from = objectOrReference;\n }\n }\n if (globalThis.__DEV__ !== false && options.from === void 0) {\n globalThis.__DEV__ !== false && globals/* invariant */.V1.warn(7, (0,stringifyForDisplay/* stringifyForDisplay */.p)(Array.from(readFieldArgs)));\n }\n if (void 0 === options.variables) {\n options.variables = variables;\n }\n return options;\n}\nfunction makeMergeObjectsFunction(store) {\n return function mergeObjects(existing, incoming) {\n if ((0,arrays/* isArray */.c)(existing) || (0,arrays/* isArray */.c)(incoming)) {\n throw (0,globals/* newInvariantError */.vA)(8);\n }\n // These dynamic checks are necessary because the parameters of a\n // custom merge function can easily have the any type, so the type\n // system cannot always enforce the StoreObject | Reference parameter\n // types of options.mergeObjects.\n if ((0,objects/* isNonNullObject */.U)(existing) && (0,objects/* isNonNullObject */.U)(incoming)) {\n var eType = store.getFieldValue(existing, "__typename");\n var iType = store.getFieldValue(incoming, "__typename");\n var typesDiffer = eType && iType && eType !== iType;\n if (typesDiffer) {\n return incoming;\n }\n if ((0,storeUtils/* isReference */.A_)(existing) && storeValueIsStoreObject(incoming)) {\n // Update the normalized EntityStore for the entity identified by\n // existing.__ref, preferring/overwriting any fields contributed by the\n // newer incoming StoreObject.\n store.merge(existing.__ref, incoming);\n return existing;\n }\n if (storeValueIsStoreObject(existing) && (0,storeUtils/* isReference */.A_)(incoming)) {\n // Update the normalized EntityStore for the entity identified by\n // incoming.__ref, taking fields from the older existing object only if\n // those fields are not already present in the newer StoreObject\n // identified by incoming.__ref.\n store.merge(existing, incoming.__ref);\n return incoming;\n }\n if (storeValueIsStoreObject(existing) &&\n storeValueIsStoreObject(incoming)) {\n return (0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, existing), incoming);\n }\n }\n return incoming;\n };\n}\n//# sourceMappingURL=policies.js.map\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/cache/inmemory/writeToStore.js\n\n\n\n\n\n\n\n\n// Since there are only four possible combinations of context.clientOnly and\n// context.deferred values, we should need at most four "flavors" of any given\n// WriteContext. To avoid creating multiple copies of the same context, we cache\n// the contexts in the context.flavors Map (shared by all flavors) according to\n// their clientOnly and deferred values (always in that order).\nfunction getContextFlavor(context, clientOnly, deferred) {\n var key = "".concat(clientOnly).concat(deferred);\n var flavored = context.flavors.get(key);\n if (!flavored) {\n context.flavors.set(key, (flavored =\n context.clientOnly === clientOnly && context.deferred === deferred ?\n context\n : (0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, context), { clientOnly: clientOnly, deferred: deferred })));\n }\n return flavored;\n}\nvar StoreWriter = /** @class */ (function () {\n function StoreWriter(cache, reader, fragments) {\n this.cache = cache;\n this.reader = reader;\n this.fragments = fragments;\n }\n StoreWriter.prototype.writeToStore = function (store, _a) {\n var _this = this;\n var query = _a.query, result = _a.result, dataId = _a.dataId, variables = _a.variables, overwrite = _a.overwrite;\n var operationDefinition = (0,getFromAST/* getOperationDefinition */.Vu)(query);\n var merger = makeProcessedFieldsMerger();\n variables = (0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, (0,getFromAST/* getDefaultValues */.wY)(operationDefinition)), variables);\n var context = (0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({ store: store, written: Object.create(null), merge: function (existing, incoming) {\n return merger.merge(existing, incoming);\n }, variables: variables, varString: (0,canonicalStringify/* canonicalStringify */.M)(variables) }, extractFragmentContext(query, this.fragments)), { overwrite: !!overwrite, incomingById: new Map(), clientOnly: false, deferred: false, flavors: new Map() });\n var ref = this.processSelectionSet({\n result: result || Object.create(null),\n dataId: dataId,\n selectionSet: operationDefinition.selectionSet,\n mergeTree: { map: new Map() },\n context: context,\n });\n if (!(0,storeUtils/* isReference */.A_)(ref)) {\n throw (0,globals/* newInvariantError */.vA)(11, result);\n }\n // So far, the store has not been modified, so now it\'s time to process\n // context.incomingById and merge those incoming fields into context.store.\n context.incomingById.forEach(function (_a, dataId) {\n var storeObject = _a.storeObject, mergeTree = _a.mergeTree, fieldNodeSet = _a.fieldNodeSet;\n var entityRef = (0,storeUtils/* makeReference */.WU)(dataId);\n if (mergeTree && mergeTree.map.size) {\n var applied = _this.applyMerges(mergeTree, entityRef, storeObject, context);\n if ((0,storeUtils/* isReference */.A_)(applied)) {\n // Assume References returned by applyMerges have already been merged\n // into the store. See makeMergeObjectsFunction in policies.ts for an\n // example of how this can happen.\n return;\n }\n // Otherwise, applyMerges returned a StoreObject, whose fields we should\n // merge into the store (see store.merge statement below).\n storeObject = applied;\n }\n if (globalThis.__DEV__ !== false && !context.overwrite) {\n var fieldsWithSelectionSets_1 = Object.create(null);\n fieldNodeSet.forEach(function (field) {\n if (field.selectionSet) {\n fieldsWithSelectionSets_1[field.name.value] = true;\n }\n });\n var hasSelectionSet_1 = function (storeFieldName) {\n return fieldsWithSelectionSets_1[fieldNameFromStoreName(storeFieldName)] ===\n true;\n };\n var hasMergeFunction_1 = function (storeFieldName) {\n var childTree = mergeTree && mergeTree.map.get(storeFieldName);\n return Boolean(childTree && childTree.info && childTree.info.merge);\n };\n Object.keys(storeObject).forEach(function (storeFieldName) {\n // If a merge function was defined for this field, trust that it\n // did the right thing about (not) clobbering data. If the field\n // has no selection set, it\'s a scalar field, so it doesn\'t need\n // a merge function (even if it\'s an object, like JSON data).\n if (hasSelectionSet_1(storeFieldName) &&\n !hasMergeFunction_1(storeFieldName)) {\n warnAboutDataLoss(entityRef, storeObject, storeFieldName, context.store);\n }\n });\n }\n store.merge(dataId, storeObject);\n });\n // Any IDs written explicitly to the cache will be retained as\n // reachable root IDs for garbage collection purposes. Although this\n // logic includes root IDs like ROOT_QUERY and ROOT_MUTATION, their\n // retainment counts are effectively ignored because cache.gc() always\n // includes them in its root ID set.\n store.retain(ref.__ref);\n return ref;\n };\n StoreWriter.prototype.processSelectionSet = function (_a) {\n var _this = this;\n var dataId = _a.dataId, result = _a.result, selectionSet = _a.selectionSet, context = _a.context, \n // This object allows processSelectionSet to report useful information\n // to its callers without explicitly returning that information.\n mergeTree = _a.mergeTree;\n var policies = this.cache.policies;\n // This variable will be repeatedly updated using context.merge to\n // accumulate all fields that need to be written into the store.\n var incoming = Object.create(null);\n // If typename was not passed in, infer it. Note that typename is\n // always passed in for tricky-to-infer cases such as "Query" for\n // ROOT_QUERY.\n var typename = (dataId && policies.rootTypenamesById[dataId]) ||\n (0,storeUtils/* getTypenameFromResult */.D$)(result, selectionSet, context.fragmentMap) ||\n (dataId && context.store.get(dataId, "__typename"));\n if ("string" === typeof typename) {\n incoming.__typename = typename;\n }\n // This readField function will be passed as context.readField in the\n // KeyFieldsContext object created within policies.identify (called below).\n // In addition to reading from the existing context.store (thanks to the\n // policies.readField(options, context) line at the very bottom), this\n // version of readField can read from Reference objects that are currently\n // pending in context.incomingById, which is important whenever keyFields\n // need to be extracted from a child object that processSelectionSet has\n // turned into a Reference.\n var readField = function () {\n var options = normalizeReadFieldOptions(arguments, incoming, context.variables);\n if ((0,storeUtils/* isReference */.A_)(options.from)) {\n var info = context.incomingById.get(options.from.__ref);\n if (info) {\n var result_1 = policies.readField((0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, options), { from: info.storeObject }), context);\n if (result_1 !== void 0) {\n return result_1;\n }\n }\n }\n return policies.readField(options, context);\n };\n var fieldNodeSet = new Set();\n this.flattenFields(selectionSet, result, \n // This WriteContext will be the default context value for fields returned\n // by the flattenFields method, but some fields may be assigned a modified\n // context, depending on the presence of @client and other directives.\n context, typename).forEach(function (context, field) {\n var _a;\n var resultFieldKey = (0,storeUtils/* resultKeyNameFromField */.ue)(field);\n var value = result[resultFieldKey];\n fieldNodeSet.add(field);\n if (value !== void 0) {\n var storeFieldName = policies.getStoreFieldName({\n typename: typename,\n fieldName: field.name.value,\n field: field,\n variables: context.variables,\n });\n var childTree = getChildMergeTree(mergeTree, storeFieldName);\n var incomingValue = _this.processFieldValue(value, field, \n // Reset context.clientOnly and context.deferred to their default\n // values before processing nested selection sets.\n field.selectionSet ?\n getContextFlavor(context, false, false)\n : context, childTree);\n // To determine if this field holds a child object with a merge function\n // defined in its type policy (see PR #7070), we need to figure out the\n // child object\'s __typename.\n var childTypename = void 0;\n // The field\'s value can be an object that has a __typename only if the\n // field has a selection set. Otherwise incomingValue is scalar.\n if (field.selectionSet &&\n ((0,storeUtils/* isReference */.A_)(incomingValue) || storeValueIsStoreObject(incomingValue))) {\n childTypename = readField("__typename", incomingValue);\n }\n var merge = policies.getMergeFunction(typename, field.name.value, childTypename);\n if (merge) {\n childTree.info = {\n // TODO Check compatibility against any existing childTree.field?\n field: field,\n typename: typename,\n merge: merge,\n };\n }\n else {\n maybeRecycleChildMergeTree(mergeTree, storeFieldName);\n }\n incoming = context.merge(incoming, (_a = {},\n _a[storeFieldName] = incomingValue,\n _a));\n }\n else if (globalThis.__DEV__ !== false &&\n !context.clientOnly &&\n !context.deferred &&\n !transform/* addTypenameToDocument */.XY.added(field) &&\n // If the field has a read function, it may be a synthetic field or\n // provide a default value, so its absence from the written data should\n // not be cause for alarm.\n !policies.getReadFunction(typename, field.name.value)) {\n globalThis.__DEV__ !== false && globals/* invariant */.V1.error(12, (0,storeUtils/* resultKeyNameFromField */.ue)(field), result);\n }\n });\n // Identify the result object, even if dataId was already provided,\n // since we always need keyObject below.\n try {\n var _b = policies.identify(result, {\n typename: typename,\n selectionSet: selectionSet,\n fragmentMap: context.fragmentMap,\n storeObject: incoming,\n readField: readField,\n }), id = _b[0], keyObject = _b[1];\n // If dataId was not provided, fall back to the id just generated by\n // policies.identify.\n dataId = dataId || id;\n // Write any key fields that were used during identification, even if\n // they were not mentioned in the original query.\n if (keyObject) {\n // TODO Reverse the order of the arguments?\n incoming = context.merge(incoming, keyObject);\n }\n }\n catch (e) {\n // If dataId was provided, tolerate failure of policies.identify.\n if (!dataId)\n throw e;\n }\n if ("string" === typeof dataId) {\n var dataRef = (0,storeUtils/* makeReference */.WU)(dataId);\n // Avoid processing the same entity object using the same selection\n // set more than once. We use an array instead of a Set since most\n // entity IDs will be written using only one selection set, so the\n // size of this array is likely to be very small, meaning indexOf is\n // likely to be faster than Set.prototype.has.\n var sets = context.written[dataId] || (context.written[dataId] = []);\n if (sets.indexOf(selectionSet) >= 0)\n return dataRef;\n sets.push(selectionSet);\n // If we\'re about to write a result object into the store, but we\n // happen to know that the exact same (===) result object would be\n // returned if we were to reread the result with the same inputs,\n // then we can skip the rest of the processSelectionSet work for\n // this object, and immediately return a Reference to it.\n if (this.reader &&\n this.reader.isFresh(result, dataRef, selectionSet, context)) {\n return dataRef;\n }\n var previous_1 = context.incomingById.get(dataId);\n if (previous_1) {\n previous_1.storeObject = context.merge(previous_1.storeObject, incoming);\n previous_1.mergeTree = mergeMergeTrees(previous_1.mergeTree, mergeTree);\n fieldNodeSet.forEach(function (field) { return previous_1.fieldNodeSet.add(field); });\n }\n else {\n context.incomingById.set(dataId, {\n storeObject: incoming,\n // Save a reference to mergeTree only if it is not empty, because\n // empty MergeTrees may be recycled by maybeRecycleChildMergeTree and\n // reused for entirely different parts of the result tree.\n mergeTree: mergeTreeIsEmpty(mergeTree) ? void 0 : mergeTree,\n fieldNodeSet: fieldNodeSet,\n });\n }\n return dataRef;\n }\n return incoming;\n };\n StoreWriter.prototype.processFieldValue = function (value, field, context, mergeTree) {\n var _this = this;\n if (!field.selectionSet || value === null) {\n // In development, we need to clone scalar values so that they can be\n // safely frozen with maybeDeepFreeze in readFromStore.ts. In production,\n // it\'s cheaper to store the scalar values directly in the cache.\n return globalThis.__DEV__ !== false ? (0,cloneDeep/* cloneDeep */.m)(value) : value;\n }\n if ((0,arrays/* isArray */.c)(value)) {\n return value.map(function (item, i) {\n var value = _this.processFieldValue(item, field, context, getChildMergeTree(mergeTree, i));\n maybeRecycleChildMergeTree(mergeTree, i);\n return value;\n });\n }\n return this.processSelectionSet({\n result: value,\n selectionSet: field.selectionSet,\n context: context,\n mergeTree: mergeTree,\n });\n };\n // Implements https://spec.graphql.org/draft/#sec-Field-Collection, but with\n // some additions for tracking @client and @defer directives.\n StoreWriter.prototype.flattenFields = function (selectionSet, result, context, typename) {\n if (typename === void 0) { typename = (0,storeUtils/* getTypenameFromResult */.D$)(result, selectionSet, context.fragmentMap); }\n var fieldMap = new Map();\n var policies = this.cache.policies;\n var limitingTrie = new trie_lib/* Trie */.b(false); // No need for WeakMap, since limitingTrie does not escape.\n (function flatten(selectionSet, inheritedContext) {\n var visitedNode = limitingTrie.lookup(selectionSet, \n // Because we take inheritedClientOnly and inheritedDeferred into\n // consideration here (in addition to selectionSet), it\'s possible for\n // the same selection set to be flattened more than once, if it appears\n // in the query with different @client and/or @directive configurations.\n inheritedContext.clientOnly, inheritedContext.deferred);\n if (visitedNode.visited)\n return;\n visitedNode.visited = true;\n selectionSet.selections.forEach(function (selection) {\n if (!(0,directives/* shouldInclude */.MS)(selection, context.variables))\n return;\n var clientOnly = inheritedContext.clientOnly, deferred = inheritedContext.deferred;\n if (\n // Since the presence of @client or @defer on this field can only\n // cause clientOnly or deferred to become true, we can skip the\n // forEach loop if both clientOnly and deferred are already true.\n !(clientOnly && deferred) &&\n (0,arrays/* isNonEmptyArray */.E)(selection.directives)) {\n selection.directives.forEach(function (dir) {\n var name = dir.name.value;\n if (name === "client")\n clientOnly = true;\n if (name === "defer") {\n var args = (0,storeUtils/* argumentsObjectFromField */.MB)(dir, context.variables);\n // The @defer directive takes an optional args.if boolean\n // argument, similar to @include(if: boolean). Note that\n // @defer(if: false) does not make context.deferred false, but\n // instead behaves as if there was no @defer directive.\n if (!args || args.if !== false) {\n deferred = true;\n }\n // TODO In the future, we may want to record args.label using\n // context.deferred, if a label is specified.\n }\n });\n }\n if ((0,storeUtils/* isField */.dt)(selection)) {\n var existing = fieldMap.get(selection);\n if (existing) {\n // If this field has been visited along another recursive path\n // before, the final context should have clientOnly or deferred set\n // to true only if *all* paths have the directive (hence the &&).\n clientOnly = clientOnly && existing.clientOnly;\n deferred = deferred && existing.deferred;\n }\n fieldMap.set(selection, getContextFlavor(context, clientOnly, deferred));\n }\n else {\n var fragment = (0,graphql_fragments/* getFragmentFromSelection */.HQ)(selection, context.lookupFragment);\n if (!fragment && selection.kind === kinds/* Kind */.b.FRAGMENT_SPREAD) {\n throw (0,globals/* newInvariantError */.vA)(13, selection.name.value);\n }\n if (fragment &&\n policies.fragmentMatches(fragment, typename, result, context.variables)) {\n flatten(fragment.selectionSet, getContextFlavor(context, clientOnly, deferred));\n }\n }\n });\n })(selectionSet, context);\n return fieldMap;\n };\n StoreWriter.prototype.applyMerges = function (mergeTree, existing, incoming, context, getStorageArgs) {\n var _a;\n var _this = this;\n if (mergeTree.map.size && !(0,storeUtils/* isReference */.A_)(incoming)) {\n var e_1 = \n // Items in the same position in different arrays are not\n // necessarily related to each other, so when incoming is an array\n // we process its elements as if there was no existing data.\n (!(0,arrays/* isArray */.c)(incoming) &&\n // Likewise, existing must be either a Reference or a StoreObject\n // in order for its fields to be safe to merge with the fields of\n // the incoming object.\n ((0,storeUtils/* isReference */.A_)(existing) || storeValueIsStoreObject(existing))) ?\n existing\n : void 0;\n // This narrowing is implied by mergeTree.map.size > 0 and\n // !isReference(incoming), though TypeScript understandably cannot\n // hope to infer this type.\n var i_1 = incoming;\n // The options.storage objects provided to read and merge functions\n // are derived from the identity of the parent object plus a\n // sequence of storeFieldName strings/numbers identifying the nested\n // field name path of each field value to be merged.\n if (e_1 && !getStorageArgs) {\n getStorageArgs = [(0,storeUtils/* isReference */.A_)(e_1) ? e_1.__ref : e_1];\n }\n // It\'s possible that applying merge functions to this subtree will\n // not change the incoming data, so this variable tracks the fields\n // that did change, so we can create a new incoming object when (and\n // only when) at least one incoming field has changed. We use a Map\n // to preserve the type of numeric keys.\n var changedFields_1;\n var getValue_1 = function (from, name) {\n return ((0,arrays/* isArray */.c)(from) ?\n typeof name === "number" ?\n from[name]\n : void 0\n : context.store.getFieldValue(from, String(name)));\n };\n mergeTree.map.forEach(function (childTree, storeFieldName) {\n var eVal = getValue_1(e_1, storeFieldName);\n var iVal = getValue_1(i_1, storeFieldName);\n // If we have no incoming data, leave any existing data untouched.\n if (void 0 === iVal)\n return;\n if (getStorageArgs) {\n getStorageArgs.push(storeFieldName);\n }\n var aVal = _this.applyMerges(childTree, eVal, iVal, context, getStorageArgs);\n if (aVal !== iVal) {\n changedFields_1 = changedFields_1 || new Map();\n changedFields_1.set(storeFieldName, aVal);\n }\n if (getStorageArgs) {\n (0,globals/* invariant */.V1)(getStorageArgs.pop() === storeFieldName);\n }\n });\n if (changedFields_1) {\n // Shallow clone i so we can add changed fields to it.\n incoming = ((0,arrays/* isArray */.c)(i_1) ? i_1.slice(0) : (0,tslib_es6/* __assign */.Cl)({}, i_1));\n changedFields_1.forEach(function (value, name) {\n incoming[name] = value;\n });\n }\n }\n if (mergeTree.info) {\n return this.cache.policies.runMergeFunction(existing, incoming, mergeTree.info, context, getStorageArgs && (_a = context.store).getStorage.apply(_a, getStorageArgs));\n }\n return incoming;\n };\n return StoreWriter;\n}());\n\nvar emptyMergeTreePool = [];\nfunction getChildMergeTree(_a, name) {\n var map = _a.map;\n if (!map.has(name)) {\n map.set(name, emptyMergeTreePool.pop() || { map: new Map() });\n }\n return map.get(name);\n}\nfunction mergeMergeTrees(left, right) {\n if (left === right || !right || mergeTreeIsEmpty(right))\n return left;\n if (!left || mergeTreeIsEmpty(left))\n return right;\n var info = left.info && right.info ? (0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, left.info), right.info) : left.info || right.info;\n var needToMergeMaps = left.map.size && right.map.size;\n var map = needToMergeMaps ? new Map()\n : left.map.size ? left.map\n : right.map;\n var merged = { info: info, map: map };\n if (needToMergeMaps) {\n var remainingRightKeys_1 = new Set(right.map.keys());\n left.map.forEach(function (leftTree, key) {\n merged.map.set(key, mergeMergeTrees(leftTree, right.map.get(key)));\n remainingRightKeys_1.delete(key);\n });\n remainingRightKeys_1.forEach(function (key) {\n merged.map.set(key, mergeMergeTrees(right.map.get(key), left.map.get(key)));\n });\n }\n return merged;\n}\nfunction mergeTreeIsEmpty(tree) {\n return !tree || !(tree.info || tree.map.size);\n}\nfunction maybeRecycleChildMergeTree(_a, name) {\n var map = _a.map;\n var childTree = map.get(name);\n if (childTree && mergeTreeIsEmpty(childTree)) {\n emptyMergeTreePool.push(childTree);\n map.delete(name);\n }\n}\nvar warnings = new Set();\n// Note that this function is unused in production, and thus should be\n// pruned by any well-configured minifier.\nfunction warnAboutDataLoss(existingRef, incomingObj, storeFieldName, store) {\n var getChild = function (objOrRef) {\n var child = store.getFieldValue(objOrRef, storeFieldName);\n return typeof child === "object" && child;\n };\n var existing = getChild(existingRef);\n if (!existing)\n return;\n var incoming = getChild(incomingObj);\n if (!incoming)\n return;\n // It\'s always safe to replace a reference, since it refers to data\n // safely stored elsewhere.\n if ((0,storeUtils/* isReference */.A_)(existing))\n return;\n // If the values are structurally equivalent, we do not need to worry\n // about incoming replacing existing.\n if ((0,equality_lib/* equal */.L)(existing, incoming))\n return;\n // If we\'re replacing every key of the existing object, then the\n // existing data would be overwritten even if the objects were\n // normalized, so warning would not be helpful here.\n if (Object.keys(existing).every(function (key) { return store.getFieldValue(incoming, key) !== void 0; })) {\n return;\n }\n var parentType = store.getFieldValue(existingRef, "__typename") ||\n store.getFieldValue(incomingObj, "__typename");\n var fieldName = fieldNameFromStoreName(storeFieldName);\n var typeDotName = "".concat(parentType, ".").concat(fieldName);\n // Avoid warning more than once for the same type and field name.\n if (warnings.has(typeDotName))\n return;\n warnings.add(typeDotName);\n var childTypenames = [];\n // Arrays do not have __typename fields, and always need a custom merge\n // function, even if their elements are normalized entities.\n if (!(0,arrays/* isArray */.c)(existing) && !(0,arrays/* isArray */.c)(incoming)) {\n [existing, incoming].forEach(function (child) {\n var typename = store.getFieldValue(child, "__typename");\n if (typeof typename === "string" && !childTypenames.includes(typename)) {\n childTypenames.push(typename);\n }\n });\n }\n globalThis.__DEV__ !== false && globals/* invariant */.V1.warn(14, fieldName, parentType, childTypenames.length ?\n "either ensure all objects of type " +\n childTypenames.join(" and ") +\n " have an ID or a custom merge function, or "\n : "", typeDotName, (0,tslib_es6/* __assign */.Cl)({}, existing), (0,tslib_es6/* __assign */.Cl)({}, incoming));\n}\n//# sourceMappingURL=writeToStore.js.map\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/cache/inmemory/inMemoryCache.js\n\n\n// Make builtins like Map and Set safe to use with non-extensible objects.\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar InMemoryCache = /** @class */ (function (_super) {\n (0,tslib_es6/* __extends */.C6)(InMemoryCache, _super);\n function InMemoryCache(config) {\n if (config === void 0) { config = {}; }\n var _this = _super.call(this) || this;\n _this.watches = new Set();\n _this.addTypenameTransform = new DocumentTransform/* DocumentTransform */.c(transform/* addTypenameToDocument */.XY);\n // Override the default value, since InMemoryCache result objects are frozen\n // in development and expected to remain logically immutable in production.\n _this.assumeImmutableResults = true;\n _this.makeVar = reactiveVars/* makeVar */.UT;\n _this.txCount = 0;\n _this.config = normalizeConfig(config);\n _this.addTypename = !!_this.config.addTypename;\n _this.policies = new Policies({\n cache: _this,\n dataIdFromObject: _this.config.dataIdFromObject,\n possibleTypes: _this.config.possibleTypes,\n typePolicies: _this.config.typePolicies,\n });\n _this.init();\n return _this;\n }\n InMemoryCache.prototype.init = function () {\n // Passing { resultCaching: false } in the InMemoryCache constructor options\n // will completely disable dependency tracking, which will improve memory\n // usage but worsen the performance of repeated reads.\n var rootStore = (this.data = new EntityStore.Root({\n policies: this.policies,\n resultCaching: this.config.resultCaching,\n }));\n // When no optimistic writes are currently active, cache.optimisticData ===\n // cache.data, so there are no additional layers on top of the actual data.\n // When an optimistic update happens, this.optimisticData will become a\n // linked list of EntityStore Layer objects that terminates with the\n // original this.data cache object.\n this.optimisticData = rootStore.stump;\n this.resetResultCache();\n };\n InMemoryCache.prototype.resetResultCache = function (resetResultIdentities) {\n var _this = this;\n var previousReader = this.storeReader;\n var fragments = this.config.fragments;\n // The StoreWriter is mostly stateless and so doesn\'t really need to be\n // reset, but it does need to have its writer.storeReader reference updated,\n // so it\'s simpler to update this.storeWriter as well.\n this.storeWriter = new StoreWriter(this, (this.storeReader = new StoreReader({\n cache: this,\n addTypename: this.addTypename,\n resultCacheMaxSize: this.config.resultCacheMaxSize,\n canonizeResults: shouldCanonizeResults(this.config),\n canon: resetResultIdentities ? void 0 : (previousReader && previousReader.canon),\n fragments: fragments,\n })), fragments);\n this.maybeBroadcastWatch = (0,lib/* wrap */.LV)(function (c, options) {\n return _this.broadcastWatch(c, options);\n }, {\n max: this.config.resultCacheMaxSize ||\n sizes/* cacheSizes */.v["inMemoryCache.maybeBroadcastWatch"] ||\n 5000 /* defaultCacheSizes["inMemoryCache.maybeBroadcastWatch"] */,\n makeCacheKey: function (c) {\n // Return a cache key (thus enabling result caching) only if we\'re\n // currently using a data store that can track cache dependencies.\n var store = c.optimistic ? _this.optimisticData : _this.data;\n if (supportsResultCaching(store)) {\n var optimistic = c.optimistic, id = c.id, variables = c.variables;\n return store.makeCacheKey(c.query, \n // Different watches can have the same query, optimistic\n // status, rootId, and variables, but if their callbacks are\n // different, the (identical) result needs to be delivered to\n // each distinct callback. The easiest way to achieve that\n // separation is to include c.callback in the cache key for\n // maybeBroadcastWatch calls. See issue #5733.\n c.callback, (0,canonicalStringify/* canonicalStringify */.M)({ optimistic: optimistic, id: id, variables: variables }));\n }\n },\n });\n // Since we have thrown away all the cached functions that depend on the\n // CacheGroup dependencies maintained by EntityStore, we should also reset\n // all CacheGroup dependency information.\n new Set([this.data.group, this.optimisticData.group]).forEach(function (group) {\n return group.resetCaching();\n });\n };\n InMemoryCache.prototype.restore = function (data) {\n this.init();\n // Since calling this.init() discards/replaces the entire StoreReader, along\n // with the result caches it maintains, this.data.replace(data) won\'t have\n // to bother deleting the old data.\n if (data)\n this.data.replace(data);\n return this;\n };\n InMemoryCache.prototype.extract = function (optimistic) {\n if (optimistic === void 0) { optimistic = false; }\n return (optimistic ? this.optimisticData : this.data).extract();\n };\n InMemoryCache.prototype.read = function (options) {\n var \n // Since read returns data or null, without any additional metadata\n // about whether/where there might have been missing fields, the\n // default behavior cannot be returnPartialData = true (like it is\n // for the diff method), since defaulting to true would violate the\n // integrity of the T in the return type. However, partial data may\n // be useful in some cases, so returnPartialData:true may be\n // specified explicitly.\n _a = options.returnPartialData, \n // Since read returns data or null, without any additional metadata\n // about whether/where there might have been missing fields, the\n // default behavior cannot be returnPartialData = true (like it is\n // for the diff method), since defaulting to true would violate the\n // integrity of the T in the return type. However, partial data may\n // be useful in some cases, so returnPartialData:true may be\n // specified explicitly.\n returnPartialData = _a === void 0 ? false : _a;\n try {\n return (this.storeReader.diffQueryAgainstStore((0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, options), { store: options.optimistic ? this.optimisticData : this.data, config: this.config, returnPartialData: returnPartialData })).result || null);\n }\n catch (e) {\n if (e instanceof MissingFieldError) {\n // Swallow MissingFieldError and return null, so callers do not need to\n // worry about catching "normal" exceptions resulting from incomplete\n // cache data. Unexpected errors will be re-thrown. If you need more\n // information about which fields were missing, use cache.diff instead,\n // and examine diffResult.missing.\n return null;\n }\n throw e;\n }\n };\n InMemoryCache.prototype.write = function (options) {\n try {\n ++this.txCount;\n return this.storeWriter.writeToStore(this.data, options);\n }\n finally {\n if (!--this.txCount && options.broadcast !== false) {\n this.broadcastWatches();\n }\n }\n };\n InMemoryCache.prototype.modify = function (options) {\n if (hasOwn.call(options, "id") && !options.id) {\n // To my knowledge, TypeScript does not currently provide a way to\n // enforce that an optional property?:type must *not* be undefined\n // when present. That ability would be useful here, because we want\n // options.id to default to ROOT_QUERY only when no options.id was\n // provided. If the caller attempts to pass options.id with a\n // falsy/undefined value (perhaps because cache.identify failed), we\n // should not assume the goal was to modify the ROOT_QUERY object.\n // We could throw, but it seems natural to return false to indicate\n // that nothing was modified.\n return false;\n }\n var store = ((options.optimistic) // Defaults to false.\n ) ?\n this.optimisticData\n : this.data;\n try {\n ++this.txCount;\n return store.modify(options.id || "ROOT_QUERY", options.fields);\n }\n finally {\n if (!--this.txCount && options.broadcast !== false) {\n this.broadcastWatches();\n }\n }\n };\n InMemoryCache.prototype.diff = function (options) {\n return this.storeReader.diffQueryAgainstStore((0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, options), { store: options.optimistic ? this.optimisticData : this.data, rootId: options.id || "ROOT_QUERY", config: this.config }));\n };\n InMemoryCache.prototype.watch = function (watch) {\n var _this = this;\n if (!this.watches.size) {\n // In case we previously called forgetCache(this) because\n // this.watches became empty (see below), reattach this cache to any\n // reactive variables on which it previously depended. It might seem\n // paradoxical that we\'re able to recall something we supposedly\n // forgot, but the point of calling forgetCache(this) is to silence\n // useless broadcasts while this.watches is empty, and to allow the\n // cache to be garbage collected. If, however, we manage to call\n // recallCache(this) here, this cache object must not have been\n // garbage collected yet, and should resume receiving updates from\n // reactive variables, now that it has a watcher to notify.\n (0,reactiveVars/* recallCache */.MS)(this);\n }\n this.watches.add(watch);\n if (watch.immediate) {\n this.maybeBroadcastWatch(watch);\n }\n return function () {\n // Once we remove the last watch from this.watches, cache.broadcastWatches\n // no longer does anything, so we preemptively tell the reactive variable\n // system to exclude this cache from future broadcasts.\n if (_this.watches.delete(watch) && !_this.watches.size) {\n (0,reactiveVars/* forgetCache */.WR)(_this);\n }\n // Remove this watch from the LRU cache managed by the\n // maybeBroadcastWatch OptimisticWrapperFunction, to prevent memory\n // leaks involving the closure of watch.callback.\n _this.maybeBroadcastWatch.forget(watch);\n };\n };\n InMemoryCache.prototype.gc = function (options) {\n var _a;\n canonicalStringify/* canonicalStringify */.M.reset();\n print/* print */.y.reset();\n this.addTypenameTransform.resetCache();\n (_a = this.config.fragments) === null || _a === void 0 ? void 0 : _a.resetCaches();\n var ids = this.optimisticData.gc();\n if (options && !this.txCount) {\n if (options.resetResultCache) {\n this.resetResultCache(options.resetResultIdentities);\n }\n else if (options.resetResultIdentities) {\n this.storeReader.resetCanon();\n }\n }\n return ids;\n };\n // Call this method to ensure the given root ID remains in the cache after\n // garbage collection, along with its transitive child entities. Note that\n // the cache automatically retains all directly written entities. By default,\n // the retainment persists after optimistic updates are removed. Pass true\n // for the optimistic argument if you would prefer for the retainment to be\n // discarded when the top-most optimistic layer is removed. Returns the\n // resulting (non-negative) retainment count.\n InMemoryCache.prototype.retain = function (rootId, optimistic) {\n return (optimistic ? this.optimisticData : this.data).retain(rootId);\n };\n // Call this method to undo the effect of the retain method, above. Once the\n // retainment count falls to zero, the given ID will no longer be preserved\n // during garbage collection, though it may still be preserved by other safe\n // entities that refer to it. Returns the resulting (non-negative) retainment\n // count, in case that\'s useful.\n InMemoryCache.prototype.release = function (rootId, optimistic) {\n return (optimistic ? this.optimisticData : this.data).release(rootId);\n };\n // Returns the canonical ID for a given StoreObject, obeying typePolicies\n // and keyFields (and dataIdFromObject, if you still use that). At minimum,\n // the object must contain a __typename and any primary key fields required\n // to identify entities of that type. If you pass a query result object, be\n // sure that none of the primary key fields have been renamed by aliasing.\n // If you pass a Reference object, its __ref ID string will be returned.\n InMemoryCache.prototype.identify = function (object) {\n if ((0,storeUtils/* isReference */.A_)(object))\n return object.__ref;\n try {\n return this.policies.identify(object)[0];\n }\n catch (e) {\n globalThis.__DEV__ !== false && globals/* invariant */.V1.warn(e);\n }\n };\n InMemoryCache.prototype.evict = function (options) {\n if (!options.id) {\n if (hasOwn.call(options, "id")) {\n // See comment in modify method about why we return false when\n // options.id exists but is falsy/undefined.\n return false;\n }\n options = (0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, options), { id: "ROOT_QUERY" });\n }\n try {\n // It\'s unlikely that the eviction will end up invoking any other\n // cache update operations while it\'s running, but {in,de}crementing\n // this.txCount still seems like a good idea, for uniformity with\n // the other update methods.\n ++this.txCount;\n // Pass this.data as a limit on the depth of the eviction, so evictions\n // during optimistic updates (when this.data is temporarily set equal to\n // this.optimisticData) do not escape their optimistic Layer.\n return this.optimisticData.evict(options, this.data);\n }\n finally {\n if (!--this.txCount && options.broadcast !== false) {\n this.broadcastWatches();\n }\n }\n };\n InMemoryCache.prototype.reset = function (options) {\n var _this = this;\n this.init();\n canonicalStringify/* canonicalStringify */.M.reset();\n if (options && options.discardWatches) {\n // Similar to what happens in the unsubscribe function returned by\n // cache.watch, applied to all current watches.\n this.watches.forEach(function (watch) { return _this.maybeBroadcastWatch.forget(watch); });\n this.watches.clear();\n (0,reactiveVars/* forgetCache */.WR)(this);\n }\n else {\n // Calling this.init() above unblocks all maybeBroadcastWatch caching, so\n // this.broadcastWatches() triggers a broadcast to every current watcher\n // (letting them know their data is now missing). This default behavior is\n // convenient because it means the watches do not have to be manually\n // reestablished after resetting the cache. To prevent this broadcast and\n // cancel all watches, pass true for options.discardWatches.\n this.broadcastWatches();\n }\n return Promise.resolve();\n };\n InMemoryCache.prototype.removeOptimistic = function (idToRemove) {\n var newOptimisticData = this.optimisticData.removeLayer(idToRemove);\n if (newOptimisticData !== this.optimisticData) {\n this.optimisticData = newOptimisticData;\n this.broadcastWatches();\n }\n };\n InMemoryCache.prototype.batch = function (options) {\n var _this = this;\n var update = options.update, _a = options.optimistic, optimistic = _a === void 0 ? true : _a, removeOptimistic = options.removeOptimistic, onWatchUpdated = options.onWatchUpdated;\n var updateResult;\n var perform = function (layer) {\n var _a = _this, data = _a.data, optimisticData = _a.optimisticData;\n ++_this.txCount;\n if (layer) {\n _this.data = _this.optimisticData = layer;\n }\n try {\n return (updateResult = update(_this));\n }\n finally {\n --_this.txCount;\n _this.data = data;\n _this.optimisticData = optimisticData;\n }\n };\n var alreadyDirty = new Set();\n if (onWatchUpdated && !this.txCount) {\n // If an options.onWatchUpdated callback is provided, we want to call it\n // with only the Cache.WatchOptions objects affected by options.update,\n // but there might be dirty watchers already waiting to be broadcast that\n // have nothing to do with the update. To prevent including those watchers\n // in the post-update broadcast, we perform this initial broadcast to\n // collect the dirty watchers, so we can re-dirty them later, after the\n // post-update broadcast, allowing them to receive their pending\n // broadcasts the next time broadcastWatches is called, just as they would\n // if we never called cache.batch.\n this.broadcastWatches((0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, options), { onWatchUpdated: function (watch) {\n alreadyDirty.add(watch);\n return false;\n } }));\n }\n if (typeof optimistic === "string") {\n // Note that there can be multiple layers with the same optimistic ID.\n // When removeOptimistic(id) is called for that id, all matching layers\n // will be removed, and the remaining layers will be reapplied.\n this.optimisticData = this.optimisticData.addLayer(optimistic, perform);\n }\n else if (optimistic === false) {\n // Ensure both this.data and this.optimisticData refer to the root\n // (non-optimistic) layer of the cache during the update. Note that\n // this.data could be a Layer if we are currently executing an optimistic\n // update function, but otherwise will always be an EntityStore.Root\n // instance.\n perform(this.data);\n }\n else {\n // Otherwise, leave this.data and this.optimisticData unchanged and run\n // the update with broadcast batching.\n perform();\n }\n if (typeof removeOptimistic === "string") {\n this.optimisticData = this.optimisticData.removeLayer(removeOptimistic);\n }\n // Note: if this.txCount > 0, then alreadyDirty.size === 0, so this code\n // takes the else branch and calls this.broadcastWatches(options), which\n // does nothing when this.txCount > 0.\n if (onWatchUpdated && alreadyDirty.size) {\n this.broadcastWatches((0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, options), { onWatchUpdated: function (watch, diff) {\n var result = onWatchUpdated.call(this, watch, diff);\n if (result !== false) {\n // Since onWatchUpdated did not return false, this diff is\n // about to be broadcast to watch.callback, so we don\'t need\n // to re-dirty it with the other alreadyDirty watches below.\n alreadyDirty.delete(watch);\n }\n return result;\n } }));\n // Silently re-dirty any watches that were already dirty before the update\n // was performed, and were not broadcast just now.\n if (alreadyDirty.size) {\n alreadyDirty.forEach(function (watch) { return _this.maybeBroadcastWatch.dirty(watch); });\n }\n }\n else {\n // If alreadyDirty is empty or we don\'t have an onWatchUpdated\n // function, we don\'t need to go to the trouble of wrapping\n // options.onWatchUpdated.\n this.broadcastWatches(options);\n }\n return updateResult;\n };\n InMemoryCache.prototype.performTransaction = function (update, optimisticId) {\n return this.batch({\n update: update,\n optimistic: optimisticId || optimisticId !== null,\n });\n };\n InMemoryCache.prototype.transformDocument = function (document) {\n return this.addTypenameToDocument(this.addFragmentsToDocument(document));\n };\n InMemoryCache.prototype.broadcastWatches = function (options) {\n var _this = this;\n if (!this.txCount) {\n this.watches.forEach(function (c) { return _this.maybeBroadcastWatch(c, options); });\n }\n };\n InMemoryCache.prototype.addFragmentsToDocument = function (document) {\n var fragments = this.config.fragments;\n return fragments ? fragments.transform(document) : document;\n };\n InMemoryCache.prototype.addTypenameToDocument = function (document) {\n if (this.addTypename) {\n return this.addTypenameTransform.transformDocument(document);\n }\n return document;\n };\n // This method is wrapped by maybeBroadcastWatch, which is called by\n // broadcastWatches, so that we compute and broadcast results only when\n // the data that would be broadcast might have changed. It would be\n // simpler to check for changes after recomputing a result but before\n // broadcasting it, but this wrapping approach allows us to skip both\n // the recomputation and the broadcast, in most cases.\n InMemoryCache.prototype.broadcastWatch = function (c, options) {\n var lastDiff = c.lastDiff;\n // Both WatchOptions and DiffOptions extend ReadOptions, and DiffOptions\n // currently requires no additional properties, so we can use c (a\n // WatchOptions object) as DiffOptions, without having to allocate a new\n // object, and without having to enumerate the relevant properties (query,\n // variables, etc.) explicitly. There will be some additional properties\n // (lastDiff, callback, etc.), but cache.diff ignores them.\n var diff = this.diff(c);\n if (options) {\n if (c.optimistic && typeof options.optimistic === "string") {\n diff.fromOptimisticTransaction = true;\n }\n if (options.onWatchUpdated &&\n options.onWatchUpdated.call(this, c, diff, lastDiff) === false) {\n // Returning false from the onWatchUpdated callback will prevent\n // calling c.callback(diff) for this watcher.\n return;\n }\n }\n if (!lastDiff || !(0,equality_lib/* equal */.L)(lastDiff.result, diff.result)) {\n c.callback((c.lastDiff = diff), lastDiff);\n }\n };\n return InMemoryCache;\n}(ApolloCache));\n\nif (globalThis.__DEV__ !== false) {\n InMemoryCache.prototype.getMemoryInternals = getMemoryInternals/* getInMemoryCacheMemoryInternals */.cM;\n}\n//# sourceMappingURL=inMemoryCache.js.map\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@apollo/client/cache/inmemory/inMemoryCache.js_+_9_modules?', + ); + + /***/ + }, + + /***/ 738: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + "/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ MS: () => (/* binding */ recallCache),\n/* harmony export */ UT: () => (/* binding */ makeVar),\n/* harmony export */ WR: () => (/* binding */ forgetCache),\n/* harmony export */ bl: () => (/* binding */ cacheSlot)\n/* harmony export */ });\n/* harmony import */ var optimism__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1161);\n\n// Contextual Slot that acquires its value when custom read functions are\n// called in Policies#readField.\nvar cacheSlot = new optimism__WEBPACK_IMPORTED_MODULE_0__/* .Slot */ .DX();\nvar cacheInfoMap = new WeakMap();\nfunction getCacheInfo(cache) {\n var info = cacheInfoMap.get(cache);\n if (!info) {\n cacheInfoMap.set(cache, (info = {\n vars: new Set(),\n dep: (0,optimism__WEBPACK_IMPORTED_MODULE_0__/* .dep */ .yN)(),\n }));\n }\n return info;\n}\nfunction forgetCache(cache) {\n getCacheInfo(cache).vars.forEach(function (rv) { return rv.forgetCache(cache); });\n}\n// Calling forgetCache(cache) serves to silence broadcasts and allows the\n// cache to be garbage collected. However, the varsByCache WeakMap\n// preserves the set of reactive variables that were previously associated\n// with this cache, which makes it possible to \"recall\" the cache at a\n// later time, by reattaching it to those variables. If the cache has been\n// garbage collected in the meantime, because it is no longer reachable,\n// you won't be able to call recallCache(cache), and the cache will\n// automatically disappear from the varsByCache WeakMap.\nfunction recallCache(cache) {\n getCacheInfo(cache).vars.forEach(function (rv) { return rv.attachCache(cache); });\n}\nfunction makeVar(value) {\n var caches = new Set();\n var listeners = new Set();\n var rv = function (newValue) {\n if (arguments.length > 0) {\n if (value !== newValue) {\n value = newValue;\n caches.forEach(function (cache) {\n // Invalidate any fields with custom read functions that\n // consumed this variable, so query results involving those\n // fields will be recomputed the next time we read them.\n getCacheInfo(cache).dep.dirty(rv);\n // Broadcast changes to any caches that have previously read\n // from this variable.\n broadcast(cache);\n });\n // Finally, notify any listeners added via rv.onNextChange.\n var oldListeners = Array.from(listeners);\n listeners.clear();\n oldListeners.forEach(function (listener) { return listener(value); });\n }\n }\n else {\n // When reading from the variable, obtain the current cache from\n // context via cacheSlot. This isn't entirely foolproof, but it's\n // the same system that powers varDep.\n var cache = cacheSlot.getValue();\n if (cache) {\n attach(cache);\n getCacheInfo(cache).dep(rv);\n }\n }\n return value;\n };\n rv.onNextChange = function (listener) {\n listeners.add(listener);\n return function () {\n listeners.delete(listener);\n };\n };\n var attach = (rv.attachCache = function (cache) {\n caches.add(cache);\n getCacheInfo(cache).vars.add(rv);\n return rv;\n });\n rv.forgetCache = function (cache) { return caches.delete(cache); };\n return rv;\n}\nfunction broadcast(cache) {\n if (cache.broadcastWatches) {\n cache.broadcastWatches();\n }\n}\n//# sourceMappingURL=reactiveVars.js.map\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@apollo/client/cache/inmemory/reactiveVars.js?", + ); + + /***/ + }, + + /***/ 8067: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '\n// EXPORTS\n__webpack_require__.d(__webpack_exports__, {\n R: () => (/* binding */ ApolloClient)\n});\n\n// UNUSED EXPORTS: mergeOptions\n\n// EXTERNAL MODULE: ./node_modules/tslib/tslib.es6.mjs\nvar tslib_es6 = __webpack_require__(1635);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/globals/index.js + 4 modules\nvar globals = __webpack_require__(6319);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/link/core/ApolloLink.js + 3 modules\nvar ApolloLink = __webpack_require__(1188);\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/link/core/execute.js\n\nvar execute = ApolloLink/* ApolloLink */.C.execute;\n//# sourceMappingURL=execute.js.map\n// EXTERNAL MODULE: ./node_modules/@apollo/client/version.js\nvar version = __webpack_require__(435);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/link/http/createHttpLink.js + 14 modules\nvar createHttpLink = __webpack_require__(4132);\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/link/http/HttpLink.js\n\n\n\nvar HttpLink = /** @class */ (function (_super) {\n (0,tslib_es6/* __extends */.C6)(HttpLink, _super);\n function HttpLink(options) {\n if (options === void 0) { options = {}; }\n var _this = _super.call(this, (0,createHttpLink/* createHttpLink */.$)(options).request) || this;\n _this.options = options;\n return _this;\n }\n return HttpLink;\n}(ApolloLink/* ApolloLink */.C));\n\n//# sourceMappingURL=HttpLink.js.map\n// EXTERNAL MODULE: ./node_modules/@wry/equality/lib/index.js\nvar lib = __webpack_require__(5381);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/common/incrementalResult.js\nvar incrementalResult = __webpack_require__(6453);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/graphql/directives.js\nvar directives = __webpack_require__(1250);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/graphql/transform.js\nvar transform = __webpack_require__(3902);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/common/canonicalStringify.js\nvar canonicalStringify = __webpack_require__(6269);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/graphql/DocumentTransform.js\nvar DocumentTransform = __webpack_require__(9993);\n// EXTERNAL MODULE: ./node_modules/zen-observable-ts/module.js\nvar zen_observable_ts_module = __webpack_require__(3401);\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/utilities/observables/asyncMap.js\n\n// Like Observable.prototype.map, except that the mapping function can\n// optionally return a Promise (or be async).\nfunction asyncMap(observable, mapFn, catchFn) {\n return new zen_observable_ts_module/* Observable */.c(function (observer) {\n var promiseQueue = {\n // Normally we would initialize promiseQueue to Promise.resolve(), but\n // in this case, for backwards compatibility, we need to be careful to\n // invoke the first callback synchronously.\n then: function (callback) {\n return new Promise(function (resolve) { return resolve(callback()); });\n },\n };\n function makeCallback(examiner, key) {\n return function (arg) {\n if (examiner) {\n var both = function () {\n // If the observer is closed, we don\'t want to continue calling the\n // mapping function - it\'s result will be swallowed anyways.\n return observer.closed ?\n /* will be swallowed */ 0\n : examiner(arg);\n };\n promiseQueue = promiseQueue.then(both, both).then(function (result) { return observer.next(result); }, function (error) { return observer.error(error); });\n }\n else {\n observer[key](arg);\n }\n };\n }\n var handler = {\n next: makeCallback(mapFn, "next"),\n error: makeCallback(catchFn, "error"),\n complete: function () {\n // no need to reassign `promiseQueue`, after `observer.complete`,\n // the observer will be closed and short-circuit everything anyways\n /*promiseQueue = */ promiseQueue.then(function () { return observer.complete(); });\n },\n };\n var sub = observable.subscribe(handler);\n return function () { return sub.unsubscribe(); };\n });\n}\n//# sourceMappingURL=asyncMap.js.map\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/common/arrays.js\nvar arrays = __webpack_require__(5636);\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/utilities/common/errorHandling.js\n\n\nfunction graphQLResultHasError(result) {\n var errors = getGraphQLErrorsFromResult(result);\n return (0,arrays/* isNonEmptyArray */.E)(errors);\n}\nfunction getGraphQLErrorsFromResult(result) {\n var graphQLErrors = (0,arrays/* isNonEmptyArray */.E)(result.errors) ? result.errors.slice(0) : [];\n if ((0,incrementalResult/* isExecutionPatchIncrementalResult */.ST)(result) &&\n (0,arrays/* isNonEmptyArray */.E)(result.incremental)) {\n result.incremental.forEach(function (incrementalResult) {\n if (incrementalResult.errors) {\n graphQLErrors.push.apply(graphQLErrors, incrementalResult.errors);\n }\n });\n }\n return graphQLErrors;\n}\n//# sourceMappingURL=errorHandling.js.map\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/graphql/getFromAST.js\nvar getFromAST = __webpack_require__(4824);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/graphql/storeUtils.js\nvar storeUtils = __webpack_require__(7194);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/common/objects.js\nvar objects = __webpack_require__(2456);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/common/makeUniqueId.js\nvar makeUniqueId = __webpack_require__(8170);\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/utilities/observables/iteration.js\nfunction iterateObserversSafely(observers, method, argument) {\n // In case observers is modified during iteration, we need to commit to the\n // original elements, which also provides an opportunity to filter them down\n // to just the observers with the given method.\n var observersWithMethod = [];\n observers.forEach(function (obs) { return obs[method] && observersWithMethod.push(obs); });\n observersWithMethod.forEach(function (obs) { return obs[method](argument); });\n}\n//# sourceMappingURL=iteration.js.map\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/common/canUse.js\nvar canUse = __webpack_require__(2619);\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/utilities/observables/subclassing.js\n\n\n// Generic implementations of Observable.prototype methods like map and\n// filter need to know how to create a new Observable from an Observable\n// subclass (like Concast or ObservableQuery). Those methods assume\n// (perhaps unwisely?) that they can call the subtype\'s constructor with a\n// Subscriber function, even though the subclass constructor might expect\n// different parameters. Defining this static Symbol.species property on\n// the subclass is a hint to generic Observable code to use the default\n// constructor instead of trying to do `new Subclass(observer => ...)`.\nfunction fixObservableSubclass(subclass) {\n function set(key) {\n // Object.defineProperty is necessary because the Symbol.species\n // property is a getter by default in modern JS environments, so we\n // can\'t assign to it with a normal assignment expression.\n Object.defineProperty(subclass, key, { value: zen_observable_ts_module/* Observable */.c });\n }\n if (canUse/* canUseSymbol */.ol && Symbol.species) {\n set(Symbol.species);\n }\n // The "@@species" string is used as a fake Symbol.species value in some\n // polyfill systems (including the SymbolSpecies variable used by\n // zen-observable), so we should set it as well, to be safe.\n set("@@species");\n return subclass;\n}\n//# sourceMappingURL=subclassing.js.map\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/utilities/observables/Concast.js\n\n\n\n\nfunction isPromiseLike(value) {\n return value && typeof value.then === "function";\n}\n// A Concast<T> observable concatenates the given sources into a single\n// non-overlapping sequence of Ts, automatically unwrapping any promises,\n// and broadcasts the T elements of that sequence to any number of\n// subscribers, all without creating a bunch of intermediary Observable\n// wrapper objects.\n//\n// Even though any number of observers can subscribe to the Concast, each\n// source observable is guaranteed to receive at most one subscribe call,\n// and the results are multicast to all observers.\n//\n// In addition to broadcasting every next/error message to this.observers,\n// the Concast stores the most recent message using this.latest, so any\n// new observers can immediately receive the latest message, even if it\n// was originally delivered in the past. This behavior means we can assume\n// every active observer in this.observers has received the same most\n// recent message.\n//\n// With the exception of this.latest replay, a Concast is a "hot"\n// observable in the sense that it does not replay past results from the\n// beginning of time for each new observer.\n//\n// Could we have used some existing RxJS class instead? Concast<T> is\n// similar to a BehaviorSubject<T>, because it is multicast and redelivers\n// the latest next/error message to new subscribers. Unlike Subject<T>,\n// Concast<T> does not expose an Observer<T> interface (this.handlers is\n// intentionally private), since Concast<T> gets its inputs from the\n// concatenated sources. If we ever switch to RxJS, there may be some\n// value in reusing their code, but for now we use zen-observable, which\n// does not contain any Subject implementations.\nvar Concast = /** @class */ (function (_super) {\n (0,tslib_es6/* __extends */.C6)(Concast, _super);\n // Not only can the individual elements of the iterable be promises, but\n // also the iterable itself can be wrapped in a promise.\n function Concast(sources) {\n var _this = _super.call(this, function (observer) {\n _this.addObserver(observer);\n return function () { return _this.removeObserver(observer); };\n }) || this;\n // Active observers receiving broadcast messages. Thanks to this.latest,\n // we can assume all observers in this Set have received the same most\n // recent message, though possibly at different times in the past.\n _this.observers = new Set();\n _this.promise = new Promise(function (resolve, reject) {\n _this.resolve = resolve;\n _this.reject = reject;\n });\n // Bound handler functions that can be reused for every internal\n // subscription.\n _this.handlers = {\n next: function (result) {\n if (_this.sub !== null) {\n _this.latest = ["next", result];\n _this.notify("next", result);\n iterateObserversSafely(_this.observers, "next", result);\n }\n },\n error: function (error) {\n var sub = _this.sub;\n if (sub !== null) {\n // Delay unsubscribing from the underlying subscription slightly,\n // so that immediately subscribing another observer can keep the\n // subscription active.\n if (sub)\n setTimeout(function () { return sub.unsubscribe(); });\n _this.sub = null;\n _this.latest = ["error", error];\n _this.reject(error);\n _this.notify("error", error);\n iterateObserversSafely(_this.observers, "error", error);\n }\n },\n complete: function () {\n var _a = _this, sub = _a.sub, _b = _a.sources, sources = _b === void 0 ? [] : _b;\n if (sub !== null) {\n // If complete is called before concast.start, this.sources may be\n // undefined, so we use a default value of [] for sources. That works\n // here because it falls into the if (!value) {...} block, which\n // appropriately terminates the Concast, even if this.sources might\n // eventually have been initialized to a non-empty array.\n var value = sources.shift();\n if (!value) {\n if (sub)\n setTimeout(function () { return sub.unsubscribe(); });\n _this.sub = null;\n if (_this.latest && _this.latest[0] === "next") {\n _this.resolve(_this.latest[1]);\n }\n else {\n _this.resolve();\n }\n _this.notify("complete");\n // We do not store this.latest = ["complete"], because doing so\n // discards useful information about the previous next (or\n // error) message. Instead, if new observers subscribe after\n // this Concast has completed, they will receive the final\n // \'next\' message (unless there was an error) immediately\n // followed by a \'complete\' message (see addObserver).\n iterateObserversSafely(_this.observers, "complete");\n }\n else if (isPromiseLike(value)) {\n value.then(function (obs) { return (_this.sub = obs.subscribe(_this.handlers)); }, _this.handlers.error);\n }\n else {\n _this.sub = value.subscribe(_this.handlers);\n }\n }\n },\n };\n _this.nextResultListeners = new Set();\n // A public way to abort observation and broadcast.\n _this.cancel = function (reason) {\n _this.reject(reason);\n _this.sources = [];\n _this.handlers.complete();\n };\n // Suppress rejection warnings for this.promise, since it\'s perfectly\n // acceptable to pay no attention to this.promise if you\'re consuming\n // the results through the normal observable API.\n _this.promise.catch(function (_) { });\n // If someone accidentally tries to create a Concast using a subscriber\n // function, recover by creating an Observable from that subscriber and\n // using it as the source.\n if (typeof sources === "function") {\n sources = [new zen_observable_ts_module/* Observable */.c(sources)];\n }\n if (isPromiseLike(sources)) {\n sources.then(function (iterable) { return _this.start(iterable); }, _this.handlers.error);\n }\n else {\n _this.start(sources);\n }\n return _this;\n }\n Concast.prototype.start = function (sources) {\n if (this.sub !== void 0)\n return;\n // In practice, sources is most often simply an Array of observables.\n // TODO Consider using sources[Symbol.iterator]() to take advantage\n // of the laziness of non-Array iterables.\n this.sources = Array.from(sources);\n // Calling this.handlers.complete() kicks off consumption of the first\n // source observable. It\'s tempting to do this step lazily in\n // addObserver, but this.promise can be accessed without calling\n // addObserver, so consumption needs to begin eagerly.\n this.handlers.complete();\n };\n Concast.prototype.deliverLastMessage = function (observer) {\n if (this.latest) {\n var nextOrError = this.latest[0];\n var method = observer[nextOrError];\n if (method) {\n method.call(observer, this.latest[1]);\n }\n // If the subscription is already closed, and the last message was\n // a \'next\' message, simulate delivery of the final \'complete\'\n // message again.\n if (this.sub === null && nextOrError === "next" && observer.complete) {\n observer.complete();\n }\n }\n };\n Concast.prototype.addObserver = function (observer) {\n if (!this.observers.has(observer)) {\n // Immediately deliver the most recent message, so we can always\n // be sure all observers have the latest information.\n this.deliverLastMessage(observer);\n this.observers.add(observer);\n }\n };\n Concast.prototype.removeObserver = function (observer) {\n if (this.observers.delete(observer) && this.observers.size < 1) {\n // In case there are still any listeners in this.nextResultListeners, and\n // no error or completion has been broadcast yet, make sure those\n // observers have a chance to run and then remove themselves from\n // this.observers.\n this.handlers.complete();\n }\n };\n Concast.prototype.notify = function (method, arg) {\n var nextResultListeners = this.nextResultListeners;\n if (nextResultListeners.size) {\n // Replacing this.nextResultListeners first ensures it does not grow while\n // we are iterating over it, potentially leading to infinite loops.\n this.nextResultListeners = new Set();\n nextResultListeners.forEach(function (listener) { return listener(method, arg); });\n }\n };\n // We need a way to run callbacks just *before* the next result (or error or\n // completion) is delivered by this Concast, so we can be sure any code that\n // runs as a result of delivering that result/error observes the effects of\n // running the callback(s). It was tempting to reuse the Observer type instead\n // of introducing NextResultListener, but that messes with the sizing and\n // maintenance of this.observers, and ends up being more code overall.\n Concast.prototype.beforeNext = function (callback) {\n var called = false;\n this.nextResultListeners.add(function (method, arg) {\n if (!called) {\n called = true;\n callback(method, arg);\n }\n });\n };\n return Concast;\n}(zen_observable_ts_module/* Observable */.c));\n\n// Necessary because the Concast constructor has a different signature\n// than the Observable constructor.\nfixObservableSubclass(Concast);\n//# sourceMappingURL=Concast.js.map\n// EXTERNAL MODULE: ./node_modules/@apollo/client/errors/index.js\nvar client_errors = __webpack_require__(9211);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/core/networkStatus.js\nvar core_networkStatus = __webpack_require__(8599);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/common/compact.js\nvar compact = __webpack_require__(7945);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/common/cloneDeep.js\nvar cloneDeep = __webpack_require__(1495);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/core/equalByQuery.js\nvar equalByQuery = __webpack_require__(9080);\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/core/ObservableQuery.js\n\n\n\n\n\n\nvar ObservableQuery_assign = Object.assign, ObservableQuery_hasOwnProperty = Object.hasOwnProperty;\nvar ObservableQuery = /** @class */ (function (_super) {\n (0,tslib_es6/* __extends */.C6)(ObservableQuery, _super);\n function ObservableQuery(_a) {\n var queryManager = _a.queryManager, queryInfo = _a.queryInfo, options = _a.options;\n var _this = _super.call(this, function (observer) {\n // Zen Observable has its own error function, so in order to log correctly\n // we need to provide a custom error callback.\n try {\n var subObserver = observer._subscription._observer;\n if (subObserver && !subObserver.error) {\n subObserver.error = defaultSubscriptionObserverErrorCallback;\n }\n }\n catch (_a) { }\n var first = !_this.observers.size;\n _this.observers.add(observer);\n // Deliver most recent error or result.\n var last = _this.last;\n if (last && last.error) {\n observer.error && observer.error(last.error);\n }\n else if (last && last.result) {\n observer.next && observer.next(last.result);\n }\n // Initiate observation of this query if it hasn\'t been reported to\n // the QueryManager yet.\n if (first) {\n // Blindly catching here prevents unhandled promise rejections,\n // and is safe because the ObservableQuery handles this error with\n // this.observer.error, so we\'re not just swallowing the error by\n // ignoring it here.\n _this.reobserve().catch(function () { });\n }\n return function () {\n if (_this.observers.delete(observer) && !_this.observers.size) {\n _this.tearDownQuery();\n }\n };\n }) || this;\n _this.observers = new Set();\n _this.subscriptions = new Set();\n // related classes\n _this.queryInfo = queryInfo;\n _this.queryManager = queryManager;\n // active state\n _this.waitForOwnResult = skipCacheDataFor(options.fetchPolicy);\n _this.isTornDown = false;\n var _b = queryManager.defaultOptions.watchQuery, _c = _b === void 0 ? {} : _b, _d = _c.fetchPolicy, defaultFetchPolicy = _d === void 0 ? "cache-first" : _d;\n var _e = options.fetchPolicy, fetchPolicy = _e === void 0 ? defaultFetchPolicy : _e, \n // Make sure we don\'t store "standby" as the initialFetchPolicy.\n _f = options.initialFetchPolicy, \n // Make sure we don\'t store "standby" as the initialFetchPolicy.\n initialFetchPolicy = _f === void 0 ? fetchPolicy === "standby" ? defaultFetchPolicy : (fetchPolicy) : _f;\n _this.options = (0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, options), { \n // Remember the initial options.fetchPolicy so we can revert back to this\n // policy when variables change. This information can also be specified\n // (or overridden) by providing options.initialFetchPolicy explicitly.\n initialFetchPolicy: initialFetchPolicy, \n // This ensures this.options.fetchPolicy always has a string value, in\n // case options.fetchPolicy was not provided.\n fetchPolicy: fetchPolicy });\n _this.queryId = queryInfo.queryId || queryManager.generateQueryId();\n var opDef = (0,getFromAST/* getOperationDefinition */.Vu)(_this.query);\n _this.queryName = opDef && opDef.name && opDef.name.value;\n return _this;\n }\n Object.defineProperty(ObservableQuery.prototype, "query", {\n // The `query` computed property will always reflect the document transformed\n // by the last run query. `this.options.query` will always reflect the raw\n // untransformed query to ensure document transforms with runtime conditionals\n // are run on the original document.\n get: function () {\n return this.lastQuery || this.options.query;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ObservableQuery.prototype, "variables", {\n // Computed shorthand for this.options.variables, preserved for\n // backwards compatibility.\n /**\n * An object containing the variables that were provided for the query.\n */\n get: function () {\n return this.options.variables;\n },\n enumerable: false,\n configurable: true\n });\n ObservableQuery.prototype.result = function () {\n var _this = this;\n return new Promise(function (resolve, reject) {\n // TODO: this code doesn’t actually make sense insofar as the observer\n // will never exist in this.observers due how zen-observable wraps observables.\n // https://github.com/zenparsing/zen-observable/blob/master/src/Observable.js#L169\n var observer = {\n next: function (result) {\n resolve(result);\n // Stop the query within the QueryManager if we can before\n // this function returns.\n //\n // We do this in order to prevent observers piling up within\n // the QueryManager. Notice that we only fully unsubscribe\n // from the subscription in a setTimeout(..., 0) call. This call can\n // actually be handled by the browser at a much later time. If queries\n // are fired in the meantime, observers that should have been removed\n // from the QueryManager will continue to fire, causing an unnecessary\n // performance hit.\n _this.observers.delete(observer);\n if (!_this.observers.size) {\n _this.queryManager.removeQuery(_this.queryId);\n }\n setTimeout(function () {\n subscription.unsubscribe();\n }, 0);\n },\n error: reject,\n };\n var subscription = _this.subscribe(observer);\n });\n };\n /** @internal */\n ObservableQuery.prototype.resetDiff = function () {\n this.queryInfo.resetDiff();\n };\n ObservableQuery.prototype.getCurrentResult = function (saveAsLastResult) {\n if (saveAsLastResult === void 0) { saveAsLastResult = true; }\n // Use the last result as long as the variables match this.variables.\n var lastResult = this.getLastResult(true);\n var networkStatus = this.queryInfo.networkStatus ||\n (lastResult && lastResult.networkStatus) ||\n core_networkStatus/* NetworkStatus */.pT.ready;\n var result = (0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, lastResult), { loading: (0,core_networkStatus/* isNetworkRequestInFlight */.bi)(networkStatus), networkStatus: networkStatus });\n var _a = this.options.fetchPolicy, fetchPolicy = _a === void 0 ? "cache-first" : _a;\n if (\n // These fetch policies should never deliver data from the cache, unless\n // redelivering a previously delivered result.\n skipCacheDataFor(fetchPolicy) ||\n // If this.options.query has @client(always: true) fields, we cannot\n // trust diff.result, since it was read from the cache without running\n // local resolvers (and it\'s too late to run resolvers now, since we must\n // return a result synchronously).\n this.queryManager.getDocumentInfo(this.query).hasForcedResolvers) {\n // Fall through.\n }\n else if (this.waitForOwnResult) {\n // This would usually be a part of `QueryInfo.getDiff()`.\n // which we skip in the waitForOwnResult case since we are not\n // interested in the diff.\n this.queryInfo["updateWatch"]();\n }\n else {\n var diff = this.queryInfo.getDiff();\n if (diff.complete || this.options.returnPartialData) {\n result.data = diff.result;\n }\n if ((0,lib/* equal */.L)(result.data, {})) {\n result.data = void 0;\n }\n if (diff.complete) {\n // Similar to setting result.partial to false, but taking advantage of the\n // falsiness of missing fields.\n delete result.partial;\n // If the diff is complete, and we\'re using a FetchPolicy that\n // terminates after a complete cache read, we can assume the next result\n // we receive will have NetworkStatus.ready and !loading.\n if (diff.complete &&\n result.networkStatus === core_networkStatus/* NetworkStatus */.pT.loading &&\n (fetchPolicy === "cache-first" || fetchPolicy === "cache-only")) {\n result.networkStatus = core_networkStatus/* NetworkStatus */.pT.ready;\n result.loading = false;\n }\n }\n else {\n result.partial = true;\n }\n if (globalThis.__DEV__ !== false &&\n !diff.complete &&\n !this.options.partialRefetch &&\n !result.loading &&\n !result.data &&\n !result.error) {\n logMissingFieldErrors(diff.missing);\n }\n }\n if (saveAsLastResult) {\n this.updateLastResult(result);\n }\n return result;\n };\n // Compares newResult to the snapshot we took of this.lastResult when it was\n // first received.\n ObservableQuery.prototype.isDifferentFromLastResult = function (newResult, variables) {\n if (!this.last) {\n return true;\n }\n var resultIsDifferent = this.queryManager.getDocumentInfo(this.query).hasNonreactiveDirective ?\n !(0,equalByQuery/* equalByQuery */.a)(this.query, this.last.result, newResult, this.variables)\n : !(0,lib/* equal */.L)(this.last.result, newResult);\n return (resultIsDifferent || (variables && !(0,lib/* equal */.L)(this.last.variables, variables)));\n };\n ObservableQuery.prototype.getLast = function (key, variablesMustMatch) {\n var last = this.last;\n if (last &&\n last[key] &&\n (!variablesMustMatch || (0,lib/* equal */.L)(last.variables, this.variables))) {\n return last[key];\n }\n };\n ObservableQuery.prototype.getLastResult = function (variablesMustMatch) {\n return this.getLast("result", variablesMustMatch);\n };\n ObservableQuery.prototype.getLastError = function (variablesMustMatch) {\n return this.getLast("error", variablesMustMatch);\n };\n ObservableQuery.prototype.resetLastResults = function () {\n delete this.last;\n this.isTornDown = false;\n };\n ObservableQuery.prototype.resetQueryStoreErrors = function () {\n this.queryManager.resetErrors(this.queryId);\n };\n /**\n * Update the variables of this observable query, and fetch the new results.\n * This method should be preferred over `setVariables` in most use cases.\n *\n * @param variables - The new set of variables. If there are missing variables,\n * the previous values of those variables will be used.\n */\n ObservableQuery.prototype.refetch = function (variables) {\n var _a;\n var reobserveOptions = {\n // Always disable polling for refetches.\n pollInterval: 0,\n };\n // Unless the provided fetchPolicy always consults the network\n // (no-cache, network-only, or cache-and-network), override it with\n // network-only to force the refetch for this fetchQuery call.\n var fetchPolicy = this.options.fetchPolicy;\n if (fetchPolicy === "cache-and-network") {\n reobserveOptions.fetchPolicy = fetchPolicy;\n }\n else if (fetchPolicy === "no-cache") {\n reobserveOptions.fetchPolicy = "no-cache";\n }\n else {\n reobserveOptions.fetchPolicy = "network-only";\n }\n if (globalThis.__DEV__ !== false && variables && ObservableQuery_hasOwnProperty.call(variables, "variables")) {\n var queryDef = (0,getFromAST/* getQueryDefinition */.AT)(this.query);\n var vars = queryDef.variableDefinitions;\n if (!vars || !vars.some(function (v) { return v.variable.name.value === "variables"; })) {\n globalThis.__DEV__ !== false && globals/* invariant */.V1.warn(\n 20,\n variables,\n ((_a = queryDef.name) === null || _a === void 0 ? void 0 : _a.value) || queryDef\n );\n }\n }\n if (variables && !(0,lib/* equal */.L)(this.options.variables, variables)) {\n // Update the existing options with new variables\n reobserveOptions.variables = this.options.variables = (0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, this.options.variables), variables);\n }\n this.queryInfo.resetLastWrite();\n return this.reobserve(reobserveOptions, core_networkStatus/* NetworkStatus */.pT.refetch);\n };\n /**\n * A function that helps you fetch the next set of results for a [paginated list field](https://www.apollographql.com/docs/react/pagination/core-api/).\n */\n ObservableQuery.prototype.fetchMore = function (fetchMoreOptions) {\n var _this = this;\n var combinedOptions = (0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, (fetchMoreOptions.query ? fetchMoreOptions : ((0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, this.options), { query: this.options.query }), fetchMoreOptions), { variables: (0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, this.options.variables), fetchMoreOptions.variables) })))), { \n // The fetchMore request goes immediately to the network and does\n // not automatically write its result to the cache (hence no-cache\n // instead of network-only), because we allow the caller of\n // fetchMore to provide an updateQuery callback that determines how\n // the data gets written to the cache.\n fetchPolicy: "no-cache" });\n combinedOptions.query = this.transformDocument(combinedOptions.query);\n var qid = this.queryManager.generateQueryId();\n // If a temporary query is passed to `fetchMore`, we don\'t want to store\n // it as the last query result since it may be an optimized query for\n // pagination. We will however run the transforms on the original document\n // as well as the document passed in `fetchMoreOptions` to ensure the cache\n // uses the most up-to-date document which may rely on runtime conditionals.\n this.lastQuery =\n fetchMoreOptions.query ?\n this.transformDocument(this.options.query)\n : combinedOptions.query;\n // Simulate a loading result for the original query with\n // result.networkStatus === NetworkStatus.fetchMore.\n var queryInfo = this.queryInfo;\n var originalNetworkStatus = queryInfo.networkStatus;\n queryInfo.networkStatus = core_networkStatus/* NetworkStatus */.pT.fetchMore;\n if (combinedOptions.notifyOnNetworkStatusChange) {\n this.observe();\n }\n var updatedQuerySet = new Set();\n return this.queryManager\n .fetchQuery(qid, combinedOptions, core_networkStatus/* NetworkStatus */.pT.fetchMore)\n .then(function (fetchMoreResult) {\n _this.queryManager.removeQuery(qid);\n if (queryInfo.networkStatus === core_networkStatus/* NetworkStatus */.pT.fetchMore) {\n queryInfo.networkStatus = originalNetworkStatus;\n }\n // Performing this cache update inside a cache.batch transaction ensures\n // any affected cache.watch watchers are notified at most once about any\n // updates. Most watchers will be using the QueryInfo class, which\n // responds to notifications by calling reobserveCacheFirst to deliver\n // fetchMore cache results back to this ObservableQuery.\n _this.queryManager.cache.batch({\n update: function (cache) {\n var updateQuery = fetchMoreOptions.updateQuery;\n if (updateQuery) {\n cache.updateQuery({\n query: _this.query,\n variables: _this.variables,\n returnPartialData: true,\n optimistic: false,\n }, function (previous) {\n return updateQuery(previous, {\n fetchMoreResult: fetchMoreResult.data,\n variables: combinedOptions.variables,\n });\n });\n }\n else {\n // If we\'re using a field policy instead of updateQuery, the only\n // thing we need to do is write the new data to the cache using\n // combinedOptions.variables (instead of this.variables, which is\n // what this.updateQuery uses, because it works by abusing the\n // original field value, keyed by the original variables).\n cache.writeQuery({\n query: combinedOptions.query,\n variables: combinedOptions.variables,\n data: fetchMoreResult.data,\n });\n }\n },\n onWatchUpdated: function (watch) {\n // Record the DocumentNode associated with any watched query whose\n // data were updated by the cache writes above.\n updatedQuerySet.add(watch.query);\n },\n });\n return fetchMoreResult;\n })\n .finally(function () {\n // In case the cache writes above did not generate a broadcast\n // notification (which would have been intercepted by onWatchUpdated),\n // likely because the written data were the same as what was already in\n // the cache, we still want fetchMore to deliver its final loading:false\n // result with the unchanged data.\n if (!updatedQuerySet.has(_this.query)) {\n reobserveCacheFirst(_this);\n }\n });\n };\n // XXX the subscription variables are separate from the query variables.\n // if you want to update subscription variables, right now you have to do that separately,\n // and you can only do it by stopping the subscription and then subscribing again with new variables.\n /**\n * A function that enables you to execute a [subscription](https://www.apollographql.com/docs/react/data/subscriptions/), usually to subscribe to specific fields that were included in the query.\n *\n * This function returns _another_ function that you can call to terminate the subscription.\n */\n ObservableQuery.prototype.subscribeToMore = function (options) {\n var _this = this;\n var subscription = this.queryManager\n .startGraphQLSubscription({\n query: options.document,\n variables: options.variables,\n context: options.context,\n })\n .subscribe({\n next: function (subscriptionData) {\n var updateQuery = options.updateQuery;\n if (updateQuery) {\n _this.updateQuery(function (previous, _a) {\n var variables = _a.variables;\n return updateQuery(previous, {\n subscriptionData: subscriptionData,\n variables: variables,\n });\n });\n }\n },\n error: function (err) {\n if (options.onError) {\n options.onError(err);\n return;\n }\n globalThis.__DEV__ !== false && globals/* invariant */.V1.error(21, err);\n },\n });\n this.subscriptions.add(subscription);\n return function () {\n if (_this.subscriptions.delete(subscription)) {\n subscription.unsubscribe();\n }\n };\n };\n ObservableQuery.prototype.setOptions = function (newOptions) {\n return this.reobserve(newOptions);\n };\n ObservableQuery.prototype.silentSetOptions = function (newOptions) {\n var mergedOptions = (0,compact/* compact */.o)(this.options, newOptions || {});\n ObservableQuery_assign(this.options, mergedOptions);\n };\n /**\n * Update the variables of this observable query, and fetch the new results\n * if they\'ve changed. Most users should prefer `refetch` instead of\n * `setVariables` in order to to be properly notified of results even when\n * they come from the cache.\n *\n * Note: the `next` callback will *not* fire if the variables have not changed\n * or if the result is coming from cache.\n *\n * Note: the promise will return the old results immediately if the variables\n * have not changed.\n *\n * Note: the promise will return null immediately if the query is not active\n * (there are no subscribers).\n *\n * @param variables - The new set of variables. If there are missing variables,\n * the previous values of those variables will be used.\n */\n ObservableQuery.prototype.setVariables = function (variables) {\n if ((0,lib/* equal */.L)(this.variables, variables)) {\n // If we have no observers, then we don\'t actually want to make a network\n // request. As soon as someone observes the query, the request will kick\n // off. For now, we just store any changes. (See #1077)\n return this.observers.size ? this.result() : Promise.resolve();\n }\n this.options.variables = variables;\n // See comment above\n if (!this.observers.size) {\n return Promise.resolve();\n }\n return this.reobserve({\n // Reset options.fetchPolicy to its original value.\n fetchPolicy: this.options.initialFetchPolicy,\n variables: variables,\n }, core_networkStatus/* NetworkStatus */.pT.setVariables);\n };\n /**\n * A function that enables you to update the query\'s cached result without executing a followup GraphQL operation.\n *\n * See [using updateQuery and updateFragment](https://www.apollographql.com/docs/react/caching/cache-interaction/#using-updatequery-and-updatefragment) for additional information.\n */\n ObservableQuery.prototype.updateQuery = function (mapFn) {\n var queryManager = this.queryManager;\n var result = queryManager.cache.diff({\n query: this.options.query,\n variables: this.variables,\n returnPartialData: true,\n optimistic: false,\n }).result;\n var newResult = mapFn(result, {\n variables: this.variables,\n });\n if (newResult) {\n queryManager.cache.writeQuery({\n query: this.options.query,\n data: newResult,\n variables: this.variables,\n });\n queryManager.broadcastQueries();\n }\n };\n /**\n * A function that instructs the query to begin re-executing at a specified interval (in milliseconds).\n */\n ObservableQuery.prototype.startPolling = function (pollInterval) {\n this.options.pollInterval = pollInterval;\n this.updatePolling();\n };\n /**\n * A function that instructs the query to stop polling after a previous call to `startPolling`.\n */\n ObservableQuery.prototype.stopPolling = function () {\n this.options.pollInterval = 0;\n this.updatePolling();\n };\n // Update options.fetchPolicy according to options.nextFetchPolicy.\n ObservableQuery.prototype.applyNextFetchPolicy = function (reason, \n // It\'s possible to use this method to apply options.nextFetchPolicy to\n // options.fetchPolicy even if options !== this.options, though that happens\n // most often when the options are temporary, used for only one request and\n // then thrown away, so nextFetchPolicy may not end up mattering.\n options) {\n if (options.nextFetchPolicy) {\n var _a = options.fetchPolicy, fetchPolicy = _a === void 0 ? "cache-first" : _a, _b = options.initialFetchPolicy, initialFetchPolicy = _b === void 0 ? fetchPolicy : _b;\n if (fetchPolicy === "standby") {\n // Do nothing, leaving options.fetchPolicy unchanged.\n }\n else if (typeof options.nextFetchPolicy === "function") {\n // When someone chooses "cache-and-network" or "network-only" as their\n // initial FetchPolicy, they often do not want future cache updates to\n // trigger unconditional network requests, which is what repeatedly\n // applying the "cache-and-network" or "network-only" policies would\n // seem to imply. Instead, when the cache reports an update after the\n // initial network request, it may be desirable for subsequent network\n // requests to be triggered only if the cache result is incomplete. To\n // that end, the options.nextFetchPolicy option provides an easy way to\n // update options.fetchPolicy after the initial network request, without\n // having to call observableQuery.setOptions.\n options.fetchPolicy = options.nextFetchPolicy(fetchPolicy, {\n reason: reason,\n options: options,\n observable: this,\n initialFetchPolicy: initialFetchPolicy,\n });\n }\n else if (reason === "variables-changed") {\n options.fetchPolicy = initialFetchPolicy;\n }\n else {\n options.fetchPolicy = options.nextFetchPolicy;\n }\n }\n return options.fetchPolicy;\n };\n ObservableQuery.prototype.fetch = function (options, newNetworkStatus, query) {\n // TODO Make sure we update the networkStatus (and infer fetchVariables)\n // before actually committing to the fetch.\n this.queryManager.setObservableQuery(this);\n return this.queryManager["fetchConcastWithInfo"](this.queryId, options, newNetworkStatus, query);\n };\n // Turns polling on or off based on this.options.pollInterval.\n ObservableQuery.prototype.updatePolling = function () {\n var _this = this;\n // Avoid polling in SSR mode\n if (this.queryManager.ssrMode) {\n return;\n }\n var _a = this, pollingInfo = _a.pollingInfo, pollInterval = _a.options.pollInterval;\n if (!pollInterval || !this.hasObservers()) {\n if (pollingInfo) {\n clearTimeout(pollingInfo.timeout);\n delete this.pollingInfo;\n }\n return;\n }\n if (pollingInfo && pollingInfo.interval === pollInterval) {\n return;\n }\n (0,globals/* invariant */.V1)(pollInterval, 22);\n var info = pollingInfo || (this.pollingInfo = {});\n info.interval = pollInterval;\n var maybeFetch = function () {\n var _a, _b;\n if (_this.pollingInfo) {\n if (!(0,core_networkStatus/* isNetworkRequestInFlight */.bi)(_this.queryInfo.networkStatus) &&\n !((_b = (_a = _this.options).skipPollAttempt) === null || _b === void 0 ? void 0 : _b.call(_a))) {\n _this.reobserve({\n // Most fetchPolicy options don\'t make sense to use in a polling context, as\n // users wouldn\'t want to be polling the cache directly. However, network-only and\n // no-cache are both useful for when the user wants to control whether or not the\n // polled results are written to the cache.\n fetchPolicy: _this.options.initialFetchPolicy === "no-cache" ?\n "no-cache"\n : "network-only",\n }, core_networkStatus/* NetworkStatus */.pT.poll).then(poll, poll);\n }\n else {\n poll();\n }\n }\n };\n var poll = function () {\n var info = _this.pollingInfo;\n if (info) {\n clearTimeout(info.timeout);\n info.timeout = setTimeout(maybeFetch, info.interval);\n }\n };\n poll();\n };\n ObservableQuery.prototype.updateLastResult = function (newResult, variables) {\n if (variables === void 0) { variables = this.variables; }\n var error = this.getLastError();\n // Preserve this.last.error unless the variables have changed.\n if (error && this.last && !(0,lib/* equal */.L)(variables, this.last.variables)) {\n error = void 0;\n }\n return (this.last = (0,tslib_es6/* __assign */.Cl)({ result: this.queryManager.assumeImmutableResults ?\n newResult\n : (0,cloneDeep/* cloneDeep */.m)(newResult), variables: variables }, (error ? { error: error } : null)));\n };\n ObservableQuery.prototype.reobserveAsConcast = function (newOptions, newNetworkStatus) {\n var _this = this;\n this.isTornDown = false;\n var useDisposableConcast = \n // Refetching uses a disposable Concast to allow refetches using different\n // options/variables, without permanently altering the options of the\n // original ObservableQuery.\n newNetworkStatus === core_networkStatus/* NetworkStatus */.pT.refetch ||\n // The fetchMore method does not actually call the reobserve method, but,\n // if it did, it would definitely use a disposable Concast.\n newNetworkStatus === core_networkStatus/* NetworkStatus */.pT.fetchMore ||\n // Polling uses a disposable Concast so the polling options (which force\n // fetchPolicy to be "network-only" or "no-cache") won\'t override the original options.\n newNetworkStatus === core_networkStatus/* NetworkStatus */.pT.poll;\n // Save the old variables, since Object.assign may modify them below.\n var oldVariables = this.options.variables;\n var oldFetchPolicy = this.options.fetchPolicy;\n var mergedOptions = (0,compact/* compact */.o)(this.options, newOptions || {});\n var options = useDisposableConcast ?\n // Disposable Concast fetches receive a shallow copy of this.options\n // (merged with newOptions), leaving this.options unmodified.\n mergedOptions\n : ObservableQuery_assign(this.options, mergedOptions);\n // Don\'t update options.query with the transformed query to avoid\n // overwriting this.options.query when we aren\'t using a disposable concast.\n // We want to ensure we can re-run the custom document transforms the next\n // time a request is made against the original query.\n var query = this.transformDocument(options.query);\n this.lastQuery = query;\n if (!useDisposableConcast) {\n // We can skip calling updatePolling if we\'re not changing this.options.\n this.updatePolling();\n // Reset options.fetchPolicy to its original value when variables change,\n // unless a new fetchPolicy was provided by newOptions.\n if (newOptions &&\n newOptions.variables &&\n !(0,lib/* equal */.L)(newOptions.variables, oldVariables) &&\n // Don\'t mess with the fetchPolicy if it\'s currently "standby".\n options.fetchPolicy !== "standby" &&\n // If we\'re changing the fetchPolicy anyway, don\'t try to change it here\n // using applyNextFetchPolicy. The explicit options.fetchPolicy wins.\n options.fetchPolicy === oldFetchPolicy) {\n this.applyNextFetchPolicy("variables-changed", options);\n if (newNetworkStatus === void 0) {\n newNetworkStatus = core_networkStatus/* NetworkStatus */.pT.setVariables;\n }\n }\n }\n this.waitForOwnResult && (this.waitForOwnResult = skipCacheDataFor(options.fetchPolicy));\n var finishWaitingForOwnResult = function () {\n if (_this.concast === concast) {\n _this.waitForOwnResult = false;\n }\n };\n var variables = options.variables && (0,tslib_es6/* __assign */.Cl)({}, options.variables);\n var _a = this.fetch(options, newNetworkStatus, query), concast = _a.concast, fromLink = _a.fromLink;\n var observer = {\n next: function (result) {\n if ((0,lib/* equal */.L)(_this.variables, variables)) {\n finishWaitingForOwnResult();\n _this.reportResult(result, variables);\n }\n },\n error: function (error) {\n if ((0,lib/* equal */.L)(_this.variables, variables)) {\n finishWaitingForOwnResult();\n _this.reportError(error, variables);\n }\n },\n };\n if (!useDisposableConcast && (fromLink || !this.concast)) {\n // We use the {add,remove}Observer methods directly to avoid wrapping\n // observer with an unnecessary SubscriptionObserver object.\n if (this.concast && this.observer) {\n this.concast.removeObserver(this.observer);\n }\n this.concast = concast;\n this.observer = observer;\n }\n concast.addObserver(observer);\n return concast;\n };\n ObservableQuery.prototype.reobserve = function (newOptions, newNetworkStatus) {\n return this.reobserveAsConcast(newOptions, newNetworkStatus)\n .promise;\n };\n ObservableQuery.prototype.resubscribeAfterError = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n // If `lastError` is set in the current when the subscription is re-created,\n // the subscription will immediately receive the error, which will\n // cause it to terminate again. To avoid this, we first clear\n // the last error/result from the `observableQuery` before re-starting\n // the subscription, and restore the last value afterwards so that the\n // subscription has a chance to stay open.\n var last = this.last;\n this.resetLastResults();\n var subscription = this.subscribe.apply(this, args);\n this.last = last;\n return subscription;\n };\n // (Re)deliver the current result to this.observers without applying fetch\n // policies or making network requests.\n ObservableQuery.prototype.observe = function () {\n this.reportResult(\n // Passing false is important so that this.getCurrentResult doesn\'t\n // save the fetchMore result as this.lastResult, causing it to be\n // ignored due to the this.isDifferentFromLastResult check in\n // this.reportResult.\n this.getCurrentResult(false), this.variables);\n };\n ObservableQuery.prototype.reportResult = function (result, variables) {\n var lastError = this.getLastError();\n var isDifferent = this.isDifferentFromLastResult(result, variables);\n // Update the last result even when isDifferentFromLastResult returns false,\n // because the query may be using the @nonreactive directive, and we want to\n // save the the latest version of any nonreactive subtrees (in case\n // getCurrentResult is called), even though we skip broadcasting changes.\n if (lastError || !result.partial || this.options.returnPartialData) {\n this.updateLastResult(result, variables);\n }\n if (lastError || isDifferent) {\n iterateObserversSafely(this.observers, "next", result);\n }\n };\n ObservableQuery.prototype.reportError = function (error, variables) {\n // Since we don\'t get the current result on errors, only the error, we\n // must mirror the updates that occur in QueryStore.markQueryError here\n var errorResult = (0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, this.getLastResult()), { error: error, errors: error.graphQLErrors, networkStatus: core_networkStatus/* NetworkStatus */.pT.error, loading: false });\n this.updateLastResult(errorResult, variables);\n iterateObserversSafely(this.observers, "error", (this.last.error = error));\n };\n ObservableQuery.prototype.hasObservers = function () {\n return this.observers.size > 0;\n };\n ObservableQuery.prototype.tearDownQuery = function () {\n if (this.isTornDown)\n return;\n if (this.concast && this.observer) {\n this.concast.removeObserver(this.observer);\n delete this.concast;\n delete this.observer;\n }\n this.stopPolling();\n // stop all active GraphQL subscriptions\n this.subscriptions.forEach(function (sub) { return sub.unsubscribe(); });\n this.subscriptions.clear();\n this.queryManager.stopQuery(this.queryId);\n this.observers.clear();\n this.isTornDown = true;\n };\n ObservableQuery.prototype.transformDocument = function (document) {\n return this.queryManager.transform(document);\n };\n return ObservableQuery;\n}(zen_observable_ts_module/* Observable */.c));\n\n// Necessary because the ObservableQuery constructor has a different\n// signature than the Observable constructor.\nfixObservableSubclass(ObservableQuery);\n// Reobserve with fetchPolicy effectively set to "cache-first", triggering\n// delivery of any new data from the cache, possibly falling back to the network\n// if any cache data are missing. This allows _complete_ cache results to be\n// delivered without also kicking off unnecessary network requests when\n// this.options.fetchPolicy is "cache-and-network" or "network-only". When\n// this.options.fetchPolicy is any other policy ("cache-first", "cache-only",\n// "standby", or "no-cache"), we call this.reobserve() as usual.\nfunction reobserveCacheFirst(obsQuery) {\n var _a = obsQuery.options, fetchPolicy = _a.fetchPolicy, nextFetchPolicy = _a.nextFetchPolicy;\n if (fetchPolicy === "cache-and-network" || fetchPolicy === "network-only") {\n return obsQuery.reobserve({\n fetchPolicy: "cache-first",\n // Use a temporary nextFetchPolicy function that replaces itself with the\n // previous nextFetchPolicy value and returns the original fetchPolicy.\n nextFetchPolicy: function (currentFetchPolicy, context) {\n // Replace this nextFetchPolicy function in the options object with the\n // original this.options.nextFetchPolicy value.\n this.nextFetchPolicy = nextFetchPolicy;\n // If the original nextFetchPolicy value was a function, give it a\n // chance to decide what happens here.\n if (typeof this.nextFetchPolicy === "function") {\n return this.nextFetchPolicy(currentFetchPolicy, context);\n }\n // Otherwise go back to the original this.options.fetchPolicy.\n return fetchPolicy;\n },\n });\n }\n return obsQuery.reobserve();\n}\nfunction defaultSubscriptionObserverErrorCallback(error) {\n globalThis.__DEV__ !== false && globals/* invariant */.V1.error(23, error.message, error.stack);\n}\nfunction logMissingFieldErrors(missing) {\n if (globalThis.__DEV__ !== false && missing) {\n globalThis.__DEV__ !== false && globals/* invariant */.V1.debug(24, missing);\n }\n}\nfunction skipCacheDataFor(fetchPolicy /* `undefined` would mean `"cache-first"` */) {\n return (fetchPolicy === "network-only" ||\n fetchPolicy === "no-cache" ||\n fetchPolicy === "standby");\n}\n//# sourceMappingURL=ObservableQuery.js.map\n// EXTERNAL MODULE: ./node_modules/graphql/language/visitor.mjs\nvar visitor = __webpack_require__(4705);\n// EXTERNAL MODULE: ./node_modules/graphql/language/kinds.mjs\nvar kinds = __webpack_require__(3298);\n;// CONCATENATED MODULE: ./node_modules/graphql/language/predicates.mjs\n\nfunction isDefinitionNode(node) {\n return (\n isExecutableDefinitionNode(node) ||\n isTypeSystemDefinitionNode(node) ||\n isTypeSystemExtensionNode(node)\n );\n}\nfunction isExecutableDefinitionNode(node) {\n return (\n node.kind === Kind.OPERATION_DEFINITION ||\n node.kind === Kind.FRAGMENT_DEFINITION\n );\n}\nfunction isSelectionNode(node) {\n return (\n node.kind === kinds/* Kind */.b.FIELD ||\n node.kind === kinds/* Kind */.b.FRAGMENT_SPREAD ||\n node.kind === kinds/* Kind */.b.INLINE_FRAGMENT\n );\n}\nfunction isValueNode(node) {\n return (\n node.kind === Kind.VARIABLE ||\n node.kind === Kind.INT ||\n node.kind === Kind.FLOAT ||\n node.kind === Kind.STRING ||\n node.kind === Kind.BOOLEAN ||\n node.kind === Kind.NULL ||\n node.kind === Kind.ENUM ||\n node.kind === Kind.LIST ||\n node.kind === Kind.OBJECT\n );\n}\nfunction isConstValueNode(node) {\n return (\n isValueNode(node) &&\n (node.kind === Kind.LIST\n ? node.values.some(isConstValueNode)\n : node.kind === Kind.OBJECT\n ? node.fields.some((field) => isConstValueNode(field.value))\n : node.kind !== Kind.VARIABLE)\n );\n}\nfunction isTypeNode(node) {\n return (\n node.kind === Kind.NAMED_TYPE ||\n node.kind === Kind.LIST_TYPE ||\n node.kind === Kind.NON_NULL_TYPE\n );\n}\nfunction isTypeSystemDefinitionNode(node) {\n return (\n node.kind === Kind.SCHEMA_DEFINITION ||\n isTypeDefinitionNode(node) ||\n node.kind === Kind.DIRECTIVE_DEFINITION\n );\n}\nfunction isTypeDefinitionNode(node) {\n return (\n node.kind === Kind.SCALAR_TYPE_DEFINITION ||\n node.kind === Kind.OBJECT_TYPE_DEFINITION ||\n node.kind === Kind.INTERFACE_TYPE_DEFINITION ||\n node.kind === Kind.UNION_TYPE_DEFINITION ||\n node.kind === Kind.ENUM_TYPE_DEFINITION ||\n node.kind === Kind.INPUT_OBJECT_TYPE_DEFINITION\n );\n}\nfunction isTypeSystemExtensionNode(node) {\n return node.kind === Kind.SCHEMA_EXTENSION || isTypeExtensionNode(node);\n}\nfunction isTypeExtensionNode(node) {\n return (\n node.kind === Kind.SCALAR_TYPE_EXTENSION ||\n node.kind === Kind.OBJECT_TYPE_EXTENSION ||\n node.kind === Kind.INTERFACE_TYPE_EXTENSION ||\n node.kind === Kind.UNION_TYPE_EXTENSION ||\n node.kind === Kind.ENUM_TYPE_EXTENSION ||\n node.kind === Kind.INPUT_OBJECT_TYPE_EXTENSION\n );\n}\n\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/common/mergeDeep.js\nvar mergeDeep = __webpack_require__(2922);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/graphql/fragments.js\nvar graphql_fragments = __webpack_require__(5215);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/cache/inmemory/reactiveVars.js\nvar reactiveVars = __webpack_require__(738);\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/core/LocalState.js\n\n\n\n\n\nvar LocalState = /** @class */ (function () {\n function LocalState(_a) {\n var cache = _a.cache, client = _a.client, resolvers = _a.resolvers, fragmentMatcher = _a.fragmentMatcher;\n this.selectionsToResolveCache = new WeakMap();\n this.cache = cache;\n if (client) {\n this.client = client;\n }\n if (resolvers) {\n this.addResolvers(resolvers);\n }\n if (fragmentMatcher) {\n this.setFragmentMatcher(fragmentMatcher);\n }\n }\n LocalState.prototype.addResolvers = function (resolvers) {\n var _this = this;\n this.resolvers = this.resolvers || {};\n if (Array.isArray(resolvers)) {\n resolvers.forEach(function (resolverGroup) {\n _this.resolvers = (0,mergeDeep/* mergeDeep */.D9)(_this.resolvers, resolverGroup);\n });\n }\n else {\n this.resolvers = (0,mergeDeep/* mergeDeep */.D9)(this.resolvers, resolvers);\n }\n };\n LocalState.prototype.setResolvers = function (resolvers) {\n this.resolvers = {};\n this.addResolvers(resolvers);\n };\n LocalState.prototype.getResolvers = function () {\n return this.resolvers || {};\n };\n // Run local client resolvers against the incoming query and remote data.\n // Locally resolved field values are merged with the incoming remote data,\n // and returned. Note that locally resolved fields will overwrite\n // remote data using the same field name.\n LocalState.prototype.runResolvers = function (_a) {\n return (0,tslib_es6/* __awaiter */.sH)(this, arguments, void 0, function (_b) {\n var document = _b.document, remoteResult = _b.remoteResult, context = _b.context, variables = _b.variables, _c = _b.onlyRunForcedResolvers, onlyRunForcedResolvers = _c === void 0 ? false : _c;\n return (0,tslib_es6/* __generator */.YH)(this, function (_d) {\n if (document) {\n return [2 /*return*/, this.resolveDocument(document, remoteResult.data, context, variables, this.fragmentMatcher, onlyRunForcedResolvers).then(function (localResult) { return ((0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, remoteResult), { data: localResult.result })); })];\n }\n return [2 /*return*/, remoteResult];\n });\n });\n };\n LocalState.prototype.setFragmentMatcher = function (fragmentMatcher) {\n this.fragmentMatcher = fragmentMatcher;\n };\n LocalState.prototype.getFragmentMatcher = function () {\n return this.fragmentMatcher;\n };\n // Client queries contain everything in the incoming document (if a @client\n // directive is found).\n LocalState.prototype.clientQuery = function (document) {\n if ((0,directives/* hasDirectives */.d8)(["client"], document)) {\n if (this.resolvers) {\n return document;\n }\n }\n return null;\n };\n // Server queries are stripped of all @client based selection sets.\n LocalState.prototype.serverQuery = function (document) {\n return (0,transform/* removeClientSetsFromDocument */.er)(document);\n };\n LocalState.prototype.prepareContext = function (context) {\n var cache = this.cache;\n return (0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, context), { cache: cache, \n // Getting an entry\'s cache key is useful for local state resolvers.\n getCacheKey: function (obj) {\n return cache.identify(obj);\n } });\n };\n // To support `@client @export(as: "someVar")` syntax, we\'ll first resolve\n // @client @export fields locally, then pass the resolved values back to be\n // used alongside the original operation variables.\n LocalState.prototype.addExportedVariables = function (document_1) {\n return (0,tslib_es6/* __awaiter */.sH)(this, arguments, void 0, function (document, variables, context) {\n if (variables === void 0) { variables = {}; }\n if (context === void 0) { context = {}; }\n return (0,tslib_es6/* __generator */.YH)(this, function (_a) {\n if (document) {\n return [2 /*return*/, this.resolveDocument(document, this.buildRootValueFromCache(document, variables) || {}, this.prepareContext(context), variables).then(function (data) { return ((0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, variables), data.exportedVariables)); })];\n }\n return [2 /*return*/, (0,tslib_es6/* __assign */.Cl)({}, variables)];\n });\n });\n };\n LocalState.prototype.shouldForceResolvers = function (document) {\n var forceResolvers = false;\n (0,visitor/* visit */.YR)(document, {\n Directive: {\n enter: function (node) {\n if (node.name.value === "client" && node.arguments) {\n forceResolvers = node.arguments.some(function (arg) {\n return arg.name.value === "always" &&\n arg.value.kind === "BooleanValue" &&\n arg.value.value === true;\n });\n if (forceResolvers) {\n return visitor/* BREAK */.sP;\n }\n }\n },\n },\n });\n return forceResolvers;\n };\n // Query the cache and return matching data.\n LocalState.prototype.buildRootValueFromCache = function (document, variables) {\n return this.cache.diff({\n query: (0,transform/* buildQueryFromSelectionSet */.zc)(document),\n variables: variables,\n returnPartialData: true,\n optimistic: false,\n }).result;\n };\n LocalState.prototype.resolveDocument = function (document_1, rootValue_1) {\n return (0,tslib_es6/* __awaiter */.sH)(this, arguments, void 0, function (document, rootValue, context, variables, fragmentMatcher, onlyRunForcedResolvers) {\n var mainDefinition, fragments, fragmentMap, selectionsToResolve, definitionOperation, defaultOperationType, _a, cache, client, execContext, isClientFieldDescendant;\n if (context === void 0) { context = {}; }\n if (variables === void 0) { variables = {}; }\n if (fragmentMatcher === void 0) { fragmentMatcher = function () { return true; }; }\n if (onlyRunForcedResolvers === void 0) { onlyRunForcedResolvers = false; }\n return (0,tslib_es6/* __generator */.YH)(this, function (_b) {\n mainDefinition = (0,getFromAST/* getMainDefinition */.Vn)(document);\n fragments = (0,getFromAST/* getFragmentDefinitions */.zK)(document);\n fragmentMap = (0,graphql_fragments/* createFragmentMap */.JG)(fragments);\n selectionsToResolve = this.collectSelectionsToResolve(mainDefinition, fragmentMap);\n definitionOperation = mainDefinition.operation;\n defaultOperationType = definitionOperation ?\n definitionOperation.charAt(0).toUpperCase() +\n definitionOperation.slice(1)\n : "Query";\n _a = this, cache = _a.cache, client = _a.client;\n execContext = {\n fragmentMap: fragmentMap,\n context: (0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, context), { cache: cache, client: client }),\n variables: variables,\n fragmentMatcher: fragmentMatcher,\n defaultOperationType: defaultOperationType,\n exportedVariables: {},\n selectionsToResolve: selectionsToResolve,\n onlyRunForcedResolvers: onlyRunForcedResolvers,\n };\n isClientFieldDescendant = false;\n return [2 /*return*/, this.resolveSelectionSet(mainDefinition.selectionSet, isClientFieldDescendant, rootValue, execContext).then(function (result) { return ({\n result: result,\n exportedVariables: execContext.exportedVariables,\n }); })];\n });\n });\n };\n LocalState.prototype.resolveSelectionSet = function (selectionSet, isClientFieldDescendant, rootValue, execContext) {\n return (0,tslib_es6/* __awaiter */.sH)(this, void 0, void 0, function () {\n var fragmentMap, context, variables, resultsToMerge, execute;\n var _this = this;\n return (0,tslib_es6/* __generator */.YH)(this, function (_a) {\n fragmentMap = execContext.fragmentMap, context = execContext.context, variables = execContext.variables;\n resultsToMerge = [rootValue];\n execute = function (selection) { return (0,tslib_es6/* __awaiter */.sH)(_this, void 0, void 0, function () {\n var fragment, typeCondition;\n return (0,tslib_es6/* __generator */.YH)(this, function (_a) {\n if (!isClientFieldDescendant &&\n !execContext.selectionsToResolve.has(selection)) {\n // Skip selections without @client directives\n // (still processing if one of the ancestors or one of the child fields has @client directive)\n return [2 /*return*/];\n }\n if (!(0,directives/* shouldInclude */.MS)(selection, variables)) {\n // Skip this entirely.\n return [2 /*return*/];\n }\n if ((0,storeUtils/* isField */.dt)(selection)) {\n return [2 /*return*/, this.resolveField(selection, isClientFieldDescendant, rootValue, execContext).then(function (fieldResult) {\n var _a;\n if (typeof fieldResult !== "undefined") {\n resultsToMerge.push((_a = {},\n _a[(0,storeUtils/* resultKeyNameFromField */.ue)(selection)] = fieldResult,\n _a));\n }\n })];\n }\n if ((0,storeUtils/* isInlineFragment */.kd)(selection)) {\n fragment = selection;\n }\n else {\n // This is a named fragment.\n fragment = fragmentMap[selection.name.value];\n (0,globals/* invariant */.V1)(fragment, 18, selection.name.value);\n }\n if (fragment && fragment.typeCondition) {\n typeCondition = fragment.typeCondition.name.value;\n if (execContext.fragmentMatcher(rootValue, typeCondition, context)) {\n return [2 /*return*/, this.resolveSelectionSet(fragment.selectionSet, isClientFieldDescendant, rootValue, execContext).then(function (fragmentResult) {\n resultsToMerge.push(fragmentResult);\n })];\n }\n }\n return [2 /*return*/];\n });\n }); };\n return [2 /*return*/, Promise.all(selectionSet.selections.map(execute)).then(function () {\n return (0,mergeDeep/* mergeDeepArray */.IM)(resultsToMerge);\n })];\n });\n });\n };\n LocalState.prototype.resolveField = function (field, isClientFieldDescendant, rootValue, execContext) {\n return (0,tslib_es6/* __awaiter */.sH)(this, void 0, void 0, function () {\n var variables, fieldName, aliasedFieldName, aliasUsed, defaultResult, resultPromise, resolverType, resolverMap, resolve;\n var _this = this;\n return (0,tslib_es6/* __generator */.YH)(this, function (_a) {\n if (!rootValue) {\n return [2 /*return*/, null];\n }\n variables = execContext.variables;\n fieldName = field.name.value;\n aliasedFieldName = (0,storeUtils/* resultKeyNameFromField */.ue)(field);\n aliasUsed = fieldName !== aliasedFieldName;\n defaultResult = rootValue[aliasedFieldName] || rootValue[fieldName];\n resultPromise = Promise.resolve(defaultResult);\n // Usually all local resolvers are run when passing through here, but\n // if we\'ve specifically identified that we only want to run forced\n // resolvers (that is, resolvers for fields marked with\n // `@client(always: true)`), then we\'ll skip running non-forced resolvers.\n if (!execContext.onlyRunForcedResolvers ||\n this.shouldForceResolvers(field)) {\n resolverType = rootValue.__typename || execContext.defaultOperationType;\n resolverMap = this.resolvers && this.resolvers[resolverType];\n if (resolverMap) {\n resolve = resolverMap[aliasUsed ? fieldName : aliasedFieldName];\n if (resolve) {\n resultPromise = Promise.resolve(\n // In case the resolve function accesses reactive variables,\n // set cacheSlot to the current cache instance.\n reactiveVars/* cacheSlot */.bl.withValue(this.cache, resolve, [\n rootValue,\n (0,storeUtils/* argumentsObjectFromField */.MB)(field, variables),\n execContext.context,\n { field: field, fragmentMap: execContext.fragmentMap },\n ]));\n }\n }\n }\n return [2 /*return*/, resultPromise.then(function (result) {\n var _a, _b;\n if (result === void 0) { result = defaultResult; }\n // If an @export directive is associated with the current field, store\n // the `as` export variable name and current result for later use.\n if (field.directives) {\n field.directives.forEach(function (directive) {\n if (directive.name.value === "export" && directive.arguments) {\n directive.arguments.forEach(function (arg) {\n if (arg.name.value === "as" && arg.value.kind === "StringValue") {\n execContext.exportedVariables[arg.value.value] = result;\n }\n });\n }\n });\n }\n // Handle all scalar types here.\n if (!field.selectionSet) {\n return result;\n }\n // From here down, the field has a selection set, which means it\'s trying\n // to query a GraphQLObjectType.\n if (result == null) {\n // Basically any field in a GraphQL response can be null, or missing\n return result;\n }\n var isClientField = (_b = (_a = field.directives) === null || _a === void 0 ? void 0 : _a.some(function (d) { return d.name.value === "client"; })) !== null && _b !== void 0 ? _b : false;\n if (Array.isArray(result)) {\n return _this.resolveSubSelectedArray(field, isClientFieldDescendant || isClientField, result, execContext);\n }\n // Returned value is an object, and the query has a sub-selection. Recurse.\n if (field.selectionSet) {\n return _this.resolveSelectionSet(field.selectionSet, isClientFieldDescendant || isClientField, result, execContext);\n }\n })];\n });\n });\n };\n LocalState.prototype.resolveSubSelectedArray = function (field, isClientFieldDescendant, result, execContext) {\n var _this = this;\n return Promise.all(result.map(function (item) {\n if (item === null) {\n return null;\n }\n // This is a nested array, recurse.\n if (Array.isArray(item)) {\n return _this.resolveSubSelectedArray(field, isClientFieldDescendant, item, execContext);\n }\n // This is an object, run the selection set on it.\n if (field.selectionSet) {\n return _this.resolveSelectionSet(field.selectionSet, isClientFieldDescendant, item, execContext);\n }\n }));\n };\n // Collect selection nodes on paths from document root down to all @client directives.\n // This function takes into account transitive fragment spreads.\n // Complexity equals to a single `visit` over the full document.\n LocalState.prototype.collectSelectionsToResolve = function (mainDefinition, fragmentMap) {\n var isSingleASTNode = function (node) { return !Array.isArray(node); };\n var selectionsToResolveCache = this.selectionsToResolveCache;\n function collectByDefinition(definitionNode) {\n if (!selectionsToResolveCache.has(definitionNode)) {\n var matches_1 = new Set();\n selectionsToResolveCache.set(definitionNode, matches_1);\n (0,visitor/* visit */.YR)(definitionNode, {\n Directive: function (node, _, __, ___, ancestors) {\n if (node.name.value === "client") {\n ancestors.forEach(function (node) {\n if (isSingleASTNode(node) && isSelectionNode(node)) {\n matches_1.add(node);\n }\n });\n }\n },\n FragmentSpread: function (spread, _, __, ___, ancestors) {\n var fragment = fragmentMap[spread.name.value];\n (0,globals/* invariant */.V1)(fragment, 19, spread.name.value);\n var fragmentSelections = collectByDefinition(fragment);\n if (fragmentSelections.size > 0) {\n // Fragment for this spread contains @client directive (either directly or transitively)\n // Collect selection nodes on paths from the root down to fields with the @client directive\n ancestors.forEach(function (node) {\n if (isSingleASTNode(node) && isSelectionNode(node)) {\n matches_1.add(node);\n }\n });\n matches_1.add(spread);\n fragmentSelections.forEach(function (selection) {\n matches_1.add(selection);\n });\n }\n },\n });\n }\n return selectionsToResolveCache.get(definitionNode);\n }\n return collectByDefinition(mainDefinition);\n };\n return LocalState;\n}());\n\n//# sourceMappingURL=LocalState.js.map\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/core/QueryInfo.js\n\n\n\n\n\n\n\nvar destructiveMethodCounts = new (canUse/* canUseWeakMap */.et ? WeakMap : Map)();\nfunction wrapDestructiveCacheMethod(cache, methodName) {\n var original = cache[methodName];\n if (typeof original === "function") {\n // @ts-expect-error this is just too generic to be typed correctly\n cache[methodName] = function () {\n destructiveMethodCounts.set(cache, \n // The %1e15 allows the count to wrap around to 0 safely every\n // quadrillion evictions, so there\'s no risk of overflow. To be\n // clear, this is more of a pedantic principle than something\n // that matters in any conceivable practical scenario.\n (destructiveMethodCounts.get(cache) + 1) % 1e15);\n // @ts-expect-error this is just too generic to be typed correctly\n return original.apply(this, arguments);\n };\n }\n}\nfunction cancelNotifyTimeout(info) {\n if (info["notifyTimeout"]) {\n clearTimeout(info["notifyTimeout"]);\n info["notifyTimeout"] = void 0;\n }\n}\n// A QueryInfo object represents a single query managed by the\n// QueryManager, which tracks all QueryInfo objects by queryId in its\n// this.queries Map. QueryInfo objects store the latest results and errors\n// for the given query, and are responsible for reporting those results to\n// the corresponding ObservableQuery, via the QueryInfo.notify method.\n// Results are reported asynchronously whenever setDiff marks the\n// QueryInfo object as dirty, though a call to the QueryManager\'s\n// broadcastQueries method may trigger the notification before it happens\n// automatically. This class used to be a simple interface type without\n// any field privacy or meaningful methods, which is why it still has so\n// many public fields. The effort to lock down and simplify the QueryInfo\n// interface is ongoing, and further improvements are welcome.\nvar QueryInfo = /** @class */ (function () {\n function QueryInfo(queryManager, queryId) {\n if (queryId === void 0) { queryId = queryManager.generateQueryId(); }\n this.queryId = queryId;\n this.listeners = new Set();\n this.document = null;\n this.lastRequestId = 1;\n this.stopped = false;\n this.dirty = false;\n this.observableQuery = null;\n var cache = (this.cache = queryManager.cache);\n // Track how often cache.evict is called, since we want eviction to\n // override the feud-stopping logic in the markResult method, by\n // causing shouldWrite to return true. Wrapping the cache.evict method\n // is a bit of a hack, but it saves us from having to make eviction\n // counting an official part of the ApolloCache API.\n if (!destructiveMethodCounts.has(cache)) {\n destructiveMethodCounts.set(cache, 0);\n wrapDestructiveCacheMethod(cache, "evict");\n wrapDestructiveCacheMethod(cache, "modify");\n wrapDestructiveCacheMethod(cache, "reset");\n }\n }\n QueryInfo.prototype.init = function (query) {\n var networkStatus = query.networkStatus || core_networkStatus/* NetworkStatus */.pT.loading;\n if (this.variables &&\n this.networkStatus !== core_networkStatus/* NetworkStatus */.pT.loading &&\n !(0,lib/* equal */.L)(this.variables, query.variables)) {\n networkStatus = core_networkStatus/* NetworkStatus */.pT.setVariables;\n }\n if (!(0,lib/* equal */.L)(query.variables, this.variables)) {\n this.lastDiff = void 0;\n }\n Object.assign(this, {\n document: query.document,\n variables: query.variables,\n networkError: null,\n graphQLErrors: this.graphQLErrors || [],\n networkStatus: networkStatus,\n });\n if (query.observableQuery) {\n this.setObservableQuery(query.observableQuery);\n }\n if (query.lastRequestId) {\n this.lastRequestId = query.lastRequestId;\n }\n return this;\n };\n QueryInfo.prototype.reset = function () {\n cancelNotifyTimeout(this);\n this.dirty = false;\n };\n QueryInfo.prototype.resetDiff = function () {\n this.lastDiff = void 0;\n };\n QueryInfo.prototype.getDiff = function () {\n var options = this.getDiffOptions();\n if (this.lastDiff && (0,lib/* equal */.L)(options, this.lastDiff.options)) {\n return this.lastDiff.diff;\n }\n this.updateWatch(this.variables);\n var oq = this.observableQuery;\n if (oq && oq.options.fetchPolicy === "no-cache") {\n return { complete: false };\n }\n var diff = this.cache.diff(options);\n this.updateLastDiff(diff, options);\n return diff;\n };\n QueryInfo.prototype.updateLastDiff = function (diff, options) {\n this.lastDiff =\n diff ?\n {\n diff: diff,\n options: options || this.getDiffOptions(),\n }\n : void 0;\n };\n QueryInfo.prototype.getDiffOptions = function (variables) {\n var _a;\n if (variables === void 0) { variables = this.variables; }\n return {\n query: this.document,\n variables: variables,\n returnPartialData: true,\n optimistic: true,\n canonizeResults: (_a = this.observableQuery) === null || _a === void 0 ? void 0 : _a.options.canonizeResults,\n };\n };\n QueryInfo.prototype.setDiff = function (diff) {\n var _this = this;\n var _a;\n var oldDiff = this.lastDiff && this.lastDiff.diff;\n // If we are trying to deliver an incomplete cache result, we avoid\n // reporting it if the query has errored, otherwise we let the broadcast try\n // and repair the partial result by refetching the query. This check avoids\n // a situation where a query that errors and another succeeds with\n // overlapping data does not report the partial data result to the errored\n // query.\n //\n // See https://github.com/apollographql/apollo-client/issues/11400 for more\n // information on this issue.\n if (diff && !diff.complete && ((_a = this.observableQuery) === null || _a === void 0 ? void 0 : _a.getLastError())) {\n return;\n }\n this.updateLastDiff(diff);\n if (!this.dirty && !(0,lib/* equal */.L)(oldDiff && oldDiff.result, diff && diff.result)) {\n this.dirty = true;\n if (!this.notifyTimeout) {\n this.notifyTimeout = setTimeout(function () { return _this.notify(); }, 0);\n }\n }\n };\n QueryInfo.prototype.setObservableQuery = function (oq) {\n var _this = this;\n if (oq === this.observableQuery)\n return;\n if (this.oqListener) {\n this.listeners.delete(this.oqListener);\n }\n this.observableQuery = oq;\n if (oq) {\n oq["queryInfo"] = this;\n this.listeners.add((this.oqListener = function () {\n var diff = _this.getDiff();\n if (diff.fromOptimisticTransaction) {\n // If this diff came from an optimistic transaction, deliver the\n // current cache data to the ObservableQuery, but don\'t perform a\n // reobservation, since oq.reobserveCacheFirst might make a network\n // request, and we never want to trigger network requests in the\n // middle of optimistic updates.\n oq["observe"]();\n }\n else {\n // Otherwise, make the ObservableQuery "reobserve" the latest data\n // using a temporary fetch policy of "cache-first", so complete cache\n // results have a chance to be delivered without triggering additional\n // network requests, even when options.fetchPolicy is "network-only"\n // or "cache-and-network". All other fetch policies are preserved by\n // this method, and are handled by calling oq.reobserve(). If this\n // reobservation is spurious, isDifferentFromLastResult still has a\n // chance to catch it before delivery to ObservableQuery subscribers.\n reobserveCacheFirst(oq);\n }\n }));\n }\n else {\n delete this.oqListener;\n }\n };\n QueryInfo.prototype.notify = function () {\n var _this = this;\n cancelNotifyTimeout(this);\n if (this.shouldNotify()) {\n this.listeners.forEach(function (listener) { return listener(_this); });\n }\n this.dirty = false;\n };\n QueryInfo.prototype.shouldNotify = function () {\n if (!this.dirty || !this.listeners.size) {\n return false;\n }\n if ((0,core_networkStatus/* isNetworkRequestInFlight */.bi)(this.networkStatus) && this.observableQuery) {\n var fetchPolicy = this.observableQuery.options.fetchPolicy;\n if (fetchPolicy !== "cache-only" && fetchPolicy !== "cache-and-network") {\n return false;\n }\n }\n return true;\n };\n QueryInfo.prototype.stop = function () {\n if (!this.stopped) {\n this.stopped = true;\n // Cancel the pending notify timeout\n this.reset();\n this.cancel();\n // Revert back to the no-op version of cancel inherited from\n // QueryInfo.prototype.\n this.cancel = QueryInfo.prototype.cancel;\n var oq = this.observableQuery;\n if (oq)\n oq.stopPolling();\n }\n };\n // This method is a no-op by default, until/unless overridden by the\n // updateWatch method.\n QueryInfo.prototype.cancel = function () { };\n QueryInfo.prototype.updateWatch = function (variables) {\n var _this = this;\n if (variables === void 0) { variables = this.variables; }\n var oq = this.observableQuery;\n if (oq && oq.options.fetchPolicy === "no-cache") {\n return;\n }\n var watchOptions = (0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, this.getDiffOptions(variables)), { watcher: this, callback: function (diff) { return _this.setDiff(diff); } });\n if (!this.lastWatch || !(0,lib/* equal */.L)(watchOptions, this.lastWatch)) {\n this.cancel();\n this.cancel = this.cache.watch((this.lastWatch = watchOptions));\n }\n };\n QueryInfo.prototype.resetLastWrite = function () {\n this.lastWrite = void 0;\n };\n QueryInfo.prototype.shouldWrite = function (result, variables) {\n var lastWrite = this.lastWrite;\n return !(lastWrite &&\n // If cache.evict has been called since the last time we wrote this\n // data into the cache, there\'s a chance writing this result into\n // the cache will repair what was evicted.\n lastWrite.dmCount === destructiveMethodCounts.get(this.cache) &&\n (0,lib/* equal */.L)(variables, lastWrite.variables) &&\n (0,lib/* equal */.L)(result.data, lastWrite.result.data));\n };\n QueryInfo.prototype.markResult = function (result, document, options, cacheWriteBehavior) {\n var _this = this;\n var merger = new mergeDeep/* DeepMerger */.ZI();\n var graphQLErrors = (0,arrays/* isNonEmptyArray */.E)(result.errors) ? result.errors.slice(0) : [];\n // Cancel the pending notify timeout (if it exists) to prevent extraneous network\n // requests. To allow future notify timeouts, diff and dirty are reset as well.\n this.reset();\n if ("incremental" in result && (0,arrays/* isNonEmptyArray */.E)(result.incremental)) {\n var mergedData = (0,incrementalResult/* mergeIncrementalData */.bd)(this.getDiff().result, result);\n result.data = mergedData;\n // Detect the first chunk of a deferred query and merge it with existing\n // cache data. This ensures a `cache-first` fetch policy that returns\n // partial cache data or a `cache-and-network` fetch policy that already\n // has full data in the cache does not complain when trying to merge the\n // initial deferred server data with existing cache data.\n }\n else if ("hasNext" in result && result.hasNext) {\n var diff = this.getDiff();\n result.data = merger.merge(diff.result, result.data);\n }\n this.graphQLErrors = graphQLErrors;\n if (options.fetchPolicy === "no-cache") {\n this.updateLastDiff({ result: result.data, complete: true }, this.getDiffOptions(options.variables));\n }\n else if (cacheWriteBehavior !== 0 /* CacheWriteBehavior.FORBID */) {\n if (shouldWriteResult(result, options.errorPolicy)) {\n // Using a transaction here so we have a chance to read the result\n // back from the cache before the watch callback fires as a result\n // of writeQuery, so we can store the new diff quietly and ignore\n // it when we receive it redundantly from the watch callback.\n this.cache.performTransaction(function (cache) {\n if (_this.shouldWrite(result, options.variables)) {\n cache.writeQuery({\n query: document,\n data: result.data,\n variables: options.variables,\n overwrite: cacheWriteBehavior === 1 /* CacheWriteBehavior.OVERWRITE */,\n });\n _this.lastWrite = {\n result: result,\n variables: options.variables,\n dmCount: destructiveMethodCounts.get(_this.cache),\n };\n }\n else {\n // If result is the same as the last result we received from\n // the network (and the variables match too), avoid writing\n // result into the cache again. The wisdom of skipping this\n // cache write is far from obvious, since any cache write\n // could be the one that puts the cache back into a desired\n // state, fixing corruption or missing data. However, if we\n // always write every network result into the cache, we enable\n // feuds between queries competing to update the same data in\n // incompatible ways, which can lead to an endless cycle of\n // cache broadcasts and useless network requests. As with any\n // feud, eventually one side must step back from the brink,\n // letting the other side(s) have the last word(s). There may\n // be other points where we could break this cycle, such as\n // silencing the broadcast for cache.writeQuery (not a good\n // idea, since it just delays the feud a bit) or somehow\n // avoiding the network request that just happened (also bad,\n // because the server could return useful new data). All\n // options considered, skipping this cache write seems to be\n // the least damaging place to break the cycle, because it\n // reflects the intuition that we recently wrote this exact\n // result into the cache, so the cache *should* already/still\n // contain this data. If some other query has clobbered that\n // data in the meantime, that\'s too bad, but there will be no\n // winners if every query blindly reverts to its own version\n // of the data. This approach also gives the network a chance\n // to return new data, which will be written into the cache as\n // usual, notifying only those queries that are directly\n // affected by the cache updates, as usual. In the future, an\n // even more sophisticated cache could perhaps prevent or\n // mitigate the clobbering somehow, but that would make this\n // particular cache write even less important, and thus\n // skipping it would be even safer than it is today.\n if (_this.lastDiff && _this.lastDiff.diff.complete) {\n // Reuse data from the last good (complete) diff that we\n // received, when possible.\n result.data = _this.lastDiff.diff.result;\n return;\n }\n // If the previous this.diff was incomplete, fall through to\n // re-reading the latest data with cache.diff, below.\n }\n var diffOptions = _this.getDiffOptions(options.variables);\n var diff = cache.diff(diffOptions);\n // In case the QueryManager stops this QueryInfo before its\n // results are delivered, it\'s important to avoid restarting the\n // cache watch when markResult is called. We also avoid updating\n // the watch if we are writing a result that doesn\'t match the current\n // variables to avoid race conditions from broadcasting the wrong\n // result.\n if (!_this.stopped && (0,lib/* equal */.L)(_this.variables, options.variables)) {\n // Any time we\'re about to update this.diff, we need to make\n // sure we\'ve started watching the cache.\n _this.updateWatch(options.variables);\n }\n // If we\'re allowed to write to the cache, and we can read a\n // complete result from the cache, update result.data to be the\n // result from the cache, rather than the raw network result.\n // Set without setDiff to avoid triggering a notify call, since\n // we have other ways of notifying for this result.\n _this.updateLastDiff(diff, diffOptions);\n if (diff.complete) {\n result.data = diff.result;\n }\n });\n }\n else {\n this.lastWrite = void 0;\n }\n }\n };\n QueryInfo.prototype.markReady = function () {\n this.networkError = null;\n return (this.networkStatus = core_networkStatus/* NetworkStatus */.pT.ready);\n };\n QueryInfo.prototype.markError = function (error) {\n this.networkStatus = core_networkStatus/* NetworkStatus */.pT.error;\n this.lastWrite = void 0;\n this.reset();\n if (error.graphQLErrors) {\n this.graphQLErrors = error.graphQLErrors;\n }\n if (error.networkError) {\n this.networkError = error.networkError;\n }\n return error;\n };\n return QueryInfo;\n}());\n\nfunction shouldWriteResult(result, errorPolicy) {\n if (errorPolicy === void 0) { errorPolicy = "none"; }\n var ignoreErrors = errorPolicy === "ignore" || errorPolicy === "all";\n var writeWithErrors = !graphQLResultHasError(result);\n if (!writeWithErrors && ignoreErrors && result.data) {\n writeWithErrors = true;\n }\n return writeWithErrors;\n}\n//# sourceMappingURL=QueryInfo.js.map\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/graphql/print.js + 2 modules\nvar print = __webpack_require__(2417);\n// EXTERNAL MODULE: ./node_modules/@wry/trie/lib/index.js\nvar trie_lib = __webpack_require__(2453);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/caching/caches.js\nvar caches = __webpack_require__(599);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/caching/sizes.js\nvar sizes = __webpack_require__(1212);\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/core/QueryManager.js\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar QueryManager_hasOwnProperty = Object.prototype.hasOwnProperty;\nvar IGNORE = Object.create(null);\n\n\nvar QueryManager = /** @class */ (function () {\n function QueryManager(_a) {\n var cache = _a.cache, link = _a.link, defaultOptions = _a.defaultOptions, documentTransform = _a.documentTransform, _b = _a.queryDeduplication, queryDeduplication = _b === void 0 ? false : _b, onBroadcast = _a.onBroadcast, _c = _a.ssrMode, ssrMode = _c === void 0 ? false : _c, _d = _a.clientAwareness, clientAwareness = _d === void 0 ? {} : _d, localState = _a.localState, _e = _a.assumeImmutableResults, assumeImmutableResults = _e === void 0 ? !!cache.assumeImmutableResults : _e, defaultContext = _a.defaultContext;\n var _this = this;\n this.clientAwareness = {};\n // All the queries that the QueryManager is currently managing (not\n // including mutations and subscriptions).\n this.queries = new Map();\n // Maps from queryId strings to Promise rejection functions for\n // currently active queries and fetches.\n // Use protected instead of private field so\n // @apollo/experimental-nextjs-app-support can access type info.\n this.fetchCancelFns = new Map();\n this.transformCache = new caches/* AutoCleanedWeakCache */.A(sizes/* cacheSizes */.v["queryManager.getDocumentInfo"] ||\n 2000 /* defaultCacheSizes["queryManager.getDocumentInfo"] */);\n this.queryIdCounter = 1;\n this.requestIdCounter = 1;\n this.mutationIdCounter = 1;\n // Use protected instead of private field so\n // @apollo/experimental-nextjs-app-support can access type info.\n this.inFlightLinkObservables = new trie_lib/* Trie */.b(false);\n var defaultDocumentTransform = new DocumentTransform/* DocumentTransform */.c(function (document) { return _this.cache.transformDocument(document); }, \n // Allow the apollo cache to manage its own transform caches\n { cache: false });\n this.cache = cache;\n this.link = link;\n this.defaultOptions = defaultOptions || Object.create(null);\n this.queryDeduplication = queryDeduplication;\n this.clientAwareness = clientAwareness;\n this.localState = localState || new LocalState({ cache: cache });\n this.ssrMode = ssrMode;\n this.assumeImmutableResults = assumeImmutableResults;\n this.documentTransform =\n documentTransform ?\n defaultDocumentTransform\n .concat(documentTransform)\n // The custom document transform may add new fragment spreads or new\n // field selections, so we want to give the cache a chance to run\n // again. For example, the InMemoryCache adds __typename to field\n // selections and fragments from the fragment registry.\n .concat(defaultDocumentTransform)\n : defaultDocumentTransform;\n this.defaultContext = defaultContext || Object.create(null);\n if ((this.onBroadcast = onBroadcast)) {\n this.mutationStore = Object.create(null);\n }\n }\n /**\n * Call this method to terminate any active query processes, making it safe\n * to dispose of this QueryManager instance.\n */\n QueryManager.prototype.stop = function () {\n var _this = this;\n this.queries.forEach(function (_info, queryId) {\n _this.stopQueryNoBroadcast(queryId);\n });\n this.cancelPendingFetches((0,globals/* newInvariantError */.vA)(25));\n };\n QueryManager.prototype.cancelPendingFetches = function (error) {\n this.fetchCancelFns.forEach(function (cancel) { return cancel(error); });\n this.fetchCancelFns.clear();\n };\n QueryManager.prototype.mutate = function (_a) {\n return (0,tslib_es6/* __awaiter */.sH)(this, arguments, void 0, function (_b) {\n var mutationId, hasClientExports, mutationStoreValue, isOptimistic, self;\n var _c, _d;\n var mutation = _b.mutation, variables = _b.variables, optimisticResponse = _b.optimisticResponse, updateQueries = _b.updateQueries, _e = _b.refetchQueries, refetchQueries = _e === void 0 ? [] : _e, _f = _b.awaitRefetchQueries, awaitRefetchQueries = _f === void 0 ? false : _f, updateWithProxyFn = _b.update, onQueryUpdated = _b.onQueryUpdated, _g = _b.fetchPolicy, fetchPolicy = _g === void 0 ? ((_c = this.defaultOptions.mutate) === null || _c === void 0 ? void 0 : _c.fetchPolicy) || "network-only" : _g, _h = _b.errorPolicy, errorPolicy = _h === void 0 ? ((_d = this.defaultOptions.mutate) === null || _d === void 0 ? void 0 : _d.errorPolicy) || "none" : _h, keepRootFields = _b.keepRootFields, context = _b.context;\n return (0,tslib_es6/* __generator */.YH)(this, function (_j) {\n switch (_j.label) {\n case 0:\n (0,globals/* invariant */.V1)(mutation, 26);\n (0,globals/* invariant */.V1)(fetchPolicy === "network-only" || fetchPolicy === "no-cache", 27);\n mutationId = this.generateMutationId();\n mutation = this.cache.transformForLink(this.transform(mutation));\n hasClientExports = this.getDocumentInfo(mutation).hasClientExports;\n variables = this.getVariables(mutation, variables);\n if (!hasClientExports) return [3 /*break*/, 2];\n return [4 /*yield*/, this.localState.addExportedVariables(mutation, variables, context)];\n case 1:\n variables = (_j.sent());\n _j.label = 2;\n case 2:\n mutationStoreValue = this.mutationStore &&\n (this.mutationStore[mutationId] = {\n mutation: mutation,\n variables: variables,\n loading: true,\n error: null,\n });\n isOptimistic = optimisticResponse &&\n this.markMutationOptimistic(optimisticResponse, {\n mutationId: mutationId,\n document: mutation,\n variables: variables,\n fetchPolicy: fetchPolicy,\n errorPolicy: errorPolicy,\n context: context,\n updateQueries: updateQueries,\n update: updateWithProxyFn,\n keepRootFields: keepRootFields,\n });\n this.broadcastQueries();\n self = this;\n return [2 /*return*/, new Promise(function (resolve, reject) {\n return asyncMap(self.getObservableFromLink(mutation, (0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, context), { optimisticResponse: isOptimistic ? optimisticResponse : void 0 }), variables, false), function (result) {\n if (graphQLResultHasError(result) && errorPolicy === "none") {\n throw new client_errors/* ApolloError */.K4({\n graphQLErrors: getGraphQLErrorsFromResult(result),\n });\n }\n if (mutationStoreValue) {\n mutationStoreValue.loading = false;\n mutationStoreValue.error = null;\n }\n var storeResult = (0,tslib_es6/* __assign */.Cl)({}, result);\n if (typeof refetchQueries === "function") {\n refetchQueries = refetchQueries(storeResult);\n }\n if (errorPolicy === "ignore" && graphQLResultHasError(storeResult)) {\n delete storeResult.errors;\n }\n return self.markMutationResult({\n mutationId: mutationId,\n result: storeResult,\n document: mutation,\n variables: variables,\n fetchPolicy: fetchPolicy,\n errorPolicy: errorPolicy,\n context: context,\n update: updateWithProxyFn,\n updateQueries: updateQueries,\n awaitRefetchQueries: awaitRefetchQueries,\n refetchQueries: refetchQueries,\n removeOptimistic: isOptimistic ? mutationId : void 0,\n onQueryUpdated: onQueryUpdated,\n keepRootFields: keepRootFields,\n });\n }).subscribe({\n next: function (storeResult) {\n self.broadcastQueries();\n // Since mutations might receive multiple payloads from the\n // ApolloLink chain (e.g. when used with @defer),\n // we resolve with a SingleExecutionResult or after the final\n // ExecutionPatchResult has arrived and we have assembled the\n // multipart response into a single result.\n if (!("hasNext" in storeResult) || storeResult.hasNext === false) {\n resolve(storeResult);\n }\n },\n error: function (err) {\n if (mutationStoreValue) {\n mutationStoreValue.loading = false;\n mutationStoreValue.error = err;\n }\n if (isOptimistic) {\n self.cache.removeOptimistic(mutationId);\n }\n self.broadcastQueries();\n reject(err instanceof client_errors/* ApolloError */.K4 ? err : (new client_errors/* ApolloError */.K4({\n networkError: err,\n })));\n },\n });\n })];\n }\n });\n });\n };\n QueryManager.prototype.markMutationResult = function (mutation, cache) {\n var _this = this;\n if (cache === void 0) { cache = this.cache; }\n var result = mutation.result;\n var cacheWrites = [];\n var skipCache = mutation.fetchPolicy === "no-cache";\n if (!skipCache && shouldWriteResult(result, mutation.errorPolicy)) {\n if (!(0,incrementalResult/* isExecutionPatchIncrementalResult */.ST)(result)) {\n cacheWrites.push({\n result: result.data,\n dataId: "ROOT_MUTATION",\n query: mutation.document,\n variables: mutation.variables,\n });\n }\n if ((0,incrementalResult/* isExecutionPatchIncrementalResult */.ST)(result) &&\n (0,arrays/* isNonEmptyArray */.E)(result.incremental)) {\n var diff = cache.diff({\n id: "ROOT_MUTATION",\n // The cache complains if passed a mutation where it expects a\n // query, so we transform mutations and subscriptions to queries\n // (only once, thanks to this.transformCache).\n query: this.getDocumentInfo(mutation.document).asQuery,\n variables: mutation.variables,\n optimistic: false,\n returnPartialData: true,\n });\n var mergedData = void 0;\n if (diff.result) {\n mergedData = (0,incrementalResult/* mergeIncrementalData */.bd)(diff.result, result);\n }\n if (typeof mergedData !== "undefined") {\n // cast the ExecutionPatchResult to FetchResult here since\n // ExecutionPatchResult never has `data` when returned from the server\n result.data = mergedData;\n cacheWrites.push({\n result: mergedData,\n dataId: "ROOT_MUTATION",\n query: mutation.document,\n variables: mutation.variables,\n });\n }\n }\n var updateQueries_1 = mutation.updateQueries;\n if (updateQueries_1) {\n this.queries.forEach(function (_a, queryId) {\n var observableQuery = _a.observableQuery;\n var queryName = observableQuery && observableQuery.queryName;\n if (!queryName || !QueryManager_hasOwnProperty.call(updateQueries_1, queryName)) {\n return;\n }\n var updater = updateQueries_1[queryName];\n var _b = _this.queries.get(queryId), document = _b.document, variables = _b.variables;\n // Read the current query result from the store.\n var _c = cache.diff({\n query: document,\n variables: variables,\n returnPartialData: true,\n optimistic: false,\n }), currentQueryResult = _c.result, complete = _c.complete;\n if (complete && currentQueryResult) {\n // Run our reducer using the current query result and the mutation result.\n var nextQueryResult = updater(currentQueryResult, {\n mutationResult: result,\n queryName: (document && (0,getFromAST/* getOperationName */.n4)(document)) || void 0,\n queryVariables: variables,\n });\n // Write the modified result back into the store if we got a new result.\n if (nextQueryResult) {\n cacheWrites.push({\n result: nextQueryResult,\n dataId: "ROOT_QUERY",\n query: document,\n variables: variables,\n });\n }\n }\n });\n }\n }\n if (cacheWrites.length > 0 ||\n (mutation.refetchQueries || "").length > 0 ||\n mutation.update ||\n mutation.onQueryUpdated ||\n mutation.removeOptimistic) {\n var results_1 = [];\n this.refetchQueries({\n updateCache: function (cache) {\n if (!skipCache) {\n cacheWrites.forEach(function (write) { return cache.write(write); });\n }\n // If the mutation has some writes associated with it then we need to\n // apply those writes to the store by running this reducer again with\n // a write action.\n var update = mutation.update;\n // Determine whether result is a SingleExecutionResult,\n // or the final ExecutionPatchResult.\n var isFinalResult = !(0,incrementalResult/* isExecutionPatchResult */.YX)(result) ||\n ((0,incrementalResult/* isExecutionPatchIncrementalResult */.ST)(result) && !result.hasNext);\n if (update) {\n if (!skipCache) {\n // Re-read the ROOT_MUTATION data we just wrote into the cache\n // (the first cache.write call in the cacheWrites.forEach loop\n // above), so field read functions have a chance to run for\n // fields within mutation result objects.\n var diff = cache.diff({\n id: "ROOT_MUTATION",\n // The cache complains if passed a mutation where it expects a\n // query, so we transform mutations and subscriptions to queries\n // (only once, thanks to this.transformCache).\n query: _this.getDocumentInfo(mutation.document).asQuery,\n variables: mutation.variables,\n optimistic: false,\n returnPartialData: true,\n });\n if (diff.complete) {\n result = (0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, result), { data: diff.result });\n if ("incremental" in result) {\n delete result.incremental;\n }\n if ("hasNext" in result) {\n delete result.hasNext;\n }\n }\n }\n // If we\'ve received the whole response,\n // either a SingleExecutionResult or the final ExecutionPatchResult,\n // call the update function.\n if (isFinalResult) {\n update(cache, result, {\n context: mutation.context,\n variables: mutation.variables,\n });\n }\n }\n // TODO Do this with cache.evict({ id: \'ROOT_MUTATION\' }) but make it\n // shallow to allow rolling back optimistic evictions.\n if (!skipCache && !mutation.keepRootFields && isFinalResult) {\n cache.modify({\n id: "ROOT_MUTATION",\n fields: function (value, _a) {\n var fieldName = _a.fieldName, DELETE = _a.DELETE;\n return fieldName === "__typename" ? value : DELETE;\n },\n });\n }\n },\n include: mutation.refetchQueries,\n // Write the final mutation.result to the root layer of the cache.\n optimistic: false,\n // Remove the corresponding optimistic layer at the same time as we\n // write the final non-optimistic result.\n removeOptimistic: mutation.removeOptimistic,\n // Let the caller of client.mutate optionally determine the refetching\n // behavior for watched queries after the mutation.update function runs.\n // If no onQueryUpdated function was provided for this mutation, pass\n // null instead of undefined to disable the default refetching behavior.\n onQueryUpdated: mutation.onQueryUpdated || null,\n }).forEach(function (result) { return results_1.push(result); });\n if (mutation.awaitRefetchQueries || mutation.onQueryUpdated) {\n // Returning a promise here makes the mutation await that promise, so we\n // include results in that promise\'s work if awaitRefetchQueries or an\n // onQueryUpdated function was specified.\n return Promise.all(results_1).then(function () { return result; });\n }\n }\n return Promise.resolve(result);\n };\n QueryManager.prototype.markMutationOptimistic = function (optimisticResponse, mutation) {\n var _this = this;\n var data = typeof optimisticResponse === "function" ?\n optimisticResponse(mutation.variables, { IGNORE: IGNORE })\n : optimisticResponse;\n if (data === IGNORE) {\n return false;\n }\n this.cache.recordOptimisticTransaction(function (cache) {\n try {\n _this.markMutationResult((0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, mutation), { result: { data: data } }), cache);\n }\n catch (error) {\n globalThis.__DEV__ !== false && globals/* invariant */.V1.error(error);\n }\n }, mutation.mutationId);\n return true;\n };\n QueryManager.prototype.fetchQuery = function (queryId, options, networkStatus) {\n return this.fetchConcastWithInfo(queryId, options, networkStatus).concast\n .promise;\n };\n QueryManager.prototype.getQueryStore = function () {\n var store = Object.create(null);\n this.queries.forEach(function (info, queryId) {\n store[queryId] = {\n variables: info.variables,\n networkStatus: info.networkStatus,\n networkError: info.networkError,\n graphQLErrors: info.graphQLErrors,\n };\n });\n return store;\n };\n QueryManager.prototype.resetErrors = function (queryId) {\n var queryInfo = this.queries.get(queryId);\n if (queryInfo) {\n queryInfo.networkError = undefined;\n queryInfo.graphQLErrors = [];\n }\n };\n QueryManager.prototype.transform = function (document) {\n return this.documentTransform.transformDocument(document);\n };\n QueryManager.prototype.getDocumentInfo = function (document) {\n var transformCache = this.transformCache;\n if (!transformCache.has(document)) {\n var cacheEntry = {\n // TODO These three calls (hasClientExports, shouldForceResolvers, and\n // usesNonreactiveDirective) are performing independent full traversals\n // of the transformed document. We should consider merging these\n // traversals into a single pass in the future, though the work is\n // cached after the first time.\n hasClientExports: (0,directives/* hasClientExports */.f2)(document),\n hasForcedResolvers: this.localState.shouldForceResolvers(document),\n hasNonreactiveDirective: (0,directives/* hasDirectives */.d8)(["nonreactive"], document),\n clientQuery: this.localState.clientQuery(document),\n serverQuery: (0,transform/* removeDirectivesFromDocument */.iz)([\n { name: "client", remove: true },\n { name: "connection" },\n { name: "nonreactive" },\n ], document),\n defaultVars: (0,getFromAST/* getDefaultValues */.wY)((0,getFromAST/* getOperationDefinition */.Vu)(document)),\n // Transform any mutation or subscription operations to query operations\n // so we can read/write them from/to the cache.\n asQuery: (0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, document), { definitions: document.definitions.map(function (def) {\n if (def.kind === "OperationDefinition" &&\n def.operation !== "query") {\n return (0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, def), { operation: "query" });\n }\n return def;\n }) }),\n };\n transformCache.set(document, cacheEntry);\n }\n return transformCache.get(document);\n };\n QueryManager.prototype.getVariables = function (document, variables) {\n return (0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, this.getDocumentInfo(document).defaultVars), variables);\n };\n QueryManager.prototype.watchQuery = function (options) {\n var query = this.transform(options.query);\n // assign variable default values if supplied\n // NOTE: We don\'t modify options.query here with the transformed query to\n // ensure observable.options.query is set to the raw untransformed query.\n options = (0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, options), { variables: this.getVariables(query, options.variables) });\n if (typeof options.notifyOnNetworkStatusChange === "undefined") {\n options.notifyOnNetworkStatusChange = false;\n }\n var queryInfo = new QueryInfo(this);\n var observable = new ObservableQuery({\n queryManager: this,\n queryInfo: queryInfo,\n options: options,\n });\n observable["lastQuery"] = query;\n this.queries.set(observable.queryId, queryInfo);\n // We give queryInfo the transformed query to ensure the first cache diff\n // uses the transformed query instead of the raw query\n queryInfo.init({\n document: query,\n observableQuery: observable,\n variables: observable.variables,\n });\n return observable;\n };\n QueryManager.prototype.query = function (options, queryId) {\n var _this = this;\n if (queryId === void 0) { queryId = this.generateQueryId(); }\n (0,globals/* invariant */.V1)(options.query, 28);\n (0,globals/* invariant */.V1)(options.query.kind === "Document", 29);\n (0,globals/* invariant */.V1)(!options.returnPartialData, 30);\n (0,globals/* invariant */.V1)(!options.pollInterval, 31);\n return this.fetchQuery(queryId, (0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, options), { query: this.transform(options.query) })).finally(function () { return _this.stopQuery(queryId); });\n };\n QueryManager.prototype.generateQueryId = function () {\n return String(this.queryIdCounter++);\n };\n QueryManager.prototype.generateRequestId = function () {\n return this.requestIdCounter++;\n };\n QueryManager.prototype.generateMutationId = function () {\n return String(this.mutationIdCounter++);\n };\n QueryManager.prototype.stopQueryInStore = function (queryId) {\n this.stopQueryInStoreNoBroadcast(queryId);\n this.broadcastQueries();\n };\n QueryManager.prototype.stopQueryInStoreNoBroadcast = function (queryId) {\n var queryInfo = this.queries.get(queryId);\n if (queryInfo)\n queryInfo.stop();\n };\n QueryManager.prototype.clearStore = function (options) {\n if (options === void 0) { options = {\n discardWatches: true,\n }; }\n // Before we have sent the reset action to the store, we can no longer\n // rely on the results returned by in-flight requests since these may\n // depend on values that previously existed in the data portion of the\n // store. So, we cancel the promises and observers that we have issued\n // so far and not yet resolved (in the case of queries).\n this.cancelPendingFetches((0,globals/* newInvariantError */.vA)(32));\n this.queries.forEach(function (queryInfo) {\n if (queryInfo.observableQuery) {\n // Set loading to true so listeners don\'t trigger unless they want\n // results with partial data.\n queryInfo.networkStatus = core_networkStatus/* NetworkStatus */.pT.loading;\n }\n else {\n queryInfo.stop();\n }\n });\n if (this.mutationStore) {\n this.mutationStore = Object.create(null);\n }\n // begin removing data from the store\n return this.cache.reset(options);\n };\n QueryManager.prototype.getObservableQueries = function (include) {\n var _this = this;\n if (include === void 0) { include = "active"; }\n var queries = new Map();\n var queryNamesAndDocs = new Map();\n var legacyQueryOptions = new Set();\n if (Array.isArray(include)) {\n include.forEach(function (desc) {\n if (typeof desc === "string") {\n queryNamesAndDocs.set(desc, false);\n }\n else if ((0,storeUtils/* isDocumentNode */.Kc)(desc)) {\n queryNamesAndDocs.set(_this.transform(desc), false);\n }\n else if ((0,objects/* isNonNullObject */.U)(desc) && desc.query) {\n legacyQueryOptions.add(desc);\n }\n });\n }\n this.queries.forEach(function (_a, queryId) {\n var oq = _a.observableQuery, document = _a.document;\n if (oq) {\n if (include === "all") {\n queries.set(queryId, oq);\n return;\n }\n var queryName = oq.queryName, fetchPolicy = oq.options.fetchPolicy;\n if (fetchPolicy === "standby" ||\n (include === "active" && !oq.hasObservers())) {\n return;\n }\n if (include === "active" ||\n (queryName && queryNamesAndDocs.has(queryName)) ||\n (document && queryNamesAndDocs.has(document))) {\n queries.set(queryId, oq);\n if (queryName)\n queryNamesAndDocs.set(queryName, true);\n if (document)\n queryNamesAndDocs.set(document, true);\n }\n }\n });\n if (legacyQueryOptions.size) {\n legacyQueryOptions.forEach(function (options) {\n // We will be issuing a fresh network request for this query, so we\n // pre-allocate a new query ID here, using a special prefix to enable\n // cleaning up these temporary queries later, after fetching.\n var queryId = (0,makeUniqueId/* makeUniqueId */.v)("legacyOneTimeQuery");\n var queryInfo = _this.getQuery(queryId).init({\n document: options.query,\n variables: options.variables,\n });\n var oq = new ObservableQuery({\n queryManager: _this,\n queryInfo: queryInfo,\n options: (0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, options), { fetchPolicy: "network-only" }),\n });\n (0,globals/* invariant */.V1)(oq.queryId === queryId);\n queryInfo.setObservableQuery(oq);\n queries.set(queryId, oq);\n });\n }\n if (globalThis.__DEV__ !== false && queryNamesAndDocs.size) {\n queryNamesAndDocs.forEach(function (included, nameOrDoc) {\n if (!included) {\n globalThis.__DEV__ !== false && globals/* invariant */.V1.warn(typeof nameOrDoc === "string" ? 33 : 34, nameOrDoc);\n }\n });\n }\n return queries;\n };\n QueryManager.prototype.reFetchObservableQueries = function (includeStandby) {\n var _this = this;\n if (includeStandby === void 0) { includeStandby = false; }\n var observableQueryPromises = [];\n this.getObservableQueries(includeStandby ? "all" : "active").forEach(function (observableQuery, queryId) {\n var fetchPolicy = observableQuery.options.fetchPolicy;\n observableQuery.resetLastResults();\n if (includeStandby ||\n (fetchPolicy !== "standby" && fetchPolicy !== "cache-only")) {\n observableQueryPromises.push(observableQuery.refetch());\n }\n _this.getQuery(queryId).setDiff(null);\n });\n this.broadcastQueries();\n return Promise.all(observableQueryPromises);\n };\n QueryManager.prototype.setObservableQuery = function (observableQuery) {\n this.getQuery(observableQuery.queryId).setObservableQuery(observableQuery);\n };\n QueryManager.prototype.startGraphQLSubscription = function (_a) {\n var _this = this;\n var query = _a.query, fetchPolicy = _a.fetchPolicy, _b = _a.errorPolicy, errorPolicy = _b === void 0 ? "none" : _b, variables = _a.variables, _c = _a.context, context = _c === void 0 ? {} : _c;\n query = this.transform(query);\n variables = this.getVariables(query, variables);\n var makeObservable = function (variables) {\n return _this.getObservableFromLink(query, context, variables).map(function (result) {\n if (fetchPolicy !== "no-cache") {\n // the subscription interface should handle not sending us results we no longer subscribe to.\n // XXX I don\'t think we ever send in an object with errors, but we might in the future...\n if (shouldWriteResult(result, errorPolicy)) {\n _this.cache.write({\n query: query,\n result: result.data,\n dataId: "ROOT_SUBSCRIPTION",\n variables: variables,\n });\n }\n _this.broadcastQueries();\n }\n var hasErrors = graphQLResultHasError(result);\n var hasProtocolErrors = (0,client_errors/* graphQLResultHasProtocolErrors */.uR)(result);\n if (hasErrors || hasProtocolErrors) {\n var errors = {};\n if (hasErrors) {\n errors.graphQLErrors = result.errors;\n }\n if (hasProtocolErrors) {\n errors.protocolErrors = result.extensions[client_errors/* PROTOCOL_ERRORS_SYMBOL */.K$];\n }\n // `errorPolicy` is a mechanism for handling GraphQL errors, according\n // to our documentation, so we throw protocol errors regardless of the\n // set error policy.\n if (errorPolicy === "none" || hasProtocolErrors) {\n throw new client_errors/* ApolloError */.K4(errors);\n }\n }\n if (errorPolicy === "ignore") {\n delete result.errors;\n }\n return result;\n });\n };\n if (this.getDocumentInfo(query).hasClientExports) {\n var observablePromise_1 = this.localState\n .addExportedVariables(query, variables, context)\n .then(makeObservable);\n return new zen_observable_ts_module/* Observable */.c(function (observer) {\n var sub = null;\n observablePromise_1.then(function (observable) { return (sub = observable.subscribe(observer)); }, observer.error);\n return function () { return sub && sub.unsubscribe(); };\n });\n }\n return makeObservable(variables);\n };\n QueryManager.prototype.stopQuery = function (queryId) {\n this.stopQueryNoBroadcast(queryId);\n this.broadcastQueries();\n };\n QueryManager.prototype.stopQueryNoBroadcast = function (queryId) {\n this.stopQueryInStoreNoBroadcast(queryId);\n this.removeQuery(queryId);\n };\n QueryManager.prototype.removeQuery = function (queryId) {\n // teardown all links\n // Both `QueryManager.fetchRequest` and `QueryManager.query` create separate promises\n // that each add their reject functions to fetchCancelFns.\n // A query created with `QueryManager.query()` could trigger a `QueryManager.fetchRequest`.\n // The same queryId could have two rejection fns for two promises\n this.fetchCancelFns.delete(queryId);\n if (this.queries.has(queryId)) {\n this.getQuery(queryId).stop();\n this.queries.delete(queryId);\n }\n };\n QueryManager.prototype.broadcastQueries = function () {\n if (this.onBroadcast)\n this.onBroadcast();\n this.queries.forEach(function (info) { return info.notify(); });\n };\n QueryManager.prototype.getLocalState = function () {\n return this.localState;\n };\n QueryManager.prototype.getObservableFromLink = function (query, context, variables, \n // Prefer context.queryDeduplication if specified.\n deduplication) {\n var _this = this;\n var _a;\n if (deduplication === void 0) { deduplication = (_a = context === null || context === void 0 ? void 0 : context.queryDeduplication) !== null && _a !== void 0 ? _a : this.queryDeduplication; }\n var observable;\n var _b = this.getDocumentInfo(query), serverQuery = _b.serverQuery, clientQuery = _b.clientQuery;\n if (serverQuery) {\n var _c = this, inFlightLinkObservables_1 = _c.inFlightLinkObservables, link = _c.link;\n var operation = {\n query: serverQuery,\n variables: variables,\n operationName: (0,getFromAST/* getOperationName */.n4)(serverQuery) || void 0,\n context: this.prepareContext((0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, context), { forceFetch: !deduplication })),\n };\n context = operation.context;\n if (deduplication) {\n var printedServerQuery_1 = (0,print/* print */.y)(serverQuery);\n var varJson_1 = (0,canonicalStringify/* canonicalStringify */.M)(variables);\n var entry = inFlightLinkObservables_1.lookup(printedServerQuery_1, varJson_1);\n observable = entry.observable;\n if (!observable) {\n var concast = new Concast([\n execute(link, operation),\n ]);\n observable = entry.observable = concast;\n concast.beforeNext(function () {\n inFlightLinkObservables_1.remove(printedServerQuery_1, varJson_1);\n });\n }\n }\n else {\n observable = new Concast([\n execute(link, operation),\n ]);\n }\n }\n else {\n observable = new Concast([zen_observable_ts_module/* Observable */.c.of({ data: {} })]);\n context = this.prepareContext(context);\n }\n if (clientQuery) {\n observable = asyncMap(observable, function (result) {\n return _this.localState.runResolvers({\n document: clientQuery,\n remoteResult: result,\n context: context,\n variables: variables,\n });\n });\n }\n return observable;\n };\n QueryManager.prototype.getResultsFromLink = function (queryInfo, cacheWriteBehavior, options) {\n var requestId = (queryInfo.lastRequestId = this.generateRequestId());\n // Performing transformForLink here gives this.cache a chance to fill in\n // missing fragment definitions (for example) before sending this document\n // through the link chain.\n var linkDocument = this.cache.transformForLink(options.query);\n return asyncMap(this.getObservableFromLink(linkDocument, options.context, options.variables), function (result) {\n var graphQLErrors = getGraphQLErrorsFromResult(result);\n var hasErrors = graphQLErrors.length > 0;\n // If we interrupted this request by calling getResultsFromLink again\n // with the same QueryInfo object, we ignore the old results.\n if (requestId >= queryInfo.lastRequestId) {\n if (hasErrors && options.errorPolicy === "none") {\n // Throwing here effectively calls observer.error.\n throw queryInfo.markError(new client_errors/* ApolloError */.K4({\n graphQLErrors: graphQLErrors,\n }));\n }\n // Use linkDocument rather than queryInfo.document so the\n // operation/fragments used to write the result are the same as the\n // ones used to obtain it from the link.\n queryInfo.markResult(result, linkDocument, options, cacheWriteBehavior);\n queryInfo.markReady();\n }\n var aqr = {\n data: result.data,\n loading: false,\n networkStatus: core_networkStatus/* NetworkStatus */.pT.ready,\n };\n if (hasErrors && options.errorPolicy !== "ignore") {\n aqr.errors = graphQLErrors;\n aqr.networkStatus = core_networkStatus/* NetworkStatus */.pT.error;\n }\n return aqr;\n }, function (networkError) {\n var error = (0,client_errors/* isApolloError */.Mn)(networkError) ? networkError : (new client_errors/* ApolloError */.K4({ networkError: networkError }));\n // Avoid storing errors from older interrupted queries.\n if (requestId >= queryInfo.lastRequestId) {\n queryInfo.markError(error);\n }\n throw error;\n });\n };\n QueryManager.prototype.fetchConcastWithInfo = function (queryId, options, \n // The initial networkStatus for this fetch, most often\n // NetworkStatus.loading, but also possibly fetchMore, poll, refetch,\n // or setVariables.\n networkStatus, query) {\n var _this = this;\n if (networkStatus === void 0) { networkStatus = core_networkStatus/* NetworkStatus */.pT.loading; }\n if (query === void 0) { query = options.query; }\n var variables = this.getVariables(query, options.variables);\n var queryInfo = this.getQuery(queryId);\n var defaults = this.defaultOptions.watchQuery;\n var _a = options.fetchPolicy, fetchPolicy = _a === void 0 ? (defaults && defaults.fetchPolicy) || "cache-first" : _a, _b = options.errorPolicy, errorPolicy = _b === void 0 ? (defaults && defaults.errorPolicy) || "none" : _b, _c = options.returnPartialData, returnPartialData = _c === void 0 ? false : _c, _d = options.notifyOnNetworkStatusChange, notifyOnNetworkStatusChange = _d === void 0 ? false : _d, _e = options.context, context = _e === void 0 ? {} : _e;\n var normalized = Object.assign({}, options, {\n query: query,\n variables: variables,\n fetchPolicy: fetchPolicy,\n errorPolicy: errorPolicy,\n returnPartialData: returnPartialData,\n notifyOnNetworkStatusChange: notifyOnNetworkStatusChange,\n context: context,\n });\n var fromVariables = function (variables) {\n // Since normalized is always a fresh copy of options, it\'s safe to\n // modify its properties here, rather than creating yet another new\n // WatchQueryOptions object.\n normalized.variables = variables;\n var sourcesWithInfo = _this.fetchQueryByPolicy(queryInfo, normalized, networkStatus);\n if (\n // If we\'re in standby, postpone advancing options.fetchPolicy using\n // applyNextFetchPolicy.\n normalized.fetchPolicy !== "standby" &&\n // The "standby" policy currently returns [] from fetchQueryByPolicy, so\n // this is another way to detect when nothing was done/fetched.\n sourcesWithInfo.sources.length > 0 &&\n queryInfo.observableQuery) {\n queryInfo.observableQuery["applyNextFetchPolicy"]("after-fetch", options);\n }\n return sourcesWithInfo;\n };\n // This cancel function needs to be set before the concast is created,\n // in case concast creation synchronously cancels the request.\n var cleanupCancelFn = function () { return _this.fetchCancelFns.delete(queryId); };\n this.fetchCancelFns.set(queryId, function (reason) {\n cleanupCancelFn();\n // This delay ensures the concast variable has been initialized.\n setTimeout(function () { return concast.cancel(reason); });\n });\n var concast, containsDataFromLink;\n // If the query has @export(as: ...) directives, then we need to\n // process those directives asynchronously. When there are no\n // @export directives (the common case), we deliberately avoid\n // wrapping the result of this.fetchQueryByPolicy in a Promise,\n // since the timing of result delivery is (unfortunately) important\n // for backwards compatibility. TODO This code could be simpler if\n // we deprecated and removed LocalState.\n if (this.getDocumentInfo(normalized.query).hasClientExports) {\n concast = new Concast(this.localState\n .addExportedVariables(normalized.query, normalized.variables, normalized.context)\n .then(fromVariables)\n .then(function (sourcesWithInfo) { return sourcesWithInfo.sources; }));\n // there is just no way we can synchronously get the *right* value here,\n // so we will assume `true`, which is the behaviour before the bug fix in\n // #10597. This means that bug is not fixed in that case, and is probably\n // un-fixable with reasonable effort for the edge case of @export as\n // directives.\n containsDataFromLink = true;\n }\n else {\n var sourcesWithInfo = fromVariables(normalized.variables);\n containsDataFromLink = sourcesWithInfo.fromLink;\n concast = new Concast(sourcesWithInfo.sources);\n }\n concast.promise.then(cleanupCancelFn, cleanupCancelFn);\n return {\n concast: concast,\n fromLink: containsDataFromLink,\n };\n };\n QueryManager.prototype.refetchQueries = function (_a) {\n var _this = this;\n var updateCache = _a.updateCache, include = _a.include, _b = _a.optimistic, optimistic = _b === void 0 ? false : _b, _c = _a.removeOptimistic, removeOptimistic = _c === void 0 ? optimistic ? (0,makeUniqueId/* makeUniqueId */.v)("refetchQueries") : void 0 : _c, onQueryUpdated = _a.onQueryUpdated;\n var includedQueriesById = new Map();\n if (include) {\n this.getObservableQueries(include).forEach(function (oq, queryId) {\n includedQueriesById.set(queryId, {\n oq: oq,\n lastDiff: _this.getQuery(queryId).getDiff(),\n });\n });\n }\n var results = new Map();\n if (updateCache) {\n this.cache.batch({\n update: updateCache,\n // Since you can perform any combination of cache reads and/or writes in\n // the cache.batch update function, its optimistic option can be either\n // a boolean or a string, representing three distinct modes of\n // operation:\n //\n // * false: read/write only the root layer\n // * true: read/write the topmost layer\n // * string: read/write a fresh optimistic layer with that ID string\n //\n // When typeof optimistic === "string", a new optimistic layer will be\n // temporarily created within cache.batch with that string as its ID. If\n // we then pass that same string as the removeOptimistic option, we can\n // make cache.batch immediately remove the optimistic layer after\n // running the updateCache function, triggering only one broadcast.\n //\n // However, the refetchQueries method accepts only true or false for its\n // optimistic option (not string). We interpret true to mean a temporary\n // optimistic layer should be created, to allow efficiently rolling back\n // the effect of the updateCache function, which involves passing a\n // string instead of true as the optimistic option to cache.batch, when\n // refetchQueries receives optimistic: true.\n //\n // In other words, we are deliberately not supporting the use case of\n // writing to an *existing* optimistic layer (using the refetchQueries\n // updateCache function), since that would potentially interfere with\n // other optimistic updates in progress. Instead, you can read/write\n // only the root layer by passing optimistic: false to refetchQueries,\n // or you can read/write a brand new optimistic layer that will be\n // automatically removed by passing optimistic: true.\n optimistic: (optimistic && removeOptimistic) || false,\n // The removeOptimistic option can also be provided by itself, even if\n // optimistic === false, to remove some previously-added optimistic\n // layer safely and efficiently, like we do in markMutationResult.\n //\n // If an explicit removeOptimistic string is provided with optimistic:\n // true, the removeOptimistic string will determine the ID of the\n // temporary optimistic layer, in case that ever matters.\n removeOptimistic: removeOptimistic,\n onWatchUpdated: function (watch, diff, lastDiff) {\n var oq = watch.watcher instanceof QueryInfo && watch.watcher.observableQuery;\n if (oq) {\n if (onQueryUpdated) {\n // Since we\'re about to handle this query now, remove it from\n // includedQueriesById, in case it was added earlier because of\n // options.include.\n includedQueriesById.delete(oq.queryId);\n var result = onQueryUpdated(oq, diff, lastDiff);\n if (result === true) {\n // The onQueryUpdated function requested the default refetching\n // behavior by returning true.\n result = oq.refetch();\n }\n // Record the result in the results Map, as long as onQueryUpdated\n // did not return false to skip/ignore this result.\n if (result !== false) {\n results.set(oq, result);\n }\n // Allow the default cache broadcast to happen, except when\n // onQueryUpdated returns false.\n return result;\n }\n if (onQueryUpdated !== null) {\n // If we don\'t have an onQueryUpdated function, and onQueryUpdated\n // was not disabled by passing null, make sure this query is\n // "included" like any other options.include-specified query.\n includedQueriesById.set(oq.queryId, { oq: oq, lastDiff: lastDiff, diff: diff });\n }\n }\n },\n });\n }\n if (includedQueriesById.size) {\n includedQueriesById.forEach(function (_a, queryId) {\n var oq = _a.oq, lastDiff = _a.lastDiff, diff = _a.diff;\n var result;\n // If onQueryUpdated is provided, we want to use it for all included\n // queries, even the QueryOptions ones.\n if (onQueryUpdated) {\n if (!diff) {\n var info = oq["queryInfo"];\n info.reset(); // Force info.getDiff() to read from cache.\n diff = info.getDiff();\n }\n result = onQueryUpdated(oq, diff, lastDiff);\n }\n // Otherwise, we fall back to refetching.\n if (!onQueryUpdated || result === true) {\n result = oq.refetch();\n }\n if (result !== false) {\n results.set(oq, result);\n }\n if (queryId.indexOf("legacyOneTimeQuery") >= 0) {\n _this.stopQueryNoBroadcast(queryId);\n }\n });\n }\n if (removeOptimistic) {\n // In case no updateCache callback was provided (so cache.batch was not\n // called above, and thus did not already remove the optimistic layer),\n // remove it here. Since this is a no-op when the layer has already been\n // removed, we do it even if we called cache.batch above, since it\'s\n // possible this.cache is an instance of some ApolloCache subclass other\n // than InMemoryCache, and does not fully support the removeOptimistic\n // option for cache.batch.\n this.cache.removeOptimistic(removeOptimistic);\n }\n return results;\n };\n QueryManager.prototype.fetchQueryByPolicy = function (queryInfo, _a, \n // The initial networkStatus for this fetch, most often\n // NetworkStatus.loading, but also possibly fetchMore, poll, refetch,\n // or setVariables.\n networkStatus) {\n var _this = this;\n var query = _a.query, variables = _a.variables, fetchPolicy = _a.fetchPolicy, refetchWritePolicy = _a.refetchWritePolicy, errorPolicy = _a.errorPolicy, returnPartialData = _a.returnPartialData, context = _a.context, notifyOnNetworkStatusChange = _a.notifyOnNetworkStatusChange;\n var oldNetworkStatus = queryInfo.networkStatus;\n queryInfo.init({\n document: query,\n variables: variables,\n networkStatus: networkStatus,\n });\n var readCache = function () { return queryInfo.getDiff(); };\n var resultsFromCache = function (diff, networkStatus) {\n if (networkStatus === void 0) { networkStatus = queryInfo.networkStatus || core_networkStatus/* NetworkStatus */.pT.loading; }\n var data = diff.result;\n if (globalThis.__DEV__ !== false && !returnPartialData && !(0,lib/* equal */.L)(data, {})) {\n logMissingFieldErrors(diff.missing);\n }\n var fromData = function (data) {\n return zen_observable_ts_module/* Observable */.c.of((0,tslib_es6/* __assign */.Cl)({ data: data, loading: (0,core_networkStatus/* isNetworkRequestInFlight */.bi)(networkStatus), networkStatus: networkStatus }, (diff.complete ? null : { partial: true })));\n };\n if (data && _this.getDocumentInfo(query).hasForcedResolvers) {\n return _this.localState\n .runResolvers({\n document: query,\n remoteResult: { data: data },\n context: context,\n variables: variables,\n onlyRunForcedResolvers: true,\n })\n .then(function (resolved) { return fromData(resolved.data || void 0); });\n }\n // Resolves https://github.com/apollographql/apollo-client/issues/10317.\n // If errorPolicy is \'none\' and notifyOnNetworkStatusChange is true,\n // data was incorrectly returned from the cache on refetch:\n // if diff.missing exists, we should not return cache data.\n if (errorPolicy === "none" &&\n networkStatus === core_networkStatus/* NetworkStatus */.pT.refetch &&\n Array.isArray(diff.missing)) {\n return fromData(void 0);\n }\n return fromData(data);\n };\n var cacheWriteBehavior = fetchPolicy === "no-cache" ? 0 /* CacheWriteBehavior.FORBID */\n // Watched queries must opt into overwriting existing data on refetch,\n // by passing refetchWritePolicy: "overwrite" in their WatchQueryOptions.\n : (networkStatus === core_networkStatus/* NetworkStatus */.pT.refetch &&\n refetchWritePolicy !== "merge") ?\n 1 /* CacheWriteBehavior.OVERWRITE */\n : 2 /* CacheWriteBehavior.MERGE */;\n var resultsFromLink = function () {\n return _this.getResultsFromLink(queryInfo, cacheWriteBehavior, {\n query: query,\n variables: variables,\n context: context,\n fetchPolicy: fetchPolicy,\n errorPolicy: errorPolicy,\n });\n };\n var shouldNotify = notifyOnNetworkStatusChange &&\n typeof oldNetworkStatus === "number" &&\n oldNetworkStatus !== networkStatus &&\n (0,core_networkStatus/* isNetworkRequestInFlight */.bi)(networkStatus);\n switch (fetchPolicy) {\n default:\n case "cache-first": {\n var diff = readCache();\n if (diff.complete) {\n return {\n fromLink: false,\n sources: [resultsFromCache(diff, queryInfo.markReady())],\n };\n }\n if (returnPartialData || shouldNotify) {\n return {\n fromLink: true,\n sources: [resultsFromCache(diff), resultsFromLink()],\n };\n }\n return { fromLink: true, sources: [resultsFromLink()] };\n }\n case "cache-and-network": {\n var diff = readCache();\n if (diff.complete || returnPartialData || shouldNotify) {\n return {\n fromLink: true,\n sources: [resultsFromCache(diff), resultsFromLink()],\n };\n }\n return { fromLink: true, sources: [resultsFromLink()] };\n }\n case "cache-only":\n return {\n fromLink: false,\n sources: [resultsFromCache(readCache(), queryInfo.markReady())],\n };\n case "network-only":\n if (shouldNotify) {\n return {\n fromLink: true,\n sources: [resultsFromCache(readCache()), resultsFromLink()],\n };\n }\n return { fromLink: true, sources: [resultsFromLink()] };\n case "no-cache":\n if (shouldNotify) {\n return {\n fromLink: true,\n // Note that queryInfo.getDiff() for no-cache queries does not call\n // cache.diff, but instead returns a { complete: false } stub result\n // when there is no queryInfo.diff already defined.\n sources: [resultsFromCache(queryInfo.getDiff()), resultsFromLink()],\n };\n }\n return { fromLink: true, sources: [resultsFromLink()] };\n case "standby":\n return { fromLink: false, sources: [] };\n }\n };\n QueryManager.prototype.getQuery = function (queryId) {\n if (queryId && !this.queries.has(queryId)) {\n this.queries.set(queryId, new QueryInfo(this, queryId));\n }\n return this.queries.get(queryId);\n };\n QueryManager.prototype.prepareContext = function (context) {\n if (context === void 0) { context = {}; }\n var newContext = this.localState.prepareContext(context);\n return (0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, this.defaultContext), newContext), { clientAwareness: this.clientAwareness });\n };\n return QueryManager;\n}());\n\n//# sourceMappingURL=QueryManager.js.map\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/common/mergeOptions.js\nvar mergeOptions = __webpack_require__(144);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/caching/getMemoryInternals.js\nvar getMemoryInternals = __webpack_require__(5051);\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/core/ApolloClient.js\n\n\n\n\n\n\n\nvar hasSuggestedDevtools = false;\n// Though mergeOptions now resides in @apollo/client/utilities, it was\n// previously declared and exported from this module, and then reexported from\n// @apollo/client/core. Since we need to preserve that API anyway, the easiest\n// solution is to reexport mergeOptions where it was previously declared (here).\n\n\n\n/**\n * This is the primary Apollo Client class. It is used to send GraphQL documents (i.e. queries\n * and mutations) to a GraphQL spec-compliant server over an `ApolloLink` instance,\n * receive results from the server and cache the results in a store. It also delivers updates\n * to GraphQL queries through `Observable` instances.\n */\nvar ApolloClient = /** @class */ (function () {\n /**\n * Constructs an instance of `ApolloClient`.\n *\n * @example\n * ```js\n * import { ApolloClient, InMemoryCache } from \'@apollo/client\';\n *\n * const cache = new InMemoryCache();\n *\n * const client = new ApolloClient({\n * // Provide required constructor fields\n * cache: cache,\n * uri: \'http://localhost:4000/\',\n *\n * // Provide some optional constructor fields\n * name: \'react-web-client\',\n * version: \'1.3\',\n * queryDeduplication: false,\n * defaultOptions: {\n * watchQuery: {\n * fetchPolicy: \'cache-and-network\',\n * },\n * },\n * });\n * ```\n */\n function ApolloClient(options) {\n var _this = this;\n this.resetStoreCallbacks = [];\n this.clearStoreCallbacks = [];\n if (!options.cache) {\n throw (0,globals/* newInvariantError */.vA)(15);\n }\n var uri = options.uri, credentials = options.credentials, headers = options.headers, cache = options.cache, documentTransform = options.documentTransform, _a = options.ssrMode, ssrMode = _a === void 0 ? false : _a, _b = options.ssrForceFetchDelay, ssrForceFetchDelay = _b === void 0 ? 0 : _b, \n // Expose the client instance as window.__APOLLO_CLIENT__ and call\n // onBroadcast in queryManager.broadcastQueries to enable browser\n // devtools, but disable them by default in production.\n _c = options.connectToDevTools, \n // Expose the client instance as window.__APOLLO_CLIENT__ and call\n // onBroadcast in queryManager.broadcastQueries to enable browser\n // devtools, but disable them by default in production.\n connectToDevTools = _c === void 0 ? typeof window === "object" &&\n !window.__APOLLO_CLIENT__ &&\n globalThis.__DEV__ !== false : _c, _d = options.queryDeduplication, queryDeduplication = _d === void 0 ? true : _d, defaultOptions = options.defaultOptions, defaultContext = options.defaultContext, _e = options.assumeImmutableResults, assumeImmutableResults = _e === void 0 ? cache.assumeImmutableResults : _e, resolvers = options.resolvers, typeDefs = options.typeDefs, fragmentMatcher = options.fragmentMatcher, clientAwarenessName = options.name, clientAwarenessVersion = options.version;\n var link = options.link;\n if (!link) {\n link =\n uri ? new HttpLink({ uri: uri, credentials: credentials, headers: headers }) : ApolloLink/* ApolloLink */.C.empty();\n }\n this.link = link;\n this.cache = cache;\n this.disableNetworkFetches = ssrMode || ssrForceFetchDelay > 0;\n this.queryDeduplication = queryDeduplication;\n this.defaultOptions = defaultOptions || Object.create(null);\n this.typeDefs = typeDefs;\n if (ssrForceFetchDelay) {\n setTimeout(function () { return (_this.disableNetworkFetches = false); }, ssrForceFetchDelay);\n }\n this.watchQuery = this.watchQuery.bind(this);\n this.query = this.query.bind(this);\n this.mutate = this.mutate.bind(this);\n this.watchFragment = this.watchFragment.bind(this);\n this.resetStore = this.resetStore.bind(this);\n this.reFetchObservableQueries = this.reFetchObservableQueries.bind(this);\n this.version = version/* version */.r;\n this.localState = new LocalState({\n cache: cache,\n client: this,\n resolvers: resolvers,\n fragmentMatcher: fragmentMatcher,\n });\n this.queryManager = new QueryManager({\n cache: this.cache,\n link: this.link,\n defaultOptions: this.defaultOptions,\n defaultContext: defaultContext,\n documentTransform: documentTransform,\n queryDeduplication: queryDeduplication,\n ssrMode: ssrMode,\n clientAwareness: {\n name: clientAwarenessName,\n version: clientAwarenessVersion,\n },\n localState: this.localState,\n assumeImmutableResults: assumeImmutableResults,\n onBroadcast: connectToDevTools ?\n function () {\n if (_this.devToolsHookCb) {\n _this.devToolsHookCb({\n action: {},\n state: {\n queries: _this.queryManager.getQueryStore(),\n mutations: _this.queryManager.mutationStore || {},\n },\n dataWithOptimisticResults: _this.cache.extract(true),\n });\n }\n }\n : void 0,\n });\n if (connectToDevTools)\n this.connectToDevTools();\n }\n ApolloClient.prototype.connectToDevTools = function () {\n if (typeof window === "object") {\n var windowWithDevTools = window;\n var devtoolsSymbol = Symbol.for("apollo.devtools");\n (windowWithDevTools[devtoolsSymbol] =\n windowWithDevTools[devtoolsSymbol] || []).push(this);\n windowWithDevTools.__APOLLO_CLIENT__ = this;\n }\n /**\n * Suggest installing the devtools for developers who don\'t have them\n */\n if (!hasSuggestedDevtools && globalThis.__DEV__ !== false) {\n hasSuggestedDevtools = true;\n setTimeout(function () {\n if (typeof window !== "undefined" &&\n window.document &&\n window.top === window.self &&\n !window.__APOLLO_DEVTOOLS_GLOBAL_HOOK__ &&\n /^(https?|file):$/.test(window.location.protocol)) {\n var nav = window.navigator;\n var ua = nav && nav.userAgent;\n var url = void 0;\n if (typeof ua === "string") {\n if (ua.indexOf("Chrome/") > -1) {\n url =\n "https://chrome.google.com/webstore/detail/" +\n "apollo-client-developer-t/jdkknkkbebbapilgoeccciglkfbmbnfm";\n }\n else if (ua.indexOf("Firefox/") > -1) {\n url =\n "https://addons.mozilla.org/en-US/firefox/addon/apollo-developer-tools/";\n }\n }\n if (url) {\n globalThis.__DEV__ !== false && globals/* invariant */.V1.log("Download the Apollo DevTools for a better development " +\n "experience: %s", url);\n }\n }\n }, 10000);\n }\n };\n Object.defineProperty(ApolloClient.prototype, "documentTransform", {\n /**\n * The `DocumentTransform` used to modify GraphQL documents before a request\n * is made. If a custom `DocumentTransform` is not provided, this will be the\n * default document transform.\n */\n get: function () {\n return this.queryManager.documentTransform;\n },\n enumerable: false,\n configurable: true\n });\n /**\n * Call this method to terminate any active client processes, making it safe\n * to dispose of this `ApolloClient` instance.\n */\n ApolloClient.prototype.stop = function () {\n this.queryManager.stop();\n };\n /**\n * This watches the cache store of the query according to the options specified and\n * returns an `ObservableQuery`. We can subscribe to this `ObservableQuery` and\n * receive updated results through an observer when the cache store changes.\n *\n * Note that this method is not an implementation of GraphQL subscriptions. Rather,\n * it uses Apollo\'s store in order to reactively deliver updates to your query results.\n *\n * For example, suppose you call watchQuery on a GraphQL query that fetches a person\'s\n * first and last name and this person has a particular object identifier, provided by\n * dataIdFromObject. Later, a different query fetches that same person\'s\n * first and last name and the first name has now changed. Then, any observers associated\n * with the results of the first query will be updated with a new result object.\n *\n * Note that if the cache does not change, the subscriber will *not* be notified.\n *\n * See [here](https://medium.com/apollo-stack/the-concepts-of-graphql-bc68bd819be3#.3mb0cbcmc) for\n * a description of store reactivity.\n */\n ApolloClient.prototype.watchQuery = function (options) {\n if (this.defaultOptions.watchQuery) {\n options = (0,mergeOptions/* mergeOptions */.l)(this.defaultOptions.watchQuery, options);\n }\n // XXX Overwriting options is probably not the best way to do this long term...\n if (this.disableNetworkFetches &&\n (options.fetchPolicy === "network-only" ||\n options.fetchPolicy === "cache-and-network")) {\n options = (0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, options), { fetchPolicy: "cache-first" });\n }\n return this.queryManager.watchQuery(options);\n };\n /**\n * This resolves a single query according to the options specified and\n * returns a `Promise` which is either resolved with the resulting data\n * or rejected with an error.\n *\n * @param options - An object of type `QueryOptions` that allows us to\n * describe how this query should be treated e.g. whether it should hit the\n * server at all or just resolve from the cache, etc.\n */\n ApolloClient.prototype.query = function (options) {\n if (this.defaultOptions.query) {\n options = (0,mergeOptions/* mergeOptions */.l)(this.defaultOptions.query, options);\n }\n (0,globals/* invariant */.V1)(options.fetchPolicy !== "cache-and-network", 16);\n if (this.disableNetworkFetches && options.fetchPolicy === "network-only") {\n options = (0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, options), { fetchPolicy: "cache-first" });\n }\n return this.queryManager.query(options);\n };\n /**\n * This resolves a single mutation according to the options specified and returns a\n * Promise which is either resolved with the resulting data or rejected with an\n * error. In some cases both `data` and `errors` might be undefined, for example\n * when `errorPolicy` is set to `\'ignore\'`.\n *\n * It takes options as an object with the following keys and values:\n */\n ApolloClient.prototype.mutate = function (options) {\n if (this.defaultOptions.mutate) {\n options = (0,mergeOptions/* mergeOptions */.l)(this.defaultOptions.mutate, options);\n }\n return this.queryManager.mutate(options);\n };\n /**\n * This subscribes to a graphql subscription according to the options specified and returns an\n * `Observable` which either emits received data or an error.\n */\n ApolloClient.prototype.subscribe = function (options) {\n return this.queryManager.startGraphQLSubscription(options);\n };\n /**\n * Tries to read some data from the store in the shape of the provided\n * GraphQL query without making a network request. This method will start at\n * the root query. To start at a specific id returned by `dataIdFromObject`\n * use `readFragment`.\n *\n * @param optimistic - Set to `true` to allow `readQuery` to return\n * optimistic results. Is `false` by default.\n */\n ApolloClient.prototype.readQuery = function (options, optimistic) {\n if (optimistic === void 0) { optimistic = false; }\n return this.cache.readQuery(options, optimistic);\n };\n /**\n * Watches the cache store of the fragment according to the options specified\n * and returns an `Observable`. We can subscribe to this\n * `Observable` and receive updated results through an\n * observer when the cache store changes.\n *\n * You must pass in a GraphQL document with a single fragment or a document\n * with multiple fragments that represent what you are reading. If you pass\n * in a document with multiple fragments then you must also specify a\n * `fragmentName`.\n *\n * @since 3.10.0\n * @param options - An object of type `WatchFragmentOptions` that allows\n * the cache to identify the fragment and optionally specify whether to react\n * to optimistic updates.\n */\n ApolloClient.prototype.watchFragment = function (options) {\n return this.cache.watchFragment(options);\n };\n /**\n * Tries to read some data from the store in the shape of the provided\n * GraphQL fragment without making a network request. This method will read a\n * GraphQL fragment from any arbitrary id that is currently cached, unlike\n * `readQuery` which will only read from the root query.\n *\n * You must pass in a GraphQL document with a single fragment or a document\n * with multiple fragments that represent what you are reading. If you pass\n * in a document with multiple fragments then you must also specify a\n * `fragmentName`.\n *\n * @param optimistic - Set to `true` to allow `readFragment` to return\n * optimistic results. Is `false` by default.\n */\n ApolloClient.prototype.readFragment = function (options, optimistic) {\n if (optimistic === void 0) { optimistic = false; }\n return this.cache.readFragment(options, optimistic);\n };\n /**\n * Writes some data in the shape of the provided GraphQL query directly to\n * the store. This method will start at the root query. To start at a\n * specific id returned by `dataIdFromObject` then use `writeFragment`.\n */\n ApolloClient.prototype.writeQuery = function (options) {\n var ref = this.cache.writeQuery(options);\n if (options.broadcast !== false) {\n this.queryManager.broadcastQueries();\n }\n return ref;\n };\n /**\n * Writes some data in the shape of the provided GraphQL fragment directly to\n * the store. This method will write to a GraphQL fragment from any arbitrary\n * id that is currently cached, unlike `writeQuery` which will only write\n * from the root query.\n *\n * You must pass in a GraphQL document with a single fragment or a document\n * with multiple fragments that represent what you are writing. If you pass\n * in a document with multiple fragments then you must also specify a\n * `fragmentName`.\n */\n ApolloClient.prototype.writeFragment = function (options) {\n var ref = this.cache.writeFragment(options);\n if (options.broadcast !== false) {\n this.queryManager.broadcastQueries();\n }\n return ref;\n };\n ApolloClient.prototype.__actionHookForDevTools = function (cb) {\n this.devToolsHookCb = cb;\n };\n ApolloClient.prototype.__requestRaw = function (payload) {\n return execute(this.link, payload);\n };\n /**\n * Resets your entire store by clearing out your cache and then re-executing\n * all of your active queries. This makes it so that you may guarantee that\n * there is no data left in your store from a time before you called this\n * method.\n *\n * `resetStore()` is useful when your user just logged out. You’ve removed the\n * user session, and you now want to make sure that any references to data you\n * might have fetched while the user session was active is gone.\n *\n * It is important to remember that `resetStore()` *will* refetch any active\n * queries. This means that any components that might be mounted will execute\n * their queries again using your network interface. If you do not want to\n * re-execute any queries then you should make sure to stop watching any\n * active queries.\n */\n ApolloClient.prototype.resetStore = function () {\n var _this = this;\n return Promise.resolve()\n .then(function () {\n return _this.queryManager.clearStore({\n discardWatches: false,\n });\n })\n .then(function () { return Promise.all(_this.resetStoreCallbacks.map(function (fn) { return fn(); })); })\n .then(function () { return _this.reFetchObservableQueries(); });\n };\n /**\n * Remove all data from the store. Unlike `resetStore`, `clearStore` will\n * not refetch any active queries.\n */\n ApolloClient.prototype.clearStore = function () {\n var _this = this;\n return Promise.resolve()\n .then(function () {\n return _this.queryManager.clearStore({\n discardWatches: true,\n });\n })\n .then(function () { return Promise.all(_this.clearStoreCallbacks.map(function (fn) { return fn(); })); });\n };\n /**\n * Allows callbacks to be registered that are executed when the store is\n * reset. `onResetStore` returns an unsubscribe function that can be used\n * to remove registered callbacks.\n */\n ApolloClient.prototype.onResetStore = function (cb) {\n var _this = this;\n this.resetStoreCallbacks.push(cb);\n return function () {\n _this.resetStoreCallbacks = _this.resetStoreCallbacks.filter(function (c) { return c !== cb; });\n };\n };\n /**\n * Allows callbacks to be registered that are executed when the store is\n * cleared. `onClearStore` returns an unsubscribe function that can be used\n * to remove registered callbacks.\n */\n ApolloClient.prototype.onClearStore = function (cb) {\n var _this = this;\n this.clearStoreCallbacks.push(cb);\n return function () {\n _this.clearStoreCallbacks = _this.clearStoreCallbacks.filter(function (c) { return c !== cb; });\n };\n };\n /**\n * Refetches all of your active queries.\n *\n * `reFetchObservableQueries()` is useful if you want to bring the client back to proper state in case of a network outage\n *\n * It is important to remember that `reFetchObservableQueries()` *will* refetch any active\n * queries. This means that any components that might be mounted will execute\n * their queries again using your network interface. If you do not want to\n * re-execute any queries then you should make sure to stop watching any\n * active queries.\n * Takes optional parameter `includeStandby` which will include queries in standby-mode when refetching.\n */\n ApolloClient.prototype.reFetchObservableQueries = function (includeStandby) {\n return this.queryManager.reFetchObservableQueries(includeStandby);\n };\n /**\n * Refetches specified active queries. Similar to "reFetchObservableQueries()" but with a specific list of queries.\n *\n * `refetchQueries()` is useful for use cases to imperatively refresh a selection of queries.\n *\n * It is important to remember that `refetchQueries()` *will* refetch specified active\n * queries. This means that any components that might be mounted will execute\n * their queries again using your network interface. If you do not want to\n * re-execute any queries then you should make sure to stop watching any\n * active queries.\n */\n ApolloClient.prototype.refetchQueries = function (options) {\n var map = this.queryManager.refetchQueries(options);\n var queries = [];\n var results = [];\n map.forEach(function (result, obsQuery) {\n queries.push(obsQuery);\n results.push(result);\n });\n var result = Promise.all(results);\n // In case you need the raw results immediately, without awaiting\n // Promise.all(results):\n result.queries = queries;\n result.results = results;\n // If you decide to ignore the result Promise because you\'re using\n // result.queries and result.results instead, you shouldn\'t have to worry\n // about preventing uncaught rejections for the Promise.all result.\n result.catch(function (error) {\n globalThis.__DEV__ !== false && globals/* invariant */.V1.debug(17, error);\n });\n return result;\n };\n /**\n * Get all currently active `ObservableQuery` objects, in a `Map` keyed by\n * query ID strings.\n *\n * An "active" query is one that has observers and a `fetchPolicy` other than\n * "standby" or "cache-only".\n *\n * You can include all `ObservableQuery` objects (including the inactive ones)\n * by passing "all" instead of "active", or you can include just a subset of\n * active queries by passing an array of query names or DocumentNode objects.\n */\n ApolloClient.prototype.getObservableQueries = function (include) {\n if (include === void 0) { include = "active"; }\n return this.queryManager.getObservableQueries(include);\n };\n /**\n * Exposes the cache\'s complete state, in a serializable format for later restoration.\n */\n ApolloClient.prototype.extract = function (optimistic) {\n return this.cache.extract(optimistic);\n };\n /**\n * Replaces existing state in the cache (if any) with the values expressed by\n * `serializedState`.\n *\n * Called when hydrating a cache (server side rendering, or offline storage),\n * and also (potentially) during hot reloads.\n */\n ApolloClient.prototype.restore = function (serializedState) {\n return this.cache.restore(serializedState);\n };\n /**\n * Add additional local resolvers.\n */\n ApolloClient.prototype.addResolvers = function (resolvers) {\n this.localState.addResolvers(resolvers);\n };\n /**\n * Set (override existing) local resolvers.\n */\n ApolloClient.prototype.setResolvers = function (resolvers) {\n this.localState.setResolvers(resolvers);\n };\n /**\n * Get all registered local resolvers.\n */\n ApolloClient.prototype.getResolvers = function () {\n return this.localState.getResolvers();\n };\n /**\n * Set a custom local state fragment matcher.\n */\n ApolloClient.prototype.setLocalStateFragmentMatcher = function (fragmentMatcher) {\n this.localState.setFragmentMatcher(fragmentMatcher);\n };\n /**\n * Define a new ApolloLink (or link chain) that Apollo Client will use.\n */\n ApolloClient.prototype.setLink = function (newLink) {\n this.link = this.queryManager.link = newLink;\n };\n Object.defineProperty(ApolloClient.prototype, "defaultContext", {\n get: function () {\n return this.queryManager.defaultContext;\n },\n enumerable: false,\n configurable: true\n });\n return ApolloClient;\n}());\n\nif (globalThis.__DEV__ !== false) {\n ApolloClient.prototype.getMemoryInternals = getMemoryInternals/* getApolloClientMemoryInternals */.ep;\n}\n//# sourceMappingURL=ApolloClient.js.map\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@apollo/client/core/ApolloClient.js_+_12_modules?', + ); + + /***/ + }, + + /***/ 9080: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ a: () => (/* binding */ equalByQuery)\n/* harmony export */ });\n/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1635);\n/* harmony import */ var _wry_equality__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5381);\n/* harmony import */ var _utilities_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4824);\n/* harmony import */ var _utilities_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(5215);\n/* harmony import */ var _utilities_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(1250);\n/* harmony import */ var _utilities_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(7194);\n\n\n\n// Returns true if aResult and bResult are deeply equal according to the fields\n// selected by the given query, ignoring any fields marked as @nonreactive.\nfunction equalByQuery(query, _a, _b, variables) {\n var aData = _a.data, aRest = (0,tslib__WEBPACK_IMPORTED_MODULE_1__/* .__rest */ .Tt)(_a, ["data"]);\n var bData = _b.data, bRest = (0,tslib__WEBPACK_IMPORTED_MODULE_1__/* .__rest */ .Tt)(_b, ["data"]);\n return ((0,_wry_equality__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(aRest, bRest) &&\n equalBySelectionSet((0,_utilities_index_js__WEBPACK_IMPORTED_MODULE_2__/* .getMainDefinition */ .Vn)(query).selectionSet, aData, bData, {\n fragmentMap: (0,_utilities_index_js__WEBPACK_IMPORTED_MODULE_3__/* .createFragmentMap */ .JG)((0,_utilities_index_js__WEBPACK_IMPORTED_MODULE_2__/* .getFragmentDefinitions */ .zK)(query)),\n variables: variables,\n }));\n}\nfunction equalBySelectionSet(selectionSet, aResult, bResult, context) {\n if (aResult === bResult) {\n return true;\n }\n var seenSelections = new Set();\n // Returning true from this Array.prototype.every callback function skips the\n // current field/subtree. Returning false aborts the entire traversal\n // immediately, causing equalBySelectionSet to return false.\n return selectionSet.selections.every(function (selection) {\n // Avoid re-processing the same selection at the same level of recursion, in\n // case the same field gets included via multiple indirect fragment spreads.\n if (seenSelections.has(selection))\n return true;\n seenSelections.add(selection);\n // Ignore @skip(if: true) and @include(if: false) fields.\n if (!(0,_utilities_index_js__WEBPACK_IMPORTED_MODULE_4__/* .shouldInclude */ .MS)(selection, context.variables))\n return true;\n // If the field or (named) fragment spread has a @nonreactive directive on\n // it, we don\'t care if it\'s different, so we pretend it\'s the same.\n if (selectionHasNonreactiveDirective(selection))\n return true;\n if ((0,_utilities_index_js__WEBPACK_IMPORTED_MODULE_5__/* .isField */ .dt)(selection)) {\n var resultKey = (0,_utilities_index_js__WEBPACK_IMPORTED_MODULE_5__/* .resultKeyNameFromField */ .ue)(selection);\n var aResultChild = aResult && aResult[resultKey];\n var bResultChild = bResult && bResult[resultKey];\n var childSelectionSet = selection.selectionSet;\n if (!childSelectionSet) {\n // These are scalar values, so we can compare them with deep equal\n // without redoing the main recursive work.\n return (0,_wry_equality__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(aResultChild, bResultChild);\n }\n var aChildIsArray = Array.isArray(aResultChild);\n var bChildIsArray = Array.isArray(bResultChild);\n if (aChildIsArray !== bChildIsArray)\n return false;\n if (aChildIsArray && bChildIsArray) {\n var length_1 = aResultChild.length;\n if (bResultChild.length !== length_1) {\n return false;\n }\n for (var i = 0; i < length_1; ++i) {\n if (!equalBySelectionSet(childSelectionSet, aResultChild[i], bResultChild[i], context)) {\n return false;\n }\n }\n return true;\n }\n return equalBySelectionSet(childSelectionSet, aResultChild, bResultChild, context);\n }\n else {\n var fragment = (0,_utilities_index_js__WEBPACK_IMPORTED_MODULE_3__/* .getFragmentFromSelection */ .HQ)(selection, context.fragmentMap);\n if (fragment) {\n // The fragment might === selection if it\'s an inline fragment, but\n // could be !== if it\'s a named fragment ...spread.\n if (selectionHasNonreactiveDirective(fragment))\n return true;\n return equalBySelectionSet(fragment.selectionSet, \n // Notice that we reuse the same aResult and bResult values here,\n // since the fragment ...spread does not specify a field name, but\n // consists of multiple fields (within the fragment\'s selection set)\n // that should be applied to the current result value(s).\n aResult, bResult, context);\n }\n }\n });\n}\nfunction selectionHasNonreactiveDirective(selection) {\n return (!!selection.directives && selection.directives.some(directiveIsNonreactive));\n}\nfunction directiveIsNonreactive(dir) {\n return dir.name.value === "nonreactive";\n}\n//# sourceMappingURL=equalByQuery.js.map\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@apollo/client/core/equalByQuery.js?', + ); + + /***/ + }, + + /***/ 8599: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ bi: () => (/* binding */ isNetworkRequestInFlight),\n/* harmony export */ pT: () => (/* binding */ NetworkStatus)\n/* harmony export */ });\n/* unused harmony export isNetworkRequestSettled */\n/**\n * The current status of a query’s execution in our system.\n */\nvar NetworkStatus;\n(function (NetworkStatus) {\n /**\n * The query has never been run before and the query is now currently running. A query will still\n * have this network status even if a partial data result was returned from the cache, but a\n * query was dispatched anyway.\n */\n NetworkStatus[NetworkStatus["loading"] = 1] = "loading";\n /**\n * If `setVariables` was called and a query was fired because of that then the network status\n * will be `setVariables` until the result of that query comes back.\n */\n NetworkStatus[NetworkStatus["setVariables"] = 2] = "setVariables";\n /**\n * Indicates that `fetchMore` was called on this query and that the query created is currently in\n * flight.\n */\n NetworkStatus[NetworkStatus["fetchMore"] = 3] = "fetchMore";\n /**\n * Similar to the `setVariables` network status. It means that `refetch` was called on a query\n * and the refetch request is currently in flight.\n */\n NetworkStatus[NetworkStatus["refetch"] = 4] = "refetch";\n /**\n * Indicates that a polling query is currently in flight. So for example if you are polling a\n * query every 10 seconds then the network status will switch to `poll` every 10 seconds whenever\n * a poll request has been sent but not resolved.\n */\n NetworkStatus[NetworkStatus["poll"] = 6] = "poll";\n /**\n * No request is in flight for this query, and no errors happened. Everything is OK.\n */\n NetworkStatus[NetworkStatus["ready"] = 7] = "ready";\n /**\n * No request is in flight for this query, but one or more errors were detected.\n */\n NetworkStatus[NetworkStatus["error"] = 8] = "error";\n})(NetworkStatus || (NetworkStatus = {}));\n/**\n * Returns true if there is currently a network request in flight according to a given network\n * status.\n */\nfunction isNetworkRequestInFlight(networkStatus) {\n return networkStatus ? networkStatus < 7 : false;\n}\n/**\n * Returns true if the network request is in ready or error state according to a given network\n * status.\n */\nfunction isNetworkRequestSettled(networkStatus) {\n return networkStatus === 7 || networkStatus === 8;\n}\n//# sourceMappingURL=networkStatus.js.map\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@apollo/client/core/networkStatus.js?', + ); + + /***/ + }, + + /***/ 9211: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ K$: () => (/* binding */ PROTOCOL_ERRORS_SYMBOL),\n/* harmony export */ K4: () => (/* binding */ ApolloError),\n/* harmony export */ Mn: () => (/* binding */ isApolloError),\n/* harmony export */ uR: () => (/* binding */ graphQLResultHasProtocolErrors)\n/* harmony export */ });\n/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1635);\n/* harmony import */ var _utilities_globals_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6319);\n/* harmony import */ var _utilities_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2456);\n\n\n\n// This Symbol allows us to pass transport-specific errors from the link chain\n// into QueryManager/client internals without risking a naming collision within\n// extensions (which implementers can use as they see fit).\nvar PROTOCOL_ERRORS_SYMBOL = Symbol();\nfunction graphQLResultHasProtocolErrors(result) {\n if (result.extensions) {\n return Array.isArray(result.extensions[PROTOCOL_ERRORS_SYMBOL]);\n }\n return false;\n}\nfunction isApolloError(err) {\n return err.hasOwnProperty("graphQLErrors");\n}\n// Sets the error message on this error according to the\n// the GraphQL and network errors that are present.\n// If the error message has already been set through the\n// constructor or otherwise, this function is a nop.\nvar generateErrorMessage = function (err) {\n var errors = (0,tslib__WEBPACK_IMPORTED_MODULE_1__/* .__spreadArray */ .fX)((0,tslib__WEBPACK_IMPORTED_MODULE_1__/* .__spreadArray */ .fX)((0,tslib__WEBPACK_IMPORTED_MODULE_1__/* .__spreadArray */ .fX)([], err.graphQLErrors, true), err.clientErrors, true), err.protocolErrors, true);\n if (err.networkError)\n errors.push(err.networkError);\n return (errors\n // The rest of the code sometimes unsafely types non-Error objects as GraphQLErrors\n .map(function (err) {\n return ((0,_utilities_index_js__WEBPACK_IMPORTED_MODULE_2__/* .isNonNullObject */ .U)(err) && err.message) || "Error message not found.";\n })\n .join("\\n"));\n};\nvar ApolloError = /** @class */ (function (_super) {\n (0,tslib__WEBPACK_IMPORTED_MODULE_1__/* .__extends */ .C6)(ApolloError, _super);\n // Constructs an instance of ApolloError given a GraphQLError\n // or a network error. Note that one of these has to be a valid\n // value or the constructed error will be meaningless.\n function ApolloError(_a) {\n var graphQLErrors = _a.graphQLErrors, protocolErrors = _a.protocolErrors, clientErrors = _a.clientErrors, networkError = _a.networkError, errorMessage = _a.errorMessage, extraInfo = _a.extraInfo;\n var _this = _super.call(this, errorMessage) || this;\n _this.name = "ApolloError";\n _this.graphQLErrors = graphQLErrors || [];\n _this.protocolErrors = protocolErrors || [];\n _this.clientErrors = clientErrors || [];\n _this.networkError = networkError || null;\n _this.message = errorMessage || generateErrorMessage(_this);\n _this.extraInfo = extraInfo;\n // We\'re not using `Object.setPrototypeOf` here as it isn\'t fully\n // supported on Android (see issue #3236).\n _this.__proto__ = ApolloError.prototype;\n return _this;\n }\n return ApolloError;\n}(Error));\n\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@apollo/client/errors/index.js?', + ); + + /***/ + }, + + /***/ 1188: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '\n// EXPORTS\n__webpack_require__.d(__webpack_exports__, {\n C: () => (/* binding */ ApolloLink)\n});\n\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/globals/index.js + 4 modules\nvar globals = __webpack_require__(6319);\n// EXTERNAL MODULE: ./node_modules/zen-observable-ts/module.js\nvar zen_observable_ts_module = __webpack_require__(3401);\n// EXTERNAL MODULE: ./node_modules/tslib/tslib.es6.mjs\nvar tslib_es6 = __webpack_require__(1635);\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/link/utils/createOperation.js\n\nfunction createOperation(starting, operation) {\n var context = (0,tslib_es6/* __assign */.Cl)({}, starting);\n var setContext = function (next) {\n if (typeof next === "function") {\n context = (0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, context), next(context));\n }\n else {\n context = (0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, context), next);\n }\n };\n var getContext = function () { return ((0,tslib_es6/* __assign */.Cl)({}, context)); };\n Object.defineProperty(operation, "setContext", {\n enumerable: false,\n value: setContext,\n });\n Object.defineProperty(operation, "getContext", {\n enumerable: false,\n value: getContext,\n });\n return operation;\n}\n//# sourceMappingURL=createOperation.js.map\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/graphql/getFromAST.js\nvar getFromAST = __webpack_require__(4824);\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/link/utils/transformOperation.js\n\nfunction transformOperation(operation) {\n var transformedOperation = {\n variables: operation.variables || {},\n extensions: operation.extensions || {},\n operationName: operation.operationName,\n query: operation.query,\n };\n // Best guess at an operation name\n if (!transformedOperation.operationName) {\n transformedOperation.operationName =\n typeof transformedOperation.query !== "string" ?\n (0,getFromAST/* getOperationName */.n4)(transformedOperation.query) || undefined\n : "";\n }\n return transformedOperation;\n}\n//# sourceMappingURL=transformOperation.js.map\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/link/utils/validateOperation.js\n\nfunction validateOperation(operation) {\n var OPERATION_FIELDS = [\n "query",\n "operationName",\n "variables",\n "extensions",\n "context",\n ];\n for (var _i = 0, _a = Object.keys(operation); _i < _a.length; _i++) {\n var key = _a[_i];\n if (OPERATION_FIELDS.indexOf(key) < 0) {\n throw (0,globals/* newInvariantError */.vA)(43, key);\n }\n }\n return operation;\n}\n//# sourceMappingURL=validateOperation.js.map\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/link/core/ApolloLink.js\n\n\n\nfunction passthrough(op, forward) {\n return (forward ? forward(op) : zen_observable_ts_module/* Observable */.c.of());\n}\nfunction toLink(handler) {\n return typeof handler === "function" ? new ApolloLink(handler) : handler;\n}\nfunction isTerminating(link) {\n return link.request.length <= 1;\n}\nvar ApolloLink = /** @class */ (function () {\n function ApolloLink(request) {\n if (request)\n this.request = request;\n }\n ApolloLink.empty = function () {\n return new ApolloLink(function () { return zen_observable_ts_module/* Observable */.c.of(); });\n };\n ApolloLink.from = function (links) {\n if (links.length === 0)\n return ApolloLink.empty();\n return links.map(toLink).reduce(function (x, y) { return x.concat(y); });\n };\n ApolloLink.split = function (test, left, right) {\n var leftLink = toLink(left);\n var rightLink = toLink(right || new ApolloLink(passthrough));\n var ret;\n if (isTerminating(leftLink) && isTerminating(rightLink)) {\n ret = new ApolloLink(function (operation) {\n return test(operation) ?\n leftLink.request(operation) || zen_observable_ts_module/* Observable */.c.of()\n : rightLink.request(operation) || zen_observable_ts_module/* Observable */.c.of();\n });\n }\n else {\n ret = new ApolloLink(function (operation, forward) {\n return test(operation) ?\n leftLink.request(operation, forward) || zen_observable_ts_module/* Observable */.c.of()\n : rightLink.request(operation, forward) || zen_observable_ts_module/* Observable */.c.of();\n });\n }\n return Object.assign(ret, { left: leftLink, right: rightLink });\n };\n ApolloLink.execute = function (link, operation) {\n return (link.request(createOperation(operation.context, transformOperation(validateOperation(operation)))) || zen_observable_ts_module/* Observable */.c.of());\n };\n ApolloLink.concat = function (first, second) {\n var firstLink = toLink(first);\n if (isTerminating(firstLink)) {\n globalThis.__DEV__ !== false && globals/* invariant */.V1.warn(35, firstLink);\n return firstLink;\n }\n var nextLink = toLink(second);\n var ret;\n if (isTerminating(nextLink)) {\n ret = new ApolloLink(function (operation) {\n return firstLink.request(operation, function (op) { return nextLink.request(op) || zen_observable_ts_module/* Observable */.c.of(); }) || zen_observable_ts_module/* Observable */.c.of();\n });\n }\n else {\n ret = new ApolloLink(function (operation, forward) {\n return (firstLink.request(operation, function (op) {\n return nextLink.request(op, forward) || zen_observable_ts_module/* Observable */.c.of();\n }) || zen_observable_ts_module/* Observable */.c.of());\n });\n }\n return Object.assign(ret, { left: firstLink, right: nextLink });\n };\n ApolloLink.prototype.split = function (test, left, right) {\n return this.concat(ApolloLink.split(test, left, right || new ApolloLink(passthrough)));\n };\n ApolloLink.prototype.concat = function (next) {\n return ApolloLink.concat(this, next);\n };\n ApolloLink.prototype.request = function (operation, forward) {\n throw (0,globals/* newInvariantError */.vA)(36);\n };\n ApolloLink.prototype.onError = function (error, observer) {\n if (observer && observer.error) {\n observer.error(error);\n // Returning false indicates that observer.error does not need to be\n // called again, since it was already called (on the previous line).\n // Calling observer.error again would not cause any real problems,\n // since only the first call matters, but custom onError functions\n // might have other reasons for wanting to prevent the default\n // behavior by returning false.\n return false;\n }\n // Throw errors will be passed to observer.error.\n throw error;\n };\n ApolloLink.prototype.setOnError = function (fn) {\n this.onError = fn;\n return this;\n };\n return ApolloLink;\n}());\n\n//# sourceMappingURL=ApolloLink.js.map\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@apollo/client/link/core/ApolloLink.js_+_3_modules?', + ); + + /***/ + }, + + /***/ 4132: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '\n// EXPORTS\n__webpack_require__.d(__webpack_exports__, {\n $: () => (/* binding */ createHttpLink)\n});\n\n// EXTERNAL MODULE: ./node_modules/tslib/tslib.es6.mjs\nvar tslib_es6 = __webpack_require__(1635);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/globals/index.js + 4 modules\nvar globals = __webpack_require__(6319);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/link/core/ApolloLink.js + 3 modules\nvar ApolloLink = __webpack_require__(1188);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/graphql/directives.js\nvar directives = __webpack_require__(1250);\n// EXTERNAL MODULE: ./node_modules/zen-observable-ts/module.js\nvar zen_observable_ts_module = __webpack_require__(3401);\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/link/http/serializeFetchParameter.js\n\nvar serializeFetchParameter = function (p, label) {\n var serialized;\n try {\n serialized = JSON.stringify(p);\n }\n catch (e) {\n var parseError = (0,globals/* newInvariantError */.vA)(39, label, e.message);\n parseError.parseError = e;\n throw parseError;\n }\n return serialized;\n};\n//# sourceMappingURL=serializeFetchParameter.js.map\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/link/http/selectURI.js\nvar selectURI = function (operation, fallbackURI) {\n var context = operation.getContext();\n var contextURI = context.uri;\n if (contextURI) {\n return contextURI;\n }\n else if (typeof fallbackURI === "function") {\n return fallbackURI(operation);\n }\n else {\n return fallbackURI || "/graphql";\n }\n};\n//# sourceMappingURL=selectURI.js.map\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/common/canUse.js\nvar canUse = __webpack_require__(2619);\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/link/http/iterators/async.js\n/**\n * Original source:\n * https://github.com/kmalakoff/response-iterator/blob/master/src/iterators/async.ts\n */\nfunction asyncIterator(source) {\n var _a;\n var iterator = source[Symbol.asyncIterator]();\n return _a = {\n next: function () {\n return iterator.next();\n }\n },\n _a[Symbol.asyncIterator] = function () {\n return this;\n },\n _a;\n}\n//# sourceMappingURL=async.js.map\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/link/http/iterators/nodeStream.js\n/**\n * Original source:\n * https://github.com/kmalakoff/response-iterator/blob/master/src/iterators/nodeStream.ts\n */\n\nfunction nodeStreamIterator(stream) {\n var cleanup = null;\n var error = null;\n var done = false;\n var data = [];\n var waiting = [];\n function onData(chunk) {\n if (error)\n return;\n if (waiting.length) {\n var shiftedArr = waiting.shift();\n if (Array.isArray(shiftedArr) && shiftedArr[0]) {\n return shiftedArr[0]({ value: chunk, done: false });\n }\n }\n data.push(chunk);\n }\n function onError(err) {\n error = err;\n var all = waiting.slice();\n all.forEach(function (pair) {\n pair[1](err);\n });\n !cleanup || cleanup();\n }\n function onEnd() {\n done = true;\n var all = waiting.slice();\n all.forEach(function (pair) {\n pair[0]({ value: undefined, done: true });\n });\n !cleanup || cleanup();\n }\n cleanup = function () {\n cleanup = null;\n stream.removeListener("data", onData);\n stream.removeListener("error", onError);\n stream.removeListener("end", onEnd);\n stream.removeListener("finish", onEnd);\n stream.removeListener("close", onEnd);\n };\n stream.on("data", onData);\n stream.on("error", onError);\n stream.on("end", onEnd);\n stream.on("finish", onEnd);\n stream.on("close", onEnd);\n function getNext() {\n return new Promise(function (resolve, reject) {\n if (error)\n return reject(error);\n if (data.length)\n return resolve({ value: data.shift(), done: false });\n if (done)\n return resolve({ value: undefined, done: true });\n waiting.push([resolve, reject]);\n });\n }\n var iterator = {\n next: function () {\n return getNext();\n },\n };\n if (canUse/* canUseAsyncIteratorSymbol */.uJ) {\n iterator[Symbol.asyncIterator] = function () {\n return this;\n };\n }\n return iterator;\n}\n//# sourceMappingURL=nodeStream.js.map\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/link/http/iterators/promise.js\n/**\n * Original source:\n * https://github.com/kmalakoff/response-iterator/blob/master/src/iterators/promise.ts\n */\n\nfunction promiseIterator(promise) {\n var resolved = false;\n var iterator = {\n next: function () {\n if (resolved)\n return Promise.resolve({\n value: undefined,\n done: true,\n });\n resolved = true;\n return new Promise(function (resolve, reject) {\n promise\n .then(function (value) {\n resolve({ value: value, done: false });\n })\n .catch(reject);\n });\n },\n };\n if (canUse/* canUseAsyncIteratorSymbol */.uJ) {\n iterator[Symbol.asyncIterator] = function () {\n return this;\n };\n }\n return iterator;\n}\n//# sourceMappingURL=promise.js.map\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/link/http/iterators/reader.js\n/**\n * Original source:\n * https://github.com/kmalakoff/response-iterator/blob/master/src/iterators/reader.ts\n */\n\nfunction readerIterator(reader) {\n var iterator = {\n next: function () {\n return reader.read();\n },\n };\n if (canUse/* canUseAsyncIteratorSymbol */.uJ) {\n iterator[Symbol.asyncIterator] = function () {\n return this;\n };\n }\n return iterator;\n}\n//# sourceMappingURL=reader.js.map\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/link/http/responseIterator.js\n/**\n * Original source:\n * https://github.com/kmalakoff/response-iterator/blob/master/src/index.ts\n */\n\n\n\n\n\nfunction isNodeResponse(value) {\n return !!value.body;\n}\nfunction isReadableStream(value) {\n return !!value.getReader;\n}\nfunction isAsyncIterableIterator(value) {\n return !!(canUse/* canUseAsyncIteratorSymbol */.uJ &&\n value[Symbol.asyncIterator]);\n}\nfunction isStreamableBlob(value) {\n return !!value.stream;\n}\nfunction isBlob(value) {\n return !!value.arrayBuffer;\n}\nfunction isNodeReadableStream(value) {\n return !!value.pipe;\n}\nfunction responseIterator(response) {\n var body = response;\n if (isNodeResponse(response))\n body = response.body;\n if (isAsyncIterableIterator(body))\n return asyncIterator(body);\n if (isReadableStream(body))\n return readerIterator(body.getReader());\n // this errors without casting to ReadableStream<T>\n // because Blob.stream() returns a NodeJS ReadableStream\n if (isStreamableBlob(body)) {\n return readerIterator(body.stream().getReader());\n }\n if (isBlob(body))\n return promiseIterator(body.arrayBuffer());\n if (isNodeReadableStream(body))\n return nodeStreamIterator(body);\n throw new Error("Unknown body type for responseIterator. Please pass a streamable response.");\n}\n//# sourceMappingURL=responseIterator.js.map\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/link/utils/throwServerError.js\nvar throwServerError = function (response, result, message) {\n var error = new Error(message);\n error.name = "ServerError";\n error.response = response;\n error.statusCode = response.status;\n error.result = result;\n throw error;\n};\n//# sourceMappingURL=throwServerError.js.map\n// EXTERNAL MODULE: ./node_modules/@apollo/client/errors/index.js\nvar errors = __webpack_require__(9211);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/common/incrementalResult.js\nvar incrementalResult = __webpack_require__(6453);\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/link/http/parseAndCheckHttpResponse.js\n\n\n\n\n\nvar parseAndCheckHttpResponse_hasOwnProperty = Object.prototype.hasOwnProperty;\nfunction readMultipartBody(response, nextValue) {\n return (0,tslib_es6/* __awaiter */.sH)(this, void 0, void 0, function () {\n var decoder, contentType, delimiter, boundaryVal, boundary, buffer, iterator, running, _a, value, done, chunk, searchFrom, bi, message, i, headers, contentType_1, body, result, next;\n var _b, _c;\n var _d;\n return (0,tslib_es6/* __generator */.YH)(this, function (_e) {\n switch (_e.label) {\n case 0:\n if (TextDecoder === undefined) {\n throw new Error("TextDecoder must be defined in the environment: please import a polyfill.");\n }\n decoder = new TextDecoder("utf-8");\n contentType = (_d = response.headers) === null || _d === void 0 ? void 0 : _d.get("content-type");\n delimiter = "boundary=";\n boundaryVal = (contentType === null || contentType === void 0 ? void 0 : contentType.includes(delimiter)) ?\n contentType === null || contentType === void 0 ? void 0 : contentType.substring((contentType === null || contentType === void 0 ? void 0 : contentType.indexOf(delimiter)) + delimiter.length).replace(/[\'"]/g, "").replace(/\\;(.*)/gm, "").trim()\n : "-";\n boundary = "\\r\\n--".concat(boundaryVal);\n buffer = "";\n iterator = responseIterator(response);\n running = true;\n _e.label = 1;\n case 1:\n if (!running) return [3 /*break*/, 3];\n return [4 /*yield*/, iterator.next()];\n case 2:\n _a = _e.sent(), value = _a.value, done = _a.done;\n chunk = typeof value === "string" ? value : decoder.decode(value);\n searchFrom = buffer.length - boundary.length + 1;\n running = !done;\n buffer += chunk;\n bi = buffer.indexOf(boundary, searchFrom);\n while (bi > -1) {\n message = void 0;\n _b = [\n buffer.slice(0, bi),\n buffer.slice(bi + boundary.length),\n ], message = _b[0], buffer = _b[1];\n i = message.indexOf("\\r\\n\\r\\n");\n headers = parseHeaders(message.slice(0, i));\n contentType_1 = headers["content-type"];\n if (contentType_1 &&\n contentType_1.toLowerCase().indexOf("application/json") === -1) {\n throw new Error("Unsupported patch content type: application/json is required.");\n }\n body = message.slice(i);\n if (body) {\n result = parseJsonBody(response, body);\n if (Object.keys(result).length > 1 ||\n "data" in result ||\n "incremental" in result ||\n "errors" in result ||\n "payload" in result) {\n if ((0,incrementalResult/* isApolloPayloadResult */.Nw)(result)) {\n next = {};\n if ("payload" in result) {\n if (Object.keys(result).length === 1 && result.payload === null) {\n return [2 /*return*/];\n }\n next = (0,tslib_es6/* __assign */.Cl)({}, result.payload);\n }\n if ("errors" in result) {\n next = (0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, next), { extensions: (0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, ("extensions" in next ? next.extensions : null)), (_c = {}, _c[errors/* PROTOCOL_ERRORS_SYMBOL */.K$] = result.errors, _c)) });\n }\n nextValue(next);\n }\n else {\n // for the last chunk with only `hasNext: false`\n // we don\'t need to call observer.next as there is no data/errors\n nextValue(result);\n }\n }\n else if (\n // If the chunk contains only a "hasNext: false", we can call\n // observer.complete() immediately.\n Object.keys(result).length === 1 &&\n "hasNext" in result &&\n !result.hasNext) {\n return [2 /*return*/];\n }\n }\n bi = buffer.indexOf(boundary);\n }\n return [3 /*break*/, 1];\n case 3: return [2 /*return*/];\n }\n });\n });\n}\nfunction parseHeaders(headerText) {\n var headersInit = {};\n headerText.split("\\n").forEach(function (line) {\n var i = line.indexOf(":");\n if (i > -1) {\n // normalize headers to lowercase\n var name_1 = line.slice(0, i).trim().toLowerCase();\n var value = line.slice(i + 1).trim();\n headersInit[name_1] = value;\n }\n });\n return headersInit;\n}\nfunction parseJsonBody(response, bodyText) {\n if (response.status >= 300) {\n // Network error\n var getResult = function () {\n try {\n return JSON.parse(bodyText);\n }\n catch (err) {\n return bodyText;\n }\n };\n throwServerError(response, getResult(), "Response not successful: Received status code ".concat(response.status));\n }\n try {\n return JSON.parse(bodyText);\n }\n catch (err) {\n var parseError = err;\n parseError.name = "ServerParseError";\n parseError.response = response;\n parseError.statusCode = response.status;\n parseError.bodyText = bodyText;\n throw parseError;\n }\n}\nfunction handleError(err, observer) {\n // if it is a network error, BUT there is graphql result info fire\n // the next observer before calling error this gives apollo-client\n // (and react-apollo) the `graphqlErrors` and `networkErrors` to\n // pass to UI this should only happen if we *also* have data as\n // part of the response key per the spec\n if (err.result && err.result.errors && err.result.data) {\n // if we don\'t call next, the UI can only show networkError\n // because AC didn\'t get any graphqlErrors this is graphql\n // execution result info (i.e errors and possibly data) this is\n // because there is no formal spec how errors should translate to\n // http status codes. So an auth error (401) could have both data\n // from a public field, errors from a private field, and a status\n // of 401\n // {\n // user { // this will have errors\n // firstName\n // }\n // products { // this is public so will have data\n // cost\n // }\n // }\n //\n // the result of above *could* look like this:\n // {\n // data: { products: [{ cost: "$10" }] },\n // errors: [{\n // message: \'your session has timed out\',\n // path: []\n // }]\n // }\n // status code of above would be a 401\n // in the UI you want to show data where you can, errors as data where you can\n // and use correct http status codes\n observer.next(err.result);\n }\n observer.error(err);\n}\nfunction parseAndCheckHttpResponse(operations) {\n return function (response) {\n return response\n .text()\n .then(function (bodyText) { return parseJsonBody(response, bodyText); })\n .then(function (result) {\n if (!Array.isArray(result) &&\n !parseAndCheckHttpResponse_hasOwnProperty.call(result, "data") &&\n !parseAndCheckHttpResponse_hasOwnProperty.call(result, "errors")) {\n // Data error\n throwServerError(response, result, "Server response was missing for query \'".concat(Array.isArray(operations) ?\n operations.map(function (op) { return op.operationName; })\n : operations.operationName, "\'."));\n }\n return result;\n });\n };\n}\n//# sourceMappingURL=parseAndCheckHttpResponse.js.map\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/link/http/checkFetcher.js\n\nvar checkFetcher = function (fetcher) {\n if (!fetcher && typeof fetch === "undefined") {\n throw (0,globals/* newInvariantError */.vA)(37);\n }\n};\n//# sourceMappingURL=checkFetcher.js.map\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/graphql/print.js + 2 modules\nvar print = __webpack_require__(2417);\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/link/http/selectHttpOptionsAndBody.js\n\n\nvar defaultHttpOptions = {\n includeQuery: true,\n includeExtensions: false,\n preserveHeaderCase: false,\n};\nvar defaultHeaders = {\n // headers are case insensitive (https://stackoverflow.com/a/5259004)\n accept: "*/*",\n // The content-type header describes the type of the body of the request, and\n // so it typically only is sent with requests that actually have bodies. One\n // could imagine that Apollo Client would remove this header when constructing\n // a GET request (which has no body), but we historically have not done that.\n // This means that browsers will preflight all Apollo Client requests (even\n // GET requests). Apollo Server\'s CSRF prevention feature (introduced in\n // AS3.7) takes advantage of this fact and does not block requests with this\n // header. If you want to drop this header from GET requests, then you should\n // probably replace it with a `apollo-require-preflight` header, or servers\n // with CSRF prevention enabled might block your GET request. See\n // https://www.apollographql.com/docs/apollo-server/security/cors/#preventing-cross-site-request-forgery-csrf\n // for more details.\n "content-type": "application/json",\n};\nvar defaultOptions = {\n method: "POST",\n};\nvar fallbackHttpConfig = {\n http: defaultHttpOptions,\n headers: defaultHeaders,\n options: defaultOptions,\n};\nvar defaultPrinter = function (ast, printer) { return printer(ast); };\nfunction selectHttpOptionsAndBody(operation, fallbackConfig) {\n var configs = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n configs[_i - 2] = arguments[_i];\n }\n configs.unshift(fallbackConfig);\n return selectHttpOptionsAndBodyInternal.apply(void 0, __spreadArray([operation,\n defaultPrinter], configs, false));\n}\nfunction selectHttpOptionsAndBodyInternal(operation, printer) {\n var configs = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n configs[_i - 2] = arguments[_i];\n }\n var options = {};\n var http = {};\n configs.forEach(function (config) {\n options = (0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, options), config.options), { headers: (0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, options.headers), config.headers) });\n if (config.credentials) {\n options.credentials = config.credentials;\n }\n http = (0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, http), config.http);\n });\n if (options.headers) {\n options.headers = removeDuplicateHeaders(options.headers, http.preserveHeaderCase);\n }\n //The body depends on the http options\n var operationName = operation.operationName, extensions = operation.extensions, variables = operation.variables, query = operation.query;\n var body = { operationName: operationName, variables: variables };\n if (http.includeExtensions)\n body.extensions = extensions;\n // not sending the query (i.e persisted queries)\n if (http.includeQuery)\n body.query = printer(query, print/* print */.y);\n return {\n options: options,\n body: body,\n };\n}\n// Remove potential duplicate header names, preserving last (by insertion order).\n// This is done to prevent unintentionally duplicating a header instead of\n// overwriting it (See #8447 and #8449).\nfunction removeDuplicateHeaders(headers, preserveHeaderCase) {\n // If we\'re not preserving the case, just remove duplicates w/ normalization.\n if (!preserveHeaderCase) {\n var normalizedHeaders_1 = Object.create(null);\n Object.keys(Object(headers)).forEach(function (name) {\n normalizedHeaders_1[name.toLowerCase()] = headers[name];\n });\n return normalizedHeaders_1;\n }\n // If we are preserving the case, remove duplicates w/ normalization,\n // preserving the original name.\n // This allows for non-http-spec-compliant servers that expect intentionally\n // capitalized header names (See #6741).\n var headerData = Object.create(null);\n Object.keys(Object(headers)).forEach(function (name) {\n headerData[name.toLowerCase()] = {\n originalName: name,\n value: headers[name],\n };\n });\n var normalizedHeaders = Object.create(null);\n Object.keys(headerData).forEach(function (name) {\n normalizedHeaders[headerData[name].originalName] = headerData[name].value;\n });\n return normalizedHeaders;\n}\n//# sourceMappingURL=selectHttpOptionsAndBody.js.map\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/link/http/rewriteURIForGET.js\n\n// For GET operations, returns the given URI rewritten with parameters, or a\n// parse error.\nfunction rewriteURIForGET(chosenURI, body) {\n // Implement the standard HTTP GET serialization, plus \'extensions\'. Note\n // the extra level of JSON serialization!\n var queryParams = [];\n var addQueryParam = function (key, value) {\n queryParams.push("".concat(key, "=").concat(encodeURIComponent(value)));\n };\n if ("query" in body) {\n addQueryParam("query", body.query);\n }\n if (body.operationName) {\n addQueryParam("operationName", body.operationName);\n }\n if (body.variables) {\n var serializedVariables = void 0;\n try {\n serializedVariables = serializeFetchParameter(body.variables, "Variables map");\n }\n catch (parseError) {\n return { parseError: parseError };\n }\n addQueryParam("variables", serializedVariables);\n }\n if (body.extensions) {\n var serializedExtensions = void 0;\n try {\n serializedExtensions = serializeFetchParameter(body.extensions, "Extensions map");\n }\n catch (parseError) {\n return { parseError: parseError };\n }\n addQueryParam("extensions", serializedExtensions);\n }\n // Reconstruct the URI with added query params.\n // XXX This assumes that the URI is well-formed and that it doesn\'t\n // already contain any of these query params. We could instead use the\n // URL API and take a polyfill (whatwg-url@6) for older browsers that\n // don\'t support URLSearchParams. Note that some browsers (and\n // versions of whatwg-url) support URL but not URLSearchParams!\n var fragment = "", preFragment = chosenURI;\n var fragmentStart = chosenURI.indexOf("#");\n if (fragmentStart !== -1) {\n fragment = chosenURI.substr(fragmentStart);\n preFragment = chosenURI.substr(0, fragmentStart);\n }\n var queryParamsPrefix = preFragment.indexOf("?") === -1 ? "?" : "&";\n var newURI = preFragment + queryParamsPrefix + queryParams.join("&") + fragment;\n return { newURI: newURI };\n}\n//# sourceMappingURL=rewriteURIForGET.js.map\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/link/utils/fromError.js\n\nfunction fromError(errorValue) {\n return new zen_observable_ts_module/* Observable */.c(function (observer) {\n observer.error(errorValue);\n });\n}\n//# sourceMappingURL=fromError.js.map\n// EXTERNAL MODULE: ./node_modules/graphql/language/visitor.mjs\nvar visitor = __webpack_require__(4705);\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/link/utils/filterOperationVariables.js\n\n\nfunction filterOperationVariables(variables, query) {\n var result = (0,tslib_es6/* __assign */.Cl)({}, variables);\n var unusedNames = new Set(Object.keys(variables));\n (0,visitor/* visit */.YR)(query, {\n Variable: function (node, _key, parent) {\n // A variable type definition at the top level of a query is not\n // enough to silence server-side errors about the variable being\n // unused, so variable definitions do not count as usage.\n // https://spec.graphql.org/draft/#sec-All-Variables-Used\n if (parent &&\n parent.kind !== "VariableDefinition") {\n unusedNames.delete(node.name.value);\n }\n },\n });\n unusedNames.forEach(function (name) {\n delete result[name];\n });\n return result;\n}\n//# sourceMappingURL=filterOperationVariables.js.map\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/graphql/transform.js\nvar transform = __webpack_require__(3902);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/graphql/getFromAST.js\nvar getFromAST = __webpack_require__(4824);\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/link/http/createHttpLink.js\n\n\n\n\n\n\n\n\n\n\n\n\nvar backupFetch = (0,globals/* maybe */.no)(function () { return fetch; });\nvar createHttpLink = function (linkOptions) {\n if (linkOptions === void 0) { linkOptions = {}; }\n var _a = linkOptions.uri, uri = _a === void 0 ? "/graphql" : _a, \n // use default global fetch if nothing passed in\n preferredFetch = linkOptions.fetch, _b = linkOptions.print, print = _b === void 0 ? defaultPrinter : _b, includeExtensions = linkOptions.includeExtensions, preserveHeaderCase = linkOptions.preserveHeaderCase, useGETForQueries = linkOptions.useGETForQueries, _c = linkOptions.includeUnusedVariables, includeUnusedVariables = _c === void 0 ? false : _c, requestOptions = (0,tslib_es6/* __rest */.Tt)(linkOptions, ["uri", "fetch", "print", "includeExtensions", "preserveHeaderCase", "useGETForQueries", "includeUnusedVariables"]);\n if (globalThis.__DEV__ !== false) {\n // Make sure at least one of preferredFetch, window.fetch, or backupFetch is\n // defined, so requests won\'t fail at runtime.\n checkFetcher(preferredFetch || backupFetch);\n }\n var linkConfig = {\n http: { includeExtensions: includeExtensions, preserveHeaderCase: preserveHeaderCase },\n options: requestOptions.fetchOptions,\n credentials: requestOptions.credentials,\n headers: requestOptions.headers,\n };\n return new ApolloLink/* ApolloLink */.C(function (operation) {\n var chosenURI = selectURI(operation, uri);\n var context = operation.getContext();\n // `apollographql-client-*` headers are automatically set if a\n // `clientAwareness` object is found in the context. These headers are\n // set first, followed by the rest of the headers pulled from\n // `context.headers`. If desired, `apollographql-client-*` headers set by\n // the `clientAwareness` object can be overridden by\n // `apollographql-client-*` headers set in `context.headers`.\n var clientAwarenessHeaders = {};\n if (context.clientAwareness) {\n var _a = context.clientAwareness, name_1 = _a.name, version = _a.version;\n if (name_1) {\n clientAwarenessHeaders["apollographql-client-name"] = name_1;\n }\n if (version) {\n clientAwarenessHeaders["apollographql-client-version"] = version;\n }\n }\n var contextHeaders = (0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, clientAwarenessHeaders), context.headers);\n var contextConfig = {\n http: context.http,\n options: context.fetchOptions,\n credentials: context.credentials,\n headers: contextHeaders,\n };\n if ((0,directives/* hasDirectives */.d8)(["client"], operation.query)) {\n var transformedQuery = (0,transform/* removeClientSetsFromDocument */.er)(operation.query);\n if (!transformedQuery) {\n return fromError(new Error("HttpLink: Trying to send a client-only query to the server. To send to the server, ensure a non-client field is added to the query or set the `transformOptions.removeClientFields` option to `true`."));\n }\n operation.query = transformedQuery;\n }\n //uses fallback, link, and then context to build options\n var _b = selectHttpOptionsAndBodyInternal(operation, print, fallbackHttpConfig, linkConfig, contextConfig), options = _b.options, body = _b.body;\n if (body.variables && !includeUnusedVariables) {\n body.variables = filterOperationVariables(body.variables, operation.query);\n }\n var controller;\n if (!options.signal && typeof AbortController !== "undefined") {\n controller = new AbortController();\n options.signal = controller.signal;\n }\n // If requested, set method to GET if there are no mutations.\n var definitionIsMutation = function (d) {\n return d.kind === "OperationDefinition" && d.operation === "mutation";\n };\n var definitionIsSubscription = function (d) {\n return d.kind === "OperationDefinition" && d.operation === "subscription";\n };\n var isSubscription = definitionIsSubscription((0,getFromAST/* getMainDefinition */.Vn)(operation.query));\n // does not match custom directives beginning with @defer\n var hasDefer = (0,directives/* hasDirectives */.d8)(["defer"], operation.query);\n if (useGETForQueries &&\n !operation.query.definitions.some(definitionIsMutation)) {\n options.method = "GET";\n }\n if (hasDefer || isSubscription) {\n options.headers = options.headers || {};\n var acceptHeader = "multipart/mixed;";\n // Omit defer-specific headers if the user attempts to defer a selection\n // set on a subscription and log a warning.\n if (isSubscription && hasDefer) {\n globalThis.__DEV__ !== false && globals/* invariant */.V1.warn(38);\n }\n if (isSubscription) {\n acceptHeader +=\n "boundary=graphql;subscriptionSpec=1.0,application/json";\n }\n else if (hasDefer) {\n acceptHeader += "deferSpec=20220824,application/json";\n }\n options.headers.accept = acceptHeader;\n }\n if (options.method === "GET") {\n var _c = rewriteURIForGET(chosenURI, body), newURI = _c.newURI, parseError = _c.parseError;\n if (parseError) {\n return fromError(parseError);\n }\n chosenURI = newURI;\n }\n else {\n try {\n options.body = serializeFetchParameter(body, "Payload");\n }\n catch (parseError) {\n return fromError(parseError);\n }\n }\n return new zen_observable_ts_module/* Observable */.c(function (observer) {\n // Prefer linkOptions.fetch (preferredFetch) if provided, and otherwise\n // fall back to the *current* global window.fetch function (see issue\n // #7832), or (if all else fails) the backupFetch function we saved when\n // this module was first evaluated. This last option protects against the\n // removal of window.fetch, which is unlikely but not impossible.\n var currentFetch = preferredFetch || (0,globals/* maybe */.no)(function () { return fetch; }) || backupFetch;\n var observerNext = observer.next.bind(observer);\n currentFetch(chosenURI, options)\n .then(function (response) {\n var _a;\n operation.setContext({ response: response });\n var ctype = (_a = response.headers) === null || _a === void 0 ? void 0 : _a.get("content-type");\n if (ctype !== null && /^multipart\\/mixed/i.test(ctype)) {\n return readMultipartBody(response, observerNext);\n }\n else {\n return parseAndCheckHttpResponse(operation)(response).then(observerNext);\n }\n })\n .then(function () {\n controller = undefined;\n observer.complete();\n })\n .catch(function (err) {\n controller = undefined;\n handleError(err, observer);\n });\n return function () {\n // XXX support canceling this request\n // https://developers.google.com/web/updates/2017/09/abortable-fetch\n if (controller)\n controller.abort();\n };\n });\n });\n};\n//# sourceMappingURL=createHttpLink.js.map\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@apollo/client/link/http/createHttpLink.js_+_14_modules?', + ); + + /***/ + }, + + /***/ 599: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + "/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ A: () => (/* binding */ AutoCleanedWeakCache),\n/* harmony export */ V: () => (/* binding */ AutoCleanedStrongCache)\n/* harmony export */ });\n/* harmony import */ var _wry_caches__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1744);\n/* harmony import */ var _wry_caches__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7783);\n\nvar scheduledCleanup = new WeakSet();\nfunction schedule(cache) {\n if (cache.size <= (cache.max || -1)) {\n return;\n }\n if (!scheduledCleanup.has(cache)) {\n scheduledCleanup.add(cache);\n setTimeout(function () {\n cache.clean();\n scheduledCleanup.delete(cache);\n }, 100);\n }\n}\n/**\n * @internal\n * A version of WeakCache that will auto-schedule a cleanup of the cache when\n * a new item is added and the cache reached maximum size.\n * Throttled to once per 100ms.\n *\n * @privateRemarks\n * Should be used throughout the rest of the codebase instead of WeakCache,\n * with the notable exception of usage in `wrap` from `optimism` - that one\n * already handles cleanup and should remain a `WeakCache`.\n */\nvar AutoCleanedWeakCache = function (max, dispose) {\n /*\n Some builds of `WeakCache` are function prototypes, some are classes.\n This library still builds with an ES5 target, so we can't extend the\n real classes.\n Instead, we have to use this workaround until we switch to a newer build\n target.\n */\n var cache = new _wry_caches__WEBPACK_IMPORTED_MODULE_0__/* .WeakCache */ .l(max, dispose);\n cache.set = function (key, value) {\n var ret = _wry_caches__WEBPACK_IMPORTED_MODULE_0__/* .WeakCache */ .l.prototype.set.call(this, key, value);\n schedule(this);\n return ret;\n };\n return cache;\n};\n/**\n * @internal\n * A version of StrongCache that will auto-schedule a cleanup of the cache when\n * a new item is added and the cache reached maximum size.\n * Throttled to once per 100ms.\n *\n * @privateRemarks\n * Should be used throughout the rest of the codebase instead of StrongCache,\n * with the notable exception of usage in `wrap` from `optimism` - that one\n * already handles cleanup and should remain a `StrongCache`.\n */\nvar AutoCleanedStrongCache = function (max, dispose) {\n /*\n Some builds of `StrongCache` are function prototypes, some are classes.\n This library still builds with an ES5 target, so we can't extend the\n real classes.\n Instead, we have to use this workaround until we switch to a newer build\n target.\n */\n var cache = new _wry_caches__WEBPACK_IMPORTED_MODULE_1__/* .StrongCache */ .C(max, dispose);\n cache.set = function (key, value) {\n var ret = _wry_caches__WEBPACK_IMPORTED_MODULE_1__/* .StrongCache */ .C.prototype.set.call(this, key, value);\n schedule(this);\n return ret;\n };\n return cache;\n};\n//# sourceMappingURL=caches.js.map\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@apollo/client/utilities/caching/caches.js?", + ); + + /***/ + }, + + /***/ 5051: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ D_: () => (/* binding */ registerGlobalCache),\n/* harmony export */ cM: () => (/* binding */ getInMemoryCacheMemoryInternals),\n/* harmony export */ ep: () => (/* binding */ getApolloClientMemoryInternals),\n/* harmony export */ tQ: () => (/* binding */ getApolloCacheMemoryInternals)\n/* harmony export */ });\n/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1635);\n/* harmony import */ var _sizes_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1212);\n\n\nvar globalCaches = {};\nfunction registerGlobalCache(name, getSize) {\n globalCaches[name] = getSize;\n}\n/**\n * For internal purposes only - please call `ApolloClient.getMemoryInternals` instead\n * @internal\n */\nvar getApolloClientMemoryInternals = globalThis.__DEV__ !== false ?\n _getApolloClientMemoryInternals\n : undefined;\n/**\n * For internal purposes only - please call `ApolloClient.getMemoryInternals` instead\n * @internal\n */\nvar getInMemoryCacheMemoryInternals = globalThis.__DEV__ !== false ?\n _getInMemoryCacheMemoryInternals\n : undefined;\n/**\n * For internal purposes only - please call `ApolloClient.getMemoryInternals` instead\n * @internal\n */\nvar getApolloCacheMemoryInternals = globalThis.__DEV__ !== false ?\n _getApolloCacheMemoryInternals\n : undefined;\nfunction getCurrentCacheSizes() {\n // `defaultCacheSizes` is a `const enum` that will be inlined during build, so we have to reconstruct it\'s shape here\n var defaults = {\n parser: 1000 /* defaultCacheSizes["parser"] */,\n canonicalStringify: 1000 /* defaultCacheSizes["canonicalStringify"] */,\n print: 2000 /* defaultCacheSizes["print"] */,\n "documentTransform.cache": 2000 /* defaultCacheSizes["documentTransform.cache"] */,\n "queryManager.getDocumentInfo": 2000 /* defaultCacheSizes["queryManager.getDocumentInfo"] */,\n "PersistedQueryLink.persistedQueryHashes": 2000 /* defaultCacheSizes["PersistedQueryLink.persistedQueryHashes"] */,\n "fragmentRegistry.transform": 2000 /* defaultCacheSizes["fragmentRegistry.transform"] */,\n "fragmentRegistry.lookup": 1000 /* defaultCacheSizes["fragmentRegistry.lookup"] */,\n "fragmentRegistry.findFragmentSpreads": 4000 /* defaultCacheSizes["fragmentRegistry.findFragmentSpreads"] */,\n "cache.fragmentQueryDocuments": 1000 /* defaultCacheSizes["cache.fragmentQueryDocuments"] */,\n "removeTypenameFromVariables.getVariableDefinitions": 2000 /* defaultCacheSizes["removeTypenameFromVariables.getVariableDefinitions"] */,\n "inMemoryCache.maybeBroadcastWatch": 5000 /* defaultCacheSizes["inMemoryCache.maybeBroadcastWatch"] */,\n "inMemoryCache.executeSelectionSet": 50000 /* defaultCacheSizes["inMemoryCache.executeSelectionSet"] */,\n "inMemoryCache.executeSubSelectedArray": 10000 /* defaultCacheSizes["inMemoryCache.executeSubSelectedArray"] */,\n };\n return Object.fromEntries(Object.entries(defaults).map(function (_a) {\n var k = _a[0], v = _a[1];\n return [\n k,\n _sizes_js__WEBPACK_IMPORTED_MODULE_0__/* .cacheSizes */ .v[k] || v,\n ];\n }));\n}\nfunction _getApolloClientMemoryInternals() {\n var _a, _b, _c, _d, _e;\n if (!(globalThis.__DEV__ !== false))\n throw new Error("only supported in development mode");\n return {\n limits: getCurrentCacheSizes(),\n sizes: (0,tslib__WEBPACK_IMPORTED_MODULE_1__/* .__assign */ .Cl)({ print: (_a = globalCaches.print) === null || _a === void 0 ? void 0 : _a.call(globalCaches), parser: (_b = globalCaches.parser) === null || _b === void 0 ? void 0 : _b.call(globalCaches), canonicalStringify: (_c = globalCaches.canonicalStringify) === null || _c === void 0 ? void 0 : _c.call(globalCaches), links: linkInfo(this.link), queryManager: {\n getDocumentInfo: this["queryManager"]["transformCache"].size,\n documentTransforms: transformInfo(this["queryManager"].documentTransform),\n } }, (_e = (_d = this.cache).getMemoryInternals) === null || _e === void 0 ? void 0 : _e.call(_d)),\n };\n}\nfunction _getApolloCacheMemoryInternals() {\n return {\n cache: {\n fragmentQueryDocuments: getWrapperInformation(this["getFragmentDoc"]),\n },\n };\n}\nfunction _getInMemoryCacheMemoryInternals() {\n var fragments = this.config.fragments;\n return (0,tslib__WEBPACK_IMPORTED_MODULE_1__/* .__assign */ .Cl)((0,tslib__WEBPACK_IMPORTED_MODULE_1__/* .__assign */ .Cl)({}, _getApolloCacheMemoryInternals.apply(this)), { addTypenameDocumentTransform: transformInfo(this["addTypenameTransform"]), inMemoryCache: {\n executeSelectionSet: getWrapperInformation(this["storeReader"]["executeSelectionSet"]),\n executeSubSelectedArray: getWrapperInformation(this["storeReader"]["executeSubSelectedArray"]),\n maybeBroadcastWatch: getWrapperInformation(this["maybeBroadcastWatch"]),\n }, fragmentRegistry: {\n findFragmentSpreads: getWrapperInformation(fragments === null || fragments === void 0 ? void 0 : fragments.findFragmentSpreads),\n lookup: getWrapperInformation(fragments === null || fragments === void 0 ? void 0 : fragments.lookup),\n transform: getWrapperInformation(fragments === null || fragments === void 0 ? void 0 : fragments.transform),\n } });\n}\nfunction isWrapper(f) {\n return !!f && "dirtyKey" in f;\n}\nfunction getWrapperInformation(f) {\n return isWrapper(f) ? f.size : undefined;\n}\nfunction isDefined(value) {\n return value != null;\n}\nfunction transformInfo(transform) {\n return recurseTransformInfo(transform).map(function (cache) { return ({ cache: cache }); });\n}\nfunction recurseTransformInfo(transform) {\n return transform ?\n (0,tslib__WEBPACK_IMPORTED_MODULE_1__/* .__spreadArray */ .fX)((0,tslib__WEBPACK_IMPORTED_MODULE_1__/* .__spreadArray */ .fX)([\n getWrapperInformation(transform === null || transform === void 0 ? void 0 : transform["performWork"])\n ], recurseTransformInfo(transform === null || transform === void 0 ? void 0 : transform["left"]), true), recurseTransformInfo(transform === null || transform === void 0 ? void 0 : transform["right"]), true).filter(isDefined)\n : [];\n}\nfunction linkInfo(link) {\n var _a;\n return link ?\n (0,tslib__WEBPACK_IMPORTED_MODULE_1__/* .__spreadArray */ .fX)((0,tslib__WEBPACK_IMPORTED_MODULE_1__/* .__spreadArray */ .fX)([\n (_a = link === null || link === void 0 ? void 0 : link.getMemoryInternals) === null || _a === void 0 ? void 0 : _a.call(link)\n ], linkInfo(link === null || link === void 0 ? void 0 : link.left), true), linkInfo(link === null || link === void 0 ? void 0 : link.right), true).filter(isDefined)\n : [];\n}\n//# sourceMappingURL=getMemoryInternals.js.map\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@apollo/client/utilities/caching/getMemoryInternals.js?', + ); + + /***/ + }, + + /***/ 1212: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ v: () => (/* binding */ cacheSizes)\n/* harmony export */ });\n/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1635);\n/* harmony import */ var _globals_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6319);\n\n\nvar cacheSizeSymbol = Symbol.for("apollo.cacheSize");\n/**\n *\n * The global cache size configuration for Apollo Client.\n *\n * @remarks\n *\n * You can directly modify this object, but any modification will\n * only have an effect on caches that are created after the modification.\n *\n * So for global caches, such as `parser`, `canonicalStringify` and `print`,\n * you might need to call `.reset` on them, which will essentially re-create them.\n *\n * Alternatively, you can set `globalThis[Symbol.for("apollo.cacheSize")]` before\n * you load the Apollo Client package:\n *\n * @example\n * ```ts\n * globalThis[Symbol.for("apollo.cacheSize")] = {\n * parser: 100\n * } satisfies Partial<CacheSizes> // the `satisfies` is optional if using TypeScript\n * ```\n */\nvar cacheSizes = (0,tslib__WEBPACK_IMPORTED_MODULE_1__/* .__assign */ .Cl)({}, _globals_index_js__WEBPACK_IMPORTED_MODULE_0__/* .global */ .Sf[cacheSizeSymbol]);\n//# sourceMappingURL=sizes.js.map\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@apollo/client/utilities/caching/sizes.js?', + ); + + /***/ + }, + + /***/ 5636: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ E: () => (/* binding */ isNonEmptyArray),\n/* harmony export */ c: () => (/* binding */ isArray)\n/* harmony export */ });\n// A version of Array.isArray that works better with readonly arrays.\nvar isArray = Array.isArray;\nfunction isNonEmptyArray(value) {\n return Array.isArray(value) && value.length > 0;\n}\n//# sourceMappingURL=arrays.js.map\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@apollo/client/utilities/common/arrays.js?', + ); + + /***/ + }, + + /***/ 2619: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ En: () => (/* binding */ canUseWeakSet),\n/* harmony export */ JR: () => (/* binding */ canUseLayoutEffect),\n/* harmony export */ et: () => (/* binding */ canUseWeakMap),\n/* harmony export */ ol: () => (/* binding */ canUseSymbol),\n/* harmony export */ uJ: () => (/* binding */ canUseAsyncIteratorSymbol)\n/* harmony export */ });\n/* unused harmony export canUseDOM */\n/* harmony import */ var _globals_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6319);\n\nvar isReactNative = (0,_globals_index_js__WEBPACK_IMPORTED_MODULE_0__/* .maybe */ .no)(function () { return navigator.product; }) == "ReactNative";\nvar canUseWeakMap = typeof WeakMap === "function" &&\n !(isReactNative && !global.HermesInternal);\nvar canUseWeakSet = typeof WeakSet === "function";\nvar canUseSymbol = typeof Symbol === "function" && typeof Symbol.for === "function";\nvar canUseAsyncIteratorSymbol = canUseSymbol && Symbol.asyncIterator;\nvar canUseDOM = typeof (0,_globals_index_js__WEBPACK_IMPORTED_MODULE_0__/* .maybe */ .no)(function () { return window.document.createElement; }) === "function";\nvar usingJSDOM = \n// Following advice found in this comment from @domenic (maintainer of jsdom):\n// https://github.com/jsdom/jsdom/issues/1537#issuecomment-229405327\n//\n// Since we control the version of Jest and jsdom used when running Apollo\n// Client tests, and that version is recent enought to include " jsdom/x.y.z"\n// at the end of the user agent string, I believe this case is all we need to\n// check. Testing for "Node.js" was recommended for backwards compatibility\n// with older version of jsdom, but we don\'t have that problem.\n(0,_globals_index_js__WEBPACK_IMPORTED_MODULE_0__/* .maybe */ .no)(function () { return navigator.userAgent.indexOf("jsdom") >= 0; }) || false;\n// Our tests should all continue to pass if we remove this !usingJSDOM\n// condition, thereby allowing useLayoutEffect when using jsdom. Unfortunately,\n// if we allow useLayoutEffect, then useSyncExternalStore generates many\n// warnings about useLayoutEffect doing nothing on the server. While these\n// warnings are harmless, this !usingJSDOM condition seems to be the best way to\n// prevent them (i.e. skipping useLayoutEffect when using jsdom).\nvar canUseLayoutEffect = (canUseDOM || isReactNative) && !usingJSDOM;\n//# sourceMappingURL=canUse.js.map\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@apollo/client/utilities/common/canUse.js?', + ); + + /***/ + }, + + /***/ 6269: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ M: () => (/* binding */ canonicalStringify)\n/* harmony export */ });\n/* harmony import */ var _utilities_caching_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(599);\n/* harmony import */ var _utilities_caching_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1212);\n/* harmony import */ var _caching_getMemoryInternals_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5051);\n\n\n/**\n * Like JSON.stringify, but with object keys always sorted in the same order.\n *\n * To achieve performant sorting, this function uses a Map from JSON-serialized\n * arrays of keys (in any order) to sorted arrays of the same keys, with a\n * single sorted array reference shared by all permutations of the keys.\n *\n * As a drawback, this function will add a little bit more memory for every\n * object encountered that has different (more, less, a different order of) keys\n * than in the past.\n *\n * In a typical application, this extra memory usage should not play a\n * significant role, as `canonicalStringify` will be called for only a limited\n * number of object shapes, and the cache will not grow beyond a certain point.\n * But in some edge cases, this could be a problem, so we provide\n * canonicalStringify.reset() as a way of clearing the cache.\n * */\nvar canonicalStringify = Object.assign(function canonicalStringify(value) {\n return JSON.stringify(value, stableObjectReplacer);\n}, {\n reset: function () {\n // Clearing the sortingMap will reclaim all cached memory, without\n // affecting the logical results of canonicalStringify, but potentially\n // sacrificing performance until the cache is refilled.\n sortingMap = new _utilities_caching_index_js__WEBPACK_IMPORTED_MODULE_0__/* .AutoCleanedStrongCache */ .V(_utilities_caching_index_js__WEBPACK_IMPORTED_MODULE_1__/* .cacheSizes */ .v.canonicalStringify || 1000 /* defaultCacheSizes.canonicalStringify */);\n },\n});\nif (globalThis.__DEV__ !== false) {\n (0,_caching_getMemoryInternals_js__WEBPACK_IMPORTED_MODULE_2__/* .registerGlobalCache */ .D_)("canonicalStringify", function () { return sortingMap.size; });\n}\n// Values are JSON-serialized arrays of object keys (in any order), and values\n// are sorted arrays of the same keys.\nvar sortingMap;\ncanonicalStringify.reset();\n// The JSON.stringify function takes an optional second argument called a\n// replacer function. This function is called for each key-value pair in the\n// object being stringified, and its return value is used instead of the\n// original value. If the replacer function returns a new value, that value is\n// stringified as JSON instead of the original value of the property.\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#the_replacer_parameter\nfunction stableObjectReplacer(key, value) {\n if (value && typeof value === "object") {\n var proto = Object.getPrototypeOf(value);\n // We don\'t want to mess with objects that are not "plain" objects, which\n // means their prototype is either Object.prototype or null. This check also\n // prevents needlessly rearranging the indices of arrays.\n if (proto === Object.prototype || proto === null) {\n var keys = Object.keys(value);\n // If keys is already sorted, let JSON.stringify serialize the original\n // value instead of creating a new object with keys in the same order.\n if (keys.every(everyKeyInOrder))\n return value;\n var unsortedKey = JSON.stringify(keys);\n var sortedKeys = sortingMap.get(unsortedKey);\n if (!sortedKeys) {\n keys.sort();\n var sortedKey = JSON.stringify(keys);\n // Checking for sortedKey in the sortingMap allows us to share the same\n // sorted array reference for all permutations of the same set of keys.\n sortedKeys = sortingMap.get(sortedKey) || keys;\n sortingMap.set(unsortedKey, sortedKeys);\n sortingMap.set(sortedKey, sortedKeys);\n }\n var sortedObject_1 = Object.create(proto);\n // Reassigning the keys in sorted order will cause JSON.stringify to\n // serialize them in sorted order.\n sortedKeys.forEach(function (key) {\n sortedObject_1[key] = value[key];\n });\n return sortedObject_1;\n }\n }\n return value;\n}\n// Since everything that happens in stableObjectReplacer benefits from being as\n// efficient as possible, we use a static function as the callback for\n// keys.every in order to test if the provided keys are already sorted without\n// allocating extra memory for a callback.\nfunction everyKeyInOrder(key, i, keys) {\n return i === 0 || keys[i - 1] <= key;\n}\n//# sourceMappingURL=canonicalStringify.js.map\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@apollo/client/utilities/common/canonicalStringify.js?', + ); + + /***/ + }, + + /***/ 1495: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ m: () => (/* binding */ cloneDeep)\n/* harmony export */ });\nvar toString = Object.prototype.toString;\n/**\n * Deeply clones a value to create a new instance.\n */\nfunction cloneDeep(value) {\n return cloneDeepHelper(value);\n}\nfunction cloneDeepHelper(val, seen) {\n switch (toString.call(val)) {\n case "[object Array]": {\n seen = seen || new Map();\n if (seen.has(val))\n return seen.get(val);\n var copy_1 = val.slice(0);\n seen.set(val, copy_1);\n copy_1.forEach(function (child, i) {\n copy_1[i] = cloneDeepHelper(child, seen);\n });\n return copy_1;\n }\n case "[object Object]": {\n seen = seen || new Map();\n if (seen.has(val))\n return seen.get(val);\n // High fidelity polyfills of Object.create and Object.getPrototypeOf are\n // possible in all JS environments, so we will assume they exist/work.\n var copy_2 = Object.create(Object.getPrototypeOf(val));\n seen.set(val, copy_2);\n Object.keys(val).forEach(function (key) {\n copy_2[key] = cloneDeepHelper(val[key], seen);\n });\n return copy_2;\n }\n default:\n return val;\n }\n}\n//# sourceMappingURL=cloneDeep.js.map\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@apollo/client/utilities/common/cloneDeep.js?', + ); + + /***/ + }, + + /***/ 7945: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ o: () => (/* binding */ compact)\n/* harmony export */ });\n/**\n * Merges the provided objects shallowly and removes\n * all properties with an `undefined` value\n */\nfunction compact() {\n var objects = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n objects[_i] = arguments[_i];\n }\n var result = Object.create(null);\n objects.forEach(function (obj) {\n if (!obj)\n return;\n Object.keys(obj).forEach(function (key) {\n var value = obj[key];\n if (value !== void 0) {\n result[key] = value;\n }\n });\n });\n return result;\n}\n//# sourceMappingURL=compact.js.map\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@apollo/client/utilities/common/compact.js?', + ); + + /***/ + }, + + /***/ 6453: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Nw: () => (/* binding */ isApolloPayloadResult),\n/* harmony export */ ST: () => (/* binding */ isExecutionPatchIncrementalResult),\n/* harmony export */ YX: () => (/* binding */ isExecutionPatchResult),\n/* harmony export */ bd: () => (/* binding */ mergeIncrementalData)\n/* harmony export */ });\n/* unused harmony export isExecutionPatchInitialResult */\n/* harmony import */ var _objects_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2456);\n/* harmony import */ var _arrays_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5636);\n/* harmony import */ var _mergeDeep_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2922);\n\n\n\nfunction isExecutionPatchIncrementalResult(value) {\n return "incremental" in value;\n}\nfunction isExecutionPatchInitialResult(value) {\n return "hasNext" in value && "data" in value;\n}\nfunction isExecutionPatchResult(value) {\n return (isExecutionPatchIncrementalResult(value) ||\n isExecutionPatchInitialResult(value));\n}\n// This function detects an Apollo payload result before it is transformed\n// into a FetchResult via HttpLink; it cannot detect an ApolloPayloadResult\n// once it leaves the link chain.\nfunction isApolloPayloadResult(value) {\n return (0,_objects_js__WEBPACK_IMPORTED_MODULE_0__/* .isNonNullObject */ .U)(value) && "payload" in value;\n}\nfunction mergeIncrementalData(prevResult, result) {\n var mergedData = prevResult;\n var merger = new _mergeDeep_js__WEBPACK_IMPORTED_MODULE_1__/* .DeepMerger */ .ZI();\n if (isExecutionPatchIncrementalResult(result) &&\n (0,_arrays_js__WEBPACK_IMPORTED_MODULE_2__/* .isNonEmptyArray */ .E)(result.incremental)) {\n result.incremental.forEach(function (_a) {\n var data = _a.data, path = _a.path;\n for (var i = path.length - 1; i >= 0; --i) {\n var key = path[i];\n var isNumericKey = !isNaN(+key);\n var parent_1 = isNumericKey ? [] : {};\n parent_1[key] = data;\n data = parent_1;\n }\n mergedData = merger.merge(mergedData, data);\n });\n }\n return mergedData;\n}\n//# sourceMappingURL=incrementalResult.js.map\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@apollo/client/utilities/common/incrementalResult.js?', + ); + + /***/ + }, + + /***/ 8170: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ v: () => (/* binding */ makeUniqueId)\n/* harmony export */ });\nvar prefixCounts = new Map();\n// These IDs won\'t be globally unique, but they will be unique within this\n// process, thanks to the counter, and unguessable thanks to the random suffix.\nfunction makeUniqueId(prefix) {\n var count = prefixCounts.get(prefix) || 1;\n prefixCounts.set(prefix, count + 1);\n return "".concat(prefix, ":").concat(count, ":").concat(Math.random().toString(36).slice(2));\n}\n//# sourceMappingURL=makeUniqueId.js.map\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@apollo/client/utilities/common/makeUniqueId.js?', + ); + + /***/ + }, + + /***/ 1469: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + "/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ G: () => (/* binding */ maybeDeepFreeze)\n/* harmony export */ });\n/* harmony import */ var _objects_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2456);\n\nfunction deepFreeze(value) {\n var workSet = new Set([value]);\n workSet.forEach(function (obj) {\n if ((0,_objects_js__WEBPACK_IMPORTED_MODULE_0__/* .isNonNullObject */ .U)(obj) && shallowFreeze(obj) === obj) {\n Object.getOwnPropertyNames(obj).forEach(function (name) {\n if ((0,_objects_js__WEBPACK_IMPORTED_MODULE_0__/* .isNonNullObject */ .U)(obj[name]))\n workSet.add(obj[name]);\n });\n }\n });\n return value;\n}\nfunction shallowFreeze(obj) {\n if (globalThis.__DEV__ !== false && !Object.isFrozen(obj)) {\n try {\n Object.freeze(obj);\n }\n catch (e) {\n // Some types like Uint8Array and Node.js's Buffer cannot be frozen, but\n // they all throw a TypeError when you try, so we re-throw any exceptions\n // that are not TypeErrors, since that would be unexpected.\n if (e instanceof TypeError)\n return null;\n throw e;\n }\n }\n return obj;\n}\nfunction maybeDeepFreeze(obj) {\n if (globalThis.__DEV__ !== false) {\n deepFreeze(obj);\n }\n return obj;\n}\n//# sourceMappingURL=maybeDeepFreeze.js.map\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@apollo/client/utilities/common/maybeDeepFreeze.js?", + ); + + /***/ + }, + + /***/ 2922: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ D9: () => (/* binding */ mergeDeep),\n/* harmony export */ IM: () => (/* binding */ mergeDeepArray),\n/* harmony export */ ZI: () => (/* binding */ DeepMerger)\n/* harmony export */ });\n/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1635);\n/* harmony import */ var _objects_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2456);\n\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nfunction mergeDeep() {\n var sources = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n sources[_i] = arguments[_i];\n }\n return mergeDeepArray(sources);\n}\n// In almost any situation where you could succeed in getting the\n// TypeScript compiler to infer a tuple type for the sources array, you\n// could just use mergeDeep instead of mergeDeepArray, so instead of\n// trying to convert T[] to an intersection type we just infer the array\n// element type, which works perfectly when the sources array has a\n// consistent element type.\nfunction mergeDeepArray(sources) {\n var target = sources[0] || {};\n var count = sources.length;\n if (count > 1) {\n var merger = new DeepMerger();\n for (var i = 1; i < count; ++i) {\n target = merger.merge(target, sources[i]);\n }\n }\n return target;\n}\nvar defaultReconciler = function (target, source, property) {\n return this.merge(target[property], source[property]);\n};\nvar DeepMerger = /** @class */ (function () {\n function DeepMerger(reconciler) {\n if (reconciler === void 0) { reconciler = defaultReconciler; }\n this.reconciler = reconciler;\n this.isObject = _objects_js__WEBPACK_IMPORTED_MODULE_0__/* .isNonNullObject */ .U;\n this.pastCopies = new Set();\n }\n DeepMerger.prototype.merge = function (target, source) {\n var _this = this;\n var context = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n context[_i - 2] = arguments[_i];\n }\n if ((0,_objects_js__WEBPACK_IMPORTED_MODULE_0__/* .isNonNullObject */ .U)(source) && (0,_objects_js__WEBPACK_IMPORTED_MODULE_0__/* .isNonNullObject */ .U)(target)) {\n Object.keys(source).forEach(function (sourceKey) {\n if (hasOwnProperty.call(target, sourceKey)) {\n var targetValue = target[sourceKey];\n if (source[sourceKey] !== targetValue) {\n var result = _this.reconciler.apply(_this, (0,tslib__WEBPACK_IMPORTED_MODULE_1__/* .__spreadArray */ .fX)([target,\n source,\n sourceKey], context, false));\n // A well-implemented reconciler may return targetValue to indicate\n // the merge changed nothing about the structure of the target.\n if (result !== targetValue) {\n target = _this.shallowCopyForMerge(target);\n target[sourceKey] = result;\n }\n }\n }\n else {\n // If there is no collision, the target can safely share memory with\n // the source, and the recursion can terminate here.\n target = _this.shallowCopyForMerge(target);\n target[sourceKey] = source[sourceKey];\n }\n });\n return target;\n }\n // If source (or target) is not an object, let source replace target.\n return source;\n };\n DeepMerger.prototype.shallowCopyForMerge = function (value) {\n if ((0,_objects_js__WEBPACK_IMPORTED_MODULE_0__/* .isNonNullObject */ .U)(value)) {\n if (!this.pastCopies.has(value)) {\n if (Array.isArray(value)) {\n value = value.slice(0);\n }\n else {\n value = (0,tslib__WEBPACK_IMPORTED_MODULE_1__/* .__assign */ .Cl)({ __proto__: Object.getPrototypeOf(value) }, value);\n }\n this.pastCopies.add(value);\n }\n }\n return value;\n };\n return DeepMerger;\n}());\n\n//# sourceMappingURL=mergeDeep.js.map\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@apollo/client/utilities/common/mergeDeep.js?', + ); + + /***/ + }, + + /***/ 144: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ l: () => (/* binding */ mergeOptions)\n/* harmony export */ });\n/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1635);\n/* harmony import */ var _compact_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7945);\n\n\nfunction mergeOptions(defaults, options) {\n return (0,_compact_js__WEBPACK_IMPORTED_MODULE_0__/* .compact */ .o)(defaults, options, options.variables && {\n variables: (0,_compact_js__WEBPACK_IMPORTED_MODULE_0__/* .compact */ .o)((0,tslib__WEBPACK_IMPORTED_MODULE_1__/* .__assign */ .Cl)((0,tslib__WEBPACK_IMPORTED_MODULE_1__/* .__assign */ .Cl)({}, (defaults && defaults.variables)), options.variables)),\n });\n}\n//# sourceMappingURL=mergeOptions.js.map\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@apollo/client/utilities/common/mergeOptions.js?', + ); + + /***/ + }, + + /***/ 2456: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ U: () => (/* binding */ isNonNullObject)\n/* harmony export */ });\n/* unused harmony export isPlainObject */\nfunction isNonNullObject(obj) {\n return obj !== null && typeof obj === "object";\n}\nfunction isPlainObject(obj) {\n return (obj !== null &&\n typeof obj === "object" &&\n (Object.getPrototypeOf(obj) === Object.prototype ||\n Object.getPrototypeOf(obj) === null));\n}\n//# sourceMappingURL=objects.js.map\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@apollo/client/utilities/common/objects.js?', + ); + + /***/ + }, + + /***/ 6194: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ p: () => (/* binding */ stringifyForDisplay)\n/* harmony export */ });\n/* harmony import */ var _makeUniqueId_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8170);\n\nfunction stringifyForDisplay(value, space) {\n if (space === void 0) { space = 0; }\n var undefId = (0,_makeUniqueId_js__WEBPACK_IMPORTED_MODULE_0__/* .makeUniqueId */ .v)("stringifyForDisplay");\n return JSON.stringify(value, function (key, value) {\n return value === void 0 ? undefId : value;\n }, space)\n .split(JSON.stringify(undefId))\n .join("<undefined>");\n}\n//# sourceMappingURL=stringifyForDisplay.js.map\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@apollo/client/utilities/common/stringifyForDisplay.js?', + ); + + /***/ + }, + + /***/ 6319: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '\n// EXPORTS\n__webpack_require__.d(__webpack_exports__, {\n Sf: () => (/* reexport */ globals_global),\n V1: () => (/* reexport */ invariantWrappers_invariant),\n no: () => (/* reexport */ maybe),\n vA: () => (/* reexport */ newInvariantError)\n});\n\n// UNUSED EXPORTS: DEV, InvariantError, __DEV__\n\n// EXTERNAL MODULE: ./node_modules/tslib/tslib.es6.mjs\nvar tslib_es6 = __webpack_require__(1635);\n;// CONCATENATED MODULE: ./node_modules/ts-invariant/lib/invariant.js\n\nvar genericMessage = "Invariant Violation";\nvar _a = Object.setPrototypeOf, setPrototypeOf = _a === void 0 ? function (obj, proto) {\n obj.__proto__ = proto;\n return obj;\n} : _a;\nvar InvariantError = /** @class */ (function (_super) {\n (0,tslib_es6/* __extends */.C6)(InvariantError, _super);\n function InvariantError(message) {\n if (message === void 0) { message = genericMessage; }\n var _this = _super.call(this, typeof message === "number"\n ? genericMessage + ": " + message + " (see https://github.com/apollographql/invariant-packages)"\n : message) || this;\n _this.framesToPop = 1;\n _this.name = genericMessage;\n setPrototypeOf(_this, InvariantError.prototype);\n return _this;\n }\n return InvariantError;\n}(Error));\n\nfunction invariant_invariant(condition, message) {\n if (!condition) {\n throw new InvariantError(message);\n }\n}\nvar verbosityLevels = ["debug", "log", "warn", "error", "silent"];\nvar verbosityLevel = verbosityLevels.indexOf("log");\nfunction wrapConsoleMethod(name) {\n return function () {\n if (verbosityLevels.indexOf(name) >= verbosityLevel) {\n // Default to console.log if this host environment happens not to provide\n // all the console.* methods we need.\n var method = console[name] || console.log;\n return method.apply(console, arguments);\n }\n };\n}\n(function (invariant) {\n invariant.debug = wrapConsoleMethod("debug");\n invariant.log = wrapConsoleMethod("log");\n invariant.warn = wrapConsoleMethod("warn");\n invariant.error = wrapConsoleMethod("error");\n})(invariant_invariant || (invariant_invariant = {}));\nfunction setVerbosity(level) {\n var old = verbosityLevels[verbosityLevel];\n verbosityLevel = Math.max(0, verbosityLevels.indexOf(level));\n return old;\n}\n/* harmony default export */ const invariant = ((/* unused pure expression or super */ null && (invariant_invariant)));\n//# sourceMappingURL=invariant.js.map\n// EXTERNAL MODULE: ./node_modules/@apollo/client/version.js\nvar version = __webpack_require__(435);\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/utilities/globals/maybe.js\nfunction maybe(thunk) {\n try {\n return thunk();\n }\n catch (_a) { }\n}\n//# sourceMappingURL=maybe.js.map\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/utilities/globals/global.js\n\n/* harmony default export */ const globals_global = (maybe(function () { return globalThis; }) ||\n maybe(function () { return window; }) ||\n maybe(function () { return self; }) ||\n maybe(function () { return global; }) || // We don\'t expect the Function constructor ever to be invoked at runtime, as\n// long as at least one of globalThis, window, self, or global is defined, so\n// we are under no obligation to make it easy for static analysis tools to\n// detect syntactic usage of the Function constructor. If you think you can\n// improve your static analysis to detect this obfuscation, think again. This\n// is an arms race you cannot win, at least not in JavaScript.\nmaybe(function () {\n return maybe.constructor("return this")();\n}));\n//# sourceMappingURL=global.js.map\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/common/stringifyForDisplay.js\nvar stringifyForDisplay = __webpack_require__(6194);\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/utilities/globals/invariantWrappers.js\n\n\n\n\nfunction wrap(fn) {\n return function (message) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n if (typeof message === "number") {\n var arg0 = message;\n message = getHandledErrorMsg(arg0);\n if (!message) {\n message = getFallbackErrorMsg(arg0, args);\n args = [];\n }\n }\n fn.apply(void 0, [message].concat(args));\n };\n}\nvar invariantWrappers_invariant = Object.assign(function invariant(condition, message) {\n var args = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n args[_i - 2] = arguments[_i];\n }\n if (!condition) {\n invariant_invariant(condition, getHandledErrorMsg(message, args) || getFallbackErrorMsg(message, args));\n }\n}, {\n debug: wrap(invariant_invariant.debug),\n log: wrap(invariant_invariant.log),\n warn: wrap(invariant_invariant.warn),\n error: wrap(invariant_invariant.error),\n});\n/**\n * Returns an InvariantError.\n *\n * `message` can only be a string, a concatenation of strings, or a ternary statement\n * that results in a string. This will be enforced on build, where the message will\n * be replaced with a message number.\n * String substitutions with %s are supported and will also return\n * pretty-stringified objects.\n * Excess `optionalParams` will be swallowed.\n */\nfunction newInvariantError(message) {\n var optionalParams = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n optionalParams[_i - 1] = arguments[_i];\n }\n return new InvariantError(getHandledErrorMsg(message, optionalParams) ||\n getFallbackErrorMsg(message, optionalParams));\n}\nvar ApolloErrorMessageHandler = Symbol.for("ApolloErrorMessageHandler_" + version/* version */.r);\nfunction stringify(arg) {\n if (typeof arg == "string") {\n return arg;\n }\n try {\n return (0,stringifyForDisplay/* stringifyForDisplay */.p)(arg, 2).slice(0, 1000);\n }\n catch (_a) {\n return "<non-serializable>";\n }\n}\nfunction getHandledErrorMsg(message, messageArgs) {\n if (messageArgs === void 0) { messageArgs = []; }\n if (!message)\n return;\n return (globals_global[ApolloErrorMessageHandler] &&\n globals_global[ApolloErrorMessageHandler](message, messageArgs.map(stringify)));\n}\nfunction getFallbackErrorMsg(message, messageArgs) {\n if (messageArgs === void 0) { messageArgs = []; }\n if (!message)\n return;\n return "An error occurred! For more details, see the full error text at https://go.apollo.dev/c/err#".concat(encodeURIComponent(JSON.stringify({\n version: version/* version */.r,\n message: message,\n args: messageArgs.map(stringify),\n })));\n}\n\n//# sourceMappingURL=invariantWrappers.js.map\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/utilities/globals/index.js\n\n\n\n\n/**\n * @deprecated we do not use this internally anymore,\n * it is just exported for backwards compatibility\n */\n// this file is extempt from automatic `__DEV__` replacement\n// so we have to write it out here\n// @ts-ignore\nvar DEV = globalThis.__DEV__ !== false;\n\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@apollo/client/utilities/globals/index.js_+_4_modules?', + ); + + /***/ + }, + + /***/ 9993: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ c: () => (/* binding */ DocumentTransform)\n/* harmony export */ });\n/* harmony import */ var _wry_trie__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2453);\n/* harmony import */ var _common_canUse_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(2619);\n/* harmony import */ var _getFromAST_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(4824);\n/* harmony import */ var _globals_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6319);\n/* harmony import */ var _wry_caches__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(1744);\n/* harmony import */ var optimism__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1161);\n/* harmony import */ var _caching_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(1212);\n\n\n\n\n\n\n\nfunction identity(document) {\n return document;\n}\nvar DocumentTransform = /** @class */ (function () {\n function DocumentTransform(transform, options) {\n if (options === void 0) { options = Object.create(null); }\n this.resultCache = _common_canUse_js__WEBPACK_IMPORTED_MODULE_3__/* .canUseWeakSet */ .En ? new WeakSet() : new Set();\n this.transform = transform;\n if (options.getCacheKey) {\n // Override default `getCacheKey` function, which returns [document].\n this.getCacheKey = options.getCacheKey;\n }\n this.cached = options.cache !== false;\n this.resetCache();\n }\n // This default implementation of getCacheKey can be overridden by providing\n // options.getCacheKey to the DocumentTransform constructor. In general, a\n // getCacheKey function may either return an array of keys (often including\n // the document) to be used as a cache key, or undefined to indicate the\n // transform for this document should not be cached.\n DocumentTransform.prototype.getCacheKey = function (document) {\n return [document];\n };\n DocumentTransform.identity = function () {\n // No need to cache this transform since it just returns the document\n // unchanged. This should save a bit of memory that would otherwise be\n // needed to populate the `documentCache` of this transform.\n return new DocumentTransform(identity, { cache: false });\n };\n DocumentTransform.split = function (predicate, left, right) {\n if (right === void 0) { right = DocumentTransform.identity(); }\n return Object.assign(new DocumentTransform(function (document) {\n var documentTransform = predicate(document) ? left : right;\n return documentTransform.transformDocument(document);\n }, \n // Reasonably assume both `left` and `right` transforms handle their own caching\n { cache: false }), { left: left, right: right });\n };\n /**\n * Resets the internal cache of this transform, if it has one.\n */\n DocumentTransform.prototype.resetCache = function () {\n var _this = this;\n if (this.cached) {\n var stableCacheKeys_1 = new _wry_trie__WEBPACK_IMPORTED_MODULE_0__/* .Trie */ .b(_common_canUse_js__WEBPACK_IMPORTED_MODULE_3__/* .canUseWeakMap */ .et);\n this.performWork = (0,optimism__WEBPACK_IMPORTED_MODULE_2__/* .wrap */ .LV)(DocumentTransform.prototype.performWork.bind(this), {\n makeCacheKey: function (document) {\n var cacheKeys = _this.getCacheKey(document);\n if (cacheKeys) {\n (0,_globals_index_js__WEBPACK_IMPORTED_MODULE_1__/* .invariant */ .V1)(Array.isArray(cacheKeys), 67);\n return stableCacheKeys_1.lookupArray(cacheKeys);\n }\n },\n max: _caching_index_js__WEBPACK_IMPORTED_MODULE_4__/* .cacheSizes */ .v["documentTransform.cache"],\n cache: (_wry_caches__WEBPACK_IMPORTED_MODULE_5__/* .WeakCache */ .l),\n });\n }\n };\n DocumentTransform.prototype.performWork = function (document) {\n (0,_getFromAST_js__WEBPACK_IMPORTED_MODULE_6__/* .checkDocument */ .sw)(document);\n return this.transform(document);\n };\n DocumentTransform.prototype.transformDocument = function (document) {\n // If a user passes an already transformed result back to this function,\n // immediately return it.\n if (this.resultCache.has(document)) {\n return document;\n }\n var transformedDocument = this.performWork(document);\n this.resultCache.add(transformedDocument);\n return transformedDocument;\n };\n DocumentTransform.prototype.concat = function (otherTransform) {\n var _this = this;\n return Object.assign(new DocumentTransform(function (document) {\n return otherTransform.transformDocument(_this.transformDocument(document));\n }, \n // Reasonably assume both transforms handle their own caching\n { cache: false }), {\n left: this,\n right: otherTransform,\n });\n };\n return DocumentTransform;\n}());\n\n//# sourceMappingURL=DocumentTransform.js.map\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@apollo/client/utilities/graphql/DocumentTransform.js?', + ); + + /***/ + }, + + /***/ 1250: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ MS: () => (/* binding */ shouldInclude),\n/* harmony export */ d8: () => (/* binding */ hasDirectives),\n/* harmony export */ f2: () => (/* binding */ hasClientExports)\n/* harmony export */ });\n/* unused harmony exports getDirectiveNames, hasAnyDirectives, hasAllDirectives, getInclusionDirectives */\n/* harmony import */ var _globals_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6319);\n/* harmony import */ var graphql__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4705);\n\n\nfunction shouldInclude(_a, variables) {\n var directives = _a.directives;\n if (!directives || !directives.length) {\n return true;\n }\n return getInclusionDirectives(directives).every(function (_a) {\n var directive = _a.directive, ifArgument = _a.ifArgument;\n var evaledValue = false;\n if (ifArgument.value.kind === "Variable") {\n evaledValue =\n variables && variables[ifArgument.value.name.value];\n (0,_globals_index_js__WEBPACK_IMPORTED_MODULE_0__/* .invariant */ .V1)(evaledValue !== void 0, 68, directive.name.value);\n }\n else {\n evaledValue = ifArgument.value.value;\n }\n return directive.name.value === "skip" ? !evaledValue : evaledValue;\n });\n}\nfunction getDirectiveNames(root) {\n var names = [];\n visit(root, {\n Directive: function (node) {\n names.push(node.name.value);\n },\n });\n return names;\n}\nvar hasAnyDirectives = function (names, root) {\n return hasDirectives(names, root, false);\n};\nvar hasAllDirectives = function (names, root) {\n return hasDirectives(names, root, true);\n};\nfunction hasDirectives(names, root, all) {\n var nameSet = new Set(names);\n var uniqueCount = nameSet.size;\n (0,graphql__WEBPACK_IMPORTED_MODULE_1__/* .visit */ .YR)(root, {\n Directive: function (node) {\n if (nameSet.delete(node.name.value) && (!all || !nameSet.size)) {\n return graphql__WEBPACK_IMPORTED_MODULE_1__/* .BREAK */ .sP;\n }\n },\n });\n // If we found all the names, nameSet will be empty. If we only care about\n // finding some of them, the < condition is sufficient.\n return all ? !nameSet.size : nameSet.size < uniqueCount;\n}\nfunction hasClientExports(document) {\n return document && hasDirectives(["client", "export"], document, true);\n}\nfunction isInclusionDirective(_a) {\n var value = _a.name.value;\n return value === "skip" || value === "include";\n}\nfunction getInclusionDirectives(directives) {\n var result = [];\n if (directives && directives.length) {\n directives.forEach(function (directive) {\n if (!isInclusionDirective(directive))\n return;\n var directiveArguments = directive.arguments;\n var directiveName = directive.name.value;\n (0,_globals_index_js__WEBPACK_IMPORTED_MODULE_0__/* .invariant */ .V1)(directiveArguments && directiveArguments.length === 1, 69, directiveName);\n var ifArgument = directiveArguments[0];\n (0,_globals_index_js__WEBPACK_IMPORTED_MODULE_0__/* .invariant */ .V1)(ifArgument.name && ifArgument.name.value === "if", 70, directiveName);\n var ifValue = ifArgument.value;\n // means it has to be a variable value if this is a valid @skip or @include directive\n (0,_globals_index_js__WEBPACK_IMPORTED_MODULE_0__/* .invariant */ .V1)(ifValue &&\n (ifValue.kind === "Variable" || ifValue.kind === "BooleanValue"), 71, directiveName);\n result.push({ directive: directive, ifArgument: ifArgument });\n });\n }\n return result;\n}\n//# sourceMappingURL=directives.js.map\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@apollo/client/utilities/graphql/directives.js?', + ); + + /***/ + }, + + /***/ 5215: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ HQ: () => (/* binding */ getFragmentFromSelection),\n/* harmony export */ JG: () => (/* binding */ createFragmentMap),\n/* harmony export */ ct: () => (/* binding */ getFragmentQueryDocument)\n/* harmony export */ });\n/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1635);\n/* harmony import */ var _globals_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6319);\n\n\n/**\n * Returns a query document which adds a single query operation that only\n * spreads the target fragment inside of it.\n *\n * So for example a document of:\n *\n * ```graphql\n * fragment foo on Foo { a b c }\n * ```\n *\n * Turns into:\n *\n * ```graphql\n * { ...foo }\n *\n * fragment foo on Foo { a b c }\n * ```\n *\n * The target fragment will either be the only fragment in the document, or a\n * fragment specified by the provided `fragmentName`. If there is more than one\n * fragment, but a `fragmentName` was not defined then an error will be thrown.\n */\nfunction getFragmentQueryDocument(document, fragmentName) {\n var actualFragmentName = fragmentName;\n // Build an array of all our fragment definitions that will be used for\n // validations. We also do some validations on the other definitions in the\n // document while building this list.\n var fragments = [];\n document.definitions.forEach(function (definition) {\n // Throw an error if we encounter an operation definition because we will\n // define our own operation definition later on.\n if (definition.kind === "OperationDefinition") {\n throw (0,_globals_index_js__WEBPACK_IMPORTED_MODULE_0__/* .newInvariantError */ .vA)(\n 72,\n definition.operation,\n definition.name ? " named \'".concat(definition.name.value, "\'") : ""\n );\n }\n // Add our definition to the fragments array if it is a fragment\n // definition.\n if (definition.kind === "FragmentDefinition") {\n fragments.push(definition);\n }\n });\n // If the user did not give us a fragment name then let us try to get a\n // name from a single fragment in the definition.\n if (typeof actualFragmentName === "undefined") {\n (0,_globals_index_js__WEBPACK_IMPORTED_MODULE_0__/* .invariant */ .V1)(fragments.length === 1, 73, fragments.length);\n actualFragmentName = fragments[0].name.value;\n }\n // Generate a query document with an operation that simply spreads the\n // fragment inside of it.\n var query = (0,tslib__WEBPACK_IMPORTED_MODULE_1__/* .__assign */ .Cl)((0,tslib__WEBPACK_IMPORTED_MODULE_1__/* .__assign */ .Cl)({}, document), { definitions: (0,tslib__WEBPACK_IMPORTED_MODULE_1__/* .__spreadArray */ .fX)([\n {\n kind: "OperationDefinition",\n // OperationTypeNode is an enum\n operation: "query",\n selectionSet: {\n kind: "SelectionSet",\n selections: [\n {\n kind: "FragmentSpread",\n name: {\n kind: "Name",\n value: actualFragmentName,\n },\n },\n ],\n },\n }\n ], document.definitions, true) });\n return query;\n}\n// Utility function that takes a list of fragment definitions and makes a hash out of them\n// that maps the name of the fragment to the fragment definition.\nfunction createFragmentMap(fragments) {\n if (fragments === void 0) { fragments = []; }\n var symTable = {};\n fragments.forEach(function (fragment) {\n symTable[fragment.name.value] = fragment;\n });\n return symTable;\n}\nfunction getFragmentFromSelection(selection, fragmentMap) {\n switch (selection.kind) {\n case "InlineFragment":\n return selection;\n case "FragmentSpread": {\n var fragmentName = selection.name.value;\n if (typeof fragmentMap === "function") {\n return fragmentMap(fragmentName);\n }\n var fragment = fragmentMap && fragmentMap[fragmentName];\n (0,_globals_index_js__WEBPACK_IMPORTED_MODULE_0__/* .invariant */ .V1)(fragment, 74, fragmentName);\n return fragment || null;\n }\n default:\n return null;\n }\n}\n//# sourceMappingURL=fragments.js.map\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@apollo/client/utilities/graphql/fragments.js?', + ); + + /***/ + }, + + /***/ 4824: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ AT: () => (/* binding */ getQueryDefinition),\n/* harmony export */ E4: () => (/* binding */ getFragmentDefinition),\n/* harmony export */ Vn: () => (/* binding */ getMainDefinition),\n/* harmony export */ Vu: () => (/* binding */ getOperationDefinition),\n/* harmony export */ n4: () => (/* binding */ getOperationName),\n/* harmony export */ sw: () => (/* binding */ checkDocument),\n/* harmony export */ wY: () => (/* binding */ getDefaultValues),\n/* harmony export */ zK: () => (/* binding */ getFragmentDefinitions)\n/* harmony export */ });\n/* harmony import */ var _globals_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6319);\n/* harmony import */ var _storeUtils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7194);\n\n\n// Checks the document for errors and throws an exception if there is an error.\nfunction checkDocument(doc) {\n (0,_globals_index_js__WEBPACK_IMPORTED_MODULE_0__/* .invariant */ .V1)(doc && doc.kind === "Document", 75);\n var operations = doc.definitions\n .filter(function (d) { return d.kind !== "FragmentDefinition"; })\n .map(function (definition) {\n if (definition.kind !== "OperationDefinition") {\n throw (0,_globals_index_js__WEBPACK_IMPORTED_MODULE_0__/* .newInvariantError */ .vA)(76, definition.kind);\n }\n return definition;\n });\n (0,_globals_index_js__WEBPACK_IMPORTED_MODULE_0__/* .invariant */ .V1)(operations.length <= 1, 77, operations.length);\n return doc;\n}\nfunction getOperationDefinition(doc) {\n checkDocument(doc);\n return doc.definitions.filter(function (definition) {\n return definition.kind === "OperationDefinition";\n })[0];\n}\nfunction getOperationName(doc) {\n return (doc.definitions\n .filter(function (definition) {\n return definition.kind === "OperationDefinition" && !!definition.name;\n })\n .map(function (x) { return x.name.value; })[0] || null);\n}\n// Returns the FragmentDefinitions from a particular document as an array\nfunction getFragmentDefinitions(doc) {\n return doc.definitions.filter(function (definition) {\n return definition.kind === "FragmentDefinition";\n });\n}\nfunction getQueryDefinition(doc) {\n var queryDef = getOperationDefinition(doc);\n (0,_globals_index_js__WEBPACK_IMPORTED_MODULE_0__/* .invariant */ .V1)(queryDef && queryDef.operation === "query", 78);\n return queryDef;\n}\nfunction getFragmentDefinition(doc) {\n (0,_globals_index_js__WEBPACK_IMPORTED_MODULE_0__/* .invariant */ .V1)(doc.kind === "Document", 79);\n (0,_globals_index_js__WEBPACK_IMPORTED_MODULE_0__/* .invariant */ .V1)(doc.definitions.length <= 1, 80);\n var fragmentDef = doc.definitions[0];\n (0,_globals_index_js__WEBPACK_IMPORTED_MODULE_0__/* .invariant */ .V1)(fragmentDef.kind === "FragmentDefinition", 81);\n return fragmentDef;\n}\n/**\n * Returns the first operation definition found in this document.\n * If no operation definition is found, the first fragment definition will be returned.\n * If no definitions are found, an error will be thrown.\n */\nfunction getMainDefinition(queryDoc) {\n checkDocument(queryDoc);\n var fragmentDefinition;\n for (var _i = 0, _a = queryDoc.definitions; _i < _a.length; _i++) {\n var definition = _a[_i];\n if (definition.kind === "OperationDefinition") {\n var operation = definition.operation;\n if (operation === "query" ||\n operation === "mutation" ||\n operation === "subscription") {\n return definition;\n }\n }\n if (definition.kind === "FragmentDefinition" && !fragmentDefinition) {\n // we do this because we want to allow multiple fragment definitions\n // to precede an operation definition.\n fragmentDefinition = definition;\n }\n }\n if (fragmentDefinition) {\n return fragmentDefinition;\n }\n throw (0,_globals_index_js__WEBPACK_IMPORTED_MODULE_0__/* .newInvariantError */ .vA)(82);\n}\nfunction getDefaultValues(definition) {\n var defaultValues = Object.create(null);\n var defs = definition && definition.variableDefinitions;\n if (defs && defs.length) {\n defs.forEach(function (def) {\n if (def.defaultValue) {\n (0,_storeUtils_js__WEBPACK_IMPORTED_MODULE_1__/* .valueToObjectRepresentation */ .J)(defaultValues, def.variable.name, def.defaultValue);\n }\n });\n }\n return defaultValues;\n}\n//# sourceMappingURL=getFromAST.js.map\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@apollo/client/utilities/graphql/getFromAST.js?', + ); + + /***/ + }, + + /***/ 2417: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + "\n// EXPORTS\n__webpack_require__.d(__webpack_exports__, {\n y: () => (/* binding */ print_print)\n});\n\n// EXTERNAL MODULE: ./node_modules/graphql/language/blockString.mjs\nvar blockString = __webpack_require__(5995);\n;// CONCATENATED MODULE: ./node_modules/graphql/language/printString.mjs\n/**\n * Prints a string as a GraphQL StringValue literal. Replaces control characters\n * and excluded characters (\" U+0022 and \\\\ U+005C) with escape sequences.\n */\nfunction printString(str) {\n return `\"${str.replace(escapedRegExp, escapedReplacer)}\"`;\n} // eslint-disable-next-line no-control-regex\n\nconst escapedRegExp = /[\\x00-\\x1f\\x22\\x5c\\x7f-\\x9f]/g;\n\nfunction escapedReplacer(str) {\n return escapeSequences[str.charCodeAt(0)];\n} // prettier-ignore\n\nconst escapeSequences = [\n '\\\\u0000',\n '\\\\u0001',\n '\\\\u0002',\n '\\\\u0003',\n '\\\\u0004',\n '\\\\u0005',\n '\\\\u0006',\n '\\\\u0007',\n '\\\\b',\n '\\\\t',\n '\\\\n',\n '\\\\u000B',\n '\\\\f',\n '\\\\r',\n '\\\\u000E',\n '\\\\u000F',\n '\\\\u0010',\n '\\\\u0011',\n '\\\\u0012',\n '\\\\u0013',\n '\\\\u0014',\n '\\\\u0015',\n '\\\\u0016',\n '\\\\u0017',\n '\\\\u0018',\n '\\\\u0019',\n '\\\\u001A',\n '\\\\u001B',\n '\\\\u001C',\n '\\\\u001D',\n '\\\\u001E',\n '\\\\u001F',\n '',\n '',\n '\\\\\"',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '', // 2F\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '', // 3F\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '', // 4F\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '\\\\\\\\',\n '',\n '',\n '', // 5F\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '', // 6F\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '\\\\u007F',\n '\\\\u0080',\n '\\\\u0081',\n '\\\\u0082',\n '\\\\u0083',\n '\\\\u0084',\n '\\\\u0085',\n '\\\\u0086',\n '\\\\u0087',\n '\\\\u0088',\n '\\\\u0089',\n '\\\\u008A',\n '\\\\u008B',\n '\\\\u008C',\n '\\\\u008D',\n '\\\\u008E',\n '\\\\u008F',\n '\\\\u0090',\n '\\\\u0091',\n '\\\\u0092',\n '\\\\u0093',\n '\\\\u0094',\n '\\\\u0095',\n '\\\\u0096',\n '\\\\u0097',\n '\\\\u0098',\n '\\\\u0099',\n '\\\\u009A',\n '\\\\u009B',\n '\\\\u009C',\n '\\\\u009D',\n '\\\\u009E',\n '\\\\u009F',\n];\n\n// EXTERNAL MODULE: ./node_modules/graphql/language/visitor.mjs\nvar visitor = __webpack_require__(4705);\n;// CONCATENATED MODULE: ./node_modules/graphql/language/printer.mjs\n\n\n\n/**\n * Converts an AST into a string, using one set of reasonable\n * formatting rules.\n */\n\nfunction print(ast) {\n return (0,visitor/* visit */.YR)(ast, printDocASTReducer);\n}\nconst MAX_LINE_LENGTH = 80;\nconst printDocASTReducer = {\n Name: {\n leave: (node) => node.value,\n },\n Variable: {\n leave: (node) => '$' + node.name,\n },\n // Document\n Document: {\n leave: (node) => join(node.definitions, '\\n\\n'),\n },\n OperationDefinition: {\n leave(node) {\n const varDefs = wrap('(', join(node.variableDefinitions, ', '), ')');\n const prefix = join(\n [\n node.operation,\n join([node.name, varDefs]),\n join(node.directives, ' '),\n ],\n ' ',\n ); // Anonymous queries with no directives or variable definitions can use\n // the query short form.\n\n return (prefix === 'query' ? '' : prefix + ' ') + node.selectionSet;\n },\n },\n VariableDefinition: {\n leave: ({ variable, type, defaultValue, directives }) =>\n variable +\n ': ' +\n type +\n wrap(' = ', defaultValue) +\n wrap(' ', join(directives, ' ')),\n },\n SelectionSet: {\n leave: ({ selections }) => block(selections),\n },\n Field: {\n leave({ alias, name, arguments: args, directives, selectionSet }) {\n const prefix = wrap('', alias, ': ') + name;\n let argsLine = prefix + wrap('(', join(args, ', '), ')');\n\n if (argsLine.length > MAX_LINE_LENGTH) {\n argsLine = prefix + wrap('(\\n', indent(join(args, '\\n')), '\\n)');\n }\n\n return join([argsLine, join(directives, ' '), selectionSet], ' ');\n },\n },\n Argument: {\n leave: ({ name, value }) => name + ': ' + value,\n },\n // Fragments\n FragmentSpread: {\n leave: ({ name, directives }) =>\n '...' + name + wrap(' ', join(directives, ' ')),\n },\n InlineFragment: {\n leave: ({ typeCondition, directives, selectionSet }) =>\n join(\n [\n '...',\n wrap('on ', typeCondition),\n join(directives, ' '),\n selectionSet,\n ],\n ' ',\n ),\n },\n FragmentDefinition: {\n leave: (\n { name, typeCondition, variableDefinitions, directives, selectionSet }, // Note: fragment variable definitions are experimental and may be changed\n ) =>\n // or removed in the future.\n `fragment ${name}${wrap('(', join(variableDefinitions, ', '), ')')} ` +\n `on ${typeCondition} ${wrap('', join(directives, ' '), ' ')}` +\n selectionSet,\n },\n // Value\n IntValue: {\n leave: ({ value }) => value,\n },\n FloatValue: {\n leave: ({ value }) => value,\n },\n StringValue: {\n leave: ({ value, block: isBlockString }) =>\n isBlockString ? (0,blockString/* printBlockString */.yo)(value) : printString(value),\n },\n BooleanValue: {\n leave: ({ value }) => (value ? 'true' : 'false'),\n },\n NullValue: {\n leave: () => 'null',\n },\n EnumValue: {\n leave: ({ value }) => value,\n },\n ListValue: {\n leave: ({ values }) => '[' + join(values, ', ') + ']',\n },\n ObjectValue: {\n leave: ({ fields }) => '{' + join(fields, ', ') + '}',\n },\n ObjectField: {\n leave: ({ name, value }) => name + ': ' + value,\n },\n // Directive\n Directive: {\n leave: ({ name, arguments: args }) =>\n '@' + name + wrap('(', join(args, ', '), ')'),\n },\n // Type\n NamedType: {\n leave: ({ name }) => name,\n },\n ListType: {\n leave: ({ type }) => '[' + type + ']',\n },\n NonNullType: {\n leave: ({ type }) => type + '!',\n },\n // Type System Definitions\n SchemaDefinition: {\n leave: ({ description, directives, operationTypes }) =>\n wrap('', description, '\\n') +\n join(['schema', join(directives, ' '), block(operationTypes)], ' '),\n },\n OperationTypeDefinition: {\n leave: ({ operation, type }) => operation + ': ' + type,\n },\n ScalarTypeDefinition: {\n leave: ({ description, name, directives }) =>\n wrap('', description, '\\n') +\n join(['scalar', name, join(directives, ' ')], ' '),\n },\n ObjectTypeDefinition: {\n leave: ({ description, name, interfaces, directives, fields }) =>\n wrap('', description, '\\n') +\n join(\n [\n 'type',\n name,\n wrap('implements ', join(interfaces, ' & ')),\n join(directives, ' '),\n block(fields),\n ],\n ' ',\n ),\n },\n FieldDefinition: {\n leave: ({ description, name, arguments: args, type, directives }) =>\n wrap('', description, '\\n') +\n name +\n (hasMultilineItems(args)\n ? wrap('(\\n', indent(join(args, '\\n')), '\\n)')\n : wrap('(', join(args, ', '), ')')) +\n ': ' +\n type +\n wrap(' ', join(directives, ' ')),\n },\n InputValueDefinition: {\n leave: ({ description, name, type, defaultValue, directives }) =>\n wrap('', description, '\\n') +\n join(\n [name + ': ' + type, wrap('= ', defaultValue), join(directives, ' ')],\n ' ',\n ),\n },\n InterfaceTypeDefinition: {\n leave: ({ description, name, interfaces, directives, fields }) =>\n wrap('', description, '\\n') +\n join(\n [\n 'interface',\n name,\n wrap('implements ', join(interfaces, ' & ')),\n join(directives, ' '),\n block(fields),\n ],\n ' ',\n ),\n },\n UnionTypeDefinition: {\n leave: ({ description, name, directives, types }) =>\n wrap('', description, '\\n') +\n join(\n ['union', name, join(directives, ' '), wrap('= ', join(types, ' | '))],\n ' ',\n ),\n },\n EnumTypeDefinition: {\n leave: ({ description, name, directives, values }) =>\n wrap('', description, '\\n') +\n join(['enum', name, join(directives, ' '), block(values)], ' '),\n },\n EnumValueDefinition: {\n leave: ({ description, name, directives }) =>\n wrap('', description, '\\n') + join([name, join(directives, ' ')], ' '),\n },\n InputObjectTypeDefinition: {\n leave: ({ description, name, directives, fields }) =>\n wrap('', description, '\\n') +\n join(['input', name, join(directives, ' '), block(fields)], ' '),\n },\n DirectiveDefinition: {\n leave: ({ description, name, arguments: args, repeatable, locations }) =>\n wrap('', description, '\\n') +\n 'directive @' +\n name +\n (hasMultilineItems(args)\n ? wrap('(\\n', indent(join(args, '\\n')), '\\n)')\n : wrap('(', join(args, ', '), ')')) +\n (repeatable ? ' repeatable' : '') +\n ' on ' +\n join(locations, ' | '),\n },\n SchemaExtension: {\n leave: ({ directives, operationTypes }) =>\n join(\n ['extend schema', join(directives, ' '), block(operationTypes)],\n ' ',\n ),\n },\n ScalarTypeExtension: {\n leave: ({ name, directives }) =>\n join(['extend scalar', name, join(directives, ' ')], ' '),\n },\n ObjectTypeExtension: {\n leave: ({ name, interfaces, directives, fields }) =>\n join(\n [\n 'extend type',\n name,\n wrap('implements ', join(interfaces, ' & ')),\n join(directives, ' '),\n block(fields),\n ],\n ' ',\n ),\n },\n InterfaceTypeExtension: {\n leave: ({ name, interfaces, directives, fields }) =>\n join(\n [\n 'extend interface',\n name,\n wrap('implements ', join(interfaces, ' & ')),\n join(directives, ' '),\n block(fields),\n ],\n ' ',\n ),\n },\n UnionTypeExtension: {\n leave: ({ name, directives, types }) =>\n join(\n [\n 'extend union',\n name,\n join(directives, ' '),\n wrap('= ', join(types, ' | ')),\n ],\n ' ',\n ),\n },\n EnumTypeExtension: {\n leave: ({ name, directives, values }) =>\n join(['extend enum', name, join(directives, ' '), block(values)], ' '),\n },\n InputObjectTypeExtension: {\n leave: ({ name, directives, fields }) =>\n join(['extend input', name, join(directives, ' '), block(fields)], ' '),\n },\n};\n/**\n * Given maybeArray, print an empty string if it is null or empty, otherwise\n * print all items together separated by separator if provided\n */\n\nfunction join(maybeArray, separator = '') {\n var _maybeArray$filter$jo;\n\n return (_maybeArray$filter$jo =\n maybeArray === null || maybeArray === void 0\n ? void 0\n : maybeArray.filter((x) => x).join(separator)) !== null &&\n _maybeArray$filter$jo !== void 0\n ? _maybeArray$filter$jo\n : '';\n}\n/**\n * Given array, print each item on its own line, wrapped in an indented `{ }` block.\n */\n\nfunction block(array) {\n return wrap('{\\n', indent(join(array, '\\n')), '\\n}');\n}\n/**\n * If maybeString is not null or empty, then wrap with start and end, otherwise print an empty string.\n */\n\nfunction wrap(start, maybeString, end = '') {\n return maybeString != null && maybeString !== ''\n ? start + maybeString + end\n : '';\n}\n\nfunction indent(str) {\n return wrap(' ', str.replace(/\\n/g, '\\n '));\n}\n\nfunction hasMultilineItems(maybeArray) {\n var _maybeArray$some;\n\n // FIXME: https://github.com/graphql/graphql-js/issues/2203\n\n /* c8 ignore next */\n return (_maybeArray$some =\n maybeArray === null || maybeArray === void 0\n ? void 0\n : maybeArray.some((str) => str.includes('\\n'))) !== null &&\n _maybeArray$some !== void 0\n ? _maybeArray$some\n : false;\n}\n\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/caching/caches.js\nvar caches = __webpack_require__(599);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/caching/sizes.js\nvar sizes = __webpack_require__(1212);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/caching/getMemoryInternals.js\nvar getMemoryInternals = __webpack_require__(5051);\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/utilities/graphql/print.js\n\n\n\nvar printCache;\nvar print_print = Object.assign(function (ast) {\n var result = printCache.get(ast);\n if (!result) {\n result = print(ast);\n printCache.set(ast, result);\n }\n return result;\n}, {\n reset: function () {\n printCache = new caches/* AutoCleanedWeakCache */.A(sizes/* cacheSizes */.v.print || 2000 /* defaultCacheSizes.print */);\n },\n});\nprint_print.reset();\nif (globalThis.__DEV__ !== false) {\n (0,getMemoryInternals/* registerGlobalCache */.D_)(\"print\", function () { return (printCache ? printCache.size : 0); });\n}\n//# sourceMappingURL=print.js.map\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@apollo/client/utilities/graphql/print.js_+_2_modules?", + ); + + /***/ + }, + + /***/ 7194: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ A_: () => (/* binding */ isReference),\n/* harmony export */ D$: () => (/* binding */ getTypenameFromResult),\n/* harmony export */ Ii: () => (/* binding */ storeKeyNameFromField),\n/* harmony export */ J: () => (/* binding */ valueToObjectRepresentation),\n/* harmony export */ Kc: () => (/* binding */ isDocumentNode),\n/* harmony export */ MB: () => (/* binding */ argumentsObjectFromField),\n/* harmony export */ WU: () => (/* binding */ makeReference),\n/* harmony export */ dt: () => (/* binding */ isField),\n/* harmony export */ kd: () => (/* binding */ isInlineFragment),\n/* harmony export */ o5: () => (/* binding */ getStoreKeyName),\n/* harmony export */ ue: () => (/* binding */ resultKeyNameFromField)\n/* harmony export */ });\n/* harmony import */ var _globals_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6319);\n/* harmony import */ var _common_objects_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2456);\n/* harmony import */ var _fragments_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(5215);\n/* harmony import */ var _common_canonicalStringify_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6269);\n\n\n\n\nfunction makeReference(id) {\n return { __ref: String(id) };\n}\nfunction isReference(obj) {\n return Boolean(obj && typeof obj === "object" && typeof obj.__ref === "string");\n}\nfunction isDocumentNode(value) {\n return ((0,_common_objects_js__WEBPACK_IMPORTED_MODULE_1__/* .isNonNullObject */ .U)(value) &&\n value.kind === "Document" &&\n Array.isArray(value.definitions));\n}\nfunction isStringValue(value) {\n return value.kind === "StringValue";\n}\nfunction isBooleanValue(value) {\n return value.kind === "BooleanValue";\n}\nfunction isIntValue(value) {\n return value.kind === "IntValue";\n}\nfunction isFloatValue(value) {\n return value.kind === "FloatValue";\n}\nfunction isVariable(value) {\n return value.kind === "Variable";\n}\nfunction isObjectValue(value) {\n return value.kind === "ObjectValue";\n}\nfunction isListValue(value) {\n return value.kind === "ListValue";\n}\nfunction isEnumValue(value) {\n return value.kind === "EnumValue";\n}\nfunction isNullValue(value) {\n return value.kind === "NullValue";\n}\nfunction valueToObjectRepresentation(argObj, name, value, variables) {\n if (isIntValue(value) || isFloatValue(value)) {\n argObj[name.value] = Number(value.value);\n }\n else if (isBooleanValue(value) || isStringValue(value)) {\n argObj[name.value] = value.value;\n }\n else if (isObjectValue(value)) {\n var nestedArgObj_1 = {};\n value.fields.map(function (obj) {\n return valueToObjectRepresentation(nestedArgObj_1, obj.name, obj.value, variables);\n });\n argObj[name.value] = nestedArgObj_1;\n }\n else if (isVariable(value)) {\n var variableValue = (variables || {})[value.name.value];\n argObj[name.value] = variableValue;\n }\n else if (isListValue(value)) {\n argObj[name.value] = value.values.map(function (listValue) {\n var nestedArgArrayObj = {};\n valueToObjectRepresentation(nestedArgArrayObj, name, listValue, variables);\n return nestedArgArrayObj[name.value];\n });\n }\n else if (isEnumValue(value)) {\n argObj[name.value] = value.value;\n }\n else if (isNullValue(value)) {\n argObj[name.value] = null;\n }\n else {\n throw (0,_globals_index_js__WEBPACK_IMPORTED_MODULE_0__/* .newInvariantError */ .vA)(83, name.value, value.kind);\n }\n}\nfunction storeKeyNameFromField(field, variables) {\n var directivesObj = null;\n if (field.directives) {\n directivesObj = {};\n field.directives.forEach(function (directive) {\n directivesObj[directive.name.value] = {};\n if (directive.arguments) {\n directive.arguments.forEach(function (_a) {\n var name = _a.name, value = _a.value;\n return valueToObjectRepresentation(directivesObj[directive.name.value], name, value, variables);\n });\n }\n });\n }\n var argObj = null;\n if (field.arguments && field.arguments.length) {\n argObj = {};\n field.arguments.forEach(function (_a) {\n var name = _a.name, value = _a.value;\n return valueToObjectRepresentation(argObj, name, value, variables);\n });\n }\n return getStoreKeyName(field.name.value, argObj, directivesObj);\n}\nvar KNOWN_DIRECTIVES = [\n "connection",\n "include",\n "skip",\n "client",\n "rest",\n "export",\n "nonreactive",\n];\n// Default stable JSON.stringify implementation used by getStoreKeyName. Can be\n// updated/replaced with something better by calling\n// getStoreKeyName.setStringify(newStringifyFunction).\nvar storeKeyNameStringify = _common_canonicalStringify_js__WEBPACK_IMPORTED_MODULE_2__/* .canonicalStringify */ .M;\nvar getStoreKeyName = Object.assign(function (fieldName, args, directives) {\n if (args &&\n directives &&\n directives["connection"] &&\n directives["connection"]["key"]) {\n if (directives["connection"]["filter"] &&\n directives["connection"]["filter"].length > 0) {\n var filterKeys = directives["connection"]["filter"] ?\n directives["connection"]["filter"]\n : [];\n filterKeys.sort();\n var filteredArgs_1 = {};\n filterKeys.forEach(function (key) {\n filteredArgs_1[key] = args[key];\n });\n return "".concat(directives["connection"]["key"], "(").concat(storeKeyNameStringify(filteredArgs_1), ")");\n }\n else {\n return directives["connection"]["key"];\n }\n }\n var completeFieldName = fieldName;\n if (args) {\n // We can\'t use `JSON.stringify` here since it\'s non-deterministic,\n // and can lead to different store key names being created even though\n // the `args` object used during creation has the same properties/values.\n var stringifiedArgs = storeKeyNameStringify(args);\n completeFieldName += "(".concat(stringifiedArgs, ")");\n }\n if (directives) {\n Object.keys(directives).forEach(function (key) {\n if (KNOWN_DIRECTIVES.indexOf(key) !== -1)\n return;\n if (directives[key] && Object.keys(directives[key]).length) {\n completeFieldName += "@".concat(key, "(").concat(storeKeyNameStringify(directives[key]), ")");\n }\n else {\n completeFieldName += "@".concat(key);\n }\n });\n }\n return completeFieldName;\n}, {\n setStringify: function (s) {\n var previous = storeKeyNameStringify;\n storeKeyNameStringify = s;\n return previous;\n },\n});\nfunction argumentsObjectFromField(field, variables) {\n if (field.arguments && field.arguments.length) {\n var argObj_1 = {};\n field.arguments.forEach(function (_a) {\n var name = _a.name, value = _a.value;\n return valueToObjectRepresentation(argObj_1, name, value, variables);\n });\n return argObj_1;\n }\n return null;\n}\nfunction resultKeyNameFromField(field) {\n return field.alias ? field.alias.value : field.name.value;\n}\nfunction getTypenameFromResult(result, selectionSet, fragmentMap) {\n var fragments;\n for (var _i = 0, _a = selectionSet.selections; _i < _a.length; _i++) {\n var selection = _a[_i];\n if (isField(selection)) {\n if (selection.name.value === "__typename") {\n return result[resultKeyNameFromField(selection)];\n }\n }\n else if (fragments) {\n fragments.push(selection);\n }\n else {\n fragments = [selection];\n }\n }\n if (typeof result.__typename === "string") {\n return result.__typename;\n }\n if (fragments) {\n for (var _b = 0, fragments_1 = fragments; _b < fragments_1.length; _b++) {\n var selection = fragments_1[_b];\n var typename = getTypenameFromResult(result, (0,_fragments_js__WEBPACK_IMPORTED_MODULE_3__/* .getFragmentFromSelection */ .HQ)(selection, fragmentMap).selectionSet, fragmentMap);\n if (typeof typename === "string") {\n return typename;\n }\n }\n }\n}\nfunction isField(selection) {\n return selection.kind === "Field";\n}\nfunction isInlineFragment(selection) {\n return selection.kind === "InlineFragment";\n}\n//# sourceMappingURL=storeUtils.js.map\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@apollo/client/utilities/graphql/storeUtils.js?', + ); + + /***/ + }, + + /***/ 3902: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ XY: () => (/* binding */ addTypenameToDocument),\n/* harmony export */ er: () => (/* binding */ removeClientSetsFromDocument),\n/* harmony export */ iz: () => (/* binding */ removeDirectivesFromDocument),\n/* harmony export */ zc: () => (/* binding */ buildQueryFromSelectionSet)\n/* harmony export */ });\n/* unused harmony exports removeConnectionDirectiveFromDocument, removeArgumentsFromDocument, removeFragmentSpreadFromDocument */\n/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(1635);\n/* harmony import */ var _globals_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6319);\n/* harmony import */ var graphql__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3298);\n/* harmony import */ var graphql__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(4705);\n/* harmony import */ var _getFromAST_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4824);\n/* harmony import */ var _storeUtils_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(7194);\n/* harmony import */ var _fragments_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(5215);\n/* harmony import */ var _common_arrays_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(5636);\n\n\n\n\n\n\n\nvar TYPENAME_FIELD = {\n kind: graphql__WEBPACK_IMPORTED_MODULE_1__/* .Kind */ .b.FIELD,\n name: {\n kind: graphql__WEBPACK_IMPORTED_MODULE_1__/* .Kind */ .b.NAME,\n value: "__typename",\n },\n};\nfunction isEmpty(op, fragmentMap) {\n return (!op ||\n op.selectionSet.selections.every(function (selection) {\n return selection.kind === graphql__WEBPACK_IMPORTED_MODULE_1__/* .Kind */ .b.FRAGMENT_SPREAD &&\n isEmpty(fragmentMap[selection.name.value], fragmentMap);\n }));\n}\nfunction nullIfDocIsEmpty(doc) {\n return (isEmpty((0,_getFromAST_js__WEBPACK_IMPORTED_MODULE_2__/* .getOperationDefinition */ .Vu)(doc) || (0,_getFromAST_js__WEBPACK_IMPORTED_MODULE_2__/* .getFragmentDefinition */ .E4)(doc), (0,_fragments_js__WEBPACK_IMPORTED_MODULE_3__/* .createFragmentMap */ .JG)((0,_getFromAST_js__WEBPACK_IMPORTED_MODULE_2__/* .getFragmentDefinitions */ .zK)(doc)))) ?\n null\n : doc;\n}\nfunction getDirectiveMatcher(configs) {\n var names = new Map();\n var tests = new Map();\n configs.forEach(function (directive) {\n if (directive) {\n if (directive.name) {\n names.set(directive.name, directive);\n }\n else if (directive.test) {\n tests.set(directive.test, directive);\n }\n }\n });\n return function (directive) {\n var config = names.get(directive.name.value);\n if (!config && tests.size) {\n tests.forEach(function (testConfig, test) {\n if (test(directive)) {\n config = testConfig;\n }\n });\n }\n return config;\n };\n}\nfunction makeInUseGetterFunction(defaultKey) {\n var map = new Map();\n return function inUseGetterFunction(key) {\n if (key === void 0) { key = defaultKey; }\n var inUse = map.get(key);\n if (!inUse) {\n map.set(key, (inUse = {\n // Variable and fragment spread names used directly within this\n // operation or fragment definition, as identified by key. These sets\n // will be populated during the first traversal of the document in\n // removeDirectivesFromDocument below.\n variables: new Set(),\n fragmentSpreads: new Set(),\n }));\n }\n return inUse;\n };\n}\nfunction removeDirectivesFromDocument(directives, doc) {\n (0,_getFromAST_js__WEBPACK_IMPORTED_MODULE_2__/* .checkDocument */ .sw)(doc);\n // Passing empty strings to makeInUseGetterFunction means we handle anonymous\n // operations as if their names were "". Anonymous fragment definitions are\n // not supposed to be possible, but the same default naming strategy seems\n // appropriate for that case as well.\n var getInUseByOperationName = makeInUseGetterFunction("");\n var getInUseByFragmentName = makeInUseGetterFunction("");\n var getInUse = function (ancestors) {\n for (var p = 0, ancestor = void 0; p < ancestors.length && (ancestor = ancestors[p]); ++p) {\n if ((0,_common_arrays_js__WEBPACK_IMPORTED_MODULE_4__/* .isArray */ .c)(ancestor))\n continue;\n if (ancestor.kind === graphql__WEBPACK_IMPORTED_MODULE_1__/* .Kind */ .b.OPERATION_DEFINITION) {\n // If an operation is anonymous, we use the empty string as its key.\n return getInUseByOperationName(ancestor.name && ancestor.name.value);\n }\n if (ancestor.kind === graphql__WEBPACK_IMPORTED_MODULE_1__/* .Kind */ .b.FRAGMENT_DEFINITION) {\n return getInUseByFragmentName(ancestor.name.value);\n }\n }\n globalThis.__DEV__ !== false && _globals_index_js__WEBPACK_IMPORTED_MODULE_0__/* .invariant */ .V1.error(84);\n return null;\n };\n var operationCount = 0;\n for (var i = doc.definitions.length - 1; i >= 0; --i) {\n if (doc.definitions[i].kind === graphql__WEBPACK_IMPORTED_MODULE_1__/* .Kind */ .b.OPERATION_DEFINITION) {\n ++operationCount;\n }\n }\n var directiveMatcher = getDirectiveMatcher(directives);\n var shouldRemoveField = function (nodeDirectives) {\n return (0,_common_arrays_js__WEBPACK_IMPORTED_MODULE_4__/* .isNonEmptyArray */ .E)(nodeDirectives) &&\n nodeDirectives\n .map(directiveMatcher)\n .some(function (config) { return config && config.remove; });\n };\n var originalFragmentDefsByPath = new Map();\n // Any time the first traversal of the document below makes a change like\n // removing a fragment (by returning null), this variable should be set to\n // true. Once it becomes true, it should never be set to false again. If this\n // variable remains false throughout the traversal, then we can return the\n // original doc immediately without any modifications.\n var firstVisitMadeChanges = false;\n var fieldOrInlineFragmentVisitor = {\n enter: function (node) {\n if (shouldRemoveField(node.directives)) {\n firstVisitMadeChanges = true;\n return null;\n }\n },\n };\n var docWithoutDirectiveSubtrees = (0,graphql__WEBPACK_IMPORTED_MODULE_5__/* .visit */ .YR)(doc, {\n // These two AST node types share the same implementation, defined above.\n Field: fieldOrInlineFragmentVisitor,\n InlineFragment: fieldOrInlineFragmentVisitor,\n VariableDefinition: {\n enter: function () {\n // VariableDefinition nodes do not count as variables in use, though\n // they do contain Variable nodes that might be visited below. To avoid\n // counting variable declarations as usages, we skip visiting the\n // contents of this VariableDefinition node by returning false.\n return false;\n },\n },\n Variable: {\n enter: function (node, _key, _parent, _path, ancestors) {\n var inUse = getInUse(ancestors);\n if (inUse) {\n inUse.variables.add(node.name.value);\n }\n },\n },\n FragmentSpread: {\n enter: function (node, _key, _parent, _path, ancestors) {\n if (shouldRemoveField(node.directives)) {\n firstVisitMadeChanges = true;\n return null;\n }\n var inUse = getInUse(ancestors);\n if (inUse) {\n inUse.fragmentSpreads.add(node.name.value);\n }\n // We might like to remove this FragmentSpread by returning null here if\n // the corresponding FragmentDefinition node is also going to be removed\n // by the logic below, but we can\'t control the relative order of those\n // events, so we have to postpone the removal of dangling FragmentSpread\n // nodes until after the current visit of the document has finished.\n },\n },\n FragmentDefinition: {\n enter: function (node, _key, _parent, path) {\n originalFragmentDefsByPath.set(JSON.stringify(path), node);\n },\n leave: function (node, _key, _parent, path) {\n var originalNode = originalFragmentDefsByPath.get(JSON.stringify(path));\n if (node === originalNode) {\n // If the FragmentNode received by this leave function is identical to\n // the one received by the corresponding enter function (above), then\n // the visitor must not have made any changes within this\n // FragmentDefinition node. This fragment definition may still be\n // removed if there are no ...spread references to it, but it won\'t be\n // removed just because it has only a __typename field.\n return node;\n }\n if (\n // This logic applies only if the document contains one or more\n // operations, since removing all fragments from a document containing\n // only fragments makes the document useless.\n operationCount > 0 &&\n node.selectionSet.selections.every(function (selection) {\n return selection.kind === graphql__WEBPACK_IMPORTED_MODULE_1__/* .Kind */ .b.FIELD &&\n selection.name.value === "__typename";\n })) {\n // This is a somewhat opinionated choice: if a FragmentDefinition ends\n // up having no fields other than __typename, we remove the whole\n // fragment definition, and later prune ...spread references to it.\n getInUseByFragmentName(node.name.value).removed = true;\n firstVisitMadeChanges = true;\n return null;\n }\n },\n },\n Directive: {\n leave: function (node) {\n // If a matching directive is found, remove the directive itself. Note\n // that this does not remove the target (field, argument, etc) of the\n // directive, but only the directive itself.\n if (directiveMatcher(node)) {\n firstVisitMadeChanges = true;\n return null;\n }\n },\n },\n });\n if (!firstVisitMadeChanges) {\n // If our first pass did not change anything about the document, then there\n // is no cleanup we need to do, and we can return the original doc.\n return doc;\n }\n // Utility for making sure inUse.transitiveVars is recursively populated.\n // Because this logic assumes inUse.fragmentSpreads has been completely\n // populated and inUse.removed has been set if appropriate,\n // populateTransitiveVars must be called after that information has been\n // collected by the first traversal of the document.\n var populateTransitiveVars = function (inUse) {\n if (!inUse.transitiveVars) {\n inUse.transitiveVars = new Set(inUse.variables);\n if (!inUse.removed) {\n inUse.fragmentSpreads.forEach(function (childFragmentName) {\n populateTransitiveVars(getInUseByFragmentName(childFragmentName)).transitiveVars.forEach(function (varName) {\n inUse.transitiveVars.add(varName);\n });\n });\n }\n }\n return inUse;\n };\n // Since we\'ve been keeping track of fragment spreads used by particular\n // operations and fragment definitions, we now need to compute the set of all\n // spreads used (transitively) by any operations in the document.\n var allFragmentNamesUsed = new Set();\n docWithoutDirectiveSubtrees.definitions.forEach(function (def) {\n if (def.kind === graphql__WEBPACK_IMPORTED_MODULE_1__/* .Kind */ .b.OPERATION_DEFINITION) {\n populateTransitiveVars(getInUseByOperationName(def.name && def.name.value)).fragmentSpreads.forEach(function (childFragmentName) {\n allFragmentNamesUsed.add(childFragmentName);\n });\n }\n else if (def.kind === graphql__WEBPACK_IMPORTED_MODULE_1__/* .Kind */ .b.FRAGMENT_DEFINITION &&\n // If there are no operations in the document, then all fragment\n // definitions count as usages of their own fragment names. This heuristic\n // prevents accidentally removing all fragment definitions from the\n // document just because it contains no operations that use the fragments.\n operationCount === 0 &&\n !getInUseByFragmentName(def.name.value).removed) {\n allFragmentNamesUsed.add(def.name.value);\n }\n });\n // Now that we have added all fragment spreads used by operations to the\n // allFragmentNamesUsed set, we can complete the set by transitively adding\n // all fragment spreads used by those fragments, and so on.\n allFragmentNamesUsed.forEach(function (fragmentName) {\n // Once all the childFragmentName strings added here have been seen already,\n // the top-level allFragmentNamesUsed.forEach loop will terminate.\n populateTransitiveVars(getInUseByFragmentName(fragmentName)).fragmentSpreads.forEach(function (childFragmentName) {\n allFragmentNamesUsed.add(childFragmentName);\n });\n });\n var fragmentWillBeRemoved = function (fragmentName) {\n return !!(\n // A fragment definition will be removed if there are no spreads that refer\n // to it, or the fragment was explicitly removed because it had no fields\n // other than __typename.\n (!allFragmentNamesUsed.has(fragmentName) ||\n getInUseByFragmentName(fragmentName).removed));\n };\n var enterVisitor = {\n enter: function (node) {\n if (fragmentWillBeRemoved(node.name.value)) {\n return null;\n }\n },\n };\n return nullIfDocIsEmpty((0,graphql__WEBPACK_IMPORTED_MODULE_5__/* .visit */ .YR)(docWithoutDirectiveSubtrees, {\n // If the fragment is going to be removed, then leaving any dangling\n // FragmentSpread nodes with the same name would be a mistake.\n FragmentSpread: enterVisitor,\n // This is where the fragment definition is actually removed.\n FragmentDefinition: enterVisitor,\n OperationDefinition: {\n leave: function (node) {\n // Upon leaving each operation in the depth-first AST traversal, prune\n // any variables that are declared by the operation but unused within.\n if (node.variableDefinitions) {\n var usedVariableNames_1 = populateTransitiveVars(\n // If an operation is anonymous, we use the empty string as its key.\n getInUseByOperationName(node.name && node.name.value)).transitiveVars;\n // According to the GraphQL spec, all variables declared by an\n // operation must either be used by that operation or used by some\n // fragment included transitively into that operation:\n // https://spec.graphql.org/draft/#sec-All-Variables-Used\n //\n // To stay on the right side of this validation rule, if/when we\n // remove the last $var references from an operation or its fragments,\n // we must also remove the corresponding $var declaration from the\n // enclosing operation. This pruning applies only to operations and\n // not fragment definitions, at the moment. Fragments may be able to\n // declare variables eventually, but today they can only consume them.\n if (usedVariableNames_1.size < node.variableDefinitions.length) {\n return (0,tslib__WEBPACK_IMPORTED_MODULE_6__/* .__assign */ .Cl)((0,tslib__WEBPACK_IMPORTED_MODULE_6__/* .__assign */ .Cl)({}, node), { variableDefinitions: node.variableDefinitions.filter(function (varDef) {\n return usedVariableNames_1.has(varDef.variable.name.value);\n }) });\n }\n }\n },\n },\n }));\n}\nvar addTypenameToDocument = Object.assign(function (doc) {\n return (0,graphql__WEBPACK_IMPORTED_MODULE_5__/* .visit */ .YR)(doc, {\n SelectionSet: {\n enter: function (node, _key, parent) {\n // Don\'t add __typename to OperationDefinitions.\n if (parent &&\n parent.kind ===\n graphql__WEBPACK_IMPORTED_MODULE_1__/* .Kind */ .b.OPERATION_DEFINITION) {\n return;\n }\n // No changes if no selections.\n var selections = node.selections;\n if (!selections) {\n return;\n }\n // If selections already have a __typename, or are part of an\n // introspection query, do nothing.\n var skip = selections.some(function (selection) {\n return ((0,_storeUtils_js__WEBPACK_IMPORTED_MODULE_7__/* .isField */ .dt)(selection) &&\n (selection.name.value === "__typename" ||\n selection.name.value.lastIndexOf("__", 0) === 0));\n });\n if (skip) {\n return;\n }\n // If this SelectionSet is @export-ed as an input variable, it should\n // not have a __typename field (see issue #4691).\n var field = parent;\n if ((0,_storeUtils_js__WEBPACK_IMPORTED_MODULE_7__/* .isField */ .dt)(field) &&\n field.directives &&\n field.directives.some(function (d) { return d.name.value === "export"; })) {\n return;\n }\n // Create and return a new SelectionSet with a __typename Field.\n return (0,tslib__WEBPACK_IMPORTED_MODULE_6__/* .__assign */ .Cl)((0,tslib__WEBPACK_IMPORTED_MODULE_6__/* .__assign */ .Cl)({}, node), { selections: (0,tslib__WEBPACK_IMPORTED_MODULE_6__/* .__spreadArray */ .fX)((0,tslib__WEBPACK_IMPORTED_MODULE_6__/* .__spreadArray */ .fX)([], selections, true), [TYPENAME_FIELD], false) });\n },\n },\n });\n}, {\n added: function (field) {\n return field === TYPENAME_FIELD;\n },\n});\nvar connectionRemoveConfig = {\n test: function (directive) {\n var willRemove = directive.name.value === "connection";\n if (willRemove) {\n if (!directive.arguments ||\n !directive.arguments.some(function (arg) { return arg.name.value === "key"; })) {\n globalThis.__DEV__ !== false && _globals_index_js__WEBPACK_IMPORTED_MODULE_0__/* .invariant */ .V1.warn(85);\n }\n }\n return willRemove;\n },\n};\nfunction removeConnectionDirectiveFromDocument(doc) {\n return removeDirectivesFromDocument([connectionRemoveConfig], checkDocument(doc));\n}\nfunction hasDirectivesInSelectionSet(directives, selectionSet, nestedCheck) {\n if (nestedCheck === void 0) { nestedCheck = true; }\n return (!!selectionSet &&\n selectionSet.selections &&\n selectionSet.selections.some(function (selection) {\n return hasDirectivesInSelection(directives, selection, nestedCheck);\n }));\n}\nfunction hasDirectivesInSelection(directives, selection, nestedCheck) {\n if (nestedCheck === void 0) { nestedCheck = true; }\n if (!isField(selection)) {\n return true;\n }\n if (!selection.directives) {\n return false;\n }\n return (selection.directives.some(getDirectiveMatcher(directives)) ||\n (nestedCheck &&\n hasDirectivesInSelectionSet(directives, selection.selectionSet, nestedCheck)));\n}\nfunction getArgumentMatcher(config) {\n return function argumentMatcher(argument) {\n return config.some(function (aConfig) {\n return argument.value &&\n argument.value.kind === Kind.VARIABLE &&\n argument.value.name &&\n (aConfig.name === argument.value.name.value ||\n (aConfig.test && aConfig.test(argument)));\n });\n };\n}\nfunction removeArgumentsFromDocument(config, doc) {\n var argMatcher = getArgumentMatcher(config);\n return nullIfDocIsEmpty(visit(doc, {\n OperationDefinition: {\n enter: function (node) {\n return __assign(__assign({}, node), { \n // Remove matching top level variables definitions.\n variableDefinitions: node.variableDefinitions ?\n node.variableDefinitions.filter(function (varDef) {\n return !config.some(function (arg) { return arg.name === varDef.variable.name.value; });\n })\n : [] });\n },\n },\n Field: {\n enter: function (node) {\n // If `remove` is set to true for an argument, and an argument match\n // is found for a field, remove the field as well.\n var shouldRemoveField = config.some(function (argConfig) { return argConfig.remove; });\n if (shouldRemoveField) {\n var argMatchCount_1 = 0;\n if (node.arguments) {\n node.arguments.forEach(function (arg) {\n if (argMatcher(arg)) {\n argMatchCount_1 += 1;\n }\n });\n }\n if (argMatchCount_1 === 1) {\n return null;\n }\n }\n },\n },\n Argument: {\n enter: function (node) {\n // Remove all matching arguments.\n if (argMatcher(node)) {\n return null;\n }\n },\n },\n }));\n}\nfunction removeFragmentSpreadFromDocument(config, doc) {\n function enter(node) {\n if (config.some(function (def) { return def.name === node.name.value; })) {\n return null;\n }\n }\n return nullIfDocIsEmpty(visit(doc, {\n FragmentSpread: { enter: enter },\n FragmentDefinition: { enter: enter },\n }));\n}\n// If the incoming document is a query, return it as is. Otherwise, build a\n// new document containing a query operation based on the selection set\n// of the previous main operation.\nfunction buildQueryFromSelectionSet(document) {\n var definition = (0,_getFromAST_js__WEBPACK_IMPORTED_MODULE_2__/* .getMainDefinition */ .Vn)(document);\n var definitionOperation = definition.operation;\n if (definitionOperation === "query") {\n // Already a query, so return the existing document.\n return document;\n }\n // Build a new query using the selection set of the main operation.\n var modifiedDoc = (0,graphql__WEBPACK_IMPORTED_MODULE_5__/* .visit */ .YR)(document, {\n OperationDefinition: {\n enter: function (node) {\n return (0,tslib__WEBPACK_IMPORTED_MODULE_6__/* .__assign */ .Cl)((0,tslib__WEBPACK_IMPORTED_MODULE_6__/* .__assign */ .Cl)({}, node), { operation: "query" });\n },\n },\n });\n return modifiedDoc;\n}\n// Remove fields / selection sets that include an @client directive.\nfunction removeClientSetsFromDocument(document) {\n (0,_getFromAST_js__WEBPACK_IMPORTED_MODULE_2__/* .checkDocument */ .sw)(document);\n var modifiedDoc = removeDirectivesFromDocument([\n {\n test: function (directive) { return directive.name.value === "client"; },\n remove: true,\n },\n ], document);\n return modifiedDoc;\n}\n//# sourceMappingURL=transform.js.map\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@apollo/client/utilities/graphql/transform.js?', + ); + + /***/ + }, + + /***/ 435: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ r: () => (/* binding */ version)\n/* harmony export */ });\nvar version = "3.10.8";\n//# sourceMappingURL=version.js.map\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@apollo/client/version.js?', + ); + + /***/ + }, + + /***/ 9417: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ A: () => (/* binding */ _assertThisInitialized)\n/* harmony export */ });\nfunction _assertThisInitialized(e) {\n if (void 0 === e) throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");\n return e;\n}\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js?', + ); + + /***/ + }, + + /***/ 8168: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ A: () => (/* binding */ _extends)\n/* harmony export */ });\nfunction _extends() {\n return _extends = Object.assign ? Object.assign.bind() : function (n) {\n for (var e = 1; e < arguments.length; e++) {\n var t = arguments[e];\n for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);\n }\n return n;\n }, _extends.apply(null, arguments);\n}\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@babel/runtime/helpers/esm/extends.js?', + ); + + /***/ + }, + + /***/ 5540: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '\n// EXPORTS\n__webpack_require__.d(__webpack_exports__, {\n A: () => (/* binding */ _inheritsLoose)\n});\n\n;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js\nfunction _setPrototypeOf(t, e) {\n return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {\n return t.__proto__ = e, t;\n }, _setPrototypeOf(t, e);\n}\n\n;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js\n\nfunction _inheritsLoose(t, o) {\n t.prototype = Object.create(o.prototype), t.prototype.constructor = t, _setPrototypeOf(t, o);\n}\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js_+_1_modules?', + ); + + /***/ + }, + + /***/ 8587: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ A: () => (/* binding */ _objectWithoutPropertiesLoose)\n/* harmony export */ });\nfunction _objectWithoutPropertiesLoose(r, e) {\n if (null == r) return {};\n var t = {};\n for (var n in r) if ({}.hasOwnProperty.call(r, n)) {\n if (e.includes(n)) continue;\n t[n] = r[n];\n }\n return t;\n}\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js?', + ); + + /***/ + }, + + /***/ 6007: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Ay: () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* unused harmony exports __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, lazy, loadableReady */\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6540);\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(8587);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(8168);\n/* harmony import */ var _babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(9417);\n/* harmony import */ var _babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5540);\n/* harmony import */ var hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4146);\n\n\n\n\n\n\n\n/* eslint-disable import/prefer-default-export */\nfunction invariant(condition, message) {\n if (condition) return;\n var error = new Error("loadable: " + message);\n error.framesToPop = 1;\n error.name = \'Invariant Violation\';\n throw error;\n}\nfunction warn(message) {\n // eslint-disable-next-line no-console\n console.warn("loadable: " + message);\n}\n\nvar Context = /*#__PURE__*/\nreact__WEBPACK_IMPORTED_MODULE_0__.createContext();\n\nvar LOADABLE_REQUIRED_CHUNKS_KEY = \'__LOADABLE_REQUIRED_CHUNKS__\';\nfunction getRequiredChunkKey(namespace) {\n return "" + namespace + LOADABLE_REQUIRED_CHUNKS_KEY;\n}\n\nvar sharedInternals = /*#__PURE__*/Object.freeze({\n __proto__: null,\n getRequiredChunkKey: getRequiredChunkKey,\n invariant: invariant,\n Context: Context\n});\n\nvar LOADABLE_SHARED = {\n initialChunks: {}\n};\n\nvar STATUS_PENDING = \'PENDING\';\nvar STATUS_RESOLVED = \'RESOLVED\';\nvar STATUS_REJECTED = \'REJECTED\';\n\nfunction resolveConstructor(ctor) {\n if (typeof ctor === \'function\') {\n return {\n requireAsync: ctor,\n resolve: function resolve() {\n return undefined;\n },\n chunkName: function chunkName() {\n return undefined;\n }\n };\n }\n\n return ctor;\n}\n\nvar withChunkExtractor = function withChunkExtractor(Component) {\n var LoadableWithChunkExtractor = function LoadableWithChunkExtractor(props) {\n return react__WEBPACK_IMPORTED_MODULE_0__.createElement(Context.Consumer, null, function (extractor) {\n return react__WEBPACK_IMPORTED_MODULE_0__.createElement(Component, Object.assign({\n __chunkExtractor: extractor\n }, props));\n });\n };\n\n if (Component.displayName) {\n LoadableWithChunkExtractor.displayName = Component.displayName + "WithChunkExtractor";\n }\n\n return LoadableWithChunkExtractor;\n};\n\nvar identity = function identity(v) {\n return v;\n};\n\nfunction createLoadable(_ref) {\n var _ref$defaultResolveCo = _ref.defaultResolveComponent,\n defaultResolveComponent = _ref$defaultResolveCo === void 0 ? identity : _ref$defaultResolveCo,\n _render = _ref.render,\n onLoad = _ref.onLoad;\n\n function loadable(loadableConstructor, options) {\n if (options === void 0) {\n options = {};\n }\n\n var ctor = resolveConstructor(loadableConstructor);\n var cache = {};\n /**\n * Cachekey represents the component to be loaded\n * if key changes - component has to be reloaded\n * @param props\n * @returns {null|Component}\n */\n\n function _getCacheKey(props) {\n if (options.cacheKey) {\n return options.cacheKey(props);\n }\n\n if (ctor.resolve) {\n return ctor.resolve(props);\n }\n\n return \'static\';\n }\n /**\n * Resolves loaded `module` to a specific `Component\n * @param module\n * @param props\n * @param Loadable\n * @returns Component\n */\n\n\n function resolve(module, props, Loadable) {\n var Component = options.resolveComponent ? options.resolveComponent(module, props) : defaultResolveComponent(module); // FIXME: suppressed due to https://github.com/gregberge/loadable-components/issues/990\n // if (options.resolveComponent && !ReactIs.isValidElementType(Component)) {\n // throw new Error(\n // `resolveComponent returned something that is not a React component!`,\n // )\n // }\n\n hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_1__(Loadable, Component, {\n preload: true\n });\n return Component;\n }\n\n var cachedLoad = function cachedLoad(props) {\n var cacheKey = _getCacheKey(props);\n\n var promise = cache[cacheKey];\n\n if (!promise || promise.status === STATUS_REJECTED) {\n promise = ctor.requireAsync(props);\n promise.status = STATUS_PENDING;\n cache[cacheKey] = promise;\n promise.then(function () {\n promise.status = STATUS_RESOLVED;\n }, function (error) {\n console.error(\'loadable-components: failed to asynchronously load component\', {\n fileName: ctor.resolve(props),\n chunkName: ctor.chunkName(props),\n error: error ? error.message : error\n });\n promise.status = STATUS_REJECTED;\n });\n }\n\n return promise;\n };\n\n var InnerLoadable =\n /*#__PURE__*/\n function (_React$Component) {\n (0,_babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A)(InnerLoadable, _React$Component);\n\n InnerLoadable.getDerivedStateFromProps = function getDerivedStateFromProps(props, state) {\n var cacheKey = _getCacheKey(props);\n\n return (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)({}, state, {\n cacheKey: cacheKey,\n // change of a key triggers loading state automatically\n loading: state.loading || state.cacheKey !== cacheKey\n });\n };\n\n function InnerLoadable(props) {\n var _this;\n\n _this = _React$Component.call(this, props) || this;\n _this.state = {\n result: null,\n error: null,\n loading: true,\n cacheKey: _getCacheKey(props)\n };\n invariant(!props.__chunkExtractor || ctor.requireSync, \'SSR requires `@loadable/babel-plugin`, please install it\'); // Server-side\n\n if (props.__chunkExtractor) {\n // This module has been marked with no SSR\n if (options.ssr === false) {\n return (0,_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .A)(_this);\n } // We run load function, we assume that it won\'t fail and that it\n // triggers a synchronous loading of the module\n\n\n ctor.requireAsync(props)["catch"](function () {\n return null;\n }); // So we can require now the module synchronously\n\n _this.loadSync();\n\n props.__chunkExtractor.addChunk(ctor.chunkName(props));\n\n return (0,_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .A)(_this);\n } // Client-side with `isReady` method present (SSR probably)\n // If module is already loaded, we use a synchronous loading\n // Only perform this synchronous loading if the component has not\n // been marked with no SSR, else we risk hydration mismatches\n\n\n if (options.ssr !== false && ( // is ready - was loaded in this session\n ctor.isReady && ctor.isReady(props) || // is ready - was loaded during SSR process\n ctor.chunkName && LOADABLE_SHARED.initialChunks[ctor.chunkName(props)])) {\n _this.loadSync();\n }\n\n return _this;\n }\n\n var _proto = InnerLoadable.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n this.mounted = true; // retrieve loading promise from a global cache\n\n var cachedPromise = this.getCache(); // if promise exists, but rejected - clear cache\n\n if (cachedPromise && cachedPromise.status === STATUS_REJECTED) {\n this.setCache();\n } // component might be resolved synchronously in the constructor\n\n\n if (this.state.loading) {\n this.loadAsync();\n }\n };\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps, prevState) {\n // Component has to be reloaded on cacheKey change\n if (prevState.cacheKey !== this.state.cacheKey) {\n this.loadAsync();\n }\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.mounted = false;\n };\n\n _proto.safeSetState = function safeSetState(nextState, callback) {\n if (this.mounted) {\n this.setState(nextState, callback);\n }\n }\n /**\n * returns a cache key for the current props\n * @returns {Component|string}\n */\n ;\n\n _proto.getCacheKey = function getCacheKey() {\n return _getCacheKey(this.props);\n }\n /**\n * access the persistent cache\n */\n ;\n\n _proto.getCache = function getCache() {\n return cache[this.getCacheKey()];\n }\n /**\n * sets the cache value. If called without value sets it as undefined\n */\n ;\n\n _proto.setCache = function setCache(value) {\n if (value === void 0) {\n value = undefined;\n }\n\n cache[this.getCacheKey()] = value;\n };\n\n _proto.triggerOnLoad = function triggerOnLoad() {\n var _this2 = this;\n\n if (onLoad) {\n setTimeout(function () {\n onLoad(_this2.state.result, _this2.props);\n });\n }\n }\n /**\n * Synchronously loads component\n * target module is expected to already exists in the module cache\n * or be capable to resolve synchronously (webpack target=node)\n */\n ;\n\n _proto.loadSync = function loadSync() {\n // load sync is expecting component to be in the "loading" state already\n // sounds weird, but loading=true is the initial state of InnerLoadable\n if (!this.state.loading) return;\n\n try {\n var loadedModule = ctor.requireSync(this.props);\n var result = resolve(loadedModule, this.props, Loadable);\n this.state.result = result;\n this.state.loading = false;\n } catch (error) {\n console.error(\'loadable-components: failed to synchronously load component, which expected to be available\', {\n fileName: ctor.resolve(this.props),\n chunkName: ctor.chunkName(this.props),\n error: error ? error.message : error\n });\n this.state.error = error;\n }\n }\n /**\n * Asynchronously loads a component.\n */\n ;\n\n _proto.loadAsync = function loadAsync() {\n var _this3 = this;\n\n var promise = this.resolveAsync();\n promise.then(function (loadedModule) {\n var result = resolve(loadedModule, _this3.props, Loadable);\n\n _this3.safeSetState({\n result: result,\n loading: false\n }, function () {\n return _this3.triggerOnLoad();\n });\n })["catch"](function (error) {\n return _this3.safeSetState({\n error: error,\n loading: false\n });\n });\n return promise;\n }\n /**\n * Asynchronously resolves(not loads) a component.\n * Note - this function does not change the state\n */\n ;\n\n _proto.resolveAsync = function resolveAsync() {\n var _this$props = this.props,\n __chunkExtractor = _this$props.__chunkExtractor,\n forwardedRef = _this$props.forwardedRef,\n props = (0,_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .A)(_this$props, ["__chunkExtractor", "forwardedRef"]);\n\n return cachedLoad(props);\n };\n\n _proto.render = function render() {\n var _this$props2 = this.props,\n forwardedRef = _this$props2.forwardedRef,\n propFallback = _this$props2.fallback,\n __chunkExtractor = _this$props2.__chunkExtractor,\n props = (0,_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .A)(_this$props2, ["forwardedRef", "fallback", "__chunkExtractor"]);\n\n var _this$state = this.state,\n error = _this$state.error,\n loading = _this$state.loading,\n result = _this$state.result;\n\n if (options.suspense) {\n var cachedPromise = this.getCache() || this.loadAsync();\n\n if (cachedPromise.status === STATUS_PENDING) {\n throw this.loadAsync();\n }\n }\n\n if (error) {\n throw error;\n }\n\n var fallback = propFallback || options.fallback || null;\n\n if (loading) {\n return fallback;\n }\n\n return _render({\n fallback: fallback,\n result: result,\n options: options,\n props: (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)({}, props, {\n ref: forwardedRef\n })\n });\n };\n\n return InnerLoadable;\n }(react__WEBPACK_IMPORTED_MODULE_0__.Component);\n\n var EnhancedInnerLoadable = withChunkExtractor(InnerLoadable);\n var Loadable = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(function (props, ref) {\n return react__WEBPACK_IMPORTED_MODULE_0__.createElement(EnhancedInnerLoadable, Object.assign({\n forwardedRef: ref\n }, props));\n });\n Loadable.displayName = \'Loadable\'; // In future, preload could use `<link rel="preload">`\n\n Loadable.preload = function (props) {\n Loadable.load(props);\n };\n\n Loadable.load = function (props) {\n return cachedLoad(props);\n };\n\n return Loadable;\n }\n\n function lazy(ctor, options) {\n return loadable(ctor, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)({}, options, {\n suspense: true\n }));\n }\n\n return {\n loadable: loadable,\n lazy: lazy\n };\n}\n\nfunction defaultResolveComponent(loadedModule) {\n // eslint-disable-next-line no-underscore-dangle\n return loadedModule.__esModule ? loadedModule["default"] : loadedModule["default"] || loadedModule;\n}\n\n/* eslint-disable no-use-before-define, react/no-multi-comp */\n\nvar _createLoadable =\n/*#__PURE__*/\ncreateLoadable({\n defaultResolveComponent: defaultResolveComponent,\n render: function render(_ref) {\n var Component = _ref.result,\n props = _ref.props;\n return react__WEBPACK_IMPORTED_MODULE_0__.createElement(Component, props);\n }\n}),\n loadable = _createLoadable.loadable,\n lazy = _createLoadable.lazy;\n\n/* eslint-disable no-use-before-define, react/no-multi-comp */\n\nvar _createLoadable$1 =\n/*#__PURE__*/\ncreateLoadable({\n onLoad: function onLoad(result, props) {\n if (result && props.forwardedRef) {\n if (typeof props.forwardedRef === \'function\') {\n props.forwardedRef(result);\n } else {\n props.forwardedRef.current = result;\n }\n }\n },\n render: function render(_ref) {\n var result = _ref.result,\n props = _ref.props;\n\n if (props.children) {\n return props.children(result);\n }\n\n return null;\n }\n}),\n loadable$1 = _createLoadable$1.loadable,\n lazy$1 = _createLoadable$1.lazy;\n\n/* eslint-disable no-underscore-dangle, camelcase */\nvar BROWSER = typeof window !== \'undefined\';\nfunction loadableReady(done, _temp) {\n if (done === void 0) {\n done = function done() {};\n }\n\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$namespace = _ref.namespace,\n namespace = _ref$namespace === void 0 ? \'\' : _ref$namespace,\n _ref$chunkLoadingGlob = _ref.chunkLoadingGlobal,\n chunkLoadingGlobal = _ref$chunkLoadingGlob === void 0 ? \'__LOADABLE_LOADED_CHUNKS__\' : _ref$chunkLoadingGlob;\n\n if (!BROWSER) {\n warn(\'`loadableReady()` must be called in browser only\');\n done();\n return Promise.resolve();\n }\n\n var requiredChunks = null;\n\n if (BROWSER) {\n var id = getRequiredChunkKey(namespace);\n var dataElement = document.getElementById(id);\n\n if (dataElement) {\n requiredChunks = JSON.parse(dataElement.textContent);\n var extElement = document.getElementById(id + "_ext");\n\n if (extElement) {\n var _JSON$parse = JSON.parse(extElement.textContent),\n namedChunks = _JSON$parse.namedChunks;\n\n namedChunks.forEach(function (chunkName) {\n LOADABLE_SHARED.initialChunks[chunkName] = true;\n });\n } else {\n // version mismatch\n throw new Error(\'loadable-component: @loadable/server does not match @loadable/component\');\n }\n }\n }\n\n if (!requiredChunks) {\n warn(\'`loadableReady()` requires state, please use `getScriptTags` or `getScriptElements` server-side\');\n done();\n return Promise.resolve();\n }\n\n var resolved = false;\n return new Promise(function (resolve) {\n window[chunkLoadingGlobal] = window[chunkLoadingGlobal] || [];\n var loadedChunks = window[chunkLoadingGlobal];\n var originalPush = loadedChunks.push.bind(loadedChunks);\n\n function checkReadyState() {\n if (requiredChunks.every(function (chunk) {\n return loadedChunks.some(function (_ref2) {\n var chunks = _ref2[0];\n return chunks.indexOf(chunk) > -1;\n });\n })) {\n if (!resolved) {\n resolved = true;\n resolve();\n }\n }\n }\n\n loadedChunks.push = function () {\n originalPush.apply(void 0, arguments);\n checkReadyState();\n };\n\n checkReadyState();\n }).then(done);\n}\n\n/* eslint-disable no-underscore-dangle */\nvar loadable$2 = loadable;\nloadable$2.lib = loadable$1;\nvar lazy$2 = lazy;\nlazy$2.lib = lazy$1;\nvar __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = (/* unused pure expression or super */ null && (sharedInternals));\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (loadable$2);\n\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@loadable/component/dist/loadable.esm.mjs?', + ); + + /***/ + }, + + /***/ 7783: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ C: () => (/* binding */ StrongCache)\n/* harmony export */ });\nfunction defaultDispose() { }\nclass StrongCache {\n constructor(max = Infinity, dispose = defaultDispose) {\n this.max = max;\n this.dispose = dispose;\n this.map = new Map();\n this.newest = null;\n this.oldest = null;\n }\n has(key) {\n return this.map.has(key);\n }\n get(key) {\n const node = this.getNode(key);\n return node && node.value;\n }\n get size() {\n return this.map.size;\n }\n getNode(key) {\n const node = this.map.get(key);\n if (node && node !== this.newest) {\n const { older, newer } = node;\n if (newer) {\n newer.older = older;\n }\n if (older) {\n older.newer = newer;\n }\n node.older = this.newest;\n node.older.newer = node;\n node.newer = null;\n this.newest = node;\n if (node === this.oldest) {\n this.oldest = newer;\n }\n }\n return node;\n }\n set(key, value) {\n let node = this.getNode(key);\n if (node) {\n return node.value = value;\n }\n node = {\n key,\n value,\n newer: null,\n older: this.newest\n };\n if (this.newest) {\n this.newest.newer = node;\n }\n this.newest = node;\n this.oldest = this.oldest || node;\n this.map.set(key, node);\n return node.value;\n }\n clean() {\n while (this.oldest && this.map.size > this.max) {\n this.delete(this.oldest.key);\n }\n }\n delete(key) {\n const node = this.map.get(key);\n if (node) {\n if (node === this.newest) {\n this.newest = node.older;\n }\n if (node === this.oldest) {\n this.oldest = node.newer;\n }\n if (node.newer) {\n node.newer.older = node.older;\n }\n if (node.older) {\n node.older.newer = node.newer;\n }\n this.map.delete(key);\n this.dispose(node.value, key);\n return true;\n }\n return false;\n }\n}\n//# sourceMappingURL=strong.js.map\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@wry/caches/lib/strong.js?', + ); + + /***/ + }, + + /***/ 1744: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ l: () => (/* binding */ WeakCache)\n/* harmony export */ });\nfunction noop() { }\nconst defaultDispose = noop;\nconst _WeakRef = typeof WeakRef !== "undefined"\n ? WeakRef\n : function (value) {\n return { deref: () => value };\n };\nconst _WeakMap = typeof WeakMap !== "undefined" ? WeakMap : Map;\nconst _FinalizationRegistry = typeof FinalizationRegistry !== "undefined"\n ? FinalizationRegistry\n : function () {\n return {\n register: noop,\n unregister: noop,\n };\n };\nconst finalizationBatchSize = 10024;\nclass WeakCache {\n constructor(max = Infinity, dispose = defaultDispose) {\n this.max = max;\n this.dispose = dispose;\n this.map = new _WeakMap();\n this.newest = null;\n this.oldest = null;\n this.unfinalizedNodes = new Set();\n this.finalizationScheduled = false;\n this.size = 0;\n this.finalize = () => {\n const iterator = this.unfinalizedNodes.values();\n for (let i = 0; i < finalizationBatchSize; i++) {\n const node = iterator.next().value;\n if (!node)\n break;\n this.unfinalizedNodes.delete(node);\n const key = node.key;\n delete node.key;\n node.keyRef = new _WeakRef(key);\n this.registry.register(key, node, node);\n }\n if (this.unfinalizedNodes.size > 0) {\n queueMicrotask(this.finalize);\n }\n else {\n this.finalizationScheduled = false;\n }\n };\n this.registry = new _FinalizationRegistry(this.deleteNode.bind(this));\n }\n has(key) {\n return this.map.has(key);\n }\n get(key) {\n const node = this.getNode(key);\n return node && node.value;\n }\n getNode(key) {\n const node = this.map.get(key);\n if (node && node !== this.newest) {\n const { older, newer } = node;\n if (newer) {\n newer.older = older;\n }\n if (older) {\n older.newer = newer;\n }\n node.older = this.newest;\n node.older.newer = node;\n node.newer = null;\n this.newest = node;\n if (node === this.oldest) {\n this.oldest = newer;\n }\n }\n return node;\n }\n set(key, value) {\n let node = this.getNode(key);\n if (node) {\n return (node.value = value);\n }\n node = {\n key,\n value,\n newer: null,\n older: this.newest,\n };\n if (this.newest) {\n this.newest.newer = node;\n }\n this.newest = node;\n this.oldest = this.oldest || node;\n this.scheduleFinalization(node);\n this.map.set(key, node);\n this.size++;\n return node.value;\n }\n clean() {\n while (this.oldest && this.size > this.max) {\n this.deleteNode(this.oldest);\n }\n }\n deleteNode(node) {\n if (node === this.newest) {\n this.newest = node.older;\n }\n if (node === this.oldest) {\n this.oldest = node.newer;\n }\n if (node.newer) {\n node.newer.older = node.older;\n }\n if (node.older) {\n node.older.newer = node.newer;\n }\n this.size--;\n const key = node.key || (node.keyRef && node.keyRef.deref());\n this.dispose(node.value, key);\n if (!node.keyRef) {\n this.unfinalizedNodes.delete(node);\n }\n else {\n this.registry.unregister(node);\n }\n if (key)\n this.map.delete(key);\n }\n delete(key) {\n const node = this.map.get(key);\n if (node) {\n this.deleteNode(node);\n return true;\n }\n return false;\n }\n scheduleFinalization(node) {\n this.unfinalizedNodes.add(node);\n if (!this.finalizationScheduled) {\n this.finalizationScheduled = true;\n queueMicrotask(this.finalize);\n }\n }\n}\n//# sourceMappingURL=weak.js.map\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@wry/caches/lib/weak.js?', + ); + + /***/ + }, + + /***/ 5381: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + "/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */ L: () => (/* binding */ equal)\n/* harmony export */ });\nconst { toString, hasOwnProperty } = Object.prototype;\nconst fnToStr = Function.prototype.toString;\nconst previousComparisons = new Map();\n/**\n * Performs a deep equality check on two JavaScript values, tolerating cycles.\n */\nfunction equal(a, b) {\n try {\n return check(a, b);\n }\n finally {\n previousComparisons.clear();\n }\n}\n// Allow default imports as well.\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (equal);\nfunction check(a, b) {\n // If the two values are strictly equal, our job is easy.\n if (a === b) {\n return true;\n }\n // Object.prototype.toString returns a representation of the runtime type of\n // the given value that is considerably more precise than typeof.\n const aTag = toString.call(a);\n const bTag = toString.call(b);\n // If the runtime types of a and b are different, they could maybe be equal\n // under some interpretation of equality, but for simplicity and performance\n // we just return false instead.\n if (aTag !== bTag) {\n return false;\n }\n switch (aTag) {\n case '[object Array]':\n // Arrays are a lot like other objects, but we can cheaply compare their\n // lengths as a short-cut before comparing their elements.\n if (a.length !== b.length)\n return false;\n // Fall through to object case...\n case '[object Object]': {\n if (previouslyCompared(a, b))\n return true;\n const aKeys = definedKeys(a);\n const bKeys = definedKeys(b);\n // If `a` and `b` have a different number of enumerable keys, they\n // must be different.\n const keyCount = aKeys.length;\n if (keyCount !== bKeys.length)\n return false;\n // Now make sure they have the same keys.\n for (let k = 0; k < keyCount; ++k) {\n if (!hasOwnProperty.call(b, aKeys[k])) {\n return false;\n }\n }\n // Finally, check deep equality of all child properties.\n for (let k = 0; k < keyCount; ++k) {\n const key = aKeys[k];\n if (!check(a[key], b[key])) {\n return false;\n }\n }\n return true;\n }\n case '[object Error]':\n return a.name === b.name && a.message === b.message;\n case '[object Number]':\n // Handle NaN, which is !== itself.\n if (a !== a)\n return b !== b;\n // Fall through to shared +a === +b case...\n case '[object Boolean]':\n case '[object Date]':\n return +a === +b;\n case '[object RegExp]':\n case '[object String]':\n return a == `${b}`;\n case '[object Map]':\n case '[object Set]': {\n if (a.size !== b.size)\n return false;\n if (previouslyCompared(a, b))\n return true;\n const aIterator = a.entries();\n const isMap = aTag === '[object Map]';\n while (true) {\n const info = aIterator.next();\n if (info.done)\n break;\n // If a instanceof Set, aValue === aKey.\n const [aKey, aValue] = info.value;\n // So this works the same way for both Set and Map.\n if (!b.has(aKey)) {\n return false;\n }\n // However, we care about deep equality of values only when dealing\n // with Map structures.\n if (isMap && !check(aValue, b.get(aKey))) {\n return false;\n }\n }\n return true;\n }\n case '[object Uint16Array]':\n case '[object Uint8Array]': // Buffer, in Node.js.\n case '[object Uint32Array]':\n case '[object Int32Array]':\n case '[object Int8Array]':\n case '[object Int16Array]':\n case '[object ArrayBuffer]':\n // DataView doesn't need these conversions, but the equality check is\n // otherwise the same.\n a = new Uint8Array(a);\n b = new Uint8Array(b);\n // Fall through...\n case '[object DataView]': {\n let len = a.byteLength;\n if (len === b.byteLength) {\n while (len-- && a[len] === b[len]) {\n // Keep looping as long as the bytes are equal.\n }\n }\n return len === -1;\n }\n case '[object AsyncFunction]':\n case '[object GeneratorFunction]':\n case '[object AsyncGeneratorFunction]':\n case '[object Function]': {\n const aCode = fnToStr.call(a);\n if (aCode !== fnToStr.call(b)) {\n return false;\n }\n // We consider non-native functions equal if they have the same code\n // (native functions require === because their code is censored).\n // Note that this behavior is not entirely sound, since !== function\n // objects with the same code can behave differently depending on\n // their closure scope. However, any function can behave differently\n // depending on the values of its input arguments (including this)\n // and its calling context (including its closure scope), even\n // though the function object is === to itself; and it is entirely\n // possible for functions that are not === to behave exactly the\n // same under all conceivable circumstances. Because none of these\n // factors are statically decidable in JavaScript, JS function\n // equality is not well-defined. This ambiguity allows us to\n // consider the best possible heuristic among various imperfect\n // options, and equating non-native functions that have the same\n // code has enormous practical benefits, such as when comparing\n // functions that are repeatedly passed as fresh function\n // expressions within objects that are otherwise deeply equal. Since\n // any function created from the same syntactic expression (in the\n // same code location) will always stringify to the same code\n // according to fnToStr.call, we can reasonably expect these\n // repeatedly passed function expressions to have the same code, and\n // thus behave \"the same\" (with all the caveats mentioned above),\n // even though the runtime function objects are !== to one another.\n return !endsWith(aCode, nativeCodeSuffix);\n }\n }\n // Otherwise the values are not equal.\n return false;\n}\nfunction definedKeys(obj) {\n // Remember that the second argument to Array.prototype.filter will be\n // used as `this` within the callback function.\n return Object.keys(obj).filter(isDefinedKey, obj);\n}\nfunction isDefinedKey(key) {\n return this[key] !== void 0;\n}\nconst nativeCodeSuffix = \"{ [native code] }\";\nfunction endsWith(full, suffix) {\n const fromIndex = full.length - suffix.length;\n return fromIndex >= 0 &&\n full.indexOf(suffix, fromIndex) === fromIndex;\n}\nfunction previouslyCompared(a, b) {\n // Though cyclic references can make an object graph appear infinite from the\n // perspective of a depth-first traversal, the graph still contains a finite\n // number of distinct object references. We use the previousComparisons cache\n // to avoid comparing the same pair of object references more than once, which\n // guarantees termination (even if we end up comparing every object in one\n // graph to every object in the other graph, which is extremely unlikely),\n // while still allowing weird isomorphic structures (like rings with different\n // lengths) a chance to pass the equality test.\n let bSet = previousComparisons.get(a);\n if (bSet) {\n // Return true here because we can be sure false will be returned somewhere\n // else if the objects are not equivalent.\n if (bSet.has(b))\n return true;\n }\n else {\n previousComparisons.set(a, bSet = new Set);\n }\n bSet.add(b);\n return false;\n}\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@wry/equality/lib/index.js?", + ); + + /***/ + }, + + /***/ 2453: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ b: () => (/* binding */ Trie)\n/* harmony export */ });\n// A [trie](https://en.wikipedia.org/wiki/Trie) data structure that holds\n// object keys weakly, yet can also hold non-object keys, unlike the\n// native `WeakMap`.\n// If no makeData function is supplied, the looked-up data will be an empty,\n// null-prototype Object.\nconst defaultMakeData = () => Object.create(null);\n// Useful for processing arguments objects as well as arrays.\nconst { forEach, slice } = Array.prototype;\nconst { hasOwnProperty } = Object.prototype;\nclass Trie {\n constructor(weakness = true, makeData = defaultMakeData) {\n this.weakness = weakness;\n this.makeData = makeData;\n }\n lookup() {\n return this.lookupArray(arguments);\n }\n lookupArray(array) {\n let node = this;\n forEach.call(array, key => node = node.getChildTrie(key));\n return hasOwnProperty.call(node, "data")\n ? node.data\n : node.data = this.makeData(slice.call(array));\n }\n peek() {\n return this.peekArray(arguments);\n }\n peekArray(array) {\n let node = this;\n for (let i = 0, len = array.length; node && i < len; ++i) {\n const map = node.mapFor(array[i], false);\n node = map && map.get(array[i]);\n }\n return node && node.data;\n }\n remove() {\n return this.removeArray(arguments);\n }\n removeArray(array) {\n let data;\n if (array.length) {\n const head = array[0];\n const map = this.mapFor(head, false);\n const child = map && map.get(head);\n if (child) {\n data = child.removeArray(slice.call(array, 1));\n if (!child.data && !child.weak && !(child.strong && child.strong.size)) {\n map.delete(head);\n }\n }\n }\n else {\n data = this.data;\n delete this.data;\n }\n return data;\n }\n getChildTrie(key) {\n const map = this.mapFor(key, true);\n let child = map.get(key);\n if (!child)\n map.set(key, child = new Trie(this.weakness, this.makeData));\n return child;\n }\n mapFor(key, create) {\n return this.weakness && isObjRef(key)\n ? this.weak || (create ? this.weak = new WeakMap : void 0)\n : this.strong || (create ? this.strong = new Map : void 0);\n }\n}\nfunction isObjRef(value) {\n switch (typeof value) {\n case "object":\n if (value === null)\n break;\n // Fall through to return true...\n case "function":\n return true;\n }\n return false;\n}\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@wry/trie/lib/index.js?', + ); + + /***/ + }, + + /***/ 6286: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ U: () => (/* binding */ devAssert)\n/* harmony export */ });\nfunction devAssert(condition, message) {\n const booleanCondition = Boolean(condition);\n\n if (!booleanCondition) {\n throw new Error(message);\n }\n}\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/graphql/jsutils/devAssert.mjs?', + ); + + /***/ + }, + + /***/ 129: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + "/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ N: () => (/* binding */ inspect)\n/* harmony export */ });\nconst MAX_ARRAY_LENGTH = 10;\nconst MAX_RECURSIVE_DEPTH = 2;\n/**\n * Used to print values in error messages.\n */\n\nfunction inspect(value) {\n return formatValue(value, []);\n}\n\nfunction formatValue(value, seenValues) {\n switch (typeof value) {\n case 'string':\n return JSON.stringify(value);\n\n case 'function':\n return value.name ? `[function ${value.name}]` : '[function]';\n\n case 'object':\n return formatObjectValue(value, seenValues);\n\n default:\n return String(value);\n }\n}\n\nfunction formatObjectValue(value, previouslySeenValues) {\n if (value === null) {\n return 'null';\n }\n\n if (previouslySeenValues.includes(value)) {\n return '[Circular]';\n }\n\n const seenValues = [...previouslySeenValues, value];\n\n if (isJSONable(value)) {\n const jsonValue = value.toJSON(); // check for infinite recursion\n\n if (jsonValue !== value) {\n return typeof jsonValue === 'string'\n ? jsonValue\n : formatValue(jsonValue, seenValues);\n }\n } else if (Array.isArray(value)) {\n return formatArray(value, seenValues);\n }\n\n return formatObject(value, seenValues);\n}\n\nfunction isJSONable(value) {\n return typeof value.toJSON === 'function';\n}\n\nfunction formatObject(object, seenValues) {\n const entries = Object.entries(object);\n\n if (entries.length === 0) {\n return '{}';\n }\n\n if (seenValues.length > MAX_RECURSIVE_DEPTH) {\n return '[' + getObjectTag(object) + ']';\n }\n\n const properties = entries.map(\n ([key, value]) => key + ': ' + formatValue(value, seenValues),\n );\n return '{ ' + properties.join(', ') + ' }';\n}\n\nfunction formatArray(array, seenValues) {\n if (array.length === 0) {\n return '[]';\n }\n\n if (seenValues.length > MAX_RECURSIVE_DEPTH) {\n return '[Array]';\n }\n\n const len = Math.min(MAX_ARRAY_LENGTH, array.length);\n const remaining = array.length - len;\n const items = [];\n\n for (let i = 0; i < len; ++i) {\n items.push(formatValue(array[i], seenValues));\n }\n\n if (remaining === 1) {\n items.push('... 1 more item');\n } else if (remaining > 1) {\n items.push(`... ${remaining} more items`);\n }\n\n return '[' + items.join(', ') + ']';\n}\n\nfunction getObjectTag(object) {\n const tag = Object.prototype.toString\n .call(object)\n .replace(/^\\[object /, '')\n .replace(/]$/, '');\n\n if (tag === 'Object' && typeof object.constructor === 'function') {\n const name = object.constructor.name;\n\n if (typeof name === 'string' && name !== '') {\n return name;\n }\n }\n\n return tag;\n}\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/graphql/jsutils/inspect.mjs?", + ); + + /***/ + }, + + /***/ 475: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + "/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Ll: () => (/* binding */ isNode),\n/* harmony export */ aD: () => (/* binding */ QueryDocumentKeys),\n/* harmony export */ aZ: () => (/* binding */ Location),\n/* harmony export */ cE: () => (/* binding */ OperationTypeNode),\n/* harmony export */ ou: () => (/* binding */ Token)\n/* harmony export */ });\n/**\n * Contains a range of UTF-8 character offsets and token references that\n * identify the region of the source from which the AST derived.\n */\nclass Location {\n /**\n * The character offset at which this Node begins.\n */\n\n /**\n * The character offset at which this Node ends.\n */\n\n /**\n * The Token at which this Node begins.\n */\n\n /**\n * The Token at which this Node ends.\n */\n\n /**\n * The Source document the AST represents.\n */\n constructor(startToken, endToken, source) {\n this.start = startToken.start;\n this.end = endToken.end;\n this.startToken = startToken;\n this.endToken = endToken;\n this.source = source;\n }\n\n get [Symbol.toStringTag]() {\n return 'Location';\n }\n\n toJSON() {\n return {\n start: this.start,\n end: this.end,\n };\n }\n}\n/**\n * Represents a range of characters represented by a lexical token\n * within a Source.\n */\n\nclass Token {\n /**\n * The kind of Token.\n */\n\n /**\n * The character offset at which this Node begins.\n */\n\n /**\n * The character offset at which this Node ends.\n */\n\n /**\n * The 1-indexed line number on which this Token appears.\n */\n\n /**\n * The 1-indexed column number at which this Token begins.\n */\n\n /**\n * For non-punctuation tokens, represents the interpreted value of the token.\n *\n * Note: is undefined for punctuation tokens, but typed as string for\n * convenience in the parser.\n */\n\n /**\n * Tokens exist as nodes in a double-linked-list amongst all tokens\n * including ignored tokens. <SOF> is always the first node and <EOF>\n * the last.\n */\n constructor(kind, start, end, line, column, value) {\n this.kind = kind;\n this.start = start;\n this.end = end;\n this.line = line;\n this.column = column; // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n\n this.value = value;\n this.prev = null;\n this.next = null;\n }\n\n get [Symbol.toStringTag]() {\n return 'Token';\n }\n\n toJSON() {\n return {\n kind: this.kind,\n value: this.value,\n line: this.line,\n column: this.column,\n };\n }\n}\n/**\n * The list of all possible AST node types.\n */\n\n/**\n * @internal\n */\nconst QueryDocumentKeys = {\n Name: [],\n Document: ['definitions'],\n OperationDefinition: [\n 'name',\n 'variableDefinitions',\n 'directives',\n 'selectionSet',\n ],\n VariableDefinition: ['variable', 'type', 'defaultValue', 'directives'],\n Variable: ['name'],\n SelectionSet: ['selections'],\n Field: ['alias', 'name', 'arguments', 'directives', 'selectionSet'],\n Argument: ['name', 'value'],\n FragmentSpread: ['name', 'directives'],\n InlineFragment: ['typeCondition', 'directives', 'selectionSet'],\n FragmentDefinition: [\n 'name', // Note: fragment variable definitions are deprecated and will removed in v17.0.0\n 'variableDefinitions',\n 'typeCondition',\n 'directives',\n 'selectionSet',\n ],\n IntValue: [],\n FloatValue: [],\n StringValue: [],\n BooleanValue: [],\n NullValue: [],\n EnumValue: [],\n ListValue: ['values'],\n ObjectValue: ['fields'],\n ObjectField: ['name', 'value'],\n Directive: ['name', 'arguments'],\n NamedType: ['name'],\n ListType: ['type'],\n NonNullType: ['type'],\n SchemaDefinition: ['description', 'directives', 'operationTypes'],\n OperationTypeDefinition: ['type'],\n ScalarTypeDefinition: ['description', 'name', 'directives'],\n ObjectTypeDefinition: [\n 'description',\n 'name',\n 'interfaces',\n 'directives',\n 'fields',\n ],\n FieldDefinition: ['description', 'name', 'arguments', 'type', 'directives'],\n InputValueDefinition: [\n 'description',\n 'name',\n 'type',\n 'defaultValue',\n 'directives',\n ],\n InterfaceTypeDefinition: [\n 'description',\n 'name',\n 'interfaces',\n 'directives',\n 'fields',\n ],\n UnionTypeDefinition: ['description', 'name', 'directives', 'types'],\n EnumTypeDefinition: ['description', 'name', 'directives', 'values'],\n EnumValueDefinition: ['description', 'name', 'directives'],\n InputObjectTypeDefinition: ['description', 'name', 'directives', 'fields'],\n DirectiveDefinition: ['description', 'name', 'arguments', 'locations'],\n SchemaExtension: ['directives', 'operationTypes'],\n ScalarTypeExtension: ['name', 'directives'],\n ObjectTypeExtension: ['name', 'interfaces', 'directives', 'fields'],\n InterfaceTypeExtension: ['name', 'interfaces', 'directives', 'fields'],\n UnionTypeExtension: ['name', 'directives', 'types'],\n EnumTypeExtension: ['name', 'directives', 'values'],\n InputObjectTypeExtension: ['name', 'directives', 'fields'],\n};\nconst kindValues = new Set(Object.keys(QueryDocumentKeys));\n/**\n * @internal\n */\n\nfunction isNode(maybeNode) {\n const maybeKind =\n maybeNode === null || maybeNode === void 0 ? void 0 : maybeNode.kind;\n return typeof maybeKind === 'string' && kindValues.has(maybeKind);\n}\n/** Name */\n\nvar OperationTypeNode;\n\n(function (OperationTypeNode) {\n OperationTypeNode['QUERY'] = 'query';\n OperationTypeNode['MUTATION'] = 'mutation';\n OperationTypeNode['SUBSCRIPTION'] = 'subscription';\n})(OperationTypeNode || (OperationTypeNode = {}));\n\n\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/graphql/language/ast.mjs?", + ); + + /***/ + }, + + /***/ 5995: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + "/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ OC: () => (/* binding */ dedentBlockStringLines),\n/* harmony export */ yo: () => (/* binding */ printBlockString)\n/* harmony export */ });\n/* unused harmony export isPrintableAsBlockString */\n/* harmony import */ var _characterClasses_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9646);\n\n/**\n * Produces the value of a block string from its parsed raw value, similar to\n * CoffeeScript's block string, Python's docstring trim or Ruby's strip_heredoc.\n *\n * This implements the GraphQL spec's BlockStringValue() static algorithm.\n *\n * @internal\n */\n\nfunction dedentBlockStringLines(lines) {\n var _firstNonEmptyLine2;\n\n let commonIndent = Number.MAX_SAFE_INTEGER;\n let firstNonEmptyLine = null;\n let lastNonEmptyLine = -1;\n\n for (let i = 0; i < lines.length; ++i) {\n var _firstNonEmptyLine;\n\n const line = lines[i];\n const indent = leadingWhitespace(line);\n\n if (indent === line.length) {\n continue; // skip empty lines\n }\n\n firstNonEmptyLine =\n (_firstNonEmptyLine = firstNonEmptyLine) !== null &&\n _firstNonEmptyLine !== void 0\n ? _firstNonEmptyLine\n : i;\n lastNonEmptyLine = i;\n\n if (i !== 0 && indent < commonIndent) {\n commonIndent = indent;\n }\n }\n\n return lines // Remove common indentation from all lines but first.\n .map((line, i) => (i === 0 ? line : line.slice(commonIndent))) // Remove leading and trailing blank lines.\n .slice(\n (_firstNonEmptyLine2 = firstNonEmptyLine) !== null &&\n _firstNonEmptyLine2 !== void 0\n ? _firstNonEmptyLine2\n : 0,\n lastNonEmptyLine + 1,\n );\n}\n\nfunction leadingWhitespace(str) {\n let i = 0;\n\n while (i < str.length && (0,_characterClasses_mjs__WEBPACK_IMPORTED_MODULE_0__/* .isWhiteSpace */ .i0)(str.charCodeAt(i))) {\n ++i;\n }\n\n return i;\n}\n/**\n * @internal\n */\n\nfunction isPrintableAsBlockString(value) {\n if (value === '') {\n return true; // empty string is printable\n }\n\n let isEmptyLine = true;\n let hasIndent = false;\n let hasCommonIndent = true;\n let seenNonEmptyLine = false;\n\n for (let i = 0; i < value.length; ++i) {\n switch (value.codePointAt(i)) {\n case 0x0000:\n case 0x0001:\n case 0x0002:\n case 0x0003:\n case 0x0004:\n case 0x0005:\n case 0x0006:\n case 0x0007:\n case 0x0008:\n case 0x000b:\n case 0x000c:\n case 0x000e:\n case 0x000f:\n return false;\n // Has non-printable characters\n\n case 0x000d:\n // \\r\n return false;\n // Has \\r or \\r\\n which will be replaced as \\n\n\n case 10:\n // \\n\n if (isEmptyLine && !seenNonEmptyLine) {\n return false; // Has leading new line\n }\n\n seenNonEmptyLine = true;\n isEmptyLine = true;\n hasIndent = false;\n break;\n\n case 9: // \\t\n\n case 32:\n // <space>\n hasIndent || (hasIndent = isEmptyLine);\n break;\n\n default:\n hasCommonIndent && (hasCommonIndent = hasIndent);\n isEmptyLine = false;\n }\n }\n\n if (isEmptyLine) {\n return false; // Has trailing empty lines\n }\n\n if (hasCommonIndent && seenNonEmptyLine) {\n return false; // Has internal indent\n }\n\n return true;\n}\n/**\n * Print a block string in the indented block form by adding a leading and\n * trailing blank line. However, if a block string starts with whitespace and is\n * a single-line, adding a leading blank line would strip that whitespace.\n *\n * @internal\n */\n\nfunction printBlockString(value, options) {\n const escapedValue = value.replace(/\"\"\"/g, '\\\\\"\"\"'); // Expand a block string's raw value into independent lines.\n\n const lines = escapedValue.split(/\\r\\n|[\\n\\r]/g);\n const isSingleLine = lines.length === 1; // If common indentation is found we can fix some of those cases by adding leading new line\n\n const forceLeadingNewLine =\n lines.length > 1 &&\n lines\n .slice(1)\n .every((line) => line.length === 0 || (0,_characterClasses_mjs__WEBPACK_IMPORTED_MODULE_0__/* .isWhiteSpace */ .i0)(line.charCodeAt(0))); // Trailing triple quotes just looks confusing but doesn't force trailing new line\n\n const hasTrailingTripleQuotes = escapedValue.endsWith('\\\\\"\"\"'); // Trailing quote (single or double) or slash forces trailing new line\n\n const hasTrailingQuote = value.endsWith('\"') && !hasTrailingTripleQuotes;\n const hasTrailingSlash = value.endsWith('\\\\');\n const forceTrailingNewline = hasTrailingQuote || hasTrailingSlash;\n const printAsMultipleLines =\n !(options !== null && options !== void 0 && options.minimize) && // add leading and trailing new lines only if it improves readability\n (!isSingleLine ||\n value.length > 70 ||\n forceTrailingNewline ||\n forceLeadingNewLine ||\n hasTrailingTripleQuotes);\n let result = ''; // Format a multi-line block quote to account for leading space.\n\n const skipLeadingNewLine = isSingleLine && (0,_characterClasses_mjs__WEBPACK_IMPORTED_MODULE_0__/* .isWhiteSpace */ .i0)(value.charCodeAt(0));\n\n if ((printAsMultipleLines && !skipLeadingNewLine) || forceLeadingNewLine) {\n result += '\\n';\n }\n\n result += escapedValue;\n\n if (printAsMultipleLines || forceTrailingNewline) {\n result += '\\n';\n }\n\n return '\"\"\"' + result + '\"\"\"';\n}\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/graphql/language/blockString.mjs?", + ); + + /***/ + }, + + /***/ 9646: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ i0: () => (/* binding */ isWhiteSpace),\n/* harmony export */ un: () => (/* binding */ isNameStart),\n/* harmony export */ xr: () => (/* binding */ isNameContinue),\n/* harmony export */ yp: () => (/* binding */ isDigit)\n/* harmony export */ });\n/* unused harmony export isLetter */\n/**\n * ```\n * WhiteSpace ::\n * - "Horizontal Tab (U+0009)"\n * - "Space (U+0020)"\n * ```\n * @internal\n */\nfunction isWhiteSpace(code) {\n return code === 0x0009 || code === 0x0020;\n}\n/**\n * ```\n * Digit :: one of\n * - `0` `1` `2` `3` `4` `5` `6` `7` `8` `9`\n * ```\n * @internal\n */\n\nfunction isDigit(code) {\n return code >= 0x0030 && code <= 0x0039;\n}\n/**\n * ```\n * Letter :: one of\n * - `A` `B` `C` `D` `E` `F` `G` `H` `I` `J` `K` `L` `M`\n * - `N` `O` `P` `Q` `R` `S` `T` `U` `V` `W` `X` `Y` `Z`\n * - `a` `b` `c` `d` `e` `f` `g` `h` `i` `j` `k` `l` `m`\n * - `n` `o` `p` `q` `r` `s` `t` `u` `v` `w` `x` `y` `z`\n * ```\n * @internal\n */\n\nfunction isLetter(code) {\n return (\n (code >= 0x0061 && code <= 0x007a) || // A-Z\n (code >= 0x0041 && code <= 0x005a) // a-z\n );\n}\n/**\n * ```\n * NameStart ::\n * - Letter\n * - `_`\n * ```\n * @internal\n */\n\nfunction isNameStart(code) {\n return isLetter(code) || code === 0x005f;\n}\n/**\n * ```\n * NameContinue ::\n * - Letter\n * - Digit\n * - `_`\n * ```\n * @internal\n */\n\nfunction isNameContinue(code) {\n return isLetter(code) || isDigit(code) || code === 0x005f;\n}\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/graphql/language/characterClasses.mjs?', + ); + + /***/ + }, + + /***/ 3298: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + "/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ b: () => (/* binding */ Kind)\n/* harmony export */ });\n/**\n * The set of allowed kind values for AST nodes.\n */\nvar Kind;\n\n(function (Kind) {\n Kind['NAME'] = 'Name';\n Kind['DOCUMENT'] = 'Document';\n Kind['OPERATION_DEFINITION'] = 'OperationDefinition';\n Kind['VARIABLE_DEFINITION'] = 'VariableDefinition';\n Kind['SELECTION_SET'] = 'SelectionSet';\n Kind['FIELD'] = 'Field';\n Kind['ARGUMENT'] = 'Argument';\n Kind['FRAGMENT_SPREAD'] = 'FragmentSpread';\n Kind['INLINE_FRAGMENT'] = 'InlineFragment';\n Kind['FRAGMENT_DEFINITION'] = 'FragmentDefinition';\n Kind['VARIABLE'] = 'Variable';\n Kind['INT'] = 'IntValue';\n Kind['FLOAT'] = 'FloatValue';\n Kind['STRING'] = 'StringValue';\n Kind['BOOLEAN'] = 'BooleanValue';\n Kind['NULL'] = 'NullValue';\n Kind['ENUM'] = 'EnumValue';\n Kind['LIST'] = 'ListValue';\n Kind['OBJECT'] = 'ObjectValue';\n Kind['OBJECT_FIELD'] = 'ObjectField';\n Kind['DIRECTIVE'] = 'Directive';\n Kind['NAMED_TYPE'] = 'NamedType';\n Kind['LIST_TYPE'] = 'ListType';\n Kind['NON_NULL_TYPE'] = 'NonNullType';\n Kind['SCHEMA_DEFINITION'] = 'SchemaDefinition';\n Kind['OPERATION_TYPE_DEFINITION'] = 'OperationTypeDefinition';\n Kind['SCALAR_TYPE_DEFINITION'] = 'ScalarTypeDefinition';\n Kind['OBJECT_TYPE_DEFINITION'] = 'ObjectTypeDefinition';\n Kind['FIELD_DEFINITION'] = 'FieldDefinition';\n Kind['INPUT_VALUE_DEFINITION'] = 'InputValueDefinition';\n Kind['INTERFACE_TYPE_DEFINITION'] = 'InterfaceTypeDefinition';\n Kind['UNION_TYPE_DEFINITION'] = 'UnionTypeDefinition';\n Kind['ENUM_TYPE_DEFINITION'] = 'EnumTypeDefinition';\n Kind['ENUM_VALUE_DEFINITION'] = 'EnumValueDefinition';\n Kind['INPUT_OBJECT_TYPE_DEFINITION'] = 'InputObjectTypeDefinition';\n Kind['DIRECTIVE_DEFINITION'] = 'DirectiveDefinition';\n Kind['SCHEMA_EXTENSION'] = 'SchemaExtension';\n Kind['SCALAR_TYPE_EXTENSION'] = 'ScalarTypeExtension';\n Kind['OBJECT_TYPE_EXTENSION'] = 'ObjectTypeExtension';\n Kind['INTERFACE_TYPE_EXTENSION'] = 'InterfaceTypeExtension';\n Kind['UNION_TYPE_EXTENSION'] = 'UnionTypeExtension';\n Kind['ENUM_TYPE_EXTENSION'] = 'EnumTypeExtension';\n Kind['INPUT_OBJECT_TYPE_EXTENSION'] = 'InputObjectTypeExtension';\n})(Kind || (Kind = {}));\n\n\n/**\n * The enum type representing the possible kind values of AST nodes.\n *\n * @deprecated Please use `Kind`. Will be remove in v17.\n */\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/graphql/language/kinds.mjs?", + ); + + /***/ + }, + + /***/ 4705: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ YR: () => (/* binding */ visit),\n/* harmony export */ sP: () => (/* binding */ BREAK)\n/* harmony export */ });\n/* unused harmony exports visitInParallel, getEnterLeaveForKind, getVisitFn */\n/* harmony import */ var _jsutils_devAssert_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6286);\n/* harmony import */ var _jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(129);\n/* harmony import */ var _ast_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(475);\n/* harmony import */ var _kinds_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3298);\n\n\n\n\n/**\n * A visitor is provided to visit, it contains the collection of\n * relevant functions to be called during the visitor\'s traversal.\n */\n\nconst BREAK = Object.freeze({});\n/**\n * visit() will walk through an AST using a depth-first traversal, calling\n * the visitor\'s enter function at each node in the traversal, and calling the\n * leave function after visiting that node and all of its child nodes.\n *\n * By returning different values from the enter and leave functions, the\n * behavior of the visitor can be altered, including skipping over a sub-tree of\n * the AST (by returning false), editing the AST by returning a value or null\n * to remove the value, or to stop the whole traversal by returning BREAK.\n *\n * When using visit() to edit an AST, the original AST will not be modified, and\n * a new version of the AST with the changes applied will be returned from the\n * visit function.\n *\n * ```ts\n * const editedAST = visit(ast, {\n * enter(node, key, parent, path, ancestors) {\n * // @return\n * // undefined: no action\n * // false: skip visiting this node\n * // visitor.BREAK: stop visiting altogether\n * // null: delete this node\n * // any value: replace this node with the returned value\n * },\n * leave(node, key, parent, path, ancestors) {\n * // @return\n * // undefined: no action\n * // false: no action\n * // visitor.BREAK: stop visiting altogether\n * // null: delete this node\n * // any value: replace this node with the returned value\n * }\n * });\n * ```\n *\n * Alternatively to providing enter() and leave() functions, a visitor can\n * instead provide functions named the same as the kinds of AST nodes, or\n * enter/leave visitors at a named key, leading to three permutations of the\n * visitor API:\n *\n * 1) Named visitors triggered when entering a node of a specific kind.\n *\n * ```ts\n * visit(ast, {\n * Kind(node) {\n * // enter the "Kind" node\n * }\n * })\n * ```\n *\n * 2) Named visitors that trigger upon entering and leaving a node of a specific kind.\n *\n * ```ts\n * visit(ast, {\n * Kind: {\n * enter(node) {\n * // enter the "Kind" node\n * }\n * leave(node) {\n * // leave the "Kind" node\n * }\n * }\n * })\n * ```\n *\n * 3) Generic visitors that trigger upon entering and leaving any node.\n *\n * ```ts\n * visit(ast, {\n * enter(node) {\n * // enter any node\n * },\n * leave(node) {\n * // leave any node\n * }\n * })\n * ```\n */\n\nfunction visit(root, visitor, visitorKeys = _ast_mjs__WEBPACK_IMPORTED_MODULE_0__/* .QueryDocumentKeys */ .aD) {\n const enterLeaveMap = new Map();\n\n for (const kind of Object.values(_kinds_mjs__WEBPACK_IMPORTED_MODULE_1__/* .Kind */ .b)) {\n enterLeaveMap.set(kind, getEnterLeaveForKind(visitor, kind));\n }\n /* eslint-disable no-undef-init */\n\n let stack = undefined;\n let inArray = Array.isArray(root);\n let keys = [root];\n let index = -1;\n let edits = [];\n let node = root;\n let key = undefined;\n let parent = undefined;\n const path = [];\n const ancestors = [];\n /* eslint-enable no-undef-init */\n\n do {\n index++;\n const isLeaving = index === keys.length;\n const isEdited = isLeaving && edits.length !== 0;\n\n if (isLeaving) {\n key = ancestors.length === 0 ? undefined : path[path.length - 1];\n node = parent;\n parent = ancestors.pop();\n\n if (isEdited) {\n if (inArray) {\n node = node.slice();\n let editOffset = 0;\n\n for (const [editKey, editValue] of edits) {\n const arrayKey = editKey - editOffset;\n\n if (editValue === null) {\n node.splice(arrayKey, 1);\n editOffset++;\n } else {\n node[arrayKey] = editValue;\n }\n }\n } else {\n node = Object.defineProperties(\n {},\n Object.getOwnPropertyDescriptors(node),\n );\n\n for (const [editKey, editValue] of edits) {\n node[editKey] = editValue;\n }\n }\n }\n\n index = stack.index;\n keys = stack.keys;\n edits = stack.edits;\n inArray = stack.inArray;\n stack = stack.prev;\n } else if (parent) {\n key = inArray ? index : keys[index];\n node = parent[key];\n\n if (node === null || node === undefined) {\n continue;\n }\n\n path.push(key);\n }\n\n let result;\n\n if (!Array.isArray(node)) {\n var _enterLeaveMap$get, _enterLeaveMap$get2;\n\n (0,_ast_mjs__WEBPACK_IMPORTED_MODULE_0__/* .isNode */ .Ll)(node) || (0,_jsutils_devAssert_mjs__WEBPACK_IMPORTED_MODULE_2__/* .devAssert */ .U)(false, `Invalid AST Node: ${(0,_jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_3__/* .inspect */ .N)(node)}.`);\n const visitFn = isLeaving\n ? (_enterLeaveMap$get = enterLeaveMap.get(node.kind)) === null ||\n _enterLeaveMap$get === void 0\n ? void 0\n : _enterLeaveMap$get.leave\n : (_enterLeaveMap$get2 = enterLeaveMap.get(node.kind)) === null ||\n _enterLeaveMap$get2 === void 0\n ? void 0\n : _enterLeaveMap$get2.enter;\n result =\n visitFn === null || visitFn === void 0\n ? void 0\n : visitFn.call(visitor, node, key, parent, path, ancestors);\n\n if (result === BREAK) {\n break;\n }\n\n if (result === false) {\n if (!isLeaving) {\n path.pop();\n continue;\n }\n } else if (result !== undefined) {\n edits.push([key, result]);\n\n if (!isLeaving) {\n if ((0,_ast_mjs__WEBPACK_IMPORTED_MODULE_0__/* .isNode */ .Ll)(result)) {\n node = result;\n } else {\n path.pop();\n continue;\n }\n }\n }\n }\n\n if (result === undefined && isEdited) {\n edits.push([key, node]);\n }\n\n if (isLeaving) {\n path.pop();\n } else {\n var _node$kind;\n\n stack = {\n inArray,\n index,\n keys,\n edits,\n prev: stack,\n };\n inArray = Array.isArray(node);\n keys = inArray\n ? node\n : (_node$kind = visitorKeys[node.kind]) !== null &&\n _node$kind !== void 0\n ? _node$kind\n : [];\n index = -1;\n edits = [];\n\n if (parent) {\n ancestors.push(parent);\n }\n\n parent = node;\n }\n } while (stack !== undefined);\n\n if (edits.length !== 0) {\n // New root\n return edits[edits.length - 1][1];\n }\n\n return root;\n}\n/**\n * Creates a new visitor instance which delegates to many visitors to run in\n * parallel. Each visitor will be visited for each node before moving on.\n *\n * If a prior visitor edits a node, no following visitors will see that node.\n */\n\nfunction visitInParallel(visitors) {\n const skipping = new Array(visitors.length).fill(null);\n const mergedVisitor = Object.create(null);\n\n for (const kind of Object.values(Kind)) {\n let hasVisitor = false;\n const enterList = new Array(visitors.length).fill(undefined);\n const leaveList = new Array(visitors.length).fill(undefined);\n\n for (let i = 0; i < visitors.length; ++i) {\n const { enter, leave } = getEnterLeaveForKind(visitors[i], kind);\n hasVisitor || (hasVisitor = enter != null || leave != null);\n enterList[i] = enter;\n leaveList[i] = leave;\n }\n\n if (!hasVisitor) {\n continue;\n }\n\n const mergedEnterLeave = {\n enter(...args) {\n const node = args[0];\n\n for (let i = 0; i < visitors.length; i++) {\n if (skipping[i] === null) {\n var _enterList$i;\n\n const result =\n (_enterList$i = enterList[i]) === null || _enterList$i === void 0\n ? void 0\n : _enterList$i.apply(visitors[i], args);\n\n if (result === false) {\n skipping[i] = node;\n } else if (result === BREAK) {\n skipping[i] = BREAK;\n } else if (result !== undefined) {\n return result;\n }\n }\n }\n },\n\n leave(...args) {\n const node = args[0];\n\n for (let i = 0; i < visitors.length; i++) {\n if (skipping[i] === null) {\n var _leaveList$i;\n\n const result =\n (_leaveList$i = leaveList[i]) === null || _leaveList$i === void 0\n ? void 0\n : _leaveList$i.apply(visitors[i], args);\n\n if (result === BREAK) {\n skipping[i] = BREAK;\n } else if (result !== undefined && result !== false) {\n return result;\n }\n } else if (skipping[i] === node) {\n skipping[i] = null;\n }\n }\n },\n };\n mergedVisitor[kind] = mergedEnterLeave;\n }\n\n return mergedVisitor;\n}\n/**\n * Given a visitor instance and a node kind, return EnterLeaveVisitor for that kind.\n */\n\nfunction getEnterLeaveForKind(visitor, kind) {\n const kindVisitor = visitor[kind];\n\n if (typeof kindVisitor === \'object\') {\n // { Kind: { enter() {}, leave() {} } }\n return kindVisitor;\n } else if (typeof kindVisitor === \'function\') {\n // { Kind() {} }\n return {\n enter: kindVisitor,\n leave: undefined,\n };\n } // { enter() {}, leave() {} }\n\n return {\n enter: visitor.enter,\n leave: visitor.leave,\n };\n}\n/**\n * Given a visitor instance, if it is leaving or not, and a node kind, return\n * the function the visitor runtime should call.\n *\n * @deprecated Please use `getEnterLeaveForKind` instead. Will be removed in v17\n */\n\n/* c8 ignore next 8 */\n\nfunction getVisitFn(visitor, kind, isLeaving) {\n const { enter, leave } = getEnterLeaveForKind(visitor, kind);\n return isLeaving ? leave : enter;\n}\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/graphql/language/visitor.mjs?', + ); + + /***/ + }, + + /***/ 9778: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + "// ESM COMPAT FLAG\n__webpack_require__.r(__webpack_exports__);\n\n// EXPORTS\n__webpack_require__.d(__webpack_exports__, {\n AbortError: () => (/* binding */ AbortError),\n FetchError: () => (/* binding */ FetchError),\n Headers: () => (/* binding */ Headers),\n Request: () => (/* binding */ Request),\n Response: () => (/* binding */ Response),\n \"default\": () => (/* binding */ lib)\n});\n\n// EXTERNAL MODULE: external \"stream\"\nvar external_stream_ = __webpack_require__(2203);\n;// CONCATENATED MODULE: external \"http\"\nconst external_http_namespaceObject = require(\"http\");\n;// CONCATENATED MODULE: external \"url\"\nconst external_url_namespaceObject = require(\"url\");\n// EXTERNAL MODULE: ./node_modules/node-fetch/node_modules/whatwg-url/lib/public-api.js\nvar public_api = __webpack_require__(6862);\n;// CONCATENATED MODULE: external \"https\"\nconst external_https_namespaceObject = require(\"https\");\n;// CONCATENATED MODULE: external \"zlib\"\nconst external_zlib_namespaceObject = require(\"zlib\");\n;// CONCATENATED MODULE: ./node_modules/node-fetch/lib/index.mjs\n\n\n\n\n\n\n\n// Based on https://github.com/tmpvar/jsdom/blob/aa85b2abf07766ff7bf5c1f6daafb3726f2f2db5/lib/jsdom/living/blob.js\n\n// fix for \"Readable\" isn't a named export issue\nconst Readable = external_stream_.Readable;\n\nconst BUFFER = Symbol('buffer');\nconst TYPE = Symbol('type');\n\nclass Blob {\n\tconstructor() {\n\t\tthis[TYPE] = '';\n\n\t\tconst blobParts = arguments[0];\n\t\tconst options = arguments[1];\n\n\t\tconst buffers = [];\n\t\tlet size = 0;\n\n\t\tif (blobParts) {\n\t\t\tconst a = blobParts;\n\t\t\tconst length = Number(a.length);\n\t\t\tfor (let i = 0; i < length; i++) {\n\t\t\t\tconst element = a[i];\n\t\t\t\tlet buffer;\n\t\t\t\tif (element instanceof Buffer) {\n\t\t\t\t\tbuffer = element;\n\t\t\t\t} else if (ArrayBuffer.isView(element)) {\n\t\t\t\t\tbuffer = Buffer.from(element.buffer, element.byteOffset, element.byteLength);\n\t\t\t\t} else if (element instanceof ArrayBuffer) {\n\t\t\t\t\tbuffer = Buffer.from(element);\n\t\t\t\t} else if (element instanceof Blob) {\n\t\t\t\t\tbuffer = element[BUFFER];\n\t\t\t\t} else {\n\t\t\t\t\tbuffer = Buffer.from(typeof element === 'string' ? element : String(element));\n\t\t\t\t}\n\t\t\t\tsize += buffer.length;\n\t\t\t\tbuffers.push(buffer);\n\t\t\t}\n\t\t}\n\n\t\tthis[BUFFER] = Buffer.concat(buffers);\n\n\t\tlet type = options && options.type !== undefined && String(options.type).toLowerCase();\n\t\tif (type && !/[^\\u0020-\\u007E]/.test(type)) {\n\t\t\tthis[TYPE] = type;\n\t\t}\n\t}\n\tget size() {\n\t\treturn this[BUFFER].length;\n\t}\n\tget type() {\n\t\treturn this[TYPE];\n\t}\n\ttext() {\n\t\treturn Promise.resolve(this[BUFFER].toString());\n\t}\n\tarrayBuffer() {\n\t\tconst buf = this[BUFFER];\n\t\tconst ab = buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength);\n\t\treturn Promise.resolve(ab);\n\t}\n\tstream() {\n\t\tconst readable = new Readable();\n\t\treadable._read = function () {};\n\t\treadable.push(this[BUFFER]);\n\t\treadable.push(null);\n\t\treturn readable;\n\t}\n\ttoString() {\n\t\treturn '[object Blob]';\n\t}\n\tslice() {\n\t\tconst size = this.size;\n\n\t\tconst start = arguments[0];\n\t\tconst end = arguments[1];\n\t\tlet relativeStart, relativeEnd;\n\t\tif (start === undefined) {\n\t\t\trelativeStart = 0;\n\t\t} else if (start < 0) {\n\t\t\trelativeStart = Math.max(size + start, 0);\n\t\t} else {\n\t\t\trelativeStart = Math.min(start, size);\n\t\t}\n\t\tif (end === undefined) {\n\t\t\trelativeEnd = size;\n\t\t} else if (end < 0) {\n\t\t\trelativeEnd = Math.max(size + end, 0);\n\t\t} else {\n\t\t\trelativeEnd = Math.min(end, size);\n\t\t}\n\t\tconst span = Math.max(relativeEnd - relativeStart, 0);\n\n\t\tconst buffer = this[BUFFER];\n\t\tconst slicedBuffer = buffer.slice(relativeStart, relativeStart + span);\n\t\tconst blob = new Blob([], { type: arguments[2] });\n\t\tblob[BUFFER] = slicedBuffer;\n\t\treturn blob;\n\t}\n}\n\nObject.defineProperties(Blob.prototype, {\n\tsize: { enumerable: true },\n\ttype: { enumerable: true },\n\tslice: { enumerable: true }\n});\n\nObject.defineProperty(Blob.prototype, Symbol.toStringTag, {\n\tvalue: 'Blob',\n\twritable: false,\n\tenumerable: false,\n\tconfigurable: true\n});\n\n/**\n * fetch-error.js\n *\n * FetchError interface for operational errors\n */\n\n/**\n * Create FetchError instance\n *\n * @param String message Error message for human\n * @param String type Error type for machine\n * @param String systemError For Node.js system error\n * @return FetchError\n */\nfunction FetchError(message, type, systemError) {\n Error.call(this, message);\n\n this.message = message;\n this.type = type;\n\n // when err.type is `system`, err.code contains system error code\n if (systemError) {\n this.code = this.errno = systemError.code;\n }\n\n // hide custom error implementation details from end-users\n Error.captureStackTrace(this, this.constructor);\n}\n\nFetchError.prototype = Object.create(Error.prototype);\nFetchError.prototype.constructor = FetchError;\nFetchError.prototype.name = 'FetchError';\n\nlet convert;\ntry {\n\tconvert = require('encoding').convert;\n} catch (e) {}\n\nconst INTERNALS = Symbol('Body internals');\n\n// fix an issue where \"PassThrough\" isn't a named export for node <10\nconst PassThrough = external_stream_.PassThrough;\n\n/**\n * Body mixin\n *\n * Ref: https://fetch.spec.whatwg.org/#body\n *\n * @param Stream body Readable stream\n * @param Object opts Response options\n * @return Void\n */\nfunction Body(body) {\n\tvar _this = this;\n\n\tvar _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n\t _ref$size = _ref.size;\n\n\tlet size = _ref$size === undefined ? 0 : _ref$size;\n\tvar _ref$timeout = _ref.timeout;\n\tlet timeout = _ref$timeout === undefined ? 0 : _ref$timeout;\n\n\tif (body == null) {\n\t\t// body is undefined or null\n\t\tbody = null;\n\t} else if (isURLSearchParams(body)) {\n\t\t// body is a URLSearchParams\n\t\tbody = Buffer.from(body.toString());\n\t} else if (isBlob(body)) ; else if (Buffer.isBuffer(body)) ; else if (Object.prototype.toString.call(body) === '[object ArrayBuffer]') {\n\t\t// body is ArrayBuffer\n\t\tbody = Buffer.from(body);\n\t} else if (ArrayBuffer.isView(body)) {\n\t\t// body is ArrayBufferView\n\t\tbody = Buffer.from(body.buffer, body.byteOffset, body.byteLength);\n\t} else if (body instanceof external_stream_) ; else {\n\t\t// none of the above\n\t\t// coerce to string then buffer\n\t\tbody = Buffer.from(String(body));\n\t}\n\tthis[INTERNALS] = {\n\t\tbody,\n\t\tdisturbed: false,\n\t\terror: null\n\t};\n\tthis.size = size;\n\tthis.timeout = timeout;\n\n\tif (body instanceof external_stream_) {\n\t\tbody.on('error', function (err) {\n\t\t\tconst error = err.name === 'AbortError' ? err : new FetchError(`Invalid response body while trying to fetch ${_this.url}: ${err.message}`, 'system', err);\n\t\t\t_this[INTERNALS].error = error;\n\t\t});\n\t}\n}\n\nBody.prototype = {\n\tget body() {\n\t\treturn this[INTERNALS].body;\n\t},\n\n\tget bodyUsed() {\n\t\treturn this[INTERNALS].disturbed;\n\t},\n\n\t/**\n * Decode response as ArrayBuffer\n *\n * @return Promise\n */\n\tarrayBuffer() {\n\t\treturn consumeBody.call(this).then(function (buf) {\n\t\t\treturn buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength);\n\t\t});\n\t},\n\n\t/**\n * Return raw response as Blob\n *\n * @return Promise\n */\n\tblob() {\n\t\tlet ct = this.headers && this.headers.get('content-type') || '';\n\t\treturn consumeBody.call(this).then(function (buf) {\n\t\t\treturn Object.assign(\n\t\t\t// Prevent copying\n\t\t\tnew Blob([], {\n\t\t\t\ttype: ct.toLowerCase()\n\t\t\t}), {\n\t\t\t\t[BUFFER]: buf\n\t\t\t});\n\t\t});\n\t},\n\n\t/**\n * Decode response as json\n *\n * @return Promise\n */\n\tjson() {\n\t\tvar _this2 = this;\n\n\t\treturn consumeBody.call(this).then(function (buffer) {\n\t\t\ttry {\n\t\t\t\treturn JSON.parse(buffer.toString());\n\t\t\t} catch (err) {\n\t\t\t\treturn Body.Promise.reject(new FetchError(`invalid json response body at ${_this2.url} reason: ${err.message}`, 'invalid-json'));\n\t\t\t}\n\t\t});\n\t},\n\n\t/**\n * Decode response as text\n *\n * @return Promise\n */\n\ttext() {\n\t\treturn consumeBody.call(this).then(function (buffer) {\n\t\t\treturn buffer.toString();\n\t\t});\n\t},\n\n\t/**\n * Decode response as buffer (non-spec api)\n *\n * @return Promise\n */\n\tbuffer() {\n\t\treturn consumeBody.call(this);\n\t},\n\n\t/**\n * Decode response as text, while automatically detecting the encoding and\n * trying to decode to UTF-8 (non-spec api)\n *\n * @return Promise\n */\n\ttextConverted() {\n\t\tvar _this3 = this;\n\n\t\treturn consumeBody.call(this).then(function (buffer) {\n\t\t\treturn convertBody(buffer, _this3.headers);\n\t\t});\n\t}\n};\n\n// In browsers, all properties are enumerable.\nObject.defineProperties(Body.prototype, {\n\tbody: { enumerable: true },\n\tbodyUsed: { enumerable: true },\n\tarrayBuffer: { enumerable: true },\n\tblob: { enumerable: true },\n\tjson: { enumerable: true },\n\ttext: { enumerable: true }\n});\n\nBody.mixIn = function (proto) {\n\tfor (const name of Object.getOwnPropertyNames(Body.prototype)) {\n\t\t// istanbul ignore else: future proof\n\t\tif (!(name in proto)) {\n\t\t\tconst desc = Object.getOwnPropertyDescriptor(Body.prototype, name);\n\t\t\tObject.defineProperty(proto, name, desc);\n\t\t}\n\t}\n};\n\n/**\n * Consume and convert an entire Body to a Buffer.\n *\n * Ref: https://fetch.spec.whatwg.org/#concept-body-consume-body\n *\n * @return Promise\n */\nfunction consumeBody() {\n\tvar _this4 = this;\n\n\tif (this[INTERNALS].disturbed) {\n\t\treturn Body.Promise.reject(new TypeError(`body used already for: ${this.url}`));\n\t}\n\n\tthis[INTERNALS].disturbed = true;\n\n\tif (this[INTERNALS].error) {\n\t\treturn Body.Promise.reject(this[INTERNALS].error);\n\t}\n\n\tlet body = this.body;\n\n\t// body is null\n\tif (body === null) {\n\t\treturn Body.Promise.resolve(Buffer.alloc(0));\n\t}\n\n\t// body is blob\n\tif (isBlob(body)) {\n\t\tbody = body.stream();\n\t}\n\n\t// body is buffer\n\tif (Buffer.isBuffer(body)) {\n\t\treturn Body.Promise.resolve(body);\n\t}\n\n\t// istanbul ignore if: should never happen\n\tif (!(body instanceof external_stream_)) {\n\t\treturn Body.Promise.resolve(Buffer.alloc(0));\n\t}\n\n\t// body is stream\n\t// get ready to actually consume the body\n\tlet accum = [];\n\tlet accumBytes = 0;\n\tlet abort = false;\n\n\treturn new Body.Promise(function (resolve, reject) {\n\t\tlet resTimeout;\n\n\t\t// allow timeout on slow response body\n\t\tif (_this4.timeout) {\n\t\t\tresTimeout = setTimeout(function () {\n\t\t\t\tabort = true;\n\t\t\t\treject(new FetchError(`Response timeout while trying to fetch ${_this4.url} (over ${_this4.timeout}ms)`, 'body-timeout'));\n\t\t\t}, _this4.timeout);\n\t\t}\n\n\t\t// handle stream errors\n\t\tbody.on('error', function (err) {\n\t\t\tif (err.name === 'AbortError') {\n\t\t\t\t// if the request was aborted, reject with this Error\n\t\t\t\tabort = true;\n\t\t\t\treject(err);\n\t\t\t} else {\n\t\t\t\t// other errors, such as incorrect content-encoding\n\t\t\t\treject(new FetchError(`Invalid response body while trying to fetch ${_this4.url}: ${err.message}`, 'system', err));\n\t\t\t}\n\t\t});\n\n\t\tbody.on('data', function (chunk) {\n\t\t\tif (abort || chunk === null) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (_this4.size && accumBytes + chunk.length > _this4.size) {\n\t\t\t\tabort = true;\n\t\t\t\treject(new FetchError(`content size at ${_this4.url} over limit: ${_this4.size}`, 'max-size'));\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\taccumBytes += chunk.length;\n\t\t\taccum.push(chunk);\n\t\t});\n\n\t\tbody.on('end', function () {\n\t\t\tif (abort) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tclearTimeout(resTimeout);\n\n\t\t\ttry {\n\t\t\t\tresolve(Buffer.concat(accum, accumBytes));\n\t\t\t} catch (err) {\n\t\t\t\t// handle streams that have accumulated too much data (issue #414)\n\t\t\t\treject(new FetchError(`Could not create Buffer from response body for ${_this4.url}: ${err.message}`, 'system', err));\n\t\t\t}\n\t\t});\n\t});\n}\n\n/**\n * Detect buffer encoding and convert to target encoding\n * ref: http://www.w3.org/TR/2011/WD-html5-20110113/parsing.html#determining-the-character-encoding\n *\n * @param Buffer buffer Incoming buffer\n * @param String encoding Target encoding\n * @return String\n */\nfunction convertBody(buffer, headers) {\n\tif (typeof convert !== 'function') {\n\t\tthrow new Error('The package `encoding` must be installed to use the textConverted() function');\n\t}\n\n\tconst ct = headers.get('content-type');\n\tlet charset = 'utf-8';\n\tlet res, str;\n\n\t// header\n\tif (ct) {\n\t\tres = /charset=([^;]*)/i.exec(ct);\n\t}\n\n\t// no charset in content type, peek at response body for at most 1024 bytes\n\tstr = buffer.slice(0, 1024).toString();\n\n\t// html5\n\tif (!res && str) {\n\t\tres = /<meta.+?charset=(['\"])(.+?)\\1/i.exec(str);\n\t}\n\n\t// html4\n\tif (!res && str) {\n\t\tres = /<meta[\\s]+?http-equiv=(['\"])content-type\\1[\\s]+?content=(['\"])(.+?)\\2/i.exec(str);\n\t\tif (!res) {\n\t\t\tres = /<meta[\\s]+?content=(['\"])(.+?)\\1[\\s]+?http-equiv=(['\"])content-type\\3/i.exec(str);\n\t\t\tif (res) {\n\t\t\t\tres.pop(); // drop last quote\n\t\t\t}\n\t\t}\n\n\t\tif (res) {\n\t\t\tres = /charset=(.*)/i.exec(res.pop());\n\t\t}\n\t}\n\n\t// xml\n\tif (!res && str) {\n\t\tres = /<\\?xml.+?encoding=(['\"])(.+?)\\1/i.exec(str);\n\t}\n\n\t// found charset\n\tif (res) {\n\t\tcharset = res.pop();\n\n\t\t// prevent decode issues when sites use incorrect encoding\n\t\t// ref: https://hsivonen.fi/encoding-menu/\n\t\tif (charset === 'gb2312' || charset === 'gbk') {\n\t\t\tcharset = 'gb18030';\n\t\t}\n\t}\n\n\t// turn raw buffers into a single utf-8 buffer\n\treturn convert(buffer, 'UTF-8', charset).toString();\n}\n\n/**\n * Detect a URLSearchParams object\n * ref: https://github.com/bitinn/node-fetch/issues/296#issuecomment-307598143\n *\n * @param Object obj Object to detect by type or brand\n * @return String\n */\nfunction isURLSearchParams(obj) {\n\t// Duck-typing as a necessary condition.\n\tif (typeof obj !== 'object' || typeof obj.append !== 'function' || typeof obj.delete !== 'function' || typeof obj.get !== 'function' || typeof obj.getAll !== 'function' || typeof obj.has !== 'function' || typeof obj.set !== 'function') {\n\t\treturn false;\n\t}\n\n\t// Brand-checking and more duck-typing as optional condition.\n\treturn obj.constructor.name === 'URLSearchParams' || Object.prototype.toString.call(obj) === '[object URLSearchParams]' || typeof obj.sort === 'function';\n}\n\n/**\n * Check if `obj` is a W3C `Blob` object (which `File` inherits from)\n * @param {*} obj\n * @return {boolean}\n */\nfunction isBlob(obj) {\n\treturn typeof obj === 'object' && typeof obj.arrayBuffer === 'function' && typeof obj.type === 'string' && typeof obj.stream === 'function' && typeof obj.constructor === 'function' && typeof obj.constructor.name === 'string' && /^(Blob|File)$/.test(obj.constructor.name) && /^(Blob|File)$/.test(obj[Symbol.toStringTag]);\n}\n\n/**\n * Clone body given Res/Req instance\n *\n * @param Mixed instance Response or Request instance\n * @return Mixed\n */\nfunction clone(instance) {\n\tlet p1, p2;\n\tlet body = instance.body;\n\n\t// don't allow cloning a used body\n\tif (instance.bodyUsed) {\n\t\tthrow new Error('cannot clone body after it is used');\n\t}\n\n\t// check that body is a stream and not form-data object\n\t// note: we can't clone the form-data object without having it as a dependency\n\tif (body instanceof external_stream_ && typeof body.getBoundary !== 'function') {\n\t\t// tee instance body\n\t\tp1 = new PassThrough();\n\t\tp2 = new PassThrough();\n\t\tbody.pipe(p1);\n\t\tbody.pipe(p2);\n\t\t// set instance body to teed body and return the other teed body\n\t\tinstance[INTERNALS].body = p1;\n\t\tbody = p2;\n\t}\n\n\treturn body;\n}\n\n/**\n * Performs the operation \"extract a `Content-Type` value from |object|\" as\n * specified in the specification:\n * https://fetch.spec.whatwg.org/#concept-bodyinit-extract\n *\n * This function assumes that instance.body is present.\n *\n * @param Mixed instance Any options.body input\n */\nfunction extractContentType(body) {\n\tif (body === null) {\n\t\t// body is null\n\t\treturn null;\n\t} else if (typeof body === 'string') {\n\t\t// body is string\n\t\treturn 'text/plain;charset=UTF-8';\n\t} else if (isURLSearchParams(body)) {\n\t\t// body is a URLSearchParams\n\t\treturn 'application/x-www-form-urlencoded;charset=UTF-8';\n\t} else if (isBlob(body)) {\n\t\t// body is blob\n\t\treturn body.type || null;\n\t} else if (Buffer.isBuffer(body)) {\n\t\t// body is buffer\n\t\treturn null;\n\t} else if (Object.prototype.toString.call(body) === '[object ArrayBuffer]') {\n\t\t// body is ArrayBuffer\n\t\treturn null;\n\t} else if (ArrayBuffer.isView(body)) {\n\t\t// body is ArrayBufferView\n\t\treturn null;\n\t} else if (typeof body.getBoundary === 'function') {\n\t\t// detect form data input from form-data module\n\t\treturn `multipart/form-data;boundary=${body.getBoundary()}`;\n\t} else if (body instanceof external_stream_) {\n\t\t// body is stream\n\t\t// can't really do much about this\n\t\treturn null;\n\t} else {\n\t\t// Body constructor defaults other things to string\n\t\treturn 'text/plain;charset=UTF-8';\n\t}\n}\n\n/**\n * The Fetch Standard treats this as if \"total bytes\" is a property on the body.\n * For us, we have to explicitly get it with a function.\n *\n * ref: https://fetch.spec.whatwg.org/#concept-body-total-bytes\n *\n * @param Body instance Instance of Body\n * @return Number? Number of bytes, or null if not possible\n */\nfunction getTotalBytes(instance) {\n\tconst body = instance.body;\n\n\n\tif (body === null) {\n\t\t// body is null\n\t\treturn 0;\n\t} else if (isBlob(body)) {\n\t\treturn body.size;\n\t} else if (Buffer.isBuffer(body)) {\n\t\t// body is buffer\n\t\treturn body.length;\n\t} else if (body && typeof body.getLengthSync === 'function') {\n\t\t// detect form data input from form-data module\n\t\tif (body._lengthRetrievers && body._lengthRetrievers.length == 0 || // 1.x\n\t\tbody.hasKnownLength && body.hasKnownLength()) {\n\t\t\t// 2.x\n\t\t\treturn body.getLengthSync();\n\t\t}\n\t\treturn null;\n\t} else {\n\t\t// body is stream\n\t\treturn null;\n\t}\n}\n\n/**\n * Write a Body to a Node.js WritableStream (e.g. http.Request) object.\n *\n * @param Body instance Instance of Body\n * @return Void\n */\nfunction writeToStream(dest, instance) {\n\tconst body = instance.body;\n\n\n\tif (body === null) {\n\t\t// body is null\n\t\tdest.end();\n\t} else if (isBlob(body)) {\n\t\tbody.stream().pipe(dest);\n\t} else if (Buffer.isBuffer(body)) {\n\t\t// body is buffer\n\t\tdest.write(body);\n\t\tdest.end();\n\t} else {\n\t\t// body is stream\n\t\tbody.pipe(dest);\n\t}\n}\n\n// expose Promise\nBody.Promise = global.Promise;\n\n/**\n * headers.js\n *\n * Headers class offers convenient helpers\n */\n\nconst invalidTokenRegex = /[^\\^_`a-zA-Z\\-0-9!#$%&'*+.|~]/;\nconst invalidHeaderCharRegex = /[^\\t\\x20-\\x7e\\x80-\\xff]/;\n\nfunction validateName(name) {\n\tname = `${name}`;\n\tif (invalidTokenRegex.test(name) || name === '') {\n\t\tthrow new TypeError(`${name} is not a legal HTTP header name`);\n\t}\n}\n\nfunction validateValue(value) {\n\tvalue = `${value}`;\n\tif (invalidHeaderCharRegex.test(value)) {\n\t\tthrow new TypeError(`${value} is not a legal HTTP header value`);\n\t}\n}\n\n/**\n * Find the key in the map object given a header name.\n *\n * Returns undefined if not found.\n *\n * @param String name Header name\n * @return String|Undefined\n */\nfunction find(map, name) {\n\tname = name.toLowerCase();\n\tfor (const key in map) {\n\t\tif (key.toLowerCase() === name) {\n\t\t\treturn key;\n\t\t}\n\t}\n\treturn undefined;\n}\n\nconst MAP = Symbol('map');\nclass Headers {\n\t/**\n * Headers class\n *\n * @param Object headers Response headers\n * @return Void\n */\n\tconstructor() {\n\t\tlet init = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;\n\n\t\tthis[MAP] = Object.create(null);\n\n\t\tif (init instanceof Headers) {\n\t\t\tconst rawHeaders = init.raw();\n\t\t\tconst headerNames = Object.keys(rawHeaders);\n\n\t\t\tfor (const headerName of headerNames) {\n\t\t\t\tfor (const value of rawHeaders[headerName]) {\n\t\t\t\t\tthis.append(headerName, value);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\t// We don't worry about converting prop to ByteString here as append()\n\t\t// will handle it.\n\t\tif (init == null) ; else if (typeof init === 'object') {\n\t\t\tconst method = init[Symbol.iterator];\n\t\t\tif (method != null) {\n\t\t\t\tif (typeof method !== 'function') {\n\t\t\t\t\tthrow new TypeError('Header pairs must be iterable');\n\t\t\t\t}\n\n\t\t\t\t// sequence<sequence<ByteString>>\n\t\t\t\t// Note: per spec we have to first exhaust the lists then process them\n\t\t\t\tconst pairs = [];\n\t\t\t\tfor (const pair of init) {\n\t\t\t\t\tif (typeof pair !== 'object' || typeof pair[Symbol.iterator] !== 'function') {\n\t\t\t\t\t\tthrow new TypeError('Each header pair must be iterable');\n\t\t\t\t\t}\n\t\t\t\t\tpairs.push(Array.from(pair));\n\t\t\t\t}\n\n\t\t\t\tfor (const pair of pairs) {\n\t\t\t\t\tif (pair.length !== 2) {\n\t\t\t\t\t\tthrow new TypeError('Each header pair must be a name/value tuple');\n\t\t\t\t\t}\n\t\t\t\t\tthis.append(pair[0], pair[1]);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// record<ByteString, ByteString>\n\t\t\t\tfor (const key of Object.keys(init)) {\n\t\t\t\t\tconst value = init[key];\n\t\t\t\t\tthis.append(key, value);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tthrow new TypeError('Provided initializer must be an object');\n\t\t}\n\t}\n\n\t/**\n * Return combined header value given name\n *\n * @param String name Header name\n * @return Mixed\n */\n\tget(name) {\n\t\tname = `${name}`;\n\t\tvalidateName(name);\n\t\tconst key = find(this[MAP], name);\n\t\tif (key === undefined) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn this[MAP][key].join(', ');\n\t}\n\n\t/**\n * Iterate over all headers\n *\n * @param Function callback Executed for each item with parameters (value, name, thisArg)\n * @param Boolean thisArg `this` context for callback function\n * @return Void\n */\n\tforEach(callback) {\n\t\tlet thisArg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined;\n\n\t\tlet pairs = getHeaders(this);\n\t\tlet i = 0;\n\t\twhile (i < pairs.length) {\n\t\t\tvar _pairs$i = pairs[i];\n\t\t\tconst name = _pairs$i[0],\n\t\t\t value = _pairs$i[1];\n\n\t\t\tcallback.call(thisArg, value, name, this);\n\t\t\tpairs = getHeaders(this);\n\t\t\ti++;\n\t\t}\n\t}\n\n\t/**\n * Overwrite header values given name\n *\n * @param String name Header name\n * @param String value Header value\n * @return Void\n */\n\tset(name, value) {\n\t\tname = `${name}`;\n\t\tvalue = `${value}`;\n\t\tvalidateName(name);\n\t\tvalidateValue(value);\n\t\tconst key = find(this[MAP], name);\n\t\tthis[MAP][key !== undefined ? key : name] = [value];\n\t}\n\n\t/**\n * Append a value onto existing header\n *\n * @param String name Header name\n * @param String value Header value\n * @return Void\n */\n\tappend(name, value) {\n\t\tname = `${name}`;\n\t\tvalue = `${value}`;\n\t\tvalidateName(name);\n\t\tvalidateValue(value);\n\t\tconst key = find(this[MAP], name);\n\t\tif (key !== undefined) {\n\t\t\tthis[MAP][key].push(value);\n\t\t} else {\n\t\t\tthis[MAP][name] = [value];\n\t\t}\n\t}\n\n\t/**\n * Check for header name existence\n *\n * @param String name Header name\n * @return Boolean\n */\n\thas(name) {\n\t\tname = `${name}`;\n\t\tvalidateName(name);\n\t\treturn find(this[MAP], name) !== undefined;\n\t}\n\n\t/**\n * Delete all header values given name\n *\n * @param String name Header name\n * @return Void\n */\n\tdelete(name) {\n\t\tname = `${name}`;\n\t\tvalidateName(name);\n\t\tconst key = find(this[MAP], name);\n\t\tif (key !== undefined) {\n\t\t\tdelete this[MAP][key];\n\t\t}\n\t}\n\n\t/**\n * Return raw headers (non-spec api)\n *\n * @return Object\n */\n\traw() {\n\t\treturn this[MAP];\n\t}\n\n\t/**\n * Get an iterator on keys.\n *\n * @return Iterator\n */\n\tkeys() {\n\t\treturn createHeadersIterator(this, 'key');\n\t}\n\n\t/**\n * Get an iterator on values.\n *\n * @return Iterator\n */\n\tvalues() {\n\t\treturn createHeadersIterator(this, 'value');\n\t}\n\n\t/**\n * Get an iterator on entries.\n *\n * This is the default iterator of the Headers object.\n *\n * @return Iterator\n */\n\t[Symbol.iterator]() {\n\t\treturn createHeadersIterator(this, 'key+value');\n\t}\n}\nHeaders.prototype.entries = Headers.prototype[Symbol.iterator];\n\nObject.defineProperty(Headers.prototype, Symbol.toStringTag, {\n\tvalue: 'Headers',\n\twritable: false,\n\tenumerable: false,\n\tconfigurable: true\n});\n\nObject.defineProperties(Headers.prototype, {\n\tget: { enumerable: true },\n\tforEach: { enumerable: true },\n\tset: { enumerable: true },\n\tappend: { enumerable: true },\n\thas: { enumerable: true },\n\tdelete: { enumerable: true },\n\tkeys: { enumerable: true },\n\tvalues: { enumerable: true },\n\tentries: { enumerable: true }\n});\n\nfunction getHeaders(headers) {\n\tlet kind = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'key+value';\n\n\tconst keys = Object.keys(headers[MAP]).sort();\n\treturn keys.map(kind === 'key' ? function (k) {\n\t\treturn k.toLowerCase();\n\t} : kind === 'value' ? function (k) {\n\t\treturn headers[MAP][k].join(', ');\n\t} : function (k) {\n\t\treturn [k.toLowerCase(), headers[MAP][k].join(', ')];\n\t});\n}\n\nconst INTERNAL = Symbol('internal');\n\nfunction createHeadersIterator(target, kind) {\n\tconst iterator = Object.create(HeadersIteratorPrototype);\n\titerator[INTERNAL] = {\n\t\ttarget,\n\t\tkind,\n\t\tindex: 0\n\t};\n\treturn iterator;\n}\n\nconst HeadersIteratorPrototype = Object.setPrototypeOf({\n\tnext() {\n\t\t// istanbul ignore if\n\t\tif (!this || Object.getPrototypeOf(this) !== HeadersIteratorPrototype) {\n\t\t\tthrow new TypeError('Value of `this` is not a HeadersIterator');\n\t\t}\n\n\t\tvar _INTERNAL = this[INTERNAL];\n\t\tconst target = _INTERNAL.target,\n\t\t kind = _INTERNAL.kind,\n\t\t index = _INTERNAL.index;\n\n\t\tconst values = getHeaders(target, kind);\n\t\tconst len = values.length;\n\t\tif (index >= len) {\n\t\t\treturn {\n\t\t\t\tvalue: undefined,\n\t\t\t\tdone: true\n\t\t\t};\n\t\t}\n\n\t\tthis[INTERNAL].index = index + 1;\n\n\t\treturn {\n\t\t\tvalue: values[index],\n\t\t\tdone: false\n\t\t};\n\t}\n}, Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())));\n\nObject.defineProperty(HeadersIteratorPrototype, Symbol.toStringTag, {\n\tvalue: 'HeadersIterator',\n\twritable: false,\n\tenumerable: false,\n\tconfigurable: true\n});\n\n/**\n * Export the Headers object in a form that Node.js can consume.\n *\n * @param Headers headers\n * @return Object\n */\nfunction exportNodeCompatibleHeaders(headers) {\n\tconst obj = Object.assign({ __proto__: null }, headers[MAP]);\n\n\t// http.request() only supports string as Host header. This hack makes\n\t// specifying custom Host header possible.\n\tconst hostHeaderKey = find(headers[MAP], 'Host');\n\tif (hostHeaderKey !== undefined) {\n\t\tobj[hostHeaderKey] = obj[hostHeaderKey][0];\n\t}\n\n\treturn obj;\n}\n\n/**\n * Create a Headers object from an object of headers, ignoring those that do\n * not conform to HTTP grammar productions.\n *\n * @param Object obj Object of headers\n * @return Headers\n */\nfunction createHeadersLenient(obj) {\n\tconst headers = new Headers();\n\tfor (const name of Object.keys(obj)) {\n\t\tif (invalidTokenRegex.test(name)) {\n\t\t\tcontinue;\n\t\t}\n\t\tif (Array.isArray(obj[name])) {\n\t\t\tfor (const val of obj[name]) {\n\t\t\t\tif (invalidHeaderCharRegex.test(val)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (headers[MAP][name] === undefined) {\n\t\t\t\t\theaders[MAP][name] = [val];\n\t\t\t\t} else {\n\t\t\t\t\theaders[MAP][name].push(val);\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (!invalidHeaderCharRegex.test(obj[name])) {\n\t\t\theaders[MAP][name] = [obj[name]];\n\t\t}\n\t}\n\treturn headers;\n}\n\nconst INTERNALS$1 = Symbol('Response internals');\n\n// fix an issue where \"STATUS_CODES\" aren't a named export for node <10\nconst STATUS_CODES = external_http_namespaceObject.STATUS_CODES;\n\n/**\n * Response class\n *\n * @param Stream body Readable stream\n * @param Object opts Response options\n * @return Void\n */\nclass Response {\n\tconstructor() {\n\t\tlet body = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n\t\tlet opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n\t\tBody.call(this, body, opts);\n\n\t\tconst status = opts.status || 200;\n\t\tconst headers = new Headers(opts.headers);\n\n\t\tif (body != null && !headers.has('Content-Type')) {\n\t\t\tconst contentType = extractContentType(body);\n\t\t\tif (contentType) {\n\t\t\t\theaders.append('Content-Type', contentType);\n\t\t\t}\n\t\t}\n\n\t\tthis[INTERNALS$1] = {\n\t\t\turl: opts.url,\n\t\t\tstatus,\n\t\t\tstatusText: opts.statusText || STATUS_CODES[status],\n\t\t\theaders,\n\t\t\tcounter: opts.counter\n\t\t};\n\t}\n\n\tget url() {\n\t\treturn this[INTERNALS$1].url || '';\n\t}\n\n\tget status() {\n\t\treturn this[INTERNALS$1].status;\n\t}\n\n\t/**\n * Convenience property representing if the request ended normally\n */\n\tget ok() {\n\t\treturn this[INTERNALS$1].status >= 200 && this[INTERNALS$1].status < 300;\n\t}\n\n\tget redirected() {\n\t\treturn this[INTERNALS$1].counter > 0;\n\t}\n\n\tget statusText() {\n\t\treturn this[INTERNALS$1].statusText;\n\t}\n\n\tget headers() {\n\t\treturn this[INTERNALS$1].headers;\n\t}\n\n\t/**\n * Clone this response\n *\n * @return Response\n */\n\tclone() {\n\t\treturn new Response(clone(this), {\n\t\t\turl: this.url,\n\t\t\tstatus: this.status,\n\t\t\tstatusText: this.statusText,\n\t\t\theaders: this.headers,\n\t\t\tok: this.ok,\n\t\t\tredirected: this.redirected\n\t\t});\n\t}\n}\n\nBody.mixIn(Response.prototype);\n\nObject.defineProperties(Response.prototype, {\n\turl: { enumerable: true },\n\tstatus: { enumerable: true },\n\tok: { enumerable: true },\n\tredirected: { enumerable: true },\n\tstatusText: { enumerable: true },\n\theaders: { enumerable: true },\n\tclone: { enumerable: true }\n});\n\nObject.defineProperty(Response.prototype, Symbol.toStringTag, {\n\tvalue: 'Response',\n\twritable: false,\n\tenumerable: false,\n\tconfigurable: true\n});\n\nconst INTERNALS$2 = Symbol('Request internals');\nconst URL = external_url_namespaceObject.URL || public_api.URL;\n\n// fix an issue where \"format\", \"parse\" aren't a named export for node <10\nconst parse_url = external_url_namespaceObject.parse;\nconst format_url = external_url_namespaceObject.format;\n\n/**\n * Wrapper around `new URL` to handle arbitrary URLs\n *\n * @param {string} urlStr\n * @return {void}\n */\nfunction parseURL(urlStr) {\n\t/*\n \tCheck whether the URL is absolute or not\n \t\tScheme: https://tools.ietf.org/html/rfc3986#section-3.1\n \tAbsolute URL: https://tools.ietf.org/html/rfc3986#section-4.3\n */\n\tif (/^[a-zA-Z][a-zA-Z\\d+\\-.]*:/.exec(urlStr)) {\n\t\turlStr = new URL(urlStr).toString();\n\t}\n\n\t// Fallback to old implementation for arbitrary URLs\n\treturn parse_url(urlStr);\n}\n\nconst streamDestructionSupported = \"destroy\" in external_stream_.Readable.prototype;\n\n/**\n * Check if a value is an instance of Request.\n *\n * @param Mixed input\n * @return Boolean\n */\nfunction isRequest(input) {\n\treturn typeof input === 'object' && typeof input[INTERNALS$2] === 'object';\n}\n\nfunction isAbortSignal(signal) {\n\tconst proto = signal && typeof signal === 'object' && Object.getPrototypeOf(signal);\n\treturn !!(proto && proto.constructor.name === 'AbortSignal');\n}\n\n/**\n * Request class\n *\n * @param Mixed input Url or Request instance\n * @param Object init Custom options\n * @return Void\n */\nclass Request {\n\tconstructor(input) {\n\t\tlet init = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n\t\tlet parsedURL;\n\n\t\t// normalize input\n\t\tif (!isRequest(input)) {\n\t\t\tif (input && input.href) {\n\t\t\t\t// in order to support Node.js' Url objects; though WHATWG's URL objects\n\t\t\t\t// will fall into this branch also (since their `toString()` will return\n\t\t\t\t// `href` property anyway)\n\t\t\t\tparsedURL = parseURL(input.href);\n\t\t\t} else {\n\t\t\t\t// coerce input to a string before attempting to parse\n\t\t\t\tparsedURL = parseURL(`${input}`);\n\t\t\t}\n\t\t\tinput = {};\n\t\t} else {\n\t\t\tparsedURL = parseURL(input.url);\n\t\t}\n\n\t\tlet method = init.method || input.method || 'GET';\n\t\tmethod = method.toUpperCase();\n\n\t\tif ((init.body != null || isRequest(input) && input.body !== null) && (method === 'GET' || method === 'HEAD')) {\n\t\t\tthrow new TypeError('Request with GET/HEAD method cannot have body');\n\t\t}\n\n\t\tlet inputBody = init.body != null ? init.body : isRequest(input) && input.body !== null ? clone(input) : null;\n\n\t\tBody.call(this, inputBody, {\n\t\t\ttimeout: init.timeout || input.timeout || 0,\n\t\t\tsize: init.size || input.size || 0\n\t\t});\n\n\t\tconst headers = new Headers(init.headers || input.headers || {});\n\n\t\tif (inputBody != null && !headers.has('Content-Type')) {\n\t\t\tconst contentType = extractContentType(inputBody);\n\t\t\tif (contentType) {\n\t\t\t\theaders.append('Content-Type', contentType);\n\t\t\t}\n\t\t}\n\n\t\tlet signal = isRequest(input) ? input.signal : null;\n\t\tif ('signal' in init) signal = init.signal;\n\n\t\tif (signal != null && !isAbortSignal(signal)) {\n\t\t\tthrow new TypeError('Expected signal to be an instanceof AbortSignal');\n\t\t}\n\n\t\tthis[INTERNALS$2] = {\n\t\t\tmethod,\n\t\t\tredirect: init.redirect || input.redirect || 'follow',\n\t\t\theaders,\n\t\t\tparsedURL,\n\t\t\tsignal\n\t\t};\n\n\t\t// node-fetch-only options\n\t\tthis.follow = init.follow !== undefined ? init.follow : input.follow !== undefined ? input.follow : 20;\n\t\tthis.compress = init.compress !== undefined ? init.compress : input.compress !== undefined ? input.compress : true;\n\t\tthis.counter = init.counter || input.counter || 0;\n\t\tthis.agent = init.agent || input.agent;\n\t}\n\n\tget method() {\n\t\treturn this[INTERNALS$2].method;\n\t}\n\n\tget url() {\n\t\treturn format_url(this[INTERNALS$2].parsedURL);\n\t}\n\n\tget headers() {\n\t\treturn this[INTERNALS$2].headers;\n\t}\n\n\tget redirect() {\n\t\treturn this[INTERNALS$2].redirect;\n\t}\n\n\tget signal() {\n\t\treturn this[INTERNALS$2].signal;\n\t}\n\n\t/**\n * Clone this request\n *\n * @return Request\n */\n\tclone() {\n\t\treturn new Request(this);\n\t}\n}\n\nBody.mixIn(Request.prototype);\n\nObject.defineProperty(Request.prototype, Symbol.toStringTag, {\n\tvalue: 'Request',\n\twritable: false,\n\tenumerable: false,\n\tconfigurable: true\n});\n\nObject.defineProperties(Request.prototype, {\n\tmethod: { enumerable: true },\n\turl: { enumerable: true },\n\theaders: { enumerable: true },\n\tredirect: { enumerable: true },\n\tclone: { enumerable: true },\n\tsignal: { enumerable: true }\n});\n\n/**\n * Convert a Request to Node.js http request options.\n *\n * @param Request A Request instance\n * @return Object The options object to be passed to http.request\n */\nfunction getNodeRequestOptions(request) {\n\tconst parsedURL = request[INTERNALS$2].parsedURL;\n\tconst headers = new Headers(request[INTERNALS$2].headers);\n\n\t// fetch step 1.3\n\tif (!headers.has('Accept')) {\n\t\theaders.set('Accept', '*/*');\n\t}\n\n\t// Basic fetch\n\tif (!parsedURL.protocol || !parsedURL.hostname) {\n\t\tthrow new TypeError('Only absolute URLs are supported');\n\t}\n\n\tif (!/^https?:$/.test(parsedURL.protocol)) {\n\t\tthrow new TypeError('Only HTTP(S) protocols are supported');\n\t}\n\n\tif (request.signal && request.body instanceof external_stream_.Readable && !streamDestructionSupported) {\n\t\tthrow new Error('Cancellation of streamed requests with AbortSignal is not supported in node < 8');\n\t}\n\n\t// HTTP-network-or-cache fetch steps 2.4-2.7\n\tlet contentLengthValue = null;\n\tif (request.body == null && /^(POST|PUT)$/i.test(request.method)) {\n\t\tcontentLengthValue = '0';\n\t}\n\tif (request.body != null) {\n\t\tconst totalBytes = getTotalBytes(request);\n\t\tif (typeof totalBytes === 'number') {\n\t\t\tcontentLengthValue = String(totalBytes);\n\t\t}\n\t}\n\tif (contentLengthValue) {\n\t\theaders.set('Content-Length', contentLengthValue);\n\t}\n\n\t// HTTP-network-or-cache fetch step 2.11\n\tif (!headers.has('User-Agent')) {\n\t\theaders.set('User-Agent', 'node-fetch/1.0 (+https://github.com/bitinn/node-fetch)');\n\t}\n\n\t// HTTP-network-or-cache fetch step 2.15\n\tif (request.compress && !headers.has('Accept-Encoding')) {\n\t\theaders.set('Accept-Encoding', 'gzip,deflate');\n\t}\n\n\tlet agent = request.agent;\n\tif (typeof agent === 'function') {\n\t\tagent = agent(parsedURL);\n\t}\n\n\t// HTTP-network fetch step 4.2\n\t// chunked encoding is handled by Node.js\n\n\treturn Object.assign({}, parsedURL, {\n\t\tmethod: request.method,\n\t\theaders: exportNodeCompatibleHeaders(headers),\n\t\tagent\n\t});\n}\n\n/**\n * abort-error.js\n *\n * AbortError interface for cancelled requests\n */\n\n/**\n * Create AbortError instance\n *\n * @param String message Error message for human\n * @return AbortError\n */\nfunction AbortError(message) {\n Error.call(this, message);\n\n this.type = 'aborted';\n this.message = message;\n\n // hide custom error implementation details from end-users\n Error.captureStackTrace(this, this.constructor);\n}\n\nAbortError.prototype = Object.create(Error.prototype);\nAbortError.prototype.constructor = AbortError;\nAbortError.prototype.name = 'AbortError';\n\nconst URL$1 = external_url_namespaceObject.URL || public_api.URL;\n\n// fix an issue where \"PassThrough\", \"resolve\" aren't a named export for node <10\nconst PassThrough$1 = external_stream_.PassThrough;\n\nconst isDomainOrSubdomain = function isDomainOrSubdomain(destination, original) {\n\tconst orig = new URL$1(original).hostname;\n\tconst dest = new URL$1(destination).hostname;\n\n\treturn orig === dest || orig[orig.length - dest.length - 1] === '.' && orig.endsWith(dest);\n};\n\n/**\n * isSameProtocol reports whether the two provided URLs use the same protocol.\n *\n * Both domains must already be in canonical form.\n * @param {string|URL} original\n * @param {string|URL} destination\n */\nconst isSameProtocol = function isSameProtocol(destination, original) {\n\tconst orig = new URL$1(original).protocol;\n\tconst dest = new URL$1(destination).protocol;\n\n\treturn orig === dest;\n};\n\n/**\n * Fetch function\n *\n * @param Mixed url Absolute url or Request instance\n * @param Object opts Fetch options\n * @return Promise\n */\nfunction fetch(url, opts) {\n\n\t// allow custom promise\n\tif (!fetch.Promise) {\n\t\tthrow new Error('native promise missing, set fetch.Promise to your favorite alternative');\n\t}\n\n\tBody.Promise = fetch.Promise;\n\n\t// wrap http.request into fetch\n\treturn new fetch.Promise(function (resolve, reject) {\n\t\t// build request object\n\t\tconst request = new Request(url, opts);\n\t\tconst options = getNodeRequestOptions(request);\n\n\t\tconst send = (options.protocol === 'https:' ? external_https_namespaceObject : external_http_namespaceObject).request;\n\t\tconst signal = request.signal;\n\n\t\tlet response = null;\n\n\t\tconst abort = function abort() {\n\t\t\tlet error = new AbortError('The user aborted a request.');\n\t\t\treject(error);\n\t\t\tif (request.body && request.body instanceof external_stream_.Readable) {\n\t\t\t\tdestroyStream(request.body, error);\n\t\t\t}\n\t\t\tif (!response || !response.body) return;\n\t\t\tresponse.body.emit('error', error);\n\t\t};\n\n\t\tif (signal && signal.aborted) {\n\t\t\tabort();\n\t\t\treturn;\n\t\t}\n\n\t\tconst abortAndFinalize = function abortAndFinalize() {\n\t\t\tabort();\n\t\t\tfinalize();\n\t\t};\n\n\t\t// send request\n\t\tconst req = send(options);\n\t\tlet reqTimeout;\n\n\t\tif (signal) {\n\t\t\tsignal.addEventListener('abort', abortAndFinalize);\n\t\t}\n\n\t\tfunction finalize() {\n\t\t\treq.abort();\n\t\t\tif (signal) signal.removeEventListener('abort', abortAndFinalize);\n\t\t\tclearTimeout(reqTimeout);\n\t\t}\n\n\t\tif (request.timeout) {\n\t\t\treq.once('socket', function (socket) {\n\t\t\t\treqTimeout = setTimeout(function () {\n\t\t\t\t\treject(new FetchError(`network timeout at: ${request.url}`, 'request-timeout'));\n\t\t\t\t\tfinalize();\n\t\t\t\t}, request.timeout);\n\t\t\t});\n\t\t}\n\n\t\treq.on('error', function (err) {\n\t\t\treject(new FetchError(`request to ${request.url} failed, reason: ${err.message}`, 'system', err));\n\n\t\t\tif (response && response.body) {\n\t\t\t\tdestroyStream(response.body, err);\n\t\t\t}\n\n\t\t\tfinalize();\n\t\t});\n\n\t\tfixResponseChunkedTransferBadEnding(req, function (err) {\n\t\t\tif (signal && signal.aborted) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (response && response.body) {\n\t\t\t\tdestroyStream(response.body, err);\n\t\t\t}\n\t\t});\n\n\t\t/* c8 ignore next 18 */\n\t\tif (parseInt(process.version.substring(1)) < 14) {\n\t\t\t// Before Node.js 14, pipeline() does not fully support async iterators and does not always\n\t\t\t// properly handle when the socket close/end events are out of order.\n\t\t\treq.on('socket', function (s) {\n\t\t\t\ts.addListener('close', function (hadError) {\n\t\t\t\t\t// if a data listener is still present we didn't end cleanly\n\t\t\t\t\tconst hasDataListener = s.listenerCount('data') > 0;\n\n\t\t\t\t\t// if end happened before close but the socket didn't emit an error, do it now\n\t\t\t\t\tif (response && hasDataListener && !hadError && !(signal && signal.aborted)) {\n\t\t\t\t\t\tconst err = new Error('Premature close');\n\t\t\t\t\t\terr.code = 'ERR_STREAM_PREMATURE_CLOSE';\n\t\t\t\t\t\tresponse.body.emit('error', err);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\n\t\treq.on('response', function (res) {\n\t\t\tclearTimeout(reqTimeout);\n\n\t\t\tconst headers = createHeadersLenient(res.headers);\n\n\t\t\t// HTTP fetch step 5\n\t\t\tif (fetch.isRedirect(res.statusCode)) {\n\t\t\t\t// HTTP fetch step 5.2\n\t\t\t\tconst location = headers.get('Location');\n\n\t\t\t\t// HTTP fetch step 5.3\n\t\t\t\tlet locationURL = null;\n\t\t\t\ttry {\n\t\t\t\t\tlocationURL = location === null ? null : new URL$1(location, request.url).toString();\n\t\t\t\t} catch (err) {\n\t\t\t\t\t// error here can only be invalid URL in Location: header\n\t\t\t\t\t// do not throw when options.redirect == manual\n\t\t\t\t\t// let the user extract the errorneous redirect URL\n\t\t\t\t\tif (request.redirect !== 'manual') {\n\t\t\t\t\t\treject(new FetchError(`uri requested responds with an invalid redirect URL: ${location}`, 'invalid-redirect'));\n\t\t\t\t\t\tfinalize();\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// HTTP fetch step 5.5\n\t\t\t\tswitch (request.redirect) {\n\t\t\t\t\tcase 'error':\n\t\t\t\t\t\treject(new FetchError(`uri requested responds with a redirect, redirect mode is set to error: ${request.url}`, 'no-redirect'));\n\t\t\t\t\t\tfinalize();\n\t\t\t\t\t\treturn;\n\t\t\t\t\tcase 'manual':\n\t\t\t\t\t\t// node-fetch-specific step: make manual redirect a bit easier to use by setting the Location header value to the resolved URL.\n\t\t\t\t\t\tif (locationURL !== null) {\n\t\t\t\t\t\t\t// handle corrupted header\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\theaders.set('Location', locationURL);\n\t\t\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t\t\t// istanbul ignore next: nodejs server prevent invalid response headers, we can't test this through normal request\n\t\t\t\t\t\t\t\treject(err);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'follow':\n\t\t\t\t\t\t// HTTP-redirect fetch step 2\n\t\t\t\t\t\tif (locationURL === null) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// HTTP-redirect fetch step 5\n\t\t\t\t\t\tif (request.counter >= request.follow) {\n\t\t\t\t\t\t\treject(new FetchError(`maximum redirect reached at: ${request.url}`, 'max-redirect'));\n\t\t\t\t\t\t\tfinalize();\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// HTTP-redirect fetch step 6 (counter increment)\n\t\t\t\t\t\t// Create a new Request object.\n\t\t\t\t\t\tconst requestOpts = {\n\t\t\t\t\t\t\theaders: new Headers(request.headers),\n\t\t\t\t\t\t\tfollow: request.follow,\n\t\t\t\t\t\t\tcounter: request.counter + 1,\n\t\t\t\t\t\t\tagent: request.agent,\n\t\t\t\t\t\t\tcompress: request.compress,\n\t\t\t\t\t\t\tmethod: request.method,\n\t\t\t\t\t\t\tbody: request.body,\n\t\t\t\t\t\t\tsignal: request.signal,\n\t\t\t\t\t\t\ttimeout: request.timeout,\n\t\t\t\t\t\t\tsize: request.size\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\tif (!isDomainOrSubdomain(request.url, locationURL) || !isSameProtocol(request.url, locationURL)) {\n\t\t\t\t\t\t\tfor (const name of ['authorization', 'www-authenticate', 'cookie', 'cookie2']) {\n\t\t\t\t\t\t\t\trequestOpts.headers.delete(name);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// HTTP-redirect fetch step 9\n\t\t\t\t\t\tif (res.statusCode !== 303 && request.body && getTotalBytes(request) === null) {\n\t\t\t\t\t\t\treject(new FetchError('Cannot follow redirect with body being a readable stream', 'unsupported-redirect'));\n\t\t\t\t\t\t\tfinalize();\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// HTTP-redirect fetch step 11\n\t\t\t\t\t\tif (res.statusCode === 303 || (res.statusCode === 301 || res.statusCode === 302) && request.method === 'POST') {\n\t\t\t\t\t\t\trequestOpts.method = 'GET';\n\t\t\t\t\t\t\trequestOpts.body = undefined;\n\t\t\t\t\t\t\trequestOpts.headers.delete('content-length');\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// HTTP-redirect fetch step 15\n\t\t\t\t\t\tresolve(fetch(new Request(locationURL, requestOpts)));\n\t\t\t\t\t\tfinalize();\n\t\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// prepare response\n\t\t\tres.once('end', function () {\n\t\t\t\tif (signal) signal.removeEventListener('abort', abortAndFinalize);\n\t\t\t});\n\t\t\tlet body = res.pipe(new PassThrough$1());\n\n\t\t\tconst response_options = {\n\t\t\t\turl: request.url,\n\t\t\t\tstatus: res.statusCode,\n\t\t\t\tstatusText: res.statusMessage,\n\t\t\t\theaders: headers,\n\t\t\t\tsize: request.size,\n\t\t\t\ttimeout: request.timeout,\n\t\t\t\tcounter: request.counter\n\t\t\t};\n\n\t\t\t// HTTP-network fetch step 12.1.1.3\n\t\t\tconst codings = headers.get('Content-Encoding');\n\n\t\t\t// HTTP-network fetch step 12.1.1.4: handle content codings\n\n\t\t\t// in following scenarios we ignore compression support\n\t\t\t// 1. compression support is disabled\n\t\t\t// 2. HEAD request\n\t\t\t// 3. no Content-Encoding header\n\t\t\t// 4. no content response (204)\n\t\t\t// 5. content not modified response (304)\n\t\t\tif (!request.compress || request.method === 'HEAD' || codings === null || res.statusCode === 204 || res.statusCode === 304) {\n\t\t\t\tresponse = new Response(body, response_options);\n\t\t\t\tresolve(response);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// For Node v6+\n\t\t\t// Be less strict when decoding compressed responses, since sometimes\n\t\t\t// servers send slightly invalid responses that are still accepted\n\t\t\t// by common browsers.\n\t\t\t// Always using Z_SYNC_FLUSH is what cURL does.\n\t\t\tconst zlibOptions = {\n\t\t\t\tflush: external_zlib_namespaceObject.Z_SYNC_FLUSH,\n\t\t\t\tfinishFlush: external_zlib_namespaceObject.Z_SYNC_FLUSH\n\t\t\t};\n\n\t\t\t// for gzip\n\t\t\tif (codings == 'gzip' || codings == 'x-gzip') {\n\t\t\t\tbody = body.pipe(external_zlib_namespaceObject.createGunzip(zlibOptions));\n\t\t\t\tresponse = new Response(body, response_options);\n\t\t\t\tresolve(response);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// for deflate\n\t\t\tif (codings == 'deflate' || codings == 'x-deflate') {\n\t\t\t\t// handle the infamous raw deflate response from old servers\n\t\t\t\t// a hack for old IIS and Apache servers\n\t\t\t\tconst raw = res.pipe(new PassThrough$1());\n\t\t\t\traw.once('data', function (chunk) {\n\t\t\t\t\t// see http://stackoverflow.com/questions/37519828\n\t\t\t\t\tif ((chunk[0] & 0x0F) === 0x08) {\n\t\t\t\t\t\tbody = body.pipe(external_zlib_namespaceObject.createInflate());\n\t\t\t\t\t} else {\n\t\t\t\t\t\tbody = body.pipe(external_zlib_namespaceObject.createInflateRaw());\n\t\t\t\t\t}\n\t\t\t\t\tresponse = new Response(body, response_options);\n\t\t\t\t\tresolve(response);\n\t\t\t\t});\n\t\t\t\traw.on('end', function () {\n\t\t\t\t\t// some old IIS servers return zero-length OK deflate responses, so 'data' is never emitted.\n\t\t\t\t\tif (!response) {\n\t\t\t\t\t\tresponse = new Response(body, response_options);\n\t\t\t\t\t\tresolve(response);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// for br\n\t\t\tif (codings == 'br' && typeof external_zlib_namespaceObject.createBrotliDecompress === 'function') {\n\t\t\t\tbody = body.pipe(external_zlib_namespaceObject.createBrotliDecompress());\n\t\t\t\tresponse = new Response(body, response_options);\n\t\t\t\tresolve(response);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// otherwise, use response as-is\n\t\t\tresponse = new Response(body, response_options);\n\t\t\tresolve(response);\n\t\t});\n\n\t\twriteToStream(req, request);\n\t});\n}\nfunction fixResponseChunkedTransferBadEnding(request, errorCallback) {\n\tlet socket;\n\n\trequest.on('socket', function (s) {\n\t\tsocket = s;\n\t});\n\n\trequest.on('response', function (response) {\n\t\tconst headers = response.headers;\n\n\t\tif (headers['transfer-encoding'] === 'chunked' && !headers['content-length']) {\n\t\t\tresponse.once('close', function (hadError) {\n\t\t\t\t// tests for socket presence, as in some situations the\n\t\t\t\t// the 'socket' event is not triggered for the request\n\t\t\t\t// (happens in deno), avoids `TypeError`\n\t\t\t\t// if a data listener is still present we didn't end cleanly\n\t\t\t\tconst hasDataListener = socket && socket.listenerCount('data') > 0;\n\n\t\t\t\tif (hasDataListener && !hadError) {\n\t\t\t\t\tconst err = new Error('Premature close');\n\t\t\t\t\terr.code = 'ERR_STREAM_PREMATURE_CLOSE';\n\t\t\t\t\terrorCallback(err);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t});\n}\n\nfunction destroyStream(stream, err) {\n\tif (stream.destroy) {\n\t\tstream.destroy(err);\n\t} else {\n\t\t// node < 8\n\t\tstream.emit('error', err);\n\t\tstream.end();\n\t}\n}\n\n/**\n * Redirect code matching\n *\n * @param Number code Status code\n * @return Boolean\n */\nfetch.isRedirect = function (code) {\n\treturn code === 301 || code === 302 || code === 303 || code === 307 || code === 308;\n};\n\n// expose Promise\nfetch.Promise = global.Promise;\n\n/* harmony default export */ const lib = (fetch);\n\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/node-fetch/lib/index.mjs_+_4_modules?", + ); + + /***/ + }, + + /***/ 1161: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '\n// EXPORTS\n__webpack_require__.d(__webpack_exports__, {\n DX: () => (/* reexport */ Slot),\n yN: () => (/* reexport */ dep),\n LV: () => (/* binding */ wrap)\n});\n\n// UNUSED EXPORTS: KeyTrie, asyncFromGen, bindContext, defaultMakeCacheKey, noContext, nonReactive, setTimeout\n\n;// CONCATENATED MODULE: ./node_modules/optimism/node_modules/@wry/trie/lib/index.js\n// A [trie](https://en.wikipedia.org/wiki/Trie) data structure that holds\n// object keys weakly, yet can also hold non-object keys, unlike the\n// native `WeakMap`.\n// If no makeData function is supplied, the looked-up data will be an empty,\n// null-prototype Object.\nconst defaultMakeData = () => Object.create(null);\n// Useful for processing arguments objects as well as arrays.\nconst { forEach, slice } = Array.prototype;\nconst { hasOwnProperty: lib_hasOwnProperty } = Object.prototype;\nclass Trie {\n constructor(weakness = true, makeData = defaultMakeData) {\n this.weakness = weakness;\n this.makeData = makeData;\n }\n lookup(...array) {\n return this.lookupArray(array);\n }\n lookupArray(array) {\n let node = this;\n forEach.call(array, key => node = node.getChildTrie(key));\n return lib_hasOwnProperty.call(node, "data")\n ? node.data\n : node.data = this.makeData(slice.call(array));\n }\n peek(...array) {\n return this.peekArray(array);\n }\n peekArray(array) {\n let node = this;\n for (let i = 0, len = array.length; node && i < len; ++i) {\n const map = this.weakness && isObjRef(array[i]) ? node.weak : node.strong;\n node = map && map.get(array[i]);\n }\n return node && node.data;\n }\n getChildTrie(key) {\n const map = this.weakness && isObjRef(key)\n ? this.weak || (this.weak = new WeakMap())\n : this.strong || (this.strong = new Map());\n let child = map.get(key);\n if (!child)\n map.set(key, child = new Trie(this.weakness, this.makeData));\n return child;\n }\n}\nfunction isObjRef(value) {\n switch (typeof value) {\n case "object":\n if (value === null)\n break;\n // Fall through to return true...\n case "function":\n return true;\n }\n return false;\n}\n//# sourceMappingURL=index.js.map\n// EXTERNAL MODULE: ./node_modules/@wry/caches/lib/strong.js\nvar strong = __webpack_require__(7783);\n;// CONCATENATED MODULE: ./node_modules/@wry/context/lib/slot.js\n// This currentContext variable will only be used if the makeSlotClass\n// function is called, which happens only if this is the first copy of the\n// @wry/context package to be imported.\nlet currentContext = null;\n// This unique internal object is used to denote the absence of a value\n// for a given Slot, and is never exposed to outside code.\nconst MISSING_VALUE = {};\nlet idCounter = 1;\n// Although we can\'t do anything about the cost of duplicated code from\n// accidentally bundling multiple copies of the @wry/context package, we can\n// avoid creating the Slot class more than once using makeSlotClass.\nconst makeSlotClass = () => class Slot {\n constructor() {\n // If you have a Slot object, you can find out its slot.id, but you cannot\n // guess the slot.id of a Slot you don\'t have access to, thanks to the\n // randomized suffix.\n this.id = [\n "slot",\n idCounter++,\n Date.now(),\n Math.random().toString(36).slice(2),\n ].join(":");\n }\n hasValue() {\n for (let context = currentContext; context; context = context.parent) {\n // We use the Slot object iself as a key to its value, which means the\n // value cannot be obtained without a reference to the Slot object.\n if (this.id in context.slots) {\n const value = context.slots[this.id];\n if (value === MISSING_VALUE)\n break;\n if (context !== currentContext) {\n // Cache the value in currentContext.slots so the next lookup will\n // be faster. This caching is safe because the tree of contexts and\n // the values of the slots are logically immutable.\n currentContext.slots[this.id] = value;\n }\n return true;\n }\n }\n if (currentContext) {\n // If a value was not found for this Slot, it\'s never going to be found\n // no matter how many times we look it up, so we might as well cache\n // the absence of the value, too.\n currentContext.slots[this.id] = MISSING_VALUE;\n }\n return false;\n }\n getValue() {\n if (this.hasValue()) {\n return currentContext.slots[this.id];\n }\n }\n withValue(value, callback, \n // Given the prevalence of arrow functions, specifying arguments is likely\n // to be much more common than specifying `this`, hence this ordering:\n args, thisArg) {\n const slots = {\n __proto__: null,\n [this.id]: value,\n };\n const parent = currentContext;\n currentContext = { parent, slots };\n try {\n // Function.prototype.apply allows the arguments array argument to be\n // omitted or undefined, so args! is fine here.\n return callback.apply(thisArg, args);\n }\n finally {\n currentContext = parent;\n }\n }\n // Capture the current context and wrap a callback function so that it\n // reestablishes the captured context when called.\n static bind(callback) {\n const context = currentContext;\n return function () {\n const saved = currentContext;\n try {\n currentContext = context;\n return callback.apply(this, arguments);\n }\n finally {\n currentContext = saved;\n }\n };\n }\n // Immediately run a callback function without any captured context.\n static noContext(callback, \n // Given the prevalence of arrow functions, specifying arguments is likely\n // to be much more common than specifying `this`, hence this ordering:\n args, thisArg) {\n if (currentContext) {\n const saved = currentContext;\n try {\n currentContext = null;\n // Function.prototype.apply allows the arguments array argument to be\n // omitted or undefined, so args! is fine here.\n return callback.apply(thisArg, args);\n }\n finally {\n currentContext = saved;\n }\n }\n else {\n return callback.apply(thisArg, args);\n }\n }\n};\nfunction maybe(fn) {\n try {\n return fn();\n }\n catch (ignored) { }\n}\n// We store a single global implementation of the Slot class as a permanent\n// non-enumerable property of the globalThis object. This obfuscation does\n// nothing to prevent access to the Slot class, but at least it ensures the\n// implementation (i.e. currentContext) cannot be tampered with, and all copies\n// of the @wry/context package (hopefully just one) will share the same Slot\n// implementation. Since the first copy of the @wry/context package to be\n// imported wins, this technique imposes a steep cost for any future breaking\n// changes to the Slot class.\nconst globalKey = "@wry/context:Slot";\nconst host = \n// Prefer globalThis when available.\n// https://github.com/benjamn/wryware/issues/347\nmaybe(() => globalThis) ||\n // Fall back to global, which works in Node.js and may be converted by some\n // bundlers to the appropriate identifier (window, self, ...) depending on the\n // bundling target. https://github.com/endojs/endo/issues/576#issuecomment-1178515224\n maybe(() => global) ||\n // Otherwise, use a dummy host that\'s local to this module. We used to fall\n // back to using the Array constructor as a namespace, but that was flagged in\n // https://github.com/benjamn/wryware/issues/347, and can be avoided.\n Object.create(null);\n// Whichever globalHost we\'re using, make TypeScript happy about the additional\n// globalKey property.\nconst globalHost = host;\nconst Slot = globalHost[globalKey] ||\n // Earlier versions of this package stored the globalKey property on the Array\n // constructor, so we check there as well, to prevent Slot class duplication.\n Array[globalKey] ||\n (function (Slot) {\n try {\n Object.defineProperty(globalHost, globalKey, {\n value: Slot,\n enumerable: false,\n writable: false,\n // When it was possible for globalHost to be the Array constructor (a\n // legacy Slot dedup strategy), it was important for the property to be\n // configurable:true so it could be deleted. That does not seem to be as\n // important when globalHost is the global object, but I don\'t want to\n // cause similar problems again, and configurable:true seems safest.\n // https://github.com/endojs/endo/issues/576#issuecomment-1178274008\n configurable: true\n });\n }\n finally {\n return Slot;\n }\n })(makeSlotClass());\n//# sourceMappingURL=slot.js.map\n;// CONCATENATED MODULE: ./node_modules/@wry/context/lib/index.js\n\n\nconst { bind, noContext } = Slot;\n// Like global.setTimeout, except the callback runs with captured context.\n\nfunction setTimeoutWithContext(callback, delay) {\n return setTimeout(bind(callback), delay);\n}\n// Turn any generator function into an async function (using yield instead\n// of await), with context automatically preserved across yields.\nfunction asyncFromGen(genFn) {\n return function () {\n const gen = genFn.apply(this, arguments);\n const boundNext = bind(gen.next);\n const boundThrow = bind(gen.throw);\n return new Promise((resolve, reject) => {\n function invoke(method, argument) {\n try {\n var result = method.call(gen, argument);\n }\n catch (error) {\n return reject(error);\n }\n const next = result.done ? resolve : invokeNext;\n if (isPromiseLike(result.value)) {\n result.value.then(next, result.done ? reject : invokeThrow);\n }\n else {\n next(result.value);\n }\n }\n const invokeNext = (value) => invoke(boundNext, value);\n const invokeThrow = (error) => invoke(boundThrow, error);\n invokeNext();\n });\n };\n}\nfunction isPromiseLike(value) {\n return value && typeof value.then === "function";\n}\n// If you use the fibers npm package to implement coroutines in Node.js,\n// you should call this function at least once to ensure context management\n// remains coherent across any yields.\nconst wrappedFibers = (/* unused pure expression or super */ null && ([]));\nfunction wrapYieldingFiberMethods(Fiber) {\n // There can be only one implementation of Fiber per process, so this array\n // should never grow longer than one element.\n if (wrappedFibers.indexOf(Fiber) < 0) {\n const wrap = (obj, method) => {\n const fn = obj[method];\n obj[method] = function () {\n return noContext(fn, arguments, this);\n };\n };\n // These methods can yield, according to\n // https://github.com/laverdet/node-fibers/blob/ddebed9b8ae3883e57f822e2108e6943e5c8d2a8/fibers.js#L97-L100\n wrap(Fiber, "yield");\n wrap(Fiber.prototype, "run");\n wrap(Fiber.prototype, "throwInto");\n wrappedFibers.push(Fiber);\n }\n return Fiber;\n}\n//# sourceMappingURL=index.js.map\n;// CONCATENATED MODULE: ./node_modules/optimism/lib/context.js\n\nconst parentEntrySlot = new Slot();\nfunction nonReactive(fn) {\n return parentEntrySlot.withValue(void 0, fn);\n}\n\n\n//# sourceMappingURL=context.js.map\n;// CONCATENATED MODULE: ./node_modules/optimism/lib/helpers.js\nconst { hasOwnProperty: helpers_hasOwnProperty, } = Object.prototype;\nconst arrayFromSet = Array.from ||\n function (set) {\n const array = [];\n set.forEach(item => array.push(item));\n return array;\n };\nfunction maybeUnsubscribe(entryOrDep) {\n const { unsubscribe } = entryOrDep;\n if (typeof unsubscribe === "function") {\n entryOrDep.unsubscribe = void 0;\n unsubscribe();\n }\n}\n//# sourceMappingURL=helpers.js.map\n;// CONCATENATED MODULE: ./node_modules/optimism/lib/entry.js\n\n\nconst emptySetPool = [];\nconst POOL_TARGET_SIZE = 100;\n// Since this package might be used browsers, we should avoid using the\n// Node built-in assert module.\nfunction assert(condition, optionalMessage) {\n if (!condition) {\n throw new Error(optionalMessage || "assertion failure");\n }\n}\nfunction valueIs(a, b) {\n const len = a.length;\n return (\n // Unknown values are not equal to each other.\n len > 0 &&\n // Both values must be ordinary (or both exceptional) to be equal.\n len === b.length &&\n // The underlying value or exception must be the same.\n a[len - 1] === b[len - 1]);\n}\nfunction valueGet(value) {\n switch (value.length) {\n case 0: throw new Error("unknown value");\n case 1: return value[0];\n case 2: throw value[1];\n }\n}\nfunction valueCopy(value) {\n return value.slice(0);\n}\nclass Entry {\n constructor(fn) {\n this.fn = fn;\n this.parents = new Set();\n this.childValues = new Map();\n // When this Entry has children that are dirty, this property becomes\n // a Set containing other Entry objects, borrowed from emptySetPool.\n // When the set becomes empty, it gets recycled back to emptySetPool.\n this.dirtyChildren = null;\n this.dirty = true;\n this.recomputing = false;\n this.value = [];\n this.deps = null;\n ++Entry.count;\n }\n peek() {\n if (this.value.length === 1 && !mightBeDirty(this)) {\n rememberParent(this);\n return this.value[0];\n }\n }\n // This is the most important method of the Entry API, because it\n // determines whether the cached this.value can be returned immediately,\n // or must be recomputed. The overall performance of the caching system\n // depends on the truth of the following observations: (1) this.dirty is\n // usually false, (2) this.dirtyChildren is usually null/empty, and thus\n // (3) valueGet(this.value) is usually returned without recomputation.\n recompute(args) {\n assert(!this.recomputing, "already recomputing");\n rememberParent(this);\n return mightBeDirty(this)\n ? reallyRecompute(this, args)\n : valueGet(this.value);\n }\n setDirty() {\n if (this.dirty)\n return;\n this.dirty = true;\n reportDirty(this);\n // We can go ahead and unsubscribe here, since any further dirty\n // notifications we receive will be redundant, and unsubscribing may\n // free up some resources, e.g. file watchers.\n maybeUnsubscribe(this);\n }\n dispose() {\n this.setDirty();\n // Sever any dependency relationships with our own children, so those\n // children don\'t retain this parent Entry in their child.parents sets,\n // thereby preventing it from being fully garbage collected.\n forgetChildren(this);\n // Because this entry has been kicked out of the cache (in index.js),\n // we\'ve lost the ability to find out if/when this entry becomes dirty,\n // whether that happens through a subscription, because of a direct call\n // to entry.setDirty(), or because one of its children becomes dirty.\n // Because of this loss of future information, we have to assume the\n // worst (that this entry might have become dirty very soon), so we must\n // immediately mark this entry\'s parents as dirty. Normally we could\n // just call entry.setDirty() rather than calling parent.setDirty() for\n // each parent, but that would leave this entry in parent.childValues\n // and parent.dirtyChildren, which would prevent the child from being\n // truly forgotten.\n eachParent(this, (parent, child) => {\n parent.setDirty();\n forgetChild(parent, this);\n });\n }\n forget() {\n // The code that creates Entry objects in index.ts will replace this method\n // with one that actually removes the Entry from the cache, which will also\n // trigger the entry.dispose method.\n this.dispose();\n }\n dependOn(dep) {\n dep.add(this);\n if (!this.deps) {\n this.deps = emptySetPool.pop() || new Set();\n }\n this.deps.add(dep);\n }\n forgetDeps() {\n if (this.deps) {\n arrayFromSet(this.deps).forEach(dep => dep.delete(this));\n this.deps.clear();\n emptySetPool.push(this.deps);\n this.deps = null;\n }\n }\n}\nEntry.count = 0;\nfunction rememberParent(child) {\n const parent = parentEntrySlot.getValue();\n if (parent) {\n child.parents.add(parent);\n if (!parent.childValues.has(child)) {\n parent.childValues.set(child, []);\n }\n if (mightBeDirty(child)) {\n reportDirtyChild(parent, child);\n }\n else {\n reportCleanChild(parent, child);\n }\n return parent;\n }\n}\nfunction reallyRecompute(entry, args) {\n forgetChildren(entry);\n // Set entry as the parent entry while calling recomputeNewValue(entry).\n parentEntrySlot.withValue(entry, recomputeNewValue, [entry, args]);\n if (maybeSubscribe(entry, args)) {\n // If we successfully recomputed entry.value and did not fail to\n // (re)subscribe, then this Entry is no longer explicitly dirty.\n setClean(entry);\n }\n return valueGet(entry.value);\n}\nfunction recomputeNewValue(entry, args) {\n entry.recomputing = true;\n const { normalizeResult } = entry;\n let oldValueCopy;\n if (normalizeResult && entry.value.length === 1) {\n oldValueCopy = valueCopy(entry.value);\n }\n // Make entry.value an empty array, representing an unknown value.\n entry.value.length = 0;\n try {\n // If entry.fn succeeds, entry.value will become a normal Value.\n entry.value[0] = entry.fn.apply(null, args);\n // If we have a viable oldValueCopy to compare with the (successfully\n // recomputed) new entry.value, and they are not already === identical, give\n // normalizeResult a chance to pick/choose/reuse parts of oldValueCopy[0]\n // and/or entry.value[0] to determine the final cached entry.value.\n if (normalizeResult && oldValueCopy && !valueIs(oldValueCopy, entry.value)) {\n try {\n entry.value[0] = normalizeResult(entry.value[0], oldValueCopy[0]);\n }\n catch (_a) {\n // If normalizeResult throws, just use the newer value, rather than\n // saving the exception as entry.value[1].\n }\n }\n }\n catch (e) {\n // If entry.fn throws, entry.value will hold that exception.\n entry.value[1] = e;\n }\n // Either way, this line is always reached.\n entry.recomputing = false;\n}\nfunction mightBeDirty(entry) {\n return entry.dirty || !!(entry.dirtyChildren && entry.dirtyChildren.size);\n}\nfunction setClean(entry) {\n entry.dirty = false;\n if (mightBeDirty(entry)) {\n // This Entry may still have dirty children, in which case we can\'t\n // let our parents know we\'re clean just yet.\n return;\n }\n reportClean(entry);\n}\nfunction reportDirty(child) {\n eachParent(child, reportDirtyChild);\n}\nfunction reportClean(child) {\n eachParent(child, reportCleanChild);\n}\nfunction eachParent(child, callback) {\n const parentCount = child.parents.size;\n if (parentCount) {\n const parents = arrayFromSet(child.parents);\n for (let i = 0; i < parentCount; ++i) {\n callback(parents[i], child);\n }\n }\n}\n// Let a parent Entry know that one of its children may be dirty.\nfunction reportDirtyChild(parent, child) {\n // Must have called rememberParent(child) before calling\n // reportDirtyChild(parent, child).\n assert(parent.childValues.has(child));\n assert(mightBeDirty(child));\n const parentWasClean = !mightBeDirty(parent);\n if (!parent.dirtyChildren) {\n parent.dirtyChildren = emptySetPool.pop() || new Set;\n }\n else if (parent.dirtyChildren.has(child)) {\n // If we already know this child is dirty, then we must have already\n // informed our own parents that we are dirty, so we can terminate\n // the recursion early.\n return;\n }\n parent.dirtyChildren.add(child);\n // If parent was clean before, it just became (possibly) dirty (according to\n // mightBeDirty), since we just added child to parent.dirtyChildren.\n if (parentWasClean) {\n reportDirty(parent);\n }\n}\n// Let a parent Entry know that one of its children is no longer dirty.\nfunction reportCleanChild(parent, child) {\n // Must have called rememberChild(child) before calling\n // reportCleanChild(parent, child).\n assert(parent.childValues.has(child));\n assert(!mightBeDirty(child));\n const childValue = parent.childValues.get(child);\n if (childValue.length === 0) {\n parent.childValues.set(child, valueCopy(child.value));\n }\n else if (!valueIs(childValue, child.value)) {\n parent.setDirty();\n }\n removeDirtyChild(parent, child);\n if (mightBeDirty(parent)) {\n return;\n }\n reportClean(parent);\n}\nfunction removeDirtyChild(parent, child) {\n const dc = parent.dirtyChildren;\n if (dc) {\n dc.delete(child);\n if (dc.size === 0) {\n if (emptySetPool.length < POOL_TARGET_SIZE) {\n emptySetPool.push(dc);\n }\n parent.dirtyChildren = null;\n }\n }\n}\n// Removes all children from this entry and returns an array of the\n// removed children.\nfunction forgetChildren(parent) {\n if (parent.childValues.size > 0) {\n parent.childValues.forEach((_value, child) => {\n forgetChild(parent, child);\n });\n }\n // Remove this parent Entry from any sets to which it was added by the\n // addToSet method.\n parent.forgetDeps();\n // After we forget all our children, this.dirtyChildren must be empty\n // and therefore must have been reset to null.\n assert(parent.dirtyChildren === null);\n}\nfunction forgetChild(parent, child) {\n child.parents.delete(parent);\n parent.childValues.delete(child);\n removeDirtyChild(parent, child);\n}\nfunction maybeSubscribe(entry, args) {\n if (typeof entry.subscribe === "function") {\n try {\n maybeUnsubscribe(entry); // Prevent double subscriptions.\n entry.unsubscribe = entry.subscribe.apply(null, args);\n }\n catch (e) {\n // If this Entry has a subscribe function and it threw an exception\n // (or an unsubscribe function it previously returned now throws),\n // return false to indicate that we were not able to subscribe (or\n // unsubscribe), and this Entry should remain dirty.\n entry.setDirty();\n return false;\n }\n }\n // Returning true indicates either that there was no entry.subscribe\n // function or that it succeeded.\n return true;\n}\n//# sourceMappingURL=entry.js.map\n;// CONCATENATED MODULE: ./node_modules/optimism/lib/dep.js\n\n\nconst EntryMethods = {\n setDirty: true,\n dispose: true,\n forget: true, // Fully remove parent Entry from LRU cache and computation graph\n};\nfunction dep(options) {\n const depsByKey = new Map();\n const subscribe = options && options.subscribe;\n function depend(key) {\n const parent = parentEntrySlot.getValue();\n if (parent) {\n let dep = depsByKey.get(key);\n if (!dep) {\n depsByKey.set(key, dep = new Set);\n }\n parent.dependOn(dep);\n if (typeof subscribe === "function") {\n maybeUnsubscribe(dep);\n dep.unsubscribe = subscribe(key);\n }\n }\n }\n depend.dirty = function dirty(key, entryMethodName) {\n const dep = depsByKey.get(key);\n if (dep) {\n const m = (entryMethodName &&\n helpers_hasOwnProperty.call(EntryMethods, entryMethodName)) ? entryMethodName : "setDirty";\n // We have to use arrayFromSet(dep).forEach instead of dep.forEach,\n // because modifying a Set while iterating over it can cause elements in\n // the Set to be removed from the Set before they\'ve been iterated over.\n arrayFromSet(dep).forEach(entry => entry[m]());\n depsByKey.delete(key);\n maybeUnsubscribe(dep);\n }\n };\n return depend;\n}\n//# sourceMappingURL=dep.js.map\n;// CONCATENATED MODULE: ./node_modules/optimism/lib/index.js\n\n\n\n\n// These helper functions are important for making optimism work with\n// asynchronous code. In order to register parent-child dependencies,\n// optimism needs to know about any currently active parent computations.\n// In ordinary synchronous code, the parent context is implicit in the\n// execution stack, but asynchronous code requires some extra guidance in\n// order to propagate context from one async task segment to the next.\n\n// A lighter-weight dependency, similar to OptimisticWrapperFunction, except\n// with only one argument, no makeCacheKey, no wrapped function to recompute,\n// and no result value. Useful for representing dependency leaves in the graph\n// of computation. Subscriptions are supported.\n\n// The defaultMakeCacheKey function is remarkably powerful, because it gives\n// a unique object for any shallow-identical list of arguments. If you need\n// to implement a custom makeCacheKey function, you may find it helpful to\n// delegate the final work to defaultMakeCacheKey, which is why we export it\n// here. However, you may want to avoid defaultMakeCacheKey if your runtime\n// does not support WeakMap, or you have the ability to return a string key.\n// In those cases, just write your own custom makeCacheKey functions.\nlet defaultKeyTrie;\nfunction defaultMakeCacheKey(...args) {\n const trie = defaultKeyTrie || (defaultKeyTrie = new Trie(typeof WeakMap === "function"));\n return trie.lookupArray(args);\n}\n// If you\'re paranoid about memory leaks, or you want to avoid using WeakMap\n// under the hood, but you still need the behavior of defaultMakeCacheKey,\n// import this constructor to create your own tries.\n\n;\nconst caches = new Set();\nfunction wrap(originalFunction, { max = Math.pow(2, 16), keyArgs, makeCacheKey = defaultMakeCacheKey, normalizeResult, subscribe, cache: cacheOption = strong/* StrongCache */.C, } = Object.create(null)) {\n const cache = typeof cacheOption === "function"\n ? new cacheOption(max, entry => entry.dispose())\n : cacheOption;\n const optimistic = function () {\n const key = makeCacheKey.apply(null, keyArgs ? keyArgs.apply(null, arguments) : arguments);\n if (key === void 0) {\n return originalFunction.apply(null, arguments);\n }\n let entry = cache.get(key);\n if (!entry) {\n cache.set(key, entry = new Entry(originalFunction));\n entry.normalizeResult = normalizeResult;\n entry.subscribe = subscribe;\n // Give the Entry the ability to trigger cache.delete(key), even though\n // the Entry itself does not know about key or cache.\n entry.forget = () => cache.delete(key);\n }\n const value = entry.recompute(Array.prototype.slice.call(arguments));\n // Move this entry to the front of the least-recently used queue,\n // since we just finished computing its value.\n cache.set(key, entry);\n caches.add(cache);\n // Clean up any excess entries in the cache, but only if there is no\n // active parent entry, meaning we\'re not in the middle of a larger\n // computation that might be flummoxed by the cleaning.\n if (!parentEntrySlot.hasValue()) {\n caches.forEach(cache => cache.clean());\n caches.clear();\n }\n return value;\n };\n Object.defineProperty(optimistic, "size", {\n get: () => cache.size,\n configurable: false,\n enumerable: false,\n });\n Object.freeze(optimistic.options = {\n max,\n keyArgs,\n makeCacheKey,\n normalizeResult,\n subscribe,\n cache,\n });\n function dirtyKey(key) {\n const entry = key && cache.get(key);\n if (entry) {\n entry.setDirty();\n }\n }\n optimistic.dirtyKey = dirtyKey;\n optimistic.dirty = function dirty() {\n dirtyKey(makeCacheKey.apply(null, arguments));\n };\n function peekKey(key) {\n const entry = key && cache.get(key);\n if (entry) {\n return entry.peek();\n }\n }\n optimistic.peekKey = peekKey;\n optimistic.peek = function peek() {\n return peekKey(makeCacheKey.apply(null, arguments));\n };\n function forgetKey(key) {\n return key ? cache.delete(key) : false;\n }\n optimistic.forgetKey = forgetKey;\n optimistic.forget = function forget() {\n return forgetKey(makeCacheKey.apply(null, arguments));\n };\n optimistic.makeCacheKey = makeCacheKey;\n optimistic.getKey = keyArgs ? function getKey() {\n return makeCacheKey.apply(null, keyArgs.apply(null, arguments));\n } : makeCacheKey;\n return Object.freeze(optimistic);\n}\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/optimism/lib/index.js_+_7_modules?', + ); + + /***/ + }, + + /***/ 1635: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ C6: () => (/* binding */ __extends),\n/* harmony export */ Cl: () => (/* binding */ __assign),\n/* harmony export */ Tt: () => (/* binding */ __rest),\n/* harmony export */ YH: () => (/* binding */ __generator),\n/* harmony export */ fX: () => (/* binding */ __spreadArray),\n/* harmony export */ sH: () => (/* binding */ __awaiter)\n/* harmony export */ });\n/* unused harmony exports __decorate, __param, __esDecorate, __runInitializers, __propKey, __setFunctionName, __metadata, __createBinding, __exportStar, __values, __read, __spread, __spreadArrays, __await, __asyncGenerator, __asyncDelegator, __asyncValues, __makeTemplateObject, __importStar, __importDefault, __classPrivateFieldGet, __classPrivateFieldSet, __classPrivateFieldIn, __addDisposableResource, __disposeResources */\n/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol */\n\nvar extendStatics = function(d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nfunction __extends(d, b) {\n if (typeof b !== "function" && b !== null)\n throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nvar __assign = function() {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n }\n return __assign.apply(this, arguments);\n}\n\nfunction __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === "function")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nfunction __decorate(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nfunction __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nfunction __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }\n var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";\n var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === "accessor") {\n if (result === void 0) continue;\n if (result === null || typeof result !== "object") throw new TypeError("Object expected");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === "field") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n};\n\nfunction __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n};\n\nfunction __propKey(x) {\n return typeof x === "symbol" ? x : "".concat(x);\n};\n\nfunction __setFunctionName(f, name, prefix) {\n if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";\n return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });\n};\n\nfunction __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nfunction __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nfunction __generator(thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError("Generator is already executing.");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nvar __createBinding = Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nfunction __exportStar(m, o) {\n for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nfunction __values(o) {\n var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === "number") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");\n}\n\nfunction __read(o, n) {\n var m = typeof Symbol === "function" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i["return"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n}\n\n/** @deprecated */\nfunction __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nfunction __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n}\n\nfunction __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nfunction __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nfunction __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume("next", value); }\n function reject(value) { resume("throw", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nfunction __asyncDelegator(o) {\n var i, p;\n return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nfunction __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nfunction __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n Object.defineProperty(o, "default", { enumerable: true, value: v });\n}) : function(o, v) {\n o["default"] = v;\n};\n\nfunction __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n}\n\nfunction __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nfunction __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");\n if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");\n return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nfunction __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === "m") throw new TypeError("Private method is not writable");\n if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");\n if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");\n return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nfunction __classPrivateFieldIn(state, receiver) {\n if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use \'in\' operator on non-object");\n return typeof state === "function" ? receiver === state : state.has(receiver);\n}\n\nfunction __addDisposableResource(env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");\n var dispose, inner;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");\n dispose = value[Symbol.dispose];\n if (async) inner = dispose;\n }\n if (typeof dispose !== "function") throw new TypeError("Object not disposable.");\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\n env.stack.push({ value: value, dispose: dispose, async: async });\n }\n else if (async) {\n env.stack.push({ async: true });\n }\n return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;\n};\n\nfunction __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;\n env.hasError = true;\n }\n function next() {\n while (env.stack.length) {\n var rec = env.stack.pop();\n try {\n var result = rec.dispose && rec.dispose.call(rec.value);\n if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n }\n catch (e) {\n fail(e);\n }\n }\n if (env.hasError) throw env.error;\n }\n return next();\n}\n\n/* unused harmony default export */ var __WEBPACK_DEFAULT_EXPORT__ = ({\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources,\n});\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/tslib/tslib.es6.mjs?', + ); + + /***/ + }, + + /***/ 3401: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + "/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ c: () => (/* binding */ Observable)\n/* harmony export */ });\nfunction _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } 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\nfunction _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); }\n\nfunction _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; }\n\nfunction _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); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\n// === Symbol Support ===\nvar hasSymbols = function () {\n return typeof Symbol === 'function';\n};\n\nvar hasSymbol = function (name) {\n return hasSymbols() && Boolean(Symbol[name]);\n};\n\nvar getSymbol = function (name) {\n return hasSymbol(name) ? Symbol[name] : '@@' + name;\n};\n\nif (hasSymbols() && !hasSymbol('observable')) {\n Symbol.observable = Symbol('observable');\n}\n\nvar SymbolIterator = getSymbol('iterator');\nvar SymbolObservable = getSymbol('observable');\nvar SymbolSpecies = getSymbol('species'); // === Abstract Operations ===\n\nfunction getMethod(obj, key) {\n var value = obj[key];\n if (value == null) return undefined;\n if (typeof value !== 'function') throw new TypeError(value + ' is not a function');\n return value;\n}\n\nfunction getSpecies(obj) {\n var ctor = obj.constructor;\n\n if (ctor !== undefined) {\n ctor = ctor[SymbolSpecies];\n\n if (ctor === null) {\n ctor = undefined;\n }\n }\n\n return ctor !== undefined ? ctor : Observable;\n}\n\nfunction isObservable(x) {\n return x instanceof Observable; // SPEC: Brand check\n}\n\nfunction hostReportError(e) {\n if (hostReportError.log) {\n hostReportError.log(e);\n } else {\n setTimeout(function () {\n throw e;\n });\n }\n}\n\nfunction enqueue(fn) {\n Promise.resolve().then(function () {\n try {\n fn();\n } catch (e) {\n hostReportError(e);\n }\n });\n}\n\nfunction cleanupSubscription(subscription) {\n var cleanup = subscription._cleanup;\n if (cleanup === undefined) return;\n subscription._cleanup = undefined;\n\n if (!cleanup) {\n return;\n }\n\n try {\n if (typeof cleanup === 'function') {\n cleanup();\n } else {\n var unsubscribe = getMethod(cleanup, 'unsubscribe');\n\n if (unsubscribe) {\n unsubscribe.call(cleanup);\n }\n }\n } catch (e) {\n hostReportError(e);\n }\n}\n\nfunction closeSubscription(subscription) {\n subscription._observer = undefined;\n subscription._queue = undefined;\n subscription._state = 'closed';\n}\n\nfunction flushSubscription(subscription) {\n var queue = subscription._queue;\n\n if (!queue) {\n return;\n }\n\n subscription._queue = undefined;\n subscription._state = 'ready';\n\n for (var i = 0; i < queue.length; ++i) {\n notifySubscription(subscription, queue[i].type, queue[i].value);\n if (subscription._state === 'closed') break;\n }\n}\n\nfunction notifySubscription(subscription, type, value) {\n subscription._state = 'running';\n var observer = subscription._observer;\n\n try {\n var m = getMethod(observer, type);\n\n switch (type) {\n case 'next':\n if (m) m.call(observer, value);\n break;\n\n case 'error':\n closeSubscription(subscription);\n if (m) m.call(observer, value);else throw value;\n break;\n\n case 'complete':\n closeSubscription(subscription);\n if (m) m.call(observer);\n break;\n }\n } catch (e) {\n hostReportError(e);\n }\n\n if (subscription._state === 'closed') cleanupSubscription(subscription);else if (subscription._state === 'running') subscription._state = 'ready';\n}\n\nfunction onNotify(subscription, type, value) {\n if (subscription._state === 'closed') return;\n\n if (subscription._state === 'buffering') {\n subscription._queue.push({\n type: type,\n value: value\n });\n\n return;\n }\n\n if (subscription._state !== 'ready') {\n subscription._state = 'buffering';\n subscription._queue = [{\n type: type,\n value: value\n }];\n enqueue(function () {\n return flushSubscription(subscription);\n });\n return;\n }\n\n notifySubscription(subscription, type, value);\n}\n\nvar Subscription = /*#__PURE__*/function () {\n function Subscription(observer, subscriber) {\n // ASSERT: observer is an object\n // ASSERT: subscriber is callable\n this._cleanup = undefined;\n this._observer = observer;\n this._queue = undefined;\n this._state = 'initializing';\n var subscriptionObserver = new SubscriptionObserver(this);\n\n try {\n this._cleanup = subscriber.call(undefined, subscriptionObserver);\n } catch (e) {\n subscriptionObserver.error(e);\n }\n\n if (this._state === 'initializing') this._state = 'ready';\n }\n\n var _proto = Subscription.prototype;\n\n _proto.unsubscribe = function unsubscribe() {\n if (this._state !== 'closed') {\n closeSubscription(this);\n cleanupSubscription(this);\n }\n };\n\n _createClass(Subscription, [{\n key: \"closed\",\n get: function () {\n return this._state === 'closed';\n }\n }]);\n\n return Subscription;\n}();\n\nvar SubscriptionObserver = /*#__PURE__*/function () {\n function SubscriptionObserver(subscription) {\n this._subscription = subscription;\n }\n\n var _proto2 = SubscriptionObserver.prototype;\n\n _proto2.next = function next(value) {\n onNotify(this._subscription, 'next', value);\n };\n\n _proto2.error = function error(value) {\n onNotify(this._subscription, 'error', value);\n };\n\n _proto2.complete = function complete() {\n onNotify(this._subscription, 'complete');\n };\n\n _createClass(SubscriptionObserver, [{\n key: \"closed\",\n get: function () {\n return this._subscription._state === 'closed';\n }\n }]);\n\n return SubscriptionObserver;\n}();\n\nvar Observable = /*#__PURE__*/function () {\n function Observable(subscriber) {\n if (!(this instanceof Observable)) throw new TypeError('Observable cannot be called as a function');\n if (typeof subscriber !== 'function') throw new TypeError('Observable initializer must be a function');\n this._subscriber = subscriber;\n }\n\n var _proto3 = Observable.prototype;\n\n _proto3.subscribe = function subscribe(observer) {\n if (typeof observer !== 'object' || observer === null) {\n observer = {\n next: observer,\n error: arguments[1],\n complete: arguments[2]\n };\n }\n\n return new Subscription(observer, this._subscriber);\n };\n\n _proto3.forEach = function forEach(fn) {\n var _this = this;\n\n return new Promise(function (resolve, reject) {\n if (typeof fn !== 'function') {\n reject(new TypeError(fn + ' is not a function'));\n return;\n }\n\n function done() {\n subscription.unsubscribe();\n resolve();\n }\n\n var subscription = _this.subscribe({\n next: function (value) {\n try {\n fn(value, done);\n } catch (e) {\n reject(e);\n subscription.unsubscribe();\n }\n },\n error: reject,\n complete: resolve\n });\n });\n };\n\n _proto3.map = function map(fn) {\n var _this2 = this;\n\n if (typeof fn !== 'function') throw new TypeError(fn + ' is not a function');\n var C = getSpecies(this);\n return new C(function (observer) {\n return _this2.subscribe({\n next: function (value) {\n try {\n value = fn(value);\n } catch (e) {\n return observer.error(e);\n }\n\n observer.next(value);\n },\n error: function (e) {\n observer.error(e);\n },\n complete: function () {\n observer.complete();\n }\n });\n });\n };\n\n _proto3.filter = function filter(fn) {\n var _this3 = this;\n\n if (typeof fn !== 'function') throw new TypeError(fn + ' is not a function');\n var C = getSpecies(this);\n return new C(function (observer) {\n return _this3.subscribe({\n next: function (value) {\n try {\n if (!fn(value)) return;\n } catch (e) {\n return observer.error(e);\n }\n\n observer.next(value);\n },\n error: function (e) {\n observer.error(e);\n },\n complete: function () {\n observer.complete();\n }\n });\n });\n };\n\n _proto3.reduce = function reduce(fn) {\n var _this4 = this;\n\n if (typeof fn !== 'function') throw new TypeError(fn + ' is not a function');\n var C = getSpecies(this);\n var hasSeed = arguments.length > 1;\n var hasValue = false;\n var seed = arguments[1];\n var acc = seed;\n return new C(function (observer) {\n return _this4.subscribe({\n next: function (value) {\n var first = !hasValue;\n hasValue = true;\n\n if (!first || hasSeed) {\n try {\n acc = fn(acc, value);\n } catch (e) {\n return observer.error(e);\n }\n } else {\n acc = value;\n }\n },\n error: function (e) {\n observer.error(e);\n },\n complete: function () {\n if (!hasValue && !hasSeed) return observer.error(new TypeError('Cannot reduce an empty sequence'));\n observer.next(acc);\n observer.complete();\n }\n });\n });\n };\n\n _proto3.concat = function concat() {\n var _this5 = this;\n\n for (var _len = arguments.length, sources = new Array(_len), _key = 0; _key < _len; _key++) {\n sources[_key] = arguments[_key];\n }\n\n var C = getSpecies(this);\n return new C(function (observer) {\n var subscription;\n var index = 0;\n\n function startNext(next) {\n subscription = next.subscribe({\n next: function (v) {\n observer.next(v);\n },\n error: function (e) {\n observer.error(e);\n },\n complete: function () {\n if (index === sources.length) {\n subscription = undefined;\n observer.complete();\n } else {\n startNext(C.from(sources[index++]));\n }\n }\n });\n }\n\n startNext(_this5);\n return function () {\n if (subscription) {\n subscription.unsubscribe();\n subscription = undefined;\n }\n };\n });\n };\n\n _proto3.flatMap = function flatMap(fn) {\n var _this6 = this;\n\n if (typeof fn !== 'function') throw new TypeError(fn + ' is not a function');\n var C = getSpecies(this);\n return new C(function (observer) {\n var subscriptions = [];\n\n var outer = _this6.subscribe({\n next: function (value) {\n if (fn) {\n try {\n value = fn(value);\n } catch (e) {\n return observer.error(e);\n }\n }\n\n var inner = C.from(value).subscribe({\n next: function (value) {\n observer.next(value);\n },\n error: function (e) {\n observer.error(e);\n },\n complete: function () {\n var i = subscriptions.indexOf(inner);\n if (i >= 0) subscriptions.splice(i, 1);\n completeIfDone();\n }\n });\n subscriptions.push(inner);\n },\n error: function (e) {\n observer.error(e);\n },\n complete: function () {\n completeIfDone();\n }\n });\n\n function completeIfDone() {\n if (outer.closed && subscriptions.length === 0) observer.complete();\n }\n\n return function () {\n subscriptions.forEach(function (s) {\n return s.unsubscribe();\n });\n outer.unsubscribe();\n };\n });\n };\n\n _proto3[SymbolObservable] = function () {\n return this;\n };\n\n Observable.from = function from(x) {\n var C = typeof this === 'function' ? this : Observable;\n if (x == null) throw new TypeError(x + ' is not an object');\n var method = getMethod(x, SymbolObservable);\n\n if (method) {\n var observable = method.call(x);\n if (Object(observable) !== observable) throw new TypeError(observable + ' is not an object');\n if (isObservable(observable) && observable.constructor === C) return observable;\n return new C(function (observer) {\n return observable.subscribe(observer);\n });\n }\n\n if (hasSymbol('iterator')) {\n method = getMethod(x, SymbolIterator);\n\n if (method) {\n return new C(function (observer) {\n enqueue(function () {\n if (observer.closed) return;\n\n for (var _iterator = _createForOfIteratorHelperLoose(method.call(x)), _step; !(_step = _iterator()).done;) {\n var item = _step.value;\n observer.next(item);\n if (observer.closed) return;\n }\n\n observer.complete();\n });\n });\n }\n }\n\n if (Array.isArray(x)) {\n return new C(function (observer) {\n enqueue(function () {\n if (observer.closed) return;\n\n for (var i = 0; i < x.length; ++i) {\n observer.next(x[i]);\n if (observer.closed) return;\n }\n\n observer.complete();\n });\n });\n }\n\n throw new TypeError(x + ' is not observable');\n };\n\n Observable.of = function of() {\n for (var _len2 = arguments.length, items = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n items[_key2] = arguments[_key2];\n }\n\n var C = typeof this === 'function' ? this : Observable;\n return new C(function (observer) {\n enqueue(function () {\n if (observer.closed) return;\n\n for (var i = 0; i < items.length; ++i) {\n observer.next(items[i]);\n if (observer.closed) return;\n }\n\n observer.complete();\n });\n });\n };\n\n _createClass(Observable, null, [{\n key: SymbolSpecies,\n get: function () {\n return this;\n }\n }]);\n\n return Observable;\n}();\n\nif (hasSymbols()) {\n Object.defineProperty(Observable, Symbol('extensions'), {\n value: {\n symbol: SymbolObservable,\n hostReportError: hostReportError\n },\n configurable: true\n });\n}\n\n\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/zen-observable-ts/module.js?", + ); + + /***/ + }, + + /***/ 7963: /***/ (module) => { + 'use strict'; + eval( + 'module.exports = /*#__PURE__*/JSON.parse(\'[[[0,44],"disallowed_STD3_valid"],[[45,46],"valid"],[[47,47],"disallowed_STD3_valid"],[[48,57],"valid"],[[58,64],"disallowed_STD3_valid"],[[65,65],"mapped",[97]],[[66,66],"mapped",[98]],[[67,67],"mapped",[99]],[[68,68],"mapped",[100]],[[69,69],"mapped",[101]],[[70,70],"mapped",[102]],[[71,71],"mapped",[103]],[[72,72],"mapped",[104]],[[73,73],"mapped",[105]],[[74,74],"mapped",[106]],[[75,75],"mapped",[107]],[[76,76],"mapped",[108]],[[77,77],"mapped",[109]],[[78,78],"mapped",[110]],[[79,79],"mapped",[111]],[[80,80],"mapped",[112]],[[81,81],"mapped",[113]],[[82,82],"mapped",[114]],[[83,83],"mapped",[115]],[[84,84],"mapped",[116]],[[85,85],"mapped",[117]],[[86,86],"mapped",[118]],[[87,87],"mapped",[119]],[[88,88],"mapped",[120]],[[89,89],"mapped",[121]],[[90,90],"mapped",[122]],[[91,96],"disallowed_STD3_valid"],[[97,122],"valid"],[[123,127],"disallowed_STD3_valid"],[[128,159],"disallowed"],[[160,160],"disallowed_STD3_mapped",[32]],[[161,167],"valid",[],"NV8"],[[168,168],"disallowed_STD3_mapped",[32,776]],[[169,169],"valid",[],"NV8"],[[170,170],"mapped",[97]],[[171,172],"valid",[],"NV8"],[[173,173],"ignored"],[[174,174],"valid",[],"NV8"],[[175,175],"disallowed_STD3_mapped",[32,772]],[[176,177],"valid",[],"NV8"],[[178,178],"mapped",[50]],[[179,179],"mapped",[51]],[[180,180],"disallowed_STD3_mapped",[32,769]],[[181,181],"mapped",[956]],[[182,182],"valid",[],"NV8"],[[183,183],"valid"],[[184,184],"disallowed_STD3_mapped",[32,807]],[[185,185],"mapped",[49]],[[186,186],"mapped",[111]],[[187,187],"valid",[],"NV8"],[[188,188],"mapped",[49,8260,52]],[[189,189],"mapped",[49,8260,50]],[[190,190],"mapped",[51,8260,52]],[[191,191],"valid",[],"NV8"],[[192,192],"mapped",[224]],[[193,193],"mapped",[225]],[[194,194],"mapped",[226]],[[195,195],"mapped",[227]],[[196,196],"mapped",[228]],[[197,197],"mapped",[229]],[[198,198],"mapped",[230]],[[199,199],"mapped",[231]],[[200,200],"mapped",[232]],[[201,201],"mapped",[233]],[[202,202],"mapped",[234]],[[203,203],"mapped",[235]],[[204,204],"mapped",[236]],[[205,205],"mapped",[237]],[[206,206],"mapped",[238]],[[207,207],"mapped",[239]],[[208,208],"mapped",[240]],[[209,209],"mapped",[241]],[[210,210],"mapped",[242]],[[211,211],"mapped",[243]],[[212,212],"mapped",[244]],[[213,213],"mapped",[245]],[[214,214],"mapped",[246]],[[215,215],"valid",[],"NV8"],[[216,216],"mapped",[248]],[[217,217],"mapped",[249]],[[218,218],"mapped",[250]],[[219,219],"mapped",[251]],[[220,220],"mapped",[252]],[[221,221],"mapped",[253]],[[222,222],"mapped",[254]],[[223,223],"deviation",[115,115]],[[224,246],"valid"],[[247,247],"valid",[],"NV8"],[[248,255],"valid"],[[256,256],"mapped",[257]],[[257,257],"valid"],[[258,258],"mapped",[259]],[[259,259],"valid"],[[260,260],"mapped",[261]],[[261,261],"valid"],[[262,262],"mapped",[263]],[[263,263],"valid"],[[264,264],"mapped",[265]],[[265,265],"valid"],[[266,266],"mapped",[267]],[[267,267],"valid"],[[268,268],"mapped",[269]],[[269,269],"valid"],[[270,270],"mapped",[271]],[[271,271],"valid"],[[272,272],"mapped",[273]],[[273,273],"valid"],[[274,274],"mapped",[275]],[[275,275],"valid"],[[276,276],"mapped",[277]],[[277,277],"valid"],[[278,278],"mapped",[279]],[[279,279],"valid"],[[280,280],"mapped",[281]],[[281,281],"valid"],[[282,282],"mapped",[283]],[[283,283],"valid"],[[284,284],"mapped",[285]],[[285,285],"valid"],[[286,286],"mapped",[287]],[[287,287],"valid"],[[288,288],"mapped",[289]],[[289,289],"valid"],[[290,290],"mapped",[291]],[[291,291],"valid"],[[292,292],"mapped",[293]],[[293,293],"valid"],[[294,294],"mapped",[295]],[[295,295],"valid"],[[296,296],"mapped",[297]],[[297,297],"valid"],[[298,298],"mapped",[299]],[[299,299],"valid"],[[300,300],"mapped",[301]],[[301,301],"valid"],[[302,302],"mapped",[303]],[[303,303],"valid"],[[304,304],"mapped",[105,775]],[[305,305],"valid"],[[306,307],"mapped",[105,106]],[[308,308],"mapped",[309]],[[309,309],"valid"],[[310,310],"mapped",[311]],[[311,312],"valid"],[[313,313],"mapped",[314]],[[314,314],"valid"],[[315,315],"mapped",[316]],[[316,316],"valid"],[[317,317],"mapped",[318]],[[318,318],"valid"],[[319,320],"mapped",[108,183]],[[321,321],"mapped",[322]],[[322,322],"valid"],[[323,323],"mapped",[324]],[[324,324],"valid"],[[325,325],"mapped",[326]],[[326,326],"valid"],[[327,327],"mapped",[328]],[[328,328],"valid"],[[329,329],"mapped",[700,110]],[[330,330],"mapped",[331]],[[331,331],"valid"],[[332,332],"mapped",[333]],[[333,333],"valid"],[[334,334],"mapped",[335]],[[335,335],"valid"],[[336,336],"mapped",[337]],[[337,337],"valid"],[[338,338],"mapped",[339]],[[339,339],"valid"],[[340,340],"mapped",[341]],[[341,341],"valid"],[[342,342],"mapped",[343]],[[343,343],"valid"],[[344,344],"mapped",[345]],[[345,345],"valid"],[[346,346],"mapped",[347]],[[347,347],"valid"],[[348,348],"mapped",[349]],[[349,349],"valid"],[[350,350],"mapped",[351]],[[351,351],"valid"],[[352,352],"mapped",[353]],[[353,353],"valid"],[[354,354],"mapped",[355]],[[355,355],"valid"],[[356,356],"mapped",[357]],[[357,357],"valid"],[[358,358],"mapped",[359]],[[359,359],"valid"],[[360,360],"mapped",[361]],[[361,361],"valid"],[[362,362],"mapped",[363]],[[363,363],"valid"],[[364,364],"mapped",[365]],[[365,365],"valid"],[[366,366],"mapped",[367]],[[367,367],"valid"],[[368,368],"mapped",[369]],[[369,369],"valid"],[[370,370],"mapped",[371]],[[371,371],"valid"],[[372,372],"mapped",[373]],[[373,373],"valid"],[[374,374],"mapped",[375]],[[375,375],"valid"],[[376,376],"mapped",[255]],[[377,377],"mapped",[378]],[[378,378],"valid"],[[379,379],"mapped",[380]],[[380,380],"valid"],[[381,381],"mapped",[382]],[[382,382],"valid"],[[383,383],"mapped",[115]],[[384,384],"valid"],[[385,385],"mapped",[595]],[[386,386],"mapped",[387]],[[387,387],"valid"],[[388,388],"mapped",[389]],[[389,389],"valid"],[[390,390],"mapped",[596]],[[391,391],"mapped",[392]],[[392,392],"valid"],[[393,393],"mapped",[598]],[[394,394],"mapped",[599]],[[395,395],"mapped",[396]],[[396,397],"valid"],[[398,398],"mapped",[477]],[[399,399],"mapped",[601]],[[400,400],"mapped",[603]],[[401,401],"mapped",[402]],[[402,402],"valid"],[[403,403],"mapped",[608]],[[404,404],"mapped",[611]],[[405,405],"valid"],[[406,406],"mapped",[617]],[[407,407],"mapped",[616]],[[408,408],"mapped",[409]],[[409,411],"valid"],[[412,412],"mapped",[623]],[[413,413],"mapped",[626]],[[414,414],"valid"],[[415,415],"mapped",[629]],[[416,416],"mapped",[417]],[[417,417],"valid"],[[418,418],"mapped",[419]],[[419,419],"valid"],[[420,420],"mapped",[421]],[[421,421],"valid"],[[422,422],"mapped",[640]],[[423,423],"mapped",[424]],[[424,424],"valid"],[[425,425],"mapped",[643]],[[426,427],"valid"],[[428,428],"mapped",[429]],[[429,429],"valid"],[[430,430],"mapped",[648]],[[431,431],"mapped",[432]],[[432,432],"valid"],[[433,433],"mapped",[650]],[[434,434],"mapped",[651]],[[435,435],"mapped",[436]],[[436,436],"valid"],[[437,437],"mapped",[438]],[[438,438],"valid"],[[439,439],"mapped",[658]],[[440,440],"mapped",[441]],[[441,443],"valid"],[[444,444],"mapped",[445]],[[445,451],"valid"],[[452,454],"mapped",[100,382]],[[455,457],"mapped",[108,106]],[[458,460],"mapped",[110,106]],[[461,461],"mapped",[462]],[[462,462],"valid"],[[463,463],"mapped",[464]],[[464,464],"valid"],[[465,465],"mapped",[466]],[[466,466],"valid"],[[467,467],"mapped",[468]],[[468,468],"valid"],[[469,469],"mapped",[470]],[[470,470],"valid"],[[471,471],"mapped",[472]],[[472,472],"valid"],[[473,473],"mapped",[474]],[[474,474],"valid"],[[475,475],"mapped",[476]],[[476,477],"valid"],[[478,478],"mapped",[479]],[[479,479],"valid"],[[480,480],"mapped",[481]],[[481,481],"valid"],[[482,482],"mapped",[483]],[[483,483],"valid"],[[484,484],"mapped",[485]],[[485,485],"valid"],[[486,486],"mapped",[487]],[[487,487],"valid"],[[488,488],"mapped",[489]],[[489,489],"valid"],[[490,490],"mapped",[491]],[[491,491],"valid"],[[492,492],"mapped",[493]],[[493,493],"valid"],[[494,494],"mapped",[495]],[[495,496],"valid"],[[497,499],"mapped",[100,122]],[[500,500],"mapped",[501]],[[501,501],"valid"],[[502,502],"mapped",[405]],[[503,503],"mapped",[447]],[[504,504],"mapped",[505]],[[505,505],"valid"],[[506,506],"mapped",[507]],[[507,507],"valid"],[[508,508],"mapped",[509]],[[509,509],"valid"],[[510,510],"mapped",[511]],[[511,511],"valid"],[[512,512],"mapped",[513]],[[513,513],"valid"],[[514,514],"mapped",[515]],[[515,515],"valid"],[[516,516],"mapped",[517]],[[517,517],"valid"],[[518,518],"mapped",[519]],[[519,519],"valid"],[[520,520],"mapped",[521]],[[521,521],"valid"],[[522,522],"mapped",[523]],[[523,523],"valid"],[[524,524],"mapped",[525]],[[525,525],"valid"],[[526,526],"mapped",[527]],[[527,527],"valid"],[[528,528],"mapped",[529]],[[529,529],"valid"],[[530,530],"mapped",[531]],[[531,531],"valid"],[[532,532],"mapped",[533]],[[533,533],"valid"],[[534,534],"mapped",[535]],[[535,535],"valid"],[[536,536],"mapped",[537]],[[537,537],"valid"],[[538,538],"mapped",[539]],[[539,539],"valid"],[[540,540],"mapped",[541]],[[541,541],"valid"],[[542,542],"mapped",[543]],[[543,543],"valid"],[[544,544],"mapped",[414]],[[545,545],"valid"],[[546,546],"mapped",[547]],[[547,547],"valid"],[[548,548],"mapped",[549]],[[549,549],"valid"],[[550,550],"mapped",[551]],[[551,551],"valid"],[[552,552],"mapped",[553]],[[553,553],"valid"],[[554,554],"mapped",[555]],[[555,555],"valid"],[[556,556],"mapped",[557]],[[557,557],"valid"],[[558,558],"mapped",[559]],[[559,559],"valid"],[[560,560],"mapped",[561]],[[561,561],"valid"],[[562,562],"mapped",[563]],[[563,563],"valid"],[[564,566],"valid"],[[567,569],"valid"],[[570,570],"mapped",[11365]],[[571,571],"mapped",[572]],[[572,572],"valid"],[[573,573],"mapped",[410]],[[574,574],"mapped",[11366]],[[575,576],"valid"],[[577,577],"mapped",[578]],[[578,578],"valid"],[[579,579],"mapped",[384]],[[580,580],"mapped",[649]],[[581,581],"mapped",[652]],[[582,582],"mapped",[583]],[[583,583],"valid"],[[584,584],"mapped",[585]],[[585,585],"valid"],[[586,586],"mapped",[587]],[[587,587],"valid"],[[588,588],"mapped",[589]],[[589,589],"valid"],[[590,590],"mapped",[591]],[[591,591],"valid"],[[592,680],"valid"],[[681,685],"valid"],[[686,687],"valid"],[[688,688],"mapped",[104]],[[689,689],"mapped",[614]],[[690,690],"mapped",[106]],[[691,691],"mapped",[114]],[[692,692],"mapped",[633]],[[693,693],"mapped",[635]],[[694,694],"mapped",[641]],[[695,695],"mapped",[119]],[[696,696],"mapped",[121]],[[697,705],"valid"],[[706,709],"valid",[],"NV8"],[[710,721],"valid"],[[722,727],"valid",[],"NV8"],[[728,728],"disallowed_STD3_mapped",[32,774]],[[729,729],"disallowed_STD3_mapped",[32,775]],[[730,730],"disallowed_STD3_mapped",[32,778]],[[731,731],"disallowed_STD3_mapped",[32,808]],[[732,732],"disallowed_STD3_mapped",[32,771]],[[733,733],"disallowed_STD3_mapped",[32,779]],[[734,734],"valid",[],"NV8"],[[735,735],"valid",[],"NV8"],[[736,736],"mapped",[611]],[[737,737],"mapped",[108]],[[738,738],"mapped",[115]],[[739,739],"mapped",[120]],[[740,740],"mapped",[661]],[[741,745],"valid",[],"NV8"],[[746,747],"valid",[],"NV8"],[[748,748],"valid"],[[749,749],"valid",[],"NV8"],[[750,750],"valid"],[[751,767],"valid",[],"NV8"],[[768,831],"valid"],[[832,832],"mapped",[768]],[[833,833],"mapped",[769]],[[834,834],"valid"],[[835,835],"mapped",[787]],[[836,836],"mapped",[776,769]],[[837,837],"mapped",[953]],[[838,846],"valid"],[[847,847],"ignored"],[[848,855],"valid"],[[856,860],"valid"],[[861,863],"valid"],[[864,865],"valid"],[[866,866],"valid"],[[867,879],"valid"],[[880,880],"mapped",[881]],[[881,881],"valid"],[[882,882],"mapped",[883]],[[883,883],"valid"],[[884,884],"mapped",[697]],[[885,885],"valid"],[[886,886],"mapped",[887]],[[887,887],"valid"],[[888,889],"disallowed"],[[890,890],"disallowed_STD3_mapped",[32,953]],[[891,893],"valid"],[[894,894],"disallowed_STD3_mapped",[59]],[[895,895],"mapped",[1011]],[[896,899],"disallowed"],[[900,900],"disallowed_STD3_mapped",[32,769]],[[901,901],"disallowed_STD3_mapped",[32,776,769]],[[902,902],"mapped",[940]],[[903,903],"mapped",[183]],[[904,904],"mapped",[941]],[[905,905],"mapped",[942]],[[906,906],"mapped",[943]],[[907,907],"disallowed"],[[908,908],"mapped",[972]],[[909,909],"disallowed"],[[910,910],"mapped",[973]],[[911,911],"mapped",[974]],[[912,912],"valid"],[[913,913],"mapped",[945]],[[914,914],"mapped",[946]],[[915,915],"mapped",[947]],[[916,916],"mapped",[948]],[[917,917],"mapped",[949]],[[918,918],"mapped",[950]],[[919,919],"mapped",[951]],[[920,920],"mapped",[952]],[[921,921],"mapped",[953]],[[922,922],"mapped",[954]],[[923,923],"mapped",[955]],[[924,924],"mapped",[956]],[[925,925],"mapped",[957]],[[926,926],"mapped",[958]],[[927,927],"mapped",[959]],[[928,928],"mapped",[960]],[[929,929],"mapped",[961]],[[930,930],"disallowed"],[[931,931],"mapped",[963]],[[932,932],"mapped",[964]],[[933,933],"mapped",[965]],[[934,934],"mapped",[966]],[[935,935],"mapped",[967]],[[936,936],"mapped",[968]],[[937,937],"mapped",[969]],[[938,938],"mapped",[970]],[[939,939],"mapped",[971]],[[940,961],"valid"],[[962,962],"deviation",[963]],[[963,974],"valid"],[[975,975],"mapped",[983]],[[976,976],"mapped",[946]],[[977,977],"mapped",[952]],[[978,978],"mapped",[965]],[[979,979],"mapped",[973]],[[980,980],"mapped",[971]],[[981,981],"mapped",[966]],[[982,982],"mapped",[960]],[[983,983],"valid"],[[984,984],"mapped",[985]],[[985,985],"valid"],[[986,986],"mapped",[987]],[[987,987],"valid"],[[988,988],"mapped",[989]],[[989,989],"valid"],[[990,990],"mapped",[991]],[[991,991],"valid"],[[992,992],"mapped",[993]],[[993,993],"valid"],[[994,994],"mapped",[995]],[[995,995],"valid"],[[996,996],"mapped",[997]],[[997,997],"valid"],[[998,998],"mapped",[999]],[[999,999],"valid"],[[1000,1000],"mapped",[1001]],[[1001,1001],"valid"],[[1002,1002],"mapped",[1003]],[[1003,1003],"valid"],[[1004,1004],"mapped",[1005]],[[1005,1005],"valid"],[[1006,1006],"mapped",[1007]],[[1007,1007],"valid"],[[1008,1008],"mapped",[954]],[[1009,1009],"mapped",[961]],[[1010,1010],"mapped",[963]],[[1011,1011],"valid"],[[1012,1012],"mapped",[952]],[[1013,1013],"mapped",[949]],[[1014,1014],"valid",[],"NV8"],[[1015,1015],"mapped",[1016]],[[1016,1016],"valid"],[[1017,1017],"mapped",[963]],[[1018,1018],"mapped",[1019]],[[1019,1019],"valid"],[[1020,1020],"valid"],[[1021,1021],"mapped",[891]],[[1022,1022],"mapped",[892]],[[1023,1023],"mapped",[893]],[[1024,1024],"mapped",[1104]],[[1025,1025],"mapped",[1105]],[[1026,1026],"mapped",[1106]],[[1027,1027],"mapped",[1107]],[[1028,1028],"mapped",[1108]],[[1029,1029],"mapped",[1109]],[[1030,1030],"mapped",[1110]],[[1031,1031],"mapped",[1111]],[[1032,1032],"mapped",[1112]],[[1033,1033],"mapped",[1113]],[[1034,1034],"mapped",[1114]],[[1035,1035],"mapped",[1115]],[[1036,1036],"mapped",[1116]],[[1037,1037],"mapped",[1117]],[[1038,1038],"mapped",[1118]],[[1039,1039],"mapped",[1119]],[[1040,1040],"mapped",[1072]],[[1041,1041],"mapped",[1073]],[[1042,1042],"mapped",[1074]],[[1043,1043],"mapped",[1075]],[[1044,1044],"mapped",[1076]],[[1045,1045],"mapped",[1077]],[[1046,1046],"mapped",[1078]],[[1047,1047],"mapped",[1079]],[[1048,1048],"mapped",[1080]],[[1049,1049],"mapped",[1081]],[[1050,1050],"mapped",[1082]],[[1051,1051],"mapped",[1083]],[[1052,1052],"mapped",[1084]],[[1053,1053],"mapped",[1085]],[[1054,1054],"mapped",[1086]],[[1055,1055],"mapped",[1087]],[[1056,1056],"mapped",[1088]],[[1057,1057],"mapped",[1089]],[[1058,1058],"mapped",[1090]],[[1059,1059],"mapped",[1091]],[[1060,1060],"mapped",[1092]],[[1061,1061],"mapped",[1093]],[[1062,1062],"mapped",[1094]],[[1063,1063],"mapped",[1095]],[[1064,1064],"mapped",[1096]],[[1065,1065],"mapped",[1097]],[[1066,1066],"mapped",[1098]],[[1067,1067],"mapped",[1099]],[[1068,1068],"mapped",[1100]],[[1069,1069],"mapped",[1101]],[[1070,1070],"mapped",[1102]],[[1071,1071],"mapped",[1103]],[[1072,1103],"valid"],[[1104,1104],"valid"],[[1105,1116],"valid"],[[1117,1117],"valid"],[[1118,1119],"valid"],[[1120,1120],"mapped",[1121]],[[1121,1121],"valid"],[[1122,1122],"mapped",[1123]],[[1123,1123],"valid"],[[1124,1124],"mapped",[1125]],[[1125,1125],"valid"],[[1126,1126],"mapped",[1127]],[[1127,1127],"valid"],[[1128,1128],"mapped",[1129]],[[1129,1129],"valid"],[[1130,1130],"mapped",[1131]],[[1131,1131],"valid"],[[1132,1132],"mapped",[1133]],[[1133,1133],"valid"],[[1134,1134],"mapped",[1135]],[[1135,1135],"valid"],[[1136,1136],"mapped",[1137]],[[1137,1137],"valid"],[[1138,1138],"mapped",[1139]],[[1139,1139],"valid"],[[1140,1140],"mapped",[1141]],[[1141,1141],"valid"],[[1142,1142],"mapped",[1143]],[[1143,1143],"valid"],[[1144,1144],"mapped",[1145]],[[1145,1145],"valid"],[[1146,1146],"mapped",[1147]],[[1147,1147],"valid"],[[1148,1148],"mapped",[1149]],[[1149,1149],"valid"],[[1150,1150],"mapped",[1151]],[[1151,1151],"valid"],[[1152,1152],"mapped",[1153]],[[1153,1153],"valid"],[[1154,1154],"valid",[],"NV8"],[[1155,1158],"valid"],[[1159,1159],"valid"],[[1160,1161],"valid",[],"NV8"],[[1162,1162],"mapped",[1163]],[[1163,1163],"valid"],[[1164,1164],"mapped",[1165]],[[1165,1165],"valid"],[[1166,1166],"mapped",[1167]],[[1167,1167],"valid"],[[1168,1168],"mapped",[1169]],[[1169,1169],"valid"],[[1170,1170],"mapped",[1171]],[[1171,1171],"valid"],[[1172,1172],"mapped",[1173]],[[1173,1173],"valid"],[[1174,1174],"mapped",[1175]],[[1175,1175],"valid"],[[1176,1176],"mapped",[1177]],[[1177,1177],"valid"],[[1178,1178],"mapped",[1179]],[[1179,1179],"valid"],[[1180,1180],"mapped",[1181]],[[1181,1181],"valid"],[[1182,1182],"mapped",[1183]],[[1183,1183],"valid"],[[1184,1184],"mapped",[1185]],[[1185,1185],"valid"],[[1186,1186],"mapped",[1187]],[[1187,1187],"valid"],[[1188,1188],"mapped",[1189]],[[1189,1189],"valid"],[[1190,1190],"mapped",[1191]],[[1191,1191],"valid"],[[1192,1192],"mapped",[1193]],[[1193,1193],"valid"],[[1194,1194],"mapped",[1195]],[[1195,1195],"valid"],[[1196,1196],"mapped",[1197]],[[1197,1197],"valid"],[[1198,1198],"mapped",[1199]],[[1199,1199],"valid"],[[1200,1200],"mapped",[1201]],[[1201,1201],"valid"],[[1202,1202],"mapped",[1203]],[[1203,1203],"valid"],[[1204,1204],"mapped",[1205]],[[1205,1205],"valid"],[[1206,1206],"mapped",[1207]],[[1207,1207],"valid"],[[1208,1208],"mapped",[1209]],[[1209,1209],"valid"],[[1210,1210],"mapped",[1211]],[[1211,1211],"valid"],[[1212,1212],"mapped",[1213]],[[1213,1213],"valid"],[[1214,1214],"mapped",[1215]],[[1215,1215],"valid"],[[1216,1216],"disallowed"],[[1217,1217],"mapped",[1218]],[[1218,1218],"valid"],[[1219,1219],"mapped",[1220]],[[1220,1220],"valid"],[[1221,1221],"mapped",[1222]],[[1222,1222],"valid"],[[1223,1223],"mapped",[1224]],[[1224,1224],"valid"],[[1225,1225],"mapped",[1226]],[[1226,1226],"valid"],[[1227,1227],"mapped",[1228]],[[1228,1228],"valid"],[[1229,1229],"mapped",[1230]],[[1230,1230],"valid"],[[1231,1231],"valid"],[[1232,1232],"mapped",[1233]],[[1233,1233],"valid"],[[1234,1234],"mapped",[1235]],[[1235,1235],"valid"],[[1236,1236],"mapped",[1237]],[[1237,1237],"valid"],[[1238,1238],"mapped",[1239]],[[1239,1239],"valid"],[[1240,1240],"mapped",[1241]],[[1241,1241],"valid"],[[1242,1242],"mapped",[1243]],[[1243,1243],"valid"],[[1244,1244],"mapped",[1245]],[[1245,1245],"valid"],[[1246,1246],"mapped",[1247]],[[1247,1247],"valid"],[[1248,1248],"mapped",[1249]],[[1249,1249],"valid"],[[1250,1250],"mapped",[1251]],[[1251,1251],"valid"],[[1252,1252],"mapped",[1253]],[[1253,1253],"valid"],[[1254,1254],"mapped",[1255]],[[1255,1255],"valid"],[[1256,1256],"mapped",[1257]],[[1257,1257],"valid"],[[1258,1258],"mapped",[1259]],[[1259,1259],"valid"],[[1260,1260],"mapped",[1261]],[[1261,1261],"valid"],[[1262,1262],"mapped",[1263]],[[1263,1263],"valid"],[[1264,1264],"mapped",[1265]],[[1265,1265],"valid"],[[1266,1266],"mapped",[1267]],[[1267,1267],"valid"],[[1268,1268],"mapped",[1269]],[[1269,1269],"valid"],[[1270,1270],"mapped",[1271]],[[1271,1271],"valid"],[[1272,1272],"mapped",[1273]],[[1273,1273],"valid"],[[1274,1274],"mapped",[1275]],[[1275,1275],"valid"],[[1276,1276],"mapped",[1277]],[[1277,1277],"valid"],[[1278,1278],"mapped",[1279]],[[1279,1279],"valid"],[[1280,1280],"mapped",[1281]],[[1281,1281],"valid"],[[1282,1282],"mapped",[1283]],[[1283,1283],"valid"],[[1284,1284],"mapped",[1285]],[[1285,1285],"valid"],[[1286,1286],"mapped",[1287]],[[1287,1287],"valid"],[[1288,1288],"mapped",[1289]],[[1289,1289],"valid"],[[1290,1290],"mapped",[1291]],[[1291,1291],"valid"],[[1292,1292],"mapped",[1293]],[[1293,1293],"valid"],[[1294,1294],"mapped",[1295]],[[1295,1295],"valid"],[[1296,1296],"mapped",[1297]],[[1297,1297],"valid"],[[1298,1298],"mapped",[1299]],[[1299,1299],"valid"],[[1300,1300],"mapped",[1301]],[[1301,1301],"valid"],[[1302,1302],"mapped",[1303]],[[1303,1303],"valid"],[[1304,1304],"mapped",[1305]],[[1305,1305],"valid"],[[1306,1306],"mapped",[1307]],[[1307,1307],"valid"],[[1308,1308],"mapped",[1309]],[[1309,1309],"valid"],[[1310,1310],"mapped",[1311]],[[1311,1311],"valid"],[[1312,1312],"mapped",[1313]],[[1313,1313],"valid"],[[1314,1314],"mapped",[1315]],[[1315,1315],"valid"],[[1316,1316],"mapped",[1317]],[[1317,1317],"valid"],[[1318,1318],"mapped",[1319]],[[1319,1319],"valid"],[[1320,1320],"mapped",[1321]],[[1321,1321],"valid"],[[1322,1322],"mapped",[1323]],[[1323,1323],"valid"],[[1324,1324],"mapped",[1325]],[[1325,1325],"valid"],[[1326,1326],"mapped",[1327]],[[1327,1327],"valid"],[[1328,1328],"disallowed"],[[1329,1329],"mapped",[1377]],[[1330,1330],"mapped",[1378]],[[1331,1331],"mapped",[1379]],[[1332,1332],"mapped",[1380]],[[1333,1333],"mapped",[1381]],[[1334,1334],"mapped",[1382]],[[1335,1335],"mapped",[1383]],[[1336,1336],"mapped",[1384]],[[1337,1337],"mapped",[1385]],[[1338,1338],"mapped",[1386]],[[1339,1339],"mapped",[1387]],[[1340,1340],"mapped",[1388]],[[1341,1341],"mapped",[1389]],[[1342,1342],"mapped",[1390]],[[1343,1343],"mapped",[1391]],[[1344,1344],"mapped",[1392]],[[1345,1345],"mapped",[1393]],[[1346,1346],"mapped",[1394]],[[1347,1347],"mapped",[1395]],[[1348,1348],"mapped",[1396]],[[1349,1349],"mapped",[1397]],[[1350,1350],"mapped",[1398]],[[1351,1351],"mapped",[1399]],[[1352,1352],"mapped",[1400]],[[1353,1353],"mapped",[1401]],[[1354,1354],"mapped",[1402]],[[1355,1355],"mapped",[1403]],[[1356,1356],"mapped",[1404]],[[1357,1357],"mapped",[1405]],[[1358,1358],"mapped",[1406]],[[1359,1359],"mapped",[1407]],[[1360,1360],"mapped",[1408]],[[1361,1361],"mapped",[1409]],[[1362,1362],"mapped",[1410]],[[1363,1363],"mapped",[1411]],[[1364,1364],"mapped",[1412]],[[1365,1365],"mapped",[1413]],[[1366,1366],"mapped",[1414]],[[1367,1368],"disallowed"],[[1369,1369],"valid"],[[1370,1375],"valid",[],"NV8"],[[1376,1376],"disallowed"],[[1377,1414],"valid"],[[1415,1415],"mapped",[1381,1410]],[[1416,1416],"disallowed"],[[1417,1417],"valid",[],"NV8"],[[1418,1418],"valid",[],"NV8"],[[1419,1420],"disallowed"],[[1421,1422],"valid",[],"NV8"],[[1423,1423],"valid",[],"NV8"],[[1424,1424],"disallowed"],[[1425,1441],"valid"],[[1442,1442],"valid"],[[1443,1455],"valid"],[[1456,1465],"valid"],[[1466,1466],"valid"],[[1467,1469],"valid"],[[1470,1470],"valid",[],"NV8"],[[1471,1471],"valid"],[[1472,1472],"valid",[],"NV8"],[[1473,1474],"valid"],[[1475,1475],"valid",[],"NV8"],[[1476,1476],"valid"],[[1477,1477],"valid"],[[1478,1478],"valid",[],"NV8"],[[1479,1479],"valid"],[[1480,1487],"disallowed"],[[1488,1514],"valid"],[[1515,1519],"disallowed"],[[1520,1524],"valid"],[[1525,1535],"disallowed"],[[1536,1539],"disallowed"],[[1540,1540],"disallowed"],[[1541,1541],"disallowed"],[[1542,1546],"valid",[],"NV8"],[[1547,1547],"valid",[],"NV8"],[[1548,1548],"valid",[],"NV8"],[[1549,1551],"valid",[],"NV8"],[[1552,1557],"valid"],[[1558,1562],"valid"],[[1563,1563],"valid",[],"NV8"],[[1564,1564],"disallowed"],[[1565,1565],"disallowed"],[[1566,1566],"valid",[],"NV8"],[[1567,1567],"valid",[],"NV8"],[[1568,1568],"valid"],[[1569,1594],"valid"],[[1595,1599],"valid"],[[1600,1600],"valid",[],"NV8"],[[1601,1618],"valid"],[[1619,1621],"valid"],[[1622,1624],"valid"],[[1625,1630],"valid"],[[1631,1631],"valid"],[[1632,1641],"valid"],[[1642,1645],"valid",[],"NV8"],[[1646,1647],"valid"],[[1648,1652],"valid"],[[1653,1653],"mapped",[1575,1652]],[[1654,1654],"mapped",[1608,1652]],[[1655,1655],"mapped",[1735,1652]],[[1656,1656],"mapped",[1610,1652]],[[1657,1719],"valid"],[[1720,1721],"valid"],[[1722,1726],"valid"],[[1727,1727],"valid"],[[1728,1742],"valid"],[[1743,1743],"valid"],[[1744,1747],"valid"],[[1748,1748],"valid",[],"NV8"],[[1749,1756],"valid"],[[1757,1757],"disallowed"],[[1758,1758],"valid",[],"NV8"],[[1759,1768],"valid"],[[1769,1769],"valid",[],"NV8"],[[1770,1773],"valid"],[[1774,1775],"valid"],[[1776,1785],"valid"],[[1786,1790],"valid"],[[1791,1791],"valid"],[[1792,1805],"valid",[],"NV8"],[[1806,1806],"disallowed"],[[1807,1807],"disallowed"],[[1808,1836],"valid"],[[1837,1839],"valid"],[[1840,1866],"valid"],[[1867,1868],"disallowed"],[[1869,1871],"valid"],[[1872,1901],"valid"],[[1902,1919],"valid"],[[1920,1968],"valid"],[[1969,1969],"valid"],[[1970,1983],"disallowed"],[[1984,2037],"valid"],[[2038,2042],"valid",[],"NV8"],[[2043,2047],"disallowed"],[[2048,2093],"valid"],[[2094,2095],"disallowed"],[[2096,2110],"valid",[],"NV8"],[[2111,2111],"disallowed"],[[2112,2139],"valid"],[[2140,2141],"disallowed"],[[2142,2142],"valid",[],"NV8"],[[2143,2207],"disallowed"],[[2208,2208],"valid"],[[2209,2209],"valid"],[[2210,2220],"valid"],[[2221,2226],"valid"],[[2227,2228],"valid"],[[2229,2274],"disallowed"],[[2275,2275],"valid"],[[2276,2302],"valid"],[[2303,2303],"valid"],[[2304,2304],"valid"],[[2305,2307],"valid"],[[2308,2308],"valid"],[[2309,2361],"valid"],[[2362,2363],"valid"],[[2364,2381],"valid"],[[2382,2382],"valid"],[[2383,2383],"valid"],[[2384,2388],"valid"],[[2389,2389],"valid"],[[2390,2391],"valid"],[[2392,2392],"mapped",[2325,2364]],[[2393,2393],"mapped",[2326,2364]],[[2394,2394],"mapped",[2327,2364]],[[2395,2395],"mapped",[2332,2364]],[[2396,2396],"mapped",[2337,2364]],[[2397,2397],"mapped",[2338,2364]],[[2398,2398],"mapped",[2347,2364]],[[2399,2399],"mapped",[2351,2364]],[[2400,2403],"valid"],[[2404,2405],"valid",[],"NV8"],[[2406,2415],"valid"],[[2416,2416],"valid",[],"NV8"],[[2417,2418],"valid"],[[2419,2423],"valid"],[[2424,2424],"valid"],[[2425,2426],"valid"],[[2427,2428],"valid"],[[2429,2429],"valid"],[[2430,2431],"valid"],[[2432,2432],"valid"],[[2433,2435],"valid"],[[2436,2436],"disallowed"],[[2437,2444],"valid"],[[2445,2446],"disallowed"],[[2447,2448],"valid"],[[2449,2450],"disallowed"],[[2451,2472],"valid"],[[2473,2473],"disallowed"],[[2474,2480],"valid"],[[2481,2481],"disallowed"],[[2482,2482],"valid"],[[2483,2485],"disallowed"],[[2486,2489],"valid"],[[2490,2491],"disallowed"],[[2492,2492],"valid"],[[2493,2493],"valid"],[[2494,2500],"valid"],[[2501,2502],"disallowed"],[[2503,2504],"valid"],[[2505,2506],"disallowed"],[[2507,2509],"valid"],[[2510,2510],"valid"],[[2511,2518],"disallowed"],[[2519,2519],"valid"],[[2520,2523],"disallowed"],[[2524,2524],"mapped",[2465,2492]],[[2525,2525],"mapped",[2466,2492]],[[2526,2526],"disallowed"],[[2527,2527],"mapped",[2479,2492]],[[2528,2531],"valid"],[[2532,2533],"disallowed"],[[2534,2545],"valid"],[[2546,2554],"valid",[],"NV8"],[[2555,2555],"valid",[],"NV8"],[[2556,2560],"disallowed"],[[2561,2561],"valid"],[[2562,2562],"valid"],[[2563,2563],"valid"],[[2564,2564],"disallowed"],[[2565,2570],"valid"],[[2571,2574],"disallowed"],[[2575,2576],"valid"],[[2577,2578],"disallowed"],[[2579,2600],"valid"],[[2601,2601],"disallowed"],[[2602,2608],"valid"],[[2609,2609],"disallowed"],[[2610,2610],"valid"],[[2611,2611],"mapped",[2610,2620]],[[2612,2612],"disallowed"],[[2613,2613],"valid"],[[2614,2614],"mapped",[2616,2620]],[[2615,2615],"disallowed"],[[2616,2617],"valid"],[[2618,2619],"disallowed"],[[2620,2620],"valid"],[[2621,2621],"disallowed"],[[2622,2626],"valid"],[[2627,2630],"disallowed"],[[2631,2632],"valid"],[[2633,2634],"disallowed"],[[2635,2637],"valid"],[[2638,2640],"disallowed"],[[2641,2641],"valid"],[[2642,2648],"disallowed"],[[2649,2649],"mapped",[2582,2620]],[[2650,2650],"mapped",[2583,2620]],[[2651,2651],"mapped",[2588,2620]],[[2652,2652],"valid"],[[2653,2653],"disallowed"],[[2654,2654],"mapped",[2603,2620]],[[2655,2661],"disallowed"],[[2662,2676],"valid"],[[2677,2677],"valid"],[[2678,2688],"disallowed"],[[2689,2691],"valid"],[[2692,2692],"disallowed"],[[2693,2699],"valid"],[[2700,2700],"valid"],[[2701,2701],"valid"],[[2702,2702],"disallowed"],[[2703,2705],"valid"],[[2706,2706],"disallowed"],[[2707,2728],"valid"],[[2729,2729],"disallowed"],[[2730,2736],"valid"],[[2737,2737],"disallowed"],[[2738,2739],"valid"],[[2740,2740],"disallowed"],[[2741,2745],"valid"],[[2746,2747],"disallowed"],[[2748,2757],"valid"],[[2758,2758],"disallowed"],[[2759,2761],"valid"],[[2762,2762],"disallowed"],[[2763,2765],"valid"],[[2766,2767],"disallowed"],[[2768,2768],"valid"],[[2769,2783],"disallowed"],[[2784,2784],"valid"],[[2785,2787],"valid"],[[2788,2789],"disallowed"],[[2790,2799],"valid"],[[2800,2800],"valid",[],"NV8"],[[2801,2801],"valid",[],"NV8"],[[2802,2808],"disallowed"],[[2809,2809],"valid"],[[2810,2816],"disallowed"],[[2817,2819],"valid"],[[2820,2820],"disallowed"],[[2821,2828],"valid"],[[2829,2830],"disallowed"],[[2831,2832],"valid"],[[2833,2834],"disallowed"],[[2835,2856],"valid"],[[2857,2857],"disallowed"],[[2858,2864],"valid"],[[2865,2865],"disallowed"],[[2866,2867],"valid"],[[2868,2868],"disallowed"],[[2869,2869],"valid"],[[2870,2873],"valid"],[[2874,2875],"disallowed"],[[2876,2883],"valid"],[[2884,2884],"valid"],[[2885,2886],"disallowed"],[[2887,2888],"valid"],[[2889,2890],"disallowed"],[[2891,2893],"valid"],[[2894,2901],"disallowed"],[[2902,2903],"valid"],[[2904,2907],"disallowed"],[[2908,2908],"mapped",[2849,2876]],[[2909,2909],"mapped",[2850,2876]],[[2910,2910],"disallowed"],[[2911,2913],"valid"],[[2914,2915],"valid"],[[2916,2917],"disallowed"],[[2918,2927],"valid"],[[2928,2928],"valid",[],"NV8"],[[2929,2929],"valid"],[[2930,2935],"valid",[],"NV8"],[[2936,2945],"disallowed"],[[2946,2947],"valid"],[[2948,2948],"disallowed"],[[2949,2954],"valid"],[[2955,2957],"disallowed"],[[2958,2960],"valid"],[[2961,2961],"disallowed"],[[2962,2965],"valid"],[[2966,2968],"disallowed"],[[2969,2970],"valid"],[[2971,2971],"disallowed"],[[2972,2972],"valid"],[[2973,2973],"disallowed"],[[2974,2975],"valid"],[[2976,2978],"disallowed"],[[2979,2980],"valid"],[[2981,2983],"disallowed"],[[2984,2986],"valid"],[[2987,2989],"disallowed"],[[2990,2997],"valid"],[[2998,2998],"valid"],[[2999,3001],"valid"],[[3002,3005],"disallowed"],[[3006,3010],"valid"],[[3011,3013],"disallowed"],[[3014,3016],"valid"],[[3017,3017],"disallowed"],[[3018,3021],"valid"],[[3022,3023],"disallowed"],[[3024,3024],"valid"],[[3025,3030],"disallowed"],[[3031,3031],"valid"],[[3032,3045],"disallowed"],[[3046,3046],"valid"],[[3047,3055],"valid"],[[3056,3058],"valid",[],"NV8"],[[3059,3066],"valid",[],"NV8"],[[3067,3071],"disallowed"],[[3072,3072],"valid"],[[3073,3075],"valid"],[[3076,3076],"disallowed"],[[3077,3084],"valid"],[[3085,3085],"disallowed"],[[3086,3088],"valid"],[[3089,3089],"disallowed"],[[3090,3112],"valid"],[[3113,3113],"disallowed"],[[3114,3123],"valid"],[[3124,3124],"valid"],[[3125,3129],"valid"],[[3130,3132],"disallowed"],[[3133,3133],"valid"],[[3134,3140],"valid"],[[3141,3141],"disallowed"],[[3142,3144],"valid"],[[3145,3145],"disallowed"],[[3146,3149],"valid"],[[3150,3156],"disallowed"],[[3157,3158],"valid"],[[3159,3159],"disallowed"],[[3160,3161],"valid"],[[3162,3162],"valid"],[[3163,3167],"disallowed"],[[3168,3169],"valid"],[[3170,3171],"valid"],[[3172,3173],"disallowed"],[[3174,3183],"valid"],[[3184,3191],"disallowed"],[[3192,3199],"valid",[],"NV8"],[[3200,3200],"disallowed"],[[3201,3201],"valid"],[[3202,3203],"valid"],[[3204,3204],"disallowed"],[[3205,3212],"valid"],[[3213,3213],"disallowed"],[[3214,3216],"valid"],[[3217,3217],"disallowed"],[[3218,3240],"valid"],[[3241,3241],"disallowed"],[[3242,3251],"valid"],[[3252,3252],"disallowed"],[[3253,3257],"valid"],[[3258,3259],"disallowed"],[[3260,3261],"valid"],[[3262,3268],"valid"],[[3269,3269],"disallowed"],[[3270,3272],"valid"],[[3273,3273],"disallowed"],[[3274,3277],"valid"],[[3278,3284],"disallowed"],[[3285,3286],"valid"],[[3287,3293],"disallowed"],[[3294,3294],"valid"],[[3295,3295],"disallowed"],[[3296,3297],"valid"],[[3298,3299],"valid"],[[3300,3301],"disallowed"],[[3302,3311],"valid"],[[3312,3312],"disallowed"],[[3313,3314],"valid"],[[3315,3328],"disallowed"],[[3329,3329],"valid"],[[3330,3331],"valid"],[[3332,3332],"disallowed"],[[3333,3340],"valid"],[[3341,3341],"disallowed"],[[3342,3344],"valid"],[[3345,3345],"disallowed"],[[3346,3368],"valid"],[[3369,3369],"valid"],[[3370,3385],"valid"],[[3386,3386],"valid"],[[3387,3388],"disallowed"],[[3389,3389],"valid"],[[3390,3395],"valid"],[[3396,3396],"valid"],[[3397,3397],"disallowed"],[[3398,3400],"valid"],[[3401,3401],"disallowed"],[[3402,3405],"valid"],[[3406,3406],"valid"],[[3407,3414],"disallowed"],[[3415,3415],"valid"],[[3416,3422],"disallowed"],[[3423,3423],"valid"],[[3424,3425],"valid"],[[3426,3427],"valid"],[[3428,3429],"disallowed"],[[3430,3439],"valid"],[[3440,3445],"valid",[],"NV8"],[[3446,3448],"disallowed"],[[3449,3449],"valid",[],"NV8"],[[3450,3455],"valid"],[[3456,3457],"disallowed"],[[3458,3459],"valid"],[[3460,3460],"disallowed"],[[3461,3478],"valid"],[[3479,3481],"disallowed"],[[3482,3505],"valid"],[[3506,3506],"disallowed"],[[3507,3515],"valid"],[[3516,3516],"disallowed"],[[3517,3517],"valid"],[[3518,3519],"disallowed"],[[3520,3526],"valid"],[[3527,3529],"disallowed"],[[3530,3530],"valid"],[[3531,3534],"disallowed"],[[3535,3540],"valid"],[[3541,3541],"disallowed"],[[3542,3542],"valid"],[[3543,3543],"disallowed"],[[3544,3551],"valid"],[[3552,3557],"disallowed"],[[3558,3567],"valid"],[[3568,3569],"disallowed"],[[3570,3571],"valid"],[[3572,3572],"valid",[],"NV8"],[[3573,3584],"disallowed"],[[3585,3634],"valid"],[[3635,3635],"mapped",[3661,3634]],[[3636,3642],"valid"],[[3643,3646],"disallowed"],[[3647,3647],"valid",[],"NV8"],[[3648,3662],"valid"],[[3663,3663],"valid",[],"NV8"],[[3664,3673],"valid"],[[3674,3675],"valid",[],"NV8"],[[3676,3712],"disallowed"],[[3713,3714],"valid"],[[3715,3715],"disallowed"],[[3716,3716],"valid"],[[3717,3718],"disallowed"],[[3719,3720],"valid"],[[3721,3721],"disallowed"],[[3722,3722],"valid"],[[3723,3724],"disallowed"],[[3725,3725],"valid"],[[3726,3731],"disallowed"],[[3732,3735],"valid"],[[3736,3736],"disallowed"],[[3737,3743],"valid"],[[3744,3744],"disallowed"],[[3745,3747],"valid"],[[3748,3748],"disallowed"],[[3749,3749],"valid"],[[3750,3750],"disallowed"],[[3751,3751],"valid"],[[3752,3753],"disallowed"],[[3754,3755],"valid"],[[3756,3756],"disallowed"],[[3757,3762],"valid"],[[3763,3763],"mapped",[3789,3762]],[[3764,3769],"valid"],[[3770,3770],"disallowed"],[[3771,3773],"valid"],[[3774,3775],"disallowed"],[[3776,3780],"valid"],[[3781,3781],"disallowed"],[[3782,3782],"valid"],[[3783,3783],"disallowed"],[[3784,3789],"valid"],[[3790,3791],"disallowed"],[[3792,3801],"valid"],[[3802,3803],"disallowed"],[[3804,3804],"mapped",[3755,3737]],[[3805,3805],"mapped",[3755,3745]],[[3806,3807],"valid"],[[3808,3839],"disallowed"],[[3840,3840],"valid"],[[3841,3850],"valid",[],"NV8"],[[3851,3851],"valid"],[[3852,3852],"mapped",[3851]],[[3853,3863],"valid",[],"NV8"],[[3864,3865],"valid"],[[3866,3871],"valid",[],"NV8"],[[3872,3881],"valid"],[[3882,3892],"valid",[],"NV8"],[[3893,3893],"valid"],[[3894,3894],"valid",[],"NV8"],[[3895,3895],"valid"],[[3896,3896],"valid",[],"NV8"],[[3897,3897],"valid"],[[3898,3901],"valid",[],"NV8"],[[3902,3906],"valid"],[[3907,3907],"mapped",[3906,4023]],[[3908,3911],"valid"],[[3912,3912],"disallowed"],[[3913,3916],"valid"],[[3917,3917],"mapped",[3916,4023]],[[3918,3921],"valid"],[[3922,3922],"mapped",[3921,4023]],[[3923,3926],"valid"],[[3927,3927],"mapped",[3926,4023]],[[3928,3931],"valid"],[[3932,3932],"mapped",[3931,4023]],[[3933,3944],"valid"],[[3945,3945],"mapped",[3904,4021]],[[3946,3946],"valid"],[[3947,3948],"valid"],[[3949,3952],"disallowed"],[[3953,3954],"valid"],[[3955,3955],"mapped",[3953,3954]],[[3956,3956],"valid"],[[3957,3957],"mapped",[3953,3956]],[[3958,3958],"mapped",[4018,3968]],[[3959,3959],"mapped",[4018,3953,3968]],[[3960,3960],"mapped",[4019,3968]],[[3961,3961],"mapped",[4019,3953,3968]],[[3962,3968],"valid"],[[3969,3969],"mapped",[3953,3968]],[[3970,3972],"valid"],[[3973,3973],"valid",[],"NV8"],[[3974,3979],"valid"],[[3980,3983],"valid"],[[3984,3986],"valid"],[[3987,3987],"mapped",[3986,4023]],[[3988,3989],"valid"],[[3990,3990],"valid"],[[3991,3991],"valid"],[[3992,3992],"disallowed"],[[3993,3996],"valid"],[[3997,3997],"mapped",[3996,4023]],[[3998,4001],"valid"],[[4002,4002],"mapped",[4001,4023]],[[4003,4006],"valid"],[[4007,4007],"mapped",[4006,4023]],[[4008,4011],"valid"],[[4012,4012],"mapped",[4011,4023]],[[4013,4013],"valid"],[[4014,4016],"valid"],[[4017,4023],"valid"],[[4024,4024],"valid"],[[4025,4025],"mapped",[3984,4021]],[[4026,4028],"valid"],[[4029,4029],"disallowed"],[[4030,4037],"valid",[],"NV8"],[[4038,4038],"valid"],[[4039,4044],"valid",[],"NV8"],[[4045,4045],"disallowed"],[[4046,4046],"valid",[],"NV8"],[[4047,4047],"valid",[],"NV8"],[[4048,4049],"valid",[],"NV8"],[[4050,4052],"valid",[],"NV8"],[[4053,4056],"valid",[],"NV8"],[[4057,4058],"valid",[],"NV8"],[[4059,4095],"disallowed"],[[4096,4129],"valid"],[[4130,4130],"valid"],[[4131,4135],"valid"],[[4136,4136],"valid"],[[4137,4138],"valid"],[[4139,4139],"valid"],[[4140,4146],"valid"],[[4147,4149],"valid"],[[4150,4153],"valid"],[[4154,4159],"valid"],[[4160,4169],"valid"],[[4170,4175],"valid",[],"NV8"],[[4176,4185],"valid"],[[4186,4249],"valid"],[[4250,4253],"valid"],[[4254,4255],"valid",[],"NV8"],[[4256,4293],"disallowed"],[[4294,4294],"disallowed"],[[4295,4295],"mapped",[11559]],[[4296,4300],"disallowed"],[[4301,4301],"mapped",[11565]],[[4302,4303],"disallowed"],[[4304,4342],"valid"],[[4343,4344],"valid"],[[4345,4346],"valid"],[[4347,4347],"valid",[],"NV8"],[[4348,4348],"mapped",[4316]],[[4349,4351],"valid"],[[4352,4441],"valid",[],"NV8"],[[4442,4446],"valid",[],"NV8"],[[4447,4448],"disallowed"],[[4449,4514],"valid",[],"NV8"],[[4515,4519],"valid",[],"NV8"],[[4520,4601],"valid",[],"NV8"],[[4602,4607],"valid",[],"NV8"],[[4608,4614],"valid"],[[4615,4615],"valid"],[[4616,4678],"valid"],[[4679,4679],"valid"],[[4680,4680],"valid"],[[4681,4681],"disallowed"],[[4682,4685],"valid"],[[4686,4687],"disallowed"],[[4688,4694],"valid"],[[4695,4695],"disallowed"],[[4696,4696],"valid"],[[4697,4697],"disallowed"],[[4698,4701],"valid"],[[4702,4703],"disallowed"],[[4704,4742],"valid"],[[4743,4743],"valid"],[[4744,4744],"valid"],[[4745,4745],"disallowed"],[[4746,4749],"valid"],[[4750,4751],"disallowed"],[[4752,4782],"valid"],[[4783,4783],"valid"],[[4784,4784],"valid"],[[4785,4785],"disallowed"],[[4786,4789],"valid"],[[4790,4791],"disallowed"],[[4792,4798],"valid"],[[4799,4799],"disallowed"],[[4800,4800],"valid"],[[4801,4801],"disallowed"],[[4802,4805],"valid"],[[4806,4807],"disallowed"],[[4808,4814],"valid"],[[4815,4815],"valid"],[[4816,4822],"valid"],[[4823,4823],"disallowed"],[[4824,4846],"valid"],[[4847,4847],"valid"],[[4848,4878],"valid"],[[4879,4879],"valid"],[[4880,4880],"valid"],[[4881,4881],"disallowed"],[[4882,4885],"valid"],[[4886,4887],"disallowed"],[[4888,4894],"valid"],[[4895,4895],"valid"],[[4896,4934],"valid"],[[4935,4935],"valid"],[[4936,4954],"valid"],[[4955,4956],"disallowed"],[[4957,4958],"valid"],[[4959,4959],"valid"],[[4960,4960],"valid",[],"NV8"],[[4961,4988],"valid",[],"NV8"],[[4989,4991],"disallowed"],[[4992,5007],"valid"],[[5008,5017],"valid",[],"NV8"],[[5018,5023],"disallowed"],[[5024,5108],"valid"],[[5109,5109],"valid"],[[5110,5111],"disallowed"],[[5112,5112],"mapped",[5104]],[[5113,5113],"mapped",[5105]],[[5114,5114],"mapped",[5106]],[[5115,5115],"mapped",[5107]],[[5116,5116],"mapped",[5108]],[[5117,5117],"mapped",[5109]],[[5118,5119],"disallowed"],[[5120,5120],"valid",[],"NV8"],[[5121,5740],"valid"],[[5741,5742],"valid",[],"NV8"],[[5743,5750],"valid"],[[5751,5759],"valid"],[[5760,5760],"disallowed"],[[5761,5786],"valid"],[[5787,5788],"valid",[],"NV8"],[[5789,5791],"disallowed"],[[5792,5866],"valid"],[[5867,5872],"valid",[],"NV8"],[[5873,5880],"valid"],[[5881,5887],"disallowed"],[[5888,5900],"valid"],[[5901,5901],"disallowed"],[[5902,5908],"valid"],[[5909,5919],"disallowed"],[[5920,5940],"valid"],[[5941,5942],"valid",[],"NV8"],[[5943,5951],"disallowed"],[[5952,5971],"valid"],[[5972,5983],"disallowed"],[[5984,5996],"valid"],[[5997,5997],"disallowed"],[[5998,6000],"valid"],[[6001,6001],"disallowed"],[[6002,6003],"valid"],[[6004,6015],"disallowed"],[[6016,6067],"valid"],[[6068,6069],"disallowed"],[[6070,6099],"valid"],[[6100,6102],"valid",[],"NV8"],[[6103,6103],"valid"],[[6104,6107],"valid",[],"NV8"],[[6108,6108],"valid"],[[6109,6109],"valid"],[[6110,6111],"disallowed"],[[6112,6121],"valid"],[[6122,6127],"disallowed"],[[6128,6137],"valid",[],"NV8"],[[6138,6143],"disallowed"],[[6144,6149],"valid",[],"NV8"],[[6150,6150],"disallowed"],[[6151,6154],"valid",[],"NV8"],[[6155,6157],"ignored"],[[6158,6158],"disallowed"],[[6159,6159],"disallowed"],[[6160,6169],"valid"],[[6170,6175],"disallowed"],[[6176,6263],"valid"],[[6264,6271],"disallowed"],[[6272,6313],"valid"],[[6314,6314],"valid"],[[6315,6319],"disallowed"],[[6320,6389],"valid"],[[6390,6399],"disallowed"],[[6400,6428],"valid"],[[6429,6430],"valid"],[[6431,6431],"disallowed"],[[6432,6443],"valid"],[[6444,6447],"disallowed"],[[6448,6459],"valid"],[[6460,6463],"disallowed"],[[6464,6464],"valid",[],"NV8"],[[6465,6467],"disallowed"],[[6468,6469],"valid",[],"NV8"],[[6470,6509],"valid"],[[6510,6511],"disallowed"],[[6512,6516],"valid"],[[6517,6527],"disallowed"],[[6528,6569],"valid"],[[6570,6571],"valid"],[[6572,6575],"disallowed"],[[6576,6601],"valid"],[[6602,6607],"disallowed"],[[6608,6617],"valid"],[[6618,6618],"valid",[],"XV8"],[[6619,6621],"disallowed"],[[6622,6623],"valid",[],"NV8"],[[6624,6655],"valid",[],"NV8"],[[6656,6683],"valid"],[[6684,6685],"disallowed"],[[6686,6687],"valid",[],"NV8"],[[6688,6750],"valid"],[[6751,6751],"disallowed"],[[6752,6780],"valid"],[[6781,6782],"disallowed"],[[6783,6793],"valid"],[[6794,6799],"disallowed"],[[6800,6809],"valid"],[[6810,6815],"disallowed"],[[6816,6822],"valid",[],"NV8"],[[6823,6823],"valid"],[[6824,6829],"valid",[],"NV8"],[[6830,6831],"disallowed"],[[6832,6845],"valid"],[[6846,6846],"valid",[],"NV8"],[[6847,6911],"disallowed"],[[6912,6987],"valid"],[[6988,6991],"disallowed"],[[6992,7001],"valid"],[[7002,7018],"valid",[],"NV8"],[[7019,7027],"valid"],[[7028,7036],"valid",[],"NV8"],[[7037,7039],"disallowed"],[[7040,7082],"valid"],[[7083,7085],"valid"],[[7086,7097],"valid"],[[7098,7103],"valid"],[[7104,7155],"valid"],[[7156,7163],"disallowed"],[[7164,7167],"valid",[],"NV8"],[[7168,7223],"valid"],[[7224,7226],"disallowed"],[[7227,7231],"valid",[],"NV8"],[[7232,7241],"valid"],[[7242,7244],"disallowed"],[[7245,7293],"valid"],[[7294,7295],"valid",[],"NV8"],[[7296,7359],"disallowed"],[[7360,7367],"valid",[],"NV8"],[[7368,7375],"disallowed"],[[7376,7378],"valid"],[[7379,7379],"valid",[],"NV8"],[[7380,7410],"valid"],[[7411,7414],"valid"],[[7415,7415],"disallowed"],[[7416,7417],"valid"],[[7418,7423],"disallowed"],[[7424,7467],"valid"],[[7468,7468],"mapped",[97]],[[7469,7469],"mapped",[230]],[[7470,7470],"mapped",[98]],[[7471,7471],"valid"],[[7472,7472],"mapped",[100]],[[7473,7473],"mapped",[101]],[[7474,7474],"mapped",[477]],[[7475,7475],"mapped",[103]],[[7476,7476],"mapped",[104]],[[7477,7477],"mapped",[105]],[[7478,7478],"mapped",[106]],[[7479,7479],"mapped",[107]],[[7480,7480],"mapped",[108]],[[7481,7481],"mapped",[109]],[[7482,7482],"mapped",[110]],[[7483,7483],"valid"],[[7484,7484],"mapped",[111]],[[7485,7485],"mapped",[547]],[[7486,7486],"mapped",[112]],[[7487,7487],"mapped",[114]],[[7488,7488],"mapped",[116]],[[7489,7489],"mapped",[117]],[[7490,7490],"mapped",[119]],[[7491,7491],"mapped",[97]],[[7492,7492],"mapped",[592]],[[7493,7493],"mapped",[593]],[[7494,7494],"mapped",[7426]],[[7495,7495],"mapped",[98]],[[7496,7496],"mapped",[100]],[[7497,7497],"mapped",[101]],[[7498,7498],"mapped",[601]],[[7499,7499],"mapped",[603]],[[7500,7500],"mapped",[604]],[[7501,7501],"mapped",[103]],[[7502,7502],"valid"],[[7503,7503],"mapped",[107]],[[7504,7504],"mapped",[109]],[[7505,7505],"mapped",[331]],[[7506,7506],"mapped",[111]],[[7507,7507],"mapped",[596]],[[7508,7508],"mapped",[7446]],[[7509,7509],"mapped",[7447]],[[7510,7510],"mapped",[112]],[[7511,7511],"mapped",[116]],[[7512,7512],"mapped",[117]],[[7513,7513],"mapped",[7453]],[[7514,7514],"mapped",[623]],[[7515,7515],"mapped",[118]],[[7516,7516],"mapped",[7461]],[[7517,7517],"mapped",[946]],[[7518,7518],"mapped",[947]],[[7519,7519],"mapped",[948]],[[7520,7520],"mapped",[966]],[[7521,7521],"mapped",[967]],[[7522,7522],"mapped",[105]],[[7523,7523],"mapped",[114]],[[7524,7524],"mapped",[117]],[[7525,7525],"mapped",[118]],[[7526,7526],"mapped",[946]],[[7527,7527],"mapped",[947]],[[7528,7528],"mapped",[961]],[[7529,7529],"mapped",[966]],[[7530,7530],"mapped",[967]],[[7531,7531],"valid"],[[7532,7543],"valid"],[[7544,7544],"mapped",[1085]],[[7545,7578],"valid"],[[7579,7579],"mapped",[594]],[[7580,7580],"mapped",[99]],[[7581,7581],"mapped",[597]],[[7582,7582],"mapped",[240]],[[7583,7583],"mapped",[604]],[[7584,7584],"mapped",[102]],[[7585,7585],"mapped",[607]],[[7586,7586],"mapped",[609]],[[7587,7587],"mapped",[613]],[[7588,7588],"mapped",[616]],[[7589,7589],"mapped",[617]],[[7590,7590],"mapped",[618]],[[7591,7591],"mapped",[7547]],[[7592,7592],"mapped",[669]],[[7593,7593],"mapped",[621]],[[7594,7594],"mapped",[7557]],[[7595,7595],"mapped",[671]],[[7596,7596],"mapped",[625]],[[7597,7597],"mapped",[624]],[[7598,7598],"mapped",[626]],[[7599,7599],"mapped",[627]],[[7600,7600],"mapped",[628]],[[7601,7601],"mapped",[629]],[[7602,7602],"mapped",[632]],[[7603,7603],"mapped",[642]],[[7604,7604],"mapped",[643]],[[7605,7605],"mapped",[427]],[[7606,7606],"mapped",[649]],[[7607,7607],"mapped",[650]],[[7608,7608],"mapped",[7452]],[[7609,7609],"mapped",[651]],[[7610,7610],"mapped",[652]],[[7611,7611],"mapped",[122]],[[7612,7612],"mapped",[656]],[[7613,7613],"mapped",[657]],[[7614,7614],"mapped",[658]],[[7615,7615],"mapped",[952]],[[7616,7619],"valid"],[[7620,7626],"valid"],[[7627,7654],"valid"],[[7655,7669],"valid"],[[7670,7675],"disallowed"],[[7676,7676],"valid"],[[7677,7677],"valid"],[[7678,7679],"valid"],[[7680,7680],"mapped",[7681]],[[7681,7681],"valid"],[[7682,7682],"mapped",[7683]],[[7683,7683],"valid"],[[7684,7684],"mapped",[7685]],[[7685,7685],"valid"],[[7686,7686],"mapped",[7687]],[[7687,7687],"valid"],[[7688,7688],"mapped",[7689]],[[7689,7689],"valid"],[[7690,7690],"mapped",[7691]],[[7691,7691],"valid"],[[7692,7692],"mapped",[7693]],[[7693,7693],"valid"],[[7694,7694],"mapped",[7695]],[[7695,7695],"valid"],[[7696,7696],"mapped",[7697]],[[7697,7697],"valid"],[[7698,7698],"mapped",[7699]],[[7699,7699],"valid"],[[7700,7700],"mapped",[7701]],[[7701,7701],"valid"],[[7702,7702],"mapped",[7703]],[[7703,7703],"valid"],[[7704,7704],"mapped",[7705]],[[7705,7705],"valid"],[[7706,7706],"mapped",[7707]],[[7707,7707],"valid"],[[7708,7708],"mapped",[7709]],[[7709,7709],"valid"],[[7710,7710],"mapped",[7711]],[[7711,7711],"valid"],[[7712,7712],"mapped",[7713]],[[7713,7713],"valid"],[[7714,7714],"mapped",[7715]],[[7715,7715],"valid"],[[7716,7716],"mapped",[7717]],[[7717,7717],"valid"],[[7718,7718],"mapped",[7719]],[[7719,7719],"valid"],[[7720,7720],"mapped",[7721]],[[7721,7721],"valid"],[[7722,7722],"mapped",[7723]],[[7723,7723],"valid"],[[7724,7724],"mapped",[7725]],[[7725,7725],"valid"],[[7726,7726],"mapped",[7727]],[[7727,7727],"valid"],[[7728,7728],"mapped",[7729]],[[7729,7729],"valid"],[[7730,7730],"mapped",[7731]],[[7731,7731],"valid"],[[7732,7732],"mapped",[7733]],[[7733,7733],"valid"],[[7734,7734],"mapped",[7735]],[[7735,7735],"valid"],[[7736,7736],"mapped",[7737]],[[7737,7737],"valid"],[[7738,7738],"mapped",[7739]],[[7739,7739],"valid"],[[7740,7740],"mapped",[7741]],[[7741,7741],"valid"],[[7742,7742],"mapped",[7743]],[[7743,7743],"valid"],[[7744,7744],"mapped",[7745]],[[7745,7745],"valid"],[[7746,7746],"mapped",[7747]],[[7747,7747],"valid"],[[7748,7748],"mapped",[7749]],[[7749,7749],"valid"],[[7750,7750],"mapped",[7751]],[[7751,7751],"valid"],[[7752,7752],"mapped",[7753]],[[7753,7753],"valid"],[[7754,7754],"mapped",[7755]],[[7755,7755],"valid"],[[7756,7756],"mapped",[7757]],[[7757,7757],"valid"],[[7758,7758],"mapped",[7759]],[[7759,7759],"valid"],[[7760,7760],"mapped",[7761]],[[7761,7761],"valid"],[[7762,7762],"mapped",[7763]],[[7763,7763],"valid"],[[7764,7764],"mapped",[7765]],[[7765,7765],"valid"],[[7766,7766],"mapped",[7767]],[[7767,7767],"valid"],[[7768,7768],"mapped",[7769]],[[7769,7769],"valid"],[[7770,7770],"mapped",[7771]],[[7771,7771],"valid"],[[7772,7772],"mapped",[7773]],[[7773,7773],"valid"],[[7774,7774],"mapped",[7775]],[[7775,7775],"valid"],[[7776,7776],"mapped",[7777]],[[7777,7777],"valid"],[[7778,7778],"mapped",[7779]],[[7779,7779],"valid"],[[7780,7780],"mapped",[7781]],[[7781,7781],"valid"],[[7782,7782],"mapped",[7783]],[[7783,7783],"valid"],[[7784,7784],"mapped",[7785]],[[7785,7785],"valid"],[[7786,7786],"mapped",[7787]],[[7787,7787],"valid"],[[7788,7788],"mapped",[7789]],[[7789,7789],"valid"],[[7790,7790],"mapped",[7791]],[[7791,7791],"valid"],[[7792,7792],"mapped",[7793]],[[7793,7793],"valid"],[[7794,7794],"mapped",[7795]],[[7795,7795],"valid"],[[7796,7796],"mapped",[7797]],[[7797,7797],"valid"],[[7798,7798],"mapped",[7799]],[[7799,7799],"valid"],[[7800,7800],"mapped",[7801]],[[7801,7801],"valid"],[[7802,7802],"mapped",[7803]],[[7803,7803],"valid"],[[7804,7804],"mapped",[7805]],[[7805,7805],"valid"],[[7806,7806],"mapped",[7807]],[[7807,7807],"valid"],[[7808,7808],"mapped",[7809]],[[7809,7809],"valid"],[[7810,7810],"mapped",[7811]],[[7811,7811],"valid"],[[7812,7812],"mapped",[7813]],[[7813,7813],"valid"],[[7814,7814],"mapped",[7815]],[[7815,7815],"valid"],[[7816,7816],"mapped",[7817]],[[7817,7817],"valid"],[[7818,7818],"mapped",[7819]],[[7819,7819],"valid"],[[7820,7820],"mapped",[7821]],[[7821,7821],"valid"],[[7822,7822],"mapped",[7823]],[[7823,7823],"valid"],[[7824,7824],"mapped",[7825]],[[7825,7825],"valid"],[[7826,7826],"mapped",[7827]],[[7827,7827],"valid"],[[7828,7828],"mapped",[7829]],[[7829,7833],"valid"],[[7834,7834],"mapped",[97,702]],[[7835,7835],"mapped",[7777]],[[7836,7837],"valid"],[[7838,7838],"mapped",[115,115]],[[7839,7839],"valid"],[[7840,7840],"mapped",[7841]],[[7841,7841],"valid"],[[7842,7842],"mapped",[7843]],[[7843,7843],"valid"],[[7844,7844],"mapped",[7845]],[[7845,7845],"valid"],[[7846,7846],"mapped",[7847]],[[7847,7847],"valid"],[[7848,7848],"mapped",[7849]],[[7849,7849],"valid"],[[7850,7850],"mapped",[7851]],[[7851,7851],"valid"],[[7852,7852],"mapped",[7853]],[[7853,7853],"valid"],[[7854,7854],"mapped",[7855]],[[7855,7855],"valid"],[[7856,7856],"mapped",[7857]],[[7857,7857],"valid"],[[7858,7858],"mapped",[7859]],[[7859,7859],"valid"],[[7860,7860],"mapped",[7861]],[[7861,7861],"valid"],[[7862,7862],"mapped",[7863]],[[7863,7863],"valid"],[[7864,7864],"mapped",[7865]],[[7865,7865],"valid"],[[7866,7866],"mapped",[7867]],[[7867,7867],"valid"],[[7868,7868],"mapped",[7869]],[[7869,7869],"valid"],[[7870,7870],"mapped",[7871]],[[7871,7871],"valid"],[[7872,7872],"mapped",[7873]],[[7873,7873],"valid"],[[7874,7874],"mapped",[7875]],[[7875,7875],"valid"],[[7876,7876],"mapped",[7877]],[[7877,7877],"valid"],[[7878,7878],"mapped",[7879]],[[7879,7879],"valid"],[[7880,7880],"mapped",[7881]],[[7881,7881],"valid"],[[7882,7882],"mapped",[7883]],[[7883,7883],"valid"],[[7884,7884],"mapped",[7885]],[[7885,7885],"valid"],[[7886,7886],"mapped",[7887]],[[7887,7887],"valid"],[[7888,7888],"mapped",[7889]],[[7889,7889],"valid"],[[7890,7890],"mapped",[7891]],[[7891,7891],"valid"],[[7892,7892],"mapped",[7893]],[[7893,7893],"valid"],[[7894,7894],"mapped",[7895]],[[7895,7895],"valid"],[[7896,7896],"mapped",[7897]],[[7897,7897],"valid"],[[7898,7898],"mapped",[7899]],[[7899,7899],"valid"],[[7900,7900],"mapped",[7901]],[[7901,7901],"valid"],[[7902,7902],"mapped",[7903]],[[7903,7903],"valid"],[[7904,7904],"mapped",[7905]],[[7905,7905],"valid"],[[7906,7906],"mapped",[7907]],[[7907,7907],"valid"],[[7908,7908],"mapped",[7909]],[[7909,7909],"valid"],[[7910,7910],"mapped",[7911]],[[7911,7911],"valid"],[[7912,7912],"mapped",[7913]],[[7913,7913],"valid"],[[7914,7914],"mapped",[7915]],[[7915,7915],"valid"],[[7916,7916],"mapped",[7917]],[[7917,7917],"valid"],[[7918,7918],"mapped",[7919]],[[7919,7919],"valid"],[[7920,7920],"mapped",[7921]],[[7921,7921],"valid"],[[7922,7922],"mapped",[7923]],[[7923,7923],"valid"],[[7924,7924],"mapped",[7925]],[[7925,7925],"valid"],[[7926,7926],"mapped",[7927]],[[7927,7927],"valid"],[[7928,7928],"mapped",[7929]],[[7929,7929],"valid"],[[7930,7930],"mapped",[7931]],[[7931,7931],"valid"],[[7932,7932],"mapped",[7933]],[[7933,7933],"valid"],[[7934,7934],"mapped",[7935]],[[7935,7935],"valid"],[[7936,7943],"valid"],[[7944,7944],"mapped",[7936]],[[7945,7945],"mapped",[7937]],[[7946,7946],"mapped",[7938]],[[7947,7947],"mapped",[7939]],[[7948,7948],"mapped",[7940]],[[7949,7949],"mapped",[7941]],[[7950,7950],"mapped",[7942]],[[7951,7951],"mapped",[7943]],[[7952,7957],"valid"],[[7958,7959],"disallowed"],[[7960,7960],"mapped",[7952]],[[7961,7961],"mapped",[7953]],[[7962,7962],"mapped",[7954]],[[7963,7963],"mapped",[7955]],[[7964,7964],"mapped",[7956]],[[7965,7965],"mapped",[7957]],[[7966,7967],"disallowed"],[[7968,7975],"valid"],[[7976,7976],"mapped",[7968]],[[7977,7977],"mapped",[7969]],[[7978,7978],"mapped",[7970]],[[7979,7979],"mapped",[7971]],[[7980,7980],"mapped",[7972]],[[7981,7981],"mapped",[7973]],[[7982,7982],"mapped",[7974]],[[7983,7983],"mapped",[7975]],[[7984,7991],"valid"],[[7992,7992],"mapped",[7984]],[[7993,7993],"mapped",[7985]],[[7994,7994],"mapped",[7986]],[[7995,7995],"mapped",[7987]],[[7996,7996],"mapped",[7988]],[[7997,7997],"mapped",[7989]],[[7998,7998],"mapped",[7990]],[[7999,7999],"mapped",[7991]],[[8000,8005],"valid"],[[8006,8007],"disallowed"],[[8008,8008],"mapped",[8000]],[[8009,8009],"mapped",[8001]],[[8010,8010],"mapped",[8002]],[[8011,8011],"mapped",[8003]],[[8012,8012],"mapped",[8004]],[[8013,8013],"mapped",[8005]],[[8014,8015],"disallowed"],[[8016,8023],"valid"],[[8024,8024],"disallowed"],[[8025,8025],"mapped",[8017]],[[8026,8026],"disallowed"],[[8027,8027],"mapped",[8019]],[[8028,8028],"disallowed"],[[8029,8029],"mapped",[8021]],[[8030,8030],"disallowed"],[[8031,8031],"mapped",[8023]],[[8032,8039],"valid"],[[8040,8040],"mapped",[8032]],[[8041,8041],"mapped",[8033]],[[8042,8042],"mapped",[8034]],[[8043,8043],"mapped",[8035]],[[8044,8044],"mapped",[8036]],[[8045,8045],"mapped",[8037]],[[8046,8046],"mapped",[8038]],[[8047,8047],"mapped",[8039]],[[8048,8048],"valid"],[[8049,8049],"mapped",[940]],[[8050,8050],"valid"],[[8051,8051],"mapped",[941]],[[8052,8052],"valid"],[[8053,8053],"mapped",[942]],[[8054,8054],"valid"],[[8055,8055],"mapped",[943]],[[8056,8056],"valid"],[[8057,8057],"mapped",[972]],[[8058,8058],"valid"],[[8059,8059],"mapped",[973]],[[8060,8060],"valid"],[[8061,8061],"mapped",[974]],[[8062,8063],"disallowed"],[[8064,8064],"mapped",[7936,953]],[[8065,8065],"mapped",[7937,953]],[[8066,8066],"mapped",[7938,953]],[[8067,8067],"mapped",[7939,953]],[[8068,8068],"mapped",[7940,953]],[[8069,8069],"mapped",[7941,953]],[[8070,8070],"mapped",[7942,953]],[[8071,8071],"mapped",[7943,953]],[[8072,8072],"mapped",[7936,953]],[[8073,8073],"mapped",[7937,953]],[[8074,8074],"mapped",[7938,953]],[[8075,8075],"mapped",[7939,953]],[[8076,8076],"mapped",[7940,953]],[[8077,8077],"mapped",[7941,953]],[[8078,8078],"mapped",[7942,953]],[[8079,8079],"mapped",[7943,953]],[[8080,8080],"mapped",[7968,953]],[[8081,8081],"mapped",[7969,953]],[[8082,8082],"mapped",[7970,953]],[[8083,8083],"mapped",[7971,953]],[[8084,8084],"mapped",[7972,953]],[[8085,8085],"mapped",[7973,953]],[[8086,8086],"mapped",[7974,953]],[[8087,8087],"mapped",[7975,953]],[[8088,8088],"mapped",[7968,953]],[[8089,8089],"mapped",[7969,953]],[[8090,8090],"mapped",[7970,953]],[[8091,8091],"mapped",[7971,953]],[[8092,8092],"mapped",[7972,953]],[[8093,8093],"mapped",[7973,953]],[[8094,8094],"mapped",[7974,953]],[[8095,8095],"mapped",[7975,953]],[[8096,8096],"mapped",[8032,953]],[[8097,8097],"mapped",[8033,953]],[[8098,8098],"mapped",[8034,953]],[[8099,8099],"mapped",[8035,953]],[[8100,8100],"mapped",[8036,953]],[[8101,8101],"mapped",[8037,953]],[[8102,8102],"mapped",[8038,953]],[[8103,8103],"mapped",[8039,953]],[[8104,8104],"mapped",[8032,953]],[[8105,8105],"mapped",[8033,953]],[[8106,8106],"mapped",[8034,953]],[[8107,8107],"mapped",[8035,953]],[[8108,8108],"mapped",[8036,953]],[[8109,8109],"mapped",[8037,953]],[[8110,8110],"mapped",[8038,953]],[[8111,8111],"mapped",[8039,953]],[[8112,8113],"valid"],[[8114,8114],"mapped",[8048,953]],[[8115,8115],"mapped",[945,953]],[[8116,8116],"mapped",[940,953]],[[8117,8117],"disallowed"],[[8118,8118],"valid"],[[8119,8119],"mapped",[8118,953]],[[8120,8120],"mapped",[8112]],[[8121,8121],"mapped",[8113]],[[8122,8122],"mapped",[8048]],[[8123,8123],"mapped",[940]],[[8124,8124],"mapped",[945,953]],[[8125,8125],"disallowed_STD3_mapped",[32,787]],[[8126,8126],"mapped",[953]],[[8127,8127],"disallowed_STD3_mapped",[32,787]],[[8128,8128],"disallowed_STD3_mapped",[32,834]],[[8129,8129],"disallowed_STD3_mapped",[32,776,834]],[[8130,8130],"mapped",[8052,953]],[[8131,8131],"mapped",[951,953]],[[8132,8132],"mapped",[942,953]],[[8133,8133],"disallowed"],[[8134,8134],"valid"],[[8135,8135],"mapped",[8134,953]],[[8136,8136],"mapped",[8050]],[[8137,8137],"mapped",[941]],[[8138,8138],"mapped",[8052]],[[8139,8139],"mapped",[942]],[[8140,8140],"mapped",[951,953]],[[8141,8141],"disallowed_STD3_mapped",[32,787,768]],[[8142,8142],"disallowed_STD3_mapped",[32,787,769]],[[8143,8143],"disallowed_STD3_mapped",[32,787,834]],[[8144,8146],"valid"],[[8147,8147],"mapped",[912]],[[8148,8149],"disallowed"],[[8150,8151],"valid"],[[8152,8152],"mapped",[8144]],[[8153,8153],"mapped",[8145]],[[8154,8154],"mapped",[8054]],[[8155,8155],"mapped",[943]],[[8156,8156],"disallowed"],[[8157,8157],"disallowed_STD3_mapped",[32,788,768]],[[8158,8158],"disallowed_STD3_mapped",[32,788,769]],[[8159,8159],"disallowed_STD3_mapped",[32,788,834]],[[8160,8162],"valid"],[[8163,8163],"mapped",[944]],[[8164,8167],"valid"],[[8168,8168],"mapped",[8160]],[[8169,8169],"mapped",[8161]],[[8170,8170],"mapped",[8058]],[[8171,8171],"mapped",[973]],[[8172,8172],"mapped",[8165]],[[8173,8173],"disallowed_STD3_mapped",[32,776,768]],[[8174,8174],"disallowed_STD3_mapped",[32,776,769]],[[8175,8175],"disallowed_STD3_mapped",[96]],[[8176,8177],"disallowed"],[[8178,8178],"mapped",[8060,953]],[[8179,8179],"mapped",[969,953]],[[8180,8180],"mapped",[974,953]],[[8181,8181],"disallowed"],[[8182,8182],"valid"],[[8183,8183],"mapped",[8182,953]],[[8184,8184],"mapped",[8056]],[[8185,8185],"mapped",[972]],[[8186,8186],"mapped",[8060]],[[8187,8187],"mapped",[974]],[[8188,8188],"mapped",[969,953]],[[8189,8189],"disallowed_STD3_mapped",[32,769]],[[8190,8190],"disallowed_STD3_mapped",[32,788]],[[8191,8191],"disallowed"],[[8192,8202],"disallowed_STD3_mapped",[32]],[[8203,8203],"ignored"],[[8204,8205],"deviation",[]],[[8206,8207],"disallowed"],[[8208,8208],"valid",[],"NV8"],[[8209,8209],"mapped",[8208]],[[8210,8214],"valid",[],"NV8"],[[8215,8215],"disallowed_STD3_mapped",[32,819]],[[8216,8227],"valid",[],"NV8"],[[8228,8230],"disallowed"],[[8231,8231],"valid",[],"NV8"],[[8232,8238],"disallowed"],[[8239,8239],"disallowed_STD3_mapped",[32]],[[8240,8242],"valid",[],"NV8"],[[8243,8243],"mapped",[8242,8242]],[[8244,8244],"mapped",[8242,8242,8242]],[[8245,8245],"valid",[],"NV8"],[[8246,8246],"mapped",[8245,8245]],[[8247,8247],"mapped",[8245,8245,8245]],[[8248,8251],"valid",[],"NV8"],[[8252,8252],"disallowed_STD3_mapped",[33,33]],[[8253,8253],"valid",[],"NV8"],[[8254,8254],"disallowed_STD3_mapped",[32,773]],[[8255,8262],"valid",[],"NV8"],[[8263,8263],"disallowed_STD3_mapped",[63,63]],[[8264,8264],"disallowed_STD3_mapped",[63,33]],[[8265,8265],"disallowed_STD3_mapped",[33,63]],[[8266,8269],"valid",[],"NV8"],[[8270,8274],"valid",[],"NV8"],[[8275,8276],"valid",[],"NV8"],[[8277,8278],"valid",[],"NV8"],[[8279,8279],"mapped",[8242,8242,8242,8242]],[[8280,8286],"valid",[],"NV8"],[[8287,8287],"disallowed_STD3_mapped",[32]],[[8288,8288],"ignored"],[[8289,8291],"disallowed"],[[8292,8292],"ignored"],[[8293,8293],"disallowed"],[[8294,8297],"disallowed"],[[8298,8303],"disallowed"],[[8304,8304],"mapped",[48]],[[8305,8305],"mapped",[105]],[[8306,8307],"disallowed"],[[8308,8308],"mapped",[52]],[[8309,8309],"mapped",[53]],[[8310,8310],"mapped",[54]],[[8311,8311],"mapped",[55]],[[8312,8312],"mapped",[56]],[[8313,8313],"mapped",[57]],[[8314,8314],"disallowed_STD3_mapped",[43]],[[8315,8315],"mapped",[8722]],[[8316,8316],"disallowed_STD3_mapped",[61]],[[8317,8317],"disallowed_STD3_mapped",[40]],[[8318,8318],"disallowed_STD3_mapped",[41]],[[8319,8319],"mapped",[110]],[[8320,8320],"mapped",[48]],[[8321,8321],"mapped",[49]],[[8322,8322],"mapped",[50]],[[8323,8323],"mapped",[51]],[[8324,8324],"mapped",[52]],[[8325,8325],"mapped",[53]],[[8326,8326],"mapped",[54]],[[8327,8327],"mapped",[55]],[[8328,8328],"mapped",[56]],[[8329,8329],"mapped",[57]],[[8330,8330],"disallowed_STD3_mapped",[43]],[[8331,8331],"mapped",[8722]],[[8332,8332],"disallowed_STD3_mapped",[61]],[[8333,8333],"disallowed_STD3_mapped",[40]],[[8334,8334],"disallowed_STD3_mapped",[41]],[[8335,8335],"disallowed"],[[8336,8336],"mapped",[97]],[[8337,8337],"mapped",[101]],[[8338,8338],"mapped",[111]],[[8339,8339],"mapped",[120]],[[8340,8340],"mapped",[601]],[[8341,8341],"mapped",[104]],[[8342,8342],"mapped",[107]],[[8343,8343],"mapped",[108]],[[8344,8344],"mapped",[109]],[[8345,8345],"mapped",[110]],[[8346,8346],"mapped",[112]],[[8347,8347],"mapped",[115]],[[8348,8348],"mapped",[116]],[[8349,8351],"disallowed"],[[8352,8359],"valid",[],"NV8"],[[8360,8360],"mapped",[114,115]],[[8361,8362],"valid",[],"NV8"],[[8363,8363],"valid",[],"NV8"],[[8364,8364],"valid",[],"NV8"],[[8365,8367],"valid",[],"NV8"],[[8368,8369],"valid",[],"NV8"],[[8370,8373],"valid",[],"NV8"],[[8374,8376],"valid",[],"NV8"],[[8377,8377],"valid",[],"NV8"],[[8378,8378],"valid",[],"NV8"],[[8379,8381],"valid",[],"NV8"],[[8382,8382],"valid",[],"NV8"],[[8383,8399],"disallowed"],[[8400,8417],"valid",[],"NV8"],[[8418,8419],"valid",[],"NV8"],[[8420,8426],"valid",[],"NV8"],[[8427,8427],"valid",[],"NV8"],[[8428,8431],"valid",[],"NV8"],[[8432,8432],"valid",[],"NV8"],[[8433,8447],"disallowed"],[[8448,8448],"disallowed_STD3_mapped",[97,47,99]],[[8449,8449],"disallowed_STD3_mapped",[97,47,115]],[[8450,8450],"mapped",[99]],[[8451,8451],"mapped",[176,99]],[[8452,8452],"valid",[],"NV8"],[[8453,8453],"disallowed_STD3_mapped",[99,47,111]],[[8454,8454],"disallowed_STD3_mapped",[99,47,117]],[[8455,8455],"mapped",[603]],[[8456,8456],"valid",[],"NV8"],[[8457,8457],"mapped",[176,102]],[[8458,8458],"mapped",[103]],[[8459,8462],"mapped",[104]],[[8463,8463],"mapped",[295]],[[8464,8465],"mapped",[105]],[[8466,8467],"mapped",[108]],[[8468,8468],"valid",[],"NV8"],[[8469,8469],"mapped",[110]],[[8470,8470],"mapped",[110,111]],[[8471,8472],"valid",[],"NV8"],[[8473,8473],"mapped",[112]],[[8474,8474],"mapped",[113]],[[8475,8477],"mapped",[114]],[[8478,8479],"valid",[],"NV8"],[[8480,8480],"mapped",[115,109]],[[8481,8481],"mapped",[116,101,108]],[[8482,8482],"mapped",[116,109]],[[8483,8483],"valid",[],"NV8"],[[8484,8484],"mapped",[122]],[[8485,8485],"valid",[],"NV8"],[[8486,8486],"mapped",[969]],[[8487,8487],"valid",[],"NV8"],[[8488,8488],"mapped",[122]],[[8489,8489],"valid",[],"NV8"],[[8490,8490],"mapped",[107]],[[8491,8491],"mapped",[229]],[[8492,8492],"mapped",[98]],[[8493,8493],"mapped",[99]],[[8494,8494],"valid",[],"NV8"],[[8495,8496],"mapped",[101]],[[8497,8497],"mapped",[102]],[[8498,8498],"disallowed"],[[8499,8499],"mapped",[109]],[[8500,8500],"mapped",[111]],[[8501,8501],"mapped",[1488]],[[8502,8502],"mapped",[1489]],[[8503,8503],"mapped",[1490]],[[8504,8504],"mapped",[1491]],[[8505,8505],"mapped",[105]],[[8506,8506],"valid",[],"NV8"],[[8507,8507],"mapped",[102,97,120]],[[8508,8508],"mapped",[960]],[[8509,8510],"mapped",[947]],[[8511,8511],"mapped",[960]],[[8512,8512],"mapped",[8721]],[[8513,8516],"valid",[],"NV8"],[[8517,8518],"mapped",[100]],[[8519,8519],"mapped",[101]],[[8520,8520],"mapped",[105]],[[8521,8521],"mapped",[106]],[[8522,8523],"valid",[],"NV8"],[[8524,8524],"valid",[],"NV8"],[[8525,8525],"valid",[],"NV8"],[[8526,8526],"valid"],[[8527,8527],"valid",[],"NV8"],[[8528,8528],"mapped",[49,8260,55]],[[8529,8529],"mapped",[49,8260,57]],[[8530,8530],"mapped",[49,8260,49,48]],[[8531,8531],"mapped",[49,8260,51]],[[8532,8532],"mapped",[50,8260,51]],[[8533,8533],"mapped",[49,8260,53]],[[8534,8534],"mapped",[50,8260,53]],[[8535,8535],"mapped",[51,8260,53]],[[8536,8536],"mapped",[52,8260,53]],[[8537,8537],"mapped",[49,8260,54]],[[8538,8538],"mapped",[53,8260,54]],[[8539,8539],"mapped",[49,8260,56]],[[8540,8540],"mapped",[51,8260,56]],[[8541,8541],"mapped",[53,8260,56]],[[8542,8542],"mapped",[55,8260,56]],[[8543,8543],"mapped",[49,8260]],[[8544,8544],"mapped",[105]],[[8545,8545],"mapped",[105,105]],[[8546,8546],"mapped",[105,105,105]],[[8547,8547],"mapped",[105,118]],[[8548,8548],"mapped",[118]],[[8549,8549],"mapped",[118,105]],[[8550,8550],"mapped",[118,105,105]],[[8551,8551],"mapped",[118,105,105,105]],[[8552,8552],"mapped",[105,120]],[[8553,8553],"mapped",[120]],[[8554,8554],"mapped",[120,105]],[[8555,8555],"mapped",[120,105,105]],[[8556,8556],"mapped",[108]],[[8557,8557],"mapped",[99]],[[8558,8558],"mapped",[100]],[[8559,8559],"mapped",[109]],[[8560,8560],"mapped",[105]],[[8561,8561],"mapped",[105,105]],[[8562,8562],"mapped",[105,105,105]],[[8563,8563],"mapped",[105,118]],[[8564,8564],"mapped",[118]],[[8565,8565],"mapped",[118,105]],[[8566,8566],"mapped",[118,105,105]],[[8567,8567],"mapped",[118,105,105,105]],[[8568,8568],"mapped",[105,120]],[[8569,8569],"mapped",[120]],[[8570,8570],"mapped",[120,105]],[[8571,8571],"mapped",[120,105,105]],[[8572,8572],"mapped",[108]],[[8573,8573],"mapped",[99]],[[8574,8574],"mapped",[100]],[[8575,8575],"mapped",[109]],[[8576,8578],"valid",[],"NV8"],[[8579,8579],"disallowed"],[[8580,8580],"valid"],[[8581,8584],"valid",[],"NV8"],[[8585,8585],"mapped",[48,8260,51]],[[8586,8587],"valid",[],"NV8"],[[8588,8591],"disallowed"],[[8592,8682],"valid",[],"NV8"],[[8683,8691],"valid",[],"NV8"],[[8692,8703],"valid",[],"NV8"],[[8704,8747],"valid",[],"NV8"],[[8748,8748],"mapped",[8747,8747]],[[8749,8749],"mapped",[8747,8747,8747]],[[8750,8750],"valid",[],"NV8"],[[8751,8751],"mapped",[8750,8750]],[[8752,8752],"mapped",[8750,8750,8750]],[[8753,8799],"valid",[],"NV8"],[[8800,8800],"disallowed_STD3_valid"],[[8801,8813],"valid",[],"NV8"],[[8814,8815],"disallowed_STD3_valid"],[[8816,8945],"valid",[],"NV8"],[[8946,8959],"valid",[],"NV8"],[[8960,8960],"valid",[],"NV8"],[[8961,8961],"valid",[],"NV8"],[[8962,9000],"valid",[],"NV8"],[[9001,9001],"mapped",[12296]],[[9002,9002],"mapped",[12297]],[[9003,9082],"valid",[],"NV8"],[[9083,9083],"valid",[],"NV8"],[[9084,9084],"valid",[],"NV8"],[[9085,9114],"valid",[],"NV8"],[[9115,9166],"valid",[],"NV8"],[[9167,9168],"valid",[],"NV8"],[[9169,9179],"valid",[],"NV8"],[[9180,9191],"valid",[],"NV8"],[[9192,9192],"valid",[],"NV8"],[[9193,9203],"valid",[],"NV8"],[[9204,9210],"valid",[],"NV8"],[[9211,9215],"disallowed"],[[9216,9252],"valid",[],"NV8"],[[9253,9254],"valid",[],"NV8"],[[9255,9279],"disallowed"],[[9280,9290],"valid",[],"NV8"],[[9291,9311],"disallowed"],[[9312,9312],"mapped",[49]],[[9313,9313],"mapped",[50]],[[9314,9314],"mapped",[51]],[[9315,9315],"mapped",[52]],[[9316,9316],"mapped",[53]],[[9317,9317],"mapped",[54]],[[9318,9318],"mapped",[55]],[[9319,9319],"mapped",[56]],[[9320,9320],"mapped",[57]],[[9321,9321],"mapped",[49,48]],[[9322,9322],"mapped",[49,49]],[[9323,9323],"mapped",[49,50]],[[9324,9324],"mapped",[49,51]],[[9325,9325],"mapped",[49,52]],[[9326,9326],"mapped",[49,53]],[[9327,9327],"mapped",[49,54]],[[9328,9328],"mapped",[49,55]],[[9329,9329],"mapped",[49,56]],[[9330,9330],"mapped",[49,57]],[[9331,9331],"mapped",[50,48]],[[9332,9332],"disallowed_STD3_mapped",[40,49,41]],[[9333,9333],"disallowed_STD3_mapped",[40,50,41]],[[9334,9334],"disallowed_STD3_mapped",[40,51,41]],[[9335,9335],"disallowed_STD3_mapped",[40,52,41]],[[9336,9336],"disallowed_STD3_mapped",[40,53,41]],[[9337,9337],"disallowed_STD3_mapped",[40,54,41]],[[9338,9338],"disallowed_STD3_mapped",[40,55,41]],[[9339,9339],"disallowed_STD3_mapped",[40,56,41]],[[9340,9340],"disallowed_STD3_mapped",[40,57,41]],[[9341,9341],"disallowed_STD3_mapped",[40,49,48,41]],[[9342,9342],"disallowed_STD3_mapped",[40,49,49,41]],[[9343,9343],"disallowed_STD3_mapped",[40,49,50,41]],[[9344,9344],"disallowed_STD3_mapped",[40,49,51,41]],[[9345,9345],"disallowed_STD3_mapped",[40,49,52,41]],[[9346,9346],"disallowed_STD3_mapped",[40,49,53,41]],[[9347,9347],"disallowed_STD3_mapped",[40,49,54,41]],[[9348,9348],"disallowed_STD3_mapped",[40,49,55,41]],[[9349,9349],"disallowed_STD3_mapped",[40,49,56,41]],[[9350,9350],"disallowed_STD3_mapped",[40,49,57,41]],[[9351,9351],"disallowed_STD3_mapped",[40,50,48,41]],[[9352,9371],"disallowed"],[[9372,9372],"disallowed_STD3_mapped",[40,97,41]],[[9373,9373],"disallowed_STD3_mapped",[40,98,41]],[[9374,9374],"disallowed_STD3_mapped",[40,99,41]],[[9375,9375],"disallowed_STD3_mapped",[40,100,41]],[[9376,9376],"disallowed_STD3_mapped",[40,101,41]],[[9377,9377],"disallowed_STD3_mapped",[40,102,41]],[[9378,9378],"disallowed_STD3_mapped",[40,103,41]],[[9379,9379],"disallowed_STD3_mapped",[40,104,41]],[[9380,9380],"disallowed_STD3_mapped",[40,105,41]],[[9381,9381],"disallowed_STD3_mapped",[40,106,41]],[[9382,9382],"disallowed_STD3_mapped",[40,107,41]],[[9383,9383],"disallowed_STD3_mapped",[40,108,41]],[[9384,9384],"disallowed_STD3_mapped",[40,109,41]],[[9385,9385],"disallowed_STD3_mapped",[40,110,41]],[[9386,9386],"disallowed_STD3_mapped",[40,111,41]],[[9387,9387],"disallowed_STD3_mapped",[40,112,41]],[[9388,9388],"disallowed_STD3_mapped",[40,113,41]],[[9389,9389],"disallowed_STD3_mapped",[40,114,41]],[[9390,9390],"disallowed_STD3_mapped",[40,115,41]],[[9391,9391],"disallowed_STD3_mapped",[40,116,41]],[[9392,9392],"disallowed_STD3_mapped",[40,117,41]],[[9393,9393],"disallowed_STD3_mapped",[40,118,41]],[[9394,9394],"disallowed_STD3_mapped",[40,119,41]],[[9395,9395],"disallowed_STD3_mapped",[40,120,41]],[[9396,9396],"disallowed_STD3_mapped",[40,121,41]],[[9397,9397],"disallowed_STD3_mapped",[40,122,41]],[[9398,9398],"mapped",[97]],[[9399,9399],"mapped",[98]],[[9400,9400],"mapped",[99]],[[9401,9401],"mapped",[100]],[[9402,9402],"mapped",[101]],[[9403,9403],"mapped",[102]],[[9404,9404],"mapped",[103]],[[9405,9405],"mapped",[104]],[[9406,9406],"mapped",[105]],[[9407,9407],"mapped",[106]],[[9408,9408],"mapped",[107]],[[9409,9409],"mapped",[108]],[[9410,9410],"mapped",[109]],[[9411,9411],"mapped",[110]],[[9412,9412],"mapped",[111]],[[9413,9413],"mapped",[112]],[[9414,9414],"mapped",[113]],[[9415,9415],"mapped",[114]],[[9416,9416],"mapped",[115]],[[9417,9417],"mapped",[116]],[[9418,9418],"mapped",[117]],[[9419,9419],"mapped",[118]],[[9420,9420],"mapped",[119]],[[9421,9421],"mapped",[120]],[[9422,9422],"mapped",[121]],[[9423,9423],"mapped",[122]],[[9424,9424],"mapped",[97]],[[9425,9425],"mapped",[98]],[[9426,9426],"mapped",[99]],[[9427,9427],"mapped",[100]],[[9428,9428],"mapped",[101]],[[9429,9429],"mapped",[102]],[[9430,9430],"mapped",[103]],[[9431,9431],"mapped",[104]],[[9432,9432],"mapped",[105]],[[9433,9433],"mapped",[106]],[[9434,9434],"mapped",[107]],[[9435,9435],"mapped",[108]],[[9436,9436],"mapped",[109]],[[9437,9437],"mapped",[110]],[[9438,9438],"mapped",[111]],[[9439,9439],"mapped",[112]],[[9440,9440],"mapped",[113]],[[9441,9441],"mapped",[114]],[[9442,9442],"mapped",[115]],[[9443,9443],"mapped",[116]],[[9444,9444],"mapped",[117]],[[9445,9445],"mapped",[118]],[[9446,9446],"mapped",[119]],[[9447,9447],"mapped",[120]],[[9448,9448],"mapped",[121]],[[9449,9449],"mapped",[122]],[[9450,9450],"mapped",[48]],[[9451,9470],"valid",[],"NV8"],[[9471,9471],"valid",[],"NV8"],[[9472,9621],"valid",[],"NV8"],[[9622,9631],"valid",[],"NV8"],[[9632,9711],"valid",[],"NV8"],[[9712,9719],"valid",[],"NV8"],[[9720,9727],"valid",[],"NV8"],[[9728,9747],"valid",[],"NV8"],[[9748,9749],"valid",[],"NV8"],[[9750,9751],"valid",[],"NV8"],[[9752,9752],"valid",[],"NV8"],[[9753,9753],"valid",[],"NV8"],[[9754,9839],"valid",[],"NV8"],[[9840,9841],"valid",[],"NV8"],[[9842,9853],"valid",[],"NV8"],[[9854,9855],"valid",[],"NV8"],[[9856,9865],"valid",[],"NV8"],[[9866,9873],"valid",[],"NV8"],[[9874,9884],"valid",[],"NV8"],[[9885,9885],"valid",[],"NV8"],[[9886,9887],"valid",[],"NV8"],[[9888,9889],"valid",[],"NV8"],[[9890,9905],"valid",[],"NV8"],[[9906,9906],"valid",[],"NV8"],[[9907,9916],"valid",[],"NV8"],[[9917,9919],"valid",[],"NV8"],[[9920,9923],"valid",[],"NV8"],[[9924,9933],"valid",[],"NV8"],[[9934,9934],"valid",[],"NV8"],[[9935,9953],"valid",[],"NV8"],[[9954,9954],"valid",[],"NV8"],[[9955,9955],"valid",[],"NV8"],[[9956,9959],"valid",[],"NV8"],[[9960,9983],"valid",[],"NV8"],[[9984,9984],"valid",[],"NV8"],[[9985,9988],"valid",[],"NV8"],[[9989,9989],"valid",[],"NV8"],[[9990,9993],"valid",[],"NV8"],[[9994,9995],"valid",[],"NV8"],[[9996,10023],"valid",[],"NV8"],[[10024,10024],"valid",[],"NV8"],[[10025,10059],"valid",[],"NV8"],[[10060,10060],"valid",[],"NV8"],[[10061,10061],"valid",[],"NV8"],[[10062,10062],"valid",[],"NV8"],[[10063,10066],"valid",[],"NV8"],[[10067,10069],"valid",[],"NV8"],[[10070,10070],"valid",[],"NV8"],[[10071,10071],"valid",[],"NV8"],[[10072,10078],"valid",[],"NV8"],[[10079,10080],"valid",[],"NV8"],[[10081,10087],"valid",[],"NV8"],[[10088,10101],"valid",[],"NV8"],[[10102,10132],"valid",[],"NV8"],[[10133,10135],"valid",[],"NV8"],[[10136,10159],"valid",[],"NV8"],[[10160,10160],"valid",[],"NV8"],[[10161,10174],"valid",[],"NV8"],[[10175,10175],"valid",[],"NV8"],[[10176,10182],"valid",[],"NV8"],[[10183,10186],"valid",[],"NV8"],[[10187,10187],"valid",[],"NV8"],[[10188,10188],"valid",[],"NV8"],[[10189,10189],"valid",[],"NV8"],[[10190,10191],"valid",[],"NV8"],[[10192,10219],"valid",[],"NV8"],[[10220,10223],"valid",[],"NV8"],[[10224,10239],"valid",[],"NV8"],[[10240,10495],"valid",[],"NV8"],[[10496,10763],"valid",[],"NV8"],[[10764,10764],"mapped",[8747,8747,8747,8747]],[[10765,10867],"valid",[],"NV8"],[[10868,10868],"disallowed_STD3_mapped",[58,58,61]],[[10869,10869],"disallowed_STD3_mapped",[61,61]],[[10870,10870],"disallowed_STD3_mapped",[61,61,61]],[[10871,10971],"valid",[],"NV8"],[[10972,10972],"mapped",[10973,824]],[[10973,11007],"valid",[],"NV8"],[[11008,11021],"valid",[],"NV8"],[[11022,11027],"valid",[],"NV8"],[[11028,11034],"valid",[],"NV8"],[[11035,11039],"valid",[],"NV8"],[[11040,11043],"valid",[],"NV8"],[[11044,11084],"valid",[],"NV8"],[[11085,11087],"valid",[],"NV8"],[[11088,11092],"valid",[],"NV8"],[[11093,11097],"valid",[],"NV8"],[[11098,11123],"valid",[],"NV8"],[[11124,11125],"disallowed"],[[11126,11157],"valid",[],"NV8"],[[11158,11159],"disallowed"],[[11160,11193],"valid",[],"NV8"],[[11194,11196],"disallowed"],[[11197,11208],"valid",[],"NV8"],[[11209,11209],"disallowed"],[[11210,11217],"valid",[],"NV8"],[[11218,11243],"disallowed"],[[11244,11247],"valid",[],"NV8"],[[11248,11263],"disallowed"],[[11264,11264],"mapped",[11312]],[[11265,11265],"mapped",[11313]],[[11266,11266],"mapped",[11314]],[[11267,11267],"mapped",[11315]],[[11268,11268],"mapped",[11316]],[[11269,11269],"mapped",[11317]],[[11270,11270],"mapped",[11318]],[[11271,11271],"mapped",[11319]],[[11272,11272],"mapped",[11320]],[[11273,11273],"mapped",[11321]],[[11274,11274],"mapped",[11322]],[[11275,11275],"mapped",[11323]],[[11276,11276],"mapped",[11324]],[[11277,11277],"mapped",[11325]],[[11278,11278],"mapped",[11326]],[[11279,11279],"mapped",[11327]],[[11280,11280],"mapped",[11328]],[[11281,11281],"mapped",[11329]],[[11282,11282],"mapped",[11330]],[[11283,11283],"mapped",[11331]],[[11284,11284],"mapped",[11332]],[[11285,11285],"mapped",[11333]],[[11286,11286],"mapped",[11334]],[[11287,11287],"mapped",[11335]],[[11288,11288],"mapped",[11336]],[[11289,11289],"mapped",[11337]],[[11290,11290],"mapped",[11338]],[[11291,11291],"mapped",[11339]],[[11292,11292],"mapped",[11340]],[[11293,11293],"mapped",[11341]],[[11294,11294],"mapped",[11342]],[[11295,11295],"mapped",[11343]],[[11296,11296],"mapped",[11344]],[[11297,11297],"mapped",[11345]],[[11298,11298],"mapped",[11346]],[[11299,11299],"mapped",[11347]],[[11300,11300],"mapped",[11348]],[[11301,11301],"mapped",[11349]],[[11302,11302],"mapped",[11350]],[[11303,11303],"mapped",[11351]],[[11304,11304],"mapped",[11352]],[[11305,11305],"mapped",[11353]],[[11306,11306],"mapped",[11354]],[[11307,11307],"mapped",[11355]],[[11308,11308],"mapped",[11356]],[[11309,11309],"mapped",[11357]],[[11310,11310],"mapped",[11358]],[[11311,11311],"disallowed"],[[11312,11358],"valid"],[[11359,11359],"disallowed"],[[11360,11360],"mapped",[11361]],[[11361,11361],"valid"],[[11362,11362],"mapped",[619]],[[11363,11363],"mapped",[7549]],[[11364,11364],"mapped",[637]],[[11365,11366],"valid"],[[11367,11367],"mapped",[11368]],[[11368,11368],"valid"],[[11369,11369],"mapped",[11370]],[[11370,11370],"valid"],[[11371,11371],"mapped",[11372]],[[11372,11372],"valid"],[[11373,11373],"mapped",[593]],[[11374,11374],"mapped",[625]],[[11375,11375],"mapped",[592]],[[11376,11376],"mapped",[594]],[[11377,11377],"valid"],[[11378,11378],"mapped",[11379]],[[11379,11379],"valid"],[[11380,11380],"valid"],[[11381,11381],"mapped",[11382]],[[11382,11383],"valid"],[[11384,11387],"valid"],[[11388,11388],"mapped",[106]],[[11389,11389],"mapped",[118]],[[11390,11390],"mapped",[575]],[[11391,11391],"mapped",[576]],[[11392,11392],"mapped",[11393]],[[11393,11393],"valid"],[[11394,11394],"mapped",[11395]],[[11395,11395],"valid"],[[11396,11396],"mapped",[11397]],[[11397,11397],"valid"],[[11398,11398],"mapped",[11399]],[[11399,11399],"valid"],[[11400,11400],"mapped",[11401]],[[11401,11401],"valid"],[[11402,11402],"mapped",[11403]],[[11403,11403],"valid"],[[11404,11404],"mapped",[11405]],[[11405,11405],"valid"],[[11406,11406],"mapped",[11407]],[[11407,11407],"valid"],[[11408,11408],"mapped",[11409]],[[11409,11409],"valid"],[[11410,11410],"mapped",[11411]],[[11411,11411],"valid"],[[11412,11412],"mapped",[11413]],[[11413,11413],"valid"],[[11414,11414],"mapped",[11415]],[[11415,11415],"valid"],[[11416,11416],"mapped",[11417]],[[11417,11417],"valid"],[[11418,11418],"mapped",[11419]],[[11419,11419],"valid"],[[11420,11420],"mapped",[11421]],[[11421,11421],"valid"],[[11422,11422],"mapped",[11423]],[[11423,11423],"valid"],[[11424,11424],"mapped",[11425]],[[11425,11425],"valid"],[[11426,11426],"mapped",[11427]],[[11427,11427],"valid"],[[11428,11428],"mapped",[11429]],[[11429,11429],"valid"],[[11430,11430],"mapped",[11431]],[[11431,11431],"valid"],[[11432,11432],"mapped",[11433]],[[11433,11433],"valid"],[[11434,11434],"mapped",[11435]],[[11435,11435],"valid"],[[11436,11436],"mapped",[11437]],[[11437,11437],"valid"],[[11438,11438],"mapped",[11439]],[[11439,11439],"valid"],[[11440,11440],"mapped",[11441]],[[11441,11441],"valid"],[[11442,11442],"mapped",[11443]],[[11443,11443],"valid"],[[11444,11444],"mapped",[11445]],[[11445,11445],"valid"],[[11446,11446],"mapped",[11447]],[[11447,11447],"valid"],[[11448,11448],"mapped",[11449]],[[11449,11449],"valid"],[[11450,11450],"mapped",[11451]],[[11451,11451],"valid"],[[11452,11452],"mapped",[11453]],[[11453,11453],"valid"],[[11454,11454],"mapped",[11455]],[[11455,11455],"valid"],[[11456,11456],"mapped",[11457]],[[11457,11457],"valid"],[[11458,11458],"mapped",[11459]],[[11459,11459],"valid"],[[11460,11460],"mapped",[11461]],[[11461,11461],"valid"],[[11462,11462],"mapped",[11463]],[[11463,11463],"valid"],[[11464,11464],"mapped",[11465]],[[11465,11465],"valid"],[[11466,11466],"mapped",[11467]],[[11467,11467],"valid"],[[11468,11468],"mapped",[11469]],[[11469,11469],"valid"],[[11470,11470],"mapped",[11471]],[[11471,11471],"valid"],[[11472,11472],"mapped",[11473]],[[11473,11473],"valid"],[[11474,11474],"mapped",[11475]],[[11475,11475],"valid"],[[11476,11476],"mapped",[11477]],[[11477,11477],"valid"],[[11478,11478],"mapped",[11479]],[[11479,11479],"valid"],[[11480,11480],"mapped",[11481]],[[11481,11481],"valid"],[[11482,11482],"mapped",[11483]],[[11483,11483],"valid"],[[11484,11484],"mapped",[11485]],[[11485,11485],"valid"],[[11486,11486],"mapped",[11487]],[[11487,11487],"valid"],[[11488,11488],"mapped",[11489]],[[11489,11489],"valid"],[[11490,11490],"mapped",[11491]],[[11491,11492],"valid"],[[11493,11498],"valid",[],"NV8"],[[11499,11499],"mapped",[11500]],[[11500,11500],"valid"],[[11501,11501],"mapped",[11502]],[[11502,11505],"valid"],[[11506,11506],"mapped",[11507]],[[11507,11507],"valid"],[[11508,11512],"disallowed"],[[11513,11519],"valid",[],"NV8"],[[11520,11557],"valid"],[[11558,11558],"disallowed"],[[11559,11559],"valid"],[[11560,11564],"disallowed"],[[11565,11565],"valid"],[[11566,11567],"disallowed"],[[11568,11621],"valid"],[[11622,11623],"valid"],[[11624,11630],"disallowed"],[[11631,11631],"mapped",[11617]],[[11632,11632],"valid",[],"NV8"],[[11633,11646],"disallowed"],[[11647,11647],"valid"],[[11648,11670],"valid"],[[11671,11679],"disallowed"],[[11680,11686],"valid"],[[11687,11687],"disallowed"],[[11688,11694],"valid"],[[11695,11695],"disallowed"],[[11696,11702],"valid"],[[11703,11703],"disallowed"],[[11704,11710],"valid"],[[11711,11711],"disallowed"],[[11712,11718],"valid"],[[11719,11719],"disallowed"],[[11720,11726],"valid"],[[11727,11727],"disallowed"],[[11728,11734],"valid"],[[11735,11735],"disallowed"],[[11736,11742],"valid"],[[11743,11743],"disallowed"],[[11744,11775],"valid"],[[11776,11799],"valid",[],"NV8"],[[11800,11803],"valid",[],"NV8"],[[11804,11805],"valid",[],"NV8"],[[11806,11822],"valid",[],"NV8"],[[11823,11823],"valid"],[[11824,11824],"valid",[],"NV8"],[[11825,11825],"valid",[],"NV8"],[[11826,11835],"valid",[],"NV8"],[[11836,11842],"valid",[],"NV8"],[[11843,11903],"disallowed"],[[11904,11929],"valid",[],"NV8"],[[11930,11930],"disallowed"],[[11931,11934],"valid",[],"NV8"],[[11935,11935],"mapped",[27597]],[[11936,12018],"valid",[],"NV8"],[[12019,12019],"mapped",[40863]],[[12020,12031],"disallowed"],[[12032,12032],"mapped",[19968]],[[12033,12033],"mapped",[20008]],[[12034,12034],"mapped",[20022]],[[12035,12035],"mapped",[20031]],[[12036,12036],"mapped",[20057]],[[12037,12037],"mapped",[20101]],[[12038,12038],"mapped",[20108]],[[12039,12039],"mapped",[20128]],[[12040,12040],"mapped",[20154]],[[12041,12041],"mapped",[20799]],[[12042,12042],"mapped",[20837]],[[12043,12043],"mapped",[20843]],[[12044,12044],"mapped",[20866]],[[12045,12045],"mapped",[20886]],[[12046,12046],"mapped",[20907]],[[12047,12047],"mapped",[20960]],[[12048,12048],"mapped",[20981]],[[12049,12049],"mapped",[20992]],[[12050,12050],"mapped",[21147]],[[12051,12051],"mapped",[21241]],[[12052,12052],"mapped",[21269]],[[12053,12053],"mapped",[21274]],[[12054,12054],"mapped",[21304]],[[12055,12055],"mapped",[21313]],[[12056,12056],"mapped",[21340]],[[12057,12057],"mapped",[21353]],[[12058,12058],"mapped",[21378]],[[12059,12059],"mapped",[21430]],[[12060,12060],"mapped",[21448]],[[12061,12061],"mapped",[21475]],[[12062,12062],"mapped",[22231]],[[12063,12063],"mapped",[22303]],[[12064,12064],"mapped",[22763]],[[12065,12065],"mapped",[22786]],[[12066,12066],"mapped",[22794]],[[12067,12067],"mapped",[22805]],[[12068,12068],"mapped",[22823]],[[12069,12069],"mapped",[22899]],[[12070,12070],"mapped",[23376]],[[12071,12071],"mapped",[23424]],[[12072,12072],"mapped",[23544]],[[12073,12073],"mapped",[23567]],[[12074,12074],"mapped",[23586]],[[12075,12075],"mapped",[23608]],[[12076,12076],"mapped",[23662]],[[12077,12077],"mapped",[23665]],[[12078,12078],"mapped",[24027]],[[12079,12079],"mapped",[24037]],[[12080,12080],"mapped",[24049]],[[12081,12081],"mapped",[24062]],[[12082,12082],"mapped",[24178]],[[12083,12083],"mapped",[24186]],[[12084,12084],"mapped",[24191]],[[12085,12085],"mapped",[24308]],[[12086,12086],"mapped",[24318]],[[12087,12087],"mapped",[24331]],[[12088,12088],"mapped",[24339]],[[12089,12089],"mapped",[24400]],[[12090,12090],"mapped",[24417]],[[12091,12091],"mapped",[24435]],[[12092,12092],"mapped",[24515]],[[12093,12093],"mapped",[25096]],[[12094,12094],"mapped",[25142]],[[12095,12095],"mapped",[25163]],[[12096,12096],"mapped",[25903]],[[12097,12097],"mapped",[25908]],[[12098,12098],"mapped",[25991]],[[12099,12099],"mapped",[26007]],[[12100,12100],"mapped",[26020]],[[12101,12101],"mapped",[26041]],[[12102,12102],"mapped",[26080]],[[12103,12103],"mapped",[26085]],[[12104,12104],"mapped",[26352]],[[12105,12105],"mapped",[26376]],[[12106,12106],"mapped",[26408]],[[12107,12107],"mapped",[27424]],[[12108,12108],"mapped",[27490]],[[12109,12109],"mapped",[27513]],[[12110,12110],"mapped",[27571]],[[12111,12111],"mapped",[27595]],[[12112,12112],"mapped",[27604]],[[12113,12113],"mapped",[27611]],[[12114,12114],"mapped",[27663]],[[12115,12115],"mapped",[27668]],[[12116,12116],"mapped",[27700]],[[12117,12117],"mapped",[28779]],[[12118,12118],"mapped",[29226]],[[12119,12119],"mapped",[29238]],[[12120,12120],"mapped",[29243]],[[12121,12121],"mapped",[29247]],[[12122,12122],"mapped",[29255]],[[12123,12123],"mapped",[29273]],[[12124,12124],"mapped",[29275]],[[12125,12125],"mapped",[29356]],[[12126,12126],"mapped",[29572]],[[12127,12127],"mapped",[29577]],[[12128,12128],"mapped",[29916]],[[12129,12129],"mapped",[29926]],[[12130,12130],"mapped",[29976]],[[12131,12131],"mapped",[29983]],[[12132,12132],"mapped",[29992]],[[12133,12133],"mapped",[30000]],[[12134,12134],"mapped",[30091]],[[12135,12135],"mapped",[30098]],[[12136,12136],"mapped",[30326]],[[12137,12137],"mapped",[30333]],[[12138,12138],"mapped",[30382]],[[12139,12139],"mapped",[30399]],[[12140,12140],"mapped",[30446]],[[12141,12141],"mapped",[30683]],[[12142,12142],"mapped",[30690]],[[12143,12143],"mapped",[30707]],[[12144,12144],"mapped",[31034]],[[12145,12145],"mapped",[31160]],[[12146,12146],"mapped",[31166]],[[12147,12147],"mapped",[31348]],[[12148,12148],"mapped",[31435]],[[12149,12149],"mapped",[31481]],[[12150,12150],"mapped",[31859]],[[12151,12151],"mapped",[31992]],[[12152,12152],"mapped",[32566]],[[12153,12153],"mapped",[32593]],[[12154,12154],"mapped",[32650]],[[12155,12155],"mapped",[32701]],[[12156,12156],"mapped",[32769]],[[12157,12157],"mapped",[32780]],[[12158,12158],"mapped",[32786]],[[12159,12159],"mapped",[32819]],[[12160,12160],"mapped",[32895]],[[12161,12161],"mapped",[32905]],[[12162,12162],"mapped",[33251]],[[12163,12163],"mapped",[33258]],[[12164,12164],"mapped",[33267]],[[12165,12165],"mapped",[33276]],[[12166,12166],"mapped",[33292]],[[12167,12167],"mapped",[33307]],[[12168,12168],"mapped",[33311]],[[12169,12169],"mapped",[33390]],[[12170,12170],"mapped",[33394]],[[12171,12171],"mapped",[33400]],[[12172,12172],"mapped",[34381]],[[12173,12173],"mapped",[34411]],[[12174,12174],"mapped",[34880]],[[12175,12175],"mapped",[34892]],[[12176,12176],"mapped",[34915]],[[12177,12177],"mapped",[35198]],[[12178,12178],"mapped",[35211]],[[12179,12179],"mapped",[35282]],[[12180,12180],"mapped",[35328]],[[12181,12181],"mapped",[35895]],[[12182,12182],"mapped",[35910]],[[12183,12183],"mapped",[35925]],[[12184,12184],"mapped",[35960]],[[12185,12185],"mapped",[35997]],[[12186,12186],"mapped",[36196]],[[12187,12187],"mapped",[36208]],[[12188,12188],"mapped",[36275]],[[12189,12189],"mapped",[36523]],[[12190,12190],"mapped",[36554]],[[12191,12191],"mapped",[36763]],[[12192,12192],"mapped",[36784]],[[12193,12193],"mapped",[36789]],[[12194,12194],"mapped",[37009]],[[12195,12195],"mapped",[37193]],[[12196,12196],"mapped",[37318]],[[12197,12197],"mapped",[37324]],[[12198,12198],"mapped",[37329]],[[12199,12199],"mapped",[38263]],[[12200,12200],"mapped",[38272]],[[12201,12201],"mapped",[38428]],[[12202,12202],"mapped",[38582]],[[12203,12203],"mapped",[38585]],[[12204,12204],"mapped",[38632]],[[12205,12205],"mapped",[38737]],[[12206,12206],"mapped",[38750]],[[12207,12207],"mapped",[38754]],[[12208,12208],"mapped",[38761]],[[12209,12209],"mapped",[38859]],[[12210,12210],"mapped",[38893]],[[12211,12211],"mapped",[38899]],[[12212,12212],"mapped",[38913]],[[12213,12213],"mapped",[39080]],[[12214,12214],"mapped",[39131]],[[12215,12215],"mapped",[39135]],[[12216,12216],"mapped",[39318]],[[12217,12217],"mapped",[39321]],[[12218,12218],"mapped",[39340]],[[12219,12219],"mapped",[39592]],[[12220,12220],"mapped",[39640]],[[12221,12221],"mapped",[39647]],[[12222,12222],"mapped",[39717]],[[12223,12223],"mapped",[39727]],[[12224,12224],"mapped",[39730]],[[12225,12225],"mapped",[39740]],[[12226,12226],"mapped",[39770]],[[12227,12227],"mapped",[40165]],[[12228,12228],"mapped",[40565]],[[12229,12229],"mapped",[40575]],[[12230,12230],"mapped",[40613]],[[12231,12231],"mapped",[40635]],[[12232,12232],"mapped",[40643]],[[12233,12233],"mapped",[40653]],[[12234,12234],"mapped",[40657]],[[12235,12235],"mapped",[40697]],[[12236,12236],"mapped",[40701]],[[12237,12237],"mapped",[40718]],[[12238,12238],"mapped",[40723]],[[12239,12239],"mapped",[40736]],[[12240,12240],"mapped",[40763]],[[12241,12241],"mapped",[40778]],[[12242,12242],"mapped",[40786]],[[12243,12243],"mapped",[40845]],[[12244,12244],"mapped",[40860]],[[12245,12245],"mapped",[40864]],[[12246,12271],"disallowed"],[[12272,12283],"disallowed"],[[12284,12287],"disallowed"],[[12288,12288],"disallowed_STD3_mapped",[32]],[[12289,12289],"valid",[],"NV8"],[[12290,12290],"mapped",[46]],[[12291,12292],"valid",[],"NV8"],[[12293,12295],"valid"],[[12296,12329],"valid",[],"NV8"],[[12330,12333],"valid"],[[12334,12341],"valid",[],"NV8"],[[12342,12342],"mapped",[12306]],[[12343,12343],"valid",[],"NV8"],[[12344,12344],"mapped",[21313]],[[12345,12345],"mapped",[21316]],[[12346,12346],"mapped",[21317]],[[12347,12347],"valid",[],"NV8"],[[12348,12348],"valid"],[[12349,12349],"valid",[],"NV8"],[[12350,12350],"valid",[],"NV8"],[[12351,12351],"valid",[],"NV8"],[[12352,12352],"disallowed"],[[12353,12436],"valid"],[[12437,12438],"valid"],[[12439,12440],"disallowed"],[[12441,12442],"valid"],[[12443,12443],"disallowed_STD3_mapped",[32,12441]],[[12444,12444],"disallowed_STD3_mapped",[32,12442]],[[12445,12446],"valid"],[[12447,12447],"mapped",[12424,12426]],[[12448,12448],"valid",[],"NV8"],[[12449,12542],"valid"],[[12543,12543],"mapped",[12467,12488]],[[12544,12548],"disallowed"],[[12549,12588],"valid"],[[12589,12589],"valid"],[[12590,12592],"disallowed"],[[12593,12593],"mapped",[4352]],[[12594,12594],"mapped",[4353]],[[12595,12595],"mapped",[4522]],[[12596,12596],"mapped",[4354]],[[12597,12597],"mapped",[4524]],[[12598,12598],"mapped",[4525]],[[12599,12599],"mapped",[4355]],[[12600,12600],"mapped",[4356]],[[12601,12601],"mapped",[4357]],[[12602,12602],"mapped",[4528]],[[12603,12603],"mapped",[4529]],[[12604,12604],"mapped",[4530]],[[12605,12605],"mapped",[4531]],[[12606,12606],"mapped",[4532]],[[12607,12607],"mapped",[4533]],[[12608,12608],"mapped",[4378]],[[12609,12609],"mapped",[4358]],[[12610,12610],"mapped",[4359]],[[12611,12611],"mapped",[4360]],[[12612,12612],"mapped",[4385]],[[12613,12613],"mapped",[4361]],[[12614,12614],"mapped",[4362]],[[12615,12615],"mapped",[4363]],[[12616,12616],"mapped",[4364]],[[12617,12617],"mapped",[4365]],[[12618,12618],"mapped",[4366]],[[12619,12619],"mapped",[4367]],[[12620,12620],"mapped",[4368]],[[12621,12621],"mapped",[4369]],[[12622,12622],"mapped",[4370]],[[12623,12623],"mapped",[4449]],[[12624,12624],"mapped",[4450]],[[12625,12625],"mapped",[4451]],[[12626,12626],"mapped",[4452]],[[12627,12627],"mapped",[4453]],[[12628,12628],"mapped",[4454]],[[12629,12629],"mapped",[4455]],[[12630,12630],"mapped",[4456]],[[12631,12631],"mapped",[4457]],[[12632,12632],"mapped",[4458]],[[12633,12633],"mapped",[4459]],[[12634,12634],"mapped",[4460]],[[12635,12635],"mapped",[4461]],[[12636,12636],"mapped",[4462]],[[12637,12637],"mapped",[4463]],[[12638,12638],"mapped",[4464]],[[12639,12639],"mapped",[4465]],[[12640,12640],"mapped",[4466]],[[12641,12641],"mapped",[4467]],[[12642,12642],"mapped",[4468]],[[12643,12643],"mapped",[4469]],[[12644,12644],"disallowed"],[[12645,12645],"mapped",[4372]],[[12646,12646],"mapped",[4373]],[[12647,12647],"mapped",[4551]],[[12648,12648],"mapped",[4552]],[[12649,12649],"mapped",[4556]],[[12650,12650],"mapped",[4558]],[[12651,12651],"mapped",[4563]],[[12652,12652],"mapped",[4567]],[[12653,12653],"mapped",[4569]],[[12654,12654],"mapped",[4380]],[[12655,12655],"mapped",[4573]],[[12656,12656],"mapped",[4575]],[[12657,12657],"mapped",[4381]],[[12658,12658],"mapped",[4382]],[[12659,12659],"mapped",[4384]],[[12660,12660],"mapped",[4386]],[[12661,12661],"mapped",[4387]],[[12662,12662],"mapped",[4391]],[[12663,12663],"mapped",[4393]],[[12664,12664],"mapped",[4395]],[[12665,12665],"mapped",[4396]],[[12666,12666],"mapped",[4397]],[[12667,12667],"mapped",[4398]],[[12668,12668],"mapped",[4399]],[[12669,12669],"mapped",[4402]],[[12670,12670],"mapped",[4406]],[[12671,12671],"mapped",[4416]],[[12672,12672],"mapped",[4423]],[[12673,12673],"mapped",[4428]],[[12674,12674],"mapped",[4593]],[[12675,12675],"mapped",[4594]],[[12676,12676],"mapped",[4439]],[[12677,12677],"mapped",[4440]],[[12678,12678],"mapped",[4441]],[[12679,12679],"mapped",[4484]],[[12680,12680],"mapped",[4485]],[[12681,12681],"mapped",[4488]],[[12682,12682],"mapped",[4497]],[[12683,12683],"mapped",[4498]],[[12684,12684],"mapped",[4500]],[[12685,12685],"mapped",[4510]],[[12686,12686],"mapped",[4513]],[[12687,12687],"disallowed"],[[12688,12689],"valid",[],"NV8"],[[12690,12690],"mapped",[19968]],[[12691,12691],"mapped",[20108]],[[12692,12692],"mapped",[19977]],[[12693,12693],"mapped",[22235]],[[12694,12694],"mapped",[19978]],[[12695,12695],"mapped",[20013]],[[12696,12696],"mapped",[19979]],[[12697,12697],"mapped",[30002]],[[12698,12698],"mapped",[20057]],[[12699,12699],"mapped",[19993]],[[12700,12700],"mapped",[19969]],[[12701,12701],"mapped",[22825]],[[12702,12702],"mapped",[22320]],[[12703,12703],"mapped",[20154]],[[12704,12727],"valid"],[[12728,12730],"valid"],[[12731,12735],"disallowed"],[[12736,12751],"valid",[],"NV8"],[[12752,12771],"valid",[],"NV8"],[[12772,12783],"disallowed"],[[12784,12799],"valid"],[[12800,12800],"disallowed_STD3_mapped",[40,4352,41]],[[12801,12801],"disallowed_STD3_mapped",[40,4354,41]],[[12802,12802],"disallowed_STD3_mapped",[40,4355,41]],[[12803,12803],"disallowed_STD3_mapped",[40,4357,41]],[[12804,12804],"disallowed_STD3_mapped",[40,4358,41]],[[12805,12805],"disallowed_STD3_mapped",[40,4359,41]],[[12806,12806],"disallowed_STD3_mapped",[40,4361,41]],[[12807,12807],"disallowed_STD3_mapped",[40,4363,41]],[[12808,12808],"disallowed_STD3_mapped",[40,4364,41]],[[12809,12809],"disallowed_STD3_mapped",[40,4366,41]],[[12810,12810],"disallowed_STD3_mapped",[40,4367,41]],[[12811,12811],"disallowed_STD3_mapped",[40,4368,41]],[[12812,12812],"disallowed_STD3_mapped",[40,4369,41]],[[12813,12813],"disallowed_STD3_mapped",[40,4370,41]],[[12814,12814],"disallowed_STD3_mapped",[40,44032,41]],[[12815,12815],"disallowed_STD3_mapped",[40,45208,41]],[[12816,12816],"disallowed_STD3_mapped",[40,45796,41]],[[12817,12817],"disallowed_STD3_mapped",[40,46972,41]],[[12818,12818],"disallowed_STD3_mapped",[40,47560,41]],[[12819,12819],"disallowed_STD3_mapped",[40,48148,41]],[[12820,12820],"disallowed_STD3_mapped",[40,49324,41]],[[12821,12821],"disallowed_STD3_mapped",[40,50500,41]],[[12822,12822],"disallowed_STD3_mapped",[40,51088,41]],[[12823,12823],"disallowed_STD3_mapped",[40,52264,41]],[[12824,12824],"disallowed_STD3_mapped",[40,52852,41]],[[12825,12825],"disallowed_STD3_mapped",[40,53440,41]],[[12826,12826],"disallowed_STD3_mapped",[40,54028,41]],[[12827,12827],"disallowed_STD3_mapped",[40,54616,41]],[[12828,12828],"disallowed_STD3_mapped",[40,51452,41]],[[12829,12829],"disallowed_STD3_mapped",[40,50724,51204,41]],[[12830,12830],"disallowed_STD3_mapped",[40,50724,54980,41]],[[12831,12831],"disallowed"],[[12832,12832],"disallowed_STD3_mapped",[40,19968,41]],[[12833,12833],"disallowed_STD3_mapped",[40,20108,41]],[[12834,12834],"disallowed_STD3_mapped",[40,19977,41]],[[12835,12835],"disallowed_STD3_mapped",[40,22235,41]],[[12836,12836],"disallowed_STD3_mapped",[40,20116,41]],[[12837,12837],"disallowed_STD3_mapped",[40,20845,41]],[[12838,12838],"disallowed_STD3_mapped",[40,19971,41]],[[12839,12839],"disallowed_STD3_mapped",[40,20843,41]],[[12840,12840],"disallowed_STD3_mapped",[40,20061,41]],[[12841,12841],"disallowed_STD3_mapped",[40,21313,41]],[[12842,12842],"disallowed_STD3_mapped",[40,26376,41]],[[12843,12843],"disallowed_STD3_mapped",[40,28779,41]],[[12844,12844],"disallowed_STD3_mapped",[40,27700,41]],[[12845,12845],"disallowed_STD3_mapped",[40,26408,41]],[[12846,12846],"disallowed_STD3_mapped",[40,37329,41]],[[12847,12847],"disallowed_STD3_mapped",[40,22303,41]],[[12848,12848],"disallowed_STD3_mapped",[40,26085,41]],[[12849,12849],"disallowed_STD3_mapped",[40,26666,41]],[[12850,12850],"disallowed_STD3_mapped",[40,26377,41]],[[12851,12851],"disallowed_STD3_mapped",[40,31038,41]],[[12852,12852],"disallowed_STD3_mapped",[40,21517,41]],[[12853,12853],"disallowed_STD3_mapped",[40,29305,41]],[[12854,12854],"disallowed_STD3_mapped",[40,36001,41]],[[12855,12855],"disallowed_STD3_mapped",[40,31069,41]],[[12856,12856],"disallowed_STD3_mapped",[40,21172,41]],[[12857,12857],"disallowed_STD3_mapped",[40,20195,41]],[[12858,12858],"disallowed_STD3_mapped",[40,21628,41]],[[12859,12859],"disallowed_STD3_mapped",[40,23398,41]],[[12860,12860],"disallowed_STD3_mapped",[40,30435,41]],[[12861,12861],"disallowed_STD3_mapped",[40,20225,41]],[[12862,12862],"disallowed_STD3_mapped",[40,36039,41]],[[12863,12863],"disallowed_STD3_mapped",[40,21332,41]],[[12864,12864],"disallowed_STD3_mapped",[40,31085,41]],[[12865,12865],"disallowed_STD3_mapped",[40,20241,41]],[[12866,12866],"disallowed_STD3_mapped",[40,33258,41]],[[12867,12867],"disallowed_STD3_mapped",[40,33267,41]],[[12868,12868],"mapped",[21839]],[[12869,12869],"mapped",[24188]],[[12870,12870],"mapped",[25991]],[[12871,12871],"mapped",[31631]],[[12872,12879],"valid",[],"NV8"],[[12880,12880],"mapped",[112,116,101]],[[12881,12881],"mapped",[50,49]],[[12882,12882],"mapped",[50,50]],[[12883,12883],"mapped",[50,51]],[[12884,12884],"mapped",[50,52]],[[12885,12885],"mapped",[50,53]],[[12886,12886],"mapped",[50,54]],[[12887,12887],"mapped",[50,55]],[[12888,12888],"mapped",[50,56]],[[12889,12889],"mapped",[50,57]],[[12890,12890],"mapped",[51,48]],[[12891,12891],"mapped",[51,49]],[[12892,12892],"mapped",[51,50]],[[12893,12893],"mapped",[51,51]],[[12894,12894],"mapped",[51,52]],[[12895,12895],"mapped",[51,53]],[[12896,12896],"mapped",[4352]],[[12897,12897],"mapped",[4354]],[[12898,12898],"mapped",[4355]],[[12899,12899],"mapped",[4357]],[[12900,12900],"mapped",[4358]],[[12901,12901],"mapped",[4359]],[[12902,12902],"mapped",[4361]],[[12903,12903],"mapped",[4363]],[[12904,12904],"mapped",[4364]],[[12905,12905],"mapped",[4366]],[[12906,12906],"mapped",[4367]],[[12907,12907],"mapped",[4368]],[[12908,12908],"mapped",[4369]],[[12909,12909],"mapped",[4370]],[[12910,12910],"mapped",[44032]],[[12911,12911],"mapped",[45208]],[[12912,12912],"mapped",[45796]],[[12913,12913],"mapped",[46972]],[[12914,12914],"mapped",[47560]],[[12915,12915],"mapped",[48148]],[[12916,12916],"mapped",[49324]],[[12917,12917],"mapped",[50500]],[[12918,12918],"mapped",[51088]],[[12919,12919],"mapped",[52264]],[[12920,12920],"mapped",[52852]],[[12921,12921],"mapped",[53440]],[[12922,12922],"mapped",[54028]],[[12923,12923],"mapped",[54616]],[[12924,12924],"mapped",[52280,44256]],[[12925,12925],"mapped",[51452,51032]],[[12926,12926],"mapped",[50864]],[[12927,12927],"valid",[],"NV8"],[[12928,12928],"mapped",[19968]],[[12929,12929],"mapped",[20108]],[[12930,12930],"mapped",[19977]],[[12931,12931],"mapped",[22235]],[[12932,12932],"mapped",[20116]],[[12933,12933],"mapped",[20845]],[[12934,12934],"mapped",[19971]],[[12935,12935],"mapped",[20843]],[[12936,12936],"mapped",[20061]],[[12937,12937],"mapped",[21313]],[[12938,12938],"mapped",[26376]],[[12939,12939],"mapped",[28779]],[[12940,12940],"mapped",[27700]],[[12941,12941],"mapped",[26408]],[[12942,12942],"mapped",[37329]],[[12943,12943],"mapped",[22303]],[[12944,12944],"mapped",[26085]],[[12945,12945],"mapped",[26666]],[[12946,12946],"mapped",[26377]],[[12947,12947],"mapped",[31038]],[[12948,12948],"mapped",[21517]],[[12949,12949],"mapped",[29305]],[[12950,12950],"mapped",[36001]],[[12951,12951],"mapped",[31069]],[[12952,12952],"mapped",[21172]],[[12953,12953],"mapped",[31192]],[[12954,12954],"mapped",[30007]],[[12955,12955],"mapped",[22899]],[[12956,12956],"mapped",[36969]],[[12957,12957],"mapped",[20778]],[[12958,12958],"mapped",[21360]],[[12959,12959],"mapped",[27880]],[[12960,12960],"mapped",[38917]],[[12961,12961],"mapped",[20241]],[[12962,12962],"mapped",[20889]],[[12963,12963],"mapped",[27491]],[[12964,12964],"mapped",[19978]],[[12965,12965],"mapped",[20013]],[[12966,12966],"mapped",[19979]],[[12967,12967],"mapped",[24038]],[[12968,12968],"mapped",[21491]],[[12969,12969],"mapped",[21307]],[[12970,12970],"mapped",[23447]],[[12971,12971],"mapped",[23398]],[[12972,12972],"mapped",[30435]],[[12973,12973],"mapped",[20225]],[[12974,12974],"mapped",[36039]],[[12975,12975],"mapped",[21332]],[[12976,12976],"mapped",[22812]],[[12977,12977],"mapped",[51,54]],[[12978,12978],"mapped",[51,55]],[[12979,12979],"mapped",[51,56]],[[12980,12980],"mapped",[51,57]],[[12981,12981],"mapped",[52,48]],[[12982,12982],"mapped",[52,49]],[[12983,12983],"mapped",[52,50]],[[12984,12984],"mapped",[52,51]],[[12985,12985],"mapped",[52,52]],[[12986,12986],"mapped",[52,53]],[[12987,12987],"mapped",[52,54]],[[12988,12988],"mapped",[52,55]],[[12989,12989],"mapped",[52,56]],[[12990,12990],"mapped",[52,57]],[[12991,12991],"mapped",[53,48]],[[12992,12992],"mapped",[49,26376]],[[12993,12993],"mapped",[50,26376]],[[12994,12994],"mapped",[51,26376]],[[12995,12995],"mapped",[52,26376]],[[12996,12996],"mapped",[53,26376]],[[12997,12997],"mapped",[54,26376]],[[12998,12998],"mapped",[55,26376]],[[12999,12999],"mapped",[56,26376]],[[13000,13000],"mapped",[57,26376]],[[13001,13001],"mapped",[49,48,26376]],[[13002,13002],"mapped",[49,49,26376]],[[13003,13003],"mapped",[49,50,26376]],[[13004,13004],"mapped",[104,103]],[[13005,13005],"mapped",[101,114,103]],[[13006,13006],"mapped",[101,118]],[[13007,13007],"mapped",[108,116,100]],[[13008,13008],"mapped",[12450]],[[13009,13009],"mapped",[12452]],[[13010,13010],"mapped",[12454]],[[13011,13011],"mapped",[12456]],[[13012,13012],"mapped",[12458]],[[13013,13013],"mapped",[12459]],[[13014,13014],"mapped",[12461]],[[13015,13015],"mapped",[12463]],[[13016,13016],"mapped",[12465]],[[13017,13017],"mapped",[12467]],[[13018,13018],"mapped",[12469]],[[13019,13019],"mapped",[12471]],[[13020,13020],"mapped",[12473]],[[13021,13021],"mapped",[12475]],[[13022,13022],"mapped",[12477]],[[13023,13023],"mapped",[12479]],[[13024,13024],"mapped",[12481]],[[13025,13025],"mapped",[12484]],[[13026,13026],"mapped",[12486]],[[13027,13027],"mapped",[12488]],[[13028,13028],"mapped",[12490]],[[13029,13029],"mapped",[12491]],[[13030,13030],"mapped",[12492]],[[13031,13031],"mapped",[12493]],[[13032,13032],"mapped",[12494]],[[13033,13033],"mapped",[12495]],[[13034,13034],"mapped",[12498]],[[13035,13035],"mapped",[12501]],[[13036,13036],"mapped",[12504]],[[13037,13037],"mapped",[12507]],[[13038,13038],"mapped",[12510]],[[13039,13039],"mapped",[12511]],[[13040,13040],"mapped",[12512]],[[13041,13041],"mapped",[12513]],[[13042,13042],"mapped",[12514]],[[13043,13043],"mapped",[12516]],[[13044,13044],"mapped",[12518]],[[13045,13045],"mapped",[12520]],[[13046,13046],"mapped",[12521]],[[13047,13047],"mapped",[12522]],[[13048,13048],"mapped",[12523]],[[13049,13049],"mapped",[12524]],[[13050,13050],"mapped",[12525]],[[13051,13051],"mapped",[12527]],[[13052,13052],"mapped",[12528]],[[13053,13053],"mapped",[12529]],[[13054,13054],"mapped",[12530]],[[13055,13055],"disallowed"],[[13056,13056],"mapped",[12450,12497,12540,12488]],[[13057,13057],"mapped",[12450,12523,12501,12449]],[[13058,13058],"mapped",[12450,12531,12506,12450]],[[13059,13059],"mapped",[12450,12540,12523]],[[13060,13060],"mapped",[12452,12491,12531,12464]],[[13061,13061],"mapped",[12452,12531,12481]],[[13062,13062],"mapped",[12454,12457,12531]],[[13063,13063],"mapped",[12456,12473,12463,12540,12489]],[[13064,13064],"mapped",[12456,12540,12459,12540]],[[13065,13065],"mapped",[12458,12531,12473]],[[13066,13066],"mapped",[12458,12540,12512]],[[13067,13067],"mapped",[12459,12452,12522]],[[13068,13068],"mapped",[12459,12521,12483,12488]],[[13069,13069],"mapped",[12459,12525,12522,12540]],[[13070,13070],"mapped",[12460,12525,12531]],[[13071,13071],"mapped",[12460,12531,12510]],[[13072,13072],"mapped",[12462,12460]],[[13073,13073],"mapped",[12462,12491,12540]],[[13074,13074],"mapped",[12461,12517,12522,12540]],[[13075,13075],"mapped",[12462,12523,12480,12540]],[[13076,13076],"mapped",[12461,12525]],[[13077,13077],"mapped",[12461,12525,12464,12521,12512]],[[13078,13078],"mapped",[12461,12525,12513,12540,12488,12523]],[[13079,13079],"mapped",[12461,12525,12527,12483,12488]],[[13080,13080],"mapped",[12464,12521,12512]],[[13081,13081],"mapped",[12464,12521,12512,12488,12531]],[[13082,13082],"mapped",[12463,12523,12476,12452,12525]],[[13083,13083],"mapped",[12463,12525,12540,12493]],[[13084,13084],"mapped",[12465,12540,12473]],[[13085,13085],"mapped",[12467,12523,12490]],[[13086,13086],"mapped",[12467,12540,12509]],[[13087,13087],"mapped",[12469,12452,12463,12523]],[[13088,13088],"mapped",[12469,12531,12481,12540,12512]],[[13089,13089],"mapped",[12471,12522,12531,12464]],[[13090,13090],"mapped",[12475,12531,12481]],[[13091,13091],"mapped",[12475,12531,12488]],[[13092,13092],"mapped",[12480,12540,12473]],[[13093,13093],"mapped",[12487,12471]],[[13094,13094],"mapped",[12489,12523]],[[13095,13095],"mapped",[12488,12531]],[[13096,13096],"mapped",[12490,12494]],[[13097,13097],"mapped",[12494,12483,12488]],[[13098,13098],"mapped",[12495,12452,12484]],[[13099,13099],"mapped",[12497,12540,12475,12531,12488]],[[13100,13100],"mapped",[12497,12540,12484]],[[13101,13101],"mapped",[12496,12540,12524,12523]],[[13102,13102],"mapped",[12500,12450,12473,12488,12523]],[[13103,13103],"mapped",[12500,12463,12523]],[[13104,13104],"mapped",[12500,12467]],[[13105,13105],"mapped",[12499,12523]],[[13106,13106],"mapped",[12501,12449,12521,12483,12489]],[[13107,13107],"mapped",[12501,12451,12540,12488]],[[13108,13108],"mapped",[12502,12483,12471,12455,12523]],[[13109,13109],"mapped",[12501,12521,12531]],[[13110,13110],"mapped",[12504,12463,12479,12540,12523]],[[13111,13111],"mapped",[12506,12477]],[[13112,13112],"mapped",[12506,12491,12498]],[[13113,13113],"mapped",[12504,12523,12484]],[[13114,13114],"mapped",[12506,12531,12473]],[[13115,13115],"mapped",[12506,12540,12472]],[[13116,13116],"mapped",[12505,12540,12479]],[[13117,13117],"mapped",[12509,12452,12531,12488]],[[13118,13118],"mapped",[12508,12523,12488]],[[13119,13119],"mapped",[12507,12531]],[[13120,13120],"mapped",[12509,12531,12489]],[[13121,13121],"mapped",[12507,12540,12523]],[[13122,13122],"mapped",[12507,12540,12531]],[[13123,13123],"mapped",[12510,12452,12463,12525]],[[13124,13124],"mapped",[12510,12452,12523]],[[13125,13125],"mapped",[12510,12483,12495]],[[13126,13126],"mapped",[12510,12523,12463]],[[13127,13127],"mapped",[12510,12531,12471,12519,12531]],[[13128,13128],"mapped",[12511,12463,12525,12531]],[[13129,13129],"mapped",[12511,12522]],[[13130,13130],"mapped",[12511,12522,12496,12540,12523]],[[13131,13131],"mapped",[12513,12460]],[[13132,13132],"mapped",[12513,12460,12488,12531]],[[13133,13133],"mapped",[12513,12540,12488,12523]],[[13134,13134],"mapped",[12516,12540,12489]],[[13135,13135],"mapped",[12516,12540,12523]],[[13136,13136],"mapped",[12518,12450,12531]],[[13137,13137],"mapped",[12522,12483,12488,12523]],[[13138,13138],"mapped",[12522,12521]],[[13139,13139],"mapped",[12523,12500,12540]],[[13140,13140],"mapped",[12523,12540,12502,12523]],[[13141,13141],"mapped",[12524,12512]],[[13142,13142],"mapped",[12524,12531,12488,12466,12531]],[[13143,13143],"mapped",[12527,12483,12488]],[[13144,13144],"mapped",[48,28857]],[[13145,13145],"mapped",[49,28857]],[[13146,13146],"mapped",[50,28857]],[[13147,13147],"mapped",[51,28857]],[[13148,13148],"mapped",[52,28857]],[[13149,13149],"mapped",[53,28857]],[[13150,13150],"mapped",[54,28857]],[[13151,13151],"mapped",[55,28857]],[[13152,13152],"mapped",[56,28857]],[[13153,13153],"mapped",[57,28857]],[[13154,13154],"mapped",[49,48,28857]],[[13155,13155],"mapped",[49,49,28857]],[[13156,13156],"mapped",[49,50,28857]],[[13157,13157],"mapped",[49,51,28857]],[[13158,13158],"mapped",[49,52,28857]],[[13159,13159],"mapped",[49,53,28857]],[[13160,13160],"mapped",[49,54,28857]],[[13161,13161],"mapped",[49,55,28857]],[[13162,13162],"mapped",[49,56,28857]],[[13163,13163],"mapped",[49,57,28857]],[[13164,13164],"mapped",[50,48,28857]],[[13165,13165],"mapped",[50,49,28857]],[[13166,13166],"mapped",[50,50,28857]],[[13167,13167],"mapped",[50,51,28857]],[[13168,13168],"mapped",[50,52,28857]],[[13169,13169],"mapped",[104,112,97]],[[13170,13170],"mapped",[100,97]],[[13171,13171],"mapped",[97,117]],[[13172,13172],"mapped",[98,97,114]],[[13173,13173],"mapped",[111,118]],[[13174,13174],"mapped",[112,99]],[[13175,13175],"mapped",[100,109]],[[13176,13176],"mapped",[100,109,50]],[[13177,13177],"mapped",[100,109,51]],[[13178,13178],"mapped",[105,117]],[[13179,13179],"mapped",[24179,25104]],[[13180,13180],"mapped",[26157,21644]],[[13181,13181],"mapped",[22823,27491]],[[13182,13182],"mapped",[26126,27835]],[[13183,13183],"mapped",[26666,24335,20250,31038]],[[13184,13184],"mapped",[112,97]],[[13185,13185],"mapped",[110,97]],[[13186,13186],"mapped",[956,97]],[[13187,13187],"mapped",[109,97]],[[13188,13188],"mapped",[107,97]],[[13189,13189],"mapped",[107,98]],[[13190,13190],"mapped",[109,98]],[[13191,13191],"mapped",[103,98]],[[13192,13192],"mapped",[99,97,108]],[[13193,13193],"mapped",[107,99,97,108]],[[13194,13194],"mapped",[112,102]],[[13195,13195],"mapped",[110,102]],[[13196,13196],"mapped",[956,102]],[[13197,13197],"mapped",[956,103]],[[13198,13198],"mapped",[109,103]],[[13199,13199],"mapped",[107,103]],[[13200,13200],"mapped",[104,122]],[[13201,13201],"mapped",[107,104,122]],[[13202,13202],"mapped",[109,104,122]],[[13203,13203],"mapped",[103,104,122]],[[13204,13204],"mapped",[116,104,122]],[[13205,13205],"mapped",[956,108]],[[13206,13206],"mapped",[109,108]],[[13207,13207],"mapped",[100,108]],[[13208,13208],"mapped",[107,108]],[[13209,13209],"mapped",[102,109]],[[13210,13210],"mapped",[110,109]],[[13211,13211],"mapped",[956,109]],[[13212,13212],"mapped",[109,109]],[[13213,13213],"mapped",[99,109]],[[13214,13214],"mapped",[107,109]],[[13215,13215],"mapped",[109,109,50]],[[13216,13216],"mapped",[99,109,50]],[[13217,13217],"mapped",[109,50]],[[13218,13218],"mapped",[107,109,50]],[[13219,13219],"mapped",[109,109,51]],[[13220,13220],"mapped",[99,109,51]],[[13221,13221],"mapped",[109,51]],[[13222,13222],"mapped",[107,109,51]],[[13223,13223],"mapped",[109,8725,115]],[[13224,13224],"mapped",[109,8725,115,50]],[[13225,13225],"mapped",[112,97]],[[13226,13226],"mapped",[107,112,97]],[[13227,13227],"mapped",[109,112,97]],[[13228,13228],"mapped",[103,112,97]],[[13229,13229],"mapped",[114,97,100]],[[13230,13230],"mapped",[114,97,100,8725,115]],[[13231,13231],"mapped",[114,97,100,8725,115,50]],[[13232,13232],"mapped",[112,115]],[[13233,13233],"mapped",[110,115]],[[13234,13234],"mapped",[956,115]],[[13235,13235],"mapped",[109,115]],[[13236,13236],"mapped",[112,118]],[[13237,13237],"mapped",[110,118]],[[13238,13238],"mapped",[956,118]],[[13239,13239],"mapped",[109,118]],[[13240,13240],"mapped",[107,118]],[[13241,13241],"mapped",[109,118]],[[13242,13242],"mapped",[112,119]],[[13243,13243],"mapped",[110,119]],[[13244,13244],"mapped",[956,119]],[[13245,13245],"mapped",[109,119]],[[13246,13246],"mapped",[107,119]],[[13247,13247],"mapped",[109,119]],[[13248,13248],"mapped",[107,969]],[[13249,13249],"mapped",[109,969]],[[13250,13250],"disallowed"],[[13251,13251],"mapped",[98,113]],[[13252,13252],"mapped",[99,99]],[[13253,13253],"mapped",[99,100]],[[13254,13254],"mapped",[99,8725,107,103]],[[13255,13255],"disallowed"],[[13256,13256],"mapped",[100,98]],[[13257,13257],"mapped",[103,121]],[[13258,13258],"mapped",[104,97]],[[13259,13259],"mapped",[104,112]],[[13260,13260],"mapped",[105,110]],[[13261,13261],"mapped",[107,107]],[[13262,13262],"mapped",[107,109]],[[13263,13263],"mapped",[107,116]],[[13264,13264],"mapped",[108,109]],[[13265,13265],"mapped",[108,110]],[[13266,13266],"mapped",[108,111,103]],[[13267,13267],"mapped",[108,120]],[[13268,13268],"mapped",[109,98]],[[13269,13269],"mapped",[109,105,108]],[[13270,13270],"mapped",[109,111,108]],[[13271,13271],"mapped",[112,104]],[[13272,13272],"disallowed"],[[13273,13273],"mapped",[112,112,109]],[[13274,13274],"mapped",[112,114]],[[13275,13275],"mapped",[115,114]],[[13276,13276],"mapped",[115,118]],[[13277,13277],"mapped",[119,98]],[[13278,13278],"mapped",[118,8725,109]],[[13279,13279],"mapped",[97,8725,109]],[[13280,13280],"mapped",[49,26085]],[[13281,13281],"mapped",[50,26085]],[[13282,13282],"mapped",[51,26085]],[[13283,13283],"mapped",[52,26085]],[[13284,13284],"mapped",[53,26085]],[[13285,13285],"mapped",[54,26085]],[[13286,13286],"mapped",[55,26085]],[[13287,13287],"mapped",[56,26085]],[[13288,13288],"mapped",[57,26085]],[[13289,13289],"mapped",[49,48,26085]],[[13290,13290],"mapped",[49,49,26085]],[[13291,13291],"mapped",[49,50,26085]],[[13292,13292],"mapped",[49,51,26085]],[[13293,13293],"mapped",[49,52,26085]],[[13294,13294],"mapped",[49,53,26085]],[[13295,13295],"mapped",[49,54,26085]],[[13296,13296],"mapped",[49,55,26085]],[[13297,13297],"mapped",[49,56,26085]],[[13298,13298],"mapped",[49,57,26085]],[[13299,13299],"mapped",[50,48,26085]],[[13300,13300],"mapped",[50,49,26085]],[[13301,13301],"mapped",[50,50,26085]],[[13302,13302],"mapped",[50,51,26085]],[[13303,13303],"mapped",[50,52,26085]],[[13304,13304],"mapped",[50,53,26085]],[[13305,13305],"mapped",[50,54,26085]],[[13306,13306],"mapped",[50,55,26085]],[[13307,13307],"mapped",[50,56,26085]],[[13308,13308],"mapped",[50,57,26085]],[[13309,13309],"mapped",[51,48,26085]],[[13310,13310],"mapped",[51,49,26085]],[[13311,13311],"mapped",[103,97,108]],[[13312,19893],"valid"],[[19894,19903],"disallowed"],[[19904,19967],"valid",[],"NV8"],[[19968,40869],"valid"],[[40870,40891],"valid"],[[40892,40899],"valid"],[[40900,40907],"valid"],[[40908,40908],"valid"],[[40909,40917],"valid"],[[40918,40959],"disallowed"],[[40960,42124],"valid"],[[42125,42127],"disallowed"],[[42128,42145],"valid",[],"NV8"],[[42146,42147],"valid",[],"NV8"],[[42148,42163],"valid",[],"NV8"],[[42164,42164],"valid",[],"NV8"],[[42165,42176],"valid",[],"NV8"],[[42177,42177],"valid",[],"NV8"],[[42178,42180],"valid",[],"NV8"],[[42181,42181],"valid",[],"NV8"],[[42182,42182],"valid",[],"NV8"],[[42183,42191],"disallowed"],[[42192,42237],"valid"],[[42238,42239],"valid",[],"NV8"],[[42240,42508],"valid"],[[42509,42511],"valid",[],"NV8"],[[42512,42539],"valid"],[[42540,42559],"disallowed"],[[42560,42560],"mapped",[42561]],[[42561,42561],"valid"],[[42562,42562],"mapped",[42563]],[[42563,42563],"valid"],[[42564,42564],"mapped",[42565]],[[42565,42565],"valid"],[[42566,42566],"mapped",[42567]],[[42567,42567],"valid"],[[42568,42568],"mapped",[42569]],[[42569,42569],"valid"],[[42570,42570],"mapped",[42571]],[[42571,42571],"valid"],[[42572,42572],"mapped",[42573]],[[42573,42573],"valid"],[[42574,42574],"mapped",[42575]],[[42575,42575],"valid"],[[42576,42576],"mapped",[42577]],[[42577,42577],"valid"],[[42578,42578],"mapped",[42579]],[[42579,42579],"valid"],[[42580,42580],"mapped",[42581]],[[42581,42581],"valid"],[[42582,42582],"mapped",[42583]],[[42583,42583],"valid"],[[42584,42584],"mapped",[42585]],[[42585,42585],"valid"],[[42586,42586],"mapped",[42587]],[[42587,42587],"valid"],[[42588,42588],"mapped",[42589]],[[42589,42589],"valid"],[[42590,42590],"mapped",[42591]],[[42591,42591],"valid"],[[42592,42592],"mapped",[42593]],[[42593,42593],"valid"],[[42594,42594],"mapped",[42595]],[[42595,42595],"valid"],[[42596,42596],"mapped",[42597]],[[42597,42597],"valid"],[[42598,42598],"mapped",[42599]],[[42599,42599],"valid"],[[42600,42600],"mapped",[42601]],[[42601,42601],"valid"],[[42602,42602],"mapped",[42603]],[[42603,42603],"valid"],[[42604,42604],"mapped",[42605]],[[42605,42607],"valid"],[[42608,42611],"valid",[],"NV8"],[[42612,42619],"valid"],[[42620,42621],"valid"],[[42622,42622],"valid",[],"NV8"],[[42623,42623],"valid"],[[42624,42624],"mapped",[42625]],[[42625,42625],"valid"],[[42626,42626],"mapped",[42627]],[[42627,42627],"valid"],[[42628,42628],"mapped",[42629]],[[42629,42629],"valid"],[[42630,42630],"mapped",[42631]],[[42631,42631],"valid"],[[42632,42632],"mapped",[42633]],[[42633,42633],"valid"],[[42634,42634],"mapped",[42635]],[[42635,42635],"valid"],[[42636,42636],"mapped",[42637]],[[42637,42637],"valid"],[[42638,42638],"mapped",[42639]],[[42639,42639],"valid"],[[42640,42640],"mapped",[42641]],[[42641,42641],"valid"],[[42642,42642],"mapped",[42643]],[[42643,42643],"valid"],[[42644,42644],"mapped",[42645]],[[42645,42645],"valid"],[[42646,42646],"mapped",[42647]],[[42647,42647],"valid"],[[42648,42648],"mapped",[42649]],[[42649,42649],"valid"],[[42650,42650],"mapped",[42651]],[[42651,42651],"valid"],[[42652,42652],"mapped",[1098]],[[42653,42653],"mapped",[1100]],[[42654,42654],"valid"],[[42655,42655],"valid"],[[42656,42725],"valid"],[[42726,42735],"valid",[],"NV8"],[[42736,42737],"valid"],[[42738,42743],"valid",[],"NV8"],[[42744,42751],"disallowed"],[[42752,42774],"valid",[],"NV8"],[[42775,42778],"valid"],[[42779,42783],"valid"],[[42784,42785],"valid",[],"NV8"],[[42786,42786],"mapped",[42787]],[[42787,42787],"valid"],[[42788,42788],"mapped",[42789]],[[42789,42789],"valid"],[[42790,42790],"mapped",[42791]],[[42791,42791],"valid"],[[42792,42792],"mapped",[42793]],[[42793,42793],"valid"],[[42794,42794],"mapped",[42795]],[[42795,42795],"valid"],[[42796,42796],"mapped",[42797]],[[42797,42797],"valid"],[[42798,42798],"mapped",[42799]],[[42799,42801],"valid"],[[42802,42802],"mapped",[42803]],[[42803,42803],"valid"],[[42804,42804],"mapped",[42805]],[[42805,42805],"valid"],[[42806,42806],"mapped",[42807]],[[42807,42807],"valid"],[[42808,42808],"mapped",[42809]],[[42809,42809],"valid"],[[42810,42810],"mapped",[42811]],[[42811,42811],"valid"],[[42812,42812],"mapped",[42813]],[[42813,42813],"valid"],[[42814,42814],"mapped",[42815]],[[42815,42815],"valid"],[[42816,42816],"mapped",[42817]],[[42817,42817],"valid"],[[42818,42818],"mapped",[42819]],[[42819,42819],"valid"],[[42820,42820],"mapped",[42821]],[[42821,42821],"valid"],[[42822,42822],"mapped",[42823]],[[42823,42823],"valid"],[[42824,42824],"mapped",[42825]],[[42825,42825],"valid"],[[42826,42826],"mapped",[42827]],[[42827,42827],"valid"],[[42828,42828],"mapped",[42829]],[[42829,42829],"valid"],[[42830,42830],"mapped",[42831]],[[42831,42831],"valid"],[[42832,42832],"mapped",[42833]],[[42833,42833],"valid"],[[42834,42834],"mapped",[42835]],[[42835,42835],"valid"],[[42836,42836],"mapped",[42837]],[[42837,42837],"valid"],[[42838,42838],"mapped",[42839]],[[42839,42839],"valid"],[[42840,42840],"mapped",[42841]],[[42841,42841],"valid"],[[42842,42842],"mapped",[42843]],[[42843,42843],"valid"],[[42844,42844],"mapped",[42845]],[[42845,42845],"valid"],[[42846,42846],"mapped",[42847]],[[42847,42847],"valid"],[[42848,42848],"mapped",[42849]],[[42849,42849],"valid"],[[42850,42850],"mapped",[42851]],[[42851,42851],"valid"],[[42852,42852],"mapped",[42853]],[[42853,42853],"valid"],[[42854,42854],"mapped",[42855]],[[42855,42855],"valid"],[[42856,42856],"mapped",[42857]],[[42857,42857],"valid"],[[42858,42858],"mapped",[42859]],[[42859,42859],"valid"],[[42860,42860],"mapped",[42861]],[[42861,42861],"valid"],[[42862,42862],"mapped",[42863]],[[42863,42863],"valid"],[[42864,42864],"mapped",[42863]],[[42865,42872],"valid"],[[42873,42873],"mapped",[42874]],[[42874,42874],"valid"],[[42875,42875],"mapped",[42876]],[[42876,42876],"valid"],[[42877,42877],"mapped",[7545]],[[42878,42878],"mapped",[42879]],[[42879,42879],"valid"],[[42880,42880],"mapped",[42881]],[[42881,42881],"valid"],[[42882,42882],"mapped",[42883]],[[42883,42883],"valid"],[[42884,42884],"mapped",[42885]],[[42885,42885],"valid"],[[42886,42886],"mapped",[42887]],[[42887,42888],"valid"],[[42889,42890],"valid",[],"NV8"],[[42891,42891],"mapped",[42892]],[[42892,42892],"valid"],[[42893,42893],"mapped",[613]],[[42894,42894],"valid"],[[42895,42895],"valid"],[[42896,42896],"mapped",[42897]],[[42897,42897],"valid"],[[42898,42898],"mapped",[42899]],[[42899,42899],"valid"],[[42900,42901],"valid"],[[42902,42902],"mapped",[42903]],[[42903,42903],"valid"],[[42904,42904],"mapped",[42905]],[[42905,42905],"valid"],[[42906,42906],"mapped",[42907]],[[42907,42907],"valid"],[[42908,42908],"mapped",[42909]],[[42909,42909],"valid"],[[42910,42910],"mapped",[42911]],[[42911,42911],"valid"],[[42912,42912],"mapped",[42913]],[[42913,42913],"valid"],[[42914,42914],"mapped",[42915]],[[42915,42915],"valid"],[[42916,42916],"mapped",[42917]],[[42917,42917],"valid"],[[42918,42918],"mapped",[42919]],[[42919,42919],"valid"],[[42920,42920],"mapped",[42921]],[[42921,42921],"valid"],[[42922,42922],"mapped",[614]],[[42923,42923],"mapped",[604]],[[42924,42924],"mapped",[609]],[[42925,42925],"mapped",[620]],[[42926,42927],"disallowed"],[[42928,42928],"mapped",[670]],[[42929,42929],"mapped",[647]],[[42930,42930],"mapped",[669]],[[42931,42931],"mapped",[43859]],[[42932,42932],"mapped",[42933]],[[42933,42933],"valid"],[[42934,42934],"mapped",[42935]],[[42935,42935],"valid"],[[42936,42998],"disallowed"],[[42999,42999],"valid"],[[43000,43000],"mapped",[295]],[[43001,43001],"mapped",[339]],[[43002,43002],"valid"],[[43003,43007],"valid"],[[43008,43047],"valid"],[[43048,43051],"valid",[],"NV8"],[[43052,43055],"disallowed"],[[43056,43065],"valid",[],"NV8"],[[43066,43071],"disallowed"],[[43072,43123],"valid"],[[43124,43127],"valid",[],"NV8"],[[43128,43135],"disallowed"],[[43136,43204],"valid"],[[43205,43213],"disallowed"],[[43214,43215],"valid",[],"NV8"],[[43216,43225],"valid"],[[43226,43231],"disallowed"],[[43232,43255],"valid"],[[43256,43258],"valid",[],"NV8"],[[43259,43259],"valid"],[[43260,43260],"valid",[],"NV8"],[[43261,43261],"valid"],[[43262,43263],"disallowed"],[[43264,43309],"valid"],[[43310,43311],"valid",[],"NV8"],[[43312,43347],"valid"],[[43348,43358],"disallowed"],[[43359,43359],"valid",[],"NV8"],[[43360,43388],"valid",[],"NV8"],[[43389,43391],"disallowed"],[[43392,43456],"valid"],[[43457,43469],"valid",[],"NV8"],[[43470,43470],"disallowed"],[[43471,43481],"valid"],[[43482,43485],"disallowed"],[[43486,43487],"valid",[],"NV8"],[[43488,43518],"valid"],[[43519,43519],"disallowed"],[[43520,43574],"valid"],[[43575,43583],"disallowed"],[[43584,43597],"valid"],[[43598,43599],"disallowed"],[[43600,43609],"valid"],[[43610,43611],"disallowed"],[[43612,43615],"valid",[],"NV8"],[[43616,43638],"valid"],[[43639,43641],"valid",[],"NV8"],[[43642,43643],"valid"],[[43644,43647],"valid"],[[43648,43714],"valid"],[[43715,43738],"disallowed"],[[43739,43741],"valid"],[[43742,43743],"valid",[],"NV8"],[[43744,43759],"valid"],[[43760,43761],"valid",[],"NV8"],[[43762,43766],"valid"],[[43767,43776],"disallowed"],[[43777,43782],"valid"],[[43783,43784],"disallowed"],[[43785,43790],"valid"],[[43791,43792],"disallowed"],[[43793,43798],"valid"],[[43799,43807],"disallowed"],[[43808,43814],"valid"],[[43815,43815],"disallowed"],[[43816,43822],"valid"],[[43823,43823],"disallowed"],[[43824,43866],"valid"],[[43867,43867],"valid",[],"NV8"],[[43868,43868],"mapped",[42791]],[[43869,43869],"mapped",[43831]],[[43870,43870],"mapped",[619]],[[43871,43871],"mapped",[43858]],[[43872,43875],"valid"],[[43876,43877],"valid"],[[43878,43887],"disallowed"],[[43888,43888],"mapped",[5024]],[[43889,43889],"mapped",[5025]],[[43890,43890],"mapped",[5026]],[[43891,43891],"mapped",[5027]],[[43892,43892],"mapped",[5028]],[[43893,43893],"mapped",[5029]],[[43894,43894],"mapped",[5030]],[[43895,43895],"mapped",[5031]],[[43896,43896],"mapped",[5032]],[[43897,43897],"mapped",[5033]],[[43898,43898],"mapped",[5034]],[[43899,43899],"mapped",[5035]],[[43900,43900],"mapped",[5036]],[[43901,43901],"mapped",[5037]],[[43902,43902],"mapped",[5038]],[[43903,43903],"mapped",[5039]],[[43904,43904],"mapped",[5040]],[[43905,43905],"mapped",[5041]],[[43906,43906],"mapped",[5042]],[[43907,43907],"mapped",[5043]],[[43908,43908],"mapped",[5044]],[[43909,43909],"mapped",[5045]],[[43910,43910],"mapped",[5046]],[[43911,43911],"mapped",[5047]],[[43912,43912],"mapped",[5048]],[[43913,43913],"mapped",[5049]],[[43914,43914],"mapped",[5050]],[[43915,43915],"mapped",[5051]],[[43916,43916],"mapped",[5052]],[[43917,43917],"mapped",[5053]],[[43918,43918],"mapped",[5054]],[[43919,43919],"mapped",[5055]],[[43920,43920],"mapped",[5056]],[[43921,43921],"mapped",[5057]],[[43922,43922],"mapped",[5058]],[[43923,43923],"mapped",[5059]],[[43924,43924],"mapped",[5060]],[[43925,43925],"mapped",[5061]],[[43926,43926],"mapped",[5062]],[[43927,43927],"mapped",[5063]],[[43928,43928],"mapped",[5064]],[[43929,43929],"mapped",[5065]],[[43930,43930],"mapped",[5066]],[[43931,43931],"mapped",[5067]],[[43932,43932],"mapped",[5068]],[[43933,43933],"mapped",[5069]],[[43934,43934],"mapped",[5070]],[[43935,43935],"mapped",[5071]],[[43936,43936],"mapped",[5072]],[[43937,43937],"mapped",[5073]],[[43938,43938],"mapped",[5074]],[[43939,43939],"mapped",[5075]],[[43940,43940],"mapped",[5076]],[[43941,43941],"mapped",[5077]],[[43942,43942],"mapped",[5078]],[[43943,43943],"mapped",[5079]],[[43944,43944],"mapped",[5080]],[[43945,43945],"mapped",[5081]],[[43946,43946],"mapped",[5082]],[[43947,43947],"mapped",[5083]],[[43948,43948],"mapped",[5084]],[[43949,43949],"mapped",[5085]],[[43950,43950],"mapped",[5086]],[[43951,43951],"mapped",[5087]],[[43952,43952],"mapped",[5088]],[[43953,43953],"mapped",[5089]],[[43954,43954],"mapped",[5090]],[[43955,43955],"mapped",[5091]],[[43956,43956],"mapped",[5092]],[[43957,43957],"mapped",[5093]],[[43958,43958],"mapped",[5094]],[[43959,43959],"mapped",[5095]],[[43960,43960],"mapped",[5096]],[[43961,43961],"mapped",[5097]],[[43962,43962],"mapped",[5098]],[[43963,43963],"mapped",[5099]],[[43964,43964],"mapped",[5100]],[[43965,43965],"mapped",[5101]],[[43966,43966],"mapped",[5102]],[[43967,43967],"mapped",[5103]],[[43968,44010],"valid"],[[44011,44011],"valid",[],"NV8"],[[44012,44013],"valid"],[[44014,44015],"disallowed"],[[44016,44025],"valid"],[[44026,44031],"disallowed"],[[44032,55203],"valid"],[[55204,55215],"disallowed"],[[55216,55238],"valid",[],"NV8"],[[55239,55242],"disallowed"],[[55243,55291],"valid",[],"NV8"],[[55292,55295],"disallowed"],[[55296,57343],"disallowed"],[[57344,63743],"disallowed"],[[63744,63744],"mapped",[35912]],[[63745,63745],"mapped",[26356]],[[63746,63746],"mapped",[36554]],[[63747,63747],"mapped",[36040]],[[63748,63748],"mapped",[28369]],[[63749,63749],"mapped",[20018]],[[63750,63750],"mapped",[21477]],[[63751,63752],"mapped",[40860]],[[63753,63753],"mapped",[22865]],[[63754,63754],"mapped",[37329]],[[63755,63755],"mapped",[21895]],[[63756,63756],"mapped",[22856]],[[63757,63757],"mapped",[25078]],[[63758,63758],"mapped",[30313]],[[63759,63759],"mapped",[32645]],[[63760,63760],"mapped",[34367]],[[63761,63761],"mapped",[34746]],[[63762,63762],"mapped",[35064]],[[63763,63763],"mapped",[37007]],[[63764,63764],"mapped",[27138]],[[63765,63765],"mapped",[27931]],[[63766,63766],"mapped",[28889]],[[63767,63767],"mapped",[29662]],[[63768,63768],"mapped",[33853]],[[63769,63769],"mapped",[37226]],[[63770,63770],"mapped",[39409]],[[63771,63771],"mapped",[20098]],[[63772,63772],"mapped",[21365]],[[63773,63773],"mapped",[27396]],[[63774,63774],"mapped",[29211]],[[63775,63775],"mapped",[34349]],[[63776,63776],"mapped",[40478]],[[63777,63777],"mapped",[23888]],[[63778,63778],"mapped",[28651]],[[63779,63779],"mapped",[34253]],[[63780,63780],"mapped",[35172]],[[63781,63781],"mapped",[25289]],[[63782,63782],"mapped",[33240]],[[63783,63783],"mapped",[34847]],[[63784,63784],"mapped",[24266]],[[63785,63785],"mapped",[26391]],[[63786,63786],"mapped",[28010]],[[63787,63787],"mapped",[29436]],[[63788,63788],"mapped",[37070]],[[63789,63789],"mapped",[20358]],[[63790,63790],"mapped",[20919]],[[63791,63791],"mapped",[21214]],[[63792,63792],"mapped",[25796]],[[63793,63793],"mapped",[27347]],[[63794,63794],"mapped",[29200]],[[63795,63795],"mapped",[30439]],[[63796,63796],"mapped",[32769]],[[63797,63797],"mapped",[34310]],[[63798,63798],"mapped",[34396]],[[63799,63799],"mapped",[36335]],[[63800,63800],"mapped",[38706]],[[63801,63801],"mapped",[39791]],[[63802,63802],"mapped",[40442]],[[63803,63803],"mapped",[30860]],[[63804,63804],"mapped",[31103]],[[63805,63805],"mapped",[32160]],[[63806,63806],"mapped",[33737]],[[63807,63807],"mapped",[37636]],[[63808,63808],"mapped",[40575]],[[63809,63809],"mapped",[35542]],[[63810,63810],"mapped",[22751]],[[63811,63811],"mapped",[24324]],[[63812,63812],"mapped",[31840]],[[63813,63813],"mapped",[32894]],[[63814,63814],"mapped",[29282]],[[63815,63815],"mapped",[30922]],[[63816,63816],"mapped",[36034]],[[63817,63817],"mapped",[38647]],[[63818,63818],"mapped",[22744]],[[63819,63819],"mapped",[23650]],[[63820,63820],"mapped",[27155]],[[63821,63821],"mapped",[28122]],[[63822,63822],"mapped",[28431]],[[63823,63823],"mapped",[32047]],[[63824,63824],"mapped",[32311]],[[63825,63825],"mapped",[38475]],[[63826,63826],"mapped",[21202]],[[63827,63827],"mapped",[32907]],[[63828,63828],"mapped",[20956]],[[63829,63829],"mapped",[20940]],[[63830,63830],"mapped",[31260]],[[63831,63831],"mapped",[32190]],[[63832,63832],"mapped",[33777]],[[63833,63833],"mapped",[38517]],[[63834,63834],"mapped",[35712]],[[63835,63835],"mapped",[25295]],[[63836,63836],"mapped",[27138]],[[63837,63837],"mapped",[35582]],[[63838,63838],"mapped",[20025]],[[63839,63839],"mapped",[23527]],[[63840,63840],"mapped",[24594]],[[63841,63841],"mapped",[29575]],[[63842,63842],"mapped",[30064]],[[63843,63843],"mapped",[21271]],[[63844,63844],"mapped",[30971]],[[63845,63845],"mapped",[20415]],[[63846,63846],"mapped",[24489]],[[63847,63847],"mapped",[19981]],[[63848,63848],"mapped",[27852]],[[63849,63849],"mapped",[25976]],[[63850,63850],"mapped",[32034]],[[63851,63851],"mapped",[21443]],[[63852,63852],"mapped",[22622]],[[63853,63853],"mapped",[30465]],[[63854,63854],"mapped",[33865]],[[63855,63855],"mapped",[35498]],[[63856,63856],"mapped",[27578]],[[63857,63857],"mapped",[36784]],[[63858,63858],"mapped",[27784]],[[63859,63859],"mapped",[25342]],[[63860,63860],"mapped",[33509]],[[63861,63861],"mapped",[25504]],[[63862,63862],"mapped",[30053]],[[63863,63863],"mapped",[20142]],[[63864,63864],"mapped",[20841]],[[63865,63865],"mapped",[20937]],[[63866,63866],"mapped",[26753]],[[63867,63867],"mapped",[31975]],[[63868,63868],"mapped",[33391]],[[63869,63869],"mapped",[35538]],[[63870,63870],"mapped",[37327]],[[63871,63871],"mapped",[21237]],[[63872,63872],"mapped",[21570]],[[63873,63873],"mapped",[22899]],[[63874,63874],"mapped",[24300]],[[63875,63875],"mapped",[26053]],[[63876,63876],"mapped",[28670]],[[63877,63877],"mapped",[31018]],[[63878,63878],"mapped",[38317]],[[63879,63879],"mapped",[39530]],[[63880,63880],"mapped",[40599]],[[63881,63881],"mapped",[40654]],[[63882,63882],"mapped",[21147]],[[63883,63883],"mapped",[26310]],[[63884,63884],"mapped",[27511]],[[63885,63885],"mapped",[36706]],[[63886,63886],"mapped",[24180]],[[63887,63887],"mapped",[24976]],[[63888,63888],"mapped",[25088]],[[63889,63889],"mapped",[25754]],[[63890,63890],"mapped",[28451]],[[63891,63891],"mapped",[29001]],[[63892,63892],"mapped",[29833]],[[63893,63893],"mapped",[31178]],[[63894,63894],"mapped",[32244]],[[63895,63895],"mapped",[32879]],[[63896,63896],"mapped",[36646]],[[63897,63897],"mapped",[34030]],[[63898,63898],"mapped",[36899]],[[63899,63899],"mapped",[37706]],[[63900,63900],"mapped",[21015]],[[63901,63901],"mapped",[21155]],[[63902,63902],"mapped",[21693]],[[63903,63903],"mapped",[28872]],[[63904,63904],"mapped",[35010]],[[63905,63905],"mapped",[35498]],[[63906,63906],"mapped",[24265]],[[63907,63907],"mapped",[24565]],[[63908,63908],"mapped",[25467]],[[63909,63909],"mapped",[27566]],[[63910,63910],"mapped",[31806]],[[63911,63911],"mapped",[29557]],[[63912,63912],"mapped",[20196]],[[63913,63913],"mapped",[22265]],[[63914,63914],"mapped",[23527]],[[63915,63915],"mapped",[23994]],[[63916,63916],"mapped",[24604]],[[63917,63917],"mapped",[29618]],[[63918,63918],"mapped",[29801]],[[63919,63919],"mapped",[32666]],[[63920,63920],"mapped",[32838]],[[63921,63921],"mapped",[37428]],[[63922,63922],"mapped",[38646]],[[63923,63923],"mapped",[38728]],[[63924,63924],"mapped",[38936]],[[63925,63925],"mapped",[20363]],[[63926,63926],"mapped",[31150]],[[63927,63927],"mapped",[37300]],[[63928,63928],"mapped",[38584]],[[63929,63929],"mapped",[24801]],[[63930,63930],"mapped",[20102]],[[63931,63931],"mapped",[20698]],[[63932,63932],"mapped",[23534]],[[63933,63933],"mapped",[23615]],[[63934,63934],"mapped",[26009]],[[63935,63935],"mapped",[27138]],[[63936,63936],"mapped",[29134]],[[63937,63937],"mapped",[30274]],[[63938,63938],"mapped",[34044]],[[63939,63939],"mapped",[36988]],[[63940,63940],"mapped",[40845]],[[63941,63941],"mapped",[26248]],[[63942,63942],"mapped",[38446]],[[63943,63943],"mapped",[21129]],[[63944,63944],"mapped",[26491]],[[63945,63945],"mapped",[26611]],[[63946,63946],"mapped",[27969]],[[63947,63947],"mapped",[28316]],[[63948,63948],"mapped",[29705]],[[63949,63949],"mapped",[30041]],[[63950,63950],"mapped",[30827]],[[63951,63951],"mapped",[32016]],[[63952,63952],"mapped",[39006]],[[63953,63953],"mapped",[20845]],[[63954,63954],"mapped",[25134]],[[63955,63955],"mapped",[38520]],[[63956,63956],"mapped",[20523]],[[63957,63957],"mapped",[23833]],[[63958,63958],"mapped",[28138]],[[63959,63959],"mapped",[36650]],[[63960,63960],"mapped",[24459]],[[63961,63961],"mapped",[24900]],[[63962,63962],"mapped",[26647]],[[63963,63963],"mapped",[29575]],[[63964,63964],"mapped",[38534]],[[63965,63965],"mapped",[21033]],[[63966,63966],"mapped",[21519]],[[63967,63967],"mapped",[23653]],[[63968,63968],"mapped",[26131]],[[63969,63969],"mapped",[26446]],[[63970,63970],"mapped",[26792]],[[63971,63971],"mapped",[27877]],[[63972,63972],"mapped",[29702]],[[63973,63973],"mapped",[30178]],[[63974,63974],"mapped",[32633]],[[63975,63975],"mapped",[35023]],[[63976,63976],"mapped",[35041]],[[63977,63977],"mapped",[37324]],[[63978,63978],"mapped",[38626]],[[63979,63979],"mapped",[21311]],[[63980,63980],"mapped",[28346]],[[63981,63981],"mapped",[21533]],[[63982,63982],"mapped",[29136]],[[63983,63983],"mapped",[29848]],[[63984,63984],"mapped",[34298]],[[63985,63985],"mapped",[38563]],[[63986,63986],"mapped",[40023]],[[63987,63987],"mapped",[40607]],[[63988,63988],"mapped",[26519]],[[63989,63989],"mapped",[28107]],[[63990,63990],"mapped",[33256]],[[63991,63991],"mapped",[31435]],[[63992,63992],"mapped",[31520]],[[63993,63993],"mapped",[31890]],[[63994,63994],"mapped",[29376]],[[63995,63995],"mapped",[28825]],[[63996,63996],"mapped",[35672]],[[63997,63997],"mapped",[20160]],[[63998,63998],"mapped",[33590]],[[63999,63999],"mapped",[21050]],[[64000,64000],"mapped",[20999]],[[64001,64001],"mapped",[24230]],[[64002,64002],"mapped",[25299]],[[64003,64003],"mapped",[31958]],[[64004,64004],"mapped",[23429]],[[64005,64005],"mapped",[27934]],[[64006,64006],"mapped",[26292]],[[64007,64007],"mapped",[36667]],[[64008,64008],"mapped",[34892]],[[64009,64009],"mapped",[38477]],[[64010,64010],"mapped",[35211]],[[64011,64011],"mapped",[24275]],[[64012,64012],"mapped",[20800]],[[64013,64013],"mapped",[21952]],[[64014,64015],"valid"],[[64016,64016],"mapped",[22618]],[[64017,64017],"valid"],[[64018,64018],"mapped",[26228]],[[64019,64020],"valid"],[[64021,64021],"mapped",[20958]],[[64022,64022],"mapped",[29482]],[[64023,64023],"mapped",[30410]],[[64024,64024],"mapped",[31036]],[[64025,64025],"mapped",[31070]],[[64026,64026],"mapped",[31077]],[[64027,64027],"mapped",[31119]],[[64028,64028],"mapped",[38742]],[[64029,64029],"mapped",[31934]],[[64030,64030],"mapped",[32701]],[[64031,64031],"valid"],[[64032,64032],"mapped",[34322]],[[64033,64033],"valid"],[[64034,64034],"mapped",[35576]],[[64035,64036],"valid"],[[64037,64037],"mapped",[36920]],[[64038,64038],"mapped",[37117]],[[64039,64041],"valid"],[[64042,64042],"mapped",[39151]],[[64043,64043],"mapped",[39164]],[[64044,64044],"mapped",[39208]],[[64045,64045],"mapped",[40372]],[[64046,64046],"mapped",[37086]],[[64047,64047],"mapped",[38583]],[[64048,64048],"mapped",[20398]],[[64049,64049],"mapped",[20711]],[[64050,64050],"mapped",[20813]],[[64051,64051],"mapped",[21193]],[[64052,64052],"mapped",[21220]],[[64053,64053],"mapped",[21329]],[[64054,64054],"mapped",[21917]],[[64055,64055],"mapped",[22022]],[[64056,64056],"mapped",[22120]],[[64057,64057],"mapped",[22592]],[[64058,64058],"mapped",[22696]],[[64059,64059],"mapped",[23652]],[[64060,64060],"mapped",[23662]],[[64061,64061],"mapped",[24724]],[[64062,64062],"mapped",[24936]],[[64063,64063],"mapped",[24974]],[[64064,64064],"mapped",[25074]],[[64065,64065],"mapped",[25935]],[[64066,64066],"mapped",[26082]],[[64067,64067],"mapped",[26257]],[[64068,64068],"mapped",[26757]],[[64069,64069],"mapped",[28023]],[[64070,64070],"mapped",[28186]],[[64071,64071],"mapped",[28450]],[[64072,64072],"mapped",[29038]],[[64073,64073],"mapped",[29227]],[[64074,64074],"mapped",[29730]],[[64075,64075],"mapped",[30865]],[[64076,64076],"mapped",[31038]],[[64077,64077],"mapped",[31049]],[[64078,64078],"mapped",[31048]],[[64079,64079],"mapped",[31056]],[[64080,64080],"mapped",[31062]],[[64081,64081],"mapped",[31069]],[[64082,64082],"mapped",[31117]],[[64083,64083],"mapped",[31118]],[[64084,64084],"mapped",[31296]],[[64085,64085],"mapped",[31361]],[[64086,64086],"mapped",[31680]],[[64087,64087],"mapped",[32244]],[[64088,64088],"mapped",[32265]],[[64089,64089],"mapped",[32321]],[[64090,64090],"mapped",[32626]],[[64091,64091],"mapped",[32773]],[[64092,64092],"mapped",[33261]],[[64093,64094],"mapped",[33401]],[[64095,64095],"mapped",[33879]],[[64096,64096],"mapped",[35088]],[[64097,64097],"mapped",[35222]],[[64098,64098],"mapped",[35585]],[[64099,64099],"mapped",[35641]],[[64100,64100],"mapped",[36051]],[[64101,64101],"mapped",[36104]],[[64102,64102],"mapped",[36790]],[[64103,64103],"mapped",[36920]],[[64104,64104],"mapped",[38627]],[[64105,64105],"mapped",[38911]],[[64106,64106],"mapped",[38971]],[[64107,64107],"mapped",[24693]],[[64108,64108],"mapped",[148206]],[[64109,64109],"mapped",[33304]],[[64110,64111],"disallowed"],[[64112,64112],"mapped",[20006]],[[64113,64113],"mapped",[20917]],[[64114,64114],"mapped",[20840]],[[64115,64115],"mapped",[20352]],[[64116,64116],"mapped",[20805]],[[64117,64117],"mapped",[20864]],[[64118,64118],"mapped",[21191]],[[64119,64119],"mapped",[21242]],[[64120,64120],"mapped",[21917]],[[64121,64121],"mapped",[21845]],[[64122,64122],"mapped",[21913]],[[64123,64123],"mapped",[21986]],[[64124,64124],"mapped",[22618]],[[64125,64125],"mapped",[22707]],[[64126,64126],"mapped",[22852]],[[64127,64127],"mapped",[22868]],[[64128,64128],"mapped",[23138]],[[64129,64129],"mapped",[23336]],[[64130,64130],"mapped",[24274]],[[64131,64131],"mapped",[24281]],[[64132,64132],"mapped",[24425]],[[64133,64133],"mapped",[24493]],[[64134,64134],"mapped",[24792]],[[64135,64135],"mapped",[24910]],[[64136,64136],"mapped",[24840]],[[64137,64137],"mapped",[24974]],[[64138,64138],"mapped",[24928]],[[64139,64139],"mapped",[25074]],[[64140,64140],"mapped",[25140]],[[64141,64141],"mapped",[25540]],[[64142,64142],"mapped",[25628]],[[64143,64143],"mapped",[25682]],[[64144,64144],"mapped",[25942]],[[64145,64145],"mapped",[26228]],[[64146,64146],"mapped",[26391]],[[64147,64147],"mapped",[26395]],[[64148,64148],"mapped",[26454]],[[64149,64149],"mapped",[27513]],[[64150,64150],"mapped",[27578]],[[64151,64151],"mapped",[27969]],[[64152,64152],"mapped",[28379]],[[64153,64153],"mapped",[28363]],[[64154,64154],"mapped",[28450]],[[64155,64155],"mapped",[28702]],[[64156,64156],"mapped",[29038]],[[64157,64157],"mapped",[30631]],[[64158,64158],"mapped",[29237]],[[64159,64159],"mapped",[29359]],[[64160,64160],"mapped",[29482]],[[64161,64161],"mapped",[29809]],[[64162,64162],"mapped",[29958]],[[64163,64163],"mapped",[30011]],[[64164,64164],"mapped",[30237]],[[64165,64165],"mapped",[30239]],[[64166,64166],"mapped",[30410]],[[64167,64167],"mapped",[30427]],[[64168,64168],"mapped",[30452]],[[64169,64169],"mapped",[30538]],[[64170,64170],"mapped",[30528]],[[64171,64171],"mapped",[30924]],[[64172,64172],"mapped",[31409]],[[64173,64173],"mapped",[31680]],[[64174,64174],"mapped",[31867]],[[64175,64175],"mapped",[32091]],[[64176,64176],"mapped",[32244]],[[64177,64177],"mapped",[32574]],[[64178,64178],"mapped",[32773]],[[64179,64179],"mapped",[33618]],[[64180,64180],"mapped",[33775]],[[64181,64181],"mapped",[34681]],[[64182,64182],"mapped",[35137]],[[64183,64183],"mapped",[35206]],[[64184,64184],"mapped",[35222]],[[64185,64185],"mapped",[35519]],[[64186,64186],"mapped",[35576]],[[64187,64187],"mapped",[35531]],[[64188,64188],"mapped",[35585]],[[64189,64189],"mapped",[35582]],[[64190,64190],"mapped",[35565]],[[64191,64191],"mapped",[35641]],[[64192,64192],"mapped",[35722]],[[64193,64193],"mapped",[36104]],[[64194,64194],"mapped",[36664]],[[64195,64195],"mapped",[36978]],[[64196,64196],"mapped",[37273]],[[64197,64197],"mapped",[37494]],[[64198,64198],"mapped",[38524]],[[64199,64199],"mapped",[38627]],[[64200,64200],"mapped",[38742]],[[64201,64201],"mapped",[38875]],[[64202,64202],"mapped",[38911]],[[64203,64203],"mapped",[38923]],[[64204,64204],"mapped",[38971]],[[64205,64205],"mapped",[39698]],[[64206,64206],"mapped",[40860]],[[64207,64207],"mapped",[141386]],[[64208,64208],"mapped",[141380]],[[64209,64209],"mapped",[144341]],[[64210,64210],"mapped",[15261]],[[64211,64211],"mapped",[16408]],[[64212,64212],"mapped",[16441]],[[64213,64213],"mapped",[152137]],[[64214,64214],"mapped",[154832]],[[64215,64215],"mapped",[163539]],[[64216,64216],"mapped",[40771]],[[64217,64217],"mapped",[40846]],[[64218,64255],"disallowed"],[[64256,64256],"mapped",[102,102]],[[64257,64257],"mapped",[102,105]],[[64258,64258],"mapped",[102,108]],[[64259,64259],"mapped",[102,102,105]],[[64260,64260],"mapped",[102,102,108]],[[64261,64262],"mapped",[115,116]],[[64263,64274],"disallowed"],[[64275,64275],"mapped",[1396,1398]],[[64276,64276],"mapped",[1396,1381]],[[64277,64277],"mapped",[1396,1387]],[[64278,64278],"mapped",[1406,1398]],[[64279,64279],"mapped",[1396,1389]],[[64280,64284],"disallowed"],[[64285,64285],"mapped",[1497,1460]],[[64286,64286],"valid"],[[64287,64287],"mapped",[1522,1463]],[[64288,64288],"mapped",[1506]],[[64289,64289],"mapped",[1488]],[[64290,64290],"mapped",[1491]],[[64291,64291],"mapped",[1492]],[[64292,64292],"mapped",[1499]],[[64293,64293],"mapped",[1500]],[[64294,64294],"mapped",[1501]],[[64295,64295],"mapped",[1512]],[[64296,64296],"mapped",[1514]],[[64297,64297],"disallowed_STD3_mapped",[43]],[[64298,64298],"mapped",[1513,1473]],[[64299,64299],"mapped",[1513,1474]],[[64300,64300],"mapped",[1513,1468,1473]],[[64301,64301],"mapped",[1513,1468,1474]],[[64302,64302],"mapped",[1488,1463]],[[64303,64303],"mapped",[1488,1464]],[[64304,64304],"mapped",[1488,1468]],[[64305,64305],"mapped",[1489,1468]],[[64306,64306],"mapped",[1490,1468]],[[64307,64307],"mapped",[1491,1468]],[[64308,64308],"mapped",[1492,1468]],[[64309,64309],"mapped",[1493,1468]],[[64310,64310],"mapped",[1494,1468]],[[64311,64311],"disallowed"],[[64312,64312],"mapped",[1496,1468]],[[64313,64313],"mapped",[1497,1468]],[[64314,64314],"mapped",[1498,1468]],[[64315,64315],"mapped",[1499,1468]],[[64316,64316],"mapped",[1500,1468]],[[64317,64317],"disallowed"],[[64318,64318],"mapped",[1502,1468]],[[64319,64319],"disallowed"],[[64320,64320],"mapped",[1504,1468]],[[64321,64321],"mapped",[1505,1468]],[[64322,64322],"disallowed"],[[64323,64323],"mapped",[1507,1468]],[[64324,64324],"mapped",[1508,1468]],[[64325,64325],"disallowed"],[[64326,64326],"mapped",[1510,1468]],[[64327,64327],"mapped",[1511,1468]],[[64328,64328],"mapped",[1512,1468]],[[64329,64329],"mapped",[1513,1468]],[[64330,64330],"mapped",[1514,1468]],[[64331,64331],"mapped",[1493,1465]],[[64332,64332],"mapped",[1489,1471]],[[64333,64333],"mapped",[1499,1471]],[[64334,64334],"mapped",[1508,1471]],[[64335,64335],"mapped",[1488,1500]],[[64336,64337],"mapped",[1649]],[[64338,64341],"mapped",[1659]],[[64342,64345],"mapped",[1662]],[[64346,64349],"mapped",[1664]],[[64350,64353],"mapped",[1658]],[[64354,64357],"mapped",[1663]],[[64358,64361],"mapped",[1657]],[[64362,64365],"mapped",[1700]],[[64366,64369],"mapped",[1702]],[[64370,64373],"mapped",[1668]],[[64374,64377],"mapped",[1667]],[[64378,64381],"mapped",[1670]],[[64382,64385],"mapped",[1671]],[[64386,64387],"mapped",[1677]],[[64388,64389],"mapped",[1676]],[[64390,64391],"mapped",[1678]],[[64392,64393],"mapped",[1672]],[[64394,64395],"mapped",[1688]],[[64396,64397],"mapped",[1681]],[[64398,64401],"mapped",[1705]],[[64402,64405],"mapped",[1711]],[[64406,64409],"mapped",[1715]],[[64410,64413],"mapped",[1713]],[[64414,64415],"mapped",[1722]],[[64416,64419],"mapped",[1723]],[[64420,64421],"mapped",[1728]],[[64422,64425],"mapped",[1729]],[[64426,64429],"mapped",[1726]],[[64430,64431],"mapped",[1746]],[[64432,64433],"mapped",[1747]],[[64434,64449],"valid",[],"NV8"],[[64450,64466],"disallowed"],[[64467,64470],"mapped",[1709]],[[64471,64472],"mapped",[1735]],[[64473,64474],"mapped",[1734]],[[64475,64476],"mapped",[1736]],[[64477,64477],"mapped",[1735,1652]],[[64478,64479],"mapped",[1739]],[[64480,64481],"mapped",[1733]],[[64482,64483],"mapped",[1737]],[[64484,64487],"mapped",[1744]],[[64488,64489],"mapped",[1609]],[[64490,64491],"mapped",[1574,1575]],[[64492,64493],"mapped",[1574,1749]],[[64494,64495],"mapped",[1574,1608]],[[64496,64497],"mapped",[1574,1735]],[[64498,64499],"mapped",[1574,1734]],[[64500,64501],"mapped",[1574,1736]],[[64502,64504],"mapped",[1574,1744]],[[64505,64507],"mapped",[1574,1609]],[[64508,64511],"mapped",[1740]],[[64512,64512],"mapped",[1574,1580]],[[64513,64513],"mapped",[1574,1581]],[[64514,64514],"mapped",[1574,1605]],[[64515,64515],"mapped",[1574,1609]],[[64516,64516],"mapped",[1574,1610]],[[64517,64517],"mapped",[1576,1580]],[[64518,64518],"mapped",[1576,1581]],[[64519,64519],"mapped",[1576,1582]],[[64520,64520],"mapped",[1576,1605]],[[64521,64521],"mapped",[1576,1609]],[[64522,64522],"mapped",[1576,1610]],[[64523,64523],"mapped",[1578,1580]],[[64524,64524],"mapped",[1578,1581]],[[64525,64525],"mapped",[1578,1582]],[[64526,64526],"mapped",[1578,1605]],[[64527,64527],"mapped",[1578,1609]],[[64528,64528],"mapped",[1578,1610]],[[64529,64529],"mapped",[1579,1580]],[[64530,64530],"mapped",[1579,1605]],[[64531,64531],"mapped",[1579,1609]],[[64532,64532],"mapped",[1579,1610]],[[64533,64533],"mapped",[1580,1581]],[[64534,64534],"mapped",[1580,1605]],[[64535,64535],"mapped",[1581,1580]],[[64536,64536],"mapped",[1581,1605]],[[64537,64537],"mapped",[1582,1580]],[[64538,64538],"mapped",[1582,1581]],[[64539,64539],"mapped",[1582,1605]],[[64540,64540],"mapped",[1587,1580]],[[64541,64541],"mapped",[1587,1581]],[[64542,64542],"mapped",[1587,1582]],[[64543,64543],"mapped",[1587,1605]],[[64544,64544],"mapped",[1589,1581]],[[64545,64545],"mapped",[1589,1605]],[[64546,64546],"mapped",[1590,1580]],[[64547,64547],"mapped",[1590,1581]],[[64548,64548],"mapped",[1590,1582]],[[64549,64549],"mapped",[1590,1605]],[[64550,64550],"mapped",[1591,1581]],[[64551,64551],"mapped",[1591,1605]],[[64552,64552],"mapped",[1592,1605]],[[64553,64553],"mapped",[1593,1580]],[[64554,64554],"mapped",[1593,1605]],[[64555,64555],"mapped",[1594,1580]],[[64556,64556],"mapped",[1594,1605]],[[64557,64557],"mapped",[1601,1580]],[[64558,64558],"mapped",[1601,1581]],[[64559,64559],"mapped",[1601,1582]],[[64560,64560],"mapped",[1601,1605]],[[64561,64561],"mapped",[1601,1609]],[[64562,64562],"mapped",[1601,1610]],[[64563,64563],"mapped",[1602,1581]],[[64564,64564],"mapped",[1602,1605]],[[64565,64565],"mapped",[1602,1609]],[[64566,64566],"mapped",[1602,1610]],[[64567,64567],"mapped",[1603,1575]],[[64568,64568],"mapped",[1603,1580]],[[64569,64569],"mapped",[1603,1581]],[[64570,64570],"mapped",[1603,1582]],[[64571,64571],"mapped",[1603,1604]],[[64572,64572],"mapped",[1603,1605]],[[64573,64573],"mapped",[1603,1609]],[[64574,64574],"mapped",[1603,1610]],[[64575,64575],"mapped",[1604,1580]],[[64576,64576],"mapped",[1604,1581]],[[64577,64577],"mapped",[1604,1582]],[[64578,64578],"mapped",[1604,1605]],[[64579,64579],"mapped",[1604,1609]],[[64580,64580],"mapped",[1604,1610]],[[64581,64581],"mapped",[1605,1580]],[[64582,64582],"mapped",[1605,1581]],[[64583,64583],"mapped",[1605,1582]],[[64584,64584],"mapped",[1605,1605]],[[64585,64585],"mapped",[1605,1609]],[[64586,64586],"mapped",[1605,1610]],[[64587,64587],"mapped",[1606,1580]],[[64588,64588],"mapped",[1606,1581]],[[64589,64589],"mapped",[1606,1582]],[[64590,64590],"mapped",[1606,1605]],[[64591,64591],"mapped",[1606,1609]],[[64592,64592],"mapped",[1606,1610]],[[64593,64593],"mapped",[1607,1580]],[[64594,64594],"mapped",[1607,1605]],[[64595,64595],"mapped",[1607,1609]],[[64596,64596],"mapped",[1607,1610]],[[64597,64597],"mapped",[1610,1580]],[[64598,64598],"mapped",[1610,1581]],[[64599,64599],"mapped",[1610,1582]],[[64600,64600],"mapped",[1610,1605]],[[64601,64601],"mapped",[1610,1609]],[[64602,64602],"mapped",[1610,1610]],[[64603,64603],"mapped",[1584,1648]],[[64604,64604],"mapped",[1585,1648]],[[64605,64605],"mapped",[1609,1648]],[[64606,64606],"disallowed_STD3_mapped",[32,1612,1617]],[[64607,64607],"disallowed_STD3_mapped",[32,1613,1617]],[[64608,64608],"disallowed_STD3_mapped",[32,1614,1617]],[[64609,64609],"disallowed_STD3_mapped",[32,1615,1617]],[[64610,64610],"disallowed_STD3_mapped",[32,1616,1617]],[[64611,64611],"disallowed_STD3_mapped",[32,1617,1648]],[[64612,64612],"mapped",[1574,1585]],[[64613,64613],"mapped",[1574,1586]],[[64614,64614],"mapped",[1574,1605]],[[64615,64615],"mapped",[1574,1606]],[[64616,64616],"mapped",[1574,1609]],[[64617,64617],"mapped",[1574,1610]],[[64618,64618],"mapped",[1576,1585]],[[64619,64619],"mapped",[1576,1586]],[[64620,64620],"mapped",[1576,1605]],[[64621,64621],"mapped",[1576,1606]],[[64622,64622],"mapped",[1576,1609]],[[64623,64623],"mapped",[1576,1610]],[[64624,64624],"mapped",[1578,1585]],[[64625,64625],"mapped",[1578,1586]],[[64626,64626],"mapped",[1578,1605]],[[64627,64627],"mapped",[1578,1606]],[[64628,64628],"mapped",[1578,1609]],[[64629,64629],"mapped",[1578,1610]],[[64630,64630],"mapped",[1579,1585]],[[64631,64631],"mapped",[1579,1586]],[[64632,64632],"mapped",[1579,1605]],[[64633,64633],"mapped",[1579,1606]],[[64634,64634],"mapped",[1579,1609]],[[64635,64635],"mapped",[1579,1610]],[[64636,64636],"mapped",[1601,1609]],[[64637,64637],"mapped",[1601,1610]],[[64638,64638],"mapped",[1602,1609]],[[64639,64639],"mapped",[1602,1610]],[[64640,64640],"mapped",[1603,1575]],[[64641,64641],"mapped",[1603,1604]],[[64642,64642],"mapped",[1603,1605]],[[64643,64643],"mapped",[1603,1609]],[[64644,64644],"mapped",[1603,1610]],[[64645,64645],"mapped",[1604,1605]],[[64646,64646],"mapped",[1604,1609]],[[64647,64647],"mapped",[1604,1610]],[[64648,64648],"mapped",[1605,1575]],[[64649,64649],"mapped",[1605,1605]],[[64650,64650],"mapped",[1606,1585]],[[64651,64651],"mapped",[1606,1586]],[[64652,64652],"mapped",[1606,1605]],[[64653,64653],"mapped",[1606,1606]],[[64654,64654],"mapped",[1606,1609]],[[64655,64655],"mapped",[1606,1610]],[[64656,64656],"mapped",[1609,1648]],[[64657,64657],"mapped",[1610,1585]],[[64658,64658],"mapped",[1610,1586]],[[64659,64659],"mapped",[1610,1605]],[[64660,64660],"mapped",[1610,1606]],[[64661,64661],"mapped",[1610,1609]],[[64662,64662],"mapped",[1610,1610]],[[64663,64663],"mapped",[1574,1580]],[[64664,64664],"mapped",[1574,1581]],[[64665,64665],"mapped",[1574,1582]],[[64666,64666],"mapped",[1574,1605]],[[64667,64667],"mapped",[1574,1607]],[[64668,64668],"mapped",[1576,1580]],[[64669,64669],"mapped",[1576,1581]],[[64670,64670],"mapped",[1576,1582]],[[64671,64671],"mapped",[1576,1605]],[[64672,64672],"mapped",[1576,1607]],[[64673,64673],"mapped",[1578,1580]],[[64674,64674],"mapped",[1578,1581]],[[64675,64675],"mapped",[1578,1582]],[[64676,64676],"mapped",[1578,1605]],[[64677,64677],"mapped",[1578,1607]],[[64678,64678],"mapped",[1579,1605]],[[64679,64679],"mapped",[1580,1581]],[[64680,64680],"mapped",[1580,1605]],[[64681,64681],"mapped",[1581,1580]],[[64682,64682],"mapped",[1581,1605]],[[64683,64683],"mapped",[1582,1580]],[[64684,64684],"mapped",[1582,1605]],[[64685,64685],"mapped",[1587,1580]],[[64686,64686],"mapped",[1587,1581]],[[64687,64687],"mapped",[1587,1582]],[[64688,64688],"mapped",[1587,1605]],[[64689,64689],"mapped",[1589,1581]],[[64690,64690],"mapped",[1589,1582]],[[64691,64691],"mapped",[1589,1605]],[[64692,64692],"mapped",[1590,1580]],[[64693,64693],"mapped",[1590,1581]],[[64694,64694],"mapped",[1590,1582]],[[64695,64695],"mapped",[1590,1605]],[[64696,64696],"mapped",[1591,1581]],[[64697,64697],"mapped",[1592,1605]],[[64698,64698],"mapped",[1593,1580]],[[64699,64699],"mapped",[1593,1605]],[[64700,64700],"mapped",[1594,1580]],[[64701,64701],"mapped",[1594,1605]],[[64702,64702],"mapped",[1601,1580]],[[64703,64703],"mapped",[1601,1581]],[[64704,64704],"mapped",[1601,1582]],[[64705,64705],"mapped",[1601,1605]],[[64706,64706],"mapped",[1602,1581]],[[64707,64707],"mapped",[1602,1605]],[[64708,64708],"mapped",[1603,1580]],[[64709,64709],"mapped",[1603,1581]],[[64710,64710],"mapped",[1603,1582]],[[64711,64711],"mapped",[1603,1604]],[[64712,64712],"mapped",[1603,1605]],[[64713,64713],"mapped",[1604,1580]],[[64714,64714],"mapped",[1604,1581]],[[64715,64715],"mapped",[1604,1582]],[[64716,64716],"mapped",[1604,1605]],[[64717,64717],"mapped",[1604,1607]],[[64718,64718],"mapped",[1605,1580]],[[64719,64719],"mapped",[1605,1581]],[[64720,64720],"mapped",[1605,1582]],[[64721,64721],"mapped",[1605,1605]],[[64722,64722],"mapped",[1606,1580]],[[64723,64723],"mapped",[1606,1581]],[[64724,64724],"mapped",[1606,1582]],[[64725,64725],"mapped",[1606,1605]],[[64726,64726],"mapped",[1606,1607]],[[64727,64727],"mapped",[1607,1580]],[[64728,64728],"mapped",[1607,1605]],[[64729,64729],"mapped",[1607,1648]],[[64730,64730],"mapped",[1610,1580]],[[64731,64731],"mapped",[1610,1581]],[[64732,64732],"mapped",[1610,1582]],[[64733,64733],"mapped",[1610,1605]],[[64734,64734],"mapped",[1610,1607]],[[64735,64735],"mapped",[1574,1605]],[[64736,64736],"mapped",[1574,1607]],[[64737,64737],"mapped",[1576,1605]],[[64738,64738],"mapped",[1576,1607]],[[64739,64739],"mapped",[1578,1605]],[[64740,64740],"mapped",[1578,1607]],[[64741,64741],"mapped",[1579,1605]],[[64742,64742],"mapped",[1579,1607]],[[64743,64743],"mapped",[1587,1605]],[[64744,64744],"mapped",[1587,1607]],[[64745,64745],"mapped",[1588,1605]],[[64746,64746],"mapped",[1588,1607]],[[64747,64747],"mapped",[1603,1604]],[[64748,64748],"mapped",[1603,1605]],[[64749,64749],"mapped",[1604,1605]],[[64750,64750],"mapped",[1606,1605]],[[64751,64751],"mapped",[1606,1607]],[[64752,64752],"mapped",[1610,1605]],[[64753,64753],"mapped",[1610,1607]],[[64754,64754],"mapped",[1600,1614,1617]],[[64755,64755],"mapped",[1600,1615,1617]],[[64756,64756],"mapped",[1600,1616,1617]],[[64757,64757],"mapped",[1591,1609]],[[64758,64758],"mapped",[1591,1610]],[[64759,64759],"mapped",[1593,1609]],[[64760,64760],"mapped",[1593,1610]],[[64761,64761],"mapped",[1594,1609]],[[64762,64762],"mapped",[1594,1610]],[[64763,64763],"mapped",[1587,1609]],[[64764,64764],"mapped",[1587,1610]],[[64765,64765],"mapped",[1588,1609]],[[64766,64766],"mapped",[1588,1610]],[[64767,64767],"mapped",[1581,1609]],[[64768,64768],"mapped",[1581,1610]],[[64769,64769],"mapped",[1580,1609]],[[64770,64770],"mapped",[1580,1610]],[[64771,64771],"mapped",[1582,1609]],[[64772,64772],"mapped",[1582,1610]],[[64773,64773],"mapped",[1589,1609]],[[64774,64774],"mapped",[1589,1610]],[[64775,64775],"mapped",[1590,1609]],[[64776,64776],"mapped",[1590,1610]],[[64777,64777],"mapped",[1588,1580]],[[64778,64778],"mapped",[1588,1581]],[[64779,64779],"mapped",[1588,1582]],[[64780,64780],"mapped",[1588,1605]],[[64781,64781],"mapped",[1588,1585]],[[64782,64782],"mapped",[1587,1585]],[[64783,64783],"mapped",[1589,1585]],[[64784,64784],"mapped",[1590,1585]],[[64785,64785],"mapped",[1591,1609]],[[64786,64786],"mapped",[1591,1610]],[[64787,64787],"mapped",[1593,1609]],[[64788,64788],"mapped",[1593,1610]],[[64789,64789],"mapped",[1594,1609]],[[64790,64790],"mapped",[1594,1610]],[[64791,64791],"mapped",[1587,1609]],[[64792,64792],"mapped",[1587,1610]],[[64793,64793],"mapped",[1588,1609]],[[64794,64794],"mapped",[1588,1610]],[[64795,64795],"mapped",[1581,1609]],[[64796,64796],"mapped",[1581,1610]],[[64797,64797],"mapped",[1580,1609]],[[64798,64798],"mapped",[1580,1610]],[[64799,64799],"mapped",[1582,1609]],[[64800,64800],"mapped",[1582,1610]],[[64801,64801],"mapped",[1589,1609]],[[64802,64802],"mapped",[1589,1610]],[[64803,64803],"mapped",[1590,1609]],[[64804,64804],"mapped",[1590,1610]],[[64805,64805],"mapped",[1588,1580]],[[64806,64806],"mapped",[1588,1581]],[[64807,64807],"mapped",[1588,1582]],[[64808,64808],"mapped",[1588,1605]],[[64809,64809],"mapped",[1588,1585]],[[64810,64810],"mapped",[1587,1585]],[[64811,64811],"mapped",[1589,1585]],[[64812,64812],"mapped",[1590,1585]],[[64813,64813],"mapped",[1588,1580]],[[64814,64814],"mapped",[1588,1581]],[[64815,64815],"mapped",[1588,1582]],[[64816,64816],"mapped",[1588,1605]],[[64817,64817],"mapped",[1587,1607]],[[64818,64818],"mapped",[1588,1607]],[[64819,64819],"mapped",[1591,1605]],[[64820,64820],"mapped",[1587,1580]],[[64821,64821],"mapped",[1587,1581]],[[64822,64822],"mapped",[1587,1582]],[[64823,64823],"mapped",[1588,1580]],[[64824,64824],"mapped",[1588,1581]],[[64825,64825],"mapped",[1588,1582]],[[64826,64826],"mapped",[1591,1605]],[[64827,64827],"mapped",[1592,1605]],[[64828,64829],"mapped",[1575,1611]],[[64830,64831],"valid",[],"NV8"],[[64832,64847],"disallowed"],[[64848,64848],"mapped",[1578,1580,1605]],[[64849,64850],"mapped",[1578,1581,1580]],[[64851,64851],"mapped",[1578,1581,1605]],[[64852,64852],"mapped",[1578,1582,1605]],[[64853,64853],"mapped",[1578,1605,1580]],[[64854,64854],"mapped",[1578,1605,1581]],[[64855,64855],"mapped",[1578,1605,1582]],[[64856,64857],"mapped",[1580,1605,1581]],[[64858,64858],"mapped",[1581,1605,1610]],[[64859,64859],"mapped",[1581,1605,1609]],[[64860,64860],"mapped",[1587,1581,1580]],[[64861,64861],"mapped",[1587,1580,1581]],[[64862,64862],"mapped",[1587,1580,1609]],[[64863,64864],"mapped",[1587,1605,1581]],[[64865,64865],"mapped",[1587,1605,1580]],[[64866,64867],"mapped",[1587,1605,1605]],[[64868,64869],"mapped",[1589,1581,1581]],[[64870,64870],"mapped",[1589,1605,1605]],[[64871,64872],"mapped",[1588,1581,1605]],[[64873,64873],"mapped",[1588,1580,1610]],[[64874,64875],"mapped",[1588,1605,1582]],[[64876,64877],"mapped",[1588,1605,1605]],[[64878,64878],"mapped",[1590,1581,1609]],[[64879,64880],"mapped",[1590,1582,1605]],[[64881,64882],"mapped",[1591,1605,1581]],[[64883,64883],"mapped",[1591,1605,1605]],[[64884,64884],"mapped",[1591,1605,1610]],[[64885,64885],"mapped",[1593,1580,1605]],[[64886,64887],"mapped",[1593,1605,1605]],[[64888,64888],"mapped",[1593,1605,1609]],[[64889,64889],"mapped",[1594,1605,1605]],[[64890,64890],"mapped",[1594,1605,1610]],[[64891,64891],"mapped",[1594,1605,1609]],[[64892,64893],"mapped",[1601,1582,1605]],[[64894,64894],"mapped",[1602,1605,1581]],[[64895,64895],"mapped",[1602,1605,1605]],[[64896,64896],"mapped",[1604,1581,1605]],[[64897,64897],"mapped",[1604,1581,1610]],[[64898,64898],"mapped",[1604,1581,1609]],[[64899,64900],"mapped",[1604,1580,1580]],[[64901,64902],"mapped",[1604,1582,1605]],[[64903,64904],"mapped",[1604,1605,1581]],[[64905,64905],"mapped",[1605,1581,1580]],[[64906,64906],"mapped",[1605,1581,1605]],[[64907,64907],"mapped",[1605,1581,1610]],[[64908,64908],"mapped",[1605,1580,1581]],[[64909,64909],"mapped",[1605,1580,1605]],[[64910,64910],"mapped",[1605,1582,1580]],[[64911,64911],"mapped",[1605,1582,1605]],[[64912,64913],"disallowed"],[[64914,64914],"mapped",[1605,1580,1582]],[[64915,64915],"mapped",[1607,1605,1580]],[[64916,64916],"mapped",[1607,1605,1605]],[[64917,64917],"mapped",[1606,1581,1605]],[[64918,64918],"mapped",[1606,1581,1609]],[[64919,64920],"mapped",[1606,1580,1605]],[[64921,64921],"mapped",[1606,1580,1609]],[[64922,64922],"mapped",[1606,1605,1610]],[[64923,64923],"mapped",[1606,1605,1609]],[[64924,64925],"mapped",[1610,1605,1605]],[[64926,64926],"mapped",[1576,1582,1610]],[[64927,64927],"mapped",[1578,1580,1610]],[[64928,64928],"mapped",[1578,1580,1609]],[[64929,64929],"mapped",[1578,1582,1610]],[[64930,64930],"mapped",[1578,1582,1609]],[[64931,64931],"mapped",[1578,1605,1610]],[[64932,64932],"mapped",[1578,1605,1609]],[[64933,64933],"mapped",[1580,1605,1610]],[[64934,64934],"mapped",[1580,1581,1609]],[[64935,64935],"mapped",[1580,1605,1609]],[[64936,64936],"mapped",[1587,1582,1609]],[[64937,64937],"mapped",[1589,1581,1610]],[[64938,64938],"mapped",[1588,1581,1610]],[[64939,64939],"mapped",[1590,1581,1610]],[[64940,64940],"mapped",[1604,1580,1610]],[[64941,64941],"mapped",[1604,1605,1610]],[[64942,64942],"mapped",[1610,1581,1610]],[[64943,64943],"mapped",[1610,1580,1610]],[[64944,64944],"mapped",[1610,1605,1610]],[[64945,64945],"mapped",[1605,1605,1610]],[[64946,64946],"mapped",[1602,1605,1610]],[[64947,64947],"mapped",[1606,1581,1610]],[[64948,64948],"mapped",[1602,1605,1581]],[[64949,64949],"mapped",[1604,1581,1605]],[[64950,64950],"mapped",[1593,1605,1610]],[[64951,64951],"mapped",[1603,1605,1610]],[[64952,64952],"mapped",[1606,1580,1581]],[[64953,64953],"mapped",[1605,1582,1610]],[[64954,64954],"mapped",[1604,1580,1605]],[[64955,64955],"mapped",[1603,1605,1605]],[[64956,64956],"mapped",[1604,1580,1605]],[[64957,64957],"mapped",[1606,1580,1581]],[[64958,64958],"mapped",[1580,1581,1610]],[[64959,64959],"mapped",[1581,1580,1610]],[[64960,64960],"mapped",[1605,1580,1610]],[[64961,64961],"mapped",[1601,1605,1610]],[[64962,64962],"mapped",[1576,1581,1610]],[[64963,64963],"mapped",[1603,1605,1605]],[[64964,64964],"mapped",[1593,1580,1605]],[[64965,64965],"mapped",[1589,1605,1605]],[[64966,64966],"mapped",[1587,1582,1610]],[[64967,64967],"mapped",[1606,1580,1610]],[[64968,64975],"disallowed"],[[64976,65007],"disallowed"],[[65008,65008],"mapped",[1589,1604,1746]],[[65009,65009],"mapped",[1602,1604,1746]],[[65010,65010],"mapped",[1575,1604,1604,1607]],[[65011,65011],"mapped",[1575,1603,1576,1585]],[[65012,65012],"mapped",[1605,1581,1605,1583]],[[65013,65013],"mapped",[1589,1604,1593,1605]],[[65014,65014],"mapped",[1585,1587,1608,1604]],[[65015,65015],"mapped",[1593,1604,1610,1607]],[[65016,65016],"mapped",[1608,1587,1604,1605]],[[65017,65017],"mapped",[1589,1604,1609]],[[65018,65018],"disallowed_STD3_mapped",[1589,1604,1609,32,1575,1604,1604,1607,32,1593,1604,1610,1607,32,1608,1587,1604,1605]],[[65019,65019],"disallowed_STD3_mapped",[1580,1604,32,1580,1604,1575,1604,1607]],[[65020,65020],"mapped",[1585,1740,1575,1604]],[[65021,65021],"valid",[],"NV8"],[[65022,65023],"disallowed"],[[65024,65039],"ignored"],[[65040,65040],"disallowed_STD3_mapped",[44]],[[65041,65041],"mapped",[12289]],[[65042,65042],"disallowed"],[[65043,65043],"disallowed_STD3_mapped",[58]],[[65044,65044],"disallowed_STD3_mapped",[59]],[[65045,65045],"disallowed_STD3_mapped",[33]],[[65046,65046],"disallowed_STD3_mapped",[63]],[[65047,65047],"mapped",[12310]],[[65048,65048],"mapped",[12311]],[[65049,65049],"disallowed"],[[65050,65055],"disallowed"],[[65056,65059],"valid"],[[65060,65062],"valid"],[[65063,65069],"valid"],[[65070,65071],"valid"],[[65072,65072],"disallowed"],[[65073,65073],"mapped",[8212]],[[65074,65074],"mapped",[8211]],[[65075,65076],"disallowed_STD3_mapped",[95]],[[65077,65077],"disallowed_STD3_mapped",[40]],[[65078,65078],"disallowed_STD3_mapped",[41]],[[65079,65079],"disallowed_STD3_mapped",[123]],[[65080,65080],"disallowed_STD3_mapped",[125]],[[65081,65081],"mapped",[12308]],[[65082,65082],"mapped",[12309]],[[65083,65083],"mapped",[12304]],[[65084,65084],"mapped",[12305]],[[65085,65085],"mapped",[12298]],[[65086,65086],"mapped",[12299]],[[65087,65087],"mapped",[12296]],[[65088,65088],"mapped",[12297]],[[65089,65089],"mapped",[12300]],[[65090,65090],"mapped",[12301]],[[65091,65091],"mapped",[12302]],[[65092,65092],"mapped",[12303]],[[65093,65094],"valid",[],"NV8"],[[65095,65095],"disallowed_STD3_mapped",[91]],[[65096,65096],"disallowed_STD3_mapped",[93]],[[65097,65100],"disallowed_STD3_mapped",[32,773]],[[65101,65103],"disallowed_STD3_mapped",[95]],[[65104,65104],"disallowed_STD3_mapped",[44]],[[65105,65105],"mapped",[12289]],[[65106,65106],"disallowed"],[[65107,65107],"disallowed"],[[65108,65108],"disallowed_STD3_mapped",[59]],[[65109,65109],"disallowed_STD3_mapped",[58]],[[65110,65110],"disallowed_STD3_mapped",[63]],[[65111,65111],"disallowed_STD3_mapped",[33]],[[65112,65112],"mapped",[8212]],[[65113,65113],"disallowed_STD3_mapped",[40]],[[65114,65114],"disallowed_STD3_mapped",[41]],[[65115,65115],"disallowed_STD3_mapped",[123]],[[65116,65116],"disallowed_STD3_mapped",[125]],[[65117,65117],"mapped",[12308]],[[65118,65118],"mapped",[12309]],[[65119,65119],"disallowed_STD3_mapped",[35]],[[65120,65120],"disallowed_STD3_mapped",[38]],[[65121,65121],"disallowed_STD3_mapped",[42]],[[65122,65122],"disallowed_STD3_mapped",[43]],[[65123,65123],"mapped",[45]],[[65124,65124],"disallowed_STD3_mapped",[60]],[[65125,65125],"disallowed_STD3_mapped",[62]],[[65126,65126],"disallowed_STD3_mapped",[61]],[[65127,65127],"disallowed"],[[65128,65128],"disallowed_STD3_mapped",[92]],[[65129,65129],"disallowed_STD3_mapped",[36]],[[65130,65130],"disallowed_STD3_mapped",[37]],[[65131,65131],"disallowed_STD3_mapped",[64]],[[65132,65135],"disallowed"],[[65136,65136],"disallowed_STD3_mapped",[32,1611]],[[65137,65137],"mapped",[1600,1611]],[[65138,65138],"disallowed_STD3_mapped",[32,1612]],[[65139,65139],"valid"],[[65140,65140],"disallowed_STD3_mapped",[32,1613]],[[65141,65141],"disallowed"],[[65142,65142],"disallowed_STD3_mapped",[32,1614]],[[65143,65143],"mapped",[1600,1614]],[[65144,65144],"disallowed_STD3_mapped",[32,1615]],[[65145,65145],"mapped",[1600,1615]],[[65146,65146],"disallowed_STD3_mapped",[32,1616]],[[65147,65147],"mapped",[1600,1616]],[[65148,65148],"disallowed_STD3_mapped",[32,1617]],[[65149,65149],"mapped",[1600,1617]],[[65150,65150],"disallowed_STD3_mapped",[32,1618]],[[65151,65151],"mapped",[1600,1618]],[[65152,65152],"mapped",[1569]],[[65153,65154],"mapped",[1570]],[[65155,65156],"mapped",[1571]],[[65157,65158],"mapped",[1572]],[[65159,65160],"mapped",[1573]],[[65161,65164],"mapped",[1574]],[[65165,65166],"mapped",[1575]],[[65167,65170],"mapped",[1576]],[[65171,65172],"mapped",[1577]],[[65173,65176],"mapped",[1578]],[[65177,65180],"mapped",[1579]],[[65181,65184],"mapped",[1580]],[[65185,65188],"mapped",[1581]],[[65189,65192],"mapped",[1582]],[[65193,65194],"mapped",[1583]],[[65195,65196],"mapped",[1584]],[[65197,65198],"mapped",[1585]],[[65199,65200],"mapped",[1586]],[[65201,65204],"mapped",[1587]],[[65205,65208],"mapped",[1588]],[[65209,65212],"mapped",[1589]],[[65213,65216],"mapped",[1590]],[[65217,65220],"mapped",[1591]],[[65221,65224],"mapped",[1592]],[[65225,65228],"mapped",[1593]],[[65229,65232],"mapped",[1594]],[[65233,65236],"mapped",[1601]],[[65237,65240],"mapped",[1602]],[[65241,65244],"mapped",[1603]],[[65245,65248],"mapped",[1604]],[[65249,65252],"mapped",[1605]],[[65253,65256],"mapped",[1606]],[[65257,65260],"mapped",[1607]],[[65261,65262],"mapped",[1608]],[[65263,65264],"mapped",[1609]],[[65265,65268],"mapped",[1610]],[[65269,65270],"mapped",[1604,1570]],[[65271,65272],"mapped",[1604,1571]],[[65273,65274],"mapped",[1604,1573]],[[65275,65276],"mapped",[1604,1575]],[[65277,65278],"disallowed"],[[65279,65279],"ignored"],[[65280,65280],"disallowed"],[[65281,65281],"disallowed_STD3_mapped",[33]],[[65282,65282],"disallowed_STD3_mapped",[34]],[[65283,65283],"disallowed_STD3_mapped",[35]],[[65284,65284],"disallowed_STD3_mapped",[36]],[[65285,65285],"disallowed_STD3_mapped",[37]],[[65286,65286],"disallowed_STD3_mapped",[38]],[[65287,65287],"disallowed_STD3_mapped",[39]],[[65288,65288],"disallowed_STD3_mapped",[40]],[[65289,65289],"disallowed_STD3_mapped",[41]],[[65290,65290],"disallowed_STD3_mapped",[42]],[[65291,65291],"disallowed_STD3_mapped",[43]],[[65292,65292],"disallowed_STD3_mapped",[44]],[[65293,65293],"mapped",[45]],[[65294,65294],"mapped",[46]],[[65295,65295],"disallowed_STD3_mapped",[47]],[[65296,65296],"mapped",[48]],[[65297,65297],"mapped",[49]],[[65298,65298],"mapped",[50]],[[65299,65299],"mapped",[51]],[[65300,65300],"mapped",[52]],[[65301,65301],"mapped",[53]],[[65302,65302],"mapped",[54]],[[65303,65303],"mapped",[55]],[[65304,65304],"mapped",[56]],[[65305,65305],"mapped",[57]],[[65306,65306],"disallowed_STD3_mapped",[58]],[[65307,65307],"disallowed_STD3_mapped",[59]],[[65308,65308],"disallowed_STD3_mapped",[60]],[[65309,65309],"disallowed_STD3_mapped",[61]],[[65310,65310],"disallowed_STD3_mapped",[62]],[[65311,65311],"disallowed_STD3_mapped",[63]],[[65312,65312],"disallowed_STD3_mapped",[64]],[[65313,65313],"mapped",[97]],[[65314,65314],"mapped",[98]],[[65315,65315],"mapped",[99]],[[65316,65316],"mapped",[100]],[[65317,65317],"mapped",[101]],[[65318,65318],"mapped",[102]],[[65319,65319],"mapped",[103]],[[65320,65320],"mapped",[104]],[[65321,65321],"mapped",[105]],[[65322,65322],"mapped",[106]],[[65323,65323],"mapped",[107]],[[65324,65324],"mapped",[108]],[[65325,65325],"mapped",[109]],[[65326,65326],"mapped",[110]],[[65327,65327],"mapped",[111]],[[65328,65328],"mapped",[112]],[[65329,65329],"mapped",[113]],[[65330,65330],"mapped",[114]],[[65331,65331],"mapped",[115]],[[65332,65332],"mapped",[116]],[[65333,65333],"mapped",[117]],[[65334,65334],"mapped",[118]],[[65335,65335],"mapped",[119]],[[65336,65336],"mapped",[120]],[[65337,65337],"mapped",[121]],[[65338,65338],"mapped",[122]],[[65339,65339],"disallowed_STD3_mapped",[91]],[[65340,65340],"disallowed_STD3_mapped",[92]],[[65341,65341],"disallowed_STD3_mapped",[93]],[[65342,65342],"disallowed_STD3_mapped",[94]],[[65343,65343],"disallowed_STD3_mapped",[95]],[[65344,65344],"disallowed_STD3_mapped",[96]],[[65345,65345],"mapped",[97]],[[65346,65346],"mapped",[98]],[[65347,65347],"mapped",[99]],[[65348,65348],"mapped",[100]],[[65349,65349],"mapped",[101]],[[65350,65350],"mapped",[102]],[[65351,65351],"mapped",[103]],[[65352,65352],"mapped",[104]],[[65353,65353],"mapped",[105]],[[65354,65354],"mapped",[106]],[[65355,65355],"mapped",[107]],[[65356,65356],"mapped",[108]],[[65357,65357],"mapped",[109]],[[65358,65358],"mapped",[110]],[[65359,65359],"mapped",[111]],[[65360,65360],"mapped",[112]],[[65361,65361],"mapped",[113]],[[65362,65362],"mapped",[114]],[[65363,65363],"mapped",[115]],[[65364,65364],"mapped",[116]],[[65365,65365],"mapped",[117]],[[65366,65366],"mapped",[118]],[[65367,65367],"mapped",[119]],[[65368,65368],"mapped",[120]],[[65369,65369],"mapped",[121]],[[65370,65370],"mapped",[122]],[[65371,65371],"disallowed_STD3_mapped",[123]],[[65372,65372],"disallowed_STD3_mapped",[124]],[[65373,65373],"disallowed_STD3_mapped",[125]],[[65374,65374],"disallowed_STD3_mapped",[126]],[[65375,65375],"mapped",[10629]],[[65376,65376],"mapped",[10630]],[[65377,65377],"mapped",[46]],[[65378,65378],"mapped",[12300]],[[65379,65379],"mapped",[12301]],[[65380,65380],"mapped",[12289]],[[65381,65381],"mapped",[12539]],[[65382,65382],"mapped",[12530]],[[65383,65383],"mapped",[12449]],[[65384,65384],"mapped",[12451]],[[65385,65385],"mapped",[12453]],[[65386,65386],"mapped",[12455]],[[65387,65387],"mapped",[12457]],[[65388,65388],"mapped",[12515]],[[65389,65389],"mapped",[12517]],[[65390,65390],"mapped",[12519]],[[65391,65391],"mapped",[12483]],[[65392,65392],"mapped",[12540]],[[65393,65393],"mapped",[12450]],[[65394,65394],"mapped",[12452]],[[65395,65395],"mapped",[12454]],[[65396,65396],"mapped",[12456]],[[65397,65397],"mapped",[12458]],[[65398,65398],"mapped",[12459]],[[65399,65399],"mapped",[12461]],[[65400,65400],"mapped",[12463]],[[65401,65401],"mapped",[12465]],[[65402,65402],"mapped",[12467]],[[65403,65403],"mapped",[12469]],[[65404,65404],"mapped",[12471]],[[65405,65405],"mapped",[12473]],[[65406,65406],"mapped",[12475]],[[65407,65407],"mapped",[12477]],[[65408,65408],"mapped",[12479]],[[65409,65409],"mapped",[12481]],[[65410,65410],"mapped",[12484]],[[65411,65411],"mapped",[12486]],[[65412,65412],"mapped",[12488]],[[65413,65413],"mapped",[12490]],[[65414,65414],"mapped",[12491]],[[65415,65415],"mapped",[12492]],[[65416,65416],"mapped",[12493]],[[65417,65417],"mapped",[12494]],[[65418,65418],"mapped",[12495]],[[65419,65419],"mapped",[12498]],[[65420,65420],"mapped",[12501]],[[65421,65421],"mapped",[12504]],[[65422,65422],"mapped",[12507]],[[65423,65423],"mapped",[12510]],[[65424,65424],"mapped",[12511]],[[65425,65425],"mapped",[12512]],[[65426,65426],"mapped",[12513]],[[65427,65427],"mapped",[12514]],[[65428,65428],"mapped",[12516]],[[65429,65429],"mapped",[12518]],[[65430,65430],"mapped",[12520]],[[65431,65431],"mapped",[12521]],[[65432,65432],"mapped",[12522]],[[65433,65433],"mapped",[12523]],[[65434,65434],"mapped",[12524]],[[65435,65435],"mapped",[12525]],[[65436,65436],"mapped",[12527]],[[65437,65437],"mapped",[12531]],[[65438,65438],"mapped",[12441]],[[65439,65439],"mapped",[12442]],[[65440,65440],"disallowed"],[[65441,65441],"mapped",[4352]],[[65442,65442],"mapped",[4353]],[[65443,65443],"mapped",[4522]],[[65444,65444],"mapped",[4354]],[[65445,65445],"mapped",[4524]],[[65446,65446],"mapped",[4525]],[[65447,65447],"mapped",[4355]],[[65448,65448],"mapped",[4356]],[[65449,65449],"mapped",[4357]],[[65450,65450],"mapped",[4528]],[[65451,65451],"mapped",[4529]],[[65452,65452],"mapped",[4530]],[[65453,65453],"mapped",[4531]],[[65454,65454],"mapped",[4532]],[[65455,65455],"mapped",[4533]],[[65456,65456],"mapped",[4378]],[[65457,65457],"mapped",[4358]],[[65458,65458],"mapped",[4359]],[[65459,65459],"mapped",[4360]],[[65460,65460],"mapped",[4385]],[[65461,65461],"mapped",[4361]],[[65462,65462],"mapped",[4362]],[[65463,65463],"mapped",[4363]],[[65464,65464],"mapped",[4364]],[[65465,65465],"mapped",[4365]],[[65466,65466],"mapped",[4366]],[[65467,65467],"mapped",[4367]],[[65468,65468],"mapped",[4368]],[[65469,65469],"mapped",[4369]],[[65470,65470],"mapped",[4370]],[[65471,65473],"disallowed"],[[65474,65474],"mapped",[4449]],[[65475,65475],"mapped",[4450]],[[65476,65476],"mapped",[4451]],[[65477,65477],"mapped",[4452]],[[65478,65478],"mapped",[4453]],[[65479,65479],"mapped",[4454]],[[65480,65481],"disallowed"],[[65482,65482],"mapped",[4455]],[[65483,65483],"mapped",[4456]],[[65484,65484],"mapped",[4457]],[[65485,65485],"mapped",[4458]],[[65486,65486],"mapped",[4459]],[[65487,65487],"mapped",[4460]],[[65488,65489],"disallowed"],[[65490,65490],"mapped",[4461]],[[65491,65491],"mapped",[4462]],[[65492,65492],"mapped",[4463]],[[65493,65493],"mapped",[4464]],[[65494,65494],"mapped",[4465]],[[65495,65495],"mapped",[4466]],[[65496,65497],"disallowed"],[[65498,65498],"mapped",[4467]],[[65499,65499],"mapped",[4468]],[[65500,65500],"mapped",[4469]],[[65501,65503],"disallowed"],[[65504,65504],"mapped",[162]],[[65505,65505],"mapped",[163]],[[65506,65506],"mapped",[172]],[[65507,65507],"disallowed_STD3_mapped",[32,772]],[[65508,65508],"mapped",[166]],[[65509,65509],"mapped",[165]],[[65510,65510],"mapped",[8361]],[[65511,65511],"disallowed"],[[65512,65512],"mapped",[9474]],[[65513,65513],"mapped",[8592]],[[65514,65514],"mapped",[8593]],[[65515,65515],"mapped",[8594]],[[65516,65516],"mapped",[8595]],[[65517,65517],"mapped",[9632]],[[65518,65518],"mapped",[9675]],[[65519,65528],"disallowed"],[[65529,65531],"disallowed"],[[65532,65532],"disallowed"],[[65533,65533],"disallowed"],[[65534,65535],"disallowed"],[[65536,65547],"valid"],[[65548,65548],"disallowed"],[[65549,65574],"valid"],[[65575,65575],"disallowed"],[[65576,65594],"valid"],[[65595,65595],"disallowed"],[[65596,65597],"valid"],[[65598,65598],"disallowed"],[[65599,65613],"valid"],[[65614,65615],"disallowed"],[[65616,65629],"valid"],[[65630,65663],"disallowed"],[[65664,65786],"valid"],[[65787,65791],"disallowed"],[[65792,65794],"valid",[],"NV8"],[[65795,65798],"disallowed"],[[65799,65843],"valid",[],"NV8"],[[65844,65846],"disallowed"],[[65847,65855],"valid",[],"NV8"],[[65856,65930],"valid",[],"NV8"],[[65931,65932],"valid",[],"NV8"],[[65933,65935],"disallowed"],[[65936,65947],"valid",[],"NV8"],[[65948,65951],"disallowed"],[[65952,65952],"valid",[],"NV8"],[[65953,65999],"disallowed"],[[66000,66044],"valid",[],"NV8"],[[66045,66045],"valid"],[[66046,66175],"disallowed"],[[66176,66204],"valid"],[[66205,66207],"disallowed"],[[66208,66256],"valid"],[[66257,66271],"disallowed"],[[66272,66272],"valid"],[[66273,66299],"valid",[],"NV8"],[[66300,66303],"disallowed"],[[66304,66334],"valid"],[[66335,66335],"valid"],[[66336,66339],"valid",[],"NV8"],[[66340,66351],"disallowed"],[[66352,66368],"valid"],[[66369,66369],"valid",[],"NV8"],[[66370,66377],"valid"],[[66378,66378],"valid",[],"NV8"],[[66379,66383],"disallowed"],[[66384,66426],"valid"],[[66427,66431],"disallowed"],[[66432,66461],"valid"],[[66462,66462],"disallowed"],[[66463,66463],"valid",[],"NV8"],[[66464,66499],"valid"],[[66500,66503],"disallowed"],[[66504,66511],"valid"],[[66512,66517],"valid",[],"NV8"],[[66518,66559],"disallowed"],[[66560,66560],"mapped",[66600]],[[66561,66561],"mapped",[66601]],[[66562,66562],"mapped",[66602]],[[66563,66563],"mapped",[66603]],[[66564,66564],"mapped",[66604]],[[66565,66565],"mapped",[66605]],[[66566,66566],"mapped",[66606]],[[66567,66567],"mapped",[66607]],[[66568,66568],"mapped",[66608]],[[66569,66569],"mapped",[66609]],[[66570,66570],"mapped",[66610]],[[66571,66571],"mapped",[66611]],[[66572,66572],"mapped",[66612]],[[66573,66573],"mapped",[66613]],[[66574,66574],"mapped",[66614]],[[66575,66575],"mapped",[66615]],[[66576,66576],"mapped",[66616]],[[66577,66577],"mapped",[66617]],[[66578,66578],"mapped",[66618]],[[66579,66579],"mapped",[66619]],[[66580,66580],"mapped",[66620]],[[66581,66581],"mapped",[66621]],[[66582,66582],"mapped",[66622]],[[66583,66583],"mapped",[66623]],[[66584,66584],"mapped",[66624]],[[66585,66585],"mapped",[66625]],[[66586,66586],"mapped",[66626]],[[66587,66587],"mapped",[66627]],[[66588,66588],"mapped",[66628]],[[66589,66589],"mapped",[66629]],[[66590,66590],"mapped",[66630]],[[66591,66591],"mapped",[66631]],[[66592,66592],"mapped",[66632]],[[66593,66593],"mapped",[66633]],[[66594,66594],"mapped",[66634]],[[66595,66595],"mapped",[66635]],[[66596,66596],"mapped",[66636]],[[66597,66597],"mapped",[66637]],[[66598,66598],"mapped",[66638]],[[66599,66599],"mapped",[66639]],[[66600,66637],"valid"],[[66638,66717],"valid"],[[66718,66719],"disallowed"],[[66720,66729],"valid"],[[66730,66815],"disallowed"],[[66816,66855],"valid"],[[66856,66863],"disallowed"],[[66864,66915],"valid"],[[66916,66926],"disallowed"],[[66927,66927],"valid",[],"NV8"],[[66928,67071],"disallowed"],[[67072,67382],"valid"],[[67383,67391],"disallowed"],[[67392,67413],"valid"],[[67414,67423],"disallowed"],[[67424,67431],"valid"],[[67432,67583],"disallowed"],[[67584,67589],"valid"],[[67590,67591],"disallowed"],[[67592,67592],"valid"],[[67593,67593],"disallowed"],[[67594,67637],"valid"],[[67638,67638],"disallowed"],[[67639,67640],"valid"],[[67641,67643],"disallowed"],[[67644,67644],"valid"],[[67645,67646],"disallowed"],[[67647,67647],"valid"],[[67648,67669],"valid"],[[67670,67670],"disallowed"],[[67671,67679],"valid",[],"NV8"],[[67680,67702],"valid"],[[67703,67711],"valid",[],"NV8"],[[67712,67742],"valid"],[[67743,67750],"disallowed"],[[67751,67759],"valid",[],"NV8"],[[67760,67807],"disallowed"],[[67808,67826],"valid"],[[67827,67827],"disallowed"],[[67828,67829],"valid"],[[67830,67834],"disallowed"],[[67835,67839],"valid",[],"NV8"],[[67840,67861],"valid"],[[67862,67865],"valid",[],"NV8"],[[67866,67867],"valid",[],"NV8"],[[67868,67870],"disallowed"],[[67871,67871],"valid",[],"NV8"],[[67872,67897],"valid"],[[67898,67902],"disallowed"],[[67903,67903],"valid",[],"NV8"],[[67904,67967],"disallowed"],[[67968,68023],"valid"],[[68024,68027],"disallowed"],[[68028,68029],"valid",[],"NV8"],[[68030,68031],"valid"],[[68032,68047],"valid",[],"NV8"],[[68048,68049],"disallowed"],[[68050,68095],"valid",[],"NV8"],[[68096,68099],"valid"],[[68100,68100],"disallowed"],[[68101,68102],"valid"],[[68103,68107],"disallowed"],[[68108,68115],"valid"],[[68116,68116],"disallowed"],[[68117,68119],"valid"],[[68120,68120],"disallowed"],[[68121,68147],"valid"],[[68148,68151],"disallowed"],[[68152,68154],"valid"],[[68155,68158],"disallowed"],[[68159,68159],"valid"],[[68160,68167],"valid",[],"NV8"],[[68168,68175],"disallowed"],[[68176,68184],"valid",[],"NV8"],[[68185,68191],"disallowed"],[[68192,68220],"valid"],[[68221,68223],"valid",[],"NV8"],[[68224,68252],"valid"],[[68253,68255],"valid",[],"NV8"],[[68256,68287],"disallowed"],[[68288,68295],"valid"],[[68296,68296],"valid",[],"NV8"],[[68297,68326],"valid"],[[68327,68330],"disallowed"],[[68331,68342],"valid",[],"NV8"],[[68343,68351],"disallowed"],[[68352,68405],"valid"],[[68406,68408],"disallowed"],[[68409,68415],"valid",[],"NV8"],[[68416,68437],"valid"],[[68438,68439],"disallowed"],[[68440,68447],"valid",[],"NV8"],[[68448,68466],"valid"],[[68467,68471],"disallowed"],[[68472,68479],"valid",[],"NV8"],[[68480,68497],"valid"],[[68498,68504],"disallowed"],[[68505,68508],"valid",[],"NV8"],[[68509,68520],"disallowed"],[[68521,68527],"valid",[],"NV8"],[[68528,68607],"disallowed"],[[68608,68680],"valid"],[[68681,68735],"disallowed"],[[68736,68736],"mapped",[68800]],[[68737,68737],"mapped",[68801]],[[68738,68738],"mapped",[68802]],[[68739,68739],"mapped",[68803]],[[68740,68740],"mapped",[68804]],[[68741,68741],"mapped",[68805]],[[68742,68742],"mapped",[68806]],[[68743,68743],"mapped",[68807]],[[68744,68744],"mapped",[68808]],[[68745,68745],"mapped",[68809]],[[68746,68746],"mapped",[68810]],[[68747,68747],"mapped",[68811]],[[68748,68748],"mapped",[68812]],[[68749,68749],"mapped",[68813]],[[68750,68750],"mapped",[68814]],[[68751,68751],"mapped",[68815]],[[68752,68752],"mapped",[68816]],[[68753,68753],"mapped",[68817]],[[68754,68754],"mapped",[68818]],[[68755,68755],"mapped",[68819]],[[68756,68756],"mapped",[68820]],[[68757,68757],"mapped",[68821]],[[68758,68758],"mapped",[68822]],[[68759,68759],"mapped",[68823]],[[68760,68760],"mapped",[68824]],[[68761,68761],"mapped",[68825]],[[68762,68762],"mapped",[68826]],[[68763,68763],"mapped",[68827]],[[68764,68764],"mapped",[68828]],[[68765,68765],"mapped",[68829]],[[68766,68766],"mapped",[68830]],[[68767,68767],"mapped",[68831]],[[68768,68768],"mapped",[68832]],[[68769,68769],"mapped",[68833]],[[68770,68770],"mapped",[68834]],[[68771,68771],"mapped",[68835]],[[68772,68772],"mapped",[68836]],[[68773,68773],"mapped",[68837]],[[68774,68774],"mapped",[68838]],[[68775,68775],"mapped",[68839]],[[68776,68776],"mapped",[68840]],[[68777,68777],"mapped",[68841]],[[68778,68778],"mapped",[68842]],[[68779,68779],"mapped",[68843]],[[68780,68780],"mapped",[68844]],[[68781,68781],"mapped",[68845]],[[68782,68782],"mapped",[68846]],[[68783,68783],"mapped",[68847]],[[68784,68784],"mapped",[68848]],[[68785,68785],"mapped",[68849]],[[68786,68786],"mapped",[68850]],[[68787,68799],"disallowed"],[[68800,68850],"valid"],[[68851,68857],"disallowed"],[[68858,68863],"valid",[],"NV8"],[[68864,69215],"disallowed"],[[69216,69246],"valid",[],"NV8"],[[69247,69631],"disallowed"],[[69632,69702],"valid"],[[69703,69709],"valid",[],"NV8"],[[69710,69713],"disallowed"],[[69714,69733],"valid",[],"NV8"],[[69734,69743],"valid"],[[69744,69758],"disallowed"],[[69759,69759],"valid"],[[69760,69818],"valid"],[[69819,69820],"valid",[],"NV8"],[[69821,69821],"disallowed"],[[69822,69825],"valid",[],"NV8"],[[69826,69839],"disallowed"],[[69840,69864],"valid"],[[69865,69871],"disallowed"],[[69872,69881],"valid"],[[69882,69887],"disallowed"],[[69888,69940],"valid"],[[69941,69941],"disallowed"],[[69942,69951],"valid"],[[69952,69955],"valid",[],"NV8"],[[69956,69967],"disallowed"],[[69968,70003],"valid"],[[70004,70005],"valid",[],"NV8"],[[70006,70006],"valid"],[[70007,70015],"disallowed"],[[70016,70084],"valid"],[[70085,70088],"valid",[],"NV8"],[[70089,70089],"valid",[],"NV8"],[[70090,70092],"valid"],[[70093,70093],"valid",[],"NV8"],[[70094,70095],"disallowed"],[[70096,70105],"valid"],[[70106,70106],"valid"],[[70107,70107],"valid",[],"NV8"],[[70108,70108],"valid"],[[70109,70111],"valid",[],"NV8"],[[70112,70112],"disallowed"],[[70113,70132],"valid",[],"NV8"],[[70133,70143],"disallowed"],[[70144,70161],"valid"],[[70162,70162],"disallowed"],[[70163,70199],"valid"],[[70200,70205],"valid",[],"NV8"],[[70206,70271],"disallowed"],[[70272,70278],"valid"],[[70279,70279],"disallowed"],[[70280,70280],"valid"],[[70281,70281],"disallowed"],[[70282,70285],"valid"],[[70286,70286],"disallowed"],[[70287,70301],"valid"],[[70302,70302],"disallowed"],[[70303,70312],"valid"],[[70313,70313],"valid",[],"NV8"],[[70314,70319],"disallowed"],[[70320,70378],"valid"],[[70379,70383],"disallowed"],[[70384,70393],"valid"],[[70394,70399],"disallowed"],[[70400,70400],"valid"],[[70401,70403],"valid"],[[70404,70404],"disallowed"],[[70405,70412],"valid"],[[70413,70414],"disallowed"],[[70415,70416],"valid"],[[70417,70418],"disallowed"],[[70419,70440],"valid"],[[70441,70441],"disallowed"],[[70442,70448],"valid"],[[70449,70449],"disallowed"],[[70450,70451],"valid"],[[70452,70452],"disallowed"],[[70453,70457],"valid"],[[70458,70459],"disallowed"],[[70460,70468],"valid"],[[70469,70470],"disallowed"],[[70471,70472],"valid"],[[70473,70474],"disallowed"],[[70475,70477],"valid"],[[70478,70479],"disallowed"],[[70480,70480],"valid"],[[70481,70486],"disallowed"],[[70487,70487],"valid"],[[70488,70492],"disallowed"],[[70493,70499],"valid"],[[70500,70501],"disallowed"],[[70502,70508],"valid"],[[70509,70511],"disallowed"],[[70512,70516],"valid"],[[70517,70783],"disallowed"],[[70784,70853],"valid"],[[70854,70854],"valid",[],"NV8"],[[70855,70855],"valid"],[[70856,70863],"disallowed"],[[70864,70873],"valid"],[[70874,71039],"disallowed"],[[71040,71093],"valid"],[[71094,71095],"disallowed"],[[71096,71104],"valid"],[[71105,71113],"valid",[],"NV8"],[[71114,71127],"valid",[],"NV8"],[[71128,71133],"valid"],[[71134,71167],"disallowed"],[[71168,71232],"valid"],[[71233,71235],"valid",[],"NV8"],[[71236,71236],"valid"],[[71237,71247],"disallowed"],[[71248,71257],"valid"],[[71258,71295],"disallowed"],[[71296,71351],"valid"],[[71352,71359],"disallowed"],[[71360,71369],"valid"],[[71370,71423],"disallowed"],[[71424,71449],"valid"],[[71450,71452],"disallowed"],[[71453,71467],"valid"],[[71468,71471],"disallowed"],[[71472,71481],"valid"],[[71482,71487],"valid",[],"NV8"],[[71488,71839],"disallowed"],[[71840,71840],"mapped",[71872]],[[71841,71841],"mapped",[71873]],[[71842,71842],"mapped",[71874]],[[71843,71843],"mapped",[71875]],[[71844,71844],"mapped",[71876]],[[71845,71845],"mapped",[71877]],[[71846,71846],"mapped",[71878]],[[71847,71847],"mapped",[71879]],[[71848,71848],"mapped",[71880]],[[71849,71849],"mapped",[71881]],[[71850,71850],"mapped",[71882]],[[71851,71851],"mapped",[71883]],[[71852,71852],"mapped",[71884]],[[71853,71853],"mapped",[71885]],[[71854,71854],"mapped",[71886]],[[71855,71855],"mapped",[71887]],[[71856,71856],"mapped",[71888]],[[71857,71857],"mapped",[71889]],[[71858,71858],"mapped",[71890]],[[71859,71859],"mapped",[71891]],[[71860,71860],"mapped",[71892]],[[71861,71861],"mapped",[71893]],[[71862,71862],"mapped",[71894]],[[71863,71863],"mapped",[71895]],[[71864,71864],"mapped",[71896]],[[71865,71865],"mapped",[71897]],[[71866,71866],"mapped",[71898]],[[71867,71867],"mapped",[71899]],[[71868,71868],"mapped",[71900]],[[71869,71869],"mapped",[71901]],[[71870,71870],"mapped",[71902]],[[71871,71871],"mapped",[71903]],[[71872,71913],"valid"],[[71914,71922],"valid",[],"NV8"],[[71923,71934],"disallowed"],[[71935,71935],"valid"],[[71936,72383],"disallowed"],[[72384,72440],"valid"],[[72441,73727],"disallowed"],[[73728,74606],"valid"],[[74607,74648],"valid"],[[74649,74649],"valid"],[[74650,74751],"disallowed"],[[74752,74850],"valid",[],"NV8"],[[74851,74862],"valid",[],"NV8"],[[74863,74863],"disallowed"],[[74864,74867],"valid",[],"NV8"],[[74868,74868],"valid",[],"NV8"],[[74869,74879],"disallowed"],[[74880,75075],"valid"],[[75076,77823],"disallowed"],[[77824,78894],"valid"],[[78895,82943],"disallowed"],[[82944,83526],"valid"],[[83527,92159],"disallowed"],[[92160,92728],"valid"],[[92729,92735],"disallowed"],[[92736,92766],"valid"],[[92767,92767],"disallowed"],[[92768,92777],"valid"],[[92778,92781],"disallowed"],[[92782,92783],"valid",[],"NV8"],[[92784,92879],"disallowed"],[[92880,92909],"valid"],[[92910,92911],"disallowed"],[[92912,92916],"valid"],[[92917,92917],"valid",[],"NV8"],[[92918,92927],"disallowed"],[[92928,92982],"valid"],[[92983,92991],"valid",[],"NV8"],[[92992,92995],"valid"],[[92996,92997],"valid",[],"NV8"],[[92998,93007],"disallowed"],[[93008,93017],"valid"],[[93018,93018],"disallowed"],[[93019,93025],"valid",[],"NV8"],[[93026,93026],"disallowed"],[[93027,93047],"valid"],[[93048,93052],"disallowed"],[[93053,93071],"valid"],[[93072,93951],"disallowed"],[[93952,94020],"valid"],[[94021,94031],"disallowed"],[[94032,94078],"valid"],[[94079,94094],"disallowed"],[[94095,94111],"valid"],[[94112,110591],"disallowed"],[[110592,110593],"valid"],[[110594,113663],"disallowed"],[[113664,113770],"valid"],[[113771,113775],"disallowed"],[[113776,113788],"valid"],[[113789,113791],"disallowed"],[[113792,113800],"valid"],[[113801,113807],"disallowed"],[[113808,113817],"valid"],[[113818,113819],"disallowed"],[[113820,113820],"valid",[],"NV8"],[[113821,113822],"valid"],[[113823,113823],"valid",[],"NV8"],[[113824,113827],"ignored"],[[113828,118783],"disallowed"],[[118784,119029],"valid",[],"NV8"],[[119030,119039],"disallowed"],[[119040,119078],"valid",[],"NV8"],[[119079,119080],"disallowed"],[[119081,119081],"valid",[],"NV8"],[[119082,119133],"valid",[],"NV8"],[[119134,119134],"mapped",[119127,119141]],[[119135,119135],"mapped",[119128,119141]],[[119136,119136],"mapped",[119128,119141,119150]],[[119137,119137],"mapped",[119128,119141,119151]],[[119138,119138],"mapped",[119128,119141,119152]],[[119139,119139],"mapped",[119128,119141,119153]],[[119140,119140],"mapped",[119128,119141,119154]],[[119141,119154],"valid",[],"NV8"],[[119155,119162],"disallowed"],[[119163,119226],"valid",[],"NV8"],[[119227,119227],"mapped",[119225,119141]],[[119228,119228],"mapped",[119226,119141]],[[119229,119229],"mapped",[119225,119141,119150]],[[119230,119230],"mapped",[119226,119141,119150]],[[119231,119231],"mapped",[119225,119141,119151]],[[119232,119232],"mapped",[119226,119141,119151]],[[119233,119261],"valid",[],"NV8"],[[119262,119272],"valid",[],"NV8"],[[119273,119295],"disallowed"],[[119296,119365],"valid",[],"NV8"],[[119366,119551],"disallowed"],[[119552,119638],"valid",[],"NV8"],[[119639,119647],"disallowed"],[[119648,119665],"valid",[],"NV8"],[[119666,119807],"disallowed"],[[119808,119808],"mapped",[97]],[[119809,119809],"mapped",[98]],[[119810,119810],"mapped",[99]],[[119811,119811],"mapped",[100]],[[119812,119812],"mapped",[101]],[[119813,119813],"mapped",[102]],[[119814,119814],"mapped",[103]],[[119815,119815],"mapped",[104]],[[119816,119816],"mapped",[105]],[[119817,119817],"mapped",[106]],[[119818,119818],"mapped",[107]],[[119819,119819],"mapped",[108]],[[119820,119820],"mapped",[109]],[[119821,119821],"mapped",[110]],[[119822,119822],"mapped",[111]],[[119823,119823],"mapped",[112]],[[119824,119824],"mapped",[113]],[[119825,119825],"mapped",[114]],[[119826,119826],"mapped",[115]],[[119827,119827],"mapped",[116]],[[119828,119828],"mapped",[117]],[[119829,119829],"mapped",[118]],[[119830,119830],"mapped",[119]],[[119831,119831],"mapped",[120]],[[119832,119832],"mapped",[121]],[[119833,119833],"mapped",[122]],[[119834,119834],"mapped",[97]],[[119835,119835],"mapped",[98]],[[119836,119836],"mapped",[99]],[[119837,119837],"mapped",[100]],[[119838,119838],"mapped",[101]],[[119839,119839],"mapped",[102]],[[119840,119840],"mapped",[103]],[[119841,119841],"mapped",[104]],[[119842,119842],"mapped",[105]],[[119843,119843],"mapped",[106]],[[119844,119844],"mapped",[107]],[[119845,119845],"mapped",[108]],[[119846,119846],"mapped",[109]],[[119847,119847],"mapped",[110]],[[119848,119848],"mapped",[111]],[[119849,119849],"mapped",[112]],[[119850,119850],"mapped",[113]],[[119851,119851],"mapped",[114]],[[119852,119852],"mapped",[115]],[[119853,119853],"mapped",[116]],[[119854,119854],"mapped",[117]],[[119855,119855],"mapped",[118]],[[119856,119856],"mapped",[119]],[[119857,119857],"mapped",[120]],[[119858,119858],"mapped",[121]],[[119859,119859],"mapped",[122]],[[119860,119860],"mapped",[97]],[[119861,119861],"mapped",[98]],[[119862,119862],"mapped",[99]],[[119863,119863],"mapped",[100]],[[119864,119864],"mapped",[101]],[[119865,119865],"mapped",[102]],[[119866,119866],"mapped",[103]],[[119867,119867],"mapped",[104]],[[119868,119868],"mapped",[105]],[[119869,119869],"mapped",[106]],[[119870,119870],"mapped",[107]],[[119871,119871],"mapped",[108]],[[119872,119872],"mapped",[109]],[[119873,119873],"mapped",[110]],[[119874,119874],"mapped",[111]],[[119875,119875],"mapped",[112]],[[119876,119876],"mapped",[113]],[[119877,119877],"mapped",[114]],[[119878,119878],"mapped",[115]],[[119879,119879],"mapped",[116]],[[119880,119880],"mapped",[117]],[[119881,119881],"mapped",[118]],[[119882,119882],"mapped",[119]],[[119883,119883],"mapped",[120]],[[119884,119884],"mapped",[121]],[[119885,119885],"mapped",[122]],[[119886,119886],"mapped",[97]],[[119887,119887],"mapped",[98]],[[119888,119888],"mapped",[99]],[[119889,119889],"mapped",[100]],[[119890,119890],"mapped",[101]],[[119891,119891],"mapped",[102]],[[119892,119892],"mapped",[103]],[[119893,119893],"disallowed"],[[119894,119894],"mapped",[105]],[[119895,119895],"mapped",[106]],[[119896,119896],"mapped",[107]],[[119897,119897],"mapped",[108]],[[119898,119898],"mapped",[109]],[[119899,119899],"mapped",[110]],[[119900,119900],"mapped",[111]],[[119901,119901],"mapped",[112]],[[119902,119902],"mapped",[113]],[[119903,119903],"mapped",[114]],[[119904,119904],"mapped",[115]],[[119905,119905],"mapped",[116]],[[119906,119906],"mapped",[117]],[[119907,119907],"mapped",[118]],[[119908,119908],"mapped",[119]],[[119909,119909],"mapped",[120]],[[119910,119910],"mapped",[121]],[[119911,119911],"mapped",[122]],[[119912,119912],"mapped",[97]],[[119913,119913],"mapped",[98]],[[119914,119914],"mapped",[99]],[[119915,119915],"mapped",[100]],[[119916,119916],"mapped",[101]],[[119917,119917],"mapped",[102]],[[119918,119918],"mapped",[103]],[[119919,119919],"mapped",[104]],[[119920,119920],"mapped",[105]],[[119921,119921],"mapped",[106]],[[119922,119922],"mapped",[107]],[[119923,119923],"mapped",[108]],[[119924,119924],"mapped",[109]],[[119925,119925],"mapped",[110]],[[119926,119926],"mapped",[111]],[[119927,119927],"mapped",[112]],[[119928,119928],"mapped",[113]],[[119929,119929],"mapped",[114]],[[119930,119930],"mapped",[115]],[[119931,119931],"mapped",[116]],[[119932,119932],"mapped",[117]],[[119933,119933],"mapped",[118]],[[119934,119934],"mapped",[119]],[[119935,119935],"mapped",[120]],[[119936,119936],"mapped",[121]],[[119937,119937],"mapped",[122]],[[119938,119938],"mapped",[97]],[[119939,119939],"mapped",[98]],[[119940,119940],"mapped",[99]],[[119941,119941],"mapped",[100]],[[119942,119942],"mapped",[101]],[[119943,119943],"mapped",[102]],[[119944,119944],"mapped",[103]],[[119945,119945],"mapped",[104]],[[119946,119946],"mapped",[105]],[[119947,119947],"mapped",[106]],[[119948,119948],"mapped",[107]],[[119949,119949],"mapped",[108]],[[119950,119950],"mapped",[109]],[[119951,119951],"mapped",[110]],[[119952,119952],"mapped",[111]],[[119953,119953],"mapped",[112]],[[119954,119954],"mapped",[113]],[[119955,119955],"mapped",[114]],[[119956,119956],"mapped",[115]],[[119957,119957],"mapped",[116]],[[119958,119958],"mapped",[117]],[[119959,119959],"mapped",[118]],[[119960,119960],"mapped",[119]],[[119961,119961],"mapped",[120]],[[119962,119962],"mapped",[121]],[[119963,119963],"mapped",[122]],[[119964,119964],"mapped",[97]],[[119965,119965],"disallowed"],[[119966,119966],"mapped",[99]],[[119967,119967],"mapped",[100]],[[119968,119969],"disallowed"],[[119970,119970],"mapped",[103]],[[119971,119972],"disallowed"],[[119973,119973],"mapped",[106]],[[119974,119974],"mapped",[107]],[[119975,119976],"disallowed"],[[119977,119977],"mapped",[110]],[[119978,119978],"mapped",[111]],[[119979,119979],"mapped",[112]],[[119980,119980],"mapped",[113]],[[119981,119981],"disallowed"],[[119982,119982],"mapped",[115]],[[119983,119983],"mapped",[116]],[[119984,119984],"mapped",[117]],[[119985,119985],"mapped",[118]],[[119986,119986],"mapped",[119]],[[119987,119987],"mapped",[120]],[[119988,119988],"mapped",[121]],[[119989,119989],"mapped",[122]],[[119990,119990],"mapped",[97]],[[119991,119991],"mapped",[98]],[[119992,119992],"mapped",[99]],[[119993,119993],"mapped",[100]],[[119994,119994],"disallowed"],[[119995,119995],"mapped",[102]],[[119996,119996],"disallowed"],[[119997,119997],"mapped",[104]],[[119998,119998],"mapped",[105]],[[119999,119999],"mapped",[106]],[[120000,120000],"mapped",[107]],[[120001,120001],"mapped",[108]],[[120002,120002],"mapped",[109]],[[120003,120003],"mapped",[110]],[[120004,120004],"disallowed"],[[120005,120005],"mapped",[112]],[[120006,120006],"mapped",[113]],[[120007,120007],"mapped",[114]],[[120008,120008],"mapped",[115]],[[120009,120009],"mapped",[116]],[[120010,120010],"mapped",[117]],[[120011,120011],"mapped",[118]],[[120012,120012],"mapped",[119]],[[120013,120013],"mapped",[120]],[[120014,120014],"mapped",[121]],[[120015,120015],"mapped",[122]],[[120016,120016],"mapped",[97]],[[120017,120017],"mapped",[98]],[[120018,120018],"mapped",[99]],[[120019,120019],"mapped",[100]],[[120020,120020],"mapped",[101]],[[120021,120021],"mapped",[102]],[[120022,120022],"mapped",[103]],[[120023,120023],"mapped",[104]],[[120024,120024],"mapped",[105]],[[120025,120025],"mapped",[106]],[[120026,120026],"mapped",[107]],[[120027,120027],"mapped",[108]],[[120028,120028],"mapped",[109]],[[120029,120029],"mapped",[110]],[[120030,120030],"mapped",[111]],[[120031,120031],"mapped",[112]],[[120032,120032],"mapped",[113]],[[120033,120033],"mapped",[114]],[[120034,120034],"mapped",[115]],[[120035,120035],"mapped",[116]],[[120036,120036],"mapped",[117]],[[120037,120037],"mapped",[118]],[[120038,120038],"mapped",[119]],[[120039,120039],"mapped",[120]],[[120040,120040],"mapped",[121]],[[120041,120041],"mapped",[122]],[[120042,120042],"mapped",[97]],[[120043,120043],"mapped",[98]],[[120044,120044],"mapped",[99]],[[120045,120045],"mapped",[100]],[[120046,120046],"mapped",[101]],[[120047,120047],"mapped",[102]],[[120048,120048],"mapped",[103]],[[120049,120049],"mapped",[104]],[[120050,120050],"mapped",[105]],[[120051,120051],"mapped",[106]],[[120052,120052],"mapped",[107]],[[120053,120053],"mapped",[108]],[[120054,120054],"mapped",[109]],[[120055,120055],"mapped",[110]],[[120056,120056],"mapped",[111]],[[120057,120057],"mapped",[112]],[[120058,120058],"mapped",[113]],[[120059,120059],"mapped",[114]],[[120060,120060],"mapped",[115]],[[120061,120061],"mapped",[116]],[[120062,120062],"mapped",[117]],[[120063,120063],"mapped",[118]],[[120064,120064],"mapped",[119]],[[120065,120065],"mapped",[120]],[[120066,120066],"mapped",[121]],[[120067,120067],"mapped",[122]],[[120068,120068],"mapped",[97]],[[120069,120069],"mapped",[98]],[[120070,120070],"disallowed"],[[120071,120071],"mapped",[100]],[[120072,120072],"mapped",[101]],[[120073,120073],"mapped",[102]],[[120074,120074],"mapped",[103]],[[120075,120076],"disallowed"],[[120077,120077],"mapped",[106]],[[120078,120078],"mapped",[107]],[[120079,120079],"mapped",[108]],[[120080,120080],"mapped",[109]],[[120081,120081],"mapped",[110]],[[120082,120082],"mapped",[111]],[[120083,120083],"mapped",[112]],[[120084,120084],"mapped",[113]],[[120085,120085],"disallowed"],[[120086,120086],"mapped",[115]],[[120087,120087],"mapped",[116]],[[120088,120088],"mapped",[117]],[[120089,120089],"mapped",[118]],[[120090,120090],"mapped",[119]],[[120091,120091],"mapped",[120]],[[120092,120092],"mapped",[121]],[[120093,120093],"disallowed"],[[120094,120094],"mapped",[97]],[[120095,120095],"mapped",[98]],[[120096,120096],"mapped",[99]],[[120097,120097],"mapped",[100]],[[120098,120098],"mapped",[101]],[[120099,120099],"mapped",[102]],[[120100,120100],"mapped",[103]],[[120101,120101],"mapped",[104]],[[120102,120102],"mapped",[105]],[[120103,120103],"mapped",[106]],[[120104,120104],"mapped",[107]],[[120105,120105],"mapped",[108]],[[120106,120106],"mapped",[109]],[[120107,120107],"mapped",[110]],[[120108,120108],"mapped",[111]],[[120109,120109],"mapped",[112]],[[120110,120110],"mapped",[113]],[[120111,120111],"mapped",[114]],[[120112,120112],"mapped",[115]],[[120113,120113],"mapped",[116]],[[120114,120114],"mapped",[117]],[[120115,120115],"mapped",[118]],[[120116,120116],"mapped",[119]],[[120117,120117],"mapped",[120]],[[120118,120118],"mapped",[121]],[[120119,120119],"mapped",[122]],[[120120,120120],"mapped",[97]],[[120121,120121],"mapped",[98]],[[120122,120122],"disallowed"],[[120123,120123],"mapped",[100]],[[120124,120124],"mapped",[101]],[[120125,120125],"mapped",[102]],[[120126,120126],"mapped",[103]],[[120127,120127],"disallowed"],[[120128,120128],"mapped",[105]],[[120129,120129],"mapped",[106]],[[120130,120130],"mapped",[107]],[[120131,120131],"mapped",[108]],[[120132,120132],"mapped",[109]],[[120133,120133],"disallowed"],[[120134,120134],"mapped",[111]],[[120135,120137],"disallowed"],[[120138,120138],"mapped",[115]],[[120139,120139],"mapped",[116]],[[120140,120140],"mapped",[117]],[[120141,120141],"mapped",[118]],[[120142,120142],"mapped",[119]],[[120143,120143],"mapped",[120]],[[120144,120144],"mapped",[121]],[[120145,120145],"disallowed"],[[120146,120146],"mapped",[97]],[[120147,120147],"mapped",[98]],[[120148,120148],"mapped",[99]],[[120149,120149],"mapped",[100]],[[120150,120150],"mapped",[101]],[[120151,120151],"mapped",[102]],[[120152,120152],"mapped",[103]],[[120153,120153],"mapped",[104]],[[120154,120154],"mapped",[105]],[[120155,120155],"mapped",[106]],[[120156,120156],"mapped",[107]],[[120157,120157],"mapped",[108]],[[120158,120158],"mapped",[109]],[[120159,120159],"mapped",[110]],[[120160,120160],"mapped",[111]],[[120161,120161],"mapped",[112]],[[120162,120162],"mapped",[113]],[[120163,120163],"mapped",[114]],[[120164,120164],"mapped",[115]],[[120165,120165],"mapped",[116]],[[120166,120166],"mapped",[117]],[[120167,120167],"mapped",[118]],[[120168,120168],"mapped",[119]],[[120169,120169],"mapped",[120]],[[120170,120170],"mapped",[121]],[[120171,120171],"mapped",[122]],[[120172,120172],"mapped",[97]],[[120173,120173],"mapped",[98]],[[120174,120174],"mapped",[99]],[[120175,120175],"mapped",[100]],[[120176,120176],"mapped",[101]],[[120177,120177],"mapped",[102]],[[120178,120178],"mapped",[103]],[[120179,120179],"mapped",[104]],[[120180,120180],"mapped",[105]],[[120181,120181],"mapped",[106]],[[120182,120182],"mapped",[107]],[[120183,120183],"mapped",[108]],[[120184,120184],"mapped",[109]],[[120185,120185],"mapped",[110]],[[120186,120186],"mapped",[111]],[[120187,120187],"mapped",[112]],[[120188,120188],"mapped",[113]],[[120189,120189],"mapped",[114]],[[120190,120190],"mapped",[115]],[[120191,120191],"mapped",[116]],[[120192,120192],"mapped",[117]],[[120193,120193],"mapped",[118]],[[120194,120194],"mapped",[119]],[[120195,120195],"mapped",[120]],[[120196,120196],"mapped",[121]],[[120197,120197],"mapped",[122]],[[120198,120198],"mapped",[97]],[[120199,120199],"mapped",[98]],[[120200,120200],"mapped",[99]],[[120201,120201],"mapped",[100]],[[120202,120202],"mapped",[101]],[[120203,120203],"mapped",[102]],[[120204,120204],"mapped",[103]],[[120205,120205],"mapped",[104]],[[120206,120206],"mapped",[105]],[[120207,120207],"mapped",[106]],[[120208,120208],"mapped",[107]],[[120209,120209],"mapped",[108]],[[120210,120210],"mapped",[109]],[[120211,120211],"mapped",[110]],[[120212,120212],"mapped",[111]],[[120213,120213],"mapped",[112]],[[120214,120214],"mapped",[113]],[[120215,120215],"mapped",[114]],[[120216,120216],"mapped",[115]],[[120217,120217],"mapped",[116]],[[120218,120218],"mapped",[117]],[[120219,120219],"mapped",[118]],[[120220,120220],"mapped",[119]],[[120221,120221],"mapped",[120]],[[120222,120222],"mapped",[121]],[[120223,120223],"mapped",[122]],[[120224,120224],"mapped",[97]],[[120225,120225],"mapped",[98]],[[120226,120226],"mapped",[99]],[[120227,120227],"mapped",[100]],[[120228,120228],"mapped",[101]],[[120229,120229],"mapped",[102]],[[120230,120230],"mapped",[103]],[[120231,120231],"mapped",[104]],[[120232,120232],"mapped",[105]],[[120233,120233],"mapped",[106]],[[120234,120234],"mapped",[107]],[[120235,120235],"mapped",[108]],[[120236,120236],"mapped",[109]],[[120237,120237],"mapped",[110]],[[120238,120238],"mapped",[111]],[[120239,120239],"mapped",[112]],[[120240,120240],"mapped",[113]],[[120241,120241],"mapped",[114]],[[120242,120242],"mapped",[115]],[[120243,120243],"mapped",[116]],[[120244,120244],"mapped",[117]],[[120245,120245],"mapped",[118]],[[120246,120246],"mapped",[119]],[[120247,120247],"mapped",[120]],[[120248,120248],"mapped",[121]],[[120249,120249],"mapped",[122]],[[120250,120250],"mapped",[97]],[[120251,120251],"mapped",[98]],[[120252,120252],"mapped",[99]],[[120253,120253],"mapped",[100]],[[120254,120254],"mapped",[101]],[[120255,120255],"mapped",[102]],[[120256,120256],"mapped",[103]],[[120257,120257],"mapped",[104]],[[120258,120258],"mapped",[105]],[[120259,120259],"mapped",[106]],[[120260,120260],"mapped",[107]],[[120261,120261],"mapped",[108]],[[120262,120262],"mapped",[109]],[[120263,120263],"mapped",[110]],[[120264,120264],"mapped",[111]],[[120265,120265],"mapped",[112]],[[120266,120266],"mapped",[113]],[[120267,120267],"mapped",[114]],[[120268,120268],"mapped",[115]],[[120269,120269],"mapped",[116]],[[120270,120270],"mapped",[117]],[[120271,120271],"mapped",[118]],[[120272,120272],"mapped",[119]],[[120273,120273],"mapped",[120]],[[120274,120274],"mapped",[121]],[[120275,120275],"mapped",[122]],[[120276,120276],"mapped",[97]],[[120277,120277],"mapped",[98]],[[120278,120278],"mapped",[99]],[[120279,120279],"mapped",[100]],[[120280,120280],"mapped",[101]],[[120281,120281],"mapped",[102]],[[120282,120282],"mapped",[103]],[[120283,120283],"mapped",[104]],[[120284,120284],"mapped",[105]],[[120285,120285],"mapped",[106]],[[120286,120286],"mapped",[107]],[[120287,120287],"mapped",[108]],[[120288,120288],"mapped",[109]],[[120289,120289],"mapped",[110]],[[120290,120290],"mapped",[111]],[[120291,120291],"mapped",[112]],[[120292,120292],"mapped",[113]],[[120293,120293],"mapped",[114]],[[120294,120294],"mapped",[115]],[[120295,120295],"mapped",[116]],[[120296,120296],"mapped",[117]],[[120297,120297],"mapped",[118]],[[120298,120298],"mapped",[119]],[[120299,120299],"mapped",[120]],[[120300,120300],"mapped",[121]],[[120301,120301],"mapped",[122]],[[120302,120302],"mapped",[97]],[[120303,120303],"mapped",[98]],[[120304,120304],"mapped",[99]],[[120305,120305],"mapped",[100]],[[120306,120306],"mapped",[101]],[[120307,120307],"mapped",[102]],[[120308,120308],"mapped",[103]],[[120309,120309],"mapped",[104]],[[120310,120310],"mapped",[105]],[[120311,120311],"mapped",[106]],[[120312,120312],"mapped",[107]],[[120313,120313],"mapped",[108]],[[120314,120314],"mapped",[109]],[[120315,120315],"mapped",[110]],[[120316,120316],"mapped",[111]],[[120317,120317],"mapped",[112]],[[120318,120318],"mapped",[113]],[[120319,120319],"mapped",[114]],[[120320,120320],"mapped",[115]],[[120321,120321],"mapped",[116]],[[120322,120322],"mapped",[117]],[[120323,120323],"mapped",[118]],[[120324,120324],"mapped",[119]],[[120325,120325],"mapped",[120]],[[120326,120326],"mapped",[121]],[[120327,120327],"mapped",[122]],[[120328,120328],"mapped",[97]],[[120329,120329],"mapped",[98]],[[120330,120330],"mapped",[99]],[[120331,120331],"mapped",[100]],[[120332,120332],"mapped",[101]],[[120333,120333],"mapped",[102]],[[120334,120334],"mapped",[103]],[[120335,120335],"mapped",[104]],[[120336,120336],"mapped",[105]],[[120337,120337],"mapped",[106]],[[120338,120338],"mapped",[107]],[[120339,120339],"mapped",[108]],[[120340,120340],"mapped",[109]],[[120341,120341],"mapped",[110]],[[120342,120342],"mapped",[111]],[[120343,120343],"mapped",[112]],[[120344,120344],"mapped",[113]],[[120345,120345],"mapped",[114]],[[120346,120346],"mapped",[115]],[[120347,120347],"mapped",[116]],[[120348,120348],"mapped",[117]],[[120349,120349],"mapped",[118]],[[120350,120350],"mapped",[119]],[[120351,120351],"mapped",[120]],[[120352,120352],"mapped",[121]],[[120353,120353],"mapped",[122]],[[120354,120354],"mapped",[97]],[[120355,120355],"mapped",[98]],[[120356,120356],"mapped",[99]],[[120357,120357],"mapped",[100]],[[120358,120358],"mapped",[101]],[[120359,120359],"mapped",[102]],[[120360,120360],"mapped",[103]],[[120361,120361],"mapped",[104]],[[120362,120362],"mapped",[105]],[[120363,120363],"mapped",[106]],[[120364,120364],"mapped",[107]],[[120365,120365],"mapped",[108]],[[120366,120366],"mapped",[109]],[[120367,120367],"mapped",[110]],[[120368,120368],"mapped",[111]],[[120369,120369],"mapped",[112]],[[120370,120370],"mapped",[113]],[[120371,120371],"mapped",[114]],[[120372,120372],"mapped",[115]],[[120373,120373],"mapped",[116]],[[120374,120374],"mapped",[117]],[[120375,120375],"mapped",[118]],[[120376,120376],"mapped",[119]],[[120377,120377],"mapped",[120]],[[120378,120378],"mapped",[121]],[[120379,120379],"mapped",[122]],[[120380,120380],"mapped",[97]],[[120381,120381],"mapped",[98]],[[120382,120382],"mapped",[99]],[[120383,120383],"mapped",[100]],[[120384,120384],"mapped",[101]],[[120385,120385],"mapped",[102]],[[120386,120386],"mapped",[103]],[[120387,120387],"mapped",[104]],[[120388,120388],"mapped",[105]],[[120389,120389],"mapped",[106]],[[120390,120390],"mapped",[107]],[[120391,120391],"mapped",[108]],[[120392,120392],"mapped",[109]],[[120393,120393],"mapped",[110]],[[120394,120394],"mapped",[111]],[[120395,120395],"mapped",[112]],[[120396,120396],"mapped",[113]],[[120397,120397],"mapped",[114]],[[120398,120398],"mapped",[115]],[[120399,120399],"mapped",[116]],[[120400,120400],"mapped",[117]],[[120401,120401],"mapped",[118]],[[120402,120402],"mapped",[119]],[[120403,120403],"mapped",[120]],[[120404,120404],"mapped",[121]],[[120405,120405],"mapped",[122]],[[120406,120406],"mapped",[97]],[[120407,120407],"mapped",[98]],[[120408,120408],"mapped",[99]],[[120409,120409],"mapped",[100]],[[120410,120410],"mapped",[101]],[[120411,120411],"mapped",[102]],[[120412,120412],"mapped",[103]],[[120413,120413],"mapped",[104]],[[120414,120414],"mapped",[105]],[[120415,120415],"mapped",[106]],[[120416,120416],"mapped",[107]],[[120417,120417],"mapped",[108]],[[120418,120418],"mapped",[109]],[[120419,120419],"mapped",[110]],[[120420,120420],"mapped",[111]],[[120421,120421],"mapped",[112]],[[120422,120422],"mapped",[113]],[[120423,120423],"mapped",[114]],[[120424,120424],"mapped",[115]],[[120425,120425],"mapped",[116]],[[120426,120426],"mapped",[117]],[[120427,120427],"mapped",[118]],[[120428,120428],"mapped",[119]],[[120429,120429],"mapped",[120]],[[120430,120430],"mapped",[121]],[[120431,120431],"mapped",[122]],[[120432,120432],"mapped",[97]],[[120433,120433],"mapped",[98]],[[120434,120434],"mapped",[99]],[[120435,120435],"mapped",[100]],[[120436,120436],"mapped",[101]],[[120437,120437],"mapped",[102]],[[120438,120438],"mapped",[103]],[[120439,120439],"mapped",[104]],[[120440,120440],"mapped",[105]],[[120441,120441],"mapped",[106]],[[120442,120442],"mapped",[107]],[[120443,120443],"mapped",[108]],[[120444,120444],"mapped",[109]],[[120445,120445],"mapped",[110]],[[120446,120446],"mapped",[111]],[[120447,120447],"mapped",[112]],[[120448,120448],"mapped",[113]],[[120449,120449],"mapped",[114]],[[120450,120450],"mapped",[115]],[[120451,120451],"mapped",[116]],[[120452,120452],"mapped",[117]],[[120453,120453],"mapped",[118]],[[120454,120454],"mapped",[119]],[[120455,120455],"mapped",[120]],[[120456,120456],"mapped",[121]],[[120457,120457],"mapped",[122]],[[120458,120458],"mapped",[97]],[[120459,120459],"mapped",[98]],[[120460,120460],"mapped",[99]],[[120461,120461],"mapped",[100]],[[120462,120462],"mapped",[101]],[[120463,120463],"mapped",[102]],[[120464,120464],"mapped",[103]],[[120465,120465],"mapped",[104]],[[120466,120466],"mapped",[105]],[[120467,120467],"mapped",[106]],[[120468,120468],"mapped",[107]],[[120469,120469],"mapped",[108]],[[120470,120470],"mapped",[109]],[[120471,120471],"mapped",[110]],[[120472,120472],"mapped",[111]],[[120473,120473],"mapped",[112]],[[120474,120474],"mapped",[113]],[[120475,120475],"mapped",[114]],[[120476,120476],"mapped",[115]],[[120477,120477],"mapped",[116]],[[120478,120478],"mapped",[117]],[[120479,120479],"mapped",[118]],[[120480,120480],"mapped",[119]],[[120481,120481],"mapped",[120]],[[120482,120482],"mapped",[121]],[[120483,120483],"mapped",[122]],[[120484,120484],"mapped",[305]],[[120485,120485],"mapped",[567]],[[120486,120487],"disallowed"],[[120488,120488],"mapped",[945]],[[120489,120489],"mapped",[946]],[[120490,120490],"mapped",[947]],[[120491,120491],"mapped",[948]],[[120492,120492],"mapped",[949]],[[120493,120493],"mapped",[950]],[[120494,120494],"mapped",[951]],[[120495,120495],"mapped",[952]],[[120496,120496],"mapped",[953]],[[120497,120497],"mapped",[954]],[[120498,120498],"mapped",[955]],[[120499,120499],"mapped",[956]],[[120500,120500],"mapped",[957]],[[120501,120501],"mapped",[958]],[[120502,120502],"mapped",[959]],[[120503,120503],"mapped",[960]],[[120504,120504],"mapped",[961]],[[120505,120505],"mapped",[952]],[[120506,120506],"mapped",[963]],[[120507,120507],"mapped",[964]],[[120508,120508],"mapped",[965]],[[120509,120509],"mapped",[966]],[[120510,120510],"mapped",[967]],[[120511,120511],"mapped",[968]],[[120512,120512],"mapped",[969]],[[120513,120513],"mapped",[8711]],[[120514,120514],"mapped",[945]],[[120515,120515],"mapped",[946]],[[120516,120516],"mapped",[947]],[[120517,120517],"mapped",[948]],[[120518,120518],"mapped",[949]],[[120519,120519],"mapped",[950]],[[120520,120520],"mapped",[951]],[[120521,120521],"mapped",[952]],[[120522,120522],"mapped",[953]],[[120523,120523],"mapped",[954]],[[120524,120524],"mapped",[955]],[[120525,120525],"mapped",[956]],[[120526,120526],"mapped",[957]],[[120527,120527],"mapped",[958]],[[120528,120528],"mapped",[959]],[[120529,120529],"mapped",[960]],[[120530,120530],"mapped",[961]],[[120531,120532],"mapped",[963]],[[120533,120533],"mapped",[964]],[[120534,120534],"mapped",[965]],[[120535,120535],"mapped",[966]],[[120536,120536],"mapped",[967]],[[120537,120537],"mapped",[968]],[[120538,120538],"mapped",[969]],[[120539,120539],"mapped",[8706]],[[120540,120540],"mapped",[949]],[[120541,120541],"mapped",[952]],[[120542,120542],"mapped",[954]],[[120543,120543],"mapped",[966]],[[120544,120544],"mapped",[961]],[[120545,120545],"mapped",[960]],[[120546,120546],"mapped",[945]],[[120547,120547],"mapped",[946]],[[120548,120548],"mapped",[947]],[[120549,120549],"mapped",[948]],[[120550,120550],"mapped",[949]],[[120551,120551],"mapped",[950]],[[120552,120552],"mapped",[951]],[[120553,120553],"mapped",[952]],[[120554,120554],"mapped",[953]],[[120555,120555],"mapped",[954]],[[120556,120556],"mapped",[955]],[[120557,120557],"mapped",[956]],[[120558,120558],"mapped",[957]],[[120559,120559],"mapped",[958]],[[120560,120560],"mapped",[959]],[[120561,120561],"mapped",[960]],[[120562,120562],"mapped",[961]],[[120563,120563],"mapped",[952]],[[120564,120564],"mapped",[963]],[[120565,120565],"mapped",[964]],[[120566,120566],"mapped",[965]],[[120567,120567],"mapped",[966]],[[120568,120568],"mapped",[967]],[[120569,120569],"mapped",[968]],[[120570,120570],"mapped",[969]],[[120571,120571],"mapped",[8711]],[[120572,120572],"mapped",[945]],[[120573,120573],"mapped",[946]],[[120574,120574],"mapped",[947]],[[120575,120575],"mapped",[948]],[[120576,120576],"mapped",[949]],[[120577,120577],"mapped",[950]],[[120578,120578],"mapped",[951]],[[120579,120579],"mapped",[952]],[[120580,120580],"mapped",[953]],[[120581,120581],"mapped",[954]],[[120582,120582],"mapped",[955]],[[120583,120583],"mapped",[956]],[[120584,120584],"mapped",[957]],[[120585,120585],"mapped",[958]],[[120586,120586],"mapped",[959]],[[120587,120587],"mapped",[960]],[[120588,120588],"mapped",[961]],[[120589,120590],"mapped",[963]],[[120591,120591],"mapped",[964]],[[120592,120592],"mapped",[965]],[[120593,120593],"mapped",[966]],[[120594,120594],"mapped",[967]],[[120595,120595],"mapped",[968]],[[120596,120596],"mapped",[969]],[[120597,120597],"mapped",[8706]],[[120598,120598],"mapped",[949]],[[120599,120599],"mapped",[952]],[[120600,120600],"mapped",[954]],[[120601,120601],"mapped",[966]],[[120602,120602],"mapped",[961]],[[120603,120603],"mapped",[960]],[[120604,120604],"mapped",[945]],[[120605,120605],"mapped",[946]],[[120606,120606],"mapped",[947]],[[120607,120607],"mapped",[948]],[[120608,120608],"mapped",[949]],[[120609,120609],"mapped",[950]],[[120610,120610],"mapped",[951]],[[120611,120611],"mapped",[952]],[[120612,120612],"mapped",[953]],[[120613,120613],"mapped",[954]],[[120614,120614],"mapped",[955]],[[120615,120615],"mapped",[956]],[[120616,120616],"mapped",[957]],[[120617,120617],"mapped",[958]],[[120618,120618],"mapped",[959]],[[120619,120619],"mapped",[960]],[[120620,120620],"mapped",[961]],[[120621,120621],"mapped",[952]],[[120622,120622],"mapped",[963]],[[120623,120623],"mapped",[964]],[[120624,120624],"mapped",[965]],[[120625,120625],"mapped",[966]],[[120626,120626],"mapped",[967]],[[120627,120627],"mapped",[968]],[[120628,120628],"mapped",[969]],[[120629,120629],"mapped",[8711]],[[120630,120630],"mapped",[945]],[[120631,120631],"mapped",[946]],[[120632,120632],"mapped",[947]],[[120633,120633],"mapped",[948]],[[120634,120634],"mapped",[949]],[[120635,120635],"mapped",[950]],[[120636,120636],"mapped",[951]],[[120637,120637],"mapped",[952]],[[120638,120638],"mapped",[953]],[[120639,120639],"mapped",[954]],[[120640,120640],"mapped",[955]],[[120641,120641],"mapped",[956]],[[120642,120642],"mapped",[957]],[[120643,120643],"mapped",[958]],[[120644,120644],"mapped",[959]],[[120645,120645],"mapped",[960]],[[120646,120646],"mapped",[961]],[[120647,120648],"mapped",[963]],[[120649,120649],"mapped",[964]],[[120650,120650],"mapped",[965]],[[120651,120651],"mapped",[966]],[[120652,120652],"mapped",[967]],[[120653,120653],"mapped",[968]],[[120654,120654],"mapped",[969]],[[120655,120655],"mapped",[8706]],[[120656,120656],"mapped",[949]],[[120657,120657],"mapped",[952]],[[120658,120658],"mapped",[954]],[[120659,120659],"mapped",[966]],[[120660,120660],"mapped",[961]],[[120661,120661],"mapped",[960]],[[120662,120662],"mapped",[945]],[[120663,120663],"mapped",[946]],[[120664,120664],"mapped",[947]],[[120665,120665],"mapped",[948]],[[120666,120666],"mapped",[949]],[[120667,120667],"mapped",[950]],[[120668,120668],"mapped",[951]],[[120669,120669],"mapped",[952]],[[120670,120670],"mapped",[953]],[[120671,120671],"mapped",[954]],[[120672,120672],"mapped",[955]],[[120673,120673],"mapped",[956]],[[120674,120674],"mapped",[957]],[[120675,120675],"mapped",[958]],[[120676,120676],"mapped",[959]],[[120677,120677],"mapped",[960]],[[120678,120678],"mapped",[961]],[[120679,120679],"mapped",[952]],[[120680,120680],"mapped",[963]],[[120681,120681],"mapped",[964]],[[120682,120682],"mapped",[965]],[[120683,120683],"mapped",[966]],[[120684,120684],"mapped",[967]],[[120685,120685],"mapped",[968]],[[120686,120686],"mapped",[969]],[[120687,120687],"mapped",[8711]],[[120688,120688],"mapped",[945]],[[120689,120689],"mapped",[946]],[[120690,120690],"mapped",[947]],[[120691,120691],"mapped",[948]],[[120692,120692],"mapped",[949]],[[120693,120693],"mapped",[950]],[[120694,120694],"mapped",[951]],[[120695,120695],"mapped",[952]],[[120696,120696],"mapped",[953]],[[120697,120697],"mapped",[954]],[[120698,120698],"mapped",[955]],[[120699,120699],"mapped",[956]],[[120700,120700],"mapped",[957]],[[120701,120701],"mapped",[958]],[[120702,120702],"mapped",[959]],[[120703,120703],"mapped",[960]],[[120704,120704],"mapped",[961]],[[120705,120706],"mapped",[963]],[[120707,120707],"mapped",[964]],[[120708,120708],"mapped",[965]],[[120709,120709],"mapped",[966]],[[120710,120710],"mapped",[967]],[[120711,120711],"mapped",[968]],[[120712,120712],"mapped",[969]],[[120713,120713],"mapped",[8706]],[[120714,120714],"mapped",[949]],[[120715,120715],"mapped",[952]],[[120716,120716],"mapped",[954]],[[120717,120717],"mapped",[966]],[[120718,120718],"mapped",[961]],[[120719,120719],"mapped",[960]],[[120720,120720],"mapped",[945]],[[120721,120721],"mapped",[946]],[[120722,120722],"mapped",[947]],[[120723,120723],"mapped",[948]],[[120724,120724],"mapped",[949]],[[120725,120725],"mapped",[950]],[[120726,120726],"mapped",[951]],[[120727,120727],"mapped",[952]],[[120728,120728],"mapped",[953]],[[120729,120729],"mapped",[954]],[[120730,120730],"mapped",[955]],[[120731,120731],"mapped",[956]],[[120732,120732],"mapped",[957]],[[120733,120733],"mapped",[958]],[[120734,120734],"mapped",[959]],[[120735,120735],"mapped",[960]],[[120736,120736],"mapped",[961]],[[120737,120737],"mapped",[952]],[[120738,120738],"mapped",[963]],[[120739,120739],"mapped",[964]],[[120740,120740],"mapped",[965]],[[120741,120741],"mapped",[966]],[[120742,120742],"mapped",[967]],[[120743,120743],"mapped",[968]],[[120744,120744],"mapped",[969]],[[120745,120745],"mapped",[8711]],[[120746,120746],"mapped",[945]],[[120747,120747],"mapped",[946]],[[120748,120748],"mapped",[947]],[[120749,120749],"mapped",[948]],[[120750,120750],"mapped",[949]],[[120751,120751],"mapped",[950]],[[120752,120752],"mapped",[951]],[[120753,120753],"mapped",[952]],[[120754,120754],"mapped",[953]],[[120755,120755],"mapped",[954]],[[120756,120756],"mapped",[955]],[[120757,120757],"mapped",[956]],[[120758,120758],"mapped",[957]],[[120759,120759],"mapped",[958]],[[120760,120760],"mapped",[959]],[[120761,120761],"mapped",[960]],[[120762,120762],"mapped",[961]],[[120763,120764],"mapped",[963]],[[120765,120765],"mapped",[964]],[[120766,120766],"mapped",[965]],[[120767,120767],"mapped",[966]],[[120768,120768],"mapped",[967]],[[120769,120769],"mapped",[968]],[[120770,120770],"mapped",[969]],[[120771,120771],"mapped",[8706]],[[120772,120772],"mapped",[949]],[[120773,120773],"mapped",[952]],[[120774,120774],"mapped",[954]],[[120775,120775],"mapped",[966]],[[120776,120776],"mapped",[961]],[[120777,120777],"mapped",[960]],[[120778,120779],"mapped",[989]],[[120780,120781],"disallowed"],[[120782,120782],"mapped",[48]],[[120783,120783],"mapped",[49]],[[120784,120784],"mapped",[50]],[[120785,120785],"mapped",[51]],[[120786,120786],"mapped",[52]],[[120787,120787],"mapped",[53]],[[120788,120788],"mapped",[54]],[[120789,120789],"mapped",[55]],[[120790,120790],"mapped",[56]],[[120791,120791],"mapped",[57]],[[120792,120792],"mapped",[48]],[[120793,120793],"mapped",[49]],[[120794,120794],"mapped",[50]],[[120795,120795],"mapped",[51]],[[120796,120796],"mapped",[52]],[[120797,120797],"mapped",[53]],[[120798,120798],"mapped",[54]],[[120799,120799],"mapped",[55]],[[120800,120800],"mapped",[56]],[[120801,120801],"mapped",[57]],[[120802,120802],"mapped",[48]],[[120803,120803],"mapped",[49]],[[120804,120804],"mapped",[50]],[[120805,120805],"mapped",[51]],[[120806,120806],"mapped",[52]],[[120807,120807],"mapped",[53]],[[120808,120808],"mapped",[54]],[[120809,120809],"mapped",[55]],[[120810,120810],"mapped",[56]],[[120811,120811],"mapped",[57]],[[120812,120812],"mapped",[48]],[[120813,120813],"mapped",[49]],[[120814,120814],"mapped",[50]],[[120815,120815],"mapped",[51]],[[120816,120816],"mapped",[52]],[[120817,120817],"mapped",[53]],[[120818,120818],"mapped",[54]],[[120819,120819],"mapped",[55]],[[120820,120820],"mapped",[56]],[[120821,120821],"mapped",[57]],[[120822,120822],"mapped",[48]],[[120823,120823],"mapped",[49]],[[120824,120824],"mapped",[50]],[[120825,120825],"mapped",[51]],[[120826,120826],"mapped",[52]],[[120827,120827],"mapped",[53]],[[120828,120828],"mapped",[54]],[[120829,120829],"mapped",[55]],[[120830,120830],"mapped",[56]],[[120831,120831],"mapped",[57]],[[120832,121343],"valid",[],"NV8"],[[121344,121398],"valid"],[[121399,121402],"valid",[],"NV8"],[[121403,121452],"valid"],[[121453,121460],"valid",[],"NV8"],[[121461,121461],"valid"],[[121462,121475],"valid",[],"NV8"],[[121476,121476],"valid"],[[121477,121483],"valid",[],"NV8"],[[121484,121498],"disallowed"],[[121499,121503],"valid"],[[121504,121504],"disallowed"],[[121505,121519],"valid"],[[121520,124927],"disallowed"],[[124928,125124],"valid"],[[125125,125126],"disallowed"],[[125127,125135],"valid",[],"NV8"],[[125136,125142],"valid"],[[125143,126463],"disallowed"],[[126464,126464],"mapped",[1575]],[[126465,126465],"mapped",[1576]],[[126466,126466],"mapped",[1580]],[[126467,126467],"mapped",[1583]],[[126468,126468],"disallowed"],[[126469,126469],"mapped",[1608]],[[126470,126470],"mapped",[1586]],[[126471,126471],"mapped",[1581]],[[126472,126472],"mapped",[1591]],[[126473,126473],"mapped",[1610]],[[126474,126474],"mapped",[1603]],[[126475,126475],"mapped",[1604]],[[126476,126476],"mapped",[1605]],[[126477,126477],"mapped",[1606]],[[126478,126478],"mapped",[1587]],[[126479,126479],"mapped",[1593]],[[126480,126480],"mapped",[1601]],[[126481,126481],"mapped",[1589]],[[126482,126482],"mapped",[1602]],[[126483,126483],"mapped",[1585]],[[126484,126484],"mapped",[1588]],[[126485,126485],"mapped",[1578]],[[126486,126486],"mapped",[1579]],[[126487,126487],"mapped",[1582]],[[126488,126488],"mapped",[1584]],[[126489,126489],"mapped",[1590]],[[126490,126490],"mapped",[1592]],[[126491,126491],"mapped",[1594]],[[126492,126492],"mapped",[1646]],[[126493,126493],"mapped",[1722]],[[126494,126494],"mapped",[1697]],[[126495,126495],"mapped",[1647]],[[126496,126496],"disallowed"],[[126497,126497],"mapped",[1576]],[[126498,126498],"mapped",[1580]],[[126499,126499],"disallowed"],[[126500,126500],"mapped",[1607]],[[126501,126502],"disallowed"],[[126503,126503],"mapped",[1581]],[[126504,126504],"disallowed"],[[126505,126505],"mapped",[1610]],[[126506,126506],"mapped",[1603]],[[126507,126507],"mapped",[1604]],[[126508,126508],"mapped",[1605]],[[126509,126509],"mapped",[1606]],[[126510,126510],"mapped",[1587]],[[126511,126511],"mapped",[1593]],[[126512,126512],"mapped",[1601]],[[126513,126513],"mapped",[1589]],[[126514,126514],"mapped",[1602]],[[126515,126515],"disallowed"],[[126516,126516],"mapped",[1588]],[[126517,126517],"mapped",[1578]],[[126518,126518],"mapped",[1579]],[[126519,126519],"mapped",[1582]],[[126520,126520],"disallowed"],[[126521,126521],"mapped",[1590]],[[126522,126522],"disallowed"],[[126523,126523],"mapped",[1594]],[[126524,126529],"disallowed"],[[126530,126530],"mapped",[1580]],[[126531,126534],"disallowed"],[[126535,126535],"mapped",[1581]],[[126536,126536],"disallowed"],[[126537,126537],"mapped",[1610]],[[126538,126538],"disallowed"],[[126539,126539],"mapped",[1604]],[[126540,126540],"disallowed"],[[126541,126541],"mapped",[1606]],[[126542,126542],"mapped",[1587]],[[126543,126543],"mapped",[1593]],[[126544,126544],"disallowed"],[[126545,126545],"mapped",[1589]],[[126546,126546],"mapped",[1602]],[[126547,126547],"disallowed"],[[126548,126548],"mapped",[1588]],[[126549,126550],"disallowed"],[[126551,126551],"mapped",[1582]],[[126552,126552],"disallowed"],[[126553,126553],"mapped",[1590]],[[126554,126554],"disallowed"],[[126555,126555],"mapped",[1594]],[[126556,126556],"disallowed"],[[126557,126557],"mapped",[1722]],[[126558,126558],"disallowed"],[[126559,126559],"mapped",[1647]],[[126560,126560],"disallowed"],[[126561,126561],"mapped",[1576]],[[126562,126562],"mapped",[1580]],[[126563,126563],"disallowed"],[[126564,126564],"mapped",[1607]],[[126565,126566],"disallowed"],[[126567,126567],"mapped",[1581]],[[126568,126568],"mapped",[1591]],[[126569,126569],"mapped",[1610]],[[126570,126570],"mapped",[1603]],[[126571,126571],"disallowed"],[[126572,126572],"mapped",[1605]],[[126573,126573],"mapped",[1606]],[[126574,126574],"mapped",[1587]],[[126575,126575],"mapped",[1593]],[[126576,126576],"mapped",[1601]],[[126577,126577],"mapped",[1589]],[[126578,126578],"mapped",[1602]],[[126579,126579],"disallowed"],[[126580,126580],"mapped",[1588]],[[126581,126581],"mapped",[1578]],[[126582,126582],"mapped",[1579]],[[126583,126583],"mapped",[1582]],[[126584,126584],"disallowed"],[[126585,126585],"mapped",[1590]],[[126586,126586],"mapped",[1592]],[[126587,126587],"mapped",[1594]],[[126588,126588],"mapped",[1646]],[[126589,126589],"disallowed"],[[126590,126590],"mapped",[1697]],[[126591,126591],"disallowed"],[[126592,126592],"mapped",[1575]],[[126593,126593],"mapped",[1576]],[[126594,126594],"mapped",[1580]],[[126595,126595],"mapped",[1583]],[[126596,126596],"mapped",[1607]],[[126597,126597],"mapped",[1608]],[[126598,126598],"mapped",[1586]],[[126599,126599],"mapped",[1581]],[[126600,126600],"mapped",[1591]],[[126601,126601],"mapped",[1610]],[[126602,126602],"disallowed"],[[126603,126603],"mapped",[1604]],[[126604,126604],"mapped",[1605]],[[126605,126605],"mapped",[1606]],[[126606,126606],"mapped",[1587]],[[126607,126607],"mapped",[1593]],[[126608,126608],"mapped",[1601]],[[126609,126609],"mapped",[1589]],[[126610,126610],"mapped",[1602]],[[126611,126611],"mapped",[1585]],[[126612,126612],"mapped",[1588]],[[126613,126613],"mapped",[1578]],[[126614,126614],"mapped",[1579]],[[126615,126615],"mapped",[1582]],[[126616,126616],"mapped",[1584]],[[126617,126617],"mapped",[1590]],[[126618,126618],"mapped",[1592]],[[126619,126619],"mapped",[1594]],[[126620,126624],"disallowed"],[[126625,126625],"mapped",[1576]],[[126626,126626],"mapped",[1580]],[[126627,126627],"mapped",[1583]],[[126628,126628],"disallowed"],[[126629,126629],"mapped",[1608]],[[126630,126630],"mapped",[1586]],[[126631,126631],"mapped",[1581]],[[126632,126632],"mapped",[1591]],[[126633,126633],"mapped",[1610]],[[126634,126634],"disallowed"],[[126635,126635],"mapped",[1604]],[[126636,126636],"mapped",[1605]],[[126637,126637],"mapped",[1606]],[[126638,126638],"mapped",[1587]],[[126639,126639],"mapped",[1593]],[[126640,126640],"mapped",[1601]],[[126641,126641],"mapped",[1589]],[[126642,126642],"mapped",[1602]],[[126643,126643],"mapped",[1585]],[[126644,126644],"mapped",[1588]],[[126645,126645],"mapped",[1578]],[[126646,126646],"mapped",[1579]],[[126647,126647],"mapped",[1582]],[[126648,126648],"mapped",[1584]],[[126649,126649],"mapped",[1590]],[[126650,126650],"mapped",[1592]],[[126651,126651],"mapped",[1594]],[[126652,126703],"disallowed"],[[126704,126705],"valid",[],"NV8"],[[126706,126975],"disallowed"],[[126976,127019],"valid",[],"NV8"],[[127020,127023],"disallowed"],[[127024,127123],"valid",[],"NV8"],[[127124,127135],"disallowed"],[[127136,127150],"valid",[],"NV8"],[[127151,127152],"disallowed"],[[127153,127166],"valid",[],"NV8"],[[127167,127167],"valid",[],"NV8"],[[127168,127168],"disallowed"],[[127169,127183],"valid",[],"NV8"],[[127184,127184],"disallowed"],[[127185,127199],"valid",[],"NV8"],[[127200,127221],"valid",[],"NV8"],[[127222,127231],"disallowed"],[[127232,127232],"disallowed"],[[127233,127233],"disallowed_STD3_mapped",[48,44]],[[127234,127234],"disallowed_STD3_mapped",[49,44]],[[127235,127235],"disallowed_STD3_mapped",[50,44]],[[127236,127236],"disallowed_STD3_mapped",[51,44]],[[127237,127237],"disallowed_STD3_mapped",[52,44]],[[127238,127238],"disallowed_STD3_mapped",[53,44]],[[127239,127239],"disallowed_STD3_mapped",[54,44]],[[127240,127240],"disallowed_STD3_mapped",[55,44]],[[127241,127241],"disallowed_STD3_mapped",[56,44]],[[127242,127242],"disallowed_STD3_mapped",[57,44]],[[127243,127244],"valid",[],"NV8"],[[127245,127247],"disallowed"],[[127248,127248],"disallowed_STD3_mapped",[40,97,41]],[[127249,127249],"disallowed_STD3_mapped",[40,98,41]],[[127250,127250],"disallowed_STD3_mapped",[40,99,41]],[[127251,127251],"disallowed_STD3_mapped",[40,100,41]],[[127252,127252],"disallowed_STD3_mapped",[40,101,41]],[[127253,127253],"disallowed_STD3_mapped",[40,102,41]],[[127254,127254],"disallowed_STD3_mapped",[40,103,41]],[[127255,127255],"disallowed_STD3_mapped",[40,104,41]],[[127256,127256],"disallowed_STD3_mapped",[40,105,41]],[[127257,127257],"disallowed_STD3_mapped",[40,106,41]],[[127258,127258],"disallowed_STD3_mapped",[40,107,41]],[[127259,127259],"disallowed_STD3_mapped",[40,108,41]],[[127260,127260],"disallowed_STD3_mapped",[40,109,41]],[[127261,127261],"disallowed_STD3_mapped",[40,110,41]],[[127262,127262],"disallowed_STD3_mapped",[40,111,41]],[[127263,127263],"disallowed_STD3_mapped",[40,112,41]],[[127264,127264],"disallowed_STD3_mapped",[40,113,41]],[[127265,127265],"disallowed_STD3_mapped",[40,114,41]],[[127266,127266],"disallowed_STD3_mapped",[40,115,41]],[[127267,127267],"disallowed_STD3_mapped",[40,116,41]],[[127268,127268],"disallowed_STD3_mapped",[40,117,41]],[[127269,127269],"disallowed_STD3_mapped",[40,118,41]],[[127270,127270],"disallowed_STD3_mapped",[40,119,41]],[[127271,127271],"disallowed_STD3_mapped",[40,120,41]],[[127272,127272],"disallowed_STD3_mapped",[40,121,41]],[[127273,127273],"disallowed_STD3_mapped",[40,122,41]],[[127274,127274],"mapped",[12308,115,12309]],[[127275,127275],"mapped",[99]],[[127276,127276],"mapped",[114]],[[127277,127277],"mapped",[99,100]],[[127278,127278],"mapped",[119,122]],[[127279,127279],"disallowed"],[[127280,127280],"mapped",[97]],[[127281,127281],"mapped",[98]],[[127282,127282],"mapped",[99]],[[127283,127283],"mapped",[100]],[[127284,127284],"mapped",[101]],[[127285,127285],"mapped",[102]],[[127286,127286],"mapped",[103]],[[127287,127287],"mapped",[104]],[[127288,127288],"mapped",[105]],[[127289,127289],"mapped",[106]],[[127290,127290],"mapped",[107]],[[127291,127291],"mapped",[108]],[[127292,127292],"mapped",[109]],[[127293,127293],"mapped",[110]],[[127294,127294],"mapped",[111]],[[127295,127295],"mapped",[112]],[[127296,127296],"mapped",[113]],[[127297,127297],"mapped",[114]],[[127298,127298],"mapped",[115]],[[127299,127299],"mapped",[116]],[[127300,127300],"mapped",[117]],[[127301,127301],"mapped",[118]],[[127302,127302],"mapped",[119]],[[127303,127303],"mapped",[120]],[[127304,127304],"mapped",[121]],[[127305,127305],"mapped",[122]],[[127306,127306],"mapped",[104,118]],[[127307,127307],"mapped",[109,118]],[[127308,127308],"mapped",[115,100]],[[127309,127309],"mapped",[115,115]],[[127310,127310],"mapped",[112,112,118]],[[127311,127311],"mapped",[119,99]],[[127312,127318],"valid",[],"NV8"],[[127319,127319],"valid",[],"NV8"],[[127320,127326],"valid",[],"NV8"],[[127327,127327],"valid",[],"NV8"],[[127328,127337],"valid",[],"NV8"],[[127338,127338],"mapped",[109,99]],[[127339,127339],"mapped",[109,100]],[[127340,127343],"disallowed"],[[127344,127352],"valid",[],"NV8"],[[127353,127353],"valid",[],"NV8"],[[127354,127354],"valid",[],"NV8"],[[127355,127356],"valid",[],"NV8"],[[127357,127358],"valid",[],"NV8"],[[127359,127359],"valid",[],"NV8"],[[127360,127369],"valid",[],"NV8"],[[127370,127373],"valid",[],"NV8"],[[127374,127375],"valid",[],"NV8"],[[127376,127376],"mapped",[100,106]],[[127377,127386],"valid",[],"NV8"],[[127387,127461],"disallowed"],[[127462,127487],"valid",[],"NV8"],[[127488,127488],"mapped",[12411,12363]],[[127489,127489],"mapped",[12467,12467]],[[127490,127490],"mapped",[12469]],[[127491,127503],"disallowed"],[[127504,127504],"mapped",[25163]],[[127505,127505],"mapped",[23383]],[[127506,127506],"mapped",[21452]],[[127507,127507],"mapped",[12487]],[[127508,127508],"mapped",[20108]],[[127509,127509],"mapped",[22810]],[[127510,127510],"mapped",[35299]],[[127511,127511],"mapped",[22825]],[[127512,127512],"mapped",[20132]],[[127513,127513],"mapped",[26144]],[[127514,127514],"mapped",[28961]],[[127515,127515],"mapped",[26009]],[[127516,127516],"mapped",[21069]],[[127517,127517],"mapped",[24460]],[[127518,127518],"mapped",[20877]],[[127519,127519],"mapped",[26032]],[[127520,127520],"mapped",[21021]],[[127521,127521],"mapped",[32066]],[[127522,127522],"mapped",[29983]],[[127523,127523],"mapped",[36009]],[[127524,127524],"mapped",[22768]],[[127525,127525],"mapped",[21561]],[[127526,127526],"mapped",[28436]],[[127527,127527],"mapped",[25237]],[[127528,127528],"mapped",[25429]],[[127529,127529],"mapped",[19968]],[[127530,127530],"mapped",[19977]],[[127531,127531],"mapped",[36938]],[[127532,127532],"mapped",[24038]],[[127533,127533],"mapped",[20013]],[[127534,127534],"mapped",[21491]],[[127535,127535],"mapped",[25351]],[[127536,127536],"mapped",[36208]],[[127537,127537],"mapped",[25171]],[[127538,127538],"mapped",[31105]],[[127539,127539],"mapped",[31354]],[[127540,127540],"mapped",[21512]],[[127541,127541],"mapped",[28288]],[[127542,127542],"mapped",[26377]],[[127543,127543],"mapped",[26376]],[[127544,127544],"mapped",[30003]],[[127545,127545],"mapped",[21106]],[[127546,127546],"mapped",[21942]],[[127547,127551],"disallowed"],[[127552,127552],"mapped",[12308,26412,12309]],[[127553,127553],"mapped",[12308,19977,12309]],[[127554,127554],"mapped",[12308,20108,12309]],[[127555,127555],"mapped",[12308,23433,12309]],[[127556,127556],"mapped",[12308,28857,12309]],[[127557,127557],"mapped",[12308,25171,12309]],[[127558,127558],"mapped",[12308,30423,12309]],[[127559,127559],"mapped",[12308,21213,12309]],[[127560,127560],"mapped",[12308,25943,12309]],[[127561,127567],"disallowed"],[[127568,127568],"mapped",[24471]],[[127569,127569],"mapped",[21487]],[[127570,127743],"disallowed"],[[127744,127776],"valid",[],"NV8"],[[127777,127788],"valid",[],"NV8"],[[127789,127791],"valid",[],"NV8"],[[127792,127797],"valid",[],"NV8"],[[127798,127798],"valid",[],"NV8"],[[127799,127868],"valid",[],"NV8"],[[127869,127869],"valid",[],"NV8"],[[127870,127871],"valid",[],"NV8"],[[127872,127891],"valid",[],"NV8"],[[127892,127903],"valid",[],"NV8"],[[127904,127940],"valid",[],"NV8"],[[127941,127941],"valid",[],"NV8"],[[127942,127946],"valid",[],"NV8"],[[127947,127950],"valid",[],"NV8"],[[127951,127955],"valid",[],"NV8"],[[127956,127967],"valid",[],"NV8"],[[127968,127984],"valid",[],"NV8"],[[127985,127991],"valid",[],"NV8"],[[127992,127999],"valid",[],"NV8"],[[128000,128062],"valid",[],"NV8"],[[128063,128063],"valid",[],"NV8"],[[128064,128064],"valid",[],"NV8"],[[128065,128065],"valid",[],"NV8"],[[128066,128247],"valid",[],"NV8"],[[128248,128248],"valid",[],"NV8"],[[128249,128252],"valid",[],"NV8"],[[128253,128254],"valid",[],"NV8"],[[128255,128255],"valid",[],"NV8"],[[128256,128317],"valid",[],"NV8"],[[128318,128319],"valid",[],"NV8"],[[128320,128323],"valid",[],"NV8"],[[128324,128330],"valid",[],"NV8"],[[128331,128335],"valid",[],"NV8"],[[128336,128359],"valid",[],"NV8"],[[128360,128377],"valid",[],"NV8"],[[128378,128378],"disallowed"],[[128379,128419],"valid",[],"NV8"],[[128420,128420],"disallowed"],[[128421,128506],"valid",[],"NV8"],[[128507,128511],"valid",[],"NV8"],[[128512,128512],"valid",[],"NV8"],[[128513,128528],"valid",[],"NV8"],[[128529,128529],"valid",[],"NV8"],[[128530,128532],"valid",[],"NV8"],[[128533,128533],"valid",[],"NV8"],[[128534,128534],"valid",[],"NV8"],[[128535,128535],"valid",[],"NV8"],[[128536,128536],"valid",[],"NV8"],[[128537,128537],"valid",[],"NV8"],[[128538,128538],"valid",[],"NV8"],[[128539,128539],"valid",[],"NV8"],[[128540,128542],"valid",[],"NV8"],[[128543,128543],"valid",[],"NV8"],[[128544,128549],"valid",[],"NV8"],[[128550,128551],"valid",[],"NV8"],[[128552,128555],"valid",[],"NV8"],[[128556,128556],"valid",[],"NV8"],[[128557,128557],"valid",[],"NV8"],[[128558,128559],"valid",[],"NV8"],[[128560,128563],"valid",[],"NV8"],[[128564,128564],"valid",[],"NV8"],[[128565,128576],"valid",[],"NV8"],[[128577,128578],"valid",[],"NV8"],[[128579,128580],"valid",[],"NV8"],[[128581,128591],"valid",[],"NV8"],[[128592,128639],"valid",[],"NV8"],[[128640,128709],"valid",[],"NV8"],[[128710,128719],"valid",[],"NV8"],[[128720,128720],"valid",[],"NV8"],[[128721,128735],"disallowed"],[[128736,128748],"valid",[],"NV8"],[[128749,128751],"disallowed"],[[128752,128755],"valid",[],"NV8"],[[128756,128767],"disallowed"],[[128768,128883],"valid",[],"NV8"],[[128884,128895],"disallowed"],[[128896,128980],"valid",[],"NV8"],[[128981,129023],"disallowed"],[[129024,129035],"valid",[],"NV8"],[[129036,129039],"disallowed"],[[129040,129095],"valid",[],"NV8"],[[129096,129103],"disallowed"],[[129104,129113],"valid",[],"NV8"],[[129114,129119],"disallowed"],[[129120,129159],"valid",[],"NV8"],[[129160,129167],"disallowed"],[[129168,129197],"valid",[],"NV8"],[[129198,129295],"disallowed"],[[129296,129304],"valid",[],"NV8"],[[129305,129407],"disallowed"],[[129408,129412],"valid",[],"NV8"],[[129413,129471],"disallowed"],[[129472,129472],"valid",[],"NV8"],[[129473,131069],"disallowed"],[[131070,131071],"disallowed"],[[131072,173782],"valid"],[[173783,173823],"disallowed"],[[173824,177972],"valid"],[[177973,177983],"disallowed"],[[177984,178205],"valid"],[[178206,178207],"disallowed"],[[178208,183969],"valid"],[[183970,194559],"disallowed"],[[194560,194560],"mapped",[20029]],[[194561,194561],"mapped",[20024]],[[194562,194562],"mapped",[20033]],[[194563,194563],"mapped",[131362]],[[194564,194564],"mapped",[20320]],[[194565,194565],"mapped",[20398]],[[194566,194566],"mapped",[20411]],[[194567,194567],"mapped",[20482]],[[194568,194568],"mapped",[20602]],[[194569,194569],"mapped",[20633]],[[194570,194570],"mapped",[20711]],[[194571,194571],"mapped",[20687]],[[194572,194572],"mapped",[13470]],[[194573,194573],"mapped",[132666]],[[194574,194574],"mapped",[20813]],[[194575,194575],"mapped",[20820]],[[194576,194576],"mapped",[20836]],[[194577,194577],"mapped",[20855]],[[194578,194578],"mapped",[132380]],[[194579,194579],"mapped",[13497]],[[194580,194580],"mapped",[20839]],[[194581,194581],"mapped",[20877]],[[194582,194582],"mapped",[132427]],[[194583,194583],"mapped",[20887]],[[194584,194584],"mapped",[20900]],[[194585,194585],"mapped",[20172]],[[194586,194586],"mapped",[20908]],[[194587,194587],"mapped",[20917]],[[194588,194588],"mapped",[168415]],[[194589,194589],"mapped",[20981]],[[194590,194590],"mapped",[20995]],[[194591,194591],"mapped",[13535]],[[194592,194592],"mapped",[21051]],[[194593,194593],"mapped",[21062]],[[194594,194594],"mapped",[21106]],[[194595,194595],"mapped",[21111]],[[194596,194596],"mapped",[13589]],[[194597,194597],"mapped",[21191]],[[194598,194598],"mapped",[21193]],[[194599,194599],"mapped",[21220]],[[194600,194600],"mapped",[21242]],[[194601,194601],"mapped",[21253]],[[194602,194602],"mapped",[21254]],[[194603,194603],"mapped",[21271]],[[194604,194604],"mapped",[21321]],[[194605,194605],"mapped",[21329]],[[194606,194606],"mapped",[21338]],[[194607,194607],"mapped",[21363]],[[194608,194608],"mapped",[21373]],[[194609,194611],"mapped",[21375]],[[194612,194612],"mapped",[133676]],[[194613,194613],"mapped",[28784]],[[194614,194614],"mapped",[21450]],[[194615,194615],"mapped",[21471]],[[194616,194616],"mapped",[133987]],[[194617,194617],"mapped",[21483]],[[194618,194618],"mapped",[21489]],[[194619,194619],"mapped",[21510]],[[194620,194620],"mapped",[21662]],[[194621,194621],"mapped",[21560]],[[194622,194622],"mapped",[21576]],[[194623,194623],"mapped",[21608]],[[194624,194624],"mapped",[21666]],[[194625,194625],"mapped",[21750]],[[194626,194626],"mapped",[21776]],[[194627,194627],"mapped",[21843]],[[194628,194628],"mapped",[21859]],[[194629,194630],"mapped",[21892]],[[194631,194631],"mapped",[21913]],[[194632,194632],"mapped",[21931]],[[194633,194633],"mapped",[21939]],[[194634,194634],"mapped",[21954]],[[194635,194635],"mapped",[22294]],[[194636,194636],"mapped",[22022]],[[194637,194637],"mapped",[22295]],[[194638,194638],"mapped",[22097]],[[194639,194639],"mapped",[22132]],[[194640,194640],"mapped",[20999]],[[194641,194641],"mapped",[22766]],[[194642,194642],"mapped",[22478]],[[194643,194643],"mapped",[22516]],[[194644,194644],"mapped",[22541]],[[194645,194645],"mapped",[22411]],[[194646,194646],"mapped",[22578]],[[194647,194647],"mapped",[22577]],[[194648,194648],"mapped",[22700]],[[194649,194649],"mapped",[136420]],[[194650,194650],"mapped",[22770]],[[194651,194651],"mapped",[22775]],[[194652,194652],"mapped",[22790]],[[194653,194653],"mapped",[22810]],[[194654,194654],"mapped",[22818]],[[194655,194655],"mapped",[22882]],[[194656,194656],"mapped",[136872]],[[194657,194657],"mapped",[136938]],[[194658,194658],"mapped",[23020]],[[194659,194659],"mapped",[23067]],[[194660,194660],"mapped",[23079]],[[194661,194661],"mapped",[23000]],[[194662,194662],"mapped",[23142]],[[194663,194663],"mapped",[14062]],[[194664,194664],"disallowed"],[[194665,194665],"mapped",[23304]],[[194666,194667],"mapped",[23358]],[[194668,194668],"mapped",[137672]],[[194669,194669],"mapped",[23491]],[[194670,194670],"mapped",[23512]],[[194671,194671],"mapped",[23527]],[[194672,194672],"mapped",[23539]],[[194673,194673],"mapped",[138008]],[[194674,194674],"mapped",[23551]],[[194675,194675],"mapped",[23558]],[[194676,194676],"disallowed"],[[194677,194677],"mapped",[23586]],[[194678,194678],"mapped",[14209]],[[194679,194679],"mapped",[23648]],[[194680,194680],"mapped",[23662]],[[194681,194681],"mapped",[23744]],[[194682,194682],"mapped",[23693]],[[194683,194683],"mapped",[138724]],[[194684,194684],"mapped",[23875]],[[194685,194685],"mapped",[138726]],[[194686,194686],"mapped",[23918]],[[194687,194687],"mapped",[23915]],[[194688,194688],"mapped",[23932]],[[194689,194689],"mapped",[24033]],[[194690,194690],"mapped",[24034]],[[194691,194691],"mapped",[14383]],[[194692,194692],"mapped",[24061]],[[194693,194693],"mapped",[24104]],[[194694,194694],"mapped",[24125]],[[194695,194695],"mapped",[24169]],[[194696,194696],"mapped",[14434]],[[194697,194697],"mapped",[139651]],[[194698,194698],"mapped",[14460]],[[194699,194699],"mapped",[24240]],[[194700,194700],"mapped",[24243]],[[194701,194701],"mapped",[24246]],[[194702,194702],"mapped",[24266]],[[194703,194703],"mapped",[172946]],[[194704,194704],"mapped",[24318]],[[194705,194706],"mapped",[140081]],[[194707,194707],"mapped",[33281]],[[194708,194709],"mapped",[24354]],[[194710,194710],"mapped",[14535]],[[194711,194711],"mapped",[144056]],[[194712,194712],"mapped",[156122]],[[194713,194713],"mapped",[24418]],[[194714,194714],"mapped",[24427]],[[194715,194715],"mapped",[14563]],[[194716,194716],"mapped",[24474]],[[194717,194717],"mapped",[24525]],[[194718,194718],"mapped",[24535]],[[194719,194719],"mapped",[24569]],[[194720,194720],"mapped",[24705]],[[194721,194721],"mapped",[14650]],[[194722,194722],"mapped",[14620]],[[194723,194723],"mapped",[24724]],[[194724,194724],"mapped",[141012]],[[194725,194725],"mapped",[24775]],[[194726,194726],"mapped",[24904]],[[194727,194727],"mapped",[24908]],[[194728,194728],"mapped",[24910]],[[194729,194729],"mapped",[24908]],[[194730,194730],"mapped",[24954]],[[194731,194731],"mapped",[24974]],[[194732,194732],"mapped",[25010]],[[194733,194733],"mapped",[24996]],[[194734,194734],"mapped",[25007]],[[194735,194735],"mapped",[25054]],[[194736,194736],"mapped",[25074]],[[194737,194737],"mapped",[25078]],[[194738,194738],"mapped",[25104]],[[194739,194739],"mapped",[25115]],[[194740,194740],"mapped",[25181]],[[194741,194741],"mapped",[25265]],[[194742,194742],"mapped",[25300]],[[194743,194743],"mapped",[25424]],[[194744,194744],"mapped",[142092]],[[194745,194745],"mapped",[25405]],[[194746,194746],"mapped",[25340]],[[194747,194747],"mapped",[25448]],[[194748,194748],"mapped",[25475]],[[194749,194749],"mapped",[25572]],[[194750,194750],"mapped",[142321]],[[194751,194751],"mapped",[25634]],[[194752,194752],"mapped",[25541]],[[194753,194753],"mapped",[25513]],[[194754,194754],"mapped",[14894]],[[194755,194755],"mapped",[25705]],[[194756,194756],"mapped",[25726]],[[194757,194757],"mapped",[25757]],[[194758,194758],"mapped",[25719]],[[194759,194759],"mapped",[14956]],[[194760,194760],"mapped",[25935]],[[194761,194761],"mapped",[25964]],[[194762,194762],"mapped",[143370]],[[194763,194763],"mapped",[26083]],[[194764,194764],"mapped",[26360]],[[194765,194765],"mapped",[26185]],[[194766,194766],"mapped",[15129]],[[194767,194767],"mapped",[26257]],[[194768,194768],"mapped",[15112]],[[194769,194769],"mapped",[15076]],[[194770,194770],"mapped",[20882]],[[194771,194771],"mapped",[20885]],[[194772,194772],"mapped",[26368]],[[194773,194773],"mapped",[26268]],[[194774,194774],"mapped",[32941]],[[194775,194775],"mapped",[17369]],[[194776,194776],"mapped",[26391]],[[194777,194777],"mapped",[26395]],[[194778,194778],"mapped",[26401]],[[194779,194779],"mapped",[26462]],[[194780,194780],"mapped",[26451]],[[194781,194781],"mapped",[144323]],[[194782,194782],"mapped",[15177]],[[194783,194783],"mapped",[26618]],[[194784,194784],"mapped",[26501]],[[194785,194785],"mapped",[26706]],[[194786,194786],"mapped",[26757]],[[194787,194787],"mapped",[144493]],[[194788,194788],"mapped",[26766]],[[194789,194789],"mapped",[26655]],[[194790,194790],"mapped",[26900]],[[194791,194791],"mapped",[15261]],[[194792,194792],"mapped",[26946]],[[194793,194793],"mapped",[27043]],[[194794,194794],"mapped",[27114]],[[194795,194795],"mapped",[27304]],[[194796,194796],"mapped",[145059]],[[194797,194797],"mapped",[27355]],[[194798,194798],"mapped",[15384]],[[194799,194799],"mapped",[27425]],[[194800,194800],"mapped",[145575]],[[194801,194801],"mapped",[27476]],[[194802,194802],"mapped",[15438]],[[194803,194803],"mapped",[27506]],[[194804,194804],"mapped",[27551]],[[194805,194805],"mapped",[27578]],[[194806,194806],"mapped",[27579]],[[194807,194807],"mapped",[146061]],[[194808,194808],"mapped",[138507]],[[194809,194809],"mapped",[146170]],[[194810,194810],"mapped",[27726]],[[194811,194811],"mapped",[146620]],[[194812,194812],"mapped",[27839]],[[194813,194813],"mapped",[27853]],[[194814,194814],"mapped",[27751]],[[194815,194815],"mapped",[27926]],[[194816,194816],"mapped",[27966]],[[194817,194817],"mapped",[28023]],[[194818,194818],"mapped",[27969]],[[194819,194819],"mapped",[28009]],[[194820,194820],"mapped",[28024]],[[194821,194821],"mapped",[28037]],[[194822,194822],"mapped",[146718]],[[194823,194823],"mapped",[27956]],[[194824,194824],"mapped",[28207]],[[194825,194825],"mapped",[28270]],[[194826,194826],"mapped",[15667]],[[194827,194827],"mapped",[28363]],[[194828,194828],"mapped",[28359]],[[194829,194829],"mapped",[147153]],[[194830,194830],"mapped",[28153]],[[194831,194831],"mapped",[28526]],[[194832,194832],"mapped",[147294]],[[194833,194833],"mapped",[147342]],[[194834,194834],"mapped",[28614]],[[194835,194835],"mapped",[28729]],[[194836,194836],"mapped",[28702]],[[194837,194837],"mapped",[28699]],[[194838,194838],"mapped",[15766]],[[194839,194839],"mapped",[28746]],[[194840,194840],"mapped",[28797]],[[194841,194841],"mapped",[28791]],[[194842,194842],"mapped",[28845]],[[194843,194843],"mapped",[132389]],[[194844,194844],"mapped",[28997]],[[194845,194845],"mapped",[148067]],[[194846,194846],"mapped",[29084]],[[194847,194847],"disallowed"],[[194848,194848],"mapped",[29224]],[[194849,194849],"mapped",[29237]],[[194850,194850],"mapped",[29264]],[[194851,194851],"mapped",[149000]],[[194852,194852],"mapped",[29312]],[[194853,194853],"mapped",[29333]],[[194854,194854],"mapped",[149301]],[[194855,194855],"mapped",[149524]],[[194856,194856],"mapped",[29562]],[[194857,194857],"mapped",[29579]],[[194858,194858],"mapped",[16044]],[[194859,194859],"mapped",[29605]],[[194860,194861],"mapped",[16056]],[[194862,194862],"mapped",[29767]],[[194863,194863],"mapped",[29788]],[[194864,194864],"mapped",[29809]],[[194865,194865],"mapped",[29829]],[[194866,194866],"mapped",[29898]],[[194867,194867],"mapped",[16155]],[[194868,194868],"mapped",[29988]],[[194869,194869],"mapped",[150582]],[[194870,194870],"mapped",[30014]],[[194871,194871],"mapped",[150674]],[[194872,194872],"mapped",[30064]],[[194873,194873],"mapped",[139679]],[[194874,194874],"mapped",[30224]],[[194875,194875],"mapped",[151457]],[[194876,194876],"mapped",[151480]],[[194877,194877],"mapped",[151620]],[[194878,194878],"mapped",[16380]],[[194879,194879],"mapped",[16392]],[[194880,194880],"mapped",[30452]],[[194881,194881],"mapped",[151795]],[[194882,194882],"mapped",[151794]],[[194883,194883],"mapped",[151833]],[[194884,194884],"mapped",[151859]],[[194885,194885],"mapped",[30494]],[[194886,194887],"mapped",[30495]],[[194888,194888],"mapped",[30538]],[[194889,194889],"mapped",[16441]],[[194890,194890],"mapped",[30603]],[[194891,194891],"mapped",[16454]],[[194892,194892],"mapped",[16534]],[[194893,194893],"mapped",[152605]],[[194894,194894],"mapped",[30798]],[[194895,194895],"mapped",[30860]],[[194896,194896],"mapped",[30924]],[[194897,194897],"mapped",[16611]],[[194898,194898],"mapped",[153126]],[[194899,194899],"mapped",[31062]],[[194900,194900],"mapped",[153242]],[[194901,194901],"mapped",[153285]],[[194902,194902],"mapped",[31119]],[[194903,194903],"mapped",[31211]],[[194904,194904],"mapped",[16687]],[[194905,194905],"mapped",[31296]],[[194906,194906],"mapped",[31306]],[[194907,194907],"mapped",[31311]],[[194908,194908],"mapped",[153980]],[[194909,194910],"mapped",[154279]],[[194911,194911],"disallowed"],[[194912,194912],"mapped",[16898]],[[194913,194913],"mapped",[154539]],[[194914,194914],"mapped",[31686]],[[194915,194915],"mapped",[31689]],[[194916,194916],"mapped",[16935]],[[194917,194917],"mapped",[154752]],[[194918,194918],"mapped",[31954]],[[194919,194919],"mapped",[17056]],[[194920,194920],"mapped",[31976]],[[194921,194921],"mapped",[31971]],[[194922,194922],"mapped",[32000]],[[194923,194923],"mapped",[155526]],[[194924,194924],"mapped",[32099]],[[194925,194925],"mapped",[17153]],[[194926,194926],"mapped",[32199]],[[194927,194927],"mapped",[32258]],[[194928,194928],"mapped",[32325]],[[194929,194929],"mapped",[17204]],[[194930,194930],"mapped",[156200]],[[194931,194931],"mapped",[156231]],[[194932,194932],"mapped",[17241]],[[194933,194933],"mapped",[156377]],[[194934,194934],"mapped",[32634]],[[194935,194935],"mapped",[156478]],[[194936,194936],"mapped",[32661]],[[194937,194937],"mapped",[32762]],[[194938,194938],"mapped",[32773]],[[194939,194939],"mapped",[156890]],[[194940,194940],"mapped",[156963]],[[194941,194941],"mapped",[32864]],[[194942,194942],"mapped",[157096]],[[194943,194943],"mapped",[32880]],[[194944,194944],"mapped",[144223]],[[194945,194945],"mapped",[17365]],[[194946,194946],"mapped",[32946]],[[194947,194947],"mapped",[33027]],[[194948,194948],"mapped",[17419]],[[194949,194949],"mapped",[33086]],[[194950,194950],"mapped",[23221]],[[194951,194951],"mapped",[157607]],[[194952,194952],"mapped",[157621]],[[194953,194953],"mapped",[144275]],[[194954,194954],"mapped",[144284]],[[194955,194955],"mapped",[33281]],[[194956,194956],"mapped",[33284]],[[194957,194957],"mapped",[36766]],[[194958,194958],"mapped",[17515]],[[194959,194959],"mapped",[33425]],[[194960,194960],"mapped",[33419]],[[194961,194961],"mapped",[33437]],[[194962,194962],"mapped",[21171]],[[194963,194963],"mapped",[33457]],[[194964,194964],"mapped",[33459]],[[194965,194965],"mapped",[33469]],[[194966,194966],"mapped",[33510]],[[194967,194967],"mapped",[158524]],[[194968,194968],"mapped",[33509]],[[194969,194969],"mapped",[33565]],[[194970,194970],"mapped",[33635]],[[194971,194971],"mapped",[33709]],[[194972,194972],"mapped",[33571]],[[194973,194973],"mapped",[33725]],[[194974,194974],"mapped",[33767]],[[194975,194975],"mapped",[33879]],[[194976,194976],"mapped",[33619]],[[194977,194977],"mapped",[33738]],[[194978,194978],"mapped",[33740]],[[194979,194979],"mapped",[33756]],[[194980,194980],"mapped",[158774]],[[194981,194981],"mapped",[159083]],[[194982,194982],"mapped",[158933]],[[194983,194983],"mapped",[17707]],[[194984,194984],"mapped",[34033]],[[194985,194985],"mapped",[34035]],[[194986,194986],"mapped",[34070]],[[194987,194987],"mapped",[160714]],[[194988,194988],"mapped",[34148]],[[194989,194989],"mapped",[159532]],[[194990,194990],"mapped",[17757]],[[194991,194991],"mapped",[17761]],[[194992,194992],"mapped",[159665]],[[194993,194993],"mapped",[159954]],[[194994,194994],"mapped",[17771]],[[194995,194995],"mapped",[34384]],[[194996,194996],"mapped",[34396]],[[194997,194997],"mapped",[34407]],[[194998,194998],"mapped",[34409]],[[194999,194999],"mapped",[34473]],[[195000,195000],"mapped",[34440]],[[195001,195001],"mapped",[34574]],[[195002,195002],"mapped",[34530]],[[195003,195003],"mapped",[34681]],[[195004,195004],"mapped",[34600]],[[195005,195005],"mapped",[34667]],[[195006,195006],"mapped",[34694]],[[195007,195007],"disallowed"],[[195008,195008],"mapped",[34785]],[[195009,195009],"mapped",[34817]],[[195010,195010],"mapped",[17913]],[[195011,195011],"mapped",[34912]],[[195012,195012],"mapped",[34915]],[[195013,195013],"mapped",[161383]],[[195014,195014],"mapped",[35031]],[[195015,195015],"mapped",[35038]],[[195016,195016],"mapped",[17973]],[[195017,195017],"mapped",[35066]],[[195018,195018],"mapped",[13499]],[[195019,195019],"mapped",[161966]],[[195020,195020],"mapped",[162150]],[[195021,195021],"mapped",[18110]],[[195022,195022],"mapped",[18119]],[[195023,195023],"mapped",[35488]],[[195024,195024],"mapped",[35565]],[[195025,195025],"mapped",[35722]],[[195026,195026],"mapped",[35925]],[[195027,195027],"mapped",[162984]],[[195028,195028],"mapped",[36011]],[[195029,195029],"mapped",[36033]],[[195030,195030],"mapped",[36123]],[[195031,195031],"mapped",[36215]],[[195032,195032],"mapped",[163631]],[[195033,195033],"mapped",[133124]],[[195034,195034],"mapped",[36299]],[[195035,195035],"mapped",[36284]],[[195036,195036],"mapped",[36336]],[[195037,195037],"mapped",[133342]],[[195038,195038],"mapped",[36564]],[[195039,195039],"mapped",[36664]],[[195040,195040],"mapped",[165330]],[[195041,195041],"mapped",[165357]],[[195042,195042],"mapped",[37012]],[[195043,195043],"mapped",[37105]],[[195044,195044],"mapped",[37137]],[[195045,195045],"mapped",[165678]],[[195046,195046],"mapped",[37147]],[[195047,195047],"mapped",[37432]],[[195048,195048],"mapped",[37591]],[[195049,195049],"mapped",[37592]],[[195050,195050],"mapped",[37500]],[[195051,195051],"mapped",[37881]],[[195052,195052],"mapped",[37909]],[[195053,195053],"mapped",[166906]],[[195054,195054],"mapped",[38283]],[[195055,195055],"mapped",[18837]],[[195056,195056],"mapped",[38327]],[[195057,195057],"mapped",[167287]],[[195058,195058],"mapped",[18918]],[[195059,195059],"mapped",[38595]],[[195060,195060],"mapped",[23986]],[[195061,195061],"mapped",[38691]],[[195062,195062],"mapped",[168261]],[[195063,195063],"mapped",[168474]],[[195064,195064],"mapped",[19054]],[[195065,195065],"mapped",[19062]],[[195066,195066],"mapped",[38880]],[[195067,195067],"mapped",[168970]],[[195068,195068],"mapped",[19122]],[[195069,195069],"mapped",[169110]],[[195070,195071],"mapped",[38923]],[[195072,195072],"mapped",[38953]],[[195073,195073],"mapped",[169398]],[[195074,195074],"mapped",[39138]],[[195075,195075],"mapped",[19251]],[[195076,195076],"mapped",[39209]],[[195077,195077],"mapped",[39335]],[[195078,195078],"mapped",[39362]],[[195079,195079],"mapped",[39422]],[[195080,195080],"mapped",[19406]],[[195081,195081],"mapped",[170800]],[[195082,195082],"mapped",[39698]],[[195083,195083],"mapped",[40000]],[[195084,195084],"mapped",[40189]],[[195085,195085],"mapped",[19662]],[[195086,195086],"mapped",[19693]],[[195087,195087],"mapped",[40295]],[[195088,195088],"mapped",[172238]],[[195089,195089],"mapped",[19704]],[[195090,195090],"mapped",[172293]],[[195091,195091],"mapped",[172558]],[[195092,195092],"mapped",[172689]],[[195093,195093],"mapped",[40635]],[[195094,195094],"mapped",[19798]],[[195095,195095],"mapped",[40697]],[[195096,195096],"mapped",[40702]],[[195097,195097],"mapped",[40709]],[[195098,195098],"mapped",[40719]],[[195099,195099],"mapped",[40726]],[[195100,195100],"mapped",[40763]],[[195101,195101],"mapped",[173568]],[[195102,196605],"disallowed"],[[196606,196607],"disallowed"],[[196608,262141],"disallowed"],[[262142,262143],"disallowed"],[[262144,327677],"disallowed"],[[327678,327679],"disallowed"],[[327680,393213],"disallowed"],[[393214,393215],"disallowed"],[[393216,458749],"disallowed"],[[458750,458751],"disallowed"],[[458752,524285],"disallowed"],[[524286,524287],"disallowed"],[[524288,589821],"disallowed"],[[589822,589823],"disallowed"],[[589824,655357],"disallowed"],[[655358,655359],"disallowed"],[[655360,720893],"disallowed"],[[720894,720895],"disallowed"],[[720896,786429],"disallowed"],[[786430,786431],"disallowed"],[[786432,851965],"disallowed"],[[851966,851967],"disallowed"],[[851968,917501],"disallowed"],[[917502,917503],"disallowed"],[[917504,917504],"disallowed"],[[917505,917505],"disallowed"],[[917506,917535],"disallowed"],[[917536,917631],"disallowed"],[[917632,917759],"disallowed"],[[917760,917999],"ignored"],[[918000,983037],"disallowed"],[[983038,983039],"disallowed"],[[983040,1048573],"disallowed"],[[1048574,1048575],"disallowed"],[[1048576,1114109],"disallowed"],[[1114110,1114111],"disallowed"]]\');\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/node-fetch/node_modules/tr46/lib/mappingTable.json?', + ); + + /***/ + }, + + /******/ + }; + /************************************************************************/ + /******/ // The module cache + /******/ var __webpack_module_cache__ = {}; + /******/ + /******/ // The require function + /******/ function __webpack_require__(moduleId) { + /******/ // Check if module is in cache + /******/ var cachedModule = __webpack_module_cache__[moduleId]; + /******/ if (cachedModule !== undefined) { + /******/ return cachedModule.exports; + /******/ + } + /******/ // Create a new module (and put it into the cache) + /******/ var module = (__webpack_module_cache__[moduleId] = { + /******/ id: moduleId, + /******/ loaded: false, + /******/ exports: {}, + /******/ + }); + /******/ + /******/ // Execute the module function + /******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__); + /******/ + /******/ // Flag the module as loaded + /******/ module.loaded = true; + /******/ + /******/ // Return the exports of the module + /******/ return module.exports; + /******/ + } + /******/ + /******/ // expose the modules object (__webpack_modules__) + /******/ __webpack_require__.m = __webpack_modules__; + /******/ + /************************************************************************/ + /******/ /* webpack/runtime/chunk loaded */ + /******/ (() => { + /******/ var deferred = []; + /******/ __webpack_require__.O = (result, chunkIds, fn, priority) => { + /******/ if (chunkIds) { + /******/ priority = priority || 0; + /******/ for (var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) + deferred[i] = deferred[i - 1]; + /******/ deferred[i] = [chunkIds, fn, priority]; + /******/ return; + /******/ + } + /******/ var notFulfilled = Infinity; + /******/ for (var i = 0; i < deferred.length; i++) { + /******/ var [chunkIds, fn, priority] = deferred[i]; + /******/ var fulfilled = true; + /******/ for (var j = 0; j < chunkIds.length; j++) { + /******/ if ( + (priority & (1 === 0) || notFulfilled >= priority) && + Object.keys(__webpack_require__.O).every((key) => __webpack_require__.O[key](chunkIds[j])) + ) { + /******/ chunkIds.splice(j--, 1); + /******/ + } else { + /******/ fulfilled = false; + /******/ if (priority < notFulfilled) notFulfilled = priority; + /******/ + } + /******/ + } + /******/ if (fulfilled) { + /******/ deferred.splice(i--, 1); + /******/ var r = fn(); + /******/ if (r !== undefined) result = r; + /******/ + } + /******/ + } + /******/ return result; + /******/ + }; + /******/ + })(); + /******/ + /******/ /* webpack/runtime/chunk prefetch function */ + /******/ (() => { + /******/ __webpack_require__.F = {}; + /******/ __webpack_require__.E = (chunkId) => { + /******/ Object.keys(__webpack_require__.F).map((key) => { + /******/ __webpack_require__.F[key](chunkId); + /******/ + }); + /******/ + }; + /******/ + })(); + /******/ + /******/ /* webpack/runtime/compat get default export */ + /******/ (() => { + /******/ // getDefaultExport function for compatibility with non-harmony modules + /******/ __webpack_require__.n = (module) => { + /******/ var getter = + module && module.__esModule ? /******/ () => module['default'] : /******/ () => module; + /******/ __webpack_require__.d(getter, { a: getter }); + /******/ return getter; + /******/ + }; + /******/ + })(); + /******/ + /******/ /* webpack/runtime/create fake namespace object */ + /******/ (() => { + /******/ var getProto = Object.getPrototypeOf + ? (obj) => Object.getPrototypeOf(obj) + : (obj) => obj.__proto__; + /******/ var leafPrototypes; + /******/ // 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 & 16: return value when it's Promise-like + /******/ // mode & 8|1: behave like require + /******/ __webpack_require__.t = function (value, mode) { + /******/ if (mode & 1) value = this(value); + /******/ if (mode & 8) return value; + /******/ if (typeof value === 'object' && value) { + /******/ if (mode & 4 && value.__esModule) return value; + /******/ if (mode & 16 && typeof value.then === 'function') return value; + /******/ + } + /******/ var ns = Object.create(null); + /******/ __webpack_require__.r(ns); + /******/ var def = {}; + /******/ leafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)]; + /******/ for ( + var current = mode & 2 && value; + typeof current == 'object' && !~leafPrototypes.indexOf(current); + current = getProto(current) + ) { + /******/ Object.getOwnPropertyNames(current).forEach((key) => (def[key] = () => value[key])); + /******/ + } + /******/ def['default'] = () => value; + /******/ __webpack_require__.d(ns, def); + /******/ return ns; + /******/ + }; + /******/ + })(); + /******/ + /******/ /* webpack/runtime/define property getters */ + /******/ (() => { + /******/ // define getter functions for harmony exports + /******/ __webpack_require__.d = (exports, definition) => { + /******/ for (var key in definition) { + /******/ if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { + /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); + /******/ + } + /******/ + } + /******/ + }; + /******/ + })(); + /******/ + /******/ /* webpack/runtime/ensure chunk */ + /******/ (() => { + /******/ // The chunk loading function for additional chunks + /******/ // Since all referenced chunks are already included + /******/ // in this file, this function is empty here. + /******/ __webpack_require__.e = () => Promise.resolve(); + /******/ + })(); + /******/ + /******/ /* webpack/runtime/hasOwnProperty shorthand */ + /******/ (() => { + /******/ __webpack_require__.o = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop); + /******/ + })(); + /******/ + /******/ /* webpack/runtime/make namespace object */ + /******/ (() => { + /******/ // define __esModule on exports + /******/ __webpack_require__.r = (exports) => { + /******/ if (typeof Symbol !== 'undefined' && Symbol.toStringTag) { + /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); + /******/ + } + /******/ Object.defineProperty(exports, '__esModule', { value: true }); + /******/ + }; + /******/ + })(); + /******/ + /******/ /* webpack/runtime/node module decorator */ + /******/ (() => { + /******/ __webpack_require__.nmd = (module) => { + /******/ module.paths = []; + /******/ if (!module.children) module.children = []; + /******/ return module; + /******/ + }; + /******/ + })(); + /******/ + /******/ /* webpack/runtime/publicPath */ + /******/ (() => { + /******/ __webpack_require__.p = '/webpack/test/'; + /******/ + })(); + /******/ + /******/ /* webpack/runtime/require chunk loading */ + /******/ (() => { + /******/ // no baseURI + /******/ + /******/ // object to store loaded chunks + /******/ // "1" means "loaded", otherwise not loaded yet + /******/ var installedChunks = { + /******/ 367: 1, + /******/ + }; + /******/ + /******/ __webpack_require__.O.require = (chunkId) => installedChunks[chunkId]; + /******/ + /******/ // no chunk install function needed + /******/ + /******/ // no chunk loading + /******/ + /******/ // no external install chunk + /******/ + /******/ // no HMR + /******/ + /******/ // no HMR manifest + /******/ + })(); + /******/ + /******/ /* webpack/runtime/startup prefetch */ + /******/ (() => { + /******/ __webpack_require__.O( + 0, + [367], + () => { + /******/ __webpack_require__.E(367); + /******/ + }, + 5, + ); + /******/ + })(); + /******/ + /************************************************************************/ + /******/ + /******/ // module factories are used so entry inlining is disabled + /******/ // startup + /******/ // Load entry module and return exports + /******/ var __webpack_exports__ = __webpack_require__(9416); + /******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__); + /******/ module.exports = __webpack_exports__; + /******/ + /******/ +})(); diff --git a/packages/react-on-rails-pro-node-renderer/tests/fixtures/projects/spec-dummy/9fa89f7/reduxAppRenderingRequest.js b/packages/react-on-rails-pro-node-renderer/tests/fixtures/projects/spec-dummy/9fa89f7/reduxAppRenderingRequest.js new file mode 100644 index 0000000000..73a6f08b23 --- /dev/null +++ b/packages/react-on-rails-pro-node-renderer/tests/fixtures/projects/spec-dummy/9fa89f7/reduxAppRenderingRequest.js @@ -0,0 +1,37 @@ +(function() { + var railsContext = { + railsEnv: 'development', + inMailer: false, + i18nLocale: 'en', + i18nDefaultLocale: 'en', + rorVersion: '11.3.0', + rorPro: true, + href: 'http://localhost:3000/server_side_redux_app', + location: '/server_side_redux_app', + scheme: 'http', + host: 'localhost', + port: 3000, + pathname: '/server_side_redux_app', + search: null, + httpAcceptLanguage: 'en-US,en;q=0.9', + somethingUseful: 'REALLY USEFUL', + serverSide: true, + }; + + ReactOnRails.clearHydratedStores(); + + var props = { + helloWorldData: { + name: 'Mr. Server Side Rendering', + "\u003cscript\u003ewindow.alert('xss1');\u003c/script\u003e": + '\u003cscript\u003ewindow.alert("xss2");\u003c/script\u003e', + }, + }; + return ReactOnRails.serverRenderReactComponent({ + name: 'ReduxApp', + domNodeId: 'ReduxApp-react-component-0', + props: props, + trace: true, + railsContext: railsContext, + }); +})(); diff --git a/packages/react-on-rails-pro-node-renderer/tests/fixtures/projects/spec-dummy/9fa89f7/server-bundle-node-target.js b/packages/react-on-rails-pro-node-renderer/tests/fixtures/projects/spec-dummy/9fa89f7/server-bundle-node-target.js new file mode 100644 index 0000000000..f574aff9c4 --- /dev/null +++ b/packages/react-on-rails-pro-node-renderer/tests/fixtures/projects/spec-dummy/9fa89f7/server-bundle-node-target.js @@ -0,0 +1,94313 @@ +module.exports = /******/ (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, { + /******/ configurable: false, + /******/ enumerable: true, + /******/ get: getter, + /******/ + }); + /******/ + } + /******/ + }; + /******/ + /******/ // 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 = '/webpack/development/'; + /******/ + /******/ // Load entry module and return exports + /******/ return __webpack_require__((__webpack_require__.s = 266)); + /******/ +})( + /************************************************************************/ + /******/ [ + /* 0 */ + /***/ function (module, exports, __webpack_require__) { + var global = __webpack_require__(3); + var core = __webpack_require__(23); + var hide = __webpack_require__(15); + var redefine = __webpack_require__(16); + var ctx = __webpack_require__(24); + var PROTOTYPE = 'prototype'; + + var $export = function (type, name, source) { + var IS_FORCED = type & $export.F; + var IS_GLOBAL = type & $export.G; + var IS_STATIC = type & $export.S; + var IS_PROTO = type & $export.P; + var IS_BIND = type & $export.B; + var target = IS_GLOBAL + ? global + : IS_STATIC + ? global[name] || (global[name] = {}) + : (global[name] || {})[PROTOTYPE]; + var exports = IS_GLOBAL ? core : core[name] || (core[name] = {}); + var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {}); + var key, own, out, exp; + if (IS_GLOBAL) source = name; + for (key in source) { + // contains in native + own = !IS_FORCED && target && target[key] !== undefined; + // export native or passed + out = (own ? target : source)[key]; + // bind timers to global for call from export context + exp = + IS_BIND && own + ? ctx(out, global) + : IS_PROTO && typeof out == 'function' + ? ctx(Function.call, out) + : out; + // extend global + if (target) redefine(target, key, out, type & $export.U); + // export + if (exports[key] != out) hide(exports, key, exp); + if (IS_PROTO && expProto[key] != out) expProto[key] = out; + } + }; + global.core = core; + // type bitmap + $export.F = 1; // forced + $export.G = 2; // global + $export.S = 4; // static + $export.P = 8; // proto + $export.B = 16; // bind + $export.W = 32; // wrap + $export.U = 64; // safe + $export.R = 128; // real proto method for `library` + module.exports = $export; + + /***/ + }, + /* 1 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + if (false) { + module.exports = require('./cjs/react.production.min.js'); + } else { + module.exports = __webpack_require__(511); + } + + /***/ + }, + /* 2 */ + /***/ function (module, exports, __webpack_require__) { + var isObject = __webpack_require__(5); + module.exports = function (it) { + if (!isObject(it)) throw TypeError(it + ' is not an object!'); + return it; + }; + + /***/ + }, + /* 3 */ + /***/ function (module, exports) { + // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 + var global = (module.exports = + typeof window != 'undefined' && window.Math == Math + ? window + : typeof self != 'undefined' && self.Math == Math + ? self + : // eslint-disable-next-line no-new-func + Function('return this')()); + if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef + + /***/ + }, + /* 4 */ + /***/ function (module, exports) { + module.exports = function (exec) { + try { + return !!exec(); + } catch (e) { + return true; + } + }; + + /***/ + }, + /* 5 */ + /***/ function (module, exports) { + module.exports = function (it) { + return typeof it === 'object' ? it !== null : typeof it === 'function'; + }; + + /***/ + }, + /* 6 */ + /***/ function (module, exports, __webpack_require__) { + var store = __webpack_require__(73)('wks'); + var uid = __webpack_require__(50); + var Symbol = __webpack_require__(3).Symbol; + var USE_SYMBOL = typeof Symbol == 'function'; + + var $exports = (module.exports = function (name) { + return ( + store[name] || + (store[name] = (USE_SYMBOL && Symbol[name]) || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)) + ); + }); + + $exports.store = store; + + /***/ + }, + /* 7 */ + /***/ function (module, exports, __webpack_require__) { + // 7.1.15 ToLength + var toInteger = __webpack_require__(26); + var min = Math.min; + module.exports = function (it) { + return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 + }; + + /***/ + }, + /* 8 */ + /***/ function (module, exports, __webpack_require__) { + // Thank's IE8 for his funny defineProperty + module.exports = !__webpack_require__(4)(function () { + return ( + Object.defineProperty({}, 'a', { + get: function () { + return 7; + }, + }).a != 7 + ); + }); + + /***/ + }, + /* 9 */ + /***/ function (module, exports, __webpack_require__) { + var anObject = __webpack_require__(2); + var IE8_DOM_DEFINE = __webpack_require__(174); + var toPrimitive = __webpack_require__(31); + var dP = Object.defineProperty; + + exports.f = __webpack_require__(8) + ? Object.defineProperty + : function defineProperty(O, P, Attributes) { + anObject(O); + P = toPrimitive(P, true); + anObject(Attributes); + if (IE8_DOM_DEFINE) + try { + return dP(O, P, Attributes); + } catch (e) { + /* empty */ + } + if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!'); + if ('value' in Attributes) O[P] = Attributes.value; + return O; + }; + + /***/ + }, + /* 10 */ + /***/ function (module, exports, __webpack_require__) { + /** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + + if (true) { + var ReactIs = __webpack_require__(108); + + // By explicitly using `prop-types` you are opting into new development behavior. + // http://fb.me/prop-types-in-prod + var throwOnDirectAccess = true; + module.exports = __webpack_require__(542)(ReactIs.isElement, throwOnDirectAccess); + } else { + // By explicitly using `prop-types` you are opting into new production behavior. + // http://fb.me/prop-types-in-prod + module.exports = require('./factoryWithThrowingShims')(); + } + + /***/ + }, + /* 11 */ + /***/ function (module, exports, __webpack_require__) { + // 7.1.13 ToObject(argument) + var defined = __webpack_require__(32); + module.exports = function (it) { + return Object(defined(it)); + }; + + /***/ + }, + /* 12 */ + /***/ function (module, exports) { + module.exports = function (it) { + if (typeof it != 'function') throw TypeError(it + ' is not a function!'); + return it; + }; + + /***/ + }, + /* 13 */ + /***/ function (module, exports) { + var core = (module.exports = { version: '2.6.11' }); + if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef + + /***/ + }, + /* 14 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + + /** + * Use invariant() to assert state which your program assumes to be true. + * + * Provide sprintf-style format (only %s is supported) and arguments + * to provide information about what broke and what you were + * expecting. + * + * The invariant message will be stripped in production, but the invariant + * will remain to ensure logic does not differ in production. + */ + + var NODE_ENV = 'development'; + + var invariant = function (condition, format, a, b, c, d, e, f) { + if (NODE_ENV !== 'production') { + if (format === undefined) { + throw new Error('invariant requires an error message argument'); + } + } + + if (!condition) { + var error; + if (format === undefined) { + error = new Error( + 'Minified exception occurred; use the non-minified dev environment ' + + 'for the full error message and additional helpful warnings.', + ); + } else { + var args = [a, b, c, d, e, f]; + var argIndex = 0; + error = new Error( + format.replace(/%s/g, function () { + return args[argIndex++]; + }), + ); + error.name = 'Invariant Violation'; + } + + error.framesToPop = 1; // we don't care about invariant's own frame + throw error; + } + }; + + module.exports = invariant; + + /***/ + }, + /* 15 */ + /***/ function (module, exports, __webpack_require__) { + var dP = __webpack_require__(9); + var createDesc = __webpack_require__(49); + module.exports = __webpack_require__(8) + ? function (object, key, value) { + return dP.f(object, key, createDesc(1, value)); + } + : function (object, key, value) { + object[key] = value; + return object; + }; + + /***/ + }, + /* 16 */ + /***/ function (module, exports, __webpack_require__) { + var global = __webpack_require__(3); + var hide = __webpack_require__(15); + var has = __webpack_require__(18); + var SRC = __webpack_require__(50)('src'); + var $toString = __webpack_require__(271); + var TO_STRING = 'toString'; + var TPL = ('' + $toString).split(TO_STRING); + + __webpack_require__(23).inspectSource = function (it) { + return $toString.call(it); + }; + + (module.exports = function (O, key, val, safe) { + var isFunction = typeof val == 'function'; + if (isFunction) has(val, 'name') || hide(val, 'name', key); + if (O[key] === val) return; + if (isFunction) has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key))); + if (O === global) { + O[key] = val; + } else if (!safe) { + delete O[key]; + hide(O, key, val); + } else if (O[key]) { + O[key] = val; + } else { + hide(O, key, val); + } + // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative + })(Function.prototype, TO_STRING, function toString() { + return (typeof this == 'function' && this[SRC]) || $toString.call(this); + }); + + /***/ + }, + /* 17 */ + /***/ function (module, exports, __webpack_require__) { + var $export = __webpack_require__(0); + var fails = __webpack_require__(4); + var defined = __webpack_require__(32); + var quot = /"/g; + // B.2.3.2.1 CreateHTML(string, tag, attribute, value) + var createHTML = function (string, tag, attribute, value) { + var S = String(defined(string)); + var p1 = '<' + tag; + if (attribute !== '') p1 += ' ' + attribute + '="' + String(value).replace(quot, '"') + '"'; + return p1 + '>' + S + '</' + tag + '>'; + }; + module.exports = function (NAME, exec) { + var O = {}; + O[NAME] = exec(createHTML); + $export( + $export.P + + $export.F * + fails(function () { + var test = ''[NAME]('"'); + return test !== test.toLowerCase() || test.split('"').length > 3; + }), + 'String', + O, + ); + }; + + /***/ + }, + /* 18 */ + /***/ function (module, exports) { + var hasOwnProperty = {}.hasOwnProperty; + module.exports = function (it, key) { + return hasOwnProperty.call(it, key); + }; + + /***/ + }, + /* 19 */ + /***/ function (module, exports, __webpack_require__) { + // to indexed object, toObject with fallback for non-array-like ES3 strings + var IObject = __webpack_require__(74); + var defined = __webpack_require__(32); + module.exports = function (it) { + return IObject(defined(it)); + }; + + /***/ + }, + /* 20 */ + /***/ function (module, exports, __webpack_require__) { + var pIE = __webpack_require__(75); + var createDesc = __webpack_require__(49); + var toIObject = __webpack_require__(19); + var toPrimitive = __webpack_require__(31); + var has = __webpack_require__(18); + var IE8_DOM_DEFINE = __webpack_require__(174); + var gOPD = Object.getOwnPropertyDescriptor; + + exports.f = __webpack_require__(8) + ? gOPD + : function getOwnPropertyDescriptor(O, P) { + O = toIObject(O); + P = toPrimitive(P, true); + if (IE8_DOM_DEFINE) + try { + return gOPD(O, P); + } catch (e) { + /* empty */ + } + if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]); + }; + + /***/ + }, + /* 21 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) + var has = __webpack_require__(18); + var toObject = __webpack_require__(11); + var IE_PROTO = __webpack_require__(114)('IE_PROTO'); + var ObjectProto = Object.prototype; + + module.exports = + Object.getPrototypeOf || + function (O) { + O = toObject(O); + if (has(O, IE_PROTO)) return O[IE_PROTO]; + if (typeof O.constructor == 'function' && O instanceof O.constructor) { + return O.constructor.prototype; + } + return O instanceof Object ? ObjectProto : null; + }; + + /***/ + }, + /* 22 */ + /***/ function (module, exports, __webpack_require__) { + var store = __webpack_require__(149)('wks'); + var uid = __webpack_require__(103); + var Symbol = __webpack_require__(29).Symbol; + var USE_SYMBOL = typeof Symbol == 'function'; + + var $exports = (module.exports = function (name) { + return ( + store[name] || + (store[name] = (USE_SYMBOL && Symbol[name]) || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)) + ); + }); + + $exports.store = store; + + /***/ + }, + /* 23 */ + /***/ function (module, exports) { + var core = (module.exports = { version: '2.6.11' }); + if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef + + /***/ + }, + /* 24 */ + /***/ function (module, exports, __webpack_require__) { + // optional / simple context binding + var aFunction = __webpack_require__(12); + module.exports = function (fn, that, length) { + aFunction(fn); + if (that === undefined) return fn; + switch (length) { + case 1: + return function (a) { + return fn.call(that, a); + }; + case 2: + return function (a, b) { + return fn.call(that, a, b); + }; + case 3: + return function (a, b, c) { + return fn.call(that, a, b, c); + }; + } + return function (/* ...args */) { + return fn.apply(that, arguments); + }; + }; + + /***/ + }, + /* 25 */ + /***/ function (module, exports) { + var toString = {}.toString; + + module.exports = function (it) { + return toString.call(it).slice(8, -1); + }; + + /***/ + }, + /* 26 */ + /***/ function (module, exports) { + // 7.1.4 ToInteger + var ceil = Math.ceil; + var floor = Math.floor; + module.exports = function (it) { + return isNaN((it = +it)) ? 0 : (it > 0 ? floor : ceil)(it); + }; + + /***/ + }, + /* 27 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var fails = __webpack_require__(4); + + module.exports = function (method, arg) { + return ( + !!method && + fails(function () { + // eslint-disable-next-line no-useless-call + arg + ? method.call( + null, + function () { + /* empty */ + }, + 1, + ) + : method.call(null); + }) + ); + }; + + /***/ + }, + /* 28 */ + /***/ function (module, exports, __webpack_require__) { + // Thank's IE8 for his funny defineProperty + module.exports = !__webpack_require__(61)(function () { + return ( + Object.defineProperty({}, 'a', { + get: function () { + return 7; + }, + }).a != 7 + ); + }); + + /***/ + }, + /* 29 */ + /***/ function (module, exports) { + // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 + var global = (module.exports = + typeof window != 'undefined' && window.Math == Math + ? window + : typeof self != 'undefined' && self.Math == Math + ? self + : // eslint-disable-next-line no-new-func + Function('return this')()); + if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef + + /***/ + }, + /* 30 */ + /***/ function (module, exports, __webpack_require__) { + var anObject = __webpack_require__(62); + var IE8_DOM_DEFINE = __webpack_require__(212); + var toPrimitive = __webpack_require__(142); + var dP = Object.defineProperty; + + exports.f = __webpack_require__(28) + ? Object.defineProperty + : function defineProperty(O, P, Attributes) { + anObject(O); + P = toPrimitive(P, true); + anObject(Attributes); + if (IE8_DOM_DEFINE) + try { + return dP(O, P, Attributes); + } catch (e) { + /* empty */ + } + if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!'); + if ('value' in Attributes) O[P] = Attributes.value; + return O; + }; + + /***/ + }, + /* 31 */ + /***/ function (module, exports, __webpack_require__) { + // 7.1.1 ToPrimitive(input [, PreferredType]) + var isObject = __webpack_require__(5); + // instead of the ES6 spec version, we didn't implement @@toPrimitive case + // and the second argument - flag - preferred type is a string + module.exports = function (it, S) { + if (!isObject(it)) return it; + var fn, val; + if (S && typeof (fn = it.toString) == 'function' && !isObject((val = fn.call(it)))) return val; + if (typeof (fn = it.valueOf) == 'function' && !isObject((val = fn.call(it)))) return val; + if (!S && typeof (fn = it.toString) == 'function' && !isObject((val = fn.call(it)))) return val; + throw TypeError("Can't convert object to primitive value"); + }; + + /***/ + }, + /* 32 */ + /***/ function (module, exports) { + // 7.2.1 RequireObjectCoercible(argument) + module.exports = function (it) { + if (it == undefined) throw TypeError("Can't call method on " + it); + return it; + }; + + /***/ + }, + /* 33 */ + /***/ function (module, exports, __webpack_require__) { + // most Object methods by ES6 should accept primitives + var $export = __webpack_require__(0); + var core = __webpack_require__(23); + var fails = __webpack_require__(4); + module.exports = function (KEY, exec) { + var fn = (core.Object || {})[KEY] || Object[KEY]; + var exp = {}; + exp[KEY] = exec(fn); + $export( + $export.S + + $export.F * + fails(function () { + fn(1); + }), + 'Object', + exp, + ); + }; + + /***/ + }, + /* 34 */ + /***/ function (module, exports, __webpack_require__) { + // 0 -> Array#forEach + // 1 -> Array#map + // 2 -> Array#filter + // 3 -> Array#some + // 4 -> Array#every + // 5 -> Array#find + // 6 -> Array#findIndex + var ctx = __webpack_require__(24); + var IObject = __webpack_require__(74); + var toObject = __webpack_require__(11); + var toLength = __webpack_require__(7); + var asc = __webpack_require__(130); + module.exports = function (TYPE, $create) { + var IS_MAP = TYPE == 1; + var IS_FILTER = TYPE == 2; + var IS_SOME = TYPE == 3; + var IS_EVERY = TYPE == 4; + var IS_FIND_INDEX = TYPE == 6; + var NO_HOLES = TYPE == 5 || IS_FIND_INDEX; + var create = $create || asc; + return function ($this, callbackfn, that) { + var O = toObject($this); + var self = IObject(O); + var f = ctx(callbackfn, that, 3); + var length = toLength(self.length); + var index = 0; + var result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined; + var val, res; + for (; length > index; index++) + if (NO_HOLES || index in self) { + val = self[index]; + res = f(val, index, O); + if (TYPE) { + if (IS_MAP) + result[index] = res; // map + else if (res) + switch (TYPE) { + case 3: + return true; // some + case 5: + return val; // find + case 6: + return index; // findIndex + case 2: + result.push(val); // filter + } + else if (IS_EVERY) return false; // every + } + } + return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result; + }; + }; + + /***/ + }, + /* 35 */ + /***/ function (module, exports) { + module.exports = function (it) { + return typeof it === 'object' ? it !== null : typeof it === 'function'; + }; + + /***/ + }, + /* 36 */ + /***/ function (module, exports, __webpack_require__) { + var global = __webpack_require__(29); + var core = __webpack_require__(13); + var ctx = __webpack_require__(68); + var hide = __webpack_require__(45); + var has = __webpack_require__(44); + var PROTOTYPE = 'prototype'; + + var $export = function (type, name, source) { + var IS_FORCED = type & $export.F; + var IS_GLOBAL = type & $export.G; + var IS_STATIC = type & $export.S; + var IS_PROTO = type & $export.P; + var IS_BIND = type & $export.B; + var IS_WRAP = type & $export.W; + var exports = IS_GLOBAL ? core : core[name] || (core[name] = {}); + var expProto = exports[PROTOTYPE]; + var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]; + var key, own, out; + if (IS_GLOBAL) source = name; + for (key in source) { + // contains in native + own = !IS_FORCED && target && target[key] !== undefined; + if (own && has(exports, key)) continue; + // export native or passed + out = own ? target[key] : source[key]; + // prevent global pollution for namespaces + exports[key] = + IS_GLOBAL && typeof target[key] != 'function' + ? source[key] + : // bind timers to global for call from export context + IS_BIND && own + ? ctx(out, global) + : // wrap global constructors for prevent change them in library + IS_WRAP && target[key] == out + ? (function (C) { + var F = function (a, b, c) { + if (this instanceof C) { + switch (arguments.length) { + case 0: + return new C(); + case 1: + return new C(a); + case 2: + return new C(a, b); + } + return new C(a, b, c); + } + return C.apply(this, arguments); + }; + F[PROTOTYPE] = C[PROTOTYPE]; + return F; + // make static versions for prototype methods + })(out) + : IS_PROTO && typeof out == 'function' + ? ctx(Function.call, out) + : out; + // export proto methods to core.%CONSTRUCTOR%.methods.%NAME% + if (IS_PROTO) { + (exports.virtual || (exports.virtual = {}))[key] = out; + // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME% + if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out); + } + } + }; + // type bitmap + $export.F = 1; // forced + $export.G = 2; // global + $export.S = 4; // static + $export.P = 8; // proto + $export.B = 16; // bind + $export.W = 32; // wrap + $export.U = 64; // safe + $export.R = 128; // real proto method for `library` + module.exports = $export; + + /***/ + }, + /* 37 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + */ + + var React = __webpack_require__(1); + var factory = __webpack_require__(546); + + if (typeof React === 'undefined') { + throw Error( + 'create-react-class could not find the React object. If you are using script tags, ' + + 'make sure that React is being loaded before create-react-class.', + ); + } + + // Hack to grab NoopUpdateQueue from isomorphic React + var ReactNoopUpdateQueue = new React.Component().updater; + + module.exports = factory(React.Component, React.isValidElement, ReactNoopUpdateQueue); + + /***/ + }, + /* 38 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + if (__webpack_require__(8)) { + var LIBRARY = __webpack_require__(41); + var global = __webpack_require__(3); + var fails = __webpack_require__(4); + var $export = __webpack_require__(0); + var $typed = __webpack_require__(96); + var $buffer = __webpack_require__(138); + var ctx = __webpack_require__(24); + var anInstance = __webpack_require__(56); + var propertyDesc = __webpack_require__(49); + var hide = __webpack_require__(15); + var redefineAll = __webpack_require__(58); + var toInteger = __webpack_require__(26); + var toLength = __webpack_require__(7); + var toIndex = __webpack_require__(202); + var toAbsoluteIndex = __webpack_require__(52); + var toPrimitive = __webpack_require__(31); + var has = __webpack_require__(18); + var classof = __webpack_require__(65); + var isObject = __webpack_require__(5); + var toObject = __webpack_require__(11); + var isArrayIter = __webpack_require__(127); + var create = __webpack_require__(53); + var getPrototypeOf = __webpack_require__(21); + var gOPN = __webpack_require__(54).f; + var getIterFn = __webpack_require__(129); + var uid = __webpack_require__(50); + var wks = __webpack_require__(6); + var createArrayMethod = __webpack_require__(34); + var createArrayIncludes = __webpack_require__(86); + var speciesConstructor = __webpack_require__(77); + var ArrayIterators = __webpack_require__(132); + var Iterators = __webpack_require__(67); + var $iterDetect = __webpack_require__(91); + var setSpecies = __webpack_require__(55); + var arrayFill = __webpack_require__(131); + var arrayCopyWithin = __webpack_require__(191); + var $DP = __webpack_require__(9); + var $GOPD = __webpack_require__(20); + var dP = $DP.f; + var gOPD = $GOPD.f; + var RangeError = global.RangeError; + var TypeError = global.TypeError; + var Uint8Array = global.Uint8Array; + var ARRAY_BUFFER = 'ArrayBuffer'; + var SHARED_BUFFER = 'Shared' + ARRAY_BUFFER; + var BYTES_PER_ELEMENT = 'BYTES_PER_ELEMENT'; + var PROTOTYPE = 'prototype'; + var ArrayProto = Array[PROTOTYPE]; + var $ArrayBuffer = $buffer.ArrayBuffer; + var $DataView = $buffer.DataView; + var arrayForEach = createArrayMethod(0); + var arrayFilter = createArrayMethod(2); + var arraySome = createArrayMethod(3); + var arrayEvery = createArrayMethod(4); + var arrayFind = createArrayMethod(5); + var arrayFindIndex = createArrayMethod(6); + var arrayIncludes = createArrayIncludes(true); + var arrayIndexOf = createArrayIncludes(false); + var arrayValues = ArrayIterators.values; + var arrayKeys = ArrayIterators.keys; + var arrayEntries = ArrayIterators.entries; + var arrayLastIndexOf = ArrayProto.lastIndexOf; + var arrayReduce = ArrayProto.reduce; + var arrayReduceRight = ArrayProto.reduceRight; + var arrayJoin = ArrayProto.join; + var arraySort = ArrayProto.sort; + var arraySlice = ArrayProto.slice; + var arrayToString = ArrayProto.toString; + var arrayToLocaleString = ArrayProto.toLocaleString; + var ITERATOR = wks('iterator'); + var TAG = wks('toStringTag'); + var TYPED_CONSTRUCTOR = uid('typed_constructor'); + var DEF_CONSTRUCTOR = uid('def_constructor'); + var ALL_CONSTRUCTORS = $typed.CONSTR; + var TYPED_ARRAY = $typed.TYPED; + var VIEW = $typed.VIEW; + var WRONG_LENGTH = 'Wrong length!'; + + var $map = createArrayMethod(1, function (O, length) { + return allocate(speciesConstructor(O, O[DEF_CONSTRUCTOR]), length); + }); + + var LITTLE_ENDIAN = fails(function () { + // eslint-disable-next-line no-undef + return new Uint8Array(new Uint16Array([1]).buffer)[0] === 1; + }); + + var FORCED_SET = + !!Uint8Array && + !!Uint8Array[PROTOTYPE].set && + fails(function () { + new Uint8Array(1).set({}); + }); + + var toOffset = function (it, BYTES) { + var offset = toInteger(it); + if (offset < 0 || offset % BYTES) throw RangeError('Wrong offset!'); + return offset; + }; + + var validate = function (it) { + if (isObject(it) && TYPED_ARRAY in it) return it; + throw TypeError(it + ' is not a typed array!'); + }; + + var allocate = function (C, length) { + if (!(isObject(C) && TYPED_CONSTRUCTOR in C)) { + throw TypeError('It is not a typed array constructor!'); + } + return new C(length); + }; + + var speciesFromList = function (O, list) { + return fromList(speciesConstructor(O, O[DEF_CONSTRUCTOR]), list); + }; + + var fromList = function (C, list) { + var index = 0; + var length = list.length; + var result = allocate(C, length); + while (length > index) result[index] = list[index++]; + return result; + }; + + var addGetter = function (it, key, internal) { + dP(it, key, { + get: function () { + return this._d[internal]; + }, + }); + }; + + var $from = function from(source /* , mapfn, thisArg */) { + var O = toObject(source); + var aLen = arguments.length; + var mapfn = aLen > 1 ? arguments[1] : undefined; + var mapping = mapfn !== undefined; + var iterFn = getIterFn(O); + var i, length, values, result, step, iterator; + if (iterFn != undefined && !isArrayIter(iterFn)) { + for (iterator = iterFn.call(O), values = [], i = 0; !(step = iterator.next()).done; i++) { + values.push(step.value); + } + O = values; + } + if (mapping && aLen > 2) mapfn = ctx(mapfn, arguments[2], 2); + for (i = 0, length = toLength(O.length), result = allocate(this, length); length > i; i++) { + result[i] = mapping ? mapfn(O[i], i) : O[i]; + } + return result; + }; + + var $of = function of(/* ...items */) { + var index = 0; + var length = arguments.length; + var result = allocate(this, length); + while (length > index) result[index] = arguments[index++]; + return result; + }; + + // iOS Safari 6.x fails here + var TO_LOCALE_BUG = + !!Uint8Array && + fails(function () { + arrayToLocaleString.call(new Uint8Array(1)); + }); + + var $toLocaleString = function toLocaleString() { + return arrayToLocaleString.apply( + TO_LOCALE_BUG ? arraySlice.call(validate(this)) : validate(this), + arguments, + ); + }; + + var proto = { + copyWithin: function copyWithin(target, start /* , end */) { + return arrayCopyWithin.call( + validate(this), + target, + start, + arguments.length > 2 ? arguments[2] : undefined, + ); + }, + every: function every(callbackfn /* , thisArg */) { + return arrayEvery(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); + }, + fill: function fill(value /* , start, end */) { + // eslint-disable-line no-unused-vars + return arrayFill.apply(validate(this), arguments); + }, + filter: function filter(callbackfn /* , thisArg */) { + return speciesFromList( + this, + arrayFilter(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined), + ); + }, + find: function find(predicate /* , thisArg */) { + return arrayFind(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined); + }, + findIndex: function findIndex(predicate /* , thisArg */) { + return arrayFindIndex(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined); + }, + forEach: function forEach(callbackfn /* , thisArg */) { + arrayForEach(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); + }, + indexOf: function indexOf(searchElement /* , fromIndex */) { + return arrayIndexOf( + validate(this), + searchElement, + arguments.length > 1 ? arguments[1] : undefined, + ); + }, + includes: function includes(searchElement /* , fromIndex */) { + return arrayIncludes( + validate(this), + searchElement, + arguments.length > 1 ? arguments[1] : undefined, + ); + }, + join: function join(separator) { + // eslint-disable-line no-unused-vars + return arrayJoin.apply(validate(this), arguments); + }, + lastIndexOf: function lastIndexOf(searchElement /* , fromIndex */) { + // eslint-disable-line no-unused-vars + return arrayLastIndexOf.apply(validate(this), arguments); + }, + map: function map(mapfn /* , thisArg */) { + return $map(validate(this), mapfn, arguments.length > 1 ? arguments[1] : undefined); + }, + reduce: function reduce(callbackfn /* , initialValue */) { + // eslint-disable-line no-unused-vars + return arrayReduce.apply(validate(this), arguments); + }, + reduceRight: function reduceRight(callbackfn /* , initialValue */) { + // eslint-disable-line no-unused-vars + return arrayReduceRight.apply(validate(this), arguments); + }, + reverse: function reverse() { + var that = this; + var length = validate(that).length; + var middle = Math.floor(length / 2); + var index = 0; + var value; + while (index < middle) { + value = that[index]; + that[index++] = that[--length]; + that[length] = value; + } + return that; + }, + some: function some(callbackfn /* , thisArg */) { + return arraySome(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); + }, + sort: function sort(comparefn) { + return arraySort.call(validate(this), comparefn); + }, + subarray: function subarray(begin, end) { + var O = validate(this); + var length = O.length; + var $begin = toAbsoluteIndex(begin, length); + return new (speciesConstructor(O, O[DEF_CONSTRUCTOR]))( + O.buffer, + O.byteOffset + $begin * O.BYTES_PER_ELEMENT, + toLength((end === undefined ? length : toAbsoluteIndex(end, length)) - $begin), + ); + }, + }; + + var $slice = function slice(start, end) { + return speciesFromList(this, arraySlice.call(validate(this), start, end)); + }; + + var $set = function set(arrayLike /* , offset */) { + validate(this); + var offset = toOffset(arguments[1], 1); + var length = this.length; + var src = toObject(arrayLike); + var len = toLength(src.length); + var index = 0; + if (len + offset > length) throw RangeError(WRONG_LENGTH); + while (index < len) this[offset + index] = src[index++]; + }; + + var $iterators = { + entries: function entries() { + return arrayEntries.call(validate(this)); + }, + keys: function keys() { + return arrayKeys.call(validate(this)); + }, + values: function values() { + return arrayValues.call(validate(this)); + }, + }; + + var isTAIndex = function (target, key) { + return ( + isObject(target) && + target[TYPED_ARRAY] && + typeof key != 'symbol' && + key in target && + String(+key) == String(key) + ); + }; + var $getDesc = function getOwnPropertyDescriptor(target, key) { + return isTAIndex(target, (key = toPrimitive(key, true))) + ? propertyDesc(2, target[key]) + : gOPD(target, key); + }; + var $setDesc = function defineProperty(target, key, desc) { + if ( + isTAIndex(target, (key = toPrimitive(key, true))) && + isObject(desc) && + has(desc, 'value') && + !has(desc, 'get') && + !has(desc, 'set') && + // TODO: add validation descriptor w/o calling accessors + !desc.configurable && + (!has(desc, 'writable') || desc.writable) && + (!has(desc, 'enumerable') || desc.enumerable) + ) { + target[key] = desc.value; + return target; + } + return dP(target, key, desc); + }; + + if (!ALL_CONSTRUCTORS) { + $GOPD.f = $getDesc; + $DP.f = $setDesc; + } + + $export($export.S + $export.F * !ALL_CONSTRUCTORS, 'Object', { + getOwnPropertyDescriptor: $getDesc, + defineProperty: $setDesc, + }); + + if ( + fails(function () { + arrayToString.call({}); + }) + ) { + arrayToString = arrayToLocaleString = function toString() { + return arrayJoin.call(this); + }; + } + + var $TypedArrayPrototype$ = redefineAll({}, proto); + redefineAll($TypedArrayPrototype$, $iterators); + hide($TypedArrayPrototype$, ITERATOR, $iterators.values); + redefineAll($TypedArrayPrototype$, { + slice: $slice, + set: $set, + constructor: function () { + /* noop */ + }, + toString: arrayToString, + toLocaleString: $toLocaleString, + }); + addGetter($TypedArrayPrototype$, 'buffer', 'b'); + addGetter($TypedArrayPrototype$, 'byteOffset', 'o'); + addGetter($TypedArrayPrototype$, 'byteLength', 'l'); + addGetter($TypedArrayPrototype$, 'length', 'e'); + dP($TypedArrayPrototype$, TAG, { + get: function () { + return this[TYPED_ARRAY]; + }, + }); + + // eslint-disable-next-line max-statements + module.exports = function (KEY, BYTES, wrapper, CLAMPED) { + CLAMPED = !!CLAMPED; + var NAME = KEY + (CLAMPED ? 'Clamped' : '') + 'Array'; + var GETTER = 'get' + KEY; + var SETTER = 'set' + KEY; + var TypedArray = global[NAME]; + var Base = TypedArray || {}; + var TAC = TypedArray && getPrototypeOf(TypedArray); + var FORCED = !TypedArray || !$typed.ABV; + var O = {}; + var TypedArrayPrototype = TypedArray && TypedArray[PROTOTYPE]; + var getter = function (that, index) { + var data = that._d; + return data.v[GETTER](index * BYTES + data.o, LITTLE_ENDIAN); + }; + var setter = function (that, index, value) { + var data = that._d; + if (CLAMPED) value = (value = Math.round(value)) < 0 ? 0 : value > 0xff ? 0xff : value & 0xff; + data.v[SETTER](index * BYTES + data.o, value, LITTLE_ENDIAN); + }; + var addElement = function (that, index) { + dP(that, index, { + get: function () { + return getter(this, index); + }, + set: function (value) { + return setter(this, index, value); + }, + enumerable: true, + }); + }; + if (FORCED) { + TypedArray = wrapper(function (that, data, $offset, $length) { + anInstance(that, TypedArray, NAME, '_d'); + var index = 0; + var offset = 0; + var buffer, byteLength, length, klass; + if (!isObject(data)) { + length = toIndex(data); + byteLength = length * BYTES; + buffer = new $ArrayBuffer(byteLength); + } else if ( + data instanceof $ArrayBuffer || + (klass = classof(data)) == ARRAY_BUFFER || + klass == SHARED_BUFFER + ) { + buffer = data; + offset = toOffset($offset, BYTES); + var $len = data.byteLength; + if ($length === undefined) { + if ($len % BYTES) throw RangeError(WRONG_LENGTH); + byteLength = $len - offset; + if (byteLength < 0) throw RangeError(WRONG_LENGTH); + } else { + byteLength = toLength($length) * BYTES; + if (byteLength + offset > $len) throw RangeError(WRONG_LENGTH); + } + length = byteLength / BYTES; + } else if (TYPED_ARRAY in data) { + return fromList(TypedArray, data); + } else { + return $from.call(TypedArray, data); + } + hide(that, '_d', { + b: buffer, + o: offset, + l: byteLength, + e: length, + v: new $DataView(buffer), + }); + while (index < length) addElement(that, index++); + }); + TypedArrayPrototype = TypedArray[PROTOTYPE] = create($TypedArrayPrototype$); + hide(TypedArrayPrototype, 'constructor', TypedArray); + } else if ( + !fails(function () { + TypedArray(1); + }) || + !fails(function () { + new TypedArray(-1); // eslint-disable-line no-new + }) || + !$iterDetect(function (iter) { + new TypedArray(); // eslint-disable-line no-new + new TypedArray(null); // eslint-disable-line no-new + new TypedArray(1.5); // eslint-disable-line no-new + new TypedArray(iter); // eslint-disable-line no-new + }, true) + ) { + TypedArray = wrapper(function (that, data, $offset, $length) { + anInstance(that, TypedArray, NAME); + var klass; + // `ws` module bug, temporarily remove validation length for Uint8Array + // https://github.com/websockets/ws/pull/645 + if (!isObject(data)) return new Base(toIndex(data)); + if ( + data instanceof $ArrayBuffer || + (klass = classof(data)) == ARRAY_BUFFER || + klass == SHARED_BUFFER + ) { + return $length !== undefined + ? new Base(data, toOffset($offset, BYTES), $length) + : $offset !== undefined + ? new Base(data, toOffset($offset, BYTES)) + : new Base(data); + } + if (TYPED_ARRAY in data) return fromList(TypedArray, data); + return $from.call(TypedArray, data); + }); + arrayForEach( + TAC !== Function.prototype ? gOPN(Base).concat(gOPN(TAC)) : gOPN(Base), + function (key) { + if (!(key in TypedArray)) hide(TypedArray, key, Base[key]); + }, + ); + TypedArray[PROTOTYPE] = TypedArrayPrototype; + if (!LIBRARY) TypedArrayPrototype.constructor = TypedArray; + } + var $nativeIterator = TypedArrayPrototype[ITERATOR]; + var CORRECT_ITER_NAME = + !!$nativeIterator && ($nativeIterator.name == 'values' || $nativeIterator.name == undefined); + var $iterator = $iterators.values; + hide(TypedArray, TYPED_CONSTRUCTOR, true); + hide(TypedArrayPrototype, TYPED_ARRAY, NAME); + hide(TypedArrayPrototype, VIEW, true); + hide(TypedArrayPrototype, DEF_CONSTRUCTOR, TypedArray); + + if (CLAMPED ? new TypedArray(1)[TAG] != NAME : !(TAG in TypedArrayPrototype)) { + dP(TypedArrayPrototype, TAG, { + get: function () { + return NAME; + }, + }); + } + + O[NAME] = TypedArray; + + $export($export.G + $export.W + $export.F * (TypedArray != Base), O); + + $export($export.S, NAME, { + BYTES_PER_ELEMENT: BYTES, + }); + + $export( + $export.S + + $export.F * + fails(function () { + Base.of.call(TypedArray, 1); + }), + NAME, + { + from: $from, + of: $of, + }, + ); + + if (!(BYTES_PER_ELEMENT in TypedArrayPrototype)) + hide(TypedArrayPrototype, BYTES_PER_ELEMENT, BYTES); + + $export($export.P, NAME, proto); + + setSpecies(NAME); + + $export($export.P + $export.F * FORCED_SET, NAME, { set: $set }); + + $export($export.P + $export.F * !CORRECT_ITER_NAME, NAME, $iterators); + + if (!LIBRARY && TypedArrayPrototype.toString != arrayToString) + TypedArrayPrototype.toString = arrayToString; + + $export( + $export.P + + $export.F * + fails(function () { + new TypedArray(1).slice(); + }), + NAME, + { slice: $slice }, + ); + + $export( + $export.P + + $export.F * + (fails(function () { + return [1, 2].toLocaleString() != new TypedArray([1, 2]).toLocaleString(); + }) || + !fails(function () { + TypedArrayPrototype.toLocaleString.call([1, 2]); + })), + NAME, + { toLocaleString: $toLocaleString }, + ); + + Iterators[NAME] = CORRECT_ITER_NAME ? $nativeIterator : $iterator; + if (!LIBRARY && !CORRECT_ITER_NAME) hide(TypedArrayPrototype, ITERATOR, $iterator); + }; + } else + module.exports = function () { + /* empty */ + }; + + /***/ + }, + /* 39 */ + /***/ function (module, exports, __webpack_require__) { + var Map = __webpack_require__(197); + var $export = __webpack_require__(0); + var shared = __webpack_require__(73)('metadata'); + var store = shared.store || (shared.store = new (__webpack_require__(200))()); + + var getOrCreateMetadataMap = function (target, targetKey, create) { + var targetMetadata = store.get(target); + if (!targetMetadata) { + if (!create) return undefined; + store.set(target, (targetMetadata = new Map())); + } + var keyMetadata = targetMetadata.get(targetKey); + if (!keyMetadata) { + if (!create) return undefined; + targetMetadata.set(targetKey, (keyMetadata = new Map())); + } + return keyMetadata; + }; + var ordinaryHasOwnMetadata = function (MetadataKey, O, P) { + var metadataMap = getOrCreateMetadataMap(O, P, false); + return metadataMap === undefined ? false : metadataMap.has(MetadataKey); + }; + var ordinaryGetOwnMetadata = function (MetadataKey, O, P) { + var metadataMap = getOrCreateMetadataMap(O, P, false); + return metadataMap === undefined ? undefined : metadataMap.get(MetadataKey); + }; + var ordinaryDefineOwnMetadata = function (MetadataKey, MetadataValue, O, P) { + getOrCreateMetadataMap(O, P, true).set(MetadataKey, MetadataValue); + }; + var ordinaryOwnMetadataKeys = function (target, targetKey) { + var metadataMap = getOrCreateMetadataMap(target, targetKey, false); + var keys = []; + if (metadataMap) + metadataMap.forEach(function (_, key) { + keys.push(key); + }); + return keys; + }; + var toMetaKey = function (it) { + return it === undefined || typeof it == 'symbol' ? it : String(it); + }; + var exp = function (O) { + $export($export.S, 'Reflect', O); + }; + + module.exports = { + store: store, + map: getOrCreateMetadataMap, + has: ordinaryHasOwnMetadata, + get: ordinaryGetOwnMetadata, + set: ordinaryDefineOwnMetadata, + keys: ordinaryOwnMetadataKeys, + key: toMetaKey, + exp: exp, + }; + + /***/ + }, + /* 40 */ + /***/ function (module, exports) { + function _interopRequireDefault(obj) { + return obj && obj.__esModule + ? obj + : { + default: obj, + }; + } + + module.exports = _interopRequireDefault; + + /***/ + }, + /* 41 */ + /***/ function (module, exports) { + module.exports = false; + + /***/ + }, + /* 42 */ + /***/ function (module, exports, __webpack_require__) { + var META = __webpack_require__(50)('meta'); + var isObject = __webpack_require__(5); + var has = __webpack_require__(18); + var setDesc = __webpack_require__(9).f; + var id = 0; + var isExtensible = + Object.isExtensible || + function () { + return true; + }; + var FREEZE = !__webpack_require__(4)(function () { + return isExtensible(Object.preventExtensions({})); + }); + var setMeta = function (it) { + setDesc(it, META, { + value: { + i: 'O' + ++id, // object ID + w: {}, // weak collections IDs + }, + }); + }; + var fastKey = function (it, create) { + // return primitive with prefix + if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; + if (!has(it, META)) { + // can't set metadata to uncaught frozen object + if (!isExtensible(it)) return 'F'; + // not necessary to add metadata + if (!create) return 'E'; + // add missing metadata + setMeta(it); + // return object ID + } + return it[META].i; + }; + var getWeak = function (it, create) { + if (!has(it, META)) { + // can't set metadata to uncaught frozen object + if (!isExtensible(it)) return true; + // not necessary to add metadata + if (!create) return false; + // add missing metadata + setMeta(it); + // return hash weak collections IDs + } + return it[META].w; + }; + // add metadata on freeze-family methods calling + var onFreeze = function (it) { + if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it); + return it; + }; + var meta = (module.exports = { + KEY: META, + NEED: false, + fastKey: fastKey, + getWeak: getWeak, + onFreeze: onFreeze, + }); + + /***/ + }, + /* 43 */ + /***/ function (module, exports, __webpack_require__) { + // 22.1.3.31 Array.prototype[@@unscopables] + var UNSCOPABLES = __webpack_require__(6)('unscopables'); + var ArrayProto = Array.prototype; + if (ArrayProto[UNSCOPABLES] == undefined) __webpack_require__(15)(ArrayProto, UNSCOPABLES, {}); + module.exports = function (key) { + ArrayProto[UNSCOPABLES][key] = true; + }; + + /***/ + }, + /* 44 */ + /***/ function (module, exports) { + var hasOwnProperty = {}.hasOwnProperty; + module.exports = function (it, key) { + return hasOwnProperty.call(it, key); + }; + + /***/ + }, + /* 45 */ + /***/ function (module, exports, __webpack_require__) { + var dP = __webpack_require__(30); + var createDesc = __webpack_require__(78); + module.exports = __webpack_require__(28) + ? function (object, key, value) { + return dP.f(object, key, createDesc(1, value)); + } + : function (object, key, value) { + object[key] = value; + return object; + }; + + /***/ + }, + /* 46 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2014-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + + /** + * Similar to invariant but only logs a warning if the condition is not met. + * This can be used to log issues in development environments in critical + * paths. Removing the logging code for production environments will keep the + * same logic and follow the same code paths. + */ + + var __DEV__ = 'development' !== 'production'; + + var warning = function () {}; + + if (__DEV__) { + warning = function (condition, format, args) { + var len = arguments.length; + args = new Array(len > 2 ? len - 2 : 0); + for (var key = 2; key < len; key++) { + args[key - 2] = arguments[key]; + } + if (format === undefined) { + throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument'); + } + + if (format.length < 10 || /^[s\W]*$/.test(format)) { + throw new Error( + 'The warning format should be able to uniquely identify this ' + + 'warning. Please, use a more descriptive format than: ' + + format, + ); + } + + if (!condition) { + var argIndex = 0; + var message = + 'Warning: ' + + format.replace(/%s/g, function () { + return args[argIndex++]; + }); + if (typeof console !== 'undefined') { + console.error(message); + } + try { + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + throw new Error(message); + } catch (x) {} + } + }; + } + + module.exports = warning; + + /***/ + }, + /* 47 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['c'] = isReactChildren; + /* harmony export (immutable) */ __webpack_exports__['a'] = createRouteFromReactElement; + /* unused harmony export createRoutesFromReactChildren */ + /* harmony export (immutable) */ __webpack_exports__['b'] = createRoutes; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + function isValidChild(object) { + return object == null || __WEBPACK_IMPORTED_MODULE_0_react___default.a.isValidElement(object); + } + + function isReactChildren(object) { + return isValidChild(object) || (Array.isArray(object) && object.every(isValidChild)); + } + + function createRoute(defaultProps, props) { + return _extends({}, defaultProps, props); + } + + function createRouteFromReactElement(element) { + var type = element.type; + var route = createRoute(type.defaultProps, element.props); + + if (route.children) { + var childRoutes = createRoutesFromReactChildren(route.children, route); + + if (childRoutes.length) route.childRoutes = childRoutes; + + delete route.children; + } + + return route; + } + + /** + * Creates and returns a routes object from the given ReactChildren. JSX + * provides a convenient way to visualize how routes in the hierarchy are + * nested. + * + * import { Route, createRoutesFromReactChildren } from 'react-router' + * + * const routes = createRoutesFromReactChildren( + * <Route component={App}> + * <Route path="home" component={Dashboard}/> + * <Route path="news" component={NewsFeed}/> + * </Route> + * ) + * + * Note: This method is automatically used when you provide <Route> children + * to a <Router> component. + */ + function createRoutesFromReactChildren(children, parentRoute) { + var routes = []; + + __WEBPACK_IMPORTED_MODULE_0_react___default.a.Children.forEach(children, function (element) { + if (__WEBPACK_IMPORTED_MODULE_0_react___default.a.isValidElement(element)) { + // Component classes may have a static create* method. + if (element.type.createRouteFromReactElement) { + var route = element.type.createRouteFromReactElement(element, parentRoute); + + if (route) routes.push(route); + } else { + routes.push(createRouteFromReactElement(element)); + } + } + }); + + return routes; + } + + /** + * Creates and returns an array of routes from the given object which + * may be a JSX route, a plain object route, or an array of either. + */ + function createRoutes(routes) { + if (isReactChildren(routes)) { + routes = createRoutesFromReactChildren(routes); + } else if (routes && !Array.isArray(routes)) { + routes = [routes]; + } + + return routes; + } + + /***/ + }, + /* 48 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + exports.createPath = + exports.parsePath = + exports.getQueryStringValueFromPath = + exports.stripQueryStringValueFromPath = + exports.addQueryStringValueToPath = + undefined; + + var _warning = __webpack_require__(46); + + var _warning2 = _interopRequireDefault(_warning); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + var addQueryStringValueToPath = (exports.addQueryStringValueToPath = function addQueryStringValueToPath( + path, + key, + value, + ) { + var _parsePath = parsePath(path), + pathname = _parsePath.pathname, + search = _parsePath.search, + hash = _parsePath.hash; + + return createPath({ + pathname: pathname, + search: search + (search.indexOf('?') === -1 ? '?' : '&') + key + '=' + value, + hash: hash, + }); + }); + + var stripQueryStringValueFromPath = (exports.stripQueryStringValueFromPath = + function stripQueryStringValueFromPath(path, key) { + var _parsePath2 = parsePath(path), + pathname = _parsePath2.pathname, + search = _parsePath2.search, + hash = _parsePath2.hash; + + return createPath({ + pathname: pathname, + search: search.replace( + new RegExp('([?&])' + key + '=[a-zA-Z0-9]+(&?)'), + function (match, prefix, suffix) { + return prefix === '?' ? prefix : suffix; + }, + ), + hash: hash, + }); + }); + + var getQueryStringValueFromPath = (exports.getQueryStringValueFromPath = + function getQueryStringValueFromPath(path, key) { + var _parsePath3 = parsePath(path), + search = _parsePath3.search; + + var match = search.match(new RegExp('[?&]' + key + '=([a-zA-Z0-9]+)')); + return match && match[1]; + }); + + var extractPath = function extractPath(string) { + var match = string.match(/^(https?:)?\/\/[^\/]*/); + return match == null ? string : string.substring(match[0].length); + }; + + var parsePath = (exports.parsePath = function parsePath(path) { + var pathname = extractPath(path); + var search = ''; + var hash = ''; + + true + ? (0, _warning2.default)( + path === pathname, + 'A path must be pathname + search + hash only, not a full URL like "%s"', + path, + ) + : void 0; + + var hashIndex = pathname.indexOf('#'); + if (hashIndex !== -1) { + hash = pathname.substring(hashIndex); + pathname = pathname.substring(0, hashIndex); + } + + var searchIndex = pathname.indexOf('?'); + if (searchIndex !== -1) { + search = pathname.substring(searchIndex); + pathname = pathname.substring(0, searchIndex); + } + + if (pathname === '') pathname = '/'; + + return { + pathname: pathname, + search: search, + hash: hash, + }; + }); + + var createPath = (exports.createPath = function createPath(location) { + if (location == null || typeof location === 'string') return location; + + var basename = location.basename, + pathname = location.pathname, + search = location.search, + hash = location.hash; + + var path = (basename || '') + pathname; + + if (search && search !== '?') path += search; + + if (hash) path += hash; + + return path; + }); + + /***/ + }, + /* 49 */ + /***/ function (module, exports) { + module.exports = function (bitmap, value) { + return { + enumerable: !(bitmap & 1), + configurable: !(bitmap & 2), + writable: !(bitmap & 4), + value: value, + }; + }; + + /***/ + }, + /* 50 */ + /***/ function (module, exports) { + var id = 0; + var px = Math.random(); + module.exports = function (key) { + return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); + }; + + /***/ + }, + /* 51 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.14 / 15.2.3.14 Object.keys(O) + var $keys = __webpack_require__(176); + var enumBugKeys = __webpack_require__(115); + + module.exports = + Object.keys || + function keys(O) { + return $keys(O, enumBugKeys); + }; + + /***/ + }, + /* 52 */ + /***/ function (module, exports, __webpack_require__) { + var toInteger = __webpack_require__(26); + var max = Math.max; + var min = Math.min; + module.exports = function (index, length) { + index = toInteger(index); + return index < 0 ? max(index + length, 0) : min(index, length); + }; + + /***/ + }, + /* 53 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) + var anObject = __webpack_require__(2); + var dPs = __webpack_require__(177); + var enumBugKeys = __webpack_require__(115); + var IE_PROTO = __webpack_require__(114)('IE_PROTO'); + var Empty = function () { + /* empty */ + }; + var PROTOTYPE = 'prototype'; + + // Create object with fake `null` prototype: use iframe Object with cleared prototype + var createDict = function () { + // Thrash, waste and sodomy: IE GC bug + var iframe = __webpack_require__(112)('iframe'); + var i = enumBugKeys.length; + var lt = '<'; + var gt = '>'; + var iframeDocument; + iframe.style.display = 'none'; + __webpack_require__(116).appendChild(iframe); + iframe.src = 'javascript:'; // eslint-disable-line no-script-url + // createDict = iframe.contentWindow.Object; + // html.removeChild(iframe); + iframeDocument = iframe.contentWindow.document; + iframeDocument.open(); + iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); + iframeDocument.close(); + createDict = iframeDocument.F; + while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]]; + return createDict(); + }; + + module.exports = + Object.create || + function create(O, Properties) { + var result; + if (O !== null) { + Empty[PROTOTYPE] = anObject(O); + result = new Empty(); + Empty[PROTOTYPE] = null; + // add "__proto__" for Object.getPrototypeOf polyfill + result[IE_PROTO] = O; + } else result = createDict(); + return Properties === undefined ? result : dPs(result, Properties); + }; + + /***/ + }, + /* 54 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) + var $keys = __webpack_require__(176); + var hiddenKeys = __webpack_require__(115).concat('length', 'prototype'); + + exports.f = + Object.getOwnPropertyNames || + function getOwnPropertyNames(O) { + return $keys(O, hiddenKeys); + }; + + /***/ + }, + /* 55 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var global = __webpack_require__(3); + var dP = __webpack_require__(9); + var DESCRIPTORS = __webpack_require__(8); + var SPECIES = __webpack_require__(6)('species'); + + module.exports = function (KEY) { + var C = global[KEY]; + if (DESCRIPTORS && C && !C[SPECIES]) + dP.f(C, SPECIES, { + configurable: true, + get: function () { + return this; + }, + }); + }; + + /***/ + }, + /* 56 */ + /***/ function (module, exports) { + module.exports = function (it, Constructor, name, forbiddenField) { + if (!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)) { + throw TypeError(name + ': incorrect invocation!'); + } + return it; + }; + + /***/ + }, + /* 57 */ + /***/ function (module, exports, __webpack_require__) { + var ctx = __webpack_require__(24); + var call = __webpack_require__(189); + var isArrayIter = __webpack_require__(127); + var anObject = __webpack_require__(2); + var toLength = __webpack_require__(7); + var getIterFn = __webpack_require__(129); + var BREAK = {}; + var RETURN = {}; + var exports = (module.exports = function (iterable, entries, fn, that, ITERATOR) { + var iterFn = ITERATOR + ? function () { + return iterable; + } + : getIterFn(iterable); + var f = ctx(fn, that, entries ? 2 : 1); + var index = 0; + var length, step, iterator, result; + if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!'); + // fast case for arrays with default iterator + if (isArrayIter(iterFn)) + for (length = toLength(iterable.length); length > index; index++) { + result = entries ? f(anObject((step = iterable[index]))[0], step[1]) : f(iterable[index]); + if (result === BREAK || result === RETURN) return result; + } + else + for (iterator = iterFn.call(iterable); !(step = iterator.next()).done; ) { + result = call(iterator, f, step.value, entries); + if (result === BREAK || result === RETURN) return result; + } + }); + exports.BREAK = BREAK; + exports.RETURN = RETURN; + + /***/ + }, + /* 58 */ + /***/ function (module, exports, __webpack_require__) { + var redefine = __webpack_require__(16); + module.exports = function (target, src, safe) { + for (var key in src) redefine(target, key, src[key], safe); + return target; + }; + + /***/ + }, + /* 59 */ + /***/ function (module, exports, __webpack_require__) { + var isObject = __webpack_require__(5); + module.exports = function (it, TYPE) { + if (!isObject(it) || it._t !== TYPE) throw TypeError('Incompatible receiver, ' + TYPE + ' required!'); + return it; + }; + + /***/ + }, + /* 60 */ + /***/ function (module, exports, __webpack_require__) { + // to indexed object, toObject with fallback for non-array-like ES3 strings + var IObject = __webpack_require__(139); + var defined = __webpack_require__(141); + module.exports = function (it) { + return IObject(defined(it)); + }; + + /***/ + }, + /* 61 */ + /***/ function (module, exports) { + module.exports = function (exec) { + try { + return !!exec(); + } catch (e) { + return true; + } + }; + + /***/ + }, + /* 62 */ + /***/ function (module, exports, __webpack_require__) { + var isObject = __webpack_require__(35); + module.exports = function (it) { + if (!isObject(it)) throw TypeError(it + ' is not an object!'); + return it; + }; + + /***/ + }, + /* 63 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /* +object-assign +(c) Sindre Sorhus +@license MIT +*/ + + /* eslint-disable no-unused-vars */ + var getOwnPropertySymbols = Object.getOwnPropertySymbols; + var hasOwnProperty = Object.prototype.hasOwnProperty; + var propIsEnumerable = Object.prototype.propertyIsEnumerable; + + function toObject(val) { + if (val === null || val === undefined) { + throw new TypeError('Object.assign cannot be called with null or undefined'); + } + + return Object(val); + } + + function shouldUseNative() { + try { + if (!Object.assign) { + return false; + } + + // Detect buggy property enumeration order in older V8 versions. + + // https://bugs.chromium.org/p/v8/issues/detail?id=4118 + var test1 = new String('abc'); // eslint-disable-line no-new-wrappers + test1[5] = 'de'; + if (Object.getOwnPropertyNames(test1)[0] === '5') { + return false; + } + + // https://bugs.chromium.org/p/v8/issues/detail?id=3056 + var test2 = {}; + for (var i = 0; i < 10; i++) { + test2['_' + String.fromCharCode(i)] = i; + } + var order2 = Object.getOwnPropertyNames(test2).map(function (n) { + return test2[n]; + }); + if (order2.join('') !== '0123456789') { + return false; + } + + // https://bugs.chromium.org/p/v8/issues/detail?id=3056 + var test3 = {}; + 'abcdefghijklmnopqrst'.split('').forEach(function (letter) { + test3[letter] = letter; + }); + if (Object.keys(Object.assign({}, test3)).join('') !== 'abcdefghijklmnopqrst') { + return false; + } + + return true; + } catch (err) { + // We don't expect any of the above to throw, but better to be safe. + return false; + } + } + + module.exports = shouldUseNative() + ? Object.assign + : function (target, source) { + var from; + var to = toObject(target); + var symbols; + + for (var s = 1; s < arguments.length; s++) { + from = Object(arguments[s]); + + for (var key in from) { + if (hasOwnProperty.call(from, key)) { + to[key] = from[key]; + } + } + + if (getOwnPropertySymbols) { + symbols = getOwnPropertySymbols(from); + for (var i = 0; i < symbols.length; i++) { + if (propIsEnumerable.call(from, symbols[i])) { + to[symbols[i]] = from[symbols[i]]; + } + } + } + } + + return to; + }; + + /***/ + }, + /* 64 */ + /***/ function (module, exports, __webpack_require__) { + var def = __webpack_require__(9).f; + var has = __webpack_require__(18); + var TAG = __webpack_require__(6)('toStringTag'); + + module.exports = function (it, tag, stat) { + if (it && !has((it = stat ? it : it.prototype), TAG)) + def(it, TAG, { configurable: true, value: tag }); + }; + + /***/ + }, + /* 65 */ + /***/ function (module, exports, __webpack_require__) { + // getting tag from 19.1.3.6 Object.prototype.toString() + var cof = __webpack_require__(25); + var TAG = __webpack_require__(6)('toStringTag'); + // ES3 wrong here + var ARG = + cof( + (function () { + return arguments; + })(), + ) == 'Arguments'; + + // fallback for IE11 Script Access Denied error + var tryGet = function (it, key) { + try { + return it[key]; + } catch (e) { + /* empty */ + } + }; + + module.exports = function (it) { + var O, T, B; + return it === undefined + ? 'Undefined' + : it === null + ? 'Null' + : // @@toStringTag case + typeof (T = tryGet((O = Object(it)), TAG)) == 'string' + ? T + : // builtinTag case + ARG + ? cof(O) + : // ES3 arguments fallback + (B = cof(O)) == 'Object' && typeof O.callee == 'function' + ? 'Arguments' + : B; + }; + + /***/ + }, + /* 66 */ + /***/ function (module, exports, __webpack_require__) { + var $export = __webpack_require__(0); + var defined = __webpack_require__(32); + var fails = __webpack_require__(4); + var spaces = __webpack_require__(118); + var space = '[' + spaces + ']'; + var non = '\u200b\u0085'; + var ltrim = RegExp('^' + space + space + '*'); + var rtrim = RegExp(space + space + '*$'); + + var exporter = function (KEY, exec, ALIAS) { + var exp = {}; + var FORCE = fails(function () { + return !!spaces[KEY]() || non[KEY]() != non; + }); + var fn = (exp[KEY] = FORCE ? exec(trim) : spaces[KEY]); + if (ALIAS) exp[ALIAS] = fn; + $export($export.P + $export.F * FORCE, 'String', exp); + }; + + // 1 -> String#trimLeft + // 2 -> String#trimRight + // 3 -> String#trim + var trim = (exporter.trim = function (string, TYPE) { + string = String(defined(string)); + if (TYPE & 1) string = string.replace(ltrim, ''); + if (TYPE & 2) string = string.replace(rtrim, ''); + return string; + }); + + module.exports = exporter; + + /***/ + }, + /* 67 */ + /***/ function (module, exports) { + module.exports = {}; + + /***/ + }, + /* 68 */ + /***/ function (module, exports, __webpack_require__) { + // optional / simple context binding + var aFunction = __webpack_require__(215); + module.exports = function (fn, that, length) { + aFunction(fn); + if (that === undefined) return fn; + switch (length) { + case 1: + return function (a) { + return fn.call(that, a); + }; + case 2: + return function (a, b) { + return fn.call(that, a, b); + }; + case 3: + return function (a, b, c) { + return fn.call(that, a, b, c); + }; + } + return function (/* ...args */) { + return fn.apply(that, arguments); + }; + }; + + /***/ + }, + /* 69 */ + /***/ function (module, exports, __webpack_require__) { + // 7.1.13 ToObject(argument) + var defined = __webpack_require__(141); + module.exports = function (it) { + return Object(defined(it)); + }; + + /***/ + }, + /* 70 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = routerWarning; + /* unused harmony export _resetWarned */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(46); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_warning__, + ); + + var warned = {}; + + function routerWarning(falseToWarn, message) { + // Only issue deprecation warnings once. + if (message.indexOf('deprecated') !== -1) { + if (warned[message]) { + return; + } + + warned[message] = true; + } + + message = '[react-router] ' + message; + + for ( + var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; + _key < _len; + _key++ + ) { + args[_key - 2] = arguments[_key]; + } + + __WEBPACK_IMPORTED_MODULE_0_warning___default.a.apply(undefined, [falseToWarn, message].concat(args)); + } + + function _resetWarned() { + warned = {}; + } + + /***/ + }, + /* 71 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* unused harmony export compilePattern */ + /* harmony export (immutable) */ __webpack_exports__['c'] = matchPattern; + /* harmony export (immutable) */ __webpack_exports__['b'] = getParamNames; + /* unused harmony export getParams */ + /* harmony export (immutable) */ __webpack_exports__['a'] = formatPattern; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant__ = __webpack_require__(14); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_invariant__, + ); + + function escapeRegExp(string) { + return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); + } + + function _compilePattern(pattern) { + var regexpSource = ''; + var paramNames = []; + var tokens = []; + + var match = void 0, + lastIndex = 0, + matcher = /:([a-zA-Z_$][a-zA-Z0-9_$]*)|\*\*|\*|\(|\)|\\\(|\\\)/g; + while ((match = matcher.exec(pattern))) { + if (match.index !== lastIndex) { + tokens.push(pattern.slice(lastIndex, match.index)); + regexpSource += escapeRegExp(pattern.slice(lastIndex, match.index)); + } + + if (match[1]) { + regexpSource += '([^/]+)'; + paramNames.push(match[1]); + } else if (match[0] === '**') { + regexpSource += '(.*)'; + paramNames.push('splat'); + } else if (match[0] === '*') { + regexpSource += '(.*?)'; + paramNames.push('splat'); + } else if (match[0] === '(') { + regexpSource += '(?:'; + } else if (match[0] === ')') { + regexpSource += ')?'; + } else if (match[0] === '\\(') { + regexpSource += '\\('; + } else if (match[0] === '\\)') { + regexpSource += '\\)'; + } + + tokens.push(match[0]); + + lastIndex = matcher.lastIndex; + } + + if (lastIndex !== pattern.length) { + tokens.push(pattern.slice(lastIndex, pattern.length)); + regexpSource += escapeRegExp(pattern.slice(lastIndex, pattern.length)); + } + + return { + pattern: pattern, + regexpSource: regexpSource, + paramNames: paramNames, + tokens: tokens, + }; + } + + var CompiledPatternsCache = Object.create(null); + + function compilePattern(pattern) { + if (!CompiledPatternsCache[pattern]) CompiledPatternsCache[pattern] = _compilePattern(pattern); + + return CompiledPatternsCache[pattern]; + } + + /** + * Attempts to match a pattern on the given pathname. Patterns may use + * the following special characters: + * + * - :paramName Matches a URL segment up to the next /, ?, or #. The + * captured string is considered a "param" + * - () Wraps a segment of the URL that is optional + * - * Consumes (non-greedy) all characters up to the next + * character in the pattern, or to the end of the URL if + * there is none + * - ** Consumes (greedy) all characters up to the next character + * in the pattern, or to the end of the URL if there is none + * + * The function calls callback(error, matched) when finished. + * The return value is an object with the following properties: + * + * - remainingPathname + * - paramNames + * - paramValues + */ + function matchPattern(pattern, pathname) { + // Ensure pattern starts with leading slash for consistency with pathname. + if (pattern.charAt(0) !== '/') { + pattern = '/' + pattern; + } + + var _compilePattern2 = compilePattern(pattern), + regexpSource = _compilePattern2.regexpSource, + paramNames = _compilePattern2.paramNames, + tokens = _compilePattern2.tokens; + + if (pattern.charAt(pattern.length - 1) !== '/') { + regexpSource += '/?'; // Allow optional path separator at end. + } + + // Special-case patterns like '*' for catch-all routes. + if (tokens[tokens.length - 1] === '*') { + regexpSource += '$'; + } + + var match = pathname.match(new RegExp('^' + regexpSource, 'i')); + if (match == null) { + return null; + } + + var matchedPath = match[0]; + var remainingPathname = pathname.substr(matchedPath.length); + + if (remainingPathname) { + // Require that the match ends at a path separator, if we didn't match + // the full path, so any remaining pathname is a new path segment. + if (matchedPath.charAt(matchedPath.length - 1) !== '/') { + return null; + } + + // If there is a remaining pathname, treat the path separator as part of + // the remaining pathname for properly continuing the match. + remainingPathname = '/' + remainingPathname; + } + + return { + remainingPathname: remainingPathname, + paramNames: paramNames, + paramValues: match.slice(1).map(function (v) { + return v && decodeURIComponent(v); + }), + }; + } + + function getParamNames(pattern) { + return compilePattern(pattern).paramNames; + } + + function getParams(pattern, pathname) { + var match = matchPattern(pattern, pathname); + if (!match) { + return null; + } + + var paramNames = match.paramNames, + paramValues = match.paramValues; + + var params = {}; + + paramNames.forEach(function (paramName, index) { + params[paramName] = paramValues[index]; + }); + + return params; + } + + /** + * Returns a version of the given pattern with params interpolated. Throws + * if there is a dynamic segment of the pattern for which there is no param. + */ + function formatPattern(pattern, params) { + params = params || {}; + + var _compilePattern3 = compilePattern(pattern), + tokens = _compilePattern3.tokens; + + var parenCount = 0, + pathname = '', + splatIndex = 0, + parenHistory = []; + + var token = void 0, + paramName = void 0, + paramValue = void 0; + for (var i = 0, len = tokens.length; i < len; ++i) { + token = tokens[i]; + + if (token === '*' || token === '**') { + paramValue = Array.isArray(params.splat) ? params.splat[splatIndex++] : params.splat; + + !(paramValue != null || parenCount > 0) + ? true + ? __WEBPACK_IMPORTED_MODULE_0_invariant___default()( + false, + 'Missing splat #%s for path "%s"', + splatIndex, + pattern, + ) + : invariant(false) + : void 0; + + if (paramValue != null) pathname += encodeURI(paramValue); + } else if (token === '(') { + parenHistory[parenCount] = ''; + parenCount += 1; + } else if (token === ')') { + var parenText = parenHistory.pop(); + parenCount -= 1; + + if (parenCount) parenHistory[parenCount - 1] += parenText; + else pathname += parenText; + } else if (token === '\\(') { + pathname += '('; + } else if (token === '\\)') { + pathname += ')'; + } else if (token.charAt(0) === ':') { + paramName = token.substring(1); + paramValue = params[paramName]; + + !(paramValue != null || parenCount > 0) + ? true + ? __WEBPACK_IMPORTED_MODULE_0_invariant___default()( + false, + 'Missing "%s" parameter for path "%s"', + paramName, + pattern, + ) + : invariant(false) + : void 0; + + if (paramValue == null) { + if (parenCount) { + parenHistory[parenCount - 1] = ''; + + var curTokenIdx = tokens.indexOf(token); + var tokensSubset = tokens.slice(curTokenIdx, tokens.length); + var nextParenIdx = -1; + + for (var _i = 0; _i < tokensSubset.length; _i++) { + if (tokensSubset[_i] == ')') { + nextParenIdx = _i; + break; + } + } + + !(nextParenIdx > 0) + ? true + ? __WEBPACK_IMPORTED_MODULE_0_invariant___default()( + false, + 'Path "%s" is missing end paren at segment "%s"', + pattern, + tokensSubset.join(''), + ) + : invariant(false) + : void 0; + + // jump to ending paren + i = curTokenIdx + nextParenIdx - 1; + } + } else if (parenCount) parenHistory[parenCount - 1] += encodeURIComponent(paramValue); + else pathname += encodeURIComponent(paramValue); + } else { + if (parenCount) parenHistory[parenCount - 1] += token; + else pathname += token; + } + } + + !(parenCount <= 0) + ? true + ? __WEBPACK_IMPORTED_MODULE_0_invariant___default()( + false, + 'Path "%s" is missing end paren', + pattern, + ) + : invariant(false) + : void 0; + + return pathname.replace(/\/+/g, '/'); + } + + /***/ + }, + /* 72 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + exports.locationsAreEqual = + exports.statesAreEqual = + exports.createLocation = + exports.createQuery = + undefined; + + var _typeof = + typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' + ? function (obj) { + return typeof obj; + } + : function (obj) { + return obj && + typeof Symbol === 'function' && + obj.constructor === Symbol && + obj !== Symbol.prototype + ? 'symbol' + : typeof obj; + }; + + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + var _invariant = __webpack_require__(14); + + var _invariant2 = _interopRequireDefault(_invariant); + + var _warning = __webpack_require__(46); + + var _warning2 = _interopRequireDefault(_warning); + + var _PathUtils = __webpack_require__(48); + + var _Actions = __webpack_require__(110); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + var createQuery = (exports.createQuery = function createQuery(props) { + return _extends(Object.create(null), props); + }); + + var createLocation = (exports.createLocation = function createLocation() { + var input = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '/'; + var action = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _Actions.POP; + var key = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null; + + var object = typeof input === 'string' ? (0, _PathUtils.parsePath)(input) : input; + + true + ? (0, _warning2.default)( + !object.path, + 'Location descriptor objects should have a `pathname`, not a `path`.', + ) + : void 0; + + var pathname = object.pathname || '/'; + var search = object.search || ''; + var hash = object.hash || ''; + var state = object.state; + + return { + pathname: pathname, + search: search, + hash: hash, + state: state, + action: action, + key: key, + }; + }); + + var isDate = function isDate(object) { + return Object.prototype.toString.call(object) === '[object Date]'; + }; + + var statesAreEqual = (exports.statesAreEqual = function statesAreEqual(a, b) { + if (a === b) return true; + + var typeofA = typeof a === 'undefined' ? 'undefined' : _typeof(a); + var typeofB = typeof b === 'undefined' ? 'undefined' : _typeof(b); + + if (typeofA !== typeofB) return false; + + !(typeofA !== 'function') + ? true + ? (0, _invariant2.default)(false, 'You must not store functions in location state') + : (0, _invariant2.default)(false) + : void 0; + + // Not the same object, but same type. + if (typeofA === 'object') { + !!(isDate(a) && isDate(b)) + ? true + ? (0, _invariant2.default)(false, 'You must not store Date objects in location state') + : (0, _invariant2.default)(false) + : void 0; + + if (!Array.isArray(a)) { + var keysofA = Object.keys(a); + var keysofB = Object.keys(b); + return ( + keysofA.length === keysofB.length && + keysofA.every(function (key) { + return statesAreEqual(a[key], b[key]); + }) + ); + } + + return ( + Array.isArray(b) && + a.length === b.length && + a.every(function (item, index) { + return statesAreEqual(item, b[index]); + }) + ); + } + + // All other serializable types (string, number, boolean) + // should be strict equal. + return false; + }); + + var locationsAreEqual = (exports.locationsAreEqual = function locationsAreEqual(a, b) { + return ( + a.key === b.key && + // a.action === b.action && // Different action !== location change. + a.pathname === b.pathname && + a.search === b.search && + a.hash === b.hash && + statesAreEqual(a.state, b.state) + ); + }); + + /***/ + }, + /* 73 */ + /***/ function (module, exports, __webpack_require__) { + var core = __webpack_require__(23); + var global = __webpack_require__(3); + var SHARED = '__core-js_shared__'; + var store = global[SHARED] || (global[SHARED] = {}); + + (module.exports = function (key, value) { + return store[key] || (store[key] = value !== undefined ? value : {}); + })('versions', []).push({ + version: core.version, + mode: __webpack_require__(41) ? 'pure' : 'global', + copyright: '© 2019 Denis Pushkarev (zloirock.ru)', + }); + + /***/ + }, + /* 74 */ + /***/ function (module, exports, __webpack_require__) { + // fallback for non-array-like ES3 and non-enumerable old V8 strings + var cof = __webpack_require__(25); + // eslint-disable-next-line no-prototype-builtins + module.exports = Object('z').propertyIsEnumerable(0) + ? Object + : function (it) { + return cof(it) == 'String' ? it.split('') : Object(it); + }; + + /***/ + }, + /* 75 */ + /***/ function (module, exports) { + exports.f = {}.propertyIsEnumerable; + + /***/ + }, + /* 76 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // 21.2.5.3 get RegExp.prototype.flags + var anObject = __webpack_require__(2); + module.exports = function () { + var that = anObject(this); + var result = ''; + if (that.global) result += 'g'; + if (that.ignoreCase) result += 'i'; + if (that.multiline) result += 'm'; + if (that.unicode) result += 'u'; + if (that.sticky) result += 'y'; + return result; + }; + + /***/ + }, + /* 77 */ + /***/ function (module, exports, __webpack_require__) { + // 7.3.20 SpeciesConstructor(O, defaultConstructor) + var anObject = __webpack_require__(2); + var aFunction = __webpack_require__(12); + var SPECIES = __webpack_require__(6)('species'); + module.exports = function (O, D) { + var C = anObject(O).constructor; + var S; + return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S); + }; + + /***/ + }, + /* 78 */ + /***/ function (module, exports) { + module.exports = function (bitmap, value) { + return { + enumerable: !(bitmap & 1), + configurable: !(bitmap & 2), + writable: !(bitmap & 4), + value: value, + }; + }; + + /***/ + }, + /* 79 */ + /***/ function (module, exports) { + module.exports = {}; + + /***/ + }, + /* 80 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.14 / 15.2.3.14 Object.keys(O) + var $keys = __webpack_require__(216); + var enumBugKeys = __webpack_require__(150); + + module.exports = + Object.keys || + function keys(O) { + return $keys(O, enumBugKeys); + }; + + /***/ + }, + /* 81 */ + /***/ function (module, exports, __webpack_require__) { + var META = __webpack_require__(103)('meta'); + var isObject = __webpack_require__(35); + var has = __webpack_require__(44); + var setDesc = __webpack_require__(30).f; + var id = 0; + var isExtensible = + Object.isExtensible || + function () { + return true; + }; + var FREEZE = !__webpack_require__(61)(function () { + return isExtensible(Object.preventExtensions({})); + }); + var setMeta = function (it) { + setDesc(it, META, { + value: { + i: 'O' + ++id, // object ID + w: {}, // weak collections IDs + }, + }); + }; + var fastKey = function (it, create) { + // return primitive with prefix + if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; + if (!has(it, META)) { + // can't set metadata to uncaught frozen object + if (!isExtensible(it)) return 'F'; + // not necessary to add metadata + if (!create) return 'E'; + // add missing metadata + setMeta(it); + // return object ID + } + return it[META].i; + }; + var getWeak = function (it, create) { + if (!has(it, META)) { + // can't set metadata to uncaught frozen object + if (!isExtensible(it)) return true; + // not necessary to add metadata + if (!create) return false; + // add missing metadata + setMeta(it); + // return hash weak collections IDs + } + return it[META].w; + }; + // add metadata on freeze-family methods calling + var onFreeze = function (it) { + if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it); + return it; + }; + var meta = (module.exports = { + KEY: META, + NEED: false, + fastKey: fastKey, + getWeak: getWeak, + onFreeze: onFreeze, + }); + + /***/ + }, + /* 82 */ + /***/ function (module, exports, __webpack_require__) { + var ctx = __webpack_require__(68); + var call = __webpack_require__(221); + var isArrayIter = __webpack_require__(222); + var anObject = __webpack_require__(62); + var toLength = __webpack_require__(102); + var getIterFn = __webpack_require__(223); + var BREAK = {}; + var RETURN = {}; + var exports = (module.exports = function (iterable, entries, fn, that, ITERATOR) { + var iterFn = ITERATOR + ? function () { + return iterable; + } + : getIterFn(iterable); + var f = ctx(fn, that, entries ? 2 : 1); + var index = 0; + var length, step, iterator, result; + if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!'); + // fast case for arrays with default iterator + if (isArrayIter(iterFn)) + for (length = toLength(iterable.length); length > index; index++) { + result = entries ? f(anObject((step = iterable[index]))[0], step[1]) : f(iterable[index]); + if (result === BREAK || result === RETURN) return result; + } + else + for (iterator = iterFn.call(iterable); !(step = iterator.next()).done; ) { + result = call(iterator, f, step.value, entries); + if (result === BREAK || result === RETURN) return result; + } + }); + exports.BREAK = BREAK; + exports.RETURN = RETURN; + + /***/ + }, + /* 83 */ + /***/ function (module, exports, __webpack_require__) { + var isObject = __webpack_require__(35); + module.exports = function (it, TYPE) { + if (!isObject(it) || it._t !== TYPE) throw TypeError('Incompatible receiver, ' + TYPE + ' required!'); + return it; + }; + + /***/ + }, + /* 84 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Router__ = __webpack_require__(588); + /* unused harmony reexport Router */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Link__ = __webpack_require__(256); + /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, 'a', function () { + return __WEBPACK_IMPORTED_MODULE_1__Link__['a']; + }); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__IndexLink__ = __webpack_require__(595); + /* unused harmony reexport IndexLink */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__withRouter__ = __webpack_require__(596); + /* unused harmony reexport withRouter */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__IndexRedirect__ = __webpack_require__(598); + /* unused harmony reexport IndexRedirect */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__IndexRoute__ = __webpack_require__(599); + /* unused harmony reexport IndexRoute */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__Redirect__ = __webpack_require__(257); + /* unused harmony reexport Redirect */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__Route__ = __webpack_require__(600); + /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, 'b', function () { + return __WEBPACK_IMPORTED_MODULE_7__Route__['a']; + }); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__RouteUtils__ = __webpack_require__(47); + /* unused harmony reexport createRoutes */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__RouterContext__ = __webpack_require__(167); + /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, 'c', function () { + return __WEBPACK_IMPORTED_MODULE_9__RouterContext__['a']; + }); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__PropTypes__ = __webpack_require__(169); + /* unused harmony reexport locationShape */ + /* unused harmony reexport routerShape */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__match__ = __webpack_require__(601); + /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, 'd', function () { + return __WEBPACK_IMPORTED_MODULE_11__match__['a']; + }); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__useRouterHistory__ = __webpack_require__(261); + /* unused harmony reexport useRouterHistory */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__PatternUtils__ = __webpack_require__(71); + /* unused harmony reexport formatPattern */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__applyRouterMiddleware__ = + __webpack_require__(606); + /* unused harmony reexport applyRouterMiddleware */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__browserHistory__ = __webpack_require__(607); + /* unused harmony reexport browserHistory */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__hashHistory__ = __webpack_require__(610); + /* unused harmony reexport hashHistory */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__createMemoryHistory__ = __webpack_require__(258); + /* unused harmony reexport createMemoryHistory */ + /* components */ + + /* components (configuration) */ + + /* utils */ + + /* histories */ + + /***/ + }, + /* 85 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['c'] = falsy; + /* unused harmony export history */ + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'a', function () { + return component; + }); + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'b', function () { + return components; + }); + /* unused harmony export route */ + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'd', function () { + return routes; + }); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(10); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + + function falsy(props, propName, componentName) { + if (props[propName]) + return new Error('<' + componentName + '> should not have a "' + propName + '" prop'); + } + + var history = Object(__WEBPACK_IMPORTED_MODULE_0_prop_types__['shape'])({ + listen: __WEBPACK_IMPORTED_MODULE_0_prop_types__['func'].isRequired, + push: __WEBPACK_IMPORTED_MODULE_0_prop_types__['func'].isRequired, + replace: __WEBPACK_IMPORTED_MODULE_0_prop_types__['func'].isRequired, + go: __WEBPACK_IMPORTED_MODULE_0_prop_types__['func'].isRequired, + goBack: __WEBPACK_IMPORTED_MODULE_0_prop_types__['func'].isRequired, + goForward: __WEBPACK_IMPORTED_MODULE_0_prop_types__['func'].isRequired, + }); + + var component = Object(__WEBPACK_IMPORTED_MODULE_0_prop_types__['oneOfType'])([ + __WEBPACK_IMPORTED_MODULE_0_prop_types__['func'], + __WEBPACK_IMPORTED_MODULE_0_prop_types__['string'], + ]); + var components = Object(__WEBPACK_IMPORTED_MODULE_0_prop_types__['oneOfType'])([ + component, + __WEBPACK_IMPORTED_MODULE_0_prop_types__['object'], + ]); + var route = Object(__WEBPACK_IMPORTED_MODULE_0_prop_types__['oneOfType'])([ + __WEBPACK_IMPORTED_MODULE_0_prop_types__['object'], + __WEBPACK_IMPORTED_MODULE_0_prop_types__['element'], + ]); + var routes = Object(__WEBPACK_IMPORTED_MODULE_0_prop_types__['oneOfType'])([ + route, + Object(__WEBPACK_IMPORTED_MODULE_0_prop_types__['arrayOf'])(route), + ]); + + /***/ + }, + /* 86 */ + /***/ function (module, exports, __webpack_require__) { + // false -> Array#indexOf + // true -> Array#includes + var toIObject = __webpack_require__(19); + var toLength = __webpack_require__(7); + var toAbsoluteIndex = __webpack_require__(52); + module.exports = function (IS_INCLUDES) { + return function ($this, el, fromIndex) { + var O = toIObject($this); + var length = toLength(O.length); + var index = toAbsoluteIndex(fromIndex, length); + var value; + // Array#includes uses SameValueZero equality algorithm + // eslint-disable-next-line no-self-compare + if (IS_INCLUDES && el != el) + while (length > index) { + value = O[index++]; + // eslint-disable-next-line no-self-compare + if (value != value) return true; + // Array#indexOf ignores holes, Array#includes - not + } + else + for (; length > index; index++) + if (IS_INCLUDES || index in O) { + if (O[index] === el) return IS_INCLUDES || index || 0; + } + return !IS_INCLUDES && -1; + }; + }; + + /***/ + }, + /* 87 */ + /***/ function (module, exports) { + exports.f = Object.getOwnPropertySymbols; + + /***/ + }, + /* 88 */ + /***/ function (module, exports, __webpack_require__) { + // 7.2.2 IsArray(argument) + var cof = __webpack_require__(25); + module.exports = + Array.isArray || + function isArray(arg) { + return cof(arg) == 'Array'; + }; + + /***/ + }, + /* 89 */ + /***/ function (module, exports, __webpack_require__) { + var toInteger = __webpack_require__(26); + var defined = __webpack_require__(32); + // true -> String#at + // false -> String#codePointAt + module.exports = function (TO_STRING) { + return function (that, pos) { + var s = String(defined(that)); + var i = toInteger(pos); + var l = s.length; + var a, b; + if (i < 0 || i >= l) return TO_STRING ? '' : undefined; + a = s.charCodeAt(i); + return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff + ? TO_STRING + ? s.charAt(i) + : a + : TO_STRING + ? s.slice(i, i + 2) + : ((a - 0xd800) << 10) + (b - 0xdc00) + 0x10000; + }; + }; + + /***/ + }, + /* 90 */ + /***/ function (module, exports, __webpack_require__) { + // 7.2.8 IsRegExp(argument) + var isObject = __webpack_require__(5); + var cof = __webpack_require__(25); + var MATCH = __webpack_require__(6)('match'); + module.exports = function (it) { + var isRegExp; + return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp'); + }; + + /***/ + }, + /* 91 */ + /***/ function (module, exports, __webpack_require__) { + var ITERATOR = __webpack_require__(6)('iterator'); + var SAFE_CLOSING = false; + + try { + var riter = [7][ITERATOR](); + riter['return'] = function () { + SAFE_CLOSING = true; + }; + // eslint-disable-next-line no-throw-literal + Array.from(riter, function () { + throw 2; + }); + } catch (e) { + /* empty */ + } + + module.exports = function (exec, skipClosing) { + if (!skipClosing && !SAFE_CLOSING) return false; + var safe = false; + try { + var arr = [7]; + var iter = arr[ITERATOR](); + iter.next = function () { + return { done: (safe = true) }; + }; + arr[ITERATOR] = function () { + return iter; + }; + exec(arr); + } catch (e) { + /* empty */ + } + return safe; + }; + + /***/ + }, + /* 92 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var classof = __webpack_require__(65); + var builtinExec = RegExp.prototype.exec; + + // `RegExpExec` abstract operation + // https://tc39.github.io/ecma262/#sec-regexpexec + module.exports = function (R, S) { + var exec = R.exec; + if (typeof exec === 'function') { + var result = exec.call(R, S); + if (typeof result !== 'object') { + throw new TypeError('RegExp exec method returned something other than an Object or null'); + } + return result; + } + if (classof(R) !== 'RegExp') { + throw new TypeError('RegExp#exec called on incompatible receiver'); + } + return builtinExec.call(R, S); + }; + + /***/ + }, + /* 93 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + __webpack_require__(193); + var redefine = __webpack_require__(16); + var hide = __webpack_require__(15); + var fails = __webpack_require__(4); + var defined = __webpack_require__(32); + var wks = __webpack_require__(6); + var regexpExec = __webpack_require__(133); + + var SPECIES = wks('species'); + + var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () { + // #replace needs built-in support for named groups. + // #match works fine because it just return the exec results, even if it has + // a "grops" property. + var re = /./; + re.exec = function () { + var result = []; + result.groups = { a: '7' }; + return result; + }; + return ''.replace(re, '$<a>') !== '7'; + }); + + var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = (function () { + // Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec + var re = /(?:)/; + var originalExec = re.exec; + re.exec = function () { + return originalExec.apply(this, arguments); + }; + var result = 'ab'.split(re); + return result.length === 2 && result[0] === 'a' && result[1] === 'b'; + })(); + + module.exports = function (KEY, length, exec) { + var SYMBOL = wks(KEY); + + var DELEGATES_TO_SYMBOL = !fails(function () { + // String methods call symbol-named RegEp methods + var O = {}; + O[SYMBOL] = function () { + return 7; + }; + return ''[KEY](O) != 7; + }); + + var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL + ? !fails(function () { + // Symbol-named RegExp methods call .exec + var execCalled = false; + var re = /a/; + re.exec = function () { + execCalled = true; + return null; + }; + if (KEY === 'split') { + // RegExp[@@split] doesn't call the regex's exec method, but first creates + // a new one. We need to return the patched regex when creating the new one. + re.constructor = {}; + re.constructor[SPECIES] = function () { + return re; + }; + } + re[SYMBOL](''); + return !execCalled; + }) + : undefined; + + if ( + !DELEGATES_TO_SYMBOL || + !DELEGATES_TO_EXEC || + (KEY === 'replace' && !REPLACE_SUPPORTS_NAMED_GROUPS) || + (KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC) + ) { + var nativeRegExpMethod = /./[SYMBOL]; + var fns = exec( + defined, + SYMBOL, + ''[KEY], + function maybeCallNative(nativeMethod, regexp, str, arg2, forceStringMethod) { + if (regexp.exec === regexpExec) { + if (DELEGATES_TO_SYMBOL && !forceStringMethod) { + // The native String method already delegates to @@method (this + // polyfilled function), leasing to infinite recursion. + // We avoid it by directly calling the native @@method method. + return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) }; + } + return { done: true, value: nativeMethod.call(str, regexp, arg2) }; + } + return { done: false }; + }, + ); + var strfn = fns[0]; + var rxfn = fns[1]; + + redefine(String.prototype, KEY, strfn); + hide( + RegExp.prototype, + SYMBOL, + length == 2 + ? // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue) + // 21.2.5.11 RegExp.prototype[@@split](string, limit) + function (string, arg) { + return rxfn.call(string, this, arg); + } + : // 21.2.5.6 RegExp.prototype[@@match](string) + // 21.2.5.9 RegExp.prototype[@@search](string) + function (string) { + return rxfn.call(string, this); + }, + ); + } + }; + + /***/ + }, + /* 94 */ + /***/ function (module, exports, __webpack_require__) { + var global = __webpack_require__(3); + var navigator = global.navigator; + + module.exports = (navigator && navigator.userAgent) || ''; + + /***/ + }, + /* 95 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var global = __webpack_require__(3); + var $export = __webpack_require__(0); + var redefine = __webpack_require__(16); + var redefineAll = __webpack_require__(58); + var meta = __webpack_require__(42); + var forOf = __webpack_require__(57); + var anInstance = __webpack_require__(56); + var isObject = __webpack_require__(5); + var fails = __webpack_require__(4); + var $iterDetect = __webpack_require__(91); + var setToStringTag = __webpack_require__(64); + var inheritIfRequired = __webpack_require__(119); + + module.exports = function (NAME, wrapper, methods, common, IS_MAP, IS_WEAK) { + var Base = global[NAME]; + var C = Base; + var ADDER = IS_MAP ? 'set' : 'add'; + var proto = C && C.prototype; + var O = {}; + var fixMethod = function (KEY) { + var fn = proto[KEY]; + redefine( + proto, + KEY, + KEY == 'delete' + ? function (a) { + return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a); + } + : KEY == 'has' + ? function has(a) { + return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a); + } + : KEY == 'get' + ? function get(a) { + return IS_WEAK && !isObject(a) ? undefined : fn.call(this, a === 0 ? 0 : a); + } + : KEY == 'add' + ? function add(a) { + fn.call(this, a === 0 ? 0 : a); + return this; + } + : function set(a, b) { + fn.call(this, a === 0 ? 0 : a, b); + return this; + }, + ); + }; + if ( + typeof C != 'function' || + !( + IS_WEAK || + (proto.forEach && + !fails(function () { + new C().entries().next(); + })) + ) + ) { + // create collection constructor + C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER); + redefineAll(C.prototype, methods); + meta.NEED = true; + } else { + var instance = new C(); + // early implementations not supports chaining + var HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance; + // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false + var THROWS_ON_PRIMITIVES = fails(function () { + instance.has(1); + }); + // most early implementations doesn't supports iterables, most modern - not close it correctly + var ACCEPT_ITERABLES = $iterDetect(function (iter) { + new C(iter); + }); // eslint-disable-line no-new + // for early implementations -0 and +0 not the same + var BUGGY_ZERO = + !IS_WEAK && + fails(function () { + // V8 ~ Chromium 42- fails only with 5+ elements + var $instance = new C(); + var index = 5; + while (index--) $instance[ADDER](index, index); + return !$instance.has(-0); + }); + if (!ACCEPT_ITERABLES) { + C = wrapper(function (target, iterable) { + anInstance(target, C, NAME); + var that = inheritIfRequired(new Base(), target, C); + if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that); + return that; + }); + C.prototype = proto; + proto.constructor = C; + } + if (THROWS_ON_PRIMITIVES || BUGGY_ZERO) { + fixMethod('delete'); + fixMethod('has'); + IS_MAP && fixMethod('get'); + } + if (BUGGY_ZERO || HASNT_CHAINING) fixMethod(ADDER); + // weak collections should not contains .clear method + if (IS_WEAK && proto.clear) delete proto.clear; + } + + setToStringTag(C, NAME); + + O[NAME] = C; + $export($export.G + $export.W + $export.F * (C != Base), O); + + if (!IS_WEAK) common.setStrong(C, NAME, IS_MAP); + + return C; + }; + + /***/ + }, + /* 96 */ + /***/ function (module, exports, __webpack_require__) { + var global = __webpack_require__(3); + var hide = __webpack_require__(15); + var uid = __webpack_require__(50); + var TYPED = uid('typed_array'); + var VIEW = uid('view'); + var ABV = !!(global.ArrayBuffer && global.DataView); + var CONSTR = ABV; + var i = 0; + var l = 9; + var Typed; + + var TypedArrayConstructors = + 'Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array'.split( + ',', + ); + + while (i < l) { + if ((Typed = global[TypedArrayConstructors[i++]])) { + hide(Typed.prototype, TYPED, true); + hide(Typed.prototype, VIEW, true); + } else CONSTR = false; + } + + module.exports = { + ABV: ABV, + CONSTR: CONSTR, + TYPED: TYPED, + VIEW: VIEW, + }; + + /***/ + }, + /* 97 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // Forced replacement prototype accessors methods + module.exports = + __webpack_require__(41) || + !__webpack_require__(4)(function () { + var K = Math.random(); + // In FF throws only define methods + // eslint-disable-next-line no-undef, no-useless-call + __defineSetter__.call(null, K, function () { + /* empty */ + }); + delete __webpack_require__(3)[K]; + }); + + /***/ + }, + /* 98 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // https://tc39.github.io/proposal-setmap-offrom/ + var $export = __webpack_require__(0); + + module.exports = function (COLLECTION) { + $export($export.S, COLLECTION, { + of: function of() { + var length = arguments.length; + var A = new Array(length); + while (length--) A[length] = arguments[length]; + return new this(A); + }, + }); + }; + + /***/ + }, + /* 99 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // https://tc39.github.io/proposal-setmap-offrom/ + var $export = __webpack_require__(0); + var aFunction = __webpack_require__(12); + var ctx = __webpack_require__(24); + var forOf = __webpack_require__(57); + + module.exports = function (COLLECTION) { + $export($export.S, COLLECTION, { + from: function from(source /* , mapFn, thisArg */) { + var mapFn = arguments[1]; + var mapping, A, n, cb; + aFunction(this); + mapping = mapFn !== undefined; + if (mapping) aFunction(mapFn); + if (source == undefined) return new this(); + A = []; + if (mapping) { + n = 0; + cb = ctx(mapFn, arguments[2], 2); + forOf(source, false, function (nextItem) { + A.push(cb(nextItem, n++)); + }); + } else { + forOf(source, false, A.push, A); + } + return new this(A); + }, + }); + }; + + /***/ + }, + /* 100 */ + /***/ function (module, exports) { + exports.f = {}.propertyIsEnumerable; + + /***/ + }, + /* 101 */ + /***/ function (module, exports) { + module.exports = true; + + /***/ + }, + /* 102 */ + /***/ function (module, exports, __webpack_require__) { + // 7.1.15 ToLength + var toInteger = __webpack_require__(144); + var min = Math.min; + module.exports = function (it) { + return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 + }; + + /***/ + }, + /* 103 */ + /***/ function (module, exports) { + var id = 0; + var px = Math.random(); + module.exports = function (key) { + return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); + }; + + /***/ + }, + /* 104 */ + /***/ function (module, exports, __webpack_require__) { + var def = __webpack_require__(30).f; + var has = __webpack_require__(44); + var TAG = __webpack_require__(22)('toStringTag'); + + module.exports = function (it, tag, stat) { + if (it && !has((it = stat ? it : it.prototype), TAG)) + def(it, TAG, { configurable: true, value: tag }); + }; + + /***/ + }, + /* 105 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = __webpack_require__(507); + + /***/ + }, + /* 106 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + + var printWarning = function () {}; + + if (true) { + var ReactPropTypesSecret = __webpack_require__(230); + var loggedTypeFailures = {}; + var has = Function.call.bind(Object.prototype.hasOwnProperty); + + printWarning = function (text) { + var message = 'Warning: ' + text; + if (typeof console !== 'undefined') { + console.error(message); + } + try { + // --- Welcome to debugging React --- + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + throw new Error(message); + } catch (x) {} + }; + } + + /** + * Assert that the values match with the type specs. + * Error messages are memorized and will only be shown once. + * + * @param {object} typeSpecs Map of name to a ReactPropType + * @param {object} values Runtime values that need to be type-checked + * @param {string} location e.g. "prop", "context", "child context" + * @param {string} componentName Name of the component for error messages. + * @param {?Function} getStack Returns the component stack. + * @private + */ + function checkPropTypes(typeSpecs, values, location, componentName, getStack) { + if (true) { + for (var typeSpecName in typeSpecs) { + if (has(typeSpecs, typeSpecName)) { + var error; + // Prop type validation may throw. In case they do, we don't want to + // fail the render phase where it didn't fail before. So we log it. + // After these have been cleaned up, we'll let them throw. + try { + // This is intentionally an invariant that gets caught. It's the same + // behavior as without this statement except with a better message. + if (typeof typeSpecs[typeSpecName] !== 'function') { + var err = Error( + (componentName || 'React class') + + ': ' + + location + + ' type `' + + typeSpecName + + '` is invalid; ' + + 'it must be a function, usually from the `prop-types` package, but received `' + + typeof typeSpecs[typeSpecName] + + '`.', + ); + err.name = 'Invariant Violation'; + throw err; + } + error = typeSpecs[typeSpecName]( + values, + typeSpecName, + componentName, + location, + null, + ReactPropTypesSecret, + ); + } catch (ex) { + error = ex; + } + if (error && !(error instanceof Error)) { + printWarning( + (componentName || 'React class') + + ': type specification of ' + + location + + ' `' + + typeSpecName + + '` is invalid; the type checker ' + + 'function must return `null` or an `Error` but returned a ' + + typeof error + + '. ' + + 'You may have forgotten to pass an argument to the type checker ' + + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + + 'shape all require an argument).', + ); + } + if (error instanceof Error && !(error.message in loggedTypeFailures)) { + // Only monitor this failure once because there tends to be a lot of the + // same error. + loggedTypeFailures[error.message] = true; + + var stack = getStack ? getStack() : ''; + + printWarning('Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')); + } + } + } + } + } + + /** + * Resets warning cache when testing. + * + * @private + */ + checkPropTypes.resetWarningCache = function () { + if (true) { + loggedTypeFailures = {}; + } + }; + + module.exports = checkPropTypes; + + /***/ + }, + /* 107 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + module.exports = __webpack_require__(517); + + /***/ + }, + /* 108 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + if (false) { + module.exports = require('./cjs/react-is.production.min.js'); + } else { + module.exports = __webpack_require__(541); + } + + /***/ + }, + /* 109 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createStore__ = __webpack_require__(239); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__combineReducers__ = __webpack_require__(566); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__bindActionCreators__ = __webpack_require__(567); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__applyMiddleware__ = __webpack_require__(568); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__compose__ = __webpack_require__(243); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__utils_warning__ = __webpack_require__(242); + /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, 'd', function () { + return __WEBPACK_IMPORTED_MODULE_0__createStore__['b']; + }); + /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, 'c', function () { + return __WEBPACK_IMPORTED_MODULE_1__combineReducers__['a']; + }); + /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, 'b', function () { + return __WEBPACK_IMPORTED_MODULE_2__bindActionCreators__['a']; + }); + /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, 'a', function () { + return __WEBPACK_IMPORTED_MODULE_3__applyMiddleware__['a']; + }); + /* unused harmony reexport compose */ + + /* + * This is a dummy function to check if the function name has been altered by minification. + * If the function has been minified and NODE_ENV !== 'production', warn the user. + */ + function isCrushed() {} + + if ( + 'development' !== 'production' && + typeof isCrushed.name === 'string' && + isCrushed.name !== 'isCrushed' + ) { + Object(__WEBPACK_IMPORTED_MODULE_5__utils_warning__['a' /* default */])( + "You are currently using minified code outside of NODE_ENV === 'production'. " + + 'This means that you are running a slower development build of Redux. ' + + 'You can use loose-envify (https://github.com/zertosh/loose-envify) for browserify ' + + 'or DefinePlugin for webpack (http://stackoverflow.com/questions/30030031) ' + + 'to ensure you have the correct code for your production build.', + ); + } + + /***/ + }, + /* 110 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + /** + * Indicates that navigation was caused by a call to history.push. + */ + var PUSH = (exports.PUSH = 'PUSH'); + + /** + * Indicates that navigation was caused by a call to history.replace. + */ + var REPLACE = (exports.REPLACE = 'REPLACE'); + + /** + * Indicates that navigation was caused by some other action such + * as using a browser's back/forward buttons and/or manually manipulating + * the URL in a browser's location bar. This is the default. + * + * See https://developer.mozilla.org/en-US/docs/Web/API/WindowEventHandlers/onpopstate + * for more information. + */ + var POP = (exports.POP = 'POP'); + + /***/ + }, + /* 111 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + var addEventListener = (exports.addEventListener = function addEventListener(node, event, listener) { + return node.addEventListener + ? node.addEventListener(event, listener, false) + : node.attachEvent('on' + event, listener); + }); + + var removeEventListener = (exports.removeEventListener = function removeEventListener( + node, + event, + listener, + ) { + return node.removeEventListener + ? node.removeEventListener(event, listener, false) + : node.detachEvent('on' + event, listener); + }); + + /** + * Returns true if the HTML5 history API is supported. Taken from Modernizr. + * + * https://github.com/Modernizr/Modernizr/blob/master/LICENSE + * https://github.com/Modernizr/Modernizr/blob/master/feature-detects/history.js + * changed to avoid false negatives for Windows Phones: https://github.com/reactjs/react-router/issues/586 + */ + var supportsHistory = (exports.supportsHistory = function supportsHistory() { + var ua = window.navigator.userAgent; + + if ( + (ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && + ua.indexOf('Mobile Safari') !== -1 && + ua.indexOf('Chrome') === -1 && + ua.indexOf('Windows Phone') === -1 + ) + return false; + + return window.history && 'pushState' in window.history; + }); + + /** + * Returns false if using go(n) with hash history causes a full page reload. + */ + var supportsGoWithoutReloadUsingHash = (exports.supportsGoWithoutReloadUsingHash = + function supportsGoWithoutReloadUsingHash() { + return window.navigator.userAgent.indexOf('Firefox') === -1; + }); + + /** + * Returns true if browser fires popstate on hash change. + * IE10 and IE11 do not. + */ + var supportsPopstateOnHashchange = (exports.supportsPopstateOnHashchange = + function supportsPopstateOnHashchange() { + return window.navigator.userAgent.indexOf('Trident') === -1; + }); + + /** + * Returns true if a given popstate event is an extraneous WebKit event. + * Accounts for the fact that Chrome on iOS fires real popstate events + * containing undefined state when pressing the back button. + */ + var isExtraneousPopstateEvent = (exports.isExtraneousPopstateEvent = function isExtraneousPopstateEvent( + event, + ) { + return event.state === undefined && navigator.userAgent.indexOf('CriOS') === -1; + }); + + /***/ + }, + /* 112 */ + /***/ function (module, exports, __webpack_require__) { + var isObject = __webpack_require__(5); + var document = __webpack_require__(3).document; + // typeof document.createElement is 'object' in old IE + var is = isObject(document) && isObject(document.createElement); + module.exports = function (it) { + return is ? document.createElement(it) : {}; + }; + + /***/ + }, + /* 113 */ + /***/ function (module, exports, __webpack_require__) { + var global = __webpack_require__(3); + var core = __webpack_require__(23); + var LIBRARY = __webpack_require__(41); + var wksExt = __webpack_require__(175); + var defineProperty = __webpack_require__(9).f; + module.exports = function (name) { + var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {}); + if (name.charAt(0) != '_' && !(name in $Symbol)) + defineProperty($Symbol, name, { value: wksExt.f(name) }); + }; + + /***/ + }, + /* 114 */ + /***/ function (module, exports, __webpack_require__) { + var shared = __webpack_require__(73)('keys'); + var uid = __webpack_require__(50); + module.exports = function (key) { + return shared[key] || (shared[key] = uid(key)); + }; + + /***/ + }, + /* 115 */ + /***/ function (module, exports) { + // IE 8- don't enum bug keys + module.exports = + 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'.split( + ',', + ); + + /***/ + }, + /* 116 */ + /***/ function (module, exports, __webpack_require__) { + var document = __webpack_require__(3).document; + module.exports = document && document.documentElement; + + /***/ + }, + /* 117 */ + /***/ function (module, exports, __webpack_require__) { + // Works with __proto__ only. Old v8 can't work with null proto objects. + /* eslint-disable no-proto */ + var isObject = __webpack_require__(5); + var anObject = __webpack_require__(2); + var check = function (O, proto) { + anObject(O); + if (!isObject(proto) && proto !== null) throw TypeError(proto + ": can't set as prototype!"); + }; + module.exports = { + set: + Object.setPrototypeOf || + ('__proto__' in {} // eslint-disable-line + ? (function (test, buggy, set) { + try { + set = __webpack_require__(24)( + Function.call, + __webpack_require__(20).f(Object.prototype, '__proto__').set, + 2, + ); + set(test, []); + buggy = !(test instanceof Array); + } catch (e) { + buggy = true; + } + return function setPrototypeOf(O, proto) { + check(O, proto); + if (buggy) O.__proto__ = proto; + else set(O, proto); + return O; + }; + })({}, false) + : undefined), + check: check, + }; + + /***/ + }, + /* 118 */ + /***/ function (module, exports) { + module.exports = + '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' + + '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'; + + /***/ + }, + /* 119 */ + /***/ function (module, exports, __webpack_require__) { + var isObject = __webpack_require__(5); + var setPrototypeOf = __webpack_require__(117).set; + module.exports = function (that, target, C) { + var S = target.constructor; + var P; + if ( + S !== C && + typeof S == 'function' && + (P = S.prototype) !== C.prototype && + isObject(P) && + setPrototypeOf + ) { + setPrototypeOf(that, P); + } + return that; + }; + + /***/ + }, + /* 120 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var toInteger = __webpack_require__(26); + var defined = __webpack_require__(32); + + module.exports = function repeat(count) { + var str = String(defined(this)); + var res = ''; + var n = toInteger(count); + if (n < 0 || n == Infinity) throw RangeError("Count can't be negative"); + for (; n > 0; (n >>>= 1) && (str += str)) if (n & 1) res += str; + return res; + }; + + /***/ + }, + /* 121 */ + /***/ function (module, exports) { + // 20.2.2.28 Math.sign(x) + module.exports = + Math.sign || + function sign(x) { + // eslint-disable-next-line no-self-compare + return (x = +x) == 0 || x != x ? x : x < 0 ? -1 : 1; + }; + + /***/ + }, + /* 122 */ + /***/ function (module, exports) { + // 20.2.2.14 Math.expm1(x) + var $expm1 = Math.expm1; + module.exports = + !$expm1 || + // Old FF bug + $expm1(10) > 22025.465794806719 || + $expm1(10) < 22025.4657948067165168 || + // Tor Browser bug + $expm1(-2e-17) != -2e-17 + ? function expm1(x) { + return (x = +x) == 0 ? x : x > -1e-6 && x < 1e-6 ? x + (x * x) / 2 : Math.exp(x) - 1; + } + : $expm1; + + /***/ + }, + /* 123 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var LIBRARY = __webpack_require__(41); + var $export = __webpack_require__(0); + var redefine = __webpack_require__(16); + var hide = __webpack_require__(15); + var Iterators = __webpack_require__(67); + var $iterCreate = __webpack_require__(124); + var setToStringTag = __webpack_require__(64); + var getPrototypeOf = __webpack_require__(21); + var ITERATOR = __webpack_require__(6)('iterator'); + var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next` + var FF_ITERATOR = '@@iterator'; + var KEYS = 'keys'; + var VALUES = 'values'; + + var returnThis = function () { + return this; + }; + + module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) { + $iterCreate(Constructor, NAME, next); + var getMethod = function (kind) { + if (!BUGGY && kind in proto) return proto[kind]; + switch (kind) { + case KEYS: + return function keys() { + return new Constructor(this, kind); + }; + case VALUES: + return function values() { + return new Constructor(this, kind); + }; + } + return function entries() { + return new Constructor(this, kind); + }; + }; + var TAG = NAME + ' Iterator'; + var DEF_VALUES = DEFAULT == VALUES; + var VALUES_BUG = false; + var proto = Base.prototype; + var $native = proto[ITERATOR] || proto[FF_ITERATOR] || (DEFAULT && proto[DEFAULT]); + var $default = $native || getMethod(DEFAULT); + var $entries = DEFAULT ? (!DEF_VALUES ? $default : getMethod('entries')) : undefined; + var $anyNative = NAME == 'Array' ? proto.entries || $native : $native; + var methods, key, IteratorPrototype; + // Fix native + if ($anyNative) { + IteratorPrototype = getPrototypeOf($anyNative.call(new Base())); + if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) { + // Set @@toStringTag to native iterators + setToStringTag(IteratorPrototype, TAG, true); + // fix for some old engines + if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') + hide(IteratorPrototype, ITERATOR, returnThis); + } + } + // fix Array#{values, @@iterator}.name in V8 / FF + if (DEF_VALUES && $native && $native.name !== VALUES) { + VALUES_BUG = true; + $default = function values() { + return $native.call(this); + }; + } + // Define iterator + if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) { + hide(proto, ITERATOR, $default); + } + // Plug for library + Iterators[NAME] = $default; + Iterators[TAG] = returnThis; + if (DEFAULT) { + methods = { + values: DEF_VALUES ? $default : getMethod(VALUES), + keys: IS_SET ? $default : getMethod(KEYS), + entries: $entries, + }; + if (FORCED) + for (key in methods) { + if (!(key in proto)) redefine(proto, key, methods[key]); + } + else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); + } + return methods; + }; + + /***/ + }, + /* 124 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var create = __webpack_require__(53); + var descriptor = __webpack_require__(49); + var setToStringTag = __webpack_require__(64); + var IteratorPrototype = {}; + + // 25.1.2.1.1 %IteratorPrototype%[@@iterator]() + __webpack_require__(15)(IteratorPrototype, __webpack_require__(6)('iterator'), function () { + return this; + }); + + module.exports = function (Constructor, NAME, next) { + Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) }); + setToStringTag(Constructor, NAME + ' Iterator'); + }; + + /***/ + }, + /* 125 */ + /***/ function (module, exports, __webpack_require__) { + // helper for String#{startsWith, endsWith, includes} + var isRegExp = __webpack_require__(90); + var defined = __webpack_require__(32); + + module.exports = function (that, searchString, NAME) { + if (isRegExp(searchString)) throw TypeError('String#' + NAME + " doesn't accept regex!"); + return String(defined(that)); + }; + + /***/ + }, + /* 126 */ + /***/ function (module, exports, __webpack_require__) { + var MATCH = __webpack_require__(6)('match'); + module.exports = function (KEY) { + var re = /./; + try { + '/./'[KEY](re); + } catch (e) { + try { + re[MATCH] = false; + return !'/./'[KEY](re); + } catch (f) { + /* empty */ + } + } + return true; + }; + + /***/ + }, + /* 127 */ + /***/ function (module, exports, __webpack_require__) { + // check on default Array iterator + var Iterators = __webpack_require__(67); + var ITERATOR = __webpack_require__(6)('iterator'); + var ArrayProto = Array.prototype; + + module.exports = function (it) { + return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it); + }; + + /***/ + }, + /* 128 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $defineProperty = __webpack_require__(9); + var createDesc = __webpack_require__(49); + + module.exports = function (object, index, value) { + if (index in object) $defineProperty.f(object, index, createDesc(0, value)); + else object[index] = value; + }; + + /***/ + }, + /* 129 */ + /***/ function (module, exports, __webpack_require__) { + var classof = __webpack_require__(65); + var ITERATOR = __webpack_require__(6)('iterator'); + var Iterators = __webpack_require__(67); + module.exports = __webpack_require__(23).getIteratorMethod = function (it) { + if (it != undefined) return it[ITERATOR] || it['@@iterator'] || Iterators[classof(it)]; + }; + + /***/ + }, + /* 130 */ + /***/ function (module, exports, __webpack_require__) { + // 9.4.2.3 ArraySpeciesCreate(originalArray, length) + var speciesConstructor = __webpack_require__(360); + + module.exports = function (original, length) { + return new (speciesConstructor(original))(length); + }; + + /***/ + }, + /* 131 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + // 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length) + + var toObject = __webpack_require__(11); + var toAbsoluteIndex = __webpack_require__(52); + var toLength = __webpack_require__(7); + module.exports = function fill(value /* , start = 0, end = @length */) { + var O = toObject(this); + var length = toLength(O.length); + var aLen = arguments.length; + var index = toAbsoluteIndex(aLen > 1 ? arguments[1] : undefined, length); + var end = aLen > 2 ? arguments[2] : undefined; + var endPos = end === undefined ? length : toAbsoluteIndex(end, length); + while (endPos > index) O[index++] = value; + return O; + }; + + /***/ + }, + /* 132 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var addToUnscopables = __webpack_require__(43); + var step = __webpack_require__(192); + var Iterators = __webpack_require__(67); + var toIObject = __webpack_require__(19); + + // 22.1.3.4 Array.prototype.entries() + // 22.1.3.13 Array.prototype.keys() + // 22.1.3.29 Array.prototype.values() + // 22.1.3.30 Array.prototype[@@iterator]() + module.exports = __webpack_require__(123)( + Array, + 'Array', + function (iterated, kind) { + this._t = toIObject(iterated); // target + this._i = 0; // next index + this._k = kind; // kind + // 22.1.5.2.1 %ArrayIteratorPrototype%.next() + }, + function () { + var O = this._t; + var kind = this._k; + var index = this._i++; + if (!O || index >= O.length) { + this._t = undefined; + return step(1); + } + if (kind == 'keys') return step(0, index); + if (kind == 'values') return step(0, O[index]); + return step(0, [index, O[index]]); + }, + 'values', + ); + + // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) + Iterators.Arguments = Iterators.Array; + + addToUnscopables('keys'); + addToUnscopables('values'); + addToUnscopables('entries'); + + /***/ + }, + /* 133 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var regexpFlags = __webpack_require__(76); + + var nativeExec = RegExp.prototype.exec; + // This always refers to the native implementation, because the + // String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js, + // which loads this file before patching the method. + var nativeReplace = String.prototype.replace; + + var patchedExec = nativeExec; + + var LAST_INDEX = 'lastIndex'; + + var UPDATES_LAST_INDEX_WRONG = (function () { + var re1 = /a/, + re2 = /b*/g; + nativeExec.call(re1, 'a'); + nativeExec.call(re2, 'a'); + return re1[LAST_INDEX] !== 0 || re2[LAST_INDEX] !== 0; + })(); + + // nonparticipating capturing group, copied from es5-shim's String#split patch. + var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined; + + var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED; + + if (PATCH) { + patchedExec = function exec(str) { + var re = this; + var lastIndex, reCopy, match, i; + + if (NPCG_INCLUDED) { + reCopy = new RegExp('^' + re.source + '$(?!\\s)', regexpFlags.call(re)); + } + if (UPDATES_LAST_INDEX_WRONG) lastIndex = re[LAST_INDEX]; + + match = nativeExec.call(re, str); + + if (UPDATES_LAST_INDEX_WRONG && match) { + re[LAST_INDEX] = re.global ? match.index + match[0].length : lastIndex; + } + if (NPCG_INCLUDED && match && match.length > 1) { + // Fix browsers whose `exec` methods don't consistently return `undefined` + // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/ + // eslint-disable-next-line no-loop-func + nativeReplace.call(match[0], reCopy, function () { + for (i = 1; i < arguments.length - 2; i++) { + if (arguments[i] === undefined) match[i] = undefined; + } + }); + } + + return match; + }; + } + + module.exports = patchedExec; + + /***/ + }, + /* 134 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var at = __webpack_require__(89)(true); + + // `AdvanceStringIndex` abstract operation + // https://tc39.github.io/ecma262/#sec-advancestringindex + module.exports = function (S, index, unicode) { + return index + (unicode ? at(S, index).length : 1); + }; + + /***/ + }, + /* 135 */ + /***/ function (module, exports, __webpack_require__) { + var ctx = __webpack_require__(24); + var invoke = __webpack_require__(182); + var html = __webpack_require__(116); + var cel = __webpack_require__(112); + var global = __webpack_require__(3); + var process = global.process; + var setTask = global.setImmediate; + var clearTask = global.clearImmediate; + var MessageChannel = global.MessageChannel; + var Dispatch = global.Dispatch; + var counter = 0; + var queue = {}; + var ONREADYSTATECHANGE = 'onreadystatechange'; + var defer, channel, port; + var run = function () { + var id = +this; + // eslint-disable-next-line no-prototype-builtins + if (queue.hasOwnProperty(id)) { + var fn = queue[id]; + delete queue[id]; + fn(); + } + }; + var listener = function (event) { + run.call(event.data); + }; + // Node.js 0.9+ & IE10+ has setImmediate, otherwise: + if (!setTask || !clearTask) { + setTask = function setImmediate(fn) { + var args = []; + var i = 1; + while (arguments.length > i) args.push(arguments[i++]); + queue[++counter] = function () { + // eslint-disable-next-line no-new-func + invoke(typeof fn == 'function' ? fn : Function(fn), args); + }; + defer(counter); + return counter; + }; + clearTask = function clearImmediate(id) { + delete queue[id]; + }; + // Node.js 0.8- + if (__webpack_require__(25)(process) == 'process') { + defer = function (id) { + process.nextTick(ctx(run, id, 1)); + }; + // Sphere (JS game engine) Dispatch API + } else if (Dispatch && Dispatch.now) { + defer = function (id) { + Dispatch.now(ctx(run, id, 1)); + }; + // Browsers with MessageChannel, includes WebWorkers + } else if (MessageChannel) { + channel = new MessageChannel(); + port = channel.port2; + channel.port1.onmessage = listener; + defer = ctx(port.postMessage, port, 1); + // Browsers with postMessage, skip WebWorkers + // IE8 has postMessage, but it's sync & typeof its postMessage is 'object' + } else if (global.addEventListener && typeof postMessage == 'function' && !global.importScripts) { + defer = function (id) { + global.postMessage(id + '', '*'); + }; + global.addEventListener('message', listener, false); + // IE8- + } else if (ONREADYSTATECHANGE in cel('script')) { + defer = function (id) { + html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function () { + html.removeChild(this); + run.call(id); + }; + }; + // Rest old browsers + } else { + defer = function (id) { + setTimeout(ctx(run, id, 1), 0); + }; + } + } + module.exports = { + set: setTask, + clear: clearTask, + }; + + /***/ + }, + /* 136 */ + /***/ function (module, exports, __webpack_require__) { + var global = __webpack_require__(3); + var macrotask = __webpack_require__(135).set; + var Observer = global.MutationObserver || global.WebKitMutationObserver; + var process = global.process; + var Promise = global.Promise; + var isNode = __webpack_require__(25)(process) == 'process'; + + module.exports = function () { + var head, last, notify; + + var flush = function () { + var parent, fn; + if (isNode && (parent = process.domain)) parent.exit(); + while (head) { + fn = head.fn; + head = head.next; + try { + fn(); + } catch (e) { + if (head) notify(); + else last = undefined; + throw e; + } + } + last = undefined; + if (parent) parent.enter(); + }; + + // Node.js + if (isNode) { + notify = function () { + process.nextTick(flush); + }; + // browsers with MutationObserver, except iOS Safari - https://github.com/zloirock/core-js/issues/339 + } else if (Observer && !(global.navigator && global.navigator.standalone)) { + var toggle = true; + var node = document.createTextNode(''); + new Observer(flush).observe(node, { characterData: true }); // eslint-disable-line no-new + notify = function () { + node.data = toggle = !toggle; + }; + // environments with maybe non-completely correct, but existent Promise + } else if (Promise && Promise.resolve) { + // Promise.resolve without an argument throws an error in LG WebOS 2 + var promise = Promise.resolve(undefined); + notify = function () { + promise.then(flush); + }; + // for other environments - macrotask based on: + // - setImmediate + // - MessageChannel + // - window.postMessag + // - onreadystatechange + // - setTimeout + } else { + notify = function () { + // strange IE + webpack dev server bug - use .call(global) + macrotask.call(global, flush); + }; + } + + return function (fn) { + var task = { fn: fn, next: undefined }; + if (last) last.next = task; + if (!head) { + head = task; + notify(); + } + last = task; + }; + }; + + /***/ + }, + /* 137 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // 25.4.1.5 NewPromiseCapability(C) + var aFunction = __webpack_require__(12); + + function PromiseCapability(C) { + var resolve, reject; + this.promise = new C(function ($$resolve, $$reject) { + if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor'); + resolve = $$resolve; + reject = $$reject; + }); + this.resolve = aFunction(resolve); + this.reject = aFunction(reject); + } + + module.exports.f = function (C) { + return new PromiseCapability(C); + }; + + /***/ + }, + /* 138 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var global = __webpack_require__(3); + var DESCRIPTORS = __webpack_require__(8); + var LIBRARY = __webpack_require__(41); + var $typed = __webpack_require__(96); + var hide = __webpack_require__(15); + var redefineAll = __webpack_require__(58); + var fails = __webpack_require__(4); + var anInstance = __webpack_require__(56); + var toInteger = __webpack_require__(26); + var toLength = __webpack_require__(7); + var toIndex = __webpack_require__(202); + var gOPN = __webpack_require__(54).f; + var dP = __webpack_require__(9).f; + var arrayFill = __webpack_require__(131); + var setToStringTag = __webpack_require__(64); + var ARRAY_BUFFER = 'ArrayBuffer'; + var DATA_VIEW = 'DataView'; + var PROTOTYPE = 'prototype'; + var WRONG_LENGTH = 'Wrong length!'; + var WRONG_INDEX = 'Wrong index!'; + var $ArrayBuffer = global[ARRAY_BUFFER]; + var $DataView = global[DATA_VIEW]; + var Math = global.Math; + var RangeError = global.RangeError; + // eslint-disable-next-line no-shadow-restricted-names + var Infinity = global.Infinity; + var BaseBuffer = $ArrayBuffer; + var abs = Math.abs; + var pow = Math.pow; + var floor = Math.floor; + var log = Math.log; + var LN2 = Math.LN2; + var BUFFER = 'buffer'; + var BYTE_LENGTH = 'byteLength'; + var BYTE_OFFSET = 'byteOffset'; + var $BUFFER = DESCRIPTORS ? '_b' : BUFFER; + var $LENGTH = DESCRIPTORS ? '_l' : BYTE_LENGTH; + var $OFFSET = DESCRIPTORS ? '_o' : BYTE_OFFSET; + + // IEEE754 conversions based on https://github.com/feross/ieee754 + function packIEEE754(value, mLen, nBytes) { + var buffer = new Array(nBytes); + var eLen = nBytes * 8 - mLen - 1; + var eMax = (1 << eLen) - 1; + var eBias = eMax >> 1; + var rt = mLen === 23 ? pow(2, -24) - pow(2, -77) : 0; + var i = 0; + var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0; + var e, m, c; + value = abs(value); + // eslint-disable-next-line no-self-compare + if (value != value || value === Infinity) { + // eslint-disable-next-line no-self-compare + m = value != value ? 1 : 0; + e = eMax; + } else { + e = floor(log(value) / LN2); + if (value * (c = pow(2, -e)) < 1) { + e--; + c *= 2; + } + if (e + eBias >= 1) { + value += rt / c; + } else { + value += rt * pow(2, 1 - eBias); + } + if (value * c >= 2) { + e++; + c /= 2; + } + if (e + eBias >= eMax) { + m = 0; + e = eMax; + } else if (e + eBias >= 1) { + m = (value * c - 1) * pow(2, mLen); + e = e + eBias; + } else { + m = value * pow(2, eBias - 1) * pow(2, mLen); + e = 0; + } + } + for (; mLen >= 8; buffer[i++] = m & 255, m /= 256, mLen -= 8); + e = (e << mLen) | m; + eLen += mLen; + for (; eLen > 0; buffer[i++] = e & 255, e /= 256, eLen -= 8); + buffer[--i] |= s * 128; + return buffer; + } + function unpackIEEE754(buffer, mLen, nBytes) { + var eLen = nBytes * 8 - mLen - 1; + var eMax = (1 << eLen) - 1; + var eBias = eMax >> 1; + var nBits = eLen - 7; + var i = nBytes - 1; + var s = buffer[i--]; + var e = s & 127; + var m; + s >>= 7; + for (; nBits > 0; e = e * 256 + buffer[i], i--, nBits -= 8); + m = e & ((1 << -nBits) - 1); + e >>= -nBits; + nBits += mLen; + for (; nBits > 0; m = m * 256 + buffer[i], i--, nBits -= 8); + if (e === 0) { + e = 1 - eBias; + } else if (e === eMax) { + return m ? NaN : s ? -Infinity : Infinity; + } else { + m = m + pow(2, mLen); + e = e - eBias; + } + return (s ? -1 : 1) * m * pow(2, e - mLen); + } + + function unpackI32(bytes) { + return (bytes[3] << 24) | (bytes[2] << 16) | (bytes[1] << 8) | bytes[0]; + } + function packI8(it) { + return [it & 0xff]; + } + function packI16(it) { + return [it & 0xff, (it >> 8) & 0xff]; + } + function packI32(it) { + return [it & 0xff, (it >> 8) & 0xff, (it >> 16) & 0xff, (it >> 24) & 0xff]; + } + function packF64(it) { + return packIEEE754(it, 52, 8); + } + function packF32(it) { + return packIEEE754(it, 23, 4); + } + + function addGetter(C, key, internal) { + dP(C[PROTOTYPE], key, { + get: function () { + return this[internal]; + }, + }); + } + + function get(view, bytes, index, isLittleEndian) { + var numIndex = +index; + var intIndex = toIndex(numIndex); + if (intIndex + bytes > view[$LENGTH]) throw RangeError(WRONG_INDEX); + var store = view[$BUFFER]._b; + var start = intIndex + view[$OFFSET]; + var pack = store.slice(start, start + bytes); + return isLittleEndian ? pack : pack.reverse(); + } + function set(view, bytes, index, conversion, value, isLittleEndian) { + var numIndex = +index; + var intIndex = toIndex(numIndex); + if (intIndex + bytes > view[$LENGTH]) throw RangeError(WRONG_INDEX); + var store = view[$BUFFER]._b; + var start = intIndex + view[$OFFSET]; + var pack = conversion(+value); + for (var i = 0; i < bytes; i++) store[start + i] = pack[isLittleEndian ? i : bytes - i - 1]; + } + + if (!$typed.ABV) { + $ArrayBuffer = function ArrayBuffer(length) { + anInstance(this, $ArrayBuffer, ARRAY_BUFFER); + var byteLength = toIndex(length); + this._b = arrayFill.call(new Array(byteLength), 0); + this[$LENGTH] = byteLength; + }; + + $DataView = function DataView(buffer, byteOffset, byteLength) { + anInstance(this, $DataView, DATA_VIEW); + anInstance(buffer, $ArrayBuffer, DATA_VIEW); + var bufferLength = buffer[$LENGTH]; + var offset = toInteger(byteOffset); + if (offset < 0 || offset > bufferLength) throw RangeError('Wrong offset!'); + byteLength = byteLength === undefined ? bufferLength - offset : toLength(byteLength); + if (offset + byteLength > bufferLength) throw RangeError(WRONG_LENGTH); + this[$BUFFER] = buffer; + this[$OFFSET] = offset; + this[$LENGTH] = byteLength; + }; + + if (DESCRIPTORS) { + addGetter($ArrayBuffer, BYTE_LENGTH, '_l'); + addGetter($DataView, BUFFER, '_b'); + addGetter($DataView, BYTE_LENGTH, '_l'); + addGetter($DataView, BYTE_OFFSET, '_o'); + } + + redefineAll($DataView[PROTOTYPE], { + getInt8: function getInt8(byteOffset) { + return (get(this, 1, byteOffset)[0] << 24) >> 24; + }, + getUint8: function getUint8(byteOffset) { + return get(this, 1, byteOffset)[0]; + }, + getInt16: function getInt16(byteOffset /* , littleEndian */) { + var bytes = get(this, 2, byteOffset, arguments[1]); + return (((bytes[1] << 8) | bytes[0]) << 16) >> 16; + }, + getUint16: function getUint16(byteOffset /* , littleEndian */) { + var bytes = get(this, 2, byteOffset, arguments[1]); + return (bytes[1] << 8) | bytes[0]; + }, + getInt32: function getInt32(byteOffset /* , littleEndian */) { + return unpackI32(get(this, 4, byteOffset, arguments[1])); + }, + getUint32: function getUint32(byteOffset /* , littleEndian */) { + return unpackI32(get(this, 4, byteOffset, arguments[1])) >>> 0; + }, + getFloat32: function getFloat32(byteOffset /* , littleEndian */) { + return unpackIEEE754(get(this, 4, byteOffset, arguments[1]), 23, 4); + }, + getFloat64: function getFloat64(byteOffset /* , littleEndian */) { + return unpackIEEE754(get(this, 8, byteOffset, arguments[1]), 52, 8); + }, + setInt8: function setInt8(byteOffset, value) { + set(this, 1, byteOffset, packI8, value); + }, + setUint8: function setUint8(byteOffset, value) { + set(this, 1, byteOffset, packI8, value); + }, + setInt16: function setInt16(byteOffset, value /* , littleEndian */) { + set(this, 2, byteOffset, packI16, value, arguments[2]); + }, + setUint16: function setUint16(byteOffset, value /* , littleEndian */) { + set(this, 2, byteOffset, packI16, value, arguments[2]); + }, + setInt32: function setInt32(byteOffset, value /* , littleEndian */) { + set(this, 4, byteOffset, packI32, value, arguments[2]); + }, + setUint32: function setUint32(byteOffset, value /* , littleEndian */) { + set(this, 4, byteOffset, packI32, value, arguments[2]); + }, + setFloat32: function setFloat32(byteOffset, value /* , littleEndian */) { + set(this, 4, byteOffset, packF32, value, arguments[2]); + }, + setFloat64: function setFloat64(byteOffset, value /* , littleEndian */) { + set(this, 8, byteOffset, packF64, value, arguments[2]); + }, + }); + } else { + if ( + !fails(function () { + $ArrayBuffer(1); + }) || + !fails(function () { + new $ArrayBuffer(-1); // eslint-disable-line no-new + }) || + fails(function () { + new $ArrayBuffer(); // eslint-disable-line no-new + new $ArrayBuffer(1.5); // eslint-disable-line no-new + new $ArrayBuffer(NaN); // eslint-disable-line no-new + return $ArrayBuffer.name != ARRAY_BUFFER; + }) + ) { + $ArrayBuffer = function ArrayBuffer(length) { + anInstance(this, $ArrayBuffer); + return new BaseBuffer(toIndex(length)); + }; + var ArrayBufferProto = ($ArrayBuffer[PROTOTYPE] = BaseBuffer[PROTOTYPE]); + for (var keys = gOPN(BaseBuffer), j = 0, key; keys.length > j; ) { + if (!((key = keys[j++]) in $ArrayBuffer)) hide($ArrayBuffer, key, BaseBuffer[key]); + } + if (!LIBRARY) ArrayBufferProto.constructor = $ArrayBuffer; + } + // iOS Safari 7.x bug + var view = new $DataView(new $ArrayBuffer(2)); + var $setInt8 = $DataView[PROTOTYPE].setInt8; + view.setInt8(0, 2147483648); + view.setInt8(1, 2147483649); + if (view.getInt8(0) || !view.getInt8(1)) + redefineAll( + $DataView[PROTOTYPE], + { + setInt8: function setInt8(byteOffset, value) { + $setInt8.call(this, byteOffset, (value << 24) >> 24); + }, + setUint8: function setUint8(byteOffset, value) { + $setInt8.call(this, byteOffset, (value << 24) >> 24); + }, + }, + true, + ); + } + setToStringTag($ArrayBuffer, ARRAY_BUFFER); + setToStringTag($DataView, DATA_VIEW); + hide($DataView[PROTOTYPE], $typed.VIEW, true); + exports[ARRAY_BUFFER] = $ArrayBuffer; + exports[DATA_VIEW] = $DataView; + + /***/ + }, + /* 139 */ + /***/ function (module, exports, __webpack_require__) { + // fallback for non-array-like ES3 and non-enumerable old V8 strings + var cof = __webpack_require__(140); + // eslint-disable-next-line no-prototype-builtins + module.exports = Object('z').propertyIsEnumerable(0) + ? Object + : function (it) { + return cof(it) == 'String' ? it.split('') : Object(it); + }; + + /***/ + }, + /* 140 */ + /***/ function (module, exports) { + var toString = {}.toString; + + module.exports = function (it) { + return toString.call(it).slice(8, -1); + }; + + /***/ + }, + /* 141 */ + /***/ function (module, exports) { + // 7.2.1 RequireObjectCoercible(argument) + module.exports = function (it) { + if (it == undefined) throw TypeError("Can't call method on " + it); + return it; + }; + + /***/ + }, + /* 142 */ + /***/ function (module, exports, __webpack_require__) { + // 7.1.1 ToPrimitive(input [, PreferredType]) + var isObject = __webpack_require__(35); + // instead of the ES6 spec version, we didn't implement @@toPrimitive case + // and the second argument - flag - preferred type is a string + module.exports = function (it, S) { + if (!isObject(it)) return it; + var fn, val; + if (S && typeof (fn = it.toString) == 'function' && !isObject((val = fn.call(it)))) return val; + if (typeof (fn = it.valueOf) == 'function' && !isObject((val = fn.call(it)))) return val; + if (!S && typeof (fn = it.toString) == 'function' && !isObject((val = fn.call(it)))) return val; + throw TypeError("Can't convert object to primitive value"); + }; + + /***/ + }, + /* 143 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $at = __webpack_require__(481)(true); + + // 21.1.3.27 String.prototype[@@iterator]() + __webpack_require__(145)( + String, + 'String', + function (iterated) { + this._t = String(iterated); // target + this._i = 0; // next index + // 21.1.5.2.1 %StringIteratorPrototype%.next() + }, + function () { + var O = this._t; + var index = this._i; + var point; + if (index >= O.length) return { value: undefined, done: true }; + point = $at(O, index); + this._i += point.length; + return { value: point, done: false }; + }, + ); + + /***/ + }, + /* 144 */ + /***/ function (module, exports) { + // 7.1.4 ToInteger + var ceil = Math.ceil; + var floor = Math.floor; + module.exports = function (it) { + return isNaN((it = +it)) ? 0 : (it > 0 ? floor : ceil)(it); + }; + + /***/ + }, + /* 145 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var LIBRARY = __webpack_require__(101); + var $export = __webpack_require__(36); + var redefine = __webpack_require__(146); + var hide = __webpack_require__(45); + var Iterators = __webpack_require__(79); + var $iterCreate = __webpack_require__(482); + var setToStringTag = __webpack_require__(104); + var getPrototypeOf = __webpack_require__(487); + var ITERATOR = __webpack_require__(22)('iterator'); + var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next` + var FF_ITERATOR = '@@iterator'; + var KEYS = 'keys'; + var VALUES = 'values'; + + var returnThis = function () { + return this; + }; + + module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) { + $iterCreate(Constructor, NAME, next); + var getMethod = function (kind) { + if (!BUGGY && kind in proto) return proto[kind]; + switch (kind) { + case KEYS: + return function keys() { + return new Constructor(this, kind); + }; + case VALUES: + return function values() { + return new Constructor(this, kind); + }; + } + return function entries() { + return new Constructor(this, kind); + }; + }; + var TAG = NAME + ' Iterator'; + var DEF_VALUES = DEFAULT == VALUES; + var VALUES_BUG = false; + var proto = Base.prototype; + var $native = proto[ITERATOR] || proto[FF_ITERATOR] || (DEFAULT && proto[DEFAULT]); + var $default = $native || getMethod(DEFAULT); + var $entries = DEFAULT ? (!DEF_VALUES ? $default : getMethod('entries')) : undefined; + var $anyNative = NAME == 'Array' ? proto.entries || $native : $native; + var methods, key, IteratorPrototype; + // Fix native + if ($anyNative) { + IteratorPrototype = getPrototypeOf($anyNative.call(new Base())); + if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) { + // Set @@toStringTag to native iterators + setToStringTag(IteratorPrototype, TAG, true); + // fix for some old engines + if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') + hide(IteratorPrototype, ITERATOR, returnThis); + } + } + // fix Array#{values, @@iterator}.name in V8 / FF + if (DEF_VALUES && $native && $native.name !== VALUES) { + VALUES_BUG = true; + $default = function values() { + return $native.call(this); + }; + } + // Define iterator + if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) { + hide(proto, ITERATOR, $default); + } + // Plug for library + Iterators[NAME] = $default; + Iterators[TAG] = returnThis; + if (DEFAULT) { + methods = { + values: DEF_VALUES ? $default : getMethod(VALUES), + keys: IS_SET ? $default : getMethod(KEYS), + entries: $entries, + }; + if (FORCED) + for (key in methods) { + if (!(key in proto)) redefine(proto, key, methods[key]); + } + else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); + } + return methods; + }; + + /***/ + }, + /* 146 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = __webpack_require__(45); + + /***/ + }, + /* 147 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) + var anObject = __webpack_require__(62); + var dPs = __webpack_require__(483); + var enumBugKeys = __webpack_require__(150); + var IE_PROTO = __webpack_require__(148)('IE_PROTO'); + var Empty = function () { + /* empty */ + }; + var PROTOTYPE = 'prototype'; + + // Create object with fake `null` prototype: use iframe Object with cleared prototype + var createDict = function () { + // Thrash, waste and sodomy: IE GC bug + var iframe = __webpack_require__(213)('iframe'); + var i = enumBugKeys.length; + var lt = '<'; + var gt = '>'; + var iframeDocument; + iframe.style.display = 'none'; + __webpack_require__(486).appendChild(iframe); + iframe.src = 'javascript:'; // eslint-disable-line no-script-url + // createDict = iframe.contentWindow.Object; + // html.removeChild(iframe); + iframeDocument = iframe.contentWindow.document; + iframeDocument.open(); + iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); + iframeDocument.close(); + createDict = iframeDocument.F; + while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]]; + return createDict(); + }; + + module.exports = + Object.create || + function create(O, Properties) { + var result; + if (O !== null) { + Empty[PROTOTYPE] = anObject(O); + result = new Empty(); + Empty[PROTOTYPE] = null; + // add "__proto__" for Object.getPrototypeOf polyfill + result[IE_PROTO] = O; + } else result = createDict(); + return Properties === undefined ? result : dPs(result, Properties); + }; + + /***/ + }, + /* 148 */ + /***/ function (module, exports, __webpack_require__) { + var shared = __webpack_require__(149)('keys'); + var uid = __webpack_require__(103); + module.exports = function (key) { + return shared[key] || (shared[key] = uid(key)); + }; + + /***/ + }, + /* 149 */ + /***/ function (module, exports, __webpack_require__) { + var core = __webpack_require__(13); + var global = __webpack_require__(29); + var SHARED = '__core-js_shared__'; + var store = global[SHARED] || (global[SHARED] = {}); + + (module.exports = function (key, value) { + return store[key] || (store[key] = value !== undefined ? value : {}); + })('versions', []).push({ + version: core.version, + mode: __webpack_require__(101) ? 'pure' : 'global', + copyright: '© 2019 Denis Pushkarev (zloirock.ru)', + }); + + /***/ + }, + /* 150 */ + /***/ function (module, exports) { + // IE 8- don't enum bug keys + module.exports = + 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'.split( + ',', + ); + + /***/ + }, + /* 151 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(488); + var global = __webpack_require__(29); + var hide = __webpack_require__(45); + var Iterators = __webpack_require__(79); + var TO_STRING_TAG = __webpack_require__(22)('toStringTag'); + + var DOMIterables = ( + 'CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,' + + 'DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,' + + 'MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,' + + 'SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,' + + 'TextTrackList,TouchList' + ).split(','); + + for (var i = 0; i < DOMIterables.length; i++) { + var NAME = DOMIterables[i]; + var Collection = global[NAME]; + var proto = Collection && Collection.prototype; + if (proto && !proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME); + Iterators[NAME] = Iterators.Array; + } + + /***/ + }, + /* 152 */ + /***/ function (module, exports, __webpack_require__) { + exports.f = __webpack_require__(22); + + /***/ + }, + /* 153 */ + /***/ function (module, exports, __webpack_require__) { + var global = __webpack_require__(29); + var core = __webpack_require__(13); + var LIBRARY = __webpack_require__(101); + var wksExt = __webpack_require__(152); + var defineProperty = __webpack_require__(30).f; + module.exports = function (name) { + var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {}); + if (name.charAt(0) != '_' && !(name in $Symbol)) + defineProperty($Symbol, name, { value: wksExt.f(name) }); + }; + + /***/ + }, + /* 154 */ + /***/ function (module, exports) { + exports.f = Object.getOwnPropertySymbols; + + /***/ + }, + /* 155 */ + /***/ function (module, exports) { + /***/ + }, + /* 156 */ + /***/ function (module, exports, __webpack_require__) { + // 0 -> Array#forEach + // 1 -> Array#map + // 2 -> Array#filter + // 3 -> Array#some + // 4 -> Array#every + // 5 -> Array#find + // 6 -> Array#findIndex + var ctx = __webpack_require__(68); + var IObject = __webpack_require__(139); + var toObject = __webpack_require__(69); + var toLength = __webpack_require__(102); + var asc = __webpack_require__(500); + module.exports = function (TYPE, $create) { + var IS_MAP = TYPE == 1; + var IS_FILTER = TYPE == 2; + var IS_SOME = TYPE == 3; + var IS_EVERY = TYPE == 4; + var IS_FIND_INDEX = TYPE == 6; + var NO_HOLES = TYPE == 5 || IS_FIND_INDEX; + var create = $create || asc; + return function ($this, callbackfn, that) { + var O = toObject($this); + var self = IObject(O); + var f = ctx(callbackfn, that, 3); + var length = toLength(self.length); + var index = 0; + var result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined; + var val, res; + for (; length > index; index++) + if (NO_HOLES || index in self) { + val = self[index]; + res = f(val, index, O); + if (TYPE) { + if (IS_MAP) + result[index] = res; // map + else if (res) + switch (TYPE) { + case 3: + return true; // some + case 5: + return val; // find + case 6: + return index; // findIndex + case 2: + result.push(val); // filter + } + else if (IS_EVERY) return false; // every + } + } + return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result; + }; + }; + + /***/ + }, + /* 157 */ + /***/ function (module, exports, __webpack_require__) { + var hide = __webpack_require__(45); + module.exports = function (target, src, safe) { + for (var key in src) { + if (safe && target[key]) target[key] = src[key]; + else hide(target, key, src[key]); + } + return target; + }; + + /***/ + }, + /* 158 */ + /***/ function (module, exports) { + module.exports = function (it, Constructor, name, forbiddenField) { + if (!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)) { + throw TypeError(name + ': incorrect invocation!'); + } + return it; + }; + + /***/ + }, + /* 159 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = __webpack_require__(508); + + /***/ + }, + /* 160 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var _interopRequireDefault = __webpack_require__(40); + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.default = createReactElement; + + var _react = _interopRequireDefault(__webpack_require__(1)); + + /* eslint-disable react/prop-types */ + + /** + * Logic to either call the generatorFunction or call React.createElement to get the + * React.Component + * @param options + * @param options.componentObj + * @param options.props + * @param options.domNodeId + * @param options.trace + * @param options.location + * @returns {Element} + */ + function createReactElement(_ref) { + var componentObj = _ref.componentObj, + props = _ref.props, + railsContext = _ref.railsContext, + domNodeId = _ref.domNodeId, + trace = _ref.trace, + shouldHydrate = _ref.shouldHydrate; + var name = componentObj.name, + component = componentObj.component, + generatorFunction = componentObj.generatorFunction; + + if (trace) { + if (railsContext && railsContext.serverSide) { + console.log('RENDERED '.concat(name, ' to dom node with id: ').concat(domNodeId)); + } else if (shouldHydrate) { + console.log( + 'HYDRATED ' + .concat(name, ' in dom node with id: ') + .concat(domNodeId, ' using props, railsContext:'), + props, + railsContext, + ); + } else { + console.log( + 'RENDERED ' + .concat(name, ' to dom node with id: ') + .concat(domNodeId, ' with props, railsContext:'), + props, + railsContext, + ); + } + } + + if (generatorFunction) { + return component(props, railsContext); + } + + return _react.default.createElement(component, props); + } + + /***/ + }, + /* 161 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(10); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__RailsContext__ = __webpack_require__(237); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__HelloWorld_scss__ = __webpack_require__(544); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__HelloWorld_scss___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_3__HelloWorld_scss__, + ); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + // Example of CSS modules. + + // Super simple example of the simplest possible React component + + var HelloWorld = (function (_React$Component) { + _inherits(HelloWorld, _React$Component); + + // Not necessary if we only call super, but we'll need to initialize state, etc. + function HelloWorld(props) { + _classCallCheck(this, HelloWorld); + + var _this = _possibleConstructorReturn( + this, + (HelloWorld.__proto__ || Object.getPrototypeOf(HelloWorld)).call(this, props), + ); + + _this.state = props.helloWorldData; + _this.setNameDomRef = _this.setNameDomRef.bind(_this); + _this.handleChange = _this.handleChange.bind(_this); + return _this; + } + + _createClass(HelloWorld, [ + { + key: 'setNameDomRef', + value: function setNameDomRef(nameDomNode) { + this.nameDomRef = nameDomNode; + }, + }, + { + key: 'handleChange', + value: function handleChange() { + var name = this.nameDomRef.value; + this.setState({ name: name }); + }, + }, + { + key: 'render', + value: function render() { + // eslint-disable-next-line no-console + console.log( + 'HelloWorld demonstrating a call to console.log in ' + + 'spec/dummy/client/app/components/HelloWorld.jsx:18', + ); + + var name = this.state.name; + var railsContext = this.props.railsContext; + + return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'div', + null, + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'h3', + { className: __WEBPACK_IMPORTED_MODULE_3__HelloWorld_scss___default.a.brightColor }, + 'Hello, ', + name, + '!', + ), + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'p', + null, + 'Say hello to:', + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('input', { + type: 'text', + ref: this.setNameDomRef, + defaultValue: name, + onChange: this.handleChange, + }), + ), + railsContext && + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_2__RailsContext__['a' /* default */], + { railsContext: railsContext }, + ), + ); + }, + }, + ]); + + return HelloWorld; + })(__WEBPACK_IMPORTED_MODULE_1_react___default.a.Component); + + HelloWorld.propTypes = { + helloWorldData: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.shape({ + name: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string, + }).isRequired, + railsContext: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object, + }; + var _default = HelloWorld; + + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + HelloWorld, + 'HelloWorld', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/HelloWorld.jsx', + ); + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/HelloWorld.jsx', + ); + })(); + + /***/ + }, + /* 162 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__components_Provider__ = __webpack_require__(569); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__components_connectAdvanced__ = + __webpack_require__(246); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__connect_connect__ = __webpack_require__(573); + /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, 'a', function () { + return __WEBPACK_IMPORTED_MODULE_0__components_Provider__['a']; + }); + /* unused harmony reexport createProvider */ + /* unused harmony reexport connectAdvanced */ + /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, 'b', function () { + return __WEBPACK_IMPORTED_MODULE_2__connect_connect__['a']; + }); + + /***/ + }, + /* 163 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = warning; + /** + * Prints a warning in the console if it exists. + * + * @param {String} message The warning message. + * @returns {void} + */ + function warning(message) { + /* eslint-disable no-console */ + if (typeof console !== 'undefined' && typeof console.error === 'function') { + console.error(message); + } + /* eslint-enable no-console */ + + try { + // This error was thrown as a convenience so that if you enable + // "break on all exceptions" in your console, + // it would pause the execution at this line. + throw new Error(message); + /* eslint-disable no-empty */ + } catch (e) {} + /* eslint-enable no-empty */ + } + + /***/ + }, + /* 164 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = _extends; + function _extends() { + _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + + return target; + }; + + return _extends.apply(this, arguments); + } + + /***/ + }, + /* 165 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = _objectWithoutPropertiesLoose; + function _objectWithoutPropertiesLoose(source, excluded) { + if (source == null) return {}; + var target = {}; + var sourceKeys = Object.keys(source); + var key, i; + + for (i = 0; i < sourceKeys.length; i++) { + key = sourceKeys[i]; + if (excluded.indexOf(key) >= 0) continue; + target[key] = source[key]; + } + + return target; + } + + /***/ + }, + /* 166 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = loopAsync; + /* harmony export (immutable) */ __webpack_exports__['b'] = mapAsync; + function loopAsync(turns, work, callback) { + var currentTurn = 0, + isDone = false; + var sync = false, + hasNext = false, + doneArgs = void 0; + + function done() { + isDone = true; + if (sync) { + // Iterate instead of recursing if possible. + doneArgs = [].concat(Array.prototype.slice.call(arguments)); + return; + } + + callback.apply(this, arguments); + } + + function next() { + if (isDone) { + return; + } + + hasNext = true; + if (sync) { + // Iterate instead of recursing if possible. + return; + } + + sync = true; + + while (!isDone && currentTurn < turns && hasNext) { + hasNext = false; + work.call(this, currentTurn++, next, done); + } + + sync = false; + + if (isDone) { + // This means the loop finished synchronously. + callback.apply(this, doneArgs); + return; + } + + if (currentTurn >= turns && hasNext) { + isDone = true; + callback(); + } + } + + next(); + } + + function mapAsync(array, work, callback) { + var length = array.length; + var values = []; + + if (length === 0) return callback(null, values); + + var isDone = false, + doneCount = 0; + + function done(index, error, value) { + if (isDone) return; + + if (error) { + isDone = true; + callback(error); + } else { + values[index] = value; + + isDone = ++doneCount === length; + + if (isDone) callback(null, values); + } + } + + array.forEach(function (item, index) { + work(item, index, function (error, value) { + done(index, error, value); + }); + }); + } + + /***/ + }, + /* 167 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant__ = __webpack_require__(14); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_invariant__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_create_react_class__ = __webpack_require__(37); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_create_react_class___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_create_react_class__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types__ = __webpack_require__(10); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_3_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__getRouteParams__ = __webpack_require__(594); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__ContextUtils__ = __webpack_require__(168); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__RouteUtils__ = __webpack_require__(47); + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + var _typeof = + typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' + ? function (obj) { + return typeof obj; + } + : function (obj) { + return obj && + typeof Symbol === 'function' && + obj.constructor === Symbol && + obj !== Symbol.prototype + ? 'symbol' + : typeof obj; + }; + + /** + * A <RouterContext> renders the component tree for a given router state + * and sets the history object and the current location in context. + */ + var RouterContext = __WEBPACK_IMPORTED_MODULE_2_create_react_class___default()({ + displayName: 'RouterContext', + + mixins: [Object(__WEBPACK_IMPORTED_MODULE_5__ContextUtils__['a' /* ContextProvider */])('router')], + + propTypes: { + router: __WEBPACK_IMPORTED_MODULE_3_prop_types__['object'].isRequired, + location: __WEBPACK_IMPORTED_MODULE_3_prop_types__['object'].isRequired, + routes: __WEBPACK_IMPORTED_MODULE_3_prop_types__['array'].isRequired, + params: __WEBPACK_IMPORTED_MODULE_3_prop_types__['object'].isRequired, + components: __WEBPACK_IMPORTED_MODULE_3_prop_types__['array'].isRequired, + createElement: __WEBPACK_IMPORTED_MODULE_3_prop_types__['func'].isRequired, + }, + + getDefaultProps: function getDefaultProps() { + return { + createElement: __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement, + }; + }, + + childContextTypes: { + router: __WEBPACK_IMPORTED_MODULE_3_prop_types__['object'].isRequired, + }, + + getChildContext: function getChildContext() { + return { + router: this.props.router, + }; + }, + createElement: function createElement(component, props) { + return component == null ? null : this.props.createElement(component, props); + }, + render: function render() { + var _this = this; + + var _props = this.props, + location = _props.location, + routes = _props.routes, + params = _props.params, + components = _props.components, + router = _props.router; + + var element = null; + + if (components) { + element = components.reduceRight(function (element, components, index) { + if (components == null) return element; // Don't create new children; use the grandchildren. + + var route = routes[index]; + var routeParams = Object(__WEBPACK_IMPORTED_MODULE_4__getRouteParams__['a' /* default */])( + route, + params, + ); + var props = { + location: location, + params: params, + route: route, + router: router, + routeParams: routeParams, + routes: routes, + }; + + if (Object(__WEBPACK_IMPORTED_MODULE_6__RouteUtils__['c' /* isReactChildren */])(element)) { + props.children = element; + } else if (element) { + for (var prop in element) { + if (Object.prototype.hasOwnProperty.call(element, prop)) props[prop] = element[prop]; + } + } + + if ((typeof components === 'undefined' ? 'undefined' : _typeof(components)) === 'object') { + var elements = {}; + + for (var key in components) { + if (Object.prototype.hasOwnProperty.call(components, key)) { + // Pass through the key as a prop to createElement to allow + // custom createElement functions to know which named component + // they're rendering, for e.g. matching up to fetched data. + elements[key] = _this.createElement( + components[key], + _extends( + { + key: key, + }, + props, + ), + ); + } + } + + return elements; + } + + return _this.createElement(components, props); + }, element); + } + + !( + element === null || + element === false || + __WEBPACK_IMPORTED_MODULE_1_react___default.a.isValidElement(element) + ) + ? true + ? __WEBPACK_IMPORTED_MODULE_0_invariant___default()( + false, + 'The root route must render a single element', + ) + : invariant(false) + : void 0; + + return element; + }, + }); + + /* harmony default export */ __webpack_exports__['a'] = RouterContext; + + /***/ + }, + /* 168 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = ContextProvider; + /* harmony export (immutable) */ __webpack_exports__['b'] = ContextSubscriber; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(10); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + + // Works around issues with context updates failing to propagate. + // Caveat: the context value is expected to never change its identity. + // https://github.com/facebook/react/issues/2517 + // https://github.com/reactjs/react-router/issues/470 + + var contextProviderShape = __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.shape({ + subscribe: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired, + eventIndex: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number.isRequired, + }); + + function makeContextName(name) { + return '@@contextSubscriber/' + name; + } + + function ContextProvider(name) { + var _childContextTypes, _ref2; + + var contextName = makeContextName(name); + var listenersKey = contextName + '/listeners'; + var eventIndexKey = contextName + '/eventIndex'; + var subscribeKey = contextName + '/subscribe'; + + return ( + (_ref2 = { + childContextTypes: + ((_childContextTypes = {}), + (_childContextTypes[contextName] = contextProviderShape.isRequired), + _childContextTypes), + + getChildContext: function getChildContext() { + var _ref; + + return ( + (_ref = {}), + (_ref[contextName] = { + eventIndex: this[eventIndexKey], + subscribe: this[subscribeKey], + }), + _ref + ); + }, + componentWillMount: function componentWillMount() { + this[listenersKey] = []; + this[eventIndexKey] = 0; + }, + componentWillReceiveProps: function componentWillReceiveProps() { + this[eventIndexKey]++; + }, + componentDidUpdate: function componentDidUpdate() { + var _this = this; + + this[listenersKey].forEach(function (listener) { + return listener(_this[eventIndexKey]); + }); + }, + }), + (_ref2[subscribeKey] = function (listener) { + var _this2 = this; + + // No need to immediately call listener here. + this[listenersKey].push(listener); + + return function () { + _this2[listenersKey] = _this2[listenersKey].filter(function (item) { + return item !== listener; + }); + }; + }), + _ref2 + ); + } + + function ContextSubscriber(name) { + var _contextTypes, _ref4; + + var contextName = makeContextName(name); + var lastRenderedEventIndexKey = contextName + '/lastRenderedEventIndex'; + var handleContextUpdateKey = contextName + '/handleContextUpdate'; + var unsubscribeKey = contextName + '/unsubscribe'; + + return ( + (_ref4 = { + contextTypes: + ((_contextTypes = {}), (_contextTypes[contextName] = contextProviderShape), _contextTypes), + + getInitialState: function getInitialState() { + var _ref3; + + if (!this.context[contextName]) { + return {}; + } + + return ( + (_ref3 = {}), (_ref3[lastRenderedEventIndexKey] = this.context[contextName].eventIndex), _ref3 + ); + }, + componentDidMount: function componentDidMount() { + if (!this.context[contextName]) { + return; + } + + this[unsubscribeKey] = this.context[contextName].subscribe(this[handleContextUpdateKey]); + }, + componentWillReceiveProps: function componentWillReceiveProps() { + var _setState; + + if (!this.context[contextName]) { + return; + } + + this.setState( + ((_setState = {}), + (_setState[lastRenderedEventIndexKey] = this.context[contextName].eventIndex), + _setState), + ); + }, + componentWillUnmount: function componentWillUnmount() { + if (!this[unsubscribeKey]) { + return; + } + + this[unsubscribeKey](); + this[unsubscribeKey] = null; + }, + }), + (_ref4[handleContextUpdateKey] = function (eventIndex) { + if (eventIndex !== this.state[lastRenderedEventIndexKey]) { + var _setState2; + + this.setState( + ((_setState2 = {}), (_setState2[lastRenderedEventIndexKey] = eventIndex), _setState2), + ); + } + }), + _ref4 + ); + } + + /***/ + }, + /* 169 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'a', function () { + return routerShape; + }); + /* unused harmony export locationShape */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(10); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + + var routerShape = Object(__WEBPACK_IMPORTED_MODULE_0_prop_types__['shape'])({ + push: __WEBPACK_IMPORTED_MODULE_0_prop_types__['func'].isRequired, + replace: __WEBPACK_IMPORTED_MODULE_0_prop_types__['func'].isRequired, + go: __WEBPACK_IMPORTED_MODULE_0_prop_types__['func'].isRequired, + goBack: __WEBPACK_IMPORTED_MODULE_0_prop_types__['func'].isRequired, + goForward: __WEBPACK_IMPORTED_MODULE_0_prop_types__['func'].isRequired, + setRouteLeaveHook: __WEBPACK_IMPORTED_MODULE_0_prop_types__['func'].isRequired, + isActive: __WEBPACK_IMPORTED_MODULE_0_prop_types__['func'].isRequired, + }); + + var locationShape = Object(__WEBPACK_IMPORTED_MODULE_0_prop_types__['shape'])({ + pathname: __WEBPACK_IMPORTED_MODULE_0_prop_types__['string'].isRequired, + search: __WEBPACK_IMPORTED_MODULE_0_prop_types__['string'].isRequired, + state: __WEBPACK_IMPORTED_MODULE_0_prop_types__['object'], + action: __WEBPACK_IMPORTED_MODULE_0_prop_types__['string'].isRequired, + key: __WEBPACK_IMPORTED_MODULE_0_prop_types__['string'], + }); + + /***/ + }, + /* 170 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + + var _warning = __webpack_require__(46); + + var _warning2 = _interopRequireDefault(_warning); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + var runTransitionHook = function runTransitionHook(hook, location, callback) { + var result = hook(location, callback); + + if (hook.length < 2) { + // Assume the hook runs synchronously and automatically + // call the callback with the return value. + callback(result); + } else { + true + ? (0, _warning2.default)( + result === undefined, + 'You should not "return" in a transition hook with a callback argument; ' + + 'call the callback instead', + ) + : void 0; + } + }; + + exports.default = runTransitionHook; + + /***/ + }, + /* 171 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + + var _AsyncUtils = __webpack_require__(605); + + var _PathUtils = __webpack_require__(48); + + var _runTransitionHook = __webpack_require__(170); + + var _runTransitionHook2 = _interopRequireDefault(_runTransitionHook); + + var _Actions = __webpack_require__(110); + + var _LocationUtils = __webpack_require__(72); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + var createHistory = function createHistory() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + var getCurrentLocation = options.getCurrentLocation, + getUserConfirmation = options.getUserConfirmation, + pushLocation = options.pushLocation, + replaceLocation = options.replaceLocation, + go = options.go, + keyLength = options.keyLength; + + var currentLocation = void 0; + var pendingLocation = void 0; + var beforeListeners = []; + var listeners = []; + var allKeys = []; + + var getCurrentIndex = function getCurrentIndex() { + if (pendingLocation && pendingLocation.action === _Actions.POP) + return allKeys.indexOf(pendingLocation.key); + + if (currentLocation) return allKeys.indexOf(currentLocation.key); + + return -1; + }; + + var updateLocation = function updateLocation(nextLocation) { + var currentIndex = getCurrentIndex(); + + currentLocation = nextLocation; + + if (currentLocation.action === _Actions.PUSH) { + allKeys = [].concat(allKeys.slice(0, currentIndex + 1), [currentLocation.key]); + } else if (currentLocation.action === _Actions.REPLACE) { + allKeys[currentIndex] = currentLocation.key; + } + + listeners.forEach(function (listener) { + return listener(currentLocation); + }); + }; + + var listenBefore = function listenBefore(listener) { + beforeListeners.push(listener); + + return function () { + return (beforeListeners = beforeListeners.filter(function (item) { + return item !== listener; + })); + }; + }; + + var listen = function listen(listener) { + listeners.push(listener); + + return function () { + return (listeners = listeners.filter(function (item) { + return item !== listener; + })); + }; + }; + + var confirmTransitionTo = function confirmTransitionTo(location, callback) { + (0, _AsyncUtils.loopAsync)( + beforeListeners.length, + function (index, next, done) { + (0, _runTransitionHook2.default)(beforeListeners[index], location, function (result) { + return result != null ? done(result) : next(); + }); + }, + function (message) { + if (getUserConfirmation && typeof message === 'string') { + getUserConfirmation(message, function (ok) { + return callback(ok !== false); + }); + } else { + callback(message !== false); + } + }, + ); + }; + + var transitionTo = function transitionTo(nextLocation) { + if ( + (currentLocation && (0, _LocationUtils.locationsAreEqual)(currentLocation, nextLocation)) || + (pendingLocation && (0, _LocationUtils.locationsAreEqual)(pendingLocation, nextLocation)) + ) + return; // Nothing to do + + pendingLocation = nextLocation; + + confirmTransitionTo(nextLocation, function (ok) { + if (pendingLocation !== nextLocation) return; // Transition was interrupted during confirmation + + pendingLocation = null; + + if (ok) { + // Treat PUSH to same path like REPLACE to be consistent with browsers + if (nextLocation.action === _Actions.PUSH) { + var prevPath = (0, _PathUtils.createPath)(currentLocation); + var nextPath = (0, _PathUtils.createPath)(nextLocation); + + if ( + nextPath === prevPath && + (0, _LocationUtils.statesAreEqual)(currentLocation.state, nextLocation.state) + ) + nextLocation.action = _Actions.REPLACE; + } + + if (nextLocation.action === _Actions.POP) { + updateLocation(nextLocation); + } else if (nextLocation.action === _Actions.PUSH) { + if (pushLocation(nextLocation) !== false) updateLocation(nextLocation); + } else if (nextLocation.action === _Actions.REPLACE) { + if (replaceLocation(nextLocation) !== false) updateLocation(nextLocation); + } + } else if (currentLocation && nextLocation.action === _Actions.POP) { + var prevIndex = allKeys.indexOf(currentLocation.key); + var nextIndex = allKeys.indexOf(nextLocation.key); + + if (prevIndex !== -1 && nextIndex !== -1) go(prevIndex - nextIndex); // Restore the URL + } + }); + }; + + var push = function push(input) { + return transitionTo(createLocation(input, _Actions.PUSH)); + }; + + var replace = function replace(input) { + return transitionTo(createLocation(input, _Actions.REPLACE)); + }; + + var goBack = function goBack() { + return go(-1); + }; + + var goForward = function goForward() { + return go(1); + }; + + var createKey = function createKey() { + return Math.random() + .toString(36) + .substr(2, keyLength || 6); + }; + + var createHref = function createHref(location) { + return (0, _PathUtils.createPath)(location); + }; + + var createLocation = function createLocation(location, action) { + var key = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : createKey(); + return (0, _LocationUtils.createLocation)(location, action, key); + }; + + return { + getCurrentLocation: getCurrentLocation, + listenBefore: listenBefore, + listen: listen, + transitionTo: transitionTo, + push: push, + replace: replace, + go: go, + goBack: goBack, + goForward: goForward, + createKey: createKey, + createPath: _PathUtils.createPath, + createHref: createHref, + createLocation: createLocation, + }; + }; + + exports.default = createHistory; + + /***/ + }, + /* 172 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + var canUseDOM = (exports.canUseDOM = !!( + typeof window !== 'undefined' && + window.document && + window.document.createElement + )); + + /***/ + }, + /* 173 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + exports.go = + exports.replaceLocation = + exports.pushLocation = + exports.startListener = + exports.getUserConfirmation = + exports.getCurrentLocation = + undefined; + + var _LocationUtils = __webpack_require__(72); + + var _DOMUtils = __webpack_require__(111); + + var _DOMStateStorage = __webpack_require__(262); + + var _PathUtils = __webpack_require__(48); + + var _ExecutionEnvironment = __webpack_require__(172); + + var PopStateEvent = 'popstate'; + var HashChangeEvent = 'hashchange'; + + var needsHashchangeListener = + _ExecutionEnvironment.canUseDOM && !(0, _DOMUtils.supportsPopstateOnHashchange)(); + + var _createLocation = function _createLocation(historyState) { + var key = historyState && historyState.key; + + return (0, _LocationUtils.createLocation)( + { + pathname: window.location.pathname, + search: window.location.search, + hash: window.location.hash, + state: key ? (0, _DOMStateStorage.readState)(key) : undefined, + }, + undefined, + key, + ); + }; + + var getCurrentLocation = (exports.getCurrentLocation = function getCurrentLocation() { + var historyState = void 0; + try { + historyState = window.history.state || {}; + } catch (error) { + // IE 11 sometimes throws when accessing window.history.state + // See https://github.com/ReactTraining/history/pull/289 + historyState = {}; + } + + return _createLocation(historyState); + }); + + var getUserConfirmation = (exports.getUserConfirmation = function getUserConfirmation( + message, + callback, + ) { + return callback(window.confirm(message)); + }); // eslint-disable-line no-alert + + var startListener = (exports.startListener = function startListener(listener) { + var handlePopState = function handlePopState(event) { + if ((0, _DOMUtils.isExtraneousPopstateEvent)(event)) + // Ignore extraneous popstate events in WebKit + return; + listener(_createLocation(event.state)); + }; + + (0, _DOMUtils.addEventListener)(window, PopStateEvent, handlePopState); + + var handleUnpoppedHashChange = function handleUnpoppedHashChange() { + return listener(getCurrentLocation()); + }; + + if (needsHashchangeListener) { + (0, _DOMUtils.addEventListener)(window, HashChangeEvent, handleUnpoppedHashChange); + } + + return function () { + (0, _DOMUtils.removeEventListener)(window, PopStateEvent, handlePopState); + + if (needsHashchangeListener) { + (0, _DOMUtils.removeEventListener)(window, HashChangeEvent, handleUnpoppedHashChange); + } + }; + }); + + var updateLocation = function updateLocation(location, updateState) { + var state = location.state, + key = location.key; + + if (state !== undefined) (0, _DOMStateStorage.saveState)(key, state); + + updateState({ key: key }, (0, _PathUtils.createPath)(location)); + }; + + var pushLocation = (exports.pushLocation = function pushLocation(location) { + return updateLocation(location, function (state, path) { + return window.history.pushState(state, null, path); + }); + }); + + var replaceLocation = (exports.replaceLocation = function replaceLocation(location) { + return updateLocation(location, function (state, path) { + return window.history.replaceState(state, null, path); + }); + }); + + var go = (exports.go = function go(n) { + if (n) window.history.go(n); + }); + + /***/ + }, + /* 174 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = + !__webpack_require__(8) && + !__webpack_require__(4)(function () { + return ( + Object.defineProperty(__webpack_require__(112)('div'), 'a', { + get: function () { + return 7; + }, + }).a != 7 + ); + }); + + /***/ + }, + /* 175 */ + /***/ function (module, exports, __webpack_require__) { + exports.f = __webpack_require__(6); + + /***/ + }, + /* 176 */ + /***/ function (module, exports, __webpack_require__) { + var has = __webpack_require__(18); + var toIObject = __webpack_require__(19); + var arrayIndexOf = __webpack_require__(86)(false); + var IE_PROTO = __webpack_require__(114)('IE_PROTO'); + + module.exports = function (object, names) { + var O = toIObject(object); + var i = 0; + var result = []; + var key; + for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key); + // Don't enum bug & hidden keys + while (names.length > i) + if (has(O, (key = names[i++]))) { + ~arrayIndexOf(result, key) || result.push(key); + } + return result; + }; + + /***/ + }, + /* 177 */ + /***/ function (module, exports, __webpack_require__) { + var dP = __webpack_require__(9); + var anObject = __webpack_require__(2); + var getKeys = __webpack_require__(51); + + module.exports = __webpack_require__(8) + ? Object.defineProperties + : function defineProperties(O, Properties) { + anObject(O); + var keys = getKeys(Properties); + var length = keys.length; + var i = 0; + var P; + while (length > i) dP.f(O, (P = keys[i++]), Properties[P]); + return O; + }; + + /***/ + }, + /* 178 */ + /***/ function (module, exports, __webpack_require__) { + // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window + var toIObject = __webpack_require__(19); + var gOPN = __webpack_require__(54).f; + var toString = {}.toString; + + var windowNames = + typeof window == 'object' && window && Object.getOwnPropertyNames + ? Object.getOwnPropertyNames(window) + : []; + + var getWindowNames = function (it) { + try { + return gOPN(it); + } catch (e) { + return windowNames.slice(); + } + }; + + module.exports.f = function getOwnPropertyNames(it) { + return windowNames && toString.call(it) == '[object Window]' + ? getWindowNames(it) + : gOPN(toIObject(it)); + }; + + /***/ + }, + /* 179 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // 19.1.2.1 Object.assign(target, source, ...) + var DESCRIPTORS = __webpack_require__(8); + var getKeys = __webpack_require__(51); + var gOPS = __webpack_require__(87); + var pIE = __webpack_require__(75); + var toObject = __webpack_require__(11); + var IObject = __webpack_require__(74); + var $assign = Object.assign; + + // should work with symbols and should have deterministic property order (V8 bug) + module.exports = + !$assign || + __webpack_require__(4)(function () { + var A = {}; + var B = {}; + // eslint-disable-next-line no-undef + var S = Symbol(); + var K = 'abcdefghijklmnopqrst'; + A[S] = 7; + K.split('').forEach(function (k) { + B[k] = k; + }); + return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K; + }) + ? function assign(target, source) { + // eslint-disable-line no-unused-vars + var T = toObject(target); + var aLen = arguments.length; + var index = 1; + var getSymbols = gOPS.f; + var isEnum = pIE.f; + while (aLen > index) { + var S = IObject(arguments[index++]); + var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S); + var length = keys.length; + var j = 0; + var key; + while (length > j) { + key = keys[j++]; + if (!DESCRIPTORS || isEnum.call(S, key)) T[key] = S[key]; + } + } + return T; + } + : $assign; + + /***/ + }, + /* 180 */ + /***/ function (module, exports) { + // 7.2.9 SameValue(x, y) + module.exports = + Object.is || + function is(x, y) { + // eslint-disable-next-line no-self-compare + return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y; + }; + + /***/ + }, + /* 181 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var aFunction = __webpack_require__(12); + var isObject = __webpack_require__(5); + var invoke = __webpack_require__(182); + var arraySlice = [].slice; + var factories = {}; + + var construct = function (F, len, args) { + if (!(len in factories)) { + for (var n = [], i = 0; i < len; i++) n[i] = 'a[' + i + ']'; + // eslint-disable-next-line no-new-func + factories[len] = Function('F,a', 'return new F(' + n.join(',') + ')'); + } + return factories[len](F, args); + }; + + module.exports = + Function.bind || + function bind(that /* , ...args */) { + var fn = aFunction(this); + var partArgs = arraySlice.call(arguments, 1); + var bound = function (/* args... */) { + var args = partArgs.concat(arraySlice.call(arguments)); + return this instanceof bound ? construct(fn, args.length, args) : invoke(fn, args, that); + }; + if (isObject(fn.prototype)) bound.prototype = fn.prototype; + return bound; + }; + + /***/ + }, + /* 182 */ + /***/ function (module, exports) { + // fast apply, http://jsperf.lnkit.com/fast-apply/5 + module.exports = function (fn, args, that) { + var un = that === undefined; + switch (args.length) { + case 0: + return un ? fn() : fn.call(that); + case 1: + return un ? fn(args[0]) : fn.call(that, args[0]); + case 2: + return un ? fn(args[0], args[1]) : fn.call(that, args[0], args[1]); + case 3: + return un ? fn(args[0], args[1], args[2]) : fn.call(that, args[0], args[1], args[2]); + case 4: + return un + ? fn(args[0], args[1], args[2], args[3]) + : fn.call(that, args[0], args[1], args[2], args[3]); + } + return fn.apply(that, args); + }; + + /***/ + }, + /* 183 */ + /***/ function (module, exports, __webpack_require__) { + var $parseInt = __webpack_require__(3).parseInt; + var $trim = __webpack_require__(66).trim; + var ws = __webpack_require__(118); + var hex = /^[-+]?0[xX]/; + + module.exports = + $parseInt(ws + '08') !== 8 || $parseInt(ws + '0x16') !== 22 + ? function parseInt(str, radix) { + var string = $trim(String(str), 3); + return $parseInt(string, radix >>> 0 || (hex.test(string) ? 16 : 10)); + } + : $parseInt; + + /***/ + }, + /* 184 */ + /***/ function (module, exports, __webpack_require__) { + var $parseFloat = __webpack_require__(3).parseFloat; + var $trim = __webpack_require__(66).trim; + + module.exports = + 1 / $parseFloat(__webpack_require__(118) + '-0') !== -Infinity + ? function parseFloat(str) { + var string = $trim(String(str), 3); + var result = $parseFloat(string); + return result === 0 && string.charAt(0) == '-' ? -0 : result; + } + : $parseFloat; + + /***/ + }, + /* 185 */ + /***/ function (module, exports, __webpack_require__) { + var cof = __webpack_require__(25); + module.exports = function (it, msg) { + if (typeof it != 'number' && cof(it) != 'Number') throw TypeError(msg); + return +it; + }; + + /***/ + }, + /* 186 */ + /***/ function (module, exports, __webpack_require__) { + // 20.1.2.3 Number.isInteger(number) + var isObject = __webpack_require__(5); + var floor = Math.floor; + module.exports = function isInteger(it) { + return !isObject(it) && isFinite(it) && floor(it) === it; + }; + + /***/ + }, + /* 187 */ + /***/ function (module, exports) { + // 20.2.2.20 Math.log1p(x) + module.exports = + Math.log1p || + function log1p(x) { + return (x = +x) > -1e-8 && x < 1e-8 ? x - (x * x) / 2 : Math.log(1 + x); + }; + + /***/ + }, + /* 188 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.16 Math.fround(x) + var sign = __webpack_require__(121); + var pow = Math.pow; + var EPSILON = pow(2, -52); + var EPSILON32 = pow(2, -23); + var MAX32 = pow(2, 127) * (2 - EPSILON32); + var MIN32 = pow(2, -126); + + var roundTiesToEven = function (n) { + return n + 1 / EPSILON - 1 / EPSILON; + }; + + module.exports = + Math.fround || + function fround(x) { + var $abs = Math.abs(x); + var $sign = sign(x); + var a, result; + if ($abs < MIN32) return $sign * roundTiesToEven($abs / MIN32 / EPSILON32) * MIN32 * EPSILON32; + a = (1 + EPSILON32 / EPSILON) * $abs; + result = a - (a - $abs); + // eslint-disable-next-line no-self-compare + if (result > MAX32 || result != result) return $sign * Infinity; + return $sign * result; + }; + + /***/ + }, + /* 189 */ + /***/ function (module, exports, __webpack_require__) { + // call something on iterator step with safe closing on error + var anObject = __webpack_require__(2); + module.exports = function (iterator, fn, value, entries) { + try { + return entries ? fn(anObject(value)[0], value[1]) : fn(value); + // 7.4.6 IteratorClose(iterator, completion) + } catch (e) { + var ret = iterator['return']; + if (ret !== undefined) anObject(ret.call(iterator)); + throw e; + } + }; + + /***/ + }, + /* 190 */ + /***/ function (module, exports, __webpack_require__) { + var aFunction = __webpack_require__(12); + var toObject = __webpack_require__(11); + var IObject = __webpack_require__(74); + var toLength = __webpack_require__(7); + + module.exports = function (that, callbackfn, aLen, memo, isRight) { + aFunction(callbackfn); + var O = toObject(that); + var self = IObject(O); + var length = toLength(O.length); + var index = isRight ? length - 1 : 0; + var i = isRight ? -1 : 1; + if (aLen < 2) + for (;;) { + if (index in self) { + memo = self[index]; + index += i; + break; + } + index += i; + if (isRight ? index < 0 : length <= index) { + throw TypeError('Reduce of empty array with no initial value'); + } + } + for (; isRight ? index >= 0 : length > index; index += i) + if (index in self) { + memo = callbackfn(memo, self[index], index, O); + } + return memo; + }; + + /***/ + }, + /* 191 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + // 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length) + + var toObject = __webpack_require__(11); + var toAbsoluteIndex = __webpack_require__(52); + var toLength = __webpack_require__(7); + + module.exports = + [].copyWithin || + function copyWithin(target /* = 0 */, start /* = 0, end = @length */) { + var O = toObject(this); + var len = toLength(O.length); + var to = toAbsoluteIndex(target, len); + var from = toAbsoluteIndex(start, len); + var end = arguments.length > 2 ? arguments[2] : undefined; + var count = Math.min((end === undefined ? len : toAbsoluteIndex(end, len)) - from, len - to); + var inc = 1; + if (from < to && to < from + count) { + inc = -1; + from += count - 1; + to += count - 1; + } + while (count-- > 0) { + if (from in O) O[to] = O[from]; + else delete O[to]; + to += inc; + from += inc; + } + return O; + }; + + /***/ + }, + /* 192 */ + /***/ function (module, exports) { + module.exports = function (done, value) { + return { value: value, done: !!done }; + }; + + /***/ + }, + /* 193 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var regexpExec = __webpack_require__(133); + __webpack_require__(0)( + { + target: 'RegExp', + proto: true, + forced: regexpExec !== /./.exec, + }, + { + exec: regexpExec, + }, + ); + + /***/ + }, + /* 194 */ + /***/ function (module, exports, __webpack_require__) { + // 21.2.5.3 get RegExp.prototype.flags() + if (__webpack_require__(8) && /./g.flags != 'g') + __webpack_require__(9).f(RegExp.prototype, 'flags', { + configurable: true, + get: __webpack_require__(76), + }); + + /***/ + }, + /* 195 */ + /***/ function (module, exports) { + module.exports = function (exec) { + try { + return { e: false, v: exec() }; + } catch (e) { + return { e: true, v: e }; + } + }; + + /***/ + }, + /* 196 */ + /***/ function (module, exports, __webpack_require__) { + var anObject = __webpack_require__(2); + var isObject = __webpack_require__(5); + var newPromiseCapability = __webpack_require__(137); + + module.exports = function (C, x) { + anObject(C); + if (isObject(x) && x.constructor === C) return x; + var promiseCapability = newPromiseCapability.f(C); + var resolve = promiseCapability.resolve; + resolve(x); + return promiseCapability.promise; + }; + + /***/ + }, + /* 197 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var strong = __webpack_require__(198); + var validate = __webpack_require__(59); + var MAP = 'Map'; + + // 23.1 Map Objects + module.exports = __webpack_require__(95)( + MAP, + function (get) { + return function Map() { + return get(this, arguments.length > 0 ? arguments[0] : undefined); + }; + }, + { + // 23.1.3.6 Map.prototype.get(key) + get: function get(key) { + var entry = strong.getEntry(validate(this, MAP), key); + return entry && entry.v; + }, + // 23.1.3.9 Map.prototype.set(key, value) + set: function set(key, value) { + return strong.def(validate(this, MAP), key === 0 ? 0 : key, value); + }, + }, + strong, + true, + ); + + /***/ + }, + /* 198 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var dP = __webpack_require__(9).f; + var create = __webpack_require__(53); + var redefineAll = __webpack_require__(58); + var ctx = __webpack_require__(24); + var anInstance = __webpack_require__(56); + var forOf = __webpack_require__(57); + var $iterDefine = __webpack_require__(123); + var step = __webpack_require__(192); + var setSpecies = __webpack_require__(55); + var DESCRIPTORS = __webpack_require__(8); + var fastKey = __webpack_require__(42).fastKey; + var validate = __webpack_require__(59); + var SIZE = DESCRIPTORS ? '_s' : 'size'; + + var getEntry = function (that, key) { + // fast case + var index = fastKey(key); + var entry; + if (index !== 'F') return that._i[index]; + // frozen object case + for (entry = that._f; entry; entry = entry.n) { + if (entry.k == key) return entry; + } + }; + + module.exports = { + getConstructor: function (wrapper, NAME, IS_MAP, ADDER) { + var C = wrapper(function (that, iterable) { + anInstance(that, C, NAME, '_i'); + that._t = NAME; // collection type + that._i = create(null); // index + that._f = undefined; // first entry + that._l = undefined; // last entry + that[SIZE] = 0; // size + if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that); + }); + redefineAll(C.prototype, { + // 23.1.3.1 Map.prototype.clear() + // 23.2.3.2 Set.prototype.clear() + clear: function clear() { + for (var that = validate(this, NAME), data = that._i, entry = that._f; entry; entry = entry.n) { + entry.r = true; + if (entry.p) entry.p = entry.p.n = undefined; + delete data[entry.i]; + } + that._f = that._l = undefined; + that[SIZE] = 0; + }, + // 23.1.3.3 Map.prototype.delete(key) + // 23.2.3.4 Set.prototype.delete(value) + delete: function (key) { + var that = validate(this, NAME); + var entry = getEntry(that, key); + if (entry) { + var next = entry.n; + var prev = entry.p; + delete that._i[entry.i]; + entry.r = true; + if (prev) prev.n = next; + if (next) next.p = prev; + if (that._f == entry) that._f = next; + if (that._l == entry) that._l = prev; + that[SIZE]--; + } + return !!entry; + }, + // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined) + // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined) + forEach: function forEach(callbackfn /* , that = undefined */) { + validate(this, NAME); + var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3); + var entry; + while ((entry = entry ? entry.n : this._f)) { + f(entry.v, entry.k, this); + // revert to the last existing entry + while (entry && entry.r) entry = entry.p; + } + }, + // 23.1.3.7 Map.prototype.has(key) + // 23.2.3.7 Set.prototype.has(value) + has: function has(key) { + return !!getEntry(validate(this, NAME), key); + }, + }); + if (DESCRIPTORS) + dP(C.prototype, 'size', { + get: function () { + return validate(this, NAME)[SIZE]; + }, + }); + return C; + }, + def: function (that, key, value) { + var entry = getEntry(that, key); + var prev, index; + // change existing entry + if (entry) { + entry.v = value; + // create new entry + } else { + that._l = entry = { + i: (index = fastKey(key, true)), // <- index + k: key, // <- key + v: value, // <- value + p: (prev = that._l), // <- previous entry + n: undefined, // <- next entry + r: false, // <- removed + }; + if (!that._f) that._f = entry; + if (prev) prev.n = entry; + that[SIZE]++; + // add to index + if (index !== 'F') that._i[index] = entry; + } + return that; + }, + getEntry: getEntry, + setStrong: function (C, NAME, IS_MAP) { + // add .keys, .values, .entries, [@@iterator] + // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11 + $iterDefine( + C, + NAME, + function (iterated, kind) { + this._t = validate(iterated, NAME); // target + this._k = kind; // kind + this._l = undefined; // previous + }, + function () { + var that = this; + var kind = that._k; + var entry = that._l; + // revert to the last existing entry + while (entry && entry.r) entry = entry.p; + // get next entry + if (!that._t || !(that._l = entry = entry ? entry.n : that._t._f)) { + // or finish the iteration + that._t = undefined; + return step(1); + } + // return step by kind + if (kind == 'keys') return step(0, entry.k); + if (kind == 'values') return step(0, entry.v); + return step(0, [entry.k, entry.v]); + }, + IS_MAP ? 'entries' : 'values', + !IS_MAP, + true, + ); + + // add [@@species], 23.1.2.2, 23.2.2.2 + setSpecies(NAME); + }, + }; + + /***/ + }, + /* 199 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var strong = __webpack_require__(198); + var validate = __webpack_require__(59); + var SET = 'Set'; + + // 23.2 Set Objects + module.exports = __webpack_require__(95)( + SET, + function (get) { + return function Set() { + return get(this, arguments.length > 0 ? arguments[0] : undefined); + }; + }, + { + // 23.2.3.1 Set.prototype.add(value) + add: function add(value) { + return strong.def(validate(this, SET), (value = value === 0 ? 0 : value), value); + }, + }, + strong, + ); + + /***/ + }, + /* 200 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var global = __webpack_require__(3); + var each = __webpack_require__(34)(0); + var redefine = __webpack_require__(16); + var meta = __webpack_require__(42); + var assign = __webpack_require__(179); + var weak = __webpack_require__(201); + var isObject = __webpack_require__(5); + var validate = __webpack_require__(59); + var NATIVE_WEAK_MAP = __webpack_require__(59); + var IS_IE11 = !global.ActiveXObject && 'ActiveXObject' in global; + var WEAK_MAP = 'WeakMap'; + var getWeak = meta.getWeak; + var isExtensible = Object.isExtensible; + var uncaughtFrozenStore = weak.ufstore; + var InternalMap; + + var wrapper = function (get) { + return function WeakMap() { + return get(this, arguments.length > 0 ? arguments[0] : undefined); + }; + }; + + var methods = { + // 23.3.3.3 WeakMap.prototype.get(key) + get: function get(key) { + if (isObject(key)) { + var data = getWeak(key); + if (data === true) return uncaughtFrozenStore(validate(this, WEAK_MAP)).get(key); + return data ? data[this._i] : undefined; + } + }, + // 23.3.3.5 WeakMap.prototype.set(key, value) + set: function set(key, value) { + return weak.def(validate(this, WEAK_MAP), key, value); + }, + }; + + // 23.3 WeakMap Objects + var $WeakMap = (module.exports = __webpack_require__(95)(WEAK_MAP, wrapper, methods, weak, true, true)); + + // IE11 WeakMap frozen keys fix + if (NATIVE_WEAK_MAP && IS_IE11) { + InternalMap = weak.getConstructor(wrapper, WEAK_MAP); + assign(InternalMap.prototype, methods); + meta.NEED = true; + each(['delete', 'has', 'get', 'set'], function (key) { + var proto = $WeakMap.prototype; + var method = proto[key]; + redefine(proto, key, function (a, b) { + // store frozen objects on internal weakmap shim + if (isObject(a) && !isExtensible(a)) { + if (!this._f) this._f = new InternalMap(); + var result = this._f[key](a, b); + return key == 'set' ? this : result; + // store all the rest on native weakmap + } + return method.call(this, a, b); + }); + }); + } + + /***/ + }, + /* 201 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var redefineAll = __webpack_require__(58); + var getWeak = __webpack_require__(42).getWeak; + var anObject = __webpack_require__(2); + var isObject = __webpack_require__(5); + var anInstance = __webpack_require__(56); + var forOf = __webpack_require__(57); + var createArrayMethod = __webpack_require__(34); + var $has = __webpack_require__(18); + var validate = __webpack_require__(59); + var arrayFind = createArrayMethod(5); + var arrayFindIndex = createArrayMethod(6); + var id = 0; + + // fallback for uncaught frozen keys + var uncaughtFrozenStore = function (that) { + return that._l || (that._l = new UncaughtFrozenStore()); + }; + var UncaughtFrozenStore = function () { + this.a = []; + }; + var findUncaughtFrozen = function (store, key) { + return arrayFind(store.a, function (it) { + return it[0] === key; + }); + }; + UncaughtFrozenStore.prototype = { + get: function (key) { + var entry = findUncaughtFrozen(this, key); + if (entry) return entry[1]; + }, + has: function (key) { + return !!findUncaughtFrozen(this, key); + }, + set: function (key, value) { + var entry = findUncaughtFrozen(this, key); + if (entry) entry[1] = value; + else this.a.push([key, value]); + }, + delete: function (key) { + var index = arrayFindIndex(this.a, function (it) { + return it[0] === key; + }); + if (~index) this.a.splice(index, 1); + return !!~index; + }, + }; + + module.exports = { + getConstructor: function (wrapper, NAME, IS_MAP, ADDER) { + var C = wrapper(function (that, iterable) { + anInstance(that, C, NAME, '_i'); + that._t = NAME; // collection type + that._i = id++; // collection id + that._l = undefined; // leak store for uncaught frozen objects + if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that); + }); + redefineAll(C.prototype, { + // 23.3.3.2 WeakMap.prototype.delete(key) + // 23.4.3.3 WeakSet.prototype.delete(value) + delete: function (key) { + if (!isObject(key)) return false; + var data = getWeak(key); + if (data === true) return uncaughtFrozenStore(validate(this, NAME))['delete'](key); + return data && $has(data, this._i) && delete data[this._i]; + }, + // 23.3.3.4 WeakMap.prototype.has(key) + // 23.4.3.4 WeakSet.prototype.has(value) + has: function has(key) { + if (!isObject(key)) return false; + var data = getWeak(key); + if (data === true) return uncaughtFrozenStore(validate(this, NAME)).has(key); + return data && $has(data, this._i); + }, + }); + return C; + }, + def: function (that, key, value) { + var data = getWeak(anObject(key), true); + if (data === true) uncaughtFrozenStore(that).set(key, value); + else data[that._i] = value; + return that; + }, + ufstore: uncaughtFrozenStore, + }; + + /***/ + }, + /* 202 */ + /***/ function (module, exports, __webpack_require__) { + // https://tc39.github.io/ecma262/#sec-toindex + var toInteger = __webpack_require__(26); + var toLength = __webpack_require__(7); + module.exports = function (it) { + if (it === undefined) return 0; + var number = toInteger(it); + var length = toLength(number); + if (number !== length) throw RangeError('Wrong length!'); + return length; + }; + + /***/ + }, + /* 203 */ + /***/ function (module, exports, __webpack_require__) { + // all object keys, includes non-enumerable and symbols + var gOPN = __webpack_require__(54); + var gOPS = __webpack_require__(87); + var anObject = __webpack_require__(2); + var Reflect = __webpack_require__(3).Reflect; + module.exports = + (Reflect && Reflect.ownKeys) || + function ownKeys(it) { + var keys = gOPN.f(anObject(it)); + var getSymbols = gOPS.f; + return getSymbols ? keys.concat(getSymbols(it)) : keys; + }; + + /***/ + }, + /* 204 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray + var isArray = __webpack_require__(88); + var isObject = __webpack_require__(5); + var toLength = __webpack_require__(7); + var ctx = __webpack_require__(24); + var IS_CONCAT_SPREADABLE = __webpack_require__(6)('isConcatSpreadable'); + + function flattenIntoArray(target, original, source, sourceLen, start, depth, mapper, thisArg) { + var targetIndex = start; + var sourceIndex = 0; + var mapFn = mapper ? ctx(mapper, thisArg, 3) : false; + var element, spreadable; + + while (sourceIndex < sourceLen) { + if (sourceIndex in source) { + element = mapFn ? mapFn(source[sourceIndex], sourceIndex, original) : source[sourceIndex]; + + spreadable = false; + if (isObject(element)) { + spreadable = element[IS_CONCAT_SPREADABLE]; + spreadable = spreadable !== undefined ? !!spreadable : isArray(element); + } + + if (spreadable && depth > 0) { + targetIndex = + flattenIntoArray( + target, + original, + element, + toLength(element.length), + targetIndex, + depth - 1, + ) - 1; + } else { + if (targetIndex >= 0x1fffffffffffff) throw TypeError(); + target[targetIndex] = element; + } + + targetIndex++; + } + sourceIndex++; + } + return targetIndex; + } + + module.exports = flattenIntoArray; + + /***/ + }, + /* 205 */ + /***/ function (module, exports, __webpack_require__) { + // https://github.com/tc39/proposal-string-pad-start-end + var toLength = __webpack_require__(7); + var repeat = __webpack_require__(120); + var defined = __webpack_require__(32); + + module.exports = function (that, maxLength, fillString, left) { + var S = String(defined(that)); + var stringLength = S.length; + var fillStr = fillString === undefined ? ' ' : String(fillString); + var intMaxLength = toLength(maxLength); + if (intMaxLength <= stringLength || fillStr == '') return S; + var fillLen = intMaxLength - stringLength; + var stringFiller = repeat.call(fillStr, Math.ceil(fillLen / fillStr.length)); + if (stringFiller.length > fillLen) stringFiller = stringFiller.slice(0, fillLen); + return left ? stringFiller + S : S + stringFiller; + }; + + /***/ + }, + /* 206 */ + /***/ function (module, exports, __webpack_require__) { + var DESCRIPTORS = __webpack_require__(8); + var getKeys = __webpack_require__(51); + var toIObject = __webpack_require__(19); + var isEnum = __webpack_require__(75).f; + module.exports = function (isEntries) { + return function (it) { + var O = toIObject(it); + var keys = getKeys(O); + var length = keys.length; + var i = 0; + var result = []; + var key; + while (length > i) { + key = keys[i++]; + if (!DESCRIPTORS || isEnum.call(O, key)) { + result.push(isEntries ? [key, O[key]] : O[key]); + } + } + return result; + }; + }; + + /***/ + }, + /* 207 */ + /***/ function (module, exports, __webpack_require__) { + // https://github.com/DavidBruant/Map-Set.prototype.toJSON + var classof = __webpack_require__(65); + var from = __webpack_require__(208); + module.exports = function (NAME) { + return function toJSON() { + if (classof(this) != NAME) throw TypeError(NAME + "#toJSON isn't generic"); + return from(this); + }; + }; + + /***/ + }, + /* 208 */ + /***/ function (module, exports, __webpack_require__) { + var forOf = __webpack_require__(57); + + module.exports = function (iter, ITERATOR) { + var result = []; + forOf(iter, false, result.push, result, ITERATOR); + return result; + }; + + /***/ + }, + /* 209 */ + /***/ function (module, exports) { + // https://rwaldron.github.io/proposal-math-extensions/ + module.exports = + Math.scale || + function scale(x, inLow, inHigh, outLow, outHigh) { + if ( + arguments.length === 0 || + // eslint-disable-next-line no-self-compare + x != x || + // eslint-disable-next-line no-self-compare + inLow != inLow || + // eslint-disable-next-line no-self-compare + inHigh != inHigh || + // eslint-disable-next-line no-self-compare + outLow != outLow || + // eslint-disable-next-line no-self-compare + outHigh != outHigh + ) + return NaN; + if (x === Infinity || x === -Infinity) return x; + return ((x - inLow) * (outHigh - outLow)) / (inHigh - inLow) + outLow; + }; + + /***/ + }, + /* 210 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var _interopRequireWildcard = __webpack_require__(471); + + var _interopRequireDefault = __webpack_require__(40); + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.default = void 0; + + var _assign = _interopRequireDefault(__webpack_require__(228)); + + var _stringify = _interopRequireDefault(__webpack_require__(105)); + + var _keys = _interopRequireDefault(__webpack_require__(159)); + + var _reactDom = _interopRequireDefault(__webpack_require__(229)); + + var ClientStartup = _interopRequireWildcard(__webpack_require__(516)); + + var _handleError2 = _interopRequireDefault(__webpack_require__(232)); + + var _ComponentRegistry = _interopRequireDefault(__webpack_require__(233)); + + var _StoreRegistry = _interopRequireDefault(__webpack_require__(534)); + + var _serverRenderReactComponent2 = _interopRequireDefault(__webpack_require__(535)); + + var _buildConsoleReplay2 = _interopRequireDefault(__webpack_require__(236)); + + var _createReactElement = _interopRequireDefault(__webpack_require__(160)); + + var _Authenticity = _interopRequireDefault(__webpack_require__(538)); + + var _context = _interopRequireDefault(__webpack_require__(539)); + + var ctx = (0, _context.default)(); + var DEFAULT_OPTIONS = { + traceTurbolinks: false, + }; + ctx.ReactOnRails = { + /** + * Main entry point to using the react-on-rails npm package. This is how Rails will be able to + * find you components for rendering. + * @param components (key is component name, value is component) + */ + register: function register(components) { + _ComponentRegistry.default.register(components); + }, + + /** + * Allows registration of store generators to be used by multiple react components on one Rails + * view. store generators are functions that take one arg, props, and return a store. Note that + * the setStore API is different in that it's the actual store hydrated with props. + * @param stores (keys are store names, values are the store generators) + */ + registerStore: function registerStore(stores) { + if (!stores) { + throw new Error( + 'Called ReactOnRails.registerStores with a null or undefined, rather than ' + + 'an Object with keys being the store names and the values are the store generators.', + ); + } + + _StoreRegistry.default.register(stores); + }, + + /** + * Allows retrieval of the store by name. This store will be hydrated by any Rails form props. + * Pass optional param throwIfMissing = false if you want to use this call to get back null if the + * store with name is not registered. + * @param name + * @param throwIfMissing Defaults to true. Set to false to have this call return undefined if + * there is no store with the given name. + * @returns Redux Store, possibly hydrated + */ + getStore: function getStore(name) { + var throwIfMissing = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + return _StoreRegistry.default.getStore(name, throwIfMissing); + }, + + /** + * Set options for ReactOnRails, typically before you call ReactOnRails.register + * Available Options: + * `traceTurbolinks: true|false Gives you debugging messages on Turbolinks events + */ + setOptions: function setOptions(newOptions) { + if ('traceTurbolinks' in newOptions) { + this.options.traceTurbolinks = newOptions.traceTurbolinks; // eslint-disable-next-line no-param-reassign + + delete newOptions.traceTurbolinks; + } + + if ((0, _keys.default)(newOptions).length > 0) { + throw new Error( + 'Invalid options passed to ReactOnRails.options: ', + (0, _stringify.default)(newOptions), + ); + } + }, + + /** + * Allow directly calling the page loaded script in case the default events that trigger react + * rendering are not sufficient, such as when loading JavaScript asynchronously with TurboLinks: + * More details can be found here: + * https://github.com/shakacode/react_on_rails/blob/master/docs/additional-reading/turbolinks.md + */ + reactOnRailsPageLoaded: function reactOnRailsPageLoaded() { + ClientStartup.reactOnRailsPageLoaded(); + }, + + /** + * Returns CSRF authenticity token inserted by Rails csrf_meta_tags + * @returns String or null + */ + authenticityToken: function authenticityToken() { + return _Authenticity.default.authenticityToken(); + }, + + /** + * Returns header with csrf authenticity token and XMLHttpRequest + * @param {*} other headers + * @returns {*} header + */ + authenticityHeaders: function authenticityHeaders() { + var otherHeaders = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + return _Authenticity.default.authenticityHeaders(otherHeaders); + }, + // ///////////////////////////////////////////////////////////////////////////// + // INTERNALLY USED APIs + // ///////////////////////////////////////////////////////////////////////////// + + /** + * Retrieve an option by key. + * @param key + * @returns option value + */ + option: function option(key) { + return this.options[key]; + }, + + /** + * Allows retrieval of the store generator by name. This is used internally by ReactOnRails after + * a rails form loads to prepare stores. + * @param name + * @returns Redux Store generator function + */ + getStoreGenerator: function getStoreGenerator(name) { + return _StoreRegistry.default.getStoreGenerator(name); + }, + + /** + * Allows saving the store populated by Rails form props. Used internally by ReactOnRails. + * @param name + * @returns Redux Store, possibly hydrated + */ + setStore: function setStore(name, store) { + return _StoreRegistry.default.setStore(name, store); + }, + + /** + * Clears hydratedStores to avoid accidental usage of wrong store hydrated in previous/parallel + * request. + */ + clearHydratedStores: function clearHydratedStores() { + _StoreRegistry.default.clearHydratedStores(); + }, + + /** + * ReactOnRails.render("HelloWorldApp", {name: "Stranger"}, 'app'); + * + * Does this: + * ReactDOM.render(React.createElement(HelloWorldApp, {name: "Stranger"}), + * document.getElementById('app')) + * + * @param name Name of your registered component + * @param props Props to pass to your component + * @param domNodeId + * @param hydrate Pass truthy to update server rendered html. Default is falsy + * @returns {virtualDomElement} Reference to your component's backing instance + */ + render: function render(name, props, domNodeId, hydrate) { + var componentObj = _ComponentRegistry.default.get(name); + + var reactElement = (0, _createReactElement.default)({ + componentObj: componentObj, + props: props, + domNodeId: domNodeId, + }); + var render = hydrate ? _reactDom.default.hydrate : _reactDom.default.render; // eslint-disable-next-line react/no-render-return-value + + return render(reactElement, document.getElementById(domNodeId)); + }, + + /** + * Get the component that you registered + * @param name + * @returns {name, component, generatorFunction, isRenderer} + */ + getComponent: function getComponent(name) { + return _ComponentRegistry.default.get(name); + }, + + /** + * Used by server rendering by Rails + * @param options + */ + serverRenderReactComponent: function serverRenderReactComponent(options) { + return (0, _serverRenderReactComponent2.default)(options); + }, + + /** + * Used by Rails to catch errors in rendering + * @param options + */ + handleError: function handleError(options) { + return (0, _handleError2.default)(options); + }, + + /** + * Used by Rails server rendering to replay console messages. + */ + buildConsoleReplay: function buildConsoleReplay() { + return (0, _buildConsoleReplay2.default)(); + }, + + /** + * Get an Object containing all registered components. Useful for debugging. + * @returns {*} + */ + registeredComponents: function registeredComponents() { + return _ComponentRegistry.default.components(); + }, + + /** + * Get an Object containing all registered store generators. Useful for debugging. + * @returns {*} + */ + storeGenerators: function storeGenerators() { + return _StoreRegistry.default.storeGenerators(); + }, + + /** + * Get an Object containing all hydrated stores. Useful for debugging. + * @returns {*} + */ + stores: function stores() { + return _StoreRegistry.default.stores(); + }, + resetOptions: function resetOptions() { + this.options = (0, _assign.default)({}, DEFAULT_OPTIONS); + }, + }; + ctx.ReactOnRails.resetOptions(); + ClientStartup.clientStartup(ctx); + var _default = ctx.ReactOnRails; + exports.default = _default; + + /***/ + }, + /* 211 */ + /***/ function (module, exports, __webpack_require__) { + var pIE = __webpack_require__(100); + var createDesc = __webpack_require__(78); + var toIObject = __webpack_require__(60); + var toPrimitive = __webpack_require__(142); + var has = __webpack_require__(44); + var IE8_DOM_DEFINE = __webpack_require__(212); + var gOPD = Object.getOwnPropertyDescriptor; + + exports.f = __webpack_require__(28) + ? gOPD + : function getOwnPropertyDescriptor(O, P) { + O = toIObject(O); + P = toPrimitive(P, true); + if (IE8_DOM_DEFINE) + try { + return gOPD(O, P); + } catch (e) { + /* empty */ + } + if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]); + }; + + /***/ + }, + /* 212 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = + !__webpack_require__(28) && + !__webpack_require__(61)(function () { + return ( + Object.defineProperty(__webpack_require__(213)('div'), 'a', { + get: function () { + return 7; + }, + }).a != 7 + ); + }); + + /***/ + }, + /* 213 */ + /***/ function (module, exports, __webpack_require__) { + var isObject = __webpack_require__(35); + var document = __webpack_require__(29).document; + // typeof document.createElement is 'object' in old IE + var is = isObject(document) && isObject(document.createElement); + module.exports = function (it) { + return is ? document.createElement(it) : {}; + }; + + /***/ + }, + /* 214 */ + /***/ function (module, exports, __webpack_require__) { + // most Object methods by ES6 should accept primitives + var $export = __webpack_require__(36); + var core = __webpack_require__(13); + var fails = __webpack_require__(61); + module.exports = function (KEY, exec) { + var fn = (core.Object || {})[KEY] || Object[KEY]; + var exp = {}; + exp[KEY] = exec(fn); + $export( + $export.S + + $export.F * + fails(function () { + fn(1); + }), + 'Object', + exp, + ); + }; + + /***/ + }, + /* 215 */ + /***/ function (module, exports) { + module.exports = function (it) { + if (typeof it != 'function') throw TypeError(it + ' is not a function!'); + return it; + }; + + /***/ + }, + /* 216 */ + /***/ function (module, exports, __webpack_require__) { + var has = __webpack_require__(44); + var toIObject = __webpack_require__(60); + var arrayIndexOf = __webpack_require__(484)(false); + var IE_PROTO = __webpack_require__(148)('IE_PROTO'); + + module.exports = function (object, names) { + var O = toIObject(object); + var i = 0; + var result = []; + var key; + for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key); + // Don't enum bug & hidden keys + while (names.length > i) + if (has(O, (key = names[i++]))) { + ~arrayIndexOf(result, key) || result.push(key); + } + return result; + }; + + /***/ + }, + /* 217 */ + /***/ function (module, exports) { + module.exports = function (done, value) { + return { value: value, done: !!done }; + }; + + /***/ + }, + /* 218 */ + /***/ function (module, exports, __webpack_require__) { + // 7.2.2 IsArray(argument) + var cof = __webpack_require__(140); + module.exports = + Array.isArray || + function isArray(arg) { + return cof(arg) == 'Array'; + }; + + /***/ + }, + /* 219 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) + var $keys = __webpack_require__(216); + var hiddenKeys = __webpack_require__(150).concat('length', 'prototype'); + + exports.f = + Object.getOwnPropertyNames || + function getOwnPropertyNames(O) { + return $keys(O, hiddenKeys); + }; + + /***/ + }, + /* 220 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // 19.1.2.1 Object.assign(target, source, ...) + var DESCRIPTORS = __webpack_require__(28); + var getKeys = __webpack_require__(80); + var gOPS = __webpack_require__(154); + var pIE = __webpack_require__(100); + var toObject = __webpack_require__(69); + var IObject = __webpack_require__(139); + var $assign = Object.assign; + + // should work with symbols and should have deterministic property order (V8 bug) + module.exports = + !$assign || + __webpack_require__(61)(function () { + var A = {}; + var B = {}; + // eslint-disable-next-line no-undef + var S = Symbol(); + var K = 'abcdefghijklmnopqrst'; + A[S] = 7; + K.split('').forEach(function (k) { + B[k] = k; + }); + return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K; + }) + ? function assign(target, source) { + // eslint-disable-line no-unused-vars + var T = toObject(target); + var aLen = arguments.length; + var index = 1; + var getSymbols = gOPS.f; + var isEnum = pIE.f; + while (aLen > index) { + var S = IObject(arguments[index++]); + var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S); + var length = keys.length; + var j = 0; + var key; + while (length > j) { + key = keys[j++]; + if (!DESCRIPTORS || isEnum.call(S, key)) T[key] = S[key]; + } + } + return T; + } + : $assign; + + /***/ + }, + /* 221 */ + /***/ function (module, exports, __webpack_require__) { + // call something on iterator step with safe closing on error + var anObject = __webpack_require__(62); + module.exports = function (iterator, fn, value, entries) { + try { + return entries ? fn(anObject(value)[0], value[1]) : fn(value); + // 7.4.6 IteratorClose(iterator, completion) + } catch (e) { + var ret = iterator['return']; + if (ret !== undefined) anObject(ret.call(iterator)); + throw e; + } + }; + + /***/ + }, + /* 222 */ + /***/ function (module, exports, __webpack_require__) { + // check on default Array iterator + var Iterators = __webpack_require__(79); + var ITERATOR = __webpack_require__(22)('iterator'); + var ArrayProto = Array.prototype; + + module.exports = function (it) { + return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it); + }; + + /***/ + }, + /* 223 */ + /***/ function (module, exports, __webpack_require__) { + var classof = __webpack_require__(224); + var ITERATOR = __webpack_require__(22)('iterator'); + var Iterators = __webpack_require__(79); + module.exports = __webpack_require__(13).getIteratorMethod = function (it) { + if (it != undefined) return it[ITERATOR] || it['@@iterator'] || Iterators[classof(it)]; + }; + + /***/ + }, + /* 224 */ + /***/ function (module, exports, __webpack_require__) { + // getting tag from 19.1.3.6 Object.prototype.toString() + var cof = __webpack_require__(140); + var TAG = __webpack_require__(22)('toStringTag'); + // ES3 wrong here + var ARG = + cof( + (function () { + return arguments; + })(), + ) == 'Arguments'; + + // fallback for IE11 Script Access Denied error + var tryGet = function (it, key) { + try { + return it[key]; + } catch (e) { + /* empty */ + } + }; + + module.exports = function (it) { + var O, T, B; + return it === undefined + ? 'Undefined' + : it === null + ? 'Null' + : // @@toStringTag case + typeof (T = tryGet((O = Object(it)), TAG)) == 'string' + ? T + : // builtinTag case + ARG + ? cof(O) + : // ES3 arguments fallback + (B = cof(O)) == 'Object' && typeof O.callee == 'function' + ? 'Arguments' + : B; + }; + + /***/ + }, + /* 225 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var global = __webpack_require__(29); + var $export = __webpack_require__(36); + var meta = __webpack_require__(81); + var fails = __webpack_require__(61); + var hide = __webpack_require__(45); + var redefineAll = __webpack_require__(157); + var forOf = __webpack_require__(82); + var anInstance = __webpack_require__(158); + var isObject = __webpack_require__(35); + var setToStringTag = __webpack_require__(104); + var dP = __webpack_require__(30).f; + var each = __webpack_require__(156)(0); + var DESCRIPTORS = __webpack_require__(28); + + module.exports = function (NAME, wrapper, methods, common, IS_MAP, IS_WEAK) { + var Base = global[NAME]; + var C = Base; + var ADDER = IS_MAP ? 'set' : 'add'; + var proto = C && C.prototype; + var O = {}; + if ( + !DESCRIPTORS || + typeof C != 'function' || + !( + IS_WEAK || + (proto.forEach && + !fails(function () { + new C().entries().next(); + })) + ) + ) { + // create collection constructor + C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER); + redefineAll(C.prototype, methods); + meta.NEED = true; + } else { + C = wrapper(function (target, iterable) { + anInstance(target, C, NAME, '_c'); + target._c = new Base(); + if (iterable != undefined) forOf(iterable, IS_MAP, target[ADDER], target); + }); + each('add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON'.split(','), function (KEY) { + var IS_ADDER = KEY == 'add' || KEY == 'set'; + if (KEY in proto && !(IS_WEAK && KEY == 'clear')) + hide(C.prototype, KEY, function (a, b) { + anInstance(this, C, KEY); + if (!IS_ADDER && IS_WEAK && !isObject(a)) return KEY == 'get' ? undefined : false; + var result = this._c[KEY](a === 0 ? 0 : a, b); + return IS_ADDER ? this : result; + }); + }); + IS_WEAK || + dP(C.prototype, 'size', { + get: function () { + return this._c.size; + }, + }); + } + + setToStringTag(C, NAME); + + O[NAME] = C; + $export($export.G + $export.W + $export.F, O); + + if (!IS_WEAK) common.setStrong(C, NAME, IS_MAP); + + return C; + }; + + /***/ + }, + /* 226 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // https://tc39.github.io/proposal-setmap-offrom/ + var $export = __webpack_require__(36); + + module.exports = function (COLLECTION) { + $export($export.S, COLLECTION, { + of: function of() { + var length = arguments.length; + var A = new Array(length); + while (length--) A[length] = arguments[length]; + return new this(A); + }, + }); + }; + + /***/ + }, + /* 227 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // https://tc39.github.io/proposal-setmap-offrom/ + var $export = __webpack_require__(36); + var aFunction = __webpack_require__(215); + var ctx = __webpack_require__(68); + var forOf = __webpack_require__(82); + + module.exports = function (COLLECTION) { + $export($export.S, COLLECTION, { + from: function from(source /* , mapFn, thisArg */) { + var mapFn = arguments[1]; + var mapping, A, n, cb; + aFunction(this); + mapping = mapFn !== undefined; + if (mapping) aFunction(mapFn); + if (source == undefined) return new this(); + A = []; + if (mapping) { + n = 0; + cb = ctx(mapFn, arguments[2], 2); + forOf(source, false, function (nextItem) { + A.push(cb(nextItem, n++)); + }); + } else { + forOf(source, false, A.push, A); + } + return new this(A); + }, + }); + }; + + /***/ + }, + /* 228 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = __webpack_require__(505); + + /***/ + }, + /* 229 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + function checkDCE() { + /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */ + if ( + typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined' || + typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== 'function' + ) { + return; + } + if (true) { + // This branch is unreachable because this function is only called + // in production, but the condition is true only in development. + // Therefore if the branch is still here, dead code elimination wasn't + // properly applied. + // Don't change the message. React DevTools relies on it. Also make sure + // this message doesn't occur elsewhere in this function, or it will cause + // a false positive. + throw new Error('^_^'); + } + try { + // Verify that the code above has been dead code eliminated (DCE'd). + __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE); + } catch (err) { + // DevTools shouldn't crash React, no matter what. + // We should still report in case we break this code. + console.error(err); + } + } + + if (false) { + // DCE check should happen before ReactDOM bundle executes so that + // DevTools can report bad minification during injection. + checkDCE(); + module.exports = require('./cjs/react-dom.production.min.js'); + } else { + module.exports = __webpack_require__(510); + } + + /***/ + }, + /* 230 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + + var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; + + module.exports = ReactPropTypesSecret; + + /***/ + }, + /* 231 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.default = isResultNonReactComponent; + + function isResultNonReactComponent(reactElementOrRouterResult) { + return !!( + reactElementOrRouterResult.renderedHtml || + reactElementOrRouterResult.redirectLocation || + reactElementOrRouterResult.error + ); + } + + /***/ + }, + /* 232 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var _interopRequireDefault = __webpack_require__(40); + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.default = void 0; + + var _react = _interopRequireDefault(__webpack_require__(1)); + + var _server = _interopRequireDefault(__webpack_require__(107)); + + function handleGeneratorFunctionIssue(options) { + var e = options.e, + name = options.name; + var msg = ''; + + if (name) { + var lastLine = + 'A generator function takes a single arg of props (and the location for react-router) ' + + 'and returns a ReactElement.'; + var shouldBeGeneratorError = + "ERROR: ReactOnRails is incorrectly detecting generator function to be false. The React\ncomponent '" + .concat(name, "' seems to be a generator function.\n") + .concat(lastLine); + var reMatchShouldBeGeneratorError = /Can't add property context, object is not extensible/; + + if (reMatchShouldBeGeneratorError.test(e.message)) { + msg += ''.concat(shouldBeGeneratorError, '\n\n'); + console.error(shouldBeGeneratorError); + } + + shouldBeGeneratorError = + "ERROR: ReactOnRails is incorrectly detecting generatorFunction to be true, but the React\ncomponent '" + .concat(name, "' is not a generator function.\n") + .concat(lastLine); + var reMatchShouldNotBeGeneratorError = /Cannot call a class as a function/; + + if (reMatchShouldNotBeGeneratorError.test(e.message)) { + msg += ''.concat(shouldBeGeneratorError, '\n\n'); + console.error(shouldBeGeneratorError); + } + } + + return msg; + } + + var handleError = function handleError(options) { + var e = options.e, + jsCode = options.jsCode, + serverSide = options.serverSide; + console.error('Exception in rendering!'); + var msg = handleGeneratorFunctionIssue(options); + + if (jsCode) { + console.error('JS code was: '.concat(jsCode)); + } + + if (e.fileName) { + console.error('location: '.concat(e.fileName, ':').concat(e.lineNumber)); + } + + console.error('message: '.concat(e.message)); + console.error('stack: '.concat(e.stack)); + + if (serverSide) { + msg += 'Exception in rendering!\n' + .concat( + e.fileName ? '\nlocation: '.concat(e.fileName, ':').concat(e.lineNumber) : '', + '\nMessage: ', + ) + .concat(e.message, '\n\n') + .concat(e.stack); + + var reactElement = _react.default.createElement('pre', null, msg); + + return _server.default.renderToString(reactElement); + } + + return undefined; + }; + + var _default = handleError; + exports.default = _default; + + /***/ + }, + /* 233 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var _interopRequireDefault = __webpack_require__(40); + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.default = void 0; + + var _from = _interopRequireDefault(__webpack_require__(234)); + + var _keys = _interopRequireDefault(__webpack_require__(159)); + + var _map = _interopRequireDefault(__webpack_require__(235)); + + var _generatorFunction = _interopRequireDefault(__webpack_require__(533)); + + // key = name used by react_on_rails + // value = { name, component, generatorFunction: boolean, isRenderer: boolean } + var registeredComponents = new _map.default(); + var _default = { + /** + * @param components { component1: component1, component2: component2, etc. } + */ + register: function register(components) { + (0, _keys.default)(components).forEach(function (name) { + if (registeredComponents.has(name)) { + console.warn('Called register for component that is already registered', name); + } + + var component = components[name]; + + if (!component) { + throw new Error('Called register with null component named '.concat(name)); + } + + var isGeneratorFunction = (0, _generatorFunction.default)(component); + var isRenderer = isGeneratorFunction && component.length === 3; + registeredComponents.set(name, { + name: name, + component: component, + generatorFunction: isGeneratorFunction, + isRenderer: isRenderer, + }); + }); + }, + + /** + * @param name + * @returns { name, component, generatorFunction } + */ + get: function get(name) { + if (registeredComponents.has(name)) { + return registeredComponents.get(name); + } + + var keys = (0, _from.default)(registeredComponents.keys()).join(', '); + throw new Error( + 'Could not find component registered with name ' + .concat(name, '. Registered component names include [ ') + .concat(keys, ' ]. Maybe you forgot to register the component?'), + ); + }, + + /** + * Get a Map containing all registered components. Useful for debugging. + * @returns Map where key is the component name and values are the + * { name, component, generatorFunction} + */ + components: function components() { + return registeredComponents; + }, + }; + exports.default = _default; + + /***/ + }, + /* 234 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = __webpack_require__(520); + + /***/ + }, + /* 235 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = __webpack_require__(524); + + /***/ + }, + /* 236 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var _interopRequireDefault = __webpack_require__(40); + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.consoleReplay = consoleReplay; + exports.default = buildConsoleReplay; + + var _stringify = _interopRequireDefault(__webpack_require__(105)); + + var _RenderUtils = _interopRequireDefault(__webpack_require__(536)); + + var _scriptSanitizedVal = _interopRequireDefault(__webpack_require__(537)); + + function consoleReplay() { + // console.history is a global polyfill used in server rendering. + // $FlowFixMe + if (!(console.history instanceof Array)) { + return ''; + } + + var lines = console.history.map(function (msg) { + var stringifiedList = msg.arguments.map(function (arg) { + var val; + + try { + val = typeof arg === 'string' || arg instanceof String ? arg : (0, _stringify.default)(arg); + } catch (e) { + val = ''.concat(e.message, ': ').concat(arg); + } + + return (0, _scriptSanitizedVal.default)(val); + }); + return 'console.' + .concat(msg.level, '.apply(console, ') + .concat((0, _stringify.default)(stringifiedList), ');'); + }); + return lines.join('\n'); + } + + function buildConsoleReplay() { + return _RenderUtils.default.wrapInScriptTags('consoleReplayLog', consoleReplay()); + } + + /***/ + }, + /* 237 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(10); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash__ = __webpack_require__(543); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_2_lodash__, + ); + + function renderContextRows(railsContext) { + // eslint-disable-next-line no-console + console.log('railsContext.serverSide is ', railsContext.serverSide); + return __WEBPACK_IMPORTED_MODULE_2_lodash___default.a.transform( + railsContext, + function (accum, value, key) { + if (key !== 'serverSide') { + var className = 'js-' + key; + accum.push( + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'tr', + { key: className }, + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'td', + null, + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('strong', null, key, ':\xA0'), + ), + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'td', + { className: className }, + '' + value, + ), + ), + ); + } + }, + [], + ); + } + + var RailsContext = function RailsContext(props) { + return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'table', + null, + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'thead', + null, + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'tr', + null, + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'th', + null, + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('i', null, 'key'), + ), + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'th', + null, + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('i', null, 'value'), + ), + ), + ), + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'tbody', + null, + renderContextRows(props.railsContext), + ), + ); + }; + + RailsContext.propTypes = { + railsContext: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object.isRequired, + }; + + var _default = RailsContext; + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + renderContextRows, + 'renderContextRows', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/RailsContext.jsx', + ); + + __REACT_HOT_LOADER__.register( + RailsContext, + 'RailsContext', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/RailsContext.jsx', + ); + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/RailsContext.jsx', + ); + })(); + + /***/ + }, + /* 238 */ + /***/ function (module, exports) { + module.exports = function (module) { + if (!module.webpackPolyfill) { + module.deprecate = function () {}; + module.paths = []; + // module.parent = undefined by default + if (!module.children) module.children = []; + Object.defineProperty(module, 'loaded', { + enumerable: true, + get: function () { + return module.l; + }, + }); + Object.defineProperty(module, 'id', { + enumerable: true, + get: function () { + return module.i; + }, + }); + module.webpackPolyfill = 1; + } + return module; + }; + + /***/ + }, + /* 239 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'a', function () { + return ActionTypes; + }); + /* harmony export (immutable) */ __webpack_exports__['b'] = createStore; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_isPlainObject__ = + __webpack_require__(240); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_symbol_observable__ = __webpack_require__(563); + + /** + * These are private action types reserved by Redux. + * For any unknown actions, you must return the current state. + * If the current state is undefined, you must return the initial state. + * Do not reference these action types directly in your code. + */ + var ActionTypes = { + INIT: '@@redux/INIT', + + /** + * Creates a Redux store that holds the state tree. + * The only way to change the data in the store is to call `dispatch()` on it. + * + * There should only be a single store in your app. To specify how different + * parts of the state tree respond to actions, you may combine several reducers + * into a single reducer function by using `combineReducers`. + * + * @param {Function} reducer A function that returns the next state tree, given + * the current state tree and the action to handle. + * + * @param {any} [preloadedState] The initial state. You may optionally specify it + * to hydrate the state from the server in universal apps, or to restore a + * previously serialized user session. + * If you use `combineReducers` to produce the root reducer function, this must be + * an object with the same shape as `combineReducers` keys. + * + * @param {Function} [enhancer] The store enhancer. You may optionally specify it + * to enhance the store with third-party capabilities such as middleware, + * time travel, persistence, etc. The only store enhancer that ships with Redux + * is `applyMiddleware()`. + * + * @returns {Store} A Redux store that lets you read the state, dispatch actions + * and subscribe to changes. + */ + }; + function createStore(reducer, preloadedState, enhancer) { + var _ref2; + + if (typeof preloadedState === 'function' && typeof enhancer === 'undefined') { + enhancer = preloadedState; + preloadedState = undefined; + } + + if (typeof enhancer !== 'undefined') { + if (typeof enhancer !== 'function') { + throw new Error('Expected the enhancer to be a function.'); + } + + return enhancer(createStore)(reducer, preloadedState); + } + + if (typeof reducer !== 'function') { + throw new Error('Expected the reducer to be a function.'); + } + + var currentReducer = reducer; + var currentState = preloadedState; + var currentListeners = []; + var nextListeners = currentListeners; + var isDispatching = false; + + function ensureCanMutateNextListeners() { + if (nextListeners === currentListeners) { + nextListeners = currentListeners.slice(); + } + } + + /** + * Reads the state tree managed by the store. + * + * @returns {any} The current state tree of your application. + */ + function getState() { + return currentState; + } + + /** + * Adds a change listener. It will be called any time an action is dispatched, + * and some part of the state tree may potentially have changed. You may then + * call `getState()` to read the current state tree inside the callback. + * + * You may call `dispatch()` from a change listener, with the following + * caveats: + * + * 1. The subscriptions are snapshotted just before every `dispatch()` call. + * If you subscribe or unsubscribe while the listeners are being invoked, this + * will not have any effect on the `dispatch()` that is currently in progress. + * However, the next `dispatch()` call, whether nested or not, will use a more + * recent snapshot of the subscription list. + * + * 2. The listener should not expect to see all state changes, as the state + * might have been updated multiple times during a nested `dispatch()` before + * the listener is called. It is, however, guaranteed that all subscribers + * registered before the `dispatch()` started will be called with the latest + * state by the time it exits. + * + * @param {Function} listener A callback to be invoked on every dispatch. + * @returns {Function} A function to remove this change listener. + */ + function subscribe(listener) { + if (typeof listener !== 'function') { + throw new Error('Expected listener to be a function.'); + } + + var isSubscribed = true; + + ensureCanMutateNextListeners(); + nextListeners.push(listener); + + return function unsubscribe() { + if (!isSubscribed) { + return; + } + + isSubscribed = false; + + ensureCanMutateNextListeners(); + var index = nextListeners.indexOf(listener); + nextListeners.splice(index, 1); + }; + } + + /** + * Dispatches an action. It is the only way to trigger a state change. + * + * The `reducer` function, used to create the store, will be called with the + * current state tree and the given `action`. Its return value will + * be considered the **next** state of the tree, and the change listeners + * will be notified. + * + * The base implementation only supports plain object actions. If you want to + * dispatch a Promise, an Observable, a thunk, or something else, you need to + * wrap your store creating function into the corresponding middleware. For + * example, see the documentation for the `redux-thunk` package. Even the + * middleware will eventually dispatch plain object actions using this method. + * + * @param {Object} action A plain object representing “what changed”. It is + * a good idea to keep actions serializable so you can record and replay user + * sessions, or use the time travelling `redux-devtools`. An action must have + * a `type` property which may not be `undefined`. It is a good idea to use + * string constants for action types. + * + * @returns {Object} For convenience, the same action object you dispatched. + * + * Note that, if you use a custom middleware, it may wrap `dispatch()` to + * return something else (for example, a Promise you can await). + */ + function dispatch(action) { + if (!Object(__WEBPACK_IMPORTED_MODULE_0_lodash_es_isPlainObject__['a' /* default */])(action)) { + throw new Error('Actions must be plain objects. ' + 'Use custom middleware for async actions.'); + } + + if (typeof action.type === 'undefined') { + throw new Error( + 'Actions may not have an undefined "type" property. ' + 'Have you misspelled a constant?', + ); + } + + if (isDispatching) { + throw new Error('Reducers may not dispatch actions.'); + } + + try { + isDispatching = true; + currentState = currentReducer(currentState, action); + } finally { + isDispatching = false; + } + + var listeners = (currentListeners = nextListeners); + for (var i = 0; i < listeners.length; i++) { + var listener = listeners[i]; + listener(); + } + + return action; + } + + /** + * Replaces the reducer currently used by the store to calculate the state. + * + * You might need this if your app implements code splitting and you want to + * load some of the reducers dynamically. You might also need this if you + * implement a hot reloading mechanism for Redux. + * + * @param {Function} nextReducer The reducer for the store to use instead. + * @returns {void} + */ + function replaceReducer(nextReducer) { + if (typeof nextReducer !== 'function') { + throw new Error('Expected the nextReducer to be a function.'); + } + + currentReducer = nextReducer; + dispatch({ type: ActionTypes.INIT }); + } + + /** + * Interoperability point for observable/reactive libraries. + * @returns {observable} A minimal observable of state changes. + * For more information, see the observable proposal: + * https://github.com/tc39/proposal-observable + */ + function observable() { + var _ref; + + var outerSubscribe = subscribe; + return ( + (_ref = { + /** + * The minimal observable subscription method. + * @param {Object} observer Any object that can be used as an observer. + * The observer object should have a `next` method. + * @returns {subscription} An object with an `unsubscribe` method that can + * be used to unsubscribe the observable from the store, and prevent further + * emission of values from the observable. + */ + subscribe: function subscribe(observer) { + if (typeof observer !== 'object') { + throw new TypeError('Expected the observer to be an object.'); + } + + function observeState() { + if (observer.next) { + observer.next(getState()); + } + } + + observeState(); + var unsubscribe = outerSubscribe(observeState); + return { unsubscribe: unsubscribe }; + }, + }), + (_ref[__WEBPACK_IMPORTED_MODULE_1_symbol_observable__['a' /* default */]] = function () { + return this; + }), + _ref + ); + } + + // When a store is created, an "INIT" action is dispatched so that every + // reducer returns their initial state. This effectively populates + // the initial state tree. + dispatch({ type: ActionTypes.INIT }); + + return ( + (_ref2 = { + dispatch: dispatch, + subscribe: subscribe, + getState: getState, + replaceReducer: replaceReducer, + }), + (_ref2[__WEBPACK_IMPORTED_MODULE_1_symbol_observable__['a' /* default */]] = observable), + _ref2 + ); + } + + /***/ + }, + /* 240 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__ = __webpack_require__(555); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getPrototype_js__ = __webpack_require__(560); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isObjectLike_js__ = __webpack_require__(562); + + /** `Object#toString` result references. */ + var objectTag = '[object Object]'; + + /** Used for built-in method references. */ + var funcProto = Function.prototype, + objectProto = Object.prototype; + + /** Used to resolve the decompiled source of functions. */ + var funcToString = funcProto.toString; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** Used to infer the `Object` constructor. */ + var objectCtorString = funcToString.call(Object); + + /** + * Checks if `value` is a plain object, that is, an object created by the + * `Object` constructor or one with a `[[Prototype]]` of `null`. + * + * @static + * @memberOf _ + * @since 0.8.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * _.isPlainObject(new Foo); + * // => false + * + * _.isPlainObject([1, 2, 3]); + * // => false + * + * _.isPlainObject({ 'x': 0, 'y': 0 }); + * // => true + * + * _.isPlainObject(Object.create(null)); + * // => true + */ + function isPlainObject(value) { + if ( + !Object(__WEBPACK_IMPORTED_MODULE_2__isObjectLike_js__['a' /* default */])(value) || + Object(__WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__['a' /* default */])(value) != objectTag + ) { + return false; + } + var proto = Object(__WEBPACK_IMPORTED_MODULE_1__getPrototype_js__['a' /* default */])(value); + if (proto === null) { + return true; + } + var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; + return ( + typeof Ctor == 'function' && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString + ); + } + + /* harmony default export */ __webpack_exports__['a'] = isPlainObject; + + /***/ + }, + /* 241 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__root_js__ = __webpack_require__(556); + + /** Built-in value references. */ + var Symbol = __WEBPACK_IMPORTED_MODULE_0__root_js__['a' /* default */].Symbol; + + /* harmony default export */ __webpack_exports__['a'] = Symbol; + + /***/ + }, + /* 242 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = warning; + /** + * Prints a warning in the console if it exists. + * + * @param {String} message The warning message. + * @returns {void} + */ + function warning(message) { + /* eslint-disable no-console */ + if (typeof console !== 'undefined' && typeof console.error === 'function') { + console.error(message); + } + /* eslint-enable no-console */ + try { + // This error was thrown as a convenience so that if you enable + // "break on all exceptions" in your console, + // it would pause the execution at this line. + throw new Error(message); + /* eslint-disable no-empty */ + } catch (e) {} + /* eslint-enable no-empty */ + } + + /***/ + }, + /* 243 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = compose; + /** + * Composes single-argument functions from right to left. The rightmost + * function can take multiple arguments as it provides the signature for + * the resulting composite function. + * + * @param {...Function} funcs The functions to compose. + * @returns {Function} A function obtained by composing the argument functions + * from right to left. For example, compose(f, g, h) is identical to doing + * (...args) => f(g(h(...args))). + */ + + function compose() { + for (var _len = arguments.length, funcs = Array(_len), _key = 0; _key < _len; _key++) { + funcs[_key] = arguments[_key]; + } + + if (funcs.length === 0) { + return function (arg) { + return arg; + }; + } + + if (funcs.length === 1) { + return funcs[0]; + } + + return funcs.reduce(function (a, b) { + return function () { + return a(b.apply(undefined, arguments)); + }; + }); + } + + /***/ + }, + /* 244 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = _inheritsLoose; + function _inheritsLoose(subClass, superClass) { + subClass.prototype = Object.create(superClass.prototype); + subClass.prototype.constructor = subClass; + subClass.__proto__ = superClass; + } + + /***/ + }, + /* 245 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'b', function () { + return subscriptionShape; + }); + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'a', function () { + return storeShape; + }); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(10); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + + var subscriptionShape = __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.shape({ + trySubscribe: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired, + tryUnsubscribe: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired, + notifyNestedSubs: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired, + isSubscribed: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired, + }); + var storeShape = __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.shape({ + subscribe: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired, + dispatch: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired, + getState: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired, + }); + + /***/ + }, + /* 246 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = connectAdvanced; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_inheritsLoose__ = + __webpack_require__(244); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_esm_assertThisInitialized__ = + __webpack_require__(570); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__babel_runtime_helpers_esm_extends__ = + __webpack_require__(164); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__babel_runtime_helpers_esm_objectWithoutPropertiesLoose__ = + __webpack_require__(165); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_hoist_non_react_statics__ = + __webpack_require__(571); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_hoist_non_react_statics___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_hoist_non_react_statics__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_invariant__ = __webpack_require__(14); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_invariant___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_5_invariant__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_6_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react_is__ = __webpack_require__(108); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react_is___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_7_react_is__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__utils_Subscription__ = __webpack_require__(572); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__utils_PropTypes__ = __webpack_require__(245); + + var prefixUnsafeLifecycleMethods = + typeof __WEBPACK_IMPORTED_MODULE_6_react___default.a.forwardRef !== 'undefined'; + var hotReloadingVersion = 0; + var dummyState = {}; + + function noop() {} + + function makeSelectorStateful(sourceSelector, store) { + // wrap the selector in an object that tracks its results between runs. + var selector = { + run: function runComponentSelector(props) { + try { + var nextProps = sourceSelector(store.getState(), props); + + if (nextProps !== selector.props || selector.error) { + selector.shouldComponentUpdate = true; + selector.props = nextProps; + selector.error = null; + } + } catch (error) { + selector.shouldComponentUpdate = true; + selector.error = error; + } + }, + }; + return selector; + } + + function connectAdvanced( + /* + selectorFactory is a func that is responsible for returning the selector function used to + compute new props from state, props, and dispatch. For example: + export default connectAdvanced((dispatch, options) => (state, props) => ({ + thing: state.things[props.thingId], + saveThing: fields => dispatch(actionCreators.saveThing(props.thingId, fields)), + }))(YourComponent) + Access to dispatch is provided to the factory so selectorFactories can bind actionCreators + outside of their selector as an optimization. Options passed to connectAdvanced are passed to + the selectorFactory, along with displayName and WrappedComponent, as the second argument. + Note that selectorFactory is responsible for all caching/memoization of inbound and outbound + props. Do not use connectAdvanced directly without memoizing results between calls to your + selector, otherwise the Connect component will re-render on every state or props change. +*/ + selectorFactory, // options object: + _ref, + ) { + var _contextTypes, _childContextTypes; + + if (_ref === void 0) { + _ref = {}; + } + + var _ref2 = _ref, + _ref2$getDisplayName = _ref2.getDisplayName, + getDisplayName = + _ref2$getDisplayName === void 0 + ? function (name) { + return 'ConnectAdvanced(' + name + ')'; + } + : _ref2$getDisplayName, + _ref2$methodName = _ref2.methodName, + methodName = _ref2$methodName === void 0 ? 'connectAdvanced' : _ref2$methodName, + _ref2$renderCountProp = _ref2.renderCountProp, + renderCountProp = _ref2$renderCountProp === void 0 ? undefined : _ref2$renderCountProp, + _ref2$shouldHandleSta = _ref2.shouldHandleStateChanges, + shouldHandleStateChanges = _ref2$shouldHandleSta === void 0 ? true : _ref2$shouldHandleSta, + _ref2$storeKey = _ref2.storeKey, + storeKey = _ref2$storeKey === void 0 ? 'store' : _ref2$storeKey, + _ref2$withRef = _ref2.withRef, + withRef = _ref2$withRef === void 0 ? false : _ref2$withRef, + connectOptions = Object( + __WEBPACK_IMPORTED_MODULE_3__babel_runtime_helpers_esm_objectWithoutPropertiesLoose__[ + 'a' /* default */ + ], + )(_ref2, [ + 'getDisplayName', + 'methodName', + 'renderCountProp', + 'shouldHandleStateChanges', + 'storeKey', + 'withRef', + ]); + + var subscriptionKey = storeKey + 'Subscription'; + var version = hotReloadingVersion++; + var contextTypes = + ((_contextTypes = {}), + (_contextTypes[storeKey] = __WEBPACK_IMPORTED_MODULE_9__utils_PropTypes__['a' /* storeShape */]), + (_contextTypes[subscriptionKey] = + __WEBPACK_IMPORTED_MODULE_9__utils_PropTypes__['b' /* subscriptionShape */]), + _contextTypes); + var childContextTypes = + ((_childContextTypes = {}), + (_childContextTypes[subscriptionKey] = + __WEBPACK_IMPORTED_MODULE_9__utils_PropTypes__['b' /* subscriptionShape */]), + _childContextTypes); + return function wrapWithConnect(WrappedComponent) { + __WEBPACK_IMPORTED_MODULE_5_invariant___default()( + Object(__WEBPACK_IMPORTED_MODULE_7_react_is__['isValidElementType'])(WrappedComponent), + 'You must pass a component to the function returned by ' + + (methodName + '. Instead received ' + JSON.stringify(WrappedComponent)), + ); + var wrappedComponentName = WrappedComponent.displayName || WrappedComponent.name || 'Component'; + var displayName = getDisplayName(wrappedComponentName); + + var selectorFactoryOptions = Object( + __WEBPACK_IMPORTED_MODULE_2__babel_runtime_helpers_esm_extends__['a' /* default */], + )({}, connectOptions, { + getDisplayName: getDisplayName, + methodName: methodName, + renderCountProp: renderCountProp, + shouldHandleStateChanges: shouldHandleStateChanges, + storeKey: storeKey, + withRef: withRef, + displayName: displayName, + wrappedComponentName: wrappedComponentName, + WrappedComponent: WrappedComponent, // TODO Actually fix our use of componentWillReceiveProps + + /* eslint-disable react/no-deprecated */ + }); + + var Connect = + /*#__PURE__*/ + (function (_Component) { + Object( + __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_inheritsLoose__['a' /* default */], + )(Connect, _Component); + + function Connect(props, context) { + var _this; + + _this = _Component.call(this, props, context) || this; + _this.version = version; + _this.state = {}; + _this.renderCount = 0; + _this.store = props[storeKey] || context[storeKey]; + _this.propsMode = Boolean(props[storeKey]); + _this.setWrappedInstance = _this.setWrappedInstance.bind( + Object( + __WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_esm_assertThisInitialized__[ + 'a' /* default */ + ], + )( + Object( + __WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_esm_assertThisInitialized__[ + 'a' /* default */ + ], + )(_this), + ), + ); + __WEBPACK_IMPORTED_MODULE_5_invariant___default()( + _this.store, + 'Could not find "' + + storeKey + + '" in either the context or props of ' + + ('"' + displayName + '". Either wrap the root component in a <Provider>, ') + + ('or explicitly pass "' + storeKey + '" as a prop to "' + displayName + '".'), + ); + + _this.initSelector(); + + _this.initSubscription(); + + return _this; + } + + var _proto = Connect.prototype; + + _proto.getChildContext = function getChildContext() { + var _ref3; + + // If this component received store from props, its subscription should be transparent + // to any descendants receiving store+subscription from context; it passes along + // subscription passed to it. Otherwise, it shadows the parent subscription, which allows + // Connect to control ordering of notifications to flow top-down. + var subscription = this.propsMode ? null : this.subscription; + return ( + (_ref3 = {}), + (_ref3[subscriptionKey] = subscription || this.context[subscriptionKey]), + _ref3 + ); + }; + + _proto.componentDidMount = function componentDidMount() { + if (!shouldHandleStateChanges) return; // componentWillMount fires during server side rendering, but componentDidMount and + // componentWillUnmount do not. Because of this, trySubscribe happens during ...didMount. + // Otherwise, unsubscription would never take place during SSR, causing a memory leak. + // To handle the case where a child component may have triggered a state change by + // dispatching an action in its componentWillMount, we have to re-run the select and maybe + // re-render. + + this.subscription.trySubscribe(); + this.selector.run(this.props); + if (this.selector.shouldComponentUpdate) this.forceUpdate(); + }; // Note: this is renamed below to the UNSAFE_ version in React >=16.3.0 + + _proto.componentWillReceiveProps = function componentWillReceiveProps(nextProps) { + this.selector.run(nextProps); + }; + + _proto.shouldComponentUpdate = function shouldComponentUpdate() { + return this.selector.shouldComponentUpdate; + }; + + _proto.componentWillUnmount = function componentWillUnmount() { + if (this.subscription) this.subscription.tryUnsubscribe(); + this.subscription = null; + this.notifyNestedSubs = noop; + this.store = null; + this.selector.run = noop; + this.selector.shouldComponentUpdate = false; + }; + + _proto.getWrappedInstance = function getWrappedInstance() { + __WEBPACK_IMPORTED_MODULE_5_invariant___default()( + withRef, + 'To access the wrapped instance, you need to specify ' + + ('{ withRef: true } in the options argument of the ' + methodName + '() call.'), + ); + return this.wrappedInstance; + }; + + _proto.setWrappedInstance = function setWrappedInstance(ref) { + this.wrappedInstance = ref; + }; + + _proto.initSelector = function initSelector() { + var sourceSelector = selectorFactory(this.store.dispatch, selectorFactoryOptions); + this.selector = makeSelectorStateful(sourceSelector, this.store); + this.selector.run(this.props); + }; + + _proto.initSubscription = function initSubscription() { + if (!shouldHandleStateChanges) return; // parentSub's source should match where store came from: props vs. context. A component + // connected to the store via props shouldn't use subscription from context, or vice versa. + + var parentSub = (this.propsMode ? this.props : this.context)[subscriptionKey]; + this.subscription = new __WEBPACK_IMPORTED_MODULE_8__utils_Subscription__['a' /* default */]( + this.store, + parentSub, + this.onStateChange.bind(this), + ); // `notifyNestedSubs` is duplicated to handle the case where the component is unmounted in + // the middle of the notification loop, where `this.subscription` will then be null. An + // extra null check every change can be avoided by copying the method onto `this` and then + // replacing it with a no-op on unmount. This can probably be avoided if Subscription's + // listeners logic is changed to not call listeners that have been unsubscribed in the + // middle of the notification loop. + + this.notifyNestedSubs = this.subscription.notifyNestedSubs.bind(this.subscription); + }; + + _proto.onStateChange = function onStateChange() { + this.selector.run(this.props); + + if (!this.selector.shouldComponentUpdate) { + this.notifyNestedSubs(); + } else { + this.componentDidUpdate = this.notifyNestedSubsOnComponentDidUpdate; + this.setState(dummyState); + } + }; + + _proto.notifyNestedSubsOnComponentDidUpdate = function notifyNestedSubsOnComponentDidUpdate() { + // `componentDidUpdate` is conditionally implemented when `onStateChange` determines it + // needs to notify nested subs. Once called, it unimplements itself until further state + // changes occur. Doing it this way vs having a permanent `componentDidUpdate` that does + // a boolean check every time avoids an extra method call most of the time, resulting + // in some perf boost. + this.componentDidUpdate = undefined; + this.notifyNestedSubs(); + }; + + _proto.isSubscribed = function isSubscribed() { + return Boolean(this.subscription) && this.subscription.isSubscribed(); + }; + + _proto.addExtraProps = function addExtraProps(props) { + if (!withRef && !renderCountProp && !(this.propsMode && this.subscription)) return props; // make a shallow copy so that fields added don't leak to the original selector. + // this is especially important for 'ref' since that's a reference back to the component + // instance. a singleton memoized selector would then be holding a reference to the + // instance, preventing the instance from being garbage collected, and that would be bad + + var withExtras = Object( + __WEBPACK_IMPORTED_MODULE_2__babel_runtime_helpers_esm_extends__['a' /* default */], + )({}, props); + + if (withRef) withExtras.ref = this.setWrappedInstance; + if (renderCountProp) withExtras[renderCountProp] = this.renderCount++; + if (this.propsMode && this.subscription) withExtras[subscriptionKey] = this.subscription; + return withExtras; + }; + + _proto.render = function render() { + var selector = this.selector; + selector.shouldComponentUpdate = false; + + if (selector.error) { + throw selector.error; + } else { + return Object(__WEBPACK_IMPORTED_MODULE_6_react__['createElement'])( + WrappedComponent, + this.addExtraProps(selector.props), + ); + } + }; + + return Connect; + })(__WEBPACK_IMPORTED_MODULE_6_react__['Component']); + + if (prefixUnsafeLifecycleMethods) { + // Use UNSAFE_ event name where supported + Connect.prototype.UNSAFE_componentWillReceiveProps = Connect.prototype.componentWillReceiveProps; + delete Connect.prototype.componentWillReceiveProps; + } + /* eslint-enable react/no-deprecated */ + + Connect.WrappedComponent = WrappedComponent; + Connect.displayName = displayName; + Connect.childContextTypes = childContextTypes; + Connect.contextTypes = contextTypes; + Connect.propTypes = contextTypes; + + if (true) { + // Use UNSAFE_ event name where supported + var eventName = prefixUnsafeLifecycleMethods + ? 'UNSAFE_componentWillUpdate' + : 'componentWillUpdate'; + + Connect.prototype[eventName] = function componentWillUpdate() { + var _this2 = this; + + // We are hot reloading! + if (this.version !== version) { + this.version = version; + this.initSelector(); // If any connected descendants don't hot reload (and resubscribe in the process), their + // listeners will be lost when we unsubscribe. Unfortunately, by copying over all + // listeners, this does mean that the old versions of connected descendants will still be + // notified of state changes; however, their onStateChange function is a no-op so this + // isn't a huge deal. + + var oldListeners = []; + + if (this.subscription) { + oldListeners = this.subscription.listeners.get(); + this.subscription.tryUnsubscribe(); + } + + this.initSubscription(); + + if (shouldHandleStateChanges) { + this.subscription.trySubscribe(); + oldListeners.forEach(function (listener) { + return _this2.subscription.listeners.subscribe(listener); + }); + } + } + }; + } + + return __WEBPACK_IMPORTED_MODULE_4_hoist_non_react_statics___default()(Connect, WrappedComponent); + }; + } + + /***/ + }, + /* 247 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = wrapMapToPropsConstant; + /* unused harmony export getDependsOnOwnProps */ + /* harmony export (immutable) */ __webpack_exports__['b'] = wrapMapToPropsFunc; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils_verifyPlainObject__ = + __webpack_require__(248); + + function wrapMapToPropsConstant(getConstant) { + return function initConstantSelector(dispatch, options) { + var constant = getConstant(dispatch, options); + + function constantSelector() { + return constant; + } + + constantSelector.dependsOnOwnProps = false; + return constantSelector; + }; + } // dependsOnOwnProps is used by createMapToPropsProxy to determine whether to pass props as args + // to the mapToProps function being wrapped. It is also used by makePurePropsSelector to determine + // whether mapToProps needs to be invoked when props have changed. + // + // A length of one signals that mapToProps does not depend on props from the parent component. + // A length of zero is assumed to mean mapToProps is getting args via arguments or ...args and + // therefore not reporting its length accurately.. + + function getDependsOnOwnProps(mapToProps) { + return mapToProps.dependsOnOwnProps !== null && mapToProps.dependsOnOwnProps !== undefined + ? Boolean(mapToProps.dependsOnOwnProps) + : mapToProps.length !== 1; + } // Used by whenMapStateToPropsIsFunction and whenMapDispatchToPropsIsFunction, + // this function wraps mapToProps in a proxy function which does several things: + // + // * Detects whether the mapToProps function being called depends on props, which + // is used by selectorFactory to decide if it should reinvoke on props changes. + // + // * On first call, handles mapToProps if returns another function, and treats that + // new function as the true mapToProps for subsequent calls. + // + // * On first call, verifies the first result is a plain object, in order to warn + // the developer that their mapToProps function is not returning a valid result. + // + + function wrapMapToPropsFunc(mapToProps, methodName) { + return function initProxySelector(dispatch, _ref) { + var displayName = _ref.displayName; + + var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) { + return proxy.dependsOnOwnProps + ? proxy.mapToProps(stateOrDispatch, ownProps) + : proxy.mapToProps(stateOrDispatch); + }; // allow detectFactoryAndVerify to get ownProps + + proxy.dependsOnOwnProps = true; + + proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) { + proxy.mapToProps = mapToProps; + proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps); + var props = proxy(stateOrDispatch, ownProps); + + if (typeof props === 'function') { + proxy.mapToProps = props; + proxy.dependsOnOwnProps = getDependsOnOwnProps(props); + props = proxy(stateOrDispatch, ownProps); + } + + if (true) + Object(__WEBPACK_IMPORTED_MODULE_0__utils_verifyPlainObject__['a' /* default */])( + props, + displayName, + methodName, + ); + return props; + }; + + return proxy; + }; + } + + /***/ + }, + /* 248 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = verifyPlainObject; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isPlainObject__ = __webpack_require__(576); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__warning__ = __webpack_require__(163); + + function verifyPlainObject(value, displayName, methodName) { + if (!Object(__WEBPACK_IMPORTED_MODULE_0__isPlainObject__['a' /* default */])(value)) { + Object(__WEBPACK_IMPORTED_MODULE_1__warning__['a' /* default */])( + methodName + + '() in ' + + displayName + + ' must return a plain object. Instead received ' + + value + + '.', + ); + } + } + + /***/ + }, + /* 249 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + function createThunkMiddleware(extraArgument) { + return function (_ref) { + var dispatch = _ref.dispatch, + getState = _ref.getState; + return function (next) { + return function (action) { + if (typeof action === 'function') { + return action(dispatch, getState, extraArgument); + } + + return next(action); + }; + }; + }; + } + + var thunk = createThunkMiddleware(); + thunk.withExtraArgument = createThunkMiddleware; + + /* harmony default export */ __webpack_exports__['a'] = thunk; + + /***/ + }, + /* 250 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__HelloWorldReducer__ = __webpack_require__(581); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__RailsContextReducer__ = __webpack_require__(582); + + // This is how you do a directory of reducers. + // The `import * as reducers` does not work for a directory, but only with a single file + var _default = { + helloWorldData: __WEBPACK_IMPORTED_MODULE_0__HelloWorldReducer__['a' /* default */], + railsContext: __WEBPACK_IMPORTED_MODULE_1__RailsContextReducer__['a' /* default */], + }; + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/reducers/reducersIndex.jsx', + ); + })(); + + /***/ + }, + /* 251 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'a', function () { + return HELLO_WORLD_NAME_UPDATE; + }); + /* eslint-disable import/prefer-default-export */ + var HELLO_WORLD_NAME_UPDATE = 'HELLO_WORLD_NAME_UPDATE'; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + HELLO_WORLD_NAME_UPDATE, + 'HELLO_WORLD_NAME_UPDATE', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/constants/HelloWorldConstants.jsx', + ); + })(); + + /***/ + }, + /* 252 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(10); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_redux__ = __webpack_require__(162); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_redux__ = __webpack_require__(109); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__HelloWorldRedux__ = __webpack_require__(584); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__actions_HelloWorldActions__ = + __webpack_require__(585); + + var HelloWorldContainer = function HelloWorldContainer(_ref) { + var actions = _ref.actions, + data = _ref.data, + railsContext = _ref.railsContext; + return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_4__HelloWorldRedux__['a' /* default */], + { actions: actions, data: data, railsContext: railsContext }, + ); + }; + HelloWorldContainer.propTypes = { + actions: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object.isRequired, + data: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object.isRequired, + railsContext: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object.isRequired, + }; + + function mapStateToProps(state) { + return { + data: state.helloWorldData, + railsContext: state.railsContext, + }; + } + + function mapDispatchToProps(dispatch) { + return { + actions: Object(__WEBPACK_IMPORTED_MODULE_3_redux__['b' /* bindActionCreators */])( + __WEBPACK_IMPORTED_MODULE_5__actions_HelloWorldActions__, + dispatch, + ), + }; + } + + // Don't forget to actually use connect! + + var _default = Object(__WEBPACK_IMPORTED_MODULE_2_react_redux__['b' /* connect */])( + mapStateToProps, + mapDispatchToProps, + )(HelloWorldContainer); + + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + HelloWorldContainer, + 'HelloWorldContainer', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/HelloWorldContainer.jsx', + ); + + __REACT_HOT_LOADER__.register( + mapStateToProps, + 'mapStateToProps', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/HelloWorldContainer.jsx', + ); + + __REACT_HOT_LOADER__.register( + mapDispatchToProps, + 'mapDispatchToProps', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/HelloWorldContainer.jsx', + ); + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/HelloWorldContainer.jsx', + ); + })(); + + /***/ + }, + /* 253 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = createTransitionManager; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__routerWarning__ = __webpack_require__(70); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__computeChangedRoutes__ = __webpack_require__(589); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__TransitionUtils__ = __webpack_require__(590); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isActive__ = __webpack_require__(591); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__getComponents__ = __webpack_require__(592); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__matchRoutes__ = __webpack_require__(593); + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + function hasAnyProperties(object) { + for (var p in object) { + if (Object.prototype.hasOwnProperty.call(object, p)) return true; + } + return false; + } + + function createTransitionManager(history, routes) { + var state = {}; + + var _getTransitionUtils = Object(__WEBPACK_IMPORTED_MODULE_2__TransitionUtils__['a' /* default */])(), + runEnterHooks = _getTransitionUtils.runEnterHooks, + runChangeHooks = _getTransitionUtils.runChangeHooks, + runLeaveHooks = _getTransitionUtils.runLeaveHooks; + + // Signature should be (location, indexOnly), but needs to support (path, + // query, indexOnly) + + function isActive(location, indexOnly) { + location = history.createLocation(location); + + return Object(__WEBPACK_IMPORTED_MODULE_3__isActive__['a' /* default */])( + location, + indexOnly, + state.location, + state.routes, + state.params, + ); + } + + var partialNextState = void 0; + + function match(location, callback) { + if (partialNextState && partialNextState.location === location) { + // Continue from where we left off. + finishMatch(partialNextState, callback); + } else { + Object(__WEBPACK_IMPORTED_MODULE_5__matchRoutes__['a' /* default */])( + routes, + location, + function (error, nextState) { + if (error) { + callback(error); + } else if (nextState) { + finishMatch(_extends({}, nextState, { location: location }), callback); + } else { + callback(); + } + }, + ); + } + } + + function finishMatch(nextState, callback) { + var _computeChangedRoutes = Object( + __WEBPACK_IMPORTED_MODULE_1__computeChangedRoutes__['a' /* default */], + )(state, nextState), + leaveRoutes = _computeChangedRoutes.leaveRoutes, + changeRoutes = _computeChangedRoutes.changeRoutes, + enterRoutes = _computeChangedRoutes.enterRoutes; + + runLeaveHooks(leaveRoutes, state); + + // Tear down confirmation hooks for left routes + leaveRoutes + .filter(function (route) { + return enterRoutes.indexOf(route) === -1; + }) + .forEach(removeListenBeforeHooksForRoute); + + // change and enter hooks are run in series + runChangeHooks(changeRoutes, state, nextState, function (error, redirectInfo) { + if (error || redirectInfo) return handleErrorOrRedirect(error, redirectInfo); + + runEnterHooks(enterRoutes, nextState, finishEnterHooks); + }); + + function finishEnterHooks(error, redirectInfo) { + if (error || redirectInfo) return handleErrorOrRedirect(error, redirectInfo); + + // TODO: Fetch components after state is updated. + Object(__WEBPACK_IMPORTED_MODULE_4__getComponents__['a' /* default */])( + nextState, + function (error, components) { + if (error) { + callback(error); + } else { + // TODO: Make match a pure function and have some other API + // for "match and update state". + callback(null, null, (state = _extends({}, nextState, { components: components }))); + } + }, + ); + } + + function handleErrorOrRedirect(error, redirectInfo) { + if (error) callback(error); + else callback(null, redirectInfo); + } + } + + var RouteGuid = 1; + + function getRouteID(route) { + var create = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + + return route.__id__ || (create && (route.__id__ = RouteGuid++)); + } + + var RouteHooks = Object.create(null); + + function getRouteHooksForRoutes(routes) { + return routes + .map(function (route) { + return RouteHooks[getRouteID(route)]; + }) + .filter(function (hook) { + return hook; + }); + } + + function transitionHook(location, callback) { + Object(__WEBPACK_IMPORTED_MODULE_5__matchRoutes__['a' /* default */])( + routes, + location, + function (error, nextState) { + if (nextState == null) { + // TODO: We didn't actually match anything, but hang + // onto error/nextState so we don't have to matchRoutes + // again in the listen callback. + callback(); + return; + } + + // Cache some state here so we don't have to + // matchRoutes() again in the listen callback. + partialNextState = _extends({}, nextState, { location: location }); + + var hooks = getRouteHooksForRoutes( + Object(__WEBPACK_IMPORTED_MODULE_1__computeChangedRoutes__['a' /* default */])( + state, + partialNextState, + ).leaveRoutes, + ); + + var result = void 0; + for (var i = 0, len = hooks.length; result == null && i < len; ++i) { + // Passing the location arg here indicates to + // the user that this is a transition hook. + result = hooks[i](location); + } + + callback(result); + }, + ); + } + + /* istanbul ignore next: untestable with Karma */ + function beforeUnloadHook() { + // Synchronously check to see if any route hooks want + // to prevent the current window/tab from closing. + if (state.routes) { + var hooks = getRouteHooksForRoutes(state.routes); + + var message = void 0; + for (var i = 0, len = hooks.length; typeof message !== 'string' && i < len; ++i) { + // Passing no args indicates to the user that this is a + // beforeunload hook. We don't know the next location. + message = hooks[i](); + } + + return message; + } + } + + var unlistenBefore = void 0, + unlistenBeforeUnload = void 0; + + function removeListenBeforeHooksForRoute(route) { + var routeID = getRouteID(route); + if (!routeID) { + return; + } + + delete RouteHooks[routeID]; + + if (!hasAnyProperties(RouteHooks)) { + // teardown transition & beforeunload hooks + if (unlistenBefore) { + unlistenBefore(); + unlistenBefore = null; + } + + if (unlistenBeforeUnload) { + unlistenBeforeUnload(); + unlistenBeforeUnload = null; + } + } + } + + /** + * Registers the given hook function to run before leaving the given route. + * + * During a normal transition, the hook function receives the next location + * as its only argument and can return either a prompt message (string) to show the user, + * to make sure they want to leave the page; or `false`, to prevent the transition. + * Any other return value will have no effect. + * + * During the beforeunload event (in browsers) the hook receives no arguments. + * In this case it must return a prompt message to prevent the transition. + * + * Returns a function that may be used to unbind the listener. + */ + function listenBeforeLeavingRoute(route, hook) { + var thereWereNoRouteHooks = !hasAnyProperties(RouteHooks); + var routeID = getRouteID(route, true); + + RouteHooks[routeID] = hook; + + if (thereWereNoRouteHooks) { + // setup transition & beforeunload hooks + unlistenBefore = history.listenBefore(transitionHook); + + if (history.listenBeforeUnload) + unlistenBeforeUnload = history.listenBeforeUnload(beforeUnloadHook); + } + + return function () { + removeListenBeforeHooksForRoute(route); + }; + } + + /** + * This is the API for stateful environments. As the location + * changes, we update state and call the listener. We can also + * gracefully handle errors and redirects. + */ + function listen(listener) { + function historyListener(location) { + if (state.location === location) { + listener(null, state); + } else { + match(location, function (error, redirectLocation, nextState) { + if (error) { + listener(error); + } else if (redirectLocation) { + history.replace(redirectLocation); + } else if (nextState) { + listener(null, nextState); + } else { + true + ? Object(__WEBPACK_IMPORTED_MODULE_0__routerWarning__['a' /* default */])( + false, + 'Location "%s" did not match any routes', + location.pathname + location.search + location.hash, + ) + : void 0; + } + }); + } + } + + // TODO: Only use a single history listener. Otherwise we'll end up with + // multiple concurrent calls to match. + + // Set up the history listener first in case the initial match redirects. + var unsubscribe = history.listen(historyListener); + + if (state.location) { + // Picking up on a matchContext. + listener(null, state); + } else { + historyListener(history.getCurrentLocation()); + } + + return unsubscribe; + } + + return { + isActive: isActive, + match: match, + listenBeforeLeavingRoute: listenBeforeLeavingRoute, + listen: listen, + }; + } + + /***/ + }, + /* 254 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = isPromise; + function isPromise(obj) { + return obj && typeof obj.then === 'function'; + } + + /***/ + }, + /* 255 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['b'] = createRouterObject; + /* harmony export (immutable) */ __webpack_exports__['a'] = assignRouterState; + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + function createRouterObject(history, transitionManager, state) { + var router = _extends({}, history, { + setRouteLeaveHook: transitionManager.listenBeforeLeavingRoute, + isActive: transitionManager.isActive, + }); + + return assignRouterState(router, state); + } + + function assignRouterState(router, _ref) { + var location = _ref.location, + params = _ref.params, + routes = _ref.routes; + + router.location = location; + router.params = params; + router.routes = routes; + + return router; + } + + /***/ + }, + /* 256 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_create_react_class__ = __webpack_require__(37); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_create_react_class___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_create_react_class__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types__ = __webpack_require__(10); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_2_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_invariant__ = __webpack_require__(14); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_invariant___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_3_invariant__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__PropTypes__ = __webpack_require__(169); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__ContextUtils__ = __webpack_require__(168); + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + function _objectWithoutProperties(obj, keys) { + var target = {}; + for (var i in obj) { + if (keys.indexOf(i) >= 0) continue; + if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; + target[i] = obj[i]; + } + return target; + } + + function isLeftClickEvent(event) { + return event.button === 0; + } + + function isModifiedEvent(event) { + return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey); + } + + // TODO: De-duplicate against hasAnyProperties in createTransitionManager. + function isEmptyObject(object) { + for (var p in object) { + if (Object.prototype.hasOwnProperty.call(object, p)) return false; + } + return true; + } + + function resolveToLocation(to, router) { + return typeof to === 'function' ? to(router.location) : to; + } + + /** + * A <Link> is used to create an <a> element that links to a route. + * When that route is active, the link gets the value of its + * activeClassName prop. + * + * For example, assuming you have the following route: + * + * <Route path="/posts/:postID" component={Post} /> + * + * You could use the following component to link to that route: + * + * <Link to={`/posts/${post.id}`} /> + */ + var Link = __WEBPACK_IMPORTED_MODULE_1_create_react_class___default()({ + displayName: 'Link', + + mixins: [Object(__WEBPACK_IMPORTED_MODULE_5__ContextUtils__['b' /* ContextSubscriber */])('router')], + + contextTypes: { + router: __WEBPACK_IMPORTED_MODULE_4__PropTypes__['a' /* routerShape */], + }, + + propTypes: { + to: Object(__WEBPACK_IMPORTED_MODULE_2_prop_types__['oneOfType'])([ + __WEBPACK_IMPORTED_MODULE_2_prop_types__['string'], + __WEBPACK_IMPORTED_MODULE_2_prop_types__['object'], + __WEBPACK_IMPORTED_MODULE_2_prop_types__['func'], + ]), + activeStyle: __WEBPACK_IMPORTED_MODULE_2_prop_types__['object'], + activeClassName: __WEBPACK_IMPORTED_MODULE_2_prop_types__['string'], + onlyActiveOnIndex: __WEBPACK_IMPORTED_MODULE_2_prop_types__['bool'].isRequired, + onClick: __WEBPACK_IMPORTED_MODULE_2_prop_types__['func'], + target: __WEBPACK_IMPORTED_MODULE_2_prop_types__['string'], + }, + + getDefaultProps: function getDefaultProps() { + return { + onlyActiveOnIndex: false, + style: {}, + }; + }, + handleClick: function handleClick(event) { + if (this.props.onClick) this.props.onClick(event); + + if (event.defaultPrevented) return; + + var router = this.context.router; + + !router + ? true + ? __WEBPACK_IMPORTED_MODULE_3_invariant___default()( + false, + '<Link>s rendered outside of a router context cannot navigate.', + ) + : invariant(false) + : void 0; + + if (isModifiedEvent(event) || !isLeftClickEvent(event)) return; + + // If target prop is set (e.g. to "_blank"), let browser handle link. + /* istanbul ignore if: untestable with Karma */ + if (this.props.target) return; + + event.preventDefault(); + + router.push(resolveToLocation(this.props.to, router)); + }, + render: function render() { + var _props = this.props, + to = _props.to, + activeClassName = _props.activeClassName, + activeStyle = _props.activeStyle, + onlyActiveOnIndex = _props.onlyActiveOnIndex, + props = _objectWithoutProperties(_props, [ + 'to', + 'activeClassName', + 'activeStyle', + 'onlyActiveOnIndex', + ]); + + // Ignore if rendered outside the context of router to simplify unit testing. + + var router = this.context.router; + + if (router) { + // If user does not specify a `to` prop, return an empty anchor tag. + if (!to) { + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('a', props); + } + + var toLocation = resolveToLocation(to, router); + props.href = router.createHref(toLocation); + + if (activeClassName || (activeStyle != null && !isEmptyObject(activeStyle))) { + if (router.isActive(toLocation, onlyActiveOnIndex)) { + if (activeClassName) { + if (props.className) { + props.className += ' ' + activeClassName; + } else { + props.className = activeClassName; + } + } + + if (activeStyle) props.style = _extends({}, props.style, activeStyle); + } + } + } + + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'a', + _extends({}, props, { onClick: this.handleClick }), + ); + }, + }); + + /* harmony default export */ __webpack_exports__['a'] = Link; + + /***/ + }, + /* 257 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_create_react_class__ = __webpack_require__(37); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_create_react_class___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_create_react_class__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(10); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant__ = __webpack_require__(14); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_2_invariant__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__RouteUtils__ = __webpack_require__(47); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__PatternUtils__ = __webpack_require__(71); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__ = __webpack_require__(85); + + /** + * A <Redirect> is used to declare another URL path a client should + * be sent to when they request a given URL. + * + * Redirects are placed alongside routes in the route configuration + * and are traversed in the same manner. + */ + /* eslint-disable react/require-render-return */ + var Redirect = __WEBPACK_IMPORTED_MODULE_0_create_react_class___default()({ + displayName: 'Redirect', + + statics: { + createRouteFromReactElement: function createRouteFromReactElement(element) { + var route = Object( + __WEBPACK_IMPORTED_MODULE_3__RouteUtils__['a' /* createRouteFromReactElement */], + )(element); + + if (route.from) route.path = route.from; + + route.onEnter = function (nextState, replace) { + var location = nextState.location, + params = nextState.params; + + var pathname = void 0; + if (route.to.charAt(0) === '/') { + pathname = Object(__WEBPACK_IMPORTED_MODULE_4__PatternUtils__['a' /* formatPattern */])( + route.to, + params, + ); + } else if (!route.to) { + pathname = location.pathname; + } else { + var routeIndex = nextState.routes.indexOf(route); + var parentPattern = Redirect.getRoutePattern(nextState.routes, routeIndex - 1); + var pattern = parentPattern.replace(/\/*$/, '/') + route.to; + pathname = Object(__WEBPACK_IMPORTED_MODULE_4__PatternUtils__['a' /* formatPattern */])( + pattern, + params, + ); + } + + replace({ + pathname: pathname, + query: route.query || location.query, + state: route.state || location.state, + }); + }; + + return route; + }, + getRoutePattern: function getRoutePattern(routes, routeIndex) { + var parentPattern = ''; + + for (var i = routeIndex; i >= 0; i--) { + var route = routes[i]; + var pattern = route.path || ''; + + parentPattern = pattern.replace(/\/*$/, '/') + parentPattern; + + if (pattern.indexOf('/') === 0) break; + } + + return '/' + parentPattern; + }, + }, + + propTypes: { + path: __WEBPACK_IMPORTED_MODULE_1_prop_types__['string'], + from: __WEBPACK_IMPORTED_MODULE_1_prop_types__['string'], // Alias for path + to: __WEBPACK_IMPORTED_MODULE_1_prop_types__['string'].isRequired, + query: __WEBPACK_IMPORTED_MODULE_1_prop_types__['object'], + state: __WEBPACK_IMPORTED_MODULE_1_prop_types__['object'], + onEnter: __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__['c' /* falsy */], + children: __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__['c' /* falsy */], + }, + + /* istanbul ignore next: sanity check */ + render: function render() { + true + ? true + ? __WEBPACK_IMPORTED_MODULE_2_invariant___default()( + false, + '<Redirect> elements are for router configuration only and should not be rendered', + ) + : invariant(false) + : void 0; + }, + }); + + /* harmony default export */ __webpack_exports__['a'] = Redirect; + + /***/ + }, + /* 258 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = createMemoryHistory; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries__ = + __webpack_require__(259); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename__ = + __webpack_require__(260); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_history_lib_createMemoryHistory__ = + __webpack_require__(604); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_history_lib_createMemoryHistory___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_history_lib_createMemoryHistory__); + + function createMemoryHistory(options) { + // signatures and type checking differ between `useQueries` and + // `createMemoryHistory`, have to create `memoryHistory` first because + // `useQueries` doesn't understand the signature + var memoryHistory = __WEBPACK_IMPORTED_MODULE_2_history_lib_createMemoryHistory___default()(options); + var createHistory = function createHistory() { + return memoryHistory; + }; + var history = __WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries___default()( + __WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename___default()(createHistory), + )(options); + return history; + } + + /***/ + }, + /* 259 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + var _queryString = __webpack_require__(602); + + var _runTransitionHook = __webpack_require__(170); + + var _runTransitionHook2 = _interopRequireDefault(_runTransitionHook); + + var _LocationUtils = __webpack_require__(72); + + var _PathUtils = __webpack_require__(48); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + var defaultStringifyQuery = function defaultStringifyQuery(query) { + return (0, _queryString.stringify)(query).replace(/%20/g, '+'); + }; + + var defaultParseQueryString = _queryString.parse; + + /** + * Returns a new createHistory function that may be used to create + * history objects that know how to handle URL queries. + */ + var useQueries = function useQueries(createHistory) { + return function () { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + + var history = createHistory(options); + var stringifyQuery = options.stringifyQuery, + parseQueryString = options.parseQueryString; + + if (typeof stringifyQuery !== 'function') stringifyQuery = defaultStringifyQuery; + + if (typeof parseQueryString !== 'function') parseQueryString = defaultParseQueryString; + + var decodeQuery = function decodeQuery(location) { + if (!location) return location; + + if (location.query == null) location.query = parseQueryString(location.search.substring(1)); + + return location; + }; + + var encodeQuery = function encodeQuery(location, query) { + if (query == null) return location; + + var object = typeof location === 'string' ? (0, _PathUtils.parsePath)(location) : location; + var queryString = stringifyQuery(query); + var search = queryString ? '?' + queryString : ''; + + return _extends({}, object, { + search: search, + }); + }; + + // Override all read methods with query-aware versions. + var getCurrentLocation = function getCurrentLocation() { + return decodeQuery(history.getCurrentLocation()); + }; + + var listenBefore = function listenBefore(hook) { + return history.listenBefore(function (location, callback) { + return (0, _runTransitionHook2.default)(hook, decodeQuery(location), callback); + }); + }; + + var listen = function listen(listener) { + return history.listen(function (location) { + return listener(decodeQuery(location)); + }); + }; + + // Override all write methods with query-aware versions. + var push = function push(location) { + return history.push(encodeQuery(location, location.query)); + }; + + var replace = function replace(location) { + return history.replace(encodeQuery(location, location.query)); + }; + + var createPath = function createPath(location) { + return history.createPath(encodeQuery(location, location.query)); + }; + + var createHref = function createHref(location) { + return history.createHref(encodeQuery(location, location.query)); + }; + + var createLocation = function createLocation(location) { + for ( + var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; + _key < _len; + _key++ + ) { + args[_key - 1] = arguments[_key]; + } + + var newLocation = history.createLocation.apply( + history, + [encodeQuery(location, location.query)].concat(args), + ); + + if (location.query) newLocation.query = (0, _LocationUtils.createQuery)(location.query); + + return decodeQuery(newLocation); + }; + + return _extends({}, history, { + getCurrentLocation: getCurrentLocation, + listenBefore: listenBefore, + listen: listen, + push: push, + replace: replace, + createPath: createPath, + createHref: createHref, + createLocation: createLocation, + }); + }; + }; + + exports.default = useQueries; + + /***/ + }, + /* 260 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + var _runTransitionHook = __webpack_require__(170); + + var _runTransitionHook2 = _interopRequireDefault(_runTransitionHook); + + var _PathUtils = __webpack_require__(48); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + var useBasename = function useBasename(createHistory) { + return function () { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + + var history = createHistory(options); + var basename = options.basename; + + var addBasename = function addBasename(location) { + if (!location) return location; + + if (basename && location.basename == null) { + if (location.pathname.toLowerCase().indexOf(basename.toLowerCase()) === 0) { + location.pathname = location.pathname.substring(basename.length); + location.basename = basename; + + if (location.pathname === '') location.pathname = '/'; + } else { + location.basename = ''; + } + } + + return location; + }; + + var prependBasename = function prependBasename(location) { + if (!basename) return location; + + var object = typeof location === 'string' ? (0, _PathUtils.parsePath)(location) : location; + var pname = object.pathname; + var normalizedBasename = basename.slice(-1) === '/' ? basename : basename + '/'; + var normalizedPathname = pname.charAt(0) === '/' ? pname.slice(1) : pname; + var pathname = normalizedBasename + normalizedPathname; + + return _extends({}, object, { + pathname: pathname, + }); + }; + + // Override all read methods with basename-aware versions. + var getCurrentLocation = function getCurrentLocation() { + return addBasename(history.getCurrentLocation()); + }; + + var listenBefore = function listenBefore(hook) { + return history.listenBefore(function (location, callback) { + return (0, _runTransitionHook2.default)(hook, addBasename(location), callback); + }); + }; + + var listen = function listen(listener) { + return history.listen(function (location) { + return listener(addBasename(location)); + }); + }; + + // Override all write methods with basename-aware versions. + var push = function push(location) { + return history.push(prependBasename(location)); + }; + + var replace = function replace(location) { + return history.replace(prependBasename(location)); + }; + + var createPath = function createPath(location) { + return history.createPath(prependBasename(location)); + }; + + var createHref = function createHref(location) { + return history.createHref(prependBasename(location)); + }; + + var createLocation = function createLocation(location) { + for ( + var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; + _key < _len; + _key++ + ) { + args[_key - 1] = arguments[_key]; + } + + return addBasename( + history.createLocation.apply(history, [prependBasename(location)].concat(args)), + ); + }; + + return _extends({}, history, { + getCurrentLocation: getCurrentLocation, + listenBefore: listenBefore, + listen: listen, + push: push, + replace: replace, + createPath: createPath, + createHref: createHref, + createLocation: createLocation, + }); + }; + }; + + exports.default = useBasename; + + /***/ + }, + /* 261 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = useRouterHistory; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries__ = + __webpack_require__(259); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename__ = + __webpack_require__(260); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename__); + + function useRouterHistory(createHistory) { + return function (options) { + var history = __WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries___default()( + __WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename___default()(createHistory), + )(options); + return history; + }; + } + + /***/ + }, + /* 262 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + exports.readState = exports.saveState = undefined; + + var _warning = __webpack_require__(46); + + var _warning2 = _interopRequireDefault(_warning); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + var QuotaExceededErrors = { + QuotaExceededError: true, + QUOTA_EXCEEDED_ERR: true, + }; + + var SecurityErrors = { + SecurityError: true, + }; + + var KeyPrefix = '@@History/'; + + var createKey = function createKey(key) { + return KeyPrefix + key; + }; + + var saveState = (exports.saveState = function saveState(key, state) { + if (!window.sessionStorage) { + // Session storage is not available or hidden. + // sessionStorage is undefined in Internet Explorer when served via file protocol. + true + ? (0, _warning2.default)(false, '[history] Unable to save state; sessionStorage is not available') + : void 0; + + return; + } + + try { + if (state == null) { + window.sessionStorage.removeItem(createKey(key)); + } else { + window.sessionStorage.setItem(createKey(key), JSON.stringify(state)); + } + } catch (error) { + if (SecurityErrors[error.name]) { + // Blocking cookies in Chrome/Firefox/Safari throws SecurityError on any + // attempt to access window.sessionStorage. + true + ? (0, _warning2.default)( + false, + '[history] Unable to save state; sessionStorage is not available due to security settings', + ) + : void 0; + + return; + } + + if (QuotaExceededErrors[error.name] && window.sessionStorage.length === 0) { + // Safari "private mode" throws QuotaExceededError. + true + ? (0, _warning2.default)( + false, + '[history] Unable to save state; sessionStorage is not available in Safari private mode', + ) + : void 0; + + return; + } + + throw error; + } + }); + + var readState = (exports.readState = function readState(key) { + var json = void 0; + try { + json = window.sessionStorage.getItem(createKey(key)); + } catch (error) { + if (SecurityErrors[error.name]) { + // Blocking cookies in Chrome/Firefox/Safari throws SecurityError on any + // attempt to access window.sessionStorage. + true + ? (0, _warning2.default)( + false, + '[history] Unable to read state; sessionStorage is not available due to security settings', + ) + : void 0; + + return undefined; + } + } + + if (json) { + try { + return JSON.parse(json); + } catch (error) { + // Ignore invalid JSON. + } + } + + return undefined; + }); + + /***/ + }, + /* 263 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = createRouterHistory; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__useRouterHistory__ = __webpack_require__(261); + + var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement); + + function createRouterHistory(createHistory) { + var history = void 0; + if (canUseDOM) + history = Object(__WEBPACK_IMPORTED_MODULE_0__useRouterHistory__['a' /* default */])( + createHistory, + )(); + return history; + } + + /***/ + }, + /* 264 */ + /***/ function (module, exports, __webpack_require__) { + exports.__esModule = true; + exports.Helmet = undefined; + + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + var _react = __webpack_require__(1); + + var _react2 = _interopRequireDefault(_react); + + var _propTypes = __webpack_require__(10); + + var _propTypes2 = _interopRequireDefault(_propTypes); + + var _reactSideEffect = __webpack_require__(627); + + var _reactSideEffect2 = _interopRequireDefault(_reactSideEffect); + + var _reactFastCompare = __webpack_require__(629); + + var _reactFastCompare2 = _interopRequireDefault(_reactFastCompare); + + var _HelmetUtils = __webpack_require__(630); + + var _HelmetConstants = __webpack_require__(265); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + function _objectWithoutProperties(obj, keys) { + var target = {}; + for (var i in obj) { + if (keys.indexOf(i) >= 0) continue; + if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; + target[i] = obj[i]; + } + return target; + } + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + var Helmet = function Helmet(Component) { + var _class, _temp; + + return ( + (_temp = _class = + (function (_React$Component) { + _inherits(HelmetWrapper, _React$Component); + + function HelmetWrapper() { + _classCallCheck(this, HelmetWrapper); + + return _possibleConstructorReturn(this, _React$Component.apply(this, arguments)); + } + + HelmetWrapper.prototype.shouldComponentUpdate = function shouldComponentUpdate(nextProps) { + return !(0, _reactFastCompare2.default)(this.props, nextProps); + }; + + HelmetWrapper.prototype.mapNestedChildrenToProps = function mapNestedChildrenToProps( + child, + nestedChildren, + ) { + if (!nestedChildren) { + return null; + } + + switch (child.type) { + case _HelmetConstants.TAG_NAMES.SCRIPT: + case _HelmetConstants.TAG_NAMES.NOSCRIPT: + return { + innerHTML: nestedChildren, + }; + + case _HelmetConstants.TAG_NAMES.STYLE: + return { + cssText: nestedChildren, + }; + } + + throw new Error( + '<' + + child.type + + ' /> elements are self-closing and can not contain children. Refer to our API for more information.', + ); + }; + + HelmetWrapper.prototype.flattenArrayTypeChildren = function flattenArrayTypeChildren(_ref) { + var _extends2; + + var child = _ref.child, + arrayTypeChildren = _ref.arrayTypeChildren, + newChildProps = _ref.newChildProps, + nestedChildren = _ref.nestedChildren; + + return _extends( + {}, + arrayTypeChildren, + ((_extends2 = {}), + (_extends2[child.type] = [].concat(arrayTypeChildren[child.type] || [], [ + _extends({}, newChildProps, this.mapNestedChildrenToProps(child, nestedChildren)), + ])), + _extends2), + ); + }; + + HelmetWrapper.prototype.mapObjectTypeChildren = function mapObjectTypeChildren(_ref2) { + var _extends3, _extends4; + + var child = _ref2.child, + newProps = _ref2.newProps, + newChildProps = _ref2.newChildProps, + nestedChildren = _ref2.nestedChildren; + + switch (child.type) { + case _HelmetConstants.TAG_NAMES.TITLE: + return _extends( + {}, + newProps, + ((_extends3 = {}), + (_extends3[child.type] = nestedChildren), + (_extends3.titleAttributes = _extends({}, newChildProps)), + _extends3), + ); + + case _HelmetConstants.TAG_NAMES.BODY: + return _extends({}, newProps, { + bodyAttributes: _extends({}, newChildProps), + }); + + case _HelmetConstants.TAG_NAMES.HTML: + return _extends({}, newProps, { + htmlAttributes: _extends({}, newChildProps), + }); + } + + return _extends( + {}, + newProps, + ((_extends4 = {}), (_extends4[child.type] = _extends({}, newChildProps)), _extends4), + ); + }; + + HelmetWrapper.prototype.mapArrayTypeChildrenToProps = function mapArrayTypeChildrenToProps( + arrayTypeChildren, + newProps, + ) { + var newFlattenedProps = _extends({}, newProps); + + Object.keys(arrayTypeChildren).forEach(function (arrayChildName) { + var _extends5; + + newFlattenedProps = _extends( + {}, + newFlattenedProps, + ((_extends5 = {}), + (_extends5[arrayChildName] = arrayTypeChildren[arrayChildName]), + _extends5), + ); + }); + + return newFlattenedProps; + }; + + HelmetWrapper.prototype.warnOnInvalidChildren = function warnOnInvalidChildren( + child, + nestedChildren, + ) { + if (true) { + if ( + !_HelmetConstants.VALID_TAG_NAMES.some(function (name) { + return child.type === name; + }) + ) { + if (typeof child.type === 'function') { + return (0, _HelmetUtils.warn)( + 'You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information.', + ); + } + + return (0, _HelmetUtils.warn)( + 'Only elements types ' + + _HelmetConstants.VALID_TAG_NAMES.join(', ') + + ' are allowed. Helmet does not support rendering <' + + child.type + + '> elements. Refer to our API for more information.', + ); + } + + if ( + nestedChildren && + typeof nestedChildren !== 'string' && + (!Array.isArray(nestedChildren) || + nestedChildren.some(function (nestedChild) { + return typeof nestedChild !== 'string'; + })) + ) { + throw new Error( + 'Helmet expects a string as a child of <' + + child.type + + '>. Did you forget to wrap your children in braces? ( <' + + child.type + + '>{``}</' + + child.type + + '> ) Refer to our API for more information.', + ); + } + } + + return true; + }; + + HelmetWrapper.prototype.mapChildrenToProps = function mapChildrenToProps(children, newProps) { + var _this2 = this; + + var arrayTypeChildren = {}; + + _react2.default.Children.forEach(children, function (child) { + if (!child || !child.props) { + return; + } + + var _child$props = child.props, + nestedChildren = _child$props.children, + childProps = _objectWithoutProperties(_child$props, ['children']); + + var newChildProps = (0, _HelmetUtils.convertReactPropstoHtmlAttributes)(childProps); + + _this2.warnOnInvalidChildren(child, nestedChildren); + + switch (child.type) { + case _HelmetConstants.TAG_NAMES.LINK: + case _HelmetConstants.TAG_NAMES.META: + case _HelmetConstants.TAG_NAMES.NOSCRIPT: + case _HelmetConstants.TAG_NAMES.SCRIPT: + case _HelmetConstants.TAG_NAMES.STYLE: + arrayTypeChildren = _this2.flattenArrayTypeChildren({ + child: child, + arrayTypeChildren: arrayTypeChildren, + newChildProps: newChildProps, + nestedChildren: nestedChildren, + }); + break; + + default: + newProps = _this2.mapObjectTypeChildren({ + child: child, + newProps: newProps, + newChildProps: newChildProps, + nestedChildren: nestedChildren, + }); + break; + } + }); + + newProps = this.mapArrayTypeChildrenToProps(arrayTypeChildren, newProps); + return newProps; + }; + + HelmetWrapper.prototype.render = function render() { + var _props = this.props, + children = _props.children, + props = _objectWithoutProperties(_props, ['children']); + + var newProps = _extends({}, props); + + if (children) { + newProps = this.mapChildrenToProps(children, newProps); + } + + return _react2.default.createElement(Component, newProps); + }; + + _createClass(HelmetWrapper, null, [ + { + key: 'canUseDOM', + + // Component.peek comes from react-side-effect: + // For testing, you may use a static peek() method available on the returned component. + // It lets you get the current state without resetting the mounted instance stack. + // Don’t use it for anything other than testing. + + /** + * @param {Object} base: {"target": "_blank", "href": "http://mysite.com/"} + * @param {Object} bodyAttributes: {"className": "root"} + * @param {String} defaultTitle: "Default Title" + * @param {Boolean} defer: true + * @param {Boolean} encodeSpecialCharacters: true + * @param {Object} htmlAttributes: {"lang": "en", "amp": undefined} + * @param {Array} link: [{"rel": "canonical", "href": "http://mysite.com/example"}] + * @param {Array} meta: [{"name": "description", "content": "Test description"}] + * @param {Array} noscript: [{"innerHTML": "<img src='http://mysite.com/js/test.js'"}] + * @param {Function} onChangeClientState: "(newState) => console.log(newState)" + * @param {Array} script: [{"type": "text/javascript", "src": "http://mysite.com/js/test.js"}] + * @param {Array} style: [{"type": "text/css", "cssText": "div { display: block; color: blue; }"}] + * @param {String} title: "Title" + * @param {Object} titleAttributes: {"itemprop": "name"} + * @param {String} titleTemplate: "MySite.com - %s" + */ + set: function set(canUseDOM) { + Component.canUseDOM = canUseDOM; + }, + }, + ]); + + return HelmetWrapper; + })(_react2.default.Component)), + (_class.propTypes = { + base: _propTypes2.default.object, + bodyAttributes: _propTypes2.default.object, + children: _propTypes2.default.oneOfType([ + _propTypes2.default.arrayOf(_propTypes2.default.node), + _propTypes2.default.node, + ]), + defaultTitle: _propTypes2.default.string, + defer: _propTypes2.default.bool, + encodeSpecialCharacters: _propTypes2.default.bool, + htmlAttributes: _propTypes2.default.object, + link: _propTypes2.default.arrayOf(_propTypes2.default.object), + meta: _propTypes2.default.arrayOf(_propTypes2.default.object), + noscript: _propTypes2.default.arrayOf(_propTypes2.default.object), + onChangeClientState: _propTypes2.default.func, + script: _propTypes2.default.arrayOf(_propTypes2.default.object), + style: _propTypes2.default.arrayOf(_propTypes2.default.object), + title: _propTypes2.default.string, + titleAttributes: _propTypes2.default.object, + titleTemplate: _propTypes2.default.string, + }), + (_class.defaultProps = { + defer: true, + encodeSpecialCharacters: true, + }), + (_class.peek = Component.peek), + (_class.rewind = function () { + var mappedState = Component.rewind(); + if (!mappedState) { + // provide fallback if mappedState is undefined + mappedState = (0, _HelmetUtils.mapStateOnServer)({ + baseTag: [], + bodyAttributes: {}, + encodeSpecialCharacters: true, + htmlAttributes: {}, + linkTags: [], + metaTags: [], + noscriptTags: [], + scriptTags: [], + styleTags: [], + title: '', + titleAttributes: {}, + }); + } + + return mappedState; + }), + _temp + ); + }; + + var NullComponent = function NullComponent() { + return null; + }; + + var HelmetSideEffects = (0, _reactSideEffect2.default)( + _HelmetUtils.reducePropsToState, + _HelmetUtils.handleClientStateChange, + _HelmetUtils.mapStateOnServer, + )(NullComponent); + + var HelmetExport = Helmet(HelmetSideEffects); + HelmetExport.renderStatic = HelmetExport.rewind; + + exports.Helmet = HelmetExport; + exports.default = HelmetExport; + + /***/ + }, + /* 265 */ + /***/ function (module, exports) { + exports.__esModule = true; + var ATTRIBUTE_NAMES = (exports.ATTRIBUTE_NAMES = { + BODY: 'bodyAttributes', + HTML: 'htmlAttributes', + TITLE: 'titleAttributes', + }); + + var TAG_NAMES = (exports.TAG_NAMES = { + BASE: 'base', + BODY: 'body', + HEAD: 'head', + HTML: 'html', + LINK: 'link', + META: 'meta', + NOSCRIPT: 'noscript', + SCRIPT: 'script', + STYLE: 'style', + TITLE: 'title', + }); + + var VALID_TAG_NAMES = (exports.VALID_TAG_NAMES = Object.keys(TAG_NAMES).map(function (name) { + return TAG_NAMES[name]; + })); + + var TAG_PROPERTIES = (exports.TAG_PROPERTIES = { + CHARSET: 'charset', + CSS_TEXT: 'cssText', + HREF: 'href', + HTTPEQUIV: 'http-equiv', + INNER_HTML: 'innerHTML', + ITEM_PROP: 'itemprop', + NAME: 'name', + PROPERTY: 'property', + REL: 'rel', + SRC: 'src', + }); + + var REACT_TAG_MAP = (exports.REACT_TAG_MAP = { + accesskey: 'accessKey', + charset: 'charSet', + class: 'className', + contenteditable: 'contentEditable', + contextmenu: 'contextMenu', + 'http-equiv': 'httpEquiv', + itemprop: 'itemProp', + tabindex: 'tabIndex', + }); + + var HELMET_PROPS = (exports.HELMET_PROPS = { + DEFAULT_TITLE: 'defaultTitle', + DEFER: 'defer', + ENCODE_SPECIAL_CHARACTERS: 'encodeSpecialCharacters', + ON_CHANGE_CLIENT_STATE: 'onChangeClientState', + TITLE_TEMPLATE: 'titleTemplate', + }); + + var HTML_TAG_MAP = (exports.HTML_TAG_MAP = Object.keys(REACT_TAG_MAP).reduce(function (obj, key) { + obj[REACT_TAG_MAP[key]] = key; + return obj; + }, {})); + + var SELF_CLOSING_TAGS = (exports.SELF_CLOSING_TAGS = [ + TAG_NAMES.NOSCRIPT, + TAG_NAMES.SCRIPT, + TAG_NAMES.STYLE, + ]); + + var HELMET_ATTRIBUTE = (exports.HELMET_ATTRIBUTE = 'data-react-helmet'); + + /***/ + }, + /* 266 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = __webpack_require__(267); + + /***/ + }, + /* 267 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + Object.defineProperty(__webpack_exports__, '__esModule', { value: true }); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_polyfill__ = __webpack_require__(268); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_polyfill___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_babel_polyfill__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_es5_shim__ = __webpack_require__(470); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_es5_shim___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_es5_shim__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_on_rails__ = __webpack_require__(210); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_on_rails___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_2_react_on_rails__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__non_react_HelloString__ = + __webpack_require__(540); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__components_HelloWorld__ = + __webpack_require__(161); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__components_HelloWorldES5__ = + __webpack_require__(545); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__components_HelloWorldWithLogAndThrow__ = + __webpack_require__(551); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__HelloWorldApp__ = __webpack_require__(552); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__BrokenApp__ = __webpack_require__(553); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__ServerReduxApp__ = __webpack_require__(554); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__ServerReduxSharedStoreApp__ = + __webpack_require__(586); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__ServerRouterApp__ = __webpack_require__(587); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__components_PureComponent__ = + __webpack_require__(617); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__components_CssModulesImagesFontsExample__ = + __webpack_require__(618); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__stores_SharedReduxStore__ = + __webpack_require__(620); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__DeferredRenderAppServer__ = + __webpack_require__(621); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__ServerRenderedHtml__ = __webpack_require__(624); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__ReactHelmetServerApp__ = + __webpack_require__(626); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__components_ImageExample__ = + __webpack_require__(632); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_19__SetTimeoutLoggingApp__ = + __webpack_require__(639); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_20__ComponentWithLodashApp__ = + __webpack_require__(640); + + // Shows the mapping from the exported object to the name used by the server rendering. + + // Example of server rendering with no React + + // React components + + // Generator function + + // Example of React + Redux + + // Example of 2 React components sharing the same store + + // Example of React Router with Server Rendering + + // Deferred render on the client side w/ server render + + // Deferred render on the client side w/ server render + + // Deferred render on the client side w/ server render with additional HTML strings: + + // Demonstrate using Images + + __WEBPACK_IMPORTED_MODULE_2_react_on_rails___default.a.register({ + BrokenApp: __WEBPACK_IMPORTED_MODULE_8__BrokenApp__['a' /* default */], + HelloWorld: __WEBPACK_IMPORTED_MODULE_4__components_HelloWorld__['a' /* default */], + HelloWorldWithLogAndThrow: + __WEBPACK_IMPORTED_MODULE_6__components_HelloWorldWithLogAndThrow__['a' /* default */], + HelloWorldES5: __WEBPACK_IMPORTED_MODULE_5__components_HelloWorldES5__['a' /* default */], + ReduxApp: __WEBPACK_IMPORTED_MODULE_9__ServerReduxApp__['a' /* default */], + ReduxSharedStoreApp: __WEBPACK_IMPORTED_MODULE_10__ServerReduxSharedStoreApp__['a' /* default */], + HelloWorldApp: __WEBPACK_IMPORTED_MODULE_7__HelloWorldApp__['a' /* default */], + RouterApp: __WEBPACK_IMPORTED_MODULE_11__ServerRouterApp__['a' /* default */], + HelloString: __WEBPACK_IMPORTED_MODULE_3__non_react_HelloString__['a' /* default */], + PureComponent: __WEBPACK_IMPORTED_MODULE_12__components_PureComponent__['a' /* default */], + CssModulesImagesFontsExample: + __WEBPACK_IMPORTED_MODULE_13__components_CssModulesImagesFontsExample__['a' /* default */], + DeferredRenderApp: __WEBPACK_IMPORTED_MODULE_15__DeferredRenderAppServer__['a' /* default */], + RenderedHtml: __WEBPACK_IMPORTED_MODULE_16__ServerRenderedHtml__['a' /* default */], + ReactHelmetApp: __WEBPACK_IMPORTED_MODULE_17__ReactHelmetServerApp__['a' /* default */], + ImageExample: __WEBPACK_IMPORTED_MODULE_18__components_ImageExample__['a' /* default */], + SetTimeoutLoggingApp: __WEBPACK_IMPORTED_MODULE_19__SetTimeoutLoggingApp__['a' /* default */], + ComponentWithLodashApp: __WEBPACK_IMPORTED_MODULE_20__ComponentWithLodashApp__['a' /* default */], + }); + + __WEBPACK_IMPORTED_MODULE_2_react_on_rails___default.a.registerStore({ + SharedReduxStore: __WEBPACK_IMPORTED_MODULE_14__stores_SharedReduxStore__['a' /* default */], + }); + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + })(); + + /***/ + }, + /* 268 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + __webpack_require__(269); + + __webpack_require__(466); + + __webpack_require__(467); + + if (global._babelPolyfill) { + throw new Error('only one instance of babel-polyfill is allowed'); + } + global._babelPolyfill = true; + + var DEFINE_PROPERTY = 'defineProperty'; + function define(O, key, value) { + O[key] || + Object[DEFINE_PROPERTY](O, key, { + writable: true, + configurable: true, + value: value, + }); + } + + define(String.prototype, 'padLeft', ''.padStart); + define(String.prototype, 'padRight', ''.padEnd); + + 'pop,reverse,shift,keys,values,entries,indexOf,every,some,forEach,map,filter,find,findIndex,includes,join,slice,concat,push,splice,unshift,sort,lastIndexOf,reduce,reduceRight,copyWithin,fill' + .split(',') + .forEach(function (key) { + [][key] && define(Array, key, Function.call.bind([][key])); + }); + + /***/ + }, + /* 269 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(270); + __webpack_require__(273); + __webpack_require__(274); + __webpack_require__(275); + __webpack_require__(276); + __webpack_require__(277); + __webpack_require__(278); + __webpack_require__(279); + __webpack_require__(280); + __webpack_require__(281); + __webpack_require__(282); + __webpack_require__(283); + __webpack_require__(284); + __webpack_require__(285); + __webpack_require__(286); + __webpack_require__(287); + __webpack_require__(288); + __webpack_require__(289); + __webpack_require__(290); + __webpack_require__(291); + __webpack_require__(292); + __webpack_require__(293); + __webpack_require__(294); + __webpack_require__(295); + __webpack_require__(296); + __webpack_require__(297); + __webpack_require__(298); + __webpack_require__(299); + __webpack_require__(300); + __webpack_require__(301); + __webpack_require__(302); + __webpack_require__(303); + __webpack_require__(304); + __webpack_require__(305); + __webpack_require__(306); + __webpack_require__(307); + __webpack_require__(308); + __webpack_require__(309); + __webpack_require__(310); + __webpack_require__(311); + __webpack_require__(312); + __webpack_require__(313); + __webpack_require__(314); + __webpack_require__(315); + __webpack_require__(316); + __webpack_require__(317); + __webpack_require__(318); + __webpack_require__(319); + __webpack_require__(320); + __webpack_require__(321); + __webpack_require__(322); + __webpack_require__(323); + __webpack_require__(324); + __webpack_require__(325); + __webpack_require__(326); + __webpack_require__(327); + __webpack_require__(328); + __webpack_require__(329); + __webpack_require__(330); + __webpack_require__(331); + __webpack_require__(332); + __webpack_require__(333); + __webpack_require__(334); + __webpack_require__(335); + __webpack_require__(336); + __webpack_require__(337); + __webpack_require__(338); + __webpack_require__(339); + __webpack_require__(340); + __webpack_require__(341); + __webpack_require__(342); + __webpack_require__(343); + __webpack_require__(344); + __webpack_require__(345); + __webpack_require__(346); + __webpack_require__(347); + __webpack_require__(348); + __webpack_require__(350); + __webpack_require__(351); + __webpack_require__(353); + __webpack_require__(354); + __webpack_require__(355); + __webpack_require__(356); + __webpack_require__(357); + __webpack_require__(358); + __webpack_require__(359); + __webpack_require__(361); + __webpack_require__(362); + __webpack_require__(363); + __webpack_require__(364); + __webpack_require__(365); + __webpack_require__(366); + __webpack_require__(367); + __webpack_require__(368); + __webpack_require__(369); + __webpack_require__(370); + __webpack_require__(371); + __webpack_require__(372); + __webpack_require__(373); + __webpack_require__(132); + __webpack_require__(374); + __webpack_require__(193); + __webpack_require__(375); + __webpack_require__(194); + __webpack_require__(376); + __webpack_require__(377); + __webpack_require__(378); + __webpack_require__(379); + __webpack_require__(380); + __webpack_require__(197); + __webpack_require__(199); + __webpack_require__(200); + __webpack_require__(381); + __webpack_require__(382); + __webpack_require__(383); + __webpack_require__(384); + __webpack_require__(385); + __webpack_require__(386); + __webpack_require__(387); + __webpack_require__(388); + __webpack_require__(389); + __webpack_require__(390); + __webpack_require__(391); + __webpack_require__(392); + __webpack_require__(393); + __webpack_require__(394); + __webpack_require__(395); + __webpack_require__(396); + __webpack_require__(397); + __webpack_require__(398); + __webpack_require__(399); + __webpack_require__(400); + __webpack_require__(401); + __webpack_require__(402); + __webpack_require__(403); + __webpack_require__(404); + __webpack_require__(405); + __webpack_require__(406); + __webpack_require__(407); + __webpack_require__(408); + __webpack_require__(409); + __webpack_require__(410); + __webpack_require__(411); + __webpack_require__(412); + __webpack_require__(413); + __webpack_require__(414); + __webpack_require__(415); + __webpack_require__(416); + __webpack_require__(417); + __webpack_require__(418); + __webpack_require__(419); + __webpack_require__(420); + __webpack_require__(421); + __webpack_require__(422); + __webpack_require__(423); + __webpack_require__(424); + __webpack_require__(425); + __webpack_require__(426); + __webpack_require__(427); + __webpack_require__(428); + __webpack_require__(429); + __webpack_require__(430); + __webpack_require__(431); + __webpack_require__(432); + __webpack_require__(433); + __webpack_require__(434); + __webpack_require__(435); + __webpack_require__(436); + __webpack_require__(437); + __webpack_require__(438); + __webpack_require__(439); + __webpack_require__(440); + __webpack_require__(441); + __webpack_require__(442); + __webpack_require__(443); + __webpack_require__(444); + __webpack_require__(445); + __webpack_require__(446); + __webpack_require__(447); + __webpack_require__(448); + __webpack_require__(449); + __webpack_require__(450); + __webpack_require__(451); + __webpack_require__(452); + __webpack_require__(453); + __webpack_require__(454); + __webpack_require__(455); + __webpack_require__(456); + __webpack_require__(457); + __webpack_require__(458); + __webpack_require__(459); + __webpack_require__(460); + __webpack_require__(461); + __webpack_require__(462); + __webpack_require__(463); + __webpack_require__(464); + __webpack_require__(465); + module.exports = __webpack_require__(23); + + /***/ + }, + /* 270 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // ECMAScript 6 symbols shim + var global = __webpack_require__(3); + var has = __webpack_require__(18); + var DESCRIPTORS = __webpack_require__(8); + var $export = __webpack_require__(0); + var redefine = __webpack_require__(16); + var META = __webpack_require__(42).KEY; + var $fails = __webpack_require__(4); + var shared = __webpack_require__(73); + var setToStringTag = __webpack_require__(64); + var uid = __webpack_require__(50); + var wks = __webpack_require__(6); + var wksExt = __webpack_require__(175); + var wksDefine = __webpack_require__(113); + var enumKeys = __webpack_require__(272); + var isArray = __webpack_require__(88); + var anObject = __webpack_require__(2); + var isObject = __webpack_require__(5); + var toObject = __webpack_require__(11); + var toIObject = __webpack_require__(19); + var toPrimitive = __webpack_require__(31); + var createDesc = __webpack_require__(49); + var _create = __webpack_require__(53); + var gOPNExt = __webpack_require__(178); + var $GOPD = __webpack_require__(20); + var $GOPS = __webpack_require__(87); + var $DP = __webpack_require__(9); + var $keys = __webpack_require__(51); + var gOPD = $GOPD.f; + var dP = $DP.f; + var gOPN = gOPNExt.f; + var $Symbol = global.Symbol; + var $JSON = global.JSON; + var _stringify = $JSON && $JSON.stringify; + var PROTOTYPE = 'prototype'; + var HIDDEN = wks('_hidden'); + var TO_PRIMITIVE = wks('toPrimitive'); + var isEnum = {}.propertyIsEnumerable; + var SymbolRegistry = shared('symbol-registry'); + var AllSymbols = shared('symbols'); + var OPSymbols = shared('op-symbols'); + var ObjectProto = Object[PROTOTYPE]; + var USE_NATIVE = typeof $Symbol == 'function' && !!$GOPS.f; + var QObject = global.QObject; + // Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173 + var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild; + + // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687 + var setSymbolDesc = + DESCRIPTORS && + $fails(function () { + return ( + _create( + dP({}, 'a', { + get: function () { + return dP(this, 'a', { value: 7 }).a; + }, + }), + ).a != 7 + ); + }) + ? function (it, key, D) { + var protoDesc = gOPD(ObjectProto, key); + if (protoDesc) delete ObjectProto[key]; + dP(it, key, D); + if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc); + } + : dP; + + var wrap = function (tag) { + var sym = (AllSymbols[tag] = _create($Symbol[PROTOTYPE])); + sym._k = tag; + return sym; + }; + + var isSymbol = + USE_NATIVE && typeof $Symbol.iterator == 'symbol' + ? function (it) { + return typeof it == 'symbol'; + } + : function (it) { + return it instanceof $Symbol; + }; + + var $defineProperty = function defineProperty(it, key, D) { + if (it === ObjectProto) $defineProperty(OPSymbols, key, D); + anObject(it); + key = toPrimitive(key, true); + anObject(D); + if (has(AllSymbols, key)) { + if (!D.enumerable) { + if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {})); + it[HIDDEN][key] = true; + } else { + if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false; + D = _create(D, { enumerable: createDesc(0, false) }); + } + return setSymbolDesc(it, key, D); + } + return dP(it, key, D); + }; + var $defineProperties = function defineProperties(it, P) { + anObject(it); + var keys = enumKeys((P = toIObject(P))); + var i = 0; + var l = keys.length; + var key; + while (l > i) $defineProperty(it, (key = keys[i++]), P[key]); + return it; + }; + var $create = function create(it, P) { + return P === undefined ? _create(it) : $defineProperties(_create(it), P); + }; + var $propertyIsEnumerable = function propertyIsEnumerable(key) { + var E = isEnum.call(this, (key = toPrimitive(key, true))); + if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false; + return E || !has(this, key) || !has(AllSymbols, key) || (has(this, HIDDEN) && this[HIDDEN][key]) + ? E + : true; + }; + var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) { + it = toIObject(it); + key = toPrimitive(key, true); + if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return; + var D = gOPD(it, key); + if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true; + return D; + }; + var $getOwnPropertyNames = function getOwnPropertyNames(it) { + var names = gOPN(toIObject(it)); + var result = []; + var i = 0; + var key; + while (names.length > i) { + if (!has(AllSymbols, (key = names[i++])) && key != HIDDEN && key != META) result.push(key); + } + return result; + }; + var $getOwnPropertySymbols = function getOwnPropertySymbols(it) { + var IS_OP = it === ObjectProto; + var names = gOPN(IS_OP ? OPSymbols : toIObject(it)); + var result = []; + var i = 0; + var key; + while (names.length > i) { + if (has(AllSymbols, (key = names[i++])) && (IS_OP ? has(ObjectProto, key) : true)) + result.push(AllSymbols[key]); + } + return result; + }; + + // 19.4.1.1 Symbol([description]) + if (!USE_NATIVE) { + $Symbol = function Symbol() { + if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!'); + var tag = uid(arguments.length > 0 ? arguments[0] : undefined); + var $set = function (value) { + if (this === ObjectProto) $set.call(OPSymbols, value); + if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false; + setSymbolDesc(this, tag, createDesc(1, value)); + }; + if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set }); + return wrap(tag); + }; + redefine($Symbol[PROTOTYPE], 'toString', function toString() { + return this._k; + }); + + $GOPD.f = $getOwnPropertyDescriptor; + $DP.f = $defineProperty; + __webpack_require__(54).f = gOPNExt.f = $getOwnPropertyNames; + __webpack_require__(75).f = $propertyIsEnumerable; + $GOPS.f = $getOwnPropertySymbols; + + if (DESCRIPTORS && !__webpack_require__(41)) { + redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true); + } + + wksExt.f = function (name) { + return wrap(wks(name)); + }; + } + + $export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol }); + + for ( + var es6Symbols = + // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14 + 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'.split( + ',', + ), + j = 0; + es6Symbols.length > j; + + ) + wks(es6Symbols[j++]); + + for (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k; ) + wksDefine(wellKnownSymbols[k++]); + + $export($export.S + $export.F * !USE_NATIVE, 'Symbol', { + // 19.4.2.1 Symbol.for(key) + for: function (key) { + return has(SymbolRegistry, (key += '')) + ? SymbolRegistry[key] + : (SymbolRegistry[key] = $Symbol(key)); + }, + // 19.4.2.5 Symbol.keyFor(sym) + keyFor: function keyFor(sym) { + if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!'); + for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key; + }, + useSetter: function () { + setter = true; + }, + useSimple: function () { + setter = false; + }, + }); + + $export($export.S + $export.F * !USE_NATIVE, 'Object', { + // 19.1.2.2 Object.create(O [, Properties]) + create: $create, + // 19.1.2.4 Object.defineProperty(O, P, Attributes) + defineProperty: $defineProperty, + // 19.1.2.3 Object.defineProperties(O, Properties) + defineProperties: $defineProperties, + // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) + getOwnPropertyDescriptor: $getOwnPropertyDescriptor, + // 19.1.2.7 Object.getOwnPropertyNames(O) + getOwnPropertyNames: $getOwnPropertyNames, + // 19.1.2.8 Object.getOwnPropertySymbols(O) + getOwnPropertySymbols: $getOwnPropertySymbols, + }); + + // Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives + // https://bugs.chromium.org/p/v8/issues/detail?id=3443 + var FAILS_ON_PRIMITIVES = $fails(function () { + $GOPS.f(1); + }); + + $export($export.S + $export.F * FAILS_ON_PRIMITIVES, 'Object', { + getOwnPropertySymbols: function getOwnPropertySymbols(it) { + return $GOPS.f(toObject(it)); + }, + }); + + // 24.3.2 JSON.stringify(value [, replacer [, space]]) + $JSON && + $export( + $export.S + + $export.F * + (!USE_NATIVE || + $fails(function () { + var S = $Symbol(); + // MS Edge converts symbol values to JSON as {} + // WebKit converts symbol values to JSON as null + // V8 throws on boxed symbols + return ( + _stringify([S]) != '[null]' || + _stringify({ a: S }) != '{}' || + _stringify(Object(S)) != '{}' + ); + })), + 'JSON', + { + stringify: function stringify(it) { + var args = [it]; + var i = 1; + var replacer, $replacer; + while (arguments.length > i) args.push(arguments[i++]); + $replacer = replacer = args[1]; + if ((!isObject(replacer) && it === undefined) || isSymbol(it)) return; // IE8 returns string on undefined + if (!isArray(replacer)) + replacer = function (key, value) { + if (typeof $replacer == 'function') value = $replacer.call(this, key, value); + if (!isSymbol(value)) return value; + }; + args[1] = replacer; + return _stringify.apply($JSON, args); + }, + }, + ); + + // 19.4.3.4 Symbol.prototype[@@toPrimitive](hint) + $Symbol[PROTOTYPE][TO_PRIMITIVE] || + __webpack_require__(15)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf); + // 19.4.3.5 Symbol.prototype[@@toStringTag] + setToStringTag($Symbol, 'Symbol'); + // 20.2.1.9 Math[@@toStringTag] + setToStringTag(Math, 'Math', true); + // 24.3.3 JSON[@@toStringTag] + setToStringTag(global.JSON, 'JSON', true); + + /***/ + }, + /* 271 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = __webpack_require__(73)('native-function-to-string', Function.toString); + + /***/ + }, + /* 272 */ + /***/ function (module, exports, __webpack_require__) { + // all enumerable object keys, includes symbols + var getKeys = __webpack_require__(51); + var gOPS = __webpack_require__(87); + var pIE = __webpack_require__(75); + module.exports = function (it) { + var result = getKeys(it); + var getSymbols = gOPS.f; + if (getSymbols) { + var symbols = getSymbols(it); + var isEnum = pIE.f; + var i = 0; + var key; + while (symbols.length > i) if (isEnum.call(it, (key = symbols[i++]))) result.push(key); + } + return result; + }; + + /***/ + }, + /* 273 */ + /***/ function (module, exports, __webpack_require__) { + var $export = __webpack_require__(0); + // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) + $export($export.S, 'Object', { create: __webpack_require__(53) }); + + /***/ + }, + /* 274 */ + /***/ function (module, exports, __webpack_require__) { + var $export = __webpack_require__(0); + // 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes) + $export($export.S + $export.F * !__webpack_require__(8), 'Object', { + defineProperty: __webpack_require__(9).f, + }); + + /***/ + }, + /* 275 */ + /***/ function (module, exports, __webpack_require__) { + var $export = __webpack_require__(0); + // 19.1.2.3 / 15.2.3.7 Object.defineProperties(O, Properties) + $export($export.S + $export.F * !__webpack_require__(8), 'Object', { + defineProperties: __webpack_require__(177), + }); + + /***/ + }, + /* 276 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) + var toIObject = __webpack_require__(19); + var $getOwnPropertyDescriptor = __webpack_require__(20).f; + + __webpack_require__(33)('getOwnPropertyDescriptor', function () { + return function getOwnPropertyDescriptor(it, key) { + return $getOwnPropertyDescriptor(toIObject(it), key); + }; + }); + + /***/ + }, + /* 277 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.9 Object.getPrototypeOf(O) + var toObject = __webpack_require__(11); + var $getPrototypeOf = __webpack_require__(21); + + __webpack_require__(33)('getPrototypeOf', function () { + return function getPrototypeOf(it) { + return $getPrototypeOf(toObject(it)); + }; + }); + + /***/ + }, + /* 278 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.14 Object.keys(O) + var toObject = __webpack_require__(11); + var $keys = __webpack_require__(51); + + __webpack_require__(33)('keys', function () { + return function keys(it) { + return $keys(toObject(it)); + }; + }); + + /***/ + }, + /* 279 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.7 Object.getOwnPropertyNames(O) + __webpack_require__(33)('getOwnPropertyNames', function () { + return __webpack_require__(178).f; + }); + + /***/ + }, + /* 280 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.5 Object.freeze(O) + var isObject = __webpack_require__(5); + var meta = __webpack_require__(42).onFreeze; + + __webpack_require__(33)('freeze', function ($freeze) { + return function freeze(it) { + return $freeze && isObject(it) ? $freeze(meta(it)) : it; + }; + }); + + /***/ + }, + /* 281 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.17 Object.seal(O) + var isObject = __webpack_require__(5); + var meta = __webpack_require__(42).onFreeze; + + __webpack_require__(33)('seal', function ($seal) { + return function seal(it) { + return $seal && isObject(it) ? $seal(meta(it)) : it; + }; + }); + + /***/ + }, + /* 282 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.15 Object.preventExtensions(O) + var isObject = __webpack_require__(5); + var meta = __webpack_require__(42).onFreeze; + + __webpack_require__(33)('preventExtensions', function ($preventExtensions) { + return function preventExtensions(it) { + return $preventExtensions && isObject(it) ? $preventExtensions(meta(it)) : it; + }; + }); + + /***/ + }, + /* 283 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.12 Object.isFrozen(O) + var isObject = __webpack_require__(5); + + __webpack_require__(33)('isFrozen', function ($isFrozen) { + return function isFrozen(it) { + return isObject(it) ? ($isFrozen ? $isFrozen(it) : false) : true; + }; + }); + + /***/ + }, + /* 284 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.13 Object.isSealed(O) + var isObject = __webpack_require__(5); + + __webpack_require__(33)('isSealed', function ($isSealed) { + return function isSealed(it) { + return isObject(it) ? ($isSealed ? $isSealed(it) : false) : true; + }; + }); + + /***/ + }, + /* 285 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.11 Object.isExtensible(O) + var isObject = __webpack_require__(5); + + __webpack_require__(33)('isExtensible', function ($isExtensible) { + return function isExtensible(it) { + return isObject(it) ? ($isExtensible ? $isExtensible(it) : true) : false; + }; + }); + + /***/ + }, + /* 286 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.3.1 Object.assign(target, source) + var $export = __webpack_require__(0); + + $export($export.S + $export.F, 'Object', { assign: __webpack_require__(179) }); + + /***/ + }, + /* 287 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.3.10 Object.is(value1, value2) + var $export = __webpack_require__(0); + $export($export.S, 'Object', { is: __webpack_require__(180) }); + + /***/ + }, + /* 288 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.3.19 Object.setPrototypeOf(O, proto) + var $export = __webpack_require__(0); + $export($export.S, 'Object', { setPrototypeOf: __webpack_require__(117).set }); + + /***/ + }, + /* 289 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // 19.1.3.6 Object.prototype.toString() + var classof = __webpack_require__(65); + var test = {}; + test[__webpack_require__(6)('toStringTag')] = 'z'; + if (test + '' != '[object z]') { + __webpack_require__(16)( + Object.prototype, + 'toString', + function toString() { + return '[object ' + classof(this) + ']'; + }, + true, + ); + } + + /***/ + }, + /* 290 */ + /***/ function (module, exports, __webpack_require__) { + // 19.2.3.2 / 15.3.4.5 Function.prototype.bind(thisArg, args...) + var $export = __webpack_require__(0); + + $export($export.P, 'Function', { bind: __webpack_require__(181) }); + + /***/ + }, + /* 291 */ + /***/ function (module, exports, __webpack_require__) { + var dP = __webpack_require__(9).f; + var FProto = Function.prototype; + var nameRE = /^\s*function ([^ (]*)/; + var NAME = 'name'; + + // 19.2.4.2 name + NAME in FProto || + (__webpack_require__(8) && + dP(FProto, NAME, { + configurable: true, + get: function () { + try { + return ('' + this).match(nameRE)[1]; + } catch (e) { + return ''; + } + }, + })); + + /***/ + }, + /* 292 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var isObject = __webpack_require__(5); + var getPrototypeOf = __webpack_require__(21); + var HAS_INSTANCE = __webpack_require__(6)('hasInstance'); + var FunctionProto = Function.prototype; + // 19.2.3.6 Function.prototype[@@hasInstance](V) + if (!(HAS_INSTANCE in FunctionProto)) + __webpack_require__(9).f(FunctionProto, HAS_INSTANCE, { + value: function (O) { + if (typeof this != 'function' || !isObject(O)) return false; + if (!isObject(this.prototype)) return O instanceof this; + // for environment w/o native `@@hasInstance` logic enough `instanceof`, but add this: + while ((O = getPrototypeOf(O))) if (this.prototype === O) return true; + return false; + }, + }); + + /***/ + }, + /* 293 */ + /***/ function (module, exports, __webpack_require__) { + var $export = __webpack_require__(0); + var $parseInt = __webpack_require__(183); + // 18.2.5 parseInt(string, radix) + $export($export.G + $export.F * (parseInt != $parseInt), { parseInt: $parseInt }); + + /***/ + }, + /* 294 */ + /***/ function (module, exports, __webpack_require__) { + var $export = __webpack_require__(0); + var $parseFloat = __webpack_require__(184); + // 18.2.4 parseFloat(string) + $export($export.G + $export.F * (parseFloat != $parseFloat), { parseFloat: $parseFloat }); + + /***/ + }, + /* 295 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var global = __webpack_require__(3); + var has = __webpack_require__(18); + var cof = __webpack_require__(25); + var inheritIfRequired = __webpack_require__(119); + var toPrimitive = __webpack_require__(31); + var fails = __webpack_require__(4); + var gOPN = __webpack_require__(54).f; + var gOPD = __webpack_require__(20).f; + var dP = __webpack_require__(9).f; + var $trim = __webpack_require__(66).trim; + var NUMBER = 'Number'; + var $Number = global[NUMBER]; + var Base = $Number; + var proto = $Number.prototype; + // Opera ~12 has broken Object#toString + var BROKEN_COF = cof(__webpack_require__(53)(proto)) == NUMBER; + var TRIM = 'trim' in String.prototype; + + // 7.1.3 ToNumber(argument) + var toNumber = function (argument) { + var it = toPrimitive(argument, false); + if (typeof it == 'string' && it.length > 2) { + it = TRIM ? it.trim() : $trim(it, 3); + var first = it.charCodeAt(0); + var third, radix, maxCode; + if (first === 43 || first === 45) { + third = it.charCodeAt(2); + if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix + } else if (first === 48) { + switch (it.charCodeAt(1)) { + case 66: + case 98: + radix = 2; + maxCode = 49; + break; // fast equal /^0b[01]+$/i + case 79: + case 111: + radix = 8; + maxCode = 55; + break; // fast equal /^0o[0-7]+$/i + default: + return +it; + } + for (var digits = it.slice(2), i = 0, l = digits.length, code; i < l; i++) { + code = digits.charCodeAt(i); + // parseInt parses a string to a first unavailable symbol + // but ToNumber should return NaN if a string contains unavailable symbols + if (code < 48 || code > maxCode) return NaN; + } + return parseInt(digits, radix); + } + } + return +it; + }; + + if (!$Number(' 0o1') || !$Number('0b1') || $Number('+0x1')) { + $Number = function Number(value) { + var it = arguments.length < 1 ? 0 : value; + var that = this; + return that instanceof $Number && + // check on 1..constructor(foo) case + (BROKEN_COF + ? fails(function () { + proto.valueOf.call(that); + }) + : cof(that) != NUMBER) + ? inheritIfRequired(new Base(toNumber(it)), that, $Number) + : toNumber(it); + }; + for ( + var keys = __webpack_require__(8) + ? gOPN(Base) + : // ES3: + ( + 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' + + // ES6 (in case, if modules with ES6 Number statics required before): + 'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' + + 'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger' + ).split(','), + j = 0, + key; + keys.length > j; + j++ + ) { + if (has(Base, (key = keys[j])) && !has($Number, key)) { + dP($Number, key, gOPD(Base, key)); + } + } + $Number.prototype = proto; + proto.constructor = $Number; + __webpack_require__(16)(global, NUMBER, $Number); + } + + /***/ + }, + /* 296 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0); + var toInteger = __webpack_require__(26); + var aNumberValue = __webpack_require__(185); + var repeat = __webpack_require__(120); + var $toFixed = (1.0).toFixed; + var floor = Math.floor; + var data = [0, 0, 0, 0, 0, 0]; + var ERROR = 'Number.toFixed: incorrect invocation!'; + var ZERO = '0'; + + var multiply = function (n, c) { + var i = -1; + var c2 = c; + while (++i < 6) { + c2 += n * data[i]; + data[i] = c2 % 1e7; + c2 = floor(c2 / 1e7); + } + }; + var divide = function (n) { + var i = 6; + var c = 0; + while (--i >= 0) { + c += data[i]; + data[i] = floor(c / n); + c = (c % n) * 1e7; + } + }; + var numToString = function () { + var i = 6; + var s = ''; + while (--i >= 0) { + if (s !== '' || i === 0 || data[i] !== 0) { + var t = String(data[i]); + s = s === '' ? t : s + repeat.call(ZERO, 7 - t.length) + t; + } + } + return s; + }; + var pow = function (x, n, acc) { + return n === 0 ? acc : n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc); + }; + var log = function (x) { + var n = 0; + var x2 = x; + while (x2 >= 4096) { + n += 12; + x2 /= 4096; + } + while (x2 >= 2) { + n += 1; + x2 /= 2; + } + return n; + }; + + $export( + $export.P + + $export.F * + ((!!$toFixed && + ((0.00008).toFixed(3) !== '0.000' || + (0.9).toFixed(0) !== '1' || + (1.255).toFixed(2) !== '1.25' || + (1000000000000000128.0).toFixed(0) !== '1000000000000000128')) || + !__webpack_require__(4)(function () { + // V8 ~ Android 4.3- + $toFixed.call({}); + })), + 'Number', + { + toFixed: function toFixed(fractionDigits) { + var x = aNumberValue(this, ERROR); + var f = toInteger(fractionDigits); + var s = ''; + var m = ZERO; + var e, z, j, k; + if (f < 0 || f > 20) throw RangeError(ERROR); + // eslint-disable-next-line no-self-compare + if (x != x) return 'NaN'; + if (x <= -1e21 || x >= 1e21) return String(x); + if (x < 0) { + s = '-'; + x = -x; + } + if (x > 1e-21) { + e = log(x * pow(2, 69, 1)) - 69; + z = e < 0 ? x * pow(2, -e, 1) : x / pow(2, e, 1); + z *= 0x10000000000000; + e = 52 - e; + if (e > 0) { + multiply(0, z); + j = f; + while (j >= 7) { + multiply(1e7, 0); + j -= 7; + } + multiply(pow(10, j, 1), 0); + j = e - 1; + while (j >= 23) { + divide(1 << 23); + j -= 23; + } + divide(1 << j); + multiply(1, 1); + divide(2); + m = numToString(); + } else { + multiply(0, z); + multiply(1 << -e, 0); + m = numToString() + repeat.call(ZERO, f); + } + } + if (f > 0) { + k = m.length; + m = + s + (k <= f ? '0.' + repeat.call(ZERO, f - k) + m : m.slice(0, k - f) + '.' + m.slice(k - f)); + } else { + m = s + m; + } + return m; + }, + }, + ); + + /***/ + }, + /* 297 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0); + var $fails = __webpack_require__(4); + var aNumberValue = __webpack_require__(185); + var $toPrecision = (1.0).toPrecision; + + $export( + $export.P + + $export.F * + ($fails(function () { + // IE7- + return $toPrecision.call(1, undefined) !== '1'; + }) || + !$fails(function () { + // V8 ~ Android 4.3- + $toPrecision.call({}); + })), + 'Number', + { + toPrecision: function toPrecision(precision) { + var that = aNumberValue(this, 'Number#toPrecision: incorrect invocation!'); + return precision === undefined ? $toPrecision.call(that) : $toPrecision.call(that, precision); + }, + }, + ); + + /***/ + }, + /* 298 */ + /***/ function (module, exports, __webpack_require__) { + // 20.1.2.1 Number.EPSILON + var $export = __webpack_require__(0); + + $export($export.S, 'Number', { EPSILON: Math.pow(2, -52) }); + + /***/ + }, + /* 299 */ + /***/ function (module, exports, __webpack_require__) { + // 20.1.2.2 Number.isFinite(number) + var $export = __webpack_require__(0); + var _isFinite = __webpack_require__(3).isFinite; + + $export($export.S, 'Number', { + isFinite: function isFinite(it) { + return typeof it == 'number' && _isFinite(it); + }, + }); + + /***/ + }, + /* 300 */ + /***/ function (module, exports, __webpack_require__) { + // 20.1.2.3 Number.isInteger(number) + var $export = __webpack_require__(0); + + $export($export.S, 'Number', { isInteger: __webpack_require__(186) }); + + /***/ + }, + /* 301 */ + /***/ function (module, exports, __webpack_require__) { + // 20.1.2.4 Number.isNaN(number) + var $export = __webpack_require__(0); + + $export($export.S, 'Number', { + isNaN: function isNaN(number) { + // eslint-disable-next-line no-self-compare + return number != number; + }, + }); + + /***/ + }, + /* 302 */ + /***/ function (module, exports, __webpack_require__) { + // 20.1.2.5 Number.isSafeInteger(number) + var $export = __webpack_require__(0); + var isInteger = __webpack_require__(186); + var abs = Math.abs; + + $export($export.S, 'Number', { + isSafeInteger: function isSafeInteger(number) { + return isInteger(number) && abs(number) <= 0x1fffffffffffff; + }, + }); + + /***/ + }, + /* 303 */ + /***/ function (module, exports, __webpack_require__) { + // 20.1.2.6 Number.MAX_SAFE_INTEGER + var $export = __webpack_require__(0); + + $export($export.S, 'Number', { MAX_SAFE_INTEGER: 0x1fffffffffffff }); + + /***/ + }, + /* 304 */ + /***/ function (module, exports, __webpack_require__) { + // 20.1.2.10 Number.MIN_SAFE_INTEGER + var $export = __webpack_require__(0); + + $export($export.S, 'Number', { MIN_SAFE_INTEGER: -0x1fffffffffffff }); + + /***/ + }, + /* 305 */ + /***/ function (module, exports, __webpack_require__) { + var $export = __webpack_require__(0); + var $parseFloat = __webpack_require__(184); + // 20.1.2.12 Number.parseFloat(string) + $export($export.S + $export.F * (Number.parseFloat != $parseFloat), 'Number', { + parseFloat: $parseFloat, + }); + + /***/ + }, + /* 306 */ + /***/ function (module, exports, __webpack_require__) { + var $export = __webpack_require__(0); + var $parseInt = __webpack_require__(183); + // 20.1.2.13 Number.parseInt(string, radix) + $export($export.S + $export.F * (Number.parseInt != $parseInt), 'Number', { parseInt: $parseInt }); + + /***/ + }, + /* 307 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.3 Math.acosh(x) + var $export = __webpack_require__(0); + var log1p = __webpack_require__(187); + var sqrt = Math.sqrt; + var $acosh = Math.acosh; + + $export( + $export.S + + $export.F * + !( + $acosh && + // V8 bug: https://code.google.com/p/v8/issues/detail?id=3509 + Math.floor($acosh(Number.MAX_VALUE)) == 710 && + // Tor Browser bug: Math.acosh(Infinity) -> NaN + $acosh(Infinity) == Infinity + ), + 'Math', + { + acosh: function acosh(x) { + return (x = +x) < 1 + ? NaN + : x > 94906265.62425156 + ? Math.log(x) + Math.LN2 + : log1p(x - 1 + sqrt(x - 1) * sqrt(x + 1)); + }, + }, + ); + + /***/ + }, + /* 308 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.5 Math.asinh(x) + var $export = __webpack_require__(0); + var $asinh = Math.asinh; + + function asinh(x) { + return !isFinite((x = +x)) || x == 0 ? x : x < 0 ? -asinh(-x) : Math.log(x + Math.sqrt(x * x + 1)); + } + + // Tor Browser bug: Math.asinh(0) -> -0 + $export($export.S + $export.F * !($asinh && 1 / $asinh(0) > 0), 'Math', { asinh: asinh }); + + /***/ + }, + /* 309 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.7 Math.atanh(x) + var $export = __webpack_require__(0); + var $atanh = Math.atanh; + + // Tor Browser bug: Math.atanh(-0) -> 0 + $export($export.S + $export.F * !($atanh && 1 / $atanh(-0) < 0), 'Math', { + atanh: function atanh(x) { + return (x = +x) == 0 ? x : Math.log((1 + x) / (1 - x)) / 2; + }, + }); + + /***/ + }, + /* 310 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.9 Math.cbrt(x) + var $export = __webpack_require__(0); + var sign = __webpack_require__(121); + + $export($export.S, 'Math', { + cbrt: function cbrt(x) { + return sign((x = +x)) * Math.pow(Math.abs(x), 1 / 3); + }, + }); + + /***/ + }, + /* 311 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.11 Math.clz32(x) + var $export = __webpack_require__(0); + + $export($export.S, 'Math', { + clz32: function clz32(x) { + return (x >>>= 0) ? 31 - Math.floor(Math.log(x + 0.5) * Math.LOG2E) : 32; + }, + }); + + /***/ + }, + /* 312 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.12 Math.cosh(x) + var $export = __webpack_require__(0); + var exp = Math.exp; + + $export($export.S, 'Math', { + cosh: function cosh(x) { + return (exp((x = +x)) + exp(-x)) / 2; + }, + }); + + /***/ + }, + /* 313 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.14 Math.expm1(x) + var $export = __webpack_require__(0); + var $expm1 = __webpack_require__(122); + + $export($export.S + $export.F * ($expm1 != Math.expm1), 'Math', { expm1: $expm1 }); + + /***/ + }, + /* 314 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.16 Math.fround(x) + var $export = __webpack_require__(0); + + $export($export.S, 'Math', { fround: __webpack_require__(188) }); + + /***/ + }, + /* 315 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.17 Math.hypot([value1[, value2[, … ]]]) + var $export = __webpack_require__(0); + var abs = Math.abs; + + $export($export.S, 'Math', { + hypot: function hypot(value1, value2) { + // eslint-disable-line no-unused-vars + var sum = 0; + var i = 0; + var aLen = arguments.length; + var larg = 0; + var arg, div; + while (i < aLen) { + arg = abs(arguments[i++]); + if (larg < arg) { + div = larg / arg; + sum = sum * div * div + 1; + larg = arg; + } else if (arg > 0) { + div = arg / larg; + sum += div * div; + } else sum += arg; + } + return larg === Infinity ? Infinity : larg * Math.sqrt(sum); + }, + }); + + /***/ + }, + /* 316 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.18 Math.imul(x, y) + var $export = __webpack_require__(0); + var $imul = Math.imul; + + // some WebKit versions fails with big numbers, some has wrong arity + $export( + $export.S + + $export.F * + __webpack_require__(4)(function () { + return $imul(0xffffffff, 5) != -5 || $imul.length != 2; + }), + 'Math', + { + imul: function imul(x, y) { + var UINT16 = 0xffff; + var xn = +x; + var yn = +y; + var xl = UINT16 & xn; + var yl = UINT16 & yn; + return ( + 0 | (xl * yl + ((((UINT16 & (xn >>> 16)) * yl + xl * (UINT16 & (yn >>> 16))) << 16) >>> 0)) + ); + }, + }, + ); + + /***/ + }, + /* 317 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.21 Math.log10(x) + var $export = __webpack_require__(0); + + $export($export.S, 'Math', { + log10: function log10(x) { + return Math.log(x) * Math.LOG10E; + }, + }); + + /***/ + }, + /* 318 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.20 Math.log1p(x) + var $export = __webpack_require__(0); + + $export($export.S, 'Math', { log1p: __webpack_require__(187) }); + + /***/ + }, + /* 319 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.22 Math.log2(x) + var $export = __webpack_require__(0); + + $export($export.S, 'Math', { + log2: function log2(x) { + return Math.log(x) / Math.LN2; + }, + }); + + /***/ + }, + /* 320 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.28 Math.sign(x) + var $export = __webpack_require__(0); + + $export($export.S, 'Math', { sign: __webpack_require__(121) }); + + /***/ + }, + /* 321 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.30 Math.sinh(x) + var $export = __webpack_require__(0); + var expm1 = __webpack_require__(122); + var exp = Math.exp; + + // V8 near Chromium 38 has a problem with very small numbers + $export( + $export.S + + $export.F * + __webpack_require__(4)(function () { + return !Math.sinh(-2e-17) != -2e-17; + }), + 'Math', + { + sinh: function sinh(x) { + return Math.abs((x = +x)) < 1 + ? (expm1(x) - expm1(-x)) / 2 + : (exp(x - 1) - exp(-x - 1)) * (Math.E / 2); + }, + }, + ); + + /***/ + }, + /* 322 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.33 Math.tanh(x) + var $export = __webpack_require__(0); + var expm1 = __webpack_require__(122); + var exp = Math.exp; + + $export($export.S, 'Math', { + tanh: function tanh(x) { + var a = expm1((x = +x)); + var b = expm1(-x); + return a == Infinity ? 1 : b == Infinity ? -1 : (a - b) / (exp(x) + exp(-x)); + }, + }); + + /***/ + }, + /* 323 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.34 Math.trunc(x) + var $export = __webpack_require__(0); + + $export($export.S, 'Math', { + trunc: function trunc(it) { + return (it > 0 ? Math.floor : Math.ceil)(it); + }, + }); + + /***/ + }, + /* 324 */ + /***/ function (module, exports, __webpack_require__) { + var $export = __webpack_require__(0); + var toAbsoluteIndex = __webpack_require__(52); + var fromCharCode = String.fromCharCode; + var $fromCodePoint = String.fromCodePoint; + + // length should be 1, old FF problem + $export($export.S + $export.F * (!!$fromCodePoint && $fromCodePoint.length != 1), 'String', { + // 21.1.2.2 String.fromCodePoint(...codePoints) + fromCodePoint: function fromCodePoint(x) { + // eslint-disable-line no-unused-vars + var res = []; + var aLen = arguments.length; + var i = 0; + var code; + while (aLen > i) { + code = +arguments[i++]; + if (toAbsoluteIndex(code, 0x10ffff) !== code) + throw RangeError(code + ' is not a valid code point'); + res.push( + code < 0x10000 + ? fromCharCode(code) + : fromCharCode(((code -= 0x10000) >> 10) + 0xd800, (code % 0x400) + 0xdc00), + ); + } + return res.join(''); + }, + }); + + /***/ + }, + /* 325 */ + /***/ function (module, exports, __webpack_require__) { + var $export = __webpack_require__(0); + var toIObject = __webpack_require__(19); + var toLength = __webpack_require__(7); + + $export($export.S, 'String', { + // 21.1.2.4 String.raw(callSite, ...substitutions) + raw: function raw(callSite) { + var tpl = toIObject(callSite.raw); + var len = toLength(tpl.length); + var aLen = arguments.length; + var res = []; + var i = 0; + while (len > i) { + res.push(String(tpl[i++])); + if (i < aLen) res.push(String(arguments[i])); + } + return res.join(''); + }, + }); + + /***/ + }, + /* 326 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // 21.1.3.25 String.prototype.trim() + __webpack_require__(66)('trim', function ($trim) { + return function trim() { + return $trim(this, 3); + }; + }); + + /***/ + }, + /* 327 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $at = __webpack_require__(89)(true); + + // 21.1.3.27 String.prototype[@@iterator]() + __webpack_require__(123)( + String, + 'String', + function (iterated) { + this._t = String(iterated); // target + this._i = 0; // next index + // 21.1.5.2.1 %StringIteratorPrototype%.next() + }, + function () { + var O = this._t; + var index = this._i; + var point; + if (index >= O.length) return { value: undefined, done: true }; + point = $at(O, index); + this._i += point.length; + return { value: point, done: false }; + }, + ); + + /***/ + }, + /* 328 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0); + var $at = __webpack_require__(89)(false); + $export($export.P, 'String', { + // 21.1.3.3 String.prototype.codePointAt(pos) + codePointAt: function codePointAt(pos) { + return $at(this, pos); + }, + }); + + /***/ + }, + /* 329 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + // 21.1.3.6 String.prototype.endsWith(searchString [, endPosition]) + + var $export = __webpack_require__(0); + var toLength = __webpack_require__(7); + var context = __webpack_require__(125); + var ENDS_WITH = 'endsWith'; + var $endsWith = ''[ENDS_WITH]; + + $export($export.P + $export.F * __webpack_require__(126)(ENDS_WITH), 'String', { + endsWith: function endsWith(searchString /* , endPosition = @length */) { + var that = context(this, searchString, ENDS_WITH); + var endPosition = arguments.length > 1 ? arguments[1] : undefined; + var len = toLength(that.length); + var end = endPosition === undefined ? len : Math.min(toLength(endPosition), len); + var search = String(searchString); + return $endsWith + ? $endsWith.call(that, search, end) + : that.slice(end - search.length, end) === search; + }, + }); + + /***/ + }, + /* 330 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + // 21.1.3.7 String.prototype.includes(searchString, position = 0) + + var $export = __webpack_require__(0); + var context = __webpack_require__(125); + var INCLUDES = 'includes'; + + $export($export.P + $export.F * __webpack_require__(126)(INCLUDES), 'String', { + includes: function includes(searchString /* , position = 0 */) { + return !!~context(this, searchString, INCLUDES).indexOf( + searchString, + arguments.length > 1 ? arguments[1] : undefined, + ); + }, + }); + + /***/ + }, + /* 331 */ + /***/ function (module, exports, __webpack_require__) { + var $export = __webpack_require__(0); + + $export($export.P, 'String', { + // 21.1.3.13 String.prototype.repeat(count) + repeat: __webpack_require__(120), + }); + + /***/ + }, + /* 332 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + // 21.1.3.18 String.prototype.startsWith(searchString [, position ]) + + var $export = __webpack_require__(0); + var toLength = __webpack_require__(7); + var context = __webpack_require__(125); + var STARTS_WITH = 'startsWith'; + var $startsWith = ''[STARTS_WITH]; + + $export($export.P + $export.F * __webpack_require__(126)(STARTS_WITH), 'String', { + startsWith: function startsWith(searchString /* , position = 0 */) { + var that = context(this, searchString, STARTS_WITH); + var index = toLength(Math.min(arguments.length > 1 ? arguments[1] : undefined, that.length)); + var search = String(searchString); + return $startsWith + ? $startsWith.call(that, search, index) + : that.slice(index, index + search.length) === search; + }, + }); + + /***/ + }, + /* 333 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // B.2.3.2 String.prototype.anchor(name) + __webpack_require__(17)('anchor', function (createHTML) { + return function anchor(name) { + return createHTML(this, 'a', 'name', name); + }; + }); + + /***/ + }, + /* 334 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // B.2.3.3 String.prototype.big() + __webpack_require__(17)('big', function (createHTML) { + return function big() { + return createHTML(this, 'big', '', ''); + }; + }); + + /***/ + }, + /* 335 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // B.2.3.4 String.prototype.blink() + __webpack_require__(17)('blink', function (createHTML) { + return function blink() { + return createHTML(this, 'blink', '', ''); + }; + }); + + /***/ + }, + /* 336 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // B.2.3.5 String.prototype.bold() + __webpack_require__(17)('bold', function (createHTML) { + return function bold() { + return createHTML(this, 'b', '', ''); + }; + }); + + /***/ + }, + /* 337 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // B.2.3.6 String.prototype.fixed() + __webpack_require__(17)('fixed', function (createHTML) { + return function fixed() { + return createHTML(this, 'tt', '', ''); + }; + }); + + /***/ + }, + /* 338 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // B.2.3.7 String.prototype.fontcolor(color) + __webpack_require__(17)('fontcolor', function (createHTML) { + return function fontcolor(color) { + return createHTML(this, 'font', 'color', color); + }; + }); + + /***/ + }, + /* 339 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // B.2.3.8 String.prototype.fontsize(size) + __webpack_require__(17)('fontsize', function (createHTML) { + return function fontsize(size) { + return createHTML(this, 'font', 'size', size); + }; + }); + + /***/ + }, + /* 340 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // B.2.3.9 String.prototype.italics() + __webpack_require__(17)('italics', function (createHTML) { + return function italics() { + return createHTML(this, 'i', '', ''); + }; + }); + + /***/ + }, + /* 341 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // B.2.3.10 String.prototype.link(url) + __webpack_require__(17)('link', function (createHTML) { + return function link(url) { + return createHTML(this, 'a', 'href', url); + }; + }); + + /***/ + }, + /* 342 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // B.2.3.11 String.prototype.small() + __webpack_require__(17)('small', function (createHTML) { + return function small() { + return createHTML(this, 'small', '', ''); + }; + }); + + /***/ + }, + /* 343 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // B.2.3.12 String.prototype.strike() + __webpack_require__(17)('strike', function (createHTML) { + return function strike() { + return createHTML(this, 'strike', '', ''); + }; + }); + + /***/ + }, + /* 344 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // B.2.3.13 String.prototype.sub() + __webpack_require__(17)('sub', function (createHTML) { + return function sub() { + return createHTML(this, 'sub', '', ''); + }; + }); + + /***/ + }, + /* 345 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // B.2.3.14 String.prototype.sup() + __webpack_require__(17)('sup', function (createHTML) { + return function sup() { + return createHTML(this, 'sup', '', ''); + }; + }); + + /***/ + }, + /* 346 */ + /***/ function (module, exports, __webpack_require__) { + // 20.3.3.1 / 15.9.4.4 Date.now() + var $export = __webpack_require__(0); + + $export($export.S, 'Date', { + now: function () { + return new Date().getTime(); + }, + }); + + /***/ + }, + /* 347 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0); + var toObject = __webpack_require__(11); + var toPrimitive = __webpack_require__(31); + + $export( + $export.P + + $export.F * + __webpack_require__(4)(function () { + return ( + new Date(NaN).toJSON() !== null || + Date.prototype.toJSON.call({ + toISOString: function () { + return 1; + }, + }) !== 1 + ); + }), + 'Date', + { + // eslint-disable-next-line no-unused-vars + toJSON: function toJSON(key) { + var O = toObject(this); + var pv = toPrimitive(O); + return typeof pv == 'number' && !isFinite(pv) ? null : O.toISOString(); + }, + }, + ); + + /***/ + }, + /* 348 */ + /***/ function (module, exports, __webpack_require__) { + // 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString() + var $export = __webpack_require__(0); + var toISOString = __webpack_require__(349); + + // PhantomJS / old WebKit has a broken implementations + $export($export.P + $export.F * (Date.prototype.toISOString !== toISOString), 'Date', { + toISOString: toISOString, + }); + + /***/ + }, + /* 349 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString() + var fails = __webpack_require__(4); + var getTime = Date.prototype.getTime; + var $toISOString = Date.prototype.toISOString; + + var lz = function (num) { + return num > 9 ? num : '0' + num; + }; + + // PhantomJS / old WebKit has a broken implementations + module.exports = + fails(function () { + return $toISOString.call(new Date(-5e13 - 1)) != '0385-07-25T07:06:39.999Z'; + }) || + !fails(function () { + $toISOString.call(new Date(NaN)); + }) + ? function toISOString() { + if (!isFinite(getTime.call(this))) throw RangeError('Invalid time value'); + var d = this; + var y = d.getUTCFullYear(); + var m = d.getUTCMilliseconds(); + var s = y < 0 ? '-' : y > 9999 ? '+' : ''; + return ( + s + + ('00000' + Math.abs(y)).slice(s ? -6 : -4) + + '-' + + lz(d.getUTCMonth() + 1) + + '-' + + lz(d.getUTCDate()) + + 'T' + + lz(d.getUTCHours()) + + ':' + + lz(d.getUTCMinutes()) + + ':' + + lz(d.getUTCSeconds()) + + '.' + + (m > 99 ? m : '0' + lz(m)) + + 'Z' + ); + } + : $toISOString; + + /***/ + }, + /* 350 */ + /***/ function (module, exports, __webpack_require__) { + var DateProto = Date.prototype; + var INVALID_DATE = 'Invalid Date'; + var TO_STRING = 'toString'; + var $toString = DateProto[TO_STRING]; + var getTime = DateProto.getTime; + if (new Date(NaN) + '' != INVALID_DATE) { + __webpack_require__(16)(DateProto, TO_STRING, function toString() { + var value = getTime.call(this); + // eslint-disable-next-line no-self-compare + return value === value ? $toString.call(this) : INVALID_DATE; + }); + } + + /***/ + }, + /* 351 */ + /***/ function (module, exports, __webpack_require__) { + var TO_PRIMITIVE = __webpack_require__(6)('toPrimitive'); + var proto = Date.prototype; + + if (!(TO_PRIMITIVE in proto)) __webpack_require__(15)(proto, TO_PRIMITIVE, __webpack_require__(352)); + + /***/ + }, + /* 352 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var anObject = __webpack_require__(2); + var toPrimitive = __webpack_require__(31); + var NUMBER = 'number'; + + module.exports = function (hint) { + if (hint !== 'string' && hint !== NUMBER && hint !== 'default') throw TypeError('Incorrect hint'); + return toPrimitive(anObject(this), hint != NUMBER); + }; + + /***/ + }, + /* 353 */ + /***/ function (module, exports, __webpack_require__) { + // 22.1.2.2 / 15.4.3.2 Array.isArray(arg) + var $export = __webpack_require__(0); + + $export($export.S, 'Array', { isArray: __webpack_require__(88) }); + + /***/ + }, + /* 354 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var ctx = __webpack_require__(24); + var $export = __webpack_require__(0); + var toObject = __webpack_require__(11); + var call = __webpack_require__(189); + var isArrayIter = __webpack_require__(127); + var toLength = __webpack_require__(7); + var createProperty = __webpack_require__(128); + var getIterFn = __webpack_require__(129); + + $export( + $export.S + + $export.F * + !__webpack_require__(91)(function (iter) { + Array.from(iter); + }), + 'Array', + { + // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined) + from: function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) { + var O = toObject(arrayLike); + var C = typeof this == 'function' ? this : Array; + var aLen = arguments.length; + var mapfn = aLen > 1 ? arguments[1] : undefined; + var mapping = mapfn !== undefined; + var index = 0; + var iterFn = getIterFn(O); + var length, result, step, iterator; + if (mapping) mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2); + // if object isn't iterable or it's array with default iterator - use simple case + if (iterFn != undefined && !(C == Array && isArrayIter(iterFn))) { + for (iterator = iterFn.call(O), result = new C(); !(step = iterator.next()).done; index++) { + createProperty( + result, + index, + mapping ? call(iterator, mapfn, [step.value, index], true) : step.value, + ); + } + } else { + length = toLength(O.length); + for (result = new C(length); length > index; index++) { + createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]); + } + } + result.length = index; + return result; + }, + }, + ); + + /***/ + }, + /* 355 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0); + var createProperty = __webpack_require__(128); + + // WebKit Array.of isn't generic + $export( + $export.S + + $export.F * + __webpack_require__(4)(function () { + function F() { + /* empty */ + } + return !(Array.of.call(F) instanceof F); + }), + 'Array', + { + // 22.1.2.3 Array.of( ...items) + of: function of(/* ...args */) { + var index = 0; + var aLen = arguments.length; + var result = new (typeof this == 'function' ? this : Array)(aLen); + while (aLen > index) createProperty(result, index, arguments[index++]); + result.length = aLen; + return result; + }, + }, + ); + + /***/ + }, + /* 356 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // 22.1.3.13 Array.prototype.join(separator) + var $export = __webpack_require__(0); + var toIObject = __webpack_require__(19); + var arrayJoin = [].join; + + // fallback for not array-like strings + $export( + $export.P + $export.F * (__webpack_require__(74) != Object || !__webpack_require__(27)(arrayJoin)), + 'Array', + { + join: function join(separator) { + return arrayJoin.call(toIObject(this), separator === undefined ? ',' : separator); + }, + }, + ); + + /***/ + }, + /* 357 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0); + var html = __webpack_require__(116); + var cof = __webpack_require__(25); + var toAbsoluteIndex = __webpack_require__(52); + var toLength = __webpack_require__(7); + var arraySlice = [].slice; + + // fallback for not array-like ES3 strings and DOM objects + $export( + $export.P + + $export.F * + __webpack_require__(4)(function () { + if (html) arraySlice.call(html); + }), + 'Array', + { + slice: function slice(begin, end) { + var len = toLength(this.length); + var klass = cof(this); + end = end === undefined ? len : end; + if (klass == 'Array') return arraySlice.call(this, begin, end); + var start = toAbsoluteIndex(begin, len); + var upTo = toAbsoluteIndex(end, len); + var size = toLength(upTo - start); + var cloned = new Array(size); + var i = 0; + for (; i < size; i++) cloned[i] = klass == 'String' ? this.charAt(start + i) : this[start + i]; + return cloned; + }, + }, + ); + + /***/ + }, + /* 358 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0); + var aFunction = __webpack_require__(12); + var toObject = __webpack_require__(11); + var fails = __webpack_require__(4); + var $sort = [].sort; + var test = [1, 2, 3]; + + $export( + $export.P + + $export.F * + (fails(function () { + // IE8- + test.sort(undefined); + }) || + !fails(function () { + // V8 bug + test.sort(null); + // Old WebKit + }) || + !__webpack_require__(27)($sort)), + 'Array', + { + // 22.1.3.25 Array.prototype.sort(comparefn) + sort: function sort(comparefn) { + return comparefn === undefined + ? $sort.call(toObject(this)) + : $sort.call(toObject(this), aFunction(comparefn)); + }, + }, + ); + + /***/ + }, + /* 359 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0); + var $forEach = __webpack_require__(34)(0); + var STRICT = __webpack_require__(27)([].forEach, true); + + $export($export.P + $export.F * !STRICT, 'Array', { + // 22.1.3.10 / 15.4.4.18 Array.prototype.forEach(callbackfn [, thisArg]) + forEach: function forEach(callbackfn /* , thisArg */) { + return $forEach(this, callbackfn, arguments[1]); + }, + }); + + /***/ + }, + /* 360 */ + /***/ function (module, exports, __webpack_require__) { + var isObject = __webpack_require__(5); + var isArray = __webpack_require__(88); + var SPECIES = __webpack_require__(6)('species'); + + module.exports = function (original) { + var C; + if (isArray(original)) { + C = original.constructor; + // cross-realm fallback + if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined; + if (isObject(C)) { + C = C[SPECIES]; + if (C === null) C = undefined; + } + } + return C === undefined ? Array : C; + }; + + /***/ + }, + /* 361 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0); + var $map = __webpack_require__(34)(1); + + $export($export.P + $export.F * !__webpack_require__(27)([].map, true), 'Array', { + // 22.1.3.15 / 15.4.4.19 Array.prototype.map(callbackfn [, thisArg]) + map: function map(callbackfn /* , thisArg */) { + return $map(this, callbackfn, arguments[1]); + }, + }); + + /***/ + }, + /* 362 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0); + var $filter = __webpack_require__(34)(2); + + $export($export.P + $export.F * !__webpack_require__(27)([].filter, true), 'Array', { + // 22.1.3.7 / 15.4.4.20 Array.prototype.filter(callbackfn [, thisArg]) + filter: function filter(callbackfn /* , thisArg */) { + return $filter(this, callbackfn, arguments[1]); + }, + }); + + /***/ + }, + /* 363 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0); + var $some = __webpack_require__(34)(3); + + $export($export.P + $export.F * !__webpack_require__(27)([].some, true), 'Array', { + // 22.1.3.23 / 15.4.4.17 Array.prototype.some(callbackfn [, thisArg]) + some: function some(callbackfn /* , thisArg */) { + return $some(this, callbackfn, arguments[1]); + }, + }); + + /***/ + }, + /* 364 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0); + var $every = __webpack_require__(34)(4); + + $export($export.P + $export.F * !__webpack_require__(27)([].every, true), 'Array', { + // 22.1.3.5 / 15.4.4.16 Array.prototype.every(callbackfn [, thisArg]) + every: function every(callbackfn /* , thisArg */) { + return $every(this, callbackfn, arguments[1]); + }, + }); + + /***/ + }, + /* 365 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0); + var $reduce = __webpack_require__(190); + + $export($export.P + $export.F * !__webpack_require__(27)([].reduce, true), 'Array', { + // 22.1.3.18 / 15.4.4.21 Array.prototype.reduce(callbackfn [, initialValue]) + reduce: function reduce(callbackfn /* , initialValue */) { + return $reduce(this, callbackfn, arguments.length, arguments[1], false); + }, + }); + + /***/ + }, + /* 366 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0); + var $reduce = __webpack_require__(190); + + $export($export.P + $export.F * !__webpack_require__(27)([].reduceRight, true), 'Array', { + // 22.1.3.19 / 15.4.4.22 Array.prototype.reduceRight(callbackfn [, initialValue]) + reduceRight: function reduceRight(callbackfn /* , initialValue */) { + return $reduce(this, callbackfn, arguments.length, arguments[1], true); + }, + }); + + /***/ + }, + /* 367 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0); + var $indexOf = __webpack_require__(86)(false); + var $native = [].indexOf; + var NEGATIVE_ZERO = !!$native && 1 / [1].indexOf(1, -0) < 0; + + $export($export.P + $export.F * (NEGATIVE_ZERO || !__webpack_require__(27)($native)), 'Array', { + // 22.1.3.11 / 15.4.4.14 Array.prototype.indexOf(searchElement [, fromIndex]) + indexOf: function indexOf(searchElement /* , fromIndex = 0 */) { + return NEGATIVE_ZERO + ? // convert -0 to +0 + $native.apply(this, arguments) || 0 + : $indexOf(this, searchElement, arguments[1]); + }, + }); + + /***/ + }, + /* 368 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0); + var toIObject = __webpack_require__(19); + var toInteger = __webpack_require__(26); + var toLength = __webpack_require__(7); + var $native = [].lastIndexOf; + var NEGATIVE_ZERO = !!$native && 1 / [1].lastIndexOf(1, -0) < 0; + + $export($export.P + $export.F * (NEGATIVE_ZERO || !__webpack_require__(27)($native)), 'Array', { + // 22.1.3.14 / 15.4.4.15 Array.prototype.lastIndexOf(searchElement [, fromIndex]) + lastIndexOf: function lastIndexOf(searchElement /* , fromIndex = @[*-1] */) { + // convert -0 to +0 + if (NEGATIVE_ZERO) return $native.apply(this, arguments) || 0; + var O = toIObject(this); + var length = toLength(O.length); + var index = length - 1; + if (arguments.length > 1) index = Math.min(index, toInteger(arguments[1])); + if (index < 0) index = length + index; + for (; index >= 0; index--) if (index in O) if (O[index] === searchElement) return index || 0; + return -1; + }, + }); + + /***/ + }, + /* 369 */ + /***/ function (module, exports, __webpack_require__) { + // 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length) + var $export = __webpack_require__(0); + + $export($export.P, 'Array', { copyWithin: __webpack_require__(191) }); + + __webpack_require__(43)('copyWithin'); + + /***/ + }, + /* 370 */ + /***/ function (module, exports, __webpack_require__) { + // 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length) + var $export = __webpack_require__(0); + + $export($export.P, 'Array', { fill: __webpack_require__(131) }); + + __webpack_require__(43)('fill'); + + /***/ + }, + /* 371 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // 22.1.3.8 Array.prototype.find(predicate, thisArg = undefined) + var $export = __webpack_require__(0); + var $find = __webpack_require__(34)(5); + var KEY = 'find'; + var forced = true; + // Shouldn't skip holes + if (KEY in []) + Array(1)[KEY](function () { + forced = false; + }); + $export($export.P + $export.F * forced, 'Array', { + find: function find(callbackfn /* , that = undefined */) { + return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); + }, + }); + __webpack_require__(43)(KEY); + + /***/ + }, + /* 372 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // 22.1.3.9 Array.prototype.findIndex(predicate, thisArg = undefined) + var $export = __webpack_require__(0); + var $find = __webpack_require__(34)(6); + var KEY = 'findIndex'; + var forced = true; + // Shouldn't skip holes + if (KEY in []) + Array(1)[KEY](function () { + forced = false; + }); + $export($export.P + $export.F * forced, 'Array', { + findIndex: function findIndex(callbackfn /* , that = undefined */) { + return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); + }, + }); + __webpack_require__(43)(KEY); + + /***/ + }, + /* 373 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(55)('Array'); + + /***/ + }, + /* 374 */ + /***/ function (module, exports, __webpack_require__) { + var global = __webpack_require__(3); + var inheritIfRequired = __webpack_require__(119); + var dP = __webpack_require__(9).f; + var gOPN = __webpack_require__(54).f; + var isRegExp = __webpack_require__(90); + var $flags = __webpack_require__(76); + var $RegExp = global.RegExp; + var Base = $RegExp; + var proto = $RegExp.prototype; + var re1 = /a/g; + var re2 = /a/g; + // "new" creates a new object, old webkit buggy here + var CORRECT_NEW = new $RegExp(re1) !== re1; + + if ( + __webpack_require__(8) && + (!CORRECT_NEW || + __webpack_require__(4)(function () { + re2[__webpack_require__(6)('match')] = false; + // RegExp constructor can alter flags and IsRegExp works correct with @@match + return $RegExp(re1) != re1 || $RegExp(re2) == re2 || $RegExp(re1, 'i') != '/a/i'; + })) + ) { + $RegExp = function RegExp(p, f) { + var tiRE = this instanceof $RegExp; + var piRE = isRegExp(p); + var fiU = f === undefined; + return !tiRE && piRE && p.constructor === $RegExp && fiU + ? p + : inheritIfRequired( + CORRECT_NEW + ? new Base(piRE && !fiU ? p.source : p, f) + : Base((piRE = p instanceof $RegExp) ? p.source : p, piRE && fiU ? $flags.call(p) : f), + tiRE ? this : proto, + $RegExp, + ); + }; + var proxy = function (key) { + key in $RegExp || + dP($RegExp, key, { + configurable: true, + get: function () { + return Base[key]; + }, + set: function (it) { + Base[key] = it; + }, + }); + }; + for (var keys = gOPN(Base), i = 0; keys.length > i; ) proxy(keys[i++]); + proto.constructor = $RegExp; + $RegExp.prototype = proto; + __webpack_require__(16)(global, 'RegExp', $RegExp); + } + + __webpack_require__(55)('RegExp'); + + /***/ + }, + /* 375 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + __webpack_require__(194); + var anObject = __webpack_require__(2); + var $flags = __webpack_require__(76); + var DESCRIPTORS = __webpack_require__(8); + var TO_STRING = 'toString'; + var $toString = /./[TO_STRING]; + + var define = function (fn) { + __webpack_require__(16)(RegExp.prototype, TO_STRING, fn, true); + }; + + // 21.2.5.14 RegExp.prototype.toString() + if ( + __webpack_require__(4)(function () { + return $toString.call({ source: 'a', flags: 'b' }) != '/a/b'; + }) + ) { + define(function toString() { + var R = anObject(this); + return '/'.concat( + R.source, + '/', + 'flags' in R ? R.flags : !DESCRIPTORS && R instanceof RegExp ? $flags.call(R) : undefined, + ); + }); + // FF44- RegExp#toString has a wrong name + } else if ($toString.name != TO_STRING) { + define(function toString() { + return $toString.call(this); + }); + } + + /***/ + }, + /* 376 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var anObject = __webpack_require__(2); + var toLength = __webpack_require__(7); + var advanceStringIndex = __webpack_require__(134); + var regExpExec = __webpack_require__(92); + + // @@match logic + __webpack_require__(93)('match', 1, function (defined, MATCH, $match, maybeCallNative) { + return [ + // `String.prototype.match` method + // https://tc39.github.io/ecma262/#sec-string.prototype.match + function match(regexp) { + var O = defined(this); + var fn = regexp == undefined ? undefined : regexp[MATCH]; + return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[MATCH](String(O)); + }, + // `RegExp.prototype[@@match]` method + // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@match + function (regexp) { + var res = maybeCallNative($match, regexp, this); + if (res.done) return res.value; + var rx = anObject(regexp); + var S = String(this); + if (!rx.global) return regExpExec(rx, S); + var fullUnicode = rx.unicode; + rx.lastIndex = 0; + var A = []; + var n = 0; + var result; + while ((result = regExpExec(rx, S)) !== null) { + var matchStr = String(result[0]); + A[n] = matchStr; + if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode); + n++; + } + return n === 0 ? null : A; + }, + ]; + }); + + /***/ + }, + /* 377 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var anObject = __webpack_require__(2); + var toObject = __webpack_require__(11); + var toLength = __webpack_require__(7); + var toInteger = __webpack_require__(26); + var advanceStringIndex = __webpack_require__(134); + var regExpExec = __webpack_require__(92); + var max = Math.max; + var min = Math.min; + var floor = Math.floor; + var SUBSTITUTION_SYMBOLS = /\$([$&`']|\d\d?|<[^>]*>)/g; + var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&`']|\d\d?)/g; + + var maybeToString = function (it) { + return it === undefined ? it : String(it); + }; + + // @@replace logic + __webpack_require__(93)('replace', 2, function (defined, REPLACE, $replace, maybeCallNative) { + return [ + // `String.prototype.replace` method + // https://tc39.github.io/ecma262/#sec-string.prototype.replace + function replace(searchValue, replaceValue) { + var O = defined(this); + var fn = searchValue == undefined ? undefined : searchValue[REPLACE]; + return fn !== undefined + ? fn.call(searchValue, O, replaceValue) + : $replace.call(String(O), searchValue, replaceValue); + }, + // `RegExp.prototype[@@replace]` method + // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@replace + function (regexp, replaceValue) { + var res = maybeCallNative($replace, regexp, this, replaceValue); + if (res.done) return res.value; + + var rx = anObject(regexp); + var S = String(this); + var functionalReplace = typeof replaceValue === 'function'; + if (!functionalReplace) replaceValue = String(replaceValue); + var global = rx.global; + if (global) { + var fullUnicode = rx.unicode; + rx.lastIndex = 0; + } + var results = []; + while (true) { + var result = regExpExec(rx, S); + if (result === null) break; + results.push(result); + if (!global) break; + var matchStr = String(result[0]); + if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode); + } + var accumulatedResult = ''; + var nextSourcePosition = 0; + for (var i = 0; i < results.length; i++) { + result = results[i]; + var matched = String(result[0]); + var position = max(min(toInteger(result.index), S.length), 0); + var captures = []; + // NOTE: This is equivalent to + // captures = result.slice(1).map(maybeToString) + // but for some reason `nativeSlice.call(result, 1, result.length)` (called in + // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and + // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it. + for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j])); + var namedCaptures = result.groups; + if (functionalReplace) { + var replacerArgs = [matched].concat(captures, position, S); + if (namedCaptures !== undefined) replacerArgs.push(namedCaptures); + var replacement = String(replaceValue.apply(undefined, replacerArgs)); + } else { + replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue); + } + if (position >= nextSourcePosition) { + accumulatedResult += S.slice(nextSourcePosition, position) + replacement; + nextSourcePosition = position + matched.length; + } + } + return accumulatedResult + S.slice(nextSourcePosition); + }, + ]; + + // https://tc39.github.io/ecma262/#sec-getsubstitution + function getSubstitution(matched, str, position, captures, namedCaptures, replacement) { + var tailPos = position + matched.length; + var m = captures.length; + var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED; + if (namedCaptures !== undefined) { + namedCaptures = toObject(namedCaptures); + symbols = SUBSTITUTION_SYMBOLS; + } + return $replace.call(replacement, symbols, function (match, ch) { + var capture; + switch (ch.charAt(0)) { + case '$': + return '$'; + case '&': + return matched; + case '`': + return str.slice(0, position); + case "'": + return str.slice(tailPos); + case '<': + capture = namedCaptures[ch.slice(1, -1)]; + break; + default: // \d\d? + var n = +ch; + if (n === 0) return match; + if (n > m) { + var f = floor(n / 10); + if (f === 0) return match; + if (f <= m) + return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1); + return match; + } + capture = captures[n - 1]; + } + return capture === undefined ? '' : capture; + }); + } + }); + + /***/ + }, + /* 378 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var anObject = __webpack_require__(2); + var sameValue = __webpack_require__(180); + var regExpExec = __webpack_require__(92); + + // @@search logic + __webpack_require__(93)('search', 1, function (defined, SEARCH, $search, maybeCallNative) { + return [ + // `String.prototype.search` method + // https://tc39.github.io/ecma262/#sec-string.prototype.search + function search(regexp) { + var O = defined(this); + var fn = regexp == undefined ? undefined : regexp[SEARCH]; + return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O)); + }, + // `RegExp.prototype[@@search]` method + // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@search + function (regexp) { + var res = maybeCallNative($search, regexp, this); + if (res.done) return res.value; + var rx = anObject(regexp); + var S = String(this); + var previousLastIndex = rx.lastIndex; + if (!sameValue(previousLastIndex, 0)) rx.lastIndex = 0; + var result = regExpExec(rx, S); + if (!sameValue(rx.lastIndex, previousLastIndex)) rx.lastIndex = previousLastIndex; + return result === null ? -1 : result.index; + }, + ]; + }); + + /***/ + }, + /* 379 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var isRegExp = __webpack_require__(90); + var anObject = __webpack_require__(2); + var speciesConstructor = __webpack_require__(77); + var advanceStringIndex = __webpack_require__(134); + var toLength = __webpack_require__(7); + var callRegExpExec = __webpack_require__(92); + var regexpExec = __webpack_require__(133); + var fails = __webpack_require__(4); + var $min = Math.min; + var $push = [].push; + var $SPLIT = 'split'; + var LENGTH = 'length'; + var LAST_INDEX = 'lastIndex'; + var MAX_UINT32 = 0xffffffff; + + // babel-minify transpiles RegExp('x', 'y') -> /x/y and it causes SyntaxError + var SUPPORTS_Y = !fails(function () { + RegExp(MAX_UINT32, 'y'); + }); + + // @@split logic + __webpack_require__(93)('split', 2, function (defined, SPLIT, $split, maybeCallNative) { + var internalSplit; + if ( + 'abbc'[$SPLIT](/(b)*/)[1] == 'c' || + 'test'[$SPLIT](/(?:)/, -1)[LENGTH] != 4 || + 'ab'[$SPLIT](/(?:ab)*/)[LENGTH] != 2 || + '.'[$SPLIT](/(.?)(.?)/)[LENGTH] != 4 || + '.'[$SPLIT](/()()/)[LENGTH] > 1 || + ''[$SPLIT](/.?/)[LENGTH] + ) { + // based on es5-shim implementation, need to rework it + internalSplit = function (separator, limit) { + var string = String(this); + if (separator === undefined && limit === 0) return []; + // If `separator` is not a regex, use native split + if (!isRegExp(separator)) return $split.call(string, separator, limit); + var output = []; + var flags = + (separator.ignoreCase ? 'i' : '') + + (separator.multiline ? 'm' : '') + + (separator.unicode ? 'u' : '') + + (separator.sticky ? 'y' : ''); + var lastLastIndex = 0; + var splitLimit = limit === undefined ? MAX_UINT32 : limit >>> 0; + // Make `global` and avoid `lastIndex` issues by working with a copy + var separatorCopy = new RegExp(separator.source, flags + 'g'); + var match, lastIndex, lastLength; + while ((match = regexpExec.call(separatorCopy, string))) { + lastIndex = separatorCopy[LAST_INDEX]; + if (lastIndex > lastLastIndex) { + output.push(string.slice(lastLastIndex, match.index)); + if (match[LENGTH] > 1 && match.index < string[LENGTH]) $push.apply(output, match.slice(1)); + lastLength = match[0][LENGTH]; + lastLastIndex = lastIndex; + if (output[LENGTH] >= splitLimit) break; + } + if (separatorCopy[LAST_INDEX] === match.index) separatorCopy[LAST_INDEX]++; // Avoid an infinite loop + } + if (lastLastIndex === string[LENGTH]) { + if (lastLength || !separatorCopy.test('')) output.push(''); + } else output.push(string.slice(lastLastIndex)); + return output[LENGTH] > splitLimit ? output.slice(0, splitLimit) : output; + }; + // Chakra, V8 + } else if ('0'[$SPLIT](undefined, 0)[LENGTH]) { + internalSplit = function (separator, limit) { + return separator === undefined && limit === 0 ? [] : $split.call(this, separator, limit); + }; + } else { + internalSplit = $split; + } + + return [ + // `String.prototype.split` method + // https://tc39.github.io/ecma262/#sec-string.prototype.split + function split(separator, limit) { + var O = defined(this); + var splitter = separator == undefined ? undefined : separator[SPLIT]; + return splitter !== undefined + ? splitter.call(separator, O, limit) + : internalSplit.call(String(O), separator, limit); + }, + // `RegExp.prototype[@@split]` method + // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@split + // + // NOTE: This cannot be properly polyfilled in engines that don't support + // the 'y' flag. + function (regexp, limit) { + var res = maybeCallNative(internalSplit, regexp, this, limit, internalSplit !== $split); + if (res.done) return res.value; + + var rx = anObject(regexp); + var S = String(this); + var C = speciesConstructor(rx, RegExp); + + var unicodeMatching = rx.unicode; + var flags = + (rx.ignoreCase ? 'i' : '') + + (rx.multiline ? 'm' : '') + + (rx.unicode ? 'u' : '') + + (SUPPORTS_Y ? 'y' : 'g'); + + // ^(? + rx + ) is needed, in combination with some S slicing, to + // simulate the 'y' flag. + var splitter = new C(SUPPORTS_Y ? rx : '^(?:' + rx.source + ')', flags); + var lim = limit === undefined ? MAX_UINT32 : limit >>> 0; + if (lim === 0) return []; + if (S.length === 0) return callRegExpExec(splitter, S) === null ? [S] : []; + var p = 0; + var q = 0; + var A = []; + while (q < S.length) { + splitter.lastIndex = SUPPORTS_Y ? q : 0; + var z = callRegExpExec(splitter, SUPPORTS_Y ? S : S.slice(q)); + var e; + if ( + z === null || + (e = $min(toLength(splitter.lastIndex + (SUPPORTS_Y ? 0 : q)), S.length)) === p + ) { + q = advanceStringIndex(S, q, unicodeMatching); + } else { + A.push(S.slice(p, q)); + if (A.length === lim) return A; + for (var i = 1; i <= z.length - 1; i++) { + A.push(z[i]); + if (A.length === lim) return A; + } + q = p = e; + } + } + A.push(S.slice(p)); + return A; + }, + ]; + }); + + /***/ + }, + /* 380 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var LIBRARY = __webpack_require__(41); + var global = __webpack_require__(3); + var ctx = __webpack_require__(24); + var classof = __webpack_require__(65); + var $export = __webpack_require__(0); + var isObject = __webpack_require__(5); + var aFunction = __webpack_require__(12); + var anInstance = __webpack_require__(56); + var forOf = __webpack_require__(57); + var speciesConstructor = __webpack_require__(77); + var task = __webpack_require__(135).set; + var microtask = __webpack_require__(136)(); + var newPromiseCapabilityModule = __webpack_require__(137); + var perform = __webpack_require__(195); + var userAgent = __webpack_require__(94); + var promiseResolve = __webpack_require__(196); + var PROMISE = 'Promise'; + var TypeError = global.TypeError; + var process = global.process; + var versions = process && process.versions; + var v8 = (versions && versions.v8) || ''; + var $Promise = global[PROMISE]; + var isNode = classof(process) == 'process'; + var empty = function () { + /* empty */ + }; + var Internal, newGenericPromiseCapability, OwnPromiseCapability, Wrapper; + var newPromiseCapability = (newGenericPromiseCapability = newPromiseCapabilityModule.f); + + var USE_NATIVE = !!(function () { + try { + // correct subclassing with @@species support + var promise = $Promise.resolve(1); + var FakePromise = ((promise.constructor = {})[__webpack_require__(6)('species')] = function (exec) { + exec(empty, empty); + }); + // unhandled rejections tracking support, NodeJS Promise without it fails @@species test + return ( + (isNode || typeof PromiseRejectionEvent == 'function') && + promise.then(empty) instanceof FakePromise && + // v8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables + // https://bugs.chromium.org/p/chromium/issues/detail?id=830565 + // we can't detect it synchronously, so just check versions + v8.indexOf('6.6') !== 0 && + userAgent.indexOf('Chrome/66') === -1 + ); + } catch (e) { + /* empty */ + } + })(); + + // helpers + var isThenable = function (it) { + var then; + return isObject(it) && typeof (then = it.then) == 'function' ? then : false; + }; + var notify = function (promise, isReject) { + if (promise._n) return; + promise._n = true; + var chain = promise._c; + microtask(function () { + var value = promise._v; + var ok = promise._s == 1; + var i = 0; + var run = function (reaction) { + var handler = ok ? reaction.ok : reaction.fail; + var resolve = reaction.resolve; + var reject = reaction.reject; + var domain = reaction.domain; + var result, then, exited; + try { + if (handler) { + if (!ok) { + if (promise._h == 2) onHandleUnhandled(promise); + promise._h = 1; + } + if (handler === true) result = value; + else { + if (domain) domain.enter(); + result = handler(value); // may throw + if (domain) { + domain.exit(); + exited = true; + } + } + if (result === reaction.promise) { + reject(TypeError('Promise-chain cycle')); + } else if ((then = isThenable(result))) { + then.call(result, resolve, reject); + } else resolve(result); + } else reject(value); + } catch (e) { + if (domain && !exited) domain.exit(); + reject(e); + } + }; + while (chain.length > i) run(chain[i++]); // variable length - can't use forEach + promise._c = []; + promise._n = false; + if (isReject && !promise._h) onUnhandled(promise); + }); + }; + var onUnhandled = function (promise) { + task.call(global, function () { + var value = promise._v; + var unhandled = isUnhandled(promise); + var result, handler, console; + if (unhandled) { + result = perform(function () { + if (isNode) { + process.emit('unhandledRejection', value, promise); + } else if ((handler = global.onunhandledrejection)) { + handler({ promise: promise, reason: value }); + } else if ((console = global.console) && console.error) { + console.error('Unhandled promise rejection', value); + } + }); + // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should + promise._h = isNode || isUnhandled(promise) ? 2 : 1; + } + promise._a = undefined; + if (unhandled && result.e) throw result.v; + }); + }; + var isUnhandled = function (promise) { + return promise._h !== 1 && (promise._a || promise._c).length === 0; + }; + var onHandleUnhandled = function (promise) { + task.call(global, function () { + var handler; + if (isNode) { + process.emit('rejectionHandled', promise); + } else if ((handler = global.onrejectionhandled)) { + handler({ promise: promise, reason: promise._v }); + } + }); + }; + var $reject = function (value) { + var promise = this; + if (promise._d) return; + promise._d = true; + promise = promise._w || promise; // unwrap + promise._v = value; + promise._s = 2; + if (!promise._a) promise._a = promise._c.slice(); + notify(promise, true); + }; + var $resolve = function (value) { + var promise = this; + var then; + if (promise._d) return; + promise._d = true; + promise = promise._w || promise; // unwrap + try { + if (promise === value) throw TypeError("Promise can't be resolved itself"); + if ((then = isThenable(value))) { + microtask(function () { + var wrapper = { _w: promise, _d: false }; // wrap + try { + then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1)); + } catch (e) { + $reject.call(wrapper, e); + } + }); + } else { + promise._v = value; + promise._s = 1; + notify(promise, false); + } + } catch (e) { + $reject.call({ _w: promise, _d: false }, e); // wrap + } + }; + + // constructor polyfill + if (!USE_NATIVE) { + // 25.4.3.1 Promise(executor) + $Promise = function Promise(executor) { + anInstance(this, $Promise, PROMISE, '_h'); + aFunction(executor); + Internal.call(this); + try { + executor(ctx($resolve, this, 1), ctx($reject, this, 1)); + } catch (err) { + $reject.call(this, err); + } + }; + // eslint-disable-next-line no-unused-vars + Internal = function Promise(executor) { + this._c = []; // <- awaiting reactions + this._a = undefined; // <- checked in isUnhandled reactions + this._s = 0; // <- state + this._d = false; // <- done + this._v = undefined; // <- value + this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled + this._n = false; // <- notify + }; + Internal.prototype = __webpack_require__(58)($Promise.prototype, { + // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected) + then: function then(onFulfilled, onRejected) { + var reaction = newPromiseCapability(speciesConstructor(this, $Promise)); + reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true; + reaction.fail = typeof onRejected == 'function' && onRejected; + reaction.domain = isNode ? process.domain : undefined; + this._c.push(reaction); + if (this._a) this._a.push(reaction); + if (this._s) notify(this, false); + return reaction.promise; + }, + // 25.4.5.1 Promise.prototype.catch(onRejected) + catch: function (onRejected) { + return this.then(undefined, onRejected); + }, + }); + OwnPromiseCapability = function () { + var promise = new Internal(); + this.promise = promise; + this.resolve = ctx($resolve, promise, 1); + this.reject = ctx($reject, promise, 1); + }; + newPromiseCapabilityModule.f = newPromiseCapability = function (C) { + return C === $Promise || C === Wrapper + ? new OwnPromiseCapability(C) + : newGenericPromiseCapability(C); + }; + } + + $export($export.G + $export.W + $export.F * !USE_NATIVE, { Promise: $Promise }); + __webpack_require__(64)($Promise, PROMISE); + __webpack_require__(55)(PROMISE); + Wrapper = __webpack_require__(23)[PROMISE]; + + // statics + $export($export.S + $export.F * !USE_NATIVE, PROMISE, { + // 25.4.4.5 Promise.reject(r) + reject: function reject(r) { + var capability = newPromiseCapability(this); + var $$reject = capability.reject; + $$reject(r); + return capability.promise; + }, + }); + $export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, { + // 25.4.4.6 Promise.resolve(x) + resolve: function resolve(x) { + return promiseResolve(LIBRARY && this === Wrapper ? $Promise : this, x); + }, + }); + $export( + $export.S + + $export.F * + !( + USE_NATIVE && + __webpack_require__(91)(function (iter) { + $Promise.all(iter)['catch'](empty); + }) + ), + PROMISE, + { + // 25.4.4.1 Promise.all(iterable) + all: function all(iterable) { + var C = this; + var capability = newPromiseCapability(C); + var resolve = capability.resolve; + var reject = capability.reject; + var result = perform(function () { + var values = []; + var index = 0; + var remaining = 1; + forOf(iterable, false, function (promise) { + var $index = index++; + var alreadyCalled = false; + values.push(undefined); + remaining++; + C.resolve(promise).then(function (value) { + if (alreadyCalled) return; + alreadyCalled = true; + values[$index] = value; + --remaining || resolve(values); + }, reject); + }); + --remaining || resolve(values); + }); + if (result.e) reject(result.v); + return capability.promise; + }, + // 25.4.4.4 Promise.race(iterable) + race: function race(iterable) { + var C = this; + var capability = newPromiseCapability(C); + var reject = capability.reject; + var result = perform(function () { + forOf(iterable, false, function (promise) { + C.resolve(promise).then(capability.resolve, reject); + }); + }); + if (result.e) reject(result.v); + return capability.promise; + }, + }, + ); + + /***/ + }, + /* 381 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var weak = __webpack_require__(201); + var validate = __webpack_require__(59); + var WEAK_SET = 'WeakSet'; + + // 23.4 WeakSet Objects + __webpack_require__(95)( + WEAK_SET, + function (get) { + return function WeakSet() { + return get(this, arguments.length > 0 ? arguments[0] : undefined); + }; + }, + { + // 23.4.3.1 WeakSet.prototype.add(value) + add: function add(value) { + return weak.def(validate(this, WEAK_SET), value, true); + }, + }, + weak, + false, + true, + ); + + /***/ + }, + /* 382 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0); + var $typed = __webpack_require__(96); + var buffer = __webpack_require__(138); + var anObject = __webpack_require__(2); + var toAbsoluteIndex = __webpack_require__(52); + var toLength = __webpack_require__(7); + var isObject = __webpack_require__(5); + var ArrayBuffer = __webpack_require__(3).ArrayBuffer; + var speciesConstructor = __webpack_require__(77); + var $ArrayBuffer = buffer.ArrayBuffer; + var $DataView = buffer.DataView; + var $isView = $typed.ABV && ArrayBuffer.isView; + var $slice = $ArrayBuffer.prototype.slice; + var VIEW = $typed.VIEW; + var ARRAY_BUFFER = 'ArrayBuffer'; + + $export($export.G + $export.W + $export.F * (ArrayBuffer !== $ArrayBuffer), { + ArrayBuffer: $ArrayBuffer, + }); + + $export($export.S + $export.F * !$typed.CONSTR, ARRAY_BUFFER, { + // 24.1.3.1 ArrayBuffer.isView(arg) + isView: function isView(it) { + return ($isView && $isView(it)) || (isObject(it) && VIEW in it); + }, + }); + + $export( + $export.P + + $export.U + + $export.F * + __webpack_require__(4)(function () { + return !new $ArrayBuffer(2).slice(1, undefined).byteLength; + }), + ARRAY_BUFFER, + { + // 24.1.4.3 ArrayBuffer.prototype.slice(start, end) + slice: function slice(start, end) { + if ($slice !== undefined && end === undefined) return $slice.call(anObject(this), start); // FF fix + var len = anObject(this).byteLength; + var first = toAbsoluteIndex(start, len); + var fin = toAbsoluteIndex(end === undefined ? len : end, len); + var result = new (speciesConstructor(this, $ArrayBuffer))(toLength(fin - first)); + var viewS = new $DataView(this); + var viewT = new $DataView(result); + var index = 0; + while (first < fin) { + viewT.setUint8(index++, viewS.getUint8(first++)); + } + return result; + }, + }, + ); + + __webpack_require__(55)(ARRAY_BUFFER); + + /***/ + }, + /* 383 */ + /***/ function (module, exports, __webpack_require__) { + var $export = __webpack_require__(0); + $export($export.G + $export.W + $export.F * !__webpack_require__(96).ABV, { + DataView: __webpack_require__(138).DataView, + }); + + /***/ + }, + /* 384 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(38)('Int8', 1, function (init) { + return function Int8Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; + }); + + /***/ + }, + /* 385 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(38)('Uint8', 1, function (init) { + return function Uint8Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; + }); + + /***/ + }, + /* 386 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(38)( + 'Uint8', + 1, + function (init) { + return function Uint8ClampedArray(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; + }, + true, + ); + + /***/ + }, + /* 387 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(38)('Int16', 2, function (init) { + return function Int16Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; + }); + + /***/ + }, + /* 388 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(38)('Uint16', 2, function (init) { + return function Uint16Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; + }); + + /***/ + }, + /* 389 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(38)('Int32', 4, function (init) { + return function Int32Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; + }); + + /***/ + }, + /* 390 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(38)('Uint32', 4, function (init) { + return function Uint32Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; + }); + + /***/ + }, + /* 391 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(38)('Float32', 4, function (init) { + return function Float32Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; + }); + + /***/ + }, + /* 392 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(38)('Float64', 8, function (init) { + return function Float64Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; + }); + + /***/ + }, + /* 393 */ + /***/ function (module, exports, __webpack_require__) { + // 26.1.1 Reflect.apply(target, thisArgument, argumentsList) + var $export = __webpack_require__(0); + var aFunction = __webpack_require__(12); + var anObject = __webpack_require__(2); + var rApply = (__webpack_require__(3).Reflect || {}).apply; + var fApply = Function.apply; + // MS Edge argumentsList argument is optional + $export( + $export.S + + $export.F * + !__webpack_require__(4)(function () { + rApply(function () { + /* empty */ + }); + }), + 'Reflect', + { + apply: function apply(target, thisArgument, argumentsList) { + var T = aFunction(target); + var L = anObject(argumentsList); + return rApply ? rApply(T, thisArgument, L) : fApply.call(T, thisArgument, L); + }, + }, + ); + + /***/ + }, + /* 394 */ + /***/ function (module, exports, __webpack_require__) { + // 26.1.2 Reflect.construct(target, argumentsList [, newTarget]) + var $export = __webpack_require__(0); + var create = __webpack_require__(53); + var aFunction = __webpack_require__(12); + var anObject = __webpack_require__(2); + var isObject = __webpack_require__(5); + var fails = __webpack_require__(4); + var bind = __webpack_require__(181); + var rConstruct = (__webpack_require__(3).Reflect || {}).construct; + + // MS Edge supports only 2 arguments and argumentsList argument is optional + // FF Nightly sets third argument as `new.target`, but does not create `this` from it + var NEW_TARGET_BUG = fails(function () { + function F() { + /* empty */ + } + return !( + rConstruct( + function () { + /* empty */ + }, + [], + F, + ) instanceof F + ); + }); + var ARGS_BUG = !fails(function () { + rConstruct(function () { + /* empty */ + }); + }); + + $export($export.S + $export.F * (NEW_TARGET_BUG || ARGS_BUG), 'Reflect', { + construct: function construct(Target, args /* , newTarget */) { + aFunction(Target); + anObject(args); + var newTarget = arguments.length < 3 ? Target : aFunction(arguments[2]); + if (ARGS_BUG && !NEW_TARGET_BUG) return rConstruct(Target, args, newTarget); + if (Target == newTarget) { + // w/o altered newTarget, optimization for 0-4 arguments + switch (args.length) { + case 0: + return new Target(); + case 1: + return new Target(args[0]); + case 2: + return new Target(args[0], args[1]); + case 3: + return new Target(args[0], args[1], args[2]); + case 4: + return new Target(args[0], args[1], args[2], args[3]); + } + // w/o altered newTarget, lot of arguments case + var $args = [null]; + $args.push.apply($args, args); + return new (bind.apply(Target, $args))(); + } + // with altered newTarget, not support built-in constructors + var proto = newTarget.prototype; + var instance = create(isObject(proto) ? proto : Object.prototype); + var result = Function.apply.call(Target, instance, args); + return isObject(result) ? result : instance; + }, + }); + + /***/ + }, + /* 395 */ + /***/ function (module, exports, __webpack_require__) { + // 26.1.3 Reflect.defineProperty(target, propertyKey, attributes) + var dP = __webpack_require__(9); + var $export = __webpack_require__(0); + var anObject = __webpack_require__(2); + var toPrimitive = __webpack_require__(31); + + // MS Edge has broken Reflect.defineProperty - throwing instead of returning false + $export( + $export.S + + $export.F * + __webpack_require__(4)(function () { + // eslint-disable-next-line no-undef + Reflect.defineProperty(dP.f({}, 1, { value: 1 }), 1, { value: 2 }); + }), + 'Reflect', + { + defineProperty: function defineProperty(target, propertyKey, attributes) { + anObject(target); + propertyKey = toPrimitive(propertyKey, true); + anObject(attributes); + try { + dP.f(target, propertyKey, attributes); + return true; + } catch (e) { + return false; + } + }, + }, + ); + + /***/ + }, + /* 396 */ + /***/ function (module, exports, __webpack_require__) { + // 26.1.4 Reflect.deleteProperty(target, propertyKey) + var $export = __webpack_require__(0); + var gOPD = __webpack_require__(20).f; + var anObject = __webpack_require__(2); + + $export($export.S, 'Reflect', { + deleteProperty: function deleteProperty(target, propertyKey) { + var desc = gOPD(anObject(target), propertyKey); + return desc && !desc.configurable ? false : delete target[propertyKey]; + }, + }); + + /***/ + }, + /* 397 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // 26.1.5 Reflect.enumerate(target) + var $export = __webpack_require__(0); + var anObject = __webpack_require__(2); + var Enumerate = function (iterated) { + this._t = anObject(iterated); // target + this._i = 0; // next index + var keys = (this._k = []); // keys + var key; + for (key in iterated) keys.push(key); + }; + __webpack_require__(124)(Enumerate, 'Object', function () { + var that = this; + var keys = that._k; + var key; + do { + if (that._i >= keys.length) return { value: undefined, done: true }; + } while (!((key = keys[that._i++]) in that._t)); + return { value: key, done: false }; + }); + + $export($export.S, 'Reflect', { + enumerate: function enumerate(target) { + return new Enumerate(target); + }, + }); + + /***/ + }, + /* 398 */ + /***/ function (module, exports, __webpack_require__) { + // 26.1.6 Reflect.get(target, propertyKey [, receiver]) + var gOPD = __webpack_require__(20); + var getPrototypeOf = __webpack_require__(21); + var has = __webpack_require__(18); + var $export = __webpack_require__(0); + var isObject = __webpack_require__(5); + var anObject = __webpack_require__(2); + + function get(target, propertyKey /* , receiver */) { + var receiver = arguments.length < 3 ? target : arguments[2]; + var desc, proto; + if (anObject(target) === receiver) return target[propertyKey]; + if ((desc = gOPD.f(target, propertyKey))) + return has(desc, 'value') + ? desc.value + : desc.get !== undefined + ? desc.get.call(receiver) + : undefined; + if (isObject((proto = getPrototypeOf(target)))) return get(proto, propertyKey, receiver); + } + + $export($export.S, 'Reflect', { get: get }); + + /***/ + }, + /* 399 */ + /***/ function (module, exports, __webpack_require__) { + // 26.1.7 Reflect.getOwnPropertyDescriptor(target, propertyKey) + var gOPD = __webpack_require__(20); + var $export = __webpack_require__(0); + var anObject = __webpack_require__(2); + + $export($export.S, 'Reflect', { + getOwnPropertyDescriptor: function getOwnPropertyDescriptor(target, propertyKey) { + return gOPD.f(anObject(target), propertyKey); + }, + }); + + /***/ + }, + /* 400 */ + /***/ function (module, exports, __webpack_require__) { + // 26.1.8 Reflect.getPrototypeOf(target) + var $export = __webpack_require__(0); + var getProto = __webpack_require__(21); + var anObject = __webpack_require__(2); + + $export($export.S, 'Reflect', { + getPrototypeOf: function getPrototypeOf(target) { + return getProto(anObject(target)); + }, + }); + + /***/ + }, + /* 401 */ + /***/ function (module, exports, __webpack_require__) { + // 26.1.9 Reflect.has(target, propertyKey) + var $export = __webpack_require__(0); + + $export($export.S, 'Reflect', { + has: function has(target, propertyKey) { + return propertyKey in target; + }, + }); + + /***/ + }, + /* 402 */ + /***/ function (module, exports, __webpack_require__) { + // 26.1.10 Reflect.isExtensible(target) + var $export = __webpack_require__(0); + var anObject = __webpack_require__(2); + var $isExtensible = Object.isExtensible; + + $export($export.S, 'Reflect', { + isExtensible: function isExtensible(target) { + anObject(target); + return $isExtensible ? $isExtensible(target) : true; + }, + }); + + /***/ + }, + /* 403 */ + /***/ function (module, exports, __webpack_require__) { + // 26.1.11 Reflect.ownKeys(target) + var $export = __webpack_require__(0); + + $export($export.S, 'Reflect', { ownKeys: __webpack_require__(203) }); + + /***/ + }, + /* 404 */ + /***/ function (module, exports, __webpack_require__) { + // 26.1.12 Reflect.preventExtensions(target) + var $export = __webpack_require__(0); + var anObject = __webpack_require__(2); + var $preventExtensions = Object.preventExtensions; + + $export($export.S, 'Reflect', { + preventExtensions: function preventExtensions(target) { + anObject(target); + try { + if ($preventExtensions) $preventExtensions(target); + return true; + } catch (e) { + return false; + } + }, + }); + + /***/ + }, + /* 405 */ + /***/ function (module, exports, __webpack_require__) { + // 26.1.13 Reflect.set(target, propertyKey, V [, receiver]) + var dP = __webpack_require__(9); + var gOPD = __webpack_require__(20); + var getPrototypeOf = __webpack_require__(21); + var has = __webpack_require__(18); + var $export = __webpack_require__(0); + var createDesc = __webpack_require__(49); + var anObject = __webpack_require__(2); + var isObject = __webpack_require__(5); + + function set(target, propertyKey, V /* , receiver */) { + var receiver = arguments.length < 4 ? target : arguments[3]; + var ownDesc = gOPD.f(anObject(target), propertyKey); + var existingDescriptor, proto; + if (!ownDesc) { + if (isObject((proto = getPrototypeOf(target)))) { + return set(proto, propertyKey, V, receiver); + } + ownDesc = createDesc(0); + } + if (has(ownDesc, 'value')) { + if (ownDesc.writable === false || !isObject(receiver)) return false; + if ((existingDescriptor = gOPD.f(receiver, propertyKey))) { + if (existingDescriptor.get || existingDescriptor.set || existingDescriptor.writable === false) + return false; + existingDescriptor.value = V; + dP.f(receiver, propertyKey, existingDescriptor); + } else dP.f(receiver, propertyKey, createDesc(0, V)); + return true; + } + return ownDesc.set === undefined ? false : (ownDesc.set.call(receiver, V), true); + } + + $export($export.S, 'Reflect', { set: set }); + + /***/ + }, + /* 406 */ + /***/ function (module, exports, __webpack_require__) { + // 26.1.14 Reflect.setPrototypeOf(target, proto) + var $export = __webpack_require__(0); + var setProto = __webpack_require__(117); + + if (setProto) + $export($export.S, 'Reflect', { + setPrototypeOf: function setPrototypeOf(target, proto) { + setProto.check(target, proto); + try { + setProto.set(target, proto); + return true; + } catch (e) { + return false; + } + }, + }); + + /***/ + }, + /* 407 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // https://github.com/tc39/Array.prototype.includes + var $export = __webpack_require__(0); + var $includes = __webpack_require__(86)(true); + + $export($export.P, 'Array', { + includes: function includes(el /* , fromIndex = 0 */) { + return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined); + }, + }); + + __webpack_require__(43)('includes'); + + /***/ + }, + /* 408 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // https://tc39.github.io/proposal-flatMap/#sec-Array.prototype.flatMap + var $export = __webpack_require__(0); + var flattenIntoArray = __webpack_require__(204); + var toObject = __webpack_require__(11); + var toLength = __webpack_require__(7); + var aFunction = __webpack_require__(12); + var arraySpeciesCreate = __webpack_require__(130); + + $export($export.P, 'Array', { + flatMap: function flatMap(callbackfn /* , thisArg */) { + var O = toObject(this); + var sourceLen, A; + aFunction(callbackfn); + sourceLen = toLength(O.length); + A = arraySpeciesCreate(O, 0); + flattenIntoArray(A, O, O, sourceLen, 0, 1, callbackfn, arguments[1]); + return A; + }, + }); + + __webpack_require__(43)('flatMap'); + + /***/ + }, + /* 409 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // https://tc39.github.io/proposal-flatMap/#sec-Array.prototype.flatten + var $export = __webpack_require__(0); + var flattenIntoArray = __webpack_require__(204); + var toObject = __webpack_require__(11); + var toLength = __webpack_require__(7); + var toInteger = __webpack_require__(26); + var arraySpeciesCreate = __webpack_require__(130); + + $export($export.P, 'Array', { + flatten: function flatten(/* depthArg = 1 */) { + var depthArg = arguments[0]; + var O = toObject(this); + var sourceLen = toLength(O.length); + var A = arraySpeciesCreate(O, 0); + flattenIntoArray(A, O, O, sourceLen, 0, depthArg === undefined ? 1 : toInteger(depthArg)); + return A; + }, + }); + + __webpack_require__(43)('flatten'); + + /***/ + }, + /* 410 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // https://github.com/mathiasbynens/String.prototype.at + var $export = __webpack_require__(0); + var $at = __webpack_require__(89)(true); + + $export($export.P, 'String', { + at: function at(pos) { + return $at(this, pos); + }, + }); + + /***/ + }, + /* 411 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // https://github.com/tc39/proposal-string-pad-start-end + var $export = __webpack_require__(0); + var $pad = __webpack_require__(205); + var userAgent = __webpack_require__(94); + + // https://github.com/zloirock/core-js/issues/280 + var WEBKIT_BUG = /Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(userAgent); + + $export($export.P + $export.F * WEBKIT_BUG, 'String', { + padStart: function padStart(maxLength /* , fillString = ' ' */) { + return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, true); + }, + }); + + /***/ + }, + /* 412 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // https://github.com/tc39/proposal-string-pad-start-end + var $export = __webpack_require__(0); + var $pad = __webpack_require__(205); + var userAgent = __webpack_require__(94); + + // https://github.com/zloirock/core-js/issues/280 + var WEBKIT_BUG = /Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(userAgent); + + $export($export.P + $export.F * WEBKIT_BUG, 'String', { + padEnd: function padEnd(maxLength /* , fillString = ' ' */) { + return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, false); + }, + }); + + /***/ + }, + /* 413 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // https://github.com/sebmarkbage/ecmascript-string-left-right-trim + __webpack_require__(66)( + 'trimLeft', + function ($trim) { + return function trimLeft() { + return $trim(this, 1); + }; + }, + 'trimStart', + ); + + /***/ + }, + /* 414 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // https://github.com/sebmarkbage/ecmascript-string-left-right-trim + __webpack_require__(66)( + 'trimRight', + function ($trim) { + return function trimRight() { + return $trim(this, 2); + }; + }, + 'trimEnd', + ); + + /***/ + }, + /* 415 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // https://tc39.github.io/String.prototype.matchAll/ + var $export = __webpack_require__(0); + var defined = __webpack_require__(32); + var toLength = __webpack_require__(7); + var isRegExp = __webpack_require__(90); + var getFlags = __webpack_require__(76); + var RegExpProto = RegExp.prototype; + + var $RegExpStringIterator = function (regexp, string) { + this._r = regexp; + this._s = string; + }; + + __webpack_require__(124)($RegExpStringIterator, 'RegExp String', function next() { + var match = this._r.exec(this._s); + return { value: match, done: match === null }; + }); + + $export($export.P, 'String', { + matchAll: function matchAll(regexp) { + defined(this); + if (!isRegExp(regexp)) throw TypeError(regexp + ' is not a regexp!'); + var S = String(this); + var flags = 'flags' in RegExpProto ? String(regexp.flags) : getFlags.call(regexp); + var rx = new RegExp(regexp.source, ~flags.indexOf('g') ? flags : 'g' + flags); + rx.lastIndex = toLength(regexp.lastIndex); + return new $RegExpStringIterator(rx, S); + }, + }); + + /***/ + }, + /* 416 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(113)('asyncIterator'); + + /***/ + }, + /* 417 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(113)('observable'); + + /***/ + }, + /* 418 */ + /***/ function (module, exports, __webpack_require__) { + // https://github.com/tc39/proposal-object-getownpropertydescriptors + var $export = __webpack_require__(0); + var ownKeys = __webpack_require__(203); + var toIObject = __webpack_require__(19); + var gOPD = __webpack_require__(20); + var createProperty = __webpack_require__(128); + + $export($export.S, 'Object', { + getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object) { + var O = toIObject(object); + var getDesc = gOPD.f; + var keys = ownKeys(O); + var result = {}; + var i = 0; + var key, desc; + while (keys.length > i) { + desc = getDesc(O, (key = keys[i++])); + if (desc !== undefined) createProperty(result, key, desc); + } + return result; + }, + }); + + /***/ + }, + /* 419 */ + /***/ function (module, exports, __webpack_require__) { + // https://github.com/tc39/proposal-object-values-entries + var $export = __webpack_require__(0); + var $values = __webpack_require__(206)(false); + + $export($export.S, 'Object', { + values: function values(it) { + return $values(it); + }, + }); + + /***/ + }, + /* 420 */ + /***/ function (module, exports, __webpack_require__) { + // https://github.com/tc39/proposal-object-values-entries + var $export = __webpack_require__(0); + var $entries = __webpack_require__(206)(true); + + $export($export.S, 'Object', { + entries: function entries(it) { + return $entries(it); + }, + }); + + /***/ + }, + /* 421 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0); + var toObject = __webpack_require__(11); + var aFunction = __webpack_require__(12); + var $defineProperty = __webpack_require__(9); + + // B.2.2.2 Object.prototype.__defineGetter__(P, getter) + __webpack_require__(8) && + $export($export.P + __webpack_require__(97), 'Object', { + __defineGetter__: function __defineGetter__(P, getter) { + $defineProperty.f(toObject(this), P, { + get: aFunction(getter), + enumerable: true, + configurable: true, + }); + }, + }); + + /***/ + }, + /* 422 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0); + var toObject = __webpack_require__(11); + var aFunction = __webpack_require__(12); + var $defineProperty = __webpack_require__(9); + + // B.2.2.3 Object.prototype.__defineSetter__(P, setter) + __webpack_require__(8) && + $export($export.P + __webpack_require__(97), 'Object', { + __defineSetter__: function __defineSetter__(P, setter) { + $defineProperty.f(toObject(this), P, { + set: aFunction(setter), + enumerable: true, + configurable: true, + }); + }, + }); + + /***/ + }, + /* 423 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0); + var toObject = __webpack_require__(11); + var toPrimitive = __webpack_require__(31); + var getPrototypeOf = __webpack_require__(21); + var getOwnPropertyDescriptor = __webpack_require__(20).f; + + // B.2.2.4 Object.prototype.__lookupGetter__(P) + __webpack_require__(8) && + $export($export.P + __webpack_require__(97), 'Object', { + __lookupGetter__: function __lookupGetter__(P) { + var O = toObject(this); + var K = toPrimitive(P, true); + var D; + do { + if ((D = getOwnPropertyDescriptor(O, K))) return D.get; + } while ((O = getPrototypeOf(O))); + }, + }); + + /***/ + }, + /* 424 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0); + var toObject = __webpack_require__(11); + var toPrimitive = __webpack_require__(31); + var getPrototypeOf = __webpack_require__(21); + var getOwnPropertyDescriptor = __webpack_require__(20).f; + + // B.2.2.5 Object.prototype.__lookupSetter__(P) + __webpack_require__(8) && + $export($export.P + __webpack_require__(97), 'Object', { + __lookupSetter__: function __lookupSetter__(P) { + var O = toObject(this); + var K = toPrimitive(P, true); + var D; + do { + if ((D = getOwnPropertyDescriptor(O, K))) return D.set; + } while ((O = getPrototypeOf(O))); + }, + }); + + /***/ + }, + /* 425 */ + /***/ function (module, exports, __webpack_require__) { + // https://github.com/DavidBruant/Map-Set.prototype.toJSON + var $export = __webpack_require__(0); + + $export($export.P + $export.R, 'Map', { toJSON: __webpack_require__(207)('Map') }); + + /***/ + }, + /* 426 */ + /***/ function (module, exports, __webpack_require__) { + // https://github.com/DavidBruant/Map-Set.prototype.toJSON + var $export = __webpack_require__(0); + + $export($export.P + $export.R, 'Set', { toJSON: __webpack_require__(207)('Set') }); + + /***/ + }, + /* 427 */ + /***/ function (module, exports, __webpack_require__) { + // https://tc39.github.io/proposal-setmap-offrom/#sec-map.of + __webpack_require__(98)('Map'); + + /***/ + }, + /* 428 */ + /***/ function (module, exports, __webpack_require__) { + // https://tc39.github.io/proposal-setmap-offrom/#sec-set.of + __webpack_require__(98)('Set'); + + /***/ + }, + /* 429 */ + /***/ function (module, exports, __webpack_require__) { + // https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.of + __webpack_require__(98)('WeakMap'); + + /***/ + }, + /* 430 */ + /***/ function (module, exports, __webpack_require__) { + // https://tc39.github.io/proposal-setmap-offrom/#sec-weakset.of + __webpack_require__(98)('WeakSet'); + + /***/ + }, + /* 431 */ + /***/ function (module, exports, __webpack_require__) { + // https://tc39.github.io/proposal-setmap-offrom/#sec-map.from + __webpack_require__(99)('Map'); + + /***/ + }, + /* 432 */ + /***/ function (module, exports, __webpack_require__) { + // https://tc39.github.io/proposal-setmap-offrom/#sec-set.from + __webpack_require__(99)('Set'); + + /***/ + }, + /* 433 */ + /***/ function (module, exports, __webpack_require__) { + // https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.from + __webpack_require__(99)('WeakMap'); + + /***/ + }, + /* 434 */ + /***/ function (module, exports, __webpack_require__) { + // https://tc39.github.io/proposal-setmap-offrom/#sec-weakset.from + __webpack_require__(99)('WeakSet'); + + /***/ + }, + /* 435 */ + /***/ function (module, exports, __webpack_require__) { + // https://github.com/tc39/proposal-global + var $export = __webpack_require__(0); + + $export($export.G, { global: __webpack_require__(3) }); + + /***/ + }, + /* 436 */ + /***/ function (module, exports, __webpack_require__) { + // https://github.com/tc39/proposal-global + var $export = __webpack_require__(0); + + $export($export.S, 'System', { global: __webpack_require__(3) }); + + /***/ + }, + /* 437 */ + /***/ function (module, exports, __webpack_require__) { + // https://github.com/ljharb/proposal-is-error + var $export = __webpack_require__(0); + var cof = __webpack_require__(25); + + $export($export.S, 'Error', { + isError: function isError(it) { + return cof(it) === 'Error'; + }, + }); + + /***/ + }, + /* 438 */ + /***/ function (module, exports, __webpack_require__) { + // https://rwaldron.github.io/proposal-math-extensions/ + var $export = __webpack_require__(0); + + $export($export.S, 'Math', { + clamp: function clamp(x, lower, upper) { + return Math.min(upper, Math.max(lower, x)); + }, + }); + + /***/ + }, + /* 439 */ + /***/ function (module, exports, __webpack_require__) { + // https://rwaldron.github.io/proposal-math-extensions/ + var $export = __webpack_require__(0); + + $export($export.S, 'Math', { DEG_PER_RAD: Math.PI / 180 }); + + /***/ + }, + /* 440 */ + /***/ function (module, exports, __webpack_require__) { + // https://rwaldron.github.io/proposal-math-extensions/ + var $export = __webpack_require__(0); + var RAD_PER_DEG = 180 / Math.PI; + + $export($export.S, 'Math', { + degrees: function degrees(radians) { + return radians * RAD_PER_DEG; + }, + }); + + /***/ + }, + /* 441 */ + /***/ function (module, exports, __webpack_require__) { + // https://rwaldron.github.io/proposal-math-extensions/ + var $export = __webpack_require__(0); + var scale = __webpack_require__(209); + var fround = __webpack_require__(188); + + $export($export.S, 'Math', { + fscale: function fscale(x, inLow, inHigh, outLow, outHigh) { + return fround(scale(x, inLow, inHigh, outLow, outHigh)); + }, + }); + + /***/ + }, + /* 442 */ + /***/ function (module, exports, __webpack_require__) { + // https://gist.github.com/BrendanEich/4294d5c212a6d2254703 + var $export = __webpack_require__(0); + + $export($export.S, 'Math', { + iaddh: function iaddh(x0, x1, y0, y1) { + var $x0 = x0 >>> 0; + var $x1 = x1 >>> 0; + var $y0 = y0 >>> 0; + return ($x1 + (y1 >>> 0) + ((($x0 & $y0) | (($x0 | $y0) & ~(($x0 + $y0) >>> 0))) >>> 31)) | 0; + }, + }); + + /***/ + }, + /* 443 */ + /***/ function (module, exports, __webpack_require__) { + // https://gist.github.com/BrendanEich/4294d5c212a6d2254703 + var $export = __webpack_require__(0); + + $export($export.S, 'Math', { + isubh: function isubh(x0, x1, y0, y1) { + var $x0 = x0 >>> 0; + var $x1 = x1 >>> 0; + var $y0 = y0 >>> 0; + return ($x1 - (y1 >>> 0) - (((~$x0 & $y0) | (~($x0 ^ $y0) & (($x0 - $y0) >>> 0))) >>> 31)) | 0; + }, + }); + + /***/ + }, + /* 444 */ + /***/ function (module, exports, __webpack_require__) { + // https://gist.github.com/BrendanEich/4294d5c212a6d2254703 + var $export = __webpack_require__(0); + + $export($export.S, 'Math', { + imulh: function imulh(u, v) { + var UINT16 = 0xffff; + var $u = +u; + var $v = +v; + var u0 = $u & UINT16; + var v0 = $v & UINT16; + var u1 = $u >> 16; + var v1 = $v >> 16; + var t = ((u1 * v0) >>> 0) + ((u0 * v0) >>> 16); + return u1 * v1 + (t >> 16) + ((((u0 * v1) >>> 0) + (t & UINT16)) >> 16); + }, + }); + + /***/ + }, + /* 445 */ + /***/ function (module, exports, __webpack_require__) { + // https://rwaldron.github.io/proposal-math-extensions/ + var $export = __webpack_require__(0); + + $export($export.S, 'Math', { RAD_PER_DEG: 180 / Math.PI }); + + /***/ + }, + /* 446 */ + /***/ function (module, exports, __webpack_require__) { + // https://rwaldron.github.io/proposal-math-extensions/ + var $export = __webpack_require__(0); + var DEG_PER_RAD = Math.PI / 180; + + $export($export.S, 'Math', { + radians: function radians(degrees) { + return degrees * DEG_PER_RAD; + }, + }); + + /***/ + }, + /* 447 */ + /***/ function (module, exports, __webpack_require__) { + // https://rwaldron.github.io/proposal-math-extensions/ + var $export = __webpack_require__(0); + + $export($export.S, 'Math', { scale: __webpack_require__(209) }); + + /***/ + }, + /* 448 */ + /***/ function (module, exports, __webpack_require__) { + // https://gist.github.com/BrendanEich/4294d5c212a6d2254703 + var $export = __webpack_require__(0); + + $export($export.S, 'Math', { + umulh: function umulh(u, v) { + var UINT16 = 0xffff; + var $u = +u; + var $v = +v; + var u0 = $u & UINT16; + var v0 = $v & UINT16; + var u1 = $u >>> 16; + var v1 = $v >>> 16; + var t = ((u1 * v0) >>> 0) + ((u0 * v0) >>> 16); + return u1 * v1 + (t >>> 16) + ((((u0 * v1) >>> 0) + (t & UINT16)) >>> 16); + }, + }); + + /***/ + }, + /* 449 */ + /***/ function (module, exports, __webpack_require__) { + // http://jfbastien.github.io/papers/Math.signbit.html + var $export = __webpack_require__(0); + + $export($export.S, 'Math', { + signbit: function signbit(x) { + // eslint-disable-next-line no-self-compare + return (x = +x) != x ? x : x == 0 ? 1 / x == Infinity : x > 0; + }, + }); + + /***/ + }, + /* 450 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + // https://github.com/tc39/proposal-promise-finally + + var $export = __webpack_require__(0); + var core = __webpack_require__(23); + var global = __webpack_require__(3); + var speciesConstructor = __webpack_require__(77); + var promiseResolve = __webpack_require__(196); + + $export($export.P + $export.R, 'Promise', { + finally: function (onFinally) { + var C = speciesConstructor(this, core.Promise || global.Promise); + var isFunction = typeof onFinally == 'function'; + return this.then( + isFunction + ? function (x) { + return promiseResolve(C, onFinally()).then(function () { + return x; + }); + } + : onFinally, + isFunction + ? function (e) { + return promiseResolve(C, onFinally()).then(function () { + throw e; + }); + } + : onFinally, + ); + }, + }); + + /***/ + }, + /* 451 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // https://github.com/tc39/proposal-promise-try + var $export = __webpack_require__(0); + var newPromiseCapability = __webpack_require__(137); + var perform = __webpack_require__(195); + + $export($export.S, 'Promise', { + try: function (callbackfn) { + var promiseCapability = newPromiseCapability.f(this); + var result = perform(callbackfn); + (result.e ? promiseCapability.reject : promiseCapability.resolve)(result.v); + return promiseCapability.promise; + }, + }); + + /***/ + }, + /* 452 */ + /***/ function (module, exports, __webpack_require__) { + var metadata = __webpack_require__(39); + var anObject = __webpack_require__(2); + var toMetaKey = metadata.key; + var ordinaryDefineOwnMetadata = metadata.set; + + metadata.exp({ + defineMetadata: function defineMetadata(metadataKey, metadataValue, target, targetKey) { + ordinaryDefineOwnMetadata(metadataKey, metadataValue, anObject(target), toMetaKey(targetKey)); + }, + }); + + /***/ + }, + /* 453 */ + /***/ function (module, exports, __webpack_require__) { + var metadata = __webpack_require__(39); + var anObject = __webpack_require__(2); + var toMetaKey = metadata.key; + var getOrCreateMetadataMap = metadata.map; + var store = metadata.store; + + metadata.exp({ + deleteMetadata: function deleteMetadata(metadataKey, target /* , targetKey */) { + var targetKey = arguments.length < 3 ? undefined : toMetaKey(arguments[2]); + var metadataMap = getOrCreateMetadataMap(anObject(target), targetKey, false); + if (metadataMap === undefined || !metadataMap['delete'](metadataKey)) return false; + if (metadataMap.size) return true; + var targetMetadata = store.get(target); + targetMetadata['delete'](targetKey); + return !!targetMetadata.size || store['delete'](target); + }, + }); + + /***/ + }, + /* 454 */ + /***/ function (module, exports, __webpack_require__) { + var metadata = __webpack_require__(39); + var anObject = __webpack_require__(2); + var getPrototypeOf = __webpack_require__(21); + var ordinaryHasOwnMetadata = metadata.has; + var ordinaryGetOwnMetadata = metadata.get; + var toMetaKey = metadata.key; + + var ordinaryGetMetadata = function (MetadataKey, O, P) { + var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P); + if (hasOwn) return ordinaryGetOwnMetadata(MetadataKey, O, P); + var parent = getPrototypeOf(O); + return parent !== null ? ordinaryGetMetadata(MetadataKey, parent, P) : undefined; + }; + + metadata.exp({ + getMetadata: function getMetadata(metadataKey, target /* , targetKey */) { + return ordinaryGetMetadata( + metadataKey, + anObject(target), + arguments.length < 3 ? undefined : toMetaKey(arguments[2]), + ); + }, + }); + + /***/ + }, + /* 455 */ + /***/ function (module, exports, __webpack_require__) { + var Set = __webpack_require__(199); + var from = __webpack_require__(208); + var metadata = __webpack_require__(39); + var anObject = __webpack_require__(2); + var getPrototypeOf = __webpack_require__(21); + var ordinaryOwnMetadataKeys = metadata.keys; + var toMetaKey = metadata.key; + + var ordinaryMetadataKeys = function (O, P) { + var oKeys = ordinaryOwnMetadataKeys(O, P); + var parent = getPrototypeOf(O); + if (parent === null) return oKeys; + var pKeys = ordinaryMetadataKeys(parent, P); + return pKeys.length ? (oKeys.length ? from(new Set(oKeys.concat(pKeys))) : pKeys) : oKeys; + }; + + metadata.exp({ + getMetadataKeys: function getMetadataKeys(target /* , targetKey */) { + return ordinaryMetadataKeys( + anObject(target), + arguments.length < 2 ? undefined : toMetaKey(arguments[1]), + ); + }, + }); + + /***/ + }, + /* 456 */ + /***/ function (module, exports, __webpack_require__) { + var metadata = __webpack_require__(39); + var anObject = __webpack_require__(2); + var ordinaryGetOwnMetadata = metadata.get; + var toMetaKey = metadata.key; + + metadata.exp({ + getOwnMetadata: function getOwnMetadata(metadataKey, target /* , targetKey */) { + return ordinaryGetOwnMetadata( + metadataKey, + anObject(target), + arguments.length < 3 ? undefined : toMetaKey(arguments[2]), + ); + }, + }); + + /***/ + }, + /* 457 */ + /***/ function (module, exports, __webpack_require__) { + var metadata = __webpack_require__(39); + var anObject = __webpack_require__(2); + var ordinaryOwnMetadataKeys = metadata.keys; + var toMetaKey = metadata.key; + + metadata.exp({ + getOwnMetadataKeys: function getOwnMetadataKeys(target /* , targetKey */) { + return ordinaryOwnMetadataKeys( + anObject(target), + arguments.length < 2 ? undefined : toMetaKey(arguments[1]), + ); + }, + }); + + /***/ + }, + /* 458 */ + /***/ function (module, exports, __webpack_require__) { + var metadata = __webpack_require__(39); + var anObject = __webpack_require__(2); + var getPrototypeOf = __webpack_require__(21); + var ordinaryHasOwnMetadata = metadata.has; + var toMetaKey = metadata.key; + + var ordinaryHasMetadata = function (MetadataKey, O, P) { + var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P); + if (hasOwn) return true; + var parent = getPrototypeOf(O); + return parent !== null ? ordinaryHasMetadata(MetadataKey, parent, P) : false; + }; + + metadata.exp({ + hasMetadata: function hasMetadata(metadataKey, target /* , targetKey */) { + return ordinaryHasMetadata( + metadataKey, + anObject(target), + arguments.length < 3 ? undefined : toMetaKey(arguments[2]), + ); + }, + }); + + /***/ + }, + /* 459 */ + /***/ function (module, exports, __webpack_require__) { + var metadata = __webpack_require__(39); + var anObject = __webpack_require__(2); + var ordinaryHasOwnMetadata = metadata.has; + var toMetaKey = metadata.key; + + metadata.exp({ + hasOwnMetadata: function hasOwnMetadata(metadataKey, target /* , targetKey */) { + return ordinaryHasOwnMetadata( + metadataKey, + anObject(target), + arguments.length < 3 ? undefined : toMetaKey(arguments[2]), + ); + }, + }); + + /***/ + }, + /* 460 */ + /***/ function (module, exports, __webpack_require__) { + var $metadata = __webpack_require__(39); + var anObject = __webpack_require__(2); + var aFunction = __webpack_require__(12); + var toMetaKey = $metadata.key; + var ordinaryDefineOwnMetadata = $metadata.set; + + $metadata.exp({ + metadata: function metadata(metadataKey, metadataValue) { + return function decorator(target, targetKey) { + ordinaryDefineOwnMetadata( + metadataKey, + metadataValue, + (targetKey !== undefined ? anObject : aFunction)(target), + toMetaKey(targetKey), + ); + }; + }, + }); + + /***/ + }, + /* 461 */ + /***/ function (module, exports, __webpack_require__) { + // https://github.com/rwaldron/tc39-notes/blob/master/es6/2014-09/sept-25.md#510-globalasap-for-enqueuing-a-microtask + var $export = __webpack_require__(0); + var microtask = __webpack_require__(136)(); + var process = __webpack_require__(3).process; + var isNode = __webpack_require__(25)(process) == 'process'; + + $export($export.G, { + asap: function asap(fn) { + var domain = isNode && process.domain; + microtask(domain ? domain.bind(fn) : fn); + }, + }); + + /***/ + }, + /* 462 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // https://github.com/zenparsing/es-observable + var $export = __webpack_require__(0); + var global = __webpack_require__(3); + var core = __webpack_require__(23); + var microtask = __webpack_require__(136)(); + var OBSERVABLE = __webpack_require__(6)('observable'); + var aFunction = __webpack_require__(12); + var anObject = __webpack_require__(2); + var anInstance = __webpack_require__(56); + var redefineAll = __webpack_require__(58); + var hide = __webpack_require__(15); + var forOf = __webpack_require__(57); + var RETURN = forOf.RETURN; + + var getMethod = function (fn) { + return fn == null ? undefined : aFunction(fn); + }; + + var cleanupSubscription = function (subscription) { + var cleanup = subscription._c; + if (cleanup) { + subscription._c = undefined; + cleanup(); + } + }; + + var subscriptionClosed = function (subscription) { + return subscription._o === undefined; + }; + + var closeSubscription = function (subscription) { + if (!subscriptionClosed(subscription)) { + subscription._o = undefined; + cleanupSubscription(subscription); + } + }; + + var Subscription = function (observer, subscriber) { + anObject(observer); + this._c = undefined; + this._o = observer; + observer = new SubscriptionObserver(this); + try { + var cleanup = subscriber(observer); + var subscription = cleanup; + if (cleanup != null) { + if (typeof cleanup.unsubscribe === 'function') + cleanup = function () { + subscription.unsubscribe(); + }; + else aFunction(cleanup); + this._c = cleanup; + } + } catch (e) { + observer.error(e); + return; + } + if (subscriptionClosed(this)) cleanupSubscription(this); + }; + + Subscription.prototype = redefineAll( + {}, + { + unsubscribe: function unsubscribe() { + closeSubscription(this); + }, + }, + ); + + var SubscriptionObserver = function (subscription) { + this._s = subscription; + }; + + SubscriptionObserver.prototype = redefineAll( + {}, + { + next: function next(value) { + var subscription = this._s; + if (!subscriptionClosed(subscription)) { + var observer = subscription._o; + try { + var m = getMethod(observer.next); + if (m) return m.call(observer, value); + } catch (e) { + try { + closeSubscription(subscription); + } finally { + throw e; + } + } + } + }, + error: function error(value) { + var subscription = this._s; + if (subscriptionClosed(subscription)) throw value; + var observer = subscription._o; + subscription._o = undefined; + try { + var m = getMethod(observer.error); + if (!m) throw value; + value = m.call(observer, value); + } catch (e) { + try { + cleanupSubscription(subscription); + } finally { + throw e; + } + } + cleanupSubscription(subscription); + return value; + }, + complete: function complete(value) { + var subscription = this._s; + if (!subscriptionClosed(subscription)) { + var observer = subscription._o; + subscription._o = undefined; + try { + var m = getMethod(observer.complete); + value = m ? m.call(observer, value) : undefined; + } catch (e) { + try { + cleanupSubscription(subscription); + } finally { + throw e; + } + } + cleanupSubscription(subscription); + return value; + } + }, + }, + ); + + var $Observable = function Observable(subscriber) { + anInstance(this, $Observable, 'Observable', '_f')._f = aFunction(subscriber); + }; + + redefineAll($Observable.prototype, { + subscribe: function subscribe(observer) { + return new Subscription(observer, this._f); + }, + forEach: function forEach(fn) { + var that = this; + return new (core.Promise || global.Promise)(function (resolve, reject) { + aFunction(fn); + var subscription = that.subscribe({ + next: function (value) { + try { + return fn(value); + } catch (e) { + reject(e); + subscription.unsubscribe(); + } + }, + error: reject, + complete: resolve, + }); + }); + }, + }); + + redefineAll($Observable, { + from: function from(x) { + var C = typeof this === 'function' ? this : $Observable; + var method = getMethod(anObject(x)[OBSERVABLE]); + if (method) { + var observable = anObject(method.call(x)); + return observable.constructor === C + ? observable + : new C(function (observer) { + return observable.subscribe(observer); + }); + } + return new C(function (observer) { + var done = false; + microtask(function () { + if (!done) { + try { + if ( + forOf(x, false, function (it) { + observer.next(it); + if (done) return RETURN; + }) === RETURN + ) + return; + } catch (e) { + if (done) throw e; + observer.error(e); + return; + } + observer.complete(); + } + }); + return function () { + done = true; + }; + }); + }, + of: function of() { + for (var i = 0, l = arguments.length, items = new Array(l); i < l; ) items[i] = arguments[i++]; + return new (typeof this === 'function' ? this : $Observable)(function (observer) { + var done = false; + microtask(function () { + if (!done) { + for (var j = 0; j < items.length; ++j) { + observer.next(items[j]); + if (done) return; + } + observer.complete(); + } + }); + return function () { + done = true; + }; + }); + }, + }); + + hide($Observable.prototype, OBSERVABLE, function () { + return this; + }); + + $export($export.G, { Observable: $Observable }); + + __webpack_require__(55)('Observable'); + + /***/ + }, + /* 463 */ + /***/ function (module, exports, __webpack_require__) { + // ie9- setTimeout & setInterval additional parameters fix + var global = __webpack_require__(3); + var $export = __webpack_require__(0); + var userAgent = __webpack_require__(94); + var slice = [].slice; + var MSIE = /MSIE .\./.test(userAgent); // <- dirty ie9- check + var wrap = function (set) { + return function (fn, time /* , ...args */) { + var boundArgs = arguments.length > 2; + var args = boundArgs ? slice.call(arguments, 2) : false; + return set( + boundArgs + ? function () { + // eslint-disable-next-line no-new-func + (typeof fn == 'function' ? fn : Function(fn)).apply(this, args); + } + : fn, + time, + ); + }; + }; + $export($export.G + $export.B + $export.F * MSIE, { + setTimeout: wrap(global.setTimeout), + setInterval: wrap(global.setInterval), + }); + + /***/ + }, + /* 464 */ + /***/ function (module, exports, __webpack_require__) { + var $export = __webpack_require__(0); + var $task = __webpack_require__(135); + $export($export.G + $export.B, { + setImmediate: $task.set, + clearImmediate: $task.clear, + }); + + /***/ + }, + /* 465 */ + /***/ function (module, exports, __webpack_require__) { + var $iterators = __webpack_require__(132); + var getKeys = __webpack_require__(51); + var redefine = __webpack_require__(16); + var global = __webpack_require__(3); + var hide = __webpack_require__(15); + var Iterators = __webpack_require__(67); + var wks = __webpack_require__(6); + var ITERATOR = wks('iterator'); + var TO_STRING_TAG = wks('toStringTag'); + var ArrayValues = Iterators.Array; + + var DOMIterables = { + CSSRuleList: true, // TODO: Not spec compliant, should be false. + CSSStyleDeclaration: false, + CSSValueList: false, + ClientRectList: false, + DOMRectList: false, + DOMStringList: false, + DOMTokenList: true, + DataTransferItemList: false, + FileList: false, + HTMLAllCollection: false, + HTMLCollection: false, + HTMLFormElement: false, + HTMLSelectElement: false, + MediaList: true, // TODO: Not spec compliant, should be false. + MimeTypeArray: false, + NamedNodeMap: false, + NodeList: true, + PaintRequestList: false, + Plugin: false, + PluginArray: false, + SVGLengthList: false, + SVGNumberList: false, + SVGPathSegList: false, + SVGPointList: false, + SVGStringList: false, + SVGTransformList: false, + SourceBufferList: false, + StyleSheetList: true, // TODO: Not spec compliant, should be false. + TextTrackCueList: false, + TextTrackList: false, + TouchList: false, + }; + + for (var collections = getKeys(DOMIterables), i = 0; i < collections.length; i++) { + var NAME = collections[i]; + var explicit = DOMIterables[NAME]; + var Collection = global[NAME]; + var proto = Collection && Collection.prototype; + var key; + if (proto) { + if (!proto[ITERATOR]) hide(proto, ITERATOR, ArrayValues); + if (!proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME); + Iterators[NAME] = ArrayValues; + if (explicit) for (key in $iterators) if (!proto[key]) redefine(proto, key, $iterators[key], true); + } + } + + /***/ + }, + /* 466 */ + /***/ function (module, exports) { + /** + * Copyright (c) 2014, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * https://raw.github.com/facebook/regenerator/master/LICENSE file. An + * additional grant of patent rights can be found in the PATENTS file in + * the same directory. + */ + + !(function (global) { + 'use strict'; + + var Op = Object.prototype; + var hasOwn = Op.hasOwnProperty; + var undefined; // More compressible than void 0. + var $Symbol = typeof Symbol === 'function' ? Symbol : {}; + var iteratorSymbol = $Symbol.iterator || '@@iterator'; + var asyncIteratorSymbol = $Symbol.asyncIterator || '@@asyncIterator'; + var toStringTagSymbol = $Symbol.toStringTag || '@@toStringTag'; + + var inModule = typeof module === 'object'; + var runtime = global.regeneratorRuntime; + if (runtime) { + if (inModule) { + // If regeneratorRuntime is defined globally and we're in a module, + // make the exports object identical to regeneratorRuntime. + module.exports = runtime; + } + // Don't bother evaluating the rest of this file if the runtime was + // already defined globally. + return; + } + + // Define the runtime globally (as expected by generated code) as either + // module.exports (if we're in a module) or a new, empty object. + runtime = global.regeneratorRuntime = inModule ? module.exports : {}; + + function wrap(innerFn, outerFn, self, tryLocsList) { + // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator. + var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator; + var generator = Object.create(protoGenerator.prototype); + var context = new Context(tryLocsList || []); + + // The ._invoke method unifies the implementations of the .next, + // .throw, and .return methods. + generator._invoke = makeInvokeMethod(innerFn, self, context); + + return generator; + } + runtime.wrap = wrap; + + // Try/catch helper to minimize deoptimizations. Returns a completion + // record like context.tryEntries[i].completion. This interface could + // have been (and was previously) designed to take a closure to be + // invoked without arguments, but in all the cases we care about we + // already have an existing method we want to call, so there's no need + // to create a new function object. We can even get away with assuming + // the method takes exactly one argument, since that happens to be true + // in every case, so we don't have to touch the arguments object. The + // only additional allocation required is the completion record, which + // has a stable shape and so hopefully should be cheap to allocate. + function tryCatch(fn, obj, arg) { + try { + return { type: 'normal', arg: fn.call(obj, arg) }; + } catch (err) { + return { type: 'throw', arg: err }; + } + } + + var GenStateSuspendedStart = 'suspendedStart'; + var GenStateSuspendedYield = 'suspendedYield'; + var GenStateExecuting = 'executing'; + var GenStateCompleted = 'completed'; + + // Returning this object from the innerFn has the same effect as + // breaking out of the dispatch switch statement. + var ContinueSentinel = {}; + + // Dummy constructor functions that we use as the .constructor and + // .constructor.prototype properties for functions that return Generator + // objects. For full spec compliance, you may wish to configure your + // minifier not to mangle the names of these two functions. + function Generator() {} + function GeneratorFunction() {} + function GeneratorFunctionPrototype() {} + + // This is a polyfill for %IteratorPrototype% for environments that + // don't natively support it. + var IteratorPrototype = {}; + IteratorPrototype[iteratorSymbol] = function () { + return this; + }; + + var getProto = Object.getPrototypeOf; + var NativeIteratorPrototype = getProto && getProto(getProto(values([]))); + if ( + NativeIteratorPrototype && + NativeIteratorPrototype !== Op && + hasOwn.call(NativeIteratorPrototype, iteratorSymbol) + ) { + // This environment has a native %IteratorPrototype%; use it instead + // of the polyfill. + IteratorPrototype = NativeIteratorPrototype; + } + + var Gp = + (GeneratorFunctionPrototype.prototype = + Generator.prototype = + Object.create(IteratorPrototype)); + GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype; + GeneratorFunctionPrototype.constructor = GeneratorFunction; + GeneratorFunctionPrototype[toStringTagSymbol] = GeneratorFunction.displayName = 'GeneratorFunction'; + + // Helper for defining the .next, .throw, and .return methods of the + // Iterator interface in terms of a single ._invoke method. + function defineIteratorMethods(prototype) { + ['next', 'throw', 'return'].forEach(function (method) { + prototype[method] = function (arg) { + return this._invoke(method, arg); + }; + }); + } + + runtime.isGeneratorFunction = function (genFun) { + var ctor = typeof genFun === 'function' && genFun.constructor; + return ctor + ? ctor === GeneratorFunction || + // For the native GeneratorFunction constructor, the best we can + // do is to check its .name property. + (ctor.displayName || ctor.name) === 'GeneratorFunction' + : false; + }; + + runtime.mark = function (genFun) { + if (Object.setPrototypeOf) { + Object.setPrototypeOf(genFun, GeneratorFunctionPrototype); + } else { + genFun.__proto__ = GeneratorFunctionPrototype; + if (!(toStringTagSymbol in genFun)) { + genFun[toStringTagSymbol] = 'GeneratorFunction'; + } + } + genFun.prototype = Object.create(Gp); + return genFun; + }; + + // Within the body of any async function, `await x` is transformed to + // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test + // `hasOwn.call(value, "__await")` to determine if the yielded value is + // meant to be awaited. + runtime.awrap = function (arg) { + return { __await: arg }; + }; + + function AsyncIterator(generator) { + function invoke(method, arg, resolve, reject) { + var record = tryCatch(generator[method], generator, arg); + if (record.type === 'throw') { + reject(record.arg); + } else { + var result = record.arg; + var value = result.value; + if (value && typeof value === 'object' && hasOwn.call(value, '__await')) { + return Promise.resolve(value.__await).then( + function (value) { + invoke('next', value, resolve, reject); + }, + function (err) { + invoke('throw', err, resolve, reject); + }, + ); + } + + return Promise.resolve(value).then(function (unwrapped) { + // When a yielded Promise is resolved, its final value becomes + // the .value of the Promise<{value,done}> result for the + // current iteration. If the Promise is rejected, however, the + // result for this iteration will be rejected with the same + // reason. Note that rejections of yielded Promises are not + // thrown back into the generator function, as is the case + // when an awaited Promise is rejected. This difference in + // behavior between yield and await is important, because it + // allows the consumer to decide what to do with the yielded + // rejection (swallow it and continue, manually .throw it back + // into the generator, abandon iteration, whatever). With + // await, by contrast, there is no opportunity to examine the + // rejection reason outside the generator function, so the + // only option is to throw it from the await expression, and + // let the generator function handle the exception. + result.value = unwrapped; + resolve(result); + }, reject); + } + } + + if (typeof global.process === 'object' && global.process.domain) { + invoke = global.process.domain.bind(invoke); + } + + var previousPromise; + + function enqueue(method, arg) { + function callInvokeWithMethodAndArg() { + return new Promise(function (resolve, reject) { + invoke(method, arg, resolve, reject); + }); + } + + return (previousPromise = + // If enqueue has been called before, then we want to wait until + // all previous Promises have been resolved before calling invoke, + // so that results are always delivered in the correct order. If + // enqueue has not been called before, then it is important to + // call invoke immediately, without waiting on a callback to fire, + // so that the async generator function has the opportunity to do + // any necessary setup in a predictable way. This predictability + // is why the Promise constructor synchronously invokes its + // executor callback, and why async functions synchronously + // execute code before the first await. Since we implement simple + // async functions in terms of async generators, it is especially + // important to get this right, even though it requires care. + previousPromise + ? previousPromise.then( + callInvokeWithMethodAndArg, + // Avoid propagating failures to Promises returned by later + // invocations of the iterator. + callInvokeWithMethodAndArg, + ) + : callInvokeWithMethodAndArg()); + } + + // Define the unified helper method that is used to implement .next, + // .throw, and .return (see defineIteratorMethods). + this._invoke = enqueue; + } + + defineIteratorMethods(AsyncIterator.prototype); + AsyncIterator.prototype[asyncIteratorSymbol] = function () { + return this; + }; + runtime.AsyncIterator = AsyncIterator; + + // Note that simple async functions are implemented on top of + // AsyncIterator objects; they just return a Promise for the value of + // the final result produced by the iterator. + runtime.async = function (innerFn, outerFn, self, tryLocsList) { + var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList)); + + return runtime.isGeneratorFunction(outerFn) + ? iter // If outerFn is a generator, return the full iterator. + : iter.next().then(function (result) { + return result.done ? result.value : iter.next(); + }); + }; + + function makeInvokeMethod(innerFn, self, context) { + var state = GenStateSuspendedStart; + + return function invoke(method, arg) { + if (state === GenStateExecuting) { + throw new Error('Generator is already running'); + } + + if (state === GenStateCompleted) { + if (method === 'throw') { + throw arg; + } + + // Be forgiving, per 25.3.3.3.3 of the spec: + // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume + return doneResult(); + } + + context.method = method; + context.arg = arg; + + while (true) { + var delegate = context.delegate; + if (delegate) { + var delegateResult = maybeInvokeDelegate(delegate, context); + if (delegateResult) { + if (delegateResult === ContinueSentinel) continue; + return delegateResult; + } + } + + if (context.method === 'next') { + // Setting context._sent for legacy support of Babel's + // function.sent implementation. + context.sent = context._sent = context.arg; + } else if (context.method === 'throw') { + if (state === GenStateSuspendedStart) { + state = GenStateCompleted; + throw context.arg; + } + + context.dispatchException(context.arg); + } else if (context.method === 'return') { + context.abrupt('return', context.arg); + } + + state = GenStateExecuting; + + var record = tryCatch(innerFn, self, context); + if (record.type === 'normal') { + // If an exception is thrown from innerFn, we leave state === + // GenStateExecuting and loop back for another invocation. + state = context.done ? GenStateCompleted : GenStateSuspendedYield; + + if (record.arg === ContinueSentinel) { + continue; + } + + return { + value: record.arg, + done: context.done, + }; + } else if (record.type === 'throw') { + state = GenStateCompleted; + // Dispatch the exception by looping back around to the + // context.dispatchException(context.arg) call above. + context.method = 'throw'; + context.arg = record.arg; + } + } + }; + } + + // Call delegate.iterator[context.method](context.arg) and handle the + // result, either by returning a { value, done } result from the + // delegate iterator, or by modifying context.method and context.arg, + // setting context.delegate to null, and returning the ContinueSentinel. + function maybeInvokeDelegate(delegate, context) { + var method = delegate.iterator[context.method]; + if (method === undefined) { + // A .throw or .return when the delegate iterator has no .throw + // method always terminates the yield* loop. + context.delegate = null; + + if (context.method === 'throw') { + if (delegate.iterator.return) { + // If the delegate iterator has a return method, give it a + // chance to clean up. + context.method = 'return'; + context.arg = undefined; + maybeInvokeDelegate(delegate, context); + + if (context.method === 'throw') { + // If maybeInvokeDelegate(context) changed context.method from + // "return" to "throw", let that override the TypeError below. + return ContinueSentinel; + } + } + + context.method = 'throw'; + context.arg = new TypeError("The iterator does not provide a 'throw' method"); + } + + return ContinueSentinel; + } + + var record = tryCatch(method, delegate.iterator, context.arg); + + if (record.type === 'throw') { + context.method = 'throw'; + context.arg = record.arg; + context.delegate = null; + return ContinueSentinel; + } + + var info = record.arg; + + if (!info) { + context.method = 'throw'; + context.arg = new TypeError('iterator result is not an object'); + context.delegate = null; + return ContinueSentinel; + } + + if (info.done) { + // Assign the result of the finished delegate to the temporary + // variable specified by delegate.resultName (see delegateYield). + context[delegate.resultName] = info.value; + + // Resume execution at the desired location (see delegateYield). + context.next = delegate.nextLoc; + + // If context.method was "throw" but the delegate handled the + // exception, let the outer generator proceed normally. If + // context.method was "next", forget context.arg since it has been + // "consumed" by the delegate iterator. If context.method was + // "return", allow the original .return call to continue in the + // outer generator. + if (context.method !== 'return') { + context.method = 'next'; + context.arg = undefined; + } + } else { + // Re-yield the result returned by the delegate method. + return info; + } + + // The delegate iterator is finished, so forget it and continue with + // the outer generator. + context.delegate = null; + return ContinueSentinel; + } + + // Define Generator.prototype.{next,throw,return} in terms of the + // unified ._invoke helper method. + defineIteratorMethods(Gp); + + Gp[toStringTagSymbol] = 'Generator'; + + // A Generator should always return itself as the iterator object when the + // @@iterator function is called on it. Some browsers' implementations of the + // iterator prototype chain incorrectly implement this, causing the Generator + // object to not be returned from this call. This ensures that doesn't happen. + // See https://github.com/facebook/regenerator/issues/274 for more details. + Gp[iteratorSymbol] = function () { + return this; + }; + + Gp.toString = function () { + return '[object Generator]'; + }; + + function pushTryEntry(locs) { + var entry = { tryLoc: locs[0] }; + + if (1 in locs) { + entry.catchLoc = locs[1]; + } + + if (2 in locs) { + entry.finallyLoc = locs[2]; + entry.afterLoc = locs[3]; + } + + this.tryEntries.push(entry); + } + + function resetTryEntry(entry) { + var record = entry.completion || {}; + record.type = 'normal'; + delete record.arg; + entry.completion = record; + } + + function Context(tryLocsList) { + // The root entry object (effectively a try statement without a catch + // or a finally block) gives us a place to store values thrown from + // locations where there is no enclosing try statement. + this.tryEntries = [{ tryLoc: 'root' }]; + tryLocsList.forEach(pushTryEntry, this); + this.reset(true); + } + + runtime.keys = function (object) { + var keys = []; + for (var key in object) { + keys.push(key); + } + keys.reverse(); + + // Rather than returning an object with a next method, we keep + // things simple and return the next function itself. + return function next() { + while (keys.length) { + var key = keys.pop(); + if (key in object) { + next.value = key; + next.done = false; + return next; + } + } + + // To avoid creating an additional object, we just hang the .value + // and .done properties off the next function object itself. This + // also ensures that the minifier will not anonymize the function. + next.done = true; + return next; + }; + }; + + function values(iterable) { + if (iterable) { + var iteratorMethod = iterable[iteratorSymbol]; + if (iteratorMethod) { + return iteratorMethod.call(iterable); + } + + if (typeof iterable.next === 'function') { + return iterable; + } + + if (!isNaN(iterable.length)) { + var i = -1, + next = function next() { + while (++i < iterable.length) { + if (hasOwn.call(iterable, i)) { + next.value = iterable[i]; + next.done = false; + return next; + } + } + + next.value = undefined; + next.done = true; + + return next; + }; + + return (next.next = next); + } + } + + // Return an iterator with no values. + return { next: doneResult }; + } + runtime.values = values; + + function doneResult() { + return { value: undefined, done: true }; + } + + Context.prototype = { + constructor: Context, + + reset: function (skipTempReset) { + this.prev = 0; + this.next = 0; + // Resetting context._sent for legacy support of Babel's + // function.sent implementation. + this.sent = this._sent = undefined; + this.done = false; + this.delegate = null; + + this.method = 'next'; + this.arg = undefined; + + this.tryEntries.forEach(resetTryEntry); + + if (!skipTempReset) { + for (var name in this) { + // Not sure about the optimal order of these conditions: + if (name.charAt(0) === 't' && hasOwn.call(this, name) && !isNaN(+name.slice(1))) { + this[name] = undefined; + } + } + } + }, + + stop: function () { + this.done = true; + + var rootEntry = this.tryEntries[0]; + var rootRecord = rootEntry.completion; + if (rootRecord.type === 'throw') { + throw rootRecord.arg; + } + + return this.rval; + }, + + dispatchException: function (exception) { + if (this.done) { + throw exception; + } + + var context = this; + function handle(loc, caught) { + record.type = 'throw'; + record.arg = exception; + context.next = loc; + + if (caught) { + // If the dispatched exception was caught by a catch block, + // then let that catch block handle the exception normally. + context.method = 'next'; + context.arg = undefined; + } + + return !!caught; + } + + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + var record = entry.completion; + + if (entry.tryLoc === 'root') { + // Exception thrown outside of any try block that could handle + // it, so set the completion value of the entire function to + // throw the exception. + return handle('end'); + } + + if (entry.tryLoc <= this.prev) { + var hasCatch = hasOwn.call(entry, 'catchLoc'); + var hasFinally = hasOwn.call(entry, 'finallyLoc'); + + if (hasCatch && hasFinally) { + if (this.prev < entry.catchLoc) { + return handle(entry.catchLoc, true); + } else if (this.prev < entry.finallyLoc) { + return handle(entry.finallyLoc); + } + } else if (hasCatch) { + if (this.prev < entry.catchLoc) { + return handle(entry.catchLoc, true); + } + } else if (hasFinally) { + if (this.prev < entry.finallyLoc) { + return handle(entry.finallyLoc); + } + } else { + throw new Error('try statement without catch or finally'); + } + } + } + }, + + abrupt: function (type, arg) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + if ( + entry.tryLoc <= this.prev && + hasOwn.call(entry, 'finallyLoc') && + this.prev < entry.finallyLoc + ) { + var finallyEntry = entry; + break; + } + } + + if ( + finallyEntry && + (type === 'break' || type === 'continue') && + finallyEntry.tryLoc <= arg && + arg <= finallyEntry.finallyLoc + ) { + // Ignore the finally entry if control is not jumping to a + // location outside the try/catch block. + finallyEntry = null; + } + + var record = finallyEntry ? finallyEntry.completion : {}; + record.type = type; + record.arg = arg; + + if (finallyEntry) { + this.method = 'next'; + this.next = finallyEntry.finallyLoc; + return ContinueSentinel; + } + + return this.complete(record); + }, + + complete: function (record, afterLoc) { + if (record.type === 'throw') { + throw record.arg; + } + + if (record.type === 'break' || record.type === 'continue') { + this.next = record.arg; + } else if (record.type === 'return') { + this.rval = this.arg = record.arg; + this.method = 'return'; + this.next = 'end'; + } else if (record.type === 'normal' && afterLoc) { + this.next = afterLoc; + } + + return ContinueSentinel; + }, + + finish: function (finallyLoc) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + if (entry.finallyLoc === finallyLoc) { + this.complete(entry.completion, entry.afterLoc); + resetTryEntry(entry); + return ContinueSentinel; + } + } + }, + + catch: function (tryLoc) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + if (entry.tryLoc === tryLoc) { + var record = entry.completion; + if (record.type === 'throw') { + var thrown = record.arg; + resetTryEntry(entry); + } + return thrown; + } + } + + // The context.catch method must only be called with a location + // argument that corresponds to a known catch block. + throw new Error('illegal catch attempt'); + }, + + delegateYield: function (iterable, resultName, nextLoc) { + this.delegate = { + iterator: values(iterable), + resultName: resultName, + nextLoc: nextLoc, + }; + + if (this.method === 'next') { + // Deliberately forget the last sent value so that we don't + // accidentally pass it on to the delegate. + this.arg = undefined; + } + + return ContinueSentinel; + }, + }; + })( + // Among the various tricks for obtaining a reference to the global + // object, this seems to be the most reliable technique that does not + // use indirect eval (which violates Content Security Policy). + typeof global === 'object' + ? global + : typeof window === 'object' + ? window + : typeof self === 'object' + ? self + : this, + ); + + /***/ + }, + /* 467 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(468); + module.exports = __webpack_require__(23).RegExp.escape; + + /***/ + }, + /* 468 */ + /***/ function (module, exports, __webpack_require__) { + // https://github.com/benjamingr/RexExp.escape + var $export = __webpack_require__(0); + var $re = __webpack_require__(469)(/[\\^$*+?.()|[\]{}]/g, '\\$&'); + + $export($export.S, 'RegExp', { + escape: function escape(it) { + return $re(it); + }, + }); + + /***/ + }, + /* 469 */ + /***/ function (module, exports) { + module.exports = function (regExp, replace) { + var replacer = + replace === Object(replace) + ? function (part) { + return replace[part]; + } + : replace; + return function (it) { + return String(it).replace(regExp, replacer); + }; + }; + + /***/ + }, + /* 470 */ + /***/ function (module, exports, __webpack_require__) { + var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__; /*! + * https://github.com/es-shims/es5-shim + * @license es5-shim Copyright 2009-2015 by contributors, MIT License + * see https://github.com/es-shims/es5-shim/blob/master/LICENSE + */ + + // vim: ts=4 sts=4 sw=4 expandtab + + // Add semicolon to prevent IIFE from being passed as argument to concatenated code. + // UMD (Universal Module Definition) + // see https://github.com/umdjs/umd/blob/master/templates/returnExports.js + (function (root, factory) { + 'use strict'; + + /* global define, exports, module */ + if (true) { + // AMD. Register as an anonymous module. + !((__WEBPACK_AMD_DEFINE_FACTORY__ = factory), + (__WEBPACK_AMD_DEFINE_RESULT__ = + typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' + ? __WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module) + : __WEBPACK_AMD_DEFINE_FACTORY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else if (typeof exports === 'object') { + // Node. Does not work with strict CommonJS, but + // only CommonJS-like enviroments that support module.exports, + // like Node. + module.exports = factory(); + } else { + // Browser globals (root is window) + root.returnExports = factory(); + } + })(this, function () { + /** + * Brings an environment as close to ECMAScript 5 compliance + * as is possible with the facilities of erstwhile engines. + * + * Annotated ES5: http://es5.github.com/ (specific links below) + * ES5 Spec: http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf + * Required reading: http://javascriptweblog.wordpress.com/2011/12/05/extending-javascript-natives/ + */ + + // Shortcut to an often accessed properties, in order to avoid multiple + // dereference that costs universally. This also holds a reference to known-good + // functions. + var $Array = Array; + var ArrayPrototype = $Array.prototype; + var $Object = Object; + var ObjectPrototype = $Object.prototype; + var $Function = Function; + var FunctionPrototype = $Function.prototype; + var $String = String; + var StringPrototype = $String.prototype; + var $Number = Number; + var NumberPrototype = $Number.prototype; + var array_slice = ArrayPrototype.slice; + var array_splice = ArrayPrototype.splice; + var array_push = ArrayPrototype.push; + var array_unshift = ArrayPrototype.unshift; + var array_concat = ArrayPrototype.concat; + var array_join = ArrayPrototype.join; + var call = FunctionPrototype.call; + var apply = FunctionPrototype.apply; + var max = Math.max; + var min = Math.min; + + // Having a toString local variable name breaks in Opera so use to_string. + var to_string = ObjectPrototype.toString; + + /* global Symbol */ + /* eslint-disable one-var-declaration-per-line, no-redeclare, max-statements-per-line */ + var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol'; + var isCallable; + /* inlined from https://npmjs.com/is-callable */ var fnToStr = Function.prototype.toString, + constructorRegex = /^\s*class /, + isES6ClassFn = function isES6ClassFn(value) { + try { + var fnStr = fnToStr.call(value); + var singleStripped = fnStr.replace(/\/\/.*\n/g, ''); + var multiStripped = singleStripped.replace(/\/\*[.\s\S]*\*\//g, ''); + var spaceStripped = multiStripped.replace(/\n/gm, ' ').replace(/ {2}/g, ' '); + return constructorRegex.test(spaceStripped); + } catch (e) { + return false; /* not a function */ + } + }, + tryFunctionObject = function tryFunctionObject(value) { + try { + if (isES6ClassFn(value)) { + return false; + } + fnToStr.call(value); + return true; + } catch (e) { + return false; + } + }, + fnClass = '[object Function]', + genClass = '[object GeneratorFunction]', + isCallable = function isCallable(value) { + if (!value) { + return false; + } + if (typeof value !== 'function' && typeof value !== 'object') { + return false; + } + if (hasToStringTag) { + return tryFunctionObject(value); + } + if (isES6ClassFn(value)) { + return false; + } + var strClass = to_string.call(value); + return strClass === fnClass || strClass === genClass; + }; + + var isRegex; + /* inlined from https://npmjs.com/is-regex */ var regexExec = RegExp.prototype.exec, + tryRegexExec = function tryRegexExec(value) { + try { + regexExec.call(value); + return true; + } catch (e) { + return false; + } + }, + regexClass = '[object RegExp]'; + isRegex = function isRegex(value) { + if (typeof value !== 'object') { + return false; + } + return hasToStringTag ? tryRegexExec(value) : to_string.call(value) === regexClass; + }; + var isString; + /* inlined from https://npmjs.com/is-string */ var strValue = String.prototype.valueOf, + tryStringObject = function tryStringObject(value) { + try { + strValue.call(value); + return true; + } catch (e) { + return false; + } + }, + stringClass = '[object String]'; + isString = function isString(value) { + if (typeof value === 'string') { + return true; + } + if (typeof value !== 'object') { + return false; + } + return hasToStringTag ? tryStringObject(value) : to_string.call(value) === stringClass; + }; + /* eslint-enable one-var-declaration-per-line, no-redeclare, max-statements-per-line */ + + /* inlined from http://npmjs.com/define-properties */ + var supportsDescriptors = + $Object.defineProperty && + (function () { + try { + var obj = {}; + $Object.defineProperty(obj, 'x', { enumerable: false, value: obj }); + for (var _ in obj) { + // jscs:ignore disallowUnusedVariables + return false; + } + return obj.x === obj; + } catch (e) { + /* this is ES3 */ + return false; + } + })(); + var defineProperties = (function (has) { + // Define configurable, writable, and non-enumerable props + // if they don't exist. + var defineProperty; + if (supportsDescriptors) { + defineProperty = function (object, name, method, forceAssign) { + if (!forceAssign && name in object) { + return; + } + $Object.defineProperty(object, name, { + configurable: true, + enumerable: false, + writable: true, + value: method, + }); + }; + } else { + defineProperty = function (object, name, method, forceAssign) { + if (!forceAssign && name in object) { + return; + } + object[name] = method; + }; + } + return function defineProperties(object, map, forceAssign) { + for (var name in map) { + if (has.call(map, name)) { + defineProperty(object, name, map[name], forceAssign); + } + } + }; + })(ObjectPrototype.hasOwnProperty); + + // + // Util + // ====== + // + + /* replaceable with https://npmjs.com/package/es-abstract /helpers/isPrimitive */ + var isPrimitive = function isPrimitive(input) { + var type = typeof input; + return input === null || (type !== 'object' && type !== 'function'); + }; + + var isActualNaN = + $Number.isNaN || + function isActualNaN(x) { + return x !== x; + }; + + var ES = { + // ES5 9.4 + // http://es5.github.com/#x9.4 + // http://jsperf.com/to-integer + /* replaceable with https://npmjs.com/package/es-abstract ES5.ToInteger */ + ToInteger: function ToInteger(num) { + var n = +num; + if (isActualNaN(n)) { + n = 0; + } else if (n !== 0 && n !== 1 / 0 && n !== -(1 / 0)) { + n = (n > 0 || -1) * Math.floor(Math.abs(n)); + } + return n; + }, + + /* replaceable with https://npmjs.com/package/es-abstract ES5.ToPrimitive */ + ToPrimitive: function ToPrimitive(input) { + var val, valueOf, toStr; + if (isPrimitive(input)) { + return input; + } + valueOf = input.valueOf; + if (isCallable(valueOf)) { + val = valueOf.call(input); + if (isPrimitive(val)) { + return val; + } + } + toStr = input.toString; + if (isCallable(toStr)) { + val = toStr.call(input); + if (isPrimitive(val)) { + return val; + } + } + throw new TypeError(); + }, + + // ES5 9.9 + // http://es5.github.com/#x9.9 + /* replaceable with https://npmjs.com/package/es-abstract ES5.ToObject */ + ToObject: function (o) { + if (o == null) { + // this matches both null and undefined + throw new TypeError("can't convert " + o + ' to object'); + } + return $Object(o); + }, + + /* replaceable with https://npmjs.com/package/es-abstract ES5.ToUint32 */ + ToUint32: function ToUint32(x) { + return x >>> 0; + }, + }; + + // + // Function + // ======== + // + + // ES-5 15.3.4.5 + // http://es5.github.com/#x15.3.4.5 + + var Empty = function Empty() {}; + + defineProperties(FunctionPrototype, { + bind: function bind(that) { + // .length is 1 + // 1. Let Target be the this value. + var target = this; + // 2. If IsCallable(Target) is false, throw a TypeError exception. + if (!isCallable(target)) { + throw new TypeError('Function.prototype.bind called on incompatible ' + target); + } + // 3. Let A be a new (possibly empty) internal list of all of the + // argument values provided after thisArg (arg1, arg2 etc), in order. + // XXX slicedArgs will stand in for "A" if used + var args = array_slice.call(arguments, 1); // for normal call + // 4. Let F be a new native ECMAScript object. + // 11. Set the [[Prototype]] internal property of F to the standard + // built-in Function prototype object as specified in 15.3.3.1. + // 12. Set the [[Call]] internal property of F as described in + // 15.3.4.5.1. + // 13. Set the [[Construct]] internal property of F as described in + // 15.3.4.5.2. + // 14. Set the [[HasInstance]] internal property of F as described in + // 15.3.4.5.3. + var bound; + var binder = function () { + if (this instanceof bound) { + // 15.3.4.5.2 [[Construct]] + // When the [[Construct]] internal method of a function object, + // F that was created using the bind function is called with a + // list of arguments ExtraArgs, the following steps are taken: + // 1. Let target be the value of F's [[TargetFunction]] + // internal property. + // 2. If target has no [[Construct]] internal method, a + // TypeError exception is thrown. + // 3. Let boundArgs be the value of F's [[BoundArgs]] internal + // property. + // 4. Let args be a new list containing the same values as the + // list boundArgs in the same order followed by the same + // values as the list ExtraArgs in the same order. + // 5. Return the result of calling the [[Construct]] internal + // method of target providing args as the arguments. + + var result = apply.call(target, this, array_concat.call(args, array_slice.call(arguments))); + if ($Object(result) === result) { + return result; + } + return this; + } else { + // 15.3.4.5.1 [[Call]] + // When the [[Call]] internal method of a function object, F, + // which was created using the bind function is called with a + // this value and a list of arguments ExtraArgs, the following + // steps are taken: + // 1. Let boundArgs be the value of F's [[BoundArgs]] internal + // property. + // 2. Let boundThis be the value of F's [[BoundThis]] internal + // property. + // 3. Let target be the value of F's [[TargetFunction]] internal + // property. + // 4. Let args be a new list containing the same values as the + // list boundArgs in the same order followed by the same + // values as the list ExtraArgs in the same order. + // 5. Return the result of calling the [[Call]] internal method + // of target providing boundThis as the this value and + // providing args as the arguments. + + // equiv: target.call(this, ...boundArgs, ...args) + return apply.call(target, that, array_concat.call(args, array_slice.call(arguments))); + } + }; + + // 15. If the [[Class]] internal property of Target is "Function", then + // a. Let L be the length property of Target minus the length of A. + // b. Set the length own property of F to either 0 or L, whichever is + // larger. + // 16. Else set the length own property of F to 0. + + var boundLength = max(0, target.length - args.length); + + // 17. Set the attributes of the length own property of F to the values + // specified in 15.3.5.1. + var boundArgs = []; + for (var i = 0; i < boundLength; i++) { + array_push.call(boundArgs, '$' + i); + } + + // XXX Build a dynamic function with desired amount of arguments is the only + // way to set the length property of a function. + // In environments where Content Security Policies enabled (Chrome extensions, + // for ex.) all use of eval or Function costructor throws an exception. + // However in all of these environments Function.prototype.bind exists + // and so this code will never be executed. + bound = $Function( + 'binder', + 'return function (' + + array_join.call(boundArgs, ',') + + '){ return binder.apply(this, arguments); }', + )(binder); + + if (target.prototype) { + Empty.prototype = target.prototype; + bound.prototype = new Empty(); + // Clean up dangling references. + Empty.prototype = null; + } + + // TODO + // 18. Set the [[Extensible]] internal property of F to true. + + // TODO + // 19. Let thrower be the [[ThrowTypeError]] function Object (13.2.3). + // 20. Call the [[DefineOwnProperty]] internal method of F with + // arguments "caller", PropertyDescriptor {[[Get]]: thrower, [[Set]]: + // thrower, [[Enumerable]]: false, [[Configurable]]: false}, and + // false. + // 21. Call the [[DefineOwnProperty]] internal method of F with + // arguments "arguments", PropertyDescriptor {[[Get]]: thrower, + // [[Set]]: thrower, [[Enumerable]]: false, [[Configurable]]: false}, + // and false. + + // TODO + // NOTE Function objects created using Function.prototype.bind do not + // have a prototype property or the [[Code]], [[FormalParameters]], and + // [[Scope]] internal properties. + // XXX can't delete prototype in pure-js. + + // 22. Return F. + return bound; + }, + }); + + // _Please note: Shortcuts are defined after `Function.prototype.bind` as we + // use it in defining shortcuts. + var owns = call.bind(ObjectPrototype.hasOwnProperty); + var toStr = call.bind(ObjectPrototype.toString); + var arraySlice = call.bind(array_slice); + var arraySliceApply = apply.bind(array_slice); + /* globals document */ + if (typeof document === 'object' && document && document.documentElement) { + try { + arraySlice(document.documentElement.childNodes); + } catch (e) { + var origArraySlice = arraySlice; + var origArraySliceApply = arraySliceApply; + arraySlice = function arraySliceIE(arr) { + var r = []; + var i = arr.length; + while (i-- > 0) { + r[i] = arr[i]; + } + return origArraySliceApply(r, origArraySlice(arguments, 1)); + }; + arraySliceApply = function arraySliceApplyIE(arr, args) { + return origArraySliceApply(arraySlice(arr), args); + }; + } + } + var strSlice = call.bind(StringPrototype.slice); + var strSplit = call.bind(StringPrototype.split); + var strIndexOf = call.bind(StringPrototype.indexOf); + var pushCall = call.bind(array_push); + var isEnum = call.bind(ObjectPrototype.propertyIsEnumerable); + var arraySort = call.bind(ArrayPrototype.sort); + + // + // Array + // ===== + // + + var isArray = + $Array.isArray || + function isArray(obj) { + return toStr(obj) === '[object Array]'; + }; + + // ES5 15.4.4.12 + // http://es5.github.com/#x15.4.4.13 + // Return len+argCount. + // [bugfix, ielt8] + // IE < 8 bug: [].unshift(0) === undefined but should be "1" + var hasUnshiftReturnValueBug = [].unshift(0) !== 1; + defineProperties( + ArrayPrototype, + { + unshift: function () { + array_unshift.apply(this, arguments); + return this.length; + }, + }, + hasUnshiftReturnValueBug, + ); + + // ES5 15.4.3.2 + // http://es5.github.com/#x15.4.3.2 + // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/isArray + defineProperties($Array, { isArray: isArray }); + + // The IsCallable() check in the Array functions + // has been replaced with a strict check on the + // internal class of the object to trap cases where + // the provided function was actually a regular + // expression literal, which in V8 and + // JavaScriptCore is a typeof "function". Only in + // V8 are regular expression literals permitted as + // reduce parameters, so it is desirable in the + // general case for the shim to match the more + // strict and common behavior of rejecting regular + // expressions. + + // ES5 15.4.4.18 + // http://es5.github.com/#x15.4.4.18 + // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/array/forEach + + // Check failure of by-index access of string characters (IE < 9) + // and failure of `0 in boxedString` (Rhino) + var boxedString = $Object('a'); + var splitString = boxedString[0] !== 'a' || !(0 in boxedString); + + var properlyBoxesContext = function properlyBoxed(method) { + // Check node 0.6.21 bug where third parameter is not boxed + var properlyBoxesNonStrict = true; + var properlyBoxesStrict = true; + var threwException = false; + if (method) { + try { + method.call('foo', function (_, __, context) { + if (typeof context !== 'object') { + properlyBoxesNonStrict = false; + } + }); + + method.call( + [1], + function () { + 'use strict'; + + properlyBoxesStrict = typeof this === 'string'; + }, + 'x', + ); + } catch (e) { + threwException = true; + } + } + return !!method && !threwException && properlyBoxesNonStrict && properlyBoxesStrict; + }; + + defineProperties( + ArrayPrototype, + { + forEach: function forEach(callbackfn /*, thisArg*/) { + var object = ES.ToObject(this); + var self = splitString && isString(this) ? strSplit(this, '') : object; + var i = -1; + var length = ES.ToUint32(self.length); + var T; + if (arguments.length > 1) { + T = arguments[1]; + } + + // If no callback function or if callback is not a callable function + if (!isCallable(callbackfn)) { + throw new TypeError('Array.prototype.forEach callback must be a function'); + } + + while (++i < length) { + if (i in self) { + // Invoke the callback function with call, passing arguments: + // context, property value, property key, thisArg object + if (typeof T === 'undefined') { + callbackfn(self[i], i, object); + } else { + callbackfn.call(T, self[i], i, object); + } + } + } + }, + }, + !properlyBoxesContext(ArrayPrototype.forEach), + ); + + // ES5 15.4.4.19 + // http://es5.github.com/#x15.4.4.19 + // https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/map + defineProperties( + ArrayPrototype, + { + map: function map(callbackfn /*, thisArg*/) { + var object = ES.ToObject(this); + var self = splitString && isString(this) ? strSplit(this, '') : object; + var length = ES.ToUint32(self.length); + var result = $Array(length); + var T; + if (arguments.length > 1) { + T = arguments[1]; + } + + // If no callback function or if callback is not a callable function + if (!isCallable(callbackfn)) { + throw new TypeError('Array.prototype.map callback must be a function'); + } + + for (var i = 0; i < length; i++) { + if (i in self) { + if (typeof T === 'undefined') { + result[i] = callbackfn(self[i], i, object); + } else { + result[i] = callbackfn.call(T, self[i], i, object); + } + } + } + return result; + }, + }, + !properlyBoxesContext(ArrayPrototype.map), + ); + + // ES5 15.4.4.20 + // http://es5.github.com/#x15.4.4.20 + // https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/filter + defineProperties( + ArrayPrototype, + { + filter: function filter(callbackfn /*, thisArg*/) { + var object = ES.ToObject(this); + var self = splitString && isString(this) ? strSplit(this, '') : object; + var length = ES.ToUint32(self.length); + var result = []; + var value; + var T; + if (arguments.length > 1) { + T = arguments[1]; + } + + // If no callback function or if callback is not a callable function + if (!isCallable(callbackfn)) { + throw new TypeError('Array.prototype.filter callback must be a function'); + } + + for (var i = 0; i < length; i++) { + if (i in self) { + value = self[i]; + if ( + typeof T === 'undefined' + ? callbackfn(value, i, object) + : callbackfn.call(T, value, i, object) + ) { + pushCall(result, value); + } + } + } + return result; + }, + }, + !properlyBoxesContext(ArrayPrototype.filter), + ); + + // ES5 15.4.4.16 + // http://es5.github.com/#x15.4.4.16 + // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/every + defineProperties( + ArrayPrototype, + { + every: function every(callbackfn /*, thisArg*/) { + var object = ES.ToObject(this); + var self = splitString && isString(this) ? strSplit(this, '') : object; + var length = ES.ToUint32(self.length); + var T; + if (arguments.length > 1) { + T = arguments[1]; + } + + // If no callback function or if callback is not a callable function + if (!isCallable(callbackfn)) { + throw new TypeError('Array.prototype.every callback must be a function'); + } + + for (var i = 0; i < length; i++) { + if ( + i in self && + !(typeof T === 'undefined' + ? callbackfn(self[i], i, object) + : callbackfn.call(T, self[i], i, object)) + ) { + return false; + } + } + return true; + }, + }, + !properlyBoxesContext(ArrayPrototype.every), + ); + + // ES5 15.4.4.17 + // http://es5.github.com/#x15.4.4.17 + // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/some + defineProperties( + ArrayPrototype, + { + some: function some(callbackfn /*, thisArg */) { + var object = ES.ToObject(this); + var self = splitString && isString(this) ? strSplit(this, '') : object; + var length = ES.ToUint32(self.length); + var T; + if (arguments.length > 1) { + T = arguments[1]; + } + + // If no callback function or if callback is not a callable function + if (!isCallable(callbackfn)) { + throw new TypeError('Array.prototype.some callback must be a function'); + } + + for (var i = 0; i < length; i++) { + if ( + i in self && + (typeof T === 'undefined' + ? callbackfn(self[i], i, object) + : callbackfn.call(T, self[i], i, object)) + ) { + return true; + } + } + return false; + }, + }, + !properlyBoxesContext(ArrayPrototype.some), + ); + + // ES5 15.4.4.21 + // http://es5.github.com/#x15.4.4.21 + // https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/reduce + var reduceCoercesToObject = false; + if (ArrayPrototype.reduce) { + reduceCoercesToObject = + typeof ArrayPrototype.reduce.call('es5', function (_, __, ___, list) { + return list; + }) === 'object'; + } + defineProperties( + ArrayPrototype, + { + reduce: function reduce(callbackfn /*, initialValue*/) { + var object = ES.ToObject(this); + var self = splitString && isString(this) ? strSplit(this, '') : object; + var length = ES.ToUint32(self.length); + + // If no callback function or if callback is not a callable function + if (!isCallable(callbackfn)) { + throw new TypeError('Array.prototype.reduce callback must be a function'); + } + + // no value to return if no initial value and an empty array + if (length === 0 && arguments.length === 1) { + throw new TypeError('reduce of empty array with no initial value'); + } + + var i = 0; + var result; + if (arguments.length >= 2) { + result = arguments[1]; + } else { + do { + if (i in self) { + result = self[i++]; + break; + } + + // if array contains no values, no initial value to return + if (++i >= length) { + throw new TypeError('reduce of empty array with no initial value'); + } + } while (true); + } + + for (; i < length; i++) { + if (i in self) { + result = callbackfn(result, self[i], i, object); + } + } + + return result; + }, + }, + !reduceCoercesToObject, + ); + + // ES5 15.4.4.22 + // http://es5.github.com/#x15.4.4.22 + // https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/reduceRight + var reduceRightCoercesToObject = false; + if (ArrayPrototype.reduceRight) { + reduceRightCoercesToObject = + typeof ArrayPrototype.reduceRight.call('es5', function (_, __, ___, list) { + return list; + }) === 'object'; + } + defineProperties( + ArrayPrototype, + { + reduceRight: function reduceRight(callbackfn /*, initial*/) { + var object = ES.ToObject(this); + var self = splitString && isString(this) ? strSplit(this, '') : object; + var length = ES.ToUint32(self.length); + + // If no callback function or if callback is not a callable function + if (!isCallable(callbackfn)) { + throw new TypeError('Array.prototype.reduceRight callback must be a function'); + } + + // no value to return if no initial value, empty array + if (length === 0 && arguments.length === 1) { + throw new TypeError('reduceRight of empty array with no initial value'); + } + + var result; + var i = length - 1; + if (arguments.length >= 2) { + result = arguments[1]; + } else { + do { + if (i in self) { + result = self[i--]; + break; + } + + // if array contains no values, no initial value to return + if (--i < 0) { + throw new TypeError('reduceRight of empty array with no initial value'); + } + } while (true); + } + + if (i < 0) { + return result; + } + + do { + if (i in self) { + result = callbackfn(result, self[i], i, object); + } + } while (i--); + + return result; + }, + }, + !reduceRightCoercesToObject, + ); + + // ES5 15.4.4.14 + // http://es5.github.com/#x15.4.4.14 + // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/indexOf + var hasFirefox2IndexOfBug = ArrayPrototype.indexOf && [0, 1].indexOf(1, 2) !== -1; + defineProperties( + ArrayPrototype, + { + indexOf: function indexOf(searchElement /*, fromIndex */) { + var self = splitString && isString(this) ? strSplit(this, '') : ES.ToObject(this); + var length = ES.ToUint32(self.length); + + if (length === 0) { + return -1; + } + + var i = 0; + if (arguments.length > 1) { + i = ES.ToInteger(arguments[1]); + } + + // handle negative indices + i = i >= 0 ? i : max(0, length + i); + for (; i < length; i++) { + if (i in self && self[i] === searchElement) { + return i; + } + } + return -1; + }, + }, + hasFirefox2IndexOfBug, + ); + + // ES5 15.4.4.15 + // http://es5.github.com/#x15.4.4.15 + // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/lastIndexOf + var hasFirefox2LastIndexOfBug = ArrayPrototype.lastIndexOf && [0, 1].lastIndexOf(0, -3) !== -1; + defineProperties( + ArrayPrototype, + { + lastIndexOf: function lastIndexOf(searchElement /*, fromIndex */) { + var self = splitString && isString(this) ? strSplit(this, '') : ES.ToObject(this); + var length = ES.ToUint32(self.length); + + if (length === 0) { + return -1; + } + var i = length - 1; + if (arguments.length > 1) { + i = min(i, ES.ToInteger(arguments[1])); + } + // handle negative indices + i = i >= 0 ? i : length - Math.abs(i); + for (; i >= 0; i--) { + if (i in self && searchElement === self[i]) { + return i; + } + } + return -1; + }, + }, + hasFirefox2LastIndexOfBug, + ); + + // ES5 15.4.4.12 + // http://es5.github.com/#x15.4.4.12 + var spliceNoopReturnsEmptyArray = (function () { + var a = [1, 2]; + var result = a.splice(); + return a.length === 2 && isArray(result) && result.length === 0; + })(); + defineProperties( + ArrayPrototype, + { + // Safari 5.0 bug where .splice() returns undefined + splice: function splice(start, deleteCount) { + if (arguments.length === 0) { + return []; + } else { + return array_splice.apply(this, arguments); + } + }, + }, + !spliceNoopReturnsEmptyArray, + ); + + var spliceWorksWithEmptyObject = (function () { + var obj = {}; + ArrayPrototype.splice.call(obj, 0, 0, 1); + return obj.length === 1; + })(); + defineProperties( + ArrayPrototype, + { + splice: function splice(start, deleteCount) { + if (arguments.length === 0) { + return []; + } + var args = arguments; + this.length = max(ES.ToInteger(this.length), 0); + if (arguments.length > 0 && typeof deleteCount !== 'number') { + args = arraySlice(arguments); + if (args.length < 2) { + pushCall(args, this.length - start); + } else { + args[1] = ES.ToInteger(deleteCount); + } + } + return array_splice.apply(this, args); + }, + }, + !spliceWorksWithEmptyObject, + ); + var spliceWorksWithLargeSparseArrays = (function () { + // Per https://github.com/es-shims/es5-shim/issues/295 + // Safari 7/8 breaks with sparse arrays of size 1e5 or greater + var arr = new $Array(1e5); + // note: the index MUST be 8 or larger or the test will false pass + arr[8] = 'x'; + arr.splice(1, 1); + // note: this test must be defined *after* the indexOf shim + // per https://github.com/es-shims/es5-shim/issues/313 + return arr.indexOf('x') === 7; + })(); + var spliceWorksWithSmallSparseArrays = (function () { + // Per https://github.com/es-shims/es5-shim/issues/295 + // Opera 12.15 breaks on this, no idea why. + var n = 256; + var arr = []; + arr[n] = 'a'; + arr.splice(n + 1, 0, 'b'); + return arr[n] === 'a'; + })(); + defineProperties( + ArrayPrototype, + { + splice: function splice(start, deleteCount) { + var O = ES.ToObject(this); + var A = []; + var len = ES.ToUint32(O.length); + var relativeStart = ES.ToInteger(start); + var actualStart = relativeStart < 0 ? max(len + relativeStart, 0) : min(relativeStart, len); + var actualDeleteCount = min(max(ES.ToInteger(deleteCount), 0), len - actualStart); + + var k = 0; + var from; + while (k < actualDeleteCount) { + from = $String(actualStart + k); + if (owns(O, from)) { + A[k] = O[from]; + } + k += 1; + } + + var items = arraySlice(arguments, 2); + var itemCount = items.length; + var to; + if (itemCount < actualDeleteCount) { + k = actualStart; + var maxK = len - actualDeleteCount; + while (k < maxK) { + from = $String(k + actualDeleteCount); + to = $String(k + itemCount); + if (owns(O, from)) { + O[to] = O[from]; + } else { + delete O[to]; + } + k += 1; + } + k = len; + var minK = len - actualDeleteCount + itemCount; + while (k > minK) { + delete O[k - 1]; + k -= 1; + } + } else if (itemCount > actualDeleteCount) { + k = len - actualDeleteCount; + while (k > actualStart) { + from = $String(k + actualDeleteCount - 1); + to = $String(k + itemCount - 1); + if (owns(O, from)) { + O[to] = O[from]; + } else { + delete O[to]; + } + k -= 1; + } + } + k = actualStart; + for (var i = 0; i < items.length; ++i) { + O[k] = items[i]; + k += 1; + } + O.length = len - actualDeleteCount + itemCount; + + return A; + }, + }, + !spliceWorksWithLargeSparseArrays || !spliceWorksWithSmallSparseArrays, + ); + + var originalJoin = ArrayPrototype.join; + var hasStringJoinBug; + try { + hasStringJoinBug = Array.prototype.join.call('123', ',') !== '1,2,3'; + } catch (e) { + hasStringJoinBug = true; + } + if (hasStringJoinBug) { + defineProperties( + ArrayPrototype, + { + join: function join(separator) { + var sep = typeof separator === 'undefined' ? ',' : separator; + return originalJoin.call(isString(this) ? strSplit(this, '') : this, sep); + }, + }, + hasStringJoinBug, + ); + } + + var hasJoinUndefinedBug = [1, 2].join(undefined) !== '1,2'; + if (hasJoinUndefinedBug) { + defineProperties( + ArrayPrototype, + { + join: function join(separator) { + var sep = typeof separator === 'undefined' ? ',' : separator; + return originalJoin.call(this, sep); + }, + }, + hasJoinUndefinedBug, + ); + } + + var pushShim = function push(item) { + var O = ES.ToObject(this); + var n = ES.ToUint32(O.length); + var i = 0; + while (i < arguments.length) { + O[n + i] = arguments[i]; + i += 1; + } + O.length = n + i; + return n + i; + }; + + var pushIsNotGeneric = (function () { + var obj = {}; + var result = Array.prototype.push.call(obj, undefined); + return result !== 1 || obj.length !== 1 || typeof obj[0] !== 'undefined' || !owns(obj, 0); + })(); + defineProperties( + ArrayPrototype, + { + push: function push(item) { + if (isArray(this)) { + return array_push.apply(this, arguments); + } + return pushShim.apply(this, arguments); + }, + }, + pushIsNotGeneric, + ); + + // This fixes a very weird bug in Opera 10.6 when pushing `undefined + var pushUndefinedIsWeird = (function () { + var arr = []; + var result = arr.push(undefined); + return result !== 1 || arr.length !== 1 || typeof arr[0] !== 'undefined' || !owns(arr, 0); + })(); + defineProperties(ArrayPrototype, { push: pushShim }, pushUndefinedIsWeird); + + // ES5 15.2.3.14 + // http://es5.github.io/#x15.4.4.10 + // Fix boxed string bug + defineProperties( + ArrayPrototype, + { + slice: function (start, end) { + var arr = isString(this) ? strSplit(this, '') : this; + return arraySliceApply(arr, arguments); + }, + }, + splitString, + ); + + var sortIgnoresNonFunctions = (function () { + try { + [1, 2].sort(null); + } catch (e) { + try { + [1, 2].sort({}); + } catch (e2) { + return false; + } + } + return true; + })(); + var sortThrowsOnRegex = (function () { + // this is a problem in Firefox 4, in which `typeof /a/ === 'function'` + try { + [1, 2].sort(/a/); + return false; + } catch (e) {} + return true; + })(); + var sortIgnoresUndefined = (function () { + // applies in IE 8, for one. + try { + [1, 2].sort(undefined); + return true; + } catch (e) {} + return false; + })(); + defineProperties( + ArrayPrototype, + { + sort: function sort(compareFn) { + if (typeof compareFn === 'undefined') { + return arraySort(this); + } + if (!isCallable(compareFn)) { + throw new TypeError('Array.prototype.sort callback must be a function'); + } + return arraySort(this, compareFn); + }, + }, + sortIgnoresNonFunctions || !sortIgnoresUndefined || !sortThrowsOnRegex, + ); + + // + // Object + // ====== + // + + // ES5 15.2.3.14 + // http://es5.github.com/#x15.2.3.14 + + // http://whattheheadsaid.com/2010/10/a-safer-object-keys-compatibility-implementation + var hasDontEnumBug = !isEnum({ toString: null }, 'toString'); // jscs:ignore disallowQuotedKeysInObjects + var hasProtoEnumBug = isEnum(function () {}, 'prototype'); + var hasStringEnumBug = !owns('x', '0'); + var equalsConstructorPrototype = function (o) { + var ctor = o.constructor; + return ctor && ctor.prototype === o; + }; + var excludedKeys = { + $applicationCache: true, + $console: true, + $external: true, + $frame: true, + $frameElement: true, + $frames: true, + $innerHeight: true, + $innerWidth: true, + $onmozfullscreenchange: true, + $onmozfullscreenerror: true, + $outerHeight: true, + $outerWidth: true, + $pageXOffset: true, + $pageYOffset: true, + $parent: true, + $scrollLeft: true, + $scrollTop: true, + $scrollX: true, + $scrollY: true, + $self: true, + $webkitIndexedDB: true, + $webkitStorageInfo: true, + $window: true, + + $width: true, + $height: true, + $top: true, + $localStorage: true, + }; + var hasAutomationEqualityBug = (function () { + /* globals window */ + if (typeof window === 'undefined') { + return false; + } + for (var k in window) { + try { + if ( + !excludedKeys['$' + k] && + owns(window, k) && + window[k] !== null && + typeof window[k] === 'object' + ) { + equalsConstructorPrototype(window[k]); + } + } catch (e) { + return true; + } + } + return false; + })(); + var equalsConstructorPrototypeIfNotBuggy = function (object) { + if (typeof window === 'undefined' || !hasAutomationEqualityBug) { + return equalsConstructorPrototype(object); + } + try { + return equalsConstructorPrototype(object); + } catch (e) { + return false; + } + }; + var dontEnums = [ + 'toString', + 'toLocaleString', + 'valueOf', + 'hasOwnProperty', + 'isPrototypeOf', + 'propertyIsEnumerable', + 'constructor', + ]; + var dontEnumsLength = dontEnums.length; + + // taken directly from https://github.com/ljharb/is-arguments/blob/master/index.js + // can be replaced with require('is-arguments') if we ever use a build process instead + var isStandardArguments = function isArguments(value) { + return toStr(value) === '[object Arguments]'; + }; + var isLegacyArguments = function isArguments(value) { + return ( + value !== null && + typeof value === 'object' && + typeof value.length === 'number' && + value.length >= 0 && + !isArray(value) && + isCallable(value.callee) + ); + }; + var isArguments = isStandardArguments(arguments) ? isStandardArguments : isLegacyArguments; + + defineProperties($Object, { + keys: function keys(object) { + var isFn = isCallable(object); + var isArgs = isArguments(object); + var isObject = object !== null && typeof object === 'object'; + var isStr = isObject && isString(object); + + if (!isObject && !isFn && !isArgs) { + throw new TypeError('Object.keys called on a non-object'); + } + + var theKeys = []; + var skipProto = hasProtoEnumBug && isFn; + if ((isStr && hasStringEnumBug) || isArgs) { + for (var i = 0; i < object.length; ++i) { + pushCall(theKeys, $String(i)); + } + } + + if (!isArgs) { + for (var name in object) { + if (!(skipProto && name === 'prototype') && owns(object, name)) { + pushCall(theKeys, $String(name)); + } + } + } + + if (hasDontEnumBug) { + var skipConstructor = equalsConstructorPrototypeIfNotBuggy(object); + for (var j = 0; j < dontEnumsLength; j++) { + var dontEnum = dontEnums[j]; + if (!(skipConstructor && dontEnum === 'constructor') && owns(object, dontEnum)) { + pushCall(theKeys, dontEnum); + } + } + } + return theKeys; + }, + }); + + var keysWorksWithArguments = + $Object.keys && + (function () { + // Safari 5.0 bug + return $Object.keys(arguments).length === 2; + })(1, 2); + var keysHasArgumentsLengthBug = + $Object.keys && + (function () { + var argKeys = $Object.keys(arguments); + return arguments.length !== 1 || argKeys.length !== 1 || argKeys[0] !== 1; + })(1); + var originalKeys = $Object.keys; + defineProperties( + $Object, + { + keys: function keys(object) { + if (isArguments(object)) { + return originalKeys(arraySlice(object)); + } else { + return originalKeys(object); + } + }, + }, + !keysWorksWithArguments || keysHasArgumentsLengthBug, + ); + + // + // Date + // ==== + // + + var hasNegativeMonthYearBug = new Date(-3509827329600292).getUTCMonth() !== 0; + var aNegativeTestDate = new Date(-1509842289600292); + var aPositiveTestDate = new Date(1449662400000); + var hasToUTCStringFormatBug = aNegativeTestDate.toUTCString() !== 'Mon, 01 Jan -45875 11:59:59 GMT'; + var hasToDateStringFormatBug; + var hasToStringFormatBug; + var timeZoneOffset = aNegativeTestDate.getTimezoneOffset(); + if (timeZoneOffset < -720) { + hasToDateStringFormatBug = aNegativeTestDate.toDateString() !== 'Tue Jan 02 -45875'; + hasToStringFormatBug = !/^Thu Dec 10 2015 \d\d:\d\d:\d\d GMT[-+]\d\d\d\d(?: |$)/.test( + String(aPositiveTestDate), + ); + } else { + hasToDateStringFormatBug = aNegativeTestDate.toDateString() !== 'Mon Jan 01 -45875'; + hasToStringFormatBug = !/^Wed Dec 09 2015 \d\d:\d\d:\d\d GMT[-+]\d\d\d\d(?: |$)/.test( + String(aPositiveTestDate), + ); + } + + var originalGetFullYear = call.bind(Date.prototype.getFullYear); + var originalGetMonth = call.bind(Date.prototype.getMonth); + var originalGetDate = call.bind(Date.prototype.getDate); + var originalGetUTCFullYear = call.bind(Date.prototype.getUTCFullYear); + var originalGetUTCMonth = call.bind(Date.prototype.getUTCMonth); + var originalGetUTCDate = call.bind(Date.prototype.getUTCDate); + var originalGetUTCDay = call.bind(Date.prototype.getUTCDay); + var originalGetUTCHours = call.bind(Date.prototype.getUTCHours); + var originalGetUTCMinutes = call.bind(Date.prototype.getUTCMinutes); + var originalGetUTCSeconds = call.bind(Date.prototype.getUTCSeconds); + var originalGetUTCMilliseconds = call.bind(Date.prototype.getUTCMilliseconds); + var dayName = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']; + var monthName = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']; + var daysInMonth = function daysInMonth(month, year) { + return originalGetDate(new Date(year, month, 0)); + }; + + defineProperties( + Date.prototype, + { + getFullYear: function getFullYear() { + if (!this || !(this instanceof Date)) { + throw new TypeError('this is not a Date object.'); + } + var year = originalGetFullYear(this); + if (year < 0 && originalGetMonth(this) > 11) { + return year + 1; + } + return year; + }, + getMonth: function getMonth() { + if (!this || !(this instanceof Date)) { + throw new TypeError('this is not a Date object.'); + } + var year = originalGetFullYear(this); + var month = originalGetMonth(this); + if (year < 0 && month > 11) { + return 0; + } + return month; + }, + getDate: function getDate() { + if (!this || !(this instanceof Date)) { + throw new TypeError('this is not a Date object.'); + } + var year = originalGetFullYear(this); + var month = originalGetMonth(this); + var date = originalGetDate(this); + if (year < 0 && month > 11) { + if (month === 12) { + return date; + } + var days = daysInMonth(0, year + 1); + return days - date + 1; + } + return date; + }, + getUTCFullYear: function getUTCFullYear() { + if (!this || !(this instanceof Date)) { + throw new TypeError('this is not a Date object.'); + } + var year = originalGetUTCFullYear(this); + if (year < 0 && originalGetUTCMonth(this) > 11) { + return year + 1; + } + return year; + }, + getUTCMonth: function getUTCMonth() { + if (!this || !(this instanceof Date)) { + throw new TypeError('this is not a Date object.'); + } + var year = originalGetUTCFullYear(this); + var month = originalGetUTCMonth(this); + if (year < 0 && month > 11) { + return 0; + } + return month; + }, + getUTCDate: function getUTCDate() { + if (!this || !(this instanceof Date)) { + throw new TypeError('this is not a Date object.'); + } + var year = originalGetUTCFullYear(this); + var month = originalGetUTCMonth(this); + var date = originalGetUTCDate(this); + if (year < 0 && month > 11) { + if (month === 12) { + return date; + } + var days = daysInMonth(0, year + 1); + return days - date + 1; + } + return date; + }, + }, + hasNegativeMonthYearBug, + ); + + defineProperties( + Date.prototype, + { + toUTCString: function toUTCString() { + if (!this || !(this instanceof Date)) { + throw new TypeError('this is not a Date object.'); + } + var day = originalGetUTCDay(this); + var date = originalGetUTCDate(this); + var month = originalGetUTCMonth(this); + var year = originalGetUTCFullYear(this); + var hour = originalGetUTCHours(this); + var minute = originalGetUTCMinutes(this); + var second = originalGetUTCSeconds(this); + return ( + dayName[day] + + ', ' + + (date < 10 ? '0' + date : date) + + ' ' + + monthName[month] + + ' ' + + year + + ' ' + + (hour < 10 ? '0' + hour : hour) + + ':' + + (minute < 10 ? '0' + minute : minute) + + ':' + + (second < 10 ? '0' + second : second) + + ' GMT' + ); + }, + }, + hasNegativeMonthYearBug || hasToUTCStringFormatBug, + ); + + // Opera 12 has `,` + defineProperties( + Date.prototype, + { + toDateString: function toDateString() { + if (!this || !(this instanceof Date)) { + throw new TypeError('this is not a Date object.'); + } + var day = this.getDay(); + var date = this.getDate(); + var month = this.getMonth(); + var year = this.getFullYear(); + return ( + dayName[day] + ' ' + monthName[month] + ' ' + (date < 10 ? '0' + date : date) + ' ' + year + ); + }, + }, + hasNegativeMonthYearBug || hasToDateStringFormatBug, + ); + + // can't use defineProperties here because of toString enumeration issue in IE <= 8 + if (hasNegativeMonthYearBug || hasToStringFormatBug) { + Date.prototype.toString = function toString() { + if (!this || !(this instanceof Date)) { + throw new TypeError('this is not a Date object.'); + } + var day = this.getDay(); + var date = this.getDate(); + var month = this.getMonth(); + var year = this.getFullYear(); + var hour = this.getHours(); + var minute = this.getMinutes(); + var second = this.getSeconds(); + var timezoneOffset = this.getTimezoneOffset(); + var hoursOffset = Math.floor(Math.abs(timezoneOffset) / 60); + var minutesOffset = Math.floor(Math.abs(timezoneOffset) % 60); + return ( + dayName[day] + + ' ' + + monthName[month] + + ' ' + + (date < 10 ? '0' + date : date) + + ' ' + + year + + ' ' + + (hour < 10 ? '0' + hour : hour) + + ':' + + (minute < 10 ? '0' + minute : minute) + + ':' + + (second < 10 ? '0' + second : second) + + ' GMT' + + (timezoneOffset > 0 ? '-' : '+') + + (hoursOffset < 10 ? '0' + hoursOffset : hoursOffset) + + (minutesOffset < 10 ? '0' + minutesOffset : minutesOffset) + ); + }; + if (supportsDescriptors) { + $Object.defineProperty(Date.prototype, 'toString', { + configurable: true, + enumerable: false, + writable: true, + }); + } + } + + // ES5 15.9.5.43 + // http://es5.github.com/#x15.9.5.43 + // This function returns a String value represent the instance in time + // represented by this Date object. The format of the String is the Date Time + // string format defined in 15.9.1.15. All fields are present in the String. + // The time zone is always UTC, denoted by the suffix Z. If the time value of + // this object is not a finite Number a RangeError exception is thrown. + var negativeDate = -62198755200000; + var negativeYearString = '-000001'; + var hasNegativeDateBug = + Date.prototype.toISOString && + new Date(negativeDate).toISOString().indexOf(negativeYearString) === -1; // eslint-disable-line max-len + var hasSafari51DateBug = + Date.prototype.toISOString && new Date(-1).toISOString() !== '1969-12-31T23:59:59.999Z'; + + var getTime = call.bind(Date.prototype.getTime); + + defineProperties( + Date.prototype, + { + toISOString: function toISOString() { + if (!isFinite(this) || !isFinite(getTime(this))) { + // Adope Photoshop requires the second check. + throw new RangeError('Date.prototype.toISOString called on non-finite value.'); + } + + var year = originalGetUTCFullYear(this); + + var month = originalGetUTCMonth(this); + // see https://github.com/es-shims/es5-shim/issues/111 + year += Math.floor(month / 12); + month = ((month % 12) + 12) % 12; + + // the date time string format is specified in 15.9.1.15. + var result = [ + month + 1, + originalGetUTCDate(this), + originalGetUTCHours(this), + originalGetUTCMinutes(this), + originalGetUTCSeconds(this), + ]; + year = + (year < 0 ? '-' : year > 9999 ? '+' : '') + + strSlice('00000' + Math.abs(year), 0 <= year && year <= 9999 ? -4 : -6); + + for (var i = 0; i < result.length; ++i) { + // pad months, days, hours, minutes, and seconds to have two digits. + result[i] = strSlice('00' + result[i], -2); + } + // pad milliseconds to have three digits. + return ( + year + + '-' + + arraySlice(result, 0, 2).join('-') + + 'T' + + arraySlice(result, 2).join(':') + + '.' + + strSlice('000' + originalGetUTCMilliseconds(this), -3) + + 'Z' + ); + }, + }, + hasNegativeDateBug || hasSafari51DateBug, + ); + + // ES5 15.9.5.44 + // http://es5.github.com/#x15.9.5.44 + // This function provides a String representation of a Date object for use by + // JSON.stringify (15.12.3). + var dateToJSONIsSupported = (function () { + try { + return ( + Date.prototype.toJSON && + new Date(NaN).toJSON() === null && + new Date(negativeDate).toJSON().indexOf(negativeYearString) !== -1 && + Date.prototype.toJSON.call({ + // generic + toISOString: function () { + return true; + }, + }) + ); + } catch (e) { + return false; + } + })(); + if (!dateToJSONIsSupported) { + Date.prototype.toJSON = function toJSON(key) { + // When the toJSON method is called with argument key, the following + // steps are taken: + + // 1. Let O be the result of calling ToObject, giving it the this + // value as its argument. + // 2. Let tv be ES.ToPrimitive(O, hint Number). + var O = $Object(this); + var tv = ES.ToPrimitive(O); + // 3. If tv is a Number and is not finite, return null. + if (typeof tv === 'number' && !isFinite(tv)) { + return null; + } + // 4. Let toISO be the result of calling the [[Get]] internal method of + // O with argument "toISOString". + var toISO = O.toISOString; + // 5. If IsCallable(toISO) is false, throw a TypeError exception. + if (!isCallable(toISO)) { + throw new TypeError('toISOString property is not callable'); + } + // 6. Return the result of calling the [[Call]] internal method of + // toISO with O as the this value and an empty argument list. + return toISO.call(O); + + // NOTE 1 The argument is ignored. + + // NOTE 2 The toJSON function is intentionally generic; it does not + // require that its this value be a Date object. Therefore, it can be + // transferred to other kinds of objects for use as a method. However, + // it does require that any such object have a toISOString method. An + // object is free to use the argument key to filter its + // stringification. + }; + } + + // ES5 15.9.4.2 + // http://es5.github.com/#x15.9.4.2 + // based on work shared by Daniel Friesen (dantman) + // http://gist.github.com/303249 + var supportsExtendedYears = Date.parse('+033658-09-27T01:46:40.000Z') === 1e15; + var acceptsInvalidDates = + !isNaN(Date.parse('2012-04-04T24:00:00.500Z')) || + !isNaN(Date.parse('2012-11-31T23:59:59.000Z')) || + !isNaN(Date.parse('2012-12-31T23:59:60.000Z')); + var doesNotParseY2KNewYear = isNaN(Date.parse('2000-01-01T00:00:00.000Z')); + if (doesNotParseY2KNewYear || acceptsInvalidDates || !supportsExtendedYears) { + // XXX global assignment won't work in embeddings that use + // an alternate object for the context. + /* global Date: true */ + var maxSafeUnsigned32Bit = Math.pow(2, 31) - 1; + var hasSafariSignedIntBug = isActualNaN( + new Date(1970, 0, 1, 0, 0, 0, maxSafeUnsigned32Bit + 1).getTime(), + ); + // eslint-disable-next-line no-implicit-globals, no-global-assign + Date = (function (NativeDate) { + // Date.length === 7 + var DateShim = function Date(Y, M, D, h, m, s, ms) { + var length = arguments.length; + var date; + if (this instanceof NativeDate) { + var seconds = s; + var millis = ms; + if (hasSafariSignedIntBug && length >= 7 && ms > maxSafeUnsigned32Bit) { + // work around a Safari 8/9 bug where it treats the seconds as signed + var msToShift = Math.floor(ms / maxSafeUnsigned32Bit) * maxSafeUnsigned32Bit; + var sToShift = Math.floor(msToShift / 1e3); + seconds += sToShift; + millis -= sToShift * 1e3; + } + date = + length === 1 && $String(Y) === Y // isString(Y) + ? // We explicitly pass it through parse: + new NativeDate(DateShim.parse(Y)) + : // We have to manually make calls depending on argument + // length here + length >= 7 + ? new NativeDate(Y, M, D, h, m, seconds, millis) + : length >= 6 + ? new NativeDate(Y, M, D, h, m, seconds) + : length >= 5 + ? new NativeDate(Y, M, D, h, m) + : length >= 4 + ? new NativeDate(Y, M, D, h) + : length >= 3 + ? new NativeDate(Y, M, D) + : length >= 2 + ? new NativeDate(Y, M) + : length >= 1 + ? new NativeDate(Y instanceof NativeDate ? +Y : Y) + : new NativeDate(); + } else { + date = NativeDate.apply(this, arguments); + } + if (!isPrimitive(date)) { + // Prevent mixups with unfixed Date object + defineProperties(date, { constructor: DateShim }, true); + } + return date; + }; + + // 15.9.1.15 Date Time String Format. + var isoDateExpression = new RegExp( + '^' + + '(\\d{4}|[+-]\\d{6})' + // four-digit year capture or sign + 6-digit extended year + '(?:-(\\d{2})' + // optional month capture + '(?:-(\\d{2})' + // optional day capture + '(?:' + // capture hours:minutes:seconds.milliseconds + 'T(\\d{2})' + // hours capture + ':(\\d{2})' + // minutes capture + '(?:' + // optional :seconds.milliseconds + ':(\\d{2})' + // seconds capture + '(?:(\\.\\d{1,}))?' + // milliseconds capture + ')?' + + '(' + // capture UTC offset component + 'Z|' + // UTC capture + '(?:' + // offset specifier +/-hours:minutes + '([-+])' + // sign capture + '(\\d{2})' + // hours offset capture + ':(\\d{2})' + // minutes offset capture + ')' + + ')?)?)?)?' + + '$', + ); + + var months = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365]; + + var dayFromMonth = function dayFromMonth(year, month) { + var t = month > 1 ? 1 : 0; + return ( + months[month] + + Math.floor((year - 1969 + t) / 4) - + Math.floor((year - 1901 + t) / 100) + + Math.floor((year - 1601 + t) / 400) + + 365 * (year - 1970) + ); + }; + + var toUTC = function toUTC(t) { + var s = 0; + var ms = t; + if (hasSafariSignedIntBug && ms > maxSafeUnsigned32Bit) { + // work around a Safari 8/9 bug where it treats the seconds as signed + var msToShift = Math.floor(ms / maxSafeUnsigned32Bit) * maxSafeUnsigned32Bit; + var sToShift = Math.floor(msToShift / 1e3); + s += sToShift; + ms -= sToShift * 1e3; + } + return $Number(new NativeDate(1970, 0, 1, 0, 0, s, ms)); + }; + + // Copy any custom methods a 3rd party library may have added + for (var key in NativeDate) { + if (owns(NativeDate, key)) { + DateShim[key] = NativeDate[key]; + } + } + + // Copy "native" methods explicitly; they may be non-enumerable + defineProperties( + DateShim, + { + now: NativeDate.now, + UTC: NativeDate.UTC, + }, + true, + ); + DateShim.prototype = NativeDate.prototype; + defineProperties(DateShim.prototype, { constructor: DateShim }, true); + + // Upgrade Date.parse to handle simplified ISO 8601 strings + var parseShim = function parse(string) { + var match = isoDateExpression.exec(string); + if (match) { + // parse months, days, hours, minutes, seconds, and milliseconds + // provide default values if necessary + // parse the UTC offset component + var year = $Number(match[1]), + month = $Number(match[2] || 1) - 1, + day = $Number(match[3] || 1) - 1, + hour = $Number(match[4] || 0), + minute = $Number(match[5] || 0), + second = $Number(match[6] || 0), + millisecond = Math.floor($Number(match[7] || 0) * 1000), + // When time zone is missed, local offset should be used + // (ES 5.1 bug) + // see https://bugs.ecmascript.org/show_bug.cgi?id=112 + isLocalTime = Boolean(match[4] && !match[8]), + signOffset = match[9] === '-' ? 1 : -1, + hourOffset = $Number(match[10] || 0), + minuteOffset = $Number(match[11] || 0), + result; + var hasMinutesOrSecondsOrMilliseconds = minute > 0 || second > 0 || millisecond > 0; + if ( + hour < (hasMinutesOrSecondsOrMilliseconds ? 24 : 25) && + minute < 60 && + second < 60 && + millisecond < 1000 && + month > -1 && + month < 12 && + hourOffset < 24 && + minuteOffset < 60 && // detect invalid offsets + day > -1 && + day < dayFromMonth(year, month + 1) - dayFromMonth(year, month) + ) { + result = ((dayFromMonth(year, month) + day) * 24 + hour + hourOffset * signOffset) * 60; + result = ((result + minute + minuteOffset * signOffset) * 60 + second) * 1000 + millisecond; + if (isLocalTime) { + result = toUTC(result); + } + if (-8.64e15 <= result && result <= 8.64e15) { + return result; + } + } + return NaN; + } + return NativeDate.parse.apply(this, arguments); + }; + defineProperties(DateShim, { parse: parseShim }); + + return DateShim; + })(Date); + /* global Date: false */ + } + + // ES5 15.9.4.4 + // http://es5.github.com/#x15.9.4.4 + if (!Date.now) { + Date.now = function now() { + return new Date().getTime(); + }; + } + + // + // Number + // ====== + // + + // ES5.1 15.7.4.5 + // http://es5.github.com/#x15.7.4.5 + var hasToFixedBugs = + NumberPrototype.toFixed && + ((0.00008).toFixed(3) !== '0.000' || + (0.9).toFixed(0) !== '1' || + (1.255).toFixed(2) !== '1.25' || + (1000000000000000128).toFixed(0) !== '1000000000000000128'); + + var toFixedHelpers = { + base: 1e7, + size: 6, + data: [0, 0, 0, 0, 0, 0], + multiply: function multiply(n, c) { + var i = -1; + var c2 = c; + while (++i < toFixedHelpers.size) { + c2 += n * toFixedHelpers.data[i]; + toFixedHelpers.data[i] = c2 % toFixedHelpers.base; + c2 = Math.floor(c2 / toFixedHelpers.base); + } + }, + divide: function divide(n) { + var i = toFixedHelpers.size; + var c = 0; + while (--i >= 0) { + c += toFixedHelpers.data[i]; + toFixedHelpers.data[i] = Math.floor(c / n); + c = (c % n) * toFixedHelpers.base; + } + }, + numToString: function numToString() { + var i = toFixedHelpers.size; + var s = ''; + while (--i >= 0) { + if (s !== '' || i === 0 || toFixedHelpers.data[i] !== 0) { + var t = $String(toFixedHelpers.data[i]); + if (s === '') { + s = t; + } else { + s += strSlice('0000000', 0, 7 - t.length) + t; + } + } + } + return s; + }, + pow: function pow(x, n, acc) { + return n === 0 ? acc : n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc); + }, + log: function log(x) { + var n = 0; + var x2 = x; + while (x2 >= 4096) { + n += 12; + x2 /= 4096; + } + while (x2 >= 2) { + n += 1; + x2 /= 2; + } + return n; + }, + }; + + var toFixedShim = function toFixed(fractionDigits) { + var f, x, s, m, e, z, j, k; + + // Test for NaN and round fractionDigits down + f = $Number(fractionDigits); + f = isActualNaN(f) ? 0 : Math.floor(f); + + if (f < 0 || f > 20) { + throw new RangeError('Number.toFixed called with invalid number of decimals'); + } + + x = $Number(this); + + if (isActualNaN(x)) { + return 'NaN'; + } + + // If it is too big or small, return the string value of the number + if (x <= -1e21 || x >= 1e21) { + return $String(x); + } + + s = ''; + + if (x < 0) { + s = '-'; + x = -x; + } + + m = '0'; + + if (x > 1e-21) { + // 1e-21 < x < 1e21 + // -70 < log2(x) < 70 + e = toFixedHelpers.log(x * toFixedHelpers.pow(2, 69, 1)) - 69; + z = e < 0 ? x * toFixedHelpers.pow(2, -e, 1) : x / toFixedHelpers.pow(2, e, 1); + z *= 0x10000000000000; // Math.pow(2, 52); + e = 52 - e; + + // -18 < e < 122 + // x = z / 2 ^ e + if (e > 0) { + toFixedHelpers.multiply(0, z); + j = f; + + while (j >= 7) { + toFixedHelpers.multiply(1e7, 0); + j -= 7; + } + + toFixedHelpers.multiply(toFixedHelpers.pow(10, j, 1), 0); + j = e - 1; + + while (j >= 23) { + toFixedHelpers.divide(1 << 23); + j -= 23; + } + + toFixedHelpers.divide(1 << j); + toFixedHelpers.multiply(1, 1); + toFixedHelpers.divide(2); + m = toFixedHelpers.numToString(); + } else { + toFixedHelpers.multiply(0, z); + toFixedHelpers.multiply(1 << -e, 0); + m = toFixedHelpers.numToString() + strSlice('0.00000000000000000000', 2, 2 + f); + } + } + + if (f > 0) { + k = m.length; + + if (k <= f) { + m = s + strSlice('0.0000000000000000000', 0, f - k + 2) + m; + } else { + m = s + strSlice(m, 0, k - f) + '.' + strSlice(m, k - f); + } + } else { + m = s + m; + } + + return m; + }; + defineProperties(NumberPrototype, { toFixed: toFixedShim }, hasToFixedBugs); + + var hasToPrecisionUndefinedBug = (function () { + try { + return (1.0).toPrecision(undefined) === '1'; + } catch (e) { + return true; + } + })(); + var originalToPrecision = NumberPrototype.toPrecision; + defineProperties( + NumberPrototype, + { + toPrecision: function toPrecision(precision) { + return typeof precision === 'undefined' + ? originalToPrecision.call(this) + : originalToPrecision.call(this, precision); + }, + }, + hasToPrecisionUndefinedBug, + ); + + // + // String + // ====== + // + + // ES5 15.5.4.14 + // http://es5.github.com/#x15.5.4.14 + + // [bugfix, IE lt 9, firefox 4, Konqueror, Opera, obscure browsers] + // Many browsers do not split properly with regular expressions or they + // do not perform the split correctly under obscure conditions. + // See http://blog.stevenlevithan.com/archives/cross-browser-split + // I've tested in many browsers and this seems to cover the deviant ones: + // 'ab'.split(/(?:ab)*/) should be ["", ""], not [""] + // '.'.split(/(.?)(.?)/) should be ["", ".", "", ""], not ["", ""] + // 'tesst'.split(/(s)*/) should be ["t", undefined, "e", "s", "t"], not + // [undefined, "t", undefined, "e", ...] + // ''.split(/.?/) should be [], not [""] + // '.'.split(/()()/) should be ["."], not ["", "", "."] + + if ( + 'ab'.split(/(?:ab)*/).length !== 2 || + '.'.split(/(.?)(.?)/).length !== 4 || + 'tesst'.split(/(s)*/)[1] === 't' || + 'test'.split(/(?:)/, -1).length !== 4 || + ''.split(/.?/).length || + '.'.split(/()()/).length > 1 + ) { + (function () { + var compliantExecNpcg = typeof /()??/.exec('')[1] === 'undefined'; // NPCG: nonparticipating capturing group + var maxSafe32BitInt = Math.pow(2, 32) - 1; + + StringPrototype.split = function (separator, limit) { + var string = String(this); + if (typeof separator === 'undefined' && limit === 0) { + return []; + } + + // If `separator` is not a regex, use native split + if (!isRegex(separator)) { + return strSplit(this, separator, limit); + } + + var output = []; + var flags = + (separator.ignoreCase ? 'i' : '') + + (separator.multiline ? 'm' : '') + + (separator.unicode ? 'u' : '') + // in ES6 + (separator.sticky ? 'y' : ''), // Firefox 3+ and ES6 + lastLastIndex = 0, + // Make `global` and avoid `lastIndex` issues by working with a copy + separator2, + match, + lastIndex, + lastLength; + var separatorCopy = new RegExp(separator.source, flags + 'g'); + if (!compliantExecNpcg) { + // Doesn't need flags gy, but they don't hurt + separator2 = new RegExp('^' + separatorCopy.source + '$(?!\\s)', flags); + } + /* Values for `limit`, per the spec: + * If undefined: 4294967295 // maxSafe32BitInt + * If 0, Infinity, or NaN: 0 + * If positive number: limit = Math.floor(limit); if (limit > 4294967295) limit -= 4294967296; + * If negative number: 4294967296 - Math.floor(Math.abs(limit)) + * If other: Type-convert, then use the above rules + */ + var splitLimit = typeof limit === 'undefined' ? maxSafe32BitInt : ES.ToUint32(limit); + match = separatorCopy.exec(string); + while (match) { + // `separatorCopy.lastIndex` is not reliable cross-browser + lastIndex = match.index + match[0].length; + if (lastIndex > lastLastIndex) { + pushCall(output, strSlice(string, lastLastIndex, match.index)); + // Fix browsers whose `exec` methods don't consistently return `undefined` for + // nonparticipating capturing groups + if (!compliantExecNpcg && match.length > 1) { + /* eslint-disable no-loop-func */ + match[0].replace(separator2, function () { + for (var i = 1; i < arguments.length - 2; i++) { + if (typeof arguments[i] === 'undefined') { + match[i] = void 0; + } + } + }); + /* eslint-enable no-loop-func */ + } + if (match.length > 1 && match.index < string.length) { + array_push.apply(output, arraySlice(match, 1)); + } + lastLength = match[0].length; + lastLastIndex = lastIndex; + if (output.length >= splitLimit) { + break; + } + } + if (separatorCopy.lastIndex === match.index) { + separatorCopy.lastIndex++; // Avoid an infinite loop + } + match = separatorCopy.exec(string); + } + if (lastLastIndex === string.length) { + if (lastLength || !separatorCopy.test('')) { + pushCall(output, ''); + } + } else { + pushCall(output, strSlice(string, lastLastIndex)); + } + return output.length > splitLimit ? arraySlice(output, 0, splitLimit) : output; + }; + })(); + + // [bugfix, chrome] + // If separator is undefined, then the result array contains just one String, + // which is the this value (converted to a String). If limit is not undefined, + // then the output array is truncated so that it contains no more than limit + // elements. + // "0".split(undefined, 0) -> [] + } else if ('0'.split(void 0, 0).length) { + StringPrototype.split = function split(separator, limit) { + if (typeof separator === 'undefined' && limit === 0) { + return []; + } + return strSplit(this, separator, limit); + }; + } + + var str_replace = StringPrototype.replace; + var replaceReportsGroupsCorrectly = (function () { + var groups = []; + 'x'.replace(/x(.)?/g, function (match, group) { + pushCall(groups, group); + }); + return groups.length === 1 && typeof groups[0] === 'undefined'; + })(); + + if (!replaceReportsGroupsCorrectly) { + StringPrototype.replace = function replace(searchValue, replaceValue) { + var isFn = isCallable(replaceValue); + var hasCapturingGroups = isRegex(searchValue) && /\)[*?]/.test(searchValue.source); + if (!isFn || !hasCapturingGroups) { + return str_replace.call(this, searchValue, replaceValue); + } else { + var wrappedReplaceValue = function (match) { + var length = arguments.length; + var originalLastIndex = searchValue.lastIndex; + searchValue.lastIndex = 0; + var args = searchValue.exec(match) || []; + searchValue.lastIndex = originalLastIndex; + pushCall(args, arguments[length - 2], arguments[length - 1]); + return replaceValue.apply(this, args); + }; + return str_replace.call(this, searchValue, wrappedReplaceValue); + } + }; + } + + // ECMA-262, 3rd B.2.3 + // Not an ECMAScript standard, although ECMAScript 3rd Edition has a + // non-normative section suggesting uniform semantics and it should be + // normalized across all browsers + // [bugfix, IE lt 9] IE < 9 substr() with negative value not working in IE + var string_substr = StringPrototype.substr; + var hasNegativeSubstrBug = ''.substr && '0b'.substr(-1) !== 'b'; + defineProperties( + StringPrototype, + { + substr: function substr(start, length) { + var normalizedStart = start; + if (start < 0) { + normalizedStart = max(this.length + start, 0); + } + return string_substr.call(this, normalizedStart, length); + }, + }, + hasNegativeSubstrBug, + ); + + // ES5 15.5.4.20 + // whitespace from: http://es5.github.io/#x15.5.4.20 + var ws = + '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' + + '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028' + + '\u2029\uFEFF'; + var zeroWidth = '\u200b'; + var wsRegexChars = '[' + ws + ']'; + var trimBeginRegexp = new RegExp('^' + wsRegexChars + wsRegexChars + '*'); + var trimEndRegexp = new RegExp(wsRegexChars + wsRegexChars + '*$'); + var hasTrimWhitespaceBug = StringPrototype.trim && (ws.trim() || !zeroWidth.trim()); + defineProperties( + StringPrototype, + { + // http://blog.stevenlevithan.com/archives/faster-trim-javascript + // http://perfectionkills.com/whitespace-deviations/ + trim: function trim() { + if (typeof this === 'undefined' || this === null) { + throw new TypeError("can't convert " + this + ' to object'); + } + return $String(this).replace(trimBeginRegexp, '').replace(trimEndRegexp, ''); + }, + }, + hasTrimWhitespaceBug, + ); + var trim = call.bind(String.prototype.trim); + + var hasLastIndexBug = StringPrototype.lastIndexOf && 'abcあい'.lastIndexOf('あい', 2) !== -1; + defineProperties( + StringPrototype, + { + lastIndexOf: function lastIndexOf(searchString) { + if (typeof this === 'undefined' || this === null) { + throw new TypeError("can't convert " + this + ' to object'); + } + var S = $String(this); + var searchStr = $String(searchString); + var numPos = arguments.length > 1 ? $Number(arguments[1]) : NaN; + var pos = isActualNaN(numPos) ? Infinity : ES.ToInteger(numPos); + var start = min(max(pos, 0), S.length); + var searchLen = searchStr.length; + var k = start + searchLen; + while (k > 0) { + k = max(0, k - searchLen); + var index = strIndexOf(strSlice(S, k, start + searchLen), searchStr); + if (index !== -1) { + return k + index; + } + } + return -1; + }, + }, + hasLastIndexBug, + ); + + var originalLastIndexOf = StringPrototype.lastIndexOf; + defineProperties( + StringPrototype, + { + lastIndexOf: function lastIndexOf(searchString) { + return originalLastIndexOf.apply(this, arguments); + }, + }, + StringPrototype.lastIndexOf.length !== 1, + ); + + // ES-5 15.1.2.2 + // eslint-disable-next-line radix + if (parseInt(ws + '08') !== 8 || parseInt(ws + '0x16') !== 22) { + /* global parseInt: true */ + parseInt = (function (origParseInt) { + var hexRegex = /^[-+]?0[xX]/; + return function parseInt(str, radix) { + if (typeof str === 'symbol') { + // handle Symbols in node 8.3/8.4 + // eslint-disable-next-line no-implicit-coercion, no-unused-expressions + '' + str; // jscs:ignore disallowImplicitTypeConversion + } + + var string = trim(String(str)); + var defaultedRadix = $Number(radix) || (hexRegex.test(string) ? 16 : 10); + return origParseInt(string, defaultedRadix); + }; + })(parseInt); + } + + // https://es5.github.io/#x15.1.2.3 + if (1 / parseFloat('-0') !== -Infinity) { + /* global parseFloat: true */ + parseFloat = (function (origParseFloat) { + return function parseFloat(string) { + var inputString = trim(String(string)); + var result = origParseFloat(inputString); + return result === 0 && strSlice(inputString, 0, 1) === '-' ? -0 : result; + }; + })(parseFloat); + } + + if (String(new RangeError('test')) !== 'RangeError: test') { + var errorToStringShim = function toString() { + if (typeof this === 'undefined' || this === null) { + throw new TypeError("can't convert " + this + ' to object'); + } + var name = this.name; + if (typeof name === 'undefined') { + name = 'Error'; + } else if (typeof name !== 'string') { + name = $String(name); + } + var msg = this.message; + if (typeof msg === 'undefined') { + msg = ''; + } else if (typeof msg !== 'string') { + msg = $String(msg); + } + if (!name) { + return msg; + } + if (!msg) { + return name; + } + return name + ': ' + msg; + }; + // can't use defineProperties here because of toString enumeration issue in IE <= 8 + Error.prototype.toString = errorToStringShim; + } + + if (supportsDescriptors) { + var ensureNonEnumerable = function (obj, prop) { + if (isEnum(obj, prop)) { + var desc = Object.getOwnPropertyDescriptor(obj, prop); + if (desc.configurable) { + desc.enumerable = false; + Object.defineProperty(obj, prop, desc); + } + } + }; + ensureNonEnumerable(Error.prototype, 'message'); + if (Error.prototype.message !== '') { + Error.prototype.message = ''; + } + ensureNonEnumerable(Error.prototype, 'name'); + } + + if (String(/a/gim) !== '/a/gim') { + var regexToString = function toString() { + var str = '/' + this.source + '/'; + if (this.global) { + str += 'g'; + } + if (this.ignoreCase) { + str += 'i'; + } + if (this.multiline) { + str += 'm'; + } + return str; + }; + // can't use defineProperties here because of toString enumeration issue in IE <= 8 + RegExp.prototype.toString = regexToString; + } + }); + + /***/ + }, + /* 471 */ + /***/ function (module, exports, __webpack_require__) { + var _Object$getOwnPropertyDescriptor = __webpack_require__(472); + + var _Object$defineProperty = __webpack_require__(475); + + var _typeof = __webpack_require__(478); + + var _WeakMap = __webpack_require__(497); + + function _getRequireWildcardCache() { + if (typeof _WeakMap !== 'function') return null; + var cache = new _WeakMap(); + + _getRequireWildcardCache = function _getRequireWildcardCache() { + return cache; + }; + + return cache; + } + + function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } + + if (obj === null || (_typeof(obj) !== 'object' && typeof obj !== 'function')) { + return { + default: obj, + }; + } + + var cache = _getRequireWildcardCache(); + + if (cache && cache.has(obj)) { + return cache.get(obj); + } + + var newObj = {}; + var hasPropertyDescriptor = _Object$defineProperty && _Object$getOwnPropertyDescriptor; + + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + var desc = hasPropertyDescriptor ? _Object$getOwnPropertyDescriptor(obj, key) : null; + + if (desc && (desc.get || desc.set)) { + _Object$defineProperty(newObj, key, desc); + } else { + newObj[key] = obj[key]; + } + } + } + + newObj['default'] = obj; + + if (cache) { + cache.set(obj, newObj); + } + + return newObj; + } + + module.exports = _interopRequireWildcard; + + /***/ + }, + /* 472 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = __webpack_require__(473); + + /***/ + }, + /* 473 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(474); + var $Object = __webpack_require__(13).Object; + module.exports = function getOwnPropertyDescriptor(it, key) { + return $Object.getOwnPropertyDescriptor(it, key); + }; + + /***/ + }, + /* 474 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) + var toIObject = __webpack_require__(60); + var $getOwnPropertyDescriptor = __webpack_require__(211).f; + + __webpack_require__(214)('getOwnPropertyDescriptor', function () { + return function getOwnPropertyDescriptor(it, key) { + return $getOwnPropertyDescriptor(toIObject(it), key); + }; + }); + + /***/ + }, + /* 475 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = __webpack_require__(476); + + /***/ + }, + /* 476 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(477); + var $Object = __webpack_require__(13).Object; + module.exports = function defineProperty(it, key, desc) { + return $Object.defineProperty(it, key, desc); + }; + + /***/ + }, + /* 477 */ + /***/ function (module, exports, __webpack_require__) { + var $export = __webpack_require__(36); + // 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes) + $export($export.S + $export.F * !__webpack_require__(28), 'Object', { + defineProperty: __webpack_require__(30).f, + }); + + /***/ + }, + /* 478 */ + /***/ function (module, exports, __webpack_require__) { + var _Symbol$iterator = __webpack_require__(479); + + var _Symbol = __webpack_require__(490); + + function _typeof(obj) { + '@babel/helpers - typeof'; + + if (typeof _Symbol === 'function' && typeof _Symbol$iterator === 'symbol') { + module.exports = _typeof = function _typeof(obj) { + return typeof obj; + }; + } else { + module.exports = _typeof = function _typeof(obj) { + return obj && + typeof _Symbol === 'function' && + obj.constructor === _Symbol && + obj !== _Symbol.prototype + ? 'symbol' + : typeof obj; + }; + } + + return _typeof(obj); + } + + module.exports = _typeof; + + /***/ + }, + /* 479 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = __webpack_require__(480); + + /***/ + }, + /* 480 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(143); + __webpack_require__(151); + module.exports = __webpack_require__(152).f('iterator'); + + /***/ + }, + /* 481 */ + /***/ function (module, exports, __webpack_require__) { + var toInteger = __webpack_require__(144); + var defined = __webpack_require__(141); + // true -> String#at + // false -> String#codePointAt + module.exports = function (TO_STRING) { + return function (that, pos) { + var s = String(defined(that)); + var i = toInteger(pos); + var l = s.length; + var a, b; + if (i < 0 || i >= l) return TO_STRING ? '' : undefined; + a = s.charCodeAt(i); + return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff + ? TO_STRING + ? s.charAt(i) + : a + : TO_STRING + ? s.slice(i, i + 2) + : ((a - 0xd800) << 10) + (b - 0xdc00) + 0x10000; + }; + }; + + /***/ + }, + /* 482 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var create = __webpack_require__(147); + var descriptor = __webpack_require__(78); + var setToStringTag = __webpack_require__(104); + var IteratorPrototype = {}; + + // 25.1.2.1.1 %IteratorPrototype%[@@iterator]() + __webpack_require__(45)(IteratorPrototype, __webpack_require__(22)('iterator'), function () { + return this; + }); + + module.exports = function (Constructor, NAME, next) { + Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) }); + setToStringTag(Constructor, NAME + ' Iterator'); + }; + + /***/ + }, + /* 483 */ + /***/ function (module, exports, __webpack_require__) { + var dP = __webpack_require__(30); + var anObject = __webpack_require__(62); + var getKeys = __webpack_require__(80); + + module.exports = __webpack_require__(28) + ? Object.defineProperties + : function defineProperties(O, Properties) { + anObject(O); + var keys = getKeys(Properties); + var length = keys.length; + var i = 0; + var P; + while (length > i) dP.f(O, (P = keys[i++]), Properties[P]); + return O; + }; + + /***/ + }, + /* 484 */ + /***/ function (module, exports, __webpack_require__) { + // false -> Array#indexOf + // true -> Array#includes + var toIObject = __webpack_require__(60); + var toLength = __webpack_require__(102); + var toAbsoluteIndex = __webpack_require__(485); + module.exports = function (IS_INCLUDES) { + return function ($this, el, fromIndex) { + var O = toIObject($this); + var length = toLength(O.length); + var index = toAbsoluteIndex(fromIndex, length); + var value; + // Array#includes uses SameValueZero equality algorithm + // eslint-disable-next-line no-self-compare + if (IS_INCLUDES && el != el) + while (length > index) { + value = O[index++]; + // eslint-disable-next-line no-self-compare + if (value != value) return true; + // Array#indexOf ignores holes, Array#includes - not + } + else + for (; length > index; index++) + if (IS_INCLUDES || index in O) { + if (O[index] === el) return IS_INCLUDES || index || 0; + } + return !IS_INCLUDES && -1; + }; + }; + + /***/ + }, + /* 485 */ + /***/ function (module, exports, __webpack_require__) { + var toInteger = __webpack_require__(144); + var max = Math.max; + var min = Math.min; + module.exports = function (index, length) { + index = toInteger(index); + return index < 0 ? max(index + length, 0) : min(index, length); + }; + + /***/ + }, + /* 486 */ + /***/ function (module, exports, __webpack_require__) { + var document = __webpack_require__(29).document; + module.exports = document && document.documentElement; + + /***/ + }, + /* 487 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) + var has = __webpack_require__(44); + var toObject = __webpack_require__(69); + var IE_PROTO = __webpack_require__(148)('IE_PROTO'); + var ObjectProto = Object.prototype; + + module.exports = + Object.getPrototypeOf || + function (O) { + O = toObject(O); + if (has(O, IE_PROTO)) return O[IE_PROTO]; + if (typeof O.constructor == 'function' && O instanceof O.constructor) { + return O.constructor.prototype; + } + return O instanceof Object ? ObjectProto : null; + }; + + /***/ + }, + /* 488 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var addToUnscopables = __webpack_require__(489); + var step = __webpack_require__(217); + var Iterators = __webpack_require__(79); + var toIObject = __webpack_require__(60); + + // 22.1.3.4 Array.prototype.entries() + // 22.1.3.13 Array.prototype.keys() + // 22.1.3.29 Array.prototype.values() + // 22.1.3.30 Array.prototype[@@iterator]() + module.exports = __webpack_require__(145)( + Array, + 'Array', + function (iterated, kind) { + this._t = toIObject(iterated); // target + this._i = 0; // next index + this._k = kind; // kind + // 22.1.5.2.1 %ArrayIteratorPrototype%.next() + }, + function () { + var O = this._t; + var kind = this._k; + var index = this._i++; + if (!O || index >= O.length) { + this._t = undefined; + return step(1); + } + if (kind == 'keys') return step(0, index); + if (kind == 'values') return step(0, O[index]); + return step(0, [index, O[index]]); + }, + 'values', + ); + + // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) + Iterators.Arguments = Iterators.Array; + + addToUnscopables('keys'); + addToUnscopables('values'); + addToUnscopables('entries'); + + /***/ + }, + /* 489 */ + /***/ function (module, exports) { + module.exports = function () { + /* empty */ + }; + + /***/ + }, + /* 490 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = __webpack_require__(491); + + /***/ + }, + /* 491 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(492); + __webpack_require__(155); + __webpack_require__(495); + __webpack_require__(496); + module.exports = __webpack_require__(13).Symbol; + + /***/ + }, + /* 492 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // ECMAScript 6 symbols shim + var global = __webpack_require__(29); + var has = __webpack_require__(44); + var DESCRIPTORS = __webpack_require__(28); + var $export = __webpack_require__(36); + var redefine = __webpack_require__(146); + var META = __webpack_require__(81).KEY; + var $fails = __webpack_require__(61); + var shared = __webpack_require__(149); + var setToStringTag = __webpack_require__(104); + var uid = __webpack_require__(103); + var wks = __webpack_require__(22); + var wksExt = __webpack_require__(152); + var wksDefine = __webpack_require__(153); + var enumKeys = __webpack_require__(493); + var isArray = __webpack_require__(218); + var anObject = __webpack_require__(62); + var isObject = __webpack_require__(35); + var toObject = __webpack_require__(69); + var toIObject = __webpack_require__(60); + var toPrimitive = __webpack_require__(142); + var createDesc = __webpack_require__(78); + var _create = __webpack_require__(147); + var gOPNExt = __webpack_require__(494); + var $GOPD = __webpack_require__(211); + var $GOPS = __webpack_require__(154); + var $DP = __webpack_require__(30); + var $keys = __webpack_require__(80); + var gOPD = $GOPD.f; + var dP = $DP.f; + var gOPN = gOPNExt.f; + var $Symbol = global.Symbol; + var $JSON = global.JSON; + var _stringify = $JSON && $JSON.stringify; + var PROTOTYPE = 'prototype'; + var HIDDEN = wks('_hidden'); + var TO_PRIMITIVE = wks('toPrimitive'); + var isEnum = {}.propertyIsEnumerable; + var SymbolRegistry = shared('symbol-registry'); + var AllSymbols = shared('symbols'); + var OPSymbols = shared('op-symbols'); + var ObjectProto = Object[PROTOTYPE]; + var USE_NATIVE = typeof $Symbol == 'function' && !!$GOPS.f; + var QObject = global.QObject; + // Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173 + var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild; + + // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687 + var setSymbolDesc = + DESCRIPTORS && + $fails(function () { + return ( + _create( + dP({}, 'a', { + get: function () { + return dP(this, 'a', { value: 7 }).a; + }, + }), + ).a != 7 + ); + }) + ? function (it, key, D) { + var protoDesc = gOPD(ObjectProto, key); + if (protoDesc) delete ObjectProto[key]; + dP(it, key, D); + if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc); + } + : dP; + + var wrap = function (tag) { + var sym = (AllSymbols[tag] = _create($Symbol[PROTOTYPE])); + sym._k = tag; + return sym; + }; + + var isSymbol = + USE_NATIVE && typeof $Symbol.iterator == 'symbol' + ? function (it) { + return typeof it == 'symbol'; + } + : function (it) { + return it instanceof $Symbol; + }; + + var $defineProperty = function defineProperty(it, key, D) { + if (it === ObjectProto) $defineProperty(OPSymbols, key, D); + anObject(it); + key = toPrimitive(key, true); + anObject(D); + if (has(AllSymbols, key)) { + if (!D.enumerable) { + if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {})); + it[HIDDEN][key] = true; + } else { + if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false; + D = _create(D, { enumerable: createDesc(0, false) }); + } + return setSymbolDesc(it, key, D); + } + return dP(it, key, D); + }; + var $defineProperties = function defineProperties(it, P) { + anObject(it); + var keys = enumKeys((P = toIObject(P))); + var i = 0; + var l = keys.length; + var key; + while (l > i) $defineProperty(it, (key = keys[i++]), P[key]); + return it; + }; + var $create = function create(it, P) { + return P === undefined ? _create(it) : $defineProperties(_create(it), P); + }; + var $propertyIsEnumerable = function propertyIsEnumerable(key) { + var E = isEnum.call(this, (key = toPrimitive(key, true))); + if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false; + return E || !has(this, key) || !has(AllSymbols, key) || (has(this, HIDDEN) && this[HIDDEN][key]) + ? E + : true; + }; + var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) { + it = toIObject(it); + key = toPrimitive(key, true); + if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return; + var D = gOPD(it, key); + if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true; + return D; + }; + var $getOwnPropertyNames = function getOwnPropertyNames(it) { + var names = gOPN(toIObject(it)); + var result = []; + var i = 0; + var key; + while (names.length > i) { + if (!has(AllSymbols, (key = names[i++])) && key != HIDDEN && key != META) result.push(key); + } + return result; + }; + var $getOwnPropertySymbols = function getOwnPropertySymbols(it) { + var IS_OP = it === ObjectProto; + var names = gOPN(IS_OP ? OPSymbols : toIObject(it)); + var result = []; + var i = 0; + var key; + while (names.length > i) { + if (has(AllSymbols, (key = names[i++])) && (IS_OP ? has(ObjectProto, key) : true)) + result.push(AllSymbols[key]); + } + return result; + }; + + // 19.4.1.1 Symbol([description]) + if (!USE_NATIVE) { + $Symbol = function Symbol() { + if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!'); + var tag = uid(arguments.length > 0 ? arguments[0] : undefined); + var $set = function (value) { + if (this === ObjectProto) $set.call(OPSymbols, value); + if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false; + setSymbolDesc(this, tag, createDesc(1, value)); + }; + if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set }); + return wrap(tag); + }; + redefine($Symbol[PROTOTYPE], 'toString', function toString() { + return this._k; + }); + + $GOPD.f = $getOwnPropertyDescriptor; + $DP.f = $defineProperty; + __webpack_require__(219).f = gOPNExt.f = $getOwnPropertyNames; + __webpack_require__(100).f = $propertyIsEnumerable; + $GOPS.f = $getOwnPropertySymbols; + + if (DESCRIPTORS && !__webpack_require__(101)) { + redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true); + } + + wksExt.f = function (name) { + return wrap(wks(name)); + }; + } + + $export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol }); + + for ( + var es6Symbols = + // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14 + 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'.split( + ',', + ), + j = 0; + es6Symbols.length > j; + + ) + wks(es6Symbols[j++]); + + for (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k; ) + wksDefine(wellKnownSymbols[k++]); + + $export($export.S + $export.F * !USE_NATIVE, 'Symbol', { + // 19.4.2.1 Symbol.for(key) + for: function (key) { + return has(SymbolRegistry, (key += '')) + ? SymbolRegistry[key] + : (SymbolRegistry[key] = $Symbol(key)); + }, + // 19.4.2.5 Symbol.keyFor(sym) + keyFor: function keyFor(sym) { + if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!'); + for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key; + }, + useSetter: function () { + setter = true; + }, + useSimple: function () { + setter = false; + }, + }); + + $export($export.S + $export.F * !USE_NATIVE, 'Object', { + // 19.1.2.2 Object.create(O [, Properties]) + create: $create, + // 19.1.2.4 Object.defineProperty(O, P, Attributes) + defineProperty: $defineProperty, + // 19.1.2.3 Object.defineProperties(O, Properties) + defineProperties: $defineProperties, + // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) + getOwnPropertyDescriptor: $getOwnPropertyDescriptor, + // 19.1.2.7 Object.getOwnPropertyNames(O) + getOwnPropertyNames: $getOwnPropertyNames, + // 19.1.2.8 Object.getOwnPropertySymbols(O) + getOwnPropertySymbols: $getOwnPropertySymbols, + }); + + // Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives + // https://bugs.chromium.org/p/v8/issues/detail?id=3443 + var FAILS_ON_PRIMITIVES = $fails(function () { + $GOPS.f(1); + }); + + $export($export.S + $export.F * FAILS_ON_PRIMITIVES, 'Object', { + getOwnPropertySymbols: function getOwnPropertySymbols(it) { + return $GOPS.f(toObject(it)); + }, + }); + + // 24.3.2 JSON.stringify(value [, replacer [, space]]) + $JSON && + $export( + $export.S + + $export.F * + (!USE_NATIVE || + $fails(function () { + var S = $Symbol(); + // MS Edge converts symbol values to JSON as {} + // WebKit converts symbol values to JSON as null + // V8 throws on boxed symbols + return ( + _stringify([S]) != '[null]' || + _stringify({ a: S }) != '{}' || + _stringify(Object(S)) != '{}' + ); + })), + 'JSON', + { + stringify: function stringify(it) { + var args = [it]; + var i = 1; + var replacer, $replacer; + while (arguments.length > i) args.push(arguments[i++]); + $replacer = replacer = args[1]; + if ((!isObject(replacer) && it === undefined) || isSymbol(it)) return; // IE8 returns string on undefined + if (!isArray(replacer)) + replacer = function (key, value) { + if (typeof $replacer == 'function') value = $replacer.call(this, key, value); + if (!isSymbol(value)) return value; + }; + args[1] = replacer; + return _stringify.apply($JSON, args); + }, + }, + ); + + // 19.4.3.4 Symbol.prototype[@@toPrimitive](hint) + $Symbol[PROTOTYPE][TO_PRIMITIVE] || + __webpack_require__(45)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf); + // 19.4.3.5 Symbol.prototype[@@toStringTag] + setToStringTag($Symbol, 'Symbol'); + // 20.2.1.9 Math[@@toStringTag] + setToStringTag(Math, 'Math', true); + // 24.3.3 JSON[@@toStringTag] + setToStringTag(global.JSON, 'JSON', true); + + /***/ + }, + /* 493 */ + /***/ function (module, exports, __webpack_require__) { + // all enumerable object keys, includes symbols + var getKeys = __webpack_require__(80); + var gOPS = __webpack_require__(154); + var pIE = __webpack_require__(100); + module.exports = function (it) { + var result = getKeys(it); + var getSymbols = gOPS.f; + if (getSymbols) { + var symbols = getSymbols(it); + var isEnum = pIE.f; + var i = 0; + var key; + while (symbols.length > i) if (isEnum.call(it, (key = symbols[i++]))) result.push(key); + } + return result; + }; + + /***/ + }, + /* 494 */ + /***/ function (module, exports, __webpack_require__) { + // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window + var toIObject = __webpack_require__(60); + var gOPN = __webpack_require__(219).f; + var toString = {}.toString; + + var windowNames = + typeof window == 'object' && window && Object.getOwnPropertyNames + ? Object.getOwnPropertyNames(window) + : []; + + var getWindowNames = function (it) { + try { + return gOPN(it); + } catch (e) { + return windowNames.slice(); + } + }; + + module.exports.f = function getOwnPropertyNames(it) { + return windowNames && toString.call(it) == '[object Window]' + ? getWindowNames(it) + : gOPN(toIObject(it)); + }; + + /***/ + }, + /* 495 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(153)('asyncIterator'); + + /***/ + }, + /* 496 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(153)('observable'); + + /***/ + }, + /* 497 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = __webpack_require__(498); + + /***/ + }, + /* 498 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(155); + __webpack_require__(151); + __webpack_require__(499); + __webpack_require__(503); + __webpack_require__(504); + module.exports = __webpack_require__(13).WeakMap; + + /***/ + }, + /* 499 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var global = __webpack_require__(29); + var each = __webpack_require__(156)(0); + var redefine = __webpack_require__(146); + var meta = __webpack_require__(81); + var assign = __webpack_require__(220); + var weak = __webpack_require__(502); + var isObject = __webpack_require__(35); + var validate = __webpack_require__(83); + var NATIVE_WEAK_MAP = __webpack_require__(83); + var IS_IE11 = !global.ActiveXObject && 'ActiveXObject' in global; + var WEAK_MAP = 'WeakMap'; + var getWeak = meta.getWeak; + var isExtensible = Object.isExtensible; + var uncaughtFrozenStore = weak.ufstore; + var InternalMap; + + var wrapper = function (get) { + return function WeakMap() { + return get(this, arguments.length > 0 ? arguments[0] : undefined); + }; + }; + + var methods = { + // 23.3.3.3 WeakMap.prototype.get(key) + get: function get(key) { + if (isObject(key)) { + var data = getWeak(key); + if (data === true) return uncaughtFrozenStore(validate(this, WEAK_MAP)).get(key); + return data ? data[this._i] : undefined; + } + }, + // 23.3.3.5 WeakMap.prototype.set(key, value) + set: function set(key, value) { + return weak.def(validate(this, WEAK_MAP), key, value); + }, + }; + + // 23.3 WeakMap Objects + var $WeakMap = (module.exports = __webpack_require__(225)( + WEAK_MAP, + wrapper, + methods, + weak, + true, + true, + )); + + // IE11 WeakMap frozen keys fix + if (NATIVE_WEAK_MAP && IS_IE11) { + InternalMap = weak.getConstructor(wrapper, WEAK_MAP); + assign(InternalMap.prototype, methods); + meta.NEED = true; + each(['delete', 'has', 'get', 'set'], function (key) { + var proto = $WeakMap.prototype; + var method = proto[key]; + redefine(proto, key, function (a, b) { + // store frozen objects on internal weakmap shim + if (isObject(a) && !isExtensible(a)) { + if (!this._f) this._f = new InternalMap(); + var result = this._f[key](a, b); + return key == 'set' ? this : result; + // store all the rest on native weakmap + } + return method.call(this, a, b); + }); + }); + } + + /***/ + }, + /* 500 */ + /***/ function (module, exports, __webpack_require__) { + // 9.4.2.3 ArraySpeciesCreate(originalArray, length) + var speciesConstructor = __webpack_require__(501); + + module.exports = function (original, length) { + return new (speciesConstructor(original))(length); + }; + + /***/ + }, + /* 501 */ + /***/ function (module, exports, __webpack_require__) { + var isObject = __webpack_require__(35); + var isArray = __webpack_require__(218); + var SPECIES = __webpack_require__(22)('species'); + + module.exports = function (original) { + var C; + if (isArray(original)) { + C = original.constructor; + // cross-realm fallback + if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined; + if (isObject(C)) { + C = C[SPECIES]; + if (C === null) C = undefined; + } + } + return C === undefined ? Array : C; + }; + + /***/ + }, + /* 502 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var redefineAll = __webpack_require__(157); + var getWeak = __webpack_require__(81).getWeak; + var anObject = __webpack_require__(62); + var isObject = __webpack_require__(35); + var anInstance = __webpack_require__(158); + var forOf = __webpack_require__(82); + var createArrayMethod = __webpack_require__(156); + var $has = __webpack_require__(44); + var validate = __webpack_require__(83); + var arrayFind = createArrayMethod(5); + var arrayFindIndex = createArrayMethod(6); + var id = 0; + + // fallback for uncaught frozen keys + var uncaughtFrozenStore = function (that) { + return that._l || (that._l = new UncaughtFrozenStore()); + }; + var UncaughtFrozenStore = function () { + this.a = []; + }; + var findUncaughtFrozen = function (store, key) { + return arrayFind(store.a, function (it) { + return it[0] === key; + }); + }; + UncaughtFrozenStore.prototype = { + get: function (key) { + var entry = findUncaughtFrozen(this, key); + if (entry) return entry[1]; + }, + has: function (key) { + return !!findUncaughtFrozen(this, key); + }, + set: function (key, value) { + var entry = findUncaughtFrozen(this, key); + if (entry) entry[1] = value; + else this.a.push([key, value]); + }, + delete: function (key) { + var index = arrayFindIndex(this.a, function (it) { + return it[0] === key; + }); + if (~index) this.a.splice(index, 1); + return !!~index; + }, + }; + + module.exports = { + getConstructor: function (wrapper, NAME, IS_MAP, ADDER) { + var C = wrapper(function (that, iterable) { + anInstance(that, C, NAME, '_i'); + that._t = NAME; // collection type + that._i = id++; // collection id + that._l = undefined; // leak store for uncaught frozen objects + if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that); + }); + redefineAll(C.prototype, { + // 23.3.3.2 WeakMap.prototype.delete(key) + // 23.4.3.3 WeakSet.prototype.delete(value) + delete: function (key) { + if (!isObject(key)) return false; + var data = getWeak(key); + if (data === true) return uncaughtFrozenStore(validate(this, NAME))['delete'](key); + return data && $has(data, this._i) && delete data[this._i]; + }, + // 23.3.3.4 WeakMap.prototype.has(key) + // 23.4.3.4 WeakSet.prototype.has(value) + has: function has(key) { + if (!isObject(key)) return false; + var data = getWeak(key); + if (data === true) return uncaughtFrozenStore(validate(this, NAME)).has(key); + return data && $has(data, this._i); + }, + }); + return C; + }, + def: function (that, key, value) { + var data = getWeak(anObject(key), true); + if (data === true) uncaughtFrozenStore(that).set(key, value); + else data[that._i] = value; + return that; + }, + ufstore: uncaughtFrozenStore, + }; + + /***/ + }, + /* 503 */ + /***/ function (module, exports, __webpack_require__) { + // https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.of + __webpack_require__(226)('WeakMap'); + + /***/ + }, + /* 504 */ + /***/ function (module, exports, __webpack_require__) { + // https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.from + __webpack_require__(227)('WeakMap'); + + /***/ + }, + /* 505 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(506); + module.exports = __webpack_require__(13).Object.assign; + + /***/ + }, + /* 506 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.3.1 Object.assign(target, source) + var $export = __webpack_require__(36); + + $export($export.S + $export.F, 'Object', { assign: __webpack_require__(220) }); + + /***/ + }, + /* 507 */ + /***/ function (module, exports, __webpack_require__) { + var core = __webpack_require__(13); + var $JSON = core.JSON || (core.JSON = { stringify: JSON.stringify }); + module.exports = function stringify(it) { + // eslint-disable-line no-unused-vars + return $JSON.stringify.apply($JSON, arguments); + }; + + /***/ + }, + /* 508 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(509); + module.exports = __webpack_require__(13).Object.keys; + + /***/ + }, + /* 509 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.14 Object.keys(O) + var toObject = __webpack_require__(69); + var $keys = __webpack_require__(80); + + __webpack_require__(214)('keys', function () { + return function keys(it) { + return $keys(toObject(it)); + }; + }); + + /***/ + }, + /* 510 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** @license React v16.12.0 + * react-dom.development.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + + if (true) { + (function () { + 'use strict'; + + var React = __webpack_require__(1); + var _assign = __webpack_require__(63); + var Scheduler = __webpack_require__(512); + var checkPropTypes = __webpack_require__(106); + var tracing = __webpack_require__(514); + + // Do not require this module directly! Use normal `invariant` calls with + // template literal strings. The messages will be replaced with error codes + // during build. + + /** + * Use invariant() to assert state which your program assumes to be true. + * + * Provide sprintf-style format (only %s is supported) and arguments + * to provide information about what broke and what you were + * expecting. + * + * The invariant message will be stripped in production, but the invariant + * will remain to ensure logic does not differ in production. + */ + + if (!React) { + { + throw Error( + 'ReactDOM was loaded before React. Make sure you load the React package before loading ReactDOM.', + ); + } + } + + /** + * Injectable ordering of event plugins. + */ + var eventPluginOrder = null; + /** + * Injectable mapping from names to event plugin modules. + */ + + var namesToPlugins = {}; + /** + * Recomputes the plugin list using the injected plugins and plugin ordering. + * + * @private + */ + + function recomputePluginOrdering() { + if (!eventPluginOrder) { + // Wait until an `eventPluginOrder` is injected. + return; + } + + for (var pluginName in namesToPlugins) { + var pluginModule = namesToPlugins[pluginName]; + var pluginIndex = eventPluginOrder.indexOf(pluginName); + + if (!(pluginIndex > -1)) { + { + throw Error( + 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `' + + pluginName + + '`.', + ); + } + } + + if (plugins[pluginIndex]) { + continue; + } + + if (!pluginModule.extractEvents) { + { + throw Error( + 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `' + + pluginName + + '` does not.', + ); + } + } + + plugins[pluginIndex] = pluginModule; + var publishedEvents = pluginModule.eventTypes; + + for (var eventName in publishedEvents) { + if (!publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName)) { + { + throw Error( + 'EventPluginRegistry: Failed to publish event `' + + eventName + + '` for plugin `' + + pluginName + + '`.', + ); + } + } + } + } + } + /** + * Publishes an event so that it can be dispatched by the supplied plugin. + * + * @param {object} dispatchConfig Dispatch configuration for the event. + * @param {object} PluginModule Plugin publishing the event. + * @return {boolean} True if the event was successfully published. + * @private + */ + + function publishEventForPlugin(dispatchConfig, pluginModule, eventName) { + if (!!eventNameDispatchConfigs.hasOwnProperty(eventName)) { + { + throw Error( + 'EventPluginHub: More than one plugin attempted to publish the same event name, `' + + eventName + + '`.', + ); + } + } + + eventNameDispatchConfigs[eventName] = dispatchConfig; + var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames; + + if (phasedRegistrationNames) { + for (var phaseName in phasedRegistrationNames) { + if (phasedRegistrationNames.hasOwnProperty(phaseName)) { + var phasedRegistrationName = phasedRegistrationNames[phaseName]; + publishRegistrationName(phasedRegistrationName, pluginModule, eventName); + } + } + + return true; + } else if (dispatchConfig.registrationName) { + publishRegistrationName(dispatchConfig.registrationName, pluginModule, eventName); + return true; + } + + return false; + } + /** + * Publishes a registration name that is used to identify dispatched events. + * + * @param {string} registrationName Registration name to add. + * @param {object} PluginModule Plugin publishing the event. + * @private + */ + + function publishRegistrationName(registrationName, pluginModule, eventName) { + if (!!registrationNameModules[registrationName]) { + { + throw Error( + 'EventPluginHub: More than one plugin attempted to publish the same registration name, `' + + registrationName + + '`.', + ); + } + } + + registrationNameModules[registrationName] = pluginModule; + registrationNameDependencies[registrationName] = pluginModule.eventTypes[eventName].dependencies; + + { + var lowerCasedName = registrationName.toLowerCase(); + possibleRegistrationNames[lowerCasedName] = registrationName; + + if (registrationName === 'onDoubleClick') { + possibleRegistrationNames.ondblclick = registrationName; + } + } + } + /** + * Registers plugins so that they can extract and dispatch events. + * + * @see {EventPluginHub} + */ + + /** + * Ordered list of injected plugins. + */ + + var plugins = []; + /** + * Mapping from event name to dispatch config + */ + + var eventNameDispatchConfigs = {}; + /** + * Mapping from registration name to plugin module + */ + + var registrationNameModules = {}; + /** + * Mapping from registration name to event name + */ + + var registrationNameDependencies = {}; + /** + * Mapping from lowercase registration names to the properly cased version, + * used to warn in the case of missing event handlers. Available + * only in true. + * @type {Object} + */ + + var possibleRegistrationNames = {}; // Trust the developer to only use possibleRegistrationNames in true + + /** + * Injects an ordering of plugins (by plugin name). This allows the ordering + * to be decoupled from injection of the actual plugins so that ordering is + * always deterministic regardless of packaging, on-the-fly injection, etc. + * + * @param {array} InjectedEventPluginOrder + * @internal + * @see {EventPluginHub.injection.injectEventPluginOrder} + */ + + function injectEventPluginOrder(injectedEventPluginOrder) { + if (!!eventPluginOrder) { + { + throw Error( + 'EventPluginRegistry: Cannot inject event plugin ordering more than once. You are likely trying to load more than one copy of React.', + ); + } + } // Clone the ordering so it cannot be dynamically mutated. + + eventPluginOrder = Array.prototype.slice.call(injectedEventPluginOrder); + recomputePluginOrdering(); + } + /** + * Injects plugins to be used by `EventPluginHub`. The plugin names must be + * in the ordering injected by `injectEventPluginOrder`. + * + * Plugins can be injected as part of page initialization or on-the-fly. + * + * @param {object} injectedNamesToPlugins Map from names to plugin modules. + * @internal + * @see {EventPluginHub.injection.injectEventPluginsByName} + */ + + function injectEventPluginsByName(injectedNamesToPlugins) { + var isOrderingDirty = false; + + for (var pluginName in injectedNamesToPlugins) { + if (!injectedNamesToPlugins.hasOwnProperty(pluginName)) { + continue; + } + + var pluginModule = injectedNamesToPlugins[pluginName]; + + if (!namesToPlugins.hasOwnProperty(pluginName) || namesToPlugins[pluginName] !== pluginModule) { + if (!!namesToPlugins[pluginName]) { + { + throw Error( + 'EventPluginRegistry: Cannot inject two different event plugins using the same name, `' + + pluginName + + '`.', + ); + } + } + + namesToPlugins[pluginName] = pluginModule; + isOrderingDirty = true; + } + } + + if (isOrderingDirty) { + recomputePluginOrdering(); + } + } + + var invokeGuardedCallbackImpl = function (name, func, context, a, b, c, d, e, f) { + var funcArgs = Array.prototype.slice.call(arguments, 3); + + try { + func.apply(context, funcArgs); + } catch (error) { + this.onError(error); + } + }; + + { + // In DEV mode, we swap out invokeGuardedCallback for a special version + // that plays more nicely with the browser's DevTools. The idea is to preserve + // "Pause on exceptions" behavior. Because React wraps all user-provided + // functions in invokeGuardedCallback, and the production version of + // invokeGuardedCallback uses a try-catch, all user exceptions are treated + // like caught exceptions, and the DevTools won't pause unless the developer + // takes the extra step of enabling pause on caught exceptions. This is + // unintuitive, though, because even though React has caught the error, from + // the developer's perspective, the error is uncaught. + // + // To preserve the expected "Pause on exceptions" behavior, we don't use a + // try-catch in DEV. Instead, we synchronously dispatch a fake event to a fake + // DOM node, and call the user-provided callback from inside an event handler + // for that fake event. If the callback throws, the error is "captured" using + // a global event handler. But because the error happens in a different + // event loop context, it does not interrupt the normal program flow. + // Effectively, this gives us try-catch behavior without actually using + // try-catch. Neat! + // Check that the browser supports the APIs we need to implement our special + // DEV version of invokeGuardedCallback + if ( + typeof window !== 'undefined' && + typeof window.dispatchEvent === 'function' && + typeof document !== 'undefined' && + typeof document.createEvent === 'function' + ) { + var fakeNode = document.createElement('react'); + + var invokeGuardedCallbackDev = function (name, func, context, a, b, c, d, e, f) { + // If document doesn't exist we know for sure we will crash in this method + // when we call document.createEvent(). However this can cause confusing + // errors: https://github.com/facebookincubator/create-react-app/issues/3482 + // So we preemptively throw with a better message instead. + if (!(typeof document !== 'undefined')) { + { + throw Error( + 'The `document` global was defined when React was initialized, but is not defined anymore. This can happen in a test environment if a component schedules an update from an asynchronous callback, but the test has already finished running. To solve this, you can either unmount the component at the end of your test (and ensure that any asynchronous operations get canceled in `componentWillUnmount`), or you can change the test itself to be asynchronous.', + ); + } + } + + var evt = document.createEvent('Event'); // Keeps track of whether the user-provided callback threw an error. We + // set this to true at the beginning, then set it to false right after + // calling the function. If the function errors, `didError` will never be + // set to false. This strategy works even if the browser is flaky and + // fails to call our global error handler, because it doesn't rely on + // the error event at all. + + var didError = true; // Keeps track of the value of window.event so that we can reset it + // during the callback to let user code access window.event in the + // browsers that support it. + + var windowEvent = window.event; // Keeps track of the descriptor of window.event to restore it after event + // dispatching: https://github.com/facebook/react/issues/13688 + + var windowEventDescriptor = Object.getOwnPropertyDescriptor(window, 'event'); // Create an event handler for our fake event. We will synchronously + // dispatch our fake event using `dispatchEvent`. Inside the handler, we + // call the user-provided callback. + + var funcArgs = Array.prototype.slice.call(arguments, 3); + + function callCallback() { + // We immediately remove the callback from event listeners so that + // nested `invokeGuardedCallback` calls do not clash. Otherwise, a + // nested call would trigger the fake event handlers of any call higher + // in the stack. + fakeNode.removeEventListener(evtType, callCallback, false); // We check for window.hasOwnProperty('event') to prevent the + // window.event assignment in both IE <= 10 as they throw an error + // "Member not found" in strict mode, and in Firefox which does not + // support window.event. + + if (typeof window.event !== 'undefined' && window.hasOwnProperty('event')) { + window.event = windowEvent; + } + + func.apply(context, funcArgs); + didError = false; + } // Create a global error event handler. We use this to capture the value + // that was thrown. It's possible that this error handler will fire more + // than once; for example, if non-React code also calls `dispatchEvent` + // and a handler for that event throws. We should be resilient to most of + // those cases. Even if our error event handler fires more than once, the + // last error event is always used. If the callback actually does error, + // we know that the last error event is the correct one, because it's not + // possible for anything else to have happened in between our callback + // erroring and the code that follows the `dispatchEvent` call below. If + // the callback doesn't error, but the error event was fired, we know to + // ignore it because `didError` will be false, as described above. + + var error; // Use this to track whether the error event is ever called. + + var didSetError = false; + var isCrossOriginError = false; + + function handleWindowError(event) { + error = event.error; + didSetError = true; + + if (error === null && event.colno === 0 && event.lineno === 0) { + isCrossOriginError = true; + } + + if (event.defaultPrevented) { + // Some other error handler has prevented default. + // Browsers silence the error report if this happens. + // We'll remember this to later decide whether to log it or not. + if (error != null && typeof error === 'object') { + try { + error._suppressLogging = true; + } catch (inner) { + // Ignore. + } + } + } + } // Create a fake event type. + + var evtType = 'react-' + (name ? name : 'invokeguardedcallback'); // Attach our event handlers + + window.addEventListener('error', handleWindowError); + fakeNode.addEventListener(evtType, callCallback, false); // Synchronously dispatch our fake event. If the user-provided function + // errors, it will trigger our global error handler. + + evt.initEvent(evtType, false, false); + fakeNode.dispatchEvent(evt); + + if (windowEventDescriptor) { + Object.defineProperty(window, 'event', windowEventDescriptor); + } + + if (didError) { + if (!didSetError) { + // The callback errored, but the error event never fired. + error = new Error( + 'An error was thrown inside one of your components, but React ' + + "doesn't know what it was. This is likely due to browser " + + 'flakiness. React does its best to preserve the "Pause on ' + + 'exceptions" behavior of the DevTools, which requires some ' + + "DEV-mode only tricks. It's possible that these don't work in " + + 'your browser. Try triggering the error in production mode, ' + + 'or switching to a modern browser. If you suspect that this is ' + + 'actually an issue with React, please file an issue.', + ); + } else if (isCrossOriginError) { + error = new Error( + "A cross-origin error was thrown. React doesn't have access to " + + 'the actual error object in development. ' + + 'See https://fb.me/react-crossorigin-error for more information.', + ); + } + + this.onError(error); + } // Remove our event listeners + + window.removeEventListener('error', handleWindowError); + }; + + invokeGuardedCallbackImpl = invokeGuardedCallbackDev; + } + } + + var invokeGuardedCallbackImpl$1 = invokeGuardedCallbackImpl; + + var hasError = false; + var caughtError = null; // Used by event system to capture/rethrow the first error. + + var hasRethrowError = false; + var rethrowError = null; + var reporter = { + onError: function (error) { + hasError = true; + caughtError = error; + }, + }; + /** + * Call a function while guarding against errors that happens within it. + * Returns an error if it throws, otherwise null. + * + * In production, this is implemented using a try-catch. The reason we don't + * use a try-catch directly is so that we can swap out a different + * implementation in DEV mode. + * + * @param {String} name of the guard to use for logging or debugging + * @param {Function} func The function to invoke + * @param {*} context The context to use when calling the function + * @param {...*} args Arguments for function + */ + + function invokeGuardedCallback(name, func, context, a, b, c, d, e, f) { + hasError = false; + caughtError = null; + invokeGuardedCallbackImpl$1.apply(reporter, arguments); + } + /** + * Same as invokeGuardedCallback, but instead of returning an error, it stores + * it in a global so it can be rethrown by `rethrowCaughtError` later. + * TODO: See if caughtError and rethrowError can be unified. + * + * @param {String} name of the guard to use for logging or debugging + * @param {Function} func The function to invoke + * @param {*} context The context to use when calling the function + * @param {...*} args Arguments for function + */ + + function invokeGuardedCallbackAndCatchFirstError(name, func, context, a, b, c, d, e, f) { + invokeGuardedCallback.apply(this, arguments); + + if (hasError) { + var error = clearCaughtError(); + + if (!hasRethrowError) { + hasRethrowError = true; + rethrowError = error; + } + } + } + /** + * During execution of guarded functions we will capture the first error which + * we will rethrow to be handled by the top level error handler. + */ + + function rethrowCaughtError() { + if (hasRethrowError) { + var error = rethrowError; + hasRethrowError = false; + rethrowError = null; + throw error; + } + } + function hasCaughtError() { + return hasError; + } + function clearCaughtError() { + if (hasError) { + var error = caughtError; + hasError = false; + caughtError = null; + return error; + } else { + { + { + throw Error( + 'clearCaughtError was called but no error was captured. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + } + } + + /** + * Similar to invariant but only logs a warning if the condition is not met. + * This can be used to log issues in development environments in critical + * paths. Removing the logging code for production environments will keep the + * same logic and follow the same code paths. + */ + var warningWithoutStack = function () {}; + + { + warningWithoutStack = function (condition, format) { + for ( + var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; + _key < _len; + _key++ + ) { + args[_key - 2] = arguments[_key]; + } + + if (format === undefined) { + throw new Error( + '`warningWithoutStack(condition, format, ...args)` requires a warning ' + + 'message argument', + ); + } + + if (args.length > 8) { + // Check before the condition to catch violations early. + throw new Error('warningWithoutStack() currently supports at most 8 arguments.'); + } + + if (condition) { + return; + } + + if (typeof console !== 'undefined') { + var argsWithFormat = args.map(function (item) { + return '' + item; + }); + argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it + // breaks IE9: https://github.com/facebook/react/issues/13610 + + Function.prototype.apply.call(console.error, console, argsWithFormat); + } + + try { + // --- Welcome to debugging React --- + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + var argIndex = 0; + var message = + 'Warning: ' + + format.replace(/%s/g, function () { + return args[argIndex++]; + }); + throw new Error(message); + } catch (x) {} + }; + } + + var warningWithoutStack$1 = warningWithoutStack; + + var getFiberCurrentPropsFromNode = null; + var getInstanceFromNode = null; + var getNodeFromInstance = null; + function setComponentTree( + getFiberCurrentPropsFromNodeImpl, + getInstanceFromNodeImpl, + getNodeFromInstanceImpl, + ) { + getFiberCurrentPropsFromNode = getFiberCurrentPropsFromNodeImpl; + getInstanceFromNode = getInstanceFromNodeImpl; + getNodeFromInstance = getNodeFromInstanceImpl; + + { + !(getNodeFromInstance && getInstanceFromNode) + ? warningWithoutStack$1( + false, + 'EventPluginUtils.setComponentTree(...): Injected ' + + 'module is missing getNodeFromInstance or getInstanceFromNode.', + ) + : void 0; + } + } + var validateEventDispatches; + + { + validateEventDispatches = function (event) { + var dispatchListeners = event._dispatchListeners; + var dispatchInstances = event._dispatchInstances; + var listenersIsArr = Array.isArray(dispatchListeners); + var listenersLen = listenersIsArr ? dispatchListeners.length : dispatchListeners ? 1 : 0; + var instancesIsArr = Array.isArray(dispatchInstances); + var instancesLen = instancesIsArr ? dispatchInstances.length : dispatchInstances ? 1 : 0; + !(instancesIsArr === listenersIsArr && instancesLen === listenersLen) + ? warningWithoutStack$1(false, 'EventPluginUtils: Invalid `event`.') + : void 0; + }; + } + /** + * Dispatch the event to the listener. + * @param {SyntheticEvent} event SyntheticEvent to handle + * @param {function} listener Application-level callback + * @param {*} inst Internal component instance + */ + + function executeDispatch(event, listener, inst) { + var type = event.type || 'unknown-event'; + event.currentTarget = getNodeFromInstance(inst); + invokeGuardedCallbackAndCatchFirstError(type, listener, undefined, event); + event.currentTarget = null; + } + /** + * Standard/simple iteration through an event's collected dispatches. + */ + + function executeDispatchesInOrder(event) { + var dispatchListeners = event._dispatchListeners; + var dispatchInstances = event._dispatchInstances; + + { + validateEventDispatches(event); + } + + if (Array.isArray(dispatchListeners)) { + for (var i = 0; i < dispatchListeners.length; i++) { + if (event.isPropagationStopped()) { + break; + } // Listeners and Instances are two parallel arrays that are always in sync. + + executeDispatch(event, dispatchListeners[i], dispatchInstances[i]); + } + } else if (dispatchListeners) { + executeDispatch(event, dispatchListeners, dispatchInstances); + } + + event._dispatchListeners = null; + event._dispatchInstances = null; + } + /** + * @see executeDispatchesInOrderStopAtTrueImpl + */ + + /** + * Execution of a "direct" dispatch - there must be at most one dispatch + * accumulated on the event or it is considered an error. It doesn't really make + * sense for an event with multiple dispatches (bubbled) to keep track of the + * return values at each dispatch execution, but it does tend to make sense when + * dealing with "direct" dispatches. + * + * @return {*} The return value of executing the single dispatch. + */ + + /** + * @param {SyntheticEvent} event + * @return {boolean} True iff number of dispatches accumulated is greater than 0. + */ + + /** + * Accumulates items that must not be null or undefined into the first one. This + * is used to conserve memory by avoiding array allocations, and thus sacrifices + * API cleanness. Since `current` can be null before being passed in and not + * null after this function, make sure to assign it back to `current`: + * + * `a = accumulateInto(a, b);` + * + * This API should be sparingly used. Try `accumulate` for something cleaner. + * + * @return {*|array<*>} An accumulation of items. + */ + + function accumulateInto(current, next) { + if (!(next != null)) { + { + throw Error('accumulateInto(...): Accumulated items must not be null or undefined.'); + } + } + + if (current == null) { + return next; + } // Both are not empty. Warning: Never call x.concat(y) when you are not + // certain that x is an Array (x could be a string with concat method). + + if (Array.isArray(current)) { + if (Array.isArray(next)) { + current.push.apply(current, next); + return current; + } + + current.push(next); + return current; + } + + if (Array.isArray(next)) { + // A bit too dangerous to mutate `next`. + return [current].concat(next); + } + + return [current, next]; + } + + /** + * @param {array} arr an "accumulation" of items which is either an Array or + * a single item. Useful when paired with the `accumulate` module. This is a + * simple utility that allows us to reason about a collection of items, but + * handling the case when there is exactly one item (and we do not need to + * allocate an array). + * @param {function} cb Callback invoked with each element or a collection. + * @param {?} [scope] Scope used as `this` in a callback. + */ + function forEachAccumulated(arr, cb, scope) { + if (Array.isArray(arr)) { + arr.forEach(cb, scope); + } else if (arr) { + cb.call(scope, arr); + } + } + + /** + * Internal queue of events that have accumulated their dispatches and are + * waiting to have their dispatches executed. + */ + + var eventQueue = null; + /** + * Dispatches an event and releases it back into the pool, unless persistent. + * + * @param {?object} event Synthetic event to be dispatched. + * @private + */ + + var executeDispatchesAndRelease = function (event) { + if (event) { + executeDispatchesInOrder(event); + + if (!event.isPersistent()) { + event.constructor.release(event); + } + } + }; + + var executeDispatchesAndReleaseTopLevel = function (e) { + return executeDispatchesAndRelease(e); + }; + + function runEventsInBatch(events) { + if (events !== null) { + eventQueue = accumulateInto(eventQueue, events); + } // Set `eventQueue` to null before processing it so that we can tell if more + // events get enqueued while processing. + + var processingEventQueue = eventQueue; + eventQueue = null; + + if (!processingEventQueue) { + return; + } + + forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseTopLevel); + + if (!!eventQueue) { + { + throw Error( + 'processEventQueue(): Additional events were enqueued while processing an event queue. Support for this has not yet been implemented.', + ); + } + } // This would be a good time to rethrow if any of the event handlers threw. + + rethrowCaughtError(); + } + + function isInteractive(tag) { + return tag === 'button' || tag === 'input' || tag === 'select' || tag === 'textarea'; + } + + function shouldPreventMouseEvent(name, type, props) { + switch (name) { + case 'onClick': + case 'onClickCapture': + case 'onDoubleClick': + case 'onDoubleClickCapture': + case 'onMouseDown': + case 'onMouseDownCapture': + case 'onMouseMove': + case 'onMouseMoveCapture': + case 'onMouseUp': + case 'onMouseUpCapture': + return !!(props.disabled && isInteractive(type)); + + default: + return false; + } + } + /** + * This is a unified interface for event plugins to be installed and configured. + * + * Event plugins can implement the following properties: + * + * `extractEvents` {function(string, DOMEventTarget, string, object): *} + * Required. When a top-level event is fired, this method is expected to + * extract synthetic events that will in turn be queued and dispatched. + * + * `eventTypes` {object} + * Optional, plugins that fire events must publish a mapping of registration + * names that are used to register listeners. Values of this mapping must + * be objects that contain `registrationName` or `phasedRegistrationNames`. + * + * `executeDispatch` {function(object, function, string)} + * Optional, allows plugins to override how an event gets dispatched. By + * default, the listener is simply invoked. + * + * Each plugin that is injected into `EventsPluginHub` is immediately operable. + * + * @public + */ + + /** + * Methods for injecting dependencies. + */ + + var injection = { + /** + * @param {array} InjectedEventPluginOrder + * @public + */ + injectEventPluginOrder: injectEventPluginOrder, + + /** + * @param {object} injectedNamesToPlugins Map from names to plugin modules. + */ + injectEventPluginsByName: injectEventPluginsByName, + }; + /** + * @param {object} inst The instance, which is the source of events. + * @param {string} registrationName Name of listener (e.g. `onClick`). + * @return {?function} The stored callback. + */ + + function getListener(inst, registrationName) { + var listener; // TODO: shouldPreventMouseEvent is DOM-specific and definitely should not + // live here; needs to be moved to a better place soon + + var stateNode = inst.stateNode; + + if (!stateNode) { + // Work in progress (ex: onload events in incremental mode). + return null; + } + + var props = getFiberCurrentPropsFromNode(stateNode); + + if (!props) { + // Work in progress. + return null; + } + + listener = props[registrationName]; + + if (shouldPreventMouseEvent(registrationName, inst.type, props)) { + return null; + } + + if (!(!listener || typeof listener === 'function')) { + { + throw Error( + 'Expected `' + + registrationName + + '` listener to be a function, instead got a value of `' + + typeof listener + + '` type.', + ); + } + } + + return listener; + } + /** + * Allows registered plugins an opportunity to extract events from top-level + * native browser events. + * + * @return {*} An accumulation of synthetic events. + * @internal + */ + + function extractPluginEvents( + topLevelType, + targetInst, + nativeEvent, + nativeEventTarget, + eventSystemFlags, + ) { + var events = null; + + for (var i = 0; i < plugins.length; i++) { + // Not every plugin in the ordering may be loaded at runtime. + var possiblePlugin = plugins[i]; + + if (possiblePlugin) { + var extractedEvents = possiblePlugin.extractEvents( + topLevelType, + targetInst, + nativeEvent, + nativeEventTarget, + eventSystemFlags, + ); + + if (extractedEvents) { + events = accumulateInto(events, extractedEvents); + } + } + } + + return events; + } + + function runExtractedPluginEventsInBatch( + topLevelType, + targetInst, + nativeEvent, + nativeEventTarget, + eventSystemFlags, + ) { + var events = extractPluginEvents( + topLevelType, + targetInst, + nativeEvent, + nativeEventTarget, + eventSystemFlags, + ); + runEventsInBatch(events); + } + + var FunctionComponent = 0; + var ClassComponent = 1; + var IndeterminateComponent = 2; // Before we know whether it is function or class + + var HostRoot = 3; // Root of a host tree. Could be nested inside another node. + + var HostPortal = 4; // A subtree. Could be an entry point to a different renderer. + + var HostComponent = 5; + var HostText = 6; + var Fragment = 7; + var Mode = 8; + var ContextConsumer = 9; + var ContextProvider = 10; + var ForwardRef = 11; + var Profiler = 12; + var SuspenseComponent = 13; + var MemoComponent = 14; + var SimpleMemoComponent = 15; + var LazyComponent = 16; + var IncompleteClassComponent = 17; + var DehydratedFragment = 18; + var SuspenseListComponent = 19; + var FundamentalComponent = 20; + var ScopeComponent = 21; + + var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; // Prevent newer renderers from RTE when used with older react package versions. + // Current owner and dispatcher used to share the same ref, + // but PR #14548 split them out to better support the react-debug-tools package. + + if (!ReactSharedInternals.hasOwnProperty('ReactCurrentDispatcher')) { + ReactSharedInternals.ReactCurrentDispatcher = { + current: null, + }; + } + + if (!ReactSharedInternals.hasOwnProperty('ReactCurrentBatchConfig')) { + ReactSharedInternals.ReactCurrentBatchConfig = { + suspense: null, + }; + } + + var BEFORE_SLASH_RE = /^(.*)[\\\/]/; + var describeComponentFrame = function (name, source, ownerName) { + var sourceInfo = ''; + + if (source) { + var path = source.fileName; + var fileName = path.replace(BEFORE_SLASH_RE, ''); + + { + // In DEV, include code for a common special case: + // prefer "folder/index.js" instead of just "index.js". + if (/^index\./.test(fileName)) { + var match = path.match(BEFORE_SLASH_RE); + + if (match) { + var pathBeforeSlash = match[1]; + + if (pathBeforeSlash) { + var folderName = pathBeforeSlash.replace(BEFORE_SLASH_RE, ''); + fileName = folderName + '/' + fileName; + } + } + } + } + + sourceInfo = ' (at ' + fileName + ':' + source.lineNumber + ')'; + } else if (ownerName) { + sourceInfo = ' (created by ' + ownerName + ')'; + } + + return '\n in ' + (name || 'Unknown') + sourceInfo; + }; + + // The Symbol used to tag the ReactElement-like types. If there is no native Symbol + // nor polyfill, then a plain number is used for performance. + var hasSymbol = typeof Symbol === 'function' && Symbol.for; + var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7; + var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca; + var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb; + var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc; + var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2; + var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd; + var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary + // (unstable) APIs that have been removed. Can we remove the symbols? + + var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf; + var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0; + var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1; + var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8; + var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3; + var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4; + var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5; + var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6; + var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7; + var MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; + var FAUX_ITERATOR_SYMBOL = '@@iterator'; + function getIteratorFn(maybeIterable) { + if (maybeIterable === null || typeof maybeIterable !== 'object') { + return null; + } + + var maybeIterator = + (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) || + maybeIterable[FAUX_ITERATOR_SYMBOL]; + + if (typeof maybeIterator === 'function') { + return maybeIterator; + } + + return null; + } + + /** + * Similar to invariant but only logs a warning if the condition is not met. + * This can be used to log issues in development environments in critical + * paths. Removing the logging code for production environments will keep the + * same logic and follow the same code paths. + */ + + var warning = warningWithoutStack$1; + + { + warning = function (condition, format) { + if (condition) { + return; + } + + var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; + var stack = ReactDebugCurrentFrame.getStackAddendum(); // eslint-disable-next-line react-internal/warning-and-invariant-args + + for ( + var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; + _key < _len; + _key++ + ) { + args[_key - 2] = arguments[_key]; + } + + warningWithoutStack$1.apply(void 0, [false, format + '%s'].concat(args, [stack])); + }; + } + + var warning$1 = warning; + + var Uninitialized = -1; + var Pending = 0; + var Resolved = 1; + var Rejected = 2; + function refineResolvedLazyComponent(lazyComponent) { + return lazyComponent._status === Resolved ? lazyComponent._result : null; + } + function initializeLazyComponentType(lazyComponent) { + if (lazyComponent._status === Uninitialized) { + lazyComponent._status = Pending; + var ctor = lazyComponent._ctor; + var thenable = ctor(); + lazyComponent._result = thenable; + thenable.then( + function (moduleObject) { + if (lazyComponent._status === Pending) { + var defaultExport = moduleObject.default; + + { + if (defaultExport === undefined) { + warning$1( + false, + 'lazy: Expected the result of a dynamic import() call. ' + + 'Instead received: %s\n\nYour code should look like: \n ' + + "const MyComponent = lazy(() => import('./MyComponent'))", + moduleObject, + ); + } + } + + lazyComponent._status = Resolved; + lazyComponent._result = defaultExport; + } + }, + function (error) { + if (lazyComponent._status === Pending) { + lazyComponent._status = Rejected; + lazyComponent._result = error; + } + }, + ); + } + } + + function getWrappedName(outerType, innerType, wrapperName) { + var functionName = innerType.displayName || innerType.name || ''; + return ( + outerType.displayName || + (functionName !== '' ? wrapperName + '(' + functionName + ')' : wrapperName) + ); + } + + function getComponentName(type) { + if (type == null) { + // Host root, text node or just invalid type. + return null; + } + + { + if (typeof type.tag === 'number') { + warningWithoutStack$1( + false, + 'Received an unexpected object in getComponentName(). ' + + 'This is likely a bug in React. Please file an issue.', + ); + } + } + + if (typeof type === 'function') { + return type.displayName || type.name || null; + } + + if (typeof type === 'string') { + return type; + } + + switch (type) { + case REACT_FRAGMENT_TYPE: + return 'Fragment'; + + case REACT_PORTAL_TYPE: + return 'Portal'; + + case REACT_PROFILER_TYPE: + return 'Profiler'; + + case REACT_STRICT_MODE_TYPE: + return 'StrictMode'; + + case REACT_SUSPENSE_TYPE: + return 'Suspense'; + + case REACT_SUSPENSE_LIST_TYPE: + return 'SuspenseList'; + } + + if (typeof type === 'object') { + switch (type.$$typeof) { + case REACT_CONTEXT_TYPE: + return 'Context.Consumer'; + + case REACT_PROVIDER_TYPE: + return 'Context.Provider'; + + case REACT_FORWARD_REF_TYPE: + return getWrappedName(type, type.render, 'ForwardRef'); + + case REACT_MEMO_TYPE: + return getComponentName(type.type); + + case REACT_LAZY_TYPE: { + var thenable = type; + var resolvedThenable = refineResolvedLazyComponent(thenable); + + if (resolvedThenable) { + return getComponentName(resolvedThenable); + } + + break; + } + } + } + + return null; + } + + var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; + + function describeFiber(fiber) { + switch (fiber.tag) { + case HostRoot: + case HostPortal: + case HostText: + case Fragment: + case ContextProvider: + case ContextConsumer: + return ''; + + default: + var owner = fiber._debugOwner; + var source = fiber._debugSource; + var name = getComponentName(fiber.type); + var ownerName = null; + + if (owner) { + ownerName = getComponentName(owner.type); + } + + return describeComponentFrame(name, source, ownerName); + } + } + + function getStackByFiberInDevAndProd(workInProgress) { + var info = ''; + var node = workInProgress; + + do { + info += describeFiber(node); + node = node.return; + } while (node); + + return info; + } + var current = null; + var phase = null; + function getCurrentFiberOwnerNameInDevOrNull() { + { + if (current === null) { + return null; + } + + var owner = current._debugOwner; + + if (owner !== null && typeof owner !== 'undefined') { + return getComponentName(owner.type); + } + } + + return null; + } + function getCurrentFiberStackInDev() { + { + if (current === null) { + return ''; + } // Safe because if current fiber exists, we are reconciling, + // and it is guaranteed to be the work-in-progress version. + + return getStackByFiberInDevAndProd(current); + } + + return ''; + } + function resetCurrentFiber() { + { + ReactDebugCurrentFrame.getCurrentStack = null; + current = null; + phase = null; + } + } + function setCurrentFiber(fiber) { + { + ReactDebugCurrentFrame.getCurrentStack = getCurrentFiberStackInDev; + current = fiber; + phase = null; + } + } + function setCurrentPhase(lifeCyclePhase) { + { + phase = lifeCyclePhase; + } + } + + var canUseDOM = !!( + typeof window !== 'undefined' && + typeof window.document !== 'undefined' && + typeof window.document.createElement !== 'undefined' + ); + + function endsWith(subject, search) { + var length = subject.length; + return subject.substring(length - search.length, length) === search; + } + + var PLUGIN_EVENT_SYSTEM = 1; + var RESPONDER_EVENT_SYSTEM = 1 << 1; + var IS_PASSIVE = 1 << 2; + var IS_ACTIVE = 1 << 3; + var PASSIVE_NOT_SUPPORTED = 1 << 4; + var IS_REPLAYED = 1 << 5; + + var restoreImpl = null; + var restoreTarget = null; + var restoreQueue = null; + + function restoreStateOfTarget(target) { + // We perform this translation at the end of the event loop so that we + // always receive the correct fiber here + var internalInstance = getInstanceFromNode(target); + + if (!internalInstance) { + // Unmounted + return; + } + + if (!(typeof restoreImpl === 'function')) { + { + throw Error( + 'setRestoreImplementation() needs to be called to handle a target for controlled events. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + + var props = getFiberCurrentPropsFromNode(internalInstance.stateNode); + restoreImpl(internalInstance.stateNode, internalInstance.type, props); + } + + function setRestoreImplementation(impl) { + restoreImpl = impl; + } + function enqueueStateRestore(target) { + if (restoreTarget) { + if (restoreQueue) { + restoreQueue.push(target); + } else { + restoreQueue = [target]; + } + } else { + restoreTarget = target; + } + } + function needsStateRestore() { + return restoreTarget !== null || restoreQueue !== null; + } + function restoreStateIfNeeded() { + if (!restoreTarget) { + return; + } + + var target = restoreTarget; + var queuedTargets = restoreQueue; + restoreTarget = null; + restoreQueue = null; + restoreStateOfTarget(target); + + if (queuedTargets) { + for (var i = 0; i < queuedTargets.length; i++) { + restoreStateOfTarget(queuedTargets[i]); + } + } + } + + var enableUserTimingAPI = true; // Helps identify side effects in render-phase lifecycle hooks and setState + // reducers by double invoking them in Strict Mode. + + var debugRenderPhaseSideEffectsForStrictMode = true; // To preserve the "Pause on caught exceptions" behavior of the debugger, we + // replay the begin phase of a failed component inside invokeGuardedCallback. + + var replayFailedUnitOfWorkWithInvokeGuardedCallback = true; // Warn about deprecated, async-unsafe lifecycles; relates to RFC #6: + + var warnAboutDeprecatedLifecycles = true; // Gather advanced timing metrics for Profiler subtrees. + + var enableProfilerTimer = true; // Trace which interactions trigger each commit. + + var enableSchedulerTracing = true; // SSR experiments + + var enableSuspenseServerRenderer = false; + var enableSelectiveHydration = false; // Only used in www builds. + + // Only used in www builds. + + // Disable javascript: URL strings in href for XSS protection. + + var disableJavaScriptURLs = false; // React Fire: prevent the value and checked attributes from syncing + // with their related DOM properties + + var disableInputAttributeSyncing = false; // These APIs will no longer be "unstable" in the upcoming 16.7 release, + // Control this behavior with a flag to support 16.6 minor releases in the meanwhile. + + var exposeConcurrentModeAPIs = false; + var warnAboutShorthandPropertyCollision = false; // Experimental React Flare event system and event components support. + + var enableFlareAPI = false; // Experimental Host Component support. + + var enableFundamentalAPI = false; // Experimental Scope support. + + var enableScopeAPI = false; // New API for JSX transforms to target - https://github.com/reactjs/rfcs/pull/107 + + // We will enforce mocking scheduler with scheduler/unstable_mock at some point. (v17?) + // Till then, we warn about the missing mock, but still fallback to a legacy mode compatible version + + var warnAboutUnmockedScheduler = false; // For tests, we flush suspense fallbacks in an act scope; + // *except* in some of our own tests, where we test incremental loading states. + + var flushSuspenseFallbacksInTests = true; // Add a callback property to suspense to notify which promises are currently + // in the update queue. This allows reporting and tracing of what is causing + // the user to see a loading state. + // Also allows hydration callbacks to fire when a dehydrated boundary gets + // hydrated or deleted. + + var enableSuspenseCallback = false; // Part of the simplification of React.createElement so we can eventually move + // from React.createElement to React.jsx + // https://github.com/reactjs/rfcs/blob/createlement-rfc/text/0000-create-element-changes.md + + var warnAboutDefaultPropsOnFunctionComponents = false; + var warnAboutStringRefs = false; + var disableLegacyContext = false; + var disableSchedulerTimeoutBasedOnReactExpirationTime = false; + var enableTrustedTypesIntegration = false; // Flag to turn event.target and event.currentTarget in ReactNative from a reactTag to a component instance + + // the renderer. Such as when we're dispatching events or if third party + // libraries need to call batchedUpdates. Eventually, this API will go away when + // everything is batched by default. We'll then have a similar API to opt-out of + // scheduled work and instead do synchronous work. + // Defaults + + var batchedUpdatesImpl = function (fn, bookkeeping) { + return fn(bookkeeping); + }; + + var discreteUpdatesImpl = function (fn, a, b, c) { + return fn(a, b, c); + }; + + var flushDiscreteUpdatesImpl = function () {}; + + var batchedEventUpdatesImpl = batchedUpdatesImpl; + var isInsideEventHandler = false; + var isBatchingEventUpdates = false; + + function finishEventHandler() { + // Here we wait until all updates have propagated, which is important + // when using controlled components within layers: + // https://github.com/facebook/react/issues/1698 + // Then we restore state of any controlled component. + var controlledComponentsHavePendingUpdates = needsStateRestore(); + + if (controlledComponentsHavePendingUpdates) { + // If a controlled event was fired, we may need to restore the state of + // the DOM node back to the controlled value. This is necessary when React + // bails out of the update without touching the DOM. + flushDiscreteUpdatesImpl(); + restoreStateIfNeeded(); + } + } + + function batchedUpdates(fn, bookkeeping) { + if (isInsideEventHandler) { + // If we are currently inside another batch, we need to wait until it + // fully completes before restoring state. + return fn(bookkeeping); + } + + isInsideEventHandler = true; + + try { + return batchedUpdatesImpl(fn, bookkeeping); + } finally { + isInsideEventHandler = false; + finishEventHandler(); + } + } + function batchedEventUpdates(fn, a, b) { + if (isBatchingEventUpdates) { + // If we are currently inside another batch, we need to wait until it + // fully completes before restoring state. + return fn(a, b); + } + + isBatchingEventUpdates = true; + + try { + return batchedEventUpdatesImpl(fn, a, b); + } finally { + isBatchingEventUpdates = false; + finishEventHandler(); + } + } // This is for the React Flare event system + + function executeUserEventHandler(fn, value) { + var previouslyInEventHandler = isInsideEventHandler; + + try { + isInsideEventHandler = true; + var type = typeof value === 'object' && value !== null ? value.type : ''; + invokeGuardedCallbackAndCatchFirstError(type, fn, undefined, value); + } finally { + isInsideEventHandler = previouslyInEventHandler; + } + } + function discreteUpdates(fn, a, b, c) { + var prevIsInsideEventHandler = isInsideEventHandler; + isInsideEventHandler = true; + + try { + return discreteUpdatesImpl(fn, a, b, c); + } finally { + isInsideEventHandler = prevIsInsideEventHandler; + + if (!isInsideEventHandler) { + finishEventHandler(); + } + } + } + var lastFlushedEventTimeStamp = 0; + function flushDiscreteUpdatesIfNeeded(timeStamp) { + // event.timeStamp isn't overly reliable due to inconsistencies in + // how different browsers have historically provided the time stamp. + // Some browsers provide high-resolution time stamps for all events, + // some provide low-resolution time stamps for all events. FF < 52 + // even mixes both time stamps together. Some browsers even report + // negative time stamps or time stamps that are 0 (iOS9) in some cases. + // Given we are only comparing two time stamps with equality (!==), + // we are safe from the resolution differences. If the time stamp is 0 + // we bail-out of preventing the flush, which can affect semantics, + // such as if an earlier flush removes or adds event listeners that + // are fired in the subsequent flush. However, this is the same + // behaviour as we had before this change, so the risks are low. + if ( + !isInsideEventHandler && + (!enableFlareAPI || timeStamp === 0 || lastFlushedEventTimeStamp !== timeStamp) + ) { + lastFlushedEventTimeStamp = timeStamp; + flushDiscreteUpdatesImpl(); + } + } + function setBatchingImplementation( + _batchedUpdatesImpl, + _discreteUpdatesImpl, + _flushDiscreteUpdatesImpl, + _batchedEventUpdatesImpl, + ) { + batchedUpdatesImpl = _batchedUpdatesImpl; + discreteUpdatesImpl = _discreteUpdatesImpl; + flushDiscreteUpdatesImpl = _flushDiscreteUpdatesImpl; + batchedEventUpdatesImpl = _batchedEventUpdatesImpl; + } + + var DiscreteEvent = 0; + var UserBlockingEvent = 1; + var ContinuousEvent = 2; + + // CommonJS interop named imports. + + var UserBlockingPriority = Scheduler.unstable_UserBlockingPriority; + var runWithPriority = Scheduler.unstable_runWithPriority; + var listenToResponderEventTypesImpl; + function setListenToResponderEventTypes(_listenToResponderEventTypesImpl) { + listenToResponderEventTypesImpl = _listenToResponderEventTypesImpl; + } + var rootEventTypesToEventResponderInstances = new Map(); + var DoNotPropagateToNextResponder = 0; + var PropagateToNextResponder = 1; + var currentTimeStamp = 0; + var currentInstance = null; + var currentDocument = null; + var currentPropagationBehavior = DoNotPropagateToNextResponder; + var eventResponderContext = { + dispatchEvent: function (eventValue, eventListener, eventPriority) { + validateResponderContext(); + validateEventValue(eventValue); + + switch (eventPriority) { + case DiscreteEvent: { + flushDiscreteUpdatesIfNeeded(currentTimeStamp); + discreteUpdates(function () { + return executeUserEventHandler(eventListener, eventValue); + }); + break; + } + + case UserBlockingEvent: { + runWithPriority(UserBlockingPriority, function () { + return executeUserEventHandler(eventListener, eventValue); + }); + break; + } + + case ContinuousEvent: { + executeUserEventHandler(eventListener, eventValue); + break; + } + } + }, + isTargetWithinResponder: function (target) { + validateResponderContext(); + + if (target != null) { + var fiber = getClosestInstanceFromNode(target); + var responderFiber = currentInstance.fiber; + + while (fiber !== null) { + if (fiber === responderFiber || fiber.alternate === responderFiber) { + return true; + } + + fiber = fiber.return; + } + } + + return false; + }, + isTargetWithinResponderScope: function (target) { + validateResponderContext(); + var componentInstance = currentInstance; + var responder = componentInstance.responder; + + if (target != null) { + var fiber = getClosestInstanceFromNode(target); + var responderFiber = currentInstance.fiber; + + while (fiber !== null) { + if (fiber === responderFiber || fiber.alternate === responderFiber) { + return true; + } + + if (doesFiberHaveResponder(fiber, responder)) { + return false; + } + + fiber = fiber.return; + } + } + + return false; + }, + isTargetWithinNode: function (childTarget, parentTarget) { + validateResponderContext(); + var childFiber = getClosestInstanceFromNode(childTarget); + var parentFiber = getClosestInstanceFromNode(parentTarget); + + if (childFiber != null && parentFiber != null) { + var parentAlternateFiber = parentFiber.alternate; + var node = childFiber; + + while (node !== null) { + if (node === parentFiber || node === parentAlternateFiber) { + return true; + } + + node = node.return; + } + + return false; + } // Fallback to DOM APIs + + return parentTarget.contains(childTarget); + }, + addRootEventTypes: function (rootEventTypes) { + validateResponderContext(); + listenToResponderEventTypesImpl(rootEventTypes, currentDocument); + + for (var i = 0; i < rootEventTypes.length; i++) { + var rootEventType = rootEventTypes[i]; + var eventResponderInstance = currentInstance; + registerRootEventType(rootEventType, eventResponderInstance); + } + }, + removeRootEventTypes: function (rootEventTypes) { + validateResponderContext(); + + for (var i = 0; i < rootEventTypes.length; i++) { + var rootEventType = rootEventTypes[i]; + var rootEventResponders = rootEventTypesToEventResponderInstances.get(rootEventType); + var rootEventTypesSet = currentInstance.rootEventTypes; + + if (rootEventTypesSet !== null) { + rootEventTypesSet.delete(rootEventType); + } + + if (rootEventResponders !== undefined) { + rootEventResponders.delete(currentInstance); + } + } + }, + getActiveDocument: getActiveDocument, + objectAssign: _assign, + getTimeStamp: function () { + validateResponderContext(); + return currentTimeStamp; + }, + isTargetWithinHostComponent: function (target, elementType) { + validateResponderContext(); + var fiber = getClosestInstanceFromNode(target); + + while (fiber !== null) { + if (fiber.tag === HostComponent && fiber.type === elementType) { + return true; + } + + fiber = fiber.return; + } + + return false; + }, + continuePropagation: function () { + currentPropagationBehavior = PropagateToNextResponder; + }, + enqueueStateRestore: enqueueStateRestore, + getResponderNode: function () { + validateResponderContext(); + var responderFiber = currentInstance.fiber; + + if (responderFiber.tag === ScopeComponent) { + return null; + } + + return responderFiber.stateNode; + }, + }; + + function validateEventValue(eventValue) { + if (typeof eventValue === 'object' && eventValue !== null) { + var target = eventValue.target, + type = eventValue.type, + timeStamp = eventValue.timeStamp; + + if (target == null || type == null || timeStamp == null) { + throw new Error( + 'context.dispatchEvent: "target", "timeStamp", and "type" fields on event object are required.', + ); + } + + var showWarning = function (name) { + { + warning$1( + false, + '%s is not available on event objects created from event responder modules (React Flare). ' + + 'Try wrapping in a conditional, i.e. `if (event.type !== "press") { event.%s }`', + name, + name, + ); + } + }; + + eventValue.isDefaultPrevented = function () { + { + showWarning('isDefaultPrevented()'); + } + }; + + eventValue.isPropagationStopped = function () { + { + showWarning('isPropagationStopped()'); + } + }; // $FlowFixMe: we don't need value, Flow thinks we do + + Object.defineProperty(eventValue, 'nativeEvent', { + get: function () { + { + showWarning('nativeEvent'); + } + }, + }); + } + } + + function doesFiberHaveResponder(fiber, responder) { + var tag = fiber.tag; + + if (tag === HostComponent || tag === ScopeComponent) { + var dependencies = fiber.dependencies; + + if (dependencies !== null) { + var respondersMap = dependencies.responders; + + if (respondersMap !== null && respondersMap.has(responder)) { + return true; + } + } + } + + return false; + } + + function getActiveDocument() { + return currentDocument; + } + + function createDOMResponderEvent( + topLevelType, + nativeEvent, + nativeEventTarget, + passive, + passiveSupported, + ) { + var _ref = nativeEvent, + buttons = _ref.buttons, + pointerType = _ref.pointerType; + var eventPointerType = ''; + + if (pointerType !== undefined) { + eventPointerType = pointerType; + } else if (nativeEvent.key !== undefined) { + eventPointerType = 'keyboard'; + } else if (buttons !== undefined) { + eventPointerType = 'mouse'; + } else if (nativeEvent.changedTouches !== undefined) { + eventPointerType = 'touch'; + } + + return { + nativeEvent: nativeEvent, + passive: passive, + passiveSupported: passiveSupported, + pointerType: eventPointerType, + target: nativeEventTarget, + type: topLevelType, + }; + } + + function responderEventTypesContainType(eventTypes, type) { + for (var i = 0, len = eventTypes.length; i < len; i++) { + if (eventTypes[i] === type) { + return true; + } + } + + return false; + } + + function validateResponderTargetEventTypes(eventType, responder) { + var targetEventTypes = responder.targetEventTypes; // Validate the target event type exists on the responder + + if (targetEventTypes !== null) { + return responderEventTypesContainType(targetEventTypes, eventType); + } + + return false; + } + + function traverseAndHandleEventResponderInstances( + topLevelType, + targetFiber, + nativeEvent, + nativeEventTarget, + eventSystemFlags, + ) { + var isPassiveEvent = (eventSystemFlags & IS_PASSIVE) !== 0; + var isPassiveSupported = (eventSystemFlags & PASSIVE_NOT_SUPPORTED) === 0; + var isPassive = isPassiveEvent || !isPassiveSupported; + var eventType = isPassive ? topLevelType : topLevelType + '_active'; // Trigger event responders in this order: + // - Bubble target responder phase + // - Root responder phase + + var visitedResponders = new Set(); + var responderEvent = createDOMResponderEvent( + topLevelType, + nativeEvent, + nativeEventTarget, + isPassiveEvent, + isPassiveSupported, + ); + var node = targetFiber; + var insidePortal = false; + + while (node !== null) { + var _node = node, + dependencies = _node.dependencies, + tag = _node.tag; + + if (tag === HostPortal) { + insidePortal = true; + } else if ((tag === HostComponent || tag === ScopeComponent) && dependencies !== null) { + var respondersMap = dependencies.responders; + + if (respondersMap !== null) { + var responderInstances = Array.from(respondersMap.values()); + + for (var i = 0, length = responderInstances.length; i < length; i++) { + var responderInstance = responderInstances[i]; + var props = responderInstance.props, + responder = responderInstance.responder, + state = responderInstance.state; + + if ( + !visitedResponders.has(responder) && + validateResponderTargetEventTypes(eventType, responder) && + (!insidePortal || responder.targetPortalPropagation) + ) { + visitedResponders.add(responder); + var onEvent = responder.onEvent; + + if (onEvent !== null) { + currentInstance = responderInstance; + onEvent(responderEvent, eventResponderContext, props, state); + + if (currentPropagationBehavior === PropagateToNextResponder) { + visitedResponders.delete(responder); + currentPropagationBehavior = DoNotPropagateToNextResponder; + } + } + } + } + } + } + + node = node.return; + } // Root phase + + var rootEventResponderInstances = rootEventTypesToEventResponderInstances.get(eventType); + + if (rootEventResponderInstances !== undefined) { + var _responderInstances = Array.from(rootEventResponderInstances); + + for (var _i = 0; _i < _responderInstances.length; _i++) { + var _responderInstance = _responderInstances[_i]; + var props = _responderInstance.props, + responder = _responderInstance.responder, + state = _responderInstance.state; + var onRootEvent = responder.onRootEvent; + + if (onRootEvent !== null) { + currentInstance = _responderInstance; + onRootEvent(responderEvent, eventResponderContext, props, state); + } + } + } + } + + function mountEventResponder(responder, responderInstance, props, state) { + var onMount = responder.onMount; + + if (onMount !== null) { + var previousInstance = currentInstance; + currentInstance = responderInstance; + + try { + batchedEventUpdates(function () { + onMount(eventResponderContext, props, state); + }); + } finally { + currentInstance = previousInstance; + } + } + } + function unmountEventResponder(responderInstance) { + var responder = responderInstance.responder; + var onUnmount = responder.onUnmount; + + if (onUnmount !== null) { + var props = responderInstance.props, + state = responderInstance.state; + var previousInstance = currentInstance; + currentInstance = responderInstance; + + try { + batchedEventUpdates(function () { + onUnmount(eventResponderContext, props, state); + }); + } finally { + currentInstance = previousInstance; + } + } + + var rootEventTypesSet = responderInstance.rootEventTypes; + + if (rootEventTypesSet !== null) { + var rootEventTypes = Array.from(rootEventTypesSet); + + for (var i = 0; i < rootEventTypes.length; i++) { + var topLevelEventType = rootEventTypes[i]; + var rootEventResponderInstances = + rootEventTypesToEventResponderInstances.get(topLevelEventType); + + if (rootEventResponderInstances !== undefined) { + rootEventResponderInstances.delete(responderInstance); + } + } + } + } + + function validateResponderContext() { + if (!(currentInstance !== null)) { + { + throw Error('An event responder context was used outside of an event cycle.'); + } + } + } + + function dispatchEventForResponderEventSystem( + topLevelType, + targetFiber, + nativeEvent, + nativeEventTarget, + eventSystemFlags, + ) { + if (enableFlareAPI) { + var previousInstance = currentInstance; + var previousTimeStamp = currentTimeStamp; + var previousDocument = currentDocument; + var previousPropagationBehavior = currentPropagationBehavior; + currentPropagationBehavior = DoNotPropagateToNextResponder; // nodeType 9 is DOCUMENT_NODE + + currentDocument = + nativeEventTarget.nodeType === 9 ? nativeEventTarget : nativeEventTarget.ownerDocument; // We might want to control timeStamp another way here + + currentTimeStamp = nativeEvent.timeStamp; + + try { + batchedEventUpdates(function () { + traverseAndHandleEventResponderInstances( + topLevelType, + targetFiber, + nativeEvent, + nativeEventTarget, + eventSystemFlags, + ); + }); + } finally { + currentInstance = previousInstance; + currentTimeStamp = previousTimeStamp; + currentDocument = previousDocument; + currentPropagationBehavior = previousPropagationBehavior; + } + } + } + function addRootEventTypesForResponderInstance(responderInstance, rootEventTypes) { + for (var i = 0; i < rootEventTypes.length; i++) { + var rootEventType = rootEventTypes[i]; + registerRootEventType(rootEventType, responderInstance); + } + } + + function registerRootEventType(rootEventType, eventResponderInstance) { + var rootEventResponderInstances = rootEventTypesToEventResponderInstances.get(rootEventType); + + if (rootEventResponderInstances === undefined) { + rootEventResponderInstances = new Set(); + rootEventTypesToEventResponderInstances.set(rootEventType, rootEventResponderInstances); + } + + var rootEventTypesSet = eventResponderInstance.rootEventTypes; + + if (rootEventTypesSet === null) { + rootEventTypesSet = eventResponderInstance.rootEventTypes = new Set(); + } + + if (!!rootEventTypesSet.has(rootEventType)) { + { + throw Error( + 'addRootEventTypes() found a duplicate root event type of "' + + rootEventType + + '". This might be because the event type exists in the event responder "rootEventTypes" array or because of a previous addRootEventTypes() using this root event type.', + ); + } + } + + rootEventTypesSet.add(rootEventType); + rootEventResponderInstances.add(eventResponderInstance); + } + + // A reserved attribute. + // It is handled by React separately and shouldn't be written to the DOM. + var RESERVED = 0; // A simple string attribute. + // Attributes that aren't in the whitelist are presumed to have this type. + + var STRING = 1; // A string attribute that accepts booleans in React. In HTML, these are called + // "enumerated" attributes with "true" and "false" as possible values. + // When true, it should be set to a "true" string. + // When false, it should be set to a "false" string. + + var BOOLEANISH_STRING = 2; // A real boolean attribute. + // When true, it should be present (set either to an empty string or its name). + // When false, it should be omitted. + + var BOOLEAN = 3; // An attribute that can be used as a flag as well as with a value. + // When true, it should be present (set either to an empty string or its name). + // When false, it should be omitted. + // For any other value, should be present with that value. + + var OVERLOADED_BOOLEAN = 4; // An attribute that must be numeric or parse as a numeric. + // When falsy, it should be removed. + + var NUMERIC = 5; // An attribute that must be positive numeric or parse as a positive numeric. + // When falsy, it should be removed. + + var POSITIVE_NUMERIC = 6; + + /* eslint-disable max-len */ + var ATTRIBUTE_NAME_START_CHAR = + ':A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD'; + /* eslint-enable max-len */ + + var ATTRIBUTE_NAME_CHAR = + ATTRIBUTE_NAME_START_CHAR + '\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040'; + + var ROOT_ATTRIBUTE_NAME = 'data-reactroot'; + var VALID_ATTRIBUTE_NAME_REGEX = new RegExp( + '^[' + ATTRIBUTE_NAME_START_CHAR + '][' + ATTRIBUTE_NAME_CHAR + ']*$', + ); + var hasOwnProperty = Object.prototype.hasOwnProperty; + var illegalAttributeNameCache = {}; + var validatedAttributeNameCache = {}; + function isAttributeNameSafe(attributeName) { + if (hasOwnProperty.call(validatedAttributeNameCache, attributeName)) { + return true; + } + + if (hasOwnProperty.call(illegalAttributeNameCache, attributeName)) { + return false; + } + + if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) { + validatedAttributeNameCache[attributeName] = true; + return true; + } + + illegalAttributeNameCache[attributeName] = true; + + { + warning$1(false, 'Invalid attribute name: `%s`', attributeName); + } + + return false; + } + function shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag) { + if (propertyInfo !== null) { + return propertyInfo.type === RESERVED; + } + + if (isCustomComponentTag) { + return false; + } + + if ( + name.length > 2 && + (name[0] === 'o' || name[0] === 'O') && + (name[1] === 'n' || name[1] === 'N') + ) { + return true; + } + + return false; + } + function shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag) { + if (propertyInfo !== null && propertyInfo.type === RESERVED) { + return false; + } + + switch (typeof value) { + case 'function': // $FlowIssue symbol is perfectly valid here + + case 'symbol': + // eslint-disable-line + return true; + + case 'boolean': { + if (isCustomComponentTag) { + return false; + } + + if (propertyInfo !== null) { + return !propertyInfo.acceptsBooleans; + } else { + var prefix = name.toLowerCase().slice(0, 5); + return prefix !== 'data-' && prefix !== 'aria-'; + } + } + + default: + return false; + } + } + function shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag) { + if (value === null || typeof value === 'undefined') { + return true; + } + + if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag)) { + return true; + } + + if (isCustomComponentTag) { + return false; + } + + if (propertyInfo !== null) { + switch (propertyInfo.type) { + case BOOLEAN: + return !value; + + case OVERLOADED_BOOLEAN: + return value === false; + + case NUMERIC: + return isNaN(value); + + case POSITIVE_NUMERIC: + return isNaN(value) || value < 1; + } + } + + return false; + } + function getPropertyInfo(name) { + return properties.hasOwnProperty(name) ? properties[name] : null; + } + + function PropertyInfoRecord( + name, + type, + mustUseProperty, + attributeName, + attributeNamespace, + sanitizeURL, + ) { + this.acceptsBooleans = + type === BOOLEANISH_STRING || type === BOOLEAN || type === OVERLOADED_BOOLEAN; + this.attributeName = attributeName; + this.attributeNamespace = attributeNamespace; + this.mustUseProperty = mustUseProperty; + this.propertyName = name; + this.type = type; + this.sanitizeURL = sanitizeURL; + } // When adding attributes to this list, be sure to also add them to + // the `possibleStandardNames` module to ensure casing and incorrect + // name warnings. + + var properties = {}; // These props are reserved by React. They shouldn't be written to the DOM. + + [ + 'children', + 'dangerouslySetInnerHTML', // TODO: This prevents the assignment of defaultValue to regular + // elements (not just inputs). Now that ReactDOMInput assigns to the + // defaultValue property -- do we need this? + 'defaultValue', + 'defaultChecked', + 'innerHTML', + 'suppressContentEditableWarning', + 'suppressHydrationWarning', + 'style', + ].forEach(function (name) { + properties[name] = new PropertyInfoRecord( + name, + RESERVED, + false, // mustUseProperty + name, // attributeName + null, // attributeNamespace + false, + ); + }); // A few React string attributes have a different name. + // This is a mapping from React prop names to the attribute names. + + [ + ['acceptCharset', 'accept-charset'], + ['className', 'class'], + ['htmlFor', 'for'], + ['httpEquiv', 'http-equiv'], + ].forEach(function (_ref) { + var name = _ref[0], + attributeName = _ref[1]; + properties[name] = new PropertyInfoRecord( + name, + STRING, + false, // mustUseProperty + attributeName, // attributeName + null, // attributeNamespace + false, + ); + }); // These are "enumerated" HTML attributes that accept "true" and "false". + // In React, we let users pass `true` and `false` even though technically + // these aren't boolean attributes (they are coerced to strings). + + ['contentEditable', 'draggable', 'spellCheck', 'value'].forEach(function (name) { + properties[name] = new PropertyInfoRecord( + name, + BOOLEANISH_STRING, + false, // mustUseProperty + name.toLowerCase(), // attributeName + null, // attributeNamespace + false, + ); + }); // These are "enumerated" SVG attributes that accept "true" and "false". + // In React, we let users pass `true` and `false` even though technically + // these aren't boolean attributes (they are coerced to strings). + // Since these are SVG attributes, their attribute names are case-sensitive. + + ['autoReverse', 'externalResourcesRequired', 'focusable', 'preserveAlpha'].forEach(function (name) { + properties[name] = new PropertyInfoRecord( + name, + BOOLEANISH_STRING, + false, // mustUseProperty + name, // attributeName + null, // attributeNamespace + false, + ); + }); // These are HTML boolean attributes. + + [ + 'allowFullScreen', + 'async', // Note: there is a special case that prevents it from being written to the DOM + // on the client side because the browsers are inconsistent. Instead we call focus(). + 'autoFocus', + 'autoPlay', + 'controls', + 'default', + 'defer', + 'disabled', + 'disablePictureInPicture', + 'formNoValidate', + 'hidden', + 'loop', + 'noModule', + 'noValidate', + 'open', + 'playsInline', + 'readOnly', + 'required', + 'reversed', + 'scoped', + 'seamless', // Microdata + 'itemScope', + ].forEach(function (name) { + properties[name] = new PropertyInfoRecord( + name, + BOOLEAN, + false, // mustUseProperty + name.toLowerCase(), // attributeName + null, // attributeNamespace + false, + ); + }); // These are the few React props that we set as DOM properties + // rather than attributes. These are all booleans. + + [ + 'checked', // Note: `option.selected` is not updated if `select.multiple` is + // disabled with `removeAttribute`. We have special logic for handling this. + 'multiple', + 'muted', + 'selected', + ].forEach(function (name) { + properties[name] = new PropertyInfoRecord( + name, + BOOLEAN, + true, // mustUseProperty + name, // attributeName + null, // attributeNamespace + false, + ); + }); // These are HTML attributes that are "overloaded booleans": they behave like + // booleans, but can also accept a string value. + + ['capture', 'download'].forEach(function (name) { + properties[name] = new PropertyInfoRecord( + name, + OVERLOADED_BOOLEAN, + false, // mustUseProperty + name, // attributeName + null, // attributeNamespace + false, + ); + }); // These are HTML attributes that must be positive numbers. + + ['cols', 'rows', 'size', 'span'].forEach(function (name) { + properties[name] = new PropertyInfoRecord( + name, + POSITIVE_NUMERIC, + false, // mustUseProperty + name, // attributeName + null, // attributeNamespace + false, + ); + }); // These are HTML attributes that must be numbers. + + ['rowSpan', 'start'].forEach(function (name) { + properties[name] = new PropertyInfoRecord( + name, + NUMERIC, + false, // mustUseProperty + name.toLowerCase(), // attributeName + null, // attributeNamespace + false, + ); + }); + var CAMELIZE = /[\-\:]([a-z])/g; + + var capitalize = function (token) { + return token[1].toUpperCase(); + }; // This is a list of all SVG attributes that need special casing, namespacing, + // or boolean value assignment. Regular attributes that just accept strings + // and have the same names are omitted, just like in the HTML whitelist. + // Some of these attributes can be hard to find. This list was created by + // scrapping the MDN documentation. + + [ + 'accent-height', + 'alignment-baseline', + 'arabic-form', + 'baseline-shift', + 'cap-height', + 'clip-path', + 'clip-rule', + 'color-interpolation', + 'color-interpolation-filters', + 'color-profile', + 'color-rendering', + 'dominant-baseline', + 'enable-background', + 'fill-opacity', + 'fill-rule', + 'flood-color', + 'flood-opacity', + 'font-family', + 'font-size', + 'font-size-adjust', + 'font-stretch', + 'font-style', + 'font-variant', + 'font-weight', + 'glyph-name', + 'glyph-orientation-horizontal', + 'glyph-orientation-vertical', + 'horiz-adv-x', + 'horiz-origin-x', + 'image-rendering', + 'letter-spacing', + 'lighting-color', + 'marker-end', + 'marker-mid', + 'marker-start', + 'overline-position', + 'overline-thickness', + 'paint-order', + 'panose-1', + 'pointer-events', + 'rendering-intent', + 'shape-rendering', + 'stop-color', + 'stop-opacity', + 'strikethrough-position', + 'strikethrough-thickness', + 'stroke-dasharray', + 'stroke-dashoffset', + 'stroke-linecap', + 'stroke-linejoin', + 'stroke-miterlimit', + 'stroke-opacity', + 'stroke-width', + 'text-anchor', + 'text-decoration', + 'text-rendering', + 'underline-position', + 'underline-thickness', + 'unicode-bidi', + 'unicode-range', + 'units-per-em', + 'v-alphabetic', + 'v-hanging', + 'v-ideographic', + 'v-mathematical', + 'vector-effect', + 'vert-adv-y', + 'vert-origin-x', + 'vert-origin-y', + 'word-spacing', + 'writing-mode', + 'xmlns:xlink', + 'x-height', + ].forEach(function (attributeName) { + var name = attributeName.replace(CAMELIZE, capitalize); + properties[name] = new PropertyInfoRecord( + name, + STRING, + false, // mustUseProperty + attributeName, + null, // attributeNamespace + false, + ); + }); // String SVG attributes with the xlink namespace. + + ['xlink:actuate', 'xlink:arcrole', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type'].forEach( + function (attributeName) { + var name = attributeName.replace(CAMELIZE, capitalize); + properties[name] = new PropertyInfoRecord( + name, + STRING, + false, // mustUseProperty + attributeName, + 'http://www.w3.org/1999/xlink', + false, + ); + }, + ); // String SVG attributes with the xml namespace. + + ['xml:base', 'xml:lang', 'xml:space'].forEach(function (attributeName) { + var name = attributeName.replace(CAMELIZE, capitalize); + properties[name] = new PropertyInfoRecord( + name, + STRING, + false, // mustUseProperty + attributeName, + 'http://www.w3.org/XML/1998/namespace', + false, + ); + }); // These attribute exists both in HTML and SVG. + // The attribute name is case-sensitive in SVG so we can't just use + // the React name like we do for attributes that exist only in HTML. + + ['tabIndex', 'crossOrigin'].forEach(function (attributeName) { + properties[attributeName] = new PropertyInfoRecord( + attributeName, + STRING, + false, // mustUseProperty + attributeName.toLowerCase(), // attributeName + null, // attributeNamespace + false, + ); + }); // These attributes accept URLs. These must not allow javascript: URLS. + // These will also need to accept Trusted Types object in the future. + + var xlinkHref = 'xlinkHref'; + properties[xlinkHref] = new PropertyInfoRecord( + 'xlinkHref', + STRING, + false, // mustUseProperty + 'xlink:href', + 'http://www.w3.org/1999/xlink', + true, + ); + ['src', 'href', 'action', 'formAction'].forEach(function (attributeName) { + properties[attributeName] = new PropertyInfoRecord( + attributeName, + STRING, + false, // mustUseProperty + attributeName.toLowerCase(), // attributeName + null, // attributeNamespace + true, + ); + }); + + var ReactDebugCurrentFrame$1 = null; + + { + ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame; + } // A javascript: URL can contain leading C0 control or \u0020 SPACE, + // and any newline or tab are filtered out as if they're not part of the URL. + // https://url.spec.whatwg.org/#url-parsing + // Tab or newline are defined as \r\n\t: + // https://infra.spec.whatwg.org/#ascii-tab-or-newline + // A C0 control is a code point in the range \u0000 NULL to \u001F + // INFORMATION SEPARATOR ONE, inclusive: + // https://infra.spec.whatwg.org/#c0-control-or-space + + /* eslint-disable max-len */ + + var isJavaScriptProtocol = + /^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i; + var didWarn = false; + + function sanitizeURL(url) { + if (disableJavaScriptURLs) { + if (!!isJavaScriptProtocol.test(url)) { + { + throw Error( + 'React has blocked a javascript: URL as a security precaution.' + + ReactDebugCurrentFrame$1.getStackAddendum(), + ); + } + } + } else if (true && !didWarn && isJavaScriptProtocol.test(url)) { + didWarn = true; + warning$1( + false, + 'A future version of React will block javascript: URLs as a security precaution. ' + + 'Use event handlers instead if you can. If you need to generate unsafe HTML try ' + + 'using dangerouslySetInnerHTML instead. React was passed %s.', + JSON.stringify(url), + ); + } + } + + // Flow does not allow string concatenation of most non-string types. To work + // around this limitation, we use an opaque type that can only be obtained by + // passing the value through getToStringValue first. + function toString(value) { + return '' + value; + } + function getToStringValue(value) { + switch (typeof value) { + case 'boolean': + case 'number': + case 'object': + case 'string': + case 'undefined': + return value; + + default: + // function, symbol are assigned as empty strings + return ''; + } + } + /** Trusted value is a wrapper for "safe" values which can be assigned to DOM execution sinks. */ + + /** + * We allow passing objects with toString method as element attributes or in dangerouslySetInnerHTML + * and we do validations that the value is safe. Once we do validation we want to use the validated + * value instead of the object (because object.toString may return something else on next call). + * + * If application uses Trusted Types we don't stringify trusted values, but preserve them as objects. + */ + var toStringOrTrustedType = toString; + + if (enableTrustedTypesIntegration && typeof trustedTypes !== 'undefined') { + toStringOrTrustedType = function (value) { + if ( + typeof value === 'object' && + (trustedTypes.isHTML(value) || + trustedTypes.isScript(value) || + trustedTypes.isScriptURL(value) || + /* TrustedURLs are deprecated and will be removed soon: https://github.com/WICG/trusted-types/pull/204 */ + (trustedTypes.isURL && trustedTypes.isURL(value))) + ) { + // Pass Trusted Types through. + return value; + } + + return toString(value); + }; + } + + /** + * Set attribute for a node. The attribute value can be either string or + * Trusted value (if application uses Trusted Types). + */ + function setAttribute(node, attributeName, attributeValue) { + node.setAttribute(attributeName, attributeValue); + } + /** + * Set attribute with namespace for a node. The attribute value can be either string or + * Trusted value (if application uses Trusted Types). + */ + + function setAttributeNS(node, attributeNamespace, attributeName, attributeValue) { + node.setAttributeNS(attributeNamespace, attributeName, attributeValue); + } + + /** + * Get the value for a property on a node. Only used in DEV for SSR validation. + * The "expected" argument is used as a hint of what the expected value is. + * Some properties have multiple equivalent values. + */ + function getValueForProperty(node, name, expected, propertyInfo) { + { + if (propertyInfo.mustUseProperty) { + var propertyName = propertyInfo.propertyName; + return node[propertyName]; + } else { + if (!disableJavaScriptURLs && propertyInfo.sanitizeURL) { + // If we haven't fully disabled javascript: URLs, and if + // the hydration is successful of a javascript: URL, we + // still want to warn on the client. + sanitizeURL('' + expected); + } + + var attributeName = propertyInfo.attributeName; + var stringValue = null; + + if (propertyInfo.type === OVERLOADED_BOOLEAN) { + if (node.hasAttribute(attributeName)) { + var value = node.getAttribute(attributeName); + + if (value === '') { + return true; + } + + if (shouldRemoveAttribute(name, expected, propertyInfo, false)) { + return value; + } + + if (value === '' + expected) { + return expected; + } + + return value; + } + } else if (node.hasAttribute(attributeName)) { + if (shouldRemoveAttribute(name, expected, propertyInfo, false)) { + // We had an attribute but shouldn't have had one, so read it + // for the error message. + return node.getAttribute(attributeName); + } + + if (propertyInfo.type === BOOLEAN) { + // If this was a boolean, it doesn't matter what the value is + // the fact that we have it is the same as the expected. + return expected; + } // Even if this property uses a namespace we use getAttribute + // because we assume its namespaced name is the same as our config. + // To use getAttributeNS we need the local name which we don't have + // in our config atm. + + stringValue = node.getAttribute(attributeName); + } + + if (shouldRemoveAttribute(name, expected, propertyInfo, false)) { + return stringValue === null ? expected : stringValue; + } else if (stringValue === '' + expected) { + return expected; + } else { + return stringValue; + } + } + } + } + /** + * Get the value for a attribute on a node. Only used in DEV for SSR validation. + * The third argument is used as a hint of what the expected value is. Some + * attributes have multiple equivalent values. + */ + + function getValueForAttribute(node, name, expected) { + { + if (!isAttributeNameSafe(name)) { + return; + } + + if (!node.hasAttribute(name)) { + return expected === undefined ? undefined : null; + } + + var value = node.getAttribute(name); + + if (value === '' + expected) { + return expected; + } + + return value; + } + } + /** + * Sets the value for a property on a node. + * + * @param {DOMElement} node + * @param {string} name + * @param {*} value + */ + + function setValueForProperty(node, name, value, isCustomComponentTag) { + var propertyInfo = getPropertyInfo(name); + + if (shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag)) { + return; + } + + if (shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag)) { + value = null; + } // If the prop isn't in the special list, treat it as a simple attribute. + + if (isCustomComponentTag || propertyInfo === null) { + if (isAttributeNameSafe(name)) { + var _attributeName = name; + + if (value === null) { + node.removeAttribute(_attributeName); + } else { + setAttribute(node, _attributeName, toStringOrTrustedType(value)); + } + } + + return; + } + + var mustUseProperty = propertyInfo.mustUseProperty; + + if (mustUseProperty) { + var propertyName = propertyInfo.propertyName; + + if (value === null) { + var type = propertyInfo.type; + node[propertyName] = type === BOOLEAN ? false : ''; + } else { + // Contrary to `setAttribute`, object properties are properly + // `toString`ed by IE8/9. + node[propertyName] = value; + } + + return; + } // The rest are treated as attributes with special cases. + + var attributeName = propertyInfo.attributeName, + attributeNamespace = propertyInfo.attributeNamespace; + + if (value === null) { + node.removeAttribute(attributeName); + } else { + var _type = propertyInfo.type; + var attributeValue; + + if (_type === BOOLEAN || (_type === OVERLOADED_BOOLEAN && value === true)) { + // If attribute type is boolean, we know for sure it won't be an execution sink + // and we won't require Trusted Type here. + attributeValue = ''; + } else { + // `setAttribute` with objects becomes only `[object]` in IE8/9, + // ('' + value) makes it output the correct toString()-value. + attributeValue = toStringOrTrustedType(value); + + if (propertyInfo.sanitizeURL) { + sanitizeURL(attributeValue.toString()); + } + } + + if (attributeNamespace) { + setAttributeNS(node, attributeNamespace, attributeName, attributeValue); + } else { + setAttribute(node, attributeName, attributeValue); + } + } + } + + var ReactDebugCurrentFrame$2 = null; + var ReactControlledValuePropTypes = { + checkPropTypes: null, + }; + + { + ReactDebugCurrentFrame$2 = ReactSharedInternals.ReactDebugCurrentFrame; + var hasReadOnlyValue = { + button: true, + checkbox: true, + image: true, + hidden: true, + radio: true, + reset: true, + submit: true, + }; + var propTypes = { + value: function (props, propName, componentName) { + if ( + hasReadOnlyValue[props.type] || + props.onChange || + props.readOnly || + props.disabled || + props[propName] == null || + (enableFlareAPI && props.listeners) + ) { + return null; + } + + return new Error( + 'You provided a `value` prop to a form field without an ' + + '`onChange` handler. This will render a read-only field. If ' + + 'the field should be mutable use `defaultValue`. Otherwise, ' + + 'set either `onChange` or `readOnly`.', + ); + }, + checked: function (props, propName, componentName) { + if ( + props.onChange || + props.readOnly || + props.disabled || + props[propName] == null || + (enableFlareAPI && props.listeners) + ) { + return null; + } + + return new Error( + 'You provided a `checked` prop to a form field without an ' + + '`onChange` handler. This will render a read-only field. If ' + + 'the field should be mutable use `defaultChecked`. Otherwise, ' + + 'set either `onChange` or `readOnly`.', + ); + }, + }; + /** + * Provide a linked `value` attribute for controlled forms. You should not use + * this outside of the ReactDOM controlled form components. + */ + + ReactControlledValuePropTypes.checkPropTypes = function (tagName, props) { + checkPropTypes(propTypes, props, 'prop', tagName, ReactDebugCurrentFrame$2.getStackAddendum); + }; + } + + function isCheckable(elem) { + var type = elem.type; + var nodeName = elem.nodeName; + return ( + nodeName && nodeName.toLowerCase() === 'input' && (type === 'checkbox' || type === 'radio') + ); + } + + function getTracker(node) { + return node._valueTracker; + } + + function detachTracker(node) { + node._valueTracker = null; + } + + function getValueFromNode(node) { + var value = ''; + + if (!node) { + return value; + } + + if (isCheckable(node)) { + value = node.checked ? 'true' : 'false'; + } else { + value = node.value; + } + + return value; + } + + function trackValueOnNode(node) { + var valueField = isCheckable(node) ? 'checked' : 'value'; + var descriptor = Object.getOwnPropertyDescriptor(node.constructor.prototype, valueField); + var currentValue = '' + node[valueField]; // if someone has already defined a value or Safari, then bail + // and don't track value will cause over reporting of changes, + // but it's better then a hard failure + // (needed for certain tests that spyOn input values and Safari) + + if ( + node.hasOwnProperty(valueField) || + typeof descriptor === 'undefined' || + typeof descriptor.get !== 'function' || + typeof descriptor.set !== 'function' + ) { + return; + } + + var get = descriptor.get, + set = descriptor.set; + Object.defineProperty(node, valueField, { + configurable: true, + get: function () { + return get.call(this); + }, + set: function (value) { + currentValue = '' + value; + set.call(this, value); + }, + }); // We could've passed this the first time + // but it triggers a bug in IE11 and Edge 14/15. + // Calling defineProperty() again should be equivalent. + // https://github.com/facebook/react/issues/11768 + + Object.defineProperty(node, valueField, { + enumerable: descriptor.enumerable, + }); + var tracker = { + getValue: function () { + return currentValue; + }, + setValue: function (value) { + currentValue = '' + value; + }, + stopTracking: function () { + detachTracker(node); + delete node[valueField]; + }, + }; + return tracker; + } + + function track(node) { + if (getTracker(node)) { + return; + } // TODO: Once it's just Fiber we can move this to node._wrapperState + + node._valueTracker = trackValueOnNode(node); + } + function updateValueIfChanged(node) { + if (!node) { + return false; + } + + var tracker = getTracker(node); // if there is no tracker at this point it's unlikely + // that trying again will succeed + + if (!tracker) { + return true; + } + + var lastValue = tracker.getValue(); + var nextValue = getValueFromNode(node); + + if (nextValue !== lastValue) { + tracker.setValue(nextValue); + return true; + } + + return false; + } + + // TODO: direct imports like some-package/src/* are bad. Fix me. + var didWarnValueDefaultValue = false; + var didWarnCheckedDefaultChecked = false; + var didWarnControlledToUncontrolled = false; + var didWarnUncontrolledToControlled = false; + + function isControlled(props) { + var usesChecked = props.type === 'checkbox' || props.type === 'radio'; + return usesChecked ? props.checked != null : props.value != null; + } + /** + * Implements an <input> host component that allows setting these optional + * props: `checked`, `value`, `defaultChecked`, and `defaultValue`. + * + * If `checked` or `value` are not supplied (or null/undefined), user actions + * that affect the checked state or value will trigger updates to the element. + * + * If they are supplied (and not null/undefined), the rendered element will not + * trigger updates to the element. Instead, the props must change in order for + * the rendered element to be updated. + * + * The rendered element will be initialized as unchecked (or `defaultChecked`) + * with an empty value (or `defaultValue`). + * + * See http://www.w3.org/TR/2012/WD-html5-20121025/the-input-element.html + */ + + function getHostProps(element, props) { + var node = element; + var checked = props.checked; + + var hostProps = _assign({}, props, { + defaultChecked: undefined, + defaultValue: undefined, + value: undefined, + checked: checked != null ? checked : node._wrapperState.initialChecked, + }); + + return hostProps; + } + function initWrapperState(element, props) { + { + ReactControlledValuePropTypes.checkPropTypes('input', props); + + if ( + props.checked !== undefined && + props.defaultChecked !== undefined && + !didWarnCheckedDefaultChecked + ) { + warning$1( + false, + '%s contains an input of type %s with both checked and defaultChecked props. ' + + 'Input elements must be either controlled or uncontrolled ' + + '(specify either the checked prop, or the defaultChecked prop, but not ' + + 'both). Decide between using a controlled or uncontrolled input ' + + 'element and remove one of these props. More info: ' + + 'https://fb.me/react-controlled-components', + getCurrentFiberOwnerNameInDevOrNull() || 'A component', + props.type, + ); + didWarnCheckedDefaultChecked = true; + } + + if ( + props.value !== undefined && + props.defaultValue !== undefined && + !didWarnValueDefaultValue + ) { + warning$1( + false, + '%s contains an input of type %s with both value and defaultValue props. ' + + 'Input elements must be either controlled or uncontrolled ' + + '(specify either the value prop, or the defaultValue prop, but not ' + + 'both). Decide between using a controlled or uncontrolled input ' + + 'element and remove one of these props. More info: ' + + 'https://fb.me/react-controlled-components', + getCurrentFiberOwnerNameInDevOrNull() || 'A component', + props.type, + ); + didWarnValueDefaultValue = true; + } + } + + var node = element; + var defaultValue = props.defaultValue == null ? '' : props.defaultValue; + node._wrapperState = { + initialChecked: props.checked != null ? props.checked : props.defaultChecked, + initialValue: getToStringValue(props.value != null ? props.value : defaultValue), + controlled: isControlled(props), + }; + } + function updateChecked(element, props) { + var node = element; + var checked = props.checked; + + if (checked != null) { + setValueForProperty(node, 'checked', checked, false); + } + } + function updateWrapper(element, props) { + var node = element; + + { + var controlled = isControlled(props); + + if (!node._wrapperState.controlled && controlled && !didWarnUncontrolledToControlled) { + warning$1( + false, + 'A component is changing an uncontrolled input of type %s to be controlled. ' + + 'Input elements should not switch from uncontrolled to controlled (or vice versa). ' + + 'Decide between using a controlled or uncontrolled input ' + + 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components', + props.type, + ); + didWarnUncontrolledToControlled = true; + } + + if (node._wrapperState.controlled && !controlled && !didWarnControlledToUncontrolled) { + warning$1( + false, + 'A component is changing a controlled input of type %s to be uncontrolled. ' + + 'Input elements should not switch from controlled to uncontrolled (or vice versa). ' + + 'Decide between using a controlled or uncontrolled input ' + + 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components', + props.type, + ); + didWarnControlledToUncontrolled = true; + } + } + + updateChecked(element, props); + var value = getToStringValue(props.value); + var type = props.type; + + if (value != null) { + if (type === 'number') { + if ( + (value === 0 && node.value === '') || // We explicitly want to coerce to number here if possible. + // eslint-disable-next-line + node.value != value + ) { + node.value = toString(value); + } + } else if (node.value !== toString(value)) { + node.value = toString(value); + } + } else if (type === 'submit' || type === 'reset') { + // Submit/reset inputs need the attribute removed completely to avoid + // blank-text buttons. + node.removeAttribute('value'); + return; + } + + if (disableInputAttributeSyncing) { + // When not syncing the value attribute, React only assigns a new value + // whenever the defaultValue React prop has changed. When not present, + // React does nothing + if (props.hasOwnProperty('defaultValue')) { + setDefaultValue(node, props.type, getToStringValue(props.defaultValue)); + } + } else { + // When syncing the value attribute, the value comes from a cascade of + // properties: + // 1. The value React property + // 2. The defaultValue React property + // 3. Otherwise there should be no change + if (props.hasOwnProperty('value')) { + setDefaultValue(node, props.type, value); + } else if (props.hasOwnProperty('defaultValue')) { + setDefaultValue(node, props.type, getToStringValue(props.defaultValue)); + } + } + + if (disableInputAttributeSyncing) { + // When not syncing the checked attribute, the attribute is directly + // controllable from the defaultValue React property. It needs to be + // updated as new props come in. + if (props.defaultChecked == null) { + node.removeAttribute('checked'); + } else { + node.defaultChecked = !!props.defaultChecked; + } + } else { + // When syncing the checked attribute, it only changes when it needs + // to be removed, such as transitioning from a checkbox into a text input + if (props.checked == null && props.defaultChecked != null) { + node.defaultChecked = !!props.defaultChecked; + } + } + } + function postMountWrapper(element, props, isHydrating) { + var node = element; // Do not assign value if it is already set. This prevents user text input + // from being lost during SSR hydration. + + if (props.hasOwnProperty('value') || props.hasOwnProperty('defaultValue')) { + var type = props.type; + var isButton = type === 'submit' || type === 'reset'; // Avoid setting value attribute on submit/reset inputs as it overrides the + // default value provided by the browser. See: #12872 + + if (isButton && (props.value === undefined || props.value === null)) { + return; + } + + var initialValue = toString(node._wrapperState.initialValue); // Do not assign value if it is already set. This prevents user text input + // from being lost during SSR hydration. + + if (!isHydrating) { + if (disableInputAttributeSyncing) { + var value = getToStringValue(props.value); // When not syncing the value attribute, the value property points + // directly to the React prop. Only assign it if it exists. + + if (value != null) { + // Always assign on buttons so that it is possible to assign an + // empty string to clear button text. + // + // Otherwise, do not re-assign the value property if is empty. This + // potentially avoids a DOM write and prevents Firefox (~60.0.1) from + // prematurely marking required inputs as invalid. Equality is compared + // to the current value in case the browser provided value is not an + // empty string. + if (isButton || value !== node.value) { + node.value = toString(value); + } + } + } else { + // When syncing the value attribute, the value property should use + // the wrapperState._initialValue property. This uses: + // + // 1. The value React property when present + // 2. The defaultValue React property when present + // 3. An empty string + if (initialValue !== node.value) { + node.value = initialValue; + } + } + } + + if (disableInputAttributeSyncing) { + // When not syncing the value attribute, assign the value attribute + // directly from the defaultValue React property (when present) + var defaultValue = getToStringValue(props.defaultValue); + + if (defaultValue != null) { + node.defaultValue = toString(defaultValue); + } + } else { + // Otherwise, the value attribute is synchronized to the property, + // so we assign defaultValue to the same thing as the value property + // assignment step above. + node.defaultValue = initialValue; + } + } // Normally, we'd just do `node.checked = node.checked` upon initial mount, less this bug + // this is needed to work around a chrome bug where setting defaultChecked + // will sometimes influence the value of checked (even after detachment). + // Reference: https://bugs.chromium.org/p/chromium/issues/detail?id=608416 + // We need to temporarily unset name to avoid disrupting radio button groups. + + var name = node.name; + + if (name !== '') { + node.name = ''; + } + + if (disableInputAttributeSyncing) { + // When not syncing the checked attribute, the checked property + // never gets assigned. It must be manually set. We don't want + // to do this when hydrating so that existing user input isn't + // modified + if (!isHydrating) { + updateChecked(element, props); + } // Only assign the checked attribute if it is defined. This saves + // a DOM write when controlling the checked attribute isn't needed + // (text inputs, submit/reset) + + if (props.hasOwnProperty('defaultChecked')) { + node.defaultChecked = !node.defaultChecked; + node.defaultChecked = !!props.defaultChecked; + } + } else { + // When syncing the checked attribute, both the checked property and + // attribute are assigned at the same time using defaultChecked. This uses: + // + // 1. The checked React property when present + // 2. The defaultChecked React property when present + // 3. Otherwise, false + node.defaultChecked = !node.defaultChecked; + node.defaultChecked = !!node._wrapperState.initialChecked; + } + + if (name !== '') { + node.name = name; + } + } + function restoreControlledState$1(element, props) { + var node = element; + updateWrapper(node, props); + updateNamedCousins(node, props); + } + + function updateNamedCousins(rootNode, props) { + var name = props.name; + + if (props.type === 'radio' && name != null) { + var queryRoot = rootNode; + + while (queryRoot.parentNode) { + queryRoot = queryRoot.parentNode; + } // If `rootNode.form` was non-null, then we could try `form.elements`, + // but that sometimes behaves strangely in IE8. We could also try using + // `form.getElementsByName`, but that will only return direct children + // and won't include inputs that use the HTML5 `form=` attribute. Since + // the input might not even be in a form. It might not even be in the + // document. Let's just use the local `querySelectorAll` to ensure we don't + // miss anything. + + var group = queryRoot.querySelectorAll( + 'input[name=' + JSON.stringify('' + name) + '][type="radio"]', + ); + + for (var i = 0; i < group.length; i++) { + var otherNode = group[i]; + + if (otherNode === rootNode || otherNode.form !== rootNode.form) { + continue; + } // This will throw if radio buttons rendered by different copies of React + // and the same name are rendered into the same form (same as #1939). + // That's probably okay; we don't support it just as we don't support + // mixing React radio buttons with non-React ones. + + var otherProps = getFiberCurrentPropsFromNode$1(otherNode); + + if (!otherProps) { + { + throw Error( + 'ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.', + ); + } + } // We need update the tracked value on the named cousin since the value + // was changed but the input saw no event or value set + + updateValueIfChanged(otherNode); // If this is a controlled radio button group, forcing the input that + // was previously checked to update will cause it to be come re-checked + // as appropriate. + + updateWrapper(otherNode, otherProps); + } + } + } // In Chrome, assigning defaultValue to certain input types triggers input validation. + // For number inputs, the display value loses trailing decimal points. For email inputs, + // Chrome raises "The specified value <x> is not a valid email address". + // + // Here we check to see if the defaultValue has actually changed, avoiding these problems + // when the user is inputting text + // + // https://github.com/facebook/react/issues/7253 + + function setDefaultValue(node, type, value) { + if ( + // Focused number inputs synchronize on blur. See ChangeEventPlugin.js + type !== 'number' || + node.ownerDocument.activeElement !== node + ) { + if (value == null) { + node.defaultValue = toString(node._wrapperState.initialValue); + } else if (node.defaultValue !== toString(value)) { + node.defaultValue = toString(value); + } + } + } + + var didWarnSelectedSetOnOption = false; + var didWarnInvalidChild = false; + + function flattenChildren(children) { + var content = ''; // Flatten children. We'll warn if they are invalid + // during validateProps() which runs for hydration too. + // Note that this would throw on non-element objects. + // Elements are stringified (which is normally irrelevant + // but matters for <fbt>). + + React.Children.forEach(children, function (child) { + if (child == null) { + return; + } + + content += child; // Note: we don't warn about invalid children here. + // Instead, this is done separately below so that + // it happens during the hydration codepath too. + }); + return content; + } + /** + * Implements an <option> host component that warns when `selected` is set. + */ + + function validateProps(element, props) { + { + // This mirrors the codepath above, but runs for hydration too. + // Warn about invalid children here so that client and hydration are consistent. + // TODO: this seems like it could cause a DEV-only throw for hydration + // if children contains a non-element object. We should try to avoid that. + if (typeof props.children === 'object' && props.children !== null) { + React.Children.forEach(props.children, function (child) { + if (child == null) { + return; + } + + if (typeof child === 'string' || typeof child === 'number') { + return; + } + + if (typeof child.type !== 'string') { + return; + } + + if (!didWarnInvalidChild) { + didWarnInvalidChild = true; + warning$1(false, 'Only strings and numbers are supported as <option> children.'); + } + }); + } // TODO: Remove support for `selected` in <option>. + + if (props.selected != null && !didWarnSelectedSetOnOption) { + warning$1( + false, + 'Use the `defaultValue` or `value` props on <select> instead of ' + + 'setting `selected` on <option>.', + ); + didWarnSelectedSetOnOption = true; + } + } + } + function postMountWrapper$1(element, props) { + // value="" should make a value attribute (#6219) + if (props.value != null) { + element.setAttribute('value', toString(getToStringValue(props.value))); + } + } + function getHostProps$1(element, props) { + var hostProps = _assign( + { + children: undefined, + }, + props, + ); + + var content = flattenChildren(props.children); + + if (content) { + hostProps.children = content; + } + + return hostProps; + } + + // TODO: direct imports like some-package/src/* are bad. Fix me. + var didWarnValueDefaultValue$1; + + { + didWarnValueDefaultValue$1 = false; + } + + function getDeclarationErrorAddendum() { + var ownerName = getCurrentFiberOwnerNameInDevOrNull(); + + if (ownerName) { + return '\n\nCheck the render method of `' + ownerName + '`.'; + } + + return ''; + } + + var valuePropNames = ['value', 'defaultValue']; + /** + * Validation function for `value` and `defaultValue`. + */ + + function checkSelectPropTypes(props) { + ReactControlledValuePropTypes.checkPropTypes('select', props); + + for (var i = 0; i < valuePropNames.length; i++) { + var propName = valuePropNames[i]; + + if (props[propName] == null) { + continue; + } + + var isArray = Array.isArray(props[propName]); + + if (props.multiple && !isArray) { + warning$1( + false, + 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', + propName, + getDeclarationErrorAddendum(), + ); + } else if (!props.multiple && isArray) { + warning$1( + false, + 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', + propName, + getDeclarationErrorAddendum(), + ); + } + } + } + + function updateOptions(node, multiple, propValue, setDefaultSelected) { + var options = node.options; + + if (multiple) { + var selectedValues = propValue; + var selectedValue = {}; + + for (var i = 0; i < selectedValues.length; i++) { + // Prefix to avoid chaos with special keys. + selectedValue['$' + selectedValues[i]] = true; + } + + for (var _i = 0; _i < options.length; _i++) { + var selected = selectedValue.hasOwnProperty('$' + options[_i].value); + + if (options[_i].selected !== selected) { + options[_i].selected = selected; + } + + if (selected && setDefaultSelected) { + options[_i].defaultSelected = true; + } + } + } else { + // Do not set `select.value` as exact behavior isn't consistent across all + // browsers for all cases. + var _selectedValue = toString(getToStringValue(propValue)); + + var defaultSelected = null; + + for (var _i2 = 0; _i2 < options.length; _i2++) { + if (options[_i2].value === _selectedValue) { + options[_i2].selected = true; + + if (setDefaultSelected) { + options[_i2].defaultSelected = true; + } + + return; + } + + if (defaultSelected === null && !options[_i2].disabled) { + defaultSelected = options[_i2]; + } + } + + if (defaultSelected !== null) { + defaultSelected.selected = true; + } + } + } + /** + * Implements a <select> host component that allows optionally setting the + * props `value` and `defaultValue`. If `multiple` is false, the prop must be a + * stringable. If `multiple` is true, the prop must be an array of stringables. + * + * If `value` is not supplied (or null/undefined), user actions that change the + * selected option will trigger updates to the rendered options. + * + * If it is supplied (and not null/undefined), the rendered options will not + * update in response to user actions. Instead, the `value` prop must change in + * order for the rendered options to update. + * + * If `defaultValue` is provided, any options with the supplied values will be + * selected. + */ + + function getHostProps$2(element, props) { + return _assign({}, props, { + value: undefined, + }); + } + function initWrapperState$1(element, props) { + var node = element; + + { + checkSelectPropTypes(props); + } + + node._wrapperState = { + wasMultiple: !!props.multiple, + }; + + { + if ( + props.value !== undefined && + props.defaultValue !== undefined && + !didWarnValueDefaultValue$1 + ) { + warning$1( + false, + 'Select elements must be either controlled or uncontrolled ' + + '(specify either the value prop, or the defaultValue prop, but not ' + + 'both). Decide between using a controlled or uncontrolled select ' + + 'element and remove one of these props. More info: ' + + 'https://fb.me/react-controlled-components', + ); + didWarnValueDefaultValue$1 = true; + } + } + } + function postMountWrapper$2(element, props) { + var node = element; + node.multiple = !!props.multiple; + var value = props.value; + + if (value != null) { + updateOptions(node, !!props.multiple, value, false); + } else if (props.defaultValue != null) { + updateOptions(node, !!props.multiple, props.defaultValue, true); + } + } + function postUpdateWrapper(element, props) { + var node = element; + var wasMultiple = node._wrapperState.wasMultiple; + node._wrapperState.wasMultiple = !!props.multiple; + var value = props.value; + + if (value != null) { + updateOptions(node, !!props.multiple, value, false); + } else if (wasMultiple !== !!props.multiple) { + // For simplicity, reapply `defaultValue` if `multiple` is toggled. + if (props.defaultValue != null) { + updateOptions(node, !!props.multiple, props.defaultValue, true); + } else { + // Revert the select back to its default unselected state. + updateOptions(node, !!props.multiple, props.multiple ? [] : '', false); + } + } + } + function restoreControlledState$2(element, props) { + var node = element; + var value = props.value; + + if (value != null) { + updateOptions(node, !!props.multiple, value, false); + } + } + + var didWarnValDefaultVal = false; + + /** + * Implements a <textarea> host component that allows setting `value`, and + * `defaultValue`. This differs from the traditional DOM API because value is + * usually set as PCDATA children. + * + * If `value` is not supplied (or null/undefined), user actions that affect the + * value will trigger updates to the element. + * + * If `value` is supplied (and not null/undefined), the rendered element will + * not trigger updates to the element. Instead, the `value` prop must change in + * order for the rendered element to be updated. + * + * The rendered element will be initialized with an empty value, the prop + * `defaultValue` if specified, or the children content (deprecated). + */ + function getHostProps$3(element, props) { + var node = element; + + if (!(props.dangerouslySetInnerHTML == null)) { + { + throw Error('`dangerouslySetInnerHTML` does not make sense on <textarea>.'); + } + } // Always set children to the same thing. In IE9, the selection range will + // get reset if `textContent` is mutated. We could add a check in setTextContent + // to only set the value if/when the value differs from the node value (which would + // completely solve this IE9 bug), but Sebastian+Sophie seemed to like this + // solution. The value can be a boolean or object so that's why it's forced + // to be a string. + + var hostProps = _assign({}, props, { + value: undefined, + defaultValue: undefined, + children: toString(node._wrapperState.initialValue), + }); + + return hostProps; + } + function initWrapperState$2(element, props) { + var node = element; + + { + ReactControlledValuePropTypes.checkPropTypes('textarea', props); + + if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValDefaultVal) { + warning$1( + false, + '%s contains a textarea with both value and defaultValue props. ' + + 'Textarea elements must be either controlled or uncontrolled ' + + '(specify either the value prop, or the defaultValue prop, but not ' + + 'both). Decide between using a controlled or uncontrolled textarea ' + + 'and remove one of these props. More info: ' + + 'https://fb.me/react-controlled-components', + getCurrentFiberOwnerNameInDevOrNull() || 'A component', + ); + didWarnValDefaultVal = true; + } + } + + var initialValue = props.value; // Only bother fetching default value if we're going to use it + + if (initialValue == null) { + var defaultValue = props.defaultValue; // TODO (yungsters): Remove support for children content in <textarea>. + + var children = props.children; + + if (children != null) { + { + warning$1( + false, + 'Use the `defaultValue` or `value` props instead of setting ' + 'children on <textarea>.', + ); + } + + if (!(defaultValue == null)) { + { + throw Error('If you supply `defaultValue` on a <textarea>, do not pass children.'); + } + } + + if (Array.isArray(children)) { + if (!(children.length <= 1)) { + { + throw Error('<textarea> can only have at most one child.'); + } + } + + children = children[0]; + } + + defaultValue = children; + } + + if (defaultValue == null) { + defaultValue = ''; + } + + initialValue = defaultValue; + } + + node._wrapperState = { + initialValue: getToStringValue(initialValue), + }; + } + function updateWrapper$1(element, props) { + var node = element; + var value = getToStringValue(props.value); + var defaultValue = getToStringValue(props.defaultValue); + + if (value != null) { + // Cast `value` to a string to ensure the value is set correctly. While + // browsers typically do this as necessary, jsdom doesn't. + var newValue = toString(value); // To avoid side effects (such as losing text selection), only set value if changed + + if (newValue !== node.value) { + node.value = newValue; + } + + if (props.defaultValue == null && node.defaultValue !== newValue) { + node.defaultValue = newValue; + } + } + + if (defaultValue != null) { + node.defaultValue = toString(defaultValue); + } + } + function postMountWrapper$3(element, props) { + var node = element; // This is in postMount because we need access to the DOM node, which is not + // available until after the component has mounted. + + var textContent = node.textContent; // Only set node.value if textContent is equal to the expected + // initial value. In IE10/IE11 there is a bug where the placeholder attribute + // will populate textContent as well. + // https://developer.microsoft.com/microsoft-edge/platform/issues/101525/ + + if (textContent === node._wrapperState.initialValue) { + if (textContent !== '' && textContent !== null) { + node.value = textContent; + } + } + } + function restoreControlledState$3(element, props) { + // DOM component is still mounted; update + updateWrapper$1(element, props); + } + + var HTML_NAMESPACE$1 = 'http://www.w3.org/1999/xhtml'; + var MATH_NAMESPACE = 'http://www.w3.org/1998/Math/MathML'; + var SVG_NAMESPACE = 'http://www.w3.org/2000/svg'; + var Namespaces = { + html: HTML_NAMESPACE$1, + mathml: MATH_NAMESPACE, + svg: SVG_NAMESPACE, + }; // Assumes there is no parent namespace. + + function getIntrinsicNamespace(type) { + switch (type) { + case 'svg': + return SVG_NAMESPACE; + + case 'math': + return MATH_NAMESPACE; + + default: + return HTML_NAMESPACE$1; + } + } + function getChildNamespace(parentNamespace, type) { + if (parentNamespace == null || parentNamespace === HTML_NAMESPACE$1) { + // No (or default) parent namespace: potential entry point. + return getIntrinsicNamespace(type); + } + + if (parentNamespace === SVG_NAMESPACE && type === 'foreignObject') { + // We're leaving SVG. + return HTML_NAMESPACE$1; + } // By default, pass namespace below. + + return parentNamespace; + } + + /* globals MSApp */ + + /** + * Create a function which has 'unsafe' privileges (required by windows8 apps) + */ + var createMicrosoftUnsafeLocalFunction = function (func) { + if (typeof MSApp !== 'undefined' && MSApp.execUnsafeLocalFunction) { + return function (arg0, arg1, arg2, arg3) { + MSApp.execUnsafeLocalFunction(function () { + return func(arg0, arg1, arg2, arg3); + }); + }; + } else { + return func; + } + }; + + var reusableSVGContainer; + /** + * Set the innerHTML property of a node + * + * @param {DOMElement} node + * @param {string} html + * @internal + */ + + var setInnerHTML = createMicrosoftUnsafeLocalFunction(function (node, html) { + if (node.namespaceURI === Namespaces.svg) { + { + if (enableTrustedTypesIntegration) { + // TODO: reconsider the text of this warning and when it should show + // before enabling the feature flag. + !(typeof trustedTypes === 'undefined') + ? warning$1( + false, + "Using 'dangerouslySetInnerHTML' in an svg element with " + + 'Trusted Types enabled in an Internet Explorer will cause ' + + 'the trusted value to be converted to string. Assigning string ' + + "to 'innerHTML' will throw an error if Trusted Types are enforced. " + + "You can try to wrap your svg element inside a div and use 'dangerouslySetInnerHTML' " + + 'on the enclosing div instead.', + ) + : void 0; + } + } + + if (!('innerHTML' in node)) { + // IE does not have innerHTML for SVG nodes, so instead we inject the + // new markup in a temp node and then move the child nodes across into + // the target node + reusableSVGContainer = reusableSVGContainer || document.createElement('div'); + reusableSVGContainer.innerHTML = '<svg>' + html.valueOf().toString() + '</svg>'; + var svgNode = reusableSVGContainer.firstChild; + + while (node.firstChild) { + node.removeChild(node.firstChild); + } + + while (svgNode.firstChild) { + node.appendChild(svgNode.firstChild); + } + + return; + } + } + + node.innerHTML = html; + }); + + /** + * HTML nodeType values that represent the type of the node + */ + var ELEMENT_NODE = 1; + var TEXT_NODE = 3; + var COMMENT_NODE = 8; + var DOCUMENT_NODE = 9; + var DOCUMENT_FRAGMENT_NODE = 11; + + /** + * Set the textContent property of a node. For text updates, it's faster + * to set the `nodeValue` of the Text node directly instead of using + * `.textContent` which will remove the existing node and create a new one. + * + * @param {DOMElement} node + * @param {string} text + * @internal + */ + + var setTextContent = function (node, text) { + if (text) { + var firstChild = node.firstChild; + + if (firstChild && firstChild === node.lastChild && firstChild.nodeType === TEXT_NODE) { + firstChild.nodeValue = text; + return; + } + } + + node.textContent = text; + }; + + // Do not use the below two methods directly! + // Instead use constants exported from DOMTopLevelEventTypes in ReactDOM. + // (It is the only module that is allowed to access these methods.) + function unsafeCastStringToDOMTopLevelType(topLevelType) { + return topLevelType; + } + function unsafeCastDOMTopLevelTypeToString(topLevelType) { + return topLevelType; + } + + /** + * Generate a mapping of standard vendor prefixes using the defined style property and event name. + * + * @param {string} styleProp + * @param {string} eventName + * @returns {object} + */ + + function makePrefixMap(styleProp, eventName) { + var prefixes = {}; + prefixes[styleProp.toLowerCase()] = eventName.toLowerCase(); + prefixes['Webkit' + styleProp] = 'webkit' + eventName; + prefixes['Moz' + styleProp] = 'moz' + eventName; + return prefixes; + } + /** + * A list of event names to a configurable list of vendor prefixes. + */ + + var vendorPrefixes = { + animationend: makePrefixMap('Animation', 'AnimationEnd'), + animationiteration: makePrefixMap('Animation', 'AnimationIteration'), + animationstart: makePrefixMap('Animation', 'AnimationStart'), + transitionend: makePrefixMap('Transition', 'TransitionEnd'), + }; + /** + * Event names that have already been detected and prefixed (if applicable). + */ + + var prefixedEventNames = {}; + /** + * Element to check for prefixes on. + */ + + var style = {}; + /** + * Bootstrap if a DOM exists. + */ + + if (canUseDOM) { + style = document.createElement('div').style; // On some platforms, in particular some releases of Android 4.x, + // the un-prefixed "animation" and "transition" properties are defined on the + // style object but the events that fire will still be prefixed, so we need + // to check if the un-prefixed events are usable, and if not remove them from the map. + + if (!('AnimationEvent' in window)) { + delete vendorPrefixes.animationend.animation; + delete vendorPrefixes.animationiteration.animation; + delete vendorPrefixes.animationstart.animation; + } // Same as above + + if (!('TransitionEvent' in window)) { + delete vendorPrefixes.transitionend.transition; + } + } + /** + * Attempts to determine the correct vendor prefixed event name. + * + * @param {string} eventName + * @returns {string} + */ + + function getVendorPrefixedEventName(eventName) { + if (prefixedEventNames[eventName]) { + return prefixedEventNames[eventName]; + } else if (!vendorPrefixes[eventName]) { + return eventName; + } + + var prefixMap = vendorPrefixes[eventName]; + + for (var styleProp in prefixMap) { + if (prefixMap.hasOwnProperty(styleProp) && styleProp in style) { + return (prefixedEventNames[eventName] = prefixMap[styleProp]); + } + } + + return eventName; + } + + /** + * To identify top level events in ReactDOM, we use constants defined by this + * module. This is the only module that uses the unsafe* methods to express + * that the constants actually correspond to the browser event names. This lets + * us save some bundle size by avoiding a top level type -> event name map. + * The rest of ReactDOM code should import top level types from this file. + */ + + var TOP_ABORT = unsafeCastStringToDOMTopLevelType('abort'); + var TOP_ANIMATION_END = unsafeCastStringToDOMTopLevelType( + getVendorPrefixedEventName('animationend'), + ); + var TOP_ANIMATION_ITERATION = unsafeCastStringToDOMTopLevelType( + getVendorPrefixedEventName('animationiteration'), + ); + var TOP_ANIMATION_START = unsafeCastStringToDOMTopLevelType( + getVendorPrefixedEventName('animationstart'), + ); + var TOP_BLUR = unsafeCastStringToDOMTopLevelType('blur'); + var TOP_CAN_PLAY = unsafeCastStringToDOMTopLevelType('canplay'); + var TOP_CAN_PLAY_THROUGH = unsafeCastStringToDOMTopLevelType('canplaythrough'); + var TOP_CANCEL = unsafeCastStringToDOMTopLevelType('cancel'); + var TOP_CHANGE = unsafeCastStringToDOMTopLevelType('change'); + var TOP_CLICK = unsafeCastStringToDOMTopLevelType('click'); + var TOP_CLOSE = unsafeCastStringToDOMTopLevelType('close'); + var TOP_COMPOSITION_END = unsafeCastStringToDOMTopLevelType('compositionend'); + var TOP_COMPOSITION_START = unsafeCastStringToDOMTopLevelType('compositionstart'); + var TOP_COMPOSITION_UPDATE = unsafeCastStringToDOMTopLevelType('compositionupdate'); + var TOP_CONTEXT_MENU = unsafeCastStringToDOMTopLevelType('contextmenu'); + var TOP_COPY = unsafeCastStringToDOMTopLevelType('copy'); + var TOP_CUT = unsafeCastStringToDOMTopLevelType('cut'); + var TOP_DOUBLE_CLICK = unsafeCastStringToDOMTopLevelType('dblclick'); + var TOP_AUX_CLICK = unsafeCastStringToDOMTopLevelType('auxclick'); + var TOP_DRAG = unsafeCastStringToDOMTopLevelType('drag'); + var TOP_DRAG_END = unsafeCastStringToDOMTopLevelType('dragend'); + var TOP_DRAG_ENTER = unsafeCastStringToDOMTopLevelType('dragenter'); + var TOP_DRAG_EXIT = unsafeCastStringToDOMTopLevelType('dragexit'); + var TOP_DRAG_LEAVE = unsafeCastStringToDOMTopLevelType('dragleave'); + var TOP_DRAG_OVER = unsafeCastStringToDOMTopLevelType('dragover'); + var TOP_DRAG_START = unsafeCastStringToDOMTopLevelType('dragstart'); + var TOP_DROP = unsafeCastStringToDOMTopLevelType('drop'); + var TOP_DURATION_CHANGE = unsafeCastStringToDOMTopLevelType('durationchange'); + var TOP_EMPTIED = unsafeCastStringToDOMTopLevelType('emptied'); + var TOP_ENCRYPTED = unsafeCastStringToDOMTopLevelType('encrypted'); + var TOP_ENDED = unsafeCastStringToDOMTopLevelType('ended'); + var TOP_ERROR = unsafeCastStringToDOMTopLevelType('error'); + var TOP_FOCUS = unsafeCastStringToDOMTopLevelType('focus'); + var TOP_GOT_POINTER_CAPTURE = unsafeCastStringToDOMTopLevelType('gotpointercapture'); + var TOP_INPUT = unsafeCastStringToDOMTopLevelType('input'); + var TOP_INVALID = unsafeCastStringToDOMTopLevelType('invalid'); + var TOP_KEY_DOWN = unsafeCastStringToDOMTopLevelType('keydown'); + var TOP_KEY_PRESS = unsafeCastStringToDOMTopLevelType('keypress'); + var TOP_KEY_UP = unsafeCastStringToDOMTopLevelType('keyup'); + var TOP_LOAD = unsafeCastStringToDOMTopLevelType('load'); + var TOP_LOAD_START = unsafeCastStringToDOMTopLevelType('loadstart'); + var TOP_LOADED_DATA = unsafeCastStringToDOMTopLevelType('loadeddata'); + var TOP_LOADED_METADATA = unsafeCastStringToDOMTopLevelType('loadedmetadata'); + var TOP_LOST_POINTER_CAPTURE = unsafeCastStringToDOMTopLevelType('lostpointercapture'); + var TOP_MOUSE_DOWN = unsafeCastStringToDOMTopLevelType('mousedown'); + var TOP_MOUSE_MOVE = unsafeCastStringToDOMTopLevelType('mousemove'); + var TOP_MOUSE_OUT = unsafeCastStringToDOMTopLevelType('mouseout'); + var TOP_MOUSE_OVER = unsafeCastStringToDOMTopLevelType('mouseover'); + var TOP_MOUSE_UP = unsafeCastStringToDOMTopLevelType('mouseup'); + var TOP_PASTE = unsafeCastStringToDOMTopLevelType('paste'); + var TOP_PAUSE = unsafeCastStringToDOMTopLevelType('pause'); + var TOP_PLAY = unsafeCastStringToDOMTopLevelType('play'); + var TOP_PLAYING = unsafeCastStringToDOMTopLevelType('playing'); + var TOP_POINTER_CANCEL = unsafeCastStringToDOMTopLevelType('pointercancel'); + var TOP_POINTER_DOWN = unsafeCastStringToDOMTopLevelType('pointerdown'); + + var TOP_POINTER_MOVE = unsafeCastStringToDOMTopLevelType('pointermove'); + var TOP_POINTER_OUT = unsafeCastStringToDOMTopLevelType('pointerout'); + var TOP_POINTER_OVER = unsafeCastStringToDOMTopLevelType('pointerover'); + var TOP_POINTER_UP = unsafeCastStringToDOMTopLevelType('pointerup'); + var TOP_PROGRESS = unsafeCastStringToDOMTopLevelType('progress'); + var TOP_RATE_CHANGE = unsafeCastStringToDOMTopLevelType('ratechange'); + var TOP_RESET = unsafeCastStringToDOMTopLevelType('reset'); + var TOP_SCROLL = unsafeCastStringToDOMTopLevelType('scroll'); + var TOP_SEEKED = unsafeCastStringToDOMTopLevelType('seeked'); + var TOP_SEEKING = unsafeCastStringToDOMTopLevelType('seeking'); + var TOP_SELECTION_CHANGE = unsafeCastStringToDOMTopLevelType('selectionchange'); + var TOP_STALLED = unsafeCastStringToDOMTopLevelType('stalled'); + var TOP_SUBMIT = unsafeCastStringToDOMTopLevelType('submit'); + var TOP_SUSPEND = unsafeCastStringToDOMTopLevelType('suspend'); + var TOP_TEXT_INPUT = unsafeCastStringToDOMTopLevelType('textInput'); + var TOP_TIME_UPDATE = unsafeCastStringToDOMTopLevelType('timeupdate'); + var TOP_TOGGLE = unsafeCastStringToDOMTopLevelType('toggle'); + var TOP_TOUCH_CANCEL = unsafeCastStringToDOMTopLevelType('touchcancel'); + var TOP_TOUCH_END = unsafeCastStringToDOMTopLevelType('touchend'); + var TOP_TOUCH_MOVE = unsafeCastStringToDOMTopLevelType('touchmove'); + var TOP_TOUCH_START = unsafeCastStringToDOMTopLevelType('touchstart'); + var TOP_TRANSITION_END = unsafeCastStringToDOMTopLevelType( + getVendorPrefixedEventName('transitionend'), + ); + var TOP_VOLUME_CHANGE = unsafeCastStringToDOMTopLevelType('volumechange'); + var TOP_WAITING = unsafeCastStringToDOMTopLevelType('waiting'); + var TOP_WHEEL = unsafeCastStringToDOMTopLevelType('wheel'); // List of events that need to be individually attached to media elements. + // Note that events in this list will *not* be listened to at the top level + // unless they're explicitly whitelisted in `ReactBrowserEventEmitter.listenTo`. + + var mediaEventTypes = [ + TOP_ABORT, + TOP_CAN_PLAY, + TOP_CAN_PLAY_THROUGH, + TOP_DURATION_CHANGE, + TOP_EMPTIED, + TOP_ENCRYPTED, + TOP_ENDED, + TOP_ERROR, + TOP_LOADED_DATA, + TOP_LOADED_METADATA, + TOP_LOAD_START, + TOP_PAUSE, + TOP_PLAY, + TOP_PLAYING, + TOP_PROGRESS, + TOP_RATE_CHANGE, + TOP_SEEKED, + TOP_SEEKING, + TOP_STALLED, + TOP_SUSPEND, + TOP_TIME_UPDATE, + TOP_VOLUME_CHANGE, + TOP_WAITING, + ]; + function getRawEventName(topLevelType) { + return unsafeCastDOMTopLevelTypeToString(topLevelType); + } + + /** + * `ReactInstanceMap` maintains a mapping from a public facing stateful + * instance (key) and the internal representation (value). This allows public + * methods to accept the user facing instance as an argument and map them back + * to internal methods. + * + * Note that this module is currently shared and assumed to be stateless. + * If this becomes an actual Map, that will break. + */ + + /** + * This API should be called `delete` but we'd have to make sure to always + * transform these to strings for IE support. When this transform is fully + * supported we can rename it. + */ + + function get(key) { + return key._reactInternalFiber; + } + function has(key) { + return key._reactInternalFiber !== undefined; + } + function set(key, value) { + key._reactInternalFiber = value; + } + + // Don't change these two values. They're used by React Dev Tools. + var NoEffect = + /* */ + 0; + var PerformedWork = + /* */ + 1; // You can change the rest (and add more). + + var Placement = + /* */ + 2; + var Update = + /* */ + 4; + var PlacementAndUpdate = + /* */ + 6; + var Deletion = + /* */ + 8; + var ContentReset = + /* */ + 16; + var Callback = + /* */ + 32; + var DidCapture = + /* */ + 64; + var Ref = + /* */ + 128; + var Snapshot = + /* */ + 256; + var Passive = + /* */ + 512; + var Hydrating = + /* */ + 1024; + var HydratingAndUpdate = + /* */ + 1028; // Passive & Update & Callback & Ref & Snapshot + + var LifecycleEffectMask = + /* */ + 932; // Union of all host effects + + var HostEffectMask = + /* */ + 2047; + var Incomplete = + /* */ + 2048; + var ShouldCapture = + /* */ + 4096; + + var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner; + function getNearestMountedFiber(fiber) { + var node = fiber; + var nearestMounted = fiber; + + if (!fiber.alternate) { + // If there is no alternate, this might be a new tree that isn't inserted + // yet. If it is, then it will have a pending insertion effect on it. + var nextNode = node; + + do { + node = nextNode; + + if ((node.effectTag & (Placement | Hydrating)) !== NoEffect) { + // This is an insertion or in-progress hydration. The nearest possible + // mounted fiber is the parent but we need to continue to figure out + // if that one is still mounted. + nearestMounted = node.return; + } + + nextNode = node.return; + } while (nextNode); + } else { + while (node.return) { + node = node.return; + } + } + + if (node.tag === HostRoot) { + // TODO: Check if this was a nested HostRoot when used with + // renderContainerIntoSubtree. + return nearestMounted; + } // If we didn't hit the root, that means that we're in an disconnected tree + // that has been unmounted. + + return null; + } + function getSuspenseInstanceFromFiber(fiber) { + if (fiber.tag === SuspenseComponent) { + var suspenseState = fiber.memoizedState; + + if (suspenseState === null) { + var current = fiber.alternate; + + if (current !== null) { + suspenseState = current.memoizedState; + } + } + + if (suspenseState !== null) { + return suspenseState.dehydrated; + } + } + + return null; + } + function getContainerFromFiber(fiber) { + return fiber.tag === HostRoot ? fiber.stateNode.containerInfo : null; + } + function isFiberMounted(fiber) { + return getNearestMountedFiber(fiber) === fiber; + } + function isMounted(component) { + { + var owner = ReactCurrentOwner.current; + + if (owner !== null && owner.tag === ClassComponent) { + var ownerFiber = owner; + var instance = ownerFiber.stateNode; + !instance._warnedAboutRefsInRender + ? warningWithoutStack$1( + false, + '%s is accessing isMounted inside its render() function. ' + + 'render() should be a pure function of props and state. It should ' + + 'never access something that requires stale data from the previous ' + + 'render, such as refs. Move this logic to componentDidMount and ' + + 'componentDidUpdate instead.', + getComponentName(ownerFiber.type) || 'A component', + ) + : void 0; + instance._warnedAboutRefsInRender = true; + } + } + + var fiber = get(component); + + if (!fiber) { + return false; + } + + return getNearestMountedFiber(fiber) === fiber; + } + + function assertIsMounted(fiber) { + if (!(getNearestMountedFiber(fiber) === fiber)) { + { + throw Error('Unable to find node on an unmounted component.'); + } + } + } + + function findCurrentFiberUsingSlowPath(fiber) { + var alternate = fiber.alternate; + + if (!alternate) { + // If there is no alternate, then we only need to check if it is mounted. + var nearestMounted = getNearestMountedFiber(fiber); + + if (!(nearestMounted !== null)) { + { + throw Error('Unable to find node on an unmounted component.'); + } + } + + if (nearestMounted !== fiber) { + return null; + } + + return fiber; + } // If we have two possible branches, we'll walk backwards up to the root + // to see what path the root points to. On the way we may hit one of the + // special cases and we'll deal with them. + + var a = fiber; + var b = alternate; + + while (true) { + var parentA = a.return; + + if (parentA === null) { + // We're at the root. + break; + } + + var parentB = parentA.alternate; + + if (parentB === null) { + // There is no alternate. This is an unusual case. Currently, it only + // happens when a Suspense component is hidden. An extra fragment fiber + // is inserted in between the Suspense fiber and its children. Skip + // over this extra fragment fiber and proceed to the next parent. + var nextParent = parentA.return; + + if (nextParent !== null) { + a = b = nextParent; + continue; + } // If there's no parent, we're at the root. + + break; + } // If both copies of the parent fiber point to the same child, we can + // assume that the child is current. This happens when we bailout on low + // priority: the bailed out fiber's child reuses the current child. + + if (parentA.child === parentB.child) { + var child = parentA.child; + + while (child) { + if (child === a) { + // We've determined that A is the current branch. + assertIsMounted(parentA); + return fiber; + } + + if (child === b) { + // We've determined that B is the current branch. + assertIsMounted(parentA); + return alternate; + } + + child = child.sibling; + } // We should never have an alternate for any mounting node. So the only + // way this could possibly happen is if this was unmounted, if at all. + + { + { + throw Error('Unable to find node on an unmounted component.'); + } + } + } + + if (a.return !== b.return) { + // The return pointer of A and the return pointer of B point to different + // fibers. We assume that return pointers never criss-cross, so A must + // belong to the child set of A.return, and B must belong to the child + // set of B.return. + a = parentA; + b = parentB; + } else { + // The return pointers point to the same fiber. We'll have to use the + // default, slow path: scan the child sets of each parent alternate to see + // which child belongs to which set. + // + // Search parent A's child set + var didFindChild = false; + var _child = parentA.child; + + while (_child) { + if (_child === a) { + didFindChild = true; + a = parentA; + b = parentB; + break; + } + + if (_child === b) { + didFindChild = true; + b = parentA; + a = parentB; + break; + } + + _child = _child.sibling; + } + + if (!didFindChild) { + // Search parent B's child set + _child = parentB.child; + + while (_child) { + if (_child === a) { + didFindChild = true; + a = parentB; + b = parentA; + break; + } + + if (_child === b) { + didFindChild = true; + b = parentB; + a = parentA; + break; + } + + _child = _child.sibling; + } + + if (!didFindChild) { + { + throw Error( + 'Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue.', + ); + } + } + } + } + + if (!(a.alternate === b)) { + { + throw Error( + "Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue.", + ); + } + } + } // If the root is not a host container, we're in a disconnected tree. I.e. + // unmounted. + + if (!(a.tag === HostRoot)) { + { + throw Error('Unable to find node on an unmounted component.'); + } + } + + if (a.stateNode.current === a) { + // We've determined that A is the current branch. + return fiber; + } // Otherwise B has to be current branch. + + return alternate; + } + function findCurrentHostFiber(parent) { + var currentParent = findCurrentFiberUsingSlowPath(parent); + + if (!currentParent) { + return null; + } // Next we'll drill down this component to find the first HostComponent/Text. + + var node = currentParent; + + while (true) { + if (node.tag === HostComponent || node.tag === HostText) { + return node; + } else if (node.child) { + node.child.return = node; + node = node.child; + continue; + } + + if (node === currentParent) { + return null; + } + + while (!node.sibling) { + if (!node.return || node.return === currentParent) { + return null; + } + + node = node.return; + } + + node.sibling.return = node.return; + node = node.sibling; + } // Flow needs the return null here, but ESLint complains about it. + // eslint-disable-next-line no-unreachable + + return null; + } + function findCurrentHostFiberWithNoPortals(parent) { + var currentParent = findCurrentFiberUsingSlowPath(parent); + + if (!currentParent) { + return null; + } // Next we'll drill down this component to find the first HostComponent/Text. + + var node = currentParent; + + while (true) { + if ( + node.tag === HostComponent || + node.tag === HostText || + (enableFundamentalAPI && node.tag === FundamentalComponent) + ) { + return node; + } else if (node.child && node.tag !== HostPortal) { + node.child.return = node; + node = node.child; + continue; + } + + if (node === currentParent) { + return null; + } + + while (!node.sibling) { + if (!node.return || node.return === currentParent) { + return null; + } + + node = node.return; + } + + node.sibling.return = node.return; + node = node.sibling; + } // Flow needs the return null here, but ESLint complains about it. + // eslint-disable-next-line no-unreachable + + return null; + } + + var attemptSynchronousHydration; + function setAttemptSynchronousHydration(fn) { + attemptSynchronousHydration = fn; + } + var attemptUserBlockingHydration; + function setAttemptUserBlockingHydration(fn) { + attemptUserBlockingHydration = fn; + } + var attemptContinuousHydration; + function setAttemptContinuousHydration(fn) { + attemptContinuousHydration = fn; + } + var attemptHydrationAtCurrentPriority; + function setAttemptHydrationAtCurrentPriority(fn) { + attemptHydrationAtCurrentPriority = fn; + } // TODO: Upgrade this definition once we're on a newer version of Flow that + // has this definition built-in. + + var hasScheduledReplayAttempt = false; // The queue of discrete events to be replayed. + + var queuedDiscreteEvents = []; // Indicates if any continuous event targets are non-null for early bailout. + + // if the last target was dehydrated. + + var queuedFocus = null; + var queuedDrag = null; + var queuedMouse = null; // For pointer events there can be one latest event per pointerId. + + var queuedPointers = new Map(); + var queuedPointerCaptures = new Map(); // We could consider replaying selectionchange and touchmoves too. + + var queuedExplicitHydrationTargets = []; + function hasQueuedDiscreteEvents() { + return queuedDiscreteEvents.length > 0; + } + + var discreteReplayableEvents = [ + TOP_MOUSE_DOWN, + TOP_MOUSE_UP, + TOP_TOUCH_CANCEL, + TOP_TOUCH_END, + TOP_TOUCH_START, + TOP_AUX_CLICK, + TOP_DOUBLE_CLICK, + TOP_POINTER_CANCEL, + TOP_POINTER_DOWN, + TOP_POINTER_UP, + TOP_DRAG_END, + TOP_DRAG_START, + TOP_DROP, + TOP_COMPOSITION_END, + TOP_COMPOSITION_START, + TOP_KEY_DOWN, + TOP_KEY_PRESS, + TOP_KEY_UP, + TOP_INPUT, + TOP_TEXT_INPUT, + TOP_CLOSE, + TOP_CANCEL, + TOP_COPY, + TOP_CUT, + TOP_PASTE, + TOP_CLICK, + TOP_CHANGE, + TOP_CONTEXT_MENU, + TOP_RESET, + TOP_SUBMIT, + ]; + var continuousReplayableEvents = [ + TOP_FOCUS, + TOP_BLUR, + TOP_DRAG_ENTER, + TOP_DRAG_LEAVE, + TOP_MOUSE_OVER, + TOP_MOUSE_OUT, + TOP_POINTER_OVER, + TOP_POINTER_OUT, + TOP_GOT_POINTER_CAPTURE, + TOP_LOST_POINTER_CAPTURE, + ]; + function isReplayableDiscreteEvent(eventType) { + return discreteReplayableEvents.indexOf(eventType) > -1; + } + + function trapReplayableEvent(topLevelType, document, listeningSet) { + listenToTopLevel(topLevelType, document, listeningSet); + + if (enableFlareAPI) { + // Trap events for the responder system. + var passiveEventKey = unsafeCastDOMTopLevelTypeToString(topLevelType) + '_passive'; + + if (!listeningSet.has(passiveEventKey)) { + trapEventForResponderEventSystem(document, topLevelType, true); + listeningSet.add(passiveEventKey); + } // TODO: This listens to all events as active which might have + // undesirable effects. It's also unnecessary to have both + // passive and active listeners. Instead, we could start with + // a passive and upgrade it to an active one if needed. + // For replaying purposes the active is never needed since we + // currently don't preventDefault. + + var activeEventKey = unsafeCastDOMTopLevelTypeToString(topLevelType) + '_active'; + + if (!listeningSet.has(activeEventKey)) { + trapEventForResponderEventSystem(document, topLevelType, false); + listeningSet.add(activeEventKey); + } + } + } + + function eagerlyTrapReplayableEvents(document) { + var listeningSet = getListeningSetForElement(document); // Discrete + + discreteReplayableEvents.forEach(function (topLevelType) { + trapReplayableEvent(topLevelType, document, listeningSet); + }); // Continuous + + continuousReplayableEvents.forEach(function (topLevelType) { + trapReplayableEvent(topLevelType, document, listeningSet); + }); + } + + function createQueuedReplayableEvent(blockedOn, topLevelType, eventSystemFlags, nativeEvent) { + return { + blockedOn: blockedOn, + topLevelType: topLevelType, + eventSystemFlags: eventSystemFlags | IS_REPLAYED, + nativeEvent: nativeEvent, + }; + } + + function queueDiscreteEvent(blockedOn, topLevelType, eventSystemFlags, nativeEvent) { + var queuedEvent = createQueuedReplayableEvent( + blockedOn, + topLevelType, + eventSystemFlags, + nativeEvent, + ); + queuedDiscreteEvents.push(queuedEvent); + + if (enableSelectiveHydration) { + if (queuedDiscreteEvents.length === 1) { + // If this was the first discrete event, we might be able to + // synchronously unblock it so that preventDefault still works. + while (queuedEvent.blockedOn !== null) { + var _fiber = getInstanceFromNode$1(queuedEvent.blockedOn); + + if (_fiber === null) { + break; + } + + attemptSynchronousHydration(_fiber); + + if (queuedEvent.blockedOn === null) { + // We got unblocked by hydration. Let's try again. + replayUnblockedEvents(); // If we're reblocked, on an inner boundary, we might need + // to attempt hydrating that one. + + continue; + } else { + // We're still blocked from hydation, we have to give up + // and replay later. + break; + } + } + } + } + } // Resets the replaying for this type of continuous event to no event. + + function clearIfContinuousEvent(topLevelType, nativeEvent) { + switch (topLevelType) { + case TOP_FOCUS: + case TOP_BLUR: + queuedFocus = null; + break; + + case TOP_DRAG_ENTER: + case TOP_DRAG_LEAVE: + queuedDrag = null; + break; + + case TOP_MOUSE_OVER: + case TOP_MOUSE_OUT: + queuedMouse = null; + break; + + case TOP_POINTER_OVER: + case TOP_POINTER_OUT: { + var pointerId = nativeEvent.pointerId; + queuedPointers.delete(pointerId); + break; + } + + case TOP_GOT_POINTER_CAPTURE: + case TOP_LOST_POINTER_CAPTURE: { + var _pointerId = nativeEvent.pointerId; + queuedPointerCaptures.delete(_pointerId); + break; + } + } + } + + function accumulateOrCreateContinuousQueuedReplayableEvent( + existingQueuedEvent, + blockedOn, + topLevelType, + eventSystemFlags, + nativeEvent, + ) { + if (existingQueuedEvent === null || existingQueuedEvent.nativeEvent !== nativeEvent) { + var queuedEvent = createQueuedReplayableEvent( + blockedOn, + topLevelType, + eventSystemFlags, + nativeEvent, + ); + + if (blockedOn !== null) { + var _fiber2 = getInstanceFromNode$1(blockedOn); + + if (_fiber2 !== null) { + // Attempt to increase the priority of this target. + attemptContinuousHydration(_fiber2); + } + } + + return queuedEvent; + } // If we have already queued this exact event, then it's because + // the different event systems have different DOM event listeners. + // We can accumulate the flags and store a single event to be + // replayed. + + existingQueuedEvent.eventSystemFlags |= eventSystemFlags; + return existingQueuedEvent; + } + + function queueIfContinuousEvent(blockedOn, topLevelType, eventSystemFlags, nativeEvent) { + // These set relatedTarget to null because the replayed event will be treated as if we + // moved from outside the window (no target) onto the target once it hydrates. + // Instead of mutating we could clone the event. + switch (topLevelType) { + case TOP_FOCUS: { + var focusEvent = nativeEvent; + queuedFocus = accumulateOrCreateContinuousQueuedReplayableEvent( + queuedFocus, + blockedOn, + topLevelType, + eventSystemFlags, + focusEvent, + ); + return true; + } + + case TOP_DRAG_ENTER: { + var dragEvent = nativeEvent; + queuedDrag = accumulateOrCreateContinuousQueuedReplayableEvent( + queuedDrag, + blockedOn, + topLevelType, + eventSystemFlags, + dragEvent, + ); + return true; + } + + case TOP_MOUSE_OVER: { + var mouseEvent = nativeEvent; + queuedMouse = accumulateOrCreateContinuousQueuedReplayableEvent( + queuedMouse, + blockedOn, + topLevelType, + eventSystemFlags, + mouseEvent, + ); + return true; + } + + case TOP_POINTER_OVER: { + var pointerEvent = nativeEvent; + var pointerId = pointerEvent.pointerId; + queuedPointers.set( + pointerId, + accumulateOrCreateContinuousQueuedReplayableEvent( + queuedPointers.get(pointerId) || null, + blockedOn, + topLevelType, + eventSystemFlags, + pointerEvent, + ), + ); + return true; + } + + case TOP_GOT_POINTER_CAPTURE: { + var _pointerEvent = nativeEvent; + var _pointerId2 = _pointerEvent.pointerId; + queuedPointerCaptures.set( + _pointerId2, + accumulateOrCreateContinuousQueuedReplayableEvent( + queuedPointerCaptures.get(_pointerId2) || null, + blockedOn, + topLevelType, + eventSystemFlags, + _pointerEvent, + ), + ); + return true; + } + } + + return false; + } // Check if this target is unblocked. Returns true if it's unblocked. + + function attemptExplicitHydrationTarget(queuedTarget) { + // TODO: This function shares a lot of logic with attemptToDispatchEvent. + // Try to unify them. It's a bit tricky since it would require two return + // values. + var targetInst = getClosestInstanceFromNode(queuedTarget.target); + + if (targetInst !== null) { + var nearestMounted = getNearestMountedFiber(targetInst); + + if (nearestMounted !== null) { + var tag = nearestMounted.tag; + + if (tag === SuspenseComponent) { + var instance = getSuspenseInstanceFromFiber(nearestMounted); + + if (instance !== null) { + // We're blocked on hydrating this boundary. + // Increase its priority. + queuedTarget.blockedOn = instance; + Scheduler.unstable_runWithPriority(queuedTarget.priority, function () { + attemptHydrationAtCurrentPriority(nearestMounted); + }); + return; + } + } else if (tag === HostRoot) { + var root = nearestMounted.stateNode; + + if (root.hydrate) { + queuedTarget.blockedOn = getContainerFromFiber(nearestMounted); // We don't currently have a way to increase the priority of + // a root other than sync. + + return; + } + } + } + } + + queuedTarget.blockedOn = null; + } + + function queueExplicitHydrationTarget(target) { + if (enableSelectiveHydration) { + var priority = Scheduler.unstable_getCurrentPriorityLevel(); + var queuedTarget = { + blockedOn: null, + target: target, + priority: priority, + }; + var i = 0; + + for (; i < queuedExplicitHydrationTargets.length; i++) { + if (priority <= queuedExplicitHydrationTargets[i].priority) { + break; + } + } + + queuedExplicitHydrationTargets.splice(i, 0, queuedTarget); + + if (i === 0) { + attemptExplicitHydrationTarget(queuedTarget); + } + } + } + + function attemptReplayContinuousQueuedEvent(queuedEvent) { + if (queuedEvent.blockedOn !== null) { + return false; + } + + var nextBlockedOn = attemptToDispatchEvent( + queuedEvent.topLevelType, + queuedEvent.eventSystemFlags, + queuedEvent.nativeEvent, + ); + + if (nextBlockedOn !== null) { + // We're still blocked. Try again later. + var _fiber3 = getInstanceFromNode$1(nextBlockedOn); + + if (_fiber3 !== null) { + attemptContinuousHydration(_fiber3); + } + + queuedEvent.blockedOn = nextBlockedOn; + return false; + } + + return true; + } + + function attemptReplayContinuousQueuedEventInMap(queuedEvent, key, map) { + if (attemptReplayContinuousQueuedEvent(queuedEvent)) { + map.delete(key); + } + } + + function replayUnblockedEvents() { + hasScheduledReplayAttempt = false; // First replay discrete events. + + while (queuedDiscreteEvents.length > 0) { + var nextDiscreteEvent = queuedDiscreteEvents[0]; + + if (nextDiscreteEvent.blockedOn !== null) { + // We're still blocked. + // Increase the priority of this boundary to unblock + // the next discrete event. + var _fiber4 = getInstanceFromNode$1(nextDiscreteEvent.blockedOn); + + if (_fiber4 !== null) { + attemptUserBlockingHydration(_fiber4); + } + + break; + } + + var nextBlockedOn = attemptToDispatchEvent( + nextDiscreteEvent.topLevelType, + nextDiscreteEvent.eventSystemFlags, + nextDiscreteEvent.nativeEvent, + ); + + if (nextBlockedOn !== null) { + // We're still blocked. Try again later. + nextDiscreteEvent.blockedOn = nextBlockedOn; + } else { + // We've successfully replayed the first event. Let's try the next one. + queuedDiscreteEvents.shift(); + } + } // Next replay any continuous events. + + if (queuedFocus !== null && attemptReplayContinuousQueuedEvent(queuedFocus)) { + queuedFocus = null; + } + + if (queuedDrag !== null && attemptReplayContinuousQueuedEvent(queuedDrag)) { + queuedDrag = null; + } + + if (queuedMouse !== null && attemptReplayContinuousQueuedEvent(queuedMouse)) { + queuedMouse = null; + } + + queuedPointers.forEach(attemptReplayContinuousQueuedEventInMap); + queuedPointerCaptures.forEach(attemptReplayContinuousQueuedEventInMap); + } + + function scheduleCallbackIfUnblocked(queuedEvent, unblocked) { + if (queuedEvent.blockedOn === unblocked) { + queuedEvent.blockedOn = null; + + if (!hasScheduledReplayAttempt) { + hasScheduledReplayAttempt = true; // Schedule a callback to attempt replaying as many events as are + // now unblocked. This first might not actually be unblocked yet. + // We could check it early to avoid scheduling an unnecessary callback. + + Scheduler.unstable_scheduleCallback(Scheduler.unstable_NormalPriority, replayUnblockedEvents); + } + } + } + + function retryIfBlockedOn(unblocked) { + // Mark anything that was blocked on this as no longer blocked + // and eligible for a replay. + if (queuedDiscreteEvents.length > 0) { + scheduleCallbackIfUnblocked(queuedDiscreteEvents[0], unblocked); // This is a exponential search for each boundary that commits. I think it's + // worth it because we expect very few discrete events to queue up and once + // we are actually fully unblocked it will be fast to replay them. + + for (var i = 1; i < queuedDiscreteEvents.length; i++) { + var queuedEvent = queuedDiscreteEvents[i]; + + if (queuedEvent.blockedOn === unblocked) { + queuedEvent.blockedOn = null; + } + } + } + + if (queuedFocus !== null) { + scheduleCallbackIfUnblocked(queuedFocus, unblocked); + } + + if (queuedDrag !== null) { + scheduleCallbackIfUnblocked(queuedDrag, unblocked); + } + + if (queuedMouse !== null) { + scheduleCallbackIfUnblocked(queuedMouse, unblocked); + } + + var unblock = function (queuedEvent) { + return scheduleCallbackIfUnblocked(queuedEvent, unblocked); + }; + + queuedPointers.forEach(unblock); + queuedPointerCaptures.forEach(unblock); + + for (var _i = 0; _i < queuedExplicitHydrationTargets.length; _i++) { + var queuedTarget = queuedExplicitHydrationTargets[_i]; + + if (queuedTarget.blockedOn === unblocked) { + queuedTarget.blockedOn = null; + } + } + + while (queuedExplicitHydrationTargets.length > 0) { + var nextExplicitTarget = queuedExplicitHydrationTargets[0]; + + if (nextExplicitTarget.blockedOn !== null) { + // We're still blocked. + break; + } else { + attemptExplicitHydrationTarget(nextExplicitTarget); + + if (nextExplicitTarget.blockedOn === null) { + // We're unblocked. + queuedExplicitHydrationTargets.shift(); + } + } + } + } + + function addEventBubbleListener(element, eventType, listener) { + element.addEventListener(eventType, listener, false); + } + function addEventCaptureListener(element, eventType, listener) { + element.addEventListener(eventType, listener, true); + } + function addEventCaptureListenerWithPassiveFlag(element, eventType, listener, passive) { + element.addEventListener(eventType, listener, { + capture: true, + passive: passive, + }); + } + + /** + * Gets the target node from a native browser event by accounting for + * inconsistencies in browser DOM APIs. + * + * @param {object} nativeEvent Native browser event. + * @return {DOMEventTarget} Target node. + */ + + function getEventTarget(nativeEvent) { + // Fallback to nativeEvent.srcElement for IE9 + // https://github.com/facebook/react/issues/12506 + var target = nativeEvent.target || nativeEvent.srcElement || window; // Normalize SVG <use> element events #4963 + + if (target.correspondingUseElement) { + target = target.correspondingUseElement; + } // Safari may fire events on text nodes (Node.TEXT_NODE is 3). + // @see http://www.quirksmode.org/js/events_properties.html + + return target.nodeType === TEXT_NODE ? target.parentNode : target; + } + + function getParent(inst) { + do { + inst = inst.return; // TODO: If this is a HostRoot we might want to bail out. + // That is depending on if we want nested subtrees (layers) to bubble + // events to their parent. We could also go through parentNode on the + // host node but that wouldn't work for React Native and doesn't let us + // do the portal feature. + } while (inst && inst.tag !== HostComponent); + + if (inst) { + return inst; + } + + return null; + } + /** + * Return the lowest common ancestor of A and B, or null if they are in + * different trees. + */ + + function getLowestCommonAncestor(instA, instB) { + var depthA = 0; + + for (var tempA = instA; tempA; tempA = getParent(tempA)) { + depthA++; + } + + var depthB = 0; + + for (var tempB = instB; tempB; tempB = getParent(tempB)) { + depthB++; + } // If A is deeper, crawl up. + + while (depthA - depthB > 0) { + instA = getParent(instA); + depthA--; + } // If B is deeper, crawl up. + + while (depthB - depthA > 0) { + instB = getParent(instB); + depthB--; + } // Walk in lockstep until we find a match. + + var depth = depthA; + + while (depth--) { + if (instA === instB || instA === instB.alternate) { + return instA; + } + + instA = getParent(instA); + instB = getParent(instB); + } + + return null; + } + /** + * Return if A is an ancestor of B. + */ + + /** + * Return the parent instance of the passed-in instance. + */ + + /** + * Simulates the traversal of a two-phase, capture/bubble event dispatch. + */ + + function traverseTwoPhase(inst, fn, arg) { + var path = []; + + while (inst) { + path.push(inst); + inst = getParent(inst); + } + + var i; + + for (i = path.length; i-- > 0; ) { + fn(path[i], 'captured', arg); + } + + for (i = 0; i < path.length; i++) { + fn(path[i], 'bubbled', arg); + } + } + /** + * Traverses the ID hierarchy and invokes the supplied `cb` on any IDs that + * should would receive a `mouseEnter` or `mouseLeave` event. + * + * Does not invoke the callback on the nearest common ancestor because nothing + * "entered" or "left" that element. + */ + + function traverseEnterLeave(from, to, fn, argFrom, argTo) { + var common = from && to ? getLowestCommonAncestor(from, to) : null; + var pathFrom = []; + + while (true) { + if (!from) { + break; + } + + if (from === common) { + break; + } + + var alternate = from.alternate; + + if (alternate !== null && alternate === common) { + break; + } + + pathFrom.push(from); + from = getParent(from); + } + + var pathTo = []; + + while (true) { + if (!to) { + break; + } + + if (to === common) { + break; + } + + var _alternate = to.alternate; + + if (_alternate !== null && _alternate === common) { + break; + } + + pathTo.push(to); + to = getParent(to); + } + + for (var i = 0; i < pathFrom.length; i++) { + fn(pathFrom[i], 'bubbled', argFrom); + } + + for (var _i = pathTo.length; _i-- > 0; ) { + fn(pathTo[_i], 'captured', argTo); + } + } + + /** + * Some event types have a notion of different registration names for different + * "phases" of propagation. This finds listeners by a given phase. + */ + function listenerAtPhase(inst, event, propagationPhase) { + var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase]; + return getListener(inst, registrationName); + } + /** + * A small set of propagation patterns, each of which will accept a small amount + * of information, and generate a set of "dispatch ready event objects" - which + * are sets of events that have already been annotated with a set of dispatched + * listener functions/ids. The API is designed this way to discourage these + * propagation strategies from actually executing the dispatches, since we + * always want to collect the entire set of dispatches before executing even a + * single one. + */ + + /** + * Tags a `SyntheticEvent` with dispatched listeners. Creating this function + * here, allows us to not have to bind or create functions for each event. + * Mutating the event's members allows us to not have to create a wrapping + * "dispatch" object that pairs the event with the listener. + */ + + function accumulateDirectionalDispatches(inst, phase, event) { + { + !inst ? warningWithoutStack$1(false, 'Dispatching inst must not be null') : void 0; + } + + var listener = listenerAtPhase(inst, event, phase); + + if (listener) { + event._dispatchListeners = accumulateInto(event._dispatchListeners, listener); + event._dispatchInstances = accumulateInto(event._dispatchInstances, inst); + } + } + /** + * Collect dispatches (must be entirely collected before dispatching - see unit + * tests). Lazily allocate the array to conserve memory. We must loop through + * each event and perform the traversal for each one. We cannot perform a + * single traversal for the entire collection of events because each event may + * have a different target. + */ + + function accumulateTwoPhaseDispatchesSingle(event) { + if (event && event.dispatchConfig.phasedRegistrationNames) { + traverseTwoPhase(event._targetInst, accumulateDirectionalDispatches, event); + } + } + /** + * Accumulates without regard to direction, does not look for phased + * registration names. Same as `accumulateDirectDispatchesSingle` but without + * requiring that the `dispatchMarker` be the same as the dispatched ID. + */ + + function accumulateDispatches(inst, ignoredDirection, event) { + if (inst && event && event.dispatchConfig.registrationName) { + var registrationName = event.dispatchConfig.registrationName; + var listener = getListener(inst, registrationName); + + if (listener) { + event._dispatchListeners = accumulateInto(event._dispatchListeners, listener); + event._dispatchInstances = accumulateInto(event._dispatchInstances, inst); + } + } + } + /** + * Accumulates dispatches on an `SyntheticEvent`, but only for the + * `dispatchMarker`. + * @param {SyntheticEvent} event + */ + + function accumulateDirectDispatchesSingle(event) { + if (event && event.dispatchConfig.registrationName) { + accumulateDispatches(event._targetInst, null, event); + } + } + + function accumulateTwoPhaseDispatches(events) { + forEachAccumulated(events, accumulateTwoPhaseDispatchesSingle); + } + + function accumulateEnterLeaveDispatches(leave, enter, from, to) { + traverseEnterLeave(from, to, accumulateDispatches, leave, enter); + } + function accumulateDirectDispatches(events) { + forEachAccumulated(events, accumulateDirectDispatchesSingle); + } + + /* eslint valid-typeof: 0 */ + var EVENT_POOL_SIZE = 10; + /** + * @interface Event + * @see http://www.w3.org/TR/DOM-Level-3-Events/ + */ + + var EventInterface = { + type: null, + target: null, + // currentTarget is set when dispatching; no use in copying it here + currentTarget: function () { + return null; + }, + eventPhase: null, + bubbles: null, + cancelable: null, + timeStamp: function (event) { + return event.timeStamp || Date.now(); + }, + defaultPrevented: null, + isTrusted: null, + }; + + function functionThatReturnsTrue() { + return true; + } + + function functionThatReturnsFalse() { + return false; + } + /** + * Synthetic events are dispatched by event plugins, typically in response to a + * top-level event delegation handler. + * + * These systems should generally use pooling to reduce the frequency of garbage + * collection. The system should check `isPersistent` to determine whether the + * event should be released into the pool after being dispatched. Users that + * need a persisted event should invoke `persist`. + * + * Synthetic events (and subclasses) implement the DOM Level 3 Events API by + * normalizing browser quirks. Subclasses do not necessarily have to implement a + * DOM interface; custom application-specific events can also subclass this. + * + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {*} targetInst Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @param {DOMEventTarget} nativeEventTarget Target node. + */ + + function SyntheticEvent(dispatchConfig, targetInst, nativeEvent, nativeEventTarget) { + { + // these have a getter/setter for warnings + delete this.nativeEvent; + delete this.preventDefault; + delete this.stopPropagation; + delete this.isDefaultPrevented; + delete this.isPropagationStopped; + } + + this.dispatchConfig = dispatchConfig; + this._targetInst = targetInst; + this.nativeEvent = nativeEvent; + var Interface = this.constructor.Interface; + + for (var propName in Interface) { + if (!Interface.hasOwnProperty(propName)) { + continue; + } + + { + delete this[propName]; // this has a getter/setter for warnings + } + + var normalize = Interface[propName]; + + if (normalize) { + this[propName] = normalize(nativeEvent); + } else { + if (propName === 'target') { + this.target = nativeEventTarget; + } else { + this[propName] = nativeEvent[propName]; + } + } + } + + var defaultPrevented = + nativeEvent.defaultPrevented != null + ? nativeEvent.defaultPrevented + : nativeEvent.returnValue === false; + + if (defaultPrevented) { + this.isDefaultPrevented = functionThatReturnsTrue; + } else { + this.isDefaultPrevented = functionThatReturnsFalse; + } + + this.isPropagationStopped = functionThatReturnsFalse; + return this; + } + + _assign(SyntheticEvent.prototype, { + preventDefault: function () { + this.defaultPrevented = true; + var event = this.nativeEvent; + + if (!event) { + return; + } + + if (event.preventDefault) { + event.preventDefault(); + } else if (typeof event.returnValue !== 'unknown') { + event.returnValue = false; + } + + this.isDefaultPrevented = functionThatReturnsTrue; + }, + stopPropagation: function () { + var event = this.nativeEvent; + + if (!event) { + return; + } + + if (event.stopPropagation) { + event.stopPropagation(); + } else if (typeof event.cancelBubble !== 'unknown') { + // The ChangeEventPlugin registers a "propertychange" event for + // IE. This event does not support bubbling or cancelling, and + // any references to cancelBubble throw "Member not found". A + // typeof check of "unknown" circumvents this issue (and is also + // IE specific). + event.cancelBubble = true; + } + + this.isPropagationStopped = functionThatReturnsTrue; + }, + + /** + * We release all dispatched `SyntheticEvent`s after each event loop, adding + * them back into the pool. This allows a way to hold onto a reference that + * won't be added back into the pool. + */ + persist: function () { + this.isPersistent = functionThatReturnsTrue; + }, + + /** + * Checks if this event should be released back into the pool. + * + * @return {boolean} True if this should not be released, false otherwise. + */ + isPersistent: functionThatReturnsFalse, + + /** + * `PooledClass` looks for `destructor` on each instance it releases. + */ + destructor: function () { + var Interface = this.constructor.Interface; + + for (var propName in Interface) { + { + Object.defineProperty( + this, + propName, + getPooledWarningPropertyDefinition(propName, Interface[propName]), + ); + } + } + + this.dispatchConfig = null; + this._targetInst = null; + this.nativeEvent = null; + this.isDefaultPrevented = functionThatReturnsFalse; + this.isPropagationStopped = functionThatReturnsFalse; + this._dispatchListeners = null; + this._dispatchInstances = null; + + { + Object.defineProperty( + this, + 'nativeEvent', + getPooledWarningPropertyDefinition('nativeEvent', null), + ); + Object.defineProperty( + this, + 'isDefaultPrevented', + getPooledWarningPropertyDefinition('isDefaultPrevented', functionThatReturnsFalse), + ); + Object.defineProperty( + this, + 'isPropagationStopped', + getPooledWarningPropertyDefinition('isPropagationStopped', functionThatReturnsFalse), + ); + Object.defineProperty( + this, + 'preventDefault', + getPooledWarningPropertyDefinition('preventDefault', function () {}), + ); + Object.defineProperty( + this, + 'stopPropagation', + getPooledWarningPropertyDefinition('stopPropagation', function () {}), + ); + } + }, + }); + + SyntheticEvent.Interface = EventInterface; + /** + * Helper to reduce boilerplate when creating subclasses. + */ + + SyntheticEvent.extend = function (Interface) { + var Super = this; + + var E = function () {}; + + E.prototype = Super.prototype; + var prototype = new E(); + + function Class() { + return Super.apply(this, arguments); + } + + _assign(prototype, Class.prototype); + + Class.prototype = prototype; + Class.prototype.constructor = Class; + Class.Interface = _assign({}, Super.Interface, Interface); + Class.extend = Super.extend; + addEventPoolingTo(Class); + return Class; + }; + + addEventPoolingTo(SyntheticEvent); + /** + * Helper to nullify syntheticEvent instance properties when destructing + * + * @param {String} propName + * @param {?object} getVal + * @return {object} defineProperty object + */ + + function getPooledWarningPropertyDefinition(propName, getVal) { + var isFunction = typeof getVal === 'function'; + return { + configurable: true, + set: set, + get: get, + }; + + function set(val) { + var action = isFunction ? 'setting the method' : 'setting the property'; + warn(action, 'This is effectively a no-op'); + return val; + } + + function get() { + var action = isFunction ? 'accessing the method' : 'accessing the property'; + var result = isFunction ? 'This is a no-op function' : 'This is set to null'; + warn(action, result); + return getVal; + } + + function warn(action, result) { + var warningCondition = false; + !warningCondition + ? warningWithoutStack$1( + false, + "This synthetic event is reused for performance reasons. If you're seeing this, " + + "you're %s `%s` on a released/nullified synthetic event. %s. " + + 'If you must keep the original synthetic event around, use event.persist(). ' + + 'See https://fb.me/react-event-pooling for more information.', + action, + propName, + result, + ) + : void 0; + } + } + + function getPooledEvent(dispatchConfig, targetInst, nativeEvent, nativeInst) { + var EventConstructor = this; + + if (EventConstructor.eventPool.length) { + var instance = EventConstructor.eventPool.pop(); + EventConstructor.call(instance, dispatchConfig, targetInst, nativeEvent, nativeInst); + return instance; + } + + return new EventConstructor(dispatchConfig, targetInst, nativeEvent, nativeInst); + } + + function releasePooledEvent(event) { + var EventConstructor = this; + + if (!(event instanceof EventConstructor)) { + { + throw Error('Trying to release an event instance into a pool of a different type.'); + } + } + + event.destructor(); + + if (EventConstructor.eventPool.length < EVENT_POOL_SIZE) { + EventConstructor.eventPool.push(event); + } + } + + function addEventPoolingTo(EventConstructor) { + EventConstructor.eventPool = []; + EventConstructor.getPooled = getPooledEvent; + EventConstructor.release = releasePooledEvent; + } + + /** + * @interface Event + * @see http://www.w3.org/TR/css3-animations/#AnimationEvent-interface + * @see https://developer.mozilla.org/en-US/docs/Web/API/AnimationEvent + */ + + var SyntheticAnimationEvent = SyntheticEvent.extend({ + animationName: null, + elapsedTime: null, + pseudoElement: null, + }); + + /** + * @interface Event + * @see http://www.w3.org/TR/clipboard-apis/ + */ + + var SyntheticClipboardEvent = SyntheticEvent.extend({ + clipboardData: function (event) { + return 'clipboardData' in event ? event.clipboardData : window.clipboardData; + }, + }); + + var SyntheticUIEvent = SyntheticEvent.extend({ + view: null, + detail: null, + }); + + /** + * @interface FocusEvent + * @see http://www.w3.org/TR/DOM-Level-3-Events/ + */ + + var SyntheticFocusEvent = SyntheticUIEvent.extend({ + relatedTarget: null, + }); + + /** + * `charCode` represents the actual "character code" and is safe to use with + * `String.fromCharCode`. As such, only keys that correspond to printable + * characters produce a valid `charCode`, the only exception to this is Enter. + * The Tab-key is considered non-printable and does not have a `charCode`, + * presumably because it does not produce a tab-character in browsers. + * + * @param {object} nativeEvent Native browser event. + * @return {number} Normalized `charCode` property. + */ + function getEventCharCode(nativeEvent) { + var charCode; + var keyCode = nativeEvent.keyCode; + + if ('charCode' in nativeEvent) { + charCode = nativeEvent.charCode; // FF does not set `charCode` for the Enter-key, check against `keyCode`. + + if (charCode === 0 && keyCode === 13) { + charCode = 13; + } + } else { + // IE8 does not implement `charCode`, but `keyCode` has the correct value. + charCode = keyCode; + } // IE and Edge (on Windows) and Chrome / Safari (on Windows and Linux) + // report Enter as charCode 10 when ctrl is pressed. + + if (charCode === 10) { + charCode = 13; + } // Some non-printable keys are reported in `charCode`/`keyCode`, discard them. + // Must not discard the (non-)printable Enter-key. + + if (charCode >= 32 || charCode === 13) { + return charCode; + } + + return 0; + } + + /** + * Normalization of deprecated HTML5 `key` values + * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names + */ + + var normalizeKey = { + Esc: 'Escape', + Spacebar: ' ', + Left: 'ArrowLeft', + Up: 'ArrowUp', + Right: 'ArrowRight', + Down: 'ArrowDown', + Del: 'Delete', + Win: 'OS', + Menu: 'ContextMenu', + Apps: 'ContextMenu', + Scroll: 'ScrollLock', + MozPrintableKey: 'Unidentified', + }; + /** + * Translation from legacy `keyCode` to HTML5 `key` + * Only special keys supported, all others depend on keyboard layout or browser + * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names + */ + + var translateToKey = { + 8: 'Backspace', + 9: 'Tab', + 12: 'Clear', + 13: 'Enter', + 16: 'Shift', + 17: 'Control', + 18: 'Alt', + 19: 'Pause', + 20: 'CapsLock', + 27: 'Escape', + 32: ' ', + 33: 'PageUp', + 34: 'PageDown', + 35: 'End', + 36: 'Home', + 37: 'ArrowLeft', + 38: 'ArrowUp', + 39: 'ArrowRight', + 40: 'ArrowDown', + 45: 'Insert', + 46: 'Delete', + 112: 'F1', + 113: 'F2', + 114: 'F3', + 115: 'F4', + 116: 'F5', + 117: 'F6', + 118: 'F7', + 119: 'F8', + 120: 'F9', + 121: 'F10', + 122: 'F11', + 123: 'F12', + 144: 'NumLock', + 145: 'ScrollLock', + 224: 'Meta', + }; + /** + * @param {object} nativeEvent Native browser event. + * @return {string} Normalized `key` property. + */ + + function getEventKey(nativeEvent) { + if (nativeEvent.key) { + // Normalize inconsistent values reported by browsers due to + // implementations of a working draft specification. + // FireFox implements `key` but returns `MozPrintableKey` for all + // printable characters (normalized to `Unidentified`), ignore it. + var key = normalizeKey[nativeEvent.key] || nativeEvent.key; + + if (key !== 'Unidentified') { + return key; + } + } // Browser does not implement `key`, polyfill as much of it as we can. + + if (nativeEvent.type === 'keypress') { + var charCode = getEventCharCode(nativeEvent); // The enter-key is technically both printable and non-printable and can + // thus be captured by `keypress`, no other non-printable key should. + + return charCode === 13 ? 'Enter' : String.fromCharCode(charCode); + } + + if (nativeEvent.type === 'keydown' || nativeEvent.type === 'keyup') { + // While user keyboard layout determines the actual meaning of each + // `keyCode` value, almost all function keys have a universal value. + return translateToKey[nativeEvent.keyCode] || 'Unidentified'; + } + + return ''; + } + + /** + * Translation from modifier key to the associated property in the event. + * @see http://www.w3.org/TR/DOM-Level-3-Events/#keys-Modifiers + */ + var modifierKeyToProp = { + Alt: 'altKey', + Control: 'ctrlKey', + Meta: 'metaKey', + Shift: 'shiftKey', + }; // Older browsers (Safari <= 10, iOS Safari <= 10.2) do not support + // getModifierState. If getModifierState is not supported, we map it to a set of + // modifier keys exposed by the event. In this case, Lock-keys are not supported. + + function modifierStateGetter(keyArg) { + var syntheticEvent = this; + var nativeEvent = syntheticEvent.nativeEvent; + + if (nativeEvent.getModifierState) { + return nativeEvent.getModifierState(keyArg); + } + + var keyProp = modifierKeyToProp[keyArg]; + return keyProp ? !!nativeEvent[keyProp] : false; + } + + function getEventModifierState(nativeEvent) { + return modifierStateGetter; + } + + /** + * @interface KeyboardEvent + * @see http://www.w3.org/TR/DOM-Level-3-Events/ + */ + + var SyntheticKeyboardEvent = SyntheticUIEvent.extend({ + key: getEventKey, + location: null, + ctrlKey: null, + shiftKey: null, + altKey: null, + metaKey: null, + repeat: null, + locale: null, + getModifierState: getEventModifierState, + // Legacy Interface + charCode: function (event) { + // `charCode` is the result of a KeyPress event and represents the value of + // the actual printable character. + // KeyPress is deprecated, but its replacement is not yet final and not + // implemented in any major browser. Only KeyPress has charCode. + if (event.type === 'keypress') { + return getEventCharCode(event); + } + + return 0; + }, + keyCode: function (event) { + // `keyCode` is the result of a KeyDown/Up event and represents the value of + // physical keyboard key. + // The actual meaning of the value depends on the users' keyboard layout + // which cannot be detected. Assuming that it is a US keyboard layout + // provides a surprisingly accurate mapping for US and European users. + // Due to this, it is left to the user to implement at this time. + if (event.type === 'keydown' || event.type === 'keyup') { + return event.keyCode; + } + + return 0; + }, + which: function (event) { + // `which` is an alias for either `keyCode` or `charCode` depending on the + // type of the event. + if (event.type === 'keypress') { + return getEventCharCode(event); + } + + if (event.type === 'keydown' || event.type === 'keyup') { + return event.keyCode; + } + + return 0; + }, + }); + + var previousScreenX = 0; + var previousScreenY = 0; // Use flags to signal movementX/Y has already been set + + var isMovementXSet = false; + var isMovementYSet = false; + /** + * @interface MouseEvent + * @see http://www.w3.org/TR/DOM-Level-3-Events/ + */ + + var SyntheticMouseEvent = SyntheticUIEvent.extend({ + screenX: null, + screenY: null, + clientX: null, + clientY: null, + pageX: null, + pageY: null, + ctrlKey: null, + shiftKey: null, + altKey: null, + metaKey: null, + getModifierState: getEventModifierState, + button: null, + buttons: null, + relatedTarget: function (event) { + return ( + event.relatedTarget || + (event.fromElement === event.srcElement ? event.toElement : event.fromElement) + ); + }, + movementX: function (event) { + if ('movementX' in event) { + return event.movementX; + } + + var screenX = previousScreenX; + previousScreenX = event.screenX; + + if (!isMovementXSet) { + isMovementXSet = true; + return 0; + } + + return event.type === 'mousemove' ? event.screenX - screenX : 0; + }, + movementY: function (event) { + if ('movementY' in event) { + return event.movementY; + } + + var screenY = previousScreenY; + previousScreenY = event.screenY; + + if (!isMovementYSet) { + isMovementYSet = true; + return 0; + } + + return event.type === 'mousemove' ? event.screenY - screenY : 0; + }, + }); + + /** + * @interface PointerEvent + * @see http://www.w3.org/TR/pointerevents/ + */ + + var SyntheticPointerEvent = SyntheticMouseEvent.extend({ + pointerId: null, + width: null, + height: null, + pressure: null, + tangentialPressure: null, + tiltX: null, + tiltY: null, + twist: null, + pointerType: null, + isPrimary: null, + }); + + /** + * @interface DragEvent + * @see http://www.w3.org/TR/DOM-Level-3-Events/ + */ + + var SyntheticDragEvent = SyntheticMouseEvent.extend({ + dataTransfer: null, + }); + + /** + * @interface TouchEvent + * @see http://www.w3.org/TR/touch-events/ + */ + + var SyntheticTouchEvent = SyntheticUIEvent.extend({ + touches: null, + targetTouches: null, + changedTouches: null, + altKey: null, + metaKey: null, + ctrlKey: null, + shiftKey: null, + getModifierState: getEventModifierState, + }); + + /** + * @interface Event + * @see http://www.w3.org/TR/2009/WD-css3-transitions-20090320/#transition-events- + * @see https://developer.mozilla.org/en-US/docs/Web/API/TransitionEvent + */ + + var SyntheticTransitionEvent = SyntheticEvent.extend({ + propertyName: null, + elapsedTime: null, + pseudoElement: null, + }); + + /** + * @interface WheelEvent + * @see http://www.w3.org/TR/DOM-Level-3-Events/ + */ + + var SyntheticWheelEvent = SyntheticMouseEvent.extend({ + deltaX: function (event) { + return 'deltaX' in event + ? event.deltaX // Fallback to `wheelDeltaX` for Webkit and normalize (right is positive). + : 'wheelDeltaX' in event + ? -event.wheelDeltaX + : 0; + }, + deltaY: function (event) { + return 'deltaY' in event + ? event.deltaY // Fallback to `wheelDeltaY` for Webkit and normalize (down is positive). + : 'wheelDeltaY' in event + ? -event.wheelDeltaY // Fallback to `wheelDelta` for IE<9 and normalize (down is positive). + : 'wheelDelta' in event + ? -event.wheelDelta + : 0; + }, + deltaZ: null, + // Browsers without "deltaMode" is reporting in raw wheel delta where one + // notch on the scroll is always +/- 120, roughly equivalent to pixels. + // A good approximation of DOM_DELTA_LINE (1) is 5% of viewport size or + // ~40 pixels, for DOM_DELTA_SCREEN (2) it is 87.5% of viewport size. + deltaMode: null, + }); + + /** + * Turns + * ['abort', ...] + * into + * eventTypes = { + * 'abort': { + * phasedRegistrationNames: { + * bubbled: 'onAbort', + * captured: 'onAbortCapture', + * }, + * dependencies: [TOP_ABORT], + * }, + * ... + * }; + * topLevelEventsToDispatchConfig = new Map([ + * [TOP_ABORT, { sameConfig }], + * ]); + */ + + var eventTuples = [ + // Discrete events + [TOP_BLUR, 'blur', DiscreteEvent], + [TOP_CANCEL, 'cancel', DiscreteEvent], + [TOP_CLICK, 'click', DiscreteEvent], + [TOP_CLOSE, 'close', DiscreteEvent], + [TOP_CONTEXT_MENU, 'contextMenu', DiscreteEvent], + [TOP_COPY, 'copy', DiscreteEvent], + [TOP_CUT, 'cut', DiscreteEvent], + [TOP_AUX_CLICK, 'auxClick', DiscreteEvent], + [TOP_DOUBLE_CLICK, 'doubleClick', DiscreteEvent], + [TOP_DRAG_END, 'dragEnd', DiscreteEvent], + [TOP_DRAG_START, 'dragStart', DiscreteEvent], + [TOP_DROP, 'drop', DiscreteEvent], + [TOP_FOCUS, 'focus', DiscreteEvent], + [TOP_INPUT, 'input', DiscreteEvent], + [TOP_INVALID, 'invalid', DiscreteEvent], + [TOP_KEY_DOWN, 'keyDown', DiscreteEvent], + [TOP_KEY_PRESS, 'keyPress', DiscreteEvent], + [TOP_KEY_UP, 'keyUp', DiscreteEvent], + [TOP_MOUSE_DOWN, 'mouseDown', DiscreteEvent], + [TOP_MOUSE_UP, 'mouseUp', DiscreteEvent], + [TOP_PASTE, 'paste', DiscreteEvent], + [TOP_PAUSE, 'pause', DiscreteEvent], + [TOP_PLAY, 'play', DiscreteEvent], + [TOP_POINTER_CANCEL, 'pointerCancel', DiscreteEvent], + [TOP_POINTER_DOWN, 'pointerDown', DiscreteEvent], + [TOP_POINTER_UP, 'pointerUp', DiscreteEvent], + [TOP_RATE_CHANGE, 'rateChange', DiscreteEvent], + [TOP_RESET, 'reset', DiscreteEvent], + [TOP_SEEKED, 'seeked', DiscreteEvent], + [TOP_SUBMIT, 'submit', DiscreteEvent], + [TOP_TOUCH_CANCEL, 'touchCancel', DiscreteEvent], + [TOP_TOUCH_END, 'touchEnd', DiscreteEvent], + [TOP_TOUCH_START, 'touchStart', DiscreteEvent], + [TOP_VOLUME_CHANGE, 'volumeChange', DiscreteEvent], // User-blocking events + [TOP_DRAG, 'drag', UserBlockingEvent], + [TOP_DRAG_ENTER, 'dragEnter', UserBlockingEvent], + [TOP_DRAG_EXIT, 'dragExit', UserBlockingEvent], + [TOP_DRAG_LEAVE, 'dragLeave', UserBlockingEvent], + [TOP_DRAG_OVER, 'dragOver', UserBlockingEvent], + [TOP_MOUSE_MOVE, 'mouseMove', UserBlockingEvent], + [TOP_MOUSE_OUT, 'mouseOut', UserBlockingEvent], + [TOP_MOUSE_OVER, 'mouseOver', UserBlockingEvent], + [TOP_POINTER_MOVE, 'pointerMove', UserBlockingEvent], + [TOP_POINTER_OUT, 'pointerOut', UserBlockingEvent], + [TOP_POINTER_OVER, 'pointerOver', UserBlockingEvent], + [TOP_SCROLL, 'scroll', UserBlockingEvent], + [TOP_TOGGLE, 'toggle', UserBlockingEvent], + [TOP_TOUCH_MOVE, 'touchMove', UserBlockingEvent], + [TOP_WHEEL, 'wheel', UserBlockingEvent], // Continuous events + [TOP_ABORT, 'abort', ContinuousEvent], + [TOP_ANIMATION_END, 'animationEnd', ContinuousEvent], + [TOP_ANIMATION_ITERATION, 'animationIteration', ContinuousEvent], + [TOP_ANIMATION_START, 'animationStart', ContinuousEvent], + [TOP_CAN_PLAY, 'canPlay', ContinuousEvent], + [TOP_CAN_PLAY_THROUGH, 'canPlayThrough', ContinuousEvent], + [TOP_DURATION_CHANGE, 'durationChange', ContinuousEvent], + [TOP_EMPTIED, 'emptied', ContinuousEvent], + [TOP_ENCRYPTED, 'encrypted', ContinuousEvent], + [TOP_ENDED, 'ended', ContinuousEvent], + [TOP_ERROR, 'error', ContinuousEvent], + [TOP_GOT_POINTER_CAPTURE, 'gotPointerCapture', ContinuousEvent], + [TOP_LOAD, 'load', ContinuousEvent], + [TOP_LOADED_DATA, 'loadedData', ContinuousEvent], + [TOP_LOADED_METADATA, 'loadedMetadata', ContinuousEvent], + [TOP_LOAD_START, 'loadStart', ContinuousEvent], + [TOP_LOST_POINTER_CAPTURE, 'lostPointerCapture', ContinuousEvent], + [TOP_PLAYING, 'playing', ContinuousEvent], + [TOP_PROGRESS, 'progress', ContinuousEvent], + [TOP_SEEKING, 'seeking', ContinuousEvent], + [TOP_STALLED, 'stalled', ContinuousEvent], + [TOP_SUSPEND, 'suspend', ContinuousEvent], + [TOP_TIME_UPDATE, 'timeUpdate', ContinuousEvent], + [TOP_TRANSITION_END, 'transitionEnd', ContinuousEvent], + [TOP_WAITING, 'waiting', ContinuousEvent], + ]; + var eventTypes = {}; + var topLevelEventsToDispatchConfig = {}; + + for (var i = 0; i < eventTuples.length; i++) { + var eventTuple = eventTuples[i]; + var topEvent = eventTuple[0]; + var event = eventTuple[1]; + var eventPriority = eventTuple[2]; + var capitalizedEvent = event[0].toUpperCase() + event.slice(1); + var onEvent = 'on' + capitalizedEvent; + var config = { + phasedRegistrationNames: { + bubbled: onEvent, + captured: onEvent + 'Capture', + }, + dependencies: [topEvent], + eventPriority: eventPriority, + }; + eventTypes[event] = config; + topLevelEventsToDispatchConfig[topEvent] = config; + } // Only used in DEV for exhaustiveness validation. + + var knownHTMLTopLevelTypes = [ + TOP_ABORT, + TOP_CANCEL, + TOP_CAN_PLAY, + TOP_CAN_PLAY_THROUGH, + TOP_CLOSE, + TOP_DURATION_CHANGE, + TOP_EMPTIED, + TOP_ENCRYPTED, + TOP_ENDED, + TOP_ERROR, + TOP_INPUT, + TOP_INVALID, + TOP_LOAD, + TOP_LOADED_DATA, + TOP_LOADED_METADATA, + TOP_LOAD_START, + TOP_PAUSE, + TOP_PLAY, + TOP_PLAYING, + TOP_PROGRESS, + TOP_RATE_CHANGE, + TOP_RESET, + TOP_SEEKED, + TOP_SEEKING, + TOP_STALLED, + TOP_SUBMIT, + TOP_SUSPEND, + TOP_TIME_UPDATE, + TOP_TOGGLE, + TOP_VOLUME_CHANGE, + TOP_WAITING, + ]; + var SimpleEventPlugin = { + eventTypes: eventTypes, + getEventPriority: function (topLevelType) { + var config = topLevelEventsToDispatchConfig[topLevelType]; + return config !== undefined ? config.eventPriority : ContinuousEvent; + }, + extractEvents: function ( + topLevelType, + targetInst, + nativeEvent, + nativeEventTarget, + eventSystemFlags, + ) { + var dispatchConfig = topLevelEventsToDispatchConfig[topLevelType]; + + if (!dispatchConfig) { + return null; + } + + var EventConstructor; + + switch (topLevelType) { + case TOP_KEY_PRESS: + // Firefox creates a keypress event for function keys too. This removes + // the unwanted keypress events. Enter is however both printable and + // non-printable. One would expect Tab to be as well (but it isn't). + if (getEventCharCode(nativeEvent) === 0) { + return null; + } + + /* falls through */ + + case TOP_KEY_DOWN: + case TOP_KEY_UP: + EventConstructor = SyntheticKeyboardEvent; + break; + + case TOP_BLUR: + case TOP_FOCUS: + EventConstructor = SyntheticFocusEvent; + break; + + case TOP_CLICK: + // Firefox creates a click event on right mouse clicks. This removes the + // unwanted click events. + if (nativeEvent.button === 2) { + return null; + } + + /* falls through */ + + case TOP_AUX_CLICK: + case TOP_DOUBLE_CLICK: + case TOP_MOUSE_DOWN: + case TOP_MOUSE_MOVE: + case TOP_MOUSE_UP: // TODO: Disabled elements should not respond to mouse events + + /* falls through */ + + case TOP_MOUSE_OUT: + case TOP_MOUSE_OVER: + case TOP_CONTEXT_MENU: + EventConstructor = SyntheticMouseEvent; + break; + + case TOP_DRAG: + case TOP_DRAG_END: + case TOP_DRAG_ENTER: + case TOP_DRAG_EXIT: + case TOP_DRAG_LEAVE: + case TOP_DRAG_OVER: + case TOP_DRAG_START: + case TOP_DROP: + EventConstructor = SyntheticDragEvent; + break; + + case TOP_TOUCH_CANCEL: + case TOP_TOUCH_END: + case TOP_TOUCH_MOVE: + case TOP_TOUCH_START: + EventConstructor = SyntheticTouchEvent; + break; + + case TOP_ANIMATION_END: + case TOP_ANIMATION_ITERATION: + case TOP_ANIMATION_START: + EventConstructor = SyntheticAnimationEvent; + break; + + case TOP_TRANSITION_END: + EventConstructor = SyntheticTransitionEvent; + break; + + case TOP_SCROLL: + EventConstructor = SyntheticUIEvent; + break; + + case TOP_WHEEL: + EventConstructor = SyntheticWheelEvent; + break; + + case TOP_COPY: + case TOP_CUT: + case TOP_PASTE: + EventConstructor = SyntheticClipboardEvent; + break; + + case TOP_GOT_POINTER_CAPTURE: + case TOP_LOST_POINTER_CAPTURE: + case TOP_POINTER_CANCEL: + case TOP_POINTER_DOWN: + case TOP_POINTER_MOVE: + case TOP_POINTER_OUT: + case TOP_POINTER_OVER: + case TOP_POINTER_UP: + EventConstructor = SyntheticPointerEvent; + break; + + default: + { + if (knownHTMLTopLevelTypes.indexOf(topLevelType) === -1) { + warningWithoutStack$1( + false, + 'SimpleEventPlugin: Unhandled event type, `%s`. This warning ' + + 'is likely caused by a bug in React. Please file an issue.', + topLevelType, + ); + } + } // HTML Events + // @see http://www.w3.org/TR/html5/index.html#events-0 + + EventConstructor = SyntheticEvent; + break; + } + + var event = EventConstructor.getPooled( + dispatchConfig, + targetInst, + nativeEvent, + nativeEventTarget, + ); + accumulateTwoPhaseDispatches(event); + return event; + }, + }; + + var passiveBrowserEventsSupported = false; // Check if browser support events with passive listeners + // https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#Safely_detecting_option_support + + if (enableFlareAPI && canUseDOM) { + try { + var options = {}; // $FlowFixMe: Ignore Flow complaining about needing a value + + Object.defineProperty(options, 'passive', { + get: function () { + passiveBrowserEventsSupported = true; + }, + }); + window.addEventListener('test', options, options); + window.removeEventListener('test', options, options); + } catch (e) { + passiveBrowserEventsSupported = false; + } + } + + // Intentionally not named imports because Rollup would use dynamic dispatch for + // CommonJS interop named imports. + var UserBlockingPriority$1 = Scheduler.unstable_UserBlockingPriority; + var runWithPriority$1 = Scheduler.unstable_runWithPriority; + var getEventPriority = SimpleEventPlugin.getEventPriority; + var CALLBACK_BOOKKEEPING_POOL_SIZE = 10; + var callbackBookkeepingPool = []; + + /** + * Find the deepest React component completely containing the root of the + * passed-in instance (for use when entire React trees are nested within each + * other). If React trees are not nested, returns null. + */ + function findRootContainerNode(inst) { + if (inst.tag === HostRoot) { + return inst.stateNode.containerInfo; + } // TODO: It may be a good idea to cache this to prevent unnecessary DOM + // traversal, but caching is difficult to do correctly without using a + // mutation observer to listen for all DOM changes. + + while (inst.return) { + inst = inst.return; + } + + if (inst.tag !== HostRoot) { + // This can happen if we're in a detached tree. + return null; + } + + return inst.stateNode.containerInfo; + } // Used to store ancestor hierarchy in top level callback + + function getTopLevelCallbackBookKeeping(topLevelType, nativeEvent, targetInst, eventSystemFlags) { + if (callbackBookkeepingPool.length) { + var instance = callbackBookkeepingPool.pop(); + instance.topLevelType = topLevelType; + instance.eventSystemFlags = eventSystemFlags; + instance.nativeEvent = nativeEvent; + instance.targetInst = targetInst; + return instance; + } + + return { + topLevelType: topLevelType, + eventSystemFlags: eventSystemFlags, + nativeEvent: nativeEvent, + targetInst: targetInst, + ancestors: [], + }; + } + + function releaseTopLevelCallbackBookKeeping(instance) { + instance.topLevelType = null; + instance.nativeEvent = null; + instance.targetInst = null; + instance.ancestors.length = 0; + + if (callbackBookkeepingPool.length < CALLBACK_BOOKKEEPING_POOL_SIZE) { + callbackBookkeepingPool.push(instance); + } + } + + function handleTopLevel(bookKeeping) { + var targetInst = bookKeeping.targetInst; // Loop through the hierarchy, in case there's any nested components. + // It's important that we build the array of ancestors before calling any + // event handlers, because event handlers can modify the DOM, leading to + // inconsistencies with ReactMount's node cache. See #1105. + + var ancestor = targetInst; + + do { + if (!ancestor) { + var ancestors = bookKeeping.ancestors; + ancestors.push(ancestor); + break; + } + + var root = findRootContainerNode(ancestor); + + if (!root) { + break; + } + + var tag = ancestor.tag; + + if (tag === HostComponent || tag === HostText) { + bookKeeping.ancestors.push(ancestor); + } + + ancestor = getClosestInstanceFromNode(root); + } while (ancestor); + + for (var i = 0; i < bookKeeping.ancestors.length; i++) { + targetInst = bookKeeping.ancestors[i]; + var eventTarget = getEventTarget(bookKeeping.nativeEvent); + var topLevelType = bookKeeping.topLevelType; + var nativeEvent = bookKeeping.nativeEvent; + runExtractedPluginEventsInBatch( + topLevelType, + targetInst, + nativeEvent, + eventTarget, + bookKeeping.eventSystemFlags, + ); + } + } // TODO: can we stop exporting these? + + var _enabled = true; + function setEnabled(enabled) { + _enabled = !!enabled; + } + function isEnabled() { + return _enabled; + } + function trapBubbledEvent(topLevelType, element) { + trapEventForPluginEventSystem(element, topLevelType, false); + } + function trapCapturedEvent(topLevelType, element) { + trapEventForPluginEventSystem(element, topLevelType, true); + } + function trapEventForResponderEventSystem(element, topLevelType, passive) { + if (enableFlareAPI) { + var rawEventName = getRawEventName(topLevelType); + var eventFlags = RESPONDER_EVENT_SYSTEM; // If passive option is not supported, then the event will be + // active and not passive, but we flag it as using not being + // supported too. This way the responder event plugins know, + // and can provide polyfills if needed. + + if (passive) { + if (passiveBrowserEventsSupported) { + eventFlags |= IS_PASSIVE; + } else { + eventFlags |= IS_ACTIVE; + eventFlags |= PASSIVE_NOT_SUPPORTED; + passive = false; + } + } else { + eventFlags |= IS_ACTIVE; + } // Check if interactive and wrap in discreteUpdates + + var listener = dispatchEvent.bind(null, topLevelType, eventFlags); + + if (passiveBrowserEventsSupported) { + addEventCaptureListenerWithPassiveFlag(element, rawEventName, listener, passive); + } else { + addEventCaptureListener(element, rawEventName, listener); + } + } + } + + function trapEventForPluginEventSystem(element, topLevelType, capture) { + var listener; + + switch (getEventPriority(topLevelType)) { + case DiscreteEvent: + listener = dispatchDiscreteEvent.bind(null, topLevelType, PLUGIN_EVENT_SYSTEM); + break; + + case UserBlockingEvent: + listener = dispatchUserBlockingUpdate.bind(null, topLevelType, PLUGIN_EVENT_SYSTEM); + break; + + case ContinuousEvent: + default: + listener = dispatchEvent.bind(null, topLevelType, PLUGIN_EVENT_SYSTEM); + break; + } + + var rawEventName = getRawEventName(topLevelType); + + if (capture) { + addEventCaptureListener(element, rawEventName, listener); + } else { + addEventBubbleListener(element, rawEventName, listener); + } + } + + function dispatchDiscreteEvent(topLevelType, eventSystemFlags, nativeEvent) { + flushDiscreteUpdatesIfNeeded(nativeEvent.timeStamp); + discreteUpdates(dispatchEvent, topLevelType, eventSystemFlags, nativeEvent); + } + + function dispatchUserBlockingUpdate(topLevelType, eventSystemFlags, nativeEvent) { + runWithPriority$1( + UserBlockingPriority$1, + dispatchEvent.bind(null, topLevelType, eventSystemFlags, nativeEvent), + ); + } + + function dispatchEventForPluginEventSystem( + topLevelType, + eventSystemFlags, + nativeEvent, + targetInst, + ) { + var bookKeeping = getTopLevelCallbackBookKeeping( + topLevelType, + nativeEvent, + targetInst, + eventSystemFlags, + ); + + try { + // Event queue being processed in the same cycle allows + // `preventDefault`. + batchedEventUpdates(handleTopLevel, bookKeeping); + } finally { + releaseTopLevelCallbackBookKeeping(bookKeeping); + } + } + + function dispatchEvent(topLevelType, eventSystemFlags, nativeEvent) { + if (!_enabled) { + return; + } + + if (hasQueuedDiscreteEvents() && isReplayableDiscreteEvent(topLevelType)) { + // If we already have a queue of discrete events, and this is another discrete + // event, then we can't dispatch it regardless of its target, since they + // need to dispatch in order. + queueDiscreteEvent( + null, // Flags that we're not actually blocked on anything as far as we know. + topLevelType, + eventSystemFlags, + nativeEvent, + ); + return; + } + + var blockedOn = attemptToDispatchEvent(topLevelType, eventSystemFlags, nativeEvent); + + if (blockedOn === null) { + // We successfully dispatched this event. + clearIfContinuousEvent(topLevelType, nativeEvent); + return; + } + + if (isReplayableDiscreteEvent(topLevelType)) { + // This this to be replayed later once the target is available. + queueDiscreteEvent(blockedOn, topLevelType, eventSystemFlags, nativeEvent); + return; + } + + if (queueIfContinuousEvent(blockedOn, topLevelType, eventSystemFlags, nativeEvent)) { + return; + } // We need to clear only if we didn't queue because + // queueing is accummulative. + + clearIfContinuousEvent(topLevelType, nativeEvent); // This is not replayable so we'll invoke it but without a target, + // in case the event system needs to trace it. + + if (enableFlareAPI) { + if (eventSystemFlags & PLUGIN_EVENT_SYSTEM) { + dispatchEventForPluginEventSystem(topLevelType, eventSystemFlags, nativeEvent, null); + } + + if (eventSystemFlags & RESPONDER_EVENT_SYSTEM) { + // React Flare event system + dispatchEventForResponderEventSystem( + topLevelType, + null, + nativeEvent, + getEventTarget(nativeEvent), + eventSystemFlags, + ); + } + } else { + dispatchEventForPluginEventSystem(topLevelType, eventSystemFlags, nativeEvent, null); + } + } // Attempt dispatching an event. Returns a SuspenseInstance or Container if it's blocked. + + function attemptToDispatchEvent(topLevelType, eventSystemFlags, nativeEvent) { + // TODO: Warn if _enabled is false. + var nativeEventTarget = getEventTarget(nativeEvent); + var targetInst = getClosestInstanceFromNode(nativeEventTarget); + + if (targetInst !== null) { + var nearestMounted = getNearestMountedFiber(targetInst); + + if (nearestMounted === null) { + // This tree has been unmounted already. Dispatch without a target. + targetInst = null; + } else { + var tag = nearestMounted.tag; + + if (tag === SuspenseComponent) { + var instance = getSuspenseInstanceFromFiber(nearestMounted); + + if (instance !== null) { + // Queue the event to be replayed later. Abort dispatching since we + // don't want this event dispatched twice through the event system. + // TODO: If this is the first discrete event in the queue. Schedule an increased + // priority for this boundary. + return instance; + } // This shouldn't happen, something went wrong but to avoid blocking + // the whole system, dispatch the event without a target. + // TODO: Warn. + + targetInst = null; + } else if (tag === HostRoot) { + var root = nearestMounted.stateNode; + + if (root.hydrate) { + // If this happens during a replay something went wrong and it might block + // the whole system. + return getContainerFromFiber(nearestMounted); + } + + targetInst = null; + } else if (nearestMounted !== targetInst) { + // If we get an event (ex: img onload) before committing that + // component's mount, ignore it for now (that is, treat it as if it was an + // event on a non-React tree). We might also consider queueing events and + // dispatching them after the mount. + targetInst = null; + } + } + } + + if (enableFlareAPI) { + if (eventSystemFlags & PLUGIN_EVENT_SYSTEM) { + dispatchEventForPluginEventSystem(topLevelType, eventSystemFlags, nativeEvent, targetInst); + } + + if (eventSystemFlags & RESPONDER_EVENT_SYSTEM) { + // React Flare event system + dispatchEventForResponderEventSystem( + topLevelType, + targetInst, + nativeEvent, + nativeEventTarget, + eventSystemFlags, + ); + } + } else { + dispatchEventForPluginEventSystem(topLevelType, eventSystemFlags, nativeEvent, targetInst); + } // We're not blocked on anything. + + return null; + } + + /** + * Checks if an event is supported in the current execution environment. + * + * NOTE: This will not work correctly for non-generic events such as `change`, + * `reset`, `load`, `error`, and `select`. + * + * Borrows from Modernizr. + * + * @param {string} eventNameSuffix Event name, e.g. "click". + * @return {boolean} True if the event is supported. + * @internal + * @license Modernizr 3.0.0pre (Custom Build) | MIT + */ + + function isEventSupported(eventNameSuffix) { + if (!canUseDOM) { + return false; + } + + var eventName = 'on' + eventNameSuffix; + var isSupported = eventName in document; + + if (!isSupported) { + var element = document.createElement('div'); + element.setAttribute(eventName, 'return;'); + isSupported = typeof element[eventName] === 'function'; + } + + return isSupported; + } + + /** + * Summary of `ReactBrowserEventEmitter` event handling: + * + * - Top-level delegation is used to trap most native browser events. This + * may only occur in the main thread and is the responsibility of + * ReactDOMEventListener, which is injected and can therefore support + * pluggable event sources. This is the only work that occurs in the main + * thread. + * + * - We normalize and de-duplicate events to account for browser quirks. This + * may be done in the worker thread. + * + * - Forward these native events (with the associated top-level type used to + * trap it) to `EventPluginHub`, which in turn will ask plugins if they want + * to extract any synthetic events. + * + * - The `EventPluginHub` will then process each event by annotating them with + * "dispatches", a sequence of listeners and IDs that care about that event. + * + * - The `EventPluginHub` then dispatches the events. + * + * Overview of React and the event system: + * + * +------------+ . + * | DOM | . + * +------------+ . + * | . + * v . + * +------------+ . + * | ReactEvent | . + * | Listener | . + * +------------+ . +-----------+ + * | . +--------+|SimpleEvent| + * | . | |Plugin | + * +-----|------+ . v +-----------+ + * | | | . +--------------+ +------------+ + * | +-----------.--->|EventPluginHub| | Event | + * | | . | | +-----------+ | Propagators| + * | ReactEvent | . | | |TapEvent | |------------| + * | Emitter | . | |<---+|Plugin | |other plugin| + * | | . | | +-----------+ | utilities | + * | +-----------.--->| | +------------+ + * | | | . +--------------+ + * +-----|------+ . ^ +-----------+ + * | . | |Enter/Leave| + * + . +-------+|Plugin | + * +-------------+ . +-----------+ + * | application | . + * |-------------| . + * | | . + * | | . + * +-------------+ . + * . + * React Core . General Purpose Event Plugin System + */ + + var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map; + var elementListeningSets = new PossiblyWeakMap(); + function getListeningSetForElement(element) { + var listeningSet = elementListeningSets.get(element); + + if (listeningSet === undefined) { + listeningSet = new Set(); + elementListeningSets.set(element, listeningSet); + } + + return listeningSet; + } + /** + * We listen for bubbled touch events on the document object. + * + * Firefox v8.01 (and possibly others) exhibited strange behavior when + * mounting `onmousemove` events at some node that was not the document + * element. The symptoms were that if your mouse is not moving over something + * contained within that mount point (for example on the background) the + * top-level listeners for `onmousemove` won't be called. However, if you + * register the `mousemove` on the document object, then it will of course + * catch all `mousemove`s. This along with iOS quirks, justifies restricting + * top-level listeners to the document object only, at least for these + * movement types of events and possibly all events. + * + * @see http://www.quirksmode.org/blog/archives/2010/09/click_event_del.html + * + * Also, `keyup`/`keypress`/`keydown` do not bubble to the window on IE, but + * they bubble to document. + * + * @param {string} registrationName Name of listener (e.g. `onClick`). + * @param {object} mountAt Container where to mount the listener + */ + + function listenTo(registrationName, mountAt) { + var listeningSet = getListeningSetForElement(mountAt); + var dependencies = registrationNameDependencies[registrationName]; + + for (var i = 0; i < dependencies.length; i++) { + var dependency = dependencies[i]; + listenToTopLevel(dependency, mountAt, listeningSet); + } + } + function listenToTopLevel(topLevelType, mountAt, listeningSet) { + if (!listeningSet.has(topLevelType)) { + switch (topLevelType) { + case TOP_SCROLL: + trapCapturedEvent(TOP_SCROLL, mountAt); + break; + + case TOP_FOCUS: + case TOP_BLUR: + trapCapturedEvent(TOP_FOCUS, mountAt); + trapCapturedEvent(TOP_BLUR, mountAt); // We set the flag for a single dependency later in this function, + // but this ensures we mark both as attached rather than just one. + + listeningSet.add(TOP_BLUR); + listeningSet.add(TOP_FOCUS); + break; + + case TOP_CANCEL: + case TOP_CLOSE: + if (isEventSupported(getRawEventName(topLevelType))) { + trapCapturedEvent(topLevelType, mountAt); + } + + break; + + case TOP_INVALID: + case TOP_SUBMIT: + case TOP_RESET: + // We listen to them on the target DOM elements. + // Some of them bubble so we don't want them to fire twice. + break; + + default: + // By default, listen on the top level to all non-media events. + // Media events don't bubble so adding the listener wouldn't do anything. + var isMediaEvent = mediaEventTypes.indexOf(topLevelType) !== -1; + + if (!isMediaEvent) { + trapBubbledEvent(topLevelType, mountAt); + } + + break; + } + + listeningSet.add(topLevelType); + } + } + function isListeningToAllDependencies(registrationName, mountAt) { + var listeningSet = getListeningSetForElement(mountAt); + var dependencies = registrationNameDependencies[registrationName]; + + for (var i = 0; i < dependencies.length; i++) { + var dependency = dependencies[i]; + + if (!listeningSet.has(dependency)) { + return false; + } + } + + return true; + } + + // List derived from Gecko source code: + // https://github.com/mozilla/gecko-dev/blob/4e638efc71/layout/style/test/property_database.js + var shorthandToLonghand = { + animation: [ + 'animationDelay', + 'animationDirection', + 'animationDuration', + 'animationFillMode', + 'animationIterationCount', + 'animationName', + 'animationPlayState', + 'animationTimingFunction', + ], + background: [ + 'backgroundAttachment', + 'backgroundClip', + 'backgroundColor', + 'backgroundImage', + 'backgroundOrigin', + 'backgroundPositionX', + 'backgroundPositionY', + 'backgroundRepeat', + 'backgroundSize', + ], + backgroundPosition: ['backgroundPositionX', 'backgroundPositionY'], + border: [ + 'borderBottomColor', + 'borderBottomStyle', + 'borderBottomWidth', + 'borderImageOutset', + 'borderImageRepeat', + 'borderImageSlice', + 'borderImageSource', + 'borderImageWidth', + 'borderLeftColor', + 'borderLeftStyle', + 'borderLeftWidth', + 'borderRightColor', + 'borderRightStyle', + 'borderRightWidth', + 'borderTopColor', + 'borderTopStyle', + 'borderTopWidth', + ], + borderBlockEnd: ['borderBlockEndColor', 'borderBlockEndStyle', 'borderBlockEndWidth'], + borderBlockStart: ['borderBlockStartColor', 'borderBlockStartStyle', 'borderBlockStartWidth'], + borderBottom: ['borderBottomColor', 'borderBottomStyle', 'borderBottomWidth'], + borderColor: ['borderBottomColor', 'borderLeftColor', 'borderRightColor', 'borderTopColor'], + borderImage: [ + 'borderImageOutset', + 'borderImageRepeat', + 'borderImageSlice', + 'borderImageSource', + 'borderImageWidth', + ], + borderInlineEnd: ['borderInlineEndColor', 'borderInlineEndStyle', 'borderInlineEndWidth'], + borderInlineStart: ['borderInlineStartColor', 'borderInlineStartStyle', 'borderInlineStartWidth'], + borderLeft: ['borderLeftColor', 'borderLeftStyle', 'borderLeftWidth'], + borderRadius: [ + 'borderBottomLeftRadius', + 'borderBottomRightRadius', + 'borderTopLeftRadius', + 'borderTopRightRadius', + ], + borderRight: ['borderRightColor', 'borderRightStyle', 'borderRightWidth'], + borderStyle: ['borderBottomStyle', 'borderLeftStyle', 'borderRightStyle', 'borderTopStyle'], + borderTop: ['borderTopColor', 'borderTopStyle', 'borderTopWidth'], + borderWidth: ['borderBottomWidth', 'borderLeftWidth', 'borderRightWidth', 'borderTopWidth'], + columnRule: ['columnRuleColor', 'columnRuleStyle', 'columnRuleWidth'], + columns: ['columnCount', 'columnWidth'], + flex: ['flexBasis', 'flexGrow', 'flexShrink'], + flexFlow: ['flexDirection', 'flexWrap'], + font: [ + 'fontFamily', + 'fontFeatureSettings', + 'fontKerning', + 'fontLanguageOverride', + 'fontSize', + 'fontSizeAdjust', + 'fontStretch', + 'fontStyle', + 'fontVariant', + 'fontVariantAlternates', + 'fontVariantCaps', + 'fontVariantEastAsian', + 'fontVariantLigatures', + 'fontVariantNumeric', + 'fontVariantPosition', + 'fontWeight', + 'lineHeight', + ], + fontVariant: [ + 'fontVariantAlternates', + 'fontVariantCaps', + 'fontVariantEastAsian', + 'fontVariantLigatures', + 'fontVariantNumeric', + 'fontVariantPosition', + ], + gap: ['columnGap', 'rowGap'], + grid: [ + 'gridAutoColumns', + 'gridAutoFlow', + 'gridAutoRows', + 'gridTemplateAreas', + 'gridTemplateColumns', + 'gridTemplateRows', + ], + gridArea: ['gridColumnEnd', 'gridColumnStart', 'gridRowEnd', 'gridRowStart'], + gridColumn: ['gridColumnEnd', 'gridColumnStart'], + gridColumnGap: ['columnGap'], + gridGap: ['columnGap', 'rowGap'], + gridRow: ['gridRowEnd', 'gridRowStart'], + gridRowGap: ['rowGap'], + gridTemplate: ['gridTemplateAreas', 'gridTemplateColumns', 'gridTemplateRows'], + listStyle: ['listStyleImage', 'listStylePosition', 'listStyleType'], + margin: ['marginBottom', 'marginLeft', 'marginRight', 'marginTop'], + marker: ['markerEnd', 'markerMid', 'markerStart'], + mask: [ + 'maskClip', + 'maskComposite', + 'maskImage', + 'maskMode', + 'maskOrigin', + 'maskPositionX', + 'maskPositionY', + 'maskRepeat', + 'maskSize', + ], + maskPosition: ['maskPositionX', 'maskPositionY'], + outline: ['outlineColor', 'outlineStyle', 'outlineWidth'], + overflow: ['overflowX', 'overflowY'], + padding: ['paddingBottom', 'paddingLeft', 'paddingRight', 'paddingTop'], + placeContent: ['alignContent', 'justifyContent'], + placeItems: ['alignItems', 'justifyItems'], + placeSelf: ['alignSelf', 'justifySelf'], + textDecoration: ['textDecorationColor', 'textDecorationLine', 'textDecorationStyle'], + textEmphasis: ['textEmphasisColor', 'textEmphasisStyle'], + transition: [ + 'transitionDelay', + 'transitionDuration', + 'transitionProperty', + 'transitionTimingFunction', + ], + wordWrap: ['overflowWrap'], + }; + + /** + * CSS properties which accept numbers but are not in units of "px". + */ + var isUnitlessNumber = { + animationIterationCount: true, + borderImageOutset: true, + borderImageSlice: true, + borderImageWidth: true, + boxFlex: true, + boxFlexGroup: true, + boxOrdinalGroup: true, + columnCount: true, + columns: true, + flex: true, + flexGrow: true, + flexPositive: true, + flexShrink: true, + flexNegative: true, + flexOrder: true, + gridArea: true, + gridRow: true, + gridRowEnd: true, + gridRowSpan: true, + gridRowStart: true, + gridColumn: true, + gridColumnEnd: true, + gridColumnSpan: true, + gridColumnStart: true, + fontWeight: true, + lineClamp: true, + lineHeight: true, + opacity: true, + order: true, + orphans: true, + tabSize: true, + widows: true, + zIndex: true, + zoom: true, + // SVG-related properties + fillOpacity: true, + floodOpacity: true, + stopOpacity: true, + strokeDasharray: true, + strokeDashoffset: true, + strokeMiterlimit: true, + strokeOpacity: true, + strokeWidth: true, + }; + /** + * @param {string} prefix vendor-specific prefix, eg: Webkit + * @param {string} key style name, eg: transitionDuration + * @return {string} style name prefixed with `prefix`, properly camelCased, eg: + * WebkitTransitionDuration + */ + + function prefixKey(prefix, key) { + return prefix + key.charAt(0).toUpperCase() + key.substring(1); + } + /** + * Support style names that may come passed in prefixed by adding permutations + * of vendor prefixes. + */ + + var prefixes = ['Webkit', 'ms', 'Moz', 'O']; // Using Object.keys here, or else the vanilla for-in loop makes IE8 go into an + // infinite loop, because it iterates over the newly added props too. + + Object.keys(isUnitlessNumber).forEach(function (prop) { + prefixes.forEach(function (prefix) { + isUnitlessNumber[prefixKey(prefix, prop)] = isUnitlessNumber[prop]; + }); + }); + + /** + * Convert a value into the proper css writable value. The style name `name` + * should be logical (no hyphens), as specified + * in `CSSProperty.isUnitlessNumber`. + * + * @param {string} name CSS property name such as `topMargin`. + * @param {*} value CSS property value such as `10px`. + * @return {string} Normalized style value with dimensions applied. + */ + + function dangerousStyleValue(name, value, isCustomProperty) { + // Note that we've removed escapeTextForBrowser() calls here since the + // whole string will be escaped when the attribute is injected into + // the markup. If you provide unsafe user data here they can inject + // arbitrary CSS which may be problematic (I couldn't repro this): + // https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet + // http://www.thespanner.co.uk/2007/11/26/ultimate-xss-css-injection/ + // This is not an XSS hole but instead a potential CSS injection issue + // which has lead to a greater discussion about how we're going to + // trust URLs moving forward. See #2115901 + var isEmpty = value == null || typeof value === 'boolean' || value === ''; + + if (isEmpty) { + return ''; + } + + if ( + !isCustomProperty && + typeof value === 'number' && + value !== 0 && + !(isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name]) + ) { + return value + 'px'; // Presumes implicit 'px' suffix for unitless numbers + } + + return ('' + value).trim(); + } + + var uppercasePattern = /([A-Z])/g; + var msPattern = /^ms-/; + /** + * Hyphenates a camelcased CSS property name, for example: + * + * > hyphenateStyleName('backgroundColor') + * < "background-color" + * > hyphenateStyleName('MozTransition') + * < "-moz-transition" + * > hyphenateStyleName('msTransition') + * < "-ms-transition" + * + * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix + * is converted to `-ms-`. + */ + + function hyphenateStyleName(name) { + return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-'); + } + + var warnValidStyle = function () {}; + + { + // 'msTransform' is correct, but the other prefixes should be capitalized + var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/; + var msPattern$1 = /^-ms-/; + var hyphenPattern = /-(.)/g; // style values shouldn't contain a semicolon + + var badStyleValueWithSemicolonPattern = /;\s*$/; + var warnedStyleNames = {}; + var warnedStyleValues = {}; + var warnedForNaNValue = false; + var warnedForInfinityValue = false; + + var camelize = function (string) { + return string.replace(hyphenPattern, function (_, character) { + return character.toUpperCase(); + }); + }; + + var warnHyphenatedStyleName = function (name) { + if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) { + return; + } + + warnedStyleNames[name] = true; + warning$1( + false, + 'Unsupported style property %s. Did you mean %s?', + name, // As Andi Smith suggests + // (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix + // is converted to lowercase `ms`. + camelize(name.replace(msPattern$1, 'ms-')), + ); + }; + + var warnBadVendoredStyleName = function (name) { + if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) { + return; + } + + warnedStyleNames[name] = true; + warning$1( + false, + 'Unsupported vendor-prefixed style property %s. Did you mean %s?', + name, + name.charAt(0).toUpperCase() + name.slice(1), + ); + }; + + var warnStyleValueWithSemicolon = function (name, value) { + if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) { + return; + } + + warnedStyleValues[value] = true; + warning$1( + false, + "Style property values shouldn't contain a semicolon. " + 'Try "%s: %s" instead.', + name, + value.replace(badStyleValueWithSemicolonPattern, ''), + ); + }; + + var warnStyleValueIsNaN = function (name, value) { + if (warnedForNaNValue) { + return; + } + + warnedForNaNValue = true; + warning$1(false, '`NaN` is an invalid value for the `%s` css style property.', name); + }; + + var warnStyleValueIsInfinity = function (name, value) { + if (warnedForInfinityValue) { + return; + } + + warnedForInfinityValue = true; + warning$1(false, '`Infinity` is an invalid value for the `%s` css style property.', name); + }; + + warnValidStyle = function (name, value) { + if (name.indexOf('-') > -1) { + warnHyphenatedStyleName(name); + } else if (badVendoredStyleNamePattern.test(name)) { + warnBadVendoredStyleName(name); + } else if (badStyleValueWithSemicolonPattern.test(value)) { + warnStyleValueWithSemicolon(name, value); + } + + if (typeof value === 'number') { + if (isNaN(value)) { + warnStyleValueIsNaN(name, value); + } else if (!isFinite(value)) { + warnStyleValueIsInfinity(name, value); + } + } + }; + } + + var warnValidStyle$1 = warnValidStyle; + + /** + * Operations for dealing with CSS properties. + */ + + /** + * This creates a string that is expected to be equivalent to the style + * attribute generated by server-side rendering. It by-passes warnings and + * security checks so it's not safe to use this value for anything other than + * comparison. It is only used in DEV for SSR validation. + */ + + function createDangerousStringForStyles(styles) { + { + var serialized = ''; + var delimiter = ''; + + for (var styleName in styles) { + if (!styles.hasOwnProperty(styleName)) { + continue; + } + + var styleValue = styles[styleName]; + + if (styleValue != null) { + var isCustomProperty = styleName.indexOf('--') === 0; + serialized += + delimiter + (isCustomProperty ? styleName : hyphenateStyleName(styleName)) + ':'; + serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty); + delimiter = ';'; + } + } + + return serialized || null; + } + } + /** + * Sets the value for multiple styles on a node. If a value is specified as + * '' (empty string), the corresponding style property will be unset. + * + * @param {DOMElement} node + * @param {object} styles + */ + + function setValueForStyles(node, styles) { + var style = node.style; + + for (var styleName in styles) { + if (!styles.hasOwnProperty(styleName)) { + continue; + } + + var isCustomProperty = styleName.indexOf('--') === 0; + + { + if (!isCustomProperty) { + warnValidStyle$1(styleName, styles[styleName]); + } + } + + var styleValue = dangerousStyleValue(styleName, styles[styleName], isCustomProperty); + + if (styleName === 'float') { + styleName = 'cssFloat'; + } + + if (isCustomProperty) { + style.setProperty(styleName, styleValue); + } else { + style[styleName] = styleValue; + } + } + } + + function isValueEmpty(value) { + return value == null || typeof value === 'boolean' || value === ''; + } + /** + * Given {color: 'red', overflow: 'hidden'} returns { + * color: 'color', + * overflowX: 'overflow', + * overflowY: 'overflow', + * }. This can be read as "the overflowY property was set by the overflow + * shorthand". That is, the values are the property that each was derived from. + */ + + function expandShorthandMap(styles) { + var expanded = {}; + + for (var key in styles) { + var longhands = shorthandToLonghand[key] || [key]; + + for (var i = 0; i < longhands.length; i++) { + expanded[longhands[i]] = key; + } + } + + return expanded; + } + /** + * When mixing shorthand and longhand property names, we warn during updates if + * we expect an incorrect result to occur. In particular, we warn for: + * + * Updating a shorthand property (longhand gets overwritten): + * {font: 'foo', fontVariant: 'bar'} -> {font: 'baz', fontVariant: 'bar'} + * becomes .style.font = 'baz' + * Removing a shorthand property (longhand gets lost too): + * {font: 'foo', fontVariant: 'bar'} -> {fontVariant: 'bar'} + * becomes .style.font = '' + * Removing a longhand property (should revert to shorthand; doesn't): + * {font: 'foo', fontVariant: 'bar'} -> {font: 'foo'} + * becomes .style.fontVariant = '' + */ + + function validateShorthandPropertyCollisionInDev(styleUpdates, nextStyles) { + if (!warnAboutShorthandPropertyCollision) { + return; + } + + if (!nextStyles) { + return; + } + + var expandedUpdates = expandShorthandMap(styleUpdates); + var expandedStyles = expandShorthandMap(nextStyles); + var warnedAbout = {}; + + for (var key in expandedUpdates) { + var originalKey = expandedUpdates[key]; + var correctOriginalKey = expandedStyles[key]; + + if (correctOriginalKey && originalKey !== correctOriginalKey) { + var warningKey = originalKey + ',' + correctOriginalKey; + + if (warnedAbout[warningKey]) { + continue; + } + + warnedAbout[warningKey] = true; + warning$1( + false, + '%s a style property during rerender (%s) when a ' + + 'conflicting property is set (%s) can lead to styling bugs. To ' + + "avoid this, don't mix shorthand and non-shorthand properties " + + 'for the same value; instead, replace the shorthand with ' + + 'separate values.', + isValueEmpty(styleUpdates[originalKey]) ? 'Removing' : 'Updating', + originalKey, + correctOriginalKey, + ); + } + } + } + + // For HTML, certain tags should omit their close tag. We keep a whitelist for + // those special-case tags. + var omittedCloseTags = { + area: true, + base: true, + br: true, + col: true, + embed: true, + hr: true, + img: true, + input: true, + keygen: true, + link: true, + meta: true, + param: true, + source: true, + track: true, + wbr: true, // NOTE: menuitem's close tag should be omitted, but that causes problems. + }; + + // `omittedCloseTags` except that `menuitem` should still have its closing tag. + + var voidElementTags = _assign( + { + menuitem: true, + }, + omittedCloseTags, + ); + + // or add stack by default to invariants where possible. + + var HTML$1 = '__html'; + var ReactDebugCurrentFrame$3 = null; + + { + ReactDebugCurrentFrame$3 = ReactSharedInternals.ReactDebugCurrentFrame; + } + + function assertValidProps(tag, props) { + if (!props) { + return; + } // Note the use of `==` which checks for null or undefined. + + if (voidElementTags[tag]) { + if (!(props.children == null && props.dangerouslySetInnerHTML == null)) { + { + throw Error( + tag + + ' is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.' + + ReactDebugCurrentFrame$3.getStackAddendum(), + ); + } + } + } + + if (props.dangerouslySetInnerHTML != null) { + if (!(props.children == null)) { + { + throw Error('Can only set one of `children` or `props.dangerouslySetInnerHTML`.'); + } + } + + if ( + !( + typeof props.dangerouslySetInnerHTML === 'object' && HTML$1 in props.dangerouslySetInnerHTML + ) + ) { + { + throw Error( + '`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://fb.me/react-invariant-dangerously-set-inner-html for more information.', + ); + } + } + } + + { + !(props.suppressContentEditableWarning || !props.contentEditable || props.children == null) + ? warning$1( + false, + 'A component is `contentEditable` and contains `children` managed by ' + + 'React. It is now your responsibility to guarantee that none of ' + + 'those nodes are unexpectedly modified or duplicated. This is ' + + 'probably not intentional.', + ) + : void 0; + } + + if (!(props.style == null || typeof props.style === 'object')) { + { + throw Error( + "The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX." + + ReactDebugCurrentFrame$3.getStackAddendum(), + ); + } + } + } + + function isCustomComponent(tagName, props) { + if (tagName.indexOf('-') === -1) { + return typeof props.is === 'string'; + } + + switch (tagName) { + // These are reserved SVG and MathML elements. + // We don't mind this whitelist too much because we expect it to never grow. + // The alternative is to track the namespace in a few places which is convoluted. + // https://w3c.github.io/webcomponents/spec/custom/#custom-elements-core-concepts + case 'annotation-xml': + case 'color-profile': + case 'font-face': + case 'font-face-src': + case 'font-face-uri': + case 'font-face-format': + case 'font-face-name': + case 'missing-glyph': + return false; + + default: + return true; + } + } + + // When adding attributes to the HTML or SVG whitelist, be sure to + // also add them to this module to ensure casing and incorrect name + // warnings. + var possibleStandardNames = { + // HTML + accept: 'accept', + acceptcharset: 'acceptCharset', + 'accept-charset': 'acceptCharset', + accesskey: 'accessKey', + action: 'action', + allowfullscreen: 'allowFullScreen', + alt: 'alt', + as: 'as', + async: 'async', + autocapitalize: 'autoCapitalize', + autocomplete: 'autoComplete', + autocorrect: 'autoCorrect', + autofocus: 'autoFocus', + autoplay: 'autoPlay', + autosave: 'autoSave', + capture: 'capture', + cellpadding: 'cellPadding', + cellspacing: 'cellSpacing', + challenge: 'challenge', + charset: 'charSet', + checked: 'checked', + children: 'children', + cite: 'cite', + class: 'className', + classid: 'classID', + classname: 'className', + cols: 'cols', + colspan: 'colSpan', + content: 'content', + contenteditable: 'contentEditable', + contextmenu: 'contextMenu', + controls: 'controls', + controlslist: 'controlsList', + coords: 'coords', + crossorigin: 'crossOrigin', + dangerouslysetinnerhtml: 'dangerouslySetInnerHTML', + data: 'data', + datetime: 'dateTime', + default: 'default', + defaultchecked: 'defaultChecked', + defaultvalue: 'defaultValue', + defer: 'defer', + dir: 'dir', + disabled: 'disabled', + disablepictureinpicture: 'disablePictureInPicture', + download: 'download', + draggable: 'draggable', + enctype: 'encType', + for: 'htmlFor', + form: 'form', + formmethod: 'formMethod', + formaction: 'formAction', + formenctype: 'formEncType', + formnovalidate: 'formNoValidate', + formtarget: 'formTarget', + frameborder: 'frameBorder', + headers: 'headers', + height: 'height', + hidden: 'hidden', + high: 'high', + href: 'href', + hreflang: 'hrefLang', + htmlfor: 'htmlFor', + httpequiv: 'httpEquiv', + 'http-equiv': 'httpEquiv', + icon: 'icon', + id: 'id', + innerhtml: 'innerHTML', + inputmode: 'inputMode', + integrity: 'integrity', + is: 'is', + itemid: 'itemID', + itemprop: 'itemProp', + itemref: 'itemRef', + itemscope: 'itemScope', + itemtype: 'itemType', + keyparams: 'keyParams', + keytype: 'keyType', + kind: 'kind', + label: 'label', + lang: 'lang', + list: 'list', + loop: 'loop', + low: 'low', + manifest: 'manifest', + marginwidth: 'marginWidth', + marginheight: 'marginHeight', + max: 'max', + maxlength: 'maxLength', + media: 'media', + mediagroup: 'mediaGroup', + method: 'method', + min: 'min', + minlength: 'minLength', + multiple: 'multiple', + muted: 'muted', + name: 'name', + nomodule: 'noModule', + nonce: 'nonce', + novalidate: 'noValidate', + open: 'open', + optimum: 'optimum', + pattern: 'pattern', + placeholder: 'placeholder', + playsinline: 'playsInline', + poster: 'poster', + preload: 'preload', + profile: 'profile', + radiogroup: 'radioGroup', + readonly: 'readOnly', + referrerpolicy: 'referrerPolicy', + rel: 'rel', + required: 'required', + reversed: 'reversed', + role: 'role', + rows: 'rows', + rowspan: 'rowSpan', + sandbox: 'sandbox', + scope: 'scope', + scoped: 'scoped', + scrolling: 'scrolling', + seamless: 'seamless', + selected: 'selected', + shape: 'shape', + size: 'size', + sizes: 'sizes', + span: 'span', + spellcheck: 'spellCheck', + src: 'src', + srcdoc: 'srcDoc', + srclang: 'srcLang', + srcset: 'srcSet', + start: 'start', + step: 'step', + style: 'style', + summary: 'summary', + tabindex: 'tabIndex', + target: 'target', + title: 'title', + type: 'type', + usemap: 'useMap', + value: 'value', + width: 'width', + wmode: 'wmode', + wrap: 'wrap', + // SVG + about: 'about', + accentheight: 'accentHeight', + 'accent-height': 'accentHeight', + accumulate: 'accumulate', + additive: 'additive', + alignmentbaseline: 'alignmentBaseline', + 'alignment-baseline': 'alignmentBaseline', + allowreorder: 'allowReorder', + alphabetic: 'alphabetic', + amplitude: 'amplitude', + arabicform: 'arabicForm', + 'arabic-form': 'arabicForm', + ascent: 'ascent', + attributename: 'attributeName', + attributetype: 'attributeType', + autoreverse: 'autoReverse', + azimuth: 'azimuth', + basefrequency: 'baseFrequency', + baselineshift: 'baselineShift', + 'baseline-shift': 'baselineShift', + baseprofile: 'baseProfile', + bbox: 'bbox', + begin: 'begin', + bias: 'bias', + by: 'by', + calcmode: 'calcMode', + capheight: 'capHeight', + 'cap-height': 'capHeight', + clip: 'clip', + clippath: 'clipPath', + 'clip-path': 'clipPath', + clippathunits: 'clipPathUnits', + cliprule: 'clipRule', + 'clip-rule': 'clipRule', + color: 'color', + colorinterpolation: 'colorInterpolation', + 'color-interpolation': 'colorInterpolation', + colorinterpolationfilters: 'colorInterpolationFilters', + 'color-interpolation-filters': 'colorInterpolationFilters', + colorprofile: 'colorProfile', + 'color-profile': 'colorProfile', + colorrendering: 'colorRendering', + 'color-rendering': 'colorRendering', + contentscripttype: 'contentScriptType', + contentstyletype: 'contentStyleType', + cursor: 'cursor', + cx: 'cx', + cy: 'cy', + d: 'd', + datatype: 'datatype', + decelerate: 'decelerate', + descent: 'descent', + diffuseconstant: 'diffuseConstant', + direction: 'direction', + display: 'display', + divisor: 'divisor', + dominantbaseline: 'dominantBaseline', + 'dominant-baseline': 'dominantBaseline', + dur: 'dur', + dx: 'dx', + dy: 'dy', + edgemode: 'edgeMode', + elevation: 'elevation', + enablebackground: 'enableBackground', + 'enable-background': 'enableBackground', + end: 'end', + exponent: 'exponent', + externalresourcesrequired: 'externalResourcesRequired', + fill: 'fill', + fillopacity: 'fillOpacity', + 'fill-opacity': 'fillOpacity', + fillrule: 'fillRule', + 'fill-rule': 'fillRule', + filter: 'filter', + filterres: 'filterRes', + filterunits: 'filterUnits', + floodopacity: 'floodOpacity', + 'flood-opacity': 'floodOpacity', + floodcolor: 'floodColor', + 'flood-color': 'floodColor', + focusable: 'focusable', + fontfamily: 'fontFamily', + 'font-family': 'fontFamily', + fontsize: 'fontSize', + 'font-size': 'fontSize', + fontsizeadjust: 'fontSizeAdjust', + 'font-size-adjust': 'fontSizeAdjust', + fontstretch: 'fontStretch', + 'font-stretch': 'fontStretch', + fontstyle: 'fontStyle', + 'font-style': 'fontStyle', + fontvariant: 'fontVariant', + 'font-variant': 'fontVariant', + fontweight: 'fontWeight', + 'font-weight': 'fontWeight', + format: 'format', + from: 'from', + fx: 'fx', + fy: 'fy', + g1: 'g1', + g2: 'g2', + glyphname: 'glyphName', + 'glyph-name': 'glyphName', + glyphorientationhorizontal: 'glyphOrientationHorizontal', + 'glyph-orientation-horizontal': 'glyphOrientationHorizontal', + glyphorientationvertical: 'glyphOrientationVertical', + 'glyph-orientation-vertical': 'glyphOrientationVertical', + glyphref: 'glyphRef', + gradienttransform: 'gradientTransform', + gradientunits: 'gradientUnits', + hanging: 'hanging', + horizadvx: 'horizAdvX', + 'horiz-adv-x': 'horizAdvX', + horizoriginx: 'horizOriginX', + 'horiz-origin-x': 'horizOriginX', + ideographic: 'ideographic', + imagerendering: 'imageRendering', + 'image-rendering': 'imageRendering', + in2: 'in2', + in: 'in', + inlist: 'inlist', + intercept: 'intercept', + k1: 'k1', + k2: 'k2', + k3: 'k3', + k4: 'k4', + k: 'k', + kernelmatrix: 'kernelMatrix', + kernelunitlength: 'kernelUnitLength', + kerning: 'kerning', + keypoints: 'keyPoints', + keysplines: 'keySplines', + keytimes: 'keyTimes', + lengthadjust: 'lengthAdjust', + letterspacing: 'letterSpacing', + 'letter-spacing': 'letterSpacing', + lightingcolor: 'lightingColor', + 'lighting-color': 'lightingColor', + limitingconeangle: 'limitingConeAngle', + local: 'local', + markerend: 'markerEnd', + 'marker-end': 'markerEnd', + markerheight: 'markerHeight', + markermid: 'markerMid', + 'marker-mid': 'markerMid', + markerstart: 'markerStart', + 'marker-start': 'markerStart', + markerunits: 'markerUnits', + markerwidth: 'markerWidth', + mask: 'mask', + maskcontentunits: 'maskContentUnits', + maskunits: 'maskUnits', + mathematical: 'mathematical', + mode: 'mode', + numoctaves: 'numOctaves', + offset: 'offset', + opacity: 'opacity', + operator: 'operator', + order: 'order', + orient: 'orient', + orientation: 'orientation', + origin: 'origin', + overflow: 'overflow', + overlineposition: 'overlinePosition', + 'overline-position': 'overlinePosition', + overlinethickness: 'overlineThickness', + 'overline-thickness': 'overlineThickness', + paintorder: 'paintOrder', + 'paint-order': 'paintOrder', + panose1: 'panose1', + 'panose-1': 'panose1', + pathlength: 'pathLength', + patterncontentunits: 'patternContentUnits', + patterntransform: 'patternTransform', + patternunits: 'patternUnits', + pointerevents: 'pointerEvents', + 'pointer-events': 'pointerEvents', + points: 'points', + pointsatx: 'pointsAtX', + pointsaty: 'pointsAtY', + pointsatz: 'pointsAtZ', + prefix: 'prefix', + preservealpha: 'preserveAlpha', + preserveaspectratio: 'preserveAspectRatio', + primitiveunits: 'primitiveUnits', + property: 'property', + r: 'r', + radius: 'radius', + refx: 'refX', + refy: 'refY', + renderingintent: 'renderingIntent', + 'rendering-intent': 'renderingIntent', + repeatcount: 'repeatCount', + repeatdur: 'repeatDur', + requiredextensions: 'requiredExtensions', + requiredfeatures: 'requiredFeatures', + resource: 'resource', + restart: 'restart', + result: 'result', + results: 'results', + rotate: 'rotate', + rx: 'rx', + ry: 'ry', + scale: 'scale', + security: 'security', + seed: 'seed', + shaperendering: 'shapeRendering', + 'shape-rendering': 'shapeRendering', + slope: 'slope', + spacing: 'spacing', + specularconstant: 'specularConstant', + specularexponent: 'specularExponent', + speed: 'speed', + spreadmethod: 'spreadMethod', + startoffset: 'startOffset', + stddeviation: 'stdDeviation', + stemh: 'stemh', + stemv: 'stemv', + stitchtiles: 'stitchTiles', + stopcolor: 'stopColor', + 'stop-color': 'stopColor', + stopopacity: 'stopOpacity', + 'stop-opacity': 'stopOpacity', + strikethroughposition: 'strikethroughPosition', + 'strikethrough-position': 'strikethroughPosition', + strikethroughthickness: 'strikethroughThickness', + 'strikethrough-thickness': 'strikethroughThickness', + string: 'string', + stroke: 'stroke', + strokedasharray: 'strokeDasharray', + 'stroke-dasharray': 'strokeDasharray', + strokedashoffset: 'strokeDashoffset', + 'stroke-dashoffset': 'strokeDashoffset', + strokelinecap: 'strokeLinecap', + 'stroke-linecap': 'strokeLinecap', + strokelinejoin: 'strokeLinejoin', + 'stroke-linejoin': 'strokeLinejoin', + strokemiterlimit: 'strokeMiterlimit', + 'stroke-miterlimit': 'strokeMiterlimit', + strokewidth: 'strokeWidth', + 'stroke-width': 'strokeWidth', + strokeopacity: 'strokeOpacity', + 'stroke-opacity': 'strokeOpacity', + suppresscontenteditablewarning: 'suppressContentEditableWarning', + suppresshydrationwarning: 'suppressHydrationWarning', + surfacescale: 'surfaceScale', + systemlanguage: 'systemLanguage', + tablevalues: 'tableValues', + targetx: 'targetX', + targety: 'targetY', + textanchor: 'textAnchor', + 'text-anchor': 'textAnchor', + textdecoration: 'textDecoration', + 'text-decoration': 'textDecoration', + textlength: 'textLength', + textrendering: 'textRendering', + 'text-rendering': 'textRendering', + to: 'to', + transform: 'transform', + typeof: 'typeof', + u1: 'u1', + u2: 'u2', + underlineposition: 'underlinePosition', + 'underline-position': 'underlinePosition', + underlinethickness: 'underlineThickness', + 'underline-thickness': 'underlineThickness', + unicode: 'unicode', + unicodebidi: 'unicodeBidi', + 'unicode-bidi': 'unicodeBidi', + unicoderange: 'unicodeRange', + 'unicode-range': 'unicodeRange', + unitsperem: 'unitsPerEm', + 'units-per-em': 'unitsPerEm', + unselectable: 'unselectable', + valphabetic: 'vAlphabetic', + 'v-alphabetic': 'vAlphabetic', + values: 'values', + vectoreffect: 'vectorEffect', + 'vector-effect': 'vectorEffect', + version: 'version', + vertadvy: 'vertAdvY', + 'vert-adv-y': 'vertAdvY', + vertoriginx: 'vertOriginX', + 'vert-origin-x': 'vertOriginX', + vertoriginy: 'vertOriginY', + 'vert-origin-y': 'vertOriginY', + vhanging: 'vHanging', + 'v-hanging': 'vHanging', + videographic: 'vIdeographic', + 'v-ideographic': 'vIdeographic', + viewbox: 'viewBox', + viewtarget: 'viewTarget', + visibility: 'visibility', + vmathematical: 'vMathematical', + 'v-mathematical': 'vMathematical', + vocab: 'vocab', + widths: 'widths', + wordspacing: 'wordSpacing', + 'word-spacing': 'wordSpacing', + writingmode: 'writingMode', + 'writing-mode': 'writingMode', + x1: 'x1', + x2: 'x2', + x: 'x', + xchannelselector: 'xChannelSelector', + xheight: 'xHeight', + 'x-height': 'xHeight', + xlinkactuate: 'xlinkActuate', + 'xlink:actuate': 'xlinkActuate', + xlinkarcrole: 'xlinkArcrole', + 'xlink:arcrole': 'xlinkArcrole', + xlinkhref: 'xlinkHref', + 'xlink:href': 'xlinkHref', + xlinkrole: 'xlinkRole', + 'xlink:role': 'xlinkRole', + xlinkshow: 'xlinkShow', + 'xlink:show': 'xlinkShow', + xlinktitle: 'xlinkTitle', + 'xlink:title': 'xlinkTitle', + xlinktype: 'xlinkType', + 'xlink:type': 'xlinkType', + xmlbase: 'xmlBase', + 'xml:base': 'xmlBase', + xmllang: 'xmlLang', + 'xml:lang': 'xmlLang', + xmlns: 'xmlns', + 'xml:space': 'xmlSpace', + xmlnsxlink: 'xmlnsXlink', + 'xmlns:xlink': 'xmlnsXlink', + xmlspace: 'xmlSpace', + y1: 'y1', + y2: 'y2', + y: 'y', + ychannelselector: 'yChannelSelector', + z: 'z', + zoomandpan: 'zoomAndPan', + }; + + var ariaProperties = { + 'aria-current': 0, + // state + 'aria-details': 0, + 'aria-disabled': 0, + // state + 'aria-hidden': 0, + // state + 'aria-invalid': 0, + // state + 'aria-keyshortcuts': 0, + 'aria-label': 0, + 'aria-roledescription': 0, + // Widget Attributes + 'aria-autocomplete': 0, + 'aria-checked': 0, + 'aria-expanded': 0, + 'aria-haspopup': 0, + 'aria-level': 0, + 'aria-modal': 0, + 'aria-multiline': 0, + 'aria-multiselectable': 0, + 'aria-orientation': 0, + 'aria-placeholder': 0, + 'aria-pressed': 0, + 'aria-readonly': 0, + 'aria-required': 0, + 'aria-selected': 0, + 'aria-sort': 0, + 'aria-valuemax': 0, + 'aria-valuemin': 0, + 'aria-valuenow': 0, + 'aria-valuetext': 0, + // Live Region Attributes + 'aria-atomic': 0, + 'aria-busy': 0, + 'aria-live': 0, + 'aria-relevant': 0, + // Drag-and-Drop Attributes + 'aria-dropeffect': 0, + 'aria-grabbed': 0, + // Relationship Attributes + 'aria-activedescendant': 0, + 'aria-colcount': 0, + 'aria-colindex': 0, + 'aria-colspan': 0, + 'aria-controls': 0, + 'aria-describedby': 0, + 'aria-errormessage': 0, + 'aria-flowto': 0, + 'aria-labelledby': 0, + 'aria-owns': 0, + 'aria-posinset': 0, + 'aria-rowcount': 0, + 'aria-rowindex': 0, + 'aria-rowspan': 0, + 'aria-setsize': 0, + }; + + var warnedProperties = {}; + var rARIA = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$'); + var rARIACamel = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$'); + var hasOwnProperty$1 = Object.prototype.hasOwnProperty; + + function validateProperty(tagName, name) { + if (hasOwnProperty$1.call(warnedProperties, name) && warnedProperties[name]) { + return true; + } + + if (rARIACamel.test(name)) { + var ariaName = 'aria-' + name.slice(4).toLowerCase(); + var correctName = ariaProperties.hasOwnProperty(ariaName) ? ariaName : null; // If this is an aria-* attribute, but is not listed in the known DOM + // DOM properties, then it is an invalid aria-* attribute. + + if (correctName == null) { + warning$1( + false, + 'Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.', + name, + ); + warnedProperties[name] = true; + return true; + } // aria-* attributes should be lowercase; suggest the lowercase version. + + if (name !== correctName) { + warning$1(false, 'Invalid ARIA attribute `%s`. Did you mean `%s`?', name, correctName); + warnedProperties[name] = true; + return true; + } + } + + if (rARIA.test(name)) { + var lowerCasedName = name.toLowerCase(); + var standardName = ariaProperties.hasOwnProperty(lowerCasedName) ? lowerCasedName : null; // If this is an aria-* attribute, but is not listed in the known DOM + // DOM properties, then it is an invalid aria-* attribute. + + if (standardName == null) { + warnedProperties[name] = true; + return false; + } // aria-* attributes should be lowercase; suggest the lowercase version. + + if (name !== standardName) { + warning$1(false, 'Unknown ARIA attribute `%s`. Did you mean `%s`?', name, standardName); + warnedProperties[name] = true; + return true; + } + } + + return true; + } + + function warnInvalidARIAProps(type, props) { + var invalidProps = []; + + for (var key in props) { + var isValid = validateProperty(type, key); + + if (!isValid) { + invalidProps.push(key); + } + } + + var unknownPropString = invalidProps + .map(function (prop) { + return '`' + prop + '`'; + }) + .join(', '); + + if (invalidProps.length === 1) { + warning$1( + false, + 'Invalid aria prop %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop', + unknownPropString, + type, + ); + } else if (invalidProps.length > 1) { + warning$1( + false, + 'Invalid aria props %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop', + unknownPropString, + type, + ); + } + } + + function validateProperties(type, props) { + if (isCustomComponent(type, props)) { + return; + } + + warnInvalidARIAProps(type, props); + } + + var didWarnValueNull = false; + function validateProperties$1(type, props) { + if (type !== 'input' && type !== 'textarea' && type !== 'select') { + return; + } + + if (props != null && props.value === null && !didWarnValueNull) { + didWarnValueNull = true; + + if (type === 'select' && props.multiple) { + warning$1( + false, + '`value` prop on `%s` should not be null. ' + + 'Consider using an empty array when `multiple` is set to `true` ' + + 'to clear the component or `undefined` for uncontrolled components.', + type, + ); + } else { + warning$1( + false, + '`value` prop on `%s` should not be null. ' + + 'Consider using an empty string to clear the component or `undefined` ' + + 'for uncontrolled components.', + type, + ); + } + } + } + + var validateProperty$1 = function () {}; + + { + var warnedProperties$1 = {}; + var _hasOwnProperty = Object.prototype.hasOwnProperty; + var EVENT_NAME_REGEX = /^on./; + var INVALID_EVENT_NAME_REGEX = /^on[^A-Z]/; + var rARIA$1 = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$'); + var rARIACamel$1 = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$'); + + validateProperty$1 = function (tagName, name, value, canUseEventSystem) { + if (_hasOwnProperty.call(warnedProperties$1, name) && warnedProperties$1[name]) { + return true; + } + + var lowerCasedName = name.toLowerCase(); + + if (lowerCasedName === 'onfocusin' || lowerCasedName === 'onfocusout') { + warning$1( + false, + 'React uses onFocus and onBlur instead of onFocusIn and onFocusOut. ' + + 'All React events are normalized to bubble, so onFocusIn and onFocusOut ' + + 'are not needed/supported by React.', + ); + warnedProperties$1[name] = true; + return true; + } // We can't rely on the event system being injected on the server. + + if (canUseEventSystem) { + if (registrationNameModules.hasOwnProperty(name)) { + return true; + } + + var registrationName = possibleRegistrationNames.hasOwnProperty(lowerCasedName) + ? possibleRegistrationNames[lowerCasedName] + : null; + + if (registrationName != null) { + warning$1( + false, + 'Invalid event handler property `%s`. Did you mean `%s`?', + name, + registrationName, + ); + warnedProperties$1[name] = true; + return true; + } + + if (EVENT_NAME_REGEX.test(name)) { + warning$1(false, 'Unknown event handler property `%s`. It will be ignored.', name); + warnedProperties$1[name] = true; + return true; + } + } else if (EVENT_NAME_REGEX.test(name)) { + // If no event plugins have been injected, we are in a server environment. + // So we can't tell if the event name is correct for sure, but we can filter + // out known bad ones like `onclick`. We can't suggest a specific replacement though. + if (INVALID_EVENT_NAME_REGEX.test(name)) { + warning$1( + false, + 'Invalid event handler property `%s`. ' + + 'React events use the camelCase naming convention, for example `onClick`.', + name, + ); + } + + warnedProperties$1[name] = true; + return true; + } // Let the ARIA attribute hook validate ARIA attributes + + if (rARIA$1.test(name) || rARIACamel$1.test(name)) { + return true; + } + + if (lowerCasedName === 'innerhtml') { + warning$1( + false, + 'Directly setting property `innerHTML` is not permitted. ' + + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.', + ); + warnedProperties$1[name] = true; + return true; + } + + if (lowerCasedName === 'aria') { + warning$1( + false, + 'The `aria` attribute is reserved for future use in React. ' + + 'Pass individual `aria-` attributes instead.', + ); + warnedProperties$1[name] = true; + return true; + } + + if ( + lowerCasedName === 'is' && + value !== null && + value !== undefined && + typeof value !== 'string' + ) { + warning$1( + false, + 'Received a `%s` for a string attribute `is`. If this is expected, cast ' + + 'the value to a string.', + typeof value, + ); + warnedProperties$1[name] = true; + return true; + } + + if (typeof value === 'number' && isNaN(value)) { + warning$1( + false, + 'Received NaN for the `%s` attribute. If this is expected, cast ' + + 'the value to a string.', + name, + ); + warnedProperties$1[name] = true; + return true; + } + + var propertyInfo = getPropertyInfo(name); + var isReserved = propertyInfo !== null && propertyInfo.type === RESERVED; // Known attributes should match the casing specified in the property config. + + if (possibleStandardNames.hasOwnProperty(lowerCasedName)) { + var standardName = possibleStandardNames[lowerCasedName]; + + if (standardName !== name) { + warning$1(false, 'Invalid DOM property `%s`. Did you mean `%s`?', name, standardName); + warnedProperties$1[name] = true; + return true; + } + } else if (!isReserved && name !== lowerCasedName) { + // Unknown attributes should have lowercase casing since that's how they + // will be cased anyway with server rendering. + warning$1( + false, + 'React does not recognize the `%s` prop on a DOM element. If you ' + + 'intentionally want it to appear in the DOM as a custom ' + + 'attribute, spell it as lowercase `%s` instead. ' + + 'If you accidentally passed it from a parent component, remove ' + + 'it from the DOM element.', + name, + lowerCasedName, + ); + warnedProperties$1[name] = true; + return true; + } + + if ( + typeof value === 'boolean' && + shouldRemoveAttributeWithWarning(name, value, propertyInfo, false) + ) { + if (value) { + warning$1( + false, + 'Received `%s` for a non-boolean attribute `%s`.\n\n' + + 'If you want to write it to the DOM, pass a string instead: ' + + '%s="%s" or %s={value.toString()}.', + value, + name, + name, + value, + name, + ); + } else { + warning$1( + false, + 'Received `%s` for a non-boolean attribute `%s`.\n\n' + + 'If you want to write it to the DOM, pass a string instead: ' + + '%s="%s" or %s={value.toString()}.\n\n' + + 'If you used to conditionally omit it with %s={condition && value}, ' + + 'pass %s={condition ? value : undefined} instead.', + value, + name, + name, + value, + name, + name, + name, + ); + } + + warnedProperties$1[name] = true; + return true; + } // Now that we've validated casing, do not validate + // data types for reserved props + + if (isReserved) { + return true; + } // Warn when a known attribute is a bad type + + if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, false)) { + warnedProperties$1[name] = true; + return false; + } // Warn when passing the strings 'false' or 'true' into a boolean prop + + if ( + (value === 'false' || value === 'true') && + propertyInfo !== null && + propertyInfo.type === BOOLEAN + ) { + warning$1( + false, + 'Received the string `%s` for the boolean attribute `%s`. ' + + '%s ' + + 'Did you mean %s={%s}?', + value, + name, + value === 'false' + ? 'The browser will interpret it as a truthy value.' + : 'Although this works, it will not work as expected if you pass the string "false".', + name, + value, + ); + warnedProperties$1[name] = true; + return true; + } + + return true; + }; + } + + var warnUnknownProperties = function (type, props, canUseEventSystem) { + var unknownProps = []; + + for (var key in props) { + var isValid = validateProperty$1(type, key, props[key], canUseEventSystem); + + if (!isValid) { + unknownProps.push(key); + } + } + + var unknownPropString = unknownProps + .map(function (prop) { + return '`' + prop + '`'; + }) + .join(', '); + + if (unknownProps.length === 1) { + warning$1( + false, + 'Invalid value for prop %s on <%s> tag. Either remove it from the element, ' + + 'or pass a string or number value to keep it in the DOM. ' + + 'For details, see https://fb.me/react-attribute-behavior', + unknownPropString, + type, + ); + } else if (unknownProps.length > 1) { + warning$1( + false, + 'Invalid values for props %s on <%s> tag. Either remove them from the element, ' + + 'or pass a string or number value to keep them in the DOM. ' + + 'For details, see https://fb.me/react-attribute-behavior', + unknownPropString, + type, + ); + } + }; + + function validateProperties$2(type, props, canUseEventSystem) { + if (isCustomComponent(type, props)) { + return; + } + + warnUnknownProperties(type, props, canUseEventSystem); + } + + // TODO: direct imports like some-package/src/* are bad. Fix me. + var didWarnInvalidHydration = false; + var didWarnShadyDOM = false; + var didWarnScriptTags = false; + var DANGEROUSLY_SET_INNER_HTML = 'dangerouslySetInnerHTML'; + var SUPPRESS_CONTENT_EDITABLE_WARNING = 'suppressContentEditableWarning'; + var SUPPRESS_HYDRATION_WARNING$1 = 'suppressHydrationWarning'; + var AUTOFOCUS = 'autoFocus'; + var CHILDREN = 'children'; + var STYLE$1 = 'style'; + var HTML = '__html'; + var LISTENERS = 'listeners'; + var HTML_NAMESPACE = Namespaces.html; + var warnedUnknownTags; + var suppressHydrationWarning; + var validatePropertiesInDevelopment; + var warnForTextDifference; + var warnForPropDifference; + var warnForExtraAttributes; + var warnForInvalidEventListener; + var canDiffStyleForHydrationWarning; + var normalizeMarkupForTextOrAttribute; + var normalizeHTML; + + { + warnedUnknownTags = { + // Chrome is the only major browser not shipping <time>. But as of July + // 2017 it intends to ship it due to widespread usage. We intentionally + // *don't* warn for <time> even if it's unrecognized by Chrome because + // it soon will be, and many apps have been using it anyway. + time: true, + // There are working polyfills for <dialog>. Let people use it. + dialog: true, + // Electron ships a custom <webview> tag to display external web content in + // an isolated frame and process. + // This tag is not present in non Electron environments such as JSDom which + // is often used for testing purposes. + // @see https://electronjs.org/docs/api/webview-tag + webview: true, + }; + + validatePropertiesInDevelopment = function (type, props) { + validateProperties(type, props); + validateProperties$1(type, props); + validateProperties$2( + type, + props, + /* canUseEventSystem */ + true, + ); + }; // IE 11 parses & normalizes the style attribute as opposed to other + // browsers. It adds spaces and sorts the properties in some + // non-alphabetical order. Handling that would require sorting CSS + // properties in the client & server versions or applying + // `expectedStyle` to a temporary DOM node to read its `style` attribute + // normalized. Since it only affects IE, we're skipping style warnings + // in that browser completely in favor of doing all that work. + // See https://github.com/facebook/react/issues/11807 + + canDiffStyleForHydrationWarning = canUseDOM && !document.documentMode; // HTML parsing normalizes CR and CRLF to LF. + // It also can turn \u0000 into \uFFFD inside attributes. + // https://www.w3.org/TR/html5/single-page.html#preprocessing-the-input-stream + // If we have a mismatch, it might be caused by that. + // We will still patch up in this case but not fire the warning. + + var NORMALIZE_NEWLINES_REGEX = /\r\n?/g; + var NORMALIZE_NULL_AND_REPLACEMENT_REGEX = /\u0000|\uFFFD/g; + + normalizeMarkupForTextOrAttribute = function (markup) { + var markupString = typeof markup === 'string' ? markup : '' + markup; + return markupString + .replace(NORMALIZE_NEWLINES_REGEX, '\n') + .replace(NORMALIZE_NULL_AND_REPLACEMENT_REGEX, ''); + }; + + warnForTextDifference = function (serverText, clientText) { + if (didWarnInvalidHydration) { + return; + } + + var normalizedClientText = normalizeMarkupForTextOrAttribute(clientText); + var normalizedServerText = normalizeMarkupForTextOrAttribute(serverText); + + if (normalizedServerText === normalizedClientText) { + return; + } + + didWarnInvalidHydration = true; + warningWithoutStack$1( + false, + 'Text content did not match. Server: "%s" Client: "%s"', + normalizedServerText, + normalizedClientText, + ); + }; + + warnForPropDifference = function (propName, serverValue, clientValue) { + if (didWarnInvalidHydration) { + return; + } + + var normalizedClientValue = normalizeMarkupForTextOrAttribute(clientValue); + var normalizedServerValue = normalizeMarkupForTextOrAttribute(serverValue); + + if (normalizedServerValue === normalizedClientValue) { + return; + } + + didWarnInvalidHydration = true; + warningWithoutStack$1( + false, + 'Prop `%s` did not match. Server: %s Client: %s', + propName, + JSON.stringify(normalizedServerValue), + JSON.stringify(normalizedClientValue), + ); + }; + + warnForExtraAttributes = function (attributeNames) { + if (didWarnInvalidHydration) { + return; + } + + didWarnInvalidHydration = true; + var names = []; + attributeNames.forEach(function (name) { + names.push(name); + }); + warningWithoutStack$1(false, 'Extra attributes from the server: %s', names); + }; + + warnForInvalidEventListener = function (registrationName, listener) { + if (listener === false) { + warning$1( + false, + 'Expected `%s` listener to be a function, instead got `false`.\n\n' + + 'If you used to conditionally omit it with %s={condition && value}, ' + + 'pass %s={condition ? value : undefined} instead.', + registrationName, + registrationName, + registrationName, + ); + } else { + warning$1( + false, + 'Expected `%s` listener to be a function, instead got a value of `%s` type.', + registrationName, + typeof listener, + ); + } + }; // Parse the HTML and read it back to normalize the HTML string so that it + // can be used for comparison. + + normalizeHTML = function (parent, html) { + // We could have created a separate document here to avoid + // re-initializing custom elements if they exist. But this breaks + // how <noscript> is being handled. So we use the same document. + // See the discussion in https://github.com/facebook/react/pull/11157. + var testElement = + parent.namespaceURI === HTML_NAMESPACE + ? parent.ownerDocument.createElement(parent.tagName) + : parent.ownerDocument.createElementNS(parent.namespaceURI, parent.tagName); + testElement.innerHTML = html; + return testElement.innerHTML; + }; + } + + function ensureListeningTo(rootContainerElement, registrationName) { + var isDocumentOrFragment = + rootContainerElement.nodeType === DOCUMENT_NODE || + rootContainerElement.nodeType === DOCUMENT_FRAGMENT_NODE; + var doc = isDocumentOrFragment ? rootContainerElement : rootContainerElement.ownerDocument; + listenTo(registrationName, doc); + } + + function getOwnerDocumentFromRootContainer(rootContainerElement) { + return rootContainerElement.nodeType === DOCUMENT_NODE + ? rootContainerElement + : rootContainerElement.ownerDocument; + } + + function noop() {} + + function trapClickOnNonInteractiveElement(node) { + // Mobile Safari does not fire properly bubble click events on + // non-interactive elements, which means delegated click listeners do not + // fire. The workaround for this bug involves attaching an empty click + // listener on the target node. + // http://www.quirksmode.org/blog/archives/2010/09/click_event_del.html + // Just set it using the onclick property so that we don't have to manage any + // bookkeeping for it. Not sure if we need to clear it when the listener is + // removed. + // TODO: Only do this for the relevant Safaris maybe? + node.onclick = noop; + } + + function setInitialDOMProperties( + tag, + domElement, + rootContainerElement, + nextProps, + isCustomComponentTag, + ) { + for (var propKey in nextProps) { + if (!nextProps.hasOwnProperty(propKey)) { + continue; + } + + var nextProp = nextProps[propKey]; + + if (propKey === STYLE$1) { + { + if (nextProp) { + // Freeze the next style object so that we can assume it won't be + // mutated. We have already warned for this in the past. + Object.freeze(nextProp); + } + } // Relies on `updateStylesByID` not mutating `styleUpdates`. + + setValueForStyles(domElement, nextProp); + } else if (propKey === DANGEROUSLY_SET_INNER_HTML) { + var nextHtml = nextProp ? nextProp[HTML] : undefined; + + if (nextHtml != null) { + setInnerHTML(domElement, nextHtml); + } + } else if (propKey === CHILDREN) { + if (typeof nextProp === 'string') { + // Avoid setting initial textContent when the text is empty. In IE11 setting + // textContent on a <textarea> will cause the placeholder to not + // show within the <textarea> until it has been focused and blurred again. + // https://github.com/facebook/react/issues/6731#issuecomment-254874553 + var canSetTextContent = tag !== 'textarea' || nextProp !== ''; + + if (canSetTextContent) { + setTextContent(domElement, nextProp); + } + } else if (typeof nextProp === 'number') { + setTextContent(domElement, '' + nextProp); + } + } else if ( + (enableFlareAPI && propKey === LISTENERS) || + propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || + propKey === SUPPRESS_HYDRATION_WARNING$1 + ) { + // Noop + } else if (propKey === AUTOFOCUS) { + // We polyfill it separately on the client during commit. + // We could have excluded it in the property list instead of + // adding a special case here, but then it wouldn't be emitted + // on server rendering (but we *do* want to emit it in SSR). + } else if (registrationNameModules.hasOwnProperty(propKey)) { + if (nextProp != null) { + if (true && typeof nextProp !== 'function') { + warnForInvalidEventListener(propKey, nextProp); + } + + ensureListeningTo(rootContainerElement, propKey); + } + } else if (nextProp != null) { + setValueForProperty(domElement, propKey, nextProp, isCustomComponentTag); + } + } + } + + function updateDOMProperties( + domElement, + updatePayload, + wasCustomComponentTag, + isCustomComponentTag, + ) { + // TODO: Handle wasCustomComponentTag + for (var i = 0; i < updatePayload.length; i += 2) { + var propKey = updatePayload[i]; + var propValue = updatePayload[i + 1]; + + if (propKey === STYLE$1) { + setValueForStyles(domElement, propValue); + } else if (propKey === DANGEROUSLY_SET_INNER_HTML) { + setInnerHTML(domElement, propValue); + } else if (propKey === CHILDREN) { + setTextContent(domElement, propValue); + } else { + setValueForProperty(domElement, propKey, propValue, isCustomComponentTag); + } + } + } + + function createElement(type, props, rootContainerElement, parentNamespace) { + var isCustomComponentTag; // We create tags in the namespace of their parent container, except HTML + // tags get no namespace. + + var ownerDocument = getOwnerDocumentFromRootContainer(rootContainerElement); + var domElement; + var namespaceURI = parentNamespace; + + if (namespaceURI === HTML_NAMESPACE) { + namespaceURI = getIntrinsicNamespace(type); + } + + if (namespaceURI === HTML_NAMESPACE) { + { + isCustomComponentTag = isCustomComponent(type, props); // Should this check be gated by parent namespace? Not sure we want to + // allow <SVG> or <mATH>. + + !(isCustomComponentTag || type === type.toLowerCase()) + ? warning$1( + false, + '<%s /> is using incorrect casing. ' + + 'Use PascalCase for React components, ' + + 'or lowercase for HTML elements.', + type, + ) + : void 0; + } + + if (type === 'script') { + // Create the script via .innerHTML so its "parser-inserted" flag is + // set to true and it does not execute + var div = ownerDocument.createElement('div'); + + { + if (enableTrustedTypesIntegration && !didWarnScriptTags) { + warning$1( + false, + 'Encountered a script tag while rendering React component. ' + + 'Scripts inside React components are never executed when rendering ' + + 'on the client. Consider using template tag instead ' + + '(https://developer.mozilla.org/en-US/docs/Web/HTML/Element/template).', + ); + didWarnScriptTags = true; + } + } + + div.innerHTML = '<script><' + '/script>'; // eslint-disable-line + // This is guaranteed to yield a script element. + + var firstChild = div.firstChild; + domElement = div.removeChild(firstChild); + } else if (typeof props.is === 'string') { + // $FlowIssue `createElement` should be updated for Web Components + domElement = ownerDocument.createElement(type, { + is: props.is, + }); + } else { + // Separate else branch instead of using `props.is || undefined` above because of a Firefox bug. + // See discussion in https://github.com/facebook/react/pull/6896 + // and discussion in https://bugzilla.mozilla.org/show_bug.cgi?id=1276240 + domElement = ownerDocument.createElement(type); // Normally attributes are assigned in `setInitialDOMProperties`, however the `multiple` and `size` + // attributes on `select`s needs to be added before `option`s are inserted. + // This prevents: + // - a bug where the `select` does not scroll to the correct option because singular + // `select` elements automatically pick the first item #13222 + // - a bug where the `select` set the first item as selected despite the `size` attribute #14239 + // See https://github.com/facebook/react/issues/13222 + // and https://github.com/facebook/react/issues/14239 + + if (type === 'select') { + var node = domElement; + + if (props.multiple) { + node.multiple = true; + } else if (props.size) { + // Setting a size greater than 1 causes a select to behave like `multiple=true`, where + // it is possible that no option is selected. + // + // This is only necessary when a select in "single selection mode". + node.size = props.size; + } + } + } + } else { + domElement = ownerDocument.createElementNS(namespaceURI, type); + } + + { + if (namespaceURI === HTML_NAMESPACE) { + if ( + !isCustomComponentTag && + Object.prototype.toString.call(domElement) === '[object HTMLUnknownElement]' && + !Object.prototype.hasOwnProperty.call(warnedUnknownTags, type) + ) { + warnedUnknownTags[type] = true; + warning$1( + false, + 'The tag <%s> is unrecognized in this browser. ' + + 'If you meant to render a React component, start its name with ' + + 'an uppercase letter.', + type, + ); + } + } + } + + return domElement; + } + function createTextNode(text, rootContainerElement) { + return getOwnerDocumentFromRootContainer(rootContainerElement).createTextNode(text); + } + function setInitialProperties(domElement, tag, rawProps, rootContainerElement) { + var isCustomComponentTag = isCustomComponent(tag, rawProps); + + { + validatePropertiesInDevelopment(tag, rawProps); + + if (isCustomComponentTag && !didWarnShadyDOM && domElement.shadyRoot) { + warning$1( + false, + '%s is using shady DOM. Using shady DOM with React can ' + 'cause things to break subtly.', + getCurrentFiberOwnerNameInDevOrNull() || 'A component', + ); + didWarnShadyDOM = true; + } + } // TODO: Make sure that we check isMounted before firing any of these events. + + var props; + + switch (tag) { + case 'iframe': + case 'object': + case 'embed': + trapBubbledEvent(TOP_LOAD, domElement); + props = rawProps; + break; + + case 'video': + case 'audio': + // Create listener for each media event + for (var i = 0; i < mediaEventTypes.length; i++) { + trapBubbledEvent(mediaEventTypes[i], domElement); + } + + props = rawProps; + break; + + case 'source': + trapBubbledEvent(TOP_ERROR, domElement); + props = rawProps; + break; + + case 'img': + case 'image': + case 'link': + trapBubbledEvent(TOP_ERROR, domElement); + trapBubbledEvent(TOP_LOAD, domElement); + props = rawProps; + break; + + case 'form': + trapBubbledEvent(TOP_RESET, domElement); + trapBubbledEvent(TOP_SUBMIT, domElement); + props = rawProps; + break; + + case 'details': + trapBubbledEvent(TOP_TOGGLE, domElement); + props = rawProps; + break; + + case 'input': + initWrapperState(domElement, rawProps); + props = getHostProps(domElement, rawProps); + trapBubbledEvent(TOP_INVALID, domElement); // For controlled components we always need to ensure we're listening + // to onChange. Even if there is no listener. + + ensureListeningTo(rootContainerElement, 'onChange'); + break; + + case 'option': + validateProps(domElement, rawProps); + props = getHostProps$1(domElement, rawProps); + break; + + case 'select': + initWrapperState$1(domElement, rawProps); + props = getHostProps$2(domElement, rawProps); + trapBubbledEvent(TOP_INVALID, domElement); // For controlled components we always need to ensure we're listening + // to onChange. Even if there is no listener. + + ensureListeningTo(rootContainerElement, 'onChange'); + break; + + case 'textarea': + initWrapperState$2(domElement, rawProps); + props = getHostProps$3(domElement, rawProps); + trapBubbledEvent(TOP_INVALID, domElement); // For controlled components we always need to ensure we're listening + // to onChange. Even if there is no listener. + + ensureListeningTo(rootContainerElement, 'onChange'); + break; + + default: + props = rawProps; + } + + assertValidProps(tag, props); + setInitialDOMProperties(tag, domElement, rootContainerElement, props, isCustomComponentTag); + + switch (tag) { + case 'input': + // TODO: Make sure we check if this is still unmounted or do any clean + // up necessary since we never stop tracking anymore. + track(domElement); + postMountWrapper(domElement, rawProps, false); + break; + + case 'textarea': + // TODO: Make sure we check if this is still unmounted or do any clean + // up necessary since we never stop tracking anymore. + track(domElement); + postMountWrapper$3(domElement, rawProps); + break; + + case 'option': + postMountWrapper$1(domElement, rawProps); + break; + + case 'select': + postMountWrapper$2(domElement, rawProps); + break; + + default: + if (typeof props.onClick === 'function') { + // TODO: This cast may not be sound for SVG, MathML or custom elements. + trapClickOnNonInteractiveElement(domElement); + } + + break; + } + } // Calculate the diff between the two objects. + + function diffProperties(domElement, tag, lastRawProps, nextRawProps, rootContainerElement) { + { + validatePropertiesInDevelopment(tag, nextRawProps); + } + + var updatePayload = null; + var lastProps; + var nextProps; + + switch (tag) { + case 'input': + lastProps = getHostProps(domElement, lastRawProps); + nextProps = getHostProps(domElement, nextRawProps); + updatePayload = []; + break; + + case 'option': + lastProps = getHostProps$1(domElement, lastRawProps); + nextProps = getHostProps$1(domElement, nextRawProps); + updatePayload = []; + break; + + case 'select': + lastProps = getHostProps$2(domElement, lastRawProps); + nextProps = getHostProps$2(domElement, nextRawProps); + updatePayload = []; + break; + + case 'textarea': + lastProps = getHostProps$3(domElement, lastRawProps); + nextProps = getHostProps$3(domElement, nextRawProps); + updatePayload = []; + break; + + default: + lastProps = lastRawProps; + nextProps = nextRawProps; + + if (typeof lastProps.onClick !== 'function' && typeof nextProps.onClick === 'function') { + // TODO: This cast may not be sound for SVG, MathML or custom elements. + trapClickOnNonInteractiveElement(domElement); + } + + break; + } + + assertValidProps(tag, nextProps); + var propKey; + var styleName; + var styleUpdates = null; + + for (propKey in lastProps) { + if ( + nextProps.hasOwnProperty(propKey) || + !lastProps.hasOwnProperty(propKey) || + lastProps[propKey] == null + ) { + continue; + } + + if (propKey === STYLE$1) { + var lastStyle = lastProps[propKey]; + + for (styleName in lastStyle) { + if (lastStyle.hasOwnProperty(styleName)) { + if (!styleUpdates) { + styleUpdates = {}; + } + + styleUpdates[styleName] = ''; + } + } + } else if (propKey === DANGEROUSLY_SET_INNER_HTML || propKey === CHILDREN) { + // Noop. This is handled by the clear text mechanism. + } else if ( + (enableFlareAPI && propKey === LISTENERS) || + propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || + propKey === SUPPRESS_HYDRATION_WARNING$1 + ) { + // Noop + } else if (propKey === AUTOFOCUS) { + // Noop. It doesn't work on updates anyway. + } else if (registrationNameModules.hasOwnProperty(propKey)) { + // This is a special case. If any listener updates we need to ensure + // that the "current" fiber pointer gets updated so we need a commit + // to update this element. + if (!updatePayload) { + updatePayload = []; + } + } else { + // For all other deleted properties we add it to the queue. We use + // the whitelist in the commit phase instead. + (updatePayload = updatePayload || []).push(propKey, null); + } + } + + for (propKey in nextProps) { + var nextProp = nextProps[propKey]; + var lastProp = lastProps != null ? lastProps[propKey] : undefined; + + if ( + !nextProps.hasOwnProperty(propKey) || + nextProp === lastProp || + (nextProp == null && lastProp == null) + ) { + continue; + } + + if (propKey === STYLE$1) { + { + if (nextProp) { + // Freeze the next style object so that we can assume it won't be + // mutated. We have already warned for this in the past. + Object.freeze(nextProp); + } + } + + if (lastProp) { + // Unset styles on `lastProp` but not on `nextProp`. + for (styleName in lastProp) { + if ( + lastProp.hasOwnProperty(styleName) && + (!nextProp || !nextProp.hasOwnProperty(styleName)) + ) { + if (!styleUpdates) { + styleUpdates = {}; + } + + styleUpdates[styleName] = ''; + } + } // Update styles that changed since `lastProp`. + + for (styleName in nextProp) { + if (nextProp.hasOwnProperty(styleName) && lastProp[styleName] !== nextProp[styleName]) { + if (!styleUpdates) { + styleUpdates = {}; + } + + styleUpdates[styleName] = nextProp[styleName]; + } + } + } else { + // Relies on `updateStylesByID` not mutating `styleUpdates`. + if (!styleUpdates) { + if (!updatePayload) { + updatePayload = []; + } + + updatePayload.push(propKey, styleUpdates); + } + + styleUpdates = nextProp; + } + } else if (propKey === DANGEROUSLY_SET_INNER_HTML) { + var nextHtml = nextProp ? nextProp[HTML] : undefined; + var lastHtml = lastProp ? lastProp[HTML] : undefined; + + if (nextHtml != null) { + if (lastHtml !== nextHtml) { + (updatePayload = updatePayload || []).push(propKey, toStringOrTrustedType(nextHtml)); + } + } else { + // TODO: It might be too late to clear this if we have children + // inserted already. + } + } else if (propKey === CHILDREN) { + if (lastProp !== nextProp && (typeof nextProp === 'string' || typeof nextProp === 'number')) { + (updatePayload = updatePayload || []).push(propKey, '' + nextProp); + } + } else if ( + (enableFlareAPI && propKey === LISTENERS) || + propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || + propKey === SUPPRESS_HYDRATION_WARNING$1 + ) { + // Noop + } else if (registrationNameModules.hasOwnProperty(propKey)) { + if (nextProp != null) { + // We eagerly listen to this even though we haven't committed yet. + if (true && typeof nextProp !== 'function') { + warnForInvalidEventListener(propKey, nextProp); + } + + ensureListeningTo(rootContainerElement, propKey); + } + + if (!updatePayload && lastProp !== nextProp) { + // This is a special case. If any listener updates we need to ensure + // that the "current" props pointer gets updated so we need a commit + // to update this element. + updatePayload = []; + } + } else { + // For any other property we always add it to the queue and then we + // filter it out using the whitelist during the commit. + (updatePayload = updatePayload || []).push(propKey, nextProp); + } + } + + if (styleUpdates) { + { + validateShorthandPropertyCollisionInDev(styleUpdates, nextProps[STYLE$1]); + } + + (updatePayload = updatePayload || []).push(STYLE$1, styleUpdates); + } + + return updatePayload; + } // Apply the diff. + + function updateProperties(domElement, updatePayload, tag, lastRawProps, nextRawProps) { + // Update checked *before* name. + // In the middle of an update, it is possible to have multiple checked. + // When a checked radio tries to change name, browser makes another radio's checked false. + if (tag === 'input' && nextRawProps.type === 'radio' && nextRawProps.name != null) { + updateChecked(domElement, nextRawProps); + } + + var wasCustomComponentTag = isCustomComponent(tag, lastRawProps); + var isCustomComponentTag = isCustomComponent(tag, nextRawProps); // Apply the diff. + + updateDOMProperties(domElement, updatePayload, wasCustomComponentTag, isCustomComponentTag); // TODO: Ensure that an update gets scheduled if any of the special props + // changed. + + switch (tag) { + case 'input': + // Update the wrapper around inputs *after* updating props. This has to + // happen after `updateDOMProperties`. Otherwise HTML5 input validations + // raise warnings and prevent the new value from being assigned. + updateWrapper(domElement, nextRawProps); + break; + + case 'textarea': + updateWrapper$1(domElement, nextRawProps); + break; + + case 'select': + // <select> value update needs to occur after <option> children + // reconciliation + postUpdateWrapper(domElement, nextRawProps); + break; + } + } + + function getPossibleStandardName(propName) { + { + var lowerCasedName = propName.toLowerCase(); + + if (!possibleStandardNames.hasOwnProperty(lowerCasedName)) { + return null; + } + + return possibleStandardNames[lowerCasedName] || null; + } + + return null; + } + + function diffHydratedProperties(domElement, tag, rawProps, parentNamespace, rootContainerElement) { + var isCustomComponentTag; + var extraAttributeNames; + + { + suppressHydrationWarning = rawProps[SUPPRESS_HYDRATION_WARNING$1] === true; + isCustomComponentTag = isCustomComponent(tag, rawProps); + validatePropertiesInDevelopment(tag, rawProps); + + if (isCustomComponentTag && !didWarnShadyDOM && domElement.shadyRoot) { + warning$1( + false, + '%s is using shady DOM. Using shady DOM with React can ' + 'cause things to break subtly.', + getCurrentFiberOwnerNameInDevOrNull() || 'A component', + ); + didWarnShadyDOM = true; + } + } // TODO: Make sure that we check isMounted before firing any of these events. + + switch (tag) { + case 'iframe': + case 'object': + case 'embed': + trapBubbledEvent(TOP_LOAD, domElement); + break; + + case 'video': + case 'audio': + // Create listener for each media event + for (var i = 0; i < mediaEventTypes.length; i++) { + trapBubbledEvent(mediaEventTypes[i], domElement); + } + + break; + + case 'source': + trapBubbledEvent(TOP_ERROR, domElement); + break; + + case 'img': + case 'image': + case 'link': + trapBubbledEvent(TOP_ERROR, domElement); + trapBubbledEvent(TOP_LOAD, domElement); + break; + + case 'form': + trapBubbledEvent(TOP_RESET, domElement); + trapBubbledEvent(TOP_SUBMIT, domElement); + break; + + case 'details': + trapBubbledEvent(TOP_TOGGLE, domElement); + break; + + case 'input': + initWrapperState(domElement, rawProps); + trapBubbledEvent(TOP_INVALID, domElement); // For controlled components we always need to ensure we're listening + // to onChange. Even if there is no listener. + + ensureListeningTo(rootContainerElement, 'onChange'); + break; + + case 'option': + validateProps(domElement, rawProps); + break; + + case 'select': + initWrapperState$1(domElement, rawProps); + trapBubbledEvent(TOP_INVALID, domElement); // For controlled components we always need to ensure we're listening + // to onChange. Even if there is no listener. + + ensureListeningTo(rootContainerElement, 'onChange'); + break; + + case 'textarea': + initWrapperState$2(domElement, rawProps); + trapBubbledEvent(TOP_INVALID, domElement); // For controlled components we always need to ensure we're listening + // to onChange. Even if there is no listener. + + ensureListeningTo(rootContainerElement, 'onChange'); + break; + } + + assertValidProps(tag, rawProps); + + { + extraAttributeNames = new Set(); + var attributes = domElement.attributes; + + for (var _i = 0; _i < attributes.length; _i++) { + var name = attributes[_i].name.toLowerCase(); + + switch (name) { + // Built-in SSR attribute is whitelisted + case 'data-reactroot': + break; + // Controlled attributes are not validated + // TODO: Only ignore them on controlled tags. + + case 'value': + break; + + case 'checked': + break; + + case 'selected': + break; + + default: + // Intentionally use the original name. + // See discussion in https://github.com/facebook/react/pull/10676. + extraAttributeNames.add(attributes[_i].name); + } + } + } + + var updatePayload = null; + + for (var propKey in rawProps) { + if (!rawProps.hasOwnProperty(propKey)) { + continue; + } + + var nextProp = rawProps[propKey]; + + if (propKey === CHILDREN) { + // For text content children we compare against textContent. This + // might match additional HTML that is hidden when we read it using + // textContent. E.g. "foo" will match "f<span>oo</span>" but that still + // satisfies our requirement. Our requirement is not to produce perfect + // HTML and attributes. Ideally we should preserve structure but it's + // ok not to if the visible content is still enough to indicate what + // even listeners these nodes might be wired up to. + // TODO: Warn if there is more than a single textNode as a child. + // TODO: Should we use domElement.firstChild.nodeValue to compare? + if (typeof nextProp === 'string') { + if (domElement.textContent !== nextProp) { + if (true && !suppressHydrationWarning) { + warnForTextDifference(domElement.textContent, nextProp); + } + + updatePayload = [CHILDREN, nextProp]; + } + } else if (typeof nextProp === 'number') { + if (domElement.textContent !== '' + nextProp) { + if (true && !suppressHydrationWarning) { + warnForTextDifference(domElement.textContent, nextProp); + } + + updatePayload = [CHILDREN, '' + nextProp]; + } + } + } else if (registrationNameModules.hasOwnProperty(propKey)) { + if (nextProp != null) { + if (true && typeof nextProp !== 'function') { + warnForInvalidEventListener(propKey, nextProp); + } + + ensureListeningTo(rootContainerElement, propKey); + } + } else if ( + true && // Convince Flow we've calculated it (it's DEV-only in this method.) + typeof isCustomComponentTag === 'boolean' + ) { + // Validate that the properties correspond to their expected values. + var serverValue = void 0; + var propertyInfo = getPropertyInfo(propKey); + + if (suppressHydrationWarning) { + // Don't bother comparing. We're ignoring all these warnings. + } else if ( + (enableFlareAPI && propKey === LISTENERS) || + propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || + propKey === SUPPRESS_HYDRATION_WARNING$1 || // Controlled attributes are not validated + // TODO: Only ignore them on controlled tags. + propKey === 'value' || + propKey === 'checked' || + propKey === 'selected' + ) { + // Noop + } else if (propKey === DANGEROUSLY_SET_INNER_HTML) { + var serverHTML = domElement.innerHTML; + var nextHtml = nextProp ? nextProp[HTML] : undefined; + var expectedHTML = normalizeHTML(domElement, nextHtml != null ? nextHtml : ''); + + if (expectedHTML !== serverHTML) { + warnForPropDifference(propKey, serverHTML, expectedHTML); + } + } else if (propKey === STYLE$1) { + // $FlowFixMe - Should be inferred as not undefined. + extraAttributeNames.delete(propKey); + + if (canDiffStyleForHydrationWarning) { + var expectedStyle = createDangerousStringForStyles(nextProp); + serverValue = domElement.getAttribute('style'); + + if (expectedStyle !== serverValue) { + warnForPropDifference(propKey, serverValue, expectedStyle); + } + } + } else if (isCustomComponentTag) { + // $FlowFixMe - Should be inferred as not undefined. + extraAttributeNames.delete(propKey.toLowerCase()); + serverValue = getValueForAttribute(domElement, propKey, nextProp); + + if (nextProp !== serverValue) { + warnForPropDifference(propKey, serverValue, nextProp); + } + } else if ( + !shouldIgnoreAttribute(propKey, propertyInfo, isCustomComponentTag) && + !shouldRemoveAttribute(propKey, nextProp, propertyInfo, isCustomComponentTag) + ) { + var isMismatchDueToBadCasing = false; + + if (propertyInfo !== null) { + // $FlowFixMe - Should be inferred as not undefined. + extraAttributeNames.delete(propertyInfo.attributeName); + serverValue = getValueForProperty(domElement, propKey, nextProp, propertyInfo); + } else { + var ownNamespace = parentNamespace; + + if (ownNamespace === HTML_NAMESPACE) { + ownNamespace = getIntrinsicNamespace(tag); + } + + if (ownNamespace === HTML_NAMESPACE) { + // $FlowFixMe - Should be inferred as not undefined. + extraAttributeNames.delete(propKey.toLowerCase()); + } else { + var standardName = getPossibleStandardName(propKey); + + if (standardName !== null && standardName !== propKey) { + // If an SVG prop is supplied with bad casing, it will + // be successfully parsed from HTML, but will produce a mismatch + // (and would be incorrectly rendered on the client). + // However, we already warn about bad casing elsewhere. + // So we'll skip the misleading extra mismatch warning in this case. + isMismatchDueToBadCasing = true; // $FlowFixMe - Should be inferred as not undefined. + + extraAttributeNames.delete(standardName); + } // $FlowFixMe - Should be inferred as not undefined. + + extraAttributeNames.delete(propKey); + } + + serverValue = getValueForAttribute(domElement, propKey, nextProp); + } + + if (nextProp !== serverValue && !isMismatchDueToBadCasing) { + warnForPropDifference(propKey, serverValue, nextProp); + } + } + } + } + + { + // $FlowFixMe - Should be inferred as not undefined. + if (extraAttributeNames.size > 0 && !suppressHydrationWarning) { + // $FlowFixMe - Should be inferred as not undefined. + warnForExtraAttributes(extraAttributeNames); + } + } + + switch (tag) { + case 'input': + // TODO: Make sure we check if this is still unmounted or do any clean + // up necessary since we never stop tracking anymore. + track(domElement); + postMountWrapper(domElement, rawProps, true); + break; + + case 'textarea': + // TODO: Make sure we check if this is still unmounted or do any clean + // up necessary since we never stop tracking anymore. + track(domElement); + postMountWrapper$3(domElement, rawProps); + break; + + case 'select': + case 'option': + // For input and textarea we current always set the value property at + // post mount to force it to diverge from attributes. However, for + // option and select we don't quite do the same thing and select + // is not resilient to the DOM state changing so we don't do that here. + // TODO: Consider not doing this for input and textarea. + break; + + default: + if (typeof rawProps.onClick === 'function') { + // TODO: This cast may not be sound for SVG, MathML or custom elements. + trapClickOnNonInteractiveElement(domElement); + } + + break; + } + + return updatePayload; + } + function diffHydratedText(textNode, text) { + var isDifferent = textNode.nodeValue !== text; + return isDifferent; + } + function warnForUnmatchedText(textNode, text) { + { + warnForTextDifference(textNode.nodeValue, text); + } + } + function warnForDeletedHydratableElement(parentNode, child) { + { + if (didWarnInvalidHydration) { + return; + } + + didWarnInvalidHydration = true; + warningWithoutStack$1( + false, + 'Did not expect server HTML to contain a <%s> in <%s>.', + child.nodeName.toLowerCase(), + parentNode.nodeName.toLowerCase(), + ); + } + } + function warnForDeletedHydratableText(parentNode, child) { + { + if (didWarnInvalidHydration) { + return; + } + + didWarnInvalidHydration = true; + warningWithoutStack$1( + false, + 'Did not expect server HTML to contain the text node "%s" in <%s>.', + child.nodeValue, + parentNode.nodeName.toLowerCase(), + ); + } + } + function warnForInsertedHydratedElement(parentNode, tag, props) { + { + if (didWarnInvalidHydration) { + return; + } + + didWarnInvalidHydration = true; + warningWithoutStack$1( + false, + 'Expected server HTML to contain a matching <%s> in <%s>.', + tag, + parentNode.nodeName.toLowerCase(), + ); + } + } + function warnForInsertedHydratedText(parentNode, text) { + { + if (text === '') { + // We expect to insert empty text nodes since they're not represented in + // the HTML. + // TODO: Remove this special case if we can just avoid inserting empty + // text nodes. + return; + } + + if (didWarnInvalidHydration) { + return; + } + + didWarnInvalidHydration = true; + warningWithoutStack$1( + false, + 'Expected server HTML to contain a matching text node for "%s" in <%s>.', + text, + parentNode.nodeName.toLowerCase(), + ); + } + } + function restoreControlledState$$1(domElement, tag, props) { + switch (tag) { + case 'input': + restoreControlledState$1(domElement, props); + return; + + case 'textarea': + restoreControlledState$3(domElement, props); + return; + + case 'select': + restoreControlledState$2(domElement, props); + return; + } + } + function listenToEventResponderEventTypes(eventTypes, element) { + if (enableFlareAPI) { + // Get the listening Set for this element. We use this to track + // what events we're listening to. + var listeningSet = getListeningSetForElement(element); // Go through each target event type of the event responder + + for (var i = 0, length = eventTypes.length; i < length; ++i) { + var eventType = eventTypes[i]; + var isPassive = !endsWith(eventType, '_active'); + var eventKey = isPassive ? eventType + '_passive' : eventType; + var targetEventType = isPassive ? eventType : eventType.substring(0, eventType.length - 7); + + if (!listeningSet.has(eventKey)) { + trapEventForResponderEventSystem(element, targetEventType, isPassive); + listeningSet.add(eventKey); + } + } + } + } // We can remove this once the event API is stable and out of a flag + + if (enableFlareAPI) { + setListenToResponderEventTypes(listenToEventResponderEventTypes); + } + + function getActiveElement(doc) { + doc = doc || (typeof document !== 'undefined' ? document : undefined); + + if (typeof doc === 'undefined') { + return null; + } + + try { + return doc.activeElement || doc.body; + } catch (e) { + return doc.body; + } + } + + /** + * Given any node return the first leaf node without children. + * + * @param {DOMElement|DOMTextNode} node + * @return {DOMElement|DOMTextNode} + */ + + function getLeafNode(node) { + while (node && node.firstChild) { + node = node.firstChild; + } + + return node; + } + /** + * Get the next sibling within a container. This will walk up the + * DOM if a node's siblings have been exhausted. + * + * @param {DOMElement|DOMTextNode} node + * @return {?DOMElement|DOMTextNode} + */ + + function getSiblingNode(node) { + while (node) { + if (node.nextSibling) { + return node.nextSibling; + } + + node = node.parentNode; + } + } + /** + * Get object describing the nodes which contain characters at offset. + * + * @param {DOMElement|DOMTextNode} root + * @param {number} offset + * @return {?object} + */ + + function getNodeForCharacterOffset(root, offset) { + var node = getLeafNode(root); + var nodeStart = 0; + var nodeEnd = 0; + + while (node) { + if (node.nodeType === TEXT_NODE) { + nodeEnd = nodeStart + node.textContent.length; + + if (nodeStart <= offset && nodeEnd >= offset) { + return { + node: node, + offset: offset - nodeStart, + }; + } + + nodeStart = nodeEnd; + } + + node = getLeafNode(getSiblingNode(node)); + } + } + + /** + * @param {DOMElement} outerNode + * @return {?object} + */ + + function getOffsets(outerNode) { + var ownerDocument = outerNode.ownerDocument; + var win = (ownerDocument && ownerDocument.defaultView) || window; + var selection = win.getSelection && win.getSelection(); + + if (!selection || selection.rangeCount === 0) { + return null; + } + + var anchorNode = selection.anchorNode, + anchorOffset = selection.anchorOffset, + focusNode = selection.focusNode, + focusOffset = selection.focusOffset; // In Firefox, anchorNode and focusNode can be "anonymous divs", e.g. the + // up/down buttons on an <input type="number">. Anonymous divs do not seem to + // expose properties, triggering a "Permission denied error" if any of its + // properties are accessed. The only seemingly possible way to avoid erroring + // is to access a property that typically works for non-anonymous divs and + // catch any error that may otherwise arise. See + // https://bugzilla.mozilla.org/show_bug.cgi?id=208427 + + try { + /* eslint-disable no-unused-expressions */ + anchorNode.nodeType; + focusNode.nodeType; + /* eslint-enable no-unused-expressions */ + } catch (e) { + return null; + } + + return getModernOffsetsFromPoints(outerNode, anchorNode, anchorOffset, focusNode, focusOffset); + } + /** + * Returns {start, end} where `start` is the character/codepoint index of + * (anchorNode, anchorOffset) within the textContent of `outerNode`, and + * `end` is the index of (focusNode, focusOffset). + * + * Returns null if you pass in garbage input but we should probably just crash. + * + * Exported only for testing. + */ + + function getModernOffsetsFromPoints(outerNode, anchorNode, anchorOffset, focusNode, focusOffset) { + var length = 0; + var start = -1; + var end = -1; + var indexWithinAnchor = 0; + var indexWithinFocus = 0; + var node = outerNode; + var parentNode = null; + + outer: while (true) { + var next = null; + + while (true) { + if (node === anchorNode && (anchorOffset === 0 || node.nodeType === TEXT_NODE)) { + start = length + anchorOffset; + } + + if (node === focusNode && (focusOffset === 0 || node.nodeType === TEXT_NODE)) { + end = length + focusOffset; + } + + if (node.nodeType === TEXT_NODE) { + length += node.nodeValue.length; + } + + if ((next = node.firstChild) === null) { + break; + } // Moving from `node` to its first child `next`. + + parentNode = node; + node = next; + } + + while (true) { + if (node === outerNode) { + // If `outerNode` has children, this is always the second time visiting + // it. If it has no children, this is still the first loop, and the only + // valid selection is anchorNode and focusNode both equal to this node + // and both offsets 0, in which case we will have handled above. + break outer; + } + + if (parentNode === anchorNode && ++indexWithinAnchor === anchorOffset) { + start = length; + } + + if (parentNode === focusNode && ++indexWithinFocus === focusOffset) { + end = length; + } + + if ((next = node.nextSibling) !== null) { + break; + } + + node = parentNode; + parentNode = node.parentNode; + } // Moving from `node` to its next sibling `next`. + + node = next; + } + + if (start === -1 || end === -1) { + // This should never happen. (Would happen if the anchor/focus nodes aren't + // actually inside the passed-in node.) + return null; + } + + return { + start: start, + end: end, + }; + } + /** + * In modern non-IE browsers, we can support both forward and backward + * selections. + * + * Note: IE10+ supports the Selection object, but it does not support + * the `extend` method, which means that even in modern IE, it's not possible + * to programmatically create a backward selection. Thus, for all IE + * versions, we use the old IE API to create our selections. + * + * @param {DOMElement|DOMTextNode} node + * @param {object} offsets + */ + + function setOffsets(node, offsets) { + var doc = node.ownerDocument || document; + var win = (doc && doc.defaultView) || window; // Edge fails with "Object expected" in some scenarios. + // (For instance: TinyMCE editor used in a list component that supports pasting to add more, + // fails when pasting 100+ items) + + if (!win.getSelection) { + return; + } + + var selection = win.getSelection(); + var length = node.textContent.length; + var start = Math.min(offsets.start, length); + var end = offsets.end === undefined ? start : Math.min(offsets.end, length); // IE 11 uses modern selection, but doesn't support the extend method. + // Flip backward selections, so we can set with a single range. + + if (!selection.extend && start > end) { + var temp = end; + end = start; + start = temp; + } + + var startMarker = getNodeForCharacterOffset(node, start); + var endMarker = getNodeForCharacterOffset(node, end); + + if (startMarker && endMarker) { + if ( + selection.rangeCount === 1 && + selection.anchorNode === startMarker.node && + selection.anchorOffset === startMarker.offset && + selection.focusNode === endMarker.node && + selection.focusOffset === endMarker.offset + ) { + return; + } + + var range = doc.createRange(); + range.setStart(startMarker.node, startMarker.offset); + selection.removeAllRanges(); + + if (start > end) { + selection.addRange(range); + selection.extend(endMarker.node, endMarker.offset); + } else { + range.setEnd(endMarker.node, endMarker.offset); + selection.addRange(range); + } + } + } + + function isTextNode(node) { + return node && node.nodeType === TEXT_NODE; + } + + function containsNode(outerNode, innerNode) { + if (!outerNode || !innerNode) { + return false; + } else if (outerNode === innerNode) { + return true; + } else if (isTextNode(outerNode)) { + return false; + } else if (isTextNode(innerNode)) { + return containsNode(outerNode, innerNode.parentNode); + } else if ('contains' in outerNode) { + return outerNode.contains(innerNode); + } else if (outerNode.compareDocumentPosition) { + return !!(outerNode.compareDocumentPosition(innerNode) & 16); + } else { + return false; + } + } + + function isInDocument(node) { + return node && node.ownerDocument && containsNode(node.ownerDocument.documentElement, node); + } + + function isSameOriginFrame(iframe) { + try { + // Accessing the contentDocument of a HTMLIframeElement can cause the browser + // to throw, e.g. if it has a cross-origin src attribute. + // Safari will show an error in the console when the access results in "Blocked a frame with origin". e.g: + // iframe.contentDocument.defaultView; + // A safety way is to access one of the cross origin properties: Window or Location + // Which might result in "SecurityError" DOM Exception and it is compatible to Safari. + // https://html.spec.whatwg.org/multipage/browsers.html#integration-with-idl + return typeof iframe.contentWindow.location.href === 'string'; + } catch (err) { + return false; + } + } + + function getActiveElementDeep() { + var win = window; + var element = getActiveElement(); + + while (element instanceof win.HTMLIFrameElement) { + if (isSameOriginFrame(element)) { + win = element.contentWindow; + } else { + return element; + } + + element = getActiveElement(win.document); + } + + return element; + } + /** + * @ReactInputSelection: React input selection module. Based on Selection.js, + * but modified to be suitable for react and has a couple of bug fixes (doesn't + * assume buttons have range selections allowed). + * Input selection module for React. + */ + + /** + * @hasSelectionCapabilities: we get the element types that support selection + * from https://html.spec.whatwg.org/#do-not-apply, looking at `selectionStart` + * and `selectionEnd` rows. + */ + + function hasSelectionCapabilities(elem) { + var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase(); + return ( + nodeName && + ((nodeName === 'input' && + (elem.type === 'text' || + elem.type === 'search' || + elem.type === 'tel' || + elem.type === 'url' || + elem.type === 'password')) || + nodeName === 'textarea' || + elem.contentEditable === 'true') + ); + } + function getSelectionInformation() { + var focusedElem = getActiveElementDeep(); + return { + focusedElem: focusedElem, + selectionRange: hasSelectionCapabilities(focusedElem) ? getSelection(focusedElem) : null, + }; + } + /** + * @restoreSelection: If any selection information was potentially lost, + * restore it. This is useful when performing operations that could remove dom + * nodes and place them back in, resulting in focus being lost. + */ + + function restoreSelection(priorSelectionInformation) { + var curFocusedElem = getActiveElementDeep(); + var priorFocusedElem = priorSelectionInformation.focusedElem; + var priorSelectionRange = priorSelectionInformation.selectionRange; + + if (curFocusedElem !== priorFocusedElem && isInDocument(priorFocusedElem)) { + if (priorSelectionRange !== null && hasSelectionCapabilities(priorFocusedElem)) { + setSelection(priorFocusedElem, priorSelectionRange); + } // Focusing a node can change the scroll position, which is undesirable + + var ancestors = []; + var ancestor = priorFocusedElem; + + while ((ancestor = ancestor.parentNode)) { + if (ancestor.nodeType === ELEMENT_NODE) { + ancestors.push({ + element: ancestor, + left: ancestor.scrollLeft, + top: ancestor.scrollTop, + }); + } + } + + if (typeof priorFocusedElem.focus === 'function') { + priorFocusedElem.focus(); + } + + for (var i = 0; i < ancestors.length; i++) { + var info = ancestors[i]; + info.element.scrollLeft = info.left; + info.element.scrollTop = info.top; + } + } + } + /** + * @getSelection: Gets the selection bounds of a focused textarea, input or + * contentEditable node. + * -@input: Look up selection bounds of this input + * -@return {start: selectionStart, end: selectionEnd} + */ + + function getSelection(input) { + var selection; + + if ('selectionStart' in input) { + // Modern browser with input or textarea. + selection = { + start: input.selectionStart, + end: input.selectionEnd, + }; + } else { + // Content editable or old IE textarea. + selection = getOffsets(input); + } + + return ( + selection || { + start: 0, + end: 0, + } + ); + } + /** + * @setSelection: Sets the selection bounds of a textarea or input and focuses + * the input. + * -@input Set selection bounds of this input or textarea + * -@offsets Object of same form that is returned from get* + */ + + function setSelection(input, offsets) { + var start = offsets.start, + end = offsets.end; + + if (end === undefined) { + end = start; + } + + if ('selectionStart' in input) { + input.selectionStart = start; + input.selectionEnd = Math.min(end, input.value.length); + } else { + setOffsets(input, offsets); + } + } + + var validateDOMNesting = function () {}; + + var updatedAncestorInfo = function () {}; + + { + // This validation code was written based on the HTML5 parsing spec: + // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope + // + // Note: this does not catch all invalid nesting, nor does it try to (as it's + // not clear what practical benefit doing so provides); instead, we warn only + // for cases where the parser will give a parse tree differing from what React + // intended. For example, <b><div></div></b> is invalid but we don't warn + // because it still parses correctly; we do warn for other cases like nested + // <p> tags where the beginning of the second element implicitly closes the + // first, causing a confusing mess. + // https://html.spec.whatwg.org/multipage/syntax.html#special + var specialTags = [ + 'address', + 'applet', + 'area', + 'article', + 'aside', + 'base', + 'basefont', + 'bgsound', + 'blockquote', + 'body', + 'br', + 'button', + 'caption', + 'center', + 'col', + 'colgroup', + 'dd', + 'details', + 'dir', + 'div', + 'dl', + 'dt', + 'embed', + 'fieldset', + 'figcaption', + 'figure', + 'footer', + 'form', + 'frame', + 'frameset', + 'h1', + 'h2', + 'h3', + 'h4', + 'h5', + 'h6', + 'head', + 'header', + 'hgroup', + 'hr', + 'html', + 'iframe', + 'img', + 'input', + 'isindex', + 'li', + 'link', + 'listing', + 'main', + 'marquee', + 'menu', + 'menuitem', + 'meta', + 'nav', + 'noembed', + 'noframes', + 'noscript', + 'object', + 'ol', + 'p', + 'param', + 'plaintext', + 'pre', + 'script', + 'section', + 'select', + 'source', + 'style', + 'summary', + 'table', + 'tbody', + 'td', + 'template', + 'textarea', + 'tfoot', + 'th', + 'thead', + 'title', + 'tr', + 'track', + 'ul', + 'wbr', + 'xmp', + ]; // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope + + var inScopeTags = [ + 'applet', + 'caption', + 'html', + 'table', + 'td', + 'th', + 'marquee', + 'object', + 'template', // https://html.spec.whatwg.org/multipage/syntax.html#html-integration-point + // TODO: Distinguish by namespace here -- for <title>, including it here + // errs on the side of fewer warnings + 'foreignObject', + 'desc', + 'title', + ]; // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-button-scope + + var buttonScopeTags = inScopeTags.concat(['button']); // https://html.spec.whatwg.org/multipage/syntax.html#generate-implied-end-tags + + var impliedEndTags = ['dd', 'dt', 'li', 'option', 'optgroup', 'p', 'rp', 'rt']; + var emptyAncestorInfo = { + current: null, + formTag: null, + aTagInScope: null, + buttonTagInScope: null, + nobrTagInScope: null, + pTagInButtonScope: null, + listItemTagAutoclosing: null, + dlItemTagAutoclosing: null, + }; + + updatedAncestorInfo = function (oldInfo, tag) { + var ancestorInfo = _assign({}, oldInfo || emptyAncestorInfo); + + var info = { + tag: tag, + }; + + if (inScopeTags.indexOf(tag) !== -1) { + ancestorInfo.aTagInScope = null; + ancestorInfo.buttonTagInScope = null; + ancestorInfo.nobrTagInScope = null; + } + + if (buttonScopeTags.indexOf(tag) !== -1) { + ancestorInfo.pTagInButtonScope = null; + } // See rules for 'li', 'dd', 'dt' start tags in + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody + + if (specialTags.indexOf(tag) !== -1 && tag !== 'address' && tag !== 'div' && tag !== 'p') { + ancestorInfo.listItemTagAutoclosing = null; + ancestorInfo.dlItemTagAutoclosing = null; + } + + ancestorInfo.current = info; + + if (tag === 'form') { + ancestorInfo.formTag = info; + } + + if (tag === 'a') { + ancestorInfo.aTagInScope = info; + } + + if (tag === 'button') { + ancestorInfo.buttonTagInScope = info; + } + + if (tag === 'nobr') { + ancestorInfo.nobrTagInScope = info; + } + + if (tag === 'p') { + ancestorInfo.pTagInButtonScope = info; + } + + if (tag === 'li') { + ancestorInfo.listItemTagAutoclosing = info; + } + + if (tag === 'dd' || tag === 'dt') { + ancestorInfo.dlItemTagAutoclosing = info; + } + + return ancestorInfo; + }; + /** + * Returns whether + */ + + var isTagValidWithParent = function (tag, parentTag) { + // First, let's check if we're in an unusual parsing mode... + switch (parentTag) { + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inselect + case 'select': + return tag === 'option' || tag === 'optgroup' || tag === '#text'; + + case 'optgroup': + return tag === 'option' || tag === '#text'; + // Strictly speaking, seeing an <option> doesn't mean we're in a <select> + // but + + case 'option': + return tag === '#text'; + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intd + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incaption + // No special behavior since these rules fall back to "in body" mode for + // all except special table nodes which cause bad parsing behavior anyway. + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intr + + case 'tr': + return ( + tag === 'th' || tag === 'td' || tag === 'style' || tag === 'script' || tag === 'template' + ); + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intbody + + case 'tbody': + case 'thead': + case 'tfoot': + return tag === 'tr' || tag === 'style' || tag === 'script' || tag === 'template'; + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incolgroup + + case 'colgroup': + return tag === 'col' || tag === 'template'; + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intable + + case 'table': + return ( + tag === 'caption' || + tag === 'colgroup' || + tag === 'tbody' || + tag === 'tfoot' || + tag === 'thead' || + tag === 'style' || + tag === 'script' || + tag === 'template' + ); + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inhead + + case 'head': + return ( + tag === 'base' || + tag === 'basefont' || + tag === 'bgsound' || + tag === 'link' || + tag === 'meta' || + tag === 'title' || + tag === 'noscript' || + tag === 'noframes' || + tag === 'style' || + tag === 'script' || + tag === 'template' + ); + // https://html.spec.whatwg.org/multipage/semantics.html#the-html-element + + case 'html': + return tag === 'head' || tag === 'body' || tag === 'frameset'; + + case 'frameset': + return tag === 'frame'; + + case '#document': + return tag === 'html'; + } // Probably in the "in body" parsing mode, so we outlaw only tag combos + // where the parsing rules cause implicit opens or closes to be added. + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody + + switch (tag) { + case 'h1': + case 'h2': + case 'h3': + case 'h4': + case 'h5': + case 'h6': + return ( + parentTag !== 'h1' && + parentTag !== 'h2' && + parentTag !== 'h3' && + parentTag !== 'h4' && + parentTag !== 'h5' && + parentTag !== 'h6' + ); + + case 'rp': + case 'rt': + return impliedEndTags.indexOf(parentTag) === -1; + + case 'body': + case 'caption': + case 'col': + case 'colgroup': + case 'frameset': + case 'frame': + case 'head': + case 'html': + case 'tbody': + case 'td': + case 'tfoot': + case 'th': + case 'thead': + case 'tr': + // These tags are only valid with a few parents that have special child + // parsing rules -- if we're down here, then none of those matched and + // so we allow it only if we don't know what the parent is, as all other + // cases are invalid. + return parentTag == null; + } + + return true; + }; + /** + * Returns whether + */ + + var findInvalidAncestorForTag = function (tag, ancestorInfo) { + switch (tag) { + case 'address': + case 'article': + case 'aside': + case 'blockquote': + case 'center': + case 'details': + case 'dialog': + case 'dir': + case 'div': + case 'dl': + case 'fieldset': + case 'figcaption': + case 'figure': + case 'footer': + case 'header': + case 'hgroup': + case 'main': + case 'menu': + case 'nav': + case 'ol': + case 'p': + case 'section': + case 'summary': + case 'ul': + case 'pre': + case 'listing': + case 'table': + case 'hr': + case 'xmp': + case 'h1': + case 'h2': + case 'h3': + case 'h4': + case 'h5': + case 'h6': + return ancestorInfo.pTagInButtonScope; + + case 'form': + return ancestorInfo.formTag || ancestorInfo.pTagInButtonScope; + + case 'li': + return ancestorInfo.listItemTagAutoclosing; + + case 'dd': + case 'dt': + return ancestorInfo.dlItemTagAutoclosing; + + case 'button': + return ancestorInfo.buttonTagInScope; + + case 'a': + // Spec says something about storing a list of markers, but it sounds + // equivalent to this check. + return ancestorInfo.aTagInScope; + + case 'nobr': + return ancestorInfo.nobrTagInScope; + } + + return null; + }; + + var didWarn$1 = {}; + + validateDOMNesting = function (childTag, childText, ancestorInfo) { + ancestorInfo = ancestorInfo || emptyAncestorInfo; + var parentInfo = ancestorInfo.current; + var parentTag = parentInfo && parentInfo.tag; + + if (childText != null) { + !(childTag == null) + ? warningWithoutStack$1( + false, + 'validateDOMNesting: when childText is passed, childTag should be null', + ) + : void 0; + childTag = '#text'; + } + + var invalidParent = isTagValidWithParent(childTag, parentTag) ? null : parentInfo; + var invalidAncestor = invalidParent ? null : findInvalidAncestorForTag(childTag, ancestorInfo); + var invalidParentOrAncestor = invalidParent || invalidAncestor; + + if (!invalidParentOrAncestor) { + return; + } + + var ancestorTag = invalidParentOrAncestor.tag; + var addendum = getCurrentFiberStackInDev(); + var warnKey = !!invalidParent + '|' + childTag + '|' + ancestorTag + '|' + addendum; + + if (didWarn$1[warnKey]) { + return; + } + + didWarn$1[warnKey] = true; + var tagDisplayName = childTag; + var whitespaceInfo = ''; + + if (childTag === '#text') { + if (/\S/.test(childText)) { + tagDisplayName = 'Text nodes'; + } else { + tagDisplayName = 'Whitespace text nodes'; + whitespaceInfo = + " Make sure you don't have any extra whitespace between tags on " + + 'each line of your source code.'; + } + } else { + tagDisplayName = '<' + childTag + '>'; + } + + if (invalidParent) { + var info = ''; + + if (ancestorTag === 'table' && childTag === 'tr') { + info += + ' Add a <tbody>, <thead> or <tfoot> to your code to match the DOM tree generated by ' + + 'the browser.'; + } + + warningWithoutStack$1( + false, + 'validateDOMNesting(...): %s cannot appear as a child of <%s>.%s%s%s', + tagDisplayName, + ancestorTag, + whitespaceInfo, + info, + addendum, + ); + } else { + warningWithoutStack$1( + false, + 'validateDOMNesting(...): %s cannot appear as a descendant of ' + '<%s>.%s', + tagDisplayName, + ancestorTag, + addendum, + ); + } + }; + } + + // can re-export everything from this module. + + function shim() { + { + { + throw Error( + 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + } // Persistence (when unsupported) + + var supportsPersistence = false; + var cloneInstance = shim; + var cloneFundamentalInstance = shim; + var createContainerChildSet = shim; + var appendChildToContainerChildSet = shim; + var finalizeContainerChildren = shim; + var replaceContainerChildren = shim; + var cloneHiddenInstance = shim; + var cloneHiddenTextInstance = shim; + + var SUPPRESS_HYDRATION_WARNING; + + { + SUPPRESS_HYDRATION_WARNING = 'suppressHydrationWarning'; + } + + var SUSPENSE_START_DATA = '$'; + var SUSPENSE_END_DATA = '/$'; + var SUSPENSE_PENDING_START_DATA = '$?'; + var SUSPENSE_FALLBACK_START_DATA = '$!'; + var STYLE = 'style'; + var eventsEnabled = null; + var selectionInformation = null; + + function shouldAutoFocusHostComponent(type, props) { + switch (type) { + case 'button': + case 'input': + case 'select': + case 'textarea': + return !!props.autoFocus; + } + + return false; + } + + function getRootHostContext(rootContainerInstance) { + var type; + var namespace; + var nodeType = rootContainerInstance.nodeType; + + switch (nodeType) { + case DOCUMENT_NODE: + case DOCUMENT_FRAGMENT_NODE: { + type = nodeType === DOCUMENT_NODE ? '#document' : '#fragment'; + var root = rootContainerInstance.documentElement; + namespace = root ? root.namespaceURI : getChildNamespace(null, ''); + break; + } + + default: { + var container = + nodeType === COMMENT_NODE ? rootContainerInstance.parentNode : rootContainerInstance; + var ownNamespace = container.namespaceURI || null; + type = container.tagName; + namespace = getChildNamespace(ownNamespace, type); + break; + } + } + + { + var validatedTag = type.toLowerCase(); + var ancestorInfo = updatedAncestorInfo(null, validatedTag); + return { + namespace: namespace, + ancestorInfo: ancestorInfo, + }; + } + + return namespace; + } + function getChildHostContext(parentHostContext, type, rootContainerInstance) { + { + var parentHostContextDev = parentHostContext; + var namespace = getChildNamespace(parentHostContextDev.namespace, type); + var ancestorInfo = updatedAncestorInfo(parentHostContextDev.ancestorInfo, type); + return { + namespace: namespace, + ancestorInfo: ancestorInfo, + }; + } + + var parentNamespace = parentHostContext; + return getChildNamespace(parentNamespace, type); + } + function getPublicInstance(instance) { + return instance; + } + function prepareForCommit(containerInfo) { + eventsEnabled = isEnabled(); + selectionInformation = getSelectionInformation(); + setEnabled(false); + } + function resetAfterCommit(containerInfo) { + restoreSelection(selectionInformation); + selectionInformation = null; + setEnabled(eventsEnabled); + eventsEnabled = null; + } + function createInstance(type, props, rootContainerInstance, hostContext, internalInstanceHandle) { + var parentNamespace; + + { + // TODO: take namespace into account when validating. + var hostContextDev = hostContext; + validateDOMNesting(type, null, hostContextDev.ancestorInfo); + + if (typeof props.children === 'string' || typeof props.children === 'number') { + var string = '' + props.children; + var ownAncestorInfo = updatedAncestorInfo(hostContextDev.ancestorInfo, type); + validateDOMNesting(null, string, ownAncestorInfo); + } + + parentNamespace = hostContextDev.namespace; + } + + var domElement = createElement(type, props, rootContainerInstance, parentNamespace); + precacheFiberNode(internalInstanceHandle, domElement); + updateFiberProps(domElement, props); + return domElement; + } + function appendInitialChild(parentInstance, child) { + parentInstance.appendChild(child); + } + function finalizeInitialChildren(domElement, type, props, rootContainerInstance, hostContext) { + setInitialProperties(domElement, type, props, rootContainerInstance); + return shouldAutoFocusHostComponent(type, props); + } + function prepareUpdate(domElement, type, oldProps, newProps, rootContainerInstance, hostContext) { + { + var hostContextDev = hostContext; + + if ( + typeof newProps.children !== typeof oldProps.children && + (typeof newProps.children === 'string' || typeof newProps.children === 'number') + ) { + var string = '' + newProps.children; + var ownAncestorInfo = updatedAncestorInfo(hostContextDev.ancestorInfo, type); + validateDOMNesting(null, string, ownAncestorInfo); + } + } + + return diffProperties(domElement, type, oldProps, newProps, rootContainerInstance); + } + function shouldSetTextContent(type, props) { + return ( + type === 'textarea' || + type === 'option' || + type === 'noscript' || + typeof props.children === 'string' || + typeof props.children === 'number' || + (typeof props.dangerouslySetInnerHTML === 'object' && + props.dangerouslySetInnerHTML !== null && + props.dangerouslySetInnerHTML.__html != null) + ); + } + function shouldDeprioritizeSubtree(type, props) { + return !!props.hidden; + } + function createTextInstance(text, rootContainerInstance, hostContext, internalInstanceHandle) { + { + var hostContextDev = hostContext; + validateDOMNesting(null, text, hostContextDev.ancestorInfo); + } + + var textNode = createTextNode(text, rootContainerInstance); + precacheFiberNode(internalInstanceHandle, textNode); + return textNode; + } + var isPrimaryRenderer = true; + var warnsIfNotActing = true; // This initialization code may run even on server environments + // if a component just imports ReactDOM (e.g. for findDOMNode). + // Some environments might not have setTimeout or clearTimeout. + + var scheduleTimeout = typeof setTimeout === 'function' ? setTimeout : undefined; + var cancelTimeout = typeof clearTimeout === 'function' ? clearTimeout : undefined; + var noTimeout = -1; // ------------------- + // Mutation + // ------------------- + + var supportsMutation = true; + function commitMount(domElement, type, newProps, internalInstanceHandle) { + // Despite the naming that might imply otherwise, this method only + // fires if there is an `Update` effect scheduled during mounting. + // This happens if `finalizeInitialChildren` returns `true` (which it + // does to implement the `autoFocus` attribute on the client). But + // there are also other cases when this might happen (such as patching + // up text content during hydration mismatch). So we'll check this again. + if (shouldAutoFocusHostComponent(type, newProps)) { + domElement.focus(); + } + } + function commitUpdate(domElement, updatePayload, type, oldProps, newProps, internalInstanceHandle) { + // Update the props handle so that we know which props are the ones with + // with current event handlers. + updateFiberProps(domElement, newProps); // Apply the diff to the DOM node. + + updateProperties(domElement, updatePayload, type, oldProps, newProps); + } + function resetTextContent(domElement) { + setTextContent(domElement, ''); + } + function commitTextUpdate(textInstance, oldText, newText) { + textInstance.nodeValue = newText; + } + function appendChild(parentInstance, child) { + parentInstance.appendChild(child); + } + function appendChildToContainer(container, child) { + var parentNode; + + if (container.nodeType === COMMENT_NODE) { + parentNode = container.parentNode; + parentNode.insertBefore(child, container); + } else { + parentNode = container; + parentNode.appendChild(child); + } // This container might be used for a portal. + // If something inside a portal is clicked, that click should bubble + // through the React tree. However, on Mobile Safari the click would + // never bubble through the *DOM* tree unless an ancestor with onclick + // event exists. So we wouldn't see it and dispatch it. + // This is why we ensure that non React root containers have inline onclick + // defined. + // https://github.com/facebook/react/issues/11918 + + var reactRootContainer = container._reactRootContainer; + + if ( + (reactRootContainer === null || reactRootContainer === undefined) && + parentNode.onclick === null + ) { + // TODO: This cast may not be sound for SVG, MathML or custom elements. + trapClickOnNonInteractiveElement(parentNode); + } + } + function insertBefore(parentInstance, child, beforeChild) { + parentInstance.insertBefore(child, beforeChild); + } + function insertInContainerBefore(container, child, beforeChild) { + if (container.nodeType === COMMENT_NODE) { + container.parentNode.insertBefore(child, beforeChild); + } else { + container.insertBefore(child, beforeChild); + } + } // This is a specific event for the React Flare + // event system, so event responders can act + // accordingly to a DOM node being unmounted that + // previously had active document focus. + + function dispatchDetachedVisibleNodeEvent(child) { + if (enableFlareAPI && selectionInformation && child === selectionInformation.focusedElem) { + var targetFiber = getClosestInstanceFromNode(child); // Simlulate a blur event to the React Flare responder system. + + dispatchEventForResponderEventSystem( + 'detachedvisiblenode', + targetFiber, + { + target: child, + timeStamp: Date.now(), + }, + child, + RESPONDER_EVENT_SYSTEM | IS_PASSIVE, + ); + } + } + + function removeChild(parentInstance, child) { + dispatchDetachedVisibleNodeEvent(child); + parentInstance.removeChild(child); + } + function removeChildFromContainer(container, child) { + if (container.nodeType === COMMENT_NODE) { + container.parentNode.removeChild(child); + } else { + dispatchDetachedVisibleNodeEvent(child); + container.removeChild(child); + } + } + function clearSuspenseBoundary(parentInstance, suspenseInstance) { + var node = suspenseInstance; // Delete all nodes within this suspense boundary. + // There might be nested nodes so we need to keep track of how + // deep we are and only break out when we're back on top. + + var depth = 0; + + do { + var nextNode = node.nextSibling; + parentInstance.removeChild(node); + + if (nextNode && nextNode.nodeType === COMMENT_NODE) { + var data = nextNode.data; + + if (data === SUSPENSE_END_DATA) { + if (depth === 0) { + parentInstance.removeChild(nextNode); // Retry if any event replaying was blocked on this. + + retryIfBlockedOn(suspenseInstance); + return; + } else { + depth--; + } + } else if ( + data === SUSPENSE_START_DATA || + data === SUSPENSE_PENDING_START_DATA || + data === SUSPENSE_FALLBACK_START_DATA + ) { + depth++; + } + } + + node = nextNode; + } while (node); // TODO: Warn, we didn't find the end comment boundary. + // Retry if any event replaying was blocked on this. + + retryIfBlockedOn(suspenseInstance); + } + function clearSuspenseBoundaryFromContainer(container, suspenseInstance) { + if (container.nodeType === COMMENT_NODE) { + clearSuspenseBoundary(container.parentNode, suspenseInstance); + } else if (container.nodeType === ELEMENT_NODE) { + clearSuspenseBoundary(container, suspenseInstance); + } else { + } // Document nodes should never contain suspense boundaries. + // Retry if any event replaying was blocked on this. + + retryIfBlockedOn(container); + } + function hideInstance(instance) { + // TODO: Does this work for all element types? What about MathML? Should we + // pass host context to this method? + instance = instance; + var style = instance.style; + + if (typeof style.setProperty === 'function') { + style.setProperty('display', 'none', 'important'); + } else { + style.display = 'none'; + } + } + function hideTextInstance(textInstance) { + textInstance.nodeValue = ''; + } + function unhideInstance(instance, props) { + instance = instance; + var styleProp = props[STYLE]; + var display = + styleProp !== undefined && styleProp !== null && styleProp.hasOwnProperty('display') + ? styleProp.display + : null; + instance.style.display = dangerousStyleValue('display', display); + } + function unhideTextInstance(textInstance, text) { + textInstance.nodeValue = text; + } // ------------------- + // Hydration + // ------------------- + + var supportsHydration = true; + function canHydrateInstance(instance, type, props) { + if ( + instance.nodeType !== ELEMENT_NODE || + type.toLowerCase() !== instance.nodeName.toLowerCase() + ) { + return null; + } // This has now been refined to an element node. + + return instance; + } + function canHydrateTextInstance(instance, text) { + if (text === '' || instance.nodeType !== TEXT_NODE) { + // Empty strings are not parsed by HTML so there won't be a correct match here. + return null; + } // This has now been refined to a text node. + + return instance; + } + function canHydrateSuspenseInstance(instance) { + if (instance.nodeType !== COMMENT_NODE) { + // Empty strings are not parsed by HTML so there won't be a correct match here. + return null; + } // This has now been refined to a suspense node. + + return instance; + } + function isSuspenseInstancePending(instance) { + return instance.data === SUSPENSE_PENDING_START_DATA; + } + function isSuspenseInstanceFallback(instance) { + return instance.data === SUSPENSE_FALLBACK_START_DATA; + } + function registerSuspenseInstanceRetry(instance, callback) { + instance._reactRetry = callback; + } + + function getNextHydratable(node) { + // Skip non-hydratable nodes. + for (; node != null; node = node.nextSibling) { + var nodeType = node.nodeType; + + if (nodeType === ELEMENT_NODE || nodeType === TEXT_NODE) { + break; + } + + if (enableSuspenseServerRenderer) { + if (nodeType === COMMENT_NODE) { + var nodeData = node.data; + + if ( + nodeData === SUSPENSE_START_DATA || + nodeData === SUSPENSE_FALLBACK_START_DATA || + nodeData === SUSPENSE_PENDING_START_DATA + ) { + break; + } + } + } + } + + return node; + } + + function getNextHydratableSibling(instance) { + return getNextHydratable(instance.nextSibling); + } + function getFirstHydratableChild(parentInstance) { + return getNextHydratable(parentInstance.firstChild); + } + function hydrateInstance( + instance, + type, + props, + rootContainerInstance, + hostContext, + internalInstanceHandle, + ) { + precacheFiberNode(internalInstanceHandle, instance); // TODO: Possibly defer this until the commit phase where all the events + // get attached. + + updateFiberProps(instance, props); + var parentNamespace; + + { + var hostContextDev = hostContext; + parentNamespace = hostContextDev.namespace; + } + + return diffHydratedProperties(instance, type, props, parentNamespace, rootContainerInstance); + } + function hydrateTextInstance(textInstance, text, internalInstanceHandle) { + precacheFiberNode(internalInstanceHandle, textInstance); + return diffHydratedText(textInstance, text); + } + function hydrateSuspenseInstance(suspenseInstance, internalInstanceHandle) { + precacheFiberNode(internalInstanceHandle, suspenseInstance); + } + function getNextHydratableInstanceAfterSuspenseInstance(suspenseInstance) { + var node = suspenseInstance.nextSibling; // Skip past all nodes within this suspense boundary. + // There might be nested nodes so we need to keep track of how + // deep we are and only break out when we're back on top. + + var depth = 0; + + while (node) { + if (node.nodeType === COMMENT_NODE) { + var data = node.data; + + if (data === SUSPENSE_END_DATA) { + if (depth === 0) { + return getNextHydratableSibling(node); + } else { + depth--; + } + } else if ( + data === SUSPENSE_START_DATA || + data === SUSPENSE_FALLBACK_START_DATA || + data === SUSPENSE_PENDING_START_DATA + ) { + depth++; + } + } + + node = node.nextSibling; + } // TODO: Warn, we didn't find the end comment boundary. + + return null; + } // Returns the SuspenseInstance if this node is a direct child of a + // SuspenseInstance. I.e. if its previous sibling is a Comment with + // SUSPENSE_x_START_DATA. Otherwise, null. + + function getParentSuspenseInstance(targetInstance) { + var node = targetInstance.previousSibling; // Skip past all nodes within this suspense boundary. + // There might be nested nodes so we need to keep track of how + // deep we are and only break out when we're back on top. + + var depth = 0; + + while (node) { + if (node.nodeType === COMMENT_NODE) { + var data = node.data; + + if ( + data === SUSPENSE_START_DATA || + data === SUSPENSE_FALLBACK_START_DATA || + data === SUSPENSE_PENDING_START_DATA + ) { + if (depth === 0) { + return node; + } else { + depth--; + } + } else if (data === SUSPENSE_END_DATA) { + depth++; + } + } + + node = node.previousSibling; + } + + return null; + } + function commitHydratedContainer(container) { + // Retry if any event replaying was blocked on this. + retryIfBlockedOn(container); + } + function commitHydratedSuspenseInstance(suspenseInstance) { + // Retry if any event replaying was blocked on this. + retryIfBlockedOn(suspenseInstance); + } + function didNotMatchHydratedContainerTextInstance(parentContainer, textInstance, text) { + { + warnForUnmatchedText(textInstance, text); + } + } + function didNotMatchHydratedTextInstance( + parentType, + parentProps, + parentInstance, + textInstance, + text, + ) { + if (true && parentProps[SUPPRESS_HYDRATION_WARNING] !== true) { + warnForUnmatchedText(textInstance, text); + } + } + function didNotHydrateContainerInstance(parentContainer, instance) { + { + if (instance.nodeType === ELEMENT_NODE) { + warnForDeletedHydratableElement(parentContainer, instance); + } else if (instance.nodeType === COMMENT_NODE) { + // TODO: warnForDeletedHydratableSuspenseBoundary + } else { + warnForDeletedHydratableText(parentContainer, instance); + } + } + } + function didNotHydrateInstance(parentType, parentProps, parentInstance, instance) { + if (true && parentProps[SUPPRESS_HYDRATION_WARNING] !== true) { + if (instance.nodeType === ELEMENT_NODE) { + warnForDeletedHydratableElement(parentInstance, instance); + } else if (instance.nodeType === COMMENT_NODE) { + // TODO: warnForDeletedHydratableSuspenseBoundary + } else { + warnForDeletedHydratableText(parentInstance, instance); + } + } + } + function didNotFindHydratableContainerInstance(parentContainer, type, props) { + { + warnForInsertedHydratedElement(parentContainer, type, props); + } + } + function didNotFindHydratableContainerTextInstance(parentContainer, text) { + { + warnForInsertedHydratedText(parentContainer, text); + } + } + + function didNotFindHydratableInstance(parentType, parentProps, parentInstance, type, props) { + if (true && parentProps[SUPPRESS_HYDRATION_WARNING] !== true) { + warnForInsertedHydratedElement(parentInstance, type, props); + } + } + function didNotFindHydratableTextInstance(parentType, parentProps, parentInstance, text) { + if (true && parentProps[SUPPRESS_HYDRATION_WARNING] !== true) { + warnForInsertedHydratedText(parentInstance, text); + } + } + function didNotFindHydratableSuspenseInstance(parentType, parentProps, parentInstance) { + if (true && parentProps[SUPPRESS_HYDRATION_WARNING] !== true) { + // TODO: warnForInsertedHydratedSuspense(parentInstance); + } + } + function mountResponderInstance( + responder, + responderInstance, + responderProps, + responderState, + instance, + ) { + // Listen to events + var doc = instance.ownerDocument; + var _ref = responder, + rootEventTypes = _ref.rootEventTypes, + targetEventTypes = _ref.targetEventTypes; + + if (targetEventTypes !== null) { + listenToEventResponderEventTypes(targetEventTypes, doc); + } + + if (rootEventTypes !== null) { + addRootEventTypesForResponderInstance(responderInstance, rootEventTypes); + listenToEventResponderEventTypes(rootEventTypes, doc); + } + + mountEventResponder(responder, responderInstance, responderProps, responderState); + return responderInstance; + } + function unmountResponderInstance(responderInstance) { + if (enableFlareAPI) { + // TODO stop listening to targetEventTypes + unmountEventResponder(responderInstance); + } + } + function getFundamentalComponentInstance(fundamentalInstance) { + if (enableFundamentalAPI) { + var currentFiber = fundamentalInstance.currentFiber, + impl = fundamentalInstance.impl, + props = fundamentalInstance.props, + state = fundamentalInstance.state; + var instance = impl.getInstance(null, props, state); + precacheFiberNode(currentFiber, instance); + return instance; + } // Because of the flag above, this gets around the Flow error; + + return null; + } + function mountFundamentalComponent(fundamentalInstance) { + if (enableFundamentalAPI) { + var impl = fundamentalInstance.impl, + instance = fundamentalInstance.instance, + props = fundamentalInstance.props, + state = fundamentalInstance.state; + var onMount = impl.onMount; + + if (onMount !== undefined) { + onMount(null, instance, props, state); + } + } + } + function shouldUpdateFundamentalComponent(fundamentalInstance) { + if (enableFundamentalAPI) { + var impl = fundamentalInstance.impl, + prevProps = fundamentalInstance.prevProps, + props = fundamentalInstance.props, + state = fundamentalInstance.state; + var shouldUpdate = impl.shouldUpdate; + + if (shouldUpdate !== undefined) { + return shouldUpdate(null, prevProps, props, state); + } + } + + return true; + } + function updateFundamentalComponent(fundamentalInstance) { + if (enableFundamentalAPI) { + var impl = fundamentalInstance.impl, + instance = fundamentalInstance.instance, + prevProps = fundamentalInstance.prevProps, + props = fundamentalInstance.props, + state = fundamentalInstance.state; + var onUpdate = impl.onUpdate; + + if (onUpdate !== undefined) { + onUpdate(null, instance, prevProps, props, state); + } + } + } + function unmountFundamentalComponent(fundamentalInstance) { + if (enableFundamentalAPI) { + var impl = fundamentalInstance.impl, + instance = fundamentalInstance.instance, + props = fundamentalInstance.props, + state = fundamentalInstance.state; + var onUnmount = impl.onUnmount; + + if (onUnmount !== undefined) { + onUnmount(null, instance, props, state); + } + } + } + function getInstanceFromNode$2(node) { + return getClosestInstanceFromNode(node) || null; + } + + var randomKey = Math.random().toString(36).slice(2); + var internalInstanceKey = '__reactInternalInstance$' + randomKey; + var internalEventHandlersKey = '__reactEventHandlers$' + randomKey; + var internalContainerInstanceKey = '__reactContainere$' + randomKey; + function precacheFiberNode(hostInst, node) { + node[internalInstanceKey] = hostInst; + } + function markContainerAsRoot(hostRoot, node) { + node[internalContainerInstanceKey] = hostRoot; + } + function unmarkContainerAsRoot(node) { + node[internalContainerInstanceKey] = null; + } + function isContainerMarkedAsRoot(node) { + return !!node[internalContainerInstanceKey]; + } // Given a DOM node, return the closest HostComponent or HostText fiber ancestor. + // If the target node is part of a hydrated or not yet rendered subtree, then + // this may also return a SuspenseComponent or HostRoot to indicate that. + // Conceptually the HostRoot fiber is a child of the Container node. So if you + // pass the Container node as the targetNode, you will not actually get the + // HostRoot back. To get to the HostRoot, you need to pass a child of it. + // The same thing applies to Suspense boundaries. + + function getClosestInstanceFromNode(targetNode) { + var targetInst = targetNode[internalInstanceKey]; + + if (targetInst) { + // Don't return HostRoot or SuspenseComponent here. + return targetInst; + } // If the direct event target isn't a React owned DOM node, we need to look + // to see if one of its parents is a React owned DOM node. + + var parentNode = targetNode.parentNode; + + while (parentNode) { + // We'll check if this is a container root that could include + // React nodes in the future. We need to check this first because + // if we're a child of a dehydrated container, we need to first + // find that inner container before moving on to finding the parent + // instance. Note that we don't check this field on the targetNode + // itself because the fibers are conceptually between the container + // node and the first child. It isn't surrounding the container node. + // If it's not a container, we check if it's an instance. + targetInst = parentNode[internalContainerInstanceKey] || parentNode[internalInstanceKey]; + + if (targetInst) { + // Since this wasn't the direct target of the event, we might have + // stepped past dehydrated DOM nodes to get here. However they could + // also have been non-React nodes. We need to answer which one. + // If we the instance doesn't have any children, then there can't be + // a nested suspense boundary within it. So we can use this as a fast + // bailout. Most of the time, when people add non-React children to + // the tree, it is using a ref to a child-less DOM node. + // Normally we'd only need to check one of the fibers because if it + // has ever gone from having children to deleting them or vice versa + // it would have deleted the dehydrated boundary nested inside already. + // However, since the HostRoot starts out with an alternate it might + // have one on the alternate so we need to check in case this was a + // root. + var alternate = targetInst.alternate; + + if (targetInst.child !== null || (alternate !== null && alternate.child !== null)) { + // Next we need to figure out if the node that skipped past is + // nested within a dehydrated boundary and if so, which one. + var suspenseInstance = getParentSuspenseInstance(targetNode); + + while (suspenseInstance !== null) { + // We found a suspense instance. That means that we haven't + // hydrated it yet. Even though we leave the comments in the + // DOM after hydrating, and there are boundaries in the DOM + // that could already be hydrated, we wouldn't have found them + // through this pass since if the target is hydrated it would + // have had an internalInstanceKey on it. + // Let's get the fiber associated with the SuspenseComponent + // as the deepest instance. + var targetSuspenseInst = suspenseInstance[internalInstanceKey]; + + if (targetSuspenseInst) { + return targetSuspenseInst; + } // If we don't find a Fiber on the comment, it might be because + // we haven't gotten to hydrate it yet. There might still be a + // parent boundary that hasn't above this one so we need to find + // the outer most that is known. + + suspenseInstance = getParentSuspenseInstance(suspenseInstance); // If we don't find one, then that should mean that the parent + // host component also hasn't hydrated yet. We can return it + // below since it will bail out on the isMounted check later. + } + } + + return targetInst; + } + + targetNode = parentNode; + parentNode = targetNode.parentNode; + } + + return null; + } + /** + * Given a DOM node, return the ReactDOMComponent or ReactDOMTextComponent + * instance, or null if the node was not rendered by this React. + */ + + function getInstanceFromNode$1(node) { + var inst = node[internalInstanceKey] || node[internalContainerInstanceKey]; + + if (inst) { + if ( + inst.tag === HostComponent || + inst.tag === HostText || + inst.tag === SuspenseComponent || + inst.tag === HostRoot + ) { + return inst; + } else { + return null; + } + } + + return null; + } + /** + * Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding + * DOM node. + */ + + function getNodeFromInstance$1(inst) { + if (inst.tag === HostComponent || inst.tag === HostText) { + // In Fiber this, is just the state node right now. We assume it will be + // a host component or host text. + return inst.stateNode; + } // Without this first invariant, passing a non-DOM-component triggers the next + // invariant for a missing parent, which is super confusing. + + { + { + throw Error('getNodeFromInstance: Invalid argument.'); + } + } + } + function getFiberCurrentPropsFromNode$1(node) { + return node[internalEventHandlersKey] || null; + } + function updateFiberProps(node, props) { + node[internalEventHandlersKey] = props; + } + + /** + * These variables store information about text content of a target node, + * allowing comparison of content before and after a given event. + * + * Identify the node where selection currently begins, then observe + * both its text content and its current position in the DOM. Since the + * browser may natively replace the target node during composition, we can + * use its position to find its replacement. + * + * + */ + var root = null; + var startText = null; + var fallbackText = null; + function initialize(nativeEventTarget) { + root = nativeEventTarget; + startText = getText(); + return true; + } + function reset() { + root = null; + startText = null; + fallbackText = null; + } + function getData() { + if (fallbackText) { + return fallbackText; + } + + var start; + var startValue = startText; + var startLength = startValue.length; + var end; + var endValue = getText(); + var endLength = endValue.length; + + for (start = 0; start < startLength; start++) { + if (startValue[start] !== endValue[start]) { + break; + } + } + + var minEnd = startLength - start; + + for (end = 1; end <= minEnd; end++) { + if (startValue[startLength - end] !== endValue[endLength - end]) { + break; + } + } + + var sliceTail = end > 1 ? 1 - end : undefined; + fallbackText = endValue.slice(start, sliceTail); + return fallbackText; + } + function getText() { + if ('value' in root) { + return root.value; + } + + return root.textContent; + } + + /** + * @interface Event + * @see http://www.w3.org/TR/DOM-Level-3-Events/#events-compositionevents + */ + + var SyntheticCompositionEvent = SyntheticEvent.extend({ + data: null, + }); + + /** + * @interface Event + * @see http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105 + * /#events-inputevents + */ + + var SyntheticInputEvent = SyntheticEvent.extend({ + data: null, + }); + + var END_KEYCODES = [9, 13, 27, 32]; // Tab, Return, Esc, Space + + var START_KEYCODE = 229; + var canUseCompositionEvent = canUseDOM && 'CompositionEvent' in window; + var documentMode = null; + + if (canUseDOM && 'documentMode' in document) { + documentMode = document.documentMode; + } // Webkit offers a very useful `textInput` event that can be used to + // directly represent `beforeInput`. The IE `textinput` event is not as + // useful, so we don't use it. + + var canUseTextInputEvent = canUseDOM && 'TextEvent' in window && !documentMode; // In IE9+, we have access to composition events, but the data supplied + // by the native compositionend event may be incorrect. Japanese ideographic + // spaces, for instance (\u3000) are not recorded correctly. + + var useFallbackCompositionData = + canUseDOM && + (!canUseCompositionEvent || (documentMode && documentMode > 8 && documentMode <= 11)); + var SPACEBAR_CODE = 32; + var SPACEBAR_CHAR = String.fromCharCode(SPACEBAR_CODE); // Events and their corresponding property names. + + var eventTypes$1 = { + beforeInput: { + phasedRegistrationNames: { + bubbled: 'onBeforeInput', + captured: 'onBeforeInputCapture', + }, + dependencies: [TOP_COMPOSITION_END, TOP_KEY_PRESS, TOP_TEXT_INPUT, TOP_PASTE], + }, + compositionEnd: { + phasedRegistrationNames: { + bubbled: 'onCompositionEnd', + captured: 'onCompositionEndCapture', + }, + dependencies: [ + TOP_BLUR, + TOP_COMPOSITION_END, + TOP_KEY_DOWN, + TOP_KEY_PRESS, + TOP_KEY_UP, + TOP_MOUSE_DOWN, + ], + }, + compositionStart: { + phasedRegistrationNames: { + bubbled: 'onCompositionStart', + captured: 'onCompositionStartCapture', + }, + dependencies: [ + TOP_BLUR, + TOP_COMPOSITION_START, + TOP_KEY_DOWN, + TOP_KEY_PRESS, + TOP_KEY_UP, + TOP_MOUSE_DOWN, + ], + }, + compositionUpdate: { + phasedRegistrationNames: { + bubbled: 'onCompositionUpdate', + captured: 'onCompositionUpdateCapture', + }, + dependencies: [ + TOP_BLUR, + TOP_COMPOSITION_UPDATE, + TOP_KEY_DOWN, + TOP_KEY_PRESS, + TOP_KEY_UP, + TOP_MOUSE_DOWN, + ], + }, + }; // Track whether we've ever handled a keypress on the space key. + + var hasSpaceKeypress = false; + /** + * Return whether a native keypress event is assumed to be a command. + * This is required because Firefox fires `keypress` events for key commands + * (cut, copy, select-all, etc.) even though no character is inserted. + */ + + function isKeypressCommand(nativeEvent) { + return ( + (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) && // ctrlKey && altKey is equivalent to AltGr, and is not a command. + !(nativeEvent.ctrlKey && nativeEvent.altKey) + ); + } + /** + * Translate native top level events into event types. + * + * @param {string} topLevelType + * @return {object} + */ + + function getCompositionEventType(topLevelType) { + switch (topLevelType) { + case TOP_COMPOSITION_START: + return eventTypes$1.compositionStart; + + case TOP_COMPOSITION_END: + return eventTypes$1.compositionEnd; + + case TOP_COMPOSITION_UPDATE: + return eventTypes$1.compositionUpdate; + } + } + /** + * Does our fallback best-guess model think this event signifies that + * composition has begun? + * + * @param {string} topLevelType + * @param {object} nativeEvent + * @return {boolean} + */ + + function isFallbackCompositionStart(topLevelType, nativeEvent) { + return topLevelType === TOP_KEY_DOWN && nativeEvent.keyCode === START_KEYCODE; + } + /** + * Does our fallback mode think that this event is the end of composition? + * + * @param {string} topLevelType + * @param {object} nativeEvent + * @return {boolean} + */ + + function isFallbackCompositionEnd(topLevelType, nativeEvent) { + switch (topLevelType) { + case TOP_KEY_UP: + // Command keys insert or clear IME input. + return END_KEYCODES.indexOf(nativeEvent.keyCode) !== -1; + + case TOP_KEY_DOWN: + // Expect IME keyCode on each keydown. If we get any other + // code we must have exited earlier. + return nativeEvent.keyCode !== START_KEYCODE; + + case TOP_KEY_PRESS: + case TOP_MOUSE_DOWN: + case TOP_BLUR: + // Events are not possible without cancelling IME. + return true; + + default: + return false; + } + } + /** + * Google Input Tools provides composition data via a CustomEvent, + * with the `data` property populated in the `detail` object. If this + * is available on the event object, use it. If not, this is a plain + * composition event and we have nothing special to extract. + * + * @param {object} nativeEvent + * @return {?string} + */ + + function getDataFromCustomEvent(nativeEvent) { + var detail = nativeEvent.detail; + + if (typeof detail === 'object' && 'data' in detail) { + return detail.data; + } + + return null; + } + /** + * Check if a composition event was triggered by Korean IME. + * Our fallback mode does not work well with IE's Korean IME, + * so just use native composition events when Korean IME is used. + * Although CompositionEvent.locale property is deprecated, + * it is available in IE, where our fallback mode is enabled. + * + * @param {object} nativeEvent + * @return {boolean} + */ + + function isUsingKoreanIME(nativeEvent) { + return nativeEvent.locale === 'ko'; + } // Track the current IME composition status, if any. + + var isComposing = false; + /** + * @return {?object} A SyntheticCompositionEvent. + */ + + function extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) { + var eventType; + var fallbackData; + + if (canUseCompositionEvent) { + eventType = getCompositionEventType(topLevelType); + } else if (!isComposing) { + if (isFallbackCompositionStart(topLevelType, nativeEvent)) { + eventType = eventTypes$1.compositionStart; + } + } else if (isFallbackCompositionEnd(topLevelType, nativeEvent)) { + eventType = eventTypes$1.compositionEnd; + } + + if (!eventType) { + return null; + } + + if (useFallbackCompositionData && !isUsingKoreanIME(nativeEvent)) { + // The current composition is stored statically and must not be + // overwritten while composition continues. + if (!isComposing && eventType === eventTypes$1.compositionStart) { + isComposing = initialize(nativeEventTarget); + } else if (eventType === eventTypes$1.compositionEnd) { + if (isComposing) { + fallbackData = getData(); + } + } + } + + var event = SyntheticCompositionEvent.getPooled( + eventType, + targetInst, + nativeEvent, + nativeEventTarget, + ); + + if (fallbackData) { + // Inject data generated from fallback path into the synthetic event. + // This matches the property of native CompositionEventInterface. + event.data = fallbackData; + } else { + var customData = getDataFromCustomEvent(nativeEvent); + + if (customData !== null) { + event.data = customData; + } + } + + accumulateTwoPhaseDispatches(event); + return event; + } + /** + * @param {TopLevelType} topLevelType Number from `TopLevelType`. + * @param {object} nativeEvent Native browser event. + * @return {?string} The string corresponding to this `beforeInput` event. + */ + + function getNativeBeforeInputChars(topLevelType, nativeEvent) { + switch (topLevelType) { + case TOP_COMPOSITION_END: + return getDataFromCustomEvent(nativeEvent); + + case TOP_KEY_PRESS: + /** + * If native `textInput` events are available, our goal is to make + * use of them. However, there is a special case: the spacebar key. + * In Webkit, preventing default on a spacebar `textInput` event + * cancels character insertion, but it *also* causes the browser + * to fall back to its default spacebar behavior of scrolling the + * page. + * + * Tracking at: + * https://code.google.com/p/chromium/issues/detail?id=355103 + * + * To avoid this issue, use the keypress event as if no `textInput` + * event is available. + */ + var which = nativeEvent.which; + + if (which !== SPACEBAR_CODE) { + return null; + } + + hasSpaceKeypress = true; + return SPACEBAR_CHAR; + + case TOP_TEXT_INPUT: + // Record the characters to be added to the DOM. + var chars = nativeEvent.data; // If it's a spacebar character, assume that we have already handled + // it at the keypress level and bail immediately. Android Chrome + // doesn't give us keycodes, so we need to ignore it. + + if (chars === SPACEBAR_CHAR && hasSpaceKeypress) { + return null; + } + + return chars; + + default: + // For other native event types, do nothing. + return null; + } + } + /** + * For browsers that do not provide the `textInput` event, extract the + * appropriate string to use for SyntheticInputEvent. + * + * @param {number} topLevelType Number from `TopLevelEventTypes`. + * @param {object} nativeEvent Native browser event. + * @return {?string} The fallback string for this `beforeInput` event. + */ + + function getFallbackBeforeInputChars(topLevelType, nativeEvent) { + // If we are currently composing (IME) and using a fallback to do so, + // try to extract the composed characters from the fallback object. + // If composition event is available, we extract a string only at + // compositionevent, otherwise extract it at fallback events. + if (isComposing) { + if ( + topLevelType === TOP_COMPOSITION_END || + (!canUseCompositionEvent && isFallbackCompositionEnd(topLevelType, nativeEvent)) + ) { + var chars = getData(); + reset(); + isComposing = false; + return chars; + } + + return null; + } + + switch (topLevelType) { + case TOP_PASTE: + // If a paste event occurs after a keypress, throw out the input + // chars. Paste events should not lead to BeforeInput events. + return null; + + case TOP_KEY_PRESS: + /** + * As of v27, Firefox may fire keypress events even when no character + * will be inserted. A few possibilities: + * + * - `which` is `0`. Arrow keys, Esc key, etc. + * + * - `which` is the pressed key code, but no char is available. + * Ex: 'AltGr + d` in Polish. There is no modified character for + * this key combination and no character is inserted into the + * document, but FF fires the keypress for char code `100` anyway. + * No `input` event will occur. + * + * - `which` is the pressed key code, but a command combination is + * being used. Ex: `Cmd+C`. No character is inserted, and no + * `input` event will occur. + */ + if (!isKeypressCommand(nativeEvent)) { + // IE fires the `keypress` event when a user types an emoji via + // Touch keyboard of Windows. In such a case, the `char` property + // holds an emoji character like `\uD83D\uDE0A`. Because its length + // is 2, the property `which` does not represent an emoji correctly. + // In such a case, we directly return the `char` property instead of + // using `which`. + if (nativeEvent.char && nativeEvent.char.length > 1) { + return nativeEvent.char; + } else if (nativeEvent.which) { + return String.fromCharCode(nativeEvent.which); + } + } + + return null; + + case TOP_COMPOSITION_END: + return useFallbackCompositionData && !isUsingKoreanIME(nativeEvent) ? null : nativeEvent.data; + + default: + return null; + } + } + /** + * Extract a SyntheticInputEvent for `beforeInput`, based on either native + * `textInput` or fallback behavior. + * + * @return {?object} A SyntheticInputEvent. + */ + + function extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) { + var chars; + + if (canUseTextInputEvent) { + chars = getNativeBeforeInputChars(topLevelType, nativeEvent); + } else { + chars = getFallbackBeforeInputChars(topLevelType, nativeEvent); + } // If no characters are being inserted, no BeforeInput event should + // be fired. + + if (!chars) { + return null; + } + + var event = SyntheticInputEvent.getPooled( + eventTypes$1.beforeInput, + targetInst, + nativeEvent, + nativeEventTarget, + ); + event.data = chars; + accumulateTwoPhaseDispatches(event); + return event; + } + /** + * Create an `onBeforeInput` event to match + * http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105/#events-inputevents. + * + * This event plugin is based on the native `textInput` event + * available in Chrome, Safari, Opera, and IE. This event fires after + * `onKeyPress` and `onCompositionEnd`, but before `onInput`. + * + * `beforeInput` is spec'd but not implemented in any browsers, and + * the `input` event does not provide any useful information about what has + * actually been added, contrary to the spec. Thus, `textInput` is the best + * available event to identify the characters that have actually been inserted + * into the target node. + * + * This plugin is also responsible for emitting `composition` events, thus + * allowing us to share composition fallback code for both `beforeInput` and + * `composition` event types. + */ + + var BeforeInputEventPlugin = { + eventTypes: eventTypes$1, + extractEvents: function ( + topLevelType, + targetInst, + nativeEvent, + nativeEventTarget, + eventSystemFlags, + ) { + var composition = extractCompositionEvent( + topLevelType, + targetInst, + nativeEvent, + nativeEventTarget, + ); + var beforeInput = extractBeforeInputEvent( + topLevelType, + targetInst, + nativeEvent, + nativeEventTarget, + ); + + if (composition === null) { + return beforeInput; + } + + if (beforeInput === null) { + return composition; + } + + return [composition, beforeInput]; + }, + }; + + /** + * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary + */ + var supportedInputTypes = { + color: true, + date: true, + datetime: true, + 'datetime-local': true, + email: true, + month: true, + number: true, + password: true, + range: true, + search: true, + tel: true, + text: true, + time: true, + url: true, + week: true, + }; + + function isTextInputElement(elem) { + var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase(); + + if (nodeName === 'input') { + return !!supportedInputTypes[elem.type]; + } + + if (nodeName === 'textarea') { + return true; + } + + return false; + } + + var eventTypes$2 = { + change: { + phasedRegistrationNames: { + bubbled: 'onChange', + captured: 'onChangeCapture', + }, + dependencies: [ + TOP_BLUR, + TOP_CHANGE, + TOP_CLICK, + TOP_FOCUS, + TOP_INPUT, + TOP_KEY_DOWN, + TOP_KEY_UP, + TOP_SELECTION_CHANGE, + ], + }, + }; + + function createAndAccumulateChangeEvent(inst, nativeEvent, target) { + var event = SyntheticEvent.getPooled(eventTypes$2.change, inst, nativeEvent, target); + event.type = 'change'; // Flag this event loop as needing state restore. + + enqueueStateRestore(target); + accumulateTwoPhaseDispatches(event); + return event; + } + /** + * For IE shims + */ + + var activeElement = null; + var activeElementInst = null; + /** + * SECTION: handle `change` event + */ + + function shouldUseChangeEvent(elem) { + var nodeName = elem.nodeName && elem.nodeName.toLowerCase(); + return nodeName === 'select' || (nodeName === 'input' && elem.type === 'file'); + } + + function manualDispatchChangeEvent(nativeEvent) { + var event = createAndAccumulateChangeEvent( + activeElementInst, + nativeEvent, + getEventTarget(nativeEvent), + ); // If change and propertychange bubbled, we'd just bind to it like all the + // other events and have it go through ReactBrowserEventEmitter. Since it + // doesn't, we manually listen for the events and so we have to enqueue and + // process the abstract event manually. + // + // Batching is necessary here in order to ensure that all event handlers run + // before the next rerender (including event handlers attached to ancestor + // elements instead of directly on the input). Without this, controlled + // components don't work properly in conjunction with event bubbling because + // the component is rerendered and the value reverted before all the event + // handlers can run. See https://github.com/facebook/react/issues/708. + + batchedUpdates(runEventInBatch, event); + } + + function runEventInBatch(event) { + runEventsInBatch(event); + } + + function getInstIfValueChanged(targetInst) { + var targetNode = getNodeFromInstance$1(targetInst); + + if (updateValueIfChanged(targetNode)) { + return targetInst; + } + } + + function getTargetInstForChangeEvent(topLevelType, targetInst) { + if (topLevelType === TOP_CHANGE) { + return targetInst; + } + } + /** + * SECTION: handle `input` event + */ + + var isInputEventSupported = false; + + if (canUseDOM) { + // IE9 claims to support the input event but fails to trigger it when + // deleting text, so we ignore its input events. + isInputEventSupported = + isEventSupported('input') && (!document.documentMode || document.documentMode > 9); + } + /** + * (For IE <=9) Starts tracking propertychange events on the passed-in element + * and override the value property so that we can distinguish user events from + * value changes in JS. + */ + + function startWatchingForValueChange(target, targetInst) { + activeElement = target; + activeElementInst = targetInst; + activeElement.attachEvent('onpropertychange', handlePropertyChange); + } + /** + * (For IE <=9) Removes the event listeners from the currently-tracked element, + * if any exists. + */ + + function stopWatchingForValueChange() { + if (!activeElement) { + return; + } + + activeElement.detachEvent('onpropertychange', handlePropertyChange); + activeElement = null; + activeElementInst = null; + } + /** + * (For IE <=9) Handles a propertychange event, sending a `change` event if + * the value of the active element has changed. + */ + + function handlePropertyChange(nativeEvent) { + if (nativeEvent.propertyName !== 'value') { + return; + } + + if (getInstIfValueChanged(activeElementInst)) { + manualDispatchChangeEvent(nativeEvent); + } + } + + function handleEventsForInputEventPolyfill(topLevelType, target, targetInst) { + if (topLevelType === TOP_FOCUS) { + // In IE9, propertychange fires for most input events but is buggy and + // doesn't fire when text is deleted, but conveniently, selectionchange + // appears to fire in all of the remaining cases so we catch those and + // forward the event if the value has changed + // In either case, we don't want to call the event handler if the value + // is changed from JS so we redefine a setter for `.value` that updates + // our activeElementValue variable, allowing us to ignore those changes + // + // stopWatching() should be a noop here but we call it just in case we + // missed a blur event somehow. + stopWatchingForValueChange(); + startWatchingForValueChange(target, targetInst); + } else if (topLevelType === TOP_BLUR) { + stopWatchingForValueChange(); + } + } // For IE8 and IE9. + + function getTargetInstForInputEventPolyfill(topLevelType, targetInst) { + if ( + topLevelType === TOP_SELECTION_CHANGE || + topLevelType === TOP_KEY_UP || + topLevelType === TOP_KEY_DOWN + ) { + // On the selectionchange event, the target is just document which isn't + // helpful for us so just check activeElement instead. + // + // 99% of the time, keydown and keyup aren't necessary. IE8 fails to fire + // propertychange on the first input event after setting `value` from a + // script and fires only keydown, keypress, keyup. Catching keyup usually + // gets it and catching keydown lets us fire an event for the first + // keystroke if user does a key repeat (it'll be a little delayed: right + // before the second keystroke). Other input methods (e.g., paste) seem to + // fire selectionchange normally. + return getInstIfValueChanged(activeElementInst); + } + } + /** + * SECTION: handle `click` event + */ + + function shouldUseClickEvent(elem) { + // Use the `click` event to detect changes to checkbox and radio inputs. + // This approach works across all browsers, whereas `change` does not fire + // until `blur` in IE8. + var nodeName = elem.nodeName; + return ( + nodeName && + nodeName.toLowerCase() === 'input' && + (elem.type === 'checkbox' || elem.type === 'radio') + ); + } + + function getTargetInstForClickEvent(topLevelType, targetInst) { + if (topLevelType === TOP_CLICK) { + return getInstIfValueChanged(targetInst); + } + } + + function getTargetInstForInputOrChangeEvent(topLevelType, targetInst) { + if (topLevelType === TOP_INPUT || topLevelType === TOP_CHANGE) { + return getInstIfValueChanged(targetInst); + } + } + + function handleControlledInputBlur(node) { + var state = node._wrapperState; + + if (!state || !state.controlled || node.type !== 'number') { + return; + } + + if (!disableInputAttributeSyncing) { + // If controlled, assign the value attribute to the current value on blur + setDefaultValue(node, 'number', node.value); + } + } + /** + * This plugin creates an `onChange` event that normalizes change events + * across form elements. This event fires at a time when it's possible to + * change the element's value without seeing a flicker. + * + * Supported elements are: + * - input (see `isTextInputElement`) + * - textarea + * - select + */ + + var ChangeEventPlugin = { + eventTypes: eventTypes$2, + _isInputEventSupported: isInputEventSupported, + extractEvents: function ( + topLevelType, + targetInst, + nativeEvent, + nativeEventTarget, + eventSystemFlags, + ) { + var targetNode = targetInst ? getNodeFromInstance$1(targetInst) : window; + var getTargetInstFunc, handleEventFunc; + + if (shouldUseChangeEvent(targetNode)) { + getTargetInstFunc = getTargetInstForChangeEvent; + } else if (isTextInputElement(targetNode)) { + if (isInputEventSupported) { + getTargetInstFunc = getTargetInstForInputOrChangeEvent; + } else { + getTargetInstFunc = getTargetInstForInputEventPolyfill; + handleEventFunc = handleEventsForInputEventPolyfill; + } + } else if (shouldUseClickEvent(targetNode)) { + getTargetInstFunc = getTargetInstForClickEvent; + } + + if (getTargetInstFunc) { + var inst = getTargetInstFunc(topLevelType, targetInst); + + if (inst) { + var event = createAndAccumulateChangeEvent(inst, nativeEvent, nativeEventTarget); + return event; + } + } + + if (handleEventFunc) { + handleEventFunc(topLevelType, targetNode, targetInst); + } // When blurring, set the value attribute for number inputs + + if (topLevelType === TOP_BLUR) { + handleControlledInputBlur(targetNode); + } + }, + }; + + /** + * Module that is injectable into `EventPluginHub`, that specifies a + * deterministic ordering of `EventPlugin`s. A convenient way to reason about + * plugins, without having to package every one of them. This is better than + * having plugins be ordered in the same order that they are injected because + * that ordering would be influenced by the packaging order. + * `ResponderEventPlugin` must occur before `SimpleEventPlugin` so that + * preventing default on events is convenient in `SimpleEventPlugin` handlers. + */ + var DOMEventPluginOrder = [ + 'ResponderEventPlugin', + 'SimpleEventPlugin', + 'EnterLeaveEventPlugin', + 'ChangeEventPlugin', + 'SelectEventPlugin', + 'BeforeInputEventPlugin', + ]; + + var eventTypes$3 = { + mouseEnter: { + registrationName: 'onMouseEnter', + dependencies: [TOP_MOUSE_OUT, TOP_MOUSE_OVER], + }, + mouseLeave: { + registrationName: 'onMouseLeave', + dependencies: [TOP_MOUSE_OUT, TOP_MOUSE_OVER], + }, + pointerEnter: { + registrationName: 'onPointerEnter', + dependencies: [TOP_POINTER_OUT, TOP_POINTER_OVER], + }, + pointerLeave: { + registrationName: 'onPointerLeave', + dependencies: [TOP_POINTER_OUT, TOP_POINTER_OVER], + }, + }; // We track the lastNativeEvent to ensure that when we encounter + // cases where we process the same nativeEvent multiple times, + // which can happen when have multiple ancestors, that we don't + // duplicate enter + + var lastNativeEvent; + var EnterLeaveEventPlugin = { + eventTypes: eventTypes$3, + + /** + * For almost every interaction we care about, there will be both a top-level + * `mouseover` and `mouseout` event that occurs. Only use `mouseout` so that + * we do not extract duplicate events. However, moving the mouse into the + * browser from outside will not fire a `mouseout` event. In this case, we use + * the `mouseover` top-level event. + */ + extractEvents: function ( + topLevelType, + targetInst, + nativeEvent, + nativeEventTarget, + eventSystemFlags, + ) { + var isOverEvent = topLevelType === TOP_MOUSE_OVER || topLevelType === TOP_POINTER_OVER; + var isOutEvent = topLevelType === TOP_MOUSE_OUT || topLevelType === TOP_POINTER_OUT; + + if ( + isOverEvent && + (eventSystemFlags & IS_REPLAYED) === 0 && + (nativeEvent.relatedTarget || nativeEvent.fromElement) + ) { + // If this is an over event with a target, then we've already dispatched + // the event in the out event of the other target. If this is replayed, + // then it's because we couldn't dispatch against this target previously + // so we have to do it now instead. + return null; + } + + if (!isOutEvent && !isOverEvent) { + // Must not be a mouse or pointer in or out - ignoring. + return null; + } + + var win; + + if (nativeEventTarget.window === nativeEventTarget) { + // `nativeEventTarget` is probably a window object. + win = nativeEventTarget; + } else { + // TODO: Figure out why `ownerDocument` is sometimes undefined in IE8. + var doc = nativeEventTarget.ownerDocument; + + if (doc) { + win = doc.defaultView || doc.parentWindow; + } else { + win = window; + } + } + + var from; + var to; + + if (isOutEvent) { + from = targetInst; + var related = nativeEvent.relatedTarget || nativeEvent.toElement; + to = related ? getClosestInstanceFromNode(related) : null; + + if (to !== null) { + var nearestMounted = getNearestMountedFiber(to); + + if (to !== nearestMounted || (to.tag !== HostComponent && to.tag !== HostText)) { + to = null; + } + } + } else { + // Moving to a node from outside the window. + from = null; + to = targetInst; + } + + if (from === to) { + // Nothing pertains to our managed components. + return null; + } + + var eventInterface, leaveEventType, enterEventType, eventTypePrefix; + + if (topLevelType === TOP_MOUSE_OUT || topLevelType === TOP_MOUSE_OVER) { + eventInterface = SyntheticMouseEvent; + leaveEventType = eventTypes$3.mouseLeave; + enterEventType = eventTypes$3.mouseEnter; + eventTypePrefix = 'mouse'; + } else if (topLevelType === TOP_POINTER_OUT || topLevelType === TOP_POINTER_OVER) { + eventInterface = SyntheticPointerEvent; + leaveEventType = eventTypes$3.pointerLeave; + enterEventType = eventTypes$3.pointerEnter; + eventTypePrefix = 'pointer'; + } + + var fromNode = from == null ? win : getNodeFromInstance$1(from); + var toNode = to == null ? win : getNodeFromInstance$1(to); + var leave = eventInterface.getPooled(leaveEventType, from, nativeEvent, nativeEventTarget); + leave.type = eventTypePrefix + 'leave'; + leave.target = fromNode; + leave.relatedTarget = toNode; + var enter = eventInterface.getPooled(enterEventType, to, nativeEvent, nativeEventTarget); + enter.type = eventTypePrefix + 'enter'; + enter.target = toNode; + enter.relatedTarget = fromNode; + accumulateEnterLeaveDispatches(leave, enter, from, to); + + if (nativeEvent === lastNativeEvent) { + lastNativeEvent = null; + return [leave]; + } + + lastNativeEvent = nativeEvent; + return [leave, enter]; + }, + }; + + /** + * inlined Object.is polyfill to avoid requiring consumers ship their own + * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is + */ + function is(x, y) { + return ( + (x === y && (x !== 0 || 1 / x === 1 / y)) || (x !== x && y !== y) // eslint-disable-line no-self-compare + ); + } + + var is$1 = typeof Object.is === 'function' ? Object.is : is; + + var hasOwnProperty$2 = Object.prototype.hasOwnProperty; + /** + * Performs equality by iterating through keys on an object and returning false + * when any key has values which are not strictly equal between the arguments. + * Returns true when the values of all keys are strictly equal. + */ + + function shallowEqual(objA, objB) { + if (is$1(objA, objB)) { + return true; + } + + if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) { + return false; + } + + var keysA = Object.keys(objA); + var keysB = Object.keys(objB); + + if (keysA.length !== keysB.length) { + return false; + } // Test for A's keys different from B. + + for (var i = 0; i < keysA.length; i++) { + if (!hasOwnProperty$2.call(objB, keysA[i]) || !is$1(objA[keysA[i]], objB[keysA[i]])) { + return false; + } + } + + return true; + } + + var skipSelectionChangeEvent = + canUseDOM && 'documentMode' in document && document.documentMode <= 11; + var eventTypes$4 = { + select: { + phasedRegistrationNames: { + bubbled: 'onSelect', + captured: 'onSelectCapture', + }, + dependencies: [ + TOP_BLUR, + TOP_CONTEXT_MENU, + TOP_DRAG_END, + TOP_FOCUS, + TOP_KEY_DOWN, + TOP_KEY_UP, + TOP_MOUSE_DOWN, + TOP_MOUSE_UP, + TOP_SELECTION_CHANGE, + ], + }, + }; + var activeElement$1 = null; + var activeElementInst$1 = null; + var lastSelection = null; + var mouseDown = false; + /** + * Get an object which is a unique representation of the current selection. + * + * The return value will not be consistent across nodes or browsers, but + * two identical selections on the same node will return identical objects. + * + * @param {DOMElement} node + * @return {object} + */ + + function getSelection$1(node) { + if ('selectionStart' in node && hasSelectionCapabilities(node)) { + return { + start: node.selectionStart, + end: node.selectionEnd, + }; + } else { + var win = (node.ownerDocument && node.ownerDocument.defaultView) || window; + var selection = win.getSelection(); + return { + anchorNode: selection.anchorNode, + anchorOffset: selection.anchorOffset, + focusNode: selection.focusNode, + focusOffset: selection.focusOffset, + }; + } + } + /** + * Get document associated with the event target. + * + * @param {object} nativeEventTarget + * @return {Document} + */ + + function getEventTargetDocument(eventTarget) { + return eventTarget.window === eventTarget + ? eventTarget.document + : eventTarget.nodeType === DOCUMENT_NODE + ? eventTarget + : eventTarget.ownerDocument; + } + /** + * Poll selection to see whether it's changed. + * + * @param {object} nativeEvent + * @param {object} nativeEventTarget + * @return {?SyntheticEvent} + */ + + function constructSelectEvent(nativeEvent, nativeEventTarget) { + // Ensure we have the right element, and that the user is not dragging a + // selection (this matches native `select` event behavior). In HTML5, select + // fires only on input and textarea thus if there's no focused element we + // won't dispatch. + var doc = getEventTargetDocument(nativeEventTarget); + + if (mouseDown || activeElement$1 == null || activeElement$1 !== getActiveElement(doc)) { + return null; + } // Only fire when selection has actually changed. + + var currentSelection = getSelection$1(activeElement$1); + + if (!lastSelection || !shallowEqual(lastSelection, currentSelection)) { + lastSelection = currentSelection; + var syntheticEvent = SyntheticEvent.getPooled( + eventTypes$4.select, + activeElementInst$1, + nativeEvent, + nativeEventTarget, + ); + syntheticEvent.type = 'select'; + syntheticEvent.target = activeElement$1; + accumulateTwoPhaseDispatches(syntheticEvent); + return syntheticEvent; + } + + return null; + } + /** + * This plugin creates an `onSelect` event that normalizes select events + * across form elements. + * + * Supported elements are: + * - input (see `isTextInputElement`) + * - textarea + * - contentEditable + * + * This differs from native browser implementations in the following ways: + * - Fires on contentEditable fields as well as inputs. + * - Fires for collapsed selection. + * - Fires after user input. + */ + + var SelectEventPlugin = { + eventTypes: eventTypes$4, + extractEvents: function ( + topLevelType, + targetInst, + nativeEvent, + nativeEventTarget, + eventSystemFlags, + ) { + var doc = getEventTargetDocument(nativeEventTarget); // Track whether all listeners exists for this plugin. If none exist, we do + // not extract events. See #3639. + + if (!doc || !isListeningToAllDependencies('onSelect', doc)) { + return null; + } + + var targetNode = targetInst ? getNodeFromInstance$1(targetInst) : window; + + switch (topLevelType) { + // Track the input node that has focus. + case TOP_FOCUS: + if (isTextInputElement(targetNode) || targetNode.contentEditable === 'true') { + activeElement$1 = targetNode; + activeElementInst$1 = targetInst; + lastSelection = null; + } + + break; + + case TOP_BLUR: + activeElement$1 = null; + activeElementInst$1 = null; + lastSelection = null; + break; + // Don't fire the event while the user is dragging. This matches the + // semantics of the native select event. + + case TOP_MOUSE_DOWN: + mouseDown = true; + break; + + case TOP_CONTEXT_MENU: + case TOP_MOUSE_UP: + case TOP_DRAG_END: + mouseDown = false; + return constructSelectEvent(nativeEvent, nativeEventTarget); + // Chrome and IE fire non-standard event when selection is changed (and + // sometimes when it hasn't). IE's event fires out of order with respect + // to key and input events on deletion, so we discard it. + // + // Firefox doesn't support selectionchange, so check selection status + // after each key entry. The selection changes after keydown and before + // keyup, but we check on keydown as well in the case of holding down a + // key, when multiple keydown events are fired but only one keyup is. + // This is also our approach for IE handling, for the reason above. + + case TOP_SELECTION_CHANGE: + if (skipSelectionChangeEvent) { + break; + } + + // falls through + + case TOP_KEY_DOWN: + case TOP_KEY_UP: + return constructSelectEvent(nativeEvent, nativeEventTarget); + } + + return null; + }, + }; + + /** + * Inject modules for resolving DOM hierarchy and plugin ordering. + */ + + injection.injectEventPluginOrder(DOMEventPluginOrder); + setComponentTree(getFiberCurrentPropsFromNode$1, getInstanceFromNode$1, getNodeFromInstance$1); + /** + * Some important event plugins included by default (without having to require + * them). + */ + + injection.injectEventPluginsByName({ + SimpleEventPlugin: SimpleEventPlugin, + EnterLeaveEventPlugin: EnterLeaveEventPlugin, + ChangeEventPlugin: ChangeEventPlugin, + SelectEventPlugin: SelectEventPlugin, + BeforeInputEventPlugin: BeforeInputEventPlugin, + }); + + // Prefix measurements so that it's possible to filter them. + // Longer prefixes are hard to read in DevTools. + var reactEmoji = '\u269B'; + var warningEmoji = '\u26D4'; + var supportsUserTiming = + typeof performance !== 'undefined' && + typeof performance.mark === 'function' && + typeof performance.clearMarks === 'function' && + typeof performance.measure === 'function' && + typeof performance.clearMeasures === 'function'; // Keep track of current fiber so that we know the path to unwind on pause. + // TODO: this looks the same as nextUnitOfWork in scheduler. Can we unify them? + + var currentFiber = null; // If we're in the middle of user code, which fiber and method is it? + // Reusing `currentFiber` would be confusing for this because user code fiber + // can change during commit phase too, but we don't need to unwind it (since + // lifecycles in the commit phase don't resemble a tree). + + var currentPhase = null; + var currentPhaseFiber = null; // Did lifecycle hook schedule an update? This is often a performance problem, + // so we will keep track of it, and include it in the report. + // Track commits caused by cascading updates. + + var isCommitting = false; + var hasScheduledUpdateInCurrentCommit = false; + var hasScheduledUpdateInCurrentPhase = false; + var commitCountInCurrentWorkLoop = 0; + var effectCountInCurrentCommit = 0; + // to avoid stretch the commit phase with measurement overhead. + + var labelsInCurrentCommit = new Set(); + + var formatMarkName = function (markName) { + return reactEmoji + ' ' + markName; + }; + + var formatLabel = function (label, warning) { + var prefix = warning ? warningEmoji + ' ' : reactEmoji + ' '; + var suffix = warning ? ' Warning: ' + warning : ''; + return '' + prefix + label + suffix; + }; + + var beginMark = function (markName) { + performance.mark(formatMarkName(markName)); + }; + + var clearMark = function (markName) { + performance.clearMarks(formatMarkName(markName)); + }; + + var endMark = function (label, markName, warning) { + var formattedMarkName = formatMarkName(markName); + var formattedLabel = formatLabel(label, warning); + + try { + performance.measure(formattedLabel, formattedMarkName); + } catch (err) {} // If previous mark was missing for some reason, this will throw. + // This could only happen if React crashed in an unexpected place earlier. + // Don't pile on with more errors. + // Clear marks immediately to avoid growing buffer. + + performance.clearMarks(formattedMarkName); + performance.clearMeasures(formattedLabel); + }; + + var getFiberMarkName = function (label, debugID) { + return label + ' (#' + debugID + ')'; + }; + + var getFiberLabel = function (componentName, isMounted, phase) { + if (phase === null) { + // These are composite component total time measurements. + return componentName + ' [' + (isMounted ? 'update' : 'mount') + ']'; + } else { + // Composite component methods. + return componentName + '.' + phase; + } + }; + + var beginFiberMark = function (fiber, phase) { + var componentName = getComponentName(fiber.type) || 'Unknown'; + var debugID = fiber._debugID; + var isMounted = fiber.alternate !== null; + var label = getFiberLabel(componentName, isMounted, phase); + + if (isCommitting && labelsInCurrentCommit.has(label)) { + // During the commit phase, we don't show duplicate labels because + // there is a fixed overhead for every measurement, and we don't + // want to stretch the commit phase beyond necessary. + return false; + } + + labelsInCurrentCommit.add(label); + var markName = getFiberMarkName(label, debugID); + beginMark(markName); + return true; + }; + + var clearFiberMark = function (fiber, phase) { + var componentName = getComponentName(fiber.type) || 'Unknown'; + var debugID = fiber._debugID; + var isMounted = fiber.alternate !== null; + var label = getFiberLabel(componentName, isMounted, phase); + var markName = getFiberMarkName(label, debugID); + clearMark(markName); + }; + + var endFiberMark = function (fiber, phase, warning) { + var componentName = getComponentName(fiber.type) || 'Unknown'; + var debugID = fiber._debugID; + var isMounted = fiber.alternate !== null; + var label = getFiberLabel(componentName, isMounted, phase); + var markName = getFiberMarkName(label, debugID); + endMark(label, markName, warning); + }; + + var shouldIgnoreFiber = function (fiber) { + // Host components should be skipped in the timeline. + // We could check typeof fiber.type, but does this work with RN? + switch (fiber.tag) { + case HostRoot: + case HostComponent: + case HostText: + case HostPortal: + case Fragment: + case ContextProvider: + case ContextConsumer: + case Mode: + return true; + + default: + return false; + } + }; + + var clearPendingPhaseMeasurement = function () { + if (currentPhase !== null && currentPhaseFiber !== null) { + clearFiberMark(currentPhaseFiber, currentPhase); + } + + currentPhaseFiber = null; + currentPhase = null; + hasScheduledUpdateInCurrentPhase = false; + }; + + var pauseTimers = function () { + // Stops all currently active measurements so that they can be resumed + // if we continue in a later deferred loop from the same unit of work. + var fiber = currentFiber; + + while (fiber) { + if (fiber._debugIsCurrentlyTiming) { + endFiberMark(fiber, null, null); + } + + fiber = fiber.return; + } + }; + + var resumeTimersRecursively = function (fiber) { + if (fiber.return !== null) { + resumeTimersRecursively(fiber.return); + } + + if (fiber._debugIsCurrentlyTiming) { + beginFiberMark(fiber, null); + } + }; + + var resumeTimers = function () { + // Resumes all measurements that were active during the last deferred loop. + if (currentFiber !== null) { + resumeTimersRecursively(currentFiber); + } + }; + + function recordEffect() { + if (enableUserTimingAPI) { + effectCountInCurrentCommit++; + } + } + function recordScheduleUpdate() { + if (enableUserTimingAPI) { + if (isCommitting) { + hasScheduledUpdateInCurrentCommit = true; + } + + if ( + currentPhase !== null && + currentPhase !== 'componentWillMount' && + currentPhase !== 'componentWillReceiveProps' + ) { + hasScheduledUpdateInCurrentPhase = true; + } + } + } + + function startWorkTimer(fiber) { + if (enableUserTimingAPI) { + if (!supportsUserTiming || shouldIgnoreFiber(fiber)) { + return; + } // If we pause, this is the fiber to unwind from. + + currentFiber = fiber; + + if (!beginFiberMark(fiber, null)) { + return; + } + + fiber._debugIsCurrentlyTiming = true; + } + } + function cancelWorkTimer(fiber) { + if (enableUserTimingAPI) { + if (!supportsUserTiming || shouldIgnoreFiber(fiber)) { + return; + } // Remember we shouldn't complete measurement for this fiber. + // Otherwise flamechart will be deep even for small updates. + + fiber._debugIsCurrentlyTiming = false; + clearFiberMark(fiber, null); + } + } + function stopWorkTimer(fiber) { + if (enableUserTimingAPI) { + if (!supportsUserTiming || shouldIgnoreFiber(fiber)) { + return; + } // If we pause, its parent is the fiber to unwind from. + + currentFiber = fiber.return; + + if (!fiber._debugIsCurrentlyTiming) { + return; + } + + fiber._debugIsCurrentlyTiming = false; + endFiberMark(fiber, null, null); + } + } + function stopFailedWorkTimer(fiber) { + if (enableUserTimingAPI) { + if (!supportsUserTiming || shouldIgnoreFiber(fiber)) { + return; + } // If we pause, its parent is the fiber to unwind from. + + currentFiber = fiber.return; + + if (!fiber._debugIsCurrentlyTiming) { + return; + } + + fiber._debugIsCurrentlyTiming = false; + var warning = + fiber.tag === SuspenseComponent + ? 'Rendering was suspended' + : 'An error was thrown inside this error boundary'; + endFiberMark(fiber, null, warning); + } + } + function startPhaseTimer(fiber, phase) { + if (enableUserTimingAPI) { + if (!supportsUserTiming) { + return; + } + + clearPendingPhaseMeasurement(); + + if (!beginFiberMark(fiber, phase)) { + return; + } + + currentPhaseFiber = fiber; + currentPhase = phase; + } + } + function stopPhaseTimer() { + if (enableUserTimingAPI) { + if (!supportsUserTiming) { + return; + } + + if (currentPhase !== null && currentPhaseFiber !== null) { + var warning = hasScheduledUpdateInCurrentPhase ? 'Scheduled a cascading update' : null; + endFiberMark(currentPhaseFiber, currentPhase, warning); + } + + currentPhase = null; + currentPhaseFiber = null; + } + } + function startWorkLoopTimer(nextUnitOfWork) { + if (enableUserTimingAPI) { + currentFiber = nextUnitOfWork; + + if (!supportsUserTiming) { + return; + } + + commitCountInCurrentWorkLoop = 0; // This is top level call. + // Any other measurements are performed within. + + beginMark('(React Tree Reconciliation)'); // Resume any measurements that were in progress during the last loop. + + resumeTimers(); + } + } + function stopWorkLoopTimer(interruptedBy, didCompleteRoot) { + if (enableUserTimingAPI) { + if (!supportsUserTiming) { + return; + } + + var warning = null; + + if (interruptedBy !== null) { + if (interruptedBy.tag === HostRoot) { + warning = 'A top-level update interrupted the previous render'; + } else { + var componentName = getComponentName(interruptedBy.type) || 'Unknown'; + warning = 'An update to ' + componentName + ' interrupted the previous render'; + } + } else if (commitCountInCurrentWorkLoop > 1) { + warning = 'There were cascading updates'; + } + + commitCountInCurrentWorkLoop = 0; + var label = didCompleteRoot + ? '(React Tree Reconciliation: Completed Root)' + : '(React Tree Reconciliation: Yielded)'; // Pause any measurements until the next loop. + + pauseTimers(); + endMark(label, '(React Tree Reconciliation)', warning); + } + } + function startCommitTimer() { + if (enableUserTimingAPI) { + if (!supportsUserTiming) { + return; + } + + isCommitting = true; + hasScheduledUpdateInCurrentCommit = false; + labelsInCurrentCommit.clear(); + beginMark('(Committing Changes)'); + } + } + function stopCommitTimer() { + if (enableUserTimingAPI) { + if (!supportsUserTiming) { + return; + } + + var warning = null; + + if (hasScheduledUpdateInCurrentCommit) { + warning = 'Lifecycle hook scheduled a cascading update'; + } else if (commitCountInCurrentWorkLoop > 0) { + warning = 'Caused by a cascading update in earlier commit'; + } + + hasScheduledUpdateInCurrentCommit = false; + commitCountInCurrentWorkLoop++; + isCommitting = false; + labelsInCurrentCommit.clear(); + endMark('(Committing Changes)', '(Committing Changes)', warning); + } + } + function startCommitSnapshotEffectsTimer() { + if (enableUserTimingAPI) { + if (!supportsUserTiming) { + return; + } + + effectCountInCurrentCommit = 0; + beginMark('(Committing Snapshot Effects)'); + } + } + function stopCommitSnapshotEffectsTimer() { + if (enableUserTimingAPI) { + if (!supportsUserTiming) { + return; + } + + var count = effectCountInCurrentCommit; + effectCountInCurrentCommit = 0; + endMark( + '(Committing Snapshot Effects: ' + count + ' Total)', + '(Committing Snapshot Effects)', + null, + ); + } + } + function startCommitHostEffectsTimer() { + if (enableUserTimingAPI) { + if (!supportsUserTiming) { + return; + } + + effectCountInCurrentCommit = 0; + beginMark('(Committing Host Effects)'); + } + } + function stopCommitHostEffectsTimer() { + if (enableUserTimingAPI) { + if (!supportsUserTiming) { + return; + } + + var count = effectCountInCurrentCommit; + effectCountInCurrentCommit = 0; + endMark('(Committing Host Effects: ' + count + ' Total)', '(Committing Host Effects)', null); + } + } + function startCommitLifeCyclesTimer() { + if (enableUserTimingAPI) { + if (!supportsUserTiming) { + return; + } + + effectCountInCurrentCommit = 0; + beginMark('(Calling Lifecycle Methods)'); + } + } + function stopCommitLifeCyclesTimer() { + if (enableUserTimingAPI) { + if (!supportsUserTiming) { + return; + } + + var count = effectCountInCurrentCommit; + effectCountInCurrentCommit = 0; + endMark( + '(Calling Lifecycle Methods: ' + count + ' Total)', + '(Calling Lifecycle Methods)', + null, + ); + } + } + + var valueStack = []; + var fiberStack; + + { + fiberStack = []; + } + + var index = -1; + + function createCursor(defaultValue) { + return { + current: defaultValue, + }; + } + + function pop(cursor, fiber) { + if (index < 0) { + { + warningWithoutStack$1(false, 'Unexpected pop.'); + } + + return; + } + + { + if (fiber !== fiberStack[index]) { + warningWithoutStack$1(false, 'Unexpected Fiber popped.'); + } + } + + cursor.current = valueStack[index]; + valueStack[index] = null; + + { + fiberStack[index] = null; + } + + index--; + } + + function push(cursor, value, fiber) { + index++; + valueStack[index] = cursor.current; + + { + fiberStack[index] = fiber; + } + + cursor.current = value; + } + + var warnedAboutMissingGetChildContext; + + { + warnedAboutMissingGetChildContext = {}; + } + + var emptyContextObject = {}; + + { + Object.freeze(emptyContextObject); + } // A cursor to the current merged context object on the stack. + + var contextStackCursor = createCursor(emptyContextObject); // A cursor to a boolean indicating whether the context has changed. + + var didPerformWorkStackCursor = createCursor(false); // Keep track of the previous context object that was on the stack. + // We use this to get access to the parent context after we have already + // pushed the next context provider, and now need to merge their contexts. + + var previousContext = emptyContextObject; + + function getUnmaskedContext(workInProgress, Component, didPushOwnContextIfProvider) { + if (disableLegacyContext) { + return emptyContextObject; + } else { + if (didPushOwnContextIfProvider && isContextProvider(Component)) { + // If the fiber is a context provider itself, when we read its context + // we may have already pushed its own child context on the stack. A context + // provider should not "see" its own child context. Therefore we read the + // previous (parent) context instead for a context provider. + return previousContext; + } + + return contextStackCursor.current; + } + } + + function cacheContext(workInProgress, unmaskedContext, maskedContext) { + if (disableLegacyContext) { + return; + } else { + var instance = workInProgress.stateNode; + instance.__reactInternalMemoizedUnmaskedChildContext = unmaskedContext; + instance.__reactInternalMemoizedMaskedChildContext = maskedContext; + } + } + + function getMaskedContext(workInProgress, unmaskedContext) { + if (disableLegacyContext) { + return emptyContextObject; + } else { + var type = workInProgress.type; + var contextTypes = type.contextTypes; + + if (!contextTypes) { + return emptyContextObject; + } // Avoid recreating masked context unless unmasked context has changed. + // Failing to do this will result in unnecessary calls to componentWillReceiveProps. + // This may trigger infinite loops if componentWillReceiveProps calls setState. + + var instance = workInProgress.stateNode; + + if (instance && instance.__reactInternalMemoizedUnmaskedChildContext === unmaskedContext) { + return instance.__reactInternalMemoizedMaskedChildContext; + } + + var context = {}; + + for (var key in contextTypes) { + context[key] = unmaskedContext[key]; + } + + { + var name = getComponentName(type) || 'Unknown'; + checkPropTypes(contextTypes, context, 'context', name, getCurrentFiberStackInDev); + } // Cache unmasked context so we can avoid recreating masked context unless necessary. + // Context is created before the class component is instantiated so check for instance. + + if (instance) { + cacheContext(workInProgress, unmaskedContext, context); + } + + return context; + } + } + + function hasContextChanged() { + if (disableLegacyContext) { + return false; + } else { + return didPerformWorkStackCursor.current; + } + } + + function isContextProvider(type) { + if (disableLegacyContext) { + return false; + } else { + var childContextTypes = type.childContextTypes; + return childContextTypes !== null && childContextTypes !== undefined; + } + } + + function popContext(fiber) { + if (disableLegacyContext) { + return; + } else { + pop(didPerformWorkStackCursor, fiber); + pop(contextStackCursor, fiber); + } + } + + function popTopLevelContextObject(fiber) { + if (disableLegacyContext) { + return; + } else { + pop(didPerformWorkStackCursor, fiber); + pop(contextStackCursor, fiber); + } + } + + function pushTopLevelContextObject(fiber, context, didChange) { + if (disableLegacyContext) { + return; + } else { + if (!(contextStackCursor.current === emptyContextObject)) { + { + throw Error( + 'Unexpected context found on stack. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + + push(contextStackCursor, context, fiber); + push(didPerformWorkStackCursor, didChange, fiber); + } + } + + function processChildContext(fiber, type, parentContext) { + if (disableLegacyContext) { + return parentContext; + } else { + var instance = fiber.stateNode; + var childContextTypes = type.childContextTypes; // TODO (bvaughn) Replace this behavior with an invariant() in the future. + // It has only been added in Fiber to match the (unintentional) behavior in Stack. + + if (typeof instance.getChildContext !== 'function') { + { + var componentName = getComponentName(type) || 'Unknown'; + + if (!warnedAboutMissingGetChildContext[componentName]) { + warnedAboutMissingGetChildContext[componentName] = true; + warningWithoutStack$1( + false, + '%s.childContextTypes is specified but there is no getChildContext() method ' + + 'on the instance. You can either define getChildContext() on %s or remove ' + + 'childContextTypes from it.', + componentName, + componentName, + ); + } + } + + return parentContext; + } + + var childContext; + + { + setCurrentPhase('getChildContext'); + } + + startPhaseTimer(fiber, 'getChildContext'); + childContext = instance.getChildContext(); + stopPhaseTimer(); + + { + setCurrentPhase(null); + } + + for (var contextKey in childContext) { + if (!(contextKey in childContextTypes)) { + { + throw Error( + (getComponentName(type) || 'Unknown') + + '.getChildContext(): key "' + + contextKey + + '" is not defined in childContextTypes.', + ); + } + } + } + + { + var name = getComponentName(type) || 'Unknown'; + checkPropTypes( + childContextTypes, + childContext, + 'child context', + name, // In practice, there is one case in which we won't get a stack. It's when + // somebody calls unstable_renderSubtreeIntoContainer() and we process + // context from the parent component instance. The stack will be missing + // because it's outside of the reconciliation, and so the pointer has not + // been set. This is rare and doesn't matter. We'll also remove that API. + getCurrentFiberStackInDev, + ); + } + + return _assign({}, parentContext, {}, childContext); + } + } + + function pushContextProvider(workInProgress) { + if (disableLegacyContext) { + return false; + } else { + var instance = workInProgress.stateNode; // We push the context as early as possible to ensure stack integrity. + // If the instance does not exist yet, we will push null at first, + // and replace it on the stack later when invalidating the context. + + var memoizedMergedChildContext = + (instance && instance.__reactInternalMemoizedMergedChildContext) || emptyContextObject; // Remember the parent context so we can merge with it later. + // Inherit the parent's did-perform-work value to avoid inadvertently blocking updates. + + previousContext = contextStackCursor.current; + push(contextStackCursor, memoizedMergedChildContext, workInProgress); + push(didPerformWorkStackCursor, didPerformWorkStackCursor.current, workInProgress); + return true; + } + } + + function invalidateContextProvider(workInProgress, type, didChange) { + if (disableLegacyContext) { + return; + } else { + var instance = workInProgress.stateNode; + + if (!instance) { + { + throw Error( + 'Expected to have an instance by this point. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + + if (didChange) { + // Merge parent and own context. + // Skip this if we're not updating due to sCU. + // This avoids unnecessarily recomputing memoized values. + var mergedContext = processChildContext(workInProgress, type, previousContext); + instance.__reactInternalMemoizedMergedChildContext = mergedContext; // Replace the old (or empty) context with the new one. + // It is important to unwind the context in the reverse order. + + pop(didPerformWorkStackCursor, workInProgress); + pop(contextStackCursor, workInProgress); // Now push the new context and mark that it has changed. + + push(contextStackCursor, mergedContext, workInProgress); + push(didPerformWorkStackCursor, didChange, workInProgress); + } else { + pop(didPerformWorkStackCursor, workInProgress); + push(didPerformWorkStackCursor, didChange, workInProgress); + } + } + } + + function findCurrentUnmaskedContext(fiber) { + if (disableLegacyContext) { + return emptyContextObject; + } else { + // Currently this is only used with renderSubtreeIntoContainer; not sure if it + // makes sense elsewhere + if (!(isFiberMounted(fiber) && fiber.tag === ClassComponent)) { + { + throw Error( + 'Expected subtree parent to be a mounted class component. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + + var node = fiber; + + do { + switch (node.tag) { + case HostRoot: + return node.stateNode.context; + + case ClassComponent: { + var Component = node.type; + + if (isContextProvider(Component)) { + return node.stateNode.__reactInternalMemoizedMergedChildContext; + } + + break; + } + } + + node = node.return; + } while (node !== null); + + { + { + throw Error( + 'Found unexpected detached subtree parent. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + } + } + + var LegacyRoot = 0; + var BlockingRoot = 1; + var ConcurrentRoot = 2; + + // Intentionally not named imports because Rollup would use dynamic dispatch for + // CommonJS interop named imports. + var Scheduler_runWithPriority = Scheduler.unstable_runWithPriority; + var Scheduler_scheduleCallback = Scheduler.unstable_scheduleCallback; + var Scheduler_cancelCallback = Scheduler.unstable_cancelCallback; + var Scheduler_shouldYield = Scheduler.unstable_shouldYield; + var Scheduler_requestPaint = Scheduler.unstable_requestPaint; + var Scheduler_now = Scheduler.unstable_now; + var Scheduler_getCurrentPriorityLevel = Scheduler.unstable_getCurrentPriorityLevel; + var Scheduler_ImmediatePriority = Scheduler.unstable_ImmediatePriority; + var Scheduler_UserBlockingPriority = Scheduler.unstable_UserBlockingPriority; + var Scheduler_NormalPriority = Scheduler.unstable_NormalPriority; + var Scheduler_LowPriority = Scheduler.unstable_LowPriority; + var Scheduler_IdlePriority = Scheduler.unstable_IdlePriority; + + if (enableSchedulerTracing) { + // Provide explicit error message when production+profiling bundle of e.g. + // react-dom is used with production (non-profiling) bundle of + // scheduler/tracing + if (!(tracing.__interactionsRef != null && tracing.__interactionsRef.current != null)) { + { + throw Error( + 'It is not supported to run the profiling version of a renderer (for example, `react-dom/profiling`) without also replacing the `scheduler/tracing` module with `scheduler/tracing-profiling`. Your bundler might have a setting for aliasing both modules. Learn more at http://fb.me/react-profiling', + ); + } + } + } + + var fakeCallbackNode = {}; // Except for NoPriority, these correspond to Scheduler priorities. We use + // ascending numbers so we can compare them like numbers. They start at 90 to + // avoid clashing with Scheduler's priorities. + + var ImmediatePriority = 99; + var UserBlockingPriority$2 = 98; + var NormalPriority = 97; + var LowPriority = 96; + var IdlePriority = 95; // NoPriority is the absence of priority. Also React-only. + + var NoPriority = 90; + var shouldYield = Scheduler_shouldYield; + var requestPaint = Scheduler_requestPaint !== undefined ? Scheduler_requestPaint : function () {}; // Fall back gracefully if we're running an older version of Scheduler. + var syncQueue = null; + var immediateQueueCallbackNode = null; + var isFlushingSyncQueue = false; + var initialTimeMs = Scheduler_now(); // If the initial timestamp is reasonably small, use Scheduler's `now` directly. + // This will be the case for modern browsers that support `performance.now`. In + // older browsers, Scheduler falls back to `Date.now`, which returns a Unix + // timestamp. In that case, subtract the module initialization time to simulate + // the behavior of performance.now and keep our times small enough to fit + // within 32 bits. + // TODO: Consider lifting this into Scheduler. + + var now = + initialTimeMs < 10000 + ? Scheduler_now + : function () { + return Scheduler_now() - initialTimeMs; + }; + function getCurrentPriorityLevel() { + switch (Scheduler_getCurrentPriorityLevel()) { + case Scheduler_ImmediatePriority: + return ImmediatePriority; + + case Scheduler_UserBlockingPriority: + return UserBlockingPriority$2; + + case Scheduler_NormalPriority: + return NormalPriority; + + case Scheduler_LowPriority: + return LowPriority; + + case Scheduler_IdlePriority: + return IdlePriority; + + default: { + { + throw Error('Unknown priority level.'); + } + } + } + } + + function reactPriorityToSchedulerPriority(reactPriorityLevel) { + switch (reactPriorityLevel) { + case ImmediatePriority: + return Scheduler_ImmediatePriority; + + case UserBlockingPriority$2: + return Scheduler_UserBlockingPriority; + + case NormalPriority: + return Scheduler_NormalPriority; + + case LowPriority: + return Scheduler_LowPriority; + + case IdlePriority: + return Scheduler_IdlePriority; + + default: { + { + throw Error('Unknown priority level.'); + } + } + } + } + + function runWithPriority$2(reactPriorityLevel, fn) { + var priorityLevel = reactPriorityToSchedulerPriority(reactPriorityLevel); + return Scheduler_runWithPriority(priorityLevel, fn); + } + function scheduleCallback(reactPriorityLevel, callback, options) { + var priorityLevel = reactPriorityToSchedulerPriority(reactPriorityLevel); + return Scheduler_scheduleCallback(priorityLevel, callback, options); + } + function scheduleSyncCallback(callback) { + // Push this callback into an internal queue. We'll flush these either in + // the next tick, or earlier if something calls `flushSyncCallbackQueue`. + if (syncQueue === null) { + syncQueue = [callback]; // Flush the queue in the next tick, at the earliest. + + immediateQueueCallbackNode = Scheduler_scheduleCallback( + Scheduler_ImmediatePriority, + flushSyncCallbackQueueImpl, + ); + } else { + // Push onto existing queue. Don't need to schedule a callback because + // we already scheduled one when we created the queue. + syncQueue.push(callback); + } + + return fakeCallbackNode; + } + function cancelCallback(callbackNode) { + if (callbackNode !== fakeCallbackNode) { + Scheduler_cancelCallback(callbackNode); + } + } + function flushSyncCallbackQueue() { + if (immediateQueueCallbackNode !== null) { + var node = immediateQueueCallbackNode; + immediateQueueCallbackNode = null; + Scheduler_cancelCallback(node); + } + + flushSyncCallbackQueueImpl(); + } + + function flushSyncCallbackQueueImpl() { + if (!isFlushingSyncQueue && syncQueue !== null) { + // Prevent re-entrancy. + isFlushingSyncQueue = true; + var i = 0; + + try { + var _isSync = true; + var queue = syncQueue; + runWithPriority$2(ImmediatePriority, function () { + for (; i < queue.length; i++) { + var callback = queue[i]; + + do { + callback = callback(_isSync); + } while (callback !== null); + } + }); + syncQueue = null; + } catch (error) { + // If something throws, leave the remaining callbacks on the queue. + if (syncQueue !== null) { + syncQueue = syncQueue.slice(i + 1); + } // Resume flushing in the next tick + + Scheduler_scheduleCallback(Scheduler_ImmediatePriority, flushSyncCallbackQueue); + throw error; + } finally { + isFlushingSyncQueue = false; + } + } + } + + var NoMode = 0; + var StrictMode = 1; // TODO: Remove BlockingMode and ConcurrentMode by reading from the root + // tag instead + + var BlockingMode = 2; + var ConcurrentMode = 4; + var ProfileMode = 8; + + // Max 31 bit integer. The max integer size in V8 for 32-bit systems. + // Math.pow(2, 30) - 1 + // 0b111111111111111111111111111111 + var MAX_SIGNED_31_BIT_INT = 1073741823; + + var NoWork = 0; // TODO: Think of a better name for Never. The key difference with Idle is that + // Never work can be committed in an inconsistent state without tearing the UI. + // The main example is offscreen content, like a hidden subtree. So one possible + // name is Offscreen. However, it also includes dehydrated Suspense boundaries, + // which are inconsistent in the sense that they haven't finished yet, but + // aren't visibly inconsistent because the server rendered HTML matches what the + // hydrated tree would look like. + + var Never = 1; // Idle is slightly higher priority than Never. It must completely finish in + // order to be consistent. + + var Idle = 2; // Continuous Hydration is a moving priority. It is slightly higher than Idle + // and is used to increase priority of hover targets. It is increasing with + // each usage so that last always wins. + + var ContinuousHydration = 3; + var Sync = MAX_SIGNED_31_BIT_INT; + var Batched = Sync - 1; + var UNIT_SIZE = 10; + var MAGIC_NUMBER_OFFSET = Batched - 1; // 1 unit of expiration time represents 10ms. + + function msToExpirationTime(ms) { + // Always add an offset so that we don't clash with the magic number for NoWork. + return MAGIC_NUMBER_OFFSET - ((ms / UNIT_SIZE) | 0); + } + function expirationTimeToMs(expirationTime) { + return (MAGIC_NUMBER_OFFSET - expirationTime) * UNIT_SIZE; + } + + function ceiling(num, precision) { + return (((num / precision) | 0) + 1) * precision; + } + + function computeExpirationBucket(currentTime, expirationInMs, bucketSizeMs) { + return ( + MAGIC_NUMBER_OFFSET - + ceiling( + MAGIC_NUMBER_OFFSET - currentTime + expirationInMs / UNIT_SIZE, + bucketSizeMs / UNIT_SIZE, + ) + ); + } // TODO: This corresponds to Scheduler's NormalPriority, not LowPriority. Update + // the names to reflect. + + var LOW_PRIORITY_EXPIRATION = 5000; + var LOW_PRIORITY_BATCH_SIZE = 250; + function computeAsyncExpiration(currentTime) { + return computeExpirationBucket(currentTime, LOW_PRIORITY_EXPIRATION, LOW_PRIORITY_BATCH_SIZE); + } + function computeSuspenseExpiration(currentTime, timeoutMs) { + // TODO: Should we warn if timeoutMs is lower than the normal pri expiration time? + return computeExpirationBucket(currentTime, timeoutMs, LOW_PRIORITY_BATCH_SIZE); + } // We intentionally set a higher expiration time for interactive updates in + // dev than in production. + // + // If the main thread is being blocked so long that you hit the expiration, + // it's a problem that could be solved with better scheduling. + // + // People will be more likely to notice this and fix it with the long + // expiration time in development. + // + // In production we opt for better UX at the risk of masking scheduling + // problems, by expiring fast. + + var HIGH_PRIORITY_EXPIRATION = 500; + var HIGH_PRIORITY_BATCH_SIZE = 100; + function computeInteractiveExpiration(currentTime) { + return computeExpirationBucket(currentTime, HIGH_PRIORITY_EXPIRATION, HIGH_PRIORITY_BATCH_SIZE); + } + function computeContinuousHydrationExpiration(currentTime) { + // Each time we ask for a new one of these we increase the priority. + // This ensures that the last one always wins since we can't deprioritize + // once we've scheduled work already. + return ContinuousHydration++; + } + function inferPriorityFromExpirationTime(currentTime, expirationTime) { + if (expirationTime === Sync) { + return ImmediatePriority; + } + + if (expirationTime === Never || expirationTime === Idle) { + return IdlePriority; + } + + var msUntil = expirationTimeToMs(expirationTime) - expirationTimeToMs(currentTime); + + if (msUntil <= 0) { + return ImmediatePriority; + } + + if (msUntil <= HIGH_PRIORITY_EXPIRATION + HIGH_PRIORITY_BATCH_SIZE) { + return UserBlockingPriority$2; + } + + if (msUntil <= LOW_PRIORITY_EXPIRATION + LOW_PRIORITY_BATCH_SIZE) { + return NormalPriority; + } // TODO: Handle LowPriority + // Assume anything lower has idle priority + + return IdlePriority; + } + + /** + * Forked from fbjs/warning: + * https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js + * + * Only change is we use console.warn instead of console.error, + * and do nothing when 'console' is not supported. + * This really simplifies the code. + * --- + * Similar to invariant but only logs a warning if the condition is not met. + * This can be used to log issues in development environments in critical + * paths. Removing the logging code for production environments will keep the + * same logic and follow the same code paths. + */ + var lowPriorityWarningWithoutStack = function () {}; + + { + var printWarning = function (format) { + for ( + var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; + _key < _len; + _key++ + ) { + args[_key - 1] = arguments[_key]; + } + + var argIndex = 0; + var message = + 'Warning: ' + + format.replace(/%s/g, function () { + return args[argIndex++]; + }); + + if (typeof console !== 'undefined') { + console.warn(message); + } + + try { + // --- Welcome to debugging React --- + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + throw new Error(message); + } catch (x) {} + }; + + lowPriorityWarningWithoutStack = function (condition, format) { + if (format === undefined) { + throw new Error( + '`lowPriorityWarningWithoutStack(condition, format, ...args)` requires a warning ' + + 'message argument', + ); + } + + if (!condition) { + for ( + var _len2 = arguments.length, args = new Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; + _key2 < _len2; + _key2++ + ) { + args[_key2 - 2] = arguments[_key2]; + } + + printWarning.apply(void 0, [format].concat(args)); + } + }; + } + + var lowPriorityWarningWithoutStack$1 = lowPriorityWarningWithoutStack; + + var ReactStrictModeWarnings = { + recordUnsafeLifecycleWarnings: function (fiber, instance) {}, + flushPendingUnsafeLifecycleWarnings: function () {}, + recordLegacyContextWarning: function (fiber, instance) {}, + flushLegacyContextWarning: function () {}, + discardPendingWarnings: function () {}, + }; + + { + var findStrictRoot = function (fiber) { + var maybeStrictRoot = null; + var node = fiber; + + while (node !== null) { + if (node.mode & StrictMode) { + maybeStrictRoot = node; + } + + node = node.return; + } + + return maybeStrictRoot; + }; + + var setToSortedString = function (set) { + var array = []; + set.forEach(function (value) { + array.push(value); + }); + return array.sort().join(', '); + }; + + var pendingComponentWillMountWarnings = []; + var pendingUNSAFE_ComponentWillMountWarnings = []; + var pendingComponentWillReceivePropsWarnings = []; + var pendingUNSAFE_ComponentWillReceivePropsWarnings = []; + var pendingComponentWillUpdateWarnings = []; + var pendingUNSAFE_ComponentWillUpdateWarnings = []; // Tracks components we have already warned about. + + var didWarnAboutUnsafeLifecycles = new Set(); + + ReactStrictModeWarnings.recordUnsafeLifecycleWarnings = function (fiber, instance) { + // Dedup strategy: Warn once per component. + if (didWarnAboutUnsafeLifecycles.has(fiber.type)) { + return; + } + + if ( + typeof instance.componentWillMount === 'function' && // Don't warn about react-lifecycles-compat polyfilled components. + instance.componentWillMount.__suppressDeprecationWarning !== true + ) { + pendingComponentWillMountWarnings.push(fiber); + } + + if (fiber.mode & StrictMode && typeof instance.UNSAFE_componentWillMount === 'function') { + pendingUNSAFE_ComponentWillMountWarnings.push(fiber); + } + + if ( + typeof instance.componentWillReceiveProps === 'function' && + instance.componentWillReceiveProps.__suppressDeprecationWarning !== true + ) { + pendingComponentWillReceivePropsWarnings.push(fiber); + } + + if ( + fiber.mode & StrictMode && + typeof instance.UNSAFE_componentWillReceiveProps === 'function' + ) { + pendingUNSAFE_ComponentWillReceivePropsWarnings.push(fiber); + } + + if ( + typeof instance.componentWillUpdate === 'function' && + instance.componentWillUpdate.__suppressDeprecationWarning !== true + ) { + pendingComponentWillUpdateWarnings.push(fiber); + } + + if (fiber.mode & StrictMode && typeof instance.UNSAFE_componentWillUpdate === 'function') { + pendingUNSAFE_ComponentWillUpdateWarnings.push(fiber); + } + }; + + ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings = function () { + // We do an initial pass to gather component names + var componentWillMountUniqueNames = new Set(); + + if (pendingComponentWillMountWarnings.length > 0) { + pendingComponentWillMountWarnings.forEach(function (fiber) { + componentWillMountUniqueNames.add(getComponentName(fiber.type) || 'Component'); + didWarnAboutUnsafeLifecycles.add(fiber.type); + }); + pendingComponentWillMountWarnings = []; + } + + var UNSAFE_componentWillMountUniqueNames = new Set(); + + if (pendingUNSAFE_ComponentWillMountWarnings.length > 0) { + pendingUNSAFE_ComponentWillMountWarnings.forEach(function (fiber) { + UNSAFE_componentWillMountUniqueNames.add(getComponentName(fiber.type) || 'Component'); + didWarnAboutUnsafeLifecycles.add(fiber.type); + }); + pendingUNSAFE_ComponentWillMountWarnings = []; + } + + var componentWillReceivePropsUniqueNames = new Set(); + + if (pendingComponentWillReceivePropsWarnings.length > 0) { + pendingComponentWillReceivePropsWarnings.forEach(function (fiber) { + componentWillReceivePropsUniqueNames.add(getComponentName(fiber.type) || 'Component'); + didWarnAboutUnsafeLifecycles.add(fiber.type); + }); + pendingComponentWillReceivePropsWarnings = []; + } + + var UNSAFE_componentWillReceivePropsUniqueNames = new Set(); + + if (pendingUNSAFE_ComponentWillReceivePropsWarnings.length > 0) { + pendingUNSAFE_ComponentWillReceivePropsWarnings.forEach(function (fiber) { + UNSAFE_componentWillReceivePropsUniqueNames.add( + getComponentName(fiber.type) || 'Component', + ); + didWarnAboutUnsafeLifecycles.add(fiber.type); + }); + pendingUNSAFE_ComponentWillReceivePropsWarnings = []; + } + + var componentWillUpdateUniqueNames = new Set(); + + if (pendingComponentWillUpdateWarnings.length > 0) { + pendingComponentWillUpdateWarnings.forEach(function (fiber) { + componentWillUpdateUniqueNames.add(getComponentName(fiber.type) || 'Component'); + didWarnAboutUnsafeLifecycles.add(fiber.type); + }); + pendingComponentWillUpdateWarnings = []; + } + + var UNSAFE_componentWillUpdateUniqueNames = new Set(); + + if (pendingUNSAFE_ComponentWillUpdateWarnings.length > 0) { + pendingUNSAFE_ComponentWillUpdateWarnings.forEach(function (fiber) { + UNSAFE_componentWillUpdateUniqueNames.add(getComponentName(fiber.type) || 'Component'); + didWarnAboutUnsafeLifecycles.add(fiber.type); + }); + pendingUNSAFE_ComponentWillUpdateWarnings = []; + } // Finally, we flush all the warnings + // UNSAFE_ ones before the deprecated ones, since they'll be 'louder' + + if (UNSAFE_componentWillMountUniqueNames.size > 0) { + var sortedNames = setToSortedString(UNSAFE_componentWillMountUniqueNames); + warningWithoutStack$1( + false, + 'Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. ' + + 'See https://fb.me/react-unsafe-component-lifecycles for details.\n\n' + + '* Move code with side effects to componentDidMount, and set initial state in the constructor.\n' + + '\nPlease update the following components: %s', + sortedNames, + ); + } + + if (UNSAFE_componentWillReceivePropsUniqueNames.size > 0) { + var _sortedNames = setToSortedString(UNSAFE_componentWillReceivePropsUniqueNames); + + warningWithoutStack$1( + false, + 'Using UNSAFE_componentWillReceiveProps in strict mode is not recommended ' + + 'and may indicate bugs in your code. ' + + 'See https://fb.me/react-unsafe-component-lifecycles for details.\n\n' + + '* Move data fetching code or side effects to componentDidUpdate.\n' + + "* If you're updating state whenever props change, " + + 'refactor your code to use memoization techniques or move it to ' + + 'static getDerivedStateFromProps. Learn more at: https://fb.me/react-derived-state\n' + + '\nPlease update the following components: %s', + _sortedNames, + ); + } + + if (UNSAFE_componentWillUpdateUniqueNames.size > 0) { + var _sortedNames2 = setToSortedString(UNSAFE_componentWillUpdateUniqueNames); + + warningWithoutStack$1( + false, + 'Using UNSAFE_componentWillUpdate in strict mode is not recommended ' + + 'and may indicate bugs in your code. ' + + 'See https://fb.me/react-unsafe-component-lifecycles for details.\n\n' + + '* Move data fetching code or side effects to componentDidUpdate.\n' + + '\nPlease update the following components: %s', + _sortedNames2, + ); + } + + if (componentWillMountUniqueNames.size > 0) { + var _sortedNames3 = setToSortedString(componentWillMountUniqueNames); + + lowPriorityWarningWithoutStack$1( + false, + 'componentWillMount has been renamed, and is not recommended for use. ' + + 'See https://fb.me/react-unsafe-component-lifecycles for details.\n\n' + + '* Move code with side effects to componentDidMount, and set initial state in the constructor.\n' + + '* Rename componentWillMount to UNSAFE_componentWillMount to suppress ' + + 'this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. ' + + 'To rename all deprecated lifecycles to their new names, you can run ' + + '`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n' + + '\nPlease update the following components: %s', + _sortedNames3, + ); + } + + if (componentWillReceivePropsUniqueNames.size > 0) { + var _sortedNames4 = setToSortedString(componentWillReceivePropsUniqueNames); + + lowPriorityWarningWithoutStack$1( + false, + 'componentWillReceiveProps has been renamed, and is not recommended for use. ' + + 'See https://fb.me/react-unsafe-component-lifecycles for details.\n\n' + + '* Move data fetching code or side effects to componentDidUpdate.\n' + + "* If you're updating state whenever props change, refactor your " + + 'code to use memoization techniques or move it to ' + + 'static getDerivedStateFromProps. Learn more at: https://fb.me/react-derived-state\n' + + '* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress ' + + 'this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. ' + + 'To rename all deprecated lifecycles to their new names, you can run ' + + '`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n' + + '\nPlease update the following components: %s', + _sortedNames4, + ); + } + + if (componentWillUpdateUniqueNames.size > 0) { + var _sortedNames5 = setToSortedString(componentWillUpdateUniqueNames); + + lowPriorityWarningWithoutStack$1( + false, + 'componentWillUpdate has been renamed, and is not recommended for use. ' + + 'See https://fb.me/react-unsafe-component-lifecycles for details.\n\n' + + '* Move data fetching code or side effects to componentDidUpdate.\n' + + '* Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress ' + + 'this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. ' + + 'To rename all deprecated lifecycles to their new names, you can run ' + + '`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n' + + '\nPlease update the following components: %s', + _sortedNames5, + ); + } + }; + + var pendingLegacyContextWarning = new Map(); // Tracks components we have already warned about. + + var didWarnAboutLegacyContext = new Set(); + + ReactStrictModeWarnings.recordLegacyContextWarning = function (fiber, instance) { + var strictRoot = findStrictRoot(fiber); + + if (strictRoot === null) { + warningWithoutStack$1( + false, + 'Expected to find a StrictMode component in a strict mode tree. ' + + 'This error is likely caused by a bug in React. Please file an issue.', + ); + return; + } // Dedup strategy: Warn once per component. + + if (didWarnAboutLegacyContext.has(fiber.type)) { + return; + } + + var warningsForRoot = pendingLegacyContextWarning.get(strictRoot); + + if ( + fiber.type.contextTypes != null || + fiber.type.childContextTypes != null || + (instance !== null && typeof instance.getChildContext === 'function') + ) { + if (warningsForRoot === undefined) { + warningsForRoot = []; + pendingLegacyContextWarning.set(strictRoot, warningsForRoot); + } + + warningsForRoot.push(fiber); + } + }; + + ReactStrictModeWarnings.flushLegacyContextWarning = function () { + pendingLegacyContextWarning.forEach(function (fiberArray, strictRoot) { + var uniqueNames = new Set(); + fiberArray.forEach(function (fiber) { + uniqueNames.add(getComponentName(fiber.type) || 'Component'); + didWarnAboutLegacyContext.add(fiber.type); + }); + var sortedNames = setToSortedString(uniqueNames); + var strictRootComponentStack = getStackByFiberInDevAndProd(strictRoot); + warningWithoutStack$1( + false, + 'Legacy context API has been detected within a strict-mode tree.' + + '\n\nThe old API will be supported in all 16.x releases, but applications ' + + 'using it should migrate to the new version.' + + '\n\nPlease update the following components: %s' + + '\n\nLearn more about this warning here: https://fb.me/react-legacy-context' + + '%s', + sortedNames, + strictRootComponentStack, + ); + }); + }; + + ReactStrictModeWarnings.discardPendingWarnings = function () { + pendingComponentWillMountWarnings = []; + pendingUNSAFE_ComponentWillMountWarnings = []; + pendingComponentWillReceivePropsWarnings = []; + pendingUNSAFE_ComponentWillReceivePropsWarnings = []; + pendingComponentWillUpdateWarnings = []; + pendingUNSAFE_ComponentWillUpdateWarnings = []; + pendingLegacyContextWarning = new Map(); + }; + } + + var resolveFamily = null; // $FlowFixMe Flow gets confused by a WeakSet feature check below. + + var failedBoundaries = null; + var setRefreshHandler = function (handler) { + { + resolveFamily = handler; + } + }; + function resolveFunctionForHotReloading(type) { + { + if (resolveFamily === null) { + // Hot reloading is disabled. + return type; + } + + var family = resolveFamily(type); + + if (family === undefined) { + return type; + } // Use the latest known implementation. + + return family.current; + } + } + function resolveClassForHotReloading(type) { + // No implementation differences. + return resolveFunctionForHotReloading(type); + } + function resolveForwardRefForHotReloading(type) { + { + if (resolveFamily === null) { + // Hot reloading is disabled. + return type; + } + + var family = resolveFamily(type); + + if (family === undefined) { + // Check if we're dealing with a real forwardRef. Don't want to crash early. + if (type !== null && type !== undefined && typeof type.render === 'function') { + // ForwardRef is special because its resolved .type is an object, + // but it's possible that we only have its inner render function in the map. + // If that inner render function is different, we'll build a new forwardRef type. + var currentRender = resolveFunctionForHotReloading(type.render); + + if (type.render !== currentRender) { + var syntheticType = { + $$typeof: REACT_FORWARD_REF_TYPE, + render: currentRender, + }; + + if (type.displayName !== undefined) { + syntheticType.displayName = type.displayName; + } + + return syntheticType; + } + } + + return type; + } // Use the latest known implementation. + + return family.current; + } + } + function isCompatibleFamilyForHotReloading(fiber, element) { + { + if (resolveFamily === null) { + // Hot reloading is disabled. + return false; + } + + var prevType = fiber.elementType; + var nextType = element.type; // If we got here, we know types aren't === equal. + + var needsCompareFamilies = false; + var $$typeofNextType = + typeof nextType === 'object' && nextType !== null ? nextType.$$typeof : null; + + switch (fiber.tag) { + case ClassComponent: { + if (typeof nextType === 'function') { + needsCompareFamilies = true; + } + + break; + } + + case FunctionComponent: { + if (typeof nextType === 'function') { + needsCompareFamilies = true; + } else if ($$typeofNextType === REACT_LAZY_TYPE) { + // We don't know the inner type yet. + // We're going to assume that the lazy inner type is stable, + // and so it is sufficient to avoid reconciling it away. + // We're not going to unwrap or actually use the new lazy type. + needsCompareFamilies = true; + } + + break; + } + + case ForwardRef: { + if ($$typeofNextType === REACT_FORWARD_REF_TYPE) { + needsCompareFamilies = true; + } else if ($$typeofNextType === REACT_LAZY_TYPE) { + needsCompareFamilies = true; + } + + break; + } + + case MemoComponent: + case SimpleMemoComponent: { + if ($$typeofNextType === REACT_MEMO_TYPE) { + // TODO: if it was but can no longer be simple, + // we shouldn't set this. + needsCompareFamilies = true; + } else if ($$typeofNextType === REACT_LAZY_TYPE) { + needsCompareFamilies = true; + } + + break; + } + + default: + return false; + } // Check if both types have a family and it's the same one. + + if (needsCompareFamilies) { + // Note: memo() and forwardRef() we'll compare outer rather than inner type. + // This means both of them need to be registered to preserve state. + // If we unwrapped and compared the inner types for wrappers instead, + // then we would risk falsely saying two separate memo(Foo) + // calls are equivalent because they wrap the same Foo function. + var prevFamily = resolveFamily(prevType); + + if (prevFamily !== undefined && prevFamily === resolveFamily(nextType)) { + return true; + } + } + + return false; + } + } + function markFailedErrorBoundaryForHotReloading(fiber) { + { + if (resolveFamily === null) { + // Hot reloading is disabled. + return; + } + + if (typeof WeakSet !== 'function') { + return; + } + + if (failedBoundaries === null) { + failedBoundaries = new WeakSet(); + } + + failedBoundaries.add(fiber); + } + } + var scheduleRefresh = function (root, update) { + { + if (resolveFamily === null) { + // Hot reloading is disabled. + return; + } + + var staleFamilies = update.staleFamilies, + updatedFamilies = update.updatedFamilies; + flushPassiveEffects(); + flushSync(function () { + scheduleFibersWithFamiliesRecursively(root.current, updatedFamilies, staleFamilies); + }); + } + }; + var scheduleRoot = function (root, element) { + { + if (root.context !== emptyContextObject) { + // Super edge case: root has a legacy _renderSubtree context + // but we don't know the parentComponent so we can't pass it. + // Just ignore. We'll delete this with _renderSubtree code path later. + return; + } + + flushPassiveEffects(); + syncUpdates(function () { + updateContainer(element, root, null, null); + }); + } + }; + + function scheduleFibersWithFamiliesRecursively(fiber, updatedFamilies, staleFamilies) { + { + var alternate = fiber.alternate, + child = fiber.child, + sibling = fiber.sibling, + tag = fiber.tag, + type = fiber.type; + var candidateType = null; + + switch (tag) { + case FunctionComponent: + case SimpleMemoComponent: + case ClassComponent: + candidateType = type; + break; + + case ForwardRef: + candidateType = type.render; + break; + + default: + break; + } + + if (resolveFamily === null) { + throw new Error('Expected resolveFamily to be set during hot reload.'); + } + + var needsRender = false; + var needsRemount = false; + + if (candidateType !== null) { + var family = resolveFamily(candidateType); + + if (family !== undefined) { + if (staleFamilies.has(family)) { + needsRemount = true; + } else if (updatedFamilies.has(family)) { + if (tag === ClassComponent) { + needsRemount = true; + } else { + needsRender = true; + } + } + } + } + + if (failedBoundaries !== null) { + if (failedBoundaries.has(fiber) || (alternate !== null && failedBoundaries.has(alternate))) { + needsRemount = true; + } + } + + if (needsRemount) { + fiber._debugNeedsRemount = true; + } + + if (needsRemount || needsRender) { + scheduleWork(fiber, Sync); + } + + if (child !== null && !needsRemount) { + scheduleFibersWithFamiliesRecursively(child, updatedFamilies, staleFamilies); + } + + if (sibling !== null) { + scheduleFibersWithFamiliesRecursively(sibling, updatedFamilies, staleFamilies); + } + } + } + + var findHostInstancesForRefresh = function (root, families) { + { + var hostInstances = new Set(); + var types = new Set( + families.map(function (family) { + return family.current; + }), + ); + findHostInstancesForMatchingFibersRecursively(root.current, types, hostInstances); + return hostInstances; + } + }; + + function findHostInstancesForMatchingFibersRecursively(fiber, types, hostInstances) { + { + var child = fiber.child, + sibling = fiber.sibling, + tag = fiber.tag, + type = fiber.type; + var candidateType = null; + + switch (tag) { + case FunctionComponent: + case SimpleMemoComponent: + case ClassComponent: + candidateType = type; + break; + + case ForwardRef: + candidateType = type.render; + break; + + default: + break; + } + + var didMatch = false; + + if (candidateType !== null) { + if (types.has(candidateType)) { + didMatch = true; + } + } + + if (didMatch) { + // We have a match. This only drills down to the closest host components. + // There's no need to search deeper because for the purpose of giving + // visual feedback, "flashing" outermost parent rectangles is sufficient. + findHostInstancesForFiberShallowly(fiber, hostInstances); + } else { + // If there's no match, maybe there will be one further down in the child tree. + if (child !== null) { + findHostInstancesForMatchingFibersRecursively(child, types, hostInstances); + } + } + + if (sibling !== null) { + findHostInstancesForMatchingFibersRecursively(sibling, types, hostInstances); + } + } + } + + function findHostInstancesForFiberShallowly(fiber, hostInstances) { + { + var foundHostInstances = findChildHostInstancesForFiberShallowly(fiber, hostInstances); + + if (foundHostInstances) { + return; + } // If we didn't find any host children, fallback to closest host parent. + + var node = fiber; + + while (true) { + switch (node.tag) { + case HostComponent: + hostInstances.add(node.stateNode); + return; + + case HostPortal: + hostInstances.add(node.stateNode.containerInfo); + return; + + case HostRoot: + hostInstances.add(node.stateNode.containerInfo); + return; + } + + if (node.return === null) { + throw new Error('Expected to reach root first.'); + } + + node = node.return; + } + } + } + + function findChildHostInstancesForFiberShallowly(fiber, hostInstances) { + { + var node = fiber; + var foundHostInstances = false; + + while (true) { + if (node.tag === HostComponent) { + // We got a match. + foundHostInstances = true; + hostInstances.add(node.stateNode); // There may still be more, so keep searching. + } else if (node.child !== null) { + node.child.return = node; + node = node.child; + continue; + } + + if (node === fiber) { + return foundHostInstances; + } + + while (node.sibling === null) { + if (node.return === null || node.return === fiber) { + return foundHostInstances; + } + + node = node.return; + } + + node.sibling.return = node.return; + node = node.sibling; + } + } + + return false; + } + + function resolveDefaultProps(Component, baseProps) { + if (Component && Component.defaultProps) { + // Resolve default props. Taken from ReactElement + var props = _assign({}, baseProps); + + var defaultProps = Component.defaultProps; + + for (var propName in defaultProps) { + if (props[propName] === undefined) { + props[propName] = defaultProps[propName]; + } + } + + return props; + } + + return baseProps; + } + function readLazyComponentType(lazyComponent) { + initializeLazyComponentType(lazyComponent); + + if (lazyComponent._status !== Resolved) { + throw lazyComponent._result; + } + + return lazyComponent._result; + } + + var valueCursor = createCursor(null); + var rendererSigil; + + { + // Use this to detect multiple renderers using the same context + rendererSigil = {}; + } + + var currentlyRenderingFiber = null; + var lastContextDependency = null; + var lastContextWithAllBitsObserved = null; + var isDisallowedContextReadInDEV = false; + function resetContextDependencies() { + // This is called right before React yields execution, to ensure `readContext` + // cannot be called outside the render phase. + currentlyRenderingFiber = null; + lastContextDependency = null; + lastContextWithAllBitsObserved = null; + + { + isDisallowedContextReadInDEV = false; + } + } + function enterDisallowedContextReadInDEV() { + { + isDisallowedContextReadInDEV = true; + } + } + function exitDisallowedContextReadInDEV() { + { + isDisallowedContextReadInDEV = false; + } + } + function pushProvider(providerFiber, nextValue) { + var context = providerFiber.type._context; + + if (isPrimaryRenderer) { + push(valueCursor, context._currentValue, providerFiber); + context._currentValue = nextValue; + + { + !( + context._currentRenderer === undefined || + context._currentRenderer === null || + context._currentRenderer === rendererSigil + ) + ? warningWithoutStack$1( + false, + 'Detected multiple renderers concurrently rendering the ' + + 'same context provider. This is currently unsupported.', + ) + : void 0; + context._currentRenderer = rendererSigil; + } + } else { + push(valueCursor, context._currentValue2, providerFiber); + context._currentValue2 = nextValue; + + { + !( + context._currentRenderer2 === undefined || + context._currentRenderer2 === null || + context._currentRenderer2 === rendererSigil + ) + ? warningWithoutStack$1( + false, + 'Detected multiple renderers concurrently rendering the ' + + 'same context provider. This is currently unsupported.', + ) + : void 0; + context._currentRenderer2 = rendererSigil; + } + } + } + function popProvider(providerFiber) { + var currentValue = valueCursor.current; + pop(valueCursor, providerFiber); + var context = providerFiber.type._context; + + if (isPrimaryRenderer) { + context._currentValue = currentValue; + } else { + context._currentValue2 = currentValue; + } + } + function calculateChangedBits(context, newValue, oldValue) { + if (is$1(oldValue, newValue)) { + // No change + return 0; + } else { + var changedBits = + typeof context._calculateChangedBits === 'function' + ? context._calculateChangedBits(oldValue, newValue) + : MAX_SIGNED_31_BIT_INT; + + { + !((changedBits & MAX_SIGNED_31_BIT_INT) === changedBits) + ? warning$1( + false, + 'calculateChangedBits: Expected the return value to be a ' + + '31-bit integer. Instead received: %s', + changedBits, + ) + : void 0; + } + + return changedBits | 0; + } + } + function scheduleWorkOnParentPath(parent, renderExpirationTime) { + // Update the child expiration time of all the ancestors, including + // the alternates. + var node = parent; + + while (node !== null) { + var alternate = node.alternate; + + if (node.childExpirationTime < renderExpirationTime) { + node.childExpirationTime = renderExpirationTime; + + if (alternate !== null && alternate.childExpirationTime < renderExpirationTime) { + alternate.childExpirationTime = renderExpirationTime; + } + } else if (alternate !== null && alternate.childExpirationTime < renderExpirationTime) { + alternate.childExpirationTime = renderExpirationTime; + } else { + // Neither alternate was updated, which means the rest of the + // ancestor path already has sufficient priority. + break; + } + + node = node.return; + } + } + function propagateContextChange(workInProgress, context, changedBits, renderExpirationTime) { + var fiber = workInProgress.child; + + if (fiber !== null) { + // Set the return pointer of the child to the work-in-progress fiber. + fiber.return = workInProgress; + } + + while (fiber !== null) { + var nextFiber = void 0; // Visit this fiber. + + var list = fiber.dependencies; + + if (list !== null) { + nextFiber = fiber.child; + var dependency = list.firstContext; + + while (dependency !== null) { + // Check if the context matches. + if (dependency.context === context && (dependency.observedBits & changedBits) !== 0) { + // Match! Schedule an update on this fiber. + if (fiber.tag === ClassComponent) { + // Schedule a force update on the work-in-progress. + var update = createUpdate(renderExpirationTime, null); + update.tag = ForceUpdate; // TODO: Because we don't have a work-in-progress, this will add the + // update to the current fiber, too, which means it will persist even if + // this render is thrown away. Since it's a race condition, not sure it's + // worth fixing. + + enqueueUpdate(fiber, update); + } + + if (fiber.expirationTime < renderExpirationTime) { + fiber.expirationTime = renderExpirationTime; + } + + var alternate = fiber.alternate; + + if (alternate !== null && alternate.expirationTime < renderExpirationTime) { + alternate.expirationTime = renderExpirationTime; + } + + scheduleWorkOnParentPath(fiber.return, renderExpirationTime); // Mark the expiration time on the list, too. + + if (list.expirationTime < renderExpirationTime) { + list.expirationTime = renderExpirationTime; + } // Since we already found a match, we can stop traversing the + // dependency list. + + break; + } + + dependency = dependency.next; + } + } else if (fiber.tag === ContextProvider) { + // Don't scan deeper if this is a matching provider + nextFiber = fiber.type === workInProgress.type ? null : fiber.child; + } else if (enableSuspenseServerRenderer && fiber.tag === DehydratedFragment) { + // If a dehydrated suspense bounudary is in this subtree, we don't know + // if it will have any context consumers in it. The best we can do is + // mark it as having updates. + var parentSuspense = fiber.return; + + if (!(parentSuspense !== null)) { + { + throw Error( + 'We just came from a parent so we must have had a parent. This is a bug in React.', + ); + } + } + + if (parentSuspense.expirationTime < renderExpirationTime) { + parentSuspense.expirationTime = renderExpirationTime; + } + + var _alternate = parentSuspense.alternate; + + if (_alternate !== null && _alternate.expirationTime < renderExpirationTime) { + _alternate.expirationTime = renderExpirationTime; + } // This is intentionally passing this fiber as the parent + // because we want to schedule this fiber as having work + // on its children. We'll use the childExpirationTime on + // this fiber to indicate that a context has changed. + + scheduleWorkOnParentPath(parentSuspense, renderExpirationTime); + nextFiber = fiber.sibling; + } else { + // Traverse down. + nextFiber = fiber.child; + } + + if (nextFiber !== null) { + // Set the return pointer of the child to the work-in-progress fiber. + nextFiber.return = fiber; + } else { + // No child. Traverse to next sibling. + nextFiber = fiber; + + while (nextFiber !== null) { + if (nextFiber === workInProgress) { + // We're back to the root of this subtree. Exit. + nextFiber = null; + break; + } + + var sibling = nextFiber.sibling; + + if (sibling !== null) { + // Set the return pointer of the sibling to the work-in-progress fiber. + sibling.return = nextFiber.return; + nextFiber = sibling; + break; + } // No more siblings. Traverse up. + + nextFiber = nextFiber.return; + } + } + + fiber = nextFiber; + } + } + function prepareToReadContext(workInProgress, renderExpirationTime) { + currentlyRenderingFiber = workInProgress; + lastContextDependency = null; + lastContextWithAllBitsObserved = null; + var dependencies = workInProgress.dependencies; + + if (dependencies !== null) { + var firstContext = dependencies.firstContext; + + if (firstContext !== null) { + if (dependencies.expirationTime >= renderExpirationTime) { + // Context list has a pending update. Mark that this fiber performed work. + markWorkInProgressReceivedUpdate(); + } // Reset the work-in-progress list + + dependencies.firstContext = null; + } + } + } + function readContext(context, observedBits) { + { + // This warning would fire if you read context inside a Hook like useMemo. + // Unlike the class check below, it's not enforced in production for perf. + !!isDisallowedContextReadInDEV + ? warning$1( + false, + 'Context can only be read while React is rendering. ' + + 'In classes, you can read it in the render method or getDerivedStateFromProps. ' + + 'In function components, you can read it directly in the function body, but not ' + + 'inside Hooks like useReducer() or useMemo().', + ) + : void 0; + } + + if (lastContextWithAllBitsObserved === context) { + // Nothing to do. We already observe everything in this context. + } else if (observedBits === false || observedBits === 0) { + // Do not observe any updates. + } else { + var resolvedObservedBits; // Avoid deopting on observable arguments or heterogeneous types. + + if (typeof observedBits !== 'number' || observedBits === MAX_SIGNED_31_BIT_INT) { + // Observe all updates. + lastContextWithAllBitsObserved = context; + resolvedObservedBits = MAX_SIGNED_31_BIT_INT; + } else { + resolvedObservedBits = observedBits; + } + + var contextItem = { + context: context, + observedBits: resolvedObservedBits, + next: null, + }; + + if (lastContextDependency === null) { + if (!(currentlyRenderingFiber !== null)) { + { + throw Error( + 'Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().', + ); + } + } // This is the first dependency for this component. Create a new list. + + lastContextDependency = contextItem; + currentlyRenderingFiber.dependencies = { + expirationTime: NoWork, + firstContext: contextItem, + responders: null, + }; + } else { + // Append a new context item. + lastContextDependency = lastContextDependency.next = contextItem; + } + } + + return isPrimaryRenderer ? context._currentValue : context._currentValue2; + } + + // UpdateQueue is a linked list of prioritized updates. + // + // Like fibers, update queues come in pairs: a current queue, which represents + // the visible state of the screen, and a work-in-progress queue, which can be + // mutated and processed asynchronously before it is committed — a form of + // double buffering. If a work-in-progress render is discarded before finishing, + // we create a new work-in-progress by cloning the current queue. + // + // Both queues share a persistent, singly-linked list structure. To schedule an + // update, we append it to the end of both queues. Each queue maintains a + // pointer to first update in the persistent list that hasn't been processed. + // The work-in-progress pointer always has a position equal to or greater than + // the current queue, since we always work on that one. The current queue's + // pointer is only updated during the commit phase, when we swap in the + // work-in-progress. + // + // For example: + // + // Current pointer: A - B - C - D - E - F + // Work-in-progress pointer: D - E - F + // ^ + // The work-in-progress queue has + // processed more updates than current. + // + // The reason we append to both queues is because otherwise we might drop + // updates without ever processing them. For example, if we only add updates to + // the work-in-progress queue, some updates could be lost whenever a work-in + // -progress render restarts by cloning from current. Similarly, if we only add + // updates to the current queue, the updates will be lost whenever an already + // in-progress queue commits and swaps with the current queue. However, by + // adding to both queues, we guarantee that the update will be part of the next + // work-in-progress. (And because the work-in-progress queue becomes the + // current queue once it commits, there's no danger of applying the same + // update twice.) + // + // Prioritization + // -------------- + // + // Updates are not sorted by priority, but by insertion; new updates are always + // appended to the end of the list. + // + // The priority is still important, though. When processing the update queue + // during the render phase, only the updates with sufficient priority are + // included in the result. If we skip an update because it has insufficient + // priority, it remains in the queue to be processed later, during a lower + // priority render. Crucially, all updates subsequent to a skipped update also + // remain in the queue *regardless of their priority*. That means high priority + // updates are sometimes processed twice, at two separate priorities. We also + // keep track of a base state, that represents the state before the first + // update in the queue is applied. + // + // For example: + // + // Given a base state of '', and the following queue of updates + // + // A1 - B2 - C1 - D2 + // + // where the number indicates the priority, and the update is applied to the + // previous state by appending a letter, React will process these updates as + // two separate renders, one per distinct priority level: + // + // First render, at priority 1: + // Base state: '' + // Updates: [A1, C1] + // Result state: 'AC' + // + // Second render, at priority 2: + // Base state: 'A' <- The base state does not include C1, + // because B2 was skipped. + // Updates: [B2, C1, D2] <- C1 was rebased on top of B2 + // Result state: 'ABCD' + // + // Because we process updates in insertion order, and rebase high priority + // updates when preceding updates are skipped, the final result is deterministic + // regardless of priority. Intermediate state may vary according to system + // resources, but the final state is always the same. + var UpdateState = 0; + var ReplaceState = 1; + var ForceUpdate = 2; + var CaptureUpdate = 3; // Global state that is reset at the beginning of calling `processUpdateQueue`. + // It should only be read right after calling `processUpdateQueue`, via + // `checkHasForceUpdateAfterProcessing`. + + var hasForceUpdate = false; + var didWarnUpdateInsideUpdate; + var currentlyProcessingQueue; + + { + didWarnUpdateInsideUpdate = false; + currentlyProcessingQueue = null; + } + + function createUpdateQueue(baseState) { + var queue = { + baseState: baseState, + firstUpdate: null, + lastUpdate: null, + firstCapturedUpdate: null, + lastCapturedUpdate: null, + firstEffect: null, + lastEffect: null, + firstCapturedEffect: null, + lastCapturedEffect: null, + }; + return queue; + } + + function cloneUpdateQueue(currentQueue) { + var queue = { + baseState: currentQueue.baseState, + firstUpdate: currentQueue.firstUpdate, + lastUpdate: currentQueue.lastUpdate, + // TODO: With resuming, if we bail out and resuse the child tree, we should + // keep these effects. + firstCapturedUpdate: null, + lastCapturedUpdate: null, + firstEffect: null, + lastEffect: null, + firstCapturedEffect: null, + lastCapturedEffect: null, + }; + return queue; + } + + function createUpdate(expirationTime, suspenseConfig) { + var update = { + expirationTime: expirationTime, + suspenseConfig: suspenseConfig, + tag: UpdateState, + payload: null, + callback: null, + next: null, + nextEffect: null, + }; + + { + update.priority = getCurrentPriorityLevel(); + } + + return update; + } + + function appendUpdateToQueue(queue, update) { + // Append the update to the end of the list. + if (queue.lastUpdate === null) { + // Queue is empty + queue.firstUpdate = queue.lastUpdate = update; + } else { + queue.lastUpdate.next = update; + queue.lastUpdate = update; + } + } + + function enqueueUpdate(fiber, update) { + // Update queues are created lazily. + var alternate = fiber.alternate; + var queue1; + var queue2; + + if (alternate === null) { + // There's only one fiber. + queue1 = fiber.updateQueue; + queue2 = null; + + if (queue1 === null) { + queue1 = fiber.updateQueue = createUpdateQueue(fiber.memoizedState); + } + } else { + // There are two owners. + queue1 = fiber.updateQueue; + queue2 = alternate.updateQueue; + + if (queue1 === null) { + if (queue2 === null) { + // Neither fiber has an update queue. Create new ones. + queue1 = fiber.updateQueue = createUpdateQueue(fiber.memoizedState); + queue2 = alternate.updateQueue = createUpdateQueue(alternate.memoizedState); + } else { + // Only one fiber has an update queue. Clone to create a new one. + queue1 = fiber.updateQueue = cloneUpdateQueue(queue2); + } + } else { + if (queue2 === null) { + // Only one fiber has an update queue. Clone to create a new one. + queue2 = alternate.updateQueue = cloneUpdateQueue(queue1); + } else { + // Both owners have an update queue. + } + } + } + + if (queue2 === null || queue1 === queue2) { + // There's only a single queue. + appendUpdateToQueue(queue1, update); + } else { + // There are two queues. We need to append the update to both queues, + // while accounting for the persistent structure of the list — we don't + // want the same update to be added multiple times. + if (queue1.lastUpdate === null || queue2.lastUpdate === null) { + // One of the queues is not empty. We must add the update to both queues. + appendUpdateToQueue(queue1, update); + appendUpdateToQueue(queue2, update); + } else { + // Both queues are non-empty. The last update is the same in both lists, + // because of structural sharing. So, only append to one of the lists. + appendUpdateToQueue(queue1, update); // But we still need to update the `lastUpdate` pointer of queue2. + + queue2.lastUpdate = update; + } + } + + { + if ( + fiber.tag === ClassComponent && + (currentlyProcessingQueue === queue1 || + (queue2 !== null && currentlyProcessingQueue === queue2)) && + !didWarnUpdateInsideUpdate + ) { + warningWithoutStack$1( + false, + 'An update (setState, replaceState, or forceUpdate) was scheduled ' + + 'from inside an update function. Update functions should be pure, ' + + 'with zero side-effects. Consider using componentDidUpdate or a ' + + 'callback.', + ); + didWarnUpdateInsideUpdate = true; + } + } + } + function enqueueCapturedUpdate(workInProgress, update) { + // Captured updates go into a separate list, and only on the work-in- + // progress queue. + var workInProgressQueue = workInProgress.updateQueue; + + if (workInProgressQueue === null) { + workInProgressQueue = workInProgress.updateQueue = createUpdateQueue( + workInProgress.memoizedState, + ); + } else { + // TODO: I put this here rather than createWorkInProgress so that we don't + // clone the queue unnecessarily. There's probably a better way to + // structure this. + workInProgressQueue = ensureWorkInProgressQueueIsAClone(workInProgress, workInProgressQueue); + } // Append the update to the end of the list. + + if (workInProgressQueue.lastCapturedUpdate === null) { + // This is the first render phase update + workInProgressQueue.firstCapturedUpdate = workInProgressQueue.lastCapturedUpdate = update; + } else { + workInProgressQueue.lastCapturedUpdate.next = update; + workInProgressQueue.lastCapturedUpdate = update; + } + } + + function ensureWorkInProgressQueueIsAClone(workInProgress, queue) { + var current = workInProgress.alternate; + + if (current !== null) { + // If the work-in-progress queue is equal to the current queue, + // we need to clone it first. + if (queue === current.updateQueue) { + queue = workInProgress.updateQueue = cloneUpdateQueue(queue); + } + } + + return queue; + } + + function getStateFromUpdate(workInProgress, queue, update, prevState, nextProps, instance) { + switch (update.tag) { + case ReplaceState: { + var payload = update.payload; + + if (typeof payload === 'function') { + // Updater function + { + enterDisallowedContextReadInDEV(); + + if (debugRenderPhaseSideEffectsForStrictMode && workInProgress.mode & StrictMode) { + payload.call(instance, prevState, nextProps); + } + } + + var nextState = payload.call(instance, prevState, nextProps); + + { + exitDisallowedContextReadInDEV(); + } + + return nextState; + } // State object + + return payload; + } + + case CaptureUpdate: { + workInProgress.effectTag = (workInProgress.effectTag & ~ShouldCapture) | DidCapture; + } + // Intentional fallthrough + + case UpdateState: { + var _payload = update.payload; + var partialState; + + if (typeof _payload === 'function') { + // Updater function + { + enterDisallowedContextReadInDEV(); + + if (debugRenderPhaseSideEffectsForStrictMode && workInProgress.mode & StrictMode) { + _payload.call(instance, prevState, nextProps); + } + } + + partialState = _payload.call(instance, prevState, nextProps); + + { + exitDisallowedContextReadInDEV(); + } + } else { + // Partial state object + partialState = _payload; + } + + if (partialState === null || partialState === undefined) { + // Null and undefined are treated as no-ops. + return prevState; + } // Merge the partial state and the previous state. + + return _assign({}, prevState, partialState); + } + + case ForceUpdate: { + hasForceUpdate = true; + return prevState; + } + } + + return prevState; + } + + function processUpdateQueue(workInProgress, queue, props, instance, renderExpirationTime) { + hasForceUpdate = false; + queue = ensureWorkInProgressQueueIsAClone(workInProgress, queue); + + { + currentlyProcessingQueue = queue; + } // These values may change as we process the queue. + + var newBaseState = queue.baseState; + var newFirstUpdate = null; + var newExpirationTime = NoWork; // Iterate through the list of updates to compute the result. + + var update = queue.firstUpdate; + var resultState = newBaseState; + + while (update !== null) { + var updateExpirationTime = update.expirationTime; + + if (updateExpirationTime < renderExpirationTime) { + // This update does not have sufficient priority. Skip it. + if (newFirstUpdate === null) { + // This is the first skipped update. It will be the first update in + // the new list. + newFirstUpdate = update; // Since this is the first update that was skipped, the current result + // is the new base state. + + newBaseState = resultState; + } // Since this update will remain in the list, update the remaining + // expiration time. + + if (newExpirationTime < updateExpirationTime) { + newExpirationTime = updateExpirationTime; + } + } else { + // This update does have sufficient priority. + // Mark the event time of this update as relevant to this render pass. + // TODO: This should ideally use the true event time of this update rather than + // its priority which is a derived and not reverseable value. + // TODO: We should skip this update if it was already committed but currently + // we have no way of detecting the difference between a committed and suspended + // update here. + markRenderEventTimeAndConfig(updateExpirationTime, update.suspenseConfig); // Process it and compute a new result. + + resultState = getStateFromUpdate(workInProgress, queue, update, resultState, props, instance); + var callback = update.callback; + + if (callback !== null) { + workInProgress.effectTag |= Callback; // Set this to null, in case it was mutated during an aborted render. + + update.nextEffect = null; + + if (queue.lastEffect === null) { + queue.firstEffect = queue.lastEffect = update; + } else { + queue.lastEffect.nextEffect = update; + queue.lastEffect = update; + } + } + } // Continue to the next update. + + update = update.next; + } // Separately, iterate though the list of captured updates. + + var newFirstCapturedUpdate = null; + update = queue.firstCapturedUpdate; + + while (update !== null) { + var _updateExpirationTime = update.expirationTime; + + if (_updateExpirationTime < renderExpirationTime) { + // This update does not have sufficient priority. Skip it. + if (newFirstCapturedUpdate === null) { + // This is the first skipped captured update. It will be the first + // update in the new list. + newFirstCapturedUpdate = update; // If this is the first update that was skipped, the current result is + // the new base state. + + if (newFirstUpdate === null) { + newBaseState = resultState; + } + } // Since this update will remain in the list, update the remaining + // expiration time. + + if (newExpirationTime < _updateExpirationTime) { + newExpirationTime = _updateExpirationTime; + } + } else { + // This update does have sufficient priority. Process it and compute + // a new result. + resultState = getStateFromUpdate(workInProgress, queue, update, resultState, props, instance); + var _callback = update.callback; + + if (_callback !== null) { + workInProgress.effectTag |= Callback; // Set this to null, in case it was mutated during an aborted render. + + update.nextEffect = null; + + if (queue.lastCapturedEffect === null) { + queue.firstCapturedEffect = queue.lastCapturedEffect = update; + } else { + queue.lastCapturedEffect.nextEffect = update; + queue.lastCapturedEffect = update; + } + } + } + + update = update.next; + } + + if (newFirstUpdate === null) { + queue.lastUpdate = null; + } + + if (newFirstCapturedUpdate === null) { + queue.lastCapturedUpdate = null; + } else { + workInProgress.effectTag |= Callback; + } + + if (newFirstUpdate === null && newFirstCapturedUpdate === null) { + // We processed every update, without skipping. That means the new base + // state is the same as the result state. + newBaseState = resultState; + } + + queue.baseState = newBaseState; + queue.firstUpdate = newFirstUpdate; + queue.firstCapturedUpdate = newFirstCapturedUpdate; // Set the remaining expiration time to be whatever is remaining in the queue. + // This should be fine because the only two other things that contribute to + // expiration time are props and context. We're already in the middle of the + // begin phase by the time we start processing the queue, so we've already + // dealt with the props. Context in components that specify + // shouldComponentUpdate is tricky; but we'll have to account for + // that regardless. + + markUnprocessedUpdateTime(newExpirationTime); + workInProgress.expirationTime = newExpirationTime; + workInProgress.memoizedState = resultState; + + { + currentlyProcessingQueue = null; + } + } + + function callCallback(callback, context) { + if (!(typeof callback === 'function')) { + { + throw Error( + 'Invalid argument passed as callback. Expected a function. Instead received: ' + callback, + ); + } + } + + callback.call(context); + } + + function resetHasForceUpdateBeforeProcessing() { + hasForceUpdate = false; + } + function checkHasForceUpdateAfterProcessing() { + return hasForceUpdate; + } + function commitUpdateQueue(finishedWork, finishedQueue, instance, renderExpirationTime) { + // If the finished render included captured updates, and there are still + // lower priority updates left over, we need to keep the captured updates + // in the queue so that they are rebased and not dropped once we process the + // queue again at the lower priority. + if (finishedQueue.firstCapturedUpdate !== null) { + // Join the captured update list to the end of the normal list. + if (finishedQueue.lastUpdate !== null) { + finishedQueue.lastUpdate.next = finishedQueue.firstCapturedUpdate; + finishedQueue.lastUpdate = finishedQueue.lastCapturedUpdate; + } // Clear the list of captured updates. + + finishedQueue.firstCapturedUpdate = finishedQueue.lastCapturedUpdate = null; + } // Commit the effects + + commitUpdateEffects(finishedQueue.firstEffect, instance); + finishedQueue.firstEffect = finishedQueue.lastEffect = null; + commitUpdateEffects(finishedQueue.firstCapturedEffect, instance); + finishedQueue.firstCapturedEffect = finishedQueue.lastCapturedEffect = null; + } + + function commitUpdateEffects(effect, instance) { + while (effect !== null) { + var callback = effect.callback; + + if (callback !== null) { + effect.callback = null; + callCallback(callback, instance); + } + + effect = effect.nextEffect; + } + } + + var ReactCurrentBatchConfig = ReactSharedInternals.ReactCurrentBatchConfig; + function requestCurrentSuspenseConfig() { + return ReactCurrentBatchConfig.suspense; + } + + var fakeInternalInstance = {}; + var isArray$1 = Array.isArray; // React.Component uses a shared frozen object by default. + // We'll use it to determine whether we need to initialize legacy refs. + + var emptyRefsObject = new React.Component().refs; + var didWarnAboutStateAssignmentForComponent; + var didWarnAboutUninitializedState; + var didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate; + var didWarnAboutLegacyLifecyclesAndDerivedState; + var didWarnAboutUndefinedDerivedState; + var warnOnUndefinedDerivedState; + var warnOnInvalidCallback$1; + var didWarnAboutDirectlyAssigningPropsToState; + var didWarnAboutContextTypeAndContextTypes; + var didWarnAboutInvalidateContextType; + + { + didWarnAboutStateAssignmentForComponent = new Set(); + didWarnAboutUninitializedState = new Set(); + didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate = new Set(); + didWarnAboutLegacyLifecyclesAndDerivedState = new Set(); + didWarnAboutDirectlyAssigningPropsToState = new Set(); + didWarnAboutUndefinedDerivedState = new Set(); + didWarnAboutContextTypeAndContextTypes = new Set(); + didWarnAboutInvalidateContextType = new Set(); + var didWarnOnInvalidCallback = new Set(); + + warnOnInvalidCallback$1 = function (callback, callerName) { + if (callback === null || typeof callback === 'function') { + return; + } + + var key = callerName + '_' + callback; + + if (!didWarnOnInvalidCallback.has(key)) { + didWarnOnInvalidCallback.add(key); + warningWithoutStack$1( + false, + '%s(...): Expected the last optional `callback` argument to be a ' + + 'function. Instead received: %s.', + callerName, + callback, + ); + } + }; + + warnOnUndefinedDerivedState = function (type, partialState) { + if (partialState === undefined) { + var componentName = getComponentName(type) || 'Component'; + + if (!didWarnAboutUndefinedDerivedState.has(componentName)) { + didWarnAboutUndefinedDerivedState.add(componentName); + warningWithoutStack$1( + false, + '%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. ' + + 'You have returned undefined.', + componentName, + ); + } + } + }; // This is so gross but it's at least non-critical and can be removed if + // it causes problems. This is meant to give a nicer error message for + // ReactDOM15.unstable_renderSubtreeIntoContainer(reactDOM16Component, + // ...)) which otherwise throws a "_processChildContext is not a function" + // exception. + + Object.defineProperty(fakeInternalInstance, '_processChildContext', { + enumerable: false, + value: function () { + { + { + throw Error( + "_processChildContext is not available in React 16+. This likely means you have multiple copies of React and are attempting to nest a React 15 tree inside a React 16 tree using unstable_renderSubtreeIntoContainer, which isn't supported. Try to make sure you have only one copy of React (and ideally, switch to ReactDOM.createPortal).", + ); + } + } + }, + }); + Object.freeze(fakeInternalInstance); + } + + function applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, nextProps) { + var prevState = workInProgress.memoizedState; + + { + if (debugRenderPhaseSideEffectsForStrictMode && workInProgress.mode & StrictMode) { + // Invoke the function an extra time to help detect side-effects. + getDerivedStateFromProps(nextProps, prevState); + } + } + + var partialState = getDerivedStateFromProps(nextProps, prevState); + + { + warnOnUndefinedDerivedState(ctor, partialState); + } // Merge the partial state and the previous state. + + var memoizedState = + partialState === null || partialState === undefined + ? prevState + : _assign({}, prevState, partialState); + workInProgress.memoizedState = memoizedState; // Once the update queue is empty, persist the derived state onto the + // base state. + + var updateQueue = workInProgress.updateQueue; + + if (updateQueue !== null && workInProgress.expirationTime === NoWork) { + updateQueue.baseState = memoizedState; + } + } + var classComponentUpdater = { + isMounted: isMounted, + enqueueSetState: function (inst, payload, callback) { + var fiber = get(inst); + var currentTime = requestCurrentTimeForUpdate(); + var suspenseConfig = requestCurrentSuspenseConfig(); + var expirationTime = computeExpirationForFiber(currentTime, fiber, suspenseConfig); + var update = createUpdate(expirationTime, suspenseConfig); + update.payload = payload; + + if (callback !== undefined && callback !== null) { + { + warnOnInvalidCallback$1(callback, 'setState'); + } + + update.callback = callback; + } + + enqueueUpdate(fiber, update); + scheduleWork(fiber, expirationTime); + }, + enqueueReplaceState: function (inst, payload, callback) { + var fiber = get(inst); + var currentTime = requestCurrentTimeForUpdate(); + var suspenseConfig = requestCurrentSuspenseConfig(); + var expirationTime = computeExpirationForFiber(currentTime, fiber, suspenseConfig); + var update = createUpdate(expirationTime, suspenseConfig); + update.tag = ReplaceState; + update.payload = payload; + + if (callback !== undefined && callback !== null) { + { + warnOnInvalidCallback$1(callback, 'replaceState'); + } + + update.callback = callback; + } + + enqueueUpdate(fiber, update); + scheduleWork(fiber, expirationTime); + }, + enqueueForceUpdate: function (inst, callback) { + var fiber = get(inst); + var currentTime = requestCurrentTimeForUpdate(); + var suspenseConfig = requestCurrentSuspenseConfig(); + var expirationTime = computeExpirationForFiber(currentTime, fiber, suspenseConfig); + var update = createUpdate(expirationTime, suspenseConfig); + update.tag = ForceUpdate; + + if (callback !== undefined && callback !== null) { + { + warnOnInvalidCallback$1(callback, 'forceUpdate'); + } + + update.callback = callback; + } + + enqueueUpdate(fiber, update); + scheduleWork(fiber, expirationTime); + }, + }; + + function checkShouldComponentUpdate( + workInProgress, + ctor, + oldProps, + newProps, + oldState, + newState, + nextContext, + ) { + var instance = workInProgress.stateNode; + + if (typeof instance.shouldComponentUpdate === 'function') { + startPhaseTimer(workInProgress, 'shouldComponentUpdate'); + var shouldUpdate = instance.shouldComponentUpdate(newProps, newState, nextContext); + stopPhaseTimer(); + + { + !(shouldUpdate !== undefined) + ? warningWithoutStack$1( + false, + '%s.shouldComponentUpdate(): Returned undefined instead of a ' + + 'boolean value. Make sure to return true or false.', + getComponentName(ctor) || 'Component', + ) + : void 0; + } + + return shouldUpdate; + } + + if (ctor.prototype && ctor.prototype.isPureReactComponent) { + return !shallowEqual(oldProps, newProps) || !shallowEqual(oldState, newState); + } + + return true; + } + + function checkClassInstance(workInProgress, ctor, newProps) { + var instance = workInProgress.stateNode; + + { + var name = getComponentName(ctor) || 'Component'; + var renderPresent = instance.render; + + if (!renderPresent) { + if (ctor.prototype && typeof ctor.prototype.render === 'function') { + warningWithoutStack$1( + false, + '%s(...): No `render` method found on the returned component ' + + 'instance: did you accidentally return an object from the constructor?', + name, + ); + } else { + warningWithoutStack$1( + false, + '%s(...): No `render` method found on the returned component ' + + 'instance: you may have forgotten to define `render`.', + name, + ); + } + } + + var noGetInitialStateOnES6 = + !instance.getInitialState || instance.getInitialState.isReactClassApproved || instance.state; + !noGetInitialStateOnES6 + ? warningWithoutStack$1( + false, + 'getInitialState was defined on %s, a plain JavaScript class. ' + + 'This is only supported for classes created using React.createClass. ' + + 'Did you mean to define a state property instead?', + name, + ) + : void 0; + var noGetDefaultPropsOnES6 = + !instance.getDefaultProps || instance.getDefaultProps.isReactClassApproved; + !noGetDefaultPropsOnES6 + ? warningWithoutStack$1( + false, + 'getDefaultProps was defined on %s, a plain JavaScript class. ' + + 'This is only supported for classes created using React.createClass. ' + + 'Use a static property to define defaultProps instead.', + name, + ) + : void 0; + var noInstancePropTypes = !instance.propTypes; + !noInstancePropTypes + ? warningWithoutStack$1( + false, + 'propTypes was defined as an instance property on %s. Use a static ' + + 'property to define propTypes instead.', + name, + ) + : void 0; + var noInstanceContextType = !instance.contextType; + !noInstanceContextType + ? warningWithoutStack$1( + false, + 'contextType was defined as an instance property on %s. Use a static ' + + 'property to define contextType instead.', + name, + ) + : void 0; + + if (disableLegacyContext) { + if (ctor.childContextTypes) { + warningWithoutStack$1( + false, + '%s uses the legacy childContextTypes API which is no longer supported. ' + + 'Use React.createContext() instead.', + name, + ); + } + + if (ctor.contextTypes) { + warningWithoutStack$1( + false, + '%s uses the legacy contextTypes API which is no longer supported. ' + + 'Use React.createContext() with static contextType instead.', + name, + ); + } + } else { + var noInstanceContextTypes = !instance.contextTypes; + !noInstanceContextTypes + ? warningWithoutStack$1( + false, + 'contextTypes was defined as an instance property on %s. Use a static ' + + 'property to define contextTypes instead.', + name, + ) + : void 0; + + if ( + ctor.contextType && + ctor.contextTypes && + !didWarnAboutContextTypeAndContextTypes.has(ctor) + ) { + didWarnAboutContextTypeAndContextTypes.add(ctor); + warningWithoutStack$1( + false, + '%s declares both contextTypes and contextType static properties. ' + + 'The legacy contextTypes property will be ignored.', + name, + ); + } + } + + var noComponentShouldUpdate = typeof instance.componentShouldUpdate !== 'function'; + !noComponentShouldUpdate + ? warningWithoutStack$1( + false, + '%s has a method called ' + + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + + 'The name is phrased as a question because the function is ' + + 'expected to return a value.', + name, + ) + : void 0; + + if ( + ctor.prototype && + ctor.prototype.isPureReactComponent && + typeof instance.shouldComponentUpdate !== 'undefined' + ) { + warningWithoutStack$1( + false, + '%s has a method called shouldComponentUpdate(). ' + + 'shouldComponentUpdate should not be used when extending React.PureComponent. ' + + 'Please extend React.Component if shouldComponentUpdate is used.', + getComponentName(ctor) || 'A pure component', + ); + } + + var noComponentDidUnmount = typeof instance.componentDidUnmount !== 'function'; + !noComponentDidUnmount + ? warningWithoutStack$1( + false, + '%s has a method called ' + + 'componentDidUnmount(). But there is no such lifecycle method. ' + + 'Did you mean componentWillUnmount()?', + name, + ) + : void 0; + var noComponentDidReceiveProps = typeof instance.componentDidReceiveProps !== 'function'; + !noComponentDidReceiveProps + ? warningWithoutStack$1( + false, + '%s has a method called ' + + 'componentDidReceiveProps(). But there is no such lifecycle method. ' + + 'If you meant to update the state in response to changing props, ' + + 'use componentWillReceiveProps(). If you meant to fetch data or ' + + 'run side-effects or mutations after React has updated the UI, use componentDidUpdate().', + name, + ) + : void 0; + var noComponentWillRecieveProps = typeof instance.componentWillRecieveProps !== 'function'; + !noComponentWillRecieveProps + ? warningWithoutStack$1( + false, + '%s has a method called ' + + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', + name, + ) + : void 0; + var noUnsafeComponentWillRecieveProps = + typeof instance.UNSAFE_componentWillRecieveProps !== 'function'; + !noUnsafeComponentWillRecieveProps + ? warningWithoutStack$1( + false, + '%s has a method called ' + + 'UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?', + name, + ) + : void 0; + var hasMutatedProps = instance.props !== newProps; + !(instance.props === undefined || !hasMutatedProps) + ? warningWithoutStack$1( + false, + '%s(...): When calling super() in `%s`, make sure to pass ' + + "up the same props that your component's constructor was passed.", + name, + name, + ) + : void 0; + var noInstanceDefaultProps = !instance.defaultProps; + !noInstanceDefaultProps + ? warningWithoutStack$1( + false, + 'Setting defaultProps as an instance property on %s is not supported and will be ignored.' + + ' Instead, define defaultProps as a static property on %s.', + name, + name, + ) + : void 0; + + if ( + typeof instance.getSnapshotBeforeUpdate === 'function' && + typeof instance.componentDidUpdate !== 'function' && + !didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.has(ctor) + ) { + didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.add(ctor); + warningWithoutStack$1( + false, + '%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). ' + + 'This component defines getSnapshotBeforeUpdate() only.', + getComponentName(ctor), + ); + } + + var noInstanceGetDerivedStateFromProps = + typeof instance.getDerivedStateFromProps !== 'function'; + !noInstanceGetDerivedStateFromProps + ? warningWithoutStack$1( + false, + '%s: getDerivedStateFromProps() is defined as an instance method ' + + 'and will be ignored. Instead, declare it as a static method.', + name, + ) + : void 0; + var noInstanceGetDerivedStateFromCatch = + typeof instance.getDerivedStateFromError !== 'function'; + !noInstanceGetDerivedStateFromCatch + ? warningWithoutStack$1( + false, + '%s: getDerivedStateFromError() is defined as an instance method ' + + 'and will be ignored. Instead, declare it as a static method.', + name, + ) + : void 0; + var noStaticGetSnapshotBeforeUpdate = typeof ctor.getSnapshotBeforeUpdate !== 'function'; + !noStaticGetSnapshotBeforeUpdate + ? warningWithoutStack$1( + false, + '%s: getSnapshotBeforeUpdate() is defined as a static method ' + + 'and will be ignored. Instead, declare it as an instance method.', + name, + ) + : void 0; + var _state = instance.state; + + if (_state && (typeof _state !== 'object' || isArray$1(_state))) { + warningWithoutStack$1(false, '%s.state: must be set to an object or null', name); + } + + if (typeof instance.getChildContext === 'function') { + !(typeof ctor.childContextTypes === 'object') + ? warningWithoutStack$1( + false, + '%s.getChildContext(): childContextTypes must be defined in order to ' + + 'use getChildContext().', + name, + ) + : void 0; + } + } + } + + function adoptClassInstance(workInProgress, instance) { + instance.updater = classComponentUpdater; + workInProgress.stateNode = instance; // The instance needs access to the fiber so that it can schedule updates + + set(instance, workInProgress); + + { + instance._reactInternalInstance = fakeInternalInstance; + } + } + + function constructClassInstance(workInProgress, ctor, props, renderExpirationTime) { + var isLegacyContextConsumer = false; + var unmaskedContext = emptyContextObject; + var context = emptyContextObject; + var contextType = ctor.contextType; + + { + if ('contextType' in ctor) { + var isValid = // Allow null for conditional declaration + contextType === null || + (contextType !== undefined && + contextType.$$typeof === REACT_CONTEXT_TYPE && + contextType._context === undefined); // Not a <Context.Consumer> + + if (!isValid && !didWarnAboutInvalidateContextType.has(ctor)) { + didWarnAboutInvalidateContextType.add(ctor); + var addendum = ''; + + if (contextType === undefined) { + addendum = + ' However, it is set to undefined. ' + + 'This can be caused by a typo or by mixing up named and default imports. ' + + 'This can also happen due to a circular dependency, so ' + + 'try moving the createContext() call to a separate file.'; + } else if (typeof contextType !== 'object') { + addendum = ' However, it is set to a ' + typeof contextType + '.'; + } else if (contextType.$$typeof === REACT_PROVIDER_TYPE) { + addendum = ' Did you accidentally pass the Context.Provider instead?'; + } else if (contextType._context !== undefined) { + // <Context.Consumer> + addendum = ' Did you accidentally pass the Context.Consumer instead?'; + } else { + addendum = + ' However, it is set to an object with keys {' + + Object.keys(contextType).join(', ') + + '}.'; + } + + warningWithoutStack$1( + false, + '%s defines an invalid contextType. ' + + 'contextType should point to the Context object returned by React.createContext().%s', + getComponentName(ctor) || 'Component', + addendum, + ); + } + } + } + + if (typeof contextType === 'object' && contextType !== null) { + context = readContext(contextType); + } else if (!disableLegacyContext) { + unmaskedContext = getUnmaskedContext(workInProgress, ctor, true); + var contextTypes = ctor.contextTypes; + isLegacyContextConsumer = contextTypes !== null && contextTypes !== undefined; + context = isLegacyContextConsumer + ? getMaskedContext(workInProgress, unmaskedContext) + : emptyContextObject; + } // Instantiate twice to help detect side-effects. + + { + if (debugRenderPhaseSideEffectsForStrictMode && workInProgress.mode & StrictMode) { + new ctor(props, context); // eslint-disable-line no-new + } + } + + var instance = new ctor(props, context); + var state = (workInProgress.memoizedState = + instance.state !== null && instance.state !== undefined ? instance.state : null); + adoptClassInstance(workInProgress, instance); + + { + if (typeof ctor.getDerivedStateFromProps === 'function' && state === null) { + var componentName = getComponentName(ctor) || 'Component'; + + if (!didWarnAboutUninitializedState.has(componentName)) { + didWarnAboutUninitializedState.add(componentName); + warningWithoutStack$1( + false, + '`%s` uses `getDerivedStateFromProps` but its initial state is ' + + '%s. This is not recommended. Instead, define the initial state by ' + + 'assigning an object to `this.state` in the constructor of `%s`. ' + + 'This ensures that `getDerivedStateFromProps` arguments have a consistent shape.', + componentName, + instance.state === null ? 'null' : 'undefined', + componentName, + ); + } + } // If new component APIs are defined, "unsafe" lifecycles won't be called. + // Warn about these lifecycles if they are present. + // Don't warn about react-lifecycles-compat polyfilled methods though. + + if ( + typeof ctor.getDerivedStateFromProps === 'function' || + typeof instance.getSnapshotBeforeUpdate === 'function' + ) { + var foundWillMountName = null; + var foundWillReceivePropsName = null; + var foundWillUpdateName = null; + + if ( + typeof instance.componentWillMount === 'function' && + instance.componentWillMount.__suppressDeprecationWarning !== true + ) { + foundWillMountName = 'componentWillMount'; + } else if (typeof instance.UNSAFE_componentWillMount === 'function') { + foundWillMountName = 'UNSAFE_componentWillMount'; + } + + if ( + typeof instance.componentWillReceiveProps === 'function' && + instance.componentWillReceiveProps.__suppressDeprecationWarning !== true + ) { + foundWillReceivePropsName = 'componentWillReceiveProps'; + } else if (typeof instance.UNSAFE_componentWillReceiveProps === 'function') { + foundWillReceivePropsName = 'UNSAFE_componentWillReceiveProps'; + } + + if ( + typeof instance.componentWillUpdate === 'function' && + instance.componentWillUpdate.__suppressDeprecationWarning !== true + ) { + foundWillUpdateName = 'componentWillUpdate'; + } else if (typeof instance.UNSAFE_componentWillUpdate === 'function') { + foundWillUpdateName = 'UNSAFE_componentWillUpdate'; + } + + if ( + foundWillMountName !== null || + foundWillReceivePropsName !== null || + foundWillUpdateName !== null + ) { + var _componentName = getComponentName(ctor) || 'Component'; + + var newApiName = + typeof ctor.getDerivedStateFromProps === 'function' + ? 'getDerivedStateFromProps()' + : 'getSnapshotBeforeUpdate()'; + + if (!didWarnAboutLegacyLifecyclesAndDerivedState.has(_componentName)) { + didWarnAboutLegacyLifecyclesAndDerivedState.add(_componentName); + warningWithoutStack$1( + false, + 'Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n' + + '%s uses %s but also contains the following legacy lifecycles:%s%s%s\n\n' + + 'The above lifecycles should be removed. Learn more about this warning here:\n' + + 'https://fb.me/react-unsafe-component-lifecycles', + _componentName, + newApiName, + foundWillMountName !== null ? '\n ' + foundWillMountName : '', + foundWillReceivePropsName !== null ? '\n ' + foundWillReceivePropsName : '', + foundWillUpdateName !== null ? '\n ' + foundWillUpdateName : '', + ); + } + } + } + } // Cache unmasked context so we can avoid recreating masked context unless necessary. + // ReactFiberContext usually updates this cache but can't for newly-created instances. + + if (isLegacyContextConsumer) { + cacheContext(workInProgress, unmaskedContext, context); + } + + return instance; + } + + function callComponentWillMount(workInProgress, instance) { + startPhaseTimer(workInProgress, 'componentWillMount'); + var oldState = instance.state; + + if (typeof instance.componentWillMount === 'function') { + instance.componentWillMount(); + } + + if (typeof instance.UNSAFE_componentWillMount === 'function') { + instance.UNSAFE_componentWillMount(); + } + + stopPhaseTimer(); + + if (oldState !== instance.state) { + { + warningWithoutStack$1( + false, + '%s.componentWillMount(): Assigning directly to this.state is ' + + "deprecated (except inside a component's " + + 'constructor). Use setState instead.', + getComponentName(workInProgress.type) || 'Component', + ); + } + + classComponentUpdater.enqueueReplaceState(instance, instance.state, null); + } + } + + function callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext) { + var oldState = instance.state; + startPhaseTimer(workInProgress, 'componentWillReceiveProps'); + + if (typeof instance.componentWillReceiveProps === 'function') { + instance.componentWillReceiveProps(newProps, nextContext); + } + + if (typeof instance.UNSAFE_componentWillReceiveProps === 'function') { + instance.UNSAFE_componentWillReceiveProps(newProps, nextContext); + } + + stopPhaseTimer(); + + if (instance.state !== oldState) { + { + var componentName = getComponentName(workInProgress.type) || 'Component'; + + if (!didWarnAboutStateAssignmentForComponent.has(componentName)) { + didWarnAboutStateAssignmentForComponent.add(componentName); + warningWithoutStack$1( + false, + '%s.componentWillReceiveProps(): Assigning directly to ' + + "this.state is deprecated (except inside a component's " + + 'constructor). Use setState instead.', + componentName, + ); + } + } + + classComponentUpdater.enqueueReplaceState(instance, instance.state, null); + } + } // Invokes the mount life-cycles on a previously never rendered instance. + + function mountClassInstance(workInProgress, ctor, newProps, renderExpirationTime) { + { + checkClassInstance(workInProgress, ctor, newProps); + } + + var instance = workInProgress.stateNode; + instance.props = newProps; + instance.state = workInProgress.memoizedState; + instance.refs = emptyRefsObject; + var contextType = ctor.contextType; + + if (typeof contextType === 'object' && contextType !== null) { + instance.context = readContext(contextType); + } else if (disableLegacyContext) { + instance.context = emptyContextObject; + } else { + var unmaskedContext = getUnmaskedContext(workInProgress, ctor, true); + instance.context = getMaskedContext(workInProgress, unmaskedContext); + } + + { + if (instance.state === newProps) { + var componentName = getComponentName(ctor) || 'Component'; + + if (!didWarnAboutDirectlyAssigningPropsToState.has(componentName)) { + didWarnAboutDirectlyAssigningPropsToState.add(componentName); + warningWithoutStack$1( + false, + '%s: It is not recommended to assign props directly to state ' + + "because updates to props won't be reflected in state. " + + 'In most cases, it is better to use props directly.', + componentName, + ); + } + } + + if (workInProgress.mode & StrictMode) { + ReactStrictModeWarnings.recordLegacyContextWarning(workInProgress, instance); + } + + if (warnAboutDeprecatedLifecycles) { + ReactStrictModeWarnings.recordUnsafeLifecycleWarnings(workInProgress, instance); + } + } + + var updateQueue = workInProgress.updateQueue; + + if (updateQueue !== null) { + processUpdateQueue(workInProgress, updateQueue, newProps, instance, renderExpirationTime); + instance.state = workInProgress.memoizedState; + } + + var getDerivedStateFromProps = ctor.getDerivedStateFromProps; + + if (typeof getDerivedStateFromProps === 'function') { + applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps); + instance.state = workInProgress.memoizedState; + } // In order to support react-lifecycles-compat polyfilled components, + // Unsafe lifecycles should not be invoked for components using the new APIs. + + if ( + typeof ctor.getDerivedStateFromProps !== 'function' && + typeof instance.getSnapshotBeforeUpdate !== 'function' && + (typeof instance.UNSAFE_componentWillMount === 'function' || + typeof instance.componentWillMount === 'function') + ) { + callComponentWillMount(workInProgress, instance); // If we had additional state updates during this life-cycle, let's + // process them now. + + updateQueue = workInProgress.updateQueue; + + if (updateQueue !== null) { + processUpdateQueue(workInProgress, updateQueue, newProps, instance, renderExpirationTime); + instance.state = workInProgress.memoizedState; + } + } + + if (typeof instance.componentDidMount === 'function') { + workInProgress.effectTag |= Update; + } + } + + function resumeMountClassInstance(workInProgress, ctor, newProps, renderExpirationTime) { + var instance = workInProgress.stateNode; + var oldProps = workInProgress.memoizedProps; + instance.props = oldProps; + var oldContext = instance.context; + var contextType = ctor.contextType; + var nextContext = emptyContextObject; + + if (typeof contextType === 'object' && contextType !== null) { + nextContext = readContext(contextType); + } else if (!disableLegacyContext) { + var nextLegacyUnmaskedContext = getUnmaskedContext(workInProgress, ctor, true); + nextContext = getMaskedContext(workInProgress, nextLegacyUnmaskedContext); + } + + var getDerivedStateFromProps = ctor.getDerivedStateFromProps; + var hasNewLifecycles = + typeof getDerivedStateFromProps === 'function' || + typeof instance.getSnapshotBeforeUpdate === 'function'; // Note: During these life-cycles, instance.props/instance.state are what + // ever the previously attempted to render - not the "current". However, + // during componentDidUpdate we pass the "current" props. + // In order to support react-lifecycles-compat polyfilled components, + // Unsafe lifecycles should not be invoked for components using the new APIs. + + if ( + !hasNewLifecycles && + (typeof instance.UNSAFE_componentWillReceiveProps === 'function' || + typeof instance.componentWillReceiveProps === 'function') + ) { + if (oldProps !== newProps || oldContext !== nextContext) { + callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext); + } + } + + resetHasForceUpdateBeforeProcessing(); + var oldState = workInProgress.memoizedState; + var newState = (instance.state = oldState); + var updateQueue = workInProgress.updateQueue; + + if (updateQueue !== null) { + processUpdateQueue(workInProgress, updateQueue, newProps, instance, renderExpirationTime); + newState = workInProgress.memoizedState; + } + + if ( + oldProps === newProps && + oldState === newState && + !hasContextChanged() && + !checkHasForceUpdateAfterProcessing() + ) { + // If an update was already in progress, we should schedule an Update + // effect even though we're bailing out, so that cWU/cDU are called. + if (typeof instance.componentDidMount === 'function') { + workInProgress.effectTag |= Update; + } + + return false; + } + + if (typeof getDerivedStateFromProps === 'function') { + applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps); + newState = workInProgress.memoizedState; + } + + var shouldUpdate = + checkHasForceUpdateAfterProcessing() || + checkShouldComponentUpdate( + workInProgress, + ctor, + oldProps, + newProps, + oldState, + newState, + nextContext, + ); + + if (shouldUpdate) { + // In order to support react-lifecycles-compat polyfilled components, + // Unsafe lifecycles should not be invoked for components using the new APIs. + if ( + !hasNewLifecycles && + (typeof instance.UNSAFE_componentWillMount === 'function' || + typeof instance.componentWillMount === 'function') + ) { + startPhaseTimer(workInProgress, 'componentWillMount'); + + if (typeof instance.componentWillMount === 'function') { + instance.componentWillMount(); + } + + if (typeof instance.UNSAFE_componentWillMount === 'function') { + instance.UNSAFE_componentWillMount(); + } + + stopPhaseTimer(); + } + + if (typeof instance.componentDidMount === 'function') { + workInProgress.effectTag |= Update; + } + } else { + // If an update was already in progress, we should schedule an Update + // effect even though we're bailing out, so that cWU/cDU are called. + if (typeof instance.componentDidMount === 'function') { + workInProgress.effectTag |= Update; + } // If shouldComponentUpdate returned false, we should still update the + // memoized state to indicate that this work can be reused. + + workInProgress.memoizedProps = newProps; + workInProgress.memoizedState = newState; + } // Update the existing instance's state, props, and context pointers even + // if shouldComponentUpdate returns false. + + instance.props = newProps; + instance.state = newState; + instance.context = nextContext; + return shouldUpdate; + } // Invokes the update life-cycles and returns false if it shouldn't rerender. + + function updateClassInstance(current, workInProgress, ctor, newProps, renderExpirationTime) { + var instance = workInProgress.stateNode; + var oldProps = workInProgress.memoizedProps; + instance.props = + workInProgress.type === workInProgress.elementType + ? oldProps + : resolveDefaultProps(workInProgress.type, oldProps); + var oldContext = instance.context; + var contextType = ctor.contextType; + var nextContext = emptyContextObject; + + if (typeof contextType === 'object' && contextType !== null) { + nextContext = readContext(contextType); + } else if (!disableLegacyContext) { + var nextUnmaskedContext = getUnmaskedContext(workInProgress, ctor, true); + nextContext = getMaskedContext(workInProgress, nextUnmaskedContext); + } + + var getDerivedStateFromProps = ctor.getDerivedStateFromProps; + var hasNewLifecycles = + typeof getDerivedStateFromProps === 'function' || + typeof instance.getSnapshotBeforeUpdate === 'function'; // Note: During these life-cycles, instance.props/instance.state are what + // ever the previously attempted to render - not the "current". However, + // during componentDidUpdate we pass the "current" props. + // In order to support react-lifecycles-compat polyfilled components, + // Unsafe lifecycles should not be invoked for components using the new APIs. + + if ( + !hasNewLifecycles && + (typeof instance.UNSAFE_componentWillReceiveProps === 'function' || + typeof instance.componentWillReceiveProps === 'function') + ) { + if (oldProps !== newProps || oldContext !== nextContext) { + callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext); + } + } + + resetHasForceUpdateBeforeProcessing(); + var oldState = workInProgress.memoizedState; + var newState = (instance.state = oldState); + var updateQueue = workInProgress.updateQueue; + + if (updateQueue !== null) { + processUpdateQueue(workInProgress, updateQueue, newProps, instance, renderExpirationTime); + newState = workInProgress.memoizedState; + } + + if ( + oldProps === newProps && + oldState === newState && + !hasContextChanged() && + !checkHasForceUpdateAfterProcessing() + ) { + // If an update was already in progress, we should schedule an Update + // effect even though we're bailing out, so that cWU/cDU are called. + if (typeof instance.componentDidUpdate === 'function') { + if (oldProps !== current.memoizedProps || oldState !== current.memoizedState) { + workInProgress.effectTag |= Update; + } + } + + if (typeof instance.getSnapshotBeforeUpdate === 'function') { + if (oldProps !== current.memoizedProps || oldState !== current.memoizedState) { + workInProgress.effectTag |= Snapshot; + } + } + + return false; + } + + if (typeof getDerivedStateFromProps === 'function') { + applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps); + newState = workInProgress.memoizedState; + } + + var shouldUpdate = + checkHasForceUpdateAfterProcessing() || + checkShouldComponentUpdate( + workInProgress, + ctor, + oldProps, + newProps, + oldState, + newState, + nextContext, + ); + + if (shouldUpdate) { + // In order to support react-lifecycles-compat polyfilled components, + // Unsafe lifecycles should not be invoked for components using the new APIs. + if ( + !hasNewLifecycles && + (typeof instance.UNSAFE_componentWillUpdate === 'function' || + typeof instance.componentWillUpdate === 'function') + ) { + startPhaseTimer(workInProgress, 'componentWillUpdate'); + + if (typeof instance.componentWillUpdate === 'function') { + instance.componentWillUpdate(newProps, newState, nextContext); + } + + if (typeof instance.UNSAFE_componentWillUpdate === 'function') { + instance.UNSAFE_componentWillUpdate(newProps, newState, nextContext); + } + + stopPhaseTimer(); + } + + if (typeof instance.componentDidUpdate === 'function') { + workInProgress.effectTag |= Update; + } + + if (typeof instance.getSnapshotBeforeUpdate === 'function') { + workInProgress.effectTag |= Snapshot; + } + } else { + // If an update was already in progress, we should schedule an Update + // effect even though we're bailing out, so that cWU/cDU are called. + if (typeof instance.componentDidUpdate === 'function') { + if (oldProps !== current.memoizedProps || oldState !== current.memoizedState) { + workInProgress.effectTag |= Update; + } + } + + if (typeof instance.getSnapshotBeforeUpdate === 'function') { + if (oldProps !== current.memoizedProps || oldState !== current.memoizedState) { + workInProgress.effectTag |= Snapshot; + } + } // If shouldComponentUpdate returned false, we should still update the + // memoized props/state to indicate that this work can be reused. + + workInProgress.memoizedProps = newProps; + workInProgress.memoizedState = newState; + } // Update the existing instance's state, props, and context pointers even + // if shouldComponentUpdate returns false. + + instance.props = newProps; + instance.state = newState; + instance.context = nextContext; + return shouldUpdate; + } + + var didWarnAboutMaps; + var didWarnAboutGenerators; + var didWarnAboutStringRefs; + var ownerHasKeyUseWarning; + var ownerHasFunctionTypeWarning; + + var warnForMissingKey = function (child) {}; + + { + didWarnAboutMaps = false; + didWarnAboutGenerators = false; + didWarnAboutStringRefs = {}; + /** + * Warn if there's no key explicitly set on dynamic arrays of children or + * object keys are not valid. This allows us to keep track of children between + * updates. + */ + + ownerHasKeyUseWarning = {}; + ownerHasFunctionTypeWarning = {}; + + warnForMissingKey = function (child) { + if (child === null || typeof child !== 'object') { + return; + } + + if (!child._store || child._store.validated || child.key != null) { + return; + } + + if (!(typeof child._store === 'object')) { + { + throw Error( + 'React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + + child._store.validated = true; + var currentComponentErrorInfo = + 'Each child in a list should have a unique ' + + '"key" prop. See https://fb.me/react-warning-keys for ' + + 'more information.' + + getCurrentFiberStackInDev(); + + if (ownerHasKeyUseWarning[currentComponentErrorInfo]) { + return; + } + + ownerHasKeyUseWarning[currentComponentErrorInfo] = true; + warning$1( + false, + 'Each child in a list should have a unique ' + + '"key" prop. See https://fb.me/react-warning-keys for ' + + 'more information.', + ); + }; + } + + var isArray = Array.isArray; + + function coerceRef(returnFiber, current$$1, element) { + var mixedRef = element.ref; + + if (mixedRef !== null && typeof mixedRef !== 'function' && typeof mixedRef !== 'object') { + { + // TODO: Clean this up once we turn on the string ref warning for + // everyone, because the strict mode case will no longer be relevant + if (returnFiber.mode & StrictMode || warnAboutStringRefs) { + var componentName = getComponentName(returnFiber.type) || 'Component'; + + if (!didWarnAboutStringRefs[componentName]) { + if (warnAboutStringRefs) { + warningWithoutStack$1( + false, + 'Component "%s" contains the string ref "%s". Support for string refs ' + + 'will be removed in a future major release. We recommend using ' + + 'useRef() or createRef() instead. ' + + 'Learn more about using refs safely here: ' + + 'https://fb.me/react-strict-mode-string-ref%s', + componentName, + mixedRef, + getStackByFiberInDevAndProd(returnFiber), + ); + } else { + warningWithoutStack$1( + false, + 'A string ref, "%s", has been found within a strict mode tree. ' + + 'String refs are a source of potential bugs and should be avoided. ' + + 'We recommend using useRef() or createRef() instead. ' + + 'Learn more about using refs safely here: ' + + 'https://fb.me/react-strict-mode-string-ref%s', + mixedRef, + getStackByFiberInDevAndProd(returnFiber), + ); + } + + didWarnAboutStringRefs[componentName] = true; + } + } + } + + if (element._owner) { + var owner = element._owner; + var inst; + + if (owner) { + var ownerFiber = owner; + + if (!(ownerFiber.tag === ClassComponent)) { + { + throw Error( + 'Function components cannot have refs. Did you mean to use React.forwardRef()?', + ); + } + } + + inst = ownerFiber.stateNode; + } + + if (!inst) { + { + throw Error( + 'Missing owner for string ref ' + + mixedRef + + '. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + + var stringRef = '' + mixedRef; // Check if previous string ref matches new string ref + + if ( + current$$1 !== null && + current$$1.ref !== null && + typeof current$$1.ref === 'function' && + current$$1.ref._stringRef === stringRef + ) { + return current$$1.ref; + } + + var ref = function (value) { + var refs = inst.refs; + + if (refs === emptyRefsObject) { + // This is a lazy pooled frozen object, so we need to initialize. + refs = inst.refs = {}; + } + + if (value === null) { + delete refs[stringRef]; + } else { + refs[stringRef] = value; + } + }; + + ref._stringRef = stringRef; + return ref; + } else { + if (!(typeof mixedRef === 'string')) { + { + throw Error( + 'Expected ref to be a function, a string, an object returned by React.createRef(), or null.', + ); + } + } + + if (!element._owner) { + { + throw Error( + 'Element ref was specified as a string (' + + mixedRef + + ") but no owner was set. This could happen for one of the following reasons:\n1. You may be adding a ref to a function component\n2. You may be adding a ref to a component that was not created inside a component's render method\n3. You have multiple copies of React loaded\nSee https://fb.me/react-refs-must-have-owner for more information.", + ); + } + } + } + } + + return mixedRef; + } + + function throwOnInvalidObjectType(returnFiber, newChild) { + if (returnFiber.type !== 'textarea') { + var addendum = ''; + + { + addendum = + ' If you meant to render a collection of children, use an array ' + + 'instead.' + + getCurrentFiberStackInDev(); + } + + { + { + throw Error( + 'Objects are not valid as a React child (found: ' + + (Object.prototype.toString.call(newChild) === '[object Object]' + ? 'object with keys {' + Object.keys(newChild).join(', ') + '}' + : newChild) + + ').' + + addendum, + ); + } + } + } + } + + function warnOnFunctionType() { + var currentComponentErrorInfo = + 'Functions are not valid as a React child. This may happen if ' + + 'you return a Component instead of <Component /> from render. ' + + 'Or maybe you meant to call this function rather than return it.' + + getCurrentFiberStackInDev(); + + if (ownerHasFunctionTypeWarning[currentComponentErrorInfo]) { + return; + } + + ownerHasFunctionTypeWarning[currentComponentErrorInfo] = true; + warning$1( + false, + 'Functions are not valid as a React child. This may happen if ' + + 'you return a Component instead of <Component /> from render. ' + + 'Or maybe you meant to call this function rather than return it.', + ); + } // This wrapper function exists because I expect to clone the code in each path + // to be able to optimize each path individually by branching early. This needs + // a compiler or we can do it manually. Helpers that don't need this branching + // live outside of this function. + + function ChildReconciler(shouldTrackSideEffects) { + function deleteChild(returnFiber, childToDelete) { + if (!shouldTrackSideEffects) { + // Noop. + return; + } // Deletions are added in reversed order so we add it to the front. + // At this point, the return fiber's effect list is empty except for + // deletions, so we can just append the deletion to the list. The remaining + // effects aren't added until the complete phase. Once we implement + // resuming, this may not be true. + + var last = returnFiber.lastEffect; + + if (last !== null) { + last.nextEffect = childToDelete; + returnFiber.lastEffect = childToDelete; + } else { + returnFiber.firstEffect = returnFiber.lastEffect = childToDelete; + } + + childToDelete.nextEffect = null; + childToDelete.effectTag = Deletion; + } + + function deleteRemainingChildren(returnFiber, currentFirstChild) { + if (!shouldTrackSideEffects) { + // Noop. + return null; + } // TODO: For the shouldClone case, this could be micro-optimized a bit by + // assuming that after the first child we've already added everything. + + var childToDelete = currentFirstChild; + + while (childToDelete !== null) { + deleteChild(returnFiber, childToDelete); + childToDelete = childToDelete.sibling; + } + + return null; + } + + function mapRemainingChildren(returnFiber, currentFirstChild) { + // Add the remaining children to a temporary map so that we can find them by + // keys quickly. Implicit (null) keys get added to this set with their index + // instead. + var existingChildren = new Map(); + var existingChild = currentFirstChild; + + while (existingChild !== null) { + if (existingChild.key !== null) { + existingChildren.set(existingChild.key, existingChild); + } else { + existingChildren.set(existingChild.index, existingChild); + } + + existingChild = existingChild.sibling; + } + + return existingChildren; + } + + function useFiber(fiber, pendingProps, expirationTime) { + // We currently set sibling to null and index to 0 here because it is easy + // to forget to do before returning it. E.g. for the single child case. + var clone = createWorkInProgress(fiber, pendingProps, expirationTime); + clone.index = 0; + clone.sibling = null; + return clone; + } + + function placeChild(newFiber, lastPlacedIndex, newIndex) { + newFiber.index = newIndex; + + if (!shouldTrackSideEffects) { + // Noop. + return lastPlacedIndex; + } + + var current$$1 = newFiber.alternate; + + if (current$$1 !== null) { + var oldIndex = current$$1.index; + + if (oldIndex < lastPlacedIndex) { + // This is a move. + newFiber.effectTag = Placement; + return lastPlacedIndex; + } else { + // This item can stay in place. + return oldIndex; + } + } else { + // This is an insertion. + newFiber.effectTag = Placement; + return lastPlacedIndex; + } + } + + function placeSingleChild(newFiber) { + // This is simpler for the single child case. We only need to do a + // placement for inserting new children. + if (shouldTrackSideEffects && newFiber.alternate === null) { + newFiber.effectTag = Placement; + } + + return newFiber; + } + + function updateTextNode(returnFiber, current$$1, textContent, expirationTime) { + if (current$$1 === null || current$$1.tag !== HostText) { + // Insert + var created = createFiberFromText(textContent, returnFiber.mode, expirationTime); + created.return = returnFiber; + return created; + } else { + // Update + var existing = useFiber(current$$1, textContent, expirationTime); + existing.return = returnFiber; + return existing; + } + } + + function updateElement(returnFiber, current$$1, element, expirationTime) { + if ( + current$$1 !== null && + (current$$1.elementType === element.type || // Keep this check inline so it only runs on the false path: + isCompatibleFamilyForHotReloading(current$$1, element)) + ) { + // Move based on index + var existing = useFiber(current$$1, element.props, expirationTime); + existing.ref = coerceRef(returnFiber, current$$1, element); + existing.return = returnFiber; + + { + existing._debugSource = element._source; + existing._debugOwner = element._owner; + } + + return existing; + } else { + // Insert + var created = createFiberFromElement(element, returnFiber.mode, expirationTime); + created.ref = coerceRef(returnFiber, current$$1, element); + created.return = returnFiber; + return created; + } + } + + function updatePortal(returnFiber, current$$1, portal, expirationTime) { + if ( + current$$1 === null || + current$$1.tag !== HostPortal || + current$$1.stateNode.containerInfo !== portal.containerInfo || + current$$1.stateNode.implementation !== portal.implementation + ) { + // Insert + var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime); + created.return = returnFiber; + return created; + } else { + // Update + var existing = useFiber(current$$1, portal.children || [], expirationTime); + existing.return = returnFiber; + return existing; + } + } + + function updateFragment(returnFiber, current$$1, fragment, expirationTime, key) { + if (current$$1 === null || current$$1.tag !== Fragment) { + // Insert + var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key); + created.return = returnFiber; + return created; + } else { + // Update + var existing = useFiber(current$$1, fragment, expirationTime); + existing.return = returnFiber; + return existing; + } + } + + function createChild(returnFiber, newChild, expirationTime) { + if (typeof newChild === 'string' || typeof newChild === 'number') { + // Text nodes don't have keys. If the previous node is implicitly keyed + // we can continue to replace it without aborting even if it is not a text + // node. + var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime); + created.return = returnFiber; + return created; + } + + if (typeof newChild === 'object' && newChild !== null) { + switch (newChild.$$typeof) { + case REACT_ELEMENT_TYPE: { + var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime); + + _created.ref = coerceRef(returnFiber, null, newChild); + _created.return = returnFiber; + return _created; + } + + case REACT_PORTAL_TYPE: { + var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime); + + _created2.return = returnFiber; + return _created2; + } + } + + if (isArray(newChild) || getIteratorFn(newChild)) { + var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null); + + _created3.return = returnFiber; + return _created3; + } + + throwOnInvalidObjectType(returnFiber, newChild); + } + + { + if (typeof newChild === 'function') { + warnOnFunctionType(); + } + } + + return null; + } + + function updateSlot(returnFiber, oldFiber, newChild, expirationTime) { + // Update the fiber if the keys match, otherwise return null. + var key = oldFiber !== null ? oldFiber.key : null; + + if (typeof newChild === 'string' || typeof newChild === 'number') { + // Text nodes don't have keys. If the previous node is implicitly keyed + // we can continue to replace it without aborting even if it is not a text + // node. + if (key !== null) { + return null; + } + + return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime); + } + + if (typeof newChild === 'object' && newChild !== null) { + switch (newChild.$$typeof) { + case REACT_ELEMENT_TYPE: { + if (newChild.key === key) { + if (newChild.type === REACT_FRAGMENT_TYPE) { + return updateFragment( + returnFiber, + oldFiber, + newChild.props.children, + expirationTime, + key, + ); + } + + return updateElement(returnFiber, oldFiber, newChild, expirationTime); + } else { + return null; + } + } + + case REACT_PORTAL_TYPE: { + if (newChild.key === key) { + return updatePortal(returnFiber, oldFiber, newChild, expirationTime); + } else { + return null; + } + } + } + + if (isArray(newChild) || getIteratorFn(newChild)) { + if (key !== null) { + return null; + } + + return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null); + } + + throwOnInvalidObjectType(returnFiber, newChild); + } + + { + if (typeof newChild === 'function') { + warnOnFunctionType(); + } + } + + return null; + } + + function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) { + if (typeof newChild === 'string' || typeof newChild === 'number') { + // Text nodes don't have keys, so we neither have to check the old nor + // new node for the key. If both are text nodes, they match. + var matchedFiber = existingChildren.get(newIdx) || null; + return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime); + } + + if (typeof newChild === 'object' && newChild !== null) { + switch (newChild.$$typeof) { + case REACT_ELEMENT_TYPE: { + var _matchedFiber = + existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null; + + if (newChild.type === REACT_FRAGMENT_TYPE) { + return updateFragment( + returnFiber, + _matchedFiber, + newChild.props.children, + expirationTime, + newChild.key, + ); + } + + return updateElement(returnFiber, _matchedFiber, newChild, expirationTime); + } + + case REACT_PORTAL_TYPE: { + var _matchedFiber2 = + existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null; + + return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime); + } + } + + if (isArray(newChild) || getIteratorFn(newChild)) { + var _matchedFiber3 = existingChildren.get(newIdx) || null; + + return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null); + } + + throwOnInvalidObjectType(returnFiber, newChild); + } + + { + if (typeof newChild === 'function') { + warnOnFunctionType(); + } + } + + return null; + } + /** + * Warns if there is a duplicate or missing key + */ + + function warnOnInvalidKey(child, knownKeys) { + { + if (typeof child !== 'object' || child === null) { + return knownKeys; + } + + switch (child.$$typeof) { + case REACT_ELEMENT_TYPE: + case REACT_PORTAL_TYPE: + warnForMissingKey(child); + var key = child.key; + + if (typeof key !== 'string') { + break; + } + + if (knownKeys === null) { + knownKeys = new Set(); + knownKeys.add(key); + break; + } + + if (!knownKeys.has(key)) { + knownKeys.add(key); + break; + } + + warning$1( + false, + 'Encountered two children with the same key, `%s`. ' + + 'Keys should be unique so that components maintain their identity ' + + 'across updates. Non-unique keys may cause children to be ' + + 'duplicated and/or omitted — the behavior is unsupported and ' + + 'could change in a future version.', + key, + ); + break; + + default: + break; + } + } + + return knownKeys; + } + + function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) { + // This algorithm can't optimize by searching from both ends since we + // don't have backpointers on fibers. I'm trying to see how far we can get + // with that model. If it ends up not being worth the tradeoffs, we can + // add it later. + // Even with a two ended optimization, we'd want to optimize for the case + // where there are few changes and brute force the comparison instead of + // going for the Map. It'd like to explore hitting that path first in + // forward-only mode and only go for the Map once we notice that we need + // lots of look ahead. This doesn't handle reversal as well as two ended + // search but that's unusual. Besides, for the two ended optimization to + // work on Iterables, we'd need to copy the whole set. + // In this first iteration, we'll just live with hitting the bad case + // (adding everything to a Map) in for every insert/move. + // If you change this code, also update reconcileChildrenIterator() which + // uses the same algorithm. + { + // First, validate keys. + var knownKeys = null; + + for (var i = 0; i < newChildren.length; i++) { + var child = newChildren[i]; + knownKeys = warnOnInvalidKey(child, knownKeys); + } + } + + var resultingFirstChild = null; + var previousNewFiber = null; + var oldFiber = currentFirstChild; + var lastPlacedIndex = 0; + var newIdx = 0; + var nextOldFiber = null; + + for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) { + if (oldFiber.index > newIdx) { + nextOldFiber = oldFiber; + oldFiber = null; + } else { + nextOldFiber = oldFiber.sibling; + } + + var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime); + + if (newFiber === null) { + // TODO: This breaks on empty slots like null children. That's + // unfortunate because it triggers the slow path all the time. We need + // a better way to communicate whether this was a miss or null, + // boolean, undefined, etc. + if (oldFiber === null) { + oldFiber = nextOldFiber; + } + + break; + } + + if (shouldTrackSideEffects) { + if (oldFiber && newFiber.alternate === null) { + // We matched the slot, but we didn't reuse the existing fiber, so we + // need to delete the existing child. + deleteChild(returnFiber, oldFiber); + } + } + + lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx); + + if (previousNewFiber === null) { + // TODO: Move out of the loop. This only happens for the first run. + resultingFirstChild = newFiber; + } else { + // TODO: Defer siblings if we're not at the right index for this slot. + // I.e. if we had null values before, then we want to defer this + // for each null value. However, we also don't want to call updateSlot + // with the previous one. + previousNewFiber.sibling = newFiber; + } + + previousNewFiber = newFiber; + oldFiber = nextOldFiber; + } + + if (newIdx === newChildren.length) { + // We've reached the end of the new children. We can delete the rest. + deleteRemainingChildren(returnFiber, oldFiber); + return resultingFirstChild; + } + + if (oldFiber === null) { + // If we don't have any more existing children we can choose a fast path + // since the rest will all be insertions. + for (; newIdx < newChildren.length; newIdx++) { + var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime); + + if (_newFiber === null) { + continue; + } + + lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx); + + if (previousNewFiber === null) { + // TODO: Move out of the loop. This only happens for the first run. + resultingFirstChild = _newFiber; + } else { + previousNewFiber.sibling = _newFiber; + } + + previousNewFiber = _newFiber; + } + + return resultingFirstChild; + } // Add all children to a key map for quick lookups. + + var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves. + + for (; newIdx < newChildren.length; newIdx++) { + var _newFiber2 = updateFromMap( + existingChildren, + returnFiber, + newIdx, + newChildren[newIdx], + expirationTime, + ); + + if (_newFiber2 !== null) { + if (shouldTrackSideEffects) { + if (_newFiber2.alternate !== null) { + // The new fiber is a work in progress, but if there exists a + // current, that means that we reused the fiber. We need to delete + // it from the child list so that we don't add it to the deletion + // list. + existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key); + } + } + + lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx); + + if (previousNewFiber === null) { + resultingFirstChild = _newFiber2; + } else { + previousNewFiber.sibling = _newFiber2; + } + + previousNewFiber = _newFiber2; + } + } + + if (shouldTrackSideEffects) { + // Any existing children that weren't consumed above were deleted. We need + // to add them to the deletion list. + existingChildren.forEach(function (child) { + return deleteChild(returnFiber, child); + }); + } + + return resultingFirstChild; + } + + function reconcileChildrenIterator( + returnFiber, + currentFirstChild, + newChildrenIterable, + expirationTime, + ) { + // This is the same implementation as reconcileChildrenArray(), + // but using the iterator instead. + var iteratorFn = getIteratorFn(newChildrenIterable); + + if (!(typeof iteratorFn === 'function')) { + { + throw Error( + 'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + + { + // We don't support rendering Generators because it's a mutation. + // See https://github.com/facebook/react/issues/12995 + if ( + typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag + newChildrenIterable[Symbol.toStringTag] === 'Generator' + ) { + !didWarnAboutGenerators + ? warning$1( + false, + 'Using Generators as children is unsupported and will likely yield ' + + 'unexpected results because enumerating a generator mutates it. ' + + 'You may convert it to an array with `Array.from()` or the ' + + '`[...spread]` operator before rendering. Keep in mind ' + + 'you might need to polyfill these features for older browsers.', + ) + : void 0; + didWarnAboutGenerators = true; + } // Warn about using Maps as children + + if (newChildrenIterable.entries === iteratorFn) { + !didWarnAboutMaps + ? warning$1( + false, + 'Using Maps as children is unsupported and will likely yield ' + + 'unexpected results. Convert it to a sequence/iterable of keyed ' + + 'ReactElements instead.', + ) + : void 0; + didWarnAboutMaps = true; + } // First, validate keys. + // We'll get a different iterator later for the main pass. + + var _newChildren = iteratorFn.call(newChildrenIterable); + + if (_newChildren) { + var knownKeys = null; + + var _step = _newChildren.next(); + + for (; !_step.done; _step = _newChildren.next()) { + var child = _step.value; + knownKeys = warnOnInvalidKey(child, knownKeys); + } + } + } + + var newChildren = iteratorFn.call(newChildrenIterable); + + if (!(newChildren != null)) { + { + throw Error('An iterable object provided no iterator.'); + } + } + + var resultingFirstChild = null; + var previousNewFiber = null; + var oldFiber = currentFirstChild; + var lastPlacedIndex = 0; + var newIdx = 0; + var nextOldFiber = null; + var step = newChildren.next(); + + for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) { + if (oldFiber.index > newIdx) { + nextOldFiber = oldFiber; + oldFiber = null; + } else { + nextOldFiber = oldFiber.sibling; + } + + var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime); + + if (newFiber === null) { + // TODO: This breaks on empty slots like null children. That's + // unfortunate because it triggers the slow path all the time. We need + // a better way to communicate whether this was a miss or null, + // boolean, undefined, etc. + if (oldFiber === null) { + oldFiber = nextOldFiber; + } + + break; + } + + if (shouldTrackSideEffects) { + if (oldFiber && newFiber.alternate === null) { + // We matched the slot, but we didn't reuse the existing fiber, so we + // need to delete the existing child. + deleteChild(returnFiber, oldFiber); + } + } + + lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx); + + if (previousNewFiber === null) { + // TODO: Move out of the loop. This only happens for the first run. + resultingFirstChild = newFiber; + } else { + // TODO: Defer siblings if we're not at the right index for this slot. + // I.e. if we had null values before, then we want to defer this + // for each null value. However, we also don't want to call updateSlot + // with the previous one. + previousNewFiber.sibling = newFiber; + } + + previousNewFiber = newFiber; + oldFiber = nextOldFiber; + } + + if (step.done) { + // We've reached the end of the new children. We can delete the rest. + deleteRemainingChildren(returnFiber, oldFiber); + return resultingFirstChild; + } + + if (oldFiber === null) { + // If we don't have any more existing children we can choose a fast path + // since the rest will all be insertions. + for (; !step.done; newIdx++, step = newChildren.next()) { + var _newFiber3 = createChild(returnFiber, step.value, expirationTime); + + if (_newFiber3 === null) { + continue; + } + + lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx); + + if (previousNewFiber === null) { + // TODO: Move out of the loop. This only happens for the first run. + resultingFirstChild = _newFiber3; + } else { + previousNewFiber.sibling = _newFiber3; + } + + previousNewFiber = _newFiber3; + } + + return resultingFirstChild; + } // Add all children to a key map for quick lookups. + + var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves. + + for (; !step.done; newIdx++, step = newChildren.next()) { + var _newFiber4 = updateFromMap( + existingChildren, + returnFiber, + newIdx, + step.value, + expirationTime, + ); + + if (_newFiber4 !== null) { + if (shouldTrackSideEffects) { + if (_newFiber4.alternate !== null) { + // The new fiber is a work in progress, but if there exists a + // current, that means that we reused the fiber. We need to delete + // it from the child list so that we don't add it to the deletion + // list. + existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key); + } + } + + lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx); + + if (previousNewFiber === null) { + resultingFirstChild = _newFiber4; + } else { + previousNewFiber.sibling = _newFiber4; + } + + previousNewFiber = _newFiber4; + } + } + + if (shouldTrackSideEffects) { + // Any existing children that weren't consumed above were deleted. We need + // to add them to the deletion list. + existingChildren.forEach(function (child) { + return deleteChild(returnFiber, child); + }); + } + + return resultingFirstChild; + } + + function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) { + // There's no need to check for keys on text nodes since we don't have a + // way to define them. + if (currentFirstChild !== null && currentFirstChild.tag === HostText) { + // We already have an existing node so let's just update it and delete + // the rest. + deleteRemainingChildren(returnFiber, currentFirstChild.sibling); + var existing = useFiber(currentFirstChild, textContent, expirationTime); + existing.return = returnFiber; + return existing; + } // The existing first child is not a text node so we need to create one + // and delete the existing ones. + + deleteRemainingChildren(returnFiber, currentFirstChild); + var created = createFiberFromText(textContent, returnFiber.mode, expirationTime); + created.return = returnFiber; + return created; + } + + function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) { + var key = element.key; + var child = currentFirstChild; + + while (child !== null) { + // TODO: If key === null and child.key === null, then this only applies to + // the first item in the list. + if (child.key === key) { + if ( + child.tag === Fragment + ? element.type === REACT_FRAGMENT_TYPE + : child.elementType === element.type || // Keep this check inline so it only runs on the false path: + isCompatibleFamilyForHotReloading(child, element) + ) { + deleteRemainingChildren(returnFiber, child.sibling); + var existing = useFiber( + child, + element.type === REACT_FRAGMENT_TYPE ? element.props.children : element.props, + expirationTime, + ); + existing.ref = coerceRef(returnFiber, child, element); + existing.return = returnFiber; + + { + existing._debugSource = element._source; + existing._debugOwner = element._owner; + } + + return existing; + } else { + deleteRemainingChildren(returnFiber, child); + break; + } + } else { + deleteChild(returnFiber, child); + } + + child = child.sibling; + } + + if (element.type === REACT_FRAGMENT_TYPE) { + var created = createFiberFromFragment( + element.props.children, + returnFiber.mode, + expirationTime, + element.key, + ); + created.return = returnFiber; + return created; + } else { + var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime); + + _created4.ref = coerceRef(returnFiber, currentFirstChild, element); + _created4.return = returnFiber; + return _created4; + } + } + + function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) { + var key = portal.key; + var child = currentFirstChild; + + while (child !== null) { + // TODO: If key === null and child.key === null, then this only applies to + // the first item in the list. + if (child.key === key) { + if ( + child.tag === HostPortal && + child.stateNode.containerInfo === portal.containerInfo && + child.stateNode.implementation === portal.implementation + ) { + deleteRemainingChildren(returnFiber, child.sibling); + var existing = useFiber(child, portal.children || [], expirationTime); + existing.return = returnFiber; + return existing; + } else { + deleteRemainingChildren(returnFiber, child); + break; + } + } else { + deleteChild(returnFiber, child); + } + + child = child.sibling; + } + + var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime); + created.return = returnFiber; + return created; + } // This API will tag the children with the side-effect of the reconciliation + // itself. They will be added to the side-effect list as we pass through the + // children and the parent. + + function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) { + // This function is not recursive. + // If the top level item is an array, we treat it as a set of children, + // not as a fragment. Nested arrays on the other hand will be treated as + // fragment nodes. Recursion happens at the normal flow. + // Handle top level unkeyed fragments as if they were arrays. + // This leads to an ambiguity between <>{[...]}</> and <>...</>. + // We treat the ambiguous cases above the same. + var isUnkeyedTopLevelFragment = + typeof newChild === 'object' && + newChild !== null && + newChild.type === REACT_FRAGMENT_TYPE && + newChild.key === null; + + if (isUnkeyedTopLevelFragment) { + newChild = newChild.props.children; + } // Handle object types + + var isObject = typeof newChild === 'object' && newChild !== null; + + if (isObject) { + switch (newChild.$$typeof) { + case REACT_ELEMENT_TYPE: + return placeSingleChild( + reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime), + ); + + case REACT_PORTAL_TYPE: + return placeSingleChild( + reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime), + ); + } + } + + if (typeof newChild === 'string' || typeof newChild === 'number') { + return placeSingleChild( + reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime), + ); + } + + if (isArray(newChild)) { + return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime); + } + + if (getIteratorFn(newChild)) { + return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime); + } + + if (isObject) { + throwOnInvalidObjectType(returnFiber, newChild); + } + + { + if (typeof newChild === 'function') { + warnOnFunctionType(); + } + } + + if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) { + // If the new child is undefined, and the return fiber is a composite + // component, throw an error. If Fiber return types are disabled, + // we already threw above. + switch (returnFiber.tag) { + case ClassComponent: { + { + var instance = returnFiber.stateNode; + + if (instance.render._isMockFunction) { + // We allow auto-mocks to proceed as if they're returning null. + break; + } + } + } + // Intentionally fall through to the next case, which handles both + // functions and classes + // eslint-disable-next-lined no-fallthrough + + case FunctionComponent: { + var Component = returnFiber.type; + + { + { + throw Error( + (Component.displayName || Component.name || 'Component') + + '(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.', + ); + } + } + } + } + } // Remaining cases are all treated as empty. + + return deleteRemainingChildren(returnFiber, currentFirstChild); + } + + return reconcileChildFibers; + } + + var reconcileChildFibers = ChildReconciler(true); + var mountChildFibers = ChildReconciler(false); + function cloneChildFibers(current$$1, workInProgress) { + if (!(current$$1 === null || workInProgress.child === current$$1.child)) { + { + throw Error('Resuming work not yet implemented.'); + } + } + + if (workInProgress.child === null) { + return; + } + + var currentChild = workInProgress.child; + var newChild = createWorkInProgress( + currentChild, + currentChild.pendingProps, + currentChild.expirationTime, + ); + workInProgress.child = newChild; + newChild.return = workInProgress; + + while (currentChild.sibling !== null) { + currentChild = currentChild.sibling; + newChild = newChild.sibling = createWorkInProgress( + currentChild, + currentChild.pendingProps, + currentChild.expirationTime, + ); + newChild.return = workInProgress; + } + + newChild.sibling = null; + } // Reset a workInProgress child set to prepare it for a second pass. + + function resetChildFibers(workInProgress, renderExpirationTime) { + var child = workInProgress.child; + + while (child !== null) { + resetWorkInProgress(child, renderExpirationTime); + child = child.sibling; + } + } + + var NO_CONTEXT = {}; + var contextStackCursor$1 = createCursor(NO_CONTEXT); + var contextFiberStackCursor = createCursor(NO_CONTEXT); + var rootInstanceStackCursor = createCursor(NO_CONTEXT); + + function requiredContext(c) { + if (!(c !== NO_CONTEXT)) { + { + throw Error( + 'Expected host context to exist. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + + return c; + } + + function getRootHostContainer() { + var rootInstance = requiredContext(rootInstanceStackCursor.current); + return rootInstance; + } + + function pushHostContainer(fiber, nextRootInstance) { + // Push current root instance onto the stack; + // This allows us to reset root when portals are popped. + push(rootInstanceStackCursor, nextRootInstance, fiber); // Track the context and the Fiber that provided it. + // This enables us to pop only Fibers that provide unique contexts. + + push(contextFiberStackCursor, fiber, fiber); // Finally, we need to push the host context to the stack. + // However, we can't just call getRootHostContext() and push it because + // we'd have a different number of entries on the stack depending on + // whether getRootHostContext() throws somewhere in renderer code or not. + // So we push an empty value first. This lets us safely unwind on errors. + + push(contextStackCursor$1, NO_CONTEXT, fiber); + var nextRootContext = getRootHostContext(nextRootInstance); // Now that we know this function doesn't throw, replace it. + + pop(contextStackCursor$1, fiber); + push(contextStackCursor$1, nextRootContext, fiber); + } + + function popHostContainer(fiber) { + pop(contextStackCursor$1, fiber); + pop(contextFiberStackCursor, fiber); + pop(rootInstanceStackCursor, fiber); + } + + function getHostContext() { + var context = requiredContext(contextStackCursor$1.current); + return context; + } + + function pushHostContext(fiber) { + var rootInstance = requiredContext(rootInstanceStackCursor.current); + var context = requiredContext(contextStackCursor$1.current); + var nextContext = getChildHostContext(context, fiber.type, rootInstance); // Don't push this Fiber's context unless it's unique. + + if (context === nextContext) { + return; + } // Track the context and the Fiber that provided it. + // This enables us to pop only Fibers that provide unique contexts. + + push(contextFiberStackCursor, fiber, fiber); + push(contextStackCursor$1, nextContext, fiber); + } + + function popHostContext(fiber) { + // Do not pop unless this Fiber provided the current context. + // pushHostContext() only pushes Fibers that provide unique contexts. + if (contextFiberStackCursor.current !== fiber) { + return; + } + + pop(contextStackCursor$1, fiber); + pop(contextFiberStackCursor, fiber); + } + + var DefaultSuspenseContext = 0; // The Suspense Context is split into two parts. The lower bits is + // inherited deeply down the subtree. The upper bits only affect + // this immediate suspense boundary and gets reset each new + // boundary or suspense list. + + var SubtreeSuspenseContextMask = 1; // Subtree Flags: + // InvisibleParentSuspenseContext indicates that one of our parent Suspense + // boundaries is not currently showing visible main content. + // Either because it is already showing a fallback or is not mounted at all. + // We can use this to determine if it is desirable to trigger a fallback at + // the parent. If not, then we might need to trigger undesirable boundaries + // and/or suspend the commit to avoid hiding the parent content. + + var InvisibleParentSuspenseContext = 1; // Shallow Flags: + // ForceSuspenseFallback can be used by SuspenseList to force newly added + // items into their fallback state during one of the render passes. + + var ForceSuspenseFallback = 2; + var suspenseStackCursor = createCursor(DefaultSuspenseContext); + function hasSuspenseContext(parentContext, flag) { + return (parentContext & flag) !== 0; + } + function setDefaultShallowSuspenseContext(parentContext) { + return parentContext & SubtreeSuspenseContextMask; + } + function setShallowSuspenseContext(parentContext, shallowContext) { + return (parentContext & SubtreeSuspenseContextMask) | shallowContext; + } + function addSubtreeSuspenseContext(parentContext, subtreeContext) { + return parentContext | subtreeContext; + } + function pushSuspenseContext(fiber, newContext) { + push(suspenseStackCursor, newContext, fiber); + } + function popSuspenseContext(fiber) { + pop(suspenseStackCursor, fiber); + } + + function shouldCaptureSuspense(workInProgress, hasInvisibleParent) { + // If it was the primary children that just suspended, capture and render the + // fallback. Otherwise, don't capture and bubble to the next boundary. + var nextState = workInProgress.memoizedState; + + if (nextState !== null) { + if (nextState.dehydrated !== null) { + // A dehydrated boundary always captures. + return true; + } + + return false; + } + + var props = workInProgress.memoizedProps; // In order to capture, the Suspense component must have a fallback prop. + + if (props.fallback === undefined) { + return false; + } // Regular boundaries always capture. + + if (props.unstable_avoidThisFallback !== true) { + return true; + } // If it's a boundary we should avoid, then we prefer to bubble up to the + // parent boundary if it is currently invisible. + + if (hasInvisibleParent) { + return false; + } // If the parent is not able to handle it, we must handle it. + + return true; + } + function findFirstSuspended(row) { + var node = row; + + while (node !== null) { + if (node.tag === SuspenseComponent) { + var state = node.memoizedState; + + if (state !== null) { + var dehydrated = state.dehydrated; + + if ( + dehydrated === null || + isSuspenseInstancePending(dehydrated) || + isSuspenseInstanceFallback(dehydrated) + ) { + return node; + } + } + } else if ( + node.tag === SuspenseListComponent && // revealOrder undefined can't be trusted because it don't + // keep track of whether it suspended or not. + node.memoizedProps.revealOrder !== undefined + ) { + var didSuspend = (node.effectTag & DidCapture) !== NoEffect; + + if (didSuspend) { + return node; + } + } else if (node.child !== null) { + node.child.return = node; + node = node.child; + continue; + } + + if (node === row) { + return null; + } + + while (node.sibling === null) { + if (node.return === null || node.return === row) { + return null; + } + + node = node.return; + } + + node.sibling.return = node.return; + node = node.sibling; + } + + return null; + } + + var emptyObject = {}; + var isArray$2 = Array.isArray; + function createResponderInstance(responder, responderProps, responderState, fiber) { + return { + fiber: fiber, + props: responderProps, + responder: responder, + rootEventTypes: null, + state: responderState, + }; + } + + function mountEventResponder$1( + responder, + responderProps, + fiber, + respondersMap, + rootContainerInstance, + ) { + var responderState = emptyObject; + var getInitialState = responder.getInitialState; + + if (getInitialState !== null) { + responderState = getInitialState(responderProps); + } + + var responderInstance = createResponderInstance(responder, responderProps, responderState, fiber); + + if (!rootContainerInstance) { + var node = fiber; + + while (node !== null) { + var tag = node.tag; + + if (tag === HostComponent) { + rootContainerInstance = node.stateNode; + break; + } else if (tag === HostRoot) { + rootContainerInstance = node.stateNode.containerInfo; + break; + } + + node = node.return; + } + } + + mountResponderInstance( + responder, + responderInstance, + responderProps, + responderState, + rootContainerInstance, + ); + respondersMap.set(responder, responderInstance); + } + + function updateEventListener( + listener, + fiber, + visistedResponders, + respondersMap, + rootContainerInstance, + ) { + var responder; + var props; + + if (listener) { + responder = listener.responder; + props = listener.props; + } + + if (!(responder && responder.$$typeof === REACT_RESPONDER_TYPE)) { + { + throw Error( + 'An invalid value was used as an event listener. Expect one or many event listeners created via React.unstable_useResponder().', + ); + } + } + + var listenerProps = props; + + if (visistedResponders.has(responder)) { + // show warning + { + warning$1( + false, + 'Duplicate event responder "%s" found in event listeners. ' + + 'Event listeners passed to elements cannot use the same event responder more than once.', + responder.displayName, + ); + } + + return; + } + + visistedResponders.add(responder); + var responderInstance = respondersMap.get(responder); + + if (responderInstance === undefined) { + // Mount (happens in either complete or commit phase) + mountEventResponder$1(responder, listenerProps, fiber, respondersMap, rootContainerInstance); + } else { + // Update (happens during commit phase only) + responderInstance.props = listenerProps; + responderInstance.fiber = fiber; + } + } + + function updateEventListeners(listeners, fiber, rootContainerInstance) { + var visistedResponders = new Set(); + var dependencies = fiber.dependencies; + + if (listeners != null) { + if (dependencies === null) { + dependencies = fiber.dependencies = { + expirationTime: NoWork, + firstContext: null, + responders: new Map(), + }; + } + + var respondersMap = dependencies.responders; + + if (respondersMap === null) { + respondersMap = new Map(); + } + + if (isArray$2(listeners)) { + for (var i = 0, length = listeners.length; i < length; i++) { + var listener = listeners[i]; + updateEventListener( + listener, + fiber, + visistedResponders, + respondersMap, + rootContainerInstance, + ); + } + } else { + updateEventListener( + listeners, + fiber, + visistedResponders, + respondersMap, + rootContainerInstance, + ); + } + } + + if (dependencies !== null) { + var _respondersMap = dependencies.responders; + + if (_respondersMap !== null) { + // Unmount + var mountedResponders = Array.from(_respondersMap.keys()); + + for (var _i = 0, _length = mountedResponders.length; _i < _length; _i++) { + var mountedResponder = mountedResponders[_i]; + + if (!visistedResponders.has(mountedResponder)) { + var responderInstance = _respondersMap.get(mountedResponder); + + unmountResponderInstance(responderInstance); + + _respondersMap.delete(mountedResponder); + } + } + } + } + } + function createResponderListener(responder, props) { + var eventResponderListener = { + responder: responder, + props: props, + }; + + { + Object.freeze(eventResponderListener); + } + + return eventResponderListener; + } + + var NoEffect$1 = + /* */ + 0; + var UnmountSnapshot = + /* */ + 2; + var UnmountMutation = + /* */ + 4; + var MountMutation = + /* */ + 8; + var UnmountLayout = + /* */ + 16; + var MountLayout = + /* */ + 32; + var MountPassive = + /* */ + 64; + var UnmountPassive = + /* */ + 128; + + var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher; + var ReactCurrentBatchConfig$1 = ReactSharedInternals.ReactCurrentBatchConfig; + var didWarnAboutMismatchedHooksForComponent; + + { + didWarnAboutMismatchedHooksForComponent = new Set(); + } + + // These are set right before calling the component. + var renderExpirationTime$1 = NoWork; // The work-in-progress fiber. I've named it differently to distinguish it from + // the work-in-progress hook. + + var currentlyRenderingFiber$1 = null; // Hooks are stored as a linked list on the fiber's memoizedState field. The + // current hook list is the list that belongs to the current fiber. The + // work-in-progress hook list is a new list that will be added to the + // work-in-progress fiber. + + var currentHook = null; + var nextCurrentHook = null; + var firstWorkInProgressHook = null; + var workInProgressHook = null; + var nextWorkInProgressHook = null; + var remainingExpirationTime = NoWork; + var componentUpdateQueue = null; + var sideEffectTag = 0; // Updates scheduled during render will trigger an immediate re-render at the + // end of the current pass. We can't store these updates on the normal queue, + // because if the work is aborted, they should be discarded. Because this is + // a relatively rare case, we also don't want to add an additional field to + // either the hook or queue object types. So we store them in a lazily create + // map of queue -> render-phase updates, which are discarded once the component + // completes without re-rendering. + // Whether an update was scheduled during the currently executing render pass. + + var didScheduleRenderPhaseUpdate = false; // Lazily created map of render-phase updates + + var renderPhaseUpdates = null; // Counter to prevent infinite loops. + + var numberOfReRenders = 0; + var RE_RENDER_LIMIT = 25; // In DEV, this is the name of the currently executing primitive hook + + var currentHookNameInDev = null; // In DEV, this list ensures that hooks are called in the same order between renders. + // The list stores the order of hooks used during the initial render (mount). + // Subsequent renders (updates) reference this list. + + var hookTypesDev = null; + var hookTypesUpdateIndexDev = -1; // In DEV, this tracks whether currently rendering component needs to ignore + // the dependencies for Hooks that need them (e.g. useEffect or useMemo). + // When true, such Hooks will always be "remounted". Only used during hot reload. + + var ignorePreviousDependencies = false; + + function mountHookTypesDev() { + { + var hookName = currentHookNameInDev; + + if (hookTypesDev === null) { + hookTypesDev = [hookName]; + } else { + hookTypesDev.push(hookName); + } + } + } + + function updateHookTypesDev() { + { + var hookName = currentHookNameInDev; + + if (hookTypesDev !== null) { + hookTypesUpdateIndexDev++; + + if (hookTypesDev[hookTypesUpdateIndexDev] !== hookName) { + warnOnHookMismatchInDev(hookName); + } + } + } + } + + function checkDepsAreArrayDev(deps) { + { + if (deps !== undefined && deps !== null && !Array.isArray(deps)) { + // Verify deps, but only on mount to avoid extra checks. + // It's unlikely their type would change as usually you define them inline. + warning$1( + false, + '%s received a final argument that is not an array (instead, received `%s`). When ' + + 'specified, the final argument must be an array.', + currentHookNameInDev, + typeof deps, + ); + } + } + } + + function warnOnHookMismatchInDev(currentHookName) { + { + var componentName = getComponentName(currentlyRenderingFiber$1.type); + + if (!didWarnAboutMismatchedHooksForComponent.has(componentName)) { + didWarnAboutMismatchedHooksForComponent.add(componentName); + + if (hookTypesDev !== null) { + var table = ''; + var secondColumnStart = 30; + + for (var i = 0; i <= hookTypesUpdateIndexDev; i++) { + var oldHookName = hookTypesDev[i]; + var newHookName = i === hookTypesUpdateIndexDev ? currentHookName : oldHookName; + var row = i + 1 + '. ' + oldHookName; // Extra space so second column lines up + // lol @ IE not supporting String#repeat + + while (row.length < secondColumnStart) { + row += ' '; + } + + row += newHookName + '\n'; + table += row; + } + + warning$1( + false, + 'React has detected a change in the order of Hooks called by %s. ' + + 'This will lead to bugs and errors if not fixed. ' + + 'For more information, read the Rules of Hooks: https://fb.me/rules-of-hooks\n\n' + + ' Previous render Next render\n' + + ' ------------------------------------------------------\n' + + '%s' + + ' ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', + componentName, + table, + ); + } + } + } + } + + function throwInvalidHookError() { + { + { + throw Error( + 'Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.', + ); + } + } + } + + function areHookInputsEqual(nextDeps, prevDeps) { + { + if (ignorePreviousDependencies) { + // Only true when this component is being hot reloaded. + return false; + } + } + + if (prevDeps === null) { + { + warning$1( + false, + '%s received a final argument during this render, but not during ' + + 'the previous render. Even though the final argument is optional, ' + + 'its type cannot change between renders.', + currentHookNameInDev, + ); + } + + return false; + } + + { + // Don't bother comparing lengths in prod because these arrays should be + // passed inline. + if (nextDeps.length !== prevDeps.length) { + warning$1( + false, + 'The final argument passed to %s changed size between renders. The ' + + 'order and size of this array must remain constant.\n\n' + + 'Previous: %s\n' + + 'Incoming: %s', + currentHookNameInDev, + '[' + prevDeps.join(', ') + ']', + '[' + nextDeps.join(', ') + ']', + ); + } + } + + for (var i = 0; i < prevDeps.length && i < nextDeps.length; i++) { + if (is$1(nextDeps[i], prevDeps[i])) { + continue; + } + + return false; + } + + return true; + } + + function renderWithHooks( + current, + workInProgress, + Component, + props, + refOrContext, + nextRenderExpirationTime, + ) { + renderExpirationTime$1 = nextRenderExpirationTime; + currentlyRenderingFiber$1 = workInProgress; + nextCurrentHook = current !== null ? current.memoizedState : null; + + { + hookTypesDev = current !== null ? current._debugHookTypes : null; + hookTypesUpdateIndexDev = -1; // Used for hot reloading: + + ignorePreviousDependencies = current !== null && current.type !== workInProgress.type; + } // The following should have already been reset + // currentHook = null; + // workInProgressHook = null; + // remainingExpirationTime = NoWork; + // componentUpdateQueue = null; + // didScheduleRenderPhaseUpdate = false; + // renderPhaseUpdates = null; + // numberOfReRenders = 0; + // sideEffectTag = 0; + // TODO Warn if no hooks are used at all during mount, then some are used during update. + // Currently we will identify the update render as a mount because nextCurrentHook === null. + // This is tricky because it's valid for certain types of components (e.g. React.lazy) + // Using nextCurrentHook to differentiate between mount/update only works if at least one stateful hook is used. + // Non-stateful hooks (e.g. context) don't get added to memoizedState, + // so nextCurrentHook would be null during updates and mounts. + + { + if (nextCurrentHook !== null) { + ReactCurrentDispatcher$1.current = HooksDispatcherOnUpdateInDEV; + } else if (hookTypesDev !== null) { + // This dispatcher handles an edge case where a component is updating, + // but no stateful hooks have been used. + // We want to match the production code behavior (which will use HooksDispatcherOnMount), + // but with the extra DEV validation to ensure hooks ordering hasn't changed. + // This dispatcher does that. + ReactCurrentDispatcher$1.current = HooksDispatcherOnMountWithHookTypesInDEV; + } else { + ReactCurrentDispatcher$1.current = HooksDispatcherOnMountInDEV; + } + } + + var children = Component(props, refOrContext); + + if (didScheduleRenderPhaseUpdate) { + do { + didScheduleRenderPhaseUpdate = false; + numberOfReRenders += 1; + + { + // Even when hot reloading, allow dependencies to stabilize + // after first render to prevent infinite render phase updates. + ignorePreviousDependencies = false; + } // Start over from the beginning of the list + + nextCurrentHook = current !== null ? current.memoizedState : null; + nextWorkInProgressHook = firstWorkInProgressHook; + currentHook = null; + workInProgressHook = null; + componentUpdateQueue = null; + + { + // Also validate hook order for cascading updates. + hookTypesUpdateIndexDev = -1; + } + + ReactCurrentDispatcher$1.current = HooksDispatcherOnUpdateInDEV; + children = Component(props, refOrContext); + } while (didScheduleRenderPhaseUpdate); + + renderPhaseUpdates = null; + numberOfReRenders = 0; + } // We can assume the previous dispatcher is always this one, since we set it + // at the beginning of the render phase and there's no re-entrancy. + + ReactCurrentDispatcher$1.current = ContextOnlyDispatcher; + var renderedWork = currentlyRenderingFiber$1; + renderedWork.memoizedState = firstWorkInProgressHook; + renderedWork.expirationTime = remainingExpirationTime; + renderedWork.updateQueue = componentUpdateQueue; + renderedWork.effectTag |= sideEffectTag; + + { + renderedWork._debugHookTypes = hookTypesDev; + } // This check uses currentHook so that it works the same in DEV and prod bundles. + // hookTypesDev could catch more cases (e.g. context) but only in DEV bundles. + + var didRenderTooFewHooks = currentHook !== null && currentHook.next !== null; + renderExpirationTime$1 = NoWork; + currentlyRenderingFiber$1 = null; + currentHook = null; + nextCurrentHook = null; + firstWorkInProgressHook = null; + workInProgressHook = null; + nextWorkInProgressHook = null; + + { + currentHookNameInDev = null; + hookTypesDev = null; + hookTypesUpdateIndexDev = -1; + } + + remainingExpirationTime = NoWork; + componentUpdateQueue = null; + sideEffectTag = 0; // These were reset above + // didScheduleRenderPhaseUpdate = false; + // renderPhaseUpdates = null; + // numberOfReRenders = 0; + + if (!!didRenderTooFewHooks) { + { + throw Error( + 'Rendered fewer hooks than expected. This may be caused by an accidental early return statement.', + ); + } + } + + return children; + } + function bailoutHooks(current, workInProgress, expirationTime) { + workInProgress.updateQueue = current.updateQueue; + workInProgress.effectTag &= ~(Passive | Update); + + if (current.expirationTime <= expirationTime) { + current.expirationTime = NoWork; + } + } + function resetHooks() { + // We can assume the previous dispatcher is always this one, since we set it + // at the beginning of the render phase and there's no re-entrancy. + ReactCurrentDispatcher$1.current = ContextOnlyDispatcher; // This is used to reset the state of this module when a component throws. + // It's also called inside mountIndeterminateComponent if we determine the + // component is a module-style component. + + renderExpirationTime$1 = NoWork; + currentlyRenderingFiber$1 = null; + currentHook = null; + nextCurrentHook = null; + firstWorkInProgressHook = null; + workInProgressHook = null; + nextWorkInProgressHook = null; + + { + hookTypesDev = null; + hookTypesUpdateIndexDev = -1; + currentHookNameInDev = null; + } + + remainingExpirationTime = NoWork; + componentUpdateQueue = null; + sideEffectTag = 0; + didScheduleRenderPhaseUpdate = false; + renderPhaseUpdates = null; + numberOfReRenders = 0; + } + + function mountWorkInProgressHook() { + var hook = { + memoizedState: null, + baseState: null, + queue: null, + baseUpdate: null, + next: null, + }; + + if (workInProgressHook === null) { + // This is the first hook in the list + firstWorkInProgressHook = workInProgressHook = hook; + } else { + // Append to the end of the list + workInProgressHook = workInProgressHook.next = hook; + } + + return workInProgressHook; + } + + function updateWorkInProgressHook() { + // This function is used both for updates and for re-renders triggered by a + // render phase update. It assumes there is either a current hook we can + // clone, or a work-in-progress hook from a previous render pass that we can + // use as a base. When we reach the end of the base list, we must switch to + // the dispatcher used for mounts. + if (nextWorkInProgressHook !== null) { + // There's already a work-in-progress. Reuse it. + workInProgressHook = nextWorkInProgressHook; + nextWorkInProgressHook = workInProgressHook.next; + currentHook = nextCurrentHook; + nextCurrentHook = currentHook !== null ? currentHook.next : null; + } else { + // Clone from the current hook. + if (!(nextCurrentHook !== null)) { + { + throw Error('Rendered more hooks than during the previous render.'); + } + } + + currentHook = nextCurrentHook; + var newHook = { + memoizedState: currentHook.memoizedState, + baseState: currentHook.baseState, + queue: currentHook.queue, + baseUpdate: currentHook.baseUpdate, + next: null, + }; + + if (workInProgressHook === null) { + // This is the first hook in the list. + workInProgressHook = firstWorkInProgressHook = newHook; + } else { + // Append to the end of the list. + workInProgressHook = workInProgressHook.next = newHook; + } + + nextCurrentHook = currentHook.next; + } + + return workInProgressHook; + } + + function createFunctionComponentUpdateQueue() { + return { + lastEffect: null, + }; + } + + function basicStateReducer(state, action) { + return typeof action === 'function' ? action(state) : action; + } + + function mountReducer(reducer, initialArg, init) { + var hook = mountWorkInProgressHook(); + var initialState; + + if (init !== undefined) { + initialState = init(initialArg); + } else { + initialState = initialArg; + } + + hook.memoizedState = hook.baseState = initialState; + var queue = (hook.queue = { + last: null, + dispatch: null, + lastRenderedReducer: reducer, + lastRenderedState: initialState, + }); + var dispatch = (queue.dispatch = dispatchAction.bind( + null, // Flow doesn't know this is non-null, but we do. + currentlyRenderingFiber$1, + queue, + )); + return [hook.memoizedState, dispatch]; + } + + function updateReducer(reducer, initialArg, init) { + var hook = updateWorkInProgressHook(); + var queue = hook.queue; + + if (!(queue !== null)) { + { + throw Error('Should have a queue. This is likely a bug in React. Please file an issue.'); + } + } + + queue.lastRenderedReducer = reducer; + + if (numberOfReRenders > 0) { + // This is a re-render. Apply the new render phase updates to the previous + // work-in-progress hook. + var _dispatch = queue.dispatch; + + if (renderPhaseUpdates !== null) { + // Render phase updates are stored in a map of queue -> linked list + var firstRenderPhaseUpdate = renderPhaseUpdates.get(queue); + + if (firstRenderPhaseUpdate !== undefined) { + renderPhaseUpdates.delete(queue); + var newState = hook.memoizedState; + var update = firstRenderPhaseUpdate; + + do { + // Process this render phase update. We don't have to check the + // priority because it will always be the same as the current + // render's. + var action = update.action; + newState = reducer(newState, action); + update = update.next; + } while (update !== null); // Mark that the fiber performed work, but only if the new state is + // different from the current state. + + if (!is$1(newState, hook.memoizedState)) { + markWorkInProgressReceivedUpdate(); + } + + hook.memoizedState = newState; // Don't persist the state accumulated from the render phase updates to + // the base state unless the queue is empty. + // TODO: Not sure if this is the desired semantics, but it's what we + // do for gDSFP. I can't remember why. + + if (hook.baseUpdate === queue.last) { + hook.baseState = newState; + } + + queue.lastRenderedState = newState; + return [newState, _dispatch]; + } + } + + return [hook.memoizedState, _dispatch]; + } // The last update in the entire queue + + var last = queue.last; // The last update that is part of the base state. + + var baseUpdate = hook.baseUpdate; + var baseState = hook.baseState; // Find the first unprocessed update. + + var first; + + if (baseUpdate !== null) { + if (last !== null) { + // For the first update, the queue is a circular linked list where + // `queue.last.next = queue.first`. Once the first update commits, and + // the `baseUpdate` is no longer empty, we can unravel the list. + last.next = null; + } + + first = baseUpdate.next; + } else { + first = last !== null ? last.next : null; + } + + if (first !== null) { + var _newState = baseState; + var newBaseState = null; + var newBaseUpdate = null; + var prevUpdate = baseUpdate; + var _update = first; + var didSkip = false; + + do { + var updateExpirationTime = _update.expirationTime; + + if (updateExpirationTime < renderExpirationTime$1) { + // Priority is insufficient. Skip this update. If this is the first + // skipped update, the previous update/state is the new base + // update/state. + if (!didSkip) { + didSkip = true; + newBaseUpdate = prevUpdate; + newBaseState = _newState; + } // Update the remaining priority in the queue. + + if (updateExpirationTime > remainingExpirationTime) { + remainingExpirationTime = updateExpirationTime; + markUnprocessedUpdateTime(remainingExpirationTime); + } + } else { + // This update does have sufficient priority. + // Mark the event time of this update as relevant to this render pass. + // TODO: This should ideally use the true event time of this update rather than + // its priority which is a derived and not reverseable value. + // TODO: We should skip this update if it was already committed but currently + // we have no way of detecting the difference between a committed and suspended + // update here. + markRenderEventTimeAndConfig(updateExpirationTime, _update.suspenseConfig); // Process this update. + + if (_update.eagerReducer === reducer) { + // If this update was processed eagerly, and its reducer matches the + // current reducer, we can use the eagerly computed state. + _newState = _update.eagerState; + } else { + var _action = _update.action; + _newState = reducer(_newState, _action); + } + } + + prevUpdate = _update; + _update = _update.next; + } while (_update !== null && _update !== first); + + if (!didSkip) { + newBaseUpdate = prevUpdate; + newBaseState = _newState; + } // Mark that the fiber performed work, but only if the new state is + // different from the current state. + + if (!is$1(_newState, hook.memoizedState)) { + markWorkInProgressReceivedUpdate(); + } + + hook.memoizedState = _newState; + hook.baseUpdate = newBaseUpdate; + hook.baseState = newBaseState; + queue.lastRenderedState = _newState; + } + + var dispatch = queue.dispatch; + return [hook.memoizedState, dispatch]; + } + + function mountState(initialState) { + var hook = mountWorkInProgressHook(); + + if (typeof initialState === 'function') { + initialState = initialState(); + } + + hook.memoizedState = hook.baseState = initialState; + var queue = (hook.queue = { + last: null, + dispatch: null, + lastRenderedReducer: basicStateReducer, + lastRenderedState: initialState, + }); + var dispatch = (queue.dispatch = dispatchAction.bind( + null, // Flow doesn't know this is non-null, but we do. + currentlyRenderingFiber$1, + queue, + )); + return [hook.memoizedState, dispatch]; + } + + function updateState(initialState) { + return updateReducer(basicStateReducer, initialState); + } + + function pushEffect(tag, create, destroy, deps) { + var effect = { + tag: tag, + create: create, + destroy: destroy, + deps: deps, + // Circular + next: null, + }; + + if (componentUpdateQueue === null) { + componentUpdateQueue = createFunctionComponentUpdateQueue(); + componentUpdateQueue.lastEffect = effect.next = effect; + } else { + var lastEffect = componentUpdateQueue.lastEffect; + + if (lastEffect === null) { + componentUpdateQueue.lastEffect = effect.next = effect; + } else { + var firstEffect = lastEffect.next; + lastEffect.next = effect; + effect.next = firstEffect; + componentUpdateQueue.lastEffect = effect; + } + } + + return effect; + } + + function mountRef(initialValue) { + var hook = mountWorkInProgressHook(); + var ref = { + current: initialValue, + }; + + { + Object.seal(ref); + } + + hook.memoizedState = ref; + return ref; + } + + function updateRef(initialValue) { + var hook = updateWorkInProgressHook(); + return hook.memoizedState; + } + + function mountEffectImpl(fiberEffectTag, hookEffectTag, create, deps) { + var hook = mountWorkInProgressHook(); + var nextDeps = deps === undefined ? null : deps; + sideEffectTag |= fiberEffectTag; + hook.memoizedState = pushEffect(hookEffectTag, create, undefined, nextDeps); + } + + function updateEffectImpl(fiberEffectTag, hookEffectTag, create, deps) { + var hook = updateWorkInProgressHook(); + var nextDeps = deps === undefined ? null : deps; + var destroy = undefined; + + if (currentHook !== null) { + var prevEffect = currentHook.memoizedState; + destroy = prevEffect.destroy; + + if (nextDeps !== null) { + var prevDeps = prevEffect.deps; + + if (areHookInputsEqual(nextDeps, prevDeps)) { + pushEffect(NoEffect$1, create, destroy, nextDeps); + return; + } + } + } + + sideEffectTag |= fiberEffectTag; + hook.memoizedState = pushEffect(hookEffectTag, create, destroy, nextDeps); + } + + function mountEffect(create, deps) { + { + // $FlowExpectedError - jest isn't a global, and isn't recognized outside of tests + if ('undefined' !== typeof jest) { + warnIfNotCurrentlyActingEffectsInDEV(currentlyRenderingFiber$1); + } + } + + return mountEffectImpl(Update | Passive, UnmountPassive | MountPassive, create, deps); + } + + function updateEffect(create, deps) { + { + // $FlowExpectedError - jest isn't a global, and isn't recognized outside of tests + if ('undefined' !== typeof jest) { + warnIfNotCurrentlyActingEffectsInDEV(currentlyRenderingFiber$1); + } + } + + return updateEffectImpl(Update | Passive, UnmountPassive | MountPassive, create, deps); + } + + function mountLayoutEffect(create, deps) { + return mountEffectImpl(Update, UnmountMutation | MountLayout, create, deps); + } + + function updateLayoutEffect(create, deps) { + return updateEffectImpl(Update, UnmountMutation | MountLayout, create, deps); + } + + function imperativeHandleEffect(create, ref) { + if (typeof ref === 'function') { + var refCallback = ref; + + var _inst = create(); + + refCallback(_inst); + return function () { + refCallback(null); + }; + } else if (ref !== null && ref !== undefined) { + var refObject = ref; + + { + !refObject.hasOwnProperty('current') + ? warning$1( + false, + 'Expected useImperativeHandle() first argument to either be a ' + + 'ref callback or React.createRef() object. Instead received: %s.', + 'an object with keys {' + Object.keys(refObject).join(', ') + '}', + ) + : void 0; + } + + var _inst2 = create(); + + refObject.current = _inst2; + return function () { + refObject.current = null; + }; + } + } + + function mountImperativeHandle(ref, create, deps) { + { + !(typeof create === 'function') + ? warning$1( + false, + 'Expected useImperativeHandle() second argument to be a function ' + + 'that creates a handle. Instead received: %s.', + create !== null ? typeof create : 'null', + ) + : void 0; + } // TODO: If deps are provided, should we skip comparing the ref itself? + + var effectDeps = deps !== null && deps !== undefined ? deps.concat([ref]) : null; + return mountEffectImpl( + Update, + UnmountMutation | MountLayout, + imperativeHandleEffect.bind(null, create, ref), + effectDeps, + ); + } + + function updateImperativeHandle(ref, create, deps) { + { + !(typeof create === 'function') + ? warning$1( + false, + 'Expected useImperativeHandle() second argument to be a function ' + + 'that creates a handle. Instead received: %s.', + create !== null ? typeof create : 'null', + ) + : void 0; + } // TODO: If deps are provided, should we skip comparing the ref itself? + + var effectDeps = deps !== null && deps !== undefined ? deps.concat([ref]) : null; + return updateEffectImpl( + Update, + UnmountMutation | MountLayout, + imperativeHandleEffect.bind(null, create, ref), + effectDeps, + ); + } + + function mountDebugValue(value, formatterFn) { + // This hook is normally a no-op. + // The react-debug-hooks package injects its own implementation + // so that e.g. DevTools can display custom hook values. + } + + var updateDebugValue = mountDebugValue; + + function mountCallback(callback, deps) { + var hook = mountWorkInProgressHook(); + var nextDeps = deps === undefined ? null : deps; + hook.memoizedState = [callback, nextDeps]; + return callback; + } + + function updateCallback(callback, deps) { + var hook = updateWorkInProgressHook(); + var nextDeps = deps === undefined ? null : deps; + var prevState = hook.memoizedState; + + if (prevState !== null) { + if (nextDeps !== null) { + var prevDeps = prevState[1]; + + if (areHookInputsEqual(nextDeps, prevDeps)) { + return prevState[0]; + } + } + } + + hook.memoizedState = [callback, nextDeps]; + return callback; + } + + function mountMemo(nextCreate, deps) { + var hook = mountWorkInProgressHook(); + var nextDeps = deps === undefined ? null : deps; + var nextValue = nextCreate(); + hook.memoizedState = [nextValue, nextDeps]; + return nextValue; + } + + function updateMemo(nextCreate, deps) { + var hook = updateWorkInProgressHook(); + var nextDeps = deps === undefined ? null : deps; + var prevState = hook.memoizedState; + + if (prevState !== null) { + // Assume these are defined. If they're not, areHookInputsEqual will warn. + if (nextDeps !== null) { + var prevDeps = prevState[1]; + + if (areHookInputsEqual(nextDeps, prevDeps)) { + return prevState[0]; + } + } + } + + var nextValue = nextCreate(); + hook.memoizedState = [nextValue, nextDeps]; + return nextValue; + } + + function mountDeferredValue(value, config) { + var _mountState = mountState(value), + prevValue = _mountState[0], + setValue = _mountState[1]; + + mountEffect( + function () { + Scheduler.unstable_next(function () { + var previousConfig = ReactCurrentBatchConfig$1.suspense; + ReactCurrentBatchConfig$1.suspense = config === undefined ? null : config; + + try { + setValue(value); + } finally { + ReactCurrentBatchConfig$1.suspense = previousConfig; + } + }); + }, + [value, config], + ); + return prevValue; + } + + function updateDeferredValue(value, config) { + var _updateState = updateState(value), + prevValue = _updateState[0], + setValue = _updateState[1]; + + updateEffect( + function () { + Scheduler.unstable_next(function () { + var previousConfig = ReactCurrentBatchConfig$1.suspense; + ReactCurrentBatchConfig$1.suspense = config === undefined ? null : config; + + try { + setValue(value); + } finally { + ReactCurrentBatchConfig$1.suspense = previousConfig; + } + }); + }, + [value, config], + ); + return prevValue; + } + + function mountTransition(config) { + var _mountState2 = mountState(false), + isPending = _mountState2[0], + setPending = _mountState2[1]; + + var startTransition = mountCallback( + function (callback) { + setPending(true); + Scheduler.unstable_next(function () { + var previousConfig = ReactCurrentBatchConfig$1.suspense; + ReactCurrentBatchConfig$1.suspense = config === undefined ? null : config; + + try { + setPending(false); + callback(); + } finally { + ReactCurrentBatchConfig$1.suspense = previousConfig; + } + }); + }, + [config, isPending], + ); + return [startTransition, isPending]; + } + + function updateTransition(config) { + var _updateState2 = updateState(false), + isPending = _updateState2[0], + setPending = _updateState2[1]; + + var startTransition = updateCallback( + function (callback) { + setPending(true); + Scheduler.unstable_next(function () { + var previousConfig = ReactCurrentBatchConfig$1.suspense; + ReactCurrentBatchConfig$1.suspense = config === undefined ? null : config; + + try { + setPending(false); + callback(); + } finally { + ReactCurrentBatchConfig$1.suspense = previousConfig; + } + }); + }, + [config, isPending], + ); + return [startTransition, isPending]; + } + + function dispatchAction(fiber, queue, action) { + if (!(numberOfReRenders < RE_RENDER_LIMIT)) { + { + throw Error( + 'Too many re-renders. React limits the number of renders to prevent an infinite loop.', + ); + } + } + + { + !(typeof arguments[3] !== 'function') + ? warning$1( + false, + "State updates from the useState() and useReducer() Hooks don't support the " + + 'second callback argument. To execute a side effect after ' + + 'rendering, declare it in the component body with useEffect().', + ) + : void 0; + } + + var alternate = fiber.alternate; + + if ( + fiber === currentlyRenderingFiber$1 || + (alternate !== null && alternate === currentlyRenderingFiber$1) + ) { + // This is a render phase update. Stash it in a lazily-created map of + // queue -> linked list of updates. After this render pass, we'll restart + // and apply the stashed updates on top of the work-in-progress hook. + didScheduleRenderPhaseUpdate = true; + var update = { + expirationTime: renderExpirationTime$1, + suspenseConfig: null, + action: action, + eagerReducer: null, + eagerState: null, + next: null, + }; + + { + update.priority = getCurrentPriorityLevel(); + } + + if (renderPhaseUpdates === null) { + renderPhaseUpdates = new Map(); + } + + var firstRenderPhaseUpdate = renderPhaseUpdates.get(queue); + + if (firstRenderPhaseUpdate === undefined) { + renderPhaseUpdates.set(queue, update); + } else { + // Append the update to the end of the list. + var lastRenderPhaseUpdate = firstRenderPhaseUpdate; + + while (lastRenderPhaseUpdate.next !== null) { + lastRenderPhaseUpdate = lastRenderPhaseUpdate.next; + } + + lastRenderPhaseUpdate.next = update; + } + } else { + var currentTime = requestCurrentTimeForUpdate(); + var suspenseConfig = requestCurrentSuspenseConfig(); + var expirationTime = computeExpirationForFiber(currentTime, fiber, suspenseConfig); + var _update2 = { + expirationTime: expirationTime, + suspenseConfig: suspenseConfig, + action: action, + eagerReducer: null, + eagerState: null, + next: null, + }; + + { + _update2.priority = getCurrentPriorityLevel(); + } // Append the update to the end of the list. + + var last = queue.last; + + if (last === null) { + // This is the first update. Create a circular list. + _update2.next = _update2; + } else { + var first = last.next; + + if (first !== null) { + // Still circular. + _update2.next = first; + } + + last.next = _update2; + } + + queue.last = _update2; + + if ( + fiber.expirationTime === NoWork && + (alternate === null || alternate.expirationTime === NoWork) + ) { + // The queue is currently empty, which means we can eagerly compute the + // next state before entering the render phase. If the new state is the + // same as the current state, we may be able to bail out entirely. + var lastRenderedReducer = queue.lastRenderedReducer; + + if (lastRenderedReducer !== null) { + var prevDispatcher; + + { + prevDispatcher = ReactCurrentDispatcher$1.current; + ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV; + } + + try { + var currentState = queue.lastRenderedState; + var eagerState = lastRenderedReducer(currentState, action); // Stash the eagerly computed state, and the reducer used to compute + // it, on the update object. If the reducer hasn't changed by the + // time we enter the render phase, then the eager state can be used + // without calling the reducer again. + + _update2.eagerReducer = lastRenderedReducer; + _update2.eagerState = eagerState; + + if (is$1(eagerState, currentState)) { + // Fast path. We can bail out without scheduling React to re-render. + // It's still possible that we'll need to rebase this update later, + // if the component re-renders for a different reason and by that + // time the reducer has changed. + return; + } + } catch (error) { + // Suppress the error. It will throw again in the render phase. + } finally { + { + ReactCurrentDispatcher$1.current = prevDispatcher; + } + } + } + } + + { + // $FlowExpectedError - jest isn't a global, and isn't recognized outside of tests + if ('undefined' !== typeof jest) { + warnIfNotScopedWithMatchingAct(fiber); + warnIfNotCurrentlyActingUpdatesInDev(fiber); + } + } + + scheduleWork(fiber, expirationTime); + } + } + + var ContextOnlyDispatcher = { + readContext: readContext, + useCallback: throwInvalidHookError, + useContext: throwInvalidHookError, + useEffect: throwInvalidHookError, + useImperativeHandle: throwInvalidHookError, + useLayoutEffect: throwInvalidHookError, + useMemo: throwInvalidHookError, + useReducer: throwInvalidHookError, + useRef: throwInvalidHookError, + useState: throwInvalidHookError, + useDebugValue: throwInvalidHookError, + useResponder: throwInvalidHookError, + useDeferredValue: throwInvalidHookError, + useTransition: throwInvalidHookError, + }; + var HooksDispatcherOnMountInDEV = null; + var HooksDispatcherOnMountWithHookTypesInDEV = null; + var HooksDispatcherOnUpdateInDEV = null; + var InvalidNestedHooksDispatcherOnMountInDEV = null; + var InvalidNestedHooksDispatcherOnUpdateInDEV = null; + + { + var warnInvalidContextAccess = function () { + warning$1( + false, + 'Context can only be read while React is rendering. ' + + 'In classes, you can read it in the render method or getDerivedStateFromProps. ' + + 'In function components, you can read it directly in the function body, but not ' + + 'inside Hooks like useReducer() or useMemo().', + ); + }; + + var warnInvalidHookAccess = function () { + warning$1( + false, + 'Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. ' + + 'You can only call Hooks at the top level of your React function. ' + + 'For more information, see ' + + 'https://fb.me/rules-of-hooks', + ); + }; + + HooksDispatcherOnMountInDEV = { + readContext: function (context, observedBits) { + return readContext(context, observedBits); + }, + useCallback: function (callback, deps) { + currentHookNameInDev = 'useCallback'; + mountHookTypesDev(); + checkDepsAreArrayDev(deps); + return mountCallback(callback, deps); + }, + useContext: function (context, observedBits) { + currentHookNameInDev = 'useContext'; + mountHookTypesDev(); + return readContext(context, observedBits); + }, + useEffect: function (create, deps) { + currentHookNameInDev = 'useEffect'; + mountHookTypesDev(); + checkDepsAreArrayDev(deps); + return mountEffect(create, deps); + }, + useImperativeHandle: function (ref, create, deps) { + currentHookNameInDev = 'useImperativeHandle'; + mountHookTypesDev(); + checkDepsAreArrayDev(deps); + return mountImperativeHandle(ref, create, deps); + }, + useLayoutEffect: function (create, deps) { + currentHookNameInDev = 'useLayoutEffect'; + mountHookTypesDev(); + checkDepsAreArrayDev(deps); + return mountLayoutEffect(create, deps); + }, + useMemo: function (create, deps) { + currentHookNameInDev = 'useMemo'; + mountHookTypesDev(); + checkDepsAreArrayDev(deps); + var prevDispatcher = ReactCurrentDispatcher$1.current; + ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV; + + try { + return mountMemo(create, deps); + } finally { + ReactCurrentDispatcher$1.current = prevDispatcher; + } + }, + useReducer: function (reducer, initialArg, init) { + currentHookNameInDev = 'useReducer'; + mountHookTypesDev(); + var prevDispatcher = ReactCurrentDispatcher$1.current; + ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV; + + try { + return mountReducer(reducer, initialArg, init); + } finally { + ReactCurrentDispatcher$1.current = prevDispatcher; + } + }, + useRef: function (initialValue) { + currentHookNameInDev = 'useRef'; + mountHookTypesDev(); + return mountRef(initialValue); + }, + useState: function (initialState) { + currentHookNameInDev = 'useState'; + mountHookTypesDev(); + var prevDispatcher = ReactCurrentDispatcher$1.current; + ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV; + + try { + return mountState(initialState); + } finally { + ReactCurrentDispatcher$1.current = prevDispatcher; + } + }, + useDebugValue: function (value, formatterFn) { + currentHookNameInDev = 'useDebugValue'; + mountHookTypesDev(); + return mountDebugValue(value, formatterFn); + }, + useResponder: function (responder, props) { + currentHookNameInDev = 'useResponder'; + mountHookTypesDev(); + return createResponderListener(responder, props); + }, + useDeferredValue: function (value, config) { + currentHookNameInDev = 'useDeferredValue'; + mountHookTypesDev(); + return mountDeferredValue(value, config); + }, + useTransition: function (config) { + currentHookNameInDev = 'useTransition'; + mountHookTypesDev(); + return mountTransition(config); + }, + }; + HooksDispatcherOnMountWithHookTypesInDEV = { + readContext: function (context, observedBits) { + return readContext(context, observedBits); + }, + useCallback: function (callback, deps) { + currentHookNameInDev = 'useCallback'; + updateHookTypesDev(); + return mountCallback(callback, deps); + }, + useContext: function (context, observedBits) { + currentHookNameInDev = 'useContext'; + updateHookTypesDev(); + return readContext(context, observedBits); + }, + useEffect: function (create, deps) { + currentHookNameInDev = 'useEffect'; + updateHookTypesDev(); + return mountEffect(create, deps); + }, + useImperativeHandle: function (ref, create, deps) { + currentHookNameInDev = 'useImperativeHandle'; + updateHookTypesDev(); + return mountImperativeHandle(ref, create, deps); + }, + useLayoutEffect: function (create, deps) { + currentHookNameInDev = 'useLayoutEffect'; + updateHookTypesDev(); + return mountLayoutEffect(create, deps); + }, + useMemo: function (create, deps) { + currentHookNameInDev = 'useMemo'; + updateHookTypesDev(); + var prevDispatcher = ReactCurrentDispatcher$1.current; + ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV; + + try { + return mountMemo(create, deps); + } finally { + ReactCurrentDispatcher$1.current = prevDispatcher; + } + }, + useReducer: function (reducer, initialArg, init) { + currentHookNameInDev = 'useReducer'; + updateHookTypesDev(); + var prevDispatcher = ReactCurrentDispatcher$1.current; + ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV; + + try { + return mountReducer(reducer, initialArg, init); + } finally { + ReactCurrentDispatcher$1.current = prevDispatcher; + } + }, + useRef: function (initialValue) { + currentHookNameInDev = 'useRef'; + updateHookTypesDev(); + return mountRef(initialValue); + }, + useState: function (initialState) { + currentHookNameInDev = 'useState'; + updateHookTypesDev(); + var prevDispatcher = ReactCurrentDispatcher$1.current; + ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV; + + try { + return mountState(initialState); + } finally { + ReactCurrentDispatcher$1.current = prevDispatcher; + } + }, + useDebugValue: function (value, formatterFn) { + currentHookNameInDev = 'useDebugValue'; + updateHookTypesDev(); + return mountDebugValue(value, formatterFn); + }, + useResponder: function (responder, props) { + currentHookNameInDev = 'useResponder'; + updateHookTypesDev(); + return createResponderListener(responder, props); + }, + useDeferredValue: function (value, config) { + currentHookNameInDev = 'useDeferredValue'; + updateHookTypesDev(); + return mountDeferredValue(value, config); + }, + useTransition: function (config) { + currentHookNameInDev = 'useTransition'; + updateHookTypesDev(); + return mountTransition(config); + }, + }; + HooksDispatcherOnUpdateInDEV = { + readContext: function (context, observedBits) { + return readContext(context, observedBits); + }, + useCallback: function (callback, deps) { + currentHookNameInDev = 'useCallback'; + updateHookTypesDev(); + return updateCallback(callback, deps); + }, + useContext: function (context, observedBits) { + currentHookNameInDev = 'useContext'; + updateHookTypesDev(); + return readContext(context, observedBits); + }, + useEffect: function (create, deps) { + currentHookNameInDev = 'useEffect'; + updateHookTypesDev(); + return updateEffect(create, deps); + }, + useImperativeHandle: function (ref, create, deps) { + currentHookNameInDev = 'useImperativeHandle'; + updateHookTypesDev(); + return updateImperativeHandle(ref, create, deps); + }, + useLayoutEffect: function (create, deps) { + currentHookNameInDev = 'useLayoutEffect'; + updateHookTypesDev(); + return updateLayoutEffect(create, deps); + }, + useMemo: function (create, deps) { + currentHookNameInDev = 'useMemo'; + updateHookTypesDev(); + var prevDispatcher = ReactCurrentDispatcher$1.current; + ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV; + + try { + return updateMemo(create, deps); + } finally { + ReactCurrentDispatcher$1.current = prevDispatcher; + } + }, + useReducer: function (reducer, initialArg, init) { + currentHookNameInDev = 'useReducer'; + updateHookTypesDev(); + var prevDispatcher = ReactCurrentDispatcher$1.current; + ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV; + + try { + return updateReducer(reducer, initialArg, init); + } finally { + ReactCurrentDispatcher$1.current = prevDispatcher; + } + }, + useRef: function (initialValue) { + currentHookNameInDev = 'useRef'; + updateHookTypesDev(); + return updateRef(initialValue); + }, + useState: function (initialState) { + currentHookNameInDev = 'useState'; + updateHookTypesDev(); + var prevDispatcher = ReactCurrentDispatcher$1.current; + ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV; + + try { + return updateState(initialState); + } finally { + ReactCurrentDispatcher$1.current = prevDispatcher; + } + }, + useDebugValue: function (value, formatterFn) { + currentHookNameInDev = 'useDebugValue'; + updateHookTypesDev(); + return updateDebugValue(value, formatterFn); + }, + useResponder: function (responder, props) { + currentHookNameInDev = 'useResponder'; + updateHookTypesDev(); + return createResponderListener(responder, props); + }, + useDeferredValue: function (value, config) { + currentHookNameInDev = 'useDeferredValue'; + updateHookTypesDev(); + return updateDeferredValue(value, config); + }, + useTransition: function (config) { + currentHookNameInDev = 'useTransition'; + updateHookTypesDev(); + return updateTransition(config); + }, + }; + InvalidNestedHooksDispatcherOnMountInDEV = { + readContext: function (context, observedBits) { + warnInvalidContextAccess(); + return readContext(context, observedBits); + }, + useCallback: function (callback, deps) { + currentHookNameInDev = 'useCallback'; + warnInvalidHookAccess(); + mountHookTypesDev(); + return mountCallback(callback, deps); + }, + useContext: function (context, observedBits) { + currentHookNameInDev = 'useContext'; + warnInvalidHookAccess(); + mountHookTypesDev(); + return readContext(context, observedBits); + }, + useEffect: function (create, deps) { + currentHookNameInDev = 'useEffect'; + warnInvalidHookAccess(); + mountHookTypesDev(); + return mountEffect(create, deps); + }, + useImperativeHandle: function (ref, create, deps) { + currentHookNameInDev = 'useImperativeHandle'; + warnInvalidHookAccess(); + mountHookTypesDev(); + return mountImperativeHandle(ref, create, deps); + }, + useLayoutEffect: function (create, deps) { + currentHookNameInDev = 'useLayoutEffect'; + warnInvalidHookAccess(); + mountHookTypesDev(); + return mountLayoutEffect(create, deps); + }, + useMemo: function (create, deps) { + currentHookNameInDev = 'useMemo'; + warnInvalidHookAccess(); + mountHookTypesDev(); + var prevDispatcher = ReactCurrentDispatcher$1.current; + ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV; + + try { + return mountMemo(create, deps); + } finally { + ReactCurrentDispatcher$1.current = prevDispatcher; + } + }, + useReducer: function (reducer, initialArg, init) { + currentHookNameInDev = 'useReducer'; + warnInvalidHookAccess(); + mountHookTypesDev(); + var prevDispatcher = ReactCurrentDispatcher$1.current; + ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV; + + try { + return mountReducer(reducer, initialArg, init); + } finally { + ReactCurrentDispatcher$1.current = prevDispatcher; + } + }, + useRef: function (initialValue) { + currentHookNameInDev = 'useRef'; + warnInvalidHookAccess(); + mountHookTypesDev(); + return mountRef(initialValue); + }, + useState: function (initialState) { + currentHookNameInDev = 'useState'; + warnInvalidHookAccess(); + mountHookTypesDev(); + var prevDispatcher = ReactCurrentDispatcher$1.current; + ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV; + + try { + return mountState(initialState); + } finally { + ReactCurrentDispatcher$1.current = prevDispatcher; + } + }, + useDebugValue: function (value, formatterFn) { + currentHookNameInDev = 'useDebugValue'; + warnInvalidHookAccess(); + mountHookTypesDev(); + return mountDebugValue(value, formatterFn); + }, + useResponder: function (responder, props) { + currentHookNameInDev = 'useResponder'; + warnInvalidHookAccess(); + mountHookTypesDev(); + return createResponderListener(responder, props); + }, + useDeferredValue: function (value, config) { + currentHookNameInDev = 'useDeferredValue'; + warnInvalidHookAccess(); + mountHookTypesDev(); + return mountDeferredValue(value, config); + }, + useTransition: function (config) { + currentHookNameInDev = 'useTransition'; + warnInvalidHookAccess(); + mountHookTypesDev(); + return mountTransition(config); + }, + }; + InvalidNestedHooksDispatcherOnUpdateInDEV = { + readContext: function (context, observedBits) { + warnInvalidContextAccess(); + return readContext(context, observedBits); + }, + useCallback: function (callback, deps) { + currentHookNameInDev = 'useCallback'; + warnInvalidHookAccess(); + updateHookTypesDev(); + return updateCallback(callback, deps); + }, + useContext: function (context, observedBits) { + currentHookNameInDev = 'useContext'; + warnInvalidHookAccess(); + updateHookTypesDev(); + return readContext(context, observedBits); + }, + useEffect: function (create, deps) { + currentHookNameInDev = 'useEffect'; + warnInvalidHookAccess(); + updateHookTypesDev(); + return updateEffect(create, deps); + }, + useImperativeHandle: function (ref, create, deps) { + currentHookNameInDev = 'useImperativeHandle'; + warnInvalidHookAccess(); + updateHookTypesDev(); + return updateImperativeHandle(ref, create, deps); + }, + useLayoutEffect: function (create, deps) { + currentHookNameInDev = 'useLayoutEffect'; + warnInvalidHookAccess(); + updateHookTypesDev(); + return updateLayoutEffect(create, deps); + }, + useMemo: function (create, deps) { + currentHookNameInDev = 'useMemo'; + warnInvalidHookAccess(); + updateHookTypesDev(); + var prevDispatcher = ReactCurrentDispatcher$1.current; + ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV; + + try { + return updateMemo(create, deps); + } finally { + ReactCurrentDispatcher$1.current = prevDispatcher; + } + }, + useReducer: function (reducer, initialArg, init) { + currentHookNameInDev = 'useReducer'; + warnInvalidHookAccess(); + updateHookTypesDev(); + var prevDispatcher = ReactCurrentDispatcher$1.current; + ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV; + + try { + return updateReducer(reducer, initialArg, init); + } finally { + ReactCurrentDispatcher$1.current = prevDispatcher; + } + }, + useRef: function (initialValue) { + currentHookNameInDev = 'useRef'; + warnInvalidHookAccess(); + updateHookTypesDev(); + return updateRef(initialValue); + }, + useState: function (initialState) { + currentHookNameInDev = 'useState'; + warnInvalidHookAccess(); + updateHookTypesDev(); + var prevDispatcher = ReactCurrentDispatcher$1.current; + ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV; + + try { + return updateState(initialState); + } finally { + ReactCurrentDispatcher$1.current = prevDispatcher; + } + }, + useDebugValue: function (value, formatterFn) { + currentHookNameInDev = 'useDebugValue'; + warnInvalidHookAccess(); + updateHookTypesDev(); + return updateDebugValue(value, formatterFn); + }, + useResponder: function (responder, props) { + currentHookNameInDev = 'useResponder'; + warnInvalidHookAccess(); + updateHookTypesDev(); + return createResponderListener(responder, props); + }, + useDeferredValue: function (value, config) { + currentHookNameInDev = 'useDeferredValue'; + warnInvalidHookAccess(); + updateHookTypesDev(); + return updateDeferredValue(value, config); + }, + useTransition: function (config) { + currentHookNameInDev = 'useTransition'; + warnInvalidHookAccess(); + updateHookTypesDev(); + return updateTransition(config); + }, + }; + } + + // CommonJS interop named imports. + + var now$1 = Scheduler.unstable_now; + var commitTime = 0; + var profilerStartTime = -1; + + function getCommitTime() { + return commitTime; + } + + function recordCommitTime() { + if (!enableProfilerTimer) { + return; + } + + commitTime = now$1(); + } + + function startProfilerTimer(fiber) { + if (!enableProfilerTimer) { + return; + } + + profilerStartTime = now$1(); + + if (fiber.actualStartTime < 0) { + fiber.actualStartTime = now$1(); + } + } + + function stopProfilerTimerIfRunning(fiber) { + if (!enableProfilerTimer) { + return; + } + + profilerStartTime = -1; + } + + function stopProfilerTimerIfRunningAndRecordDelta(fiber, overrideBaseTime) { + if (!enableProfilerTimer) { + return; + } + + if (profilerStartTime >= 0) { + var elapsedTime = now$1() - profilerStartTime; + fiber.actualDuration += elapsedTime; + + if (overrideBaseTime) { + fiber.selfBaseDuration = elapsedTime; + } + + profilerStartTime = -1; + } + } + + // This may have been an insertion or a hydration. + + var hydrationParentFiber = null; + var nextHydratableInstance = null; + var isHydrating = false; + + function warnIfHydrating() { + { + !!isHydrating + ? warning$1( + false, + 'We should not be hydrating here. This is a bug in React. Please file a bug.', + ) + : void 0; + } + } + + function enterHydrationState(fiber) { + if (!supportsHydration) { + return false; + } + + var parentInstance = fiber.stateNode.containerInfo; + nextHydratableInstance = getFirstHydratableChild(parentInstance); + hydrationParentFiber = fiber; + isHydrating = true; + return true; + } + + function reenterHydrationStateFromDehydratedSuspenseInstance(fiber, suspenseInstance) { + if (!supportsHydration) { + return false; + } + + nextHydratableInstance = getNextHydratableSibling(suspenseInstance); + popToNextHostParent(fiber); + isHydrating = true; + return true; + } + + function deleteHydratableInstance(returnFiber, instance) { + { + switch (returnFiber.tag) { + case HostRoot: + didNotHydrateContainerInstance(returnFiber.stateNode.containerInfo, instance); + break; + + case HostComponent: + didNotHydrateInstance( + returnFiber.type, + returnFiber.memoizedProps, + returnFiber.stateNode, + instance, + ); + break; + } + } + + var childToDelete = createFiberFromHostInstanceForDeletion(); + childToDelete.stateNode = instance; + childToDelete.return = returnFiber; + childToDelete.effectTag = Deletion; // This might seem like it belongs on progressedFirstDeletion. However, + // these children are not part of the reconciliation list of children. + // Even if we abort and rereconcile the children, that will try to hydrate + // again and the nodes are still in the host tree so these will be + // recreated. + + if (returnFiber.lastEffect !== null) { + returnFiber.lastEffect.nextEffect = childToDelete; + returnFiber.lastEffect = childToDelete; + } else { + returnFiber.firstEffect = returnFiber.lastEffect = childToDelete; + } + } + + function insertNonHydratedInstance(returnFiber, fiber) { + fiber.effectTag = (fiber.effectTag & ~Hydrating) | Placement; + + { + switch (returnFiber.tag) { + case HostRoot: { + var parentContainer = returnFiber.stateNode.containerInfo; + + switch (fiber.tag) { + case HostComponent: + var type = fiber.type; + var props = fiber.pendingProps; + didNotFindHydratableContainerInstance(parentContainer, type, props); + break; + + case HostText: + var text = fiber.pendingProps; + didNotFindHydratableContainerTextInstance(parentContainer, text); + break; + + case SuspenseComponent: + break; + } + + break; + } + + case HostComponent: { + var parentType = returnFiber.type; + var parentProps = returnFiber.memoizedProps; + var parentInstance = returnFiber.stateNode; + + switch (fiber.tag) { + case HostComponent: + var _type = fiber.type; + var _props = fiber.pendingProps; + didNotFindHydratableInstance(parentType, parentProps, parentInstance, _type, _props); + break; + + case HostText: + var _text = fiber.pendingProps; + didNotFindHydratableTextInstance(parentType, parentProps, parentInstance, _text); + break; + + case SuspenseComponent: + didNotFindHydratableSuspenseInstance(parentType, parentProps, parentInstance); + break; + } + + break; + } + + default: + return; + } + } + } + + function tryHydrate(fiber, nextInstance) { + switch (fiber.tag) { + case HostComponent: { + var type = fiber.type; + var props = fiber.pendingProps; + var instance = canHydrateInstance(nextInstance, type, props); + + if (instance !== null) { + fiber.stateNode = instance; + return true; + } + + return false; + } + + case HostText: { + var text = fiber.pendingProps; + var textInstance = canHydrateTextInstance(nextInstance, text); + + if (textInstance !== null) { + fiber.stateNode = textInstance; + return true; + } + + return false; + } + + case SuspenseComponent: { + if (enableSuspenseServerRenderer) { + var suspenseInstance = canHydrateSuspenseInstance(nextInstance); + + if (suspenseInstance !== null) { + var suspenseState = { + dehydrated: suspenseInstance, + retryTime: Never, + }; + fiber.memoizedState = suspenseState; // Store the dehydrated fragment as a child fiber. + // This simplifies the code for getHostSibling and deleting nodes, + // since it doesn't have to consider all Suspense boundaries and + // check if they're dehydrated ones or not. + + var dehydratedFragment = createFiberFromDehydratedFragment(suspenseInstance); + dehydratedFragment.return = fiber; + fiber.child = dehydratedFragment; + return true; + } + } + + return false; + } + + default: + return false; + } + } + + function tryToClaimNextHydratableInstance(fiber) { + if (!isHydrating) { + return; + } + + var nextInstance = nextHydratableInstance; + + if (!nextInstance) { + // Nothing to hydrate. Make it an insertion. + insertNonHydratedInstance(hydrationParentFiber, fiber); + isHydrating = false; + hydrationParentFiber = fiber; + return; + } + + var firstAttemptedInstance = nextInstance; + + if (!tryHydrate(fiber, nextInstance)) { + // If we can't hydrate this instance let's try the next one. + // We use this as a heuristic. It's based on intuition and not data so it + // might be flawed or unnecessary. + nextInstance = getNextHydratableSibling(firstAttemptedInstance); + + if (!nextInstance || !tryHydrate(fiber, nextInstance)) { + // Nothing to hydrate. Make it an insertion. + insertNonHydratedInstance(hydrationParentFiber, fiber); + isHydrating = false; + hydrationParentFiber = fiber; + return; + } // We matched the next one, we'll now assume that the first one was + // superfluous and we'll delete it. Since we can't eagerly delete it + // we'll have to schedule a deletion. To do that, this node needs a dummy + // fiber associated with it. + + deleteHydratableInstance(hydrationParentFiber, firstAttemptedInstance); + } + + hydrationParentFiber = fiber; + nextHydratableInstance = getFirstHydratableChild(nextInstance); + } + + function prepareToHydrateHostInstance(fiber, rootContainerInstance, hostContext) { + if (!supportsHydration) { + { + { + throw Error( + 'Expected prepareToHydrateHostInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + } + + var instance = fiber.stateNode; + var updatePayload = hydrateInstance( + instance, + fiber.type, + fiber.memoizedProps, + rootContainerInstance, + hostContext, + fiber, + ); // TODO: Type this specific to this type of component. + + fiber.updateQueue = updatePayload; // If the update payload indicates that there is a change or if there + // is a new ref we mark this as an update. + + if (updatePayload !== null) { + return true; + } + + return false; + } + + function prepareToHydrateHostTextInstance(fiber) { + if (!supportsHydration) { + { + { + throw Error( + 'Expected prepareToHydrateHostTextInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + } + + var textInstance = fiber.stateNode; + var textContent = fiber.memoizedProps; + var shouldUpdate = hydrateTextInstance(textInstance, textContent, fiber); + + { + if (shouldUpdate) { + // We assume that prepareToHydrateHostTextInstance is called in a context where the + // hydration parent is the parent host component of this host text. + var returnFiber = hydrationParentFiber; + + if (returnFiber !== null) { + switch (returnFiber.tag) { + case HostRoot: { + var parentContainer = returnFiber.stateNode.containerInfo; + didNotMatchHydratedContainerTextInstance(parentContainer, textInstance, textContent); + break; + } + + case HostComponent: { + var parentType = returnFiber.type; + var parentProps = returnFiber.memoizedProps; + var parentInstance = returnFiber.stateNode; + didNotMatchHydratedTextInstance( + parentType, + parentProps, + parentInstance, + textInstance, + textContent, + ); + break; + } + } + } + } + } + + return shouldUpdate; + } + + function prepareToHydrateHostSuspenseInstance(fiber) { + if (!supportsHydration) { + { + { + throw Error( + 'Expected prepareToHydrateHostSuspenseInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + } + + var suspenseState = fiber.memoizedState; + var suspenseInstance = suspenseState !== null ? suspenseState.dehydrated : null; + + if (!suspenseInstance) { + { + throw Error( + 'Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + + hydrateSuspenseInstance(suspenseInstance, fiber); + } + + function skipPastDehydratedSuspenseInstance(fiber) { + if (!supportsHydration) { + { + { + throw Error( + 'Expected skipPastDehydratedSuspenseInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + } + + var suspenseState = fiber.memoizedState; + var suspenseInstance = suspenseState !== null ? suspenseState.dehydrated : null; + + if (!suspenseInstance) { + { + throw Error( + 'Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + + return getNextHydratableInstanceAfterSuspenseInstance(suspenseInstance); + } + + function popToNextHostParent(fiber) { + var parent = fiber.return; + + while ( + parent !== null && + parent.tag !== HostComponent && + parent.tag !== HostRoot && + parent.tag !== SuspenseComponent + ) { + parent = parent.return; + } + + hydrationParentFiber = parent; + } + + function popHydrationState(fiber) { + if (!supportsHydration) { + return false; + } + + if (fiber !== hydrationParentFiber) { + // We're deeper than the current hydration context, inside an inserted + // tree. + return false; + } + + if (!isHydrating) { + // If we're not currently hydrating but we're in a hydration context, then + // we were an insertion and now need to pop up reenter hydration of our + // siblings. + popToNextHostParent(fiber); + isHydrating = true; + return false; + } + + var type = fiber.type; // If we have any remaining hydratable nodes, we need to delete them now. + // We only do this deeper than head and body since they tend to have random + // other nodes in them. We also ignore components with pure text content in + // side of them. + // TODO: Better heuristic. + + if ( + fiber.tag !== HostComponent || + (type !== 'head' && type !== 'body' && !shouldSetTextContent(type, fiber.memoizedProps)) + ) { + var nextInstance = nextHydratableInstance; + + while (nextInstance) { + deleteHydratableInstance(fiber, nextInstance); + nextInstance = getNextHydratableSibling(nextInstance); + } + } + + popToNextHostParent(fiber); + + if (fiber.tag === SuspenseComponent) { + nextHydratableInstance = skipPastDehydratedSuspenseInstance(fiber); + } else { + nextHydratableInstance = hydrationParentFiber + ? getNextHydratableSibling(fiber.stateNode) + : null; + } + + return true; + } + + function resetHydrationState() { + if (!supportsHydration) { + return; + } + + hydrationParentFiber = null; + nextHydratableInstance = null; + isHydrating = false; + } + + var ReactCurrentOwner$3 = ReactSharedInternals.ReactCurrentOwner; + var didReceiveUpdate = false; + var didWarnAboutBadClass; + var didWarnAboutModulePatternComponent; + var didWarnAboutContextTypeOnFunctionComponent; + var didWarnAboutGetDerivedStateOnFunctionComponent; + var didWarnAboutFunctionRefs; + var didWarnAboutReassigningProps; + var didWarnAboutMaxDuration; + var didWarnAboutRevealOrder; + var didWarnAboutTailOptions; + var didWarnAboutDefaultPropsOnFunctionComponent; + + { + didWarnAboutBadClass = {}; + didWarnAboutModulePatternComponent = {}; + didWarnAboutContextTypeOnFunctionComponent = {}; + didWarnAboutGetDerivedStateOnFunctionComponent = {}; + didWarnAboutFunctionRefs = {}; + didWarnAboutReassigningProps = false; + didWarnAboutMaxDuration = false; + didWarnAboutRevealOrder = {}; + didWarnAboutTailOptions = {}; + didWarnAboutDefaultPropsOnFunctionComponent = {}; + } + + function reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime) { + if (current$$1 === null) { + // If this is a fresh new component that hasn't been rendered yet, we + // won't update its child set by applying minimal side-effects. Instead, + // we will add them all to the child before it gets rendered. That means + // we can optimize this reconciliation pass by not tracking side-effects. + workInProgress.child = mountChildFibers( + workInProgress, + null, + nextChildren, + renderExpirationTime, + ); + } else { + // If the current child is the same as the work in progress, it means that + // we haven't yet started any work on these children. Therefore, we use + // the clone algorithm to create a copy of all the current children. + // If we had any progressed work already, that is invalid at this point so + // let's throw it out. + workInProgress.child = reconcileChildFibers( + workInProgress, + current$$1.child, + nextChildren, + renderExpirationTime, + ); + } + } + + function forceUnmountCurrentAndReconcile( + current$$1, + workInProgress, + nextChildren, + renderExpirationTime, + ) { + // This function is fork of reconcileChildren. It's used in cases where we + // want to reconcile without matching against the existing set. This has the + // effect of all current children being unmounted; even if the type and key + // are the same, the old child is unmounted and a new child is created. + // + // To do this, we're going to go through the reconcile algorithm twice. In + // the first pass, we schedule a deletion for all the current children by + // passing null. + workInProgress.child = reconcileChildFibers( + workInProgress, + current$$1.child, + null, + renderExpirationTime, + ); // In the second pass, we mount the new children. The trick here is that we + // pass null in place of where we usually pass the current child set. This has + // the effect of remounting all children regardless of whether their their + // identity matches. + + workInProgress.child = reconcileChildFibers( + workInProgress, + null, + nextChildren, + renderExpirationTime, + ); + } + + function updateForwardRef(current$$1, workInProgress, Component, nextProps, renderExpirationTime) { + // TODO: current can be non-null here even if the component + // hasn't yet mounted. This happens after the first render suspends. + // We'll need to figure out if this is fine or can cause issues. + { + if (workInProgress.type !== workInProgress.elementType) { + // Lazy component props can't be validated in createElement + // because they're only guaranteed to be resolved here. + var innerPropTypes = Component.propTypes; + + if (innerPropTypes) { + checkPropTypes( + innerPropTypes, + nextProps, // Resolved props + 'prop', + getComponentName(Component), + getCurrentFiberStackInDev, + ); + } + } + } + + var render = Component.render; + var ref = workInProgress.ref; // The rest is a fork of updateFunctionComponent + + var nextChildren; + prepareToReadContext(workInProgress, renderExpirationTime); + + { + ReactCurrentOwner$3.current = workInProgress; + setCurrentPhase('render'); + nextChildren = renderWithHooks( + current$$1, + workInProgress, + render, + nextProps, + ref, + renderExpirationTime, + ); + + if (debugRenderPhaseSideEffectsForStrictMode && workInProgress.mode & StrictMode) { + // Only double-render components with Hooks + if (workInProgress.memoizedState !== null) { + nextChildren = renderWithHooks( + current$$1, + workInProgress, + render, + nextProps, + ref, + renderExpirationTime, + ); + } + } + + setCurrentPhase(null); + } + + if (current$$1 !== null && !didReceiveUpdate) { + bailoutHooks(current$$1, workInProgress, renderExpirationTime); + return bailoutOnAlreadyFinishedWork(current$$1, workInProgress, renderExpirationTime); + } // React DevTools reads this flag. + + workInProgress.effectTag |= PerformedWork; + reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime); + return workInProgress.child; + } + + function updateMemoComponent( + current$$1, + workInProgress, + Component, + nextProps, + updateExpirationTime, + renderExpirationTime, + ) { + if (current$$1 === null) { + var type = Component.type; + + if ( + isSimpleFunctionComponent(type) && + Component.compare === null && // SimpleMemoComponent codepath doesn't resolve outer props either. + Component.defaultProps === undefined + ) { + var resolvedType = type; + + { + resolvedType = resolveFunctionForHotReloading(type); + } // If this is a plain function component without default props, + // and with only the default shallow comparison, we upgrade it + // to a SimpleMemoComponent to allow fast path updates. + + workInProgress.tag = SimpleMemoComponent; + workInProgress.type = resolvedType; + + { + validateFunctionComponentInDev(workInProgress, type); + } + + return updateSimpleMemoComponent( + current$$1, + workInProgress, + resolvedType, + nextProps, + updateExpirationTime, + renderExpirationTime, + ); + } + + { + var innerPropTypes = type.propTypes; + + if (innerPropTypes) { + // Inner memo component props aren't currently validated in createElement. + // We could move it there, but we'd still need this for lazy code path. + checkPropTypes( + innerPropTypes, + nextProps, // Resolved props + 'prop', + getComponentName(type), + getCurrentFiberStackInDev, + ); + } + } + + var child = createFiberFromTypeAndProps( + Component.type, + null, + nextProps, + null, + workInProgress.mode, + renderExpirationTime, + ); + child.ref = workInProgress.ref; + child.return = workInProgress; + workInProgress.child = child; + return child; + } + + { + var _type = Component.type; + var _innerPropTypes = _type.propTypes; + + if (_innerPropTypes) { + // Inner memo component props aren't currently validated in createElement. + // We could move it there, but we'd still need this for lazy code path. + checkPropTypes( + _innerPropTypes, + nextProps, // Resolved props + 'prop', + getComponentName(_type), + getCurrentFiberStackInDev, + ); + } + } + + var currentChild = current$$1.child; // This is always exactly one child + + if (updateExpirationTime < renderExpirationTime) { + // This will be the props with resolved defaultProps, + // unlike current.memoizedProps which will be the unresolved ones. + var prevProps = currentChild.memoizedProps; // Default to shallow comparison + + var compare = Component.compare; + compare = compare !== null ? compare : shallowEqual; + + if (compare(prevProps, nextProps) && current$$1.ref === workInProgress.ref) { + return bailoutOnAlreadyFinishedWork(current$$1, workInProgress, renderExpirationTime); + } + } // React DevTools reads this flag. + + workInProgress.effectTag |= PerformedWork; + var newChild = createWorkInProgress(currentChild, nextProps, renderExpirationTime); + newChild.ref = workInProgress.ref; + newChild.return = workInProgress; + workInProgress.child = newChild; + return newChild; + } + + function updateSimpleMemoComponent( + current$$1, + workInProgress, + Component, + nextProps, + updateExpirationTime, + renderExpirationTime, + ) { + // TODO: current can be non-null here even if the component + // hasn't yet mounted. This happens when the inner render suspends. + // We'll need to figure out if this is fine or can cause issues. + { + if (workInProgress.type !== workInProgress.elementType) { + // Lazy component props can't be validated in createElement + // because they're only guaranteed to be resolved here. + var outerMemoType = workInProgress.elementType; + + if (outerMemoType.$$typeof === REACT_LAZY_TYPE) { + // We warn when you define propTypes on lazy() + // so let's just skip over it to find memo() outer wrapper. + // Inner props for memo are validated later. + outerMemoType = refineResolvedLazyComponent(outerMemoType); + } + + var outerPropTypes = outerMemoType && outerMemoType.propTypes; + + if (outerPropTypes) { + checkPropTypes( + outerPropTypes, + nextProps, // Resolved (SimpleMemoComponent has no defaultProps) + 'prop', + getComponentName(outerMemoType), + getCurrentFiberStackInDev, + ); + } // Inner propTypes will be validated in the function component path. + } + } + + if (current$$1 !== null) { + var prevProps = current$$1.memoizedProps; + + if ( + shallowEqual(prevProps, nextProps) && + current$$1.ref === workInProgress.ref && // Prevent bailout if the implementation changed due to hot reload: + workInProgress.type === current$$1.type + ) { + didReceiveUpdate = false; + + if (updateExpirationTime < renderExpirationTime) { + return bailoutOnAlreadyFinishedWork(current$$1, workInProgress, renderExpirationTime); + } + } + } + + return updateFunctionComponent( + current$$1, + workInProgress, + Component, + nextProps, + renderExpirationTime, + ); + } + + function updateFragment(current$$1, workInProgress, renderExpirationTime) { + var nextChildren = workInProgress.pendingProps; + reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime); + return workInProgress.child; + } + + function updateMode(current$$1, workInProgress, renderExpirationTime) { + var nextChildren = workInProgress.pendingProps.children; + reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime); + return workInProgress.child; + } + + function updateProfiler(current$$1, workInProgress, renderExpirationTime) { + if (enableProfilerTimer) { + workInProgress.effectTag |= Update; + } + + var nextProps = workInProgress.pendingProps; + var nextChildren = nextProps.children; + reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime); + return workInProgress.child; + } + + function markRef(current$$1, workInProgress) { + var ref = workInProgress.ref; + + if ((current$$1 === null && ref !== null) || (current$$1 !== null && current$$1.ref !== ref)) { + // Schedule a Ref effect + workInProgress.effectTag |= Ref; + } + } + + function updateFunctionComponent( + current$$1, + workInProgress, + Component, + nextProps, + renderExpirationTime, + ) { + { + if (workInProgress.type !== workInProgress.elementType) { + // Lazy component props can't be validated in createElement + // because they're only guaranteed to be resolved here. + var innerPropTypes = Component.propTypes; + + if (innerPropTypes) { + checkPropTypes( + innerPropTypes, + nextProps, // Resolved props + 'prop', + getComponentName(Component), + getCurrentFiberStackInDev, + ); + } + } + } + + var context; + + if (!disableLegacyContext) { + var unmaskedContext = getUnmaskedContext(workInProgress, Component, true); + context = getMaskedContext(workInProgress, unmaskedContext); + } + + var nextChildren; + prepareToReadContext(workInProgress, renderExpirationTime); + + { + ReactCurrentOwner$3.current = workInProgress; + setCurrentPhase('render'); + nextChildren = renderWithHooks( + current$$1, + workInProgress, + Component, + nextProps, + context, + renderExpirationTime, + ); + + if (debugRenderPhaseSideEffectsForStrictMode && workInProgress.mode & StrictMode) { + // Only double-render components with Hooks + if (workInProgress.memoizedState !== null) { + nextChildren = renderWithHooks( + current$$1, + workInProgress, + Component, + nextProps, + context, + renderExpirationTime, + ); + } + } + + setCurrentPhase(null); + } + + if (current$$1 !== null && !didReceiveUpdate) { + bailoutHooks(current$$1, workInProgress, renderExpirationTime); + return bailoutOnAlreadyFinishedWork(current$$1, workInProgress, renderExpirationTime); + } // React DevTools reads this flag. + + workInProgress.effectTag |= PerformedWork; + reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime); + return workInProgress.child; + } + + function updateClassComponent( + current$$1, + workInProgress, + Component, + nextProps, + renderExpirationTime, + ) { + { + if (workInProgress.type !== workInProgress.elementType) { + // Lazy component props can't be validated in createElement + // because they're only guaranteed to be resolved here. + var innerPropTypes = Component.propTypes; + + if (innerPropTypes) { + checkPropTypes( + innerPropTypes, + nextProps, // Resolved props + 'prop', + getComponentName(Component), + getCurrentFiberStackInDev, + ); + } + } + } // Push context providers early to prevent context stack mismatches. + // During mounting we don't know the child context yet as the instance doesn't exist. + // We will invalidate the child context in finishClassComponent() right after rendering. + + var hasContext; + + if (isContextProvider(Component)) { + hasContext = true; + pushContextProvider(workInProgress); + } else { + hasContext = false; + } + + prepareToReadContext(workInProgress, renderExpirationTime); + var instance = workInProgress.stateNode; + var shouldUpdate; + + if (instance === null) { + if (current$$1 !== null) { + // An class component without an instance only mounts if it suspended + // inside a non- concurrent tree, in an inconsistent state. We want to + // tree it like a new mount, even though an empty version of it already + // committed. Disconnect the alternate pointers. + current$$1.alternate = null; + workInProgress.alternate = null; // Since this is conceptually a new fiber, schedule a Placement effect + + workInProgress.effectTag |= Placement; + } // In the initial pass we might need to construct the instance. + + constructClassInstance(workInProgress, Component, nextProps, renderExpirationTime); + mountClassInstance(workInProgress, Component, nextProps, renderExpirationTime); + shouldUpdate = true; + } else if (current$$1 === null) { + // In a resume, we'll already have an instance we can reuse. + shouldUpdate = resumeMountClassInstance( + workInProgress, + Component, + nextProps, + renderExpirationTime, + ); + } else { + shouldUpdate = updateClassInstance( + current$$1, + workInProgress, + Component, + nextProps, + renderExpirationTime, + ); + } + + var nextUnitOfWork = finishClassComponent( + current$$1, + workInProgress, + Component, + shouldUpdate, + hasContext, + renderExpirationTime, + ); + + { + var inst = workInProgress.stateNode; + + if (inst.props !== nextProps) { + !didWarnAboutReassigningProps + ? warning$1( + false, + 'It looks like %s is reassigning its own `this.props` while rendering. ' + + 'This is not supported and can lead to confusing bugs.', + getComponentName(workInProgress.type) || 'a component', + ) + : void 0; + didWarnAboutReassigningProps = true; + } + } + + return nextUnitOfWork; + } + + function finishClassComponent( + current$$1, + workInProgress, + Component, + shouldUpdate, + hasContext, + renderExpirationTime, + ) { + // Refs should update even if shouldComponentUpdate returns false + markRef(current$$1, workInProgress); + var didCaptureError = (workInProgress.effectTag & DidCapture) !== NoEffect; + + if (!shouldUpdate && !didCaptureError) { + // Context providers should defer to sCU for rendering + if (hasContext) { + invalidateContextProvider(workInProgress, Component, false); + } + + return bailoutOnAlreadyFinishedWork(current$$1, workInProgress, renderExpirationTime); + } + + var instance = workInProgress.stateNode; // Rerender + + ReactCurrentOwner$3.current = workInProgress; + var nextChildren; + + if (didCaptureError && typeof Component.getDerivedStateFromError !== 'function') { + // If we captured an error, but getDerivedStateFrom catch is not defined, + // unmount all the children. componentDidCatch will schedule an update to + // re-render a fallback. This is temporary until we migrate everyone to + // the new API. + // TODO: Warn in a future release. + nextChildren = null; + + if (enableProfilerTimer) { + stopProfilerTimerIfRunning(workInProgress); + } + } else { + { + setCurrentPhase('render'); + nextChildren = instance.render(); + + if (debugRenderPhaseSideEffectsForStrictMode && workInProgress.mode & StrictMode) { + instance.render(); + } + + setCurrentPhase(null); + } + } // React DevTools reads this flag. + + workInProgress.effectTag |= PerformedWork; + + if (current$$1 !== null && didCaptureError) { + // If we're recovering from an error, reconcile without reusing any of + // the existing children. Conceptually, the normal children and the children + // that are shown on error are two different sets, so we shouldn't reuse + // normal children even if their identities match. + forceUnmountCurrentAndReconcile(current$$1, workInProgress, nextChildren, renderExpirationTime); + } else { + reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime); + } // Memoize state using the values we just used to render. + // TODO: Restructure so we never read values from the instance. + + workInProgress.memoizedState = instance.state; // The context might have changed so we need to recalculate it. + + if (hasContext) { + invalidateContextProvider(workInProgress, Component, true); + } + + return workInProgress.child; + } + + function pushHostRootContext(workInProgress) { + var root = workInProgress.stateNode; + + if (root.pendingContext) { + pushTopLevelContextObject( + workInProgress, + root.pendingContext, + root.pendingContext !== root.context, + ); + } else if (root.context) { + // Should always be set + pushTopLevelContextObject(workInProgress, root.context, false); + } + + pushHostContainer(workInProgress, root.containerInfo); + } + + function updateHostRoot(current$$1, workInProgress, renderExpirationTime) { + pushHostRootContext(workInProgress); + var updateQueue = workInProgress.updateQueue; + + if (!(updateQueue !== null)) { + { + throw Error( + 'If the root does not have an updateQueue, we should have already bailed out. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + + var nextProps = workInProgress.pendingProps; + var prevState = workInProgress.memoizedState; + var prevChildren = prevState !== null ? prevState.element : null; + processUpdateQueue(workInProgress, updateQueue, nextProps, null, renderExpirationTime); + var nextState = workInProgress.memoizedState; // Caution: React DevTools currently depends on this property + // being called "element". + + var nextChildren = nextState.element; + + if (nextChildren === prevChildren) { + // If the state is the same as before, that's a bailout because we had + // no work that expires at this time. + resetHydrationState(); + return bailoutOnAlreadyFinishedWork(current$$1, workInProgress, renderExpirationTime); + } + + var root = workInProgress.stateNode; + + if (root.hydrate && enterHydrationState(workInProgress)) { + // If we don't have any current children this might be the first pass. + // We always try to hydrate. If this isn't a hydration pass there won't + // be any children to hydrate which is effectively the same thing as + // not hydrating. + var child = mountChildFibers(workInProgress, null, nextChildren, renderExpirationTime); + workInProgress.child = child; + var node = child; + + while (node) { + // Mark each child as hydrating. This is a fast path to know whether this + // tree is part of a hydrating tree. This is used to determine if a child + // node has fully mounted yet, and for scheduling event replaying. + // Conceptually this is similar to Placement in that a new subtree is + // inserted into the React tree here. It just happens to not need DOM + // mutations because it already exists. + node.effectTag = (node.effectTag & ~Placement) | Hydrating; + node = node.sibling; + } + } else { + // Otherwise reset hydration state in case we aborted and resumed another + // root. + reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime); + resetHydrationState(); + } + + return workInProgress.child; + } + + function updateHostComponent(current$$1, workInProgress, renderExpirationTime) { + pushHostContext(workInProgress); + + if (current$$1 === null) { + tryToClaimNextHydratableInstance(workInProgress); + } + + var type = workInProgress.type; + var nextProps = workInProgress.pendingProps; + var prevProps = current$$1 !== null ? current$$1.memoizedProps : null; + var nextChildren = nextProps.children; + var isDirectTextChild = shouldSetTextContent(type, nextProps); + + if (isDirectTextChild) { + // We special case a direct text child of a host node. This is a common + // case. We won't handle it as a reified child. We will instead handle + // this in the host environment that also have access to this prop. That + // avoids allocating another HostText fiber and traversing it. + nextChildren = null; + } else if (prevProps !== null && shouldSetTextContent(type, prevProps)) { + // If we're switching from a direct text child to a normal child, or to + // empty, we need to schedule the text content to be reset. + workInProgress.effectTag |= ContentReset; + } + + markRef(current$$1, workInProgress); // Check the host config to see if the children are offscreen/hidden. + + if ( + workInProgress.mode & ConcurrentMode && + renderExpirationTime !== Never && + shouldDeprioritizeSubtree(type, nextProps) + ) { + if (enableSchedulerTracing) { + markSpawnedWork(Never); + } // Schedule this fiber to re-render at offscreen priority. Then bailout. + + workInProgress.expirationTime = workInProgress.childExpirationTime = Never; + return null; + } + + reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime); + return workInProgress.child; + } + + function updateHostText(current$$1, workInProgress) { + if (current$$1 === null) { + tryToClaimNextHydratableInstance(workInProgress); + } // Nothing to do here. This is terminal. We'll do the completion step + // immediately after. + + return null; + } + + function mountLazyComponent( + _current, + workInProgress, + elementType, + updateExpirationTime, + renderExpirationTime, + ) { + if (_current !== null) { + // An lazy component only mounts if it suspended inside a non- + // concurrent tree, in an inconsistent state. We want to treat it like + // a new mount, even though an empty version of it already committed. + // Disconnect the alternate pointers. + _current.alternate = null; + workInProgress.alternate = null; // Since this is conceptually a new fiber, schedule a Placement effect + + workInProgress.effectTag |= Placement; + } + + var props = workInProgress.pendingProps; // We can't start a User Timing measurement with correct label yet. + // Cancel and resume right after we know the tag. + + cancelWorkTimer(workInProgress); + var Component = readLazyComponentType(elementType); // Store the unwrapped component in the type. + + workInProgress.type = Component; + var resolvedTag = (workInProgress.tag = resolveLazyComponentTag(Component)); + startWorkTimer(workInProgress); + var resolvedProps = resolveDefaultProps(Component, props); + var child; + + switch (resolvedTag) { + case FunctionComponent: { + { + validateFunctionComponentInDev(workInProgress, Component); + workInProgress.type = Component = resolveFunctionForHotReloading(Component); + } + + child = updateFunctionComponent( + null, + workInProgress, + Component, + resolvedProps, + renderExpirationTime, + ); + break; + } + + case ClassComponent: { + { + workInProgress.type = Component = resolveClassForHotReloading(Component); + } + + child = updateClassComponent( + null, + workInProgress, + Component, + resolvedProps, + renderExpirationTime, + ); + break; + } + + case ForwardRef: { + { + workInProgress.type = Component = resolveForwardRefForHotReloading(Component); + } + + child = updateForwardRef( + null, + workInProgress, + Component, + resolvedProps, + renderExpirationTime, + ); + break; + } + + case MemoComponent: { + { + if (workInProgress.type !== workInProgress.elementType) { + var outerPropTypes = Component.propTypes; + + if (outerPropTypes) { + checkPropTypes( + outerPropTypes, + resolvedProps, // Resolved for outer only + 'prop', + getComponentName(Component), + getCurrentFiberStackInDev, + ); + } + } + } + + child = updateMemoComponent( + null, + workInProgress, + Component, + resolveDefaultProps(Component.type, resolvedProps), // The inner type can have defaults too + updateExpirationTime, + renderExpirationTime, + ); + break; + } + + default: { + var hint = ''; + + { + if ( + Component !== null && + typeof Component === 'object' && + Component.$$typeof === REACT_LAZY_TYPE + ) { + hint = ' Did you wrap a component in React.lazy() more than once?'; + } + } // This message intentionally doesn't mention ForwardRef or MemoComponent + // because the fact that it's a separate type of work is an + // implementation detail. + + { + { + throw Error( + 'Element type is invalid. Received a promise that resolves to: ' + + Component + + '. Lazy element type must resolve to a class or function.' + + hint, + ); + } + } + } + } + + return child; + } + + function mountIncompleteClassComponent( + _current, + workInProgress, + Component, + nextProps, + renderExpirationTime, + ) { + if (_current !== null) { + // An incomplete component only mounts if it suspended inside a non- + // concurrent tree, in an inconsistent state. We want to treat it like + // a new mount, even though an empty version of it already committed. + // Disconnect the alternate pointers. + _current.alternate = null; + workInProgress.alternate = null; // Since this is conceptually a new fiber, schedule a Placement effect + + workInProgress.effectTag |= Placement; + } // Promote the fiber to a class and try rendering again. + + workInProgress.tag = ClassComponent; // The rest of this function is a fork of `updateClassComponent` + // Push context providers early to prevent context stack mismatches. + // During mounting we don't know the child context yet as the instance doesn't exist. + // We will invalidate the child context in finishClassComponent() right after rendering. + + var hasContext; + + if (isContextProvider(Component)) { + hasContext = true; + pushContextProvider(workInProgress); + } else { + hasContext = false; + } + + prepareToReadContext(workInProgress, renderExpirationTime); + constructClassInstance(workInProgress, Component, nextProps, renderExpirationTime); + mountClassInstance(workInProgress, Component, nextProps, renderExpirationTime); + return finishClassComponent( + null, + workInProgress, + Component, + true, + hasContext, + renderExpirationTime, + ); + } + + function mountIndeterminateComponent(_current, workInProgress, Component, renderExpirationTime) { + if (_current !== null) { + // An indeterminate component only mounts if it suspended inside a non- + // concurrent tree, in an inconsistent state. We want to treat it like + // a new mount, even though an empty version of it already committed. + // Disconnect the alternate pointers. + _current.alternate = null; + workInProgress.alternate = null; // Since this is conceptually a new fiber, schedule a Placement effect + + workInProgress.effectTag |= Placement; + } + + var props = workInProgress.pendingProps; + var context; + + if (!disableLegacyContext) { + var unmaskedContext = getUnmaskedContext(workInProgress, Component, false); + context = getMaskedContext(workInProgress, unmaskedContext); + } + + prepareToReadContext(workInProgress, renderExpirationTime); + var value; + + { + if (Component.prototype && typeof Component.prototype.render === 'function') { + var componentName = getComponentName(Component) || 'Unknown'; + + if (!didWarnAboutBadClass[componentName]) { + warningWithoutStack$1( + false, + "The <%s /> component appears to have a render method, but doesn't extend React.Component. " + + 'This is likely to cause errors. Change %s to extend React.Component instead.', + componentName, + componentName, + ); + didWarnAboutBadClass[componentName] = true; + } + } + + if (workInProgress.mode & StrictMode) { + ReactStrictModeWarnings.recordLegacyContextWarning(workInProgress, null); + } + + ReactCurrentOwner$3.current = workInProgress; + value = renderWithHooks(null, workInProgress, Component, props, context, renderExpirationTime); + } // React DevTools reads this flag. + + workInProgress.effectTag |= PerformedWork; + + if ( + typeof value === 'object' && + value !== null && + typeof value.render === 'function' && + value.$$typeof === undefined + ) { + { + var _componentName = getComponentName(Component) || 'Unknown'; + + if (!didWarnAboutModulePatternComponent[_componentName]) { + warningWithoutStack$1( + false, + 'The <%s /> component appears to be a function component that returns a class instance. ' + + 'Change %s to a class that extends React.Component instead. ' + + "If you can't use a class try assigning the prototype on the function as a workaround. " + + "`%s.prototype = React.Component.prototype`. Don't use an arrow function since it " + + 'cannot be called with `new` by React.', + _componentName, + _componentName, + _componentName, + ); + didWarnAboutModulePatternComponent[_componentName] = true; + } + } // Proceed under the assumption that this is a class instance + + workInProgress.tag = ClassComponent; // Throw out any hooks that were used. + + resetHooks(); // Push context providers early to prevent context stack mismatches. + // During mounting we don't know the child context yet as the instance doesn't exist. + // We will invalidate the child context in finishClassComponent() right after rendering. + + var hasContext = false; + + if (isContextProvider(Component)) { + hasContext = true; + pushContextProvider(workInProgress); + } else { + hasContext = false; + } + + workInProgress.memoizedState = + value.state !== null && value.state !== undefined ? value.state : null; + var getDerivedStateFromProps = Component.getDerivedStateFromProps; + + if (typeof getDerivedStateFromProps === 'function') { + applyDerivedStateFromProps(workInProgress, Component, getDerivedStateFromProps, props); + } + + adoptClassInstance(workInProgress, value); + mountClassInstance(workInProgress, Component, props, renderExpirationTime); + return finishClassComponent( + null, + workInProgress, + Component, + true, + hasContext, + renderExpirationTime, + ); + } else { + // Proceed under the assumption that this is a function component + workInProgress.tag = FunctionComponent; + + { + if (disableLegacyContext && Component.contextTypes) { + warningWithoutStack$1( + false, + '%s uses the legacy contextTypes API which is no longer supported. ' + + 'Use React.createContext() with React.useContext() instead.', + getComponentName(Component) || 'Unknown', + ); + } + + if (debugRenderPhaseSideEffectsForStrictMode && workInProgress.mode & StrictMode) { + // Only double-render components with Hooks + if (workInProgress.memoizedState !== null) { + value = renderWithHooks( + null, + workInProgress, + Component, + props, + context, + renderExpirationTime, + ); + } + } + } + + reconcileChildren(null, workInProgress, value, renderExpirationTime); + + { + validateFunctionComponentInDev(workInProgress, Component); + } + + return workInProgress.child; + } + } + + function validateFunctionComponentInDev(workInProgress, Component) { + if (Component) { + !!Component.childContextTypes + ? warningWithoutStack$1( + false, + '%s(...): childContextTypes cannot be defined on a function component.', + Component.displayName || Component.name || 'Component', + ) + : void 0; + } + + if (workInProgress.ref !== null) { + var info = ''; + var ownerName = getCurrentFiberOwnerNameInDevOrNull(); + + if (ownerName) { + info += '\n\nCheck the render method of `' + ownerName + '`.'; + } + + var warningKey = ownerName || workInProgress._debugID || ''; + var debugSource = workInProgress._debugSource; + + if (debugSource) { + warningKey = debugSource.fileName + ':' + debugSource.lineNumber; + } + + if (!didWarnAboutFunctionRefs[warningKey]) { + didWarnAboutFunctionRefs[warningKey] = true; + warning$1( + false, + 'Function components cannot be given refs. ' + + 'Attempts to access this ref will fail. ' + + 'Did you mean to use React.forwardRef()?%s', + info, + ); + } + } + + if (warnAboutDefaultPropsOnFunctionComponents && Component.defaultProps !== undefined) { + var componentName = getComponentName(Component) || 'Unknown'; + + if (!didWarnAboutDefaultPropsOnFunctionComponent[componentName]) { + warningWithoutStack$1( + false, + '%s: Support for defaultProps will be removed from function components ' + + 'in a future major release. Use JavaScript default parameters instead.', + componentName, + ); + didWarnAboutDefaultPropsOnFunctionComponent[componentName] = true; + } + } + + if (typeof Component.getDerivedStateFromProps === 'function') { + var _componentName2 = getComponentName(Component) || 'Unknown'; + + if (!didWarnAboutGetDerivedStateOnFunctionComponent[_componentName2]) { + warningWithoutStack$1( + false, + '%s: Function components do not support getDerivedStateFromProps.', + _componentName2, + ); + didWarnAboutGetDerivedStateOnFunctionComponent[_componentName2] = true; + } + } + + if (typeof Component.contextType === 'object' && Component.contextType !== null) { + var _componentName3 = getComponentName(Component) || 'Unknown'; + + if (!didWarnAboutContextTypeOnFunctionComponent[_componentName3]) { + warningWithoutStack$1( + false, + '%s: Function components do not support contextType.', + _componentName3, + ); + didWarnAboutContextTypeOnFunctionComponent[_componentName3] = true; + } + } + } + + var SUSPENDED_MARKER = { + dehydrated: null, + retryTime: NoWork, + }; + + function shouldRemainOnFallback(suspenseContext, current$$1, workInProgress) { + // If the context is telling us that we should show a fallback, and we're not + // already showing content, then we should show the fallback instead. + return ( + hasSuspenseContext(suspenseContext, ForceSuspenseFallback) && + (current$$1 === null || current$$1.memoizedState !== null) + ); + } + + function updateSuspenseComponent(current$$1, workInProgress, renderExpirationTime) { + var mode = workInProgress.mode; + var nextProps = workInProgress.pendingProps; // This is used by DevTools to force a boundary to suspend. + + { + if (shouldSuspend(workInProgress)) { + workInProgress.effectTag |= DidCapture; + } + } + + var suspenseContext = suspenseStackCursor.current; + var nextDidTimeout = false; + var didSuspend = (workInProgress.effectTag & DidCapture) !== NoEffect; + + if (didSuspend || shouldRemainOnFallback(suspenseContext, current$$1, workInProgress)) { + // Something in this boundary's subtree already suspended. Switch to + // rendering the fallback children. + nextDidTimeout = true; + workInProgress.effectTag &= ~DidCapture; + } else { + // Attempting the main content + if (current$$1 === null || current$$1.memoizedState !== null) { + // This is a new mount or this boundary is already showing a fallback state. + // Mark this subtree context as having at least one invisible parent that could + // handle the fallback state. + // Boundaries without fallbacks or should be avoided are not considered since + // they cannot handle preferred fallback states. + if (nextProps.fallback !== undefined && nextProps.unstable_avoidThisFallback !== true) { + suspenseContext = addSubtreeSuspenseContext( + suspenseContext, + InvisibleParentSuspenseContext, + ); + } + } + } + + suspenseContext = setDefaultShallowSuspenseContext(suspenseContext); + pushSuspenseContext(workInProgress, suspenseContext); + + { + if ('maxDuration' in nextProps) { + if (!didWarnAboutMaxDuration) { + didWarnAboutMaxDuration = true; + warning$1( + false, + 'maxDuration has been removed from React. ' + 'Remove the maxDuration prop.', + ); + } + } + } // This next part is a bit confusing. If the children timeout, we switch to + // showing the fallback children in place of the "primary" children. + // However, we don't want to delete the primary children because then their + // state will be lost (both the React state and the host state, e.g. + // uncontrolled form inputs). Instead we keep them mounted and hide them. + // Both the fallback children AND the primary children are rendered at the + // same time. Once the primary children are un-suspended, we can delete + // the fallback children — don't need to preserve their state. + // + // The two sets of children are siblings in the host environment, but + // semantically, for purposes of reconciliation, they are two separate sets. + // So we store them using two fragment fibers. + // + // However, we want to avoid allocating extra fibers for every placeholder. + // They're only necessary when the children time out, because that's the + // only time when both sets are mounted. + // + // So, the extra fragment fibers are only used if the children time out. + // Otherwise, we render the primary children directly. This requires some + // custom reconciliation logic to preserve the state of the primary + // children. It's essentially a very basic form of re-parenting. + + if (current$$1 === null) { + // If we're currently hydrating, try to hydrate this boundary. + // But only if this has a fallback. + if (nextProps.fallback !== undefined) { + tryToClaimNextHydratableInstance(workInProgress); // This could've been a dehydrated suspense component. + + if (enableSuspenseServerRenderer) { + var suspenseState = workInProgress.memoizedState; + + if (suspenseState !== null) { + var dehydrated = suspenseState.dehydrated; + + if (dehydrated !== null) { + return mountDehydratedSuspenseComponent( + workInProgress, + dehydrated, + renderExpirationTime, + ); + } + } + } + } // This is the initial mount. This branch is pretty simple because there's + // no previous state that needs to be preserved. + + if (nextDidTimeout) { + // Mount separate fragments for primary and fallback children. + var nextFallbackChildren = nextProps.fallback; + var primaryChildFragment = createFiberFromFragment(null, mode, NoWork, null); + primaryChildFragment.return = workInProgress; + + if ((workInProgress.mode & BlockingMode) === NoMode) { + // Outside of blocking mode, we commit the effects from the + // partially completed, timed-out tree, too. + var progressedState = workInProgress.memoizedState; + var progressedPrimaryChild = + progressedState !== null ? workInProgress.child.child : workInProgress.child; + primaryChildFragment.child = progressedPrimaryChild; + var progressedChild = progressedPrimaryChild; + + while (progressedChild !== null) { + progressedChild.return = primaryChildFragment; + progressedChild = progressedChild.sibling; + } + } + + var fallbackChildFragment = createFiberFromFragment( + nextFallbackChildren, + mode, + renderExpirationTime, + null, + ); + fallbackChildFragment.return = workInProgress; + primaryChildFragment.sibling = fallbackChildFragment; // Skip the primary children, and continue working on the + // fallback children. + + workInProgress.memoizedState = SUSPENDED_MARKER; + workInProgress.child = primaryChildFragment; + return fallbackChildFragment; + } else { + // Mount the primary children without an intermediate fragment fiber. + var nextPrimaryChildren = nextProps.children; + workInProgress.memoizedState = null; + return (workInProgress.child = mountChildFibers( + workInProgress, + null, + nextPrimaryChildren, + renderExpirationTime, + )); + } + } else { + // This is an update. This branch is more complicated because we need to + // ensure the state of the primary children is preserved. + var prevState = current$$1.memoizedState; + + if (prevState !== null) { + if (enableSuspenseServerRenderer) { + var _dehydrated = prevState.dehydrated; + + if (_dehydrated !== null) { + if (!didSuspend) { + return updateDehydratedSuspenseComponent( + current$$1, + workInProgress, + _dehydrated, + prevState, + renderExpirationTime, + ); + } else if (workInProgress.memoizedState !== null) { + // Something suspended and we should still be in dehydrated mode. + // Leave the existing child in place. + workInProgress.child = current$$1.child; // The dehydrated completion pass expects this flag to be there + // but the normal suspense pass doesn't. + + workInProgress.effectTag |= DidCapture; + return null; + } else { + // Suspended but we should no longer be in dehydrated mode. + // Therefore we now have to render the fallback. Wrap the children + // in a fragment fiber to keep them separate from the fallback + // children. + var _nextFallbackChildren = nextProps.fallback; + + var _primaryChildFragment = createFiberFromFragment( + // It shouldn't matter what the pending props are because we aren't + // going to render this fragment. + null, + mode, + NoWork, + null, + ); + + _primaryChildFragment.return = workInProgress; // This is always null since we never want the previous child + // that we're not going to hydrate. + + _primaryChildFragment.child = null; + + if ((workInProgress.mode & BlockingMode) === NoMode) { + // Outside of blocking mode, we commit the effects from the + // partially completed, timed-out tree, too. + var _progressedChild = (_primaryChildFragment.child = workInProgress.child); + + while (_progressedChild !== null) { + _progressedChild.return = _primaryChildFragment; + _progressedChild = _progressedChild.sibling; + } + } else { + // We will have dropped the effect list which contains the deletion. + // We need to reconcile to delete the current child. + reconcileChildFibers(workInProgress, current$$1.child, null, renderExpirationTime); + } // Because primaryChildFragment is a new fiber that we're inserting as the + // parent of a new tree, we need to set its treeBaseDuration. + + if (enableProfilerTimer && workInProgress.mode & ProfileMode) { + // treeBaseDuration is the sum of all the child tree base durations. + var treeBaseDuration = 0; + var hiddenChild = _primaryChildFragment.child; + + while (hiddenChild !== null) { + treeBaseDuration += hiddenChild.treeBaseDuration; + hiddenChild = hiddenChild.sibling; + } + + _primaryChildFragment.treeBaseDuration = treeBaseDuration; + } // Create a fragment from the fallback children, too. + + var _fallbackChildFragment = createFiberFromFragment( + _nextFallbackChildren, + mode, + renderExpirationTime, + null, + ); + + _fallbackChildFragment.return = workInProgress; + _primaryChildFragment.sibling = _fallbackChildFragment; + _fallbackChildFragment.effectTag |= Placement; + _primaryChildFragment.childExpirationTime = NoWork; + workInProgress.memoizedState = SUSPENDED_MARKER; + workInProgress.child = _primaryChildFragment; // Skip the primary children, and continue working on the + // fallback children. + + return _fallbackChildFragment; + } + } + } // The current tree already timed out. That means each child set is + // wrapped in a fragment fiber. + + var currentPrimaryChildFragment = current$$1.child; + var currentFallbackChildFragment = currentPrimaryChildFragment.sibling; + + if (nextDidTimeout) { + // Still timed out. Reuse the current primary children by cloning + // its fragment. We're going to skip over these entirely. + var _nextFallbackChildren2 = nextProps.fallback; + + var _primaryChildFragment2 = createWorkInProgress( + currentPrimaryChildFragment, + currentPrimaryChildFragment.pendingProps, + NoWork, + ); + + _primaryChildFragment2.return = workInProgress; + + if ((workInProgress.mode & BlockingMode) === NoMode) { + // Outside of blocking mode, we commit the effects from the + // partially completed, timed-out tree, too. + var _progressedState = workInProgress.memoizedState; + + var _progressedPrimaryChild = + _progressedState !== null ? workInProgress.child.child : workInProgress.child; + + if (_progressedPrimaryChild !== currentPrimaryChildFragment.child) { + _primaryChildFragment2.child = _progressedPrimaryChild; + var _progressedChild2 = _progressedPrimaryChild; + + while (_progressedChild2 !== null) { + _progressedChild2.return = _primaryChildFragment2; + _progressedChild2 = _progressedChild2.sibling; + } + } + } // Because primaryChildFragment is a new fiber that we're inserting as the + // parent of a new tree, we need to set its treeBaseDuration. + + if (enableProfilerTimer && workInProgress.mode & ProfileMode) { + // treeBaseDuration is the sum of all the child tree base durations. + var _treeBaseDuration = 0; + var _hiddenChild = _primaryChildFragment2.child; + + while (_hiddenChild !== null) { + _treeBaseDuration += _hiddenChild.treeBaseDuration; + _hiddenChild = _hiddenChild.sibling; + } + + _primaryChildFragment2.treeBaseDuration = _treeBaseDuration; + } // Clone the fallback child fragment, too. These we'll continue + // working on. + + var _fallbackChildFragment2 = createWorkInProgress( + currentFallbackChildFragment, + _nextFallbackChildren2, + currentFallbackChildFragment.expirationTime, + ); + + _fallbackChildFragment2.return = workInProgress; + _primaryChildFragment2.sibling = _fallbackChildFragment2; + _primaryChildFragment2.childExpirationTime = NoWork; // Skip the primary children, and continue working on the + // fallback children. + + workInProgress.memoizedState = SUSPENDED_MARKER; + workInProgress.child = _primaryChildFragment2; + return _fallbackChildFragment2; + } else { + // No longer suspended. Switch back to showing the primary children, + // and remove the intermediate fragment fiber. + var _nextPrimaryChildren = nextProps.children; + var currentPrimaryChild = currentPrimaryChildFragment.child; + var primaryChild = reconcileChildFibers( + workInProgress, + currentPrimaryChild, + _nextPrimaryChildren, + renderExpirationTime, + ); // If this render doesn't suspend, we need to delete the fallback + // children. Wait until the complete phase, after we've confirmed the + // fallback is no longer needed. + // TODO: Would it be better to store the fallback fragment on + // the stateNode? + // Continue rendering the children, like we normally do. + + workInProgress.memoizedState = null; + return (workInProgress.child = primaryChild); + } + } else { + // The current tree has not already timed out. That means the primary + // children are not wrapped in a fragment fiber. + var _currentPrimaryChild = current$$1.child; + + if (nextDidTimeout) { + // Timed out. Wrap the children in a fragment fiber to keep them + // separate from the fallback children. + var _nextFallbackChildren3 = nextProps.fallback; + + var _primaryChildFragment3 = createFiberFromFragment( + // It shouldn't matter what the pending props are because we aren't + // going to render this fragment. + null, + mode, + NoWork, + null, + ); + + _primaryChildFragment3.return = workInProgress; + _primaryChildFragment3.child = _currentPrimaryChild; + + if (_currentPrimaryChild !== null) { + _currentPrimaryChild.return = _primaryChildFragment3; + } // Even though we're creating a new fiber, there are no new children, + // because we're reusing an already mounted tree. So we don't need to + // schedule a placement. + // primaryChildFragment.effectTag |= Placement; + + if ((workInProgress.mode & BlockingMode) === NoMode) { + // Outside of blocking mode, we commit the effects from the + // partially completed, timed-out tree, too. + var _progressedState2 = workInProgress.memoizedState; + + var _progressedPrimaryChild2 = + _progressedState2 !== null ? workInProgress.child.child : workInProgress.child; + + _primaryChildFragment3.child = _progressedPrimaryChild2; + var _progressedChild3 = _progressedPrimaryChild2; + + while (_progressedChild3 !== null) { + _progressedChild3.return = _primaryChildFragment3; + _progressedChild3 = _progressedChild3.sibling; + } + } // Because primaryChildFragment is a new fiber that we're inserting as the + // parent of a new tree, we need to set its treeBaseDuration. + + if (enableProfilerTimer && workInProgress.mode & ProfileMode) { + // treeBaseDuration is the sum of all the child tree base durations. + var _treeBaseDuration2 = 0; + var _hiddenChild2 = _primaryChildFragment3.child; + + while (_hiddenChild2 !== null) { + _treeBaseDuration2 += _hiddenChild2.treeBaseDuration; + _hiddenChild2 = _hiddenChild2.sibling; + } + + _primaryChildFragment3.treeBaseDuration = _treeBaseDuration2; + } // Create a fragment from the fallback children, too. + + var _fallbackChildFragment3 = createFiberFromFragment( + _nextFallbackChildren3, + mode, + renderExpirationTime, + null, + ); + + _fallbackChildFragment3.return = workInProgress; + _primaryChildFragment3.sibling = _fallbackChildFragment3; + _fallbackChildFragment3.effectTag |= Placement; + _primaryChildFragment3.childExpirationTime = NoWork; // Skip the primary children, and continue working on the + // fallback children. + + workInProgress.memoizedState = SUSPENDED_MARKER; + workInProgress.child = _primaryChildFragment3; + return _fallbackChildFragment3; + } else { + // Still haven't timed out. Continue rendering the children, like we + // normally do. + workInProgress.memoizedState = null; + var _nextPrimaryChildren2 = nextProps.children; + return (workInProgress.child = reconcileChildFibers( + workInProgress, + _currentPrimaryChild, + _nextPrimaryChildren2, + renderExpirationTime, + )); + } + } + } + } + + function retrySuspenseComponentWithoutHydrating(current$$1, workInProgress, renderExpirationTime) { + // We're now not suspended nor dehydrated. + workInProgress.memoizedState = null; // Retry with the full children. + + var nextProps = workInProgress.pendingProps; + var nextChildren = nextProps.children; // This will ensure that the children get Placement effects and + // that the old child gets a Deletion effect. + // We could also call forceUnmountCurrentAndReconcile. + + reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime); + return workInProgress.child; + } + + function mountDehydratedSuspenseComponent(workInProgress, suspenseInstance, renderExpirationTime) { + // During the first pass, we'll bail out and not drill into the children. + // Instead, we'll leave the content in place and try to hydrate it later. + if ((workInProgress.mode & BlockingMode) === NoMode) { + { + warning$1( + false, + 'Cannot hydrate Suspense in legacy mode. Switch from ' + + 'ReactDOM.hydrate(element, container) to ' + + 'ReactDOM.createBlockingRoot(container, { hydrate: true })' + + '.render(element) or remove the Suspense components from ' + + 'the server rendered components.', + ); + } + + workInProgress.expirationTime = Sync; + } else if (isSuspenseInstanceFallback(suspenseInstance)) { + // This is a client-only boundary. Since we won't get any content from the server + // for this, we need to schedule that at a higher priority based on when it would + // have timed out. In theory we could render it in this pass but it would have the + // wrong priority associated with it and will prevent hydration of parent path. + // Instead, we'll leave work left on it to render it in a separate commit. + // TODO This time should be the time at which the server rendered response that is + // a parent to this boundary was displayed. However, since we currently don't have + // a protocol to transfer that time, we'll just estimate it by using the current + // time. This will mean that Suspense timeouts are slightly shifted to later than + // they should be. + var serverDisplayTime = requestCurrentTimeForUpdate(); // Schedule a normal pri update to render this content. + + var newExpirationTime = computeAsyncExpiration(serverDisplayTime); + + if (enableSchedulerTracing) { + markSpawnedWork(newExpirationTime); + } + + workInProgress.expirationTime = newExpirationTime; + } else { + // We'll continue hydrating the rest at offscreen priority since we'll already + // be showing the right content coming from the server, it is no rush. + workInProgress.expirationTime = Never; + + if (enableSchedulerTracing) { + markSpawnedWork(Never); + } + } + + return null; + } + + function updateDehydratedSuspenseComponent( + current$$1, + workInProgress, + suspenseInstance, + suspenseState, + renderExpirationTime, + ) { + // We should never be hydrating at this point because it is the first pass, + // but after we've already committed once. + warnIfHydrating(); + + if ((workInProgress.mode & BlockingMode) === NoMode) { + return retrySuspenseComponentWithoutHydrating(current$$1, workInProgress, renderExpirationTime); + } + + if (isSuspenseInstanceFallback(suspenseInstance)) { + // This boundary is in a permanent fallback state. In this case, we'll never + // get an update and we'll never be able to hydrate the final content. Let's just try the + // client side render instead. + return retrySuspenseComponentWithoutHydrating(current$$1, workInProgress, renderExpirationTime); + } // We use childExpirationTime to indicate that a child might depend on context, so if + // any context has changed, we need to treat is as if the input might have changed. + + var hasContextChanged$$1 = current$$1.childExpirationTime >= renderExpirationTime; + + if (didReceiveUpdate || hasContextChanged$$1) { + // This boundary has changed since the first render. This means that we are now unable to + // hydrate it. We might still be able to hydrate it using an earlier expiration time, if + // we are rendering at lower expiration than sync. + if (renderExpirationTime < Sync) { + if (suspenseState.retryTime <= renderExpirationTime) { + // This render is even higher pri than we've seen before, let's try again + // at even higher pri. + var attemptHydrationAtExpirationTime = renderExpirationTime + 1; + suspenseState.retryTime = attemptHydrationAtExpirationTime; + scheduleWork(current$$1, attemptHydrationAtExpirationTime); // TODO: Early abort this render. + } else { + // We have already tried to ping at a higher priority than we're rendering with + // so if we got here, we must have failed to hydrate at those levels. We must + // now give up. Instead, we're going to delete the whole subtree and instead inject + // a new real Suspense boundary to take its place, which may render content + // or fallback. This might suspend for a while and if it does we might still have + // an opportunity to hydrate before this pass commits. + } + } // If we have scheduled higher pri work above, this will probably just abort the render + // since we now have higher priority work, but in case it doesn't, we need to prepare to + // render something, if we time out. Even if that requires us to delete everything and + // skip hydration. + // Delay having to do this as long as the suspense timeout allows us. + + renderDidSuspendDelayIfPossible(); + return retrySuspenseComponentWithoutHydrating(current$$1, workInProgress, renderExpirationTime); + } else if (isSuspenseInstancePending(suspenseInstance)) { + // This component is still pending more data from the server, so we can't hydrate its + // content. We treat it as if this component suspended itself. It might seem as if + // we could just try to render it client-side instead. However, this will perform a + // lot of unnecessary work and is unlikely to complete since it often will suspend + // on missing data anyway. Additionally, the server might be able to render more + // than we can on the client yet. In that case we'd end up with more fallback states + // on the client than if we just leave it alone. If the server times out or errors + // these should update this boundary to the permanent Fallback state instead. + // Mark it as having captured (i.e. suspended). + workInProgress.effectTag |= DidCapture; // Leave the child in place. I.e. the dehydrated fragment. + + workInProgress.child = current$$1.child; // Register a callback to retry this boundary once the server has sent the result. + + registerSuspenseInstanceRetry( + suspenseInstance, + retryDehydratedSuspenseBoundary.bind(null, current$$1), + ); + return null; + } else { + // This is the first attempt. + reenterHydrationStateFromDehydratedSuspenseInstance(workInProgress, suspenseInstance); + var nextProps = workInProgress.pendingProps; + var nextChildren = nextProps.children; + var child = mountChildFibers(workInProgress, null, nextChildren, renderExpirationTime); + var node = child; + + while (node) { + // Mark each child as hydrating. This is a fast path to know whether this + // tree is part of a hydrating tree. This is used to determine if a child + // node has fully mounted yet, and for scheduling event replaying. + // Conceptually this is similar to Placement in that a new subtree is + // inserted into the React tree here. It just happens to not need DOM + // mutations because it already exists. + node.effectTag |= Hydrating; + node = node.sibling; + } + + workInProgress.child = child; + return workInProgress.child; + } + } + + function scheduleWorkOnFiber(fiber, renderExpirationTime) { + if (fiber.expirationTime < renderExpirationTime) { + fiber.expirationTime = renderExpirationTime; + } + + var alternate = fiber.alternate; + + if (alternate !== null && alternate.expirationTime < renderExpirationTime) { + alternate.expirationTime = renderExpirationTime; + } + + scheduleWorkOnParentPath(fiber.return, renderExpirationTime); + } + + function propagateSuspenseContextChange(workInProgress, firstChild, renderExpirationTime) { + // Mark any Suspense boundaries with fallbacks as having work to do. + // If they were previously forced into fallbacks, they may now be able + // to unblock. + var node = firstChild; + + while (node !== null) { + if (node.tag === SuspenseComponent) { + var state = node.memoizedState; + + if (state !== null) { + scheduleWorkOnFiber(node, renderExpirationTime); + } + } else if (node.tag === SuspenseListComponent) { + // If the tail is hidden there might not be an Suspense boundaries + // to schedule work on. In this case we have to schedule it on the + // list itself. + // We don't have to traverse to the children of the list since + // the list will propagate the change when it rerenders. + scheduleWorkOnFiber(node, renderExpirationTime); + } else if (node.child !== null) { + node.child.return = node; + node = node.child; + continue; + } + + if (node === workInProgress) { + return; + } + + while (node.sibling === null) { + if (node.return === null || node.return === workInProgress) { + return; + } + + node = node.return; + } + + node.sibling.return = node.return; + node = node.sibling; + } + } + + function findLastContentRow(firstChild) { + // This is going to find the last row among these children that is already + // showing content on the screen, as opposed to being in fallback state or + // new. If a row has multiple Suspense boundaries, any of them being in the + // fallback state, counts as the whole row being in a fallback state. + // Note that the "rows" will be workInProgress, but any nested children + // will still be current since we haven't rendered them yet. The mounted + // order may not be the same as the new order. We use the new order. + var row = firstChild; + var lastContentRow = null; + + while (row !== null) { + var currentRow = row.alternate; // New rows can't be content rows. + + if (currentRow !== null && findFirstSuspended(currentRow) === null) { + lastContentRow = row; + } + + row = row.sibling; + } + + return lastContentRow; + } + + function validateRevealOrder(revealOrder) { + { + if ( + revealOrder !== undefined && + revealOrder !== 'forwards' && + revealOrder !== 'backwards' && + revealOrder !== 'together' && + !didWarnAboutRevealOrder[revealOrder] + ) { + didWarnAboutRevealOrder[revealOrder] = true; + + if (typeof revealOrder === 'string') { + switch (revealOrder.toLowerCase()) { + case 'together': + case 'forwards': + case 'backwards': { + warning$1( + false, + '"%s" is not a valid value for revealOrder on <SuspenseList />. ' + + 'Use lowercase "%s" instead.', + revealOrder, + revealOrder.toLowerCase(), + ); + break; + } + + case 'forward': + case 'backward': { + warning$1( + false, + '"%s" is not a valid value for revealOrder on <SuspenseList />. ' + + 'React uses the -s suffix in the spelling. Use "%ss" instead.', + revealOrder, + revealOrder.toLowerCase(), + ); + break; + } + + default: + warning$1( + false, + '"%s" is not a supported revealOrder on <SuspenseList />. ' + + 'Did you mean "together", "forwards" or "backwards"?', + revealOrder, + ); + break; + } + } else { + warning$1( + false, + '%s is not a supported value for revealOrder on <SuspenseList />. ' + + 'Did you mean "together", "forwards" or "backwards"?', + revealOrder, + ); + } + } + } + } + + function validateTailOptions(tailMode, revealOrder) { + { + if (tailMode !== undefined && !didWarnAboutTailOptions[tailMode]) { + if (tailMode !== 'collapsed' && tailMode !== 'hidden') { + didWarnAboutTailOptions[tailMode] = true; + warning$1( + false, + '"%s" is not a supported value for tail on <SuspenseList />. ' + + 'Did you mean "collapsed" or "hidden"?', + tailMode, + ); + } else if (revealOrder !== 'forwards' && revealOrder !== 'backwards') { + didWarnAboutTailOptions[tailMode] = true; + warning$1( + false, + '<SuspenseList tail="%s" /> is only valid if revealOrder is ' + + '"forwards" or "backwards". ' + + 'Did you mean to specify revealOrder="forwards"?', + tailMode, + ); + } + } + } + } + + function validateSuspenseListNestedChild(childSlot, index) { + { + var isArray = Array.isArray(childSlot); + var isIterable = !isArray && typeof getIteratorFn(childSlot) === 'function'; + + if (isArray || isIterable) { + var type = isArray ? 'array' : 'iterable'; + warning$1( + false, + 'A nested %s was passed to row #%s in <SuspenseList />. Wrap it in ' + + 'an additional SuspenseList to configure its revealOrder: ' + + '<SuspenseList revealOrder=...> ... ' + + '<SuspenseList revealOrder=...>{%s}</SuspenseList> ... ' + + '</SuspenseList>', + type, + index, + type, + ); + return false; + } + } + + return true; + } + + function validateSuspenseListChildren(children, revealOrder) { + { + if ( + (revealOrder === 'forwards' || revealOrder === 'backwards') && + children !== undefined && + children !== null && + children !== false + ) { + if (Array.isArray(children)) { + for (var i = 0; i < children.length; i++) { + if (!validateSuspenseListNestedChild(children[i], i)) { + return; + } + } + } else { + var iteratorFn = getIteratorFn(children); + + if (typeof iteratorFn === 'function') { + var childrenIterator = iteratorFn.call(children); + + if (childrenIterator) { + var step = childrenIterator.next(); + var _i = 0; + + for (; !step.done; step = childrenIterator.next()) { + if (!validateSuspenseListNestedChild(step.value, _i)) { + return; + } + + _i++; + } + } + } else { + warning$1( + false, + 'A single row was passed to a <SuspenseList revealOrder="%s" />. ' + + 'This is not useful since it needs multiple rows. ' + + 'Did you mean to pass multiple children or an array?', + revealOrder, + ); + } + } + } + } + } + + function initSuspenseListRenderState( + workInProgress, + isBackwards, + tail, + lastContentRow, + tailMode, + lastEffectBeforeRendering, + ) { + var renderState = workInProgress.memoizedState; + + if (renderState === null) { + workInProgress.memoizedState = { + isBackwards: isBackwards, + rendering: null, + last: lastContentRow, + tail: tail, + tailExpiration: 0, + tailMode: tailMode, + lastEffect: lastEffectBeforeRendering, + }; + } else { + // We can reuse the existing object from previous renders. + renderState.isBackwards = isBackwards; + renderState.rendering = null; + renderState.last = lastContentRow; + renderState.tail = tail; + renderState.tailExpiration = 0; + renderState.tailMode = tailMode; + renderState.lastEffect = lastEffectBeforeRendering; + } + } // This can end up rendering this component multiple passes. + // The first pass splits the children fibers into two sets. A head and tail. + // We first render the head. If anything is in fallback state, we do another + // pass through beginWork to rerender all children (including the tail) with + // the force suspend context. If the first render didn't have anything in + // in fallback state. Then we render each row in the tail one-by-one. + // That happens in the completeWork phase without going back to beginWork. + + function updateSuspenseListComponent(current$$1, workInProgress, renderExpirationTime) { + var nextProps = workInProgress.pendingProps; + var revealOrder = nextProps.revealOrder; + var tailMode = nextProps.tail; + var newChildren = nextProps.children; + validateRevealOrder(revealOrder); + validateTailOptions(tailMode, revealOrder); + validateSuspenseListChildren(newChildren, revealOrder); + reconcileChildren(current$$1, workInProgress, newChildren, renderExpirationTime); + var suspenseContext = suspenseStackCursor.current; + var shouldForceFallback = hasSuspenseContext(suspenseContext, ForceSuspenseFallback); + + if (shouldForceFallback) { + suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback); + workInProgress.effectTag |= DidCapture; + } else { + var didSuspendBefore = current$$1 !== null && (current$$1.effectTag & DidCapture) !== NoEffect; + + if (didSuspendBefore) { + // If we previously forced a fallback, we need to schedule work + // on any nested boundaries to let them know to try to render + // again. This is the same as context updating. + propagateSuspenseContextChange(workInProgress, workInProgress.child, renderExpirationTime); + } + + suspenseContext = setDefaultShallowSuspenseContext(suspenseContext); + } + + pushSuspenseContext(workInProgress, suspenseContext); + + if ((workInProgress.mode & BlockingMode) === NoMode) { + // Outside of blocking mode, SuspenseList doesn't work so we just + // use make it a noop by treating it as the default revealOrder. + workInProgress.memoizedState = null; + } else { + switch (revealOrder) { + case 'forwards': { + var lastContentRow = findLastContentRow(workInProgress.child); + var tail; + + if (lastContentRow === null) { + // The whole list is part of the tail. + // TODO: We could fast path by just rendering the tail now. + tail = workInProgress.child; + workInProgress.child = null; + } else { + // Disconnect the tail rows after the content row. + // We're going to render them separately later. + tail = lastContentRow.sibling; + lastContentRow.sibling = null; + } + + initSuspenseListRenderState( + workInProgress, + false, // isBackwards + tail, + lastContentRow, + tailMode, + workInProgress.lastEffect, + ); + break; + } + + case 'backwards': { + // We're going to find the first row that has existing content. + // At the same time we're going to reverse the list of everything + // we pass in the meantime. That's going to be our tail in reverse + // order. + var _tail = null; + var row = workInProgress.child; + workInProgress.child = null; + + while (row !== null) { + var currentRow = row.alternate; // New rows can't be content rows. + + if (currentRow !== null && findFirstSuspended(currentRow) === null) { + // This is the beginning of the main content. + workInProgress.child = row; + break; + } + + var nextRow = row.sibling; + row.sibling = _tail; + _tail = row; + row = nextRow; + } // TODO: If workInProgress.child is null, we can continue on the tail immediately. + + initSuspenseListRenderState( + workInProgress, + true, // isBackwards + _tail, + null, // last + tailMode, + workInProgress.lastEffect, + ); + break; + } + + case 'together': { + initSuspenseListRenderState( + workInProgress, + false, // isBackwards + null, // tail + null, // last + undefined, + workInProgress.lastEffect, + ); + break; + } + + default: { + // The default reveal order is the same as not having + // a boundary. + workInProgress.memoizedState = null; + } + } + } + + return workInProgress.child; + } + + function updatePortalComponent(current$$1, workInProgress, renderExpirationTime) { + pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo); + var nextChildren = workInProgress.pendingProps; + + if (current$$1 === null) { + // Portals are special because we don't append the children during mount + // but at commit. Therefore we need to track insertions which the normal + // flow doesn't do during mount. This doesn't happen at the root because + // the root always starts with a "current" with a null child. + // TODO: Consider unifying this with how the root works. + workInProgress.child = reconcileChildFibers( + workInProgress, + null, + nextChildren, + renderExpirationTime, + ); + } else { + reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime); + } + + return workInProgress.child; + } + + function updateContextProvider(current$$1, workInProgress, renderExpirationTime) { + var providerType = workInProgress.type; + var context = providerType._context; + var newProps = workInProgress.pendingProps; + var oldProps = workInProgress.memoizedProps; + var newValue = newProps.value; + + { + var providerPropTypes = workInProgress.type.propTypes; + + if (providerPropTypes) { + checkPropTypes( + providerPropTypes, + newProps, + 'prop', + 'Context.Provider', + getCurrentFiberStackInDev, + ); + } + } + + pushProvider(workInProgress, newValue); + + if (oldProps !== null) { + var oldValue = oldProps.value; + var changedBits = calculateChangedBits(context, newValue, oldValue); + + if (changedBits === 0) { + // No change. Bailout early if children are the same. + if (oldProps.children === newProps.children && !hasContextChanged()) { + return bailoutOnAlreadyFinishedWork(current$$1, workInProgress, renderExpirationTime); + } + } else { + // The context value changed. Search for matching consumers and schedule + // them to update. + propagateContextChange(workInProgress, context, changedBits, renderExpirationTime); + } + } + + var newChildren = newProps.children; + reconcileChildren(current$$1, workInProgress, newChildren, renderExpirationTime); + return workInProgress.child; + } + + var hasWarnedAboutUsingContextAsConsumer = false; + + function updateContextConsumer(current$$1, workInProgress, renderExpirationTime) { + var context = workInProgress.type; // The logic below for Context differs depending on PROD or DEV mode. In + // DEV mode, we create a separate object for Context.Consumer that acts + // like a proxy to Context. This proxy object adds unnecessary code in PROD + // so we use the old behaviour (Context.Consumer references Context) to + // reduce size and overhead. The separate object references context via + // a property called "_context", which also gives us the ability to check + // in DEV mode if this property exists or not and warn if it does not. + + { + if (context._context === undefined) { + // This may be because it's a Context (rather than a Consumer). + // Or it may be because it's older React where they're the same thing. + // We only want to warn if we're sure it's a new React. + if (context !== context.Consumer) { + if (!hasWarnedAboutUsingContextAsConsumer) { + hasWarnedAboutUsingContextAsConsumer = true; + warning$1( + false, + 'Rendering <Context> directly is not supported and will be removed in ' + + 'a future major release. Did you mean to render <Context.Consumer> instead?', + ); + } + } + } else { + context = context._context; + } + } + + var newProps = workInProgress.pendingProps; + var render = newProps.children; + + { + !(typeof render === 'function') + ? warningWithoutStack$1( + false, + 'A context consumer was rendered with multiple children, or a child ' + + "that isn't a function. A context consumer expects a single child " + + 'that is a function. If you did pass a function, make sure there ' + + 'is no trailing or leading whitespace around it.', + ) + : void 0; + } + + prepareToReadContext(workInProgress, renderExpirationTime); + var newValue = readContext(context, newProps.unstable_observedBits); + var newChildren; + + { + ReactCurrentOwner$3.current = workInProgress; + setCurrentPhase('render'); + newChildren = render(newValue); + setCurrentPhase(null); + } // React DevTools reads this flag. + + workInProgress.effectTag |= PerformedWork; + reconcileChildren(current$$1, workInProgress, newChildren, renderExpirationTime); + return workInProgress.child; + } + + function updateFundamentalComponent$1(current$$1, workInProgress, renderExpirationTime) { + var fundamentalImpl = workInProgress.type.impl; + + if (fundamentalImpl.reconcileChildren === false) { + return null; + } + + var nextProps = workInProgress.pendingProps; + var nextChildren = nextProps.children; + reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime); + return workInProgress.child; + } + + function updateScopeComponent(current$$1, workInProgress, renderExpirationTime) { + var nextProps = workInProgress.pendingProps; + var nextChildren = nextProps.children; + reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime); + return workInProgress.child; + } + + function markWorkInProgressReceivedUpdate() { + didReceiveUpdate = true; + } + + function bailoutOnAlreadyFinishedWork(current$$1, workInProgress, renderExpirationTime) { + cancelWorkTimer(workInProgress); + + if (current$$1 !== null) { + // Reuse previous dependencies + workInProgress.dependencies = current$$1.dependencies; + } + + if (enableProfilerTimer) { + // Don't update "base" render times for bailouts. + stopProfilerTimerIfRunning(workInProgress); + } + + var updateExpirationTime = workInProgress.expirationTime; + + if (updateExpirationTime !== NoWork) { + markUnprocessedUpdateTime(updateExpirationTime); + } // Check if the children have any pending work. + + var childExpirationTime = workInProgress.childExpirationTime; + + if (childExpirationTime < renderExpirationTime) { + // The children don't have any work either. We can skip them. + // TODO: Once we add back resuming, we should check if the children are + // a work-in-progress set. If so, we need to transfer their effects. + return null; + } else { + // This fiber doesn't have work, but its subtree does. Clone the child + // fibers and continue. + cloneChildFibers(current$$1, workInProgress); + return workInProgress.child; + } + } + + function remountFiber(current$$1, oldWorkInProgress, newWorkInProgress) { + { + var returnFiber = oldWorkInProgress.return; + + if (returnFiber === null) { + throw new Error('Cannot swap the root fiber.'); + } // Disconnect from the old current. + // It will get deleted. + + current$$1.alternate = null; + oldWorkInProgress.alternate = null; // Connect to the new tree. + + newWorkInProgress.index = oldWorkInProgress.index; + newWorkInProgress.sibling = oldWorkInProgress.sibling; + newWorkInProgress.return = oldWorkInProgress.return; + newWorkInProgress.ref = oldWorkInProgress.ref; // Replace the child/sibling pointers above it. + + if (oldWorkInProgress === returnFiber.child) { + returnFiber.child = newWorkInProgress; + } else { + var prevSibling = returnFiber.child; + + if (prevSibling === null) { + throw new Error('Expected parent to have a child.'); + } + + while (prevSibling.sibling !== oldWorkInProgress) { + prevSibling = prevSibling.sibling; + + if (prevSibling === null) { + throw new Error('Expected to find the previous sibling.'); + } + } + + prevSibling.sibling = newWorkInProgress; + } // Delete the old fiber and place the new one. + // Since the old fiber is disconnected, we have to schedule it manually. + + var last = returnFiber.lastEffect; + + if (last !== null) { + last.nextEffect = current$$1; + returnFiber.lastEffect = current$$1; + } else { + returnFiber.firstEffect = returnFiber.lastEffect = current$$1; + } + + current$$1.nextEffect = null; + current$$1.effectTag = Deletion; + newWorkInProgress.effectTag |= Placement; // Restart work from the new fiber. + + return newWorkInProgress; + } + } + + function beginWork$1(current$$1, workInProgress, renderExpirationTime) { + var updateExpirationTime = workInProgress.expirationTime; + + { + if (workInProgress._debugNeedsRemount && current$$1 !== null) { + // This will restart the begin phase with a new fiber. + return remountFiber( + current$$1, + workInProgress, + createFiberFromTypeAndProps( + workInProgress.type, + workInProgress.key, + workInProgress.pendingProps, + workInProgress._debugOwner || null, + workInProgress.mode, + workInProgress.expirationTime, + ), + ); + } + } + + if (current$$1 !== null) { + var oldProps = current$$1.memoizedProps; + var newProps = workInProgress.pendingProps; + + if ( + oldProps !== newProps || + hasContextChanged() || // Force a re-render if the implementation changed due to hot reload: + workInProgress.type !== current$$1.type + ) { + // If props or context changed, mark the fiber as having performed work. + // This may be unset if the props are determined to be equal later (memo). + didReceiveUpdate = true; + } else if (updateExpirationTime < renderExpirationTime) { + didReceiveUpdate = false; // This fiber does not have any pending work. Bailout without entering + // the begin phase. There's still some bookkeeping we that needs to be done + // in this optimized path, mostly pushing stuff onto the stack. + + switch (workInProgress.tag) { + case HostRoot: + pushHostRootContext(workInProgress); + resetHydrationState(); + break; + + case HostComponent: + pushHostContext(workInProgress); + + if ( + workInProgress.mode & ConcurrentMode && + renderExpirationTime !== Never && + shouldDeprioritizeSubtree(workInProgress.type, newProps) + ) { + if (enableSchedulerTracing) { + markSpawnedWork(Never); + } // Schedule this fiber to re-render at offscreen priority. Then bailout. + + workInProgress.expirationTime = workInProgress.childExpirationTime = Never; + return null; + } + + break; + + case ClassComponent: { + var Component = workInProgress.type; + + if (isContextProvider(Component)) { + pushContextProvider(workInProgress); + } + + break; + } + + case HostPortal: + pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo); + break; + + case ContextProvider: { + var newValue = workInProgress.memoizedProps.value; + pushProvider(workInProgress, newValue); + break; + } + + case Profiler: + if (enableProfilerTimer) { + // Profiler should only call onRender when one of its descendants actually rendered. + var hasChildWork = workInProgress.childExpirationTime >= renderExpirationTime; + + if (hasChildWork) { + workInProgress.effectTag |= Update; + } + } + + break; + + case SuspenseComponent: { + var state = workInProgress.memoizedState; + + if (state !== null) { + if (enableSuspenseServerRenderer) { + if (state.dehydrated !== null) { + pushSuspenseContext( + workInProgress, + setDefaultShallowSuspenseContext(suspenseStackCursor.current), + ); // We know that this component will suspend again because if it has + // been unsuspended it has committed as a resolved Suspense component. + // If it needs to be retried, it should have work scheduled on it. + + workInProgress.effectTag |= DidCapture; + break; + } + } // If this boundary is currently timed out, we need to decide + // whether to retry the primary children, or to skip over it and + // go straight to the fallback. Check the priority of the primary + // child fragment. + + var primaryChildFragment = workInProgress.child; + var primaryChildExpirationTime = primaryChildFragment.childExpirationTime; + + if ( + primaryChildExpirationTime !== NoWork && + primaryChildExpirationTime >= renderExpirationTime + ) { + // The primary children have pending work. Use the normal path + // to attempt to render the primary children again. + return updateSuspenseComponent(current$$1, workInProgress, renderExpirationTime); + } else { + pushSuspenseContext( + workInProgress, + setDefaultShallowSuspenseContext(suspenseStackCursor.current), + ); // The primary children do not have pending work with sufficient + // priority. Bailout. + + var child = bailoutOnAlreadyFinishedWork( + current$$1, + workInProgress, + renderExpirationTime, + ); + + if (child !== null) { + // The fallback children have pending work. Skip over the + // primary children and work on the fallback. + return child.sibling; + } else { + return null; + } + } + } else { + pushSuspenseContext( + workInProgress, + setDefaultShallowSuspenseContext(suspenseStackCursor.current), + ); + } + + break; + } + + case SuspenseListComponent: { + var didSuspendBefore = (current$$1.effectTag & DidCapture) !== NoEffect; + + var _hasChildWork = workInProgress.childExpirationTime >= renderExpirationTime; + + if (didSuspendBefore) { + if (_hasChildWork) { + // If something was in fallback state last time, and we have all the + // same children then we're still in progressive loading state. + // Something might get unblocked by state updates or retries in the + // tree which will affect the tail. So we need to use the normal + // path to compute the correct tail. + return updateSuspenseListComponent(current$$1, workInProgress, renderExpirationTime); + } // If none of the children had any work, that means that none of + // them got retried so they'll still be blocked in the same way + // as before. We can fast bail out. + + workInProgress.effectTag |= DidCapture; + } // If nothing suspended before and we're rendering the same children, + // then the tail doesn't matter. Anything new that suspends will work + // in the "together" mode, so we can continue from the state we had. + + var renderState = workInProgress.memoizedState; + + if (renderState !== null) { + // Reset to the "together" mode in case we've started a different + // update in the past but didn't complete it. + renderState.rendering = null; + renderState.tail = null; + } + + pushSuspenseContext(workInProgress, suspenseStackCursor.current); + + if (_hasChildWork) { + break; + } else { + // If none of the children had any work, that means that none of + // them got retried so they'll still be blocked in the same way + // as before. We can fast bail out. + return null; + } + } + } + + return bailoutOnAlreadyFinishedWork(current$$1, workInProgress, renderExpirationTime); + } else { + // An update was scheduled on this fiber, but there are no new props + // nor legacy context. Set this to false. If an update queue or context + // consumer produces a changed value, it will set this to true. Otherwise, + // the component will assume the children have not changed and bail out. + didReceiveUpdate = false; + } + } else { + didReceiveUpdate = false; + } // Before entering the begin phase, clear the expiration time. + + workInProgress.expirationTime = NoWork; + + switch (workInProgress.tag) { + case IndeterminateComponent: { + return mountIndeterminateComponent( + current$$1, + workInProgress, + workInProgress.type, + renderExpirationTime, + ); + } + + case LazyComponent: { + var elementType = workInProgress.elementType; + return mountLazyComponent( + current$$1, + workInProgress, + elementType, + updateExpirationTime, + renderExpirationTime, + ); + } + + case FunctionComponent: { + var _Component = workInProgress.type; + var unresolvedProps = workInProgress.pendingProps; + var resolvedProps = + workInProgress.elementType === _Component + ? unresolvedProps + : resolveDefaultProps(_Component, unresolvedProps); + return updateFunctionComponent( + current$$1, + workInProgress, + _Component, + resolvedProps, + renderExpirationTime, + ); + } + + case ClassComponent: { + var _Component2 = workInProgress.type; + var _unresolvedProps = workInProgress.pendingProps; + + var _resolvedProps = + workInProgress.elementType === _Component2 + ? _unresolvedProps + : resolveDefaultProps(_Component2, _unresolvedProps); + + return updateClassComponent( + current$$1, + workInProgress, + _Component2, + _resolvedProps, + renderExpirationTime, + ); + } + + case HostRoot: + return updateHostRoot(current$$1, workInProgress, renderExpirationTime); + + case HostComponent: + return updateHostComponent(current$$1, workInProgress, renderExpirationTime); + + case HostText: + return updateHostText(current$$1, workInProgress); + + case SuspenseComponent: + return updateSuspenseComponent(current$$1, workInProgress, renderExpirationTime); + + case HostPortal: + return updatePortalComponent(current$$1, workInProgress, renderExpirationTime); + + case ForwardRef: { + var type = workInProgress.type; + var _unresolvedProps2 = workInProgress.pendingProps; + + var _resolvedProps2 = + workInProgress.elementType === type + ? _unresolvedProps2 + : resolveDefaultProps(type, _unresolvedProps2); + + return updateForwardRef( + current$$1, + workInProgress, + type, + _resolvedProps2, + renderExpirationTime, + ); + } + + case Fragment: + return updateFragment(current$$1, workInProgress, renderExpirationTime); + + case Mode: + return updateMode(current$$1, workInProgress, renderExpirationTime); + + case Profiler: + return updateProfiler(current$$1, workInProgress, renderExpirationTime); + + case ContextProvider: + return updateContextProvider(current$$1, workInProgress, renderExpirationTime); + + case ContextConsumer: + return updateContextConsumer(current$$1, workInProgress, renderExpirationTime); + + case MemoComponent: { + var _type2 = workInProgress.type; + var _unresolvedProps3 = workInProgress.pendingProps; // Resolve outer props first, then resolve inner props. + + var _resolvedProps3 = resolveDefaultProps(_type2, _unresolvedProps3); + + { + if (workInProgress.type !== workInProgress.elementType) { + var outerPropTypes = _type2.propTypes; + + if (outerPropTypes) { + checkPropTypes( + outerPropTypes, + _resolvedProps3, // Resolved for outer only + 'prop', + getComponentName(_type2), + getCurrentFiberStackInDev, + ); + } + } + } + + _resolvedProps3 = resolveDefaultProps(_type2.type, _resolvedProps3); + return updateMemoComponent( + current$$1, + workInProgress, + _type2, + _resolvedProps3, + updateExpirationTime, + renderExpirationTime, + ); + } + + case SimpleMemoComponent: { + return updateSimpleMemoComponent( + current$$1, + workInProgress, + workInProgress.type, + workInProgress.pendingProps, + updateExpirationTime, + renderExpirationTime, + ); + } + + case IncompleteClassComponent: { + var _Component3 = workInProgress.type; + var _unresolvedProps4 = workInProgress.pendingProps; + + var _resolvedProps4 = + workInProgress.elementType === _Component3 + ? _unresolvedProps4 + : resolveDefaultProps(_Component3, _unresolvedProps4); + + return mountIncompleteClassComponent( + current$$1, + workInProgress, + _Component3, + _resolvedProps4, + renderExpirationTime, + ); + } + + case SuspenseListComponent: { + return updateSuspenseListComponent(current$$1, workInProgress, renderExpirationTime); + } + + case FundamentalComponent: { + if (enableFundamentalAPI) { + return updateFundamentalComponent$1(current$$1, workInProgress, renderExpirationTime); + } + + break; + } + + case ScopeComponent: { + if (enableScopeAPI) { + return updateScopeComponent(current$$1, workInProgress, renderExpirationTime); + } + + break; + } + } + + { + { + throw Error( + 'Unknown unit of work tag (' + + workInProgress.tag + + '). This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + } + + function createFundamentalStateInstance(currentFiber, props, impl, state) { + return { + currentFiber: currentFiber, + impl: impl, + instance: null, + prevProps: null, + props: props, + state: state, + }; + } + + function isFiberSuspenseAndTimedOut(fiber) { + return fiber.tag === SuspenseComponent && fiber.memoizedState !== null; + } + + function getSuspenseFallbackChild(fiber) { + return fiber.child.sibling.child; + } + + var emptyObject$1 = {}; + + function collectScopedNodes(node, fn, scopedNodes) { + if (enableScopeAPI) { + if (node.tag === HostComponent) { + var _type = node.type, + memoizedProps = node.memoizedProps, + stateNode = node.stateNode; + + var _instance = getPublicInstance(stateNode); + + if (_instance !== null && fn(_type, memoizedProps || emptyObject$1, _instance) === true) { + scopedNodes.push(_instance); + } + } + + var child = node.child; + + if (isFiberSuspenseAndTimedOut(node)) { + child = getSuspenseFallbackChild(node); + } + + if (child !== null) { + collectScopedNodesFromChildren(child, fn, scopedNodes); + } + } + } + + function collectFirstScopedNode(node, fn) { + if (enableScopeAPI) { + if (node.tag === HostComponent) { + var _type2 = node.type, + memoizedProps = node.memoizedProps, + stateNode = node.stateNode; + + var _instance2 = getPublicInstance(stateNode); + + if (_instance2 !== null && fn(_type2, memoizedProps, _instance2) === true) { + return _instance2; + } + } + + var child = node.child; + + if (isFiberSuspenseAndTimedOut(node)) { + child = getSuspenseFallbackChild(node); + } + + if (child !== null) { + return collectFirstScopedNodeFromChildren(child, fn); + } + } + + return null; + } + + function collectScopedNodesFromChildren(startingChild, fn, scopedNodes) { + var child = startingChild; + + while (child !== null) { + collectScopedNodes(child, fn, scopedNodes); + child = child.sibling; + } + } + + function collectFirstScopedNodeFromChildren(startingChild, fn) { + var child = startingChild; + + while (child !== null) { + var scopedNode = collectFirstScopedNode(child, fn); + + if (scopedNode !== null) { + return scopedNode; + } + + child = child.sibling; + } + + return null; + } + + function collectNearestScopeMethods(node, scope, childrenScopes) { + if (isValidScopeNode(node, scope)) { + childrenScopes.push(node.stateNode.methods); + } else { + var child = node.child; + + if (isFiberSuspenseAndTimedOut(node)) { + child = getSuspenseFallbackChild(node); + } + + if (child !== null) { + collectNearestChildScopeMethods(child, scope, childrenScopes); + } + } + } + + function collectNearestChildScopeMethods(startingChild, scope, childrenScopes) { + var child = startingChild; + + while (child !== null) { + collectNearestScopeMethods(child, scope, childrenScopes); + child = child.sibling; + } + } + + function isValidScopeNode(node, scope) { + return node.tag === ScopeComponent && node.type === scope && node.stateNode !== null; + } + + function createScopeMethods(scope, instance) { + return { + getChildren: function () { + var currentFiber = instance.fiber; + var child = currentFiber.child; + var childrenScopes = []; + + if (child !== null) { + collectNearestChildScopeMethods(child, scope, childrenScopes); + } + + return childrenScopes.length === 0 ? null : childrenScopes; + }, + getChildrenFromRoot: function () { + var currentFiber = instance.fiber; + var node = currentFiber; + + while (node !== null) { + var parent = node.return; + + if (parent === null) { + break; + } + + node = parent; + + if (node.tag === ScopeComponent && node.type === scope) { + break; + } + } + + var childrenScopes = []; + collectNearestChildScopeMethods(node.child, scope, childrenScopes); + return childrenScopes.length === 0 ? null : childrenScopes; + }, + getParent: function () { + var node = instance.fiber.return; + + while (node !== null) { + if (node.tag === ScopeComponent && node.type === scope) { + return node.stateNode.methods; + } + + node = node.return; + } + + return null; + }, + getProps: function () { + var currentFiber = instance.fiber; + return currentFiber.memoizedProps; + }, + queryAllNodes: function (fn) { + var currentFiber = instance.fiber; + var child = currentFiber.child; + var scopedNodes = []; + + if (child !== null) { + collectScopedNodesFromChildren(child, fn, scopedNodes); + } + + return scopedNodes.length === 0 ? null : scopedNodes; + }, + queryFirstNode: function (fn) { + var currentFiber = instance.fiber; + var child = currentFiber.child; + + if (child !== null) { + return collectFirstScopedNodeFromChildren(child, fn); + } + + return null; + }, + containsNode: function (node) { + var fiber = getInstanceFromNode$2(node); + + while (fiber !== null) { + if (fiber.tag === ScopeComponent && fiber.type === scope && fiber.stateNode === instance) { + return true; + } + + fiber = fiber.return; + } + + return false; + }, + }; + } + + function markUpdate(workInProgress) { + // Tag the fiber with an update effect. This turns a Placement into + // a PlacementAndUpdate. + workInProgress.effectTag |= Update; + } + + function markRef$1(workInProgress) { + workInProgress.effectTag |= Ref; + } + + var appendAllChildren; + var updateHostContainer; + var updateHostComponent$1; + var updateHostText$1; + + if (supportsMutation) { + // Mutation mode + appendAllChildren = function (parent, workInProgress, needsVisibilityToggle, isHidden) { + // We only have the top Fiber that was created but we need recurse down its + // children to find all the terminal nodes. + var node = workInProgress.child; + + while (node !== null) { + if (node.tag === HostComponent || node.tag === HostText) { + appendInitialChild(parent, node.stateNode); + } else if (enableFundamentalAPI && node.tag === FundamentalComponent) { + appendInitialChild(parent, node.stateNode.instance); + } else if (node.tag === HostPortal) { + // If we have a portal child, then we don't want to traverse + // down its children. Instead, we'll get insertions from each child in + // the portal directly. + } else if (node.child !== null) { + node.child.return = node; + node = node.child; + continue; + } + + if (node === workInProgress) { + return; + } + + while (node.sibling === null) { + if (node.return === null || node.return === workInProgress) { + return; + } + + node = node.return; + } + + node.sibling.return = node.return; + node = node.sibling; + } + }; + + updateHostContainer = function (workInProgress) { + // Noop + }; + + updateHostComponent$1 = function ( + current, + workInProgress, + type, + newProps, + rootContainerInstance, + ) { + // If we have an alternate, that means this is an update and we need to + // schedule a side-effect to do the updates. + var oldProps = current.memoizedProps; + + if (oldProps === newProps) { + // In mutation mode, this is sufficient for a bailout because + // we won't touch this node even if children changed. + return; + } // If we get updated because one of our children updated, we don't + // have newProps so we'll have to reuse them. + // TODO: Split the update API as separate for the props vs. children. + // Even better would be if children weren't special cased at all tho. + + var instance = workInProgress.stateNode; + var currentHostContext = getHostContext(); // TODO: Experiencing an error where oldProps is null. Suggests a host + // component is hitting the resume path. Figure out why. Possibly + // related to `hidden`. + + var updatePayload = prepareUpdate( + instance, + type, + oldProps, + newProps, + rootContainerInstance, + currentHostContext, + ); // TODO: Type this specific to this type of component. + + workInProgress.updateQueue = updatePayload; // If the update payload indicates that there is a change or if there + // is a new ref we mark this as an update. All the work is done in commitWork. + + if (updatePayload) { + markUpdate(workInProgress); + } + }; + + updateHostText$1 = function (current, workInProgress, oldText, newText) { + // If the text differs, mark it as an update. All the work in done in commitWork. + if (oldText !== newText) { + markUpdate(workInProgress); + } + }; + } else if (supportsPersistence) { + // Persistent host tree mode + appendAllChildren = function (parent, workInProgress, needsVisibilityToggle, isHidden) { + // We only have the top Fiber that was created but we need recurse down its + // children to find all the terminal nodes. + var node = workInProgress.child; + + while (node !== null) { + // eslint-disable-next-line no-labels + branches: if (node.tag === HostComponent) { + var instance = node.stateNode; + + if (needsVisibilityToggle && isHidden) { + // This child is inside a timed out tree. Hide it. + var props = node.memoizedProps; + var type = node.type; + instance = cloneHiddenInstance(instance, type, props, node); + } + + appendInitialChild(parent, instance); + } else if (node.tag === HostText) { + var _instance = node.stateNode; + + if (needsVisibilityToggle && isHidden) { + // This child is inside a timed out tree. Hide it. + var text = node.memoizedProps; + _instance = cloneHiddenTextInstance(_instance, text, node); + } + + appendInitialChild(parent, _instance); + } else if (enableFundamentalAPI && node.tag === FundamentalComponent) { + var _instance2 = node.stateNode.instance; + + if (needsVisibilityToggle && isHidden) { + // This child is inside a timed out tree. Hide it. + var _props = node.memoizedProps; + var _type = node.type; + _instance2 = cloneHiddenInstance(_instance2, _type, _props, node); + } + + appendInitialChild(parent, _instance2); + } else if (node.tag === HostPortal) { + // If we have a portal child, then we don't want to traverse + // down its children. Instead, we'll get insertions from each child in + // the portal directly. + } else if (node.tag === SuspenseComponent) { + if ((node.effectTag & Update) !== NoEffect) { + // Need to toggle the visibility of the primary children. + var newIsHidden = node.memoizedState !== null; + + if (newIsHidden) { + var primaryChildParent = node.child; + + if (primaryChildParent !== null) { + if (primaryChildParent.child !== null) { + primaryChildParent.child.return = primaryChildParent; + appendAllChildren(parent, primaryChildParent, true, newIsHidden); + } + + var fallbackChildParent = primaryChildParent.sibling; + + if (fallbackChildParent !== null) { + fallbackChildParent.return = node; + node = fallbackChildParent; + continue; + } + } + } + } + + if (node.child !== null) { + // Continue traversing like normal + node.child.return = node; + node = node.child; + continue; + } + } else if (node.child !== null) { + node.child.return = node; + node = node.child; + continue; + } // $FlowFixMe This is correct but Flow is confused by the labeled break. + + node = node; + + if (node === workInProgress) { + return; + } + + while (node.sibling === null) { + if (node.return === null || node.return === workInProgress) { + return; + } + + node = node.return; + } + + node.sibling.return = node.return; + node = node.sibling; + } + }; // An unfortunate fork of appendAllChildren because we have two different parent types. + + var appendAllChildrenToContainer = function ( + containerChildSet, + workInProgress, + needsVisibilityToggle, + isHidden, + ) { + // We only have the top Fiber that was created but we need recurse down its + // children to find all the terminal nodes. + var node = workInProgress.child; + + while (node !== null) { + // eslint-disable-next-line no-labels + branches: if (node.tag === HostComponent) { + var instance = node.stateNode; + + if (needsVisibilityToggle && isHidden) { + // This child is inside a timed out tree. Hide it. + var props = node.memoizedProps; + var type = node.type; + instance = cloneHiddenInstance(instance, type, props, node); + } + + appendChildToContainerChildSet(containerChildSet, instance); + } else if (node.tag === HostText) { + var _instance3 = node.stateNode; + + if (needsVisibilityToggle && isHidden) { + // This child is inside a timed out tree. Hide it. + var text = node.memoizedProps; + _instance3 = cloneHiddenTextInstance(_instance3, text, node); + } + + appendChildToContainerChildSet(containerChildSet, _instance3); + } else if (enableFundamentalAPI && node.tag === FundamentalComponent) { + var _instance4 = node.stateNode.instance; + + if (needsVisibilityToggle && isHidden) { + // This child is inside a timed out tree. Hide it. + var _props2 = node.memoizedProps; + var _type2 = node.type; + _instance4 = cloneHiddenInstance(_instance4, _type2, _props2, node); + } + + appendChildToContainerChildSet(containerChildSet, _instance4); + } else if (node.tag === HostPortal) { + // If we have a portal child, then we don't want to traverse + // down its children. Instead, we'll get insertions from each child in + // the portal directly. + } else if (node.tag === SuspenseComponent) { + if ((node.effectTag & Update) !== NoEffect) { + // Need to toggle the visibility of the primary children. + var newIsHidden = node.memoizedState !== null; + + if (newIsHidden) { + var primaryChildParent = node.child; + + if (primaryChildParent !== null) { + if (primaryChildParent.child !== null) { + primaryChildParent.child.return = primaryChildParent; + appendAllChildrenToContainer( + containerChildSet, + primaryChildParent, + true, + newIsHidden, + ); + } + + var fallbackChildParent = primaryChildParent.sibling; + + if (fallbackChildParent !== null) { + fallbackChildParent.return = node; + node = fallbackChildParent; + continue; + } + } + } + } + + if (node.child !== null) { + // Continue traversing like normal + node.child.return = node; + node = node.child; + continue; + } + } else if (node.child !== null) { + node.child.return = node; + node = node.child; + continue; + } // $FlowFixMe This is correct but Flow is confused by the labeled break. + + node = node; + + if (node === workInProgress) { + return; + } + + while (node.sibling === null) { + if (node.return === null || node.return === workInProgress) { + return; + } + + node = node.return; + } + + node.sibling.return = node.return; + node = node.sibling; + } + }; + + updateHostContainer = function (workInProgress) { + var portalOrRoot = workInProgress.stateNode; + var childrenUnchanged = workInProgress.firstEffect === null; + + if (childrenUnchanged) { + // No changes, just reuse the existing instance. + } else { + var container = portalOrRoot.containerInfo; + var newChildSet = createContainerChildSet(container); // If children might have changed, we have to add them all to the set. + + appendAllChildrenToContainer(newChildSet, workInProgress, false, false); + portalOrRoot.pendingChildren = newChildSet; // Schedule an update on the container to swap out the container. + + markUpdate(workInProgress); + finalizeContainerChildren(container, newChildSet); + } + }; + + updateHostComponent$1 = function ( + current, + workInProgress, + type, + newProps, + rootContainerInstance, + ) { + var currentInstance = current.stateNode; + var oldProps = current.memoizedProps; // If there are no effects associated with this node, then none of our children had any updates. + // This guarantees that we can reuse all of them. + + var childrenUnchanged = workInProgress.firstEffect === null; + + if (childrenUnchanged && oldProps === newProps) { + // No changes, just reuse the existing instance. + // Note that this might release a previous clone. + workInProgress.stateNode = currentInstance; + return; + } + + var recyclableInstance = workInProgress.stateNode; + var currentHostContext = getHostContext(); + var updatePayload = null; + + if (oldProps !== newProps) { + updatePayload = prepareUpdate( + recyclableInstance, + type, + oldProps, + newProps, + rootContainerInstance, + currentHostContext, + ); + } + + if (childrenUnchanged && updatePayload === null) { + // No changes, just reuse the existing instance. + // Note that this might release a previous clone. + workInProgress.stateNode = currentInstance; + return; + } + + var newInstance = cloneInstance( + currentInstance, + updatePayload, + type, + oldProps, + newProps, + workInProgress, + childrenUnchanged, + recyclableInstance, + ); + + if ( + finalizeInitialChildren( + newInstance, + type, + newProps, + rootContainerInstance, + currentHostContext, + ) + ) { + markUpdate(workInProgress); + } + + workInProgress.stateNode = newInstance; + + if (childrenUnchanged) { + // If there are no other effects in this tree, we need to flag this node as having one. + // Even though we're not going to use it for anything. + // Otherwise parents won't know that there are new children to propagate upwards. + markUpdate(workInProgress); + } else { + // If children might have changed, we have to add them all to the set. + appendAllChildren(newInstance, workInProgress, false, false); + } + }; + + updateHostText$1 = function (current, workInProgress, oldText, newText) { + if (oldText !== newText) { + // If the text content differs, we'll create a new text instance for it. + var rootContainerInstance = getRootHostContainer(); + var currentHostContext = getHostContext(); + workInProgress.stateNode = createTextInstance( + newText, + rootContainerInstance, + currentHostContext, + workInProgress, + ); // We'll have to mark it as having an effect, even though we won't use the effect for anything. + // This lets the parents know that at least one of their children has changed. + + markUpdate(workInProgress); + } + }; + } else { + // No host operations + updateHostContainer = function (workInProgress) { + // Noop + }; + + updateHostComponent$1 = function ( + current, + workInProgress, + type, + newProps, + rootContainerInstance, + ) { + // Noop + }; + + updateHostText$1 = function (current, workInProgress, oldText, newText) { + // Noop + }; + } + + function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { + switch (renderState.tailMode) { + case 'hidden': { + // Any insertions at the end of the tail list after this point + // should be invisible. If there are already mounted boundaries + // anything before them are not considered for collapsing. + // Therefore we need to go through the whole tail to find if + // there are any. + var tailNode = renderState.tail; + var lastTailNode = null; + + while (tailNode !== null) { + if (tailNode.alternate !== null) { + lastTailNode = tailNode; + } + + tailNode = tailNode.sibling; + } // Next we're simply going to delete all insertions after the + // last rendered item. + + if (lastTailNode === null) { + // All remaining items in the tail are insertions. + renderState.tail = null; + } else { + // Detach the insertion after the last node that was already + // inserted. + lastTailNode.sibling = null; + } + + break; + } + + case 'collapsed': { + // Any insertions at the end of the tail list after this point + // should be invisible. If there are already mounted boundaries + // anything before them are not considered for collapsing. + // Therefore we need to go through the whole tail to find if + // there are any. + var _tailNode = renderState.tail; + var _lastTailNode = null; + + while (_tailNode !== null) { + if (_tailNode.alternate !== null) { + _lastTailNode = _tailNode; + } + + _tailNode = _tailNode.sibling; + } // Next we're simply going to delete all insertions after the + // last rendered item. + + if (_lastTailNode === null) { + // All remaining items in the tail are insertions. + if (!hasRenderedATailFallback && renderState.tail !== null) { + // We suspended during the head. We want to show at least one + // row at the tail. So we'll keep on and cut off the rest. + renderState.tail.sibling = null; + } else { + renderState.tail = null; + } + } else { + // Detach the insertion after the last node that was already + // inserted. + _lastTailNode.sibling = null; + } + + break; + } + } + } + + function completeWork(current, workInProgress, renderExpirationTime) { + var newProps = workInProgress.pendingProps; + + switch (workInProgress.tag) { + case IndeterminateComponent: + break; + + case LazyComponent: + break; + + case SimpleMemoComponent: + case FunctionComponent: + break; + + case ClassComponent: { + var Component = workInProgress.type; + + if (isContextProvider(Component)) { + popContext(workInProgress); + } + + break; + } + + case HostRoot: { + popHostContainer(workInProgress); + popTopLevelContextObject(workInProgress); + var fiberRoot = workInProgress.stateNode; + + if (fiberRoot.pendingContext) { + fiberRoot.context = fiberRoot.pendingContext; + fiberRoot.pendingContext = null; + } + + if (current === null || current.child === null) { + // If we hydrated, pop so that we can delete any remaining children + // that weren't hydrated. + var wasHydrated = popHydrationState(workInProgress); + + if (wasHydrated) { + // If we hydrated, then we'll need to schedule an update for + // the commit side-effects on the root. + markUpdate(workInProgress); + } + } + + updateHostContainer(workInProgress); + break; + } + + case HostComponent: { + popHostContext(workInProgress); + var rootContainerInstance = getRootHostContainer(); + var type = workInProgress.type; + + if (current !== null && workInProgress.stateNode != null) { + updateHostComponent$1(current, workInProgress, type, newProps, rootContainerInstance); + + if (enableFlareAPI) { + var prevListeners = current.memoizedProps.listeners; + var nextListeners = newProps.listeners; + + if (prevListeners !== nextListeners) { + markUpdate(workInProgress); + } + } + + if (current.ref !== workInProgress.ref) { + markRef$1(workInProgress); + } + } else { + if (!newProps) { + if (!(workInProgress.stateNode !== null)) { + { + throw Error( + 'We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } // This can happen when we abort work. + + break; + } + + var currentHostContext = getHostContext(); // TODO: Move createInstance to beginWork and keep it on a context + // "stack" as the parent. Then append children as we go in beginWork + // or completeWork depending on we want to add then top->down or + // bottom->up. Top->down is faster in IE11. + + var _wasHydrated = popHydrationState(workInProgress); + + if (_wasHydrated) { + // TODO: Move this and createInstance step into the beginPhase + // to consolidate. + if ( + prepareToHydrateHostInstance(workInProgress, rootContainerInstance, currentHostContext) + ) { + // If changes to the hydrated node needs to be applied at the + // commit-phase we mark this as such. + markUpdate(workInProgress); + } + + if (enableFlareAPI) { + var listeners = newProps.listeners; + + if (listeners != null) { + updateEventListeners(listeners, workInProgress, rootContainerInstance); + } + } + } else { + var instance = createInstance( + type, + newProps, + rootContainerInstance, + currentHostContext, + workInProgress, + ); + appendAllChildren(instance, workInProgress, false, false); // This needs to be set before we mount Flare event listeners + + workInProgress.stateNode = instance; + + if (enableFlareAPI) { + var _listeners = newProps.listeners; + + if (_listeners != null) { + updateEventListeners(_listeners, workInProgress, rootContainerInstance); + } + } // Certain renderers require commit-time effects for initial mount. + // (eg DOM renderer supports auto-focus for certain elements). + // Make sure such renderers get scheduled for later work. + + if ( + finalizeInitialChildren( + instance, + type, + newProps, + rootContainerInstance, + currentHostContext, + ) + ) { + markUpdate(workInProgress); + } + } + + if (workInProgress.ref !== null) { + // If there is a ref on a host node we need to schedule a callback + markRef$1(workInProgress); + } + } + + break; + } + + case HostText: { + var newText = newProps; + + if (current && workInProgress.stateNode != null) { + var oldText = current.memoizedProps; // If we have an alternate, that means this is an update and we need + // to schedule a side-effect to do the updates. + + updateHostText$1(current, workInProgress, oldText, newText); + } else { + if (typeof newText !== 'string') { + if (!(workInProgress.stateNode !== null)) { + { + throw Error( + 'We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } // This can happen when we abort work. + } + + var _rootContainerInstance = getRootHostContainer(); + + var _currentHostContext = getHostContext(); + + var _wasHydrated2 = popHydrationState(workInProgress); + + if (_wasHydrated2) { + if (prepareToHydrateHostTextInstance(workInProgress)) { + markUpdate(workInProgress); + } + } else { + workInProgress.stateNode = createTextInstance( + newText, + _rootContainerInstance, + _currentHostContext, + workInProgress, + ); + } + } + + break; + } + + case ForwardRef: + break; + + case SuspenseComponent: { + popSuspenseContext(workInProgress); + var nextState = workInProgress.memoizedState; + + if (enableSuspenseServerRenderer) { + if (nextState !== null && nextState.dehydrated !== null) { + if (current === null) { + var _wasHydrated3 = popHydrationState(workInProgress); + + if (!_wasHydrated3) { + { + throw Error( + 'A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.', + ); + } + } + + prepareToHydrateHostSuspenseInstance(workInProgress); + + if (enableSchedulerTracing) { + markSpawnedWork(Never); + } + + return null; + } else { + // We should never have been in a hydration state if we didn't have a current. + // However, in some of those paths, we might have reentered a hydration state + // and then we might be inside a hydration state. In that case, we'll need to + // exit out of it. + resetHydrationState(); + + if ((workInProgress.effectTag & DidCapture) === NoEffect) { + // This boundary did not suspend so it's now hydrated and unsuspended. + workInProgress.memoizedState = null; + } // If nothing suspended, we need to schedule an effect to mark this boundary + // as having hydrated so events know that they're free be invoked. + // It's also a signal to replay events and the suspense callback. + // If something suspended, schedule an effect to attach retry listeners. + // So we might as well always mark this. + + workInProgress.effectTag |= Update; + return null; + } + } + } + + if ((workInProgress.effectTag & DidCapture) !== NoEffect) { + // Something suspended. Re-render with the fallback children. + workInProgress.expirationTime = renderExpirationTime; // Do not reset the effect list. + + return workInProgress; + } + + var nextDidTimeout = nextState !== null; + var prevDidTimeout = false; + + if (current === null) { + if (workInProgress.memoizedProps.fallback !== undefined) { + popHydrationState(workInProgress); + } + } else { + var prevState = current.memoizedState; + prevDidTimeout = prevState !== null; + + if (!nextDidTimeout && prevState !== null) { + // We just switched from the fallback to the normal children. + // Delete the fallback. + // TODO: Would it be better to store the fallback fragment on + // the stateNode during the begin phase? + var currentFallbackChild = current.child.sibling; + + if (currentFallbackChild !== null) { + // Deletions go at the beginning of the return fiber's effect list + var first = workInProgress.firstEffect; + + if (first !== null) { + workInProgress.firstEffect = currentFallbackChild; + currentFallbackChild.nextEffect = first; + } else { + workInProgress.firstEffect = workInProgress.lastEffect = currentFallbackChild; + currentFallbackChild.nextEffect = null; + } + + currentFallbackChild.effectTag = Deletion; + } + } + } + + if (nextDidTimeout && !prevDidTimeout) { + // If this subtreee is running in blocking mode we can suspend, + // otherwise we won't suspend. + // TODO: This will still suspend a synchronous tree if anything + // in the concurrent tree already suspended during this render. + // This is a known bug. + if ((workInProgress.mode & BlockingMode) !== NoMode) { + // TODO: Move this back to throwException because this is too late + // if this is a large tree which is common for initial loads. We + // don't know if we should restart a render or not until we get + // this marker, and this is too late. + // If this render already had a ping or lower pri updates, + // and this is the first time we know we're going to suspend we + // should be able to immediately restart from within throwException. + var hasInvisibleChildContext = + current === null && workInProgress.memoizedProps.unstable_avoidThisFallback !== true; + + if ( + hasInvisibleChildContext || + hasSuspenseContext(suspenseStackCursor.current, InvisibleParentSuspenseContext) + ) { + // If this was in an invisible tree or a new render, then showing + // this boundary is ok. + renderDidSuspend(); + } else { + // Otherwise, we're going to have to hide content so we should + // suspend for longer if possible. + renderDidSuspendDelayIfPossible(); + } + } + } + + if (supportsPersistence) { + // TODO: Only schedule updates if not prevDidTimeout. + if (nextDidTimeout) { + // If this boundary just timed out, schedule an effect to attach a + // retry listener to the proimse. This flag is also used to hide the + // primary children. + workInProgress.effectTag |= Update; + } + } + + if (supportsMutation) { + // TODO: Only schedule updates if these values are non equal, i.e. it changed. + if (nextDidTimeout || prevDidTimeout) { + // If this boundary just timed out, schedule an effect to attach a + // retry listener to the proimse. This flag is also used to hide the + // primary children. In mutation mode, we also need the flag to + // *unhide* children that were previously hidden, so check if the + // is currently timed out, too. + workInProgress.effectTag |= Update; + } + } + + if ( + enableSuspenseCallback && + workInProgress.updateQueue !== null && + workInProgress.memoizedProps.suspenseCallback != null + ) { + // Always notify the callback + workInProgress.effectTag |= Update; + } + + break; + } + + case Fragment: + break; + + case Mode: + break; + + case Profiler: + break; + + case HostPortal: + popHostContainer(workInProgress); + updateHostContainer(workInProgress); + break; + + case ContextProvider: + // Pop provider fiber + popProvider(workInProgress); + break; + + case ContextConsumer: + break; + + case MemoComponent: + break; + + case IncompleteClassComponent: { + // Same as class component case. I put it down here so that the tags are + // sequential to ensure this switch is compiled to a jump table. + var _Component = workInProgress.type; + + if (isContextProvider(_Component)) { + popContext(workInProgress); + } + + break; + } + + case SuspenseListComponent: { + popSuspenseContext(workInProgress); + var renderState = workInProgress.memoizedState; + + if (renderState === null) { + // We're running in the default, "independent" mode. We don't do anything + // in this mode. + break; + } + + var didSuspendAlready = (workInProgress.effectTag & DidCapture) !== NoEffect; + var renderedTail = renderState.rendering; + + if (renderedTail === null) { + // We just rendered the head. + if (!didSuspendAlready) { + // This is the first pass. We need to figure out if anything is still + // suspended in the rendered set. + // If new content unsuspended, but there's still some content that + // didn't. Then we need to do a second pass that forces everything + // to keep showing their fallbacks. + // We might be suspended if something in this render pass suspended, or + // something in the previous committed pass suspended. Otherwise, + // there's no chance so we can skip the expensive call to + // findFirstSuspended. + var cannotBeSuspended = + renderHasNotSuspendedYet() && + (current === null || (current.effectTag & DidCapture) === NoEffect); + + if (!cannotBeSuspended) { + var row = workInProgress.child; + + while (row !== null) { + var suspended = findFirstSuspended(row); + + if (suspended !== null) { + didSuspendAlready = true; + workInProgress.effectTag |= DidCapture; + cutOffTailIfNeeded(renderState, false); // If this is a newly suspended tree, it might not get committed as + // part of the second pass. In that case nothing will subscribe to + // its thennables. Instead, we'll transfer its thennables to the + // SuspenseList so that it can retry if they resolve. + // There might be multiple of these in the list but since we're + // going to wait for all of them anyway, it doesn't really matter + // which ones gets to ping. In theory we could get clever and keep + // track of how many dependencies remain but it gets tricky because + // in the meantime, we can add/remove/change items and dependencies. + // We might bail out of the loop before finding any but that + // doesn't matter since that means that the other boundaries that + // we did find already has their listeners attached. + + var newThennables = suspended.updateQueue; + + if (newThennables !== null) { + workInProgress.updateQueue = newThennables; + workInProgress.effectTag |= Update; + } // Rerender the whole list, but this time, we'll force fallbacks + // to stay in place. + // Reset the effect list before doing the second pass since that's now invalid. + + if (renderState.lastEffect === null) { + workInProgress.firstEffect = null; + } + + workInProgress.lastEffect = renderState.lastEffect; // Reset the child fibers to their original state. + + resetChildFibers(workInProgress, renderExpirationTime); // Set up the Suspense Context to force suspense and immediately + // rerender the children. + + pushSuspenseContext( + workInProgress, + setShallowSuspenseContext(suspenseStackCursor.current, ForceSuspenseFallback), + ); + return workInProgress.child; + } + + row = row.sibling; + } + } + } else { + cutOffTailIfNeeded(renderState, false); + } // Next we're going to render the tail. + } else { + // Append the rendered row to the child list. + if (!didSuspendAlready) { + var _suspended = findFirstSuspended(renderedTail); + + if (_suspended !== null) { + workInProgress.effectTag |= DidCapture; + didSuspendAlready = true; // Ensure we transfer the update queue to the parent so that it doesn't + // get lost if this row ends up dropped during a second pass. + + var _newThennables = _suspended.updateQueue; + + if (_newThennables !== null) { + workInProgress.updateQueue = _newThennables; + workInProgress.effectTag |= Update; + } + + cutOffTailIfNeeded(renderState, true); // This might have been modified. + + if ( + renderState.tail === null && + renderState.tailMode === 'hidden' && + !renderedTail.alternate + ) { + // We need to delete the row we just rendered. + // Reset the effect list to what it was before we rendered this + // child. The nested children have already appended themselves. + var lastEffect = (workInProgress.lastEffect = renderState.lastEffect); // Remove any effects that were appended after this point. + + if (lastEffect !== null) { + lastEffect.nextEffect = null; + } // We're done. + + return null; + } + } else if (now() > renderState.tailExpiration && renderExpirationTime > Never) { + // We have now passed our CPU deadline and we'll just give up further + // attempts to render the main content and only render fallbacks. + // The assumption is that this is usually faster. + workInProgress.effectTag |= DidCapture; + didSuspendAlready = true; + cutOffTailIfNeeded(renderState, false); // Since nothing actually suspended, there will nothing to ping this + // to get it started back up to attempt the next item. If we can show + // them, then they really have the same priority as this render. + // So we'll pick it back up the very next render pass once we've had + // an opportunity to yield for paint. + + var nextPriority = renderExpirationTime - 1; + workInProgress.expirationTime = workInProgress.childExpirationTime = nextPriority; + + if (enableSchedulerTracing) { + markSpawnedWork(nextPriority); + } + } + } + + if (renderState.isBackwards) { + // The effect list of the backwards tail will have been added + // to the end. This breaks the guarantee that life-cycles fire in + // sibling order but that isn't a strong guarantee promised by React. + // Especially since these might also just pop in during future commits. + // Append to the beginning of the list. + renderedTail.sibling = workInProgress.child; + workInProgress.child = renderedTail; + } else { + var previousSibling = renderState.last; + + if (previousSibling !== null) { + previousSibling.sibling = renderedTail; + } else { + workInProgress.child = renderedTail; + } + + renderState.last = renderedTail; + } + } + + if (renderState.tail !== null) { + // We still have tail rows to render. + if (renderState.tailExpiration === 0) { + // Heuristic for how long we're willing to spend rendering rows + // until we just give up and show what we have so far. + var TAIL_EXPIRATION_TIMEOUT_MS = 500; + renderState.tailExpiration = now() + TAIL_EXPIRATION_TIMEOUT_MS; + } // Pop a row. + + var next = renderState.tail; + renderState.rendering = next; + renderState.tail = next.sibling; + renderState.lastEffect = workInProgress.lastEffect; + next.sibling = null; // Restore the context. + // TODO: We can probably just avoid popping it instead and only + // setting it the first time we go from not suspended to suspended. + + var suspenseContext = suspenseStackCursor.current; + + if (didSuspendAlready) { + suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback); + } else { + suspenseContext = setDefaultShallowSuspenseContext(suspenseContext); + } + + pushSuspenseContext(workInProgress, suspenseContext); // Do a pass over the next row. + + return next; + } + + break; + } + + case FundamentalComponent: { + if (enableFundamentalAPI) { + var fundamentalImpl = workInProgress.type.impl; + var fundamentalInstance = workInProgress.stateNode; + + if (fundamentalInstance === null) { + var getInitialState = fundamentalImpl.getInitialState; + var fundamentalState; + + if (getInitialState !== undefined) { + fundamentalState = getInitialState(newProps); + } + + fundamentalInstance = workInProgress.stateNode = createFundamentalStateInstance( + workInProgress, + newProps, + fundamentalImpl, + fundamentalState || {}, + ); + + var _instance5 = getFundamentalComponentInstance(fundamentalInstance); + + fundamentalInstance.instance = _instance5; + + if (fundamentalImpl.reconcileChildren === false) { + return null; + } + + appendAllChildren(_instance5, workInProgress, false, false); + mountFundamentalComponent(fundamentalInstance); + } else { + // We fire update in commit phase + var prevProps = fundamentalInstance.props; + fundamentalInstance.prevProps = prevProps; + fundamentalInstance.props = newProps; + fundamentalInstance.currentFiber = workInProgress; + + if (supportsPersistence) { + var _instance6 = cloneFundamentalInstance(fundamentalInstance); + + fundamentalInstance.instance = _instance6; + appendAllChildren(_instance6, workInProgress, false, false); + } + + var shouldUpdate = shouldUpdateFundamentalComponent(fundamentalInstance); + + if (shouldUpdate) { + markUpdate(workInProgress); + } + } + } + + break; + } + + case ScopeComponent: { + if (enableScopeAPI) { + if (current === null) { + var _type3 = workInProgress.type; + var scopeInstance = { + fiber: workInProgress, + methods: null, + }; + workInProgress.stateNode = scopeInstance; + scopeInstance.methods = createScopeMethods(_type3, scopeInstance); + + if (enableFlareAPI) { + var _listeners2 = newProps.listeners; + + if (_listeners2 != null) { + var _rootContainerInstance2 = getRootHostContainer(); + + updateEventListeners(_listeners2, workInProgress, _rootContainerInstance2); + } + } + + if (workInProgress.ref !== null) { + markRef$1(workInProgress); + markUpdate(workInProgress); + } + } else { + if (enableFlareAPI) { + var _prevListeners = current.memoizedProps.listeners; + var _nextListeners = newProps.listeners; + + if (_prevListeners !== _nextListeners || workInProgress.ref !== null) { + markUpdate(workInProgress); + } + } else { + if (workInProgress.ref !== null) { + markUpdate(workInProgress); + } + } + + if (current.ref !== workInProgress.ref) { + markRef$1(workInProgress); + } + } + } + + break; + } + + default: { + { + throw Error( + 'Unknown unit of work tag (' + + workInProgress.tag + + '). This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + } + + return null; + } + + function unwindWork(workInProgress, renderExpirationTime) { + switch (workInProgress.tag) { + case ClassComponent: { + var Component = workInProgress.type; + + if (isContextProvider(Component)) { + popContext(workInProgress); + } + + var effectTag = workInProgress.effectTag; + + if (effectTag & ShouldCapture) { + workInProgress.effectTag = (effectTag & ~ShouldCapture) | DidCapture; + return workInProgress; + } + + return null; + } + + case HostRoot: { + popHostContainer(workInProgress); + popTopLevelContextObject(workInProgress); + var _effectTag = workInProgress.effectTag; + + if (!((_effectTag & DidCapture) === NoEffect)) { + { + throw Error( + 'The root failed to unmount after an error. This is likely a bug in React. Please file an issue.', + ); + } + } + + workInProgress.effectTag = (_effectTag & ~ShouldCapture) | DidCapture; + return workInProgress; + } + + case HostComponent: { + // TODO: popHydrationState + popHostContext(workInProgress); + return null; + } + + case SuspenseComponent: { + popSuspenseContext(workInProgress); + + if (enableSuspenseServerRenderer) { + var suspenseState = workInProgress.memoizedState; + + if (suspenseState !== null && suspenseState.dehydrated !== null) { + if (!(workInProgress.alternate !== null)) { + { + throw Error( + 'Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue.', + ); + } + } + + resetHydrationState(); + } + } + + var _effectTag2 = workInProgress.effectTag; + + if (_effectTag2 & ShouldCapture) { + workInProgress.effectTag = (_effectTag2 & ~ShouldCapture) | DidCapture; // Captured a suspense effect. Re-render the boundary. + + return workInProgress; + } + + return null; + } + + case SuspenseListComponent: { + popSuspenseContext(workInProgress); // SuspenseList doesn't actually catch anything. It should've been + // caught by a nested boundary. If not, it should bubble through. + + return null; + } + + case HostPortal: + popHostContainer(workInProgress); + return null; + + case ContextProvider: + popProvider(workInProgress); + return null; + + default: + return null; + } + } + + function unwindInterruptedWork(interruptedWork) { + switch (interruptedWork.tag) { + case ClassComponent: { + var childContextTypes = interruptedWork.type.childContextTypes; + + if (childContextTypes !== null && childContextTypes !== undefined) { + popContext(interruptedWork); + } + + break; + } + + case HostRoot: { + popHostContainer(interruptedWork); + popTopLevelContextObject(interruptedWork); + break; + } + + case HostComponent: { + popHostContext(interruptedWork); + break; + } + + case HostPortal: + popHostContainer(interruptedWork); + break; + + case SuspenseComponent: + popSuspenseContext(interruptedWork); + break; + + case SuspenseListComponent: + popSuspenseContext(interruptedWork); + break; + + case ContextProvider: + popProvider(interruptedWork); + break; + + default: + break; + } + } + + function createCapturedValue(value, source) { + // If the value is an error, call this function immediately after it is thrown + // so the stack is accurate. + return { + value: value, + source: source, + stack: getStackByFiberInDevAndProd(source), + }; + } + + // This module is forked in different environments. + // By default, return `true` to log errors to the console. + // Forks can return `false` if this isn't desirable. + function showErrorDialog(capturedError) { + return true; + } + + function logCapturedError(capturedError) { + var logError = showErrorDialog(capturedError); // Allow injected showErrorDialog() to prevent default console.error logging. + // This enables renderers like ReactNative to better manage redbox behavior. + + if (logError === false) { + return; + } + + var error = capturedError.error; + + { + var componentName = capturedError.componentName, + componentStack = capturedError.componentStack, + errorBoundaryName = capturedError.errorBoundaryName, + errorBoundaryFound = capturedError.errorBoundaryFound, + willRetry = capturedError.willRetry; // Browsers support silencing uncaught errors by calling + // `preventDefault()` in window `error` handler. + // We record this information as an expando on the error. + + if (error != null && error._suppressLogging) { + if (errorBoundaryFound && willRetry) { + // The error is recoverable and was silenced. + // Ignore it and don't print the stack addendum. + // This is handy for testing error boundaries without noise. + return; + } // The error is fatal. Since the silencing might have + // been accidental, we'll surface it anyway. + // However, the browser would have silenced the original error + // so we'll print it first, and then print the stack addendum. + + console.error(error); // For a more detailed description of this block, see: + // https://github.com/facebook/react/pull/13384 + } + + var componentNameMessage = componentName + ? 'The above error occurred in the <' + componentName + '> component:' + : 'The above error occurred in one of your React components:'; + var errorBoundaryMessage; // errorBoundaryFound check is sufficient; errorBoundaryName check is to satisfy Flow. + + if (errorBoundaryFound && errorBoundaryName) { + if (willRetry) { + errorBoundaryMessage = + 'React will try to recreate this component tree from scratch ' + + ('using the error boundary you provided, ' + errorBoundaryName + '.'); + } else { + errorBoundaryMessage = + 'This error was initially handled by the error boundary ' + + errorBoundaryName + + '.\n' + + 'Recreating the tree from scratch failed so React will unmount the tree.'; + } + } else { + errorBoundaryMessage = + 'Consider adding an error boundary to your tree to customize error handling behavior.\n' + + 'Visit https://fb.me/react-error-boundaries to learn more about error boundaries.'; + } + + var combinedMessage = + '' + componentNameMessage + componentStack + '\n\n' + ('' + errorBoundaryMessage); // In development, we provide our own message with just the component stack. + // We don't include the original error message and JS stack because the browser + // has already printed it. Even if the application swallows the error, it is still + // displayed by the browser thanks to the DEV-only fake event trick in ReactErrorUtils. + + console.error(combinedMessage); + } + } + + var didWarnAboutUndefinedSnapshotBeforeUpdate = null; + + { + didWarnAboutUndefinedSnapshotBeforeUpdate = new Set(); + } + + var PossiblyWeakSet = typeof WeakSet === 'function' ? WeakSet : Set; + function logError(boundary, errorInfo) { + var source = errorInfo.source; + var stack = errorInfo.stack; + + if (stack === null && source !== null) { + stack = getStackByFiberInDevAndProd(source); + } + + var capturedError = { + componentName: source !== null ? getComponentName(source.type) : null, + componentStack: stack !== null ? stack : '', + error: errorInfo.value, + errorBoundary: null, + errorBoundaryName: null, + errorBoundaryFound: false, + willRetry: false, + }; + + if (boundary !== null && boundary.tag === ClassComponent) { + capturedError.errorBoundary = boundary.stateNode; + capturedError.errorBoundaryName = getComponentName(boundary.type); + capturedError.errorBoundaryFound = true; + capturedError.willRetry = true; + } + + try { + logCapturedError(capturedError); + } catch (e) { + // This method must not throw, or React internal state will get messed up. + // If console.error is overridden, or logCapturedError() shows a dialog that throws, + // we want to report this error outside of the normal stack as a last resort. + // https://github.com/facebook/react/issues/13188 + setTimeout(function () { + throw e; + }); + } + } + + var callComponentWillUnmountWithTimer = function (current$$1, instance) { + startPhaseTimer(current$$1, 'componentWillUnmount'); + instance.props = current$$1.memoizedProps; + instance.state = current$$1.memoizedState; + instance.componentWillUnmount(); + stopPhaseTimer(); + }; // Capture errors so they don't interrupt unmounting. + + function safelyCallComponentWillUnmount(current$$1, instance) { + { + invokeGuardedCallback(null, callComponentWillUnmountWithTimer, null, current$$1, instance); + + if (hasCaughtError()) { + var unmountError = clearCaughtError(); + captureCommitPhaseError(current$$1, unmountError); + } + } + } + + function safelyDetachRef(current$$1) { + var ref = current$$1.ref; + + if (ref !== null) { + if (typeof ref === 'function') { + { + invokeGuardedCallback(null, ref, null, null); + + if (hasCaughtError()) { + var refError = clearCaughtError(); + captureCommitPhaseError(current$$1, refError); + } + } + } else { + ref.current = null; + } + } + } + + function safelyCallDestroy(current$$1, destroy) { + { + invokeGuardedCallback(null, destroy, null); + + if (hasCaughtError()) { + var error = clearCaughtError(); + captureCommitPhaseError(current$$1, error); + } + } + } + + function commitBeforeMutationLifeCycles(current$$1, finishedWork) { + switch (finishedWork.tag) { + case FunctionComponent: + case ForwardRef: + case SimpleMemoComponent: { + commitHookEffectList(UnmountSnapshot, NoEffect$1, finishedWork); + return; + } + + case ClassComponent: { + if (finishedWork.effectTag & Snapshot) { + if (current$$1 !== null) { + var prevProps = current$$1.memoizedProps; + var prevState = current$$1.memoizedState; + startPhaseTimer(finishedWork, 'getSnapshotBeforeUpdate'); + var instance = finishedWork.stateNode; // We could update instance props and state here, + // but instead we rely on them being set during last render. + // TODO: revisit this when we implement resuming. + + { + if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) { + !(instance.props === finishedWork.memoizedProps) + ? warning$1( + false, + 'Expected %s props to match memoized props before ' + + 'getSnapshotBeforeUpdate. ' + + 'This might either be because of a bug in React, or because ' + + 'a component reassigns its own `this.props`. ' + + 'Please file an issue.', + getComponentName(finishedWork.type) || 'instance', + ) + : void 0; + !(instance.state === finishedWork.memoizedState) + ? warning$1( + false, + 'Expected %s state to match memoized state before ' + + 'getSnapshotBeforeUpdate. ' + + 'This might either be because of a bug in React, or because ' + + 'a component reassigns its own `this.props`. ' + + 'Please file an issue.', + getComponentName(finishedWork.type) || 'instance', + ) + : void 0; + } + } + + var snapshot = instance.getSnapshotBeforeUpdate( + finishedWork.elementType === finishedWork.type + ? prevProps + : resolveDefaultProps(finishedWork.type, prevProps), + prevState, + ); + + { + var didWarnSet = didWarnAboutUndefinedSnapshotBeforeUpdate; + + if (snapshot === undefined && !didWarnSet.has(finishedWork.type)) { + didWarnSet.add(finishedWork.type); + warningWithoutStack$1( + false, + '%s.getSnapshotBeforeUpdate(): A snapshot value (or null) ' + + 'must be returned. You have returned undefined.', + getComponentName(finishedWork.type), + ); + } + } + + instance.__reactInternalSnapshotBeforeUpdate = snapshot; + stopPhaseTimer(); + } + } + + return; + } + + case HostRoot: + case HostComponent: + case HostText: + case HostPortal: + case IncompleteClassComponent: + // Nothing to do for these component types + return; + + default: { + { + { + throw Error( + 'This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + } + } + } + + function commitHookEffectList(unmountTag, mountTag, finishedWork) { + var updateQueue = finishedWork.updateQueue; + var lastEffect = updateQueue !== null ? updateQueue.lastEffect : null; + + if (lastEffect !== null) { + var firstEffect = lastEffect.next; + var effect = firstEffect; + + do { + if ((effect.tag & unmountTag) !== NoEffect$1) { + // Unmount + var destroy = effect.destroy; + effect.destroy = undefined; + + if (destroy !== undefined) { + destroy(); + } + } + + if ((effect.tag & mountTag) !== NoEffect$1) { + // Mount + var create = effect.create; + effect.destroy = create(); + + { + var _destroy = effect.destroy; + + if (_destroy !== undefined && typeof _destroy !== 'function') { + var addendum = void 0; + + if (_destroy === null) { + addendum = + ' You returned null. If your effect does not require clean ' + + 'up, return undefined (or nothing).'; + } else if (typeof _destroy.then === 'function') { + addendum = + '\n\nIt looks like you wrote useEffect(async () => ...) or returned a Promise. ' + + 'Instead, write the async function inside your effect ' + + 'and call it immediately:\n\n' + + 'useEffect(() => {\n' + + ' async function fetchData() {\n' + + ' // You can await here\n' + + ' const response = await MyAPI.getData(someId);\n' + + ' // ...\n' + + ' }\n' + + ' fetchData();\n' + + "}, [someId]); // Or [] if effect doesn't need props or state\n\n" + + 'Learn more about data fetching with Hooks: https://fb.me/react-hooks-data-fetching'; + } else { + addendum = ' You returned: ' + _destroy; + } + + warningWithoutStack$1( + false, + 'An effect function must not return anything besides a function, ' + + 'which is used for clean-up.%s%s', + addendum, + getStackByFiberInDevAndProd(finishedWork), + ); + } + } + } + + effect = effect.next; + } while (effect !== firstEffect); + } + } + + function commitPassiveHookEffects(finishedWork) { + if ((finishedWork.effectTag & Passive) !== NoEffect) { + switch (finishedWork.tag) { + case FunctionComponent: + case ForwardRef: + case SimpleMemoComponent: { + commitHookEffectList(UnmountPassive, NoEffect$1, finishedWork); + commitHookEffectList(NoEffect$1, MountPassive, finishedWork); + break; + } + + default: + break; + } + } + } + + function commitLifeCycles(finishedRoot, current$$1, finishedWork, committedExpirationTime) { + switch (finishedWork.tag) { + case FunctionComponent: + case ForwardRef: + case SimpleMemoComponent: { + commitHookEffectList(UnmountLayout, MountLayout, finishedWork); + break; + } + + case ClassComponent: { + var instance = finishedWork.stateNode; + + if (finishedWork.effectTag & Update) { + if (current$$1 === null) { + startPhaseTimer(finishedWork, 'componentDidMount'); // We could update instance props and state here, + // but instead we rely on them being set during last render. + // TODO: revisit this when we implement resuming. + + { + if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) { + !(instance.props === finishedWork.memoizedProps) + ? warning$1( + false, + 'Expected %s props to match memoized props before ' + + 'componentDidMount. ' + + 'This might either be because of a bug in React, or because ' + + 'a component reassigns its own `this.props`. ' + + 'Please file an issue.', + getComponentName(finishedWork.type) || 'instance', + ) + : void 0; + !(instance.state === finishedWork.memoizedState) + ? warning$1( + false, + 'Expected %s state to match memoized state before ' + + 'componentDidMount. ' + + 'This might either be because of a bug in React, or because ' + + 'a component reassigns its own `this.props`. ' + + 'Please file an issue.', + getComponentName(finishedWork.type) || 'instance', + ) + : void 0; + } + } + + instance.componentDidMount(); + stopPhaseTimer(); + } else { + var prevProps = + finishedWork.elementType === finishedWork.type + ? current$$1.memoizedProps + : resolveDefaultProps(finishedWork.type, current$$1.memoizedProps); + var prevState = current$$1.memoizedState; + startPhaseTimer(finishedWork, 'componentDidUpdate'); // We could update instance props and state here, + // but instead we rely on them being set during last render. + // TODO: revisit this when we implement resuming. + + { + if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) { + !(instance.props === finishedWork.memoizedProps) + ? warning$1( + false, + 'Expected %s props to match memoized props before ' + + 'componentDidUpdate. ' + + 'This might either be because of a bug in React, or because ' + + 'a component reassigns its own `this.props`. ' + + 'Please file an issue.', + getComponentName(finishedWork.type) || 'instance', + ) + : void 0; + !(instance.state === finishedWork.memoizedState) + ? warning$1( + false, + 'Expected %s state to match memoized state before ' + + 'componentDidUpdate. ' + + 'This might either be because of a bug in React, or because ' + + 'a component reassigns its own `this.props`. ' + + 'Please file an issue.', + getComponentName(finishedWork.type) || 'instance', + ) + : void 0; + } + } + + instance.componentDidUpdate( + prevProps, + prevState, + instance.__reactInternalSnapshotBeforeUpdate, + ); + stopPhaseTimer(); + } + } + + var updateQueue = finishedWork.updateQueue; + + if (updateQueue !== null) { + { + if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) { + !(instance.props === finishedWork.memoizedProps) + ? warning$1( + false, + 'Expected %s props to match memoized props before ' + + 'processing the update queue. ' + + 'This might either be because of a bug in React, or because ' + + 'a component reassigns its own `this.props`. ' + + 'Please file an issue.', + getComponentName(finishedWork.type) || 'instance', + ) + : void 0; + !(instance.state === finishedWork.memoizedState) + ? warning$1( + false, + 'Expected %s state to match memoized state before ' + + 'processing the update queue. ' + + 'This might either be because of a bug in React, or because ' + + 'a component reassigns its own `this.props`. ' + + 'Please file an issue.', + getComponentName(finishedWork.type) || 'instance', + ) + : void 0; + } + } // We could update instance props and state here, + // but instead we rely on them being set during last render. + // TODO: revisit this when we implement resuming. + + commitUpdateQueue(finishedWork, updateQueue, instance, committedExpirationTime); + } + + return; + } + + case HostRoot: { + var _updateQueue = finishedWork.updateQueue; + + if (_updateQueue !== null) { + var _instance = null; + + if (finishedWork.child !== null) { + switch (finishedWork.child.tag) { + case HostComponent: + _instance = getPublicInstance(finishedWork.child.stateNode); + break; + + case ClassComponent: + _instance = finishedWork.child.stateNode; + break; + } + } + + commitUpdateQueue(finishedWork, _updateQueue, _instance, committedExpirationTime); + } + + return; + } + + case HostComponent: { + var _instance2 = finishedWork.stateNode; // Renderers may schedule work to be done after host components are mounted + // (eg DOM renderer may schedule auto-focus for inputs and form controls). + // These effects should only be committed when components are first mounted, + // aka when there is no current/alternate. + + if (current$$1 === null && finishedWork.effectTag & Update) { + var type = finishedWork.type; + var props = finishedWork.memoizedProps; + commitMount(_instance2, type, props, finishedWork); + } + + return; + } + + case HostText: { + // We have no life-cycles associated with text. + return; + } + + case HostPortal: { + // We have no life-cycles associated with portals. + return; + } + + case Profiler: { + if (enableProfilerTimer) { + var onRender = finishedWork.memoizedProps.onRender; + + if (typeof onRender === 'function') { + if (enableSchedulerTracing) { + onRender( + finishedWork.memoizedProps.id, + current$$1 === null ? 'mount' : 'update', + finishedWork.actualDuration, + finishedWork.treeBaseDuration, + finishedWork.actualStartTime, + getCommitTime(), + finishedRoot.memoizedInteractions, + ); + } else { + onRender( + finishedWork.memoizedProps.id, + current$$1 === null ? 'mount' : 'update', + finishedWork.actualDuration, + finishedWork.treeBaseDuration, + finishedWork.actualStartTime, + getCommitTime(), + ); + } + } + } + + return; + } + + case SuspenseComponent: { + commitSuspenseHydrationCallbacks(finishedRoot, finishedWork); + return; + } + + case SuspenseListComponent: + case IncompleteClassComponent: + case FundamentalComponent: + case ScopeComponent: + return; + + default: { + { + { + throw Error( + 'This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + } + } + } + + function hideOrUnhideAllChildren(finishedWork, isHidden) { + if (supportsMutation) { + // We only have the top Fiber that was inserted but we need to recurse down its + // children to find all the terminal nodes. + var node = finishedWork; + + while (true) { + if (node.tag === HostComponent) { + var instance = node.stateNode; + + if (isHidden) { + hideInstance(instance); + } else { + unhideInstance(node.stateNode, node.memoizedProps); + } + } else if (node.tag === HostText) { + var _instance3 = node.stateNode; + + if (isHidden) { + hideTextInstance(_instance3); + } else { + unhideTextInstance(_instance3, node.memoizedProps); + } + } else if ( + node.tag === SuspenseComponent && + node.memoizedState !== null && + node.memoizedState.dehydrated === null + ) { + // Found a nested Suspense component that timed out. Skip over the + // primary child fragment, which should remain hidden. + var fallbackChildFragment = node.child.sibling; + fallbackChildFragment.return = node; + node = fallbackChildFragment; + continue; + } else if (node.child !== null) { + node.child.return = node; + node = node.child; + continue; + } + + if (node === finishedWork) { + return; + } + + while (node.sibling === null) { + if (node.return === null || node.return === finishedWork) { + return; + } + + node = node.return; + } + + node.sibling.return = node.return; + node = node.sibling; + } + } + } + + function commitAttachRef(finishedWork) { + var ref = finishedWork.ref; + + if (ref !== null) { + var instance = finishedWork.stateNode; + var instanceToUse; + + switch (finishedWork.tag) { + case HostComponent: + instanceToUse = getPublicInstance(instance); + break; + + default: + instanceToUse = instance; + } // Moved outside to ensure DCE works with this flag + + if (enableScopeAPI && finishedWork.tag === ScopeComponent) { + instanceToUse = instance.methods; + } + + if (typeof ref === 'function') { + ref(instanceToUse); + } else { + { + if (!ref.hasOwnProperty('current')) { + warningWithoutStack$1( + false, + 'Unexpected ref object provided for %s. ' + + 'Use either a ref-setter function or React.createRef().%s', + getComponentName(finishedWork.type), + getStackByFiberInDevAndProd(finishedWork), + ); + } + } + + ref.current = instanceToUse; + } + } + } + + function commitDetachRef(current$$1) { + var currentRef = current$$1.ref; + + if (currentRef !== null) { + if (typeof currentRef === 'function') { + currentRef(null); + } else { + currentRef.current = null; + } + } + } // User-originating errors (lifecycles and refs) should not interrupt + // deletion, so don't let them throw. Host-originating errors should + // interrupt deletion, so it's okay + + function commitUnmount(finishedRoot, current$$1, renderPriorityLevel) { + onCommitUnmount(current$$1); + + switch (current$$1.tag) { + case FunctionComponent: + case ForwardRef: + case MemoComponent: + case SimpleMemoComponent: { + var updateQueue = current$$1.updateQueue; + + if (updateQueue !== null) { + var lastEffect = updateQueue.lastEffect; + + if (lastEffect !== null) { + var firstEffect = lastEffect.next; // When the owner fiber is deleted, the destroy function of a passive + // effect hook is called during the synchronous commit phase. This is + // a concession to implementation complexity. Calling it in the + // passive effect phase (like they usually are, when dependencies + // change during an update) would require either traversing the + // children of the deleted fiber again, or including unmount effects + // as part of the fiber effect list. + // + // Because this is during the sync commit phase, we need to change + // the priority. + // + // TODO: Reconsider this implementation trade off. + + var priorityLevel = + renderPriorityLevel > NormalPriority ? NormalPriority : renderPriorityLevel; + runWithPriority$2(priorityLevel, function () { + var effect = firstEffect; + + do { + var destroy = effect.destroy; + + if (destroy !== undefined) { + safelyCallDestroy(current$$1, destroy); + } + + effect = effect.next; + } while (effect !== firstEffect); + }); + } + } + + break; + } + + case ClassComponent: { + safelyDetachRef(current$$1); + var instance = current$$1.stateNode; + + if (typeof instance.componentWillUnmount === 'function') { + safelyCallComponentWillUnmount(current$$1, instance); + } + + return; + } + + case HostComponent: { + if (enableFlareAPI) { + var dependencies = current$$1.dependencies; + + if (dependencies !== null) { + var respondersMap = dependencies.responders; + + if (respondersMap !== null) { + var responderInstances = Array.from(respondersMap.values()); + + for (var i = 0, length = responderInstances.length; i < length; i++) { + var responderInstance = responderInstances[i]; + unmountResponderInstance(responderInstance); + } + + dependencies.responders = null; + } + } + } + + safelyDetachRef(current$$1); + return; + } + + case HostPortal: { + // TODO: this is recursive. + // We are also not using this parent because + // the portal will get pushed immediately. + if (supportsMutation) { + unmountHostComponents(finishedRoot, current$$1, renderPriorityLevel); + } else if (supportsPersistence) { + emptyPortalContainer(current$$1); + } + + return; + } + + case FundamentalComponent: { + if (enableFundamentalAPI) { + var fundamentalInstance = current$$1.stateNode; + + if (fundamentalInstance !== null) { + unmountFundamentalComponent(fundamentalInstance); + current$$1.stateNode = null; + } + } + + return; + } + + case DehydratedFragment: { + if (enableSuspenseCallback) { + var hydrationCallbacks = finishedRoot.hydrationCallbacks; + + if (hydrationCallbacks !== null) { + var onDeleted = hydrationCallbacks.onDeleted; + + if (onDeleted) { + onDeleted(current$$1.stateNode); + } + } + } + + return; + } + + case ScopeComponent: { + if (enableScopeAPI) { + safelyDetachRef(current$$1); + } + } + } + } + + function commitNestedUnmounts(finishedRoot, root, renderPriorityLevel) { + // While we're inside a removed host node we don't want to call + // removeChild on the inner nodes because they're removed by the top + // call anyway. We also want to call componentWillUnmount on all + // composites before this host node is removed from the tree. Therefore + // we do an inner loop while we're still inside the host node. + var node = root; + + while (true) { + commitUnmount(finishedRoot, node, renderPriorityLevel); // Visit children because they may contain more composite or host nodes. + // Skip portals because commitUnmount() currently visits them recursively. + + if ( + node.child !== null && // If we use mutation we drill down into portals using commitUnmount above. + // If we don't use mutation we drill down into portals here instead. + (!supportsMutation || node.tag !== HostPortal) + ) { + node.child.return = node; + node = node.child; + continue; + } + + if (node === root) { + return; + } + + while (node.sibling === null) { + if (node.return === null || node.return === root) { + return; + } + + node = node.return; + } + + node.sibling.return = node.return; + node = node.sibling; + } + } + + function detachFiber(current$$1) { + var alternate = current$$1.alternate; // Cut off the return pointers to disconnect it from the tree. Ideally, we + // should clear the child pointer of the parent alternate to let this + // get GC:ed but we don't know which for sure which parent is the current + // one so we'll settle for GC:ing the subtree of this child. This child + // itself will be GC:ed when the parent updates the next time. + + current$$1.return = null; + current$$1.child = null; + current$$1.memoizedState = null; + current$$1.updateQueue = null; + current$$1.dependencies = null; + current$$1.alternate = null; + current$$1.firstEffect = null; + current$$1.lastEffect = null; + current$$1.pendingProps = null; + current$$1.memoizedProps = null; + + if (alternate !== null) { + detachFiber(alternate); + } + } + + function emptyPortalContainer(current$$1) { + if (!supportsPersistence) { + return; + } + + var portal = current$$1.stateNode; + var containerInfo = portal.containerInfo; + var emptyChildSet = createContainerChildSet(containerInfo); + replaceContainerChildren(containerInfo, emptyChildSet); + } + + function commitContainer(finishedWork) { + if (!supportsPersistence) { + return; + } + + switch (finishedWork.tag) { + case ClassComponent: + case HostComponent: + case HostText: + case FundamentalComponent: { + return; + } + + case HostRoot: + case HostPortal: { + var portalOrRoot = finishedWork.stateNode; + var containerInfo = portalOrRoot.containerInfo, + pendingChildren = portalOrRoot.pendingChildren; + replaceContainerChildren(containerInfo, pendingChildren); + return; + } + + default: { + { + { + throw Error( + 'This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + } + } + } + + function getHostParentFiber(fiber) { + var parent = fiber.return; + + while (parent !== null) { + if (isHostParent(parent)) { + return parent; + } + + parent = parent.return; + } + + { + { + throw Error( + 'Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + } + + function isHostParent(fiber) { + return fiber.tag === HostComponent || fiber.tag === HostRoot || fiber.tag === HostPortal; + } + + function getHostSibling(fiber) { + // We're going to search forward into the tree until we find a sibling host + // node. Unfortunately, if multiple insertions are done in a row we have to + // search past them. This leads to exponential search for the next sibling. + // TODO: Find a more efficient way to do this. + var node = fiber; + + siblings: while (true) { + // If we didn't find anything, let's try the next sibling. + while (node.sibling === null) { + if (node.return === null || isHostParent(node.return)) { + // If we pop out of the root or hit the parent the fiber we are the + // last sibling. + return null; + } + + node = node.return; + } + + node.sibling.return = node.return; + node = node.sibling; + + while (node.tag !== HostComponent && node.tag !== HostText && node.tag !== DehydratedFragment) { + // If it is not host node and, we might have a host node inside it. + // Try to search down until we find one. + if (node.effectTag & Placement) { + // If we don't have a child, try the siblings instead. + continue siblings; + } // If we don't have a child, try the siblings instead. + // We also skip portals because they are not part of this host tree. + + if (node.child === null || node.tag === HostPortal) { + continue siblings; + } else { + node.child.return = node; + node = node.child; + } + } // Check if this host node is stable or about to be placed. + + if (!(node.effectTag & Placement)) { + // Found it! + return node.stateNode; + } + } + } + + function commitPlacement(finishedWork) { + if (!supportsMutation) { + return; + } // Recursively insert all host nodes into the parent. + + var parentFiber = getHostParentFiber(finishedWork); // Note: these two variables *must* always be updated together. + + var parent; + var isContainer; + var parentStateNode = parentFiber.stateNode; + + switch (parentFiber.tag) { + case HostComponent: + parent = parentStateNode; + isContainer = false; + break; + + case HostRoot: + parent = parentStateNode.containerInfo; + isContainer = true; + break; + + case HostPortal: + parent = parentStateNode.containerInfo; + isContainer = true; + break; + + case FundamentalComponent: + if (enableFundamentalAPI) { + parent = parentStateNode.instance; + isContainer = false; + } + + // eslint-disable-next-line-no-fallthrough + + default: { + { + throw Error( + 'Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + } + + if (parentFiber.effectTag & ContentReset) { + // Reset the text content of the parent before doing any insertions + resetTextContent(parent); // Clear ContentReset from the effect tag + + parentFiber.effectTag &= ~ContentReset; + } + + var before = getHostSibling(finishedWork); // We only have the top Fiber that was inserted but we need to recurse down its + // children to find all the terminal nodes. + + var node = finishedWork; + + while (true) { + var isHost = node.tag === HostComponent || node.tag === HostText; + + if (isHost || (enableFundamentalAPI && node.tag === FundamentalComponent)) { + var stateNode = isHost ? node.stateNode : node.stateNode.instance; + + if (before) { + if (isContainer) { + insertInContainerBefore(parent, stateNode, before); + } else { + insertBefore(parent, stateNode, before); + } + } else { + if (isContainer) { + appendChildToContainer(parent, stateNode); + } else { + appendChild(parent, stateNode); + } + } + } else if (node.tag === HostPortal) { + // If the insertion itself is a portal, then we don't want to traverse + // down its children. Instead, we'll get insertions from each child in + // the portal directly. + } else if (node.child !== null) { + node.child.return = node; + node = node.child; + continue; + } + + if (node === finishedWork) { + return; + } + + while (node.sibling === null) { + if (node.return === null || node.return === finishedWork) { + return; + } + + node = node.return; + } + + node.sibling.return = node.return; + node = node.sibling; + } + } + + function unmountHostComponents(finishedRoot, current$$1, renderPriorityLevel) { + // We only have the top Fiber that was deleted but we need to recurse down its + // children to find all the terminal nodes. + var node = current$$1; // Each iteration, currentParent is populated with node's host parent if not + // currentParentIsValid. + + var currentParentIsValid = false; // Note: these two variables *must* always be updated together. + + var currentParent; + var currentParentIsContainer; + + while (true) { + if (!currentParentIsValid) { + var parent = node.return; + + findParent: while (true) { + if (!(parent !== null)) { + { + throw Error( + 'Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + + var parentStateNode = parent.stateNode; + + switch (parent.tag) { + case HostComponent: + currentParent = parentStateNode; + currentParentIsContainer = false; + break findParent; + + case HostRoot: + currentParent = parentStateNode.containerInfo; + currentParentIsContainer = true; + break findParent; + + case HostPortal: + currentParent = parentStateNode.containerInfo; + currentParentIsContainer = true; + break findParent; + + case FundamentalComponent: + if (enableFundamentalAPI) { + currentParent = parentStateNode.instance; + currentParentIsContainer = false; + } + } + + parent = parent.return; + } + + currentParentIsValid = true; + } + + if (node.tag === HostComponent || node.tag === HostText) { + commitNestedUnmounts(finishedRoot, node, renderPriorityLevel); // After all the children have unmounted, it is now safe to remove the + // node from the tree. + + if (currentParentIsContainer) { + removeChildFromContainer(currentParent, node.stateNode); + } else { + removeChild(currentParent, node.stateNode); + } // Don't visit children because we already visited them. + } else if (enableFundamentalAPI && node.tag === FundamentalComponent) { + var fundamentalNode = node.stateNode.instance; + commitNestedUnmounts(finishedRoot, node, renderPriorityLevel); // After all the children have unmounted, it is now safe to remove the + // node from the tree. + + if (currentParentIsContainer) { + removeChildFromContainer(currentParent, fundamentalNode); + } else { + removeChild(currentParent, fundamentalNode); + } + } else if (enableSuspenseServerRenderer && node.tag === DehydratedFragment) { + if (enableSuspenseCallback) { + var hydrationCallbacks = finishedRoot.hydrationCallbacks; + + if (hydrationCallbacks !== null) { + var onDeleted = hydrationCallbacks.onDeleted; + + if (onDeleted) { + onDeleted(node.stateNode); + } + } + } // Delete the dehydrated suspense boundary and all of its content. + + if (currentParentIsContainer) { + clearSuspenseBoundaryFromContainer(currentParent, node.stateNode); + } else { + clearSuspenseBoundary(currentParent, node.stateNode); + } + } else if (node.tag === HostPortal) { + if (node.child !== null) { + // When we go into a portal, it becomes the parent to remove from. + // We will reassign it back when we pop the portal on the way up. + currentParent = node.stateNode.containerInfo; + currentParentIsContainer = true; // Visit children because portals might contain host components. + + node.child.return = node; + node = node.child; + continue; + } + } else { + commitUnmount(finishedRoot, node, renderPriorityLevel); // Visit children because we may find more host components below. + + if (node.child !== null) { + node.child.return = node; + node = node.child; + continue; + } + } + + if (node === current$$1) { + return; + } + + while (node.sibling === null) { + if (node.return === null || node.return === current$$1) { + return; + } + + node = node.return; + + if (node.tag === HostPortal) { + // When we go out of the portal, we need to restore the parent. + // Since we don't keep a stack of them, we will search for it. + currentParentIsValid = false; + } + } + + node.sibling.return = node.return; + node = node.sibling; + } + } + + function commitDeletion(finishedRoot, current$$1, renderPriorityLevel) { + if (supportsMutation) { + // Recursively delete all host nodes from the parent. + // Detach refs and call componentWillUnmount() on the whole subtree. + unmountHostComponents(finishedRoot, current$$1, renderPriorityLevel); + } else { + // Detach refs and call componentWillUnmount() on the whole subtree. + commitNestedUnmounts(finishedRoot, current$$1, renderPriorityLevel); + } + + detachFiber(current$$1); + } + + function commitWork(current$$1, finishedWork) { + if (!supportsMutation) { + switch (finishedWork.tag) { + case FunctionComponent: + case ForwardRef: + case MemoComponent: + case SimpleMemoComponent: { + // Note: We currently never use MountMutation, but useLayout uses + // UnmountMutation. + commitHookEffectList(UnmountMutation, MountMutation, finishedWork); + return; + } + + case Profiler: { + return; + } + + case SuspenseComponent: { + commitSuspenseComponent(finishedWork); + attachSuspenseRetryListeners(finishedWork); + return; + } + + case SuspenseListComponent: { + attachSuspenseRetryListeners(finishedWork); + return; + } + + case HostRoot: { + if (supportsHydration) { + var root = finishedWork.stateNode; + + if (root.hydrate) { + // We've just hydrated. No need to hydrate again. + root.hydrate = false; + commitHydratedContainer(root.containerInfo); + } + } + + break; + } + } + + commitContainer(finishedWork); + return; + } + + switch (finishedWork.tag) { + case FunctionComponent: + case ForwardRef: + case MemoComponent: + case SimpleMemoComponent: { + // Note: We currently never use MountMutation, but useLayout uses + // UnmountMutation. + commitHookEffectList(UnmountMutation, MountMutation, finishedWork); + return; + } + + case ClassComponent: { + return; + } + + case HostComponent: { + var instance = finishedWork.stateNode; + + if (instance != null) { + // Commit the work prepared earlier. + var newProps = finishedWork.memoizedProps; // For hydration we reuse the update path but we treat the oldProps + // as the newProps. The updatePayload will contain the real change in + // this case. + + var oldProps = current$$1 !== null ? current$$1.memoizedProps : newProps; + var type = finishedWork.type; // TODO: Type the updateQueue to be specific to host components. + + var updatePayload = finishedWork.updateQueue; + finishedWork.updateQueue = null; + + if (updatePayload !== null) { + commitUpdate(instance, updatePayload, type, oldProps, newProps, finishedWork); + } + + if (enableFlareAPI) { + var prevListeners = oldProps.listeners; + var nextListeners = newProps.listeners; + + if (prevListeners !== nextListeners) { + updateEventListeners(nextListeners, finishedWork, null); + } + } + } + + return; + } + + case HostText: { + if (!(finishedWork.stateNode !== null)) { + { + throw Error( + 'This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + + var textInstance = finishedWork.stateNode; + var newText = finishedWork.memoizedProps; // For hydration we reuse the update path but we treat the oldProps + // as the newProps. The updatePayload will contain the real change in + // this case. + + var oldText = current$$1 !== null ? current$$1.memoizedProps : newText; + commitTextUpdate(textInstance, oldText, newText); + return; + } + + case HostRoot: { + if (supportsHydration) { + var _root = finishedWork.stateNode; + + if (_root.hydrate) { + // We've just hydrated. No need to hydrate again. + _root.hydrate = false; + commitHydratedContainer(_root.containerInfo); + } + } + + return; + } + + case Profiler: { + return; + } + + case SuspenseComponent: { + commitSuspenseComponent(finishedWork); + attachSuspenseRetryListeners(finishedWork); + return; + } + + case SuspenseListComponent: { + attachSuspenseRetryListeners(finishedWork); + return; + } + + case IncompleteClassComponent: { + return; + } + + case FundamentalComponent: { + if (enableFundamentalAPI) { + var fundamentalInstance = finishedWork.stateNode; + updateFundamentalComponent(fundamentalInstance); + } + + return; + } + + case ScopeComponent: { + if (enableScopeAPI) { + var scopeInstance = finishedWork.stateNode; + scopeInstance.fiber = finishedWork; + + if (enableFlareAPI) { + var _newProps = finishedWork.memoizedProps; + + var _oldProps = current$$1 !== null ? current$$1.memoizedProps : _newProps; + + var _prevListeners = _oldProps.listeners; + var _nextListeners = _newProps.listeners; + + if (_prevListeners !== _nextListeners) { + updateEventListeners(_nextListeners, finishedWork, null); + } + } + } + + return; + } + + default: { + { + { + throw Error( + 'This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + } + } + } + + function commitSuspenseComponent(finishedWork) { + var newState = finishedWork.memoizedState; + var newDidTimeout; + var primaryChildParent = finishedWork; + + if (newState === null) { + newDidTimeout = false; + } else { + newDidTimeout = true; + primaryChildParent = finishedWork.child; + markCommitTimeOfFallback(); + } + + if (supportsMutation && primaryChildParent !== null) { + hideOrUnhideAllChildren(primaryChildParent, newDidTimeout); + } + + if (enableSuspenseCallback && newState !== null) { + var suspenseCallback = finishedWork.memoizedProps.suspenseCallback; + + if (typeof suspenseCallback === 'function') { + var thenables = finishedWork.updateQueue; + + if (thenables !== null) { + suspenseCallback(new Set(thenables)); + } + } else { + if (suspenseCallback !== undefined) { + warning$1(false, 'Unexpected type for suspenseCallback.'); + } + } + } + } + + function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) { + if (!supportsHydration) { + return; + } + + var newState = finishedWork.memoizedState; + + if (newState === null) { + var current$$1 = finishedWork.alternate; + + if (current$$1 !== null) { + var prevState = current$$1.memoizedState; + + if (prevState !== null) { + var suspenseInstance = prevState.dehydrated; + + if (suspenseInstance !== null) { + commitHydratedSuspenseInstance(suspenseInstance); + + if (enableSuspenseCallback) { + var hydrationCallbacks = finishedRoot.hydrationCallbacks; + + if (hydrationCallbacks !== null) { + var onHydrated = hydrationCallbacks.onHydrated; + + if (onHydrated) { + onHydrated(suspenseInstance); + } + } + } + } + } + } + } + } + + function attachSuspenseRetryListeners(finishedWork) { + // If this boundary just timed out, then it will have a set of thenables. + // For each thenable, attach a listener so that when it resolves, React + // attempts to re-render the boundary in the primary (pre-timeout) state. + var thenables = finishedWork.updateQueue; + + if (thenables !== null) { + finishedWork.updateQueue = null; + var retryCache = finishedWork.stateNode; + + if (retryCache === null) { + retryCache = finishedWork.stateNode = new PossiblyWeakSet(); + } + + thenables.forEach(function (thenable) { + // Memoize using the boundary fiber to prevent redundant listeners. + var retry = resolveRetryThenable.bind(null, finishedWork, thenable); + + if (!retryCache.has(thenable)) { + if (enableSchedulerTracing) { + if (thenable.__reactDoNotTraceInteractions !== true) { + retry = tracing.unstable_wrap(retry); + } + } + + retryCache.add(thenable); + thenable.then(retry, retry); + } + }); + } + } + + function commitResetTextContent(current$$1) { + if (!supportsMutation) { + return; + } + + resetTextContent(current$$1.stateNode); + } + + var PossiblyWeakMap$1 = typeof WeakMap === 'function' ? WeakMap : Map; + + function createRootErrorUpdate(fiber, errorInfo, expirationTime) { + var update = createUpdate(expirationTime, null); // Unmount the root by rendering null. + + update.tag = CaptureUpdate; // Caution: React DevTools currently depends on this property + // being called "element". + + update.payload = { + element: null, + }; + var error = errorInfo.value; + + update.callback = function () { + onUncaughtError(error); + logError(fiber, errorInfo); + }; + + return update; + } + + function createClassErrorUpdate(fiber, errorInfo, expirationTime) { + var update = createUpdate(expirationTime, null); + update.tag = CaptureUpdate; + var getDerivedStateFromError = fiber.type.getDerivedStateFromError; + + if (typeof getDerivedStateFromError === 'function') { + var error = errorInfo.value; + + update.payload = function () { + logError(fiber, errorInfo); + return getDerivedStateFromError(error); + }; + } + + var inst = fiber.stateNode; + + if (inst !== null && typeof inst.componentDidCatch === 'function') { + update.callback = function callback() { + { + markFailedErrorBoundaryForHotReloading(fiber); + } + + if (typeof getDerivedStateFromError !== 'function') { + // To preserve the preexisting retry behavior of error boundaries, + // we keep track of which ones already failed during this batch. + // This gets reset before we yield back to the browser. + // TODO: Warn in strict mode if getDerivedStateFromError is + // not defined. + markLegacyErrorBoundaryAsFailed(this); // Only log here if componentDidCatch is the only error boundary method defined + + logError(fiber, errorInfo); + } + + var error = errorInfo.value; + var stack = errorInfo.stack; + this.componentDidCatch(error, { + componentStack: stack !== null ? stack : '', + }); + + { + if (typeof getDerivedStateFromError !== 'function') { + // If componentDidCatch is the only error boundary method defined, + // then it needs to call setState to recover from errors. + // If no state update is scheduled then the boundary will swallow the error. + !(fiber.expirationTime === Sync) + ? warningWithoutStack$1( + false, + '%s: Error boundaries should implement getDerivedStateFromError(). ' + + 'In that method, return a state update to display an error message or fallback UI.', + getComponentName(fiber.type) || 'Unknown', + ) + : void 0; + } + } + }; + } else { + update.callback = function () { + markFailedErrorBoundaryForHotReloading(fiber); + }; + } + + return update; + } + + function attachPingListener(root, renderExpirationTime, thenable) { + // Attach a listener to the promise to "ping" the root and retry. But + // only if one does not already exist for the current render expiration + // time (which acts like a "thread ID" here). + var pingCache = root.pingCache; + var threadIDs; + + if (pingCache === null) { + pingCache = root.pingCache = new PossiblyWeakMap$1(); + threadIDs = new Set(); + pingCache.set(thenable, threadIDs); + } else { + threadIDs = pingCache.get(thenable); + + if (threadIDs === undefined) { + threadIDs = new Set(); + pingCache.set(thenable, threadIDs); + } + } + + if (!threadIDs.has(renderExpirationTime)) { + // Memoize using the thread ID to prevent redundant listeners. + threadIDs.add(renderExpirationTime); + var ping = pingSuspendedRoot.bind(null, root, thenable, renderExpirationTime); + thenable.then(ping, ping); + } + } + + function throwException(root, returnFiber, sourceFiber, value, renderExpirationTime) { + // The source fiber did not complete. + sourceFiber.effectTag |= Incomplete; // Its effect list is no longer valid. + + sourceFiber.firstEffect = sourceFiber.lastEffect = null; + + if (value !== null && typeof value === 'object' && typeof value.then === 'function') { + // This is a thenable. + var thenable = value; + checkForWrongSuspensePriorityInDEV(sourceFiber); + var hasInvisibleParentBoundary = hasSuspenseContext( + suspenseStackCursor.current, + InvisibleParentSuspenseContext, + ); // Schedule the nearest Suspense to re-render the timed out view. + + var _workInProgress = returnFiber; + + do { + if ( + _workInProgress.tag === SuspenseComponent && + shouldCaptureSuspense(_workInProgress, hasInvisibleParentBoundary) + ) { + // Found the nearest boundary. + // Stash the promise on the boundary fiber. If the boundary times out, we'll + // attach another listener to flip the boundary back to its normal state. + var thenables = _workInProgress.updateQueue; + + if (thenables === null) { + var updateQueue = new Set(); + updateQueue.add(thenable); + _workInProgress.updateQueue = updateQueue; + } else { + thenables.add(thenable); + } // If the boundary is outside of blocking mode, we should *not* + // suspend the commit. Pretend as if the suspended component rendered + // null and keep rendering. In the commit phase, we'll schedule a + // subsequent synchronous update to re-render the Suspense. + // + // Note: It doesn't matter whether the component that suspended was + // inside a blocking mode tree. If the Suspense is outside of it, we + // should *not* suspend the commit. + + if ((_workInProgress.mode & BlockingMode) === NoMode) { + _workInProgress.effectTag |= DidCapture; // We're going to commit this fiber even though it didn't complete. + // But we shouldn't call any lifecycle methods or callbacks. Remove + // all lifecycle effect tags. + + sourceFiber.effectTag &= ~(LifecycleEffectMask | Incomplete); + + if (sourceFiber.tag === ClassComponent) { + var currentSourceFiber = sourceFiber.alternate; + + if (currentSourceFiber === null) { + // This is a new mount. Change the tag so it's not mistaken for a + // completed class component. For example, we should not call + // componentWillUnmount if it is deleted. + sourceFiber.tag = IncompleteClassComponent; + } else { + // When we try rendering again, we should not reuse the current fiber, + // since it's known to be in an inconsistent state. Use a force update to + // prevent a bail out. + var update = createUpdate(Sync, null); + update.tag = ForceUpdate; + enqueueUpdate(sourceFiber, update); + } + } // The source fiber did not complete. Mark it with Sync priority to + // indicate that it still has pending work. + + sourceFiber.expirationTime = Sync; // Exit without suspending. + + return; + } // Confirmed that the boundary is in a concurrent mode tree. Continue + // with the normal suspend path. + // + // After this we'll use a set of heuristics to determine whether this + // render pass will run to completion or restart or "suspend" the commit. + // The actual logic for this is spread out in different places. + // + // This first principle is that if we're going to suspend when we complete + // a root, then we should also restart if we get an update or ping that + // might unsuspend it, and vice versa. The only reason to suspend is + // because you think you might want to restart before committing. However, + // it doesn't make sense to restart only while in the period we're suspended. + // + // Restarting too aggressively is also not good because it starves out any + // intermediate loading state. So we use heuristics to determine when. + // Suspense Heuristics + // + // If nothing threw a Promise or all the same fallbacks are already showing, + // then don't suspend/restart. + // + // If this is an initial render of a new tree of Suspense boundaries and + // those trigger a fallback, then don't suspend/restart. We want to ensure + // that we can show the initial loading state as quickly as possible. + // + // If we hit a "Delayed" case, such as when we'd switch from content back into + // a fallback, then we should always suspend/restart. SuspenseConfig applies to + // this case. If none is defined, JND is used instead. + // + // If we're already showing a fallback and it gets "retried", allowing us to show + // another level, but there's still an inner boundary that would show a fallback, + // then we suspend/restart for 500ms since the last time we showed a fallback + // anywhere in the tree. This effectively throttles progressive loading into a + // consistent train of commits. This also gives us an opportunity to restart to + // get to the completed state slightly earlier. + // + // If there's ambiguity due to batching it's resolved in preference of: + // 1) "delayed", 2) "initial render", 3) "retry". + // + // We want to ensure that a "busy" state doesn't get force committed. We want to + // ensure that new initial loading states can commit as soon as possible. + + attachPingListener(root, renderExpirationTime, thenable); + _workInProgress.effectTag |= ShouldCapture; + _workInProgress.expirationTime = renderExpirationTime; + return; + } // This boundary already captured during this render. Continue to the next + // boundary. + + _workInProgress = _workInProgress.return; + } while (_workInProgress !== null); // No boundary was found. Fallthrough to error mode. + // TODO: Use invariant so the message is stripped in prod? + + value = new Error( + (getComponentName(sourceFiber.type) || 'A React component') + + ' suspended while rendering, but no fallback UI was specified.\n' + + '\n' + + 'Add a <Suspense fallback=...> component higher in the tree to ' + + 'provide a loading indicator or placeholder to display.' + + getStackByFiberInDevAndProd(sourceFiber), + ); + } // We didn't find a boundary that could handle this type of exception. Start + // over and traverse parent path again, this time treating the exception + // as an error. + + renderDidError(); + value = createCapturedValue(value, sourceFiber); + var workInProgress = returnFiber; + + do { + switch (workInProgress.tag) { + case HostRoot: { + var _errorInfo = value; + workInProgress.effectTag |= ShouldCapture; + workInProgress.expirationTime = renderExpirationTime; + + var _update = createRootErrorUpdate(workInProgress, _errorInfo, renderExpirationTime); + + enqueueCapturedUpdate(workInProgress, _update); + return; + } + + case ClassComponent: + // Capture and retry + var errorInfo = value; + var ctor = workInProgress.type; + var instance = workInProgress.stateNode; + + if ( + (workInProgress.effectTag & DidCapture) === NoEffect && + (typeof ctor.getDerivedStateFromError === 'function' || + (instance !== null && + typeof instance.componentDidCatch === 'function' && + !isAlreadyFailedLegacyErrorBoundary(instance))) + ) { + workInProgress.effectTag |= ShouldCapture; + workInProgress.expirationTime = renderExpirationTime; // Schedule the error boundary to re-render using updated state + + var _update2 = createClassErrorUpdate(workInProgress, errorInfo, renderExpirationTime); + + enqueueCapturedUpdate(workInProgress, _update2); + return; + } + + break; + + default: + break; + } + + workInProgress = workInProgress.return; + } while (workInProgress !== null); + } + + var ceil = Math.ceil; + var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher; + var ReactCurrentOwner$2 = ReactSharedInternals.ReactCurrentOwner; + var IsSomeRendererActing = ReactSharedInternals.IsSomeRendererActing; + var NoContext = + /* */ + 0; + var BatchedContext = + /* */ + 1; + var EventContext = + /* */ + 2; + var DiscreteEventContext = + /* */ + 4; + var LegacyUnbatchedContext = + /* */ + 8; + var RenderContext = + /* */ + 16; + var CommitContext = + /* */ + 32; + var RootIncomplete = 0; + var RootFatalErrored = 1; + var RootErrored = 2; + var RootSuspended = 3; + var RootSuspendedWithDelay = 4; + var RootCompleted = 5; + // Describes where we are in the React execution stack + var executionContext = NoContext; // The root we're working on + + var workInProgressRoot = null; // The fiber we're working on + + var workInProgress = null; // The expiration time we're rendering + + var renderExpirationTime = NoWork; // Whether to root completed, errored, suspended, etc. + + var workInProgressRootExitStatus = RootIncomplete; // A fatal error, if one is thrown + + var workInProgressRootFatalError = null; // Most recent event time among processed updates during this render. + // This is conceptually a time stamp but expressed in terms of an ExpirationTime + // because we deal mostly with expiration times in the hot path, so this avoids + // the conversion happening in the hot path. + + var workInProgressRootLatestProcessedExpirationTime = Sync; + var workInProgressRootLatestSuspenseTimeout = Sync; + var workInProgressRootCanSuspendUsingConfig = null; // The work left over by components that were visited during this render. Only + // includes unprocessed updates, not work in bailed out children. + + var workInProgressRootNextUnprocessedUpdateTime = NoWork; // If we're pinged while rendering we don't always restart immediately. + // This flag determines if it might be worthwhile to restart if an opportunity + // happens latere. + + var workInProgressRootHasPendingPing = false; // The most recent time we committed a fallback. This lets us ensure a train + // model where we don't commit new loading states in too quick succession. + + var globalMostRecentFallbackTime = 0; + var FALLBACK_THROTTLE_MS = 500; + var nextEffect = null; + var hasUncaughtError = false; + var firstUncaughtError = null; + var legacyErrorBoundariesThatAlreadyFailed = null; + var rootDoesHavePassiveEffects = false; + var rootWithPendingPassiveEffects = null; + var pendingPassiveEffectsRenderPriority = NoPriority; + var pendingPassiveEffectsExpirationTime = NoWork; + var rootsWithPendingDiscreteUpdates = null; // Use these to prevent an infinite loop of nested updates + + var NESTED_UPDATE_LIMIT = 50; + var nestedUpdateCount = 0; + var rootWithNestedUpdates = null; + var NESTED_PASSIVE_UPDATE_LIMIT = 50; + var nestedPassiveUpdateCount = 0; + var interruptedBy = null; // Marks the need to reschedule pending interactions at these expiration times + // during the commit phase. This enables them to be traced across components + // that spawn new work during render. E.g. hidden boundaries, suspended SSR + // hydration or SuspenseList. + + var spawnedWorkDuringRender = null; // Expiration times are computed by adding to the current time (the start + // time). However, if two updates are scheduled within the same event, we + // should treat their start times as simultaneous, even if the actual clock + // time has advanced between the first and second call. + // In other words, because expiration times determine how updates are batched, + // we want all updates of like priority that occur within the same event to + // receive the same expiration time. Otherwise we get tearing. + + var currentEventTime = NoWork; + function requestCurrentTimeForUpdate() { + if ((executionContext & (RenderContext | CommitContext)) !== NoContext) { + // We're inside React, so it's fine to read the actual time. + return msToExpirationTime(now()); + } // We're not inside React, so we may be in the middle of a browser event. + + if (currentEventTime !== NoWork) { + // Use the same start time for all updates until we enter React again. + return currentEventTime; + } // This is the first update since React yielded. Compute a new start time. + + currentEventTime = msToExpirationTime(now()); + return currentEventTime; + } + function getCurrentTime() { + return msToExpirationTime(now()); + } + function computeExpirationForFiber(currentTime, fiber, suspenseConfig) { + var mode = fiber.mode; + + if ((mode & BlockingMode) === NoMode) { + return Sync; + } + + var priorityLevel = getCurrentPriorityLevel(); + + if ((mode & ConcurrentMode) === NoMode) { + return priorityLevel === ImmediatePriority ? Sync : Batched; + } + + if ((executionContext & RenderContext) !== NoContext) { + // Use whatever time we're already rendering + // TODO: Should there be a way to opt out, like with `runWithPriority`? + return renderExpirationTime; + } + + var expirationTime; + + if (suspenseConfig !== null) { + // Compute an expiration time based on the Suspense timeout. + expirationTime = computeSuspenseExpiration( + currentTime, + suspenseConfig.timeoutMs | 0 || LOW_PRIORITY_EXPIRATION, + ); + } else { + // Compute an expiration time based on the Scheduler priority. + switch (priorityLevel) { + case ImmediatePriority: + expirationTime = Sync; + break; + + case UserBlockingPriority$2: + // TODO: Rename this to computeUserBlockingExpiration + expirationTime = computeInteractiveExpiration(currentTime); + break; + + case NormalPriority: + case LowPriority: + // TODO: Handle LowPriority + // TODO: Rename this to... something better. + expirationTime = computeAsyncExpiration(currentTime); + break; + + case IdlePriority: + expirationTime = Idle; + break; + + default: { + { + throw Error('Expected a valid priority level'); + } + } + } + } // If we're in the middle of rendering a tree, do not update at the same + // expiration time that is already rendering. + // TODO: We shouldn't have to do this if the update is on a different root. + // Refactor computeExpirationForFiber + scheduleUpdate so we have access to + // the root when we check for this condition. + + if (workInProgressRoot !== null && expirationTime === renderExpirationTime) { + // This is a trick to move this update into a separate batch + expirationTime -= 1; + } + + return expirationTime; + } + function scheduleUpdateOnFiber(fiber, expirationTime) { + checkForNestedUpdates(); + warnAboutInvalidUpdatesOnClassComponentsInDEV(fiber); + var root = markUpdateTimeFromFiberToRoot(fiber, expirationTime); + + if (root === null) { + warnAboutUpdateOnUnmountedFiberInDEV(fiber); + return; + } + + checkForInterruption(fiber, expirationTime); + recordScheduleUpdate(); // TODO: computeExpirationForFiber also reads the priority. Pass the + // priority as an argument to that function and this one. + + var priorityLevel = getCurrentPriorityLevel(); + + if (expirationTime === Sync) { + if ( + // Check if we're inside unbatchedUpdates + (executionContext & LegacyUnbatchedContext) !== NoContext && // Check if we're not already rendering + (executionContext & (RenderContext | CommitContext)) === NoContext + ) { + // Register pending interactions on the root to avoid losing traced interaction data. + schedulePendingInteractions(root, expirationTime); // This is a legacy edge case. The initial mount of a ReactDOM.render-ed + // root inside of batchedUpdates should be synchronous, but layout updates + // should be deferred until the end of the batch. + + performSyncWorkOnRoot(root); + } else { + ensureRootIsScheduled(root); + schedulePendingInteractions(root, expirationTime); + + if (executionContext === NoContext) { + // Flush the synchronous work now, unless we're already working or inside + // a batch. This is intentionally inside scheduleUpdateOnFiber instead of + // scheduleCallbackForFiber to preserve the ability to schedule a callback + // without immediately flushing it. We only do this for user-initiated + // updates, to preserve historical behavior of legacy mode. + flushSyncCallbackQueue(); + } + } + } else { + ensureRootIsScheduled(root); + schedulePendingInteractions(root, expirationTime); + } + + if ( + (executionContext & DiscreteEventContext) !== NoContext && // Only updates at user-blocking priority or greater are considered + // discrete, even inside a discrete event. + (priorityLevel === UserBlockingPriority$2 || priorityLevel === ImmediatePriority) + ) { + // This is the result of a discrete event. Track the lowest priority + // discrete update per root so we can flush them early, if needed. + if (rootsWithPendingDiscreteUpdates === null) { + rootsWithPendingDiscreteUpdates = new Map([[root, expirationTime]]); + } else { + var lastDiscreteTime = rootsWithPendingDiscreteUpdates.get(root); + + if (lastDiscreteTime === undefined || lastDiscreteTime > expirationTime) { + rootsWithPendingDiscreteUpdates.set(root, expirationTime); + } + } + } + } + var scheduleWork = scheduleUpdateOnFiber; // This is split into a separate function so we can mark a fiber with pending + // work without treating it as a typical update that originates from an event; + // e.g. retrying a Suspense boundary isn't an update, but it does schedule work + // on a fiber. + + function markUpdateTimeFromFiberToRoot(fiber, expirationTime) { + // Update the source fiber's expiration time + if (fiber.expirationTime < expirationTime) { + fiber.expirationTime = expirationTime; + } + + var alternate = fiber.alternate; + + if (alternate !== null && alternate.expirationTime < expirationTime) { + alternate.expirationTime = expirationTime; + } // Walk the parent path to the root and update the child expiration time. + + var node = fiber.return; + var root = null; + + if (node === null && fiber.tag === HostRoot) { + root = fiber.stateNode; + } else { + while (node !== null) { + alternate = node.alternate; + + if (node.childExpirationTime < expirationTime) { + node.childExpirationTime = expirationTime; + + if (alternate !== null && alternate.childExpirationTime < expirationTime) { + alternate.childExpirationTime = expirationTime; + } + } else if (alternate !== null && alternate.childExpirationTime < expirationTime) { + alternate.childExpirationTime = expirationTime; + } + + if (node.return === null && node.tag === HostRoot) { + root = node.stateNode; + break; + } + + node = node.return; + } + } + + if (root !== null) { + if (workInProgressRoot === root) { + // Received an update to a tree that's in the middle of rendering. Mark + // that's unprocessed work on this root. + markUnprocessedUpdateTime(expirationTime); + + if (workInProgressRootExitStatus === RootSuspendedWithDelay) { + // The root already suspended with a delay, which means this render + // definitely won't finish. Since we have a new update, let's mark it as + // suspended now, right before marking the incoming update. This has the + // effect of interrupting the current render and switching to the update. + // TODO: This happens to work when receiving an update during the render + // phase, because of the trick inside computeExpirationForFiber to + // subtract 1 from `renderExpirationTime` to move it into a + // separate bucket. But we should probably model it with an exception, + // using the same mechanism we use to force hydration of a subtree. + // TODO: This does not account for low pri updates that were already + // scheduled before the root started rendering. Need to track the next + // pending expiration time (perhaps by backtracking the return path) and + // then trigger a restart in the `renderDidSuspendDelayIfPossible` path. + markRootSuspendedAtTime(root, renderExpirationTime); + } + } // Mark that the root has a pending update. + + markRootUpdatedAtTime(root, expirationTime); + } + + return root; + } + + function getNextRootExpirationTimeToWorkOn(root) { + // Determines the next expiration time that the root should render, taking + // into account levels that may be suspended, or levels that may have + // received a ping. + var lastExpiredTime = root.lastExpiredTime; + + if (lastExpiredTime !== NoWork) { + return lastExpiredTime; + } // "Pending" refers to any update that hasn't committed yet, including if it + // suspended. The "suspended" range is therefore a subset. + + var firstPendingTime = root.firstPendingTime; + + if (!isRootSuspendedAtTime(root, firstPendingTime)) { + // The highest priority pending time is not suspended. Let's work on that. + return firstPendingTime; + } // If the first pending time is suspended, check if there's a lower priority + // pending level that we know about. Or check if we received a ping. Work + // on whichever is higher priority. + + var lastPingedTime = root.lastPingedTime; + var nextKnownPendingLevel = root.nextKnownPendingLevel; + return lastPingedTime > nextKnownPendingLevel ? lastPingedTime : nextKnownPendingLevel; + } // Use this function to schedule a task for a root. There's only one task per + // root; if a task was already scheduled, we'll check to make sure the + // expiration time of the existing task is the same as the expiration time of + // the next level that the root has work on. This function is called on every + // update, and right before exiting a task. + + function ensureRootIsScheduled(root) { + var lastExpiredTime = root.lastExpiredTime; + + if (lastExpiredTime !== NoWork) { + // Special case: Expired work should flush synchronously. + root.callbackExpirationTime = Sync; + root.callbackPriority = ImmediatePriority; + root.callbackNode = scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root)); + return; + } + + var expirationTime = getNextRootExpirationTimeToWorkOn(root); + var existingCallbackNode = root.callbackNode; + + if (expirationTime === NoWork) { + // There's nothing to work on. + if (existingCallbackNode !== null) { + root.callbackNode = null; + root.callbackExpirationTime = NoWork; + root.callbackPriority = NoPriority; + } + + return; + } // TODO: If this is an update, we already read the current time. Pass the + // time as an argument. + + var currentTime = requestCurrentTimeForUpdate(); + var priorityLevel = inferPriorityFromExpirationTime(currentTime, expirationTime); // If there's an existing render task, confirm it has the correct priority and + // expiration time. Otherwise, we'll cancel it and schedule a new one. + + if (existingCallbackNode !== null) { + var existingCallbackPriority = root.callbackPriority; + var existingCallbackExpirationTime = root.callbackExpirationTime; + + if ( + // Callback must have the exact same expiration time. + existingCallbackExpirationTime === expirationTime && // Callback must have greater or equal priority. + existingCallbackPriority >= priorityLevel + ) { + // Existing callback is sufficient. + return; + } // Need to schedule a new task. + // TODO: Instead of scheduling a new task, we should be able to change the + // priority of the existing one. + + cancelCallback(existingCallbackNode); + } + + root.callbackExpirationTime = expirationTime; + root.callbackPriority = priorityLevel; + var callbackNode; + + if (expirationTime === Sync) { + // Sync React callbacks are scheduled on a special internal queue + callbackNode = scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root)); + } else if (disableSchedulerTimeoutBasedOnReactExpirationTime) { + callbackNode = scheduleCallback(priorityLevel, performConcurrentWorkOnRoot.bind(null, root)); + } else { + callbackNode = scheduleCallback( + priorityLevel, + performConcurrentWorkOnRoot.bind(null, root), // Compute a task timeout based on the expiration time. This also affects + // ordering because tasks are processed in timeout order. + { + timeout: expirationTimeToMs(expirationTime) - now(), + }, + ); + } + + root.callbackNode = callbackNode; + } // This is the entry point for every concurrent task, i.e. anything that + // goes through Scheduler. + + function performConcurrentWorkOnRoot(root, didTimeout) { + // Since we know we're in a React event, we can clear the current + // event time. The next update will compute a new event time. + currentEventTime = NoWork; + + if (didTimeout) { + // The render task took too long to complete. Mark the current time as + // expired to synchronously render all expired work in a single batch. + var currentTime = requestCurrentTimeForUpdate(); + markRootExpiredAtTime(root, currentTime); // This will schedule a synchronous callback. + + ensureRootIsScheduled(root); + return null; + } // Determine the next expiration time to work on, using the fields stored + // on the root. + + var expirationTime = getNextRootExpirationTimeToWorkOn(root); + + if (expirationTime !== NoWork) { + var originalCallbackNode = root.callbackNode; + + if (!((executionContext & (RenderContext | CommitContext)) === NoContext)) { + { + throw Error('Should not already be working.'); + } + } + + flushPassiveEffects(); // If the root or expiration time have changed, throw out the existing stack + // and prepare a fresh one. Otherwise we'll continue where we left off. + + if (root !== workInProgressRoot || expirationTime !== renderExpirationTime) { + prepareFreshStack(root, expirationTime); + startWorkOnPendingInteractions(root, expirationTime); + } // If we have a work-in-progress fiber, it means there's still work to do + // in this root. + + if (workInProgress !== null) { + var prevExecutionContext = executionContext; + executionContext |= RenderContext; + var prevDispatcher = pushDispatcher(root); + var prevInteractions = pushInteractions(root); + startWorkLoopTimer(workInProgress); + + do { + try { + workLoopConcurrent(); + break; + } catch (thrownValue) { + handleError(root, thrownValue); + } + } while (true); + + resetContextDependencies(); + executionContext = prevExecutionContext; + popDispatcher(prevDispatcher); + + if (enableSchedulerTracing) { + popInteractions(prevInteractions); + } + + if (workInProgressRootExitStatus === RootFatalErrored) { + var fatalError = workInProgressRootFatalError; + stopInterruptedWorkLoopTimer(); + prepareFreshStack(root, expirationTime); + markRootSuspendedAtTime(root, expirationTime); + ensureRootIsScheduled(root); + throw fatalError; + } + + if (workInProgress !== null) { + // There's still work left over. Exit without committing. + stopInterruptedWorkLoopTimer(); + } else { + // We now have a consistent tree. The next step is either to commit it, + // or, if something suspended, wait to commit it after a timeout. + stopFinishedWorkLoopTimer(); + var finishedWork = (root.finishedWork = root.current.alternate); + root.finishedExpirationTime = expirationTime; + finishConcurrentRender(root, finishedWork, workInProgressRootExitStatus, expirationTime); + } + + ensureRootIsScheduled(root); + + if (root.callbackNode === originalCallbackNode) { + // The task node scheduled for this root is the same one that's + // currently executed. Need to return a continuation. + return performConcurrentWorkOnRoot.bind(null, root); + } + } + } + + return null; + } + + function finishConcurrentRender(root, finishedWork, exitStatus, expirationTime) { + // Set this to null to indicate there's no in-progress render. + workInProgressRoot = null; + + switch (exitStatus) { + case RootIncomplete: + case RootFatalErrored: { + { + { + throw Error('Root did not complete. This is a bug in React.'); + } + } + } + // Flow knows about invariant, so it complains if I add a break + // statement, but eslint doesn't know about invariant, so it complains + // if I do. eslint-disable-next-line no-fallthrough + + case RootErrored: { + // If this was an async render, the error may have happened due to + // a mutation in a concurrent event. Try rendering one more time, + // synchronously, to see if the error goes away. If there are + // lower priority updates, let's include those, too, in case they + // fix the inconsistency. Render at Idle to include all updates. + // If it was Idle or Never or some not-yet-invented time, render + // at that time. + markRootExpiredAtTime(root, expirationTime > Idle ? Idle : expirationTime); // We assume that this second render pass will be synchronous + // and therefore not hit this path again. + + break; + } + + case RootSuspended: { + markRootSuspendedAtTime(root, expirationTime); + var lastSuspendedTime = root.lastSuspendedTime; + + if (expirationTime === lastSuspendedTime) { + root.nextKnownPendingLevel = getRemainingExpirationTime(finishedWork); + } + + flushSuspensePriorityWarningInDEV(); // We have an acceptable loading state. We need to figure out if we + // should immediately commit it or wait a bit. + // If we have processed new updates during this render, we may now + // have a new loading state ready. We want to ensure that we commit + // that as soon as possible. + + var hasNotProcessedNewUpdates = workInProgressRootLatestProcessedExpirationTime === Sync; + + if ( + hasNotProcessedNewUpdates && // do not delay if we're inside an act() scope + !(true && flushSuspenseFallbacksInTests && IsThisRendererActing.current) + ) { + // If we have not processed any new updates during this pass, then + // this is either a retry of an existing fallback state or a + // hidden tree. Hidden trees shouldn't be batched with other work + // and after that's fixed it can only be a retry. We're going to + // throttle committing retries so that we don't show too many + // loading states too quickly. + var msUntilTimeout = globalMostRecentFallbackTime + FALLBACK_THROTTLE_MS - now(); // Don't bother with a very short suspense time. + + if (msUntilTimeout > 10) { + if (workInProgressRootHasPendingPing) { + var lastPingedTime = root.lastPingedTime; + + if (lastPingedTime === NoWork || lastPingedTime >= expirationTime) { + // This render was pinged but we didn't get to restart + // earlier so try restarting now instead. + root.lastPingedTime = expirationTime; + prepareFreshStack(root, expirationTime); + break; + } + } + + var nextTime = getNextRootExpirationTimeToWorkOn(root); + + if (nextTime !== NoWork && nextTime !== expirationTime) { + // There's additional work on this root. + break; + } + + if (lastSuspendedTime !== NoWork && lastSuspendedTime !== expirationTime) { + // We should prefer to render the fallback of at the last + // suspended level. Ping the last suspended level to try + // rendering it again. + root.lastPingedTime = lastSuspendedTime; + break; + } // The render is suspended, it hasn't timed out, and there's no + // lower priority work to do. Instead of committing the fallback + // immediately, wait for more data to arrive. + + root.timeoutHandle = scheduleTimeout(commitRoot.bind(null, root), msUntilTimeout); + break; + } + } // The work expired. Commit immediately. + + commitRoot(root); + break; + } + + case RootSuspendedWithDelay: { + markRootSuspendedAtTime(root, expirationTime); + var _lastSuspendedTime = root.lastSuspendedTime; + + if (expirationTime === _lastSuspendedTime) { + root.nextKnownPendingLevel = getRemainingExpirationTime(finishedWork); + } + + flushSuspensePriorityWarningInDEV(); + + if ( + // do not delay if we're inside an act() scope + !(true && flushSuspenseFallbacksInTests && IsThisRendererActing.current) + ) { + // We're suspended in a state that should be avoided. We'll try to + // avoid committing it for as long as the timeouts let us. + if (workInProgressRootHasPendingPing) { + var _lastPingedTime = root.lastPingedTime; + + if (_lastPingedTime === NoWork || _lastPingedTime >= expirationTime) { + // This render was pinged but we didn't get to restart earlier + // so try restarting now instead. + root.lastPingedTime = expirationTime; + prepareFreshStack(root, expirationTime); + break; + } + } + + var _nextTime = getNextRootExpirationTimeToWorkOn(root); + + if (_nextTime !== NoWork && _nextTime !== expirationTime) { + // There's additional work on this root. + break; + } + + if (_lastSuspendedTime !== NoWork && _lastSuspendedTime !== expirationTime) { + // We should prefer to render the fallback of at the last + // suspended level. Ping the last suspended level to try + // rendering it again. + root.lastPingedTime = _lastSuspendedTime; + break; + } + + var _msUntilTimeout; + + if (workInProgressRootLatestSuspenseTimeout !== Sync) { + // We have processed a suspense config whose expiration time we + // can use as the timeout. + _msUntilTimeout = expirationTimeToMs(workInProgressRootLatestSuspenseTimeout) - now(); + } else if (workInProgressRootLatestProcessedExpirationTime === Sync) { + // This should never normally happen because only new updates + // cause delayed states, so we should have processed something. + // However, this could also happen in an offscreen tree. + _msUntilTimeout = 0; + } else { + // If we don't have a suspense config, we're going to use a + // heuristic to determine how long we can suspend. + var eventTimeMs = inferTimeFromExpirationTime( + workInProgressRootLatestProcessedExpirationTime, + ); + var currentTimeMs = now(); + var timeUntilExpirationMs = expirationTimeToMs(expirationTime) - currentTimeMs; + var timeElapsed = currentTimeMs - eventTimeMs; + + if (timeElapsed < 0) { + // We get this wrong some time since we estimate the time. + timeElapsed = 0; + } + + _msUntilTimeout = jnd(timeElapsed) - timeElapsed; // Clamp the timeout to the expiration time. TODO: Once the + // event time is exact instead of inferred from expiration time + // we don't need this. + + if (timeUntilExpirationMs < _msUntilTimeout) { + _msUntilTimeout = timeUntilExpirationMs; + } + } // Don't bother with a very short suspense time. + + if (_msUntilTimeout > 10) { + // The render is suspended, it hasn't timed out, and there's no + // lower priority work to do. Instead of committing the fallback + // immediately, wait for more data to arrive. + root.timeoutHandle = scheduleTimeout(commitRoot.bind(null, root), _msUntilTimeout); + break; + } + } // The work expired. Commit immediately. + + commitRoot(root); + break; + } + + case RootCompleted: { + // The work completed. Ready to commit. + if ( + // do not delay if we're inside an act() scope + !(true && flushSuspenseFallbacksInTests && IsThisRendererActing.current) && + workInProgressRootLatestProcessedExpirationTime !== Sync && + workInProgressRootCanSuspendUsingConfig !== null + ) { + // If we have exceeded the minimum loading delay, which probably + // means we have shown a spinner already, we might have to suspend + // a bit longer to ensure that the spinner is shown for + // enough time. + var _msUntilTimeout2 = computeMsUntilSuspenseLoadingDelay( + workInProgressRootLatestProcessedExpirationTime, + expirationTime, + workInProgressRootCanSuspendUsingConfig, + ); + + if (_msUntilTimeout2 > 10) { + markRootSuspendedAtTime(root, expirationTime); + root.timeoutHandle = scheduleTimeout(commitRoot.bind(null, root), _msUntilTimeout2); + break; + } + } + + commitRoot(root); + break; + } + + default: { + { + { + throw Error('Unknown root exit status.'); + } + } + } + } + } // This is the entry point for synchronous tasks that don't go + // through Scheduler + + function performSyncWorkOnRoot(root) { + // Check if there's expired work on this root. Otherwise, render at Sync. + var lastExpiredTime = root.lastExpiredTime; + var expirationTime = lastExpiredTime !== NoWork ? lastExpiredTime : Sync; + + if (root.finishedExpirationTime === expirationTime) { + // There's already a pending commit at this expiration time. + // TODO: This is poorly factored. This case only exists for the + // batch.commit() API. + commitRoot(root); + } else { + if (!((executionContext & (RenderContext | CommitContext)) === NoContext)) { + { + throw Error('Should not already be working.'); + } + } + + flushPassiveEffects(); // If the root or expiration time have changed, throw out the existing stack + // and prepare a fresh one. Otherwise we'll continue where we left off. + + if (root !== workInProgressRoot || expirationTime !== renderExpirationTime) { + prepareFreshStack(root, expirationTime); + startWorkOnPendingInteractions(root, expirationTime); + } // If we have a work-in-progress fiber, it means there's still work to do + // in this root. + + if (workInProgress !== null) { + var prevExecutionContext = executionContext; + executionContext |= RenderContext; + var prevDispatcher = pushDispatcher(root); + var prevInteractions = pushInteractions(root); + startWorkLoopTimer(workInProgress); + + do { + try { + workLoopSync(); + break; + } catch (thrownValue) { + handleError(root, thrownValue); + } + } while (true); + + resetContextDependencies(); + executionContext = prevExecutionContext; + popDispatcher(prevDispatcher); + + if (enableSchedulerTracing) { + popInteractions(prevInteractions); + } + + if (workInProgressRootExitStatus === RootFatalErrored) { + var fatalError = workInProgressRootFatalError; + stopInterruptedWorkLoopTimer(); + prepareFreshStack(root, expirationTime); + markRootSuspendedAtTime(root, expirationTime); + ensureRootIsScheduled(root); + throw fatalError; + } + + if (workInProgress !== null) { + // This is a sync render, so we should have finished the whole tree. + { + { + throw Error( + 'Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + } else { + // We now have a consistent tree. Because this is a sync render, we + // will commit it even if something suspended. + stopFinishedWorkLoopTimer(); + root.finishedWork = root.current.alternate; + root.finishedExpirationTime = expirationTime; + finishSyncRender(root, workInProgressRootExitStatus, expirationTime); + } // Before exiting, make sure there's a callback scheduled for the next + // pending level. + + ensureRootIsScheduled(root); + } + } + + return null; + } + + function finishSyncRender(root, exitStatus, expirationTime) { + // Set this to null to indicate there's no in-progress render. + workInProgressRoot = null; + + { + if (exitStatus === RootSuspended || exitStatus === RootSuspendedWithDelay) { + flushSuspensePriorityWarningInDEV(); + } + } + + commitRoot(root); + } + + function flushRoot(root, expirationTime) { + markRootExpiredAtTime(root, expirationTime); + ensureRootIsScheduled(root); + + if ((executionContext & (RenderContext | CommitContext)) === NoContext) { + flushSyncCallbackQueue(); + } + } + function flushDiscreteUpdates() { + // TODO: Should be able to flush inside batchedUpdates, but not inside `act`. + // However, `act` uses `batchedUpdates`, so there's no way to distinguish + // those two cases. Need to fix this before exposing flushDiscreteUpdates + // as a public API. + if ((executionContext & (BatchedContext | RenderContext | CommitContext)) !== NoContext) { + if (true && (executionContext & RenderContext) !== NoContext) { + warning$1( + false, + 'unstable_flushDiscreteUpdates: Cannot flush updates when React is ' + 'already rendering.', + ); + } // We're already rendering, so we can't synchronously flush pending work. + // This is probably a nested event dispatch triggered by a lifecycle/effect, + // like `el.focus()`. Exit. + + return; + } + + flushPendingDiscreteUpdates(); // If the discrete updates scheduled passive effects, flush them now so that + // they fire before the next serial event. + + flushPassiveEffects(); + } + + function syncUpdates(fn, a, b, c) { + return runWithPriority$2(ImmediatePriority, fn.bind(null, a, b, c)); + } + + function flushPendingDiscreteUpdates() { + if (rootsWithPendingDiscreteUpdates !== null) { + // For each root with pending discrete updates, schedule a callback to + // immediately flush them. + var roots = rootsWithPendingDiscreteUpdates; + rootsWithPendingDiscreteUpdates = null; + roots.forEach(function (expirationTime, root) { + markRootExpiredAtTime(root, expirationTime); + ensureRootIsScheduled(root); + }); // Now flush the immediate queue. + + flushSyncCallbackQueue(); + } + } + + function batchedUpdates$1(fn, a) { + var prevExecutionContext = executionContext; + executionContext |= BatchedContext; + + try { + return fn(a); + } finally { + executionContext = prevExecutionContext; + + if (executionContext === NoContext) { + // Flush the immediate callbacks that were scheduled during this batch + flushSyncCallbackQueue(); + } + } + } + function batchedEventUpdates$1(fn, a) { + var prevExecutionContext = executionContext; + executionContext |= EventContext; + + try { + return fn(a); + } finally { + executionContext = prevExecutionContext; + + if (executionContext === NoContext) { + // Flush the immediate callbacks that were scheduled during this batch + flushSyncCallbackQueue(); + } + } + } + function discreteUpdates$1(fn, a, b, c) { + var prevExecutionContext = executionContext; + executionContext |= DiscreteEventContext; + + try { + // Should this + return runWithPriority$2(UserBlockingPriority$2, fn.bind(null, a, b, c)); + } finally { + executionContext = prevExecutionContext; + + if (executionContext === NoContext) { + // Flush the immediate callbacks that were scheduled during this batch + flushSyncCallbackQueue(); + } + } + } + function unbatchedUpdates(fn, a) { + var prevExecutionContext = executionContext; + executionContext &= ~BatchedContext; + executionContext |= LegacyUnbatchedContext; + + try { + return fn(a); + } finally { + executionContext = prevExecutionContext; + + if (executionContext === NoContext) { + // Flush the immediate callbacks that were scheduled during this batch + flushSyncCallbackQueue(); + } + } + } + function flushSync(fn, a) { + if ((executionContext & (RenderContext | CommitContext)) !== NoContext) { + { + { + throw Error( + 'flushSync was called from inside a lifecycle method. It cannot be called when React is already rendering.', + ); + } + } + } + + var prevExecutionContext = executionContext; + executionContext |= BatchedContext; + + try { + return runWithPriority$2(ImmediatePriority, fn.bind(null, a)); + } finally { + executionContext = prevExecutionContext; // Flush the immediate callbacks that were scheduled during this batch. + // Note that this will happen even if batchedUpdates is higher up + // the stack. + + flushSyncCallbackQueue(); + } + } + function flushControlled(fn) { + var prevExecutionContext = executionContext; + executionContext |= BatchedContext; + + try { + runWithPriority$2(ImmediatePriority, fn); + } finally { + executionContext = prevExecutionContext; + + if (executionContext === NoContext) { + // Flush the immediate callbacks that were scheduled during this batch + flushSyncCallbackQueue(); + } + } + } + + function prepareFreshStack(root, expirationTime) { + root.finishedWork = null; + root.finishedExpirationTime = NoWork; + var timeoutHandle = root.timeoutHandle; + + if (timeoutHandle !== noTimeout) { + // The root previous suspended and scheduled a timeout to commit a fallback + // state. Now that we have additional work, cancel the timeout. + root.timeoutHandle = noTimeout; // $FlowFixMe Complains noTimeout is not a TimeoutID, despite the check above + + cancelTimeout(timeoutHandle); + } + + if (workInProgress !== null) { + var interruptedWork = workInProgress.return; + + while (interruptedWork !== null) { + unwindInterruptedWork(interruptedWork); + interruptedWork = interruptedWork.return; + } + } + + workInProgressRoot = root; + workInProgress = createWorkInProgress(root.current, null, expirationTime); + renderExpirationTime = expirationTime; + workInProgressRootExitStatus = RootIncomplete; + workInProgressRootFatalError = null; + workInProgressRootLatestProcessedExpirationTime = Sync; + workInProgressRootLatestSuspenseTimeout = Sync; + workInProgressRootCanSuspendUsingConfig = null; + workInProgressRootNextUnprocessedUpdateTime = NoWork; + workInProgressRootHasPendingPing = false; + + if (enableSchedulerTracing) { + spawnedWorkDuringRender = null; + } + + { + ReactStrictModeWarnings.discardPendingWarnings(); + componentsThatTriggeredHighPriSuspend = null; + } + } + + function handleError(root, thrownValue) { + do { + try { + // Reset module-level state that was set during the render phase. + resetContextDependencies(); + resetHooks(); + resetCurrentFiber(); + + if (workInProgress === null || workInProgress.return === null) { + // Expected to be working on a non-root fiber. This is a fatal error + // because there's no ancestor that can handle it; the root is + // supposed to capture all errors that weren't caught by an error + // boundary. + workInProgressRootExitStatus = RootFatalErrored; + workInProgressRootFatalError = thrownValue; + return null; + } + + if (enableProfilerTimer && workInProgress.mode & ProfileMode) { + // Record the time spent rendering before an error was thrown. This + // avoids inaccurate Profiler durations in the case of a + // suspended render. + stopProfilerTimerIfRunningAndRecordDelta(workInProgress, true); + } + + throwException( + root, + workInProgress.return, + workInProgress, + thrownValue, + renderExpirationTime, + ); + workInProgress = completeUnitOfWork(workInProgress); + } catch (yetAnotherThrownValue) { + // Something in the return path also threw. + thrownValue = yetAnotherThrownValue; + continue; + } // Return to the normal work loop. + + return; + } while (true); + } + + function pushDispatcher(root) { + var prevDispatcher = ReactCurrentDispatcher.current; + ReactCurrentDispatcher.current = ContextOnlyDispatcher; + + if (prevDispatcher === null) { + // The React isomorphic package does not include a default dispatcher. + // Instead the first renderer will lazily attach one, in order to give + // nicer error messages. + return ContextOnlyDispatcher; + } else { + return prevDispatcher; + } + } + + function popDispatcher(prevDispatcher) { + ReactCurrentDispatcher.current = prevDispatcher; + } + + function pushInteractions(root) { + if (enableSchedulerTracing) { + var prevInteractions = tracing.__interactionsRef.current; + tracing.__interactionsRef.current = root.memoizedInteractions; + return prevInteractions; + } + + return null; + } + + function popInteractions(prevInteractions) { + if (enableSchedulerTracing) { + tracing.__interactionsRef.current = prevInteractions; + } + } + + function markCommitTimeOfFallback() { + globalMostRecentFallbackTime = now(); + } + function markRenderEventTimeAndConfig(expirationTime, suspenseConfig) { + if (expirationTime < workInProgressRootLatestProcessedExpirationTime && expirationTime > Idle) { + workInProgressRootLatestProcessedExpirationTime = expirationTime; + } + + if (suspenseConfig !== null) { + if (expirationTime < workInProgressRootLatestSuspenseTimeout && expirationTime > Idle) { + workInProgressRootLatestSuspenseTimeout = expirationTime; // Most of the time we only have one config and getting wrong is not bad. + + workInProgressRootCanSuspendUsingConfig = suspenseConfig; + } + } + } + function markUnprocessedUpdateTime(expirationTime) { + if (expirationTime > workInProgressRootNextUnprocessedUpdateTime) { + workInProgressRootNextUnprocessedUpdateTime = expirationTime; + } + } + function renderDidSuspend() { + if (workInProgressRootExitStatus === RootIncomplete) { + workInProgressRootExitStatus = RootSuspended; + } + } + function renderDidSuspendDelayIfPossible() { + if ( + workInProgressRootExitStatus === RootIncomplete || + workInProgressRootExitStatus === RootSuspended + ) { + workInProgressRootExitStatus = RootSuspendedWithDelay; + } // Check if there's a lower priority update somewhere else in the tree. + + if (workInProgressRootNextUnprocessedUpdateTime !== NoWork && workInProgressRoot !== null) { + // Mark the current render as suspended, and then mark that there's a + // pending update. + // TODO: This should immediately interrupt the current render, instead + // of waiting until the next time we yield. + markRootSuspendedAtTime(workInProgressRoot, renderExpirationTime); + markRootUpdatedAtTime(workInProgressRoot, workInProgressRootNextUnprocessedUpdateTime); + } + } + function renderDidError() { + if (workInProgressRootExitStatus !== RootCompleted) { + workInProgressRootExitStatus = RootErrored; + } + } // Called during render to determine if anything has suspended. + // Returns false if we're not sure. + + function renderHasNotSuspendedYet() { + // If something errored or completed, we can't really be sure, + // so those are false. + return workInProgressRootExitStatus === RootIncomplete; + } + + function inferTimeFromExpirationTime(expirationTime) { + // We don't know exactly when the update was scheduled, but we can infer an + // approximate start time from the expiration time. + var earliestExpirationTimeMs = expirationTimeToMs(expirationTime); + return earliestExpirationTimeMs - LOW_PRIORITY_EXPIRATION; + } + + function inferTimeFromExpirationTimeWithSuspenseConfig(expirationTime, suspenseConfig) { + // We don't know exactly when the update was scheduled, but we can infer an + // approximate start time from the expiration time by subtracting the timeout + // that was added to the event time. + var earliestExpirationTimeMs = expirationTimeToMs(expirationTime); + return earliestExpirationTimeMs - (suspenseConfig.timeoutMs | 0 || LOW_PRIORITY_EXPIRATION); + } // The work loop is an extremely hot path. Tell Closure not to inline it. + + /** @noinline */ + + function workLoopSync() { + // Already timed out, so perform work without checking if we need to yield. + while (workInProgress !== null) { + workInProgress = performUnitOfWork(workInProgress); + } + } + /** @noinline */ + + function workLoopConcurrent() { + // Perform work until Scheduler asks us to yield + while (workInProgress !== null && !shouldYield()) { + workInProgress = performUnitOfWork(workInProgress); + } + } + + function performUnitOfWork(unitOfWork) { + // The current, flushed, state of this fiber is the alternate. Ideally + // nothing should rely on this, but relying on it here means that we don't + // need an additional field on the work in progress. + var current$$1 = unitOfWork.alternate; + startWorkTimer(unitOfWork); + setCurrentFiber(unitOfWork); + var next; + + if (enableProfilerTimer && (unitOfWork.mode & ProfileMode) !== NoMode) { + startProfilerTimer(unitOfWork); + next = beginWork$$1(current$$1, unitOfWork, renderExpirationTime); + stopProfilerTimerIfRunningAndRecordDelta(unitOfWork, true); + } else { + next = beginWork$$1(current$$1, unitOfWork, renderExpirationTime); + } + + resetCurrentFiber(); + unitOfWork.memoizedProps = unitOfWork.pendingProps; + + if (next === null) { + // If this doesn't spawn new work, complete the current work. + next = completeUnitOfWork(unitOfWork); + } + + ReactCurrentOwner$2.current = null; + return next; + } + + function completeUnitOfWork(unitOfWork) { + // Attempt to complete the current unit of work, then move to the next + // sibling. If there are no more siblings, return to the parent fiber. + workInProgress = unitOfWork; + + do { + // The current, flushed, state of this fiber is the alternate. Ideally + // nothing should rely on this, but relying on it here means that we don't + // need an additional field on the work in progress. + var current$$1 = workInProgress.alternate; + var returnFiber = workInProgress.return; // Check if the work completed or if something threw. + + if ((workInProgress.effectTag & Incomplete) === NoEffect) { + setCurrentFiber(workInProgress); + var next = void 0; + + if (!enableProfilerTimer || (workInProgress.mode & ProfileMode) === NoMode) { + next = completeWork(current$$1, workInProgress, renderExpirationTime); + } else { + startProfilerTimer(workInProgress); + next = completeWork(current$$1, workInProgress, renderExpirationTime); // Update render duration assuming we didn't error. + + stopProfilerTimerIfRunningAndRecordDelta(workInProgress, false); + } + + stopWorkTimer(workInProgress); + resetCurrentFiber(); + resetChildExpirationTime(workInProgress); + + if (next !== null) { + // Completing this fiber spawned new work. Work on that next. + return next; + } + + if ( + returnFiber !== null && // Do not append effects to parents if a sibling failed to complete + (returnFiber.effectTag & Incomplete) === NoEffect + ) { + // Append all the effects of the subtree and this fiber onto the effect + // list of the parent. The completion order of the children affects the + // side-effect order. + if (returnFiber.firstEffect === null) { + returnFiber.firstEffect = workInProgress.firstEffect; + } + + if (workInProgress.lastEffect !== null) { + if (returnFiber.lastEffect !== null) { + returnFiber.lastEffect.nextEffect = workInProgress.firstEffect; + } + + returnFiber.lastEffect = workInProgress.lastEffect; + } // If this fiber had side-effects, we append it AFTER the children's + // side-effects. We can perform certain side-effects earlier if needed, + // by doing multiple passes over the effect list. We don't want to + // schedule our own side-effect on our own list because if end up + // reusing children we'll schedule this effect onto itself since we're + // at the end. + + var effectTag = workInProgress.effectTag; // Skip both NoWork and PerformedWork tags when creating the effect + // list. PerformedWork effect is read by React DevTools but shouldn't be + // committed. + + if (effectTag > PerformedWork) { + if (returnFiber.lastEffect !== null) { + returnFiber.lastEffect.nextEffect = workInProgress; + } else { + returnFiber.firstEffect = workInProgress; + } + + returnFiber.lastEffect = workInProgress; + } + } + } else { + // This fiber did not complete because something threw. Pop values off + // the stack without entering the complete phase. If this is a boundary, + // capture values if possible. + var _next = unwindWork(workInProgress, renderExpirationTime); // Because this fiber did not complete, don't reset its expiration time. + + if (enableProfilerTimer && (workInProgress.mode & ProfileMode) !== NoMode) { + // Record the render duration for the fiber that errored. + stopProfilerTimerIfRunningAndRecordDelta(workInProgress, false); // Include the time spent working on failed children before continuing. + + var actualDuration = workInProgress.actualDuration; + var child = workInProgress.child; + + while (child !== null) { + actualDuration += child.actualDuration; + child = child.sibling; + } + + workInProgress.actualDuration = actualDuration; + } + + if (_next !== null) { + // If completing this work spawned new work, do that next. We'll come + // back here again. + // Since we're restarting, remove anything that is not a host effect + // from the effect tag. + // TODO: The name stopFailedWorkTimer is misleading because Suspense + // also captures and restarts. + stopFailedWorkTimer(workInProgress); + _next.effectTag &= HostEffectMask; + return _next; + } + + stopWorkTimer(workInProgress); + + if (returnFiber !== null) { + // Mark the parent fiber as incomplete and clear its effect list. + returnFiber.firstEffect = returnFiber.lastEffect = null; + returnFiber.effectTag |= Incomplete; + } + } + + var siblingFiber = workInProgress.sibling; + + if (siblingFiber !== null) { + // If there is more work to do in this returnFiber, do that next. + return siblingFiber; + } // Otherwise, return to the parent + + workInProgress = returnFiber; + } while (workInProgress !== null); // We've reached the root. + + if (workInProgressRootExitStatus === RootIncomplete) { + workInProgressRootExitStatus = RootCompleted; + } + + return null; + } + + function getRemainingExpirationTime(fiber) { + var updateExpirationTime = fiber.expirationTime; + var childExpirationTime = fiber.childExpirationTime; + return updateExpirationTime > childExpirationTime ? updateExpirationTime : childExpirationTime; + } + + function resetChildExpirationTime(completedWork) { + if (renderExpirationTime !== Never && completedWork.childExpirationTime === Never) { + // The children of this component are hidden. Don't bubble their + // expiration times. + return; + } + + var newChildExpirationTime = NoWork; // Bubble up the earliest expiration time. + + if (enableProfilerTimer && (completedWork.mode & ProfileMode) !== NoMode) { + // In profiling mode, resetChildExpirationTime is also used to reset + // profiler durations. + var actualDuration = completedWork.actualDuration; + var treeBaseDuration = completedWork.selfBaseDuration; // When a fiber is cloned, its actualDuration is reset to 0. This value will + // only be updated if work is done on the fiber (i.e. it doesn't bailout). + // When work is done, it should bubble to the parent's actualDuration. If + // the fiber has not been cloned though, (meaning no work was done), then + // this value will reflect the amount of time spent working on a previous + // render. In that case it should not bubble. We determine whether it was + // cloned by comparing the child pointer. + + var shouldBubbleActualDurations = + completedWork.alternate === null || completedWork.child !== completedWork.alternate.child; + var child = completedWork.child; + + while (child !== null) { + var childUpdateExpirationTime = child.expirationTime; + var childChildExpirationTime = child.childExpirationTime; + + if (childUpdateExpirationTime > newChildExpirationTime) { + newChildExpirationTime = childUpdateExpirationTime; + } + + if (childChildExpirationTime > newChildExpirationTime) { + newChildExpirationTime = childChildExpirationTime; + } + + if (shouldBubbleActualDurations) { + actualDuration += child.actualDuration; + } + + treeBaseDuration += child.treeBaseDuration; + child = child.sibling; + } + + completedWork.actualDuration = actualDuration; + completedWork.treeBaseDuration = treeBaseDuration; + } else { + var _child = completedWork.child; + + while (_child !== null) { + var _childUpdateExpirationTime = _child.expirationTime; + var _childChildExpirationTime = _child.childExpirationTime; + + if (_childUpdateExpirationTime > newChildExpirationTime) { + newChildExpirationTime = _childUpdateExpirationTime; + } + + if (_childChildExpirationTime > newChildExpirationTime) { + newChildExpirationTime = _childChildExpirationTime; + } + + _child = _child.sibling; + } + } + + completedWork.childExpirationTime = newChildExpirationTime; + } + + function commitRoot(root) { + var renderPriorityLevel = getCurrentPriorityLevel(); + runWithPriority$2(ImmediatePriority, commitRootImpl.bind(null, root, renderPriorityLevel)); + return null; + } + + function commitRootImpl(root, renderPriorityLevel) { + do { + // `flushPassiveEffects` will call `flushSyncUpdateQueue` at the end, which + // means `flushPassiveEffects` will sometimes result in additional + // passive effects. So we need to keep flushing in a loop until there are + // no more pending effects. + // TODO: Might be better if `flushPassiveEffects` did not automatically + // flush synchronous work at the end, to avoid factoring hazards like this. + flushPassiveEffects(); + } while (rootWithPendingPassiveEffects !== null); + + flushRenderPhaseStrictModeWarningsInDEV(); + + if (!((executionContext & (RenderContext | CommitContext)) === NoContext)) { + { + throw Error('Should not already be working.'); + } + } + + var finishedWork = root.finishedWork; + var expirationTime = root.finishedExpirationTime; + + if (finishedWork === null) { + return null; + } + + root.finishedWork = null; + root.finishedExpirationTime = NoWork; + + if (!(finishedWork !== root.current)) { + { + throw Error( + 'Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } // commitRoot never returns a continuation; it always finishes synchronously. + // So we can clear these now to allow a new callback to be scheduled. + + root.callbackNode = null; + root.callbackExpirationTime = NoWork; + root.callbackPriority = NoPriority; + root.nextKnownPendingLevel = NoWork; + startCommitTimer(); // Update the first and last pending times on this root. The new first + // pending time is whatever is left on the root fiber. + + var remainingExpirationTimeBeforeCommit = getRemainingExpirationTime(finishedWork); + markRootFinishedAtTime(root, expirationTime, remainingExpirationTimeBeforeCommit); + + if (root === workInProgressRoot) { + // We can reset these now that they are finished. + workInProgressRoot = null; + workInProgress = null; + renderExpirationTime = NoWork; + } else { + } // This indicates that the last root we worked on is not the same one that + // we're committing now. This most commonly happens when a suspended root + // times out. + // Get the list of effects. + + var firstEffect; + + if (finishedWork.effectTag > PerformedWork) { + // A fiber's effect list consists only of its children, not itself. So if + // the root has an effect, we need to add it to the end of the list. The + // resulting list is the set that would belong to the root's parent, if it + // had one; that is, all the effects in the tree including the root. + if (finishedWork.lastEffect !== null) { + finishedWork.lastEffect.nextEffect = finishedWork; + firstEffect = finishedWork.firstEffect; + } else { + firstEffect = finishedWork; + } + } else { + // There is no effect on the root. + firstEffect = finishedWork.firstEffect; + } + + if (firstEffect !== null) { + var prevExecutionContext = executionContext; + executionContext |= CommitContext; + var prevInteractions = pushInteractions(root); // Reset this to null before calling lifecycles + + ReactCurrentOwner$2.current = null; // The commit phase is broken into several sub-phases. We do a separate pass + // of the effect list for each phase: all mutation effects come before all + // layout effects, and so on. + // The first phase a "before mutation" phase. We use this phase to read the + // state of the host tree right before we mutate it. This is where + // getSnapshotBeforeUpdate is called. + + startCommitSnapshotEffectsTimer(); + prepareForCommit(root.containerInfo); + nextEffect = firstEffect; + + do { + { + invokeGuardedCallback(null, commitBeforeMutationEffects, null); + + if (hasCaughtError()) { + if (!(nextEffect !== null)) { + { + throw Error('Should be working on an effect.'); + } + } + + var error = clearCaughtError(); + captureCommitPhaseError(nextEffect, error); + nextEffect = nextEffect.nextEffect; + } + } + } while (nextEffect !== null); + + stopCommitSnapshotEffectsTimer(); + + if (enableProfilerTimer) { + // Mark the current commit time to be shared by all Profilers in this + // batch. This enables them to be grouped later. + recordCommitTime(); + } // The next phase is the mutation phase, where we mutate the host tree. + + startCommitHostEffectsTimer(); + nextEffect = firstEffect; + + do { + { + invokeGuardedCallback(null, commitMutationEffects, null, root, renderPriorityLevel); + + if (hasCaughtError()) { + if (!(nextEffect !== null)) { + { + throw Error('Should be working on an effect.'); + } + } + + var _error = clearCaughtError(); + + captureCommitPhaseError(nextEffect, _error); + nextEffect = nextEffect.nextEffect; + } + } + } while (nextEffect !== null); + + stopCommitHostEffectsTimer(); + resetAfterCommit(root.containerInfo); // The work-in-progress tree is now the current tree. This must come after + // the mutation phase, so that the previous tree is still current during + // componentWillUnmount, but before the layout phase, so that the finished + // work is current during componentDidMount/Update. + + root.current = finishedWork; // The next phase is the layout phase, where we call effects that read + // the host tree after it's been mutated. The idiomatic use case for this is + // layout, but class component lifecycles also fire here for legacy reasons. + + startCommitLifeCyclesTimer(); + nextEffect = firstEffect; + + do { + { + invokeGuardedCallback(null, commitLayoutEffects, null, root, expirationTime); + + if (hasCaughtError()) { + if (!(nextEffect !== null)) { + { + throw Error('Should be working on an effect.'); + } + } + + var _error2 = clearCaughtError(); + + captureCommitPhaseError(nextEffect, _error2); + nextEffect = nextEffect.nextEffect; + } + } + } while (nextEffect !== null); + + stopCommitLifeCyclesTimer(); + nextEffect = null; // Tell Scheduler to yield at the end of the frame, so the browser has an + // opportunity to paint. + + requestPaint(); + + if (enableSchedulerTracing) { + popInteractions(prevInteractions); + } + + executionContext = prevExecutionContext; + } else { + // No effects. + root.current = finishedWork; // Measure these anyway so the flamegraph explicitly shows that there were + // no effects. + // TODO: Maybe there's a better way to report this. + + startCommitSnapshotEffectsTimer(); + stopCommitSnapshotEffectsTimer(); + + if (enableProfilerTimer) { + recordCommitTime(); + } + + startCommitHostEffectsTimer(); + stopCommitHostEffectsTimer(); + startCommitLifeCyclesTimer(); + stopCommitLifeCyclesTimer(); + } + + stopCommitTimer(); + var rootDidHavePassiveEffects = rootDoesHavePassiveEffects; + + if (rootDoesHavePassiveEffects) { + // This commit has passive effects. Stash a reference to them. But don't + // schedule a callback until after flushing layout work. + rootDoesHavePassiveEffects = false; + rootWithPendingPassiveEffects = root; + pendingPassiveEffectsExpirationTime = expirationTime; + pendingPassiveEffectsRenderPriority = renderPriorityLevel; + } else { + // We are done with the effect chain at this point so let's clear the + // nextEffect pointers to assist with GC. If we have passive effects, we'll + // clear this in flushPassiveEffects. + nextEffect = firstEffect; + + while (nextEffect !== null) { + var nextNextEffect = nextEffect.nextEffect; + nextEffect.nextEffect = null; + nextEffect = nextNextEffect; + } + } // Check if there's remaining work on this root + + var remainingExpirationTime = root.firstPendingTime; + + if (remainingExpirationTime !== NoWork) { + if (enableSchedulerTracing) { + if (spawnedWorkDuringRender !== null) { + var expirationTimes = spawnedWorkDuringRender; + spawnedWorkDuringRender = null; + + for (var i = 0; i < expirationTimes.length; i++) { + scheduleInteractions(root, expirationTimes[i], root.memoizedInteractions); + } + } + + schedulePendingInteractions(root, remainingExpirationTime); + } + } else { + // If there's no remaining work, we can clear the set of already failed + // error boundaries. + legacyErrorBoundariesThatAlreadyFailed = null; + } + + if (enableSchedulerTracing) { + if (!rootDidHavePassiveEffects) { + // If there are no passive effects, then we can complete the pending interactions. + // Otherwise, we'll wait until after the passive effects are flushed. + // Wait to do this until after remaining work has been scheduled, + // so that we don't prematurely signal complete for interactions when there's e.g. hidden work. + finishPendingInteractions(root, expirationTime); + } + } + + if (remainingExpirationTime === Sync) { + // Count the number of times the root synchronously re-renders without + // finishing. If there are too many, it indicates an infinite update loop. + if (root === rootWithNestedUpdates) { + nestedUpdateCount++; + } else { + nestedUpdateCount = 0; + rootWithNestedUpdates = root; + } + } else { + nestedUpdateCount = 0; + } + + onCommitRoot(finishedWork.stateNode, expirationTime); // Always call this before exiting `commitRoot`, to ensure that any + // additional work on this root is scheduled. + + ensureRootIsScheduled(root); + + if (hasUncaughtError) { + hasUncaughtError = false; + var _error3 = firstUncaughtError; + firstUncaughtError = null; + throw _error3; + } + + if ((executionContext & LegacyUnbatchedContext) !== NoContext) { + // This is a legacy edge case. We just committed the initial mount of + // a ReactDOM.render-ed root inside of batchedUpdates. The commit fired + // synchronously, but layout updates should be deferred until the end + // of the batch. + return null; + } // If layout work was scheduled, flush it now. + + flushSyncCallbackQueue(); + return null; + } + + function commitBeforeMutationEffects() { + while (nextEffect !== null) { + var effectTag = nextEffect.effectTag; + + if ((effectTag & Snapshot) !== NoEffect) { + setCurrentFiber(nextEffect); + recordEffect(); + var current$$1 = nextEffect.alternate; + commitBeforeMutationLifeCycles(current$$1, nextEffect); + resetCurrentFiber(); + } + + if ((effectTag & Passive) !== NoEffect) { + // If there are passive effects, schedule a callback to flush at + // the earliest opportunity. + if (!rootDoesHavePassiveEffects) { + rootDoesHavePassiveEffects = true; + scheduleCallback(NormalPriority, function () { + flushPassiveEffects(); + return null; + }); + } + } + + nextEffect = nextEffect.nextEffect; + } + } + + function commitMutationEffects(root, renderPriorityLevel) { + // TODO: Should probably move the bulk of this function to commitWork. + while (nextEffect !== null) { + setCurrentFiber(nextEffect); + var effectTag = nextEffect.effectTag; + + if (effectTag & ContentReset) { + commitResetTextContent(nextEffect); + } + + if (effectTag & Ref) { + var current$$1 = nextEffect.alternate; + + if (current$$1 !== null) { + commitDetachRef(current$$1); + } + } // The following switch statement is only concerned about placement, + // updates, and deletions. To avoid needing to add a case for every possible + // bitmap value, we remove the secondary effects from the effect tag and + // switch on that value. + + var primaryEffectTag = effectTag & (Placement | Update | Deletion | Hydrating); + + switch (primaryEffectTag) { + case Placement: { + commitPlacement(nextEffect); // Clear the "placement" from effect tag so that we know that this is + // inserted, before any life-cycles like componentDidMount gets called. + // TODO: findDOMNode doesn't rely on this any more but isMounted does + // and isMounted is deprecated anyway so we should be able to kill this. + + nextEffect.effectTag &= ~Placement; + break; + } + + case PlacementAndUpdate: { + // Placement + commitPlacement(nextEffect); // Clear the "placement" from effect tag so that we know that this is + // inserted, before any life-cycles like componentDidMount gets called. + + nextEffect.effectTag &= ~Placement; // Update + + var _current = nextEffect.alternate; + commitWork(_current, nextEffect); + break; + } + + case Hydrating: { + nextEffect.effectTag &= ~Hydrating; + break; + } + + case HydratingAndUpdate: { + nextEffect.effectTag &= ~Hydrating; // Update + + var _current2 = nextEffect.alternate; + commitWork(_current2, nextEffect); + break; + } + + case Update: { + var _current3 = nextEffect.alternate; + commitWork(_current3, nextEffect); + break; + } + + case Deletion: { + commitDeletion(root, nextEffect, renderPriorityLevel); + break; + } + } // TODO: Only record a mutation effect if primaryEffectTag is non-zero. + + recordEffect(); + resetCurrentFiber(); + nextEffect = nextEffect.nextEffect; + } + } + + function commitLayoutEffects(root, committedExpirationTime) { + // TODO: Should probably move the bulk of this function to commitWork. + while (nextEffect !== null) { + setCurrentFiber(nextEffect); + var effectTag = nextEffect.effectTag; + + if (effectTag & (Update | Callback)) { + recordEffect(); + var current$$1 = nextEffect.alternate; + commitLifeCycles(root, current$$1, nextEffect, committedExpirationTime); + } + + if (effectTag & Ref) { + recordEffect(); + commitAttachRef(nextEffect); + } + + resetCurrentFiber(); + nextEffect = nextEffect.nextEffect; + } + } + + function flushPassiveEffects() { + if (pendingPassiveEffectsRenderPriority !== NoPriority) { + var priorityLevel = + pendingPassiveEffectsRenderPriority > NormalPriority + ? NormalPriority + : pendingPassiveEffectsRenderPriority; + pendingPassiveEffectsRenderPriority = NoPriority; + return runWithPriority$2(priorityLevel, flushPassiveEffectsImpl); + } + } + + function flushPassiveEffectsImpl() { + if (rootWithPendingPassiveEffects === null) { + return false; + } + + var root = rootWithPendingPassiveEffects; + var expirationTime = pendingPassiveEffectsExpirationTime; + rootWithPendingPassiveEffects = null; + pendingPassiveEffectsExpirationTime = NoWork; + + if (!((executionContext & (RenderContext | CommitContext)) === NoContext)) { + { + throw Error('Cannot flush passive effects while already rendering.'); + } + } + + var prevExecutionContext = executionContext; + executionContext |= CommitContext; + var prevInteractions = pushInteractions(root); // Note: This currently assumes there are no passive effects on the root + // fiber, because the root is not part of its own effect list. This could + // change in the future. + + var effect = root.current.firstEffect; + + while (effect !== null) { + { + setCurrentFiber(effect); + invokeGuardedCallback(null, commitPassiveHookEffects, null, effect); + + if (hasCaughtError()) { + if (!(effect !== null)) { + { + throw Error('Should be working on an effect.'); + } + } + + var error = clearCaughtError(); + captureCommitPhaseError(effect, error); + } + + resetCurrentFiber(); + } + + var nextNextEffect = effect.nextEffect; // Remove nextEffect pointer to assist GC + + effect.nextEffect = null; + effect = nextNextEffect; + } + + if (enableSchedulerTracing) { + popInteractions(prevInteractions); + finishPendingInteractions(root, expirationTime); + } + + executionContext = prevExecutionContext; + flushSyncCallbackQueue(); // If additional passive effects were scheduled, increment a counter. If this + // exceeds the limit, we'll fire a warning. + + nestedPassiveUpdateCount = + rootWithPendingPassiveEffects === null ? 0 : nestedPassiveUpdateCount + 1; + return true; + } + + function isAlreadyFailedLegacyErrorBoundary(instance) { + return ( + legacyErrorBoundariesThatAlreadyFailed !== null && + legacyErrorBoundariesThatAlreadyFailed.has(instance) + ); + } + function markLegacyErrorBoundaryAsFailed(instance) { + if (legacyErrorBoundariesThatAlreadyFailed === null) { + legacyErrorBoundariesThatAlreadyFailed = new Set([instance]); + } else { + legacyErrorBoundariesThatAlreadyFailed.add(instance); + } + } + + function prepareToThrowUncaughtError(error) { + if (!hasUncaughtError) { + hasUncaughtError = true; + firstUncaughtError = error; + } + } + + var onUncaughtError = prepareToThrowUncaughtError; + + function captureCommitPhaseErrorOnRoot(rootFiber, sourceFiber, error) { + var errorInfo = createCapturedValue(error, sourceFiber); + var update = createRootErrorUpdate(rootFiber, errorInfo, Sync); + enqueueUpdate(rootFiber, update); + var root = markUpdateTimeFromFiberToRoot(rootFiber, Sync); + + if (root !== null) { + ensureRootIsScheduled(root); + schedulePendingInteractions(root, Sync); + } + } + + function captureCommitPhaseError(sourceFiber, error) { + if (sourceFiber.tag === HostRoot) { + // Error was thrown at the root. There is no parent, so the root + // itself should capture it. + captureCommitPhaseErrorOnRoot(sourceFiber, sourceFiber, error); + return; + } + + var fiber = sourceFiber.return; + + while (fiber !== null) { + if (fiber.tag === HostRoot) { + captureCommitPhaseErrorOnRoot(fiber, sourceFiber, error); + return; + } else if (fiber.tag === ClassComponent) { + var ctor = fiber.type; + var instance = fiber.stateNode; + + if ( + typeof ctor.getDerivedStateFromError === 'function' || + (typeof instance.componentDidCatch === 'function' && + !isAlreadyFailedLegacyErrorBoundary(instance)) + ) { + var errorInfo = createCapturedValue(error, sourceFiber); + var update = createClassErrorUpdate( + fiber, + errorInfo, // TODO: This is always sync + Sync, + ); + enqueueUpdate(fiber, update); + var root = markUpdateTimeFromFiberToRoot(fiber, Sync); + + if (root !== null) { + ensureRootIsScheduled(root); + schedulePendingInteractions(root, Sync); + } + + return; + } + } + + fiber = fiber.return; + } + } + function pingSuspendedRoot(root, thenable, suspendedTime) { + var pingCache = root.pingCache; + + if (pingCache !== null) { + // The thenable resolved, so we no longer need to memoize, because it will + // never be thrown again. + pingCache.delete(thenable); + } + + if (workInProgressRoot === root && renderExpirationTime === suspendedTime) { + // Received a ping at the same priority level at which we're currently + // rendering. We might want to restart this render. This should mirror + // the logic of whether or not a root suspends once it completes. + // TODO: If we're rendering sync either due to Sync, Batched or expired, + // we should probably never restart. + // If we're suspended with delay, we'll always suspend so we can always + // restart. If we're suspended without any updates, it might be a retry. + // If it's early in the retry we can restart. We can't know for sure + // whether we'll eventually process an update during this render pass, + // but it's somewhat unlikely that we get to a ping before that, since + // getting to the root most update is usually very fast. + if ( + workInProgressRootExitStatus === RootSuspendedWithDelay || + (workInProgressRootExitStatus === RootSuspended && + workInProgressRootLatestProcessedExpirationTime === Sync && + now() - globalMostRecentFallbackTime < FALLBACK_THROTTLE_MS) + ) { + // Restart from the root. Don't need to schedule a ping because + // we're already working on this tree. + prepareFreshStack(root, renderExpirationTime); + } else { + // Even though we can't restart right now, we might get an + // opportunity later. So we mark this render as having a ping. + workInProgressRootHasPendingPing = true; + } + + return; + } + + if (!isRootSuspendedAtTime(root, suspendedTime)) { + // The root is no longer suspended at this time. + return; + } + + var lastPingedTime = root.lastPingedTime; + + if (lastPingedTime !== NoWork && lastPingedTime < suspendedTime) { + // There's already a lower priority ping scheduled. + return; + } // Mark the time at which this ping was scheduled. + + root.lastPingedTime = suspendedTime; + + if (root.finishedExpirationTime === suspendedTime) { + // If there's a pending fallback waiting to commit, throw it away. + root.finishedExpirationTime = NoWork; + root.finishedWork = null; + } + + ensureRootIsScheduled(root); + schedulePendingInteractions(root, suspendedTime); + } + + function retryTimedOutBoundary(boundaryFiber, retryTime) { + // The boundary fiber (a Suspense component or SuspenseList component) + // previously was rendered in its fallback state. One of the promises that + // suspended it has resolved, which means at least part of the tree was + // likely unblocked. Try rendering again, at a new expiration time. + if (retryTime === NoWork) { + var suspenseConfig = null; // Retries don't carry over the already committed update. + + var currentTime = requestCurrentTimeForUpdate(); + retryTime = computeExpirationForFiber(currentTime, boundaryFiber, suspenseConfig); + } // TODO: Special case idle priority? + + var root = markUpdateTimeFromFiberToRoot(boundaryFiber, retryTime); + + if (root !== null) { + ensureRootIsScheduled(root); + schedulePendingInteractions(root, retryTime); + } + } + + function retryDehydratedSuspenseBoundary(boundaryFiber) { + var suspenseState = boundaryFiber.memoizedState; + var retryTime = NoWork; + + if (suspenseState !== null) { + retryTime = suspenseState.retryTime; + } + + retryTimedOutBoundary(boundaryFiber, retryTime); + } + function resolveRetryThenable(boundaryFiber, thenable) { + var retryTime = NoWork; // Default + + var retryCache; + + if (enableSuspenseServerRenderer) { + switch (boundaryFiber.tag) { + case SuspenseComponent: + retryCache = boundaryFiber.stateNode; + var suspenseState = boundaryFiber.memoizedState; + + if (suspenseState !== null) { + retryTime = suspenseState.retryTime; + } + + break; + + case SuspenseListComponent: + retryCache = boundaryFiber.stateNode; + break; + + default: { + { + throw Error('Pinged unknown suspense boundary type. This is probably a bug in React.'); + } + } + } + } else { + retryCache = boundaryFiber.stateNode; + } + + if (retryCache !== null) { + // The thenable resolved, so we no longer need to memoize, because it will + // never be thrown again. + retryCache.delete(thenable); + } + + retryTimedOutBoundary(boundaryFiber, retryTime); + } // Computes the next Just Noticeable Difference (JND) boundary. + // The theory is that a person can't tell the difference between small differences in time. + // Therefore, if we wait a bit longer than necessary that won't translate to a noticeable + // difference in the experience. However, waiting for longer might mean that we can avoid + // showing an intermediate loading state. The longer we have already waited, the harder it + // is to tell small differences in time. Therefore, the longer we've already waited, + // the longer we can wait additionally. At some point we have to give up though. + // We pick a train model where the next boundary commits at a consistent schedule. + // These particular numbers are vague estimates. We expect to adjust them based on research. + + function jnd(timeElapsed) { + return timeElapsed < 120 + ? 120 + : timeElapsed < 480 + ? 480 + : timeElapsed < 1080 + ? 1080 + : timeElapsed < 1920 + ? 1920 + : timeElapsed < 3000 + ? 3000 + : timeElapsed < 4320 + ? 4320 + : ceil(timeElapsed / 1960) * 1960; + } + + function computeMsUntilSuspenseLoadingDelay( + mostRecentEventTime, + committedExpirationTime, + suspenseConfig, + ) { + var busyMinDurationMs = suspenseConfig.busyMinDurationMs | 0; + + if (busyMinDurationMs <= 0) { + return 0; + } + + var busyDelayMs = suspenseConfig.busyDelayMs | 0; // Compute the time until this render pass would expire. + + var currentTimeMs = now(); + var eventTimeMs = inferTimeFromExpirationTimeWithSuspenseConfig( + mostRecentEventTime, + suspenseConfig, + ); + var timeElapsed = currentTimeMs - eventTimeMs; + + if (timeElapsed <= busyDelayMs) { + // If we haven't yet waited longer than the initial delay, we don't + // have to wait any additional time. + return 0; + } + + var msUntilTimeout = busyDelayMs + busyMinDurationMs - timeElapsed; // This is the value that is passed to `setTimeout`. + + return msUntilTimeout; + } + + function checkForNestedUpdates() { + if (nestedUpdateCount > NESTED_UPDATE_LIMIT) { + nestedUpdateCount = 0; + rootWithNestedUpdates = null; + + { + { + throw Error( + 'Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.', + ); + } + } + } + + { + if (nestedPassiveUpdateCount > NESTED_PASSIVE_UPDATE_LIMIT) { + nestedPassiveUpdateCount = 0; + warning$1( + false, + 'Maximum update depth exceeded. This can happen when a component ' + + "calls setState inside useEffect, but useEffect either doesn't " + + 'have a dependency array, or one of the dependencies changes on ' + + 'every render.', + ); + } + } + } + + function flushRenderPhaseStrictModeWarningsInDEV() { + { + ReactStrictModeWarnings.flushLegacyContextWarning(); + + if (warnAboutDeprecatedLifecycles) { + ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings(); + } + } + } + + function stopFinishedWorkLoopTimer() { + var didCompleteRoot = true; + stopWorkLoopTimer(interruptedBy, didCompleteRoot); + interruptedBy = null; + } + + function stopInterruptedWorkLoopTimer() { + // TODO: Track which fiber caused the interruption. + var didCompleteRoot = false; + stopWorkLoopTimer(interruptedBy, didCompleteRoot); + interruptedBy = null; + } + + function checkForInterruption(fiberThatReceivedUpdate, updateExpirationTime) { + if ( + enableUserTimingAPI && + workInProgressRoot !== null && + updateExpirationTime > renderExpirationTime + ) { + interruptedBy = fiberThatReceivedUpdate; + } + } + + var didWarnStateUpdateForUnmountedComponent = null; + + function warnAboutUpdateOnUnmountedFiberInDEV(fiber) { + { + var tag = fiber.tag; + + if ( + tag !== HostRoot && + tag !== ClassComponent && + tag !== FunctionComponent && + tag !== ForwardRef && + tag !== MemoComponent && + tag !== SimpleMemoComponent + ) { + // Only warn for user-defined components, not internal ones like Suspense. + return; + } // We show the whole stack but dedupe on the top component's name because + // the problematic code almost always lies inside that component. + + var componentName = getComponentName(fiber.type) || 'ReactComponent'; + + if (didWarnStateUpdateForUnmountedComponent !== null) { + if (didWarnStateUpdateForUnmountedComponent.has(componentName)) { + return; + } + + didWarnStateUpdateForUnmountedComponent.add(componentName); + } else { + didWarnStateUpdateForUnmountedComponent = new Set([componentName]); + } + + warningWithoutStack$1( + false, + "Can't perform a React state update on an unmounted component. This " + + 'is a no-op, but it indicates a memory leak in your application. To ' + + 'fix, cancel all subscriptions and asynchronous tasks in %s.%s', + tag === ClassComponent ? 'the componentWillUnmount method' : 'a useEffect cleanup function', + getStackByFiberInDevAndProd(fiber), + ); + } + } + + var beginWork$$1; + + if (true && replayFailedUnitOfWorkWithInvokeGuardedCallback) { + var dummyFiber = null; + + beginWork$$1 = function (current$$1, unitOfWork, expirationTime) { + // If a component throws an error, we replay it again in a synchronously + // dispatched event, so that the debugger will treat it as an uncaught + // error See ReactErrorUtils for more information. + // Before entering the begin phase, copy the work-in-progress onto a dummy + // fiber. If beginWork throws, we'll use this to reset the state. + var originalWorkInProgressCopy = assignFiberPropertiesInDEV(dummyFiber, unitOfWork); + + try { + return beginWork$1(current$$1, unitOfWork, expirationTime); + } catch (originalError) { + if ( + originalError !== null && + typeof originalError === 'object' && + typeof originalError.then === 'function' + ) { + // Don't replay promises. Treat everything else like an error. + throw originalError; + } // Keep this code in sync with handleError; any changes here must have + // corresponding changes there. + + resetContextDependencies(); + resetHooks(); // Don't reset current debug fiber, since we're about to work on the + // same fiber again. + // Unwind the failed stack frame + + unwindInterruptedWork(unitOfWork); // Restore the original properties of the fiber. + + assignFiberPropertiesInDEV(unitOfWork, originalWorkInProgressCopy); + + if (enableProfilerTimer && unitOfWork.mode & ProfileMode) { + // Reset the profiler timer. + startProfilerTimer(unitOfWork); + } // Run beginWork again. + + invokeGuardedCallback(null, beginWork$1, null, current$$1, unitOfWork, expirationTime); + + if (hasCaughtError()) { + var replayError = clearCaughtError(); // `invokeGuardedCallback` sometimes sets an expando `_suppressLogging`. + // Rethrow this error instead of the original one. + + throw replayError; + } else { + // This branch is reachable if the render phase is impure. + throw originalError; + } + } + }; + } else { + beginWork$$1 = beginWork$1; + } + + var didWarnAboutUpdateInRender = false; + var didWarnAboutUpdateInGetChildContext = false; + + function warnAboutInvalidUpdatesOnClassComponentsInDEV(fiber) { + { + if (fiber.tag === ClassComponent) { + switch (phase) { + case 'getChildContext': + if (didWarnAboutUpdateInGetChildContext) { + return; + } + + warningWithoutStack$1( + false, + 'setState(...): Cannot call setState() inside getChildContext()', + ); + didWarnAboutUpdateInGetChildContext = true; + break; + + case 'render': + if (didWarnAboutUpdateInRender) { + return; + } + + warningWithoutStack$1( + false, + 'Cannot update during an existing state transition (such as ' + + 'within `render`). Render methods should be a pure function of ' + + 'props and state.', + ); + didWarnAboutUpdateInRender = true; + break; + } + } + } + } // a 'shared' variable that changes when act() opens/closes in tests. + + var IsThisRendererActing = { + current: false, + }; + function warnIfNotScopedWithMatchingAct(fiber) { + { + if ( + warnsIfNotActing === true && + IsSomeRendererActing.current === true && + IsThisRendererActing.current !== true + ) { + warningWithoutStack$1( + false, + "It looks like you're using the wrong act() around your test interactions.\n" + + 'Be sure to use the matching version of act() corresponding to your renderer:\n\n' + + '// for react-dom:\n' + + "import {act} from 'react-dom/test-utils';\n" + + '// ...\n' + + 'act(() => ...);\n\n' + + '// for react-test-renderer:\n' + + "import TestRenderer from 'react-test-renderer';\n" + + 'const {act} = TestRenderer;\n' + + '// ...\n' + + 'act(() => ...);' + + '%s', + getStackByFiberInDevAndProd(fiber), + ); + } + } + } + function warnIfNotCurrentlyActingEffectsInDEV(fiber) { + { + if ( + warnsIfNotActing === true && + (fiber.mode & StrictMode) !== NoMode && + IsSomeRendererActing.current === false && + IsThisRendererActing.current === false + ) { + warningWithoutStack$1( + false, + 'An update to %s ran an effect, but was not wrapped in act(...).\n\n' + + 'When testing, code that causes React state updates should be ' + + 'wrapped into act(...):\n\n' + + 'act(() => {\n' + + ' /* fire events that update state */\n' + + '});\n' + + '/* assert on the output */\n\n' + + "This ensures that you're testing the behavior the user would see " + + 'in the browser.' + + ' Learn more at https://fb.me/react-wrap-tests-with-act' + + '%s', + getComponentName(fiber.type), + getStackByFiberInDevAndProd(fiber), + ); + } + } + } + + function warnIfNotCurrentlyActingUpdatesInDEV(fiber) { + { + if ( + warnsIfNotActing === true && + executionContext === NoContext && + IsSomeRendererActing.current === false && + IsThisRendererActing.current === false + ) { + warningWithoutStack$1( + false, + 'An update to %s inside a test was not wrapped in act(...).\n\n' + + 'When testing, code that causes React state updates should be ' + + 'wrapped into act(...):\n\n' + + 'act(() => {\n' + + ' /* fire events that update state */\n' + + '});\n' + + '/* assert on the output */\n\n' + + "This ensures that you're testing the behavior the user would see " + + 'in the browser.' + + ' Learn more at https://fb.me/react-wrap-tests-with-act' + + '%s', + getComponentName(fiber.type), + getStackByFiberInDevAndProd(fiber), + ); + } + } + } + + var warnIfNotCurrentlyActingUpdatesInDev = warnIfNotCurrentlyActingUpdatesInDEV; // In tests, we want to enforce a mocked scheduler. + + var didWarnAboutUnmockedScheduler = false; // TODO Before we release concurrent mode, revisit this and decide whether a mocked + // scheduler is the actual recommendation. The alternative could be a testing build, + // a new lib, or whatever; we dunno just yet. This message is for early adopters + // to get their tests right. + + function warnIfUnmockedScheduler(fiber) { + { + if ( + didWarnAboutUnmockedScheduler === false && + Scheduler.unstable_flushAllWithoutAsserting === undefined + ) { + if (fiber.mode & BlockingMode || fiber.mode & ConcurrentMode) { + didWarnAboutUnmockedScheduler = true; + warningWithoutStack$1( + false, + 'In Concurrent or Sync modes, the "scheduler" module needs to be mocked ' + + 'to guarantee consistent behaviour across tests and browsers. ' + + 'For example, with jest: \n' + + "jest.mock('scheduler', () => require('scheduler/unstable_mock'));\n\n" + + 'For more info, visit https://fb.me/react-mock-scheduler', + ); + } else if (warnAboutUnmockedScheduler === true) { + didWarnAboutUnmockedScheduler = true; + warningWithoutStack$1( + false, + 'Starting from React v17, the "scheduler" module will need to be mocked ' + + 'to guarantee consistent behaviour across tests and browsers. ' + + 'For example, with jest: \n' + + "jest.mock('scheduler', () => require('scheduler/unstable_mock'));\n\n" + + 'For more info, visit https://fb.me/react-mock-scheduler', + ); + } + } + } + } + var componentsThatTriggeredHighPriSuspend = null; + function checkForWrongSuspensePriorityInDEV(sourceFiber) { + { + var currentPriorityLevel = getCurrentPriorityLevel(); + + if ( + (sourceFiber.mode & ConcurrentMode) !== NoEffect && + (currentPriorityLevel === UserBlockingPriority$2 || + currentPriorityLevel === ImmediatePriority) + ) { + var workInProgressNode = sourceFiber; + + while (workInProgressNode !== null) { + // Add the component that triggered the suspense + var current$$1 = workInProgressNode.alternate; + + if (current$$1 !== null) { + // TODO: warn component that triggers the high priority + // suspend is the HostRoot + switch (workInProgressNode.tag) { + case ClassComponent: + // Loop through the component's update queue and see whether the component + // has triggered any high priority updates + var updateQueue = current$$1.updateQueue; + + if (updateQueue !== null) { + var update = updateQueue.firstUpdate; + + while (update !== null) { + var priorityLevel = update.priority; + + if ( + priorityLevel === UserBlockingPriority$2 || + priorityLevel === ImmediatePriority + ) { + if (componentsThatTriggeredHighPriSuspend === null) { + componentsThatTriggeredHighPriSuspend = new Set([ + getComponentName(workInProgressNode.type), + ]); + } else { + componentsThatTriggeredHighPriSuspend.add( + getComponentName(workInProgressNode.type), + ); + } + + break; + } + + update = update.next; + } + } + + break; + + case FunctionComponent: + case ForwardRef: + case SimpleMemoComponent: + if ( + workInProgressNode.memoizedState !== null && + workInProgressNode.memoizedState.baseUpdate !== null + ) { + var _update = workInProgressNode.memoizedState.baseUpdate; // Loop through the functional component's memoized state to see whether + // the component has triggered any high pri updates + + while (_update !== null) { + var priority = _update.priority; + + if (priority === UserBlockingPriority$2 || priority === ImmediatePriority) { + if (componentsThatTriggeredHighPriSuspend === null) { + componentsThatTriggeredHighPriSuspend = new Set([ + getComponentName(workInProgressNode.type), + ]); + } else { + componentsThatTriggeredHighPriSuspend.add( + getComponentName(workInProgressNode.type), + ); + } + + break; + } + + if (_update.next === workInProgressNode.memoizedState.baseUpdate) { + break; + } + + _update = _update.next; + } + } + + break; + + default: + break; + } + } + + workInProgressNode = workInProgressNode.return; + } + } + } + } + + function flushSuspensePriorityWarningInDEV() { + { + if (componentsThatTriggeredHighPriSuspend !== null) { + var componentNames = []; + componentsThatTriggeredHighPriSuspend.forEach(function (name) { + return componentNames.push(name); + }); + componentsThatTriggeredHighPriSuspend = null; + + if (componentNames.length > 0) { + warningWithoutStack$1( + false, + '%s triggered a user-blocking update that suspended.' + + '\n\n' + + 'The fix is to split the update into multiple parts: a user-blocking ' + + 'update to provide immediate feedback, and another update that ' + + 'triggers the bulk of the changes.' + + '\n\n' + + 'Refer to the documentation for useTransition to learn how ' + + 'to implement this pattern.', // TODO: Add link to React docs with more information, once it exists + componentNames.sort().join(', '), + ); + } + } + } + } + + function computeThreadID(root, expirationTime) { + // Interaction threads are unique per root and expiration time. + return expirationTime * 1000 + root.interactionThreadID; + } + + function markSpawnedWork(expirationTime) { + if (!enableSchedulerTracing) { + return; + } + + if (spawnedWorkDuringRender === null) { + spawnedWorkDuringRender = [expirationTime]; + } else { + spawnedWorkDuringRender.push(expirationTime); + } + } + + function scheduleInteractions(root, expirationTime, interactions) { + if (!enableSchedulerTracing) { + return; + } + + if (interactions.size > 0) { + var pendingInteractionMap = root.pendingInteractionMap; + var pendingInteractions = pendingInteractionMap.get(expirationTime); + + if (pendingInteractions != null) { + interactions.forEach(function (interaction) { + if (!pendingInteractions.has(interaction)) { + // Update the pending async work count for previously unscheduled interaction. + interaction.__count++; + } + + pendingInteractions.add(interaction); + }); + } else { + pendingInteractionMap.set(expirationTime, new Set(interactions)); // Update the pending async work count for the current interactions. + + interactions.forEach(function (interaction) { + interaction.__count++; + }); + } + + var subscriber = tracing.__subscriberRef.current; + + if (subscriber !== null) { + var threadID = computeThreadID(root, expirationTime); + subscriber.onWorkScheduled(interactions, threadID); + } + } + } + + function schedulePendingInteractions(root, expirationTime) { + // This is called when work is scheduled on a root. + // It associates the current interactions with the newly-scheduled expiration. + // They will be restored when that expiration is later committed. + if (!enableSchedulerTracing) { + return; + } + + scheduleInteractions(root, expirationTime, tracing.__interactionsRef.current); + } + + function startWorkOnPendingInteractions(root, expirationTime) { + // This is called when new work is started on a root. + if (!enableSchedulerTracing) { + return; + } // Determine which interactions this batch of work currently includes, So that + // we can accurately attribute time spent working on it, And so that cascading + // work triggered during the render phase will be associated with it. + + var interactions = new Set(); + root.pendingInteractionMap.forEach(function (scheduledInteractions, scheduledExpirationTime) { + if (scheduledExpirationTime >= expirationTime) { + scheduledInteractions.forEach(function (interaction) { + return interactions.add(interaction); + }); + } + }); // Store the current set of interactions on the FiberRoot for a few reasons: + // We can re-use it in hot functions like performConcurrentWorkOnRoot() + // without having to recalculate it. We will also use it in commitWork() to + // pass to any Profiler onRender() hooks. This also provides DevTools with a + // way to access it when the onCommitRoot() hook is called. + + root.memoizedInteractions = interactions; + + if (interactions.size > 0) { + var subscriber = tracing.__subscriberRef.current; + + if (subscriber !== null) { + var threadID = computeThreadID(root, expirationTime); + + try { + subscriber.onWorkStarted(interactions, threadID); + } catch (error) { + // If the subscriber throws, rethrow it in a separate task + scheduleCallback(ImmediatePriority, function () { + throw error; + }); + } + } + } + } + + function finishPendingInteractions(root, committedExpirationTime) { + if (!enableSchedulerTracing) { + return; + } + + var earliestRemainingTimeAfterCommit = root.firstPendingTime; + var subscriber; + + try { + subscriber = tracing.__subscriberRef.current; + + if (subscriber !== null && root.memoizedInteractions.size > 0) { + var threadID = computeThreadID(root, committedExpirationTime); + subscriber.onWorkStopped(root.memoizedInteractions, threadID); + } + } catch (error) { + // If the subscriber throws, rethrow it in a separate task + scheduleCallback(ImmediatePriority, function () { + throw error; + }); + } finally { + // Clear completed interactions from the pending Map. + // Unless the render was suspended or cascading work was scheduled, + // In which case– leave pending interactions until the subsequent render. + var pendingInteractionMap = root.pendingInteractionMap; + pendingInteractionMap.forEach(function (scheduledInteractions, scheduledExpirationTime) { + // Only decrement the pending interaction count if we're done. + // If there's still work at the current priority, + // That indicates that we are waiting for suspense data. + if (scheduledExpirationTime > earliestRemainingTimeAfterCommit) { + pendingInteractionMap.delete(scheduledExpirationTime); + scheduledInteractions.forEach(function (interaction) { + interaction.__count--; + + if (subscriber !== null && interaction.__count === 0) { + try { + subscriber.onInteractionScheduledWorkCompleted(interaction); + } catch (error) { + // If the subscriber throws, rethrow it in a separate task + scheduleCallback(ImmediatePriority, function () { + throw error; + }); + } + } + }); + } + }); + } + } + + var onCommitFiberRoot = null; + var onCommitFiberUnmount = null; + var hasLoggedError = false; + var isDevToolsPresent = typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined'; + function injectInternals(internals) { + if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined') { + // No DevTools + return false; + } + + var hook = __REACT_DEVTOOLS_GLOBAL_HOOK__; + + if (hook.isDisabled) { + // This isn't a real property on the hook, but it can be set to opt out + // of DevTools integration and associated warnings and logs. + // https://github.com/facebook/react/issues/3877 + return true; + } + + if (!hook.supportsFiber) { + { + warningWithoutStack$1( + false, + 'The installed version of React DevTools is too old and will not work ' + + 'with the current version of React. Please update React DevTools. ' + + 'https://fb.me/react-devtools', + ); + } // DevTools exists, even though it doesn't support Fiber. + + return true; + } + + try { + var rendererID = hook.inject(internals); // We have successfully injected, so now it is safe to set up hooks. + + onCommitFiberRoot = function (root, expirationTime) { + try { + var didError = (root.current.effectTag & DidCapture) === DidCapture; + + if (enableProfilerTimer) { + var currentTime = getCurrentTime(); + var priorityLevel = inferPriorityFromExpirationTime(currentTime, expirationTime); + hook.onCommitFiberRoot(rendererID, root, priorityLevel, didError); + } else { + hook.onCommitFiberRoot(rendererID, root, undefined, didError); + } + } catch (err) { + if (true && !hasLoggedError) { + hasLoggedError = true; + warningWithoutStack$1(false, 'React DevTools encountered an error: %s', err); + } + } + }; + + onCommitFiberUnmount = function (fiber) { + try { + hook.onCommitFiberUnmount(rendererID, fiber); + } catch (err) { + if (true && !hasLoggedError) { + hasLoggedError = true; + warningWithoutStack$1(false, 'React DevTools encountered an error: %s', err); + } + } + }; + } catch (err) { + // Catch all errors because it is unsafe to throw during initialization. + { + warningWithoutStack$1(false, 'React DevTools encountered an error: %s.', err); + } + } // DevTools exists + + return true; + } + function onCommitRoot(root, expirationTime) { + if (typeof onCommitFiberRoot === 'function') { + onCommitFiberRoot(root, expirationTime); + } + } + function onCommitUnmount(fiber) { + if (typeof onCommitFiberUnmount === 'function') { + onCommitFiberUnmount(fiber); + } + } + + var hasBadMapPolyfill; + + { + hasBadMapPolyfill = false; + + try { + var nonExtensibleObject = Object.preventExtensions({}); + var testMap = new Map([[nonExtensibleObject, null]]); + var testSet = new Set([nonExtensibleObject]); // This is necessary for Rollup to not consider these unused. + // https://github.com/rollup/rollup/issues/1771 + // TODO: we can remove these if Rollup fixes the bug. + + testMap.set(0, 0); + testSet.add(0); + } catch (e) { + // TODO: Consider warning about bad polyfills + hasBadMapPolyfill = true; + } + } + + var debugCounter = 1; + + function FiberNode(tag, pendingProps, key, mode) { + // Instance + this.tag = tag; + this.key = key; + this.elementType = null; + this.type = null; + this.stateNode = null; // Fiber + + this.return = null; + this.child = null; + this.sibling = null; + this.index = 0; + this.ref = null; + this.pendingProps = pendingProps; + this.memoizedProps = null; + this.updateQueue = null; + this.memoizedState = null; + this.dependencies = null; + this.mode = mode; // Effects + + this.effectTag = NoEffect; + this.nextEffect = null; + this.firstEffect = null; + this.lastEffect = null; + this.expirationTime = NoWork; + this.childExpirationTime = NoWork; + this.alternate = null; + + if (enableProfilerTimer) { + // Note: The following is done to avoid a v8 performance cliff. + // + // Initializing the fields below to smis and later updating them with + // double values will cause Fibers to end up having separate shapes. + // This behavior/bug has something to do with Object.preventExtension(). + // Fortunately this only impacts DEV builds. + // Unfortunately it makes React unusably slow for some applications. + // To work around this, initialize the fields below with doubles. + // + // Learn more about this here: + // https://github.com/facebook/react/issues/14365 + // https://bugs.chromium.org/p/v8/issues/detail?id=8538 + this.actualDuration = Number.NaN; + this.actualStartTime = Number.NaN; + this.selfBaseDuration = Number.NaN; + this.treeBaseDuration = Number.NaN; // It's okay to replace the initial doubles with smis after initialization. + // This won't trigger the performance cliff mentioned above, + // and it simplifies other profiler code (including DevTools). + + this.actualDuration = 0; + this.actualStartTime = -1; + this.selfBaseDuration = 0; + this.treeBaseDuration = 0; + } // This is normally DEV-only except www when it adds listeners. + // TODO: remove the User Timing integration in favor of Root Events. + + if (enableUserTimingAPI) { + this._debugID = debugCounter++; + this._debugIsCurrentlyTiming = false; + } + + { + this._debugSource = null; + this._debugOwner = null; + this._debugNeedsRemount = false; + this._debugHookTypes = null; + + if (!hasBadMapPolyfill && typeof Object.preventExtensions === 'function') { + Object.preventExtensions(this); + } + } + } // This is a constructor function, rather than a POJO constructor, still + // please ensure we do the following: + // 1) Nobody should add any instance methods on this. Instance methods can be + // more difficult to predict when they get optimized and they are almost + // never inlined properly in static compilers. + // 2) Nobody should rely on `instanceof Fiber` for type testing. We should + // always know when it is a fiber. + // 3) We might want to experiment with using numeric keys since they are easier + // to optimize in a non-JIT environment. + // 4) We can easily go from a constructor to a createFiber object literal if that + // is faster. + // 5) It should be easy to port this to a C struct and keep a C implementation + // compatible. + + var createFiber = function (tag, pendingProps, key, mode) { + // $FlowFixMe: the shapes are exact here but Flow doesn't like constructors + return new FiberNode(tag, pendingProps, key, mode); + }; + + function shouldConstruct(Component) { + var prototype = Component.prototype; + return !!(prototype && prototype.isReactComponent); + } + + function isSimpleFunctionComponent(type) { + return typeof type === 'function' && !shouldConstruct(type) && type.defaultProps === undefined; + } + function resolveLazyComponentTag(Component) { + if (typeof Component === 'function') { + return shouldConstruct(Component) ? ClassComponent : FunctionComponent; + } else if (Component !== undefined && Component !== null) { + var $$typeof = Component.$$typeof; + + if ($$typeof === REACT_FORWARD_REF_TYPE) { + return ForwardRef; + } + + if ($$typeof === REACT_MEMO_TYPE) { + return MemoComponent; + } + } + + return IndeterminateComponent; + } // This is used to create an alternate fiber to do work on. + + function createWorkInProgress(current, pendingProps, expirationTime) { + var workInProgress = current.alternate; + + if (workInProgress === null) { + // We use a double buffering pooling technique because we know that we'll + // only ever need at most two versions of a tree. We pool the "other" unused + // node that we're free to reuse. This is lazily created to avoid allocating + // extra objects for things that are never updated. It also allow us to + // reclaim the extra memory if needed. + workInProgress = createFiber(current.tag, pendingProps, current.key, current.mode); + workInProgress.elementType = current.elementType; + workInProgress.type = current.type; + workInProgress.stateNode = current.stateNode; + + { + // DEV-only fields + workInProgress._debugID = current._debugID; + workInProgress._debugSource = current._debugSource; + workInProgress._debugOwner = current._debugOwner; + workInProgress._debugHookTypes = current._debugHookTypes; + } + + workInProgress.alternate = current; + current.alternate = workInProgress; + } else { + workInProgress.pendingProps = pendingProps; // We already have an alternate. + // Reset the effect tag. + + workInProgress.effectTag = NoEffect; // The effect list is no longer valid. + + workInProgress.nextEffect = null; + workInProgress.firstEffect = null; + workInProgress.lastEffect = null; + + if (enableProfilerTimer) { + // We intentionally reset, rather than copy, actualDuration & actualStartTime. + // This prevents time from endlessly accumulating in new commits. + // This has the downside of resetting values for different priority renders, + // But works for yielding (the common case) and should support resuming. + workInProgress.actualDuration = 0; + workInProgress.actualStartTime = -1; + } + } + + workInProgress.childExpirationTime = current.childExpirationTime; + workInProgress.expirationTime = current.expirationTime; + workInProgress.child = current.child; + workInProgress.memoizedProps = current.memoizedProps; + workInProgress.memoizedState = current.memoizedState; + workInProgress.updateQueue = current.updateQueue; // Clone the dependencies object. This is mutated during the render phase, so + // it cannot be shared with the current fiber. + + var currentDependencies = current.dependencies; + workInProgress.dependencies = + currentDependencies === null + ? null + : { + expirationTime: currentDependencies.expirationTime, + firstContext: currentDependencies.firstContext, + responders: currentDependencies.responders, + }; // These will be overridden during the parent's reconciliation + + workInProgress.sibling = current.sibling; + workInProgress.index = current.index; + workInProgress.ref = current.ref; + + if (enableProfilerTimer) { + workInProgress.selfBaseDuration = current.selfBaseDuration; + workInProgress.treeBaseDuration = current.treeBaseDuration; + } + + { + workInProgress._debugNeedsRemount = current._debugNeedsRemount; + + switch (workInProgress.tag) { + case IndeterminateComponent: + case FunctionComponent: + case SimpleMemoComponent: + workInProgress.type = resolveFunctionForHotReloading(current.type); + break; + + case ClassComponent: + workInProgress.type = resolveClassForHotReloading(current.type); + break; + + case ForwardRef: + workInProgress.type = resolveForwardRefForHotReloading(current.type); + break; + + default: + break; + } + } + + return workInProgress; + } // Used to reuse a Fiber for a second pass. + + function resetWorkInProgress(workInProgress, renderExpirationTime) { + // This resets the Fiber to what createFiber or createWorkInProgress would + // have set the values to before during the first pass. Ideally this wouldn't + // be necessary but unfortunately many code paths reads from the workInProgress + // when they should be reading from current and writing to workInProgress. + // We assume pendingProps, index, key, ref, return are still untouched to + // avoid doing another reconciliation. + // Reset the effect tag but keep any Placement tags, since that's something + // that child fiber is setting, not the reconciliation. + workInProgress.effectTag &= Placement; // The effect list is no longer valid. + + workInProgress.nextEffect = null; + workInProgress.firstEffect = null; + workInProgress.lastEffect = null; + var current = workInProgress.alternate; + + if (current === null) { + // Reset to createFiber's initial values. + workInProgress.childExpirationTime = NoWork; + workInProgress.expirationTime = renderExpirationTime; + workInProgress.child = null; + workInProgress.memoizedProps = null; + workInProgress.memoizedState = null; + workInProgress.updateQueue = null; + workInProgress.dependencies = null; + + if (enableProfilerTimer) { + // Note: We don't reset the actualTime counts. It's useful to accumulate + // actual time across multiple render passes. + workInProgress.selfBaseDuration = 0; + workInProgress.treeBaseDuration = 0; + } + } else { + // Reset to the cloned values that createWorkInProgress would've. + workInProgress.childExpirationTime = current.childExpirationTime; + workInProgress.expirationTime = current.expirationTime; + workInProgress.child = current.child; + workInProgress.memoizedProps = current.memoizedProps; + workInProgress.memoizedState = current.memoizedState; + workInProgress.updateQueue = current.updateQueue; // Clone the dependencies object. This is mutated during the render phase, so + // it cannot be shared with the current fiber. + + var currentDependencies = current.dependencies; + workInProgress.dependencies = + currentDependencies === null + ? null + : { + expirationTime: currentDependencies.expirationTime, + firstContext: currentDependencies.firstContext, + responders: currentDependencies.responders, + }; + + if (enableProfilerTimer) { + // Note: We don't reset the actualTime counts. It's useful to accumulate + // actual time across multiple render passes. + workInProgress.selfBaseDuration = current.selfBaseDuration; + workInProgress.treeBaseDuration = current.treeBaseDuration; + } + } + + return workInProgress; + } + function createHostRootFiber(tag) { + var mode; + + if (tag === ConcurrentRoot) { + mode = ConcurrentMode | BlockingMode | StrictMode; + } else if (tag === BlockingRoot) { + mode = BlockingMode | StrictMode; + } else { + mode = NoMode; + } + + if (enableProfilerTimer && isDevToolsPresent) { + // Always collect profile timings when DevTools are present. + // This enables DevTools to start capturing timing at any point– + // Without some nodes in the tree having empty base times. + mode |= ProfileMode; + } + + return createFiber(HostRoot, null, null, mode); + } + function createFiberFromTypeAndProps( + type, // React$ElementType + key, + pendingProps, + owner, + mode, + expirationTime, + ) { + var fiber; + var fiberTag = IndeterminateComponent; // The resolved type is set if we know what the final type will be. I.e. it's not lazy. + + var resolvedType = type; + + if (typeof type === 'function') { + if (shouldConstruct(type)) { + fiberTag = ClassComponent; + + { + resolvedType = resolveClassForHotReloading(resolvedType); + } + } else { + { + resolvedType = resolveFunctionForHotReloading(resolvedType); + } + } + } else if (typeof type === 'string') { + fiberTag = HostComponent; + } else { + getTag: switch (type) { + case REACT_FRAGMENT_TYPE: + return createFiberFromFragment(pendingProps.children, mode, expirationTime, key); + + case REACT_CONCURRENT_MODE_TYPE: + fiberTag = Mode; + mode |= ConcurrentMode | BlockingMode | StrictMode; + break; + + case REACT_STRICT_MODE_TYPE: + fiberTag = Mode; + mode |= StrictMode; + break; + + case REACT_PROFILER_TYPE: + return createFiberFromProfiler(pendingProps, mode, expirationTime, key); + + case REACT_SUSPENSE_TYPE: + return createFiberFromSuspense(pendingProps, mode, expirationTime, key); + + case REACT_SUSPENSE_LIST_TYPE: + return createFiberFromSuspenseList(pendingProps, mode, expirationTime, key); + + default: { + if (typeof type === 'object' && type !== null) { + switch (type.$$typeof) { + case REACT_PROVIDER_TYPE: + fiberTag = ContextProvider; + break getTag; + + case REACT_CONTEXT_TYPE: + // This is a consumer + fiberTag = ContextConsumer; + break getTag; + + case REACT_FORWARD_REF_TYPE: + fiberTag = ForwardRef; + + { + resolvedType = resolveForwardRefForHotReloading(resolvedType); + } + + break getTag; + + case REACT_MEMO_TYPE: + fiberTag = MemoComponent; + break getTag; + + case REACT_LAZY_TYPE: + fiberTag = LazyComponent; + resolvedType = null; + break getTag; + + case REACT_FUNDAMENTAL_TYPE: + if (enableFundamentalAPI) { + return createFiberFromFundamental(type, pendingProps, mode, expirationTime, key); + } + + break; + + case REACT_SCOPE_TYPE: + if (enableScopeAPI) { + return createFiberFromScope(type, pendingProps, mode, expirationTime, key); + } + } + } + + var info = ''; + + { + if ( + type === undefined || + (typeof type === 'object' && type !== null && Object.keys(type).length === 0) + ) { + info += + ' You likely forgot to export your component from the file ' + + "it's defined in, or you might have mixed up default and " + + 'named imports.'; + } + + var ownerName = owner ? getComponentName(owner.type) : null; + + if (ownerName) { + info += '\n\nCheck the render method of `' + ownerName + '`.'; + } + } + + { + { + throw Error( + 'Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: ' + + (type == null ? type : typeof type) + + '.' + + info, + ); + } + } + } + } + } + + fiber = createFiber(fiberTag, pendingProps, key, mode); + fiber.elementType = type; + fiber.type = resolvedType; + fiber.expirationTime = expirationTime; + return fiber; + } + function createFiberFromElement(element, mode, expirationTime) { + var owner = null; + + { + owner = element._owner; + } + + var type = element.type; + var key = element.key; + var pendingProps = element.props; + var fiber = createFiberFromTypeAndProps(type, key, pendingProps, owner, mode, expirationTime); + + { + fiber._debugSource = element._source; + fiber._debugOwner = element._owner; + } + + return fiber; + } + function createFiberFromFragment(elements, mode, expirationTime, key) { + var fiber = createFiber(Fragment, elements, key, mode); + fiber.expirationTime = expirationTime; + return fiber; + } + function createFiberFromFundamental(fundamentalComponent, pendingProps, mode, expirationTime, key) { + var fiber = createFiber(FundamentalComponent, pendingProps, key, mode); + fiber.elementType = fundamentalComponent; + fiber.type = fundamentalComponent; + fiber.expirationTime = expirationTime; + return fiber; + } + + function createFiberFromScope(scope, pendingProps, mode, expirationTime, key) { + var fiber = createFiber(ScopeComponent, pendingProps, key, mode); + fiber.type = scope; + fiber.elementType = scope; + fiber.expirationTime = expirationTime; + return fiber; + } + + function createFiberFromProfiler(pendingProps, mode, expirationTime, key) { + { + if (typeof pendingProps.id !== 'string' || typeof pendingProps.onRender !== 'function') { + warningWithoutStack$1( + false, + 'Profiler must specify an "id" string and "onRender" function as props', + ); + } + } + + var fiber = createFiber(Profiler, pendingProps, key, mode | ProfileMode); // TODO: The Profiler fiber shouldn't have a type. It has a tag. + + fiber.elementType = REACT_PROFILER_TYPE; + fiber.type = REACT_PROFILER_TYPE; + fiber.expirationTime = expirationTime; + return fiber; + } + + function createFiberFromSuspense(pendingProps, mode, expirationTime, key) { + var fiber = createFiber(SuspenseComponent, pendingProps, key, mode); // TODO: The SuspenseComponent fiber shouldn't have a type. It has a tag. + // This needs to be fixed in getComponentName so that it relies on the tag + // instead. + + fiber.type = REACT_SUSPENSE_TYPE; + fiber.elementType = REACT_SUSPENSE_TYPE; + fiber.expirationTime = expirationTime; + return fiber; + } + function createFiberFromSuspenseList(pendingProps, mode, expirationTime, key) { + var fiber = createFiber(SuspenseListComponent, pendingProps, key, mode); + + { + // TODO: The SuspenseListComponent fiber shouldn't have a type. It has a tag. + // This needs to be fixed in getComponentName so that it relies on the tag + // instead. + fiber.type = REACT_SUSPENSE_LIST_TYPE; + } + + fiber.elementType = REACT_SUSPENSE_LIST_TYPE; + fiber.expirationTime = expirationTime; + return fiber; + } + function createFiberFromText(content, mode, expirationTime) { + var fiber = createFiber(HostText, content, null, mode); + fiber.expirationTime = expirationTime; + return fiber; + } + function createFiberFromHostInstanceForDeletion() { + var fiber = createFiber(HostComponent, null, null, NoMode); // TODO: These should not need a type. + + fiber.elementType = 'DELETED'; + fiber.type = 'DELETED'; + return fiber; + } + function createFiberFromDehydratedFragment(dehydratedNode) { + var fiber = createFiber(DehydratedFragment, null, null, NoMode); + fiber.stateNode = dehydratedNode; + return fiber; + } + function createFiberFromPortal(portal, mode, expirationTime) { + var pendingProps = portal.children !== null ? portal.children : []; + var fiber = createFiber(HostPortal, pendingProps, portal.key, mode); + fiber.expirationTime = expirationTime; + fiber.stateNode = { + containerInfo: portal.containerInfo, + pendingChildren: null, + // Used by persistent updates + implementation: portal.implementation, + }; + return fiber; + } // Used for stashing WIP properties to replay failed work in DEV. + + function assignFiberPropertiesInDEV(target, source) { + if (target === null) { + // This Fiber's initial properties will always be overwritten. + // We only use a Fiber to ensure the same hidden class so DEV isn't slow. + target = createFiber(IndeterminateComponent, null, null, NoMode); + } // This is intentionally written as a list of all properties. + // We tried to use Object.assign() instead but this is called in + // the hottest path, and Object.assign() was too slow: + // https://github.com/facebook/react/issues/12502 + // This code is DEV-only so size is not a concern. + + target.tag = source.tag; + target.key = source.key; + target.elementType = source.elementType; + target.type = source.type; + target.stateNode = source.stateNode; + target.return = source.return; + target.child = source.child; + target.sibling = source.sibling; + target.index = source.index; + target.ref = source.ref; + target.pendingProps = source.pendingProps; + target.memoizedProps = source.memoizedProps; + target.updateQueue = source.updateQueue; + target.memoizedState = source.memoizedState; + target.dependencies = source.dependencies; + target.mode = source.mode; + target.effectTag = source.effectTag; + target.nextEffect = source.nextEffect; + target.firstEffect = source.firstEffect; + target.lastEffect = source.lastEffect; + target.expirationTime = source.expirationTime; + target.childExpirationTime = source.childExpirationTime; + target.alternate = source.alternate; + + if (enableProfilerTimer) { + target.actualDuration = source.actualDuration; + target.actualStartTime = source.actualStartTime; + target.selfBaseDuration = source.selfBaseDuration; + target.treeBaseDuration = source.treeBaseDuration; + } + + target._debugID = source._debugID; + target._debugSource = source._debugSource; + target._debugOwner = source._debugOwner; + target._debugIsCurrentlyTiming = source._debugIsCurrentlyTiming; + target._debugNeedsRemount = source._debugNeedsRemount; + target._debugHookTypes = source._debugHookTypes; + return target; + } + + function FiberRootNode(containerInfo, tag, hydrate) { + this.tag = tag; + this.current = null; + this.containerInfo = containerInfo; + this.pendingChildren = null; + this.pingCache = null; + this.finishedExpirationTime = NoWork; + this.finishedWork = null; + this.timeoutHandle = noTimeout; + this.context = null; + this.pendingContext = null; + this.hydrate = hydrate; + this.callbackNode = null; + this.callbackPriority = NoPriority; + this.firstPendingTime = NoWork; + this.firstSuspendedTime = NoWork; + this.lastSuspendedTime = NoWork; + this.nextKnownPendingLevel = NoWork; + this.lastPingedTime = NoWork; + this.lastExpiredTime = NoWork; + + if (enableSchedulerTracing) { + this.interactionThreadID = tracing.unstable_getThreadID(); + this.memoizedInteractions = new Set(); + this.pendingInteractionMap = new Map(); + } + + if (enableSuspenseCallback) { + this.hydrationCallbacks = null; + } + } + + function createFiberRoot(containerInfo, tag, hydrate, hydrationCallbacks) { + var root = new FiberRootNode(containerInfo, tag, hydrate); + + if (enableSuspenseCallback) { + root.hydrationCallbacks = hydrationCallbacks; + } // Cyclic construction. This cheats the type system right now because + // stateNode is any. + + var uninitializedFiber = createHostRootFiber(tag); + root.current = uninitializedFiber; + uninitializedFiber.stateNode = root; + return root; + } + function isRootSuspendedAtTime(root, expirationTime) { + var firstSuspendedTime = root.firstSuspendedTime; + var lastSuspendedTime = root.lastSuspendedTime; + return ( + firstSuspendedTime !== NoWork && + firstSuspendedTime >= expirationTime && + lastSuspendedTime <= expirationTime + ); + } + function markRootSuspendedAtTime(root, expirationTime) { + var firstSuspendedTime = root.firstSuspendedTime; + var lastSuspendedTime = root.lastSuspendedTime; + + if (firstSuspendedTime < expirationTime) { + root.firstSuspendedTime = expirationTime; + } + + if (lastSuspendedTime > expirationTime || firstSuspendedTime === NoWork) { + root.lastSuspendedTime = expirationTime; + } + + if (expirationTime <= root.lastPingedTime) { + root.lastPingedTime = NoWork; + } + + if (expirationTime <= root.lastExpiredTime) { + root.lastExpiredTime = NoWork; + } + } + function markRootUpdatedAtTime(root, expirationTime) { + // Update the range of pending times + var firstPendingTime = root.firstPendingTime; + + if (expirationTime > firstPendingTime) { + root.firstPendingTime = expirationTime; + } // Update the range of suspended times. Treat everything lower priority or + // equal to this update as unsuspended. + + var firstSuspendedTime = root.firstSuspendedTime; + + if (firstSuspendedTime !== NoWork) { + if (expirationTime >= firstSuspendedTime) { + // The entire suspended range is now unsuspended. + root.firstSuspendedTime = root.lastSuspendedTime = root.nextKnownPendingLevel = NoWork; + } else if (expirationTime >= root.lastSuspendedTime) { + root.lastSuspendedTime = expirationTime + 1; + } // This is a pending level. Check if it's higher priority than the next + // known pending level. + + if (expirationTime > root.nextKnownPendingLevel) { + root.nextKnownPendingLevel = expirationTime; + } + } + } + function markRootFinishedAtTime(root, finishedExpirationTime, remainingExpirationTime) { + // Update the range of pending times + root.firstPendingTime = remainingExpirationTime; // Update the range of suspended times. Treat everything higher priority or + // equal to this update as unsuspended. + + if (finishedExpirationTime <= root.lastSuspendedTime) { + // The entire suspended range is now unsuspended. + root.firstSuspendedTime = root.lastSuspendedTime = root.nextKnownPendingLevel = NoWork; + } else if (finishedExpirationTime <= root.firstSuspendedTime) { + // Part of the suspended range is now unsuspended. Narrow the range to + // include everything between the unsuspended time (non-inclusive) and the + // last suspended time. + root.firstSuspendedTime = finishedExpirationTime - 1; + } + + if (finishedExpirationTime <= root.lastPingedTime) { + // Clear the pinged time + root.lastPingedTime = NoWork; + } + + if (finishedExpirationTime <= root.lastExpiredTime) { + // Clear the expired time + root.lastExpiredTime = NoWork; + } + } + function markRootExpiredAtTime(root, expirationTime) { + var lastExpiredTime = root.lastExpiredTime; + + if (lastExpiredTime === NoWork || lastExpiredTime > expirationTime) { + root.lastExpiredTime = expirationTime; + } + } + + // This lets us hook into Fiber to debug what it's doing. + // See https://github.com/facebook/react/pull/8033. + // This is not part of the public API, not even for React DevTools. + // You may only inject a debugTool if you work on React Fiber itself. + var ReactFiberInstrumentation = { + debugTool: null, + }; + var ReactFiberInstrumentation_1 = ReactFiberInstrumentation; + + var didWarnAboutNestedUpdates; + var didWarnAboutFindNodeInStrictMode; + + { + didWarnAboutNestedUpdates = false; + didWarnAboutFindNodeInStrictMode = {}; + } + + function getContextForSubtree(parentComponent) { + if (!parentComponent) { + return emptyContextObject; + } + + var fiber = get(parentComponent); + var parentContext = findCurrentUnmaskedContext(fiber); + + if (fiber.tag === ClassComponent) { + var Component = fiber.type; + + if (isContextProvider(Component)) { + return processChildContext(fiber, Component, parentContext); + } + } + + return parentContext; + } + + function findHostInstance(component) { + var fiber = get(component); + + if (fiber === undefined) { + if (typeof component.render === 'function') { + { + { + throw Error('Unable to find node on an unmounted component.'); + } + } + } else { + { + { + throw Error( + 'Argument appears to not be a ReactComponent. Keys: ' + Object.keys(component), + ); + } + } + } + } + + var hostFiber = findCurrentHostFiber(fiber); + + if (hostFiber === null) { + return null; + } + + return hostFiber.stateNode; + } + + function findHostInstanceWithWarning(component, methodName) { + { + var fiber = get(component); + + if (fiber === undefined) { + if (typeof component.render === 'function') { + { + { + throw Error('Unable to find node on an unmounted component.'); + } + } + } else { + { + { + throw Error( + 'Argument appears to not be a ReactComponent. Keys: ' + Object.keys(component), + ); + } + } + } + } + + var hostFiber = findCurrentHostFiber(fiber); + + if (hostFiber === null) { + return null; + } + + if (hostFiber.mode & StrictMode) { + var componentName = getComponentName(fiber.type) || 'Component'; + + if (!didWarnAboutFindNodeInStrictMode[componentName]) { + didWarnAboutFindNodeInStrictMode[componentName] = true; + + if (fiber.mode & StrictMode) { + warningWithoutStack$1( + false, + '%s is deprecated in StrictMode. ' + + '%s was passed an instance of %s which is inside StrictMode. ' + + 'Instead, add a ref directly to the element you want to reference. ' + + 'Learn more about using refs safely here: ' + + 'https://fb.me/react-strict-mode-find-node%s', + methodName, + methodName, + componentName, + getStackByFiberInDevAndProd(hostFiber), + ); + } else { + warningWithoutStack$1( + false, + '%s is deprecated in StrictMode. ' + + '%s was passed an instance of %s which renders StrictMode children. ' + + 'Instead, add a ref directly to the element you want to reference. ' + + 'Learn more about using refs safely here: ' + + 'https://fb.me/react-strict-mode-find-node%s', + methodName, + methodName, + componentName, + getStackByFiberInDevAndProd(hostFiber), + ); + } + } + } + + return hostFiber.stateNode; + } + + return findHostInstance(component); + } + + function createContainer(containerInfo, tag, hydrate, hydrationCallbacks) { + return createFiberRoot(containerInfo, tag, hydrate, hydrationCallbacks); + } + function updateContainer(element, container, parentComponent, callback) { + var current$$1 = container.current; + var currentTime = requestCurrentTimeForUpdate(); + + { + // $FlowExpectedError - jest isn't a global, and isn't recognized outside of tests + if ('undefined' !== typeof jest) { + warnIfUnmockedScheduler(current$$1); + warnIfNotScopedWithMatchingAct(current$$1); + } + } + + var suspenseConfig = requestCurrentSuspenseConfig(); + var expirationTime = computeExpirationForFiber(currentTime, current$$1, suspenseConfig); + + { + if (ReactFiberInstrumentation_1.debugTool) { + if (current$$1.alternate === null) { + ReactFiberInstrumentation_1.debugTool.onMountContainer(container); + } else if (element === null) { + ReactFiberInstrumentation_1.debugTool.onUnmountContainer(container); + } else { + ReactFiberInstrumentation_1.debugTool.onUpdateContainer(container); + } + } + } + + var context = getContextForSubtree(parentComponent); + + if (container.context === null) { + container.context = context; + } else { + container.pendingContext = context; + } + + { + if (phase === 'render' && current !== null && !didWarnAboutNestedUpdates) { + didWarnAboutNestedUpdates = true; + warningWithoutStack$1( + false, + 'Render methods should be a pure function of props and state; ' + + 'triggering nested component updates from render is not allowed. ' + + 'If necessary, trigger nested updates in componentDidUpdate.\n\n' + + 'Check the render method of %s.', + getComponentName(current.type) || 'Unknown', + ); + } + } + + var update = createUpdate(expirationTime, suspenseConfig); // Caution: React DevTools currently depends on this property + // being called "element". + + update.payload = { + element: element, + }; + callback = callback === undefined ? null : callback; + + if (callback !== null) { + !(typeof callback === 'function') + ? warningWithoutStack$1( + false, + 'render(...): Expected the last optional `callback` argument to be a ' + + 'function. Instead received: %s.', + callback, + ) + : void 0; + update.callback = callback; + } + + enqueueUpdate(current$$1, update); + scheduleWork(current$$1, expirationTime); + return expirationTime; + } + function getPublicRootInstance(container) { + var containerFiber = container.current; + + if (!containerFiber.child) { + return null; + } + + switch (containerFiber.child.tag) { + case HostComponent: + return getPublicInstance(containerFiber.child.stateNode); + + default: + return containerFiber.child.stateNode; + } + } + function attemptSynchronousHydration$1(fiber) { + switch (fiber.tag) { + case HostRoot: + var root = fiber.stateNode; + + if (root.hydrate) { + // Flush the first scheduled "update". + flushRoot(root, root.firstPendingTime); + } + + break; + + case SuspenseComponent: + flushSync(function () { + return scheduleWork(fiber, Sync); + }); // If we're still blocked after this, we need to increase + // the priority of any promises resolving within this + // boundary so that they next attempt also has higher pri. + + var retryExpTime = computeInteractiveExpiration(requestCurrentTimeForUpdate()); + markRetryTimeIfNotHydrated(fiber, retryExpTime); + break; + } + } + + function markRetryTimeImpl(fiber, retryTime) { + var suspenseState = fiber.memoizedState; + + if (suspenseState !== null && suspenseState.dehydrated !== null) { + if (suspenseState.retryTime < retryTime) { + suspenseState.retryTime = retryTime; + } + } + } // Increases the priority of thennables when they resolve within this boundary. + + function markRetryTimeIfNotHydrated(fiber, retryTime) { + markRetryTimeImpl(fiber, retryTime); + var alternate = fiber.alternate; + + if (alternate) { + markRetryTimeImpl(alternate, retryTime); + } + } + + function attemptUserBlockingHydration$1(fiber) { + if (fiber.tag !== SuspenseComponent) { + // We ignore HostRoots here because we can't increase + // their priority and they should not suspend on I/O, + // since you have to wrap anything that might suspend in + // Suspense. + return; + } + + var expTime = computeInteractiveExpiration(requestCurrentTimeForUpdate()); + scheduleWork(fiber, expTime); + markRetryTimeIfNotHydrated(fiber, expTime); + } + function attemptContinuousHydration$1(fiber) { + if (fiber.tag !== SuspenseComponent) { + // We ignore HostRoots here because we can't increase + // their priority and they should not suspend on I/O, + // since you have to wrap anything that might suspend in + // Suspense. + return; + } + + var expTime = computeContinuousHydrationExpiration(requestCurrentTimeForUpdate()); + scheduleWork(fiber, expTime); + markRetryTimeIfNotHydrated(fiber, expTime); + } + function attemptHydrationAtCurrentPriority$1(fiber) { + if (fiber.tag !== SuspenseComponent) { + // We ignore HostRoots here because we can't increase + // their priority other than synchronously flush it. + return; + } + + var currentTime = requestCurrentTimeForUpdate(); + var expTime = computeExpirationForFiber(currentTime, fiber, null); + scheduleWork(fiber, expTime); + markRetryTimeIfNotHydrated(fiber, expTime); + } + function findHostInstanceWithNoPortals(fiber) { + var hostFiber = findCurrentHostFiberWithNoPortals(fiber); + + if (hostFiber === null) { + return null; + } + + if (hostFiber.tag === FundamentalComponent) { + return hostFiber.stateNode.instance; + } + + return hostFiber.stateNode; + } + + var shouldSuspendImpl = function (fiber) { + return false; + }; + + function shouldSuspend(fiber) { + return shouldSuspendImpl(fiber); + } + var overrideHookState = null; + var overrideProps = null; + var scheduleUpdate = null; + var setSuspenseHandler = null; + + { + var copyWithSetImpl = function (obj, path, idx, value) { + if (idx >= path.length) { + return value; + } + + var key = path[idx]; + var updated = Array.isArray(obj) ? obj.slice() : _assign({}, obj); // $FlowFixMe number or string is fine here + + updated[key] = copyWithSetImpl(obj[key], path, idx + 1, value); + return updated; + }; + + var copyWithSet = function (obj, path, value) { + return copyWithSetImpl(obj, path, 0, value); + }; // Support DevTools editable values for useState and useReducer. + + overrideHookState = function (fiber, id, path, value) { + // For now, the "id" of stateful hooks is just the stateful hook index. + // This may change in the future with e.g. nested hooks. + var currentHook = fiber.memoizedState; + + while (currentHook !== null && id > 0) { + currentHook = currentHook.next; + id--; + } + + if (currentHook !== null) { + var newState = copyWithSet(currentHook.memoizedState, path, value); + currentHook.memoizedState = newState; + currentHook.baseState = newState; // We aren't actually adding an update to the queue, + // because there is no update we can add for useReducer hooks that won't trigger an error. + // (There's no appropriate action type for DevTools overrides.) + // As a result though, React will see the scheduled update as a noop and bailout. + // Shallow cloning props works as a workaround for now to bypass the bailout check. + + fiber.memoizedProps = _assign({}, fiber.memoizedProps); + scheduleWork(fiber, Sync); + } + }; // Support DevTools props for function components, forwardRef, memo, host components, etc. + + overrideProps = function (fiber, path, value) { + fiber.pendingProps = copyWithSet(fiber.memoizedProps, path, value); + + if (fiber.alternate) { + fiber.alternate.pendingProps = fiber.pendingProps; + } + + scheduleWork(fiber, Sync); + }; + + scheduleUpdate = function (fiber) { + scheduleWork(fiber, Sync); + }; + + setSuspenseHandler = function (newShouldSuspendImpl) { + shouldSuspendImpl = newShouldSuspendImpl; + }; + } + + function injectIntoDevTools(devToolsConfig) { + var findFiberByHostInstance = devToolsConfig.findFiberByHostInstance; + var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher; + return injectInternals( + _assign({}, devToolsConfig, { + overrideHookState: overrideHookState, + overrideProps: overrideProps, + setSuspenseHandler: setSuspenseHandler, + scheduleUpdate: scheduleUpdate, + currentDispatcherRef: ReactCurrentDispatcher, + findHostInstanceByFiber: function (fiber) { + var hostFiber = findCurrentHostFiber(fiber); + + if (hostFiber === null) { + return null; + } + + return hostFiber.stateNode; + }, + findFiberByHostInstance: function (instance) { + if (!findFiberByHostInstance) { + // Might not be implemented by the renderer. + return null; + } + + return findFiberByHostInstance(instance); + }, + // React Refresh + findHostInstancesForRefresh: findHostInstancesForRefresh, + scheduleRefresh: scheduleRefresh, + scheduleRoot: scheduleRoot, + setRefreshHandler: setRefreshHandler, + // Enables DevTools to append owner stacks to error messages in DEV mode. + getCurrentFiber: function () { + return current; + }, + }), + ); + } + + // This file intentionally does *not* have the Flow annotation. + // Don't add it. See `./inline-typed.js` for an explanation. + + // TODO: This type is shared between the reconciler and ReactDOM, but will + // eventually be lifted out to the renderer. + function ReactDOMRoot(container, options) { + this._internalRoot = createRootImpl(container, ConcurrentRoot, options); + } + + function ReactDOMBlockingRoot(container, tag, options) { + this._internalRoot = createRootImpl(container, tag, options); + } + + ReactDOMRoot.prototype.render = ReactDOMBlockingRoot.prototype.render = function ( + children, + callback, + ) { + var root = this._internalRoot; + var cb = callback === undefined ? null : callback; + + { + warnOnInvalidCallback(cb, 'render'); + } + + updateContainer(children, root, null, cb); + }; + + ReactDOMRoot.prototype.unmount = ReactDOMBlockingRoot.prototype.unmount = function (callback) { + var root = this._internalRoot; + var cb = callback === undefined ? null : callback; + + { + warnOnInvalidCallback(cb, 'render'); + } + + var container = root.containerInfo; + updateContainer(null, root, null, function () { + unmarkContainerAsRoot(container); + + if (cb !== null) { + cb(); + } + }); + }; + + function createRootImpl(container, tag, options) { + // Tag is either LegacyRoot or Concurrent Root + var hydrate = options != null && options.hydrate === true; + var hydrationCallbacks = (options != null && options.hydrationOptions) || null; + var root = createContainer(container, tag, hydrate, hydrationCallbacks); + markContainerAsRoot(root.current, container); + + if (hydrate && tag !== LegacyRoot) { + var doc = container.nodeType === DOCUMENT_NODE ? container : container.ownerDocument; + eagerlyTrapReplayableEvents(doc); + } + + return root; + } + + function createRoot(container, options) { + if (!isValidContainer(container)) { + { + throw Error('createRoot(...): Target container is not a DOM element.'); + } + } + + warnIfReactDOMContainerInDEV(container); + return new ReactDOMRoot(container, options); + } + function createBlockingRoot(container, options) { + if (!isValidContainer(container)) { + { + throw Error('createRoot(...): Target container is not a DOM element.'); + } + } + + warnIfReactDOMContainerInDEV(container); + return new ReactDOMBlockingRoot(container, BlockingRoot, options); + } + function createLegacyRoot(container, options) { + return new ReactDOMBlockingRoot(container, LegacyRoot, options); + } + function isValidContainer(node) { + return !!( + node && + (node.nodeType === ELEMENT_NODE || + node.nodeType === DOCUMENT_NODE || + node.nodeType === DOCUMENT_FRAGMENT_NODE || + (node.nodeType === COMMENT_NODE && node.nodeValue === ' react-mount-point-unstable ')) + ); + } + function warnOnInvalidCallback(callback, callerName) { + { + !(callback === null || typeof callback === 'function') + ? warningWithoutStack$1( + false, + '%s(...): Expected the last optional `callback` argument to be a ' + + 'function. Instead received: %s.', + callerName, + callback, + ) + : void 0; + } + } + + function warnIfReactDOMContainerInDEV(container) { + { + if (isContainerMarkedAsRoot(container)) { + if (container._reactRootContainer) { + warningWithoutStack$1( + false, + 'You are calling ReactDOM.createRoot() on a container that was previously ' + + 'passed to ReactDOM.render(). This is not supported.', + ); + } else { + warningWithoutStack$1( + false, + 'You are calling ReactDOM.createRoot() on a container that ' + + 'has already been passed to createRoot() before. Instead, call ' + + 'root.render() on the existing root instead if you want to update it.', + ); + } + } + } + } + + var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner; + var topLevelUpdateWarnings; + var warnedAboutHydrateAPI = false; + + { + topLevelUpdateWarnings = function (container) { + if (container._reactRootContainer && container.nodeType !== COMMENT_NODE) { + var hostInstance = findHostInstanceWithNoPortals( + container._reactRootContainer._internalRoot.current, + ); + + if (hostInstance) { + !(hostInstance.parentNode === container) + ? warningWithoutStack$1( + false, + 'render(...): It looks like the React-rendered content of this ' + + 'container was removed without using React. This is not ' + + 'supported and will cause errors. Instead, call ' + + 'ReactDOM.unmountComponentAtNode to empty a container.', + ) + : void 0; + } + } + + var isRootRenderedBySomeReact = !!container._reactRootContainer; + var rootEl = getReactRootElementInContainer(container); + var hasNonRootReactChild = !!(rootEl && getInstanceFromNode$1(rootEl)); + !(!hasNonRootReactChild || isRootRenderedBySomeReact) + ? warningWithoutStack$1( + false, + 'render(...): Replacing React-rendered children with a new root ' + + 'component. If you intended to update the children of this node, ' + + 'you should instead have the existing children update their state ' + + 'and render the new components instead of calling ReactDOM.render.', + ) + : void 0; + !( + container.nodeType !== ELEMENT_NODE || + !container.tagName || + container.tagName.toUpperCase() !== 'BODY' + ) + ? warningWithoutStack$1( + false, + 'render(): Rendering components directly into document.body is ' + + 'discouraged, since its children are often manipulated by third-party ' + + 'scripts and browser extensions. This may lead to subtle ' + + 'reconciliation issues. Try rendering into a container element created ' + + 'for your app.', + ) + : void 0; + }; + } + + function getReactRootElementInContainer(container) { + if (!container) { + return null; + } + + if (container.nodeType === DOCUMENT_NODE) { + return container.documentElement; + } else { + return container.firstChild; + } + } + + function shouldHydrateDueToLegacyHeuristic(container) { + var rootElement = getReactRootElementInContainer(container); + return !!( + rootElement && + rootElement.nodeType === ELEMENT_NODE && + rootElement.hasAttribute(ROOT_ATTRIBUTE_NAME) + ); + } + + function legacyCreateRootFromDOMContainer(container, forceHydrate) { + var shouldHydrate = forceHydrate || shouldHydrateDueToLegacyHeuristic(container); // First clear any existing content. + + if (!shouldHydrate) { + var warned = false; + var rootSibling; + + while ((rootSibling = container.lastChild)) { + { + if ( + !warned && + rootSibling.nodeType === ELEMENT_NODE && + rootSibling.hasAttribute(ROOT_ATTRIBUTE_NAME) + ) { + warned = true; + warningWithoutStack$1( + false, + 'render(): Target node has markup rendered by React, but there ' + + 'are unrelated nodes as well. This is most commonly caused by ' + + 'white-space inserted around server-rendered markup.', + ); + } + } + + container.removeChild(rootSibling); + } + } + + { + if (shouldHydrate && !forceHydrate && !warnedAboutHydrateAPI) { + warnedAboutHydrateAPI = true; + lowPriorityWarningWithoutStack$1( + false, + 'render(): Calling ReactDOM.render() to hydrate server-rendered markup ' + + 'will stop working in React v17. Replace the ReactDOM.render() call ' + + 'with ReactDOM.hydrate() if you want React to attach to the server HTML.', + ); + } + } + + return createLegacyRoot( + container, + shouldHydrate + ? { + hydrate: true, + } + : undefined, + ); + } + + function legacyRenderSubtreeIntoContainer( + parentComponent, + children, + container, + forceHydrate, + callback, + ) { + { + topLevelUpdateWarnings(container); + warnOnInvalidCallback(callback === undefined ? null : callback, 'render'); + } // TODO: Without `any` type, Flow says "Property cannot be accessed on any + // member of intersection type." Whyyyyyy. + + var root = container._reactRootContainer; + var fiberRoot; + + if (!root) { + // Initial mount + root = container._reactRootContainer = legacyCreateRootFromDOMContainer( + container, + forceHydrate, + ); + fiberRoot = root._internalRoot; + + if (typeof callback === 'function') { + var originalCallback = callback; + + callback = function () { + var instance = getPublicRootInstance(fiberRoot); + originalCallback.call(instance); + }; + } // Initial mount should not be batched. + + unbatchedUpdates(function () { + updateContainer(children, fiberRoot, parentComponent, callback); + }); + } else { + fiberRoot = root._internalRoot; + + if (typeof callback === 'function') { + var _originalCallback = callback; + + callback = function () { + var instance = getPublicRootInstance(fiberRoot); + + _originalCallback.call(instance); + }; + } // Update + + updateContainer(children, fiberRoot, parentComponent, callback); + } + + return getPublicRootInstance(fiberRoot); + } + + function findDOMNode(componentOrElement) { + { + var owner = ReactCurrentOwner$1.current; + + if (owner !== null && owner.stateNode !== null) { + var warnedAboutRefsInRender = owner.stateNode._warnedAboutRefsInRender; + !warnedAboutRefsInRender + ? warningWithoutStack$1( + false, + '%s is accessing findDOMNode inside its render(). ' + + 'render() should be a pure function of props and state. It should ' + + 'never access something that requires stale data from the previous ' + + 'render, such as refs. Move this logic to componentDidMount and ' + + 'componentDidUpdate instead.', + getComponentName(owner.type) || 'A component', + ) + : void 0; + owner.stateNode._warnedAboutRefsInRender = true; + } + } + + if (componentOrElement == null) { + return null; + } + + if (componentOrElement.nodeType === ELEMENT_NODE) { + return componentOrElement; + } + + { + return findHostInstanceWithWarning(componentOrElement, 'findDOMNode'); + } + + return findHostInstance(componentOrElement); + } + function hydrate(element, container, callback) { + if (!isValidContainer(container)) { + { + throw Error('Target container is not a DOM element.'); + } + } + + { + var isModernRoot = + isContainerMarkedAsRoot(container) && container._reactRootContainer === undefined; + + if (isModernRoot) { + warningWithoutStack$1( + false, + 'You are calling ReactDOM.hydrate() on a container that was previously ' + + 'passed to ReactDOM.createRoot(). This is not supported. ' + + 'Did you mean to call createRoot(container, {hydrate: true}).render(element)?', + ); + } + } // TODO: throw or warn if we couldn't hydrate? + + return legacyRenderSubtreeIntoContainer(null, element, container, true, callback); + } + function render(element, container, callback) { + if (!isValidContainer(container)) { + { + throw Error('Target container is not a DOM element.'); + } + } + + { + var isModernRoot = + isContainerMarkedAsRoot(container) && container._reactRootContainer === undefined; + + if (isModernRoot) { + warningWithoutStack$1( + false, + 'You are calling ReactDOM.render() on a container that was previously ' + + 'passed to ReactDOM.createRoot(). This is not supported. ' + + 'Did you mean to call root.render(element)?', + ); + } + } + + return legacyRenderSubtreeIntoContainer(null, element, container, false, callback); + } + function unstable_renderSubtreeIntoContainer(parentComponent, element, containerNode, callback) { + if (!isValidContainer(containerNode)) { + { + throw Error('Target container is not a DOM element.'); + } + } + + if (!(parentComponent != null && has(parentComponent))) { + { + throw Error('parentComponent must be a valid React Component'); + } + } + + return legacyRenderSubtreeIntoContainer(parentComponent, element, containerNode, false, callback); + } + function unmountComponentAtNode(container) { + if (!isValidContainer(container)) { + { + throw Error('unmountComponentAtNode(...): Target container is not a DOM element.'); + } + } + + { + var isModernRoot = + isContainerMarkedAsRoot(container) && container._reactRootContainer === undefined; + + if (isModernRoot) { + warningWithoutStack$1( + false, + 'You are calling ReactDOM.unmountComponentAtNode() on a container that was previously ' + + 'passed to ReactDOM.createRoot(). This is not supported. Did you mean to call root.unmount()?', + ); + } + } + + if (container._reactRootContainer) { + { + var rootEl = getReactRootElementInContainer(container); + var renderedByDifferentReact = rootEl && !getInstanceFromNode$1(rootEl); + !!renderedByDifferentReact + ? warningWithoutStack$1( + false, + "unmountComponentAtNode(): The node you're attempting to unmount " + + 'was rendered by another copy of React.', + ) + : void 0; + } // Unmount should not be batched. + + unbatchedUpdates(function () { + legacyRenderSubtreeIntoContainer(null, null, container, false, function () { + container._reactRootContainer = null; + unmarkContainerAsRoot(container); + }); + }); // If you call unmountComponentAtNode twice in quick succession, you'll + // get `true` twice. That's probably fine? + + return true; + } else { + { + var _rootEl = getReactRootElementInContainer(container); + + var hasNonRootReactChild = !!(_rootEl && getInstanceFromNode$1(_rootEl)); // Check if the container itself is a React root node. + + var isContainerReactRoot = + container.nodeType === ELEMENT_NODE && + isValidContainer(container.parentNode) && + !!container.parentNode._reactRootContainer; + !!hasNonRootReactChild + ? warningWithoutStack$1( + false, + "unmountComponentAtNode(): The node you're attempting to unmount " + + 'was rendered by React and is not a top-level container. %s', + isContainerReactRoot + ? 'You may have accidentally passed in a React root node instead ' + + 'of its container.' + : 'Instead, have the parent component update its state and ' + + 'rerender in order to remove this component.', + ) + : void 0; + } + + return false; + } + } + + function createPortal$1( + children, + containerInfo, // TODO: figure out the API for cross-renderer implementation. + implementation, + ) { + var key = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null; + return { + // This tag allow us to uniquely identify this as a React Portal + $$typeof: REACT_PORTAL_TYPE, + key: key == null ? null : '' + key, + children: children, + containerInfo: containerInfo, + implementation: implementation, + }; + } + + // TODO: this is special because it gets imported during build. + + var ReactVersion = '16.12.0'; + + setAttemptSynchronousHydration(attemptSynchronousHydration$1); + setAttemptUserBlockingHydration(attemptUserBlockingHydration$1); + setAttemptContinuousHydration(attemptContinuousHydration$1); + setAttemptHydrationAtCurrentPriority(attemptHydrationAtCurrentPriority$1); + var didWarnAboutUnstableCreatePortal = false; + + { + if ( + typeof Map !== 'function' || // $FlowIssue Flow incorrectly thinks Map has no prototype + Map.prototype == null || + typeof Map.prototype.forEach !== 'function' || + typeof Set !== 'function' || // $FlowIssue Flow incorrectly thinks Set has no prototype + Set.prototype == null || + typeof Set.prototype.clear !== 'function' || + typeof Set.prototype.forEach !== 'function' + ) { + warningWithoutStack$1( + false, + 'React depends on Map and Set built-in types. Make sure that you load a ' + + 'polyfill in older browsers. https://fb.me/react-polyfills', + ); + } + } + + setRestoreImplementation(restoreControlledState$$1); + setBatchingImplementation( + batchedUpdates$1, + discreteUpdates$1, + flushDiscreteUpdates, + batchedEventUpdates$1, + ); + + function createPortal$$1(children, container) { + var key = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null; + + if (!isValidContainer(container)) { + { + throw Error('Target container is not a DOM element.'); + } + } // TODO: pass ReactDOM portal implementation as third argument + + return createPortal$1(children, container, null, key); + } + + var ReactDOM = { + createPortal: createPortal$$1, + // Legacy + findDOMNode: findDOMNode, + hydrate: hydrate, + render: render, + unstable_renderSubtreeIntoContainer: unstable_renderSubtreeIntoContainer, + unmountComponentAtNode: unmountComponentAtNode, + // Temporary alias since we already shipped React 16 RC with it. + // TODO: remove in React 17. + unstable_createPortal: function () { + if (!didWarnAboutUnstableCreatePortal) { + didWarnAboutUnstableCreatePortal = true; + lowPriorityWarningWithoutStack$1( + false, + 'The ReactDOM.unstable_createPortal() alias has been deprecated, ' + + 'and will be removed in React 17+. Update your code to use ' + + 'ReactDOM.createPortal() instead. It has the exact same API, ' + + 'but without the "unstable_" prefix.', + ); + } + + return createPortal$$1.apply(void 0, arguments); + }, + unstable_batchedUpdates: batchedUpdates$1, + flushSync: flushSync, + __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: { + // Keep in sync with ReactDOMUnstableNativeDependencies.js + // ReactTestUtils.js, and ReactTestUtilsAct.js. This is an array for better minification. + Events: [ + getInstanceFromNode$1, + getNodeFromInstance$1, + getFiberCurrentPropsFromNode$1, + injection.injectEventPluginsByName, + eventNameDispatchConfigs, + accumulateTwoPhaseDispatches, + accumulateDirectDispatches, + enqueueStateRestore, + restoreStateIfNeeded, + dispatchEvent, + runEventsInBatch, + flushPassiveEffects, + IsThisRendererActing, + ], + }, + }; + + if (exposeConcurrentModeAPIs) { + ReactDOM.createRoot = createRoot; + ReactDOM.createBlockingRoot = createBlockingRoot; + ReactDOM.unstable_discreteUpdates = discreteUpdates$1; + ReactDOM.unstable_flushDiscreteUpdates = flushDiscreteUpdates; + ReactDOM.unstable_flushControlled = flushControlled; + + ReactDOM.unstable_scheduleHydration = function (target) { + if (target) { + queueExplicitHydrationTarget(target); + } + }; + } + + var foundDevTools = injectIntoDevTools({ + findFiberByHostInstance: getClosestInstanceFromNode, + bundleType: 1, + version: ReactVersion, + rendererPackageName: 'react-dom', + }); + + { + if (!foundDevTools && canUseDOM && window.top === window.self) { + // If we're in Chrome or Firefox, provide a download link if not installed. + if ( + (navigator.userAgent.indexOf('Chrome') > -1 && navigator.userAgent.indexOf('Edge') === -1) || + navigator.userAgent.indexOf('Firefox') > -1 + ) { + var protocol = window.location.protocol; // Don't warn in exotic cases like chrome-extension://. + + if (/^(https?|file):$/.test(protocol)) { + console.info( + '%cDownload the React DevTools ' + + 'for a better development experience: ' + + 'https://fb.me/react-devtools' + + (protocol === 'file:' + ? '\nYou might need to use a local HTTP server (instead of file://): ' + + 'https://fb.me/react-devtools-faq' + : ''), + 'font-weight:bold', + ); + } + } + } + } + + var ReactDOM$2 = Object.freeze({ + default: ReactDOM, + }); + + var ReactDOM$3 = (ReactDOM$2 && ReactDOM) || ReactDOM$2; + + // TODO: decide on the top-level export form. + // This is hacky but makes it work with both Rollup and Jest. + + var reactDom = ReactDOM$3.default || ReactDOM$3; + + module.exports = reactDom; + })(); + } + + /***/ + }, + /* 511 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** @license React v16.12.0 + * react.development.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + + if (true) { + (function () { + 'use strict'; + + var _assign = __webpack_require__(63); + var checkPropTypes = __webpack_require__(106); + + // TODO: this is special because it gets imported during build. + + var ReactVersion = '16.12.0'; + + // The Symbol used to tag the ReactElement-like types. If there is no native Symbol + // nor polyfill, then a plain number is used for performance. + var hasSymbol = typeof Symbol === 'function' && Symbol.for; + var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7; + var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca; + var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb; + var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc; + var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2; + var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd; + var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary + // (unstable) APIs that have been removed. Can we remove the symbols? + + var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf; + var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0; + var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1; + var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8; + var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3; + var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4; + var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5; + var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6; + var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7; + var MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; + var FAUX_ITERATOR_SYMBOL = '@@iterator'; + function getIteratorFn(maybeIterable) { + if (maybeIterable === null || typeof maybeIterable !== 'object') { + return null; + } + + var maybeIterator = + (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) || + maybeIterable[FAUX_ITERATOR_SYMBOL]; + + if (typeof maybeIterator === 'function') { + return maybeIterator; + } + + return null; + } + + // Do not require this module directly! Use normal `invariant` calls with + // template literal strings. The messages will be replaced with error codes + // during build. + + /** + * Use invariant() to assert state which your program assumes to be true. + * + * Provide sprintf-style format (only %s is supported) and arguments + * to provide information about what broke and what you were + * expecting. + * + * The invariant message will be stripped in production, but the invariant + * will remain to ensure logic does not differ in production. + */ + + /** + * Forked from fbjs/warning: + * https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js + * + * Only change is we use console.warn instead of console.error, + * and do nothing when 'console' is not supported. + * This really simplifies the code. + * --- + * Similar to invariant but only logs a warning if the condition is not met. + * This can be used to log issues in development environments in critical + * paths. Removing the logging code for production environments will keep the + * same logic and follow the same code paths. + */ + var lowPriorityWarningWithoutStack = function () {}; + + { + var printWarning = function (format) { + for ( + var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; + _key < _len; + _key++ + ) { + args[_key - 1] = arguments[_key]; + } + + var argIndex = 0; + var message = + 'Warning: ' + + format.replace(/%s/g, function () { + return args[argIndex++]; + }); + + if (typeof console !== 'undefined') { + console.warn(message); + } + + try { + // --- Welcome to debugging React --- + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + throw new Error(message); + } catch (x) {} + }; + + lowPriorityWarningWithoutStack = function (condition, format) { + if (format === undefined) { + throw new Error( + '`lowPriorityWarningWithoutStack(condition, format, ...args)` requires a warning ' + + 'message argument', + ); + } + + if (!condition) { + for ( + var _len2 = arguments.length, args = new Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; + _key2 < _len2; + _key2++ + ) { + args[_key2 - 2] = arguments[_key2]; + } + + printWarning.apply(void 0, [format].concat(args)); + } + }; + } + + var lowPriorityWarningWithoutStack$1 = lowPriorityWarningWithoutStack; + + /** + * Similar to invariant but only logs a warning if the condition is not met. + * This can be used to log issues in development environments in critical + * paths. Removing the logging code for production environments will keep the + * same logic and follow the same code paths. + */ + var warningWithoutStack = function () {}; + + { + warningWithoutStack = function (condition, format) { + for ( + var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; + _key < _len; + _key++ + ) { + args[_key - 2] = arguments[_key]; + } + + if (format === undefined) { + throw new Error( + '`warningWithoutStack(condition, format, ...args)` requires a warning ' + + 'message argument', + ); + } + + if (args.length > 8) { + // Check before the condition to catch violations early. + throw new Error('warningWithoutStack() currently supports at most 8 arguments.'); + } + + if (condition) { + return; + } + + if (typeof console !== 'undefined') { + var argsWithFormat = args.map(function (item) { + return '' + item; + }); + argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it + // breaks IE9: https://github.com/facebook/react/issues/13610 + + Function.prototype.apply.call(console.error, console, argsWithFormat); + } + + try { + // --- Welcome to debugging React --- + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + var argIndex = 0; + var message = + 'Warning: ' + + format.replace(/%s/g, function () { + return args[argIndex++]; + }); + throw new Error(message); + } catch (x) {} + }; + } + + var warningWithoutStack$1 = warningWithoutStack; + + var didWarnStateUpdateForUnmountedComponent = {}; + + function warnNoop(publicInstance, callerName) { + { + var _constructor = publicInstance.constructor; + var componentName = + (_constructor && (_constructor.displayName || _constructor.name)) || 'ReactClass'; + var warningKey = componentName + '.' + callerName; + + if (didWarnStateUpdateForUnmountedComponent[warningKey]) { + return; + } + + warningWithoutStack$1( + false, + "Can't call %s on a component that is not yet mounted. " + + 'This is a no-op, but it might indicate a bug in your application. ' + + 'Instead, assign to `this.state` directly or define a `state = {};` ' + + 'class property with the desired state in the %s component.', + callerName, + componentName, + ); + didWarnStateUpdateForUnmountedComponent[warningKey] = true; + } + } + /** + * This is the abstract API for an update queue. + */ + + var ReactNoopUpdateQueue = { + /** + * Checks whether or not this composite component is mounted. + * @param {ReactClass} publicInstance The instance we want to test. + * @return {boolean} True if mounted, false otherwise. + * @protected + * @final + */ + isMounted: function (publicInstance) { + return false; + }, + + /** + * Forces an update. This should only be invoked when it is known with + * certainty that we are **not** in a DOM transaction. + * + * You may want to call this when you know that some deeper aspect of the + * component's state has changed but `setState` was not called. + * + * This will not invoke `shouldComponentUpdate`, but it will invoke + * `componentWillUpdate` and `componentDidUpdate`. + * + * @param {ReactClass} publicInstance The instance that should rerender. + * @param {?function} callback Called after component is updated. + * @param {?string} callerName name of the calling function in the public API. + * @internal + */ + enqueueForceUpdate: function (publicInstance, callback, callerName) { + warnNoop(publicInstance, 'forceUpdate'); + }, + + /** + * Replaces all of the state. Always use this or `setState` to mutate state. + * You should treat `this.state` as immutable. + * + * There is no guarantee that `this.state` will be immediately updated, so + * accessing `this.state` after calling this method may return the old value. + * + * @param {ReactClass} publicInstance The instance that should rerender. + * @param {object} completeState Next state. + * @param {?function} callback Called after component is updated. + * @param {?string} callerName name of the calling function in the public API. + * @internal + */ + enqueueReplaceState: function (publicInstance, completeState, callback, callerName) { + warnNoop(publicInstance, 'replaceState'); + }, + + /** + * Sets a subset of the state. This only exists because _pendingState is + * internal. This provides a merging strategy that is not available to deep + * properties which is confusing. TODO: Expose pendingState or don't use it + * during the merge. + * + * @param {ReactClass} publicInstance The instance that should rerender. + * @param {object} partialState Next partial state to be merged with state. + * @param {?function} callback Called after component is updated. + * @param {?string} Name of the calling function in the public API. + * @internal + */ + enqueueSetState: function (publicInstance, partialState, callback, callerName) { + warnNoop(publicInstance, 'setState'); + }, + }; + + var emptyObject = {}; + + { + Object.freeze(emptyObject); + } + /** + * Base class helpers for the updating state of a component. + */ + + function Component(props, context, updater) { + this.props = props; + this.context = context; // If a component has string refs, we will assign a different object later. + + this.refs = emptyObject; // We initialize the default updater but the real one gets injected by the + // renderer. + + this.updater = updater || ReactNoopUpdateQueue; + } + + Component.prototype.isReactComponent = {}; + /** + * Sets a subset of the state. Always use this to mutate + * state. You should treat `this.state` as immutable. + * + * There is no guarantee that `this.state` will be immediately updated, so + * accessing `this.state` after calling this method may return the old value. + * + * There is no guarantee that calls to `setState` will run synchronously, + * as they may eventually be batched together. You can provide an optional + * callback that will be executed when the call to setState is actually + * completed. + * + * When a function is provided to setState, it will be called at some point in + * the future (not synchronously). It will be called with the up to date + * component arguments (state, props, context). These values can be different + * from this.* because your function may be called after receiveProps but before + * shouldComponentUpdate, and this new state, props, and context will not yet be + * assigned to this. + * + * @param {object|function} partialState Next partial state or function to + * produce next partial state to be merged with current state. + * @param {?function} callback Called after state is updated. + * @final + * @protected + */ + + Component.prototype.setState = function (partialState, callback) { + if ( + !( + typeof partialState === 'object' || + typeof partialState === 'function' || + partialState == null + ) + ) { + { + throw Error( + 'setState(...): takes an object of state variables to update or a function which returns an object of state variables.', + ); + } + } + + this.updater.enqueueSetState(this, partialState, callback, 'setState'); + }; + /** + * Forces an update. This should only be invoked when it is known with + * certainty that we are **not** in a DOM transaction. + * + * You may want to call this when you know that some deeper aspect of the + * component's state has changed but `setState` was not called. + * + * This will not invoke `shouldComponentUpdate`, but it will invoke + * `componentWillUpdate` and `componentDidUpdate`. + * + * @param {?function} callback Called after update is complete. + * @final + * @protected + */ + + Component.prototype.forceUpdate = function (callback) { + this.updater.enqueueForceUpdate(this, callback, 'forceUpdate'); + }; + /** + * Deprecated APIs. These APIs used to exist on classic React classes but since + * we would like to deprecate them, we're not going to move them over to this + * modern base class. Instead, we define a getter that warns if it's accessed. + */ + + { + var deprecatedAPIs = { + isMounted: [ + 'isMounted', + 'Instead, make sure to clean up subscriptions and pending requests in ' + + 'componentWillUnmount to prevent memory leaks.', + ], + replaceState: [ + 'replaceState', + 'Refactor your code to use setState instead (see ' + + 'https://github.com/facebook/react/issues/3236).', + ], + }; + + var defineDeprecationWarning = function (methodName, info) { + Object.defineProperty(Component.prototype, methodName, { + get: function () { + lowPriorityWarningWithoutStack$1( + false, + '%s(...) is deprecated in plain JavaScript React classes. %s', + info[0], + info[1], + ); + return undefined; + }, + }); + }; + + for (var fnName in deprecatedAPIs) { + if (deprecatedAPIs.hasOwnProperty(fnName)) { + defineDeprecationWarning(fnName, deprecatedAPIs[fnName]); + } + } + } + + function ComponentDummy() {} + + ComponentDummy.prototype = Component.prototype; + /** + * Convenience component with default shallow equality check for sCU. + */ + + function PureComponent(props, context, updater) { + this.props = props; + this.context = context; // If a component has string refs, we will assign a different object later. + + this.refs = emptyObject; + this.updater = updater || ReactNoopUpdateQueue; + } + + var pureComponentPrototype = (PureComponent.prototype = new ComponentDummy()); + pureComponentPrototype.constructor = PureComponent; // Avoid an extra prototype jump for these methods. + + _assign(pureComponentPrototype, Component.prototype); + + pureComponentPrototype.isPureReactComponent = true; + + // an immutable object with a single mutable value + function createRef() { + var refObject = { + current: null, + }; + + { + Object.seal(refObject); + } + + return refObject; + } + + /** + * Keeps track of the current dispatcher. + */ + var ReactCurrentDispatcher = { + /** + * @internal + * @type {ReactComponent} + */ + current: null, + }; + + /** + * Keeps track of the current batch's configuration such as how long an update + * should suspend for if it needs to. + */ + var ReactCurrentBatchConfig = { + suspense: null, + }; + + /** + * Keeps track of the current owner. + * + * The current owner is the component who should own any components that are + * currently being constructed. + */ + var ReactCurrentOwner = { + /** + * @internal + * @type {ReactComponent} + */ + current: null, + }; + + var BEFORE_SLASH_RE = /^(.*)[\\\/]/; + var describeComponentFrame = function (name, source, ownerName) { + var sourceInfo = ''; + + if (source) { + var path = source.fileName; + var fileName = path.replace(BEFORE_SLASH_RE, ''); + + { + // In DEV, include code for a common special case: + // prefer "folder/index.js" instead of just "index.js". + if (/^index\./.test(fileName)) { + var match = path.match(BEFORE_SLASH_RE); + + if (match) { + var pathBeforeSlash = match[1]; + + if (pathBeforeSlash) { + var folderName = pathBeforeSlash.replace(BEFORE_SLASH_RE, ''); + fileName = folderName + '/' + fileName; + } + } + } + } + + sourceInfo = ' (at ' + fileName + ':' + source.lineNumber + ')'; + } else if (ownerName) { + sourceInfo = ' (created by ' + ownerName + ')'; + } + + return '\n in ' + (name || 'Unknown') + sourceInfo; + }; + + var Resolved = 1; + + function refineResolvedLazyComponent(lazyComponent) { + return lazyComponent._status === Resolved ? lazyComponent._result : null; + } + + function getWrappedName(outerType, innerType, wrapperName) { + var functionName = innerType.displayName || innerType.name || ''; + return ( + outerType.displayName || + (functionName !== '' ? wrapperName + '(' + functionName + ')' : wrapperName) + ); + } + + function getComponentName(type) { + if (type == null) { + // Host root, text node or just invalid type. + return null; + } + + { + if (typeof type.tag === 'number') { + warningWithoutStack$1( + false, + 'Received an unexpected object in getComponentName(). ' + + 'This is likely a bug in React. Please file an issue.', + ); + } + } + + if (typeof type === 'function') { + return type.displayName || type.name || null; + } + + if (typeof type === 'string') { + return type; + } + + switch (type) { + case REACT_FRAGMENT_TYPE: + return 'Fragment'; + + case REACT_PORTAL_TYPE: + return 'Portal'; + + case REACT_PROFILER_TYPE: + return 'Profiler'; + + case REACT_STRICT_MODE_TYPE: + return 'StrictMode'; + + case REACT_SUSPENSE_TYPE: + return 'Suspense'; + + case REACT_SUSPENSE_LIST_TYPE: + return 'SuspenseList'; + } + + if (typeof type === 'object') { + switch (type.$$typeof) { + case REACT_CONTEXT_TYPE: + return 'Context.Consumer'; + + case REACT_PROVIDER_TYPE: + return 'Context.Provider'; + + case REACT_FORWARD_REF_TYPE: + return getWrappedName(type, type.render, 'ForwardRef'); + + case REACT_MEMO_TYPE: + return getComponentName(type.type); + + case REACT_LAZY_TYPE: { + var thenable = type; + var resolvedThenable = refineResolvedLazyComponent(thenable); + + if (resolvedThenable) { + return getComponentName(resolvedThenable); + } + + break; + } + } + } + + return null; + } + + var ReactDebugCurrentFrame = {}; + var currentlyValidatingElement = null; + function setCurrentlyValidatingElement(element) { + { + currentlyValidatingElement = element; + } + } + + { + // Stack implementation injected by the current renderer. + ReactDebugCurrentFrame.getCurrentStack = null; + + ReactDebugCurrentFrame.getStackAddendum = function () { + var stack = ''; // Add an extra top frame while an element is being validated + + if (currentlyValidatingElement) { + var name = getComponentName(currentlyValidatingElement.type); + var owner = currentlyValidatingElement._owner; + stack += describeComponentFrame( + name, + currentlyValidatingElement._source, + owner && getComponentName(owner.type), + ); + } // Delegate to the injected renderer-specific implementation + + var impl = ReactDebugCurrentFrame.getCurrentStack; + + if (impl) { + stack += impl() || ''; + } + + return stack; + }; + } + + /** + * Used by act() to track whether you're inside an act() scope. + */ + var IsSomeRendererActing = { + current: false, + }; + + var ReactSharedInternals = { + ReactCurrentDispatcher: ReactCurrentDispatcher, + ReactCurrentBatchConfig: ReactCurrentBatchConfig, + ReactCurrentOwner: ReactCurrentOwner, + IsSomeRendererActing: IsSomeRendererActing, + // Used by renderers to avoid bundling object-assign twice in UMD bundles: + assign: _assign, + }; + + { + _assign(ReactSharedInternals, { + // These should not be included in production. + ReactDebugCurrentFrame: ReactDebugCurrentFrame, + // Shim for React DOM 16.0.0 which still destructured (but not used) this. + // TODO: remove in React 17.0. + ReactComponentTreeHook: {}, + }); + } + + /** + * Similar to invariant but only logs a warning if the condition is not met. + * This can be used to log issues in development environments in critical + * paths. Removing the logging code for production environments will keep the + * same logic and follow the same code paths. + */ + + var warning = warningWithoutStack$1; + + { + warning = function (condition, format) { + if (condition) { + return; + } + + var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; + var stack = ReactDebugCurrentFrame.getStackAddendum(); // eslint-disable-next-line react-internal/warning-and-invariant-args + + for ( + var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; + _key < _len; + _key++ + ) { + args[_key - 2] = arguments[_key]; + } + + warningWithoutStack$1.apply(void 0, [false, format + '%s'].concat(args, [stack])); + }; + } + + var warning$1 = warning; + + var hasOwnProperty = Object.prototype.hasOwnProperty; + var RESERVED_PROPS = { + key: true, + ref: true, + __self: true, + __source: true, + }; + var specialPropKeyWarningShown; + var specialPropRefWarningShown; + + function hasValidRef(config) { + { + if (hasOwnProperty.call(config, 'ref')) { + var getter = Object.getOwnPropertyDescriptor(config, 'ref').get; + + if (getter && getter.isReactWarning) { + return false; + } + } + } + + return config.ref !== undefined; + } + + function hasValidKey(config) { + { + if (hasOwnProperty.call(config, 'key')) { + var getter = Object.getOwnPropertyDescriptor(config, 'key').get; + + if (getter && getter.isReactWarning) { + return false; + } + } + } + + return config.key !== undefined; + } + + function defineKeyPropWarningGetter(props, displayName) { + var warnAboutAccessingKey = function () { + if (!specialPropKeyWarningShown) { + specialPropKeyWarningShown = true; + warningWithoutStack$1( + false, + '%s: `key` is not a prop. Trying to access it will result ' + + 'in `undefined` being returned. If you need to access the same ' + + 'value within the child component, you should pass it as a different ' + + 'prop. (https://fb.me/react-special-props)', + displayName, + ); + } + }; + + warnAboutAccessingKey.isReactWarning = true; + Object.defineProperty(props, 'key', { + get: warnAboutAccessingKey, + configurable: true, + }); + } + + function defineRefPropWarningGetter(props, displayName) { + var warnAboutAccessingRef = function () { + if (!specialPropRefWarningShown) { + specialPropRefWarningShown = true; + warningWithoutStack$1( + false, + '%s: `ref` is not a prop. Trying to access it will result ' + + 'in `undefined` being returned. If you need to access the same ' + + 'value within the child component, you should pass it as a different ' + + 'prop. (https://fb.me/react-special-props)', + displayName, + ); + } + }; + + warnAboutAccessingRef.isReactWarning = true; + Object.defineProperty(props, 'ref', { + get: warnAboutAccessingRef, + configurable: true, + }); + } + /** + * Factory method to create a new React element. This no longer adheres to + * the class pattern, so do not use new to call it. Also, instanceof check + * will not work. Instead test $$typeof field against Symbol.for('react.element') to check + * if something is a React Element. + * + * @param {*} type + * @param {*} props + * @param {*} key + * @param {string|object} ref + * @param {*} owner + * @param {*} self A *temporary* helper to detect places where `this` is + * different from the `owner` when React.createElement is called, so that we + * can warn. We want to get rid of owner and replace string `ref`s with arrow + * functions, and as long as `this` and owner are the same, there will be no + * change in behavior. + * @param {*} source An annotation object (added by a transpiler or otherwise) + * indicating filename, line number, and/or other information. + * @internal + */ + + var ReactElement = function (type, key, ref, self, source, owner, props) { + var element = { + // This tag allows us to uniquely identify this as a React Element + $$typeof: REACT_ELEMENT_TYPE, + // Built-in properties that belong on the element + type: type, + key: key, + ref: ref, + props: props, + // Record the component responsible for creating this element. + _owner: owner, + }; + + { + // The validation flag is currently mutative. We put it on + // an external backing store so that we can freeze the whole object. + // This can be replaced with a WeakMap once they are implemented in + // commonly used development environments. + element._store = {}; // To make comparing ReactElements easier for testing purposes, we make + // the validation flag non-enumerable (where possible, which should + // include every environment we run tests in), so the test framework + // ignores it. + + Object.defineProperty(element._store, 'validated', { + configurable: false, + enumerable: false, + writable: true, + value: false, + }); // self and source are DEV only properties. + + Object.defineProperty(element, '_self', { + configurable: false, + enumerable: false, + writable: false, + value: self, + }); // Two elements created in two different places should be considered + // equal for testing purposes and therefore we hide it from enumeration. + + Object.defineProperty(element, '_source', { + configurable: false, + enumerable: false, + writable: false, + value: source, + }); + + if (Object.freeze) { + Object.freeze(element.props); + Object.freeze(element); + } + } + + return element; + }; + /** + * https://github.com/reactjs/rfcs/pull/107 + * @param {*} type + * @param {object} props + * @param {string} key + */ + + /** + * https://github.com/reactjs/rfcs/pull/107 + * @param {*} type + * @param {object} props + * @param {string} key + */ + + function jsxDEV(type, config, maybeKey, source, self) { + var propName; // Reserved names are extracted + + var props = {}; + var key = null; + var ref = null; // Currently, key can be spread in as a prop. This causes a potential + // issue if key is also explicitly declared (ie. <div {...props} key="Hi" /> + // or <div key="Hi" {...props} /> ). We want to deprecate key spread, + // but as an intermediary step, we will use jsxDEV for everything except + // <div {...props} key="Hi" />, because we aren't currently able to tell if + // key is explicitly declared to be undefined or not. + + if (maybeKey !== undefined) { + key = '' + maybeKey; + } + + if (hasValidKey(config)) { + key = '' + config.key; + } + + if (hasValidRef(config)) { + ref = config.ref; + } // Remaining properties are added to a new props object + + for (propName in config) { + if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { + props[propName] = config[propName]; + } + } // Resolve default props + + if (type && type.defaultProps) { + var defaultProps = type.defaultProps; + + for (propName in defaultProps) { + if (props[propName] === undefined) { + props[propName] = defaultProps[propName]; + } + } + } + + if (key || ref) { + var displayName = + typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type; + + if (key) { + defineKeyPropWarningGetter(props, displayName); + } + + if (ref) { + defineRefPropWarningGetter(props, displayName); + } + } + + return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props); + } + /** + * Create and return a new ReactElement of the given type. + * See https://reactjs.org/docs/react-api.html#createelement + */ + + function createElement(type, config, children) { + var propName; // Reserved names are extracted + + var props = {}; + var key = null; + var ref = null; + var self = null; + var source = null; + + if (config != null) { + if (hasValidRef(config)) { + ref = config.ref; + } + + if (hasValidKey(config)) { + key = '' + config.key; + } + + self = config.__self === undefined ? null : config.__self; + source = config.__source === undefined ? null : config.__source; // Remaining properties are added to a new props object + + for (propName in config) { + if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { + props[propName] = config[propName]; + } + } + } // Children can be more than one argument, and those are transferred onto + // the newly allocated props object. + + var childrenLength = arguments.length - 2; + + if (childrenLength === 1) { + props.children = children; + } else if (childrenLength > 1) { + var childArray = Array(childrenLength); + + for (var i = 0; i < childrenLength; i++) { + childArray[i] = arguments[i + 2]; + } + + { + if (Object.freeze) { + Object.freeze(childArray); + } + } + + props.children = childArray; + } // Resolve default props + + if (type && type.defaultProps) { + var defaultProps = type.defaultProps; + + for (propName in defaultProps) { + if (props[propName] === undefined) { + props[propName] = defaultProps[propName]; + } + } + } + + { + if (key || ref) { + var displayName = + typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type; + + if (key) { + defineKeyPropWarningGetter(props, displayName); + } + + if (ref) { + defineRefPropWarningGetter(props, displayName); + } + } + } + + return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props); + } + /** + * Return a function that produces ReactElements of a given type. + * See https://reactjs.org/docs/react-api.html#createfactory + */ + + function cloneAndReplaceKey(oldElement, newKey) { + var newElement = ReactElement( + oldElement.type, + newKey, + oldElement.ref, + oldElement._self, + oldElement._source, + oldElement._owner, + oldElement.props, + ); + return newElement; + } + /** + * Clone and return a new ReactElement using element as the starting point. + * See https://reactjs.org/docs/react-api.html#cloneelement + */ + + function cloneElement(element, config, children) { + if (!!(element === null || element === undefined)) { + { + throw Error( + 'React.cloneElement(...): The argument must be a React element, but you passed ' + + element + + '.', + ); + } + } + + var propName; // Original props are copied + + var props = _assign({}, element.props); // Reserved names are extracted + + var key = element.key; + var ref = element.ref; // Self is preserved since the owner is preserved. + + var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a + // transpiler, and the original source is probably a better indicator of the + // true owner. + + var source = element._source; // Owner will be preserved, unless ref is overridden + + var owner = element._owner; + + if (config != null) { + if (hasValidRef(config)) { + // Silently steal the ref from the parent. + ref = config.ref; + owner = ReactCurrentOwner.current; + } + + if (hasValidKey(config)) { + key = '' + config.key; + } // Remaining properties override existing props + + var defaultProps; + + if (element.type && element.type.defaultProps) { + defaultProps = element.type.defaultProps; + } + + for (propName in config) { + if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { + if (config[propName] === undefined && defaultProps !== undefined) { + // Resolve default props + props[propName] = defaultProps[propName]; + } else { + props[propName] = config[propName]; + } + } + } + } // Children can be more than one argument, and those are transferred onto + // the newly allocated props object. + + var childrenLength = arguments.length - 2; + + if (childrenLength === 1) { + props.children = children; + } else if (childrenLength > 1) { + var childArray = Array(childrenLength); + + for (var i = 0; i < childrenLength; i++) { + childArray[i] = arguments[i + 2]; + } + + props.children = childArray; + } + + return ReactElement(element.type, key, ref, self, source, owner, props); + } + /** + * Verifies the object is a ReactElement. + * See https://reactjs.org/docs/react-api.html#isvalidelement + * @param {?object} object + * @return {boolean} True if `object` is a ReactElement. + * @final + */ + + function isValidElement(object) { + return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; + } + + var SEPARATOR = '.'; + var SUBSEPARATOR = ':'; + /** + * Escape and wrap key so it is safe to use as a reactid + * + * @param {string} key to be escaped. + * @return {string} the escaped key. + */ + + function escape(key) { + var escapeRegex = /[=:]/g; + var escaperLookup = { + '=': '=0', + ':': '=2', + }; + var escapedString = ('' + key).replace(escapeRegex, function (match) { + return escaperLookup[match]; + }); + return '$' + escapedString; + } + /** + * TODO: Test that a single child and an array with one item have the same key + * pattern. + */ + + var didWarnAboutMaps = false; + var userProvidedKeyEscapeRegex = /\/+/g; + + function escapeUserProvidedKey(text) { + return ('' + text).replace(userProvidedKeyEscapeRegex, '$&/'); + } + + var POOL_SIZE = 10; + var traverseContextPool = []; + + function getPooledTraverseContext(mapResult, keyPrefix, mapFunction, mapContext) { + if (traverseContextPool.length) { + var traverseContext = traverseContextPool.pop(); + traverseContext.result = mapResult; + traverseContext.keyPrefix = keyPrefix; + traverseContext.func = mapFunction; + traverseContext.context = mapContext; + traverseContext.count = 0; + return traverseContext; + } else { + return { + result: mapResult, + keyPrefix: keyPrefix, + func: mapFunction, + context: mapContext, + count: 0, + }; + } + } + + function releaseTraverseContext(traverseContext) { + traverseContext.result = null; + traverseContext.keyPrefix = null; + traverseContext.func = null; + traverseContext.context = null; + traverseContext.count = 0; + + if (traverseContextPool.length < POOL_SIZE) { + traverseContextPool.push(traverseContext); + } + } + /** + * @param {?*} children Children tree container. + * @param {!string} nameSoFar Name of the key path so far. + * @param {!function} callback Callback to invoke with each child found. + * @param {?*} traverseContext Used to pass information throughout the traversal + * process. + * @return {!number} The number of children in this subtree. + */ + + function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) { + var type = typeof children; + + if (type === 'undefined' || type === 'boolean') { + // All of the above are perceived as null. + children = null; + } + + var invokeCallback = false; + + if (children === null) { + invokeCallback = true; + } else { + switch (type) { + case 'string': + case 'number': + invokeCallback = true; + break; + + case 'object': + switch (children.$$typeof) { + case REACT_ELEMENT_TYPE: + case REACT_PORTAL_TYPE: + invokeCallback = true; + } + } + } + + if (invokeCallback) { + callback( + traverseContext, + children, // If it's the only child, treat the name as if it was wrapped in an array + // so that it's consistent if the number of children grows. + nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar, + ); + return 1; + } + + var child; + var nextName; + var subtreeCount = 0; // Count of children found in the current subtree. + + var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR; + + if (Array.isArray(children)) { + for (var i = 0; i < children.length; i++) { + child = children[i]; + nextName = nextNamePrefix + getComponentKey(child, i); + subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext); + } + } else { + var iteratorFn = getIteratorFn(children); + + if (typeof iteratorFn === 'function') { + { + // Warn about using Maps as children + if (iteratorFn === children.entries) { + !didWarnAboutMaps + ? warning$1( + false, + 'Using Maps as children is unsupported and will likely yield ' + + 'unexpected results. Convert it to a sequence/iterable of keyed ' + + 'ReactElements instead.', + ) + : void 0; + didWarnAboutMaps = true; + } + } + + var iterator = iteratorFn.call(children); + var step; + var ii = 0; + + while (!(step = iterator.next()).done) { + child = step.value; + nextName = nextNamePrefix + getComponentKey(child, ii++); + subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext); + } + } else if (type === 'object') { + var addendum = ''; + + { + addendum = + ' If you meant to render a collection of children, use an array ' + + 'instead.' + + ReactDebugCurrentFrame.getStackAddendum(); + } + + var childrenString = '' + children; + + { + { + throw Error( + 'Objects are not valid as a React child (found: ' + + (childrenString === '[object Object]' + ? 'object with keys {' + Object.keys(children).join(', ') + '}' + : childrenString) + + ').' + + addendum, + ); + } + } + } + } + + return subtreeCount; + } + /** + * Traverses children that are typically specified as `props.children`, but + * might also be specified through attributes: + * + * - `traverseAllChildren(this.props.children, ...)` + * - `traverseAllChildren(this.props.leftPanelChildren, ...)` + * + * The `traverseContext` is an optional argument that is passed through the + * entire traversal. It can be used to store accumulations or anything else that + * the callback might find relevant. + * + * @param {?*} children Children tree object. + * @param {!function} callback To invoke upon traversing each child. + * @param {?*} traverseContext Context for traversal. + * @return {!number} The number of children in this subtree. + */ + + function traverseAllChildren(children, callback, traverseContext) { + if (children == null) { + return 0; + } + + return traverseAllChildrenImpl(children, '', callback, traverseContext); + } + /** + * Generate a key string that identifies a component within a set. + * + * @param {*} component A component that could contain a manual key. + * @param {number} index Index that is used if a manual key is not provided. + * @return {string} + */ + + function getComponentKey(component, index) { + // Do some typechecking here since we call this blindly. We want to ensure + // that we don't block potential future ES APIs. + if (typeof component === 'object' && component !== null && component.key != null) { + // Explicit key + return escape(component.key); + } // Implicit key determined by the index in the set + + return index.toString(36); + } + + function forEachSingleChild(bookKeeping, child, name) { + var func = bookKeeping.func, + context = bookKeeping.context; + func.call(context, child, bookKeeping.count++); + } + /** + * Iterates through children that are typically specified as `props.children`. + * + * See https://reactjs.org/docs/react-api.html#reactchildrenforeach + * + * The provided forEachFunc(child, index) will be called for each + * leaf child. + * + * @param {?*} children Children tree container. + * @param {function(*, int)} forEachFunc + * @param {*} forEachContext Context for forEachContext. + */ + + function forEachChildren(children, forEachFunc, forEachContext) { + if (children == null) { + return children; + } + + var traverseContext = getPooledTraverseContext(null, null, forEachFunc, forEachContext); + traverseAllChildren(children, forEachSingleChild, traverseContext); + releaseTraverseContext(traverseContext); + } + + function mapSingleChildIntoContext(bookKeeping, child, childKey) { + var result = bookKeeping.result, + keyPrefix = bookKeeping.keyPrefix, + func = bookKeeping.func, + context = bookKeeping.context; + var mappedChild = func.call(context, child, bookKeeping.count++); + + if (Array.isArray(mappedChild)) { + mapIntoWithKeyPrefixInternal(mappedChild, result, childKey, function (c) { + return c; + }); + } else if (mappedChild != null) { + if (isValidElement(mappedChild)) { + mappedChild = cloneAndReplaceKey( + mappedChild, // Keep both the (mapped) and old keys if they differ, just as + // traverseAllChildren used to do for objects as children + keyPrefix + + (mappedChild.key && (!child || child.key !== mappedChild.key) + ? escapeUserProvidedKey(mappedChild.key) + '/' + : '') + + childKey, + ); + } + + result.push(mappedChild); + } + } + + function mapIntoWithKeyPrefixInternal(children, array, prefix, func, context) { + var escapedPrefix = ''; + + if (prefix != null) { + escapedPrefix = escapeUserProvidedKey(prefix) + '/'; + } + + var traverseContext = getPooledTraverseContext(array, escapedPrefix, func, context); + traverseAllChildren(children, mapSingleChildIntoContext, traverseContext); + releaseTraverseContext(traverseContext); + } + /** + * Maps children that are typically specified as `props.children`. + * + * See https://reactjs.org/docs/react-api.html#reactchildrenmap + * + * The provided mapFunction(child, key, index) will be called for each + * leaf child. + * + * @param {?*} children Children tree container. + * @param {function(*, int)} func The map function. + * @param {*} context Context for mapFunction. + * @return {object} Object containing the ordered map of results. + */ + + function mapChildren(children, func, context) { + if (children == null) { + return children; + } + + var result = []; + mapIntoWithKeyPrefixInternal(children, result, null, func, context); + return result; + } + /** + * Count the number of children that are typically specified as + * `props.children`. + * + * See https://reactjs.org/docs/react-api.html#reactchildrencount + * + * @param {?*} children Children tree container. + * @return {number} The number of children. + */ + + function countChildren(children) { + return traverseAllChildren( + children, + function () { + return null; + }, + null, + ); + } + /** + * Flatten a children object (typically specified as `props.children`) and + * return an array with appropriately re-keyed children. + * + * See https://reactjs.org/docs/react-api.html#reactchildrentoarray + */ + + function toArray(children) { + var result = []; + mapIntoWithKeyPrefixInternal(children, result, null, function (child) { + return child; + }); + return result; + } + /** + * Returns the first child in a collection of children and verifies that there + * is only one child in the collection. + * + * See https://reactjs.org/docs/react-api.html#reactchildrenonly + * + * The current implementation of this function assumes that a single child gets + * passed without a wrapper, but the purpose of this helper function is to + * abstract away the particular structure of children. + * + * @param {?object} children Child collection structure. + * @return {ReactElement} The first and only `ReactElement` contained in the + * structure. + */ + + function onlyChild(children) { + if (!isValidElement(children)) { + { + throw Error('React.Children.only expected to receive a single React element child.'); + } + } + + return children; + } + + function createContext(defaultValue, calculateChangedBits) { + if (calculateChangedBits === undefined) { + calculateChangedBits = null; + } else { + { + !(calculateChangedBits === null || typeof calculateChangedBits === 'function') + ? warningWithoutStack$1( + false, + 'createContext: Expected the optional second argument to be a ' + + 'function. Instead received: %s', + calculateChangedBits, + ) + : void 0; + } + } + + var context = { + $$typeof: REACT_CONTEXT_TYPE, + _calculateChangedBits: calculateChangedBits, + // As a workaround to support multiple concurrent renderers, we categorize + // some renderers as primary and others as secondary. We only expect + // there to be two concurrent renderers at most: React Native (primary) and + // Fabric (secondary); React DOM (primary) and React ART (secondary). + // Secondary renderers store their context values on separate fields. + _currentValue: defaultValue, + _currentValue2: defaultValue, + // Used to track how many concurrent renderers this context currently + // supports within in a single renderer. Such as parallel server rendering. + _threadCount: 0, + // These are circular + Provider: null, + Consumer: null, + }; + context.Provider = { + $$typeof: REACT_PROVIDER_TYPE, + _context: context, + }; + var hasWarnedAboutUsingNestedContextConsumers = false; + var hasWarnedAboutUsingConsumerProvider = false; + + { + // A separate object, but proxies back to the original context object for + // backwards compatibility. It has a different $$typeof, so we can properly + // warn for the incorrect usage of Context as a Consumer. + var Consumer = { + $$typeof: REACT_CONTEXT_TYPE, + _context: context, + _calculateChangedBits: context._calculateChangedBits, + }; // $FlowFixMe: Flow complains about not setting a value, which is intentional here + + Object.defineProperties(Consumer, { + Provider: { + get: function () { + if (!hasWarnedAboutUsingConsumerProvider) { + hasWarnedAboutUsingConsumerProvider = true; + warning$1( + false, + 'Rendering <Context.Consumer.Provider> is not supported and will be removed in ' + + 'a future major release. Did you mean to render <Context.Provider> instead?', + ); + } + + return context.Provider; + }, + set: function (_Provider) { + context.Provider = _Provider; + }, + }, + _currentValue: { + get: function () { + return context._currentValue; + }, + set: function (_currentValue) { + context._currentValue = _currentValue; + }, + }, + _currentValue2: { + get: function () { + return context._currentValue2; + }, + set: function (_currentValue2) { + context._currentValue2 = _currentValue2; + }, + }, + _threadCount: { + get: function () { + return context._threadCount; + }, + set: function (_threadCount) { + context._threadCount = _threadCount; + }, + }, + Consumer: { + get: function () { + if (!hasWarnedAboutUsingNestedContextConsumers) { + hasWarnedAboutUsingNestedContextConsumers = true; + warning$1( + false, + 'Rendering <Context.Consumer.Consumer> is not supported and will be removed in ' + + 'a future major release. Did you mean to render <Context.Consumer> instead?', + ); + } + + return context.Consumer; + }, + }, + }); // $FlowFixMe: Flow complains about missing properties because it doesn't understand defineProperty + + context.Consumer = Consumer; + } + + { + context._currentRenderer = null; + context._currentRenderer2 = null; + } + + return context; + } + + function lazy(ctor) { + var lazyType = { + $$typeof: REACT_LAZY_TYPE, + _ctor: ctor, + // React uses these fields to store the result. + _status: -1, + _result: null, + }; + + { + // In production, this would just set it on the object. + var defaultProps; + var propTypes; + Object.defineProperties(lazyType, { + defaultProps: { + configurable: true, + get: function () { + return defaultProps; + }, + set: function (newDefaultProps) { + warning$1( + false, + 'React.lazy(...): It is not supported to assign `defaultProps` to ' + + 'a lazy component import. Either specify them where the component ' + + 'is defined, or create a wrapping component around it.', + ); + defaultProps = newDefaultProps; // Match production behavior more closely: + + Object.defineProperty(lazyType, 'defaultProps', { + enumerable: true, + }); + }, + }, + propTypes: { + configurable: true, + get: function () { + return propTypes; + }, + set: function (newPropTypes) { + warning$1( + false, + 'React.lazy(...): It is not supported to assign `propTypes` to ' + + 'a lazy component import. Either specify them where the component ' + + 'is defined, or create a wrapping component around it.', + ); + propTypes = newPropTypes; // Match production behavior more closely: + + Object.defineProperty(lazyType, 'propTypes', { + enumerable: true, + }); + }, + }, + }); + } + + return lazyType; + } + + function forwardRef(render) { + { + if (render != null && render.$$typeof === REACT_MEMO_TYPE) { + warningWithoutStack$1( + false, + 'forwardRef requires a render function but received a `memo` ' + + 'component. Instead of forwardRef(memo(...)), use ' + + 'memo(forwardRef(...)).', + ); + } else if (typeof render !== 'function') { + warningWithoutStack$1( + false, + 'forwardRef requires a render function but was given %s.', + render === null ? 'null' : typeof render, + ); + } else { + !( + // Do not warn for 0 arguments because it could be due to usage of the 'arguments' object + (render.length === 0 || render.length === 2) + ) + ? warningWithoutStack$1( + false, + 'forwardRef render functions accept exactly two parameters: props and ref. %s', + render.length === 1 + ? 'Did you forget to use the ref parameter?' + : 'Any additional parameter will be undefined.', + ) + : void 0; + } + + if (render != null) { + !(render.defaultProps == null && render.propTypes == null) + ? warningWithoutStack$1( + false, + 'forwardRef render functions do not support propTypes or defaultProps. ' + + 'Did you accidentally pass a React component?', + ) + : void 0; + } + } + + return { + $$typeof: REACT_FORWARD_REF_TYPE, + render: render, + }; + } + + function isValidElementType(type) { + return ( + typeof type === 'string' || + typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill. + type === REACT_FRAGMENT_TYPE || + type === REACT_CONCURRENT_MODE_TYPE || + type === REACT_PROFILER_TYPE || + type === REACT_STRICT_MODE_TYPE || + type === REACT_SUSPENSE_TYPE || + type === REACT_SUSPENSE_LIST_TYPE || + (typeof type === 'object' && + type !== null && + (type.$$typeof === REACT_LAZY_TYPE || + type.$$typeof === REACT_MEMO_TYPE || + type.$$typeof === REACT_PROVIDER_TYPE || + type.$$typeof === REACT_CONTEXT_TYPE || + type.$$typeof === REACT_FORWARD_REF_TYPE || + type.$$typeof === REACT_FUNDAMENTAL_TYPE || + type.$$typeof === REACT_RESPONDER_TYPE || + type.$$typeof === REACT_SCOPE_TYPE)) + ); + } + + function memo(type, compare) { + { + if (!isValidElementType(type)) { + warningWithoutStack$1( + false, + 'memo: The first argument must be a component. Instead ' + 'received: %s', + type === null ? 'null' : typeof type, + ); + } + } + + return { + $$typeof: REACT_MEMO_TYPE, + type: type, + compare: compare === undefined ? null : compare, + }; + } + + function resolveDispatcher() { + var dispatcher = ReactCurrentDispatcher.current; + + if (!(dispatcher !== null)) { + { + throw Error( + 'Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.', + ); + } + } + + return dispatcher; + } + + function useContext(Context, unstable_observedBits) { + var dispatcher = resolveDispatcher(); + + { + !(unstable_observedBits === undefined) + ? warning$1( + false, + 'useContext() second argument is reserved for future ' + + 'use in React. Passing it is not supported. ' + + 'You passed: %s.%s', + unstable_observedBits, + typeof unstable_observedBits === 'number' && Array.isArray(arguments[2]) + ? '\n\nDid you call array.map(useContext)? ' + + 'Calling Hooks inside a loop is not supported. ' + + 'Learn more at https://fb.me/rules-of-hooks' + : '', + ) + : void 0; // TODO: add a more generic warning for invalid values. + + if (Context._context !== undefined) { + var realContext = Context._context; // Don't deduplicate because this legitimately causes bugs + // and nobody should be using this in existing code. + + if (realContext.Consumer === Context) { + warning$1( + false, + 'Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be ' + + 'removed in a future major release. Did you mean to call useContext(Context) instead?', + ); + } else if (realContext.Provider === Context) { + warning$1( + false, + 'Calling useContext(Context.Provider) is not supported. ' + + 'Did you mean to call useContext(Context) instead?', + ); + } + } + } + + return dispatcher.useContext(Context, unstable_observedBits); + } + function useState(initialState) { + var dispatcher = resolveDispatcher(); + return dispatcher.useState(initialState); + } + function useReducer(reducer, initialArg, init) { + var dispatcher = resolveDispatcher(); + return dispatcher.useReducer(reducer, initialArg, init); + } + function useRef(initialValue) { + var dispatcher = resolveDispatcher(); + return dispatcher.useRef(initialValue); + } + function useEffect(create, inputs) { + var dispatcher = resolveDispatcher(); + return dispatcher.useEffect(create, inputs); + } + function useLayoutEffect(create, inputs) { + var dispatcher = resolveDispatcher(); + return dispatcher.useLayoutEffect(create, inputs); + } + function useCallback(callback, inputs) { + var dispatcher = resolveDispatcher(); + return dispatcher.useCallback(callback, inputs); + } + function useMemo(create, inputs) { + var dispatcher = resolveDispatcher(); + return dispatcher.useMemo(create, inputs); + } + function useImperativeHandle(ref, create, inputs) { + var dispatcher = resolveDispatcher(); + return dispatcher.useImperativeHandle(ref, create, inputs); + } + function useDebugValue(value, formatterFn) { + { + var dispatcher = resolveDispatcher(); + return dispatcher.useDebugValue(value, formatterFn); + } + } + var emptyObject$1 = {}; + function useResponder(responder, listenerProps) { + var dispatcher = resolveDispatcher(); + + { + if (responder == null || responder.$$typeof !== REACT_RESPONDER_TYPE) { + warning$1( + false, + 'useResponder: invalid first argument. Expected an event responder, but instead got %s', + responder, + ); + return; + } + } + + return dispatcher.useResponder(responder, listenerProps || emptyObject$1); + } + function useTransition(config) { + var dispatcher = resolveDispatcher(); + return dispatcher.useTransition(config); + } + function useDeferredValue(value, config) { + var dispatcher = resolveDispatcher(); + return dispatcher.useDeferredValue(value, config); + } + + function withSuspenseConfig(scope, config) { + var previousConfig = ReactCurrentBatchConfig.suspense; + ReactCurrentBatchConfig.suspense = config === undefined ? null : config; + + try { + scope(); + } finally { + ReactCurrentBatchConfig.suspense = previousConfig; + } + } + + /** + * ReactElementValidator provides a wrapper around a element factory + * which validates the props passed to the element. This is intended to be + * used only in DEV and could be replaced by a static type checker for languages + * that support it. + */ + var propTypesMisspellWarningShown; + + { + propTypesMisspellWarningShown = false; + } + + var hasOwnProperty$1 = Object.prototype.hasOwnProperty; + + function getDeclarationErrorAddendum() { + if (ReactCurrentOwner.current) { + var name = getComponentName(ReactCurrentOwner.current.type); + + if (name) { + return '\n\nCheck the render method of `' + name + '`.'; + } + } + + return ''; + } + + function getSourceInfoErrorAddendum(source) { + if (source !== undefined) { + var fileName = source.fileName.replace(/^.*[\\\/]/, ''); + var lineNumber = source.lineNumber; + return '\n\nCheck your code at ' + fileName + ':' + lineNumber + '.'; + } + + return ''; + } + + function getSourceInfoErrorAddendumForProps(elementProps) { + if (elementProps !== null && elementProps !== undefined) { + return getSourceInfoErrorAddendum(elementProps.__source); + } + + return ''; + } + /** + * Warn if there's no key explicitly set on dynamic arrays of children or + * object keys are not valid. This allows us to keep track of children between + * updates. + */ + + var ownerHasKeyUseWarning = {}; + + function getCurrentComponentErrorInfo(parentType) { + var info = getDeclarationErrorAddendum(); + + if (!info) { + var parentName = + typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name; + + if (parentName) { + info = '\n\nCheck the top-level render call using <' + parentName + '>.'; + } + } + + return info; + } + /** + * Warn if the element doesn't have an explicit key assigned to it. + * This element is in an array. The array could grow and shrink or be + * reordered. All children that haven't already been validated are required to + * have a "key" property assigned to it. Error statuses are cached so a warning + * will only be shown once. + * + * @internal + * @param {ReactElement} element Element that requires a key. + * @param {*} parentType element's parent's type. + */ + + function validateExplicitKey(element, parentType) { + if (!element._store || element._store.validated || element.key != null) { + return; + } + + element._store.validated = true; + var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType); + + if (ownerHasKeyUseWarning[currentComponentErrorInfo]) { + return; + } + + ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a + // property, it may be the creator of the child that's responsible for + // assigning it a key. + + var childOwner = ''; + + if (element && element._owner && element._owner !== ReactCurrentOwner.current) { + // Give the component that originally created this child. + childOwner = ' It was passed a child from ' + getComponentName(element._owner.type) + '.'; + } + + setCurrentlyValidatingElement(element); + + { + warning$1( + false, + 'Each child in a list should have a unique "key" prop.' + + '%s%s See https://fb.me/react-warning-keys for more information.', + currentComponentErrorInfo, + childOwner, + ); + } + + setCurrentlyValidatingElement(null); + } + /** + * Ensure that every element either is passed in a static location, in an + * array with an explicit keys property defined, or in an object literal + * with valid key property. + * + * @internal + * @param {ReactNode} node Statically passed child of any type. + * @param {*} parentType node's parent's type. + */ + + function validateChildKeys(node, parentType) { + if (typeof node !== 'object') { + return; + } + + if (Array.isArray(node)) { + for (var i = 0; i < node.length; i++) { + var child = node[i]; + + if (isValidElement(child)) { + validateExplicitKey(child, parentType); + } + } + } else if (isValidElement(node)) { + // This element was passed in a valid location. + if (node._store) { + node._store.validated = true; + } + } else if (node) { + var iteratorFn = getIteratorFn(node); + + if (typeof iteratorFn === 'function') { + // Entry iterators used to provide implicit keys, + // but now we print a separate warning for them later. + if (iteratorFn !== node.entries) { + var iterator = iteratorFn.call(node); + var step; + + while (!(step = iterator.next()).done) { + if (isValidElement(step.value)) { + validateExplicitKey(step.value, parentType); + } + } + } + } + } + } + /** + * Given an element, validate that its props follow the propTypes definition, + * provided by the type. + * + * @param {ReactElement} element + */ + + function validatePropTypes(element) { + var type = element.type; + + if (type === null || type === undefined || typeof type === 'string') { + return; + } + + var name = getComponentName(type); + var propTypes; + + if (typeof type === 'function') { + propTypes = type.propTypes; + } else if ( + typeof type === 'object' && + (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here. + // Inner props are checked in the reconciler. + type.$$typeof === REACT_MEMO_TYPE) + ) { + propTypes = type.propTypes; + } else { + return; + } + + if (propTypes) { + setCurrentlyValidatingElement(element); + checkPropTypes(propTypes, element.props, 'prop', name, ReactDebugCurrentFrame.getStackAddendum); + setCurrentlyValidatingElement(null); + } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) { + propTypesMisspellWarningShown = true; + warningWithoutStack$1( + false, + 'Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', + name || 'Unknown', + ); + } + + if (typeof type.getDefaultProps === 'function') { + !type.getDefaultProps.isReactClassApproved + ? warningWithoutStack$1( + false, + 'getDefaultProps is only used on classic React.createClass ' + + 'definitions. Use a static property named `defaultProps` instead.', + ) + : void 0; + } + } + /** + * Given a fragment, validate that it can only be provided with fragment props + * @param {ReactElement} fragment + */ + + function validateFragmentProps(fragment) { + setCurrentlyValidatingElement(fragment); + var keys = Object.keys(fragment.props); + + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + + if (key !== 'children' && key !== 'key') { + warning$1( + false, + 'Invalid prop `%s` supplied to `React.Fragment`. ' + + 'React.Fragment can only have `key` and `children` props.', + key, + ); + break; + } + } + + if (fragment.ref !== null) { + warning$1(false, 'Invalid attribute `ref` supplied to `React.Fragment`.'); + } + + setCurrentlyValidatingElement(null); + } + + function jsxWithValidation(type, props, key, isStaticChildren, source, self) { + var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to + // succeed and there will likely be errors in render. + + if (!validType) { + var info = ''; + + if ( + type === undefined || + (typeof type === 'object' && type !== null && Object.keys(type).length === 0) + ) { + info += + ' You likely forgot to export your component from the file ' + + "it's defined in, or you might have mixed up default and named imports."; + } + + var sourceInfo = getSourceInfoErrorAddendum(source); + + if (sourceInfo) { + info += sourceInfo; + } else { + info += getDeclarationErrorAddendum(); + } + + var typeString; + + if (type === null) { + typeString = 'null'; + } else if (Array.isArray(type)) { + typeString = 'array'; + } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) { + typeString = '<' + (getComponentName(type.type) || 'Unknown') + ' />'; + info = ' Did you accidentally export a JSX literal instead of a component?'; + } else { + typeString = typeof type; + } + + warning$1( + false, + 'React.jsx: type is invalid -- expected a string (for ' + + 'built-in components) or a class/function (for composite ' + + 'components) but got: %s.%s', + typeString, + info, + ); + } + + var element = jsxDEV(type, props, key, source, self); // The result can be nullish if a mock or a custom function is used. + // TODO: Drop this when these are no longer allowed as the type argument. + + if (element == null) { + return element; + } // Skip key warning if the type isn't valid since our key validation logic + // doesn't expect a non-string/function type and can throw confusing errors. + // We don't want exception behavior to differ between dev and prod. + // (Rendering will throw with a helpful message and as soon as the type is + // fixed, the key warnings will appear.) + + if (validType) { + var children = props.children; + + if (children !== undefined) { + if (isStaticChildren) { + if (Array.isArray(children)) { + for (var i = 0; i < children.length; i++) { + validateChildKeys(children[i], type); + } + + if (Object.freeze) { + Object.freeze(children); + } + } else { + warning$1( + false, + 'React.jsx: Static children should always be an array. ' + + 'You are likely explicitly calling React.jsxs or React.jsxDEV. ' + + 'Use the Babel transform instead.', + ); + } + } else { + validateChildKeys(children, type); + } + } + } + + if (hasOwnProperty$1.call(props, 'key')) { + warning$1( + false, + 'React.jsx: Spreading a key to JSX is a deprecated pattern. ' + + 'Explicitly pass a key after spreading props in your JSX call. ' + + 'E.g. <ComponentName {...props} key={key} />', + ); + } + + if (type === REACT_FRAGMENT_TYPE) { + validateFragmentProps(element); + } else { + validatePropTypes(element); + } + + return element; + } // These two functions exist to still get child warnings in dev + // even with the prod transform. This means that jsxDEV is purely + // opt-in behavior for better messages but that we won't stop + // giving you warnings if you use production apis. + + function jsxWithValidationStatic(type, props, key) { + return jsxWithValidation(type, props, key, true); + } + function jsxWithValidationDynamic(type, props, key) { + return jsxWithValidation(type, props, key, false); + } + function createElementWithValidation(type, props, children) { + var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to + // succeed and there will likely be errors in render. + + if (!validType) { + var info = ''; + + if ( + type === undefined || + (typeof type === 'object' && type !== null && Object.keys(type).length === 0) + ) { + info += + ' You likely forgot to export your component from the file ' + + "it's defined in, or you might have mixed up default and named imports."; + } + + var sourceInfo = getSourceInfoErrorAddendumForProps(props); + + if (sourceInfo) { + info += sourceInfo; + } else { + info += getDeclarationErrorAddendum(); + } + + var typeString; + + if (type === null) { + typeString = 'null'; + } else if (Array.isArray(type)) { + typeString = 'array'; + } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) { + typeString = '<' + (getComponentName(type.type) || 'Unknown') + ' />'; + info = ' Did you accidentally export a JSX literal instead of a component?'; + } else { + typeString = typeof type; + } + + warning$1( + false, + 'React.createElement: type is invalid -- expected a string (for ' + + 'built-in components) or a class/function (for composite ' + + 'components) but got: %s.%s', + typeString, + info, + ); + } + + var element = createElement.apply(this, arguments); // The result can be nullish if a mock or a custom function is used. + // TODO: Drop this when these are no longer allowed as the type argument. + + if (element == null) { + return element; + } // Skip key warning if the type isn't valid since our key validation logic + // doesn't expect a non-string/function type and can throw confusing errors. + // We don't want exception behavior to differ between dev and prod. + // (Rendering will throw with a helpful message and as soon as the type is + // fixed, the key warnings will appear.) + + if (validType) { + for (var i = 2; i < arguments.length; i++) { + validateChildKeys(arguments[i], type); + } + } + + if (type === REACT_FRAGMENT_TYPE) { + validateFragmentProps(element); + } else { + validatePropTypes(element); + } + + return element; + } + function createFactoryWithValidation(type) { + var validatedFactory = createElementWithValidation.bind(null, type); + validatedFactory.type = type; // Legacy hook: remove it + + { + Object.defineProperty(validatedFactory, 'type', { + enumerable: false, + get: function () { + lowPriorityWarningWithoutStack$1( + false, + 'Factory.type is deprecated. Access the class directly ' + + 'before passing it to createFactory.', + ); + Object.defineProperty(this, 'type', { + value: type, + }); + return type; + }, + }); + } + + return validatedFactory; + } + function cloneElementWithValidation(element, props, children) { + var newElement = cloneElement.apply(this, arguments); + + for (var i = 2; i < arguments.length; i++) { + validateChildKeys(arguments[i], newElement.type); + } + + validatePropTypes(newElement); + return newElement; + } + + var hasBadMapPolyfill; + + { + hasBadMapPolyfill = false; + + try { + var frozenObject = Object.freeze({}); + var testMap = new Map([[frozenObject, null]]); + var testSet = new Set([frozenObject]); // This is necessary for Rollup to not consider these unused. + // https://github.com/rollup/rollup/issues/1771 + // TODO: we can remove these if Rollup fixes the bug. + + testMap.set(0, 0); + testSet.add(0); + } catch (e) { + // TODO: Consider warning about bad polyfills + hasBadMapPolyfill = true; + } + } + + function createFundamentalComponent(impl) { + // We use responder as a Map key later on. When we have a bad + // polyfill, then we can't use it as a key as the polyfill tries + // to add a property to the object. + if (true && !hasBadMapPolyfill) { + Object.freeze(impl); + } + + var fundamantalComponent = { + $$typeof: REACT_FUNDAMENTAL_TYPE, + impl: impl, + }; + + { + Object.freeze(fundamantalComponent); + } + + return fundamantalComponent; + } + + function createEventResponder(displayName, responderConfig) { + var getInitialState = responderConfig.getInitialState, + onEvent = responderConfig.onEvent, + onMount = responderConfig.onMount, + onUnmount = responderConfig.onUnmount, + onRootEvent = responderConfig.onRootEvent, + rootEventTypes = responderConfig.rootEventTypes, + targetEventTypes = responderConfig.targetEventTypes, + targetPortalPropagation = responderConfig.targetPortalPropagation; + var eventResponder = { + $$typeof: REACT_RESPONDER_TYPE, + displayName: displayName, + getInitialState: getInitialState || null, + onEvent: onEvent || null, + onMount: onMount || null, + onRootEvent: onRootEvent || null, + onUnmount: onUnmount || null, + rootEventTypes: rootEventTypes || null, + targetEventTypes: targetEventTypes || null, + targetPortalPropagation: targetPortalPropagation || false, + }; // We use responder as a Map key later on. When we have a bad + // polyfill, then we can't use it as a key as the polyfill tries + // to add a property to the object. + + if (true && !hasBadMapPolyfill) { + Object.freeze(eventResponder); + } + + return eventResponder; + } + + function createScope() { + var scopeComponent = { + $$typeof: REACT_SCOPE_TYPE, + }; + + { + Object.freeze(scopeComponent); + } + + return scopeComponent; + } + + // Helps identify side effects in render-phase lifecycle hooks and setState + // reducers by double invoking them in Strict Mode. + + // To preserve the "Pause on caught exceptions" behavior of the debugger, we + // replay the begin phase of a failed component inside invokeGuardedCallback. + + // Warn about deprecated, async-unsafe lifecycles; relates to RFC #6: + + // Gather advanced timing metrics for Profiler subtrees. + + // Trace which interactions trigger each commit. + + // SSR experiments + + // Only used in www builds. + + // Only used in www builds. + + // Disable javascript: URL strings in href for XSS protection. + + // React Fire: prevent the value and checked attributes from syncing + // with their related DOM properties + + // These APIs will no longer be "unstable" in the upcoming 16.7 release, + // Control this behavior with a flag to support 16.6 minor releases in the meanwhile. + + var exposeConcurrentModeAPIs = false; + // Experimental React Flare event system and event components support. + + var enableFlareAPI = false; // Experimental Host Component support. + + var enableFundamentalAPI = false; // Experimental Scope support. + + var enableScopeAPI = false; // New API for JSX transforms to target - https://github.com/reactjs/rfcs/pull/107 + + var enableJSXTransformAPI = false; // We will enforce mocking scheduler with scheduler/unstable_mock at some point. (v17?) + // Till then, we warn about the missing mock, but still fallback to a legacy mode compatible version + + // For tests, we flush suspense fallbacks in an act scope; + // *except* in some of our own tests, where we test incremental loading states. + + // Add a callback property to suspense to notify which promises are currently + // in the update queue. This allows reporting and tracing of what is causing + // the user to see a loading state. + // Also allows hydration callbacks to fire when a dehydrated boundary gets + // hydrated or deleted. + + // Part of the simplification of React.createElement so we can eventually move + // from React.createElement to React.jsx + // https://github.com/reactjs/rfcs/blob/createlement-rfc/text/0000-create-element-changes.md + + // Flag to turn event.target and event.currentTarget in ReactNative from a reactTag to a component instance + + var React = { + Children: { + map: mapChildren, + forEach: forEachChildren, + count: countChildren, + toArray: toArray, + only: onlyChild, + }, + createRef: createRef, + Component: Component, + PureComponent: PureComponent, + createContext: createContext, + forwardRef: forwardRef, + lazy: lazy, + memo: memo, + useCallback: useCallback, + useContext: useContext, + useEffect: useEffect, + useImperativeHandle: useImperativeHandle, + useDebugValue: useDebugValue, + useLayoutEffect: useLayoutEffect, + useMemo: useMemo, + useReducer: useReducer, + useRef: useRef, + useState: useState, + Fragment: REACT_FRAGMENT_TYPE, + Profiler: REACT_PROFILER_TYPE, + StrictMode: REACT_STRICT_MODE_TYPE, + Suspense: REACT_SUSPENSE_TYPE, + createElement: createElementWithValidation, + cloneElement: cloneElementWithValidation, + createFactory: createFactoryWithValidation, + isValidElement: isValidElement, + version: ReactVersion, + __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: ReactSharedInternals, + }; + + if (exposeConcurrentModeAPIs) { + React.useTransition = useTransition; + React.useDeferredValue = useDeferredValue; + React.SuspenseList = REACT_SUSPENSE_LIST_TYPE; + React.unstable_withSuspenseConfig = withSuspenseConfig; + } + + if (enableFlareAPI) { + React.unstable_useResponder = useResponder; + React.unstable_createResponder = createEventResponder; + } + + if (enableFundamentalAPI) { + React.unstable_createFundamental = createFundamentalComponent; + } + + if (enableScopeAPI) { + React.unstable_createScope = createScope; + } // Note: some APIs are added with feature flags. + // Make sure that stable builds for open source + // don't modify the React object to avoid deopts. + // Also let's not expose their names in stable builds. + + if (enableJSXTransformAPI) { + { + React.jsxDEV = jsxWithValidation; + React.jsx = jsxWithValidationDynamic; + React.jsxs = jsxWithValidationStatic; + } + } + + var React$2 = Object.freeze({ + default: React, + }); + + var React$3 = (React$2 && React) || React$2; + + // TODO: decide on the top-level export form. + // This is hacky but makes it work with both Rollup and Jest. + + var react = React$3.default || React$3; + + module.exports = react; + })(); + } + + /***/ + }, + /* 512 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + if (false) { + module.exports = require('./cjs/scheduler.production.min.js'); + } else { + module.exports = __webpack_require__(513); + } + + /***/ + }, + /* 513 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** @license React v0.18.0 + * scheduler.development.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + + if (true) { + (function () { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { value: true }); + + var enableSchedulerDebugging = false; + var enableIsInputPending = false; + var enableProfiling = true; + + var requestHostCallback; + + var requestHostTimeout; + var cancelHostTimeout; + var shouldYieldToHost; + var requestPaint; + + if ( + // If Scheduler runs in a non-DOM environment, it falls back to a naive + // implementation using setTimeout. + typeof window === 'undefined' || // Check if MessageChannel is supported, too. + typeof MessageChannel !== 'function' + ) { + // If this accidentally gets imported in a non-browser environment, e.g. JavaScriptCore, + // fallback to a naive implementation. + var _callback = null; + var _timeoutID = null; + + var _flushCallback = function () { + if (_callback !== null) { + try { + var currentTime = exports.unstable_now(); + var hasRemainingTime = true; + + _callback(hasRemainingTime, currentTime); + + _callback = null; + } catch (e) { + setTimeout(_flushCallback, 0); + throw e; + } + } + }; + + var initialTime = Date.now(); + + exports.unstable_now = function () { + return Date.now() - initialTime; + }; + + requestHostCallback = function (cb) { + if (_callback !== null) { + // Protect against re-entrancy. + setTimeout(requestHostCallback, 0, cb); + } else { + _callback = cb; + setTimeout(_flushCallback, 0); + } + }; + + requestHostTimeout = function (cb, ms) { + _timeoutID = setTimeout(cb, ms); + }; + + cancelHostTimeout = function () { + clearTimeout(_timeoutID); + }; + + shouldYieldToHost = function () { + return false; + }; + + requestPaint = exports.unstable_forceFrameRate = function () {}; + } else { + // Capture local references to native APIs, in case a polyfill overrides them. + var performance = window.performance; + var _Date = window.Date; + var _setTimeout = window.setTimeout; + var _clearTimeout = window.clearTimeout; + + if (typeof console !== 'undefined') { + // TODO: Scheduler no longer requires these methods to be polyfilled. But + // maybe we want to continue warning if they don't exist, to preserve the + // option to rely on it in the future? + var requestAnimationFrame = window.requestAnimationFrame; + var cancelAnimationFrame = window.cancelAnimationFrame; // TODO: Remove fb.me link + + if (typeof requestAnimationFrame !== 'function') { + console.error( + "This browser doesn't support requestAnimationFrame. " + + 'Make sure that you load a ' + + 'polyfill in older browsers. https://fb.me/react-polyfills', + ); + } + + if (typeof cancelAnimationFrame !== 'function') { + console.error( + "This browser doesn't support cancelAnimationFrame. " + + 'Make sure that you load a ' + + 'polyfill in older browsers. https://fb.me/react-polyfills', + ); + } + } + + if (typeof performance === 'object' && typeof performance.now === 'function') { + exports.unstable_now = function () { + return performance.now(); + }; + } else { + var _initialTime = _Date.now(); + + exports.unstable_now = function () { + return _Date.now() - _initialTime; + }; + } + + var isMessageLoopRunning = false; + var scheduledHostCallback = null; + var taskTimeoutID = -1; // Scheduler periodically yields in case there is other work on the main + // thread, like user events. By default, it yields multiple times per frame. + // It does not attempt to align with frame boundaries, since most tasks don't + // need to be frame aligned; for those that do, use requestAnimationFrame. + + var yieldInterval = 5; + var deadline = 0; // TODO: Make this configurable + // TODO: Adjust this based on priority? + + var maxYieldInterval = 300; + var needsPaint = false; + + if ( + enableIsInputPending && + navigator !== undefined && + navigator.scheduling !== undefined && + navigator.scheduling.isInputPending !== undefined + ) { + var scheduling = navigator.scheduling; + + shouldYieldToHost = function () { + var currentTime = exports.unstable_now(); + + if (currentTime >= deadline) { + // There's no time left. We may want to yield control of the main + // thread, so the browser can perform high priority tasks. The main ones + // are painting and user input. If there's a pending paint or a pending + // input, then we should yield. But if there's neither, then we can + // yield less often while remaining responsive. We'll eventually yield + // regardless, since there could be a pending paint that wasn't + // accompanied by a call to `requestPaint`, or other main thread tasks + // like network events. + if (needsPaint || scheduling.isInputPending()) { + // There is either a pending paint or a pending input. + return true; + } // There's no pending input. Only yield if we've reached the max + // yield interval. + + return currentTime >= maxYieldInterval; + } else { + // There's still time left in the frame. + return false; + } + }; + + requestPaint = function () { + needsPaint = true; + }; + } else { + // `isInputPending` is not available. Since we have no way of knowing if + // there's pending input, always yield at the end of the frame. + shouldYieldToHost = function () { + return exports.unstable_now() >= deadline; + }; // Since we yield every frame regardless, `requestPaint` has no effect. + + requestPaint = function () {}; + } + + exports.unstable_forceFrameRate = function (fps) { + if (fps < 0 || fps > 125) { + console.error( + 'forceFrameRate takes a positive int between 0 and 125, ' + + 'forcing framerates higher than 125 fps is not unsupported', + ); + return; + } + + if (fps > 0) { + yieldInterval = Math.floor(1000 / fps); + } else { + // reset the framerate + yieldInterval = 5; + } + }; + + var performWorkUntilDeadline = function () { + if (scheduledHostCallback !== null) { + var currentTime = exports.unstable_now(); // Yield after `yieldInterval` ms, regardless of where we are in the vsync + // cycle. This means there's always time remaining at the beginning of + // the message event. + + deadline = currentTime + yieldInterval; + var hasTimeRemaining = true; + + try { + var hasMoreWork = scheduledHostCallback(hasTimeRemaining, currentTime); + + if (!hasMoreWork) { + isMessageLoopRunning = false; + scheduledHostCallback = null; + } else { + // If there's more work, schedule the next message event at the end + // of the preceding one. + port.postMessage(null); + } + } catch (error) { + // If a scheduler task throws, exit the current browser task so the + // error can be observed. + port.postMessage(null); + throw error; + } + } else { + isMessageLoopRunning = false; + } // Yielding to the browser will give it a chance to paint, so we can + // reset this. + + needsPaint = false; + }; + + var channel = new MessageChannel(); + var port = channel.port2; + channel.port1.onmessage = performWorkUntilDeadline; + + requestHostCallback = function (callback) { + scheduledHostCallback = callback; + + if (!isMessageLoopRunning) { + isMessageLoopRunning = true; + port.postMessage(null); + } + }; + + requestHostTimeout = function (callback, ms) { + taskTimeoutID = _setTimeout(function () { + callback(exports.unstable_now()); + }, ms); + }; + + cancelHostTimeout = function () { + _clearTimeout(taskTimeoutID); + + taskTimeoutID = -1; + }; + } + + function push(heap, node) { + var index = heap.length; + heap.push(node); + siftUp(heap, node, index); + } + function peek(heap) { + var first = heap[0]; + return first === undefined ? null : first; + } + function pop(heap) { + var first = heap[0]; + + if (first !== undefined) { + var last = heap.pop(); + + if (last !== first) { + heap[0] = last; + siftDown(heap, last, 0); + } + + return first; + } else { + return null; + } + } + + function siftUp(heap, node, i) { + var index = i; + + while (true) { + var parentIndex = Math.floor((index - 1) / 2); + var parent = heap[parentIndex]; + + if (parent !== undefined && compare(parent, node) > 0) { + // The parent is larger. Swap positions. + heap[parentIndex] = node; + heap[index] = parent; + index = parentIndex; + } else { + // The parent is smaller. Exit. + return; + } + } + } + + function siftDown(heap, node, i) { + var index = i; + var length = heap.length; + + while (index < length) { + var leftIndex = (index + 1) * 2 - 1; + var left = heap[leftIndex]; + var rightIndex = leftIndex + 1; + var right = heap[rightIndex]; // If the left or right node is smaller, swap with the smaller of those. + + if (left !== undefined && compare(left, node) < 0) { + if (right !== undefined && compare(right, left) < 0) { + heap[index] = right; + heap[rightIndex] = node; + index = rightIndex; + } else { + heap[index] = left; + heap[leftIndex] = node; + index = leftIndex; + } + } else if (right !== undefined && compare(right, node) < 0) { + heap[index] = right; + heap[rightIndex] = node; + index = rightIndex; + } else { + // Neither child is smaller. Exit. + return; + } + } + } + + function compare(a, b) { + // Compare sort index first, then task id. + var diff = a.sortIndex - b.sortIndex; + return diff !== 0 ? diff : a.id - b.id; + } + + // TODO: Use symbols? + var NoPriority = 0; + var ImmediatePriority = 1; + var UserBlockingPriority = 2; + var NormalPriority = 3; + var LowPriority = 4; + var IdlePriority = 5; + + var runIdCounter = 0; + var mainThreadIdCounter = 0; + var profilingStateSize = 4; + var sharedProfilingBuffer = enableProfiling // $FlowFixMe Flow doesn't know about SharedArrayBuffer + ? typeof SharedArrayBuffer === 'function' + ? new SharedArrayBuffer(profilingStateSize * Int32Array.BYTES_PER_ELEMENT) // $FlowFixMe Flow doesn't know about ArrayBuffer + : typeof ArrayBuffer === 'function' + ? new ArrayBuffer(profilingStateSize * Int32Array.BYTES_PER_ELEMENT) + : null // Don't crash the init path on IE9 + : null; + var profilingState = + enableProfiling && sharedProfilingBuffer !== null ? new Int32Array(sharedProfilingBuffer) : []; // We can't read this but it helps save bytes for null checks + + var PRIORITY = 0; + var CURRENT_TASK_ID = 1; + var CURRENT_RUN_ID = 2; + var QUEUE_SIZE = 3; + + if (enableProfiling) { + profilingState[PRIORITY] = NoPriority; // This is maintained with a counter, because the size of the priority queue + // array might include canceled tasks. + + profilingState[QUEUE_SIZE] = 0; + profilingState[CURRENT_TASK_ID] = 0; + } // Bytes per element is 4 + + var INITIAL_EVENT_LOG_SIZE = 131072; + var MAX_EVENT_LOG_SIZE = 524288; // Equivalent to 2 megabytes + + var eventLogSize = 0; + var eventLogBuffer = null; + var eventLog = null; + var eventLogIndex = 0; + var TaskStartEvent = 1; + var TaskCompleteEvent = 2; + var TaskErrorEvent = 3; + var TaskCancelEvent = 4; + var TaskRunEvent = 5; + var TaskYieldEvent = 6; + var SchedulerSuspendEvent = 7; + var SchedulerResumeEvent = 8; + + function logEvent(entries) { + if (eventLog !== null) { + var offset = eventLogIndex; + eventLogIndex += entries.length; + + if (eventLogIndex + 1 > eventLogSize) { + eventLogSize *= 2; + + if (eventLogSize > MAX_EVENT_LOG_SIZE) { + console.error( + "Scheduler Profiling: Event log exceeded maximum size. Don't " + + 'forget to call `stopLoggingProfilingEvents()`.', + ); + stopLoggingProfilingEvents(); + return; + } + + var newEventLog = new Int32Array(eventLogSize * 4); + newEventLog.set(eventLog); + eventLogBuffer = newEventLog.buffer; + eventLog = newEventLog; + } + + eventLog.set(entries, offset); + } + } + + function startLoggingProfilingEvents() { + eventLogSize = INITIAL_EVENT_LOG_SIZE; + eventLogBuffer = new ArrayBuffer(eventLogSize * 4); + eventLog = new Int32Array(eventLogBuffer); + eventLogIndex = 0; + } + function stopLoggingProfilingEvents() { + var buffer = eventLogBuffer; + eventLogSize = 0; + eventLogBuffer = null; + eventLog = null; + eventLogIndex = 0; + return buffer; + } + function markTaskStart(task, ms) { + if (enableProfiling) { + profilingState[QUEUE_SIZE]++; + + if (eventLog !== null) { + // performance.now returns a float, representing milliseconds. When the + // event is logged, it's coerced to an int. Convert to microseconds to + // maintain extra degrees of precision. + logEvent([TaskStartEvent, ms * 1000, task.id, task.priorityLevel]); + } + } + } + function markTaskCompleted(task, ms) { + if (enableProfiling) { + profilingState[PRIORITY] = NoPriority; + profilingState[CURRENT_TASK_ID] = 0; + profilingState[QUEUE_SIZE]--; + + if (eventLog !== null) { + logEvent([TaskCompleteEvent, ms * 1000, task.id]); + } + } + } + function markTaskCanceled(task, ms) { + if (enableProfiling) { + profilingState[QUEUE_SIZE]--; + + if (eventLog !== null) { + logEvent([TaskCancelEvent, ms * 1000, task.id]); + } + } + } + function markTaskErrored(task, ms) { + if (enableProfiling) { + profilingState[PRIORITY] = NoPriority; + profilingState[CURRENT_TASK_ID] = 0; + profilingState[QUEUE_SIZE]--; + + if (eventLog !== null) { + logEvent([TaskErrorEvent, ms * 1000, task.id]); + } + } + } + function markTaskRun(task, ms) { + if (enableProfiling) { + runIdCounter++; + profilingState[PRIORITY] = task.priorityLevel; + profilingState[CURRENT_TASK_ID] = task.id; + profilingState[CURRENT_RUN_ID] = runIdCounter; + + if (eventLog !== null) { + logEvent([TaskRunEvent, ms * 1000, task.id, runIdCounter]); + } + } + } + function markTaskYield(task, ms) { + if (enableProfiling) { + profilingState[PRIORITY] = NoPriority; + profilingState[CURRENT_TASK_ID] = 0; + profilingState[CURRENT_RUN_ID] = 0; + + if (eventLog !== null) { + logEvent([TaskYieldEvent, ms * 1000, task.id, runIdCounter]); + } + } + } + function markSchedulerSuspended(ms) { + if (enableProfiling) { + mainThreadIdCounter++; + + if (eventLog !== null) { + logEvent([SchedulerSuspendEvent, ms * 1000, mainThreadIdCounter]); + } + } + } + function markSchedulerUnsuspended(ms) { + if (enableProfiling) { + if (eventLog !== null) { + logEvent([SchedulerResumeEvent, ms * 1000, mainThreadIdCounter]); + } + } + } + + /* eslint-disable no-var */ + // Math.pow(2, 30) - 1 + // 0b111111111111111111111111111111 + + var maxSigned31BitInt = 1073741823; // Times out immediately + + var IMMEDIATE_PRIORITY_TIMEOUT = -1; // Eventually times out + + var USER_BLOCKING_PRIORITY = 250; + var NORMAL_PRIORITY_TIMEOUT = 5000; + var LOW_PRIORITY_TIMEOUT = 10000; // Never times out + + var IDLE_PRIORITY = maxSigned31BitInt; // Tasks are stored on a min heap + + var taskQueue = []; + var timerQueue = []; // Incrementing id counter. Used to maintain insertion order. + + var taskIdCounter = 1; // Pausing the scheduler is useful for debugging. + + var isSchedulerPaused = false; + var currentTask = null; + var currentPriorityLevel = NormalPriority; // This is set while performing work, to prevent re-entrancy. + + var isPerformingWork = false; + var isHostCallbackScheduled = false; + var isHostTimeoutScheduled = false; + + function advanceTimers(currentTime) { + // Check for tasks that are no longer delayed and add them to the queue. + var timer = peek(timerQueue); + + while (timer !== null) { + if (timer.callback === null) { + // Timer was cancelled. + pop(timerQueue); + } else if (timer.startTime <= currentTime) { + // Timer fired. Transfer to the task queue. + pop(timerQueue); + timer.sortIndex = timer.expirationTime; + push(taskQueue, timer); + + if (enableProfiling) { + markTaskStart(timer, currentTime); + timer.isQueued = true; + } + } else { + // Remaining timers are pending. + return; + } + + timer = peek(timerQueue); + } + } + + function handleTimeout(currentTime) { + isHostTimeoutScheduled = false; + advanceTimers(currentTime); + + if (!isHostCallbackScheduled) { + if (peek(taskQueue) !== null) { + isHostCallbackScheduled = true; + requestHostCallback(flushWork); + } else { + var firstTimer = peek(timerQueue); + + if (firstTimer !== null) { + requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime); + } + } + } + } + + function flushWork(hasTimeRemaining, initialTime) { + if (enableProfiling) { + markSchedulerUnsuspended(initialTime); + } // We'll need a host callback the next time work is scheduled. + + isHostCallbackScheduled = false; + + if (isHostTimeoutScheduled) { + // We scheduled a timeout but it's no longer needed. Cancel it. + isHostTimeoutScheduled = false; + cancelHostTimeout(); + } + + isPerformingWork = true; + var previousPriorityLevel = currentPriorityLevel; + + try { + if (enableProfiling) { + try { + return workLoop(hasTimeRemaining, initialTime); + } catch (error) { + if (currentTask !== null) { + var currentTime = exports.unstable_now(); + markTaskErrored(currentTask, currentTime); + currentTask.isQueued = false; + } + + throw error; + } + } else { + // No catch in prod codepath. + return workLoop(hasTimeRemaining, initialTime); + } + } finally { + currentTask = null; + currentPriorityLevel = previousPriorityLevel; + isPerformingWork = false; + + if (enableProfiling) { + var _currentTime = exports.unstable_now(); + + markSchedulerSuspended(_currentTime); + } + } + } + + function workLoop(hasTimeRemaining, initialTime) { + var currentTime = initialTime; + advanceTimers(currentTime); + currentTask = peek(taskQueue); + + while (currentTask !== null && !(enableSchedulerDebugging && isSchedulerPaused)) { + if (currentTask.expirationTime > currentTime && (!hasTimeRemaining || shouldYieldToHost())) { + // This currentTask hasn't expired, and we've reached the deadline. + break; + } + + var callback = currentTask.callback; + + if (callback !== null) { + currentTask.callback = null; + currentPriorityLevel = currentTask.priorityLevel; + var didUserCallbackTimeout = currentTask.expirationTime <= currentTime; + markTaskRun(currentTask, currentTime); + var continuationCallback = callback(didUserCallbackTimeout); + currentTime = exports.unstable_now(); + + if (typeof continuationCallback === 'function') { + currentTask.callback = continuationCallback; + markTaskYield(currentTask, currentTime); + } else { + if (enableProfiling) { + markTaskCompleted(currentTask, currentTime); + currentTask.isQueued = false; + } + + if (currentTask === peek(taskQueue)) { + pop(taskQueue); + } + } + + advanceTimers(currentTime); + } else { + pop(taskQueue); + } + + currentTask = peek(taskQueue); + } // Return whether there's additional work + + if (currentTask !== null) { + return true; + } else { + var firstTimer = peek(timerQueue); + + if (firstTimer !== null) { + requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime); + } + + return false; + } + } + + function unstable_runWithPriority(priorityLevel, eventHandler) { + switch (priorityLevel) { + case ImmediatePriority: + case UserBlockingPriority: + case NormalPriority: + case LowPriority: + case IdlePriority: + break; + + default: + priorityLevel = NormalPriority; + } + + var previousPriorityLevel = currentPriorityLevel; + currentPriorityLevel = priorityLevel; + + try { + return eventHandler(); + } finally { + currentPriorityLevel = previousPriorityLevel; + } + } + + function unstable_next(eventHandler) { + var priorityLevel; + + switch (currentPriorityLevel) { + case ImmediatePriority: + case UserBlockingPriority: + case NormalPriority: + // Shift down to normal priority + priorityLevel = NormalPriority; + break; + + default: + // Anything lower than normal priority should remain at the current level. + priorityLevel = currentPriorityLevel; + break; + } + + var previousPriorityLevel = currentPriorityLevel; + currentPriorityLevel = priorityLevel; + + try { + return eventHandler(); + } finally { + currentPriorityLevel = previousPriorityLevel; + } + } + + function unstable_wrapCallback(callback) { + var parentPriorityLevel = currentPriorityLevel; + return function () { + // This is a fork of runWithPriority, inlined for performance. + var previousPriorityLevel = currentPriorityLevel; + currentPriorityLevel = parentPriorityLevel; + + try { + return callback.apply(this, arguments); + } finally { + currentPriorityLevel = previousPriorityLevel; + } + }; + } + + function timeoutForPriorityLevel(priorityLevel) { + switch (priorityLevel) { + case ImmediatePriority: + return IMMEDIATE_PRIORITY_TIMEOUT; + + case UserBlockingPriority: + return USER_BLOCKING_PRIORITY; + + case IdlePriority: + return IDLE_PRIORITY; + + case LowPriority: + return LOW_PRIORITY_TIMEOUT; + + case NormalPriority: + default: + return NORMAL_PRIORITY_TIMEOUT; + } + } + + function unstable_scheduleCallback(priorityLevel, callback, options) { + var currentTime = exports.unstable_now(); + var startTime; + var timeout; + + if (typeof options === 'object' && options !== null) { + var delay = options.delay; + + if (typeof delay === 'number' && delay > 0) { + startTime = currentTime + delay; + } else { + startTime = currentTime; + } + + timeout = + typeof options.timeout === 'number' + ? options.timeout + : timeoutForPriorityLevel(priorityLevel); + } else { + timeout = timeoutForPriorityLevel(priorityLevel); + startTime = currentTime; + } + + var expirationTime = startTime + timeout; + var newTask = { + id: taskIdCounter++, + callback: callback, + priorityLevel: priorityLevel, + startTime: startTime, + expirationTime: expirationTime, + sortIndex: -1, + }; + + if (enableProfiling) { + newTask.isQueued = false; + } + + if (startTime > currentTime) { + // This is a delayed task. + newTask.sortIndex = startTime; + push(timerQueue, newTask); + + if (peek(taskQueue) === null && newTask === peek(timerQueue)) { + // All tasks are delayed, and this is the task with the earliest delay. + if (isHostTimeoutScheduled) { + // Cancel an existing timeout. + cancelHostTimeout(); + } else { + isHostTimeoutScheduled = true; + } // Schedule a timeout. + + requestHostTimeout(handleTimeout, startTime - currentTime); + } + } else { + newTask.sortIndex = expirationTime; + push(taskQueue, newTask); + + if (enableProfiling) { + markTaskStart(newTask, currentTime); + newTask.isQueued = true; + } // Schedule a host callback, if needed. If we're already performing work, + // wait until the next time we yield. + + if (!isHostCallbackScheduled && !isPerformingWork) { + isHostCallbackScheduled = true; + requestHostCallback(flushWork); + } + } + + return newTask; + } + + function unstable_pauseExecution() { + isSchedulerPaused = true; + } + + function unstable_continueExecution() { + isSchedulerPaused = false; + + if (!isHostCallbackScheduled && !isPerformingWork) { + isHostCallbackScheduled = true; + requestHostCallback(flushWork); + } + } + + function unstable_getFirstCallbackNode() { + return peek(taskQueue); + } + + function unstable_cancelCallback(task) { + if (enableProfiling) { + if (task.isQueued) { + var currentTime = exports.unstable_now(); + markTaskCanceled(task, currentTime); + task.isQueued = false; + } + } // Null out the callback to indicate the task has been canceled. (Can't + // remove from the queue because you can't remove arbitrary nodes from an + // array based heap, only the first one.) + + task.callback = null; + } + + function unstable_getCurrentPriorityLevel() { + return currentPriorityLevel; + } + + function unstable_shouldYield() { + var currentTime = exports.unstable_now(); + advanceTimers(currentTime); + var firstTask = peek(taskQueue); + return ( + (firstTask !== currentTask && + currentTask !== null && + firstTask !== null && + firstTask.callback !== null && + firstTask.startTime <= currentTime && + firstTask.expirationTime < currentTask.expirationTime) || + shouldYieldToHost() + ); + } + + var unstable_requestPaint = requestPaint; + var unstable_Profiling = enableProfiling + ? { + startLoggingProfilingEvents: startLoggingProfilingEvents, + stopLoggingProfilingEvents: stopLoggingProfilingEvents, + sharedProfilingBuffer: sharedProfilingBuffer, + } + : null; + + exports.unstable_ImmediatePriority = ImmediatePriority; + exports.unstable_UserBlockingPriority = UserBlockingPriority; + exports.unstable_NormalPriority = NormalPriority; + exports.unstable_IdlePriority = IdlePriority; + exports.unstable_LowPriority = LowPriority; + exports.unstable_runWithPriority = unstable_runWithPriority; + exports.unstable_next = unstable_next; + exports.unstable_scheduleCallback = unstable_scheduleCallback; + exports.unstable_cancelCallback = unstable_cancelCallback; + exports.unstable_wrapCallback = unstable_wrapCallback; + exports.unstable_getCurrentPriorityLevel = unstable_getCurrentPriorityLevel; + exports.unstable_shouldYield = unstable_shouldYield; + exports.unstable_requestPaint = unstable_requestPaint; + exports.unstable_continueExecution = unstable_continueExecution; + exports.unstable_pauseExecution = unstable_pauseExecution; + exports.unstable_getFirstCallbackNode = unstable_getFirstCallbackNode; + exports.unstable_Profiling = unstable_Profiling; + })(); + } + + /***/ + }, + /* 514 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + if (false) { + module.exports = require('./cjs/scheduler-tracing.production.min.js'); + } else { + module.exports = __webpack_require__(515); + } + + /***/ + }, + /* 515 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** @license React v0.18.0 + * scheduler-tracing.development.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + + if (true) { + (function () { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { value: true }); + + // Helps identify side effects in render-phase lifecycle hooks and setState + // reducers by double invoking them in Strict Mode. + + // To preserve the "Pause on caught exceptions" behavior of the debugger, we + // replay the begin phase of a failed component inside invokeGuardedCallback. + + // Warn about deprecated, async-unsafe lifecycles; relates to RFC #6: + + // Gather advanced timing metrics for Profiler subtrees. + + // Trace which interactions trigger each commit. + + var enableSchedulerTracing = true; // SSR experiments + + // Only used in www builds. + + // Only used in www builds. + + // Disable javascript: URL strings in href for XSS protection. + + // React Fire: prevent the value and checked attributes from syncing + // with their related DOM properties + + // These APIs will no longer be "unstable" in the upcoming 16.7 release, + // Control this behavior with a flag to support 16.6 minor releases in the meanwhile. + + // Experimental React Flare event system and event components support. + + // Experimental Host Component support. + + // Experimental Scope support. + + // New API for JSX transforms to target - https://github.com/reactjs/rfcs/pull/107 + + // We will enforce mocking scheduler with scheduler/unstable_mock at some point. (v17?) + // Till then, we warn about the missing mock, but still fallback to a legacy mode compatible version + + // For tests, we flush suspense fallbacks in an act scope; + // *except* in some of our own tests, where we test incremental loading states. + + // Add a callback property to suspense to notify which promises are currently + // in the update queue. This allows reporting and tracing of what is causing + // the user to see a loading state. + // Also allows hydration callbacks to fire when a dehydrated boundary gets + // hydrated or deleted. + + // Part of the simplification of React.createElement so we can eventually move + // from React.createElement to React.jsx + // https://github.com/reactjs/rfcs/blob/createlement-rfc/text/0000-create-element-changes.md + + // Flag to turn event.target and event.currentTarget in ReactNative from a reactTag to a component instance + + var DEFAULT_THREAD_ID = 0; // Counters used to generate unique IDs. + + var interactionIDCounter = 0; + var threadIDCounter = 0; // Set of currently traced interactions. + // Interactions "stack"– + // Meaning that newly traced interactions are appended to the previously active set. + // When an interaction goes out of scope, the previous set (if any) is restored. + + exports.__interactionsRef = null; // Listener(s) to notify when interactions begin and end. + + exports.__subscriberRef = null; + + if (enableSchedulerTracing) { + exports.__interactionsRef = { + current: new Set(), + }; + exports.__subscriberRef = { + current: null, + }; + } + + function unstable_clear(callback) { + if (!enableSchedulerTracing) { + return callback(); + } + + var prevInteractions = exports.__interactionsRef.current; + exports.__interactionsRef.current = new Set(); + + try { + return callback(); + } finally { + exports.__interactionsRef.current = prevInteractions; + } + } + function unstable_getCurrent() { + if (!enableSchedulerTracing) { + return null; + } else { + return exports.__interactionsRef.current; + } + } + function unstable_getThreadID() { + return ++threadIDCounter; + } + function unstable_trace(name, timestamp, callback) { + var threadID = + arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : DEFAULT_THREAD_ID; + + if (!enableSchedulerTracing) { + return callback(); + } + + var interaction = { + __count: 1, + id: interactionIDCounter++, + name: name, + timestamp: timestamp, + }; + var prevInteractions = exports.__interactionsRef.current; // Traced interactions should stack/accumulate. + // To do that, clone the current interactions. + // The previous set will be restored upon completion. + + var interactions = new Set(prevInteractions); + interactions.add(interaction); + exports.__interactionsRef.current = interactions; + var subscriber = exports.__subscriberRef.current; + var returnValue; + + try { + if (subscriber !== null) { + subscriber.onInteractionTraced(interaction); + } + } finally { + try { + if (subscriber !== null) { + subscriber.onWorkStarted(interactions, threadID); + } + } finally { + try { + returnValue = callback(); + } finally { + exports.__interactionsRef.current = prevInteractions; + + try { + if (subscriber !== null) { + subscriber.onWorkStopped(interactions, threadID); + } + } finally { + interaction.__count--; // If no async work was scheduled for this interaction, + // Notify subscribers that it's completed. + + if (subscriber !== null && interaction.__count === 0) { + subscriber.onInteractionScheduledWorkCompleted(interaction); + } + } + } + } + } + + return returnValue; + } + function unstable_wrap(callback) { + var threadID = + arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEFAULT_THREAD_ID; + + if (!enableSchedulerTracing) { + return callback; + } + + var wrappedInteractions = exports.__interactionsRef.current; + var subscriber = exports.__subscriberRef.current; + + if (subscriber !== null) { + subscriber.onWorkScheduled(wrappedInteractions, threadID); + } // Update the pending async work count for the current interactions. + // Update after calling subscribers in case of error. + + wrappedInteractions.forEach(function (interaction) { + interaction.__count++; + }); + var hasRun = false; + + function wrapped() { + var prevInteractions = exports.__interactionsRef.current; + exports.__interactionsRef.current = wrappedInteractions; + subscriber = exports.__subscriberRef.current; + + try { + var returnValue; + + try { + if (subscriber !== null) { + subscriber.onWorkStarted(wrappedInteractions, threadID); + } + } finally { + try { + returnValue = callback.apply(undefined, arguments); + } finally { + exports.__interactionsRef.current = prevInteractions; + + if (subscriber !== null) { + subscriber.onWorkStopped(wrappedInteractions, threadID); + } + } + } + + return returnValue; + } finally { + if (!hasRun) { + // We only expect a wrapped function to be executed once, + // But in the event that it's executed more than once– + // Only decrement the outstanding interaction counts once. + hasRun = true; // Update pending async counts for all wrapped interactions. + // If this was the last scheduled async work for any of them, + // Mark them as completed. + + wrappedInteractions.forEach(function (interaction) { + interaction.__count--; + + if (subscriber !== null && interaction.__count === 0) { + subscriber.onInteractionScheduledWorkCompleted(interaction); + } + }); + } + } + } + + wrapped.cancel = function cancel() { + subscriber = exports.__subscriberRef.current; + + try { + if (subscriber !== null) { + subscriber.onWorkCanceled(wrappedInteractions, threadID); + } + } finally { + // Update pending async counts for all wrapped interactions. + // If this was the last scheduled async work for any of them, + // Mark them as completed. + wrappedInteractions.forEach(function (interaction) { + interaction.__count--; + + if (subscriber && interaction.__count === 0) { + subscriber.onInteractionScheduledWorkCompleted(interaction); + } + }); + } + }; + + return wrapped; + } + + var subscribers = null; + + if (enableSchedulerTracing) { + subscribers = new Set(); + } + + function unstable_subscribe(subscriber) { + if (enableSchedulerTracing) { + subscribers.add(subscriber); + + if (subscribers.size === 1) { + exports.__subscriberRef.current = { + onInteractionScheduledWorkCompleted: onInteractionScheduledWorkCompleted, + onInteractionTraced: onInteractionTraced, + onWorkCanceled: onWorkCanceled, + onWorkScheduled: onWorkScheduled, + onWorkStarted: onWorkStarted, + onWorkStopped: onWorkStopped, + }; + } + } + } + function unstable_unsubscribe(subscriber) { + if (enableSchedulerTracing) { + subscribers.delete(subscriber); + + if (subscribers.size === 0) { + exports.__subscriberRef.current = null; + } + } + } + + function onInteractionTraced(interaction) { + var didCatchError = false; + var caughtError = null; + subscribers.forEach(function (subscriber) { + try { + subscriber.onInteractionTraced(interaction); + } catch (error) { + if (!didCatchError) { + didCatchError = true; + caughtError = error; + } + } + }); + + if (didCatchError) { + throw caughtError; + } + } + + function onInteractionScheduledWorkCompleted(interaction) { + var didCatchError = false; + var caughtError = null; + subscribers.forEach(function (subscriber) { + try { + subscriber.onInteractionScheduledWorkCompleted(interaction); + } catch (error) { + if (!didCatchError) { + didCatchError = true; + caughtError = error; + } + } + }); + + if (didCatchError) { + throw caughtError; + } + } + + function onWorkScheduled(interactions, threadID) { + var didCatchError = false; + var caughtError = null; + subscribers.forEach(function (subscriber) { + try { + subscriber.onWorkScheduled(interactions, threadID); + } catch (error) { + if (!didCatchError) { + didCatchError = true; + caughtError = error; + } + } + }); + + if (didCatchError) { + throw caughtError; + } + } + + function onWorkStarted(interactions, threadID) { + var didCatchError = false; + var caughtError = null; + subscribers.forEach(function (subscriber) { + try { + subscriber.onWorkStarted(interactions, threadID); + } catch (error) { + if (!didCatchError) { + didCatchError = true; + caughtError = error; + } + } + }); + + if (didCatchError) { + throw caughtError; + } + } + + function onWorkStopped(interactions, threadID) { + var didCatchError = false; + var caughtError = null; + subscribers.forEach(function (subscriber) { + try { + subscriber.onWorkStopped(interactions, threadID); + } catch (error) { + if (!didCatchError) { + didCatchError = true; + caughtError = error; + } + } + }); + + if (didCatchError) { + throw caughtError; + } + } + + function onWorkCanceled(interactions, threadID) { + var didCatchError = false; + var caughtError = null; + subscribers.forEach(function (subscriber) { + try { + subscriber.onWorkCanceled(interactions, threadID); + } catch (error) { + if (!didCatchError) { + didCatchError = true; + caughtError = error; + } + } + }); + + if (didCatchError) { + throw caughtError; + } + } + + exports.unstable_clear = unstable_clear; + exports.unstable_getCurrent = unstable_getCurrent; + exports.unstable_getThreadID = unstable_getThreadID; + exports.unstable_trace = unstable_trace; + exports.unstable_wrap = unstable_wrap; + exports.unstable_subscribe = unstable_subscribe; + exports.unstable_unsubscribe = unstable_unsubscribe; + })(); + } + + /***/ + }, + /* 516 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var _interopRequireDefault = __webpack_require__(40); + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.reactOnRailsPageLoaded = reactOnRailsPageLoaded; + exports.clientStartup = clientStartup; + + var _stringify = _interopRequireDefault(__webpack_require__(105)); + + var _reactDom = _interopRequireDefault(__webpack_require__(229)); + + var _createReactElement = _interopRequireDefault(__webpack_require__(160)); + + var _isCreateReactElementResultNonReactComponent = _interopRequireDefault(__webpack_require__(231)); + + /* global ReactOnRails Turbolinks */ + var REACT_ON_RAILS_STORE_ATTRIBUTE = 'data-js-react-on-rails-store'; + + function findContext() { + if (typeof window.ReactOnRails !== 'undefined') { + return window; + } else if (typeof ReactOnRails !== 'undefined') { + return global; + } + + throw new Error('ReactOnRails is undefined in both global and window namespaces.\n '); + } + + function debugTurbolinks() { + if (!window) { + return; + } + + var context = findContext(); + + if (context.ReactOnRails.option('traceTurbolinks')) { + var _console; + + for (var _len = arguments.length, msg = new Array(_len), _key = 0; _key < _len; _key++) { + msg[_key] = arguments[_key]; + } + + (_console = console).log.apply(_console, ['TURBO:'].concat(msg)); + } + } + + function turbolinksInstalled() { + return typeof Turbolinks !== 'undefined'; + } + + function forEach(fn, className, railsContext) { + var els = document.getElementsByClassName(className); + + for (var i = 0; i < els.length; i += 1) { + fn(els[i], railsContext); + } + } + + function forEachByAttribute(fn, attributeName, railsContext) { + var els = document.querySelectorAll('['.concat(attributeName, ']')); + + for (var i = 0; i < els.length; i += 1) { + fn(els[i], railsContext); + } + } + + function forEachComponent(fn, railsContext) { + forEach(fn, 'js-react-on-rails-component', railsContext); + } + + function initializeStore(el, railsContext) { + var context = findContext(); + var name = el.getAttribute(REACT_ON_RAILS_STORE_ATTRIBUTE); + var props = JSON.parse(el.textContent); + var storeGenerator = context.ReactOnRails.getStoreGenerator(name); + var store = storeGenerator(props, railsContext); + context.ReactOnRails.setStore(name, store); + } + + function forEachStore(railsContext) { + forEachByAttribute(initializeStore, REACT_ON_RAILS_STORE_ATTRIBUTE, railsContext); + } + + function turbolinksVersion5() { + return typeof Turbolinks.controller !== 'undefined'; + } + + function turbolinksSupported() { + return Turbolinks.supported; + } + + function delegateToRenderer(componentObj, props, railsContext, domNodeId, trace) { + var name = componentObj.name, + component = componentObj.component, + isRenderer = componentObj.isRenderer; + + if (isRenderer) { + if (trace) { + console.log( + 'DELEGATING TO RENDERER ' + .concat(name, ' for dom node with id: ') + .concat(domNodeId, ' with props, railsContext:'), + props, + railsContext, + ); + } + + component(props, railsContext, domNodeId); + return true; + } + + return false; + } + + function domNodeIdForEl(el) { + return el.getAttribute('data-dom-id'); + } + /** + * Used for client rendering by ReactOnRails. Either calls ReactDOM.hydrate, ReactDOM.render, or + * delegates to a renderer registered by the user. + * @param el + */ + + function render(el, railsContext) { + var context = findContext(); // This must match lib/react_on_rails/helper.rb + + var name = el.getAttribute('data-component-name'); + var domNodeId = domNodeIdForEl(el); + var props = JSON.parse(el.textContent); + var trace = el.getAttribute('data-trace'); + + try { + var domNode = document.getElementById(domNodeId); + + if (domNode) { + var componentObj = context.ReactOnRails.getComponent(name); + + if (delegateToRenderer(componentObj, props, railsContext, domNodeId, trace)) { + return; + } // Hydrate if available and was server rendered + + var shouldHydrate = !!_reactDom.default.hydrate && !!domNode.innerHTML; + var reactElementOrRouterResult = (0, _createReactElement.default)({ + componentObj: componentObj, + props: props, + domNodeId: domNodeId, + trace: trace, + railsContext: railsContext, + shouldHydrate: shouldHydrate, + }); + + if ((0, _isCreateReactElementResultNonReactComponent.default)(reactElementOrRouterResult)) { + throw new Error( + 'You returned a server side type of react-router error: '.concat( + (0, _stringify.default)(reactElementOrRouterResult), + '\nYou should return a React.Component always for the client side entry point.', + ), + ); + } else if (shouldHydrate) { + _reactDom.default.hydrate(reactElementOrRouterResult, domNode); + } else { + _reactDom.default.render(reactElementOrRouterResult, domNode); + } + } + } catch (e) { + e.message = + 'ReactOnRails encountered an error while rendering component: '.concat(name, '.\n') + + 'Original message: '.concat(e.message); + throw e; + } + } + + function parseRailsContext() { + var el = document.getElementById('js-react-on-rails-context'); + + if (el) { + return JSON.parse(el.textContent); + } + + return null; + } + + function reactOnRailsPageLoaded() { + debugTurbolinks('reactOnRailsPageLoaded'); + var railsContext = parseRailsContext(); + forEachStore(railsContext); + forEachComponent(render, railsContext); + } + + function unmount(el) { + var domNodeId = domNodeIdForEl(el); + var domNode = document.getElementById(domNodeId); + + try { + _reactDom.default.unmountComponentAtNode(domNode); + } catch (e) { + console.info( + 'Caught error calling unmountComponentAtNode: '.concat(e.message, ' for domNode'), + domNode, + e, + ); + } + } + + function reactOnRailsPageUnloaded() { + debugTurbolinks('reactOnRailsPageUnloaded'); + forEachComponent(unmount); + } + + function renderInit() { + // Install listeners when running on the client (browser). + // We must do this check for turbolinks AFTER the document is loaded because we load the + // Webpack bundles first. + if (!turbolinksInstalled() || !turbolinksSupported()) { + debugTurbolinks('NOT USING TURBOLINKS: calling reactOnRailsPageLoaded'); + reactOnRailsPageLoaded(); + return; + } + + if (turbolinksVersion5()) { + debugTurbolinks( + 'USING TURBOLINKS 5: document added event listeners ' + + 'turbolinks:before-render and turbolinks:render.', + ); + document.addEventListener('turbolinks:before-render', reactOnRailsPageUnloaded); + document.addEventListener('turbolinks:render', reactOnRailsPageLoaded); + reactOnRailsPageLoaded(); + } else { + debugTurbolinks( + 'USING TURBOLINKS 2: document added event listeners page:before-unload and ' + 'page:change.', + ); + document.addEventListener('page:before-unload', reactOnRailsPageUnloaded); + document.addEventListener('page:change', reactOnRailsPageLoaded); + } + } + + function clientStartup(context) { + var document = context.document; // Check if server rendering + + if (!document) { + return; + } // Tried with a file local variable, but the install handler gets called twice. + // eslint-disable-next-line no-underscore-dangle + + if (context.__REACT_ON_RAILS_EVENT_HANDLERS_RAN_ONCE__) { + return; + } // eslint-disable-next-line no-underscore-dangle, no-param-reassign + + context.__REACT_ON_RAILS_EVENT_HANDLERS_RAN_ONCE__ = true; + debugTurbolinks('Adding DOMContentLoaded event to install event listeners.'); + + if (document.readyState === 'complete') { + window.setTimeout(renderInit); + } else { + document.addEventListener('DOMContentLoaded', renderInit); + } + } + + /***/ + }, + /* 517 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + if (false) { + module.exports = require('./cjs/react-dom-server.node.production.min.js'); + } else { + module.exports = __webpack_require__(518); + } + + /***/ + }, + /* 518 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** @license React v16.12.0 + * react-dom-server.node.development.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + + if (true) { + (function () { + 'use strict'; + + var _assign = __webpack_require__(63); + var React = __webpack_require__(1); + var checkPropTypes = __webpack_require__(106); + var stream = __webpack_require__(519); + + // TODO: this is special because it gets imported during build. + + var ReactVersion = '16.12.0'; + + // Do not require this module directly! Use normal `invariant` calls with + // template literal strings. The messages will be replaced with error codes + // during build. + + /** + * Use invariant() to assert state which your program assumes to be true. + * + * Provide sprintf-style format (only %s is supported) and arguments + * to provide information about what broke and what you were + * expecting. + * + * The invariant message will be stripped in production, but the invariant + * will remain to ensure logic does not differ in production. + */ + + /** + * Similar to invariant but only logs a warning if the condition is not met. + * This can be used to log issues in development environments in critical + * paths. Removing the logging code for production environments will keep the + * same logic and follow the same code paths. + */ + var warningWithoutStack = function () {}; + + { + warningWithoutStack = function (condition, format) { + for ( + var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; + _key < _len; + _key++ + ) { + args[_key - 2] = arguments[_key]; + } + + if (format === undefined) { + throw new Error( + '`warningWithoutStack(condition, format, ...args)` requires a warning ' + + 'message argument', + ); + } + + if (args.length > 8) { + // Check before the condition to catch violations early. + throw new Error('warningWithoutStack() currently supports at most 8 arguments.'); + } + + if (condition) { + return; + } + + if (typeof console !== 'undefined') { + var argsWithFormat = args.map(function (item) { + return '' + item; + }); + argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it + // breaks IE9: https://github.com/facebook/react/issues/13610 + + Function.prototype.apply.call(console.error, console, argsWithFormat); + } + + try { + // --- Welcome to debugging React --- + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + var argIndex = 0; + var message = + 'Warning: ' + + format.replace(/%s/g, function () { + return args[argIndex++]; + }); + throw new Error(message); + } catch (x) {} + }; + } + + var warningWithoutStack$1 = warningWithoutStack; + + // The Symbol used to tag the ReactElement-like types. If there is no native Symbol + // nor polyfill, then a plain number is used for performance. + var hasSymbol = typeof Symbol === 'function' && Symbol.for; + + var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca; + var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb; + var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc; + var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2; + var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd; + var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary + // (unstable) APIs that have been removed. Can we remove the symbols? + + var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf; + var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0; + var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1; + var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8; + var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3; + var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4; + var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5; + + var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7; + + var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; // Prevent newer renderers from RTE when used with older react package versions. + // Current owner and dispatcher used to share the same ref, + // but PR #14548 split them out to better support the react-debug-tools package. + + if (!ReactSharedInternals.hasOwnProperty('ReactCurrentDispatcher')) { + ReactSharedInternals.ReactCurrentDispatcher = { + current: null, + }; + } + + if (!ReactSharedInternals.hasOwnProperty('ReactCurrentBatchConfig')) { + ReactSharedInternals.ReactCurrentBatchConfig = { + suspense: null, + }; + } + + /** + * Similar to invariant but only logs a warning if the condition is not met. + * This can be used to log issues in development environments in critical + * paths. Removing the logging code for production environments will keep the + * same logic and follow the same code paths. + */ + + var warning = warningWithoutStack$1; + + { + warning = function (condition, format) { + if (condition) { + return; + } + + var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; + var stack = ReactDebugCurrentFrame.getStackAddendum(); // eslint-disable-next-line react-internal/warning-and-invariant-args + + for ( + var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; + _key < _len; + _key++ + ) { + args[_key - 2] = arguments[_key]; + } + + warningWithoutStack$1.apply(void 0, [false, format + '%s'].concat(args, [stack])); + }; + } + + var warning$1 = warning; + + var Uninitialized = -1; + var Pending = 0; + var Resolved = 1; + var Rejected = 2; + function refineResolvedLazyComponent(lazyComponent) { + return lazyComponent._status === Resolved ? lazyComponent._result : null; + } + function initializeLazyComponentType(lazyComponent) { + if (lazyComponent._status === Uninitialized) { + lazyComponent._status = Pending; + var ctor = lazyComponent._ctor; + var thenable = ctor(); + lazyComponent._result = thenable; + thenable.then( + function (moduleObject) { + if (lazyComponent._status === Pending) { + var defaultExport = moduleObject.default; + + { + if (defaultExport === undefined) { + warning$1( + false, + 'lazy: Expected the result of a dynamic import() call. ' + + 'Instead received: %s\n\nYour code should look like: \n ' + + "const MyComponent = lazy(() => import('./MyComponent'))", + moduleObject, + ); + } + } + + lazyComponent._status = Resolved; + lazyComponent._result = defaultExport; + } + }, + function (error) { + if (lazyComponent._status === Pending) { + lazyComponent._status = Rejected; + lazyComponent._result = error; + } + }, + ); + } + } + + function getWrappedName(outerType, innerType, wrapperName) { + var functionName = innerType.displayName || innerType.name || ''; + return ( + outerType.displayName || + (functionName !== '' ? wrapperName + '(' + functionName + ')' : wrapperName) + ); + } + + function getComponentName(type) { + if (type == null) { + // Host root, text node or just invalid type. + return null; + } + + { + if (typeof type.tag === 'number') { + warningWithoutStack$1( + false, + 'Received an unexpected object in getComponentName(). ' + + 'This is likely a bug in React. Please file an issue.', + ); + } + } + + if (typeof type === 'function') { + return type.displayName || type.name || null; + } + + if (typeof type === 'string') { + return type; + } + + switch (type) { + case REACT_FRAGMENT_TYPE: + return 'Fragment'; + + case REACT_PORTAL_TYPE: + return 'Portal'; + + case REACT_PROFILER_TYPE: + return 'Profiler'; + + case REACT_STRICT_MODE_TYPE: + return 'StrictMode'; + + case REACT_SUSPENSE_TYPE: + return 'Suspense'; + + case REACT_SUSPENSE_LIST_TYPE: + return 'SuspenseList'; + } + + if (typeof type === 'object') { + switch (type.$$typeof) { + case REACT_CONTEXT_TYPE: + return 'Context.Consumer'; + + case REACT_PROVIDER_TYPE: + return 'Context.Provider'; + + case REACT_FORWARD_REF_TYPE: + return getWrappedName(type, type.render, 'ForwardRef'); + + case REACT_MEMO_TYPE: + return getComponentName(type.type); + + case REACT_LAZY_TYPE: { + var thenable = type; + var resolvedThenable = refineResolvedLazyComponent(thenable); + + if (resolvedThenable) { + return getComponentName(resolvedThenable); + } + + break; + } + } + } + + return null; + } + + /** + * Forked from fbjs/warning: + * https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js + * + * Only change is we use console.warn instead of console.error, + * and do nothing when 'console' is not supported. + * This really simplifies the code. + * --- + * Similar to invariant but only logs a warning if the condition is not met. + * This can be used to log issues in development environments in critical + * paths. Removing the logging code for production environments will keep the + * same logic and follow the same code paths. + */ + var lowPriorityWarningWithoutStack = function () {}; + + { + var printWarning = function (format) { + for ( + var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; + _key < _len; + _key++ + ) { + args[_key - 1] = arguments[_key]; + } + + var argIndex = 0; + var message = + 'Warning: ' + + format.replace(/%s/g, function () { + return args[argIndex++]; + }); + + if (typeof console !== 'undefined') { + console.warn(message); + } + + try { + // --- Welcome to debugging React --- + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + throw new Error(message); + } catch (x) {} + }; + + lowPriorityWarningWithoutStack = function (condition, format) { + if (format === undefined) { + throw new Error( + '`lowPriorityWarningWithoutStack(condition, format, ...args)` requires a warning ' + + 'message argument', + ); + } + + if (!condition) { + for ( + var _len2 = arguments.length, args = new Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; + _key2 < _len2; + _key2++ + ) { + args[_key2 - 2] = arguments[_key2]; + } + + printWarning.apply(void 0, [format].concat(args)); + } + }; + } + + var lowPriorityWarningWithoutStack$1 = lowPriorityWarningWithoutStack; + + var BEFORE_SLASH_RE = /^(.*)[\\\/]/; + var describeComponentFrame = function (name, source, ownerName) { + var sourceInfo = ''; + + if (source) { + var path = source.fileName; + var fileName = path.replace(BEFORE_SLASH_RE, ''); + + { + // In DEV, include code for a common special case: + // prefer "folder/index.js" instead of just "index.js". + if (/^index\./.test(fileName)) { + var match = path.match(BEFORE_SLASH_RE); + + if (match) { + var pathBeforeSlash = match[1]; + + if (pathBeforeSlash) { + var folderName = pathBeforeSlash.replace(BEFORE_SLASH_RE, ''); + fileName = folderName + '/' + fileName; + } + } + } + } + + sourceInfo = ' (at ' + fileName + ':' + source.lineNumber + ')'; + } else if (ownerName) { + sourceInfo = ' (created by ' + ownerName + ')'; + } + + return '\n in ' + (name || 'Unknown') + sourceInfo; + }; + + // Helps identify side effects in render-phase lifecycle hooks and setState + // reducers by double invoking them in Strict Mode. + + // To preserve the "Pause on caught exceptions" behavior of the debugger, we + // replay the begin phase of a failed component inside invokeGuardedCallback. + + // Warn about deprecated, async-unsafe lifecycles; relates to RFC #6: + + var warnAboutDeprecatedLifecycles = true; // Gather advanced timing metrics for Profiler subtrees. + + // Trace which interactions trigger each commit. + + // SSR experiments + + var enableSuspenseServerRenderer = false; + // Only used in www builds. + + // Only used in www builds. + + // Disable javascript: URL strings in href for XSS protection. + + var disableJavaScriptURLs = false; // React Fire: prevent the value and checked attributes from syncing + // with their related DOM properties + + // These APIs will no longer be "unstable" in the upcoming 16.7 release, + // Control this behavior with a flag to support 16.6 minor releases in the meanwhile. + + // Experimental React Flare event system and event components support. + + var enableFlareAPI = false; // Experimental Host Component support. + + var enableFundamentalAPI = false; // Experimental Scope support. + + var enableScopeAPI = false; // New API for JSX transforms to target - https://github.com/reactjs/rfcs/pull/107 + + // We will enforce mocking scheduler with scheduler/unstable_mock at some point. (v17?) + // Till then, we warn about the missing mock, but still fallback to a legacy mode compatible version + + // For tests, we flush suspense fallbacks in an act scope; + // *except* in some of our own tests, where we test incremental loading states. + + // Add a callback property to suspense to notify which promises are currently + // in the update queue. This allows reporting and tracing of what is causing + // the user to see a loading state. + // Also allows hydration callbacks to fire when a dehydrated boundary gets + // hydrated or deleted. + + // Part of the simplification of React.createElement so we can eventually move + // from React.createElement to React.jsx + // https://github.com/reactjs/rfcs/blob/createlement-rfc/text/0000-create-element-changes.md + + var disableLegacyContext = false; + + // Flag to turn event.target and event.currentTarget in ReactNative from a reactTag to a component instance + + var ReactDebugCurrentFrame$1; + var didWarnAboutInvalidateContextType; + + { + ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame; + didWarnAboutInvalidateContextType = new Set(); + } + + var emptyObject = {}; + + { + Object.freeze(emptyObject); + } + + function maskContext(type, context) { + var contextTypes = type.contextTypes; + + if (!contextTypes) { + return emptyObject; + } + + var maskedContext = {}; + + for (var contextName in contextTypes) { + maskedContext[contextName] = context[contextName]; + } + + return maskedContext; + } + + function checkContextTypes(typeSpecs, values, location) { + { + checkPropTypes( + typeSpecs, + values, + location, + 'Component', + ReactDebugCurrentFrame$1.getCurrentStack, + ); + } + } + + function validateContextBounds(context, threadID) { + // If we don't have enough slots in this context to store this threadID, + // fill it in without leaving any holes to ensure that the VM optimizes + // this as non-holey index properties. + // (Note: If `react` package is < 16.6, _threadCount is undefined.) + for (var i = context._threadCount | 0; i <= threadID; i++) { + // We assume that this is the same as the defaultValue which might not be + // true if we're rendering inside a secondary renderer but they are + // secondary because these use cases are very rare. + context[i] = context._currentValue2; + context._threadCount = i + 1; + } + } + function processContext(type, context, threadID, isClass) { + if (isClass) { + var contextType = type.contextType; + + { + if ('contextType' in type) { + var isValid = // Allow null for conditional declaration + contextType === null || + (contextType !== undefined && + contextType.$$typeof === REACT_CONTEXT_TYPE && + contextType._context === undefined); // Not a <Context.Consumer> + + if (!isValid && !didWarnAboutInvalidateContextType.has(type)) { + didWarnAboutInvalidateContextType.add(type); + var addendum = ''; + + if (contextType === undefined) { + addendum = + ' However, it is set to undefined. ' + + 'This can be caused by a typo or by mixing up named and default imports. ' + + 'This can also happen due to a circular dependency, so ' + + 'try moving the createContext() call to a separate file.'; + } else if (typeof contextType !== 'object') { + addendum = ' However, it is set to a ' + typeof contextType + '.'; + } else if (contextType.$$typeof === REACT_PROVIDER_TYPE) { + addendum = ' Did you accidentally pass the Context.Provider instead?'; + } else if (contextType._context !== undefined) { + // <Context.Consumer> + addendum = ' Did you accidentally pass the Context.Consumer instead?'; + } else { + addendum = + ' However, it is set to an object with keys {' + + Object.keys(contextType).join(', ') + + '}.'; + } + + warningWithoutStack$1( + false, + '%s defines an invalid contextType. ' + + 'contextType should point to the Context object returned by React.createContext().%s', + getComponentName(type) || 'Component', + addendum, + ); + } + } + } + + if (typeof contextType === 'object' && contextType !== null) { + validateContextBounds(contextType, threadID); + return contextType[threadID]; + } + + if (disableLegacyContext) { + { + if (type.contextTypes) { + warningWithoutStack$1( + false, + '%s uses the legacy contextTypes API which is no longer supported. ' + + 'Use React.createContext() with static contextType instead.', + getComponentName(type) || 'Unknown', + ); + } + } + + return emptyObject; + } else { + var maskedContext = maskContext(type, context); + + { + if (type.contextTypes) { + checkContextTypes(type.contextTypes, maskedContext, 'context'); + } + } + + return maskedContext; + } + } else { + if (disableLegacyContext) { + { + if (type.contextTypes) { + warningWithoutStack$1( + false, + '%s uses the legacy contextTypes API which is no longer supported. ' + + 'Use React.createContext() with React.useContext() instead.', + getComponentName(type) || 'Unknown', + ); + } + } + + return undefined; + } else { + var _maskedContext = maskContext(type, context); + + { + if (type.contextTypes) { + checkContextTypes(type.contextTypes, _maskedContext, 'context'); + } + } + + return _maskedContext; + } + } + } + + // Allocates a new index for each request. Tries to stay as compact as possible so that these + // indices can be used to reference a tightly packed array. As opposed to being used in a Map. + // The first allocated index is 1. + var nextAvailableThreadIDs = new Uint16Array(16); + + for (var i = 0; i < 15; i++) { + nextAvailableThreadIDs[i] = i + 1; + } + + nextAvailableThreadIDs[15] = 0; + + function growThreadCountAndReturnNextAvailable() { + var oldArray = nextAvailableThreadIDs; + var oldSize = oldArray.length; + var newSize = oldSize * 2; + + if (!(newSize <= 0x10000)) { + { + throw Error( + 'Maximum number of concurrent React renderers exceeded. This can happen if you are not properly destroying the Readable provided by React. Ensure that you call .destroy() on it if you no longer want to read from it, and did not read to the end. If you use .pipe() this should be automatic.', + ); + } + } + + var newArray = new Uint16Array(newSize); + newArray.set(oldArray); + nextAvailableThreadIDs = newArray; + nextAvailableThreadIDs[0] = oldSize + 1; + + for (var _i = oldSize; _i < newSize - 1; _i++) { + nextAvailableThreadIDs[_i] = _i + 1; + } + + nextAvailableThreadIDs[newSize - 1] = 0; + return oldSize; + } + + function allocThreadID() { + var nextID = nextAvailableThreadIDs[0]; + + if (nextID === 0) { + return growThreadCountAndReturnNextAvailable(); + } + + nextAvailableThreadIDs[0] = nextAvailableThreadIDs[nextID]; + return nextID; + } + function freeThreadID(id) { + nextAvailableThreadIDs[id] = nextAvailableThreadIDs[0]; + nextAvailableThreadIDs[0] = id; + } + + // A reserved attribute. + // It is handled by React separately and shouldn't be written to the DOM. + var RESERVED = 0; // A simple string attribute. + // Attributes that aren't in the whitelist are presumed to have this type. + + var STRING = 1; // A string attribute that accepts booleans in React. In HTML, these are called + // "enumerated" attributes with "true" and "false" as possible values. + // When true, it should be set to a "true" string. + // When false, it should be set to a "false" string. + + var BOOLEANISH_STRING = 2; // A real boolean attribute. + // When true, it should be present (set either to an empty string or its name). + // When false, it should be omitted. + + var BOOLEAN = 3; // An attribute that can be used as a flag as well as with a value. + // When true, it should be present (set either to an empty string or its name). + // When false, it should be omitted. + // For any other value, should be present with that value. + + var OVERLOADED_BOOLEAN = 4; // An attribute that must be numeric or parse as a numeric. + // When falsy, it should be removed. + + var NUMERIC = 5; // An attribute that must be positive numeric or parse as a positive numeric. + // When falsy, it should be removed. + + var POSITIVE_NUMERIC = 6; + + /* eslint-disable max-len */ + var ATTRIBUTE_NAME_START_CHAR = + ':A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD'; + /* eslint-enable max-len */ + + var ATTRIBUTE_NAME_CHAR = + ATTRIBUTE_NAME_START_CHAR + '\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040'; + + var ROOT_ATTRIBUTE_NAME = 'data-reactroot'; + var VALID_ATTRIBUTE_NAME_REGEX = new RegExp( + '^[' + ATTRIBUTE_NAME_START_CHAR + '][' + ATTRIBUTE_NAME_CHAR + ']*$', + ); + var hasOwnProperty$1 = Object.prototype.hasOwnProperty; + var illegalAttributeNameCache = {}; + var validatedAttributeNameCache = {}; + function isAttributeNameSafe(attributeName) { + if (hasOwnProperty$1.call(validatedAttributeNameCache, attributeName)) { + return true; + } + + if (hasOwnProperty$1.call(illegalAttributeNameCache, attributeName)) { + return false; + } + + if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) { + validatedAttributeNameCache[attributeName] = true; + return true; + } + + illegalAttributeNameCache[attributeName] = true; + + { + warning$1(false, 'Invalid attribute name: `%s`', attributeName); + } + + return false; + } + function shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag) { + if (propertyInfo !== null) { + return propertyInfo.type === RESERVED; + } + + if (isCustomComponentTag) { + return false; + } + + if ( + name.length > 2 && + (name[0] === 'o' || name[0] === 'O') && + (name[1] === 'n' || name[1] === 'N') + ) { + return true; + } + + return false; + } + function shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag) { + if (propertyInfo !== null && propertyInfo.type === RESERVED) { + return false; + } + + switch (typeof value) { + case 'function': // $FlowIssue symbol is perfectly valid here + + case 'symbol': + // eslint-disable-line + return true; + + case 'boolean': { + if (isCustomComponentTag) { + return false; + } + + if (propertyInfo !== null) { + return !propertyInfo.acceptsBooleans; + } else { + var prefix = name.toLowerCase().slice(0, 5); + return prefix !== 'data-' && prefix !== 'aria-'; + } + } + + default: + return false; + } + } + function shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag) { + if (value === null || typeof value === 'undefined') { + return true; + } + + if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag)) { + return true; + } + + if (isCustomComponentTag) { + return false; + } + + if (propertyInfo !== null) { + switch (propertyInfo.type) { + case BOOLEAN: + return !value; + + case OVERLOADED_BOOLEAN: + return value === false; + + case NUMERIC: + return isNaN(value); + + case POSITIVE_NUMERIC: + return isNaN(value) || value < 1; + } + } + + return false; + } + function getPropertyInfo(name) { + return properties.hasOwnProperty(name) ? properties[name] : null; + } + + function PropertyInfoRecord( + name, + type, + mustUseProperty, + attributeName, + attributeNamespace, + sanitizeURL, + ) { + this.acceptsBooleans = + type === BOOLEANISH_STRING || type === BOOLEAN || type === OVERLOADED_BOOLEAN; + this.attributeName = attributeName; + this.attributeNamespace = attributeNamespace; + this.mustUseProperty = mustUseProperty; + this.propertyName = name; + this.type = type; + this.sanitizeURL = sanitizeURL; + } // When adding attributes to this list, be sure to also add them to + // the `possibleStandardNames` module to ensure casing and incorrect + // name warnings. + + var properties = {}; // These props are reserved by React. They shouldn't be written to the DOM. + + [ + 'children', + 'dangerouslySetInnerHTML', // TODO: This prevents the assignment of defaultValue to regular + // elements (not just inputs). Now that ReactDOMInput assigns to the + // defaultValue property -- do we need this? + 'defaultValue', + 'defaultChecked', + 'innerHTML', + 'suppressContentEditableWarning', + 'suppressHydrationWarning', + 'style', + ].forEach(function (name) { + properties[name] = new PropertyInfoRecord( + name, + RESERVED, + false, // mustUseProperty + name, // attributeName + null, // attributeNamespace + false, + ); + }); // A few React string attributes have a different name. + // This is a mapping from React prop names to the attribute names. + + [ + ['acceptCharset', 'accept-charset'], + ['className', 'class'], + ['htmlFor', 'for'], + ['httpEquiv', 'http-equiv'], + ].forEach(function (_ref) { + var name = _ref[0], + attributeName = _ref[1]; + properties[name] = new PropertyInfoRecord( + name, + STRING, + false, // mustUseProperty + attributeName, // attributeName + null, // attributeNamespace + false, + ); + }); // These are "enumerated" HTML attributes that accept "true" and "false". + // In React, we let users pass `true` and `false` even though technically + // these aren't boolean attributes (they are coerced to strings). + + ['contentEditable', 'draggable', 'spellCheck', 'value'].forEach(function (name) { + properties[name] = new PropertyInfoRecord( + name, + BOOLEANISH_STRING, + false, // mustUseProperty + name.toLowerCase(), // attributeName + null, // attributeNamespace + false, + ); + }); // These are "enumerated" SVG attributes that accept "true" and "false". + // In React, we let users pass `true` and `false` even though technically + // these aren't boolean attributes (they are coerced to strings). + // Since these are SVG attributes, their attribute names are case-sensitive. + + ['autoReverse', 'externalResourcesRequired', 'focusable', 'preserveAlpha'].forEach(function (name) { + properties[name] = new PropertyInfoRecord( + name, + BOOLEANISH_STRING, + false, // mustUseProperty + name, // attributeName + null, // attributeNamespace + false, + ); + }); // These are HTML boolean attributes. + + [ + 'allowFullScreen', + 'async', // Note: there is a special case that prevents it from being written to the DOM + // on the client side because the browsers are inconsistent. Instead we call focus(). + 'autoFocus', + 'autoPlay', + 'controls', + 'default', + 'defer', + 'disabled', + 'disablePictureInPicture', + 'formNoValidate', + 'hidden', + 'loop', + 'noModule', + 'noValidate', + 'open', + 'playsInline', + 'readOnly', + 'required', + 'reversed', + 'scoped', + 'seamless', // Microdata + 'itemScope', + ].forEach(function (name) { + properties[name] = new PropertyInfoRecord( + name, + BOOLEAN, + false, // mustUseProperty + name.toLowerCase(), // attributeName + null, // attributeNamespace + false, + ); + }); // These are the few React props that we set as DOM properties + // rather than attributes. These are all booleans. + + [ + 'checked', // Note: `option.selected` is not updated if `select.multiple` is + // disabled with `removeAttribute`. We have special logic for handling this. + 'multiple', + 'muted', + 'selected', + ].forEach(function (name) { + properties[name] = new PropertyInfoRecord( + name, + BOOLEAN, + true, // mustUseProperty + name, // attributeName + null, // attributeNamespace + false, + ); + }); // These are HTML attributes that are "overloaded booleans": they behave like + // booleans, but can also accept a string value. + + ['capture', 'download'].forEach(function (name) { + properties[name] = new PropertyInfoRecord( + name, + OVERLOADED_BOOLEAN, + false, // mustUseProperty + name, // attributeName + null, // attributeNamespace + false, + ); + }); // These are HTML attributes that must be positive numbers. + + ['cols', 'rows', 'size', 'span'].forEach(function (name) { + properties[name] = new PropertyInfoRecord( + name, + POSITIVE_NUMERIC, + false, // mustUseProperty + name, // attributeName + null, // attributeNamespace + false, + ); + }); // These are HTML attributes that must be numbers. + + ['rowSpan', 'start'].forEach(function (name) { + properties[name] = new PropertyInfoRecord( + name, + NUMERIC, + false, // mustUseProperty + name.toLowerCase(), // attributeName + null, // attributeNamespace + false, + ); + }); + var CAMELIZE = /[\-\:]([a-z])/g; + + var capitalize = function (token) { + return token[1].toUpperCase(); + }; // This is a list of all SVG attributes that need special casing, namespacing, + // or boolean value assignment. Regular attributes that just accept strings + // and have the same names are omitted, just like in the HTML whitelist. + // Some of these attributes can be hard to find. This list was created by + // scrapping the MDN documentation. + + [ + 'accent-height', + 'alignment-baseline', + 'arabic-form', + 'baseline-shift', + 'cap-height', + 'clip-path', + 'clip-rule', + 'color-interpolation', + 'color-interpolation-filters', + 'color-profile', + 'color-rendering', + 'dominant-baseline', + 'enable-background', + 'fill-opacity', + 'fill-rule', + 'flood-color', + 'flood-opacity', + 'font-family', + 'font-size', + 'font-size-adjust', + 'font-stretch', + 'font-style', + 'font-variant', + 'font-weight', + 'glyph-name', + 'glyph-orientation-horizontal', + 'glyph-orientation-vertical', + 'horiz-adv-x', + 'horiz-origin-x', + 'image-rendering', + 'letter-spacing', + 'lighting-color', + 'marker-end', + 'marker-mid', + 'marker-start', + 'overline-position', + 'overline-thickness', + 'paint-order', + 'panose-1', + 'pointer-events', + 'rendering-intent', + 'shape-rendering', + 'stop-color', + 'stop-opacity', + 'strikethrough-position', + 'strikethrough-thickness', + 'stroke-dasharray', + 'stroke-dashoffset', + 'stroke-linecap', + 'stroke-linejoin', + 'stroke-miterlimit', + 'stroke-opacity', + 'stroke-width', + 'text-anchor', + 'text-decoration', + 'text-rendering', + 'underline-position', + 'underline-thickness', + 'unicode-bidi', + 'unicode-range', + 'units-per-em', + 'v-alphabetic', + 'v-hanging', + 'v-ideographic', + 'v-mathematical', + 'vector-effect', + 'vert-adv-y', + 'vert-origin-x', + 'vert-origin-y', + 'word-spacing', + 'writing-mode', + 'xmlns:xlink', + 'x-height', + ].forEach(function (attributeName) { + var name = attributeName.replace(CAMELIZE, capitalize); + properties[name] = new PropertyInfoRecord( + name, + STRING, + false, // mustUseProperty + attributeName, + null, // attributeNamespace + false, + ); + }); // String SVG attributes with the xlink namespace. + + ['xlink:actuate', 'xlink:arcrole', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type'].forEach( + function (attributeName) { + var name = attributeName.replace(CAMELIZE, capitalize); + properties[name] = new PropertyInfoRecord( + name, + STRING, + false, // mustUseProperty + attributeName, + 'http://www.w3.org/1999/xlink', + false, + ); + }, + ); // String SVG attributes with the xml namespace. + + ['xml:base', 'xml:lang', 'xml:space'].forEach(function (attributeName) { + var name = attributeName.replace(CAMELIZE, capitalize); + properties[name] = new PropertyInfoRecord( + name, + STRING, + false, // mustUseProperty + attributeName, + 'http://www.w3.org/XML/1998/namespace', + false, + ); + }); // These attribute exists both in HTML and SVG. + // The attribute name is case-sensitive in SVG so we can't just use + // the React name like we do for attributes that exist only in HTML. + + ['tabIndex', 'crossOrigin'].forEach(function (attributeName) { + properties[attributeName] = new PropertyInfoRecord( + attributeName, + STRING, + false, // mustUseProperty + attributeName.toLowerCase(), // attributeName + null, // attributeNamespace + false, + ); + }); // These attributes accept URLs. These must not allow javascript: URLS. + // These will also need to accept Trusted Types object in the future. + + var xlinkHref = 'xlinkHref'; + properties[xlinkHref] = new PropertyInfoRecord( + 'xlinkHref', + STRING, + false, // mustUseProperty + 'xlink:href', + 'http://www.w3.org/1999/xlink', + true, + ); + ['src', 'href', 'action', 'formAction'].forEach(function (attributeName) { + properties[attributeName] = new PropertyInfoRecord( + attributeName, + STRING, + false, // mustUseProperty + attributeName.toLowerCase(), // attributeName + null, // attributeNamespace + true, + ); + }); + + var ReactDebugCurrentFrame$2 = null; + + { + ReactDebugCurrentFrame$2 = ReactSharedInternals.ReactDebugCurrentFrame; + } // A javascript: URL can contain leading C0 control or \u0020 SPACE, + // and any newline or tab are filtered out as if they're not part of the URL. + // https://url.spec.whatwg.org/#url-parsing + // Tab or newline are defined as \r\n\t: + // https://infra.spec.whatwg.org/#ascii-tab-or-newline + // A C0 control is a code point in the range \u0000 NULL to \u001F + // INFORMATION SEPARATOR ONE, inclusive: + // https://infra.spec.whatwg.org/#c0-control-or-space + + /* eslint-disable max-len */ + + var isJavaScriptProtocol = + /^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i; + var didWarn = false; + + function sanitizeURL(url) { + if (disableJavaScriptURLs) { + if (!!isJavaScriptProtocol.test(url)) { + { + throw Error( + 'React has blocked a javascript: URL as a security precaution.' + + ReactDebugCurrentFrame$2.getStackAddendum(), + ); + } + } + } else if (true && !didWarn && isJavaScriptProtocol.test(url)) { + didWarn = true; + warning$1( + false, + 'A future version of React will block javascript: URLs as a security precaution. ' + + 'Use event handlers instead if you can. If you need to generate unsafe HTML try ' + + 'using dangerouslySetInnerHTML instead. React was passed %s.', + JSON.stringify(url), + ); + } + } + + // code copied and modified from escape-html + + /** + * Module variables. + * @private + */ + var matchHtmlRegExp = /["'&<>]/; + /** + * Escapes special characters and HTML entities in a given html string. + * + * @param {string} string HTML string to escape for later insertion + * @return {string} + * @public + */ + + function escapeHtml(string) { + var str = '' + string; + var match = matchHtmlRegExp.exec(str); + + if (!match) { + return str; + } + + var escape; + var html = ''; + var index; + var lastIndex = 0; + + for (index = match.index; index < str.length; index++) { + switch (str.charCodeAt(index)) { + case 34: + // " + escape = '"'; + break; + + case 38: + // & + escape = '&'; + break; + + case 39: + // ' + escape = '''; // modified from escape-html; used to be ''' + + break; + + case 60: + // < + escape = '<'; + break; + + case 62: + // > + escape = '>'; + break; + + default: + continue; + } + + if (lastIndex !== index) { + html += str.substring(lastIndex, index); + } + + lastIndex = index + 1; + html += escape; + } + + return lastIndex !== index ? html + str.substring(lastIndex, index) : html; + } // end code copied and modified from escape-html + + /** + * Escapes text to prevent scripting attacks. + * + * @param {*} text Text value to escape. + * @return {string} An escaped string. + */ + + function escapeTextForBrowser(text) { + if (typeof text === 'boolean' || typeof text === 'number') { + // this shortcircuit helps perf for types that we know will never have + // special characters, especially given that this function is used often + // for numeric dom ids. + return '' + text; + } + + return escapeHtml(text); + } + + /** + * Escapes attribute value to prevent scripting attacks. + * + * @param {*} value Value to escape. + * @return {string} An escaped string. + */ + + function quoteAttributeValueForBrowser(value) { + return '"' + escapeTextForBrowser(value) + '"'; + } + + /** + * Operations for dealing with DOM properties. + */ + + /** + * Creates markup for the ID property. + * + * @param {string} id Unescaped ID. + * @return {string} Markup string. + */ + + function createMarkupForRoot() { + return ROOT_ATTRIBUTE_NAME + '=""'; + } + /** + * Creates markup for a property. + * + * @param {string} name + * @param {*} value + * @return {?string} Markup string, or null if the property was invalid. + */ + + function createMarkupForProperty(name, value) { + var propertyInfo = getPropertyInfo(name); + + if (name !== 'style' && shouldIgnoreAttribute(name, propertyInfo, false)) { + return ''; + } + + if (shouldRemoveAttribute(name, value, propertyInfo, false)) { + return ''; + } + + if (propertyInfo !== null) { + var attributeName = propertyInfo.attributeName; + var type = propertyInfo.type; + + if (type === BOOLEAN || (type === OVERLOADED_BOOLEAN && value === true)) { + return attributeName + '=""'; + } else { + if (propertyInfo.sanitizeURL) { + value = '' + value; + sanitizeURL(value); + } + + return attributeName + '=' + quoteAttributeValueForBrowser(value); + } + } else if (isAttributeNameSafe(name)) { + return name + '=' + quoteAttributeValueForBrowser(value); + } + + return ''; + } + /** + * Creates markup for a custom property. + * + * @param {string} name + * @param {*} value + * @return {string} Markup string, or empty string if the property was invalid. + */ + + function createMarkupForCustomAttribute(name, value) { + if (!isAttributeNameSafe(name) || value == null) { + return ''; + } + + return name + '=' + quoteAttributeValueForBrowser(value); + } + + /** + * inlined Object.is polyfill to avoid requiring consumers ship their own + * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is + */ + function is(x, y) { + return ( + (x === y && (x !== 0 || 1 / x === 1 / y)) || (x !== x && y !== y) // eslint-disable-line no-self-compare + ); + } + + var is$1 = typeof Object.is === 'function' ? Object.is : is; + + var currentlyRenderingComponent = null; + var firstWorkInProgressHook = null; + var workInProgressHook = null; // Whether the work-in-progress hook is a re-rendered hook + + var isReRender = false; // Whether an update was scheduled during the currently executing render pass. + + var didScheduleRenderPhaseUpdate = false; // Lazily created map of render-phase updates + + var renderPhaseUpdates = null; // Counter to prevent infinite loops. + + var numberOfReRenders = 0; + var RE_RENDER_LIMIT = 25; + var isInHookUserCodeInDev = false; // In DEV, this is the name of the currently executing primitive hook + + var currentHookNameInDev; + + function resolveCurrentlyRenderingComponent() { + if (!(currentlyRenderingComponent !== null)) { + { + throw Error( + 'Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.', + ); + } + } + + { + !!isInHookUserCodeInDev + ? warning$1( + false, + 'Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. ' + + 'You can only call Hooks at the top level of your React function. ' + + 'For more information, see ' + + 'https://fb.me/rules-of-hooks', + ) + : void 0; + } + + return currentlyRenderingComponent; + } + + function areHookInputsEqual(nextDeps, prevDeps) { + if (prevDeps === null) { + { + warning$1( + false, + '%s received a final argument during this render, but not during ' + + 'the previous render. Even though the final argument is optional, ' + + 'its type cannot change between renders.', + currentHookNameInDev, + ); + } + + return false; + } + + { + // Don't bother comparing lengths in prod because these arrays should be + // passed inline. + if (nextDeps.length !== prevDeps.length) { + warning$1( + false, + 'The final argument passed to %s changed size between renders. The ' + + 'order and size of this array must remain constant.\n\n' + + 'Previous: %s\n' + + 'Incoming: %s', + currentHookNameInDev, + '[' + nextDeps.join(', ') + ']', + '[' + prevDeps.join(', ') + ']', + ); + } + } + + for (var i = 0; i < prevDeps.length && i < nextDeps.length; i++) { + if (is$1(nextDeps[i], prevDeps[i])) { + continue; + } + + return false; + } + + return true; + } + + function createHook() { + if (numberOfReRenders > 0) { + { + { + throw Error('Rendered more hooks than during the previous render'); + } + } + } + + return { + memoizedState: null, + queue: null, + next: null, + }; + } + + function createWorkInProgressHook() { + if (workInProgressHook === null) { + // This is the first hook in the list + if (firstWorkInProgressHook === null) { + isReRender = false; + firstWorkInProgressHook = workInProgressHook = createHook(); + } else { + // There's already a work-in-progress. Reuse it. + isReRender = true; + workInProgressHook = firstWorkInProgressHook; + } + } else { + if (workInProgressHook.next === null) { + isReRender = false; // Append to the end of the list + + workInProgressHook = workInProgressHook.next = createHook(); + } else { + // There's already a work-in-progress. Reuse it. + isReRender = true; + workInProgressHook = workInProgressHook.next; + } + } + + return workInProgressHook; + } + + function prepareToUseHooks(componentIdentity) { + currentlyRenderingComponent = componentIdentity; + + { + isInHookUserCodeInDev = false; + } // The following should have already been reset + // didScheduleRenderPhaseUpdate = false; + // firstWorkInProgressHook = null; + // numberOfReRenders = 0; + // renderPhaseUpdates = null; + // workInProgressHook = null; + } + function finishHooks(Component, props, children, refOrContext) { + // This must be called after every function component to prevent hooks from + // being used in classes. + while (didScheduleRenderPhaseUpdate) { + // Updates were scheduled during the render phase. They are stored in + // the `renderPhaseUpdates` map. Call the component again, reusing the + // work-in-progress hooks and applying the additional updates on top. Keep + // restarting until no more updates are scheduled. + didScheduleRenderPhaseUpdate = false; + numberOfReRenders += 1; // Start over from the beginning of the list + + workInProgressHook = null; + children = Component(props, refOrContext); + } + + currentlyRenderingComponent = null; + firstWorkInProgressHook = null; + numberOfReRenders = 0; + renderPhaseUpdates = null; + workInProgressHook = null; + + { + isInHookUserCodeInDev = false; + } // These were reset above + // currentlyRenderingComponent = null; + // didScheduleRenderPhaseUpdate = false; + // firstWorkInProgressHook = null; + // numberOfReRenders = 0; + // renderPhaseUpdates = null; + // workInProgressHook = null; + + return children; + } + + function readContext(context, observedBits) { + var threadID = currentThreadID; + validateContextBounds(context, threadID); + + { + !!isInHookUserCodeInDev + ? warning$1( + false, + 'Context can only be read while React is rendering. ' + + 'In classes, you can read it in the render method or getDerivedStateFromProps. ' + + 'In function components, you can read it directly in the function body, but not ' + + 'inside Hooks like useReducer() or useMemo().', + ) + : void 0; + } + + return context[threadID]; + } + + function useContext(context, observedBits) { + { + currentHookNameInDev = 'useContext'; + } + + resolveCurrentlyRenderingComponent(); + var threadID = currentThreadID; + validateContextBounds(context, threadID); + return context[threadID]; + } + + function basicStateReducer(state, action) { + return typeof action === 'function' ? action(state) : action; + } + + function useState(initialState) { + { + currentHookNameInDev = 'useState'; + } + + return useReducer( + basicStateReducer, // useReducer has a special case to support lazy useState initializers + initialState, + ); + } + function useReducer(reducer, initialArg, init) { + { + if (reducer !== basicStateReducer) { + currentHookNameInDev = 'useReducer'; + } + } + + currentlyRenderingComponent = resolveCurrentlyRenderingComponent(); + workInProgressHook = createWorkInProgressHook(); + + if (isReRender) { + // This is a re-render. Apply the new render phase updates to the previous + // current hook. + var queue = workInProgressHook.queue; + var dispatch = queue.dispatch; + + if (renderPhaseUpdates !== null) { + // Render phase updates are stored in a map of queue -> linked list + var firstRenderPhaseUpdate = renderPhaseUpdates.get(queue); + + if (firstRenderPhaseUpdate !== undefined) { + renderPhaseUpdates.delete(queue); + var newState = workInProgressHook.memoizedState; + var update = firstRenderPhaseUpdate; + + do { + // Process this render phase update. We don't have to check the + // priority because it will always be the same as the current + // render's. + var action = update.action; + + { + isInHookUserCodeInDev = true; + } + + newState = reducer(newState, action); + + { + isInHookUserCodeInDev = false; + } + + update = update.next; + } while (update !== null); + + workInProgressHook.memoizedState = newState; + return [newState, dispatch]; + } + } + + return [workInProgressHook.memoizedState, dispatch]; + } else { + { + isInHookUserCodeInDev = true; + } + + var initialState; + + if (reducer === basicStateReducer) { + // Special case for `useState`. + initialState = typeof initialArg === 'function' ? initialArg() : initialArg; + } else { + initialState = init !== undefined ? init(initialArg) : initialArg; + } + + { + isInHookUserCodeInDev = false; + } + + workInProgressHook.memoizedState = initialState; + + var _queue = (workInProgressHook.queue = { + last: null, + dispatch: null, + }); + + var _dispatch = (_queue.dispatch = dispatchAction.bind( + null, + currentlyRenderingComponent, + _queue, + )); + + return [workInProgressHook.memoizedState, _dispatch]; + } + } + + function useMemo(nextCreate, deps) { + currentlyRenderingComponent = resolveCurrentlyRenderingComponent(); + workInProgressHook = createWorkInProgressHook(); + var nextDeps = deps === undefined ? null : deps; + + if (workInProgressHook !== null) { + var prevState = workInProgressHook.memoizedState; + + if (prevState !== null) { + if (nextDeps !== null) { + var prevDeps = prevState[1]; + + if (areHookInputsEqual(nextDeps, prevDeps)) { + return prevState[0]; + } + } + } + } + + { + isInHookUserCodeInDev = true; + } + + var nextValue = nextCreate(); + + { + isInHookUserCodeInDev = false; + } + + workInProgressHook.memoizedState = [nextValue, nextDeps]; + return nextValue; + } + + function useRef(initialValue) { + currentlyRenderingComponent = resolveCurrentlyRenderingComponent(); + workInProgressHook = createWorkInProgressHook(); + var previousRef = workInProgressHook.memoizedState; + + if (previousRef === null) { + var ref = { + current: initialValue, + }; + + { + Object.seal(ref); + } + + workInProgressHook.memoizedState = ref; + return ref; + } else { + return previousRef; + } + } + + function useLayoutEffect(create, inputs) { + { + currentHookNameInDev = 'useLayoutEffect'; + } + + warning$1( + false, + 'useLayoutEffect does nothing on the server, because its effect cannot ' + + "be encoded into the server renderer's output format. This will lead " + + 'to a mismatch between the initial, non-hydrated UI and the intended ' + + 'UI. To avoid this, useLayoutEffect should only be used in ' + + 'components that render exclusively on the client. ' + + 'See https://fb.me/react-uselayouteffect-ssr for common fixes.', + ); + } + + function dispatchAction(componentIdentity, queue, action) { + if (!(numberOfReRenders < RE_RENDER_LIMIT)) { + { + throw Error( + 'Too many re-renders. React limits the number of renders to prevent an infinite loop.', + ); + } + } + + if (componentIdentity === currentlyRenderingComponent) { + // This is a render phase update. Stash it in a lazily-created map of + // queue -> linked list of updates. After this render pass, we'll restart + // and apply the stashed updates on top of the work-in-progress hook. + didScheduleRenderPhaseUpdate = true; + var update = { + action: action, + next: null, + }; + + if (renderPhaseUpdates === null) { + renderPhaseUpdates = new Map(); + } + + var firstRenderPhaseUpdate = renderPhaseUpdates.get(queue); + + if (firstRenderPhaseUpdate === undefined) { + renderPhaseUpdates.set(queue, update); + } else { + // Append the update to the end of the list. + var lastRenderPhaseUpdate = firstRenderPhaseUpdate; + + while (lastRenderPhaseUpdate.next !== null) { + lastRenderPhaseUpdate = lastRenderPhaseUpdate.next; + } + + lastRenderPhaseUpdate.next = update; + } + } else { + // This means an update has happened after the function component has + // returned. On the server this is a no-op. In React Fiber, the update + // would be scheduled for a future render. + } + } + + function useCallback(callback, deps) { + // Callbacks are passed as they are in the server environment. + return callback; + } + + function useResponder(responder, props) { + return { + props: props, + responder: responder, + }; + } + + function useDeferredValue(value, config) { + resolveCurrentlyRenderingComponent(); + return value; + } + + function useTransition(config) { + resolveCurrentlyRenderingComponent(); + + var startTransition = function (callback) { + callback(); + }; + + return [startTransition, false]; + } + + function noop() {} + + var currentThreadID = 0; + function setCurrentThreadID(threadID) { + currentThreadID = threadID; + } + var Dispatcher = { + readContext: readContext, + useContext: useContext, + useMemo: useMemo, + useReducer: useReducer, + useRef: useRef, + useState: useState, + useLayoutEffect: useLayoutEffect, + useCallback: useCallback, + // useImperativeHandle is not run in the server environment + useImperativeHandle: noop, + // Effects are not run in the server environment. + useEffect: noop, + // Debugging effect + useDebugValue: noop, + useResponder: useResponder, + useDeferredValue: useDeferredValue, + useTransition: useTransition, + }; + + var HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml'; + var MATH_NAMESPACE = 'http://www.w3.org/1998/Math/MathML'; + var SVG_NAMESPACE = 'http://www.w3.org/2000/svg'; + var Namespaces = { + html: HTML_NAMESPACE, + mathml: MATH_NAMESPACE, + svg: SVG_NAMESPACE, + }; // Assumes there is no parent namespace. + + function getIntrinsicNamespace(type) { + switch (type) { + case 'svg': + return SVG_NAMESPACE; + + case 'math': + return MATH_NAMESPACE; + + default: + return HTML_NAMESPACE; + } + } + function getChildNamespace(parentNamespace, type) { + if (parentNamespace == null || parentNamespace === HTML_NAMESPACE) { + // No (or default) parent namespace: potential entry point. + return getIntrinsicNamespace(type); + } + + if (parentNamespace === SVG_NAMESPACE && type === 'foreignObject') { + // We're leaving SVG. + return HTML_NAMESPACE; + } // By default, pass namespace below. + + return parentNamespace; + } + + var ReactDebugCurrentFrame$3 = null; + var ReactControlledValuePropTypes = { + checkPropTypes: null, + }; + + { + ReactDebugCurrentFrame$3 = ReactSharedInternals.ReactDebugCurrentFrame; + var hasReadOnlyValue = { + button: true, + checkbox: true, + image: true, + hidden: true, + radio: true, + reset: true, + submit: true, + }; + var propTypes = { + value: function (props, propName, componentName) { + if ( + hasReadOnlyValue[props.type] || + props.onChange || + props.readOnly || + props.disabled || + props[propName] == null || + (enableFlareAPI && props.listeners) + ) { + return null; + } + + return new Error( + 'You provided a `value` prop to a form field without an ' + + '`onChange` handler. This will render a read-only field. If ' + + 'the field should be mutable use `defaultValue`. Otherwise, ' + + 'set either `onChange` or `readOnly`.', + ); + }, + checked: function (props, propName, componentName) { + if ( + props.onChange || + props.readOnly || + props.disabled || + props[propName] == null || + (enableFlareAPI && props.listeners) + ) { + return null; + } + + return new Error( + 'You provided a `checked` prop to a form field without an ' + + '`onChange` handler. This will render a read-only field. If ' + + 'the field should be mutable use `defaultChecked`. Otherwise, ' + + 'set either `onChange` or `readOnly`.', + ); + }, + }; + /** + * Provide a linked `value` attribute for controlled forms. You should not use + * this outside of the ReactDOM controlled form components. + */ + + ReactControlledValuePropTypes.checkPropTypes = function (tagName, props) { + checkPropTypes(propTypes, props, 'prop', tagName, ReactDebugCurrentFrame$3.getStackAddendum); + }; + } + + // For HTML, certain tags should omit their close tag. We keep a whitelist for + // those special-case tags. + var omittedCloseTags = { + area: true, + base: true, + br: true, + col: true, + embed: true, + hr: true, + img: true, + input: true, + keygen: true, + link: true, + meta: true, + param: true, + source: true, + track: true, + wbr: true, // NOTE: menuitem's close tag should be omitted, but that causes problems. + }; + + // `omittedCloseTags` except that `menuitem` should still have its closing tag. + + var voidElementTags = _assign( + { + menuitem: true, + }, + omittedCloseTags, + ); + + // or add stack by default to invariants where possible. + + var HTML = '__html'; + var ReactDebugCurrentFrame$4 = null; + + { + ReactDebugCurrentFrame$4 = ReactSharedInternals.ReactDebugCurrentFrame; + } + + function assertValidProps(tag, props) { + if (!props) { + return; + } // Note the use of `==` which checks for null or undefined. + + if (voidElementTags[tag]) { + if (!(props.children == null && props.dangerouslySetInnerHTML == null)) { + { + throw Error( + tag + + ' is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.' + + ReactDebugCurrentFrame$4.getStackAddendum(), + ); + } + } + } + + if (props.dangerouslySetInnerHTML != null) { + if (!(props.children == null)) { + { + throw Error('Can only set one of `children` or `props.dangerouslySetInnerHTML`.'); + } + } + + if ( + !(typeof props.dangerouslySetInnerHTML === 'object' && HTML in props.dangerouslySetInnerHTML) + ) { + { + throw Error( + '`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://fb.me/react-invariant-dangerously-set-inner-html for more information.', + ); + } + } + } + + { + !(props.suppressContentEditableWarning || !props.contentEditable || props.children == null) + ? warning$1( + false, + 'A component is `contentEditable` and contains `children` managed by ' + + 'React. It is now your responsibility to guarantee that none of ' + + 'those nodes are unexpectedly modified or duplicated. This is ' + + 'probably not intentional.', + ) + : void 0; + } + + if (!(props.style == null || typeof props.style === 'object')) { + { + throw Error( + "The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX." + + ReactDebugCurrentFrame$4.getStackAddendum(), + ); + } + } + } + + /** + * CSS properties which accept numbers but are not in units of "px". + */ + var isUnitlessNumber = { + animationIterationCount: true, + borderImageOutset: true, + borderImageSlice: true, + borderImageWidth: true, + boxFlex: true, + boxFlexGroup: true, + boxOrdinalGroup: true, + columnCount: true, + columns: true, + flex: true, + flexGrow: true, + flexPositive: true, + flexShrink: true, + flexNegative: true, + flexOrder: true, + gridArea: true, + gridRow: true, + gridRowEnd: true, + gridRowSpan: true, + gridRowStart: true, + gridColumn: true, + gridColumnEnd: true, + gridColumnSpan: true, + gridColumnStart: true, + fontWeight: true, + lineClamp: true, + lineHeight: true, + opacity: true, + order: true, + orphans: true, + tabSize: true, + widows: true, + zIndex: true, + zoom: true, + // SVG-related properties + fillOpacity: true, + floodOpacity: true, + stopOpacity: true, + strokeDasharray: true, + strokeDashoffset: true, + strokeMiterlimit: true, + strokeOpacity: true, + strokeWidth: true, + }; + /** + * @param {string} prefix vendor-specific prefix, eg: Webkit + * @param {string} key style name, eg: transitionDuration + * @return {string} style name prefixed with `prefix`, properly camelCased, eg: + * WebkitTransitionDuration + */ + + function prefixKey(prefix, key) { + return prefix + key.charAt(0).toUpperCase() + key.substring(1); + } + /** + * Support style names that may come passed in prefixed by adding permutations + * of vendor prefixes. + */ + + var prefixes = ['Webkit', 'ms', 'Moz', 'O']; // Using Object.keys here, or else the vanilla for-in loop makes IE8 go into an + // infinite loop, because it iterates over the newly added props too. + + Object.keys(isUnitlessNumber).forEach(function (prop) { + prefixes.forEach(function (prefix) { + isUnitlessNumber[prefixKey(prefix, prop)] = isUnitlessNumber[prop]; + }); + }); + + /** + * Convert a value into the proper css writable value. The style name `name` + * should be logical (no hyphens), as specified + * in `CSSProperty.isUnitlessNumber`. + * + * @param {string} name CSS property name such as `topMargin`. + * @param {*} value CSS property value such as `10px`. + * @return {string} Normalized style value with dimensions applied. + */ + + function dangerousStyleValue(name, value, isCustomProperty) { + // Note that we've removed escapeTextForBrowser() calls here since the + // whole string will be escaped when the attribute is injected into + // the markup. If you provide unsafe user data here they can inject + // arbitrary CSS which may be problematic (I couldn't repro this): + // https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet + // http://www.thespanner.co.uk/2007/11/26/ultimate-xss-css-injection/ + // This is not an XSS hole but instead a potential CSS injection issue + // which has lead to a greater discussion about how we're going to + // trust URLs moving forward. See #2115901 + var isEmpty = value == null || typeof value === 'boolean' || value === ''; + + if (isEmpty) { + return ''; + } + + if ( + !isCustomProperty && + typeof value === 'number' && + value !== 0 && + !(isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name]) + ) { + return value + 'px'; // Presumes implicit 'px' suffix for unitless numbers + } + + return ('' + value).trim(); + } + + var uppercasePattern = /([A-Z])/g; + var msPattern = /^ms-/; + /** + * Hyphenates a camelcased CSS property name, for example: + * + * > hyphenateStyleName('backgroundColor') + * < "background-color" + * > hyphenateStyleName('MozTransition') + * < "-moz-transition" + * > hyphenateStyleName('msTransition') + * < "-ms-transition" + * + * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix + * is converted to `-ms-`. + */ + + function hyphenateStyleName(name) { + return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-'); + } + + function isCustomComponent(tagName, props) { + if (tagName.indexOf('-') === -1) { + return typeof props.is === 'string'; + } + + switch (tagName) { + // These are reserved SVG and MathML elements. + // We don't mind this whitelist too much because we expect it to never grow. + // The alternative is to track the namespace in a few places which is convoluted. + // https://w3c.github.io/webcomponents/spec/custom/#custom-elements-core-concepts + case 'annotation-xml': + case 'color-profile': + case 'font-face': + case 'font-face-src': + case 'font-face-uri': + case 'font-face-format': + case 'font-face-name': + case 'missing-glyph': + return false; + + default: + return true; + } + } + + var warnValidStyle = function () {}; + + { + // 'msTransform' is correct, but the other prefixes should be capitalized + var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/; + var msPattern$1 = /^-ms-/; + var hyphenPattern = /-(.)/g; // style values shouldn't contain a semicolon + + var badStyleValueWithSemicolonPattern = /;\s*$/; + var warnedStyleNames = {}; + var warnedStyleValues = {}; + var warnedForNaNValue = false; + var warnedForInfinityValue = false; + + var camelize = function (string) { + return string.replace(hyphenPattern, function (_, character) { + return character.toUpperCase(); + }); + }; + + var warnHyphenatedStyleName = function (name) { + if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) { + return; + } + + warnedStyleNames[name] = true; + warning$1( + false, + 'Unsupported style property %s. Did you mean %s?', + name, // As Andi Smith suggests + // (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix + // is converted to lowercase `ms`. + camelize(name.replace(msPattern$1, 'ms-')), + ); + }; + + var warnBadVendoredStyleName = function (name) { + if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) { + return; + } + + warnedStyleNames[name] = true; + warning$1( + false, + 'Unsupported vendor-prefixed style property %s. Did you mean %s?', + name, + name.charAt(0).toUpperCase() + name.slice(1), + ); + }; + + var warnStyleValueWithSemicolon = function (name, value) { + if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) { + return; + } + + warnedStyleValues[value] = true; + warning$1( + false, + "Style property values shouldn't contain a semicolon. " + 'Try "%s: %s" instead.', + name, + value.replace(badStyleValueWithSemicolonPattern, ''), + ); + }; + + var warnStyleValueIsNaN = function (name, value) { + if (warnedForNaNValue) { + return; + } + + warnedForNaNValue = true; + warning$1(false, '`NaN` is an invalid value for the `%s` css style property.', name); + }; + + var warnStyleValueIsInfinity = function (name, value) { + if (warnedForInfinityValue) { + return; + } + + warnedForInfinityValue = true; + warning$1(false, '`Infinity` is an invalid value for the `%s` css style property.', name); + }; + + warnValidStyle = function (name, value) { + if (name.indexOf('-') > -1) { + warnHyphenatedStyleName(name); + } else if (badVendoredStyleNamePattern.test(name)) { + warnBadVendoredStyleName(name); + } else if (badStyleValueWithSemicolonPattern.test(value)) { + warnStyleValueWithSemicolon(name, value); + } + + if (typeof value === 'number') { + if (isNaN(value)) { + warnStyleValueIsNaN(name, value); + } else if (!isFinite(value)) { + warnStyleValueIsInfinity(name, value); + } + } + }; + } + + var warnValidStyle$1 = warnValidStyle; + + var ariaProperties = { + 'aria-current': 0, + // state + 'aria-details': 0, + 'aria-disabled': 0, + // state + 'aria-hidden': 0, + // state + 'aria-invalid': 0, + // state + 'aria-keyshortcuts': 0, + 'aria-label': 0, + 'aria-roledescription': 0, + // Widget Attributes + 'aria-autocomplete': 0, + 'aria-checked': 0, + 'aria-expanded': 0, + 'aria-haspopup': 0, + 'aria-level': 0, + 'aria-modal': 0, + 'aria-multiline': 0, + 'aria-multiselectable': 0, + 'aria-orientation': 0, + 'aria-placeholder': 0, + 'aria-pressed': 0, + 'aria-readonly': 0, + 'aria-required': 0, + 'aria-selected': 0, + 'aria-sort': 0, + 'aria-valuemax': 0, + 'aria-valuemin': 0, + 'aria-valuenow': 0, + 'aria-valuetext': 0, + // Live Region Attributes + 'aria-atomic': 0, + 'aria-busy': 0, + 'aria-live': 0, + 'aria-relevant': 0, + // Drag-and-Drop Attributes + 'aria-dropeffect': 0, + 'aria-grabbed': 0, + // Relationship Attributes + 'aria-activedescendant': 0, + 'aria-colcount': 0, + 'aria-colindex': 0, + 'aria-colspan': 0, + 'aria-controls': 0, + 'aria-describedby': 0, + 'aria-errormessage': 0, + 'aria-flowto': 0, + 'aria-labelledby': 0, + 'aria-owns': 0, + 'aria-posinset': 0, + 'aria-rowcount': 0, + 'aria-rowindex': 0, + 'aria-rowspan': 0, + 'aria-setsize': 0, + }; + + var warnedProperties = {}; + var rARIA = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$'); + var rARIACamel = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$'); + var hasOwnProperty$2 = Object.prototype.hasOwnProperty; + + function validateProperty(tagName, name) { + if (hasOwnProperty$2.call(warnedProperties, name) && warnedProperties[name]) { + return true; + } + + if (rARIACamel.test(name)) { + var ariaName = 'aria-' + name.slice(4).toLowerCase(); + var correctName = ariaProperties.hasOwnProperty(ariaName) ? ariaName : null; // If this is an aria-* attribute, but is not listed in the known DOM + // DOM properties, then it is an invalid aria-* attribute. + + if (correctName == null) { + warning$1( + false, + 'Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.', + name, + ); + warnedProperties[name] = true; + return true; + } // aria-* attributes should be lowercase; suggest the lowercase version. + + if (name !== correctName) { + warning$1(false, 'Invalid ARIA attribute `%s`. Did you mean `%s`?', name, correctName); + warnedProperties[name] = true; + return true; + } + } + + if (rARIA.test(name)) { + var lowerCasedName = name.toLowerCase(); + var standardName = ariaProperties.hasOwnProperty(lowerCasedName) ? lowerCasedName : null; // If this is an aria-* attribute, but is not listed in the known DOM + // DOM properties, then it is an invalid aria-* attribute. + + if (standardName == null) { + warnedProperties[name] = true; + return false; + } // aria-* attributes should be lowercase; suggest the lowercase version. + + if (name !== standardName) { + warning$1(false, 'Unknown ARIA attribute `%s`. Did you mean `%s`?', name, standardName); + warnedProperties[name] = true; + return true; + } + } + + return true; + } + + function warnInvalidARIAProps(type, props) { + var invalidProps = []; + + for (var key in props) { + var isValid = validateProperty(type, key); + + if (!isValid) { + invalidProps.push(key); + } + } + + var unknownPropString = invalidProps + .map(function (prop) { + return '`' + prop + '`'; + }) + .join(', '); + + if (invalidProps.length === 1) { + warning$1( + false, + 'Invalid aria prop %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop', + unknownPropString, + type, + ); + } else if (invalidProps.length > 1) { + warning$1( + false, + 'Invalid aria props %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop', + unknownPropString, + type, + ); + } + } + + function validateProperties(type, props) { + if (isCustomComponent(type, props)) { + return; + } + + warnInvalidARIAProps(type, props); + } + + var didWarnValueNull = false; + function validateProperties$1(type, props) { + if (type !== 'input' && type !== 'textarea' && type !== 'select') { + return; + } + + if (props != null && props.value === null && !didWarnValueNull) { + didWarnValueNull = true; + + if (type === 'select' && props.multiple) { + warning$1( + false, + '`value` prop on `%s` should not be null. ' + + 'Consider using an empty array when `multiple` is set to `true` ' + + 'to clear the component or `undefined` for uncontrolled components.', + type, + ); + } else { + warning$1( + false, + '`value` prop on `%s` should not be null. ' + + 'Consider using an empty string to clear the component or `undefined` ' + + 'for uncontrolled components.', + type, + ); + } + } + } + + /** + * Registers plugins so that they can extract and dispatch events. + * + * @see {EventPluginHub} + */ + + /** + * Ordered list of injected plugins. + */ + + /** + * Mapping from event name to dispatch config + */ + + /** + * Mapping from registration name to plugin module + */ + + var registrationNameModules = {}; + /** + * Mapping from registration name to event name + */ + + /** + * Mapping from lowercase registration names to the properly cased version, + * used to warn in the case of missing event handlers. Available + * only in true. + * @type {Object} + */ + + var possibleRegistrationNames = {}; // Trust the developer to only use possibleRegistrationNames in true + + /** + * Injects an ordering of plugins (by plugin name). This allows the ordering + * to be decoupled from injection of the actual plugins so that ordering is + * always deterministic regardless of packaging, on-the-fly injection, etc. + * + * @param {array} InjectedEventPluginOrder + * @internal + * @see {EventPluginHub.injection.injectEventPluginOrder} + */ + + /** + * Injects plugins to be used by `EventPluginHub`. The plugin names must be + * in the ordering injected by `injectEventPluginOrder`. + * + * Plugins can be injected as part of page initialization or on-the-fly. + * + * @param {object} injectedNamesToPlugins Map from names to plugin modules. + * @internal + * @see {EventPluginHub.injection.injectEventPluginsByName} + */ + + // When adding attributes to the HTML or SVG whitelist, be sure to + // also add them to this module to ensure casing and incorrect name + // warnings. + var possibleStandardNames = { + // HTML + accept: 'accept', + acceptcharset: 'acceptCharset', + 'accept-charset': 'acceptCharset', + accesskey: 'accessKey', + action: 'action', + allowfullscreen: 'allowFullScreen', + alt: 'alt', + as: 'as', + async: 'async', + autocapitalize: 'autoCapitalize', + autocomplete: 'autoComplete', + autocorrect: 'autoCorrect', + autofocus: 'autoFocus', + autoplay: 'autoPlay', + autosave: 'autoSave', + capture: 'capture', + cellpadding: 'cellPadding', + cellspacing: 'cellSpacing', + challenge: 'challenge', + charset: 'charSet', + checked: 'checked', + children: 'children', + cite: 'cite', + class: 'className', + classid: 'classID', + classname: 'className', + cols: 'cols', + colspan: 'colSpan', + content: 'content', + contenteditable: 'contentEditable', + contextmenu: 'contextMenu', + controls: 'controls', + controlslist: 'controlsList', + coords: 'coords', + crossorigin: 'crossOrigin', + dangerouslysetinnerhtml: 'dangerouslySetInnerHTML', + data: 'data', + datetime: 'dateTime', + default: 'default', + defaultchecked: 'defaultChecked', + defaultvalue: 'defaultValue', + defer: 'defer', + dir: 'dir', + disabled: 'disabled', + disablepictureinpicture: 'disablePictureInPicture', + download: 'download', + draggable: 'draggable', + enctype: 'encType', + for: 'htmlFor', + form: 'form', + formmethod: 'formMethod', + formaction: 'formAction', + formenctype: 'formEncType', + formnovalidate: 'formNoValidate', + formtarget: 'formTarget', + frameborder: 'frameBorder', + headers: 'headers', + height: 'height', + hidden: 'hidden', + high: 'high', + href: 'href', + hreflang: 'hrefLang', + htmlfor: 'htmlFor', + httpequiv: 'httpEquiv', + 'http-equiv': 'httpEquiv', + icon: 'icon', + id: 'id', + innerhtml: 'innerHTML', + inputmode: 'inputMode', + integrity: 'integrity', + is: 'is', + itemid: 'itemID', + itemprop: 'itemProp', + itemref: 'itemRef', + itemscope: 'itemScope', + itemtype: 'itemType', + keyparams: 'keyParams', + keytype: 'keyType', + kind: 'kind', + label: 'label', + lang: 'lang', + list: 'list', + loop: 'loop', + low: 'low', + manifest: 'manifest', + marginwidth: 'marginWidth', + marginheight: 'marginHeight', + max: 'max', + maxlength: 'maxLength', + media: 'media', + mediagroup: 'mediaGroup', + method: 'method', + min: 'min', + minlength: 'minLength', + multiple: 'multiple', + muted: 'muted', + name: 'name', + nomodule: 'noModule', + nonce: 'nonce', + novalidate: 'noValidate', + open: 'open', + optimum: 'optimum', + pattern: 'pattern', + placeholder: 'placeholder', + playsinline: 'playsInline', + poster: 'poster', + preload: 'preload', + profile: 'profile', + radiogroup: 'radioGroup', + readonly: 'readOnly', + referrerpolicy: 'referrerPolicy', + rel: 'rel', + required: 'required', + reversed: 'reversed', + role: 'role', + rows: 'rows', + rowspan: 'rowSpan', + sandbox: 'sandbox', + scope: 'scope', + scoped: 'scoped', + scrolling: 'scrolling', + seamless: 'seamless', + selected: 'selected', + shape: 'shape', + size: 'size', + sizes: 'sizes', + span: 'span', + spellcheck: 'spellCheck', + src: 'src', + srcdoc: 'srcDoc', + srclang: 'srcLang', + srcset: 'srcSet', + start: 'start', + step: 'step', + style: 'style', + summary: 'summary', + tabindex: 'tabIndex', + target: 'target', + title: 'title', + type: 'type', + usemap: 'useMap', + value: 'value', + width: 'width', + wmode: 'wmode', + wrap: 'wrap', + // SVG + about: 'about', + accentheight: 'accentHeight', + 'accent-height': 'accentHeight', + accumulate: 'accumulate', + additive: 'additive', + alignmentbaseline: 'alignmentBaseline', + 'alignment-baseline': 'alignmentBaseline', + allowreorder: 'allowReorder', + alphabetic: 'alphabetic', + amplitude: 'amplitude', + arabicform: 'arabicForm', + 'arabic-form': 'arabicForm', + ascent: 'ascent', + attributename: 'attributeName', + attributetype: 'attributeType', + autoreverse: 'autoReverse', + azimuth: 'azimuth', + basefrequency: 'baseFrequency', + baselineshift: 'baselineShift', + 'baseline-shift': 'baselineShift', + baseprofile: 'baseProfile', + bbox: 'bbox', + begin: 'begin', + bias: 'bias', + by: 'by', + calcmode: 'calcMode', + capheight: 'capHeight', + 'cap-height': 'capHeight', + clip: 'clip', + clippath: 'clipPath', + 'clip-path': 'clipPath', + clippathunits: 'clipPathUnits', + cliprule: 'clipRule', + 'clip-rule': 'clipRule', + color: 'color', + colorinterpolation: 'colorInterpolation', + 'color-interpolation': 'colorInterpolation', + colorinterpolationfilters: 'colorInterpolationFilters', + 'color-interpolation-filters': 'colorInterpolationFilters', + colorprofile: 'colorProfile', + 'color-profile': 'colorProfile', + colorrendering: 'colorRendering', + 'color-rendering': 'colorRendering', + contentscripttype: 'contentScriptType', + contentstyletype: 'contentStyleType', + cursor: 'cursor', + cx: 'cx', + cy: 'cy', + d: 'd', + datatype: 'datatype', + decelerate: 'decelerate', + descent: 'descent', + diffuseconstant: 'diffuseConstant', + direction: 'direction', + display: 'display', + divisor: 'divisor', + dominantbaseline: 'dominantBaseline', + 'dominant-baseline': 'dominantBaseline', + dur: 'dur', + dx: 'dx', + dy: 'dy', + edgemode: 'edgeMode', + elevation: 'elevation', + enablebackground: 'enableBackground', + 'enable-background': 'enableBackground', + end: 'end', + exponent: 'exponent', + externalresourcesrequired: 'externalResourcesRequired', + fill: 'fill', + fillopacity: 'fillOpacity', + 'fill-opacity': 'fillOpacity', + fillrule: 'fillRule', + 'fill-rule': 'fillRule', + filter: 'filter', + filterres: 'filterRes', + filterunits: 'filterUnits', + floodopacity: 'floodOpacity', + 'flood-opacity': 'floodOpacity', + floodcolor: 'floodColor', + 'flood-color': 'floodColor', + focusable: 'focusable', + fontfamily: 'fontFamily', + 'font-family': 'fontFamily', + fontsize: 'fontSize', + 'font-size': 'fontSize', + fontsizeadjust: 'fontSizeAdjust', + 'font-size-adjust': 'fontSizeAdjust', + fontstretch: 'fontStretch', + 'font-stretch': 'fontStretch', + fontstyle: 'fontStyle', + 'font-style': 'fontStyle', + fontvariant: 'fontVariant', + 'font-variant': 'fontVariant', + fontweight: 'fontWeight', + 'font-weight': 'fontWeight', + format: 'format', + from: 'from', + fx: 'fx', + fy: 'fy', + g1: 'g1', + g2: 'g2', + glyphname: 'glyphName', + 'glyph-name': 'glyphName', + glyphorientationhorizontal: 'glyphOrientationHorizontal', + 'glyph-orientation-horizontal': 'glyphOrientationHorizontal', + glyphorientationvertical: 'glyphOrientationVertical', + 'glyph-orientation-vertical': 'glyphOrientationVertical', + glyphref: 'glyphRef', + gradienttransform: 'gradientTransform', + gradientunits: 'gradientUnits', + hanging: 'hanging', + horizadvx: 'horizAdvX', + 'horiz-adv-x': 'horizAdvX', + horizoriginx: 'horizOriginX', + 'horiz-origin-x': 'horizOriginX', + ideographic: 'ideographic', + imagerendering: 'imageRendering', + 'image-rendering': 'imageRendering', + in2: 'in2', + in: 'in', + inlist: 'inlist', + intercept: 'intercept', + k1: 'k1', + k2: 'k2', + k3: 'k3', + k4: 'k4', + k: 'k', + kernelmatrix: 'kernelMatrix', + kernelunitlength: 'kernelUnitLength', + kerning: 'kerning', + keypoints: 'keyPoints', + keysplines: 'keySplines', + keytimes: 'keyTimes', + lengthadjust: 'lengthAdjust', + letterspacing: 'letterSpacing', + 'letter-spacing': 'letterSpacing', + lightingcolor: 'lightingColor', + 'lighting-color': 'lightingColor', + limitingconeangle: 'limitingConeAngle', + local: 'local', + markerend: 'markerEnd', + 'marker-end': 'markerEnd', + markerheight: 'markerHeight', + markermid: 'markerMid', + 'marker-mid': 'markerMid', + markerstart: 'markerStart', + 'marker-start': 'markerStart', + markerunits: 'markerUnits', + markerwidth: 'markerWidth', + mask: 'mask', + maskcontentunits: 'maskContentUnits', + maskunits: 'maskUnits', + mathematical: 'mathematical', + mode: 'mode', + numoctaves: 'numOctaves', + offset: 'offset', + opacity: 'opacity', + operator: 'operator', + order: 'order', + orient: 'orient', + orientation: 'orientation', + origin: 'origin', + overflow: 'overflow', + overlineposition: 'overlinePosition', + 'overline-position': 'overlinePosition', + overlinethickness: 'overlineThickness', + 'overline-thickness': 'overlineThickness', + paintorder: 'paintOrder', + 'paint-order': 'paintOrder', + panose1: 'panose1', + 'panose-1': 'panose1', + pathlength: 'pathLength', + patterncontentunits: 'patternContentUnits', + patterntransform: 'patternTransform', + patternunits: 'patternUnits', + pointerevents: 'pointerEvents', + 'pointer-events': 'pointerEvents', + points: 'points', + pointsatx: 'pointsAtX', + pointsaty: 'pointsAtY', + pointsatz: 'pointsAtZ', + prefix: 'prefix', + preservealpha: 'preserveAlpha', + preserveaspectratio: 'preserveAspectRatio', + primitiveunits: 'primitiveUnits', + property: 'property', + r: 'r', + radius: 'radius', + refx: 'refX', + refy: 'refY', + renderingintent: 'renderingIntent', + 'rendering-intent': 'renderingIntent', + repeatcount: 'repeatCount', + repeatdur: 'repeatDur', + requiredextensions: 'requiredExtensions', + requiredfeatures: 'requiredFeatures', + resource: 'resource', + restart: 'restart', + result: 'result', + results: 'results', + rotate: 'rotate', + rx: 'rx', + ry: 'ry', + scale: 'scale', + security: 'security', + seed: 'seed', + shaperendering: 'shapeRendering', + 'shape-rendering': 'shapeRendering', + slope: 'slope', + spacing: 'spacing', + specularconstant: 'specularConstant', + specularexponent: 'specularExponent', + speed: 'speed', + spreadmethod: 'spreadMethod', + startoffset: 'startOffset', + stddeviation: 'stdDeviation', + stemh: 'stemh', + stemv: 'stemv', + stitchtiles: 'stitchTiles', + stopcolor: 'stopColor', + 'stop-color': 'stopColor', + stopopacity: 'stopOpacity', + 'stop-opacity': 'stopOpacity', + strikethroughposition: 'strikethroughPosition', + 'strikethrough-position': 'strikethroughPosition', + strikethroughthickness: 'strikethroughThickness', + 'strikethrough-thickness': 'strikethroughThickness', + string: 'string', + stroke: 'stroke', + strokedasharray: 'strokeDasharray', + 'stroke-dasharray': 'strokeDasharray', + strokedashoffset: 'strokeDashoffset', + 'stroke-dashoffset': 'strokeDashoffset', + strokelinecap: 'strokeLinecap', + 'stroke-linecap': 'strokeLinecap', + strokelinejoin: 'strokeLinejoin', + 'stroke-linejoin': 'strokeLinejoin', + strokemiterlimit: 'strokeMiterlimit', + 'stroke-miterlimit': 'strokeMiterlimit', + strokewidth: 'strokeWidth', + 'stroke-width': 'strokeWidth', + strokeopacity: 'strokeOpacity', + 'stroke-opacity': 'strokeOpacity', + suppresscontenteditablewarning: 'suppressContentEditableWarning', + suppresshydrationwarning: 'suppressHydrationWarning', + surfacescale: 'surfaceScale', + systemlanguage: 'systemLanguage', + tablevalues: 'tableValues', + targetx: 'targetX', + targety: 'targetY', + textanchor: 'textAnchor', + 'text-anchor': 'textAnchor', + textdecoration: 'textDecoration', + 'text-decoration': 'textDecoration', + textlength: 'textLength', + textrendering: 'textRendering', + 'text-rendering': 'textRendering', + to: 'to', + transform: 'transform', + typeof: 'typeof', + u1: 'u1', + u2: 'u2', + underlineposition: 'underlinePosition', + 'underline-position': 'underlinePosition', + underlinethickness: 'underlineThickness', + 'underline-thickness': 'underlineThickness', + unicode: 'unicode', + unicodebidi: 'unicodeBidi', + 'unicode-bidi': 'unicodeBidi', + unicoderange: 'unicodeRange', + 'unicode-range': 'unicodeRange', + unitsperem: 'unitsPerEm', + 'units-per-em': 'unitsPerEm', + unselectable: 'unselectable', + valphabetic: 'vAlphabetic', + 'v-alphabetic': 'vAlphabetic', + values: 'values', + vectoreffect: 'vectorEffect', + 'vector-effect': 'vectorEffect', + version: 'version', + vertadvy: 'vertAdvY', + 'vert-adv-y': 'vertAdvY', + vertoriginx: 'vertOriginX', + 'vert-origin-x': 'vertOriginX', + vertoriginy: 'vertOriginY', + 'vert-origin-y': 'vertOriginY', + vhanging: 'vHanging', + 'v-hanging': 'vHanging', + videographic: 'vIdeographic', + 'v-ideographic': 'vIdeographic', + viewbox: 'viewBox', + viewtarget: 'viewTarget', + visibility: 'visibility', + vmathematical: 'vMathematical', + 'v-mathematical': 'vMathematical', + vocab: 'vocab', + widths: 'widths', + wordspacing: 'wordSpacing', + 'word-spacing': 'wordSpacing', + writingmode: 'writingMode', + 'writing-mode': 'writingMode', + x1: 'x1', + x2: 'x2', + x: 'x', + xchannelselector: 'xChannelSelector', + xheight: 'xHeight', + 'x-height': 'xHeight', + xlinkactuate: 'xlinkActuate', + 'xlink:actuate': 'xlinkActuate', + xlinkarcrole: 'xlinkArcrole', + 'xlink:arcrole': 'xlinkArcrole', + xlinkhref: 'xlinkHref', + 'xlink:href': 'xlinkHref', + xlinkrole: 'xlinkRole', + 'xlink:role': 'xlinkRole', + xlinkshow: 'xlinkShow', + 'xlink:show': 'xlinkShow', + xlinktitle: 'xlinkTitle', + 'xlink:title': 'xlinkTitle', + xlinktype: 'xlinkType', + 'xlink:type': 'xlinkType', + xmlbase: 'xmlBase', + 'xml:base': 'xmlBase', + xmllang: 'xmlLang', + 'xml:lang': 'xmlLang', + xmlns: 'xmlns', + 'xml:space': 'xmlSpace', + xmlnsxlink: 'xmlnsXlink', + 'xmlns:xlink': 'xmlnsXlink', + xmlspace: 'xmlSpace', + y1: 'y1', + y2: 'y2', + y: 'y', + ychannelselector: 'yChannelSelector', + z: 'z', + zoomandpan: 'zoomAndPan', + }; + + var validateProperty$1 = function () {}; + + { + var warnedProperties$1 = {}; + var _hasOwnProperty = Object.prototype.hasOwnProperty; + var EVENT_NAME_REGEX = /^on./; + var INVALID_EVENT_NAME_REGEX = /^on[^A-Z]/; + var rARIA$1 = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$'); + var rARIACamel$1 = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$'); + + validateProperty$1 = function (tagName, name, value, canUseEventSystem) { + if (_hasOwnProperty.call(warnedProperties$1, name) && warnedProperties$1[name]) { + return true; + } + + var lowerCasedName = name.toLowerCase(); + + if (lowerCasedName === 'onfocusin' || lowerCasedName === 'onfocusout') { + warning$1( + false, + 'React uses onFocus and onBlur instead of onFocusIn and onFocusOut. ' + + 'All React events are normalized to bubble, so onFocusIn and onFocusOut ' + + 'are not needed/supported by React.', + ); + warnedProperties$1[name] = true; + return true; + } // We can't rely on the event system being injected on the server. + + if (canUseEventSystem) { + if (registrationNameModules.hasOwnProperty(name)) { + return true; + } + + var registrationName = possibleRegistrationNames.hasOwnProperty(lowerCasedName) + ? possibleRegistrationNames[lowerCasedName] + : null; + + if (registrationName != null) { + warning$1( + false, + 'Invalid event handler property `%s`. Did you mean `%s`?', + name, + registrationName, + ); + warnedProperties$1[name] = true; + return true; + } + + if (EVENT_NAME_REGEX.test(name)) { + warning$1(false, 'Unknown event handler property `%s`. It will be ignored.', name); + warnedProperties$1[name] = true; + return true; + } + } else if (EVENT_NAME_REGEX.test(name)) { + // If no event plugins have been injected, we are in a server environment. + // So we can't tell if the event name is correct for sure, but we can filter + // out known bad ones like `onclick`. We can't suggest a specific replacement though. + if (INVALID_EVENT_NAME_REGEX.test(name)) { + warning$1( + false, + 'Invalid event handler property `%s`. ' + + 'React events use the camelCase naming convention, for example `onClick`.', + name, + ); + } + + warnedProperties$1[name] = true; + return true; + } // Let the ARIA attribute hook validate ARIA attributes + + if (rARIA$1.test(name) || rARIACamel$1.test(name)) { + return true; + } + + if (lowerCasedName === 'innerhtml') { + warning$1( + false, + 'Directly setting property `innerHTML` is not permitted. ' + + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.', + ); + warnedProperties$1[name] = true; + return true; + } + + if (lowerCasedName === 'aria') { + warning$1( + false, + 'The `aria` attribute is reserved for future use in React. ' + + 'Pass individual `aria-` attributes instead.', + ); + warnedProperties$1[name] = true; + return true; + } + + if ( + lowerCasedName === 'is' && + value !== null && + value !== undefined && + typeof value !== 'string' + ) { + warning$1( + false, + 'Received a `%s` for a string attribute `is`. If this is expected, cast ' + + 'the value to a string.', + typeof value, + ); + warnedProperties$1[name] = true; + return true; + } + + if (typeof value === 'number' && isNaN(value)) { + warning$1( + false, + 'Received NaN for the `%s` attribute. If this is expected, cast ' + + 'the value to a string.', + name, + ); + warnedProperties$1[name] = true; + return true; + } + + var propertyInfo = getPropertyInfo(name); + var isReserved = propertyInfo !== null && propertyInfo.type === RESERVED; // Known attributes should match the casing specified in the property config. + + if (possibleStandardNames.hasOwnProperty(lowerCasedName)) { + var standardName = possibleStandardNames[lowerCasedName]; + + if (standardName !== name) { + warning$1(false, 'Invalid DOM property `%s`. Did you mean `%s`?', name, standardName); + warnedProperties$1[name] = true; + return true; + } + } else if (!isReserved && name !== lowerCasedName) { + // Unknown attributes should have lowercase casing since that's how they + // will be cased anyway with server rendering. + warning$1( + false, + 'React does not recognize the `%s` prop on a DOM element. If you ' + + 'intentionally want it to appear in the DOM as a custom ' + + 'attribute, spell it as lowercase `%s` instead. ' + + 'If you accidentally passed it from a parent component, remove ' + + 'it from the DOM element.', + name, + lowerCasedName, + ); + warnedProperties$1[name] = true; + return true; + } + + if ( + typeof value === 'boolean' && + shouldRemoveAttributeWithWarning(name, value, propertyInfo, false) + ) { + if (value) { + warning$1( + false, + 'Received `%s` for a non-boolean attribute `%s`.\n\n' + + 'If you want to write it to the DOM, pass a string instead: ' + + '%s="%s" or %s={value.toString()}.', + value, + name, + name, + value, + name, + ); + } else { + warning$1( + false, + 'Received `%s` for a non-boolean attribute `%s`.\n\n' + + 'If you want to write it to the DOM, pass a string instead: ' + + '%s="%s" or %s={value.toString()}.\n\n' + + 'If you used to conditionally omit it with %s={condition && value}, ' + + 'pass %s={condition ? value : undefined} instead.', + value, + name, + name, + value, + name, + name, + name, + ); + } + + warnedProperties$1[name] = true; + return true; + } // Now that we've validated casing, do not validate + // data types for reserved props + + if (isReserved) { + return true; + } // Warn when a known attribute is a bad type + + if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, false)) { + warnedProperties$1[name] = true; + return false; + } // Warn when passing the strings 'false' or 'true' into a boolean prop + + if ( + (value === 'false' || value === 'true') && + propertyInfo !== null && + propertyInfo.type === BOOLEAN + ) { + warning$1( + false, + 'Received the string `%s` for the boolean attribute `%s`. ' + + '%s ' + + 'Did you mean %s={%s}?', + value, + name, + value === 'false' + ? 'The browser will interpret it as a truthy value.' + : 'Although this works, it will not work as expected if you pass the string "false".', + name, + value, + ); + warnedProperties$1[name] = true; + return true; + } + + return true; + }; + } + + var warnUnknownProperties = function (type, props, canUseEventSystem) { + var unknownProps = []; + + for (var key in props) { + var isValid = validateProperty$1(type, key, props[key], canUseEventSystem); + + if (!isValid) { + unknownProps.push(key); + } + } + + var unknownPropString = unknownProps + .map(function (prop) { + return '`' + prop + '`'; + }) + .join(', '); + + if (unknownProps.length === 1) { + warning$1( + false, + 'Invalid value for prop %s on <%s> tag. Either remove it from the element, ' + + 'or pass a string or number value to keep it in the DOM. ' + + 'For details, see https://fb.me/react-attribute-behavior', + unknownPropString, + type, + ); + } else if (unknownProps.length > 1) { + warning$1( + false, + 'Invalid values for props %s on <%s> tag. Either remove them from the element, ' + + 'or pass a string or number value to keep them in the DOM. ' + + 'For details, see https://fb.me/react-attribute-behavior', + unknownPropString, + type, + ); + } + }; + + function validateProperties$2(type, props, canUseEventSystem) { + if (isCustomComponent(type, props)) { + return; + } + + warnUnknownProperties(type, props, canUseEventSystem); + } + + var toArray = React.Children.toArray; // This is only used in DEV. + // Each entry is `this.stack` from a currently executing renderer instance. + // (There may be more than one because ReactDOMServer is reentrant). + // Each stack is an array of frames which may contain nested stacks of elements. + + var currentDebugStacks = []; + var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher; + var ReactDebugCurrentFrame; + var prevGetCurrentStackImpl = null; + + var getCurrentServerStackImpl = function () { + return ''; + }; + + var describeStackFrame = function (element) { + return ''; + }; + + var validatePropertiesInDevelopment = function (type, props) {}; + + var pushCurrentDebugStack = function (stack) {}; + + var pushElementToDebugStack = function (element) {}; + + var popCurrentDebugStack = function () {}; + + var hasWarnedAboutUsingContextAsConsumer = false; + + { + ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; + + validatePropertiesInDevelopment = function (type, props) { + validateProperties(type, props); + validateProperties$1(type, props); + validateProperties$2( + type, + props, + /* canUseEventSystem */ + false, + ); + }; + + describeStackFrame = function (element) { + var source = element._source; + var type = element.type; + var name = getComponentName(type); + var ownerName = null; + return describeComponentFrame(name, source, ownerName); + }; + + pushCurrentDebugStack = function (stack) { + currentDebugStacks.push(stack); + + if (currentDebugStacks.length === 1) { + // We are entering a server renderer. + // Remember the previous (e.g. client) global stack implementation. + prevGetCurrentStackImpl = ReactDebugCurrentFrame.getCurrentStack; + ReactDebugCurrentFrame.getCurrentStack = getCurrentServerStackImpl; + } + }; + + pushElementToDebugStack = function (element) { + // For the innermost executing ReactDOMServer call, + var stack = currentDebugStacks[currentDebugStacks.length - 1]; // Take the innermost executing frame (e.g. <Foo>), + + var frame = stack[stack.length - 1]; // and record that it has one more element associated with it. + + frame.debugElementStack.push(element); // We only need this because we tail-optimize single-element + // children and directly handle them in an inner loop instead of + // creating separate frames for them. + }; + + popCurrentDebugStack = function () { + currentDebugStacks.pop(); + + if (currentDebugStacks.length === 0) { + // We are exiting the server renderer. + // Restore the previous (e.g. client) global stack implementation. + ReactDebugCurrentFrame.getCurrentStack = prevGetCurrentStackImpl; + prevGetCurrentStackImpl = null; + } + }; + + getCurrentServerStackImpl = function () { + if (currentDebugStacks.length === 0) { + // Nothing is currently rendering. + return ''; + } // ReactDOMServer is reentrant so there may be multiple calls at the same time. + // Take the frames from the innermost call which is the last in the array. + + var frames = currentDebugStacks[currentDebugStacks.length - 1]; + var stack = ''; // Go through every frame in the stack from the innermost one. + + for (var i = frames.length - 1; i >= 0; i--) { + var frame = frames[i]; // Every frame might have more than one debug element stack entry associated with it. + // This is because single-child nesting doesn't create materialized frames. + // Instead it would push them through `pushElementToDebugStack()`. + + var debugElementStack = frame.debugElementStack; + + for (var ii = debugElementStack.length - 1; ii >= 0; ii--) { + stack += describeStackFrame(debugElementStack[ii]); + } + } + + return stack; + }; + } + + var didWarnDefaultInputValue = false; + var didWarnDefaultChecked = false; + var didWarnDefaultSelectValue = false; + var didWarnDefaultTextareaValue = false; + var didWarnInvalidOptionChildren = false; + var didWarnAboutNoopUpdateForComponent = {}; + var didWarnAboutBadClass = {}; + var didWarnAboutModulePatternComponent = {}; + var didWarnAboutDeprecatedWillMount = {}; + var didWarnAboutUndefinedDerivedState = {}; + var didWarnAboutUninitializedState = {}; + var valuePropNames = ['value', 'defaultValue']; + var newlineEatingTags = { + listing: true, + pre: true, + textarea: true, + }; // We accept any tag to be rendered but since this gets injected into arbitrary + // HTML, we want to make sure that it's a safe tag. + // http://www.w3.org/TR/REC-xml/#NT-Name + + var VALID_TAG_REGEX = /^[a-zA-Z][a-zA-Z:_\.\-\d]*$/; // Simplified subset + + var validatedTagCache = {}; + + function validateDangerousTag(tag) { + if (!validatedTagCache.hasOwnProperty(tag)) { + if (!VALID_TAG_REGEX.test(tag)) { + { + throw Error('Invalid tag: ' + tag); + } + } + + validatedTagCache[tag] = true; + } + } + + var styleNameCache = {}; + + var processStyleName = function (styleName) { + if (styleNameCache.hasOwnProperty(styleName)) { + return styleNameCache[styleName]; + } + + var result = hyphenateStyleName(styleName); + styleNameCache[styleName] = result; + return result; + }; + + function createMarkupForStyles(styles) { + var serialized = ''; + var delimiter = ''; + + for (var styleName in styles) { + if (!styles.hasOwnProperty(styleName)) { + continue; + } + + var isCustomProperty = styleName.indexOf('--') === 0; + var styleValue = styles[styleName]; + + { + if (!isCustomProperty) { + warnValidStyle$1(styleName, styleValue); + } + } + + if (styleValue != null) { + serialized += delimiter + (isCustomProperty ? styleName : processStyleName(styleName)) + ':'; + serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty); + delimiter = ';'; + } + } + + return serialized || null; + } + + function warnNoop(publicInstance, callerName) { + { + var _constructor = publicInstance.constructor; + var componentName = (_constructor && getComponentName(_constructor)) || 'ReactClass'; + var warningKey = componentName + '.' + callerName; + + if (didWarnAboutNoopUpdateForComponent[warningKey]) { + return; + } + + warningWithoutStack$1( + false, + '%s(...): Can only update a mounting component. ' + + 'This usually means you called %s() outside componentWillMount() on the server. ' + + 'This is a no-op.\n\nPlease check the code for the %s component.', + callerName, + callerName, + componentName, + ); + didWarnAboutNoopUpdateForComponent[warningKey] = true; + } + } + + function shouldConstruct(Component) { + return Component.prototype && Component.prototype.isReactComponent; + } + + function getNonChildrenInnerMarkup(props) { + var innerHTML = props.dangerouslySetInnerHTML; + + if (innerHTML != null) { + if (innerHTML.__html != null) { + return innerHTML.__html; + } + } else { + var content = props.children; + + if (typeof content === 'string' || typeof content === 'number') { + return escapeTextForBrowser(content); + } + } + + return null; + } + + function flattenTopLevelChildren(children) { + if (!React.isValidElement(children)) { + return toArray(children); + } + + var element = children; + + if (element.type !== REACT_FRAGMENT_TYPE) { + return [element]; + } + + var fragmentChildren = element.props.children; + + if (!React.isValidElement(fragmentChildren)) { + return toArray(fragmentChildren); + } + + var fragmentChildElement = fragmentChildren; + return [fragmentChildElement]; + } + + function flattenOptionChildren(children) { + if (children === undefined || children === null) { + return children; + } + + var content = ''; // Flatten children and warn if they aren't strings or numbers; + // invalid types are ignored. + + React.Children.forEach(children, function (child) { + if (child == null) { + return; + } + + content += child; + + { + if (!didWarnInvalidOptionChildren && typeof child !== 'string' && typeof child !== 'number') { + didWarnInvalidOptionChildren = true; + warning$1(false, 'Only strings and numbers are supported as <option> children.'); + } + } + }); + return content; + } + + var hasOwnProperty = Object.prototype.hasOwnProperty; + var STYLE = 'style'; + var RESERVED_PROPS = { + children: null, + dangerouslySetInnerHTML: null, + suppressContentEditableWarning: null, + suppressHydrationWarning: null, + }; + + function createOpenTagMarkup( + tagVerbatim, + tagLowercase, + props, + namespace, + makeStaticMarkup, + isRootElement, + ) { + var ret = '<' + tagVerbatim; + + for (var propKey in props) { + if (!hasOwnProperty.call(props, propKey)) { + continue; + } + + if (enableFlareAPI && propKey === 'listeners') { + continue; + } + + var propValue = props[propKey]; + + if (propValue == null) { + continue; + } + + if (propKey === STYLE) { + propValue = createMarkupForStyles(propValue); + } + + var markup = null; + + if (isCustomComponent(tagLowercase, props)) { + if (!RESERVED_PROPS.hasOwnProperty(propKey)) { + markup = createMarkupForCustomAttribute(propKey, propValue); + } + } else { + markup = createMarkupForProperty(propKey, propValue); + } + + if (markup) { + ret += ' ' + markup; + } + } // For static pages, no need to put React ID and checksum. Saves lots of + // bytes. + + if (makeStaticMarkup) { + return ret; + } + + if (isRootElement) { + ret += ' ' + createMarkupForRoot(); + } + + return ret; + } + + function validateRenderResult(child, type) { + if (child === undefined) { + { + { + throw Error( + (getComponentName(type) || 'Component') + + '(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.', + ); + } + } + } + } + + function resolve(child, context, threadID) { + while (React.isValidElement(child)) { + // Safe because we just checked it's an element. + var element = child; + var Component = element.type; + + { + pushElementToDebugStack(element); + } + + if (typeof Component !== 'function') { + break; + } + + processChild(element, Component); + } // Extra closure so queue and replace can be captured properly + + function processChild(element, Component) { + var isClass = shouldConstruct(Component); + var publicContext = processContext(Component, context, threadID, isClass); + var queue = []; + var replace = false; + var updater = { + isMounted: function (publicInstance) { + return false; + }, + enqueueForceUpdate: function (publicInstance) { + if (queue === null) { + warnNoop(publicInstance, 'forceUpdate'); + return null; + } + }, + enqueueReplaceState: function (publicInstance, completeState) { + replace = true; + queue = [completeState]; + }, + enqueueSetState: function (publicInstance, currentPartialState) { + if (queue === null) { + warnNoop(publicInstance, 'setState'); + return null; + } + + queue.push(currentPartialState); + }, + }; + var inst; + + if (isClass) { + inst = new Component(element.props, publicContext, updater); + + if (typeof Component.getDerivedStateFromProps === 'function') { + { + if (inst.state === null || inst.state === undefined) { + var componentName = getComponentName(Component) || 'Unknown'; + + if (!didWarnAboutUninitializedState[componentName]) { + warningWithoutStack$1( + false, + '`%s` uses `getDerivedStateFromProps` but its initial state is ' + + '%s. This is not recommended. Instead, define the initial state by ' + + 'assigning an object to `this.state` in the constructor of `%s`. ' + + 'This ensures that `getDerivedStateFromProps` arguments have a consistent shape.', + componentName, + inst.state === null ? 'null' : 'undefined', + componentName, + ); + didWarnAboutUninitializedState[componentName] = true; + } + } + } + + var partialState = Component.getDerivedStateFromProps.call(null, element.props, inst.state); + + { + if (partialState === undefined) { + var _componentName = getComponentName(Component) || 'Unknown'; + + if (!didWarnAboutUndefinedDerivedState[_componentName]) { + warningWithoutStack$1( + false, + '%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. ' + + 'You have returned undefined.', + _componentName, + ); + didWarnAboutUndefinedDerivedState[_componentName] = true; + } + } + } + + if (partialState != null) { + inst.state = _assign({}, inst.state, partialState); + } + } + } else { + { + if (Component.prototype && typeof Component.prototype.render === 'function') { + var _componentName2 = getComponentName(Component) || 'Unknown'; + + if (!didWarnAboutBadClass[_componentName2]) { + warningWithoutStack$1( + false, + "The <%s /> component appears to have a render method, but doesn't extend React.Component. " + + 'This is likely to cause errors. Change %s to extend React.Component instead.', + _componentName2, + _componentName2, + ); + didWarnAboutBadClass[_componentName2] = true; + } + } + } + + var componentIdentity = {}; + prepareToUseHooks(componentIdentity); + inst = Component(element.props, publicContext, updater); + inst = finishHooks(Component, element.props, inst, publicContext); + + if (inst == null || inst.render == null) { + child = inst; + validateRenderResult(child, Component); + return; + } + + { + var _componentName3 = getComponentName(Component) || 'Unknown'; + + if (!didWarnAboutModulePatternComponent[_componentName3]) { + warningWithoutStack$1( + false, + 'The <%s /> component appears to be a function component that returns a class instance. ' + + 'Change %s to a class that extends React.Component instead. ' + + "If you can't use a class try assigning the prototype on the function as a workaround. " + + "`%s.prototype = React.Component.prototype`. Don't use an arrow function since it " + + 'cannot be called with `new` by React.', + _componentName3, + _componentName3, + _componentName3, + ); + didWarnAboutModulePatternComponent[_componentName3] = true; + } + } + } + + inst.props = element.props; + inst.context = publicContext; + inst.updater = updater; + var initialState = inst.state; + + if (initialState === undefined) { + inst.state = initialState = null; + } + + if ( + typeof inst.UNSAFE_componentWillMount === 'function' || + typeof inst.componentWillMount === 'function' + ) { + if (typeof inst.componentWillMount === 'function') { + { + if ( + warnAboutDeprecatedLifecycles && + inst.componentWillMount.__suppressDeprecationWarning !== true + ) { + var _componentName4 = getComponentName(Component) || 'Unknown'; + + if (!didWarnAboutDeprecatedWillMount[_componentName4]) { + lowPriorityWarningWithoutStack$1( + false, // keep this warning in sync with ReactStrictModeWarning.js + 'componentWillMount has been renamed, and is not recommended for use. ' + + 'See https://fb.me/react-unsafe-component-lifecycles for details.\n\n' + + '* Move code from componentWillMount to componentDidMount (preferred in most cases) ' + + 'or the constructor.\n' + + '\nPlease update the following components: %s', + _componentName4, + ); + didWarnAboutDeprecatedWillMount[_componentName4] = true; + } + } + } // In order to support react-lifecycles-compat polyfilled components, + // Unsafe lifecycles should not be invoked for any component with the new gDSFP. + + if (typeof Component.getDerivedStateFromProps !== 'function') { + inst.componentWillMount(); + } + } + + if ( + typeof inst.UNSAFE_componentWillMount === 'function' && + typeof Component.getDerivedStateFromProps !== 'function' + ) { + // In order to support react-lifecycles-compat polyfilled components, + // Unsafe lifecycles should not be invoked for any component with the new gDSFP. + inst.UNSAFE_componentWillMount(); + } + + if (queue.length) { + var oldQueue = queue; + var oldReplace = replace; + queue = null; + replace = false; + + if (oldReplace && oldQueue.length === 1) { + inst.state = oldQueue[0]; + } else { + var nextState = oldReplace ? oldQueue[0] : inst.state; + var dontMutate = true; + + for (var i = oldReplace ? 1 : 0; i < oldQueue.length; i++) { + var partial = oldQueue[i]; + + var _partialState = + typeof partial === 'function' + ? partial.call(inst, nextState, element.props, publicContext) + : partial; + + if (_partialState != null) { + if (dontMutate) { + dontMutate = false; + nextState = _assign({}, nextState, _partialState); + } else { + _assign(nextState, _partialState); + } + } + } + + inst.state = nextState; + } + } else { + queue = null; + } + } + + child = inst.render(); + + { + if (child === undefined && inst.render._isMockFunction) { + // This is probably bad practice. Consider warning here and + // deprecating this convenience. + child = null; + } + } + + validateRenderResult(child, Component); + var childContext; + + if (disableLegacyContext) { + { + var childContextTypes = Component.childContextTypes; + + if (childContextTypes !== undefined) { + warningWithoutStack$1( + false, + '%s uses the legacy childContextTypes API which is no longer supported. ' + + 'Use React.createContext() instead.', + getComponentName(Component) || 'Unknown', + ); + } + } + } else { + if (typeof inst.getChildContext === 'function') { + var _childContextTypes = Component.childContextTypes; + + if (typeof _childContextTypes === 'object') { + childContext = inst.getChildContext(); + + for (var contextKey in childContext) { + if (!(contextKey in _childContextTypes)) { + { + throw Error( + (getComponentName(Component) || 'Unknown') + + '.getChildContext(): key "' + + contextKey + + '" is not defined in childContextTypes.', + ); + } + } + } + } else { + warningWithoutStack$1( + false, + '%s.getChildContext(): childContextTypes must be defined in order to ' + + 'use getChildContext().', + getComponentName(Component) || 'Unknown', + ); + } + } + + if (childContext) { + context = _assign({}, context, childContext); + } + } + } + + return { + child: child, + context: context, + }; + } + + var ReactDOMServerRenderer = + /*#__PURE__*/ + (function () { + // TODO: type this more strictly: + // DEV-only + function ReactDOMServerRenderer(children, makeStaticMarkup) { + var flatChildren = flattenTopLevelChildren(children); + var topFrame = { + type: null, + // Assume all trees start in the HTML namespace (not totally true, but + // this is what we did historically) + domNamespace: Namespaces.html, + children: flatChildren, + childIndex: 0, + context: emptyObject, + footer: '', + }; + + { + topFrame.debugElementStack = []; + } + + this.threadID = allocThreadID(); + this.stack = [topFrame]; + this.exhausted = false; + this.currentSelectValue = null; + this.previousWasTextNode = false; + this.makeStaticMarkup = makeStaticMarkup; + this.suspenseDepth = 0; // Context (new API) + + this.contextIndex = -1; + this.contextStack = []; + this.contextValueStack = []; + + { + this.contextProviderStack = []; + } + } + + var _proto = ReactDOMServerRenderer.prototype; + + _proto.destroy = function destroy() { + if (!this.exhausted) { + this.exhausted = true; + this.clearProviders(); + freeThreadID(this.threadID); + } + }; + /** + * Note: We use just two stacks regardless of how many context providers you have. + * Providers are always popped in the reverse order to how they were pushed + * so we always know on the way down which provider you'll encounter next on the way up. + * On the way down, we push the current provider, and its context value *before* + * we mutated it, onto the stacks. Therefore, on the way up, we always know which + * provider needs to be "restored" to which value. + * https://github.com/facebook/react/pull/12985#issuecomment-396301248 + */ + + _proto.pushProvider = function pushProvider(provider) { + var index = ++this.contextIndex; + var context = provider.type._context; + var threadID = this.threadID; + validateContextBounds(context, threadID); + var previousValue = context[threadID]; // Remember which value to restore this context to on our way up. + + this.contextStack[index] = context; + this.contextValueStack[index] = previousValue; + + { + // Only used for push/pop mismatch warnings. + this.contextProviderStack[index] = provider; + } // Mutate the current value. + + context[threadID] = provider.props.value; + }; + + _proto.popProvider = function popProvider(provider) { + var index = this.contextIndex; + + { + !(index > -1 && provider === this.contextProviderStack[index]) + ? warningWithoutStack$1(false, 'Unexpected pop.') + : void 0; + } + + var context = this.contextStack[index]; + var previousValue = this.contextValueStack[index]; // "Hide" these null assignments from Flow by using `any` + // because conceptually they are deletions--as long as we + // promise to never access values beyond `this.contextIndex`. + + this.contextStack[index] = null; + this.contextValueStack[index] = null; + + { + this.contextProviderStack[index] = null; + } + + this.contextIndex--; // Restore to the previous value we stored as we were walking down. + // We've already verified that this context has been expanded to accommodate + // this thread id, so we don't need to do it again. + + context[this.threadID] = previousValue; + }; + + _proto.clearProviders = function clearProviders() { + // Restore any remaining providers on the stack to previous values + for (var index = this.contextIndex; index >= 0; index--) { + var context = this.contextStack[index]; + var previousValue = this.contextValueStack[index]; + context[this.threadID] = previousValue; + } + }; + + _proto.read = function read(bytes) { + if (this.exhausted) { + return null; + } + + var prevThreadID = currentThreadID; + setCurrentThreadID(this.threadID); + var prevDispatcher = ReactCurrentDispatcher.current; + ReactCurrentDispatcher.current = Dispatcher; + + try { + // Markup generated within <Suspense> ends up buffered until we know + // nothing in that boundary suspended + var out = ['']; + var suspended = false; + + while (out[0].length < bytes) { + if (this.stack.length === 0) { + this.exhausted = true; + freeThreadID(this.threadID); + break; + } + + var frame = this.stack[this.stack.length - 1]; + + if (suspended || frame.childIndex >= frame.children.length) { + var footer = frame.footer; + + if (footer !== '') { + this.previousWasTextNode = false; + } + + this.stack.pop(); + + if (frame.type === 'select') { + this.currentSelectValue = null; + } else if ( + frame.type != null && + frame.type.type != null && + frame.type.type.$$typeof === REACT_PROVIDER_TYPE + ) { + var provider = frame.type; + this.popProvider(provider); + } else if (frame.type === REACT_SUSPENSE_TYPE) { + this.suspenseDepth--; + var buffered = out.pop(); + + if (suspended) { + suspended = false; // If rendering was suspended at this boundary, render the fallbackFrame + + var fallbackFrame = frame.fallbackFrame; + + if (!fallbackFrame) { + { + throw Error( + 'ReactDOMServer did not find an internal fallback frame for Suspense. This is a bug in React. Please file an issue.', + ); + } + } + + this.stack.push(fallbackFrame); + out[this.suspenseDepth] += '<!--$!-->'; // Skip flushing output since we're switching to the fallback + + continue; + } else { + out[this.suspenseDepth] += buffered; + } + } // Flush output + + out[this.suspenseDepth] += footer; + continue; + } + + var child = frame.children[frame.childIndex++]; + var outBuffer = ''; + + { + pushCurrentDebugStack(this.stack); // We're starting work on this frame, so reset its inner stack. + + frame.debugElementStack.length = 0; + } + + try { + outBuffer += this.render(child, frame.context, frame.domNamespace); + } catch (err) { + if (err != null && typeof err.then === 'function') { + if (enableSuspenseServerRenderer) { + if (!(this.suspenseDepth > 0)) { + { + throw Error( + 'A React component suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.', + ); + } + } + + suspended = true; + } else { + { + { + throw Error('ReactDOMServer does not yet support Suspense.'); + } + } + } + } else { + throw err; + } + } finally { + { + popCurrentDebugStack(); + } + } + + if (out.length <= this.suspenseDepth) { + out.push(''); + } + + out[this.suspenseDepth] += outBuffer; + } + + return out[0]; + } finally { + ReactCurrentDispatcher.current = prevDispatcher; + setCurrentThreadID(prevThreadID); + } + }; + + _proto.render = function render(child, context, parentNamespace) { + if (typeof child === 'string' || typeof child === 'number') { + var text = '' + child; + + if (text === '') { + return ''; + } + + if (this.makeStaticMarkup) { + return escapeTextForBrowser(text); + } + + if (this.previousWasTextNode) { + return '<!-- -->' + escapeTextForBrowser(text); + } + + this.previousWasTextNode = true; + return escapeTextForBrowser(text); + } else { + var nextChild; + + var _resolve = resolve(child, context, this.threadID); + + nextChild = _resolve.child; + context = _resolve.context; + + if (nextChild === null || nextChild === false) { + return ''; + } else if (!React.isValidElement(nextChild)) { + if (nextChild != null && nextChild.$$typeof != null) { + // Catch unexpected special types early. + var $$typeof = nextChild.$$typeof; + + if (!($$typeof !== REACT_PORTAL_TYPE)) { + { + throw Error( + 'Portals are not currently supported by the server renderer. Render them conditionally so that they only appear on the client render.', + ); + } + } // Catch-all to prevent an infinite loop if React.Children.toArray() supports some new type. + + { + { + throw Error( + 'Unknown element-like object type: ' + + $$typeof.toString() + + '. This is likely a bug in React. Please file an issue.', + ); + } + } + } + + var nextChildren = toArray(nextChild); + var frame = { + type: null, + domNamespace: parentNamespace, + children: nextChildren, + childIndex: 0, + context: context, + footer: '', + }; + + { + frame.debugElementStack = []; + } + + this.stack.push(frame); + return ''; + } // Safe because we just checked it's an element. + + var nextElement = nextChild; + var elementType = nextElement.type; + + if (typeof elementType === 'string') { + return this.renderDOM(nextElement, context, parentNamespace); + } + + switch (elementType) { + case REACT_STRICT_MODE_TYPE: + case REACT_CONCURRENT_MODE_TYPE: + case REACT_PROFILER_TYPE: + case REACT_SUSPENSE_LIST_TYPE: + case REACT_FRAGMENT_TYPE: { + var _nextChildren = toArray(nextChild.props.children); + + var _frame = { + type: null, + domNamespace: parentNamespace, + children: _nextChildren, + childIndex: 0, + context: context, + footer: '', + }; + + { + _frame.debugElementStack = []; + } + + this.stack.push(_frame); + return ''; + } + + case REACT_SUSPENSE_TYPE: { + if (enableSuspenseServerRenderer) { + var fallback = nextChild.props.fallback; + + if (fallback === undefined) { + // If there is no fallback, then this just behaves as a fragment. + var _nextChildren3 = toArray(nextChild.props.children); + + var _frame3 = { + type: null, + domNamespace: parentNamespace, + children: _nextChildren3, + childIndex: 0, + context: context, + footer: '', + }; + + { + _frame3.debugElementStack = []; + } + + this.stack.push(_frame3); + return ''; + } + + var fallbackChildren = toArray(fallback); + + var _nextChildren2 = toArray(nextChild.props.children); + + var fallbackFrame = { + type: null, + domNamespace: parentNamespace, + children: fallbackChildren, + childIndex: 0, + context: context, + footer: '<!--/$-->', + }; + var _frame2 = { + fallbackFrame: fallbackFrame, + type: REACT_SUSPENSE_TYPE, + domNamespace: parentNamespace, + children: _nextChildren2, + childIndex: 0, + context: context, + footer: '<!--/$-->', + }; + + { + _frame2.debugElementStack = []; + fallbackFrame.debugElementStack = []; + } + + this.stack.push(_frame2); + this.suspenseDepth++; + return '<!--$-->'; + } else { + { + { + throw Error('ReactDOMServer does not yet support Suspense.'); + } + } + } + } + // eslint-disable-next-line-no-fallthrough + + default: + break; + } + + if (typeof elementType === 'object' && elementType !== null) { + switch (elementType.$$typeof) { + case REACT_FORWARD_REF_TYPE: { + var element = nextChild; + + var _nextChildren4; + + var componentIdentity = {}; + prepareToUseHooks(componentIdentity); + _nextChildren4 = elementType.render(element.props, element.ref); + _nextChildren4 = finishHooks( + elementType.render, + element.props, + _nextChildren4, + element.ref, + ); + _nextChildren4 = toArray(_nextChildren4); + var _frame4 = { + type: null, + domNamespace: parentNamespace, + children: _nextChildren4, + childIndex: 0, + context: context, + footer: '', + }; + + { + _frame4.debugElementStack = []; + } + + this.stack.push(_frame4); + return ''; + } + + case REACT_MEMO_TYPE: { + var _element = nextChild; + var _nextChildren5 = [ + React.createElement( + elementType.type, + _assign( + { + ref: _element.ref, + }, + _element.props, + ), + ), + ]; + var _frame5 = { + type: null, + domNamespace: parentNamespace, + children: _nextChildren5, + childIndex: 0, + context: context, + footer: '', + }; + + { + _frame5.debugElementStack = []; + } + + this.stack.push(_frame5); + return ''; + } + + case REACT_PROVIDER_TYPE: { + var provider = nextChild; + var nextProps = provider.props; + + var _nextChildren6 = toArray(nextProps.children); + + var _frame6 = { + type: provider, + domNamespace: parentNamespace, + children: _nextChildren6, + childIndex: 0, + context: context, + footer: '', + }; + + { + _frame6.debugElementStack = []; + } + + this.pushProvider(provider); + this.stack.push(_frame6); + return ''; + } + + case REACT_CONTEXT_TYPE: { + var reactContext = nextChild.type; // The logic below for Context differs depending on PROD or DEV mode. In + // DEV mode, we create a separate object for Context.Consumer that acts + // like a proxy to Context. This proxy object adds unnecessary code in PROD + // so we use the old behaviour (Context.Consumer references Context) to + // reduce size and overhead. The separate object references context via + // a property called "_context", which also gives us the ability to check + // in DEV mode if this property exists or not and warn if it does not. + + { + if (reactContext._context === undefined) { + // This may be because it's a Context (rather than a Consumer). + // Or it may be because it's older React where they're the same thing. + // We only want to warn if we're sure it's a new React. + if (reactContext !== reactContext.Consumer) { + if (!hasWarnedAboutUsingContextAsConsumer) { + hasWarnedAboutUsingContextAsConsumer = true; + warning$1( + false, + 'Rendering <Context> directly is not supported and will be removed in ' + + 'a future major release. Did you mean to render <Context.Consumer> instead?', + ); + } + } + } else { + reactContext = reactContext._context; + } + } + + var _nextProps = nextChild.props; + var threadID = this.threadID; + validateContextBounds(reactContext, threadID); + var nextValue = reactContext[threadID]; + + var _nextChildren7 = toArray(_nextProps.children(nextValue)); + + var _frame7 = { + type: nextChild, + domNamespace: parentNamespace, + children: _nextChildren7, + childIndex: 0, + context: context, + footer: '', + }; + + { + _frame7.debugElementStack = []; + } + + this.stack.push(_frame7); + return ''; + } + // eslint-disable-next-line-no-fallthrough + + case REACT_FUNDAMENTAL_TYPE: { + if (enableFundamentalAPI) { + var fundamentalImpl = elementType.impl; + var open = fundamentalImpl.getServerSideString(null, nextElement.props); + var getServerSideStringClose = fundamentalImpl.getServerSideStringClose; + var close = + getServerSideStringClose !== undefined + ? getServerSideStringClose(null, nextElement.props) + : ''; + + var _nextChildren8 = + fundamentalImpl.reconcileChildren !== false + ? toArray(nextChild.props.children) + : []; + + var _frame8 = { + type: null, + domNamespace: parentNamespace, + children: _nextChildren8, + childIndex: 0, + context: context, + footer: close, + }; + + { + _frame8.debugElementStack = []; + } + + this.stack.push(_frame8); + return open; + } + + { + { + throw Error('ReactDOMServer does not yet support the fundamental API.'); + } + } + } + // eslint-disable-next-line-no-fallthrough + + case REACT_LAZY_TYPE: { + var _element2 = nextChild; + var lazyComponent = nextChild.type; // Attempt to initialize lazy component regardless of whether the + // suspense server-side renderer is enabled so synchronously + // resolved constructors are supported. + + initializeLazyComponentType(lazyComponent); + + switch (lazyComponent._status) { + case Resolved: { + var _nextChildren9 = [ + React.createElement( + lazyComponent._result, + _assign( + { + ref: _element2.ref, + }, + _element2.props, + ), + ), + ]; + var _frame9 = { + type: null, + domNamespace: parentNamespace, + children: _nextChildren9, + childIndex: 0, + context: context, + footer: '', + }; + + { + _frame9.debugElementStack = []; + } + + this.stack.push(_frame9); + return ''; + } + + case Rejected: + throw lazyComponent._result; + + case Pending: + default: { + { + throw Error('ReactDOMServer does not yet support lazy-loaded components.'); + } + } + } + } + // eslint-disable-next-line-no-fallthrough + + case REACT_SCOPE_TYPE: { + if (enableScopeAPI) { + var _nextChildren10 = toArray(nextChild.props.children); + + var _frame10 = { + type: null, + domNamespace: parentNamespace, + children: _nextChildren10, + childIndex: 0, + context: context, + footer: '', + }; + + { + _frame10.debugElementStack = []; + } + + this.stack.push(_frame10); + return ''; + } + + { + { + throw Error('ReactDOMServer does not yet support scope components.'); + } + } + } + } + } + + var info = ''; + + { + var owner = nextElement._owner; + + if ( + elementType === undefined || + (typeof elementType === 'object' && + elementType !== null && + Object.keys(elementType).length === 0) + ) { + info += + ' You likely forgot to export your component from the file ' + + "it's defined in, or you might have mixed up default and " + + 'named imports.'; + } + + var ownerName = owner ? getComponentName(owner) : null; + + if (ownerName) { + info += '\n\nCheck the render method of `' + ownerName + '`.'; + } + } + + { + { + throw Error( + 'Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: ' + + (elementType == null ? elementType : typeof elementType) + + '.' + + info, + ); + } + } + } + }; + + _proto.renderDOM = function renderDOM(element, context, parentNamespace) { + var tag = element.type.toLowerCase(); + var namespace = parentNamespace; + + if (parentNamespace === Namespaces.html) { + namespace = getIntrinsicNamespace(tag); + } + + { + if (namespace === Namespaces.html) { + // Should this check be gated by parent namespace? Not sure we want to + // allow <SVG> or <mATH>. + !(tag === element.type) + ? warning$1( + false, + '<%s /> is using incorrect casing. ' + + 'Use PascalCase for React components, ' + + 'or lowercase for HTML elements.', + element.type, + ) + : void 0; + } + } + + validateDangerousTag(tag); + var props = element.props; + + if (tag === 'input') { + { + ReactControlledValuePropTypes.checkPropTypes('input', props); + + if ( + props.checked !== undefined && + props.defaultChecked !== undefined && + !didWarnDefaultChecked + ) { + warning$1( + false, + '%s contains an input of type %s with both checked and defaultChecked props. ' + + 'Input elements must be either controlled or uncontrolled ' + + '(specify either the checked prop, or the defaultChecked prop, but not ' + + 'both). Decide between using a controlled or uncontrolled input ' + + 'element and remove one of these props. More info: ' + + 'https://fb.me/react-controlled-components', + 'A component', + props.type, + ); + didWarnDefaultChecked = true; + } + + if ( + props.value !== undefined && + props.defaultValue !== undefined && + !didWarnDefaultInputValue + ) { + warning$1( + false, + '%s contains an input of type %s with both value and defaultValue props. ' + + 'Input elements must be either controlled or uncontrolled ' + + '(specify either the value prop, or the defaultValue prop, but not ' + + 'both). Decide between using a controlled or uncontrolled input ' + + 'element and remove one of these props. More info: ' + + 'https://fb.me/react-controlled-components', + 'A component', + props.type, + ); + didWarnDefaultInputValue = true; + } + } + + props = _assign( + { + type: undefined, + }, + props, + { + defaultChecked: undefined, + defaultValue: undefined, + value: props.value != null ? props.value : props.defaultValue, + checked: props.checked != null ? props.checked : props.defaultChecked, + }, + ); + } else if (tag === 'textarea') { + { + ReactControlledValuePropTypes.checkPropTypes('textarea', props); + + if ( + props.value !== undefined && + props.defaultValue !== undefined && + !didWarnDefaultTextareaValue + ) { + warning$1( + false, + 'Textarea elements must be either controlled or uncontrolled ' + + '(specify either the value prop, or the defaultValue prop, but not ' + + 'both). Decide between using a controlled or uncontrolled textarea ' + + 'and remove one of these props. More info: ' + + 'https://fb.me/react-controlled-components', + ); + didWarnDefaultTextareaValue = true; + } + } + + var initialValue = props.value; + + if (initialValue == null) { + var defaultValue = props.defaultValue; // TODO (yungsters): Remove support for children content in <textarea>. + + var textareaChildren = props.children; + + if (textareaChildren != null) { + { + warning$1( + false, + 'Use the `defaultValue` or `value` props instead of setting ' + + 'children on <textarea>.', + ); + } + + if (!(defaultValue == null)) { + { + throw Error('If you supply `defaultValue` on a <textarea>, do not pass children.'); + } + } + + if (Array.isArray(textareaChildren)) { + if (!(textareaChildren.length <= 1)) { + { + throw Error('<textarea> can only have at most one child.'); + } + } + + textareaChildren = textareaChildren[0]; + } + + defaultValue = '' + textareaChildren; + } + + if (defaultValue == null) { + defaultValue = ''; + } + + initialValue = defaultValue; + } + + props = _assign({}, props, { + value: undefined, + children: '' + initialValue, + }); + } else if (tag === 'select') { + { + ReactControlledValuePropTypes.checkPropTypes('select', props); + + for (var i = 0; i < valuePropNames.length; i++) { + var propName = valuePropNames[i]; + + if (props[propName] == null) { + continue; + } + + var isArray = Array.isArray(props[propName]); + + if (props.multiple && !isArray) { + warning$1( + false, + 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.', + propName, + ); + } else if (!props.multiple && isArray) { + warning$1( + false, + 'The `%s` prop supplied to <select> must be a scalar ' + + 'value if `multiple` is false.', + propName, + ); + } + } + + if ( + props.value !== undefined && + props.defaultValue !== undefined && + !didWarnDefaultSelectValue + ) { + warning$1( + false, + 'Select elements must be either controlled or uncontrolled ' + + '(specify either the value prop, or the defaultValue prop, but not ' + + 'both). Decide between using a controlled or uncontrolled select ' + + 'element and remove one of these props. More info: ' + + 'https://fb.me/react-controlled-components', + ); + didWarnDefaultSelectValue = true; + } + } + + this.currentSelectValue = props.value != null ? props.value : props.defaultValue; + props = _assign({}, props, { + value: undefined, + }); + } else if (tag === 'option') { + var selected = null; + var selectValue = this.currentSelectValue; + var optionChildren = flattenOptionChildren(props.children); + + if (selectValue != null) { + var value; + + if (props.value != null) { + value = props.value + ''; + } else { + value = optionChildren; + } + + selected = false; + + if (Array.isArray(selectValue)) { + // multiple + for (var j = 0; j < selectValue.length; j++) { + if ('' + selectValue[j] === value) { + selected = true; + break; + } + } + } else { + selected = '' + selectValue === value; + } + + props = _assign( + { + selected: undefined, + children: undefined, + }, + props, + { + selected: selected, + children: optionChildren, + }, + ); + } + } + + { + validatePropertiesInDevelopment(tag, props); + } + + assertValidProps(tag, props); + var out = createOpenTagMarkup( + element.type, + tag, + props, + namespace, + this.makeStaticMarkup, + this.stack.length === 1, + ); + var footer = ''; + + if (omittedCloseTags.hasOwnProperty(tag)) { + out += '/>'; + } else { + out += '>'; + footer = '</' + element.type + '>'; + } + + var children; + var innerMarkup = getNonChildrenInnerMarkup(props); + + if (innerMarkup != null) { + children = []; + + if (newlineEatingTags[tag] && innerMarkup.charAt(0) === '\n') { + // text/html ignores the first character in these tags if it's a newline + // Prefer to break application/xml over text/html (for now) by adding + // a newline specifically to get eaten by the parser. (Alternately for + // textareas, replacing "^\n" with "\r\n" doesn't get eaten, and the first + // \r is normalized out by HTMLTextAreaElement#value.) + // See: <http://www.w3.org/TR/html-polyglot/#newlines-in-textarea-and-pre> + // See: <http://www.w3.org/TR/html5/syntax.html#element-restrictions> + // See: <http://www.w3.org/TR/html5/syntax.html#newlines> + // See: Parsing of "textarea" "listing" and "pre" elements + // from <http://www.w3.org/TR/html5/syntax.html#parsing-main-inbody> + out += '\n'; + } + + out += innerMarkup; + } else { + children = toArray(props.children); + } + + var frame = { + domNamespace: getChildNamespace(parentNamespace, element.type), + type: tag, + children: children, + childIndex: 0, + context: context, + footer: footer, + }; + + { + frame.debugElementStack = []; + } + + this.stack.push(frame); + this.previousWasTextNode = false; + return out; + }; + + return ReactDOMServerRenderer; + })(); + + /** + * Render a ReactElement to its initial HTML. This should only be used on the + * server. + * See https://reactjs.org/docs/react-dom-server.html#rendertostring + */ + + function renderToString(element) { + var renderer = new ReactDOMServerRenderer(element, false); + + try { + var markup = renderer.read(Infinity); + return markup; + } finally { + renderer.destroy(); + } + } + /** + * Similar to renderToString, except this doesn't create extra DOM attributes + * such as data-react-id that React uses internally. + * See https://reactjs.org/docs/react-dom-server.html#rendertostaticmarkup + */ + + function renderToStaticMarkup(element) { + var renderer = new ReactDOMServerRenderer(element, true); + + try { + var markup = renderer.read(Infinity); + return markup; + } finally { + renderer.destroy(); + } + } + + function _inheritsLoose(subClass, superClass) { + subClass.prototype = Object.create(superClass.prototype); + subClass.prototype.constructor = subClass; + subClass.__proto__ = superClass; + } + + var ReactMarkupReadableStream = + /*#__PURE__*/ + (function (_Readable) { + _inheritsLoose(ReactMarkupReadableStream, _Readable); + + function ReactMarkupReadableStream(element, makeStaticMarkup) { + var _this; + + // Calls the stream.Readable(options) constructor. Consider exposing built-in + // features like highWaterMark in the future. + _this = _Readable.call(this, {}) || this; + _this.partialRenderer = new ReactDOMServerRenderer(element, makeStaticMarkup); + return _this; + } + + var _proto = ReactMarkupReadableStream.prototype; + + _proto._destroy = function _destroy(err, callback) { + this.partialRenderer.destroy(); + callback(err); + }; + + _proto._read = function _read(size) { + try { + this.push(this.partialRenderer.read(size)); + } catch (err) { + this.destroy(err); + } + }; + + return ReactMarkupReadableStream; + })(stream.Readable); + /** + * Render a ReactElement to its initial HTML. This should only be used on the + * server. + * See https://reactjs.org/docs/react-dom-server.html#rendertonodestream + */ + + function renderToNodeStream(element) { + return new ReactMarkupReadableStream(element, false); + } + /** + * Similar to renderToNodeStream, except this doesn't create extra DOM attributes + * such as data-react-id that React uses internally. + * See https://reactjs.org/docs/react-dom-server.html#rendertostaticnodestream + */ + + function renderToStaticNodeStream(element) { + return new ReactMarkupReadableStream(element, true); + } + + var ReactDOMServerNode = { + renderToString: renderToString, + renderToStaticMarkup: renderToStaticMarkup, + renderToNodeStream: renderToNodeStream, + renderToStaticNodeStream: renderToStaticNodeStream, + version: ReactVersion, + }; + + var ReactDOMServerNode$1 = Object.freeze({ + default: ReactDOMServerNode, + }); + + var ReactDOMServer = (ReactDOMServerNode$1 && ReactDOMServerNode) || ReactDOMServerNode$1; + + // TODO: decide on the top-level export form. + // This is hacky but makes it work with both Rollup and Jest + + var server_node = ReactDOMServer.default || ReactDOMServer; + + module.exports = server_node; + })(); + } + + /***/ + }, + /* 519 */ + /***/ function (module, exports) { + module.exports = require('stream'); + + /***/ + }, + /* 520 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(143); + __webpack_require__(521); + module.exports = __webpack_require__(13).Array.from; + + /***/ + }, + /* 521 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var ctx = __webpack_require__(68); + var $export = __webpack_require__(36); + var toObject = __webpack_require__(69); + var call = __webpack_require__(221); + var isArrayIter = __webpack_require__(222); + var toLength = __webpack_require__(102); + var createProperty = __webpack_require__(522); + var getIterFn = __webpack_require__(223); + + $export( + $export.S + + $export.F * + !__webpack_require__(523)(function (iter) { + Array.from(iter); + }), + 'Array', + { + // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined) + from: function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) { + var O = toObject(arrayLike); + var C = typeof this == 'function' ? this : Array; + var aLen = arguments.length; + var mapfn = aLen > 1 ? arguments[1] : undefined; + var mapping = mapfn !== undefined; + var index = 0; + var iterFn = getIterFn(O); + var length, result, step, iterator; + if (mapping) mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2); + // if object isn't iterable or it's array with default iterator - use simple case + if (iterFn != undefined && !(C == Array && isArrayIter(iterFn))) { + for (iterator = iterFn.call(O), result = new C(); !(step = iterator.next()).done; index++) { + createProperty( + result, + index, + mapping ? call(iterator, mapfn, [step.value, index], true) : step.value, + ); + } + } else { + length = toLength(O.length); + for (result = new C(length); length > index; index++) { + createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]); + } + } + result.length = index; + return result; + }, + }, + ); + + /***/ + }, + /* 522 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $defineProperty = __webpack_require__(30); + var createDesc = __webpack_require__(78); + + module.exports = function (object, index, value) { + if (index in object) $defineProperty.f(object, index, createDesc(0, value)); + else object[index] = value; + }; + + /***/ + }, + /* 523 */ + /***/ function (module, exports, __webpack_require__) { + var ITERATOR = __webpack_require__(22)('iterator'); + var SAFE_CLOSING = false; + + try { + var riter = [7][ITERATOR](); + riter['return'] = function () { + SAFE_CLOSING = true; + }; + // eslint-disable-next-line no-throw-literal + Array.from(riter, function () { + throw 2; + }); + } catch (e) { + /* empty */ + } + + module.exports = function (exec, skipClosing) { + if (!skipClosing && !SAFE_CLOSING) return false; + var safe = false; + try { + var arr = [7]; + var iter = arr[ITERATOR](); + iter.next = function () { + return { done: (safe = true) }; + }; + arr[ITERATOR] = function () { + return iter; + }; + exec(arr); + } catch (e) { + /* empty */ + } + return safe; + }; + + /***/ + }, + /* 524 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(155); + __webpack_require__(143); + __webpack_require__(151); + __webpack_require__(525); + __webpack_require__(528); + __webpack_require__(531); + __webpack_require__(532); + module.exports = __webpack_require__(13).Map; + + /***/ + }, + /* 525 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var strong = __webpack_require__(526); + var validate = __webpack_require__(83); + var MAP = 'Map'; + + // 23.1 Map Objects + module.exports = __webpack_require__(225)( + MAP, + function (get) { + return function Map() { + return get(this, arguments.length > 0 ? arguments[0] : undefined); + }; + }, + { + // 23.1.3.6 Map.prototype.get(key) + get: function get(key) { + var entry = strong.getEntry(validate(this, MAP), key); + return entry && entry.v; + }, + // 23.1.3.9 Map.prototype.set(key, value) + set: function set(key, value) { + return strong.def(validate(this, MAP), key === 0 ? 0 : key, value); + }, + }, + strong, + true, + ); + + /***/ + }, + /* 526 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var dP = __webpack_require__(30).f; + var create = __webpack_require__(147); + var redefineAll = __webpack_require__(157); + var ctx = __webpack_require__(68); + var anInstance = __webpack_require__(158); + var forOf = __webpack_require__(82); + var $iterDefine = __webpack_require__(145); + var step = __webpack_require__(217); + var setSpecies = __webpack_require__(527); + var DESCRIPTORS = __webpack_require__(28); + var fastKey = __webpack_require__(81).fastKey; + var validate = __webpack_require__(83); + var SIZE = DESCRIPTORS ? '_s' : 'size'; + + var getEntry = function (that, key) { + // fast case + var index = fastKey(key); + var entry; + if (index !== 'F') return that._i[index]; + // frozen object case + for (entry = that._f; entry; entry = entry.n) { + if (entry.k == key) return entry; + } + }; + + module.exports = { + getConstructor: function (wrapper, NAME, IS_MAP, ADDER) { + var C = wrapper(function (that, iterable) { + anInstance(that, C, NAME, '_i'); + that._t = NAME; // collection type + that._i = create(null); // index + that._f = undefined; // first entry + that._l = undefined; // last entry + that[SIZE] = 0; // size + if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that); + }); + redefineAll(C.prototype, { + // 23.1.3.1 Map.prototype.clear() + // 23.2.3.2 Set.prototype.clear() + clear: function clear() { + for (var that = validate(this, NAME), data = that._i, entry = that._f; entry; entry = entry.n) { + entry.r = true; + if (entry.p) entry.p = entry.p.n = undefined; + delete data[entry.i]; + } + that._f = that._l = undefined; + that[SIZE] = 0; + }, + // 23.1.3.3 Map.prototype.delete(key) + // 23.2.3.4 Set.prototype.delete(value) + delete: function (key) { + var that = validate(this, NAME); + var entry = getEntry(that, key); + if (entry) { + var next = entry.n; + var prev = entry.p; + delete that._i[entry.i]; + entry.r = true; + if (prev) prev.n = next; + if (next) next.p = prev; + if (that._f == entry) that._f = next; + if (that._l == entry) that._l = prev; + that[SIZE]--; + } + return !!entry; + }, + // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined) + // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined) + forEach: function forEach(callbackfn /* , that = undefined */) { + validate(this, NAME); + var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3); + var entry; + while ((entry = entry ? entry.n : this._f)) { + f(entry.v, entry.k, this); + // revert to the last existing entry + while (entry && entry.r) entry = entry.p; + } + }, + // 23.1.3.7 Map.prototype.has(key) + // 23.2.3.7 Set.prototype.has(value) + has: function has(key) { + return !!getEntry(validate(this, NAME), key); + }, + }); + if (DESCRIPTORS) + dP(C.prototype, 'size', { + get: function () { + return validate(this, NAME)[SIZE]; + }, + }); + return C; + }, + def: function (that, key, value) { + var entry = getEntry(that, key); + var prev, index; + // change existing entry + if (entry) { + entry.v = value; + // create new entry + } else { + that._l = entry = { + i: (index = fastKey(key, true)), // <- index + k: key, // <- key + v: value, // <- value + p: (prev = that._l), // <- previous entry + n: undefined, // <- next entry + r: false, // <- removed + }; + if (!that._f) that._f = entry; + if (prev) prev.n = entry; + that[SIZE]++; + // add to index + if (index !== 'F') that._i[index] = entry; + } + return that; + }, + getEntry: getEntry, + setStrong: function (C, NAME, IS_MAP) { + // add .keys, .values, .entries, [@@iterator] + // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11 + $iterDefine( + C, + NAME, + function (iterated, kind) { + this._t = validate(iterated, NAME); // target + this._k = kind; // kind + this._l = undefined; // previous + }, + function () { + var that = this; + var kind = that._k; + var entry = that._l; + // revert to the last existing entry + while (entry && entry.r) entry = entry.p; + // get next entry + if (!that._t || !(that._l = entry = entry ? entry.n : that._t._f)) { + // or finish the iteration + that._t = undefined; + return step(1); + } + // return step by kind + if (kind == 'keys') return step(0, entry.k); + if (kind == 'values') return step(0, entry.v); + return step(0, [entry.k, entry.v]); + }, + IS_MAP ? 'entries' : 'values', + !IS_MAP, + true, + ); + + // add [@@species], 23.1.2.2, 23.2.2.2 + setSpecies(NAME); + }, + }; + + /***/ + }, + /* 527 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var global = __webpack_require__(29); + var core = __webpack_require__(13); + var dP = __webpack_require__(30); + var DESCRIPTORS = __webpack_require__(28); + var SPECIES = __webpack_require__(22)('species'); + + module.exports = function (KEY) { + var C = typeof core[KEY] == 'function' ? core[KEY] : global[KEY]; + if (DESCRIPTORS && C && !C[SPECIES]) + dP.f(C, SPECIES, { + configurable: true, + get: function () { + return this; + }, + }); + }; + + /***/ + }, + /* 528 */ + /***/ function (module, exports, __webpack_require__) { + // https://github.com/DavidBruant/Map-Set.prototype.toJSON + var $export = __webpack_require__(36); + + $export($export.P + $export.R, 'Map', { toJSON: __webpack_require__(529)('Map') }); + + /***/ + }, + /* 529 */ + /***/ function (module, exports, __webpack_require__) { + // https://github.com/DavidBruant/Map-Set.prototype.toJSON + var classof = __webpack_require__(224); + var from = __webpack_require__(530); + module.exports = function (NAME) { + return function toJSON() { + if (classof(this) != NAME) throw TypeError(NAME + "#toJSON isn't generic"); + return from(this); + }; + }; + + /***/ + }, + /* 530 */ + /***/ function (module, exports, __webpack_require__) { + var forOf = __webpack_require__(82); + + module.exports = function (iter, ITERATOR) { + var result = []; + forOf(iter, false, result.push, result, ITERATOR); + return result; + }; + + /***/ + }, + /* 531 */ + /***/ function (module, exports, __webpack_require__) { + // https://tc39.github.io/proposal-setmap-offrom/#sec-map.of + __webpack_require__(226)('Map'); + + /***/ + }, + /* 532 */ + /***/ function (module, exports, __webpack_require__) { + // https://tc39.github.io/proposal-setmap-offrom/#sec-map.from + __webpack_require__(227)('Map'); + + /***/ + }, + /* 533 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.default = generatorFunction; + + // See discussion: + // https://discuss.reactjs.org/t/how-to-determine-if-js-object-is-react-component/2825/2 + + /** + * Used to determine we'll call be calling React.createElement on the component of if this is a + * generator function used return a function that takes props to return a React element + * @param component + * @returns {boolean} + */ + function generatorFunction(component) { + if (!component.prototype) { + return false; + } // es5 or es6 React Component + + return !component.prototype.isReactComponent; + } + + /***/ + }, + /* 534 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var _interopRequireDefault = __webpack_require__(40); + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.default = void 0; + + var _from = _interopRequireDefault(__webpack_require__(234)); + + var _keys = _interopRequireDefault(__webpack_require__(159)); + + var _map = _interopRequireDefault(__webpack_require__(235)); + + // key = name used by react_on_rails to identify the store + // value = redux store creator, which is a function that takes props and returns a store + var registeredStoreGenerators = new _map.default(); + var hydratedStores = new _map.default(); + var _default = { + /** + * Register a store generator, a function that takes props and returns a store. + * @param storeGenerators { name1: storeGenerator1, name2: storeGenerator2 } + */ + register: function register(storeGenerators) { + (0, _keys.default)(storeGenerators).forEach(function (name) { + if (registeredStoreGenerators.has(name)) { + console.warn('Called registerStore for store that is already registered', name); + } + + var store = storeGenerators[name]; + + if (!store) { + throw new Error( + 'Called ReactOnRails.registerStores with a null or undefined as a value ' + + 'for the store generator with key '.concat(name, '.'), + ); + } + + registeredStoreGenerators.set(name, store); + }); + }, + + /** + * Used by components to get the hydrated store which contains props. + * @param name + * @param throwIfMissing Defaults to true. Set to false to have this call return undefined if + * there is no store with the given name. + * @returns Redux Store, possibly hydrated + */ + getStore: function getStore(name) { + var throwIfMissing = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + + if (hydratedStores.has(name)) { + return hydratedStores.get(name); + } + + var storeKeys = (0, _from.default)(hydratedStores.keys()).join(', '); + + if (storeKeys.length === 0) { + var msg = 'There are no stores hydrated and you are requesting the store '.concat( + name, + ".\nThis can happen if you are server rendering and either:\n1. You do not call redux_store near the top of your controller action's view (not the layout)\n and before any call to react_component.\n2. You do not render redux_store_hydration_data anywhere on your page.", + ); + throw new Error(msg); + } + + if (throwIfMissing) { + console.log('storeKeys', storeKeys); + throw new Error( + "Could not find hydrated store with name '".concat(name, "'. ") + + 'Hydrated store names include ['.concat(storeKeys, '].'), + ); + } + + return undefined; + }, + + /** + * Internally used function to get the store creator that was passed to `register`. + * @param name + * @returns storeCreator with given name + */ + getStoreGenerator: function getStoreGenerator(name) { + if (registeredStoreGenerators.has(name)) { + return registeredStoreGenerators.get(name); + } + + var storeKeys = (0, _from.default)(registeredStoreGenerators.keys()).join(', '); + throw new Error( + "Could not find store registered with name '".concat(name, "'. Registered store ") + + 'names include [ '.concat(storeKeys, ' ]. Maybe you forgot to register the store?'), + ); + }, + + /** + * Internally used function to set the hydrated store after a Rails page is loaded. + * @param name + * @param store (not the storeGenerator, but the hydrated store) + */ + setStore: function setStore(name, store) { + hydratedStores.set(name, store); + }, + + /** + * Internally used function to completely clear hydratedStores Map. + */ + clearHydratedStores: function clearHydratedStores() { + hydratedStores.clear(); + }, + + /** + * Get a Map containing all registered store generators. Useful for debugging. + * @returns Map where key is the component name and values are the store generators. + */ + storeGenerators: function storeGenerators() { + return registeredStoreGenerators; + }, + + /** + * Get a Map containing all hydrated stores. Useful for debugging. + * @returns Map where key is the component name and values are the hydrated stores. + */ + stores: function stores() { + return hydratedStores; + }, + }; + exports.default = _default; + + /***/ + }, + /* 535 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var _interopRequireDefault = __webpack_require__(40); + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.default = serverRenderReactComponent; + + var _stringify = _interopRequireDefault(__webpack_require__(105)); + + var _server = _interopRequireDefault(__webpack_require__(107)); + + var _ComponentRegistry = _interopRequireDefault(__webpack_require__(233)); + + var _createReactElement = _interopRequireDefault(__webpack_require__(160)); + + var _isCreateReactElementResultNonReactComponent = _interopRequireDefault(__webpack_require__(231)); + + var _buildConsoleReplay = _interopRequireDefault(__webpack_require__(236)); + + var _handleError = _interopRequireDefault(__webpack_require__(232)); + + function serverRenderReactComponent(options) { + var name = options.name, + domNodeId = options.domNodeId, + trace = options.trace, + props = options.props, + railsContext = options.railsContext; + var htmlResult = ''; + var hasErrors = false; + + try { + var componentObj = _ComponentRegistry.default.get(name); + + if (componentObj.isRenderer) { + throw new Error( + "Detected a renderer while server rendering component '".concat( + name, + "'. See https://github.com/shakacode/react_on_rails#renderer-functions", + ), + ); + } + + var reactElementOrRouterResult = (0, _createReactElement.default)({ + componentObj: componentObj, + domNodeId: domNodeId, + trace: trace, + props: props, + railsContext: railsContext, + }); + + if ((0, _isCreateReactElementResultNonReactComponent.default)(reactElementOrRouterResult)) { + // We let the client side handle any redirect + // Set hasErrors in case we want to throw a Rails exception + hasErrors = !!reactElementOrRouterResult.routeError; + + if (hasErrors) { + console.error( + 'React Router ERROR: '.concat((0, _stringify.default)(reactElementOrRouterResult.routeError)), + ); + } + + if (reactElementOrRouterResult.redirectLocation) { + if (trace) { + var redirectLocation = reactElementOrRouterResult.redirectLocation; + var redirectPath = redirectLocation.pathname + redirectLocation.search; + console.log( + 'ROUTER REDIRECT: ' + .concat(name, ' to dom node with id: ') + .concat(domNodeId, ', redirect to ') + .concat(redirectPath), + ); + } // For redirects on server rendering, we can't stop Rails from returning the same result. + // Possibly, someday, we could have the rails server redirect. + } else { + htmlResult = reactElementOrRouterResult.renderedHtml; + } + } else { + htmlResult = _server.default.renderToString(reactElementOrRouterResult); + } + } catch (e) { + hasErrors = true; + htmlResult = (0, _handleError.default)({ + e: e, + name: name, + serverSide: true, + }); + } + + var consoleReplayScript = (0, _buildConsoleReplay.default)(); + return (0, _stringify.default)({ + html: htmlResult, + consoleReplayScript: consoleReplayScript, + hasErrors: hasErrors, + }); + } + + /***/ + }, + /* 536 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.default = void 0; + var _default = { + wrapInScriptTags: function wrapInScriptTags(scriptId, scriptBody) { + if (!scriptBody) { + return ''; + } + + return '\n<script id="'.concat(scriptId, '">\n').concat(scriptBody, '\n</script>'); + }, + }; + exports.default = _default; + + /***/ + }, + /* 537 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.default = void 0; + + var _default = function _default(val) { + // Replace closing + var re = /<\/\W*script/gi; + return val.replace(re, '(/script'); + }; + + exports.default = _default; + + /***/ + }, + /* 538 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var _interopRequireDefault = __webpack_require__(40); + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.default = void 0; + + var _assign = _interopRequireDefault(__webpack_require__(228)); + + var _default = { + authenticityToken: function authenticityToken() { + var token = document.querySelector('meta[name="csrf-token"]'); + + if (token && token instanceof window.HTMLMetaElement) { + return token.content; + } + + return null; + }, + authenticityHeaders: function authenticityHeaders() { + var otherHeaders = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + return (0, _assign.default)(otherHeaders, { + 'X-CSRF-Token': this.authenticityToken(), + 'X-Requested-With': 'XMLHttpRequest', + }); + }, + }; + exports.default = _default; + + /***/ + }, + /* 539 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.default = context; + + /** + * Get the context, be it window or global + * @returns {boolean|Window|*|context} + */ + function context() { + return (typeof window !== 'undefined' && window) || (typeof global !== 'undefined' && global) || this; + } + + /***/ + }, + /* 540 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + // Super simple example without using React. + // This shows you can server side render any JS code. + + var HelloString = { + world: function world() { + return 'Hello WORLD! Will this work?? YES! Time to visit Maui'; + }, + }; + + var _default = HelloString; + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + HelloString, + 'HelloString', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/non_react/HelloString.js', + ); + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/non_react/HelloString.js', + ); + })(); + + /***/ + }, + /* 541 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** @license React v16.12.0 + * react-is.development.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + + if (true) { + (function () { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { value: true }); + + // The Symbol used to tag the ReactElement-like types. If there is no native Symbol + // nor polyfill, then a plain number is used for performance. + var hasSymbol = typeof Symbol === 'function' && Symbol.for; + var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7; + var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca; + var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb; + var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc; + var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2; + var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd; + var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary + // (unstable) APIs that have been removed. Can we remove the symbols? + + var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf; + var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf; + var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0; + var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1; + var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8; + var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3; + var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4; + var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5; + var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6; + var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7; + + function isValidElementType(type) { + return ( + typeof type === 'string' || + typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill. + type === REACT_FRAGMENT_TYPE || + type === REACT_CONCURRENT_MODE_TYPE || + type === REACT_PROFILER_TYPE || + type === REACT_STRICT_MODE_TYPE || + type === REACT_SUSPENSE_TYPE || + type === REACT_SUSPENSE_LIST_TYPE || + (typeof type === 'object' && + type !== null && + (type.$$typeof === REACT_LAZY_TYPE || + type.$$typeof === REACT_MEMO_TYPE || + type.$$typeof === REACT_PROVIDER_TYPE || + type.$$typeof === REACT_CONTEXT_TYPE || + type.$$typeof === REACT_FORWARD_REF_TYPE || + type.$$typeof === REACT_FUNDAMENTAL_TYPE || + type.$$typeof === REACT_RESPONDER_TYPE || + type.$$typeof === REACT_SCOPE_TYPE)) + ); + } + + /** + * Forked from fbjs/warning: + * https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js + * + * Only change is we use console.warn instead of console.error, + * and do nothing when 'console' is not supported. + * This really simplifies the code. + * --- + * Similar to invariant but only logs a warning if the condition is not met. + * This can be used to log issues in development environments in critical + * paths. Removing the logging code for production environments will keep the + * same logic and follow the same code paths. + */ + var lowPriorityWarningWithoutStack = function () {}; + + { + var printWarning = function (format) { + for ( + var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; + _key < _len; + _key++ + ) { + args[_key - 1] = arguments[_key]; + } + + var argIndex = 0; + var message = + 'Warning: ' + + format.replace(/%s/g, function () { + return args[argIndex++]; + }); + + if (typeof console !== 'undefined') { + console.warn(message); + } + + try { + // --- Welcome to debugging React --- + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + throw new Error(message); + } catch (x) {} + }; + + lowPriorityWarningWithoutStack = function (condition, format) { + if (format === undefined) { + throw new Error( + '`lowPriorityWarningWithoutStack(condition, format, ...args)` requires a warning ' + + 'message argument', + ); + } + + if (!condition) { + for ( + var _len2 = arguments.length, args = new Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; + _key2 < _len2; + _key2++ + ) { + args[_key2 - 2] = arguments[_key2]; + } + + printWarning.apply(void 0, [format].concat(args)); + } + }; + } + + var lowPriorityWarningWithoutStack$1 = lowPriorityWarningWithoutStack; + + function typeOf(object) { + if (typeof object === 'object' && object !== null) { + var $$typeof = object.$$typeof; + + switch ($$typeof) { + case REACT_ELEMENT_TYPE: + var type = object.type; + + switch (type) { + case REACT_ASYNC_MODE_TYPE: + case REACT_CONCURRENT_MODE_TYPE: + case REACT_FRAGMENT_TYPE: + case REACT_PROFILER_TYPE: + case REACT_STRICT_MODE_TYPE: + case REACT_SUSPENSE_TYPE: + return type; + + default: + var $$typeofType = type && type.$$typeof; + + switch ($$typeofType) { + case REACT_CONTEXT_TYPE: + case REACT_FORWARD_REF_TYPE: + case REACT_LAZY_TYPE: + case REACT_MEMO_TYPE: + case REACT_PROVIDER_TYPE: + return $$typeofType; + + default: + return $$typeof; + } + } + + case REACT_PORTAL_TYPE: + return $$typeof; + } + } + + return undefined; + } // AsyncMode is deprecated along with isAsyncMode + + var AsyncMode = REACT_ASYNC_MODE_TYPE; + var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE; + var ContextConsumer = REACT_CONTEXT_TYPE; + var ContextProvider = REACT_PROVIDER_TYPE; + var Element = REACT_ELEMENT_TYPE; + var ForwardRef = REACT_FORWARD_REF_TYPE; + var Fragment = REACT_FRAGMENT_TYPE; + var Lazy = REACT_LAZY_TYPE; + var Memo = REACT_MEMO_TYPE; + var Portal = REACT_PORTAL_TYPE; + var Profiler = REACT_PROFILER_TYPE; + var StrictMode = REACT_STRICT_MODE_TYPE; + var Suspense = REACT_SUSPENSE_TYPE; + var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated + + function isAsyncMode(object) { + { + if (!hasWarnedAboutDeprecatedIsAsyncMode) { + hasWarnedAboutDeprecatedIsAsyncMode = true; + lowPriorityWarningWithoutStack$1( + false, + 'The ReactIs.isAsyncMode() alias has been deprecated, ' + + 'and will be removed in React 17+. Update your code to use ' + + 'ReactIs.isConcurrentMode() instead. It has the exact same API.', + ); + } + } + + return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE; + } + function isConcurrentMode(object) { + return typeOf(object) === REACT_CONCURRENT_MODE_TYPE; + } + function isContextConsumer(object) { + return typeOf(object) === REACT_CONTEXT_TYPE; + } + function isContextProvider(object) { + return typeOf(object) === REACT_PROVIDER_TYPE; + } + function isElement(object) { + return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; + } + function isForwardRef(object) { + return typeOf(object) === REACT_FORWARD_REF_TYPE; + } + function isFragment(object) { + return typeOf(object) === REACT_FRAGMENT_TYPE; + } + function isLazy(object) { + return typeOf(object) === REACT_LAZY_TYPE; + } + function isMemo(object) { + return typeOf(object) === REACT_MEMO_TYPE; + } + function isPortal(object) { + return typeOf(object) === REACT_PORTAL_TYPE; + } + function isProfiler(object) { + return typeOf(object) === REACT_PROFILER_TYPE; + } + function isStrictMode(object) { + return typeOf(object) === REACT_STRICT_MODE_TYPE; + } + function isSuspense(object) { + return typeOf(object) === REACT_SUSPENSE_TYPE; + } + + exports.typeOf = typeOf; + exports.AsyncMode = AsyncMode; + exports.ConcurrentMode = ConcurrentMode; + exports.ContextConsumer = ContextConsumer; + exports.ContextProvider = ContextProvider; + exports.Element = Element; + exports.ForwardRef = ForwardRef; + exports.Fragment = Fragment; + exports.Lazy = Lazy; + exports.Memo = Memo; + exports.Portal = Portal; + exports.Profiler = Profiler; + exports.StrictMode = StrictMode; + exports.Suspense = Suspense; + exports.isValidElementType = isValidElementType; + exports.isAsyncMode = isAsyncMode; + exports.isConcurrentMode = isConcurrentMode; + exports.isContextConsumer = isContextConsumer; + exports.isContextProvider = isContextProvider; + exports.isElement = isElement; + exports.isForwardRef = isForwardRef; + exports.isFragment = isFragment; + exports.isLazy = isLazy; + exports.isMemo = isMemo; + exports.isPortal = isPortal; + exports.isProfiler = isProfiler; + exports.isStrictMode = isStrictMode; + exports.isSuspense = isSuspense; + })(); + } + + /***/ + }, + /* 542 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + + var ReactIs = __webpack_require__(108); + var assign = __webpack_require__(63); + + var ReactPropTypesSecret = __webpack_require__(230); + var checkPropTypes = __webpack_require__(106); + + var has = Function.call.bind(Object.prototype.hasOwnProperty); + var printWarning = function () {}; + + if (true) { + printWarning = function (text) { + var message = 'Warning: ' + text; + if (typeof console !== 'undefined') { + console.error(message); + } + try { + // --- Welcome to debugging React --- + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + throw new Error(message); + } catch (x) {} + }; + } + + function emptyFunctionThatReturnsNull() { + return null; + } + + module.exports = function (isValidElement, throwOnDirectAccess) { + /* global Symbol */ + var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; + var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec. + + /** + * Returns the iterator method function contained on the iterable object. + * + * Be sure to invoke the function with the iterable as context: + * + * var iteratorFn = getIteratorFn(myIterable); + * if (iteratorFn) { + * var iterator = iteratorFn.call(myIterable); + * ... + * } + * + * @param {?object} maybeIterable + * @return {?function} + */ + function getIteratorFn(maybeIterable) { + var iteratorFn = + maybeIterable && + ((ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL]) || maybeIterable[FAUX_ITERATOR_SYMBOL]); + if (typeof iteratorFn === 'function') { + return iteratorFn; + } + } + + /** + * Collection of methods that allow declaration and validation of props that are + * supplied to React components. Example usage: + * + * var Props = require('ReactPropTypes'); + * var MyArticle = React.createClass({ + * propTypes: { + * // An optional string prop named "description". + * description: Props.string, + * + * // A required enum prop named "category". + * category: Props.oneOf(['News','Photos']).isRequired, + * + * // A prop named "dialog" that requires an instance of Dialog. + * dialog: Props.instanceOf(Dialog).isRequired + * }, + * render: function() { ... } + * }); + * + * A more formal specification of how these methods are used: + * + * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...) + * decl := ReactPropTypes.{type}(.isRequired)? + * + * Each and every declaration produces a function with the same signature. This + * allows the creation of custom validation functions. For example: + * + * var MyLink = React.createClass({ + * propTypes: { + * // An optional string or URI prop named "href". + * href: function(props, propName, componentName) { + * var propValue = props[propName]; + * if (propValue != null && typeof propValue !== 'string' && + * !(propValue instanceof URI)) { + * return new Error( + * 'Expected a string or an URI for ' + propName + ' in ' + + * componentName + * ); + * } + * } + * }, + * render: function() {...} + * }); + * + * @internal + */ + + var ANONYMOUS = '<<anonymous>>'; + + // Important! + // Keep this list in sync with production version in `./factoryWithThrowingShims.js`. + var ReactPropTypes = { + array: createPrimitiveTypeChecker('array'), + bool: createPrimitiveTypeChecker('boolean'), + func: createPrimitiveTypeChecker('function'), + number: createPrimitiveTypeChecker('number'), + object: createPrimitiveTypeChecker('object'), + string: createPrimitiveTypeChecker('string'), + symbol: createPrimitiveTypeChecker('symbol'), + + any: createAnyTypeChecker(), + arrayOf: createArrayOfTypeChecker, + element: createElementTypeChecker(), + elementType: createElementTypeTypeChecker(), + instanceOf: createInstanceTypeChecker, + node: createNodeChecker(), + objectOf: createObjectOfTypeChecker, + oneOf: createEnumTypeChecker, + oneOfType: createUnionTypeChecker, + shape: createShapeTypeChecker, + exact: createStrictShapeTypeChecker, + }; + + /** + * inlined Object.is polyfill to avoid requiring consumers ship their own + * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is + */ + /*eslint-disable no-self-compare*/ + function is(x, y) { + // SameValue algorithm + if (x === y) { + // Steps 1-5, 7-10 + // Steps 6.b-6.e: +0 != -0 + return x !== 0 || 1 / x === 1 / y; + } else { + // Step 6.a: NaN == NaN + return x !== x && y !== y; + } + } + /*eslint-enable no-self-compare*/ + + /** + * We use an Error-like object for backward compatibility as people may call + * PropTypes directly and inspect their output. However, we don't use real + * Errors anymore. We don't inspect their stack anyway, and creating them + * is prohibitively expensive if they are created too often, such as what + * happens in oneOfType() for any type before the one that matched. + */ + function PropTypeError(message) { + this.message = message; + this.stack = ''; + } + // Make `instanceof Error` still work for returned errors. + PropTypeError.prototype = Error.prototype; + + function createChainableTypeChecker(validate) { + if (true) { + var manualPropTypeCallCache = {}; + var manualPropTypeWarningCount = 0; + } + function checkType(isRequired, props, propName, componentName, location, propFullName, secret) { + componentName = componentName || ANONYMOUS; + propFullName = propFullName || propName; + + if (secret !== ReactPropTypesSecret) { + if (throwOnDirectAccess) { + // New behavior only for users of `prop-types` package + var err = new Error( + 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' + + 'Use `PropTypes.checkPropTypes()` to call them. ' + + 'Read more at http://fb.me/use-check-prop-types', + ); + err.name = 'Invariant Violation'; + throw err; + } else if ('development' !== 'production' && typeof console !== 'undefined') { + // Old behavior for people using React.PropTypes + var cacheKey = componentName + ':' + propName; + if ( + !manualPropTypeCallCache[cacheKey] && + // Avoid spamming the console because they are often not actionable except for lib authors + manualPropTypeWarningCount < 3 + ) { + printWarning( + 'You are manually calling a React.PropTypes validation ' + + 'function for the `' + + propFullName + + '` prop on `' + + componentName + + '`. This is deprecated ' + + 'and will throw in the standalone `prop-types` package. ' + + 'You may be seeing this warning due to a third-party PropTypes ' + + 'library. See https://fb.me/react-warning-dont-call-proptypes ' + + 'for details.', + ); + manualPropTypeCallCache[cacheKey] = true; + manualPropTypeWarningCount++; + } + } + } + if (props[propName] == null) { + if (isRequired) { + if (props[propName] === null) { + return new PropTypeError( + 'The ' + + location + + ' `' + + propFullName + + '` is marked as required ' + + ('in `' + componentName + '`, but its value is `null`.'), + ); + } + return new PropTypeError( + 'The ' + + location + + ' `' + + propFullName + + '` is marked as required in ' + + ('`' + componentName + '`, but its value is `undefined`.'), + ); + } + return null; + } else { + return validate(props, propName, componentName, location, propFullName); + } + } + + var chainedCheckType = checkType.bind(null, false); + chainedCheckType.isRequired = checkType.bind(null, true); + + return chainedCheckType; + } + + function createPrimitiveTypeChecker(expectedType) { + function validate(props, propName, componentName, location, propFullName, secret) { + var propValue = props[propName]; + var propType = getPropType(propValue); + if (propType !== expectedType) { + // `propValue` being instance of, say, date/regexp, pass the 'object' + // check, but we can offer a more precise error message here rather than + // 'of type `object`'. + var preciseType = getPreciseType(propValue); + + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` of type ' + + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + + ('`' + expectedType + '`.'), + ); + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createAnyTypeChecker() { + return createChainableTypeChecker(emptyFunctionThatReturnsNull); + } + + function createArrayOfTypeChecker(typeChecker) { + function validate(props, propName, componentName, location, propFullName) { + if (typeof typeChecker !== 'function') { + return new PropTypeError( + 'Property `' + + propFullName + + '` of component `' + + componentName + + '` has invalid PropType notation inside arrayOf.', + ); + } + var propValue = props[propName]; + if (!Array.isArray(propValue)) { + var propType = getPropType(propValue); + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` of type ' + + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'), + ); + } + for (var i = 0; i < propValue.length; i++) { + var error = typeChecker( + propValue, + i, + componentName, + location, + propFullName + '[' + i + ']', + ReactPropTypesSecret, + ); + if (error instanceof Error) { + return error; + } + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createElementTypeChecker() { + function validate(props, propName, componentName, location, propFullName) { + var propValue = props[propName]; + if (!isValidElement(propValue)) { + var propType = getPropType(propValue); + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` of type ' + + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'), + ); + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createElementTypeTypeChecker() { + function validate(props, propName, componentName, location, propFullName) { + var propValue = props[propName]; + if (!ReactIs.isValidElementType(propValue)) { + var propType = getPropType(propValue); + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` of type ' + + ('`' + + propType + + '` supplied to `' + + componentName + + '`, expected a single ReactElement type.'), + ); + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createInstanceTypeChecker(expectedClass) { + function validate(props, propName, componentName, location, propFullName) { + if (!(props[propName] instanceof expectedClass)) { + var expectedClassName = expectedClass.name || ANONYMOUS; + var actualClassName = getClassName(props[propName]); + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` of type ' + + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + + ('instance of `' + expectedClassName + '`.'), + ); + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createEnumTypeChecker(expectedValues) { + if (!Array.isArray(expectedValues)) { + if (true) { + if (arguments.length > 1) { + printWarning( + 'Invalid arguments supplied to oneOf, expected an array, got ' + + arguments.length + + ' arguments. ' + + 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).', + ); + } else { + printWarning('Invalid argument supplied to oneOf, expected an array.'); + } + } + return emptyFunctionThatReturnsNull; + } + + function validate(props, propName, componentName, location, propFullName) { + var propValue = props[propName]; + for (var i = 0; i < expectedValues.length; i++) { + if (is(propValue, expectedValues[i])) { + return null; + } + } + + var valuesString = JSON.stringify(expectedValues, function replacer(key, value) { + var type = getPreciseType(value); + if (type === 'symbol') { + return String(value); + } + return value; + }); + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` of value `' + + String(propValue) + + '` ' + + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'), + ); + } + return createChainableTypeChecker(validate); + } + + function createObjectOfTypeChecker(typeChecker) { + function validate(props, propName, componentName, location, propFullName) { + if (typeof typeChecker !== 'function') { + return new PropTypeError( + 'Property `' + + propFullName + + '` of component `' + + componentName + + '` has invalid PropType notation inside objectOf.', + ); + } + var propValue = props[propName]; + var propType = getPropType(propValue); + if (propType !== 'object') { + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` of type ' + + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'), + ); + } + for (var key in propValue) { + if (has(propValue, key)) { + var error = typeChecker( + propValue, + key, + componentName, + location, + propFullName + '.' + key, + ReactPropTypesSecret, + ); + if (error instanceof Error) { + return error; + } + } + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createUnionTypeChecker(arrayOfTypeCheckers) { + if (!Array.isArray(arrayOfTypeCheckers)) { + true + ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') + : void 0; + return emptyFunctionThatReturnsNull; + } + + for (var i = 0; i < arrayOfTypeCheckers.length; i++) { + var checker = arrayOfTypeCheckers[i]; + if (typeof checker !== 'function') { + printWarning( + 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' + + 'received ' + + getPostfixForTypeWarning(checker) + + ' at index ' + + i + + '.', + ); + return emptyFunctionThatReturnsNull; + } + } + + function validate(props, propName, componentName, location, propFullName) { + for (var i = 0; i < arrayOfTypeCheckers.length; i++) { + var checker = arrayOfTypeCheckers[i]; + if ( + checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null + ) { + return null; + } + } + + return new PropTypeError( + 'Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'), + ); + } + return createChainableTypeChecker(validate); + } + + function createNodeChecker() { + function validate(props, propName, componentName, location, propFullName) { + if (!isNode(props[propName])) { + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` supplied to ' + + ('`' + componentName + '`, expected a ReactNode.'), + ); + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createShapeTypeChecker(shapeTypes) { + function validate(props, propName, componentName, location, propFullName) { + var propValue = props[propName]; + var propType = getPropType(propValue); + if (propType !== 'object') { + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` of type `' + + propType + + '` ' + + ('supplied to `' + componentName + '`, expected `object`.'), + ); + } + for (var key in shapeTypes) { + var checker = shapeTypes[key]; + if (!checker) { + continue; + } + var error = checker( + propValue, + key, + componentName, + location, + propFullName + '.' + key, + ReactPropTypesSecret, + ); + if (error) { + return error; + } + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createStrictShapeTypeChecker(shapeTypes) { + function validate(props, propName, componentName, location, propFullName) { + var propValue = props[propName]; + var propType = getPropType(propValue); + if (propType !== 'object') { + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` of type `' + + propType + + '` ' + + ('supplied to `' + componentName + '`, expected `object`.'), + ); + } + // We need to check all keys in case some are required but missing from + // props. + var allKeys = assign({}, props[propName], shapeTypes); + for (var key in allKeys) { + var checker = shapeTypes[key]; + if (!checker) { + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` key `' + + key + + '` supplied to `' + + componentName + + '`.' + + '\nBad object: ' + + JSON.stringify(props[propName], null, ' ') + + '\nValid keys: ' + + JSON.stringify(Object.keys(shapeTypes), null, ' '), + ); + } + var error = checker( + propValue, + key, + componentName, + location, + propFullName + '.' + key, + ReactPropTypesSecret, + ); + if (error) { + return error; + } + } + return null; + } + + return createChainableTypeChecker(validate); + } + + function isNode(propValue) { + switch (typeof propValue) { + case 'number': + case 'string': + case 'undefined': + return true; + case 'boolean': + return !propValue; + case 'object': + if (Array.isArray(propValue)) { + return propValue.every(isNode); + } + if (propValue === null || isValidElement(propValue)) { + return true; + } + + var iteratorFn = getIteratorFn(propValue); + if (iteratorFn) { + var iterator = iteratorFn.call(propValue); + var step; + if (iteratorFn !== propValue.entries) { + while (!(step = iterator.next()).done) { + if (!isNode(step.value)) { + return false; + } + } + } else { + // Iterator will provide entry [k,v] tuples rather than values. + while (!(step = iterator.next()).done) { + var entry = step.value; + if (entry) { + if (!isNode(entry[1])) { + return false; + } + } + } + } + } else { + return false; + } + + return true; + default: + return false; + } + } + + function isSymbol(propType, propValue) { + // Native Symbol. + if (propType === 'symbol') { + return true; + } + + // falsy value can't be a Symbol + if (!propValue) { + return false; + } + + // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol' + if (propValue['@@toStringTag'] === 'Symbol') { + return true; + } + + // Fallback for non-spec compliant Symbols which are polyfilled. + if (typeof Symbol === 'function' && propValue instanceof Symbol) { + return true; + } + + return false; + } + + // Equivalent of `typeof` but with special handling for array and regexp. + function getPropType(propValue) { + var propType = typeof propValue; + if (Array.isArray(propValue)) { + return 'array'; + } + if (propValue instanceof RegExp) { + // Old webkits (at least until Android 4.0) return 'function' rather than + // 'object' for typeof a RegExp. We'll normalize this here so that /bla/ + // passes PropTypes.object. + return 'object'; + } + if (isSymbol(propType, propValue)) { + return 'symbol'; + } + return propType; + } + + // This handles more types than `getPropType`. Only used for error messages. + // See `createPrimitiveTypeChecker`. + function getPreciseType(propValue) { + if (typeof propValue === 'undefined' || propValue === null) { + return '' + propValue; + } + var propType = getPropType(propValue); + if (propType === 'object') { + if (propValue instanceof Date) { + return 'date'; + } else if (propValue instanceof RegExp) { + return 'regexp'; + } + } + return propType; + } + + // Returns a string that is postfixed to a warning about an invalid type. + // For example, "undefined" or "of type array" + function getPostfixForTypeWarning(value) { + var type = getPreciseType(value); + switch (type) { + case 'array': + case 'object': + return 'an ' + type; + case 'boolean': + case 'date': + case 'regexp': + return 'a ' + type; + default: + return type; + } + } + + // Returns class name of the object, if any. + function getClassName(propValue) { + if (!propValue.constructor || !propValue.constructor.name) { + return ANONYMOUS; + } + return propValue.constructor.name; + } + + ReactPropTypes.checkPropTypes = checkPropTypes; + ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache; + ReactPropTypes.PropTypes = ReactPropTypes; + + return ReactPropTypes; + }; + + /***/ + }, + /* 543 */ + /***/ function (module, exports, __webpack_require__) { + /* WEBPACK VAR INJECTION */ (function (module) { + var __WEBPACK_AMD_DEFINE_RESULT__; /** + * @license + * Lodash <https://lodash.com/> + * Copyright OpenJS Foundation and other contributors <https://openjsf.org/> + * Released under MIT license <https://lodash.com/license> + * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ + (function () { + /** Used as a safe reference for `undefined` in pre-ES5 environments. */ + var undefined; + + /** Used as the semantic version number. */ + var VERSION = '4.17.15'; + + /** Used as the size to enable large array optimizations. */ + var LARGE_ARRAY_SIZE = 200; + + /** Error message constants. */ + var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.', + FUNC_ERROR_TEXT = 'Expected a function'; + + /** Used to stand-in for `undefined` hash values. */ + var HASH_UNDEFINED = '__lodash_hash_undefined__'; + + /** Used as the maximum memoize cache size. */ + var MAX_MEMOIZE_SIZE = 500; + + /** Used as the internal argument placeholder. */ + var PLACEHOLDER = '__lodash_placeholder__'; + + /** Used to compose bitmasks for cloning. */ + var CLONE_DEEP_FLAG = 1, + CLONE_FLAT_FLAG = 2, + CLONE_SYMBOLS_FLAG = 4; + + /** Used to compose bitmasks for value comparisons. */ + var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; + + /** Used to compose bitmasks for function metadata. */ + var WRAP_BIND_FLAG = 1, + WRAP_BIND_KEY_FLAG = 2, + WRAP_CURRY_BOUND_FLAG = 4, + WRAP_CURRY_FLAG = 8, + WRAP_CURRY_RIGHT_FLAG = 16, + WRAP_PARTIAL_FLAG = 32, + WRAP_PARTIAL_RIGHT_FLAG = 64, + WRAP_ARY_FLAG = 128, + WRAP_REARG_FLAG = 256, + WRAP_FLIP_FLAG = 512; + + /** Used as default options for `_.truncate`. */ + var DEFAULT_TRUNC_LENGTH = 30, + DEFAULT_TRUNC_OMISSION = '...'; + + /** Used to detect hot functions by number of calls within a span of milliseconds. */ + var HOT_COUNT = 800, + HOT_SPAN = 16; + + /** Used to indicate the type of lazy iteratees. */ + var LAZY_FILTER_FLAG = 1, + LAZY_MAP_FLAG = 2, + LAZY_WHILE_FLAG = 3; + + /** Used as references for various `Number` constants. */ + var INFINITY = 1 / 0, + MAX_SAFE_INTEGER = 9007199254740991, + MAX_INTEGER = 1.7976931348623157e308, + NAN = 0 / 0; + + /** Used as references for the maximum length and index of an array. */ + var MAX_ARRAY_LENGTH = 4294967295, + MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1, + HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1; + + /** Used to associate wrap methods with their bit flags. */ + var wrapFlags = [ + ['ary', WRAP_ARY_FLAG], + ['bind', WRAP_BIND_FLAG], + ['bindKey', WRAP_BIND_KEY_FLAG], + ['curry', WRAP_CURRY_FLAG], + ['curryRight', WRAP_CURRY_RIGHT_FLAG], + ['flip', WRAP_FLIP_FLAG], + ['partial', WRAP_PARTIAL_FLAG], + ['partialRight', WRAP_PARTIAL_RIGHT_FLAG], + ['rearg', WRAP_REARG_FLAG], + ]; + + /** `Object#toString` result references. */ + var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + asyncTag = '[object AsyncFunction]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + domExcTag = '[object DOMException]', + errorTag = '[object Error]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + mapTag = '[object Map]', + numberTag = '[object Number]', + nullTag = '[object Null]', + objectTag = '[object Object]', + promiseTag = '[object Promise]', + proxyTag = '[object Proxy]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]', + undefinedTag = '[object Undefined]', + weakMapTag = '[object WeakMap]', + weakSetTag = '[object WeakSet]'; + + var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + + /** Used to match empty string literals in compiled template source. */ + var reEmptyStringLeading = /\b__p \+= '';/g, + reEmptyStringMiddle = /\b(__p \+=) '' \+/g, + reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g; + + /** Used to match HTML entities and HTML characters. */ + var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g, + reUnescapedHtml = /[&<>"']/g, + reHasEscapedHtml = RegExp(reEscapedHtml.source), + reHasUnescapedHtml = RegExp(reUnescapedHtml.source); + + /** Used to match template delimiters. */ + var reEscape = /<%-([\s\S]+?)%>/g, + reEvaluate = /<%([\s\S]+?)%>/g, + reInterpolate = /<%=([\s\S]+?)%>/g; + + /** Used to match property names within property paths. */ + var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, + reIsPlainProp = /^\w*$/, + rePropName = + /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; + + /** + * Used to match `RegExp` + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). + */ + var reRegExpChar = /[\\^$.*+?()[\]{}|]/g, + reHasRegExpChar = RegExp(reRegExpChar.source); + + /** Used to match leading and trailing whitespace. */ + var reTrim = /^\s+|\s+$/g, + reTrimStart = /^\s+/, + reTrimEnd = /\s+$/; + + /** Used to match wrap detail comments. */ + var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, + reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/, + reSplitDetails = /,? & /; + + /** Used to match words composed of alphanumeric characters. */ + var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g; + + /** Used to match backslashes in property paths. */ + var reEscapeChar = /\\(\\)?/g; + + /** + * Used to match + * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components). + */ + var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g; + + /** Used to match `RegExp` flags from their coerced string values. */ + var reFlags = /\w*$/; + + /** Used to detect bad signed hexadecimal string values. */ + var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; + + /** Used to detect binary string values. */ + var reIsBinary = /^0b[01]+$/i; + + /** Used to detect host constructors (Safari). */ + var reIsHostCtor = /^\[object .+?Constructor\]$/; + + /** Used to detect octal string values. */ + var reIsOctal = /^0o[0-7]+$/i; + + /** Used to detect unsigned integer values. */ + var reIsUint = /^(?:0|[1-9]\d*)$/; + + /** Used to match Latin Unicode letters (excluding mathematical operators). */ + var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g; + + /** Used to ensure capturing order of template delimiters. */ + var reNoMatch = /($^)/; + + /** Used to match unescaped characters in compiled string literals. */ + var reUnescapedString = /['\n\r\u2028\u2029\\]/g; + + /** Used to compose unicode character classes. */ + var rsAstralRange = '\\ud800-\\udfff', + rsComboMarksRange = '\\u0300-\\u036f', + reComboHalfMarksRange = '\\ufe20-\\ufe2f', + rsComboSymbolsRange = '\\u20d0-\\u20ff', + rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, + rsDingbatRange = '\\u2700-\\u27bf', + rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff', + rsMathOpRange = '\\xac\\xb1\\xd7\\xf7', + rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf', + rsPunctuationRange = '\\u2000-\\u206f', + rsSpaceRange = + ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000', + rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde', + rsVarRange = '\\ufe0e\\ufe0f', + rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange; + + /** Used to compose unicode capture groups. */ + var rsApos = "['\u2019]", + rsAstral = '[' + rsAstralRange + ']', + rsBreak = '[' + rsBreakRange + ']', + rsCombo = '[' + rsComboRange + ']', + rsDigits = '\\d+', + rsDingbat = '[' + rsDingbatRange + ']', + rsLower = '[' + rsLowerRange + ']', + rsMisc = + '[^' + + rsAstralRange + + rsBreakRange + + rsDigits + + rsDingbatRange + + rsLowerRange + + rsUpperRange + + ']', + rsFitz = '\\ud83c[\\udffb-\\udfff]', + rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', + rsNonAstral = '[^' + rsAstralRange + ']', + rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', + rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', + rsUpper = '[' + rsUpperRange + ']', + rsZWJ = '\\u200d'; + + /** Used to compose unicode regexes. */ + var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')', + rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')', + rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?', + rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?', + reOptMod = rsModifier + '?', + rsOptVar = '[' + rsVarRange + ']?', + rsOptJoin = + '(?:' + + rsZWJ + + '(?:' + + [rsNonAstral, rsRegional, rsSurrPair].join('|') + + ')' + + rsOptVar + + reOptMod + + ')*', + rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])', + rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])', + rsSeq = rsOptVar + reOptMod + rsOptJoin, + rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq, + rsSymbol = + '(?:' + + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + + ')'; + + /** Used to match apostrophes. */ + var reApos = RegExp(rsApos, 'g'); + + /** + * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and + * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols). + */ + var reComboMark = RegExp(rsCombo, 'g'); + + /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ + var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); + + /** Used to match complex or compound words. */ + var reUnicodeWord = RegExp( + [ + rsUpper + + '?' + + rsLower + + '+' + + rsOptContrLower + + '(?=' + + [rsBreak, rsUpper, '$'].join('|') + + ')', + rsMiscUpper + + '+' + + rsOptContrUpper + + '(?=' + + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + + ')', + rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower, + rsUpper + '+' + rsOptContrUpper, + rsOrdUpper, + rsOrdLower, + rsDigits, + rsEmoji, + ].join('|'), + 'g', + ); + + /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */ + var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']'); + + /** Used to detect strings that need a more robust regexp to match words. */ + var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/; + + /** Used to assign default `context` object properties. */ + var contextProps = [ + 'Array', + 'Buffer', + 'DataView', + 'Date', + 'Error', + 'Float32Array', + 'Float64Array', + 'Function', + 'Int8Array', + 'Int16Array', + 'Int32Array', + 'Map', + 'Math', + 'Object', + 'Promise', + 'RegExp', + 'Set', + 'String', + 'Symbol', + 'TypeError', + 'Uint8Array', + 'Uint8ClampedArray', + 'Uint16Array', + 'Uint32Array', + 'WeakMap', + '_', + 'clearTimeout', + 'isFinite', + 'parseInt', + 'setTimeout', + ]; + + /** Used to make template sourceURLs easier to identify. */ + var templateCounter = -1; + + /** Used to identify `toStringTag` values of typed arrays. */ + var typedArrayTags = {}; + typedArrayTags[float32Tag] = + typedArrayTags[float64Tag] = + typedArrayTags[int8Tag] = + typedArrayTags[int16Tag] = + typedArrayTags[int32Tag] = + typedArrayTags[uint8Tag] = + typedArrayTags[uint8ClampedTag] = + typedArrayTags[uint16Tag] = + typedArrayTags[uint32Tag] = + true; + typedArrayTags[argsTag] = + typedArrayTags[arrayTag] = + typedArrayTags[arrayBufferTag] = + typedArrayTags[boolTag] = + typedArrayTags[dataViewTag] = + typedArrayTags[dateTag] = + typedArrayTags[errorTag] = + typedArrayTags[funcTag] = + typedArrayTags[mapTag] = + typedArrayTags[numberTag] = + typedArrayTags[objectTag] = + typedArrayTags[regexpTag] = + typedArrayTags[setTag] = + typedArrayTags[stringTag] = + typedArrayTags[weakMapTag] = + false; + + /** Used to identify `toStringTag` values supported by `_.clone`. */ + var cloneableTags = {}; + cloneableTags[argsTag] = + cloneableTags[arrayTag] = + cloneableTags[arrayBufferTag] = + cloneableTags[dataViewTag] = + cloneableTags[boolTag] = + cloneableTags[dateTag] = + cloneableTags[float32Tag] = + cloneableTags[float64Tag] = + cloneableTags[int8Tag] = + cloneableTags[int16Tag] = + cloneableTags[int32Tag] = + cloneableTags[mapTag] = + cloneableTags[numberTag] = + cloneableTags[objectTag] = + cloneableTags[regexpTag] = + cloneableTags[setTag] = + cloneableTags[stringTag] = + cloneableTags[symbolTag] = + cloneableTags[uint8Tag] = + cloneableTags[uint8ClampedTag] = + cloneableTags[uint16Tag] = + cloneableTags[uint32Tag] = + true; + cloneableTags[errorTag] = cloneableTags[funcTag] = cloneableTags[weakMapTag] = false; + + /** Used to map Latin Unicode letters to basic Latin letters. */ + var deburredLetters = { + // Latin-1 Supplement block. + '\xc0': 'A', + '\xc1': 'A', + '\xc2': 'A', + '\xc3': 'A', + '\xc4': 'A', + '\xc5': 'A', + '\xe0': 'a', + '\xe1': 'a', + '\xe2': 'a', + '\xe3': 'a', + '\xe4': 'a', + '\xe5': 'a', + '\xc7': 'C', + '\xe7': 'c', + '\xd0': 'D', + '\xf0': 'd', + '\xc8': 'E', + '\xc9': 'E', + '\xca': 'E', + '\xcb': 'E', + '\xe8': 'e', + '\xe9': 'e', + '\xea': 'e', + '\xeb': 'e', + '\xcc': 'I', + '\xcd': 'I', + '\xce': 'I', + '\xcf': 'I', + '\xec': 'i', + '\xed': 'i', + '\xee': 'i', + '\xef': 'i', + '\xd1': 'N', + '\xf1': 'n', + '\xd2': 'O', + '\xd3': 'O', + '\xd4': 'O', + '\xd5': 'O', + '\xd6': 'O', + '\xd8': 'O', + '\xf2': 'o', + '\xf3': 'o', + '\xf4': 'o', + '\xf5': 'o', + '\xf6': 'o', + '\xf8': 'o', + '\xd9': 'U', + '\xda': 'U', + '\xdb': 'U', + '\xdc': 'U', + '\xf9': 'u', + '\xfa': 'u', + '\xfb': 'u', + '\xfc': 'u', + '\xdd': 'Y', + '\xfd': 'y', + '\xff': 'y', + '\xc6': 'Ae', + '\xe6': 'ae', + '\xde': 'Th', + '\xfe': 'th', + '\xdf': 'ss', + // Latin Extended-A block. + '\u0100': 'A', + '\u0102': 'A', + '\u0104': 'A', + '\u0101': 'a', + '\u0103': 'a', + '\u0105': 'a', + '\u0106': 'C', + '\u0108': 'C', + '\u010a': 'C', + '\u010c': 'C', + '\u0107': 'c', + '\u0109': 'c', + '\u010b': 'c', + '\u010d': 'c', + '\u010e': 'D', + '\u0110': 'D', + '\u010f': 'd', + '\u0111': 'd', + '\u0112': 'E', + '\u0114': 'E', + '\u0116': 'E', + '\u0118': 'E', + '\u011a': 'E', + '\u0113': 'e', + '\u0115': 'e', + '\u0117': 'e', + '\u0119': 'e', + '\u011b': 'e', + '\u011c': 'G', + '\u011e': 'G', + '\u0120': 'G', + '\u0122': 'G', + '\u011d': 'g', + '\u011f': 'g', + '\u0121': 'g', + '\u0123': 'g', + '\u0124': 'H', + '\u0126': 'H', + '\u0125': 'h', + '\u0127': 'h', + '\u0128': 'I', + '\u012a': 'I', + '\u012c': 'I', + '\u012e': 'I', + '\u0130': 'I', + '\u0129': 'i', + '\u012b': 'i', + '\u012d': 'i', + '\u012f': 'i', + '\u0131': 'i', + '\u0134': 'J', + '\u0135': 'j', + '\u0136': 'K', + '\u0137': 'k', + '\u0138': 'k', + '\u0139': 'L', + '\u013b': 'L', + '\u013d': 'L', + '\u013f': 'L', + '\u0141': 'L', + '\u013a': 'l', + '\u013c': 'l', + '\u013e': 'l', + '\u0140': 'l', + '\u0142': 'l', + '\u0143': 'N', + '\u0145': 'N', + '\u0147': 'N', + '\u014a': 'N', + '\u0144': 'n', + '\u0146': 'n', + '\u0148': 'n', + '\u014b': 'n', + '\u014c': 'O', + '\u014e': 'O', + '\u0150': 'O', + '\u014d': 'o', + '\u014f': 'o', + '\u0151': 'o', + '\u0154': 'R', + '\u0156': 'R', + '\u0158': 'R', + '\u0155': 'r', + '\u0157': 'r', + '\u0159': 'r', + '\u015a': 'S', + '\u015c': 'S', + '\u015e': 'S', + '\u0160': 'S', + '\u015b': 's', + '\u015d': 's', + '\u015f': 's', + '\u0161': 's', + '\u0162': 'T', + '\u0164': 'T', + '\u0166': 'T', + '\u0163': 't', + '\u0165': 't', + '\u0167': 't', + '\u0168': 'U', + '\u016a': 'U', + '\u016c': 'U', + '\u016e': 'U', + '\u0170': 'U', + '\u0172': 'U', + '\u0169': 'u', + '\u016b': 'u', + '\u016d': 'u', + '\u016f': 'u', + '\u0171': 'u', + '\u0173': 'u', + '\u0174': 'W', + '\u0175': 'w', + '\u0176': 'Y', + '\u0177': 'y', + '\u0178': 'Y', + '\u0179': 'Z', + '\u017b': 'Z', + '\u017d': 'Z', + '\u017a': 'z', + '\u017c': 'z', + '\u017e': 'z', + '\u0132': 'IJ', + '\u0133': 'ij', + '\u0152': 'Oe', + '\u0153': 'oe', + '\u0149': "'n", + '\u017f': 's', + }; + + /** Used to map characters to HTML entities. */ + var htmlEscapes = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''', + }; + + /** Used to map HTML entities to characters. */ + var htmlUnescapes = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + ''': "'", + }; + + /** Used to escape characters for inclusion in compiled string literals. */ + var stringEscapes = { + '\\': '\\', + "'": "'", + '\n': 'n', + '\r': 'r', + '\u2028': 'u2028', + '\u2029': 'u2029', + }; + + /** Built-in method references without a dependency on `root`. */ + var freeParseFloat = parseFloat, + freeParseInt = parseInt; + + /** Detect free variable `global` from Node.js. */ + var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + + /** Detect free variable `self`. */ + var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + + /** Used as a reference to the global object. */ + var root = freeGlobal || freeSelf || Function('return this')(); + + /** Detect free variable `exports`. */ + var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; + + /** Detect free variable `module`. */ + var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + + /** Detect the popular CommonJS extension `module.exports`. */ + var moduleExports = freeModule && freeModule.exports === freeExports; + + /** Detect free variable `process` from Node.js. */ + var freeProcess = moduleExports && freeGlobal.process; + + /** Used to access faster Node.js helpers. */ + var nodeUtil = (function () { + try { + // Use `util.types` for Node.js 10+. + var types = freeModule && freeModule.require && freeModule.require('util').types; + + if (types) { + return types; + } + + // Legacy `process.binding('util')` for Node.js < 10. + return freeProcess && freeProcess.binding && freeProcess.binding('util'); + } catch (e) {} + })(); + + /* Node.js helper references. */ + var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer, + nodeIsDate = nodeUtil && nodeUtil.isDate, + nodeIsMap = nodeUtil && nodeUtil.isMap, + nodeIsRegExp = nodeUtil && nodeUtil.isRegExp, + nodeIsSet = nodeUtil && nodeUtil.isSet, + nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; + + /*--------------------------------------------------------------------------*/ + + /** + * A faster alternative to `Function#apply`, this function invokes `func` + * with the `this` binding of `thisArg` and the arguments of `args`. + * + * @private + * @param {Function} func The function to invoke. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} args The arguments to invoke `func` with. + * @returns {*} Returns the result of `func`. + */ + function apply(func, thisArg, args) { + switch (args.length) { + case 0: + return func.call(thisArg); + case 1: + return func.call(thisArg, args[0]); + case 2: + return func.call(thisArg, args[0], args[1]); + case 3: + return func.call(thisArg, args[0], args[1], args[2]); + } + return func.apply(thisArg, args); + } + + /** + * A specialized version of `baseAggregator` for arrays. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} setter The function to set `accumulator` values. + * @param {Function} iteratee The iteratee to transform keys. + * @param {Object} accumulator The initial aggregated object. + * @returns {Function} Returns `accumulator`. + */ + function arrayAggregator(array, setter, iteratee, accumulator) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + var value = array[index]; + setter(accumulator, value, iteratee(value), array); + } + return accumulator; + } + + /** + * A specialized version of `_.forEach` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ + function arrayEach(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (iteratee(array[index], index, array) === false) { + break; + } + } + return array; + } + + /** + * A specialized version of `_.forEachRight` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ + function arrayEachRight(array, iteratee) { + var length = array == null ? 0 : array.length; + + while (length--) { + if (iteratee(array[length], length, array) === false) { + break; + } + } + return array; + } + + /** + * A specialized version of `_.every` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false`. + */ + function arrayEvery(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (!predicate(array[index], index, array)) { + return false; + } + } + return true; + } + + /** + * A specialized version of `_.filter` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ + function arrayFilter(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result[resIndex++] = value; + } + } + return result; + } + + /** + * A specialized version of `_.includes` for arrays without support for + * specifying an index to search from. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ + function arrayIncludes(array, value) { + var length = array == null ? 0 : array.length; + return !!length && baseIndexOf(array, value, 0) > -1; + } + + /** + * This function is like `arrayIncludes` except that it accepts a comparator. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @param {Function} comparator The comparator invoked per element. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ + function arrayIncludesWith(array, value, comparator) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (comparator(value, array[index])) { + return true; + } + } + return false; + } + + /** + * A specialized version of `_.map` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ + function arrayMap(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length, + result = Array(length); + + while (++index < length) { + result[index] = iteratee(array[index], index, array); + } + return result; + } + + /** + * Appends the elements of `values` to `array`. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to append. + * @returns {Array} Returns `array`. + */ + function arrayPush(array, values) { + var index = -1, + length = values.length, + offset = array.length; + + while (++index < length) { + array[offset + index] = values[index]; + } + return array; + } + + /** + * A specialized version of `_.reduce` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {boolean} [initAccum] Specify using the first element of `array` as + * the initial value. + * @returns {*} Returns the accumulated value. + */ + function arrayReduce(array, iteratee, accumulator, initAccum) { + var index = -1, + length = array == null ? 0 : array.length; + + if (initAccum && length) { + accumulator = array[++index]; + } + while (++index < length) { + accumulator = iteratee(accumulator, array[index], index, array); + } + return accumulator; + } + + /** + * A specialized version of `_.reduceRight` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {boolean} [initAccum] Specify using the last element of `array` as + * the initial value. + * @returns {*} Returns the accumulated value. + */ + function arrayReduceRight(array, iteratee, accumulator, initAccum) { + var length = array == null ? 0 : array.length; + if (initAccum && length) { + accumulator = array[--length]; + } + while (length--) { + accumulator = iteratee(accumulator, array[length], length, array); + } + return accumulator; + } + + /** + * A specialized version of `_.some` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ + function arraySome(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (predicate(array[index], index, array)) { + return true; + } + } + return false; + } + + /** + * Gets the size of an ASCII `string`. + * + * @private + * @param {string} string The string inspect. + * @returns {number} Returns the string size. + */ + var asciiSize = baseProperty('length'); + + /** + * Converts an ASCII `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ + function asciiToArray(string) { + return string.split(''); + } + + /** + * Splits an ASCII `string` into an array of its words. + * + * @private + * @param {string} The string to inspect. + * @returns {Array} Returns the words of `string`. + */ + function asciiWords(string) { + return string.match(reAsciiWord) || []; + } + + /** + * The base implementation of methods like `_.findKey` and `_.findLastKey`, + * without support for iteratee shorthands, which iterates over `collection` + * using `eachFunc`. + * + * @private + * @param {Array|Object} collection The collection to inspect. + * @param {Function} predicate The function invoked per iteration. + * @param {Function} eachFunc The function to iterate over `collection`. + * @returns {*} Returns the found element or its key, else `undefined`. + */ + function baseFindKey(collection, predicate, eachFunc) { + var result; + eachFunc(collection, function (value, key, collection) { + if (predicate(value, key, collection)) { + result = key; + return false; + } + }); + return result; + } + + /** + * The base implementation of `_.findIndex` and `_.findLastIndex` without + * support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} predicate The function invoked per iteration. + * @param {number} fromIndex The index to search from. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function baseFindIndex(array, predicate, fromIndex, fromRight) { + var length = array.length, + index = fromIndex + (fromRight ? 1 : -1); + + while (fromRight ? index-- : ++index < length) { + if (predicate(array[index], index, array)) { + return index; + } + } + return -1; + } + + /** + * The base implementation of `_.indexOf` without `fromIndex` bounds checks. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function baseIndexOf(array, value, fromIndex) { + return value === value + ? strictIndexOf(array, value, fromIndex) + : baseFindIndex(array, baseIsNaN, fromIndex); + } + + /** + * This function is like `baseIndexOf` except that it accepts a comparator. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @param {Function} comparator The comparator invoked per element. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function baseIndexOfWith(array, value, fromIndex, comparator) { + var index = fromIndex - 1, + length = array.length; + + while (++index < length) { + if (comparator(array[index], value)) { + return index; + } + } + return -1; + } + + /** + * The base implementation of `_.isNaN` without support for number objects. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + */ + function baseIsNaN(value) { + return value !== value; + } + + /** + * The base implementation of `_.mean` and `_.meanBy` without support for + * iteratee shorthands. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {number} Returns the mean. + */ + function baseMean(array, iteratee) { + var length = array == null ? 0 : array.length; + return length ? baseSum(array, iteratee) / length : NAN; + } + + /** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new accessor function. + */ + function baseProperty(key) { + return function (object) { + return object == null ? undefined : object[key]; + }; + } + + /** + * The base implementation of `_.propertyOf` without support for deep paths. + * + * @private + * @param {Object} object The object to query. + * @returns {Function} Returns the new accessor function. + */ + function basePropertyOf(object) { + return function (key) { + return object == null ? undefined : object[key]; + }; + } + + /** + * The base implementation of `_.reduce` and `_.reduceRight`, without support + * for iteratee shorthands, which iterates over `collection` using `eachFunc`. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} accumulator The initial value. + * @param {boolean} initAccum Specify using the first or last element of + * `collection` as the initial value. + * @param {Function} eachFunc The function to iterate over `collection`. + * @returns {*} Returns the accumulated value. + */ + function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) { + eachFunc(collection, function (value, index, collection) { + accumulator = initAccum + ? ((initAccum = false), value) + : iteratee(accumulator, value, index, collection); + }); + return accumulator; + } + + /** + * The base implementation of `_.sortBy` which uses `comparer` to define the + * sort order of `array` and replaces criteria objects with their corresponding + * values. + * + * @private + * @param {Array} array The array to sort. + * @param {Function} comparer The function to define sort order. + * @returns {Array} Returns `array`. + */ + function baseSortBy(array, comparer) { + var length = array.length; + + array.sort(comparer); + while (length--) { + array[length] = array[length].value; + } + return array; + } + + /** + * The base implementation of `_.sum` and `_.sumBy` without support for + * iteratee shorthands. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {number} Returns the sum. + */ + function baseSum(array, iteratee) { + var result, + index = -1, + length = array.length; + + while (++index < length) { + var current = iteratee(array[index]); + if (current !== undefined) { + result = result === undefined ? current : result + current; + } + } + return result; + } + + /** + * The base implementation of `_.times` without support for iteratee shorthands + * or max array length checks. + * + * @private + * @param {number} n The number of times to invoke `iteratee`. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the array of results. + */ + function baseTimes(n, iteratee) { + var index = -1, + result = Array(n); + + while (++index < n) { + result[index] = iteratee(index); + } + return result; + } + + /** + * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array + * of key-value pairs for `object` corresponding to the property names of `props`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} props The property names to get values for. + * @returns {Object} Returns the key-value pairs. + */ + function baseToPairs(object, props) { + return arrayMap(props, function (key) { + return [key, object[key]]; + }); + } + + /** + * The base implementation of `_.unary` without support for storing metadata. + * + * @private + * @param {Function} func The function to cap arguments for. + * @returns {Function} Returns the new capped function. + */ + function baseUnary(func) { + return function (value) { + return func(value); + }; + } + + /** + * The base implementation of `_.values` and `_.valuesIn` which creates an + * array of `object` property values corresponding to the property names + * of `props`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} props The property names to get values for. + * @returns {Object} Returns the array of property values. + */ + function baseValues(object, props) { + return arrayMap(props, function (key) { + return object[key]; + }); + } + + /** + * Checks if a `cache` value for `key` exists. + * + * @private + * @param {Object} cache The cache to query. + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function cacheHas(cache, key) { + return cache.has(key); + } + + /** + * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol + * that is not found in the character symbols. + * + * @private + * @param {Array} strSymbols The string symbols to inspect. + * @param {Array} chrSymbols The character symbols to find. + * @returns {number} Returns the index of the first unmatched string symbol. + */ + function charsStartIndex(strSymbols, chrSymbols) { + var index = -1, + length = strSymbols.length; + + while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} + return index; + } + + /** + * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol + * that is not found in the character symbols. + * + * @private + * @param {Array} strSymbols The string symbols to inspect. + * @param {Array} chrSymbols The character symbols to find. + * @returns {number} Returns the index of the last unmatched string symbol. + */ + function charsEndIndex(strSymbols, chrSymbols) { + var index = strSymbols.length; + + while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} + return index; + } + + /** + * Gets the number of `placeholder` occurrences in `array`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} placeholder The placeholder to search for. + * @returns {number} Returns the placeholder count. + */ + function countHolders(array, placeholder) { + var length = array.length, + result = 0; + + while (length--) { + if (array[length] === placeholder) { + ++result; + } + } + return result; + } + + /** + * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A + * letters to basic Latin letters. + * + * @private + * @param {string} letter The matched letter to deburr. + * @returns {string} Returns the deburred letter. + */ + var deburrLetter = basePropertyOf(deburredLetters); + + /** + * Used by `_.escape` to convert characters to HTML entities. + * + * @private + * @param {string} chr The matched character to escape. + * @returns {string} Returns the escaped character. + */ + var escapeHtmlChar = basePropertyOf(htmlEscapes); + + /** + * Used by `_.template` to escape characters for inclusion in compiled string literals. + * + * @private + * @param {string} chr The matched character to escape. + * @returns {string} Returns the escaped character. + */ + function escapeStringChar(chr) { + return '\\' + stringEscapes[chr]; + } + + /** + * Gets the value at `key` of `object`. + * + * @private + * @param {Object} [object] The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ + function getValue(object, key) { + return object == null ? undefined : object[key]; + } + + /** + * Checks if `string` contains Unicode symbols. + * + * @private + * @param {string} string The string to inspect. + * @returns {boolean} Returns `true` if a symbol is found, else `false`. + */ + function hasUnicode(string) { + return reHasUnicode.test(string); + } + + /** + * Checks if `string` contains a word composed of Unicode symbols. + * + * @private + * @param {string} string The string to inspect. + * @returns {boolean} Returns `true` if a word is found, else `false`. + */ + function hasUnicodeWord(string) { + return reHasUnicodeWord.test(string); + } + + /** + * Converts `iterator` to an array. + * + * @private + * @param {Object} iterator The iterator to convert. + * @returns {Array} Returns the converted array. + */ + function iteratorToArray(iterator) { + var data, + result = []; + + while (!(data = iterator.next()).done) { + result.push(data.value); + } + return result; + } + + /** + * Converts `map` to its key-value pairs. + * + * @private + * @param {Object} map The map to convert. + * @returns {Array} Returns the key-value pairs. + */ + function mapToArray(map) { + var index = -1, + result = Array(map.size); + + map.forEach(function (value, key) { + result[++index] = [key, value]; + }); + return result; + } + + /** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ + function overArg(func, transform) { + return function (arg) { + return func(transform(arg)); + }; + } + + /** + * Replaces all `placeholder` elements in `array` with an internal placeholder + * and returns an array of their indexes. + * + * @private + * @param {Array} array The array to modify. + * @param {*} placeholder The placeholder to replace. + * @returns {Array} Returns the new array of placeholder indexes. + */ + function replaceHolders(array, placeholder) { + var index = -1, + length = array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (value === placeholder || value === PLACEHOLDER) { + array[index] = PLACEHOLDER; + result[resIndex++] = index; + } + } + return result; + } + + /** + * Converts `set` to an array of its values. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the values. + */ + function setToArray(set) { + var index = -1, + result = Array(set.size); + + set.forEach(function (value) { + result[++index] = value; + }); + return result; + } + + /** + * Converts `set` to its value-value pairs. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the value-value pairs. + */ + function setToPairs(set) { + var index = -1, + result = Array(set.size); + + set.forEach(function (value) { + result[++index] = [value, value]; + }); + return result; + } + + /** + * A specialized version of `_.indexOf` which performs strict equality + * comparisons of values, i.e. `===`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function strictIndexOf(array, value, fromIndex) { + var index = fromIndex - 1, + length = array.length; + + while (++index < length) { + if (array[index] === value) { + return index; + } + } + return -1; + } + + /** + * A specialized version of `_.lastIndexOf` which performs strict equality + * comparisons of values, i.e. `===`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function strictLastIndexOf(array, value, fromIndex) { + var index = fromIndex + 1; + while (index--) { + if (array[index] === value) { + return index; + } + } + return index; + } + + /** + * Gets the number of symbols in `string`. + * + * @private + * @param {string} string The string to inspect. + * @returns {number} Returns the string size. + */ + function stringSize(string) { + return hasUnicode(string) ? unicodeSize(string) : asciiSize(string); + } + + /** + * Converts `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ + function stringToArray(string) { + return hasUnicode(string) ? unicodeToArray(string) : asciiToArray(string); + } + + /** + * Used by `_.unescape` to convert HTML entities to characters. + * + * @private + * @param {string} chr The matched character to unescape. + * @returns {string} Returns the unescaped character. + */ + var unescapeHtmlChar = basePropertyOf(htmlUnescapes); + + /** + * Gets the size of a Unicode `string`. + * + * @private + * @param {string} string The string inspect. + * @returns {number} Returns the string size. + */ + function unicodeSize(string) { + var result = (reUnicode.lastIndex = 0); + while (reUnicode.test(string)) { + ++result; + } + return result; + } + + /** + * Converts a Unicode `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ + function unicodeToArray(string) { + return string.match(reUnicode) || []; + } + + /** + * Splits a Unicode `string` into an array of its words. + * + * @private + * @param {string} The string to inspect. + * @returns {Array} Returns the words of `string`. + */ + function unicodeWords(string) { + return string.match(reUnicodeWord) || []; + } + + /*--------------------------------------------------------------------------*/ + + /** + * Create a new pristine `lodash` function using the `context` object. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category Util + * @param {Object} [context=root] The context object. + * @returns {Function} Returns a new `lodash` function. + * @example + * + * _.mixin({ 'foo': _.constant('foo') }); + * + * var lodash = _.runInContext(); + * lodash.mixin({ 'bar': lodash.constant('bar') }); + * + * _.isFunction(_.foo); + * // => true + * _.isFunction(_.bar); + * // => false + * + * lodash.isFunction(lodash.foo); + * // => false + * lodash.isFunction(lodash.bar); + * // => true + * + * // Create a suped-up `defer` in Node.js. + * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer; + */ + var runInContext = function runInContext(context) { + context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps)); + + /** Built-in constructor references. */ + var Array = context.Array, + Date = context.Date, + Error = context.Error, + Function = context.Function, + Math = context.Math, + Object = context.Object, + RegExp = context.RegExp, + String = context.String, + TypeError = context.TypeError; + + /** Used for built-in method references. */ + var arrayProto = Array.prototype, + funcProto = Function.prototype, + objectProto = Object.prototype; + + /** Used to detect overreaching core-js shims. */ + var coreJsData = context['__core-js_shared__']; + + /** Used to resolve the decompiled source of functions. */ + var funcToString = funcProto.toString; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** Used to generate unique IDs. */ + var idCounter = 0; + + /** Used to detect methods masquerading as native. */ + var maskSrcKey = (function () { + var uid = /[^.]+$/.exec((coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO) || ''); + return uid ? 'Symbol(src)_1.' + uid : ''; + })(); + + /** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ + var nativeObjectToString = objectProto.toString; + + /** Used to infer the `Object` constructor. */ + var objectCtorString = funcToString.call(Object); + + /** Used to restore the original `_` reference in `_.noConflict`. */ + var oldDash = root._; + + /** Used to detect if a method is native. */ + var reIsNative = RegExp( + '^' + + funcToString + .call(hasOwnProperty) + .replace(reRegExpChar, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + + '$', + ); + + /** Built-in value references. */ + var Buffer = moduleExports ? context.Buffer : undefined, + Symbol = context.Symbol, + Uint8Array = context.Uint8Array, + allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined, + getPrototype = overArg(Object.getPrototypeOf, Object), + objectCreate = Object.create, + propertyIsEnumerable = objectProto.propertyIsEnumerable, + splice = arrayProto.splice, + spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined, + symIterator = Symbol ? Symbol.iterator : undefined, + symToStringTag = Symbol ? Symbol.toStringTag : undefined; + + var defineProperty = (function () { + try { + var func = getNative(Object, 'defineProperty'); + func({}, '', {}); + return func; + } catch (e) {} + })(); + + /** Mocked built-ins. */ + var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout, + ctxNow = Date && Date.now !== root.Date.now && Date.now, + ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout; + + /* Built-in method references for those with the same name as other `lodash` methods. */ + var nativeCeil = Math.ceil, + nativeFloor = Math.floor, + nativeGetSymbols = Object.getOwnPropertySymbols, + nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined, + nativeIsFinite = context.isFinite, + nativeJoin = arrayProto.join, + nativeKeys = overArg(Object.keys, Object), + nativeMax = Math.max, + nativeMin = Math.min, + nativeNow = Date.now, + nativeParseInt = context.parseInt, + nativeRandom = Math.random, + nativeReverse = arrayProto.reverse; + + /* Built-in method references that are verified to be native. */ + var DataView = getNative(context, 'DataView'), + Map = getNative(context, 'Map'), + Promise = getNative(context, 'Promise'), + Set = getNative(context, 'Set'), + WeakMap = getNative(context, 'WeakMap'), + nativeCreate = getNative(Object, 'create'); + + /** Used to store function metadata. */ + var metaMap = WeakMap && new WeakMap(); + + /** Used to lookup unminified function names. */ + var realNames = {}; + + /** Used to detect maps, sets, and weakmaps. */ + var dataViewCtorString = toSource(DataView), + mapCtorString = toSource(Map), + promiseCtorString = toSource(Promise), + setCtorString = toSource(Set), + weakMapCtorString = toSource(WeakMap); + + /** Used to convert symbols to primitives and strings. */ + var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolValueOf = symbolProto ? symbolProto.valueOf : undefined, + symbolToString = symbolProto ? symbolProto.toString : undefined; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a `lodash` object which wraps `value` to enable implicit method + * chain sequences. Methods that operate on and return arrays, collections, + * and functions can be chained together. Methods that retrieve a single value + * or may return a primitive value will automatically end the chain sequence + * and return the unwrapped value. Otherwise, the value must be unwrapped + * with `_#value`. + * + * Explicit chain sequences, which must be unwrapped with `_#value`, may be + * enabled using `_.chain`. + * + * The execution of chained methods is lazy, that is, it's deferred until + * `_#value` is implicitly or explicitly called. + * + * Lazy evaluation allows several methods to support shortcut fusion. + * Shortcut fusion is an optimization to merge iteratee calls; this avoids + * the creation of intermediate arrays and can greatly reduce the number of + * iteratee executions. Sections of a chain sequence qualify for shortcut + * fusion if the section is applied to an array and iteratees accept only + * one argument. The heuristic for whether a section qualifies for shortcut + * fusion is subject to change. + * + * Chaining is supported in custom builds as long as the `_#value` method is + * directly or indirectly included in the build. + * + * In addition to lodash methods, wrappers have `Array` and `String` methods. + * + * The wrapper `Array` methods are: + * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift` + * + * The wrapper `String` methods are: + * `replace` and `split` + * + * The wrapper methods that support shortcut fusion are: + * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`, + * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`, + * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray` + * + * The chainable wrapper methods are: + * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`, + * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`, + * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`, + * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`, + * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`, + * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`, + * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`, + * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`, + * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`, + * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`, + * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`, + * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`, + * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`, + * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`, + * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`, + * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`, + * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`, + * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`, + * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`, + * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`, + * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`, + * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`, + * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`, + * `zipObject`, `zipObjectDeep`, and `zipWith` + * + * The wrapper methods that are **not** chainable by default are: + * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`, + * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`, + * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`, + * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`, + * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`, + * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`, + * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`, + * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`, + * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`, + * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`, + * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`, + * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`, + * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`, + * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`, + * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`, + * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`, + * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`, + * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`, + * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`, + * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`, + * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`, + * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`, + * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`, + * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`, + * `upperFirst`, `value`, and `words` + * + * @name _ + * @constructor + * @category Seq + * @param {*} value The value to wrap in a `lodash` instance. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * function square(n) { + * return n * n; + * } + * + * var wrapped = _([1, 2, 3]); + * + * // Returns an unwrapped value. + * wrapped.reduce(_.add); + * // => 6 + * + * // Returns a wrapped value. + * var squares = wrapped.map(square); + * + * _.isArray(squares); + * // => false + * + * _.isArray(squares.value()); + * // => true + */ + function lodash(value) { + if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) { + if (value instanceof LodashWrapper) { + return value; + } + if (hasOwnProperty.call(value, '__wrapped__')) { + return wrapperClone(value); + } + } + return new LodashWrapper(value); + } + + /** + * The base implementation of `_.create` without support for assigning + * properties to the created object. + * + * @private + * @param {Object} proto The object to inherit from. + * @returns {Object} Returns the new object. + */ + var baseCreate = (function () { + function object() {} + return function (proto) { + if (!isObject(proto)) { + return {}; + } + if (objectCreate) { + return objectCreate(proto); + } + object.prototype = proto; + var result = new object(); + object.prototype = undefined; + return result; + }; + })(); + + /** + * The function whose prototype chain sequence wrappers inherit from. + * + * @private + */ + function baseLodash() { + // No operation performed. + } + + /** + * The base constructor for creating `lodash` wrapper objects. + * + * @private + * @param {*} value The value to wrap. + * @param {boolean} [chainAll] Enable explicit method chain sequences. + */ + function LodashWrapper(value, chainAll) { + this.__wrapped__ = value; + this.__actions__ = []; + this.__chain__ = !!chainAll; + this.__index__ = 0; + this.__values__ = undefined; + } + + /** + * By default, the template delimiters used by lodash are like those in + * embedded Ruby (ERB) as well as ES2015 template strings. Change the + * following template settings to use alternative delimiters. + * + * @static + * @memberOf _ + * @type {Object} + */ + lodash.templateSettings = { + /** + * Used to detect `data` property values to be HTML-escaped. + * + * @memberOf _.templateSettings + * @type {RegExp} + */ + escape: reEscape, + + /** + * Used to detect code to be evaluated. + * + * @memberOf _.templateSettings + * @type {RegExp} + */ + evaluate: reEvaluate, + + /** + * Used to detect `data` property values to inject. + * + * @memberOf _.templateSettings + * @type {RegExp} + */ + interpolate: reInterpolate, + + /** + * Used to reference the data object in the template text. + * + * @memberOf _.templateSettings + * @type {string} + */ + variable: '', + + /** + * Used to import variables into the compiled template. + * + * @memberOf _.templateSettings + * @type {Object} + */ + imports: { + /** + * A reference to the `lodash` function. + * + * @memberOf _.templateSettings.imports + * @type {Function} + */ + _: lodash, + }, + }; + + // Ensure wrappers are instances of `baseLodash`. + lodash.prototype = baseLodash.prototype; + lodash.prototype.constructor = lodash; + + LodashWrapper.prototype = baseCreate(baseLodash.prototype); + LodashWrapper.prototype.constructor = LodashWrapper; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation. + * + * @private + * @constructor + * @param {*} value The value to wrap. + */ + function LazyWrapper(value) { + this.__wrapped__ = value; + this.__actions__ = []; + this.__dir__ = 1; + this.__filtered__ = false; + this.__iteratees__ = []; + this.__takeCount__ = MAX_ARRAY_LENGTH; + this.__views__ = []; + } + + /** + * Creates a clone of the lazy wrapper object. + * + * @private + * @name clone + * @memberOf LazyWrapper + * @returns {Object} Returns the cloned `LazyWrapper` object. + */ + function lazyClone() { + var result = new LazyWrapper(this.__wrapped__); + result.__actions__ = copyArray(this.__actions__); + result.__dir__ = this.__dir__; + result.__filtered__ = this.__filtered__; + result.__iteratees__ = copyArray(this.__iteratees__); + result.__takeCount__ = this.__takeCount__; + result.__views__ = copyArray(this.__views__); + return result; + } + + /** + * Reverses the direction of lazy iteration. + * + * @private + * @name reverse + * @memberOf LazyWrapper + * @returns {Object} Returns the new reversed `LazyWrapper` object. + */ + function lazyReverse() { + if (this.__filtered__) { + var result = new LazyWrapper(this); + result.__dir__ = -1; + result.__filtered__ = true; + } else { + result = this.clone(); + result.__dir__ *= -1; + } + return result; + } + + /** + * Extracts the unwrapped value from its lazy wrapper. + * + * @private + * @name value + * @memberOf LazyWrapper + * @returns {*} Returns the unwrapped value. + */ + function lazyValue() { + var array = this.__wrapped__.value(), + dir = this.__dir__, + isArr = isArray(array), + isRight = dir < 0, + arrLength = isArr ? array.length : 0, + view = getView(0, arrLength, this.__views__), + start = view.start, + end = view.end, + length = end - start, + index = isRight ? end : start - 1, + iteratees = this.__iteratees__, + iterLength = iteratees.length, + resIndex = 0, + takeCount = nativeMin(length, this.__takeCount__); + + if (!isArr || (!isRight && arrLength == length && takeCount == length)) { + return baseWrapperValue(array, this.__actions__); + } + var result = []; + + outer: while (length-- && resIndex < takeCount) { + index += dir; + + var iterIndex = -1, + value = array[index]; + + while (++iterIndex < iterLength) { + var data = iteratees[iterIndex], + iteratee = data.iteratee, + type = data.type, + computed = iteratee(value); + + if (type == LAZY_MAP_FLAG) { + value = computed; + } else if (!computed) { + if (type == LAZY_FILTER_FLAG) { + continue outer; + } else { + break outer; + } + } + } + result[resIndex++] = value; + } + return result; + } + + // Ensure `LazyWrapper` is an instance of `baseLodash`. + LazyWrapper.prototype = baseCreate(baseLodash.prototype); + LazyWrapper.prototype.constructor = LazyWrapper; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a hash object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function Hash(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + + /** + * Removes all key-value entries from the hash. + * + * @private + * @name clear + * @memberOf Hash + */ + function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; + this.size = 0; + } + + /** + * Removes `key` and its value from the hash. + * + * @private + * @name delete + * @memberOf Hash + * @param {Object} hash The hash to modify. + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function hashDelete(key) { + var result = this.has(key) && delete this.__data__[key]; + this.size -= result ? 1 : 0; + return result; + } + + /** + * Gets the hash value for `key`. + * + * @private + * @name get + * @memberOf Hash + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function hashGet(key) { + var data = this.__data__; + if (nativeCreate) { + var result = data[key]; + return result === HASH_UNDEFINED ? undefined : result; + } + return hasOwnProperty.call(data, key) ? data[key] : undefined; + } + + /** + * Checks if a hash value for `key` exists. + * + * @private + * @name has + * @memberOf Hash + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function hashHas(key) { + var data = this.__data__; + return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key); + } + + /** + * Sets the hash `key` to `value`. + * + * @private + * @name set + * @memberOf Hash + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the hash instance. + */ + function hashSet(key, value) { + var data = this.__data__; + this.size += this.has(key) ? 0 : 1; + data[key] = nativeCreate && value === undefined ? HASH_UNDEFINED : value; + return this; + } + + // Add methods to `Hash`. + Hash.prototype.clear = hashClear; + Hash.prototype['delete'] = hashDelete; + Hash.prototype.get = hashGet; + Hash.prototype.has = hashHas; + Hash.prototype.set = hashSet; + + /*------------------------------------------------------------------------*/ + + /** + * Creates an list cache object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function ListCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + + /** + * Removes all key-value entries from the list cache. + * + * @private + * @name clear + * @memberOf ListCache + */ + function listCacheClear() { + this.__data__ = []; + this.size = 0; + } + + /** + * Removes `key` and its value from the list cache. + * + * @private + * @name delete + * @memberOf ListCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function listCacheDelete(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + return false; + } + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + --this.size; + return true; + } + + /** + * Gets the list cache value for `key`. + * + * @private + * @name get + * @memberOf ListCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function listCacheGet(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + return index < 0 ? undefined : data[index][1]; + } + + /** + * Checks if a list cache value for `key` exists. + * + * @private + * @name has + * @memberOf ListCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; + } + + /** + * Sets the list cache `key` to `value`. + * + * @private + * @name set + * @memberOf ListCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the list cache instance. + */ + function listCacheSet(key, value) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + ++this.size; + data.push([key, value]); + } else { + data[index][1] = value; + } + return this; + } + + // Add methods to `ListCache`. + ListCache.prototype.clear = listCacheClear; + ListCache.prototype['delete'] = listCacheDelete; + ListCache.prototype.get = listCacheGet; + ListCache.prototype.has = listCacheHas; + ListCache.prototype.set = listCacheSet; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a map cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function MapCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + + /** + * Removes all key-value entries from the map. + * + * @private + * @name clear + * @memberOf MapCache + */ + function mapCacheClear() { + this.size = 0; + this.__data__ = { + hash: new Hash(), + map: new (Map || ListCache)(), + string: new Hash(), + }; + } + + /** + * Removes `key` and its value from the map. + * + * @private + * @name delete + * @memberOf MapCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function mapCacheDelete(key) { + var result = getMapData(this, key)['delete'](key); + this.size -= result ? 1 : 0; + return result; + } + + /** + * Gets the map value for `key`. + * + * @private + * @name get + * @memberOf MapCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function mapCacheGet(key) { + return getMapData(this, key).get(key); + } + + /** + * Checks if a map value for `key` exists. + * + * @private + * @name has + * @memberOf MapCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function mapCacheHas(key) { + return getMapData(this, key).has(key); + } + + /** + * Sets the map `key` to `value`. + * + * @private + * @name set + * @memberOf MapCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the map cache instance. + */ + function mapCacheSet(key, value) { + var data = getMapData(this, key), + size = data.size; + + data.set(key, value); + this.size += data.size == size ? 0 : 1; + return this; + } + + // Add methods to `MapCache`. + MapCache.prototype.clear = mapCacheClear; + MapCache.prototype['delete'] = mapCacheDelete; + MapCache.prototype.get = mapCacheGet; + MapCache.prototype.has = mapCacheHas; + MapCache.prototype.set = mapCacheSet; + + /*------------------------------------------------------------------------*/ + + /** + * + * Creates an array cache object to store unique values. + * + * @private + * @constructor + * @param {Array} [values] The values to cache. + */ + function SetCache(values) { + var index = -1, + length = values == null ? 0 : values.length; + + this.__data__ = new MapCache(); + while (++index < length) { + this.add(values[index]); + } + } + + /** + * Adds `value` to the array cache. + * + * @private + * @name add + * @memberOf SetCache + * @alias push + * @param {*} value The value to cache. + * @returns {Object} Returns the cache instance. + */ + function setCacheAdd(value) { + this.__data__.set(value, HASH_UNDEFINED); + return this; + } + + /** + * Checks if `value` is in the array cache. + * + * @private + * @name has + * @memberOf SetCache + * @param {*} value The value to search for. + * @returns {number} Returns `true` if `value` is found, else `false`. + */ + function setCacheHas(value) { + return this.__data__.has(value); + } + + // Add methods to `SetCache`. + SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; + SetCache.prototype.has = setCacheHas; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a stack cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function Stack(entries) { + var data = (this.__data__ = new ListCache(entries)); + this.size = data.size; + } + + /** + * Removes all key-value entries from the stack. + * + * @private + * @name clear + * @memberOf Stack + */ + function stackClear() { + this.__data__ = new ListCache(); + this.size = 0; + } + + /** + * Removes `key` and its value from the stack. + * + * @private + * @name delete + * @memberOf Stack + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function stackDelete(key) { + var data = this.__data__, + result = data['delete'](key); + + this.size = data.size; + return result; + } + + /** + * Gets the stack value for `key`. + * + * @private + * @name get + * @memberOf Stack + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function stackGet(key) { + return this.__data__.get(key); + } + + /** + * Checks if a stack value for `key` exists. + * + * @private + * @name has + * @memberOf Stack + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function stackHas(key) { + return this.__data__.has(key); + } + + /** + * Sets the stack `key` to `value`. + * + * @private + * @name set + * @memberOf Stack + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the stack cache instance. + */ + function stackSet(key, value) { + var data = this.__data__; + if (data instanceof ListCache) { + var pairs = data.__data__; + if (!Map || pairs.length < LARGE_ARRAY_SIZE - 1) { + pairs.push([key, value]); + this.size = ++data.size; + return this; + } + data = this.__data__ = new MapCache(pairs); + } + data.set(key, value); + this.size = data.size; + return this; + } + + // Add methods to `Stack`. + Stack.prototype.clear = stackClear; + Stack.prototype['delete'] = stackDelete; + Stack.prototype.get = stackGet; + Stack.prototype.has = stackHas; + Stack.prototype.set = stackSet; + + /*------------------------------------------------------------------------*/ + + /** + * Creates an array of the enumerable property names of the array-like `value`. + * + * @private + * @param {*} value The value to query. + * @param {boolean} inherited Specify returning inherited property names. + * @returns {Array} Returns the array of property names. + */ + function arrayLikeKeys(value, inherited) { + var isArr = isArray(value), + isArg = !isArr && isArguments(value), + isBuff = !isArr && !isArg && isBuffer(value), + isType = !isArr && !isArg && !isBuff && isTypedArray(value), + skipIndexes = isArr || isArg || isBuff || isType, + result = skipIndexes ? baseTimes(value.length, String) : [], + length = result.length; + + for (var key in value) { + if ( + (inherited || hasOwnProperty.call(value, key)) && + !( + skipIndexes && + // Safari 9 has enumerable `arguments.length` in strict mode. + (key == 'length' || + // Node.js 0.10 has enumerable non-index properties on buffers. + (isBuff && (key == 'offset' || key == 'parent')) || + // PhantomJS 2 has enumerable non-index properties on typed arrays. + (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) || + // Skip index properties. + isIndex(key, length)) + ) + ) { + result.push(key); + } + } + return result; + } + + /** + * A specialized version of `_.sample` for arrays. + * + * @private + * @param {Array} array The array to sample. + * @returns {*} Returns the random element. + */ + function arraySample(array) { + var length = array.length; + return length ? array[baseRandom(0, length - 1)] : undefined; + } + + /** + * A specialized version of `_.sampleSize` for arrays. + * + * @private + * @param {Array} array The array to sample. + * @param {number} n The number of elements to sample. + * @returns {Array} Returns the random elements. + */ + function arraySampleSize(array, n) { + return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length)); + } + + /** + * A specialized version of `_.shuffle` for arrays. + * + * @private + * @param {Array} array The array to shuffle. + * @returns {Array} Returns the new shuffled array. + */ + function arrayShuffle(array) { + return shuffleSelf(copyArray(array)); + } + + /** + * This function is like `assignValue` except that it doesn't assign + * `undefined` values. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ + function assignMergeValue(object, key, value) { + if ( + (value !== undefined && !eq(object[key], value)) || + (value === undefined && !(key in object)) + ) { + baseAssignValue(object, key, value); + } + } + + /** + * Assigns `value` to `key` of `object` if the existing value is not equivalent + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ + function assignValue(object, key, value) { + var objValue = object[key]; + if ( + !(hasOwnProperty.call(object, key) && eq(objValue, value)) || + (value === undefined && !(key in object)) + ) { + baseAssignValue(object, key, value); + } + } + + /** + * Gets the index at which the `key` is found in `array` of key-value pairs. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} key The key to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + return -1; + } + + /** + * Aggregates elements of `collection` on `accumulator` with keys transformed + * by `iteratee` and values set by `setter`. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} setter The function to set `accumulator` values. + * @param {Function} iteratee The iteratee to transform keys. + * @param {Object} accumulator The initial aggregated object. + * @returns {Function} Returns `accumulator`. + */ + function baseAggregator(collection, setter, iteratee, accumulator) { + baseEach(collection, function (value, key, collection) { + setter(accumulator, value, iteratee(value), collection); + }); + return accumulator; + } + + /** + * The base implementation of `_.assign` without support for multiple sources + * or `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ + function baseAssign(object, source) { + return object && copyObject(source, keys(source), object); + } + + /** + * The base implementation of `_.assignIn` without support for multiple sources + * or `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ + function baseAssignIn(object, source) { + return object && copyObject(source, keysIn(source), object); + } + + /** + * The base implementation of `assignValue` and `assignMergeValue` without + * value checks. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ + function baseAssignValue(object, key, value) { + if (key == '__proto__' && defineProperty) { + defineProperty(object, key, { + configurable: true, + enumerable: true, + value: value, + writable: true, + }); + } else { + object[key] = value; + } + } + + /** + * The base implementation of `_.at` without support for individual paths. + * + * @private + * @param {Object} object The object to iterate over. + * @param {string[]} paths The property paths to pick. + * @returns {Array} Returns the picked elements. + */ + function baseAt(object, paths) { + var index = -1, + length = paths.length, + result = Array(length), + skip = object == null; + + while (++index < length) { + result[index] = skip ? undefined : get(object, paths[index]); + } + return result; + } + + /** + * The base implementation of `_.clamp` which doesn't coerce arguments. + * + * @private + * @param {number} number The number to clamp. + * @param {number} [lower] The lower bound. + * @param {number} upper The upper bound. + * @returns {number} Returns the clamped number. + */ + function baseClamp(number, lower, upper) { + if (number === number) { + if (upper !== undefined) { + number = number <= upper ? number : upper; + } + if (lower !== undefined) { + number = number >= lower ? number : lower; + } + } + return number; + } + + /** + * The base implementation of `_.clone` and `_.cloneDeep` which tracks + * traversed objects. + * + * @private + * @param {*} value The value to clone. + * @param {boolean} bitmask The bitmask flags. + * 1 - Deep clone + * 2 - Flatten inherited properties + * 4 - Clone symbols + * @param {Function} [customizer] The function to customize cloning. + * @param {string} [key] The key of `value`. + * @param {Object} [object] The parent object of `value`. + * @param {Object} [stack] Tracks traversed objects and their clone counterparts. + * @returns {*} Returns the cloned value. + */ + function baseClone(value, bitmask, customizer, key, object, stack) { + var result, + isDeep = bitmask & CLONE_DEEP_FLAG, + isFlat = bitmask & CLONE_FLAT_FLAG, + isFull = bitmask & CLONE_SYMBOLS_FLAG; + + if (customizer) { + result = object ? customizer(value, key, object, stack) : customizer(value); + } + if (result !== undefined) { + return result; + } + if (!isObject(value)) { + return value; + } + var isArr = isArray(value); + if (isArr) { + result = initCloneArray(value); + if (!isDeep) { + return copyArray(value, result); + } + } else { + var tag = getTag(value), + isFunc = tag == funcTag || tag == genTag; + + if (isBuffer(value)) { + return cloneBuffer(value, isDeep); + } + if (tag == objectTag || tag == argsTag || (isFunc && !object)) { + result = isFlat || isFunc ? {} : initCloneObject(value); + if (!isDeep) { + return isFlat + ? copySymbolsIn(value, baseAssignIn(result, value)) + : copySymbols(value, baseAssign(result, value)); + } + } else { + if (!cloneableTags[tag]) { + return object ? value : {}; + } + result = initCloneByTag(value, tag, isDeep); + } + } + // Check for circular references and return its corresponding clone. + stack || (stack = new Stack()); + var stacked = stack.get(value); + if (stacked) { + return stacked; + } + stack.set(value, result); + + if (isSet(value)) { + value.forEach(function (subValue) { + result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack)); + }); + } else if (isMap(value)) { + value.forEach(function (subValue, key) { + result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack)); + }); + } + + var keysFunc = isFull ? (isFlat ? getAllKeysIn : getAllKeys) : isFlat ? keysIn : keys; + + var props = isArr ? undefined : keysFunc(value); + arrayEach(props || value, function (subValue, key) { + if (props) { + key = subValue; + subValue = value[key]; + } + // Recursively populate clone (susceptible to call stack limits). + assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack)); + }); + return result; + } + + /** + * The base implementation of `_.conforms` which doesn't clone `source`. + * + * @private + * @param {Object} source The object of property predicates to conform to. + * @returns {Function} Returns the new spec function. + */ + function baseConforms(source) { + var props = keys(source); + return function (object) { + return baseConformsTo(object, source, props); + }; + } + + /** + * The base implementation of `_.conformsTo` which accepts `props` to check. + * + * @private + * @param {Object} object The object to inspect. + * @param {Object} source The object of property predicates to conform to. + * @returns {boolean} Returns `true` if `object` conforms, else `false`. + */ + function baseConformsTo(object, source, props) { + var length = props.length; + if (object == null) { + return !length; + } + object = Object(object); + while (length--) { + var key = props[length], + predicate = source[key], + value = object[key]; + + if ((value === undefined && !(key in object)) || !predicate(value)) { + return false; + } + } + return true; + } + + /** + * The base implementation of `_.delay` and `_.defer` which accepts `args` + * to provide to `func`. + * + * @private + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @param {Array} args The arguments to provide to `func`. + * @returns {number|Object} Returns the timer id or timeout object. + */ + function baseDelay(func, wait, args) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + return setTimeout(function () { + func.apply(undefined, args); + }, wait); + } + + /** + * The base implementation of methods like `_.difference` without support + * for excluding multiple arrays or iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Array} values The values to exclude. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of filtered values. + */ + function baseDifference(array, values, iteratee, comparator) { + var index = -1, + includes = arrayIncludes, + isCommon = true, + length = array.length, + result = [], + valuesLength = values.length; + + if (!length) { + return result; + } + if (iteratee) { + values = arrayMap(values, baseUnary(iteratee)); + } + if (comparator) { + includes = arrayIncludesWith; + isCommon = false; + } else if (values.length >= LARGE_ARRAY_SIZE) { + includes = cacheHas; + isCommon = false; + values = new SetCache(values); + } + outer: while (++index < length) { + var value = array[index], + computed = iteratee == null ? value : iteratee(value); + + value = comparator || value !== 0 ? value : 0; + if (isCommon && computed === computed) { + var valuesIndex = valuesLength; + while (valuesIndex--) { + if (values[valuesIndex] === computed) { + continue outer; + } + } + result.push(value); + } else if (!includes(values, computed, comparator)) { + result.push(value); + } + } + return result; + } + + /** + * The base implementation of `_.forEach` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + */ + var baseEach = createBaseEach(baseForOwn); + + /** + * The base implementation of `_.forEachRight` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + */ + var baseEachRight = createBaseEach(baseForOwnRight, true); + + /** + * The base implementation of `_.every` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false` + */ + function baseEvery(collection, predicate) { + var result = true; + baseEach(collection, function (value, index, collection) { + result = !!predicate(value, index, collection); + return result; + }); + return result; + } + + /** + * The base implementation of methods like `_.max` and `_.min` which accepts a + * `comparator` to determine the extremum value. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The iteratee invoked per iteration. + * @param {Function} comparator The comparator used to compare values. + * @returns {*} Returns the extremum value. + */ + function baseExtremum(array, iteratee, comparator) { + var index = -1, + length = array.length; + + while (++index < length) { + var value = array[index], + current = iteratee(value); + + if ( + current != null && + (computed === undefined + ? current === current && !isSymbol(current) + : comparator(current, computed)) + ) { + var computed = current, + result = value; + } + } + return result; + } + + /** + * The base implementation of `_.fill` without an iteratee call guard. + * + * @private + * @param {Array} array The array to fill. + * @param {*} value The value to fill `array` with. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns `array`. + */ + function baseFill(array, value, start, end) { + var length = array.length; + + start = toInteger(start); + if (start < 0) { + start = -start > length ? 0 : length + start; + } + end = end === undefined || end > length ? length : toInteger(end); + if (end < 0) { + end += length; + } + end = start > end ? 0 : toLength(end); + while (start < end) { + array[start++] = value; + } + return array; + } + + /** + * The base implementation of `_.filter` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ + function baseFilter(collection, predicate) { + var result = []; + baseEach(collection, function (value, index, collection) { + if (predicate(value, index, collection)) { + result.push(value); + } + }); + return result; + } + + /** + * The base implementation of `_.flatten` with support for restricting flattening. + * + * @private + * @param {Array} array The array to flatten. + * @param {number} depth The maximum recursion depth. + * @param {boolean} [predicate=isFlattenable] The function invoked per iteration. + * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks. + * @param {Array} [result=[]] The initial result value. + * @returns {Array} Returns the new flattened array. + */ + function baseFlatten(array, depth, predicate, isStrict, result) { + var index = -1, + length = array.length; + + predicate || (predicate = isFlattenable); + result || (result = []); + + while (++index < length) { + var value = array[index]; + if (depth > 0 && predicate(value)) { + if (depth > 1) { + // Recursively flatten arrays (susceptible to call stack limits). + baseFlatten(value, depth - 1, predicate, isStrict, result); + } else { + arrayPush(result, value); + } + } else if (!isStrict) { + result[result.length] = value; + } + } + return result; + } + + /** + * The base implementation of `baseForOwn` which iterates over `object` + * properties returned by `keysFunc` and invokes `iteratee` for each property. + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ + var baseFor = createBaseFor(); + + /** + * This function is like `baseFor` except that it iterates over properties + * in the opposite order. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ + var baseForRight = createBaseFor(true); + + /** + * The base implementation of `_.forOwn` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ + function baseForOwn(object, iteratee) { + return object && baseFor(object, iteratee, keys); + } + + /** + * The base implementation of `_.forOwnRight` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ + function baseForOwnRight(object, iteratee) { + return object && baseForRight(object, iteratee, keys); + } + + /** + * The base implementation of `_.functions` which creates an array of + * `object` function property names filtered from `props`. + * + * @private + * @param {Object} object The object to inspect. + * @param {Array} props The property names to filter. + * @returns {Array} Returns the function names. + */ + function baseFunctions(object, props) { + return arrayFilter(props, function (key) { + return isFunction(object[key]); + }); + } + + /** + * The base implementation of `_.get` without support for default values. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @returns {*} Returns the resolved value. + */ + function baseGet(object, path) { + path = castPath(path, object); + + var index = 0, + length = path.length; + + while (object != null && index < length) { + object = object[toKey(path[index++])]; + } + return index && index == length ? object : undefined; + } + + /** + * The base implementation of `getAllKeys` and `getAllKeysIn` which uses + * `keysFunc` and `symbolsFunc` to get the enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Function} keysFunc The function to get the keys of `object`. + * @param {Function} symbolsFunc The function to get the symbols of `object`. + * @returns {Array} Returns the array of property names and symbols. + */ + function baseGetAllKeys(object, keysFunc, symbolsFunc) { + var result = keysFunc(object); + return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); + } + + /** + * The base implementation of `getTag` without fallbacks for buggy environments. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ + function baseGetTag(value) { + if (value == null) { + return value === undefined ? undefinedTag : nullTag; + } + return symToStringTag && symToStringTag in Object(value) + ? getRawTag(value) + : objectToString(value); + } + + /** + * The base implementation of `_.gt` which doesn't coerce arguments. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than `other`, + * else `false`. + */ + function baseGt(value, other) { + return value > other; + } + + /** + * The base implementation of `_.has` without support for deep paths. + * + * @private + * @param {Object} [object] The object to query. + * @param {Array|string} key The key to check. + * @returns {boolean} Returns `true` if `key` exists, else `false`. + */ + function baseHas(object, key) { + return object != null && hasOwnProperty.call(object, key); + } + + /** + * The base implementation of `_.hasIn` without support for deep paths. + * + * @private + * @param {Object} [object] The object to query. + * @param {Array|string} key The key to check. + * @returns {boolean} Returns `true` if `key` exists, else `false`. + */ + function baseHasIn(object, key) { + return object != null && key in Object(object); + } + + /** + * The base implementation of `_.inRange` which doesn't coerce arguments. + * + * @private + * @param {number} number The number to check. + * @param {number} start The start of the range. + * @param {number} end The end of the range. + * @returns {boolean} Returns `true` if `number` is in the range, else `false`. + */ + function baseInRange(number, start, end) { + return number >= nativeMin(start, end) && number < nativeMax(start, end); + } + + /** + * The base implementation of methods like `_.intersection`, without support + * for iteratee shorthands, that accepts an array of arrays to inspect. + * + * @private + * @param {Array} arrays The arrays to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of shared values. + */ + function baseIntersection(arrays, iteratee, comparator) { + var includes = comparator ? arrayIncludesWith : arrayIncludes, + length = arrays[0].length, + othLength = arrays.length, + othIndex = othLength, + caches = Array(othLength), + maxLength = Infinity, + result = []; + + while (othIndex--) { + var array = arrays[othIndex]; + if (othIndex && iteratee) { + array = arrayMap(array, baseUnary(iteratee)); + } + maxLength = nativeMin(array.length, maxLength); + caches[othIndex] = + !comparator && (iteratee || (length >= 120 && array.length >= 120)) + ? new SetCache(othIndex && array) + : undefined; + } + array = arrays[0]; + + var index = -1, + seen = caches[0]; + + outer: while (++index < length && result.length < maxLength) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + value = comparator || value !== 0 ? value : 0; + if (!(seen ? cacheHas(seen, computed) : includes(result, computed, comparator))) { + othIndex = othLength; + while (--othIndex) { + var cache = caches[othIndex]; + if ( + !(cache ? cacheHas(cache, computed) : includes(arrays[othIndex], computed, comparator)) + ) { + continue outer; + } + } + if (seen) { + seen.push(computed); + } + result.push(value); + } + } + return result; + } + + /** + * The base implementation of `_.invert` and `_.invertBy` which inverts + * `object` with values transformed by `iteratee` and set by `setter`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} setter The function to set `accumulator` values. + * @param {Function} iteratee The iteratee to transform values. + * @param {Object} accumulator The initial inverted object. + * @returns {Function} Returns `accumulator`. + */ + function baseInverter(object, setter, iteratee, accumulator) { + baseForOwn(object, function (value, key, object) { + setter(accumulator, iteratee(value), key, object); + }); + return accumulator; + } + + /** + * The base implementation of `_.invoke` without support for individual + * method arguments. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path of the method to invoke. + * @param {Array} args The arguments to invoke the method with. + * @returns {*} Returns the result of the invoked method. + */ + function baseInvoke(object, path, args) { + path = castPath(path, object); + object = parent(object, path); + var func = object == null ? object : object[toKey(last(path))]; + return func == null ? undefined : apply(func, object, args); + } + + /** + * The base implementation of `_.isArguments`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + */ + function baseIsArguments(value) { + return isObjectLike(value) && baseGetTag(value) == argsTag; + } + + /** + * The base implementation of `_.isArrayBuffer` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`. + */ + function baseIsArrayBuffer(value) { + return isObjectLike(value) && baseGetTag(value) == arrayBufferTag; + } + + /** + * The base implementation of `_.isDate` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a date object, else `false`. + */ + function baseIsDate(value) { + return isObjectLike(value) && baseGetTag(value) == dateTag; + } + + /** + * The base implementation of `_.isEqual` which supports partial comparisons + * and tracks traversed objects. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {boolean} bitmask The bitmask flags. + * 1 - Unordered comparison + * 2 - Partial comparison + * @param {Function} [customizer] The function to customize comparisons. + * @param {Object} [stack] Tracks traversed `value` and `other` objects. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + */ + function baseIsEqual(value, other, bitmask, customizer, stack) { + if (value === other) { + return true; + } + if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) { + return value !== value && other !== other; + } + return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); + } + + /** + * A specialized version of `baseIsEqual` for arrays and objects which performs + * deep comparisons and tracks traversed objects enabling objects with circular + * references to be compared. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} [stack] Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { + var objIsArr = isArray(object), + othIsArr = isArray(other), + objTag = objIsArr ? arrayTag : getTag(object), + othTag = othIsArr ? arrayTag : getTag(other); + + objTag = objTag == argsTag ? objectTag : objTag; + othTag = othTag == argsTag ? objectTag : othTag; + + var objIsObj = objTag == objectTag, + othIsObj = othTag == objectTag, + isSameTag = objTag == othTag; + + if (isSameTag && isBuffer(object)) { + if (!isBuffer(other)) { + return false; + } + objIsArr = true; + objIsObj = false; + } + if (isSameTag && !objIsObj) { + stack || (stack = new Stack()); + return objIsArr || isTypedArray(object) + ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) + : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); + } + if (!(bitmask & COMPARE_PARTIAL_FLAG)) { + var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), + othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); + + if (objIsWrapped || othIsWrapped) { + var objUnwrapped = objIsWrapped ? object.value() : object, + othUnwrapped = othIsWrapped ? other.value() : other; + + stack || (stack = new Stack()); + return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); + } + } + if (!isSameTag) { + return false; + } + stack || (stack = new Stack()); + return equalObjects(object, other, bitmask, customizer, equalFunc, stack); + } + + /** + * The base implementation of `_.isMap` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a map, else `false`. + */ + function baseIsMap(value) { + return isObjectLike(value) && getTag(value) == mapTag; + } + + /** + * The base implementation of `_.isMatch` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @param {Array} matchData The property names, values, and compare flags to match. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + */ + function baseIsMatch(object, source, matchData, customizer) { + var index = matchData.length, + length = index, + noCustomizer = !customizer; + + if (object == null) { + return !length; + } + object = Object(object); + while (index--) { + var data = matchData[index]; + if (noCustomizer && data[2] ? data[1] !== object[data[0]] : !(data[0] in object)) { + return false; + } + } + while (++index < length) { + data = matchData[index]; + var key = data[0], + objValue = object[key], + srcValue = data[1]; + + if (noCustomizer && data[2]) { + if (objValue === undefined && !(key in object)) { + return false; + } + } else { + var stack = new Stack(); + if (customizer) { + var result = customizer(objValue, srcValue, key, object, source, stack); + } + if ( + !(result === undefined + ? baseIsEqual( + srcValue, + objValue, + COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, + customizer, + stack, + ) + : result) + ) { + return false; + } + } + } + return true; + } + + /** + * The base implementation of `_.isNative` without bad shim checks. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + */ + function baseIsNative(value) { + if (!isObject(value) || isMasked(value)) { + return false; + } + var pattern = isFunction(value) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); + } + + /** + * The base implementation of `_.isRegExp` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. + */ + function baseIsRegExp(value) { + return isObjectLike(value) && baseGetTag(value) == regexpTag; + } + + /** + * The base implementation of `_.isSet` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a set, else `false`. + */ + function baseIsSet(value) { + return isObjectLike(value) && getTag(value) == setTag; + } + + /** + * The base implementation of `_.isTypedArray` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + */ + function baseIsTypedArray(value) { + return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; + } + + /** + * The base implementation of `_.iteratee`. + * + * @private + * @param {*} [value=_.identity] The value to convert to an iteratee. + * @returns {Function} Returns the iteratee. + */ + function baseIteratee(value) { + // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9. + // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details. + if (typeof value == 'function') { + return value; + } + if (value == null) { + return identity; + } + if (typeof value == 'object') { + return isArray(value) ? baseMatchesProperty(value[0], value[1]) : baseMatches(value); + } + return property(value); + } + + /** + * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + function baseKeys(object) { + if (!isPrototype(object)) { + return nativeKeys(object); + } + var result = []; + for (var key in Object(object)) { + if (hasOwnProperty.call(object, key) && key != 'constructor') { + result.push(key); + } + } + return result; + } + + /** + * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + function baseKeysIn(object) { + if (!isObject(object)) { + return nativeKeysIn(object); + } + var isProto = isPrototype(object), + result = []; + + for (var key in object) { + if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { + result.push(key); + } + } + return result; + } + + /** + * The base implementation of `_.lt` which doesn't coerce arguments. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than `other`, + * else `false`. + */ + function baseLt(value, other) { + return value < other; + } + + /** + * The base implementation of `_.map` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ + function baseMap(collection, iteratee) { + var index = -1, + result = isArrayLike(collection) ? Array(collection.length) : []; + + baseEach(collection, function (value, key, collection) { + result[++index] = iteratee(value, key, collection); + }); + return result; + } + + /** + * The base implementation of `_.matches` which doesn't clone `source`. + * + * @private + * @param {Object} source The object of property values to match. + * @returns {Function} Returns the new spec function. + */ + function baseMatches(source) { + var matchData = getMatchData(source); + if (matchData.length == 1 && matchData[0][2]) { + return matchesStrictComparable(matchData[0][0], matchData[0][1]); + } + return function (object) { + return object === source || baseIsMatch(object, source, matchData); + }; + } + + /** + * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`. + * + * @private + * @param {string} path The path of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + */ + function baseMatchesProperty(path, srcValue) { + if (isKey(path) && isStrictComparable(srcValue)) { + return matchesStrictComparable(toKey(path), srcValue); + } + return function (object) { + var objValue = get(object, path); + return objValue === undefined && objValue === srcValue + ? hasIn(object, path) + : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG); + }; + } + + /** + * The base implementation of `_.merge` without support for multiple sources. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {number} srcIndex The index of `source`. + * @param {Function} [customizer] The function to customize merged values. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + */ + function baseMerge(object, source, srcIndex, customizer, stack) { + if (object === source) { + return; + } + baseFor( + source, + function (srcValue, key) { + stack || (stack = new Stack()); + if (isObject(srcValue)) { + baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack); + } else { + var newValue = customizer + ? customizer(safeGet(object, key), srcValue, key + '', object, source, stack) + : undefined; + + if (newValue === undefined) { + newValue = srcValue; + } + assignMergeValue(object, key, newValue); + } + }, + keysIn, + ); + } + + /** + * A specialized version of `baseMerge` for arrays and objects which performs + * deep merges and tracks traversed objects enabling objects with circular + * references to be merged. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {string} key The key of the value to merge. + * @param {number} srcIndex The index of `source`. + * @param {Function} mergeFunc The function to merge values. + * @param {Function} [customizer] The function to customize assigned values. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + */ + function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) { + var objValue = safeGet(object, key), + srcValue = safeGet(source, key), + stacked = stack.get(srcValue); + + if (stacked) { + assignMergeValue(object, key, stacked); + return; + } + var newValue = customizer + ? customizer(objValue, srcValue, key + '', object, source, stack) + : undefined; + + var isCommon = newValue === undefined; + + if (isCommon) { + var isArr = isArray(srcValue), + isBuff = !isArr && isBuffer(srcValue), + isTyped = !isArr && !isBuff && isTypedArray(srcValue); + + newValue = srcValue; + if (isArr || isBuff || isTyped) { + if (isArray(objValue)) { + newValue = objValue; + } else if (isArrayLikeObject(objValue)) { + newValue = copyArray(objValue); + } else if (isBuff) { + isCommon = false; + newValue = cloneBuffer(srcValue, true); + } else if (isTyped) { + isCommon = false; + newValue = cloneTypedArray(srcValue, true); + } else { + newValue = []; + } + } else if (isPlainObject(srcValue) || isArguments(srcValue)) { + newValue = objValue; + if (isArguments(objValue)) { + newValue = toPlainObject(objValue); + } else if (!isObject(objValue) || isFunction(objValue)) { + newValue = initCloneObject(srcValue); + } + } else { + isCommon = false; + } + } + if (isCommon) { + // Recursively merge objects and arrays (susceptible to call stack limits). + stack.set(srcValue, newValue); + mergeFunc(newValue, srcValue, srcIndex, customizer, stack); + stack['delete'](srcValue); + } + assignMergeValue(object, key, newValue); + } + + /** + * The base implementation of `_.nth` which doesn't coerce arguments. + * + * @private + * @param {Array} array The array to query. + * @param {number} n The index of the element to return. + * @returns {*} Returns the nth element of `array`. + */ + function baseNth(array, n) { + var length = array.length; + if (!length) { + return; + } + n += n < 0 ? length : 0; + return isIndex(n, length) ? array[n] : undefined; + } + + /** + * The base implementation of `_.orderBy` without param guards. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by. + * @param {string[]} orders The sort orders of `iteratees`. + * @returns {Array} Returns the new sorted array. + */ + function baseOrderBy(collection, iteratees, orders) { + var index = -1; + iteratees = arrayMap(iteratees.length ? iteratees : [identity], baseUnary(getIteratee())); + + var result = baseMap(collection, function (value, key, collection) { + var criteria = arrayMap(iteratees, function (iteratee) { + return iteratee(value); + }); + return { criteria: criteria, index: ++index, value: value }; + }); + + return baseSortBy(result, function (object, other) { + return compareMultiple(object, other, orders); + }); + } + + /** + * The base implementation of `_.pick` without support for individual + * property identifiers. + * + * @private + * @param {Object} object The source object. + * @param {string[]} paths The property paths to pick. + * @returns {Object} Returns the new object. + */ + function basePick(object, paths) { + return basePickBy(object, paths, function (value, path) { + return hasIn(object, path); + }); + } + + /** + * The base implementation of `_.pickBy` without support for iteratee shorthands. + * + * @private + * @param {Object} object The source object. + * @param {string[]} paths The property paths to pick. + * @param {Function} predicate The function invoked per property. + * @returns {Object} Returns the new object. + */ + function basePickBy(object, paths, predicate) { + var index = -1, + length = paths.length, + result = {}; + + while (++index < length) { + var path = paths[index], + value = baseGet(object, path); + + if (predicate(value, path)) { + baseSet(result, castPath(path, object), value); + } + } + return result; + } + + /** + * A specialized version of `baseProperty` which supports deep paths. + * + * @private + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new accessor function. + */ + function basePropertyDeep(path) { + return function (object) { + return baseGet(object, path); + }; + } + + /** + * The base implementation of `_.pullAllBy` without support for iteratee + * shorthands. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns `array`. + */ + function basePullAll(array, values, iteratee, comparator) { + var indexOf = comparator ? baseIndexOfWith : baseIndexOf, + index = -1, + length = values.length, + seen = array; + + if (array === values) { + values = copyArray(values); + } + if (iteratee) { + seen = arrayMap(array, baseUnary(iteratee)); + } + while (++index < length) { + var fromIndex = 0, + value = values[index], + computed = iteratee ? iteratee(value) : value; + + while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) { + if (seen !== array) { + splice.call(seen, fromIndex, 1); + } + splice.call(array, fromIndex, 1); + } + } + return array; + } + + /** + * The base implementation of `_.pullAt` without support for individual + * indexes or capturing the removed elements. + * + * @private + * @param {Array} array The array to modify. + * @param {number[]} indexes The indexes of elements to remove. + * @returns {Array} Returns `array`. + */ + function basePullAt(array, indexes) { + var length = array ? indexes.length : 0, + lastIndex = length - 1; + + while (length--) { + var index = indexes[length]; + if (length == lastIndex || index !== previous) { + var previous = index; + if (isIndex(index)) { + splice.call(array, index, 1); + } else { + baseUnset(array, index); + } + } + } + return array; + } + + /** + * The base implementation of `_.random` without support for returning + * floating-point numbers. + * + * @private + * @param {number} lower The lower bound. + * @param {number} upper The upper bound. + * @returns {number} Returns the random number. + */ + function baseRandom(lower, upper) { + return lower + nativeFloor(nativeRandom() * (upper - lower + 1)); + } + + /** + * The base implementation of `_.range` and `_.rangeRight` which doesn't + * coerce arguments. + * + * @private + * @param {number} start The start of the range. + * @param {number} end The end of the range. + * @param {number} step The value to increment or decrement by. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Array} Returns the range of numbers. + */ + function baseRange(start, end, step, fromRight) { + var index = -1, + length = nativeMax(nativeCeil((end - start) / (step || 1)), 0), + result = Array(length); + + while (length--) { + result[fromRight ? length : ++index] = start; + start += step; + } + return result; + } + + /** + * The base implementation of `_.repeat` which doesn't coerce arguments. + * + * @private + * @param {string} string The string to repeat. + * @param {number} n The number of times to repeat the string. + * @returns {string} Returns the repeated string. + */ + function baseRepeat(string, n) { + var result = ''; + if (!string || n < 1 || n > MAX_SAFE_INTEGER) { + return result; + } + // Leverage the exponentiation by squaring algorithm for a faster repeat. + // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details. + do { + if (n % 2) { + result += string; + } + n = nativeFloor(n / 2); + if (n) { + string += string; + } + } while (n); + + return result; + } + + /** + * The base implementation of `_.rest` which doesn't validate or coerce arguments. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + */ + function baseRest(func, start) { + return setToString(overRest(func, start, identity), func + ''); + } + + /** + * The base implementation of `_.sample`. + * + * @private + * @param {Array|Object} collection The collection to sample. + * @returns {*} Returns the random element. + */ + function baseSample(collection) { + return arraySample(values(collection)); + } + + /** + * The base implementation of `_.sampleSize` without param guards. + * + * @private + * @param {Array|Object} collection The collection to sample. + * @param {number} n The number of elements to sample. + * @returns {Array} Returns the random elements. + */ + function baseSampleSize(collection, n) { + var array = values(collection); + return shuffleSelf(array, baseClamp(n, 0, array.length)); + } + + /** + * The base implementation of `_.set`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @param {Function} [customizer] The function to customize path creation. + * @returns {Object} Returns `object`. + */ + function baseSet(object, path, value, customizer) { + if (!isObject(object)) { + return object; + } + path = castPath(path, object); + + var index = -1, + length = path.length, + lastIndex = length - 1, + nested = object; + + while (nested != null && ++index < length) { + var key = toKey(path[index]), + newValue = value; + + if (index != lastIndex) { + var objValue = nested[key]; + newValue = customizer ? customizer(objValue, key, nested) : undefined; + if (newValue === undefined) { + newValue = isObject(objValue) ? objValue : isIndex(path[index + 1]) ? [] : {}; + } + } + assignValue(nested, key, newValue); + nested = nested[key]; + } + return object; + } + + /** + * The base implementation of `setData` without support for hot loop shorting. + * + * @private + * @param {Function} func The function to associate metadata with. + * @param {*} data The metadata. + * @returns {Function} Returns `func`. + */ + var baseSetData = !metaMap + ? identity + : function (func, data) { + metaMap.set(func, data); + return func; + }; + + /** + * The base implementation of `setToString` without support for hot loop shorting. + * + * @private + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. + */ + var baseSetToString = !defineProperty + ? identity + : function (func, string) { + return defineProperty(func, 'toString', { + configurable: true, + enumerable: false, + value: constant(string), + writable: true, + }); + }; + + /** + * The base implementation of `_.shuffle`. + * + * @private + * @param {Array|Object} collection The collection to shuffle. + * @returns {Array} Returns the new shuffled array. + */ + function baseShuffle(collection) { + return shuffleSelf(values(collection)); + } + + /** + * The base implementation of `_.slice` without an iteratee call guard. + * + * @private + * @param {Array} array The array to slice. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the slice of `array`. + */ + function baseSlice(array, start, end) { + var index = -1, + length = array.length; + + if (start < 0) { + start = -start > length ? 0 : length + start; + } + end = end > length ? length : end; + if (end < 0) { + end += length; + } + length = start > end ? 0 : (end - start) >>> 0; + start >>>= 0; + + var result = Array(length); + while (++index < length) { + result[index] = array[index + start]; + } + return result; + } + + /** + * The base implementation of `_.some` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ + function baseSome(collection, predicate) { + var result; + + baseEach(collection, function (value, index, collection) { + result = predicate(value, index, collection); + return !result; + }); + return !!result; + } + + /** + * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which + * performs a binary search of `array` to determine the index at which `value` + * should be inserted into `array` in order to maintain its sort order. + * + * @private + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {boolean} [retHighest] Specify returning the highest qualified index. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + */ + function baseSortedIndex(array, value, retHighest) { + var low = 0, + high = array == null ? low : array.length; + + if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) { + while (low < high) { + var mid = (low + high) >>> 1, + computed = array[mid]; + + if ( + computed !== null && + !isSymbol(computed) && + (retHighest ? computed <= value : computed < value) + ) { + low = mid + 1; + } else { + high = mid; + } + } + return high; + } + return baseSortedIndexBy(array, value, identity, retHighest); + } + + /** + * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy` + * which invokes `iteratee` for `value` and each element of `array` to compute + * their sort ranking. The iteratee is invoked with one argument; (value). + * + * @private + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function} iteratee The iteratee invoked per element. + * @param {boolean} [retHighest] Specify returning the highest qualified index. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + */ + function baseSortedIndexBy(array, value, iteratee, retHighest) { + value = iteratee(value); + + var low = 0, + high = array == null ? 0 : array.length, + valIsNaN = value !== value, + valIsNull = value === null, + valIsSymbol = isSymbol(value), + valIsUndefined = value === undefined; + + while (low < high) { + var mid = nativeFloor((low + high) / 2), + computed = iteratee(array[mid]), + othIsDefined = computed !== undefined, + othIsNull = computed === null, + othIsReflexive = computed === computed, + othIsSymbol = isSymbol(computed); + + if (valIsNaN) { + var setLow = retHighest || othIsReflexive; + } else if (valIsUndefined) { + setLow = othIsReflexive && (retHighest || othIsDefined); + } else if (valIsNull) { + setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull); + } else if (valIsSymbol) { + setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol); + } else if (othIsNull || othIsSymbol) { + setLow = false; + } else { + setLow = retHighest ? computed <= value : computed < value; + } + if (setLow) { + low = mid + 1; + } else { + high = mid; + } + } + return nativeMin(high, MAX_ARRAY_INDEX); + } + + /** + * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without + * support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @returns {Array} Returns the new duplicate free array. + */ + function baseSortedUniq(array, iteratee) { + var index = -1, + length = array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + if (!index || !eq(computed, seen)) { + var seen = computed; + result[resIndex++] = value === 0 ? 0 : value; + } + } + return result; + } + + /** + * The base implementation of `_.toNumber` which doesn't ensure correct + * conversions of binary, hexadecimal, or octal string values. + * + * @private + * @param {*} value The value to process. + * @returns {number} Returns the number. + */ + function baseToNumber(value) { + if (typeof value == 'number') { + return value; + } + if (isSymbol(value)) { + return NAN; + } + return +value; + } + + /** + * The base implementation of `_.toString` which doesn't convert nullish + * values to empty strings. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ + function baseToString(value) { + // Exit early for strings to avoid a performance hit in some environments. + if (typeof value == 'string') { + return value; + } + if (isArray(value)) { + // Recursively convert values (susceptible to call stack limits). + return arrayMap(value, baseToString) + ''; + } + if (isSymbol(value)) { + return symbolToString ? symbolToString.call(value) : ''; + } + var result = value + ''; + return result == '0' && 1 / value == -INFINITY ? '-0' : result; + } + + /** + * The base implementation of `_.uniqBy` without support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new duplicate free array. + */ + function baseUniq(array, iteratee, comparator) { + var index = -1, + includes = arrayIncludes, + length = array.length, + isCommon = true, + result = [], + seen = result; + + if (comparator) { + isCommon = false; + includes = arrayIncludesWith; + } else if (length >= LARGE_ARRAY_SIZE) { + var set = iteratee ? null : createSet(array); + if (set) { + return setToArray(set); + } + isCommon = false; + includes = cacheHas; + seen = new SetCache(); + } else { + seen = iteratee ? [] : result; + } + outer: while (++index < length) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + value = comparator || value !== 0 ? value : 0; + if (isCommon && computed === computed) { + var seenIndex = seen.length; + while (seenIndex--) { + if (seen[seenIndex] === computed) { + continue outer; + } + } + if (iteratee) { + seen.push(computed); + } + result.push(value); + } else if (!includes(seen, computed, comparator)) { + if (seen !== result) { + seen.push(computed); + } + result.push(value); + } + } + return result; + } + + /** + * The base implementation of `_.unset`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The property path to unset. + * @returns {boolean} Returns `true` if the property is deleted, else `false`. + */ + function baseUnset(object, path) { + path = castPath(path, object); + object = parent(object, path); + return object == null || delete object[toKey(last(path))]; + } + + /** + * The base implementation of `_.update`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to update. + * @param {Function} updater The function to produce the updated value. + * @param {Function} [customizer] The function to customize path creation. + * @returns {Object} Returns `object`. + */ + function baseUpdate(object, path, updater, customizer) { + return baseSet(object, path, updater(baseGet(object, path)), customizer); + } + + /** + * The base implementation of methods like `_.dropWhile` and `_.takeWhile` + * without support for iteratee shorthands. + * + * @private + * @param {Array} array The array to query. + * @param {Function} predicate The function invoked per iteration. + * @param {boolean} [isDrop] Specify dropping elements instead of taking them. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Array} Returns the slice of `array`. + */ + function baseWhile(array, predicate, isDrop, fromRight) { + var length = array.length, + index = fromRight ? length : -1; + + while ((fromRight ? index-- : ++index < length) && predicate(array[index], index, array)) {} + + return isDrop + ? baseSlice(array, fromRight ? 0 : index, fromRight ? index + 1 : length) + : baseSlice(array, fromRight ? index + 1 : 0, fromRight ? length : index); + } + + /** + * The base implementation of `wrapperValue` which returns the result of + * performing a sequence of actions on the unwrapped `value`, where each + * successive action is supplied the return value of the previous. + * + * @private + * @param {*} value The unwrapped value. + * @param {Array} actions Actions to perform to resolve the unwrapped value. + * @returns {*} Returns the resolved value. + */ + function baseWrapperValue(value, actions) { + var result = value; + if (result instanceof LazyWrapper) { + result = result.value(); + } + return arrayReduce( + actions, + function (result, action) { + return action.func.apply(action.thisArg, arrayPush([result], action.args)); + }, + result, + ); + } + + /** + * The base implementation of methods like `_.xor`, without support for + * iteratee shorthands, that accepts an array of arrays to inspect. + * + * @private + * @param {Array} arrays The arrays to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of values. + */ + function baseXor(arrays, iteratee, comparator) { + var length = arrays.length; + if (length < 2) { + return length ? baseUniq(arrays[0]) : []; + } + var index = -1, + result = Array(length); + + while (++index < length) { + var array = arrays[index], + othIndex = -1; + + while (++othIndex < length) { + if (othIndex != index) { + result[index] = baseDifference( + result[index] || array, + arrays[othIndex], + iteratee, + comparator, + ); + } + } + } + return baseUniq(baseFlatten(result, 1), iteratee, comparator); + } + + /** + * This base implementation of `_.zipObject` which assigns values using `assignFunc`. + * + * @private + * @param {Array} props The property identifiers. + * @param {Array} values The property values. + * @param {Function} assignFunc The function to assign values. + * @returns {Object} Returns the new object. + */ + function baseZipObject(props, values, assignFunc) { + var index = -1, + length = props.length, + valsLength = values.length, + result = {}; + + while (++index < length) { + var value = index < valsLength ? values[index] : undefined; + assignFunc(result, props[index], value); + } + return result; + } + + /** + * Casts `value` to an empty array if it's not an array like object. + * + * @private + * @param {*} value The value to inspect. + * @returns {Array|Object} Returns the cast array-like object. + */ + function castArrayLikeObject(value) { + return isArrayLikeObject(value) ? value : []; + } + + /** + * Casts `value` to `identity` if it's not a function. + * + * @private + * @param {*} value The value to inspect. + * @returns {Function} Returns cast function. + */ + function castFunction(value) { + return typeof value == 'function' ? value : identity; + } + + /** + * Casts `value` to a path array if it's not one. + * + * @private + * @param {*} value The value to inspect. + * @param {Object} [object] The object to query keys on. + * @returns {Array} Returns the cast property path array. + */ + function castPath(value, object) { + if (isArray(value)) { + return value; + } + return isKey(value, object) ? [value] : stringToPath(toString(value)); + } + + /** + * A `baseRest` alias which can be replaced with `identity` by module + * replacement plugins. + * + * @private + * @type {Function} + * @param {Function} func The function to apply a rest parameter to. + * @returns {Function} Returns the new function. + */ + var castRest = baseRest; + + /** + * Casts `array` to a slice if it's needed. + * + * @private + * @param {Array} array The array to inspect. + * @param {number} start The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the cast slice. + */ + function castSlice(array, start, end) { + var length = array.length; + end = end === undefined ? length : end; + return !start && end >= length ? array : baseSlice(array, start, end); + } + + /** + * A simple wrapper around the global [`clearTimeout`](https://mdn.io/clearTimeout). + * + * @private + * @param {number|Object} id The timer id or timeout object of the timer to clear. + */ + var clearTimeout = + ctxClearTimeout || + function (id) { + return root.clearTimeout(id); + }; + + /** + * Creates a clone of `buffer`. + * + * @private + * @param {Buffer} buffer The buffer to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Buffer} Returns the cloned buffer. + */ + function cloneBuffer(buffer, isDeep) { + if (isDeep) { + return buffer.slice(); + } + var length = buffer.length, + result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length); + + buffer.copy(result); + return result; + } + + /** + * Creates a clone of `arrayBuffer`. + * + * @private + * @param {ArrayBuffer} arrayBuffer The array buffer to clone. + * @returns {ArrayBuffer} Returns the cloned array buffer. + */ + function cloneArrayBuffer(arrayBuffer) { + var result = new arrayBuffer.constructor(arrayBuffer.byteLength); + new Uint8Array(result).set(new Uint8Array(arrayBuffer)); + return result; + } + + /** + * Creates a clone of `dataView`. + * + * @private + * @param {Object} dataView The data view to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned data view. + */ + function cloneDataView(dataView, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer; + return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); + } + + /** + * Creates a clone of `regexp`. + * + * @private + * @param {Object} regexp The regexp to clone. + * @returns {Object} Returns the cloned regexp. + */ + function cloneRegExp(regexp) { + var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); + result.lastIndex = regexp.lastIndex; + return result; + } + + /** + * Creates a clone of the `symbol` object. + * + * @private + * @param {Object} symbol The symbol object to clone. + * @returns {Object} Returns the cloned symbol object. + */ + function cloneSymbol(symbol) { + return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; + } + + /** + * Creates a clone of `typedArray`. + * + * @private + * @param {Object} typedArray The typed array to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned typed array. + */ + function cloneTypedArray(typedArray, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; + return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); + } + + /** + * Compares values to sort them in ascending order. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {number} Returns the sort order indicator for `value`. + */ + function compareAscending(value, other) { + if (value !== other) { + var valIsDefined = value !== undefined, + valIsNull = value === null, + valIsReflexive = value === value, + valIsSymbol = isSymbol(value); + + var othIsDefined = other !== undefined, + othIsNull = other === null, + othIsReflexive = other === other, + othIsSymbol = isSymbol(other); + + if ( + (!othIsNull && !othIsSymbol && !valIsSymbol && value > other) || + (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) || + (valIsNull && othIsDefined && othIsReflexive) || + (!valIsDefined && othIsReflexive) || + !valIsReflexive + ) { + return 1; + } + if ( + (!valIsNull && !valIsSymbol && !othIsSymbol && value < other) || + (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) || + (othIsNull && valIsDefined && valIsReflexive) || + (!othIsDefined && valIsReflexive) || + !othIsReflexive + ) { + return -1; + } + } + return 0; + } + + /** + * Used by `_.orderBy` to compare multiple properties of a value to another + * and stable sort them. + * + * If `orders` is unspecified, all values are sorted in ascending order. Otherwise, + * specify an order of "desc" for descending or "asc" for ascending sort order + * of corresponding values. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {boolean[]|string[]} orders The order to sort by for each property. + * @returns {number} Returns the sort order indicator for `object`. + */ + function compareMultiple(object, other, orders) { + var index = -1, + objCriteria = object.criteria, + othCriteria = other.criteria, + length = objCriteria.length, + ordersLength = orders.length; + + while (++index < length) { + var result = compareAscending(objCriteria[index], othCriteria[index]); + if (result) { + if (index >= ordersLength) { + return result; + } + var order = orders[index]; + return result * (order == 'desc' ? -1 : 1); + } + } + // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications + // that causes it, under certain circumstances, to provide the same value for + // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247 + // for more details. + // + // This also ensures a stable sort in V8 and other engines. + // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details. + return object.index - other.index; + } + + /** + * Creates an array that is the composition of partially applied arguments, + * placeholders, and provided arguments into a single array of arguments. + * + * @private + * @param {Array} args The provided arguments. + * @param {Array} partials The arguments to prepend to those provided. + * @param {Array} holders The `partials` placeholder indexes. + * @params {boolean} [isCurried] Specify composing for a curried function. + * @returns {Array} Returns the new array of composed arguments. + */ + function composeArgs(args, partials, holders, isCurried) { + var argsIndex = -1, + argsLength = args.length, + holdersLength = holders.length, + leftIndex = -1, + leftLength = partials.length, + rangeLength = nativeMax(argsLength - holdersLength, 0), + result = Array(leftLength + rangeLength), + isUncurried = !isCurried; + + while (++leftIndex < leftLength) { + result[leftIndex] = partials[leftIndex]; + } + while (++argsIndex < holdersLength) { + if (isUncurried || argsIndex < argsLength) { + result[holders[argsIndex]] = args[argsIndex]; + } + } + while (rangeLength--) { + result[leftIndex++] = args[argsIndex++]; + } + return result; + } + + /** + * This function is like `composeArgs` except that the arguments composition + * is tailored for `_.partialRight`. + * + * @private + * @param {Array} args The provided arguments. + * @param {Array} partials The arguments to append to those provided. + * @param {Array} holders The `partials` placeholder indexes. + * @params {boolean} [isCurried] Specify composing for a curried function. + * @returns {Array} Returns the new array of composed arguments. + */ + function composeArgsRight(args, partials, holders, isCurried) { + var argsIndex = -1, + argsLength = args.length, + holdersIndex = -1, + holdersLength = holders.length, + rightIndex = -1, + rightLength = partials.length, + rangeLength = nativeMax(argsLength - holdersLength, 0), + result = Array(rangeLength + rightLength), + isUncurried = !isCurried; + + while (++argsIndex < rangeLength) { + result[argsIndex] = args[argsIndex]; + } + var offset = argsIndex; + while (++rightIndex < rightLength) { + result[offset + rightIndex] = partials[rightIndex]; + } + while (++holdersIndex < holdersLength) { + if (isUncurried || argsIndex < argsLength) { + result[offset + holders[holdersIndex]] = args[argsIndex++]; + } + } + return result; + } + + /** + * Copies the values of `source` to `array`. + * + * @private + * @param {Array} source The array to copy values from. + * @param {Array} [array=[]] The array to copy values to. + * @returns {Array} Returns `array`. + */ + function copyArray(source, array) { + var index = -1, + length = source.length; + + array || (array = Array(length)); + while (++index < length) { + array[index] = source[index]; + } + return array; + } + + /** + * Copies properties of `source` to `object`. + * + * @private + * @param {Object} source The object to copy properties from. + * @param {Array} props The property identifiers to copy. + * @param {Object} [object={}] The object to copy properties to. + * @param {Function} [customizer] The function to customize copied values. + * @returns {Object} Returns `object`. + */ + function copyObject(source, props, object, customizer) { + var isNew = !object; + object || (object = {}); + + var index = -1, + length = props.length; + + while (++index < length) { + var key = props[index]; + + var newValue = customizer + ? customizer(object[key], source[key], key, object, source) + : undefined; + + if (newValue === undefined) { + newValue = source[key]; + } + if (isNew) { + baseAssignValue(object, key, newValue); + } else { + assignValue(object, key, newValue); + } + } + return object; + } + + /** + * Copies own symbols of `source` to `object`. + * + * @private + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. + */ + function copySymbols(source, object) { + return copyObject(source, getSymbols(source), object); + } + + /** + * Copies own and inherited symbols of `source` to `object`. + * + * @private + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. + */ + function copySymbolsIn(source, object) { + return copyObject(source, getSymbolsIn(source), object); + } + + /** + * Creates a function like `_.groupBy`. + * + * @private + * @param {Function} setter The function to set accumulator values. + * @param {Function} [initializer] The accumulator object initializer. + * @returns {Function} Returns the new aggregator function. + */ + function createAggregator(setter, initializer) { + return function (collection, iteratee) { + var func = isArray(collection) ? arrayAggregator : baseAggregator, + accumulator = initializer ? initializer() : {}; + + return func(collection, setter, getIteratee(iteratee, 2), accumulator); + }; + } + + /** + * Creates a function like `_.assign`. + * + * @private + * @param {Function} assigner The function to assign values. + * @returns {Function} Returns the new assigner function. + */ + function createAssigner(assigner) { + return baseRest(function (object, sources) { + var index = -1, + length = sources.length, + customizer = length > 1 ? sources[length - 1] : undefined, + guard = length > 2 ? sources[2] : undefined; + + customizer = + assigner.length > 3 && typeof customizer == 'function' ? (length--, customizer) : undefined; + + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + customizer = length < 3 ? undefined : customizer; + length = 1; + } + object = Object(object); + while (++index < length) { + var source = sources[index]; + if (source) { + assigner(object, source, index, customizer); + } + } + return object; + }); + } + + /** + * Creates a `baseEach` or `baseEachRight` function. + * + * @private + * @param {Function} eachFunc The function to iterate over a collection. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ + function createBaseEach(eachFunc, fromRight) { + return function (collection, iteratee) { + if (collection == null) { + return collection; + } + if (!isArrayLike(collection)) { + return eachFunc(collection, iteratee); + } + var length = collection.length, + index = fromRight ? length : -1, + iterable = Object(collection); + + while (fromRight ? index-- : ++index < length) { + if (iteratee(iterable[index], index, iterable) === false) { + break; + } + } + return collection; + }; + } + + /** + * Creates a base function for methods like `_.forIn` and `_.forOwn`. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ + function createBaseFor(fromRight) { + return function (object, iteratee, keysFunc) { + var index = -1, + iterable = Object(object), + props = keysFunc(object), + length = props.length; + + while (length--) { + var key = props[fromRight ? length : ++index]; + if (iteratee(iterable[key], key, iterable) === false) { + break; + } + } + return object; + }; + } + + /** + * Creates a function that wraps `func` to invoke it with the optional `this` + * binding of `thisArg`. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {*} [thisArg] The `this` binding of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createBind(func, bitmask, thisArg) { + var isBind = bitmask & WRAP_BIND_FLAG, + Ctor = createCtor(func); + + function wrapper() { + var fn = this && this !== root && this instanceof wrapper ? Ctor : func; + return fn.apply(isBind ? thisArg : this, arguments); + } + return wrapper; + } + + /** + * Creates a function like `_.lowerFirst`. + * + * @private + * @param {string} methodName The name of the `String` case method to use. + * @returns {Function} Returns the new case function. + */ + function createCaseFirst(methodName) { + return function (string) { + string = toString(string); + + var strSymbols = hasUnicode(string) ? stringToArray(string) : undefined; + + var chr = strSymbols ? strSymbols[0] : string.charAt(0); + + var trailing = strSymbols ? castSlice(strSymbols, 1).join('') : string.slice(1); + + return chr[methodName]() + trailing; + }; + } + + /** + * Creates a function like `_.camelCase`. + * + * @private + * @param {Function} callback The function to combine each word. + * @returns {Function} Returns the new compounder function. + */ + function createCompounder(callback) { + return function (string) { + return arrayReduce(words(deburr(string).replace(reApos, '')), callback, ''); + }; + } + + /** + * Creates a function that produces an instance of `Ctor` regardless of + * whether it was invoked as part of a `new` expression or by `call` or `apply`. + * + * @private + * @param {Function} Ctor The constructor to wrap. + * @returns {Function} Returns the new wrapped function. + */ + function createCtor(Ctor) { + return function () { + // Use a `switch` statement to work with class constructors. See + // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist + // for more details. + var args = arguments; + switch (args.length) { + case 0: + return new Ctor(); + case 1: + return new Ctor(args[0]); + case 2: + return new Ctor(args[0], args[1]); + case 3: + return new Ctor(args[0], args[1], args[2]); + case 4: + return new Ctor(args[0], args[1], args[2], args[3]); + case 5: + return new Ctor(args[0], args[1], args[2], args[3], args[4]); + case 6: + return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]); + case 7: + return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]); + } + var thisBinding = baseCreate(Ctor.prototype), + result = Ctor.apply(thisBinding, args); + + // Mimic the constructor's `return` behavior. + // See https://es5.github.io/#x13.2.2 for more details. + return isObject(result) ? result : thisBinding; + }; + } + + /** + * Creates a function that wraps `func` to enable currying. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {number} arity The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createCurry(func, bitmask, arity) { + var Ctor = createCtor(func); + + function wrapper() { + var length = arguments.length, + args = Array(length), + index = length, + placeholder = getHolder(wrapper); + + while (index--) { + args[index] = arguments[index]; + } + var holders = + length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder + ? [] + : replaceHolders(args, placeholder); + + length -= holders.length; + if (length < arity) { + return createRecurry( + func, + bitmask, + createHybrid, + wrapper.placeholder, + undefined, + args, + holders, + undefined, + undefined, + arity - length, + ); + } + var fn = this && this !== root && this instanceof wrapper ? Ctor : func; + return apply(fn, this, args); + } + return wrapper; + } + + /** + * Creates a `_.find` or `_.findLast` function. + * + * @private + * @param {Function} findIndexFunc The function to find the collection index. + * @returns {Function} Returns the new find function. + */ + function createFind(findIndexFunc) { + return function (collection, predicate, fromIndex) { + var iterable = Object(collection); + if (!isArrayLike(collection)) { + var iteratee = getIteratee(predicate, 3); + collection = keys(collection); + predicate = function (key) { + return iteratee(iterable[key], key, iterable); + }; + } + var index = findIndexFunc(collection, predicate, fromIndex); + return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined; + }; + } + + /** + * Creates a `_.flow` or `_.flowRight` function. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new flow function. + */ + function createFlow(fromRight) { + return flatRest(function (funcs) { + var length = funcs.length, + index = length, + prereq = LodashWrapper.prototype.thru; + + if (fromRight) { + funcs.reverse(); + } + while (index--) { + var func = funcs[index]; + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + if (prereq && !wrapper && getFuncName(func) == 'wrapper') { + var wrapper = new LodashWrapper([], true); + } + } + index = wrapper ? index : length; + while (++index < length) { + func = funcs[index]; + + var funcName = getFuncName(func), + data = funcName == 'wrapper' ? getData(func) : undefined; + + if ( + data && + isLaziable(data[0]) && + data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) && + !data[4].length && + data[9] == 1 + ) { + wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]); + } else { + wrapper = func.length == 1 && isLaziable(func) ? wrapper[funcName]() : wrapper.thru(func); + } + } + return function () { + var args = arguments, + value = args[0]; + + if (wrapper && args.length == 1 && isArray(value)) { + return wrapper.plant(value).value(); + } + var index = 0, + result = length ? funcs[index].apply(this, args) : value; + + while (++index < length) { + result = funcs[index].call(this, result); + } + return result; + }; + }); + } + + /** + * Creates a function that wraps `func` to invoke it with optional `this` + * binding of `thisArg`, partial application, and currying. + * + * @private + * @param {Function|string} func The function or method name to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to prepend to those provided to + * the new function. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [partialsRight] The arguments to append to those provided + * to the new function. + * @param {Array} [holdersRight] The `partialsRight` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createHybrid( + func, + bitmask, + thisArg, + partials, + holders, + partialsRight, + holdersRight, + argPos, + ary, + arity, + ) { + var isAry = bitmask & WRAP_ARY_FLAG, + isBind = bitmask & WRAP_BIND_FLAG, + isBindKey = bitmask & WRAP_BIND_KEY_FLAG, + isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG), + isFlip = bitmask & WRAP_FLIP_FLAG, + Ctor = isBindKey ? undefined : createCtor(func); + + function wrapper() { + var length = arguments.length, + args = Array(length), + index = length; + + while (index--) { + args[index] = arguments[index]; + } + if (isCurried) { + var placeholder = getHolder(wrapper), + holdersCount = countHolders(args, placeholder); + } + if (partials) { + args = composeArgs(args, partials, holders, isCurried); + } + if (partialsRight) { + args = composeArgsRight(args, partialsRight, holdersRight, isCurried); + } + length -= holdersCount; + if (isCurried && length < arity) { + var newHolders = replaceHolders(args, placeholder); + return createRecurry( + func, + bitmask, + createHybrid, + wrapper.placeholder, + thisArg, + args, + newHolders, + argPos, + ary, + arity - length, + ); + } + var thisBinding = isBind ? thisArg : this, + fn = isBindKey ? thisBinding[func] : func; + + length = args.length; + if (argPos) { + args = reorder(args, argPos); + } else if (isFlip && length > 1) { + args.reverse(); + } + if (isAry && ary < length) { + args.length = ary; + } + if (this && this !== root && this instanceof wrapper) { + fn = Ctor || createCtor(fn); + } + return fn.apply(thisBinding, args); + } + return wrapper; + } + + /** + * Creates a function like `_.invertBy`. + * + * @private + * @param {Function} setter The function to set accumulator values. + * @param {Function} toIteratee The function to resolve iteratees. + * @returns {Function} Returns the new inverter function. + */ + function createInverter(setter, toIteratee) { + return function (object, iteratee) { + return baseInverter(object, setter, toIteratee(iteratee), {}); + }; + } + + /** + * Creates a function that performs a mathematical operation on two values. + * + * @private + * @param {Function} operator The function to perform the operation. + * @param {number} [defaultValue] The value used for `undefined` arguments. + * @returns {Function} Returns the new mathematical operation function. + */ + function createMathOperation(operator, defaultValue) { + return function (value, other) { + var result; + if (value === undefined && other === undefined) { + return defaultValue; + } + if (value !== undefined) { + result = value; + } + if (other !== undefined) { + if (result === undefined) { + return other; + } + if (typeof value == 'string' || typeof other == 'string') { + value = baseToString(value); + other = baseToString(other); + } else { + value = baseToNumber(value); + other = baseToNumber(other); + } + result = operator(value, other); + } + return result; + }; + } + + /** + * Creates a function like `_.over`. + * + * @private + * @param {Function} arrayFunc The function to iterate over iteratees. + * @returns {Function} Returns the new over function. + */ + function createOver(arrayFunc) { + return flatRest(function (iteratees) { + iteratees = arrayMap(iteratees, baseUnary(getIteratee())); + return baseRest(function (args) { + var thisArg = this; + return arrayFunc(iteratees, function (iteratee) { + return apply(iteratee, thisArg, args); + }); + }); + }); + } + + /** + * Creates the padding for `string` based on `length`. The `chars` string + * is truncated if the number of characters exceeds `length`. + * + * @private + * @param {number} length The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padding for `string`. + */ + function createPadding(length, chars) { + chars = chars === undefined ? ' ' : baseToString(chars); + + var charsLength = chars.length; + if (charsLength < 2) { + return charsLength ? baseRepeat(chars, length) : chars; + } + var result = baseRepeat(chars, nativeCeil(length / stringSize(chars))); + return hasUnicode(chars) + ? castSlice(stringToArray(result), 0, length).join('') + : result.slice(0, length); + } + + /** + * Creates a function that wraps `func` to invoke it with the `this` binding + * of `thisArg` and `partials` prepended to the arguments it receives. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} partials The arguments to prepend to those provided to + * the new function. + * @returns {Function} Returns the new wrapped function. + */ + function createPartial(func, bitmask, thisArg, partials) { + var isBind = bitmask & WRAP_BIND_FLAG, + Ctor = createCtor(func); + + function wrapper() { + var argsIndex = -1, + argsLength = arguments.length, + leftIndex = -1, + leftLength = partials.length, + args = Array(leftLength + argsLength), + fn = this && this !== root && this instanceof wrapper ? Ctor : func; + + while (++leftIndex < leftLength) { + args[leftIndex] = partials[leftIndex]; + } + while (argsLength--) { + args[leftIndex++] = arguments[++argsIndex]; + } + return apply(fn, isBind ? thisArg : this, args); + } + return wrapper; + } + + /** + * Creates a `_.range` or `_.rangeRight` function. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new range function. + */ + function createRange(fromRight) { + return function (start, end, step) { + if (step && typeof step != 'number' && isIterateeCall(start, end, step)) { + end = step = undefined; + } + // Ensure the sign of `-0` is preserved. + start = toFinite(start); + if (end === undefined) { + end = start; + start = 0; + } else { + end = toFinite(end); + } + step = step === undefined ? (start < end ? 1 : -1) : toFinite(step); + return baseRange(start, end, step, fromRight); + }; + } + + /** + * Creates a function that performs a relational operation on two values. + * + * @private + * @param {Function} operator The function to perform the operation. + * @returns {Function} Returns the new relational operation function. + */ + function createRelationalOperation(operator) { + return function (value, other) { + if (!(typeof value == 'string' && typeof other == 'string')) { + value = toNumber(value); + other = toNumber(other); + } + return operator(value, other); + }; + } + + /** + * Creates a function that wraps `func` to continue currying. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {Function} wrapFunc The function to create the `func` wrapper. + * @param {*} placeholder The placeholder value. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to prepend to those provided to + * the new function. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createRecurry( + func, + bitmask, + wrapFunc, + placeholder, + thisArg, + partials, + holders, + argPos, + ary, + arity, + ) { + var isCurry = bitmask & WRAP_CURRY_FLAG, + newHolders = isCurry ? holders : undefined, + newHoldersRight = isCurry ? undefined : holders, + newPartials = isCurry ? partials : undefined, + newPartialsRight = isCurry ? undefined : partials; + + bitmask |= isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG; + bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG); + + if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) { + bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG); + } + var newData = [ + func, + bitmask, + thisArg, + newPartials, + newHolders, + newPartialsRight, + newHoldersRight, + argPos, + ary, + arity, + ]; + + var result = wrapFunc.apply(undefined, newData); + if (isLaziable(func)) { + setData(result, newData); + } + result.placeholder = placeholder; + return setWrapToString(result, func, bitmask); + } + + /** + * Creates a function like `_.round`. + * + * @private + * @param {string} methodName The name of the `Math` method to use when rounding. + * @returns {Function} Returns the new round function. + */ + function createRound(methodName) { + var func = Math[methodName]; + return function (number, precision) { + number = toNumber(number); + precision = precision == null ? 0 : nativeMin(toInteger(precision), 292); + if (precision && nativeIsFinite(number)) { + // Shift with exponential notation to avoid floating-point issues. + // See [MDN](https://mdn.io/round#Examples) for more details. + var pair = (toString(number) + 'e').split('e'), + value = func(pair[0] + 'e' + (+pair[1] + precision)); + + pair = (toString(value) + 'e').split('e'); + return +(pair[0] + 'e' + (+pair[1] - precision)); + } + return func(number); + }; + } + + /** + * Creates a set object of `values`. + * + * @private + * @param {Array} values The values to add to the set. + * @returns {Object} Returns the new set. + */ + var createSet = !(Set && 1 / setToArray(new Set([, -0]))[1] == INFINITY) + ? noop + : function (values) { + return new Set(values); + }; + + /** + * Creates a `_.toPairs` or `_.toPairsIn` function. + * + * @private + * @param {Function} keysFunc The function to get the keys of a given object. + * @returns {Function} Returns the new pairs function. + */ + function createToPairs(keysFunc) { + return function (object) { + var tag = getTag(object); + if (tag == mapTag) { + return mapToArray(object); + } + if (tag == setTag) { + return setToPairs(object); + } + return baseToPairs(object, keysFunc(object)); + }; + } + + /** + * Creates a function that either curries or invokes `func` with optional + * `this` binding and partially applied arguments. + * + * @private + * @param {Function|string} func The function or method name to wrap. + * @param {number} bitmask The bitmask flags. + * 1 - `_.bind` + * 2 - `_.bindKey` + * 4 - `_.curry` or `_.curryRight` of a bound function + * 8 - `_.curry` + * 16 - `_.curryRight` + * 32 - `_.partial` + * 64 - `_.partialRight` + * 128 - `_.rearg` + * 256 - `_.ary` + * 512 - `_.flip` + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to be partially applied. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) { + var isBindKey = bitmask & WRAP_BIND_KEY_FLAG; + if (!isBindKey && typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + var length = partials ? partials.length : 0; + if (!length) { + bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG); + partials = holders = undefined; + } + ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0); + arity = arity === undefined ? arity : toInteger(arity); + length -= holders ? holders.length : 0; + + if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) { + var partialsRight = partials, + holdersRight = holders; + + partials = holders = undefined; + } + var data = isBindKey ? undefined : getData(func); + + var newData = [ + func, + bitmask, + thisArg, + partials, + holders, + partialsRight, + holdersRight, + argPos, + ary, + arity, + ]; + + if (data) { + mergeData(newData, data); + } + func = newData[0]; + bitmask = newData[1]; + thisArg = newData[2]; + partials = newData[3]; + holders = newData[4]; + arity = newData[9] = + newData[9] === undefined ? (isBindKey ? 0 : func.length) : nativeMax(newData[9] - length, 0); + + if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) { + bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG); + } + if (!bitmask || bitmask == WRAP_BIND_FLAG) { + var result = createBind(func, bitmask, thisArg); + } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) { + result = createCurry(func, bitmask, arity); + } else if ( + (bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && + !holders.length + ) { + result = createPartial(func, bitmask, thisArg, partials); + } else { + result = createHybrid.apply(undefined, newData); + } + var setter = data ? baseSetData : setData; + return setWrapToString(setter(result, newData), func, bitmask); + } + + /** + * Used by `_.defaults` to customize its `_.assignIn` use to assign properties + * of source objects to the destination object for all destination properties + * that resolve to `undefined`. + * + * @private + * @param {*} objValue The destination value. + * @param {*} srcValue The source value. + * @param {string} key The key of the property to assign. + * @param {Object} object The parent object of `objValue`. + * @returns {*} Returns the value to assign. + */ + function customDefaultsAssignIn(objValue, srcValue, key, object) { + if ( + objValue === undefined || + (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key)) + ) { + return srcValue; + } + return objValue; + } + + /** + * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source + * objects into destination objects that are passed thru. + * + * @private + * @param {*} objValue The destination value. + * @param {*} srcValue The source value. + * @param {string} key The key of the property to merge. + * @param {Object} object The parent object of `objValue`. + * @param {Object} source The parent object of `srcValue`. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + * @returns {*} Returns the value to assign. + */ + function customDefaultsMerge(objValue, srcValue, key, object, source, stack) { + if (isObject(objValue) && isObject(srcValue)) { + // Recursively merge objects and arrays (susceptible to call stack limits). + stack.set(srcValue, objValue); + baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack); + stack['delete'](srcValue); + } + return objValue; + } + + /** + * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain + * objects. + * + * @private + * @param {*} value The value to inspect. + * @param {string} key The key of the property to inspect. + * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`. + */ + function customOmitClone(value) { + return isPlainObject(value) ? undefined : value; + } + + /** + * A specialized version of `baseIsEqualDeep` for arrays with support for + * partial deep comparisons. + * + * @private + * @param {Array} array The array to compare. + * @param {Array} other The other array to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `array` and `other` objects. + * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. + */ + function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + arrLength = array.length, + othLength = other.length; + + if (arrLength != othLength && !(isPartial && othLength > arrLength)) { + return false; + } + // Assume cyclic values are equal. + var stacked = stack.get(array); + if (stacked && stack.get(other)) { + return stacked == other; + } + var index = -1, + result = true, + seen = bitmask & COMPARE_UNORDERED_FLAG ? new SetCache() : undefined; + + stack.set(array, other); + stack.set(other, array); + + // Ignore non-index properties. + while (++index < arrLength) { + var arrValue = array[index], + othValue = other[index]; + + if (customizer) { + var compared = isPartial + ? customizer(othValue, arrValue, index, other, array, stack) + : customizer(arrValue, othValue, index, array, other, stack); + } + if (compared !== undefined) { + if (compared) { + continue; + } + result = false; + break; + } + // Recursively compare arrays (susceptible to call stack limits). + if (seen) { + if ( + !arraySome(other, function (othValue, othIndex) { + if ( + !cacheHas(seen, othIndex) && + (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack)) + ) { + return seen.push(othIndex); + } + }) + ) { + result = false; + break; + } + } else if ( + !(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack)) + ) { + result = false; + break; + } + } + stack['delete'](array); + stack['delete'](other); + return result; + } + + /** + * A specialized version of `baseIsEqualDeep` for comparing objects of + * the same `toStringTag`. + * + * **Note:** This function only supports comparing values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {string} tag The `toStringTag` of the objects to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { + switch (tag) { + case dataViewTag: + if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) { + return false; + } + object = object.buffer; + other = other.buffer; + + case arrayBufferTag: + if ( + object.byteLength != other.byteLength || + !equalFunc(new Uint8Array(object), new Uint8Array(other)) + ) { + return false; + } + return true; + + case boolTag: + case dateTag: + case numberTag: + // Coerce booleans to `1` or `0` and dates to milliseconds. + // Invalid dates are coerced to `NaN`. + return eq(+object, +other); + + case errorTag: + return object.name == other.name && object.message == other.message; + + case regexpTag: + case stringTag: + // Coerce regexes to strings and treat strings, primitives and objects, + // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring + // for more details. + return object == other + ''; + + case mapTag: + var convert = mapToArray; + + case setTag: + var isPartial = bitmask & COMPARE_PARTIAL_FLAG; + convert || (convert = setToArray); + + if (object.size != other.size && !isPartial) { + return false; + } + // Assume cyclic values are equal. + var stacked = stack.get(object); + if (stacked) { + return stacked == other; + } + bitmask |= COMPARE_UNORDERED_FLAG; + + // Recursively compare objects (susceptible to call stack limits). + stack.set(object, other); + var result = equalArrays( + convert(object), + convert(other), + bitmask, + customizer, + equalFunc, + stack, + ); + stack['delete'](object); + return result; + + case symbolTag: + if (symbolValueOf) { + return symbolValueOf.call(object) == symbolValueOf.call(other); + } + } + return false; + } + + /** + * A specialized version of `baseIsEqualDeep` for objects with support for + * partial deep comparisons. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + objProps = getAllKeys(object), + objLength = objProps.length, + othProps = getAllKeys(other), + othLength = othProps.length; + + if (objLength != othLength && !isPartial) { + return false; + } + var index = objLength; + while (index--) { + var key = objProps[index]; + if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { + return false; + } + } + // Assume cyclic values are equal. + var stacked = stack.get(object); + if (stacked && stack.get(other)) { + return stacked == other; + } + var result = true; + stack.set(object, other); + stack.set(other, object); + + var skipCtor = isPartial; + while (++index < objLength) { + key = objProps[index]; + var objValue = object[key], + othValue = other[key]; + + if (customizer) { + var compared = isPartial + ? customizer(othValue, objValue, key, other, object, stack) + : customizer(objValue, othValue, key, object, other, stack); + } + // Recursively compare objects (susceptible to call stack limits). + if ( + !(compared === undefined + ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) + : compared) + ) { + result = false; + break; + } + skipCtor || (skipCtor = key == 'constructor'); + } + if (result && !skipCtor) { + var objCtor = object.constructor, + othCtor = other.constructor; + + // Non `Object` object instances with different constructors are not equal. + if ( + objCtor != othCtor && + 'constructor' in object && + 'constructor' in other && + !( + typeof objCtor == 'function' && + objCtor instanceof objCtor && + typeof othCtor == 'function' && + othCtor instanceof othCtor + ) + ) { + result = false; + } + } + stack['delete'](object); + stack['delete'](other); + return result; + } + + /** + * A specialized version of `baseRest` which flattens the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @returns {Function} Returns the new function. + */ + function flatRest(func) { + return setToString(overRest(func, undefined, flatten), func + ''); + } + + /** + * Creates an array of own enumerable property names and symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ + function getAllKeys(object) { + return baseGetAllKeys(object, keys, getSymbols); + } + + /** + * Creates an array of own and inherited enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ + function getAllKeysIn(object) { + return baseGetAllKeys(object, keysIn, getSymbolsIn); + } + + /** + * Gets metadata for `func`. + * + * @private + * @param {Function} func The function to query. + * @returns {*} Returns the metadata for `func`. + */ + var getData = !metaMap + ? noop + : function (func) { + return metaMap.get(func); + }; + + /** + * Gets the name of `func`. + * + * @private + * @param {Function} func The function to query. + * @returns {string} Returns the function name. + */ + function getFuncName(func) { + var result = func.name + '', + array = realNames[result], + length = hasOwnProperty.call(realNames, result) ? array.length : 0; + + while (length--) { + var data = array[length], + otherFunc = data.func; + if (otherFunc == null || otherFunc == func) { + return data.name; + } + } + return result; + } + + /** + * Gets the argument placeholder value for `func`. + * + * @private + * @param {Function} func The function to inspect. + * @returns {*} Returns the placeholder value. + */ + function getHolder(func) { + var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func; + return object.placeholder; + } + + /** + * Gets the appropriate "iteratee" function. If `_.iteratee` is customized, + * this function returns the custom method, otherwise it returns `baseIteratee`. + * If arguments are provided, the chosen function is invoked with them and + * its result is returned. + * + * @private + * @param {*} [value] The value to convert to an iteratee. + * @param {number} [arity] The arity of the created iteratee. + * @returns {Function} Returns the chosen function or its result. + */ + function getIteratee() { + var result = lodash.iteratee || iteratee; + result = result === iteratee ? baseIteratee : result; + return arguments.length ? result(arguments[0], arguments[1]) : result; + } + + /** + * Gets the data for `map`. + * + * @private + * @param {Object} map The map to query. + * @param {string} key The reference key. + * @returns {*} Returns the map data. + */ + function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) ? data[typeof key == 'string' ? 'string' : 'hash'] : data.map; + } + + /** + * Gets the property names, values, and compare flags of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the match data of `object`. + */ + function getMatchData(object) { + var result = keys(object), + length = result.length; + + while (length--) { + var key = result[length], + value = object[key]; + + result[length] = [key, value, isStrictComparable(value)]; + } + return result; + } + + /** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ + function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : undefined; + } + + /** + * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the raw `toStringTag`. + */ + function getRawTag(value) { + var isOwn = hasOwnProperty.call(value, symToStringTag), + tag = value[symToStringTag]; + + try { + value[symToStringTag] = undefined; + var unmasked = true; + } catch (e) {} + + var result = nativeObjectToString.call(value); + if (unmasked) { + if (isOwn) { + value[symToStringTag] = tag; + } else { + delete value[symToStringTag]; + } + } + return result; + } + + /** + * Creates an array of the own enumerable symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ + var getSymbols = !nativeGetSymbols + ? stubArray + : function (object) { + if (object == null) { + return []; + } + object = Object(object); + return arrayFilter(nativeGetSymbols(object), function (symbol) { + return propertyIsEnumerable.call(object, symbol); + }); + }; + + /** + * Creates an array of the own and inherited enumerable symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ + var getSymbolsIn = !nativeGetSymbols + ? stubArray + : function (object) { + var result = []; + while (object) { + arrayPush(result, getSymbols(object)); + object = getPrototype(object); + } + return result; + }; + + /** + * Gets the `toStringTag` of `value`. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ + var getTag = baseGetTag; + + // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6. + if ( + (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || + (Map && getTag(new Map()) != mapTag) || + (Promise && getTag(Promise.resolve()) != promiseTag) || + (Set && getTag(new Set()) != setTag) || + (WeakMap && getTag(new WeakMap()) != weakMapTag) + ) { + getTag = function (value) { + var result = baseGetTag(value), + Ctor = result == objectTag ? value.constructor : undefined, + ctorString = Ctor ? toSource(Ctor) : ''; + + if (ctorString) { + switch (ctorString) { + case dataViewCtorString: + return dataViewTag; + case mapCtorString: + return mapTag; + case promiseCtorString: + return promiseTag; + case setCtorString: + return setTag; + case weakMapCtorString: + return weakMapTag; + } + } + return result; + }; + } + + /** + * Gets the view, applying any `transforms` to the `start` and `end` positions. + * + * @private + * @param {number} start The start of the view. + * @param {number} end The end of the view. + * @param {Array} transforms The transformations to apply to the view. + * @returns {Object} Returns an object containing the `start` and `end` + * positions of the view. + */ + function getView(start, end, transforms) { + var index = -1, + length = transforms.length; + + while (++index < length) { + var data = transforms[index], + size = data.size; + + switch (data.type) { + case 'drop': + start += size; + break; + case 'dropRight': + end -= size; + break; + case 'take': + end = nativeMin(end, start + size); + break; + case 'takeRight': + start = nativeMax(start, end - size); + break; + } + } + return { start: start, end: end }; + } + + /** + * Extracts wrapper details from the `source` body comment. + * + * @private + * @param {string} source The source to inspect. + * @returns {Array} Returns the wrapper details. + */ + function getWrapDetails(source) { + var match = source.match(reWrapDetails); + return match ? match[1].split(reSplitDetails) : []; + } + + /** + * Checks if `path` exists on `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @param {Function} hasFunc The function to check properties. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + */ + function hasPath(object, path, hasFunc) { + path = castPath(path, object); + + var index = -1, + length = path.length, + result = false; + + while (++index < length) { + var key = toKey(path[index]); + if (!(result = object != null && hasFunc(object, key))) { + break; + } + object = object[key]; + } + if (result || ++index != length) { + return result; + } + length = object == null ? 0 : object.length; + return ( + !!length && + isLength(length) && + isIndex(key, length) && + (isArray(object) || isArguments(object)) + ); + } + + /** + * Initializes an array clone. + * + * @private + * @param {Array} array The array to clone. + * @returns {Array} Returns the initialized clone. + */ + function initCloneArray(array) { + var length = array.length, + result = new array.constructor(length); + + // Add properties assigned by `RegExp#exec`. + if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) { + result.index = array.index; + result.input = array.input; + } + return result; + } + + /** + * Initializes an object clone. + * + * @private + * @param {Object} object The object to clone. + * @returns {Object} Returns the initialized clone. + */ + function initCloneObject(object) { + return typeof object.constructor == 'function' && !isPrototype(object) + ? baseCreate(getPrototype(object)) + : {}; + } + + /** + * Initializes an object clone based on its `toStringTag`. + * + * **Note:** This function only supports cloning values with tags of + * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`. + * + * @private + * @param {Object} object The object to clone. + * @param {string} tag The `toStringTag` of the object to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the initialized clone. + */ + function initCloneByTag(object, tag, isDeep) { + var Ctor = object.constructor; + switch (tag) { + case arrayBufferTag: + return cloneArrayBuffer(object); + + case boolTag: + case dateTag: + return new Ctor(+object); + + case dataViewTag: + return cloneDataView(object, isDeep); + + case float32Tag: + case float64Tag: + case int8Tag: + case int16Tag: + case int32Tag: + case uint8Tag: + case uint8ClampedTag: + case uint16Tag: + case uint32Tag: + return cloneTypedArray(object, isDeep); + + case mapTag: + return new Ctor(); + + case numberTag: + case stringTag: + return new Ctor(object); + + case regexpTag: + return cloneRegExp(object); + + case setTag: + return new Ctor(); + + case symbolTag: + return cloneSymbol(object); + } + } + + /** + * Inserts wrapper `details` in a comment at the top of the `source` body. + * + * @private + * @param {string} source The source to modify. + * @returns {Array} details The details to insert. + * @returns {string} Returns the modified source. + */ + function insertWrapDetails(source, details) { + var length = details.length; + if (!length) { + return source; + } + var lastIndex = length - 1; + details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex]; + details = details.join(length > 2 ? ', ' : ' '); + return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n'); + } + + /** + * Checks if `value` is a flattenable `arguments` object or array. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. + */ + function isFlattenable(value) { + return ( + isArray(value) || + isArguments(value) || + !!(spreadableSymbol && value && value[spreadableSymbol]) + ); + } + + /** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ + function isIndex(value, length) { + var type = typeof value; + length = length == null ? MAX_SAFE_INTEGER : length; + + return ( + !!length && + (type == 'number' || (type != 'symbol' && reIsUint.test(value))) && + value > -1 && + value % 1 == 0 && + value < length + ); + } + + /** + * Checks if the given arguments are from an iteratee call. + * + * @private + * @param {*} value The potential iteratee value argument. + * @param {*} index The potential iteratee index or key argument. + * @param {*} object The potential iteratee object argument. + * @returns {boolean} Returns `true` if the arguments are from an iteratee call, + * else `false`. + */ + function isIterateeCall(value, index, object) { + if (!isObject(object)) { + return false; + } + var type = typeof index; + if ( + type == 'number' + ? isArrayLike(object) && isIndex(index, object.length) + : type == 'string' && index in object + ) { + return eq(object[index], value); + } + return false; + } + + /** + * Checks if `value` is a property name and not a property path. + * + * @private + * @param {*} value The value to check. + * @param {Object} [object] The object to query keys on. + * @returns {boolean} Returns `true` if `value` is a property name, else `false`. + */ + function isKey(value, object) { + if (isArray(value)) { + return false; + } + var type = typeof value; + if ( + type == 'number' || + type == 'symbol' || + type == 'boolean' || + value == null || + isSymbol(value) + ) { + return true; + } + return ( + reIsPlainProp.test(value) || + !reIsDeepProp.test(value) || + (object != null && value in Object(object)) + ); + } + + /** + * Checks if `value` is suitable for use as unique object key. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is suitable, else `false`. + */ + function isKeyable(value) { + var type = typeof value; + return type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean' + ? value !== '__proto__' + : value === null; + } + + /** + * Checks if `func` has a lazy counterpart. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` has a lazy counterpart, + * else `false`. + */ + function isLaziable(func) { + var funcName = getFuncName(func), + other = lodash[funcName]; + + if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) { + return false; + } + if (func === other) { + return true; + } + var data = getData(other); + return !!data && func === data[0]; + } + + /** + * Checks if `func` has its source masked. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` is masked, else `false`. + */ + function isMasked(func) { + return !!maskSrcKey && maskSrcKey in func; + } + + /** + * Checks if `func` is capable of being masked. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `func` is maskable, else `false`. + */ + var isMaskable = coreJsData ? isFunction : stubFalse; + + /** + * Checks if `value` is likely a prototype object. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. + */ + function isPrototype(value) { + var Ctor = value && value.constructor, + proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; + + return value === proto; + } + + /** + * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` if suitable for strict + * equality comparisons, else `false`. + */ + function isStrictComparable(value) { + return value === value && !isObject(value); + } + + /** + * A specialized version of `matchesProperty` for source values suitable + * for strict equality comparisons, i.e. `===`. + * + * @private + * @param {string} key The key of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + */ + function matchesStrictComparable(key, srcValue) { + return function (object) { + if (object == null) { + return false; + } + return object[key] === srcValue && (srcValue !== undefined || key in Object(object)); + }; + } + + /** + * A specialized version of `_.memoize` which clears the memoized function's + * cache when it exceeds `MAX_MEMOIZE_SIZE`. + * + * @private + * @param {Function} func The function to have its output memoized. + * @returns {Function} Returns the new memoized function. + */ + function memoizeCapped(func) { + var result = memoize(func, function (key) { + if (cache.size === MAX_MEMOIZE_SIZE) { + cache.clear(); + } + return key; + }); + + var cache = result.cache; + return result; + } + + /** + * Merges the function metadata of `source` into `data`. + * + * Merging metadata reduces the number of wrappers used to invoke a function. + * This is possible because methods like `_.bind`, `_.curry`, and `_.partial` + * may be applied regardless of execution order. Methods like `_.ary` and + * `_.rearg` modify function arguments, making the order in which they are + * executed important, preventing the merging of metadata. However, we make + * an exception for a safe combined case where curried functions have `_.ary` + * and or `_.rearg` applied. + * + * @private + * @param {Array} data The destination metadata. + * @param {Array} source The source metadata. + * @returns {Array} Returns `data`. + */ + function mergeData(data, source) { + var bitmask = data[1], + srcBitmask = source[1], + newBitmask = bitmask | srcBitmask, + isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG); + + var isCombo = + (srcBitmask == WRAP_ARY_FLAG && bitmask == WRAP_CURRY_FLAG) || + (srcBitmask == WRAP_ARY_FLAG && bitmask == WRAP_REARG_FLAG && data[7].length <= source[8]) || + (srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG) && + source[7].length <= source[8] && + bitmask == WRAP_CURRY_FLAG); + + // Exit early if metadata can't be merged. + if (!(isCommon || isCombo)) { + return data; + } + // Use source `thisArg` if available. + if (srcBitmask & WRAP_BIND_FLAG) { + data[2] = source[2]; + // Set when currying a bound function. + newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG; + } + // Compose partial arguments. + var value = source[3]; + if (value) { + var partials = data[3]; + data[3] = partials ? composeArgs(partials, value, source[4]) : value; + data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4]; + } + // Compose partial right arguments. + value = source[5]; + if (value) { + partials = data[5]; + data[5] = partials ? composeArgsRight(partials, value, source[6]) : value; + data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6]; + } + // Use source `argPos` if available. + value = source[7]; + if (value) { + data[7] = value; + } + // Use source `ary` if it's smaller. + if (srcBitmask & WRAP_ARY_FLAG) { + data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]); + } + // Use source `arity` if one is not provided. + if (data[9] == null) { + data[9] = source[9]; + } + // Use source `func` and merge bitmasks. + data[0] = source[0]; + data[1] = newBitmask; + + return data; + } + + /** + * This function is like + * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * except that it includes inherited enumerable properties. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + function nativeKeysIn(object) { + var result = []; + if (object != null) { + for (var key in Object(object)) { + result.push(key); + } + } + return result; + } + + /** + * Converts `value` to a string using `Object.prototype.toString`. + * + * @private + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + */ + function objectToString(value) { + return nativeObjectToString.call(value); + } + + /** + * A specialized version of `baseRest` which transforms the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @param {Function} transform The rest array transform. + * @returns {Function} Returns the new function. + */ + function overRest(func, start, transform) { + start = nativeMax(start === undefined ? func.length - 1 : start, 0); + return function () { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + array = Array(length); + + while (++index < length) { + array[index] = args[start + index]; + } + index = -1; + var otherArgs = Array(start + 1); + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = transform(array); + return apply(func, this, otherArgs); + }; + } + + /** + * Gets the parent value at `path` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} path The path to get the parent value of. + * @returns {*} Returns the parent value. + */ + function parent(object, path) { + return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1)); + } + + /** + * Reorder `array` according to the specified indexes where the element at + * the first index is assigned as the first element, the element at + * the second index is assigned as the second element, and so on. + * + * @private + * @param {Array} array The array to reorder. + * @param {Array} indexes The arranged array indexes. + * @returns {Array} Returns `array`. + */ + function reorder(array, indexes) { + var arrLength = array.length, + length = nativeMin(indexes.length, arrLength), + oldArray = copyArray(array); + + while (length--) { + var index = indexes[length]; + array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined; + } + return array; + } + + /** + * Gets the value at `key`, unless `key` is "__proto__" or "constructor". + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ + function safeGet(object, key) { + if (key === 'constructor' && typeof object[key] === 'function') { + return; + } + + if (key == '__proto__') { + return; + } + + return object[key]; + } + + /** + * Sets metadata for `func`. + * + * **Note:** If this function becomes hot, i.e. is invoked a lot in a short + * period of time, it will trip its breaker and transition to an identity + * function to avoid garbage collection pauses in V8. See + * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070) + * for more details. + * + * @private + * @param {Function} func The function to associate metadata with. + * @param {*} data The metadata. + * @returns {Function} Returns `func`. + */ + var setData = shortOut(baseSetData); + + /** + * A simple wrapper around the global [`setTimeout`](https://mdn.io/setTimeout). + * + * @private + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @returns {number|Object} Returns the timer id or timeout object. + */ + var setTimeout = + ctxSetTimeout || + function (func, wait) { + return root.setTimeout(func, wait); + }; + + /** + * Sets the `toString` method of `func` to return `string`. + * + * @private + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. + */ + var setToString = shortOut(baseSetToString); + + /** + * Sets the `toString` method of `wrapper` to mimic the source of `reference` + * with wrapper details in a comment at the top of the source body. + * + * @private + * @param {Function} wrapper The function to modify. + * @param {Function} reference The reference function. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @returns {Function} Returns `wrapper`. + */ + function setWrapToString(wrapper, reference, bitmask) { + var source = reference + ''; + return setToString( + wrapper, + insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)), + ); + } + + /** + * Creates a function that'll short out and invoke `identity` instead + * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN` + * milliseconds. + * + * @private + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new shortable function. + */ + function shortOut(func) { + var count = 0, + lastCalled = 0; + + return function () { + var stamp = nativeNow(), + remaining = HOT_SPAN - (stamp - lastCalled); + + lastCalled = stamp; + if (remaining > 0) { + if (++count >= HOT_COUNT) { + return arguments[0]; + } + } else { + count = 0; + } + return func.apply(undefined, arguments); + }; + } + + /** + * A specialized version of `_.shuffle` which mutates and sets the size of `array`. + * + * @private + * @param {Array} array The array to shuffle. + * @param {number} [size=array.length] The size of `array`. + * @returns {Array} Returns `array`. + */ + function shuffleSelf(array, size) { + var index = -1, + length = array.length, + lastIndex = length - 1; + + size = size === undefined ? length : size; + while (++index < size) { + var rand = baseRandom(index, lastIndex), + value = array[rand]; + + array[rand] = array[index]; + array[index] = value; + } + array.length = size; + return array; + } + + /** + * Converts `string` to a property path array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the property path array. + */ + var stringToPath = memoizeCapped(function (string) { + var result = []; + if (string.charCodeAt(0) === 46 /* . */) { + result.push(''); + } + string.replace(rePropName, function (match, number, quote, subString) { + result.push(quote ? subString.replace(reEscapeChar, '$1') : number || match); + }); + return result; + }); + + /** + * Converts `value` to a string key if it's not a string or symbol. + * + * @private + * @param {*} value The value to inspect. + * @returns {string|symbol} Returns the key. + */ + function toKey(value) { + if (typeof value == 'string' || isSymbol(value)) { + return value; + } + var result = value + ''; + return result == '0' && 1 / value == -INFINITY ? '-0' : result; + } + + /** + * Converts `func` to its source code. + * + * @private + * @param {Function} func The function to convert. + * @returns {string} Returns the source code. + */ + function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) {} + try { + return func + ''; + } catch (e) {} + } + return ''; + } + + /** + * Updates wrapper `details` based on `bitmask` flags. + * + * @private + * @returns {Array} details The details to modify. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @returns {Array} Returns `details`. + */ + function updateWrapDetails(details, bitmask) { + arrayEach(wrapFlags, function (pair) { + var value = '_.' + pair[0]; + if (bitmask & pair[1] && !arrayIncludes(details, value)) { + details.push(value); + } + }); + return details.sort(); + } + + /** + * Creates a clone of `wrapper`. + * + * @private + * @param {Object} wrapper The wrapper to clone. + * @returns {Object} Returns the cloned wrapper. + */ + function wrapperClone(wrapper) { + if (wrapper instanceof LazyWrapper) { + return wrapper.clone(); + } + var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__); + result.__actions__ = copyArray(wrapper.__actions__); + result.__index__ = wrapper.__index__; + result.__values__ = wrapper.__values__; + return result; + } + + /*------------------------------------------------------------------------*/ + + /** + * Creates an array of elements split into groups the length of `size`. + * If `array` can't be split evenly, the final chunk will be the remaining + * elements. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to process. + * @param {number} [size=1] The length of each chunk + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the new array of chunks. + * @example + * + * _.chunk(['a', 'b', 'c', 'd'], 2); + * // => [['a', 'b'], ['c', 'd']] + * + * _.chunk(['a', 'b', 'c', 'd'], 3); + * // => [['a', 'b', 'c'], ['d']] + */ + function chunk(array, size, guard) { + if (guard ? isIterateeCall(array, size, guard) : size === undefined) { + size = 1; + } else { + size = nativeMax(toInteger(size), 0); + } + var length = array == null ? 0 : array.length; + if (!length || size < 1) { + return []; + } + var index = 0, + resIndex = 0, + result = Array(nativeCeil(length / size)); + + while (index < length) { + result[resIndex++] = baseSlice(array, index, (index += size)); + } + return result; + } + + /** + * Creates an array with all falsey values removed. The values `false`, `null`, + * `0`, `""`, `undefined`, and `NaN` are falsey. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to compact. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.compact([0, 1, false, 2, '', 3]); + * // => [1, 2, 3] + */ + function compact(array) { + var index = -1, + length = array == null ? 0 : array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (value) { + result[resIndex++] = value; + } + } + return result; + } + + /** + * Creates a new array concatenating `array` with any additional arrays + * and/or values. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to concatenate. + * @param {...*} [values] The values to concatenate. + * @returns {Array} Returns the new concatenated array. + * @example + * + * var array = [1]; + * var other = _.concat(array, 2, [3], [[4]]); + * + * console.log(other); + * // => [1, 2, 3, [4]] + * + * console.log(array); + * // => [1] + */ + function concat() { + var length = arguments.length; + if (!length) { + return []; + } + var args = Array(length - 1), + array = arguments[0], + index = length; + + while (index--) { + args[index - 1] = arguments[index]; + } + return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1)); + } + + /** + * Creates an array of `array` values not included in the other given arrays + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. The order and references of result values are + * determined by the first array. + * + * **Note:** Unlike `_.pullAll`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The values to exclude. + * @returns {Array} Returns the new array of filtered values. + * @see _.without, _.xor + * @example + * + * _.difference([2, 1], [2, 3]); + * // => [1] + */ + var difference = baseRest(function (array, values) { + return isArrayLikeObject(array) + ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true)) + : []; + }); + + /** + * This method is like `_.difference` except that it accepts `iteratee` which + * is invoked for each element of `array` and `values` to generate the criterion + * by which they're compared. The order and references of result values are + * determined by the first array. The iteratee is invoked with one argument: + * (value). + * + * **Note:** Unlike `_.pullAllBy`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The values to exclude. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor); + * // => [1.2] + * + * // The `_.property` iteratee shorthand. + * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x'); + * // => [{ 'x': 2 }] + */ + var differenceBy = baseRest(function (array, values) { + var iteratee = last(values); + if (isArrayLikeObject(iteratee)) { + iteratee = undefined; + } + return isArrayLikeObject(array) + ? baseDifference( + array, + baseFlatten(values, 1, isArrayLikeObject, true), + getIteratee(iteratee, 2), + ) + : []; + }); + + /** + * This method is like `_.difference` except that it accepts `comparator` + * which is invoked to compare elements of `array` to `values`. The order and + * references of result values are determined by the first array. The comparator + * is invoked with two arguments: (arrVal, othVal). + * + * **Note:** Unlike `_.pullAllWith`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The values to exclude. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * + * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual); + * // => [{ 'x': 2, 'y': 1 }] + */ + var differenceWith = baseRest(function (array, values) { + var comparator = last(values); + if (isArrayLikeObject(comparator)) { + comparator = undefined; + } + return isArrayLikeObject(array) + ? baseDifference( + array, + baseFlatten(values, 1, isArrayLikeObject, true), + undefined, + comparator, + ) + : []; + }); + + /** + * Creates a slice of `array` with `n` elements dropped from the beginning. + * + * @static + * @memberOf _ + * @since 0.5.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to drop. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.drop([1, 2, 3]); + * // => [2, 3] + * + * _.drop([1, 2, 3], 2); + * // => [3] + * + * _.drop([1, 2, 3], 5); + * // => [] + * + * _.drop([1, 2, 3], 0); + * // => [1, 2, 3] + */ + function drop(array, n, guard) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + n = guard || n === undefined ? 1 : toInteger(n); + return baseSlice(array, n < 0 ? 0 : n, length); + } + + /** + * Creates a slice of `array` with `n` elements dropped from the end. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to drop. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.dropRight([1, 2, 3]); + * // => [1, 2] + * + * _.dropRight([1, 2, 3], 2); + * // => [1] + * + * _.dropRight([1, 2, 3], 5); + * // => [] + * + * _.dropRight([1, 2, 3], 0); + * // => [1, 2, 3] + */ + function dropRight(array, n, guard) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + n = guard || n === undefined ? 1 : toInteger(n); + n = length - n; + return baseSlice(array, 0, n < 0 ? 0 : n); + } + + /** + * Creates a slice of `array` excluding elements dropped from the end. + * Elements are dropped until `predicate` returns falsey. The predicate is + * invoked with three arguments: (value, index, array). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * _.dropRightWhile(users, function(o) { return !o.active; }); + * // => objects for ['barney'] + * + * // The `_.matches` iteratee shorthand. + * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false }); + * // => objects for ['barney', 'fred'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.dropRightWhile(users, ['active', false]); + * // => objects for ['barney'] + * + * // The `_.property` iteratee shorthand. + * _.dropRightWhile(users, 'active'); + * // => objects for ['barney', 'fred', 'pebbles'] + */ + function dropRightWhile(array, predicate) { + return array && array.length ? baseWhile(array, getIteratee(predicate, 3), true, true) : []; + } + + /** + * Creates a slice of `array` excluding elements dropped from the beginning. + * Elements are dropped until `predicate` returns falsey. The predicate is + * invoked with three arguments: (value, index, array). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.dropWhile(users, function(o) { return !o.active; }); + * // => objects for ['pebbles'] + * + * // The `_.matches` iteratee shorthand. + * _.dropWhile(users, { 'user': 'barney', 'active': false }); + * // => objects for ['fred', 'pebbles'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.dropWhile(users, ['active', false]); + * // => objects for ['pebbles'] + * + * // The `_.property` iteratee shorthand. + * _.dropWhile(users, 'active'); + * // => objects for ['barney', 'fred', 'pebbles'] + */ + function dropWhile(array, predicate) { + return array && array.length ? baseWhile(array, getIteratee(predicate, 3), true) : []; + } + + /** + * Fills elements of `array` with `value` from `start` up to, but not + * including, `end`. + * + * **Note:** This method mutates `array`. + * + * @static + * @memberOf _ + * @since 3.2.0 + * @category Array + * @param {Array} array The array to fill. + * @param {*} value The value to fill `array` with. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns `array`. + * @example + * + * var array = [1, 2, 3]; + * + * _.fill(array, 'a'); + * console.log(array); + * // => ['a', 'a', 'a'] + * + * _.fill(Array(3), 2); + * // => [2, 2, 2] + * + * _.fill([4, 6, 8, 10], '*', 1, 3); + * // => [4, '*', '*', 10] + */ + function fill(array, value, start, end) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + if (start && typeof start != 'number' && isIterateeCall(array, value, start)) { + start = 0; + end = length; + } + return baseFill(array, value, start, end); + } + + /** + * This method is like `_.find` except that it returns the index of the first + * element `predicate` returns truthy for instead of the element itself. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.findIndex(users, function(o) { return o.user == 'barney'; }); + * // => 0 + * + * // The `_.matches` iteratee shorthand. + * _.findIndex(users, { 'user': 'fred', 'active': false }); + * // => 1 + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findIndex(users, ['active', false]); + * // => 0 + * + * // The `_.property` iteratee shorthand. + * _.findIndex(users, 'active'); + * // => 2 + */ + function findIndex(array, predicate, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = fromIndex == null ? 0 : toInteger(fromIndex); + if (index < 0) { + index = nativeMax(length + index, 0); + } + return baseFindIndex(array, getIteratee(predicate, 3), index); + } + + /** + * This method is like `_.findIndex` except that it iterates over elements + * of `collection` from right to left. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=array.length-1] The index to search from. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; }); + * // => 2 + * + * // The `_.matches` iteratee shorthand. + * _.findLastIndex(users, { 'user': 'barney', 'active': true }); + * // => 0 + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findLastIndex(users, ['active', false]); + * // => 2 + * + * // The `_.property` iteratee shorthand. + * _.findLastIndex(users, 'active'); + * // => 0 + */ + function findLastIndex(array, predicate, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = length - 1; + if (fromIndex !== undefined) { + index = toInteger(fromIndex); + index = fromIndex < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1); + } + return baseFindIndex(array, getIteratee(predicate, 3), index, true); + } + + /** + * Flattens `array` a single level deep. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to flatten. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flatten([1, [2, [3, [4]], 5]]); + * // => [1, 2, [3, [4]], 5] + */ + function flatten(array) { + var length = array == null ? 0 : array.length; + return length ? baseFlatten(array, 1) : []; + } + + /** + * Recursively flattens `array`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to flatten. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flattenDeep([1, [2, [3, [4]], 5]]); + * // => [1, 2, 3, 4, 5] + */ + function flattenDeep(array) { + var length = array == null ? 0 : array.length; + return length ? baseFlatten(array, INFINITY) : []; + } + + /** + * Recursively flatten `array` up to `depth` times. + * + * @static + * @memberOf _ + * @since 4.4.0 + * @category Array + * @param {Array} array The array to flatten. + * @param {number} [depth=1] The maximum recursion depth. + * @returns {Array} Returns the new flattened array. + * @example + * + * var array = [1, [2, [3, [4]], 5]]; + * + * _.flattenDepth(array, 1); + * // => [1, 2, [3, [4]], 5] + * + * _.flattenDepth(array, 2); + * // => [1, 2, 3, [4], 5] + */ + function flattenDepth(array, depth) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + depth = depth === undefined ? 1 : toInteger(depth); + return baseFlatten(array, depth); + } + + /** + * The inverse of `_.toPairs`; this method returns an object composed + * from key-value `pairs`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} pairs The key-value pairs. + * @returns {Object} Returns the new object. + * @example + * + * _.fromPairs([['a', 1], ['b', 2]]); + * // => { 'a': 1, 'b': 2 } + */ + function fromPairs(pairs) { + var index = -1, + length = pairs == null ? 0 : pairs.length, + result = {}; + + while (++index < length) { + var pair = pairs[index]; + result[pair[0]] = pair[1]; + } + return result; + } + + /** + * Gets the first element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @alias first + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the first element of `array`. + * @example + * + * _.head([1, 2, 3]); + * // => 1 + * + * _.head([]); + * // => undefined + */ + function head(array) { + return array && array.length ? array[0] : undefined; + } + + /** + * Gets the index at which the first occurrence of `value` is found in `array` + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. If `fromIndex` is negative, it's used as the + * offset from the end of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.indexOf([1, 2, 1, 2], 2); + * // => 1 + * + * // Search from the `fromIndex`. + * _.indexOf([1, 2, 1, 2], 2, 2); + * // => 3 + */ + function indexOf(array, value, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = fromIndex == null ? 0 : toInteger(fromIndex); + if (index < 0) { + index = nativeMax(length + index, 0); + } + return baseIndexOf(array, value, index); + } + + /** + * Gets all but the last element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.initial([1, 2, 3]); + * // => [1, 2] + */ + function initial(array) { + var length = array == null ? 0 : array.length; + return length ? baseSlice(array, 0, -1) : []; + } + + /** + * Creates an array of unique values that are included in all given arrays + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. The order and references of result values are + * determined by the first array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of intersecting values. + * @example + * + * _.intersection([2, 1], [2, 3]); + * // => [2] + */ + var intersection = baseRest(function (arrays) { + var mapped = arrayMap(arrays, castArrayLikeObject); + return mapped.length && mapped[0] === arrays[0] ? baseIntersection(mapped) : []; + }); + + /** + * This method is like `_.intersection` except that it accepts `iteratee` + * which is invoked for each element of each `arrays` to generate the criterion + * by which they're compared. The order and references of result values are + * determined by the first array. The iteratee is invoked with one argument: + * (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of intersecting values. + * @example + * + * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor); + * // => [2.1] + * + * // The `_.property` iteratee shorthand. + * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }] + */ + var intersectionBy = baseRest(function (arrays) { + var iteratee = last(arrays), + mapped = arrayMap(arrays, castArrayLikeObject); + + if (iteratee === last(mapped)) { + iteratee = undefined; + } else { + mapped.pop(); + } + return mapped.length && mapped[0] === arrays[0] + ? baseIntersection(mapped, getIteratee(iteratee, 2)) + : []; + }); + + /** + * This method is like `_.intersection` except that it accepts `comparator` + * which is invoked to compare elements of `arrays`. The order and references + * of result values are determined by the first array. The comparator is + * invoked with two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of intersecting values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.intersectionWith(objects, others, _.isEqual); + * // => [{ 'x': 1, 'y': 2 }] + */ + var intersectionWith = baseRest(function (arrays) { + var comparator = last(arrays), + mapped = arrayMap(arrays, castArrayLikeObject); + + comparator = typeof comparator == 'function' ? comparator : undefined; + if (comparator) { + mapped.pop(); + } + return mapped.length && mapped[0] === arrays[0] + ? baseIntersection(mapped, undefined, comparator) + : []; + }); + + /** + * Converts all elements in `array` into a string separated by `separator`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to convert. + * @param {string} [separator=','] The element separator. + * @returns {string} Returns the joined string. + * @example + * + * _.join(['a', 'b', 'c'], '~'); + * // => 'a~b~c' + */ + function join(array, separator) { + return array == null ? '' : nativeJoin.call(array, separator); + } + + /** + * Gets the last element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the last element of `array`. + * @example + * + * _.last([1, 2, 3]); + * // => 3 + */ + function last(array) { + var length = array == null ? 0 : array.length; + return length ? array[length - 1] : undefined; + } + + /** + * This method is like `_.indexOf` except that it iterates over elements of + * `array` from right to left. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} [fromIndex=array.length-1] The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.lastIndexOf([1, 2, 1, 2], 2); + * // => 3 + * + * // Search from the `fromIndex`. + * _.lastIndexOf([1, 2, 1, 2], 2, 2); + * // => 1 + */ + function lastIndexOf(array, value, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = length; + if (fromIndex !== undefined) { + index = toInteger(fromIndex); + index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1); + } + return value === value + ? strictLastIndexOf(array, value, index) + : baseFindIndex(array, baseIsNaN, index, true); + } + + /** + * Gets the element at index `n` of `array`. If `n` is negative, the nth + * element from the end is returned. + * + * @static + * @memberOf _ + * @since 4.11.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=0] The index of the element to return. + * @returns {*} Returns the nth element of `array`. + * @example + * + * var array = ['a', 'b', 'c', 'd']; + * + * _.nth(array, 1); + * // => 'b' + * + * _.nth(array, -2); + * // => 'c'; + */ + function nth(array, n) { + return array && array.length ? baseNth(array, toInteger(n)) : undefined; + } + + /** + * Removes all given values from `array` using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove` + * to remove elements from an array by predicate. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {...*} [values] The values to remove. + * @returns {Array} Returns `array`. + * @example + * + * var array = ['a', 'b', 'c', 'a', 'b', 'c']; + * + * _.pull(array, 'a', 'c'); + * console.log(array); + * // => ['b', 'b'] + */ + var pull = baseRest(pullAll); + + /** + * This method is like `_.pull` except that it accepts an array of values to remove. + * + * **Note:** Unlike `_.difference`, this method mutates `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @returns {Array} Returns `array`. + * @example + * + * var array = ['a', 'b', 'c', 'a', 'b', 'c']; + * + * _.pullAll(array, ['a', 'c']); + * console.log(array); + * // => ['b', 'b'] + */ + function pullAll(array, values) { + return array && array.length && values && values.length ? basePullAll(array, values) : array; + } + + /** + * This method is like `_.pullAll` except that it accepts `iteratee` which is + * invoked for each element of `array` and `values` to generate the criterion + * by which they're compared. The iteratee is invoked with one argument: (value). + * + * **Note:** Unlike `_.differenceBy`, this method mutates `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns `array`. + * @example + * + * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }]; + * + * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x'); + * console.log(array); + * // => [{ 'x': 2 }] + */ + function pullAllBy(array, values, iteratee) { + return array && array.length && values && values.length + ? basePullAll(array, values, getIteratee(iteratee, 2)) + : array; + } + + /** + * This method is like `_.pullAll` except that it accepts `comparator` which + * is invoked to compare elements of `array` to `values`. The comparator is + * invoked with two arguments: (arrVal, othVal). + * + * **Note:** Unlike `_.differenceWith`, this method mutates `array`. + * + * @static + * @memberOf _ + * @since 4.6.0 + * @category Array + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns `array`. + * @example + * + * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }]; + * + * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual); + * console.log(array); + * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }] + */ + function pullAllWith(array, values, comparator) { + return array && array.length && values && values.length + ? basePullAll(array, values, undefined, comparator) + : array; + } + + /** + * Removes elements from `array` corresponding to `indexes` and returns an + * array of removed elements. + * + * **Note:** Unlike `_.at`, this method mutates `array`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {...(number|number[])} [indexes] The indexes of elements to remove. + * @returns {Array} Returns the new array of removed elements. + * @example + * + * var array = ['a', 'b', 'c', 'd']; + * var pulled = _.pullAt(array, [1, 3]); + * + * console.log(array); + * // => ['a', 'c'] + * + * console.log(pulled); + * // => ['b', 'd'] + */ + var pullAt = flatRest(function (array, indexes) { + var length = array == null ? 0 : array.length, + result = baseAt(array, indexes); + + basePullAt( + array, + arrayMap(indexes, function (index) { + return isIndex(index, length) ? +index : index; + }).sort(compareAscending), + ); + + return result; + }); + + /** + * Removes all elements from `array` that `predicate` returns truthy for + * and returns an array of the removed elements. The predicate is invoked + * with three arguments: (value, index, array). + * + * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull` + * to pull elements from an array by value. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new array of removed elements. + * @example + * + * var array = [1, 2, 3, 4]; + * var evens = _.remove(array, function(n) { + * return n % 2 == 0; + * }); + * + * console.log(array); + * // => [1, 3] + * + * console.log(evens); + * // => [2, 4] + */ + function remove(array, predicate) { + var result = []; + if (!(array && array.length)) { + return result; + } + var index = -1, + indexes = [], + length = array.length; + + predicate = getIteratee(predicate, 3); + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result.push(value); + indexes.push(index); + } + } + basePullAt(array, indexes); + return result; + } + + /** + * Reverses `array` so that the first element becomes the last, the second + * element becomes the second to last, and so on. + * + * **Note:** This method mutates `array` and is based on + * [`Array#reverse`](https://mdn.io/Array/reverse). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to modify. + * @returns {Array} Returns `array`. + * @example + * + * var array = [1, 2, 3]; + * + * _.reverse(array); + * // => [3, 2, 1] + * + * console.log(array); + * // => [3, 2, 1] + */ + function reverse(array) { + return array == null ? array : nativeReverse.call(array); + } + + /** + * Creates a slice of `array` from `start` up to, but not including, `end`. + * + * **Note:** This method is used instead of + * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are + * returned. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to slice. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the slice of `array`. + */ + function slice(array, start, end) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + if (end && typeof end != 'number' && isIterateeCall(array, start, end)) { + start = 0; + end = length; + } else { + start = start == null ? 0 : toInteger(start); + end = end === undefined ? length : toInteger(end); + } + return baseSlice(array, start, end); + } + + /** + * Uses a binary search to determine the lowest index at which `value` + * should be inserted into `array` in order to maintain its sort order. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * _.sortedIndex([30, 50], 40); + * // => 1 + */ + function sortedIndex(array, value) { + return baseSortedIndex(array, value); + } + + /** + * This method is like `_.sortedIndex` except that it accepts `iteratee` + * which is invoked for `value` and each element of `array` to compute their + * sort ranking. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * var objects = [{ 'x': 4 }, { 'x': 5 }]; + * + * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; }); + * // => 0 + * + * // The `_.property` iteratee shorthand. + * _.sortedIndexBy(objects, { 'x': 4 }, 'x'); + * // => 0 + */ + function sortedIndexBy(array, value, iteratee) { + return baseSortedIndexBy(array, value, getIteratee(iteratee, 2)); + } + + /** + * This method is like `_.indexOf` except that it performs a binary + * search on a sorted `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.sortedIndexOf([4, 5, 5, 5, 6], 5); + * // => 1 + */ + function sortedIndexOf(array, value) { + var length = array == null ? 0 : array.length; + if (length) { + var index = baseSortedIndex(array, value); + if (index < length && eq(array[index], value)) { + return index; + } + } + return -1; + } + + /** + * This method is like `_.sortedIndex` except that it returns the highest + * index at which `value` should be inserted into `array` in order to + * maintain its sort order. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * _.sortedLastIndex([4, 5, 5, 5, 6], 5); + * // => 4 + */ + function sortedLastIndex(array, value) { + return baseSortedIndex(array, value, true); + } + + /** + * This method is like `_.sortedLastIndex` except that it accepts `iteratee` + * which is invoked for `value` and each element of `array` to compute their + * sort ranking. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * var objects = [{ 'x': 4 }, { 'x': 5 }]; + * + * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; }); + * // => 1 + * + * // The `_.property` iteratee shorthand. + * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x'); + * // => 1 + */ + function sortedLastIndexBy(array, value, iteratee) { + return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true); + } + + /** + * This method is like `_.lastIndexOf` except that it performs a binary + * search on a sorted `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5); + * // => 3 + */ + function sortedLastIndexOf(array, value) { + var length = array == null ? 0 : array.length; + if (length) { + var index = baseSortedIndex(array, value, true) - 1; + if (eq(array[index], value)) { + return index; + } + } + return -1; + } + + /** + * This method is like `_.uniq` except that it's designed and optimized + * for sorted arrays. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.sortedUniq([1, 1, 2]); + * // => [1, 2] + */ + function sortedUniq(array) { + return array && array.length ? baseSortedUniq(array) : []; + } + + /** + * This method is like `_.uniqBy` except that it's designed and optimized + * for sorted arrays. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor); + * // => [1.1, 2.3] + */ + function sortedUniqBy(array, iteratee) { + return array && array.length ? baseSortedUniq(array, getIteratee(iteratee, 2)) : []; + } + + /** + * Gets all but the first element of `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to query. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.tail([1, 2, 3]); + * // => [2, 3] + */ + function tail(array) { + var length = array == null ? 0 : array.length; + return length ? baseSlice(array, 1, length) : []; + } + + /** + * Creates a slice of `array` with `n` elements taken from the beginning. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to take. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.take([1, 2, 3]); + * // => [1] + * + * _.take([1, 2, 3], 2); + * // => [1, 2] + * + * _.take([1, 2, 3], 5); + * // => [1, 2, 3] + * + * _.take([1, 2, 3], 0); + * // => [] + */ + function take(array, n, guard) { + if (!(array && array.length)) { + return []; + } + n = guard || n === undefined ? 1 : toInteger(n); + return baseSlice(array, 0, n < 0 ? 0 : n); + } + + /** + * Creates a slice of `array` with `n` elements taken from the end. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to take. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.takeRight([1, 2, 3]); + * // => [3] + * + * _.takeRight([1, 2, 3], 2); + * // => [2, 3] + * + * _.takeRight([1, 2, 3], 5); + * // => [1, 2, 3] + * + * _.takeRight([1, 2, 3], 0); + * // => [] + */ + function takeRight(array, n, guard) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + n = guard || n === undefined ? 1 : toInteger(n); + n = length - n; + return baseSlice(array, n < 0 ? 0 : n, length); + } + + /** + * Creates a slice of `array` with elements taken from the end. Elements are + * taken until `predicate` returns falsey. The predicate is invoked with + * three arguments: (value, index, array). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * _.takeRightWhile(users, function(o) { return !o.active; }); + * // => objects for ['fred', 'pebbles'] + * + * // The `_.matches` iteratee shorthand. + * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false }); + * // => objects for ['pebbles'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.takeRightWhile(users, ['active', false]); + * // => objects for ['fred', 'pebbles'] + * + * // The `_.property` iteratee shorthand. + * _.takeRightWhile(users, 'active'); + * // => [] + */ + function takeRightWhile(array, predicate) { + return array && array.length ? baseWhile(array, getIteratee(predicate, 3), false, true) : []; + } + + /** + * Creates a slice of `array` with elements taken from the beginning. Elements + * are taken until `predicate` returns falsey. The predicate is invoked with + * three arguments: (value, index, array). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.takeWhile(users, function(o) { return !o.active; }); + * // => objects for ['barney', 'fred'] + * + * // The `_.matches` iteratee shorthand. + * _.takeWhile(users, { 'user': 'barney', 'active': false }); + * // => objects for ['barney'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.takeWhile(users, ['active', false]); + * // => objects for ['barney', 'fred'] + * + * // The `_.property` iteratee shorthand. + * _.takeWhile(users, 'active'); + * // => [] + */ + function takeWhile(array, predicate) { + return array && array.length ? baseWhile(array, getIteratee(predicate, 3)) : []; + } + + /** + * Creates an array of unique values, in order, from all given arrays using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of combined values. + * @example + * + * _.union([2], [1, 2]); + * // => [2, 1] + */ + var union = baseRest(function (arrays) { + return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true)); + }); + + /** + * This method is like `_.union` except that it accepts `iteratee` which is + * invoked for each element of each `arrays` to generate the criterion by + * which uniqueness is computed. Result values are chosen from the first + * array in which the value occurs. The iteratee is invoked with one argument: + * (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of combined values. + * @example + * + * _.unionBy([2.1], [1.2, 2.3], Math.floor); + * // => [2.1, 1.2] + * + * // The `_.property` iteratee shorthand. + * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }, { 'x': 2 }] + */ + var unionBy = baseRest(function (arrays) { + var iteratee = last(arrays); + if (isArrayLikeObject(iteratee)) { + iteratee = undefined; + } + return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2)); + }); + + /** + * This method is like `_.union` except that it accepts `comparator` which + * is invoked to compare elements of `arrays`. Result values are chosen from + * the first array in which the value occurs. The comparator is invoked + * with two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of combined values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.unionWith(objects, others, _.isEqual); + * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }] + */ + var unionWith = baseRest(function (arrays) { + var comparator = last(arrays); + comparator = typeof comparator == 'function' ? comparator : undefined; + return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator); + }); + + /** + * Creates a duplicate-free version of an array, using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons, in which only the first occurrence of each element + * is kept. The order of result values is determined by the order they occur + * in the array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.uniq([2, 1, 2]); + * // => [2, 1] + */ + function uniq(array) { + return array && array.length ? baseUniq(array) : []; + } + + /** + * This method is like `_.uniq` except that it accepts `iteratee` which is + * invoked for each element in `array` to generate the criterion by which + * uniqueness is computed. The order of result values is determined by the + * order they occur in the array. The iteratee is invoked with one argument: + * (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.uniqBy([2.1, 1.2, 2.3], Math.floor); + * // => [2.1, 1.2] + * + * // The `_.property` iteratee shorthand. + * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }, { 'x': 2 }] + */ + function uniqBy(array, iteratee) { + return array && array.length ? baseUniq(array, getIteratee(iteratee, 2)) : []; + } + + /** + * This method is like `_.uniq` except that it accepts `comparator` which + * is invoked to compare elements of `array`. The order of result values is + * determined by the order they occur in the array.The comparator is invoked + * with two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.uniqWith(objects, _.isEqual); + * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }] + */ + function uniqWith(array, comparator) { + comparator = typeof comparator == 'function' ? comparator : undefined; + return array && array.length ? baseUniq(array, undefined, comparator) : []; + } + + /** + * This method is like `_.zip` except that it accepts an array of grouped + * elements and creates an array regrouping the elements to their pre-zip + * configuration. + * + * @static + * @memberOf _ + * @since 1.2.0 + * @category Array + * @param {Array} array The array of grouped elements to process. + * @returns {Array} Returns the new array of regrouped elements. + * @example + * + * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]); + * // => [['a', 1, true], ['b', 2, false]] + * + * _.unzip(zipped); + * // => [['a', 'b'], [1, 2], [true, false]] + */ + function unzip(array) { + if (!(array && array.length)) { + return []; + } + var length = 0; + array = arrayFilter(array, function (group) { + if (isArrayLikeObject(group)) { + length = nativeMax(group.length, length); + return true; + } + }); + return baseTimes(length, function (index) { + return arrayMap(array, baseProperty(index)); + }); + } + + /** + * This method is like `_.unzip` except that it accepts `iteratee` to specify + * how regrouped values should be combined. The iteratee is invoked with the + * elements of each group: (...group). + * + * @static + * @memberOf _ + * @since 3.8.0 + * @category Array + * @param {Array} array The array of grouped elements to process. + * @param {Function} [iteratee=_.identity] The function to combine + * regrouped values. + * @returns {Array} Returns the new array of regrouped elements. + * @example + * + * var zipped = _.zip([1, 2], [10, 20], [100, 200]); + * // => [[1, 10, 100], [2, 20, 200]] + * + * _.unzipWith(zipped, _.add); + * // => [3, 30, 300] + */ + function unzipWith(array, iteratee) { + if (!(array && array.length)) { + return []; + } + var result = unzip(array); + if (iteratee == null) { + return result; + } + return arrayMap(result, function (group) { + return apply(iteratee, undefined, group); + }); + } + + /** + * Creates an array excluding all given values using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * **Note:** Unlike `_.pull`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...*} [values] The values to exclude. + * @returns {Array} Returns the new array of filtered values. + * @see _.difference, _.xor + * @example + * + * _.without([2, 1, 2, 3], 1, 2); + * // => [3] + */ + var without = baseRest(function (array, values) { + return isArrayLikeObject(array) ? baseDifference(array, values) : []; + }); + + /** + * Creates an array of unique values that is the + * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference) + * of the given arrays. The order of result values is determined by the order + * they occur in the arrays. + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of filtered values. + * @see _.difference, _.without + * @example + * + * _.xor([2, 1], [2, 3]); + * // => [1, 3] + */ + var xor = baseRest(function (arrays) { + return baseXor(arrayFilter(arrays, isArrayLikeObject)); + }); + + /** + * This method is like `_.xor` except that it accepts `iteratee` which is + * invoked for each element of each `arrays` to generate the criterion by + * which by which they're compared. The order of result values is determined + * by the order they occur in the arrays. The iteratee is invoked with one + * argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor); + * // => [1.2, 3.4] + * + * // The `_.property` iteratee shorthand. + * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 2 }] + */ + var xorBy = baseRest(function (arrays) { + var iteratee = last(arrays); + if (isArrayLikeObject(iteratee)) { + iteratee = undefined; + } + return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2)); + }); + + /** + * This method is like `_.xor` except that it accepts `comparator` which is + * invoked to compare elements of `arrays`. The order of result values is + * determined by the order they occur in the arrays. The comparator is invoked + * with two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.xorWith(objects, others, _.isEqual); + * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }] + */ + var xorWith = baseRest(function (arrays) { + var comparator = last(arrays); + comparator = typeof comparator == 'function' ? comparator : undefined; + return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator); + }); + + /** + * Creates an array of grouped elements, the first of which contains the + * first elements of the given arrays, the second of which contains the + * second elements of the given arrays, and so on. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {...Array} [arrays] The arrays to process. + * @returns {Array} Returns the new array of grouped elements. + * @example + * + * _.zip(['a', 'b'], [1, 2], [true, false]); + * // => [['a', 1, true], ['b', 2, false]] + */ + var zip = baseRest(unzip); + + /** + * This method is like `_.fromPairs` except that it accepts two arrays, + * one of property identifiers and one of corresponding values. + * + * @static + * @memberOf _ + * @since 0.4.0 + * @category Array + * @param {Array} [props=[]] The property identifiers. + * @param {Array} [values=[]] The property values. + * @returns {Object} Returns the new object. + * @example + * + * _.zipObject(['a', 'b'], [1, 2]); + * // => { 'a': 1, 'b': 2 } + */ + function zipObject(props, values) { + return baseZipObject(props || [], values || [], assignValue); + } + + /** + * This method is like `_.zipObject` except that it supports property paths. + * + * @static + * @memberOf _ + * @since 4.1.0 + * @category Array + * @param {Array} [props=[]] The property identifiers. + * @param {Array} [values=[]] The property values. + * @returns {Object} Returns the new object. + * @example + * + * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]); + * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } } + */ + function zipObjectDeep(props, values) { + return baseZipObject(props || [], values || [], baseSet); + } + + /** + * This method is like `_.zip` except that it accepts `iteratee` to specify + * how grouped values should be combined. The iteratee is invoked with the + * elements of each group: (...group). + * + * @static + * @memberOf _ + * @since 3.8.0 + * @category Array + * @param {...Array} [arrays] The arrays to process. + * @param {Function} [iteratee=_.identity] The function to combine + * grouped values. + * @returns {Array} Returns the new array of grouped elements. + * @example + * + * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) { + * return a + b + c; + * }); + * // => [111, 222] + */ + var zipWith = baseRest(function (arrays) { + var length = arrays.length, + iteratee = length > 1 ? arrays[length - 1] : undefined; + + iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined; + return unzipWith(arrays, iteratee); + }); + + /*------------------------------------------------------------------------*/ + + /** + * Creates a `lodash` wrapper instance that wraps `value` with explicit method + * chain sequences enabled. The result of such sequences must be unwrapped + * with `_#value`. + * + * @static + * @memberOf _ + * @since 1.3.0 + * @category Seq + * @param {*} value The value to wrap. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 }, + * { 'user': 'pebbles', 'age': 1 } + * ]; + * + * var youngest = _ + * .chain(users) + * .sortBy('age') + * .map(function(o) { + * return o.user + ' is ' + o.age; + * }) + * .head() + * .value(); + * // => 'pebbles is 1' + */ + function chain(value) { + var result = lodash(value); + result.__chain__ = true; + return result; + } + + /** + * This method invokes `interceptor` and returns `value`. The interceptor + * is invoked with one argument; (value). The purpose of this method is to + * "tap into" a method chain sequence in order to modify intermediate results. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Seq + * @param {*} value The value to provide to `interceptor`. + * @param {Function} interceptor The function to invoke. + * @returns {*} Returns `value`. + * @example + * + * _([1, 2, 3]) + * .tap(function(array) { + * // Mutate input array. + * array.pop(); + * }) + * .reverse() + * .value(); + * // => [2, 1] + */ + function tap(value, interceptor) { + interceptor(value); + return value; + } + + /** + * This method is like `_.tap` except that it returns the result of `interceptor`. + * The purpose of this method is to "pass thru" values replacing intermediate + * results in a method chain sequence. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Seq + * @param {*} value The value to provide to `interceptor`. + * @param {Function} interceptor The function to invoke. + * @returns {*} Returns the result of `interceptor`. + * @example + * + * _(' abc ') + * .chain() + * .trim() + * .thru(function(value) { + * return [value]; + * }) + * .value(); + * // => ['abc'] + */ + function thru(value, interceptor) { + return interceptor(value); + } + + /** + * This method is the wrapper version of `_.at`. + * + * @name at + * @memberOf _ + * @since 1.0.0 + * @category Seq + * @param {...(string|string[])} [paths] The property paths to pick. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] }; + * + * _(object).at(['a[0].b.c', 'a[1]']).value(); + * // => [3, 4] + */ + var wrapperAt = flatRest(function (paths) { + var length = paths.length, + start = length ? paths[0] : 0, + value = this.__wrapped__, + interceptor = function (object) { + return baseAt(object, paths); + }; + + if ( + length > 1 || + this.__actions__.length || + !(value instanceof LazyWrapper) || + !isIndex(start) + ) { + return this.thru(interceptor); + } + value = value.slice(start, +start + (length ? 1 : 0)); + value.__actions__.push({ + func: thru, + args: [interceptor], + thisArg: undefined, + }); + return new LodashWrapper(value, this.__chain__).thru(function (array) { + if (length && !array.length) { + array.push(undefined); + } + return array; + }); + }); + + /** + * Creates a `lodash` wrapper instance with explicit method chain sequences enabled. + * + * @name chain + * @memberOf _ + * @since 0.1.0 + * @category Seq + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 } + * ]; + * + * // A sequence without explicit chaining. + * _(users).head(); + * // => { 'user': 'barney', 'age': 36 } + * + * // A sequence with explicit chaining. + * _(users) + * .chain() + * .head() + * .pick('user') + * .value(); + * // => { 'user': 'barney' } + */ + function wrapperChain() { + return chain(this); + } + + /** + * Executes the chain sequence and returns the wrapped result. + * + * @name commit + * @memberOf _ + * @since 3.2.0 + * @category Seq + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var array = [1, 2]; + * var wrapped = _(array).push(3); + * + * console.log(array); + * // => [1, 2] + * + * wrapped = wrapped.commit(); + * console.log(array); + * // => [1, 2, 3] + * + * wrapped.last(); + * // => 3 + * + * console.log(array); + * // => [1, 2, 3] + */ + function wrapperCommit() { + return new LodashWrapper(this.value(), this.__chain__); + } + + /** + * Gets the next value on a wrapped object following the + * [iterator protocol](https://mdn.io/iteration_protocols#iterator). + * + * @name next + * @memberOf _ + * @since 4.0.0 + * @category Seq + * @returns {Object} Returns the next iterator value. + * @example + * + * var wrapped = _([1, 2]); + * + * wrapped.next(); + * // => { 'done': false, 'value': 1 } + * + * wrapped.next(); + * // => { 'done': false, 'value': 2 } + * + * wrapped.next(); + * // => { 'done': true, 'value': undefined } + */ + function wrapperNext() { + if (this.__values__ === undefined) { + this.__values__ = toArray(this.value()); + } + var done = this.__index__ >= this.__values__.length, + value = done ? undefined : this.__values__[this.__index__++]; + + return { done: done, value: value }; + } + + /** + * Enables the wrapper to be iterable. + * + * @name Symbol.iterator + * @memberOf _ + * @since 4.0.0 + * @category Seq + * @returns {Object} Returns the wrapper object. + * @example + * + * var wrapped = _([1, 2]); + * + * wrapped[Symbol.iterator]() === wrapped; + * // => true + * + * Array.from(wrapped); + * // => [1, 2] + */ + function wrapperToIterator() { + return this; + } + + /** + * Creates a clone of the chain sequence planting `value` as the wrapped value. + * + * @name plant + * @memberOf _ + * @since 3.2.0 + * @category Seq + * @param {*} value The value to plant. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * function square(n) { + * return n * n; + * } + * + * var wrapped = _([1, 2]).map(square); + * var other = wrapped.plant([3, 4]); + * + * other.value(); + * // => [9, 16] + * + * wrapped.value(); + * // => [1, 4] + */ + function wrapperPlant(value) { + var result, + parent = this; + + while (parent instanceof baseLodash) { + var clone = wrapperClone(parent); + clone.__index__ = 0; + clone.__values__ = undefined; + if (result) { + previous.__wrapped__ = clone; + } else { + result = clone; + } + var previous = clone; + parent = parent.__wrapped__; + } + previous.__wrapped__ = value; + return result; + } + + /** + * This method is the wrapper version of `_.reverse`. + * + * **Note:** This method mutates the wrapped array. + * + * @name reverse + * @memberOf _ + * @since 0.1.0 + * @category Seq + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var array = [1, 2, 3]; + * + * _(array).reverse().value() + * // => [3, 2, 1] + * + * console.log(array); + * // => [3, 2, 1] + */ + function wrapperReverse() { + var value = this.__wrapped__; + if (value instanceof LazyWrapper) { + var wrapped = value; + if (this.__actions__.length) { + wrapped = new LazyWrapper(this); + } + wrapped = wrapped.reverse(); + wrapped.__actions__.push({ + func: thru, + args: [reverse], + thisArg: undefined, + }); + return new LodashWrapper(wrapped, this.__chain__); + } + return this.thru(reverse); + } + + /** + * Executes the chain sequence to resolve the unwrapped value. + * + * @name value + * @memberOf _ + * @since 0.1.0 + * @alias toJSON, valueOf + * @category Seq + * @returns {*} Returns the resolved unwrapped value. + * @example + * + * _([1, 2, 3]).value(); + * // => [1, 2, 3] + */ + function wrapperValue() { + return baseWrapperValue(this.__wrapped__, this.__actions__); + } + + /*------------------------------------------------------------------------*/ + + /** + * Creates an object composed of keys generated from the results of running + * each element of `collection` thru `iteratee`. The corresponding value of + * each key is the number of times the key was returned by `iteratee`. The + * iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 0.5.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee to transform keys. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * _.countBy([6.1, 4.2, 6.3], Math.floor); + * // => { '4': 1, '6': 2 } + * + * // The `_.property` iteratee shorthand. + * _.countBy(['one', 'two', 'three'], 'length'); + * // => { '3': 2, '5': 1 } + */ + var countBy = createAggregator(function (result, value, key) { + if (hasOwnProperty.call(result, key)) { + ++result[key]; + } else { + baseAssignValue(result, key, 1); + } + }); + + /** + * Checks if `predicate` returns truthy for **all** elements of `collection`. + * Iteration is stopped once `predicate` returns falsey. The predicate is + * invoked with three arguments: (value, index|key, collection). + * + * **Note:** This method returns `true` for + * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because + * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of + * elements of empty collections. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false`. + * @example + * + * _.every([true, 1, null, 'yes'], Boolean); + * // => false + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * // The `_.matches` iteratee shorthand. + * _.every(users, { 'user': 'barney', 'active': false }); + * // => false + * + * // The `_.matchesProperty` iteratee shorthand. + * _.every(users, ['active', false]); + * // => true + * + * // The `_.property` iteratee shorthand. + * _.every(users, 'active'); + * // => false + */ + function every(collection, predicate, guard) { + var func = isArray(collection) ? arrayEvery : baseEvery; + if (guard && isIterateeCall(collection, predicate, guard)) { + predicate = undefined; + } + return func(collection, getIteratee(predicate, 3)); + } + + /** + * Iterates over elements of `collection`, returning an array of all elements + * `predicate` returns truthy for. The predicate is invoked with three + * arguments: (value, index|key, collection). + * + * **Note:** Unlike `_.remove`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + * @see _.reject + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * _.filter(users, function(o) { return !o.active; }); + * // => objects for ['fred'] + * + * // The `_.matches` iteratee shorthand. + * _.filter(users, { 'age': 36, 'active': true }); + * // => objects for ['barney'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.filter(users, ['active', false]); + * // => objects for ['fred'] + * + * // The `_.property` iteratee shorthand. + * _.filter(users, 'active'); + * // => objects for ['barney'] + */ + function filter(collection, predicate) { + var func = isArray(collection) ? arrayFilter : baseFilter; + return func(collection, getIteratee(predicate, 3)); + } + + /** + * Iterates over elements of `collection`, returning the first element + * `predicate` returns truthy for. The predicate is invoked with three + * arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. + * @returns {*} Returns the matched element, else `undefined`. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false }, + * { 'user': 'pebbles', 'age': 1, 'active': true } + * ]; + * + * _.find(users, function(o) { return o.age < 40; }); + * // => object for 'barney' + * + * // The `_.matches` iteratee shorthand. + * _.find(users, { 'age': 1, 'active': true }); + * // => object for 'pebbles' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.find(users, ['active', false]); + * // => object for 'fred' + * + * // The `_.property` iteratee shorthand. + * _.find(users, 'active'); + * // => object for 'barney' + */ + var find = createFind(findIndex); + + /** + * This method is like `_.find` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Collection + * @param {Array|Object} collection The collection to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=collection.length-1] The index to search from. + * @returns {*} Returns the matched element, else `undefined`. + * @example + * + * _.findLast([1, 2, 3, 4], function(n) { + * return n % 2 == 1; + * }); + * // => 3 + */ + var findLast = createFind(findLastIndex); + + /** + * Creates a flattened array of values by running each element in `collection` + * thru `iteratee` and flattening the mapped results. The iteratee is invoked + * with three arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new flattened array. + * @example + * + * function duplicate(n) { + * return [n, n]; + * } + * + * _.flatMap([1, 2], duplicate); + * // => [1, 1, 2, 2] + */ + function flatMap(collection, iteratee) { + return baseFlatten(map(collection, iteratee), 1); + } + + /** + * This method is like `_.flatMap` except that it recursively flattens the + * mapped results. + * + * @static + * @memberOf _ + * @since 4.7.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new flattened array. + * @example + * + * function duplicate(n) { + * return [[[n, n]]]; + * } + * + * _.flatMapDeep([1, 2], duplicate); + * // => [1, 1, 2, 2] + */ + function flatMapDeep(collection, iteratee) { + return baseFlatten(map(collection, iteratee), INFINITY); + } + + /** + * This method is like `_.flatMap` except that it recursively flattens the + * mapped results up to `depth` times. + * + * @static + * @memberOf _ + * @since 4.7.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {number} [depth=1] The maximum recursion depth. + * @returns {Array} Returns the new flattened array. + * @example + * + * function duplicate(n) { + * return [[[n, n]]]; + * } + * + * _.flatMapDepth([1, 2], duplicate, 2); + * // => [[1, 1], [2, 2]] + */ + function flatMapDepth(collection, iteratee, depth) { + depth = depth === undefined ? 1 : toInteger(depth); + return baseFlatten(map(collection, iteratee), depth); + } + + /** + * Iterates over elements of `collection` and invokes `iteratee` for each element. + * The iteratee is invoked with three arguments: (value, index|key, collection). + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * **Note:** As with other "Collections" methods, objects with a "length" + * property are iterated like arrays. To avoid this behavior use `_.forIn` + * or `_.forOwn` for object iteration. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @alias each + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + * @see _.forEachRight + * @example + * + * _.forEach([1, 2], function(value) { + * console.log(value); + * }); + * // => Logs `1` then `2`. + * + * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a' then 'b' (iteration order is not guaranteed). + */ + function forEach(collection, iteratee) { + var func = isArray(collection) ? arrayEach : baseEach; + return func(collection, getIteratee(iteratee, 3)); + } + + /** + * This method is like `_.forEach` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @alias eachRight + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + * @see _.forEach + * @example + * + * _.forEachRight([1, 2], function(value) { + * console.log(value); + * }); + * // => Logs `2` then `1`. + */ + function forEachRight(collection, iteratee) { + var func = isArray(collection) ? arrayEachRight : baseEachRight; + return func(collection, getIteratee(iteratee, 3)); + } + + /** + * Creates an object composed of keys generated from the results of running + * each element of `collection` thru `iteratee`. The order of grouped values + * is determined by the order they occur in `collection`. The corresponding + * value of each key is an array of elements responsible for generating the + * key. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee to transform keys. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * _.groupBy([6.1, 4.2, 6.3], Math.floor); + * // => { '4': [4.2], '6': [6.1, 6.3] } + * + * // The `_.property` iteratee shorthand. + * _.groupBy(['one', 'two', 'three'], 'length'); + * // => { '3': ['one', 'two'], '5': ['three'] } + */ + var groupBy = createAggregator(function (result, value, key) { + if (hasOwnProperty.call(result, key)) { + result[key].push(value); + } else { + baseAssignValue(result, key, [value]); + } + }); + + /** + * Checks if `value` is in `collection`. If `collection` is a string, it's + * checked for a substring of `value`, otherwise + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * is used for equality comparisons. If `fromIndex` is negative, it's used as + * the offset from the end of `collection`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object|string} collection The collection to inspect. + * @param {*} value The value to search for. + * @param {number} [fromIndex=0] The index to search from. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`. + * @returns {boolean} Returns `true` if `value` is found, else `false`. + * @example + * + * _.includes([1, 2, 3], 1); + * // => true + * + * _.includes([1, 2, 3], 1, 2); + * // => false + * + * _.includes({ 'a': 1, 'b': 2 }, 1); + * // => true + * + * _.includes('abcd', 'bc'); + * // => true + */ + function includes(collection, value, fromIndex, guard) { + collection = isArrayLike(collection) ? collection : values(collection); + fromIndex = fromIndex && !guard ? toInteger(fromIndex) : 0; + + var length = collection.length; + if (fromIndex < 0) { + fromIndex = nativeMax(length + fromIndex, 0); + } + return isString(collection) + ? fromIndex <= length && collection.indexOf(value, fromIndex) > -1 + : !!length && baseIndexOf(collection, value, fromIndex) > -1; + } + + /** + * Invokes the method at `path` of each element in `collection`, returning + * an array of the results of each invoked method. Any additional arguments + * are provided to each invoked method. If `path` is a function, it's invoked + * for, and `this` bound to, each element in `collection`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Array|Function|string} path The path of the method to invoke or + * the function invoked per iteration. + * @param {...*} [args] The arguments to invoke each method with. + * @returns {Array} Returns the array of results. + * @example + * + * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort'); + * // => [[1, 5, 7], [1, 2, 3]] + * + * _.invokeMap([123, 456], String.prototype.split, ''); + * // => [['1', '2', '3'], ['4', '5', '6']] + */ + var invokeMap = baseRest(function (collection, path, args) { + var index = -1, + isFunc = typeof path == 'function', + result = isArrayLike(collection) ? Array(collection.length) : []; + + baseEach(collection, function (value) { + result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args); + }); + return result; + }); + + /** + * Creates an object composed of keys generated from the results of running + * each element of `collection` thru `iteratee`. The corresponding value of + * each key is the last element responsible for generating the key. The + * iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee to transform keys. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * var array = [ + * { 'dir': 'left', 'code': 97 }, + * { 'dir': 'right', 'code': 100 } + * ]; + * + * _.keyBy(array, function(o) { + * return String.fromCharCode(o.code); + * }); + * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } } + * + * _.keyBy(array, 'dir'); + * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } } + */ + var keyBy = createAggregator(function (result, value, key) { + baseAssignValue(result, key, value); + }); + + /** + * Creates an array of values by running each element in `collection` thru + * `iteratee`. The iteratee is invoked with three arguments: + * (value, index|key, collection). + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. + * + * The guarded methods are: + * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`, + * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`, + * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`, + * `template`, `trim`, `trimEnd`, `trimStart`, and `words` + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + * @example + * + * function square(n) { + * return n * n; + * } + * + * _.map([4, 8], square); + * // => [16, 64] + * + * _.map({ 'a': 4, 'b': 8 }, square); + * // => [16, 64] (iteration order is not guaranteed) + * + * var users = [ + * { 'user': 'barney' }, + * { 'user': 'fred' } + * ]; + * + * // The `_.property` iteratee shorthand. + * _.map(users, 'user'); + * // => ['barney', 'fred'] + */ + function map(collection, iteratee) { + var func = isArray(collection) ? arrayMap : baseMap; + return func(collection, getIteratee(iteratee, 3)); + } + + /** + * This method is like `_.sortBy` except that it allows specifying the sort + * orders of the iteratees to sort by. If `orders` is unspecified, all values + * are sorted in ascending order. Otherwise, specify an order of "desc" for + * descending or "asc" for ascending sort order of corresponding values. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]] + * The iteratees to sort by. + * @param {string[]} [orders] The sort orders of `iteratees`. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`. + * @returns {Array} Returns the new sorted array. + * @example + * + * var users = [ + * { 'user': 'fred', 'age': 48 }, + * { 'user': 'barney', 'age': 34 }, + * { 'user': 'fred', 'age': 40 }, + * { 'user': 'barney', 'age': 36 } + * ]; + * + * // Sort by `user` in ascending order and by `age` in descending order. + * _.orderBy(users, ['user', 'age'], ['asc', 'desc']); + * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]] + */ + function orderBy(collection, iteratees, orders, guard) { + if (collection == null) { + return []; + } + if (!isArray(iteratees)) { + iteratees = iteratees == null ? [] : [iteratees]; + } + orders = guard ? undefined : orders; + if (!isArray(orders)) { + orders = orders == null ? [] : [orders]; + } + return baseOrderBy(collection, iteratees, orders); + } + + /** + * Creates an array of elements split into two groups, the first of which + * contains elements `predicate` returns truthy for, the second of which + * contains elements `predicate` returns falsey for. The predicate is + * invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the array of grouped elements. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false }, + * { 'user': 'fred', 'age': 40, 'active': true }, + * { 'user': 'pebbles', 'age': 1, 'active': false } + * ]; + * + * _.partition(users, function(o) { return o.active; }); + * // => objects for [['fred'], ['barney', 'pebbles']] + * + * // The `_.matches` iteratee shorthand. + * _.partition(users, { 'age': 1, 'active': false }); + * // => objects for [['pebbles'], ['barney', 'fred']] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.partition(users, ['active', false]); + * // => objects for [['barney', 'pebbles'], ['fred']] + * + * // The `_.property` iteratee shorthand. + * _.partition(users, 'active'); + * // => objects for [['fred'], ['barney', 'pebbles']] + */ + var partition = createAggregator( + function (result, value, key) { + result[key ? 0 : 1].push(value); + }, + function () { + return [[], []]; + }, + ); + + /** + * Reduces `collection` to a value which is the accumulated result of running + * each element in `collection` thru `iteratee`, where each successive + * invocation is supplied the return value of the previous. If `accumulator` + * is not given, the first element of `collection` is used as the initial + * value. The iteratee is invoked with four arguments: + * (accumulator, value, index|key, collection). + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.reduce`, `_.reduceRight`, and `_.transform`. + * + * The guarded methods are: + * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`, + * and `sortBy` + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @returns {*} Returns the accumulated value. + * @see _.reduceRight + * @example + * + * _.reduce([1, 2], function(sum, n) { + * return sum + n; + * }, 0); + * // => 3 + * + * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { + * (result[value] || (result[value] = [])).push(key); + * return result; + * }, {}); + * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed) + */ + function reduce(collection, iteratee, accumulator) { + var func = isArray(collection) ? arrayReduce : baseReduce, + initAccum = arguments.length < 3; + + return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach); + } + + /** + * This method is like `_.reduce` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @returns {*} Returns the accumulated value. + * @see _.reduce + * @example + * + * var array = [[0, 1], [2, 3], [4, 5]]; + * + * _.reduceRight(array, function(flattened, other) { + * return flattened.concat(other); + * }, []); + * // => [4, 5, 2, 3, 0, 1] + */ + function reduceRight(collection, iteratee, accumulator) { + var func = isArray(collection) ? arrayReduceRight : baseReduce, + initAccum = arguments.length < 3; + + return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight); + } + + /** + * The opposite of `_.filter`; this method returns the elements of `collection` + * that `predicate` does **not** return truthy for. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + * @see _.filter + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false }, + * { 'user': 'fred', 'age': 40, 'active': true } + * ]; + * + * _.reject(users, function(o) { return !o.active; }); + * // => objects for ['fred'] + * + * // The `_.matches` iteratee shorthand. + * _.reject(users, { 'age': 40, 'active': true }); + * // => objects for ['barney'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.reject(users, ['active', false]); + * // => objects for ['fred'] + * + * // The `_.property` iteratee shorthand. + * _.reject(users, 'active'); + * // => objects for ['barney'] + */ + function reject(collection, predicate) { + var func = isArray(collection) ? arrayFilter : baseFilter; + return func(collection, negate(getIteratee(predicate, 3))); + } + + /** + * Gets a random element from `collection`. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Collection + * @param {Array|Object} collection The collection to sample. + * @returns {*} Returns the random element. + * @example + * + * _.sample([1, 2, 3, 4]); + * // => 2 + */ + function sample(collection) { + var func = isArray(collection) ? arraySample : baseSample; + return func(collection); + } + + /** + * Gets `n` random elements at unique keys from `collection` up to the + * size of `collection`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to sample. + * @param {number} [n=1] The number of elements to sample. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the random elements. + * @example + * + * _.sampleSize([1, 2, 3], 2); + * // => [3, 1] + * + * _.sampleSize([1, 2, 3], 4); + * // => [2, 3, 1] + */ + function sampleSize(collection, n, guard) { + if (guard ? isIterateeCall(collection, n, guard) : n === undefined) { + n = 1; + } else { + n = toInteger(n); + } + var func = isArray(collection) ? arraySampleSize : baseSampleSize; + return func(collection, n); + } + + /** + * Creates an array of shuffled values, using a version of the + * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to shuffle. + * @returns {Array} Returns the new shuffled array. + * @example + * + * _.shuffle([1, 2, 3, 4]); + * // => [4, 1, 3, 2] + */ + function shuffle(collection) { + var func = isArray(collection) ? arrayShuffle : baseShuffle; + return func(collection); + } + + /** + * Gets the size of `collection` by returning its length for array-like + * values or the number of own enumerable string keyed properties for objects. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object|string} collection The collection to inspect. + * @returns {number} Returns the collection size. + * @example + * + * _.size([1, 2, 3]); + * // => 3 + * + * _.size({ 'a': 1, 'b': 2 }); + * // => 2 + * + * _.size('pebbles'); + * // => 7 + */ + function size(collection) { + if (collection == null) { + return 0; + } + if (isArrayLike(collection)) { + return isString(collection) ? stringSize(collection) : collection.length; + } + var tag = getTag(collection); + if (tag == mapTag || tag == setTag) { + return collection.size; + } + return baseKeys(collection).length; + } + + /** + * Checks if `predicate` returns truthy for **any** element of `collection`. + * Iteration is stopped once `predicate` returns truthy. The predicate is + * invoked with three arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + * @example + * + * _.some([null, 0, 'yes', false], Boolean); + * // => true + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false } + * ]; + * + * // The `_.matches` iteratee shorthand. + * _.some(users, { 'user': 'barney', 'active': false }); + * // => false + * + * // The `_.matchesProperty` iteratee shorthand. + * _.some(users, ['active', false]); + * // => true + * + * // The `_.property` iteratee shorthand. + * _.some(users, 'active'); + * // => true + */ + function some(collection, predicate, guard) { + var func = isArray(collection) ? arraySome : baseSome; + if (guard && isIterateeCall(collection, predicate, guard)) { + predicate = undefined; + } + return func(collection, getIteratee(predicate, 3)); + } + + /** + * Creates an array of elements, sorted in ascending order by the results of + * running each element in a collection thru each iteratee. This method + * performs a stable sort, that is, it preserves the original sort order of + * equal elements. The iteratees are invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {...(Function|Function[])} [iteratees=[_.identity]] + * The iteratees to sort by. + * @returns {Array} Returns the new sorted array. + * @example + * + * var users = [ + * { 'user': 'fred', 'age': 48 }, + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 }, + * { 'user': 'barney', 'age': 34 } + * ]; + * + * _.sortBy(users, [function(o) { return o.user; }]); + * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]] + * + * _.sortBy(users, ['user', 'age']); + * // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]] + */ + var sortBy = baseRest(function (collection, iteratees) { + if (collection == null) { + return []; + } + var length = iteratees.length; + if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) { + iteratees = []; + } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) { + iteratees = [iteratees[0]]; + } + return baseOrderBy(collection, baseFlatten(iteratees, 1), []); + }); + + /*------------------------------------------------------------------------*/ + + /** + * Gets the timestamp of the number of milliseconds that have elapsed since + * the Unix epoch (1 January 1970 00:00:00 UTC). + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Date + * @returns {number} Returns the timestamp. + * @example + * + * _.defer(function(stamp) { + * console.log(_.now() - stamp); + * }, _.now()); + * // => Logs the number of milliseconds it took for the deferred invocation. + */ + var now = + ctxNow || + function () { + return root.Date.now(); + }; + + /*------------------------------------------------------------------------*/ + + /** + * The opposite of `_.before`; this method creates a function that invokes + * `func` once it's called `n` or more times. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {number} n The number of calls before `func` is invoked. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * var saves = ['profile', 'settings']; + * + * var done = _.after(saves.length, function() { + * console.log('done saving!'); + * }); + * + * _.forEach(saves, function(type) { + * asyncSave({ 'type': type, 'complete': done }); + * }); + * // => Logs 'done saving!' after the two async saves have completed. + */ + function after(n, func) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + n = toInteger(n); + return function () { + if (--n < 1) { + return func.apply(this, arguments); + } + }; + } + + /** + * Creates a function that invokes `func`, with up to `n` arguments, + * ignoring any additional arguments. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} func The function to cap arguments for. + * @param {number} [n=func.length] The arity cap. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the new capped function. + * @example + * + * _.map(['6', '8', '10'], _.ary(parseInt, 1)); + * // => [6, 8, 10] + */ + function ary(func, n, guard) { + n = guard ? undefined : n; + n = func && n == null ? func.length : n; + return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n); + } + + /** + * Creates a function that invokes `func`, with the `this` binding and arguments + * of the created function, while it's called less than `n` times. Subsequent + * calls to the created function return the result of the last `func` invocation. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {number} n The number of calls at which `func` is no longer invoked. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * jQuery(element).on('click', _.before(5, addContactToList)); + * // => Allows adding up to 4 contacts to the list. + */ + function before(n, func) { + var result; + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + n = toInteger(n); + return function () { + if (--n > 0) { + result = func.apply(this, arguments); + } + if (n <= 1) { + func = undefined; + } + return result; + }; + } + + /** + * Creates a function that invokes `func` with the `this` binding of `thisArg` + * and `partials` prepended to the arguments it receives. + * + * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds, + * may be used as a placeholder for partially applied arguments. + * + * **Note:** Unlike native `Function#bind`, this method doesn't set the "length" + * property of bound functions. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to bind. + * @param {*} thisArg The `this` binding of `func`. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new bound function. + * @example + * + * function greet(greeting, punctuation) { + * return greeting + ' ' + this.user + punctuation; + * } + * + * var object = { 'user': 'fred' }; + * + * var bound = _.bind(greet, object, 'hi'); + * bound('!'); + * // => 'hi fred!' + * + * // Bound with placeholders. + * var bound = _.bind(greet, object, _, '!'); + * bound('hi'); + * // => 'hi fred!' + */ + var bind = baseRest(function (func, thisArg, partials) { + var bitmask = WRAP_BIND_FLAG; + if (partials.length) { + var holders = replaceHolders(partials, getHolder(bind)); + bitmask |= WRAP_PARTIAL_FLAG; + } + return createWrap(func, bitmask, thisArg, partials, holders); + }); + + /** + * Creates a function that invokes the method at `object[key]` with `partials` + * prepended to the arguments it receives. + * + * This method differs from `_.bind` by allowing bound functions to reference + * methods that may be redefined or don't yet exist. See + * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern) + * for more details. + * + * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for partially applied arguments. + * + * @static + * @memberOf _ + * @since 0.10.0 + * @category Function + * @param {Object} object The object to invoke the method on. + * @param {string} key The key of the method. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new bound function. + * @example + * + * var object = { + * 'user': 'fred', + * 'greet': function(greeting, punctuation) { + * return greeting + ' ' + this.user + punctuation; + * } + * }; + * + * var bound = _.bindKey(object, 'greet', 'hi'); + * bound('!'); + * // => 'hi fred!' + * + * object.greet = function(greeting, punctuation) { + * return greeting + 'ya ' + this.user + punctuation; + * }; + * + * bound('!'); + * // => 'hiya fred!' + * + * // Bound with placeholders. + * var bound = _.bindKey(object, 'greet', _, '!'); + * bound('hi'); + * // => 'hiya fred!' + */ + var bindKey = baseRest(function (object, key, partials) { + var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG; + if (partials.length) { + var holders = replaceHolders(partials, getHolder(bindKey)); + bitmask |= WRAP_PARTIAL_FLAG; + } + return createWrap(key, bitmask, object, partials, holders); + }); + + /** + * Creates a function that accepts arguments of `func` and either invokes + * `func` returning its result, if at least `arity` number of arguments have + * been provided, or returns a function that accepts the remaining `func` + * arguments, and so on. The arity of `func` may be specified if `func.length` + * is not sufficient. + * + * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds, + * may be used as a placeholder for provided arguments. + * + * **Note:** This method doesn't set the "length" property of curried functions. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Function + * @param {Function} func The function to curry. + * @param {number} [arity=func.length] The arity of `func`. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the new curried function. + * @example + * + * var abc = function(a, b, c) { + * return [a, b, c]; + * }; + * + * var curried = _.curry(abc); + * + * curried(1)(2)(3); + * // => [1, 2, 3] + * + * curried(1, 2)(3); + * // => [1, 2, 3] + * + * curried(1, 2, 3); + * // => [1, 2, 3] + * + * // Curried with placeholders. + * curried(1)(_, 3)(2); + * // => [1, 2, 3] + */ + function curry(func, arity, guard) { + arity = guard ? undefined : arity; + var result = createWrap( + func, + WRAP_CURRY_FLAG, + undefined, + undefined, + undefined, + undefined, + undefined, + arity, + ); + result.placeholder = curry.placeholder; + return result; + } + + /** + * This method is like `_.curry` except that arguments are applied to `func` + * in the manner of `_.partialRight` instead of `_.partial`. + * + * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for provided arguments. + * + * **Note:** This method doesn't set the "length" property of curried functions. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} func The function to curry. + * @param {number} [arity=func.length] The arity of `func`. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the new curried function. + * @example + * + * var abc = function(a, b, c) { + * return [a, b, c]; + * }; + * + * var curried = _.curryRight(abc); + * + * curried(3)(2)(1); + * // => [1, 2, 3] + * + * curried(2, 3)(1); + * // => [1, 2, 3] + * + * curried(1, 2, 3); + * // => [1, 2, 3] + * + * // Curried with placeholders. + * curried(3)(1, _)(2); + * // => [1, 2, 3] + */ + function curryRight(func, arity, guard) { + arity = guard ? undefined : arity; + var result = createWrap( + func, + WRAP_CURRY_RIGHT_FLAG, + undefined, + undefined, + undefined, + undefined, + undefined, + arity, + ); + result.placeholder = curryRight.placeholder; + return result; + } + + /** + * Creates a debounced function that delays invoking `func` until after `wait` + * milliseconds have elapsed since the last time the debounced function was + * invoked. The debounced function comes with a `cancel` method to cancel + * delayed `func` invocations and a `flush` method to immediately invoke them. + * Provide `options` to indicate whether `func` should be invoked on the + * leading and/or trailing edge of the `wait` timeout. The `func` is invoked + * with the last arguments provided to the debounced function. Subsequent + * calls to the debounced function return the result of the last `func` + * invocation. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is + * invoked on the trailing edge of the timeout only if the debounced function + * is invoked more than once during the `wait` timeout. + * + * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred + * until to the next tick, similar to `setTimeout` with a timeout of `0`. + * + * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) + * for details over the differences between `_.debounce` and `_.throttle`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to debounce. + * @param {number} [wait=0] The number of milliseconds to delay. + * @param {Object} [options={}] The options object. + * @param {boolean} [options.leading=false] + * Specify invoking on the leading edge of the timeout. + * @param {number} [options.maxWait] + * The maximum time `func` is allowed to be delayed before it's invoked. + * @param {boolean} [options.trailing=true] + * Specify invoking on the trailing edge of the timeout. + * @returns {Function} Returns the new debounced function. + * @example + * + * // Avoid costly calculations while the window size is in flux. + * jQuery(window).on('resize', _.debounce(calculateLayout, 150)); + * + * // Invoke `sendMail` when clicked, debouncing subsequent calls. + * jQuery(element).on('click', _.debounce(sendMail, 300, { + * 'leading': true, + * 'trailing': false + * })); + * + * // Ensure `batchLog` is invoked once after 1 second of debounced calls. + * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 }); + * var source = new EventSource('/stream'); + * jQuery(source).on('message', debounced); + * + * // Cancel the trailing debounced invocation. + * jQuery(window).on('popstate', debounced.cancel); + */ + function debounce(func, wait, options) { + var lastArgs, + lastThis, + maxWait, + result, + timerId, + lastCallTime, + lastInvokeTime = 0, + leading = false, + maxing = false, + trailing = true; + + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + wait = toNumber(wait) || 0; + if (isObject(options)) { + leading = !!options.leading; + maxing = 'maxWait' in options; + maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait; + trailing = 'trailing' in options ? !!options.trailing : trailing; + } + + function invokeFunc(time) { + var args = lastArgs, + thisArg = lastThis; + + lastArgs = lastThis = undefined; + lastInvokeTime = time; + result = func.apply(thisArg, args); + return result; + } + + function leadingEdge(time) { + // Reset any `maxWait` timer. + lastInvokeTime = time; + // Start the timer for the trailing edge. + timerId = setTimeout(timerExpired, wait); + // Invoke the leading edge. + return leading ? invokeFunc(time) : result; + } + + function remainingWait(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime, + timeWaiting = wait - timeSinceLastCall; + + return maxing ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) : timeWaiting; + } + + function shouldInvoke(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime; + + // Either this is the first call, activity has stopped and we're at the + // trailing edge, the system time has gone backwards and we're treating + // it as the trailing edge, or we've hit the `maxWait` limit. + return ( + lastCallTime === undefined || + timeSinceLastCall >= wait || + timeSinceLastCall < 0 || + (maxing && timeSinceLastInvoke >= maxWait) + ); + } + + function timerExpired() { + var time = now(); + if (shouldInvoke(time)) { + return trailingEdge(time); + } + // Restart the timer. + timerId = setTimeout(timerExpired, remainingWait(time)); + } + + function trailingEdge(time) { + timerId = undefined; + + // Only invoke if we have `lastArgs` which means `func` has been + // debounced at least once. + if (trailing && lastArgs) { + return invokeFunc(time); + } + lastArgs = lastThis = undefined; + return result; + } + + function cancel() { + if (timerId !== undefined) { + clearTimeout(timerId); + } + lastInvokeTime = 0; + lastArgs = lastCallTime = lastThis = timerId = undefined; + } + + function flush() { + return timerId === undefined ? result : trailingEdge(now()); + } + + function debounced() { + var time = now(), + isInvoking = shouldInvoke(time); + + lastArgs = arguments; + lastThis = this; + lastCallTime = time; + + if (isInvoking) { + if (timerId === undefined) { + return leadingEdge(lastCallTime); + } + if (maxing) { + // Handle invocations in a tight loop. + clearTimeout(timerId); + timerId = setTimeout(timerExpired, wait); + return invokeFunc(lastCallTime); + } + } + if (timerId === undefined) { + timerId = setTimeout(timerExpired, wait); + } + return result; + } + debounced.cancel = cancel; + debounced.flush = flush; + return debounced; + } + + /** + * Defers invoking the `func` until the current call stack has cleared. Any + * additional arguments are provided to `func` when it's invoked. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to defer. + * @param {...*} [args] The arguments to invoke `func` with. + * @returns {number} Returns the timer id. + * @example + * + * _.defer(function(text) { + * console.log(text); + * }, 'deferred'); + * // => Logs 'deferred' after one millisecond. + */ + var defer = baseRest(function (func, args) { + return baseDelay(func, 1, args); + }); + + /** + * Invokes `func` after `wait` milliseconds. Any additional arguments are + * provided to `func` when it's invoked. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @param {...*} [args] The arguments to invoke `func` with. + * @returns {number} Returns the timer id. + * @example + * + * _.delay(function(text) { + * console.log(text); + * }, 1000, 'later'); + * // => Logs 'later' after one second. + */ + var delay = baseRest(function (func, wait, args) { + return baseDelay(func, toNumber(wait) || 0, args); + }); + + /** + * Creates a function that invokes `func` with arguments reversed. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Function + * @param {Function} func The function to flip arguments for. + * @returns {Function} Returns the new flipped function. + * @example + * + * var flipped = _.flip(function() { + * return _.toArray(arguments); + * }); + * + * flipped('a', 'b', 'c', 'd'); + * // => ['d', 'c', 'b', 'a'] + */ + function flip(func) { + return createWrap(func, WRAP_FLIP_FLAG); + } + + /** + * Creates a function that memoizes the result of `func`. If `resolver` is + * provided, it determines the cache key for storing the result based on the + * arguments provided to the memoized function. By default, the first argument + * provided to the memoized function is used as the map cache key. The `func` + * is invoked with the `this` binding of the memoized function. + * + * **Note:** The cache is exposed as the `cache` property on the memoized + * function. Its creation may be customized by replacing the `_.memoize.Cache` + * constructor with one whose instances implement the + * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object) + * method interface of `clear`, `delete`, `get`, `has`, and `set`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to have its output memoized. + * @param {Function} [resolver] The function to resolve the cache key. + * @returns {Function} Returns the new memoized function. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * var other = { 'c': 3, 'd': 4 }; + * + * var values = _.memoize(_.values); + * values(object); + * // => [1, 2] + * + * values(other); + * // => [3, 4] + * + * object.a = 2; + * values(object); + * // => [1, 2] + * + * // Modify the result cache. + * values.cache.set(object, ['a', 'b']); + * values(object); + * // => ['a', 'b'] + * + * // Replace `_.memoize.Cache`. + * _.memoize.Cache = WeakMap; + */ + function memoize(func, resolver) { + if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) { + throw new TypeError(FUNC_ERROR_TEXT); + } + var memoized = function () { + var args = arguments, + key = resolver ? resolver.apply(this, args) : args[0], + cache = memoized.cache; + + if (cache.has(key)) { + return cache.get(key); + } + var result = func.apply(this, args); + memoized.cache = cache.set(key, result) || cache; + return result; + }; + memoized.cache = new (memoize.Cache || MapCache)(); + return memoized; + } + + // Expose `MapCache`. + memoize.Cache = MapCache; + + /** + * Creates a function that negates the result of the predicate `func`. The + * `func` predicate is invoked with the `this` binding and arguments of the + * created function. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} predicate The predicate to negate. + * @returns {Function} Returns the new negated function. + * @example + * + * function isEven(n) { + * return n % 2 == 0; + * } + * + * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven)); + * // => [1, 3, 5] + */ + function negate(predicate) { + if (typeof predicate != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + return function () { + var args = arguments; + switch (args.length) { + case 0: + return !predicate.call(this); + case 1: + return !predicate.call(this, args[0]); + case 2: + return !predicate.call(this, args[0], args[1]); + case 3: + return !predicate.call(this, args[0], args[1], args[2]); + } + return !predicate.apply(this, args); + }; + } + + /** + * Creates a function that is restricted to invoking `func` once. Repeat calls + * to the function return the value of the first invocation. The `func` is + * invoked with the `this` binding and arguments of the created function. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * var initialize = _.once(createApplication); + * initialize(); + * initialize(); + * // => `createApplication` is invoked once + */ + function once(func) { + return before(2, func); + } + + /** + * Creates a function that invokes `func` with its arguments transformed. + * + * @static + * @since 4.0.0 + * @memberOf _ + * @category Function + * @param {Function} func The function to wrap. + * @param {...(Function|Function[])} [transforms=[_.identity]] + * The argument transforms. + * @returns {Function} Returns the new function. + * @example + * + * function doubled(n) { + * return n * 2; + * } + * + * function square(n) { + * return n * n; + * } + * + * var func = _.overArgs(function(x, y) { + * return [x, y]; + * }, [square, doubled]); + * + * func(9, 3); + * // => [81, 6] + * + * func(10, 5); + * // => [100, 10] + */ + var overArgs = castRest(function (func, transforms) { + transforms = + transforms.length == 1 && isArray(transforms[0]) + ? arrayMap(transforms[0], baseUnary(getIteratee())) + : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee())); + + var funcsLength = transforms.length; + return baseRest(function (args) { + var index = -1, + length = nativeMin(args.length, funcsLength); + + while (++index < length) { + args[index] = transforms[index].call(this, args[index]); + } + return apply(func, this, args); + }); + }); + + /** + * Creates a function that invokes `func` with `partials` prepended to the + * arguments it receives. This method is like `_.bind` except it does **not** + * alter the `this` binding. + * + * The `_.partial.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for partially applied arguments. + * + * **Note:** This method doesn't set the "length" property of partially + * applied functions. + * + * @static + * @memberOf _ + * @since 0.2.0 + * @category Function + * @param {Function} func The function to partially apply arguments to. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new partially applied function. + * @example + * + * function greet(greeting, name) { + * return greeting + ' ' + name; + * } + * + * var sayHelloTo = _.partial(greet, 'hello'); + * sayHelloTo('fred'); + * // => 'hello fred' + * + * // Partially applied with placeholders. + * var greetFred = _.partial(greet, _, 'fred'); + * greetFred('hi'); + * // => 'hi fred' + */ + var partial = baseRest(function (func, partials) { + var holders = replaceHolders(partials, getHolder(partial)); + return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders); + }); + + /** + * This method is like `_.partial` except that partially applied arguments + * are appended to the arguments it receives. + * + * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for partially applied arguments. + * + * **Note:** This method doesn't set the "length" property of partially + * applied functions. + * + * @static + * @memberOf _ + * @since 1.0.0 + * @category Function + * @param {Function} func The function to partially apply arguments to. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new partially applied function. + * @example + * + * function greet(greeting, name) { + * return greeting + ' ' + name; + * } + * + * var greetFred = _.partialRight(greet, 'fred'); + * greetFred('hi'); + * // => 'hi fred' + * + * // Partially applied with placeholders. + * var sayHelloTo = _.partialRight(greet, 'hello', _); + * sayHelloTo('fred'); + * // => 'hello fred' + */ + var partialRight = baseRest(function (func, partials) { + var holders = replaceHolders(partials, getHolder(partialRight)); + return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders); + }); + + /** + * Creates a function that invokes `func` with arguments arranged according + * to the specified `indexes` where the argument value at the first index is + * provided as the first argument, the argument value at the second index is + * provided as the second argument, and so on. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} func The function to rearrange arguments for. + * @param {...(number|number[])} indexes The arranged argument indexes. + * @returns {Function} Returns the new function. + * @example + * + * var rearged = _.rearg(function(a, b, c) { + * return [a, b, c]; + * }, [2, 0, 1]); + * + * rearged('b', 'c', 'a') + * // => ['a', 'b', 'c'] + */ + var rearg = flatRest(function (func, indexes) { + return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes); + }); + + /** + * Creates a function that invokes `func` with the `this` binding of the + * created function and arguments from `start` and beyond provided as + * an array. + * + * **Note:** This method is based on the + * [rest parameter](https://mdn.io/rest_parameters). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Function + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + * @example + * + * var say = _.rest(function(what, names) { + * return what + ' ' + _.initial(names).join(', ') + + * (_.size(names) > 1 ? ', & ' : '') + _.last(names); + * }); + * + * say('hello', 'fred', 'barney', 'pebbles'); + * // => 'hello fred, barney, & pebbles' + */ + function rest(func, start) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + start = start === undefined ? start : toInteger(start); + return baseRest(func, start); + } + + /** + * Creates a function that invokes `func` with the `this` binding of the + * create function and an array of arguments much like + * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply). + * + * **Note:** This method is based on the + * [spread operator](https://mdn.io/spread_operator). + * + * @static + * @memberOf _ + * @since 3.2.0 + * @category Function + * @param {Function} func The function to spread arguments over. + * @param {number} [start=0] The start position of the spread. + * @returns {Function} Returns the new function. + * @example + * + * var say = _.spread(function(who, what) { + * return who + ' says ' + what; + * }); + * + * say(['fred', 'hello']); + * // => 'fred says hello' + * + * var numbers = Promise.all([ + * Promise.resolve(40), + * Promise.resolve(36) + * ]); + * + * numbers.then(_.spread(function(x, y) { + * return x + y; + * })); + * // => a Promise of 76 + */ + function spread(func, start) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + start = start == null ? 0 : nativeMax(toInteger(start), 0); + return baseRest(function (args) { + var array = args[start], + otherArgs = castSlice(args, 0, start); + + if (array) { + arrayPush(otherArgs, array); + } + return apply(func, this, otherArgs); + }); + } + + /** + * Creates a throttled function that only invokes `func` at most once per + * every `wait` milliseconds. The throttled function comes with a `cancel` + * method to cancel delayed `func` invocations and a `flush` method to + * immediately invoke them. Provide `options` to indicate whether `func` + * should be invoked on the leading and/or trailing edge of the `wait` + * timeout. The `func` is invoked with the last arguments provided to the + * throttled function. Subsequent calls to the throttled function return the + * result of the last `func` invocation. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is + * invoked on the trailing edge of the timeout only if the throttled function + * is invoked more than once during the `wait` timeout. + * + * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred + * until to the next tick, similar to `setTimeout` with a timeout of `0`. + * + * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) + * for details over the differences between `_.throttle` and `_.debounce`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to throttle. + * @param {number} [wait=0] The number of milliseconds to throttle invocations to. + * @param {Object} [options={}] The options object. + * @param {boolean} [options.leading=true] + * Specify invoking on the leading edge of the timeout. + * @param {boolean} [options.trailing=true] + * Specify invoking on the trailing edge of the timeout. + * @returns {Function} Returns the new throttled function. + * @example + * + * // Avoid excessively updating the position while scrolling. + * jQuery(window).on('scroll', _.throttle(updatePosition, 100)); + * + * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes. + * var throttled = _.throttle(renewToken, 300000, { 'trailing': false }); + * jQuery(element).on('click', throttled); + * + * // Cancel the trailing throttled invocation. + * jQuery(window).on('popstate', throttled.cancel); + */ + function throttle(func, wait, options) { + var leading = true, + trailing = true; + + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + if (isObject(options)) { + leading = 'leading' in options ? !!options.leading : leading; + trailing = 'trailing' in options ? !!options.trailing : trailing; + } + return debounce(func, wait, { + leading: leading, + maxWait: wait, + trailing: trailing, + }); + } + + /** + * Creates a function that accepts up to one argument, ignoring any + * additional arguments. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Function + * @param {Function} func The function to cap arguments for. + * @returns {Function} Returns the new capped function. + * @example + * + * _.map(['6', '8', '10'], _.unary(parseInt)); + * // => [6, 8, 10] + */ + function unary(func) { + return ary(func, 1); + } + + /** + * Creates a function that provides `value` to `wrapper` as its first + * argument. Any additional arguments provided to the function are appended + * to those provided to the `wrapper`. The wrapper is invoked with the `this` + * binding of the created function. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {*} value The value to wrap. + * @param {Function} [wrapper=identity] The wrapper function. + * @returns {Function} Returns the new function. + * @example + * + * var p = _.wrap(_.escape, function(func, text) { + * return '<p>' + func(text) + '</p>'; + * }); + * + * p('fred, barney, & pebbles'); + * // => '<p>fred, barney, & pebbles</p>' + */ + function wrap(value, wrapper) { + return partial(castFunction(wrapper), value); + } + + /*------------------------------------------------------------------------*/ + + /** + * Casts `value` as an array if it's not one. + * + * @static + * @memberOf _ + * @since 4.4.0 + * @category Lang + * @param {*} value The value to inspect. + * @returns {Array} Returns the cast array. + * @example + * + * _.castArray(1); + * // => [1] + * + * _.castArray({ 'a': 1 }); + * // => [{ 'a': 1 }] + * + * _.castArray('abc'); + * // => ['abc'] + * + * _.castArray(null); + * // => [null] + * + * _.castArray(undefined); + * // => [undefined] + * + * _.castArray(); + * // => [] + * + * var array = [1, 2, 3]; + * console.log(_.castArray(array) === array); + * // => true + */ + function castArray() { + if (!arguments.length) { + return []; + } + var value = arguments[0]; + return isArray(value) ? value : [value]; + } + + /** + * Creates a shallow clone of `value`. + * + * **Note:** This method is loosely based on the + * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm) + * and supports cloning arrays, array buffers, booleans, date objects, maps, + * numbers, `Object` objects, regexes, sets, strings, symbols, and typed + * arrays. The own enumerable properties of `arguments` objects are cloned + * as plain objects. An empty object is returned for uncloneable values such + * as error objects, functions, DOM nodes, and WeakMaps. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to clone. + * @returns {*} Returns the cloned value. + * @see _.cloneDeep + * @example + * + * var objects = [{ 'a': 1 }, { 'b': 2 }]; + * + * var shallow = _.clone(objects); + * console.log(shallow[0] === objects[0]); + * // => true + */ + function clone(value) { + return baseClone(value, CLONE_SYMBOLS_FLAG); + } + + /** + * This method is like `_.clone` except that it accepts `customizer` which + * is invoked to produce the cloned value. If `customizer` returns `undefined`, + * cloning is handled by the method instead. The `customizer` is invoked with + * up to four arguments; (value [, index|key, object, stack]). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to clone. + * @param {Function} [customizer] The function to customize cloning. + * @returns {*} Returns the cloned value. + * @see _.cloneDeepWith + * @example + * + * function customizer(value) { + * if (_.isElement(value)) { + * return value.cloneNode(false); + * } + * } + * + * var el = _.cloneWith(document.body, customizer); + * + * console.log(el === document.body); + * // => false + * console.log(el.nodeName); + * // => 'BODY' + * console.log(el.childNodes.length); + * // => 0 + */ + function cloneWith(value, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return baseClone(value, CLONE_SYMBOLS_FLAG, customizer); + } + + /** + * This method is like `_.clone` except that it recursively clones `value`. + * + * @static + * @memberOf _ + * @since 1.0.0 + * @category Lang + * @param {*} value The value to recursively clone. + * @returns {*} Returns the deep cloned value. + * @see _.clone + * @example + * + * var objects = [{ 'a': 1 }, { 'b': 2 }]; + * + * var deep = _.cloneDeep(objects); + * console.log(deep[0] === objects[0]); + * // => false + */ + function cloneDeep(value) { + return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG); + } + + /** + * This method is like `_.cloneWith` except that it recursively clones `value`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to recursively clone. + * @param {Function} [customizer] The function to customize cloning. + * @returns {*} Returns the deep cloned value. + * @see _.cloneWith + * @example + * + * function customizer(value) { + * if (_.isElement(value)) { + * return value.cloneNode(true); + * } + * } + * + * var el = _.cloneDeepWith(document.body, customizer); + * + * console.log(el === document.body); + * // => false + * console.log(el.nodeName); + * // => 'BODY' + * console.log(el.childNodes.length); + * // => 20 + */ + function cloneDeepWith(value, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer); + } + + /** + * Checks if `object` conforms to `source` by invoking the predicate + * properties of `source` with the corresponding property values of `object`. + * + * **Note:** This method is equivalent to `_.conforms` when `source` is + * partially applied. + * + * @static + * @memberOf _ + * @since 4.14.0 + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property predicates to conform to. + * @returns {boolean} Returns `true` if `object` conforms, else `false`. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * + * _.conformsTo(object, { 'b': function(n) { return n > 1; } }); + * // => true + * + * _.conformsTo(object, { 'b': function(n) { return n > 2; } }); + * // => false + */ + function conformsTo(object, source) { + return source == null || baseConformsTo(object, source, keys(source)); + } + + /** + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ + function eq(value, other) { + return value === other || (value !== value && other !== other); + } + + /** + * Checks if `value` is greater than `other`. + * + * @static + * @memberOf _ + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than `other`, + * else `false`. + * @see _.lt + * @example + * + * _.gt(3, 1); + * // => true + * + * _.gt(3, 3); + * // => false + * + * _.gt(1, 3); + * // => false + */ + var gt = createRelationalOperation(baseGt); + + /** + * Checks if `value` is greater than or equal to `other`. + * + * @static + * @memberOf _ + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than or equal to + * `other`, else `false`. + * @see _.lte + * @example + * + * _.gte(3, 1); + * // => true + * + * _.gte(3, 3); + * // => true + * + * _.gte(1, 3); + * // => false + */ + var gte = createRelationalOperation(function (value, other) { + return value >= other; + }); + + /** + * Checks if `value` is likely an `arguments` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + * else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ + var isArguments = baseIsArguments( + (function () { + return arguments; + })(), + ) + ? baseIsArguments + : function (value) { + return ( + isObjectLike(value) && + hasOwnProperty.call(value, 'callee') && + !propertyIsEnumerable.call(value, 'callee') + ); + }; + + /** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ + var isArray = Array.isArray; + + /** + * Checks if `value` is classified as an `ArrayBuffer` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`. + * @example + * + * _.isArrayBuffer(new ArrayBuffer(2)); + * // => true + * + * _.isArrayBuffer(new Array(2)); + * // => false + */ + var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer; + + /** + * Checks if `value` is array-like. A value is considered array-like if it's + * not a function and has a `value.length` that's an integer greater than or + * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + * @example + * + * _.isArrayLike([1, 2, 3]); + * // => true + * + * _.isArrayLike(document.body.children); + * // => true + * + * _.isArrayLike('abc'); + * // => true + * + * _.isArrayLike(_.noop); + * // => false + */ + function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); + } + + /** + * This method is like `_.isArrayLike` except that it also checks if `value` + * is an object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array-like object, + * else `false`. + * @example + * + * _.isArrayLikeObject([1, 2, 3]); + * // => true + * + * _.isArrayLikeObject(document.body.children); + * // => true + * + * _.isArrayLikeObject('abc'); + * // => false + * + * _.isArrayLikeObject(_.noop); + * // => false + */ + function isArrayLikeObject(value) { + return isObjectLike(value) && isArrayLike(value); + } + + /** + * Checks if `value` is classified as a boolean primitive or object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a boolean, else `false`. + * @example + * + * _.isBoolean(false); + * // => true + * + * _.isBoolean(null); + * // => false + */ + function isBoolean(value) { + return ( + value === true || value === false || (isObjectLike(value) && baseGetTag(value) == boolTag) + ); + } + + /** + * Checks if `value` is a buffer. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. + * @example + * + * _.isBuffer(new Buffer(2)); + * // => true + * + * _.isBuffer(new Uint8Array(2)); + * // => false + */ + var isBuffer = nativeIsBuffer || stubFalse; + + /** + * Checks if `value` is classified as a `Date` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a date object, else `false`. + * @example + * + * _.isDate(new Date); + * // => true + * + * _.isDate('Mon April 23 2012'); + * // => false + */ + var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate; + + /** + * Checks if `value` is likely a DOM element. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`. + * @example + * + * _.isElement(document.body); + * // => true + * + * _.isElement('<body>'); + * // => false + */ + function isElement(value) { + return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value); + } + + /** + * Checks if `value` is an empty object, collection, map, or set. + * + * Objects are considered empty if they have no own enumerable string keyed + * properties. + * + * Array-like values such as `arguments` objects, arrays, buffers, strings, or + * jQuery-like collections are considered empty if they have a `length` of `0`. + * Similarly, maps and sets are considered empty if they have a `size` of `0`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is empty, else `false`. + * @example + * + * _.isEmpty(null); + * // => true + * + * _.isEmpty(true); + * // => true + * + * _.isEmpty(1); + * // => true + * + * _.isEmpty([1, 2, 3]); + * // => false + * + * _.isEmpty({ 'a': 1 }); + * // => false + */ + function isEmpty(value) { + if (value == null) { + return true; + } + if ( + isArrayLike(value) && + (isArray(value) || + typeof value == 'string' || + typeof value.splice == 'function' || + isBuffer(value) || + isTypedArray(value) || + isArguments(value)) + ) { + return !value.length; + } + var tag = getTag(value); + if (tag == mapTag || tag == setTag) { + return !value.size; + } + if (isPrototype(value)) { + return !baseKeys(value).length; + } + for (var key in value) { + if (hasOwnProperty.call(value, key)) { + return false; + } + } + return true; + } + + /** + * Performs a deep comparison between two values to determine if they are + * equivalent. + * + * **Note:** This method supports comparing arrays, array buffers, booleans, + * date objects, error objects, maps, numbers, `Object` objects, regexes, + * sets, strings, symbols, and typed arrays. `Object` objects are compared + * by their own, not inherited, enumerable properties. Functions and DOM + * nodes are compared by strict equality, i.e. `===`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.isEqual(object, other); + * // => true + * + * object === other; + * // => false + */ + function isEqual(value, other) { + return baseIsEqual(value, other); + } + + /** + * This method is like `_.isEqual` except that it accepts `customizer` which + * is invoked to compare values. If `customizer` returns `undefined`, comparisons + * are handled by the method instead. The `customizer` is invoked with up to + * six arguments: (objValue, othValue [, index|key, object, other, stack]). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * function isGreeting(value) { + * return /^h(?:i|ello)$/.test(value); + * } + * + * function customizer(objValue, othValue) { + * if (isGreeting(objValue) && isGreeting(othValue)) { + * return true; + * } + * } + * + * var array = ['hello', 'goodbye']; + * var other = ['hi', 'goodbye']; + * + * _.isEqualWith(array, other, customizer); + * // => true + */ + function isEqualWith(value, other, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + var result = customizer ? customizer(value, other) : undefined; + return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result; + } + + /** + * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`, + * `SyntaxError`, `TypeError`, or `URIError` object. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an error object, else `false`. + * @example + * + * _.isError(new Error); + * // => true + * + * _.isError(Error); + * // => false + */ + function isError(value) { + if (!isObjectLike(value)) { + return false; + } + var tag = baseGetTag(value); + return ( + tag == errorTag || + tag == domExcTag || + (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value)) + ); + } + + /** + * Checks if `value` is a finite primitive number. + * + * **Note:** This method is based on + * [`Number.isFinite`](https://mdn.io/Number/isFinite). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a finite number, else `false`. + * @example + * + * _.isFinite(3); + * // => true + * + * _.isFinite(Number.MIN_VALUE); + * // => true + * + * _.isFinite(Infinity); + * // => false + * + * _.isFinite('3'); + * // => false + */ + function isFinite(value) { + return typeof value == 'number' && nativeIsFinite(value); + } + + /** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ + function isFunction(value) { + if (!isObject(value)) { + return false; + } + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 9 which returns 'object' for typed arrays and other constructors. + var tag = baseGetTag(value); + return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; + } + + /** + * Checks if `value` is an integer. + * + * **Note:** This method is based on + * [`Number.isInteger`](https://mdn.io/Number/isInteger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an integer, else `false`. + * @example + * + * _.isInteger(3); + * // => true + * + * _.isInteger(Number.MIN_VALUE); + * // => false + * + * _.isInteger(Infinity); + * // => false + * + * _.isInteger('3'); + * // => false + */ + function isInteger(value) { + return typeof value == 'number' && value == toInteger(value); + } + + /** + * Checks if `value` is a valid array-like length. + * + * **Note:** This method is loosely based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @example + * + * _.isLength(3); + * // => true + * + * _.isLength(Number.MIN_VALUE); + * // => false + * + * _.isLength(Infinity); + * // => false + * + * _.isLength('3'); + * // => false + */ + function isLength(value) { + return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + + /** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ + function isObject(value) { + var type = typeof value; + return value != null && (type == 'object' || type == 'function'); + } + + /** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ + function isObjectLike(value) { + return value != null && typeof value == 'object'; + } + + /** + * Checks if `value` is classified as a `Map` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a map, else `false`. + * @example + * + * _.isMap(new Map); + * // => true + * + * _.isMap(new WeakMap); + * // => false + */ + var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap; + + /** + * Performs a partial deep comparison between `object` and `source` to + * determine if `object` contains equivalent property values. + * + * **Note:** This method is equivalent to `_.matches` when `source` is + * partially applied. + * + * Partial comparisons will match empty array and empty object `source` + * values against any array or object value, respectively. See `_.isEqual` + * for a list of supported value comparisons. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * + * _.isMatch(object, { 'b': 2 }); + * // => true + * + * _.isMatch(object, { 'b': 1 }); + * // => false + */ + function isMatch(object, source) { + return object === source || baseIsMatch(object, source, getMatchData(source)); + } + + /** + * This method is like `_.isMatch` except that it accepts `customizer` which + * is invoked to compare values. If `customizer` returns `undefined`, comparisons + * are handled by the method instead. The `customizer` is invoked with five + * arguments: (objValue, srcValue, index|key, object, source). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + * @example + * + * function isGreeting(value) { + * return /^h(?:i|ello)$/.test(value); + * } + * + * function customizer(objValue, srcValue) { + * if (isGreeting(objValue) && isGreeting(srcValue)) { + * return true; + * } + * } + * + * var object = { 'greeting': 'hello' }; + * var source = { 'greeting': 'hi' }; + * + * _.isMatchWith(object, source, customizer); + * // => true + */ + function isMatchWith(object, source, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return baseIsMatch(object, source, getMatchData(source), customizer); + } + + /** + * Checks if `value` is `NaN`. + * + * **Note:** This method is based on + * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as + * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for + * `undefined` and other non-number values. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + * @example + * + * _.isNaN(NaN); + * // => true + * + * _.isNaN(new Number(NaN)); + * // => true + * + * isNaN(undefined); + * // => true + * + * _.isNaN(undefined); + * // => false + */ + function isNaN(value) { + // An `NaN` primitive is the only value that is not equal to itself. + // Perform the `toStringTag` check first to avoid errors with some + // ActiveX objects in IE. + return isNumber(value) && value != +value; + } + + /** + * Checks if `value` is a pristine native function. + * + * **Note:** This method can't reliably detect native functions in the presence + * of the core-js package because core-js circumvents this kind of detection. + * Despite multiple requests, the core-js maintainer has made it clear: any + * attempt to fix the detection will be obstructed. As a result, we're left + * with little choice but to throw an error. Unfortunately, this also affects + * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill), + * which rely on core-js. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + * @example + * + * _.isNative(Array.prototype.push); + * // => true + * + * _.isNative(_); + * // => false + */ + function isNative(value) { + if (isMaskable(value)) { + throw new Error(CORE_ERROR_TEXT); + } + return baseIsNative(value); + } + + /** + * Checks if `value` is `null`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `null`, else `false`. + * @example + * + * _.isNull(null); + * // => true + * + * _.isNull(void 0); + * // => false + */ + function isNull(value) { + return value === null; + } + + /** + * Checks if `value` is `null` or `undefined`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is nullish, else `false`. + * @example + * + * _.isNil(null); + * // => true + * + * _.isNil(void 0); + * // => true + * + * _.isNil(NaN); + * // => false + */ + function isNil(value) { + return value == null; + } + + /** + * Checks if `value` is classified as a `Number` primitive or object. + * + * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are + * classified as numbers, use the `_.isFinite` method. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a number, else `false`. + * @example + * + * _.isNumber(3); + * // => true + * + * _.isNumber(Number.MIN_VALUE); + * // => true + * + * _.isNumber(Infinity); + * // => true + * + * _.isNumber('3'); + * // => false + */ + function isNumber(value) { + return typeof value == 'number' || (isObjectLike(value) && baseGetTag(value) == numberTag); + } + + /** + * Checks if `value` is a plain object, that is, an object created by the + * `Object` constructor or one with a `[[Prototype]]` of `null`. + * + * @static + * @memberOf _ + * @since 0.8.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * _.isPlainObject(new Foo); + * // => false + * + * _.isPlainObject([1, 2, 3]); + * // => false + * + * _.isPlainObject({ 'x': 0, 'y': 0 }); + * // => true + * + * _.isPlainObject(Object.create(null)); + * // => true + */ + function isPlainObject(value) { + if (!isObjectLike(value) || baseGetTag(value) != objectTag) { + return false; + } + var proto = getPrototype(value); + if (proto === null) { + return true; + } + var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; + return ( + typeof Ctor == 'function' && + Ctor instanceof Ctor && + funcToString.call(Ctor) == objectCtorString + ); + } + + /** + * Checks if `value` is classified as a `RegExp` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. + * @example + * + * _.isRegExp(/abc/); + * // => true + * + * _.isRegExp('/abc/'); + * // => false + */ + var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp; + + /** + * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754 + * double precision number which isn't the result of a rounded unsafe integer. + * + * **Note:** This method is based on + * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`. + * @example + * + * _.isSafeInteger(3); + * // => true + * + * _.isSafeInteger(Number.MIN_VALUE); + * // => false + * + * _.isSafeInteger(Infinity); + * // => false + * + * _.isSafeInteger('3'); + * // => false + */ + function isSafeInteger(value) { + return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER; + } + + /** + * Checks if `value` is classified as a `Set` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a set, else `false`. + * @example + * + * _.isSet(new Set); + * // => true + * + * _.isSet(new WeakSet); + * // => false + */ + var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet; + + /** + * Checks if `value` is classified as a `String` primitive or object. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a string, else `false`. + * @example + * + * _.isString('abc'); + * // => true + * + * _.isString(1); + * // => false + */ + function isString(value) { + return ( + typeof value == 'string' || + (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag) + ); + } + + /** + * Checks if `value` is classified as a `Symbol` primitive or object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ + function isSymbol(value) { + return typeof value == 'symbol' || (isObjectLike(value) && baseGetTag(value) == symbolTag); + } + + /** + * Checks if `value` is classified as a typed array. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + * @example + * + * _.isTypedArray(new Uint8Array); + * // => true + * + * _.isTypedArray([]); + * // => false + */ + var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; + + /** + * Checks if `value` is `undefined`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`. + * @example + * + * _.isUndefined(void 0); + * // => true + * + * _.isUndefined(null); + * // => false + */ + function isUndefined(value) { + return value === undefined; + } + + /** + * Checks if `value` is classified as a `WeakMap` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a weak map, else `false`. + * @example + * + * _.isWeakMap(new WeakMap); + * // => true + * + * _.isWeakMap(new Map); + * // => false + */ + function isWeakMap(value) { + return isObjectLike(value) && getTag(value) == weakMapTag; + } + + /** + * Checks if `value` is classified as a `WeakSet` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a weak set, else `false`. + * @example + * + * _.isWeakSet(new WeakSet); + * // => true + * + * _.isWeakSet(new Set); + * // => false + */ + function isWeakSet(value) { + return isObjectLike(value) && baseGetTag(value) == weakSetTag; + } + + /** + * Checks if `value` is less than `other`. + * + * @static + * @memberOf _ + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than `other`, + * else `false`. + * @see _.gt + * @example + * + * _.lt(1, 3); + * // => true + * + * _.lt(3, 3); + * // => false + * + * _.lt(3, 1); + * // => false + */ + var lt = createRelationalOperation(baseLt); + + /** + * Checks if `value` is less than or equal to `other`. + * + * @static + * @memberOf _ + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than or equal to + * `other`, else `false`. + * @see _.gte + * @example + * + * _.lte(1, 3); + * // => true + * + * _.lte(3, 3); + * // => true + * + * _.lte(3, 1); + * // => false + */ + var lte = createRelationalOperation(function (value, other) { + return value <= other; + }); + + /** + * Converts `value` to an array. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to convert. + * @returns {Array} Returns the converted array. + * @example + * + * _.toArray({ 'a': 1, 'b': 2 }); + * // => [1, 2] + * + * _.toArray('abc'); + * // => ['a', 'b', 'c'] + * + * _.toArray(1); + * // => [] + * + * _.toArray(null); + * // => [] + */ + function toArray(value) { + if (!value) { + return []; + } + if (isArrayLike(value)) { + return isString(value) ? stringToArray(value) : copyArray(value); + } + if (symIterator && value[symIterator]) { + return iteratorToArray(value[symIterator]()); + } + var tag = getTag(value), + func = tag == mapTag ? mapToArray : tag == setTag ? setToArray : values; + + return func(value); + } + + /** + * Converts `value` to a finite number. + * + * @static + * @memberOf _ + * @since 4.12.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted number. + * @example + * + * _.toFinite(3.2); + * // => 3.2 + * + * _.toFinite(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toFinite(Infinity); + * // => 1.7976931348623157e+308 + * + * _.toFinite('3.2'); + * // => 3.2 + */ + function toFinite(value) { + if (!value) { + return value === 0 ? value : 0; + } + value = toNumber(value); + if (value === INFINITY || value === -INFINITY) { + var sign = value < 0 ? -1 : 1; + return sign * MAX_INTEGER; + } + return value === value ? value : 0; + } + + /** + * Converts `value` to an integer. + * + * **Note:** This method is loosely based on + * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted integer. + * @example + * + * _.toInteger(3.2); + * // => 3 + * + * _.toInteger(Number.MIN_VALUE); + * // => 0 + * + * _.toInteger(Infinity); + * // => 1.7976931348623157e+308 + * + * _.toInteger('3.2'); + * // => 3 + */ + function toInteger(value) { + var result = toFinite(value), + remainder = result % 1; + + return result === result ? (remainder ? result - remainder : result) : 0; + } + + /** + * Converts `value` to an integer suitable for use as the length of an + * array-like object. + * + * **Note:** This method is based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted integer. + * @example + * + * _.toLength(3.2); + * // => 3 + * + * _.toLength(Number.MIN_VALUE); + * // => 0 + * + * _.toLength(Infinity); + * // => 4294967295 + * + * _.toLength('3.2'); + * // => 3 + */ + function toLength(value) { + return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0; + } + + /** + * Converts `value` to a number. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to process. + * @returns {number} Returns the number. + * @example + * + * _.toNumber(3.2); + * // => 3.2 + * + * _.toNumber(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toNumber(Infinity); + * // => Infinity + * + * _.toNumber('3.2'); + * // => 3.2 + */ + function toNumber(value) { + if (typeof value == 'number') { + return value; + } + if (isSymbol(value)) { + return NAN; + } + if (isObject(value)) { + var other = typeof value.valueOf == 'function' ? value.valueOf() : value; + value = isObject(other) ? other + '' : other; + } + if (typeof value != 'string') { + return value === 0 ? value : +value; + } + value = value.replace(reTrim, ''); + var isBinary = reIsBinary.test(value); + return isBinary || reIsOctal.test(value) + ? freeParseInt(value.slice(2), isBinary ? 2 : 8) + : reIsBadHex.test(value) + ? NAN + : +value; + } + + /** + * Converts `value` to a plain object flattening inherited enumerable string + * keyed properties of `value` to own properties of the plain object. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {Object} Returns the converted plain object. + * @example + * + * function Foo() { + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.assign({ 'a': 1 }, new Foo); + * // => { 'a': 1, 'b': 2 } + * + * _.assign({ 'a': 1 }, _.toPlainObject(new Foo)); + * // => { 'a': 1, 'b': 2, 'c': 3 } + */ + function toPlainObject(value) { + return copyObject(value, keysIn(value)); + } + + /** + * Converts `value` to a safe integer. A safe integer can be compared and + * represented correctly. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted integer. + * @example + * + * _.toSafeInteger(3.2); + * // => 3 + * + * _.toSafeInteger(Number.MIN_VALUE); + * // => 0 + * + * _.toSafeInteger(Infinity); + * // => 9007199254740991 + * + * _.toSafeInteger('3.2'); + * // => 3 + */ + function toSafeInteger(value) { + return value + ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER) + : value === 0 + ? value + : 0; + } + + /** + * Converts `value` to a string. An empty string is returned for `null` + * and `undefined` values. The sign of `-0` is preserved. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + * @example + * + * _.toString(null); + * // => '' + * + * _.toString(-0); + * // => '-0' + * + * _.toString([1, 2, 3]); + * // => '1,2,3' + */ + function toString(value) { + return value == null ? '' : baseToString(value); + } + + /*------------------------------------------------------------------------*/ + + /** + * Assigns own enumerable string keyed properties of source objects to the + * destination object. Source objects are applied from left to right. + * Subsequent sources overwrite property assignments of previous sources. + * + * **Note:** This method mutates `object` and is loosely based on + * [`Object.assign`](https://mdn.io/Object/assign). + * + * @static + * @memberOf _ + * @since 0.10.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.assignIn + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * function Bar() { + * this.c = 3; + * } + * + * Foo.prototype.b = 2; + * Bar.prototype.d = 4; + * + * _.assign({ 'a': 0 }, new Foo, new Bar); + * // => { 'a': 1, 'c': 3 } + */ + var assign = createAssigner(function (object, source) { + if (isPrototype(source) || isArrayLike(source)) { + copyObject(source, keys(source), object); + return; + } + for (var key in source) { + if (hasOwnProperty.call(source, key)) { + assignValue(object, key, source[key]); + } + } + }); + + /** + * This method is like `_.assign` except that it iterates over own and + * inherited source properties. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias extend + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.assign + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * function Bar() { + * this.c = 3; + * } + * + * Foo.prototype.b = 2; + * Bar.prototype.d = 4; + * + * _.assignIn({ 'a': 0 }, new Foo, new Bar); + * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 } + */ + var assignIn = createAssigner(function (object, source) { + copyObject(source, keysIn(source), object); + }); + + /** + * This method is like `_.assignIn` except that it accepts `customizer` + * which is invoked to produce the assigned values. If `customizer` returns + * `undefined`, assignment is handled by the method instead. The `customizer` + * is invoked with five arguments: (objValue, srcValue, key, object, source). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias extendWith + * @category Object + * @param {Object} object The destination object. + * @param {...Object} sources The source objects. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @see _.assignWith + * @example + * + * function customizer(objValue, srcValue) { + * return _.isUndefined(objValue) ? srcValue : objValue; + * } + * + * var defaults = _.partialRight(_.assignInWith, customizer); + * + * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ + var assignInWith = createAssigner(function (object, source, srcIndex, customizer) { + copyObject(source, keysIn(source), object, customizer); + }); + + /** + * This method is like `_.assign` except that it accepts `customizer` + * which is invoked to produce the assigned values. If `customizer` returns + * `undefined`, assignment is handled by the method instead. The `customizer` + * is invoked with five arguments: (objValue, srcValue, key, object, source). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} sources The source objects. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @see _.assignInWith + * @example + * + * function customizer(objValue, srcValue) { + * return _.isUndefined(objValue) ? srcValue : objValue; + * } + * + * var defaults = _.partialRight(_.assignWith, customizer); + * + * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ + var assignWith = createAssigner(function (object, source, srcIndex, customizer) { + copyObject(source, keys(source), object, customizer); + }); + + /** + * Creates an array of values corresponding to `paths` of `object`. + * + * @static + * @memberOf _ + * @since 1.0.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {...(string|string[])} [paths] The property paths to pick. + * @returns {Array} Returns the picked values. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] }; + * + * _.at(object, ['a[0].b.c', 'a[1]']); + * // => [3, 4] + */ + var at = flatRest(baseAt); + + /** + * Creates an object that inherits from the `prototype` object. If a + * `properties` object is given, its own enumerable string keyed properties + * are assigned to the created object. + * + * @static + * @memberOf _ + * @since 2.3.0 + * @category Object + * @param {Object} prototype The object to inherit from. + * @param {Object} [properties] The properties to assign to the object. + * @returns {Object} Returns the new object. + * @example + * + * function Shape() { + * this.x = 0; + * this.y = 0; + * } + * + * function Circle() { + * Shape.call(this); + * } + * + * Circle.prototype = _.create(Shape.prototype, { + * 'constructor': Circle + * }); + * + * var circle = new Circle; + * circle instanceof Circle; + * // => true + * + * circle instanceof Shape; + * // => true + */ + function create(prototype, properties) { + var result = baseCreate(prototype); + return properties == null ? result : baseAssign(result, properties); + } + + /** + * Assigns own and inherited enumerable string keyed properties of source + * objects to the destination object for all destination properties that + * resolve to `undefined`. Source objects are applied from left to right. + * Once a property is set, additional values of the same property are ignored. + * + * **Note:** This method mutates `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.defaultsDeep + * @example + * + * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ + var defaults = baseRest(function (object, sources) { + object = Object(object); + + var index = -1; + var length = sources.length; + var guard = length > 2 ? sources[2] : undefined; + + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + length = 1; + } + + while (++index < length) { + var source = sources[index]; + var props = keysIn(source); + var propsIndex = -1; + var propsLength = props.length; + + while (++propsIndex < propsLength) { + var key = props[propsIndex]; + var value = object[key]; + + if ( + value === undefined || + (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key)) + ) { + object[key] = source[key]; + } + } + } + + return object; + }); + + /** + * This method is like `_.defaults` except that it recursively assigns + * default properties. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 3.10.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.defaults + * @example + * + * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } }); + * // => { 'a': { 'b': 2, 'c': 3 } } + */ + var defaultsDeep = baseRest(function (args) { + args.push(undefined, customDefaultsMerge); + return apply(mergeWith, undefined, args); + }); + + /** + * This method is like `_.find` except that it returns the key of the first + * element `predicate` returns truthy for instead of the element itself. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category Object + * @param {Object} object The object to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {string|undefined} Returns the key of the matched element, + * else `undefined`. + * @example + * + * var users = { + * 'barney': { 'age': 36, 'active': true }, + * 'fred': { 'age': 40, 'active': false }, + * 'pebbles': { 'age': 1, 'active': true } + * }; + * + * _.findKey(users, function(o) { return o.age < 40; }); + * // => 'barney' (iteration order is not guaranteed) + * + * // The `_.matches` iteratee shorthand. + * _.findKey(users, { 'age': 1, 'active': true }); + * // => 'pebbles' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findKey(users, ['active', false]); + * // => 'fred' + * + * // The `_.property` iteratee shorthand. + * _.findKey(users, 'active'); + * // => 'barney' + */ + function findKey(object, predicate) { + return baseFindKey(object, getIteratee(predicate, 3), baseForOwn); + } + + /** + * This method is like `_.findKey` except that it iterates over elements of + * a collection in the opposite order. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Object + * @param {Object} object The object to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {string|undefined} Returns the key of the matched element, + * else `undefined`. + * @example + * + * var users = { + * 'barney': { 'age': 36, 'active': true }, + * 'fred': { 'age': 40, 'active': false }, + * 'pebbles': { 'age': 1, 'active': true } + * }; + * + * _.findLastKey(users, function(o) { return o.age < 40; }); + * // => returns 'pebbles' assuming `_.findKey` returns 'barney' + * + * // The `_.matches` iteratee shorthand. + * _.findLastKey(users, { 'age': 36, 'active': true }); + * // => 'barney' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findLastKey(users, ['active', false]); + * // => 'fred' + * + * // The `_.property` iteratee shorthand. + * _.findLastKey(users, 'active'); + * // => 'pebbles' + */ + function findLastKey(object, predicate) { + return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight); + } + + /** + * Iterates over own and inherited enumerable string keyed properties of an + * object and invokes `iteratee` for each property. The iteratee is invoked + * with three arguments: (value, key, object). Iteratee functions may exit + * iteration early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @since 0.3.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forInRight + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forIn(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed). + */ + function forIn(object, iteratee) { + return object == null ? object : baseFor(object, getIteratee(iteratee, 3), keysIn); + } + + /** + * This method is like `_.forIn` except that it iterates over properties of + * `object` in the opposite order. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forIn + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forInRight(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'. + */ + function forInRight(object, iteratee) { + return object == null ? object : baseForRight(object, getIteratee(iteratee, 3), keysIn); + } + + /** + * Iterates over own enumerable string keyed properties of an object and + * invokes `iteratee` for each property. The iteratee is invoked with three + * arguments: (value, key, object). Iteratee functions may exit iteration + * early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @since 0.3.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forOwnRight + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forOwn(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a' then 'b' (iteration order is not guaranteed). + */ + function forOwn(object, iteratee) { + return object && baseForOwn(object, getIteratee(iteratee, 3)); + } + + /** + * This method is like `_.forOwn` except that it iterates over properties of + * `object` in the opposite order. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forOwn + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forOwnRight(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'. + */ + function forOwnRight(object, iteratee) { + return object && baseForOwnRight(object, getIteratee(iteratee, 3)); + } + + /** + * Creates an array of function property names from own enumerable properties + * of `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to inspect. + * @returns {Array} Returns the function names. + * @see _.functionsIn + * @example + * + * function Foo() { + * this.a = _.constant('a'); + * this.b = _.constant('b'); + * } + * + * Foo.prototype.c = _.constant('c'); + * + * _.functions(new Foo); + * // => ['a', 'b'] + */ + function functions(object) { + return object == null ? [] : baseFunctions(object, keys(object)); + } + + /** + * Creates an array of function property names from own and inherited + * enumerable properties of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to inspect. + * @returns {Array} Returns the function names. + * @see _.functions + * @example + * + * function Foo() { + * this.a = _.constant('a'); + * this.b = _.constant('b'); + * } + * + * Foo.prototype.c = _.constant('c'); + * + * _.functionsIn(new Foo); + * // => ['a', 'b', 'c'] + */ + function functionsIn(object) { + return object == null ? [] : baseFunctions(object, keysIn(object)); + } + + /** + * Gets the value at `path` of `object`. If the resolved value is + * `undefined`, the `defaultValue` is returned in its place. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @param {*} [defaultValue] The value returned for `undefined` resolved values. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.get(object, 'a[0].b.c'); + * // => 3 + * + * _.get(object, ['a', '0', 'b', 'c']); + * // => 3 + * + * _.get(object, 'a.b.c', 'default'); + * // => 'default' + */ + function get(object, path, defaultValue) { + var result = object == null ? undefined : baseGet(object, path); + return result === undefined ? defaultValue : result; + } + + /** + * Checks if `path` is a direct property of `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = { 'a': { 'b': 2 } }; + * var other = _.create({ 'a': _.create({ 'b': 2 }) }); + * + * _.has(object, 'a'); + * // => true + * + * _.has(object, 'a.b'); + * // => true + * + * _.has(object, ['a', 'b']); + * // => true + * + * _.has(other, 'a'); + * // => false + */ + function has(object, path) { + return object != null && hasPath(object, path, baseHas); + } + + /** + * Checks if `path` is a direct or inherited property of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = _.create({ 'a': _.create({ 'b': 2 }) }); + * + * _.hasIn(object, 'a'); + * // => true + * + * _.hasIn(object, 'a.b'); + * // => true + * + * _.hasIn(object, ['a', 'b']); + * // => true + * + * _.hasIn(object, 'b'); + * // => false + */ + function hasIn(object, path) { + return object != null && hasPath(object, path, baseHasIn); + } + + /** + * Creates an object composed of the inverted keys and values of `object`. + * If `object` contains duplicate values, subsequent values overwrite + * property assignments of previous values. + * + * @static + * @memberOf _ + * @since 0.7.0 + * @category Object + * @param {Object} object The object to invert. + * @returns {Object} Returns the new inverted object. + * @example + * + * var object = { 'a': 1, 'b': 2, 'c': 1 }; + * + * _.invert(object); + * // => { '1': 'c', '2': 'b' } + */ + var invert = createInverter(function (result, value, key) { + if (value != null && typeof value.toString != 'function') { + value = nativeObjectToString.call(value); + } + + result[value] = key; + }, constant(identity)); + + /** + * This method is like `_.invert` except that the inverted object is generated + * from the results of running each element of `object` thru `iteratee`. The + * corresponding inverted value of each inverted key is an array of keys + * responsible for generating the inverted value. The iteratee is invoked + * with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.1.0 + * @category Object + * @param {Object} object The object to invert. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Object} Returns the new inverted object. + * @example + * + * var object = { 'a': 1, 'b': 2, 'c': 1 }; + * + * _.invertBy(object); + * // => { '1': ['a', 'c'], '2': ['b'] } + * + * _.invertBy(object, function(value) { + * return 'group' + value; + * }); + * // => { 'group1': ['a', 'c'], 'group2': ['b'] } + */ + var invertBy = createInverter(function (result, value, key) { + if (value != null && typeof value.toString != 'function') { + value = nativeObjectToString.call(value); + } + + if (hasOwnProperty.call(result, value)) { + result[value].push(key); + } else { + result[value] = [key]; + } + }, getIteratee); + + /** + * Invokes the method at `path` of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the method to invoke. + * @param {...*} [args] The arguments to invoke the method with. + * @returns {*} Returns the result of the invoked method. + * @example + * + * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] }; + * + * _.invoke(object, 'a[0].b.c.slice', 1, 3); + * // => [2, 3] + */ + var invoke = baseRest(baseInvoke); + + /** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * for more details. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ + function keys(object) { + return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); + } + + /** + * Creates an array of the own and inherited enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keysIn(new Foo); + * // => ['a', 'b', 'c'] (iteration order is not guaranteed) + */ + function keysIn(object) { + return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); + } + + /** + * The opposite of `_.mapValues`; this method creates an object with the + * same values as `object` and keys generated by running each own enumerable + * string keyed property of `object` thru `iteratee`. The iteratee is invoked + * with three arguments: (value, key, object). + * + * @static + * @memberOf _ + * @since 3.8.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns the new mapped object. + * @see _.mapValues + * @example + * + * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) { + * return key + value; + * }); + * // => { 'a1': 1, 'b2': 2 } + */ + function mapKeys(object, iteratee) { + var result = {}; + iteratee = getIteratee(iteratee, 3); + + baseForOwn(object, function (value, key, object) { + baseAssignValue(result, iteratee(value, key, object), value); + }); + return result; + } + + /** + * Creates an object with the same keys as `object` and values generated + * by running each own enumerable string keyed property of `object` thru + * `iteratee`. The iteratee is invoked with three arguments: + * (value, key, object). + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns the new mapped object. + * @see _.mapKeys + * @example + * + * var users = { + * 'fred': { 'user': 'fred', 'age': 40 }, + * 'pebbles': { 'user': 'pebbles', 'age': 1 } + * }; + * + * _.mapValues(users, function(o) { return o.age; }); + * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) + * + * // The `_.property` iteratee shorthand. + * _.mapValues(users, 'age'); + * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) + */ + function mapValues(object, iteratee) { + var result = {}; + iteratee = getIteratee(iteratee, 3); + + baseForOwn(object, function (value, key, object) { + baseAssignValue(result, key, iteratee(value, key, object)); + }); + return result; + } + + /** + * This method is like `_.assign` except that it recursively merges own and + * inherited enumerable string keyed properties of source objects into the + * destination object. Source properties that resolve to `undefined` are + * skipped if a destination value exists. Array and plain object properties + * are merged recursively. Other objects and value types are overridden by + * assignment. Source objects are applied from left to right. Subsequent + * sources overwrite property assignments of previous sources. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 0.5.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @example + * + * var object = { + * 'a': [{ 'b': 2 }, { 'd': 4 }] + * }; + * + * var other = { + * 'a': [{ 'c': 3 }, { 'e': 5 }] + * }; + * + * _.merge(object, other); + * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] } + */ + var merge = createAssigner(function (object, source, srcIndex) { + baseMerge(object, source, srcIndex); + }); + + /** + * This method is like `_.merge` except that it accepts `customizer` which + * is invoked to produce the merged values of the destination and source + * properties. If `customizer` returns `undefined`, merging is handled by the + * method instead. The `customizer` is invoked with six arguments: + * (objValue, srcValue, key, object, source, stack). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} sources The source objects. + * @param {Function} customizer The function to customize assigned values. + * @returns {Object} Returns `object`. + * @example + * + * function customizer(objValue, srcValue) { + * if (_.isArray(objValue)) { + * return objValue.concat(srcValue); + * } + * } + * + * var object = { 'a': [1], 'b': [2] }; + * var other = { 'a': [3], 'b': [4] }; + * + * _.mergeWith(object, other, customizer); + * // => { 'a': [1, 3], 'b': [2, 4] } + */ + var mergeWith = createAssigner(function (object, source, srcIndex, customizer) { + baseMerge(object, source, srcIndex, customizer); + }); + + /** + * The opposite of `_.pick`; this method creates an object composed of the + * own and inherited enumerable property paths of `object` that are not omitted. + * + * **Note:** This method is considerably slower than `_.pick`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The source object. + * @param {...(string|string[])} [paths] The property paths to omit. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.omit(object, ['a', 'c']); + * // => { 'b': '2' } + */ + var omit = flatRest(function (object, paths) { + var result = {}; + if (object == null) { + return result; + } + var isDeep = false; + paths = arrayMap(paths, function (path) { + path = castPath(path, object); + isDeep || (isDeep = path.length > 1); + return path; + }); + copyObject(object, getAllKeysIn(object), result); + if (isDeep) { + result = baseClone( + result, + CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, + customOmitClone, + ); + } + var length = paths.length; + while (length--) { + baseUnset(result, paths[length]); + } + return result; + }); + + /** + * The opposite of `_.pickBy`; this method creates an object composed of + * the own and inherited enumerable string keyed properties of `object` that + * `predicate` doesn't return truthy for. The predicate is invoked with two + * arguments: (value, key). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The source object. + * @param {Function} [predicate=_.identity] The function invoked per property. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.omitBy(object, _.isNumber); + * // => { 'b': '2' } + */ + function omitBy(object, predicate) { + return pickBy(object, negate(getIteratee(predicate))); + } + + /** + * Creates an object composed of the picked `object` properties. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The source object. + * @param {...(string|string[])} [paths] The property paths to pick. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.pick(object, ['a', 'c']); + * // => { 'a': 1, 'c': 3 } + */ + var pick = flatRest(function (object, paths) { + return object == null ? {} : basePick(object, paths); + }); + + /** + * Creates an object composed of the `object` properties `predicate` returns + * truthy for. The predicate is invoked with two arguments: (value, key). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The source object. + * @param {Function} [predicate=_.identity] The function invoked per property. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.pickBy(object, _.isNumber); + * // => { 'a': 1, 'c': 3 } + */ + function pickBy(object, predicate) { + if (object == null) { + return {}; + } + var props = arrayMap(getAllKeysIn(object), function (prop) { + return [prop]; + }); + predicate = getIteratee(predicate); + return basePickBy(object, props, function (value, path) { + return predicate(value, path[0]); + }); + } + + /** + * This method is like `_.get` except that if the resolved value is a + * function it's invoked with the `this` binding of its parent object and + * its result is returned. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to resolve. + * @param {*} [defaultValue] The value returned for `undefined` resolved values. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] }; + * + * _.result(object, 'a[0].b.c1'); + * // => 3 + * + * _.result(object, 'a[0].b.c2'); + * // => 4 + * + * _.result(object, 'a[0].b.c3', 'default'); + * // => 'default' + * + * _.result(object, 'a[0].b.c3', _.constant('default')); + * // => 'default' + */ + function result(object, path, defaultValue) { + path = castPath(path, object); + + var index = -1, + length = path.length; + + // Ensure the loop is entered when path is empty. + if (!length) { + length = 1; + object = undefined; + } + while (++index < length) { + var value = object == null ? undefined : object[toKey(path[index])]; + if (value === undefined) { + index = length; + value = defaultValue; + } + object = isFunction(value) ? value.call(object) : value; + } + return object; + } + + /** + * Sets the value at `path` of `object`. If a portion of `path` doesn't exist, + * it's created. Arrays are created for missing index properties while objects + * are created for all other missing properties. Use `_.setWith` to customize + * `path` creation. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @returns {Object} Returns `object`. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.set(object, 'a[0].b.c', 4); + * console.log(object.a[0].b.c); + * // => 4 + * + * _.set(object, ['x', '0', 'y', 'z'], 5); + * console.log(object.x[0].y.z); + * // => 5 + */ + function set(object, path, value) { + return object == null ? object : baseSet(object, path, value); + } + + /** + * This method is like `_.set` except that it accepts `customizer` which is + * invoked to produce the objects of `path`. If `customizer` returns `undefined` + * path creation is handled by the method instead. The `customizer` is invoked + * with three arguments: (nsValue, key, nsObject). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @example + * + * var object = {}; + * + * _.setWith(object, '[0][1]', 'a', Object); + * // => { '0': { '1': 'a' } } + */ + function setWith(object, path, value, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return object == null ? object : baseSet(object, path, value, customizer); + } + + /** + * Creates an array of own enumerable string keyed-value pairs for `object` + * which can be consumed by `_.fromPairs`. If `object` is a map or set, its + * entries are returned. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias entries + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the key-value pairs. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.toPairs(new Foo); + * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed) + */ + var toPairs = createToPairs(keys); + + /** + * Creates an array of own and inherited enumerable string keyed-value pairs + * for `object` which can be consumed by `_.fromPairs`. If `object` is a map + * or set, its entries are returned. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias entriesIn + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the key-value pairs. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.toPairsIn(new Foo); + * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed) + */ + var toPairsIn = createToPairs(keysIn); + + /** + * An alternative to `_.reduce`; this method transforms `object` to a new + * `accumulator` object which is the result of running each of its own + * enumerable string keyed properties thru `iteratee`, with each invocation + * potentially mutating the `accumulator` object. If `accumulator` is not + * provided, a new object with the same `[[Prototype]]` will be used. The + * iteratee is invoked with four arguments: (accumulator, value, key, object). + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @since 1.3.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The custom accumulator value. + * @returns {*} Returns the accumulated value. + * @example + * + * _.transform([2, 3, 4], function(result, n) { + * result.push(n *= n); + * return n % 2 == 0; + * }, []); + * // => [4, 9] + * + * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { + * (result[value] || (result[value] = [])).push(key); + * }, {}); + * // => { '1': ['a', 'c'], '2': ['b'] } + */ + function transform(object, iteratee, accumulator) { + var isArr = isArray(object), + isArrLike = isArr || isBuffer(object) || isTypedArray(object); + + iteratee = getIteratee(iteratee, 4); + if (accumulator == null) { + var Ctor = object && object.constructor; + if (isArrLike) { + accumulator = isArr ? new Ctor() : []; + } else if (isObject(object)) { + accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {}; + } else { + accumulator = {}; + } + } + (isArrLike ? arrayEach : baseForOwn)(object, function (value, index, object) { + return iteratee(accumulator, value, index, object); + }); + return accumulator; + } + + /** + * Removes the property at `path` of `object`. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to unset. + * @returns {boolean} Returns `true` if the property is deleted, else `false`. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 7 } }] }; + * _.unset(object, 'a[0].b.c'); + * // => true + * + * console.log(object); + * // => { 'a': [{ 'b': {} }] }; + * + * _.unset(object, ['a', '0', 'b', 'c']); + * // => true + * + * console.log(object); + * // => { 'a': [{ 'b': {} }] }; + */ + function unset(object, path) { + return object == null ? true : baseUnset(object, path); + } + + /** + * This method is like `_.set` except that accepts `updater` to produce the + * value to set. Use `_.updateWith` to customize `path` creation. The `updater` + * is invoked with one argument: (value). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.6.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {Function} updater The function to produce the updated value. + * @returns {Object} Returns `object`. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.update(object, 'a[0].b.c', function(n) { return n * n; }); + * console.log(object.a[0].b.c); + * // => 9 + * + * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; }); + * console.log(object.x[0].y.z); + * // => 0 + */ + function update(object, path, updater) { + return object == null ? object : baseUpdate(object, path, castFunction(updater)); + } + + /** + * This method is like `_.update` except that it accepts `customizer` which is + * invoked to produce the objects of `path`. If `customizer` returns `undefined` + * path creation is handled by the method instead. The `customizer` is invoked + * with three arguments: (nsValue, key, nsObject). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.6.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {Function} updater The function to produce the updated value. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @example + * + * var object = {}; + * + * _.updateWith(object, '[0][1]', _.constant('a'), Object); + * // => { '0': { '1': 'a' } } + */ + function updateWith(object, path, updater, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer); + } + + /** + * Creates an array of the own enumerable string keyed property values of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property values. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.values(new Foo); + * // => [1, 2] (iteration order is not guaranteed) + * + * _.values('hi'); + * // => ['h', 'i'] + */ + function values(object) { + return object == null ? [] : baseValues(object, keys(object)); + } + + /** + * Creates an array of the own and inherited enumerable string keyed property + * values of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property values. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.valuesIn(new Foo); + * // => [1, 2, 3] (iteration order is not guaranteed) + */ + function valuesIn(object) { + return object == null ? [] : baseValues(object, keysIn(object)); + } + + /*------------------------------------------------------------------------*/ + + /** + * Clamps `number` within the inclusive `lower` and `upper` bounds. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Number + * @param {number} number The number to clamp. + * @param {number} [lower] The lower bound. + * @param {number} upper The upper bound. + * @returns {number} Returns the clamped number. + * @example + * + * _.clamp(-10, -5, 5); + * // => -5 + * + * _.clamp(10, -5, 5); + * // => 5 + */ + function clamp(number, lower, upper) { + if (upper === undefined) { + upper = lower; + lower = undefined; + } + if (upper !== undefined) { + upper = toNumber(upper); + upper = upper === upper ? upper : 0; + } + if (lower !== undefined) { + lower = toNumber(lower); + lower = lower === lower ? lower : 0; + } + return baseClamp(toNumber(number), lower, upper); + } + + /** + * Checks if `n` is between `start` and up to, but not including, `end`. If + * `end` is not specified, it's set to `start` with `start` then set to `0`. + * If `start` is greater than `end` the params are swapped to support + * negative ranges. + * + * @static + * @memberOf _ + * @since 3.3.0 + * @category Number + * @param {number} number The number to check. + * @param {number} [start=0] The start of the range. + * @param {number} end The end of the range. + * @returns {boolean} Returns `true` if `number` is in the range, else `false`. + * @see _.range, _.rangeRight + * @example + * + * _.inRange(3, 2, 4); + * // => true + * + * _.inRange(4, 8); + * // => true + * + * _.inRange(4, 2); + * // => false + * + * _.inRange(2, 2); + * // => false + * + * _.inRange(1.2, 2); + * // => true + * + * _.inRange(5.2, 4); + * // => false + * + * _.inRange(-3, -2, -6); + * // => true + */ + function inRange(number, start, end) { + start = toFinite(start); + if (end === undefined) { + end = start; + start = 0; + } else { + end = toFinite(end); + } + number = toNumber(number); + return baseInRange(number, start, end); + } + + /** + * Produces a random number between the inclusive `lower` and `upper` bounds. + * If only one argument is provided a number between `0` and the given number + * is returned. If `floating` is `true`, or either `lower` or `upper` are + * floats, a floating-point number is returned instead of an integer. + * + * **Note:** JavaScript follows the IEEE-754 standard for resolving + * floating-point values which can produce unexpected results. + * + * @static + * @memberOf _ + * @since 0.7.0 + * @category Number + * @param {number} [lower=0] The lower bound. + * @param {number} [upper=1] The upper bound. + * @param {boolean} [floating] Specify returning a floating-point number. + * @returns {number} Returns the random number. + * @example + * + * _.random(0, 5); + * // => an integer between 0 and 5 + * + * _.random(5); + * // => also an integer between 0 and 5 + * + * _.random(5, true); + * // => a floating-point number between 0 and 5 + * + * _.random(1.2, 5.2); + * // => a floating-point number between 1.2 and 5.2 + */ + function random(lower, upper, floating) { + if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) { + upper = floating = undefined; + } + if (floating === undefined) { + if (typeof upper == 'boolean') { + floating = upper; + upper = undefined; + } else if (typeof lower == 'boolean') { + floating = lower; + lower = undefined; + } + } + if (lower === undefined && upper === undefined) { + lower = 0; + upper = 1; + } else { + lower = toFinite(lower); + if (upper === undefined) { + upper = lower; + lower = 0; + } else { + upper = toFinite(upper); + } + } + if (lower > upper) { + var temp = lower; + lower = upper; + upper = temp; + } + if (floating || lower % 1 || upper % 1) { + var rand = nativeRandom(); + return nativeMin( + lower + rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1))), + upper, + ); + } + return baseRandom(lower, upper); + } + + /*------------------------------------------------------------------------*/ + + /** + * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the camel cased string. + * @example + * + * _.camelCase('Foo Bar'); + * // => 'fooBar' + * + * _.camelCase('--foo-bar--'); + * // => 'fooBar' + * + * _.camelCase('__FOO_BAR__'); + * // => 'fooBar' + */ + var camelCase = createCompounder(function (result, word, index) { + word = word.toLowerCase(); + return result + (index ? capitalize(word) : word); + }); + + /** + * Converts the first character of `string` to upper case and the remaining + * to lower case. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to capitalize. + * @returns {string} Returns the capitalized string. + * @example + * + * _.capitalize('FRED'); + * // => 'Fred' + */ + function capitalize(string) { + return upperFirst(toString(string).toLowerCase()); + } + + /** + * Deburrs `string` by converting + * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table) + * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A) + * letters to basic Latin letters and removing + * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to deburr. + * @returns {string} Returns the deburred string. + * @example + * + * _.deburr('déjà vu'); + * // => 'deja vu' + */ + function deburr(string) { + string = toString(string); + return string && string.replace(reLatin, deburrLetter).replace(reComboMark, ''); + } + + /** + * Checks if `string` ends with the given target string. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to inspect. + * @param {string} [target] The string to search for. + * @param {number} [position=string.length] The position to search up to. + * @returns {boolean} Returns `true` if `string` ends with `target`, + * else `false`. + * @example + * + * _.endsWith('abc', 'c'); + * // => true + * + * _.endsWith('abc', 'b'); + * // => false + * + * _.endsWith('abc', 'b', 2); + * // => true + */ + function endsWith(string, target, position) { + string = toString(string); + target = baseToString(target); + + var length = string.length; + position = position === undefined ? length : baseClamp(toInteger(position), 0, length); + + var end = position; + position -= target.length; + return position >= 0 && string.slice(position, end) == target; + } + + /** + * Converts the characters "&", "<", ">", '"', and "'" in `string` to their + * corresponding HTML entities. + * + * **Note:** No other characters are escaped. To escape additional + * characters use a third-party library like [_he_](https://mths.be/he). + * + * Though the ">" character is escaped for symmetry, characters like + * ">" and "/" don't need escaping in HTML and have no special meaning + * unless they're part of a tag or unquoted attribute value. See + * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands) + * (under "semi-related fun fact") for more details. + * + * When working with HTML you should always + * [quote attribute values](http://wonko.com/post/html-escaping) to reduce + * XSS vectors. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category String + * @param {string} [string=''] The string to escape. + * @returns {string} Returns the escaped string. + * @example + * + * _.escape('fred, barney, & pebbles'); + * // => 'fred, barney, & pebbles' + */ + function escape(string) { + string = toString(string); + return string && reHasUnescapedHtml.test(string) + ? string.replace(reUnescapedHtml, escapeHtmlChar) + : string; + } + + /** + * Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+", + * "?", "(", ")", "[", "]", "{", "}", and "|" in `string`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to escape. + * @returns {string} Returns the escaped string. + * @example + * + * _.escapeRegExp('[lodash](https://lodash.com/)'); + * // => '\[lodash\]\(https://lodash\.com/\)' + */ + function escapeRegExp(string) { + string = toString(string); + return string && reHasRegExpChar.test(string) ? string.replace(reRegExpChar, '\\$&') : string; + } + + /** + * Converts `string` to + * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the kebab cased string. + * @example + * + * _.kebabCase('Foo Bar'); + * // => 'foo-bar' + * + * _.kebabCase('fooBar'); + * // => 'foo-bar' + * + * _.kebabCase('__FOO_BAR__'); + * // => 'foo-bar' + */ + var kebabCase = createCompounder(function (result, word, index) { + return result + (index ? '-' : '') + word.toLowerCase(); + }); + + /** + * Converts `string`, as space separated words, to lower case. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the lower cased string. + * @example + * + * _.lowerCase('--Foo-Bar--'); + * // => 'foo bar' + * + * _.lowerCase('fooBar'); + * // => 'foo bar' + * + * _.lowerCase('__FOO_BAR__'); + * // => 'foo bar' + */ + var lowerCase = createCompounder(function (result, word, index) { + return result + (index ? ' ' : '') + word.toLowerCase(); + }); + + /** + * Converts the first character of `string` to lower case. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the converted string. + * @example + * + * _.lowerFirst('Fred'); + * // => 'fred' + * + * _.lowerFirst('FRED'); + * // => 'fRED' + */ + var lowerFirst = createCaseFirst('toLowerCase'); + + /** + * Pads `string` on the left and right sides if it's shorter than `length`. + * Padding characters are truncated if they can't be evenly divided by `length`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to pad. + * @param {number} [length=0] The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padded string. + * @example + * + * _.pad('abc', 8); + * // => ' abc ' + * + * _.pad('abc', 8, '_-'); + * // => '_-abc_-_' + * + * _.pad('abc', 3); + * // => 'abc' + */ + function pad(string, length, chars) { + string = toString(string); + length = toInteger(length); + + var strLength = length ? stringSize(string) : 0; + if (!length || strLength >= length) { + return string; + } + var mid = (length - strLength) / 2; + return createPadding(nativeFloor(mid), chars) + string + createPadding(nativeCeil(mid), chars); + } + + /** + * Pads `string` on the right side if it's shorter than `length`. Padding + * characters are truncated if they exceed `length`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to pad. + * @param {number} [length=0] The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padded string. + * @example + * + * _.padEnd('abc', 6); + * // => 'abc ' + * + * _.padEnd('abc', 6, '_-'); + * // => 'abc_-_' + * + * _.padEnd('abc', 3); + * // => 'abc' + */ + function padEnd(string, length, chars) { + string = toString(string); + length = toInteger(length); + + var strLength = length ? stringSize(string) : 0; + return length && strLength < length + ? string + createPadding(length - strLength, chars) + : string; + } + + /** + * Pads `string` on the left side if it's shorter than `length`. Padding + * characters are truncated if they exceed `length`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to pad. + * @param {number} [length=0] The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padded string. + * @example + * + * _.padStart('abc', 6); + * // => ' abc' + * + * _.padStart('abc', 6, '_-'); + * // => '_-_abc' + * + * _.padStart('abc', 3); + * // => 'abc' + */ + function padStart(string, length, chars) { + string = toString(string); + length = toInteger(length); + + var strLength = length ? stringSize(string) : 0; + return length && strLength < length + ? createPadding(length - strLength, chars) + string + : string; + } + + /** + * Converts `string` to an integer of the specified radix. If `radix` is + * `undefined` or `0`, a `radix` of `10` is used unless `value` is a + * hexadecimal, in which case a `radix` of `16` is used. + * + * **Note:** This method aligns with the + * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category String + * @param {string} string The string to convert. + * @param {number} [radix=10] The radix to interpret `value` by. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {number} Returns the converted integer. + * @example + * + * _.parseInt('08'); + * // => 8 + * + * _.map(['6', '08', '10'], _.parseInt); + * // => [6, 8, 10] + */ + function parseInt(string, radix, guard) { + if (guard || radix == null) { + radix = 0; + } else if (radix) { + radix = +radix; + } + return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0); + } + + /** + * Repeats the given string `n` times. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to repeat. + * @param {number} [n=1] The number of times to repeat the string. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {string} Returns the repeated string. + * @example + * + * _.repeat('*', 3); + * // => '***' + * + * _.repeat('abc', 2); + * // => 'abcabc' + * + * _.repeat('abc', 0); + * // => '' + */ + function repeat(string, n, guard) { + if (guard ? isIterateeCall(string, n, guard) : n === undefined) { + n = 1; + } else { + n = toInteger(n); + } + return baseRepeat(toString(string), n); + } + + /** + * Replaces matches for `pattern` in `string` with `replacement`. + * + * **Note:** This method is based on + * [`String#replace`](https://mdn.io/String/replace). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to modify. + * @param {RegExp|string} pattern The pattern to replace. + * @param {Function|string} replacement The match replacement. + * @returns {string} Returns the modified string. + * @example + * + * _.replace('Hi Fred', 'Fred', 'Barney'); + * // => 'Hi Barney' + */ + function replace() { + var args = arguments, + string = toString(args[0]); + + return args.length < 3 ? string : string.replace(args[1], args[2]); + } + + /** + * Converts `string` to + * [snake case](https://en.wikipedia.org/wiki/Snake_case). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the snake cased string. + * @example + * + * _.snakeCase('Foo Bar'); + * // => 'foo_bar' + * + * _.snakeCase('fooBar'); + * // => 'foo_bar' + * + * _.snakeCase('--FOO-BAR--'); + * // => 'foo_bar' + */ + var snakeCase = createCompounder(function (result, word, index) { + return result + (index ? '_' : '') + word.toLowerCase(); + }); + + /** + * Splits `string` by `separator`. + * + * **Note:** This method is based on + * [`String#split`](https://mdn.io/String/split). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to split. + * @param {RegExp|string} separator The separator pattern to split by. + * @param {number} [limit] The length to truncate results to. + * @returns {Array} Returns the string segments. + * @example + * + * _.split('a-b-c', '-', 2); + * // => ['a', 'b'] + */ + function split(string, separator, limit) { + if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) { + separator = limit = undefined; + } + limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0; + if (!limit) { + return []; + } + string = toString(string); + if (string && (typeof separator == 'string' || (separator != null && !isRegExp(separator)))) { + separator = baseToString(separator); + if (!separator && hasUnicode(string)) { + return castSlice(stringToArray(string), 0, limit); + } + } + return string.split(separator, limit); + } + + /** + * Converts `string` to + * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage). + * + * @static + * @memberOf _ + * @since 3.1.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the start cased string. + * @example + * + * _.startCase('--foo-bar--'); + * // => 'Foo Bar' + * + * _.startCase('fooBar'); + * // => 'Foo Bar' + * + * _.startCase('__FOO_BAR__'); + * // => 'FOO BAR' + */ + var startCase = createCompounder(function (result, word, index) { + return result + (index ? ' ' : '') + upperFirst(word); + }); + + /** + * Checks if `string` starts with the given target string. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to inspect. + * @param {string} [target] The string to search for. + * @param {number} [position=0] The position to search from. + * @returns {boolean} Returns `true` if `string` starts with `target`, + * else `false`. + * @example + * + * _.startsWith('abc', 'a'); + * // => true + * + * _.startsWith('abc', 'b'); + * // => false + * + * _.startsWith('abc', 'b', 1); + * // => true + */ + function startsWith(string, target, position) { + string = toString(string); + position = position == null ? 0 : baseClamp(toInteger(position), 0, string.length); + + target = baseToString(target); + return string.slice(position, position + target.length) == target; + } + + /** + * Creates a compiled template function that can interpolate data properties + * in "interpolate" delimiters, HTML-escape interpolated data properties in + * "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data + * properties may be accessed as free variables in the template. If a setting + * object is given, it takes precedence over `_.templateSettings` values. + * + * **Note:** In the development build `_.template` utilizes + * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl) + * for easier debugging. + * + * For more information on precompiling templates see + * [lodash's custom builds documentation](https://lodash.com/custom-builds). + * + * For more information on Chrome extension sandboxes see + * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval). + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category String + * @param {string} [string=''] The template string. + * @param {Object} [options={}] The options object. + * @param {RegExp} [options.escape=_.templateSettings.escape] + * The HTML "escape" delimiter. + * @param {RegExp} [options.evaluate=_.templateSettings.evaluate] + * The "evaluate" delimiter. + * @param {Object} [options.imports=_.templateSettings.imports] + * An object to import into the template as free variables. + * @param {RegExp} [options.interpolate=_.templateSettings.interpolate] + * The "interpolate" delimiter. + * @param {string} [options.sourceURL='lodash.templateSources[n]'] + * The sourceURL of the compiled template. + * @param {string} [options.variable='obj'] + * The data object variable name. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the compiled template function. + * @example + * + * // Use the "interpolate" delimiter to create a compiled template. + * var compiled = _.template('hello <%= user %>!'); + * compiled({ 'user': 'fred' }); + * // => 'hello fred!' + * + * // Use the HTML "escape" delimiter to escape data property values. + * var compiled = _.template('<b><%- value %></b>'); + * compiled({ 'value': '<script>' }); + * // => '<b><script></b>' + * + * // Use the "evaluate" delimiter to execute JavaScript and generate HTML. + * var compiled = _.template('<% _.forEach(users, function(user) { %><li><%- user %></li><% }); %>'); + * compiled({ 'users': ['fred', 'barney'] }); + * // => '<li>fred</li><li>barney</li>' + * + * // Use the internal `print` function in "evaluate" delimiters. + * var compiled = _.template('<% print("hello " + user); %>!'); + * compiled({ 'user': 'barney' }); + * // => 'hello barney!' + * + * // Use the ES template literal delimiter as an "interpolate" delimiter. + * // Disable support by replacing the "interpolate" delimiter. + * var compiled = _.template('hello ${ user }!'); + * compiled({ 'user': 'pebbles' }); + * // => 'hello pebbles!' + * + * // Use backslashes to treat delimiters as plain text. + * var compiled = _.template('<%= "\\<%- value %\\>" %>'); + * compiled({ 'value': 'ignored' }); + * // => '<%- value %>' + * + * // Use the `imports` option to import `jQuery` as `jq`. + * var text = '<% jq.each(users, function(user) { %><li><%- user %></li><% }); %>'; + * var compiled = _.template(text, { 'imports': { 'jq': jQuery } }); + * compiled({ 'users': ['fred', 'barney'] }); + * // => '<li>fred</li><li>barney</li>' + * + * // Use the `sourceURL` option to specify a custom sourceURL for the template. + * var compiled = _.template('hello <%= user %>!', { 'sourceURL': '/basic/greeting.jst' }); + * compiled(data); + * // => Find the source of "greeting.jst" under the Sources tab or Resources panel of the web inspector. + * + * // Use the `variable` option to ensure a with-statement isn't used in the compiled template. + * var compiled = _.template('hi <%= data.user %>!', { 'variable': 'data' }); + * compiled.source; + * // => function(data) { + * // var __t, __p = ''; + * // __p += 'hi ' + ((__t = ( data.user )) == null ? '' : __t) + '!'; + * // return __p; + * // } + * + * // Use custom template delimiters. + * _.templateSettings.interpolate = /{{([\s\S]+?)}}/g; + * var compiled = _.template('hello {{ user }}!'); + * compiled({ 'user': 'mustache' }); + * // => 'hello mustache!' + * + * // Use the `source` property to inline compiled templates for meaningful + * // line numbers in error messages and stack traces. + * fs.writeFileSync(path.join(process.cwd(), 'jst.js'), '\ + * var JST = {\ + * "main": ' + _.template(mainText).source + '\ + * };\ + * '); + */ + function template(string, options, guard) { + // Based on John Resig's `tmpl` implementation + // (http://ejohn.org/blog/javascript-micro-templating/) + // and Laura Doktorova's doT.js (https://github.com/olado/doT). + var settings = lodash.templateSettings; + + if (guard && isIterateeCall(string, options, guard)) { + options = undefined; + } + string = toString(string); + options = assignInWith({}, options, settings, customDefaultsAssignIn); + + var imports = assignInWith({}, options.imports, settings.imports, customDefaultsAssignIn), + importsKeys = keys(imports), + importsValues = baseValues(imports, importsKeys); + + var isEscaping, + isEvaluating, + index = 0, + interpolate = options.interpolate || reNoMatch, + source = "__p += '"; + + // Compile the regexp to match each delimiter. + var reDelimiters = RegExp( + (options.escape || reNoMatch).source + + '|' + + interpolate.source + + '|' + + (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + + '|' + + (options.evaluate || reNoMatch).source + + '|$', + 'g', + ); + + // Use a sourceURL for easier debugging. + // The sourceURL gets injected into the source that's eval-ed, so be careful + // with lookup (in case of e.g. prototype pollution), and strip newlines if any. + // A newline wouldn't be a valid sourceURL anyway, and it'd enable code injection. + var sourceURL = + '//# sourceURL=' + + (hasOwnProperty.call(options, 'sourceURL') + ? (options.sourceURL + '').replace(/[\r\n]/g, ' ') + : 'lodash.templateSources[' + ++templateCounter + ']') + + '\n'; + + string.replace( + reDelimiters, + function (match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) { + interpolateValue || (interpolateValue = esTemplateValue); + + // Escape characters that can't be included in string literals. + source += string.slice(index, offset).replace(reUnescapedString, escapeStringChar); + + // Replace delimiters with snippets. + if (escapeValue) { + isEscaping = true; + source += "' +\n__e(" + escapeValue + ") +\n'"; + } + if (evaluateValue) { + isEvaluating = true; + source += "';\n" + evaluateValue + ";\n__p += '"; + } + if (interpolateValue) { + source += "' +\n((__t = (" + interpolateValue + ")) == null ? '' : __t) +\n'"; + } + index = offset + match.length; + + // The JS engine embedded in Adobe products needs `match` returned in + // order to produce the correct `offset` value. + return match; + }, + ); + + source += "';\n"; + + // If `variable` is not specified wrap a with-statement around the generated + // code to add the data object to the top of the scope chain. + // Like with sourceURL, we take care to not check the option's prototype, + // as this configuration is a code injection vector. + var variable = hasOwnProperty.call(options, 'variable') && options.variable; + if (!variable) { + source = 'with (obj) {\n' + source + '\n}\n'; + } + // Cleanup code by stripping empty strings. + source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source) + .replace(reEmptyStringMiddle, '$1') + .replace(reEmptyStringTrailing, '$1;'); + + // Frame code as the function body. + source = + 'function(' + + (variable || 'obj') + + ') {\n' + + (variable ? '' : 'obj || (obj = {});\n') + + "var __t, __p = ''" + + (isEscaping ? ', __e = _.escape' : '') + + (isEvaluating + ? ', __j = Array.prototype.join;\n' + + "function print() { __p += __j.call(arguments, '') }\n" + : ';\n') + + source + + 'return __p\n}'; + + var result = attempt(function () { + return Function(importsKeys, sourceURL + 'return ' + source).apply(undefined, importsValues); + }); + + // Provide the compiled function's source by its `toString` method or + // the `source` property as a convenience for inlining compiled templates. + result.source = source; + if (isError(result)) { + throw result; + } + return result; + } + + /** + * Converts `string`, as a whole, to lower case just like + * [String#toLowerCase](https://mdn.io/toLowerCase). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the lower cased string. + * @example + * + * _.toLower('--Foo-Bar--'); + * // => '--foo-bar--' + * + * _.toLower('fooBar'); + * // => 'foobar' + * + * _.toLower('__FOO_BAR__'); + * // => '__foo_bar__' + */ + function toLower(value) { + return toString(value).toLowerCase(); + } + + /** + * Converts `string`, as a whole, to upper case just like + * [String#toUpperCase](https://mdn.io/toUpperCase). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the upper cased string. + * @example + * + * _.toUpper('--foo-bar--'); + * // => '--FOO-BAR--' + * + * _.toUpper('fooBar'); + * // => 'FOOBAR' + * + * _.toUpper('__foo_bar__'); + * // => '__FOO_BAR__' + */ + function toUpper(value) { + return toString(value).toUpperCase(); + } + + /** + * Removes leading and trailing whitespace or specified characters from `string`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to trim. + * @param {string} [chars=whitespace] The characters to trim. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {string} Returns the trimmed string. + * @example + * + * _.trim(' abc '); + * // => 'abc' + * + * _.trim('-_-abc-_-', '_-'); + * // => 'abc' + * + * _.map([' foo ', ' bar '], _.trim); + * // => ['foo', 'bar'] + */ + function trim(string, chars, guard) { + string = toString(string); + if (string && (guard || chars === undefined)) { + return string.replace(reTrim, ''); + } + if (!string || !(chars = baseToString(chars))) { + return string; + } + var strSymbols = stringToArray(string), + chrSymbols = stringToArray(chars), + start = charsStartIndex(strSymbols, chrSymbols), + end = charsEndIndex(strSymbols, chrSymbols) + 1; + + return castSlice(strSymbols, start, end).join(''); + } + + /** + * Removes trailing whitespace or specified characters from `string`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to trim. + * @param {string} [chars=whitespace] The characters to trim. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {string} Returns the trimmed string. + * @example + * + * _.trimEnd(' abc '); + * // => ' abc' + * + * _.trimEnd('-_-abc-_-', '_-'); + * // => '-_-abc' + */ + function trimEnd(string, chars, guard) { + string = toString(string); + if (string && (guard || chars === undefined)) { + return string.replace(reTrimEnd, ''); + } + if (!string || !(chars = baseToString(chars))) { + return string; + } + var strSymbols = stringToArray(string), + end = charsEndIndex(strSymbols, stringToArray(chars)) + 1; + + return castSlice(strSymbols, 0, end).join(''); + } + + /** + * Removes leading whitespace or specified characters from `string`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to trim. + * @param {string} [chars=whitespace] The characters to trim. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {string} Returns the trimmed string. + * @example + * + * _.trimStart(' abc '); + * // => 'abc ' + * + * _.trimStart('-_-abc-_-', '_-'); + * // => 'abc-_-' + */ + function trimStart(string, chars, guard) { + string = toString(string); + if (string && (guard || chars === undefined)) { + return string.replace(reTrimStart, ''); + } + if (!string || !(chars = baseToString(chars))) { + return string; + } + var strSymbols = stringToArray(string), + start = charsStartIndex(strSymbols, stringToArray(chars)); + + return castSlice(strSymbols, start).join(''); + } + + /** + * Truncates `string` if it's longer than the given maximum string length. + * The last characters of the truncated string are replaced with the omission + * string which defaults to "...". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to truncate. + * @param {Object} [options={}] The options object. + * @param {number} [options.length=30] The maximum string length. + * @param {string} [options.omission='...'] The string to indicate text is omitted. + * @param {RegExp|string} [options.separator] The separator pattern to truncate to. + * @returns {string} Returns the truncated string. + * @example + * + * _.truncate('hi-diddly-ho there, neighborino'); + * // => 'hi-diddly-ho there, neighbo...' + * + * _.truncate('hi-diddly-ho there, neighborino', { + * 'length': 24, + * 'separator': ' ' + * }); + * // => 'hi-diddly-ho there,...' + * + * _.truncate('hi-diddly-ho there, neighborino', { + * 'length': 24, + * 'separator': /,? +/ + * }); + * // => 'hi-diddly-ho there...' + * + * _.truncate('hi-diddly-ho there, neighborino', { + * 'omission': ' [...]' + * }); + * // => 'hi-diddly-ho there, neig [...]' + */ + function truncate(string, options) { + var length = DEFAULT_TRUNC_LENGTH, + omission = DEFAULT_TRUNC_OMISSION; + + if (isObject(options)) { + var separator = 'separator' in options ? options.separator : separator; + length = 'length' in options ? toInteger(options.length) : length; + omission = 'omission' in options ? baseToString(options.omission) : omission; + } + string = toString(string); + + var strLength = string.length; + if (hasUnicode(string)) { + var strSymbols = stringToArray(string); + strLength = strSymbols.length; + } + if (length >= strLength) { + return string; + } + var end = length - stringSize(omission); + if (end < 1) { + return omission; + } + var result = strSymbols ? castSlice(strSymbols, 0, end).join('') : string.slice(0, end); + + if (separator === undefined) { + return result + omission; + } + if (strSymbols) { + end += result.length - end; + } + if (isRegExp(separator)) { + if (string.slice(end).search(separator)) { + var match, + substring = result; + + if (!separator.global) { + separator = RegExp(separator.source, toString(reFlags.exec(separator)) + 'g'); + } + separator.lastIndex = 0; + while ((match = separator.exec(substring))) { + var newEnd = match.index; + } + result = result.slice(0, newEnd === undefined ? end : newEnd); + } + } else if (string.indexOf(baseToString(separator), end) != end) { + var index = result.lastIndexOf(separator); + if (index > -1) { + result = result.slice(0, index); + } + } + return result + omission; + } + + /** + * The inverse of `_.escape`; this method converts the HTML entities + * `&`, `<`, `>`, `"`, and `'` in `string` to + * their corresponding characters. + * + * **Note:** No other HTML entities are unescaped. To unescape additional + * HTML entities use a third-party library like [_he_](https://mths.be/he). + * + * @static + * @memberOf _ + * @since 0.6.0 + * @category String + * @param {string} [string=''] The string to unescape. + * @returns {string} Returns the unescaped string. + * @example + * + * _.unescape('fred, barney, & pebbles'); + * // => 'fred, barney, & pebbles' + */ + function unescape(string) { + string = toString(string); + return string && reHasEscapedHtml.test(string) + ? string.replace(reEscapedHtml, unescapeHtmlChar) + : string; + } + + /** + * Converts `string`, as space separated words, to upper case. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the upper cased string. + * @example + * + * _.upperCase('--foo-bar'); + * // => 'FOO BAR' + * + * _.upperCase('fooBar'); + * // => 'FOO BAR' + * + * _.upperCase('__foo_bar__'); + * // => 'FOO BAR' + */ + var upperCase = createCompounder(function (result, word, index) { + return result + (index ? ' ' : '') + word.toUpperCase(); + }); + + /** + * Converts the first character of `string` to upper case. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the converted string. + * @example + * + * _.upperFirst('fred'); + * // => 'Fred' + * + * _.upperFirst('FRED'); + * // => 'FRED' + */ + var upperFirst = createCaseFirst('toUpperCase'); + + /** + * Splits `string` into an array of its words. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to inspect. + * @param {RegExp|string} [pattern] The pattern to match words. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the words of `string`. + * @example + * + * _.words('fred, barney, & pebbles'); + * // => ['fred', 'barney', 'pebbles'] + * + * _.words('fred, barney, & pebbles', /[^, ]+/g); + * // => ['fred', 'barney', '&', 'pebbles'] + */ + function words(string, pattern, guard) { + string = toString(string); + pattern = guard ? undefined : pattern; + + if (pattern === undefined) { + return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string); + } + return string.match(pattern) || []; + } + + /*------------------------------------------------------------------------*/ + + /** + * Attempts to invoke `func`, returning either the result or the caught error + * object. Any additional arguments are provided to `func` when it's invoked. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Util + * @param {Function} func The function to attempt. + * @param {...*} [args] The arguments to invoke `func` with. + * @returns {*} Returns the `func` result or error object. + * @example + * + * // Avoid throwing errors for invalid selectors. + * var elements = _.attempt(function(selector) { + * return document.querySelectorAll(selector); + * }, '>_>'); + * + * if (_.isError(elements)) { + * elements = []; + * } + */ + var attempt = baseRest(function (func, args) { + try { + return apply(func, undefined, args); + } catch (e) { + return isError(e) ? e : new Error(e); + } + }); + + /** + * Binds methods of an object to the object itself, overwriting the existing + * method. + * + * **Note:** This method doesn't set the "length" property of bound functions. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {Object} object The object to bind and assign the bound methods to. + * @param {...(string|string[])} methodNames The object method names to bind. + * @returns {Object} Returns `object`. + * @example + * + * var view = { + * 'label': 'docs', + * 'click': function() { + * console.log('clicked ' + this.label); + * } + * }; + * + * _.bindAll(view, ['click']); + * jQuery(element).on('click', view.click); + * // => Logs 'clicked docs' when clicked. + */ + var bindAll = flatRest(function (object, methodNames) { + arrayEach(methodNames, function (key) { + key = toKey(key); + baseAssignValue(object, key, bind(object[key], object)); + }); + return object; + }); + + /** + * Creates a function that iterates over `pairs` and invokes the corresponding + * function of the first predicate to return truthy. The predicate-function + * pairs are invoked with the `this` binding and arguments of the created + * function. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Util + * @param {Array} pairs The predicate-function pairs. + * @returns {Function} Returns the new composite function. + * @example + * + * var func = _.cond([ + * [_.matches({ 'a': 1 }), _.constant('matches A')], + * [_.conforms({ 'b': _.isNumber }), _.constant('matches B')], + * [_.stubTrue, _.constant('no match')] + * ]); + * + * func({ 'a': 1, 'b': 2 }); + * // => 'matches A' + * + * func({ 'a': 0, 'b': 1 }); + * // => 'matches B' + * + * func({ 'a': '1', 'b': '2' }); + * // => 'no match' + */ + function cond(pairs) { + var length = pairs == null ? 0 : pairs.length, + toIteratee = getIteratee(); + + pairs = !length + ? [] + : arrayMap(pairs, function (pair) { + if (typeof pair[1] != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + return [toIteratee(pair[0]), pair[1]]; + }); + + return baseRest(function (args) { + var index = -1; + while (++index < length) { + var pair = pairs[index]; + if (apply(pair[0], this, args)) { + return apply(pair[1], this, args); + } + } + }); + } + + /** + * Creates a function that invokes the predicate properties of `source` with + * the corresponding property values of a given object, returning `true` if + * all predicates return truthy, else `false`. + * + * **Note:** The created function is equivalent to `_.conformsTo` with + * `source` partially applied. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Util + * @param {Object} source The object of property predicates to conform to. + * @returns {Function} Returns the new spec function. + * @example + * + * var objects = [ + * { 'a': 2, 'b': 1 }, + * { 'a': 1, 'b': 2 } + * ]; + * + * _.filter(objects, _.conforms({ 'b': function(n) { return n > 1; } })); + * // => [{ 'a': 1, 'b': 2 }] + */ + function conforms(source) { + return baseConforms(baseClone(source, CLONE_DEEP_FLAG)); + } + + /** + * Creates a function that returns `value`. + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Util + * @param {*} value The value to return from the new function. + * @returns {Function} Returns the new constant function. + * @example + * + * var objects = _.times(2, _.constant({ 'a': 1 })); + * + * console.log(objects); + * // => [{ 'a': 1 }, { 'a': 1 }] + * + * console.log(objects[0] === objects[1]); + * // => true + */ + function constant(value) { + return function () { + return value; + }; + } + + /** + * Checks `value` to determine whether a default value should be returned in + * its place. The `defaultValue` is returned if `value` is `NaN`, `null`, + * or `undefined`. + * + * @static + * @memberOf _ + * @since 4.14.0 + * @category Util + * @param {*} value The value to check. + * @param {*} defaultValue The default value. + * @returns {*} Returns the resolved value. + * @example + * + * _.defaultTo(1, 10); + * // => 1 + * + * _.defaultTo(undefined, 10); + * // => 10 + */ + function defaultTo(value, defaultValue) { + return value == null || value !== value ? defaultValue : value; + } + + /** + * Creates a function that returns the result of invoking the given functions + * with the `this` binding of the created function, where each successive + * invocation is supplied the return value of the previous. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Util + * @param {...(Function|Function[])} [funcs] The functions to invoke. + * @returns {Function} Returns the new composite function. + * @see _.flowRight + * @example + * + * function square(n) { + * return n * n; + * } + * + * var addSquare = _.flow([_.add, square]); + * addSquare(1, 2); + * // => 9 + */ + var flow = createFlow(); + + /** + * This method is like `_.flow` except that it creates a function that + * invokes the given functions from right to left. + * + * @static + * @since 3.0.0 + * @memberOf _ + * @category Util + * @param {...(Function|Function[])} [funcs] The functions to invoke. + * @returns {Function} Returns the new composite function. + * @see _.flow + * @example + * + * function square(n) { + * return n * n; + * } + * + * var addSquare = _.flowRight([square, _.add]); + * addSquare(1, 2); + * // => 9 + */ + var flowRight = createFlow(true); + + /** + * This method returns the first argument it receives. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {*} value Any value. + * @returns {*} Returns `value`. + * @example + * + * var object = { 'a': 1 }; + * + * console.log(_.identity(object) === object); + * // => true + */ + function identity(value) { + return value; + } + + /** + * Creates a function that invokes `func` with the arguments of the created + * function. If `func` is a property name, the created function returns the + * property value for a given element. If `func` is an array or object, the + * created function returns `true` for elements that contain the equivalent + * source properties, otherwise it returns `false`. + * + * @static + * @since 4.0.0 + * @memberOf _ + * @category Util + * @param {*} [func=_.identity] The value to convert to a callback. + * @returns {Function} Returns the callback. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * // The `_.matches` iteratee shorthand. + * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true })); + * // => [{ 'user': 'barney', 'age': 36, 'active': true }] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.filter(users, _.iteratee(['user', 'fred'])); + * // => [{ 'user': 'fred', 'age': 40 }] + * + * // The `_.property` iteratee shorthand. + * _.map(users, _.iteratee('user')); + * // => ['barney', 'fred'] + * + * // Create custom iteratee shorthands. + * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) { + * return !_.isRegExp(func) ? iteratee(func) : function(string) { + * return func.test(string); + * }; + * }); + * + * _.filter(['abc', 'def'], /ef/); + * // => ['def'] + */ + function iteratee(func) { + return baseIteratee(typeof func == 'function' ? func : baseClone(func, CLONE_DEEP_FLAG)); + } + + /** + * Creates a function that performs a partial deep comparison between a given + * object and `source`, returning `true` if the given object has equivalent + * property values, else `false`. + * + * **Note:** The created function is equivalent to `_.isMatch` with `source` + * partially applied. + * + * Partial comparisons will match empty array and empty object `source` + * values against any array or object value, respectively. See `_.isEqual` + * for a list of supported value comparisons. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Util + * @param {Object} source The object of property values to match. + * @returns {Function} Returns the new spec function. + * @example + * + * var objects = [ + * { 'a': 1, 'b': 2, 'c': 3 }, + * { 'a': 4, 'b': 5, 'c': 6 } + * ]; + * + * _.filter(objects, _.matches({ 'a': 4, 'c': 6 })); + * // => [{ 'a': 4, 'b': 5, 'c': 6 }] + */ + function matches(source) { + return baseMatches(baseClone(source, CLONE_DEEP_FLAG)); + } + + /** + * Creates a function that performs a partial deep comparison between the + * value at `path` of a given object to `srcValue`, returning `true` if the + * object value is equivalent, else `false`. + * + * **Note:** Partial comparisons will match empty array and empty object + * `srcValue` values against any array or object value, respectively. See + * `_.isEqual` for a list of supported value comparisons. + * + * @static + * @memberOf _ + * @since 3.2.0 + * @category Util + * @param {Array|string} path The path of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + * @example + * + * var objects = [ + * { 'a': 1, 'b': 2, 'c': 3 }, + * { 'a': 4, 'b': 5, 'c': 6 } + * ]; + * + * _.find(objects, _.matchesProperty('a', 4)); + * // => { 'a': 4, 'b': 5, 'c': 6 } + */ + function matchesProperty(path, srcValue) { + return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG)); + } + + /** + * Creates a function that invokes the method at `path` of a given object. + * Any additional arguments are provided to the invoked method. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Util + * @param {Array|string} path The path of the method to invoke. + * @param {...*} [args] The arguments to invoke the method with. + * @returns {Function} Returns the new invoker function. + * @example + * + * var objects = [ + * { 'a': { 'b': _.constant(2) } }, + * { 'a': { 'b': _.constant(1) } } + * ]; + * + * _.map(objects, _.method('a.b')); + * // => [2, 1] + * + * _.map(objects, _.method(['a', 'b'])); + * // => [2, 1] + */ + var method = baseRest(function (path, args) { + return function (object) { + return baseInvoke(object, path, args); + }; + }); + + /** + * The opposite of `_.method`; this method creates a function that invokes + * the method at a given path of `object`. Any additional arguments are + * provided to the invoked method. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Util + * @param {Object} object The object to query. + * @param {...*} [args] The arguments to invoke the method with. + * @returns {Function} Returns the new invoker function. + * @example + * + * var array = _.times(3, _.constant), + * object = { 'a': array, 'b': array, 'c': array }; + * + * _.map(['a[2]', 'c[0]'], _.methodOf(object)); + * // => [2, 0] + * + * _.map([['a', '2'], ['c', '0']], _.methodOf(object)); + * // => [2, 0] + */ + var methodOf = baseRest(function (object, args) { + return function (path) { + return baseInvoke(object, path, args); + }; + }); + + /** + * Adds all own enumerable string keyed function properties of a source + * object to the destination object. If `object` is a function, then methods + * are added to its prototype as well. + * + * **Note:** Use `_.runInContext` to create a pristine `lodash` function to + * avoid conflicts caused by modifying the original. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {Function|Object} [object=lodash] The destination object. + * @param {Object} source The object of functions to add. + * @param {Object} [options={}] The options object. + * @param {boolean} [options.chain=true] Specify whether mixins are chainable. + * @returns {Function|Object} Returns `object`. + * @example + * + * function vowels(string) { + * return _.filter(string, function(v) { + * return /[aeiou]/i.test(v); + * }); + * } + * + * _.mixin({ 'vowels': vowels }); + * _.vowels('fred'); + * // => ['e'] + * + * _('fred').vowels().value(); + * // => ['e'] + * + * _.mixin({ 'vowels': vowels }, { 'chain': false }); + * _('fred').vowels(); + * // => ['e'] + */ + function mixin(object, source, options) { + var props = keys(source), + methodNames = baseFunctions(source, props); + + if (options == null && !(isObject(source) && (methodNames.length || !props.length))) { + options = source; + source = object; + object = this; + methodNames = baseFunctions(source, keys(source)); + } + var chain = !(isObject(options) && 'chain' in options) || !!options.chain, + isFunc = isFunction(object); + + arrayEach(methodNames, function (methodName) { + var func = source[methodName]; + object[methodName] = func; + if (isFunc) { + object.prototype[methodName] = function () { + var chainAll = this.__chain__; + if (chain || chainAll) { + var result = object(this.__wrapped__), + actions = (result.__actions__ = copyArray(this.__actions__)); + + actions.push({ func: func, args: arguments, thisArg: object }); + result.__chain__ = chainAll; + return result; + } + return func.apply(object, arrayPush([this.value()], arguments)); + }; + } + }); + + return object; + } + + /** + * Reverts the `_` variable to its previous value and returns a reference to + * the `lodash` function. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @returns {Function} Returns the `lodash` function. + * @example + * + * var lodash = _.noConflict(); + */ + function noConflict() { + if (root._ === this) { + root._ = oldDash; + } + return this; + } + + /** + * This method returns `undefined`. + * + * @static + * @memberOf _ + * @since 2.3.0 + * @category Util + * @example + * + * _.times(2, _.noop); + * // => [undefined, undefined] + */ + function noop() { + // No operation performed. + } + + /** + * Creates a function that gets the argument at index `n`. If `n` is negative, + * the nth argument from the end is returned. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Util + * @param {number} [n=0] The index of the argument to return. + * @returns {Function} Returns the new pass-thru function. + * @example + * + * var func = _.nthArg(1); + * func('a', 'b', 'c', 'd'); + * // => 'b' + * + * var func = _.nthArg(-2); + * func('a', 'b', 'c', 'd'); + * // => 'c' + */ + function nthArg(n) { + n = toInteger(n); + return baseRest(function (args) { + return baseNth(args, n); + }); + } + + /** + * Creates a function that invokes `iteratees` with the arguments it receives + * and returns their results. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Util + * @param {...(Function|Function[])} [iteratees=[_.identity]] + * The iteratees to invoke. + * @returns {Function} Returns the new function. + * @example + * + * var func = _.over([Math.max, Math.min]); + * + * func(1, 2, 3, 4); + * // => [4, 1] + */ + var over = createOver(arrayMap); + + /** + * Creates a function that checks if **all** of the `predicates` return + * truthy when invoked with the arguments it receives. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Util + * @param {...(Function|Function[])} [predicates=[_.identity]] + * The predicates to check. + * @returns {Function} Returns the new function. + * @example + * + * var func = _.overEvery([Boolean, isFinite]); + * + * func('1'); + * // => true + * + * func(null); + * // => false + * + * func(NaN); + * // => false + */ + var overEvery = createOver(arrayEvery); + + /** + * Creates a function that checks if **any** of the `predicates` return + * truthy when invoked with the arguments it receives. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Util + * @param {...(Function|Function[])} [predicates=[_.identity]] + * The predicates to check. + * @returns {Function} Returns the new function. + * @example + * + * var func = _.overSome([Boolean, isFinite]); + * + * func('1'); + * // => true + * + * func(null); + * // => true + * + * func(NaN); + * // => false + */ + var overSome = createOver(arraySome); + + /** + * Creates a function that returns the value at `path` of a given object. + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Util + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new accessor function. + * @example + * + * var objects = [ + * { 'a': { 'b': 2 } }, + * { 'a': { 'b': 1 } } + * ]; + * + * _.map(objects, _.property('a.b')); + * // => [2, 1] + * + * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b'); + * // => [1, 2] + */ + function property(path) { + return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path); + } + + /** + * The opposite of `_.property`; this method creates a function that returns + * the value at a given path of `object`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Util + * @param {Object} object The object to query. + * @returns {Function} Returns the new accessor function. + * @example + * + * var array = [0, 1, 2], + * object = { 'a': array, 'b': array, 'c': array }; + * + * _.map(['a[2]', 'c[0]'], _.propertyOf(object)); + * // => [2, 0] + * + * _.map([['a', '2'], ['c', '0']], _.propertyOf(object)); + * // => [2, 0] + */ + function propertyOf(object) { + return function (path) { + return object == null ? undefined : baseGet(object, path); + }; + } + + /** + * Creates an array of numbers (positive and/or negative) progressing from + * `start` up to, but not including, `end`. A step of `-1` is used if a negative + * `start` is specified without an `end` or `step`. If `end` is not specified, + * it's set to `start` with `start` then set to `0`. + * + * **Note:** JavaScript follows the IEEE-754 standard for resolving + * floating-point values which can produce unexpected results. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {number} [start=0] The start of the range. + * @param {number} end The end of the range. + * @param {number} [step=1] The value to increment or decrement by. + * @returns {Array} Returns the range of numbers. + * @see _.inRange, _.rangeRight + * @example + * + * _.range(4); + * // => [0, 1, 2, 3] + * + * _.range(-4); + * // => [0, -1, -2, -3] + * + * _.range(1, 5); + * // => [1, 2, 3, 4] + * + * _.range(0, 20, 5); + * // => [0, 5, 10, 15] + * + * _.range(0, -4, -1); + * // => [0, -1, -2, -3] + * + * _.range(1, 4, 0); + * // => [1, 1, 1] + * + * _.range(0); + * // => [] + */ + var range = createRange(); + + /** + * This method is like `_.range` except that it populates values in + * descending order. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Util + * @param {number} [start=0] The start of the range. + * @param {number} end The end of the range. + * @param {number} [step=1] The value to increment or decrement by. + * @returns {Array} Returns the range of numbers. + * @see _.inRange, _.range + * @example + * + * _.rangeRight(4); + * // => [3, 2, 1, 0] + * + * _.rangeRight(-4); + * // => [-3, -2, -1, 0] + * + * _.rangeRight(1, 5); + * // => [4, 3, 2, 1] + * + * _.rangeRight(0, 20, 5); + * // => [15, 10, 5, 0] + * + * _.rangeRight(0, -4, -1); + * // => [-3, -2, -1, 0] + * + * _.rangeRight(1, 4, 0); + * // => [1, 1, 1] + * + * _.rangeRight(0); + * // => [] + */ + var rangeRight = createRange(true); + + /** + * This method returns a new empty array. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {Array} Returns the new empty array. + * @example + * + * var arrays = _.times(2, _.stubArray); + * + * console.log(arrays); + * // => [[], []] + * + * console.log(arrays[0] === arrays[1]); + * // => false + */ + function stubArray() { + return []; + } + + /** + * This method returns `false`. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {boolean} Returns `false`. + * @example + * + * _.times(2, _.stubFalse); + * // => [false, false] + */ + function stubFalse() { + return false; + } + + /** + * This method returns a new empty object. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {Object} Returns the new empty object. + * @example + * + * var objects = _.times(2, _.stubObject); + * + * console.log(objects); + * // => [{}, {}] + * + * console.log(objects[0] === objects[1]); + * // => false + */ + function stubObject() { + return {}; + } + + /** + * This method returns an empty string. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {string} Returns the empty string. + * @example + * + * _.times(2, _.stubString); + * // => ['', ''] + */ + function stubString() { + return ''; + } + + /** + * This method returns `true`. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {boolean} Returns `true`. + * @example + * + * _.times(2, _.stubTrue); + * // => [true, true] + */ + function stubTrue() { + return true; + } + + /** + * Invokes the iteratee `n` times, returning an array of the results of + * each invocation. The iteratee is invoked with one argument; (index). + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {number} n The number of times to invoke `iteratee`. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the array of results. + * @example + * + * _.times(3, String); + * // => ['0', '1', '2'] + * + * _.times(4, _.constant(0)); + * // => [0, 0, 0, 0] + */ + function times(n, iteratee) { + n = toInteger(n); + if (n < 1 || n > MAX_SAFE_INTEGER) { + return []; + } + var index = MAX_ARRAY_LENGTH, + length = nativeMin(n, MAX_ARRAY_LENGTH); + + iteratee = getIteratee(iteratee); + n -= MAX_ARRAY_LENGTH; + + var result = baseTimes(length, iteratee); + while (++index < n) { + iteratee(index); + } + return result; + } + + /** + * Converts `value` to a property path array. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Util + * @param {*} value The value to convert. + * @returns {Array} Returns the new property path array. + * @example + * + * _.toPath('a.b.c'); + * // => ['a', 'b', 'c'] + * + * _.toPath('a[0].b.c'); + * // => ['a', '0', 'b', 'c'] + */ + function toPath(value) { + if (isArray(value)) { + return arrayMap(value, toKey); + } + return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value))); + } + + /** + * Generates a unique ID. If `prefix` is given, the ID is appended to it. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {string} [prefix=''] The value to prefix the ID with. + * @returns {string} Returns the unique ID. + * @example + * + * _.uniqueId('contact_'); + * // => 'contact_104' + * + * _.uniqueId(); + * // => '105' + */ + function uniqueId(prefix) { + var id = ++idCounter; + return toString(prefix) + id; + } + + /*------------------------------------------------------------------------*/ + + /** + * Adds two numbers. + * + * @static + * @memberOf _ + * @since 3.4.0 + * @category Math + * @param {number} augend The first number in an addition. + * @param {number} addend The second number in an addition. + * @returns {number} Returns the total. + * @example + * + * _.add(6, 4); + * // => 10 + */ + var add = createMathOperation(function (augend, addend) { + return augend + addend; + }, 0); + + /** + * Computes `number` rounded up to `precision`. + * + * @static + * @memberOf _ + * @since 3.10.0 + * @category Math + * @param {number} number The number to round up. + * @param {number} [precision=0] The precision to round up to. + * @returns {number} Returns the rounded up number. + * @example + * + * _.ceil(4.006); + * // => 5 + * + * _.ceil(6.004, 2); + * // => 6.01 + * + * _.ceil(6040, -2); + * // => 6100 + */ + var ceil = createRound('ceil'); + + /** + * Divide two numbers. + * + * @static + * @memberOf _ + * @since 4.7.0 + * @category Math + * @param {number} dividend The first number in a division. + * @param {number} divisor The second number in a division. + * @returns {number} Returns the quotient. + * @example + * + * _.divide(6, 4); + * // => 1.5 + */ + var divide = createMathOperation(function (dividend, divisor) { + return dividend / divisor; + }, 1); + + /** + * Computes `number` rounded down to `precision`. + * + * @static + * @memberOf _ + * @since 3.10.0 + * @category Math + * @param {number} number The number to round down. + * @param {number} [precision=0] The precision to round down to. + * @returns {number} Returns the rounded down number. + * @example + * + * _.floor(4.006); + * // => 4 + * + * _.floor(0.046, 2); + * // => 0.04 + * + * _.floor(4060, -2); + * // => 4000 + */ + var floor = createRound('floor'); + + /** + * Computes the maximum value of `array`. If `array` is empty or falsey, + * `undefined` is returned. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Math + * @param {Array} array The array to iterate over. + * @returns {*} Returns the maximum value. + * @example + * + * _.max([4, 2, 8, 6]); + * // => 8 + * + * _.max([]); + * // => undefined + */ + function max(array) { + return array && array.length ? baseExtremum(array, identity, baseGt) : undefined; + } + + /** + * This method is like `_.max` except that it accepts `iteratee` which is + * invoked for each element in `array` to generate the criterion by which + * the value is ranked. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Math + * @param {Array} array The array to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {*} Returns the maximum value. + * @example + * + * var objects = [{ 'n': 1 }, { 'n': 2 }]; + * + * _.maxBy(objects, function(o) { return o.n; }); + * // => { 'n': 2 } + * + * // The `_.property` iteratee shorthand. + * _.maxBy(objects, 'n'); + * // => { 'n': 2 } + */ + function maxBy(array, iteratee) { + return array && array.length + ? baseExtremum(array, getIteratee(iteratee, 2), baseGt) + : undefined; + } + + /** + * Computes the mean of the values in `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Math + * @param {Array} array The array to iterate over. + * @returns {number} Returns the mean. + * @example + * + * _.mean([4, 2, 8, 6]); + * // => 5 + */ + function mean(array) { + return baseMean(array, identity); + } + + /** + * This method is like `_.mean` except that it accepts `iteratee` which is + * invoked for each element in `array` to generate the value to be averaged. + * The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.7.0 + * @category Math + * @param {Array} array The array to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {number} Returns the mean. + * @example + * + * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }]; + * + * _.meanBy(objects, function(o) { return o.n; }); + * // => 5 + * + * // The `_.property` iteratee shorthand. + * _.meanBy(objects, 'n'); + * // => 5 + */ + function meanBy(array, iteratee) { + return baseMean(array, getIteratee(iteratee, 2)); + } + + /** + * Computes the minimum value of `array`. If `array` is empty or falsey, + * `undefined` is returned. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Math + * @param {Array} array The array to iterate over. + * @returns {*} Returns the minimum value. + * @example + * + * _.min([4, 2, 8, 6]); + * // => 2 + * + * _.min([]); + * // => undefined + */ + function min(array) { + return array && array.length ? baseExtremum(array, identity, baseLt) : undefined; + } + + /** + * This method is like `_.min` except that it accepts `iteratee` which is + * invoked for each element in `array` to generate the criterion by which + * the value is ranked. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Math + * @param {Array} array The array to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {*} Returns the minimum value. + * @example + * + * var objects = [{ 'n': 1 }, { 'n': 2 }]; + * + * _.minBy(objects, function(o) { return o.n; }); + * // => { 'n': 1 } + * + * // The `_.property` iteratee shorthand. + * _.minBy(objects, 'n'); + * // => { 'n': 1 } + */ + function minBy(array, iteratee) { + return array && array.length + ? baseExtremum(array, getIteratee(iteratee, 2), baseLt) + : undefined; + } + + /** + * Multiply two numbers. + * + * @static + * @memberOf _ + * @since 4.7.0 + * @category Math + * @param {number} multiplier The first number in a multiplication. + * @param {number} multiplicand The second number in a multiplication. + * @returns {number} Returns the product. + * @example + * + * _.multiply(6, 4); + * // => 24 + */ + var multiply = createMathOperation(function (multiplier, multiplicand) { + return multiplier * multiplicand; + }, 1); + + /** + * Computes `number` rounded to `precision`. + * + * @static + * @memberOf _ + * @since 3.10.0 + * @category Math + * @param {number} number The number to round. + * @param {number} [precision=0] The precision to round to. + * @returns {number} Returns the rounded number. + * @example + * + * _.round(4.006); + * // => 4 + * + * _.round(4.006, 2); + * // => 4.01 + * + * _.round(4060, -2); + * // => 4100 + */ + var round = createRound('round'); + + /** + * Subtract two numbers. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Math + * @param {number} minuend The first number in a subtraction. + * @param {number} subtrahend The second number in a subtraction. + * @returns {number} Returns the difference. + * @example + * + * _.subtract(6, 4); + * // => 2 + */ + var subtract = createMathOperation(function (minuend, subtrahend) { + return minuend - subtrahend; + }, 0); + + /** + * Computes the sum of the values in `array`. + * + * @static + * @memberOf _ + * @since 3.4.0 + * @category Math + * @param {Array} array The array to iterate over. + * @returns {number} Returns the sum. + * @example + * + * _.sum([4, 2, 8, 6]); + * // => 20 + */ + function sum(array) { + return array && array.length ? baseSum(array, identity) : 0; + } + + /** + * This method is like `_.sum` except that it accepts `iteratee` which is + * invoked for each element in `array` to generate the value to be summed. + * The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Math + * @param {Array} array The array to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {number} Returns the sum. + * @example + * + * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }]; + * + * _.sumBy(objects, function(o) { return o.n; }); + * // => 20 + * + * // The `_.property` iteratee shorthand. + * _.sumBy(objects, 'n'); + * // => 20 + */ + function sumBy(array, iteratee) { + return array && array.length ? baseSum(array, getIteratee(iteratee, 2)) : 0; + } + + /*------------------------------------------------------------------------*/ + + // Add methods that return wrapped values in chain sequences. + lodash.after = after; + lodash.ary = ary; + lodash.assign = assign; + lodash.assignIn = assignIn; + lodash.assignInWith = assignInWith; + lodash.assignWith = assignWith; + lodash.at = at; + lodash.before = before; + lodash.bind = bind; + lodash.bindAll = bindAll; + lodash.bindKey = bindKey; + lodash.castArray = castArray; + lodash.chain = chain; + lodash.chunk = chunk; + lodash.compact = compact; + lodash.concat = concat; + lodash.cond = cond; + lodash.conforms = conforms; + lodash.constant = constant; + lodash.countBy = countBy; + lodash.create = create; + lodash.curry = curry; + lodash.curryRight = curryRight; + lodash.debounce = debounce; + lodash.defaults = defaults; + lodash.defaultsDeep = defaultsDeep; + lodash.defer = defer; + lodash.delay = delay; + lodash.difference = difference; + lodash.differenceBy = differenceBy; + lodash.differenceWith = differenceWith; + lodash.drop = drop; + lodash.dropRight = dropRight; + lodash.dropRightWhile = dropRightWhile; + lodash.dropWhile = dropWhile; + lodash.fill = fill; + lodash.filter = filter; + lodash.flatMap = flatMap; + lodash.flatMapDeep = flatMapDeep; + lodash.flatMapDepth = flatMapDepth; + lodash.flatten = flatten; + lodash.flattenDeep = flattenDeep; + lodash.flattenDepth = flattenDepth; + lodash.flip = flip; + lodash.flow = flow; + lodash.flowRight = flowRight; + lodash.fromPairs = fromPairs; + lodash.functions = functions; + lodash.functionsIn = functionsIn; + lodash.groupBy = groupBy; + lodash.initial = initial; + lodash.intersection = intersection; + lodash.intersectionBy = intersectionBy; + lodash.intersectionWith = intersectionWith; + lodash.invert = invert; + lodash.invertBy = invertBy; + lodash.invokeMap = invokeMap; + lodash.iteratee = iteratee; + lodash.keyBy = keyBy; + lodash.keys = keys; + lodash.keysIn = keysIn; + lodash.map = map; + lodash.mapKeys = mapKeys; + lodash.mapValues = mapValues; + lodash.matches = matches; + lodash.matchesProperty = matchesProperty; + lodash.memoize = memoize; + lodash.merge = merge; + lodash.mergeWith = mergeWith; + lodash.method = method; + lodash.methodOf = methodOf; + lodash.mixin = mixin; + lodash.negate = negate; + lodash.nthArg = nthArg; + lodash.omit = omit; + lodash.omitBy = omitBy; + lodash.once = once; + lodash.orderBy = orderBy; + lodash.over = over; + lodash.overArgs = overArgs; + lodash.overEvery = overEvery; + lodash.overSome = overSome; + lodash.partial = partial; + lodash.partialRight = partialRight; + lodash.partition = partition; + lodash.pick = pick; + lodash.pickBy = pickBy; + lodash.property = property; + lodash.propertyOf = propertyOf; + lodash.pull = pull; + lodash.pullAll = pullAll; + lodash.pullAllBy = pullAllBy; + lodash.pullAllWith = pullAllWith; + lodash.pullAt = pullAt; + lodash.range = range; + lodash.rangeRight = rangeRight; + lodash.rearg = rearg; + lodash.reject = reject; + lodash.remove = remove; + lodash.rest = rest; + lodash.reverse = reverse; + lodash.sampleSize = sampleSize; + lodash.set = set; + lodash.setWith = setWith; + lodash.shuffle = shuffle; + lodash.slice = slice; + lodash.sortBy = sortBy; + lodash.sortedUniq = sortedUniq; + lodash.sortedUniqBy = sortedUniqBy; + lodash.split = split; + lodash.spread = spread; + lodash.tail = tail; + lodash.take = take; + lodash.takeRight = takeRight; + lodash.takeRightWhile = takeRightWhile; + lodash.takeWhile = takeWhile; + lodash.tap = tap; + lodash.throttle = throttle; + lodash.thru = thru; + lodash.toArray = toArray; + lodash.toPairs = toPairs; + lodash.toPairsIn = toPairsIn; + lodash.toPath = toPath; + lodash.toPlainObject = toPlainObject; + lodash.transform = transform; + lodash.unary = unary; + lodash.union = union; + lodash.unionBy = unionBy; + lodash.unionWith = unionWith; + lodash.uniq = uniq; + lodash.uniqBy = uniqBy; + lodash.uniqWith = uniqWith; + lodash.unset = unset; + lodash.unzip = unzip; + lodash.unzipWith = unzipWith; + lodash.update = update; + lodash.updateWith = updateWith; + lodash.values = values; + lodash.valuesIn = valuesIn; + lodash.without = without; + lodash.words = words; + lodash.wrap = wrap; + lodash.xor = xor; + lodash.xorBy = xorBy; + lodash.xorWith = xorWith; + lodash.zip = zip; + lodash.zipObject = zipObject; + lodash.zipObjectDeep = zipObjectDeep; + lodash.zipWith = zipWith; + + // Add aliases. + lodash.entries = toPairs; + lodash.entriesIn = toPairsIn; + lodash.extend = assignIn; + lodash.extendWith = assignInWith; + + // Add methods to `lodash.prototype`. + mixin(lodash, lodash); + + /*------------------------------------------------------------------------*/ + + // Add methods that return unwrapped values in chain sequences. + lodash.add = add; + lodash.attempt = attempt; + lodash.camelCase = camelCase; + lodash.capitalize = capitalize; + lodash.ceil = ceil; + lodash.clamp = clamp; + lodash.clone = clone; + lodash.cloneDeep = cloneDeep; + lodash.cloneDeepWith = cloneDeepWith; + lodash.cloneWith = cloneWith; + lodash.conformsTo = conformsTo; + lodash.deburr = deburr; + lodash.defaultTo = defaultTo; + lodash.divide = divide; + lodash.endsWith = endsWith; + lodash.eq = eq; + lodash.escape = escape; + lodash.escapeRegExp = escapeRegExp; + lodash.every = every; + lodash.find = find; + lodash.findIndex = findIndex; + lodash.findKey = findKey; + lodash.findLast = findLast; + lodash.findLastIndex = findLastIndex; + lodash.findLastKey = findLastKey; + lodash.floor = floor; + lodash.forEach = forEach; + lodash.forEachRight = forEachRight; + lodash.forIn = forIn; + lodash.forInRight = forInRight; + lodash.forOwn = forOwn; + lodash.forOwnRight = forOwnRight; + lodash.get = get; + lodash.gt = gt; + lodash.gte = gte; + lodash.has = has; + lodash.hasIn = hasIn; + lodash.head = head; + lodash.identity = identity; + lodash.includes = includes; + lodash.indexOf = indexOf; + lodash.inRange = inRange; + lodash.invoke = invoke; + lodash.isArguments = isArguments; + lodash.isArray = isArray; + lodash.isArrayBuffer = isArrayBuffer; + lodash.isArrayLike = isArrayLike; + lodash.isArrayLikeObject = isArrayLikeObject; + lodash.isBoolean = isBoolean; + lodash.isBuffer = isBuffer; + lodash.isDate = isDate; + lodash.isElement = isElement; + lodash.isEmpty = isEmpty; + lodash.isEqual = isEqual; + lodash.isEqualWith = isEqualWith; + lodash.isError = isError; + lodash.isFinite = isFinite; + lodash.isFunction = isFunction; + lodash.isInteger = isInteger; + lodash.isLength = isLength; + lodash.isMap = isMap; + lodash.isMatch = isMatch; + lodash.isMatchWith = isMatchWith; + lodash.isNaN = isNaN; + lodash.isNative = isNative; + lodash.isNil = isNil; + lodash.isNull = isNull; + lodash.isNumber = isNumber; + lodash.isObject = isObject; + lodash.isObjectLike = isObjectLike; + lodash.isPlainObject = isPlainObject; + lodash.isRegExp = isRegExp; + lodash.isSafeInteger = isSafeInteger; + lodash.isSet = isSet; + lodash.isString = isString; + lodash.isSymbol = isSymbol; + lodash.isTypedArray = isTypedArray; + lodash.isUndefined = isUndefined; + lodash.isWeakMap = isWeakMap; + lodash.isWeakSet = isWeakSet; + lodash.join = join; + lodash.kebabCase = kebabCase; + lodash.last = last; + lodash.lastIndexOf = lastIndexOf; + lodash.lowerCase = lowerCase; + lodash.lowerFirst = lowerFirst; + lodash.lt = lt; + lodash.lte = lte; + lodash.max = max; + lodash.maxBy = maxBy; + lodash.mean = mean; + lodash.meanBy = meanBy; + lodash.min = min; + lodash.minBy = minBy; + lodash.stubArray = stubArray; + lodash.stubFalse = stubFalse; + lodash.stubObject = stubObject; + lodash.stubString = stubString; + lodash.stubTrue = stubTrue; + lodash.multiply = multiply; + lodash.nth = nth; + lodash.noConflict = noConflict; + lodash.noop = noop; + lodash.now = now; + lodash.pad = pad; + lodash.padEnd = padEnd; + lodash.padStart = padStart; + lodash.parseInt = parseInt; + lodash.random = random; + lodash.reduce = reduce; + lodash.reduceRight = reduceRight; + lodash.repeat = repeat; + lodash.replace = replace; + lodash.result = result; + lodash.round = round; + lodash.runInContext = runInContext; + lodash.sample = sample; + lodash.size = size; + lodash.snakeCase = snakeCase; + lodash.some = some; + lodash.sortedIndex = sortedIndex; + lodash.sortedIndexBy = sortedIndexBy; + lodash.sortedIndexOf = sortedIndexOf; + lodash.sortedLastIndex = sortedLastIndex; + lodash.sortedLastIndexBy = sortedLastIndexBy; + lodash.sortedLastIndexOf = sortedLastIndexOf; + lodash.startCase = startCase; + lodash.startsWith = startsWith; + lodash.subtract = subtract; + lodash.sum = sum; + lodash.sumBy = sumBy; + lodash.template = template; + lodash.times = times; + lodash.toFinite = toFinite; + lodash.toInteger = toInteger; + lodash.toLength = toLength; + lodash.toLower = toLower; + lodash.toNumber = toNumber; + lodash.toSafeInteger = toSafeInteger; + lodash.toString = toString; + lodash.toUpper = toUpper; + lodash.trim = trim; + lodash.trimEnd = trimEnd; + lodash.trimStart = trimStart; + lodash.truncate = truncate; + lodash.unescape = unescape; + lodash.uniqueId = uniqueId; + lodash.upperCase = upperCase; + lodash.upperFirst = upperFirst; + + // Add aliases. + lodash.each = forEach; + lodash.eachRight = forEachRight; + lodash.first = head; + + mixin( + lodash, + (function () { + var source = {}; + baseForOwn(lodash, function (func, methodName) { + if (!hasOwnProperty.call(lodash.prototype, methodName)) { + source[methodName] = func; + } + }); + return source; + })(), + { chain: false }, + ); + + /*------------------------------------------------------------------------*/ + + /** + * The semantic version number. + * + * @static + * @memberOf _ + * @type {string} + */ + lodash.VERSION = VERSION; + + // Assign default placeholders. + arrayEach( + ['bind', 'bindKey', 'curry', 'curryRight', 'partial', 'partialRight'], + function (methodName) { + lodash[methodName].placeholder = lodash; + }, + ); + + // Add `LazyWrapper` methods for `_.drop` and `_.take` variants. + arrayEach(['drop', 'take'], function (methodName, index) { + LazyWrapper.prototype[methodName] = function (n) { + n = n === undefined ? 1 : nativeMax(toInteger(n), 0); + + var result = this.__filtered__ && !index ? new LazyWrapper(this) : this.clone(); + + if (result.__filtered__) { + result.__takeCount__ = nativeMin(n, result.__takeCount__); + } else { + result.__views__.push({ + size: nativeMin(n, MAX_ARRAY_LENGTH), + type: methodName + (result.__dir__ < 0 ? 'Right' : ''), + }); + } + return result; + }; + + LazyWrapper.prototype[methodName + 'Right'] = function (n) { + return this.reverse()[methodName](n).reverse(); + }; + }); + + // Add `LazyWrapper` methods that accept an `iteratee` value. + arrayEach(['filter', 'map', 'takeWhile'], function (methodName, index) { + var type = index + 1, + isFilter = type == LAZY_FILTER_FLAG || type == LAZY_WHILE_FLAG; + + LazyWrapper.prototype[methodName] = function (iteratee) { + var result = this.clone(); + result.__iteratees__.push({ + iteratee: getIteratee(iteratee, 3), + type: type, + }); + result.__filtered__ = result.__filtered__ || isFilter; + return result; + }; + }); + + // Add `LazyWrapper` methods for `_.head` and `_.last`. + arrayEach(['head', 'last'], function (methodName, index) { + var takeName = 'take' + (index ? 'Right' : ''); + + LazyWrapper.prototype[methodName] = function () { + return this[takeName](1).value()[0]; + }; + }); + + // Add `LazyWrapper` methods for `_.initial` and `_.tail`. + arrayEach(['initial', 'tail'], function (methodName, index) { + var dropName = 'drop' + (index ? '' : 'Right'); + + LazyWrapper.prototype[methodName] = function () { + return this.__filtered__ ? new LazyWrapper(this) : this[dropName](1); + }; + }); + + LazyWrapper.prototype.compact = function () { + return this.filter(identity); + }; + + LazyWrapper.prototype.find = function (predicate) { + return this.filter(predicate).head(); + }; + + LazyWrapper.prototype.findLast = function (predicate) { + return this.reverse().find(predicate); + }; + + LazyWrapper.prototype.invokeMap = baseRest(function (path, args) { + if (typeof path == 'function') { + return new LazyWrapper(this); + } + return this.map(function (value) { + return baseInvoke(value, path, args); + }); + }); + + LazyWrapper.prototype.reject = function (predicate) { + return this.filter(negate(getIteratee(predicate))); + }; + + LazyWrapper.prototype.slice = function (start, end) { + start = toInteger(start); + + var result = this; + if (result.__filtered__ && (start > 0 || end < 0)) { + return new LazyWrapper(result); + } + if (start < 0) { + result = result.takeRight(-start); + } else if (start) { + result = result.drop(start); + } + if (end !== undefined) { + end = toInteger(end); + result = end < 0 ? result.dropRight(-end) : result.take(end - start); + } + return result; + }; + + LazyWrapper.prototype.takeRightWhile = function (predicate) { + return this.reverse().takeWhile(predicate).reverse(); + }; + + LazyWrapper.prototype.toArray = function () { + return this.take(MAX_ARRAY_LENGTH); + }; + + // Add `LazyWrapper` methods to `lodash.prototype`. + baseForOwn(LazyWrapper.prototype, function (func, methodName) { + var checkIteratee = /^(?:filter|find|map|reject)|While$/.test(methodName), + isTaker = /^(?:head|last)$/.test(methodName), + lodashFunc = lodash[isTaker ? 'take' + (methodName == 'last' ? 'Right' : '') : methodName], + retUnwrapped = isTaker || /^find/.test(methodName); + + if (!lodashFunc) { + return; + } + lodash.prototype[methodName] = function () { + var value = this.__wrapped__, + args = isTaker ? [1] : arguments, + isLazy = value instanceof LazyWrapper, + iteratee = args[0], + useLazy = isLazy || isArray(value); + + var interceptor = function (value) { + var result = lodashFunc.apply(lodash, arrayPush([value], args)); + return isTaker && chainAll ? result[0] : result; + }; + + if (useLazy && checkIteratee && typeof iteratee == 'function' && iteratee.length != 1) { + // Avoid lazy use if the iteratee has a "length" value other than `1`. + isLazy = useLazy = false; + } + var chainAll = this.__chain__, + isHybrid = !!this.__actions__.length, + isUnwrapped = retUnwrapped && !chainAll, + onlyLazy = isLazy && !isHybrid; + + if (!retUnwrapped && useLazy) { + value = onlyLazy ? value : new LazyWrapper(this); + var result = func.apply(value, args); + result.__actions__.push({ func: thru, args: [interceptor], thisArg: undefined }); + return new LodashWrapper(result, chainAll); + } + if (isUnwrapped && onlyLazy) { + return func.apply(this, args); + } + result = this.thru(interceptor); + return isUnwrapped ? (isTaker ? result.value()[0] : result.value()) : result; + }; + }); + + // Add `Array` methods to `lodash.prototype`. + arrayEach(['pop', 'push', 'shift', 'sort', 'splice', 'unshift'], function (methodName) { + var func = arrayProto[methodName], + chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru', + retUnwrapped = /^(?:pop|shift)$/.test(methodName); + + lodash.prototype[methodName] = function () { + var args = arguments; + if (retUnwrapped && !this.__chain__) { + var value = this.value(); + return func.apply(isArray(value) ? value : [], args); + } + return this[chainName](function (value) { + return func.apply(isArray(value) ? value : [], args); + }); + }; + }); + + // Map minified method names to their real names. + baseForOwn(LazyWrapper.prototype, function (func, methodName) { + var lodashFunc = lodash[methodName]; + if (lodashFunc) { + var key = lodashFunc.name + ''; + if (!hasOwnProperty.call(realNames, key)) { + realNames[key] = []; + } + realNames[key].push({ name: methodName, func: lodashFunc }); + } + }); + + realNames[createHybrid(undefined, WRAP_BIND_KEY_FLAG).name] = [ + { + name: 'wrapper', + func: undefined, + }, + ]; + + // Add methods to `LazyWrapper`. + LazyWrapper.prototype.clone = lazyClone; + LazyWrapper.prototype.reverse = lazyReverse; + LazyWrapper.prototype.value = lazyValue; + + // Add chain sequence methods to the `lodash` wrapper. + lodash.prototype.at = wrapperAt; + lodash.prototype.chain = wrapperChain; + lodash.prototype.commit = wrapperCommit; + lodash.prototype.next = wrapperNext; + lodash.prototype.plant = wrapperPlant; + lodash.prototype.reverse = wrapperReverse; + lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue; + + // Add lazy aliases. + lodash.prototype.first = lodash.prototype.head; + + if (symIterator) { + lodash.prototype[symIterator] = wrapperToIterator; + } + return lodash; + }; + + /*--------------------------------------------------------------------------*/ + + // Export lodash. + var _ = runInContext(); + + // Some AMD build optimizers, like r.js, check for condition patterns like: + if (true) { + // Expose Lodash on the global object to prevent errors when Lodash is + // loaded by a script tag in the presence of an AMD loader. + // See http://requirejs.org/docs/errors.html#mismatch for more details. + // Use `_.noConflict` to remove Lodash from the global object. + root._ = _; + + // Define as an anonymous module so, through path mapping, it can be + // referenced as the "underscore" module. + !((__WEBPACK_AMD_DEFINE_RESULT__ = function () { + return _; + }.call(exports, __webpack_require__, exports, module)), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } + // Check for `exports` after `define` in case a build optimizer adds it. + else if (freeModule) { + // Export for Node.js. + (freeModule.exports = _)._ = _; + // Export for CommonJS support. + freeExports._ = _; + } else { + // Export to the global object. + root._ = _; + } + }).call(this); + + /* WEBPACK VAR INJECTION */ + }).call(exports, __webpack_require__(238)(module)); + + /***/ + }, + /* 544 */ + /***/ function (module, exports) { + module.exports = { + brightColor: 'HelloWorld__brightColor__1M8yw', + }; + + /***/ + }, + /* 545 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(10); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_create_react_class__ = __webpack_require__(37); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_create_react_class___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_create_react_class__); + /* eslint-disable react/prefer-es6-class */ + + // Super simple example of React component using React.createClass + var HelloWorldES5 = __WEBPACK_IMPORTED_MODULE_2_create_react_class___default()({ + displayName: 'HelloWorldES5', + + propTypes: { + helloWorldData: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object, + }, + + getInitialState: function getInitialState() { + return this.props.helloWorldData; + }, + setNameDomRef: function setNameDomRef(nameDomNode) { + this.nameDomRef = nameDomNode; + }, + handleChange: function handleChange() { + var name = this.nameDomRef.value; + this.setState({ name: name }); + }, + render: function render() { + var name = this.state.name; + + return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'div', + null, + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('h3', null, 'Hello ES5, ', name, '!'), + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'p', + null, + 'Say hello to:', + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('input', { + type: 'text', + ref: this.setNameDomRef, + defaultValue: name, + onChange: this.handleChange, + }), + ), + ); + }, + }); + + var _default = HelloWorldES5; + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + HelloWorldES5, + 'HelloWorldES5', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/HelloWorldES5.jsx', + ); + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/HelloWorldES5.jsx', + ); + })(); + + /***/ + }, + /* 546 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + */ + + var _assign = __webpack_require__(63); + + var emptyObject = __webpack_require__(547); + var _invariant = __webpack_require__(548); + + if (true) { + var warning = __webpack_require__(549); + } + + var MIXINS_KEY = 'mixins'; + + // Helper function to allow the creation of anonymous functions which do not + // have .name set to the name of the variable being assigned to. + function identity(fn) { + return fn; + } + + var ReactPropTypeLocationNames; + if (true) { + ReactPropTypeLocationNames = { + prop: 'prop', + context: 'context', + childContext: 'child context', + }; + } else { + ReactPropTypeLocationNames = {}; + } + + function factory(ReactComponent, isValidElement, ReactNoopUpdateQueue) { + /** + * Policies that describe methods in `ReactClassInterface`. + */ + + var injectedMixins = []; + + /** + * Composite components are higher-level components that compose other composite + * or host components. + * + * To create a new type of `ReactClass`, pass a specification of + * your new class to `React.createClass`. The only requirement of your class + * specification is that you implement a `render` method. + * + * var MyComponent = React.createClass({ + * render: function() { + * return <div>Hello World</div>; + * } + * }); + * + * The class specification supports a specific protocol of methods that have + * special meaning (e.g. `render`). See `ReactClassInterface` for + * more the comprehensive protocol. Any other properties and methods in the + * class specification will be available on the prototype. + * + * @interface ReactClassInterface + * @internal + */ + var ReactClassInterface = { + /** + * An array of Mixin objects to include when defining your component. + * + * @type {array} + * @optional + */ + mixins: 'DEFINE_MANY', + + /** + * An object containing properties and methods that should be defined on + * the component's constructor instead of its prototype (static methods). + * + * @type {object} + * @optional + */ + statics: 'DEFINE_MANY', + + /** + * Definition of prop types for this component. + * + * @type {object} + * @optional + */ + propTypes: 'DEFINE_MANY', + + /** + * Definition of context types for this component. + * + * @type {object} + * @optional + */ + contextTypes: 'DEFINE_MANY', + + /** + * Definition of context types this component sets for its children. + * + * @type {object} + * @optional + */ + childContextTypes: 'DEFINE_MANY', + + // ==== Definition methods ==== + + /** + * Invoked when the component is mounted. Values in the mapping will be set on + * `this.props` if that prop is not specified (i.e. using an `in` check). + * + * This method is invoked before `getInitialState` and therefore cannot rely + * on `this.state` or use `this.setState`. + * + * @return {object} + * @optional + */ + getDefaultProps: 'DEFINE_MANY_MERGED', + + /** + * Invoked once before the component is mounted. The return value will be used + * as the initial value of `this.state`. + * + * getInitialState: function() { + * return { + * isOn: false, + * fooBaz: new BazFoo() + * } + * } + * + * @return {object} + * @optional + */ + getInitialState: 'DEFINE_MANY_MERGED', + + /** + * @return {object} + * @optional + */ + getChildContext: 'DEFINE_MANY_MERGED', + + /** + * Uses props from `this.props` and state from `this.state` to render the + * structure of the component. + * + * No guarantees are made about when or how often this method is invoked, so + * it must not have side effects. + * + * render: function() { + * var name = this.props.name; + * return <div>Hello, {name}!</div>; + * } + * + * @return {ReactComponent} + * @required + */ + render: 'DEFINE_ONCE', + + // ==== Delegate methods ==== + + /** + * Invoked when the component is initially created and about to be mounted. + * This may have side effects, but any external subscriptions or data created + * by this method must be cleaned up in `componentWillUnmount`. + * + * @optional + */ + componentWillMount: 'DEFINE_MANY', + + /** + * Invoked when the component has been mounted and has a DOM representation. + * However, there is no guarantee that the DOM node is in the document. + * + * Use this as an opportunity to operate on the DOM when the component has + * been mounted (initialized and rendered) for the first time. + * + * @param {DOMElement} rootNode DOM element representing the component. + * @optional + */ + componentDidMount: 'DEFINE_MANY', + + /** + * Invoked before the component receives new props. + * + * Use this as an opportunity to react to a prop transition by updating the + * state using `this.setState`. Current props are accessed via `this.props`. + * + * componentWillReceiveProps: function(nextProps, nextContext) { + * this.setState({ + * likesIncreasing: nextProps.likeCount > this.props.likeCount + * }); + * } + * + * NOTE: There is no equivalent `componentWillReceiveState`. An incoming prop + * transition may cause a state change, but the opposite is not true. If you + * need it, you are probably looking for `componentWillUpdate`. + * + * @param {object} nextProps + * @optional + */ + componentWillReceiveProps: 'DEFINE_MANY', + + /** + * Invoked while deciding if the component should be updated as a result of + * receiving new props, state and/or context. + * + * Use this as an opportunity to `return false` when you're certain that the + * transition to the new props/state/context will not require a component + * update. + * + * shouldComponentUpdate: function(nextProps, nextState, nextContext) { + * return !equal(nextProps, this.props) || + * !equal(nextState, this.state) || + * !equal(nextContext, this.context); + * } + * + * @param {object} nextProps + * @param {?object} nextState + * @param {?object} nextContext + * @return {boolean} True if the component should update. + * @optional + */ + shouldComponentUpdate: 'DEFINE_ONCE', + + /** + * Invoked when the component is about to update due to a transition from + * `this.props`, `this.state` and `this.context` to `nextProps`, `nextState` + * and `nextContext`. + * + * Use this as an opportunity to perform preparation before an update occurs. + * + * NOTE: You **cannot** use `this.setState()` in this method. + * + * @param {object} nextProps + * @param {?object} nextState + * @param {?object} nextContext + * @param {ReactReconcileTransaction} transaction + * @optional + */ + componentWillUpdate: 'DEFINE_MANY', + + /** + * Invoked when the component's DOM representation has been updated. + * + * Use this as an opportunity to operate on the DOM when the component has + * been updated. + * + * @param {object} prevProps + * @param {?object} prevState + * @param {?object} prevContext + * @param {DOMElement} rootNode DOM element representing the component. + * @optional + */ + componentDidUpdate: 'DEFINE_MANY', + + /** + * Invoked when the component is about to be removed from its parent and have + * its DOM representation destroyed. + * + * Use this as an opportunity to deallocate any external resources. + * + * NOTE: There is no `componentDidUnmount` since your component will have been + * destroyed by that point. + * + * @optional + */ + componentWillUnmount: 'DEFINE_MANY', + + /** + * Replacement for (deprecated) `componentWillMount`. + * + * @optional + */ + UNSAFE_componentWillMount: 'DEFINE_MANY', + + /** + * Replacement for (deprecated) `componentWillReceiveProps`. + * + * @optional + */ + UNSAFE_componentWillReceiveProps: 'DEFINE_MANY', + + /** + * Replacement for (deprecated) `componentWillUpdate`. + * + * @optional + */ + UNSAFE_componentWillUpdate: 'DEFINE_MANY', + + // ==== Advanced methods ==== + + /** + * Updates the component's currently mounted DOM representation. + * + * By default, this implements React's rendering and reconciliation algorithm. + * Sophisticated clients may wish to override this. + * + * @param {ReactReconcileTransaction} transaction + * @internal + * @overridable + */ + updateComponent: 'OVERRIDE_BASE', + }; + + /** + * Similar to ReactClassInterface but for static methods. + */ + var ReactClassStaticInterface = { + /** + * This method is invoked after a component is instantiated and when it + * receives new props. Return an object to update state in response to + * prop changes. Return null to indicate no change to state. + * + * If an object is returned, its keys will be merged into the existing state. + * + * @return {object || null} + * @optional + */ + getDerivedStateFromProps: 'DEFINE_MANY_MERGED', + }; + + /** + * Mapping from class specification keys to special processing functions. + * + * Although these are declared like instance properties in the specification + * when defining classes using `React.createClass`, they are actually static + * and are accessible on the constructor instead of the prototype. Despite + * being static, they must be defined outside of the "statics" key under + * which all other static methods are defined. + */ + var RESERVED_SPEC_KEYS = { + displayName: function (Constructor, displayName) { + Constructor.displayName = displayName; + }, + mixins: function (Constructor, mixins) { + if (mixins) { + for (var i = 0; i < mixins.length; i++) { + mixSpecIntoComponent(Constructor, mixins[i]); + } + } + }, + childContextTypes: function (Constructor, childContextTypes) { + if (true) { + validateTypeDef(Constructor, childContextTypes, 'childContext'); + } + Constructor.childContextTypes = _assign({}, Constructor.childContextTypes, childContextTypes); + }, + contextTypes: function (Constructor, contextTypes) { + if (true) { + validateTypeDef(Constructor, contextTypes, 'context'); + } + Constructor.contextTypes = _assign({}, Constructor.contextTypes, contextTypes); + }, + /** + * Special case getDefaultProps which should move into statics but requires + * automatic merging. + */ + getDefaultProps: function (Constructor, getDefaultProps) { + if (Constructor.getDefaultProps) { + Constructor.getDefaultProps = createMergedResultFunction( + Constructor.getDefaultProps, + getDefaultProps, + ); + } else { + Constructor.getDefaultProps = getDefaultProps; + } + }, + propTypes: function (Constructor, propTypes) { + if (true) { + validateTypeDef(Constructor, propTypes, 'prop'); + } + Constructor.propTypes = _assign({}, Constructor.propTypes, propTypes); + }, + statics: function (Constructor, statics) { + mixStaticSpecIntoComponent(Constructor, statics); + }, + autobind: function () {}, + }; + + function validateTypeDef(Constructor, typeDef, location) { + for (var propName in typeDef) { + if (typeDef.hasOwnProperty(propName)) { + // use a warning instead of an _invariant so components + // don't show up in prod but only in __DEV__ + if (true) { + warning( + typeof typeDef[propName] === 'function', + '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', + Constructor.displayName || 'ReactClass', + ReactPropTypeLocationNames[location], + propName, + ); + } + } + } + } + + function validateMethodOverride(isAlreadyDefined, name) { + var specPolicy = ReactClassInterface.hasOwnProperty(name) ? ReactClassInterface[name] : null; + + // Disallow overriding of base class methods unless explicitly allowed. + if (ReactClassMixin.hasOwnProperty(name)) { + _invariant( + specPolicy === 'OVERRIDE_BASE', + 'ReactClassInterface: You are attempting to override ' + + '`%s` from your class specification. Ensure that your method names ' + + 'do not overlap with React methods.', + name, + ); + } + + // Disallow defining methods more than once unless explicitly allowed. + if (isAlreadyDefined) { + _invariant( + specPolicy === 'DEFINE_MANY' || specPolicy === 'DEFINE_MANY_MERGED', + 'ReactClassInterface: You are attempting to define ' + + '`%s` on your component more than once. This conflict may be due ' + + 'to a mixin.', + name, + ); + } + } + + /** + * Mixin helper which handles policy validation and reserved + * specification keys when building React classes. + */ + function mixSpecIntoComponent(Constructor, spec) { + if (!spec) { + if (true) { + var typeofSpec = typeof spec; + var isMixinValid = typeofSpec === 'object' && spec !== null; + + if (true) { + warning( + isMixinValid, + "%s: You're attempting to include a mixin that is either null " + + 'or not an object. Check the mixins included by the component, ' + + 'as well as any mixins they include themselves. ' + + 'Expected object but got %s.', + Constructor.displayName || 'ReactClass', + spec === null ? null : typeofSpec, + ); + } + } + + return; + } + + _invariant( + typeof spec !== 'function', + "ReactClass: You're attempting to " + + 'use a component class or function as a mixin. Instead, just use a ' + + 'regular object.', + ); + _invariant( + !isValidElement(spec), + "ReactClass: You're attempting to " + + 'use a component as a mixin. Instead, just use a regular object.', + ); + + var proto = Constructor.prototype; + var autoBindPairs = proto.__reactAutoBindPairs; + + // By handling mixins before any other properties, we ensure the same + // chaining order is applied to methods with DEFINE_MANY policy, whether + // mixins are listed before or after these methods in the spec. + if (spec.hasOwnProperty(MIXINS_KEY)) { + RESERVED_SPEC_KEYS.mixins(Constructor, spec.mixins); + } + + for (var name in spec) { + if (!spec.hasOwnProperty(name)) { + continue; + } + + if (name === MIXINS_KEY) { + // We have already handled mixins in a special case above. + continue; + } + + var property = spec[name]; + var isAlreadyDefined = proto.hasOwnProperty(name); + validateMethodOverride(isAlreadyDefined, name); + + if (RESERVED_SPEC_KEYS.hasOwnProperty(name)) { + RESERVED_SPEC_KEYS[name](Constructor, property); + } else { + // Setup methods on prototype: + // The following member methods should not be automatically bound: + // 1. Expected ReactClass methods (in the "interface"). + // 2. Overridden methods (that were mixed in). + var isReactClassMethod = ReactClassInterface.hasOwnProperty(name); + var isFunction = typeof property === 'function'; + var shouldAutoBind = + isFunction && !isReactClassMethod && !isAlreadyDefined && spec.autobind !== false; + + if (shouldAutoBind) { + autoBindPairs.push(name, property); + proto[name] = property; + } else { + if (isAlreadyDefined) { + var specPolicy = ReactClassInterface[name]; + + // These cases should already be caught by validateMethodOverride. + _invariant( + isReactClassMethod && + (specPolicy === 'DEFINE_MANY_MERGED' || specPolicy === 'DEFINE_MANY'), + 'ReactClass: Unexpected spec policy %s for key %s ' + 'when mixing in component specs.', + specPolicy, + name, + ); + + // For methods which are defined more than once, call the existing + // methods before calling the new property, merging if appropriate. + if (specPolicy === 'DEFINE_MANY_MERGED') { + proto[name] = createMergedResultFunction(proto[name], property); + } else if (specPolicy === 'DEFINE_MANY') { + proto[name] = createChainedFunction(proto[name], property); + } + } else { + proto[name] = property; + if (true) { + // Add verbose displayName to the function, which helps when looking + // at profiling tools. + if (typeof property === 'function' && spec.displayName) { + proto[name].displayName = spec.displayName + '_' + name; + } + } + } + } + } + } + } + + function mixStaticSpecIntoComponent(Constructor, statics) { + if (!statics) { + return; + } + + for (var name in statics) { + var property = statics[name]; + if (!statics.hasOwnProperty(name)) { + continue; + } + + var isReserved = name in RESERVED_SPEC_KEYS; + _invariant( + !isReserved, + 'ReactClass: You are attempting to define a reserved ' + + 'property, `%s`, that shouldn\'t be on the "statics" key. Define it ' + + 'as an instance property instead; it will still be accessible on the ' + + 'constructor.', + name, + ); + + var isAlreadyDefined = name in Constructor; + if (isAlreadyDefined) { + var specPolicy = ReactClassStaticInterface.hasOwnProperty(name) + ? ReactClassStaticInterface[name] + : null; + + _invariant( + specPolicy === 'DEFINE_MANY_MERGED', + 'ReactClass: You are attempting to define ' + + '`%s` on your component more than once. This conflict may be ' + + 'due to a mixin.', + name, + ); + + Constructor[name] = createMergedResultFunction(Constructor[name], property); + + return; + } + + Constructor[name] = property; + } + } + + /** + * Merge two objects, but throw if both contain the same key. + * + * @param {object} one The first object, which is mutated. + * @param {object} two The second object + * @return {object} one after it has been mutated to contain everything in two. + */ + function mergeIntoWithNoDuplicateKeys(one, two) { + _invariant( + one && two && typeof one === 'object' && typeof two === 'object', + 'mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.', + ); + + for (var key in two) { + if (two.hasOwnProperty(key)) { + _invariant( + one[key] === undefined, + 'mergeIntoWithNoDuplicateKeys(): ' + + 'Tried to merge two objects with the same key: `%s`. This conflict ' + + 'may be due to a mixin; in particular, this may be caused by two ' + + 'getInitialState() or getDefaultProps() methods returning objects ' + + 'with clashing keys.', + key, + ); + one[key] = two[key]; + } + } + return one; + } + + /** + * Creates a function that invokes two functions and merges their return values. + * + * @param {function} one Function to invoke first. + * @param {function} two Function to invoke second. + * @return {function} Function that invokes the two argument functions. + * @private + */ + function createMergedResultFunction(one, two) { + return function mergedResult() { + var a = one.apply(this, arguments); + var b = two.apply(this, arguments); + if (a == null) { + return b; + } else if (b == null) { + return a; + } + var c = {}; + mergeIntoWithNoDuplicateKeys(c, a); + mergeIntoWithNoDuplicateKeys(c, b); + return c; + }; + } + + /** + * Creates a function that invokes two functions and ignores their return vales. + * + * @param {function} one Function to invoke first. + * @param {function} two Function to invoke second. + * @return {function} Function that invokes the two argument functions. + * @private + */ + function createChainedFunction(one, two) { + return function chainedFunction() { + one.apply(this, arguments); + two.apply(this, arguments); + }; + } + + /** + * Binds a method to the component. + * + * @param {object} component Component whose method is going to be bound. + * @param {function} method Method to be bound. + * @return {function} The bound method. + */ + function bindAutoBindMethod(component, method) { + var boundMethod = method.bind(component); + if (true) { + boundMethod.__reactBoundContext = component; + boundMethod.__reactBoundMethod = method; + boundMethod.__reactBoundArguments = null; + var componentName = component.constructor.displayName; + var _bind = boundMethod.bind; + boundMethod.bind = function (newThis) { + for ( + var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; + _key < _len; + _key++ + ) { + args[_key - 1] = arguments[_key]; + } + + // User is trying to bind() an autobound method; we effectively will + // ignore the value of "this" that the user is trying to use, so + // let's warn. + if (newThis !== component && newThis !== null) { + if (true) { + warning( + false, + 'bind(): React component methods may only be bound to the ' + + 'component instance. See %s', + componentName, + ); + } + } else if (!args.length) { + if (true) { + warning( + false, + 'bind(): You are binding a component method to the component. ' + + 'React does this for you automatically in a high-performance ' + + 'way, so you can safely remove this call. See %s', + componentName, + ); + } + return boundMethod; + } + var reboundMethod = _bind.apply(boundMethod, arguments); + reboundMethod.__reactBoundContext = component; + reboundMethod.__reactBoundMethod = method; + reboundMethod.__reactBoundArguments = args; + return reboundMethod; + }; + } + return boundMethod; + } + + /** + * Binds all auto-bound methods in a component. + * + * @param {object} component Component whose method is going to be bound. + */ + function bindAutoBindMethods(component) { + var pairs = component.__reactAutoBindPairs; + for (var i = 0; i < pairs.length; i += 2) { + var autoBindKey = pairs[i]; + var method = pairs[i + 1]; + component[autoBindKey] = bindAutoBindMethod(component, method); + } + } + + var IsMountedPreMixin = { + componentDidMount: function () { + this.__isMounted = true; + }, + }; + + var IsMountedPostMixin = { + componentWillUnmount: function () { + this.__isMounted = false; + }, + }; + + /** + * Add more to the ReactClass base class. These are all legacy features and + * therefore not already part of the modern ReactComponent. + */ + var ReactClassMixin = { + /** + * TODO: This will be deprecated because state should always keep a consistent + * type signature and the only use case for this, is to avoid that. + */ + replaceState: function (newState, callback) { + this.updater.enqueueReplaceState(this, newState, callback); + }, + + /** + * Checks whether or not this composite component is mounted. + * @return {boolean} True if mounted, false otherwise. + * @protected + * @final + */ + isMounted: function () { + if (true) { + warning( + this.__didWarnIsMounted, + '%s: isMounted is deprecated. Instead, make sure to clean up ' + + 'subscriptions and pending requests in componentWillUnmount to ' + + 'prevent memory leaks.', + (this.constructor && this.constructor.displayName) || this.name || 'Component', + ); + this.__didWarnIsMounted = true; + } + return !!this.__isMounted; + }, + }; + + var ReactClassComponent = function () {}; + _assign(ReactClassComponent.prototype, ReactComponent.prototype, ReactClassMixin); + + /** + * Creates a composite component class given a class specification. + * See https://facebook.github.io/react/docs/top-level-api.html#react.createclass + * + * @param {object} spec Class specification (which must define `render`). + * @return {function} Component constructor function. + * @public + */ + function createClass(spec) { + // To keep our warnings more understandable, we'll use a little hack here to + // ensure that Constructor.name !== 'Constructor'. This makes sure we don't + // unnecessarily identify a class without displayName as 'Constructor'. + var Constructor = identity(function (props, context, updater) { + // This constructor gets overridden by mocks. The argument is used + // by mocks to assert on what gets mounted. + + if (true) { + warning( + this instanceof Constructor, + 'Something is calling a React component directly. Use a factory or ' + + 'JSX instead. See: https://fb.me/react-legacyfactory', + ); + } + + // Wire up auto-binding + if (this.__reactAutoBindPairs.length) { + bindAutoBindMethods(this); + } + + this.props = props; + this.context = context; + this.refs = emptyObject; + this.updater = updater || ReactNoopUpdateQueue; + + this.state = null; + + // ReactClasses doesn't have constructors. Instead, they use the + // getInitialState and componentWillMount methods for initialization. + + var initialState = this.getInitialState ? this.getInitialState() : null; + if (true) { + // We allow auto-mocks to proceed as if they're returning null. + if (initialState === undefined && this.getInitialState._isMockFunction) { + // This is probably bad practice. Consider warning here and + // deprecating this convenience. + initialState = null; + } + } + _invariant( + typeof initialState === 'object' && !Array.isArray(initialState), + '%s.getInitialState(): must return an object or null', + Constructor.displayName || 'ReactCompositeComponent', + ); + + this.state = initialState; + }); + Constructor.prototype = new ReactClassComponent(); + Constructor.prototype.constructor = Constructor; + Constructor.prototype.__reactAutoBindPairs = []; + + injectedMixins.forEach(mixSpecIntoComponent.bind(null, Constructor)); + + mixSpecIntoComponent(Constructor, IsMountedPreMixin); + mixSpecIntoComponent(Constructor, spec); + mixSpecIntoComponent(Constructor, IsMountedPostMixin); + + // Initialize the defaultProps property after all mixins have been merged. + if (Constructor.getDefaultProps) { + Constructor.defaultProps = Constructor.getDefaultProps(); + } + + if (true) { + // This is a tag to indicate that the use of these method names is ok, + // since it's used with createClass. If it's not, then it's likely a + // mistake so we'll warn you to use the static property, property + // initializer or constructor respectively. + if (Constructor.getDefaultProps) { + Constructor.getDefaultProps.isReactClassApproved = {}; + } + if (Constructor.prototype.getInitialState) { + Constructor.prototype.getInitialState.isReactClassApproved = {}; + } + } + + _invariant( + Constructor.prototype.render, + 'createClass(...): Class specification must implement a `render` method.', + ); + + if (true) { + warning( + !Constructor.prototype.componentShouldUpdate, + '%s has a method called ' + + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + + 'The name is phrased as a question because the function is ' + + 'expected to return a value.', + spec.displayName || 'A component', + ); + warning( + !Constructor.prototype.componentWillRecieveProps, + '%s has a method called ' + + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', + spec.displayName || 'A component', + ); + warning( + !Constructor.prototype.UNSAFE_componentWillRecieveProps, + '%s has a method called UNSAFE_componentWillRecieveProps(). ' + + 'Did you mean UNSAFE_componentWillReceiveProps()?', + spec.displayName || 'A component', + ); + } + + // Reduce time spent doing lookups by setting these on the prototype. + for (var methodName in ReactClassInterface) { + if (!Constructor.prototype[methodName]) { + Constructor.prototype[methodName] = null; + } + } + + return Constructor; + } + + return createClass; + } + + module.exports = factory; + + /***/ + }, + /* 547 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + */ + + var emptyObject = {}; + + if (true) { + Object.freeze(emptyObject); + } + + module.exports = emptyObject; + + /***/ + }, + /* 548 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + */ + + /** + * Use invariant() to assert state which your program assumes to be true. + * + * Provide sprintf-style format (only %s is supported) and arguments + * to provide information about what broke and what you were + * expecting. + * + * The invariant message will be stripped in production, but the invariant + * will remain to ensure logic does not differ in production. + */ + + var validateFormat = function validateFormat(format) {}; + + if (true) { + validateFormat = function validateFormat(format) { + if (format === undefined) { + throw new Error('invariant requires an error message argument'); + } + }; + } + + function invariant(condition, format, a, b, c, d, e, f) { + validateFormat(format); + + if (!condition) { + var error; + if (format === undefined) { + error = new Error( + 'Minified exception occurred; use the non-minified dev environment ' + + 'for the full error message and additional helpful warnings.', + ); + } else { + var args = [a, b, c, d, e, f]; + var argIndex = 0; + error = new Error( + format.replace(/%s/g, function () { + return args[argIndex++]; + }), + ); + error.name = 'Invariant Violation'; + } + + error.framesToPop = 1; // we don't care about invariant's own frame + throw error; + } + } + + module.exports = invariant; + + /***/ + }, + /* 549 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright (c) 2014-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + */ + + var emptyFunction = __webpack_require__(550); + + /** + * Similar to invariant but only logs a warning if the condition is not met. + * This can be used to log issues in development environments in critical + * paths. Removing the logging code for production environments will keep the + * same logic and follow the same code paths. + */ + + var warning = emptyFunction; + + if (true) { + var printWarning = function printWarning(format) { + for ( + var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; + _key < _len; + _key++ + ) { + args[_key - 1] = arguments[_key]; + } + + var argIndex = 0; + var message = + 'Warning: ' + + format.replace(/%s/g, function () { + return args[argIndex++]; + }); + if (typeof console !== 'undefined') { + console.error(message); + } + try { + // --- Welcome to debugging React --- + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + throw new Error(message); + } catch (x) {} + }; + + warning = function warning(condition, format) { + if (format === undefined) { + throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument'); + } + + if (format.indexOf('Failed Composite propType: ') === 0) { + return; // Ignore CompositeComponent proptype check. + } + + if (!condition) { + for ( + var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; + _key2 < _len2; + _key2++ + ) { + args[_key2 - 2] = arguments[_key2]; + } + + printWarning.apply(undefined, [format].concat(args)); + } + }; + } + + module.exports = warning; + + /***/ + }, + /* 550 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + /** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * + */ + + function makeEmptyFunction(arg) { + return function () { + return arg; + }; + } + + /** + * This function accepts and discards inputs; it has no side effects. This is + * primarily useful idiomatically for overridable function endpoints which + * always need to be callable, since JS lacks a null-call idiom ala Cocoa. + */ + var emptyFunction = function emptyFunction() {}; + + emptyFunction.thatReturns = makeEmptyFunction; + emptyFunction.thatReturnsFalse = makeEmptyFunction(false); + emptyFunction.thatReturnsTrue = makeEmptyFunction(true); + emptyFunction.thatReturnsNull = makeEmptyFunction(null); + emptyFunction.thatReturnsThis = function () { + return this; + }; + emptyFunction.thatReturnsArgument = function (arg) { + return arg; + }; + + module.exports = emptyFunction; + + /***/ + }, + /* 551 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + /* eslint-disable no-unused-vars */ + + // Example of logging and throw error handling + + var HelloWorldWithLogAndThrow = function HelloWorldWithLogAndThrow(props, context) { + /* eslint-disable no-console */ + console.log('console.log in HelloWorld'); + console.warn('console.warn in HelloWorld'); + console.error('console.error in HelloWorld'); + throw new Error('throw in HelloWorldWithLogAndThrow'); + }; + + var _default = HelloWorldWithLogAndThrow; + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + HelloWorldWithLogAndThrow, + 'HelloWorldWithLogAndThrow', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/HelloWorldWithLogAndThrow.jsx', + ); + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/HelloWorldWithLogAndThrow.jsx', + ); + })(); + + /***/ + }, + /* 552 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__components_HelloWorld__ = + __webpack_require__(161); + // Top level component for simple client side only rendering + + /* + * Export a function that takes the props and returns a ReactComponent. + * This is used for the client rendering hook after the page html is rendered. + * React will see that the state is the same and not do anything. + * Note, this is imported as "HelloWorldApp" by "clientRegistration.jsx" + * + * Note, this is a fictional example, as you'd only use a generator function if you wanted to run + * some extra code, such as setting up Redux and React-Router. + */ + + var _default = function _default(props) { + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_1__components_HelloWorld__['a' /* default */], + props, + ); + }; + + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/startup/HelloWorldApp.jsx', + ); + })(); + + /***/ + }, + /* 553 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + // Top level component for simple client side only rendering + + /* + * Just an example of what can go wrong while coding. No import. Whoops! + */ + + var _default = function _default(props) { + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(HelloWorld, props); + }; + + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/startup/BrokenApp.jsx', + ); + })(); + + /***/ + }, + /* 554 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_redux__ = __webpack_require__(109); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_redux__ = __webpack_require__(162); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_redux_thunk__ = __webpack_require__(249); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__reducers_reducersIndex__ = + __webpack_require__(250); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__store_composeInitialState__ = + __webpack_require__(583); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__components_HelloWorldContainer__ = + __webpack_require__(252); + // This is loaded by execJs and Rails to generate the HTML used for server rendering. + // Compare this file to ./ClientApp.jsx + // This module should export one default method that take props and returns the react component to + // render. + + // Uses the index + + /* + * Export a function that takes the props and returns a ReactComponent. + * This is used for the server rendering. + * In the client, React will see that the state is the same and not do anything. + */ + + var _default = function _default(props, railsContext) { + var combinedReducer = Object(__WEBPACK_IMPORTED_MODULE_1_redux__['c' /* combineReducers */])( + __WEBPACK_IMPORTED_MODULE_4__reducers_reducersIndex__['a' /* default */], + ); + var combinedProps = Object( + __WEBPACK_IMPORTED_MODULE_5__store_composeInitialState__['a' /* default */], + )(props, railsContext); + + // This is where we'll put in the middleware for the async function. Placeholder. + // store will have helloWorldData as a top level property + var store = Object(__WEBPACK_IMPORTED_MODULE_1_redux__['a' /* applyMiddleware */])( + __WEBPACK_IMPORTED_MODULE_3_redux_thunk__['a' /* default */], + )(__WEBPACK_IMPORTED_MODULE_1_redux__['d' /* createStore */])(combinedReducer, combinedProps); + + // Provider uses the this.props.children, so we're not typical React syntax. + // This allows redux to add additional props to the HelloWorldContainer. + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_2_react_redux__['a' /* Provider */], + { store: store }, + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_6__components_HelloWorldContainer__['a' /* default */], + null, + ), + ); + }; + + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/startup/ServerReduxApp.jsx', + ); + })(); + + /***/ + }, + /* 555 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Symbol_js__ = __webpack_require__(241); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getRawTag_js__ = __webpack_require__(558); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__objectToString_js__ = __webpack_require__(559); + + /** `Object#toString` result references. */ + var nullTag = '[object Null]', + undefinedTag = '[object Undefined]'; + + /** Built-in value references. */ + var symToStringTag = __WEBPACK_IMPORTED_MODULE_0__Symbol_js__['a' /* default */] + ? __WEBPACK_IMPORTED_MODULE_0__Symbol_js__['a' /* default */].toStringTag + : undefined; + + /** + * The base implementation of `getTag` without fallbacks for buggy environments. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ + function baseGetTag(value) { + if (value == null) { + return value === undefined ? undefinedTag : nullTag; + } + return symToStringTag && symToStringTag in Object(value) + ? Object(__WEBPACK_IMPORTED_MODULE_1__getRawTag_js__['a' /* default */])(value) + : Object(__WEBPACK_IMPORTED_MODULE_2__objectToString_js__['a' /* default */])(value); + } + + /* harmony default export */ __webpack_exports__['a'] = baseGetTag; + + /***/ + }, + /* 556 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__freeGlobal_js__ = __webpack_require__(557); + + /** Detect free variable `self`. */ + var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + + /** Used as a reference to the global object. */ + var root = + __WEBPACK_IMPORTED_MODULE_0__freeGlobal_js__['a' /* default */] || + freeSelf || + Function('return this')(); + + /* harmony default export */ __webpack_exports__['a'] = root; + + /***/ + }, + /* 557 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /** Detect free variable `global` from Node.js. */ + var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + + /* harmony default export */ __webpack_exports__['a'] = freeGlobal; + + /***/ + }, + /* 558 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Symbol_js__ = __webpack_require__(241); + + /** Used for built-in method references. */ + var objectProto = Object.prototype; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ + var nativeObjectToString = objectProto.toString; + + /** Built-in value references. */ + var symToStringTag = __WEBPACK_IMPORTED_MODULE_0__Symbol_js__['a' /* default */] + ? __WEBPACK_IMPORTED_MODULE_0__Symbol_js__['a' /* default */].toStringTag + : undefined; + + /** + * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the raw `toStringTag`. + */ + function getRawTag(value) { + var isOwn = hasOwnProperty.call(value, symToStringTag), + tag = value[symToStringTag]; + + try { + value[symToStringTag] = undefined; + var unmasked = true; + } catch (e) {} + + var result = nativeObjectToString.call(value); + if (unmasked) { + if (isOwn) { + value[symToStringTag] = tag; + } else { + delete value[symToStringTag]; + } + } + return result; + } + + /* harmony default export */ __webpack_exports__['a'] = getRawTag; + + /***/ + }, + /* 559 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /** Used for built-in method references. */ + var objectProto = Object.prototype; + + /** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ + var nativeObjectToString = objectProto.toString; + + /** + * Converts `value` to a string using `Object.prototype.toString`. + * + * @private + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + */ + function objectToString(value) { + return nativeObjectToString.call(value); + } + + /* harmony default export */ __webpack_exports__['a'] = objectToString; + + /***/ + }, + /* 560 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__overArg_js__ = __webpack_require__(561); + + /** Built-in value references. */ + var getPrototype = Object(__WEBPACK_IMPORTED_MODULE_0__overArg_js__['a' /* default */])( + Object.getPrototypeOf, + Object, + ); + + /* harmony default export */ __webpack_exports__['a'] = getPrototype; + + /***/ + }, + /* 561 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ + function overArg(func, transform) { + return function (arg) { + return func(transform(arg)); + }; + } + + /* harmony default export */ __webpack_exports__['a'] = overArg; + + /***/ + }, + /* 562 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ + function isObjectLike(value) { + return value != null && typeof value == 'object'; + } + + /* harmony default export */ __webpack_exports__['a'] = isObjectLike; + + /***/ + }, + /* 563 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (module) { + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__ponyfill_js__ = __webpack_require__(565); + /* global window */ + + var root; + + if (typeof self !== 'undefined') { + root = self; + } else if (typeof window !== 'undefined') { + root = window; + } else if (typeof global !== 'undefined') { + root = global; + } else if (true) { + root = module; + } else { + root = Function('return this')(); + } + + var result = Object(__WEBPACK_IMPORTED_MODULE_0__ponyfill_js__['a' /* default */])(root); + /* harmony default export */ __webpack_exports__['a'] = result; + + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(564)(module)); + + /***/ + }, + /* 564 */ + /***/ function (module, exports) { + module.exports = function (originalModule) { + if (!originalModule.webpackPolyfill) { + var module = Object.create(originalModule); + // module.parent = undefined by default + if (!module.children) module.children = []; + Object.defineProperty(module, 'loaded', { + enumerable: true, + get: function () { + return module.l; + }, + }); + Object.defineProperty(module, 'id', { + enumerable: true, + get: function () { + return module.i; + }, + }); + Object.defineProperty(module, 'exports', { + enumerable: true, + }); + module.webpackPolyfill = 1; + } + return module; + }; + + /***/ + }, + /* 565 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = symbolObservablePonyfill; + function symbolObservablePonyfill(root) { + var result; + var Symbol = root.Symbol; + + if (typeof Symbol === 'function') { + if (Symbol.observable) { + result = Symbol.observable; + } else { + result = Symbol('observable'); + Symbol.observable = result; + } + } else { + result = '@@observable'; + } + + return result; + } + + /***/ + }, + /* 566 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = combineReducers; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createStore__ = __webpack_require__(239); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_es_isPlainObject__ = + __webpack_require__(240); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_warning__ = __webpack_require__(242); + + function getUndefinedStateErrorMessage(key, action) { + var actionType = action && action.type; + var actionName = (actionType && '"' + actionType.toString() + '"') || 'an action'; + + return ( + 'Given action ' + + actionName + + ', reducer "' + + key + + '" returned undefined. ' + + 'To ignore an action, you must explicitly return the previous state. ' + + 'If you want this reducer to hold no value, you can return null instead of undefined.' + ); + } + + function getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) { + var reducerKeys = Object.keys(reducers); + var argumentName = + action && action.type === __WEBPACK_IMPORTED_MODULE_0__createStore__['a' /* ActionTypes */].INIT + ? 'preloadedState argument passed to createStore' + : 'previous state received by the reducer'; + + if (reducerKeys.length === 0) { + return ( + 'Store does not have a valid reducer. Make sure the argument passed ' + + 'to combineReducers is an object whose values are reducers.' + ); + } + + if (!Object(__WEBPACK_IMPORTED_MODULE_1_lodash_es_isPlainObject__['a' /* default */])(inputState)) { + return ( + 'The ' + + argumentName + + ' has unexpected type of "' + + {}.toString.call(inputState).match(/\s([a-z|A-Z]+)/)[1] + + '". Expected argument to be an object with the following ' + + ('keys: "' + reducerKeys.join('", "') + '"') + ); + } + + var unexpectedKeys = Object.keys(inputState).filter(function (key) { + return !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key]; + }); + + unexpectedKeys.forEach(function (key) { + unexpectedKeyCache[key] = true; + }); + + if (unexpectedKeys.length > 0) { + return ( + 'Unexpected ' + + (unexpectedKeys.length > 1 ? 'keys' : 'key') + + ' ' + + ('"' + unexpectedKeys.join('", "') + '" found in ' + argumentName + '. ') + + 'Expected to find one of the known reducer keys instead: ' + + ('"' + reducerKeys.join('", "') + '". Unexpected keys will be ignored.') + ); + } + } + + function assertReducerShape(reducers) { + Object.keys(reducers).forEach(function (key) { + var reducer = reducers[key]; + var initialState = reducer(undefined, { + type: __WEBPACK_IMPORTED_MODULE_0__createStore__['a' /* ActionTypes */].INIT, + }); + + if (typeof initialState === 'undefined') { + throw new Error( + 'Reducer "' + + key + + '" returned undefined during initialization. ' + + 'If the state passed to the reducer is undefined, you must ' + + 'explicitly return the initial state. The initial state may ' + + "not be undefined. If you don't want to set a value for this reducer, " + + 'you can use null instead of undefined.', + ); + } + + var type = + '@@redux/PROBE_UNKNOWN_ACTION_' + Math.random().toString(36).substring(7).split('').join('.'); + if (typeof reducer(undefined, { type: type }) === 'undefined') { + throw new Error( + 'Reducer "' + + key + + '" returned undefined when probed with a random type. ' + + ("Don't try to handle " + + __WEBPACK_IMPORTED_MODULE_0__createStore__['a' /* ActionTypes */].INIT + + ' or other actions in "redux/*" ') + + 'namespace. They are considered private. Instead, you must return the ' + + 'current state for any unknown actions, unless it is undefined, ' + + 'in which case you must return the initial state, regardless of the ' + + 'action type. The initial state may not be undefined, but can be null.', + ); + } + }); + } + + /** + * Turns an object whose values are different reducer functions, into a single + * reducer function. It will call every child reducer, and gather their results + * into a single state object, whose keys correspond to the keys of the passed + * reducer functions. + * + * @param {Object} reducers An object whose values correspond to different + * reducer functions that need to be combined into one. One handy way to obtain + * it is to use ES6 `import * as reducers` syntax. The reducers may never return + * undefined for any action. Instead, they should return their initial state + * if the state passed to them was undefined, and the current state for any + * unrecognized action. + * + * @returns {Function} A reducer function that invokes every reducer inside the + * passed object, and builds a state object with the same shape. + */ + function combineReducers(reducers) { + var reducerKeys = Object.keys(reducers); + var finalReducers = {}; + for (var i = 0; i < reducerKeys.length; i++) { + var key = reducerKeys[i]; + + if (true) { + if (typeof reducers[key] === 'undefined') { + Object(__WEBPACK_IMPORTED_MODULE_2__utils_warning__['a' /* default */])( + 'No reducer provided for key "' + key + '"', + ); + } + } + + if (typeof reducers[key] === 'function') { + finalReducers[key] = reducers[key]; + } + } + var finalReducerKeys = Object.keys(finalReducers); + + var unexpectedKeyCache = void 0; + if (true) { + unexpectedKeyCache = {}; + } + + var shapeAssertionError = void 0; + try { + assertReducerShape(finalReducers); + } catch (e) { + shapeAssertionError = e; + } + + return function combination() { + var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + var action = arguments[1]; + + if (shapeAssertionError) { + throw shapeAssertionError; + } + + if (true) { + var warningMessage = getUnexpectedStateShapeWarningMessage( + state, + finalReducers, + action, + unexpectedKeyCache, + ); + if (warningMessage) { + Object(__WEBPACK_IMPORTED_MODULE_2__utils_warning__['a' /* default */])(warningMessage); + } + } + + var hasChanged = false; + var nextState = {}; + for (var _i = 0; _i < finalReducerKeys.length; _i++) { + var _key = finalReducerKeys[_i]; + var reducer = finalReducers[_key]; + var previousStateForKey = state[_key]; + var nextStateForKey = reducer(previousStateForKey, action); + if (typeof nextStateForKey === 'undefined') { + var errorMessage = getUndefinedStateErrorMessage(_key, action); + throw new Error(errorMessage); + } + nextState[_key] = nextStateForKey; + hasChanged = hasChanged || nextStateForKey !== previousStateForKey; + } + return hasChanged ? nextState : state; + }; + } + + /***/ + }, + /* 567 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = bindActionCreators; + function bindActionCreator(actionCreator, dispatch) { + return function () { + return dispatch(actionCreator.apply(undefined, arguments)); + }; + } + + /** + * Turns an object whose values are action creators, into an object with the + * same keys, but with every function wrapped into a `dispatch` call so they + * may be invoked directly. This is just a convenience method, as you can call + * `store.dispatch(MyActionCreators.doSomething())` yourself just fine. + * + * For convenience, you can also pass a single function as the first argument, + * and get a function in return. + * + * @param {Function|Object} actionCreators An object whose values are action + * creator functions. One handy way to obtain it is to use ES6 `import * as` + * syntax. You may also pass a single function. + * + * @param {Function} dispatch The `dispatch` function available on your Redux + * store. + * + * @returns {Function|Object} The object mimicking the original object, but with + * every action creator wrapped into the `dispatch` call. If you passed a + * function as `actionCreators`, the return value will also be a single + * function. + */ + function bindActionCreators(actionCreators, dispatch) { + if (typeof actionCreators === 'function') { + return bindActionCreator(actionCreators, dispatch); + } + + if (typeof actionCreators !== 'object' || actionCreators === null) { + throw new Error( + 'bindActionCreators expected an object or a function, instead received ' + + (actionCreators === null ? 'null' : typeof actionCreators) + + '. ' + + 'Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?', + ); + } + + var keys = Object.keys(actionCreators); + var boundActionCreators = {}; + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + var actionCreator = actionCreators[key]; + if (typeof actionCreator === 'function') { + boundActionCreators[key] = bindActionCreator(actionCreator, dispatch); + } + } + return boundActionCreators; + } + + /***/ + }, + /* 568 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = applyMiddleware; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__compose__ = __webpack_require__(243); + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + /** + * Creates a store enhancer that applies middleware to the dispatch method + * of the Redux store. This is handy for a variety of tasks, such as expressing + * asynchronous actions in a concise manner, or logging every action payload. + * + * See `redux-thunk` package as an example of the Redux middleware. + * + * Because middleware is potentially asynchronous, this should be the first + * store enhancer in the composition chain. + * + * Note that each middleware will be given the `dispatch` and `getState` functions + * as named arguments. + * + * @param {...Function} middlewares The middleware chain to be applied. + * @returns {Function} A store enhancer applying the middleware. + */ + function applyMiddleware() { + for (var _len = arguments.length, middlewares = Array(_len), _key = 0; _key < _len; _key++) { + middlewares[_key] = arguments[_key]; + } + + return function (createStore) { + return function (reducer, preloadedState, enhancer) { + var store = createStore(reducer, preloadedState, enhancer); + var _dispatch = store.dispatch; + var chain = []; + + var middlewareAPI = { + getState: store.getState, + dispatch: function dispatch(action) { + return _dispatch(action); + }, + }; + chain = middlewares.map(function (middleware) { + return middleware(middlewareAPI); + }); + _dispatch = __WEBPACK_IMPORTED_MODULE_0__compose__['a' /* default */].apply( + undefined, + chain, + )(store.dispatch); + + return _extends({}, store, { + dispatch: _dispatch, + }); + }; + }; + } + + /***/ + }, + /* 569 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* unused harmony export createProvider */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_inheritsLoose__ = + __webpack_require__(244); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types__ = __webpack_require__(10); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_2_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__utils_PropTypes__ = __webpack_require__(245); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__utils_warning__ = __webpack_require__(163); + + var prefixUnsafeLifecycleMethods = + typeof __WEBPACK_IMPORTED_MODULE_1_react___default.a.forwardRef !== 'undefined'; + var didWarnAboutReceivingStore = false; + + function warnAboutReceivingStore() { + if (didWarnAboutReceivingStore) { + return; + } + + didWarnAboutReceivingStore = true; + Object(__WEBPACK_IMPORTED_MODULE_4__utils_warning__['a' /* default */])( + '<Provider> does not support changing `store` on the fly. ' + + 'It is most likely that you see this error because you updated to ' + + 'Redux 2.x and React Redux 2.x which no longer hot reload reducers ' + + 'automatically. See https://github.com/reduxjs/react-redux/releases/' + + 'tag/v2.0.0 for the migration instructions.', + ); + } + + function createProvider(storeKey) { + var _Provider$childContex; + + if (storeKey === void 0) { + storeKey = 'store'; + } + + var subscriptionKey = storeKey + 'Subscription'; + + var Provider = + /*#__PURE__*/ + (function (_Component) { + Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_inheritsLoose__['a' /* default */])( + Provider, + _Component, + ); + + var _proto = Provider.prototype; + + _proto.getChildContext = function getChildContext() { + var _ref; + + return (_ref = {}), (_ref[storeKey] = this[storeKey]), (_ref[subscriptionKey] = null), _ref; + }; + + function Provider(props, context) { + var _this; + + _this = _Component.call(this, props, context) || this; + _this[storeKey] = props.store; + return _this; + } + + _proto.render = function render() { + return __WEBPACK_IMPORTED_MODULE_1_react__['Children'].only(this.props.children); + }; + + return Provider; + })(__WEBPACK_IMPORTED_MODULE_1_react__['Component']); + + if (true) { + // Use UNSAFE_ event name where supported + var eventName = prefixUnsafeLifecycleMethods + ? 'UNSAFE_componentWillReceiveProps' + : 'componentWillReceiveProps'; + + Provider.prototype[eventName] = function (nextProps) { + if (this[storeKey] !== nextProps.store) { + warnAboutReceivingStore(); + } + }; + } + + Provider.propTypes = { + store: __WEBPACK_IMPORTED_MODULE_3__utils_PropTypes__['a' /* storeShape */].isRequired, + children: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.element.isRequired, + }; + Provider.childContextTypes = + ((_Provider$childContex = {}), + (_Provider$childContex[storeKey] = + __WEBPACK_IMPORTED_MODULE_3__utils_PropTypes__['a' /* storeShape */].isRequired), + (_Provider$childContex[subscriptionKey] = + __WEBPACK_IMPORTED_MODULE_3__utils_PropTypes__['b' /* subscriptionShape */]), + _Provider$childContex); + return Provider; + } + /* harmony default export */ __webpack_exports__['a'] = createProvider(); + + /***/ + }, + /* 570 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = _assertThisInitialized; + function _assertThisInitialized(self) { + if (self === void 0) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return self; + } + + /***/ + }, + /* 571 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var reactIs = __webpack_require__(108); + + /** + * Copyright 2015, Yahoo! Inc. + * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. + */ + var REACT_STATICS = { + childContextTypes: true, + contextType: true, + contextTypes: true, + defaultProps: true, + displayName: true, + getDefaultProps: true, + getDerivedStateFromError: true, + getDerivedStateFromProps: true, + mixins: true, + propTypes: true, + type: true, + }; + var KNOWN_STATICS = { + name: true, + length: true, + prototype: true, + caller: true, + callee: true, + arguments: true, + arity: true, + }; + var FORWARD_REF_STATICS = { + $$typeof: true, + render: true, + defaultProps: true, + displayName: true, + propTypes: true, + }; + var MEMO_STATICS = { + $$typeof: true, + compare: true, + defaultProps: true, + displayName: true, + propTypes: true, + type: true, + }; + var TYPE_STATICS = {}; + TYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS; + TYPE_STATICS[reactIs.Memo] = MEMO_STATICS; + + function getStatics(component) { + // React v16.11 and below + if (reactIs.isMemo(component)) { + return MEMO_STATICS; + } // React v16.12 and above + + return TYPE_STATICS[component['$$typeof']] || REACT_STATICS; + } + + var defineProperty = Object.defineProperty; + var getOwnPropertyNames = Object.getOwnPropertyNames; + var getOwnPropertySymbols = Object.getOwnPropertySymbols; + var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; + var getPrototypeOf = Object.getPrototypeOf; + var objectPrototype = Object.prototype; + function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) { + if (typeof sourceComponent !== 'string') { + // don't hoist over string (html) components + if (objectPrototype) { + var inheritedComponent = getPrototypeOf(sourceComponent); + + if (inheritedComponent && inheritedComponent !== objectPrototype) { + hoistNonReactStatics(targetComponent, inheritedComponent, blacklist); + } + } + + var keys = getOwnPropertyNames(sourceComponent); + + if (getOwnPropertySymbols) { + keys = keys.concat(getOwnPropertySymbols(sourceComponent)); + } + + var targetStatics = getStatics(targetComponent); + var sourceStatics = getStatics(sourceComponent); + + for (var i = 0; i < keys.length; ++i) { + var key = keys[i]; + + if ( + !KNOWN_STATICS[key] && + !(blacklist && blacklist[key]) && + !(sourceStatics && sourceStatics[key]) && + !(targetStatics && targetStatics[key]) + ) { + var descriptor = getOwnPropertyDescriptor(sourceComponent, key); + + try { + // Avoid failures from read-only properties + defineProperty(targetComponent, key, descriptor); + } catch (e) {} + } + } + } + + return targetComponent; + } + + module.exports = hoistNonReactStatics; + + /***/ + }, + /* 572 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'a', function () { + return Subscription; + }); + // encapsulates the subscription logic for connecting a component to the redux store, as + // well as nesting subscriptions of descendant components, so that we can ensure the + // ancestor components re-render before descendants + var CLEARED = null; + var nullListeners = { + notify: function notify() {}, + }; + + function createListenerCollection() { + // the current/next pattern is copied from redux's createStore code. + // TODO: refactor+expose that code to be reusable here? + var current = []; + var next = []; + return { + clear: function clear() { + next = CLEARED; + current = CLEARED; + }, + notify: function notify() { + var listeners = (current = next); + + for (var i = 0; i < listeners.length; i++) { + listeners[i](); + } + }, + get: function get() { + return next; + }, + subscribe: function subscribe(listener) { + var isSubscribed = true; + if (next === current) next = current.slice(); + next.push(listener); + return function unsubscribe() { + if (!isSubscribed || current === CLEARED) return; + isSubscribed = false; + if (next === current) next = current.slice(); + next.splice(next.indexOf(listener), 1); + }; + }, + }; + } + + var Subscription = + /*#__PURE__*/ + (function () { + function Subscription(store, parentSub, onStateChange) { + this.store = store; + this.parentSub = parentSub; + this.onStateChange = onStateChange; + this.unsubscribe = null; + this.listeners = nullListeners; + } + + var _proto = Subscription.prototype; + + _proto.addNestedSub = function addNestedSub(listener) { + this.trySubscribe(); + return this.listeners.subscribe(listener); + }; + + _proto.notifyNestedSubs = function notifyNestedSubs() { + this.listeners.notify(); + }; + + _proto.isSubscribed = function isSubscribed() { + return Boolean(this.unsubscribe); + }; + + _proto.trySubscribe = function trySubscribe() { + if (!this.unsubscribe) { + this.unsubscribe = this.parentSub + ? this.parentSub.addNestedSub(this.onStateChange) + : this.store.subscribe(this.onStateChange); + this.listeners = createListenerCollection(); + } + }; + + _proto.tryUnsubscribe = function tryUnsubscribe() { + if (this.unsubscribe) { + this.unsubscribe(); + this.unsubscribe = null; + this.listeners.clear(); + this.listeners = nullListeners; + } + }; + + return Subscription; + })(); + + /***/ + }, + /* 573 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* unused harmony export createConnect */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_extends__ = + __webpack_require__(164); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_esm_objectWithoutPropertiesLoose__ = + __webpack_require__(165); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__components_connectAdvanced__ = + __webpack_require__(246); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__utils_shallowEqual__ = __webpack_require__(574); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__mapDispatchToProps__ = __webpack_require__(575); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__mapStateToProps__ = __webpack_require__(577); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__mergeProps__ = __webpack_require__(578); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__selectorFactory__ = __webpack_require__(579); + + /* + connect is a facade over connectAdvanced. It turns its args into a compatible + selectorFactory, which has the signature: + + (dispatch, options) => (nextState, nextOwnProps) => nextFinalProps + + connect passes its args to connectAdvanced as options, which will in turn pass them to + selectorFactory each time a Connect component instance is instantiated or hot reloaded. + + selectorFactory returns a final props selector from its mapStateToProps, + mapStateToPropsFactories, mapDispatchToProps, mapDispatchToPropsFactories, mergeProps, + mergePropsFactories, and pure args. + + The resulting final props selector is called by the Connect component instance whenever + it receives new props or store state. + */ + + function match(arg, factories, name) { + for (var i = factories.length - 1; i >= 0; i--) { + var result = factories[i](arg); + if (result) return result; + } + + return function (dispatch, options) { + throw new Error( + 'Invalid value of type ' + + typeof arg + + ' for ' + + name + + ' argument when connecting component ' + + options.wrappedComponentName + + '.', + ); + }; + } + + function strictEqual(a, b) { + return a === b; + } // createConnect with default args builds the 'official' connect behavior. Calling it with + // different options opens up some testing and extensibility scenarios + + function createConnect(_temp) { + var _ref = _temp === void 0 ? {} : _temp, + _ref$connectHOC = _ref.connectHOC, + connectHOC = + _ref$connectHOC === void 0 + ? __WEBPACK_IMPORTED_MODULE_2__components_connectAdvanced__['a' /* default */] + : _ref$connectHOC, + _ref$mapStateToPropsF = _ref.mapStateToPropsFactories, + mapStateToPropsFactories = + _ref$mapStateToPropsF === void 0 + ? __WEBPACK_IMPORTED_MODULE_5__mapStateToProps__['a' /* default */] + : _ref$mapStateToPropsF, + _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories, + mapDispatchToPropsFactories = + _ref$mapDispatchToPro === void 0 + ? __WEBPACK_IMPORTED_MODULE_4__mapDispatchToProps__['a' /* default */] + : _ref$mapDispatchToPro, + _ref$mergePropsFactor = _ref.mergePropsFactories, + mergePropsFactories = + _ref$mergePropsFactor === void 0 + ? __WEBPACK_IMPORTED_MODULE_6__mergeProps__['a' /* default */] + : _ref$mergePropsFactor, + _ref$selectorFactory = _ref.selectorFactory, + selectorFactory = + _ref$selectorFactory === void 0 + ? __WEBPACK_IMPORTED_MODULE_7__selectorFactory__['a' /* default */] + : _ref$selectorFactory; + + return function connect(mapStateToProps, mapDispatchToProps, mergeProps, _ref2) { + if (_ref2 === void 0) { + _ref2 = {}; + } + + var _ref3 = _ref2, + _ref3$pure = _ref3.pure, + pure = _ref3$pure === void 0 ? true : _ref3$pure, + _ref3$areStatesEqual = _ref3.areStatesEqual, + areStatesEqual = _ref3$areStatesEqual === void 0 ? strictEqual : _ref3$areStatesEqual, + _ref3$areOwnPropsEqua = _ref3.areOwnPropsEqual, + areOwnPropsEqual = + _ref3$areOwnPropsEqua === void 0 + ? __WEBPACK_IMPORTED_MODULE_3__utils_shallowEqual__['a' /* default */] + : _ref3$areOwnPropsEqua, + _ref3$areStatePropsEq = _ref3.areStatePropsEqual, + areStatePropsEqual = + _ref3$areStatePropsEq === void 0 + ? __WEBPACK_IMPORTED_MODULE_3__utils_shallowEqual__['a' /* default */] + : _ref3$areStatePropsEq, + _ref3$areMergedPropsE = _ref3.areMergedPropsEqual, + areMergedPropsEqual = + _ref3$areMergedPropsE === void 0 + ? __WEBPACK_IMPORTED_MODULE_3__utils_shallowEqual__['a' /* default */] + : _ref3$areMergedPropsE, + extraOptions = Object( + __WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_esm_objectWithoutPropertiesLoose__[ + 'a' /* default */ + ], + )(_ref3, [ + 'pure', + 'areStatesEqual', + 'areOwnPropsEqual', + 'areStatePropsEqual', + 'areMergedPropsEqual', + ]); + + var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps'); + var initMapDispatchToProps = match( + mapDispatchToProps, + mapDispatchToPropsFactories, + 'mapDispatchToProps', + ); + var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps'); + return connectHOC( + selectorFactory, + Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_extends__['a' /* default */])( + { + // used in error messages + methodName: 'connect', + // used to compute Connect's displayName from the wrapped component's displayName. + getDisplayName: function getDisplayName(name) { + return 'Connect(' + name + ')'; + }, + // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes + shouldHandleStateChanges: Boolean(mapStateToProps), + // passed through to selectorFactory + initMapStateToProps: initMapStateToProps, + initMapDispatchToProps: initMapDispatchToProps, + initMergeProps: initMergeProps, + pure: pure, + areStatesEqual: areStatesEqual, + areOwnPropsEqual: areOwnPropsEqual, + areStatePropsEqual: areStatePropsEqual, + areMergedPropsEqual: areMergedPropsEqual, + }, + extraOptions, + ), + ); + }; + } + /* harmony default export */ __webpack_exports__['a'] = createConnect(); + + /***/ + }, + /* 574 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = shallowEqual; + var hasOwn = Object.prototype.hasOwnProperty; + + function is(x, y) { + if (x === y) { + return x !== 0 || y !== 0 || 1 / x === 1 / y; + } else { + return x !== x && y !== y; + } + } + + function shallowEqual(objA, objB) { + if (is(objA, objB)) return true; + + if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) { + return false; + } + + var keysA = Object.keys(objA); + var keysB = Object.keys(objB); + if (keysA.length !== keysB.length) return false; + + for (var i = 0; i < keysA.length; i++) { + if (!hasOwn.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) { + return false; + } + } + + return true; + } + + /***/ + }, + /* 575 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* unused harmony export whenMapDispatchToPropsIsFunction */ + /* unused harmony export whenMapDispatchToPropsIsMissing */ + /* unused harmony export whenMapDispatchToPropsIsObject */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_redux__ = __webpack_require__(109); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__wrapMapToProps__ = __webpack_require__(247); + + function whenMapDispatchToPropsIsFunction(mapDispatchToProps) { + return typeof mapDispatchToProps === 'function' + ? Object(__WEBPACK_IMPORTED_MODULE_1__wrapMapToProps__['b' /* wrapMapToPropsFunc */])( + mapDispatchToProps, + 'mapDispatchToProps', + ) + : undefined; + } + function whenMapDispatchToPropsIsMissing(mapDispatchToProps) { + return !mapDispatchToProps + ? Object(__WEBPACK_IMPORTED_MODULE_1__wrapMapToProps__['a' /* wrapMapToPropsConstant */])( + function (dispatch) { + return { + dispatch: dispatch, + }; + }, + ) + : undefined; + } + function whenMapDispatchToPropsIsObject(mapDispatchToProps) { + return mapDispatchToProps && typeof mapDispatchToProps === 'object' + ? Object(__WEBPACK_IMPORTED_MODULE_1__wrapMapToProps__['a' /* wrapMapToPropsConstant */])( + function (dispatch) { + return Object(__WEBPACK_IMPORTED_MODULE_0_redux__['b' /* bindActionCreators */])( + mapDispatchToProps, + dispatch, + ); + }, + ) + : undefined; + } + /* harmony default export */ __webpack_exports__['a'] = [ + whenMapDispatchToPropsIsFunction, + whenMapDispatchToPropsIsMissing, + whenMapDispatchToPropsIsObject, + ]; + + /***/ + }, + /* 576 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = isPlainObject; + /** + * @param {any} obj The object to inspect. + * @returns {boolean} True if the argument appears to be a plain object. + */ + function isPlainObject(obj) { + if (typeof obj !== 'object' || obj === null) return false; + var proto = Object.getPrototypeOf(obj); + if (proto === null) return true; + var baseProto = proto; + + while (Object.getPrototypeOf(baseProto) !== null) { + baseProto = Object.getPrototypeOf(baseProto); + } + + return proto === baseProto; + } + + /***/ + }, + /* 577 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* unused harmony export whenMapStateToPropsIsFunction */ + /* unused harmony export whenMapStateToPropsIsMissing */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__wrapMapToProps__ = __webpack_require__(247); + + function whenMapStateToPropsIsFunction(mapStateToProps) { + return typeof mapStateToProps === 'function' + ? Object(__WEBPACK_IMPORTED_MODULE_0__wrapMapToProps__['b' /* wrapMapToPropsFunc */])( + mapStateToProps, + 'mapStateToProps', + ) + : undefined; + } + function whenMapStateToPropsIsMissing(mapStateToProps) { + return !mapStateToProps + ? Object(__WEBPACK_IMPORTED_MODULE_0__wrapMapToProps__['a' /* wrapMapToPropsConstant */])( + function () { + return {}; + }, + ) + : undefined; + } + /* harmony default export */ __webpack_exports__['a'] = [ + whenMapStateToPropsIsFunction, + whenMapStateToPropsIsMissing, + ]; + + /***/ + }, + /* 578 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* unused harmony export defaultMergeProps */ + /* unused harmony export wrapMergePropsFunc */ + /* unused harmony export whenMergePropsIsFunction */ + /* unused harmony export whenMergePropsIsOmitted */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_extends__ = + __webpack_require__(164); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__utils_verifyPlainObject__ = + __webpack_require__(248); + + function defaultMergeProps(stateProps, dispatchProps, ownProps) { + return Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_extends__['a' /* default */])( + {}, + ownProps, + stateProps, + dispatchProps, + ); + } + function wrapMergePropsFunc(mergeProps) { + return function initMergePropsProxy(dispatch, _ref) { + var displayName = _ref.displayName, + pure = _ref.pure, + areMergedPropsEqual = _ref.areMergedPropsEqual; + var hasRunOnce = false; + var mergedProps; + return function mergePropsProxy(stateProps, dispatchProps, ownProps) { + var nextMergedProps = mergeProps(stateProps, dispatchProps, ownProps); + + if (hasRunOnce) { + if (!pure || !areMergedPropsEqual(nextMergedProps, mergedProps)) mergedProps = nextMergedProps; + } else { + hasRunOnce = true; + mergedProps = nextMergedProps; + if (true) + Object(__WEBPACK_IMPORTED_MODULE_1__utils_verifyPlainObject__['a' /* default */])( + mergedProps, + displayName, + 'mergeProps', + ); + } + + return mergedProps; + }; + }; + } + function whenMergePropsIsFunction(mergeProps) { + return typeof mergeProps === 'function' ? wrapMergePropsFunc(mergeProps) : undefined; + } + function whenMergePropsIsOmitted(mergeProps) { + return !mergeProps + ? function () { + return defaultMergeProps; + } + : undefined; + } + /* harmony default export */ __webpack_exports__['a'] = [ + whenMergePropsIsFunction, + whenMergePropsIsOmitted, + ]; + + /***/ + }, + /* 579 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* unused harmony export impureFinalPropsSelectorFactory */ + /* unused harmony export pureFinalPropsSelectorFactory */ + /* harmony export (immutable) */ __webpack_exports__['a'] = finalPropsSelectorFactory; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_objectWithoutPropertiesLoose__ = + __webpack_require__(165); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__verifySubselectors__ = __webpack_require__(580); + + function impureFinalPropsSelectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch) { + return function impureFinalPropsSelector(state, ownProps) { + return mergeProps( + mapStateToProps(state, ownProps), + mapDispatchToProps(dispatch, ownProps), + ownProps, + ); + }; + } + function pureFinalPropsSelectorFactory( + mapStateToProps, + mapDispatchToProps, + mergeProps, + dispatch, + _ref, + ) { + var areStatesEqual = _ref.areStatesEqual, + areOwnPropsEqual = _ref.areOwnPropsEqual, + areStatePropsEqual = _ref.areStatePropsEqual; + var hasRunAtLeastOnce = false; + var state; + var ownProps; + var stateProps; + var dispatchProps; + var mergedProps; + + function handleFirstCall(firstState, firstOwnProps) { + state = firstState; + ownProps = firstOwnProps; + stateProps = mapStateToProps(state, ownProps); + dispatchProps = mapDispatchToProps(dispatch, ownProps); + mergedProps = mergeProps(stateProps, dispatchProps, ownProps); + hasRunAtLeastOnce = true; + return mergedProps; + } + + function handleNewPropsAndNewState() { + stateProps = mapStateToProps(state, ownProps); + if (mapDispatchToProps.dependsOnOwnProps) dispatchProps = mapDispatchToProps(dispatch, ownProps); + mergedProps = mergeProps(stateProps, dispatchProps, ownProps); + return mergedProps; + } + + function handleNewProps() { + if (mapStateToProps.dependsOnOwnProps) stateProps = mapStateToProps(state, ownProps); + if (mapDispatchToProps.dependsOnOwnProps) dispatchProps = mapDispatchToProps(dispatch, ownProps); + mergedProps = mergeProps(stateProps, dispatchProps, ownProps); + return mergedProps; + } + + function handleNewState() { + var nextStateProps = mapStateToProps(state, ownProps); + var statePropsChanged = !areStatePropsEqual(nextStateProps, stateProps); + stateProps = nextStateProps; + if (statePropsChanged) mergedProps = mergeProps(stateProps, dispatchProps, ownProps); + return mergedProps; + } + + function handleSubsequentCalls(nextState, nextOwnProps) { + var propsChanged = !areOwnPropsEqual(nextOwnProps, ownProps); + var stateChanged = !areStatesEqual(nextState, state); + state = nextState; + ownProps = nextOwnProps; + if (propsChanged && stateChanged) return handleNewPropsAndNewState(); + if (propsChanged) return handleNewProps(); + if (stateChanged) return handleNewState(); + return mergedProps; + } + + return function pureFinalPropsSelector(nextState, nextOwnProps) { + return hasRunAtLeastOnce + ? handleSubsequentCalls(nextState, nextOwnProps) + : handleFirstCall(nextState, nextOwnProps); + }; + } // TODO: Add more comments + // If pure is true, the selector returned by selectorFactory will memoize its results, + // allowing connectAdvanced's shouldComponentUpdate to return false if final + // props have not changed. If false, the selector will always return a new + // object and shouldComponentUpdate will always return true. + + function finalPropsSelectorFactory(dispatch, _ref2) { + var initMapStateToProps = _ref2.initMapStateToProps, + initMapDispatchToProps = _ref2.initMapDispatchToProps, + initMergeProps = _ref2.initMergeProps, + options = Object( + __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_objectWithoutPropertiesLoose__[ + 'a' /* default */ + ], + )(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']); + + var mapStateToProps = initMapStateToProps(dispatch, options); + var mapDispatchToProps = initMapDispatchToProps(dispatch, options); + var mergeProps = initMergeProps(dispatch, options); + + if (true) { + Object(__WEBPACK_IMPORTED_MODULE_1__verifySubselectors__['a' /* default */])( + mapStateToProps, + mapDispatchToProps, + mergeProps, + options.displayName, + ); + } + + var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory; + return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options); + } + + /***/ + }, + /* 580 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = verifySubselectors; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils_warning__ = __webpack_require__(163); + + function verify(selector, methodName, displayName) { + if (!selector) { + throw new Error('Unexpected value for ' + methodName + ' in ' + displayName + '.'); + } else if (methodName === 'mapStateToProps' || methodName === 'mapDispatchToProps') { + if (!selector.hasOwnProperty('dependsOnOwnProps')) { + Object(__WEBPACK_IMPORTED_MODULE_0__utils_warning__['a' /* default */])( + 'The selector for ' + + methodName + + ' of ' + + displayName + + ' did not specify a value for dependsOnOwnProps.', + ); + } + } + } + + function verifySubselectors(mapStateToProps, mapDispatchToProps, mergeProps, displayName) { + verify(mapStateToProps, 'mapStateToProps', displayName); + verify(mapDispatchToProps, 'mapDispatchToProps', displayName); + verify(mergeProps, 'mergeProps', displayName); + } + + /***/ + }, + /* 581 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = helloWorldReducer; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__constants_HelloWorldConstants__ = + __webpack_require__(251); + + var initialState = { + lastActionType: null, + name: 'Alex', + }; + + // Why name function the same as the reducer? + // https://github.com/gaearon/redux/issues/428#issuecomment-129223274 + // Naming the function will help with debugging! + function helloWorldReducer() { + var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState; + var action = arguments[1]; + var type = action.type, + name = action.name; + + switch (type) { + case __WEBPACK_IMPORTED_MODULE_0__constants_HelloWorldConstants__[ + 'a' /* HELLO_WORLD_NAME_UPDATE */ + ]: + return { + lastActionType: type, + name: name, + }; + default: + return state; + } + } + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + initialState, + 'initialState', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/reducers/HelloWorldReducer.jsx', + ); + + __REACT_HOT_LOADER__.register( + helloWorldReducer, + 'helloWorldReducer', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/reducers/HelloWorldReducer.jsx', + ); + })(); + + /***/ + }, + /* 582 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = railsContextReducer; + // This will always get set + var initialState = {}; + + // Why name function the same as the reducer? + // https://github.com/gaearon/redux/issues/428#issuecomment-129223274 + // Naming the function will help with debugging! + /* eslint-disable no-unused-vars */ + function railsContextReducer() { + var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState; + var action = arguments[1]; + + return state; + } + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + initialState, + 'initialState', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/reducers/RailsContextReducer.jsx', + ); + + __REACT_HOT_LOADER__.register( + railsContextReducer, + 'railsContextReducer', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/reducers/RailsContextReducer.jsx', + ); + })(); + + /***/ + }, + /* 583 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + var _default = function _default(props, railsContext) { + return Object.assign({}, props, { railsContext: railsContext }); + }; + + // Real world is that you'll want to do lots of manipulations of the data you get back from Rails + // to coerce it into exactly what you want your initial redux state. + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/store/composeInitialState.js', + ); + })(); + + /***/ + }, + /* 584 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(10); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__RailsContext__ = __webpack_require__(237); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + // Super simple example of the simplest possible React component + + var HelloWorldRedux = (function (_React$Component) { + _inherits(HelloWorldRedux, _React$Component); + + // Not necessary if we only call super, but we'll need to initialize state, etc. + function HelloWorldRedux(props) { + _classCallCheck(this, HelloWorldRedux); + + var _this = _possibleConstructorReturn( + this, + (HelloWorldRedux.__proto__ || Object.getPrototypeOf(HelloWorldRedux)).call(this, props), + ); + + _this.setNameDomRef = _this.setNameDomRef.bind(_this); + _this.handleChange = _this.handleChange.bind(_this); + return _this; + } + + _createClass(HelloWorldRedux, [ + { + key: 'setNameDomRef', + value: function setNameDomRef(nameDomNode) { + this.nameDomRef = nameDomNode; + }, + }, + { + key: 'handleChange', + value: function handleChange() { + var name = this.nameDomRef.value; + this.props.actions.updateName(name); + }, + }, + { + key: 'render', + value: function render() { + var _props = this.props, + data = _props.data, + railsContext = _props.railsContext; + var name = data.name; + + // If this creates an alert, we have a problem! + // see file packages/node-renderer/src/scriptSanitizedVal.js for the fix to this prior issue. + + /* eslint-disable no-console */ + + console.log('This is a script:"</div>"</script> <script>alert(\'WTF1\')</script>'); + console.log('Script2:"</div>"</script xx> <script>alert(\'WTF2\')</script xx>'); + console.log('Script3:"</div>"</ SCRIPT xx> <script>alert(\'WTF3\')</script xx>'); + console.log('Script4"</div>"</script <script>alert(\'WTF4\')</script>'); + console.log('Script5:"</div>"</ script> <script>alert(\'WTF5\')</script>'); + + return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'div', + null, + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'h3', + null, + 'Redux Hello, ', + name, + '!', + ), + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'p', + null, + 'With Redux, say hello to:', + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('input', { + type: 'text', + ref: this.setNameDomRef, + value: name || '', + onChange: this.handleChange, + }), + ), + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_2__RailsContext__['a' /* default */], + { railsContext: railsContext }, + ), + ); + }, + }, + ]); + + return HelloWorldRedux; + })(__WEBPACK_IMPORTED_MODULE_1_react___default.a.Component); + + HelloWorldRedux.propTypes = { + actions: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object.isRequired, + data: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object.isRequired, + railsContext: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object.isRequired, + }; + var _default = HelloWorldRedux; + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + HelloWorldRedux, + 'HelloWorldRedux', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/HelloWorldRedux.jsx', + ); + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/HelloWorldRedux.jsx', + ); + })(); + + /***/ + }, + /* 585 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + Object.defineProperty(__webpack_exports__, '__esModule', { value: true }); + /* harmony export (immutable) */ __webpack_exports__['updateName'] = updateName; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__constants_HelloWorldConstants__ = + __webpack_require__(251); + + /* eslint-disable import/prefer-default-export */ + function updateName(name) { + return { + type: __WEBPACK_IMPORTED_MODULE_0__constants_HelloWorldConstants__[ + 'a' /* HELLO_WORLD_NAME_UPDATE */ + ], + name: name, + }; + } + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + updateName, + 'updateName', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/actions/HelloWorldActions.jsx', + ); + })(); + + /***/ + }, + /* 586 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_on_rails__ = __webpack_require__(210); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_on_rails___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_react_on_rails__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_redux__ = __webpack_require__(162); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__components_HelloWorldContainer__ = + __webpack_require__(252); + // Top level component for serer side. + // Compare this to the ./ClientReduxSharedStoreApp.jsx file which is used for client side rendering. + + /* + * Export a function that returns a ReactComponent, depending on a store named SharedReduxStore. + * This is used for the server rendering. + * React will see that the state is the same and not do anything. + */ + + var _default = function _default() { + // This is where we get the existing store. + var store = __WEBPACK_IMPORTED_MODULE_1_react_on_rails___default.a.getStore('SharedReduxStore'); + + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_2_react_redux__['a' /* Provider */], + { store: store }, + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_3__components_HelloWorldContainer__['a' /* default */], + null, + ), + ); + }; + + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/startup/ServerReduxSharedStoreApp.jsx', + ); + })(); + + /***/ + }, + /* 587 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_router__ = __webpack_require__(84); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__routes_routes__ = __webpack_require__(613); + + var _default = function _default(_props, railsContext) { + var error = void 0; + var redirectLocation = void 0; + var routeProps = void 0; + + var location = railsContext.location; + + // See https://github.com/reactjs/react-router/blob/master/docs/guides/ServerRendering.md + + Object(__WEBPACK_IMPORTED_MODULE_1_react_router__['d' /* match */])( + { routes: __WEBPACK_IMPORTED_MODULE_2__routes_routes__['a' /* default */], location: location }, + function (_error, _redirectLocation, _routeProps) { + error = _error; + redirectLocation = _redirectLocation; + routeProps = _routeProps; + }, + ); + + // This tell react_on_rails to skip server rendering any HTML. Note, client rendering + // will handle the redirect. What's key is that we don't try to render. + // Critical to return the Object properties to match this { error, redirectLocation } + if (error || redirectLocation) { + return { error: error, redirectLocation: redirectLocation }; + } + + // Important that you don't do this if you are redirecting or have an error. + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_1_react_router__['c' /* RouterContext */], + routeProps, + ); + }; + + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/startup/ServerRouterApp.jsx', + ); + })(); + + /***/ + }, + /* 588 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant__ = __webpack_require__(14); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_invariant__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_create_react_class__ = __webpack_require__(37); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_create_react_class___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_create_react_class__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types__ = __webpack_require__(10); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_3_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__createTransitionManager__ = + __webpack_require__(253); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__ = __webpack_require__(85); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__RouterContext__ = __webpack_require__(167); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__RouteUtils__ = __webpack_require__(47); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__RouterUtils__ = __webpack_require__(255); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__routerWarning__ = __webpack_require__(70); + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + function _objectWithoutProperties(obj, keys) { + var target = {}; + for (var i in obj) { + if (keys.indexOf(i) >= 0) continue; + if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; + target[i] = obj[i]; + } + return target; + } + + var propTypes = { + history: __WEBPACK_IMPORTED_MODULE_3_prop_types__['object'], + children: __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__['d' /* routes */], + routes: __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__['d' /* routes */], // alias for children + render: __WEBPACK_IMPORTED_MODULE_3_prop_types__['func'], + createElement: __WEBPACK_IMPORTED_MODULE_3_prop_types__['func'], + onError: __WEBPACK_IMPORTED_MODULE_3_prop_types__['func'], + onUpdate: __WEBPACK_IMPORTED_MODULE_3_prop_types__['func'], + + // PRIVATE: For client-side rehydration of server match. + matchContext: __WEBPACK_IMPORTED_MODULE_3_prop_types__['object'], + }; + + /** + * A <Router> is a high-level API for automatically setting up + * a router that renders a <RouterContext> with all the props + * it needs each time the URL changes. + */ + var Router = __WEBPACK_IMPORTED_MODULE_2_create_react_class___default()({ + displayName: 'Router', + + propTypes: propTypes, + + getDefaultProps: function getDefaultProps() { + return { + render: function render(props) { + return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_6__RouterContext__['a' /* default */], + props, + ); + }, + }; + }, + getInitialState: function getInitialState() { + return { + location: null, + routes: null, + params: null, + components: null, + }; + }, + handleError: function handleError(error) { + if (this.props.onError) { + this.props.onError.call(this, error); + } else { + // Throw errors by default so we don't silently swallow them! + throw error; // This error probably occurred in getChildRoutes or getComponents. + } + }, + createRouterObject: function createRouterObject(state) { + var matchContext = this.props.matchContext; + + if (matchContext) { + return matchContext.router; + } + + var history = this.props.history; + + return Object(__WEBPACK_IMPORTED_MODULE_8__RouterUtils__['b' /* createRouterObject */])( + history, + this.transitionManager, + state, + ); + }, + createTransitionManager: function createTransitionManager() { + var matchContext = this.props.matchContext; + + if (matchContext) { + return matchContext.transitionManager; + } + + var history = this.props.history; + var _props = this.props, + routes = _props.routes, + children = _props.children; + + !history.getCurrentLocation + ? true + ? __WEBPACK_IMPORTED_MODULE_0_invariant___default()( + false, + 'You have provided a history object created with history v4.x or v2.x ' + + 'and earlier. This version of React Router is only compatible with v3 ' + + 'history objects. Please change to history v3.x.', + ) + : invariant(false) + : void 0; + + return Object(__WEBPACK_IMPORTED_MODULE_4__createTransitionManager__['a' /* default */])( + history, + Object(__WEBPACK_IMPORTED_MODULE_7__RouteUtils__['b' /* createRoutes */])(routes || children), + ); + }, + componentWillMount: function componentWillMount() { + var _this = this; + + this.transitionManager = this.createTransitionManager(); + this.router = this.createRouterObject(this.state); + + this._unlisten = this.transitionManager.listen(function (error, state) { + if (error) { + _this.handleError(error); + } else { + // Keep the identity of this.router because of a caveat in ContextUtils: + // they only work if the object identity is preserved. + Object(__WEBPACK_IMPORTED_MODULE_8__RouterUtils__['a' /* assignRouterState */])( + _this.router, + state, + ); + _this.setState(state, _this.props.onUpdate); + } + }); + }, + + /* istanbul ignore next: sanity check */ + componentWillReceiveProps: function componentWillReceiveProps(nextProps) { + true + ? Object(__WEBPACK_IMPORTED_MODULE_9__routerWarning__['a' /* default */])( + nextProps.history === this.props.history, + 'You cannot change <Router history>; it will be ignored', + ) + : void 0; + + true + ? Object(__WEBPACK_IMPORTED_MODULE_9__routerWarning__['a' /* default */])( + (nextProps.routes || nextProps.children) === (this.props.routes || this.props.children), + 'You cannot change <Router routes>; it will be ignored', + ) + : void 0; + }, + componentWillUnmount: function componentWillUnmount() { + if (this._unlisten) this._unlisten(); + }, + render: function render() { + var _state = this.state, + location = _state.location, + routes = _state.routes, + params = _state.params, + components = _state.components; + + var _props2 = this.props, + createElement = _props2.createElement, + render = _props2.render, + props = _objectWithoutProperties(_props2, ['createElement', 'render']); + + if (location == null) return null; // Async match + + // Only forward non-Router-specific props to routing context, as those are + // the only ones that might be custom routing context props. + Object.keys(propTypes).forEach(function (propType) { + return delete props[propType]; + }); + + return render( + _extends({}, props, { + router: this.router, + location: location, + routes: routes, + params: params, + components: components, + createElement: createElement, + }), + ); + }, + }); + + /* unused harmony default export */ var _unused_webpack_default_export = Router; + + /***/ + }, + /* 589 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__PatternUtils__ = __webpack_require__(71); + + function routeParamsChanged(route, prevState, nextState) { + if (!route.path) return false; + + var paramNames = Object(__WEBPACK_IMPORTED_MODULE_0__PatternUtils__['b' /* getParamNames */])( + route.path, + ); + + return paramNames.some(function (paramName) { + return prevState.params[paramName] !== nextState.params[paramName]; + }); + } + + /** + * Returns an object of { leaveRoutes, changeRoutes, enterRoutes } determined by + * the change from prevState to nextState. We leave routes if either + * 1) they are not in the next state or 2) they are in the next state + * but their params have changed (i.e. /users/123 => /users/456). + * + * leaveRoutes are ordered starting at the leaf route of the tree + * we're leaving up to the common parent route. enterRoutes are ordered + * from the top of the tree we're entering down to the leaf route. + * + * changeRoutes are any routes that didn't leave or enter during + * the transition. + */ + function computeChangedRoutes(prevState, nextState) { + var prevRoutes = prevState && prevState.routes; + var nextRoutes = nextState.routes; + + var leaveRoutes = void 0, + changeRoutes = void 0, + enterRoutes = void 0; + if (prevRoutes) { + var parentIsLeaving = false; + leaveRoutes = prevRoutes.filter(function (route) { + if (parentIsLeaving) { + return true; + } else { + var isLeaving = + nextRoutes.indexOf(route) === -1 || routeParamsChanged(route, prevState, nextState); + if (isLeaving) parentIsLeaving = true; + return isLeaving; + } + }); + + // onLeave hooks start at the leaf route. + leaveRoutes.reverse(); + + enterRoutes = []; + changeRoutes = []; + + nextRoutes.forEach(function (route) { + var isNew = prevRoutes.indexOf(route) === -1; + var paramsChanged = leaveRoutes.indexOf(route) !== -1; + + if (isNew || paramsChanged) enterRoutes.push(route); + else changeRoutes.push(route); + }); + } else { + leaveRoutes = []; + changeRoutes = []; + enterRoutes = nextRoutes; + } + + return { + leaveRoutes: leaveRoutes, + changeRoutes: changeRoutes, + enterRoutes: enterRoutes, + }; + } + + /* harmony default export */ __webpack_exports__['a'] = computeChangedRoutes; + + /***/ + }, + /* 590 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = getTransitionUtils; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__AsyncUtils__ = __webpack_require__(166); + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + var PendingHooks = function PendingHooks() { + var _this = this; + + _classCallCheck(this, PendingHooks); + + this.hooks = []; + + this.add = function (hook) { + return _this.hooks.push(hook); + }; + + this.remove = function (hook) { + return (_this.hooks = _this.hooks.filter(function (h) { + return h !== hook; + })); + }; + + this.has = function (hook) { + return _this.hooks.indexOf(hook) !== -1; + }; + + this.clear = function () { + return (_this.hooks = []); + }; + }; + + function getTransitionUtils() { + var enterHooks = new PendingHooks(); + var changeHooks = new PendingHooks(); + + function createTransitionHook(hook, route, asyncArity, pendingHooks) { + var isSync = hook.length < asyncArity; + + var transitionHook = function transitionHook() { + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + hook.apply(route, args); + + if (isSync) { + var callback = args[args.length - 1]; + // Assume hook executes synchronously and + // automatically call the callback. + callback(); + } + }; + + pendingHooks.add(transitionHook); + + return transitionHook; + } + + function getEnterHooks(routes) { + return routes.reduce(function (hooks, route) { + if (route.onEnter) hooks.push(createTransitionHook(route.onEnter, route, 3, enterHooks)); + return hooks; + }, []); + } + + function getChangeHooks(routes) { + return routes.reduce(function (hooks, route) { + if (route.onChange) hooks.push(createTransitionHook(route.onChange, route, 4, changeHooks)); + return hooks; + }, []); + } + + function runTransitionHooks(length, iter, callback) { + if (!length) { + callback(); + return; + } + + var redirectInfo = void 0; + function replace(location) { + redirectInfo = location; + } + + Object(__WEBPACK_IMPORTED_MODULE_0__AsyncUtils__['a' /* loopAsync */])( + length, + function (index, next, done) { + iter(index, replace, function (error) { + if (error || redirectInfo) { + done(error, redirectInfo); // No need to continue. + } else { + next(); + } + }); + }, + callback, + ); + } + + /** + * Runs all onEnter hooks in the given array of routes in order + * with onEnter(nextState, replace, callback) and calls + * callback(error, redirectInfo) when finished. The first hook + * to use replace short-circuits the loop. + * + * If a hook needs to run asynchronously, it may use the callback + * function. However, doing so will cause the transition to pause, + * which could lead to a non-responsive UI if the hook is slow. + */ + function runEnterHooks(routes, nextState, callback) { + enterHooks.clear(); + var hooks = getEnterHooks(routes); + return runTransitionHooks( + hooks.length, + function (index, replace, next) { + var wrappedNext = function wrappedNext() { + if (enterHooks.has(hooks[index])) { + next.apply(undefined, arguments); + enterHooks.remove(hooks[index]); + } + }; + hooks[index](nextState, replace, wrappedNext); + }, + callback, + ); + } + + /** + * Runs all onChange hooks in the given array of routes in order + * with onChange(prevState, nextState, replace, callback) and calls + * callback(error, redirectInfo) when finished. The first hook + * to use replace short-circuits the loop. + * + * If a hook needs to run asynchronously, it may use the callback + * function. However, doing so will cause the transition to pause, + * which could lead to a non-responsive UI if the hook is slow. + */ + function runChangeHooks(routes, state, nextState, callback) { + changeHooks.clear(); + var hooks = getChangeHooks(routes); + return runTransitionHooks( + hooks.length, + function (index, replace, next) { + var wrappedNext = function wrappedNext() { + if (changeHooks.has(hooks[index])) { + next.apply(undefined, arguments); + changeHooks.remove(hooks[index]); + } + }; + hooks[index](state, nextState, replace, wrappedNext); + }, + callback, + ); + } + + /** + * Runs all onLeave hooks in the given array of routes in order. + */ + function runLeaveHooks(routes, prevState) { + for (var i = 0, len = routes.length; i < len; ++i) { + if (routes[i].onLeave) routes[i].onLeave.call(routes[i], prevState); + } + } + + return { + runEnterHooks: runEnterHooks, + runChangeHooks: runChangeHooks, + runLeaveHooks: runLeaveHooks, + }; + } + + /***/ + }, + /* 591 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = isActive; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__PatternUtils__ = __webpack_require__(71); + var _typeof = + typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' + ? function (obj) { + return typeof obj; + } + : function (obj) { + return obj && + typeof Symbol === 'function' && + obj.constructor === Symbol && + obj !== Symbol.prototype + ? 'symbol' + : typeof obj; + }; + + function deepEqual(a, b) { + if (a == b) return true; + + if (a == null || b == null) return false; + + if (Array.isArray(a)) { + return ( + Array.isArray(b) && + a.length === b.length && + a.every(function (item, index) { + return deepEqual(item, b[index]); + }) + ); + } + + if ((typeof a === 'undefined' ? 'undefined' : _typeof(a)) === 'object') { + for (var p in a) { + if (!Object.prototype.hasOwnProperty.call(a, p)) { + continue; + } + + if (a[p] === undefined) { + if (b[p] !== undefined) { + return false; + } + } else if (!Object.prototype.hasOwnProperty.call(b, p)) { + return false; + } else if (!deepEqual(a[p], b[p])) { + return false; + } + } + + return true; + } + + return String(a) === String(b); + } + + /** + * Returns true if the current pathname matches the supplied one, net of + * leading and trailing slash normalization. This is sufficient for an + * indexOnly route match. + */ + function pathIsActive(pathname, currentPathname) { + // Normalize leading slash for consistency. Leading slash on pathname has + // already been normalized in isActive. See caveat there. + if (currentPathname.charAt(0) !== '/') { + currentPathname = '/' + currentPathname; + } + + // Normalize the end of both path names too. Maybe `/foo/` shouldn't show + // `/foo` as active, but in this case, we would already have failed the + // match. + if (pathname.charAt(pathname.length - 1) !== '/') { + pathname += '/'; + } + if (currentPathname.charAt(currentPathname.length - 1) !== '/') { + currentPathname += '/'; + } + + return currentPathname === pathname; + } + + /** + * Returns true if the given pathname matches the active routes and params. + */ + function routeIsActive(pathname, routes, params) { + var remainingPathname = pathname, + paramNames = [], + paramValues = []; + + // for...of would work here but it's probably slower post-transpilation. + for (var i = 0, len = routes.length; i < len; ++i) { + var route = routes[i]; + var pattern = route.path || ''; + + if (pattern.charAt(0) === '/') { + remainingPathname = pathname; + paramNames = []; + paramValues = []; + } + + if (remainingPathname !== null && pattern) { + var matched = Object(__WEBPACK_IMPORTED_MODULE_0__PatternUtils__['c' /* matchPattern */])( + pattern, + remainingPathname, + ); + if (matched) { + remainingPathname = matched.remainingPathname; + paramNames = [].concat(paramNames, matched.paramNames); + paramValues = [].concat(paramValues, matched.paramValues); + } else { + remainingPathname = null; + } + + if (remainingPathname === '') { + // We have an exact match on the route. Just check that all the params + // match. + // FIXME: This doesn't work on repeated params. + return paramNames.every(function (paramName, index) { + return String(paramValues[index]) === String(params[paramName]); + }); + } + } + } + + return false; + } + + /** + * Returns true if all key/value pairs in the given query are + * currently active. + */ + function queryIsActive(query, activeQuery) { + if (activeQuery == null) return query == null; + + if (query == null) return true; + + return deepEqual(query, activeQuery); + } + + /** + * Returns true if a <Link> to the given pathname/query combination is + * currently active. + */ + function isActive(_ref, indexOnly, currentLocation, routes, params) { + var pathname = _ref.pathname, + query = _ref.query; + + if (currentLocation == null) return false; + + // TODO: This is a bit ugly. It keeps around support for treating pathnames + // without preceding slashes as absolute paths, but possibly also works + // around the same quirks with basenames as in matchRoutes. + if (pathname.charAt(0) !== '/') { + pathname = '/' + pathname; + } + + if (!pathIsActive(pathname, currentLocation.pathname)) { + // The path check is necessary and sufficient for indexOnly, but otherwise + // we still need to check the routes. + if (indexOnly || !routeIsActive(pathname, routes, params)) { + return false; + } + } + + return queryIsActive(query, currentLocation.query); + } + + /***/ + }, + /* 592 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__AsyncUtils__ = __webpack_require__(166); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__PromiseUtils__ = __webpack_require__(254); + + function getComponentsForRoute(nextState, route, callback) { + if (route.component || route.components) { + callback(null, route.component || route.components); + return; + } + + var getComponent = route.getComponent || route.getComponents; + if (getComponent) { + var componentReturn = getComponent.call(route, nextState, callback); + if (Object(__WEBPACK_IMPORTED_MODULE_1__PromiseUtils__['a' /* isPromise */])(componentReturn)) + componentReturn.then(function (component) { + return callback(null, component); + }, callback); + } else { + callback(); + } + } + + /** + * Asynchronously fetches all components needed for the given router + * state and calls callback(error, components) when finished. + * + * Note: This operation may finish synchronously if no routes have an + * asynchronous getComponents method. + */ + function getComponents(nextState, callback) { + Object(__WEBPACK_IMPORTED_MODULE_0__AsyncUtils__['b' /* mapAsync */])( + nextState.routes, + function (route, index, callback) { + getComponentsForRoute(nextState, route, callback); + }, + callback, + ); + } + + /* harmony default export */ __webpack_exports__['a'] = getComponents; + + /***/ + }, + /* 593 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = matchRoutes; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__AsyncUtils__ = __webpack_require__(166); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__PromiseUtils__ = __webpack_require__(254); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__PatternUtils__ = __webpack_require__(71); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__routerWarning__ = __webpack_require__(70); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__RouteUtils__ = __webpack_require__(47); + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + function getChildRoutes(route, location, paramNames, paramValues, callback) { + if (route.childRoutes) { + return [null, route.childRoutes]; + } + if (!route.getChildRoutes) { + return []; + } + + var sync = true, + result = void 0; + + var partialNextState = { + location: location, + params: createParams(paramNames, paramValues), + }; + + var childRoutesReturn = route.getChildRoutes(partialNextState, function (error, childRoutes) { + childRoutes = + !error && Object(__WEBPACK_IMPORTED_MODULE_4__RouteUtils__['b' /* createRoutes */])(childRoutes); + if (sync) { + result = [error, childRoutes]; + return; + } + + callback(error, childRoutes); + }); + + if (Object(__WEBPACK_IMPORTED_MODULE_1__PromiseUtils__['a' /* isPromise */])(childRoutesReturn)) + childRoutesReturn.then(function (childRoutes) { + return callback( + null, + Object(__WEBPACK_IMPORTED_MODULE_4__RouteUtils__['b' /* createRoutes */])(childRoutes), + ); + }, callback); + + sync = false; + return result; // Might be undefined. + } + + function getIndexRoute(route, location, paramNames, paramValues, callback) { + if (route.indexRoute) { + callback(null, route.indexRoute); + } else if (route.getIndexRoute) { + var partialNextState = { + location: location, + params: createParams(paramNames, paramValues), + }; + + var indexRoutesReturn = route.getIndexRoute(partialNextState, function (error, indexRoute) { + callback( + error, + !error && + Object(__WEBPACK_IMPORTED_MODULE_4__RouteUtils__['b' /* createRoutes */])(indexRoute)[0], + ); + }); + + if (Object(__WEBPACK_IMPORTED_MODULE_1__PromiseUtils__['a' /* isPromise */])(indexRoutesReturn)) + indexRoutesReturn.then(function (indexRoute) { + return callback( + null, + Object(__WEBPACK_IMPORTED_MODULE_4__RouteUtils__['b' /* createRoutes */])(indexRoute)[0], + ); + }, callback); + } else if (route.childRoutes || route.getChildRoutes) { + var onChildRoutes = function onChildRoutes(error, childRoutes) { + if (error) { + callback(error); + return; + } + + var pathless = childRoutes.filter(function (childRoute) { + return !childRoute.path; + }); + + Object(__WEBPACK_IMPORTED_MODULE_0__AsyncUtils__['a' /* loopAsync */])( + pathless.length, + function (index, next, done) { + getIndexRoute( + pathless[index], + location, + paramNames, + paramValues, + function (error, indexRoute) { + if (error || indexRoute) { + var routes = [pathless[index]].concat( + Array.isArray(indexRoute) ? indexRoute : [indexRoute], + ); + done(error, routes); + } else { + next(); + } + }, + ); + }, + function (err, routes) { + callback(null, routes); + }, + ); + }; + + var result = getChildRoutes(route, location, paramNames, paramValues, onChildRoutes); + if (result) { + onChildRoutes.apply(undefined, result); + } + } else { + callback(); + } + } + + function assignParams(params, paramNames, paramValues) { + return paramNames.reduce(function (params, paramName, index) { + var paramValue = paramValues && paramValues[index]; + + if (Array.isArray(params[paramName])) { + params[paramName].push(paramValue); + } else if (paramName in params) { + params[paramName] = [params[paramName], paramValue]; + } else { + params[paramName] = paramValue; + } + + return params; + }, params); + } + + function createParams(paramNames, paramValues) { + return assignParams({}, paramNames, paramValues); + } + + function matchRouteDeep(route, location, remainingPathname, paramNames, paramValues, callback) { + var pattern = route.path || ''; + + if (pattern.charAt(0) === '/') { + remainingPathname = location.pathname; + paramNames = []; + paramValues = []; + } + + // Only try to match the path if the route actually has a pattern, and if + // we're not just searching for potential nested absolute paths. + if (remainingPathname !== null && pattern) { + try { + var matched = Object(__WEBPACK_IMPORTED_MODULE_2__PatternUtils__['c' /* matchPattern */])( + pattern, + remainingPathname, + ); + if (matched) { + remainingPathname = matched.remainingPathname; + paramNames = [].concat(paramNames, matched.paramNames); + paramValues = [].concat(paramValues, matched.paramValues); + } else { + remainingPathname = null; + } + } catch (error) { + callback(error); + } + + // By assumption, pattern is non-empty here, which is the prerequisite for + // actually terminating a match. + if (remainingPathname === '') { + var match = { + routes: [route], + params: createParams(paramNames, paramValues), + }; + + getIndexRoute(route, location, paramNames, paramValues, function (error, indexRoute) { + if (error) { + callback(error); + } else { + if (Array.isArray(indexRoute)) { + var _match$routes; + + true + ? Object(__WEBPACK_IMPORTED_MODULE_3__routerWarning__['a' /* default */])( + indexRoute.every(function (route) { + return !route.path; + }), + 'Index routes should not have paths', + ) + : void 0; + (_match$routes = match.routes).push.apply(_match$routes, indexRoute); + } else if (indexRoute) { + true + ? Object(__WEBPACK_IMPORTED_MODULE_3__routerWarning__['a' /* default */])( + !indexRoute.path, + 'Index routes should not have paths', + ) + : void 0; + match.routes.push(indexRoute); + } + + callback(null, match); + } + }); + + return; + } + } + + if (remainingPathname != null || route.childRoutes) { + // Either a) this route matched at least some of the path or b) + // we don't have to load this route's children asynchronously. In + // either case continue checking for matches in the subtree. + var onChildRoutes = function onChildRoutes(error, childRoutes) { + if (error) { + callback(error); + } else if (childRoutes) { + // Check the child routes to see if any of them match. + matchRoutes( + childRoutes, + location, + function (error, match) { + if (error) { + callback(error); + } else if (match) { + // A child route matched! Augment the match and pass it up the stack. + match.routes.unshift(route); + callback(null, match); + } else { + callback(); + } + }, + remainingPathname, + paramNames, + paramValues, + ); + } else { + callback(); + } + }; + + var result = getChildRoutes(route, location, paramNames, paramValues, onChildRoutes); + if (result) { + onChildRoutes.apply(undefined, result); + } + } else { + callback(); + } + } + + /** + * Asynchronously matches the given location to a set of routes and calls + * callback(error, state) when finished. The state object will have the + * following properties: + * + * - routes An array of routes that matched, in hierarchical order + * - params An object of URL parameters + * + * Note: This operation may finish synchronously if no routes have an + * asynchronous getChildRoutes method. + */ + function matchRoutes(routes, location, callback, remainingPathname) { + var paramNames = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : []; + var paramValues = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : []; + + if (remainingPathname === undefined) { + // TODO: This is a little bit ugly, but it works around a quirk in history + // that strips the leading slash from pathnames when using basenames with + // trailing slashes. + if (location.pathname.charAt(0) !== '/') { + location = _extends({}, location, { + pathname: '/' + location.pathname, + }); + } + remainingPathname = location.pathname; + } + + Object(__WEBPACK_IMPORTED_MODULE_0__AsyncUtils__['a' /* loopAsync */])( + routes.length, + function (index, next, done) { + matchRouteDeep( + routes[index], + location, + remainingPathname, + paramNames, + paramValues, + function (error, match) { + if (error || match) { + done(error, match); + } else { + next(); + } + }, + ); + }, + callback, + ); + } + + /***/ + }, + /* 594 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__PatternUtils__ = __webpack_require__(71); + + /** + * Extracts an object of params the given route cares about from + * the given params object. + */ + function getRouteParams(route, params) { + var routeParams = {}; + + if (!route.path) return routeParams; + + Object(__WEBPACK_IMPORTED_MODULE_0__PatternUtils__['b' /* getParamNames */])(route.path).forEach( + function (p) { + if (Object.prototype.hasOwnProperty.call(params, p)) { + routeParams[p] = params[p]; + } + }, + ); + + return routeParams; + } + + /* harmony default export */ __webpack_exports__['a'] = getRouteParams; + + /***/ + }, + /* 595 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_create_react_class__ = __webpack_require__(37); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_create_react_class___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_create_react_class__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Link__ = __webpack_require__(256); + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + /** + * An <IndexLink> is used to link to an <IndexRoute>. + */ + var IndexLink = __WEBPACK_IMPORTED_MODULE_1_create_react_class___default()({ + displayName: 'IndexLink', + + render: function render() { + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_2__Link__['a' /* default */], + _extends({}, this.props, { onlyActiveOnIndex: true }), + ); + }, + }); + + /* unused harmony default export */ var _unused_webpack_default_export = IndexLink; + + /***/ + }, + /* 596 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* unused harmony export default */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant__ = __webpack_require__(14); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_invariant__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_create_react_class__ = __webpack_require__(37); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_create_react_class___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_create_react_class__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_hoist_non_react_statics__ = + __webpack_require__(597); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_hoist_non_react_statics___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_hoist_non_react_statics__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__ContextUtils__ = __webpack_require__(168); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__PropTypes__ = __webpack_require__(169); + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + function getDisplayName(WrappedComponent) { + return WrappedComponent.displayName || WrappedComponent.name || 'Component'; + } + + function withRouter(WrappedComponent, options) { + var withRef = options && options.withRef; + + var WithRouter = __WEBPACK_IMPORTED_MODULE_2_create_react_class___default()({ + displayName: 'WithRouter', + + mixins: [ + Object(__WEBPACK_IMPORTED_MODULE_4__ContextUtils__['b' /* ContextSubscriber */])('router'), + ], + + contextTypes: { router: __WEBPACK_IMPORTED_MODULE_5__PropTypes__['a' /* routerShape */] }, + propTypes: { router: __WEBPACK_IMPORTED_MODULE_5__PropTypes__['a' /* routerShape */] }, + + getWrappedInstance: function getWrappedInstance() { + !withRef + ? true + ? __WEBPACK_IMPORTED_MODULE_0_invariant___default()( + false, + 'To access the wrapped instance, you need to specify ' + + '`{ withRef: true }` as the second argument of the withRouter() call.', + ) + : invariant(false) + : void 0; + + return this.wrappedInstance; + }, + render: function render() { + var _this = this; + + var router = this.props.router || this.context.router; + if (!router) { + return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + WrappedComponent, + this.props, + ); + } + + var params = router.params, + location = router.location, + routes = router.routes; + + var props = _extends({}, this.props, { + router: router, + params: params, + location: location, + routes: routes, + }); + + if (withRef) { + props.ref = function (c) { + _this.wrappedInstance = c; + }; + } + + return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(WrappedComponent, props); + }, + }); + + WithRouter.displayName = 'withRouter(' + getDisplayName(WrappedComponent) + ')'; + WithRouter.WrappedComponent = WrappedComponent; + + return __WEBPACK_IMPORTED_MODULE_3_hoist_non_react_statics___default()(WithRouter, WrappedComponent); + } + + /***/ + }, + /* 597 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2015, Yahoo! Inc. + * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. + */ + + var REACT_STATICS = { + childContextTypes: true, + contextTypes: true, + defaultProps: true, + displayName: true, + getDefaultProps: true, + mixins: true, + propTypes: true, + type: true, + }; + + var KNOWN_STATICS = { + name: true, + length: true, + prototype: true, + caller: true, + arguments: true, + arity: true, + }; + + var isGetOwnPropertySymbolsAvailable = typeof Object.getOwnPropertySymbols === 'function'; + + module.exports = function hoistNonReactStatics(targetComponent, sourceComponent, customStatics) { + if (typeof sourceComponent !== 'string') { + // don't hoist over string (html) components + var keys = Object.getOwnPropertyNames(sourceComponent); + + /* istanbul ignore else */ + if (isGetOwnPropertySymbolsAvailable) { + keys = keys.concat(Object.getOwnPropertySymbols(sourceComponent)); + } + + for (var i = 0; i < keys.length; ++i) { + if ( + !REACT_STATICS[keys[i]] && + !KNOWN_STATICS[keys[i]] && + (!customStatics || !customStatics[keys[i]]) + ) { + try { + targetComponent[keys[i]] = sourceComponent[keys[i]]; + } catch (error) {} + } + } + } + + return targetComponent; + }; + + /***/ + }, + /* 598 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_create_react_class__ = __webpack_require__(37); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_create_react_class___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_create_react_class__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(10); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__routerWarning__ = __webpack_require__(70); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_invariant__ = __webpack_require__(14); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_invariant___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_3_invariant__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Redirect__ = __webpack_require__(257); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__ = __webpack_require__(85); + + /** + * An <IndexRedirect> is used to redirect from an indexRoute. + */ + /* eslint-disable react/require-render-return */ + var IndexRedirect = __WEBPACK_IMPORTED_MODULE_0_create_react_class___default()({ + displayName: 'IndexRedirect', + + statics: { + createRouteFromReactElement: function createRouteFromReactElement(element, parentRoute) { + /* istanbul ignore else: sanity check */ + if (parentRoute) { + parentRoute.indexRoute = + __WEBPACK_IMPORTED_MODULE_4__Redirect__['a' /* default */].createRouteFromReactElement( + element, + ); + } else { + true + ? Object(__WEBPACK_IMPORTED_MODULE_2__routerWarning__['a' /* default */])( + false, + 'An <IndexRedirect> does not make sense at the root of your route config', + ) + : void 0; + } + }, + }, + + propTypes: { + to: __WEBPACK_IMPORTED_MODULE_1_prop_types__['string'].isRequired, + query: __WEBPACK_IMPORTED_MODULE_1_prop_types__['object'], + state: __WEBPACK_IMPORTED_MODULE_1_prop_types__['object'], + onEnter: __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__['c' /* falsy */], + children: __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__['c' /* falsy */], + }, + + /* istanbul ignore next: sanity check */ + render: function render() { + true + ? true + ? __WEBPACK_IMPORTED_MODULE_3_invariant___default()( + false, + '<IndexRedirect> elements are for router configuration only and should not be rendered', + ) + : invariant(false) + : void 0; + }, + }); + + /* unused harmony default export */ var _unused_webpack_default_export = IndexRedirect; + + /***/ + }, + /* 599 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_create_react_class__ = __webpack_require__(37); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_create_react_class___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_create_react_class__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(10); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__routerWarning__ = __webpack_require__(70); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_invariant__ = __webpack_require__(14); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_invariant___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_3_invariant__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__RouteUtils__ = __webpack_require__(47); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__ = __webpack_require__(85); + + /** + * An <IndexRoute> is used to specify its parent's <Route indexRoute> in + * a JSX route config. + */ + /* eslint-disable react/require-render-return */ + var IndexRoute = __WEBPACK_IMPORTED_MODULE_0_create_react_class___default()({ + displayName: 'IndexRoute', + + statics: { + createRouteFromReactElement: function createRouteFromReactElement(element, parentRoute) { + /* istanbul ignore else: sanity check */ + if (parentRoute) { + parentRoute.indexRoute = Object( + __WEBPACK_IMPORTED_MODULE_4__RouteUtils__['a' /* createRouteFromReactElement */], + )(element); + } else { + true + ? Object(__WEBPACK_IMPORTED_MODULE_2__routerWarning__['a' /* default */])( + false, + 'An <IndexRoute> does not make sense at the root of your route config', + ) + : void 0; + } + }, + }, + + propTypes: { + path: __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__['c' /* falsy */], + component: __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__['a' /* component */], + components: __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__['b' /* components */], + getComponent: __WEBPACK_IMPORTED_MODULE_1_prop_types__['func'], + getComponents: __WEBPACK_IMPORTED_MODULE_1_prop_types__['func'], + }, + + /* istanbul ignore next: sanity check */ + render: function render() { + true + ? true + ? __WEBPACK_IMPORTED_MODULE_3_invariant___default()( + false, + '<IndexRoute> elements are for router configuration only and should not be rendered', + ) + : invariant(false) + : void 0; + }, + }); + + /* unused harmony default export */ var _unused_webpack_default_export = IndexRoute; + + /***/ + }, + /* 600 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_create_react_class__ = __webpack_require__(37); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_create_react_class___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_create_react_class__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(10); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant__ = __webpack_require__(14); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_2_invariant__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__RouteUtils__ = __webpack_require__(47); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__InternalPropTypes__ = __webpack_require__(85); + + /** + * A <Route> is used to declare which components are rendered to the + * page when the URL matches a given pattern. + * + * Routes are arranged in a nested tree structure. When a new URL is + * requested, the tree is searched depth-first to find a route whose + * path matches the URL. When one is found, all routes in the tree + * that lead to it are considered "active" and their components are + * rendered into the DOM, nested in the same order as in the tree. + */ + /* eslint-disable react/require-render-return */ + var Route = __WEBPACK_IMPORTED_MODULE_0_create_react_class___default()({ + displayName: 'Route', + + statics: { + createRouteFromReactElement: + __WEBPACK_IMPORTED_MODULE_3__RouteUtils__['a' /* createRouteFromReactElement */], + }, + + propTypes: { + path: __WEBPACK_IMPORTED_MODULE_1_prop_types__['string'], + component: __WEBPACK_IMPORTED_MODULE_4__InternalPropTypes__['a' /* component */], + components: __WEBPACK_IMPORTED_MODULE_4__InternalPropTypes__['b' /* components */], + getComponent: __WEBPACK_IMPORTED_MODULE_1_prop_types__['func'], + getComponents: __WEBPACK_IMPORTED_MODULE_1_prop_types__['func'], + }, + + /* istanbul ignore next: sanity check */ + render: function render() { + true + ? true + ? __WEBPACK_IMPORTED_MODULE_2_invariant___default()( + false, + '<Route> elements are for router configuration only and should not be rendered', + ) + : invariant(false) + : void 0; + }, + }); + + /* harmony default export */ __webpack_exports__['a'] = Route; + + /***/ + }, + /* 601 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_Actions__ = __webpack_require__(110); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_Actions___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_history_lib_Actions__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(14); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_invariant__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__createMemoryHistory__ = __webpack_require__(258); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__createTransitionManager__ = + __webpack_require__(253); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__RouteUtils__ = __webpack_require__(47); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__RouterUtils__ = __webpack_require__(255); + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + function _objectWithoutProperties(obj, keys) { + var target = {}; + for (var i in obj) { + if (keys.indexOf(i) >= 0) continue; + if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; + target[i] = obj[i]; + } + return target; + } + + /** + * A high-level API to be used for server-side rendering. + * + * This function matches a location to a set of routes and calls + * callback(error, redirectLocation, renderProps) when finished. + * + * Note: You probably don't want to use this in a browser unless you're using + * server-side rendering with async routes. + */ + function match(_ref, callback) { + var history = _ref.history, + routes = _ref.routes, + location = _ref.location, + options = _objectWithoutProperties(_ref, ['history', 'routes', 'location']); + + !(history || location) + ? true + ? __WEBPACK_IMPORTED_MODULE_1_invariant___default()(false, 'match needs a history or a location') + : invariant(false) + : void 0; + + history = history + ? history + : Object(__WEBPACK_IMPORTED_MODULE_2__createMemoryHistory__['a' /* default */])(options); + var transitionManager = Object( + __WEBPACK_IMPORTED_MODULE_3__createTransitionManager__['a' /* default */], + )(history, Object(__WEBPACK_IMPORTED_MODULE_4__RouteUtils__['b' /* createRoutes */])(routes)); + + if (location) { + // Allow match({ location: '/the/path', ... }) + location = history.createLocation(location); + } else { + location = history.getCurrentLocation(); + } + + transitionManager.match(location, function (error, redirectLocation, nextState) { + var renderProps = void 0; + + if (nextState) { + var router = Object(__WEBPACK_IMPORTED_MODULE_5__RouterUtils__['b' /* createRouterObject */])( + history, + transitionManager, + nextState, + ); + renderProps = _extends({}, nextState, { + router: router, + matchContext: { transitionManager: transitionManager, router: router }, + }); + } + + callback( + error, + redirectLocation && + history.createLocation( + redirectLocation, + __WEBPACK_IMPORTED_MODULE_0_history_lib_Actions__['REPLACE'], + ), + renderProps, + ); + }); + } + + /* harmony default export */ __webpack_exports__['a'] = match; + + /***/ + }, + /* 602 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var strictUriEncode = __webpack_require__(603); + var objectAssign = __webpack_require__(63); + + function encoderForArrayFormat(opts) { + switch (opts.arrayFormat) { + case 'index': + return function (key, value, index) { + return value === null + ? [encode(key, opts), '[', index, ']'].join('') + : [encode(key, opts), '[', encode(index, opts), ']=', encode(value, opts)].join(''); + }; + + case 'bracket': + return function (key, value) { + return value === null + ? encode(key, opts) + : [encode(key, opts), '[]=', encode(value, opts)].join(''); + }; + + default: + return function (key, value) { + return value === null + ? encode(key, opts) + : [encode(key, opts), '=', encode(value, opts)].join(''); + }; + } + } + + function parserForArrayFormat(opts) { + var result; + + switch (opts.arrayFormat) { + case 'index': + return function (key, value, accumulator) { + result = /\[(\d*)\]$/.exec(key); + + key = key.replace(/\[\d*\]$/, ''); + + if (!result) { + accumulator[key] = value; + return; + } + + if (accumulator[key] === undefined) { + accumulator[key] = {}; + } + + accumulator[key][result[1]] = value; + }; + + case 'bracket': + return function (key, value, accumulator) { + result = /(\[\])$/.exec(key); + key = key.replace(/\[\]$/, ''); + + if (!result) { + accumulator[key] = value; + return; + } else if (accumulator[key] === undefined) { + accumulator[key] = [value]; + return; + } + + accumulator[key] = [].concat(accumulator[key], value); + }; + + default: + return function (key, value, accumulator) { + if (accumulator[key] === undefined) { + accumulator[key] = value; + return; + } + + accumulator[key] = [].concat(accumulator[key], value); + }; + } + } + + function encode(value, opts) { + if (opts.encode) { + return opts.strict ? strictUriEncode(value) : encodeURIComponent(value); + } + + return value; + } + + function keysSorter(input) { + if (Array.isArray(input)) { + return input.sort(); + } else if (typeof input === 'object') { + return keysSorter(Object.keys(input)) + .sort(function (a, b) { + return Number(a) - Number(b); + }) + .map(function (key) { + return input[key]; + }); + } + + return input; + } + + exports.extract = function (str) { + return str.split('?')[1] || ''; + }; + + exports.parse = function (str, opts) { + opts = objectAssign({ arrayFormat: 'none' }, opts); + + var formatter = parserForArrayFormat(opts); + + // Create an object with no prototype + // https://github.com/sindresorhus/query-string/issues/47 + var ret = Object.create(null); + + if (typeof str !== 'string') { + return ret; + } + + str = str.trim().replace(/^(\?|#|&)/, ''); + + if (!str) { + return ret; + } + + str.split('&').forEach(function (param) { + var parts = param.replace(/\+/g, ' ').split('='); + // Firefox (pre 40) decodes `%3D` to `=` + // https://github.com/sindresorhus/query-string/pull/37 + var key = parts.shift(); + var val = parts.length > 0 ? parts.join('=') : undefined; + + // missing `=` should be `null`: + // http://w3.org/TR/2012/WD-url-20120524/#collect-url-parameters + val = val === undefined ? null : decodeURIComponent(val); + + formatter(decodeURIComponent(key), val, ret); + }); + + return Object.keys(ret) + .sort() + .reduce(function (result, key) { + var val = ret[key]; + if (Boolean(val) && typeof val === 'object' && !Array.isArray(val)) { + // Sort object keys, not values + result[key] = keysSorter(val); + } else { + result[key] = val; + } + + return result; + }, Object.create(null)); + }; + + exports.stringify = function (obj, opts) { + var defaults = { + encode: true, + strict: true, + arrayFormat: 'none', + }; + + opts = objectAssign(defaults, opts); + + var formatter = encoderForArrayFormat(opts); + + return obj + ? Object.keys(obj) + .sort() + .map(function (key) { + var val = obj[key]; + + if (val === undefined) { + return ''; + } + + if (val === null) { + return encode(key, opts); + } + + if (Array.isArray(val)) { + var result = []; + + val.slice().forEach(function (val2) { + if (val2 === undefined) { + return; + } + + result.push(formatter(key, val2, result.length)); + }); + + return result.join('&'); + } + + return encode(key, opts) + '=' + encode(val, opts); + }) + .filter(function (x) { + return x.length > 0; + }) + .join('&') + : ''; + }; + + /***/ + }, + /* 603 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + module.exports = function (str) { + return encodeURIComponent(str).replace(/[!'()*]/g, function (c) { + return '%' + c.charCodeAt(0).toString(16).toUpperCase(); + }); + }; + + /***/ + }, + /* 604 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + var _warning = __webpack_require__(46); + + var _warning2 = _interopRequireDefault(_warning); + + var _invariant = __webpack_require__(14); + + var _invariant2 = _interopRequireDefault(_invariant); + + var _LocationUtils = __webpack_require__(72); + + var _PathUtils = __webpack_require__(48); + + var _createHistory = __webpack_require__(171); + + var _createHistory2 = _interopRequireDefault(_createHistory); + + var _Actions = __webpack_require__(110); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + var createStateStorage = function createStateStorage(entries) { + return entries + .filter(function (entry) { + return entry.state; + }) + .reduce(function (memo, entry) { + memo[entry.key] = entry.state; + return memo; + }, {}); + }; + + var createMemoryHistory = function createMemoryHistory() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + + if (Array.isArray(options)) { + options = { entries: options }; + } else if (typeof options === 'string') { + options = { entries: [options] }; + } + + var getCurrentLocation = function getCurrentLocation() { + var entry = entries[current]; + var path = (0, _PathUtils.createPath)(entry); + + var key = void 0, + state = void 0; + if (entry.key) { + key = entry.key; + state = readState(key); + } + + var init = (0, _PathUtils.parsePath)(path); + + return (0, _LocationUtils.createLocation)(_extends({}, init, { state: state }), undefined, key); + }; + + var canGo = function canGo(n) { + var index = current + n; + return index >= 0 && index < entries.length; + }; + + var go = function go(n) { + if (!n) return; + + if (!canGo(n)) { + true ? (0, _warning2.default)(false, 'Cannot go(%s) there is not enough history', n) : void 0; + + return; + } + + current += n; + var currentLocation = getCurrentLocation(); + + // Change action to POP + history.transitionTo(_extends({}, currentLocation, { action: _Actions.POP })); + }; + + var pushLocation = function pushLocation(location) { + current += 1; + + if (current < entries.length) entries.splice(current); + + entries.push(location); + + saveState(location.key, location.state); + }; + + var replaceLocation = function replaceLocation(location) { + entries[current] = location; + saveState(location.key, location.state); + }; + + var history = (0, _createHistory2.default)( + _extends({}, options, { + getCurrentLocation: getCurrentLocation, + pushLocation: pushLocation, + replaceLocation: replaceLocation, + go: go, + }), + ); + + var _options = options, + entries = _options.entries, + current = _options.current; + + if (typeof entries === 'string') { + entries = [entries]; + } else if (!Array.isArray(entries)) { + entries = ['/']; + } + + entries = entries.map(function (entry) { + return (0, _LocationUtils.createLocation)(entry); + }); + + if (current == null) { + current = entries.length - 1; + } else { + !(current >= 0 && current < entries.length) + ? true + ? (0, _invariant2.default)( + false, + 'Current index must be >= 0 and < %s, was %s', + entries.length, + current, + ) + : (0, _invariant2.default)(false) + : void 0; + } + + var storage = createStateStorage(entries); + + var saveState = function saveState(key, state) { + return (storage[key] = state); + }; + + var readState = function readState(key) { + return storage[key]; + }; + + return _extends({}, history, { + canGo: canGo, + }); + }; + + exports.default = createMemoryHistory; + + /***/ + }, + /* 605 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + var loopAsync = (exports.loopAsync = function loopAsync(turns, work, callback) { + var currentTurn = 0, + isDone = false; + var isSync = false, + hasNext = false, + doneArgs = void 0; + + var done = function done() { + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + isDone = true; + + if (isSync) { + // Iterate instead of recursing if possible. + doneArgs = args; + return; + } + + callback.apply(undefined, args); + }; + + var next = function next() { + if (isDone) return; + + hasNext = true; + + if (isSync) return; // Iterate instead of recursing if possible. + + isSync = true; + + while (!isDone && currentTurn < turns && hasNext) { + hasNext = false; + work(currentTurn++, next, done); + } + + isSync = false; + + if (isDone) { + // This means the loop finished synchronously. + callback.apply(undefined, doneArgs); + return; + } + + if (currentTurn >= turns && hasNext) { + isDone = true; + callback(); + } + }; + + next(); + }); + + /***/ + }, + /* 606 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__RouterContext__ = __webpack_require__(167); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__routerWarning__ = __webpack_require__(70); + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + /* unused harmony default export */ var _unused_webpack_default_export = function () { + for (var _len = arguments.length, middlewares = Array(_len), _key = 0; _key < _len; _key++) { + middlewares[_key] = arguments[_key]; + } + + if (true) { + middlewares.forEach(function (middleware, index) { + true + ? Object(__WEBPACK_IMPORTED_MODULE_2__routerWarning__['a' /* default */])( + middleware.renderRouterContext || middleware.renderRouteComponent, + 'The middleware specified at index ' + + index + + ' does not appear to be ' + + 'a valid React Router middleware.', + ) + : void 0; + }); + } + + var withContext = middlewares + .map(function (middleware) { + return middleware.renderRouterContext; + }) + .filter(Boolean); + var withComponent = middlewares + .map(function (middleware) { + return middleware.renderRouteComponent; + }) + .filter(Boolean); + + var makeCreateElement = function makeCreateElement() { + var baseCreateElement = + arguments.length > 0 && arguments[0] !== undefined + ? arguments[0] + : __WEBPACK_IMPORTED_MODULE_0_react__['createElement']; + return function (Component, props) { + return withComponent.reduceRight( + function (previous, renderRouteComponent) { + return renderRouteComponent(previous, props); + }, + baseCreateElement(Component, props), + ); + }; + }; + + return function (renderProps) { + return withContext.reduceRight( + function (previous, renderRouterContext) { + return renderRouterContext(previous, renderProps); + }, + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_1__RouterContext__['a' /* default */], + _extends({}, renderProps, { + createElement: makeCreateElement(renderProps.createElement), + }), + ), + ); + }; + }; + + /***/ + }, + /* 607 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_createBrowserHistory__ = + __webpack_require__(608); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_createBrowserHistory___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_history_lib_createBrowserHistory__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__createRouterHistory__ = __webpack_require__(263); + + /* unused harmony default export */ var _unused_webpack_default_export = Object( + __WEBPACK_IMPORTED_MODULE_1__createRouterHistory__['a' /* default */], + )(__WEBPACK_IMPORTED_MODULE_0_history_lib_createBrowserHistory___default.a); + + /***/ + }, + /* 608 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + var _invariant = __webpack_require__(14); + + var _invariant2 = _interopRequireDefault(_invariant); + + var _ExecutionEnvironment = __webpack_require__(172); + + var _BrowserProtocol = __webpack_require__(173); + + var BrowserProtocol = _interopRequireWildcard(_BrowserProtocol); + + var _RefreshProtocol = __webpack_require__(609); + + var RefreshProtocol = _interopRequireWildcard(_RefreshProtocol); + + var _DOMUtils = __webpack_require__(111); + + var _createHistory = __webpack_require__(171); + + var _createHistory2 = _interopRequireDefault(_createHistory); + + function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; + } + } + newObj.default = obj; + return newObj; + } + } + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + /** + * Creates and returns a history object that uses HTML5's history API + * (pushState, replaceState, and the popstate event) to manage history. + * This is the recommended method of managing history in browsers because + * it provides the cleanest URLs. + * + * Note: In browsers that do not support the HTML5 history API full + * page reloads will be used to preserve clean URLs. You can force this + * behavior using { forceRefresh: true } in options. + */ + var createBrowserHistory = function createBrowserHistory() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + + !_ExecutionEnvironment.canUseDOM + ? true + ? (0, _invariant2.default)(false, 'Browser history needs a DOM') + : (0, _invariant2.default)(false) + : void 0; + + var useRefresh = options.forceRefresh || !(0, _DOMUtils.supportsHistory)(); + var Protocol = useRefresh ? RefreshProtocol : BrowserProtocol; + + var getUserConfirmation = Protocol.getUserConfirmation, + getCurrentLocation = Protocol.getCurrentLocation, + pushLocation = Protocol.pushLocation, + replaceLocation = Protocol.replaceLocation, + go = Protocol.go; + + var history = (0, _createHistory2.default)( + _extends( + { + getUserConfirmation: getUserConfirmation, + }, + options, + { + getCurrentLocation: getCurrentLocation, + pushLocation: pushLocation, + replaceLocation: replaceLocation, + go: go, + }, + ), + ); + + var listenerCount = 0, + stopListener = void 0; + + var startListener = function startListener(listener, before) { + if (++listenerCount === 1) stopListener = BrowserProtocol.startListener(history.transitionTo); + + var unlisten = before ? history.listenBefore(listener) : history.listen(listener); + + return function () { + unlisten(); + + if (--listenerCount === 0) stopListener(); + }; + }; + + var listenBefore = function listenBefore(listener) { + return startListener(listener, true); + }; + + var listen = function listen(listener) { + return startListener(listener, false); + }; + + return _extends({}, history, { + listenBefore: listenBefore, + listen: listen, + }); + }; + + exports.default = createBrowserHistory; + + /***/ + }, + /* 609 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + exports.replaceLocation = + exports.pushLocation = + exports.getCurrentLocation = + exports.go = + exports.getUserConfirmation = + undefined; + + var _BrowserProtocol = __webpack_require__(173); + + Object.defineProperty(exports, 'getUserConfirmation', { + enumerable: true, + get: function get() { + return _BrowserProtocol.getUserConfirmation; + }, + }); + Object.defineProperty(exports, 'go', { + enumerable: true, + get: function get() { + return _BrowserProtocol.go; + }, + }); + + var _LocationUtils = __webpack_require__(72); + + var _PathUtils = __webpack_require__(48); + + var getCurrentLocation = (exports.getCurrentLocation = function getCurrentLocation() { + return (0, _LocationUtils.createLocation)(window.location); + }); + + var pushLocation = (exports.pushLocation = function pushLocation(location) { + window.location.href = (0, _PathUtils.createPath)(location); + return false; // Don't update location + }); + + var replaceLocation = (exports.replaceLocation = function replaceLocation(location) { + window.location.replace((0, _PathUtils.createPath)(location)); + return false; // Don't update location + }); + + /***/ + }, + /* 610 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_createHashHistory__ = + __webpack_require__(611); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_createHashHistory___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_history_lib_createHashHistory__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__createRouterHistory__ = __webpack_require__(263); + + /* unused harmony default export */ var _unused_webpack_default_export = Object( + __WEBPACK_IMPORTED_MODULE_1__createRouterHistory__['a' /* default */], + )(__WEBPACK_IMPORTED_MODULE_0_history_lib_createHashHistory___default.a); + + /***/ + }, + /* 611 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + var _warning = __webpack_require__(46); + + var _warning2 = _interopRequireDefault(_warning); + + var _invariant = __webpack_require__(14); + + var _invariant2 = _interopRequireDefault(_invariant); + + var _ExecutionEnvironment = __webpack_require__(172); + + var _DOMUtils = __webpack_require__(111); + + var _HashProtocol = __webpack_require__(612); + + var HashProtocol = _interopRequireWildcard(_HashProtocol); + + var _createHistory = __webpack_require__(171); + + var _createHistory2 = _interopRequireDefault(_createHistory); + + function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; + } + } + newObj.default = obj; + return newObj; + } + } + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + var DefaultQueryKey = '_k'; + + var addLeadingSlash = function addLeadingSlash(path) { + return path.charAt(0) === '/' ? path : '/' + path; + }; + + var HashPathCoders = { + hashbang: { + encodePath: function encodePath(path) { + return path.charAt(0) === '!' ? path : '!' + path; + }, + decodePath: function decodePath(path) { + return path.charAt(0) === '!' ? path.substring(1) : path; + }, + }, + noslash: { + encodePath: function encodePath(path) { + return path.charAt(0) === '/' ? path.substring(1) : path; + }, + decodePath: addLeadingSlash, + }, + slash: { + encodePath: addLeadingSlash, + decodePath: addLeadingSlash, + }, + }; + + var createHashHistory = function createHashHistory() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + + !_ExecutionEnvironment.canUseDOM + ? true + ? (0, _invariant2.default)(false, 'Hash history needs a DOM') + : (0, _invariant2.default)(false) + : void 0; + + var queryKey = options.queryKey, + hashType = options.hashType; + + true + ? (0, _warning2.default)( + queryKey !== false, + "Using { queryKey: false } no longer works. Instead, just don't " + + "use location state if you don't want a key in your URL query string", + ) + : void 0; + + if (typeof queryKey !== 'string') queryKey = DefaultQueryKey; + + if (hashType == null) hashType = 'slash'; + + if (!(hashType in HashPathCoders)) { + true ? (0, _warning2.default)(false, 'Invalid hash type: %s', hashType) : void 0; + + hashType = 'slash'; + } + + var pathCoder = HashPathCoders[hashType]; + + var getUserConfirmation = HashProtocol.getUserConfirmation; + + var getCurrentLocation = function getCurrentLocation() { + return HashProtocol.getCurrentLocation(pathCoder, queryKey); + }; + + var pushLocation = function pushLocation(location) { + return HashProtocol.pushLocation(location, pathCoder, queryKey); + }; + + var replaceLocation = function replaceLocation(location) { + return HashProtocol.replaceLocation(location, pathCoder, queryKey); + }; + + var history = (0, _createHistory2.default)( + _extends( + { + getUserConfirmation: getUserConfirmation, + }, + options, + { + getCurrentLocation: getCurrentLocation, + pushLocation: pushLocation, + replaceLocation: replaceLocation, + go: HashProtocol.go, + }, + ), + ); + + var listenerCount = 0, + stopListener = void 0; + + var startListener = function startListener(listener, before) { + if (++listenerCount === 1) + stopListener = HashProtocol.startListener(history.transitionTo, pathCoder, queryKey); + + var unlisten = before ? history.listenBefore(listener) : history.listen(listener); + + return function () { + unlisten(); + + if (--listenerCount === 0) stopListener(); + }; + }; + + var listenBefore = function listenBefore(listener) { + return startListener(listener, true); + }; + + var listen = function listen(listener) { + return startListener(listener, false); + }; + + var goIsSupportedWithoutReload = (0, _DOMUtils.supportsGoWithoutReloadUsingHash)(); + + var go = function go(n) { + true + ? (0, _warning2.default)( + goIsSupportedWithoutReload, + 'Hash history go(n) causes a full page reload in this browser', + ) + : void 0; + + history.go(n); + }; + + var createHref = function createHref(path) { + return '#' + pathCoder.encodePath(history.createHref(path)); + }; + + return _extends({}, history, { + listenBefore: listenBefore, + listen: listen, + go: go, + createHref: createHref, + }); + }; + + exports.default = createHashHistory; + + /***/ + }, + /* 612 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + exports.replaceLocation = + exports.pushLocation = + exports.startListener = + exports.getCurrentLocation = + exports.go = + exports.getUserConfirmation = + undefined; + + var _BrowserProtocol = __webpack_require__(173); + + Object.defineProperty(exports, 'getUserConfirmation', { + enumerable: true, + get: function get() { + return _BrowserProtocol.getUserConfirmation; + }, + }); + Object.defineProperty(exports, 'go', { + enumerable: true, + get: function get() { + return _BrowserProtocol.go; + }, + }); + + var _warning = __webpack_require__(46); + + var _warning2 = _interopRequireDefault(_warning); + + var _LocationUtils = __webpack_require__(72); + + var _DOMUtils = __webpack_require__(111); + + var _DOMStateStorage = __webpack_require__(262); + + var _PathUtils = __webpack_require__(48); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + var HashChangeEvent = 'hashchange'; + + var getHashPath = function getHashPath() { + // We can't use window.location.hash here because it's not + // consistent across browsers - Firefox will pre-decode it! + var href = window.location.href; + var hashIndex = href.indexOf('#'); + return hashIndex === -1 ? '' : href.substring(hashIndex + 1); + }; + + var pushHashPath = function pushHashPath(path) { + return (window.location.hash = path); + }; + + var replaceHashPath = function replaceHashPath(path) { + var hashIndex = window.location.href.indexOf('#'); + + window.location.replace(window.location.href.slice(0, hashIndex >= 0 ? hashIndex : 0) + '#' + path); + }; + + var getCurrentLocation = (exports.getCurrentLocation = function getCurrentLocation( + pathCoder, + queryKey, + ) { + var path = pathCoder.decodePath(getHashPath()); + var key = (0, _PathUtils.getQueryStringValueFromPath)(path, queryKey); + + var state = void 0; + if (key) { + path = (0, _PathUtils.stripQueryStringValueFromPath)(path, queryKey); + state = (0, _DOMStateStorage.readState)(key); + } + + var init = (0, _PathUtils.parsePath)(path); + init.state = state; + + return (0, _LocationUtils.createLocation)(init, undefined, key); + }); + + var prevLocation = void 0; + + var startListener = (exports.startListener = function startListener(listener, pathCoder, queryKey) { + var handleHashChange = function handleHashChange() { + var path = getHashPath(); + var encodedPath = pathCoder.encodePath(path); + + if (path !== encodedPath) { + // Always be sure we have a properly-encoded hash. + replaceHashPath(encodedPath); + } else { + var currentLocation = getCurrentLocation(pathCoder, queryKey); + + if (prevLocation && currentLocation.key && prevLocation.key === currentLocation.key) return; // Ignore extraneous hashchange events + + prevLocation = currentLocation; + + listener(currentLocation); + } + }; + + // Ensure the hash is encoded properly. + var path = getHashPath(); + var encodedPath = pathCoder.encodePath(path); + + if (path !== encodedPath) replaceHashPath(encodedPath); + + (0, _DOMUtils.addEventListener)(window, HashChangeEvent, handleHashChange); + + return function () { + return (0, _DOMUtils.removeEventListener)(window, HashChangeEvent, handleHashChange); + }; + }); + + var updateLocation = function updateLocation(location, pathCoder, queryKey, updateHash) { + var state = location.state, + key = location.key; + + var path = pathCoder.encodePath((0, _PathUtils.createPath)(location)); + + if (state !== undefined) { + path = (0, _PathUtils.addQueryStringValueToPath)(path, queryKey, key); + (0, _DOMStateStorage.saveState)(key, state); + } + + prevLocation = location; + + updateHash(path); + }; + + var pushLocation = (exports.pushLocation = function pushLocation(location, pathCoder, queryKey) { + return updateLocation(location, pathCoder, queryKey, function (path) { + if (getHashPath() !== path) { + pushHashPath(path); + } else { + true ? (0, _warning2.default)(false, 'You cannot PUSH the same path using hash history') : void 0; + } + }); + }); + + var replaceLocation = (exports.replaceLocation = function replaceLocation( + location, + pathCoder, + queryKey, + ) { + return updateLocation(location, pathCoder, queryKey, function (path) { + if (getHashPath() !== path) replaceHashPath(path); + }); + }); + + /***/ + }, + /* 613 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_router__ = __webpack_require__(84); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__components_RouterLayout__ = + __webpack_require__(614); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__components_RouterFirstPage__ = + __webpack_require__(615); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__components_RouterSecondPage__ = + __webpack_require__(616); + + var _default = __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_1_react_router__['b' /* Route */], + { + path: 'react_router', + component: __WEBPACK_IMPORTED_MODULE_2__components_RouterLayout__['a' /* default */], + }, + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_1_react_router__['b' /* Route */], + { + path: 'first_page', + component: __WEBPACK_IMPORTED_MODULE_3__components_RouterFirstPage__['a' /* default */], + }, + ), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_1_react_router__['b' /* Route */], + { + path: 'second_page', + component: __WEBPACK_IMPORTED_MODULE_4__components_RouterSecondPage__['a' /* default */], + }, + ), + ); + + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/routes/routes.jsx', + ); + })(); + + /***/ + }, + /* 614 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(10); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_router__ = __webpack_require__(84); + + var RouterLayout = function RouterLayout(_ref) { + var children = _ref.children; + return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'div', + { className: 'container' }, + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('h1', null, 'React Router is working!'), + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'p', + null, + 'Woohoo, we can use ', + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('code', null, 'react-router'), + ' here!', + ), + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'ul', + null, + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'li', + null, + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_2_react_router__['a' /* Link */], + { to: '/react_router' }, + 'React Router Layout Only', + ), + ), + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'li', + null, + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_2_react_router__['a' /* Link */], + { to: '/react_router/first_page' }, + 'Router First Page', + ), + ), + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'li', + null, + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_2_react_router__['a' /* Link */], + { to: '/react_router/second_page' }, + 'Router Second Page', + ), + ), + ), + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('hr', null), + children, + ); + }; + + RouterLayout.propTypes = { + children: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object, + }; + + var _default = RouterLayout; + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + RouterLayout, + 'RouterLayout', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/RouterLayout.jsx', + ); + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/RouterLayout.jsx', + ); + })(); + + /***/ + }, + /* 615 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + + var RouterFirstPage = function RouterFirstPage() { + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'div', + { className: 'container' }, + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('h2', null, 'React Router First Page'), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'p', + null, + 'This page brought to you by React Router', + ), + ); + }; + + var _default = RouterFirstPage; + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + RouterFirstPage, + 'RouterFirstPage', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/RouterFirstPage.jsx', + ); + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/RouterFirstPage.jsx', + ); + })(); + + /***/ + }, + /* 616 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + + var RouterSecondPage = function RouterSecondPage() { + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'div', + { className: 'container' }, + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('h2', null, 'React Router Second Page'), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'p', + null, + 'This page brought to you by React Router', + ), + ); + }; + + var _default = RouterSecondPage; + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + RouterSecondPage, + 'RouterSecondPage', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/RouterSecondPage.jsx', + ); + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/RouterSecondPage.jsx', + ); + })(); + + /***/ + }, + /* 617 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + /* eslint-disable react/prop-types */ + + var _default = function _default(props) { + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('h1', null, props.title); + }; + + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/PureComponent.jsx', + ); + })(); + + /***/ + }, + /* 618 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__CssModulesImagesFontsExample_scss__ = + __webpack_require__(619); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__CssModulesImagesFontsExample_scss___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__CssModulesImagesFontsExample_scss__); + /* eslint-disable react/prop-types */ + + var _default = function _default(_props, _railsContext) { + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'div', + null, + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'h1', + { className: __WEBPACK_IMPORTED_MODULE_1__CssModulesImagesFontsExample_scss___default.a.heading }, + 'This should be open sans light', + ), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'div', + null, + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'h2', + null, + 'Last Call (relative path)', + ), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div', { + className: __WEBPACK_IMPORTED_MODULE_1__CssModulesImagesFontsExample_scss___default.a.lastCall, + }), + ), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'div', + null, + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('h2', null, 'Check (URL encoded)'), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div', { + className: __WEBPACK_IMPORTED_MODULE_1__CssModulesImagesFontsExample_scss___default.a.check, + }), + ), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'div', + null, + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'h2', + null, + 'Rails on Maui Logo (absolute path)', + ), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div', { + className: + __WEBPACK_IMPORTED_MODULE_1__CssModulesImagesFontsExample_scss___default.a.railsOnMaui, + }), + ), + ); + }; + + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/CssModulesImagesFontsExample.jsx', + ); + })(); + + /***/ + }, + /* 619 */ + /***/ function (module, exports) { + module.exports = { + heading: 'CssModulesImagesFontsExample__heading__2GwOW', + check: 'CssModulesImagesFontsExample__check__Fa5t1', + lastCall: 'CssModulesImagesFontsExample__lastCall__2o_LE', + railsOnMaui: 'CssModulesImagesFontsExample__railsOnMaui__3s9ht', + }; + + /***/ + }, + /* 620 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_redux__ = __webpack_require__(109); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_redux_thunk__ = __webpack_require__(249); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__reducers_reducersIndex__ = + __webpack_require__(250); + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + /* + * Export a function that takes the props and returns a Redux store + * This is used so that 2 components can have the same store. + */ + + var _default = function _default(props, railsContext) { + var combinedReducer = Object(__WEBPACK_IMPORTED_MODULE_0_redux__['c' /* combineReducers */])( + __WEBPACK_IMPORTED_MODULE_2__reducers_reducersIndex__['a' /* default */], + ); + var newProps = _extends({}, props, { railsContext: railsContext }); + return Object(__WEBPACK_IMPORTED_MODULE_0_redux__['a' /* applyMiddleware */])( + __WEBPACK_IMPORTED_MODULE_1_redux_thunk__['a' /* default */], + )(__WEBPACK_IMPORTED_MODULE_0_redux__['d' /* createStore */])(combinedReducer, newProps); + }; + + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/stores/SharedReduxStore.jsx', + ); + })(); + + /***/ + }, + /* 621 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_router__ = __webpack_require__(84); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__components_DeferredRender__ = + __webpack_require__(622); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__components_DeferredRenderAsyncPage__ = + __webpack_require__(623); + + var DeferredRenderAppServer = function DeferredRenderAppServer(_props, railsContext) { + var error = void 0; + var redirectLocation = void 0; + var routerProps = void 0; + + var location = railsContext.location; + + var routes = { + path: '/deferred_render_with_server_rendering', + component: __WEBPACK_IMPORTED_MODULE_2__components_DeferredRender__['a' /* default */], + childRoutes: [ + { + path: '/deferred_render_with_server_rendering/async_page', + component: __WEBPACK_IMPORTED_MODULE_3__components_DeferredRenderAsyncPage__['a' /* default */], + }, + ], + }; + + // Unlike the match in DeferredRenderAppRenderer, this match is always + // syncronous because we directly require all the routes. Do not do anything + // asyncronous in code that will run on the server. + Object(__WEBPACK_IMPORTED_MODULE_1_react_router__['d' /* match */])( + { location: location, routes: routes }, + function (_error, _redirectLocation, _routerProps) { + error = _error; + redirectLocation = _redirectLocation; + routerProps = _routerProps; + }, + ); + + if (error || redirectLocation) { + return { error: error, redirectLocation: redirectLocation }; + } + + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_1_react_router__['c' /* RouterContext */], + routerProps, + ); + }; + + var _default = DeferredRenderAppServer; + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + DeferredRenderAppServer, + 'DeferredRenderAppServer', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/startup/DeferredRenderAppServer.jsx', + ); + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/startup/DeferredRenderAppServer.jsx', + ); + })(); + + /***/ + }, + /* 622 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(10); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_router__ = __webpack_require__(84); + + var DeferredRender = function DeferredRender(_ref) { + var children = _ref.children; + return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'div', + null, + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('h1', null, 'Deferred Rendering'), + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'p', + null, + "Here, we're testing async routes with server rendering. By deferring the initial render, we can prevent a client/server checksum mismatch error.", + ), + children || + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'p', + null, + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_2_react_router__['a' /* Link */], + { to: '/deferred_render_with_server_rendering/async_page' }, + 'Test Async Route', + ), + ), + ); + }; + + DeferredRender.propTypes = { + children: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.node, + }; + + var _default = DeferredRender; + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + DeferredRender, + 'DeferredRender', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/DeferredRender.jsx', + ); + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/DeferredRender.jsx', + ); + })(); + + /***/ + }, + /* 623 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + + var DeferredRenderAsyncPage = function DeferredRenderAsyncPage() { + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'div', + null, + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('p', null, 'Noice! It works.'), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'p', + null, + "Now, try reloading this page and looking at the developer console. There shouldn't be any client/server mismatch error from React.", + ), + ); + }; + + var _default = DeferredRenderAsyncPage; + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + DeferredRenderAsyncPage, + 'DeferredRenderAsyncPage', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/DeferredRenderAsyncPage.jsx', + ); + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/DeferredRenderAsyncPage.jsx', + ); + })(); + + /***/ + }, + /* 624 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_dom_server__ = __webpack_require__(107); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_dom_server___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_react_dom_server__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__components_EchoProps__ = __webpack_require__(625); + // Top level component for simple client side only rendering + + /* + * Export a function that takes the props and returns an object with { renderedHtml } + * Note, this is imported as "RenderedHtml" by "serverRegistration.jsx" + * + * Note, this is a fictional example, as you'd only use a generator function if you wanted to run + * some extra code, such as setting up Redux and React-Router. + * + * And the use of renderToString would probably be done with react-router v4 + * + */ + + var _default = function _default(props, _railsContext) { + var renderedHtml = Object(__WEBPACK_IMPORTED_MODULE_1_react_dom_server__['renderToString'])( + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_2__components_EchoProps__['a' /* default */], + props, + ), + ); + return { renderedHtml: renderedHtml }; + }; + + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/startup/ServerRenderedHtml.jsx', + ); + })(); + + /***/ + }, + /* 625 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + + var EchoProps = function EchoProps(props) { + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'div', + null, + 'Props: ', + JSON.stringify(props), + ); + }; + + var _default = EchoProps; + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + EchoProps, + 'EchoProps', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/EchoProps.jsx', + ); + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/EchoProps.jsx', + ); + })(); + + /***/ + }, + /* 626 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_dom_server__ = __webpack_require__(107); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_dom_server___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_react_dom_server__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_helmet__ = __webpack_require__(264); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_helmet___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_2_react_helmet__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__components_ReactHelmet__ = + __webpack_require__(631); + // Top level component for simple client side only rendering + + /* + * Export a function that takes the props and returns an object with { renderedHtml } + * This example shows returning renderedHtml as an object itself that contains rendered + * component markup and additional HTML strings. + * + * This is imported as "ReactHelmetApp" by "serverRegistration.jsx". Note that rendered + * component markup must go under "componentHtml" key. + */ + + var _default = function _default(props, _railsContext) { + var componentHtml = Object(__WEBPACK_IMPORTED_MODULE_1_react_dom_server__['renderToString'])( + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_3__components_ReactHelmet__['a' /* default */], + props, + ), + ); + var helmet = __WEBPACK_IMPORTED_MODULE_2_react_helmet__['Helmet'].renderStatic(); + + var renderedHtml = { + componentHtml: componentHtml, + title: helmet.title.toString(), + }; + return { renderedHtml: renderedHtml }; + }; + + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/startup/ReactHelmetServerApp.jsx', + ); + })(); + + /***/ + }, + /* 627 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + function _interopDefault(ex) { + return ex && typeof ex === 'object' && 'default' in ex ? ex['default'] : ex; + } + + var React = __webpack_require__(1); + var React__default = _interopDefault(React); + var shallowEqual = _interopDefault(__webpack_require__(628)); + + 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 _inheritsLoose(subClass, superClass) { + subClass.prototype = Object.create(superClass.prototype); + subClass.prototype.constructor = subClass; + subClass.__proto__ = superClass; + } + + var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement); + function withSideEffect(reducePropsToState, handleStateChangeOnClient, mapStateOnServer) { + if (typeof reducePropsToState !== 'function') { + throw new Error('Expected reducePropsToState to be a function.'); + } + + if (typeof handleStateChangeOnClient !== 'function') { + throw new Error('Expected handleStateChangeOnClient to be a function.'); + } + + if (typeof mapStateOnServer !== 'undefined' && typeof mapStateOnServer !== 'function') { + throw new Error('Expected mapStateOnServer to either be undefined or a function.'); + } + + function getDisplayName(WrappedComponent) { + return WrappedComponent.displayName || WrappedComponent.name || 'Component'; + } + + return function wrap(WrappedComponent) { + if (typeof WrappedComponent !== 'function') { + throw new Error('Expected WrappedComponent to be a React component.'); + } + + var mountedInstances = []; + var state; + + function emitChange() { + state = reducePropsToState( + mountedInstances.map(function (instance) { + return instance.props; + }), + ); + + if (SideEffect.canUseDOM) { + handleStateChangeOnClient(state); + } else if (mapStateOnServer) { + state = mapStateOnServer(state); + } + } + + var SideEffect = + /*#__PURE__*/ + (function (_Component) { + _inheritsLoose(SideEffect, _Component); + + function SideEffect() { + return _Component.apply(this, arguments) || this; + } + + // Try to use displayName of wrapped component + // Expose canUseDOM so tests can monkeypatch it + SideEffect.peek = function peek() { + return state; + }; + + SideEffect.rewind = function rewind() { + if (SideEffect.canUseDOM) { + throw new Error( + 'You may only call rewind() on the server. Call peek() to read the current state.', + ); + } + + var recordedState = state; + state = undefined; + mountedInstances = []; + return recordedState; + }; + + var _proto = SideEffect.prototype; + + _proto.shouldComponentUpdate = function shouldComponentUpdate(nextProps) { + return !shallowEqual(nextProps, this.props); + }; + + _proto.componentWillMount = function componentWillMount() { + mountedInstances.push(this); + emitChange(); + }; + + _proto.componentDidUpdate = function componentDidUpdate() { + emitChange(); + }; + + _proto.componentWillUnmount = function componentWillUnmount() { + var index = mountedInstances.indexOf(this); + mountedInstances.splice(index, 1); + emitChange(); + }; + + _proto.render = function render() { + return React__default.createElement(WrappedComponent, this.props); + }; + + return SideEffect; + })(React.Component); + + _defineProperty(SideEffect, 'displayName', 'SideEffect(' + getDisplayName(WrappedComponent) + ')'); + + _defineProperty(SideEffect, 'canUseDOM', canUseDOM); + + return SideEffect; + }; + } + + module.exports = withSideEffect; + + /***/ + }, + /* 628 */ + /***/ function (module, exports) { + // + + module.exports = function shallowEqual(objA, objB, compare, compareContext) { + var ret = compare ? compare.call(compareContext, objA, objB) : void 0; + + if (ret !== void 0) { + return !!ret; + } + + if (objA === objB) { + return true; + } + + if (typeof objA !== 'object' || !objA || typeof objB !== 'object' || !objB) { + return false; + } + + var keysA = Object.keys(objA); + var keysB = Object.keys(objB); + + if (keysA.length !== keysB.length) { + return false; + } + + var bHasOwnProperty = Object.prototype.hasOwnProperty.bind(objB); + + // Test for A's keys different from B. + for (var idx = 0; idx < keysA.length; idx++) { + var key = keysA[idx]; + + if (!bHasOwnProperty(key)) { + return false; + } + + var valueA = objA[key]; + var valueB = objB[key]; + + ret = compare ? compare.call(compareContext, valueA, valueB, key) : void 0; + + if (ret === false || (ret === void 0 && valueA !== valueB)) { + return false; + } + } + + return true; + }; + + /***/ + }, + /* 629 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var isArray = Array.isArray; + var keyList = Object.keys; + var hasProp = Object.prototype.hasOwnProperty; + var hasElementType = typeof Element !== 'undefined'; + + function equal(a, b) { + // fast-deep-equal index.js 2.0.1 + if (a === b) return true; + + if (a && b && typeof a == 'object' && typeof b == 'object') { + var arrA = isArray(a), + arrB = isArray(b), + i, + length, + key; + + if (arrA && arrB) { + length = a.length; + if (length != b.length) return false; + for (i = length; i-- !== 0; ) if (!equal(a[i], b[i])) return false; + return true; + } + + if (arrA != arrB) return false; + + var dateA = a instanceof Date, + dateB = b instanceof Date; + if (dateA != dateB) return false; + if (dateA && dateB) return a.getTime() == b.getTime(); + + var regexpA = a instanceof RegExp, + regexpB = b instanceof RegExp; + if (regexpA != regexpB) return false; + if (regexpA && regexpB) return a.toString() == b.toString(); + + var keys = keyList(a); + length = keys.length; + + if (length !== keyList(b).length) return false; + + for (i = length; i-- !== 0; ) if (!hasProp.call(b, keys[i])) return false; + // end fast-deep-equal + + // start react-fast-compare + // custom handling for DOM elements + if (hasElementType && a instanceof Element && b instanceof Element) return a === b; + + // custom handling for React + for (i = length; i-- !== 0; ) { + key = keys[i]; + if (key === '_owner' && a.$$typeof) { + // React-specific: avoid traversing React elements' _owner. + // _owner contains circular references + // and is not needed when comparing the actual elements (and not their owners) + // .$$typeof and ._store on just reasonable markers of a react element + continue; + } else { + // all other properties should be traversed as usual + if (!equal(a[key], b[key])) return false; + } + } + // end react-fast-compare + + // fast-deep-equal index.js 2.0.1 + return true; + } + + return a !== a && b !== b; + } + // end fast-deep-equal + + module.exports = function exportedEqual(a, b) { + try { + return equal(a, b); + } catch (error) { + if ((error.message && error.message.match(/stack|recursion/i)) || error.number === -2146828260) { + // warn on circular references, don't crash + // browsers give this different errors name and messages: + // chrome/safari: "RangeError", "Maximum call stack size exceeded" + // firefox: "InternalError", too much recursion" + // edge: "Error", "Out of stack space" + console.warn( + 'Warning: react-fast-compare does not handle circular references.', + error.name, + error.message, + ); + return false; + } + // some other error. we should definitely know about these + throw error; + } + }; + + /***/ + }, + /* 630 */ + /***/ function (module, exports, __webpack_require__) { + exports.__esModule = true; + exports.warn = + exports.requestAnimationFrame = + exports.reducePropsToState = + exports.mapStateOnServer = + exports.handleClientStateChange = + exports.convertReactPropstoHtmlAttributes = + undefined; + + var _typeof = + typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' + ? function (obj) { + return typeof obj; + } + : function (obj) { + return obj && + typeof Symbol === 'function' && + obj.constructor === Symbol && + obj !== Symbol.prototype + ? 'symbol' + : typeof obj; + }; + + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + var _react = __webpack_require__(1); + + var _react2 = _interopRequireDefault(_react); + + var _objectAssign = __webpack_require__(63); + + var _objectAssign2 = _interopRequireDefault(_objectAssign); + + var _HelmetConstants = __webpack_require__(265); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + var encodeSpecialCharacters = function encodeSpecialCharacters(str) { + var encode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + + if (encode === false) { + return String(str); + } + + return String(str) + .replace(/&/g, '&') + .replace(/</g, '<') + .replace(/>/g, '>') + .replace(/"/g, '"') + .replace(/'/g, '''); + }; + + var getTitleFromPropsList = function getTitleFromPropsList(propsList) { + var innermostTitle = getInnermostProperty(propsList, _HelmetConstants.TAG_NAMES.TITLE); + var innermostTemplate = getInnermostProperty(propsList, _HelmetConstants.HELMET_PROPS.TITLE_TEMPLATE); + + if (innermostTemplate && innermostTitle) { + // use function arg to avoid need to escape $ characters + return innermostTemplate.replace(/%s/g, function () { + return innermostTitle; + }); + } + + var innermostDefaultTitle = getInnermostProperty( + propsList, + _HelmetConstants.HELMET_PROPS.DEFAULT_TITLE, + ); + + return innermostTitle || innermostDefaultTitle || undefined; + }; + + var getOnChangeClientState = function getOnChangeClientState(propsList) { + return ( + getInnermostProperty(propsList, _HelmetConstants.HELMET_PROPS.ON_CHANGE_CLIENT_STATE) || + function () {} + ); + }; + + var getAttributesFromPropsList = function getAttributesFromPropsList(tagType, propsList) { + return propsList + .filter(function (props) { + return typeof props[tagType] !== 'undefined'; + }) + .map(function (props) { + return props[tagType]; + }) + .reduce(function (tagAttrs, current) { + return _extends({}, tagAttrs, current); + }, {}); + }; + + var getBaseTagFromPropsList = function getBaseTagFromPropsList(primaryAttributes, propsList) { + return propsList + .filter(function (props) { + return typeof props[_HelmetConstants.TAG_NAMES.BASE] !== 'undefined'; + }) + .map(function (props) { + return props[_HelmetConstants.TAG_NAMES.BASE]; + }) + .reverse() + .reduce(function (innermostBaseTag, tag) { + if (!innermostBaseTag.length) { + var keys = Object.keys(tag); + + for (var i = 0; i < keys.length; i++) { + var attributeKey = keys[i]; + var lowerCaseAttributeKey = attributeKey.toLowerCase(); + + if (primaryAttributes.indexOf(lowerCaseAttributeKey) !== -1 && tag[lowerCaseAttributeKey]) { + return innermostBaseTag.concat(tag); + } + } + } + + return innermostBaseTag; + }, []); + }; + + var getTagsFromPropsList = function getTagsFromPropsList(tagName, primaryAttributes, propsList) { + // Calculate list of tags, giving priority innermost component (end of the propslist) + var approvedSeenTags = {}; + + return propsList + .filter(function (props) { + if (Array.isArray(props[tagName])) { + return true; + } + if (typeof props[tagName] !== 'undefined') { + warn( + 'Helmet: ' + + tagName + + ' should be of type "Array". Instead found type "' + + _typeof(props[tagName]) + + '"', + ); + } + return false; + }) + .map(function (props) { + return props[tagName]; + }) + .reverse() + .reduce(function (approvedTags, instanceTags) { + var instanceSeenTags = {}; + + instanceTags + .filter(function (tag) { + var primaryAttributeKey = void 0; + var keys = Object.keys(tag); + for (var i = 0; i < keys.length; i++) { + var attributeKey = keys[i]; + var lowerCaseAttributeKey = attributeKey.toLowerCase(); + + // Special rule with link tags, since rel and href are both primary tags, rel takes priority + if ( + primaryAttributes.indexOf(lowerCaseAttributeKey) !== -1 && + !( + primaryAttributeKey === _HelmetConstants.TAG_PROPERTIES.REL && + tag[primaryAttributeKey].toLowerCase() === 'canonical' + ) && + !( + lowerCaseAttributeKey === _HelmetConstants.TAG_PROPERTIES.REL && + tag[lowerCaseAttributeKey].toLowerCase() === 'stylesheet' + ) + ) { + primaryAttributeKey = lowerCaseAttributeKey; + } + // Special case for innerHTML which doesn't work lowercased + if ( + primaryAttributes.indexOf(attributeKey) !== -1 && + (attributeKey === _HelmetConstants.TAG_PROPERTIES.INNER_HTML || + attributeKey === _HelmetConstants.TAG_PROPERTIES.CSS_TEXT || + attributeKey === _HelmetConstants.TAG_PROPERTIES.ITEM_PROP) + ) { + primaryAttributeKey = attributeKey; + } + } + + if (!primaryAttributeKey || !tag[primaryAttributeKey]) { + return false; + } + + var value = tag[primaryAttributeKey].toLowerCase(); + + if (!approvedSeenTags[primaryAttributeKey]) { + approvedSeenTags[primaryAttributeKey] = {}; + } + + if (!instanceSeenTags[primaryAttributeKey]) { + instanceSeenTags[primaryAttributeKey] = {}; + } + + if (!approvedSeenTags[primaryAttributeKey][value]) { + instanceSeenTags[primaryAttributeKey][value] = true; + return true; + } + + return false; + }) + .reverse() + .forEach(function (tag) { + return approvedTags.push(tag); + }); + + // Update seen tags with tags from this instance + var keys = Object.keys(instanceSeenTags); + for (var i = 0; i < keys.length; i++) { + var attributeKey = keys[i]; + var tagUnion = (0, _objectAssign2.default)( + {}, + approvedSeenTags[attributeKey], + instanceSeenTags[attributeKey], + ); + + approvedSeenTags[attributeKey] = tagUnion; + } + + return approvedTags; + }, []) + .reverse(); + }; + + var getInnermostProperty = function getInnermostProperty(propsList, property) { + for (var i = propsList.length - 1; i >= 0; i--) { + var props = propsList[i]; + + if (props.hasOwnProperty(property)) { + return props[property]; + } + } + + return null; + }; + + var reducePropsToState = function reducePropsToState(propsList) { + return { + baseTag: getBaseTagFromPropsList([_HelmetConstants.TAG_PROPERTIES.HREF], propsList), + bodyAttributes: getAttributesFromPropsList(_HelmetConstants.ATTRIBUTE_NAMES.BODY, propsList), + defer: getInnermostProperty(propsList, _HelmetConstants.HELMET_PROPS.DEFER), + encode: getInnermostProperty(propsList, _HelmetConstants.HELMET_PROPS.ENCODE_SPECIAL_CHARACTERS), + htmlAttributes: getAttributesFromPropsList(_HelmetConstants.ATTRIBUTE_NAMES.HTML, propsList), + linkTags: getTagsFromPropsList( + _HelmetConstants.TAG_NAMES.LINK, + [_HelmetConstants.TAG_PROPERTIES.REL, _HelmetConstants.TAG_PROPERTIES.HREF], + propsList, + ), + metaTags: getTagsFromPropsList( + _HelmetConstants.TAG_NAMES.META, + [ + _HelmetConstants.TAG_PROPERTIES.NAME, + _HelmetConstants.TAG_PROPERTIES.CHARSET, + _HelmetConstants.TAG_PROPERTIES.HTTPEQUIV, + _HelmetConstants.TAG_PROPERTIES.PROPERTY, + _HelmetConstants.TAG_PROPERTIES.ITEM_PROP, + ], + propsList, + ), + noscriptTags: getTagsFromPropsList( + _HelmetConstants.TAG_NAMES.NOSCRIPT, + [_HelmetConstants.TAG_PROPERTIES.INNER_HTML], + propsList, + ), + onChangeClientState: getOnChangeClientState(propsList), + scriptTags: getTagsFromPropsList( + _HelmetConstants.TAG_NAMES.SCRIPT, + [_HelmetConstants.TAG_PROPERTIES.SRC, _HelmetConstants.TAG_PROPERTIES.INNER_HTML], + propsList, + ), + styleTags: getTagsFromPropsList( + _HelmetConstants.TAG_NAMES.STYLE, + [_HelmetConstants.TAG_PROPERTIES.CSS_TEXT], + propsList, + ), + title: getTitleFromPropsList(propsList), + titleAttributes: getAttributesFromPropsList(_HelmetConstants.ATTRIBUTE_NAMES.TITLE, propsList), + }; + }; + + var rafPolyfill = (function () { + var clock = Date.now(); + + return function (callback) { + var currentTime = Date.now(); + + if (currentTime - clock > 16) { + clock = currentTime; + callback(currentTime); + } else { + setTimeout(function () { + rafPolyfill(callback); + }, 0); + } + }; + })(); + + var cafPolyfill = function cafPolyfill(id) { + return clearTimeout(id); + }; + + var requestAnimationFrame = + typeof window !== 'undefined' + ? window.requestAnimationFrame || + window.webkitRequestAnimationFrame || + window.mozRequestAnimationFrame || + rafPolyfill + : global.requestAnimationFrame || rafPolyfill; + + var cancelAnimationFrame = + typeof window !== 'undefined' + ? window.cancelAnimationFrame || + window.webkitCancelAnimationFrame || + window.mozCancelAnimationFrame || + cafPolyfill + : global.cancelAnimationFrame || cafPolyfill; + + var warn = function warn(msg) { + return console && typeof console.warn === 'function' && console.warn(msg); + }; + + var _helmetCallback = null; + + var handleClientStateChange = function handleClientStateChange(newState) { + if (_helmetCallback) { + cancelAnimationFrame(_helmetCallback); + } + + if (newState.defer) { + _helmetCallback = requestAnimationFrame(function () { + commitTagChanges(newState, function () { + _helmetCallback = null; + }); + }); + } else { + commitTagChanges(newState); + _helmetCallback = null; + } + }; + + var commitTagChanges = function commitTagChanges(newState, cb) { + var baseTag = newState.baseTag, + bodyAttributes = newState.bodyAttributes, + htmlAttributes = newState.htmlAttributes, + linkTags = newState.linkTags, + metaTags = newState.metaTags, + noscriptTags = newState.noscriptTags, + onChangeClientState = newState.onChangeClientState, + scriptTags = newState.scriptTags, + styleTags = newState.styleTags, + title = newState.title, + titleAttributes = newState.titleAttributes; + + updateAttributes(_HelmetConstants.TAG_NAMES.BODY, bodyAttributes); + updateAttributes(_HelmetConstants.TAG_NAMES.HTML, htmlAttributes); + + updateTitle(title, titleAttributes); + + var tagUpdates = { + baseTag: updateTags(_HelmetConstants.TAG_NAMES.BASE, baseTag), + linkTags: updateTags(_HelmetConstants.TAG_NAMES.LINK, linkTags), + metaTags: updateTags(_HelmetConstants.TAG_NAMES.META, metaTags), + noscriptTags: updateTags(_HelmetConstants.TAG_NAMES.NOSCRIPT, noscriptTags), + scriptTags: updateTags(_HelmetConstants.TAG_NAMES.SCRIPT, scriptTags), + styleTags: updateTags(_HelmetConstants.TAG_NAMES.STYLE, styleTags), + }; + + var addedTags = {}; + var removedTags = {}; + + Object.keys(tagUpdates).forEach(function (tagType) { + var _tagUpdates$tagType = tagUpdates[tagType], + newTags = _tagUpdates$tagType.newTags, + oldTags = _tagUpdates$tagType.oldTags; + + if (newTags.length) { + addedTags[tagType] = newTags; + } + if (oldTags.length) { + removedTags[tagType] = tagUpdates[tagType].oldTags; + } + }); + + cb && cb(); + + onChangeClientState(newState, addedTags, removedTags); + }; + + var flattenArray = function flattenArray(possibleArray) { + return Array.isArray(possibleArray) ? possibleArray.join('') : possibleArray; + }; + + var updateTitle = function updateTitle(title, attributes) { + if (typeof title !== 'undefined' && document.title !== title) { + document.title = flattenArray(title); + } + + updateAttributes(_HelmetConstants.TAG_NAMES.TITLE, attributes); + }; + + var updateAttributes = function updateAttributes(tagName, attributes) { + var elementTag = document.getElementsByTagName(tagName)[0]; + + if (!elementTag) { + return; + } + + var helmetAttributeString = elementTag.getAttribute(_HelmetConstants.HELMET_ATTRIBUTE); + var helmetAttributes = helmetAttributeString ? helmetAttributeString.split(',') : []; + var attributesToRemove = [].concat(helmetAttributes); + var attributeKeys = Object.keys(attributes); + + for (var i = 0; i < attributeKeys.length; i++) { + var attribute = attributeKeys[i]; + var value = attributes[attribute] || ''; + + if (elementTag.getAttribute(attribute) !== value) { + elementTag.setAttribute(attribute, value); + } + + if (helmetAttributes.indexOf(attribute) === -1) { + helmetAttributes.push(attribute); + } + + var indexToSave = attributesToRemove.indexOf(attribute); + if (indexToSave !== -1) { + attributesToRemove.splice(indexToSave, 1); + } + } + + for (var _i = attributesToRemove.length - 1; _i >= 0; _i--) { + elementTag.removeAttribute(attributesToRemove[_i]); + } + + if (helmetAttributes.length === attributesToRemove.length) { + elementTag.removeAttribute(_HelmetConstants.HELMET_ATTRIBUTE); + } else if (elementTag.getAttribute(_HelmetConstants.HELMET_ATTRIBUTE) !== attributeKeys.join(',')) { + elementTag.setAttribute(_HelmetConstants.HELMET_ATTRIBUTE, attributeKeys.join(',')); + } + }; + + var updateTags = function updateTags(type, tags) { + var headElement = document.head || document.querySelector(_HelmetConstants.TAG_NAMES.HEAD); + var tagNodes = headElement.querySelectorAll(type + '[' + _HelmetConstants.HELMET_ATTRIBUTE + ']'); + var oldTags = Array.prototype.slice.call(tagNodes); + var newTags = []; + var indexToDelete = void 0; + + if (tags && tags.length) { + tags.forEach(function (tag) { + var newElement = document.createElement(type); + + for (var attribute in tag) { + if (tag.hasOwnProperty(attribute)) { + if (attribute === _HelmetConstants.TAG_PROPERTIES.INNER_HTML) { + newElement.innerHTML = tag.innerHTML; + } else if (attribute === _HelmetConstants.TAG_PROPERTIES.CSS_TEXT) { + if (newElement.styleSheet) { + newElement.styleSheet.cssText = tag.cssText; + } else { + newElement.appendChild(document.createTextNode(tag.cssText)); + } + } else { + var value = typeof tag[attribute] === 'undefined' ? '' : tag[attribute]; + newElement.setAttribute(attribute, value); + } + } + } + + newElement.setAttribute(_HelmetConstants.HELMET_ATTRIBUTE, 'true'); + + // Remove a duplicate tag from domTagstoRemove, so it isn't cleared. + if ( + oldTags.some(function (existingTag, index) { + indexToDelete = index; + return newElement.isEqualNode(existingTag); + }) + ) { + oldTags.splice(indexToDelete, 1); + } else { + newTags.push(newElement); + } + }); + } + + oldTags.forEach(function (tag) { + return tag.parentNode.removeChild(tag); + }); + newTags.forEach(function (tag) { + return headElement.appendChild(tag); + }); + + return { + oldTags: oldTags, + newTags: newTags, + }; + }; + + var generateElementAttributesAsString = function generateElementAttributesAsString(attributes) { + return Object.keys(attributes).reduce(function (str, key) { + var attr = typeof attributes[key] !== 'undefined' ? key + '="' + attributes[key] + '"' : '' + key; + return str ? str + ' ' + attr : attr; + }, ''); + }; + + var generateTitleAsString = function generateTitleAsString(type, title, attributes, encode) { + var attributeString = generateElementAttributesAsString(attributes); + var flattenedTitle = flattenArray(title); + return attributeString + ? '<' + + type + + ' ' + + _HelmetConstants.HELMET_ATTRIBUTE + + '="true" ' + + attributeString + + '>' + + encodeSpecialCharacters(flattenedTitle, encode) + + '</' + + type + + '>' + : '<' + + type + + ' ' + + _HelmetConstants.HELMET_ATTRIBUTE + + '="true">' + + encodeSpecialCharacters(flattenedTitle, encode) + + '</' + + type + + '>'; + }; + + var generateTagsAsString = function generateTagsAsString(type, tags, encode) { + return tags.reduce(function (str, tag) { + var attributeHtml = Object.keys(tag) + .filter(function (attribute) { + return !( + attribute === _HelmetConstants.TAG_PROPERTIES.INNER_HTML || + attribute === _HelmetConstants.TAG_PROPERTIES.CSS_TEXT + ); + }) + .reduce(function (string, attribute) { + var attr = + typeof tag[attribute] === 'undefined' + ? attribute + : attribute + '="' + encodeSpecialCharacters(tag[attribute], encode) + '"'; + return string ? string + ' ' + attr : attr; + }, ''); + + var tagContent = tag.innerHTML || tag.cssText || ''; + + var isSelfClosing = _HelmetConstants.SELF_CLOSING_TAGS.indexOf(type) === -1; + + return ( + str + + '<' + + type + + ' ' + + _HelmetConstants.HELMET_ATTRIBUTE + + '="true" ' + + attributeHtml + + (isSelfClosing ? '/>' : '>' + tagContent + '</' + type + '>') + ); + }, ''); + }; + + var convertElementAttributestoReactProps = function convertElementAttributestoReactProps(attributes) { + var initProps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + return Object.keys(attributes).reduce(function (obj, key) { + obj[_HelmetConstants.REACT_TAG_MAP[key] || key] = attributes[key]; + return obj; + }, initProps); + }; + + var convertReactPropstoHtmlAttributes = function convertReactPropstoHtmlAttributes(props) { + var initAttributes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + return Object.keys(props).reduce(function (obj, key) { + obj[_HelmetConstants.HTML_TAG_MAP[key] || key] = props[key]; + return obj; + }, initAttributes); + }; + + var generateTitleAsReactComponent = function generateTitleAsReactComponent(type, title, attributes) { + var _initProps; + + // assigning into an array to define toString function on it + var initProps = + ((_initProps = { + key: title, + }), + (_initProps[_HelmetConstants.HELMET_ATTRIBUTE] = true), + _initProps); + var props = convertElementAttributestoReactProps(attributes, initProps); + + return [_react2.default.createElement(_HelmetConstants.TAG_NAMES.TITLE, props, title)]; + }; + + var generateTagsAsReactComponent = function generateTagsAsReactComponent(type, tags) { + return tags.map(function (tag, i) { + var _mappedTag; + + var mappedTag = + ((_mappedTag = { + key: i, + }), + (_mappedTag[_HelmetConstants.HELMET_ATTRIBUTE] = true), + _mappedTag); + + Object.keys(tag).forEach(function (attribute) { + var mappedAttribute = _HelmetConstants.REACT_TAG_MAP[attribute] || attribute; + + if ( + mappedAttribute === _HelmetConstants.TAG_PROPERTIES.INNER_HTML || + mappedAttribute === _HelmetConstants.TAG_PROPERTIES.CSS_TEXT + ) { + var content = tag.innerHTML || tag.cssText; + mappedTag.dangerouslySetInnerHTML = { __html: content }; + } else { + mappedTag[mappedAttribute] = tag[attribute]; + } + }); + + return _react2.default.createElement(type, mappedTag); + }); + }; + + var getMethodsForTag = function getMethodsForTag(type, tags, encode) { + switch (type) { + case _HelmetConstants.TAG_NAMES.TITLE: + return { + toComponent: function toComponent() { + return generateTitleAsReactComponent(type, tags.title, tags.titleAttributes, encode); + }, + toString: function toString() { + return generateTitleAsString(type, tags.title, tags.titleAttributes, encode); + }, + }; + case _HelmetConstants.ATTRIBUTE_NAMES.BODY: + case _HelmetConstants.ATTRIBUTE_NAMES.HTML: + return { + toComponent: function toComponent() { + return convertElementAttributestoReactProps(tags); + }, + toString: function toString() { + return generateElementAttributesAsString(tags); + }, + }; + default: + return { + toComponent: function toComponent() { + return generateTagsAsReactComponent(type, tags); + }, + toString: function toString() { + return generateTagsAsString(type, tags, encode); + }, + }; + } + }; + + var mapStateOnServer = function mapStateOnServer(_ref) { + var baseTag = _ref.baseTag, + bodyAttributes = _ref.bodyAttributes, + encode = _ref.encode, + htmlAttributes = _ref.htmlAttributes, + linkTags = _ref.linkTags, + metaTags = _ref.metaTags, + noscriptTags = _ref.noscriptTags, + scriptTags = _ref.scriptTags, + styleTags = _ref.styleTags, + _ref$title = _ref.title, + title = _ref$title === undefined ? '' : _ref$title, + titleAttributes = _ref.titleAttributes; + return { + base: getMethodsForTag(_HelmetConstants.TAG_NAMES.BASE, baseTag, encode), + bodyAttributes: getMethodsForTag(_HelmetConstants.ATTRIBUTE_NAMES.BODY, bodyAttributes, encode), + htmlAttributes: getMethodsForTag(_HelmetConstants.ATTRIBUTE_NAMES.HTML, htmlAttributes, encode), + link: getMethodsForTag(_HelmetConstants.TAG_NAMES.LINK, linkTags, encode), + meta: getMethodsForTag(_HelmetConstants.TAG_NAMES.META, metaTags, encode), + noscript: getMethodsForTag(_HelmetConstants.TAG_NAMES.NOSCRIPT, noscriptTags, encode), + script: getMethodsForTag(_HelmetConstants.TAG_NAMES.SCRIPT, scriptTags, encode), + style: getMethodsForTag(_HelmetConstants.TAG_NAMES.STYLE, styleTags, encode), + title: getMethodsForTag( + _HelmetConstants.TAG_NAMES.TITLE, + { title: title, titleAttributes: titleAttributes }, + encode, + ), + }; + }; + + exports.convertReactPropstoHtmlAttributes = convertReactPropstoHtmlAttributes; + exports.handleClientStateChange = handleClientStateChange; + exports.mapStateOnServer = mapStateOnServer; + exports.reducePropsToState = reducePropsToState; + exports.requestAnimationFrame = requestAnimationFrame; + exports.warn = warn; + + /***/ + }, + /* 631 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_helmet__ = __webpack_require__(264); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_helmet___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_react_helmet__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__HelloWorld__ = __webpack_require__(161); + + var EchoProps = function EchoProps(props) { + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'div', + null, + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_1_react_helmet__['Helmet'], + null, + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('title', null, 'Custom page title'), + ), + 'Props: ', + JSON.stringify(props), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_2__HelloWorld__['a' /* default */], + props, + ), + ); + }; + + var _default = EchoProps; + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + EchoProps, + 'EchoProps', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/ReactHelmet.jsx', + ); + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/ReactHelmet.jsx', + ); + })(); + + /***/ + }, + /* 632 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__ImageExample__ = __webpack_require__(633); + /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, 'a', function () { + return __WEBPACK_IMPORTED_MODULE_0__ImageExample__['a']; + }); + + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + })(); + + /***/ + }, + /* 633 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(10); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__ImageExample_scss__ = __webpack_require__(634); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__ImageExample_scss___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__ImageExample_scss__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_images_256egghead_png__ = __webpack_require__(635); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_images_256egghead_png___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_images_256egghead_png__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__bower_png__ = __webpack_require__(636); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__bower_png___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_4__bower_png__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__blueprint_icon_svg__ = __webpack_require__(637); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__blueprint_icon_svg___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5__blueprint_icon_svg__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_images_lego_icon_svg__ = __webpack_require__(638); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_images_lego_icon_svg___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_images_lego_icon_svg__); + + // Note the global alias for images + + var TestComponent = function TestComponent(props) { + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'div', + null, + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'h1', + { className: __WEBPACK_IMPORTED_MODULE_2__ImageExample_scss___default.a.red }, + 'This is a test of CSS module color red.', + ), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('hr', null), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'h1', + { className: __WEBPACK_IMPORTED_MODULE_2__ImageExample_scss___default.a.background }, + 'Here is a label with a background-image from the CSS modules imported', + ), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('img', { + src: __WEBPACK_IMPORTED_MODULE_3_images_256egghead_png___default.a, + }), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('hr', null), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'h1', + { className: __WEBPACK_IMPORTED_MODULE_2__ImageExample_scss___default.a.backgroundSameDirectory }, + 'This label has a background image from the same directory. Below is an img tag in the same directory', + ), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('img', { + src: __WEBPACK_IMPORTED_MODULE_4__bower_png___default.a, + }), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('hr', null), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'h1', + null, + ' Below is an img tag of a svg in the same directory', + ), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('img', { + src: __WEBPACK_IMPORTED_MODULE_5__blueprint_icon_svg___default.a, + }), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('hr', null), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'h1', + null, + 'Below is a div with a background svg', + ), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div', { + className: __WEBPACK_IMPORTED_MODULE_2__ImageExample_scss___default.a.googleLogo, + }), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('hr', null), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'h1', + null, + 'SVG lego icon img tag with global path', + ), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('img', { + src: __WEBPACK_IMPORTED_MODULE_6_images_lego_icon_svg___default.a, + }), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('hr', null), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'h1', + null, + 'SVG lego icon with background image to global path', + ), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div', { + className: __WEBPACK_IMPORTED_MODULE_2__ImageExample_scss___default.a.legoIcon, + }), + ); + }; + + TestComponent.propTypes = { + message: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string, + }; + + var _default = TestComponent; + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + TestComponent, + 'TestComponent', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/ImageExample/ImageExample.js', + ); + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/ImageExample/ImageExample.js', + ); + })(); + + /***/ + }, + /* 634 */ + /***/ function (module, exports) { + module.exports = { + red: 'ImageExample__red__3ax2T', + background: 'ImageExample__background__2X-y3', + backgroundSameDirectory: 'ImageExample__backgroundSameDirectory__2Sn4F', + googleLogo: 'ImageExample__googleLogo__DoneW', + legoIcon: 'ImageExample__legoIcon__1AnHH', + }; + + /***/ + }, + /* 635 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = __webpack_require__.p + 'images/256egghead-0a0d6f5484f79e0ea2c2666cde44588c.png'; + + /***/ + }, + /* 636 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = __webpack_require__.p + 'images/bower-57ad2e565a98cf71ab6b0925ea211ea2.png'; + + /***/ + }, + /* 637 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = __webpack_require__.p + 'images/blueprint_icon-8e2f62bdd4e1cce1884907f5fafb6c61.svg'; + + /***/ + }, + /* 638 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = __webpack_require__.p + 'images/lego_icon-431dba39c343f8a5f0d8a7b890de4ad9.svg'; + + /***/ + }, + /* 639 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + + var SetTimeoutLoggingApp = function SetTimeoutLoggingApp(props) { + setTimeout(function () { + return console.error('*****TIMEOUT DONE!*****'); + }, 5000); + + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div', null, 'Called setTimeout.'); + }; + + var _default = SetTimeoutLoggingApp; + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + SetTimeoutLoggingApp, + 'SetTimeoutLoggingApp', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/startup/SetTimeoutLoggingApp.jsx', + ); + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/startup/SetTimeoutLoggingApp.jsx', + ); + })(); + + /***/ + }, + /* 640 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__components_ComponentWithLodash__ = + __webpack_require__(641); + + /* + * Export a function that returns a ReactComponent, depending on a store named SharedReduxStore. + * This is used for the client rendering hook after the page html is rendered. + * React will see that the state is the same and not do anything. + */ + + var _default = function _default() { + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_1__components_ComponentWithLodash__['a' /* default */], + null, + ); + }; + + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/startup/ComponentWithLodashApp.jsx', + ); + })(); + + /***/ + }, + /* 641 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_fp__ = __webpack_require__(642); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_fp___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_lodash_fp__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__index_scss__ = __webpack_require__(647); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__index_scss___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_2__index_scss__, + ); + + var _default = function _default() { + var paddedWord = __WEBPACK_IMPORTED_MODULE_1_lodash_fp___default.a.padStart(7)('works!'); + + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'div', + null, + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'h3', + { className: __WEBPACK_IMPORTED_MODULE_2__index_scss___default.a.message }, + 'Lodash still', + paddedWord, + ), + ); + }; + + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/ComponentWithLodash/index.jsx', + ); + })(); + + /***/ + }, + /* 642 */ + /***/ function (module, exports, __webpack_require__) { + var _ = __webpack_require__(643).runInContext(); + module.exports = __webpack_require__(644)(_, _); + + /***/ + }, + /* 643 */ + /***/ function (module, exports, __webpack_require__) { + /* WEBPACK VAR INJECTION */ (function (module) { + var __WEBPACK_AMD_DEFINE_RESULT__; /** + * @license + * Lodash lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE + */ + (function () { + function n(n, t, r) { + switch (r.length) { + case 0: + return n.call(t); + case 1: + return n.call(t, r[0]); + case 2: + return n.call(t, r[0], r[1]); + case 3: + return n.call(t, r[0], r[1], r[2]); + } + return n.apply(t, r); + } + function t(n, t, r, e) { + for (var u = -1, i = null == n ? 0 : n.length; ++u < i; ) { + var o = n[u]; + t(e, o, r(o), n); + } + return e; + } + function r(n, t) { + for (var r = -1, e = null == n ? 0 : n.length; ++r < e && false !== t(n[r], r, n); ); + return n; + } + function e(n, t) { + for (var r = null == n ? 0 : n.length; r-- && false !== t(n[r], r, n); ); + return n; + } + function u(n, t) { + for (var r = -1, e = null == n ? 0 : n.length; ++r < e; ) if (!t(n[r], r, n)) return false; + return true; + } + function i(n, t) { + for (var r = -1, e = null == n ? 0 : n.length, u = 0, i = []; ++r < e; ) { + var o = n[r]; + t(o, r, n) && (i[u++] = o); + } + return i; + } + function o(n, t) { + return !(null == n || !n.length) && -1 < v(n, t, 0); + } + function f(n, t, r) { + for (var e = -1, u = null == n ? 0 : n.length; ++e < u; ) if (r(t, n[e])) return true; + return false; + } + function c(n, t) { + for (var r = -1, e = null == n ? 0 : n.length, u = Array(e); ++r < e; ) u[r] = t(n[r], r, n); + return u; + } + function a(n, t) { + for (var r = -1, e = t.length, u = n.length; ++r < e; ) n[u + r] = t[r]; + return n; + } + function l(n, t, r, e) { + var u = -1, + i = null == n ? 0 : n.length; + for (e && i && (r = n[++u]); ++u < i; ) r = t(r, n[u], u, n); + return r; + } + function s(n, t, r, e) { + var u = null == n ? 0 : n.length; + for (e && u && (r = n[--u]); u--; ) r = t(r, n[u], u, n); + return r; + } + function h(n, t) { + for (var r = -1, e = null == n ? 0 : n.length; ++r < e; ) if (t(n[r], r, n)) return true; + return false; + } + function p(n, t, r) { + var e; + return ( + r(n, function (n, r, u) { + if (t(n, r, u)) return (e = r), false; + }), + e + ); + } + function _(n, t, r, e) { + var u = n.length; + for (r += e ? 1 : -1; e ? r-- : ++r < u; ) if (t(n[r], r, n)) return r; + return -1; + } + function v(n, t, r) { + if (t === t) + n: { + --r; + for (var e = n.length; ++r < e; ) + if (n[r] === t) { + n = r; + break n; + } + n = -1; + } + else n = _(n, d, r); + return n; + } + function g(n, t, r, e) { + --r; + for (var u = n.length; ++r < u; ) if (e(n[r], t)) return r; + return -1; + } + function d(n) { + return n !== n; + } + function y(n, t) { + var r = null == n ? 0 : n.length; + return r ? m(n, t) / r : F; + } + function b(n) { + return function (t) { + return null == t ? T : t[n]; + }; + } + function x(n) { + return function (t) { + return null == n ? T : n[t]; + }; + } + function j(n, t, r, e, u) { + return ( + u(n, function (n, u, i) { + r = e ? ((e = false), n) : t(r, n, u, i); + }), + r + ); + } + function w(n, t) { + var r = n.length; + for (n.sort(t); r--; ) n[r] = n[r].c; + return n; + } + function m(n, t) { + for (var r, e = -1, u = n.length; ++e < u; ) { + var i = t(n[e]); + i !== T && (r = r === T ? i : r + i); + } + return r; + } + function A(n, t) { + for (var r = -1, e = Array(n); ++r < n; ) e[r] = t(r); + return e; + } + function E(n, t) { + return c(t, function (t) { + return [t, n[t]]; + }); + } + function k(n) { + return function (t) { + return n(t); + }; + } + function S(n, t) { + return c(t, function (t) { + return n[t]; + }); + } + function O(n, t) { + return n.has(t); + } + function I(n, t) { + for (var r = -1, e = n.length; ++r < e && -1 < v(t, n[r], 0); ); + return r; + } + function R(n, t) { + for (var r = n.length; r-- && -1 < v(t, n[r], 0); ); + return r; + } + function z(n) { + return '\\' + Un[n]; + } + function W(n) { + var t = -1, + r = Array(n.size); + return ( + n.forEach(function (n, e) { + r[++t] = [e, n]; + }), + r + ); + } + function B(n, t) { + return function (r) { + return n(t(r)); + }; + } + function L(n, t) { + for (var r = -1, e = n.length, u = 0, i = []; ++r < e; ) { + var o = n[r]; + (o !== t && '__lodash_placeholder__' !== o) || + ((n[r] = '__lodash_placeholder__'), (i[u++] = r)); + } + return i; + } + function U(n) { + var t = -1, + r = Array(n.size); + return ( + n.forEach(function (n) { + r[++t] = n; + }), + r + ); + } + function C(n) { + var t = -1, + r = Array(n.size); + return ( + n.forEach(function (n) { + r[++t] = [n, n]; + }), + r + ); + } + function D(n) { + if (Rn.test(n)) { + for (var t = (On.lastIndex = 0); On.test(n); ) ++t; + n = t; + } else n = Qn(n); + return n; + } + function M(n) { + return Rn.test(n) ? n.match(On) || [] : n.split(''); + } + var T, + $ = 1 / 0, + F = NaN, + N = [ + ['ary', 128], + ['bind', 1], + ['bindKey', 2], + ['curry', 8], + ['curryRight', 16], + ['flip', 512], + ['partial', 32], + ['partialRight', 64], + ['rearg', 256], + ], + P = /\b__p\+='';/g, + Z = /\b(__p\+=)''\+/g, + q = /(__e\(.*?\)|\b__t\))\+'';/g, + V = /&(?:amp|lt|gt|quot|#39);/g, + K = /[&<>"']/g, + G = RegExp(V.source), + H = RegExp(K.source), + J = /<%-([\s\S]+?)%>/g, + Y = /<%([\s\S]+?)%>/g, + Q = /<%=([\s\S]+?)%>/g, + X = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, + nn = /^\w*$/, + tn = + /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, + rn = /[\\^$.*+?()[\]{}|]/g, + en = RegExp(rn.source), + un = /^\s+|\s+$/g, + on = /^\s+/, + fn = /\s+$/, + cn = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, + an = /\{\n\/\* \[wrapped with (.+)\] \*/, + ln = /,? & /, + sn = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g, + hn = /\\(\\)?/g, + pn = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g, + _n = /\w*$/, + vn = /^[-+]0x[0-9a-f]+$/i, + gn = /^0b[01]+$/i, + dn = /^\[object .+?Constructor\]$/, + yn = /^0o[0-7]+$/i, + bn = /^(?:0|[1-9]\d*)$/, + xn = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g, + jn = /($^)/, + wn = /['\n\r\u2028\u2029\\]/g, + mn = + '[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?(?:\\u200d(?:[^\\ud800-\\udfff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?)*', + An = + '(?:[\\u2700-\\u27bf]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])' + mn, + En = + '(?:[^\\ud800-\\udfff][\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]?|[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\ud800-\\udfff])', + kn = RegExp("['\u2019]", 'g'), + Sn = RegExp('[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]', 'g'), + On = RegExp('\\ud83c[\\udffb-\\udfff](?=\\ud83c[\\udffb-\\udfff])|' + En + mn, 'g'), + In = RegExp( + [ + "[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+(?:['\u2019](?:d|ll|m|re|s|t|ve))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde]|$)|(?:[A-Z\\xc0-\\xd6\\xd8-\\xde]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde](?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])|$)|[A-Z\\xc0-\\xd6\\xd8-\\xde]?(?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['\u2019](?:d|ll|m|re|s|t|ve))?|[A-Z\\xc0-\\xd6\\xd8-\\xde]+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?|\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])|\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])|\\d+", + An, + ].join('|'), + 'g', + ), + Rn = RegExp( + '[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]', + ), + zn = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/, + Wn = + 'Array Buffer DataView Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Map Math Object Promise RegExp Set String Symbol TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array WeakMap _ clearTimeout isFinite parseInt setTimeout'.split( + ' ', + ), + Bn = {}; + (Bn['[object Float32Array]'] = + Bn['[object Float64Array]'] = + Bn['[object Int8Array]'] = + Bn['[object Int16Array]'] = + Bn['[object Int32Array]'] = + Bn['[object Uint8Array]'] = + Bn['[object Uint8ClampedArray]'] = + Bn['[object Uint16Array]'] = + Bn['[object Uint32Array]'] = + true), + (Bn['[object Arguments]'] = + Bn['[object Array]'] = + Bn['[object ArrayBuffer]'] = + Bn['[object Boolean]'] = + Bn['[object DataView]'] = + Bn['[object Date]'] = + Bn['[object Error]'] = + Bn['[object Function]'] = + Bn['[object Map]'] = + Bn['[object Number]'] = + Bn['[object Object]'] = + Bn['[object RegExp]'] = + Bn['[object Set]'] = + Bn['[object String]'] = + Bn['[object WeakMap]'] = + false); + var Ln = {}; + (Ln['[object Arguments]'] = + Ln['[object Array]'] = + Ln['[object ArrayBuffer]'] = + Ln['[object DataView]'] = + Ln['[object Boolean]'] = + Ln['[object Date]'] = + Ln['[object Float32Array]'] = + Ln['[object Float64Array]'] = + Ln['[object Int8Array]'] = + Ln['[object Int16Array]'] = + Ln['[object Int32Array]'] = + Ln['[object Map]'] = + Ln['[object Number]'] = + Ln['[object Object]'] = + Ln['[object RegExp]'] = + Ln['[object Set]'] = + Ln['[object String]'] = + Ln['[object Symbol]'] = + Ln['[object Uint8Array]'] = + Ln['[object Uint8ClampedArray]'] = + Ln['[object Uint16Array]'] = + Ln['[object Uint32Array]'] = + true), + (Ln['[object Error]'] = Ln['[object Function]'] = Ln['[object WeakMap]'] = false); + var Un = { '\\': '\\', "'": "'", '\n': 'n', '\r': 'r', '\u2028': 'u2028', '\u2029': 'u2029' }, + Cn = parseFloat, + Dn = parseInt, + Mn = typeof global == 'object' && global && global.Object === Object && global, + Tn = typeof self == 'object' && self && self.Object === Object && self, + $n = Mn || Tn || Function('return this')(), + Fn = typeof exports == 'object' && exports && !exports.nodeType && exports, + Nn = Fn && typeof module == 'object' && module && !module.nodeType && module, + Pn = Nn && Nn.exports === Fn, + Zn = Pn && Mn.process, + qn = (function () { + try { + var n = Nn && Nn.f && Nn.f('util').types; + return n ? n : Zn && Zn.binding && Zn.binding('util'); + } catch (n) {} + })(), + Vn = qn && qn.isArrayBuffer, + Kn = qn && qn.isDate, + Gn = qn && qn.isMap, + Hn = qn && qn.isRegExp, + Jn = qn && qn.isSet, + Yn = qn && qn.isTypedArray, + Qn = b('length'), + Xn = x({ + '\xc0': 'A', + '\xc1': 'A', + '\xc2': 'A', + '\xc3': 'A', + '\xc4': 'A', + '\xc5': 'A', + '\xe0': 'a', + '\xe1': 'a', + '\xe2': 'a', + '\xe3': 'a', + '\xe4': 'a', + '\xe5': 'a', + '\xc7': 'C', + '\xe7': 'c', + '\xd0': 'D', + '\xf0': 'd', + '\xc8': 'E', + '\xc9': 'E', + '\xca': 'E', + '\xcb': 'E', + '\xe8': 'e', + '\xe9': 'e', + '\xea': 'e', + '\xeb': 'e', + '\xcc': 'I', + '\xcd': 'I', + '\xce': 'I', + '\xcf': 'I', + '\xec': 'i', + '\xed': 'i', + '\xee': 'i', + '\xef': 'i', + '\xd1': 'N', + '\xf1': 'n', + '\xd2': 'O', + '\xd3': 'O', + '\xd4': 'O', + '\xd5': 'O', + '\xd6': 'O', + '\xd8': 'O', + '\xf2': 'o', + '\xf3': 'o', + '\xf4': 'o', + '\xf5': 'o', + '\xf6': 'o', + '\xf8': 'o', + '\xd9': 'U', + '\xda': 'U', + '\xdb': 'U', + '\xdc': 'U', + '\xf9': 'u', + '\xfa': 'u', + '\xfb': 'u', + '\xfc': 'u', + '\xdd': 'Y', + '\xfd': 'y', + '\xff': 'y', + '\xc6': 'Ae', + '\xe6': 'ae', + '\xde': 'Th', + '\xfe': 'th', + '\xdf': 'ss', + '\u0100': 'A', + '\u0102': 'A', + '\u0104': 'A', + '\u0101': 'a', + '\u0103': 'a', + '\u0105': 'a', + '\u0106': 'C', + '\u0108': 'C', + '\u010a': 'C', + '\u010c': 'C', + '\u0107': 'c', + '\u0109': 'c', + '\u010b': 'c', + '\u010d': 'c', + '\u010e': 'D', + '\u0110': 'D', + '\u010f': 'd', + '\u0111': 'd', + '\u0112': 'E', + '\u0114': 'E', + '\u0116': 'E', + '\u0118': 'E', + '\u011a': 'E', + '\u0113': 'e', + '\u0115': 'e', + '\u0117': 'e', + '\u0119': 'e', + '\u011b': 'e', + '\u011c': 'G', + '\u011e': 'G', + '\u0120': 'G', + '\u0122': 'G', + '\u011d': 'g', + '\u011f': 'g', + '\u0121': 'g', + '\u0123': 'g', + '\u0124': 'H', + '\u0126': 'H', + '\u0125': 'h', + '\u0127': 'h', + '\u0128': 'I', + '\u012a': 'I', + '\u012c': 'I', + '\u012e': 'I', + '\u0130': 'I', + '\u0129': 'i', + '\u012b': 'i', + '\u012d': 'i', + '\u012f': 'i', + '\u0131': 'i', + '\u0134': 'J', + '\u0135': 'j', + '\u0136': 'K', + '\u0137': 'k', + '\u0138': 'k', + '\u0139': 'L', + '\u013b': 'L', + '\u013d': 'L', + '\u013f': 'L', + '\u0141': 'L', + '\u013a': 'l', + '\u013c': 'l', + '\u013e': 'l', + '\u0140': 'l', + '\u0142': 'l', + '\u0143': 'N', + '\u0145': 'N', + '\u0147': 'N', + '\u014a': 'N', + '\u0144': 'n', + '\u0146': 'n', + '\u0148': 'n', + '\u014b': 'n', + '\u014c': 'O', + '\u014e': 'O', + '\u0150': 'O', + '\u014d': 'o', + '\u014f': 'o', + '\u0151': 'o', + '\u0154': 'R', + '\u0156': 'R', + '\u0158': 'R', + '\u0155': 'r', + '\u0157': 'r', + '\u0159': 'r', + '\u015a': 'S', + '\u015c': 'S', + '\u015e': 'S', + '\u0160': 'S', + '\u015b': 's', + '\u015d': 's', + '\u015f': 's', + '\u0161': 's', + '\u0162': 'T', + '\u0164': 'T', + '\u0166': 'T', + '\u0163': 't', + '\u0165': 't', + '\u0167': 't', + '\u0168': 'U', + '\u016a': 'U', + '\u016c': 'U', + '\u016e': 'U', + '\u0170': 'U', + '\u0172': 'U', + '\u0169': 'u', + '\u016b': 'u', + '\u016d': 'u', + '\u016f': 'u', + '\u0171': 'u', + '\u0173': 'u', + '\u0174': 'W', + '\u0175': 'w', + '\u0176': 'Y', + '\u0177': 'y', + '\u0178': 'Y', + '\u0179': 'Z', + '\u017b': 'Z', + '\u017d': 'Z', + '\u017a': 'z', + '\u017c': 'z', + '\u017e': 'z', + '\u0132': 'IJ', + '\u0133': 'ij', + '\u0152': 'Oe', + '\u0153': 'oe', + '\u0149': "'n", + '\u017f': 's', + }), + nt = x({ '&': '&', '<': '<', '>': '>', '"': '"', "'": ''' }), + tt = x({ '&': '&', '<': '<', '>': '>', '"': '"', ''': "'" }), + rt = (function x(mn) { + function An(n) { + if (yu(n) && !ff(n) && !(n instanceof Un)) { + if (n instanceof On) return n; + if (oi.call(n, '__wrapped__')) return Fe(n); + } + return new On(n); + } + function En() {} + function On(n, t) { + (this.__wrapped__ = n), + (this.__actions__ = []), + (this.__chain__ = !!t), + (this.__index__ = 0), + (this.__values__ = T); + } + function Un(n) { + (this.__wrapped__ = n), + (this.__actions__ = []), + (this.__dir__ = 1), + (this.__filtered__ = false), + (this.__iteratees__ = []), + (this.__takeCount__ = 4294967295), + (this.__views__ = []); + } + function Mn(n) { + var t = -1, + r = null == n ? 0 : n.length; + for (this.clear(); ++t < r; ) { + var e = n[t]; + this.set(e[0], e[1]); + } + } + function Tn(n) { + var t = -1, + r = null == n ? 0 : n.length; + for (this.clear(); ++t < r; ) { + var e = n[t]; + this.set(e[0], e[1]); + } + } + function Fn(n) { + var t = -1, + r = null == n ? 0 : n.length; + for (this.clear(); ++t < r; ) { + var e = n[t]; + this.set(e[0], e[1]); + } + } + function Nn(n) { + var t = -1, + r = null == n ? 0 : n.length; + for (this.__data__ = new Fn(); ++t < r; ) this.add(n[t]); + } + function Zn(n) { + this.size = (this.__data__ = new Tn(n)).size; + } + function qn(n, t) { + var r, + e = ff(n), + u = !e && of(n), + i = !e && !u && af(n), + o = !e && !u && !i && _f(n), + u = (e = e || u || i || o) ? A(n.length, ni) : [], + f = u.length; + for (r in n) + (!t && !oi.call(n, r)) || + (e && + ('length' == r || + (i && ('offset' == r || 'parent' == r)) || + (o && ('buffer' == r || 'byteLength' == r || 'byteOffset' == r)) || + Se(r, f))) || + u.push(r); + return u; + } + function Qn(n) { + var t = n.length; + return t ? n[ir(0, t - 1)] : T; + } + function et(n, t) { + return De(Ur(n), pt(t, 0, n.length)); + } + function ut(n) { + return De(Ur(n)); + } + function it(n, t, r) { + ((r === T || lu(n[t], r)) && (r !== T || t in n)) || st(n, t, r); + } + function ot(n, t, r) { + var e = n[t]; + (oi.call(n, t) && lu(e, r) && (r !== T || t in n)) || st(n, t, r); + } + function ft(n, t) { + for (var r = n.length; r--; ) if (lu(n[r][0], t)) return r; + return -1; + } + function ct(n, t, r, e) { + return ( + uo(n, function (n, u, i) { + t(e, n, r(n), i); + }), + e + ); + } + function at(n, t) { + return n && Cr(t, Wu(t), n); + } + function lt(n, t) { + return n && Cr(t, Bu(t), n); + } + function st(n, t, r) { + '__proto__' == t && Ai + ? Ai(n, t, { configurable: true, enumerable: true, value: r, writable: true }) + : (n[t] = r); + } + function ht(n, t) { + for (var r = -1, e = t.length, u = Ku(e), i = null == n; ++r < e; ) + u[r] = i ? T : Ru(n, t[r]); + return u; + } + function pt(n, t, r) { + return n === n && (r !== T && (n = n <= r ? n : r), t !== T && (n = n >= t ? n : t)), n; + } + function _t(n, t, e, u, i, o) { + var f, + c = 1 & t, + a = 2 & t, + l = 4 & t; + if ((e && (f = i ? e(n, u, i, o) : e(n)), f !== T)) return f; + if (!du(n)) return n; + if ((u = ff(n))) { + if (((f = me(n)), !c)) return Ur(n, f); + } else { + var s = vo(n), + h = '[object Function]' == s || '[object GeneratorFunction]' == s; + if (af(n)) return Ir(n, c); + if ('[object Object]' == s || '[object Arguments]' == s || (h && !i)) { + if (((f = a || h ? {} : Ae(n)), !c)) return a ? Mr(n, lt(f, n)) : Dr(n, at(f, n)); + } else { + if (!Ln[s]) return i ? n : {}; + f = Ee(n, s, c); + } + } + if ((o || (o = new Zn()), (i = o.get(n)))) return i; + o.set(n, f), + pf(n) + ? n.forEach(function (r) { + f.add(_t(r, t, e, r, n, o)); + }) + : sf(n) && + n.forEach(function (r, u) { + f.set(u, _t(r, t, e, u, n, o)); + }); + var a = l ? (a ? ve : _e) : a ? Bu : Wu, + p = u ? T : a(n); + return ( + r(p || n, function (r, u) { + p && ((u = r), (r = n[u])), ot(f, u, _t(r, t, e, u, n, o)); + }), + f + ); + } + function vt(n) { + var t = Wu(n); + return function (r) { + return gt(r, n, t); + }; + } + function gt(n, t, r) { + var e = r.length; + if (null == n) return !e; + for (n = Qu(n); e--; ) { + var u = r[e], + i = t[u], + o = n[u]; + if ((o === T && !(u in n)) || !i(o)) return false; + } + return true; + } + function dt(n, t, r) { + if (typeof n != 'function') throw new ti('Expected a function'); + return bo(function () { + n.apply(T, r); + }, t); + } + function yt(n, t, r, e) { + var u = -1, + i = o, + a = true, + l = n.length, + s = [], + h = t.length; + if (!l) return s; + r && (t = c(t, k(r))), + e ? ((i = f), (a = false)) : 200 <= t.length && ((i = O), (a = false), (t = new Nn(t))); + n: for (; ++u < l; ) { + var p = n[u], + _ = null == r ? p : r(p), + p = e || 0 !== p ? p : 0; + if (a && _ === _) { + for (var v = h; v--; ) if (t[v] === _) continue n; + s.push(p); + } else i(t, _, e) || s.push(p); + } + return s; + } + function bt(n, t) { + var r = true; + return ( + uo(n, function (n, e, u) { + return (r = !!t(n, e, u)); + }), + r + ); + } + function xt(n, t, r) { + for (var e = -1, u = n.length; ++e < u; ) { + var i = n[e], + o = t(i); + if (null != o && (f === T ? o === o && !wu(o) : r(o, f))) + var f = o, + c = i; + } + return c; + } + function jt(n, t) { + var r = []; + return ( + uo(n, function (n, e, u) { + t(n, e, u) && r.push(n); + }), + r + ); + } + function wt(n, t, r, e, u) { + var i = -1, + o = n.length; + for (r || (r = ke), u || (u = []); ++i < o; ) { + var f = n[i]; + 0 < t && r(f) ? (1 < t ? wt(f, t - 1, r, e, u) : a(u, f)) : e || (u[u.length] = f); + } + return u; + } + function mt(n, t) { + return n && oo(n, t, Wu); + } + function At(n, t) { + return n && fo(n, t, Wu); + } + function Et(n, t) { + return i(t, function (t) { + return _u(n[t]); + }); + } + function kt(n, t) { + t = Sr(t, n); + for (var r = 0, e = t.length; null != n && r < e; ) n = n[Me(t[r++])]; + return r && r == e ? n : T; + } + function St(n, t, r) { + return (t = t(n)), ff(n) ? t : a(t, r(n)); + } + function Ot(n) { + if (null == n) n = n === T ? '[object Undefined]' : '[object Null]'; + else if (mi && mi in Qu(n)) { + var t = oi.call(n, mi), + r = n[mi]; + try { + n[mi] = T; + var e = true; + } catch (n) {} + var u = ai.call(n); + e && (t ? (n[mi] = r) : delete n[mi]), (n = u); + } else n = ai.call(n); + return n; + } + function It(n, t) { + return n > t; + } + function Rt(n, t) { + return null != n && oi.call(n, t); + } + function zt(n, t) { + return null != n && t in Qu(n); + } + function Wt(n, t, r) { + for ( + var e = r ? f : o, u = n[0].length, i = n.length, a = i, l = Ku(i), s = 1 / 0, h = []; + a--; + + ) { + var p = n[a]; + a && t && (p = c(p, k(t))), + (s = Ci(p.length, s)), + (l[a] = !r && (t || (120 <= u && 120 <= p.length)) ? new Nn(a && p) : T); + } + var p = n[0], + _ = -1, + v = l[0]; + n: for (; ++_ < u && h.length < s; ) { + var g = p[_], + d = t ? t(g) : g, + g = r || 0 !== g ? g : 0; + if (v ? !O(v, d) : !e(h, d, r)) { + for (a = i; --a; ) { + var y = l[a]; + if (y ? !O(y, d) : !e(n[a], d, r)) continue n; + } + v && v.push(d), h.push(g); + } + } + return h; + } + function Bt(n, t, r) { + var e = {}; + return ( + mt(n, function (n, u, i) { + t(e, r(n), u, i); + }), + e + ); + } + function Lt(t, r, e) { + return ( + (r = Sr(r, t)), + (t = 2 > r.length ? t : kt(t, hr(r, 0, -1))), + (r = null == t ? t : t[Me(Ve(r))]), + null == r ? T : n(r, t, e) + ); + } + function Ut(n) { + return yu(n) && '[object Arguments]' == Ot(n); + } + function Ct(n) { + return yu(n) && '[object ArrayBuffer]' == Ot(n); + } + function Dt(n) { + return yu(n) && '[object Date]' == Ot(n); + } + function Mt(n, t, r, e, u) { + if (n === t) t = true; + else if (null == n || null == t || (!yu(n) && !yu(t))) t = n !== n && t !== t; + else + n: { + var i = ff(n), + o = ff(t), + f = i ? '[object Array]' : vo(n), + c = o ? '[object Array]' : vo(t), + f = '[object Arguments]' == f ? '[object Object]' : f, + c = '[object Arguments]' == c ? '[object Object]' : c, + a = '[object Object]' == f, + o = '[object Object]' == c; + if ((c = f == c) && af(n)) { + if (!af(t)) { + t = false; + break n; + } + (i = true), (a = false); + } + if (c && !a) + u || (u = new Zn()), + (t = i || _f(n) ? se(n, t, r, e, Mt, u) : he(n, t, f, r, e, Mt, u)); + else { + if ( + !(1 & r) && + ((i = a && oi.call(n, '__wrapped__')), (f = o && oi.call(t, '__wrapped__')), i || f) + ) { + (n = i ? n.value() : n), + (t = f ? t.value() : t), + u || (u = new Zn()), + (t = Mt(n, t, r, e, u)); + break n; + } + if (c) + t: if ( + (u || (u = new Zn()), + (i = 1 & r), + (f = _e(n)), + (o = f.length), + (c = _e(t).length), + o == c || i) + ) { + for (a = o; a--; ) { + var l = f[a]; + if (!(i ? l in t : oi.call(t, l))) { + t = false; + break t; + } + } + if ((c = u.get(n)) && u.get(t)) t = c == t; + else { + (c = true), u.set(n, t), u.set(t, n); + for (var s = i; ++a < o; ) { + var l = f[a], + h = n[l], + p = t[l]; + if (e) var _ = i ? e(p, h, l, t, n, u) : e(h, p, l, n, t, u); + if (_ === T ? h !== p && !Mt(h, p, r, e, u) : !_) { + c = false; + break; + } + s || (s = 'constructor' == l); + } + c && + !s && + ((r = n.constructor), + (e = t.constructor), + r != e && + 'constructor' in n && + 'constructor' in t && + !( + typeof r == 'function' && + r instanceof r && + typeof e == 'function' && + e instanceof e + ) && + (c = false)), + u.delete(n), + u.delete(t), + (t = c); + } + } else t = false; + else t = false; + } + } + return t; + } + function Tt(n) { + return yu(n) && '[object Map]' == vo(n); + } + function $t(n, t, r, e) { + var u = r.length, + i = u, + o = !e; + if (null == n) return !i; + for (n = Qu(n); u--; ) { + var f = r[u]; + if (o && f[2] ? f[1] !== n[f[0]] : !(f[0] in n)) return false; + } + for (; ++u < i; ) { + var f = r[u], + c = f[0], + a = n[c], + l = f[1]; + if (o && f[2]) { + if (a === T && !(c in n)) return false; + } else { + if (((f = new Zn()), e)) var s = e(a, l, c, n, t, f); + if (s === T ? !Mt(l, a, 3, e, f) : !s) return false; + } + } + return true; + } + function Ft(n) { + return !(!du(n) || (ci && ci in n)) && (_u(n) ? hi : dn).test(Te(n)); + } + function Nt(n) { + return yu(n) && '[object RegExp]' == Ot(n); + } + function Pt(n) { + return yu(n) && '[object Set]' == vo(n); + } + function Zt(n) { + return yu(n) && gu(n.length) && !!Bn[Ot(n)]; + } + function qt(n) { + return typeof n == 'function' + ? n + : null == n + ? $u + : typeof n == 'object' + ? ff(n) + ? Jt(n[0], n[1]) + : Ht(n) + : Zu(n); + } + function Vt(n) { + if (!ze(n)) return Li(n); + var t, + r = []; + for (t in Qu(n)) oi.call(n, t) && 'constructor' != t && r.push(t); + return r; + } + function Kt(n, t) { + return n < t; + } + function Gt(n, t) { + var r = -1, + e = su(n) ? Ku(n.length) : []; + return ( + uo(n, function (n, u, i) { + e[++r] = t(n, u, i); + }), + e + ); + } + function Ht(n) { + var t = xe(n); + return 1 == t.length && t[0][2] + ? We(t[0][0], t[0][1]) + : function (r) { + return r === n || $t(r, n, t); + }; + } + function Jt(n, t) { + return Ie(n) && t === t && !du(t) + ? We(Me(n), t) + : function (r) { + var e = Ru(r, n); + return e === T && e === t ? zu(r, n) : Mt(t, e, 3); + }; + } + function Yt(n, t, r, e, u) { + n !== t && + oo( + t, + function (i, o) { + if ((u || (u = new Zn()), du(i))) { + var f = u, + c = Le(n, o), + a = Le(t, o), + l = f.get(a); + if (l) it(n, o, l); + else { + var l = e ? e(c, a, o + '', n, t, f) : T, + s = l === T; + if (s) { + var h = ff(a), + p = !h && af(a), + _ = !h && !p && _f(a), + l = a; + h || p || _ + ? ff(c) + ? (l = c) + : hu(c) + ? (l = Ur(c)) + : p + ? ((s = false), (l = Ir(a, true))) + : _ + ? ((s = false), (l = zr(a, true))) + : (l = []) + : xu(a) || of(a) + ? ((l = c), of(c) ? (l = Ou(c)) : (du(c) && !_u(c)) || (l = Ae(a))) + : (s = false); + } + s && (f.set(a, l), Yt(l, a, r, e, f), f.delete(a)), it(n, o, l); + } + } else (f = e ? e(Le(n, o), i, o + '', n, t, u) : T), f === T && (f = i), it(n, o, f); + }, + Bu, + ); + } + function Qt(n, t) { + var r = n.length; + if (r) return (t += 0 > t ? r : 0), Se(t, r) ? n[t] : T; + } + function Xt(n, t, r) { + var e = -1; + return ( + (t = c(t.length ? t : [$u], k(ye()))), + (n = Gt(n, function (n) { + return { + a: c(t, function (t) { + return t(n); + }), + b: ++e, + c: n, + }; + })), + w(n, function (n, t) { + var e; + n: { + e = -1; + for (var u = n.a, i = t.a, o = u.length, f = r.length; ++e < o; ) { + var c = Wr(u[e], i[e]); + if (c) { + e = e >= f ? c : c * ('desc' == r[e] ? -1 : 1); + break n; + } + } + e = n.b - t.b; + } + return e; + }) + ); + } + function nr(n, t) { + return tr(n, t, function (t, r) { + return zu(n, r); + }); + } + function tr(n, t, r) { + for (var e = -1, u = t.length, i = {}; ++e < u; ) { + var o = t[e], + f = kt(n, o); + r(f, o) && lr(i, Sr(o, n), f); + } + return i; + } + function rr(n) { + return function (t) { + return kt(t, n); + }; + } + function er(n, t, r, e) { + var u = e ? g : v, + i = -1, + o = t.length, + f = n; + for (n === t && (t = Ur(t)), r && (f = c(n, k(r))); ++i < o; ) + for (var a = 0, l = t[i], l = r ? r(l) : l; -1 < (a = u(f, l, a, e)); ) + f !== n && xi.call(f, a, 1), xi.call(n, a, 1); + return n; + } + function ur(n, t) { + for (var r = n ? t.length : 0, e = r - 1; r--; ) { + var u = t[r]; + if (r == e || u !== i) { + var i = u; + Se(u) ? xi.call(n, u, 1) : xr(n, u); + } + } + } + function ir(n, t) { + return n + Ii(Ti() * (t - n + 1)); + } + function or(n, t) { + var r = ''; + if (!n || 1 > t || 9007199254740991 < t) return r; + do t % 2 && (r += n), (t = Ii(t / 2)) && (n += n); + while (t); + return r; + } + function fr(n, t) { + return xo(Be(n, t, $u), n + ''); + } + function cr(n) { + return Qn(Uu(n)); + } + function ar(n, t) { + var r = Uu(n); + return De(r, pt(t, 0, r.length)); + } + function lr(n, t, r, e) { + if (!du(n)) return n; + t = Sr(t, n); + for (var u = -1, i = t.length, o = i - 1, f = n; null != f && ++u < i; ) { + var c = Me(t[u]), + a = r; + if (u != o) { + var l = f[c], + a = e ? e(l, c, f) : T; + a === T && (a = du(l) ? l : Se(t[u + 1]) ? [] : {}); + } + ot(f, c, a), (f = f[c]); + } + return n; + } + function sr(n) { + return De(Uu(n)); + } + function hr(n, t, r) { + var e = -1, + u = n.length; + for ( + 0 > t && (t = -t > u ? 0 : u + t), + r = r > u ? u : r, + 0 > r && (r += u), + u = t > r ? 0 : (r - t) >>> 0, + t >>>= 0, + r = Ku(u); + ++e < u; + + ) + r[e] = n[e + t]; + return r; + } + function pr(n, t) { + var r; + return ( + uo(n, function (n, e, u) { + return (r = t(n, e, u)), !r; + }), + !!r + ); + } + function _r(n, t, r) { + var e = 0, + u = null == n ? e : n.length; + if (typeof t == 'number' && t === t && 2147483647 >= u) { + for (; e < u; ) { + var i = (e + u) >>> 1, + o = n[i]; + null !== o && !wu(o) && (r ? o <= t : o < t) ? (e = i + 1) : (u = i); + } + return u; + } + return vr(n, t, $u, r); + } + function vr(n, t, r, e) { + t = r(t); + for ( + var u = 0, + i = null == n ? 0 : n.length, + o = t !== t, + f = null === t, + c = wu(t), + a = t === T; + u < i; + + ) { + var l = Ii((u + i) / 2), + s = r(n[l]), + h = s !== T, + p = null === s, + _ = s === s, + v = wu(s); + ( + o + ? e || _ + : a + ? _ && (e || h) + : f + ? _ && h && (e || !p) + : c + ? _ && h && !p && (e || !v) + : p || v + ? 0 + : e + ? s <= t + : s < t + ) + ? (u = l + 1) + : (i = l); + } + return Ci(i, 4294967294); + } + function gr(n, t) { + for (var r = -1, e = n.length, u = 0, i = []; ++r < e; ) { + var o = n[r], + f = t ? t(o) : o; + if (!r || !lu(f, c)) { + var c = f; + i[u++] = 0 === o ? 0 : o; + } + } + return i; + } + function dr(n) { + return typeof n == 'number' ? n : wu(n) ? F : +n; + } + function yr(n) { + if (typeof n == 'string') return n; + if (ff(n)) return c(n, yr) + ''; + if (wu(n)) return ro ? ro.call(n) : ''; + var t = n + ''; + return '0' == t && 1 / n == -$ ? '-0' : t; + } + function br(n, t, r) { + var e = -1, + u = o, + i = n.length, + c = true, + a = [], + l = a; + if (r) (c = false), (u = f); + else if (200 <= i) { + if ((u = t ? null : so(n))) return U(u); + (c = false), (u = O), (l = new Nn()); + } else l = t ? [] : a; + n: for (; ++e < i; ) { + var s = n[e], + h = t ? t(s) : s, + s = r || 0 !== s ? s : 0; + if (c && h === h) { + for (var p = l.length; p--; ) if (l[p] === h) continue n; + t && l.push(h), a.push(s); + } else u(l, h, r) || (l !== a && l.push(h), a.push(s)); + } + return a; + } + function xr(n, t) { + return ( + (t = Sr(t, n)), + (n = 2 > t.length ? n : kt(n, hr(t, 0, -1))), + null == n || delete n[Me(Ve(t))] + ); + } + function jr(n, t, r, e) { + for (var u = n.length, i = e ? u : -1; (e ? i-- : ++i < u) && t(n[i], i, n); ); + return r ? hr(n, e ? 0 : i, e ? i + 1 : u) : hr(n, e ? i + 1 : 0, e ? u : i); + } + function wr(n, t) { + var r = n; + return ( + r instanceof Un && (r = r.value()), + l( + t, + function (n, t) { + return t.func.apply(t.thisArg, a([n], t.args)); + }, + r, + ) + ); + } + function mr(n, t, r) { + var e = n.length; + if (2 > e) return e ? br(n[0]) : []; + for (var u = -1, i = Ku(e); ++u < e; ) + for (var o = n[u], f = -1; ++f < e; ) f != u && (i[u] = yt(i[u] || o, n[f], t, r)); + return br(wt(i, 1), t, r); + } + function Ar(n, t, r) { + for (var e = -1, u = n.length, i = t.length, o = {}; ++e < u; ) r(o, n[e], e < i ? t[e] : T); + return o; + } + function Er(n) { + return hu(n) ? n : []; + } + function kr(n) { + return typeof n == 'function' ? n : $u; + } + function Sr(n, t) { + return ff(n) ? n : Ie(n, t) ? [n] : jo(Iu(n)); + } + function Or(n, t, r) { + var e = n.length; + return (r = r === T ? e : r), !t && r >= e ? n : hr(n, t, r); + } + function Ir(n, t) { + if (t) return n.slice(); + var r = n.length, + r = gi ? gi(r) : new n.constructor(r); + return n.copy(r), r; + } + function Rr(n) { + var t = new n.constructor(n.byteLength); + return new vi(t).set(new vi(n)), t; + } + function zr(n, t) { + return new n.constructor(t ? Rr(n.buffer) : n.buffer, n.byteOffset, n.length); + } + function Wr(n, t) { + if (n !== t) { + var r = n !== T, + e = null === n, + u = n === n, + i = wu(n), + o = t !== T, + f = null === t, + c = t === t, + a = wu(t); + if ( + (!f && !a && !i && n > t) || + (i && o && c && !f && !a) || + (e && o && c) || + (!r && c) || + !u + ) + return 1; + if ( + (!e && !i && !a && n < t) || + (a && r && u && !e && !i) || + (f && r && u) || + (!o && u) || + !c + ) + return -1; + } + return 0; + } + function Br(n, t, r, e) { + var u = -1, + i = n.length, + o = r.length, + f = -1, + c = t.length, + a = Ui(i - o, 0), + l = Ku(c + a); + for (e = !e; ++f < c; ) l[f] = t[f]; + for (; ++u < o; ) (e || u < i) && (l[r[u]] = n[u]); + for (; a--; ) l[f++] = n[u++]; + return l; + } + function Lr(n, t, r, e) { + var u = -1, + i = n.length, + o = -1, + f = r.length, + c = -1, + a = t.length, + l = Ui(i - f, 0), + s = Ku(l + a); + for (e = !e; ++u < l; ) s[u] = n[u]; + for (l = u; ++c < a; ) s[l + c] = t[c]; + for (; ++o < f; ) (e || u < i) && (s[l + r[o]] = n[u++]); + return s; + } + function Ur(n, t) { + var r = -1, + e = n.length; + for (t || (t = Ku(e)); ++r < e; ) t[r] = n[r]; + return t; + } + function Cr(n, t, r, e) { + var u = !r; + r || (r = {}); + for (var i = -1, o = t.length; ++i < o; ) { + var f = t[i], + c = e ? e(r[f], n[f], f, r, n) : T; + c === T && (c = n[f]), u ? st(r, f, c) : ot(r, f, c); + } + return r; + } + function Dr(n, t) { + return Cr(n, po(n), t); + } + function Mr(n, t) { + return Cr(n, _o(n), t); + } + function Tr(n, r) { + return function (e, u) { + var i = ff(e) ? t : ct, + o = r ? r() : {}; + return i(e, n, ye(u, 2), o); + }; + } + function $r(n) { + return fr(function (t, r) { + var e = -1, + u = r.length, + i = 1 < u ? r[u - 1] : T, + o = 2 < u ? r[2] : T, + i = 3 < n.length && typeof i == 'function' ? (u--, i) : T; + for (o && Oe(r[0], r[1], o) && ((i = 3 > u ? T : i), (u = 1)), t = Qu(t); ++e < u; ) + (o = r[e]) && n(t, o, e, i); + return t; + }); + } + function Fr(n, t) { + return function (r, e) { + if (null == r) return r; + if (!su(r)) return n(r, e); + for ( + var u = r.length, i = t ? u : -1, o = Qu(r); + (t ? i-- : ++i < u) && false !== e(o[i], i, o); + + ); + return r; + }; + } + function Nr(n) { + return function (t, r, e) { + var u = -1, + i = Qu(t); + e = e(t); + for (var o = e.length; o--; ) { + var f = e[n ? o : ++u]; + if (false === r(i[f], f, i)) break; + } + return t; + }; + } + function Pr(n, t, r) { + function e() { + return (this && this !== $n && this instanceof e ? i : n).apply(u ? r : this, arguments); + } + var u = 1 & t, + i = Vr(n); + return e; + } + function Zr(n) { + return function (t) { + t = Iu(t); + var r = Rn.test(t) ? M(t) : T, + e = r ? r[0] : t.charAt(0); + return (t = r ? Or(r, 1).join('') : t.slice(1)), e[n]() + t; + }; + } + function qr(n) { + return function (t) { + return l(Mu(Du(t).replace(kn, '')), n, ''); + }; + } + function Vr(n) { + return function () { + var t = arguments; + switch (t.length) { + case 0: + return new n(); + case 1: + return new n(t[0]); + case 2: + return new n(t[0], t[1]); + case 3: + return new n(t[0], t[1], t[2]); + case 4: + return new n(t[0], t[1], t[2], t[3]); + case 5: + return new n(t[0], t[1], t[2], t[3], t[4]); + case 6: + return new n(t[0], t[1], t[2], t[3], t[4], t[5]); + case 7: + return new n(t[0], t[1], t[2], t[3], t[4], t[5], t[6]); + } + var r = eo(n.prototype), + t = n.apply(r, t); + return du(t) ? t : r; + }; + } + function Kr(t, r, e) { + function u() { + for (var o = arguments.length, f = Ku(o), c = o, a = de(u); c--; ) f[c] = arguments[c]; + return ( + (c = 3 > o && f[0] !== a && f[o - 1] !== a ? [] : L(f, a)), + (o -= c.length), + o < e + ? ue(t, r, Jr, u.placeholder, T, f, c, T, T, e - o) + : n(this && this !== $n && this instanceof u ? i : t, this, f) + ); + } + var i = Vr(t); + return u; + } + function Gr(n) { + return function (t, r, e) { + var u = Qu(t); + if (!su(t)) { + var i = ye(r, 3); + (t = Wu(t)), + (r = function (n) { + return i(u[n], n, u); + }); + } + return (r = n(t, r, e)), -1 < r ? u[i ? t[r] : r] : T; + }; + } + function Hr(n) { + return pe(function (t) { + var r = t.length, + e = r, + u = On.prototype.thru; + for (n && t.reverse(); e--; ) { + var i = t[e]; + if (typeof i != 'function') throw new ti('Expected a function'); + if (u && !o && 'wrapper' == ge(i)) var o = new On([], true); + } + for (e = o ? e : r; ++e < r; ) + var i = t[e], + u = ge(i), + f = 'wrapper' == u ? ho(i) : T, + o = + f && Re(f[0]) && 424 == f[1] && !f[4].length && 1 == f[9] + ? o[ge(f[0])].apply(o, f[3]) + : 1 == i.length && Re(i) + ? o[u]() + : o.thru(i); + return function () { + var n = arguments, + e = n[0]; + if (o && 1 == n.length && ff(e)) return o.plant(e).value(); + for (var u = 0, n = r ? t[u].apply(this, n) : e; ++u < r; ) n = t[u].call(this, n); + return n; + }; + }); + } + function Jr(n, t, r, e, u, i, o, f, c, a) { + function l() { + for (var d = arguments.length, y = Ku(d), b = d; b--; ) y[b] = arguments[b]; + if (_) { + var x, + j = de(l), + b = y.length; + for (x = 0; b--; ) y[b] === j && ++x; + } + if ((e && (y = Br(y, e, u, _)), i && (y = Lr(y, i, o, _)), (d -= x), _ && d < a)) + return (j = L(y, j)), ue(n, t, Jr, l.placeholder, r, y, j, f, c, a - d); + if (((j = h ? r : this), (b = p ? j[n] : n), (d = y.length), f)) { + x = y.length; + for (var w = Ci(f.length, x), m = Ur(y); w--; ) { + var A = f[w]; + y[w] = Se(A, x) ? m[A] : T; + } + } else v && 1 < d && y.reverse(); + return ( + s && c < d && (y.length = c), + this && this !== $n && this instanceof l && (b = g || Vr(b)), + b.apply(j, y) + ); + } + var s = 128 & t, + h = 1 & t, + p = 2 & t, + _ = 24 & t, + v = 512 & t, + g = p ? T : Vr(n); + return l; + } + function Yr(n, t) { + return function (r, e) { + return Bt(r, n, t(e)); + }; + } + function Qr(n, t) { + return function (r, e) { + var u; + if (r === T && e === T) return t; + if ((r !== T && (u = r), e !== T)) { + if (u === T) return e; + typeof r == 'string' || typeof e == 'string' + ? ((r = yr(r)), (e = yr(e))) + : ((r = dr(r)), (e = dr(e))), + (u = n(r, e)); + } + return u; + }; + } + function Xr(t) { + return pe(function (r) { + return ( + (r = c(r, k(ye()))), + fr(function (e) { + var u = this; + return t(r, function (t) { + return n(t, u, e); + }); + }) + ); + }); + } + function ne(n, t) { + t = t === T ? ' ' : yr(t); + var r = t.length; + return 2 > r + ? r + ? or(t, n) + : t + : ((r = or(t, Oi(n / D(t)))), Rn.test(t) ? Or(M(r), 0, n).join('') : r.slice(0, n)); + } + function te(t, r, e, u) { + function i() { + for ( + var r = -1, + c = arguments.length, + a = -1, + l = u.length, + s = Ku(l + c), + h = this && this !== $n && this instanceof i ? f : t; + ++a < l; + + ) + s[a] = u[a]; + for (; c--; ) s[a++] = arguments[++r]; + return n(h, o ? e : this, s); + } + var o = 1 & r, + f = Vr(t); + return i; + } + function re(n) { + return function (t, r, e) { + e && typeof e != 'number' && Oe(t, r, e) && (r = e = T), + (t = Au(t)), + r === T ? ((r = t), (t = 0)) : (r = Au(r)), + (e = e === T ? (t < r ? 1 : -1) : Au(e)); + var u = -1; + r = Ui(Oi((r - t) / (e || 1)), 0); + for (var i = Ku(r); r--; ) (i[n ? r : ++u] = t), (t += e); + return i; + }; + } + function ee(n) { + return function (t, r) { + return ( + (typeof t == 'string' && typeof r == 'string') || ((t = Su(t)), (r = Su(r))), n(t, r) + ); + }; + } + function ue(n, t, r, e, u, i, o, f, c, a) { + var l = 8 & t, + s = l ? o : T; + o = l ? T : o; + var h = l ? i : T; + return ( + (i = l ? T : i), + (t = (t | (l ? 32 : 64)) & ~(l ? 64 : 32)), + 4 & t || (t &= -4), + (u = [n, t, u, h, s, i, o, f, c, a]), + (r = r.apply(T, u)), + Re(n) && yo(r, u), + (r.placeholder = e), + Ue(r, n, t) + ); + } + function ie(n) { + var t = Yu[n]; + return function (n, r) { + if (((n = Su(n)), (r = null == r ? 0 : Ci(Eu(r), 292)) && Wi(n))) { + var e = (Iu(n) + 'e').split('e'), + e = t(e[0] + 'e' + (+e[1] + r)), + e = (Iu(e) + 'e').split('e'); + return +(e[0] + 'e' + (+e[1] - r)); + } + return t(n); + }; + } + function oe(n) { + return function (t) { + var r = vo(t); + return '[object Map]' == r ? W(t) : '[object Set]' == r ? C(t) : E(t, n(t)); + }; + } + function fe(n, t, r, e, u, i, o, f) { + var c = 2 & t; + if (!c && typeof n != 'function') throw new ti('Expected a function'); + var a = e ? e.length : 0; + if ( + (a || ((t &= -97), (e = u = T)), + (o = o === T ? o : Ui(Eu(o), 0)), + (f = f === T ? f : Eu(f)), + (a -= u ? u.length : 0), + 64 & t) + ) { + var l = e, + s = u; + e = u = T; + } + var h = c ? T : ho(n); + return ( + (i = [n, t, r, e, u, l, s, i, o, f]), + h && + ((r = i[1]), + (n = h[1]), + (t = r | n), + (e = + (128 == n && 8 == r) || + (128 == n && 256 == r && i[7].length <= h[8]) || + (384 == n && h[7].length <= h[8] && 8 == r)), + 131 > t || e) && + (1 & n && ((i[2] = h[2]), (t |= 1 & r ? 0 : 4)), + (r = h[3]) && + ((e = i[3]), + (i[3] = e ? Br(e, r, h[4]) : r), + (i[4] = e ? L(i[3], '__lodash_placeholder__') : h[4])), + (r = h[5]) && + ((e = i[5]), + (i[5] = e ? Lr(e, r, h[6]) : r), + (i[6] = e ? L(i[5], '__lodash_placeholder__') : h[6])), + (r = h[7]) && (i[7] = r), + 128 & n && (i[8] = null == i[8] ? h[8] : Ci(i[8], h[8])), + null == i[9] && (i[9] = h[9]), + (i[0] = h[0]), + (i[1] = t)), + (n = i[0]), + (t = i[1]), + (r = i[2]), + (e = i[3]), + (u = i[4]), + (f = i[9] = i[9] === T ? (c ? 0 : n.length) : Ui(i[9] - a, 0)), + !f && 24 & t && (t &= -25), + Ue( + (h ? co : yo)( + t && 1 != t + ? 8 == t || 16 == t + ? Kr(n, t, f) + : (32 != t && 33 != t) || u.length + ? Jr.apply(T, i) + : te(n, t, r, e) + : Pr(n, t, r), + i, + ), + n, + t, + ) + ); + } + function ce(n, t, r, e) { + return n === T || (lu(n, ei[r]) && !oi.call(e, r)) ? t : n; + } + function ae(n, t, r, e, u, i) { + return du(n) && du(t) && (i.set(t, n), Yt(n, t, T, ae, i), i.delete(t)), n; + } + function le(n) { + return xu(n) ? T : n; + } + function se(n, t, r, e, u, i) { + var o = 1 & r, + f = n.length, + c = t.length; + if (f != c && !(o && c > f)) return false; + if ((c = i.get(n)) && i.get(t)) return c == t; + var c = -1, + a = true, + l = 2 & r ? new Nn() : T; + for (i.set(n, t), i.set(t, n); ++c < f; ) { + var s = n[c], + p = t[c]; + if (e) var _ = o ? e(p, s, c, t, n, i) : e(s, p, c, n, t, i); + if (_ !== T) { + if (_) continue; + a = false; + break; + } + if (l) { + if ( + !h(t, function (n, t) { + if (!O(l, t) && (s === n || u(s, n, r, e, i))) return l.push(t); + }) + ) { + a = false; + break; + } + } else if (s !== p && !u(s, p, r, e, i)) { + a = false; + break; + } + } + return i.delete(n), i.delete(t), a; + } + function he(n, t, r, e, u, i, o) { + switch (r) { + case '[object DataView]': + if (n.byteLength != t.byteLength || n.byteOffset != t.byteOffset) break; + (n = n.buffer), (t = t.buffer); + case '[object ArrayBuffer]': + if (n.byteLength != t.byteLength || !i(new vi(n), new vi(t))) break; + return true; + case '[object Boolean]': + case '[object Date]': + case '[object Number]': + return lu(+n, +t); + case '[object Error]': + return n.name == t.name && n.message == t.message; + case '[object RegExp]': + case '[object String]': + return n == t + ''; + case '[object Map]': + var f = W; + case '[object Set]': + if ((f || (f = U), n.size != t.size && !(1 & e))) break; + return (r = o.get(n)) + ? r == t + : ((e |= 2), o.set(n, t), (t = se(f(n), f(t), e, u, i, o)), o.delete(n), t); + case '[object Symbol]': + if (to) return to.call(n) == to.call(t); + } + return false; + } + function pe(n) { + return xo(Be(n, T, Ze), n + ''); + } + function _e(n) { + return St(n, Wu, po); + } + function ve(n) { + return St(n, Bu, _o); + } + function ge(n) { + for (var t = n.name + '', r = Gi[t], e = oi.call(Gi, t) ? r.length : 0; e--; ) { + var u = r[e], + i = u.func; + if (null == i || i == n) return u.name; + } + return t; + } + function de(n) { + return (oi.call(An, 'placeholder') ? An : n).placeholder; + } + function ye() { + var n = An.iteratee || Fu, + n = n === Fu ? qt : n; + return arguments.length ? n(arguments[0], arguments[1]) : n; + } + function be(n, t) { + var r = n.__data__, + e = typeof t; + return ( + 'string' == e || 'number' == e || 'symbol' == e || 'boolean' == e + ? '__proto__' !== t + : null === t + ) + ? r[typeof t == 'string' ? 'string' : 'hash'] + : r.map; + } + function xe(n) { + for (var t = Wu(n), r = t.length; r--; ) { + var e = t[r], + u = n[e]; + t[r] = [e, u, u === u && !du(u)]; + } + return t; + } + function je(n, t) { + var r = null == n ? T : n[t]; + return Ft(r) ? r : T; + } + function we(n, t, r) { + t = Sr(t, n); + for (var e = -1, u = t.length, i = false; ++e < u; ) { + var o = Me(t[e]); + if (!(i = null != n && r(n, o))) break; + n = n[o]; + } + return i || ++e != u + ? i + : ((u = null == n ? 0 : n.length), !!u && gu(u) && Se(o, u) && (ff(n) || of(n))); + } + function me(n) { + var t = n.length, + r = new n.constructor(t); + return ( + t && + 'string' == typeof n[0] && + oi.call(n, 'index') && + ((r.index = n.index), (r.input = n.input)), + r + ); + } + function Ae(n) { + return typeof n.constructor != 'function' || ze(n) ? {} : eo(di(n)); + } + function Ee(n, t, r) { + var e = n.constructor; + switch (t) { + case '[object ArrayBuffer]': + return Rr(n); + case '[object Boolean]': + case '[object Date]': + return new e(+n); + case '[object DataView]': + return ( + (t = r ? Rr(n.buffer) : n.buffer), new n.constructor(t, n.byteOffset, n.byteLength) + ); + case '[object Float32Array]': + case '[object Float64Array]': + case '[object Int8Array]': + case '[object Int16Array]': + case '[object Int32Array]': + case '[object Uint8Array]': + case '[object Uint8ClampedArray]': + case '[object Uint16Array]': + case '[object Uint32Array]': + return zr(n, r); + case '[object Map]': + return new e(); + case '[object Number]': + case '[object String]': + return new e(n); + case '[object RegExp]': + return (t = new n.constructor(n.source, _n.exec(n))), (t.lastIndex = n.lastIndex), t; + case '[object Set]': + return new e(); + case '[object Symbol]': + return to ? Qu(to.call(n)) : {}; + } + } + function ke(n) { + return ff(n) || of(n) || !!(ji && n && n[ji]); + } + function Se(n, t) { + var r = typeof n; + return ( + (t = null == t ? 9007199254740991 : t), + !!t && ('number' == r || ('symbol' != r && bn.test(n))) && -1 < n && 0 == n % 1 && n < t + ); + } + function Oe(n, t, r) { + if (!du(r)) return false; + var e = typeof t; + return !!('number' == e ? su(r) && Se(t, r.length) : 'string' == e && t in r) && lu(r[t], n); + } + function Ie(n, t) { + if (ff(n)) return false; + var r = typeof n; + return ( + !('number' != r && 'symbol' != r && 'boolean' != r && null != n && !wu(n)) || + nn.test(n) || + !X.test(n) || + (null != t && n in Qu(t)) + ); + } + function Re(n) { + var t = ge(n), + r = An[t]; + return ( + typeof r == 'function' && t in Un.prototype && (n === r || ((t = ho(r)), !!t && n === t[0])) + ); + } + function ze(n) { + var t = n && n.constructor; + return n === ((typeof t == 'function' && t.prototype) || ei); + } + function We(n, t) { + return function (r) { + return null != r && r[n] === t && (t !== T || n in Qu(r)); + }; + } + function Be(t, r, e) { + return ( + (r = Ui(r === T ? t.length - 1 : r, 0)), + function () { + for (var u = arguments, i = -1, o = Ui(u.length - r, 0), f = Ku(o); ++i < o; ) + f[i] = u[r + i]; + for (i = -1, o = Ku(r + 1); ++i < r; ) o[i] = u[i]; + return (o[r] = e(f)), n(t, this, o); + } + ); + } + function Le(n, t) { + if (('constructor' !== t || 'function' != typeof n[t]) && '__proto__' != t) return n[t]; + } + function Ue(n, t, r) { + var e = t + ''; + t = xo; + var u, + i = $e; + return ( + (u = (u = e.match(an)) ? u[1].split(ln) : []), + (r = i(u, r)), + (i = r.length) && + ((u = i - 1), + (r[u] = (1 < i ? '& ' : '') + r[u]), + (r = r.join(2 < i ? ', ' : ' ')), + (e = e.replace(cn, '{\n/* [wrapped with ' + r + '] */\n'))), + t(n, e) + ); + } + function Ce(n) { + var t = 0, + r = 0; + return function () { + var e = Di(), + u = 16 - (e - r); + if (((r = e), 0 < u)) { + if (800 <= ++t) return arguments[0]; + } else t = 0; + return n.apply(T, arguments); + }; + } + function De(n, t) { + var r = -1, + e = n.length, + u = e - 1; + for (t = t === T ? e : t; ++r < t; ) { + var e = ir(r, u), + i = n[e]; + (n[e] = n[r]), (n[r] = i); + } + return (n.length = t), n; + } + function Me(n) { + if (typeof n == 'string' || wu(n)) return n; + var t = n + ''; + return '0' == t && 1 / n == -$ ? '-0' : t; + } + function Te(n) { + if (null != n) { + try { + return ii.call(n); + } catch (n) {} + return n + ''; + } + return ''; + } + function $e(n, t) { + return ( + r(N, function (r) { + var e = '_.' + r[0]; + t & r[1] && !o(n, e) && n.push(e); + }), + n.sort() + ); + } + function Fe(n) { + if (n instanceof Un) return n.clone(); + var t = new On(n.__wrapped__, n.__chain__); + return ( + (t.__actions__ = Ur(n.__actions__)), + (t.__index__ = n.__index__), + (t.__values__ = n.__values__), + t + ); + } + function Ne(n, t, r) { + var e = null == n ? 0 : n.length; + return e ? ((r = null == r ? 0 : Eu(r)), 0 > r && (r = Ui(e + r, 0)), _(n, ye(t, 3), r)) : -1; + } + function Pe(n, t, r) { + var e = null == n ? 0 : n.length; + if (!e) return -1; + var u = e - 1; + return ( + r !== T && ((u = Eu(r)), (u = 0 > r ? Ui(e + u, 0) : Ci(u, e - 1))), _(n, ye(t, 3), u, true) + ); + } + function Ze(n) { + return (null == n ? 0 : n.length) ? wt(n, 1) : []; + } + function qe(n) { + return n && n.length ? n[0] : T; + } + function Ve(n) { + var t = null == n ? 0 : n.length; + return t ? n[t - 1] : T; + } + function Ke(n, t) { + return n && n.length && t && t.length ? er(n, t) : n; + } + function Ge(n) { + return null == n ? n : $i.call(n); + } + function He(n) { + if (!n || !n.length) return []; + var t = 0; + return ( + (n = i(n, function (n) { + if (hu(n)) return (t = Ui(n.length, t)), true; + })), + A(t, function (t) { + return c(n, b(t)); + }) + ); + } + function Je(t, r) { + if (!t || !t.length) return []; + var e = He(t); + return null == r + ? e + : c(e, function (t) { + return n(r, T, t); + }); + } + function Ye(n) { + return (n = An(n)), (n.__chain__ = true), n; + } + function Qe(n, t) { + return t(n); + } + function Xe() { + return this; + } + function nu(n, t) { + return (ff(n) ? r : uo)(n, ye(t, 3)); + } + function tu(n, t) { + return (ff(n) ? e : io)(n, ye(t, 3)); + } + function ru(n, t) { + return (ff(n) ? c : Gt)(n, ye(t, 3)); + } + function eu(n, t, r) { + return (t = r ? T : t), (t = n && null == t ? n.length : t), fe(n, 128, T, T, T, T, t); + } + function uu(n, t) { + var r; + if (typeof t != 'function') throw new ti('Expected a function'); + return ( + (n = Eu(n)), + function () { + return 0 < --n && (r = t.apply(this, arguments)), 1 >= n && (t = T), r; + } + ); + } + function iu(n, t, r) { + return (t = r ? T : t), (n = fe(n, 8, T, T, T, T, T, t)), (n.placeholder = iu.placeholder), n; + } + function ou(n, t, r) { + return ( + (t = r ? T : t), (n = fe(n, 16, T, T, T, T, T, t)), (n.placeholder = ou.placeholder), n + ); + } + function fu(n, t, r) { + function e(t) { + var r = c, + e = a; + return (c = a = T), (_ = t), (s = n.apply(e, r)); + } + function u(n) { + var r = n - p; + return (n -= _), p === T || r >= t || 0 > r || (g && n >= l); + } + function i() { + var n = Go(); + if (u(n)) return o(n); + var r, + e = bo; + (r = n - _), (n = t - (n - p)), (r = g ? Ci(n, l - r) : n), (h = e(i, r)); + } + function o(n) { + return (h = T), d && c ? e(n) : ((c = a = T), s); + } + function f() { + var n = Go(), + r = u(n); + if (((c = arguments), (a = this), (p = n), r)) { + if (h === T) return (_ = n = p), (h = bo(i, t)), v ? e(n) : s; + if (g) return lo(h), (h = bo(i, t)), e(p); + } + return h === T && (h = bo(i, t)), s; + } + var c, + a, + l, + s, + h, + p, + _ = 0, + v = false, + g = false, + d = true; + if (typeof n != 'function') throw new ti('Expected a function'); + return ( + (t = Su(t) || 0), + du(r) && + ((v = !!r.leading), + (l = (g = 'maxWait' in r) ? Ui(Su(r.maxWait) || 0, t) : l), + (d = 'trailing' in r ? !!r.trailing : d)), + (f.cancel = function () { + h !== T && lo(h), (_ = 0), (c = p = a = h = T); + }), + (f.flush = function () { + return h === T ? s : o(Go()); + }), + f + ); + } + function cu(n, t) { + function r() { + var e = arguments, + u = t ? t.apply(this, e) : e[0], + i = r.cache; + return i.has(u) ? i.get(u) : ((e = n.apply(this, e)), (r.cache = i.set(u, e) || i), e); + } + if (typeof n != 'function' || (null != t && typeof t != 'function')) + throw new ti('Expected a function'); + return (r.cache = new (cu.Cache || Fn)()), r; + } + function au(n) { + if (typeof n != 'function') throw new ti('Expected a function'); + return function () { + var t = arguments; + switch (t.length) { + case 0: + return !n.call(this); + case 1: + return !n.call(this, t[0]); + case 2: + return !n.call(this, t[0], t[1]); + case 3: + return !n.call(this, t[0], t[1], t[2]); + } + return !n.apply(this, t); + }; + } + function lu(n, t) { + return n === t || (n !== n && t !== t); + } + function su(n) { + return null != n && gu(n.length) && !_u(n); + } + function hu(n) { + return yu(n) && su(n); + } + function pu(n) { + if (!yu(n)) return false; + var t = Ot(n); + return ( + '[object Error]' == t || + '[object DOMException]' == t || + (typeof n.message == 'string' && typeof n.name == 'string' && !xu(n)) + ); + } + function _u(n) { + return ( + !!du(n) && + ((n = Ot(n)), + '[object Function]' == n || + '[object GeneratorFunction]' == n || + '[object AsyncFunction]' == n || + '[object Proxy]' == n) + ); + } + function vu(n) { + return typeof n == 'number' && n == Eu(n); + } + function gu(n) { + return typeof n == 'number' && -1 < n && 0 == n % 1 && 9007199254740991 >= n; + } + function du(n) { + var t = typeof n; + return null != n && ('object' == t || 'function' == t); + } + function yu(n) { + return null != n && typeof n == 'object'; + } + function bu(n) { + return typeof n == 'number' || (yu(n) && '[object Number]' == Ot(n)); + } + function xu(n) { + return ( + !(!yu(n) || '[object Object]' != Ot(n)) && + ((n = di(n)), + null === n || + ((n = oi.call(n, 'constructor') && n.constructor), + typeof n == 'function' && n instanceof n && ii.call(n) == li)) + ); + } + function ju(n) { + return typeof n == 'string' || (!ff(n) && yu(n) && '[object String]' == Ot(n)); + } + function wu(n) { + return typeof n == 'symbol' || (yu(n) && '[object Symbol]' == Ot(n)); + } + function mu(n) { + if (!n) return []; + if (su(n)) return ju(n) ? M(n) : Ur(n); + if (wi && n[wi]) { + n = n[wi](); + for (var t, r = []; !(t = n.next()).done; ) r.push(t.value); + return r; + } + return (t = vo(n)), ('[object Map]' == t ? W : '[object Set]' == t ? U : Uu)(n); + } + function Au(n) { + return n + ? ((n = Su(n)), + n === $ || n === -$ ? 1.7976931348623157e308 * (0 > n ? -1 : 1) : n === n ? n : 0) + : 0 === n + ? n + : 0; + } + function Eu(n) { + n = Au(n); + var t = n % 1; + return n === n ? (t ? n - t : n) : 0; + } + function ku(n) { + return n ? pt(Eu(n), 0, 4294967295) : 0; + } + function Su(n) { + if (typeof n == 'number') return n; + if (wu(n)) return F; + if ( + (du(n) && + ((n = typeof n.valueOf == 'function' ? n.valueOf() : n), (n = du(n) ? n + '' : n)), + typeof n != 'string') + ) + return 0 === n ? n : +n; + n = n.replace(un, ''); + var t = gn.test(n); + return t || yn.test(n) ? Dn(n.slice(2), t ? 2 : 8) : vn.test(n) ? F : +n; + } + function Ou(n) { + return Cr(n, Bu(n)); + } + function Iu(n) { + return null == n ? '' : yr(n); + } + function Ru(n, t, r) { + return (n = null == n ? T : kt(n, t)), n === T ? r : n; + } + function zu(n, t) { + return null != n && we(n, t, zt); + } + function Wu(n) { + return su(n) ? qn(n) : Vt(n); + } + function Bu(n) { + if (su(n)) n = qn(n, true); + else if (du(n)) { + var t, + r = ze(n), + e = []; + for (t in n) ('constructor' != t || (!r && oi.call(n, t))) && e.push(t); + n = e; + } else { + if (((t = []), null != n)) for (r in Qu(n)) t.push(r); + n = t; + } + return n; + } + function Lu(n, t) { + if (null == n) return {}; + var r = c(ve(n), function (n) { + return [n]; + }); + return ( + (t = ye(t)), + tr(n, r, function (n, r) { + return t(n, r[0]); + }) + ); + } + function Uu(n) { + return null == n ? [] : S(n, Wu(n)); + } + function Cu(n) { + return $f(Iu(n).toLowerCase()); + } + function Du(n) { + return (n = Iu(n)) && n.replace(xn, Xn).replace(Sn, ''); + } + function Mu(n, t, r) { + return ( + (n = Iu(n)), + (t = r ? T : t), + t === T ? (zn.test(n) ? n.match(In) || [] : n.match(sn) || []) : n.match(t) || [] + ); + } + function Tu(n) { + return function () { + return n; + }; + } + function $u(n) { + return n; + } + function Fu(n) { + return qt(typeof n == 'function' ? n : _t(n, 1)); + } + function Nu(n, t, e) { + var u = Wu(t), + i = Et(t, u); + null != e || + (du(t) && (i.length || !u.length)) || + ((e = t), (t = n), (n = this), (i = Et(t, Wu(t)))); + var o = !(du(e) && 'chain' in e && !e.chain), + f = _u(n); + return ( + r(i, function (r) { + var e = t[r]; + (n[r] = e), + f && + (n.prototype[r] = function () { + var t = this.__chain__; + if (o || t) { + var r = n(this.__wrapped__); + return ( + (r.__actions__ = Ur(this.__actions__)).push({ + func: e, + args: arguments, + thisArg: n, + }), + (r.__chain__ = t), + r + ); + } + return e.apply(n, a([this.value()], arguments)); + }); + }), + n + ); + } + function Pu() {} + function Zu(n) { + return Ie(n) ? b(Me(n)) : rr(n); + } + function qu() { + return []; + } + function Vu() { + return false; + } + mn = null == mn ? $n : rt.defaults($n.Object(), mn, rt.pick($n, Wn)); + var Ku = mn.Array, + Gu = mn.Date, + Hu = mn.Error, + Ju = mn.Function, + Yu = mn.Math, + Qu = mn.Object, + Xu = mn.RegExp, + ni = mn.String, + ti = mn.TypeError, + ri = Ku.prototype, + ei = Qu.prototype, + ui = mn['__core-js_shared__'], + ii = Ju.prototype.toString, + oi = ei.hasOwnProperty, + fi = 0, + ci = (function () { + var n = /[^.]+$/.exec((ui && ui.keys && ui.keys.IE_PROTO) || ''); + return n ? 'Symbol(src)_1.' + n : ''; + })(), + ai = ei.toString, + li = ii.call(Qu), + si = $n._, + hi = Xu( + '^' + + ii + .call(oi) + .replace(rn, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + + '$', + ), + pi = Pn ? mn.Buffer : T, + _i = mn.Symbol, + vi = mn.Uint8Array, + gi = pi ? pi.g : T, + di = B(Qu.getPrototypeOf, Qu), + yi = Qu.create, + bi = ei.propertyIsEnumerable, + xi = ri.splice, + ji = _i ? _i.isConcatSpreadable : T, + wi = _i ? _i.iterator : T, + mi = _i ? _i.toStringTag : T, + Ai = (function () { + try { + var n = je(Qu, 'defineProperty'); + return n({}, '', {}), n; + } catch (n) {} + })(), + Ei = mn.clearTimeout !== $n.clearTimeout && mn.clearTimeout, + ki = Gu && Gu.now !== $n.Date.now && Gu.now, + Si = mn.setTimeout !== $n.setTimeout && mn.setTimeout, + Oi = Yu.ceil, + Ii = Yu.floor, + Ri = Qu.getOwnPropertySymbols, + zi = pi ? pi.isBuffer : T, + Wi = mn.isFinite, + Bi = ri.join, + Li = B(Qu.keys, Qu), + Ui = Yu.max, + Ci = Yu.min, + Di = Gu.now, + Mi = mn.parseInt, + Ti = Yu.random, + $i = ri.reverse, + Fi = je(mn, 'DataView'), + Ni = je(mn, 'Map'), + Pi = je(mn, 'Promise'), + Zi = je(mn, 'Set'), + qi = je(mn, 'WeakMap'), + Vi = je(Qu, 'create'), + Ki = qi && new qi(), + Gi = {}, + Hi = Te(Fi), + Ji = Te(Ni), + Yi = Te(Pi), + Qi = Te(Zi), + Xi = Te(qi), + no = _i ? _i.prototype : T, + to = no ? no.valueOf : T, + ro = no ? no.toString : T, + eo = (function () { + function n() {} + return function (t) { + return du(t) + ? yi + ? yi(t) + : ((n.prototype = t), (t = new n()), (n.prototype = T), t) + : {}; + }; + })(); + (An.templateSettings = { + escape: J, + evaluate: Y, + interpolate: Q, + variable: '', + imports: { _: An }, + }), + (An.prototype = En.prototype), + (An.prototype.constructor = An), + (On.prototype = eo(En.prototype)), + (On.prototype.constructor = On), + (Un.prototype = eo(En.prototype)), + (Un.prototype.constructor = Un), + (Mn.prototype.clear = function () { + (this.__data__ = Vi ? Vi(null) : {}), (this.size = 0); + }), + (Mn.prototype.delete = function (n) { + return (n = this.has(n) && delete this.__data__[n]), (this.size -= n ? 1 : 0), n; + }), + (Mn.prototype.get = function (n) { + var t = this.__data__; + return Vi + ? ((n = t[n]), '__lodash_hash_undefined__' === n ? T : n) + : oi.call(t, n) + ? t[n] + : T; + }), + (Mn.prototype.has = function (n) { + var t = this.__data__; + return Vi ? t[n] !== T : oi.call(t, n); + }), + (Mn.prototype.set = function (n, t) { + var r = this.__data__; + return ( + (this.size += this.has(n) ? 0 : 1), + (r[n] = Vi && t === T ? '__lodash_hash_undefined__' : t), + this + ); + }), + (Tn.prototype.clear = function () { + (this.__data__ = []), (this.size = 0); + }), + (Tn.prototype.delete = function (n) { + var t = this.__data__; + return ( + (n = ft(t, n)), + !(0 > n) && (n == t.length - 1 ? t.pop() : xi.call(t, n, 1), --this.size, true) + ); + }), + (Tn.prototype.get = function (n) { + var t = this.__data__; + return (n = ft(t, n)), 0 > n ? T : t[n][1]; + }), + (Tn.prototype.has = function (n) { + return -1 < ft(this.__data__, n); + }), + (Tn.prototype.set = function (n, t) { + var r = this.__data__, + e = ft(r, n); + return 0 > e ? (++this.size, r.push([n, t])) : (r[e][1] = t), this; + }), + (Fn.prototype.clear = function () { + (this.size = 0), + (this.__data__ = { hash: new Mn(), map: new (Ni || Tn)(), string: new Mn() }); + }), + (Fn.prototype.delete = function (n) { + return (n = be(this, n).delete(n)), (this.size -= n ? 1 : 0), n; + }), + (Fn.prototype.get = function (n) { + return be(this, n).get(n); + }), + (Fn.prototype.has = function (n) { + return be(this, n).has(n); + }), + (Fn.prototype.set = function (n, t) { + var r = be(this, n), + e = r.size; + return r.set(n, t), (this.size += r.size == e ? 0 : 1), this; + }), + (Nn.prototype.add = Nn.prototype.push = + function (n) { + return this.__data__.set(n, '__lodash_hash_undefined__'), this; + }), + (Nn.prototype.has = function (n) { + return this.__data__.has(n); + }), + (Zn.prototype.clear = function () { + (this.__data__ = new Tn()), (this.size = 0); + }), + (Zn.prototype.delete = function (n) { + var t = this.__data__; + return (n = t.delete(n)), (this.size = t.size), n; + }), + (Zn.prototype.get = function (n) { + return this.__data__.get(n); + }), + (Zn.prototype.has = function (n) { + return this.__data__.has(n); + }), + (Zn.prototype.set = function (n, t) { + var r = this.__data__; + if (r instanceof Tn) { + var e = r.__data__; + if (!Ni || 199 > e.length) return e.push([n, t]), (this.size = ++r.size), this; + r = this.__data__ = new Fn(e); + } + return r.set(n, t), (this.size = r.size), this; + }); + var uo = Fr(mt), + io = Fr(At, true), + oo = Nr(), + fo = Nr(true), + co = Ki + ? function (n, t) { + return Ki.set(n, t), n; + } + : $u, + ao = Ai + ? function (n, t) { + return Ai(n, 'toString', { + configurable: true, + enumerable: false, + value: Tu(t), + writable: true, + }); + } + : $u, + lo = + Ei || + function (n) { + return $n.clearTimeout(n); + }, + so = + Zi && 1 / U(new Zi([, -0]))[1] == $ + ? function (n) { + return new Zi(n); + } + : Pu, + ho = Ki + ? function (n) { + return Ki.get(n); + } + : Pu, + po = Ri + ? function (n) { + return null == n + ? [] + : ((n = Qu(n)), + i(Ri(n), function (t) { + return bi.call(n, t); + })); + } + : qu, + _o = Ri + ? function (n) { + for (var t = []; n; ) a(t, po(n)), (n = di(n)); + return t; + } + : qu, + vo = Ot; + ((Fi && '[object DataView]' != vo(new Fi(new ArrayBuffer(1)))) || + (Ni && '[object Map]' != vo(new Ni())) || + (Pi && '[object Promise]' != vo(Pi.resolve())) || + (Zi && '[object Set]' != vo(new Zi())) || + (qi && '[object WeakMap]' != vo(new qi()))) && + (vo = function (n) { + var t = Ot(n); + if ((n = (n = '[object Object]' == t ? n.constructor : T) ? Te(n) : '')) + switch (n) { + case Hi: + return '[object DataView]'; + case Ji: + return '[object Map]'; + case Yi: + return '[object Promise]'; + case Qi: + return '[object Set]'; + case Xi: + return '[object WeakMap]'; + } + return t; + }); + var go = ui ? _u : Vu, + yo = Ce(co), + bo = + Si || + function (n, t) { + return $n.setTimeout(n, t); + }, + xo = Ce(ao), + jo = (function (n) { + n = cu(n, function (n) { + return 500 === t.size && t.clear(), n; + }); + var t = n.cache; + return n; + })(function (n) { + var t = []; + return ( + 46 === n.charCodeAt(0) && t.push(''), + n.replace(tn, function (n, r, e, u) { + t.push(e ? u.replace(hn, '$1') : r || n); + }), + t + ); + }), + wo = fr(function (n, t) { + return hu(n) ? yt(n, wt(t, 1, hu, true)) : []; + }), + mo = fr(function (n, t) { + var r = Ve(t); + return hu(r) && (r = T), hu(n) ? yt(n, wt(t, 1, hu, true), ye(r, 2)) : []; + }), + Ao = fr(function (n, t) { + var r = Ve(t); + return hu(r) && (r = T), hu(n) ? yt(n, wt(t, 1, hu, true), T, r) : []; + }), + Eo = fr(function (n) { + var t = c(n, Er); + return t.length && t[0] === n[0] ? Wt(t) : []; + }), + ko = fr(function (n) { + var t = Ve(n), + r = c(n, Er); + return t === Ve(r) ? (t = T) : r.pop(), r.length && r[0] === n[0] ? Wt(r, ye(t, 2)) : []; + }), + So = fr(function (n) { + var t = Ve(n), + r = c(n, Er); + return ( + (t = typeof t == 'function' ? t : T) && r.pop(), + r.length && r[0] === n[0] ? Wt(r, T, t) : [] + ); + }), + Oo = fr(Ke), + Io = pe(function (n, t) { + var r = null == n ? 0 : n.length, + e = ht(n, t); + return ( + ur( + n, + c(t, function (n) { + return Se(n, r) ? +n : n; + }).sort(Wr), + ), + e + ); + }), + Ro = fr(function (n) { + return br(wt(n, 1, hu, true)); + }), + zo = fr(function (n) { + var t = Ve(n); + return hu(t) && (t = T), br(wt(n, 1, hu, true), ye(t, 2)); + }), + Wo = fr(function (n) { + var t = Ve(n), + t = typeof t == 'function' ? t : T; + return br(wt(n, 1, hu, true), T, t); + }), + Bo = fr(function (n, t) { + return hu(n) ? yt(n, t) : []; + }), + Lo = fr(function (n) { + return mr(i(n, hu)); + }), + Uo = fr(function (n) { + var t = Ve(n); + return hu(t) && (t = T), mr(i(n, hu), ye(t, 2)); + }), + Co = fr(function (n) { + var t = Ve(n), + t = typeof t == 'function' ? t : T; + return mr(i(n, hu), T, t); + }), + Do = fr(He), + Mo = fr(function (n) { + var t = n.length, + t = 1 < t ? n[t - 1] : T, + t = typeof t == 'function' ? (n.pop(), t) : T; + return Je(n, t); + }), + To = pe(function (n) { + function t(t) { + return ht(t, n); + } + var r = n.length, + e = r ? n[0] : 0, + u = this.__wrapped__; + return !(1 < r || this.__actions__.length) && u instanceof Un && Se(e) + ? ((u = u.slice(e, +e + (r ? 1 : 0))), + u.__actions__.push({ func: Qe, args: [t], thisArg: T }), + new On(u, this.__chain__).thru(function (n) { + return r && !n.length && n.push(T), n; + })) + : this.thru(t); + }), + $o = Tr(function (n, t, r) { + oi.call(n, r) ? ++n[r] : st(n, r, 1); + }), + Fo = Gr(Ne), + No = Gr(Pe), + Po = Tr(function (n, t, r) { + oi.call(n, r) ? n[r].push(t) : st(n, r, [t]); + }), + Zo = fr(function (t, r, e) { + var u = -1, + i = typeof r == 'function', + o = su(t) ? Ku(t.length) : []; + return ( + uo(t, function (t) { + o[++u] = i ? n(r, t, e) : Lt(t, r, e); + }), + o + ); + }), + qo = Tr(function (n, t, r) { + st(n, r, t); + }), + Vo = Tr( + function (n, t, r) { + n[r ? 0 : 1].push(t); + }, + function () { + return [[], []]; + }, + ), + Ko = fr(function (n, t) { + if (null == n) return []; + var r = t.length; + return ( + 1 < r && Oe(n, t[0], t[1]) ? (t = []) : 2 < r && Oe(t[0], t[1], t[2]) && (t = [t[0]]), + Xt(n, wt(t, 1), []) + ); + }), + Go = + ki || + function () { + return $n.Date.now(); + }, + Ho = fr(function (n, t, r) { + var e = 1; + if (r.length) + var u = L(r, de(Ho)), + e = 32 | e; + return fe(n, e, t, r, u); + }), + Jo = fr(function (n, t, r) { + var e = 3; + if (r.length) + var u = L(r, de(Jo)), + e = 32 | e; + return fe(t, e, n, r, u); + }), + Yo = fr(function (n, t) { + return dt(n, 1, t); + }), + Qo = fr(function (n, t, r) { + return dt(n, Su(t) || 0, r); + }); + cu.Cache = Fn; + var Xo = fr(function (t, r) { + r = 1 == r.length && ff(r[0]) ? c(r[0], k(ye())) : c(wt(r, 1), k(ye())); + var e = r.length; + return fr(function (u) { + for (var i = -1, o = Ci(u.length, e); ++i < o; ) u[i] = r[i].call(this, u[i]); + return n(t, this, u); + }); + }), + nf = fr(function (n, t) { + return fe(n, 32, T, t, L(t, de(nf))); + }), + tf = fr(function (n, t) { + return fe(n, 64, T, t, L(t, de(tf))); + }), + rf = pe(function (n, t) { + return fe(n, 256, T, T, T, t); + }), + ef = ee(It), + uf = ee(function (n, t) { + return n >= t; + }), + of = Ut( + (function () { + return arguments; + })(), + ) + ? Ut + : function (n) { + return yu(n) && oi.call(n, 'callee') && !bi.call(n, 'callee'); + }, + ff = Ku.isArray, + cf = Vn ? k(Vn) : Ct, + af = zi || Vu, + lf = Kn ? k(Kn) : Dt, + sf = Gn ? k(Gn) : Tt, + hf = Hn ? k(Hn) : Nt, + pf = Jn ? k(Jn) : Pt, + _f = Yn ? k(Yn) : Zt, + vf = ee(Kt), + gf = ee(function (n, t) { + return n <= t; + }), + df = $r(function (n, t) { + if (ze(t) || su(t)) Cr(t, Wu(t), n); + else for (var r in t) oi.call(t, r) && ot(n, r, t[r]); + }), + yf = $r(function (n, t) { + Cr(t, Bu(t), n); + }), + bf = $r(function (n, t, r, e) { + Cr(t, Bu(t), n, e); + }), + xf = $r(function (n, t, r, e) { + Cr(t, Wu(t), n, e); + }), + jf = pe(ht), + wf = fr(function (n, t) { + n = Qu(n); + var r = -1, + e = t.length, + u = 2 < e ? t[2] : T; + for (u && Oe(t[0], t[1], u) && (e = 1); ++r < e; ) + for (var u = t[r], i = Bu(u), o = -1, f = i.length; ++o < f; ) { + var c = i[o], + a = n[c]; + (a === T || (lu(a, ei[c]) && !oi.call(n, c))) && (n[c] = u[c]); + } + return n; + }), + mf = fr(function (t) { + return t.push(T, ae), n(Of, T, t); + }), + Af = Yr(function (n, t, r) { + null != t && typeof t.toString != 'function' && (t = ai.call(t)), (n[t] = r); + }, Tu($u)), + Ef = Yr(function (n, t, r) { + null != t && typeof t.toString != 'function' && (t = ai.call(t)), + oi.call(n, t) ? n[t].push(r) : (n[t] = [r]); + }, ye), + kf = fr(Lt), + Sf = $r(function (n, t, r) { + Yt(n, t, r); + }), + Of = $r(function (n, t, r, e) { + Yt(n, t, r, e); + }), + If = pe(function (n, t) { + var r = {}; + if (null == n) return r; + var e = false; + (t = c(t, function (t) { + return (t = Sr(t, n)), e || (e = 1 < t.length), t; + })), + Cr(n, ve(n), r), + e && (r = _t(r, 7, le)); + for (var u = t.length; u--; ) xr(r, t[u]); + return r; + }), + Rf = pe(function (n, t) { + return null == n ? {} : nr(n, t); + }), + zf = oe(Wu), + Wf = oe(Bu), + Bf = qr(function (n, t, r) { + return (t = t.toLowerCase()), n + (r ? Cu(t) : t); + }), + Lf = qr(function (n, t, r) { + return n + (r ? '-' : '') + t.toLowerCase(); + }), + Uf = qr(function (n, t, r) { + return n + (r ? ' ' : '') + t.toLowerCase(); + }), + Cf = Zr('toLowerCase'), + Df = qr(function (n, t, r) { + return n + (r ? '_' : '') + t.toLowerCase(); + }), + Mf = qr(function (n, t, r) { + return n + (r ? ' ' : '') + $f(t); + }), + Tf = qr(function (n, t, r) { + return n + (r ? ' ' : '') + t.toUpperCase(); + }), + $f = Zr('toUpperCase'), + Ff = fr(function (t, r) { + try { + return n(t, T, r); + } catch (n) { + return pu(n) ? n : new Hu(n); + } + }), + Nf = pe(function (n, t) { + return ( + r(t, function (t) { + (t = Me(t)), st(n, t, Ho(n[t], n)); + }), + n + ); + }), + Pf = Hr(), + Zf = Hr(true), + qf = fr(function (n, t) { + return function (r) { + return Lt(r, n, t); + }; + }), + Vf = fr(function (n, t) { + return function (r) { + return Lt(n, r, t); + }; + }), + Kf = Xr(c), + Gf = Xr(u), + Hf = Xr(h), + Jf = re(), + Yf = re(true), + Qf = Qr(function (n, t) { + return n + t; + }, 0), + Xf = ie('ceil'), + nc = Qr(function (n, t) { + return n / t; + }, 1), + tc = ie('floor'), + rc = Qr(function (n, t) { + return n * t; + }, 1), + ec = ie('round'), + uc = Qr(function (n, t) { + return n - t; + }, 0); + return ( + (An.after = function (n, t) { + if (typeof t != 'function') throw new ti('Expected a function'); + return ( + (n = Eu(n)), + function () { + if (1 > --n) return t.apply(this, arguments); + } + ); + }), + (An.ary = eu), + (An.assign = df), + (An.assignIn = yf), + (An.assignInWith = bf), + (An.assignWith = xf), + (An.at = jf), + (An.before = uu), + (An.bind = Ho), + (An.bindAll = Nf), + (An.bindKey = Jo), + (An.castArray = function () { + if (!arguments.length) return []; + var n = arguments[0]; + return ff(n) ? n : [n]; + }), + (An.chain = Ye), + (An.chunk = function (n, t, r) { + if ( + ((t = (r ? Oe(n, t, r) : t === T) ? 1 : Ui(Eu(t), 0)), + (r = null == n ? 0 : n.length), + !r || 1 > t) + ) + return []; + for (var e = 0, u = 0, i = Ku(Oi(r / t)); e < r; ) i[u++] = hr(n, e, (e += t)); + return i; + }), + (An.compact = function (n) { + for (var t = -1, r = null == n ? 0 : n.length, e = 0, u = []; ++t < r; ) { + var i = n[t]; + i && (u[e++] = i); + } + return u; + }), + (An.concat = function () { + var n = arguments.length; + if (!n) return []; + for (var t = Ku(n - 1), r = arguments[0]; n--; ) t[n - 1] = arguments[n]; + return a(ff(r) ? Ur(r) : [r], wt(t, 1)); + }), + (An.cond = function (t) { + var r = null == t ? 0 : t.length, + e = ye(); + return ( + (t = r + ? c(t, function (n) { + if ('function' != typeof n[1]) throw new ti('Expected a function'); + return [e(n[0]), n[1]]; + }) + : []), + fr(function (e) { + for (var u = -1; ++u < r; ) { + var i = t[u]; + if (n(i[0], this, e)) return n(i[1], this, e); + } + }) + ); + }), + (An.conforms = function (n) { + return vt(_t(n, 1)); + }), + (An.constant = Tu), + (An.countBy = $o), + (An.create = function (n, t) { + var r = eo(n); + return null == t ? r : at(r, t); + }), + (An.curry = iu), + (An.curryRight = ou), + (An.debounce = fu), + (An.defaults = wf), + (An.defaultsDeep = mf), + (An.defer = Yo), + (An.delay = Qo), + (An.difference = wo), + (An.differenceBy = mo), + (An.differenceWith = Ao), + (An.drop = function (n, t, r) { + var e = null == n ? 0 : n.length; + return e ? ((t = r || t === T ? 1 : Eu(t)), hr(n, 0 > t ? 0 : t, e)) : []; + }), + (An.dropRight = function (n, t, r) { + var e = null == n ? 0 : n.length; + return e ? ((t = r || t === T ? 1 : Eu(t)), (t = e - t), hr(n, 0, 0 > t ? 0 : t)) : []; + }), + (An.dropRightWhile = function (n, t) { + return n && n.length ? jr(n, ye(t, 3), true, true) : []; + }), + (An.dropWhile = function (n, t) { + return n && n.length ? jr(n, ye(t, 3), true) : []; + }), + (An.fill = function (n, t, r, e) { + var u = null == n ? 0 : n.length; + if (!u) return []; + for ( + r && typeof r != 'number' && Oe(n, t, r) && ((r = 0), (e = u)), + u = n.length, + r = Eu(r), + 0 > r && (r = -r > u ? 0 : u + r), + e = e === T || e > u ? u : Eu(e), + 0 > e && (e += u), + e = r > e ? 0 : ku(e); + r < e; + + ) + n[r++] = t; + return n; + }), + (An.filter = function (n, t) { + return (ff(n) ? i : jt)(n, ye(t, 3)); + }), + (An.flatMap = function (n, t) { + return wt(ru(n, t), 1); + }), + (An.flatMapDeep = function (n, t) { + return wt(ru(n, t), $); + }), + (An.flatMapDepth = function (n, t, r) { + return (r = r === T ? 1 : Eu(r)), wt(ru(n, t), r); + }), + (An.flatten = Ze), + (An.flattenDeep = function (n) { + return (null == n ? 0 : n.length) ? wt(n, $) : []; + }), + (An.flattenDepth = function (n, t) { + return null != n && n.length ? ((t = t === T ? 1 : Eu(t)), wt(n, t)) : []; + }), + (An.flip = function (n) { + return fe(n, 512); + }), + (An.flow = Pf), + (An.flowRight = Zf), + (An.fromPairs = function (n) { + for (var t = -1, r = null == n ? 0 : n.length, e = {}; ++t < r; ) { + var u = n[t]; + e[u[0]] = u[1]; + } + return e; + }), + (An.functions = function (n) { + return null == n ? [] : Et(n, Wu(n)); + }), + (An.functionsIn = function (n) { + return null == n ? [] : Et(n, Bu(n)); + }), + (An.groupBy = Po), + (An.initial = function (n) { + return (null == n ? 0 : n.length) ? hr(n, 0, -1) : []; + }), + (An.intersection = Eo), + (An.intersectionBy = ko), + (An.intersectionWith = So), + (An.invert = Af), + (An.invertBy = Ef), + (An.invokeMap = Zo), + (An.iteratee = Fu), + (An.keyBy = qo), + (An.keys = Wu), + (An.keysIn = Bu), + (An.map = ru), + (An.mapKeys = function (n, t) { + var r = {}; + return ( + (t = ye(t, 3)), + mt(n, function (n, e, u) { + st(r, t(n, e, u), n); + }), + r + ); + }), + (An.mapValues = function (n, t) { + var r = {}; + return ( + (t = ye(t, 3)), + mt(n, function (n, e, u) { + st(r, e, t(n, e, u)); + }), + r + ); + }), + (An.matches = function (n) { + return Ht(_t(n, 1)); + }), + (An.matchesProperty = function (n, t) { + return Jt(n, _t(t, 1)); + }), + (An.memoize = cu), + (An.merge = Sf), + (An.mergeWith = Of), + (An.method = qf), + (An.methodOf = Vf), + (An.mixin = Nu), + (An.negate = au), + (An.nthArg = function (n) { + return ( + (n = Eu(n)), + fr(function (t) { + return Qt(t, n); + }) + ); + }), + (An.omit = If), + (An.omitBy = function (n, t) { + return Lu(n, au(ye(t))); + }), + (An.once = function (n) { + return uu(2, n); + }), + (An.orderBy = function (n, t, r, e) { + return null == n + ? [] + : (ff(t) || (t = null == t ? [] : [t]), + (r = e ? T : r), + ff(r) || (r = null == r ? [] : [r]), + Xt(n, t, r)); + }), + (An.over = Kf), + (An.overArgs = Xo), + (An.overEvery = Gf), + (An.overSome = Hf), + (An.partial = nf), + (An.partialRight = tf), + (An.partition = Vo), + (An.pick = Rf), + (An.pickBy = Lu), + (An.property = Zu), + (An.propertyOf = function (n) { + return function (t) { + return null == n ? T : kt(n, t); + }; + }), + (An.pull = Oo), + (An.pullAll = Ke), + (An.pullAllBy = function (n, t, r) { + return n && n.length && t && t.length ? er(n, t, ye(r, 2)) : n; + }), + (An.pullAllWith = function (n, t, r) { + return n && n.length && t && t.length ? er(n, t, T, r) : n; + }), + (An.pullAt = Io), + (An.range = Jf), + (An.rangeRight = Yf), + (An.rearg = rf), + (An.reject = function (n, t) { + return (ff(n) ? i : jt)(n, au(ye(t, 3))); + }), + (An.remove = function (n, t) { + var r = []; + if (!n || !n.length) return r; + var e = -1, + u = [], + i = n.length; + for (t = ye(t, 3); ++e < i; ) { + var o = n[e]; + t(o, e, n) && (r.push(o), u.push(e)); + } + return ur(n, u), r; + }), + (An.rest = function (n, t) { + if (typeof n != 'function') throw new ti('Expected a function'); + return (t = t === T ? t : Eu(t)), fr(n, t); + }), + (An.reverse = Ge), + (An.sampleSize = function (n, t, r) { + return (t = (r ? Oe(n, t, r) : t === T) ? 1 : Eu(t)), (ff(n) ? et : ar)(n, t); + }), + (An.set = function (n, t, r) { + return null == n ? n : lr(n, t, r); + }), + (An.setWith = function (n, t, r, e) { + return (e = typeof e == 'function' ? e : T), null == n ? n : lr(n, t, r, e); + }), + (An.shuffle = function (n) { + return (ff(n) ? ut : sr)(n); + }), + (An.slice = function (n, t, r) { + var e = null == n ? 0 : n.length; + return e + ? (r && typeof r != 'number' && Oe(n, t, r) + ? ((t = 0), (r = e)) + : ((t = null == t ? 0 : Eu(t)), (r = r === T ? e : Eu(r))), + hr(n, t, r)) + : []; + }), + (An.sortBy = Ko), + (An.sortedUniq = function (n) { + return n && n.length ? gr(n) : []; + }), + (An.sortedUniqBy = function (n, t) { + return n && n.length ? gr(n, ye(t, 2)) : []; + }), + (An.split = function (n, t, r) { + return ( + r && typeof r != 'number' && Oe(n, t, r) && (t = r = T), + (r = r === T ? 4294967295 : r >>> 0), + r + ? (n = Iu(n)) && + (typeof t == 'string' || (null != t && !hf(t))) && + ((t = yr(t)), !t && Rn.test(n)) + ? Or(M(n), 0, r) + : n.split(t, r) + : [] + ); + }), + (An.spread = function (t, r) { + if (typeof t != 'function') throw new ti('Expected a function'); + return ( + (r = null == r ? 0 : Ui(Eu(r), 0)), + fr(function (e) { + var u = e[r]; + return (e = Or(e, 0, r)), u && a(e, u), n(t, this, e); + }) + ); + }), + (An.tail = function (n) { + var t = null == n ? 0 : n.length; + return t ? hr(n, 1, t) : []; + }), + (An.take = function (n, t, r) { + return n && n.length ? ((t = r || t === T ? 1 : Eu(t)), hr(n, 0, 0 > t ? 0 : t)) : []; + }), + (An.takeRight = function (n, t, r) { + var e = null == n ? 0 : n.length; + return e ? ((t = r || t === T ? 1 : Eu(t)), (t = e - t), hr(n, 0 > t ? 0 : t, e)) : []; + }), + (An.takeRightWhile = function (n, t) { + return n && n.length ? jr(n, ye(t, 3), false, true) : []; + }), + (An.takeWhile = function (n, t) { + return n && n.length ? jr(n, ye(t, 3)) : []; + }), + (An.tap = function (n, t) { + return t(n), n; + }), + (An.throttle = function (n, t, r) { + var e = true, + u = true; + if (typeof n != 'function') throw new ti('Expected a function'); + return ( + du(r) && + ((e = 'leading' in r ? !!r.leading : e), (u = 'trailing' in r ? !!r.trailing : u)), + fu(n, t, { leading: e, maxWait: t, trailing: u }) + ); + }), + (An.thru = Qe), + (An.toArray = mu), + (An.toPairs = zf), + (An.toPairsIn = Wf), + (An.toPath = function (n) { + return ff(n) ? c(n, Me) : wu(n) ? [n] : Ur(jo(Iu(n))); + }), + (An.toPlainObject = Ou), + (An.transform = function (n, t, e) { + var u = ff(n), + i = u || af(n) || _f(n); + if (((t = ye(t, 4)), null == e)) { + var o = n && n.constructor; + e = i ? (u ? new o() : []) : du(n) && _u(o) ? eo(di(n)) : {}; + } + return ( + (i ? r : mt)(n, function (n, r, u) { + return t(e, n, r, u); + }), + e + ); + }), + (An.unary = function (n) { + return eu(n, 1); + }), + (An.union = Ro), + (An.unionBy = zo), + (An.unionWith = Wo), + (An.uniq = function (n) { + return n && n.length ? br(n) : []; + }), + (An.uniqBy = function (n, t) { + return n && n.length ? br(n, ye(t, 2)) : []; + }), + (An.uniqWith = function (n, t) { + return (t = typeof t == 'function' ? t : T), n && n.length ? br(n, T, t) : []; + }), + (An.unset = function (n, t) { + return null == n || xr(n, t); + }), + (An.unzip = He), + (An.unzipWith = Je), + (An.update = function (n, t, r) { + return null == n ? n : lr(n, t, kr(r)(kt(n, t)), void 0); + }), + (An.updateWith = function (n, t, r, e) { + return ( + (e = typeof e == 'function' ? e : T), null != n && (n = lr(n, t, kr(r)(kt(n, t)), e)), n + ); + }), + (An.values = Uu), + (An.valuesIn = function (n) { + return null == n ? [] : S(n, Bu(n)); + }), + (An.without = Bo), + (An.words = Mu), + (An.wrap = function (n, t) { + return nf(kr(t), n); + }), + (An.xor = Lo), + (An.xorBy = Uo), + (An.xorWith = Co), + (An.zip = Do), + (An.zipObject = function (n, t) { + return Ar(n || [], t || [], ot); + }), + (An.zipObjectDeep = function (n, t) { + return Ar(n || [], t || [], lr); + }), + (An.zipWith = Mo), + (An.entries = zf), + (An.entriesIn = Wf), + (An.extend = yf), + (An.extendWith = bf), + Nu(An, An), + (An.add = Qf), + (An.attempt = Ff), + (An.camelCase = Bf), + (An.capitalize = Cu), + (An.ceil = Xf), + (An.clamp = function (n, t, r) { + return ( + r === T && ((r = t), (t = T)), + r !== T && ((r = Su(r)), (r = r === r ? r : 0)), + t !== T && ((t = Su(t)), (t = t === t ? t : 0)), + pt(Su(n), t, r) + ); + }), + (An.clone = function (n) { + return _t(n, 4); + }), + (An.cloneDeep = function (n) { + return _t(n, 5); + }), + (An.cloneDeepWith = function (n, t) { + return (t = typeof t == 'function' ? t : T), _t(n, 5, t); + }), + (An.cloneWith = function (n, t) { + return (t = typeof t == 'function' ? t : T), _t(n, 4, t); + }), + (An.conformsTo = function (n, t) { + return null == t || gt(n, t, Wu(t)); + }), + (An.deburr = Du), + (An.defaultTo = function (n, t) { + return null == n || n !== n ? t : n; + }), + (An.divide = nc), + (An.endsWith = function (n, t, r) { + (n = Iu(n)), (t = yr(t)); + var e = n.length, + e = (r = r === T ? e : pt(Eu(r), 0, e)); + return (r -= t.length), 0 <= r && n.slice(r, e) == t; + }), + (An.eq = lu), + (An.escape = function (n) { + return (n = Iu(n)) && H.test(n) ? n.replace(K, nt) : n; + }), + (An.escapeRegExp = function (n) { + return (n = Iu(n)) && en.test(n) ? n.replace(rn, '\\$&') : n; + }), + (An.every = function (n, t, r) { + var e = ff(n) ? u : bt; + return r && Oe(n, t, r) && (t = T), e(n, ye(t, 3)); + }), + (An.find = Fo), + (An.findIndex = Ne), + (An.findKey = function (n, t) { + return p(n, ye(t, 3), mt); + }), + (An.findLast = No), + (An.findLastIndex = Pe), + (An.findLastKey = function (n, t) { + return p(n, ye(t, 3), At); + }), + (An.floor = tc), + (An.forEach = nu), + (An.forEachRight = tu), + (An.forIn = function (n, t) { + return null == n ? n : oo(n, ye(t, 3), Bu); + }), + (An.forInRight = function (n, t) { + return null == n ? n : fo(n, ye(t, 3), Bu); + }), + (An.forOwn = function (n, t) { + return n && mt(n, ye(t, 3)); + }), + (An.forOwnRight = function (n, t) { + return n && At(n, ye(t, 3)); + }), + (An.get = Ru), + (An.gt = ef), + (An.gte = uf), + (An.has = function (n, t) { + return null != n && we(n, t, Rt); + }), + (An.hasIn = zu), + (An.head = qe), + (An.identity = $u), + (An.includes = function (n, t, r, e) { + return ( + (n = su(n) ? n : Uu(n)), + (r = r && !e ? Eu(r) : 0), + (e = n.length), + 0 > r && (r = Ui(e + r, 0)), + ju(n) ? r <= e && -1 < n.indexOf(t, r) : !!e && -1 < v(n, t, r) + ); + }), + (An.indexOf = function (n, t, r) { + var e = null == n ? 0 : n.length; + return e ? ((r = null == r ? 0 : Eu(r)), 0 > r && (r = Ui(e + r, 0)), v(n, t, r)) : -1; + }), + (An.inRange = function (n, t, r) { + return ( + (t = Au(t)), + r === T ? ((r = t), (t = 0)) : (r = Au(r)), + (n = Su(n)), + n >= Ci(t, r) && n < Ui(t, r) + ); + }), + (An.invoke = kf), + (An.isArguments = of), + (An.isArray = ff), + (An.isArrayBuffer = cf), + (An.isArrayLike = su), + (An.isArrayLikeObject = hu), + (An.isBoolean = function (n) { + return true === n || false === n || (yu(n) && '[object Boolean]' == Ot(n)); + }), + (An.isBuffer = af), + (An.isDate = lf), + (An.isElement = function (n) { + return yu(n) && 1 === n.nodeType && !xu(n); + }), + (An.isEmpty = function (n) { + if (null == n) return true; + if ( + su(n) && + (ff(n) || + typeof n == 'string' || + typeof n.splice == 'function' || + af(n) || + _f(n) || + of(n)) + ) + return !n.length; + var t = vo(n); + if ('[object Map]' == t || '[object Set]' == t) return !n.size; + if (ze(n)) return !Vt(n).length; + for (var r in n) if (oi.call(n, r)) return false; + return true; + }), + (An.isEqual = function (n, t) { + return Mt(n, t); + }), + (An.isEqualWith = function (n, t, r) { + var e = (r = typeof r == 'function' ? r : T) ? r(n, t) : T; + return e === T ? Mt(n, t, T, r) : !!e; + }), + (An.isError = pu), + (An.isFinite = function (n) { + return typeof n == 'number' && Wi(n); + }), + (An.isFunction = _u), + (An.isInteger = vu), + (An.isLength = gu), + (An.isMap = sf), + (An.isMatch = function (n, t) { + return n === t || $t(n, t, xe(t)); + }), + (An.isMatchWith = function (n, t, r) { + return (r = typeof r == 'function' ? r : T), $t(n, t, xe(t), r); + }), + (An.isNaN = function (n) { + return bu(n) && n != +n; + }), + (An.isNative = function (n) { + if (go(n)) throw new Hu('Unsupported core-js use. Try https://npms.io/search?q=ponyfill.'); + return Ft(n); + }), + (An.isNil = function (n) { + return null == n; + }), + (An.isNull = function (n) { + return null === n; + }), + (An.isNumber = bu), + (An.isObject = du), + (An.isObjectLike = yu), + (An.isPlainObject = xu), + (An.isRegExp = hf), + (An.isSafeInteger = function (n) { + return vu(n) && -9007199254740991 <= n && 9007199254740991 >= n; + }), + (An.isSet = pf), + (An.isString = ju), + (An.isSymbol = wu), + (An.isTypedArray = _f), + (An.isUndefined = function (n) { + return n === T; + }), + (An.isWeakMap = function (n) { + return yu(n) && '[object WeakMap]' == vo(n); + }), + (An.isWeakSet = function (n) { + return yu(n) && '[object WeakSet]' == Ot(n); + }), + (An.join = function (n, t) { + return null == n ? '' : Bi.call(n, t); + }), + (An.kebabCase = Lf), + (An.last = Ve), + (An.lastIndexOf = function (n, t, r) { + var e = null == n ? 0 : n.length; + if (!e) return -1; + var u = e; + if ((r !== T && ((u = Eu(r)), (u = 0 > u ? Ui(e + u, 0) : Ci(u, e - 1))), t === t)) { + for (r = u + 1; r-- && n[r] !== t; ); + n = r; + } else n = _(n, d, u, true); + return n; + }), + (An.lowerCase = Uf), + (An.lowerFirst = Cf), + (An.lt = vf), + (An.lte = gf), + (An.max = function (n) { + return n && n.length ? xt(n, $u, It) : T; + }), + (An.maxBy = function (n, t) { + return n && n.length ? xt(n, ye(t, 2), It) : T; + }), + (An.mean = function (n) { + return y(n, $u); + }), + (An.meanBy = function (n, t) { + return y(n, ye(t, 2)); + }), + (An.min = function (n) { + return n && n.length ? xt(n, $u, Kt) : T; + }), + (An.minBy = function (n, t) { + return n && n.length ? xt(n, ye(t, 2), Kt) : T; + }), + (An.stubArray = qu), + (An.stubFalse = Vu), + (An.stubObject = function () { + return {}; + }), + (An.stubString = function () { + return ''; + }), + (An.stubTrue = function () { + return true; + }), + (An.multiply = rc), + (An.nth = function (n, t) { + return n && n.length ? Qt(n, Eu(t)) : T; + }), + (An.noConflict = function () { + return $n._ === this && ($n._ = si), this; + }), + (An.noop = Pu), + (An.now = Go), + (An.pad = function (n, t, r) { + n = Iu(n); + var e = (t = Eu(t)) ? D(n) : 0; + return !t || e >= t ? n : ((t = (t - e) / 2), ne(Ii(t), r) + n + ne(Oi(t), r)); + }), + (An.padEnd = function (n, t, r) { + n = Iu(n); + var e = (t = Eu(t)) ? D(n) : 0; + return t && e < t ? n + ne(t - e, r) : n; + }), + (An.padStart = function (n, t, r) { + n = Iu(n); + var e = (t = Eu(t)) ? D(n) : 0; + return t && e < t ? ne(t - e, r) + n : n; + }), + (An.parseInt = function (n, t, r) { + return r || null == t ? (t = 0) : t && (t = +t), Mi(Iu(n).replace(on, ''), t || 0); + }), + (An.random = function (n, t, r) { + if ( + (r && typeof r != 'boolean' && Oe(n, t, r) && (t = r = T), + r === T && + (typeof t == 'boolean' + ? ((r = t), (t = T)) + : typeof n == 'boolean' && ((r = n), (n = T))), + n === T && t === T + ? ((n = 0), (t = 1)) + : ((n = Au(n)), t === T ? ((t = n), (n = 0)) : (t = Au(t))), + n > t) + ) { + var e = n; + (n = t), (t = e); + } + return r || n % 1 || t % 1 + ? ((r = Ti()), Ci(n + r * (t - n + Cn('1e-' + ((r + '').length - 1))), t)) + : ir(n, t); + }), + (An.reduce = function (n, t, r) { + var e = ff(n) ? l : j, + u = 3 > arguments.length; + return e(n, ye(t, 4), r, u, uo); + }), + (An.reduceRight = function (n, t, r) { + var e = ff(n) ? s : j, + u = 3 > arguments.length; + return e(n, ye(t, 4), r, u, io); + }), + (An.repeat = function (n, t, r) { + return (t = (r ? Oe(n, t, r) : t === T) ? 1 : Eu(t)), or(Iu(n), t); + }), + (An.replace = function () { + var n = arguments, + t = Iu(n[0]); + return 3 > n.length ? t : t.replace(n[1], n[2]); + }), + (An.result = function (n, t, r) { + t = Sr(t, n); + var e = -1, + u = t.length; + for (u || ((u = 1), (n = T)); ++e < u; ) { + var i = null == n ? T : n[Me(t[e])]; + i === T && ((e = u), (i = r)), (n = _u(i) ? i.call(n) : i); + } + return n; + }), + (An.round = ec), + (An.runInContext = x), + (An.sample = function (n) { + return (ff(n) ? Qn : cr)(n); + }), + (An.size = function (n) { + if (null == n) return 0; + if (su(n)) return ju(n) ? D(n) : n.length; + var t = vo(n); + return '[object Map]' == t || '[object Set]' == t ? n.size : Vt(n).length; + }), + (An.snakeCase = Df), + (An.some = function (n, t, r) { + var e = ff(n) ? h : pr; + return r && Oe(n, t, r) && (t = T), e(n, ye(t, 3)); + }), + (An.sortedIndex = function (n, t) { + return _r(n, t); + }), + (An.sortedIndexBy = function (n, t, r) { + return vr(n, t, ye(r, 2)); + }), + (An.sortedIndexOf = function (n, t) { + var r = null == n ? 0 : n.length; + if (r) { + var e = _r(n, t); + if (e < r && lu(n[e], t)) return e; + } + return -1; + }), + (An.sortedLastIndex = function (n, t) { + return _r(n, t, true); + }), + (An.sortedLastIndexBy = function (n, t, r) { + return vr(n, t, ye(r, 2), true); + }), + (An.sortedLastIndexOf = function (n, t) { + if (null == n ? 0 : n.length) { + var r = _r(n, t, true) - 1; + if (lu(n[r], t)) return r; + } + return -1; + }), + (An.startCase = Mf), + (An.startsWith = function (n, t, r) { + return ( + (n = Iu(n)), + (r = null == r ? 0 : pt(Eu(r), 0, n.length)), + (t = yr(t)), + n.slice(r, r + t.length) == t + ); + }), + (An.subtract = uc), + (An.sum = function (n) { + return n && n.length ? m(n, $u) : 0; + }), + (An.sumBy = function (n, t) { + return n && n.length ? m(n, ye(t, 2)) : 0; + }), + (An.template = function (n, t, r) { + var e = An.templateSettings; + r && Oe(n, t, r) && (t = T), + (n = Iu(n)), + (t = bf({}, t, e, ce)), + (r = bf({}, t.imports, e.imports, ce)); + var u, + i, + o = Wu(r), + f = S(r, o), + c = 0; + r = t.interpolate || jn; + var a = "__p+='"; + r = Xu( + (t.escape || jn).source + + '|' + + r.source + + '|' + + (r === Q ? pn : jn).source + + '|' + + (t.evaluate || jn).source + + '|$', + 'g', + ); + var l = oi.call(t, 'sourceURL') + ? '//# sourceURL=' + (t.sourceURL + '').replace(/[\r\n]/g, ' ') + '\n' + : ''; + if ( + (n.replace(r, function (t, r, e, o, f, l) { + return ( + e || (e = o), + (a += n.slice(c, l).replace(wn, z)), + r && ((u = true), (a += "'+__e(" + r + ")+'")), + f && ((i = true), (a += "';" + f + ";\n__p+='")), + e && (a += "'+((__t=(" + e + "))==null?'':__t)+'"), + (c = l + t.length), + t + ); + }), + (a += "';"), + (t = oi.call(t, 'variable') && t.variable) || (a = 'with(obj){' + a + '}'), + (a = (i ? a.replace(P, '') : a).replace(Z, '$1').replace(q, '$1;')), + (a = + 'function(' + + (t || 'obj') + + '){' + + (t ? '' : 'obj||(obj={});') + + "var __t,__p=''" + + (u ? ',__e=_.escape' : '') + + (i ? ",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}" : ';') + + a + + 'return __p}'), + (t = Ff(function () { + return Ju(o, l + 'return ' + a).apply(T, f); + })), + (t.source = a), + pu(t)) + ) + throw t; + return t; + }), + (An.times = function (n, t) { + if (((n = Eu(n)), 1 > n || 9007199254740991 < n)) return []; + var r = 4294967295, + e = Ci(n, 4294967295); + for (t = ye(t), n -= 4294967295, e = A(e, t); ++r < n; ) t(r); + return e; + }), + (An.toFinite = Au), + (An.toInteger = Eu), + (An.toLength = ku), + (An.toLower = function (n) { + return Iu(n).toLowerCase(); + }), + (An.toNumber = Su), + (An.toSafeInteger = function (n) { + return n ? pt(Eu(n), -9007199254740991, 9007199254740991) : 0 === n ? n : 0; + }), + (An.toString = Iu), + (An.toUpper = function (n) { + return Iu(n).toUpperCase(); + }), + (An.trim = function (n, t, r) { + return (n = Iu(n)) && (r || t === T) + ? n.replace(un, '') + : n && (t = yr(t)) + ? ((n = M(n)), (r = M(t)), (t = I(n, r)), (r = R(n, r) + 1), Or(n, t, r).join('')) + : n; + }), + (An.trimEnd = function (n, t, r) { + return (n = Iu(n)) && (r || t === T) + ? n.replace(fn, '') + : n && (t = yr(t)) + ? ((n = M(n)), (t = R(n, M(t)) + 1), Or(n, 0, t).join('')) + : n; + }), + (An.trimStart = function (n, t, r) { + return (n = Iu(n)) && (r || t === T) + ? n.replace(on, '') + : n && (t = yr(t)) + ? ((n = M(n)), (t = I(n, M(t))), Or(n, t).join('')) + : n; + }), + (An.truncate = function (n, t) { + var r = 30, + e = '...'; + if (du(t)) + var u = 'separator' in t ? t.separator : u, + r = 'length' in t ? Eu(t.length) : r, + e = 'omission' in t ? yr(t.omission) : e; + n = Iu(n); + var i = n.length; + if (Rn.test(n)) + var o = M(n), + i = o.length; + if (r >= i) return n; + if (((i = r - D(e)), 1 > i)) return e; + if (((r = o ? Or(o, 0, i).join('') : n.slice(0, i)), u === T)) return r + e; + if ((o && (i += r.length - i), hf(u))) { + if (n.slice(i).search(u)) { + var f = r; + for ( + u.global || (u = Xu(u.source, Iu(_n.exec(u)) + 'g')), u.lastIndex = 0; + (o = u.exec(f)); + + ) + var c = o.index; + r = r.slice(0, c === T ? i : c); + } + } else n.indexOf(yr(u), i) != i && ((u = r.lastIndexOf(u)), -1 < u && (r = r.slice(0, u))); + return r + e; + }), + (An.unescape = function (n) { + return (n = Iu(n)) && G.test(n) ? n.replace(V, tt) : n; + }), + (An.uniqueId = function (n) { + var t = ++fi; + return Iu(n) + t; + }), + (An.upperCase = Tf), + (An.upperFirst = $f), + (An.each = nu), + (An.eachRight = tu), + (An.first = qe), + Nu( + An, + (function () { + var n = {}; + return ( + mt(An, function (t, r) { + oi.call(An.prototype, r) || (n[r] = t); + }), + n + ); + })(), + { chain: false }, + ), + (An.VERSION = '4.17.15'), + r('bind bindKey curry curryRight partial partialRight'.split(' '), function (n) { + An[n].placeholder = An; + }), + r(['drop', 'take'], function (n, t) { + (Un.prototype[n] = function (r) { + r = r === T ? 1 : Ui(Eu(r), 0); + var e = this.__filtered__ && !t ? new Un(this) : this.clone(); + return ( + e.__filtered__ + ? (e.__takeCount__ = Ci(r, e.__takeCount__)) + : e.__views__.push({ + size: Ci(r, 4294967295), + type: n + (0 > e.__dir__ ? 'Right' : ''), + }), + e + ); + }), + (Un.prototype[n + 'Right'] = function (t) { + return this.reverse()[n](t).reverse(); + }); + }), + r(['filter', 'map', 'takeWhile'], function (n, t) { + var r = t + 1, + e = 1 == r || 3 == r; + Un.prototype[n] = function (n) { + var t = this.clone(); + return ( + t.__iteratees__.push({ iteratee: ye(n, 3), type: r }), + (t.__filtered__ = t.__filtered__ || e), + t + ); + }; + }), + r(['head', 'last'], function (n, t) { + var r = 'take' + (t ? 'Right' : ''); + Un.prototype[n] = function () { + return this[r](1).value()[0]; + }; + }), + r(['initial', 'tail'], function (n, t) { + var r = 'drop' + (t ? '' : 'Right'); + Un.prototype[n] = function () { + return this.__filtered__ ? new Un(this) : this[r](1); + }; + }), + (Un.prototype.compact = function () { + return this.filter($u); + }), + (Un.prototype.find = function (n) { + return this.filter(n).head(); + }), + (Un.prototype.findLast = function (n) { + return this.reverse().find(n); + }), + (Un.prototype.invokeMap = fr(function (n, t) { + return typeof n == 'function' + ? new Un(this) + : this.map(function (r) { + return Lt(r, n, t); + }); + })), + (Un.prototype.reject = function (n) { + return this.filter(au(ye(n))); + }), + (Un.prototype.slice = function (n, t) { + n = Eu(n); + var r = this; + return r.__filtered__ && (0 < n || 0 > t) + ? new Un(r) + : (0 > n ? (r = r.takeRight(-n)) : n && (r = r.drop(n)), + t !== T && ((t = Eu(t)), (r = 0 > t ? r.dropRight(-t) : r.take(t - n))), + r); + }), + (Un.prototype.takeRightWhile = function (n) { + return this.reverse().takeWhile(n).reverse(); + }), + (Un.prototype.toArray = function () { + return this.take(4294967295); + }), + mt(Un.prototype, function (n, t) { + var r = /^(?:filter|find|map|reject)|While$/.test(t), + e = /^(?:head|last)$/.test(t), + u = An[e ? 'take' + ('last' == t ? 'Right' : '') : t], + i = e || /^find/.test(t); + u && + (An.prototype[t] = function () { + function t(n) { + return (n = u.apply(An, a([n], f))), e && h ? n[0] : n; + } + var o = this.__wrapped__, + f = e ? [1] : arguments, + c = o instanceof Un, + l = f[0], + s = c || ff(o); + s && r && typeof l == 'function' && 1 != l.length && (c = s = false); + var h = this.__chain__, + p = !!this.__actions__.length, + l = i && !h, + c = c && !p; + return !i && s + ? ((o = c ? o : new Un(this)), + (o = n.apply(o, f)), + o.__actions__.push({ func: Qe, args: [t], thisArg: T }), + new On(o, h)) + : l && c + ? n.apply(this, f) + : ((o = this.thru(t)), l ? (e ? o.value()[0] : o.value()) : o); + }); + }), + r('pop push shift sort splice unshift'.split(' '), function (n) { + var t = ri[n], + r = /^(?:push|sort|unshift)$/.test(n) ? 'tap' : 'thru', + e = /^(?:pop|shift)$/.test(n); + An.prototype[n] = function () { + var n = arguments; + if (e && !this.__chain__) { + var u = this.value(); + return t.apply(ff(u) ? u : [], n); + } + return this[r](function (r) { + return t.apply(ff(r) ? r : [], n); + }); + }; + }), + mt(Un.prototype, function (n, t) { + var r = An[t]; + if (r) { + var e = r.name + ''; + oi.call(Gi, e) || (Gi[e] = []), Gi[e].push({ name: t, func: r }); + } + }), + (Gi[Jr(T, 2).name] = [{ name: 'wrapper', func: T }]), + (Un.prototype.clone = function () { + var n = new Un(this.__wrapped__); + return ( + (n.__actions__ = Ur(this.__actions__)), + (n.__dir__ = this.__dir__), + (n.__filtered__ = this.__filtered__), + (n.__iteratees__ = Ur(this.__iteratees__)), + (n.__takeCount__ = this.__takeCount__), + (n.__views__ = Ur(this.__views__)), + n + ); + }), + (Un.prototype.reverse = function () { + if (this.__filtered__) { + var n = new Un(this); + (n.__dir__ = -1), (n.__filtered__ = true); + } else (n = this.clone()), (n.__dir__ *= -1); + return n; + }), + (Un.prototype.value = function () { + var n, + t = this.__wrapped__.value(), + r = this.__dir__, + e = ff(t), + u = 0 > r, + i = e ? t.length : 0; + n = i; + for (var o = this.__views__, f = 0, c = -1, a = o.length; ++c < a; ) { + var l = o[c], + s = l.size; + switch (l.type) { + case 'drop': + f += s; + break; + case 'dropRight': + n -= s; + break; + case 'take': + n = Ci(n, f + s); + break; + case 'takeRight': + f = Ui(f, n - s); + } + } + if ( + ((n = { start: f, end: n }), + (o = n.start), + (f = n.end), + (n = f - o), + (o = u ? f : o - 1), + (f = this.__iteratees__), + (c = f.length), + (a = 0), + (l = Ci(n, this.__takeCount__)), + !e || (!u && i == n && l == n)) + ) + return wr(t, this.__actions__); + e = []; + n: for (; n-- && a < l; ) { + for (o += r, u = -1, i = t[o]; ++u < c; ) { + var h = f[u], + s = h.type, + h = (0, h.iteratee)(i); + if (2 == s) i = h; + else if (!h) { + if (1 == s) continue n; + break n; + } + } + e[a++] = i; + } + return e; + }), + (An.prototype.at = To), + (An.prototype.chain = function () { + return Ye(this); + }), + (An.prototype.commit = function () { + return new On(this.value(), this.__chain__); + }), + (An.prototype.next = function () { + this.__values__ === T && (this.__values__ = mu(this.value())); + var n = this.__index__ >= this.__values__.length; + return { done: n, value: n ? T : this.__values__[this.__index__++] }; + }), + (An.prototype.plant = function (n) { + for (var t, r = this; r instanceof En; ) { + var e = Fe(r); + (e.__index__ = 0), (e.__values__ = T), t ? (u.__wrapped__ = e) : (t = e); + var u = e, + r = r.__wrapped__; + } + return (u.__wrapped__ = n), t; + }), + (An.prototype.reverse = function () { + var n = this.__wrapped__; + return n instanceof Un + ? (this.__actions__.length && (n = new Un(this)), + (n = n.reverse()), + n.__actions__.push({ func: Qe, args: [Ge], thisArg: T }), + new On(n, this.__chain__)) + : this.thru(Ge); + }), + (An.prototype.toJSON = + An.prototype.valueOf = + An.prototype.value = + function () { + return wr(this.__wrapped__, this.__actions__); + }), + (An.prototype.first = An.prototype.head), + wi && (An.prototype[wi] = Xe), + An + ); + })(); + true + ? (($n._ = rt), + !((__WEBPACK_AMD_DEFINE_RESULT__ = function () { + return rt; + }.call(exports, __webpack_require__, exports, module)), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && + (module.exports = __WEBPACK_AMD_DEFINE_RESULT__))) + : Nn + ? (((Nn.exports = rt)._ = rt), (Fn._ = rt)) + : ($n._ = rt); + }).call(this); + /* WEBPACK VAR INJECTION */ + }).call(exports, __webpack_require__(238)(module)); + + /***/ + }, + /* 644 */ + /***/ function (module, exports, __webpack_require__) { + var mapping = __webpack_require__(645), + fallbackHolder = __webpack_require__(646); + + /** Built-in value reference. */ + var push = Array.prototype.push; + + /** + * Creates a function, with an arity of `n`, that invokes `func` with the + * arguments it receives. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} n The arity of the new function. + * @returns {Function} Returns the new function. + */ + function baseArity(func, n) { + return n == 2 + ? function (a, b) { + return func.apply(undefined, arguments); + } + : function (a) { + return func.apply(undefined, arguments); + }; + } + + /** + * Creates a function that invokes `func`, with up to `n` arguments, ignoring + * any additional arguments. + * + * @private + * @param {Function} func The function to cap arguments for. + * @param {number} n The arity cap. + * @returns {Function} Returns the new function. + */ + function baseAry(func, n) { + return n == 2 + ? function (a, b) { + return func(a, b); + } + : function (a) { + return func(a); + }; + } + + /** + * Creates a clone of `array`. + * + * @private + * @param {Array} array The array to clone. + * @returns {Array} Returns the cloned array. + */ + function cloneArray(array) { + var length = array ? array.length : 0, + result = Array(length); + + while (length--) { + result[length] = array[length]; + } + return result; + } + + /** + * Creates a function that clones a given object using the assignment `func`. + * + * @private + * @param {Function} func The assignment function. + * @returns {Function} Returns the new cloner function. + */ + function createCloner(func) { + return function (object) { + return func({}, object); + }; + } + + /** + * A specialized version of `_.spread` which flattens the spread array into + * the arguments of the invoked `func`. + * + * @private + * @param {Function} func The function to spread arguments over. + * @param {number} start The start position of the spread. + * @returns {Function} Returns the new function. + */ + function flatSpread(func, start) { + return function () { + var length = arguments.length, + lastIndex = length - 1, + args = Array(length); + + while (length--) { + args[length] = arguments[length]; + } + var array = args[start], + otherArgs = args.slice(0, start); + + if (array) { + push.apply(otherArgs, array); + } + if (start != lastIndex) { + push.apply(otherArgs, args.slice(start + 1)); + } + return func.apply(this, otherArgs); + }; + } + + /** + * Creates a function that wraps `func` and uses `cloner` to clone the first + * argument it receives. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} cloner The function to clone arguments. + * @returns {Function} Returns the new immutable function. + */ + function wrapImmutable(func, cloner) { + return function () { + var length = arguments.length; + if (!length) { + return; + } + var args = Array(length); + while (length--) { + args[length] = arguments[length]; + } + var result = (args[0] = cloner.apply(undefined, args)); + func.apply(undefined, args); + return result; + }; + } + + /** + * The base implementation of `convert` which accepts a `util` object of methods + * required to perform conversions. + * + * @param {Object} util The util object. + * @param {string} name The name of the function to convert. + * @param {Function} func The function to convert. + * @param {Object} [options] The options object. + * @param {boolean} [options.cap=true] Specify capping iteratee arguments. + * @param {boolean} [options.curry=true] Specify currying. + * @param {boolean} [options.fixed=true] Specify fixed arity. + * @param {boolean} [options.immutable=true] Specify immutable operations. + * @param {boolean} [options.rearg=true] Specify rearranging arguments. + * @returns {Function|Object} Returns the converted function or object. + */ + function baseConvert(util, name, func, options) { + var isLib = typeof name == 'function', + isObj = name === Object(name); + + if (isObj) { + options = func; + func = name; + name = undefined; + } + if (func == null) { + throw new TypeError(); + } + options || (options = {}); + + var config = { + cap: 'cap' in options ? options.cap : true, + curry: 'curry' in options ? options.curry : true, + fixed: 'fixed' in options ? options.fixed : true, + immutable: 'immutable' in options ? options.immutable : true, + rearg: 'rearg' in options ? options.rearg : true, + }; + + var defaultHolder = isLib ? func : fallbackHolder, + forceCurry = 'curry' in options && options.curry, + forceFixed = 'fixed' in options && options.fixed, + forceRearg = 'rearg' in options && options.rearg, + pristine = isLib ? func.runInContext() : undefined; + + var helpers = isLib + ? func + : { + ary: util.ary, + assign: util.assign, + clone: util.clone, + curry: util.curry, + forEach: util.forEach, + isArray: util.isArray, + isError: util.isError, + isFunction: util.isFunction, + isWeakMap: util.isWeakMap, + iteratee: util.iteratee, + keys: util.keys, + rearg: util.rearg, + toInteger: util.toInteger, + toPath: util.toPath, + }; + + var ary = helpers.ary, + assign = helpers.assign, + clone = helpers.clone, + curry = helpers.curry, + each = helpers.forEach, + isArray = helpers.isArray, + isError = helpers.isError, + isFunction = helpers.isFunction, + isWeakMap = helpers.isWeakMap, + keys = helpers.keys, + rearg = helpers.rearg, + toInteger = helpers.toInteger, + toPath = helpers.toPath; + + var aryMethodKeys = keys(mapping.aryMethod); + + var wrappers = { + castArray: function (castArray) { + return function () { + var value = arguments[0]; + return isArray(value) ? castArray(cloneArray(value)) : castArray.apply(undefined, arguments); + }; + }, + iteratee: function (iteratee) { + return function () { + var func = arguments[0], + arity = arguments[1], + result = iteratee(func, arity), + length = result.length; + + if (config.cap && typeof arity == 'number') { + arity = arity > 2 ? arity - 2 : 1; + return length && length <= arity ? result : baseAry(result, arity); + } + return result; + }; + }, + mixin: function (mixin) { + return function (source) { + var func = this; + if (!isFunction(func)) { + return mixin(func, Object(source)); + } + var pairs = []; + each(keys(source), function (key) { + if (isFunction(source[key])) { + pairs.push([key, func.prototype[key]]); + } + }); + + mixin(func, Object(source)); + + each(pairs, function (pair) { + var value = pair[1]; + if (isFunction(value)) { + func.prototype[pair[0]] = value; + } else { + delete func.prototype[pair[0]]; + } + }); + return func; + }; + }, + nthArg: function (nthArg) { + return function (n) { + var arity = n < 0 ? 1 : toInteger(n) + 1; + return curry(nthArg(n), arity); + }; + }, + rearg: function (rearg) { + return function (func, indexes) { + var arity = indexes ? indexes.length : 0; + return curry(rearg(func, indexes), arity); + }; + }, + runInContext: function (runInContext) { + return function (context) { + return baseConvert(util, runInContext(context), options); + }; + }, + }; + + /*--------------------------------------------------------------------------*/ + + /** + * Casts `func` to a function with an arity capped iteratee if needed. + * + * @private + * @param {string} name The name of the function to inspect. + * @param {Function} func The function to inspect. + * @returns {Function} Returns the cast function. + */ + function castCap(name, func) { + if (config.cap) { + var indexes = mapping.iterateeRearg[name]; + if (indexes) { + return iterateeRearg(func, indexes); + } + var n = !isLib && mapping.iterateeAry[name]; + if (n) { + return iterateeAry(func, n); + } + } + return func; + } + + /** + * Casts `func` to a curried function if needed. + * + * @private + * @param {string} name The name of the function to inspect. + * @param {Function} func The function to inspect. + * @param {number} n The arity of `func`. + * @returns {Function} Returns the cast function. + */ + function castCurry(name, func, n) { + return forceCurry || (config.curry && n > 1) ? curry(func, n) : func; + } + + /** + * Casts `func` to a fixed arity function if needed. + * + * @private + * @param {string} name The name of the function to inspect. + * @param {Function} func The function to inspect. + * @param {number} n The arity cap. + * @returns {Function} Returns the cast function. + */ + function castFixed(name, func, n) { + if (config.fixed && (forceFixed || !mapping.skipFixed[name])) { + var data = mapping.methodSpread[name], + start = data && data.start; + + return start === undefined ? ary(func, n) : flatSpread(func, start); + } + return func; + } + + /** + * Casts `func` to an rearged function if needed. + * + * @private + * @param {string} name The name of the function to inspect. + * @param {Function} func The function to inspect. + * @param {number} n The arity of `func`. + * @returns {Function} Returns the cast function. + */ + function castRearg(name, func, n) { + return config.rearg && n > 1 && (forceRearg || !mapping.skipRearg[name]) + ? rearg(func, mapping.methodRearg[name] || mapping.aryRearg[n]) + : func; + } + + /** + * Creates a clone of `object` by `path`. + * + * @private + * @param {Object} object The object to clone. + * @param {Array|string} path The path to clone by. + * @returns {Object} Returns the cloned object. + */ + function cloneByPath(object, path) { + path = toPath(path); + + var index = -1, + length = path.length, + lastIndex = length - 1, + result = clone(Object(object)), + nested = result; + + while (nested != null && ++index < length) { + var key = path[index], + value = nested[key]; + + if (value != null && !(isFunction(value) || isError(value) || isWeakMap(value))) { + nested[key] = clone(index == lastIndex ? value : Object(value)); + } + nested = nested[key]; + } + return result; + } + + /** + * Converts `lodash` to an immutable auto-curried iteratee-first data-last + * version with conversion `options` applied. + * + * @param {Object} [options] The options object. See `baseConvert` for more details. + * @returns {Function} Returns the converted `lodash`. + */ + function convertLib(options) { + return _.runInContext.convert(options)(undefined); + } + + /** + * Create a converter function for `func` of `name`. + * + * @param {string} name The name of the function to convert. + * @param {Function} func The function to convert. + * @returns {Function} Returns the new converter function. + */ + function createConverter(name, func) { + var realName = mapping.aliasToReal[name] || name, + methodName = mapping.remap[realName] || realName, + oldOptions = options; + + return function (options) { + var newUtil = isLib ? pristine : helpers, + newFunc = isLib ? pristine[methodName] : func, + newOptions = assign(assign({}, oldOptions), options); + + return baseConvert(newUtil, realName, newFunc, newOptions); + }; + } + + /** + * Creates a function that wraps `func` to invoke its iteratee, with up to `n` + * arguments, ignoring any additional arguments. + * + * @private + * @param {Function} func The function to cap iteratee arguments for. + * @param {number} n The arity cap. + * @returns {Function} Returns the new function. + */ + function iterateeAry(func, n) { + return overArg(func, function (func) { + return typeof func == 'function' ? baseAry(func, n) : func; + }); + } + + /** + * Creates a function that wraps `func` to invoke its iteratee with arguments + * arranged according to the specified `indexes` where the argument value at + * the first index is provided as the first argument, the argument value at + * the second index is provided as the second argument, and so on. + * + * @private + * @param {Function} func The function to rearrange iteratee arguments for. + * @param {number[]} indexes The arranged argument indexes. + * @returns {Function} Returns the new function. + */ + function iterateeRearg(func, indexes) { + return overArg(func, function (func) { + var n = indexes.length; + return baseArity(rearg(baseAry(func, n), indexes), n); + }); + } + + /** + * Creates a function that invokes `func` with its first argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ + function overArg(func, transform) { + return function () { + var length = arguments.length; + if (!length) { + return func(); + } + var args = Array(length); + while (length--) { + args[length] = arguments[length]; + } + var index = config.rearg ? 0 : length - 1; + args[index] = transform(args[index]); + return func.apply(undefined, args); + }; + } + + /** + * Creates a function that wraps `func` and applys the conversions + * rules by `name`. + * + * @private + * @param {string} name The name of the function to wrap. + * @param {Function} func The function to wrap. + * @returns {Function} Returns the converted function. + */ + function wrap(name, func, placeholder) { + var result, + realName = mapping.aliasToReal[name] || name, + wrapped = func, + wrapper = wrappers[realName]; + + if (wrapper) { + wrapped = wrapper(func); + } else if (config.immutable) { + if (mapping.mutate.array[realName]) { + wrapped = wrapImmutable(func, cloneArray); + } else if (mapping.mutate.object[realName]) { + wrapped = wrapImmutable(func, createCloner(func)); + } else if (mapping.mutate.set[realName]) { + wrapped = wrapImmutable(func, cloneByPath); + } + } + each(aryMethodKeys, function (aryKey) { + each(mapping.aryMethod[aryKey], function (otherName) { + if (realName == otherName) { + var data = mapping.methodSpread[realName], + afterRearg = data && data.afterRearg; + + result = afterRearg + ? castFixed(realName, castRearg(realName, wrapped, aryKey), aryKey) + : castRearg(realName, castFixed(realName, wrapped, aryKey), aryKey); + + result = castCap(realName, result); + result = castCurry(realName, result, aryKey); + return false; + } + }); + return !result; + }); + + result || (result = wrapped); + if (result == func) { + result = forceCurry + ? curry(result, 1) + : function () { + return func.apply(this, arguments); + }; + } + result.convert = createConverter(realName, func); + result.placeholder = func.placeholder = placeholder; + + return result; + } + + /*--------------------------------------------------------------------------*/ + + if (!isObj) { + return wrap(name, func, defaultHolder); + } + var _ = func; + + // Convert methods by ary cap. + var pairs = []; + each(aryMethodKeys, function (aryKey) { + each(mapping.aryMethod[aryKey], function (key) { + var func = _[mapping.remap[key] || key]; + if (func) { + pairs.push([key, wrap(key, func, _)]); + } + }); + }); + + // Convert remaining methods. + each(keys(_), function (key) { + var func = _[key]; + if (typeof func == 'function') { + var length = pairs.length; + while (length--) { + if (pairs[length][0] == key) { + return; + } + } + func.convert = createConverter(key, func); + pairs.push([key, func]); + } + }); + + // Assign to `_` leaving `_.prototype` unchanged to allow chaining. + each(pairs, function (pair) { + _[pair[0]] = pair[1]; + }); + + _.convert = convertLib; + _.placeholder = _; + + // Assign aliases. + each(keys(_), function (key) { + each(mapping.realToAlias[key] || [], function (alias) { + _[alias] = _[key]; + }); + }); + + return _; + } + + module.exports = baseConvert; + + /***/ + }, + /* 645 */ + /***/ function (module, exports) { + /** Used to map aliases to their real names. */ + exports.aliasToReal = { + // Lodash aliases. + each: 'forEach', + eachRight: 'forEachRight', + entries: 'toPairs', + entriesIn: 'toPairsIn', + extend: 'assignIn', + extendAll: 'assignInAll', + extendAllWith: 'assignInAllWith', + extendWith: 'assignInWith', + first: 'head', + + // Methods that are curried variants of others. + conforms: 'conformsTo', + matches: 'isMatch', + property: 'get', + + // Ramda aliases. + __: 'placeholder', + F: 'stubFalse', + T: 'stubTrue', + all: 'every', + allPass: 'overEvery', + always: 'constant', + any: 'some', + anyPass: 'overSome', + apply: 'spread', + assoc: 'set', + assocPath: 'set', + complement: 'negate', + compose: 'flowRight', + contains: 'includes', + dissoc: 'unset', + dissocPath: 'unset', + dropLast: 'dropRight', + dropLastWhile: 'dropRightWhile', + equals: 'isEqual', + identical: 'eq', + indexBy: 'keyBy', + init: 'initial', + invertObj: 'invert', + juxt: 'over', + omitAll: 'omit', + nAry: 'ary', + path: 'get', + pathEq: 'matchesProperty', + pathOr: 'getOr', + paths: 'at', + pickAll: 'pick', + pipe: 'flow', + pluck: 'map', + prop: 'get', + propEq: 'matchesProperty', + propOr: 'getOr', + props: 'at', + symmetricDifference: 'xor', + symmetricDifferenceBy: 'xorBy', + symmetricDifferenceWith: 'xorWith', + takeLast: 'takeRight', + takeLastWhile: 'takeRightWhile', + unapply: 'rest', + unnest: 'flatten', + useWith: 'overArgs', + where: 'conformsTo', + whereEq: 'isMatch', + zipObj: 'zipObject', + }; + + /** Used to map ary to method names. */ + exports.aryMethod = { + 1: [ + 'assignAll', + 'assignInAll', + 'attempt', + 'castArray', + 'ceil', + 'create', + 'curry', + 'curryRight', + 'defaultsAll', + 'defaultsDeepAll', + 'floor', + 'flow', + 'flowRight', + 'fromPairs', + 'invert', + 'iteratee', + 'memoize', + 'method', + 'mergeAll', + 'methodOf', + 'mixin', + 'nthArg', + 'over', + 'overEvery', + 'overSome', + 'rest', + 'reverse', + 'round', + 'runInContext', + 'spread', + 'template', + 'trim', + 'trimEnd', + 'trimStart', + 'uniqueId', + 'words', + 'zipAll', + ], + 2: [ + 'add', + 'after', + 'ary', + 'assign', + 'assignAllWith', + 'assignIn', + 'assignInAllWith', + 'at', + 'before', + 'bind', + 'bindAll', + 'bindKey', + 'chunk', + 'cloneDeepWith', + 'cloneWith', + 'concat', + 'conformsTo', + 'countBy', + 'curryN', + 'curryRightN', + 'debounce', + 'defaults', + 'defaultsDeep', + 'defaultTo', + 'delay', + 'difference', + 'divide', + 'drop', + 'dropRight', + 'dropRightWhile', + 'dropWhile', + 'endsWith', + 'eq', + 'every', + 'filter', + 'find', + 'findIndex', + 'findKey', + 'findLast', + 'findLastIndex', + 'findLastKey', + 'flatMap', + 'flatMapDeep', + 'flattenDepth', + 'forEach', + 'forEachRight', + 'forIn', + 'forInRight', + 'forOwn', + 'forOwnRight', + 'get', + 'groupBy', + 'gt', + 'gte', + 'has', + 'hasIn', + 'includes', + 'indexOf', + 'intersection', + 'invertBy', + 'invoke', + 'invokeMap', + 'isEqual', + 'isMatch', + 'join', + 'keyBy', + 'lastIndexOf', + 'lt', + 'lte', + 'map', + 'mapKeys', + 'mapValues', + 'matchesProperty', + 'maxBy', + 'meanBy', + 'merge', + 'mergeAllWith', + 'minBy', + 'multiply', + 'nth', + 'omit', + 'omitBy', + 'overArgs', + 'pad', + 'padEnd', + 'padStart', + 'parseInt', + 'partial', + 'partialRight', + 'partition', + 'pick', + 'pickBy', + 'propertyOf', + 'pull', + 'pullAll', + 'pullAt', + 'random', + 'range', + 'rangeRight', + 'rearg', + 'reject', + 'remove', + 'repeat', + 'restFrom', + 'result', + 'sampleSize', + 'some', + 'sortBy', + 'sortedIndex', + 'sortedIndexOf', + 'sortedLastIndex', + 'sortedLastIndexOf', + 'sortedUniqBy', + 'split', + 'spreadFrom', + 'startsWith', + 'subtract', + 'sumBy', + 'take', + 'takeRight', + 'takeRightWhile', + 'takeWhile', + 'tap', + 'throttle', + 'thru', + 'times', + 'trimChars', + 'trimCharsEnd', + 'trimCharsStart', + 'truncate', + 'union', + 'uniqBy', + 'uniqWith', + 'unset', + 'unzipWith', + 'without', + 'wrap', + 'xor', + 'zip', + 'zipObject', + 'zipObjectDeep', + ], + 3: [ + 'assignInWith', + 'assignWith', + 'clamp', + 'differenceBy', + 'differenceWith', + 'findFrom', + 'findIndexFrom', + 'findLastFrom', + 'findLastIndexFrom', + 'getOr', + 'includesFrom', + 'indexOfFrom', + 'inRange', + 'intersectionBy', + 'intersectionWith', + 'invokeArgs', + 'invokeArgsMap', + 'isEqualWith', + 'isMatchWith', + 'flatMapDepth', + 'lastIndexOfFrom', + 'mergeWith', + 'orderBy', + 'padChars', + 'padCharsEnd', + 'padCharsStart', + 'pullAllBy', + 'pullAllWith', + 'rangeStep', + 'rangeStepRight', + 'reduce', + 'reduceRight', + 'replace', + 'set', + 'slice', + 'sortedIndexBy', + 'sortedLastIndexBy', + 'transform', + 'unionBy', + 'unionWith', + 'update', + 'xorBy', + 'xorWith', + 'zipWith', + ], + 4: ['fill', 'setWith', 'updateWith'], + }; + + /** Used to map ary to rearg configs. */ + exports.aryRearg = { + 2: [1, 0], + 3: [2, 0, 1], + 4: [3, 2, 0, 1], + }; + + /** Used to map method names to their iteratee ary. */ + exports.iterateeAry = { + dropRightWhile: 1, + dropWhile: 1, + every: 1, + filter: 1, + find: 1, + findFrom: 1, + findIndex: 1, + findIndexFrom: 1, + findKey: 1, + findLast: 1, + findLastFrom: 1, + findLastIndex: 1, + findLastIndexFrom: 1, + findLastKey: 1, + flatMap: 1, + flatMapDeep: 1, + flatMapDepth: 1, + forEach: 1, + forEachRight: 1, + forIn: 1, + forInRight: 1, + forOwn: 1, + forOwnRight: 1, + map: 1, + mapKeys: 1, + mapValues: 1, + partition: 1, + reduce: 2, + reduceRight: 2, + reject: 1, + remove: 1, + some: 1, + takeRightWhile: 1, + takeWhile: 1, + times: 1, + transform: 2, + }; + + /** Used to map method names to iteratee rearg configs. */ + exports.iterateeRearg = { + mapKeys: [1], + reduceRight: [1, 0], + }; + + /** Used to map method names to rearg configs. */ + exports.methodRearg = { + assignInAllWith: [1, 0], + assignInWith: [1, 2, 0], + assignAllWith: [1, 0], + assignWith: [1, 2, 0], + differenceBy: [1, 2, 0], + differenceWith: [1, 2, 0], + getOr: [2, 1, 0], + intersectionBy: [1, 2, 0], + intersectionWith: [1, 2, 0], + isEqualWith: [1, 2, 0], + isMatchWith: [2, 1, 0], + mergeAllWith: [1, 0], + mergeWith: [1, 2, 0], + padChars: [2, 1, 0], + padCharsEnd: [2, 1, 0], + padCharsStart: [2, 1, 0], + pullAllBy: [2, 1, 0], + pullAllWith: [2, 1, 0], + rangeStep: [1, 2, 0], + rangeStepRight: [1, 2, 0], + setWith: [3, 1, 2, 0], + sortedIndexBy: [2, 1, 0], + sortedLastIndexBy: [2, 1, 0], + unionBy: [1, 2, 0], + unionWith: [1, 2, 0], + updateWith: [3, 1, 2, 0], + xorBy: [1, 2, 0], + xorWith: [1, 2, 0], + zipWith: [1, 2, 0], + }; + + /** Used to map method names to spread configs. */ + exports.methodSpread = { + assignAll: { start: 0 }, + assignAllWith: { start: 0 }, + assignInAll: { start: 0 }, + assignInAllWith: { start: 0 }, + defaultsAll: { start: 0 }, + defaultsDeepAll: { start: 0 }, + invokeArgs: { start: 2 }, + invokeArgsMap: { start: 2 }, + mergeAll: { start: 0 }, + mergeAllWith: { start: 0 }, + partial: { start: 1 }, + partialRight: { start: 1 }, + without: { start: 1 }, + zipAll: { start: 0 }, + }; + + /** Used to identify methods which mutate arrays or objects. */ + exports.mutate = { + array: { + fill: true, + pull: true, + pullAll: true, + pullAllBy: true, + pullAllWith: true, + pullAt: true, + remove: true, + reverse: true, + }, + object: { + assign: true, + assignAll: true, + assignAllWith: true, + assignIn: true, + assignInAll: true, + assignInAllWith: true, + assignInWith: true, + assignWith: true, + defaults: true, + defaultsAll: true, + defaultsDeep: true, + defaultsDeepAll: true, + merge: true, + mergeAll: true, + mergeAllWith: true, + mergeWith: true, + }, + set: { + set: true, + setWith: true, + unset: true, + update: true, + updateWith: true, + }, + }; + + /** Used to map real names to their aliases. */ + exports.realToAlias = (function () { + var hasOwnProperty = Object.prototype.hasOwnProperty, + object = exports.aliasToReal, + result = {}; + + for (var key in object) { + var value = object[key]; + if (hasOwnProperty.call(result, value)) { + result[value].push(key); + } else { + result[value] = [key]; + } + } + return result; + })(); + + /** Used to map method names to other names. */ + exports.remap = { + assignAll: 'assign', + assignAllWith: 'assignWith', + assignInAll: 'assignIn', + assignInAllWith: 'assignInWith', + curryN: 'curry', + curryRightN: 'curryRight', + defaultsAll: 'defaults', + defaultsDeepAll: 'defaultsDeep', + findFrom: 'find', + findIndexFrom: 'findIndex', + findLastFrom: 'findLast', + findLastIndexFrom: 'findLastIndex', + getOr: 'get', + includesFrom: 'includes', + indexOfFrom: 'indexOf', + invokeArgs: 'invoke', + invokeArgsMap: 'invokeMap', + lastIndexOfFrom: 'lastIndexOf', + mergeAll: 'merge', + mergeAllWith: 'mergeWith', + padChars: 'pad', + padCharsEnd: 'padEnd', + padCharsStart: 'padStart', + propertyOf: 'get', + rangeStep: 'range', + rangeStepRight: 'rangeRight', + restFrom: 'rest', + spreadFrom: 'spread', + trimChars: 'trim', + trimCharsEnd: 'trimEnd', + trimCharsStart: 'trimStart', + zipAll: 'zip', + }; + + /** Used to track methods that skip fixing their arity. */ + exports.skipFixed = { + castArray: true, + flow: true, + flowRight: true, + iteratee: true, + mixin: true, + rearg: true, + runInContext: true, + }; + + /** Used to track methods that skip rearranging arguments. */ + exports.skipRearg = { + add: true, + assign: true, + assignIn: true, + bind: true, + bindKey: true, + concat: true, + difference: true, + divide: true, + eq: true, + gt: true, + gte: true, + isEqual: true, + lt: true, + lte: true, + matchesProperty: true, + merge: true, + multiply: true, + overArgs: true, + partial: true, + partialRight: true, + propertyOf: true, + random: true, + range: true, + rangeRight: true, + subtract: true, + zip: true, + zipObject: true, + zipObjectDeep: true, + }; + + /***/ + }, + /* 646 */ + /***/ function (module, exports) { + /** + * The default argument placeholder value for methods. + * + * @type {Object} + */ + module.exports = {}; + + /***/ + }, + /* 647 */ + /***/ function (module, exports) { + module.exports = { + message: 'index__message__2coBI', + }; + + /***/ + }, + /******/ + ], +); diff --git a/packages/react-on-rails-pro-node-renderer/tests/fixtures/projects/spec-dummy/9fa89f7/server-bundle-web-target.js b/packages/react-on-rails-pro-node-renderer/tests/fixtures/projects/spec-dummy/9fa89f7/server-bundle-web-target.js new file mode 100644 index 0000000000..9629817bd1 --- /dev/null +++ b/packages/react-on-rails-pro-node-renderer/tests/fixtures/projects/spec-dummy/9fa89f7/server-bundle-web-target.js @@ -0,0 +1,94304 @@ +/******/ (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, { + /******/ configurable: false, + /******/ enumerable: true, + /******/ get: getter, + /******/ + }); + /******/ + } + /******/ + }; + /******/ + /******/ // 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 = '/webpack/development/'; + /******/ + /******/ // Load entry module and return exports + /******/ return __webpack_require__((__webpack_require__.s = 267)); + /******/ +})( + /************************************************************************/ + /******/ [ + /* 0 */ + /***/ function (module, exports, __webpack_require__) { + var global = __webpack_require__(3); + var core = __webpack_require__(23); + var hide = __webpack_require__(15); + var redefine = __webpack_require__(16); + var ctx = __webpack_require__(24); + var PROTOTYPE = 'prototype'; + + var $export = function (type, name, source) { + var IS_FORCED = type & $export.F; + var IS_GLOBAL = type & $export.G; + var IS_STATIC = type & $export.S; + var IS_PROTO = type & $export.P; + var IS_BIND = type & $export.B; + var target = IS_GLOBAL + ? global + : IS_STATIC + ? global[name] || (global[name] = {}) + : (global[name] || {})[PROTOTYPE]; + var exports = IS_GLOBAL ? core : core[name] || (core[name] = {}); + var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {}); + var key, own, out, exp; + if (IS_GLOBAL) source = name; + for (key in source) { + // contains in native + own = !IS_FORCED && target && target[key] !== undefined; + // export native or passed + out = (own ? target : source)[key]; + // bind timers to global for call from export context + exp = + IS_BIND && own + ? ctx(out, global) + : IS_PROTO && typeof out == 'function' + ? ctx(Function.call, out) + : out; + // extend global + if (target) redefine(target, key, out, type & $export.U); + // export + if (exports[key] != out) hide(exports, key, exp); + if (IS_PROTO && expProto[key] != out) expProto[key] = out; + } + }; + global.core = core; + // type bitmap + $export.F = 1; // forced + $export.G = 2; // global + $export.S = 4; // static + $export.P = 8; // proto + $export.B = 16; // bind + $export.W = 32; // wrap + $export.U = 64; // safe + $export.R = 128; // real proto method for `library` + module.exports = $export; + + /***/ + }, + /* 1 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + if (false) { + module.exports = require('./cjs/react.production.min.js'); + } else { + module.exports = __webpack_require__(512); + } + + /***/ + }, + /* 2 */ + /***/ function (module, exports, __webpack_require__) { + var isObject = __webpack_require__(5); + module.exports = function (it) { + if (!isObject(it)) throw TypeError(it + ' is not an object!'); + return it; + }; + + /***/ + }, + /* 3 */ + /***/ function (module, exports) { + // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 + var global = (module.exports = + typeof window != 'undefined' && window.Math == Math + ? window + : typeof self != 'undefined' && self.Math == Math + ? self + : // eslint-disable-next-line no-new-func + Function('return this')()); + if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef + + /***/ + }, + /* 4 */ + /***/ function (module, exports) { + module.exports = function (exec) { + try { + return !!exec(); + } catch (e) { + return true; + } + }; + + /***/ + }, + /* 5 */ + /***/ function (module, exports) { + module.exports = function (it) { + return typeof it === 'object' ? it !== null : typeof it === 'function'; + }; + + /***/ + }, + /* 6 */ + /***/ function (module, exports, __webpack_require__) { + var store = __webpack_require__(74)('wks'); + var uid = __webpack_require__(51); + var Symbol = __webpack_require__(3).Symbol; + var USE_SYMBOL = typeof Symbol == 'function'; + + var $exports = (module.exports = function (name) { + return ( + store[name] || + (store[name] = (USE_SYMBOL && Symbol[name]) || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)) + ); + }); + + $exports.store = store; + + /***/ + }, + /* 7 */ + /***/ function (module, exports, __webpack_require__) { + // 7.1.15 ToLength + var toInteger = __webpack_require__(26); + var min = Math.min; + module.exports = function (it) { + return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 + }; + + /***/ + }, + /* 8 */ + /***/ function (module, exports, __webpack_require__) { + // Thank's IE8 for his funny defineProperty + module.exports = !__webpack_require__(4)(function () { + return ( + Object.defineProperty({}, 'a', { + get: function () { + return 7; + }, + }).a != 7 + ); + }); + + /***/ + }, + /* 9 */ + /***/ function (module, exports, __webpack_require__) { + var anObject = __webpack_require__(2); + var IE8_DOM_DEFINE = __webpack_require__(175); + var toPrimitive = __webpack_require__(31); + var dP = Object.defineProperty; + + exports.f = __webpack_require__(8) + ? Object.defineProperty + : function defineProperty(O, P, Attributes) { + anObject(O); + P = toPrimitive(P, true); + anObject(Attributes); + if (IE8_DOM_DEFINE) + try { + return dP(O, P, Attributes); + } catch (e) { + /* empty */ + } + if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!'); + if ('value' in Attributes) O[P] = Attributes.value; + return O; + }; + + /***/ + }, + /* 10 */ + /***/ function (module, exports, __webpack_require__) { + /** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + + if (true) { + var ReactIs = __webpack_require__(109); + + // By explicitly using `prop-types` you are opting into new development behavior. + // http://fb.me/prop-types-in-prod + var throwOnDirectAccess = true; + module.exports = __webpack_require__(541)(ReactIs.isElement, throwOnDirectAccess); + } else { + // By explicitly using `prop-types` you are opting into new production behavior. + // http://fb.me/prop-types-in-prod + module.exports = require('./factoryWithThrowingShims')(); + } + + /***/ + }, + /* 11 */ + /***/ function (module, exports, __webpack_require__) { + // 7.1.13 ToObject(argument) + var defined = __webpack_require__(32); + module.exports = function (it) { + return Object(defined(it)); + }; + + /***/ + }, + /* 12 */ + /***/ function (module, exports) { + module.exports = function (it) { + if (typeof it != 'function') throw TypeError(it + ' is not a function!'); + return it; + }; + + /***/ + }, + /* 13 */ + /***/ function (module, exports) { + var core = (module.exports = { version: '2.6.11' }); + if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef + + /***/ + }, + /* 14 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + + /** + * Use invariant() to assert state which your program assumes to be true. + * + * Provide sprintf-style format (only %s is supported) and arguments + * to provide information about what broke and what you were + * expecting. + * + * The invariant message will be stripped in production, but the invariant + * will remain to ensure logic does not differ in production. + */ + + var invariant = function (condition, format, a, b, c, d, e, f) { + if (true) { + if (format === undefined) { + throw new Error('invariant requires an error message argument'); + } + } + + if (!condition) { + var error; + if (format === undefined) { + error = new Error( + 'Minified exception occurred; use the non-minified dev environment ' + + 'for the full error message and additional helpful warnings.', + ); + } else { + var args = [a, b, c, d, e, f]; + var argIndex = 0; + error = new Error( + format.replace(/%s/g, function () { + return args[argIndex++]; + }), + ); + error.name = 'Invariant Violation'; + } + + error.framesToPop = 1; // we don't care about invariant's own frame + throw error; + } + }; + + module.exports = invariant; + + /***/ + }, + /* 15 */ + /***/ function (module, exports, __webpack_require__) { + var dP = __webpack_require__(9); + var createDesc = __webpack_require__(50); + module.exports = __webpack_require__(8) + ? function (object, key, value) { + return dP.f(object, key, createDesc(1, value)); + } + : function (object, key, value) { + object[key] = value; + return object; + }; + + /***/ + }, + /* 16 */ + /***/ function (module, exports, __webpack_require__) { + var global = __webpack_require__(3); + var hide = __webpack_require__(15); + var has = __webpack_require__(18); + var SRC = __webpack_require__(51)('src'); + var $toString = __webpack_require__(272); + var TO_STRING = 'toString'; + var TPL = ('' + $toString).split(TO_STRING); + + __webpack_require__(23).inspectSource = function (it) { + return $toString.call(it); + }; + + (module.exports = function (O, key, val, safe) { + var isFunction = typeof val == 'function'; + if (isFunction) has(val, 'name') || hide(val, 'name', key); + if (O[key] === val) return; + if (isFunction) has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key))); + if (O === global) { + O[key] = val; + } else if (!safe) { + delete O[key]; + hide(O, key, val); + } else if (O[key]) { + O[key] = val; + } else { + hide(O, key, val); + } + // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative + })(Function.prototype, TO_STRING, function toString() { + return (typeof this == 'function' && this[SRC]) || $toString.call(this); + }); + + /***/ + }, + /* 17 */ + /***/ function (module, exports, __webpack_require__) { + var $export = __webpack_require__(0); + var fails = __webpack_require__(4); + var defined = __webpack_require__(32); + var quot = /"/g; + // B.2.3.2.1 CreateHTML(string, tag, attribute, value) + var createHTML = function (string, tag, attribute, value) { + var S = String(defined(string)); + var p1 = '<' + tag; + if (attribute !== '') p1 += ' ' + attribute + '="' + String(value).replace(quot, '"') + '"'; + return p1 + '>' + S + '</' + tag + '>'; + }; + module.exports = function (NAME, exec) { + var O = {}; + O[NAME] = exec(createHTML); + $export( + $export.P + + $export.F * + fails(function () { + var test = ''[NAME]('"'); + return test !== test.toLowerCase() || test.split('"').length > 3; + }), + 'String', + O, + ); + }; + + /***/ + }, + /* 18 */ + /***/ function (module, exports) { + var hasOwnProperty = {}.hasOwnProperty; + module.exports = function (it, key) { + return hasOwnProperty.call(it, key); + }; + + /***/ + }, + /* 19 */ + /***/ function (module, exports, __webpack_require__) { + // to indexed object, toObject with fallback for non-array-like ES3 strings + var IObject = __webpack_require__(75); + var defined = __webpack_require__(32); + module.exports = function (it) { + return IObject(defined(it)); + }; + + /***/ + }, + /* 20 */ + /***/ function (module, exports, __webpack_require__) { + var pIE = __webpack_require__(76); + var createDesc = __webpack_require__(50); + var toIObject = __webpack_require__(19); + var toPrimitive = __webpack_require__(31); + var has = __webpack_require__(18); + var IE8_DOM_DEFINE = __webpack_require__(175); + var gOPD = Object.getOwnPropertyDescriptor; + + exports.f = __webpack_require__(8) + ? gOPD + : function getOwnPropertyDescriptor(O, P) { + O = toIObject(O); + P = toPrimitive(P, true); + if (IE8_DOM_DEFINE) + try { + return gOPD(O, P); + } catch (e) { + /* empty */ + } + if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]); + }; + + /***/ + }, + /* 21 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) + var has = __webpack_require__(18); + var toObject = __webpack_require__(11); + var IE_PROTO = __webpack_require__(115)('IE_PROTO'); + var ObjectProto = Object.prototype; + + module.exports = + Object.getPrototypeOf || + function (O) { + O = toObject(O); + if (has(O, IE_PROTO)) return O[IE_PROTO]; + if (typeof O.constructor == 'function' && O instanceof O.constructor) { + return O.constructor.prototype; + } + return O instanceof Object ? ObjectProto : null; + }; + + /***/ + }, + /* 22 */ + /***/ function (module, exports, __webpack_require__) { + var store = __webpack_require__(150)('wks'); + var uid = __webpack_require__(104); + var Symbol = __webpack_require__(29).Symbol; + var USE_SYMBOL = typeof Symbol == 'function'; + + var $exports = (module.exports = function (name) { + return ( + store[name] || + (store[name] = (USE_SYMBOL && Symbol[name]) || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)) + ); + }); + + $exports.store = store; + + /***/ + }, + /* 23 */ + /***/ function (module, exports) { + var core = (module.exports = { version: '2.6.11' }); + if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef + + /***/ + }, + /* 24 */ + /***/ function (module, exports, __webpack_require__) { + // optional / simple context binding + var aFunction = __webpack_require__(12); + module.exports = function (fn, that, length) { + aFunction(fn); + if (that === undefined) return fn; + switch (length) { + case 1: + return function (a) { + return fn.call(that, a); + }; + case 2: + return function (a, b) { + return fn.call(that, a, b); + }; + case 3: + return function (a, b, c) { + return fn.call(that, a, b, c); + }; + } + return function (/* ...args */) { + return fn.apply(that, arguments); + }; + }; + + /***/ + }, + /* 25 */ + /***/ function (module, exports) { + var toString = {}.toString; + + module.exports = function (it) { + return toString.call(it).slice(8, -1); + }; + + /***/ + }, + /* 26 */ + /***/ function (module, exports) { + // 7.1.4 ToInteger + var ceil = Math.ceil; + var floor = Math.floor; + module.exports = function (it) { + return isNaN((it = +it)) ? 0 : (it > 0 ? floor : ceil)(it); + }; + + /***/ + }, + /* 27 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var fails = __webpack_require__(4); + + module.exports = function (method, arg) { + return ( + !!method && + fails(function () { + // eslint-disable-next-line no-useless-call + arg + ? method.call( + null, + function () { + /* empty */ + }, + 1, + ) + : method.call(null); + }) + ); + }; + + /***/ + }, + /* 28 */ + /***/ function (module, exports, __webpack_require__) { + // Thank's IE8 for his funny defineProperty + module.exports = !__webpack_require__(62)(function () { + return ( + Object.defineProperty({}, 'a', { + get: function () { + return 7; + }, + }).a != 7 + ); + }); + + /***/ + }, + /* 29 */ + /***/ function (module, exports) { + // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 + var global = (module.exports = + typeof window != 'undefined' && window.Math == Math + ? window + : typeof self != 'undefined' && self.Math == Math + ? self + : // eslint-disable-next-line no-new-func + Function('return this')()); + if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef + + /***/ + }, + /* 30 */ + /***/ function (module, exports, __webpack_require__) { + var anObject = __webpack_require__(63); + var IE8_DOM_DEFINE = __webpack_require__(213); + var toPrimitive = __webpack_require__(143); + var dP = Object.defineProperty; + + exports.f = __webpack_require__(28) + ? Object.defineProperty + : function defineProperty(O, P, Attributes) { + anObject(O); + P = toPrimitive(P, true); + anObject(Attributes); + if (IE8_DOM_DEFINE) + try { + return dP(O, P, Attributes); + } catch (e) { + /* empty */ + } + if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!'); + if ('value' in Attributes) O[P] = Attributes.value; + return O; + }; + + /***/ + }, + /* 31 */ + /***/ function (module, exports, __webpack_require__) { + // 7.1.1 ToPrimitive(input [, PreferredType]) + var isObject = __webpack_require__(5); + // instead of the ES6 spec version, we didn't implement @@toPrimitive case + // and the second argument - flag - preferred type is a string + module.exports = function (it, S) { + if (!isObject(it)) return it; + var fn, val; + if (S && typeof (fn = it.toString) == 'function' && !isObject((val = fn.call(it)))) return val; + if (typeof (fn = it.valueOf) == 'function' && !isObject((val = fn.call(it)))) return val; + if (!S && typeof (fn = it.toString) == 'function' && !isObject((val = fn.call(it)))) return val; + throw TypeError("Can't convert object to primitive value"); + }; + + /***/ + }, + /* 32 */ + /***/ function (module, exports) { + // 7.2.1 RequireObjectCoercible(argument) + module.exports = function (it) { + if (it == undefined) throw TypeError("Can't call method on " + it); + return it; + }; + + /***/ + }, + /* 33 */ + /***/ function (module, exports, __webpack_require__) { + // most Object methods by ES6 should accept primitives + var $export = __webpack_require__(0); + var core = __webpack_require__(23); + var fails = __webpack_require__(4); + module.exports = function (KEY, exec) { + var fn = (core.Object || {})[KEY] || Object[KEY]; + var exp = {}; + exp[KEY] = exec(fn); + $export( + $export.S + + $export.F * + fails(function () { + fn(1); + }), + 'Object', + exp, + ); + }; + + /***/ + }, + /* 34 */ + /***/ function (module, exports, __webpack_require__) { + // 0 -> Array#forEach + // 1 -> Array#map + // 2 -> Array#filter + // 3 -> Array#some + // 4 -> Array#every + // 5 -> Array#find + // 6 -> Array#findIndex + var ctx = __webpack_require__(24); + var IObject = __webpack_require__(75); + var toObject = __webpack_require__(11); + var toLength = __webpack_require__(7); + var asc = __webpack_require__(131); + module.exports = function (TYPE, $create) { + var IS_MAP = TYPE == 1; + var IS_FILTER = TYPE == 2; + var IS_SOME = TYPE == 3; + var IS_EVERY = TYPE == 4; + var IS_FIND_INDEX = TYPE == 6; + var NO_HOLES = TYPE == 5 || IS_FIND_INDEX; + var create = $create || asc; + return function ($this, callbackfn, that) { + var O = toObject($this); + var self = IObject(O); + var f = ctx(callbackfn, that, 3); + var length = toLength(self.length); + var index = 0; + var result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined; + var val, res; + for (; length > index; index++) + if (NO_HOLES || index in self) { + val = self[index]; + res = f(val, index, O); + if (TYPE) { + if (IS_MAP) + result[index] = res; // map + else if (res) + switch (TYPE) { + case 3: + return true; // some + case 5: + return val; // find + case 6: + return index; // findIndex + case 2: + result.push(val); // filter + } + else if (IS_EVERY) return false; // every + } + } + return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result; + }; + }; + + /***/ + }, + /* 35 */ + /***/ function (module, exports) { + module.exports = function (it) { + return typeof it === 'object' ? it !== null : typeof it === 'function'; + }; + + /***/ + }, + /* 36 */ + /***/ function (module, exports, __webpack_require__) { + var global = __webpack_require__(29); + var core = __webpack_require__(13); + var ctx = __webpack_require__(69); + var hide = __webpack_require__(46); + var has = __webpack_require__(45); + var PROTOTYPE = 'prototype'; + + var $export = function (type, name, source) { + var IS_FORCED = type & $export.F; + var IS_GLOBAL = type & $export.G; + var IS_STATIC = type & $export.S; + var IS_PROTO = type & $export.P; + var IS_BIND = type & $export.B; + var IS_WRAP = type & $export.W; + var exports = IS_GLOBAL ? core : core[name] || (core[name] = {}); + var expProto = exports[PROTOTYPE]; + var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]; + var key, own, out; + if (IS_GLOBAL) source = name; + for (key in source) { + // contains in native + own = !IS_FORCED && target && target[key] !== undefined; + if (own && has(exports, key)) continue; + // export native or passed + out = own ? target[key] : source[key]; + // prevent global pollution for namespaces + exports[key] = + IS_GLOBAL && typeof target[key] != 'function' + ? source[key] + : // bind timers to global for call from export context + IS_BIND && own + ? ctx(out, global) + : // wrap global constructors for prevent change them in library + IS_WRAP && target[key] == out + ? (function (C) { + var F = function (a, b, c) { + if (this instanceof C) { + switch (arguments.length) { + case 0: + return new C(); + case 1: + return new C(a); + case 2: + return new C(a, b); + } + return new C(a, b, c); + } + return C.apply(this, arguments); + }; + F[PROTOTYPE] = C[PROTOTYPE]; + return F; + // make static versions for prototype methods + })(out) + : IS_PROTO && typeof out == 'function' + ? ctx(Function.call, out) + : out; + // export proto methods to core.%CONSTRUCTOR%.methods.%NAME% + if (IS_PROTO) { + (exports.virtual || (exports.virtual = {}))[key] = out; + // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME% + if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out); + } + } + }; + // type bitmap + $export.F = 1; // forced + $export.G = 2; // global + $export.S = 4; // static + $export.P = 8; // proto + $export.B = 16; // bind + $export.W = 32; // wrap + $export.U = 64; // safe + $export.R = 128; // real proto method for `library` + module.exports = $export; + + /***/ + }, + /* 37 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + */ + + var React = __webpack_require__(1); + var factory = __webpack_require__(545); + + if (typeof React === 'undefined') { + throw Error( + 'create-react-class could not find the React object. If you are using script tags, ' + + 'make sure that React is being loaded before create-react-class.', + ); + } + + // Hack to grab NoopUpdateQueue from isomorphic React + var ReactNoopUpdateQueue = new React.Component().updater; + + module.exports = factory(React.Component, React.isValidElement, ReactNoopUpdateQueue); + + /***/ + }, + /* 38 */ + /***/ function (module, exports) { + var g; + + // This works in non-strict mode + g = (function () { + return this; + })(); + + try { + // This works if eval is allowed (see CSP) + g = g || Function('return this')() || (1, eval)('this'); + } catch (e) { + // This works if the window reference is available + if (typeof window === 'object') g = window; + } + + // g can still be undefined, but nothing to do about it... + // We return undefined, instead of nothing here, so it's + // easier to handle this case. if(!global) { ...} + + module.exports = g; + + /***/ + }, + /* 39 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + if (__webpack_require__(8)) { + var LIBRARY = __webpack_require__(42); + var global = __webpack_require__(3); + var fails = __webpack_require__(4); + var $export = __webpack_require__(0); + var $typed = __webpack_require__(97); + var $buffer = __webpack_require__(139); + var ctx = __webpack_require__(24); + var anInstance = __webpack_require__(57); + var propertyDesc = __webpack_require__(50); + var hide = __webpack_require__(15); + var redefineAll = __webpack_require__(59); + var toInteger = __webpack_require__(26); + var toLength = __webpack_require__(7); + var toIndex = __webpack_require__(203); + var toAbsoluteIndex = __webpack_require__(53); + var toPrimitive = __webpack_require__(31); + var has = __webpack_require__(18); + var classof = __webpack_require__(66); + var isObject = __webpack_require__(5); + var toObject = __webpack_require__(11); + var isArrayIter = __webpack_require__(128); + var create = __webpack_require__(54); + var getPrototypeOf = __webpack_require__(21); + var gOPN = __webpack_require__(55).f; + var getIterFn = __webpack_require__(130); + var uid = __webpack_require__(51); + var wks = __webpack_require__(6); + var createArrayMethod = __webpack_require__(34); + var createArrayIncludes = __webpack_require__(87); + var speciesConstructor = __webpack_require__(78); + var ArrayIterators = __webpack_require__(133); + var Iterators = __webpack_require__(68); + var $iterDetect = __webpack_require__(92); + var setSpecies = __webpack_require__(56); + var arrayFill = __webpack_require__(132); + var arrayCopyWithin = __webpack_require__(192); + var $DP = __webpack_require__(9); + var $GOPD = __webpack_require__(20); + var dP = $DP.f; + var gOPD = $GOPD.f; + var RangeError = global.RangeError; + var TypeError = global.TypeError; + var Uint8Array = global.Uint8Array; + var ARRAY_BUFFER = 'ArrayBuffer'; + var SHARED_BUFFER = 'Shared' + ARRAY_BUFFER; + var BYTES_PER_ELEMENT = 'BYTES_PER_ELEMENT'; + var PROTOTYPE = 'prototype'; + var ArrayProto = Array[PROTOTYPE]; + var $ArrayBuffer = $buffer.ArrayBuffer; + var $DataView = $buffer.DataView; + var arrayForEach = createArrayMethod(0); + var arrayFilter = createArrayMethod(2); + var arraySome = createArrayMethod(3); + var arrayEvery = createArrayMethod(4); + var arrayFind = createArrayMethod(5); + var arrayFindIndex = createArrayMethod(6); + var arrayIncludes = createArrayIncludes(true); + var arrayIndexOf = createArrayIncludes(false); + var arrayValues = ArrayIterators.values; + var arrayKeys = ArrayIterators.keys; + var arrayEntries = ArrayIterators.entries; + var arrayLastIndexOf = ArrayProto.lastIndexOf; + var arrayReduce = ArrayProto.reduce; + var arrayReduceRight = ArrayProto.reduceRight; + var arrayJoin = ArrayProto.join; + var arraySort = ArrayProto.sort; + var arraySlice = ArrayProto.slice; + var arrayToString = ArrayProto.toString; + var arrayToLocaleString = ArrayProto.toLocaleString; + var ITERATOR = wks('iterator'); + var TAG = wks('toStringTag'); + var TYPED_CONSTRUCTOR = uid('typed_constructor'); + var DEF_CONSTRUCTOR = uid('def_constructor'); + var ALL_CONSTRUCTORS = $typed.CONSTR; + var TYPED_ARRAY = $typed.TYPED; + var VIEW = $typed.VIEW; + var WRONG_LENGTH = 'Wrong length!'; + + var $map = createArrayMethod(1, function (O, length) { + return allocate(speciesConstructor(O, O[DEF_CONSTRUCTOR]), length); + }); + + var LITTLE_ENDIAN = fails(function () { + // eslint-disable-next-line no-undef + return new Uint8Array(new Uint16Array([1]).buffer)[0] === 1; + }); + + var FORCED_SET = + !!Uint8Array && + !!Uint8Array[PROTOTYPE].set && + fails(function () { + new Uint8Array(1).set({}); + }); + + var toOffset = function (it, BYTES) { + var offset = toInteger(it); + if (offset < 0 || offset % BYTES) throw RangeError('Wrong offset!'); + return offset; + }; + + var validate = function (it) { + if (isObject(it) && TYPED_ARRAY in it) return it; + throw TypeError(it + ' is not a typed array!'); + }; + + var allocate = function (C, length) { + if (!(isObject(C) && TYPED_CONSTRUCTOR in C)) { + throw TypeError('It is not a typed array constructor!'); + } + return new C(length); + }; + + var speciesFromList = function (O, list) { + return fromList(speciesConstructor(O, O[DEF_CONSTRUCTOR]), list); + }; + + var fromList = function (C, list) { + var index = 0; + var length = list.length; + var result = allocate(C, length); + while (length > index) result[index] = list[index++]; + return result; + }; + + var addGetter = function (it, key, internal) { + dP(it, key, { + get: function () { + return this._d[internal]; + }, + }); + }; + + var $from = function from(source /* , mapfn, thisArg */) { + var O = toObject(source); + var aLen = arguments.length; + var mapfn = aLen > 1 ? arguments[1] : undefined; + var mapping = mapfn !== undefined; + var iterFn = getIterFn(O); + var i, length, values, result, step, iterator; + if (iterFn != undefined && !isArrayIter(iterFn)) { + for (iterator = iterFn.call(O), values = [], i = 0; !(step = iterator.next()).done; i++) { + values.push(step.value); + } + O = values; + } + if (mapping && aLen > 2) mapfn = ctx(mapfn, arguments[2], 2); + for (i = 0, length = toLength(O.length), result = allocate(this, length); length > i; i++) { + result[i] = mapping ? mapfn(O[i], i) : O[i]; + } + return result; + }; + + var $of = function of(/* ...items */) { + var index = 0; + var length = arguments.length; + var result = allocate(this, length); + while (length > index) result[index] = arguments[index++]; + return result; + }; + + // iOS Safari 6.x fails here + var TO_LOCALE_BUG = + !!Uint8Array && + fails(function () { + arrayToLocaleString.call(new Uint8Array(1)); + }); + + var $toLocaleString = function toLocaleString() { + return arrayToLocaleString.apply( + TO_LOCALE_BUG ? arraySlice.call(validate(this)) : validate(this), + arguments, + ); + }; + + var proto = { + copyWithin: function copyWithin(target, start /* , end */) { + return arrayCopyWithin.call( + validate(this), + target, + start, + arguments.length > 2 ? arguments[2] : undefined, + ); + }, + every: function every(callbackfn /* , thisArg */) { + return arrayEvery(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); + }, + fill: function fill(value /* , start, end */) { + // eslint-disable-line no-unused-vars + return arrayFill.apply(validate(this), arguments); + }, + filter: function filter(callbackfn /* , thisArg */) { + return speciesFromList( + this, + arrayFilter(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined), + ); + }, + find: function find(predicate /* , thisArg */) { + return arrayFind(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined); + }, + findIndex: function findIndex(predicate /* , thisArg */) { + return arrayFindIndex(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined); + }, + forEach: function forEach(callbackfn /* , thisArg */) { + arrayForEach(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); + }, + indexOf: function indexOf(searchElement /* , fromIndex */) { + return arrayIndexOf( + validate(this), + searchElement, + arguments.length > 1 ? arguments[1] : undefined, + ); + }, + includes: function includes(searchElement /* , fromIndex */) { + return arrayIncludes( + validate(this), + searchElement, + arguments.length > 1 ? arguments[1] : undefined, + ); + }, + join: function join(separator) { + // eslint-disable-line no-unused-vars + return arrayJoin.apply(validate(this), arguments); + }, + lastIndexOf: function lastIndexOf(searchElement /* , fromIndex */) { + // eslint-disable-line no-unused-vars + return arrayLastIndexOf.apply(validate(this), arguments); + }, + map: function map(mapfn /* , thisArg */) { + return $map(validate(this), mapfn, arguments.length > 1 ? arguments[1] : undefined); + }, + reduce: function reduce(callbackfn /* , initialValue */) { + // eslint-disable-line no-unused-vars + return arrayReduce.apply(validate(this), arguments); + }, + reduceRight: function reduceRight(callbackfn /* , initialValue */) { + // eslint-disable-line no-unused-vars + return arrayReduceRight.apply(validate(this), arguments); + }, + reverse: function reverse() { + var that = this; + var length = validate(that).length; + var middle = Math.floor(length / 2); + var index = 0; + var value; + while (index < middle) { + value = that[index]; + that[index++] = that[--length]; + that[length] = value; + } + return that; + }, + some: function some(callbackfn /* , thisArg */) { + return arraySome(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); + }, + sort: function sort(comparefn) { + return arraySort.call(validate(this), comparefn); + }, + subarray: function subarray(begin, end) { + var O = validate(this); + var length = O.length; + var $begin = toAbsoluteIndex(begin, length); + return new (speciesConstructor(O, O[DEF_CONSTRUCTOR]))( + O.buffer, + O.byteOffset + $begin * O.BYTES_PER_ELEMENT, + toLength((end === undefined ? length : toAbsoluteIndex(end, length)) - $begin), + ); + }, + }; + + var $slice = function slice(start, end) { + return speciesFromList(this, arraySlice.call(validate(this), start, end)); + }; + + var $set = function set(arrayLike /* , offset */) { + validate(this); + var offset = toOffset(arguments[1], 1); + var length = this.length; + var src = toObject(arrayLike); + var len = toLength(src.length); + var index = 0; + if (len + offset > length) throw RangeError(WRONG_LENGTH); + while (index < len) this[offset + index] = src[index++]; + }; + + var $iterators = { + entries: function entries() { + return arrayEntries.call(validate(this)); + }, + keys: function keys() { + return arrayKeys.call(validate(this)); + }, + values: function values() { + return arrayValues.call(validate(this)); + }, + }; + + var isTAIndex = function (target, key) { + return ( + isObject(target) && + target[TYPED_ARRAY] && + typeof key != 'symbol' && + key in target && + String(+key) == String(key) + ); + }; + var $getDesc = function getOwnPropertyDescriptor(target, key) { + return isTAIndex(target, (key = toPrimitive(key, true))) + ? propertyDesc(2, target[key]) + : gOPD(target, key); + }; + var $setDesc = function defineProperty(target, key, desc) { + if ( + isTAIndex(target, (key = toPrimitive(key, true))) && + isObject(desc) && + has(desc, 'value') && + !has(desc, 'get') && + !has(desc, 'set') && + // TODO: add validation descriptor w/o calling accessors + !desc.configurable && + (!has(desc, 'writable') || desc.writable) && + (!has(desc, 'enumerable') || desc.enumerable) + ) { + target[key] = desc.value; + return target; + } + return dP(target, key, desc); + }; + + if (!ALL_CONSTRUCTORS) { + $GOPD.f = $getDesc; + $DP.f = $setDesc; + } + + $export($export.S + $export.F * !ALL_CONSTRUCTORS, 'Object', { + getOwnPropertyDescriptor: $getDesc, + defineProperty: $setDesc, + }); + + if ( + fails(function () { + arrayToString.call({}); + }) + ) { + arrayToString = arrayToLocaleString = function toString() { + return arrayJoin.call(this); + }; + } + + var $TypedArrayPrototype$ = redefineAll({}, proto); + redefineAll($TypedArrayPrototype$, $iterators); + hide($TypedArrayPrototype$, ITERATOR, $iterators.values); + redefineAll($TypedArrayPrototype$, { + slice: $slice, + set: $set, + constructor: function () { + /* noop */ + }, + toString: arrayToString, + toLocaleString: $toLocaleString, + }); + addGetter($TypedArrayPrototype$, 'buffer', 'b'); + addGetter($TypedArrayPrototype$, 'byteOffset', 'o'); + addGetter($TypedArrayPrototype$, 'byteLength', 'l'); + addGetter($TypedArrayPrototype$, 'length', 'e'); + dP($TypedArrayPrototype$, TAG, { + get: function () { + return this[TYPED_ARRAY]; + }, + }); + + // eslint-disable-next-line max-statements + module.exports = function (KEY, BYTES, wrapper, CLAMPED) { + CLAMPED = !!CLAMPED; + var NAME = KEY + (CLAMPED ? 'Clamped' : '') + 'Array'; + var GETTER = 'get' + KEY; + var SETTER = 'set' + KEY; + var TypedArray = global[NAME]; + var Base = TypedArray || {}; + var TAC = TypedArray && getPrototypeOf(TypedArray); + var FORCED = !TypedArray || !$typed.ABV; + var O = {}; + var TypedArrayPrototype = TypedArray && TypedArray[PROTOTYPE]; + var getter = function (that, index) { + var data = that._d; + return data.v[GETTER](index * BYTES + data.o, LITTLE_ENDIAN); + }; + var setter = function (that, index, value) { + var data = that._d; + if (CLAMPED) value = (value = Math.round(value)) < 0 ? 0 : value > 0xff ? 0xff : value & 0xff; + data.v[SETTER](index * BYTES + data.o, value, LITTLE_ENDIAN); + }; + var addElement = function (that, index) { + dP(that, index, { + get: function () { + return getter(this, index); + }, + set: function (value) { + return setter(this, index, value); + }, + enumerable: true, + }); + }; + if (FORCED) { + TypedArray = wrapper(function (that, data, $offset, $length) { + anInstance(that, TypedArray, NAME, '_d'); + var index = 0; + var offset = 0; + var buffer, byteLength, length, klass; + if (!isObject(data)) { + length = toIndex(data); + byteLength = length * BYTES; + buffer = new $ArrayBuffer(byteLength); + } else if ( + data instanceof $ArrayBuffer || + (klass = classof(data)) == ARRAY_BUFFER || + klass == SHARED_BUFFER + ) { + buffer = data; + offset = toOffset($offset, BYTES); + var $len = data.byteLength; + if ($length === undefined) { + if ($len % BYTES) throw RangeError(WRONG_LENGTH); + byteLength = $len - offset; + if (byteLength < 0) throw RangeError(WRONG_LENGTH); + } else { + byteLength = toLength($length) * BYTES; + if (byteLength + offset > $len) throw RangeError(WRONG_LENGTH); + } + length = byteLength / BYTES; + } else if (TYPED_ARRAY in data) { + return fromList(TypedArray, data); + } else { + return $from.call(TypedArray, data); + } + hide(that, '_d', { + b: buffer, + o: offset, + l: byteLength, + e: length, + v: new $DataView(buffer), + }); + while (index < length) addElement(that, index++); + }); + TypedArrayPrototype = TypedArray[PROTOTYPE] = create($TypedArrayPrototype$); + hide(TypedArrayPrototype, 'constructor', TypedArray); + } else if ( + !fails(function () { + TypedArray(1); + }) || + !fails(function () { + new TypedArray(-1); // eslint-disable-line no-new + }) || + !$iterDetect(function (iter) { + new TypedArray(); // eslint-disable-line no-new + new TypedArray(null); // eslint-disable-line no-new + new TypedArray(1.5); // eslint-disable-line no-new + new TypedArray(iter); // eslint-disable-line no-new + }, true) + ) { + TypedArray = wrapper(function (that, data, $offset, $length) { + anInstance(that, TypedArray, NAME); + var klass; + // `ws` module bug, temporarily remove validation length for Uint8Array + // https://github.com/websockets/ws/pull/645 + if (!isObject(data)) return new Base(toIndex(data)); + if ( + data instanceof $ArrayBuffer || + (klass = classof(data)) == ARRAY_BUFFER || + klass == SHARED_BUFFER + ) { + return $length !== undefined + ? new Base(data, toOffset($offset, BYTES), $length) + : $offset !== undefined + ? new Base(data, toOffset($offset, BYTES)) + : new Base(data); + } + if (TYPED_ARRAY in data) return fromList(TypedArray, data); + return $from.call(TypedArray, data); + }); + arrayForEach( + TAC !== Function.prototype ? gOPN(Base).concat(gOPN(TAC)) : gOPN(Base), + function (key) { + if (!(key in TypedArray)) hide(TypedArray, key, Base[key]); + }, + ); + TypedArray[PROTOTYPE] = TypedArrayPrototype; + if (!LIBRARY) TypedArrayPrototype.constructor = TypedArray; + } + var $nativeIterator = TypedArrayPrototype[ITERATOR]; + var CORRECT_ITER_NAME = + !!$nativeIterator && ($nativeIterator.name == 'values' || $nativeIterator.name == undefined); + var $iterator = $iterators.values; + hide(TypedArray, TYPED_CONSTRUCTOR, true); + hide(TypedArrayPrototype, TYPED_ARRAY, NAME); + hide(TypedArrayPrototype, VIEW, true); + hide(TypedArrayPrototype, DEF_CONSTRUCTOR, TypedArray); + + if (CLAMPED ? new TypedArray(1)[TAG] != NAME : !(TAG in TypedArrayPrototype)) { + dP(TypedArrayPrototype, TAG, { + get: function () { + return NAME; + }, + }); + } + + O[NAME] = TypedArray; + + $export($export.G + $export.W + $export.F * (TypedArray != Base), O); + + $export($export.S, NAME, { + BYTES_PER_ELEMENT: BYTES, + }); + + $export( + $export.S + + $export.F * + fails(function () { + Base.of.call(TypedArray, 1); + }), + NAME, + { + from: $from, + of: $of, + }, + ); + + if (!(BYTES_PER_ELEMENT in TypedArrayPrototype)) + hide(TypedArrayPrototype, BYTES_PER_ELEMENT, BYTES); + + $export($export.P, NAME, proto); + + setSpecies(NAME); + + $export($export.P + $export.F * FORCED_SET, NAME, { set: $set }); + + $export($export.P + $export.F * !CORRECT_ITER_NAME, NAME, $iterators); + + if (!LIBRARY && TypedArrayPrototype.toString != arrayToString) + TypedArrayPrototype.toString = arrayToString; + + $export( + $export.P + + $export.F * + fails(function () { + new TypedArray(1).slice(); + }), + NAME, + { slice: $slice }, + ); + + $export( + $export.P + + $export.F * + (fails(function () { + return [1, 2].toLocaleString() != new TypedArray([1, 2]).toLocaleString(); + }) || + !fails(function () { + TypedArrayPrototype.toLocaleString.call([1, 2]); + })), + NAME, + { toLocaleString: $toLocaleString }, + ); + + Iterators[NAME] = CORRECT_ITER_NAME ? $nativeIterator : $iterator; + if (!LIBRARY && !CORRECT_ITER_NAME) hide(TypedArrayPrototype, ITERATOR, $iterator); + }; + } else + module.exports = function () { + /* empty */ + }; + + /***/ + }, + /* 40 */ + /***/ function (module, exports, __webpack_require__) { + var Map = __webpack_require__(198); + var $export = __webpack_require__(0); + var shared = __webpack_require__(74)('metadata'); + var store = shared.store || (shared.store = new (__webpack_require__(201))()); + + var getOrCreateMetadataMap = function (target, targetKey, create) { + var targetMetadata = store.get(target); + if (!targetMetadata) { + if (!create) return undefined; + store.set(target, (targetMetadata = new Map())); + } + var keyMetadata = targetMetadata.get(targetKey); + if (!keyMetadata) { + if (!create) return undefined; + targetMetadata.set(targetKey, (keyMetadata = new Map())); + } + return keyMetadata; + }; + var ordinaryHasOwnMetadata = function (MetadataKey, O, P) { + var metadataMap = getOrCreateMetadataMap(O, P, false); + return metadataMap === undefined ? false : metadataMap.has(MetadataKey); + }; + var ordinaryGetOwnMetadata = function (MetadataKey, O, P) { + var metadataMap = getOrCreateMetadataMap(O, P, false); + return metadataMap === undefined ? undefined : metadataMap.get(MetadataKey); + }; + var ordinaryDefineOwnMetadata = function (MetadataKey, MetadataValue, O, P) { + getOrCreateMetadataMap(O, P, true).set(MetadataKey, MetadataValue); + }; + var ordinaryOwnMetadataKeys = function (target, targetKey) { + var metadataMap = getOrCreateMetadataMap(target, targetKey, false); + var keys = []; + if (metadataMap) + metadataMap.forEach(function (_, key) { + keys.push(key); + }); + return keys; + }; + var toMetaKey = function (it) { + return it === undefined || typeof it == 'symbol' ? it : String(it); + }; + var exp = function (O) { + $export($export.S, 'Reflect', O); + }; + + module.exports = { + store: store, + map: getOrCreateMetadataMap, + has: ordinaryHasOwnMetadata, + get: ordinaryGetOwnMetadata, + set: ordinaryDefineOwnMetadata, + keys: ordinaryOwnMetadataKeys, + key: toMetaKey, + exp: exp, + }; + + /***/ + }, + /* 41 */ + /***/ function (module, exports) { + function _interopRequireDefault(obj) { + return obj && obj.__esModule + ? obj + : { + default: obj, + }; + } + + module.exports = _interopRequireDefault; + + /***/ + }, + /* 42 */ + /***/ function (module, exports) { + module.exports = false; + + /***/ + }, + /* 43 */ + /***/ function (module, exports, __webpack_require__) { + var META = __webpack_require__(51)('meta'); + var isObject = __webpack_require__(5); + var has = __webpack_require__(18); + var setDesc = __webpack_require__(9).f; + var id = 0; + var isExtensible = + Object.isExtensible || + function () { + return true; + }; + var FREEZE = !__webpack_require__(4)(function () { + return isExtensible(Object.preventExtensions({})); + }); + var setMeta = function (it) { + setDesc(it, META, { + value: { + i: 'O' + ++id, // object ID + w: {}, // weak collections IDs + }, + }); + }; + var fastKey = function (it, create) { + // return primitive with prefix + if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; + if (!has(it, META)) { + // can't set metadata to uncaught frozen object + if (!isExtensible(it)) return 'F'; + // not necessary to add metadata + if (!create) return 'E'; + // add missing metadata + setMeta(it); + // return object ID + } + return it[META].i; + }; + var getWeak = function (it, create) { + if (!has(it, META)) { + // can't set metadata to uncaught frozen object + if (!isExtensible(it)) return true; + // not necessary to add metadata + if (!create) return false; + // add missing metadata + setMeta(it); + // return hash weak collections IDs + } + return it[META].w; + }; + // add metadata on freeze-family methods calling + var onFreeze = function (it) { + if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it); + return it; + }; + var meta = (module.exports = { + KEY: META, + NEED: false, + fastKey: fastKey, + getWeak: getWeak, + onFreeze: onFreeze, + }); + + /***/ + }, + /* 44 */ + /***/ function (module, exports, __webpack_require__) { + // 22.1.3.31 Array.prototype[@@unscopables] + var UNSCOPABLES = __webpack_require__(6)('unscopables'); + var ArrayProto = Array.prototype; + if (ArrayProto[UNSCOPABLES] == undefined) __webpack_require__(15)(ArrayProto, UNSCOPABLES, {}); + module.exports = function (key) { + ArrayProto[UNSCOPABLES][key] = true; + }; + + /***/ + }, + /* 45 */ + /***/ function (module, exports) { + var hasOwnProperty = {}.hasOwnProperty; + module.exports = function (it, key) { + return hasOwnProperty.call(it, key); + }; + + /***/ + }, + /* 46 */ + /***/ function (module, exports, __webpack_require__) { + var dP = __webpack_require__(30); + var createDesc = __webpack_require__(79); + module.exports = __webpack_require__(28) + ? function (object, key, value) { + return dP.f(object, key, createDesc(1, value)); + } + : function (object, key, value) { + object[key] = value; + return object; + }; + + /***/ + }, + /* 47 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2014-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + + /** + * Similar to invariant but only logs a warning if the condition is not met. + * This can be used to log issues in development environments in critical + * paths. Removing the logging code for production environments will keep the + * same logic and follow the same code paths. + */ + + var warning = function () {}; + + if (true) { + warning = function (condition, format, args) { + var len = arguments.length; + args = new Array(len > 2 ? len - 2 : 0); + for (var key = 2; key < len; key++) { + args[key - 2] = arguments[key]; + } + if (format === undefined) { + throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument'); + } + + if (format.length < 10 || /^[s\W]*$/.test(format)) { + throw new Error( + 'The warning format should be able to uniquely identify this ' + + 'warning. Please, use a more descriptive format than: ' + + format, + ); + } + + if (!condition) { + var argIndex = 0; + var message = + 'Warning: ' + + format.replace(/%s/g, function () { + return args[argIndex++]; + }); + if (typeof console !== 'undefined') { + console.error(message); + } + try { + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + throw new Error(message); + } catch (x) {} + } + }; + } + + module.exports = warning; + + /***/ + }, + /* 48 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['c'] = isReactChildren; + /* harmony export (immutable) */ __webpack_exports__['a'] = createRouteFromReactElement; + /* unused harmony export createRoutesFromReactChildren */ + /* harmony export (immutable) */ __webpack_exports__['b'] = createRoutes; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + function isValidChild(object) { + return object == null || __WEBPACK_IMPORTED_MODULE_0_react___default.a.isValidElement(object); + } + + function isReactChildren(object) { + return isValidChild(object) || (Array.isArray(object) && object.every(isValidChild)); + } + + function createRoute(defaultProps, props) { + return _extends({}, defaultProps, props); + } + + function createRouteFromReactElement(element) { + var type = element.type; + var route = createRoute(type.defaultProps, element.props); + + if (route.children) { + var childRoutes = createRoutesFromReactChildren(route.children, route); + + if (childRoutes.length) route.childRoutes = childRoutes; + + delete route.children; + } + + return route; + } + + /** + * Creates and returns a routes object from the given ReactChildren. JSX + * provides a convenient way to visualize how routes in the hierarchy are + * nested. + * + * import { Route, createRoutesFromReactChildren } from 'react-router' + * + * const routes = createRoutesFromReactChildren( + * <Route component={App}> + * <Route path="home" component={Dashboard}/> + * <Route path="news" component={NewsFeed}/> + * </Route> + * ) + * + * Note: This method is automatically used when you provide <Route> children + * to a <Router> component. + */ + function createRoutesFromReactChildren(children, parentRoute) { + var routes = []; + + __WEBPACK_IMPORTED_MODULE_0_react___default.a.Children.forEach(children, function (element) { + if (__WEBPACK_IMPORTED_MODULE_0_react___default.a.isValidElement(element)) { + // Component classes may have a static create* method. + if (element.type.createRouteFromReactElement) { + var route = element.type.createRouteFromReactElement(element, parentRoute); + + if (route) routes.push(route); + } else { + routes.push(createRouteFromReactElement(element)); + } + } + }); + + return routes; + } + + /** + * Creates and returns an array of routes from the given object which + * may be a JSX route, a plain object route, or an array of either. + */ + function createRoutes(routes) { + if (isReactChildren(routes)) { + routes = createRoutesFromReactChildren(routes); + } else if (routes && !Array.isArray(routes)) { + routes = [routes]; + } + + return routes; + } + + /***/ + }, + /* 49 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + exports.createPath = + exports.parsePath = + exports.getQueryStringValueFromPath = + exports.stripQueryStringValueFromPath = + exports.addQueryStringValueToPath = + undefined; + + var _warning = __webpack_require__(47); + + var _warning2 = _interopRequireDefault(_warning); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + var addQueryStringValueToPath = (exports.addQueryStringValueToPath = function addQueryStringValueToPath( + path, + key, + value, + ) { + var _parsePath = parsePath(path), + pathname = _parsePath.pathname, + search = _parsePath.search, + hash = _parsePath.hash; + + return createPath({ + pathname: pathname, + search: search + (search.indexOf('?') === -1 ? '?' : '&') + key + '=' + value, + hash: hash, + }); + }); + + var stripQueryStringValueFromPath = (exports.stripQueryStringValueFromPath = + function stripQueryStringValueFromPath(path, key) { + var _parsePath2 = parsePath(path), + pathname = _parsePath2.pathname, + search = _parsePath2.search, + hash = _parsePath2.hash; + + return createPath({ + pathname: pathname, + search: search.replace( + new RegExp('([?&])' + key + '=[a-zA-Z0-9]+(&?)'), + function (match, prefix, suffix) { + return prefix === '?' ? prefix : suffix; + }, + ), + hash: hash, + }); + }); + + var getQueryStringValueFromPath = (exports.getQueryStringValueFromPath = + function getQueryStringValueFromPath(path, key) { + var _parsePath3 = parsePath(path), + search = _parsePath3.search; + + var match = search.match(new RegExp('[?&]' + key + '=([a-zA-Z0-9]+)')); + return match && match[1]; + }); + + var extractPath = function extractPath(string) { + var match = string.match(/^(https?:)?\/\/[^\/]*/); + return match == null ? string : string.substring(match[0].length); + }; + + var parsePath = (exports.parsePath = function parsePath(path) { + var pathname = extractPath(path); + var search = ''; + var hash = ''; + + true + ? (0, _warning2.default)( + path === pathname, + 'A path must be pathname + search + hash only, not a full URL like "%s"', + path, + ) + : void 0; + + var hashIndex = pathname.indexOf('#'); + if (hashIndex !== -1) { + hash = pathname.substring(hashIndex); + pathname = pathname.substring(0, hashIndex); + } + + var searchIndex = pathname.indexOf('?'); + if (searchIndex !== -1) { + search = pathname.substring(searchIndex); + pathname = pathname.substring(0, searchIndex); + } + + if (pathname === '') pathname = '/'; + + return { + pathname: pathname, + search: search, + hash: hash, + }; + }); + + var createPath = (exports.createPath = function createPath(location) { + if (location == null || typeof location === 'string') return location; + + var basename = location.basename, + pathname = location.pathname, + search = location.search, + hash = location.hash; + + var path = (basename || '') + pathname; + + if (search && search !== '?') path += search; + + if (hash) path += hash; + + return path; + }); + + /***/ + }, + /* 50 */ + /***/ function (module, exports) { + module.exports = function (bitmap, value) { + return { + enumerable: !(bitmap & 1), + configurable: !(bitmap & 2), + writable: !(bitmap & 4), + value: value, + }; + }; + + /***/ + }, + /* 51 */ + /***/ function (module, exports) { + var id = 0; + var px = Math.random(); + module.exports = function (key) { + return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); + }; + + /***/ + }, + /* 52 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.14 / 15.2.3.14 Object.keys(O) + var $keys = __webpack_require__(177); + var enumBugKeys = __webpack_require__(116); + + module.exports = + Object.keys || + function keys(O) { + return $keys(O, enumBugKeys); + }; + + /***/ + }, + /* 53 */ + /***/ function (module, exports, __webpack_require__) { + var toInteger = __webpack_require__(26); + var max = Math.max; + var min = Math.min; + module.exports = function (index, length) { + index = toInteger(index); + return index < 0 ? max(index + length, 0) : min(index, length); + }; + + /***/ + }, + /* 54 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) + var anObject = __webpack_require__(2); + var dPs = __webpack_require__(178); + var enumBugKeys = __webpack_require__(116); + var IE_PROTO = __webpack_require__(115)('IE_PROTO'); + var Empty = function () { + /* empty */ + }; + var PROTOTYPE = 'prototype'; + + // Create object with fake `null` prototype: use iframe Object with cleared prototype + var createDict = function () { + // Thrash, waste and sodomy: IE GC bug + var iframe = __webpack_require__(113)('iframe'); + var i = enumBugKeys.length; + var lt = '<'; + var gt = '>'; + var iframeDocument; + iframe.style.display = 'none'; + __webpack_require__(117).appendChild(iframe); + iframe.src = 'javascript:'; // eslint-disable-line no-script-url + // createDict = iframe.contentWindow.Object; + // html.removeChild(iframe); + iframeDocument = iframe.contentWindow.document; + iframeDocument.open(); + iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); + iframeDocument.close(); + createDict = iframeDocument.F; + while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]]; + return createDict(); + }; + + module.exports = + Object.create || + function create(O, Properties) { + var result; + if (O !== null) { + Empty[PROTOTYPE] = anObject(O); + result = new Empty(); + Empty[PROTOTYPE] = null; + // add "__proto__" for Object.getPrototypeOf polyfill + result[IE_PROTO] = O; + } else result = createDict(); + return Properties === undefined ? result : dPs(result, Properties); + }; + + /***/ + }, + /* 55 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) + var $keys = __webpack_require__(177); + var hiddenKeys = __webpack_require__(116).concat('length', 'prototype'); + + exports.f = + Object.getOwnPropertyNames || + function getOwnPropertyNames(O) { + return $keys(O, hiddenKeys); + }; + + /***/ + }, + /* 56 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var global = __webpack_require__(3); + var dP = __webpack_require__(9); + var DESCRIPTORS = __webpack_require__(8); + var SPECIES = __webpack_require__(6)('species'); + + module.exports = function (KEY) { + var C = global[KEY]; + if (DESCRIPTORS && C && !C[SPECIES]) + dP.f(C, SPECIES, { + configurable: true, + get: function () { + return this; + }, + }); + }; + + /***/ + }, + /* 57 */ + /***/ function (module, exports) { + module.exports = function (it, Constructor, name, forbiddenField) { + if (!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)) { + throw TypeError(name + ': incorrect invocation!'); + } + return it; + }; + + /***/ + }, + /* 58 */ + /***/ function (module, exports, __webpack_require__) { + var ctx = __webpack_require__(24); + var call = __webpack_require__(190); + var isArrayIter = __webpack_require__(128); + var anObject = __webpack_require__(2); + var toLength = __webpack_require__(7); + var getIterFn = __webpack_require__(130); + var BREAK = {}; + var RETURN = {}; + var exports = (module.exports = function (iterable, entries, fn, that, ITERATOR) { + var iterFn = ITERATOR + ? function () { + return iterable; + } + : getIterFn(iterable); + var f = ctx(fn, that, entries ? 2 : 1); + var index = 0; + var length, step, iterator, result; + if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!'); + // fast case for arrays with default iterator + if (isArrayIter(iterFn)) + for (length = toLength(iterable.length); length > index; index++) { + result = entries ? f(anObject((step = iterable[index]))[0], step[1]) : f(iterable[index]); + if (result === BREAK || result === RETURN) return result; + } + else + for (iterator = iterFn.call(iterable); !(step = iterator.next()).done; ) { + result = call(iterator, f, step.value, entries); + if (result === BREAK || result === RETURN) return result; + } + }); + exports.BREAK = BREAK; + exports.RETURN = RETURN; + + /***/ + }, + /* 59 */ + /***/ function (module, exports, __webpack_require__) { + var redefine = __webpack_require__(16); + module.exports = function (target, src, safe) { + for (var key in src) redefine(target, key, src[key], safe); + return target; + }; + + /***/ + }, + /* 60 */ + /***/ function (module, exports, __webpack_require__) { + var isObject = __webpack_require__(5); + module.exports = function (it, TYPE) { + if (!isObject(it) || it._t !== TYPE) throw TypeError('Incompatible receiver, ' + TYPE + ' required!'); + return it; + }; + + /***/ + }, + /* 61 */ + /***/ function (module, exports, __webpack_require__) { + // to indexed object, toObject with fallback for non-array-like ES3 strings + var IObject = __webpack_require__(140); + var defined = __webpack_require__(142); + module.exports = function (it) { + return IObject(defined(it)); + }; + + /***/ + }, + /* 62 */ + /***/ function (module, exports) { + module.exports = function (exec) { + try { + return !!exec(); + } catch (e) { + return true; + } + }; + + /***/ + }, + /* 63 */ + /***/ function (module, exports, __webpack_require__) { + var isObject = __webpack_require__(35); + module.exports = function (it) { + if (!isObject(it)) throw TypeError(it + ' is not an object!'); + return it; + }; + + /***/ + }, + /* 64 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /* +object-assign +(c) Sindre Sorhus +@license MIT +*/ + + /* eslint-disable no-unused-vars */ + var getOwnPropertySymbols = Object.getOwnPropertySymbols; + var hasOwnProperty = Object.prototype.hasOwnProperty; + var propIsEnumerable = Object.prototype.propertyIsEnumerable; + + function toObject(val) { + if (val === null || val === undefined) { + throw new TypeError('Object.assign cannot be called with null or undefined'); + } + + return Object(val); + } + + function shouldUseNative() { + try { + if (!Object.assign) { + return false; + } + + // Detect buggy property enumeration order in older V8 versions. + + // https://bugs.chromium.org/p/v8/issues/detail?id=4118 + var test1 = new String('abc'); // eslint-disable-line no-new-wrappers + test1[5] = 'de'; + if (Object.getOwnPropertyNames(test1)[0] === '5') { + return false; + } + + // https://bugs.chromium.org/p/v8/issues/detail?id=3056 + var test2 = {}; + for (var i = 0; i < 10; i++) { + test2['_' + String.fromCharCode(i)] = i; + } + var order2 = Object.getOwnPropertyNames(test2).map(function (n) { + return test2[n]; + }); + if (order2.join('') !== '0123456789') { + return false; + } + + // https://bugs.chromium.org/p/v8/issues/detail?id=3056 + var test3 = {}; + 'abcdefghijklmnopqrst'.split('').forEach(function (letter) { + test3[letter] = letter; + }); + if (Object.keys(Object.assign({}, test3)).join('') !== 'abcdefghijklmnopqrst') { + return false; + } + + return true; + } catch (err) { + // We don't expect any of the above to throw, but better to be safe. + return false; + } + } + + module.exports = shouldUseNative() + ? Object.assign + : function (target, source) { + var from; + var to = toObject(target); + var symbols; + + for (var s = 1; s < arguments.length; s++) { + from = Object(arguments[s]); + + for (var key in from) { + if (hasOwnProperty.call(from, key)) { + to[key] = from[key]; + } + } + + if (getOwnPropertySymbols) { + symbols = getOwnPropertySymbols(from); + for (var i = 0; i < symbols.length; i++) { + if (propIsEnumerable.call(from, symbols[i])) { + to[symbols[i]] = from[symbols[i]]; + } + } + } + } + + return to; + }; + + /***/ + }, + /* 65 */ + /***/ function (module, exports, __webpack_require__) { + var def = __webpack_require__(9).f; + var has = __webpack_require__(18); + var TAG = __webpack_require__(6)('toStringTag'); + + module.exports = function (it, tag, stat) { + if (it && !has((it = stat ? it : it.prototype), TAG)) + def(it, TAG, { configurable: true, value: tag }); + }; + + /***/ + }, + /* 66 */ + /***/ function (module, exports, __webpack_require__) { + // getting tag from 19.1.3.6 Object.prototype.toString() + var cof = __webpack_require__(25); + var TAG = __webpack_require__(6)('toStringTag'); + // ES3 wrong here + var ARG = + cof( + (function () { + return arguments; + })(), + ) == 'Arguments'; + + // fallback for IE11 Script Access Denied error + var tryGet = function (it, key) { + try { + return it[key]; + } catch (e) { + /* empty */ + } + }; + + module.exports = function (it) { + var O, T, B; + return it === undefined + ? 'Undefined' + : it === null + ? 'Null' + : // @@toStringTag case + typeof (T = tryGet((O = Object(it)), TAG)) == 'string' + ? T + : // builtinTag case + ARG + ? cof(O) + : // ES3 arguments fallback + (B = cof(O)) == 'Object' && typeof O.callee == 'function' + ? 'Arguments' + : B; + }; + + /***/ + }, + /* 67 */ + /***/ function (module, exports, __webpack_require__) { + var $export = __webpack_require__(0); + var defined = __webpack_require__(32); + var fails = __webpack_require__(4); + var spaces = __webpack_require__(119); + var space = '[' + spaces + ']'; + var non = '\u200b\u0085'; + var ltrim = RegExp('^' + space + space + '*'); + var rtrim = RegExp(space + space + '*$'); + + var exporter = function (KEY, exec, ALIAS) { + var exp = {}; + var FORCE = fails(function () { + return !!spaces[KEY]() || non[KEY]() != non; + }); + var fn = (exp[KEY] = FORCE ? exec(trim) : spaces[KEY]); + if (ALIAS) exp[ALIAS] = fn; + $export($export.P + $export.F * FORCE, 'String', exp); + }; + + // 1 -> String#trimLeft + // 2 -> String#trimRight + // 3 -> String#trim + var trim = (exporter.trim = function (string, TYPE) { + string = String(defined(string)); + if (TYPE & 1) string = string.replace(ltrim, ''); + if (TYPE & 2) string = string.replace(rtrim, ''); + return string; + }); + + module.exports = exporter; + + /***/ + }, + /* 68 */ + /***/ function (module, exports) { + module.exports = {}; + + /***/ + }, + /* 69 */ + /***/ function (module, exports, __webpack_require__) { + // optional / simple context binding + var aFunction = __webpack_require__(216); + module.exports = function (fn, that, length) { + aFunction(fn); + if (that === undefined) return fn; + switch (length) { + case 1: + return function (a) { + return fn.call(that, a); + }; + case 2: + return function (a, b) { + return fn.call(that, a, b); + }; + case 3: + return function (a, b, c) { + return fn.call(that, a, b, c); + }; + } + return function (/* ...args */) { + return fn.apply(that, arguments); + }; + }; + + /***/ + }, + /* 70 */ + /***/ function (module, exports, __webpack_require__) { + // 7.1.13 ToObject(argument) + var defined = __webpack_require__(142); + module.exports = function (it) { + return Object(defined(it)); + }; + + /***/ + }, + /* 71 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = routerWarning; + /* unused harmony export _resetWarned */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(47); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_warning__, + ); + + var warned = {}; + + function routerWarning(falseToWarn, message) { + // Only issue deprecation warnings once. + if (message.indexOf('deprecated') !== -1) { + if (warned[message]) { + return; + } + + warned[message] = true; + } + + message = '[react-router] ' + message; + + for ( + var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; + _key < _len; + _key++ + ) { + args[_key - 2] = arguments[_key]; + } + + __WEBPACK_IMPORTED_MODULE_0_warning___default.a.apply(undefined, [falseToWarn, message].concat(args)); + } + + function _resetWarned() { + warned = {}; + } + + /***/ + }, + /* 72 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* unused harmony export compilePattern */ + /* harmony export (immutable) */ __webpack_exports__['c'] = matchPattern; + /* harmony export (immutable) */ __webpack_exports__['b'] = getParamNames; + /* unused harmony export getParams */ + /* harmony export (immutable) */ __webpack_exports__['a'] = formatPattern; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant__ = __webpack_require__(14); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_invariant__, + ); + + function escapeRegExp(string) { + return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); + } + + function _compilePattern(pattern) { + var regexpSource = ''; + var paramNames = []; + var tokens = []; + + var match = void 0, + lastIndex = 0, + matcher = /:([a-zA-Z_$][a-zA-Z0-9_$]*)|\*\*|\*|\(|\)|\\\(|\\\)/g; + while ((match = matcher.exec(pattern))) { + if (match.index !== lastIndex) { + tokens.push(pattern.slice(lastIndex, match.index)); + regexpSource += escapeRegExp(pattern.slice(lastIndex, match.index)); + } + + if (match[1]) { + regexpSource += '([^/]+)'; + paramNames.push(match[1]); + } else if (match[0] === '**') { + regexpSource += '(.*)'; + paramNames.push('splat'); + } else if (match[0] === '*') { + regexpSource += '(.*?)'; + paramNames.push('splat'); + } else if (match[0] === '(') { + regexpSource += '(?:'; + } else if (match[0] === ')') { + regexpSource += ')?'; + } else if (match[0] === '\\(') { + regexpSource += '\\('; + } else if (match[0] === '\\)') { + regexpSource += '\\)'; + } + + tokens.push(match[0]); + + lastIndex = matcher.lastIndex; + } + + if (lastIndex !== pattern.length) { + tokens.push(pattern.slice(lastIndex, pattern.length)); + regexpSource += escapeRegExp(pattern.slice(lastIndex, pattern.length)); + } + + return { + pattern: pattern, + regexpSource: regexpSource, + paramNames: paramNames, + tokens: tokens, + }; + } + + var CompiledPatternsCache = Object.create(null); + + function compilePattern(pattern) { + if (!CompiledPatternsCache[pattern]) CompiledPatternsCache[pattern] = _compilePattern(pattern); + + return CompiledPatternsCache[pattern]; + } + + /** + * Attempts to match a pattern on the given pathname. Patterns may use + * the following special characters: + * + * - :paramName Matches a URL segment up to the next /, ?, or #. The + * captured string is considered a "param" + * - () Wraps a segment of the URL that is optional + * - * Consumes (non-greedy) all characters up to the next + * character in the pattern, or to the end of the URL if + * there is none + * - ** Consumes (greedy) all characters up to the next character + * in the pattern, or to the end of the URL if there is none + * + * The function calls callback(error, matched) when finished. + * The return value is an object with the following properties: + * + * - remainingPathname + * - paramNames + * - paramValues + */ + function matchPattern(pattern, pathname) { + // Ensure pattern starts with leading slash for consistency with pathname. + if (pattern.charAt(0) !== '/') { + pattern = '/' + pattern; + } + + var _compilePattern2 = compilePattern(pattern), + regexpSource = _compilePattern2.regexpSource, + paramNames = _compilePattern2.paramNames, + tokens = _compilePattern2.tokens; + + if (pattern.charAt(pattern.length - 1) !== '/') { + regexpSource += '/?'; // Allow optional path separator at end. + } + + // Special-case patterns like '*' for catch-all routes. + if (tokens[tokens.length - 1] === '*') { + regexpSource += '$'; + } + + var match = pathname.match(new RegExp('^' + regexpSource, 'i')); + if (match == null) { + return null; + } + + var matchedPath = match[0]; + var remainingPathname = pathname.substr(matchedPath.length); + + if (remainingPathname) { + // Require that the match ends at a path separator, if we didn't match + // the full path, so any remaining pathname is a new path segment. + if (matchedPath.charAt(matchedPath.length - 1) !== '/') { + return null; + } + + // If there is a remaining pathname, treat the path separator as part of + // the remaining pathname for properly continuing the match. + remainingPathname = '/' + remainingPathname; + } + + return { + remainingPathname: remainingPathname, + paramNames: paramNames, + paramValues: match.slice(1).map(function (v) { + return v && decodeURIComponent(v); + }), + }; + } + + function getParamNames(pattern) { + return compilePattern(pattern).paramNames; + } + + function getParams(pattern, pathname) { + var match = matchPattern(pattern, pathname); + if (!match) { + return null; + } + + var paramNames = match.paramNames, + paramValues = match.paramValues; + + var params = {}; + + paramNames.forEach(function (paramName, index) { + params[paramName] = paramValues[index]; + }); + + return params; + } + + /** + * Returns a version of the given pattern with params interpolated. Throws + * if there is a dynamic segment of the pattern for which there is no param. + */ + function formatPattern(pattern, params) { + params = params || {}; + + var _compilePattern3 = compilePattern(pattern), + tokens = _compilePattern3.tokens; + + var parenCount = 0, + pathname = '', + splatIndex = 0, + parenHistory = []; + + var token = void 0, + paramName = void 0, + paramValue = void 0; + for (var i = 0, len = tokens.length; i < len; ++i) { + token = tokens[i]; + + if (token === '*' || token === '**') { + paramValue = Array.isArray(params.splat) ? params.splat[splatIndex++] : params.splat; + + !(paramValue != null || parenCount > 0) + ? true + ? __WEBPACK_IMPORTED_MODULE_0_invariant___default()( + false, + 'Missing splat #%s for path "%s"', + splatIndex, + pattern, + ) + : invariant(false) + : void 0; + + if (paramValue != null) pathname += encodeURI(paramValue); + } else if (token === '(') { + parenHistory[parenCount] = ''; + parenCount += 1; + } else if (token === ')') { + var parenText = parenHistory.pop(); + parenCount -= 1; + + if (parenCount) parenHistory[parenCount - 1] += parenText; + else pathname += parenText; + } else if (token === '\\(') { + pathname += '('; + } else if (token === '\\)') { + pathname += ')'; + } else if (token.charAt(0) === ':') { + paramName = token.substring(1); + paramValue = params[paramName]; + + !(paramValue != null || parenCount > 0) + ? true + ? __WEBPACK_IMPORTED_MODULE_0_invariant___default()( + false, + 'Missing "%s" parameter for path "%s"', + paramName, + pattern, + ) + : invariant(false) + : void 0; + + if (paramValue == null) { + if (parenCount) { + parenHistory[parenCount - 1] = ''; + + var curTokenIdx = tokens.indexOf(token); + var tokensSubset = tokens.slice(curTokenIdx, tokens.length); + var nextParenIdx = -1; + + for (var _i = 0; _i < tokensSubset.length; _i++) { + if (tokensSubset[_i] == ')') { + nextParenIdx = _i; + break; + } + } + + !(nextParenIdx > 0) + ? true + ? __WEBPACK_IMPORTED_MODULE_0_invariant___default()( + false, + 'Path "%s" is missing end paren at segment "%s"', + pattern, + tokensSubset.join(''), + ) + : invariant(false) + : void 0; + + // jump to ending paren + i = curTokenIdx + nextParenIdx - 1; + } + } else if (parenCount) parenHistory[parenCount - 1] += encodeURIComponent(paramValue); + else pathname += encodeURIComponent(paramValue); + } else { + if (parenCount) parenHistory[parenCount - 1] += token; + else pathname += token; + } + } + + !(parenCount <= 0) + ? true + ? __WEBPACK_IMPORTED_MODULE_0_invariant___default()( + false, + 'Path "%s" is missing end paren', + pattern, + ) + : invariant(false) + : void 0; + + return pathname.replace(/\/+/g, '/'); + } + + /***/ + }, + /* 73 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + exports.locationsAreEqual = + exports.statesAreEqual = + exports.createLocation = + exports.createQuery = + undefined; + + var _typeof = + typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' + ? function (obj) { + return typeof obj; + } + : function (obj) { + return obj && + typeof Symbol === 'function' && + obj.constructor === Symbol && + obj !== Symbol.prototype + ? 'symbol' + : typeof obj; + }; + + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + var _invariant = __webpack_require__(14); + + var _invariant2 = _interopRequireDefault(_invariant); + + var _warning = __webpack_require__(47); + + var _warning2 = _interopRequireDefault(_warning); + + var _PathUtils = __webpack_require__(49); + + var _Actions = __webpack_require__(111); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + var createQuery = (exports.createQuery = function createQuery(props) { + return _extends(Object.create(null), props); + }); + + var createLocation = (exports.createLocation = function createLocation() { + var input = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '/'; + var action = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _Actions.POP; + var key = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null; + + var object = typeof input === 'string' ? (0, _PathUtils.parsePath)(input) : input; + + true + ? (0, _warning2.default)( + !object.path, + 'Location descriptor objects should have a `pathname`, not a `path`.', + ) + : void 0; + + var pathname = object.pathname || '/'; + var search = object.search || ''; + var hash = object.hash || ''; + var state = object.state; + + return { + pathname: pathname, + search: search, + hash: hash, + state: state, + action: action, + key: key, + }; + }); + + var isDate = function isDate(object) { + return Object.prototype.toString.call(object) === '[object Date]'; + }; + + var statesAreEqual = (exports.statesAreEqual = function statesAreEqual(a, b) { + if (a === b) return true; + + var typeofA = typeof a === 'undefined' ? 'undefined' : _typeof(a); + var typeofB = typeof b === 'undefined' ? 'undefined' : _typeof(b); + + if (typeofA !== typeofB) return false; + + !(typeofA !== 'function') + ? true + ? (0, _invariant2.default)(false, 'You must not store functions in location state') + : (0, _invariant2.default)(false) + : void 0; + + // Not the same object, but same type. + if (typeofA === 'object') { + !!(isDate(a) && isDate(b)) + ? true + ? (0, _invariant2.default)(false, 'You must not store Date objects in location state') + : (0, _invariant2.default)(false) + : void 0; + + if (!Array.isArray(a)) { + var keysofA = Object.keys(a); + var keysofB = Object.keys(b); + return ( + keysofA.length === keysofB.length && + keysofA.every(function (key) { + return statesAreEqual(a[key], b[key]); + }) + ); + } + + return ( + Array.isArray(b) && + a.length === b.length && + a.every(function (item, index) { + return statesAreEqual(item, b[index]); + }) + ); + } + + // All other serializable types (string, number, boolean) + // should be strict equal. + return false; + }); + + var locationsAreEqual = (exports.locationsAreEqual = function locationsAreEqual(a, b) { + return ( + a.key === b.key && + // a.action === b.action && // Different action !== location change. + a.pathname === b.pathname && + a.search === b.search && + a.hash === b.hash && + statesAreEqual(a.state, b.state) + ); + }); + + /***/ + }, + /* 74 */ + /***/ function (module, exports, __webpack_require__) { + var core = __webpack_require__(23); + var global = __webpack_require__(3); + var SHARED = '__core-js_shared__'; + var store = global[SHARED] || (global[SHARED] = {}); + + (module.exports = function (key, value) { + return store[key] || (store[key] = value !== undefined ? value : {}); + })('versions', []).push({ + version: core.version, + mode: __webpack_require__(42) ? 'pure' : 'global', + copyright: '© 2019 Denis Pushkarev (zloirock.ru)', + }); + + /***/ + }, + /* 75 */ + /***/ function (module, exports, __webpack_require__) { + // fallback for non-array-like ES3 and non-enumerable old V8 strings + var cof = __webpack_require__(25); + // eslint-disable-next-line no-prototype-builtins + module.exports = Object('z').propertyIsEnumerable(0) + ? Object + : function (it) { + return cof(it) == 'String' ? it.split('') : Object(it); + }; + + /***/ + }, + /* 76 */ + /***/ function (module, exports) { + exports.f = {}.propertyIsEnumerable; + + /***/ + }, + /* 77 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // 21.2.5.3 get RegExp.prototype.flags + var anObject = __webpack_require__(2); + module.exports = function () { + var that = anObject(this); + var result = ''; + if (that.global) result += 'g'; + if (that.ignoreCase) result += 'i'; + if (that.multiline) result += 'm'; + if (that.unicode) result += 'u'; + if (that.sticky) result += 'y'; + return result; + }; + + /***/ + }, + /* 78 */ + /***/ function (module, exports, __webpack_require__) { + // 7.3.20 SpeciesConstructor(O, defaultConstructor) + var anObject = __webpack_require__(2); + var aFunction = __webpack_require__(12); + var SPECIES = __webpack_require__(6)('species'); + module.exports = function (O, D) { + var C = anObject(O).constructor; + var S; + return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S); + }; + + /***/ + }, + /* 79 */ + /***/ function (module, exports) { + module.exports = function (bitmap, value) { + return { + enumerable: !(bitmap & 1), + configurable: !(bitmap & 2), + writable: !(bitmap & 4), + value: value, + }; + }; + + /***/ + }, + /* 80 */ + /***/ function (module, exports) { + module.exports = {}; + + /***/ + }, + /* 81 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.14 / 15.2.3.14 Object.keys(O) + var $keys = __webpack_require__(217); + var enumBugKeys = __webpack_require__(151); + + module.exports = + Object.keys || + function keys(O) { + return $keys(O, enumBugKeys); + }; + + /***/ + }, + /* 82 */ + /***/ function (module, exports, __webpack_require__) { + var META = __webpack_require__(104)('meta'); + var isObject = __webpack_require__(35); + var has = __webpack_require__(45); + var setDesc = __webpack_require__(30).f; + var id = 0; + var isExtensible = + Object.isExtensible || + function () { + return true; + }; + var FREEZE = !__webpack_require__(62)(function () { + return isExtensible(Object.preventExtensions({})); + }); + var setMeta = function (it) { + setDesc(it, META, { + value: { + i: 'O' + ++id, // object ID + w: {}, // weak collections IDs + }, + }); + }; + var fastKey = function (it, create) { + // return primitive with prefix + if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; + if (!has(it, META)) { + // can't set metadata to uncaught frozen object + if (!isExtensible(it)) return 'F'; + // not necessary to add metadata + if (!create) return 'E'; + // add missing metadata + setMeta(it); + // return object ID + } + return it[META].i; + }; + var getWeak = function (it, create) { + if (!has(it, META)) { + // can't set metadata to uncaught frozen object + if (!isExtensible(it)) return true; + // not necessary to add metadata + if (!create) return false; + // add missing metadata + setMeta(it); + // return hash weak collections IDs + } + return it[META].w; + }; + // add metadata on freeze-family methods calling + var onFreeze = function (it) { + if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it); + return it; + }; + var meta = (module.exports = { + KEY: META, + NEED: false, + fastKey: fastKey, + getWeak: getWeak, + onFreeze: onFreeze, + }); + + /***/ + }, + /* 83 */ + /***/ function (module, exports, __webpack_require__) { + var ctx = __webpack_require__(69); + var call = __webpack_require__(222); + var isArrayIter = __webpack_require__(223); + var anObject = __webpack_require__(63); + var toLength = __webpack_require__(103); + var getIterFn = __webpack_require__(224); + var BREAK = {}; + var RETURN = {}; + var exports = (module.exports = function (iterable, entries, fn, that, ITERATOR) { + var iterFn = ITERATOR + ? function () { + return iterable; + } + : getIterFn(iterable); + var f = ctx(fn, that, entries ? 2 : 1); + var index = 0; + var length, step, iterator, result; + if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!'); + // fast case for arrays with default iterator + if (isArrayIter(iterFn)) + for (length = toLength(iterable.length); length > index; index++) { + result = entries ? f(anObject((step = iterable[index]))[0], step[1]) : f(iterable[index]); + if (result === BREAK || result === RETURN) return result; + } + else + for (iterator = iterFn.call(iterable); !(step = iterator.next()).done; ) { + result = call(iterator, f, step.value, entries); + if (result === BREAK || result === RETURN) return result; + } + }); + exports.BREAK = BREAK; + exports.RETURN = RETURN; + + /***/ + }, + /* 84 */ + /***/ function (module, exports, __webpack_require__) { + var isObject = __webpack_require__(35); + module.exports = function (it, TYPE) { + if (!isObject(it) || it._t !== TYPE) throw TypeError('Incompatible receiver, ' + TYPE + ' required!'); + return it; + }; + + /***/ + }, + /* 85 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Router__ = __webpack_require__(587); + /* unused harmony reexport Router */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Link__ = __webpack_require__(257); + /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, 'a', function () { + return __WEBPACK_IMPORTED_MODULE_1__Link__['a']; + }); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__IndexLink__ = __webpack_require__(594); + /* unused harmony reexport IndexLink */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__withRouter__ = __webpack_require__(595); + /* unused harmony reexport withRouter */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__IndexRedirect__ = __webpack_require__(597); + /* unused harmony reexport IndexRedirect */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__IndexRoute__ = __webpack_require__(598); + /* unused harmony reexport IndexRoute */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__Redirect__ = __webpack_require__(258); + /* unused harmony reexport Redirect */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__Route__ = __webpack_require__(599); + /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, 'b', function () { + return __WEBPACK_IMPORTED_MODULE_7__Route__['a']; + }); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__RouteUtils__ = __webpack_require__(48); + /* unused harmony reexport createRoutes */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__RouterContext__ = __webpack_require__(168); + /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, 'c', function () { + return __WEBPACK_IMPORTED_MODULE_9__RouterContext__['a']; + }); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__PropTypes__ = __webpack_require__(170); + /* unused harmony reexport locationShape */ + /* unused harmony reexport routerShape */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__match__ = __webpack_require__(600); + /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, 'd', function () { + return __WEBPACK_IMPORTED_MODULE_11__match__['a']; + }); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__useRouterHistory__ = __webpack_require__(262); + /* unused harmony reexport useRouterHistory */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__PatternUtils__ = __webpack_require__(72); + /* unused harmony reexport formatPattern */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__applyRouterMiddleware__ = + __webpack_require__(605); + /* unused harmony reexport applyRouterMiddleware */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__browserHistory__ = __webpack_require__(606); + /* unused harmony reexport browserHistory */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__hashHistory__ = __webpack_require__(609); + /* unused harmony reexport hashHistory */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__createMemoryHistory__ = __webpack_require__(259); + /* unused harmony reexport createMemoryHistory */ + /* components */ + + /* components (configuration) */ + + /* utils */ + + /* histories */ + + /***/ + }, + /* 86 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['c'] = falsy; + /* unused harmony export history */ + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'a', function () { + return component; + }); + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'b', function () { + return components; + }); + /* unused harmony export route */ + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'd', function () { + return routes; + }); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(10); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + + function falsy(props, propName, componentName) { + if (props[propName]) + return new Error('<' + componentName + '> should not have a "' + propName + '" prop'); + } + + var history = Object(__WEBPACK_IMPORTED_MODULE_0_prop_types__['shape'])({ + listen: __WEBPACK_IMPORTED_MODULE_0_prop_types__['func'].isRequired, + push: __WEBPACK_IMPORTED_MODULE_0_prop_types__['func'].isRequired, + replace: __WEBPACK_IMPORTED_MODULE_0_prop_types__['func'].isRequired, + go: __WEBPACK_IMPORTED_MODULE_0_prop_types__['func'].isRequired, + goBack: __WEBPACK_IMPORTED_MODULE_0_prop_types__['func'].isRequired, + goForward: __WEBPACK_IMPORTED_MODULE_0_prop_types__['func'].isRequired, + }); + + var component = Object(__WEBPACK_IMPORTED_MODULE_0_prop_types__['oneOfType'])([ + __WEBPACK_IMPORTED_MODULE_0_prop_types__['func'], + __WEBPACK_IMPORTED_MODULE_0_prop_types__['string'], + ]); + var components = Object(__WEBPACK_IMPORTED_MODULE_0_prop_types__['oneOfType'])([ + component, + __WEBPACK_IMPORTED_MODULE_0_prop_types__['object'], + ]); + var route = Object(__WEBPACK_IMPORTED_MODULE_0_prop_types__['oneOfType'])([ + __WEBPACK_IMPORTED_MODULE_0_prop_types__['object'], + __WEBPACK_IMPORTED_MODULE_0_prop_types__['element'], + ]); + var routes = Object(__WEBPACK_IMPORTED_MODULE_0_prop_types__['oneOfType'])([ + route, + Object(__WEBPACK_IMPORTED_MODULE_0_prop_types__['arrayOf'])(route), + ]); + + /***/ + }, + /* 87 */ + /***/ function (module, exports, __webpack_require__) { + // false -> Array#indexOf + // true -> Array#includes + var toIObject = __webpack_require__(19); + var toLength = __webpack_require__(7); + var toAbsoluteIndex = __webpack_require__(53); + module.exports = function (IS_INCLUDES) { + return function ($this, el, fromIndex) { + var O = toIObject($this); + var length = toLength(O.length); + var index = toAbsoluteIndex(fromIndex, length); + var value; + // Array#includes uses SameValueZero equality algorithm + // eslint-disable-next-line no-self-compare + if (IS_INCLUDES && el != el) + while (length > index) { + value = O[index++]; + // eslint-disable-next-line no-self-compare + if (value != value) return true; + // Array#indexOf ignores holes, Array#includes - not + } + else + for (; length > index; index++) + if (IS_INCLUDES || index in O) { + if (O[index] === el) return IS_INCLUDES || index || 0; + } + return !IS_INCLUDES && -1; + }; + }; + + /***/ + }, + /* 88 */ + /***/ function (module, exports) { + exports.f = Object.getOwnPropertySymbols; + + /***/ + }, + /* 89 */ + /***/ function (module, exports, __webpack_require__) { + // 7.2.2 IsArray(argument) + var cof = __webpack_require__(25); + module.exports = + Array.isArray || + function isArray(arg) { + return cof(arg) == 'Array'; + }; + + /***/ + }, + /* 90 */ + /***/ function (module, exports, __webpack_require__) { + var toInteger = __webpack_require__(26); + var defined = __webpack_require__(32); + // true -> String#at + // false -> String#codePointAt + module.exports = function (TO_STRING) { + return function (that, pos) { + var s = String(defined(that)); + var i = toInteger(pos); + var l = s.length; + var a, b; + if (i < 0 || i >= l) return TO_STRING ? '' : undefined; + a = s.charCodeAt(i); + return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff + ? TO_STRING + ? s.charAt(i) + : a + : TO_STRING + ? s.slice(i, i + 2) + : ((a - 0xd800) << 10) + (b - 0xdc00) + 0x10000; + }; + }; + + /***/ + }, + /* 91 */ + /***/ function (module, exports, __webpack_require__) { + // 7.2.8 IsRegExp(argument) + var isObject = __webpack_require__(5); + var cof = __webpack_require__(25); + var MATCH = __webpack_require__(6)('match'); + module.exports = function (it) { + var isRegExp; + return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp'); + }; + + /***/ + }, + /* 92 */ + /***/ function (module, exports, __webpack_require__) { + var ITERATOR = __webpack_require__(6)('iterator'); + var SAFE_CLOSING = false; + + try { + var riter = [7][ITERATOR](); + riter['return'] = function () { + SAFE_CLOSING = true; + }; + // eslint-disable-next-line no-throw-literal + Array.from(riter, function () { + throw 2; + }); + } catch (e) { + /* empty */ + } + + module.exports = function (exec, skipClosing) { + if (!skipClosing && !SAFE_CLOSING) return false; + var safe = false; + try { + var arr = [7]; + var iter = arr[ITERATOR](); + iter.next = function () { + return { done: (safe = true) }; + }; + arr[ITERATOR] = function () { + return iter; + }; + exec(arr); + } catch (e) { + /* empty */ + } + return safe; + }; + + /***/ + }, + /* 93 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var classof = __webpack_require__(66); + var builtinExec = RegExp.prototype.exec; + + // `RegExpExec` abstract operation + // https://tc39.github.io/ecma262/#sec-regexpexec + module.exports = function (R, S) { + var exec = R.exec; + if (typeof exec === 'function') { + var result = exec.call(R, S); + if (typeof result !== 'object') { + throw new TypeError('RegExp exec method returned something other than an Object or null'); + } + return result; + } + if (classof(R) !== 'RegExp') { + throw new TypeError('RegExp#exec called on incompatible receiver'); + } + return builtinExec.call(R, S); + }; + + /***/ + }, + /* 94 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + __webpack_require__(194); + var redefine = __webpack_require__(16); + var hide = __webpack_require__(15); + var fails = __webpack_require__(4); + var defined = __webpack_require__(32); + var wks = __webpack_require__(6); + var regexpExec = __webpack_require__(134); + + var SPECIES = wks('species'); + + var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () { + // #replace needs built-in support for named groups. + // #match works fine because it just return the exec results, even if it has + // a "grops" property. + var re = /./; + re.exec = function () { + var result = []; + result.groups = { a: '7' }; + return result; + }; + return ''.replace(re, '$<a>') !== '7'; + }); + + var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = (function () { + // Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec + var re = /(?:)/; + var originalExec = re.exec; + re.exec = function () { + return originalExec.apply(this, arguments); + }; + var result = 'ab'.split(re); + return result.length === 2 && result[0] === 'a' && result[1] === 'b'; + })(); + + module.exports = function (KEY, length, exec) { + var SYMBOL = wks(KEY); + + var DELEGATES_TO_SYMBOL = !fails(function () { + // String methods call symbol-named RegEp methods + var O = {}; + O[SYMBOL] = function () { + return 7; + }; + return ''[KEY](O) != 7; + }); + + var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL + ? !fails(function () { + // Symbol-named RegExp methods call .exec + var execCalled = false; + var re = /a/; + re.exec = function () { + execCalled = true; + return null; + }; + if (KEY === 'split') { + // RegExp[@@split] doesn't call the regex's exec method, but first creates + // a new one. We need to return the patched regex when creating the new one. + re.constructor = {}; + re.constructor[SPECIES] = function () { + return re; + }; + } + re[SYMBOL](''); + return !execCalled; + }) + : undefined; + + if ( + !DELEGATES_TO_SYMBOL || + !DELEGATES_TO_EXEC || + (KEY === 'replace' && !REPLACE_SUPPORTS_NAMED_GROUPS) || + (KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC) + ) { + var nativeRegExpMethod = /./[SYMBOL]; + var fns = exec( + defined, + SYMBOL, + ''[KEY], + function maybeCallNative(nativeMethod, regexp, str, arg2, forceStringMethod) { + if (regexp.exec === regexpExec) { + if (DELEGATES_TO_SYMBOL && !forceStringMethod) { + // The native String method already delegates to @@method (this + // polyfilled function), leasing to infinite recursion. + // We avoid it by directly calling the native @@method method. + return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) }; + } + return { done: true, value: nativeMethod.call(str, regexp, arg2) }; + } + return { done: false }; + }, + ); + var strfn = fns[0]; + var rxfn = fns[1]; + + redefine(String.prototype, KEY, strfn); + hide( + RegExp.prototype, + SYMBOL, + length == 2 + ? // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue) + // 21.2.5.11 RegExp.prototype[@@split](string, limit) + function (string, arg) { + return rxfn.call(string, this, arg); + } + : // 21.2.5.6 RegExp.prototype[@@match](string) + // 21.2.5.9 RegExp.prototype[@@search](string) + function (string) { + return rxfn.call(string, this); + }, + ); + } + }; + + /***/ + }, + /* 95 */ + /***/ function (module, exports, __webpack_require__) { + var global = __webpack_require__(3); + var navigator = global.navigator; + + module.exports = (navigator && navigator.userAgent) || ''; + + /***/ + }, + /* 96 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var global = __webpack_require__(3); + var $export = __webpack_require__(0); + var redefine = __webpack_require__(16); + var redefineAll = __webpack_require__(59); + var meta = __webpack_require__(43); + var forOf = __webpack_require__(58); + var anInstance = __webpack_require__(57); + var isObject = __webpack_require__(5); + var fails = __webpack_require__(4); + var $iterDetect = __webpack_require__(92); + var setToStringTag = __webpack_require__(65); + var inheritIfRequired = __webpack_require__(120); + + module.exports = function (NAME, wrapper, methods, common, IS_MAP, IS_WEAK) { + var Base = global[NAME]; + var C = Base; + var ADDER = IS_MAP ? 'set' : 'add'; + var proto = C && C.prototype; + var O = {}; + var fixMethod = function (KEY) { + var fn = proto[KEY]; + redefine( + proto, + KEY, + KEY == 'delete' + ? function (a) { + return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a); + } + : KEY == 'has' + ? function has(a) { + return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a); + } + : KEY == 'get' + ? function get(a) { + return IS_WEAK && !isObject(a) ? undefined : fn.call(this, a === 0 ? 0 : a); + } + : KEY == 'add' + ? function add(a) { + fn.call(this, a === 0 ? 0 : a); + return this; + } + : function set(a, b) { + fn.call(this, a === 0 ? 0 : a, b); + return this; + }, + ); + }; + if ( + typeof C != 'function' || + !( + IS_WEAK || + (proto.forEach && + !fails(function () { + new C().entries().next(); + })) + ) + ) { + // create collection constructor + C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER); + redefineAll(C.prototype, methods); + meta.NEED = true; + } else { + var instance = new C(); + // early implementations not supports chaining + var HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance; + // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false + var THROWS_ON_PRIMITIVES = fails(function () { + instance.has(1); + }); + // most early implementations doesn't supports iterables, most modern - not close it correctly + var ACCEPT_ITERABLES = $iterDetect(function (iter) { + new C(iter); + }); // eslint-disable-line no-new + // for early implementations -0 and +0 not the same + var BUGGY_ZERO = + !IS_WEAK && + fails(function () { + // V8 ~ Chromium 42- fails only with 5+ elements + var $instance = new C(); + var index = 5; + while (index--) $instance[ADDER](index, index); + return !$instance.has(-0); + }); + if (!ACCEPT_ITERABLES) { + C = wrapper(function (target, iterable) { + anInstance(target, C, NAME); + var that = inheritIfRequired(new Base(), target, C); + if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that); + return that; + }); + C.prototype = proto; + proto.constructor = C; + } + if (THROWS_ON_PRIMITIVES || BUGGY_ZERO) { + fixMethod('delete'); + fixMethod('has'); + IS_MAP && fixMethod('get'); + } + if (BUGGY_ZERO || HASNT_CHAINING) fixMethod(ADDER); + // weak collections should not contains .clear method + if (IS_WEAK && proto.clear) delete proto.clear; + } + + setToStringTag(C, NAME); + + O[NAME] = C; + $export($export.G + $export.W + $export.F * (C != Base), O); + + if (!IS_WEAK) common.setStrong(C, NAME, IS_MAP); + + return C; + }; + + /***/ + }, + /* 97 */ + /***/ function (module, exports, __webpack_require__) { + var global = __webpack_require__(3); + var hide = __webpack_require__(15); + var uid = __webpack_require__(51); + var TYPED = uid('typed_array'); + var VIEW = uid('view'); + var ABV = !!(global.ArrayBuffer && global.DataView); + var CONSTR = ABV; + var i = 0; + var l = 9; + var Typed; + + var TypedArrayConstructors = + 'Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array'.split( + ',', + ); + + while (i < l) { + if ((Typed = global[TypedArrayConstructors[i++]])) { + hide(Typed.prototype, TYPED, true); + hide(Typed.prototype, VIEW, true); + } else CONSTR = false; + } + + module.exports = { + ABV: ABV, + CONSTR: CONSTR, + TYPED: TYPED, + VIEW: VIEW, + }; + + /***/ + }, + /* 98 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // Forced replacement prototype accessors methods + module.exports = + __webpack_require__(42) || + !__webpack_require__(4)(function () { + var K = Math.random(); + // In FF throws only define methods + // eslint-disable-next-line no-undef, no-useless-call + __defineSetter__.call(null, K, function () { + /* empty */ + }); + delete __webpack_require__(3)[K]; + }); + + /***/ + }, + /* 99 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // https://tc39.github.io/proposal-setmap-offrom/ + var $export = __webpack_require__(0); + + module.exports = function (COLLECTION) { + $export($export.S, COLLECTION, { + of: function of() { + var length = arguments.length; + var A = new Array(length); + while (length--) A[length] = arguments[length]; + return new this(A); + }, + }); + }; + + /***/ + }, + /* 100 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // https://tc39.github.io/proposal-setmap-offrom/ + var $export = __webpack_require__(0); + var aFunction = __webpack_require__(12); + var ctx = __webpack_require__(24); + var forOf = __webpack_require__(58); + + module.exports = function (COLLECTION) { + $export($export.S, COLLECTION, { + from: function from(source /* , mapFn, thisArg */) { + var mapFn = arguments[1]; + var mapping, A, n, cb; + aFunction(this); + mapping = mapFn !== undefined; + if (mapping) aFunction(mapFn); + if (source == undefined) return new this(); + A = []; + if (mapping) { + n = 0; + cb = ctx(mapFn, arguments[2], 2); + forOf(source, false, function (nextItem) { + A.push(cb(nextItem, n++)); + }); + } else { + forOf(source, false, A.push, A); + } + return new this(A); + }, + }); + }; + + /***/ + }, + /* 101 */ + /***/ function (module, exports) { + exports.f = {}.propertyIsEnumerable; + + /***/ + }, + /* 102 */ + /***/ function (module, exports) { + module.exports = true; + + /***/ + }, + /* 103 */ + /***/ function (module, exports, __webpack_require__) { + // 7.1.15 ToLength + var toInteger = __webpack_require__(145); + var min = Math.min; + module.exports = function (it) { + return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 + }; + + /***/ + }, + /* 104 */ + /***/ function (module, exports) { + var id = 0; + var px = Math.random(); + module.exports = function (key) { + return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); + }; + + /***/ + }, + /* 105 */ + /***/ function (module, exports, __webpack_require__) { + var def = __webpack_require__(30).f; + var has = __webpack_require__(45); + var TAG = __webpack_require__(22)('toStringTag'); + + module.exports = function (it, tag, stat) { + if (it && !has((it = stat ? it : it.prototype), TAG)) + def(it, TAG, { configurable: true, value: tag }); + }; + + /***/ + }, + /* 106 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = __webpack_require__(508); + + /***/ + }, + /* 107 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + + var printWarning = function () {}; + + if (true) { + var ReactPropTypesSecret = __webpack_require__(231); + var loggedTypeFailures = {}; + var has = Function.call.bind(Object.prototype.hasOwnProperty); + + printWarning = function (text) { + var message = 'Warning: ' + text; + if (typeof console !== 'undefined') { + console.error(message); + } + try { + // --- Welcome to debugging React --- + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + throw new Error(message); + } catch (x) {} + }; + } + + /** + * Assert that the values match with the type specs. + * Error messages are memorized and will only be shown once. + * + * @param {object} typeSpecs Map of name to a ReactPropType + * @param {object} values Runtime values that need to be type-checked + * @param {string} location e.g. "prop", "context", "child context" + * @param {string} componentName Name of the component for error messages. + * @param {?Function} getStack Returns the component stack. + * @private + */ + function checkPropTypes(typeSpecs, values, location, componentName, getStack) { + if (true) { + for (var typeSpecName in typeSpecs) { + if (has(typeSpecs, typeSpecName)) { + var error; + // Prop type validation may throw. In case they do, we don't want to + // fail the render phase where it didn't fail before. So we log it. + // After these have been cleaned up, we'll let them throw. + try { + // This is intentionally an invariant that gets caught. It's the same + // behavior as without this statement except with a better message. + if (typeof typeSpecs[typeSpecName] !== 'function') { + var err = Error( + (componentName || 'React class') + + ': ' + + location + + ' type `' + + typeSpecName + + '` is invalid; ' + + 'it must be a function, usually from the `prop-types` package, but received `' + + typeof typeSpecs[typeSpecName] + + '`.', + ); + err.name = 'Invariant Violation'; + throw err; + } + error = typeSpecs[typeSpecName]( + values, + typeSpecName, + componentName, + location, + null, + ReactPropTypesSecret, + ); + } catch (ex) { + error = ex; + } + if (error && !(error instanceof Error)) { + printWarning( + (componentName || 'React class') + + ': type specification of ' + + location + + ' `' + + typeSpecName + + '` is invalid; the type checker ' + + 'function must return `null` or an `Error` but returned a ' + + typeof error + + '. ' + + 'You may have forgotten to pass an argument to the type checker ' + + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + + 'shape all require an argument).', + ); + } + if (error instanceof Error && !(error.message in loggedTypeFailures)) { + // Only monitor this failure once because there tends to be a lot of the + // same error. + loggedTypeFailures[error.message] = true; + + var stack = getStack ? getStack() : ''; + + printWarning('Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')); + } + } + } + } + } + + /** + * Resets warning cache when testing. + * + * @private + */ + checkPropTypes.resetWarningCache = function () { + if (true) { + loggedTypeFailures = {}; + } + }; + + module.exports = checkPropTypes; + + /***/ + }, + /* 108 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + if (false) { + module.exports = require('./cjs/react-dom-server.browser.production.min.js'); + } else { + module.exports = __webpack_require__(518); + } + + /***/ + }, + /* 109 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + if (false) { + module.exports = require('./cjs/react-is.production.min.js'); + } else { + module.exports = __webpack_require__(540); + } + + /***/ + }, + /* 110 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createStore__ = __webpack_require__(240); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__combineReducers__ = __webpack_require__(565); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__bindActionCreators__ = __webpack_require__(566); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__applyMiddleware__ = __webpack_require__(567); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__compose__ = __webpack_require__(244); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__utils_warning__ = __webpack_require__(243); + /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, 'd', function () { + return __WEBPACK_IMPORTED_MODULE_0__createStore__['b']; + }); + /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, 'c', function () { + return __WEBPACK_IMPORTED_MODULE_1__combineReducers__['a']; + }); + /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, 'b', function () { + return __WEBPACK_IMPORTED_MODULE_2__bindActionCreators__['a']; + }); + /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, 'a', function () { + return __WEBPACK_IMPORTED_MODULE_3__applyMiddleware__['a']; + }); + /* unused harmony reexport compose */ + + /* + * This is a dummy function to check if the function name has been altered by minification. + * If the function has been minified and NODE_ENV !== 'production', warn the user. + */ + function isCrushed() {} + + if ( + 'development' !== 'production' && + typeof isCrushed.name === 'string' && + isCrushed.name !== 'isCrushed' + ) { + Object(__WEBPACK_IMPORTED_MODULE_5__utils_warning__['a' /* default */])( + "You are currently using minified code outside of NODE_ENV === 'production'. " + + 'This means that you are running a slower development build of Redux. ' + + 'You can use loose-envify (https://github.com/zertosh/loose-envify) for browserify ' + + 'or DefinePlugin for webpack (http://stackoverflow.com/questions/30030031) ' + + 'to ensure you have the correct code for your production build.', + ); + } + + /***/ + }, + /* 111 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + /** + * Indicates that navigation was caused by a call to history.push. + */ + var PUSH = (exports.PUSH = 'PUSH'); + + /** + * Indicates that navigation was caused by a call to history.replace. + */ + var REPLACE = (exports.REPLACE = 'REPLACE'); + + /** + * Indicates that navigation was caused by some other action such + * as using a browser's back/forward buttons and/or manually manipulating + * the URL in a browser's location bar. This is the default. + * + * See https://developer.mozilla.org/en-US/docs/Web/API/WindowEventHandlers/onpopstate + * for more information. + */ + var POP = (exports.POP = 'POP'); + + /***/ + }, + /* 112 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + var addEventListener = (exports.addEventListener = function addEventListener(node, event, listener) { + return node.addEventListener + ? node.addEventListener(event, listener, false) + : node.attachEvent('on' + event, listener); + }); + + var removeEventListener = (exports.removeEventListener = function removeEventListener( + node, + event, + listener, + ) { + return node.removeEventListener + ? node.removeEventListener(event, listener, false) + : node.detachEvent('on' + event, listener); + }); + + /** + * Returns true if the HTML5 history API is supported. Taken from Modernizr. + * + * https://github.com/Modernizr/Modernizr/blob/master/LICENSE + * https://github.com/Modernizr/Modernizr/blob/master/feature-detects/history.js + * changed to avoid false negatives for Windows Phones: https://github.com/reactjs/react-router/issues/586 + */ + var supportsHistory = (exports.supportsHistory = function supportsHistory() { + var ua = window.navigator.userAgent; + + if ( + (ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && + ua.indexOf('Mobile Safari') !== -1 && + ua.indexOf('Chrome') === -1 && + ua.indexOf('Windows Phone') === -1 + ) + return false; + + return window.history && 'pushState' in window.history; + }); + + /** + * Returns false if using go(n) with hash history causes a full page reload. + */ + var supportsGoWithoutReloadUsingHash = (exports.supportsGoWithoutReloadUsingHash = + function supportsGoWithoutReloadUsingHash() { + return window.navigator.userAgent.indexOf('Firefox') === -1; + }); + + /** + * Returns true if browser fires popstate on hash change. + * IE10 and IE11 do not. + */ + var supportsPopstateOnHashchange = (exports.supportsPopstateOnHashchange = + function supportsPopstateOnHashchange() { + return window.navigator.userAgent.indexOf('Trident') === -1; + }); + + /** + * Returns true if a given popstate event is an extraneous WebKit event. + * Accounts for the fact that Chrome on iOS fires real popstate events + * containing undefined state when pressing the back button. + */ + var isExtraneousPopstateEvent = (exports.isExtraneousPopstateEvent = function isExtraneousPopstateEvent( + event, + ) { + return event.state === undefined && navigator.userAgent.indexOf('CriOS') === -1; + }); + + /***/ + }, + /* 113 */ + /***/ function (module, exports, __webpack_require__) { + var isObject = __webpack_require__(5); + var document = __webpack_require__(3).document; + // typeof document.createElement is 'object' in old IE + var is = isObject(document) && isObject(document.createElement); + module.exports = function (it) { + return is ? document.createElement(it) : {}; + }; + + /***/ + }, + /* 114 */ + /***/ function (module, exports, __webpack_require__) { + var global = __webpack_require__(3); + var core = __webpack_require__(23); + var LIBRARY = __webpack_require__(42); + var wksExt = __webpack_require__(176); + var defineProperty = __webpack_require__(9).f; + module.exports = function (name) { + var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {}); + if (name.charAt(0) != '_' && !(name in $Symbol)) + defineProperty($Symbol, name, { value: wksExt.f(name) }); + }; + + /***/ + }, + /* 115 */ + /***/ function (module, exports, __webpack_require__) { + var shared = __webpack_require__(74)('keys'); + var uid = __webpack_require__(51); + module.exports = function (key) { + return shared[key] || (shared[key] = uid(key)); + }; + + /***/ + }, + /* 116 */ + /***/ function (module, exports) { + // IE 8- don't enum bug keys + module.exports = + 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'.split( + ',', + ); + + /***/ + }, + /* 117 */ + /***/ function (module, exports, __webpack_require__) { + var document = __webpack_require__(3).document; + module.exports = document && document.documentElement; + + /***/ + }, + /* 118 */ + /***/ function (module, exports, __webpack_require__) { + // Works with __proto__ only. Old v8 can't work with null proto objects. + /* eslint-disable no-proto */ + var isObject = __webpack_require__(5); + var anObject = __webpack_require__(2); + var check = function (O, proto) { + anObject(O); + if (!isObject(proto) && proto !== null) throw TypeError(proto + ": can't set as prototype!"); + }; + module.exports = { + set: + Object.setPrototypeOf || + ('__proto__' in {} // eslint-disable-line + ? (function (test, buggy, set) { + try { + set = __webpack_require__(24)( + Function.call, + __webpack_require__(20).f(Object.prototype, '__proto__').set, + 2, + ); + set(test, []); + buggy = !(test instanceof Array); + } catch (e) { + buggy = true; + } + return function setPrototypeOf(O, proto) { + check(O, proto); + if (buggy) O.__proto__ = proto; + else set(O, proto); + return O; + }; + })({}, false) + : undefined), + check: check, + }; + + /***/ + }, + /* 119 */ + /***/ function (module, exports) { + module.exports = + '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' + + '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'; + + /***/ + }, + /* 120 */ + /***/ function (module, exports, __webpack_require__) { + var isObject = __webpack_require__(5); + var setPrototypeOf = __webpack_require__(118).set; + module.exports = function (that, target, C) { + var S = target.constructor; + var P; + if ( + S !== C && + typeof S == 'function' && + (P = S.prototype) !== C.prototype && + isObject(P) && + setPrototypeOf + ) { + setPrototypeOf(that, P); + } + return that; + }; + + /***/ + }, + /* 121 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var toInteger = __webpack_require__(26); + var defined = __webpack_require__(32); + + module.exports = function repeat(count) { + var str = String(defined(this)); + var res = ''; + var n = toInteger(count); + if (n < 0 || n == Infinity) throw RangeError("Count can't be negative"); + for (; n > 0; (n >>>= 1) && (str += str)) if (n & 1) res += str; + return res; + }; + + /***/ + }, + /* 122 */ + /***/ function (module, exports) { + // 20.2.2.28 Math.sign(x) + module.exports = + Math.sign || + function sign(x) { + // eslint-disable-next-line no-self-compare + return (x = +x) == 0 || x != x ? x : x < 0 ? -1 : 1; + }; + + /***/ + }, + /* 123 */ + /***/ function (module, exports) { + // 20.2.2.14 Math.expm1(x) + var $expm1 = Math.expm1; + module.exports = + !$expm1 || + // Old FF bug + $expm1(10) > 22025.465794806719 || + $expm1(10) < 22025.4657948067165168 || + // Tor Browser bug + $expm1(-2e-17) != -2e-17 + ? function expm1(x) { + return (x = +x) == 0 ? x : x > -1e-6 && x < 1e-6 ? x + (x * x) / 2 : Math.exp(x) - 1; + } + : $expm1; + + /***/ + }, + /* 124 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var LIBRARY = __webpack_require__(42); + var $export = __webpack_require__(0); + var redefine = __webpack_require__(16); + var hide = __webpack_require__(15); + var Iterators = __webpack_require__(68); + var $iterCreate = __webpack_require__(125); + var setToStringTag = __webpack_require__(65); + var getPrototypeOf = __webpack_require__(21); + var ITERATOR = __webpack_require__(6)('iterator'); + var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next` + var FF_ITERATOR = '@@iterator'; + var KEYS = 'keys'; + var VALUES = 'values'; + + var returnThis = function () { + return this; + }; + + module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) { + $iterCreate(Constructor, NAME, next); + var getMethod = function (kind) { + if (!BUGGY && kind in proto) return proto[kind]; + switch (kind) { + case KEYS: + return function keys() { + return new Constructor(this, kind); + }; + case VALUES: + return function values() { + return new Constructor(this, kind); + }; + } + return function entries() { + return new Constructor(this, kind); + }; + }; + var TAG = NAME + ' Iterator'; + var DEF_VALUES = DEFAULT == VALUES; + var VALUES_BUG = false; + var proto = Base.prototype; + var $native = proto[ITERATOR] || proto[FF_ITERATOR] || (DEFAULT && proto[DEFAULT]); + var $default = $native || getMethod(DEFAULT); + var $entries = DEFAULT ? (!DEF_VALUES ? $default : getMethod('entries')) : undefined; + var $anyNative = NAME == 'Array' ? proto.entries || $native : $native; + var methods, key, IteratorPrototype; + // Fix native + if ($anyNative) { + IteratorPrototype = getPrototypeOf($anyNative.call(new Base())); + if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) { + // Set @@toStringTag to native iterators + setToStringTag(IteratorPrototype, TAG, true); + // fix for some old engines + if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') + hide(IteratorPrototype, ITERATOR, returnThis); + } + } + // fix Array#{values, @@iterator}.name in V8 / FF + if (DEF_VALUES && $native && $native.name !== VALUES) { + VALUES_BUG = true; + $default = function values() { + return $native.call(this); + }; + } + // Define iterator + if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) { + hide(proto, ITERATOR, $default); + } + // Plug for library + Iterators[NAME] = $default; + Iterators[TAG] = returnThis; + if (DEFAULT) { + methods = { + values: DEF_VALUES ? $default : getMethod(VALUES), + keys: IS_SET ? $default : getMethod(KEYS), + entries: $entries, + }; + if (FORCED) + for (key in methods) { + if (!(key in proto)) redefine(proto, key, methods[key]); + } + else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); + } + return methods; + }; + + /***/ + }, + /* 125 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var create = __webpack_require__(54); + var descriptor = __webpack_require__(50); + var setToStringTag = __webpack_require__(65); + var IteratorPrototype = {}; + + // 25.1.2.1.1 %IteratorPrototype%[@@iterator]() + __webpack_require__(15)(IteratorPrototype, __webpack_require__(6)('iterator'), function () { + return this; + }); + + module.exports = function (Constructor, NAME, next) { + Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) }); + setToStringTag(Constructor, NAME + ' Iterator'); + }; + + /***/ + }, + /* 126 */ + /***/ function (module, exports, __webpack_require__) { + // helper for String#{startsWith, endsWith, includes} + var isRegExp = __webpack_require__(91); + var defined = __webpack_require__(32); + + module.exports = function (that, searchString, NAME) { + if (isRegExp(searchString)) throw TypeError('String#' + NAME + " doesn't accept regex!"); + return String(defined(that)); + }; + + /***/ + }, + /* 127 */ + /***/ function (module, exports, __webpack_require__) { + var MATCH = __webpack_require__(6)('match'); + module.exports = function (KEY) { + var re = /./; + try { + '/./'[KEY](re); + } catch (e) { + try { + re[MATCH] = false; + return !'/./'[KEY](re); + } catch (f) { + /* empty */ + } + } + return true; + }; + + /***/ + }, + /* 128 */ + /***/ function (module, exports, __webpack_require__) { + // check on default Array iterator + var Iterators = __webpack_require__(68); + var ITERATOR = __webpack_require__(6)('iterator'); + var ArrayProto = Array.prototype; + + module.exports = function (it) { + return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it); + }; + + /***/ + }, + /* 129 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $defineProperty = __webpack_require__(9); + var createDesc = __webpack_require__(50); + + module.exports = function (object, index, value) { + if (index in object) $defineProperty.f(object, index, createDesc(0, value)); + else object[index] = value; + }; + + /***/ + }, + /* 130 */ + /***/ function (module, exports, __webpack_require__) { + var classof = __webpack_require__(66); + var ITERATOR = __webpack_require__(6)('iterator'); + var Iterators = __webpack_require__(68); + module.exports = __webpack_require__(23).getIteratorMethod = function (it) { + if (it != undefined) return it[ITERATOR] || it['@@iterator'] || Iterators[classof(it)]; + }; + + /***/ + }, + /* 131 */ + /***/ function (module, exports, __webpack_require__) { + // 9.4.2.3 ArraySpeciesCreate(originalArray, length) + var speciesConstructor = __webpack_require__(361); + + module.exports = function (original, length) { + return new (speciesConstructor(original))(length); + }; + + /***/ + }, + /* 132 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + // 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length) + + var toObject = __webpack_require__(11); + var toAbsoluteIndex = __webpack_require__(53); + var toLength = __webpack_require__(7); + module.exports = function fill(value /* , start = 0, end = @length */) { + var O = toObject(this); + var length = toLength(O.length); + var aLen = arguments.length; + var index = toAbsoluteIndex(aLen > 1 ? arguments[1] : undefined, length); + var end = aLen > 2 ? arguments[2] : undefined; + var endPos = end === undefined ? length : toAbsoluteIndex(end, length); + while (endPos > index) O[index++] = value; + return O; + }; + + /***/ + }, + /* 133 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var addToUnscopables = __webpack_require__(44); + var step = __webpack_require__(193); + var Iterators = __webpack_require__(68); + var toIObject = __webpack_require__(19); + + // 22.1.3.4 Array.prototype.entries() + // 22.1.3.13 Array.prototype.keys() + // 22.1.3.29 Array.prototype.values() + // 22.1.3.30 Array.prototype[@@iterator]() + module.exports = __webpack_require__(124)( + Array, + 'Array', + function (iterated, kind) { + this._t = toIObject(iterated); // target + this._i = 0; // next index + this._k = kind; // kind + // 22.1.5.2.1 %ArrayIteratorPrototype%.next() + }, + function () { + var O = this._t; + var kind = this._k; + var index = this._i++; + if (!O || index >= O.length) { + this._t = undefined; + return step(1); + } + if (kind == 'keys') return step(0, index); + if (kind == 'values') return step(0, O[index]); + return step(0, [index, O[index]]); + }, + 'values', + ); + + // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) + Iterators.Arguments = Iterators.Array; + + addToUnscopables('keys'); + addToUnscopables('values'); + addToUnscopables('entries'); + + /***/ + }, + /* 134 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var regexpFlags = __webpack_require__(77); + + var nativeExec = RegExp.prototype.exec; + // This always refers to the native implementation, because the + // String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js, + // which loads this file before patching the method. + var nativeReplace = String.prototype.replace; + + var patchedExec = nativeExec; + + var LAST_INDEX = 'lastIndex'; + + var UPDATES_LAST_INDEX_WRONG = (function () { + var re1 = /a/, + re2 = /b*/g; + nativeExec.call(re1, 'a'); + nativeExec.call(re2, 'a'); + return re1[LAST_INDEX] !== 0 || re2[LAST_INDEX] !== 0; + })(); + + // nonparticipating capturing group, copied from es5-shim's String#split patch. + var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined; + + var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED; + + if (PATCH) { + patchedExec = function exec(str) { + var re = this; + var lastIndex, reCopy, match, i; + + if (NPCG_INCLUDED) { + reCopy = new RegExp('^' + re.source + '$(?!\\s)', regexpFlags.call(re)); + } + if (UPDATES_LAST_INDEX_WRONG) lastIndex = re[LAST_INDEX]; + + match = nativeExec.call(re, str); + + if (UPDATES_LAST_INDEX_WRONG && match) { + re[LAST_INDEX] = re.global ? match.index + match[0].length : lastIndex; + } + if (NPCG_INCLUDED && match && match.length > 1) { + // Fix browsers whose `exec` methods don't consistently return `undefined` + // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/ + // eslint-disable-next-line no-loop-func + nativeReplace.call(match[0], reCopy, function () { + for (i = 1; i < arguments.length - 2; i++) { + if (arguments[i] === undefined) match[i] = undefined; + } + }); + } + + return match; + }; + } + + module.exports = patchedExec; + + /***/ + }, + /* 135 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var at = __webpack_require__(90)(true); + + // `AdvanceStringIndex` abstract operation + // https://tc39.github.io/ecma262/#sec-advancestringindex + module.exports = function (S, index, unicode) { + return index + (unicode ? at(S, index).length : 1); + }; + + /***/ + }, + /* 136 */ + /***/ function (module, exports, __webpack_require__) { + var ctx = __webpack_require__(24); + var invoke = __webpack_require__(183); + var html = __webpack_require__(117); + var cel = __webpack_require__(113); + var global = __webpack_require__(3); + var process = global.process; + var setTask = global.setImmediate; + var clearTask = global.clearImmediate; + var MessageChannel = global.MessageChannel; + var Dispatch = global.Dispatch; + var counter = 0; + var queue = {}; + var ONREADYSTATECHANGE = 'onreadystatechange'; + var defer, channel, port; + var run = function () { + var id = +this; + // eslint-disable-next-line no-prototype-builtins + if (queue.hasOwnProperty(id)) { + var fn = queue[id]; + delete queue[id]; + fn(); + } + }; + var listener = function (event) { + run.call(event.data); + }; + // Node.js 0.9+ & IE10+ has setImmediate, otherwise: + if (!setTask || !clearTask) { + setTask = function setImmediate(fn) { + var args = []; + var i = 1; + while (arguments.length > i) args.push(arguments[i++]); + queue[++counter] = function () { + // eslint-disable-next-line no-new-func + invoke(typeof fn == 'function' ? fn : Function(fn), args); + }; + defer(counter); + return counter; + }; + clearTask = function clearImmediate(id) { + delete queue[id]; + }; + // Node.js 0.8- + if (__webpack_require__(25)(process) == 'process') { + defer = function (id) { + process.nextTick(ctx(run, id, 1)); + }; + // Sphere (JS game engine) Dispatch API + } else if (Dispatch && Dispatch.now) { + defer = function (id) { + Dispatch.now(ctx(run, id, 1)); + }; + // Browsers with MessageChannel, includes WebWorkers + } else if (MessageChannel) { + channel = new MessageChannel(); + port = channel.port2; + channel.port1.onmessage = listener; + defer = ctx(port.postMessage, port, 1); + // Browsers with postMessage, skip WebWorkers + // IE8 has postMessage, but it's sync & typeof its postMessage is 'object' + } else if (global.addEventListener && typeof postMessage == 'function' && !global.importScripts) { + defer = function (id) { + global.postMessage(id + '', '*'); + }; + global.addEventListener('message', listener, false); + // IE8- + } else if (ONREADYSTATECHANGE in cel('script')) { + defer = function (id) { + html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function () { + html.removeChild(this); + run.call(id); + }; + }; + // Rest old browsers + } else { + defer = function (id) { + setTimeout(ctx(run, id, 1), 0); + }; + } + } + module.exports = { + set: setTask, + clear: clearTask, + }; + + /***/ + }, + /* 137 */ + /***/ function (module, exports, __webpack_require__) { + var global = __webpack_require__(3); + var macrotask = __webpack_require__(136).set; + var Observer = global.MutationObserver || global.WebKitMutationObserver; + var process = global.process; + var Promise = global.Promise; + var isNode = __webpack_require__(25)(process) == 'process'; + + module.exports = function () { + var head, last, notify; + + var flush = function () { + var parent, fn; + if (isNode && (parent = process.domain)) parent.exit(); + while (head) { + fn = head.fn; + head = head.next; + try { + fn(); + } catch (e) { + if (head) notify(); + else last = undefined; + throw e; + } + } + last = undefined; + if (parent) parent.enter(); + }; + + // Node.js + if (isNode) { + notify = function () { + process.nextTick(flush); + }; + // browsers with MutationObserver, except iOS Safari - https://github.com/zloirock/core-js/issues/339 + } else if (Observer && !(global.navigator && global.navigator.standalone)) { + var toggle = true; + var node = document.createTextNode(''); + new Observer(flush).observe(node, { characterData: true }); // eslint-disable-line no-new + notify = function () { + node.data = toggle = !toggle; + }; + // environments with maybe non-completely correct, but existent Promise + } else if (Promise && Promise.resolve) { + // Promise.resolve without an argument throws an error in LG WebOS 2 + var promise = Promise.resolve(undefined); + notify = function () { + promise.then(flush); + }; + // for other environments - macrotask based on: + // - setImmediate + // - MessageChannel + // - window.postMessag + // - onreadystatechange + // - setTimeout + } else { + notify = function () { + // strange IE + webpack dev server bug - use .call(global) + macrotask.call(global, flush); + }; + } + + return function (fn) { + var task = { fn: fn, next: undefined }; + if (last) last.next = task; + if (!head) { + head = task; + notify(); + } + last = task; + }; + }; + + /***/ + }, + /* 138 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // 25.4.1.5 NewPromiseCapability(C) + var aFunction = __webpack_require__(12); + + function PromiseCapability(C) { + var resolve, reject; + this.promise = new C(function ($$resolve, $$reject) { + if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor'); + resolve = $$resolve; + reject = $$reject; + }); + this.resolve = aFunction(resolve); + this.reject = aFunction(reject); + } + + module.exports.f = function (C) { + return new PromiseCapability(C); + }; + + /***/ + }, + /* 139 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var global = __webpack_require__(3); + var DESCRIPTORS = __webpack_require__(8); + var LIBRARY = __webpack_require__(42); + var $typed = __webpack_require__(97); + var hide = __webpack_require__(15); + var redefineAll = __webpack_require__(59); + var fails = __webpack_require__(4); + var anInstance = __webpack_require__(57); + var toInteger = __webpack_require__(26); + var toLength = __webpack_require__(7); + var toIndex = __webpack_require__(203); + var gOPN = __webpack_require__(55).f; + var dP = __webpack_require__(9).f; + var arrayFill = __webpack_require__(132); + var setToStringTag = __webpack_require__(65); + var ARRAY_BUFFER = 'ArrayBuffer'; + var DATA_VIEW = 'DataView'; + var PROTOTYPE = 'prototype'; + var WRONG_LENGTH = 'Wrong length!'; + var WRONG_INDEX = 'Wrong index!'; + var $ArrayBuffer = global[ARRAY_BUFFER]; + var $DataView = global[DATA_VIEW]; + var Math = global.Math; + var RangeError = global.RangeError; + // eslint-disable-next-line no-shadow-restricted-names + var Infinity = global.Infinity; + var BaseBuffer = $ArrayBuffer; + var abs = Math.abs; + var pow = Math.pow; + var floor = Math.floor; + var log = Math.log; + var LN2 = Math.LN2; + var BUFFER = 'buffer'; + var BYTE_LENGTH = 'byteLength'; + var BYTE_OFFSET = 'byteOffset'; + var $BUFFER = DESCRIPTORS ? '_b' : BUFFER; + var $LENGTH = DESCRIPTORS ? '_l' : BYTE_LENGTH; + var $OFFSET = DESCRIPTORS ? '_o' : BYTE_OFFSET; + + // IEEE754 conversions based on https://github.com/feross/ieee754 + function packIEEE754(value, mLen, nBytes) { + var buffer = new Array(nBytes); + var eLen = nBytes * 8 - mLen - 1; + var eMax = (1 << eLen) - 1; + var eBias = eMax >> 1; + var rt = mLen === 23 ? pow(2, -24) - pow(2, -77) : 0; + var i = 0; + var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0; + var e, m, c; + value = abs(value); + // eslint-disable-next-line no-self-compare + if (value != value || value === Infinity) { + // eslint-disable-next-line no-self-compare + m = value != value ? 1 : 0; + e = eMax; + } else { + e = floor(log(value) / LN2); + if (value * (c = pow(2, -e)) < 1) { + e--; + c *= 2; + } + if (e + eBias >= 1) { + value += rt / c; + } else { + value += rt * pow(2, 1 - eBias); + } + if (value * c >= 2) { + e++; + c /= 2; + } + if (e + eBias >= eMax) { + m = 0; + e = eMax; + } else if (e + eBias >= 1) { + m = (value * c - 1) * pow(2, mLen); + e = e + eBias; + } else { + m = value * pow(2, eBias - 1) * pow(2, mLen); + e = 0; + } + } + for (; mLen >= 8; buffer[i++] = m & 255, m /= 256, mLen -= 8); + e = (e << mLen) | m; + eLen += mLen; + for (; eLen > 0; buffer[i++] = e & 255, e /= 256, eLen -= 8); + buffer[--i] |= s * 128; + return buffer; + } + function unpackIEEE754(buffer, mLen, nBytes) { + var eLen = nBytes * 8 - mLen - 1; + var eMax = (1 << eLen) - 1; + var eBias = eMax >> 1; + var nBits = eLen - 7; + var i = nBytes - 1; + var s = buffer[i--]; + var e = s & 127; + var m; + s >>= 7; + for (; nBits > 0; e = e * 256 + buffer[i], i--, nBits -= 8); + m = e & ((1 << -nBits) - 1); + e >>= -nBits; + nBits += mLen; + for (; nBits > 0; m = m * 256 + buffer[i], i--, nBits -= 8); + if (e === 0) { + e = 1 - eBias; + } else if (e === eMax) { + return m ? NaN : s ? -Infinity : Infinity; + } else { + m = m + pow(2, mLen); + e = e - eBias; + } + return (s ? -1 : 1) * m * pow(2, e - mLen); + } + + function unpackI32(bytes) { + return (bytes[3] << 24) | (bytes[2] << 16) | (bytes[1] << 8) | bytes[0]; + } + function packI8(it) { + return [it & 0xff]; + } + function packI16(it) { + return [it & 0xff, (it >> 8) & 0xff]; + } + function packI32(it) { + return [it & 0xff, (it >> 8) & 0xff, (it >> 16) & 0xff, (it >> 24) & 0xff]; + } + function packF64(it) { + return packIEEE754(it, 52, 8); + } + function packF32(it) { + return packIEEE754(it, 23, 4); + } + + function addGetter(C, key, internal) { + dP(C[PROTOTYPE], key, { + get: function () { + return this[internal]; + }, + }); + } + + function get(view, bytes, index, isLittleEndian) { + var numIndex = +index; + var intIndex = toIndex(numIndex); + if (intIndex + bytes > view[$LENGTH]) throw RangeError(WRONG_INDEX); + var store = view[$BUFFER]._b; + var start = intIndex + view[$OFFSET]; + var pack = store.slice(start, start + bytes); + return isLittleEndian ? pack : pack.reverse(); + } + function set(view, bytes, index, conversion, value, isLittleEndian) { + var numIndex = +index; + var intIndex = toIndex(numIndex); + if (intIndex + bytes > view[$LENGTH]) throw RangeError(WRONG_INDEX); + var store = view[$BUFFER]._b; + var start = intIndex + view[$OFFSET]; + var pack = conversion(+value); + for (var i = 0; i < bytes; i++) store[start + i] = pack[isLittleEndian ? i : bytes - i - 1]; + } + + if (!$typed.ABV) { + $ArrayBuffer = function ArrayBuffer(length) { + anInstance(this, $ArrayBuffer, ARRAY_BUFFER); + var byteLength = toIndex(length); + this._b = arrayFill.call(new Array(byteLength), 0); + this[$LENGTH] = byteLength; + }; + + $DataView = function DataView(buffer, byteOffset, byteLength) { + anInstance(this, $DataView, DATA_VIEW); + anInstance(buffer, $ArrayBuffer, DATA_VIEW); + var bufferLength = buffer[$LENGTH]; + var offset = toInteger(byteOffset); + if (offset < 0 || offset > bufferLength) throw RangeError('Wrong offset!'); + byteLength = byteLength === undefined ? bufferLength - offset : toLength(byteLength); + if (offset + byteLength > bufferLength) throw RangeError(WRONG_LENGTH); + this[$BUFFER] = buffer; + this[$OFFSET] = offset; + this[$LENGTH] = byteLength; + }; + + if (DESCRIPTORS) { + addGetter($ArrayBuffer, BYTE_LENGTH, '_l'); + addGetter($DataView, BUFFER, '_b'); + addGetter($DataView, BYTE_LENGTH, '_l'); + addGetter($DataView, BYTE_OFFSET, '_o'); + } + + redefineAll($DataView[PROTOTYPE], { + getInt8: function getInt8(byteOffset) { + return (get(this, 1, byteOffset)[0] << 24) >> 24; + }, + getUint8: function getUint8(byteOffset) { + return get(this, 1, byteOffset)[0]; + }, + getInt16: function getInt16(byteOffset /* , littleEndian */) { + var bytes = get(this, 2, byteOffset, arguments[1]); + return (((bytes[1] << 8) | bytes[0]) << 16) >> 16; + }, + getUint16: function getUint16(byteOffset /* , littleEndian */) { + var bytes = get(this, 2, byteOffset, arguments[1]); + return (bytes[1] << 8) | bytes[0]; + }, + getInt32: function getInt32(byteOffset /* , littleEndian */) { + return unpackI32(get(this, 4, byteOffset, arguments[1])); + }, + getUint32: function getUint32(byteOffset /* , littleEndian */) { + return unpackI32(get(this, 4, byteOffset, arguments[1])) >>> 0; + }, + getFloat32: function getFloat32(byteOffset /* , littleEndian */) { + return unpackIEEE754(get(this, 4, byteOffset, arguments[1]), 23, 4); + }, + getFloat64: function getFloat64(byteOffset /* , littleEndian */) { + return unpackIEEE754(get(this, 8, byteOffset, arguments[1]), 52, 8); + }, + setInt8: function setInt8(byteOffset, value) { + set(this, 1, byteOffset, packI8, value); + }, + setUint8: function setUint8(byteOffset, value) { + set(this, 1, byteOffset, packI8, value); + }, + setInt16: function setInt16(byteOffset, value /* , littleEndian */) { + set(this, 2, byteOffset, packI16, value, arguments[2]); + }, + setUint16: function setUint16(byteOffset, value /* , littleEndian */) { + set(this, 2, byteOffset, packI16, value, arguments[2]); + }, + setInt32: function setInt32(byteOffset, value /* , littleEndian */) { + set(this, 4, byteOffset, packI32, value, arguments[2]); + }, + setUint32: function setUint32(byteOffset, value /* , littleEndian */) { + set(this, 4, byteOffset, packI32, value, arguments[2]); + }, + setFloat32: function setFloat32(byteOffset, value /* , littleEndian */) { + set(this, 4, byteOffset, packF32, value, arguments[2]); + }, + setFloat64: function setFloat64(byteOffset, value /* , littleEndian */) { + set(this, 8, byteOffset, packF64, value, arguments[2]); + }, + }); + } else { + if ( + !fails(function () { + $ArrayBuffer(1); + }) || + !fails(function () { + new $ArrayBuffer(-1); // eslint-disable-line no-new + }) || + fails(function () { + new $ArrayBuffer(); // eslint-disable-line no-new + new $ArrayBuffer(1.5); // eslint-disable-line no-new + new $ArrayBuffer(NaN); // eslint-disable-line no-new + return $ArrayBuffer.name != ARRAY_BUFFER; + }) + ) { + $ArrayBuffer = function ArrayBuffer(length) { + anInstance(this, $ArrayBuffer); + return new BaseBuffer(toIndex(length)); + }; + var ArrayBufferProto = ($ArrayBuffer[PROTOTYPE] = BaseBuffer[PROTOTYPE]); + for (var keys = gOPN(BaseBuffer), j = 0, key; keys.length > j; ) { + if (!((key = keys[j++]) in $ArrayBuffer)) hide($ArrayBuffer, key, BaseBuffer[key]); + } + if (!LIBRARY) ArrayBufferProto.constructor = $ArrayBuffer; + } + // iOS Safari 7.x bug + var view = new $DataView(new $ArrayBuffer(2)); + var $setInt8 = $DataView[PROTOTYPE].setInt8; + view.setInt8(0, 2147483648); + view.setInt8(1, 2147483649); + if (view.getInt8(0) || !view.getInt8(1)) + redefineAll( + $DataView[PROTOTYPE], + { + setInt8: function setInt8(byteOffset, value) { + $setInt8.call(this, byteOffset, (value << 24) >> 24); + }, + setUint8: function setUint8(byteOffset, value) { + $setInt8.call(this, byteOffset, (value << 24) >> 24); + }, + }, + true, + ); + } + setToStringTag($ArrayBuffer, ARRAY_BUFFER); + setToStringTag($DataView, DATA_VIEW); + hide($DataView[PROTOTYPE], $typed.VIEW, true); + exports[ARRAY_BUFFER] = $ArrayBuffer; + exports[DATA_VIEW] = $DataView; + + /***/ + }, + /* 140 */ + /***/ function (module, exports, __webpack_require__) { + // fallback for non-array-like ES3 and non-enumerable old V8 strings + var cof = __webpack_require__(141); + // eslint-disable-next-line no-prototype-builtins + module.exports = Object('z').propertyIsEnumerable(0) + ? Object + : function (it) { + return cof(it) == 'String' ? it.split('') : Object(it); + }; + + /***/ + }, + /* 141 */ + /***/ function (module, exports) { + var toString = {}.toString; + + module.exports = function (it) { + return toString.call(it).slice(8, -1); + }; + + /***/ + }, + /* 142 */ + /***/ function (module, exports) { + // 7.2.1 RequireObjectCoercible(argument) + module.exports = function (it) { + if (it == undefined) throw TypeError("Can't call method on " + it); + return it; + }; + + /***/ + }, + /* 143 */ + /***/ function (module, exports, __webpack_require__) { + // 7.1.1 ToPrimitive(input [, PreferredType]) + var isObject = __webpack_require__(35); + // instead of the ES6 spec version, we didn't implement @@toPrimitive case + // and the second argument - flag - preferred type is a string + module.exports = function (it, S) { + if (!isObject(it)) return it; + var fn, val; + if (S && typeof (fn = it.toString) == 'function' && !isObject((val = fn.call(it)))) return val; + if (typeof (fn = it.valueOf) == 'function' && !isObject((val = fn.call(it)))) return val; + if (!S && typeof (fn = it.toString) == 'function' && !isObject((val = fn.call(it)))) return val; + throw TypeError("Can't convert object to primitive value"); + }; + + /***/ + }, + /* 144 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $at = __webpack_require__(482)(true); + + // 21.1.3.27 String.prototype[@@iterator]() + __webpack_require__(146)( + String, + 'String', + function (iterated) { + this._t = String(iterated); // target + this._i = 0; // next index + // 21.1.5.2.1 %StringIteratorPrototype%.next() + }, + function () { + var O = this._t; + var index = this._i; + var point; + if (index >= O.length) return { value: undefined, done: true }; + point = $at(O, index); + this._i += point.length; + return { value: point, done: false }; + }, + ); + + /***/ + }, + /* 145 */ + /***/ function (module, exports) { + // 7.1.4 ToInteger + var ceil = Math.ceil; + var floor = Math.floor; + module.exports = function (it) { + return isNaN((it = +it)) ? 0 : (it > 0 ? floor : ceil)(it); + }; + + /***/ + }, + /* 146 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var LIBRARY = __webpack_require__(102); + var $export = __webpack_require__(36); + var redefine = __webpack_require__(147); + var hide = __webpack_require__(46); + var Iterators = __webpack_require__(80); + var $iterCreate = __webpack_require__(483); + var setToStringTag = __webpack_require__(105); + var getPrototypeOf = __webpack_require__(488); + var ITERATOR = __webpack_require__(22)('iterator'); + var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next` + var FF_ITERATOR = '@@iterator'; + var KEYS = 'keys'; + var VALUES = 'values'; + + var returnThis = function () { + return this; + }; + + module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) { + $iterCreate(Constructor, NAME, next); + var getMethod = function (kind) { + if (!BUGGY && kind in proto) return proto[kind]; + switch (kind) { + case KEYS: + return function keys() { + return new Constructor(this, kind); + }; + case VALUES: + return function values() { + return new Constructor(this, kind); + }; + } + return function entries() { + return new Constructor(this, kind); + }; + }; + var TAG = NAME + ' Iterator'; + var DEF_VALUES = DEFAULT == VALUES; + var VALUES_BUG = false; + var proto = Base.prototype; + var $native = proto[ITERATOR] || proto[FF_ITERATOR] || (DEFAULT && proto[DEFAULT]); + var $default = $native || getMethod(DEFAULT); + var $entries = DEFAULT ? (!DEF_VALUES ? $default : getMethod('entries')) : undefined; + var $anyNative = NAME == 'Array' ? proto.entries || $native : $native; + var methods, key, IteratorPrototype; + // Fix native + if ($anyNative) { + IteratorPrototype = getPrototypeOf($anyNative.call(new Base())); + if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) { + // Set @@toStringTag to native iterators + setToStringTag(IteratorPrototype, TAG, true); + // fix for some old engines + if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') + hide(IteratorPrototype, ITERATOR, returnThis); + } + } + // fix Array#{values, @@iterator}.name in V8 / FF + if (DEF_VALUES && $native && $native.name !== VALUES) { + VALUES_BUG = true; + $default = function values() { + return $native.call(this); + }; + } + // Define iterator + if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) { + hide(proto, ITERATOR, $default); + } + // Plug for library + Iterators[NAME] = $default; + Iterators[TAG] = returnThis; + if (DEFAULT) { + methods = { + values: DEF_VALUES ? $default : getMethod(VALUES), + keys: IS_SET ? $default : getMethod(KEYS), + entries: $entries, + }; + if (FORCED) + for (key in methods) { + if (!(key in proto)) redefine(proto, key, methods[key]); + } + else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); + } + return methods; + }; + + /***/ + }, + /* 147 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = __webpack_require__(46); + + /***/ + }, + /* 148 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) + var anObject = __webpack_require__(63); + var dPs = __webpack_require__(484); + var enumBugKeys = __webpack_require__(151); + var IE_PROTO = __webpack_require__(149)('IE_PROTO'); + var Empty = function () { + /* empty */ + }; + var PROTOTYPE = 'prototype'; + + // Create object with fake `null` prototype: use iframe Object with cleared prototype + var createDict = function () { + // Thrash, waste and sodomy: IE GC bug + var iframe = __webpack_require__(214)('iframe'); + var i = enumBugKeys.length; + var lt = '<'; + var gt = '>'; + var iframeDocument; + iframe.style.display = 'none'; + __webpack_require__(487).appendChild(iframe); + iframe.src = 'javascript:'; // eslint-disable-line no-script-url + // createDict = iframe.contentWindow.Object; + // html.removeChild(iframe); + iframeDocument = iframe.contentWindow.document; + iframeDocument.open(); + iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); + iframeDocument.close(); + createDict = iframeDocument.F; + while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]]; + return createDict(); + }; + + module.exports = + Object.create || + function create(O, Properties) { + var result; + if (O !== null) { + Empty[PROTOTYPE] = anObject(O); + result = new Empty(); + Empty[PROTOTYPE] = null; + // add "__proto__" for Object.getPrototypeOf polyfill + result[IE_PROTO] = O; + } else result = createDict(); + return Properties === undefined ? result : dPs(result, Properties); + }; + + /***/ + }, + /* 149 */ + /***/ function (module, exports, __webpack_require__) { + var shared = __webpack_require__(150)('keys'); + var uid = __webpack_require__(104); + module.exports = function (key) { + return shared[key] || (shared[key] = uid(key)); + }; + + /***/ + }, + /* 150 */ + /***/ function (module, exports, __webpack_require__) { + var core = __webpack_require__(13); + var global = __webpack_require__(29); + var SHARED = '__core-js_shared__'; + var store = global[SHARED] || (global[SHARED] = {}); + + (module.exports = function (key, value) { + return store[key] || (store[key] = value !== undefined ? value : {}); + })('versions', []).push({ + version: core.version, + mode: __webpack_require__(102) ? 'pure' : 'global', + copyright: '© 2019 Denis Pushkarev (zloirock.ru)', + }); + + /***/ + }, + /* 151 */ + /***/ function (module, exports) { + // IE 8- don't enum bug keys + module.exports = + 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'.split( + ',', + ); + + /***/ + }, + /* 152 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(489); + var global = __webpack_require__(29); + var hide = __webpack_require__(46); + var Iterators = __webpack_require__(80); + var TO_STRING_TAG = __webpack_require__(22)('toStringTag'); + + var DOMIterables = ( + 'CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,' + + 'DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,' + + 'MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,' + + 'SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,' + + 'TextTrackList,TouchList' + ).split(','); + + for (var i = 0; i < DOMIterables.length; i++) { + var NAME = DOMIterables[i]; + var Collection = global[NAME]; + var proto = Collection && Collection.prototype; + if (proto && !proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME); + Iterators[NAME] = Iterators.Array; + } + + /***/ + }, + /* 153 */ + /***/ function (module, exports, __webpack_require__) { + exports.f = __webpack_require__(22); + + /***/ + }, + /* 154 */ + /***/ function (module, exports, __webpack_require__) { + var global = __webpack_require__(29); + var core = __webpack_require__(13); + var LIBRARY = __webpack_require__(102); + var wksExt = __webpack_require__(153); + var defineProperty = __webpack_require__(30).f; + module.exports = function (name) { + var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {}); + if (name.charAt(0) != '_' && !(name in $Symbol)) + defineProperty($Symbol, name, { value: wksExt.f(name) }); + }; + + /***/ + }, + /* 155 */ + /***/ function (module, exports) { + exports.f = Object.getOwnPropertySymbols; + + /***/ + }, + /* 156 */ + /***/ function (module, exports) { + /***/ + }, + /* 157 */ + /***/ function (module, exports, __webpack_require__) { + // 0 -> Array#forEach + // 1 -> Array#map + // 2 -> Array#filter + // 3 -> Array#some + // 4 -> Array#every + // 5 -> Array#find + // 6 -> Array#findIndex + var ctx = __webpack_require__(69); + var IObject = __webpack_require__(140); + var toObject = __webpack_require__(70); + var toLength = __webpack_require__(103); + var asc = __webpack_require__(501); + module.exports = function (TYPE, $create) { + var IS_MAP = TYPE == 1; + var IS_FILTER = TYPE == 2; + var IS_SOME = TYPE == 3; + var IS_EVERY = TYPE == 4; + var IS_FIND_INDEX = TYPE == 6; + var NO_HOLES = TYPE == 5 || IS_FIND_INDEX; + var create = $create || asc; + return function ($this, callbackfn, that) { + var O = toObject($this); + var self = IObject(O); + var f = ctx(callbackfn, that, 3); + var length = toLength(self.length); + var index = 0; + var result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined; + var val, res; + for (; length > index; index++) + if (NO_HOLES || index in self) { + val = self[index]; + res = f(val, index, O); + if (TYPE) { + if (IS_MAP) + result[index] = res; // map + else if (res) + switch (TYPE) { + case 3: + return true; // some + case 5: + return val; // find + case 6: + return index; // findIndex + case 2: + result.push(val); // filter + } + else if (IS_EVERY) return false; // every + } + } + return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result; + }; + }; + + /***/ + }, + /* 158 */ + /***/ function (module, exports, __webpack_require__) { + var hide = __webpack_require__(46); + module.exports = function (target, src, safe) { + for (var key in src) { + if (safe && target[key]) target[key] = src[key]; + else hide(target, key, src[key]); + } + return target; + }; + + /***/ + }, + /* 159 */ + /***/ function (module, exports) { + module.exports = function (it, Constructor, name, forbiddenField) { + if (!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)) { + throw TypeError(name + ': incorrect invocation!'); + } + return it; + }; + + /***/ + }, + /* 160 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = __webpack_require__(509); + + /***/ + }, + /* 161 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var _interopRequireDefault = __webpack_require__(41); + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.default = createReactElement; + + var _react = _interopRequireDefault(__webpack_require__(1)); + + /* eslint-disable react/prop-types */ + + /** + * Logic to either call the generatorFunction or call React.createElement to get the + * React.Component + * @param options + * @param options.componentObj + * @param options.props + * @param options.domNodeId + * @param options.trace + * @param options.location + * @returns {Element} + */ + function createReactElement(_ref) { + var componentObj = _ref.componentObj, + props = _ref.props, + railsContext = _ref.railsContext, + domNodeId = _ref.domNodeId, + trace = _ref.trace, + shouldHydrate = _ref.shouldHydrate; + var name = componentObj.name, + component = componentObj.component, + generatorFunction = componentObj.generatorFunction; + + if (trace) { + if (railsContext && railsContext.serverSide) { + console.log('RENDERED '.concat(name, ' to dom node with id: ').concat(domNodeId)); + } else if (shouldHydrate) { + console.log( + 'HYDRATED ' + .concat(name, ' in dom node with id: ') + .concat(domNodeId, ' using props, railsContext:'), + props, + railsContext, + ); + } else { + console.log( + 'RENDERED ' + .concat(name, ' to dom node with id: ') + .concat(domNodeId, ' with props, railsContext:'), + props, + railsContext, + ); + } + } + + if (generatorFunction) { + return component(props, railsContext); + } + + return _react.default.createElement(component, props); + } + + /***/ + }, + /* 162 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(10); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__RailsContext__ = __webpack_require__(238); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__HelloWorld_scss__ = __webpack_require__(543); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__HelloWorld_scss___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_3__HelloWorld_scss__, + ); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + // Example of CSS modules. + + // Super simple example of the simplest possible React component + + var HelloWorld = (function (_React$Component) { + _inherits(HelloWorld, _React$Component); + + // Not necessary if we only call super, but we'll need to initialize state, etc. + function HelloWorld(props) { + _classCallCheck(this, HelloWorld); + + var _this = _possibleConstructorReturn( + this, + (HelloWorld.__proto__ || Object.getPrototypeOf(HelloWorld)).call(this, props), + ); + + _this.state = props.helloWorldData; + _this.setNameDomRef = _this.setNameDomRef.bind(_this); + _this.handleChange = _this.handleChange.bind(_this); + return _this; + } + + _createClass(HelloWorld, [ + { + key: 'setNameDomRef', + value: function setNameDomRef(nameDomNode) { + this.nameDomRef = nameDomNode; + }, + }, + { + key: 'handleChange', + value: function handleChange() { + var name = this.nameDomRef.value; + this.setState({ name: name }); + }, + }, + { + key: 'render', + value: function render() { + // eslint-disable-next-line no-console + console.log( + 'HelloWorld demonstrating a call to console.log in ' + + 'spec/dummy/client/app/components/HelloWorld.jsx:18', + ); + + var name = this.state.name; + var railsContext = this.props.railsContext; + + return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'div', + null, + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'h3', + { className: __WEBPACK_IMPORTED_MODULE_3__HelloWorld_scss___default.a.brightColor }, + 'Hello, ', + name, + '!', + ), + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'p', + null, + 'Say hello to:', + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('input', { + type: 'text', + ref: this.setNameDomRef, + defaultValue: name, + onChange: this.handleChange, + }), + ), + railsContext && + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_2__RailsContext__['a' /* default */], + { railsContext: railsContext }, + ), + ); + }, + }, + ]); + + return HelloWorld; + })(__WEBPACK_IMPORTED_MODULE_1_react___default.a.Component); + + HelloWorld.propTypes = { + helloWorldData: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.shape({ + name: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string, + }).isRequired, + railsContext: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object, + }; + var _default = HelloWorld; + + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + HelloWorld, + 'HelloWorld', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/HelloWorld.jsx', + ); + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/HelloWorld.jsx', + ); + })(); + + /***/ + }, + /* 163 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__components_Provider__ = __webpack_require__(568); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__components_connectAdvanced__ = + __webpack_require__(247); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__connect_connect__ = __webpack_require__(572); + /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, 'a', function () { + return __WEBPACK_IMPORTED_MODULE_0__components_Provider__['a']; + }); + /* unused harmony reexport createProvider */ + /* unused harmony reexport connectAdvanced */ + /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, 'b', function () { + return __WEBPACK_IMPORTED_MODULE_2__connect_connect__['a']; + }); + + /***/ + }, + /* 164 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = warning; + /** + * Prints a warning in the console if it exists. + * + * @param {String} message The warning message. + * @returns {void} + */ + function warning(message) { + /* eslint-disable no-console */ + if (typeof console !== 'undefined' && typeof console.error === 'function') { + console.error(message); + } + /* eslint-enable no-console */ + + try { + // This error was thrown as a convenience so that if you enable + // "break on all exceptions" in your console, + // it would pause the execution at this line. + throw new Error(message); + /* eslint-disable no-empty */ + } catch (e) {} + /* eslint-enable no-empty */ + } + + /***/ + }, + /* 165 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = _extends; + function _extends() { + _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + + return target; + }; + + return _extends.apply(this, arguments); + } + + /***/ + }, + /* 166 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = _objectWithoutPropertiesLoose; + function _objectWithoutPropertiesLoose(source, excluded) { + if (source == null) return {}; + var target = {}; + var sourceKeys = Object.keys(source); + var key, i; + + for (i = 0; i < sourceKeys.length; i++) { + key = sourceKeys[i]; + if (excluded.indexOf(key) >= 0) continue; + target[key] = source[key]; + } + + return target; + } + + /***/ + }, + /* 167 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = loopAsync; + /* harmony export (immutable) */ __webpack_exports__['b'] = mapAsync; + function loopAsync(turns, work, callback) { + var currentTurn = 0, + isDone = false; + var sync = false, + hasNext = false, + doneArgs = void 0; + + function done() { + isDone = true; + if (sync) { + // Iterate instead of recursing if possible. + doneArgs = [].concat(Array.prototype.slice.call(arguments)); + return; + } + + callback.apply(this, arguments); + } + + function next() { + if (isDone) { + return; + } + + hasNext = true; + if (sync) { + // Iterate instead of recursing if possible. + return; + } + + sync = true; + + while (!isDone && currentTurn < turns && hasNext) { + hasNext = false; + work.call(this, currentTurn++, next, done); + } + + sync = false; + + if (isDone) { + // This means the loop finished synchronously. + callback.apply(this, doneArgs); + return; + } + + if (currentTurn >= turns && hasNext) { + isDone = true; + callback(); + } + } + + next(); + } + + function mapAsync(array, work, callback) { + var length = array.length; + var values = []; + + if (length === 0) return callback(null, values); + + var isDone = false, + doneCount = 0; + + function done(index, error, value) { + if (isDone) return; + + if (error) { + isDone = true; + callback(error); + } else { + values[index] = value; + + isDone = ++doneCount === length; + + if (isDone) callback(null, values); + } + } + + array.forEach(function (item, index) { + work(item, index, function (error, value) { + done(index, error, value); + }); + }); + } + + /***/ + }, + /* 168 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant__ = __webpack_require__(14); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_invariant__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_create_react_class__ = __webpack_require__(37); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_create_react_class___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_create_react_class__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types__ = __webpack_require__(10); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_3_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__getRouteParams__ = __webpack_require__(593); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__ContextUtils__ = __webpack_require__(169); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__RouteUtils__ = __webpack_require__(48); + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + var _typeof = + typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' + ? function (obj) { + return typeof obj; + } + : function (obj) { + return obj && + typeof Symbol === 'function' && + obj.constructor === Symbol && + obj !== Symbol.prototype + ? 'symbol' + : typeof obj; + }; + + /** + * A <RouterContext> renders the component tree for a given router state + * and sets the history object and the current location in context. + */ + var RouterContext = __WEBPACK_IMPORTED_MODULE_2_create_react_class___default()({ + displayName: 'RouterContext', + + mixins: [Object(__WEBPACK_IMPORTED_MODULE_5__ContextUtils__['a' /* ContextProvider */])('router')], + + propTypes: { + router: __WEBPACK_IMPORTED_MODULE_3_prop_types__['object'].isRequired, + location: __WEBPACK_IMPORTED_MODULE_3_prop_types__['object'].isRequired, + routes: __WEBPACK_IMPORTED_MODULE_3_prop_types__['array'].isRequired, + params: __WEBPACK_IMPORTED_MODULE_3_prop_types__['object'].isRequired, + components: __WEBPACK_IMPORTED_MODULE_3_prop_types__['array'].isRequired, + createElement: __WEBPACK_IMPORTED_MODULE_3_prop_types__['func'].isRequired, + }, + + getDefaultProps: function getDefaultProps() { + return { + createElement: __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement, + }; + }, + + childContextTypes: { + router: __WEBPACK_IMPORTED_MODULE_3_prop_types__['object'].isRequired, + }, + + getChildContext: function getChildContext() { + return { + router: this.props.router, + }; + }, + createElement: function createElement(component, props) { + return component == null ? null : this.props.createElement(component, props); + }, + render: function render() { + var _this = this; + + var _props = this.props, + location = _props.location, + routes = _props.routes, + params = _props.params, + components = _props.components, + router = _props.router; + + var element = null; + + if (components) { + element = components.reduceRight(function (element, components, index) { + if (components == null) return element; // Don't create new children; use the grandchildren. + + var route = routes[index]; + var routeParams = Object(__WEBPACK_IMPORTED_MODULE_4__getRouteParams__['a' /* default */])( + route, + params, + ); + var props = { + location: location, + params: params, + route: route, + router: router, + routeParams: routeParams, + routes: routes, + }; + + if (Object(__WEBPACK_IMPORTED_MODULE_6__RouteUtils__['c' /* isReactChildren */])(element)) { + props.children = element; + } else if (element) { + for (var prop in element) { + if (Object.prototype.hasOwnProperty.call(element, prop)) props[prop] = element[prop]; + } + } + + if ((typeof components === 'undefined' ? 'undefined' : _typeof(components)) === 'object') { + var elements = {}; + + for (var key in components) { + if (Object.prototype.hasOwnProperty.call(components, key)) { + // Pass through the key as a prop to createElement to allow + // custom createElement functions to know which named component + // they're rendering, for e.g. matching up to fetched data. + elements[key] = _this.createElement( + components[key], + _extends( + { + key: key, + }, + props, + ), + ); + } + } + + return elements; + } + + return _this.createElement(components, props); + }, element); + } + + !( + element === null || + element === false || + __WEBPACK_IMPORTED_MODULE_1_react___default.a.isValidElement(element) + ) + ? true + ? __WEBPACK_IMPORTED_MODULE_0_invariant___default()( + false, + 'The root route must render a single element', + ) + : invariant(false) + : void 0; + + return element; + }, + }); + + /* harmony default export */ __webpack_exports__['a'] = RouterContext; + + /***/ + }, + /* 169 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = ContextProvider; + /* harmony export (immutable) */ __webpack_exports__['b'] = ContextSubscriber; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(10); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + + // Works around issues with context updates failing to propagate. + // Caveat: the context value is expected to never change its identity. + // https://github.com/facebook/react/issues/2517 + // https://github.com/reactjs/react-router/issues/470 + + var contextProviderShape = __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.shape({ + subscribe: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired, + eventIndex: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number.isRequired, + }); + + function makeContextName(name) { + return '@@contextSubscriber/' + name; + } + + function ContextProvider(name) { + var _childContextTypes, _ref2; + + var contextName = makeContextName(name); + var listenersKey = contextName + '/listeners'; + var eventIndexKey = contextName + '/eventIndex'; + var subscribeKey = contextName + '/subscribe'; + + return ( + (_ref2 = { + childContextTypes: + ((_childContextTypes = {}), + (_childContextTypes[contextName] = contextProviderShape.isRequired), + _childContextTypes), + + getChildContext: function getChildContext() { + var _ref; + + return ( + (_ref = {}), + (_ref[contextName] = { + eventIndex: this[eventIndexKey], + subscribe: this[subscribeKey], + }), + _ref + ); + }, + componentWillMount: function componentWillMount() { + this[listenersKey] = []; + this[eventIndexKey] = 0; + }, + componentWillReceiveProps: function componentWillReceiveProps() { + this[eventIndexKey]++; + }, + componentDidUpdate: function componentDidUpdate() { + var _this = this; + + this[listenersKey].forEach(function (listener) { + return listener(_this[eventIndexKey]); + }); + }, + }), + (_ref2[subscribeKey] = function (listener) { + var _this2 = this; + + // No need to immediately call listener here. + this[listenersKey].push(listener); + + return function () { + _this2[listenersKey] = _this2[listenersKey].filter(function (item) { + return item !== listener; + }); + }; + }), + _ref2 + ); + } + + function ContextSubscriber(name) { + var _contextTypes, _ref4; + + var contextName = makeContextName(name); + var lastRenderedEventIndexKey = contextName + '/lastRenderedEventIndex'; + var handleContextUpdateKey = contextName + '/handleContextUpdate'; + var unsubscribeKey = contextName + '/unsubscribe'; + + return ( + (_ref4 = { + contextTypes: + ((_contextTypes = {}), (_contextTypes[contextName] = contextProviderShape), _contextTypes), + + getInitialState: function getInitialState() { + var _ref3; + + if (!this.context[contextName]) { + return {}; + } + + return ( + (_ref3 = {}), (_ref3[lastRenderedEventIndexKey] = this.context[contextName].eventIndex), _ref3 + ); + }, + componentDidMount: function componentDidMount() { + if (!this.context[contextName]) { + return; + } + + this[unsubscribeKey] = this.context[contextName].subscribe(this[handleContextUpdateKey]); + }, + componentWillReceiveProps: function componentWillReceiveProps() { + var _setState; + + if (!this.context[contextName]) { + return; + } + + this.setState( + ((_setState = {}), + (_setState[lastRenderedEventIndexKey] = this.context[contextName].eventIndex), + _setState), + ); + }, + componentWillUnmount: function componentWillUnmount() { + if (!this[unsubscribeKey]) { + return; + } + + this[unsubscribeKey](); + this[unsubscribeKey] = null; + }, + }), + (_ref4[handleContextUpdateKey] = function (eventIndex) { + if (eventIndex !== this.state[lastRenderedEventIndexKey]) { + var _setState2; + + this.setState( + ((_setState2 = {}), (_setState2[lastRenderedEventIndexKey] = eventIndex), _setState2), + ); + } + }), + _ref4 + ); + } + + /***/ + }, + /* 170 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'a', function () { + return routerShape; + }); + /* unused harmony export locationShape */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(10); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + + var routerShape = Object(__WEBPACK_IMPORTED_MODULE_0_prop_types__['shape'])({ + push: __WEBPACK_IMPORTED_MODULE_0_prop_types__['func'].isRequired, + replace: __WEBPACK_IMPORTED_MODULE_0_prop_types__['func'].isRequired, + go: __WEBPACK_IMPORTED_MODULE_0_prop_types__['func'].isRequired, + goBack: __WEBPACK_IMPORTED_MODULE_0_prop_types__['func'].isRequired, + goForward: __WEBPACK_IMPORTED_MODULE_0_prop_types__['func'].isRequired, + setRouteLeaveHook: __WEBPACK_IMPORTED_MODULE_0_prop_types__['func'].isRequired, + isActive: __WEBPACK_IMPORTED_MODULE_0_prop_types__['func'].isRequired, + }); + + var locationShape = Object(__WEBPACK_IMPORTED_MODULE_0_prop_types__['shape'])({ + pathname: __WEBPACK_IMPORTED_MODULE_0_prop_types__['string'].isRequired, + search: __WEBPACK_IMPORTED_MODULE_0_prop_types__['string'].isRequired, + state: __WEBPACK_IMPORTED_MODULE_0_prop_types__['object'], + action: __WEBPACK_IMPORTED_MODULE_0_prop_types__['string'].isRequired, + key: __WEBPACK_IMPORTED_MODULE_0_prop_types__['string'], + }); + + /***/ + }, + /* 171 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + + var _warning = __webpack_require__(47); + + var _warning2 = _interopRequireDefault(_warning); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + var runTransitionHook = function runTransitionHook(hook, location, callback) { + var result = hook(location, callback); + + if (hook.length < 2) { + // Assume the hook runs synchronously and automatically + // call the callback with the return value. + callback(result); + } else { + true + ? (0, _warning2.default)( + result === undefined, + 'You should not "return" in a transition hook with a callback argument; ' + + 'call the callback instead', + ) + : void 0; + } + }; + + exports.default = runTransitionHook; + + /***/ + }, + /* 172 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + + var _AsyncUtils = __webpack_require__(604); + + var _PathUtils = __webpack_require__(49); + + var _runTransitionHook = __webpack_require__(171); + + var _runTransitionHook2 = _interopRequireDefault(_runTransitionHook); + + var _Actions = __webpack_require__(111); + + var _LocationUtils = __webpack_require__(73); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + var createHistory = function createHistory() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + var getCurrentLocation = options.getCurrentLocation, + getUserConfirmation = options.getUserConfirmation, + pushLocation = options.pushLocation, + replaceLocation = options.replaceLocation, + go = options.go, + keyLength = options.keyLength; + + var currentLocation = void 0; + var pendingLocation = void 0; + var beforeListeners = []; + var listeners = []; + var allKeys = []; + + var getCurrentIndex = function getCurrentIndex() { + if (pendingLocation && pendingLocation.action === _Actions.POP) + return allKeys.indexOf(pendingLocation.key); + + if (currentLocation) return allKeys.indexOf(currentLocation.key); + + return -1; + }; + + var updateLocation = function updateLocation(nextLocation) { + var currentIndex = getCurrentIndex(); + + currentLocation = nextLocation; + + if (currentLocation.action === _Actions.PUSH) { + allKeys = [].concat(allKeys.slice(0, currentIndex + 1), [currentLocation.key]); + } else if (currentLocation.action === _Actions.REPLACE) { + allKeys[currentIndex] = currentLocation.key; + } + + listeners.forEach(function (listener) { + return listener(currentLocation); + }); + }; + + var listenBefore = function listenBefore(listener) { + beforeListeners.push(listener); + + return function () { + return (beforeListeners = beforeListeners.filter(function (item) { + return item !== listener; + })); + }; + }; + + var listen = function listen(listener) { + listeners.push(listener); + + return function () { + return (listeners = listeners.filter(function (item) { + return item !== listener; + })); + }; + }; + + var confirmTransitionTo = function confirmTransitionTo(location, callback) { + (0, _AsyncUtils.loopAsync)( + beforeListeners.length, + function (index, next, done) { + (0, _runTransitionHook2.default)(beforeListeners[index], location, function (result) { + return result != null ? done(result) : next(); + }); + }, + function (message) { + if (getUserConfirmation && typeof message === 'string') { + getUserConfirmation(message, function (ok) { + return callback(ok !== false); + }); + } else { + callback(message !== false); + } + }, + ); + }; + + var transitionTo = function transitionTo(nextLocation) { + if ( + (currentLocation && (0, _LocationUtils.locationsAreEqual)(currentLocation, nextLocation)) || + (pendingLocation && (0, _LocationUtils.locationsAreEqual)(pendingLocation, nextLocation)) + ) + return; // Nothing to do + + pendingLocation = nextLocation; + + confirmTransitionTo(nextLocation, function (ok) { + if (pendingLocation !== nextLocation) return; // Transition was interrupted during confirmation + + pendingLocation = null; + + if (ok) { + // Treat PUSH to same path like REPLACE to be consistent with browsers + if (nextLocation.action === _Actions.PUSH) { + var prevPath = (0, _PathUtils.createPath)(currentLocation); + var nextPath = (0, _PathUtils.createPath)(nextLocation); + + if ( + nextPath === prevPath && + (0, _LocationUtils.statesAreEqual)(currentLocation.state, nextLocation.state) + ) + nextLocation.action = _Actions.REPLACE; + } + + if (nextLocation.action === _Actions.POP) { + updateLocation(nextLocation); + } else if (nextLocation.action === _Actions.PUSH) { + if (pushLocation(nextLocation) !== false) updateLocation(nextLocation); + } else if (nextLocation.action === _Actions.REPLACE) { + if (replaceLocation(nextLocation) !== false) updateLocation(nextLocation); + } + } else if (currentLocation && nextLocation.action === _Actions.POP) { + var prevIndex = allKeys.indexOf(currentLocation.key); + var nextIndex = allKeys.indexOf(nextLocation.key); + + if (prevIndex !== -1 && nextIndex !== -1) go(prevIndex - nextIndex); // Restore the URL + } + }); + }; + + var push = function push(input) { + return transitionTo(createLocation(input, _Actions.PUSH)); + }; + + var replace = function replace(input) { + return transitionTo(createLocation(input, _Actions.REPLACE)); + }; + + var goBack = function goBack() { + return go(-1); + }; + + var goForward = function goForward() { + return go(1); + }; + + var createKey = function createKey() { + return Math.random() + .toString(36) + .substr(2, keyLength || 6); + }; + + var createHref = function createHref(location) { + return (0, _PathUtils.createPath)(location); + }; + + var createLocation = function createLocation(location, action) { + var key = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : createKey(); + return (0, _LocationUtils.createLocation)(location, action, key); + }; + + return { + getCurrentLocation: getCurrentLocation, + listenBefore: listenBefore, + listen: listen, + transitionTo: transitionTo, + push: push, + replace: replace, + go: go, + goBack: goBack, + goForward: goForward, + createKey: createKey, + createPath: _PathUtils.createPath, + createHref: createHref, + createLocation: createLocation, + }; + }; + + exports.default = createHistory; + + /***/ + }, + /* 173 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + var canUseDOM = (exports.canUseDOM = !!( + typeof window !== 'undefined' && + window.document && + window.document.createElement + )); + + /***/ + }, + /* 174 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + exports.go = + exports.replaceLocation = + exports.pushLocation = + exports.startListener = + exports.getUserConfirmation = + exports.getCurrentLocation = + undefined; + + var _LocationUtils = __webpack_require__(73); + + var _DOMUtils = __webpack_require__(112); + + var _DOMStateStorage = __webpack_require__(263); + + var _PathUtils = __webpack_require__(49); + + var _ExecutionEnvironment = __webpack_require__(173); + + var PopStateEvent = 'popstate'; + var HashChangeEvent = 'hashchange'; + + var needsHashchangeListener = + _ExecutionEnvironment.canUseDOM && !(0, _DOMUtils.supportsPopstateOnHashchange)(); + + var _createLocation = function _createLocation(historyState) { + var key = historyState && historyState.key; + + return (0, _LocationUtils.createLocation)( + { + pathname: window.location.pathname, + search: window.location.search, + hash: window.location.hash, + state: key ? (0, _DOMStateStorage.readState)(key) : undefined, + }, + undefined, + key, + ); + }; + + var getCurrentLocation = (exports.getCurrentLocation = function getCurrentLocation() { + var historyState = void 0; + try { + historyState = window.history.state || {}; + } catch (error) { + // IE 11 sometimes throws when accessing window.history.state + // See https://github.com/ReactTraining/history/pull/289 + historyState = {}; + } + + return _createLocation(historyState); + }); + + var getUserConfirmation = (exports.getUserConfirmation = function getUserConfirmation( + message, + callback, + ) { + return callback(window.confirm(message)); + }); // eslint-disable-line no-alert + + var startListener = (exports.startListener = function startListener(listener) { + var handlePopState = function handlePopState(event) { + if ((0, _DOMUtils.isExtraneousPopstateEvent)(event)) + // Ignore extraneous popstate events in WebKit + return; + listener(_createLocation(event.state)); + }; + + (0, _DOMUtils.addEventListener)(window, PopStateEvent, handlePopState); + + var handleUnpoppedHashChange = function handleUnpoppedHashChange() { + return listener(getCurrentLocation()); + }; + + if (needsHashchangeListener) { + (0, _DOMUtils.addEventListener)(window, HashChangeEvent, handleUnpoppedHashChange); + } + + return function () { + (0, _DOMUtils.removeEventListener)(window, PopStateEvent, handlePopState); + + if (needsHashchangeListener) { + (0, _DOMUtils.removeEventListener)(window, HashChangeEvent, handleUnpoppedHashChange); + } + }; + }); + + var updateLocation = function updateLocation(location, updateState) { + var state = location.state, + key = location.key; + + if (state !== undefined) (0, _DOMStateStorage.saveState)(key, state); + + updateState({ key: key }, (0, _PathUtils.createPath)(location)); + }; + + var pushLocation = (exports.pushLocation = function pushLocation(location) { + return updateLocation(location, function (state, path) { + return window.history.pushState(state, null, path); + }); + }); + + var replaceLocation = (exports.replaceLocation = function replaceLocation(location) { + return updateLocation(location, function (state, path) { + return window.history.replaceState(state, null, path); + }); + }); + + var go = (exports.go = function go(n) { + if (n) window.history.go(n); + }); + + /***/ + }, + /* 175 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = + !__webpack_require__(8) && + !__webpack_require__(4)(function () { + return ( + Object.defineProperty(__webpack_require__(113)('div'), 'a', { + get: function () { + return 7; + }, + }).a != 7 + ); + }); + + /***/ + }, + /* 176 */ + /***/ function (module, exports, __webpack_require__) { + exports.f = __webpack_require__(6); + + /***/ + }, + /* 177 */ + /***/ function (module, exports, __webpack_require__) { + var has = __webpack_require__(18); + var toIObject = __webpack_require__(19); + var arrayIndexOf = __webpack_require__(87)(false); + var IE_PROTO = __webpack_require__(115)('IE_PROTO'); + + module.exports = function (object, names) { + var O = toIObject(object); + var i = 0; + var result = []; + var key; + for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key); + // Don't enum bug & hidden keys + while (names.length > i) + if (has(O, (key = names[i++]))) { + ~arrayIndexOf(result, key) || result.push(key); + } + return result; + }; + + /***/ + }, + /* 178 */ + /***/ function (module, exports, __webpack_require__) { + var dP = __webpack_require__(9); + var anObject = __webpack_require__(2); + var getKeys = __webpack_require__(52); + + module.exports = __webpack_require__(8) + ? Object.defineProperties + : function defineProperties(O, Properties) { + anObject(O); + var keys = getKeys(Properties); + var length = keys.length; + var i = 0; + var P; + while (length > i) dP.f(O, (P = keys[i++]), Properties[P]); + return O; + }; + + /***/ + }, + /* 179 */ + /***/ function (module, exports, __webpack_require__) { + // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window + var toIObject = __webpack_require__(19); + var gOPN = __webpack_require__(55).f; + var toString = {}.toString; + + var windowNames = + typeof window == 'object' && window && Object.getOwnPropertyNames + ? Object.getOwnPropertyNames(window) + : []; + + var getWindowNames = function (it) { + try { + return gOPN(it); + } catch (e) { + return windowNames.slice(); + } + }; + + module.exports.f = function getOwnPropertyNames(it) { + return windowNames && toString.call(it) == '[object Window]' + ? getWindowNames(it) + : gOPN(toIObject(it)); + }; + + /***/ + }, + /* 180 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // 19.1.2.1 Object.assign(target, source, ...) + var DESCRIPTORS = __webpack_require__(8); + var getKeys = __webpack_require__(52); + var gOPS = __webpack_require__(88); + var pIE = __webpack_require__(76); + var toObject = __webpack_require__(11); + var IObject = __webpack_require__(75); + var $assign = Object.assign; + + // should work with symbols and should have deterministic property order (V8 bug) + module.exports = + !$assign || + __webpack_require__(4)(function () { + var A = {}; + var B = {}; + // eslint-disable-next-line no-undef + var S = Symbol(); + var K = 'abcdefghijklmnopqrst'; + A[S] = 7; + K.split('').forEach(function (k) { + B[k] = k; + }); + return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K; + }) + ? function assign(target, source) { + // eslint-disable-line no-unused-vars + var T = toObject(target); + var aLen = arguments.length; + var index = 1; + var getSymbols = gOPS.f; + var isEnum = pIE.f; + while (aLen > index) { + var S = IObject(arguments[index++]); + var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S); + var length = keys.length; + var j = 0; + var key; + while (length > j) { + key = keys[j++]; + if (!DESCRIPTORS || isEnum.call(S, key)) T[key] = S[key]; + } + } + return T; + } + : $assign; + + /***/ + }, + /* 181 */ + /***/ function (module, exports) { + // 7.2.9 SameValue(x, y) + module.exports = + Object.is || + function is(x, y) { + // eslint-disable-next-line no-self-compare + return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y; + }; + + /***/ + }, + /* 182 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var aFunction = __webpack_require__(12); + var isObject = __webpack_require__(5); + var invoke = __webpack_require__(183); + var arraySlice = [].slice; + var factories = {}; + + var construct = function (F, len, args) { + if (!(len in factories)) { + for (var n = [], i = 0; i < len; i++) n[i] = 'a[' + i + ']'; + // eslint-disable-next-line no-new-func + factories[len] = Function('F,a', 'return new F(' + n.join(',') + ')'); + } + return factories[len](F, args); + }; + + module.exports = + Function.bind || + function bind(that /* , ...args */) { + var fn = aFunction(this); + var partArgs = arraySlice.call(arguments, 1); + var bound = function (/* args... */) { + var args = partArgs.concat(arraySlice.call(arguments)); + return this instanceof bound ? construct(fn, args.length, args) : invoke(fn, args, that); + }; + if (isObject(fn.prototype)) bound.prototype = fn.prototype; + return bound; + }; + + /***/ + }, + /* 183 */ + /***/ function (module, exports) { + // fast apply, http://jsperf.lnkit.com/fast-apply/5 + module.exports = function (fn, args, that) { + var un = that === undefined; + switch (args.length) { + case 0: + return un ? fn() : fn.call(that); + case 1: + return un ? fn(args[0]) : fn.call(that, args[0]); + case 2: + return un ? fn(args[0], args[1]) : fn.call(that, args[0], args[1]); + case 3: + return un ? fn(args[0], args[1], args[2]) : fn.call(that, args[0], args[1], args[2]); + case 4: + return un + ? fn(args[0], args[1], args[2], args[3]) + : fn.call(that, args[0], args[1], args[2], args[3]); + } + return fn.apply(that, args); + }; + + /***/ + }, + /* 184 */ + /***/ function (module, exports, __webpack_require__) { + var $parseInt = __webpack_require__(3).parseInt; + var $trim = __webpack_require__(67).trim; + var ws = __webpack_require__(119); + var hex = /^[-+]?0[xX]/; + + module.exports = + $parseInt(ws + '08') !== 8 || $parseInt(ws + '0x16') !== 22 + ? function parseInt(str, radix) { + var string = $trim(String(str), 3); + return $parseInt(string, radix >>> 0 || (hex.test(string) ? 16 : 10)); + } + : $parseInt; + + /***/ + }, + /* 185 */ + /***/ function (module, exports, __webpack_require__) { + var $parseFloat = __webpack_require__(3).parseFloat; + var $trim = __webpack_require__(67).trim; + + module.exports = + 1 / $parseFloat(__webpack_require__(119) + '-0') !== -Infinity + ? function parseFloat(str) { + var string = $trim(String(str), 3); + var result = $parseFloat(string); + return result === 0 && string.charAt(0) == '-' ? -0 : result; + } + : $parseFloat; + + /***/ + }, + /* 186 */ + /***/ function (module, exports, __webpack_require__) { + var cof = __webpack_require__(25); + module.exports = function (it, msg) { + if (typeof it != 'number' && cof(it) != 'Number') throw TypeError(msg); + return +it; + }; + + /***/ + }, + /* 187 */ + /***/ function (module, exports, __webpack_require__) { + // 20.1.2.3 Number.isInteger(number) + var isObject = __webpack_require__(5); + var floor = Math.floor; + module.exports = function isInteger(it) { + return !isObject(it) && isFinite(it) && floor(it) === it; + }; + + /***/ + }, + /* 188 */ + /***/ function (module, exports) { + // 20.2.2.20 Math.log1p(x) + module.exports = + Math.log1p || + function log1p(x) { + return (x = +x) > -1e-8 && x < 1e-8 ? x - (x * x) / 2 : Math.log(1 + x); + }; + + /***/ + }, + /* 189 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.16 Math.fround(x) + var sign = __webpack_require__(122); + var pow = Math.pow; + var EPSILON = pow(2, -52); + var EPSILON32 = pow(2, -23); + var MAX32 = pow(2, 127) * (2 - EPSILON32); + var MIN32 = pow(2, -126); + + var roundTiesToEven = function (n) { + return n + 1 / EPSILON - 1 / EPSILON; + }; + + module.exports = + Math.fround || + function fround(x) { + var $abs = Math.abs(x); + var $sign = sign(x); + var a, result; + if ($abs < MIN32) return $sign * roundTiesToEven($abs / MIN32 / EPSILON32) * MIN32 * EPSILON32; + a = (1 + EPSILON32 / EPSILON) * $abs; + result = a - (a - $abs); + // eslint-disable-next-line no-self-compare + if (result > MAX32 || result != result) return $sign * Infinity; + return $sign * result; + }; + + /***/ + }, + /* 190 */ + /***/ function (module, exports, __webpack_require__) { + // call something on iterator step with safe closing on error + var anObject = __webpack_require__(2); + module.exports = function (iterator, fn, value, entries) { + try { + return entries ? fn(anObject(value)[0], value[1]) : fn(value); + // 7.4.6 IteratorClose(iterator, completion) + } catch (e) { + var ret = iterator['return']; + if (ret !== undefined) anObject(ret.call(iterator)); + throw e; + } + }; + + /***/ + }, + /* 191 */ + /***/ function (module, exports, __webpack_require__) { + var aFunction = __webpack_require__(12); + var toObject = __webpack_require__(11); + var IObject = __webpack_require__(75); + var toLength = __webpack_require__(7); + + module.exports = function (that, callbackfn, aLen, memo, isRight) { + aFunction(callbackfn); + var O = toObject(that); + var self = IObject(O); + var length = toLength(O.length); + var index = isRight ? length - 1 : 0; + var i = isRight ? -1 : 1; + if (aLen < 2) + for (;;) { + if (index in self) { + memo = self[index]; + index += i; + break; + } + index += i; + if (isRight ? index < 0 : length <= index) { + throw TypeError('Reduce of empty array with no initial value'); + } + } + for (; isRight ? index >= 0 : length > index; index += i) + if (index in self) { + memo = callbackfn(memo, self[index], index, O); + } + return memo; + }; + + /***/ + }, + /* 192 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + // 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length) + + var toObject = __webpack_require__(11); + var toAbsoluteIndex = __webpack_require__(53); + var toLength = __webpack_require__(7); + + module.exports = + [].copyWithin || + function copyWithin(target /* = 0 */, start /* = 0, end = @length */) { + var O = toObject(this); + var len = toLength(O.length); + var to = toAbsoluteIndex(target, len); + var from = toAbsoluteIndex(start, len); + var end = arguments.length > 2 ? arguments[2] : undefined; + var count = Math.min((end === undefined ? len : toAbsoluteIndex(end, len)) - from, len - to); + var inc = 1; + if (from < to && to < from + count) { + inc = -1; + from += count - 1; + to += count - 1; + } + while (count-- > 0) { + if (from in O) O[to] = O[from]; + else delete O[to]; + to += inc; + from += inc; + } + return O; + }; + + /***/ + }, + /* 193 */ + /***/ function (module, exports) { + module.exports = function (done, value) { + return { value: value, done: !!done }; + }; + + /***/ + }, + /* 194 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var regexpExec = __webpack_require__(134); + __webpack_require__(0)( + { + target: 'RegExp', + proto: true, + forced: regexpExec !== /./.exec, + }, + { + exec: regexpExec, + }, + ); + + /***/ + }, + /* 195 */ + /***/ function (module, exports, __webpack_require__) { + // 21.2.5.3 get RegExp.prototype.flags() + if (__webpack_require__(8) && /./g.flags != 'g') + __webpack_require__(9).f(RegExp.prototype, 'flags', { + configurable: true, + get: __webpack_require__(77), + }); + + /***/ + }, + /* 196 */ + /***/ function (module, exports) { + module.exports = function (exec) { + try { + return { e: false, v: exec() }; + } catch (e) { + return { e: true, v: e }; + } + }; + + /***/ + }, + /* 197 */ + /***/ function (module, exports, __webpack_require__) { + var anObject = __webpack_require__(2); + var isObject = __webpack_require__(5); + var newPromiseCapability = __webpack_require__(138); + + module.exports = function (C, x) { + anObject(C); + if (isObject(x) && x.constructor === C) return x; + var promiseCapability = newPromiseCapability.f(C); + var resolve = promiseCapability.resolve; + resolve(x); + return promiseCapability.promise; + }; + + /***/ + }, + /* 198 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var strong = __webpack_require__(199); + var validate = __webpack_require__(60); + var MAP = 'Map'; + + // 23.1 Map Objects + module.exports = __webpack_require__(96)( + MAP, + function (get) { + return function Map() { + return get(this, arguments.length > 0 ? arguments[0] : undefined); + }; + }, + { + // 23.1.3.6 Map.prototype.get(key) + get: function get(key) { + var entry = strong.getEntry(validate(this, MAP), key); + return entry && entry.v; + }, + // 23.1.3.9 Map.prototype.set(key, value) + set: function set(key, value) { + return strong.def(validate(this, MAP), key === 0 ? 0 : key, value); + }, + }, + strong, + true, + ); + + /***/ + }, + /* 199 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var dP = __webpack_require__(9).f; + var create = __webpack_require__(54); + var redefineAll = __webpack_require__(59); + var ctx = __webpack_require__(24); + var anInstance = __webpack_require__(57); + var forOf = __webpack_require__(58); + var $iterDefine = __webpack_require__(124); + var step = __webpack_require__(193); + var setSpecies = __webpack_require__(56); + var DESCRIPTORS = __webpack_require__(8); + var fastKey = __webpack_require__(43).fastKey; + var validate = __webpack_require__(60); + var SIZE = DESCRIPTORS ? '_s' : 'size'; + + var getEntry = function (that, key) { + // fast case + var index = fastKey(key); + var entry; + if (index !== 'F') return that._i[index]; + // frozen object case + for (entry = that._f; entry; entry = entry.n) { + if (entry.k == key) return entry; + } + }; + + module.exports = { + getConstructor: function (wrapper, NAME, IS_MAP, ADDER) { + var C = wrapper(function (that, iterable) { + anInstance(that, C, NAME, '_i'); + that._t = NAME; // collection type + that._i = create(null); // index + that._f = undefined; // first entry + that._l = undefined; // last entry + that[SIZE] = 0; // size + if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that); + }); + redefineAll(C.prototype, { + // 23.1.3.1 Map.prototype.clear() + // 23.2.3.2 Set.prototype.clear() + clear: function clear() { + for (var that = validate(this, NAME), data = that._i, entry = that._f; entry; entry = entry.n) { + entry.r = true; + if (entry.p) entry.p = entry.p.n = undefined; + delete data[entry.i]; + } + that._f = that._l = undefined; + that[SIZE] = 0; + }, + // 23.1.3.3 Map.prototype.delete(key) + // 23.2.3.4 Set.prototype.delete(value) + delete: function (key) { + var that = validate(this, NAME); + var entry = getEntry(that, key); + if (entry) { + var next = entry.n; + var prev = entry.p; + delete that._i[entry.i]; + entry.r = true; + if (prev) prev.n = next; + if (next) next.p = prev; + if (that._f == entry) that._f = next; + if (that._l == entry) that._l = prev; + that[SIZE]--; + } + return !!entry; + }, + // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined) + // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined) + forEach: function forEach(callbackfn /* , that = undefined */) { + validate(this, NAME); + var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3); + var entry; + while ((entry = entry ? entry.n : this._f)) { + f(entry.v, entry.k, this); + // revert to the last existing entry + while (entry && entry.r) entry = entry.p; + } + }, + // 23.1.3.7 Map.prototype.has(key) + // 23.2.3.7 Set.prototype.has(value) + has: function has(key) { + return !!getEntry(validate(this, NAME), key); + }, + }); + if (DESCRIPTORS) + dP(C.prototype, 'size', { + get: function () { + return validate(this, NAME)[SIZE]; + }, + }); + return C; + }, + def: function (that, key, value) { + var entry = getEntry(that, key); + var prev, index; + // change existing entry + if (entry) { + entry.v = value; + // create new entry + } else { + that._l = entry = { + i: (index = fastKey(key, true)), // <- index + k: key, // <- key + v: value, // <- value + p: (prev = that._l), // <- previous entry + n: undefined, // <- next entry + r: false, // <- removed + }; + if (!that._f) that._f = entry; + if (prev) prev.n = entry; + that[SIZE]++; + // add to index + if (index !== 'F') that._i[index] = entry; + } + return that; + }, + getEntry: getEntry, + setStrong: function (C, NAME, IS_MAP) { + // add .keys, .values, .entries, [@@iterator] + // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11 + $iterDefine( + C, + NAME, + function (iterated, kind) { + this._t = validate(iterated, NAME); // target + this._k = kind; // kind + this._l = undefined; // previous + }, + function () { + var that = this; + var kind = that._k; + var entry = that._l; + // revert to the last existing entry + while (entry && entry.r) entry = entry.p; + // get next entry + if (!that._t || !(that._l = entry = entry ? entry.n : that._t._f)) { + // or finish the iteration + that._t = undefined; + return step(1); + } + // return step by kind + if (kind == 'keys') return step(0, entry.k); + if (kind == 'values') return step(0, entry.v); + return step(0, [entry.k, entry.v]); + }, + IS_MAP ? 'entries' : 'values', + !IS_MAP, + true, + ); + + // add [@@species], 23.1.2.2, 23.2.2.2 + setSpecies(NAME); + }, + }; + + /***/ + }, + /* 200 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var strong = __webpack_require__(199); + var validate = __webpack_require__(60); + var SET = 'Set'; + + // 23.2 Set Objects + module.exports = __webpack_require__(96)( + SET, + function (get) { + return function Set() { + return get(this, arguments.length > 0 ? arguments[0] : undefined); + }; + }, + { + // 23.2.3.1 Set.prototype.add(value) + add: function add(value) { + return strong.def(validate(this, SET), (value = value === 0 ? 0 : value), value); + }, + }, + strong, + ); + + /***/ + }, + /* 201 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var global = __webpack_require__(3); + var each = __webpack_require__(34)(0); + var redefine = __webpack_require__(16); + var meta = __webpack_require__(43); + var assign = __webpack_require__(180); + var weak = __webpack_require__(202); + var isObject = __webpack_require__(5); + var validate = __webpack_require__(60); + var NATIVE_WEAK_MAP = __webpack_require__(60); + var IS_IE11 = !global.ActiveXObject && 'ActiveXObject' in global; + var WEAK_MAP = 'WeakMap'; + var getWeak = meta.getWeak; + var isExtensible = Object.isExtensible; + var uncaughtFrozenStore = weak.ufstore; + var InternalMap; + + var wrapper = function (get) { + return function WeakMap() { + return get(this, arguments.length > 0 ? arguments[0] : undefined); + }; + }; + + var methods = { + // 23.3.3.3 WeakMap.prototype.get(key) + get: function get(key) { + if (isObject(key)) { + var data = getWeak(key); + if (data === true) return uncaughtFrozenStore(validate(this, WEAK_MAP)).get(key); + return data ? data[this._i] : undefined; + } + }, + // 23.3.3.5 WeakMap.prototype.set(key, value) + set: function set(key, value) { + return weak.def(validate(this, WEAK_MAP), key, value); + }, + }; + + // 23.3 WeakMap Objects + var $WeakMap = (module.exports = __webpack_require__(96)(WEAK_MAP, wrapper, methods, weak, true, true)); + + // IE11 WeakMap frozen keys fix + if (NATIVE_WEAK_MAP && IS_IE11) { + InternalMap = weak.getConstructor(wrapper, WEAK_MAP); + assign(InternalMap.prototype, methods); + meta.NEED = true; + each(['delete', 'has', 'get', 'set'], function (key) { + var proto = $WeakMap.prototype; + var method = proto[key]; + redefine(proto, key, function (a, b) { + // store frozen objects on internal weakmap shim + if (isObject(a) && !isExtensible(a)) { + if (!this._f) this._f = new InternalMap(); + var result = this._f[key](a, b); + return key == 'set' ? this : result; + // store all the rest on native weakmap + } + return method.call(this, a, b); + }); + }); + } + + /***/ + }, + /* 202 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var redefineAll = __webpack_require__(59); + var getWeak = __webpack_require__(43).getWeak; + var anObject = __webpack_require__(2); + var isObject = __webpack_require__(5); + var anInstance = __webpack_require__(57); + var forOf = __webpack_require__(58); + var createArrayMethod = __webpack_require__(34); + var $has = __webpack_require__(18); + var validate = __webpack_require__(60); + var arrayFind = createArrayMethod(5); + var arrayFindIndex = createArrayMethod(6); + var id = 0; + + // fallback for uncaught frozen keys + var uncaughtFrozenStore = function (that) { + return that._l || (that._l = new UncaughtFrozenStore()); + }; + var UncaughtFrozenStore = function () { + this.a = []; + }; + var findUncaughtFrozen = function (store, key) { + return arrayFind(store.a, function (it) { + return it[0] === key; + }); + }; + UncaughtFrozenStore.prototype = { + get: function (key) { + var entry = findUncaughtFrozen(this, key); + if (entry) return entry[1]; + }, + has: function (key) { + return !!findUncaughtFrozen(this, key); + }, + set: function (key, value) { + var entry = findUncaughtFrozen(this, key); + if (entry) entry[1] = value; + else this.a.push([key, value]); + }, + delete: function (key) { + var index = arrayFindIndex(this.a, function (it) { + return it[0] === key; + }); + if (~index) this.a.splice(index, 1); + return !!~index; + }, + }; + + module.exports = { + getConstructor: function (wrapper, NAME, IS_MAP, ADDER) { + var C = wrapper(function (that, iterable) { + anInstance(that, C, NAME, '_i'); + that._t = NAME; // collection type + that._i = id++; // collection id + that._l = undefined; // leak store for uncaught frozen objects + if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that); + }); + redefineAll(C.prototype, { + // 23.3.3.2 WeakMap.prototype.delete(key) + // 23.4.3.3 WeakSet.prototype.delete(value) + delete: function (key) { + if (!isObject(key)) return false; + var data = getWeak(key); + if (data === true) return uncaughtFrozenStore(validate(this, NAME))['delete'](key); + return data && $has(data, this._i) && delete data[this._i]; + }, + // 23.3.3.4 WeakMap.prototype.has(key) + // 23.4.3.4 WeakSet.prototype.has(value) + has: function has(key) { + if (!isObject(key)) return false; + var data = getWeak(key); + if (data === true) return uncaughtFrozenStore(validate(this, NAME)).has(key); + return data && $has(data, this._i); + }, + }); + return C; + }, + def: function (that, key, value) { + var data = getWeak(anObject(key), true); + if (data === true) uncaughtFrozenStore(that).set(key, value); + else data[that._i] = value; + return that; + }, + ufstore: uncaughtFrozenStore, + }; + + /***/ + }, + /* 203 */ + /***/ function (module, exports, __webpack_require__) { + // https://tc39.github.io/ecma262/#sec-toindex + var toInteger = __webpack_require__(26); + var toLength = __webpack_require__(7); + module.exports = function (it) { + if (it === undefined) return 0; + var number = toInteger(it); + var length = toLength(number); + if (number !== length) throw RangeError('Wrong length!'); + return length; + }; + + /***/ + }, + /* 204 */ + /***/ function (module, exports, __webpack_require__) { + // all object keys, includes non-enumerable and symbols + var gOPN = __webpack_require__(55); + var gOPS = __webpack_require__(88); + var anObject = __webpack_require__(2); + var Reflect = __webpack_require__(3).Reflect; + module.exports = + (Reflect && Reflect.ownKeys) || + function ownKeys(it) { + var keys = gOPN.f(anObject(it)); + var getSymbols = gOPS.f; + return getSymbols ? keys.concat(getSymbols(it)) : keys; + }; + + /***/ + }, + /* 205 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray + var isArray = __webpack_require__(89); + var isObject = __webpack_require__(5); + var toLength = __webpack_require__(7); + var ctx = __webpack_require__(24); + var IS_CONCAT_SPREADABLE = __webpack_require__(6)('isConcatSpreadable'); + + function flattenIntoArray(target, original, source, sourceLen, start, depth, mapper, thisArg) { + var targetIndex = start; + var sourceIndex = 0; + var mapFn = mapper ? ctx(mapper, thisArg, 3) : false; + var element, spreadable; + + while (sourceIndex < sourceLen) { + if (sourceIndex in source) { + element = mapFn ? mapFn(source[sourceIndex], sourceIndex, original) : source[sourceIndex]; + + spreadable = false; + if (isObject(element)) { + spreadable = element[IS_CONCAT_SPREADABLE]; + spreadable = spreadable !== undefined ? !!spreadable : isArray(element); + } + + if (spreadable && depth > 0) { + targetIndex = + flattenIntoArray( + target, + original, + element, + toLength(element.length), + targetIndex, + depth - 1, + ) - 1; + } else { + if (targetIndex >= 0x1fffffffffffff) throw TypeError(); + target[targetIndex] = element; + } + + targetIndex++; + } + sourceIndex++; + } + return targetIndex; + } + + module.exports = flattenIntoArray; + + /***/ + }, + /* 206 */ + /***/ function (module, exports, __webpack_require__) { + // https://github.com/tc39/proposal-string-pad-start-end + var toLength = __webpack_require__(7); + var repeat = __webpack_require__(121); + var defined = __webpack_require__(32); + + module.exports = function (that, maxLength, fillString, left) { + var S = String(defined(that)); + var stringLength = S.length; + var fillStr = fillString === undefined ? ' ' : String(fillString); + var intMaxLength = toLength(maxLength); + if (intMaxLength <= stringLength || fillStr == '') return S; + var fillLen = intMaxLength - stringLength; + var stringFiller = repeat.call(fillStr, Math.ceil(fillLen / fillStr.length)); + if (stringFiller.length > fillLen) stringFiller = stringFiller.slice(0, fillLen); + return left ? stringFiller + S : S + stringFiller; + }; + + /***/ + }, + /* 207 */ + /***/ function (module, exports, __webpack_require__) { + var DESCRIPTORS = __webpack_require__(8); + var getKeys = __webpack_require__(52); + var toIObject = __webpack_require__(19); + var isEnum = __webpack_require__(76).f; + module.exports = function (isEntries) { + return function (it) { + var O = toIObject(it); + var keys = getKeys(O); + var length = keys.length; + var i = 0; + var result = []; + var key; + while (length > i) { + key = keys[i++]; + if (!DESCRIPTORS || isEnum.call(O, key)) { + result.push(isEntries ? [key, O[key]] : O[key]); + } + } + return result; + }; + }; + + /***/ + }, + /* 208 */ + /***/ function (module, exports, __webpack_require__) { + // https://github.com/DavidBruant/Map-Set.prototype.toJSON + var classof = __webpack_require__(66); + var from = __webpack_require__(209); + module.exports = function (NAME) { + return function toJSON() { + if (classof(this) != NAME) throw TypeError(NAME + "#toJSON isn't generic"); + return from(this); + }; + }; + + /***/ + }, + /* 209 */ + /***/ function (module, exports, __webpack_require__) { + var forOf = __webpack_require__(58); + + module.exports = function (iter, ITERATOR) { + var result = []; + forOf(iter, false, result.push, result, ITERATOR); + return result; + }; + + /***/ + }, + /* 210 */ + /***/ function (module, exports) { + // https://rwaldron.github.io/proposal-math-extensions/ + module.exports = + Math.scale || + function scale(x, inLow, inHigh, outLow, outHigh) { + if ( + arguments.length === 0 || + // eslint-disable-next-line no-self-compare + x != x || + // eslint-disable-next-line no-self-compare + inLow != inLow || + // eslint-disable-next-line no-self-compare + inHigh != inHigh || + // eslint-disable-next-line no-self-compare + outLow != outLow || + // eslint-disable-next-line no-self-compare + outHigh != outHigh + ) + return NaN; + if (x === Infinity || x === -Infinity) return x; + return ((x - inLow) * (outHigh - outLow)) / (inHigh - inLow) + outLow; + }; + + /***/ + }, + /* 211 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var _interopRequireWildcard = __webpack_require__(472); + + var _interopRequireDefault = __webpack_require__(41); + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.default = void 0; + + var _assign = _interopRequireDefault(__webpack_require__(229)); + + var _stringify = _interopRequireDefault(__webpack_require__(106)); + + var _keys = _interopRequireDefault(__webpack_require__(160)); + + var _reactDom = _interopRequireDefault(__webpack_require__(230)); + + var ClientStartup = _interopRequireWildcard(__webpack_require__(517)); + + var _handleError2 = _interopRequireDefault(__webpack_require__(233)); + + var _ComponentRegistry = _interopRequireDefault(__webpack_require__(234)); + + var _StoreRegistry = _interopRequireDefault(__webpack_require__(533)); + + var _serverRenderReactComponent2 = _interopRequireDefault(__webpack_require__(534)); + + var _buildConsoleReplay2 = _interopRequireDefault(__webpack_require__(237)); + + var _createReactElement = _interopRequireDefault(__webpack_require__(161)); + + var _Authenticity = _interopRequireDefault(__webpack_require__(537)); + + var _context = _interopRequireDefault(__webpack_require__(538)); + + var ctx = (0, _context.default)(); + var DEFAULT_OPTIONS = { + traceTurbolinks: false, + }; + ctx.ReactOnRails = { + /** + * Main entry point to using the react-on-rails npm package. This is how Rails will be able to + * find you components for rendering. + * @param components (key is component name, value is component) + */ + register: function register(components) { + _ComponentRegistry.default.register(components); + }, + + /** + * Allows registration of store generators to be used by multiple react components on one Rails + * view. store generators are functions that take one arg, props, and return a store. Note that + * the setStore API is different in that it's the actual store hydrated with props. + * @param stores (keys are store names, values are the store generators) + */ + registerStore: function registerStore(stores) { + if (!stores) { + throw new Error( + 'Called ReactOnRails.registerStores with a null or undefined, rather than ' + + 'an Object with keys being the store names and the values are the store generators.', + ); + } + + _StoreRegistry.default.register(stores); + }, + + /** + * Allows retrieval of the store by name. This store will be hydrated by any Rails form props. + * Pass optional param throwIfMissing = false if you want to use this call to get back null if the + * store with name is not registered. + * @param name + * @param throwIfMissing Defaults to true. Set to false to have this call return undefined if + * there is no store with the given name. + * @returns Redux Store, possibly hydrated + */ + getStore: function getStore(name) { + var throwIfMissing = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + return _StoreRegistry.default.getStore(name, throwIfMissing); + }, + + /** + * Set options for ReactOnRails, typically before you call ReactOnRails.register + * Available Options: + * `traceTurbolinks: true|false Gives you debugging messages on Turbolinks events + */ + setOptions: function setOptions(newOptions) { + if ('traceTurbolinks' in newOptions) { + this.options.traceTurbolinks = newOptions.traceTurbolinks; // eslint-disable-next-line no-param-reassign + + delete newOptions.traceTurbolinks; + } + + if ((0, _keys.default)(newOptions).length > 0) { + throw new Error( + 'Invalid options passed to ReactOnRails.options: ', + (0, _stringify.default)(newOptions), + ); + } + }, + + /** + * Allow directly calling the page loaded script in case the default events that trigger react + * rendering are not sufficient, such as when loading JavaScript asynchronously with TurboLinks: + * More details can be found here: + * https://github.com/shakacode/react_on_rails/blob/master/docs/additional-reading/turbolinks.md + */ + reactOnRailsPageLoaded: function reactOnRailsPageLoaded() { + ClientStartup.reactOnRailsPageLoaded(); + }, + + /** + * Returns CSRF authenticity token inserted by Rails csrf_meta_tags + * @returns String or null + */ + authenticityToken: function authenticityToken() { + return _Authenticity.default.authenticityToken(); + }, + + /** + * Returns header with csrf authenticity token and XMLHttpRequest + * @param {*} other headers + * @returns {*} header + */ + authenticityHeaders: function authenticityHeaders() { + var otherHeaders = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + return _Authenticity.default.authenticityHeaders(otherHeaders); + }, + // ///////////////////////////////////////////////////////////////////////////// + // INTERNALLY USED APIs + // ///////////////////////////////////////////////////////////////////////////// + + /** + * Retrieve an option by key. + * @param key + * @returns option value + */ + option: function option(key) { + return this.options[key]; + }, + + /** + * Allows retrieval of the store generator by name. This is used internally by ReactOnRails after + * a rails form loads to prepare stores. + * @param name + * @returns Redux Store generator function + */ + getStoreGenerator: function getStoreGenerator(name) { + return _StoreRegistry.default.getStoreGenerator(name); + }, + + /** + * Allows saving the store populated by Rails form props. Used internally by ReactOnRails. + * @param name + * @returns Redux Store, possibly hydrated + */ + setStore: function setStore(name, store) { + return _StoreRegistry.default.setStore(name, store); + }, + + /** + * Clears hydratedStores to avoid accidental usage of wrong store hydrated in previous/parallel + * request. + */ + clearHydratedStores: function clearHydratedStores() { + _StoreRegistry.default.clearHydratedStores(); + }, + + /** + * ReactOnRails.render("HelloWorldApp", {name: "Stranger"}, 'app'); + * + * Does this: + * ReactDOM.render(React.createElement(HelloWorldApp, {name: "Stranger"}), + * document.getElementById('app')) + * + * @param name Name of your registered component + * @param props Props to pass to your component + * @param domNodeId + * @param hydrate Pass truthy to update server rendered html. Default is falsy + * @returns {virtualDomElement} Reference to your component's backing instance + */ + render: function render(name, props, domNodeId, hydrate) { + var componentObj = _ComponentRegistry.default.get(name); + + var reactElement = (0, _createReactElement.default)({ + componentObj: componentObj, + props: props, + domNodeId: domNodeId, + }); + var render = hydrate ? _reactDom.default.hydrate : _reactDom.default.render; // eslint-disable-next-line react/no-render-return-value + + return render(reactElement, document.getElementById(domNodeId)); + }, + + /** + * Get the component that you registered + * @param name + * @returns {name, component, generatorFunction, isRenderer} + */ + getComponent: function getComponent(name) { + return _ComponentRegistry.default.get(name); + }, + + /** + * Used by server rendering by Rails + * @param options + */ + serverRenderReactComponent: function serverRenderReactComponent(options) { + return (0, _serverRenderReactComponent2.default)(options); + }, + + /** + * Used by Rails to catch errors in rendering + * @param options + */ + handleError: function handleError(options) { + return (0, _handleError2.default)(options); + }, + + /** + * Used by Rails server rendering to replay console messages. + */ + buildConsoleReplay: function buildConsoleReplay() { + return (0, _buildConsoleReplay2.default)(); + }, + + /** + * Get an Object containing all registered components. Useful for debugging. + * @returns {*} + */ + registeredComponents: function registeredComponents() { + return _ComponentRegistry.default.components(); + }, + + /** + * Get an Object containing all registered store generators. Useful for debugging. + * @returns {*} + */ + storeGenerators: function storeGenerators() { + return _StoreRegistry.default.storeGenerators(); + }, + + /** + * Get an Object containing all hydrated stores. Useful for debugging. + * @returns {*} + */ + stores: function stores() { + return _StoreRegistry.default.stores(); + }, + resetOptions: function resetOptions() { + this.options = (0, _assign.default)({}, DEFAULT_OPTIONS); + }, + }; + ctx.ReactOnRails.resetOptions(); + ClientStartup.clientStartup(ctx); + var _default = ctx.ReactOnRails; + exports.default = _default; + + /***/ + }, + /* 212 */ + /***/ function (module, exports, __webpack_require__) { + var pIE = __webpack_require__(101); + var createDesc = __webpack_require__(79); + var toIObject = __webpack_require__(61); + var toPrimitive = __webpack_require__(143); + var has = __webpack_require__(45); + var IE8_DOM_DEFINE = __webpack_require__(213); + var gOPD = Object.getOwnPropertyDescriptor; + + exports.f = __webpack_require__(28) + ? gOPD + : function getOwnPropertyDescriptor(O, P) { + O = toIObject(O); + P = toPrimitive(P, true); + if (IE8_DOM_DEFINE) + try { + return gOPD(O, P); + } catch (e) { + /* empty */ + } + if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]); + }; + + /***/ + }, + /* 213 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = + !__webpack_require__(28) && + !__webpack_require__(62)(function () { + return ( + Object.defineProperty(__webpack_require__(214)('div'), 'a', { + get: function () { + return 7; + }, + }).a != 7 + ); + }); + + /***/ + }, + /* 214 */ + /***/ function (module, exports, __webpack_require__) { + var isObject = __webpack_require__(35); + var document = __webpack_require__(29).document; + // typeof document.createElement is 'object' in old IE + var is = isObject(document) && isObject(document.createElement); + module.exports = function (it) { + return is ? document.createElement(it) : {}; + }; + + /***/ + }, + /* 215 */ + /***/ function (module, exports, __webpack_require__) { + // most Object methods by ES6 should accept primitives + var $export = __webpack_require__(36); + var core = __webpack_require__(13); + var fails = __webpack_require__(62); + module.exports = function (KEY, exec) { + var fn = (core.Object || {})[KEY] || Object[KEY]; + var exp = {}; + exp[KEY] = exec(fn); + $export( + $export.S + + $export.F * + fails(function () { + fn(1); + }), + 'Object', + exp, + ); + }; + + /***/ + }, + /* 216 */ + /***/ function (module, exports) { + module.exports = function (it) { + if (typeof it != 'function') throw TypeError(it + ' is not a function!'); + return it; + }; + + /***/ + }, + /* 217 */ + /***/ function (module, exports, __webpack_require__) { + var has = __webpack_require__(45); + var toIObject = __webpack_require__(61); + var arrayIndexOf = __webpack_require__(485)(false); + var IE_PROTO = __webpack_require__(149)('IE_PROTO'); + + module.exports = function (object, names) { + var O = toIObject(object); + var i = 0; + var result = []; + var key; + for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key); + // Don't enum bug & hidden keys + while (names.length > i) + if (has(O, (key = names[i++]))) { + ~arrayIndexOf(result, key) || result.push(key); + } + return result; + }; + + /***/ + }, + /* 218 */ + /***/ function (module, exports) { + module.exports = function (done, value) { + return { value: value, done: !!done }; + }; + + /***/ + }, + /* 219 */ + /***/ function (module, exports, __webpack_require__) { + // 7.2.2 IsArray(argument) + var cof = __webpack_require__(141); + module.exports = + Array.isArray || + function isArray(arg) { + return cof(arg) == 'Array'; + }; + + /***/ + }, + /* 220 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) + var $keys = __webpack_require__(217); + var hiddenKeys = __webpack_require__(151).concat('length', 'prototype'); + + exports.f = + Object.getOwnPropertyNames || + function getOwnPropertyNames(O) { + return $keys(O, hiddenKeys); + }; + + /***/ + }, + /* 221 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // 19.1.2.1 Object.assign(target, source, ...) + var DESCRIPTORS = __webpack_require__(28); + var getKeys = __webpack_require__(81); + var gOPS = __webpack_require__(155); + var pIE = __webpack_require__(101); + var toObject = __webpack_require__(70); + var IObject = __webpack_require__(140); + var $assign = Object.assign; + + // should work with symbols and should have deterministic property order (V8 bug) + module.exports = + !$assign || + __webpack_require__(62)(function () { + var A = {}; + var B = {}; + // eslint-disable-next-line no-undef + var S = Symbol(); + var K = 'abcdefghijklmnopqrst'; + A[S] = 7; + K.split('').forEach(function (k) { + B[k] = k; + }); + return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K; + }) + ? function assign(target, source) { + // eslint-disable-line no-unused-vars + var T = toObject(target); + var aLen = arguments.length; + var index = 1; + var getSymbols = gOPS.f; + var isEnum = pIE.f; + while (aLen > index) { + var S = IObject(arguments[index++]); + var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S); + var length = keys.length; + var j = 0; + var key; + while (length > j) { + key = keys[j++]; + if (!DESCRIPTORS || isEnum.call(S, key)) T[key] = S[key]; + } + } + return T; + } + : $assign; + + /***/ + }, + /* 222 */ + /***/ function (module, exports, __webpack_require__) { + // call something on iterator step with safe closing on error + var anObject = __webpack_require__(63); + module.exports = function (iterator, fn, value, entries) { + try { + return entries ? fn(anObject(value)[0], value[1]) : fn(value); + // 7.4.6 IteratorClose(iterator, completion) + } catch (e) { + var ret = iterator['return']; + if (ret !== undefined) anObject(ret.call(iterator)); + throw e; + } + }; + + /***/ + }, + /* 223 */ + /***/ function (module, exports, __webpack_require__) { + // check on default Array iterator + var Iterators = __webpack_require__(80); + var ITERATOR = __webpack_require__(22)('iterator'); + var ArrayProto = Array.prototype; + + module.exports = function (it) { + return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it); + }; + + /***/ + }, + /* 224 */ + /***/ function (module, exports, __webpack_require__) { + var classof = __webpack_require__(225); + var ITERATOR = __webpack_require__(22)('iterator'); + var Iterators = __webpack_require__(80); + module.exports = __webpack_require__(13).getIteratorMethod = function (it) { + if (it != undefined) return it[ITERATOR] || it['@@iterator'] || Iterators[classof(it)]; + }; + + /***/ + }, + /* 225 */ + /***/ function (module, exports, __webpack_require__) { + // getting tag from 19.1.3.6 Object.prototype.toString() + var cof = __webpack_require__(141); + var TAG = __webpack_require__(22)('toStringTag'); + // ES3 wrong here + var ARG = + cof( + (function () { + return arguments; + })(), + ) == 'Arguments'; + + // fallback for IE11 Script Access Denied error + var tryGet = function (it, key) { + try { + return it[key]; + } catch (e) { + /* empty */ + } + }; + + module.exports = function (it) { + var O, T, B; + return it === undefined + ? 'Undefined' + : it === null + ? 'Null' + : // @@toStringTag case + typeof (T = tryGet((O = Object(it)), TAG)) == 'string' + ? T + : // builtinTag case + ARG + ? cof(O) + : // ES3 arguments fallback + (B = cof(O)) == 'Object' && typeof O.callee == 'function' + ? 'Arguments' + : B; + }; + + /***/ + }, + /* 226 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var global = __webpack_require__(29); + var $export = __webpack_require__(36); + var meta = __webpack_require__(82); + var fails = __webpack_require__(62); + var hide = __webpack_require__(46); + var redefineAll = __webpack_require__(158); + var forOf = __webpack_require__(83); + var anInstance = __webpack_require__(159); + var isObject = __webpack_require__(35); + var setToStringTag = __webpack_require__(105); + var dP = __webpack_require__(30).f; + var each = __webpack_require__(157)(0); + var DESCRIPTORS = __webpack_require__(28); + + module.exports = function (NAME, wrapper, methods, common, IS_MAP, IS_WEAK) { + var Base = global[NAME]; + var C = Base; + var ADDER = IS_MAP ? 'set' : 'add'; + var proto = C && C.prototype; + var O = {}; + if ( + !DESCRIPTORS || + typeof C != 'function' || + !( + IS_WEAK || + (proto.forEach && + !fails(function () { + new C().entries().next(); + })) + ) + ) { + // create collection constructor + C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER); + redefineAll(C.prototype, methods); + meta.NEED = true; + } else { + C = wrapper(function (target, iterable) { + anInstance(target, C, NAME, '_c'); + target._c = new Base(); + if (iterable != undefined) forOf(iterable, IS_MAP, target[ADDER], target); + }); + each('add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON'.split(','), function (KEY) { + var IS_ADDER = KEY == 'add' || KEY == 'set'; + if (KEY in proto && !(IS_WEAK && KEY == 'clear')) + hide(C.prototype, KEY, function (a, b) { + anInstance(this, C, KEY); + if (!IS_ADDER && IS_WEAK && !isObject(a)) return KEY == 'get' ? undefined : false; + var result = this._c[KEY](a === 0 ? 0 : a, b); + return IS_ADDER ? this : result; + }); + }); + IS_WEAK || + dP(C.prototype, 'size', { + get: function () { + return this._c.size; + }, + }); + } + + setToStringTag(C, NAME); + + O[NAME] = C; + $export($export.G + $export.W + $export.F, O); + + if (!IS_WEAK) common.setStrong(C, NAME, IS_MAP); + + return C; + }; + + /***/ + }, + /* 227 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // https://tc39.github.io/proposal-setmap-offrom/ + var $export = __webpack_require__(36); + + module.exports = function (COLLECTION) { + $export($export.S, COLLECTION, { + of: function of() { + var length = arguments.length; + var A = new Array(length); + while (length--) A[length] = arguments[length]; + return new this(A); + }, + }); + }; + + /***/ + }, + /* 228 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // https://tc39.github.io/proposal-setmap-offrom/ + var $export = __webpack_require__(36); + var aFunction = __webpack_require__(216); + var ctx = __webpack_require__(69); + var forOf = __webpack_require__(83); + + module.exports = function (COLLECTION) { + $export($export.S, COLLECTION, { + from: function from(source /* , mapFn, thisArg */) { + var mapFn = arguments[1]; + var mapping, A, n, cb; + aFunction(this); + mapping = mapFn !== undefined; + if (mapping) aFunction(mapFn); + if (source == undefined) return new this(); + A = []; + if (mapping) { + n = 0; + cb = ctx(mapFn, arguments[2], 2); + forOf(source, false, function (nextItem) { + A.push(cb(nextItem, n++)); + }); + } else { + forOf(source, false, A.push, A); + } + return new this(A); + }, + }); + }; + + /***/ + }, + /* 229 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = __webpack_require__(506); + + /***/ + }, + /* 230 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + function checkDCE() { + /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */ + if ( + typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined' || + typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== 'function' + ) { + return; + } + if (true) { + // This branch is unreachable because this function is only called + // in production, but the condition is true only in development. + // Therefore if the branch is still here, dead code elimination wasn't + // properly applied. + // Don't change the message. React DevTools relies on it. Also make sure + // this message doesn't occur elsewhere in this function, or it will cause + // a false positive. + throw new Error('^_^'); + } + try { + // Verify that the code above has been dead code eliminated (DCE'd). + __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE); + } catch (err) { + // DevTools shouldn't crash React, no matter what. + // We should still report in case we break this code. + console.error(err); + } + } + + if (false) { + // DCE check should happen before ReactDOM bundle executes so that + // DevTools can report bad minification during injection. + checkDCE(); + module.exports = require('./cjs/react-dom.production.min.js'); + } else { + module.exports = __webpack_require__(511); + } + + /***/ + }, + /* 231 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + + var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; + + module.exports = ReactPropTypesSecret; + + /***/ + }, + /* 232 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.default = isResultNonReactComponent; + + function isResultNonReactComponent(reactElementOrRouterResult) { + return !!( + reactElementOrRouterResult.renderedHtml || + reactElementOrRouterResult.redirectLocation || + reactElementOrRouterResult.error + ); + } + + /***/ + }, + /* 233 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var _interopRequireDefault = __webpack_require__(41); + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.default = void 0; + + var _react = _interopRequireDefault(__webpack_require__(1)); + + var _server = _interopRequireDefault(__webpack_require__(108)); + + function handleGeneratorFunctionIssue(options) { + var e = options.e, + name = options.name; + var msg = ''; + + if (name) { + var lastLine = + 'A generator function takes a single arg of props (and the location for react-router) ' + + 'and returns a ReactElement.'; + var shouldBeGeneratorError = + "ERROR: ReactOnRails is incorrectly detecting generator function to be false. The React\ncomponent '" + .concat(name, "' seems to be a generator function.\n") + .concat(lastLine); + var reMatchShouldBeGeneratorError = /Can't add property context, object is not extensible/; + + if (reMatchShouldBeGeneratorError.test(e.message)) { + msg += ''.concat(shouldBeGeneratorError, '\n\n'); + console.error(shouldBeGeneratorError); + } + + shouldBeGeneratorError = + "ERROR: ReactOnRails is incorrectly detecting generatorFunction to be true, but the React\ncomponent '" + .concat(name, "' is not a generator function.\n") + .concat(lastLine); + var reMatchShouldNotBeGeneratorError = /Cannot call a class as a function/; + + if (reMatchShouldNotBeGeneratorError.test(e.message)) { + msg += ''.concat(shouldBeGeneratorError, '\n\n'); + console.error(shouldBeGeneratorError); + } + } + + return msg; + } + + var handleError = function handleError(options) { + var e = options.e, + jsCode = options.jsCode, + serverSide = options.serverSide; + console.error('Exception in rendering!'); + var msg = handleGeneratorFunctionIssue(options); + + if (jsCode) { + console.error('JS code was: '.concat(jsCode)); + } + + if (e.fileName) { + console.error('location: '.concat(e.fileName, ':').concat(e.lineNumber)); + } + + console.error('message: '.concat(e.message)); + console.error('stack: '.concat(e.stack)); + + if (serverSide) { + msg += 'Exception in rendering!\n' + .concat( + e.fileName ? '\nlocation: '.concat(e.fileName, ':').concat(e.lineNumber) : '', + '\nMessage: ', + ) + .concat(e.message, '\n\n') + .concat(e.stack); + + var reactElement = _react.default.createElement('pre', null, msg); + + return _server.default.renderToString(reactElement); + } + + return undefined; + }; + + var _default = handleError; + exports.default = _default; + + /***/ + }, + /* 234 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var _interopRequireDefault = __webpack_require__(41); + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.default = void 0; + + var _from = _interopRequireDefault(__webpack_require__(235)); + + var _keys = _interopRequireDefault(__webpack_require__(160)); + + var _map = _interopRequireDefault(__webpack_require__(236)); + + var _generatorFunction = _interopRequireDefault(__webpack_require__(532)); + + // key = name used by react_on_rails + // value = { name, component, generatorFunction: boolean, isRenderer: boolean } + var registeredComponents = new _map.default(); + var _default = { + /** + * @param components { component1: component1, component2: component2, etc. } + */ + register: function register(components) { + (0, _keys.default)(components).forEach(function (name) { + if (registeredComponents.has(name)) { + console.warn('Called register for component that is already registered', name); + } + + var component = components[name]; + + if (!component) { + throw new Error('Called register with null component named '.concat(name)); + } + + var isGeneratorFunction = (0, _generatorFunction.default)(component); + var isRenderer = isGeneratorFunction && component.length === 3; + registeredComponents.set(name, { + name: name, + component: component, + generatorFunction: isGeneratorFunction, + isRenderer: isRenderer, + }); + }); + }, + + /** + * @param name + * @returns { name, component, generatorFunction } + */ + get: function get(name) { + if (registeredComponents.has(name)) { + return registeredComponents.get(name); + } + + var keys = (0, _from.default)(registeredComponents.keys()).join(', '); + throw new Error( + 'Could not find component registered with name ' + .concat(name, '. Registered component names include [ ') + .concat(keys, ' ]. Maybe you forgot to register the component?'), + ); + }, + + /** + * Get a Map containing all registered components. Useful for debugging. + * @returns Map where key is the component name and values are the + * { name, component, generatorFunction} + */ + components: function components() { + return registeredComponents; + }, + }; + exports.default = _default; + + /***/ + }, + /* 235 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = __webpack_require__(519); + + /***/ + }, + /* 236 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = __webpack_require__(523); + + /***/ + }, + /* 237 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var _interopRequireDefault = __webpack_require__(41); + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.consoleReplay = consoleReplay; + exports.default = buildConsoleReplay; + + var _stringify = _interopRequireDefault(__webpack_require__(106)); + + var _RenderUtils = _interopRequireDefault(__webpack_require__(535)); + + var _scriptSanitizedVal = _interopRequireDefault(__webpack_require__(536)); + + function consoleReplay() { + // console.history is a global polyfill used in server rendering. + // $FlowFixMe + if (!(console.history instanceof Array)) { + return ''; + } + + var lines = console.history.map(function (msg) { + var stringifiedList = msg.arguments.map(function (arg) { + var val; + + try { + val = typeof arg === 'string' || arg instanceof String ? arg : (0, _stringify.default)(arg); + } catch (e) { + val = ''.concat(e.message, ': ').concat(arg); + } + + return (0, _scriptSanitizedVal.default)(val); + }); + return 'console.' + .concat(msg.level, '.apply(console, ') + .concat((0, _stringify.default)(stringifiedList), ');'); + }); + return lines.join('\n'); + } + + function buildConsoleReplay() { + return _RenderUtils.default.wrapInScriptTags('consoleReplayLog', consoleReplay()); + } + + /***/ + }, + /* 238 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(10); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash__ = __webpack_require__(542); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_2_lodash__, + ); + + function renderContextRows(railsContext) { + // eslint-disable-next-line no-console + console.log('railsContext.serverSide is ', railsContext.serverSide); + return __WEBPACK_IMPORTED_MODULE_2_lodash___default.a.transform( + railsContext, + function (accum, value, key) { + if (key !== 'serverSide') { + var className = 'js-' + key; + accum.push( + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'tr', + { key: className }, + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'td', + null, + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('strong', null, key, ':\xA0'), + ), + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'td', + { className: className }, + '' + value, + ), + ), + ); + } + }, + [], + ); + } + + var RailsContext = function RailsContext(props) { + return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'table', + null, + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'thead', + null, + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'tr', + null, + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'th', + null, + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('i', null, 'key'), + ), + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'th', + null, + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('i', null, 'value'), + ), + ), + ), + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'tbody', + null, + renderContextRows(props.railsContext), + ), + ); + }; + + RailsContext.propTypes = { + railsContext: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object.isRequired, + }; + + var _default = RailsContext; + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + renderContextRows, + 'renderContextRows', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/RailsContext.jsx', + ); + + __REACT_HOT_LOADER__.register( + RailsContext, + 'RailsContext', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/RailsContext.jsx', + ); + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/RailsContext.jsx', + ); + })(); + + /***/ + }, + /* 239 */ + /***/ function (module, exports) { + module.exports = function (module) { + if (!module.webpackPolyfill) { + module.deprecate = function () {}; + module.paths = []; + // module.parent = undefined by default + if (!module.children) module.children = []; + Object.defineProperty(module, 'loaded', { + enumerable: true, + get: function () { + return module.l; + }, + }); + Object.defineProperty(module, 'id', { + enumerable: true, + get: function () { + return module.i; + }, + }); + module.webpackPolyfill = 1; + } + return module; + }; + + /***/ + }, + /* 240 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'a', function () { + return ActionTypes; + }); + /* harmony export (immutable) */ __webpack_exports__['b'] = createStore; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_isPlainObject__ = + __webpack_require__(241); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_symbol_observable__ = __webpack_require__(562); + + /** + * These are private action types reserved by Redux. + * For any unknown actions, you must return the current state. + * If the current state is undefined, you must return the initial state. + * Do not reference these action types directly in your code. + */ + var ActionTypes = { + INIT: '@@redux/INIT', + + /** + * Creates a Redux store that holds the state tree. + * The only way to change the data in the store is to call `dispatch()` on it. + * + * There should only be a single store in your app. To specify how different + * parts of the state tree respond to actions, you may combine several reducers + * into a single reducer function by using `combineReducers`. + * + * @param {Function} reducer A function that returns the next state tree, given + * the current state tree and the action to handle. + * + * @param {any} [preloadedState] The initial state. You may optionally specify it + * to hydrate the state from the server in universal apps, or to restore a + * previously serialized user session. + * If you use `combineReducers` to produce the root reducer function, this must be + * an object with the same shape as `combineReducers` keys. + * + * @param {Function} [enhancer] The store enhancer. You may optionally specify it + * to enhance the store with third-party capabilities such as middleware, + * time travel, persistence, etc. The only store enhancer that ships with Redux + * is `applyMiddleware()`. + * + * @returns {Store} A Redux store that lets you read the state, dispatch actions + * and subscribe to changes. + */ + }; + function createStore(reducer, preloadedState, enhancer) { + var _ref2; + + if (typeof preloadedState === 'function' && typeof enhancer === 'undefined') { + enhancer = preloadedState; + preloadedState = undefined; + } + + if (typeof enhancer !== 'undefined') { + if (typeof enhancer !== 'function') { + throw new Error('Expected the enhancer to be a function.'); + } + + return enhancer(createStore)(reducer, preloadedState); + } + + if (typeof reducer !== 'function') { + throw new Error('Expected the reducer to be a function.'); + } + + var currentReducer = reducer; + var currentState = preloadedState; + var currentListeners = []; + var nextListeners = currentListeners; + var isDispatching = false; + + function ensureCanMutateNextListeners() { + if (nextListeners === currentListeners) { + nextListeners = currentListeners.slice(); + } + } + + /** + * Reads the state tree managed by the store. + * + * @returns {any} The current state tree of your application. + */ + function getState() { + return currentState; + } + + /** + * Adds a change listener. It will be called any time an action is dispatched, + * and some part of the state tree may potentially have changed. You may then + * call `getState()` to read the current state tree inside the callback. + * + * You may call `dispatch()` from a change listener, with the following + * caveats: + * + * 1. The subscriptions are snapshotted just before every `dispatch()` call. + * If you subscribe or unsubscribe while the listeners are being invoked, this + * will not have any effect on the `dispatch()` that is currently in progress. + * However, the next `dispatch()` call, whether nested or not, will use a more + * recent snapshot of the subscription list. + * + * 2. The listener should not expect to see all state changes, as the state + * might have been updated multiple times during a nested `dispatch()` before + * the listener is called. It is, however, guaranteed that all subscribers + * registered before the `dispatch()` started will be called with the latest + * state by the time it exits. + * + * @param {Function} listener A callback to be invoked on every dispatch. + * @returns {Function} A function to remove this change listener. + */ + function subscribe(listener) { + if (typeof listener !== 'function') { + throw new Error('Expected listener to be a function.'); + } + + var isSubscribed = true; + + ensureCanMutateNextListeners(); + nextListeners.push(listener); + + return function unsubscribe() { + if (!isSubscribed) { + return; + } + + isSubscribed = false; + + ensureCanMutateNextListeners(); + var index = nextListeners.indexOf(listener); + nextListeners.splice(index, 1); + }; + } + + /** + * Dispatches an action. It is the only way to trigger a state change. + * + * The `reducer` function, used to create the store, will be called with the + * current state tree and the given `action`. Its return value will + * be considered the **next** state of the tree, and the change listeners + * will be notified. + * + * The base implementation only supports plain object actions. If you want to + * dispatch a Promise, an Observable, a thunk, or something else, you need to + * wrap your store creating function into the corresponding middleware. For + * example, see the documentation for the `redux-thunk` package. Even the + * middleware will eventually dispatch plain object actions using this method. + * + * @param {Object} action A plain object representing “what changed”. It is + * a good idea to keep actions serializable so you can record and replay user + * sessions, or use the time travelling `redux-devtools`. An action must have + * a `type` property which may not be `undefined`. It is a good idea to use + * string constants for action types. + * + * @returns {Object} For convenience, the same action object you dispatched. + * + * Note that, if you use a custom middleware, it may wrap `dispatch()` to + * return something else (for example, a Promise you can await). + */ + function dispatch(action) { + if (!Object(__WEBPACK_IMPORTED_MODULE_0_lodash_es_isPlainObject__['a' /* default */])(action)) { + throw new Error('Actions must be plain objects. ' + 'Use custom middleware for async actions.'); + } + + if (typeof action.type === 'undefined') { + throw new Error( + 'Actions may not have an undefined "type" property. ' + 'Have you misspelled a constant?', + ); + } + + if (isDispatching) { + throw new Error('Reducers may not dispatch actions.'); + } + + try { + isDispatching = true; + currentState = currentReducer(currentState, action); + } finally { + isDispatching = false; + } + + var listeners = (currentListeners = nextListeners); + for (var i = 0; i < listeners.length; i++) { + var listener = listeners[i]; + listener(); + } + + return action; + } + + /** + * Replaces the reducer currently used by the store to calculate the state. + * + * You might need this if your app implements code splitting and you want to + * load some of the reducers dynamically. You might also need this if you + * implement a hot reloading mechanism for Redux. + * + * @param {Function} nextReducer The reducer for the store to use instead. + * @returns {void} + */ + function replaceReducer(nextReducer) { + if (typeof nextReducer !== 'function') { + throw new Error('Expected the nextReducer to be a function.'); + } + + currentReducer = nextReducer; + dispatch({ type: ActionTypes.INIT }); + } + + /** + * Interoperability point for observable/reactive libraries. + * @returns {observable} A minimal observable of state changes. + * For more information, see the observable proposal: + * https://github.com/tc39/proposal-observable + */ + function observable() { + var _ref; + + var outerSubscribe = subscribe; + return ( + (_ref = { + /** + * The minimal observable subscription method. + * @param {Object} observer Any object that can be used as an observer. + * The observer object should have a `next` method. + * @returns {subscription} An object with an `unsubscribe` method that can + * be used to unsubscribe the observable from the store, and prevent further + * emission of values from the observable. + */ + subscribe: function subscribe(observer) { + if (typeof observer !== 'object') { + throw new TypeError('Expected the observer to be an object.'); + } + + function observeState() { + if (observer.next) { + observer.next(getState()); + } + } + + observeState(); + var unsubscribe = outerSubscribe(observeState); + return { unsubscribe: unsubscribe }; + }, + }), + (_ref[__WEBPACK_IMPORTED_MODULE_1_symbol_observable__['a' /* default */]] = function () { + return this; + }), + _ref + ); + } + + // When a store is created, an "INIT" action is dispatched so that every + // reducer returns their initial state. This effectively populates + // the initial state tree. + dispatch({ type: ActionTypes.INIT }); + + return ( + (_ref2 = { + dispatch: dispatch, + subscribe: subscribe, + getState: getState, + replaceReducer: replaceReducer, + }), + (_ref2[__WEBPACK_IMPORTED_MODULE_1_symbol_observable__['a' /* default */]] = observable), + _ref2 + ); + } + + /***/ + }, + /* 241 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__ = __webpack_require__(554); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getPrototype_js__ = __webpack_require__(559); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isObjectLike_js__ = __webpack_require__(561); + + /** `Object#toString` result references. */ + var objectTag = '[object Object]'; + + /** Used for built-in method references. */ + var funcProto = Function.prototype, + objectProto = Object.prototype; + + /** Used to resolve the decompiled source of functions. */ + var funcToString = funcProto.toString; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** Used to infer the `Object` constructor. */ + var objectCtorString = funcToString.call(Object); + + /** + * Checks if `value` is a plain object, that is, an object created by the + * `Object` constructor or one with a `[[Prototype]]` of `null`. + * + * @static + * @memberOf _ + * @since 0.8.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * _.isPlainObject(new Foo); + * // => false + * + * _.isPlainObject([1, 2, 3]); + * // => false + * + * _.isPlainObject({ 'x': 0, 'y': 0 }); + * // => true + * + * _.isPlainObject(Object.create(null)); + * // => true + */ + function isPlainObject(value) { + if ( + !Object(__WEBPACK_IMPORTED_MODULE_2__isObjectLike_js__['a' /* default */])(value) || + Object(__WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__['a' /* default */])(value) != objectTag + ) { + return false; + } + var proto = Object(__WEBPACK_IMPORTED_MODULE_1__getPrototype_js__['a' /* default */])(value); + if (proto === null) { + return true; + } + var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; + return ( + typeof Ctor == 'function' && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString + ); + } + + /* harmony default export */ __webpack_exports__['a'] = isPlainObject; + + /***/ + }, + /* 242 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__root_js__ = __webpack_require__(555); + + /** Built-in value references. */ + var Symbol = __WEBPACK_IMPORTED_MODULE_0__root_js__['a' /* default */].Symbol; + + /* harmony default export */ __webpack_exports__['a'] = Symbol; + + /***/ + }, + /* 243 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = warning; + /** + * Prints a warning in the console if it exists. + * + * @param {String} message The warning message. + * @returns {void} + */ + function warning(message) { + /* eslint-disable no-console */ + if (typeof console !== 'undefined' && typeof console.error === 'function') { + console.error(message); + } + /* eslint-enable no-console */ + try { + // This error was thrown as a convenience so that if you enable + // "break on all exceptions" in your console, + // it would pause the execution at this line. + throw new Error(message); + /* eslint-disable no-empty */ + } catch (e) {} + /* eslint-enable no-empty */ + } + + /***/ + }, + /* 244 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = compose; + /** + * Composes single-argument functions from right to left. The rightmost + * function can take multiple arguments as it provides the signature for + * the resulting composite function. + * + * @param {...Function} funcs The functions to compose. + * @returns {Function} A function obtained by composing the argument functions + * from right to left. For example, compose(f, g, h) is identical to doing + * (...args) => f(g(h(...args))). + */ + + function compose() { + for (var _len = arguments.length, funcs = Array(_len), _key = 0; _key < _len; _key++) { + funcs[_key] = arguments[_key]; + } + + if (funcs.length === 0) { + return function (arg) { + return arg; + }; + } + + if (funcs.length === 1) { + return funcs[0]; + } + + return funcs.reduce(function (a, b) { + return function () { + return a(b.apply(undefined, arguments)); + }; + }); + } + + /***/ + }, + /* 245 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = _inheritsLoose; + function _inheritsLoose(subClass, superClass) { + subClass.prototype = Object.create(superClass.prototype); + subClass.prototype.constructor = subClass; + subClass.__proto__ = superClass; + } + + /***/ + }, + /* 246 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'b', function () { + return subscriptionShape; + }); + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'a', function () { + return storeShape; + }); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(10); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + + var subscriptionShape = __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.shape({ + trySubscribe: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired, + tryUnsubscribe: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired, + notifyNestedSubs: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired, + isSubscribed: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired, + }); + var storeShape = __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.shape({ + subscribe: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired, + dispatch: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired, + getState: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired, + }); + + /***/ + }, + /* 247 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = connectAdvanced; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_inheritsLoose__ = + __webpack_require__(245); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_esm_assertThisInitialized__ = + __webpack_require__(569); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__babel_runtime_helpers_esm_extends__ = + __webpack_require__(165); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__babel_runtime_helpers_esm_objectWithoutPropertiesLoose__ = + __webpack_require__(166); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_hoist_non_react_statics__ = + __webpack_require__(570); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_hoist_non_react_statics___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_hoist_non_react_statics__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_invariant__ = __webpack_require__(14); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_invariant___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_5_invariant__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_6_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react_is__ = __webpack_require__(109); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react_is___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_7_react_is__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__utils_Subscription__ = __webpack_require__(571); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__utils_PropTypes__ = __webpack_require__(246); + + var prefixUnsafeLifecycleMethods = + typeof __WEBPACK_IMPORTED_MODULE_6_react___default.a.forwardRef !== 'undefined'; + var hotReloadingVersion = 0; + var dummyState = {}; + + function noop() {} + + function makeSelectorStateful(sourceSelector, store) { + // wrap the selector in an object that tracks its results between runs. + var selector = { + run: function runComponentSelector(props) { + try { + var nextProps = sourceSelector(store.getState(), props); + + if (nextProps !== selector.props || selector.error) { + selector.shouldComponentUpdate = true; + selector.props = nextProps; + selector.error = null; + } + } catch (error) { + selector.shouldComponentUpdate = true; + selector.error = error; + } + }, + }; + return selector; + } + + function connectAdvanced( + /* + selectorFactory is a func that is responsible for returning the selector function used to + compute new props from state, props, and dispatch. For example: + export default connectAdvanced((dispatch, options) => (state, props) => ({ + thing: state.things[props.thingId], + saveThing: fields => dispatch(actionCreators.saveThing(props.thingId, fields)), + }))(YourComponent) + Access to dispatch is provided to the factory so selectorFactories can bind actionCreators + outside of their selector as an optimization. Options passed to connectAdvanced are passed to + the selectorFactory, along with displayName and WrappedComponent, as the second argument. + Note that selectorFactory is responsible for all caching/memoization of inbound and outbound + props. Do not use connectAdvanced directly without memoizing results between calls to your + selector, otherwise the Connect component will re-render on every state or props change. +*/ + selectorFactory, // options object: + _ref, + ) { + var _contextTypes, _childContextTypes; + + if (_ref === void 0) { + _ref = {}; + } + + var _ref2 = _ref, + _ref2$getDisplayName = _ref2.getDisplayName, + getDisplayName = + _ref2$getDisplayName === void 0 + ? function (name) { + return 'ConnectAdvanced(' + name + ')'; + } + : _ref2$getDisplayName, + _ref2$methodName = _ref2.methodName, + methodName = _ref2$methodName === void 0 ? 'connectAdvanced' : _ref2$methodName, + _ref2$renderCountProp = _ref2.renderCountProp, + renderCountProp = _ref2$renderCountProp === void 0 ? undefined : _ref2$renderCountProp, + _ref2$shouldHandleSta = _ref2.shouldHandleStateChanges, + shouldHandleStateChanges = _ref2$shouldHandleSta === void 0 ? true : _ref2$shouldHandleSta, + _ref2$storeKey = _ref2.storeKey, + storeKey = _ref2$storeKey === void 0 ? 'store' : _ref2$storeKey, + _ref2$withRef = _ref2.withRef, + withRef = _ref2$withRef === void 0 ? false : _ref2$withRef, + connectOptions = Object( + __WEBPACK_IMPORTED_MODULE_3__babel_runtime_helpers_esm_objectWithoutPropertiesLoose__[ + 'a' /* default */ + ], + )(_ref2, [ + 'getDisplayName', + 'methodName', + 'renderCountProp', + 'shouldHandleStateChanges', + 'storeKey', + 'withRef', + ]); + + var subscriptionKey = storeKey + 'Subscription'; + var version = hotReloadingVersion++; + var contextTypes = + ((_contextTypes = {}), + (_contextTypes[storeKey] = __WEBPACK_IMPORTED_MODULE_9__utils_PropTypes__['a' /* storeShape */]), + (_contextTypes[subscriptionKey] = + __WEBPACK_IMPORTED_MODULE_9__utils_PropTypes__['b' /* subscriptionShape */]), + _contextTypes); + var childContextTypes = + ((_childContextTypes = {}), + (_childContextTypes[subscriptionKey] = + __WEBPACK_IMPORTED_MODULE_9__utils_PropTypes__['b' /* subscriptionShape */]), + _childContextTypes); + return function wrapWithConnect(WrappedComponent) { + __WEBPACK_IMPORTED_MODULE_5_invariant___default()( + Object(__WEBPACK_IMPORTED_MODULE_7_react_is__['isValidElementType'])(WrappedComponent), + 'You must pass a component to the function returned by ' + + (methodName + '. Instead received ' + JSON.stringify(WrappedComponent)), + ); + var wrappedComponentName = WrappedComponent.displayName || WrappedComponent.name || 'Component'; + var displayName = getDisplayName(wrappedComponentName); + + var selectorFactoryOptions = Object( + __WEBPACK_IMPORTED_MODULE_2__babel_runtime_helpers_esm_extends__['a' /* default */], + )({}, connectOptions, { + getDisplayName: getDisplayName, + methodName: methodName, + renderCountProp: renderCountProp, + shouldHandleStateChanges: shouldHandleStateChanges, + storeKey: storeKey, + withRef: withRef, + displayName: displayName, + wrappedComponentName: wrappedComponentName, + WrappedComponent: WrappedComponent, // TODO Actually fix our use of componentWillReceiveProps + + /* eslint-disable react/no-deprecated */ + }); + + var Connect = + /*#__PURE__*/ + (function (_Component) { + Object( + __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_inheritsLoose__['a' /* default */], + )(Connect, _Component); + + function Connect(props, context) { + var _this; + + _this = _Component.call(this, props, context) || this; + _this.version = version; + _this.state = {}; + _this.renderCount = 0; + _this.store = props[storeKey] || context[storeKey]; + _this.propsMode = Boolean(props[storeKey]); + _this.setWrappedInstance = _this.setWrappedInstance.bind( + Object( + __WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_esm_assertThisInitialized__[ + 'a' /* default */ + ], + )( + Object( + __WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_esm_assertThisInitialized__[ + 'a' /* default */ + ], + )(_this), + ), + ); + __WEBPACK_IMPORTED_MODULE_5_invariant___default()( + _this.store, + 'Could not find "' + + storeKey + + '" in either the context or props of ' + + ('"' + displayName + '". Either wrap the root component in a <Provider>, ') + + ('or explicitly pass "' + storeKey + '" as a prop to "' + displayName + '".'), + ); + + _this.initSelector(); + + _this.initSubscription(); + + return _this; + } + + var _proto = Connect.prototype; + + _proto.getChildContext = function getChildContext() { + var _ref3; + + // If this component received store from props, its subscription should be transparent + // to any descendants receiving store+subscription from context; it passes along + // subscription passed to it. Otherwise, it shadows the parent subscription, which allows + // Connect to control ordering of notifications to flow top-down. + var subscription = this.propsMode ? null : this.subscription; + return ( + (_ref3 = {}), + (_ref3[subscriptionKey] = subscription || this.context[subscriptionKey]), + _ref3 + ); + }; + + _proto.componentDidMount = function componentDidMount() { + if (!shouldHandleStateChanges) return; // componentWillMount fires during server side rendering, but componentDidMount and + // componentWillUnmount do not. Because of this, trySubscribe happens during ...didMount. + // Otherwise, unsubscription would never take place during SSR, causing a memory leak. + // To handle the case where a child component may have triggered a state change by + // dispatching an action in its componentWillMount, we have to re-run the select and maybe + // re-render. + + this.subscription.trySubscribe(); + this.selector.run(this.props); + if (this.selector.shouldComponentUpdate) this.forceUpdate(); + }; // Note: this is renamed below to the UNSAFE_ version in React >=16.3.0 + + _proto.componentWillReceiveProps = function componentWillReceiveProps(nextProps) { + this.selector.run(nextProps); + }; + + _proto.shouldComponentUpdate = function shouldComponentUpdate() { + return this.selector.shouldComponentUpdate; + }; + + _proto.componentWillUnmount = function componentWillUnmount() { + if (this.subscription) this.subscription.tryUnsubscribe(); + this.subscription = null; + this.notifyNestedSubs = noop; + this.store = null; + this.selector.run = noop; + this.selector.shouldComponentUpdate = false; + }; + + _proto.getWrappedInstance = function getWrappedInstance() { + __WEBPACK_IMPORTED_MODULE_5_invariant___default()( + withRef, + 'To access the wrapped instance, you need to specify ' + + ('{ withRef: true } in the options argument of the ' + methodName + '() call.'), + ); + return this.wrappedInstance; + }; + + _proto.setWrappedInstance = function setWrappedInstance(ref) { + this.wrappedInstance = ref; + }; + + _proto.initSelector = function initSelector() { + var sourceSelector = selectorFactory(this.store.dispatch, selectorFactoryOptions); + this.selector = makeSelectorStateful(sourceSelector, this.store); + this.selector.run(this.props); + }; + + _proto.initSubscription = function initSubscription() { + if (!shouldHandleStateChanges) return; // parentSub's source should match where store came from: props vs. context. A component + // connected to the store via props shouldn't use subscription from context, or vice versa. + + var parentSub = (this.propsMode ? this.props : this.context)[subscriptionKey]; + this.subscription = new __WEBPACK_IMPORTED_MODULE_8__utils_Subscription__['a' /* default */]( + this.store, + parentSub, + this.onStateChange.bind(this), + ); // `notifyNestedSubs` is duplicated to handle the case where the component is unmounted in + // the middle of the notification loop, where `this.subscription` will then be null. An + // extra null check every change can be avoided by copying the method onto `this` and then + // replacing it with a no-op on unmount. This can probably be avoided if Subscription's + // listeners logic is changed to not call listeners that have been unsubscribed in the + // middle of the notification loop. + + this.notifyNestedSubs = this.subscription.notifyNestedSubs.bind(this.subscription); + }; + + _proto.onStateChange = function onStateChange() { + this.selector.run(this.props); + + if (!this.selector.shouldComponentUpdate) { + this.notifyNestedSubs(); + } else { + this.componentDidUpdate = this.notifyNestedSubsOnComponentDidUpdate; + this.setState(dummyState); + } + }; + + _proto.notifyNestedSubsOnComponentDidUpdate = function notifyNestedSubsOnComponentDidUpdate() { + // `componentDidUpdate` is conditionally implemented when `onStateChange` determines it + // needs to notify nested subs. Once called, it unimplements itself until further state + // changes occur. Doing it this way vs having a permanent `componentDidUpdate` that does + // a boolean check every time avoids an extra method call most of the time, resulting + // in some perf boost. + this.componentDidUpdate = undefined; + this.notifyNestedSubs(); + }; + + _proto.isSubscribed = function isSubscribed() { + return Boolean(this.subscription) && this.subscription.isSubscribed(); + }; + + _proto.addExtraProps = function addExtraProps(props) { + if (!withRef && !renderCountProp && !(this.propsMode && this.subscription)) return props; // make a shallow copy so that fields added don't leak to the original selector. + // this is especially important for 'ref' since that's a reference back to the component + // instance. a singleton memoized selector would then be holding a reference to the + // instance, preventing the instance from being garbage collected, and that would be bad + + var withExtras = Object( + __WEBPACK_IMPORTED_MODULE_2__babel_runtime_helpers_esm_extends__['a' /* default */], + )({}, props); + + if (withRef) withExtras.ref = this.setWrappedInstance; + if (renderCountProp) withExtras[renderCountProp] = this.renderCount++; + if (this.propsMode && this.subscription) withExtras[subscriptionKey] = this.subscription; + return withExtras; + }; + + _proto.render = function render() { + var selector = this.selector; + selector.shouldComponentUpdate = false; + + if (selector.error) { + throw selector.error; + } else { + return Object(__WEBPACK_IMPORTED_MODULE_6_react__['createElement'])( + WrappedComponent, + this.addExtraProps(selector.props), + ); + } + }; + + return Connect; + })(__WEBPACK_IMPORTED_MODULE_6_react__['Component']); + + if (prefixUnsafeLifecycleMethods) { + // Use UNSAFE_ event name where supported + Connect.prototype.UNSAFE_componentWillReceiveProps = Connect.prototype.componentWillReceiveProps; + delete Connect.prototype.componentWillReceiveProps; + } + /* eslint-enable react/no-deprecated */ + + Connect.WrappedComponent = WrappedComponent; + Connect.displayName = displayName; + Connect.childContextTypes = childContextTypes; + Connect.contextTypes = contextTypes; + Connect.propTypes = contextTypes; + + if (true) { + // Use UNSAFE_ event name where supported + var eventName = prefixUnsafeLifecycleMethods + ? 'UNSAFE_componentWillUpdate' + : 'componentWillUpdate'; + + Connect.prototype[eventName] = function componentWillUpdate() { + var _this2 = this; + + // We are hot reloading! + if (this.version !== version) { + this.version = version; + this.initSelector(); // If any connected descendants don't hot reload (and resubscribe in the process), their + // listeners will be lost when we unsubscribe. Unfortunately, by copying over all + // listeners, this does mean that the old versions of connected descendants will still be + // notified of state changes; however, their onStateChange function is a no-op so this + // isn't a huge deal. + + var oldListeners = []; + + if (this.subscription) { + oldListeners = this.subscription.listeners.get(); + this.subscription.tryUnsubscribe(); + } + + this.initSubscription(); + + if (shouldHandleStateChanges) { + this.subscription.trySubscribe(); + oldListeners.forEach(function (listener) { + return _this2.subscription.listeners.subscribe(listener); + }); + } + } + }; + } + + return __WEBPACK_IMPORTED_MODULE_4_hoist_non_react_statics___default()(Connect, WrappedComponent); + }; + } + + /***/ + }, + /* 248 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = wrapMapToPropsConstant; + /* unused harmony export getDependsOnOwnProps */ + /* harmony export (immutable) */ __webpack_exports__['b'] = wrapMapToPropsFunc; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils_verifyPlainObject__ = + __webpack_require__(249); + + function wrapMapToPropsConstant(getConstant) { + return function initConstantSelector(dispatch, options) { + var constant = getConstant(dispatch, options); + + function constantSelector() { + return constant; + } + + constantSelector.dependsOnOwnProps = false; + return constantSelector; + }; + } // dependsOnOwnProps is used by createMapToPropsProxy to determine whether to pass props as args + // to the mapToProps function being wrapped. It is also used by makePurePropsSelector to determine + // whether mapToProps needs to be invoked when props have changed. + // + // A length of one signals that mapToProps does not depend on props from the parent component. + // A length of zero is assumed to mean mapToProps is getting args via arguments or ...args and + // therefore not reporting its length accurately.. + + function getDependsOnOwnProps(mapToProps) { + return mapToProps.dependsOnOwnProps !== null && mapToProps.dependsOnOwnProps !== undefined + ? Boolean(mapToProps.dependsOnOwnProps) + : mapToProps.length !== 1; + } // Used by whenMapStateToPropsIsFunction and whenMapDispatchToPropsIsFunction, + // this function wraps mapToProps in a proxy function which does several things: + // + // * Detects whether the mapToProps function being called depends on props, which + // is used by selectorFactory to decide if it should reinvoke on props changes. + // + // * On first call, handles mapToProps if returns another function, and treats that + // new function as the true mapToProps for subsequent calls. + // + // * On first call, verifies the first result is a plain object, in order to warn + // the developer that their mapToProps function is not returning a valid result. + // + + function wrapMapToPropsFunc(mapToProps, methodName) { + return function initProxySelector(dispatch, _ref) { + var displayName = _ref.displayName; + + var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) { + return proxy.dependsOnOwnProps + ? proxy.mapToProps(stateOrDispatch, ownProps) + : proxy.mapToProps(stateOrDispatch); + }; // allow detectFactoryAndVerify to get ownProps + + proxy.dependsOnOwnProps = true; + + proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) { + proxy.mapToProps = mapToProps; + proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps); + var props = proxy(stateOrDispatch, ownProps); + + if (typeof props === 'function') { + proxy.mapToProps = props; + proxy.dependsOnOwnProps = getDependsOnOwnProps(props); + props = proxy(stateOrDispatch, ownProps); + } + + if (true) + Object(__WEBPACK_IMPORTED_MODULE_0__utils_verifyPlainObject__['a' /* default */])( + props, + displayName, + methodName, + ); + return props; + }; + + return proxy; + }; + } + + /***/ + }, + /* 249 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = verifyPlainObject; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isPlainObject__ = __webpack_require__(575); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__warning__ = __webpack_require__(164); + + function verifyPlainObject(value, displayName, methodName) { + if (!Object(__WEBPACK_IMPORTED_MODULE_0__isPlainObject__['a' /* default */])(value)) { + Object(__WEBPACK_IMPORTED_MODULE_1__warning__['a' /* default */])( + methodName + + '() in ' + + displayName + + ' must return a plain object. Instead received ' + + value + + '.', + ); + } + } + + /***/ + }, + /* 250 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + function createThunkMiddleware(extraArgument) { + return function (_ref) { + var dispatch = _ref.dispatch, + getState = _ref.getState; + return function (next) { + return function (action) { + if (typeof action === 'function') { + return action(dispatch, getState, extraArgument); + } + + return next(action); + }; + }; + }; + } + + var thunk = createThunkMiddleware(); + thunk.withExtraArgument = createThunkMiddleware; + + /* harmony default export */ __webpack_exports__['a'] = thunk; + + /***/ + }, + /* 251 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__HelloWorldReducer__ = __webpack_require__(580); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__RailsContextReducer__ = __webpack_require__(581); + + // This is how you do a directory of reducers. + // The `import * as reducers` does not work for a directory, but only with a single file + var _default = { + helloWorldData: __WEBPACK_IMPORTED_MODULE_0__HelloWorldReducer__['a' /* default */], + railsContext: __WEBPACK_IMPORTED_MODULE_1__RailsContextReducer__['a' /* default */], + }; + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/reducers/reducersIndex.jsx', + ); + })(); + + /***/ + }, + /* 252 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'a', function () { + return HELLO_WORLD_NAME_UPDATE; + }); + /* eslint-disable import/prefer-default-export */ + var HELLO_WORLD_NAME_UPDATE = 'HELLO_WORLD_NAME_UPDATE'; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + HELLO_WORLD_NAME_UPDATE, + 'HELLO_WORLD_NAME_UPDATE', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/constants/HelloWorldConstants.jsx', + ); + })(); + + /***/ + }, + /* 253 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(10); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_redux__ = __webpack_require__(163); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_redux__ = __webpack_require__(110); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__HelloWorldRedux__ = __webpack_require__(583); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__actions_HelloWorldActions__ = + __webpack_require__(584); + + var HelloWorldContainer = function HelloWorldContainer(_ref) { + var actions = _ref.actions, + data = _ref.data, + railsContext = _ref.railsContext; + return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_4__HelloWorldRedux__['a' /* default */], + { actions: actions, data: data, railsContext: railsContext }, + ); + }; + HelloWorldContainer.propTypes = { + actions: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object.isRequired, + data: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object.isRequired, + railsContext: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object.isRequired, + }; + + function mapStateToProps(state) { + return { + data: state.helloWorldData, + railsContext: state.railsContext, + }; + } + + function mapDispatchToProps(dispatch) { + return { + actions: Object(__WEBPACK_IMPORTED_MODULE_3_redux__['b' /* bindActionCreators */])( + __WEBPACK_IMPORTED_MODULE_5__actions_HelloWorldActions__, + dispatch, + ), + }; + } + + // Don't forget to actually use connect! + + var _default = Object(__WEBPACK_IMPORTED_MODULE_2_react_redux__['b' /* connect */])( + mapStateToProps, + mapDispatchToProps, + )(HelloWorldContainer); + + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + HelloWorldContainer, + 'HelloWorldContainer', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/HelloWorldContainer.jsx', + ); + + __REACT_HOT_LOADER__.register( + mapStateToProps, + 'mapStateToProps', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/HelloWorldContainer.jsx', + ); + + __REACT_HOT_LOADER__.register( + mapDispatchToProps, + 'mapDispatchToProps', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/HelloWorldContainer.jsx', + ); + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/HelloWorldContainer.jsx', + ); + })(); + + /***/ + }, + /* 254 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = createTransitionManager; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__routerWarning__ = __webpack_require__(71); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__computeChangedRoutes__ = __webpack_require__(588); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__TransitionUtils__ = __webpack_require__(589); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isActive__ = __webpack_require__(590); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__getComponents__ = __webpack_require__(591); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__matchRoutes__ = __webpack_require__(592); + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + function hasAnyProperties(object) { + for (var p in object) { + if (Object.prototype.hasOwnProperty.call(object, p)) return true; + } + return false; + } + + function createTransitionManager(history, routes) { + var state = {}; + + var _getTransitionUtils = Object(__WEBPACK_IMPORTED_MODULE_2__TransitionUtils__['a' /* default */])(), + runEnterHooks = _getTransitionUtils.runEnterHooks, + runChangeHooks = _getTransitionUtils.runChangeHooks, + runLeaveHooks = _getTransitionUtils.runLeaveHooks; + + // Signature should be (location, indexOnly), but needs to support (path, + // query, indexOnly) + + function isActive(location, indexOnly) { + location = history.createLocation(location); + + return Object(__WEBPACK_IMPORTED_MODULE_3__isActive__['a' /* default */])( + location, + indexOnly, + state.location, + state.routes, + state.params, + ); + } + + var partialNextState = void 0; + + function match(location, callback) { + if (partialNextState && partialNextState.location === location) { + // Continue from where we left off. + finishMatch(partialNextState, callback); + } else { + Object(__WEBPACK_IMPORTED_MODULE_5__matchRoutes__['a' /* default */])( + routes, + location, + function (error, nextState) { + if (error) { + callback(error); + } else if (nextState) { + finishMatch(_extends({}, nextState, { location: location }), callback); + } else { + callback(); + } + }, + ); + } + } + + function finishMatch(nextState, callback) { + var _computeChangedRoutes = Object( + __WEBPACK_IMPORTED_MODULE_1__computeChangedRoutes__['a' /* default */], + )(state, nextState), + leaveRoutes = _computeChangedRoutes.leaveRoutes, + changeRoutes = _computeChangedRoutes.changeRoutes, + enterRoutes = _computeChangedRoutes.enterRoutes; + + runLeaveHooks(leaveRoutes, state); + + // Tear down confirmation hooks for left routes + leaveRoutes + .filter(function (route) { + return enterRoutes.indexOf(route) === -1; + }) + .forEach(removeListenBeforeHooksForRoute); + + // change and enter hooks are run in series + runChangeHooks(changeRoutes, state, nextState, function (error, redirectInfo) { + if (error || redirectInfo) return handleErrorOrRedirect(error, redirectInfo); + + runEnterHooks(enterRoutes, nextState, finishEnterHooks); + }); + + function finishEnterHooks(error, redirectInfo) { + if (error || redirectInfo) return handleErrorOrRedirect(error, redirectInfo); + + // TODO: Fetch components after state is updated. + Object(__WEBPACK_IMPORTED_MODULE_4__getComponents__['a' /* default */])( + nextState, + function (error, components) { + if (error) { + callback(error); + } else { + // TODO: Make match a pure function and have some other API + // for "match and update state". + callback(null, null, (state = _extends({}, nextState, { components: components }))); + } + }, + ); + } + + function handleErrorOrRedirect(error, redirectInfo) { + if (error) callback(error); + else callback(null, redirectInfo); + } + } + + var RouteGuid = 1; + + function getRouteID(route) { + var create = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + + return route.__id__ || (create && (route.__id__ = RouteGuid++)); + } + + var RouteHooks = Object.create(null); + + function getRouteHooksForRoutes(routes) { + return routes + .map(function (route) { + return RouteHooks[getRouteID(route)]; + }) + .filter(function (hook) { + return hook; + }); + } + + function transitionHook(location, callback) { + Object(__WEBPACK_IMPORTED_MODULE_5__matchRoutes__['a' /* default */])( + routes, + location, + function (error, nextState) { + if (nextState == null) { + // TODO: We didn't actually match anything, but hang + // onto error/nextState so we don't have to matchRoutes + // again in the listen callback. + callback(); + return; + } + + // Cache some state here so we don't have to + // matchRoutes() again in the listen callback. + partialNextState = _extends({}, nextState, { location: location }); + + var hooks = getRouteHooksForRoutes( + Object(__WEBPACK_IMPORTED_MODULE_1__computeChangedRoutes__['a' /* default */])( + state, + partialNextState, + ).leaveRoutes, + ); + + var result = void 0; + for (var i = 0, len = hooks.length; result == null && i < len; ++i) { + // Passing the location arg here indicates to + // the user that this is a transition hook. + result = hooks[i](location); + } + + callback(result); + }, + ); + } + + /* istanbul ignore next: untestable with Karma */ + function beforeUnloadHook() { + // Synchronously check to see if any route hooks want + // to prevent the current window/tab from closing. + if (state.routes) { + var hooks = getRouteHooksForRoutes(state.routes); + + var message = void 0; + for (var i = 0, len = hooks.length; typeof message !== 'string' && i < len; ++i) { + // Passing no args indicates to the user that this is a + // beforeunload hook. We don't know the next location. + message = hooks[i](); + } + + return message; + } + } + + var unlistenBefore = void 0, + unlistenBeforeUnload = void 0; + + function removeListenBeforeHooksForRoute(route) { + var routeID = getRouteID(route); + if (!routeID) { + return; + } + + delete RouteHooks[routeID]; + + if (!hasAnyProperties(RouteHooks)) { + // teardown transition & beforeunload hooks + if (unlistenBefore) { + unlistenBefore(); + unlistenBefore = null; + } + + if (unlistenBeforeUnload) { + unlistenBeforeUnload(); + unlistenBeforeUnload = null; + } + } + } + + /** + * Registers the given hook function to run before leaving the given route. + * + * During a normal transition, the hook function receives the next location + * as its only argument and can return either a prompt message (string) to show the user, + * to make sure they want to leave the page; or `false`, to prevent the transition. + * Any other return value will have no effect. + * + * During the beforeunload event (in browsers) the hook receives no arguments. + * In this case it must return a prompt message to prevent the transition. + * + * Returns a function that may be used to unbind the listener. + */ + function listenBeforeLeavingRoute(route, hook) { + var thereWereNoRouteHooks = !hasAnyProperties(RouteHooks); + var routeID = getRouteID(route, true); + + RouteHooks[routeID] = hook; + + if (thereWereNoRouteHooks) { + // setup transition & beforeunload hooks + unlistenBefore = history.listenBefore(transitionHook); + + if (history.listenBeforeUnload) + unlistenBeforeUnload = history.listenBeforeUnload(beforeUnloadHook); + } + + return function () { + removeListenBeforeHooksForRoute(route); + }; + } + + /** + * This is the API for stateful environments. As the location + * changes, we update state and call the listener. We can also + * gracefully handle errors and redirects. + */ + function listen(listener) { + function historyListener(location) { + if (state.location === location) { + listener(null, state); + } else { + match(location, function (error, redirectLocation, nextState) { + if (error) { + listener(error); + } else if (redirectLocation) { + history.replace(redirectLocation); + } else if (nextState) { + listener(null, nextState); + } else { + true + ? Object(__WEBPACK_IMPORTED_MODULE_0__routerWarning__['a' /* default */])( + false, + 'Location "%s" did not match any routes', + location.pathname + location.search + location.hash, + ) + : void 0; + } + }); + } + } + + // TODO: Only use a single history listener. Otherwise we'll end up with + // multiple concurrent calls to match. + + // Set up the history listener first in case the initial match redirects. + var unsubscribe = history.listen(historyListener); + + if (state.location) { + // Picking up on a matchContext. + listener(null, state); + } else { + historyListener(history.getCurrentLocation()); + } + + return unsubscribe; + } + + return { + isActive: isActive, + match: match, + listenBeforeLeavingRoute: listenBeforeLeavingRoute, + listen: listen, + }; + } + + /***/ + }, + /* 255 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = isPromise; + function isPromise(obj) { + return obj && typeof obj.then === 'function'; + } + + /***/ + }, + /* 256 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['b'] = createRouterObject; + /* harmony export (immutable) */ __webpack_exports__['a'] = assignRouterState; + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + function createRouterObject(history, transitionManager, state) { + var router = _extends({}, history, { + setRouteLeaveHook: transitionManager.listenBeforeLeavingRoute, + isActive: transitionManager.isActive, + }); + + return assignRouterState(router, state); + } + + function assignRouterState(router, _ref) { + var location = _ref.location, + params = _ref.params, + routes = _ref.routes; + + router.location = location; + router.params = params; + router.routes = routes; + + return router; + } + + /***/ + }, + /* 257 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_create_react_class__ = __webpack_require__(37); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_create_react_class___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_create_react_class__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types__ = __webpack_require__(10); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_2_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_invariant__ = __webpack_require__(14); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_invariant___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_3_invariant__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__PropTypes__ = __webpack_require__(170); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__ContextUtils__ = __webpack_require__(169); + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + function _objectWithoutProperties(obj, keys) { + var target = {}; + for (var i in obj) { + if (keys.indexOf(i) >= 0) continue; + if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; + target[i] = obj[i]; + } + return target; + } + + function isLeftClickEvent(event) { + return event.button === 0; + } + + function isModifiedEvent(event) { + return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey); + } + + // TODO: De-duplicate against hasAnyProperties in createTransitionManager. + function isEmptyObject(object) { + for (var p in object) { + if (Object.prototype.hasOwnProperty.call(object, p)) return false; + } + return true; + } + + function resolveToLocation(to, router) { + return typeof to === 'function' ? to(router.location) : to; + } + + /** + * A <Link> is used to create an <a> element that links to a route. + * When that route is active, the link gets the value of its + * activeClassName prop. + * + * For example, assuming you have the following route: + * + * <Route path="/posts/:postID" component={Post} /> + * + * You could use the following component to link to that route: + * + * <Link to={`/posts/${post.id}`} /> + */ + var Link = __WEBPACK_IMPORTED_MODULE_1_create_react_class___default()({ + displayName: 'Link', + + mixins: [Object(__WEBPACK_IMPORTED_MODULE_5__ContextUtils__['b' /* ContextSubscriber */])('router')], + + contextTypes: { + router: __WEBPACK_IMPORTED_MODULE_4__PropTypes__['a' /* routerShape */], + }, + + propTypes: { + to: Object(__WEBPACK_IMPORTED_MODULE_2_prop_types__['oneOfType'])([ + __WEBPACK_IMPORTED_MODULE_2_prop_types__['string'], + __WEBPACK_IMPORTED_MODULE_2_prop_types__['object'], + __WEBPACK_IMPORTED_MODULE_2_prop_types__['func'], + ]), + activeStyle: __WEBPACK_IMPORTED_MODULE_2_prop_types__['object'], + activeClassName: __WEBPACK_IMPORTED_MODULE_2_prop_types__['string'], + onlyActiveOnIndex: __WEBPACK_IMPORTED_MODULE_2_prop_types__['bool'].isRequired, + onClick: __WEBPACK_IMPORTED_MODULE_2_prop_types__['func'], + target: __WEBPACK_IMPORTED_MODULE_2_prop_types__['string'], + }, + + getDefaultProps: function getDefaultProps() { + return { + onlyActiveOnIndex: false, + style: {}, + }; + }, + handleClick: function handleClick(event) { + if (this.props.onClick) this.props.onClick(event); + + if (event.defaultPrevented) return; + + var router = this.context.router; + + !router + ? true + ? __WEBPACK_IMPORTED_MODULE_3_invariant___default()( + false, + '<Link>s rendered outside of a router context cannot navigate.', + ) + : invariant(false) + : void 0; + + if (isModifiedEvent(event) || !isLeftClickEvent(event)) return; + + // If target prop is set (e.g. to "_blank"), let browser handle link. + /* istanbul ignore if: untestable with Karma */ + if (this.props.target) return; + + event.preventDefault(); + + router.push(resolveToLocation(this.props.to, router)); + }, + render: function render() { + var _props = this.props, + to = _props.to, + activeClassName = _props.activeClassName, + activeStyle = _props.activeStyle, + onlyActiveOnIndex = _props.onlyActiveOnIndex, + props = _objectWithoutProperties(_props, [ + 'to', + 'activeClassName', + 'activeStyle', + 'onlyActiveOnIndex', + ]); + + // Ignore if rendered outside the context of router to simplify unit testing. + + var router = this.context.router; + + if (router) { + // If user does not specify a `to` prop, return an empty anchor tag. + if (!to) { + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('a', props); + } + + var toLocation = resolveToLocation(to, router); + props.href = router.createHref(toLocation); + + if (activeClassName || (activeStyle != null && !isEmptyObject(activeStyle))) { + if (router.isActive(toLocation, onlyActiveOnIndex)) { + if (activeClassName) { + if (props.className) { + props.className += ' ' + activeClassName; + } else { + props.className = activeClassName; + } + } + + if (activeStyle) props.style = _extends({}, props.style, activeStyle); + } + } + } + + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'a', + _extends({}, props, { onClick: this.handleClick }), + ); + }, + }); + + /* harmony default export */ __webpack_exports__['a'] = Link; + + /***/ + }, + /* 258 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_create_react_class__ = __webpack_require__(37); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_create_react_class___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_create_react_class__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(10); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant__ = __webpack_require__(14); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_2_invariant__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__RouteUtils__ = __webpack_require__(48); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__PatternUtils__ = __webpack_require__(72); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__ = __webpack_require__(86); + + /** + * A <Redirect> is used to declare another URL path a client should + * be sent to when they request a given URL. + * + * Redirects are placed alongside routes in the route configuration + * and are traversed in the same manner. + */ + /* eslint-disable react/require-render-return */ + var Redirect = __WEBPACK_IMPORTED_MODULE_0_create_react_class___default()({ + displayName: 'Redirect', + + statics: { + createRouteFromReactElement: function createRouteFromReactElement(element) { + var route = Object( + __WEBPACK_IMPORTED_MODULE_3__RouteUtils__['a' /* createRouteFromReactElement */], + )(element); + + if (route.from) route.path = route.from; + + route.onEnter = function (nextState, replace) { + var location = nextState.location, + params = nextState.params; + + var pathname = void 0; + if (route.to.charAt(0) === '/') { + pathname = Object(__WEBPACK_IMPORTED_MODULE_4__PatternUtils__['a' /* formatPattern */])( + route.to, + params, + ); + } else if (!route.to) { + pathname = location.pathname; + } else { + var routeIndex = nextState.routes.indexOf(route); + var parentPattern = Redirect.getRoutePattern(nextState.routes, routeIndex - 1); + var pattern = parentPattern.replace(/\/*$/, '/') + route.to; + pathname = Object(__WEBPACK_IMPORTED_MODULE_4__PatternUtils__['a' /* formatPattern */])( + pattern, + params, + ); + } + + replace({ + pathname: pathname, + query: route.query || location.query, + state: route.state || location.state, + }); + }; + + return route; + }, + getRoutePattern: function getRoutePattern(routes, routeIndex) { + var parentPattern = ''; + + for (var i = routeIndex; i >= 0; i--) { + var route = routes[i]; + var pattern = route.path || ''; + + parentPattern = pattern.replace(/\/*$/, '/') + parentPattern; + + if (pattern.indexOf('/') === 0) break; + } + + return '/' + parentPattern; + }, + }, + + propTypes: { + path: __WEBPACK_IMPORTED_MODULE_1_prop_types__['string'], + from: __WEBPACK_IMPORTED_MODULE_1_prop_types__['string'], // Alias for path + to: __WEBPACK_IMPORTED_MODULE_1_prop_types__['string'].isRequired, + query: __WEBPACK_IMPORTED_MODULE_1_prop_types__['object'], + state: __WEBPACK_IMPORTED_MODULE_1_prop_types__['object'], + onEnter: __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__['c' /* falsy */], + children: __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__['c' /* falsy */], + }, + + /* istanbul ignore next: sanity check */ + render: function render() { + true + ? true + ? __WEBPACK_IMPORTED_MODULE_2_invariant___default()( + false, + '<Redirect> elements are for router configuration only and should not be rendered', + ) + : invariant(false) + : void 0; + }, + }); + + /* harmony default export */ __webpack_exports__['a'] = Redirect; + + /***/ + }, + /* 259 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = createMemoryHistory; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries__ = + __webpack_require__(260); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename__ = + __webpack_require__(261); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_history_lib_createMemoryHistory__ = + __webpack_require__(603); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_history_lib_createMemoryHistory___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_history_lib_createMemoryHistory__); + + function createMemoryHistory(options) { + // signatures and type checking differ between `useQueries` and + // `createMemoryHistory`, have to create `memoryHistory` first because + // `useQueries` doesn't understand the signature + var memoryHistory = __WEBPACK_IMPORTED_MODULE_2_history_lib_createMemoryHistory___default()(options); + var createHistory = function createHistory() { + return memoryHistory; + }; + var history = __WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries___default()( + __WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename___default()(createHistory), + )(options); + return history; + } + + /***/ + }, + /* 260 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + var _queryString = __webpack_require__(601); + + var _runTransitionHook = __webpack_require__(171); + + var _runTransitionHook2 = _interopRequireDefault(_runTransitionHook); + + var _LocationUtils = __webpack_require__(73); + + var _PathUtils = __webpack_require__(49); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + var defaultStringifyQuery = function defaultStringifyQuery(query) { + return (0, _queryString.stringify)(query).replace(/%20/g, '+'); + }; + + var defaultParseQueryString = _queryString.parse; + + /** + * Returns a new createHistory function that may be used to create + * history objects that know how to handle URL queries. + */ + var useQueries = function useQueries(createHistory) { + return function () { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + + var history = createHistory(options); + var stringifyQuery = options.stringifyQuery, + parseQueryString = options.parseQueryString; + + if (typeof stringifyQuery !== 'function') stringifyQuery = defaultStringifyQuery; + + if (typeof parseQueryString !== 'function') parseQueryString = defaultParseQueryString; + + var decodeQuery = function decodeQuery(location) { + if (!location) return location; + + if (location.query == null) location.query = parseQueryString(location.search.substring(1)); + + return location; + }; + + var encodeQuery = function encodeQuery(location, query) { + if (query == null) return location; + + var object = typeof location === 'string' ? (0, _PathUtils.parsePath)(location) : location; + var queryString = stringifyQuery(query); + var search = queryString ? '?' + queryString : ''; + + return _extends({}, object, { + search: search, + }); + }; + + // Override all read methods with query-aware versions. + var getCurrentLocation = function getCurrentLocation() { + return decodeQuery(history.getCurrentLocation()); + }; + + var listenBefore = function listenBefore(hook) { + return history.listenBefore(function (location, callback) { + return (0, _runTransitionHook2.default)(hook, decodeQuery(location), callback); + }); + }; + + var listen = function listen(listener) { + return history.listen(function (location) { + return listener(decodeQuery(location)); + }); + }; + + // Override all write methods with query-aware versions. + var push = function push(location) { + return history.push(encodeQuery(location, location.query)); + }; + + var replace = function replace(location) { + return history.replace(encodeQuery(location, location.query)); + }; + + var createPath = function createPath(location) { + return history.createPath(encodeQuery(location, location.query)); + }; + + var createHref = function createHref(location) { + return history.createHref(encodeQuery(location, location.query)); + }; + + var createLocation = function createLocation(location) { + for ( + var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; + _key < _len; + _key++ + ) { + args[_key - 1] = arguments[_key]; + } + + var newLocation = history.createLocation.apply( + history, + [encodeQuery(location, location.query)].concat(args), + ); + + if (location.query) newLocation.query = (0, _LocationUtils.createQuery)(location.query); + + return decodeQuery(newLocation); + }; + + return _extends({}, history, { + getCurrentLocation: getCurrentLocation, + listenBefore: listenBefore, + listen: listen, + push: push, + replace: replace, + createPath: createPath, + createHref: createHref, + createLocation: createLocation, + }); + }; + }; + + exports.default = useQueries; + + /***/ + }, + /* 261 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + var _runTransitionHook = __webpack_require__(171); + + var _runTransitionHook2 = _interopRequireDefault(_runTransitionHook); + + var _PathUtils = __webpack_require__(49); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + var useBasename = function useBasename(createHistory) { + return function () { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + + var history = createHistory(options); + var basename = options.basename; + + var addBasename = function addBasename(location) { + if (!location) return location; + + if (basename && location.basename == null) { + if (location.pathname.toLowerCase().indexOf(basename.toLowerCase()) === 0) { + location.pathname = location.pathname.substring(basename.length); + location.basename = basename; + + if (location.pathname === '') location.pathname = '/'; + } else { + location.basename = ''; + } + } + + return location; + }; + + var prependBasename = function prependBasename(location) { + if (!basename) return location; + + var object = typeof location === 'string' ? (0, _PathUtils.parsePath)(location) : location; + var pname = object.pathname; + var normalizedBasename = basename.slice(-1) === '/' ? basename : basename + '/'; + var normalizedPathname = pname.charAt(0) === '/' ? pname.slice(1) : pname; + var pathname = normalizedBasename + normalizedPathname; + + return _extends({}, object, { + pathname: pathname, + }); + }; + + // Override all read methods with basename-aware versions. + var getCurrentLocation = function getCurrentLocation() { + return addBasename(history.getCurrentLocation()); + }; + + var listenBefore = function listenBefore(hook) { + return history.listenBefore(function (location, callback) { + return (0, _runTransitionHook2.default)(hook, addBasename(location), callback); + }); + }; + + var listen = function listen(listener) { + return history.listen(function (location) { + return listener(addBasename(location)); + }); + }; + + // Override all write methods with basename-aware versions. + var push = function push(location) { + return history.push(prependBasename(location)); + }; + + var replace = function replace(location) { + return history.replace(prependBasename(location)); + }; + + var createPath = function createPath(location) { + return history.createPath(prependBasename(location)); + }; + + var createHref = function createHref(location) { + return history.createHref(prependBasename(location)); + }; + + var createLocation = function createLocation(location) { + for ( + var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; + _key < _len; + _key++ + ) { + args[_key - 1] = arguments[_key]; + } + + return addBasename( + history.createLocation.apply(history, [prependBasename(location)].concat(args)), + ); + }; + + return _extends({}, history, { + getCurrentLocation: getCurrentLocation, + listenBefore: listenBefore, + listen: listen, + push: push, + replace: replace, + createPath: createPath, + createHref: createHref, + createLocation: createLocation, + }); + }; + }; + + exports.default = useBasename; + + /***/ + }, + /* 262 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = useRouterHistory; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries__ = + __webpack_require__(260); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename__ = + __webpack_require__(261); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename__); + + function useRouterHistory(createHistory) { + return function (options) { + var history = __WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries___default()( + __WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename___default()(createHistory), + )(options); + return history; + }; + } + + /***/ + }, + /* 263 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + exports.readState = exports.saveState = undefined; + + var _warning = __webpack_require__(47); + + var _warning2 = _interopRequireDefault(_warning); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + var QuotaExceededErrors = { + QuotaExceededError: true, + QUOTA_EXCEEDED_ERR: true, + }; + + var SecurityErrors = { + SecurityError: true, + }; + + var KeyPrefix = '@@History/'; + + var createKey = function createKey(key) { + return KeyPrefix + key; + }; + + var saveState = (exports.saveState = function saveState(key, state) { + if (!window.sessionStorage) { + // Session storage is not available or hidden. + // sessionStorage is undefined in Internet Explorer when served via file protocol. + true + ? (0, _warning2.default)(false, '[history] Unable to save state; sessionStorage is not available') + : void 0; + + return; + } + + try { + if (state == null) { + window.sessionStorage.removeItem(createKey(key)); + } else { + window.sessionStorage.setItem(createKey(key), JSON.stringify(state)); + } + } catch (error) { + if (SecurityErrors[error.name]) { + // Blocking cookies in Chrome/Firefox/Safari throws SecurityError on any + // attempt to access window.sessionStorage. + true + ? (0, _warning2.default)( + false, + '[history] Unable to save state; sessionStorage is not available due to security settings', + ) + : void 0; + + return; + } + + if (QuotaExceededErrors[error.name] && window.sessionStorage.length === 0) { + // Safari "private mode" throws QuotaExceededError. + true + ? (0, _warning2.default)( + false, + '[history] Unable to save state; sessionStorage is not available in Safari private mode', + ) + : void 0; + + return; + } + + throw error; + } + }); + + var readState = (exports.readState = function readState(key) { + var json = void 0; + try { + json = window.sessionStorage.getItem(createKey(key)); + } catch (error) { + if (SecurityErrors[error.name]) { + // Blocking cookies in Chrome/Firefox/Safari throws SecurityError on any + // attempt to access window.sessionStorage. + true + ? (0, _warning2.default)( + false, + '[history] Unable to read state; sessionStorage is not available due to security settings', + ) + : void 0; + + return undefined; + } + } + + if (json) { + try { + return JSON.parse(json); + } catch (error) { + // Ignore invalid JSON. + } + } + + return undefined; + }); + + /***/ + }, + /* 264 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = createRouterHistory; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__useRouterHistory__ = __webpack_require__(262); + + var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement); + + function createRouterHistory(createHistory) { + var history = void 0; + if (canUseDOM) + history = Object(__WEBPACK_IMPORTED_MODULE_0__useRouterHistory__['a' /* default */])( + createHistory, + )(); + return history; + } + + /***/ + }, + /* 265 */ + /***/ function (module, exports, __webpack_require__) { + exports.__esModule = true; + exports.Helmet = undefined; + + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + var _react = __webpack_require__(1); + + var _react2 = _interopRequireDefault(_react); + + var _propTypes = __webpack_require__(10); + + var _propTypes2 = _interopRequireDefault(_propTypes); + + var _reactSideEffect = __webpack_require__(626); + + var _reactSideEffect2 = _interopRequireDefault(_reactSideEffect); + + var _reactFastCompare = __webpack_require__(628); + + var _reactFastCompare2 = _interopRequireDefault(_reactFastCompare); + + var _HelmetUtils = __webpack_require__(629); + + var _HelmetConstants = __webpack_require__(266); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + function _objectWithoutProperties(obj, keys) { + var target = {}; + for (var i in obj) { + if (keys.indexOf(i) >= 0) continue; + if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; + target[i] = obj[i]; + } + return target; + } + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + var Helmet = function Helmet(Component) { + var _class, _temp; + + return ( + (_temp = _class = + (function (_React$Component) { + _inherits(HelmetWrapper, _React$Component); + + function HelmetWrapper() { + _classCallCheck(this, HelmetWrapper); + + return _possibleConstructorReturn(this, _React$Component.apply(this, arguments)); + } + + HelmetWrapper.prototype.shouldComponentUpdate = function shouldComponentUpdate(nextProps) { + return !(0, _reactFastCompare2.default)(this.props, nextProps); + }; + + HelmetWrapper.prototype.mapNestedChildrenToProps = function mapNestedChildrenToProps( + child, + nestedChildren, + ) { + if (!nestedChildren) { + return null; + } + + switch (child.type) { + case _HelmetConstants.TAG_NAMES.SCRIPT: + case _HelmetConstants.TAG_NAMES.NOSCRIPT: + return { + innerHTML: nestedChildren, + }; + + case _HelmetConstants.TAG_NAMES.STYLE: + return { + cssText: nestedChildren, + }; + } + + throw new Error( + '<' + + child.type + + ' /> elements are self-closing and can not contain children. Refer to our API for more information.', + ); + }; + + HelmetWrapper.prototype.flattenArrayTypeChildren = function flattenArrayTypeChildren(_ref) { + var _extends2; + + var child = _ref.child, + arrayTypeChildren = _ref.arrayTypeChildren, + newChildProps = _ref.newChildProps, + nestedChildren = _ref.nestedChildren; + + return _extends( + {}, + arrayTypeChildren, + ((_extends2 = {}), + (_extends2[child.type] = [].concat(arrayTypeChildren[child.type] || [], [ + _extends({}, newChildProps, this.mapNestedChildrenToProps(child, nestedChildren)), + ])), + _extends2), + ); + }; + + HelmetWrapper.prototype.mapObjectTypeChildren = function mapObjectTypeChildren(_ref2) { + var _extends3, _extends4; + + var child = _ref2.child, + newProps = _ref2.newProps, + newChildProps = _ref2.newChildProps, + nestedChildren = _ref2.nestedChildren; + + switch (child.type) { + case _HelmetConstants.TAG_NAMES.TITLE: + return _extends( + {}, + newProps, + ((_extends3 = {}), + (_extends3[child.type] = nestedChildren), + (_extends3.titleAttributes = _extends({}, newChildProps)), + _extends3), + ); + + case _HelmetConstants.TAG_NAMES.BODY: + return _extends({}, newProps, { + bodyAttributes: _extends({}, newChildProps), + }); + + case _HelmetConstants.TAG_NAMES.HTML: + return _extends({}, newProps, { + htmlAttributes: _extends({}, newChildProps), + }); + } + + return _extends( + {}, + newProps, + ((_extends4 = {}), (_extends4[child.type] = _extends({}, newChildProps)), _extends4), + ); + }; + + HelmetWrapper.prototype.mapArrayTypeChildrenToProps = function mapArrayTypeChildrenToProps( + arrayTypeChildren, + newProps, + ) { + var newFlattenedProps = _extends({}, newProps); + + Object.keys(arrayTypeChildren).forEach(function (arrayChildName) { + var _extends5; + + newFlattenedProps = _extends( + {}, + newFlattenedProps, + ((_extends5 = {}), + (_extends5[arrayChildName] = arrayTypeChildren[arrayChildName]), + _extends5), + ); + }); + + return newFlattenedProps; + }; + + HelmetWrapper.prototype.warnOnInvalidChildren = function warnOnInvalidChildren( + child, + nestedChildren, + ) { + if (true) { + if ( + !_HelmetConstants.VALID_TAG_NAMES.some(function (name) { + return child.type === name; + }) + ) { + if (typeof child.type === 'function') { + return (0, _HelmetUtils.warn)( + 'You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information.', + ); + } + + return (0, _HelmetUtils.warn)( + 'Only elements types ' + + _HelmetConstants.VALID_TAG_NAMES.join(', ') + + ' are allowed. Helmet does not support rendering <' + + child.type + + '> elements. Refer to our API for more information.', + ); + } + + if ( + nestedChildren && + typeof nestedChildren !== 'string' && + (!Array.isArray(nestedChildren) || + nestedChildren.some(function (nestedChild) { + return typeof nestedChild !== 'string'; + })) + ) { + throw new Error( + 'Helmet expects a string as a child of <' + + child.type + + '>. Did you forget to wrap your children in braces? ( <' + + child.type + + '>{``}</' + + child.type + + '> ) Refer to our API for more information.', + ); + } + } + + return true; + }; + + HelmetWrapper.prototype.mapChildrenToProps = function mapChildrenToProps(children, newProps) { + var _this2 = this; + + var arrayTypeChildren = {}; + + _react2.default.Children.forEach(children, function (child) { + if (!child || !child.props) { + return; + } + + var _child$props = child.props, + nestedChildren = _child$props.children, + childProps = _objectWithoutProperties(_child$props, ['children']); + + var newChildProps = (0, _HelmetUtils.convertReactPropstoHtmlAttributes)(childProps); + + _this2.warnOnInvalidChildren(child, nestedChildren); + + switch (child.type) { + case _HelmetConstants.TAG_NAMES.LINK: + case _HelmetConstants.TAG_NAMES.META: + case _HelmetConstants.TAG_NAMES.NOSCRIPT: + case _HelmetConstants.TAG_NAMES.SCRIPT: + case _HelmetConstants.TAG_NAMES.STYLE: + arrayTypeChildren = _this2.flattenArrayTypeChildren({ + child: child, + arrayTypeChildren: arrayTypeChildren, + newChildProps: newChildProps, + nestedChildren: nestedChildren, + }); + break; + + default: + newProps = _this2.mapObjectTypeChildren({ + child: child, + newProps: newProps, + newChildProps: newChildProps, + nestedChildren: nestedChildren, + }); + break; + } + }); + + newProps = this.mapArrayTypeChildrenToProps(arrayTypeChildren, newProps); + return newProps; + }; + + HelmetWrapper.prototype.render = function render() { + var _props = this.props, + children = _props.children, + props = _objectWithoutProperties(_props, ['children']); + + var newProps = _extends({}, props); + + if (children) { + newProps = this.mapChildrenToProps(children, newProps); + } + + return _react2.default.createElement(Component, newProps); + }; + + _createClass(HelmetWrapper, null, [ + { + key: 'canUseDOM', + + // Component.peek comes from react-side-effect: + // For testing, you may use a static peek() method available on the returned component. + // It lets you get the current state without resetting the mounted instance stack. + // Don’t use it for anything other than testing. + + /** + * @param {Object} base: {"target": "_blank", "href": "http://mysite.com/"} + * @param {Object} bodyAttributes: {"className": "root"} + * @param {String} defaultTitle: "Default Title" + * @param {Boolean} defer: true + * @param {Boolean} encodeSpecialCharacters: true + * @param {Object} htmlAttributes: {"lang": "en", "amp": undefined} + * @param {Array} link: [{"rel": "canonical", "href": "http://mysite.com/example"}] + * @param {Array} meta: [{"name": "description", "content": "Test description"}] + * @param {Array} noscript: [{"innerHTML": "<img src='http://mysite.com/js/test.js'"}] + * @param {Function} onChangeClientState: "(newState) => console.log(newState)" + * @param {Array} script: [{"type": "text/javascript", "src": "http://mysite.com/js/test.js"}] + * @param {Array} style: [{"type": "text/css", "cssText": "div { display: block; color: blue; }"}] + * @param {String} title: "Title" + * @param {Object} titleAttributes: {"itemprop": "name"} + * @param {String} titleTemplate: "MySite.com - %s" + */ + set: function set(canUseDOM) { + Component.canUseDOM = canUseDOM; + }, + }, + ]); + + return HelmetWrapper; + })(_react2.default.Component)), + (_class.propTypes = { + base: _propTypes2.default.object, + bodyAttributes: _propTypes2.default.object, + children: _propTypes2.default.oneOfType([ + _propTypes2.default.arrayOf(_propTypes2.default.node), + _propTypes2.default.node, + ]), + defaultTitle: _propTypes2.default.string, + defer: _propTypes2.default.bool, + encodeSpecialCharacters: _propTypes2.default.bool, + htmlAttributes: _propTypes2.default.object, + link: _propTypes2.default.arrayOf(_propTypes2.default.object), + meta: _propTypes2.default.arrayOf(_propTypes2.default.object), + noscript: _propTypes2.default.arrayOf(_propTypes2.default.object), + onChangeClientState: _propTypes2.default.func, + script: _propTypes2.default.arrayOf(_propTypes2.default.object), + style: _propTypes2.default.arrayOf(_propTypes2.default.object), + title: _propTypes2.default.string, + titleAttributes: _propTypes2.default.object, + titleTemplate: _propTypes2.default.string, + }), + (_class.defaultProps = { + defer: true, + encodeSpecialCharacters: true, + }), + (_class.peek = Component.peek), + (_class.rewind = function () { + var mappedState = Component.rewind(); + if (!mappedState) { + // provide fallback if mappedState is undefined + mappedState = (0, _HelmetUtils.mapStateOnServer)({ + baseTag: [], + bodyAttributes: {}, + encodeSpecialCharacters: true, + htmlAttributes: {}, + linkTags: [], + metaTags: [], + noscriptTags: [], + scriptTags: [], + styleTags: [], + title: '', + titleAttributes: {}, + }); + } + + return mappedState; + }), + _temp + ); + }; + + var NullComponent = function NullComponent() { + return null; + }; + + var HelmetSideEffects = (0, _reactSideEffect2.default)( + _HelmetUtils.reducePropsToState, + _HelmetUtils.handleClientStateChange, + _HelmetUtils.mapStateOnServer, + )(NullComponent); + + var HelmetExport = Helmet(HelmetSideEffects); + HelmetExport.renderStatic = HelmetExport.rewind; + + exports.Helmet = HelmetExport; + exports.default = HelmetExport; + + /***/ + }, + /* 266 */ + /***/ function (module, exports) { + exports.__esModule = true; + var ATTRIBUTE_NAMES = (exports.ATTRIBUTE_NAMES = { + BODY: 'bodyAttributes', + HTML: 'htmlAttributes', + TITLE: 'titleAttributes', + }); + + var TAG_NAMES = (exports.TAG_NAMES = { + BASE: 'base', + BODY: 'body', + HEAD: 'head', + HTML: 'html', + LINK: 'link', + META: 'meta', + NOSCRIPT: 'noscript', + SCRIPT: 'script', + STYLE: 'style', + TITLE: 'title', + }); + + var VALID_TAG_NAMES = (exports.VALID_TAG_NAMES = Object.keys(TAG_NAMES).map(function (name) { + return TAG_NAMES[name]; + })); + + var TAG_PROPERTIES = (exports.TAG_PROPERTIES = { + CHARSET: 'charset', + CSS_TEXT: 'cssText', + HREF: 'href', + HTTPEQUIV: 'http-equiv', + INNER_HTML: 'innerHTML', + ITEM_PROP: 'itemprop', + NAME: 'name', + PROPERTY: 'property', + REL: 'rel', + SRC: 'src', + }); + + var REACT_TAG_MAP = (exports.REACT_TAG_MAP = { + accesskey: 'accessKey', + charset: 'charSet', + class: 'className', + contenteditable: 'contentEditable', + contextmenu: 'contextMenu', + 'http-equiv': 'httpEquiv', + itemprop: 'itemProp', + tabindex: 'tabIndex', + }); + + var HELMET_PROPS = (exports.HELMET_PROPS = { + DEFAULT_TITLE: 'defaultTitle', + DEFER: 'defer', + ENCODE_SPECIAL_CHARACTERS: 'encodeSpecialCharacters', + ON_CHANGE_CLIENT_STATE: 'onChangeClientState', + TITLE_TEMPLATE: 'titleTemplate', + }); + + var HTML_TAG_MAP = (exports.HTML_TAG_MAP = Object.keys(REACT_TAG_MAP).reduce(function (obj, key) { + obj[REACT_TAG_MAP[key]] = key; + return obj; + }, {})); + + var SELF_CLOSING_TAGS = (exports.SELF_CLOSING_TAGS = [ + TAG_NAMES.NOSCRIPT, + TAG_NAMES.SCRIPT, + TAG_NAMES.STYLE, + ]); + + var HELMET_ATTRIBUTE = (exports.HELMET_ATTRIBUTE = 'data-react-helmet'); + + /***/ + }, + /* 267 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = __webpack_require__(268); + + /***/ + }, + /* 268 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + Object.defineProperty(__webpack_exports__, '__esModule', { value: true }); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_polyfill__ = __webpack_require__(269); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_polyfill___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_babel_polyfill__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_es5_shim__ = __webpack_require__(471); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_es5_shim___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_es5_shim__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_on_rails__ = __webpack_require__(211); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_on_rails___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_2_react_on_rails__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__non_react_HelloString__ = + __webpack_require__(539); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__components_HelloWorld__ = + __webpack_require__(162); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__components_HelloWorldES5__ = + __webpack_require__(544); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__components_HelloWorldWithLogAndThrow__ = + __webpack_require__(550); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__HelloWorldApp__ = __webpack_require__(551); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__BrokenApp__ = __webpack_require__(552); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__ServerReduxApp__ = __webpack_require__(553); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__ServerReduxSharedStoreApp__ = + __webpack_require__(585); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__ServerRouterApp__ = __webpack_require__(586); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__components_PureComponent__ = + __webpack_require__(616); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__components_CssModulesImagesFontsExample__ = + __webpack_require__(617); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__stores_SharedReduxStore__ = + __webpack_require__(619); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__DeferredRenderAppServer__ = + __webpack_require__(620); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__ServerRenderedHtml__ = __webpack_require__(623); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__ReactHelmetServerApp__ = + __webpack_require__(625); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__components_ImageExample__ = + __webpack_require__(631); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_19__SetTimeoutLoggingApp__ = + __webpack_require__(638); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_20__ComponentWithLodashApp__ = + __webpack_require__(639); + + // Shows the mapping from the exported object to the name used by the server rendering. + + // Example of server rendering with no React + + // React components + + // Generator function + + // Example of React + Redux + + // Example of 2 React components sharing the same store + + // Example of React Router with Server Rendering + + // Deferred render on the client side w/ server render + + // Deferred render on the client side w/ server render + + // Deferred render on the client side w/ server render with additional HTML strings: + + // Demonstrate using Images + + __WEBPACK_IMPORTED_MODULE_2_react_on_rails___default.a.register({ + BrokenApp: __WEBPACK_IMPORTED_MODULE_8__BrokenApp__['a' /* default */], + HelloWorld: __WEBPACK_IMPORTED_MODULE_4__components_HelloWorld__['a' /* default */], + HelloWorldWithLogAndThrow: + __WEBPACK_IMPORTED_MODULE_6__components_HelloWorldWithLogAndThrow__['a' /* default */], + HelloWorldES5: __WEBPACK_IMPORTED_MODULE_5__components_HelloWorldES5__['a' /* default */], + ReduxApp: __WEBPACK_IMPORTED_MODULE_9__ServerReduxApp__['a' /* default */], + ReduxSharedStoreApp: __WEBPACK_IMPORTED_MODULE_10__ServerReduxSharedStoreApp__['a' /* default */], + HelloWorldApp: __WEBPACK_IMPORTED_MODULE_7__HelloWorldApp__['a' /* default */], + RouterApp: __WEBPACK_IMPORTED_MODULE_11__ServerRouterApp__['a' /* default */], + HelloString: __WEBPACK_IMPORTED_MODULE_3__non_react_HelloString__['a' /* default */], + PureComponent: __WEBPACK_IMPORTED_MODULE_12__components_PureComponent__['a' /* default */], + CssModulesImagesFontsExample: + __WEBPACK_IMPORTED_MODULE_13__components_CssModulesImagesFontsExample__['a' /* default */], + DeferredRenderApp: __WEBPACK_IMPORTED_MODULE_15__DeferredRenderAppServer__['a' /* default */], + RenderedHtml: __WEBPACK_IMPORTED_MODULE_16__ServerRenderedHtml__['a' /* default */], + ReactHelmetApp: __WEBPACK_IMPORTED_MODULE_17__ReactHelmetServerApp__['a' /* default */], + ImageExample: __WEBPACK_IMPORTED_MODULE_18__components_ImageExample__['a' /* default */], + SetTimeoutLoggingApp: __WEBPACK_IMPORTED_MODULE_19__SetTimeoutLoggingApp__['a' /* default */], + ComponentWithLodashApp: __WEBPACK_IMPORTED_MODULE_20__ComponentWithLodashApp__['a' /* default */], + }); + + __WEBPACK_IMPORTED_MODULE_2_react_on_rails___default.a.registerStore({ + SharedReduxStore: __WEBPACK_IMPORTED_MODULE_14__stores_SharedReduxStore__['a' /* default */], + }); + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + })(); + + /***/ + }, + /* 269 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (global) { + __webpack_require__(270); + + __webpack_require__(467); + + __webpack_require__(468); + + if (global._babelPolyfill) { + throw new Error('only one instance of babel-polyfill is allowed'); + } + global._babelPolyfill = true; + + var DEFINE_PROPERTY = 'defineProperty'; + function define(O, key, value) { + O[key] || + Object[DEFINE_PROPERTY](O, key, { + writable: true, + configurable: true, + value: value, + }); + } + + define(String.prototype, 'padLeft', ''.padStart); + define(String.prototype, 'padRight', ''.padEnd); + + 'pop,reverse,shift,keys,values,entries,indexOf,every,some,forEach,map,filter,find,findIndex,includes,join,slice,concat,push,splice,unshift,sort,lastIndexOf,reduce,reduceRight,copyWithin,fill' + .split(',') + .forEach(function (key) { + [][key] && define(Array, key, Function.call.bind([][key])); + }); + /* WEBPACK VAR INJECTION */ + }).call(exports, __webpack_require__(38)); + + /***/ + }, + /* 270 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(271); + __webpack_require__(274); + __webpack_require__(275); + __webpack_require__(276); + __webpack_require__(277); + __webpack_require__(278); + __webpack_require__(279); + __webpack_require__(280); + __webpack_require__(281); + __webpack_require__(282); + __webpack_require__(283); + __webpack_require__(284); + __webpack_require__(285); + __webpack_require__(286); + __webpack_require__(287); + __webpack_require__(288); + __webpack_require__(289); + __webpack_require__(290); + __webpack_require__(291); + __webpack_require__(292); + __webpack_require__(293); + __webpack_require__(294); + __webpack_require__(295); + __webpack_require__(296); + __webpack_require__(297); + __webpack_require__(298); + __webpack_require__(299); + __webpack_require__(300); + __webpack_require__(301); + __webpack_require__(302); + __webpack_require__(303); + __webpack_require__(304); + __webpack_require__(305); + __webpack_require__(306); + __webpack_require__(307); + __webpack_require__(308); + __webpack_require__(309); + __webpack_require__(310); + __webpack_require__(311); + __webpack_require__(312); + __webpack_require__(313); + __webpack_require__(314); + __webpack_require__(315); + __webpack_require__(316); + __webpack_require__(317); + __webpack_require__(318); + __webpack_require__(319); + __webpack_require__(320); + __webpack_require__(321); + __webpack_require__(322); + __webpack_require__(323); + __webpack_require__(324); + __webpack_require__(325); + __webpack_require__(326); + __webpack_require__(327); + __webpack_require__(328); + __webpack_require__(329); + __webpack_require__(330); + __webpack_require__(331); + __webpack_require__(332); + __webpack_require__(333); + __webpack_require__(334); + __webpack_require__(335); + __webpack_require__(336); + __webpack_require__(337); + __webpack_require__(338); + __webpack_require__(339); + __webpack_require__(340); + __webpack_require__(341); + __webpack_require__(342); + __webpack_require__(343); + __webpack_require__(344); + __webpack_require__(345); + __webpack_require__(346); + __webpack_require__(347); + __webpack_require__(348); + __webpack_require__(349); + __webpack_require__(351); + __webpack_require__(352); + __webpack_require__(354); + __webpack_require__(355); + __webpack_require__(356); + __webpack_require__(357); + __webpack_require__(358); + __webpack_require__(359); + __webpack_require__(360); + __webpack_require__(362); + __webpack_require__(363); + __webpack_require__(364); + __webpack_require__(365); + __webpack_require__(366); + __webpack_require__(367); + __webpack_require__(368); + __webpack_require__(369); + __webpack_require__(370); + __webpack_require__(371); + __webpack_require__(372); + __webpack_require__(373); + __webpack_require__(374); + __webpack_require__(133); + __webpack_require__(375); + __webpack_require__(194); + __webpack_require__(376); + __webpack_require__(195); + __webpack_require__(377); + __webpack_require__(378); + __webpack_require__(379); + __webpack_require__(380); + __webpack_require__(381); + __webpack_require__(198); + __webpack_require__(200); + __webpack_require__(201); + __webpack_require__(382); + __webpack_require__(383); + __webpack_require__(384); + __webpack_require__(385); + __webpack_require__(386); + __webpack_require__(387); + __webpack_require__(388); + __webpack_require__(389); + __webpack_require__(390); + __webpack_require__(391); + __webpack_require__(392); + __webpack_require__(393); + __webpack_require__(394); + __webpack_require__(395); + __webpack_require__(396); + __webpack_require__(397); + __webpack_require__(398); + __webpack_require__(399); + __webpack_require__(400); + __webpack_require__(401); + __webpack_require__(402); + __webpack_require__(403); + __webpack_require__(404); + __webpack_require__(405); + __webpack_require__(406); + __webpack_require__(407); + __webpack_require__(408); + __webpack_require__(409); + __webpack_require__(410); + __webpack_require__(411); + __webpack_require__(412); + __webpack_require__(413); + __webpack_require__(414); + __webpack_require__(415); + __webpack_require__(416); + __webpack_require__(417); + __webpack_require__(418); + __webpack_require__(419); + __webpack_require__(420); + __webpack_require__(421); + __webpack_require__(422); + __webpack_require__(423); + __webpack_require__(424); + __webpack_require__(425); + __webpack_require__(426); + __webpack_require__(427); + __webpack_require__(428); + __webpack_require__(429); + __webpack_require__(430); + __webpack_require__(431); + __webpack_require__(432); + __webpack_require__(433); + __webpack_require__(434); + __webpack_require__(435); + __webpack_require__(436); + __webpack_require__(437); + __webpack_require__(438); + __webpack_require__(439); + __webpack_require__(440); + __webpack_require__(441); + __webpack_require__(442); + __webpack_require__(443); + __webpack_require__(444); + __webpack_require__(445); + __webpack_require__(446); + __webpack_require__(447); + __webpack_require__(448); + __webpack_require__(449); + __webpack_require__(450); + __webpack_require__(451); + __webpack_require__(452); + __webpack_require__(453); + __webpack_require__(454); + __webpack_require__(455); + __webpack_require__(456); + __webpack_require__(457); + __webpack_require__(458); + __webpack_require__(459); + __webpack_require__(460); + __webpack_require__(461); + __webpack_require__(462); + __webpack_require__(463); + __webpack_require__(464); + __webpack_require__(465); + __webpack_require__(466); + module.exports = __webpack_require__(23); + + /***/ + }, + /* 271 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // ECMAScript 6 symbols shim + var global = __webpack_require__(3); + var has = __webpack_require__(18); + var DESCRIPTORS = __webpack_require__(8); + var $export = __webpack_require__(0); + var redefine = __webpack_require__(16); + var META = __webpack_require__(43).KEY; + var $fails = __webpack_require__(4); + var shared = __webpack_require__(74); + var setToStringTag = __webpack_require__(65); + var uid = __webpack_require__(51); + var wks = __webpack_require__(6); + var wksExt = __webpack_require__(176); + var wksDefine = __webpack_require__(114); + var enumKeys = __webpack_require__(273); + var isArray = __webpack_require__(89); + var anObject = __webpack_require__(2); + var isObject = __webpack_require__(5); + var toObject = __webpack_require__(11); + var toIObject = __webpack_require__(19); + var toPrimitive = __webpack_require__(31); + var createDesc = __webpack_require__(50); + var _create = __webpack_require__(54); + var gOPNExt = __webpack_require__(179); + var $GOPD = __webpack_require__(20); + var $GOPS = __webpack_require__(88); + var $DP = __webpack_require__(9); + var $keys = __webpack_require__(52); + var gOPD = $GOPD.f; + var dP = $DP.f; + var gOPN = gOPNExt.f; + var $Symbol = global.Symbol; + var $JSON = global.JSON; + var _stringify = $JSON && $JSON.stringify; + var PROTOTYPE = 'prototype'; + var HIDDEN = wks('_hidden'); + var TO_PRIMITIVE = wks('toPrimitive'); + var isEnum = {}.propertyIsEnumerable; + var SymbolRegistry = shared('symbol-registry'); + var AllSymbols = shared('symbols'); + var OPSymbols = shared('op-symbols'); + var ObjectProto = Object[PROTOTYPE]; + var USE_NATIVE = typeof $Symbol == 'function' && !!$GOPS.f; + var QObject = global.QObject; + // Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173 + var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild; + + // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687 + var setSymbolDesc = + DESCRIPTORS && + $fails(function () { + return ( + _create( + dP({}, 'a', { + get: function () { + return dP(this, 'a', { value: 7 }).a; + }, + }), + ).a != 7 + ); + }) + ? function (it, key, D) { + var protoDesc = gOPD(ObjectProto, key); + if (protoDesc) delete ObjectProto[key]; + dP(it, key, D); + if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc); + } + : dP; + + var wrap = function (tag) { + var sym = (AllSymbols[tag] = _create($Symbol[PROTOTYPE])); + sym._k = tag; + return sym; + }; + + var isSymbol = + USE_NATIVE && typeof $Symbol.iterator == 'symbol' + ? function (it) { + return typeof it == 'symbol'; + } + : function (it) { + return it instanceof $Symbol; + }; + + var $defineProperty = function defineProperty(it, key, D) { + if (it === ObjectProto) $defineProperty(OPSymbols, key, D); + anObject(it); + key = toPrimitive(key, true); + anObject(D); + if (has(AllSymbols, key)) { + if (!D.enumerable) { + if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {})); + it[HIDDEN][key] = true; + } else { + if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false; + D = _create(D, { enumerable: createDesc(0, false) }); + } + return setSymbolDesc(it, key, D); + } + return dP(it, key, D); + }; + var $defineProperties = function defineProperties(it, P) { + anObject(it); + var keys = enumKeys((P = toIObject(P))); + var i = 0; + var l = keys.length; + var key; + while (l > i) $defineProperty(it, (key = keys[i++]), P[key]); + return it; + }; + var $create = function create(it, P) { + return P === undefined ? _create(it) : $defineProperties(_create(it), P); + }; + var $propertyIsEnumerable = function propertyIsEnumerable(key) { + var E = isEnum.call(this, (key = toPrimitive(key, true))); + if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false; + return E || !has(this, key) || !has(AllSymbols, key) || (has(this, HIDDEN) && this[HIDDEN][key]) + ? E + : true; + }; + var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) { + it = toIObject(it); + key = toPrimitive(key, true); + if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return; + var D = gOPD(it, key); + if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true; + return D; + }; + var $getOwnPropertyNames = function getOwnPropertyNames(it) { + var names = gOPN(toIObject(it)); + var result = []; + var i = 0; + var key; + while (names.length > i) { + if (!has(AllSymbols, (key = names[i++])) && key != HIDDEN && key != META) result.push(key); + } + return result; + }; + var $getOwnPropertySymbols = function getOwnPropertySymbols(it) { + var IS_OP = it === ObjectProto; + var names = gOPN(IS_OP ? OPSymbols : toIObject(it)); + var result = []; + var i = 0; + var key; + while (names.length > i) { + if (has(AllSymbols, (key = names[i++])) && (IS_OP ? has(ObjectProto, key) : true)) + result.push(AllSymbols[key]); + } + return result; + }; + + // 19.4.1.1 Symbol([description]) + if (!USE_NATIVE) { + $Symbol = function Symbol() { + if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!'); + var tag = uid(arguments.length > 0 ? arguments[0] : undefined); + var $set = function (value) { + if (this === ObjectProto) $set.call(OPSymbols, value); + if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false; + setSymbolDesc(this, tag, createDesc(1, value)); + }; + if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set }); + return wrap(tag); + }; + redefine($Symbol[PROTOTYPE], 'toString', function toString() { + return this._k; + }); + + $GOPD.f = $getOwnPropertyDescriptor; + $DP.f = $defineProperty; + __webpack_require__(55).f = gOPNExt.f = $getOwnPropertyNames; + __webpack_require__(76).f = $propertyIsEnumerable; + $GOPS.f = $getOwnPropertySymbols; + + if (DESCRIPTORS && !__webpack_require__(42)) { + redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true); + } + + wksExt.f = function (name) { + return wrap(wks(name)); + }; + } + + $export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol }); + + for ( + var es6Symbols = + // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14 + 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'.split( + ',', + ), + j = 0; + es6Symbols.length > j; + + ) + wks(es6Symbols[j++]); + + for (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k; ) + wksDefine(wellKnownSymbols[k++]); + + $export($export.S + $export.F * !USE_NATIVE, 'Symbol', { + // 19.4.2.1 Symbol.for(key) + for: function (key) { + return has(SymbolRegistry, (key += '')) + ? SymbolRegistry[key] + : (SymbolRegistry[key] = $Symbol(key)); + }, + // 19.4.2.5 Symbol.keyFor(sym) + keyFor: function keyFor(sym) { + if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!'); + for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key; + }, + useSetter: function () { + setter = true; + }, + useSimple: function () { + setter = false; + }, + }); + + $export($export.S + $export.F * !USE_NATIVE, 'Object', { + // 19.1.2.2 Object.create(O [, Properties]) + create: $create, + // 19.1.2.4 Object.defineProperty(O, P, Attributes) + defineProperty: $defineProperty, + // 19.1.2.3 Object.defineProperties(O, Properties) + defineProperties: $defineProperties, + // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) + getOwnPropertyDescriptor: $getOwnPropertyDescriptor, + // 19.1.2.7 Object.getOwnPropertyNames(O) + getOwnPropertyNames: $getOwnPropertyNames, + // 19.1.2.8 Object.getOwnPropertySymbols(O) + getOwnPropertySymbols: $getOwnPropertySymbols, + }); + + // Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives + // https://bugs.chromium.org/p/v8/issues/detail?id=3443 + var FAILS_ON_PRIMITIVES = $fails(function () { + $GOPS.f(1); + }); + + $export($export.S + $export.F * FAILS_ON_PRIMITIVES, 'Object', { + getOwnPropertySymbols: function getOwnPropertySymbols(it) { + return $GOPS.f(toObject(it)); + }, + }); + + // 24.3.2 JSON.stringify(value [, replacer [, space]]) + $JSON && + $export( + $export.S + + $export.F * + (!USE_NATIVE || + $fails(function () { + var S = $Symbol(); + // MS Edge converts symbol values to JSON as {} + // WebKit converts symbol values to JSON as null + // V8 throws on boxed symbols + return ( + _stringify([S]) != '[null]' || + _stringify({ a: S }) != '{}' || + _stringify(Object(S)) != '{}' + ); + })), + 'JSON', + { + stringify: function stringify(it) { + var args = [it]; + var i = 1; + var replacer, $replacer; + while (arguments.length > i) args.push(arguments[i++]); + $replacer = replacer = args[1]; + if ((!isObject(replacer) && it === undefined) || isSymbol(it)) return; // IE8 returns string on undefined + if (!isArray(replacer)) + replacer = function (key, value) { + if (typeof $replacer == 'function') value = $replacer.call(this, key, value); + if (!isSymbol(value)) return value; + }; + args[1] = replacer; + return _stringify.apply($JSON, args); + }, + }, + ); + + // 19.4.3.4 Symbol.prototype[@@toPrimitive](hint) + $Symbol[PROTOTYPE][TO_PRIMITIVE] || + __webpack_require__(15)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf); + // 19.4.3.5 Symbol.prototype[@@toStringTag] + setToStringTag($Symbol, 'Symbol'); + // 20.2.1.9 Math[@@toStringTag] + setToStringTag(Math, 'Math', true); + // 24.3.3 JSON[@@toStringTag] + setToStringTag(global.JSON, 'JSON', true); + + /***/ + }, + /* 272 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = __webpack_require__(74)('native-function-to-string', Function.toString); + + /***/ + }, + /* 273 */ + /***/ function (module, exports, __webpack_require__) { + // all enumerable object keys, includes symbols + var getKeys = __webpack_require__(52); + var gOPS = __webpack_require__(88); + var pIE = __webpack_require__(76); + module.exports = function (it) { + var result = getKeys(it); + var getSymbols = gOPS.f; + if (getSymbols) { + var symbols = getSymbols(it); + var isEnum = pIE.f; + var i = 0; + var key; + while (symbols.length > i) if (isEnum.call(it, (key = symbols[i++]))) result.push(key); + } + return result; + }; + + /***/ + }, + /* 274 */ + /***/ function (module, exports, __webpack_require__) { + var $export = __webpack_require__(0); + // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) + $export($export.S, 'Object', { create: __webpack_require__(54) }); + + /***/ + }, + /* 275 */ + /***/ function (module, exports, __webpack_require__) { + var $export = __webpack_require__(0); + // 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes) + $export($export.S + $export.F * !__webpack_require__(8), 'Object', { + defineProperty: __webpack_require__(9).f, + }); + + /***/ + }, + /* 276 */ + /***/ function (module, exports, __webpack_require__) { + var $export = __webpack_require__(0); + // 19.1.2.3 / 15.2.3.7 Object.defineProperties(O, Properties) + $export($export.S + $export.F * !__webpack_require__(8), 'Object', { + defineProperties: __webpack_require__(178), + }); + + /***/ + }, + /* 277 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) + var toIObject = __webpack_require__(19); + var $getOwnPropertyDescriptor = __webpack_require__(20).f; + + __webpack_require__(33)('getOwnPropertyDescriptor', function () { + return function getOwnPropertyDescriptor(it, key) { + return $getOwnPropertyDescriptor(toIObject(it), key); + }; + }); + + /***/ + }, + /* 278 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.9 Object.getPrototypeOf(O) + var toObject = __webpack_require__(11); + var $getPrototypeOf = __webpack_require__(21); + + __webpack_require__(33)('getPrototypeOf', function () { + return function getPrototypeOf(it) { + return $getPrototypeOf(toObject(it)); + }; + }); + + /***/ + }, + /* 279 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.14 Object.keys(O) + var toObject = __webpack_require__(11); + var $keys = __webpack_require__(52); + + __webpack_require__(33)('keys', function () { + return function keys(it) { + return $keys(toObject(it)); + }; + }); + + /***/ + }, + /* 280 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.7 Object.getOwnPropertyNames(O) + __webpack_require__(33)('getOwnPropertyNames', function () { + return __webpack_require__(179).f; + }); + + /***/ + }, + /* 281 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.5 Object.freeze(O) + var isObject = __webpack_require__(5); + var meta = __webpack_require__(43).onFreeze; + + __webpack_require__(33)('freeze', function ($freeze) { + return function freeze(it) { + return $freeze && isObject(it) ? $freeze(meta(it)) : it; + }; + }); + + /***/ + }, + /* 282 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.17 Object.seal(O) + var isObject = __webpack_require__(5); + var meta = __webpack_require__(43).onFreeze; + + __webpack_require__(33)('seal', function ($seal) { + return function seal(it) { + return $seal && isObject(it) ? $seal(meta(it)) : it; + }; + }); + + /***/ + }, + /* 283 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.15 Object.preventExtensions(O) + var isObject = __webpack_require__(5); + var meta = __webpack_require__(43).onFreeze; + + __webpack_require__(33)('preventExtensions', function ($preventExtensions) { + return function preventExtensions(it) { + return $preventExtensions && isObject(it) ? $preventExtensions(meta(it)) : it; + }; + }); + + /***/ + }, + /* 284 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.12 Object.isFrozen(O) + var isObject = __webpack_require__(5); + + __webpack_require__(33)('isFrozen', function ($isFrozen) { + return function isFrozen(it) { + return isObject(it) ? ($isFrozen ? $isFrozen(it) : false) : true; + }; + }); + + /***/ + }, + /* 285 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.13 Object.isSealed(O) + var isObject = __webpack_require__(5); + + __webpack_require__(33)('isSealed', function ($isSealed) { + return function isSealed(it) { + return isObject(it) ? ($isSealed ? $isSealed(it) : false) : true; + }; + }); + + /***/ + }, + /* 286 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.11 Object.isExtensible(O) + var isObject = __webpack_require__(5); + + __webpack_require__(33)('isExtensible', function ($isExtensible) { + return function isExtensible(it) { + return isObject(it) ? ($isExtensible ? $isExtensible(it) : true) : false; + }; + }); + + /***/ + }, + /* 287 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.3.1 Object.assign(target, source) + var $export = __webpack_require__(0); + + $export($export.S + $export.F, 'Object', { assign: __webpack_require__(180) }); + + /***/ + }, + /* 288 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.3.10 Object.is(value1, value2) + var $export = __webpack_require__(0); + $export($export.S, 'Object', { is: __webpack_require__(181) }); + + /***/ + }, + /* 289 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.3.19 Object.setPrototypeOf(O, proto) + var $export = __webpack_require__(0); + $export($export.S, 'Object', { setPrototypeOf: __webpack_require__(118).set }); + + /***/ + }, + /* 290 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // 19.1.3.6 Object.prototype.toString() + var classof = __webpack_require__(66); + var test = {}; + test[__webpack_require__(6)('toStringTag')] = 'z'; + if (test + '' != '[object z]') { + __webpack_require__(16)( + Object.prototype, + 'toString', + function toString() { + return '[object ' + classof(this) + ']'; + }, + true, + ); + } + + /***/ + }, + /* 291 */ + /***/ function (module, exports, __webpack_require__) { + // 19.2.3.2 / 15.3.4.5 Function.prototype.bind(thisArg, args...) + var $export = __webpack_require__(0); + + $export($export.P, 'Function', { bind: __webpack_require__(182) }); + + /***/ + }, + /* 292 */ + /***/ function (module, exports, __webpack_require__) { + var dP = __webpack_require__(9).f; + var FProto = Function.prototype; + var nameRE = /^\s*function ([^ (]*)/; + var NAME = 'name'; + + // 19.2.4.2 name + NAME in FProto || + (__webpack_require__(8) && + dP(FProto, NAME, { + configurable: true, + get: function () { + try { + return ('' + this).match(nameRE)[1]; + } catch (e) { + return ''; + } + }, + })); + + /***/ + }, + /* 293 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var isObject = __webpack_require__(5); + var getPrototypeOf = __webpack_require__(21); + var HAS_INSTANCE = __webpack_require__(6)('hasInstance'); + var FunctionProto = Function.prototype; + // 19.2.3.6 Function.prototype[@@hasInstance](V) + if (!(HAS_INSTANCE in FunctionProto)) + __webpack_require__(9).f(FunctionProto, HAS_INSTANCE, { + value: function (O) { + if (typeof this != 'function' || !isObject(O)) return false; + if (!isObject(this.prototype)) return O instanceof this; + // for environment w/o native `@@hasInstance` logic enough `instanceof`, but add this: + while ((O = getPrototypeOf(O))) if (this.prototype === O) return true; + return false; + }, + }); + + /***/ + }, + /* 294 */ + /***/ function (module, exports, __webpack_require__) { + var $export = __webpack_require__(0); + var $parseInt = __webpack_require__(184); + // 18.2.5 parseInt(string, radix) + $export($export.G + $export.F * (parseInt != $parseInt), { parseInt: $parseInt }); + + /***/ + }, + /* 295 */ + /***/ function (module, exports, __webpack_require__) { + var $export = __webpack_require__(0); + var $parseFloat = __webpack_require__(185); + // 18.2.4 parseFloat(string) + $export($export.G + $export.F * (parseFloat != $parseFloat), { parseFloat: $parseFloat }); + + /***/ + }, + /* 296 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var global = __webpack_require__(3); + var has = __webpack_require__(18); + var cof = __webpack_require__(25); + var inheritIfRequired = __webpack_require__(120); + var toPrimitive = __webpack_require__(31); + var fails = __webpack_require__(4); + var gOPN = __webpack_require__(55).f; + var gOPD = __webpack_require__(20).f; + var dP = __webpack_require__(9).f; + var $trim = __webpack_require__(67).trim; + var NUMBER = 'Number'; + var $Number = global[NUMBER]; + var Base = $Number; + var proto = $Number.prototype; + // Opera ~12 has broken Object#toString + var BROKEN_COF = cof(__webpack_require__(54)(proto)) == NUMBER; + var TRIM = 'trim' in String.prototype; + + // 7.1.3 ToNumber(argument) + var toNumber = function (argument) { + var it = toPrimitive(argument, false); + if (typeof it == 'string' && it.length > 2) { + it = TRIM ? it.trim() : $trim(it, 3); + var first = it.charCodeAt(0); + var third, radix, maxCode; + if (first === 43 || first === 45) { + third = it.charCodeAt(2); + if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix + } else if (first === 48) { + switch (it.charCodeAt(1)) { + case 66: + case 98: + radix = 2; + maxCode = 49; + break; // fast equal /^0b[01]+$/i + case 79: + case 111: + radix = 8; + maxCode = 55; + break; // fast equal /^0o[0-7]+$/i + default: + return +it; + } + for (var digits = it.slice(2), i = 0, l = digits.length, code; i < l; i++) { + code = digits.charCodeAt(i); + // parseInt parses a string to a first unavailable symbol + // but ToNumber should return NaN if a string contains unavailable symbols + if (code < 48 || code > maxCode) return NaN; + } + return parseInt(digits, radix); + } + } + return +it; + }; + + if (!$Number(' 0o1') || !$Number('0b1') || $Number('+0x1')) { + $Number = function Number(value) { + var it = arguments.length < 1 ? 0 : value; + var that = this; + return that instanceof $Number && + // check on 1..constructor(foo) case + (BROKEN_COF + ? fails(function () { + proto.valueOf.call(that); + }) + : cof(that) != NUMBER) + ? inheritIfRequired(new Base(toNumber(it)), that, $Number) + : toNumber(it); + }; + for ( + var keys = __webpack_require__(8) + ? gOPN(Base) + : // ES3: + ( + 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' + + // ES6 (in case, if modules with ES6 Number statics required before): + 'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' + + 'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger' + ).split(','), + j = 0, + key; + keys.length > j; + j++ + ) { + if (has(Base, (key = keys[j])) && !has($Number, key)) { + dP($Number, key, gOPD(Base, key)); + } + } + $Number.prototype = proto; + proto.constructor = $Number; + __webpack_require__(16)(global, NUMBER, $Number); + } + + /***/ + }, + /* 297 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0); + var toInteger = __webpack_require__(26); + var aNumberValue = __webpack_require__(186); + var repeat = __webpack_require__(121); + var $toFixed = (1.0).toFixed; + var floor = Math.floor; + var data = [0, 0, 0, 0, 0, 0]; + var ERROR = 'Number.toFixed: incorrect invocation!'; + var ZERO = '0'; + + var multiply = function (n, c) { + var i = -1; + var c2 = c; + while (++i < 6) { + c2 += n * data[i]; + data[i] = c2 % 1e7; + c2 = floor(c2 / 1e7); + } + }; + var divide = function (n) { + var i = 6; + var c = 0; + while (--i >= 0) { + c += data[i]; + data[i] = floor(c / n); + c = (c % n) * 1e7; + } + }; + var numToString = function () { + var i = 6; + var s = ''; + while (--i >= 0) { + if (s !== '' || i === 0 || data[i] !== 0) { + var t = String(data[i]); + s = s === '' ? t : s + repeat.call(ZERO, 7 - t.length) + t; + } + } + return s; + }; + var pow = function (x, n, acc) { + return n === 0 ? acc : n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc); + }; + var log = function (x) { + var n = 0; + var x2 = x; + while (x2 >= 4096) { + n += 12; + x2 /= 4096; + } + while (x2 >= 2) { + n += 1; + x2 /= 2; + } + return n; + }; + + $export( + $export.P + + $export.F * + ((!!$toFixed && + ((0.00008).toFixed(3) !== '0.000' || + (0.9).toFixed(0) !== '1' || + (1.255).toFixed(2) !== '1.25' || + (1000000000000000128.0).toFixed(0) !== '1000000000000000128')) || + !__webpack_require__(4)(function () { + // V8 ~ Android 4.3- + $toFixed.call({}); + })), + 'Number', + { + toFixed: function toFixed(fractionDigits) { + var x = aNumberValue(this, ERROR); + var f = toInteger(fractionDigits); + var s = ''; + var m = ZERO; + var e, z, j, k; + if (f < 0 || f > 20) throw RangeError(ERROR); + // eslint-disable-next-line no-self-compare + if (x != x) return 'NaN'; + if (x <= -1e21 || x >= 1e21) return String(x); + if (x < 0) { + s = '-'; + x = -x; + } + if (x > 1e-21) { + e = log(x * pow(2, 69, 1)) - 69; + z = e < 0 ? x * pow(2, -e, 1) : x / pow(2, e, 1); + z *= 0x10000000000000; + e = 52 - e; + if (e > 0) { + multiply(0, z); + j = f; + while (j >= 7) { + multiply(1e7, 0); + j -= 7; + } + multiply(pow(10, j, 1), 0); + j = e - 1; + while (j >= 23) { + divide(1 << 23); + j -= 23; + } + divide(1 << j); + multiply(1, 1); + divide(2); + m = numToString(); + } else { + multiply(0, z); + multiply(1 << -e, 0); + m = numToString() + repeat.call(ZERO, f); + } + } + if (f > 0) { + k = m.length; + m = + s + (k <= f ? '0.' + repeat.call(ZERO, f - k) + m : m.slice(0, k - f) + '.' + m.slice(k - f)); + } else { + m = s + m; + } + return m; + }, + }, + ); + + /***/ + }, + /* 298 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0); + var $fails = __webpack_require__(4); + var aNumberValue = __webpack_require__(186); + var $toPrecision = (1.0).toPrecision; + + $export( + $export.P + + $export.F * + ($fails(function () { + // IE7- + return $toPrecision.call(1, undefined) !== '1'; + }) || + !$fails(function () { + // V8 ~ Android 4.3- + $toPrecision.call({}); + })), + 'Number', + { + toPrecision: function toPrecision(precision) { + var that = aNumberValue(this, 'Number#toPrecision: incorrect invocation!'); + return precision === undefined ? $toPrecision.call(that) : $toPrecision.call(that, precision); + }, + }, + ); + + /***/ + }, + /* 299 */ + /***/ function (module, exports, __webpack_require__) { + // 20.1.2.1 Number.EPSILON + var $export = __webpack_require__(0); + + $export($export.S, 'Number', { EPSILON: Math.pow(2, -52) }); + + /***/ + }, + /* 300 */ + /***/ function (module, exports, __webpack_require__) { + // 20.1.2.2 Number.isFinite(number) + var $export = __webpack_require__(0); + var _isFinite = __webpack_require__(3).isFinite; + + $export($export.S, 'Number', { + isFinite: function isFinite(it) { + return typeof it == 'number' && _isFinite(it); + }, + }); + + /***/ + }, + /* 301 */ + /***/ function (module, exports, __webpack_require__) { + // 20.1.2.3 Number.isInteger(number) + var $export = __webpack_require__(0); + + $export($export.S, 'Number', { isInteger: __webpack_require__(187) }); + + /***/ + }, + /* 302 */ + /***/ function (module, exports, __webpack_require__) { + // 20.1.2.4 Number.isNaN(number) + var $export = __webpack_require__(0); + + $export($export.S, 'Number', { + isNaN: function isNaN(number) { + // eslint-disable-next-line no-self-compare + return number != number; + }, + }); + + /***/ + }, + /* 303 */ + /***/ function (module, exports, __webpack_require__) { + // 20.1.2.5 Number.isSafeInteger(number) + var $export = __webpack_require__(0); + var isInteger = __webpack_require__(187); + var abs = Math.abs; + + $export($export.S, 'Number', { + isSafeInteger: function isSafeInteger(number) { + return isInteger(number) && abs(number) <= 0x1fffffffffffff; + }, + }); + + /***/ + }, + /* 304 */ + /***/ function (module, exports, __webpack_require__) { + // 20.1.2.6 Number.MAX_SAFE_INTEGER + var $export = __webpack_require__(0); + + $export($export.S, 'Number', { MAX_SAFE_INTEGER: 0x1fffffffffffff }); + + /***/ + }, + /* 305 */ + /***/ function (module, exports, __webpack_require__) { + // 20.1.2.10 Number.MIN_SAFE_INTEGER + var $export = __webpack_require__(0); + + $export($export.S, 'Number', { MIN_SAFE_INTEGER: -0x1fffffffffffff }); + + /***/ + }, + /* 306 */ + /***/ function (module, exports, __webpack_require__) { + var $export = __webpack_require__(0); + var $parseFloat = __webpack_require__(185); + // 20.1.2.12 Number.parseFloat(string) + $export($export.S + $export.F * (Number.parseFloat != $parseFloat), 'Number', { + parseFloat: $parseFloat, + }); + + /***/ + }, + /* 307 */ + /***/ function (module, exports, __webpack_require__) { + var $export = __webpack_require__(0); + var $parseInt = __webpack_require__(184); + // 20.1.2.13 Number.parseInt(string, radix) + $export($export.S + $export.F * (Number.parseInt != $parseInt), 'Number', { parseInt: $parseInt }); + + /***/ + }, + /* 308 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.3 Math.acosh(x) + var $export = __webpack_require__(0); + var log1p = __webpack_require__(188); + var sqrt = Math.sqrt; + var $acosh = Math.acosh; + + $export( + $export.S + + $export.F * + !( + $acosh && + // V8 bug: https://code.google.com/p/v8/issues/detail?id=3509 + Math.floor($acosh(Number.MAX_VALUE)) == 710 && + // Tor Browser bug: Math.acosh(Infinity) -> NaN + $acosh(Infinity) == Infinity + ), + 'Math', + { + acosh: function acosh(x) { + return (x = +x) < 1 + ? NaN + : x > 94906265.62425156 + ? Math.log(x) + Math.LN2 + : log1p(x - 1 + sqrt(x - 1) * sqrt(x + 1)); + }, + }, + ); + + /***/ + }, + /* 309 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.5 Math.asinh(x) + var $export = __webpack_require__(0); + var $asinh = Math.asinh; + + function asinh(x) { + return !isFinite((x = +x)) || x == 0 ? x : x < 0 ? -asinh(-x) : Math.log(x + Math.sqrt(x * x + 1)); + } + + // Tor Browser bug: Math.asinh(0) -> -0 + $export($export.S + $export.F * !($asinh && 1 / $asinh(0) > 0), 'Math', { asinh: asinh }); + + /***/ + }, + /* 310 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.7 Math.atanh(x) + var $export = __webpack_require__(0); + var $atanh = Math.atanh; + + // Tor Browser bug: Math.atanh(-0) -> 0 + $export($export.S + $export.F * !($atanh && 1 / $atanh(-0) < 0), 'Math', { + atanh: function atanh(x) { + return (x = +x) == 0 ? x : Math.log((1 + x) / (1 - x)) / 2; + }, + }); + + /***/ + }, + /* 311 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.9 Math.cbrt(x) + var $export = __webpack_require__(0); + var sign = __webpack_require__(122); + + $export($export.S, 'Math', { + cbrt: function cbrt(x) { + return sign((x = +x)) * Math.pow(Math.abs(x), 1 / 3); + }, + }); + + /***/ + }, + /* 312 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.11 Math.clz32(x) + var $export = __webpack_require__(0); + + $export($export.S, 'Math', { + clz32: function clz32(x) { + return (x >>>= 0) ? 31 - Math.floor(Math.log(x + 0.5) * Math.LOG2E) : 32; + }, + }); + + /***/ + }, + /* 313 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.12 Math.cosh(x) + var $export = __webpack_require__(0); + var exp = Math.exp; + + $export($export.S, 'Math', { + cosh: function cosh(x) { + return (exp((x = +x)) + exp(-x)) / 2; + }, + }); + + /***/ + }, + /* 314 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.14 Math.expm1(x) + var $export = __webpack_require__(0); + var $expm1 = __webpack_require__(123); + + $export($export.S + $export.F * ($expm1 != Math.expm1), 'Math', { expm1: $expm1 }); + + /***/ + }, + /* 315 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.16 Math.fround(x) + var $export = __webpack_require__(0); + + $export($export.S, 'Math', { fround: __webpack_require__(189) }); + + /***/ + }, + /* 316 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.17 Math.hypot([value1[, value2[, … ]]]) + var $export = __webpack_require__(0); + var abs = Math.abs; + + $export($export.S, 'Math', { + hypot: function hypot(value1, value2) { + // eslint-disable-line no-unused-vars + var sum = 0; + var i = 0; + var aLen = arguments.length; + var larg = 0; + var arg, div; + while (i < aLen) { + arg = abs(arguments[i++]); + if (larg < arg) { + div = larg / arg; + sum = sum * div * div + 1; + larg = arg; + } else if (arg > 0) { + div = arg / larg; + sum += div * div; + } else sum += arg; + } + return larg === Infinity ? Infinity : larg * Math.sqrt(sum); + }, + }); + + /***/ + }, + /* 317 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.18 Math.imul(x, y) + var $export = __webpack_require__(0); + var $imul = Math.imul; + + // some WebKit versions fails with big numbers, some has wrong arity + $export( + $export.S + + $export.F * + __webpack_require__(4)(function () { + return $imul(0xffffffff, 5) != -5 || $imul.length != 2; + }), + 'Math', + { + imul: function imul(x, y) { + var UINT16 = 0xffff; + var xn = +x; + var yn = +y; + var xl = UINT16 & xn; + var yl = UINT16 & yn; + return ( + 0 | (xl * yl + ((((UINT16 & (xn >>> 16)) * yl + xl * (UINT16 & (yn >>> 16))) << 16) >>> 0)) + ); + }, + }, + ); + + /***/ + }, + /* 318 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.21 Math.log10(x) + var $export = __webpack_require__(0); + + $export($export.S, 'Math', { + log10: function log10(x) { + return Math.log(x) * Math.LOG10E; + }, + }); + + /***/ + }, + /* 319 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.20 Math.log1p(x) + var $export = __webpack_require__(0); + + $export($export.S, 'Math', { log1p: __webpack_require__(188) }); + + /***/ + }, + /* 320 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.22 Math.log2(x) + var $export = __webpack_require__(0); + + $export($export.S, 'Math', { + log2: function log2(x) { + return Math.log(x) / Math.LN2; + }, + }); + + /***/ + }, + /* 321 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.28 Math.sign(x) + var $export = __webpack_require__(0); + + $export($export.S, 'Math', { sign: __webpack_require__(122) }); + + /***/ + }, + /* 322 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.30 Math.sinh(x) + var $export = __webpack_require__(0); + var expm1 = __webpack_require__(123); + var exp = Math.exp; + + // V8 near Chromium 38 has a problem with very small numbers + $export( + $export.S + + $export.F * + __webpack_require__(4)(function () { + return !Math.sinh(-2e-17) != -2e-17; + }), + 'Math', + { + sinh: function sinh(x) { + return Math.abs((x = +x)) < 1 + ? (expm1(x) - expm1(-x)) / 2 + : (exp(x - 1) - exp(-x - 1)) * (Math.E / 2); + }, + }, + ); + + /***/ + }, + /* 323 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.33 Math.tanh(x) + var $export = __webpack_require__(0); + var expm1 = __webpack_require__(123); + var exp = Math.exp; + + $export($export.S, 'Math', { + tanh: function tanh(x) { + var a = expm1((x = +x)); + var b = expm1(-x); + return a == Infinity ? 1 : b == Infinity ? -1 : (a - b) / (exp(x) + exp(-x)); + }, + }); + + /***/ + }, + /* 324 */ + /***/ function (module, exports, __webpack_require__) { + // 20.2.2.34 Math.trunc(x) + var $export = __webpack_require__(0); + + $export($export.S, 'Math', { + trunc: function trunc(it) { + return (it > 0 ? Math.floor : Math.ceil)(it); + }, + }); + + /***/ + }, + /* 325 */ + /***/ function (module, exports, __webpack_require__) { + var $export = __webpack_require__(0); + var toAbsoluteIndex = __webpack_require__(53); + var fromCharCode = String.fromCharCode; + var $fromCodePoint = String.fromCodePoint; + + // length should be 1, old FF problem + $export($export.S + $export.F * (!!$fromCodePoint && $fromCodePoint.length != 1), 'String', { + // 21.1.2.2 String.fromCodePoint(...codePoints) + fromCodePoint: function fromCodePoint(x) { + // eslint-disable-line no-unused-vars + var res = []; + var aLen = arguments.length; + var i = 0; + var code; + while (aLen > i) { + code = +arguments[i++]; + if (toAbsoluteIndex(code, 0x10ffff) !== code) + throw RangeError(code + ' is not a valid code point'); + res.push( + code < 0x10000 + ? fromCharCode(code) + : fromCharCode(((code -= 0x10000) >> 10) + 0xd800, (code % 0x400) + 0xdc00), + ); + } + return res.join(''); + }, + }); + + /***/ + }, + /* 326 */ + /***/ function (module, exports, __webpack_require__) { + var $export = __webpack_require__(0); + var toIObject = __webpack_require__(19); + var toLength = __webpack_require__(7); + + $export($export.S, 'String', { + // 21.1.2.4 String.raw(callSite, ...substitutions) + raw: function raw(callSite) { + var tpl = toIObject(callSite.raw); + var len = toLength(tpl.length); + var aLen = arguments.length; + var res = []; + var i = 0; + while (len > i) { + res.push(String(tpl[i++])); + if (i < aLen) res.push(String(arguments[i])); + } + return res.join(''); + }, + }); + + /***/ + }, + /* 327 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // 21.1.3.25 String.prototype.trim() + __webpack_require__(67)('trim', function ($trim) { + return function trim() { + return $trim(this, 3); + }; + }); + + /***/ + }, + /* 328 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $at = __webpack_require__(90)(true); + + // 21.1.3.27 String.prototype[@@iterator]() + __webpack_require__(124)( + String, + 'String', + function (iterated) { + this._t = String(iterated); // target + this._i = 0; // next index + // 21.1.5.2.1 %StringIteratorPrototype%.next() + }, + function () { + var O = this._t; + var index = this._i; + var point; + if (index >= O.length) return { value: undefined, done: true }; + point = $at(O, index); + this._i += point.length; + return { value: point, done: false }; + }, + ); + + /***/ + }, + /* 329 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0); + var $at = __webpack_require__(90)(false); + $export($export.P, 'String', { + // 21.1.3.3 String.prototype.codePointAt(pos) + codePointAt: function codePointAt(pos) { + return $at(this, pos); + }, + }); + + /***/ + }, + /* 330 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + // 21.1.3.6 String.prototype.endsWith(searchString [, endPosition]) + + var $export = __webpack_require__(0); + var toLength = __webpack_require__(7); + var context = __webpack_require__(126); + var ENDS_WITH = 'endsWith'; + var $endsWith = ''[ENDS_WITH]; + + $export($export.P + $export.F * __webpack_require__(127)(ENDS_WITH), 'String', { + endsWith: function endsWith(searchString /* , endPosition = @length */) { + var that = context(this, searchString, ENDS_WITH); + var endPosition = arguments.length > 1 ? arguments[1] : undefined; + var len = toLength(that.length); + var end = endPosition === undefined ? len : Math.min(toLength(endPosition), len); + var search = String(searchString); + return $endsWith + ? $endsWith.call(that, search, end) + : that.slice(end - search.length, end) === search; + }, + }); + + /***/ + }, + /* 331 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + // 21.1.3.7 String.prototype.includes(searchString, position = 0) + + var $export = __webpack_require__(0); + var context = __webpack_require__(126); + var INCLUDES = 'includes'; + + $export($export.P + $export.F * __webpack_require__(127)(INCLUDES), 'String', { + includes: function includes(searchString /* , position = 0 */) { + return !!~context(this, searchString, INCLUDES).indexOf( + searchString, + arguments.length > 1 ? arguments[1] : undefined, + ); + }, + }); + + /***/ + }, + /* 332 */ + /***/ function (module, exports, __webpack_require__) { + var $export = __webpack_require__(0); + + $export($export.P, 'String', { + // 21.1.3.13 String.prototype.repeat(count) + repeat: __webpack_require__(121), + }); + + /***/ + }, + /* 333 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + // 21.1.3.18 String.prototype.startsWith(searchString [, position ]) + + var $export = __webpack_require__(0); + var toLength = __webpack_require__(7); + var context = __webpack_require__(126); + var STARTS_WITH = 'startsWith'; + var $startsWith = ''[STARTS_WITH]; + + $export($export.P + $export.F * __webpack_require__(127)(STARTS_WITH), 'String', { + startsWith: function startsWith(searchString /* , position = 0 */) { + var that = context(this, searchString, STARTS_WITH); + var index = toLength(Math.min(arguments.length > 1 ? arguments[1] : undefined, that.length)); + var search = String(searchString); + return $startsWith + ? $startsWith.call(that, search, index) + : that.slice(index, index + search.length) === search; + }, + }); + + /***/ + }, + /* 334 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // B.2.3.2 String.prototype.anchor(name) + __webpack_require__(17)('anchor', function (createHTML) { + return function anchor(name) { + return createHTML(this, 'a', 'name', name); + }; + }); + + /***/ + }, + /* 335 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // B.2.3.3 String.prototype.big() + __webpack_require__(17)('big', function (createHTML) { + return function big() { + return createHTML(this, 'big', '', ''); + }; + }); + + /***/ + }, + /* 336 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // B.2.3.4 String.prototype.blink() + __webpack_require__(17)('blink', function (createHTML) { + return function blink() { + return createHTML(this, 'blink', '', ''); + }; + }); + + /***/ + }, + /* 337 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // B.2.3.5 String.prototype.bold() + __webpack_require__(17)('bold', function (createHTML) { + return function bold() { + return createHTML(this, 'b', '', ''); + }; + }); + + /***/ + }, + /* 338 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // B.2.3.6 String.prototype.fixed() + __webpack_require__(17)('fixed', function (createHTML) { + return function fixed() { + return createHTML(this, 'tt', '', ''); + }; + }); + + /***/ + }, + /* 339 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // B.2.3.7 String.prototype.fontcolor(color) + __webpack_require__(17)('fontcolor', function (createHTML) { + return function fontcolor(color) { + return createHTML(this, 'font', 'color', color); + }; + }); + + /***/ + }, + /* 340 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // B.2.3.8 String.prototype.fontsize(size) + __webpack_require__(17)('fontsize', function (createHTML) { + return function fontsize(size) { + return createHTML(this, 'font', 'size', size); + }; + }); + + /***/ + }, + /* 341 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // B.2.3.9 String.prototype.italics() + __webpack_require__(17)('italics', function (createHTML) { + return function italics() { + return createHTML(this, 'i', '', ''); + }; + }); + + /***/ + }, + /* 342 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // B.2.3.10 String.prototype.link(url) + __webpack_require__(17)('link', function (createHTML) { + return function link(url) { + return createHTML(this, 'a', 'href', url); + }; + }); + + /***/ + }, + /* 343 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // B.2.3.11 String.prototype.small() + __webpack_require__(17)('small', function (createHTML) { + return function small() { + return createHTML(this, 'small', '', ''); + }; + }); + + /***/ + }, + /* 344 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // B.2.3.12 String.prototype.strike() + __webpack_require__(17)('strike', function (createHTML) { + return function strike() { + return createHTML(this, 'strike', '', ''); + }; + }); + + /***/ + }, + /* 345 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // B.2.3.13 String.prototype.sub() + __webpack_require__(17)('sub', function (createHTML) { + return function sub() { + return createHTML(this, 'sub', '', ''); + }; + }); + + /***/ + }, + /* 346 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // B.2.3.14 String.prototype.sup() + __webpack_require__(17)('sup', function (createHTML) { + return function sup() { + return createHTML(this, 'sup', '', ''); + }; + }); + + /***/ + }, + /* 347 */ + /***/ function (module, exports, __webpack_require__) { + // 20.3.3.1 / 15.9.4.4 Date.now() + var $export = __webpack_require__(0); + + $export($export.S, 'Date', { + now: function () { + return new Date().getTime(); + }, + }); + + /***/ + }, + /* 348 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0); + var toObject = __webpack_require__(11); + var toPrimitive = __webpack_require__(31); + + $export( + $export.P + + $export.F * + __webpack_require__(4)(function () { + return ( + new Date(NaN).toJSON() !== null || + Date.prototype.toJSON.call({ + toISOString: function () { + return 1; + }, + }) !== 1 + ); + }), + 'Date', + { + // eslint-disable-next-line no-unused-vars + toJSON: function toJSON(key) { + var O = toObject(this); + var pv = toPrimitive(O); + return typeof pv == 'number' && !isFinite(pv) ? null : O.toISOString(); + }, + }, + ); + + /***/ + }, + /* 349 */ + /***/ function (module, exports, __webpack_require__) { + // 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString() + var $export = __webpack_require__(0); + var toISOString = __webpack_require__(350); + + // PhantomJS / old WebKit has a broken implementations + $export($export.P + $export.F * (Date.prototype.toISOString !== toISOString), 'Date', { + toISOString: toISOString, + }); + + /***/ + }, + /* 350 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString() + var fails = __webpack_require__(4); + var getTime = Date.prototype.getTime; + var $toISOString = Date.prototype.toISOString; + + var lz = function (num) { + return num > 9 ? num : '0' + num; + }; + + // PhantomJS / old WebKit has a broken implementations + module.exports = + fails(function () { + return $toISOString.call(new Date(-5e13 - 1)) != '0385-07-25T07:06:39.999Z'; + }) || + !fails(function () { + $toISOString.call(new Date(NaN)); + }) + ? function toISOString() { + if (!isFinite(getTime.call(this))) throw RangeError('Invalid time value'); + var d = this; + var y = d.getUTCFullYear(); + var m = d.getUTCMilliseconds(); + var s = y < 0 ? '-' : y > 9999 ? '+' : ''; + return ( + s + + ('00000' + Math.abs(y)).slice(s ? -6 : -4) + + '-' + + lz(d.getUTCMonth() + 1) + + '-' + + lz(d.getUTCDate()) + + 'T' + + lz(d.getUTCHours()) + + ':' + + lz(d.getUTCMinutes()) + + ':' + + lz(d.getUTCSeconds()) + + '.' + + (m > 99 ? m : '0' + lz(m)) + + 'Z' + ); + } + : $toISOString; + + /***/ + }, + /* 351 */ + /***/ function (module, exports, __webpack_require__) { + var DateProto = Date.prototype; + var INVALID_DATE = 'Invalid Date'; + var TO_STRING = 'toString'; + var $toString = DateProto[TO_STRING]; + var getTime = DateProto.getTime; + if (new Date(NaN) + '' != INVALID_DATE) { + __webpack_require__(16)(DateProto, TO_STRING, function toString() { + var value = getTime.call(this); + // eslint-disable-next-line no-self-compare + return value === value ? $toString.call(this) : INVALID_DATE; + }); + } + + /***/ + }, + /* 352 */ + /***/ function (module, exports, __webpack_require__) { + var TO_PRIMITIVE = __webpack_require__(6)('toPrimitive'); + var proto = Date.prototype; + + if (!(TO_PRIMITIVE in proto)) __webpack_require__(15)(proto, TO_PRIMITIVE, __webpack_require__(353)); + + /***/ + }, + /* 353 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var anObject = __webpack_require__(2); + var toPrimitive = __webpack_require__(31); + var NUMBER = 'number'; + + module.exports = function (hint) { + if (hint !== 'string' && hint !== NUMBER && hint !== 'default') throw TypeError('Incorrect hint'); + return toPrimitive(anObject(this), hint != NUMBER); + }; + + /***/ + }, + /* 354 */ + /***/ function (module, exports, __webpack_require__) { + // 22.1.2.2 / 15.4.3.2 Array.isArray(arg) + var $export = __webpack_require__(0); + + $export($export.S, 'Array', { isArray: __webpack_require__(89) }); + + /***/ + }, + /* 355 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var ctx = __webpack_require__(24); + var $export = __webpack_require__(0); + var toObject = __webpack_require__(11); + var call = __webpack_require__(190); + var isArrayIter = __webpack_require__(128); + var toLength = __webpack_require__(7); + var createProperty = __webpack_require__(129); + var getIterFn = __webpack_require__(130); + + $export( + $export.S + + $export.F * + !__webpack_require__(92)(function (iter) { + Array.from(iter); + }), + 'Array', + { + // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined) + from: function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) { + var O = toObject(arrayLike); + var C = typeof this == 'function' ? this : Array; + var aLen = arguments.length; + var mapfn = aLen > 1 ? arguments[1] : undefined; + var mapping = mapfn !== undefined; + var index = 0; + var iterFn = getIterFn(O); + var length, result, step, iterator; + if (mapping) mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2); + // if object isn't iterable or it's array with default iterator - use simple case + if (iterFn != undefined && !(C == Array && isArrayIter(iterFn))) { + for (iterator = iterFn.call(O), result = new C(); !(step = iterator.next()).done; index++) { + createProperty( + result, + index, + mapping ? call(iterator, mapfn, [step.value, index], true) : step.value, + ); + } + } else { + length = toLength(O.length); + for (result = new C(length); length > index; index++) { + createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]); + } + } + result.length = index; + return result; + }, + }, + ); + + /***/ + }, + /* 356 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0); + var createProperty = __webpack_require__(129); + + // WebKit Array.of isn't generic + $export( + $export.S + + $export.F * + __webpack_require__(4)(function () { + function F() { + /* empty */ + } + return !(Array.of.call(F) instanceof F); + }), + 'Array', + { + // 22.1.2.3 Array.of( ...items) + of: function of(/* ...args */) { + var index = 0; + var aLen = arguments.length; + var result = new (typeof this == 'function' ? this : Array)(aLen); + while (aLen > index) createProperty(result, index, arguments[index++]); + result.length = aLen; + return result; + }, + }, + ); + + /***/ + }, + /* 357 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // 22.1.3.13 Array.prototype.join(separator) + var $export = __webpack_require__(0); + var toIObject = __webpack_require__(19); + var arrayJoin = [].join; + + // fallback for not array-like strings + $export( + $export.P + $export.F * (__webpack_require__(75) != Object || !__webpack_require__(27)(arrayJoin)), + 'Array', + { + join: function join(separator) { + return arrayJoin.call(toIObject(this), separator === undefined ? ',' : separator); + }, + }, + ); + + /***/ + }, + /* 358 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0); + var html = __webpack_require__(117); + var cof = __webpack_require__(25); + var toAbsoluteIndex = __webpack_require__(53); + var toLength = __webpack_require__(7); + var arraySlice = [].slice; + + // fallback for not array-like ES3 strings and DOM objects + $export( + $export.P + + $export.F * + __webpack_require__(4)(function () { + if (html) arraySlice.call(html); + }), + 'Array', + { + slice: function slice(begin, end) { + var len = toLength(this.length); + var klass = cof(this); + end = end === undefined ? len : end; + if (klass == 'Array') return arraySlice.call(this, begin, end); + var start = toAbsoluteIndex(begin, len); + var upTo = toAbsoluteIndex(end, len); + var size = toLength(upTo - start); + var cloned = new Array(size); + var i = 0; + for (; i < size; i++) cloned[i] = klass == 'String' ? this.charAt(start + i) : this[start + i]; + return cloned; + }, + }, + ); + + /***/ + }, + /* 359 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0); + var aFunction = __webpack_require__(12); + var toObject = __webpack_require__(11); + var fails = __webpack_require__(4); + var $sort = [].sort; + var test = [1, 2, 3]; + + $export( + $export.P + + $export.F * + (fails(function () { + // IE8- + test.sort(undefined); + }) || + !fails(function () { + // V8 bug + test.sort(null); + // Old WebKit + }) || + !__webpack_require__(27)($sort)), + 'Array', + { + // 22.1.3.25 Array.prototype.sort(comparefn) + sort: function sort(comparefn) { + return comparefn === undefined + ? $sort.call(toObject(this)) + : $sort.call(toObject(this), aFunction(comparefn)); + }, + }, + ); + + /***/ + }, + /* 360 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0); + var $forEach = __webpack_require__(34)(0); + var STRICT = __webpack_require__(27)([].forEach, true); + + $export($export.P + $export.F * !STRICT, 'Array', { + // 22.1.3.10 / 15.4.4.18 Array.prototype.forEach(callbackfn [, thisArg]) + forEach: function forEach(callbackfn /* , thisArg */) { + return $forEach(this, callbackfn, arguments[1]); + }, + }); + + /***/ + }, + /* 361 */ + /***/ function (module, exports, __webpack_require__) { + var isObject = __webpack_require__(5); + var isArray = __webpack_require__(89); + var SPECIES = __webpack_require__(6)('species'); + + module.exports = function (original) { + var C; + if (isArray(original)) { + C = original.constructor; + // cross-realm fallback + if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined; + if (isObject(C)) { + C = C[SPECIES]; + if (C === null) C = undefined; + } + } + return C === undefined ? Array : C; + }; + + /***/ + }, + /* 362 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0); + var $map = __webpack_require__(34)(1); + + $export($export.P + $export.F * !__webpack_require__(27)([].map, true), 'Array', { + // 22.1.3.15 / 15.4.4.19 Array.prototype.map(callbackfn [, thisArg]) + map: function map(callbackfn /* , thisArg */) { + return $map(this, callbackfn, arguments[1]); + }, + }); + + /***/ + }, + /* 363 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0); + var $filter = __webpack_require__(34)(2); + + $export($export.P + $export.F * !__webpack_require__(27)([].filter, true), 'Array', { + // 22.1.3.7 / 15.4.4.20 Array.prototype.filter(callbackfn [, thisArg]) + filter: function filter(callbackfn /* , thisArg */) { + return $filter(this, callbackfn, arguments[1]); + }, + }); + + /***/ + }, + /* 364 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0); + var $some = __webpack_require__(34)(3); + + $export($export.P + $export.F * !__webpack_require__(27)([].some, true), 'Array', { + // 22.1.3.23 / 15.4.4.17 Array.prototype.some(callbackfn [, thisArg]) + some: function some(callbackfn /* , thisArg */) { + return $some(this, callbackfn, arguments[1]); + }, + }); + + /***/ + }, + /* 365 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0); + var $every = __webpack_require__(34)(4); + + $export($export.P + $export.F * !__webpack_require__(27)([].every, true), 'Array', { + // 22.1.3.5 / 15.4.4.16 Array.prototype.every(callbackfn [, thisArg]) + every: function every(callbackfn /* , thisArg */) { + return $every(this, callbackfn, arguments[1]); + }, + }); + + /***/ + }, + /* 366 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0); + var $reduce = __webpack_require__(191); + + $export($export.P + $export.F * !__webpack_require__(27)([].reduce, true), 'Array', { + // 22.1.3.18 / 15.4.4.21 Array.prototype.reduce(callbackfn [, initialValue]) + reduce: function reduce(callbackfn /* , initialValue */) { + return $reduce(this, callbackfn, arguments.length, arguments[1], false); + }, + }); + + /***/ + }, + /* 367 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0); + var $reduce = __webpack_require__(191); + + $export($export.P + $export.F * !__webpack_require__(27)([].reduceRight, true), 'Array', { + // 22.1.3.19 / 15.4.4.22 Array.prototype.reduceRight(callbackfn [, initialValue]) + reduceRight: function reduceRight(callbackfn /* , initialValue */) { + return $reduce(this, callbackfn, arguments.length, arguments[1], true); + }, + }); + + /***/ + }, + /* 368 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0); + var $indexOf = __webpack_require__(87)(false); + var $native = [].indexOf; + var NEGATIVE_ZERO = !!$native && 1 / [1].indexOf(1, -0) < 0; + + $export($export.P + $export.F * (NEGATIVE_ZERO || !__webpack_require__(27)($native)), 'Array', { + // 22.1.3.11 / 15.4.4.14 Array.prototype.indexOf(searchElement [, fromIndex]) + indexOf: function indexOf(searchElement /* , fromIndex = 0 */) { + return NEGATIVE_ZERO + ? // convert -0 to +0 + $native.apply(this, arguments) || 0 + : $indexOf(this, searchElement, arguments[1]); + }, + }); + + /***/ + }, + /* 369 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0); + var toIObject = __webpack_require__(19); + var toInteger = __webpack_require__(26); + var toLength = __webpack_require__(7); + var $native = [].lastIndexOf; + var NEGATIVE_ZERO = !!$native && 1 / [1].lastIndexOf(1, -0) < 0; + + $export($export.P + $export.F * (NEGATIVE_ZERO || !__webpack_require__(27)($native)), 'Array', { + // 22.1.3.14 / 15.4.4.15 Array.prototype.lastIndexOf(searchElement [, fromIndex]) + lastIndexOf: function lastIndexOf(searchElement /* , fromIndex = @[*-1] */) { + // convert -0 to +0 + if (NEGATIVE_ZERO) return $native.apply(this, arguments) || 0; + var O = toIObject(this); + var length = toLength(O.length); + var index = length - 1; + if (arguments.length > 1) index = Math.min(index, toInteger(arguments[1])); + if (index < 0) index = length + index; + for (; index >= 0; index--) if (index in O) if (O[index] === searchElement) return index || 0; + return -1; + }, + }); + + /***/ + }, + /* 370 */ + /***/ function (module, exports, __webpack_require__) { + // 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length) + var $export = __webpack_require__(0); + + $export($export.P, 'Array', { copyWithin: __webpack_require__(192) }); + + __webpack_require__(44)('copyWithin'); + + /***/ + }, + /* 371 */ + /***/ function (module, exports, __webpack_require__) { + // 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length) + var $export = __webpack_require__(0); + + $export($export.P, 'Array', { fill: __webpack_require__(132) }); + + __webpack_require__(44)('fill'); + + /***/ + }, + /* 372 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // 22.1.3.8 Array.prototype.find(predicate, thisArg = undefined) + var $export = __webpack_require__(0); + var $find = __webpack_require__(34)(5); + var KEY = 'find'; + var forced = true; + // Shouldn't skip holes + if (KEY in []) + Array(1)[KEY](function () { + forced = false; + }); + $export($export.P + $export.F * forced, 'Array', { + find: function find(callbackfn /* , that = undefined */) { + return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); + }, + }); + __webpack_require__(44)(KEY); + + /***/ + }, + /* 373 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // 22.1.3.9 Array.prototype.findIndex(predicate, thisArg = undefined) + var $export = __webpack_require__(0); + var $find = __webpack_require__(34)(6); + var KEY = 'findIndex'; + var forced = true; + // Shouldn't skip holes + if (KEY in []) + Array(1)[KEY](function () { + forced = false; + }); + $export($export.P + $export.F * forced, 'Array', { + findIndex: function findIndex(callbackfn /* , that = undefined */) { + return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); + }, + }); + __webpack_require__(44)(KEY); + + /***/ + }, + /* 374 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(56)('Array'); + + /***/ + }, + /* 375 */ + /***/ function (module, exports, __webpack_require__) { + var global = __webpack_require__(3); + var inheritIfRequired = __webpack_require__(120); + var dP = __webpack_require__(9).f; + var gOPN = __webpack_require__(55).f; + var isRegExp = __webpack_require__(91); + var $flags = __webpack_require__(77); + var $RegExp = global.RegExp; + var Base = $RegExp; + var proto = $RegExp.prototype; + var re1 = /a/g; + var re2 = /a/g; + // "new" creates a new object, old webkit buggy here + var CORRECT_NEW = new $RegExp(re1) !== re1; + + if ( + __webpack_require__(8) && + (!CORRECT_NEW || + __webpack_require__(4)(function () { + re2[__webpack_require__(6)('match')] = false; + // RegExp constructor can alter flags and IsRegExp works correct with @@match + return $RegExp(re1) != re1 || $RegExp(re2) == re2 || $RegExp(re1, 'i') != '/a/i'; + })) + ) { + $RegExp = function RegExp(p, f) { + var tiRE = this instanceof $RegExp; + var piRE = isRegExp(p); + var fiU = f === undefined; + return !tiRE && piRE && p.constructor === $RegExp && fiU + ? p + : inheritIfRequired( + CORRECT_NEW + ? new Base(piRE && !fiU ? p.source : p, f) + : Base((piRE = p instanceof $RegExp) ? p.source : p, piRE && fiU ? $flags.call(p) : f), + tiRE ? this : proto, + $RegExp, + ); + }; + var proxy = function (key) { + key in $RegExp || + dP($RegExp, key, { + configurable: true, + get: function () { + return Base[key]; + }, + set: function (it) { + Base[key] = it; + }, + }); + }; + for (var keys = gOPN(Base), i = 0; keys.length > i; ) proxy(keys[i++]); + proto.constructor = $RegExp; + $RegExp.prototype = proto; + __webpack_require__(16)(global, 'RegExp', $RegExp); + } + + __webpack_require__(56)('RegExp'); + + /***/ + }, + /* 376 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + __webpack_require__(195); + var anObject = __webpack_require__(2); + var $flags = __webpack_require__(77); + var DESCRIPTORS = __webpack_require__(8); + var TO_STRING = 'toString'; + var $toString = /./[TO_STRING]; + + var define = function (fn) { + __webpack_require__(16)(RegExp.prototype, TO_STRING, fn, true); + }; + + // 21.2.5.14 RegExp.prototype.toString() + if ( + __webpack_require__(4)(function () { + return $toString.call({ source: 'a', flags: 'b' }) != '/a/b'; + }) + ) { + define(function toString() { + var R = anObject(this); + return '/'.concat( + R.source, + '/', + 'flags' in R ? R.flags : !DESCRIPTORS && R instanceof RegExp ? $flags.call(R) : undefined, + ); + }); + // FF44- RegExp#toString has a wrong name + } else if ($toString.name != TO_STRING) { + define(function toString() { + return $toString.call(this); + }); + } + + /***/ + }, + /* 377 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var anObject = __webpack_require__(2); + var toLength = __webpack_require__(7); + var advanceStringIndex = __webpack_require__(135); + var regExpExec = __webpack_require__(93); + + // @@match logic + __webpack_require__(94)('match', 1, function (defined, MATCH, $match, maybeCallNative) { + return [ + // `String.prototype.match` method + // https://tc39.github.io/ecma262/#sec-string.prototype.match + function match(regexp) { + var O = defined(this); + var fn = regexp == undefined ? undefined : regexp[MATCH]; + return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[MATCH](String(O)); + }, + // `RegExp.prototype[@@match]` method + // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@match + function (regexp) { + var res = maybeCallNative($match, regexp, this); + if (res.done) return res.value; + var rx = anObject(regexp); + var S = String(this); + if (!rx.global) return regExpExec(rx, S); + var fullUnicode = rx.unicode; + rx.lastIndex = 0; + var A = []; + var n = 0; + var result; + while ((result = regExpExec(rx, S)) !== null) { + var matchStr = String(result[0]); + A[n] = matchStr; + if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode); + n++; + } + return n === 0 ? null : A; + }, + ]; + }); + + /***/ + }, + /* 378 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var anObject = __webpack_require__(2); + var toObject = __webpack_require__(11); + var toLength = __webpack_require__(7); + var toInteger = __webpack_require__(26); + var advanceStringIndex = __webpack_require__(135); + var regExpExec = __webpack_require__(93); + var max = Math.max; + var min = Math.min; + var floor = Math.floor; + var SUBSTITUTION_SYMBOLS = /\$([$&`']|\d\d?|<[^>]*>)/g; + var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&`']|\d\d?)/g; + + var maybeToString = function (it) { + return it === undefined ? it : String(it); + }; + + // @@replace logic + __webpack_require__(94)('replace', 2, function (defined, REPLACE, $replace, maybeCallNative) { + return [ + // `String.prototype.replace` method + // https://tc39.github.io/ecma262/#sec-string.prototype.replace + function replace(searchValue, replaceValue) { + var O = defined(this); + var fn = searchValue == undefined ? undefined : searchValue[REPLACE]; + return fn !== undefined + ? fn.call(searchValue, O, replaceValue) + : $replace.call(String(O), searchValue, replaceValue); + }, + // `RegExp.prototype[@@replace]` method + // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@replace + function (regexp, replaceValue) { + var res = maybeCallNative($replace, regexp, this, replaceValue); + if (res.done) return res.value; + + var rx = anObject(regexp); + var S = String(this); + var functionalReplace = typeof replaceValue === 'function'; + if (!functionalReplace) replaceValue = String(replaceValue); + var global = rx.global; + if (global) { + var fullUnicode = rx.unicode; + rx.lastIndex = 0; + } + var results = []; + while (true) { + var result = regExpExec(rx, S); + if (result === null) break; + results.push(result); + if (!global) break; + var matchStr = String(result[0]); + if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode); + } + var accumulatedResult = ''; + var nextSourcePosition = 0; + for (var i = 0; i < results.length; i++) { + result = results[i]; + var matched = String(result[0]); + var position = max(min(toInteger(result.index), S.length), 0); + var captures = []; + // NOTE: This is equivalent to + // captures = result.slice(1).map(maybeToString) + // but for some reason `nativeSlice.call(result, 1, result.length)` (called in + // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and + // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it. + for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j])); + var namedCaptures = result.groups; + if (functionalReplace) { + var replacerArgs = [matched].concat(captures, position, S); + if (namedCaptures !== undefined) replacerArgs.push(namedCaptures); + var replacement = String(replaceValue.apply(undefined, replacerArgs)); + } else { + replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue); + } + if (position >= nextSourcePosition) { + accumulatedResult += S.slice(nextSourcePosition, position) + replacement; + nextSourcePosition = position + matched.length; + } + } + return accumulatedResult + S.slice(nextSourcePosition); + }, + ]; + + // https://tc39.github.io/ecma262/#sec-getsubstitution + function getSubstitution(matched, str, position, captures, namedCaptures, replacement) { + var tailPos = position + matched.length; + var m = captures.length; + var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED; + if (namedCaptures !== undefined) { + namedCaptures = toObject(namedCaptures); + symbols = SUBSTITUTION_SYMBOLS; + } + return $replace.call(replacement, symbols, function (match, ch) { + var capture; + switch (ch.charAt(0)) { + case '$': + return '$'; + case '&': + return matched; + case '`': + return str.slice(0, position); + case "'": + return str.slice(tailPos); + case '<': + capture = namedCaptures[ch.slice(1, -1)]; + break; + default: // \d\d? + var n = +ch; + if (n === 0) return match; + if (n > m) { + var f = floor(n / 10); + if (f === 0) return match; + if (f <= m) + return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1); + return match; + } + capture = captures[n - 1]; + } + return capture === undefined ? '' : capture; + }); + } + }); + + /***/ + }, + /* 379 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var anObject = __webpack_require__(2); + var sameValue = __webpack_require__(181); + var regExpExec = __webpack_require__(93); + + // @@search logic + __webpack_require__(94)('search', 1, function (defined, SEARCH, $search, maybeCallNative) { + return [ + // `String.prototype.search` method + // https://tc39.github.io/ecma262/#sec-string.prototype.search + function search(regexp) { + var O = defined(this); + var fn = regexp == undefined ? undefined : regexp[SEARCH]; + return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O)); + }, + // `RegExp.prototype[@@search]` method + // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@search + function (regexp) { + var res = maybeCallNative($search, regexp, this); + if (res.done) return res.value; + var rx = anObject(regexp); + var S = String(this); + var previousLastIndex = rx.lastIndex; + if (!sameValue(previousLastIndex, 0)) rx.lastIndex = 0; + var result = regExpExec(rx, S); + if (!sameValue(rx.lastIndex, previousLastIndex)) rx.lastIndex = previousLastIndex; + return result === null ? -1 : result.index; + }, + ]; + }); + + /***/ + }, + /* 380 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var isRegExp = __webpack_require__(91); + var anObject = __webpack_require__(2); + var speciesConstructor = __webpack_require__(78); + var advanceStringIndex = __webpack_require__(135); + var toLength = __webpack_require__(7); + var callRegExpExec = __webpack_require__(93); + var regexpExec = __webpack_require__(134); + var fails = __webpack_require__(4); + var $min = Math.min; + var $push = [].push; + var $SPLIT = 'split'; + var LENGTH = 'length'; + var LAST_INDEX = 'lastIndex'; + var MAX_UINT32 = 0xffffffff; + + // babel-minify transpiles RegExp('x', 'y') -> /x/y and it causes SyntaxError + var SUPPORTS_Y = !fails(function () { + RegExp(MAX_UINT32, 'y'); + }); + + // @@split logic + __webpack_require__(94)('split', 2, function (defined, SPLIT, $split, maybeCallNative) { + var internalSplit; + if ( + 'abbc'[$SPLIT](/(b)*/)[1] == 'c' || + 'test'[$SPLIT](/(?:)/, -1)[LENGTH] != 4 || + 'ab'[$SPLIT](/(?:ab)*/)[LENGTH] != 2 || + '.'[$SPLIT](/(.?)(.?)/)[LENGTH] != 4 || + '.'[$SPLIT](/()()/)[LENGTH] > 1 || + ''[$SPLIT](/.?/)[LENGTH] + ) { + // based on es5-shim implementation, need to rework it + internalSplit = function (separator, limit) { + var string = String(this); + if (separator === undefined && limit === 0) return []; + // If `separator` is not a regex, use native split + if (!isRegExp(separator)) return $split.call(string, separator, limit); + var output = []; + var flags = + (separator.ignoreCase ? 'i' : '') + + (separator.multiline ? 'm' : '') + + (separator.unicode ? 'u' : '') + + (separator.sticky ? 'y' : ''); + var lastLastIndex = 0; + var splitLimit = limit === undefined ? MAX_UINT32 : limit >>> 0; + // Make `global` and avoid `lastIndex` issues by working with a copy + var separatorCopy = new RegExp(separator.source, flags + 'g'); + var match, lastIndex, lastLength; + while ((match = regexpExec.call(separatorCopy, string))) { + lastIndex = separatorCopy[LAST_INDEX]; + if (lastIndex > lastLastIndex) { + output.push(string.slice(lastLastIndex, match.index)); + if (match[LENGTH] > 1 && match.index < string[LENGTH]) $push.apply(output, match.slice(1)); + lastLength = match[0][LENGTH]; + lastLastIndex = lastIndex; + if (output[LENGTH] >= splitLimit) break; + } + if (separatorCopy[LAST_INDEX] === match.index) separatorCopy[LAST_INDEX]++; // Avoid an infinite loop + } + if (lastLastIndex === string[LENGTH]) { + if (lastLength || !separatorCopy.test('')) output.push(''); + } else output.push(string.slice(lastLastIndex)); + return output[LENGTH] > splitLimit ? output.slice(0, splitLimit) : output; + }; + // Chakra, V8 + } else if ('0'[$SPLIT](undefined, 0)[LENGTH]) { + internalSplit = function (separator, limit) { + return separator === undefined && limit === 0 ? [] : $split.call(this, separator, limit); + }; + } else { + internalSplit = $split; + } + + return [ + // `String.prototype.split` method + // https://tc39.github.io/ecma262/#sec-string.prototype.split + function split(separator, limit) { + var O = defined(this); + var splitter = separator == undefined ? undefined : separator[SPLIT]; + return splitter !== undefined + ? splitter.call(separator, O, limit) + : internalSplit.call(String(O), separator, limit); + }, + // `RegExp.prototype[@@split]` method + // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@split + // + // NOTE: This cannot be properly polyfilled in engines that don't support + // the 'y' flag. + function (regexp, limit) { + var res = maybeCallNative(internalSplit, regexp, this, limit, internalSplit !== $split); + if (res.done) return res.value; + + var rx = anObject(regexp); + var S = String(this); + var C = speciesConstructor(rx, RegExp); + + var unicodeMatching = rx.unicode; + var flags = + (rx.ignoreCase ? 'i' : '') + + (rx.multiline ? 'm' : '') + + (rx.unicode ? 'u' : '') + + (SUPPORTS_Y ? 'y' : 'g'); + + // ^(? + rx + ) is needed, in combination with some S slicing, to + // simulate the 'y' flag. + var splitter = new C(SUPPORTS_Y ? rx : '^(?:' + rx.source + ')', flags); + var lim = limit === undefined ? MAX_UINT32 : limit >>> 0; + if (lim === 0) return []; + if (S.length === 0) return callRegExpExec(splitter, S) === null ? [S] : []; + var p = 0; + var q = 0; + var A = []; + while (q < S.length) { + splitter.lastIndex = SUPPORTS_Y ? q : 0; + var z = callRegExpExec(splitter, SUPPORTS_Y ? S : S.slice(q)); + var e; + if ( + z === null || + (e = $min(toLength(splitter.lastIndex + (SUPPORTS_Y ? 0 : q)), S.length)) === p + ) { + q = advanceStringIndex(S, q, unicodeMatching); + } else { + A.push(S.slice(p, q)); + if (A.length === lim) return A; + for (var i = 1; i <= z.length - 1; i++) { + A.push(z[i]); + if (A.length === lim) return A; + } + q = p = e; + } + } + A.push(S.slice(p)); + return A; + }, + ]; + }); + + /***/ + }, + /* 381 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var LIBRARY = __webpack_require__(42); + var global = __webpack_require__(3); + var ctx = __webpack_require__(24); + var classof = __webpack_require__(66); + var $export = __webpack_require__(0); + var isObject = __webpack_require__(5); + var aFunction = __webpack_require__(12); + var anInstance = __webpack_require__(57); + var forOf = __webpack_require__(58); + var speciesConstructor = __webpack_require__(78); + var task = __webpack_require__(136).set; + var microtask = __webpack_require__(137)(); + var newPromiseCapabilityModule = __webpack_require__(138); + var perform = __webpack_require__(196); + var userAgent = __webpack_require__(95); + var promiseResolve = __webpack_require__(197); + var PROMISE = 'Promise'; + var TypeError = global.TypeError; + var process = global.process; + var versions = process && process.versions; + var v8 = (versions && versions.v8) || ''; + var $Promise = global[PROMISE]; + var isNode = classof(process) == 'process'; + var empty = function () { + /* empty */ + }; + var Internal, newGenericPromiseCapability, OwnPromiseCapability, Wrapper; + var newPromiseCapability = (newGenericPromiseCapability = newPromiseCapabilityModule.f); + + var USE_NATIVE = !!(function () { + try { + // correct subclassing with @@species support + var promise = $Promise.resolve(1); + var FakePromise = ((promise.constructor = {})[__webpack_require__(6)('species')] = function (exec) { + exec(empty, empty); + }); + // unhandled rejections tracking support, NodeJS Promise without it fails @@species test + return ( + (isNode || typeof PromiseRejectionEvent == 'function') && + promise.then(empty) instanceof FakePromise && + // v8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables + // https://bugs.chromium.org/p/chromium/issues/detail?id=830565 + // we can't detect it synchronously, so just check versions + v8.indexOf('6.6') !== 0 && + userAgent.indexOf('Chrome/66') === -1 + ); + } catch (e) { + /* empty */ + } + })(); + + // helpers + var isThenable = function (it) { + var then; + return isObject(it) && typeof (then = it.then) == 'function' ? then : false; + }; + var notify = function (promise, isReject) { + if (promise._n) return; + promise._n = true; + var chain = promise._c; + microtask(function () { + var value = promise._v; + var ok = promise._s == 1; + var i = 0; + var run = function (reaction) { + var handler = ok ? reaction.ok : reaction.fail; + var resolve = reaction.resolve; + var reject = reaction.reject; + var domain = reaction.domain; + var result, then, exited; + try { + if (handler) { + if (!ok) { + if (promise._h == 2) onHandleUnhandled(promise); + promise._h = 1; + } + if (handler === true) result = value; + else { + if (domain) domain.enter(); + result = handler(value); // may throw + if (domain) { + domain.exit(); + exited = true; + } + } + if (result === reaction.promise) { + reject(TypeError('Promise-chain cycle')); + } else if ((then = isThenable(result))) { + then.call(result, resolve, reject); + } else resolve(result); + } else reject(value); + } catch (e) { + if (domain && !exited) domain.exit(); + reject(e); + } + }; + while (chain.length > i) run(chain[i++]); // variable length - can't use forEach + promise._c = []; + promise._n = false; + if (isReject && !promise._h) onUnhandled(promise); + }); + }; + var onUnhandled = function (promise) { + task.call(global, function () { + var value = promise._v; + var unhandled = isUnhandled(promise); + var result, handler, console; + if (unhandled) { + result = perform(function () { + if (isNode) { + process.emit('unhandledRejection', value, promise); + } else if ((handler = global.onunhandledrejection)) { + handler({ promise: promise, reason: value }); + } else if ((console = global.console) && console.error) { + console.error('Unhandled promise rejection', value); + } + }); + // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should + promise._h = isNode || isUnhandled(promise) ? 2 : 1; + } + promise._a = undefined; + if (unhandled && result.e) throw result.v; + }); + }; + var isUnhandled = function (promise) { + return promise._h !== 1 && (promise._a || promise._c).length === 0; + }; + var onHandleUnhandled = function (promise) { + task.call(global, function () { + var handler; + if (isNode) { + process.emit('rejectionHandled', promise); + } else if ((handler = global.onrejectionhandled)) { + handler({ promise: promise, reason: promise._v }); + } + }); + }; + var $reject = function (value) { + var promise = this; + if (promise._d) return; + promise._d = true; + promise = promise._w || promise; // unwrap + promise._v = value; + promise._s = 2; + if (!promise._a) promise._a = promise._c.slice(); + notify(promise, true); + }; + var $resolve = function (value) { + var promise = this; + var then; + if (promise._d) return; + promise._d = true; + promise = promise._w || promise; // unwrap + try { + if (promise === value) throw TypeError("Promise can't be resolved itself"); + if ((then = isThenable(value))) { + microtask(function () { + var wrapper = { _w: promise, _d: false }; // wrap + try { + then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1)); + } catch (e) { + $reject.call(wrapper, e); + } + }); + } else { + promise._v = value; + promise._s = 1; + notify(promise, false); + } + } catch (e) { + $reject.call({ _w: promise, _d: false }, e); // wrap + } + }; + + // constructor polyfill + if (!USE_NATIVE) { + // 25.4.3.1 Promise(executor) + $Promise = function Promise(executor) { + anInstance(this, $Promise, PROMISE, '_h'); + aFunction(executor); + Internal.call(this); + try { + executor(ctx($resolve, this, 1), ctx($reject, this, 1)); + } catch (err) { + $reject.call(this, err); + } + }; + // eslint-disable-next-line no-unused-vars + Internal = function Promise(executor) { + this._c = []; // <- awaiting reactions + this._a = undefined; // <- checked in isUnhandled reactions + this._s = 0; // <- state + this._d = false; // <- done + this._v = undefined; // <- value + this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled + this._n = false; // <- notify + }; + Internal.prototype = __webpack_require__(59)($Promise.prototype, { + // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected) + then: function then(onFulfilled, onRejected) { + var reaction = newPromiseCapability(speciesConstructor(this, $Promise)); + reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true; + reaction.fail = typeof onRejected == 'function' && onRejected; + reaction.domain = isNode ? process.domain : undefined; + this._c.push(reaction); + if (this._a) this._a.push(reaction); + if (this._s) notify(this, false); + return reaction.promise; + }, + // 25.4.5.1 Promise.prototype.catch(onRejected) + catch: function (onRejected) { + return this.then(undefined, onRejected); + }, + }); + OwnPromiseCapability = function () { + var promise = new Internal(); + this.promise = promise; + this.resolve = ctx($resolve, promise, 1); + this.reject = ctx($reject, promise, 1); + }; + newPromiseCapabilityModule.f = newPromiseCapability = function (C) { + return C === $Promise || C === Wrapper + ? new OwnPromiseCapability(C) + : newGenericPromiseCapability(C); + }; + } + + $export($export.G + $export.W + $export.F * !USE_NATIVE, { Promise: $Promise }); + __webpack_require__(65)($Promise, PROMISE); + __webpack_require__(56)(PROMISE); + Wrapper = __webpack_require__(23)[PROMISE]; + + // statics + $export($export.S + $export.F * !USE_NATIVE, PROMISE, { + // 25.4.4.5 Promise.reject(r) + reject: function reject(r) { + var capability = newPromiseCapability(this); + var $$reject = capability.reject; + $$reject(r); + return capability.promise; + }, + }); + $export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, { + // 25.4.4.6 Promise.resolve(x) + resolve: function resolve(x) { + return promiseResolve(LIBRARY && this === Wrapper ? $Promise : this, x); + }, + }); + $export( + $export.S + + $export.F * + !( + USE_NATIVE && + __webpack_require__(92)(function (iter) { + $Promise.all(iter)['catch'](empty); + }) + ), + PROMISE, + { + // 25.4.4.1 Promise.all(iterable) + all: function all(iterable) { + var C = this; + var capability = newPromiseCapability(C); + var resolve = capability.resolve; + var reject = capability.reject; + var result = perform(function () { + var values = []; + var index = 0; + var remaining = 1; + forOf(iterable, false, function (promise) { + var $index = index++; + var alreadyCalled = false; + values.push(undefined); + remaining++; + C.resolve(promise).then(function (value) { + if (alreadyCalled) return; + alreadyCalled = true; + values[$index] = value; + --remaining || resolve(values); + }, reject); + }); + --remaining || resolve(values); + }); + if (result.e) reject(result.v); + return capability.promise; + }, + // 25.4.4.4 Promise.race(iterable) + race: function race(iterable) { + var C = this; + var capability = newPromiseCapability(C); + var reject = capability.reject; + var result = perform(function () { + forOf(iterable, false, function (promise) { + C.resolve(promise).then(capability.resolve, reject); + }); + }); + if (result.e) reject(result.v); + return capability.promise; + }, + }, + ); + + /***/ + }, + /* 382 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var weak = __webpack_require__(202); + var validate = __webpack_require__(60); + var WEAK_SET = 'WeakSet'; + + // 23.4 WeakSet Objects + __webpack_require__(96)( + WEAK_SET, + function (get) { + return function WeakSet() { + return get(this, arguments.length > 0 ? arguments[0] : undefined); + }; + }, + { + // 23.4.3.1 WeakSet.prototype.add(value) + add: function add(value) { + return weak.def(validate(this, WEAK_SET), value, true); + }, + }, + weak, + false, + true, + ); + + /***/ + }, + /* 383 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0); + var $typed = __webpack_require__(97); + var buffer = __webpack_require__(139); + var anObject = __webpack_require__(2); + var toAbsoluteIndex = __webpack_require__(53); + var toLength = __webpack_require__(7); + var isObject = __webpack_require__(5); + var ArrayBuffer = __webpack_require__(3).ArrayBuffer; + var speciesConstructor = __webpack_require__(78); + var $ArrayBuffer = buffer.ArrayBuffer; + var $DataView = buffer.DataView; + var $isView = $typed.ABV && ArrayBuffer.isView; + var $slice = $ArrayBuffer.prototype.slice; + var VIEW = $typed.VIEW; + var ARRAY_BUFFER = 'ArrayBuffer'; + + $export($export.G + $export.W + $export.F * (ArrayBuffer !== $ArrayBuffer), { + ArrayBuffer: $ArrayBuffer, + }); + + $export($export.S + $export.F * !$typed.CONSTR, ARRAY_BUFFER, { + // 24.1.3.1 ArrayBuffer.isView(arg) + isView: function isView(it) { + return ($isView && $isView(it)) || (isObject(it) && VIEW in it); + }, + }); + + $export( + $export.P + + $export.U + + $export.F * + __webpack_require__(4)(function () { + return !new $ArrayBuffer(2).slice(1, undefined).byteLength; + }), + ARRAY_BUFFER, + { + // 24.1.4.3 ArrayBuffer.prototype.slice(start, end) + slice: function slice(start, end) { + if ($slice !== undefined && end === undefined) return $slice.call(anObject(this), start); // FF fix + var len = anObject(this).byteLength; + var first = toAbsoluteIndex(start, len); + var fin = toAbsoluteIndex(end === undefined ? len : end, len); + var result = new (speciesConstructor(this, $ArrayBuffer))(toLength(fin - first)); + var viewS = new $DataView(this); + var viewT = new $DataView(result); + var index = 0; + while (first < fin) { + viewT.setUint8(index++, viewS.getUint8(first++)); + } + return result; + }, + }, + ); + + __webpack_require__(56)(ARRAY_BUFFER); + + /***/ + }, + /* 384 */ + /***/ function (module, exports, __webpack_require__) { + var $export = __webpack_require__(0); + $export($export.G + $export.W + $export.F * !__webpack_require__(97).ABV, { + DataView: __webpack_require__(139).DataView, + }); + + /***/ + }, + /* 385 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(39)('Int8', 1, function (init) { + return function Int8Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; + }); + + /***/ + }, + /* 386 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(39)('Uint8', 1, function (init) { + return function Uint8Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; + }); + + /***/ + }, + /* 387 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(39)( + 'Uint8', + 1, + function (init) { + return function Uint8ClampedArray(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; + }, + true, + ); + + /***/ + }, + /* 388 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(39)('Int16', 2, function (init) { + return function Int16Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; + }); + + /***/ + }, + /* 389 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(39)('Uint16', 2, function (init) { + return function Uint16Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; + }); + + /***/ + }, + /* 390 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(39)('Int32', 4, function (init) { + return function Int32Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; + }); + + /***/ + }, + /* 391 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(39)('Uint32', 4, function (init) { + return function Uint32Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; + }); + + /***/ + }, + /* 392 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(39)('Float32', 4, function (init) { + return function Float32Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; + }); + + /***/ + }, + /* 393 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(39)('Float64', 8, function (init) { + return function Float64Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; + }); + + /***/ + }, + /* 394 */ + /***/ function (module, exports, __webpack_require__) { + // 26.1.1 Reflect.apply(target, thisArgument, argumentsList) + var $export = __webpack_require__(0); + var aFunction = __webpack_require__(12); + var anObject = __webpack_require__(2); + var rApply = (__webpack_require__(3).Reflect || {}).apply; + var fApply = Function.apply; + // MS Edge argumentsList argument is optional + $export( + $export.S + + $export.F * + !__webpack_require__(4)(function () { + rApply(function () { + /* empty */ + }); + }), + 'Reflect', + { + apply: function apply(target, thisArgument, argumentsList) { + var T = aFunction(target); + var L = anObject(argumentsList); + return rApply ? rApply(T, thisArgument, L) : fApply.call(T, thisArgument, L); + }, + }, + ); + + /***/ + }, + /* 395 */ + /***/ function (module, exports, __webpack_require__) { + // 26.1.2 Reflect.construct(target, argumentsList [, newTarget]) + var $export = __webpack_require__(0); + var create = __webpack_require__(54); + var aFunction = __webpack_require__(12); + var anObject = __webpack_require__(2); + var isObject = __webpack_require__(5); + var fails = __webpack_require__(4); + var bind = __webpack_require__(182); + var rConstruct = (__webpack_require__(3).Reflect || {}).construct; + + // MS Edge supports only 2 arguments and argumentsList argument is optional + // FF Nightly sets third argument as `new.target`, but does not create `this` from it + var NEW_TARGET_BUG = fails(function () { + function F() { + /* empty */ + } + return !( + rConstruct( + function () { + /* empty */ + }, + [], + F, + ) instanceof F + ); + }); + var ARGS_BUG = !fails(function () { + rConstruct(function () { + /* empty */ + }); + }); + + $export($export.S + $export.F * (NEW_TARGET_BUG || ARGS_BUG), 'Reflect', { + construct: function construct(Target, args /* , newTarget */) { + aFunction(Target); + anObject(args); + var newTarget = arguments.length < 3 ? Target : aFunction(arguments[2]); + if (ARGS_BUG && !NEW_TARGET_BUG) return rConstruct(Target, args, newTarget); + if (Target == newTarget) { + // w/o altered newTarget, optimization for 0-4 arguments + switch (args.length) { + case 0: + return new Target(); + case 1: + return new Target(args[0]); + case 2: + return new Target(args[0], args[1]); + case 3: + return new Target(args[0], args[1], args[2]); + case 4: + return new Target(args[0], args[1], args[2], args[3]); + } + // w/o altered newTarget, lot of arguments case + var $args = [null]; + $args.push.apply($args, args); + return new (bind.apply(Target, $args))(); + } + // with altered newTarget, not support built-in constructors + var proto = newTarget.prototype; + var instance = create(isObject(proto) ? proto : Object.prototype); + var result = Function.apply.call(Target, instance, args); + return isObject(result) ? result : instance; + }, + }); + + /***/ + }, + /* 396 */ + /***/ function (module, exports, __webpack_require__) { + // 26.1.3 Reflect.defineProperty(target, propertyKey, attributes) + var dP = __webpack_require__(9); + var $export = __webpack_require__(0); + var anObject = __webpack_require__(2); + var toPrimitive = __webpack_require__(31); + + // MS Edge has broken Reflect.defineProperty - throwing instead of returning false + $export( + $export.S + + $export.F * + __webpack_require__(4)(function () { + // eslint-disable-next-line no-undef + Reflect.defineProperty(dP.f({}, 1, { value: 1 }), 1, { value: 2 }); + }), + 'Reflect', + { + defineProperty: function defineProperty(target, propertyKey, attributes) { + anObject(target); + propertyKey = toPrimitive(propertyKey, true); + anObject(attributes); + try { + dP.f(target, propertyKey, attributes); + return true; + } catch (e) { + return false; + } + }, + }, + ); + + /***/ + }, + /* 397 */ + /***/ function (module, exports, __webpack_require__) { + // 26.1.4 Reflect.deleteProperty(target, propertyKey) + var $export = __webpack_require__(0); + var gOPD = __webpack_require__(20).f; + var anObject = __webpack_require__(2); + + $export($export.S, 'Reflect', { + deleteProperty: function deleteProperty(target, propertyKey) { + var desc = gOPD(anObject(target), propertyKey); + return desc && !desc.configurable ? false : delete target[propertyKey]; + }, + }); + + /***/ + }, + /* 398 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // 26.1.5 Reflect.enumerate(target) + var $export = __webpack_require__(0); + var anObject = __webpack_require__(2); + var Enumerate = function (iterated) { + this._t = anObject(iterated); // target + this._i = 0; // next index + var keys = (this._k = []); // keys + var key; + for (key in iterated) keys.push(key); + }; + __webpack_require__(125)(Enumerate, 'Object', function () { + var that = this; + var keys = that._k; + var key; + do { + if (that._i >= keys.length) return { value: undefined, done: true }; + } while (!((key = keys[that._i++]) in that._t)); + return { value: key, done: false }; + }); + + $export($export.S, 'Reflect', { + enumerate: function enumerate(target) { + return new Enumerate(target); + }, + }); + + /***/ + }, + /* 399 */ + /***/ function (module, exports, __webpack_require__) { + // 26.1.6 Reflect.get(target, propertyKey [, receiver]) + var gOPD = __webpack_require__(20); + var getPrototypeOf = __webpack_require__(21); + var has = __webpack_require__(18); + var $export = __webpack_require__(0); + var isObject = __webpack_require__(5); + var anObject = __webpack_require__(2); + + function get(target, propertyKey /* , receiver */) { + var receiver = arguments.length < 3 ? target : arguments[2]; + var desc, proto; + if (anObject(target) === receiver) return target[propertyKey]; + if ((desc = gOPD.f(target, propertyKey))) + return has(desc, 'value') + ? desc.value + : desc.get !== undefined + ? desc.get.call(receiver) + : undefined; + if (isObject((proto = getPrototypeOf(target)))) return get(proto, propertyKey, receiver); + } + + $export($export.S, 'Reflect', { get: get }); + + /***/ + }, + /* 400 */ + /***/ function (module, exports, __webpack_require__) { + // 26.1.7 Reflect.getOwnPropertyDescriptor(target, propertyKey) + var gOPD = __webpack_require__(20); + var $export = __webpack_require__(0); + var anObject = __webpack_require__(2); + + $export($export.S, 'Reflect', { + getOwnPropertyDescriptor: function getOwnPropertyDescriptor(target, propertyKey) { + return gOPD.f(anObject(target), propertyKey); + }, + }); + + /***/ + }, + /* 401 */ + /***/ function (module, exports, __webpack_require__) { + // 26.1.8 Reflect.getPrototypeOf(target) + var $export = __webpack_require__(0); + var getProto = __webpack_require__(21); + var anObject = __webpack_require__(2); + + $export($export.S, 'Reflect', { + getPrototypeOf: function getPrototypeOf(target) { + return getProto(anObject(target)); + }, + }); + + /***/ + }, + /* 402 */ + /***/ function (module, exports, __webpack_require__) { + // 26.1.9 Reflect.has(target, propertyKey) + var $export = __webpack_require__(0); + + $export($export.S, 'Reflect', { + has: function has(target, propertyKey) { + return propertyKey in target; + }, + }); + + /***/ + }, + /* 403 */ + /***/ function (module, exports, __webpack_require__) { + // 26.1.10 Reflect.isExtensible(target) + var $export = __webpack_require__(0); + var anObject = __webpack_require__(2); + var $isExtensible = Object.isExtensible; + + $export($export.S, 'Reflect', { + isExtensible: function isExtensible(target) { + anObject(target); + return $isExtensible ? $isExtensible(target) : true; + }, + }); + + /***/ + }, + /* 404 */ + /***/ function (module, exports, __webpack_require__) { + // 26.1.11 Reflect.ownKeys(target) + var $export = __webpack_require__(0); + + $export($export.S, 'Reflect', { ownKeys: __webpack_require__(204) }); + + /***/ + }, + /* 405 */ + /***/ function (module, exports, __webpack_require__) { + // 26.1.12 Reflect.preventExtensions(target) + var $export = __webpack_require__(0); + var anObject = __webpack_require__(2); + var $preventExtensions = Object.preventExtensions; + + $export($export.S, 'Reflect', { + preventExtensions: function preventExtensions(target) { + anObject(target); + try { + if ($preventExtensions) $preventExtensions(target); + return true; + } catch (e) { + return false; + } + }, + }); + + /***/ + }, + /* 406 */ + /***/ function (module, exports, __webpack_require__) { + // 26.1.13 Reflect.set(target, propertyKey, V [, receiver]) + var dP = __webpack_require__(9); + var gOPD = __webpack_require__(20); + var getPrototypeOf = __webpack_require__(21); + var has = __webpack_require__(18); + var $export = __webpack_require__(0); + var createDesc = __webpack_require__(50); + var anObject = __webpack_require__(2); + var isObject = __webpack_require__(5); + + function set(target, propertyKey, V /* , receiver */) { + var receiver = arguments.length < 4 ? target : arguments[3]; + var ownDesc = gOPD.f(anObject(target), propertyKey); + var existingDescriptor, proto; + if (!ownDesc) { + if (isObject((proto = getPrototypeOf(target)))) { + return set(proto, propertyKey, V, receiver); + } + ownDesc = createDesc(0); + } + if (has(ownDesc, 'value')) { + if (ownDesc.writable === false || !isObject(receiver)) return false; + if ((existingDescriptor = gOPD.f(receiver, propertyKey))) { + if (existingDescriptor.get || existingDescriptor.set || existingDescriptor.writable === false) + return false; + existingDescriptor.value = V; + dP.f(receiver, propertyKey, existingDescriptor); + } else dP.f(receiver, propertyKey, createDesc(0, V)); + return true; + } + return ownDesc.set === undefined ? false : (ownDesc.set.call(receiver, V), true); + } + + $export($export.S, 'Reflect', { set: set }); + + /***/ + }, + /* 407 */ + /***/ function (module, exports, __webpack_require__) { + // 26.1.14 Reflect.setPrototypeOf(target, proto) + var $export = __webpack_require__(0); + var setProto = __webpack_require__(118); + + if (setProto) + $export($export.S, 'Reflect', { + setPrototypeOf: function setPrototypeOf(target, proto) { + setProto.check(target, proto); + try { + setProto.set(target, proto); + return true; + } catch (e) { + return false; + } + }, + }); + + /***/ + }, + /* 408 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // https://github.com/tc39/Array.prototype.includes + var $export = __webpack_require__(0); + var $includes = __webpack_require__(87)(true); + + $export($export.P, 'Array', { + includes: function includes(el /* , fromIndex = 0 */) { + return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined); + }, + }); + + __webpack_require__(44)('includes'); + + /***/ + }, + /* 409 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // https://tc39.github.io/proposal-flatMap/#sec-Array.prototype.flatMap + var $export = __webpack_require__(0); + var flattenIntoArray = __webpack_require__(205); + var toObject = __webpack_require__(11); + var toLength = __webpack_require__(7); + var aFunction = __webpack_require__(12); + var arraySpeciesCreate = __webpack_require__(131); + + $export($export.P, 'Array', { + flatMap: function flatMap(callbackfn /* , thisArg */) { + var O = toObject(this); + var sourceLen, A; + aFunction(callbackfn); + sourceLen = toLength(O.length); + A = arraySpeciesCreate(O, 0); + flattenIntoArray(A, O, O, sourceLen, 0, 1, callbackfn, arguments[1]); + return A; + }, + }); + + __webpack_require__(44)('flatMap'); + + /***/ + }, + /* 410 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // https://tc39.github.io/proposal-flatMap/#sec-Array.prototype.flatten + var $export = __webpack_require__(0); + var flattenIntoArray = __webpack_require__(205); + var toObject = __webpack_require__(11); + var toLength = __webpack_require__(7); + var toInteger = __webpack_require__(26); + var arraySpeciesCreate = __webpack_require__(131); + + $export($export.P, 'Array', { + flatten: function flatten(/* depthArg = 1 */) { + var depthArg = arguments[0]; + var O = toObject(this); + var sourceLen = toLength(O.length); + var A = arraySpeciesCreate(O, 0); + flattenIntoArray(A, O, O, sourceLen, 0, depthArg === undefined ? 1 : toInteger(depthArg)); + return A; + }, + }); + + __webpack_require__(44)('flatten'); + + /***/ + }, + /* 411 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // https://github.com/mathiasbynens/String.prototype.at + var $export = __webpack_require__(0); + var $at = __webpack_require__(90)(true); + + $export($export.P, 'String', { + at: function at(pos) { + return $at(this, pos); + }, + }); + + /***/ + }, + /* 412 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // https://github.com/tc39/proposal-string-pad-start-end + var $export = __webpack_require__(0); + var $pad = __webpack_require__(206); + var userAgent = __webpack_require__(95); + + // https://github.com/zloirock/core-js/issues/280 + var WEBKIT_BUG = /Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(userAgent); + + $export($export.P + $export.F * WEBKIT_BUG, 'String', { + padStart: function padStart(maxLength /* , fillString = ' ' */) { + return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, true); + }, + }); + + /***/ + }, + /* 413 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // https://github.com/tc39/proposal-string-pad-start-end + var $export = __webpack_require__(0); + var $pad = __webpack_require__(206); + var userAgent = __webpack_require__(95); + + // https://github.com/zloirock/core-js/issues/280 + var WEBKIT_BUG = /Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(userAgent); + + $export($export.P + $export.F * WEBKIT_BUG, 'String', { + padEnd: function padEnd(maxLength /* , fillString = ' ' */) { + return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, false); + }, + }); + + /***/ + }, + /* 414 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // https://github.com/sebmarkbage/ecmascript-string-left-right-trim + __webpack_require__(67)( + 'trimLeft', + function ($trim) { + return function trimLeft() { + return $trim(this, 1); + }; + }, + 'trimStart', + ); + + /***/ + }, + /* 415 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // https://github.com/sebmarkbage/ecmascript-string-left-right-trim + __webpack_require__(67)( + 'trimRight', + function ($trim) { + return function trimRight() { + return $trim(this, 2); + }; + }, + 'trimEnd', + ); + + /***/ + }, + /* 416 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // https://tc39.github.io/String.prototype.matchAll/ + var $export = __webpack_require__(0); + var defined = __webpack_require__(32); + var toLength = __webpack_require__(7); + var isRegExp = __webpack_require__(91); + var getFlags = __webpack_require__(77); + var RegExpProto = RegExp.prototype; + + var $RegExpStringIterator = function (regexp, string) { + this._r = regexp; + this._s = string; + }; + + __webpack_require__(125)($RegExpStringIterator, 'RegExp String', function next() { + var match = this._r.exec(this._s); + return { value: match, done: match === null }; + }); + + $export($export.P, 'String', { + matchAll: function matchAll(regexp) { + defined(this); + if (!isRegExp(regexp)) throw TypeError(regexp + ' is not a regexp!'); + var S = String(this); + var flags = 'flags' in RegExpProto ? String(regexp.flags) : getFlags.call(regexp); + var rx = new RegExp(regexp.source, ~flags.indexOf('g') ? flags : 'g' + flags); + rx.lastIndex = toLength(regexp.lastIndex); + return new $RegExpStringIterator(rx, S); + }, + }); + + /***/ + }, + /* 417 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(114)('asyncIterator'); + + /***/ + }, + /* 418 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(114)('observable'); + + /***/ + }, + /* 419 */ + /***/ function (module, exports, __webpack_require__) { + // https://github.com/tc39/proposal-object-getownpropertydescriptors + var $export = __webpack_require__(0); + var ownKeys = __webpack_require__(204); + var toIObject = __webpack_require__(19); + var gOPD = __webpack_require__(20); + var createProperty = __webpack_require__(129); + + $export($export.S, 'Object', { + getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object) { + var O = toIObject(object); + var getDesc = gOPD.f; + var keys = ownKeys(O); + var result = {}; + var i = 0; + var key, desc; + while (keys.length > i) { + desc = getDesc(O, (key = keys[i++])); + if (desc !== undefined) createProperty(result, key, desc); + } + return result; + }, + }); + + /***/ + }, + /* 420 */ + /***/ function (module, exports, __webpack_require__) { + // https://github.com/tc39/proposal-object-values-entries + var $export = __webpack_require__(0); + var $values = __webpack_require__(207)(false); + + $export($export.S, 'Object', { + values: function values(it) { + return $values(it); + }, + }); + + /***/ + }, + /* 421 */ + /***/ function (module, exports, __webpack_require__) { + // https://github.com/tc39/proposal-object-values-entries + var $export = __webpack_require__(0); + var $entries = __webpack_require__(207)(true); + + $export($export.S, 'Object', { + entries: function entries(it) { + return $entries(it); + }, + }); + + /***/ + }, + /* 422 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0); + var toObject = __webpack_require__(11); + var aFunction = __webpack_require__(12); + var $defineProperty = __webpack_require__(9); + + // B.2.2.2 Object.prototype.__defineGetter__(P, getter) + __webpack_require__(8) && + $export($export.P + __webpack_require__(98), 'Object', { + __defineGetter__: function __defineGetter__(P, getter) { + $defineProperty.f(toObject(this), P, { + get: aFunction(getter), + enumerable: true, + configurable: true, + }); + }, + }); + + /***/ + }, + /* 423 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0); + var toObject = __webpack_require__(11); + var aFunction = __webpack_require__(12); + var $defineProperty = __webpack_require__(9); + + // B.2.2.3 Object.prototype.__defineSetter__(P, setter) + __webpack_require__(8) && + $export($export.P + __webpack_require__(98), 'Object', { + __defineSetter__: function __defineSetter__(P, setter) { + $defineProperty.f(toObject(this), P, { + set: aFunction(setter), + enumerable: true, + configurable: true, + }); + }, + }); + + /***/ + }, + /* 424 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0); + var toObject = __webpack_require__(11); + var toPrimitive = __webpack_require__(31); + var getPrototypeOf = __webpack_require__(21); + var getOwnPropertyDescriptor = __webpack_require__(20).f; + + // B.2.2.4 Object.prototype.__lookupGetter__(P) + __webpack_require__(8) && + $export($export.P + __webpack_require__(98), 'Object', { + __lookupGetter__: function __lookupGetter__(P) { + var O = toObject(this); + var K = toPrimitive(P, true); + var D; + do { + if ((D = getOwnPropertyDescriptor(O, K))) return D.get; + } while ((O = getPrototypeOf(O))); + }, + }); + + /***/ + }, + /* 425 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $export = __webpack_require__(0); + var toObject = __webpack_require__(11); + var toPrimitive = __webpack_require__(31); + var getPrototypeOf = __webpack_require__(21); + var getOwnPropertyDescriptor = __webpack_require__(20).f; + + // B.2.2.5 Object.prototype.__lookupSetter__(P) + __webpack_require__(8) && + $export($export.P + __webpack_require__(98), 'Object', { + __lookupSetter__: function __lookupSetter__(P) { + var O = toObject(this); + var K = toPrimitive(P, true); + var D; + do { + if ((D = getOwnPropertyDescriptor(O, K))) return D.set; + } while ((O = getPrototypeOf(O))); + }, + }); + + /***/ + }, + /* 426 */ + /***/ function (module, exports, __webpack_require__) { + // https://github.com/DavidBruant/Map-Set.prototype.toJSON + var $export = __webpack_require__(0); + + $export($export.P + $export.R, 'Map', { toJSON: __webpack_require__(208)('Map') }); + + /***/ + }, + /* 427 */ + /***/ function (module, exports, __webpack_require__) { + // https://github.com/DavidBruant/Map-Set.prototype.toJSON + var $export = __webpack_require__(0); + + $export($export.P + $export.R, 'Set', { toJSON: __webpack_require__(208)('Set') }); + + /***/ + }, + /* 428 */ + /***/ function (module, exports, __webpack_require__) { + // https://tc39.github.io/proposal-setmap-offrom/#sec-map.of + __webpack_require__(99)('Map'); + + /***/ + }, + /* 429 */ + /***/ function (module, exports, __webpack_require__) { + // https://tc39.github.io/proposal-setmap-offrom/#sec-set.of + __webpack_require__(99)('Set'); + + /***/ + }, + /* 430 */ + /***/ function (module, exports, __webpack_require__) { + // https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.of + __webpack_require__(99)('WeakMap'); + + /***/ + }, + /* 431 */ + /***/ function (module, exports, __webpack_require__) { + // https://tc39.github.io/proposal-setmap-offrom/#sec-weakset.of + __webpack_require__(99)('WeakSet'); + + /***/ + }, + /* 432 */ + /***/ function (module, exports, __webpack_require__) { + // https://tc39.github.io/proposal-setmap-offrom/#sec-map.from + __webpack_require__(100)('Map'); + + /***/ + }, + /* 433 */ + /***/ function (module, exports, __webpack_require__) { + // https://tc39.github.io/proposal-setmap-offrom/#sec-set.from + __webpack_require__(100)('Set'); + + /***/ + }, + /* 434 */ + /***/ function (module, exports, __webpack_require__) { + // https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.from + __webpack_require__(100)('WeakMap'); + + /***/ + }, + /* 435 */ + /***/ function (module, exports, __webpack_require__) { + // https://tc39.github.io/proposal-setmap-offrom/#sec-weakset.from + __webpack_require__(100)('WeakSet'); + + /***/ + }, + /* 436 */ + /***/ function (module, exports, __webpack_require__) { + // https://github.com/tc39/proposal-global + var $export = __webpack_require__(0); + + $export($export.G, { global: __webpack_require__(3) }); + + /***/ + }, + /* 437 */ + /***/ function (module, exports, __webpack_require__) { + // https://github.com/tc39/proposal-global + var $export = __webpack_require__(0); + + $export($export.S, 'System', { global: __webpack_require__(3) }); + + /***/ + }, + /* 438 */ + /***/ function (module, exports, __webpack_require__) { + // https://github.com/ljharb/proposal-is-error + var $export = __webpack_require__(0); + var cof = __webpack_require__(25); + + $export($export.S, 'Error', { + isError: function isError(it) { + return cof(it) === 'Error'; + }, + }); + + /***/ + }, + /* 439 */ + /***/ function (module, exports, __webpack_require__) { + // https://rwaldron.github.io/proposal-math-extensions/ + var $export = __webpack_require__(0); + + $export($export.S, 'Math', { + clamp: function clamp(x, lower, upper) { + return Math.min(upper, Math.max(lower, x)); + }, + }); + + /***/ + }, + /* 440 */ + /***/ function (module, exports, __webpack_require__) { + // https://rwaldron.github.io/proposal-math-extensions/ + var $export = __webpack_require__(0); + + $export($export.S, 'Math', { DEG_PER_RAD: Math.PI / 180 }); + + /***/ + }, + /* 441 */ + /***/ function (module, exports, __webpack_require__) { + // https://rwaldron.github.io/proposal-math-extensions/ + var $export = __webpack_require__(0); + var RAD_PER_DEG = 180 / Math.PI; + + $export($export.S, 'Math', { + degrees: function degrees(radians) { + return radians * RAD_PER_DEG; + }, + }); + + /***/ + }, + /* 442 */ + /***/ function (module, exports, __webpack_require__) { + // https://rwaldron.github.io/proposal-math-extensions/ + var $export = __webpack_require__(0); + var scale = __webpack_require__(210); + var fround = __webpack_require__(189); + + $export($export.S, 'Math', { + fscale: function fscale(x, inLow, inHigh, outLow, outHigh) { + return fround(scale(x, inLow, inHigh, outLow, outHigh)); + }, + }); + + /***/ + }, + /* 443 */ + /***/ function (module, exports, __webpack_require__) { + // https://gist.github.com/BrendanEich/4294d5c212a6d2254703 + var $export = __webpack_require__(0); + + $export($export.S, 'Math', { + iaddh: function iaddh(x0, x1, y0, y1) { + var $x0 = x0 >>> 0; + var $x1 = x1 >>> 0; + var $y0 = y0 >>> 0; + return ($x1 + (y1 >>> 0) + ((($x0 & $y0) | (($x0 | $y0) & ~(($x0 + $y0) >>> 0))) >>> 31)) | 0; + }, + }); + + /***/ + }, + /* 444 */ + /***/ function (module, exports, __webpack_require__) { + // https://gist.github.com/BrendanEich/4294d5c212a6d2254703 + var $export = __webpack_require__(0); + + $export($export.S, 'Math', { + isubh: function isubh(x0, x1, y0, y1) { + var $x0 = x0 >>> 0; + var $x1 = x1 >>> 0; + var $y0 = y0 >>> 0; + return ($x1 - (y1 >>> 0) - (((~$x0 & $y0) | (~($x0 ^ $y0) & (($x0 - $y0) >>> 0))) >>> 31)) | 0; + }, + }); + + /***/ + }, + /* 445 */ + /***/ function (module, exports, __webpack_require__) { + // https://gist.github.com/BrendanEich/4294d5c212a6d2254703 + var $export = __webpack_require__(0); + + $export($export.S, 'Math', { + imulh: function imulh(u, v) { + var UINT16 = 0xffff; + var $u = +u; + var $v = +v; + var u0 = $u & UINT16; + var v0 = $v & UINT16; + var u1 = $u >> 16; + var v1 = $v >> 16; + var t = ((u1 * v0) >>> 0) + ((u0 * v0) >>> 16); + return u1 * v1 + (t >> 16) + ((((u0 * v1) >>> 0) + (t & UINT16)) >> 16); + }, + }); + + /***/ + }, + /* 446 */ + /***/ function (module, exports, __webpack_require__) { + // https://rwaldron.github.io/proposal-math-extensions/ + var $export = __webpack_require__(0); + + $export($export.S, 'Math', { RAD_PER_DEG: 180 / Math.PI }); + + /***/ + }, + /* 447 */ + /***/ function (module, exports, __webpack_require__) { + // https://rwaldron.github.io/proposal-math-extensions/ + var $export = __webpack_require__(0); + var DEG_PER_RAD = Math.PI / 180; + + $export($export.S, 'Math', { + radians: function radians(degrees) { + return degrees * DEG_PER_RAD; + }, + }); + + /***/ + }, + /* 448 */ + /***/ function (module, exports, __webpack_require__) { + // https://rwaldron.github.io/proposal-math-extensions/ + var $export = __webpack_require__(0); + + $export($export.S, 'Math', { scale: __webpack_require__(210) }); + + /***/ + }, + /* 449 */ + /***/ function (module, exports, __webpack_require__) { + // https://gist.github.com/BrendanEich/4294d5c212a6d2254703 + var $export = __webpack_require__(0); + + $export($export.S, 'Math', { + umulh: function umulh(u, v) { + var UINT16 = 0xffff; + var $u = +u; + var $v = +v; + var u0 = $u & UINT16; + var v0 = $v & UINT16; + var u1 = $u >>> 16; + var v1 = $v >>> 16; + var t = ((u1 * v0) >>> 0) + ((u0 * v0) >>> 16); + return u1 * v1 + (t >>> 16) + ((((u0 * v1) >>> 0) + (t & UINT16)) >>> 16); + }, + }); + + /***/ + }, + /* 450 */ + /***/ function (module, exports, __webpack_require__) { + // http://jfbastien.github.io/papers/Math.signbit.html + var $export = __webpack_require__(0); + + $export($export.S, 'Math', { + signbit: function signbit(x) { + // eslint-disable-next-line no-self-compare + return (x = +x) != x ? x : x == 0 ? 1 / x == Infinity : x > 0; + }, + }); + + /***/ + }, + /* 451 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + // https://github.com/tc39/proposal-promise-finally + + var $export = __webpack_require__(0); + var core = __webpack_require__(23); + var global = __webpack_require__(3); + var speciesConstructor = __webpack_require__(78); + var promiseResolve = __webpack_require__(197); + + $export($export.P + $export.R, 'Promise', { + finally: function (onFinally) { + var C = speciesConstructor(this, core.Promise || global.Promise); + var isFunction = typeof onFinally == 'function'; + return this.then( + isFunction + ? function (x) { + return promiseResolve(C, onFinally()).then(function () { + return x; + }); + } + : onFinally, + isFunction + ? function (e) { + return promiseResolve(C, onFinally()).then(function () { + throw e; + }); + } + : onFinally, + ); + }, + }); + + /***/ + }, + /* 452 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // https://github.com/tc39/proposal-promise-try + var $export = __webpack_require__(0); + var newPromiseCapability = __webpack_require__(138); + var perform = __webpack_require__(196); + + $export($export.S, 'Promise', { + try: function (callbackfn) { + var promiseCapability = newPromiseCapability.f(this); + var result = perform(callbackfn); + (result.e ? promiseCapability.reject : promiseCapability.resolve)(result.v); + return promiseCapability.promise; + }, + }); + + /***/ + }, + /* 453 */ + /***/ function (module, exports, __webpack_require__) { + var metadata = __webpack_require__(40); + var anObject = __webpack_require__(2); + var toMetaKey = metadata.key; + var ordinaryDefineOwnMetadata = metadata.set; + + metadata.exp({ + defineMetadata: function defineMetadata(metadataKey, metadataValue, target, targetKey) { + ordinaryDefineOwnMetadata(metadataKey, metadataValue, anObject(target), toMetaKey(targetKey)); + }, + }); + + /***/ + }, + /* 454 */ + /***/ function (module, exports, __webpack_require__) { + var metadata = __webpack_require__(40); + var anObject = __webpack_require__(2); + var toMetaKey = metadata.key; + var getOrCreateMetadataMap = metadata.map; + var store = metadata.store; + + metadata.exp({ + deleteMetadata: function deleteMetadata(metadataKey, target /* , targetKey */) { + var targetKey = arguments.length < 3 ? undefined : toMetaKey(arguments[2]); + var metadataMap = getOrCreateMetadataMap(anObject(target), targetKey, false); + if (metadataMap === undefined || !metadataMap['delete'](metadataKey)) return false; + if (metadataMap.size) return true; + var targetMetadata = store.get(target); + targetMetadata['delete'](targetKey); + return !!targetMetadata.size || store['delete'](target); + }, + }); + + /***/ + }, + /* 455 */ + /***/ function (module, exports, __webpack_require__) { + var metadata = __webpack_require__(40); + var anObject = __webpack_require__(2); + var getPrototypeOf = __webpack_require__(21); + var ordinaryHasOwnMetadata = metadata.has; + var ordinaryGetOwnMetadata = metadata.get; + var toMetaKey = metadata.key; + + var ordinaryGetMetadata = function (MetadataKey, O, P) { + var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P); + if (hasOwn) return ordinaryGetOwnMetadata(MetadataKey, O, P); + var parent = getPrototypeOf(O); + return parent !== null ? ordinaryGetMetadata(MetadataKey, parent, P) : undefined; + }; + + metadata.exp({ + getMetadata: function getMetadata(metadataKey, target /* , targetKey */) { + return ordinaryGetMetadata( + metadataKey, + anObject(target), + arguments.length < 3 ? undefined : toMetaKey(arguments[2]), + ); + }, + }); + + /***/ + }, + /* 456 */ + /***/ function (module, exports, __webpack_require__) { + var Set = __webpack_require__(200); + var from = __webpack_require__(209); + var metadata = __webpack_require__(40); + var anObject = __webpack_require__(2); + var getPrototypeOf = __webpack_require__(21); + var ordinaryOwnMetadataKeys = metadata.keys; + var toMetaKey = metadata.key; + + var ordinaryMetadataKeys = function (O, P) { + var oKeys = ordinaryOwnMetadataKeys(O, P); + var parent = getPrototypeOf(O); + if (parent === null) return oKeys; + var pKeys = ordinaryMetadataKeys(parent, P); + return pKeys.length ? (oKeys.length ? from(new Set(oKeys.concat(pKeys))) : pKeys) : oKeys; + }; + + metadata.exp({ + getMetadataKeys: function getMetadataKeys(target /* , targetKey */) { + return ordinaryMetadataKeys( + anObject(target), + arguments.length < 2 ? undefined : toMetaKey(arguments[1]), + ); + }, + }); + + /***/ + }, + /* 457 */ + /***/ function (module, exports, __webpack_require__) { + var metadata = __webpack_require__(40); + var anObject = __webpack_require__(2); + var ordinaryGetOwnMetadata = metadata.get; + var toMetaKey = metadata.key; + + metadata.exp({ + getOwnMetadata: function getOwnMetadata(metadataKey, target /* , targetKey */) { + return ordinaryGetOwnMetadata( + metadataKey, + anObject(target), + arguments.length < 3 ? undefined : toMetaKey(arguments[2]), + ); + }, + }); + + /***/ + }, + /* 458 */ + /***/ function (module, exports, __webpack_require__) { + var metadata = __webpack_require__(40); + var anObject = __webpack_require__(2); + var ordinaryOwnMetadataKeys = metadata.keys; + var toMetaKey = metadata.key; + + metadata.exp({ + getOwnMetadataKeys: function getOwnMetadataKeys(target /* , targetKey */) { + return ordinaryOwnMetadataKeys( + anObject(target), + arguments.length < 2 ? undefined : toMetaKey(arguments[1]), + ); + }, + }); + + /***/ + }, + /* 459 */ + /***/ function (module, exports, __webpack_require__) { + var metadata = __webpack_require__(40); + var anObject = __webpack_require__(2); + var getPrototypeOf = __webpack_require__(21); + var ordinaryHasOwnMetadata = metadata.has; + var toMetaKey = metadata.key; + + var ordinaryHasMetadata = function (MetadataKey, O, P) { + var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P); + if (hasOwn) return true; + var parent = getPrototypeOf(O); + return parent !== null ? ordinaryHasMetadata(MetadataKey, parent, P) : false; + }; + + metadata.exp({ + hasMetadata: function hasMetadata(metadataKey, target /* , targetKey */) { + return ordinaryHasMetadata( + metadataKey, + anObject(target), + arguments.length < 3 ? undefined : toMetaKey(arguments[2]), + ); + }, + }); + + /***/ + }, + /* 460 */ + /***/ function (module, exports, __webpack_require__) { + var metadata = __webpack_require__(40); + var anObject = __webpack_require__(2); + var ordinaryHasOwnMetadata = metadata.has; + var toMetaKey = metadata.key; + + metadata.exp({ + hasOwnMetadata: function hasOwnMetadata(metadataKey, target /* , targetKey */) { + return ordinaryHasOwnMetadata( + metadataKey, + anObject(target), + arguments.length < 3 ? undefined : toMetaKey(arguments[2]), + ); + }, + }); + + /***/ + }, + /* 461 */ + /***/ function (module, exports, __webpack_require__) { + var $metadata = __webpack_require__(40); + var anObject = __webpack_require__(2); + var aFunction = __webpack_require__(12); + var toMetaKey = $metadata.key; + var ordinaryDefineOwnMetadata = $metadata.set; + + $metadata.exp({ + metadata: function metadata(metadataKey, metadataValue) { + return function decorator(target, targetKey) { + ordinaryDefineOwnMetadata( + metadataKey, + metadataValue, + (targetKey !== undefined ? anObject : aFunction)(target), + toMetaKey(targetKey), + ); + }; + }, + }); + + /***/ + }, + /* 462 */ + /***/ function (module, exports, __webpack_require__) { + // https://github.com/rwaldron/tc39-notes/blob/master/es6/2014-09/sept-25.md#510-globalasap-for-enqueuing-a-microtask + var $export = __webpack_require__(0); + var microtask = __webpack_require__(137)(); + var process = __webpack_require__(3).process; + var isNode = __webpack_require__(25)(process) == 'process'; + + $export($export.G, { + asap: function asap(fn) { + var domain = isNode && process.domain; + microtask(domain ? domain.bind(fn) : fn); + }, + }); + + /***/ + }, + /* 463 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // https://github.com/zenparsing/es-observable + var $export = __webpack_require__(0); + var global = __webpack_require__(3); + var core = __webpack_require__(23); + var microtask = __webpack_require__(137)(); + var OBSERVABLE = __webpack_require__(6)('observable'); + var aFunction = __webpack_require__(12); + var anObject = __webpack_require__(2); + var anInstance = __webpack_require__(57); + var redefineAll = __webpack_require__(59); + var hide = __webpack_require__(15); + var forOf = __webpack_require__(58); + var RETURN = forOf.RETURN; + + var getMethod = function (fn) { + return fn == null ? undefined : aFunction(fn); + }; + + var cleanupSubscription = function (subscription) { + var cleanup = subscription._c; + if (cleanup) { + subscription._c = undefined; + cleanup(); + } + }; + + var subscriptionClosed = function (subscription) { + return subscription._o === undefined; + }; + + var closeSubscription = function (subscription) { + if (!subscriptionClosed(subscription)) { + subscription._o = undefined; + cleanupSubscription(subscription); + } + }; + + var Subscription = function (observer, subscriber) { + anObject(observer); + this._c = undefined; + this._o = observer; + observer = new SubscriptionObserver(this); + try { + var cleanup = subscriber(observer); + var subscription = cleanup; + if (cleanup != null) { + if (typeof cleanup.unsubscribe === 'function') + cleanup = function () { + subscription.unsubscribe(); + }; + else aFunction(cleanup); + this._c = cleanup; + } + } catch (e) { + observer.error(e); + return; + } + if (subscriptionClosed(this)) cleanupSubscription(this); + }; + + Subscription.prototype = redefineAll( + {}, + { + unsubscribe: function unsubscribe() { + closeSubscription(this); + }, + }, + ); + + var SubscriptionObserver = function (subscription) { + this._s = subscription; + }; + + SubscriptionObserver.prototype = redefineAll( + {}, + { + next: function next(value) { + var subscription = this._s; + if (!subscriptionClosed(subscription)) { + var observer = subscription._o; + try { + var m = getMethod(observer.next); + if (m) return m.call(observer, value); + } catch (e) { + try { + closeSubscription(subscription); + } finally { + throw e; + } + } + } + }, + error: function error(value) { + var subscription = this._s; + if (subscriptionClosed(subscription)) throw value; + var observer = subscription._o; + subscription._o = undefined; + try { + var m = getMethod(observer.error); + if (!m) throw value; + value = m.call(observer, value); + } catch (e) { + try { + cleanupSubscription(subscription); + } finally { + throw e; + } + } + cleanupSubscription(subscription); + return value; + }, + complete: function complete(value) { + var subscription = this._s; + if (!subscriptionClosed(subscription)) { + var observer = subscription._o; + subscription._o = undefined; + try { + var m = getMethod(observer.complete); + value = m ? m.call(observer, value) : undefined; + } catch (e) { + try { + cleanupSubscription(subscription); + } finally { + throw e; + } + } + cleanupSubscription(subscription); + return value; + } + }, + }, + ); + + var $Observable = function Observable(subscriber) { + anInstance(this, $Observable, 'Observable', '_f')._f = aFunction(subscriber); + }; + + redefineAll($Observable.prototype, { + subscribe: function subscribe(observer) { + return new Subscription(observer, this._f); + }, + forEach: function forEach(fn) { + var that = this; + return new (core.Promise || global.Promise)(function (resolve, reject) { + aFunction(fn); + var subscription = that.subscribe({ + next: function (value) { + try { + return fn(value); + } catch (e) { + reject(e); + subscription.unsubscribe(); + } + }, + error: reject, + complete: resolve, + }); + }); + }, + }); + + redefineAll($Observable, { + from: function from(x) { + var C = typeof this === 'function' ? this : $Observable; + var method = getMethod(anObject(x)[OBSERVABLE]); + if (method) { + var observable = anObject(method.call(x)); + return observable.constructor === C + ? observable + : new C(function (observer) { + return observable.subscribe(observer); + }); + } + return new C(function (observer) { + var done = false; + microtask(function () { + if (!done) { + try { + if ( + forOf(x, false, function (it) { + observer.next(it); + if (done) return RETURN; + }) === RETURN + ) + return; + } catch (e) { + if (done) throw e; + observer.error(e); + return; + } + observer.complete(); + } + }); + return function () { + done = true; + }; + }); + }, + of: function of() { + for (var i = 0, l = arguments.length, items = new Array(l); i < l; ) items[i] = arguments[i++]; + return new (typeof this === 'function' ? this : $Observable)(function (observer) { + var done = false; + microtask(function () { + if (!done) { + for (var j = 0; j < items.length; ++j) { + observer.next(items[j]); + if (done) return; + } + observer.complete(); + } + }); + return function () { + done = true; + }; + }); + }, + }); + + hide($Observable.prototype, OBSERVABLE, function () { + return this; + }); + + $export($export.G, { Observable: $Observable }); + + __webpack_require__(56)('Observable'); + + /***/ + }, + /* 464 */ + /***/ function (module, exports, __webpack_require__) { + // ie9- setTimeout & setInterval additional parameters fix + var global = __webpack_require__(3); + var $export = __webpack_require__(0); + var userAgent = __webpack_require__(95); + var slice = [].slice; + var MSIE = /MSIE .\./.test(userAgent); // <- dirty ie9- check + var wrap = function (set) { + return function (fn, time /* , ...args */) { + var boundArgs = arguments.length > 2; + var args = boundArgs ? slice.call(arguments, 2) : false; + return set( + boundArgs + ? function () { + // eslint-disable-next-line no-new-func + (typeof fn == 'function' ? fn : Function(fn)).apply(this, args); + } + : fn, + time, + ); + }; + }; + $export($export.G + $export.B + $export.F * MSIE, { + setTimeout: wrap(global.setTimeout), + setInterval: wrap(global.setInterval), + }); + + /***/ + }, + /* 465 */ + /***/ function (module, exports, __webpack_require__) { + var $export = __webpack_require__(0); + var $task = __webpack_require__(136); + $export($export.G + $export.B, { + setImmediate: $task.set, + clearImmediate: $task.clear, + }); + + /***/ + }, + /* 466 */ + /***/ function (module, exports, __webpack_require__) { + var $iterators = __webpack_require__(133); + var getKeys = __webpack_require__(52); + var redefine = __webpack_require__(16); + var global = __webpack_require__(3); + var hide = __webpack_require__(15); + var Iterators = __webpack_require__(68); + var wks = __webpack_require__(6); + var ITERATOR = wks('iterator'); + var TO_STRING_TAG = wks('toStringTag'); + var ArrayValues = Iterators.Array; + + var DOMIterables = { + CSSRuleList: true, // TODO: Not spec compliant, should be false. + CSSStyleDeclaration: false, + CSSValueList: false, + ClientRectList: false, + DOMRectList: false, + DOMStringList: false, + DOMTokenList: true, + DataTransferItemList: false, + FileList: false, + HTMLAllCollection: false, + HTMLCollection: false, + HTMLFormElement: false, + HTMLSelectElement: false, + MediaList: true, // TODO: Not spec compliant, should be false. + MimeTypeArray: false, + NamedNodeMap: false, + NodeList: true, + PaintRequestList: false, + Plugin: false, + PluginArray: false, + SVGLengthList: false, + SVGNumberList: false, + SVGPathSegList: false, + SVGPointList: false, + SVGStringList: false, + SVGTransformList: false, + SourceBufferList: false, + StyleSheetList: true, // TODO: Not spec compliant, should be false. + TextTrackCueList: false, + TextTrackList: false, + TouchList: false, + }; + + for (var collections = getKeys(DOMIterables), i = 0; i < collections.length; i++) { + var NAME = collections[i]; + var explicit = DOMIterables[NAME]; + var Collection = global[NAME]; + var proto = Collection && Collection.prototype; + var key; + if (proto) { + if (!proto[ITERATOR]) hide(proto, ITERATOR, ArrayValues); + if (!proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME); + Iterators[NAME] = ArrayValues; + if (explicit) for (key in $iterators) if (!proto[key]) redefine(proto, key, $iterators[key], true); + } + } + + /***/ + }, + /* 467 */ + /***/ function (module, exports, __webpack_require__) { + /* WEBPACK VAR INJECTION */ (function (global) { + /** + * Copyright (c) 2014, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * https://raw.github.com/facebook/regenerator/master/LICENSE file. An + * additional grant of patent rights can be found in the PATENTS file in + * the same directory. + */ + + !(function (global) { + 'use strict'; + + var Op = Object.prototype; + var hasOwn = Op.hasOwnProperty; + var undefined; // More compressible than void 0. + var $Symbol = typeof Symbol === 'function' ? Symbol : {}; + var iteratorSymbol = $Symbol.iterator || '@@iterator'; + var asyncIteratorSymbol = $Symbol.asyncIterator || '@@asyncIterator'; + var toStringTagSymbol = $Symbol.toStringTag || '@@toStringTag'; + + var inModule = typeof module === 'object'; + var runtime = global.regeneratorRuntime; + if (runtime) { + if (inModule) { + // If regeneratorRuntime is defined globally and we're in a module, + // make the exports object identical to regeneratorRuntime. + module.exports = runtime; + } + // Don't bother evaluating the rest of this file if the runtime was + // already defined globally. + return; + } + + // Define the runtime globally (as expected by generated code) as either + // module.exports (if we're in a module) or a new, empty object. + runtime = global.regeneratorRuntime = inModule ? module.exports : {}; + + function wrap(innerFn, outerFn, self, tryLocsList) { + // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator. + var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator; + var generator = Object.create(protoGenerator.prototype); + var context = new Context(tryLocsList || []); + + // The ._invoke method unifies the implementations of the .next, + // .throw, and .return methods. + generator._invoke = makeInvokeMethod(innerFn, self, context); + + return generator; + } + runtime.wrap = wrap; + + // Try/catch helper to minimize deoptimizations. Returns a completion + // record like context.tryEntries[i].completion. This interface could + // have been (and was previously) designed to take a closure to be + // invoked without arguments, but in all the cases we care about we + // already have an existing method we want to call, so there's no need + // to create a new function object. We can even get away with assuming + // the method takes exactly one argument, since that happens to be true + // in every case, so we don't have to touch the arguments object. The + // only additional allocation required is the completion record, which + // has a stable shape and so hopefully should be cheap to allocate. + function tryCatch(fn, obj, arg) { + try { + return { type: 'normal', arg: fn.call(obj, arg) }; + } catch (err) { + return { type: 'throw', arg: err }; + } + } + + var GenStateSuspendedStart = 'suspendedStart'; + var GenStateSuspendedYield = 'suspendedYield'; + var GenStateExecuting = 'executing'; + var GenStateCompleted = 'completed'; + + // Returning this object from the innerFn has the same effect as + // breaking out of the dispatch switch statement. + var ContinueSentinel = {}; + + // Dummy constructor functions that we use as the .constructor and + // .constructor.prototype properties for functions that return Generator + // objects. For full spec compliance, you may wish to configure your + // minifier not to mangle the names of these two functions. + function Generator() {} + function GeneratorFunction() {} + function GeneratorFunctionPrototype() {} + + // This is a polyfill for %IteratorPrototype% for environments that + // don't natively support it. + var IteratorPrototype = {}; + IteratorPrototype[iteratorSymbol] = function () { + return this; + }; + + var getProto = Object.getPrototypeOf; + var NativeIteratorPrototype = getProto && getProto(getProto(values([]))); + if ( + NativeIteratorPrototype && + NativeIteratorPrototype !== Op && + hasOwn.call(NativeIteratorPrototype, iteratorSymbol) + ) { + // This environment has a native %IteratorPrototype%; use it instead + // of the polyfill. + IteratorPrototype = NativeIteratorPrototype; + } + + var Gp = + (GeneratorFunctionPrototype.prototype = + Generator.prototype = + Object.create(IteratorPrototype)); + GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype; + GeneratorFunctionPrototype.constructor = GeneratorFunction; + GeneratorFunctionPrototype[toStringTagSymbol] = GeneratorFunction.displayName = 'GeneratorFunction'; + + // Helper for defining the .next, .throw, and .return methods of the + // Iterator interface in terms of a single ._invoke method. + function defineIteratorMethods(prototype) { + ['next', 'throw', 'return'].forEach(function (method) { + prototype[method] = function (arg) { + return this._invoke(method, arg); + }; + }); + } + + runtime.isGeneratorFunction = function (genFun) { + var ctor = typeof genFun === 'function' && genFun.constructor; + return ctor + ? ctor === GeneratorFunction || + // For the native GeneratorFunction constructor, the best we can + // do is to check its .name property. + (ctor.displayName || ctor.name) === 'GeneratorFunction' + : false; + }; + + runtime.mark = function (genFun) { + if (Object.setPrototypeOf) { + Object.setPrototypeOf(genFun, GeneratorFunctionPrototype); + } else { + genFun.__proto__ = GeneratorFunctionPrototype; + if (!(toStringTagSymbol in genFun)) { + genFun[toStringTagSymbol] = 'GeneratorFunction'; + } + } + genFun.prototype = Object.create(Gp); + return genFun; + }; + + // Within the body of any async function, `await x` is transformed to + // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test + // `hasOwn.call(value, "__await")` to determine if the yielded value is + // meant to be awaited. + runtime.awrap = function (arg) { + return { __await: arg }; + }; + + function AsyncIterator(generator) { + function invoke(method, arg, resolve, reject) { + var record = tryCatch(generator[method], generator, arg); + if (record.type === 'throw') { + reject(record.arg); + } else { + var result = record.arg; + var value = result.value; + if (value && typeof value === 'object' && hasOwn.call(value, '__await')) { + return Promise.resolve(value.__await).then( + function (value) { + invoke('next', value, resolve, reject); + }, + function (err) { + invoke('throw', err, resolve, reject); + }, + ); + } + + return Promise.resolve(value).then(function (unwrapped) { + // When a yielded Promise is resolved, its final value becomes + // the .value of the Promise<{value,done}> result for the + // current iteration. If the Promise is rejected, however, the + // result for this iteration will be rejected with the same + // reason. Note that rejections of yielded Promises are not + // thrown back into the generator function, as is the case + // when an awaited Promise is rejected. This difference in + // behavior between yield and await is important, because it + // allows the consumer to decide what to do with the yielded + // rejection (swallow it and continue, manually .throw it back + // into the generator, abandon iteration, whatever). With + // await, by contrast, there is no opportunity to examine the + // rejection reason outside the generator function, so the + // only option is to throw it from the await expression, and + // let the generator function handle the exception. + result.value = unwrapped; + resolve(result); + }, reject); + } + } + + if (typeof global.process === 'object' && global.process.domain) { + invoke = global.process.domain.bind(invoke); + } + + var previousPromise; + + function enqueue(method, arg) { + function callInvokeWithMethodAndArg() { + return new Promise(function (resolve, reject) { + invoke(method, arg, resolve, reject); + }); + } + + return (previousPromise = + // If enqueue has been called before, then we want to wait until + // all previous Promises have been resolved before calling invoke, + // so that results are always delivered in the correct order. If + // enqueue has not been called before, then it is important to + // call invoke immediately, without waiting on a callback to fire, + // so that the async generator function has the opportunity to do + // any necessary setup in a predictable way. This predictability + // is why the Promise constructor synchronously invokes its + // executor callback, and why async functions synchronously + // execute code before the first await. Since we implement simple + // async functions in terms of async generators, it is especially + // important to get this right, even though it requires care. + previousPromise + ? previousPromise.then( + callInvokeWithMethodAndArg, + // Avoid propagating failures to Promises returned by later + // invocations of the iterator. + callInvokeWithMethodAndArg, + ) + : callInvokeWithMethodAndArg()); + } + + // Define the unified helper method that is used to implement .next, + // .throw, and .return (see defineIteratorMethods). + this._invoke = enqueue; + } + + defineIteratorMethods(AsyncIterator.prototype); + AsyncIterator.prototype[asyncIteratorSymbol] = function () { + return this; + }; + runtime.AsyncIterator = AsyncIterator; + + // Note that simple async functions are implemented on top of + // AsyncIterator objects; they just return a Promise for the value of + // the final result produced by the iterator. + runtime.async = function (innerFn, outerFn, self, tryLocsList) { + var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList)); + + return runtime.isGeneratorFunction(outerFn) + ? iter // If outerFn is a generator, return the full iterator. + : iter.next().then(function (result) { + return result.done ? result.value : iter.next(); + }); + }; + + function makeInvokeMethod(innerFn, self, context) { + var state = GenStateSuspendedStart; + + return function invoke(method, arg) { + if (state === GenStateExecuting) { + throw new Error('Generator is already running'); + } + + if (state === GenStateCompleted) { + if (method === 'throw') { + throw arg; + } + + // Be forgiving, per 25.3.3.3.3 of the spec: + // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume + return doneResult(); + } + + context.method = method; + context.arg = arg; + + while (true) { + var delegate = context.delegate; + if (delegate) { + var delegateResult = maybeInvokeDelegate(delegate, context); + if (delegateResult) { + if (delegateResult === ContinueSentinel) continue; + return delegateResult; + } + } + + if (context.method === 'next') { + // Setting context._sent for legacy support of Babel's + // function.sent implementation. + context.sent = context._sent = context.arg; + } else if (context.method === 'throw') { + if (state === GenStateSuspendedStart) { + state = GenStateCompleted; + throw context.arg; + } + + context.dispatchException(context.arg); + } else if (context.method === 'return') { + context.abrupt('return', context.arg); + } + + state = GenStateExecuting; + + var record = tryCatch(innerFn, self, context); + if (record.type === 'normal') { + // If an exception is thrown from innerFn, we leave state === + // GenStateExecuting and loop back for another invocation. + state = context.done ? GenStateCompleted : GenStateSuspendedYield; + + if (record.arg === ContinueSentinel) { + continue; + } + + return { + value: record.arg, + done: context.done, + }; + } else if (record.type === 'throw') { + state = GenStateCompleted; + // Dispatch the exception by looping back around to the + // context.dispatchException(context.arg) call above. + context.method = 'throw'; + context.arg = record.arg; + } + } + }; + } + + // Call delegate.iterator[context.method](context.arg) and handle the + // result, either by returning a { value, done } result from the + // delegate iterator, or by modifying context.method and context.arg, + // setting context.delegate to null, and returning the ContinueSentinel. + function maybeInvokeDelegate(delegate, context) { + var method = delegate.iterator[context.method]; + if (method === undefined) { + // A .throw or .return when the delegate iterator has no .throw + // method always terminates the yield* loop. + context.delegate = null; + + if (context.method === 'throw') { + if (delegate.iterator.return) { + // If the delegate iterator has a return method, give it a + // chance to clean up. + context.method = 'return'; + context.arg = undefined; + maybeInvokeDelegate(delegate, context); + + if (context.method === 'throw') { + // If maybeInvokeDelegate(context) changed context.method from + // "return" to "throw", let that override the TypeError below. + return ContinueSentinel; + } + } + + context.method = 'throw'; + context.arg = new TypeError("The iterator does not provide a 'throw' method"); + } + + return ContinueSentinel; + } + + var record = tryCatch(method, delegate.iterator, context.arg); + + if (record.type === 'throw') { + context.method = 'throw'; + context.arg = record.arg; + context.delegate = null; + return ContinueSentinel; + } + + var info = record.arg; + + if (!info) { + context.method = 'throw'; + context.arg = new TypeError('iterator result is not an object'); + context.delegate = null; + return ContinueSentinel; + } + + if (info.done) { + // Assign the result of the finished delegate to the temporary + // variable specified by delegate.resultName (see delegateYield). + context[delegate.resultName] = info.value; + + // Resume execution at the desired location (see delegateYield). + context.next = delegate.nextLoc; + + // If context.method was "throw" but the delegate handled the + // exception, let the outer generator proceed normally. If + // context.method was "next", forget context.arg since it has been + // "consumed" by the delegate iterator. If context.method was + // "return", allow the original .return call to continue in the + // outer generator. + if (context.method !== 'return') { + context.method = 'next'; + context.arg = undefined; + } + } else { + // Re-yield the result returned by the delegate method. + return info; + } + + // The delegate iterator is finished, so forget it and continue with + // the outer generator. + context.delegate = null; + return ContinueSentinel; + } + + // Define Generator.prototype.{next,throw,return} in terms of the + // unified ._invoke helper method. + defineIteratorMethods(Gp); + + Gp[toStringTagSymbol] = 'Generator'; + + // A Generator should always return itself as the iterator object when the + // @@iterator function is called on it. Some browsers' implementations of the + // iterator prototype chain incorrectly implement this, causing the Generator + // object to not be returned from this call. This ensures that doesn't happen. + // See https://github.com/facebook/regenerator/issues/274 for more details. + Gp[iteratorSymbol] = function () { + return this; + }; + + Gp.toString = function () { + return '[object Generator]'; + }; + + function pushTryEntry(locs) { + var entry = { tryLoc: locs[0] }; + + if (1 in locs) { + entry.catchLoc = locs[1]; + } + + if (2 in locs) { + entry.finallyLoc = locs[2]; + entry.afterLoc = locs[3]; + } + + this.tryEntries.push(entry); + } + + function resetTryEntry(entry) { + var record = entry.completion || {}; + record.type = 'normal'; + delete record.arg; + entry.completion = record; + } + + function Context(tryLocsList) { + // The root entry object (effectively a try statement without a catch + // or a finally block) gives us a place to store values thrown from + // locations where there is no enclosing try statement. + this.tryEntries = [{ tryLoc: 'root' }]; + tryLocsList.forEach(pushTryEntry, this); + this.reset(true); + } + + runtime.keys = function (object) { + var keys = []; + for (var key in object) { + keys.push(key); + } + keys.reverse(); + + // Rather than returning an object with a next method, we keep + // things simple and return the next function itself. + return function next() { + while (keys.length) { + var key = keys.pop(); + if (key in object) { + next.value = key; + next.done = false; + return next; + } + } + + // To avoid creating an additional object, we just hang the .value + // and .done properties off the next function object itself. This + // also ensures that the minifier will not anonymize the function. + next.done = true; + return next; + }; + }; + + function values(iterable) { + if (iterable) { + var iteratorMethod = iterable[iteratorSymbol]; + if (iteratorMethod) { + return iteratorMethod.call(iterable); + } + + if (typeof iterable.next === 'function') { + return iterable; + } + + if (!isNaN(iterable.length)) { + var i = -1, + next = function next() { + while (++i < iterable.length) { + if (hasOwn.call(iterable, i)) { + next.value = iterable[i]; + next.done = false; + return next; + } + } + + next.value = undefined; + next.done = true; + + return next; + }; + + return (next.next = next); + } + } + + // Return an iterator with no values. + return { next: doneResult }; + } + runtime.values = values; + + function doneResult() { + return { value: undefined, done: true }; + } + + Context.prototype = { + constructor: Context, + + reset: function (skipTempReset) { + this.prev = 0; + this.next = 0; + // Resetting context._sent for legacy support of Babel's + // function.sent implementation. + this.sent = this._sent = undefined; + this.done = false; + this.delegate = null; + + this.method = 'next'; + this.arg = undefined; + + this.tryEntries.forEach(resetTryEntry); + + if (!skipTempReset) { + for (var name in this) { + // Not sure about the optimal order of these conditions: + if (name.charAt(0) === 't' && hasOwn.call(this, name) && !isNaN(+name.slice(1))) { + this[name] = undefined; + } + } + } + }, + + stop: function () { + this.done = true; + + var rootEntry = this.tryEntries[0]; + var rootRecord = rootEntry.completion; + if (rootRecord.type === 'throw') { + throw rootRecord.arg; + } + + return this.rval; + }, + + dispatchException: function (exception) { + if (this.done) { + throw exception; + } + + var context = this; + function handle(loc, caught) { + record.type = 'throw'; + record.arg = exception; + context.next = loc; + + if (caught) { + // If the dispatched exception was caught by a catch block, + // then let that catch block handle the exception normally. + context.method = 'next'; + context.arg = undefined; + } + + return !!caught; + } + + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + var record = entry.completion; + + if (entry.tryLoc === 'root') { + // Exception thrown outside of any try block that could handle + // it, so set the completion value of the entire function to + // throw the exception. + return handle('end'); + } + + if (entry.tryLoc <= this.prev) { + var hasCatch = hasOwn.call(entry, 'catchLoc'); + var hasFinally = hasOwn.call(entry, 'finallyLoc'); + + if (hasCatch && hasFinally) { + if (this.prev < entry.catchLoc) { + return handle(entry.catchLoc, true); + } else if (this.prev < entry.finallyLoc) { + return handle(entry.finallyLoc); + } + } else if (hasCatch) { + if (this.prev < entry.catchLoc) { + return handle(entry.catchLoc, true); + } + } else if (hasFinally) { + if (this.prev < entry.finallyLoc) { + return handle(entry.finallyLoc); + } + } else { + throw new Error('try statement without catch or finally'); + } + } + } + }, + + abrupt: function (type, arg) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + if ( + entry.tryLoc <= this.prev && + hasOwn.call(entry, 'finallyLoc') && + this.prev < entry.finallyLoc + ) { + var finallyEntry = entry; + break; + } + } + + if ( + finallyEntry && + (type === 'break' || type === 'continue') && + finallyEntry.tryLoc <= arg && + arg <= finallyEntry.finallyLoc + ) { + // Ignore the finally entry if control is not jumping to a + // location outside the try/catch block. + finallyEntry = null; + } + + var record = finallyEntry ? finallyEntry.completion : {}; + record.type = type; + record.arg = arg; + + if (finallyEntry) { + this.method = 'next'; + this.next = finallyEntry.finallyLoc; + return ContinueSentinel; + } + + return this.complete(record); + }, + + complete: function (record, afterLoc) { + if (record.type === 'throw') { + throw record.arg; + } + + if (record.type === 'break' || record.type === 'continue') { + this.next = record.arg; + } else if (record.type === 'return') { + this.rval = this.arg = record.arg; + this.method = 'return'; + this.next = 'end'; + } else if (record.type === 'normal' && afterLoc) { + this.next = afterLoc; + } + + return ContinueSentinel; + }, + + finish: function (finallyLoc) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + if (entry.finallyLoc === finallyLoc) { + this.complete(entry.completion, entry.afterLoc); + resetTryEntry(entry); + return ContinueSentinel; + } + } + }, + + catch: function (tryLoc) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + if (entry.tryLoc === tryLoc) { + var record = entry.completion; + if (record.type === 'throw') { + var thrown = record.arg; + resetTryEntry(entry); + } + return thrown; + } + } + + // The context.catch method must only be called with a location + // argument that corresponds to a known catch block. + throw new Error('illegal catch attempt'); + }, + + delegateYield: function (iterable, resultName, nextLoc) { + this.delegate = { + iterator: values(iterable), + resultName: resultName, + nextLoc: nextLoc, + }; + + if (this.method === 'next') { + // Deliberately forget the last sent value so that we don't + // accidentally pass it on to the delegate. + this.arg = undefined; + } + + return ContinueSentinel; + }, + }; + })( + // Among the various tricks for obtaining a reference to the global + // object, this seems to be the most reliable technique that does not + // use indirect eval (which violates Content Security Policy). + typeof global === 'object' + ? global + : typeof window === 'object' + ? window + : typeof self === 'object' + ? self + : this, + ); + + /* WEBPACK VAR INJECTION */ + }).call(exports, __webpack_require__(38)); + + /***/ + }, + /* 468 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(469); + module.exports = __webpack_require__(23).RegExp.escape; + + /***/ + }, + /* 469 */ + /***/ function (module, exports, __webpack_require__) { + // https://github.com/benjamingr/RexExp.escape + var $export = __webpack_require__(0); + var $re = __webpack_require__(470)(/[\\^$*+?.()|[\]{}]/g, '\\$&'); + + $export($export.S, 'RegExp', { + escape: function escape(it) { + return $re(it); + }, + }); + + /***/ + }, + /* 470 */ + /***/ function (module, exports) { + module.exports = function (regExp, replace) { + var replacer = + replace === Object(replace) + ? function (part) { + return replace[part]; + } + : replace; + return function (it) { + return String(it).replace(regExp, replacer); + }; + }; + + /***/ + }, + /* 471 */ + /***/ function (module, exports, __webpack_require__) { + var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__; /*! + * https://github.com/es-shims/es5-shim + * @license es5-shim Copyright 2009-2015 by contributors, MIT License + * see https://github.com/es-shims/es5-shim/blob/master/LICENSE + */ + + // vim: ts=4 sts=4 sw=4 expandtab + + // Add semicolon to prevent IIFE from being passed as argument to concatenated code. + // UMD (Universal Module Definition) + // see https://github.com/umdjs/umd/blob/master/templates/returnExports.js + (function (root, factory) { + 'use strict'; + + /* global define, exports, module */ + if (true) { + // AMD. Register as an anonymous module. + !((__WEBPACK_AMD_DEFINE_FACTORY__ = factory), + (__WEBPACK_AMD_DEFINE_RESULT__ = + typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' + ? __WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module) + : __WEBPACK_AMD_DEFINE_FACTORY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else if (typeof exports === 'object') { + // Node. Does not work with strict CommonJS, but + // only CommonJS-like enviroments that support module.exports, + // like Node. + module.exports = factory(); + } else { + // Browser globals (root is window) + root.returnExports = factory(); + } + })(this, function () { + /** + * Brings an environment as close to ECMAScript 5 compliance + * as is possible with the facilities of erstwhile engines. + * + * Annotated ES5: http://es5.github.com/ (specific links below) + * ES5 Spec: http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf + * Required reading: http://javascriptweblog.wordpress.com/2011/12/05/extending-javascript-natives/ + */ + + // Shortcut to an often accessed properties, in order to avoid multiple + // dereference that costs universally. This also holds a reference to known-good + // functions. + var $Array = Array; + var ArrayPrototype = $Array.prototype; + var $Object = Object; + var ObjectPrototype = $Object.prototype; + var $Function = Function; + var FunctionPrototype = $Function.prototype; + var $String = String; + var StringPrototype = $String.prototype; + var $Number = Number; + var NumberPrototype = $Number.prototype; + var array_slice = ArrayPrototype.slice; + var array_splice = ArrayPrototype.splice; + var array_push = ArrayPrototype.push; + var array_unshift = ArrayPrototype.unshift; + var array_concat = ArrayPrototype.concat; + var array_join = ArrayPrototype.join; + var call = FunctionPrototype.call; + var apply = FunctionPrototype.apply; + var max = Math.max; + var min = Math.min; + + // Having a toString local variable name breaks in Opera so use to_string. + var to_string = ObjectPrototype.toString; + + /* global Symbol */ + /* eslint-disable one-var-declaration-per-line, no-redeclare, max-statements-per-line */ + var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol'; + var isCallable; + /* inlined from https://npmjs.com/is-callable */ var fnToStr = Function.prototype.toString, + constructorRegex = /^\s*class /, + isES6ClassFn = function isES6ClassFn(value) { + try { + var fnStr = fnToStr.call(value); + var singleStripped = fnStr.replace(/\/\/.*\n/g, ''); + var multiStripped = singleStripped.replace(/\/\*[.\s\S]*\*\//g, ''); + var spaceStripped = multiStripped.replace(/\n/gm, ' ').replace(/ {2}/g, ' '); + return constructorRegex.test(spaceStripped); + } catch (e) { + return false; /* not a function */ + } + }, + tryFunctionObject = function tryFunctionObject(value) { + try { + if (isES6ClassFn(value)) { + return false; + } + fnToStr.call(value); + return true; + } catch (e) { + return false; + } + }, + fnClass = '[object Function]', + genClass = '[object GeneratorFunction]', + isCallable = function isCallable(value) { + if (!value) { + return false; + } + if (typeof value !== 'function' && typeof value !== 'object') { + return false; + } + if (hasToStringTag) { + return tryFunctionObject(value); + } + if (isES6ClassFn(value)) { + return false; + } + var strClass = to_string.call(value); + return strClass === fnClass || strClass === genClass; + }; + + var isRegex; + /* inlined from https://npmjs.com/is-regex */ var regexExec = RegExp.prototype.exec, + tryRegexExec = function tryRegexExec(value) { + try { + regexExec.call(value); + return true; + } catch (e) { + return false; + } + }, + regexClass = '[object RegExp]'; + isRegex = function isRegex(value) { + if (typeof value !== 'object') { + return false; + } + return hasToStringTag ? tryRegexExec(value) : to_string.call(value) === regexClass; + }; + var isString; + /* inlined from https://npmjs.com/is-string */ var strValue = String.prototype.valueOf, + tryStringObject = function tryStringObject(value) { + try { + strValue.call(value); + return true; + } catch (e) { + return false; + } + }, + stringClass = '[object String]'; + isString = function isString(value) { + if (typeof value === 'string') { + return true; + } + if (typeof value !== 'object') { + return false; + } + return hasToStringTag ? tryStringObject(value) : to_string.call(value) === stringClass; + }; + /* eslint-enable one-var-declaration-per-line, no-redeclare, max-statements-per-line */ + + /* inlined from http://npmjs.com/define-properties */ + var supportsDescriptors = + $Object.defineProperty && + (function () { + try { + var obj = {}; + $Object.defineProperty(obj, 'x', { enumerable: false, value: obj }); + for (var _ in obj) { + // jscs:ignore disallowUnusedVariables + return false; + } + return obj.x === obj; + } catch (e) { + /* this is ES3 */ + return false; + } + })(); + var defineProperties = (function (has) { + // Define configurable, writable, and non-enumerable props + // if they don't exist. + var defineProperty; + if (supportsDescriptors) { + defineProperty = function (object, name, method, forceAssign) { + if (!forceAssign && name in object) { + return; + } + $Object.defineProperty(object, name, { + configurable: true, + enumerable: false, + writable: true, + value: method, + }); + }; + } else { + defineProperty = function (object, name, method, forceAssign) { + if (!forceAssign && name in object) { + return; + } + object[name] = method; + }; + } + return function defineProperties(object, map, forceAssign) { + for (var name in map) { + if (has.call(map, name)) { + defineProperty(object, name, map[name], forceAssign); + } + } + }; + })(ObjectPrototype.hasOwnProperty); + + // + // Util + // ====== + // + + /* replaceable with https://npmjs.com/package/es-abstract /helpers/isPrimitive */ + var isPrimitive = function isPrimitive(input) { + var type = typeof input; + return input === null || (type !== 'object' && type !== 'function'); + }; + + var isActualNaN = + $Number.isNaN || + function isActualNaN(x) { + return x !== x; + }; + + var ES = { + // ES5 9.4 + // http://es5.github.com/#x9.4 + // http://jsperf.com/to-integer + /* replaceable with https://npmjs.com/package/es-abstract ES5.ToInteger */ + ToInteger: function ToInteger(num) { + var n = +num; + if (isActualNaN(n)) { + n = 0; + } else if (n !== 0 && n !== 1 / 0 && n !== -(1 / 0)) { + n = (n > 0 || -1) * Math.floor(Math.abs(n)); + } + return n; + }, + + /* replaceable with https://npmjs.com/package/es-abstract ES5.ToPrimitive */ + ToPrimitive: function ToPrimitive(input) { + var val, valueOf, toStr; + if (isPrimitive(input)) { + return input; + } + valueOf = input.valueOf; + if (isCallable(valueOf)) { + val = valueOf.call(input); + if (isPrimitive(val)) { + return val; + } + } + toStr = input.toString; + if (isCallable(toStr)) { + val = toStr.call(input); + if (isPrimitive(val)) { + return val; + } + } + throw new TypeError(); + }, + + // ES5 9.9 + // http://es5.github.com/#x9.9 + /* replaceable with https://npmjs.com/package/es-abstract ES5.ToObject */ + ToObject: function (o) { + if (o == null) { + // this matches both null and undefined + throw new TypeError("can't convert " + o + ' to object'); + } + return $Object(o); + }, + + /* replaceable with https://npmjs.com/package/es-abstract ES5.ToUint32 */ + ToUint32: function ToUint32(x) { + return x >>> 0; + }, + }; + + // + // Function + // ======== + // + + // ES-5 15.3.4.5 + // http://es5.github.com/#x15.3.4.5 + + var Empty = function Empty() {}; + + defineProperties(FunctionPrototype, { + bind: function bind(that) { + // .length is 1 + // 1. Let Target be the this value. + var target = this; + // 2. If IsCallable(Target) is false, throw a TypeError exception. + if (!isCallable(target)) { + throw new TypeError('Function.prototype.bind called on incompatible ' + target); + } + // 3. Let A be a new (possibly empty) internal list of all of the + // argument values provided after thisArg (arg1, arg2 etc), in order. + // XXX slicedArgs will stand in for "A" if used + var args = array_slice.call(arguments, 1); // for normal call + // 4. Let F be a new native ECMAScript object. + // 11. Set the [[Prototype]] internal property of F to the standard + // built-in Function prototype object as specified in 15.3.3.1. + // 12. Set the [[Call]] internal property of F as described in + // 15.3.4.5.1. + // 13. Set the [[Construct]] internal property of F as described in + // 15.3.4.5.2. + // 14. Set the [[HasInstance]] internal property of F as described in + // 15.3.4.5.3. + var bound; + var binder = function () { + if (this instanceof bound) { + // 15.3.4.5.2 [[Construct]] + // When the [[Construct]] internal method of a function object, + // F that was created using the bind function is called with a + // list of arguments ExtraArgs, the following steps are taken: + // 1. Let target be the value of F's [[TargetFunction]] + // internal property. + // 2. If target has no [[Construct]] internal method, a + // TypeError exception is thrown. + // 3. Let boundArgs be the value of F's [[BoundArgs]] internal + // property. + // 4. Let args be a new list containing the same values as the + // list boundArgs in the same order followed by the same + // values as the list ExtraArgs in the same order. + // 5. Return the result of calling the [[Construct]] internal + // method of target providing args as the arguments. + + var result = apply.call(target, this, array_concat.call(args, array_slice.call(arguments))); + if ($Object(result) === result) { + return result; + } + return this; + } else { + // 15.3.4.5.1 [[Call]] + // When the [[Call]] internal method of a function object, F, + // which was created using the bind function is called with a + // this value and a list of arguments ExtraArgs, the following + // steps are taken: + // 1. Let boundArgs be the value of F's [[BoundArgs]] internal + // property. + // 2. Let boundThis be the value of F's [[BoundThis]] internal + // property. + // 3. Let target be the value of F's [[TargetFunction]] internal + // property. + // 4. Let args be a new list containing the same values as the + // list boundArgs in the same order followed by the same + // values as the list ExtraArgs in the same order. + // 5. Return the result of calling the [[Call]] internal method + // of target providing boundThis as the this value and + // providing args as the arguments. + + // equiv: target.call(this, ...boundArgs, ...args) + return apply.call(target, that, array_concat.call(args, array_slice.call(arguments))); + } + }; + + // 15. If the [[Class]] internal property of Target is "Function", then + // a. Let L be the length property of Target minus the length of A. + // b. Set the length own property of F to either 0 or L, whichever is + // larger. + // 16. Else set the length own property of F to 0. + + var boundLength = max(0, target.length - args.length); + + // 17. Set the attributes of the length own property of F to the values + // specified in 15.3.5.1. + var boundArgs = []; + for (var i = 0; i < boundLength; i++) { + array_push.call(boundArgs, '$' + i); + } + + // XXX Build a dynamic function with desired amount of arguments is the only + // way to set the length property of a function. + // In environments where Content Security Policies enabled (Chrome extensions, + // for ex.) all use of eval or Function costructor throws an exception. + // However in all of these environments Function.prototype.bind exists + // and so this code will never be executed. + bound = $Function( + 'binder', + 'return function (' + + array_join.call(boundArgs, ',') + + '){ return binder.apply(this, arguments); }', + )(binder); + + if (target.prototype) { + Empty.prototype = target.prototype; + bound.prototype = new Empty(); + // Clean up dangling references. + Empty.prototype = null; + } + + // TODO + // 18. Set the [[Extensible]] internal property of F to true. + + // TODO + // 19. Let thrower be the [[ThrowTypeError]] function Object (13.2.3). + // 20. Call the [[DefineOwnProperty]] internal method of F with + // arguments "caller", PropertyDescriptor {[[Get]]: thrower, [[Set]]: + // thrower, [[Enumerable]]: false, [[Configurable]]: false}, and + // false. + // 21. Call the [[DefineOwnProperty]] internal method of F with + // arguments "arguments", PropertyDescriptor {[[Get]]: thrower, + // [[Set]]: thrower, [[Enumerable]]: false, [[Configurable]]: false}, + // and false. + + // TODO + // NOTE Function objects created using Function.prototype.bind do not + // have a prototype property or the [[Code]], [[FormalParameters]], and + // [[Scope]] internal properties. + // XXX can't delete prototype in pure-js. + + // 22. Return F. + return bound; + }, + }); + + // _Please note: Shortcuts are defined after `Function.prototype.bind` as we + // use it in defining shortcuts. + var owns = call.bind(ObjectPrototype.hasOwnProperty); + var toStr = call.bind(ObjectPrototype.toString); + var arraySlice = call.bind(array_slice); + var arraySliceApply = apply.bind(array_slice); + /* globals document */ + if (typeof document === 'object' && document && document.documentElement) { + try { + arraySlice(document.documentElement.childNodes); + } catch (e) { + var origArraySlice = arraySlice; + var origArraySliceApply = arraySliceApply; + arraySlice = function arraySliceIE(arr) { + var r = []; + var i = arr.length; + while (i-- > 0) { + r[i] = arr[i]; + } + return origArraySliceApply(r, origArraySlice(arguments, 1)); + }; + arraySliceApply = function arraySliceApplyIE(arr, args) { + return origArraySliceApply(arraySlice(arr), args); + }; + } + } + var strSlice = call.bind(StringPrototype.slice); + var strSplit = call.bind(StringPrototype.split); + var strIndexOf = call.bind(StringPrototype.indexOf); + var pushCall = call.bind(array_push); + var isEnum = call.bind(ObjectPrototype.propertyIsEnumerable); + var arraySort = call.bind(ArrayPrototype.sort); + + // + // Array + // ===== + // + + var isArray = + $Array.isArray || + function isArray(obj) { + return toStr(obj) === '[object Array]'; + }; + + // ES5 15.4.4.12 + // http://es5.github.com/#x15.4.4.13 + // Return len+argCount. + // [bugfix, ielt8] + // IE < 8 bug: [].unshift(0) === undefined but should be "1" + var hasUnshiftReturnValueBug = [].unshift(0) !== 1; + defineProperties( + ArrayPrototype, + { + unshift: function () { + array_unshift.apply(this, arguments); + return this.length; + }, + }, + hasUnshiftReturnValueBug, + ); + + // ES5 15.4.3.2 + // http://es5.github.com/#x15.4.3.2 + // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/isArray + defineProperties($Array, { isArray: isArray }); + + // The IsCallable() check in the Array functions + // has been replaced with a strict check on the + // internal class of the object to trap cases where + // the provided function was actually a regular + // expression literal, which in V8 and + // JavaScriptCore is a typeof "function". Only in + // V8 are regular expression literals permitted as + // reduce parameters, so it is desirable in the + // general case for the shim to match the more + // strict and common behavior of rejecting regular + // expressions. + + // ES5 15.4.4.18 + // http://es5.github.com/#x15.4.4.18 + // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/array/forEach + + // Check failure of by-index access of string characters (IE < 9) + // and failure of `0 in boxedString` (Rhino) + var boxedString = $Object('a'); + var splitString = boxedString[0] !== 'a' || !(0 in boxedString); + + var properlyBoxesContext = function properlyBoxed(method) { + // Check node 0.6.21 bug where third parameter is not boxed + var properlyBoxesNonStrict = true; + var properlyBoxesStrict = true; + var threwException = false; + if (method) { + try { + method.call('foo', function (_, __, context) { + if (typeof context !== 'object') { + properlyBoxesNonStrict = false; + } + }); + + method.call( + [1], + function () { + 'use strict'; + + properlyBoxesStrict = typeof this === 'string'; + }, + 'x', + ); + } catch (e) { + threwException = true; + } + } + return !!method && !threwException && properlyBoxesNonStrict && properlyBoxesStrict; + }; + + defineProperties( + ArrayPrototype, + { + forEach: function forEach(callbackfn /*, thisArg*/) { + var object = ES.ToObject(this); + var self = splitString && isString(this) ? strSplit(this, '') : object; + var i = -1; + var length = ES.ToUint32(self.length); + var T; + if (arguments.length > 1) { + T = arguments[1]; + } + + // If no callback function or if callback is not a callable function + if (!isCallable(callbackfn)) { + throw new TypeError('Array.prototype.forEach callback must be a function'); + } + + while (++i < length) { + if (i in self) { + // Invoke the callback function with call, passing arguments: + // context, property value, property key, thisArg object + if (typeof T === 'undefined') { + callbackfn(self[i], i, object); + } else { + callbackfn.call(T, self[i], i, object); + } + } + } + }, + }, + !properlyBoxesContext(ArrayPrototype.forEach), + ); + + // ES5 15.4.4.19 + // http://es5.github.com/#x15.4.4.19 + // https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/map + defineProperties( + ArrayPrototype, + { + map: function map(callbackfn /*, thisArg*/) { + var object = ES.ToObject(this); + var self = splitString && isString(this) ? strSplit(this, '') : object; + var length = ES.ToUint32(self.length); + var result = $Array(length); + var T; + if (arguments.length > 1) { + T = arguments[1]; + } + + // If no callback function or if callback is not a callable function + if (!isCallable(callbackfn)) { + throw new TypeError('Array.prototype.map callback must be a function'); + } + + for (var i = 0; i < length; i++) { + if (i in self) { + if (typeof T === 'undefined') { + result[i] = callbackfn(self[i], i, object); + } else { + result[i] = callbackfn.call(T, self[i], i, object); + } + } + } + return result; + }, + }, + !properlyBoxesContext(ArrayPrototype.map), + ); + + // ES5 15.4.4.20 + // http://es5.github.com/#x15.4.4.20 + // https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/filter + defineProperties( + ArrayPrototype, + { + filter: function filter(callbackfn /*, thisArg*/) { + var object = ES.ToObject(this); + var self = splitString && isString(this) ? strSplit(this, '') : object; + var length = ES.ToUint32(self.length); + var result = []; + var value; + var T; + if (arguments.length > 1) { + T = arguments[1]; + } + + // If no callback function or if callback is not a callable function + if (!isCallable(callbackfn)) { + throw new TypeError('Array.prototype.filter callback must be a function'); + } + + for (var i = 0; i < length; i++) { + if (i in self) { + value = self[i]; + if ( + typeof T === 'undefined' + ? callbackfn(value, i, object) + : callbackfn.call(T, value, i, object) + ) { + pushCall(result, value); + } + } + } + return result; + }, + }, + !properlyBoxesContext(ArrayPrototype.filter), + ); + + // ES5 15.4.4.16 + // http://es5.github.com/#x15.4.4.16 + // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/every + defineProperties( + ArrayPrototype, + { + every: function every(callbackfn /*, thisArg*/) { + var object = ES.ToObject(this); + var self = splitString && isString(this) ? strSplit(this, '') : object; + var length = ES.ToUint32(self.length); + var T; + if (arguments.length > 1) { + T = arguments[1]; + } + + // If no callback function or if callback is not a callable function + if (!isCallable(callbackfn)) { + throw new TypeError('Array.prototype.every callback must be a function'); + } + + for (var i = 0; i < length; i++) { + if ( + i in self && + !(typeof T === 'undefined' + ? callbackfn(self[i], i, object) + : callbackfn.call(T, self[i], i, object)) + ) { + return false; + } + } + return true; + }, + }, + !properlyBoxesContext(ArrayPrototype.every), + ); + + // ES5 15.4.4.17 + // http://es5.github.com/#x15.4.4.17 + // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/some + defineProperties( + ArrayPrototype, + { + some: function some(callbackfn /*, thisArg */) { + var object = ES.ToObject(this); + var self = splitString && isString(this) ? strSplit(this, '') : object; + var length = ES.ToUint32(self.length); + var T; + if (arguments.length > 1) { + T = arguments[1]; + } + + // If no callback function or if callback is not a callable function + if (!isCallable(callbackfn)) { + throw new TypeError('Array.prototype.some callback must be a function'); + } + + for (var i = 0; i < length; i++) { + if ( + i in self && + (typeof T === 'undefined' + ? callbackfn(self[i], i, object) + : callbackfn.call(T, self[i], i, object)) + ) { + return true; + } + } + return false; + }, + }, + !properlyBoxesContext(ArrayPrototype.some), + ); + + // ES5 15.4.4.21 + // http://es5.github.com/#x15.4.4.21 + // https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/reduce + var reduceCoercesToObject = false; + if (ArrayPrototype.reduce) { + reduceCoercesToObject = + typeof ArrayPrototype.reduce.call('es5', function (_, __, ___, list) { + return list; + }) === 'object'; + } + defineProperties( + ArrayPrototype, + { + reduce: function reduce(callbackfn /*, initialValue*/) { + var object = ES.ToObject(this); + var self = splitString && isString(this) ? strSplit(this, '') : object; + var length = ES.ToUint32(self.length); + + // If no callback function or if callback is not a callable function + if (!isCallable(callbackfn)) { + throw new TypeError('Array.prototype.reduce callback must be a function'); + } + + // no value to return if no initial value and an empty array + if (length === 0 && arguments.length === 1) { + throw new TypeError('reduce of empty array with no initial value'); + } + + var i = 0; + var result; + if (arguments.length >= 2) { + result = arguments[1]; + } else { + do { + if (i in self) { + result = self[i++]; + break; + } + + // if array contains no values, no initial value to return + if (++i >= length) { + throw new TypeError('reduce of empty array with no initial value'); + } + } while (true); + } + + for (; i < length; i++) { + if (i in self) { + result = callbackfn(result, self[i], i, object); + } + } + + return result; + }, + }, + !reduceCoercesToObject, + ); + + // ES5 15.4.4.22 + // http://es5.github.com/#x15.4.4.22 + // https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/reduceRight + var reduceRightCoercesToObject = false; + if (ArrayPrototype.reduceRight) { + reduceRightCoercesToObject = + typeof ArrayPrototype.reduceRight.call('es5', function (_, __, ___, list) { + return list; + }) === 'object'; + } + defineProperties( + ArrayPrototype, + { + reduceRight: function reduceRight(callbackfn /*, initial*/) { + var object = ES.ToObject(this); + var self = splitString && isString(this) ? strSplit(this, '') : object; + var length = ES.ToUint32(self.length); + + // If no callback function or if callback is not a callable function + if (!isCallable(callbackfn)) { + throw new TypeError('Array.prototype.reduceRight callback must be a function'); + } + + // no value to return if no initial value, empty array + if (length === 0 && arguments.length === 1) { + throw new TypeError('reduceRight of empty array with no initial value'); + } + + var result; + var i = length - 1; + if (arguments.length >= 2) { + result = arguments[1]; + } else { + do { + if (i in self) { + result = self[i--]; + break; + } + + // if array contains no values, no initial value to return + if (--i < 0) { + throw new TypeError('reduceRight of empty array with no initial value'); + } + } while (true); + } + + if (i < 0) { + return result; + } + + do { + if (i in self) { + result = callbackfn(result, self[i], i, object); + } + } while (i--); + + return result; + }, + }, + !reduceRightCoercesToObject, + ); + + // ES5 15.4.4.14 + // http://es5.github.com/#x15.4.4.14 + // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/indexOf + var hasFirefox2IndexOfBug = ArrayPrototype.indexOf && [0, 1].indexOf(1, 2) !== -1; + defineProperties( + ArrayPrototype, + { + indexOf: function indexOf(searchElement /*, fromIndex */) { + var self = splitString && isString(this) ? strSplit(this, '') : ES.ToObject(this); + var length = ES.ToUint32(self.length); + + if (length === 0) { + return -1; + } + + var i = 0; + if (arguments.length > 1) { + i = ES.ToInteger(arguments[1]); + } + + // handle negative indices + i = i >= 0 ? i : max(0, length + i); + for (; i < length; i++) { + if (i in self && self[i] === searchElement) { + return i; + } + } + return -1; + }, + }, + hasFirefox2IndexOfBug, + ); + + // ES5 15.4.4.15 + // http://es5.github.com/#x15.4.4.15 + // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/lastIndexOf + var hasFirefox2LastIndexOfBug = ArrayPrototype.lastIndexOf && [0, 1].lastIndexOf(0, -3) !== -1; + defineProperties( + ArrayPrototype, + { + lastIndexOf: function lastIndexOf(searchElement /*, fromIndex */) { + var self = splitString && isString(this) ? strSplit(this, '') : ES.ToObject(this); + var length = ES.ToUint32(self.length); + + if (length === 0) { + return -1; + } + var i = length - 1; + if (arguments.length > 1) { + i = min(i, ES.ToInteger(arguments[1])); + } + // handle negative indices + i = i >= 0 ? i : length - Math.abs(i); + for (; i >= 0; i--) { + if (i in self && searchElement === self[i]) { + return i; + } + } + return -1; + }, + }, + hasFirefox2LastIndexOfBug, + ); + + // ES5 15.4.4.12 + // http://es5.github.com/#x15.4.4.12 + var spliceNoopReturnsEmptyArray = (function () { + var a = [1, 2]; + var result = a.splice(); + return a.length === 2 && isArray(result) && result.length === 0; + })(); + defineProperties( + ArrayPrototype, + { + // Safari 5.0 bug where .splice() returns undefined + splice: function splice(start, deleteCount) { + if (arguments.length === 0) { + return []; + } else { + return array_splice.apply(this, arguments); + } + }, + }, + !spliceNoopReturnsEmptyArray, + ); + + var spliceWorksWithEmptyObject = (function () { + var obj = {}; + ArrayPrototype.splice.call(obj, 0, 0, 1); + return obj.length === 1; + })(); + defineProperties( + ArrayPrototype, + { + splice: function splice(start, deleteCount) { + if (arguments.length === 0) { + return []; + } + var args = arguments; + this.length = max(ES.ToInteger(this.length), 0); + if (arguments.length > 0 && typeof deleteCount !== 'number') { + args = arraySlice(arguments); + if (args.length < 2) { + pushCall(args, this.length - start); + } else { + args[1] = ES.ToInteger(deleteCount); + } + } + return array_splice.apply(this, args); + }, + }, + !spliceWorksWithEmptyObject, + ); + var spliceWorksWithLargeSparseArrays = (function () { + // Per https://github.com/es-shims/es5-shim/issues/295 + // Safari 7/8 breaks with sparse arrays of size 1e5 or greater + var arr = new $Array(1e5); + // note: the index MUST be 8 or larger or the test will false pass + arr[8] = 'x'; + arr.splice(1, 1); + // note: this test must be defined *after* the indexOf shim + // per https://github.com/es-shims/es5-shim/issues/313 + return arr.indexOf('x') === 7; + })(); + var spliceWorksWithSmallSparseArrays = (function () { + // Per https://github.com/es-shims/es5-shim/issues/295 + // Opera 12.15 breaks on this, no idea why. + var n = 256; + var arr = []; + arr[n] = 'a'; + arr.splice(n + 1, 0, 'b'); + return arr[n] === 'a'; + })(); + defineProperties( + ArrayPrototype, + { + splice: function splice(start, deleteCount) { + var O = ES.ToObject(this); + var A = []; + var len = ES.ToUint32(O.length); + var relativeStart = ES.ToInteger(start); + var actualStart = relativeStart < 0 ? max(len + relativeStart, 0) : min(relativeStart, len); + var actualDeleteCount = min(max(ES.ToInteger(deleteCount), 0), len - actualStart); + + var k = 0; + var from; + while (k < actualDeleteCount) { + from = $String(actualStart + k); + if (owns(O, from)) { + A[k] = O[from]; + } + k += 1; + } + + var items = arraySlice(arguments, 2); + var itemCount = items.length; + var to; + if (itemCount < actualDeleteCount) { + k = actualStart; + var maxK = len - actualDeleteCount; + while (k < maxK) { + from = $String(k + actualDeleteCount); + to = $String(k + itemCount); + if (owns(O, from)) { + O[to] = O[from]; + } else { + delete O[to]; + } + k += 1; + } + k = len; + var minK = len - actualDeleteCount + itemCount; + while (k > minK) { + delete O[k - 1]; + k -= 1; + } + } else if (itemCount > actualDeleteCount) { + k = len - actualDeleteCount; + while (k > actualStart) { + from = $String(k + actualDeleteCount - 1); + to = $String(k + itemCount - 1); + if (owns(O, from)) { + O[to] = O[from]; + } else { + delete O[to]; + } + k -= 1; + } + } + k = actualStart; + for (var i = 0; i < items.length; ++i) { + O[k] = items[i]; + k += 1; + } + O.length = len - actualDeleteCount + itemCount; + + return A; + }, + }, + !spliceWorksWithLargeSparseArrays || !spliceWorksWithSmallSparseArrays, + ); + + var originalJoin = ArrayPrototype.join; + var hasStringJoinBug; + try { + hasStringJoinBug = Array.prototype.join.call('123', ',') !== '1,2,3'; + } catch (e) { + hasStringJoinBug = true; + } + if (hasStringJoinBug) { + defineProperties( + ArrayPrototype, + { + join: function join(separator) { + var sep = typeof separator === 'undefined' ? ',' : separator; + return originalJoin.call(isString(this) ? strSplit(this, '') : this, sep); + }, + }, + hasStringJoinBug, + ); + } + + var hasJoinUndefinedBug = [1, 2].join(undefined) !== '1,2'; + if (hasJoinUndefinedBug) { + defineProperties( + ArrayPrototype, + { + join: function join(separator) { + var sep = typeof separator === 'undefined' ? ',' : separator; + return originalJoin.call(this, sep); + }, + }, + hasJoinUndefinedBug, + ); + } + + var pushShim = function push(item) { + var O = ES.ToObject(this); + var n = ES.ToUint32(O.length); + var i = 0; + while (i < arguments.length) { + O[n + i] = arguments[i]; + i += 1; + } + O.length = n + i; + return n + i; + }; + + var pushIsNotGeneric = (function () { + var obj = {}; + var result = Array.prototype.push.call(obj, undefined); + return result !== 1 || obj.length !== 1 || typeof obj[0] !== 'undefined' || !owns(obj, 0); + })(); + defineProperties( + ArrayPrototype, + { + push: function push(item) { + if (isArray(this)) { + return array_push.apply(this, arguments); + } + return pushShim.apply(this, arguments); + }, + }, + pushIsNotGeneric, + ); + + // This fixes a very weird bug in Opera 10.6 when pushing `undefined + var pushUndefinedIsWeird = (function () { + var arr = []; + var result = arr.push(undefined); + return result !== 1 || arr.length !== 1 || typeof arr[0] !== 'undefined' || !owns(arr, 0); + })(); + defineProperties(ArrayPrototype, { push: pushShim }, pushUndefinedIsWeird); + + // ES5 15.2.3.14 + // http://es5.github.io/#x15.4.4.10 + // Fix boxed string bug + defineProperties( + ArrayPrototype, + { + slice: function (start, end) { + var arr = isString(this) ? strSplit(this, '') : this; + return arraySliceApply(arr, arguments); + }, + }, + splitString, + ); + + var sortIgnoresNonFunctions = (function () { + try { + [1, 2].sort(null); + } catch (e) { + try { + [1, 2].sort({}); + } catch (e2) { + return false; + } + } + return true; + })(); + var sortThrowsOnRegex = (function () { + // this is a problem in Firefox 4, in which `typeof /a/ === 'function'` + try { + [1, 2].sort(/a/); + return false; + } catch (e) {} + return true; + })(); + var sortIgnoresUndefined = (function () { + // applies in IE 8, for one. + try { + [1, 2].sort(undefined); + return true; + } catch (e) {} + return false; + })(); + defineProperties( + ArrayPrototype, + { + sort: function sort(compareFn) { + if (typeof compareFn === 'undefined') { + return arraySort(this); + } + if (!isCallable(compareFn)) { + throw new TypeError('Array.prototype.sort callback must be a function'); + } + return arraySort(this, compareFn); + }, + }, + sortIgnoresNonFunctions || !sortIgnoresUndefined || !sortThrowsOnRegex, + ); + + // + // Object + // ====== + // + + // ES5 15.2.3.14 + // http://es5.github.com/#x15.2.3.14 + + // http://whattheheadsaid.com/2010/10/a-safer-object-keys-compatibility-implementation + var hasDontEnumBug = !isEnum({ toString: null }, 'toString'); // jscs:ignore disallowQuotedKeysInObjects + var hasProtoEnumBug = isEnum(function () {}, 'prototype'); + var hasStringEnumBug = !owns('x', '0'); + var equalsConstructorPrototype = function (o) { + var ctor = o.constructor; + return ctor && ctor.prototype === o; + }; + var excludedKeys = { + $applicationCache: true, + $console: true, + $external: true, + $frame: true, + $frameElement: true, + $frames: true, + $innerHeight: true, + $innerWidth: true, + $onmozfullscreenchange: true, + $onmozfullscreenerror: true, + $outerHeight: true, + $outerWidth: true, + $pageXOffset: true, + $pageYOffset: true, + $parent: true, + $scrollLeft: true, + $scrollTop: true, + $scrollX: true, + $scrollY: true, + $self: true, + $webkitIndexedDB: true, + $webkitStorageInfo: true, + $window: true, + + $width: true, + $height: true, + $top: true, + $localStorage: true, + }; + var hasAutomationEqualityBug = (function () { + /* globals window */ + if (typeof window === 'undefined') { + return false; + } + for (var k in window) { + try { + if ( + !excludedKeys['$' + k] && + owns(window, k) && + window[k] !== null && + typeof window[k] === 'object' + ) { + equalsConstructorPrototype(window[k]); + } + } catch (e) { + return true; + } + } + return false; + })(); + var equalsConstructorPrototypeIfNotBuggy = function (object) { + if (typeof window === 'undefined' || !hasAutomationEqualityBug) { + return equalsConstructorPrototype(object); + } + try { + return equalsConstructorPrototype(object); + } catch (e) { + return false; + } + }; + var dontEnums = [ + 'toString', + 'toLocaleString', + 'valueOf', + 'hasOwnProperty', + 'isPrototypeOf', + 'propertyIsEnumerable', + 'constructor', + ]; + var dontEnumsLength = dontEnums.length; + + // taken directly from https://github.com/ljharb/is-arguments/blob/master/index.js + // can be replaced with require('is-arguments') if we ever use a build process instead + var isStandardArguments = function isArguments(value) { + return toStr(value) === '[object Arguments]'; + }; + var isLegacyArguments = function isArguments(value) { + return ( + value !== null && + typeof value === 'object' && + typeof value.length === 'number' && + value.length >= 0 && + !isArray(value) && + isCallable(value.callee) + ); + }; + var isArguments = isStandardArguments(arguments) ? isStandardArguments : isLegacyArguments; + + defineProperties($Object, { + keys: function keys(object) { + var isFn = isCallable(object); + var isArgs = isArguments(object); + var isObject = object !== null && typeof object === 'object'; + var isStr = isObject && isString(object); + + if (!isObject && !isFn && !isArgs) { + throw new TypeError('Object.keys called on a non-object'); + } + + var theKeys = []; + var skipProto = hasProtoEnumBug && isFn; + if ((isStr && hasStringEnumBug) || isArgs) { + for (var i = 0; i < object.length; ++i) { + pushCall(theKeys, $String(i)); + } + } + + if (!isArgs) { + for (var name in object) { + if (!(skipProto && name === 'prototype') && owns(object, name)) { + pushCall(theKeys, $String(name)); + } + } + } + + if (hasDontEnumBug) { + var skipConstructor = equalsConstructorPrototypeIfNotBuggy(object); + for (var j = 0; j < dontEnumsLength; j++) { + var dontEnum = dontEnums[j]; + if (!(skipConstructor && dontEnum === 'constructor') && owns(object, dontEnum)) { + pushCall(theKeys, dontEnum); + } + } + } + return theKeys; + }, + }); + + var keysWorksWithArguments = + $Object.keys && + (function () { + // Safari 5.0 bug + return $Object.keys(arguments).length === 2; + })(1, 2); + var keysHasArgumentsLengthBug = + $Object.keys && + (function () { + var argKeys = $Object.keys(arguments); + return arguments.length !== 1 || argKeys.length !== 1 || argKeys[0] !== 1; + })(1); + var originalKeys = $Object.keys; + defineProperties( + $Object, + { + keys: function keys(object) { + if (isArguments(object)) { + return originalKeys(arraySlice(object)); + } else { + return originalKeys(object); + } + }, + }, + !keysWorksWithArguments || keysHasArgumentsLengthBug, + ); + + // + // Date + // ==== + // + + var hasNegativeMonthYearBug = new Date(-3509827329600292).getUTCMonth() !== 0; + var aNegativeTestDate = new Date(-1509842289600292); + var aPositiveTestDate = new Date(1449662400000); + var hasToUTCStringFormatBug = aNegativeTestDate.toUTCString() !== 'Mon, 01 Jan -45875 11:59:59 GMT'; + var hasToDateStringFormatBug; + var hasToStringFormatBug; + var timeZoneOffset = aNegativeTestDate.getTimezoneOffset(); + if (timeZoneOffset < -720) { + hasToDateStringFormatBug = aNegativeTestDate.toDateString() !== 'Tue Jan 02 -45875'; + hasToStringFormatBug = !/^Thu Dec 10 2015 \d\d:\d\d:\d\d GMT[-+]\d\d\d\d(?: |$)/.test( + String(aPositiveTestDate), + ); + } else { + hasToDateStringFormatBug = aNegativeTestDate.toDateString() !== 'Mon Jan 01 -45875'; + hasToStringFormatBug = !/^Wed Dec 09 2015 \d\d:\d\d:\d\d GMT[-+]\d\d\d\d(?: |$)/.test( + String(aPositiveTestDate), + ); + } + + var originalGetFullYear = call.bind(Date.prototype.getFullYear); + var originalGetMonth = call.bind(Date.prototype.getMonth); + var originalGetDate = call.bind(Date.prototype.getDate); + var originalGetUTCFullYear = call.bind(Date.prototype.getUTCFullYear); + var originalGetUTCMonth = call.bind(Date.prototype.getUTCMonth); + var originalGetUTCDate = call.bind(Date.prototype.getUTCDate); + var originalGetUTCDay = call.bind(Date.prototype.getUTCDay); + var originalGetUTCHours = call.bind(Date.prototype.getUTCHours); + var originalGetUTCMinutes = call.bind(Date.prototype.getUTCMinutes); + var originalGetUTCSeconds = call.bind(Date.prototype.getUTCSeconds); + var originalGetUTCMilliseconds = call.bind(Date.prototype.getUTCMilliseconds); + var dayName = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']; + var monthName = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']; + var daysInMonth = function daysInMonth(month, year) { + return originalGetDate(new Date(year, month, 0)); + }; + + defineProperties( + Date.prototype, + { + getFullYear: function getFullYear() { + if (!this || !(this instanceof Date)) { + throw new TypeError('this is not a Date object.'); + } + var year = originalGetFullYear(this); + if (year < 0 && originalGetMonth(this) > 11) { + return year + 1; + } + return year; + }, + getMonth: function getMonth() { + if (!this || !(this instanceof Date)) { + throw new TypeError('this is not a Date object.'); + } + var year = originalGetFullYear(this); + var month = originalGetMonth(this); + if (year < 0 && month > 11) { + return 0; + } + return month; + }, + getDate: function getDate() { + if (!this || !(this instanceof Date)) { + throw new TypeError('this is not a Date object.'); + } + var year = originalGetFullYear(this); + var month = originalGetMonth(this); + var date = originalGetDate(this); + if (year < 0 && month > 11) { + if (month === 12) { + return date; + } + var days = daysInMonth(0, year + 1); + return days - date + 1; + } + return date; + }, + getUTCFullYear: function getUTCFullYear() { + if (!this || !(this instanceof Date)) { + throw new TypeError('this is not a Date object.'); + } + var year = originalGetUTCFullYear(this); + if (year < 0 && originalGetUTCMonth(this) > 11) { + return year + 1; + } + return year; + }, + getUTCMonth: function getUTCMonth() { + if (!this || !(this instanceof Date)) { + throw new TypeError('this is not a Date object.'); + } + var year = originalGetUTCFullYear(this); + var month = originalGetUTCMonth(this); + if (year < 0 && month > 11) { + return 0; + } + return month; + }, + getUTCDate: function getUTCDate() { + if (!this || !(this instanceof Date)) { + throw new TypeError('this is not a Date object.'); + } + var year = originalGetUTCFullYear(this); + var month = originalGetUTCMonth(this); + var date = originalGetUTCDate(this); + if (year < 0 && month > 11) { + if (month === 12) { + return date; + } + var days = daysInMonth(0, year + 1); + return days - date + 1; + } + return date; + }, + }, + hasNegativeMonthYearBug, + ); + + defineProperties( + Date.prototype, + { + toUTCString: function toUTCString() { + if (!this || !(this instanceof Date)) { + throw new TypeError('this is not a Date object.'); + } + var day = originalGetUTCDay(this); + var date = originalGetUTCDate(this); + var month = originalGetUTCMonth(this); + var year = originalGetUTCFullYear(this); + var hour = originalGetUTCHours(this); + var minute = originalGetUTCMinutes(this); + var second = originalGetUTCSeconds(this); + return ( + dayName[day] + + ', ' + + (date < 10 ? '0' + date : date) + + ' ' + + monthName[month] + + ' ' + + year + + ' ' + + (hour < 10 ? '0' + hour : hour) + + ':' + + (minute < 10 ? '0' + minute : minute) + + ':' + + (second < 10 ? '0' + second : second) + + ' GMT' + ); + }, + }, + hasNegativeMonthYearBug || hasToUTCStringFormatBug, + ); + + // Opera 12 has `,` + defineProperties( + Date.prototype, + { + toDateString: function toDateString() { + if (!this || !(this instanceof Date)) { + throw new TypeError('this is not a Date object.'); + } + var day = this.getDay(); + var date = this.getDate(); + var month = this.getMonth(); + var year = this.getFullYear(); + return ( + dayName[day] + ' ' + monthName[month] + ' ' + (date < 10 ? '0' + date : date) + ' ' + year + ); + }, + }, + hasNegativeMonthYearBug || hasToDateStringFormatBug, + ); + + // can't use defineProperties here because of toString enumeration issue in IE <= 8 + if (hasNegativeMonthYearBug || hasToStringFormatBug) { + Date.prototype.toString = function toString() { + if (!this || !(this instanceof Date)) { + throw new TypeError('this is not a Date object.'); + } + var day = this.getDay(); + var date = this.getDate(); + var month = this.getMonth(); + var year = this.getFullYear(); + var hour = this.getHours(); + var minute = this.getMinutes(); + var second = this.getSeconds(); + var timezoneOffset = this.getTimezoneOffset(); + var hoursOffset = Math.floor(Math.abs(timezoneOffset) / 60); + var minutesOffset = Math.floor(Math.abs(timezoneOffset) % 60); + return ( + dayName[day] + + ' ' + + monthName[month] + + ' ' + + (date < 10 ? '0' + date : date) + + ' ' + + year + + ' ' + + (hour < 10 ? '0' + hour : hour) + + ':' + + (minute < 10 ? '0' + minute : minute) + + ':' + + (second < 10 ? '0' + second : second) + + ' GMT' + + (timezoneOffset > 0 ? '-' : '+') + + (hoursOffset < 10 ? '0' + hoursOffset : hoursOffset) + + (minutesOffset < 10 ? '0' + minutesOffset : minutesOffset) + ); + }; + if (supportsDescriptors) { + $Object.defineProperty(Date.prototype, 'toString', { + configurable: true, + enumerable: false, + writable: true, + }); + } + } + + // ES5 15.9.5.43 + // http://es5.github.com/#x15.9.5.43 + // This function returns a String value represent the instance in time + // represented by this Date object. The format of the String is the Date Time + // string format defined in 15.9.1.15. All fields are present in the String. + // The time zone is always UTC, denoted by the suffix Z. If the time value of + // this object is not a finite Number a RangeError exception is thrown. + var negativeDate = -62198755200000; + var negativeYearString = '-000001'; + var hasNegativeDateBug = + Date.prototype.toISOString && + new Date(negativeDate).toISOString().indexOf(negativeYearString) === -1; // eslint-disable-line max-len + var hasSafari51DateBug = + Date.prototype.toISOString && new Date(-1).toISOString() !== '1969-12-31T23:59:59.999Z'; + + var getTime = call.bind(Date.prototype.getTime); + + defineProperties( + Date.prototype, + { + toISOString: function toISOString() { + if (!isFinite(this) || !isFinite(getTime(this))) { + // Adope Photoshop requires the second check. + throw new RangeError('Date.prototype.toISOString called on non-finite value.'); + } + + var year = originalGetUTCFullYear(this); + + var month = originalGetUTCMonth(this); + // see https://github.com/es-shims/es5-shim/issues/111 + year += Math.floor(month / 12); + month = ((month % 12) + 12) % 12; + + // the date time string format is specified in 15.9.1.15. + var result = [ + month + 1, + originalGetUTCDate(this), + originalGetUTCHours(this), + originalGetUTCMinutes(this), + originalGetUTCSeconds(this), + ]; + year = + (year < 0 ? '-' : year > 9999 ? '+' : '') + + strSlice('00000' + Math.abs(year), 0 <= year && year <= 9999 ? -4 : -6); + + for (var i = 0; i < result.length; ++i) { + // pad months, days, hours, minutes, and seconds to have two digits. + result[i] = strSlice('00' + result[i], -2); + } + // pad milliseconds to have three digits. + return ( + year + + '-' + + arraySlice(result, 0, 2).join('-') + + 'T' + + arraySlice(result, 2).join(':') + + '.' + + strSlice('000' + originalGetUTCMilliseconds(this), -3) + + 'Z' + ); + }, + }, + hasNegativeDateBug || hasSafari51DateBug, + ); + + // ES5 15.9.5.44 + // http://es5.github.com/#x15.9.5.44 + // This function provides a String representation of a Date object for use by + // JSON.stringify (15.12.3). + var dateToJSONIsSupported = (function () { + try { + return ( + Date.prototype.toJSON && + new Date(NaN).toJSON() === null && + new Date(negativeDate).toJSON().indexOf(negativeYearString) !== -1 && + Date.prototype.toJSON.call({ + // generic + toISOString: function () { + return true; + }, + }) + ); + } catch (e) { + return false; + } + })(); + if (!dateToJSONIsSupported) { + Date.prototype.toJSON = function toJSON(key) { + // When the toJSON method is called with argument key, the following + // steps are taken: + + // 1. Let O be the result of calling ToObject, giving it the this + // value as its argument. + // 2. Let tv be ES.ToPrimitive(O, hint Number). + var O = $Object(this); + var tv = ES.ToPrimitive(O); + // 3. If tv is a Number and is not finite, return null. + if (typeof tv === 'number' && !isFinite(tv)) { + return null; + } + // 4. Let toISO be the result of calling the [[Get]] internal method of + // O with argument "toISOString". + var toISO = O.toISOString; + // 5. If IsCallable(toISO) is false, throw a TypeError exception. + if (!isCallable(toISO)) { + throw new TypeError('toISOString property is not callable'); + } + // 6. Return the result of calling the [[Call]] internal method of + // toISO with O as the this value and an empty argument list. + return toISO.call(O); + + // NOTE 1 The argument is ignored. + + // NOTE 2 The toJSON function is intentionally generic; it does not + // require that its this value be a Date object. Therefore, it can be + // transferred to other kinds of objects for use as a method. However, + // it does require that any such object have a toISOString method. An + // object is free to use the argument key to filter its + // stringification. + }; + } + + // ES5 15.9.4.2 + // http://es5.github.com/#x15.9.4.2 + // based on work shared by Daniel Friesen (dantman) + // http://gist.github.com/303249 + var supportsExtendedYears = Date.parse('+033658-09-27T01:46:40.000Z') === 1e15; + var acceptsInvalidDates = + !isNaN(Date.parse('2012-04-04T24:00:00.500Z')) || + !isNaN(Date.parse('2012-11-31T23:59:59.000Z')) || + !isNaN(Date.parse('2012-12-31T23:59:60.000Z')); + var doesNotParseY2KNewYear = isNaN(Date.parse('2000-01-01T00:00:00.000Z')); + if (doesNotParseY2KNewYear || acceptsInvalidDates || !supportsExtendedYears) { + // XXX global assignment won't work in embeddings that use + // an alternate object for the context. + /* global Date: true */ + var maxSafeUnsigned32Bit = Math.pow(2, 31) - 1; + var hasSafariSignedIntBug = isActualNaN( + new Date(1970, 0, 1, 0, 0, 0, maxSafeUnsigned32Bit + 1).getTime(), + ); + // eslint-disable-next-line no-implicit-globals, no-global-assign + Date = (function (NativeDate) { + // Date.length === 7 + var DateShim = function Date(Y, M, D, h, m, s, ms) { + var length = arguments.length; + var date; + if (this instanceof NativeDate) { + var seconds = s; + var millis = ms; + if (hasSafariSignedIntBug && length >= 7 && ms > maxSafeUnsigned32Bit) { + // work around a Safari 8/9 bug where it treats the seconds as signed + var msToShift = Math.floor(ms / maxSafeUnsigned32Bit) * maxSafeUnsigned32Bit; + var sToShift = Math.floor(msToShift / 1e3); + seconds += sToShift; + millis -= sToShift * 1e3; + } + date = + length === 1 && $String(Y) === Y // isString(Y) + ? // We explicitly pass it through parse: + new NativeDate(DateShim.parse(Y)) + : // We have to manually make calls depending on argument + // length here + length >= 7 + ? new NativeDate(Y, M, D, h, m, seconds, millis) + : length >= 6 + ? new NativeDate(Y, M, D, h, m, seconds) + : length >= 5 + ? new NativeDate(Y, M, D, h, m) + : length >= 4 + ? new NativeDate(Y, M, D, h) + : length >= 3 + ? new NativeDate(Y, M, D) + : length >= 2 + ? new NativeDate(Y, M) + : length >= 1 + ? new NativeDate(Y instanceof NativeDate ? +Y : Y) + : new NativeDate(); + } else { + date = NativeDate.apply(this, arguments); + } + if (!isPrimitive(date)) { + // Prevent mixups with unfixed Date object + defineProperties(date, { constructor: DateShim }, true); + } + return date; + }; + + // 15.9.1.15 Date Time String Format. + var isoDateExpression = new RegExp( + '^' + + '(\\d{4}|[+-]\\d{6})' + // four-digit year capture or sign + 6-digit extended year + '(?:-(\\d{2})' + // optional month capture + '(?:-(\\d{2})' + // optional day capture + '(?:' + // capture hours:minutes:seconds.milliseconds + 'T(\\d{2})' + // hours capture + ':(\\d{2})' + // minutes capture + '(?:' + // optional :seconds.milliseconds + ':(\\d{2})' + // seconds capture + '(?:(\\.\\d{1,}))?' + // milliseconds capture + ')?' + + '(' + // capture UTC offset component + 'Z|' + // UTC capture + '(?:' + // offset specifier +/-hours:minutes + '([-+])' + // sign capture + '(\\d{2})' + // hours offset capture + ':(\\d{2})' + // minutes offset capture + ')' + + ')?)?)?)?' + + '$', + ); + + var months = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365]; + + var dayFromMonth = function dayFromMonth(year, month) { + var t = month > 1 ? 1 : 0; + return ( + months[month] + + Math.floor((year - 1969 + t) / 4) - + Math.floor((year - 1901 + t) / 100) + + Math.floor((year - 1601 + t) / 400) + + 365 * (year - 1970) + ); + }; + + var toUTC = function toUTC(t) { + var s = 0; + var ms = t; + if (hasSafariSignedIntBug && ms > maxSafeUnsigned32Bit) { + // work around a Safari 8/9 bug where it treats the seconds as signed + var msToShift = Math.floor(ms / maxSafeUnsigned32Bit) * maxSafeUnsigned32Bit; + var sToShift = Math.floor(msToShift / 1e3); + s += sToShift; + ms -= sToShift * 1e3; + } + return $Number(new NativeDate(1970, 0, 1, 0, 0, s, ms)); + }; + + // Copy any custom methods a 3rd party library may have added + for (var key in NativeDate) { + if (owns(NativeDate, key)) { + DateShim[key] = NativeDate[key]; + } + } + + // Copy "native" methods explicitly; they may be non-enumerable + defineProperties( + DateShim, + { + now: NativeDate.now, + UTC: NativeDate.UTC, + }, + true, + ); + DateShim.prototype = NativeDate.prototype; + defineProperties(DateShim.prototype, { constructor: DateShim }, true); + + // Upgrade Date.parse to handle simplified ISO 8601 strings + var parseShim = function parse(string) { + var match = isoDateExpression.exec(string); + if (match) { + // parse months, days, hours, minutes, seconds, and milliseconds + // provide default values if necessary + // parse the UTC offset component + var year = $Number(match[1]), + month = $Number(match[2] || 1) - 1, + day = $Number(match[3] || 1) - 1, + hour = $Number(match[4] || 0), + minute = $Number(match[5] || 0), + second = $Number(match[6] || 0), + millisecond = Math.floor($Number(match[7] || 0) * 1000), + // When time zone is missed, local offset should be used + // (ES 5.1 bug) + // see https://bugs.ecmascript.org/show_bug.cgi?id=112 + isLocalTime = Boolean(match[4] && !match[8]), + signOffset = match[9] === '-' ? 1 : -1, + hourOffset = $Number(match[10] || 0), + minuteOffset = $Number(match[11] || 0), + result; + var hasMinutesOrSecondsOrMilliseconds = minute > 0 || second > 0 || millisecond > 0; + if ( + hour < (hasMinutesOrSecondsOrMilliseconds ? 24 : 25) && + minute < 60 && + second < 60 && + millisecond < 1000 && + month > -1 && + month < 12 && + hourOffset < 24 && + minuteOffset < 60 && // detect invalid offsets + day > -1 && + day < dayFromMonth(year, month + 1) - dayFromMonth(year, month) + ) { + result = ((dayFromMonth(year, month) + day) * 24 + hour + hourOffset * signOffset) * 60; + result = ((result + minute + minuteOffset * signOffset) * 60 + second) * 1000 + millisecond; + if (isLocalTime) { + result = toUTC(result); + } + if (-8.64e15 <= result && result <= 8.64e15) { + return result; + } + } + return NaN; + } + return NativeDate.parse.apply(this, arguments); + }; + defineProperties(DateShim, { parse: parseShim }); + + return DateShim; + })(Date); + /* global Date: false */ + } + + // ES5 15.9.4.4 + // http://es5.github.com/#x15.9.4.4 + if (!Date.now) { + Date.now = function now() { + return new Date().getTime(); + }; + } + + // + // Number + // ====== + // + + // ES5.1 15.7.4.5 + // http://es5.github.com/#x15.7.4.5 + var hasToFixedBugs = + NumberPrototype.toFixed && + ((0.00008).toFixed(3) !== '0.000' || + (0.9).toFixed(0) !== '1' || + (1.255).toFixed(2) !== '1.25' || + (1000000000000000128).toFixed(0) !== '1000000000000000128'); + + var toFixedHelpers = { + base: 1e7, + size: 6, + data: [0, 0, 0, 0, 0, 0], + multiply: function multiply(n, c) { + var i = -1; + var c2 = c; + while (++i < toFixedHelpers.size) { + c2 += n * toFixedHelpers.data[i]; + toFixedHelpers.data[i] = c2 % toFixedHelpers.base; + c2 = Math.floor(c2 / toFixedHelpers.base); + } + }, + divide: function divide(n) { + var i = toFixedHelpers.size; + var c = 0; + while (--i >= 0) { + c += toFixedHelpers.data[i]; + toFixedHelpers.data[i] = Math.floor(c / n); + c = (c % n) * toFixedHelpers.base; + } + }, + numToString: function numToString() { + var i = toFixedHelpers.size; + var s = ''; + while (--i >= 0) { + if (s !== '' || i === 0 || toFixedHelpers.data[i] !== 0) { + var t = $String(toFixedHelpers.data[i]); + if (s === '') { + s = t; + } else { + s += strSlice('0000000', 0, 7 - t.length) + t; + } + } + } + return s; + }, + pow: function pow(x, n, acc) { + return n === 0 ? acc : n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc); + }, + log: function log(x) { + var n = 0; + var x2 = x; + while (x2 >= 4096) { + n += 12; + x2 /= 4096; + } + while (x2 >= 2) { + n += 1; + x2 /= 2; + } + return n; + }, + }; + + var toFixedShim = function toFixed(fractionDigits) { + var f, x, s, m, e, z, j, k; + + // Test for NaN and round fractionDigits down + f = $Number(fractionDigits); + f = isActualNaN(f) ? 0 : Math.floor(f); + + if (f < 0 || f > 20) { + throw new RangeError('Number.toFixed called with invalid number of decimals'); + } + + x = $Number(this); + + if (isActualNaN(x)) { + return 'NaN'; + } + + // If it is too big or small, return the string value of the number + if (x <= -1e21 || x >= 1e21) { + return $String(x); + } + + s = ''; + + if (x < 0) { + s = '-'; + x = -x; + } + + m = '0'; + + if (x > 1e-21) { + // 1e-21 < x < 1e21 + // -70 < log2(x) < 70 + e = toFixedHelpers.log(x * toFixedHelpers.pow(2, 69, 1)) - 69; + z = e < 0 ? x * toFixedHelpers.pow(2, -e, 1) : x / toFixedHelpers.pow(2, e, 1); + z *= 0x10000000000000; // Math.pow(2, 52); + e = 52 - e; + + // -18 < e < 122 + // x = z / 2 ^ e + if (e > 0) { + toFixedHelpers.multiply(0, z); + j = f; + + while (j >= 7) { + toFixedHelpers.multiply(1e7, 0); + j -= 7; + } + + toFixedHelpers.multiply(toFixedHelpers.pow(10, j, 1), 0); + j = e - 1; + + while (j >= 23) { + toFixedHelpers.divide(1 << 23); + j -= 23; + } + + toFixedHelpers.divide(1 << j); + toFixedHelpers.multiply(1, 1); + toFixedHelpers.divide(2); + m = toFixedHelpers.numToString(); + } else { + toFixedHelpers.multiply(0, z); + toFixedHelpers.multiply(1 << -e, 0); + m = toFixedHelpers.numToString() + strSlice('0.00000000000000000000', 2, 2 + f); + } + } + + if (f > 0) { + k = m.length; + + if (k <= f) { + m = s + strSlice('0.0000000000000000000', 0, f - k + 2) + m; + } else { + m = s + strSlice(m, 0, k - f) + '.' + strSlice(m, k - f); + } + } else { + m = s + m; + } + + return m; + }; + defineProperties(NumberPrototype, { toFixed: toFixedShim }, hasToFixedBugs); + + var hasToPrecisionUndefinedBug = (function () { + try { + return (1.0).toPrecision(undefined) === '1'; + } catch (e) { + return true; + } + })(); + var originalToPrecision = NumberPrototype.toPrecision; + defineProperties( + NumberPrototype, + { + toPrecision: function toPrecision(precision) { + return typeof precision === 'undefined' + ? originalToPrecision.call(this) + : originalToPrecision.call(this, precision); + }, + }, + hasToPrecisionUndefinedBug, + ); + + // + // String + // ====== + // + + // ES5 15.5.4.14 + // http://es5.github.com/#x15.5.4.14 + + // [bugfix, IE lt 9, firefox 4, Konqueror, Opera, obscure browsers] + // Many browsers do not split properly with regular expressions or they + // do not perform the split correctly under obscure conditions. + // See http://blog.stevenlevithan.com/archives/cross-browser-split + // I've tested in many browsers and this seems to cover the deviant ones: + // 'ab'.split(/(?:ab)*/) should be ["", ""], not [""] + // '.'.split(/(.?)(.?)/) should be ["", ".", "", ""], not ["", ""] + // 'tesst'.split(/(s)*/) should be ["t", undefined, "e", "s", "t"], not + // [undefined, "t", undefined, "e", ...] + // ''.split(/.?/) should be [], not [""] + // '.'.split(/()()/) should be ["."], not ["", "", "."] + + if ( + 'ab'.split(/(?:ab)*/).length !== 2 || + '.'.split(/(.?)(.?)/).length !== 4 || + 'tesst'.split(/(s)*/)[1] === 't' || + 'test'.split(/(?:)/, -1).length !== 4 || + ''.split(/.?/).length || + '.'.split(/()()/).length > 1 + ) { + (function () { + var compliantExecNpcg = typeof /()??/.exec('')[1] === 'undefined'; // NPCG: nonparticipating capturing group + var maxSafe32BitInt = Math.pow(2, 32) - 1; + + StringPrototype.split = function (separator, limit) { + var string = String(this); + if (typeof separator === 'undefined' && limit === 0) { + return []; + } + + // If `separator` is not a regex, use native split + if (!isRegex(separator)) { + return strSplit(this, separator, limit); + } + + var output = []; + var flags = + (separator.ignoreCase ? 'i' : '') + + (separator.multiline ? 'm' : '') + + (separator.unicode ? 'u' : '') + // in ES6 + (separator.sticky ? 'y' : ''), // Firefox 3+ and ES6 + lastLastIndex = 0, + // Make `global` and avoid `lastIndex` issues by working with a copy + separator2, + match, + lastIndex, + lastLength; + var separatorCopy = new RegExp(separator.source, flags + 'g'); + if (!compliantExecNpcg) { + // Doesn't need flags gy, but they don't hurt + separator2 = new RegExp('^' + separatorCopy.source + '$(?!\\s)', flags); + } + /* Values for `limit`, per the spec: + * If undefined: 4294967295 // maxSafe32BitInt + * If 0, Infinity, or NaN: 0 + * If positive number: limit = Math.floor(limit); if (limit > 4294967295) limit -= 4294967296; + * If negative number: 4294967296 - Math.floor(Math.abs(limit)) + * If other: Type-convert, then use the above rules + */ + var splitLimit = typeof limit === 'undefined' ? maxSafe32BitInt : ES.ToUint32(limit); + match = separatorCopy.exec(string); + while (match) { + // `separatorCopy.lastIndex` is not reliable cross-browser + lastIndex = match.index + match[0].length; + if (lastIndex > lastLastIndex) { + pushCall(output, strSlice(string, lastLastIndex, match.index)); + // Fix browsers whose `exec` methods don't consistently return `undefined` for + // nonparticipating capturing groups + if (!compliantExecNpcg && match.length > 1) { + /* eslint-disable no-loop-func */ + match[0].replace(separator2, function () { + for (var i = 1; i < arguments.length - 2; i++) { + if (typeof arguments[i] === 'undefined') { + match[i] = void 0; + } + } + }); + /* eslint-enable no-loop-func */ + } + if (match.length > 1 && match.index < string.length) { + array_push.apply(output, arraySlice(match, 1)); + } + lastLength = match[0].length; + lastLastIndex = lastIndex; + if (output.length >= splitLimit) { + break; + } + } + if (separatorCopy.lastIndex === match.index) { + separatorCopy.lastIndex++; // Avoid an infinite loop + } + match = separatorCopy.exec(string); + } + if (lastLastIndex === string.length) { + if (lastLength || !separatorCopy.test('')) { + pushCall(output, ''); + } + } else { + pushCall(output, strSlice(string, lastLastIndex)); + } + return output.length > splitLimit ? arraySlice(output, 0, splitLimit) : output; + }; + })(); + + // [bugfix, chrome] + // If separator is undefined, then the result array contains just one String, + // which is the this value (converted to a String). If limit is not undefined, + // then the output array is truncated so that it contains no more than limit + // elements. + // "0".split(undefined, 0) -> [] + } else if ('0'.split(void 0, 0).length) { + StringPrototype.split = function split(separator, limit) { + if (typeof separator === 'undefined' && limit === 0) { + return []; + } + return strSplit(this, separator, limit); + }; + } + + var str_replace = StringPrototype.replace; + var replaceReportsGroupsCorrectly = (function () { + var groups = []; + 'x'.replace(/x(.)?/g, function (match, group) { + pushCall(groups, group); + }); + return groups.length === 1 && typeof groups[0] === 'undefined'; + })(); + + if (!replaceReportsGroupsCorrectly) { + StringPrototype.replace = function replace(searchValue, replaceValue) { + var isFn = isCallable(replaceValue); + var hasCapturingGroups = isRegex(searchValue) && /\)[*?]/.test(searchValue.source); + if (!isFn || !hasCapturingGroups) { + return str_replace.call(this, searchValue, replaceValue); + } else { + var wrappedReplaceValue = function (match) { + var length = arguments.length; + var originalLastIndex = searchValue.lastIndex; + searchValue.lastIndex = 0; + var args = searchValue.exec(match) || []; + searchValue.lastIndex = originalLastIndex; + pushCall(args, arguments[length - 2], arguments[length - 1]); + return replaceValue.apply(this, args); + }; + return str_replace.call(this, searchValue, wrappedReplaceValue); + } + }; + } + + // ECMA-262, 3rd B.2.3 + // Not an ECMAScript standard, although ECMAScript 3rd Edition has a + // non-normative section suggesting uniform semantics and it should be + // normalized across all browsers + // [bugfix, IE lt 9] IE < 9 substr() with negative value not working in IE + var string_substr = StringPrototype.substr; + var hasNegativeSubstrBug = ''.substr && '0b'.substr(-1) !== 'b'; + defineProperties( + StringPrototype, + { + substr: function substr(start, length) { + var normalizedStart = start; + if (start < 0) { + normalizedStart = max(this.length + start, 0); + } + return string_substr.call(this, normalizedStart, length); + }, + }, + hasNegativeSubstrBug, + ); + + // ES5 15.5.4.20 + // whitespace from: http://es5.github.io/#x15.5.4.20 + var ws = + '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' + + '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028' + + '\u2029\uFEFF'; + var zeroWidth = '\u200b'; + var wsRegexChars = '[' + ws + ']'; + var trimBeginRegexp = new RegExp('^' + wsRegexChars + wsRegexChars + '*'); + var trimEndRegexp = new RegExp(wsRegexChars + wsRegexChars + '*$'); + var hasTrimWhitespaceBug = StringPrototype.trim && (ws.trim() || !zeroWidth.trim()); + defineProperties( + StringPrototype, + { + // http://blog.stevenlevithan.com/archives/faster-trim-javascript + // http://perfectionkills.com/whitespace-deviations/ + trim: function trim() { + if (typeof this === 'undefined' || this === null) { + throw new TypeError("can't convert " + this + ' to object'); + } + return $String(this).replace(trimBeginRegexp, '').replace(trimEndRegexp, ''); + }, + }, + hasTrimWhitespaceBug, + ); + var trim = call.bind(String.prototype.trim); + + var hasLastIndexBug = StringPrototype.lastIndexOf && 'abcあい'.lastIndexOf('あい', 2) !== -1; + defineProperties( + StringPrototype, + { + lastIndexOf: function lastIndexOf(searchString) { + if (typeof this === 'undefined' || this === null) { + throw new TypeError("can't convert " + this + ' to object'); + } + var S = $String(this); + var searchStr = $String(searchString); + var numPos = arguments.length > 1 ? $Number(arguments[1]) : NaN; + var pos = isActualNaN(numPos) ? Infinity : ES.ToInteger(numPos); + var start = min(max(pos, 0), S.length); + var searchLen = searchStr.length; + var k = start + searchLen; + while (k > 0) { + k = max(0, k - searchLen); + var index = strIndexOf(strSlice(S, k, start + searchLen), searchStr); + if (index !== -1) { + return k + index; + } + } + return -1; + }, + }, + hasLastIndexBug, + ); + + var originalLastIndexOf = StringPrototype.lastIndexOf; + defineProperties( + StringPrototype, + { + lastIndexOf: function lastIndexOf(searchString) { + return originalLastIndexOf.apply(this, arguments); + }, + }, + StringPrototype.lastIndexOf.length !== 1, + ); + + // ES-5 15.1.2.2 + // eslint-disable-next-line radix + if (parseInt(ws + '08') !== 8 || parseInt(ws + '0x16') !== 22) { + /* global parseInt: true */ + parseInt = (function (origParseInt) { + var hexRegex = /^[-+]?0[xX]/; + return function parseInt(str, radix) { + if (typeof str === 'symbol') { + // handle Symbols in node 8.3/8.4 + // eslint-disable-next-line no-implicit-coercion, no-unused-expressions + '' + str; // jscs:ignore disallowImplicitTypeConversion + } + + var string = trim(String(str)); + var defaultedRadix = $Number(radix) || (hexRegex.test(string) ? 16 : 10); + return origParseInt(string, defaultedRadix); + }; + })(parseInt); + } + + // https://es5.github.io/#x15.1.2.3 + if (1 / parseFloat('-0') !== -Infinity) { + /* global parseFloat: true */ + parseFloat = (function (origParseFloat) { + return function parseFloat(string) { + var inputString = trim(String(string)); + var result = origParseFloat(inputString); + return result === 0 && strSlice(inputString, 0, 1) === '-' ? -0 : result; + }; + })(parseFloat); + } + + if (String(new RangeError('test')) !== 'RangeError: test') { + var errorToStringShim = function toString() { + if (typeof this === 'undefined' || this === null) { + throw new TypeError("can't convert " + this + ' to object'); + } + var name = this.name; + if (typeof name === 'undefined') { + name = 'Error'; + } else if (typeof name !== 'string') { + name = $String(name); + } + var msg = this.message; + if (typeof msg === 'undefined') { + msg = ''; + } else if (typeof msg !== 'string') { + msg = $String(msg); + } + if (!name) { + return msg; + } + if (!msg) { + return name; + } + return name + ': ' + msg; + }; + // can't use defineProperties here because of toString enumeration issue in IE <= 8 + Error.prototype.toString = errorToStringShim; + } + + if (supportsDescriptors) { + var ensureNonEnumerable = function (obj, prop) { + if (isEnum(obj, prop)) { + var desc = Object.getOwnPropertyDescriptor(obj, prop); + if (desc.configurable) { + desc.enumerable = false; + Object.defineProperty(obj, prop, desc); + } + } + }; + ensureNonEnumerable(Error.prototype, 'message'); + if (Error.prototype.message !== '') { + Error.prototype.message = ''; + } + ensureNonEnumerable(Error.prototype, 'name'); + } + + if (String(/a/gim) !== '/a/gim') { + var regexToString = function toString() { + var str = '/' + this.source + '/'; + if (this.global) { + str += 'g'; + } + if (this.ignoreCase) { + str += 'i'; + } + if (this.multiline) { + str += 'm'; + } + return str; + }; + // can't use defineProperties here because of toString enumeration issue in IE <= 8 + RegExp.prototype.toString = regexToString; + } + }); + + /***/ + }, + /* 472 */ + /***/ function (module, exports, __webpack_require__) { + var _Object$getOwnPropertyDescriptor = __webpack_require__(473); + + var _Object$defineProperty = __webpack_require__(476); + + var _typeof = __webpack_require__(479); + + var _WeakMap = __webpack_require__(498); + + function _getRequireWildcardCache() { + if (typeof _WeakMap !== 'function') return null; + var cache = new _WeakMap(); + + _getRequireWildcardCache = function _getRequireWildcardCache() { + return cache; + }; + + return cache; + } + + function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } + + if (obj === null || (_typeof(obj) !== 'object' && typeof obj !== 'function')) { + return { + default: obj, + }; + } + + var cache = _getRequireWildcardCache(); + + if (cache && cache.has(obj)) { + return cache.get(obj); + } + + var newObj = {}; + var hasPropertyDescriptor = _Object$defineProperty && _Object$getOwnPropertyDescriptor; + + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + var desc = hasPropertyDescriptor ? _Object$getOwnPropertyDescriptor(obj, key) : null; + + if (desc && (desc.get || desc.set)) { + _Object$defineProperty(newObj, key, desc); + } else { + newObj[key] = obj[key]; + } + } + } + + newObj['default'] = obj; + + if (cache) { + cache.set(obj, newObj); + } + + return newObj; + } + + module.exports = _interopRequireWildcard; + + /***/ + }, + /* 473 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = __webpack_require__(474); + + /***/ + }, + /* 474 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(475); + var $Object = __webpack_require__(13).Object; + module.exports = function getOwnPropertyDescriptor(it, key) { + return $Object.getOwnPropertyDescriptor(it, key); + }; + + /***/ + }, + /* 475 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) + var toIObject = __webpack_require__(61); + var $getOwnPropertyDescriptor = __webpack_require__(212).f; + + __webpack_require__(215)('getOwnPropertyDescriptor', function () { + return function getOwnPropertyDescriptor(it, key) { + return $getOwnPropertyDescriptor(toIObject(it), key); + }; + }); + + /***/ + }, + /* 476 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = __webpack_require__(477); + + /***/ + }, + /* 477 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(478); + var $Object = __webpack_require__(13).Object; + module.exports = function defineProperty(it, key, desc) { + return $Object.defineProperty(it, key, desc); + }; + + /***/ + }, + /* 478 */ + /***/ function (module, exports, __webpack_require__) { + var $export = __webpack_require__(36); + // 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes) + $export($export.S + $export.F * !__webpack_require__(28), 'Object', { + defineProperty: __webpack_require__(30).f, + }); + + /***/ + }, + /* 479 */ + /***/ function (module, exports, __webpack_require__) { + var _Symbol$iterator = __webpack_require__(480); + + var _Symbol = __webpack_require__(491); + + function _typeof(obj) { + '@babel/helpers - typeof'; + + if (typeof _Symbol === 'function' && typeof _Symbol$iterator === 'symbol') { + module.exports = _typeof = function _typeof(obj) { + return typeof obj; + }; + } else { + module.exports = _typeof = function _typeof(obj) { + return obj && + typeof _Symbol === 'function' && + obj.constructor === _Symbol && + obj !== _Symbol.prototype + ? 'symbol' + : typeof obj; + }; + } + + return _typeof(obj); + } + + module.exports = _typeof; + + /***/ + }, + /* 480 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = __webpack_require__(481); + + /***/ + }, + /* 481 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(144); + __webpack_require__(152); + module.exports = __webpack_require__(153).f('iterator'); + + /***/ + }, + /* 482 */ + /***/ function (module, exports, __webpack_require__) { + var toInteger = __webpack_require__(145); + var defined = __webpack_require__(142); + // true -> String#at + // false -> String#codePointAt + module.exports = function (TO_STRING) { + return function (that, pos) { + var s = String(defined(that)); + var i = toInteger(pos); + var l = s.length; + var a, b; + if (i < 0 || i >= l) return TO_STRING ? '' : undefined; + a = s.charCodeAt(i); + return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff + ? TO_STRING + ? s.charAt(i) + : a + : TO_STRING + ? s.slice(i, i + 2) + : ((a - 0xd800) << 10) + (b - 0xdc00) + 0x10000; + }; + }; + + /***/ + }, + /* 483 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var create = __webpack_require__(148); + var descriptor = __webpack_require__(79); + var setToStringTag = __webpack_require__(105); + var IteratorPrototype = {}; + + // 25.1.2.1.1 %IteratorPrototype%[@@iterator]() + __webpack_require__(46)(IteratorPrototype, __webpack_require__(22)('iterator'), function () { + return this; + }); + + module.exports = function (Constructor, NAME, next) { + Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) }); + setToStringTag(Constructor, NAME + ' Iterator'); + }; + + /***/ + }, + /* 484 */ + /***/ function (module, exports, __webpack_require__) { + var dP = __webpack_require__(30); + var anObject = __webpack_require__(63); + var getKeys = __webpack_require__(81); + + module.exports = __webpack_require__(28) + ? Object.defineProperties + : function defineProperties(O, Properties) { + anObject(O); + var keys = getKeys(Properties); + var length = keys.length; + var i = 0; + var P; + while (length > i) dP.f(O, (P = keys[i++]), Properties[P]); + return O; + }; + + /***/ + }, + /* 485 */ + /***/ function (module, exports, __webpack_require__) { + // false -> Array#indexOf + // true -> Array#includes + var toIObject = __webpack_require__(61); + var toLength = __webpack_require__(103); + var toAbsoluteIndex = __webpack_require__(486); + module.exports = function (IS_INCLUDES) { + return function ($this, el, fromIndex) { + var O = toIObject($this); + var length = toLength(O.length); + var index = toAbsoluteIndex(fromIndex, length); + var value; + // Array#includes uses SameValueZero equality algorithm + // eslint-disable-next-line no-self-compare + if (IS_INCLUDES && el != el) + while (length > index) { + value = O[index++]; + // eslint-disable-next-line no-self-compare + if (value != value) return true; + // Array#indexOf ignores holes, Array#includes - not + } + else + for (; length > index; index++) + if (IS_INCLUDES || index in O) { + if (O[index] === el) return IS_INCLUDES || index || 0; + } + return !IS_INCLUDES && -1; + }; + }; + + /***/ + }, + /* 486 */ + /***/ function (module, exports, __webpack_require__) { + var toInteger = __webpack_require__(145); + var max = Math.max; + var min = Math.min; + module.exports = function (index, length) { + index = toInteger(index); + return index < 0 ? max(index + length, 0) : min(index, length); + }; + + /***/ + }, + /* 487 */ + /***/ function (module, exports, __webpack_require__) { + var document = __webpack_require__(29).document; + module.exports = document && document.documentElement; + + /***/ + }, + /* 488 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) + var has = __webpack_require__(45); + var toObject = __webpack_require__(70); + var IE_PROTO = __webpack_require__(149)('IE_PROTO'); + var ObjectProto = Object.prototype; + + module.exports = + Object.getPrototypeOf || + function (O) { + O = toObject(O); + if (has(O, IE_PROTO)) return O[IE_PROTO]; + if (typeof O.constructor == 'function' && O instanceof O.constructor) { + return O.constructor.prototype; + } + return O instanceof Object ? ObjectProto : null; + }; + + /***/ + }, + /* 489 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var addToUnscopables = __webpack_require__(490); + var step = __webpack_require__(218); + var Iterators = __webpack_require__(80); + var toIObject = __webpack_require__(61); + + // 22.1.3.4 Array.prototype.entries() + // 22.1.3.13 Array.prototype.keys() + // 22.1.3.29 Array.prototype.values() + // 22.1.3.30 Array.prototype[@@iterator]() + module.exports = __webpack_require__(146)( + Array, + 'Array', + function (iterated, kind) { + this._t = toIObject(iterated); // target + this._i = 0; // next index + this._k = kind; // kind + // 22.1.5.2.1 %ArrayIteratorPrototype%.next() + }, + function () { + var O = this._t; + var kind = this._k; + var index = this._i++; + if (!O || index >= O.length) { + this._t = undefined; + return step(1); + } + if (kind == 'keys') return step(0, index); + if (kind == 'values') return step(0, O[index]); + return step(0, [index, O[index]]); + }, + 'values', + ); + + // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) + Iterators.Arguments = Iterators.Array; + + addToUnscopables('keys'); + addToUnscopables('values'); + addToUnscopables('entries'); + + /***/ + }, + /* 490 */ + /***/ function (module, exports) { + module.exports = function () { + /* empty */ + }; + + /***/ + }, + /* 491 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = __webpack_require__(492); + + /***/ + }, + /* 492 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(493); + __webpack_require__(156); + __webpack_require__(496); + __webpack_require__(497); + module.exports = __webpack_require__(13).Symbol; + + /***/ + }, + /* 493 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + // ECMAScript 6 symbols shim + var global = __webpack_require__(29); + var has = __webpack_require__(45); + var DESCRIPTORS = __webpack_require__(28); + var $export = __webpack_require__(36); + var redefine = __webpack_require__(147); + var META = __webpack_require__(82).KEY; + var $fails = __webpack_require__(62); + var shared = __webpack_require__(150); + var setToStringTag = __webpack_require__(105); + var uid = __webpack_require__(104); + var wks = __webpack_require__(22); + var wksExt = __webpack_require__(153); + var wksDefine = __webpack_require__(154); + var enumKeys = __webpack_require__(494); + var isArray = __webpack_require__(219); + var anObject = __webpack_require__(63); + var isObject = __webpack_require__(35); + var toObject = __webpack_require__(70); + var toIObject = __webpack_require__(61); + var toPrimitive = __webpack_require__(143); + var createDesc = __webpack_require__(79); + var _create = __webpack_require__(148); + var gOPNExt = __webpack_require__(495); + var $GOPD = __webpack_require__(212); + var $GOPS = __webpack_require__(155); + var $DP = __webpack_require__(30); + var $keys = __webpack_require__(81); + var gOPD = $GOPD.f; + var dP = $DP.f; + var gOPN = gOPNExt.f; + var $Symbol = global.Symbol; + var $JSON = global.JSON; + var _stringify = $JSON && $JSON.stringify; + var PROTOTYPE = 'prototype'; + var HIDDEN = wks('_hidden'); + var TO_PRIMITIVE = wks('toPrimitive'); + var isEnum = {}.propertyIsEnumerable; + var SymbolRegistry = shared('symbol-registry'); + var AllSymbols = shared('symbols'); + var OPSymbols = shared('op-symbols'); + var ObjectProto = Object[PROTOTYPE]; + var USE_NATIVE = typeof $Symbol == 'function' && !!$GOPS.f; + var QObject = global.QObject; + // Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173 + var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild; + + // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687 + var setSymbolDesc = + DESCRIPTORS && + $fails(function () { + return ( + _create( + dP({}, 'a', { + get: function () { + return dP(this, 'a', { value: 7 }).a; + }, + }), + ).a != 7 + ); + }) + ? function (it, key, D) { + var protoDesc = gOPD(ObjectProto, key); + if (protoDesc) delete ObjectProto[key]; + dP(it, key, D); + if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc); + } + : dP; + + var wrap = function (tag) { + var sym = (AllSymbols[tag] = _create($Symbol[PROTOTYPE])); + sym._k = tag; + return sym; + }; + + var isSymbol = + USE_NATIVE && typeof $Symbol.iterator == 'symbol' + ? function (it) { + return typeof it == 'symbol'; + } + : function (it) { + return it instanceof $Symbol; + }; + + var $defineProperty = function defineProperty(it, key, D) { + if (it === ObjectProto) $defineProperty(OPSymbols, key, D); + anObject(it); + key = toPrimitive(key, true); + anObject(D); + if (has(AllSymbols, key)) { + if (!D.enumerable) { + if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {})); + it[HIDDEN][key] = true; + } else { + if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false; + D = _create(D, { enumerable: createDesc(0, false) }); + } + return setSymbolDesc(it, key, D); + } + return dP(it, key, D); + }; + var $defineProperties = function defineProperties(it, P) { + anObject(it); + var keys = enumKeys((P = toIObject(P))); + var i = 0; + var l = keys.length; + var key; + while (l > i) $defineProperty(it, (key = keys[i++]), P[key]); + return it; + }; + var $create = function create(it, P) { + return P === undefined ? _create(it) : $defineProperties(_create(it), P); + }; + var $propertyIsEnumerable = function propertyIsEnumerable(key) { + var E = isEnum.call(this, (key = toPrimitive(key, true))); + if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false; + return E || !has(this, key) || !has(AllSymbols, key) || (has(this, HIDDEN) && this[HIDDEN][key]) + ? E + : true; + }; + var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) { + it = toIObject(it); + key = toPrimitive(key, true); + if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return; + var D = gOPD(it, key); + if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true; + return D; + }; + var $getOwnPropertyNames = function getOwnPropertyNames(it) { + var names = gOPN(toIObject(it)); + var result = []; + var i = 0; + var key; + while (names.length > i) { + if (!has(AllSymbols, (key = names[i++])) && key != HIDDEN && key != META) result.push(key); + } + return result; + }; + var $getOwnPropertySymbols = function getOwnPropertySymbols(it) { + var IS_OP = it === ObjectProto; + var names = gOPN(IS_OP ? OPSymbols : toIObject(it)); + var result = []; + var i = 0; + var key; + while (names.length > i) { + if (has(AllSymbols, (key = names[i++])) && (IS_OP ? has(ObjectProto, key) : true)) + result.push(AllSymbols[key]); + } + return result; + }; + + // 19.4.1.1 Symbol([description]) + if (!USE_NATIVE) { + $Symbol = function Symbol() { + if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!'); + var tag = uid(arguments.length > 0 ? arguments[0] : undefined); + var $set = function (value) { + if (this === ObjectProto) $set.call(OPSymbols, value); + if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false; + setSymbolDesc(this, tag, createDesc(1, value)); + }; + if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set }); + return wrap(tag); + }; + redefine($Symbol[PROTOTYPE], 'toString', function toString() { + return this._k; + }); + + $GOPD.f = $getOwnPropertyDescriptor; + $DP.f = $defineProperty; + __webpack_require__(220).f = gOPNExt.f = $getOwnPropertyNames; + __webpack_require__(101).f = $propertyIsEnumerable; + $GOPS.f = $getOwnPropertySymbols; + + if (DESCRIPTORS && !__webpack_require__(102)) { + redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true); + } + + wksExt.f = function (name) { + return wrap(wks(name)); + }; + } + + $export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol }); + + for ( + var es6Symbols = + // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14 + 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'.split( + ',', + ), + j = 0; + es6Symbols.length > j; + + ) + wks(es6Symbols[j++]); + + for (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k; ) + wksDefine(wellKnownSymbols[k++]); + + $export($export.S + $export.F * !USE_NATIVE, 'Symbol', { + // 19.4.2.1 Symbol.for(key) + for: function (key) { + return has(SymbolRegistry, (key += '')) + ? SymbolRegistry[key] + : (SymbolRegistry[key] = $Symbol(key)); + }, + // 19.4.2.5 Symbol.keyFor(sym) + keyFor: function keyFor(sym) { + if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!'); + for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key; + }, + useSetter: function () { + setter = true; + }, + useSimple: function () { + setter = false; + }, + }); + + $export($export.S + $export.F * !USE_NATIVE, 'Object', { + // 19.1.2.2 Object.create(O [, Properties]) + create: $create, + // 19.1.2.4 Object.defineProperty(O, P, Attributes) + defineProperty: $defineProperty, + // 19.1.2.3 Object.defineProperties(O, Properties) + defineProperties: $defineProperties, + // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) + getOwnPropertyDescriptor: $getOwnPropertyDescriptor, + // 19.1.2.7 Object.getOwnPropertyNames(O) + getOwnPropertyNames: $getOwnPropertyNames, + // 19.1.2.8 Object.getOwnPropertySymbols(O) + getOwnPropertySymbols: $getOwnPropertySymbols, + }); + + // Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives + // https://bugs.chromium.org/p/v8/issues/detail?id=3443 + var FAILS_ON_PRIMITIVES = $fails(function () { + $GOPS.f(1); + }); + + $export($export.S + $export.F * FAILS_ON_PRIMITIVES, 'Object', { + getOwnPropertySymbols: function getOwnPropertySymbols(it) { + return $GOPS.f(toObject(it)); + }, + }); + + // 24.3.2 JSON.stringify(value [, replacer [, space]]) + $JSON && + $export( + $export.S + + $export.F * + (!USE_NATIVE || + $fails(function () { + var S = $Symbol(); + // MS Edge converts symbol values to JSON as {} + // WebKit converts symbol values to JSON as null + // V8 throws on boxed symbols + return ( + _stringify([S]) != '[null]' || + _stringify({ a: S }) != '{}' || + _stringify(Object(S)) != '{}' + ); + })), + 'JSON', + { + stringify: function stringify(it) { + var args = [it]; + var i = 1; + var replacer, $replacer; + while (arguments.length > i) args.push(arguments[i++]); + $replacer = replacer = args[1]; + if ((!isObject(replacer) && it === undefined) || isSymbol(it)) return; // IE8 returns string on undefined + if (!isArray(replacer)) + replacer = function (key, value) { + if (typeof $replacer == 'function') value = $replacer.call(this, key, value); + if (!isSymbol(value)) return value; + }; + args[1] = replacer; + return _stringify.apply($JSON, args); + }, + }, + ); + + // 19.4.3.4 Symbol.prototype[@@toPrimitive](hint) + $Symbol[PROTOTYPE][TO_PRIMITIVE] || + __webpack_require__(46)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf); + // 19.4.3.5 Symbol.prototype[@@toStringTag] + setToStringTag($Symbol, 'Symbol'); + // 20.2.1.9 Math[@@toStringTag] + setToStringTag(Math, 'Math', true); + // 24.3.3 JSON[@@toStringTag] + setToStringTag(global.JSON, 'JSON', true); + + /***/ + }, + /* 494 */ + /***/ function (module, exports, __webpack_require__) { + // all enumerable object keys, includes symbols + var getKeys = __webpack_require__(81); + var gOPS = __webpack_require__(155); + var pIE = __webpack_require__(101); + module.exports = function (it) { + var result = getKeys(it); + var getSymbols = gOPS.f; + if (getSymbols) { + var symbols = getSymbols(it); + var isEnum = pIE.f; + var i = 0; + var key; + while (symbols.length > i) if (isEnum.call(it, (key = symbols[i++]))) result.push(key); + } + return result; + }; + + /***/ + }, + /* 495 */ + /***/ function (module, exports, __webpack_require__) { + // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window + var toIObject = __webpack_require__(61); + var gOPN = __webpack_require__(220).f; + var toString = {}.toString; + + var windowNames = + typeof window == 'object' && window && Object.getOwnPropertyNames + ? Object.getOwnPropertyNames(window) + : []; + + var getWindowNames = function (it) { + try { + return gOPN(it); + } catch (e) { + return windowNames.slice(); + } + }; + + module.exports.f = function getOwnPropertyNames(it) { + return windowNames && toString.call(it) == '[object Window]' + ? getWindowNames(it) + : gOPN(toIObject(it)); + }; + + /***/ + }, + /* 496 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(154)('asyncIterator'); + + /***/ + }, + /* 497 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(154)('observable'); + + /***/ + }, + /* 498 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = __webpack_require__(499); + + /***/ + }, + /* 499 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(156); + __webpack_require__(152); + __webpack_require__(500); + __webpack_require__(504); + __webpack_require__(505); + module.exports = __webpack_require__(13).WeakMap; + + /***/ + }, + /* 500 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var global = __webpack_require__(29); + var each = __webpack_require__(157)(0); + var redefine = __webpack_require__(147); + var meta = __webpack_require__(82); + var assign = __webpack_require__(221); + var weak = __webpack_require__(503); + var isObject = __webpack_require__(35); + var validate = __webpack_require__(84); + var NATIVE_WEAK_MAP = __webpack_require__(84); + var IS_IE11 = !global.ActiveXObject && 'ActiveXObject' in global; + var WEAK_MAP = 'WeakMap'; + var getWeak = meta.getWeak; + var isExtensible = Object.isExtensible; + var uncaughtFrozenStore = weak.ufstore; + var InternalMap; + + var wrapper = function (get) { + return function WeakMap() { + return get(this, arguments.length > 0 ? arguments[0] : undefined); + }; + }; + + var methods = { + // 23.3.3.3 WeakMap.prototype.get(key) + get: function get(key) { + if (isObject(key)) { + var data = getWeak(key); + if (data === true) return uncaughtFrozenStore(validate(this, WEAK_MAP)).get(key); + return data ? data[this._i] : undefined; + } + }, + // 23.3.3.5 WeakMap.prototype.set(key, value) + set: function set(key, value) { + return weak.def(validate(this, WEAK_MAP), key, value); + }, + }; + + // 23.3 WeakMap Objects + var $WeakMap = (module.exports = __webpack_require__(226)( + WEAK_MAP, + wrapper, + methods, + weak, + true, + true, + )); + + // IE11 WeakMap frozen keys fix + if (NATIVE_WEAK_MAP && IS_IE11) { + InternalMap = weak.getConstructor(wrapper, WEAK_MAP); + assign(InternalMap.prototype, methods); + meta.NEED = true; + each(['delete', 'has', 'get', 'set'], function (key) { + var proto = $WeakMap.prototype; + var method = proto[key]; + redefine(proto, key, function (a, b) { + // store frozen objects on internal weakmap shim + if (isObject(a) && !isExtensible(a)) { + if (!this._f) this._f = new InternalMap(); + var result = this._f[key](a, b); + return key == 'set' ? this : result; + // store all the rest on native weakmap + } + return method.call(this, a, b); + }); + }); + } + + /***/ + }, + /* 501 */ + /***/ function (module, exports, __webpack_require__) { + // 9.4.2.3 ArraySpeciesCreate(originalArray, length) + var speciesConstructor = __webpack_require__(502); + + module.exports = function (original, length) { + return new (speciesConstructor(original))(length); + }; + + /***/ + }, + /* 502 */ + /***/ function (module, exports, __webpack_require__) { + var isObject = __webpack_require__(35); + var isArray = __webpack_require__(219); + var SPECIES = __webpack_require__(22)('species'); + + module.exports = function (original) { + var C; + if (isArray(original)) { + C = original.constructor; + // cross-realm fallback + if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined; + if (isObject(C)) { + C = C[SPECIES]; + if (C === null) C = undefined; + } + } + return C === undefined ? Array : C; + }; + + /***/ + }, + /* 503 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var redefineAll = __webpack_require__(158); + var getWeak = __webpack_require__(82).getWeak; + var anObject = __webpack_require__(63); + var isObject = __webpack_require__(35); + var anInstance = __webpack_require__(159); + var forOf = __webpack_require__(83); + var createArrayMethod = __webpack_require__(157); + var $has = __webpack_require__(45); + var validate = __webpack_require__(84); + var arrayFind = createArrayMethod(5); + var arrayFindIndex = createArrayMethod(6); + var id = 0; + + // fallback for uncaught frozen keys + var uncaughtFrozenStore = function (that) { + return that._l || (that._l = new UncaughtFrozenStore()); + }; + var UncaughtFrozenStore = function () { + this.a = []; + }; + var findUncaughtFrozen = function (store, key) { + return arrayFind(store.a, function (it) { + return it[0] === key; + }); + }; + UncaughtFrozenStore.prototype = { + get: function (key) { + var entry = findUncaughtFrozen(this, key); + if (entry) return entry[1]; + }, + has: function (key) { + return !!findUncaughtFrozen(this, key); + }, + set: function (key, value) { + var entry = findUncaughtFrozen(this, key); + if (entry) entry[1] = value; + else this.a.push([key, value]); + }, + delete: function (key) { + var index = arrayFindIndex(this.a, function (it) { + return it[0] === key; + }); + if (~index) this.a.splice(index, 1); + return !!~index; + }, + }; + + module.exports = { + getConstructor: function (wrapper, NAME, IS_MAP, ADDER) { + var C = wrapper(function (that, iterable) { + anInstance(that, C, NAME, '_i'); + that._t = NAME; // collection type + that._i = id++; // collection id + that._l = undefined; // leak store for uncaught frozen objects + if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that); + }); + redefineAll(C.prototype, { + // 23.3.3.2 WeakMap.prototype.delete(key) + // 23.4.3.3 WeakSet.prototype.delete(value) + delete: function (key) { + if (!isObject(key)) return false; + var data = getWeak(key); + if (data === true) return uncaughtFrozenStore(validate(this, NAME))['delete'](key); + return data && $has(data, this._i) && delete data[this._i]; + }, + // 23.3.3.4 WeakMap.prototype.has(key) + // 23.4.3.4 WeakSet.prototype.has(value) + has: function has(key) { + if (!isObject(key)) return false; + var data = getWeak(key); + if (data === true) return uncaughtFrozenStore(validate(this, NAME)).has(key); + return data && $has(data, this._i); + }, + }); + return C; + }, + def: function (that, key, value) { + var data = getWeak(anObject(key), true); + if (data === true) uncaughtFrozenStore(that).set(key, value); + else data[that._i] = value; + return that; + }, + ufstore: uncaughtFrozenStore, + }; + + /***/ + }, + /* 504 */ + /***/ function (module, exports, __webpack_require__) { + // https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.of + __webpack_require__(227)('WeakMap'); + + /***/ + }, + /* 505 */ + /***/ function (module, exports, __webpack_require__) { + // https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.from + __webpack_require__(228)('WeakMap'); + + /***/ + }, + /* 506 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(507); + module.exports = __webpack_require__(13).Object.assign; + + /***/ + }, + /* 507 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.3.1 Object.assign(target, source) + var $export = __webpack_require__(36); + + $export($export.S + $export.F, 'Object', { assign: __webpack_require__(221) }); + + /***/ + }, + /* 508 */ + /***/ function (module, exports, __webpack_require__) { + var core = __webpack_require__(13); + var $JSON = core.JSON || (core.JSON = { stringify: JSON.stringify }); + module.exports = function stringify(it) { + // eslint-disable-line no-unused-vars + return $JSON.stringify.apply($JSON, arguments); + }; + + /***/ + }, + /* 509 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(510); + module.exports = __webpack_require__(13).Object.keys; + + /***/ + }, + /* 510 */ + /***/ function (module, exports, __webpack_require__) { + // 19.1.2.14 Object.keys(O) + var toObject = __webpack_require__(70); + var $keys = __webpack_require__(81); + + __webpack_require__(215)('keys', function () { + return function keys(it) { + return $keys(toObject(it)); + }; + }); + + /***/ + }, + /* 511 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** @license React v16.12.0 + * react-dom.development.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + + if (true) { + (function () { + 'use strict'; + + var React = __webpack_require__(1); + var _assign = __webpack_require__(64); + var Scheduler = __webpack_require__(513); + var checkPropTypes = __webpack_require__(107); + var tracing = __webpack_require__(515); + + // Do not require this module directly! Use normal `invariant` calls with + // template literal strings. The messages will be replaced with error codes + // during build. + + /** + * Use invariant() to assert state which your program assumes to be true. + * + * Provide sprintf-style format (only %s is supported) and arguments + * to provide information about what broke and what you were + * expecting. + * + * The invariant message will be stripped in production, but the invariant + * will remain to ensure logic does not differ in production. + */ + + if (!React) { + { + throw Error( + 'ReactDOM was loaded before React. Make sure you load the React package before loading ReactDOM.', + ); + } + } + + /** + * Injectable ordering of event plugins. + */ + var eventPluginOrder = null; + /** + * Injectable mapping from names to event plugin modules. + */ + + var namesToPlugins = {}; + /** + * Recomputes the plugin list using the injected plugins and plugin ordering. + * + * @private + */ + + function recomputePluginOrdering() { + if (!eventPluginOrder) { + // Wait until an `eventPluginOrder` is injected. + return; + } + + for (var pluginName in namesToPlugins) { + var pluginModule = namesToPlugins[pluginName]; + var pluginIndex = eventPluginOrder.indexOf(pluginName); + + if (!(pluginIndex > -1)) { + { + throw Error( + 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `' + + pluginName + + '`.', + ); + } + } + + if (plugins[pluginIndex]) { + continue; + } + + if (!pluginModule.extractEvents) { + { + throw Error( + 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `' + + pluginName + + '` does not.', + ); + } + } + + plugins[pluginIndex] = pluginModule; + var publishedEvents = pluginModule.eventTypes; + + for (var eventName in publishedEvents) { + if (!publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName)) { + { + throw Error( + 'EventPluginRegistry: Failed to publish event `' + + eventName + + '` for plugin `' + + pluginName + + '`.', + ); + } + } + } + } + } + /** + * Publishes an event so that it can be dispatched by the supplied plugin. + * + * @param {object} dispatchConfig Dispatch configuration for the event. + * @param {object} PluginModule Plugin publishing the event. + * @return {boolean} True if the event was successfully published. + * @private + */ + + function publishEventForPlugin(dispatchConfig, pluginModule, eventName) { + if (!!eventNameDispatchConfigs.hasOwnProperty(eventName)) { + { + throw Error( + 'EventPluginHub: More than one plugin attempted to publish the same event name, `' + + eventName + + '`.', + ); + } + } + + eventNameDispatchConfigs[eventName] = dispatchConfig; + var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames; + + if (phasedRegistrationNames) { + for (var phaseName in phasedRegistrationNames) { + if (phasedRegistrationNames.hasOwnProperty(phaseName)) { + var phasedRegistrationName = phasedRegistrationNames[phaseName]; + publishRegistrationName(phasedRegistrationName, pluginModule, eventName); + } + } + + return true; + } else if (dispatchConfig.registrationName) { + publishRegistrationName(dispatchConfig.registrationName, pluginModule, eventName); + return true; + } + + return false; + } + /** + * Publishes a registration name that is used to identify dispatched events. + * + * @param {string} registrationName Registration name to add. + * @param {object} PluginModule Plugin publishing the event. + * @private + */ + + function publishRegistrationName(registrationName, pluginModule, eventName) { + if (!!registrationNameModules[registrationName]) { + { + throw Error( + 'EventPluginHub: More than one plugin attempted to publish the same registration name, `' + + registrationName + + '`.', + ); + } + } + + registrationNameModules[registrationName] = pluginModule; + registrationNameDependencies[registrationName] = pluginModule.eventTypes[eventName].dependencies; + + { + var lowerCasedName = registrationName.toLowerCase(); + possibleRegistrationNames[lowerCasedName] = registrationName; + + if (registrationName === 'onDoubleClick') { + possibleRegistrationNames.ondblclick = registrationName; + } + } + } + /** + * Registers plugins so that they can extract and dispatch events. + * + * @see {EventPluginHub} + */ + + /** + * Ordered list of injected plugins. + */ + + var plugins = []; + /** + * Mapping from event name to dispatch config + */ + + var eventNameDispatchConfigs = {}; + /** + * Mapping from registration name to plugin module + */ + + var registrationNameModules = {}; + /** + * Mapping from registration name to event name + */ + + var registrationNameDependencies = {}; + /** + * Mapping from lowercase registration names to the properly cased version, + * used to warn in the case of missing event handlers. Available + * only in true. + * @type {Object} + */ + + var possibleRegistrationNames = {}; // Trust the developer to only use possibleRegistrationNames in true + + /** + * Injects an ordering of plugins (by plugin name). This allows the ordering + * to be decoupled from injection of the actual plugins so that ordering is + * always deterministic regardless of packaging, on-the-fly injection, etc. + * + * @param {array} InjectedEventPluginOrder + * @internal + * @see {EventPluginHub.injection.injectEventPluginOrder} + */ + + function injectEventPluginOrder(injectedEventPluginOrder) { + if (!!eventPluginOrder) { + { + throw Error( + 'EventPluginRegistry: Cannot inject event plugin ordering more than once. You are likely trying to load more than one copy of React.', + ); + } + } // Clone the ordering so it cannot be dynamically mutated. + + eventPluginOrder = Array.prototype.slice.call(injectedEventPluginOrder); + recomputePluginOrdering(); + } + /** + * Injects plugins to be used by `EventPluginHub`. The plugin names must be + * in the ordering injected by `injectEventPluginOrder`. + * + * Plugins can be injected as part of page initialization or on-the-fly. + * + * @param {object} injectedNamesToPlugins Map from names to plugin modules. + * @internal + * @see {EventPluginHub.injection.injectEventPluginsByName} + */ + + function injectEventPluginsByName(injectedNamesToPlugins) { + var isOrderingDirty = false; + + for (var pluginName in injectedNamesToPlugins) { + if (!injectedNamesToPlugins.hasOwnProperty(pluginName)) { + continue; + } + + var pluginModule = injectedNamesToPlugins[pluginName]; + + if (!namesToPlugins.hasOwnProperty(pluginName) || namesToPlugins[pluginName] !== pluginModule) { + if (!!namesToPlugins[pluginName]) { + { + throw Error( + 'EventPluginRegistry: Cannot inject two different event plugins using the same name, `' + + pluginName + + '`.', + ); + } + } + + namesToPlugins[pluginName] = pluginModule; + isOrderingDirty = true; + } + } + + if (isOrderingDirty) { + recomputePluginOrdering(); + } + } + + var invokeGuardedCallbackImpl = function (name, func, context, a, b, c, d, e, f) { + var funcArgs = Array.prototype.slice.call(arguments, 3); + + try { + func.apply(context, funcArgs); + } catch (error) { + this.onError(error); + } + }; + + { + // In DEV mode, we swap out invokeGuardedCallback for a special version + // that plays more nicely with the browser's DevTools. The idea is to preserve + // "Pause on exceptions" behavior. Because React wraps all user-provided + // functions in invokeGuardedCallback, and the production version of + // invokeGuardedCallback uses a try-catch, all user exceptions are treated + // like caught exceptions, and the DevTools won't pause unless the developer + // takes the extra step of enabling pause on caught exceptions. This is + // unintuitive, though, because even though React has caught the error, from + // the developer's perspective, the error is uncaught. + // + // To preserve the expected "Pause on exceptions" behavior, we don't use a + // try-catch in DEV. Instead, we synchronously dispatch a fake event to a fake + // DOM node, and call the user-provided callback from inside an event handler + // for that fake event. If the callback throws, the error is "captured" using + // a global event handler. But because the error happens in a different + // event loop context, it does not interrupt the normal program flow. + // Effectively, this gives us try-catch behavior without actually using + // try-catch. Neat! + // Check that the browser supports the APIs we need to implement our special + // DEV version of invokeGuardedCallback + if ( + typeof window !== 'undefined' && + typeof window.dispatchEvent === 'function' && + typeof document !== 'undefined' && + typeof document.createEvent === 'function' + ) { + var fakeNode = document.createElement('react'); + + var invokeGuardedCallbackDev = function (name, func, context, a, b, c, d, e, f) { + // If document doesn't exist we know for sure we will crash in this method + // when we call document.createEvent(). However this can cause confusing + // errors: https://github.com/facebookincubator/create-react-app/issues/3482 + // So we preemptively throw with a better message instead. + if (!(typeof document !== 'undefined')) { + { + throw Error( + 'The `document` global was defined when React was initialized, but is not defined anymore. This can happen in a test environment if a component schedules an update from an asynchronous callback, but the test has already finished running. To solve this, you can either unmount the component at the end of your test (and ensure that any asynchronous operations get canceled in `componentWillUnmount`), or you can change the test itself to be asynchronous.', + ); + } + } + + var evt = document.createEvent('Event'); // Keeps track of whether the user-provided callback threw an error. We + // set this to true at the beginning, then set it to false right after + // calling the function. If the function errors, `didError` will never be + // set to false. This strategy works even if the browser is flaky and + // fails to call our global error handler, because it doesn't rely on + // the error event at all. + + var didError = true; // Keeps track of the value of window.event so that we can reset it + // during the callback to let user code access window.event in the + // browsers that support it. + + var windowEvent = window.event; // Keeps track of the descriptor of window.event to restore it after event + // dispatching: https://github.com/facebook/react/issues/13688 + + var windowEventDescriptor = Object.getOwnPropertyDescriptor(window, 'event'); // Create an event handler for our fake event. We will synchronously + // dispatch our fake event using `dispatchEvent`. Inside the handler, we + // call the user-provided callback. + + var funcArgs = Array.prototype.slice.call(arguments, 3); + + function callCallback() { + // We immediately remove the callback from event listeners so that + // nested `invokeGuardedCallback` calls do not clash. Otherwise, a + // nested call would trigger the fake event handlers of any call higher + // in the stack. + fakeNode.removeEventListener(evtType, callCallback, false); // We check for window.hasOwnProperty('event') to prevent the + // window.event assignment in both IE <= 10 as they throw an error + // "Member not found" in strict mode, and in Firefox which does not + // support window.event. + + if (typeof window.event !== 'undefined' && window.hasOwnProperty('event')) { + window.event = windowEvent; + } + + func.apply(context, funcArgs); + didError = false; + } // Create a global error event handler. We use this to capture the value + // that was thrown. It's possible that this error handler will fire more + // than once; for example, if non-React code also calls `dispatchEvent` + // and a handler for that event throws. We should be resilient to most of + // those cases. Even if our error event handler fires more than once, the + // last error event is always used. If the callback actually does error, + // we know that the last error event is the correct one, because it's not + // possible for anything else to have happened in between our callback + // erroring and the code that follows the `dispatchEvent` call below. If + // the callback doesn't error, but the error event was fired, we know to + // ignore it because `didError` will be false, as described above. + + var error; // Use this to track whether the error event is ever called. + + var didSetError = false; + var isCrossOriginError = false; + + function handleWindowError(event) { + error = event.error; + didSetError = true; + + if (error === null && event.colno === 0 && event.lineno === 0) { + isCrossOriginError = true; + } + + if (event.defaultPrevented) { + // Some other error handler has prevented default. + // Browsers silence the error report if this happens. + // We'll remember this to later decide whether to log it or not. + if (error != null && typeof error === 'object') { + try { + error._suppressLogging = true; + } catch (inner) { + // Ignore. + } + } + } + } // Create a fake event type. + + var evtType = 'react-' + (name ? name : 'invokeguardedcallback'); // Attach our event handlers + + window.addEventListener('error', handleWindowError); + fakeNode.addEventListener(evtType, callCallback, false); // Synchronously dispatch our fake event. If the user-provided function + // errors, it will trigger our global error handler. + + evt.initEvent(evtType, false, false); + fakeNode.dispatchEvent(evt); + + if (windowEventDescriptor) { + Object.defineProperty(window, 'event', windowEventDescriptor); + } + + if (didError) { + if (!didSetError) { + // The callback errored, but the error event never fired. + error = new Error( + 'An error was thrown inside one of your components, but React ' + + "doesn't know what it was. This is likely due to browser " + + 'flakiness. React does its best to preserve the "Pause on ' + + 'exceptions" behavior of the DevTools, which requires some ' + + "DEV-mode only tricks. It's possible that these don't work in " + + 'your browser. Try triggering the error in production mode, ' + + 'or switching to a modern browser. If you suspect that this is ' + + 'actually an issue with React, please file an issue.', + ); + } else if (isCrossOriginError) { + error = new Error( + "A cross-origin error was thrown. React doesn't have access to " + + 'the actual error object in development. ' + + 'See https://fb.me/react-crossorigin-error for more information.', + ); + } + + this.onError(error); + } // Remove our event listeners + + window.removeEventListener('error', handleWindowError); + }; + + invokeGuardedCallbackImpl = invokeGuardedCallbackDev; + } + } + + var invokeGuardedCallbackImpl$1 = invokeGuardedCallbackImpl; + + var hasError = false; + var caughtError = null; // Used by event system to capture/rethrow the first error. + + var hasRethrowError = false; + var rethrowError = null; + var reporter = { + onError: function (error) { + hasError = true; + caughtError = error; + }, + }; + /** + * Call a function while guarding against errors that happens within it. + * Returns an error if it throws, otherwise null. + * + * In production, this is implemented using a try-catch. The reason we don't + * use a try-catch directly is so that we can swap out a different + * implementation in DEV mode. + * + * @param {String} name of the guard to use for logging or debugging + * @param {Function} func The function to invoke + * @param {*} context The context to use when calling the function + * @param {...*} args Arguments for function + */ + + function invokeGuardedCallback(name, func, context, a, b, c, d, e, f) { + hasError = false; + caughtError = null; + invokeGuardedCallbackImpl$1.apply(reporter, arguments); + } + /** + * Same as invokeGuardedCallback, but instead of returning an error, it stores + * it in a global so it can be rethrown by `rethrowCaughtError` later. + * TODO: See if caughtError and rethrowError can be unified. + * + * @param {String} name of the guard to use for logging or debugging + * @param {Function} func The function to invoke + * @param {*} context The context to use when calling the function + * @param {...*} args Arguments for function + */ + + function invokeGuardedCallbackAndCatchFirstError(name, func, context, a, b, c, d, e, f) { + invokeGuardedCallback.apply(this, arguments); + + if (hasError) { + var error = clearCaughtError(); + + if (!hasRethrowError) { + hasRethrowError = true; + rethrowError = error; + } + } + } + /** + * During execution of guarded functions we will capture the first error which + * we will rethrow to be handled by the top level error handler. + */ + + function rethrowCaughtError() { + if (hasRethrowError) { + var error = rethrowError; + hasRethrowError = false; + rethrowError = null; + throw error; + } + } + function hasCaughtError() { + return hasError; + } + function clearCaughtError() { + if (hasError) { + var error = caughtError; + hasError = false; + caughtError = null; + return error; + } else { + { + { + throw Error( + 'clearCaughtError was called but no error was captured. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + } + } + + /** + * Similar to invariant but only logs a warning if the condition is not met. + * This can be used to log issues in development environments in critical + * paths. Removing the logging code for production environments will keep the + * same logic and follow the same code paths. + */ + var warningWithoutStack = function () {}; + + { + warningWithoutStack = function (condition, format) { + for ( + var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; + _key < _len; + _key++ + ) { + args[_key - 2] = arguments[_key]; + } + + if (format === undefined) { + throw new Error( + '`warningWithoutStack(condition, format, ...args)` requires a warning ' + + 'message argument', + ); + } + + if (args.length > 8) { + // Check before the condition to catch violations early. + throw new Error('warningWithoutStack() currently supports at most 8 arguments.'); + } + + if (condition) { + return; + } + + if (typeof console !== 'undefined') { + var argsWithFormat = args.map(function (item) { + return '' + item; + }); + argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it + // breaks IE9: https://github.com/facebook/react/issues/13610 + + Function.prototype.apply.call(console.error, console, argsWithFormat); + } + + try { + // --- Welcome to debugging React --- + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + var argIndex = 0; + var message = + 'Warning: ' + + format.replace(/%s/g, function () { + return args[argIndex++]; + }); + throw new Error(message); + } catch (x) {} + }; + } + + var warningWithoutStack$1 = warningWithoutStack; + + var getFiberCurrentPropsFromNode = null; + var getInstanceFromNode = null; + var getNodeFromInstance = null; + function setComponentTree( + getFiberCurrentPropsFromNodeImpl, + getInstanceFromNodeImpl, + getNodeFromInstanceImpl, + ) { + getFiberCurrentPropsFromNode = getFiberCurrentPropsFromNodeImpl; + getInstanceFromNode = getInstanceFromNodeImpl; + getNodeFromInstance = getNodeFromInstanceImpl; + + { + !(getNodeFromInstance && getInstanceFromNode) + ? warningWithoutStack$1( + false, + 'EventPluginUtils.setComponentTree(...): Injected ' + + 'module is missing getNodeFromInstance or getInstanceFromNode.', + ) + : void 0; + } + } + var validateEventDispatches; + + { + validateEventDispatches = function (event) { + var dispatchListeners = event._dispatchListeners; + var dispatchInstances = event._dispatchInstances; + var listenersIsArr = Array.isArray(dispatchListeners); + var listenersLen = listenersIsArr ? dispatchListeners.length : dispatchListeners ? 1 : 0; + var instancesIsArr = Array.isArray(dispatchInstances); + var instancesLen = instancesIsArr ? dispatchInstances.length : dispatchInstances ? 1 : 0; + !(instancesIsArr === listenersIsArr && instancesLen === listenersLen) + ? warningWithoutStack$1(false, 'EventPluginUtils: Invalid `event`.') + : void 0; + }; + } + /** + * Dispatch the event to the listener. + * @param {SyntheticEvent} event SyntheticEvent to handle + * @param {function} listener Application-level callback + * @param {*} inst Internal component instance + */ + + function executeDispatch(event, listener, inst) { + var type = event.type || 'unknown-event'; + event.currentTarget = getNodeFromInstance(inst); + invokeGuardedCallbackAndCatchFirstError(type, listener, undefined, event); + event.currentTarget = null; + } + /** + * Standard/simple iteration through an event's collected dispatches. + */ + + function executeDispatchesInOrder(event) { + var dispatchListeners = event._dispatchListeners; + var dispatchInstances = event._dispatchInstances; + + { + validateEventDispatches(event); + } + + if (Array.isArray(dispatchListeners)) { + for (var i = 0; i < dispatchListeners.length; i++) { + if (event.isPropagationStopped()) { + break; + } // Listeners and Instances are two parallel arrays that are always in sync. + + executeDispatch(event, dispatchListeners[i], dispatchInstances[i]); + } + } else if (dispatchListeners) { + executeDispatch(event, dispatchListeners, dispatchInstances); + } + + event._dispatchListeners = null; + event._dispatchInstances = null; + } + /** + * @see executeDispatchesInOrderStopAtTrueImpl + */ + + /** + * Execution of a "direct" dispatch - there must be at most one dispatch + * accumulated on the event or it is considered an error. It doesn't really make + * sense for an event with multiple dispatches (bubbled) to keep track of the + * return values at each dispatch execution, but it does tend to make sense when + * dealing with "direct" dispatches. + * + * @return {*} The return value of executing the single dispatch. + */ + + /** + * @param {SyntheticEvent} event + * @return {boolean} True iff number of dispatches accumulated is greater than 0. + */ + + /** + * Accumulates items that must not be null or undefined into the first one. This + * is used to conserve memory by avoiding array allocations, and thus sacrifices + * API cleanness. Since `current` can be null before being passed in and not + * null after this function, make sure to assign it back to `current`: + * + * `a = accumulateInto(a, b);` + * + * This API should be sparingly used. Try `accumulate` for something cleaner. + * + * @return {*|array<*>} An accumulation of items. + */ + + function accumulateInto(current, next) { + if (!(next != null)) { + { + throw Error('accumulateInto(...): Accumulated items must not be null or undefined.'); + } + } + + if (current == null) { + return next; + } // Both are not empty. Warning: Never call x.concat(y) when you are not + // certain that x is an Array (x could be a string with concat method). + + if (Array.isArray(current)) { + if (Array.isArray(next)) { + current.push.apply(current, next); + return current; + } + + current.push(next); + return current; + } + + if (Array.isArray(next)) { + // A bit too dangerous to mutate `next`. + return [current].concat(next); + } + + return [current, next]; + } + + /** + * @param {array} arr an "accumulation" of items which is either an Array or + * a single item. Useful when paired with the `accumulate` module. This is a + * simple utility that allows us to reason about a collection of items, but + * handling the case when there is exactly one item (and we do not need to + * allocate an array). + * @param {function} cb Callback invoked with each element or a collection. + * @param {?} [scope] Scope used as `this` in a callback. + */ + function forEachAccumulated(arr, cb, scope) { + if (Array.isArray(arr)) { + arr.forEach(cb, scope); + } else if (arr) { + cb.call(scope, arr); + } + } + + /** + * Internal queue of events that have accumulated their dispatches and are + * waiting to have their dispatches executed. + */ + + var eventQueue = null; + /** + * Dispatches an event and releases it back into the pool, unless persistent. + * + * @param {?object} event Synthetic event to be dispatched. + * @private + */ + + var executeDispatchesAndRelease = function (event) { + if (event) { + executeDispatchesInOrder(event); + + if (!event.isPersistent()) { + event.constructor.release(event); + } + } + }; + + var executeDispatchesAndReleaseTopLevel = function (e) { + return executeDispatchesAndRelease(e); + }; + + function runEventsInBatch(events) { + if (events !== null) { + eventQueue = accumulateInto(eventQueue, events); + } // Set `eventQueue` to null before processing it so that we can tell if more + // events get enqueued while processing. + + var processingEventQueue = eventQueue; + eventQueue = null; + + if (!processingEventQueue) { + return; + } + + forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseTopLevel); + + if (!!eventQueue) { + { + throw Error( + 'processEventQueue(): Additional events were enqueued while processing an event queue. Support for this has not yet been implemented.', + ); + } + } // This would be a good time to rethrow if any of the event handlers threw. + + rethrowCaughtError(); + } + + function isInteractive(tag) { + return tag === 'button' || tag === 'input' || tag === 'select' || tag === 'textarea'; + } + + function shouldPreventMouseEvent(name, type, props) { + switch (name) { + case 'onClick': + case 'onClickCapture': + case 'onDoubleClick': + case 'onDoubleClickCapture': + case 'onMouseDown': + case 'onMouseDownCapture': + case 'onMouseMove': + case 'onMouseMoveCapture': + case 'onMouseUp': + case 'onMouseUpCapture': + return !!(props.disabled && isInteractive(type)); + + default: + return false; + } + } + /** + * This is a unified interface for event plugins to be installed and configured. + * + * Event plugins can implement the following properties: + * + * `extractEvents` {function(string, DOMEventTarget, string, object): *} + * Required. When a top-level event is fired, this method is expected to + * extract synthetic events that will in turn be queued and dispatched. + * + * `eventTypes` {object} + * Optional, plugins that fire events must publish a mapping of registration + * names that are used to register listeners. Values of this mapping must + * be objects that contain `registrationName` or `phasedRegistrationNames`. + * + * `executeDispatch` {function(object, function, string)} + * Optional, allows plugins to override how an event gets dispatched. By + * default, the listener is simply invoked. + * + * Each plugin that is injected into `EventsPluginHub` is immediately operable. + * + * @public + */ + + /** + * Methods for injecting dependencies. + */ + + var injection = { + /** + * @param {array} InjectedEventPluginOrder + * @public + */ + injectEventPluginOrder: injectEventPluginOrder, + + /** + * @param {object} injectedNamesToPlugins Map from names to plugin modules. + */ + injectEventPluginsByName: injectEventPluginsByName, + }; + /** + * @param {object} inst The instance, which is the source of events. + * @param {string} registrationName Name of listener (e.g. `onClick`). + * @return {?function} The stored callback. + */ + + function getListener(inst, registrationName) { + var listener; // TODO: shouldPreventMouseEvent is DOM-specific and definitely should not + // live here; needs to be moved to a better place soon + + var stateNode = inst.stateNode; + + if (!stateNode) { + // Work in progress (ex: onload events in incremental mode). + return null; + } + + var props = getFiberCurrentPropsFromNode(stateNode); + + if (!props) { + // Work in progress. + return null; + } + + listener = props[registrationName]; + + if (shouldPreventMouseEvent(registrationName, inst.type, props)) { + return null; + } + + if (!(!listener || typeof listener === 'function')) { + { + throw Error( + 'Expected `' + + registrationName + + '` listener to be a function, instead got a value of `' + + typeof listener + + '` type.', + ); + } + } + + return listener; + } + /** + * Allows registered plugins an opportunity to extract events from top-level + * native browser events. + * + * @return {*} An accumulation of synthetic events. + * @internal + */ + + function extractPluginEvents( + topLevelType, + targetInst, + nativeEvent, + nativeEventTarget, + eventSystemFlags, + ) { + var events = null; + + for (var i = 0; i < plugins.length; i++) { + // Not every plugin in the ordering may be loaded at runtime. + var possiblePlugin = plugins[i]; + + if (possiblePlugin) { + var extractedEvents = possiblePlugin.extractEvents( + topLevelType, + targetInst, + nativeEvent, + nativeEventTarget, + eventSystemFlags, + ); + + if (extractedEvents) { + events = accumulateInto(events, extractedEvents); + } + } + } + + return events; + } + + function runExtractedPluginEventsInBatch( + topLevelType, + targetInst, + nativeEvent, + nativeEventTarget, + eventSystemFlags, + ) { + var events = extractPluginEvents( + topLevelType, + targetInst, + nativeEvent, + nativeEventTarget, + eventSystemFlags, + ); + runEventsInBatch(events); + } + + var FunctionComponent = 0; + var ClassComponent = 1; + var IndeterminateComponent = 2; // Before we know whether it is function or class + + var HostRoot = 3; // Root of a host tree. Could be nested inside another node. + + var HostPortal = 4; // A subtree. Could be an entry point to a different renderer. + + var HostComponent = 5; + var HostText = 6; + var Fragment = 7; + var Mode = 8; + var ContextConsumer = 9; + var ContextProvider = 10; + var ForwardRef = 11; + var Profiler = 12; + var SuspenseComponent = 13; + var MemoComponent = 14; + var SimpleMemoComponent = 15; + var LazyComponent = 16; + var IncompleteClassComponent = 17; + var DehydratedFragment = 18; + var SuspenseListComponent = 19; + var FundamentalComponent = 20; + var ScopeComponent = 21; + + var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; // Prevent newer renderers from RTE when used with older react package versions. + // Current owner and dispatcher used to share the same ref, + // but PR #14548 split them out to better support the react-debug-tools package. + + if (!ReactSharedInternals.hasOwnProperty('ReactCurrentDispatcher')) { + ReactSharedInternals.ReactCurrentDispatcher = { + current: null, + }; + } + + if (!ReactSharedInternals.hasOwnProperty('ReactCurrentBatchConfig')) { + ReactSharedInternals.ReactCurrentBatchConfig = { + suspense: null, + }; + } + + var BEFORE_SLASH_RE = /^(.*)[\\\/]/; + var describeComponentFrame = function (name, source, ownerName) { + var sourceInfo = ''; + + if (source) { + var path = source.fileName; + var fileName = path.replace(BEFORE_SLASH_RE, ''); + + { + // In DEV, include code for a common special case: + // prefer "folder/index.js" instead of just "index.js". + if (/^index\./.test(fileName)) { + var match = path.match(BEFORE_SLASH_RE); + + if (match) { + var pathBeforeSlash = match[1]; + + if (pathBeforeSlash) { + var folderName = pathBeforeSlash.replace(BEFORE_SLASH_RE, ''); + fileName = folderName + '/' + fileName; + } + } + } + } + + sourceInfo = ' (at ' + fileName + ':' + source.lineNumber + ')'; + } else if (ownerName) { + sourceInfo = ' (created by ' + ownerName + ')'; + } + + return '\n in ' + (name || 'Unknown') + sourceInfo; + }; + + // The Symbol used to tag the ReactElement-like types. If there is no native Symbol + // nor polyfill, then a plain number is used for performance. + var hasSymbol = typeof Symbol === 'function' && Symbol.for; + var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7; + var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca; + var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb; + var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc; + var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2; + var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd; + var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary + // (unstable) APIs that have been removed. Can we remove the symbols? + + var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf; + var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0; + var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1; + var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8; + var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3; + var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4; + var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5; + var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6; + var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7; + var MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; + var FAUX_ITERATOR_SYMBOL = '@@iterator'; + function getIteratorFn(maybeIterable) { + if (maybeIterable === null || typeof maybeIterable !== 'object') { + return null; + } + + var maybeIterator = + (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) || + maybeIterable[FAUX_ITERATOR_SYMBOL]; + + if (typeof maybeIterator === 'function') { + return maybeIterator; + } + + return null; + } + + /** + * Similar to invariant but only logs a warning if the condition is not met. + * This can be used to log issues in development environments in critical + * paths. Removing the logging code for production environments will keep the + * same logic and follow the same code paths. + */ + + var warning = warningWithoutStack$1; + + { + warning = function (condition, format) { + if (condition) { + return; + } + + var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; + var stack = ReactDebugCurrentFrame.getStackAddendum(); // eslint-disable-next-line react-internal/warning-and-invariant-args + + for ( + var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; + _key < _len; + _key++ + ) { + args[_key - 2] = arguments[_key]; + } + + warningWithoutStack$1.apply(void 0, [false, format + '%s'].concat(args, [stack])); + }; + } + + var warning$1 = warning; + + var Uninitialized = -1; + var Pending = 0; + var Resolved = 1; + var Rejected = 2; + function refineResolvedLazyComponent(lazyComponent) { + return lazyComponent._status === Resolved ? lazyComponent._result : null; + } + function initializeLazyComponentType(lazyComponent) { + if (lazyComponent._status === Uninitialized) { + lazyComponent._status = Pending; + var ctor = lazyComponent._ctor; + var thenable = ctor(); + lazyComponent._result = thenable; + thenable.then( + function (moduleObject) { + if (lazyComponent._status === Pending) { + var defaultExport = moduleObject.default; + + { + if (defaultExport === undefined) { + warning$1( + false, + 'lazy: Expected the result of a dynamic import() call. ' + + 'Instead received: %s\n\nYour code should look like: \n ' + + "const MyComponent = lazy(() => import('./MyComponent'))", + moduleObject, + ); + } + } + + lazyComponent._status = Resolved; + lazyComponent._result = defaultExport; + } + }, + function (error) { + if (lazyComponent._status === Pending) { + lazyComponent._status = Rejected; + lazyComponent._result = error; + } + }, + ); + } + } + + function getWrappedName(outerType, innerType, wrapperName) { + var functionName = innerType.displayName || innerType.name || ''; + return ( + outerType.displayName || + (functionName !== '' ? wrapperName + '(' + functionName + ')' : wrapperName) + ); + } + + function getComponentName(type) { + if (type == null) { + // Host root, text node or just invalid type. + return null; + } + + { + if (typeof type.tag === 'number') { + warningWithoutStack$1( + false, + 'Received an unexpected object in getComponentName(). ' + + 'This is likely a bug in React. Please file an issue.', + ); + } + } + + if (typeof type === 'function') { + return type.displayName || type.name || null; + } + + if (typeof type === 'string') { + return type; + } + + switch (type) { + case REACT_FRAGMENT_TYPE: + return 'Fragment'; + + case REACT_PORTAL_TYPE: + return 'Portal'; + + case REACT_PROFILER_TYPE: + return 'Profiler'; + + case REACT_STRICT_MODE_TYPE: + return 'StrictMode'; + + case REACT_SUSPENSE_TYPE: + return 'Suspense'; + + case REACT_SUSPENSE_LIST_TYPE: + return 'SuspenseList'; + } + + if (typeof type === 'object') { + switch (type.$$typeof) { + case REACT_CONTEXT_TYPE: + return 'Context.Consumer'; + + case REACT_PROVIDER_TYPE: + return 'Context.Provider'; + + case REACT_FORWARD_REF_TYPE: + return getWrappedName(type, type.render, 'ForwardRef'); + + case REACT_MEMO_TYPE: + return getComponentName(type.type); + + case REACT_LAZY_TYPE: { + var thenable = type; + var resolvedThenable = refineResolvedLazyComponent(thenable); + + if (resolvedThenable) { + return getComponentName(resolvedThenable); + } + + break; + } + } + } + + return null; + } + + var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; + + function describeFiber(fiber) { + switch (fiber.tag) { + case HostRoot: + case HostPortal: + case HostText: + case Fragment: + case ContextProvider: + case ContextConsumer: + return ''; + + default: + var owner = fiber._debugOwner; + var source = fiber._debugSource; + var name = getComponentName(fiber.type); + var ownerName = null; + + if (owner) { + ownerName = getComponentName(owner.type); + } + + return describeComponentFrame(name, source, ownerName); + } + } + + function getStackByFiberInDevAndProd(workInProgress) { + var info = ''; + var node = workInProgress; + + do { + info += describeFiber(node); + node = node.return; + } while (node); + + return info; + } + var current = null; + var phase = null; + function getCurrentFiberOwnerNameInDevOrNull() { + { + if (current === null) { + return null; + } + + var owner = current._debugOwner; + + if (owner !== null && typeof owner !== 'undefined') { + return getComponentName(owner.type); + } + } + + return null; + } + function getCurrentFiberStackInDev() { + { + if (current === null) { + return ''; + } // Safe because if current fiber exists, we are reconciling, + // and it is guaranteed to be the work-in-progress version. + + return getStackByFiberInDevAndProd(current); + } + + return ''; + } + function resetCurrentFiber() { + { + ReactDebugCurrentFrame.getCurrentStack = null; + current = null; + phase = null; + } + } + function setCurrentFiber(fiber) { + { + ReactDebugCurrentFrame.getCurrentStack = getCurrentFiberStackInDev; + current = fiber; + phase = null; + } + } + function setCurrentPhase(lifeCyclePhase) { + { + phase = lifeCyclePhase; + } + } + + var canUseDOM = !!( + typeof window !== 'undefined' && + typeof window.document !== 'undefined' && + typeof window.document.createElement !== 'undefined' + ); + + function endsWith(subject, search) { + var length = subject.length; + return subject.substring(length - search.length, length) === search; + } + + var PLUGIN_EVENT_SYSTEM = 1; + var RESPONDER_EVENT_SYSTEM = 1 << 1; + var IS_PASSIVE = 1 << 2; + var IS_ACTIVE = 1 << 3; + var PASSIVE_NOT_SUPPORTED = 1 << 4; + var IS_REPLAYED = 1 << 5; + + var restoreImpl = null; + var restoreTarget = null; + var restoreQueue = null; + + function restoreStateOfTarget(target) { + // We perform this translation at the end of the event loop so that we + // always receive the correct fiber here + var internalInstance = getInstanceFromNode(target); + + if (!internalInstance) { + // Unmounted + return; + } + + if (!(typeof restoreImpl === 'function')) { + { + throw Error( + 'setRestoreImplementation() needs to be called to handle a target for controlled events. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + + var props = getFiberCurrentPropsFromNode(internalInstance.stateNode); + restoreImpl(internalInstance.stateNode, internalInstance.type, props); + } + + function setRestoreImplementation(impl) { + restoreImpl = impl; + } + function enqueueStateRestore(target) { + if (restoreTarget) { + if (restoreQueue) { + restoreQueue.push(target); + } else { + restoreQueue = [target]; + } + } else { + restoreTarget = target; + } + } + function needsStateRestore() { + return restoreTarget !== null || restoreQueue !== null; + } + function restoreStateIfNeeded() { + if (!restoreTarget) { + return; + } + + var target = restoreTarget; + var queuedTargets = restoreQueue; + restoreTarget = null; + restoreQueue = null; + restoreStateOfTarget(target); + + if (queuedTargets) { + for (var i = 0; i < queuedTargets.length; i++) { + restoreStateOfTarget(queuedTargets[i]); + } + } + } + + var enableUserTimingAPI = true; // Helps identify side effects in render-phase lifecycle hooks and setState + // reducers by double invoking them in Strict Mode. + + var debugRenderPhaseSideEffectsForStrictMode = true; // To preserve the "Pause on caught exceptions" behavior of the debugger, we + // replay the begin phase of a failed component inside invokeGuardedCallback. + + var replayFailedUnitOfWorkWithInvokeGuardedCallback = true; // Warn about deprecated, async-unsafe lifecycles; relates to RFC #6: + + var warnAboutDeprecatedLifecycles = true; // Gather advanced timing metrics for Profiler subtrees. + + var enableProfilerTimer = true; // Trace which interactions trigger each commit. + + var enableSchedulerTracing = true; // SSR experiments + + var enableSuspenseServerRenderer = false; + var enableSelectiveHydration = false; // Only used in www builds. + + // Only used in www builds. + + // Disable javascript: URL strings in href for XSS protection. + + var disableJavaScriptURLs = false; // React Fire: prevent the value and checked attributes from syncing + // with their related DOM properties + + var disableInputAttributeSyncing = false; // These APIs will no longer be "unstable" in the upcoming 16.7 release, + // Control this behavior with a flag to support 16.6 minor releases in the meanwhile. + + var exposeConcurrentModeAPIs = false; + var warnAboutShorthandPropertyCollision = false; // Experimental React Flare event system and event components support. + + var enableFlareAPI = false; // Experimental Host Component support. + + var enableFundamentalAPI = false; // Experimental Scope support. + + var enableScopeAPI = false; // New API for JSX transforms to target - https://github.com/reactjs/rfcs/pull/107 + + // We will enforce mocking scheduler with scheduler/unstable_mock at some point. (v17?) + // Till then, we warn about the missing mock, but still fallback to a legacy mode compatible version + + var warnAboutUnmockedScheduler = false; // For tests, we flush suspense fallbacks in an act scope; + // *except* in some of our own tests, where we test incremental loading states. + + var flushSuspenseFallbacksInTests = true; // Add a callback property to suspense to notify which promises are currently + // in the update queue. This allows reporting and tracing of what is causing + // the user to see a loading state. + // Also allows hydration callbacks to fire when a dehydrated boundary gets + // hydrated or deleted. + + var enableSuspenseCallback = false; // Part of the simplification of React.createElement so we can eventually move + // from React.createElement to React.jsx + // https://github.com/reactjs/rfcs/blob/createlement-rfc/text/0000-create-element-changes.md + + var warnAboutDefaultPropsOnFunctionComponents = false; + var warnAboutStringRefs = false; + var disableLegacyContext = false; + var disableSchedulerTimeoutBasedOnReactExpirationTime = false; + var enableTrustedTypesIntegration = false; // Flag to turn event.target and event.currentTarget in ReactNative from a reactTag to a component instance + + // the renderer. Such as when we're dispatching events or if third party + // libraries need to call batchedUpdates. Eventually, this API will go away when + // everything is batched by default. We'll then have a similar API to opt-out of + // scheduled work and instead do synchronous work. + // Defaults + + var batchedUpdatesImpl = function (fn, bookkeeping) { + return fn(bookkeeping); + }; + + var discreteUpdatesImpl = function (fn, a, b, c) { + return fn(a, b, c); + }; + + var flushDiscreteUpdatesImpl = function () {}; + + var batchedEventUpdatesImpl = batchedUpdatesImpl; + var isInsideEventHandler = false; + var isBatchingEventUpdates = false; + + function finishEventHandler() { + // Here we wait until all updates have propagated, which is important + // when using controlled components within layers: + // https://github.com/facebook/react/issues/1698 + // Then we restore state of any controlled component. + var controlledComponentsHavePendingUpdates = needsStateRestore(); + + if (controlledComponentsHavePendingUpdates) { + // If a controlled event was fired, we may need to restore the state of + // the DOM node back to the controlled value. This is necessary when React + // bails out of the update without touching the DOM. + flushDiscreteUpdatesImpl(); + restoreStateIfNeeded(); + } + } + + function batchedUpdates(fn, bookkeeping) { + if (isInsideEventHandler) { + // If we are currently inside another batch, we need to wait until it + // fully completes before restoring state. + return fn(bookkeeping); + } + + isInsideEventHandler = true; + + try { + return batchedUpdatesImpl(fn, bookkeeping); + } finally { + isInsideEventHandler = false; + finishEventHandler(); + } + } + function batchedEventUpdates(fn, a, b) { + if (isBatchingEventUpdates) { + // If we are currently inside another batch, we need to wait until it + // fully completes before restoring state. + return fn(a, b); + } + + isBatchingEventUpdates = true; + + try { + return batchedEventUpdatesImpl(fn, a, b); + } finally { + isBatchingEventUpdates = false; + finishEventHandler(); + } + } // This is for the React Flare event system + + function executeUserEventHandler(fn, value) { + var previouslyInEventHandler = isInsideEventHandler; + + try { + isInsideEventHandler = true; + var type = typeof value === 'object' && value !== null ? value.type : ''; + invokeGuardedCallbackAndCatchFirstError(type, fn, undefined, value); + } finally { + isInsideEventHandler = previouslyInEventHandler; + } + } + function discreteUpdates(fn, a, b, c) { + var prevIsInsideEventHandler = isInsideEventHandler; + isInsideEventHandler = true; + + try { + return discreteUpdatesImpl(fn, a, b, c); + } finally { + isInsideEventHandler = prevIsInsideEventHandler; + + if (!isInsideEventHandler) { + finishEventHandler(); + } + } + } + var lastFlushedEventTimeStamp = 0; + function flushDiscreteUpdatesIfNeeded(timeStamp) { + // event.timeStamp isn't overly reliable due to inconsistencies in + // how different browsers have historically provided the time stamp. + // Some browsers provide high-resolution time stamps for all events, + // some provide low-resolution time stamps for all events. FF < 52 + // even mixes both time stamps together. Some browsers even report + // negative time stamps or time stamps that are 0 (iOS9) in some cases. + // Given we are only comparing two time stamps with equality (!==), + // we are safe from the resolution differences. If the time stamp is 0 + // we bail-out of preventing the flush, which can affect semantics, + // such as if an earlier flush removes or adds event listeners that + // are fired in the subsequent flush. However, this is the same + // behaviour as we had before this change, so the risks are low. + if ( + !isInsideEventHandler && + (!enableFlareAPI || timeStamp === 0 || lastFlushedEventTimeStamp !== timeStamp) + ) { + lastFlushedEventTimeStamp = timeStamp; + flushDiscreteUpdatesImpl(); + } + } + function setBatchingImplementation( + _batchedUpdatesImpl, + _discreteUpdatesImpl, + _flushDiscreteUpdatesImpl, + _batchedEventUpdatesImpl, + ) { + batchedUpdatesImpl = _batchedUpdatesImpl; + discreteUpdatesImpl = _discreteUpdatesImpl; + flushDiscreteUpdatesImpl = _flushDiscreteUpdatesImpl; + batchedEventUpdatesImpl = _batchedEventUpdatesImpl; + } + + var DiscreteEvent = 0; + var UserBlockingEvent = 1; + var ContinuousEvent = 2; + + // CommonJS interop named imports. + + var UserBlockingPriority = Scheduler.unstable_UserBlockingPriority; + var runWithPriority = Scheduler.unstable_runWithPriority; + var listenToResponderEventTypesImpl; + function setListenToResponderEventTypes(_listenToResponderEventTypesImpl) { + listenToResponderEventTypesImpl = _listenToResponderEventTypesImpl; + } + var rootEventTypesToEventResponderInstances = new Map(); + var DoNotPropagateToNextResponder = 0; + var PropagateToNextResponder = 1; + var currentTimeStamp = 0; + var currentInstance = null; + var currentDocument = null; + var currentPropagationBehavior = DoNotPropagateToNextResponder; + var eventResponderContext = { + dispatchEvent: function (eventValue, eventListener, eventPriority) { + validateResponderContext(); + validateEventValue(eventValue); + + switch (eventPriority) { + case DiscreteEvent: { + flushDiscreteUpdatesIfNeeded(currentTimeStamp); + discreteUpdates(function () { + return executeUserEventHandler(eventListener, eventValue); + }); + break; + } + + case UserBlockingEvent: { + runWithPriority(UserBlockingPriority, function () { + return executeUserEventHandler(eventListener, eventValue); + }); + break; + } + + case ContinuousEvent: { + executeUserEventHandler(eventListener, eventValue); + break; + } + } + }, + isTargetWithinResponder: function (target) { + validateResponderContext(); + + if (target != null) { + var fiber = getClosestInstanceFromNode(target); + var responderFiber = currentInstance.fiber; + + while (fiber !== null) { + if (fiber === responderFiber || fiber.alternate === responderFiber) { + return true; + } + + fiber = fiber.return; + } + } + + return false; + }, + isTargetWithinResponderScope: function (target) { + validateResponderContext(); + var componentInstance = currentInstance; + var responder = componentInstance.responder; + + if (target != null) { + var fiber = getClosestInstanceFromNode(target); + var responderFiber = currentInstance.fiber; + + while (fiber !== null) { + if (fiber === responderFiber || fiber.alternate === responderFiber) { + return true; + } + + if (doesFiberHaveResponder(fiber, responder)) { + return false; + } + + fiber = fiber.return; + } + } + + return false; + }, + isTargetWithinNode: function (childTarget, parentTarget) { + validateResponderContext(); + var childFiber = getClosestInstanceFromNode(childTarget); + var parentFiber = getClosestInstanceFromNode(parentTarget); + + if (childFiber != null && parentFiber != null) { + var parentAlternateFiber = parentFiber.alternate; + var node = childFiber; + + while (node !== null) { + if (node === parentFiber || node === parentAlternateFiber) { + return true; + } + + node = node.return; + } + + return false; + } // Fallback to DOM APIs + + return parentTarget.contains(childTarget); + }, + addRootEventTypes: function (rootEventTypes) { + validateResponderContext(); + listenToResponderEventTypesImpl(rootEventTypes, currentDocument); + + for (var i = 0; i < rootEventTypes.length; i++) { + var rootEventType = rootEventTypes[i]; + var eventResponderInstance = currentInstance; + registerRootEventType(rootEventType, eventResponderInstance); + } + }, + removeRootEventTypes: function (rootEventTypes) { + validateResponderContext(); + + for (var i = 0; i < rootEventTypes.length; i++) { + var rootEventType = rootEventTypes[i]; + var rootEventResponders = rootEventTypesToEventResponderInstances.get(rootEventType); + var rootEventTypesSet = currentInstance.rootEventTypes; + + if (rootEventTypesSet !== null) { + rootEventTypesSet.delete(rootEventType); + } + + if (rootEventResponders !== undefined) { + rootEventResponders.delete(currentInstance); + } + } + }, + getActiveDocument: getActiveDocument, + objectAssign: _assign, + getTimeStamp: function () { + validateResponderContext(); + return currentTimeStamp; + }, + isTargetWithinHostComponent: function (target, elementType) { + validateResponderContext(); + var fiber = getClosestInstanceFromNode(target); + + while (fiber !== null) { + if (fiber.tag === HostComponent && fiber.type === elementType) { + return true; + } + + fiber = fiber.return; + } + + return false; + }, + continuePropagation: function () { + currentPropagationBehavior = PropagateToNextResponder; + }, + enqueueStateRestore: enqueueStateRestore, + getResponderNode: function () { + validateResponderContext(); + var responderFiber = currentInstance.fiber; + + if (responderFiber.tag === ScopeComponent) { + return null; + } + + return responderFiber.stateNode; + }, + }; + + function validateEventValue(eventValue) { + if (typeof eventValue === 'object' && eventValue !== null) { + var target = eventValue.target, + type = eventValue.type, + timeStamp = eventValue.timeStamp; + + if (target == null || type == null || timeStamp == null) { + throw new Error( + 'context.dispatchEvent: "target", "timeStamp", and "type" fields on event object are required.', + ); + } + + var showWarning = function (name) { + { + warning$1( + false, + '%s is not available on event objects created from event responder modules (React Flare). ' + + 'Try wrapping in a conditional, i.e. `if (event.type !== "press") { event.%s }`', + name, + name, + ); + } + }; + + eventValue.isDefaultPrevented = function () { + { + showWarning('isDefaultPrevented()'); + } + }; + + eventValue.isPropagationStopped = function () { + { + showWarning('isPropagationStopped()'); + } + }; // $FlowFixMe: we don't need value, Flow thinks we do + + Object.defineProperty(eventValue, 'nativeEvent', { + get: function () { + { + showWarning('nativeEvent'); + } + }, + }); + } + } + + function doesFiberHaveResponder(fiber, responder) { + var tag = fiber.tag; + + if (tag === HostComponent || tag === ScopeComponent) { + var dependencies = fiber.dependencies; + + if (dependencies !== null) { + var respondersMap = dependencies.responders; + + if (respondersMap !== null && respondersMap.has(responder)) { + return true; + } + } + } + + return false; + } + + function getActiveDocument() { + return currentDocument; + } + + function createDOMResponderEvent( + topLevelType, + nativeEvent, + nativeEventTarget, + passive, + passiveSupported, + ) { + var _ref = nativeEvent, + buttons = _ref.buttons, + pointerType = _ref.pointerType; + var eventPointerType = ''; + + if (pointerType !== undefined) { + eventPointerType = pointerType; + } else if (nativeEvent.key !== undefined) { + eventPointerType = 'keyboard'; + } else if (buttons !== undefined) { + eventPointerType = 'mouse'; + } else if (nativeEvent.changedTouches !== undefined) { + eventPointerType = 'touch'; + } + + return { + nativeEvent: nativeEvent, + passive: passive, + passiveSupported: passiveSupported, + pointerType: eventPointerType, + target: nativeEventTarget, + type: topLevelType, + }; + } + + function responderEventTypesContainType(eventTypes, type) { + for (var i = 0, len = eventTypes.length; i < len; i++) { + if (eventTypes[i] === type) { + return true; + } + } + + return false; + } + + function validateResponderTargetEventTypes(eventType, responder) { + var targetEventTypes = responder.targetEventTypes; // Validate the target event type exists on the responder + + if (targetEventTypes !== null) { + return responderEventTypesContainType(targetEventTypes, eventType); + } + + return false; + } + + function traverseAndHandleEventResponderInstances( + topLevelType, + targetFiber, + nativeEvent, + nativeEventTarget, + eventSystemFlags, + ) { + var isPassiveEvent = (eventSystemFlags & IS_PASSIVE) !== 0; + var isPassiveSupported = (eventSystemFlags & PASSIVE_NOT_SUPPORTED) === 0; + var isPassive = isPassiveEvent || !isPassiveSupported; + var eventType = isPassive ? topLevelType : topLevelType + '_active'; // Trigger event responders in this order: + // - Bubble target responder phase + // - Root responder phase + + var visitedResponders = new Set(); + var responderEvent = createDOMResponderEvent( + topLevelType, + nativeEvent, + nativeEventTarget, + isPassiveEvent, + isPassiveSupported, + ); + var node = targetFiber; + var insidePortal = false; + + while (node !== null) { + var _node = node, + dependencies = _node.dependencies, + tag = _node.tag; + + if (tag === HostPortal) { + insidePortal = true; + } else if ((tag === HostComponent || tag === ScopeComponent) && dependencies !== null) { + var respondersMap = dependencies.responders; + + if (respondersMap !== null) { + var responderInstances = Array.from(respondersMap.values()); + + for (var i = 0, length = responderInstances.length; i < length; i++) { + var responderInstance = responderInstances[i]; + var props = responderInstance.props, + responder = responderInstance.responder, + state = responderInstance.state; + + if ( + !visitedResponders.has(responder) && + validateResponderTargetEventTypes(eventType, responder) && + (!insidePortal || responder.targetPortalPropagation) + ) { + visitedResponders.add(responder); + var onEvent = responder.onEvent; + + if (onEvent !== null) { + currentInstance = responderInstance; + onEvent(responderEvent, eventResponderContext, props, state); + + if (currentPropagationBehavior === PropagateToNextResponder) { + visitedResponders.delete(responder); + currentPropagationBehavior = DoNotPropagateToNextResponder; + } + } + } + } + } + } + + node = node.return; + } // Root phase + + var rootEventResponderInstances = rootEventTypesToEventResponderInstances.get(eventType); + + if (rootEventResponderInstances !== undefined) { + var _responderInstances = Array.from(rootEventResponderInstances); + + for (var _i = 0; _i < _responderInstances.length; _i++) { + var _responderInstance = _responderInstances[_i]; + var props = _responderInstance.props, + responder = _responderInstance.responder, + state = _responderInstance.state; + var onRootEvent = responder.onRootEvent; + + if (onRootEvent !== null) { + currentInstance = _responderInstance; + onRootEvent(responderEvent, eventResponderContext, props, state); + } + } + } + } + + function mountEventResponder(responder, responderInstance, props, state) { + var onMount = responder.onMount; + + if (onMount !== null) { + var previousInstance = currentInstance; + currentInstance = responderInstance; + + try { + batchedEventUpdates(function () { + onMount(eventResponderContext, props, state); + }); + } finally { + currentInstance = previousInstance; + } + } + } + function unmountEventResponder(responderInstance) { + var responder = responderInstance.responder; + var onUnmount = responder.onUnmount; + + if (onUnmount !== null) { + var props = responderInstance.props, + state = responderInstance.state; + var previousInstance = currentInstance; + currentInstance = responderInstance; + + try { + batchedEventUpdates(function () { + onUnmount(eventResponderContext, props, state); + }); + } finally { + currentInstance = previousInstance; + } + } + + var rootEventTypesSet = responderInstance.rootEventTypes; + + if (rootEventTypesSet !== null) { + var rootEventTypes = Array.from(rootEventTypesSet); + + for (var i = 0; i < rootEventTypes.length; i++) { + var topLevelEventType = rootEventTypes[i]; + var rootEventResponderInstances = + rootEventTypesToEventResponderInstances.get(topLevelEventType); + + if (rootEventResponderInstances !== undefined) { + rootEventResponderInstances.delete(responderInstance); + } + } + } + } + + function validateResponderContext() { + if (!(currentInstance !== null)) { + { + throw Error('An event responder context was used outside of an event cycle.'); + } + } + } + + function dispatchEventForResponderEventSystem( + topLevelType, + targetFiber, + nativeEvent, + nativeEventTarget, + eventSystemFlags, + ) { + if (enableFlareAPI) { + var previousInstance = currentInstance; + var previousTimeStamp = currentTimeStamp; + var previousDocument = currentDocument; + var previousPropagationBehavior = currentPropagationBehavior; + currentPropagationBehavior = DoNotPropagateToNextResponder; // nodeType 9 is DOCUMENT_NODE + + currentDocument = + nativeEventTarget.nodeType === 9 ? nativeEventTarget : nativeEventTarget.ownerDocument; // We might want to control timeStamp another way here + + currentTimeStamp = nativeEvent.timeStamp; + + try { + batchedEventUpdates(function () { + traverseAndHandleEventResponderInstances( + topLevelType, + targetFiber, + nativeEvent, + nativeEventTarget, + eventSystemFlags, + ); + }); + } finally { + currentInstance = previousInstance; + currentTimeStamp = previousTimeStamp; + currentDocument = previousDocument; + currentPropagationBehavior = previousPropagationBehavior; + } + } + } + function addRootEventTypesForResponderInstance(responderInstance, rootEventTypes) { + for (var i = 0; i < rootEventTypes.length; i++) { + var rootEventType = rootEventTypes[i]; + registerRootEventType(rootEventType, responderInstance); + } + } + + function registerRootEventType(rootEventType, eventResponderInstance) { + var rootEventResponderInstances = rootEventTypesToEventResponderInstances.get(rootEventType); + + if (rootEventResponderInstances === undefined) { + rootEventResponderInstances = new Set(); + rootEventTypesToEventResponderInstances.set(rootEventType, rootEventResponderInstances); + } + + var rootEventTypesSet = eventResponderInstance.rootEventTypes; + + if (rootEventTypesSet === null) { + rootEventTypesSet = eventResponderInstance.rootEventTypes = new Set(); + } + + if (!!rootEventTypesSet.has(rootEventType)) { + { + throw Error( + 'addRootEventTypes() found a duplicate root event type of "' + + rootEventType + + '". This might be because the event type exists in the event responder "rootEventTypes" array or because of a previous addRootEventTypes() using this root event type.', + ); + } + } + + rootEventTypesSet.add(rootEventType); + rootEventResponderInstances.add(eventResponderInstance); + } + + // A reserved attribute. + // It is handled by React separately and shouldn't be written to the DOM. + var RESERVED = 0; // A simple string attribute. + // Attributes that aren't in the whitelist are presumed to have this type. + + var STRING = 1; // A string attribute that accepts booleans in React. In HTML, these are called + // "enumerated" attributes with "true" and "false" as possible values. + // When true, it should be set to a "true" string. + // When false, it should be set to a "false" string. + + var BOOLEANISH_STRING = 2; // A real boolean attribute. + // When true, it should be present (set either to an empty string or its name). + // When false, it should be omitted. + + var BOOLEAN = 3; // An attribute that can be used as a flag as well as with a value. + // When true, it should be present (set either to an empty string or its name). + // When false, it should be omitted. + // For any other value, should be present with that value. + + var OVERLOADED_BOOLEAN = 4; // An attribute that must be numeric or parse as a numeric. + // When falsy, it should be removed. + + var NUMERIC = 5; // An attribute that must be positive numeric or parse as a positive numeric. + // When falsy, it should be removed. + + var POSITIVE_NUMERIC = 6; + + /* eslint-disable max-len */ + var ATTRIBUTE_NAME_START_CHAR = + ':A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD'; + /* eslint-enable max-len */ + + var ATTRIBUTE_NAME_CHAR = + ATTRIBUTE_NAME_START_CHAR + '\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040'; + + var ROOT_ATTRIBUTE_NAME = 'data-reactroot'; + var VALID_ATTRIBUTE_NAME_REGEX = new RegExp( + '^[' + ATTRIBUTE_NAME_START_CHAR + '][' + ATTRIBUTE_NAME_CHAR + ']*$', + ); + var hasOwnProperty = Object.prototype.hasOwnProperty; + var illegalAttributeNameCache = {}; + var validatedAttributeNameCache = {}; + function isAttributeNameSafe(attributeName) { + if (hasOwnProperty.call(validatedAttributeNameCache, attributeName)) { + return true; + } + + if (hasOwnProperty.call(illegalAttributeNameCache, attributeName)) { + return false; + } + + if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) { + validatedAttributeNameCache[attributeName] = true; + return true; + } + + illegalAttributeNameCache[attributeName] = true; + + { + warning$1(false, 'Invalid attribute name: `%s`', attributeName); + } + + return false; + } + function shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag) { + if (propertyInfo !== null) { + return propertyInfo.type === RESERVED; + } + + if (isCustomComponentTag) { + return false; + } + + if ( + name.length > 2 && + (name[0] === 'o' || name[0] === 'O') && + (name[1] === 'n' || name[1] === 'N') + ) { + return true; + } + + return false; + } + function shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag) { + if (propertyInfo !== null && propertyInfo.type === RESERVED) { + return false; + } + + switch (typeof value) { + case 'function': // $FlowIssue symbol is perfectly valid here + + case 'symbol': + // eslint-disable-line + return true; + + case 'boolean': { + if (isCustomComponentTag) { + return false; + } + + if (propertyInfo !== null) { + return !propertyInfo.acceptsBooleans; + } else { + var prefix = name.toLowerCase().slice(0, 5); + return prefix !== 'data-' && prefix !== 'aria-'; + } + } + + default: + return false; + } + } + function shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag) { + if (value === null || typeof value === 'undefined') { + return true; + } + + if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag)) { + return true; + } + + if (isCustomComponentTag) { + return false; + } + + if (propertyInfo !== null) { + switch (propertyInfo.type) { + case BOOLEAN: + return !value; + + case OVERLOADED_BOOLEAN: + return value === false; + + case NUMERIC: + return isNaN(value); + + case POSITIVE_NUMERIC: + return isNaN(value) || value < 1; + } + } + + return false; + } + function getPropertyInfo(name) { + return properties.hasOwnProperty(name) ? properties[name] : null; + } + + function PropertyInfoRecord( + name, + type, + mustUseProperty, + attributeName, + attributeNamespace, + sanitizeURL, + ) { + this.acceptsBooleans = + type === BOOLEANISH_STRING || type === BOOLEAN || type === OVERLOADED_BOOLEAN; + this.attributeName = attributeName; + this.attributeNamespace = attributeNamespace; + this.mustUseProperty = mustUseProperty; + this.propertyName = name; + this.type = type; + this.sanitizeURL = sanitizeURL; + } // When adding attributes to this list, be sure to also add them to + // the `possibleStandardNames` module to ensure casing and incorrect + // name warnings. + + var properties = {}; // These props are reserved by React. They shouldn't be written to the DOM. + + [ + 'children', + 'dangerouslySetInnerHTML', // TODO: This prevents the assignment of defaultValue to regular + // elements (not just inputs). Now that ReactDOMInput assigns to the + // defaultValue property -- do we need this? + 'defaultValue', + 'defaultChecked', + 'innerHTML', + 'suppressContentEditableWarning', + 'suppressHydrationWarning', + 'style', + ].forEach(function (name) { + properties[name] = new PropertyInfoRecord( + name, + RESERVED, + false, // mustUseProperty + name, // attributeName + null, // attributeNamespace + false, + ); + }); // A few React string attributes have a different name. + // This is a mapping from React prop names to the attribute names. + + [ + ['acceptCharset', 'accept-charset'], + ['className', 'class'], + ['htmlFor', 'for'], + ['httpEquiv', 'http-equiv'], + ].forEach(function (_ref) { + var name = _ref[0], + attributeName = _ref[1]; + properties[name] = new PropertyInfoRecord( + name, + STRING, + false, // mustUseProperty + attributeName, // attributeName + null, // attributeNamespace + false, + ); + }); // These are "enumerated" HTML attributes that accept "true" and "false". + // In React, we let users pass `true` and `false` even though technically + // these aren't boolean attributes (they are coerced to strings). + + ['contentEditable', 'draggable', 'spellCheck', 'value'].forEach(function (name) { + properties[name] = new PropertyInfoRecord( + name, + BOOLEANISH_STRING, + false, // mustUseProperty + name.toLowerCase(), // attributeName + null, // attributeNamespace + false, + ); + }); // These are "enumerated" SVG attributes that accept "true" and "false". + // In React, we let users pass `true` and `false` even though technically + // these aren't boolean attributes (they are coerced to strings). + // Since these are SVG attributes, their attribute names are case-sensitive. + + ['autoReverse', 'externalResourcesRequired', 'focusable', 'preserveAlpha'].forEach(function (name) { + properties[name] = new PropertyInfoRecord( + name, + BOOLEANISH_STRING, + false, // mustUseProperty + name, // attributeName + null, // attributeNamespace + false, + ); + }); // These are HTML boolean attributes. + + [ + 'allowFullScreen', + 'async', // Note: there is a special case that prevents it from being written to the DOM + // on the client side because the browsers are inconsistent. Instead we call focus(). + 'autoFocus', + 'autoPlay', + 'controls', + 'default', + 'defer', + 'disabled', + 'disablePictureInPicture', + 'formNoValidate', + 'hidden', + 'loop', + 'noModule', + 'noValidate', + 'open', + 'playsInline', + 'readOnly', + 'required', + 'reversed', + 'scoped', + 'seamless', // Microdata + 'itemScope', + ].forEach(function (name) { + properties[name] = new PropertyInfoRecord( + name, + BOOLEAN, + false, // mustUseProperty + name.toLowerCase(), // attributeName + null, // attributeNamespace + false, + ); + }); // These are the few React props that we set as DOM properties + // rather than attributes. These are all booleans. + + [ + 'checked', // Note: `option.selected` is not updated if `select.multiple` is + // disabled with `removeAttribute`. We have special logic for handling this. + 'multiple', + 'muted', + 'selected', + ].forEach(function (name) { + properties[name] = new PropertyInfoRecord( + name, + BOOLEAN, + true, // mustUseProperty + name, // attributeName + null, // attributeNamespace + false, + ); + }); // These are HTML attributes that are "overloaded booleans": they behave like + // booleans, but can also accept a string value. + + ['capture', 'download'].forEach(function (name) { + properties[name] = new PropertyInfoRecord( + name, + OVERLOADED_BOOLEAN, + false, // mustUseProperty + name, // attributeName + null, // attributeNamespace + false, + ); + }); // These are HTML attributes that must be positive numbers. + + ['cols', 'rows', 'size', 'span'].forEach(function (name) { + properties[name] = new PropertyInfoRecord( + name, + POSITIVE_NUMERIC, + false, // mustUseProperty + name, // attributeName + null, // attributeNamespace + false, + ); + }); // These are HTML attributes that must be numbers. + + ['rowSpan', 'start'].forEach(function (name) { + properties[name] = new PropertyInfoRecord( + name, + NUMERIC, + false, // mustUseProperty + name.toLowerCase(), // attributeName + null, // attributeNamespace + false, + ); + }); + var CAMELIZE = /[\-\:]([a-z])/g; + + var capitalize = function (token) { + return token[1].toUpperCase(); + }; // This is a list of all SVG attributes that need special casing, namespacing, + // or boolean value assignment. Regular attributes that just accept strings + // and have the same names are omitted, just like in the HTML whitelist. + // Some of these attributes can be hard to find. This list was created by + // scrapping the MDN documentation. + + [ + 'accent-height', + 'alignment-baseline', + 'arabic-form', + 'baseline-shift', + 'cap-height', + 'clip-path', + 'clip-rule', + 'color-interpolation', + 'color-interpolation-filters', + 'color-profile', + 'color-rendering', + 'dominant-baseline', + 'enable-background', + 'fill-opacity', + 'fill-rule', + 'flood-color', + 'flood-opacity', + 'font-family', + 'font-size', + 'font-size-adjust', + 'font-stretch', + 'font-style', + 'font-variant', + 'font-weight', + 'glyph-name', + 'glyph-orientation-horizontal', + 'glyph-orientation-vertical', + 'horiz-adv-x', + 'horiz-origin-x', + 'image-rendering', + 'letter-spacing', + 'lighting-color', + 'marker-end', + 'marker-mid', + 'marker-start', + 'overline-position', + 'overline-thickness', + 'paint-order', + 'panose-1', + 'pointer-events', + 'rendering-intent', + 'shape-rendering', + 'stop-color', + 'stop-opacity', + 'strikethrough-position', + 'strikethrough-thickness', + 'stroke-dasharray', + 'stroke-dashoffset', + 'stroke-linecap', + 'stroke-linejoin', + 'stroke-miterlimit', + 'stroke-opacity', + 'stroke-width', + 'text-anchor', + 'text-decoration', + 'text-rendering', + 'underline-position', + 'underline-thickness', + 'unicode-bidi', + 'unicode-range', + 'units-per-em', + 'v-alphabetic', + 'v-hanging', + 'v-ideographic', + 'v-mathematical', + 'vector-effect', + 'vert-adv-y', + 'vert-origin-x', + 'vert-origin-y', + 'word-spacing', + 'writing-mode', + 'xmlns:xlink', + 'x-height', + ].forEach(function (attributeName) { + var name = attributeName.replace(CAMELIZE, capitalize); + properties[name] = new PropertyInfoRecord( + name, + STRING, + false, // mustUseProperty + attributeName, + null, // attributeNamespace + false, + ); + }); // String SVG attributes with the xlink namespace. + + ['xlink:actuate', 'xlink:arcrole', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type'].forEach( + function (attributeName) { + var name = attributeName.replace(CAMELIZE, capitalize); + properties[name] = new PropertyInfoRecord( + name, + STRING, + false, // mustUseProperty + attributeName, + 'http://www.w3.org/1999/xlink', + false, + ); + }, + ); // String SVG attributes with the xml namespace. + + ['xml:base', 'xml:lang', 'xml:space'].forEach(function (attributeName) { + var name = attributeName.replace(CAMELIZE, capitalize); + properties[name] = new PropertyInfoRecord( + name, + STRING, + false, // mustUseProperty + attributeName, + 'http://www.w3.org/XML/1998/namespace', + false, + ); + }); // These attribute exists both in HTML and SVG. + // The attribute name is case-sensitive in SVG so we can't just use + // the React name like we do for attributes that exist only in HTML. + + ['tabIndex', 'crossOrigin'].forEach(function (attributeName) { + properties[attributeName] = new PropertyInfoRecord( + attributeName, + STRING, + false, // mustUseProperty + attributeName.toLowerCase(), // attributeName + null, // attributeNamespace + false, + ); + }); // These attributes accept URLs. These must not allow javascript: URLS. + // These will also need to accept Trusted Types object in the future. + + var xlinkHref = 'xlinkHref'; + properties[xlinkHref] = new PropertyInfoRecord( + 'xlinkHref', + STRING, + false, // mustUseProperty + 'xlink:href', + 'http://www.w3.org/1999/xlink', + true, + ); + ['src', 'href', 'action', 'formAction'].forEach(function (attributeName) { + properties[attributeName] = new PropertyInfoRecord( + attributeName, + STRING, + false, // mustUseProperty + attributeName.toLowerCase(), // attributeName + null, // attributeNamespace + true, + ); + }); + + var ReactDebugCurrentFrame$1 = null; + + { + ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame; + } // A javascript: URL can contain leading C0 control or \u0020 SPACE, + // and any newline or tab are filtered out as if they're not part of the URL. + // https://url.spec.whatwg.org/#url-parsing + // Tab or newline are defined as \r\n\t: + // https://infra.spec.whatwg.org/#ascii-tab-or-newline + // A C0 control is a code point in the range \u0000 NULL to \u001F + // INFORMATION SEPARATOR ONE, inclusive: + // https://infra.spec.whatwg.org/#c0-control-or-space + + /* eslint-disable max-len */ + + var isJavaScriptProtocol = + /^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i; + var didWarn = false; + + function sanitizeURL(url) { + if (disableJavaScriptURLs) { + if (!!isJavaScriptProtocol.test(url)) { + { + throw Error( + 'React has blocked a javascript: URL as a security precaution.' + + ReactDebugCurrentFrame$1.getStackAddendum(), + ); + } + } + } else if (true && !didWarn && isJavaScriptProtocol.test(url)) { + didWarn = true; + warning$1( + false, + 'A future version of React will block javascript: URLs as a security precaution. ' + + 'Use event handlers instead if you can. If you need to generate unsafe HTML try ' + + 'using dangerouslySetInnerHTML instead. React was passed %s.', + JSON.stringify(url), + ); + } + } + + // Flow does not allow string concatenation of most non-string types. To work + // around this limitation, we use an opaque type that can only be obtained by + // passing the value through getToStringValue first. + function toString(value) { + return '' + value; + } + function getToStringValue(value) { + switch (typeof value) { + case 'boolean': + case 'number': + case 'object': + case 'string': + case 'undefined': + return value; + + default: + // function, symbol are assigned as empty strings + return ''; + } + } + /** Trusted value is a wrapper for "safe" values which can be assigned to DOM execution sinks. */ + + /** + * We allow passing objects with toString method as element attributes or in dangerouslySetInnerHTML + * and we do validations that the value is safe. Once we do validation we want to use the validated + * value instead of the object (because object.toString may return something else on next call). + * + * If application uses Trusted Types we don't stringify trusted values, but preserve them as objects. + */ + var toStringOrTrustedType = toString; + + if (enableTrustedTypesIntegration && typeof trustedTypes !== 'undefined') { + toStringOrTrustedType = function (value) { + if ( + typeof value === 'object' && + (trustedTypes.isHTML(value) || + trustedTypes.isScript(value) || + trustedTypes.isScriptURL(value) || + /* TrustedURLs are deprecated and will be removed soon: https://github.com/WICG/trusted-types/pull/204 */ + (trustedTypes.isURL && trustedTypes.isURL(value))) + ) { + // Pass Trusted Types through. + return value; + } + + return toString(value); + }; + } + + /** + * Set attribute for a node. The attribute value can be either string or + * Trusted value (if application uses Trusted Types). + */ + function setAttribute(node, attributeName, attributeValue) { + node.setAttribute(attributeName, attributeValue); + } + /** + * Set attribute with namespace for a node. The attribute value can be either string or + * Trusted value (if application uses Trusted Types). + */ + + function setAttributeNS(node, attributeNamespace, attributeName, attributeValue) { + node.setAttributeNS(attributeNamespace, attributeName, attributeValue); + } + + /** + * Get the value for a property on a node. Only used in DEV for SSR validation. + * The "expected" argument is used as a hint of what the expected value is. + * Some properties have multiple equivalent values. + */ + function getValueForProperty(node, name, expected, propertyInfo) { + { + if (propertyInfo.mustUseProperty) { + var propertyName = propertyInfo.propertyName; + return node[propertyName]; + } else { + if (!disableJavaScriptURLs && propertyInfo.sanitizeURL) { + // If we haven't fully disabled javascript: URLs, and if + // the hydration is successful of a javascript: URL, we + // still want to warn on the client. + sanitizeURL('' + expected); + } + + var attributeName = propertyInfo.attributeName; + var stringValue = null; + + if (propertyInfo.type === OVERLOADED_BOOLEAN) { + if (node.hasAttribute(attributeName)) { + var value = node.getAttribute(attributeName); + + if (value === '') { + return true; + } + + if (shouldRemoveAttribute(name, expected, propertyInfo, false)) { + return value; + } + + if (value === '' + expected) { + return expected; + } + + return value; + } + } else if (node.hasAttribute(attributeName)) { + if (shouldRemoveAttribute(name, expected, propertyInfo, false)) { + // We had an attribute but shouldn't have had one, so read it + // for the error message. + return node.getAttribute(attributeName); + } + + if (propertyInfo.type === BOOLEAN) { + // If this was a boolean, it doesn't matter what the value is + // the fact that we have it is the same as the expected. + return expected; + } // Even if this property uses a namespace we use getAttribute + // because we assume its namespaced name is the same as our config. + // To use getAttributeNS we need the local name which we don't have + // in our config atm. + + stringValue = node.getAttribute(attributeName); + } + + if (shouldRemoveAttribute(name, expected, propertyInfo, false)) { + return stringValue === null ? expected : stringValue; + } else if (stringValue === '' + expected) { + return expected; + } else { + return stringValue; + } + } + } + } + /** + * Get the value for a attribute on a node. Only used in DEV for SSR validation. + * The third argument is used as a hint of what the expected value is. Some + * attributes have multiple equivalent values. + */ + + function getValueForAttribute(node, name, expected) { + { + if (!isAttributeNameSafe(name)) { + return; + } + + if (!node.hasAttribute(name)) { + return expected === undefined ? undefined : null; + } + + var value = node.getAttribute(name); + + if (value === '' + expected) { + return expected; + } + + return value; + } + } + /** + * Sets the value for a property on a node. + * + * @param {DOMElement} node + * @param {string} name + * @param {*} value + */ + + function setValueForProperty(node, name, value, isCustomComponentTag) { + var propertyInfo = getPropertyInfo(name); + + if (shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag)) { + return; + } + + if (shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag)) { + value = null; + } // If the prop isn't in the special list, treat it as a simple attribute. + + if (isCustomComponentTag || propertyInfo === null) { + if (isAttributeNameSafe(name)) { + var _attributeName = name; + + if (value === null) { + node.removeAttribute(_attributeName); + } else { + setAttribute(node, _attributeName, toStringOrTrustedType(value)); + } + } + + return; + } + + var mustUseProperty = propertyInfo.mustUseProperty; + + if (mustUseProperty) { + var propertyName = propertyInfo.propertyName; + + if (value === null) { + var type = propertyInfo.type; + node[propertyName] = type === BOOLEAN ? false : ''; + } else { + // Contrary to `setAttribute`, object properties are properly + // `toString`ed by IE8/9. + node[propertyName] = value; + } + + return; + } // The rest are treated as attributes with special cases. + + var attributeName = propertyInfo.attributeName, + attributeNamespace = propertyInfo.attributeNamespace; + + if (value === null) { + node.removeAttribute(attributeName); + } else { + var _type = propertyInfo.type; + var attributeValue; + + if (_type === BOOLEAN || (_type === OVERLOADED_BOOLEAN && value === true)) { + // If attribute type is boolean, we know for sure it won't be an execution sink + // and we won't require Trusted Type here. + attributeValue = ''; + } else { + // `setAttribute` with objects becomes only `[object]` in IE8/9, + // ('' + value) makes it output the correct toString()-value. + attributeValue = toStringOrTrustedType(value); + + if (propertyInfo.sanitizeURL) { + sanitizeURL(attributeValue.toString()); + } + } + + if (attributeNamespace) { + setAttributeNS(node, attributeNamespace, attributeName, attributeValue); + } else { + setAttribute(node, attributeName, attributeValue); + } + } + } + + var ReactDebugCurrentFrame$2 = null; + var ReactControlledValuePropTypes = { + checkPropTypes: null, + }; + + { + ReactDebugCurrentFrame$2 = ReactSharedInternals.ReactDebugCurrentFrame; + var hasReadOnlyValue = { + button: true, + checkbox: true, + image: true, + hidden: true, + radio: true, + reset: true, + submit: true, + }; + var propTypes = { + value: function (props, propName, componentName) { + if ( + hasReadOnlyValue[props.type] || + props.onChange || + props.readOnly || + props.disabled || + props[propName] == null || + (enableFlareAPI && props.listeners) + ) { + return null; + } + + return new Error( + 'You provided a `value` prop to a form field without an ' + + '`onChange` handler. This will render a read-only field. If ' + + 'the field should be mutable use `defaultValue`. Otherwise, ' + + 'set either `onChange` or `readOnly`.', + ); + }, + checked: function (props, propName, componentName) { + if ( + props.onChange || + props.readOnly || + props.disabled || + props[propName] == null || + (enableFlareAPI && props.listeners) + ) { + return null; + } + + return new Error( + 'You provided a `checked` prop to a form field without an ' + + '`onChange` handler. This will render a read-only field. If ' + + 'the field should be mutable use `defaultChecked`. Otherwise, ' + + 'set either `onChange` or `readOnly`.', + ); + }, + }; + /** + * Provide a linked `value` attribute for controlled forms. You should not use + * this outside of the ReactDOM controlled form components. + */ + + ReactControlledValuePropTypes.checkPropTypes = function (tagName, props) { + checkPropTypes(propTypes, props, 'prop', tagName, ReactDebugCurrentFrame$2.getStackAddendum); + }; + } + + function isCheckable(elem) { + var type = elem.type; + var nodeName = elem.nodeName; + return ( + nodeName && nodeName.toLowerCase() === 'input' && (type === 'checkbox' || type === 'radio') + ); + } + + function getTracker(node) { + return node._valueTracker; + } + + function detachTracker(node) { + node._valueTracker = null; + } + + function getValueFromNode(node) { + var value = ''; + + if (!node) { + return value; + } + + if (isCheckable(node)) { + value = node.checked ? 'true' : 'false'; + } else { + value = node.value; + } + + return value; + } + + function trackValueOnNode(node) { + var valueField = isCheckable(node) ? 'checked' : 'value'; + var descriptor = Object.getOwnPropertyDescriptor(node.constructor.prototype, valueField); + var currentValue = '' + node[valueField]; // if someone has already defined a value or Safari, then bail + // and don't track value will cause over reporting of changes, + // but it's better then a hard failure + // (needed for certain tests that spyOn input values and Safari) + + if ( + node.hasOwnProperty(valueField) || + typeof descriptor === 'undefined' || + typeof descriptor.get !== 'function' || + typeof descriptor.set !== 'function' + ) { + return; + } + + var get = descriptor.get, + set = descriptor.set; + Object.defineProperty(node, valueField, { + configurable: true, + get: function () { + return get.call(this); + }, + set: function (value) { + currentValue = '' + value; + set.call(this, value); + }, + }); // We could've passed this the first time + // but it triggers a bug in IE11 and Edge 14/15. + // Calling defineProperty() again should be equivalent. + // https://github.com/facebook/react/issues/11768 + + Object.defineProperty(node, valueField, { + enumerable: descriptor.enumerable, + }); + var tracker = { + getValue: function () { + return currentValue; + }, + setValue: function (value) { + currentValue = '' + value; + }, + stopTracking: function () { + detachTracker(node); + delete node[valueField]; + }, + }; + return tracker; + } + + function track(node) { + if (getTracker(node)) { + return; + } // TODO: Once it's just Fiber we can move this to node._wrapperState + + node._valueTracker = trackValueOnNode(node); + } + function updateValueIfChanged(node) { + if (!node) { + return false; + } + + var tracker = getTracker(node); // if there is no tracker at this point it's unlikely + // that trying again will succeed + + if (!tracker) { + return true; + } + + var lastValue = tracker.getValue(); + var nextValue = getValueFromNode(node); + + if (nextValue !== lastValue) { + tracker.setValue(nextValue); + return true; + } + + return false; + } + + // TODO: direct imports like some-package/src/* are bad. Fix me. + var didWarnValueDefaultValue = false; + var didWarnCheckedDefaultChecked = false; + var didWarnControlledToUncontrolled = false; + var didWarnUncontrolledToControlled = false; + + function isControlled(props) { + var usesChecked = props.type === 'checkbox' || props.type === 'radio'; + return usesChecked ? props.checked != null : props.value != null; + } + /** + * Implements an <input> host component that allows setting these optional + * props: `checked`, `value`, `defaultChecked`, and `defaultValue`. + * + * If `checked` or `value` are not supplied (or null/undefined), user actions + * that affect the checked state or value will trigger updates to the element. + * + * If they are supplied (and not null/undefined), the rendered element will not + * trigger updates to the element. Instead, the props must change in order for + * the rendered element to be updated. + * + * The rendered element will be initialized as unchecked (or `defaultChecked`) + * with an empty value (or `defaultValue`). + * + * See http://www.w3.org/TR/2012/WD-html5-20121025/the-input-element.html + */ + + function getHostProps(element, props) { + var node = element; + var checked = props.checked; + + var hostProps = _assign({}, props, { + defaultChecked: undefined, + defaultValue: undefined, + value: undefined, + checked: checked != null ? checked : node._wrapperState.initialChecked, + }); + + return hostProps; + } + function initWrapperState(element, props) { + { + ReactControlledValuePropTypes.checkPropTypes('input', props); + + if ( + props.checked !== undefined && + props.defaultChecked !== undefined && + !didWarnCheckedDefaultChecked + ) { + warning$1( + false, + '%s contains an input of type %s with both checked and defaultChecked props. ' + + 'Input elements must be either controlled or uncontrolled ' + + '(specify either the checked prop, or the defaultChecked prop, but not ' + + 'both). Decide between using a controlled or uncontrolled input ' + + 'element and remove one of these props. More info: ' + + 'https://fb.me/react-controlled-components', + getCurrentFiberOwnerNameInDevOrNull() || 'A component', + props.type, + ); + didWarnCheckedDefaultChecked = true; + } + + if ( + props.value !== undefined && + props.defaultValue !== undefined && + !didWarnValueDefaultValue + ) { + warning$1( + false, + '%s contains an input of type %s with both value and defaultValue props. ' + + 'Input elements must be either controlled or uncontrolled ' + + '(specify either the value prop, or the defaultValue prop, but not ' + + 'both). Decide between using a controlled or uncontrolled input ' + + 'element and remove one of these props. More info: ' + + 'https://fb.me/react-controlled-components', + getCurrentFiberOwnerNameInDevOrNull() || 'A component', + props.type, + ); + didWarnValueDefaultValue = true; + } + } + + var node = element; + var defaultValue = props.defaultValue == null ? '' : props.defaultValue; + node._wrapperState = { + initialChecked: props.checked != null ? props.checked : props.defaultChecked, + initialValue: getToStringValue(props.value != null ? props.value : defaultValue), + controlled: isControlled(props), + }; + } + function updateChecked(element, props) { + var node = element; + var checked = props.checked; + + if (checked != null) { + setValueForProperty(node, 'checked', checked, false); + } + } + function updateWrapper(element, props) { + var node = element; + + { + var controlled = isControlled(props); + + if (!node._wrapperState.controlled && controlled && !didWarnUncontrolledToControlled) { + warning$1( + false, + 'A component is changing an uncontrolled input of type %s to be controlled. ' + + 'Input elements should not switch from uncontrolled to controlled (or vice versa). ' + + 'Decide between using a controlled or uncontrolled input ' + + 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components', + props.type, + ); + didWarnUncontrolledToControlled = true; + } + + if (node._wrapperState.controlled && !controlled && !didWarnControlledToUncontrolled) { + warning$1( + false, + 'A component is changing a controlled input of type %s to be uncontrolled. ' + + 'Input elements should not switch from controlled to uncontrolled (or vice versa). ' + + 'Decide between using a controlled or uncontrolled input ' + + 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components', + props.type, + ); + didWarnControlledToUncontrolled = true; + } + } + + updateChecked(element, props); + var value = getToStringValue(props.value); + var type = props.type; + + if (value != null) { + if (type === 'number') { + if ( + (value === 0 && node.value === '') || // We explicitly want to coerce to number here if possible. + // eslint-disable-next-line + node.value != value + ) { + node.value = toString(value); + } + } else if (node.value !== toString(value)) { + node.value = toString(value); + } + } else if (type === 'submit' || type === 'reset') { + // Submit/reset inputs need the attribute removed completely to avoid + // blank-text buttons. + node.removeAttribute('value'); + return; + } + + if (disableInputAttributeSyncing) { + // When not syncing the value attribute, React only assigns a new value + // whenever the defaultValue React prop has changed. When not present, + // React does nothing + if (props.hasOwnProperty('defaultValue')) { + setDefaultValue(node, props.type, getToStringValue(props.defaultValue)); + } + } else { + // When syncing the value attribute, the value comes from a cascade of + // properties: + // 1. The value React property + // 2. The defaultValue React property + // 3. Otherwise there should be no change + if (props.hasOwnProperty('value')) { + setDefaultValue(node, props.type, value); + } else if (props.hasOwnProperty('defaultValue')) { + setDefaultValue(node, props.type, getToStringValue(props.defaultValue)); + } + } + + if (disableInputAttributeSyncing) { + // When not syncing the checked attribute, the attribute is directly + // controllable from the defaultValue React property. It needs to be + // updated as new props come in. + if (props.defaultChecked == null) { + node.removeAttribute('checked'); + } else { + node.defaultChecked = !!props.defaultChecked; + } + } else { + // When syncing the checked attribute, it only changes when it needs + // to be removed, such as transitioning from a checkbox into a text input + if (props.checked == null && props.defaultChecked != null) { + node.defaultChecked = !!props.defaultChecked; + } + } + } + function postMountWrapper(element, props, isHydrating) { + var node = element; // Do not assign value if it is already set. This prevents user text input + // from being lost during SSR hydration. + + if (props.hasOwnProperty('value') || props.hasOwnProperty('defaultValue')) { + var type = props.type; + var isButton = type === 'submit' || type === 'reset'; // Avoid setting value attribute on submit/reset inputs as it overrides the + // default value provided by the browser. See: #12872 + + if (isButton && (props.value === undefined || props.value === null)) { + return; + } + + var initialValue = toString(node._wrapperState.initialValue); // Do not assign value if it is already set. This prevents user text input + // from being lost during SSR hydration. + + if (!isHydrating) { + if (disableInputAttributeSyncing) { + var value = getToStringValue(props.value); // When not syncing the value attribute, the value property points + // directly to the React prop. Only assign it if it exists. + + if (value != null) { + // Always assign on buttons so that it is possible to assign an + // empty string to clear button text. + // + // Otherwise, do not re-assign the value property if is empty. This + // potentially avoids a DOM write and prevents Firefox (~60.0.1) from + // prematurely marking required inputs as invalid. Equality is compared + // to the current value in case the browser provided value is not an + // empty string. + if (isButton || value !== node.value) { + node.value = toString(value); + } + } + } else { + // When syncing the value attribute, the value property should use + // the wrapperState._initialValue property. This uses: + // + // 1. The value React property when present + // 2. The defaultValue React property when present + // 3. An empty string + if (initialValue !== node.value) { + node.value = initialValue; + } + } + } + + if (disableInputAttributeSyncing) { + // When not syncing the value attribute, assign the value attribute + // directly from the defaultValue React property (when present) + var defaultValue = getToStringValue(props.defaultValue); + + if (defaultValue != null) { + node.defaultValue = toString(defaultValue); + } + } else { + // Otherwise, the value attribute is synchronized to the property, + // so we assign defaultValue to the same thing as the value property + // assignment step above. + node.defaultValue = initialValue; + } + } // Normally, we'd just do `node.checked = node.checked` upon initial mount, less this bug + // this is needed to work around a chrome bug where setting defaultChecked + // will sometimes influence the value of checked (even after detachment). + // Reference: https://bugs.chromium.org/p/chromium/issues/detail?id=608416 + // We need to temporarily unset name to avoid disrupting radio button groups. + + var name = node.name; + + if (name !== '') { + node.name = ''; + } + + if (disableInputAttributeSyncing) { + // When not syncing the checked attribute, the checked property + // never gets assigned. It must be manually set. We don't want + // to do this when hydrating so that existing user input isn't + // modified + if (!isHydrating) { + updateChecked(element, props); + } // Only assign the checked attribute if it is defined. This saves + // a DOM write when controlling the checked attribute isn't needed + // (text inputs, submit/reset) + + if (props.hasOwnProperty('defaultChecked')) { + node.defaultChecked = !node.defaultChecked; + node.defaultChecked = !!props.defaultChecked; + } + } else { + // When syncing the checked attribute, both the checked property and + // attribute are assigned at the same time using defaultChecked. This uses: + // + // 1. The checked React property when present + // 2. The defaultChecked React property when present + // 3. Otherwise, false + node.defaultChecked = !node.defaultChecked; + node.defaultChecked = !!node._wrapperState.initialChecked; + } + + if (name !== '') { + node.name = name; + } + } + function restoreControlledState$1(element, props) { + var node = element; + updateWrapper(node, props); + updateNamedCousins(node, props); + } + + function updateNamedCousins(rootNode, props) { + var name = props.name; + + if (props.type === 'radio' && name != null) { + var queryRoot = rootNode; + + while (queryRoot.parentNode) { + queryRoot = queryRoot.parentNode; + } // If `rootNode.form` was non-null, then we could try `form.elements`, + // but that sometimes behaves strangely in IE8. We could also try using + // `form.getElementsByName`, but that will only return direct children + // and won't include inputs that use the HTML5 `form=` attribute. Since + // the input might not even be in a form. It might not even be in the + // document. Let's just use the local `querySelectorAll` to ensure we don't + // miss anything. + + var group = queryRoot.querySelectorAll( + 'input[name=' + JSON.stringify('' + name) + '][type="radio"]', + ); + + for (var i = 0; i < group.length; i++) { + var otherNode = group[i]; + + if (otherNode === rootNode || otherNode.form !== rootNode.form) { + continue; + } // This will throw if radio buttons rendered by different copies of React + // and the same name are rendered into the same form (same as #1939). + // That's probably okay; we don't support it just as we don't support + // mixing React radio buttons with non-React ones. + + var otherProps = getFiberCurrentPropsFromNode$1(otherNode); + + if (!otherProps) { + { + throw Error( + 'ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.', + ); + } + } // We need update the tracked value on the named cousin since the value + // was changed but the input saw no event or value set + + updateValueIfChanged(otherNode); // If this is a controlled radio button group, forcing the input that + // was previously checked to update will cause it to be come re-checked + // as appropriate. + + updateWrapper(otherNode, otherProps); + } + } + } // In Chrome, assigning defaultValue to certain input types triggers input validation. + // For number inputs, the display value loses trailing decimal points. For email inputs, + // Chrome raises "The specified value <x> is not a valid email address". + // + // Here we check to see if the defaultValue has actually changed, avoiding these problems + // when the user is inputting text + // + // https://github.com/facebook/react/issues/7253 + + function setDefaultValue(node, type, value) { + if ( + // Focused number inputs synchronize on blur. See ChangeEventPlugin.js + type !== 'number' || + node.ownerDocument.activeElement !== node + ) { + if (value == null) { + node.defaultValue = toString(node._wrapperState.initialValue); + } else if (node.defaultValue !== toString(value)) { + node.defaultValue = toString(value); + } + } + } + + var didWarnSelectedSetOnOption = false; + var didWarnInvalidChild = false; + + function flattenChildren(children) { + var content = ''; // Flatten children. We'll warn if they are invalid + // during validateProps() which runs for hydration too. + // Note that this would throw on non-element objects. + // Elements are stringified (which is normally irrelevant + // but matters for <fbt>). + + React.Children.forEach(children, function (child) { + if (child == null) { + return; + } + + content += child; // Note: we don't warn about invalid children here. + // Instead, this is done separately below so that + // it happens during the hydration codepath too. + }); + return content; + } + /** + * Implements an <option> host component that warns when `selected` is set. + */ + + function validateProps(element, props) { + { + // This mirrors the codepath above, but runs for hydration too. + // Warn about invalid children here so that client and hydration are consistent. + // TODO: this seems like it could cause a DEV-only throw for hydration + // if children contains a non-element object. We should try to avoid that. + if (typeof props.children === 'object' && props.children !== null) { + React.Children.forEach(props.children, function (child) { + if (child == null) { + return; + } + + if (typeof child === 'string' || typeof child === 'number') { + return; + } + + if (typeof child.type !== 'string') { + return; + } + + if (!didWarnInvalidChild) { + didWarnInvalidChild = true; + warning$1(false, 'Only strings and numbers are supported as <option> children.'); + } + }); + } // TODO: Remove support for `selected` in <option>. + + if (props.selected != null && !didWarnSelectedSetOnOption) { + warning$1( + false, + 'Use the `defaultValue` or `value` props on <select> instead of ' + + 'setting `selected` on <option>.', + ); + didWarnSelectedSetOnOption = true; + } + } + } + function postMountWrapper$1(element, props) { + // value="" should make a value attribute (#6219) + if (props.value != null) { + element.setAttribute('value', toString(getToStringValue(props.value))); + } + } + function getHostProps$1(element, props) { + var hostProps = _assign( + { + children: undefined, + }, + props, + ); + + var content = flattenChildren(props.children); + + if (content) { + hostProps.children = content; + } + + return hostProps; + } + + // TODO: direct imports like some-package/src/* are bad. Fix me. + var didWarnValueDefaultValue$1; + + { + didWarnValueDefaultValue$1 = false; + } + + function getDeclarationErrorAddendum() { + var ownerName = getCurrentFiberOwnerNameInDevOrNull(); + + if (ownerName) { + return '\n\nCheck the render method of `' + ownerName + '`.'; + } + + return ''; + } + + var valuePropNames = ['value', 'defaultValue']; + /** + * Validation function for `value` and `defaultValue`. + */ + + function checkSelectPropTypes(props) { + ReactControlledValuePropTypes.checkPropTypes('select', props); + + for (var i = 0; i < valuePropNames.length; i++) { + var propName = valuePropNames[i]; + + if (props[propName] == null) { + continue; + } + + var isArray = Array.isArray(props[propName]); + + if (props.multiple && !isArray) { + warning$1( + false, + 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', + propName, + getDeclarationErrorAddendum(), + ); + } else if (!props.multiple && isArray) { + warning$1( + false, + 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', + propName, + getDeclarationErrorAddendum(), + ); + } + } + } + + function updateOptions(node, multiple, propValue, setDefaultSelected) { + var options = node.options; + + if (multiple) { + var selectedValues = propValue; + var selectedValue = {}; + + for (var i = 0; i < selectedValues.length; i++) { + // Prefix to avoid chaos with special keys. + selectedValue['$' + selectedValues[i]] = true; + } + + for (var _i = 0; _i < options.length; _i++) { + var selected = selectedValue.hasOwnProperty('$' + options[_i].value); + + if (options[_i].selected !== selected) { + options[_i].selected = selected; + } + + if (selected && setDefaultSelected) { + options[_i].defaultSelected = true; + } + } + } else { + // Do not set `select.value` as exact behavior isn't consistent across all + // browsers for all cases. + var _selectedValue = toString(getToStringValue(propValue)); + + var defaultSelected = null; + + for (var _i2 = 0; _i2 < options.length; _i2++) { + if (options[_i2].value === _selectedValue) { + options[_i2].selected = true; + + if (setDefaultSelected) { + options[_i2].defaultSelected = true; + } + + return; + } + + if (defaultSelected === null && !options[_i2].disabled) { + defaultSelected = options[_i2]; + } + } + + if (defaultSelected !== null) { + defaultSelected.selected = true; + } + } + } + /** + * Implements a <select> host component that allows optionally setting the + * props `value` and `defaultValue`. If `multiple` is false, the prop must be a + * stringable. If `multiple` is true, the prop must be an array of stringables. + * + * If `value` is not supplied (or null/undefined), user actions that change the + * selected option will trigger updates to the rendered options. + * + * If it is supplied (and not null/undefined), the rendered options will not + * update in response to user actions. Instead, the `value` prop must change in + * order for the rendered options to update. + * + * If `defaultValue` is provided, any options with the supplied values will be + * selected. + */ + + function getHostProps$2(element, props) { + return _assign({}, props, { + value: undefined, + }); + } + function initWrapperState$1(element, props) { + var node = element; + + { + checkSelectPropTypes(props); + } + + node._wrapperState = { + wasMultiple: !!props.multiple, + }; + + { + if ( + props.value !== undefined && + props.defaultValue !== undefined && + !didWarnValueDefaultValue$1 + ) { + warning$1( + false, + 'Select elements must be either controlled or uncontrolled ' + + '(specify either the value prop, or the defaultValue prop, but not ' + + 'both). Decide between using a controlled or uncontrolled select ' + + 'element and remove one of these props. More info: ' + + 'https://fb.me/react-controlled-components', + ); + didWarnValueDefaultValue$1 = true; + } + } + } + function postMountWrapper$2(element, props) { + var node = element; + node.multiple = !!props.multiple; + var value = props.value; + + if (value != null) { + updateOptions(node, !!props.multiple, value, false); + } else if (props.defaultValue != null) { + updateOptions(node, !!props.multiple, props.defaultValue, true); + } + } + function postUpdateWrapper(element, props) { + var node = element; + var wasMultiple = node._wrapperState.wasMultiple; + node._wrapperState.wasMultiple = !!props.multiple; + var value = props.value; + + if (value != null) { + updateOptions(node, !!props.multiple, value, false); + } else if (wasMultiple !== !!props.multiple) { + // For simplicity, reapply `defaultValue` if `multiple` is toggled. + if (props.defaultValue != null) { + updateOptions(node, !!props.multiple, props.defaultValue, true); + } else { + // Revert the select back to its default unselected state. + updateOptions(node, !!props.multiple, props.multiple ? [] : '', false); + } + } + } + function restoreControlledState$2(element, props) { + var node = element; + var value = props.value; + + if (value != null) { + updateOptions(node, !!props.multiple, value, false); + } + } + + var didWarnValDefaultVal = false; + + /** + * Implements a <textarea> host component that allows setting `value`, and + * `defaultValue`. This differs from the traditional DOM API because value is + * usually set as PCDATA children. + * + * If `value` is not supplied (or null/undefined), user actions that affect the + * value will trigger updates to the element. + * + * If `value` is supplied (and not null/undefined), the rendered element will + * not trigger updates to the element. Instead, the `value` prop must change in + * order for the rendered element to be updated. + * + * The rendered element will be initialized with an empty value, the prop + * `defaultValue` if specified, or the children content (deprecated). + */ + function getHostProps$3(element, props) { + var node = element; + + if (!(props.dangerouslySetInnerHTML == null)) { + { + throw Error('`dangerouslySetInnerHTML` does not make sense on <textarea>.'); + } + } // Always set children to the same thing. In IE9, the selection range will + // get reset if `textContent` is mutated. We could add a check in setTextContent + // to only set the value if/when the value differs from the node value (which would + // completely solve this IE9 bug), but Sebastian+Sophie seemed to like this + // solution. The value can be a boolean or object so that's why it's forced + // to be a string. + + var hostProps = _assign({}, props, { + value: undefined, + defaultValue: undefined, + children: toString(node._wrapperState.initialValue), + }); + + return hostProps; + } + function initWrapperState$2(element, props) { + var node = element; + + { + ReactControlledValuePropTypes.checkPropTypes('textarea', props); + + if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValDefaultVal) { + warning$1( + false, + '%s contains a textarea with both value and defaultValue props. ' + + 'Textarea elements must be either controlled or uncontrolled ' + + '(specify either the value prop, or the defaultValue prop, but not ' + + 'both). Decide between using a controlled or uncontrolled textarea ' + + 'and remove one of these props. More info: ' + + 'https://fb.me/react-controlled-components', + getCurrentFiberOwnerNameInDevOrNull() || 'A component', + ); + didWarnValDefaultVal = true; + } + } + + var initialValue = props.value; // Only bother fetching default value if we're going to use it + + if (initialValue == null) { + var defaultValue = props.defaultValue; // TODO (yungsters): Remove support for children content in <textarea>. + + var children = props.children; + + if (children != null) { + { + warning$1( + false, + 'Use the `defaultValue` or `value` props instead of setting ' + 'children on <textarea>.', + ); + } + + if (!(defaultValue == null)) { + { + throw Error('If you supply `defaultValue` on a <textarea>, do not pass children.'); + } + } + + if (Array.isArray(children)) { + if (!(children.length <= 1)) { + { + throw Error('<textarea> can only have at most one child.'); + } + } + + children = children[0]; + } + + defaultValue = children; + } + + if (defaultValue == null) { + defaultValue = ''; + } + + initialValue = defaultValue; + } + + node._wrapperState = { + initialValue: getToStringValue(initialValue), + }; + } + function updateWrapper$1(element, props) { + var node = element; + var value = getToStringValue(props.value); + var defaultValue = getToStringValue(props.defaultValue); + + if (value != null) { + // Cast `value` to a string to ensure the value is set correctly. While + // browsers typically do this as necessary, jsdom doesn't. + var newValue = toString(value); // To avoid side effects (such as losing text selection), only set value if changed + + if (newValue !== node.value) { + node.value = newValue; + } + + if (props.defaultValue == null && node.defaultValue !== newValue) { + node.defaultValue = newValue; + } + } + + if (defaultValue != null) { + node.defaultValue = toString(defaultValue); + } + } + function postMountWrapper$3(element, props) { + var node = element; // This is in postMount because we need access to the DOM node, which is not + // available until after the component has mounted. + + var textContent = node.textContent; // Only set node.value if textContent is equal to the expected + // initial value. In IE10/IE11 there is a bug where the placeholder attribute + // will populate textContent as well. + // https://developer.microsoft.com/microsoft-edge/platform/issues/101525/ + + if (textContent === node._wrapperState.initialValue) { + if (textContent !== '' && textContent !== null) { + node.value = textContent; + } + } + } + function restoreControlledState$3(element, props) { + // DOM component is still mounted; update + updateWrapper$1(element, props); + } + + var HTML_NAMESPACE$1 = 'http://www.w3.org/1999/xhtml'; + var MATH_NAMESPACE = 'http://www.w3.org/1998/Math/MathML'; + var SVG_NAMESPACE = 'http://www.w3.org/2000/svg'; + var Namespaces = { + html: HTML_NAMESPACE$1, + mathml: MATH_NAMESPACE, + svg: SVG_NAMESPACE, + }; // Assumes there is no parent namespace. + + function getIntrinsicNamespace(type) { + switch (type) { + case 'svg': + return SVG_NAMESPACE; + + case 'math': + return MATH_NAMESPACE; + + default: + return HTML_NAMESPACE$1; + } + } + function getChildNamespace(parentNamespace, type) { + if (parentNamespace == null || parentNamespace === HTML_NAMESPACE$1) { + // No (or default) parent namespace: potential entry point. + return getIntrinsicNamespace(type); + } + + if (parentNamespace === SVG_NAMESPACE && type === 'foreignObject') { + // We're leaving SVG. + return HTML_NAMESPACE$1; + } // By default, pass namespace below. + + return parentNamespace; + } + + /* globals MSApp */ + + /** + * Create a function which has 'unsafe' privileges (required by windows8 apps) + */ + var createMicrosoftUnsafeLocalFunction = function (func) { + if (typeof MSApp !== 'undefined' && MSApp.execUnsafeLocalFunction) { + return function (arg0, arg1, arg2, arg3) { + MSApp.execUnsafeLocalFunction(function () { + return func(arg0, arg1, arg2, arg3); + }); + }; + } else { + return func; + } + }; + + var reusableSVGContainer; + /** + * Set the innerHTML property of a node + * + * @param {DOMElement} node + * @param {string} html + * @internal + */ + + var setInnerHTML = createMicrosoftUnsafeLocalFunction(function (node, html) { + if (node.namespaceURI === Namespaces.svg) { + { + if (enableTrustedTypesIntegration) { + // TODO: reconsider the text of this warning and when it should show + // before enabling the feature flag. + !(typeof trustedTypes === 'undefined') + ? warning$1( + false, + "Using 'dangerouslySetInnerHTML' in an svg element with " + + 'Trusted Types enabled in an Internet Explorer will cause ' + + 'the trusted value to be converted to string. Assigning string ' + + "to 'innerHTML' will throw an error if Trusted Types are enforced. " + + "You can try to wrap your svg element inside a div and use 'dangerouslySetInnerHTML' " + + 'on the enclosing div instead.', + ) + : void 0; + } + } + + if (!('innerHTML' in node)) { + // IE does not have innerHTML for SVG nodes, so instead we inject the + // new markup in a temp node and then move the child nodes across into + // the target node + reusableSVGContainer = reusableSVGContainer || document.createElement('div'); + reusableSVGContainer.innerHTML = '<svg>' + html.valueOf().toString() + '</svg>'; + var svgNode = reusableSVGContainer.firstChild; + + while (node.firstChild) { + node.removeChild(node.firstChild); + } + + while (svgNode.firstChild) { + node.appendChild(svgNode.firstChild); + } + + return; + } + } + + node.innerHTML = html; + }); + + /** + * HTML nodeType values that represent the type of the node + */ + var ELEMENT_NODE = 1; + var TEXT_NODE = 3; + var COMMENT_NODE = 8; + var DOCUMENT_NODE = 9; + var DOCUMENT_FRAGMENT_NODE = 11; + + /** + * Set the textContent property of a node. For text updates, it's faster + * to set the `nodeValue` of the Text node directly instead of using + * `.textContent` which will remove the existing node and create a new one. + * + * @param {DOMElement} node + * @param {string} text + * @internal + */ + + var setTextContent = function (node, text) { + if (text) { + var firstChild = node.firstChild; + + if (firstChild && firstChild === node.lastChild && firstChild.nodeType === TEXT_NODE) { + firstChild.nodeValue = text; + return; + } + } + + node.textContent = text; + }; + + // Do not use the below two methods directly! + // Instead use constants exported from DOMTopLevelEventTypes in ReactDOM. + // (It is the only module that is allowed to access these methods.) + function unsafeCastStringToDOMTopLevelType(topLevelType) { + return topLevelType; + } + function unsafeCastDOMTopLevelTypeToString(topLevelType) { + return topLevelType; + } + + /** + * Generate a mapping of standard vendor prefixes using the defined style property and event name. + * + * @param {string} styleProp + * @param {string} eventName + * @returns {object} + */ + + function makePrefixMap(styleProp, eventName) { + var prefixes = {}; + prefixes[styleProp.toLowerCase()] = eventName.toLowerCase(); + prefixes['Webkit' + styleProp] = 'webkit' + eventName; + prefixes['Moz' + styleProp] = 'moz' + eventName; + return prefixes; + } + /** + * A list of event names to a configurable list of vendor prefixes. + */ + + var vendorPrefixes = { + animationend: makePrefixMap('Animation', 'AnimationEnd'), + animationiteration: makePrefixMap('Animation', 'AnimationIteration'), + animationstart: makePrefixMap('Animation', 'AnimationStart'), + transitionend: makePrefixMap('Transition', 'TransitionEnd'), + }; + /** + * Event names that have already been detected and prefixed (if applicable). + */ + + var prefixedEventNames = {}; + /** + * Element to check for prefixes on. + */ + + var style = {}; + /** + * Bootstrap if a DOM exists. + */ + + if (canUseDOM) { + style = document.createElement('div').style; // On some platforms, in particular some releases of Android 4.x, + // the un-prefixed "animation" and "transition" properties are defined on the + // style object but the events that fire will still be prefixed, so we need + // to check if the un-prefixed events are usable, and if not remove them from the map. + + if (!('AnimationEvent' in window)) { + delete vendorPrefixes.animationend.animation; + delete vendorPrefixes.animationiteration.animation; + delete vendorPrefixes.animationstart.animation; + } // Same as above + + if (!('TransitionEvent' in window)) { + delete vendorPrefixes.transitionend.transition; + } + } + /** + * Attempts to determine the correct vendor prefixed event name. + * + * @param {string} eventName + * @returns {string} + */ + + function getVendorPrefixedEventName(eventName) { + if (prefixedEventNames[eventName]) { + return prefixedEventNames[eventName]; + } else if (!vendorPrefixes[eventName]) { + return eventName; + } + + var prefixMap = vendorPrefixes[eventName]; + + for (var styleProp in prefixMap) { + if (prefixMap.hasOwnProperty(styleProp) && styleProp in style) { + return (prefixedEventNames[eventName] = prefixMap[styleProp]); + } + } + + return eventName; + } + + /** + * To identify top level events in ReactDOM, we use constants defined by this + * module. This is the only module that uses the unsafe* methods to express + * that the constants actually correspond to the browser event names. This lets + * us save some bundle size by avoiding a top level type -> event name map. + * The rest of ReactDOM code should import top level types from this file. + */ + + var TOP_ABORT = unsafeCastStringToDOMTopLevelType('abort'); + var TOP_ANIMATION_END = unsafeCastStringToDOMTopLevelType( + getVendorPrefixedEventName('animationend'), + ); + var TOP_ANIMATION_ITERATION = unsafeCastStringToDOMTopLevelType( + getVendorPrefixedEventName('animationiteration'), + ); + var TOP_ANIMATION_START = unsafeCastStringToDOMTopLevelType( + getVendorPrefixedEventName('animationstart'), + ); + var TOP_BLUR = unsafeCastStringToDOMTopLevelType('blur'); + var TOP_CAN_PLAY = unsafeCastStringToDOMTopLevelType('canplay'); + var TOP_CAN_PLAY_THROUGH = unsafeCastStringToDOMTopLevelType('canplaythrough'); + var TOP_CANCEL = unsafeCastStringToDOMTopLevelType('cancel'); + var TOP_CHANGE = unsafeCastStringToDOMTopLevelType('change'); + var TOP_CLICK = unsafeCastStringToDOMTopLevelType('click'); + var TOP_CLOSE = unsafeCastStringToDOMTopLevelType('close'); + var TOP_COMPOSITION_END = unsafeCastStringToDOMTopLevelType('compositionend'); + var TOP_COMPOSITION_START = unsafeCastStringToDOMTopLevelType('compositionstart'); + var TOP_COMPOSITION_UPDATE = unsafeCastStringToDOMTopLevelType('compositionupdate'); + var TOP_CONTEXT_MENU = unsafeCastStringToDOMTopLevelType('contextmenu'); + var TOP_COPY = unsafeCastStringToDOMTopLevelType('copy'); + var TOP_CUT = unsafeCastStringToDOMTopLevelType('cut'); + var TOP_DOUBLE_CLICK = unsafeCastStringToDOMTopLevelType('dblclick'); + var TOP_AUX_CLICK = unsafeCastStringToDOMTopLevelType('auxclick'); + var TOP_DRAG = unsafeCastStringToDOMTopLevelType('drag'); + var TOP_DRAG_END = unsafeCastStringToDOMTopLevelType('dragend'); + var TOP_DRAG_ENTER = unsafeCastStringToDOMTopLevelType('dragenter'); + var TOP_DRAG_EXIT = unsafeCastStringToDOMTopLevelType('dragexit'); + var TOP_DRAG_LEAVE = unsafeCastStringToDOMTopLevelType('dragleave'); + var TOP_DRAG_OVER = unsafeCastStringToDOMTopLevelType('dragover'); + var TOP_DRAG_START = unsafeCastStringToDOMTopLevelType('dragstart'); + var TOP_DROP = unsafeCastStringToDOMTopLevelType('drop'); + var TOP_DURATION_CHANGE = unsafeCastStringToDOMTopLevelType('durationchange'); + var TOP_EMPTIED = unsafeCastStringToDOMTopLevelType('emptied'); + var TOP_ENCRYPTED = unsafeCastStringToDOMTopLevelType('encrypted'); + var TOP_ENDED = unsafeCastStringToDOMTopLevelType('ended'); + var TOP_ERROR = unsafeCastStringToDOMTopLevelType('error'); + var TOP_FOCUS = unsafeCastStringToDOMTopLevelType('focus'); + var TOP_GOT_POINTER_CAPTURE = unsafeCastStringToDOMTopLevelType('gotpointercapture'); + var TOP_INPUT = unsafeCastStringToDOMTopLevelType('input'); + var TOP_INVALID = unsafeCastStringToDOMTopLevelType('invalid'); + var TOP_KEY_DOWN = unsafeCastStringToDOMTopLevelType('keydown'); + var TOP_KEY_PRESS = unsafeCastStringToDOMTopLevelType('keypress'); + var TOP_KEY_UP = unsafeCastStringToDOMTopLevelType('keyup'); + var TOP_LOAD = unsafeCastStringToDOMTopLevelType('load'); + var TOP_LOAD_START = unsafeCastStringToDOMTopLevelType('loadstart'); + var TOP_LOADED_DATA = unsafeCastStringToDOMTopLevelType('loadeddata'); + var TOP_LOADED_METADATA = unsafeCastStringToDOMTopLevelType('loadedmetadata'); + var TOP_LOST_POINTER_CAPTURE = unsafeCastStringToDOMTopLevelType('lostpointercapture'); + var TOP_MOUSE_DOWN = unsafeCastStringToDOMTopLevelType('mousedown'); + var TOP_MOUSE_MOVE = unsafeCastStringToDOMTopLevelType('mousemove'); + var TOP_MOUSE_OUT = unsafeCastStringToDOMTopLevelType('mouseout'); + var TOP_MOUSE_OVER = unsafeCastStringToDOMTopLevelType('mouseover'); + var TOP_MOUSE_UP = unsafeCastStringToDOMTopLevelType('mouseup'); + var TOP_PASTE = unsafeCastStringToDOMTopLevelType('paste'); + var TOP_PAUSE = unsafeCastStringToDOMTopLevelType('pause'); + var TOP_PLAY = unsafeCastStringToDOMTopLevelType('play'); + var TOP_PLAYING = unsafeCastStringToDOMTopLevelType('playing'); + var TOP_POINTER_CANCEL = unsafeCastStringToDOMTopLevelType('pointercancel'); + var TOP_POINTER_DOWN = unsafeCastStringToDOMTopLevelType('pointerdown'); + + var TOP_POINTER_MOVE = unsafeCastStringToDOMTopLevelType('pointermove'); + var TOP_POINTER_OUT = unsafeCastStringToDOMTopLevelType('pointerout'); + var TOP_POINTER_OVER = unsafeCastStringToDOMTopLevelType('pointerover'); + var TOP_POINTER_UP = unsafeCastStringToDOMTopLevelType('pointerup'); + var TOP_PROGRESS = unsafeCastStringToDOMTopLevelType('progress'); + var TOP_RATE_CHANGE = unsafeCastStringToDOMTopLevelType('ratechange'); + var TOP_RESET = unsafeCastStringToDOMTopLevelType('reset'); + var TOP_SCROLL = unsafeCastStringToDOMTopLevelType('scroll'); + var TOP_SEEKED = unsafeCastStringToDOMTopLevelType('seeked'); + var TOP_SEEKING = unsafeCastStringToDOMTopLevelType('seeking'); + var TOP_SELECTION_CHANGE = unsafeCastStringToDOMTopLevelType('selectionchange'); + var TOP_STALLED = unsafeCastStringToDOMTopLevelType('stalled'); + var TOP_SUBMIT = unsafeCastStringToDOMTopLevelType('submit'); + var TOP_SUSPEND = unsafeCastStringToDOMTopLevelType('suspend'); + var TOP_TEXT_INPUT = unsafeCastStringToDOMTopLevelType('textInput'); + var TOP_TIME_UPDATE = unsafeCastStringToDOMTopLevelType('timeupdate'); + var TOP_TOGGLE = unsafeCastStringToDOMTopLevelType('toggle'); + var TOP_TOUCH_CANCEL = unsafeCastStringToDOMTopLevelType('touchcancel'); + var TOP_TOUCH_END = unsafeCastStringToDOMTopLevelType('touchend'); + var TOP_TOUCH_MOVE = unsafeCastStringToDOMTopLevelType('touchmove'); + var TOP_TOUCH_START = unsafeCastStringToDOMTopLevelType('touchstart'); + var TOP_TRANSITION_END = unsafeCastStringToDOMTopLevelType( + getVendorPrefixedEventName('transitionend'), + ); + var TOP_VOLUME_CHANGE = unsafeCastStringToDOMTopLevelType('volumechange'); + var TOP_WAITING = unsafeCastStringToDOMTopLevelType('waiting'); + var TOP_WHEEL = unsafeCastStringToDOMTopLevelType('wheel'); // List of events that need to be individually attached to media elements. + // Note that events in this list will *not* be listened to at the top level + // unless they're explicitly whitelisted in `ReactBrowserEventEmitter.listenTo`. + + var mediaEventTypes = [ + TOP_ABORT, + TOP_CAN_PLAY, + TOP_CAN_PLAY_THROUGH, + TOP_DURATION_CHANGE, + TOP_EMPTIED, + TOP_ENCRYPTED, + TOP_ENDED, + TOP_ERROR, + TOP_LOADED_DATA, + TOP_LOADED_METADATA, + TOP_LOAD_START, + TOP_PAUSE, + TOP_PLAY, + TOP_PLAYING, + TOP_PROGRESS, + TOP_RATE_CHANGE, + TOP_SEEKED, + TOP_SEEKING, + TOP_STALLED, + TOP_SUSPEND, + TOP_TIME_UPDATE, + TOP_VOLUME_CHANGE, + TOP_WAITING, + ]; + function getRawEventName(topLevelType) { + return unsafeCastDOMTopLevelTypeToString(topLevelType); + } + + /** + * `ReactInstanceMap` maintains a mapping from a public facing stateful + * instance (key) and the internal representation (value). This allows public + * methods to accept the user facing instance as an argument and map them back + * to internal methods. + * + * Note that this module is currently shared and assumed to be stateless. + * If this becomes an actual Map, that will break. + */ + + /** + * This API should be called `delete` but we'd have to make sure to always + * transform these to strings for IE support. When this transform is fully + * supported we can rename it. + */ + + function get(key) { + return key._reactInternalFiber; + } + function has(key) { + return key._reactInternalFiber !== undefined; + } + function set(key, value) { + key._reactInternalFiber = value; + } + + // Don't change these two values. They're used by React Dev Tools. + var NoEffect = + /* */ + 0; + var PerformedWork = + /* */ + 1; // You can change the rest (and add more). + + var Placement = + /* */ + 2; + var Update = + /* */ + 4; + var PlacementAndUpdate = + /* */ + 6; + var Deletion = + /* */ + 8; + var ContentReset = + /* */ + 16; + var Callback = + /* */ + 32; + var DidCapture = + /* */ + 64; + var Ref = + /* */ + 128; + var Snapshot = + /* */ + 256; + var Passive = + /* */ + 512; + var Hydrating = + /* */ + 1024; + var HydratingAndUpdate = + /* */ + 1028; // Passive & Update & Callback & Ref & Snapshot + + var LifecycleEffectMask = + /* */ + 932; // Union of all host effects + + var HostEffectMask = + /* */ + 2047; + var Incomplete = + /* */ + 2048; + var ShouldCapture = + /* */ + 4096; + + var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner; + function getNearestMountedFiber(fiber) { + var node = fiber; + var nearestMounted = fiber; + + if (!fiber.alternate) { + // If there is no alternate, this might be a new tree that isn't inserted + // yet. If it is, then it will have a pending insertion effect on it. + var nextNode = node; + + do { + node = nextNode; + + if ((node.effectTag & (Placement | Hydrating)) !== NoEffect) { + // This is an insertion or in-progress hydration. The nearest possible + // mounted fiber is the parent but we need to continue to figure out + // if that one is still mounted. + nearestMounted = node.return; + } + + nextNode = node.return; + } while (nextNode); + } else { + while (node.return) { + node = node.return; + } + } + + if (node.tag === HostRoot) { + // TODO: Check if this was a nested HostRoot when used with + // renderContainerIntoSubtree. + return nearestMounted; + } // If we didn't hit the root, that means that we're in an disconnected tree + // that has been unmounted. + + return null; + } + function getSuspenseInstanceFromFiber(fiber) { + if (fiber.tag === SuspenseComponent) { + var suspenseState = fiber.memoizedState; + + if (suspenseState === null) { + var current = fiber.alternate; + + if (current !== null) { + suspenseState = current.memoizedState; + } + } + + if (suspenseState !== null) { + return suspenseState.dehydrated; + } + } + + return null; + } + function getContainerFromFiber(fiber) { + return fiber.tag === HostRoot ? fiber.stateNode.containerInfo : null; + } + function isFiberMounted(fiber) { + return getNearestMountedFiber(fiber) === fiber; + } + function isMounted(component) { + { + var owner = ReactCurrentOwner.current; + + if (owner !== null && owner.tag === ClassComponent) { + var ownerFiber = owner; + var instance = ownerFiber.stateNode; + !instance._warnedAboutRefsInRender + ? warningWithoutStack$1( + false, + '%s is accessing isMounted inside its render() function. ' + + 'render() should be a pure function of props and state. It should ' + + 'never access something that requires stale data from the previous ' + + 'render, such as refs. Move this logic to componentDidMount and ' + + 'componentDidUpdate instead.', + getComponentName(ownerFiber.type) || 'A component', + ) + : void 0; + instance._warnedAboutRefsInRender = true; + } + } + + var fiber = get(component); + + if (!fiber) { + return false; + } + + return getNearestMountedFiber(fiber) === fiber; + } + + function assertIsMounted(fiber) { + if (!(getNearestMountedFiber(fiber) === fiber)) { + { + throw Error('Unable to find node on an unmounted component.'); + } + } + } + + function findCurrentFiberUsingSlowPath(fiber) { + var alternate = fiber.alternate; + + if (!alternate) { + // If there is no alternate, then we only need to check if it is mounted. + var nearestMounted = getNearestMountedFiber(fiber); + + if (!(nearestMounted !== null)) { + { + throw Error('Unable to find node on an unmounted component.'); + } + } + + if (nearestMounted !== fiber) { + return null; + } + + return fiber; + } // If we have two possible branches, we'll walk backwards up to the root + // to see what path the root points to. On the way we may hit one of the + // special cases and we'll deal with them. + + var a = fiber; + var b = alternate; + + while (true) { + var parentA = a.return; + + if (parentA === null) { + // We're at the root. + break; + } + + var parentB = parentA.alternate; + + if (parentB === null) { + // There is no alternate. This is an unusual case. Currently, it only + // happens when a Suspense component is hidden. An extra fragment fiber + // is inserted in between the Suspense fiber and its children. Skip + // over this extra fragment fiber and proceed to the next parent. + var nextParent = parentA.return; + + if (nextParent !== null) { + a = b = nextParent; + continue; + } // If there's no parent, we're at the root. + + break; + } // If both copies of the parent fiber point to the same child, we can + // assume that the child is current. This happens when we bailout on low + // priority: the bailed out fiber's child reuses the current child. + + if (parentA.child === parentB.child) { + var child = parentA.child; + + while (child) { + if (child === a) { + // We've determined that A is the current branch. + assertIsMounted(parentA); + return fiber; + } + + if (child === b) { + // We've determined that B is the current branch. + assertIsMounted(parentA); + return alternate; + } + + child = child.sibling; + } // We should never have an alternate for any mounting node. So the only + // way this could possibly happen is if this was unmounted, if at all. + + { + { + throw Error('Unable to find node on an unmounted component.'); + } + } + } + + if (a.return !== b.return) { + // The return pointer of A and the return pointer of B point to different + // fibers. We assume that return pointers never criss-cross, so A must + // belong to the child set of A.return, and B must belong to the child + // set of B.return. + a = parentA; + b = parentB; + } else { + // The return pointers point to the same fiber. We'll have to use the + // default, slow path: scan the child sets of each parent alternate to see + // which child belongs to which set. + // + // Search parent A's child set + var didFindChild = false; + var _child = parentA.child; + + while (_child) { + if (_child === a) { + didFindChild = true; + a = parentA; + b = parentB; + break; + } + + if (_child === b) { + didFindChild = true; + b = parentA; + a = parentB; + break; + } + + _child = _child.sibling; + } + + if (!didFindChild) { + // Search parent B's child set + _child = parentB.child; + + while (_child) { + if (_child === a) { + didFindChild = true; + a = parentB; + b = parentA; + break; + } + + if (_child === b) { + didFindChild = true; + b = parentB; + a = parentA; + break; + } + + _child = _child.sibling; + } + + if (!didFindChild) { + { + throw Error( + 'Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue.', + ); + } + } + } + } + + if (!(a.alternate === b)) { + { + throw Error( + "Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue.", + ); + } + } + } // If the root is not a host container, we're in a disconnected tree. I.e. + // unmounted. + + if (!(a.tag === HostRoot)) { + { + throw Error('Unable to find node on an unmounted component.'); + } + } + + if (a.stateNode.current === a) { + // We've determined that A is the current branch. + return fiber; + } // Otherwise B has to be current branch. + + return alternate; + } + function findCurrentHostFiber(parent) { + var currentParent = findCurrentFiberUsingSlowPath(parent); + + if (!currentParent) { + return null; + } // Next we'll drill down this component to find the first HostComponent/Text. + + var node = currentParent; + + while (true) { + if (node.tag === HostComponent || node.tag === HostText) { + return node; + } else if (node.child) { + node.child.return = node; + node = node.child; + continue; + } + + if (node === currentParent) { + return null; + } + + while (!node.sibling) { + if (!node.return || node.return === currentParent) { + return null; + } + + node = node.return; + } + + node.sibling.return = node.return; + node = node.sibling; + } // Flow needs the return null here, but ESLint complains about it. + // eslint-disable-next-line no-unreachable + + return null; + } + function findCurrentHostFiberWithNoPortals(parent) { + var currentParent = findCurrentFiberUsingSlowPath(parent); + + if (!currentParent) { + return null; + } // Next we'll drill down this component to find the first HostComponent/Text. + + var node = currentParent; + + while (true) { + if ( + node.tag === HostComponent || + node.tag === HostText || + (enableFundamentalAPI && node.tag === FundamentalComponent) + ) { + return node; + } else if (node.child && node.tag !== HostPortal) { + node.child.return = node; + node = node.child; + continue; + } + + if (node === currentParent) { + return null; + } + + while (!node.sibling) { + if (!node.return || node.return === currentParent) { + return null; + } + + node = node.return; + } + + node.sibling.return = node.return; + node = node.sibling; + } // Flow needs the return null here, but ESLint complains about it. + // eslint-disable-next-line no-unreachable + + return null; + } + + var attemptSynchronousHydration; + function setAttemptSynchronousHydration(fn) { + attemptSynchronousHydration = fn; + } + var attemptUserBlockingHydration; + function setAttemptUserBlockingHydration(fn) { + attemptUserBlockingHydration = fn; + } + var attemptContinuousHydration; + function setAttemptContinuousHydration(fn) { + attemptContinuousHydration = fn; + } + var attemptHydrationAtCurrentPriority; + function setAttemptHydrationAtCurrentPriority(fn) { + attemptHydrationAtCurrentPriority = fn; + } // TODO: Upgrade this definition once we're on a newer version of Flow that + // has this definition built-in. + + var hasScheduledReplayAttempt = false; // The queue of discrete events to be replayed. + + var queuedDiscreteEvents = []; // Indicates if any continuous event targets are non-null for early bailout. + + // if the last target was dehydrated. + + var queuedFocus = null; + var queuedDrag = null; + var queuedMouse = null; // For pointer events there can be one latest event per pointerId. + + var queuedPointers = new Map(); + var queuedPointerCaptures = new Map(); // We could consider replaying selectionchange and touchmoves too. + + var queuedExplicitHydrationTargets = []; + function hasQueuedDiscreteEvents() { + return queuedDiscreteEvents.length > 0; + } + + var discreteReplayableEvents = [ + TOP_MOUSE_DOWN, + TOP_MOUSE_UP, + TOP_TOUCH_CANCEL, + TOP_TOUCH_END, + TOP_TOUCH_START, + TOP_AUX_CLICK, + TOP_DOUBLE_CLICK, + TOP_POINTER_CANCEL, + TOP_POINTER_DOWN, + TOP_POINTER_UP, + TOP_DRAG_END, + TOP_DRAG_START, + TOP_DROP, + TOP_COMPOSITION_END, + TOP_COMPOSITION_START, + TOP_KEY_DOWN, + TOP_KEY_PRESS, + TOP_KEY_UP, + TOP_INPUT, + TOP_TEXT_INPUT, + TOP_CLOSE, + TOP_CANCEL, + TOP_COPY, + TOP_CUT, + TOP_PASTE, + TOP_CLICK, + TOP_CHANGE, + TOP_CONTEXT_MENU, + TOP_RESET, + TOP_SUBMIT, + ]; + var continuousReplayableEvents = [ + TOP_FOCUS, + TOP_BLUR, + TOP_DRAG_ENTER, + TOP_DRAG_LEAVE, + TOP_MOUSE_OVER, + TOP_MOUSE_OUT, + TOP_POINTER_OVER, + TOP_POINTER_OUT, + TOP_GOT_POINTER_CAPTURE, + TOP_LOST_POINTER_CAPTURE, + ]; + function isReplayableDiscreteEvent(eventType) { + return discreteReplayableEvents.indexOf(eventType) > -1; + } + + function trapReplayableEvent(topLevelType, document, listeningSet) { + listenToTopLevel(topLevelType, document, listeningSet); + + if (enableFlareAPI) { + // Trap events for the responder system. + var passiveEventKey = unsafeCastDOMTopLevelTypeToString(topLevelType) + '_passive'; + + if (!listeningSet.has(passiveEventKey)) { + trapEventForResponderEventSystem(document, topLevelType, true); + listeningSet.add(passiveEventKey); + } // TODO: This listens to all events as active which might have + // undesirable effects. It's also unnecessary to have both + // passive and active listeners. Instead, we could start with + // a passive and upgrade it to an active one if needed. + // For replaying purposes the active is never needed since we + // currently don't preventDefault. + + var activeEventKey = unsafeCastDOMTopLevelTypeToString(topLevelType) + '_active'; + + if (!listeningSet.has(activeEventKey)) { + trapEventForResponderEventSystem(document, topLevelType, false); + listeningSet.add(activeEventKey); + } + } + } + + function eagerlyTrapReplayableEvents(document) { + var listeningSet = getListeningSetForElement(document); // Discrete + + discreteReplayableEvents.forEach(function (topLevelType) { + trapReplayableEvent(topLevelType, document, listeningSet); + }); // Continuous + + continuousReplayableEvents.forEach(function (topLevelType) { + trapReplayableEvent(topLevelType, document, listeningSet); + }); + } + + function createQueuedReplayableEvent(blockedOn, topLevelType, eventSystemFlags, nativeEvent) { + return { + blockedOn: blockedOn, + topLevelType: topLevelType, + eventSystemFlags: eventSystemFlags | IS_REPLAYED, + nativeEvent: nativeEvent, + }; + } + + function queueDiscreteEvent(blockedOn, topLevelType, eventSystemFlags, nativeEvent) { + var queuedEvent = createQueuedReplayableEvent( + blockedOn, + topLevelType, + eventSystemFlags, + nativeEvent, + ); + queuedDiscreteEvents.push(queuedEvent); + + if (enableSelectiveHydration) { + if (queuedDiscreteEvents.length === 1) { + // If this was the first discrete event, we might be able to + // synchronously unblock it so that preventDefault still works. + while (queuedEvent.blockedOn !== null) { + var _fiber = getInstanceFromNode$1(queuedEvent.blockedOn); + + if (_fiber === null) { + break; + } + + attemptSynchronousHydration(_fiber); + + if (queuedEvent.blockedOn === null) { + // We got unblocked by hydration. Let's try again. + replayUnblockedEvents(); // If we're reblocked, on an inner boundary, we might need + // to attempt hydrating that one. + + continue; + } else { + // We're still blocked from hydation, we have to give up + // and replay later. + break; + } + } + } + } + } // Resets the replaying for this type of continuous event to no event. + + function clearIfContinuousEvent(topLevelType, nativeEvent) { + switch (topLevelType) { + case TOP_FOCUS: + case TOP_BLUR: + queuedFocus = null; + break; + + case TOP_DRAG_ENTER: + case TOP_DRAG_LEAVE: + queuedDrag = null; + break; + + case TOP_MOUSE_OVER: + case TOP_MOUSE_OUT: + queuedMouse = null; + break; + + case TOP_POINTER_OVER: + case TOP_POINTER_OUT: { + var pointerId = nativeEvent.pointerId; + queuedPointers.delete(pointerId); + break; + } + + case TOP_GOT_POINTER_CAPTURE: + case TOP_LOST_POINTER_CAPTURE: { + var _pointerId = nativeEvent.pointerId; + queuedPointerCaptures.delete(_pointerId); + break; + } + } + } + + function accumulateOrCreateContinuousQueuedReplayableEvent( + existingQueuedEvent, + blockedOn, + topLevelType, + eventSystemFlags, + nativeEvent, + ) { + if (existingQueuedEvent === null || existingQueuedEvent.nativeEvent !== nativeEvent) { + var queuedEvent = createQueuedReplayableEvent( + blockedOn, + topLevelType, + eventSystemFlags, + nativeEvent, + ); + + if (blockedOn !== null) { + var _fiber2 = getInstanceFromNode$1(blockedOn); + + if (_fiber2 !== null) { + // Attempt to increase the priority of this target. + attemptContinuousHydration(_fiber2); + } + } + + return queuedEvent; + } // If we have already queued this exact event, then it's because + // the different event systems have different DOM event listeners. + // We can accumulate the flags and store a single event to be + // replayed. + + existingQueuedEvent.eventSystemFlags |= eventSystemFlags; + return existingQueuedEvent; + } + + function queueIfContinuousEvent(blockedOn, topLevelType, eventSystemFlags, nativeEvent) { + // These set relatedTarget to null because the replayed event will be treated as if we + // moved from outside the window (no target) onto the target once it hydrates. + // Instead of mutating we could clone the event. + switch (topLevelType) { + case TOP_FOCUS: { + var focusEvent = nativeEvent; + queuedFocus = accumulateOrCreateContinuousQueuedReplayableEvent( + queuedFocus, + blockedOn, + topLevelType, + eventSystemFlags, + focusEvent, + ); + return true; + } + + case TOP_DRAG_ENTER: { + var dragEvent = nativeEvent; + queuedDrag = accumulateOrCreateContinuousQueuedReplayableEvent( + queuedDrag, + blockedOn, + topLevelType, + eventSystemFlags, + dragEvent, + ); + return true; + } + + case TOP_MOUSE_OVER: { + var mouseEvent = nativeEvent; + queuedMouse = accumulateOrCreateContinuousQueuedReplayableEvent( + queuedMouse, + blockedOn, + topLevelType, + eventSystemFlags, + mouseEvent, + ); + return true; + } + + case TOP_POINTER_OVER: { + var pointerEvent = nativeEvent; + var pointerId = pointerEvent.pointerId; + queuedPointers.set( + pointerId, + accumulateOrCreateContinuousQueuedReplayableEvent( + queuedPointers.get(pointerId) || null, + blockedOn, + topLevelType, + eventSystemFlags, + pointerEvent, + ), + ); + return true; + } + + case TOP_GOT_POINTER_CAPTURE: { + var _pointerEvent = nativeEvent; + var _pointerId2 = _pointerEvent.pointerId; + queuedPointerCaptures.set( + _pointerId2, + accumulateOrCreateContinuousQueuedReplayableEvent( + queuedPointerCaptures.get(_pointerId2) || null, + blockedOn, + topLevelType, + eventSystemFlags, + _pointerEvent, + ), + ); + return true; + } + } + + return false; + } // Check if this target is unblocked. Returns true if it's unblocked. + + function attemptExplicitHydrationTarget(queuedTarget) { + // TODO: This function shares a lot of logic with attemptToDispatchEvent. + // Try to unify them. It's a bit tricky since it would require two return + // values. + var targetInst = getClosestInstanceFromNode(queuedTarget.target); + + if (targetInst !== null) { + var nearestMounted = getNearestMountedFiber(targetInst); + + if (nearestMounted !== null) { + var tag = nearestMounted.tag; + + if (tag === SuspenseComponent) { + var instance = getSuspenseInstanceFromFiber(nearestMounted); + + if (instance !== null) { + // We're blocked on hydrating this boundary. + // Increase its priority. + queuedTarget.blockedOn = instance; + Scheduler.unstable_runWithPriority(queuedTarget.priority, function () { + attemptHydrationAtCurrentPriority(nearestMounted); + }); + return; + } + } else if (tag === HostRoot) { + var root = nearestMounted.stateNode; + + if (root.hydrate) { + queuedTarget.blockedOn = getContainerFromFiber(nearestMounted); // We don't currently have a way to increase the priority of + // a root other than sync. + + return; + } + } + } + } + + queuedTarget.blockedOn = null; + } + + function queueExplicitHydrationTarget(target) { + if (enableSelectiveHydration) { + var priority = Scheduler.unstable_getCurrentPriorityLevel(); + var queuedTarget = { + blockedOn: null, + target: target, + priority: priority, + }; + var i = 0; + + for (; i < queuedExplicitHydrationTargets.length; i++) { + if (priority <= queuedExplicitHydrationTargets[i].priority) { + break; + } + } + + queuedExplicitHydrationTargets.splice(i, 0, queuedTarget); + + if (i === 0) { + attemptExplicitHydrationTarget(queuedTarget); + } + } + } + + function attemptReplayContinuousQueuedEvent(queuedEvent) { + if (queuedEvent.blockedOn !== null) { + return false; + } + + var nextBlockedOn = attemptToDispatchEvent( + queuedEvent.topLevelType, + queuedEvent.eventSystemFlags, + queuedEvent.nativeEvent, + ); + + if (nextBlockedOn !== null) { + // We're still blocked. Try again later. + var _fiber3 = getInstanceFromNode$1(nextBlockedOn); + + if (_fiber3 !== null) { + attemptContinuousHydration(_fiber3); + } + + queuedEvent.blockedOn = nextBlockedOn; + return false; + } + + return true; + } + + function attemptReplayContinuousQueuedEventInMap(queuedEvent, key, map) { + if (attemptReplayContinuousQueuedEvent(queuedEvent)) { + map.delete(key); + } + } + + function replayUnblockedEvents() { + hasScheduledReplayAttempt = false; // First replay discrete events. + + while (queuedDiscreteEvents.length > 0) { + var nextDiscreteEvent = queuedDiscreteEvents[0]; + + if (nextDiscreteEvent.blockedOn !== null) { + // We're still blocked. + // Increase the priority of this boundary to unblock + // the next discrete event. + var _fiber4 = getInstanceFromNode$1(nextDiscreteEvent.blockedOn); + + if (_fiber4 !== null) { + attemptUserBlockingHydration(_fiber4); + } + + break; + } + + var nextBlockedOn = attemptToDispatchEvent( + nextDiscreteEvent.topLevelType, + nextDiscreteEvent.eventSystemFlags, + nextDiscreteEvent.nativeEvent, + ); + + if (nextBlockedOn !== null) { + // We're still blocked. Try again later. + nextDiscreteEvent.blockedOn = nextBlockedOn; + } else { + // We've successfully replayed the first event. Let's try the next one. + queuedDiscreteEvents.shift(); + } + } // Next replay any continuous events. + + if (queuedFocus !== null && attemptReplayContinuousQueuedEvent(queuedFocus)) { + queuedFocus = null; + } + + if (queuedDrag !== null && attemptReplayContinuousQueuedEvent(queuedDrag)) { + queuedDrag = null; + } + + if (queuedMouse !== null && attemptReplayContinuousQueuedEvent(queuedMouse)) { + queuedMouse = null; + } + + queuedPointers.forEach(attemptReplayContinuousQueuedEventInMap); + queuedPointerCaptures.forEach(attemptReplayContinuousQueuedEventInMap); + } + + function scheduleCallbackIfUnblocked(queuedEvent, unblocked) { + if (queuedEvent.blockedOn === unblocked) { + queuedEvent.blockedOn = null; + + if (!hasScheduledReplayAttempt) { + hasScheduledReplayAttempt = true; // Schedule a callback to attempt replaying as many events as are + // now unblocked. This first might not actually be unblocked yet. + // We could check it early to avoid scheduling an unnecessary callback. + + Scheduler.unstable_scheduleCallback(Scheduler.unstable_NormalPriority, replayUnblockedEvents); + } + } + } + + function retryIfBlockedOn(unblocked) { + // Mark anything that was blocked on this as no longer blocked + // and eligible for a replay. + if (queuedDiscreteEvents.length > 0) { + scheduleCallbackIfUnblocked(queuedDiscreteEvents[0], unblocked); // This is a exponential search for each boundary that commits. I think it's + // worth it because we expect very few discrete events to queue up and once + // we are actually fully unblocked it will be fast to replay them. + + for (var i = 1; i < queuedDiscreteEvents.length; i++) { + var queuedEvent = queuedDiscreteEvents[i]; + + if (queuedEvent.blockedOn === unblocked) { + queuedEvent.blockedOn = null; + } + } + } + + if (queuedFocus !== null) { + scheduleCallbackIfUnblocked(queuedFocus, unblocked); + } + + if (queuedDrag !== null) { + scheduleCallbackIfUnblocked(queuedDrag, unblocked); + } + + if (queuedMouse !== null) { + scheduleCallbackIfUnblocked(queuedMouse, unblocked); + } + + var unblock = function (queuedEvent) { + return scheduleCallbackIfUnblocked(queuedEvent, unblocked); + }; + + queuedPointers.forEach(unblock); + queuedPointerCaptures.forEach(unblock); + + for (var _i = 0; _i < queuedExplicitHydrationTargets.length; _i++) { + var queuedTarget = queuedExplicitHydrationTargets[_i]; + + if (queuedTarget.blockedOn === unblocked) { + queuedTarget.blockedOn = null; + } + } + + while (queuedExplicitHydrationTargets.length > 0) { + var nextExplicitTarget = queuedExplicitHydrationTargets[0]; + + if (nextExplicitTarget.blockedOn !== null) { + // We're still blocked. + break; + } else { + attemptExplicitHydrationTarget(nextExplicitTarget); + + if (nextExplicitTarget.blockedOn === null) { + // We're unblocked. + queuedExplicitHydrationTargets.shift(); + } + } + } + } + + function addEventBubbleListener(element, eventType, listener) { + element.addEventListener(eventType, listener, false); + } + function addEventCaptureListener(element, eventType, listener) { + element.addEventListener(eventType, listener, true); + } + function addEventCaptureListenerWithPassiveFlag(element, eventType, listener, passive) { + element.addEventListener(eventType, listener, { + capture: true, + passive: passive, + }); + } + + /** + * Gets the target node from a native browser event by accounting for + * inconsistencies in browser DOM APIs. + * + * @param {object} nativeEvent Native browser event. + * @return {DOMEventTarget} Target node. + */ + + function getEventTarget(nativeEvent) { + // Fallback to nativeEvent.srcElement for IE9 + // https://github.com/facebook/react/issues/12506 + var target = nativeEvent.target || nativeEvent.srcElement || window; // Normalize SVG <use> element events #4963 + + if (target.correspondingUseElement) { + target = target.correspondingUseElement; + } // Safari may fire events on text nodes (Node.TEXT_NODE is 3). + // @see http://www.quirksmode.org/js/events_properties.html + + return target.nodeType === TEXT_NODE ? target.parentNode : target; + } + + function getParent(inst) { + do { + inst = inst.return; // TODO: If this is a HostRoot we might want to bail out. + // That is depending on if we want nested subtrees (layers) to bubble + // events to their parent. We could also go through parentNode on the + // host node but that wouldn't work for React Native and doesn't let us + // do the portal feature. + } while (inst && inst.tag !== HostComponent); + + if (inst) { + return inst; + } + + return null; + } + /** + * Return the lowest common ancestor of A and B, or null if they are in + * different trees. + */ + + function getLowestCommonAncestor(instA, instB) { + var depthA = 0; + + for (var tempA = instA; tempA; tempA = getParent(tempA)) { + depthA++; + } + + var depthB = 0; + + for (var tempB = instB; tempB; tempB = getParent(tempB)) { + depthB++; + } // If A is deeper, crawl up. + + while (depthA - depthB > 0) { + instA = getParent(instA); + depthA--; + } // If B is deeper, crawl up. + + while (depthB - depthA > 0) { + instB = getParent(instB); + depthB--; + } // Walk in lockstep until we find a match. + + var depth = depthA; + + while (depth--) { + if (instA === instB || instA === instB.alternate) { + return instA; + } + + instA = getParent(instA); + instB = getParent(instB); + } + + return null; + } + /** + * Return if A is an ancestor of B. + */ + + /** + * Return the parent instance of the passed-in instance. + */ + + /** + * Simulates the traversal of a two-phase, capture/bubble event dispatch. + */ + + function traverseTwoPhase(inst, fn, arg) { + var path = []; + + while (inst) { + path.push(inst); + inst = getParent(inst); + } + + var i; + + for (i = path.length; i-- > 0; ) { + fn(path[i], 'captured', arg); + } + + for (i = 0; i < path.length; i++) { + fn(path[i], 'bubbled', arg); + } + } + /** + * Traverses the ID hierarchy and invokes the supplied `cb` on any IDs that + * should would receive a `mouseEnter` or `mouseLeave` event. + * + * Does not invoke the callback on the nearest common ancestor because nothing + * "entered" or "left" that element. + */ + + function traverseEnterLeave(from, to, fn, argFrom, argTo) { + var common = from && to ? getLowestCommonAncestor(from, to) : null; + var pathFrom = []; + + while (true) { + if (!from) { + break; + } + + if (from === common) { + break; + } + + var alternate = from.alternate; + + if (alternate !== null && alternate === common) { + break; + } + + pathFrom.push(from); + from = getParent(from); + } + + var pathTo = []; + + while (true) { + if (!to) { + break; + } + + if (to === common) { + break; + } + + var _alternate = to.alternate; + + if (_alternate !== null && _alternate === common) { + break; + } + + pathTo.push(to); + to = getParent(to); + } + + for (var i = 0; i < pathFrom.length; i++) { + fn(pathFrom[i], 'bubbled', argFrom); + } + + for (var _i = pathTo.length; _i-- > 0; ) { + fn(pathTo[_i], 'captured', argTo); + } + } + + /** + * Some event types have a notion of different registration names for different + * "phases" of propagation. This finds listeners by a given phase. + */ + function listenerAtPhase(inst, event, propagationPhase) { + var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase]; + return getListener(inst, registrationName); + } + /** + * A small set of propagation patterns, each of which will accept a small amount + * of information, and generate a set of "dispatch ready event objects" - which + * are sets of events that have already been annotated with a set of dispatched + * listener functions/ids. The API is designed this way to discourage these + * propagation strategies from actually executing the dispatches, since we + * always want to collect the entire set of dispatches before executing even a + * single one. + */ + + /** + * Tags a `SyntheticEvent` with dispatched listeners. Creating this function + * here, allows us to not have to bind or create functions for each event. + * Mutating the event's members allows us to not have to create a wrapping + * "dispatch" object that pairs the event with the listener. + */ + + function accumulateDirectionalDispatches(inst, phase, event) { + { + !inst ? warningWithoutStack$1(false, 'Dispatching inst must not be null') : void 0; + } + + var listener = listenerAtPhase(inst, event, phase); + + if (listener) { + event._dispatchListeners = accumulateInto(event._dispatchListeners, listener); + event._dispatchInstances = accumulateInto(event._dispatchInstances, inst); + } + } + /** + * Collect dispatches (must be entirely collected before dispatching - see unit + * tests). Lazily allocate the array to conserve memory. We must loop through + * each event and perform the traversal for each one. We cannot perform a + * single traversal for the entire collection of events because each event may + * have a different target. + */ + + function accumulateTwoPhaseDispatchesSingle(event) { + if (event && event.dispatchConfig.phasedRegistrationNames) { + traverseTwoPhase(event._targetInst, accumulateDirectionalDispatches, event); + } + } + /** + * Accumulates without regard to direction, does not look for phased + * registration names. Same as `accumulateDirectDispatchesSingle` but without + * requiring that the `dispatchMarker` be the same as the dispatched ID. + */ + + function accumulateDispatches(inst, ignoredDirection, event) { + if (inst && event && event.dispatchConfig.registrationName) { + var registrationName = event.dispatchConfig.registrationName; + var listener = getListener(inst, registrationName); + + if (listener) { + event._dispatchListeners = accumulateInto(event._dispatchListeners, listener); + event._dispatchInstances = accumulateInto(event._dispatchInstances, inst); + } + } + } + /** + * Accumulates dispatches on an `SyntheticEvent`, but only for the + * `dispatchMarker`. + * @param {SyntheticEvent} event + */ + + function accumulateDirectDispatchesSingle(event) { + if (event && event.dispatchConfig.registrationName) { + accumulateDispatches(event._targetInst, null, event); + } + } + + function accumulateTwoPhaseDispatches(events) { + forEachAccumulated(events, accumulateTwoPhaseDispatchesSingle); + } + + function accumulateEnterLeaveDispatches(leave, enter, from, to) { + traverseEnterLeave(from, to, accumulateDispatches, leave, enter); + } + function accumulateDirectDispatches(events) { + forEachAccumulated(events, accumulateDirectDispatchesSingle); + } + + /* eslint valid-typeof: 0 */ + var EVENT_POOL_SIZE = 10; + /** + * @interface Event + * @see http://www.w3.org/TR/DOM-Level-3-Events/ + */ + + var EventInterface = { + type: null, + target: null, + // currentTarget is set when dispatching; no use in copying it here + currentTarget: function () { + return null; + }, + eventPhase: null, + bubbles: null, + cancelable: null, + timeStamp: function (event) { + return event.timeStamp || Date.now(); + }, + defaultPrevented: null, + isTrusted: null, + }; + + function functionThatReturnsTrue() { + return true; + } + + function functionThatReturnsFalse() { + return false; + } + /** + * Synthetic events are dispatched by event plugins, typically in response to a + * top-level event delegation handler. + * + * These systems should generally use pooling to reduce the frequency of garbage + * collection. The system should check `isPersistent` to determine whether the + * event should be released into the pool after being dispatched. Users that + * need a persisted event should invoke `persist`. + * + * Synthetic events (and subclasses) implement the DOM Level 3 Events API by + * normalizing browser quirks. Subclasses do not necessarily have to implement a + * DOM interface; custom application-specific events can also subclass this. + * + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {*} targetInst Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @param {DOMEventTarget} nativeEventTarget Target node. + */ + + function SyntheticEvent(dispatchConfig, targetInst, nativeEvent, nativeEventTarget) { + { + // these have a getter/setter for warnings + delete this.nativeEvent; + delete this.preventDefault; + delete this.stopPropagation; + delete this.isDefaultPrevented; + delete this.isPropagationStopped; + } + + this.dispatchConfig = dispatchConfig; + this._targetInst = targetInst; + this.nativeEvent = nativeEvent; + var Interface = this.constructor.Interface; + + for (var propName in Interface) { + if (!Interface.hasOwnProperty(propName)) { + continue; + } + + { + delete this[propName]; // this has a getter/setter for warnings + } + + var normalize = Interface[propName]; + + if (normalize) { + this[propName] = normalize(nativeEvent); + } else { + if (propName === 'target') { + this.target = nativeEventTarget; + } else { + this[propName] = nativeEvent[propName]; + } + } + } + + var defaultPrevented = + nativeEvent.defaultPrevented != null + ? nativeEvent.defaultPrevented + : nativeEvent.returnValue === false; + + if (defaultPrevented) { + this.isDefaultPrevented = functionThatReturnsTrue; + } else { + this.isDefaultPrevented = functionThatReturnsFalse; + } + + this.isPropagationStopped = functionThatReturnsFalse; + return this; + } + + _assign(SyntheticEvent.prototype, { + preventDefault: function () { + this.defaultPrevented = true; + var event = this.nativeEvent; + + if (!event) { + return; + } + + if (event.preventDefault) { + event.preventDefault(); + } else if (typeof event.returnValue !== 'unknown') { + event.returnValue = false; + } + + this.isDefaultPrevented = functionThatReturnsTrue; + }, + stopPropagation: function () { + var event = this.nativeEvent; + + if (!event) { + return; + } + + if (event.stopPropagation) { + event.stopPropagation(); + } else if (typeof event.cancelBubble !== 'unknown') { + // The ChangeEventPlugin registers a "propertychange" event for + // IE. This event does not support bubbling or cancelling, and + // any references to cancelBubble throw "Member not found". A + // typeof check of "unknown" circumvents this issue (and is also + // IE specific). + event.cancelBubble = true; + } + + this.isPropagationStopped = functionThatReturnsTrue; + }, + + /** + * We release all dispatched `SyntheticEvent`s after each event loop, adding + * them back into the pool. This allows a way to hold onto a reference that + * won't be added back into the pool. + */ + persist: function () { + this.isPersistent = functionThatReturnsTrue; + }, + + /** + * Checks if this event should be released back into the pool. + * + * @return {boolean} True if this should not be released, false otherwise. + */ + isPersistent: functionThatReturnsFalse, + + /** + * `PooledClass` looks for `destructor` on each instance it releases. + */ + destructor: function () { + var Interface = this.constructor.Interface; + + for (var propName in Interface) { + { + Object.defineProperty( + this, + propName, + getPooledWarningPropertyDefinition(propName, Interface[propName]), + ); + } + } + + this.dispatchConfig = null; + this._targetInst = null; + this.nativeEvent = null; + this.isDefaultPrevented = functionThatReturnsFalse; + this.isPropagationStopped = functionThatReturnsFalse; + this._dispatchListeners = null; + this._dispatchInstances = null; + + { + Object.defineProperty( + this, + 'nativeEvent', + getPooledWarningPropertyDefinition('nativeEvent', null), + ); + Object.defineProperty( + this, + 'isDefaultPrevented', + getPooledWarningPropertyDefinition('isDefaultPrevented', functionThatReturnsFalse), + ); + Object.defineProperty( + this, + 'isPropagationStopped', + getPooledWarningPropertyDefinition('isPropagationStopped', functionThatReturnsFalse), + ); + Object.defineProperty( + this, + 'preventDefault', + getPooledWarningPropertyDefinition('preventDefault', function () {}), + ); + Object.defineProperty( + this, + 'stopPropagation', + getPooledWarningPropertyDefinition('stopPropagation', function () {}), + ); + } + }, + }); + + SyntheticEvent.Interface = EventInterface; + /** + * Helper to reduce boilerplate when creating subclasses. + */ + + SyntheticEvent.extend = function (Interface) { + var Super = this; + + var E = function () {}; + + E.prototype = Super.prototype; + var prototype = new E(); + + function Class() { + return Super.apply(this, arguments); + } + + _assign(prototype, Class.prototype); + + Class.prototype = prototype; + Class.prototype.constructor = Class; + Class.Interface = _assign({}, Super.Interface, Interface); + Class.extend = Super.extend; + addEventPoolingTo(Class); + return Class; + }; + + addEventPoolingTo(SyntheticEvent); + /** + * Helper to nullify syntheticEvent instance properties when destructing + * + * @param {String} propName + * @param {?object} getVal + * @return {object} defineProperty object + */ + + function getPooledWarningPropertyDefinition(propName, getVal) { + var isFunction = typeof getVal === 'function'; + return { + configurable: true, + set: set, + get: get, + }; + + function set(val) { + var action = isFunction ? 'setting the method' : 'setting the property'; + warn(action, 'This is effectively a no-op'); + return val; + } + + function get() { + var action = isFunction ? 'accessing the method' : 'accessing the property'; + var result = isFunction ? 'This is a no-op function' : 'This is set to null'; + warn(action, result); + return getVal; + } + + function warn(action, result) { + var warningCondition = false; + !warningCondition + ? warningWithoutStack$1( + false, + "This synthetic event is reused for performance reasons. If you're seeing this, " + + "you're %s `%s` on a released/nullified synthetic event. %s. " + + 'If you must keep the original synthetic event around, use event.persist(). ' + + 'See https://fb.me/react-event-pooling for more information.', + action, + propName, + result, + ) + : void 0; + } + } + + function getPooledEvent(dispatchConfig, targetInst, nativeEvent, nativeInst) { + var EventConstructor = this; + + if (EventConstructor.eventPool.length) { + var instance = EventConstructor.eventPool.pop(); + EventConstructor.call(instance, dispatchConfig, targetInst, nativeEvent, nativeInst); + return instance; + } + + return new EventConstructor(dispatchConfig, targetInst, nativeEvent, nativeInst); + } + + function releasePooledEvent(event) { + var EventConstructor = this; + + if (!(event instanceof EventConstructor)) { + { + throw Error('Trying to release an event instance into a pool of a different type.'); + } + } + + event.destructor(); + + if (EventConstructor.eventPool.length < EVENT_POOL_SIZE) { + EventConstructor.eventPool.push(event); + } + } + + function addEventPoolingTo(EventConstructor) { + EventConstructor.eventPool = []; + EventConstructor.getPooled = getPooledEvent; + EventConstructor.release = releasePooledEvent; + } + + /** + * @interface Event + * @see http://www.w3.org/TR/css3-animations/#AnimationEvent-interface + * @see https://developer.mozilla.org/en-US/docs/Web/API/AnimationEvent + */ + + var SyntheticAnimationEvent = SyntheticEvent.extend({ + animationName: null, + elapsedTime: null, + pseudoElement: null, + }); + + /** + * @interface Event + * @see http://www.w3.org/TR/clipboard-apis/ + */ + + var SyntheticClipboardEvent = SyntheticEvent.extend({ + clipboardData: function (event) { + return 'clipboardData' in event ? event.clipboardData : window.clipboardData; + }, + }); + + var SyntheticUIEvent = SyntheticEvent.extend({ + view: null, + detail: null, + }); + + /** + * @interface FocusEvent + * @see http://www.w3.org/TR/DOM-Level-3-Events/ + */ + + var SyntheticFocusEvent = SyntheticUIEvent.extend({ + relatedTarget: null, + }); + + /** + * `charCode` represents the actual "character code" and is safe to use with + * `String.fromCharCode`. As such, only keys that correspond to printable + * characters produce a valid `charCode`, the only exception to this is Enter. + * The Tab-key is considered non-printable and does not have a `charCode`, + * presumably because it does not produce a tab-character in browsers. + * + * @param {object} nativeEvent Native browser event. + * @return {number} Normalized `charCode` property. + */ + function getEventCharCode(nativeEvent) { + var charCode; + var keyCode = nativeEvent.keyCode; + + if ('charCode' in nativeEvent) { + charCode = nativeEvent.charCode; // FF does not set `charCode` for the Enter-key, check against `keyCode`. + + if (charCode === 0 && keyCode === 13) { + charCode = 13; + } + } else { + // IE8 does not implement `charCode`, but `keyCode` has the correct value. + charCode = keyCode; + } // IE and Edge (on Windows) and Chrome / Safari (on Windows and Linux) + // report Enter as charCode 10 when ctrl is pressed. + + if (charCode === 10) { + charCode = 13; + } // Some non-printable keys are reported in `charCode`/`keyCode`, discard them. + // Must not discard the (non-)printable Enter-key. + + if (charCode >= 32 || charCode === 13) { + return charCode; + } + + return 0; + } + + /** + * Normalization of deprecated HTML5 `key` values + * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names + */ + + var normalizeKey = { + Esc: 'Escape', + Spacebar: ' ', + Left: 'ArrowLeft', + Up: 'ArrowUp', + Right: 'ArrowRight', + Down: 'ArrowDown', + Del: 'Delete', + Win: 'OS', + Menu: 'ContextMenu', + Apps: 'ContextMenu', + Scroll: 'ScrollLock', + MozPrintableKey: 'Unidentified', + }; + /** + * Translation from legacy `keyCode` to HTML5 `key` + * Only special keys supported, all others depend on keyboard layout or browser + * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names + */ + + var translateToKey = { + 8: 'Backspace', + 9: 'Tab', + 12: 'Clear', + 13: 'Enter', + 16: 'Shift', + 17: 'Control', + 18: 'Alt', + 19: 'Pause', + 20: 'CapsLock', + 27: 'Escape', + 32: ' ', + 33: 'PageUp', + 34: 'PageDown', + 35: 'End', + 36: 'Home', + 37: 'ArrowLeft', + 38: 'ArrowUp', + 39: 'ArrowRight', + 40: 'ArrowDown', + 45: 'Insert', + 46: 'Delete', + 112: 'F1', + 113: 'F2', + 114: 'F3', + 115: 'F4', + 116: 'F5', + 117: 'F6', + 118: 'F7', + 119: 'F8', + 120: 'F9', + 121: 'F10', + 122: 'F11', + 123: 'F12', + 144: 'NumLock', + 145: 'ScrollLock', + 224: 'Meta', + }; + /** + * @param {object} nativeEvent Native browser event. + * @return {string} Normalized `key` property. + */ + + function getEventKey(nativeEvent) { + if (nativeEvent.key) { + // Normalize inconsistent values reported by browsers due to + // implementations of a working draft specification. + // FireFox implements `key` but returns `MozPrintableKey` for all + // printable characters (normalized to `Unidentified`), ignore it. + var key = normalizeKey[nativeEvent.key] || nativeEvent.key; + + if (key !== 'Unidentified') { + return key; + } + } // Browser does not implement `key`, polyfill as much of it as we can. + + if (nativeEvent.type === 'keypress') { + var charCode = getEventCharCode(nativeEvent); // The enter-key is technically both printable and non-printable and can + // thus be captured by `keypress`, no other non-printable key should. + + return charCode === 13 ? 'Enter' : String.fromCharCode(charCode); + } + + if (nativeEvent.type === 'keydown' || nativeEvent.type === 'keyup') { + // While user keyboard layout determines the actual meaning of each + // `keyCode` value, almost all function keys have a universal value. + return translateToKey[nativeEvent.keyCode] || 'Unidentified'; + } + + return ''; + } + + /** + * Translation from modifier key to the associated property in the event. + * @see http://www.w3.org/TR/DOM-Level-3-Events/#keys-Modifiers + */ + var modifierKeyToProp = { + Alt: 'altKey', + Control: 'ctrlKey', + Meta: 'metaKey', + Shift: 'shiftKey', + }; // Older browsers (Safari <= 10, iOS Safari <= 10.2) do not support + // getModifierState. If getModifierState is not supported, we map it to a set of + // modifier keys exposed by the event. In this case, Lock-keys are not supported. + + function modifierStateGetter(keyArg) { + var syntheticEvent = this; + var nativeEvent = syntheticEvent.nativeEvent; + + if (nativeEvent.getModifierState) { + return nativeEvent.getModifierState(keyArg); + } + + var keyProp = modifierKeyToProp[keyArg]; + return keyProp ? !!nativeEvent[keyProp] : false; + } + + function getEventModifierState(nativeEvent) { + return modifierStateGetter; + } + + /** + * @interface KeyboardEvent + * @see http://www.w3.org/TR/DOM-Level-3-Events/ + */ + + var SyntheticKeyboardEvent = SyntheticUIEvent.extend({ + key: getEventKey, + location: null, + ctrlKey: null, + shiftKey: null, + altKey: null, + metaKey: null, + repeat: null, + locale: null, + getModifierState: getEventModifierState, + // Legacy Interface + charCode: function (event) { + // `charCode` is the result of a KeyPress event and represents the value of + // the actual printable character. + // KeyPress is deprecated, but its replacement is not yet final and not + // implemented in any major browser. Only KeyPress has charCode. + if (event.type === 'keypress') { + return getEventCharCode(event); + } + + return 0; + }, + keyCode: function (event) { + // `keyCode` is the result of a KeyDown/Up event and represents the value of + // physical keyboard key. + // The actual meaning of the value depends on the users' keyboard layout + // which cannot be detected. Assuming that it is a US keyboard layout + // provides a surprisingly accurate mapping for US and European users. + // Due to this, it is left to the user to implement at this time. + if (event.type === 'keydown' || event.type === 'keyup') { + return event.keyCode; + } + + return 0; + }, + which: function (event) { + // `which` is an alias for either `keyCode` or `charCode` depending on the + // type of the event. + if (event.type === 'keypress') { + return getEventCharCode(event); + } + + if (event.type === 'keydown' || event.type === 'keyup') { + return event.keyCode; + } + + return 0; + }, + }); + + var previousScreenX = 0; + var previousScreenY = 0; // Use flags to signal movementX/Y has already been set + + var isMovementXSet = false; + var isMovementYSet = false; + /** + * @interface MouseEvent + * @see http://www.w3.org/TR/DOM-Level-3-Events/ + */ + + var SyntheticMouseEvent = SyntheticUIEvent.extend({ + screenX: null, + screenY: null, + clientX: null, + clientY: null, + pageX: null, + pageY: null, + ctrlKey: null, + shiftKey: null, + altKey: null, + metaKey: null, + getModifierState: getEventModifierState, + button: null, + buttons: null, + relatedTarget: function (event) { + return ( + event.relatedTarget || + (event.fromElement === event.srcElement ? event.toElement : event.fromElement) + ); + }, + movementX: function (event) { + if ('movementX' in event) { + return event.movementX; + } + + var screenX = previousScreenX; + previousScreenX = event.screenX; + + if (!isMovementXSet) { + isMovementXSet = true; + return 0; + } + + return event.type === 'mousemove' ? event.screenX - screenX : 0; + }, + movementY: function (event) { + if ('movementY' in event) { + return event.movementY; + } + + var screenY = previousScreenY; + previousScreenY = event.screenY; + + if (!isMovementYSet) { + isMovementYSet = true; + return 0; + } + + return event.type === 'mousemove' ? event.screenY - screenY : 0; + }, + }); + + /** + * @interface PointerEvent + * @see http://www.w3.org/TR/pointerevents/ + */ + + var SyntheticPointerEvent = SyntheticMouseEvent.extend({ + pointerId: null, + width: null, + height: null, + pressure: null, + tangentialPressure: null, + tiltX: null, + tiltY: null, + twist: null, + pointerType: null, + isPrimary: null, + }); + + /** + * @interface DragEvent + * @see http://www.w3.org/TR/DOM-Level-3-Events/ + */ + + var SyntheticDragEvent = SyntheticMouseEvent.extend({ + dataTransfer: null, + }); + + /** + * @interface TouchEvent + * @see http://www.w3.org/TR/touch-events/ + */ + + var SyntheticTouchEvent = SyntheticUIEvent.extend({ + touches: null, + targetTouches: null, + changedTouches: null, + altKey: null, + metaKey: null, + ctrlKey: null, + shiftKey: null, + getModifierState: getEventModifierState, + }); + + /** + * @interface Event + * @see http://www.w3.org/TR/2009/WD-css3-transitions-20090320/#transition-events- + * @see https://developer.mozilla.org/en-US/docs/Web/API/TransitionEvent + */ + + var SyntheticTransitionEvent = SyntheticEvent.extend({ + propertyName: null, + elapsedTime: null, + pseudoElement: null, + }); + + /** + * @interface WheelEvent + * @see http://www.w3.org/TR/DOM-Level-3-Events/ + */ + + var SyntheticWheelEvent = SyntheticMouseEvent.extend({ + deltaX: function (event) { + return 'deltaX' in event + ? event.deltaX // Fallback to `wheelDeltaX` for Webkit and normalize (right is positive). + : 'wheelDeltaX' in event + ? -event.wheelDeltaX + : 0; + }, + deltaY: function (event) { + return 'deltaY' in event + ? event.deltaY // Fallback to `wheelDeltaY` for Webkit and normalize (down is positive). + : 'wheelDeltaY' in event + ? -event.wheelDeltaY // Fallback to `wheelDelta` for IE<9 and normalize (down is positive). + : 'wheelDelta' in event + ? -event.wheelDelta + : 0; + }, + deltaZ: null, + // Browsers without "deltaMode" is reporting in raw wheel delta where one + // notch on the scroll is always +/- 120, roughly equivalent to pixels. + // A good approximation of DOM_DELTA_LINE (1) is 5% of viewport size or + // ~40 pixels, for DOM_DELTA_SCREEN (2) it is 87.5% of viewport size. + deltaMode: null, + }); + + /** + * Turns + * ['abort', ...] + * into + * eventTypes = { + * 'abort': { + * phasedRegistrationNames: { + * bubbled: 'onAbort', + * captured: 'onAbortCapture', + * }, + * dependencies: [TOP_ABORT], + * }, + * ... + * }; + * topLevelEventsToDispatchConfig = new Map([ + * [TOP_ABORT, { sameConfig }], + * ]); + */ + + var eventTuples = [ + // Discrete events + [TOP_BLUR, 'blur', DiscreteEvent], + [TOP_CANCEL, 'cancel', DiscreteEvent], + [TOP_CLICK, 'click', DiscreteEvent], + [TOP_CLOSE, 'close', DiscreteEvent], + [TOP_CONTEXT_MENU, 'contextMenu', DiscreteEvent], + [TOP_COPY, 'copy', DiscreteEvent], + [TOP_CUT, 'cut', DiscreteEvent], + [TOP_AUX_CLICK, 'auxClick', DiscreteEvent], + [TOP_DOUBLE_CLICK, 'doubleClick', DiscreteEvent], + [TOP_DRAG_END, 'dragEnd', DiscreteEvent], + [TOP_DRAG_START, 'dragStart', DiscreteEvent], + [TOP_DROP, 'drop', DiscreteEvent], + [TOP_FOCUS, 'focus', DiscreteEvent], + [TOP_INPUT, 'input', DiscreteEvent], + [TOP_INVALID, 'invalid', DiscreteEvent], + [TOP_KEY_DOWN, 'keyDown', DiscreteEvent], + [TOP_KEY_PRESS, 'keyPress', DiscreteEvent], + [TOP_KEY_UP, 'keyUp', DiscreteEvent], + [TOP_MOUSE_DOWN, 'mouseDown', DiscreteEvent], + [TOP_MOUSE_UP, 'mouseUp', DiscreteEvent], + [TOP_PASTE, 'paste', DiscreteEvent], + [TOP_PAUSE, 'pause', DiscreteEvent], + [TOP_PLAY, 'play', DiscreteEvent], + [TOP_POINTER_CANCEL, 'pointerCancel', DiscreteEvent], + [TOP_POINTER_DOWN, 'pointerDown', DiscreteEvent], + [TOP_POINTER_UP, 'pointerUp', DiscreteEvent], + [TOP_RATE_CHANGE, 'rateChange', DiscreteEvent], + [TOP_RESET, 'reset', DiscreteEvent], + [TOP_SEEKED, 'seeked', DiscreteEvent], + [TOP_SUBMIT, 'submit', DiscreteEvent], + [TOP_TOUCH_CANCEL, 'touchCancel', DiscreteEvent], + [TOP_TOUCH_END, 'touchEnd', DiscreteEvent], + [TOP_TOUCH_START, 'touchStart', DiscreteEvent], + [TOP_VOLUME_CHANGE, 'volumeChange', DiscreteEvent], // User-blocking events + [TOP_DRAG, 'drag', UserBlockingEvent], + [TOP_DRAG_ENTER, 'dragEnter', UserBlockingEvent], + [TOP_DRAG_EXIT, 'dragExit', UserBlockingEvent], + [TOP_DRAG_LEAVE, 'dragLeave', UserBlockingEvent], + [TOP_DRAG_OVER, 'dragOver', UserBlockingEvent], + [TOP_MOUSE_MOVE, 'mouseMove', UserBlockingEvent], + [TOP_MOUSE_OUT, 'mouseOut', UserBlockingEvent], + [TOP_MOUSE_OVER, 'mouseOver', UserBlockingEvent], + [TOP_POINTER_MOVE, 'pointerMove', UserBlockingEvent], + [TOP_POINTER_OUT, 'pointerOut', UserBlockingEvent], + [TOP_POINTER_OVER, 'pointerOver', UserBlockingEvent], + [TOP_SCROLL, 'scroll', UserBlockingEvent], + [TOP_TOGGLE, 'toggle', UserBlockingEvent], + [TOP_TOUCH_MOVE, 'touchMove', UserBlockingEvent], + [TOP_WHEEL, 'wheel', UserBlockingEvent], // Continuous events + [TOP_ABORT, 'abort', ContinuousEvent], + [TOP_ANIMATION_END, 'animationEnd', ContinuousEvent], + [TOP_ANIMATION_ITERATION, 'animationIteration', ContinuousEvent], + [TOP_ANIMATION_START, 'animationStart', ContinuousEvent], + [TOP_CAN_PLAY, 'canPlay', ContinuousEvent], + [TOP_CAN_PLAY_THROUGH, 'canPlayThrough', ContinuousEvent], + [TOP_DURATION_CHANGE, 'durationChange', ContinuousEvent], + [TOP_EMPTIED, 'emptied', ContinuousEvent], + [TOP_ENCRYPTED, 'encrypted', ContinuousEvent], + [TOP_ENDED, 'ended', ContinuousEvent], + [TOP_ERROR, 'error', ContinuousEvent], + [TOP_GOT_POINTER_CAPTURE, 'gotPointerCapture', ContinuousEvent], + [TOP_LOAD, 'load', ContinuousEvent], + [TOP_LOADED_DATA, 'loadedData', ContinuousEvent], + [TOP_LOADED_METADATA, 'loadedMetadata', ContinuousEvent], + [TOP_LOAD_START, 'loadStart', ContinuousEvent], + [TOP_LOST_POINTER_CAPTURE, 'lostPointerCapture', ContinuousEvent], + [TOP_PLAYING, 'playing', ContinuousEvent], + [TOP_PROGRESS, 'progress', ContinuousEvent], + [TOP_SEEKING, 'seeking', ContinuousEvent], + [TOP_STALLED, 'stalled', ContinuousEvent], + [TOP_SUSPEND, 'suspend', ContinuousEvent], + [TOP_TIME_UPDATE, 'timeUpdate', ContinuousEvent], + [TOP_TRANSITION_END, 'transitionEnd', ContinuousEvent], + [TOP_WAITING, 'waiting', ContinuousEvent], + ]; + var eventTypes = {}; + var topLevelEventsToDispatchConfig = {}; + + for (var i = 0; i < eventTuples.length; i++) { + var eventTuple = eventTuples[i]; + var topEvent = eventTuple[0]; + var event = eventTuple[1]; + var eventPriority = eventTuple[2]; + var capitalizedEvent = event[0].toUpperCase() + event.slice(1); + var onEvent = 'on' + capitalizedEvent; + var config = { + phasedRegistrationNames: { + bubbled: onEvent, + captured: onEvent + 'Capture', + }, + dependencies: [topEvent], + eventPriority: eventPriority, + }; + eventTypes[event] = config; + topLevelEventsToDispatchConfig[topEvent] = config; + } // Only used in DEV for exhaustiveness validation. + + var knownHTMLTopLevelTypes = [ + TOP_ABORT, + TOP_CANCEL, + TOP_CAN_PLAY, + TOP_CAN_PLAY_THROUGH, + TOP_CLOSE, + TOP_DURATION_CHANGE, + TOP_EMPTIED, + TOP_ENCRYPTED, + TOP_ENDED, + TOP_ERROR, + TOP_INPUT, + TOP_INVALID, + TOP_LOAD, + TOP_LOADED_DATA, + TOP_LOADED_METADATA, + TOP_LOAD_START, + TOP_PAUSE, + TOP_PLAY, + TOP_PLAYING, + TOP_PROGRESS, + TOP_RATE_CHANGE, + TOP_RESET, + TOP_SEEKED, + TOP_SEEKING, + TOP_STALLED, + TOP_SUBMIT, + TOP_SUSPEND, + TOP_TIME_UPDATE, + TOP_TOGGLE, + TOP_VOLUME_CHANGE, + TOP_WAITING, + ]; + var SimpleEventPlugin = { + eventTypes: eventTypes, + getEventPriority: function (topLevelType) { + var config = topLevelEventsToDispatchConfig[topLevelType]; + return config !== undefined ? config.eventPriority : ContinuousEvent; + }, + extractEvents: function ( + topLevelType, + targetInst, + nativeEvent, + nativeEventTarget, + eventSystemFlags, + ) { + var dispatchConfig = topLevelEventsToDispatchConfig[topLevelType]; + + if (!dispatchConfig) { + return null; + } + + var EventConstructor; + + switch (topLevelType) { + case TOP_KEY_PRESS: + // Firefox creates a keypress event for function keys too. This removes + // the unwanted keypress events. Enter is however both printable and + // non-printable. One would expect Tab to be as well (but it isn't). + if (getEventCharCode(nativeEvent) === 0) { + return null; + } + + /* falls through */ + + case TOP_KEY_DOWN: + case TOP_KEY_UP: + EventConstructor = SyntheticKeyboardEvent; + break; + + case TOP_BLUR: + case TOP_FOCUS: + EventConstructor = SyntheticFocusEvent; + break; + + case TOP_CLICK: + // Firefox creates a click event on right mouse clicks. This removes the + // unwanted click events. + if (nativeEvent.button === 2) { + return null; + } + + /* falls through */ + + case TOP_AUX_CLICK: + case TOP_DOUBLE_CLICK: + case TOP_MOUSE_DOWN: + case TOP_MOUSE_MOVE: + case TOP_MOUSE_UP: // TODO: Disabled elements should not respond to mouse events + + /* falls through */ + + case TOP_MOUSE_OUT: + case TOP_MOUSE_OVER: + case TOP_CONTEXT_MENU: + EventConstructor = SyntheticMouseEvent; + break; + + case TOP_DRAG: + case TOP_DRAG_END: + case TOP_DRAG_ENTER: + case TOP_DRAG_EXIT: + case TOP_DRAG_LEAVE: + case TOP_DRAG_OVER: + case TOP_DRAG_START: + case TOP_DROP: + EventConstructor = SyntheticDragEvent; + break; + + case TOP_TOUCH_CANCEL: + case TOP_TOUCH_END: + case TOP_TOUCH_MOVE: + case TOP_TOUCH_START: + EventConstructor = SyntheticTouchEvent; + break; + + case TOP_ANIMATION_END: + case TOP_ANIMATION_ITERATION: + case TOP_ANIMATION_START: + EventConstructor = SyntheticAnimationEvent; + break; + + case TOP_TRANSITION_END: + EventConstructor = SyntheticTransitionEvent; + break; + + case TOP_SCROLL: + EventConstructor = SyntheticUIEvent; + break; + + case TOP_WHEEL: + EventConstructor = SyntheticWheelEvent; + break; + + case TOP_COPY: + case TOP_CUT: + case TOP_PASTE: + EventConstructor = SyntheticClipboardEvent; + break; + + case TOP_GOT_POINTER_CAPTURE: + case TOP_LOST_POINTER_CAPTURE: + case TOP_POINTER_CANCEL: + case TOP_POINTER_DOWN: + case TOP_POINTER_MOVE: + case TOP_POINTER_OUT: + case TOP_POINTER_OVER: + case TOP_POINTER_UP: + EventConstructor = SyntheticPointerEvent; + break; + + default: + { + if (knownHTMLTopLevelTypes.indexOf(topLevelType) === -1) { + warningWithoutStack$1( + false, + 'SimpleEventPlugin: Unhandled event type, `%s`. This warning ' + + 'is likely caused by a bug in React. Please file an issue.', + topLevelType, + ); + } + } // HTML Events + // @see http://www.w3.org/TR/html5/index.html#events-0 + + EventConstructor = SyntheticEvent; + break; + } + + var event = EventConstructor.getPooled( + dispatchConfig, + targetInst, + nativeEvent, + nativeEventTarget, + ); + accumulateTwoPhaseDispatches(event); + return event; + }, + }; + + var passiveBrowserEventsSupported = false; // Check if browser support events with passive listeners + // https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#Safely_detecting_option_support + + if (enableFlareAPI && canUseDOM) { + try { + var options = {}; // $FlowFixMe: Ignore Flow complaining about needing a value + + Object.defineProperty(options, 'passive', { + get: function () { + passiveBrowserEventsSupported = true; + }, + }); + window.addEventListener('test', options, options); + window.removeEventListener('test', options, options); + } catch (e) { + passiveBrowserEventsSupported = false; + } + } + + // Intentionally not named imports because Rollup would use dynamic dispatch for + // CommonJS interop named imports. + var UserBlockingPriority$1 = Scheduler.unstable_UserBlockingPriority; + var runWithPriority$1 = Scheduler.unstable_runWithPriority; + var getEventPriority = SimpleEventPlugin.getEventPriority; + var CALLBACK_BOOKKEEPING_POOL_SIZE = 10; + var callbackBookkeepingPool = []; + + /** + * Find the deepest React component completely containing the root of the + * passed-in instance (for use when entire React trees are nested within each + * other). If React trees are not nested, returns null. + */ + function findRootContainerNode(inst) { + if (inst.tag === HostRoot) { + return inst.stateNode.containerInfo; + } // TODO: It may be a good idea to cache this to prevent unnecessary DOM + // traversal, but caching is difficult to do correctly without using a + // mutation observer to listen for all DOM changes. + + while (inst.return) { + inst = inst.return; + } + + if (inst.tag !== HostRoot) { + // This can happen if we're in a detached tree. + return null; + } + + return inst.stateNode.containerInfo; + } // Used to store ancestor hierarchy in top level callback + + function getTopLevelCallbackBookKeeping(topLevelType, nativeEvent, targetInst, eventSystemFlags) { + if (callbackBookkeepingPool.length) { + var instance = callbackBookkeepingPool.pop(); + instance.topLevelType = topLevelType; + instance.eventSystemFlags = eventSystemFlags; + instance.nativeEvent = nativeEvent; + instance.targetInst = targetInst; + return instance; + } + + return { + topLevelType: topLevelType, + eventSystemFlags: eventSystemFlags, + nativeEvent: nativeEvent, + targetInst: targetInst, + ancestors: [], + }; + } + + function releaseTopLevelCallbackBookKeeping(instance) { + instance.topLevelType = null; + instance.nativeEvent = null; + instance.targetInst = null; + instance.ancestors.length = 0; + + if (callbackBookkeepingPool.length < CALLBACK_BOOKKEEPING_POOL_SIZE) { + callbackBookkeepingPool.push(instance); + } + } + + function handleTopLevel(bookKeeping) { + var targetInst = bookKeeping.targetInst; // Loop through the hierarchy, in case there's any nested components. + // It's important that we build the array of ancestors before calling any + // event handlers, because event handlers can modify the DOM, leading to + // inconsistencies with ReactMount's node cache. See #1105. + + var ancestor = targetInst; + + do { + if (!ancestor) { + var ancestors = bookKeeping.ancestors; + ancestors.push(ancestor); + break; + } + + var root = findRootContainerNode(ancestor); + + if (!root) { + break; + } + + var tag = ancestor.tag; + + if (tag === HostComponent || tag === HostText) { + bookKeeping.ancestors.push(ancestor); + } + + ancestor = getClosestInstanceFromNode(root); + } while (ancestor); + + for (var i = 0; i < bookKeeping.ancestors.length; i++) { + targetInst = bookKeeping.ancestors[i]; + var eventTarget = getEventTarget(bookKeeping.nativeEvent); + var topLevelType = bookKeeping.topLevelType; + var nativeEvent = bookKeeping.nativeEvent; + runExtractedPluginEventsInBatch( + topLevelType, + targetInst, + nativeEvent, + eventTarget, + bookKeeping.eventSystemFlags, + ); + } + } // TODO: can we stop exporting these? + + var _enabled = true; + function setEnabled(enabled) { + _enabled = !!enabled; + } + function isEnabled() { + return _enabled; + } + function trapBubbledEvent(topLevelType, element) { + trapEventForPluginEventSystem(element, topLevelType, false); + } + function trapCapturedEvent(topLevelType, element) { + trapEventForPluginEventSystem(element, topLevelType, true); + } + function trapEventForResponderEventSystem(element, topLevelType, passive) { + if (enableFlareAPI) { + var rawEventName = getRawEventName(topLevelType); + var eventFlags = RESPONDER_EVENT_SYSTEM; // If passive option is not supported, then the event will be + // active and not passive, but we flag it as using not being + // supported too. This way the responder event plugins know, + // and can provide polyfills if needed. + + if (passive) { + if (passiveBrowserEventsSupported) { + eventFlags |= IS_PASSIVE; + } else { + eventFlags |= IS_ACTIVE; + eventFlags |= PASSIVE_NOT_SUPPORTED; + passive = false; + } + } else { + eventFlags |= IS_ACTIVE; + } // Check if interactive and wrap in discreteUpdates + + var listener = dispatchEvent.bind(null, topLevelType, eventFlags); + + if (passiveBrowserEventsSupported) { + addEventCaptureListenerWithPassiveFlag(element, rawEventName, listener, passive); + } else { + addEventCaptureListener(element, rawEventName, listener); + } + } + } + + function trapEventForPluginEventSystem(element, topLevelType, capture) { + var listener; + + switch (getEventPriority(topLevelType)) { + case DiscreteEvent: + listener = dispatchDiscreteEvent.bind(null, topLevelType, PLUGIN_EVENT_SYSTEM); + break; + + case UserBlockingEvent: + listener = dispatchUserBlockingUpdate.bind(null, topLevelType, PLUGIN_EVENT_SYSTEM); + break; + + case ContinuousEvent: + default: + listener = dispatchEvent.bind(null, topLevelType, PLUGIN_EVENT_SYSTEM); + break; + } + + var rawEventName = getRawEventName(topLevelType); + + if (capture) { + addEventCaptureListener(element, rawEventName, listener); + } else { + addEventBubbleListener(element, rawEventName, listener); + } + } + + function dispatchDiscreteEvent(topLevelType, eventSystemFlags, nativeEvent) { + flushDiscreteUpdatesIfNeeded(nativeEvent.timeStamp); + discreteUpdates(dispatchEvent, topLevelType, eventSystemFlags, nativeEvent); + } + + function dispatchUserBlockingUpdate(topLevelType, eventSystemFlags, nativeEvent) { + runWithPriority$1( + UserBlockingPriority$1, + dispatchEvent.bind(null, topLevelType, eventSystemFlags, nativeEvent), + ); + } + + function dispatchEventForPluginEventSystem( + topLevelType, + eventSystemFlags, + nativeEvent, + targetInst, + ) { + var bookKeeping = getTopLevelCallbackBookKeeping( + topLevelType, + nativeEvent, + targetInst, + eventSystemFlags, + ); + + try { + // Event queue being processed in the same cycle allows + // `preventDefault`. + batchedEventUpdates(handleTopLevel, bookKeeping); + } finally { + releaseTopLevelCallbackBookKeeping(bookKeeping); + } + } + + function dispatchEvent(topLevelType, eventSystemFlags, nativeEvent) { + if (!_enabled) { + return; + } + + if (hasQueuedDiscreteEvents() && isReplayableDiscreteEvent(topLevelType)) { + // If we already have a queue of discrete events, and this is another discrete + // event, then we can't dispatch it regardless of its target, since they + // need to dispatch in order. + queueDiscreteEvent( + null, // Flags that we're not actually blocked on anything as far as we know. + topLevelType, + eventSystemFlags, + nativeEvent, + ); + return; + } + + var blockedOn = attemptToDispatchEvent(topLevelType, eventSystemFlags, nativeEvent); + + if (blockedOn === null) { + // We successfully dispatched this event. + clearIfContinuousEvent(topLevelType, nativeEvent); + return; + } + + if (isReplayableDiscreteEvent(topLevelType)) { + // This this to be replayed later once the target is available. + queueDiscreteEvent(blockedOn, topLevelType, eventSystemFlags, nativeEvent); + return; + } + + if (queueIfContinuousEvent(blockedOn, topLevelType, eventSystemFlags, nativeEvent)) { + return; + } // We need to clear only if we didn't queue because + // queueing is accummulative. + + clearIfContinuousEvent(topLevelType, nativeEvent); // This is not replayable so we'll invoke it but without a target, + // in case the event system needs to trace it. + + if (enableFlareAPI) { + if (eventSystemFlags & PLUGIN_EVENT_SYSTEM) { + dispatchEventForPluginEventSystem(topLevelType, eventSystemFlags, nativeEvent, null); + } + + if (eventSystemFlags & RESPONDER_EVENT_SYSTEM) { + // React Flare event system + dispatchEventForResponderEventSystem( + topLevelType, + null, + nativeEvent, + getEventTarget(nativeEvent), + eventSystemFlags, + ); + } + } else { + dispatchEventForPluginEventSystem(topLevelType, eventSystemFlags, nativeEvent, null); + } + } // Attempt dispatching an event. Returns a SuspenseInstance or Container if it's blocked. + + function attemptToDispatchEvent(topLevelType, eventSystemFlags, nativeEvent) { + // TODO: Warn if _enabled is false. + var nativeEventTarget = getEventTarget(nativeEvent); + var targetInst = getClosestInstanceFromNode(nativeEventTarget); + + if (targetInst !== null) { + var nearestMounted = getNearestMountedFiber(targetInst); + + if (nearestMounted === null) { + // This tree has been unmounted already. Dispatch without a target. + targetInst = null; + } else { + var tag = nearestMounted.tag; + + if (tag === SuspenseComponent) { + var instance = getSuspenseInstanceFromFiber(nearestMounted); + + if (instance !== null) { + // Queue the event to be replayed later. Abort dispatching since we + // don't want this event dispatched twice through the event system. + // TODO: If this is the first discrete event in the queue. Schedule an increased + // priority for this boundary. + return instance; + } // This shouldn't happen, something went wrong but to avoid blocking + // the whole system, dispatch the event without a target. + // TODO: Warn. + + targetInst = null; + } else if (tag === HostRoot) { + var root = nearestMounted.stateNode; + + if (root.hydrate) { + // If this happens during a replay something went wrong and it might block + // the whole system. + return getContainerFromFiber(nearestMounted); + } + + targetInst = null; + } else if (nearestMounted !== targetInst) { + // If we get an event (ex: img onload) before committing that + // component's mount, ignore it for now (that is, treat it as if it was an + // event on a non-React tree). We might also consider queueing events and + // dispatching them after the mount. + targetInst = null; + } + } + } + + if (enableFlareAPI) { + if (eventSystemFlags & PLUGIN_EVENT_SYSTEM) { + dispatchEventForPluginEventSystem(topLevelType, eventSystemFlags, nativeEvent, targetInst); + } + + if (eventSystemFlags & RESPONDER_EVENT_SYSTEM) { + // React Flare event system + dispatchEventForResponderEventSystem( + topLevelType, + targetInst, + nativeEvent, + nativeEventTarget, + eventSystemFlags, + ); + } + } else { + dispatchEventForPluginEventSystem(topLevelType, eventSystemFlags, nativeEvent, targetInst); + } // We're not blocked on anything. + + return null; + } + + /** + * Checks if an event is supported in the current execution environment. + * + * NOTE: This will not work correctly for non-generic events such as `change`, + * `reset`, `load`, `error`, and `select`. + * + * Borrows from Modernizr. + * + * @param {string} eventNameSuffix Event name, e.g. "click". + * @return {boolean} True if the event is supported. + * @internal + * @license Modernizr 3.0.0pre (Custom Build) | MIT + */ + + function isEventSupported(eventNameSuffix) { + if (!canUseDOM) { + return false; + } + + var eventName = 'on' + eventNameSuffix; + var isSupported = eventName in document; + + if (!isSupported) { + var element = document.createElement('div'); + element.setAttribute(eventName, 'return;'); + isSupported = typeof element[eventName] === 'function'; + } + + return isSupported; + } + + /** + * Summary of `ReactBrowserEventEmitter` event handling: + * + * - Top-level delegation is used to trap most native browser events. This + * may only occur in the main thread and is the responsibility of + * ReactDOMEventListener, which is injected and can therefore support + * pluggable event sources. This is the only work that occurs in the main + * thread. + * + * - We normalize and de-duplicate events to account for browser quirks. This + * may be done in the worker thread. + * + * - Forward these native events (with the associated top-level type used to + * trap it) to `EventPluginHub`, which in turn will ask plugins if they want + * to extract any synthetic events. + * + * - The `EventPluginHub` will then process each event by annotating them with + * "dispatches", a sequence of listeners and IDs that care about that event. + * + * - The `EventPluginHub` then dispatches the events. + * + * Overview of React and the event system: + * + * +------------+ . + * | DOM | . + * +------------+ . + * | . + * v . + * +------------+ . + * | ReactEvent | . + * | Listener | . + * +------------+ . +-----------+ + * | . +--------+|SimpleEvent| + * | . | |Plugin | + * +-----|------+ . v +-----------+ + * | | | . +--------------+ +------------+ + * | +-----------.--->|EventPluginHub| | Event | + * | | . | | +-----------+ | Propagators| + * | ReactEvent | . | | |TapEvent | |------------| + * | Emitter | . | |<---+|Plugin | |other plugin| + * | | . | | +-----------+ | utilities | + * | +-----------.--->| | +------------+ + * | | | . +--------------+ + * +-----|------+ . ^ +-----------+ + * | . | |Enter/Leave| + * + . +-------+|Plugin | + * +-------------+ . +-----------+ + * | application | . + * |-------------| . + * | | . + * | | . + * +-------------+ . + * . + * React Core . General Purpose Event Plugin System + */ + + var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map; + var elementListeningSets = new PossiblyWeakMap(); + function getListeningSetForElement(element) { + var listeningSet = elementListeningSets.get(element); + + if (listeningSet === undefined) { + listeningSet = new Set(); + elementListeningSets.set(element, listeningSet); + } + + return listeningSet; + } + /** + * We listen for bubbled touch events on the document object. + * + * Firefox v8.01 (and possibly others) exhibited strange behavior when + * mounting `onmousemove` events at some node that was not the document + * element. The symptoms were that if your mouse is not moving over something + * contained within that mount point (for example on the background) the + * top-level listeners for `onmousemove` won't be called. However, if you + * register the `mousemove` on the document object, then it will of course + * catch all `mousemove`s. This along with iOS quirks, justifies restricting + * top-level listeners to the document object only, at least for these + * movement types of events and possibly all events. + * + * @see http://www.quirksmode.org/blog/archives/2010/09/click_event_del.html + * + * Also, `keyup`/`keypress`/`keydown` do not bubble to the window on IE, but + * they bubble to document. + * + * @param {string} registrationName Name of listener (e.g. `onClick`). + * @param {object} mountAt Container where to mount the listener + */ + + function listenTo(registrationName, mountAt) { + var listeningSet = getListeningSetForElement(mountAt); + var dependencies = registrationNameDependencies[registrationName]; + + for (var i = 0; i < dependencies.length; i++) { + var dependency = dependencies[i]; + listenToTopLevel(dependency, mountAt, listeningSet); + } + } + function listenToTopLevel(topLevelType, mountAt, listeningSet) { + if (!listeningSet.has(topLevelType)) { + switch (topLevelType) { + case TOP_SCROLL: + trapCapturedEvent(TOP_SCROLL, mountAt); + break; + + case TOP_FOCUS: + case TOP_BLUR: + trapCapturedEvent(TOP_FOCUS, mountAt); + trapCapturedEvent(TOP_BLUR, mountAt); // We set the flag for a single dependency later in this function, + // but this ensures we mark both as attached rather than just one. + + listeningSet.add(TOP_BLUR); + listeningSet.add(TOP_FOCUS); + break; + + case TOP_CANCEL: + case TOP_CLOSE: + if (isEventSupported(getRawEventName(topLevelType))) { + trapCapturedEvent(topLevelType, mountAt); + } + + break; + + case TOP_INVALID: + case TOP_SUBMIT: + case TOP_RESET: + // We listen to them on the target DOM elements. + // Some of them bubble so we don't want them to fire twice. + break; + + default: + // By default, listen on the top level to all non-media events. + // Media events don't bubble so adding the listener wouldn't do anything. + var isMediaEvent = mediaEventTypes.indexOf(topLevelType) !== -1; + + if (!isMediaEvent) { + trapBubbledEvent(topLevelType, mountAt); + } + + break; + } + + listeningSet.add(topLevelType); + } + } + function isListeningToAllDependencies(registrationName, mountAt) { + var listeningSet = getListeningSetForElement(mountAt); + var dependencies = registrationNameDependencies[registrationName]; + + for (var i = 0; i < dependencies.length; i++) { + var dependency = dependencies[i]; + + if (!listeningSet.has(dependency)) { + return false; + } + } + + return true; + } + + // List derived from Gecko source code: + // https://github.com/mozilla/gecko-dev/blob/4e638efc71/layout/style/test/property_database.js + var shorthandToLonghand = { + animation: [ + 'animationDelay', + 'animationDirection', + 'animationDuration', + 'animationFillMode', + 'animationIterationCount', + 'animationName', + 'animationPlayState', + 'animationTimingFunction', + ], + background: [ + 'backgroundAttachment', + 'backgroundClip', + 'backgroundColor', + 'backgroundImage', + 'backgroundOrigin', + 'backgroundPositionX', + 'backgroundPositionY', + 'backgroundRepeat', + 'backgroundSize', + ], + backgroundPosition: ['backgroundPositionX', 'backgroundPositionY'], + border: [ + 'borderBottomColor', + 'borderBottomStyle', + 'borderBottomWidth', + 'borderImageOutset', + 'borderImageRepeat', + 'borderImageSlice', + 'borderImageSource', + 'borderImageWidth', + 'borderLeftColor', + 'borderLeftStyle', + 'borderLeftWidth', + 'borderRightColor', + 'borderRightStyle', + 'borderRightWidth', + 'borderTopColor', + 'borderTopStyle', + 'borderTopWidth', + ], + borderBlockEnd: ['borderBlockEndColor', 'borderBlockEndStyle', 'borderBlockEndWidth'], + borderBlockStart: ['borderBlockStartColor', 'borderBlockStartStyle', 'borderBlockStartWidth'], + borderBottom: ['borderBottomColor', 'borderBottomStyle', 'borderBottomWidth'], + borderColor: ['borderBottomColor', 'borderLeftColor', 'borderRightColor', 'borderTopColor'], + borderImage: [ + 'borderImageOutset', + 'borderImageRepeat', + 'borderImageSlice', + 'borderImageSource', + 'borderImageWidth', + ], + borderInlineEnd: ['borderInlineEndColor', 'borderInlineEndStyle', 'borderInlineEndWidth'], + borderInlineStart: ['borderInlineStartColor', 'borderInlineStartStyle', 'borderInlineStartWidth'], + borderLeft: ['borderLeftColor', 'borderLeftStyle', 'borderLeftWidth'], + borderRadius: [ + 'borderBottomLeftRadius', + 'borderBottomRightRadius', + 'borderTopLeftRadius', + 'borderTopRightRadius', + ], + borderRight: ['borderRightColor', 'borderRightStyle', 'borderRightWidth'], + borderStyle: ['borderBottomStyle', 'borderLeftStyle', 'borderRightStyle', 'borderTopStyle'], + borderTop: ['borderTopColor', 'borderTopStyle', 'borderTopWidth'], + borderWidth: ['borderBottomWidth', 'borderLeftWidth', 'borderRightWidth', 'borderTopWidth'], + columnRule: ['columnRuleColor', 'columnRuleStyle', 'columnRuleWidth'], + columns: ['columnCount', 'columnWidth'], + flex: ['flexBasis', 'flexGrow', 'flexShrink'], + flexFlow: ['flexDirection', 'flexWrap'], + font: [ + 'fontFamily', + 'fontFeatureSettings', + 'fontKerning', + 'fontLanguageOverride', + 'fontSize', + 'fontSizeAdjust', + 'fontStretch', + 'fontStyle', + 'fontVariant', + 'fontVariantAlternates', + 'fontVariantCaps', + 'fontVariantEastAsian', + 'fontVariantLigatures', + 'fontVariantNumeric', + 'fontVariantPosition', + 'fontWeight', + 'lineHeight', + ], + fontVariant: [ + 'fontVariantAlternates', + 'fontVariantCaps', + 'fontVariantEastAsian', + 'fontVariantLigatures', + 'fontVariantNumeric', + 'fontVariantPosition', + ], + gap: ['columnGap', 'rowGap'], + grid: [ + 'gridAutoColumns', + 'gridAutoFlow', + 'gridAutoRows', + 'gridTemplateAreas', + 'gridTemplateColumns', + 'gridTemplateRows', + ], + gridArea: ['gridColumnEnd', 'gridColumnStart', 'gridRowEnd', 'gridRowStart'], + gridColumn: ['gridColumnEnd', 'gridColumnStart'], + gridColumnGap: ['columnGap'], + gridGap: ['columnGap', 'rowGap'], + gridRow: ['gridRowEnd', 'gridRowStart'], + gridRowGap: ['rowGap'], + gridTemplate: ['gridTemplateAreas', 'gridTemplateColumns', 'gridTemplateRows'], + listStyle: ['listStyleImage', 'listStylePosition', 'listStyleType'], + margin: ['marginBottom', 'marginLeft', 'marginRight', 'marginTop'], + marker: ['markerEnd', 'markerMid', 'markerStart'], + mask: [ + 'maskClip', + 'maskComposite', + 'maskImage', + 'maskMode', + 'maskOrigin', + 'maskPositionX', + 'maskPositionY', + 'maskRepeat', + 'maskSize', + ], + maskPosition: ['maskPositionX', 'maskPositionY'], + outline: ['outlineColor', 'outlineStyle', 'outlineWidth'], + overflow: ['overflowX', 'overflowY'], + padding: ['paddingBottom', 'paddingLeft', 'paddingRight', 'paddingTop'], + placeContent: ['alignContent', 'justifyContent'], + placeItems: ['alignItems', 'justifyItems'], + placeSelf: ['alignSelf', 'justifySelf'], + textDecoration: ['textDecorationColor', 'textDecorationLine', 'textDecorationStyle'], + textEmphasis: ['textEmphasisColor', 'textEmphasisStyle'], + transition: [ + 'transitionDelay', + 'transitionDuration', + 'transitionProperty', + 'transitionTimingFunction', + ], + wordWrap: ['overflowWrap'], + }; + + /** + * CSS properties which accept numbers but are not in units of "px". + */ + var isUnitlessNumber = { + animationIterationCount: true, + borderImageOutset: true, + borderImageSlice: true, + borderImageWidth: true, + boxFlex: true, + boxFlexGroup: true, + boxOrdinalGroup: true, + columnCount: true, + columns: true, + flex: true, + flexGrow: true, + flexPositive: true, + flexShrink: true, + flexNegative: true, + flexOrder: true, + gridArea: true, + gridRow: true, + gridRowEnd: true, + gridRowSpan: true, + gridRowStart: true, + gridColumn: true, + gridColumnEnd: true, + gridColumnSpan: true, + gridColumnStart: true, + fontWeight: true, + lineClamp: true, + lineHeight: true, + opacity: true, + order: true, + orphans: true, + tabSize: true, + widows: true, + zIndex: true, + zoom: true, + // SVG-related properties + fillOpacity: true, + floodOpacity: true, + stopOpacity: true, + strokeDasharray: true, + strokeDashoffset: true, + strokeMiterlimit: true, + strokeOpacity: true, + strokeWidth: true, + }; + /** + * @param {string} prefix vendor-specific prefix, eg: Webkit + * @param {string} key style name, eg: transitionDuration + * @return {string} style name prefixed with `prefix`, properly camelCased, eg: + * WebkitTransitionDuration + */ + + function prefixKey(prefix, key) { + return prefix + key.charAt(0).toUpperCase() + key.substring(1); + } + /** + * Support style names that may come passed in prefixed by adding permutations + * of vendor prefixes. + */ + + var prefixes = ['Webkit', 'ms', 'Moz', 'O']; // Using Object.keys here, or else the vanilla for-in loop makes IE8 go into an + // infinite loop, because it iterates over the newly added props too. + + Object.keys(isUnitlessNumber).forEach(function (prop) { + prefixes.forEach(function (prefix) { + isUnitlessNumber[prefixKey(prefix, prop)] = isUnitlessNumber[prop]; + }); + }); + + /** + * Convert a value into the proper css writable value. The style name `name` + * should be logical (no hyphens), as specified + * in `CSSProperty.isUnitlessNumber`. + * + * @param {string} name CSS property name such as `topMargin`. + * @param {*} value CSS property value such as `10px`. + * @return {string} Normalized style value with dimensions applied. + */ + + function dangerousStyleValue(name, value, isCustomProperty) { + // Note that we've removed escapeTextForBrowser() calls here since the + // whole string will be escaped when the attribute is injected into + // the markup. If you provide unsafe user data here they can inject + // arbitrary CSS which may be problematic (I couldn't repro this): + // https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet + // http://www.thespanner.co.uk/2007/11/26/ultimate-xss-css-injection/ + // This is not an XSS hole but instead a potential CSS injection issue + // which has lead to a greater discussion about how we're going to + // trust URLs moving forward. See #2115901 + var isEmpty = value == null || typeof value === 'boolean' || value === ''; + + if (isEmpty) { + return ''; + } + + if ( + !isCustomProperty && + typeof value === 'number' && + value !== 0 && + !(isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name]) + ) { + return value + 'px'; // Presumes implicit 'px' suffix for unitless numbers + } + + return ('' + value).trim(); + } + + var uppercasePattern = /([A-Z])/g; + var msPattern = /^ms-/; + /** + * Hyphenates a camelcased CSS property name, for example: + * + * > hyphenateStyleName('backgroundColor') + * < "background-color" + * > hyphenateStyleName('MozTransition') + * < "-moz-transition" + * > hyphenateStyleName('msTransition') + * < "-ms-transition" + * + * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix + * is converted to `-ms-`. + */ + + function hyphenateStyleName(name) { + return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-'); + } + + var warnValidStyle = function () {}; + + { + // 'msTransform' is correct, but the other prefixes should be capitalized + var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/; + var msPattern$1 = /^-ms-/; + var hyphenPattern = /-(.)/g; // style values shouldn't contain a semicolon + + var badStyleValueWithSemicolonPattern = /;\s*$/; + var warnedStyleNames = {}; + var warnedStyleValues = {}; + var warnedForNaNValue = false; + var warnedForInfinityValue = false; + + var camelize = function (string) { + return string.replace(hyphenPattern, function (_, character) { + return character.toUpperCase(); + }); + }; + + var warnHyphenatedStyleName = function (name) { + if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) { + return; + } + + warnedStyleNames[name] = true; + warning$1( + false, + 'Unsupported style property %s. Did you mean %s?', + name, // As Andi Smith suggests + // (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix + // is converted to lowercase `ms`. + camelize(name.replace(msPattern$1, 'ms-')), + ); + }; + + var warnBadVendoredStyleName = function (name) { + if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) { + return; + } + + warnedStyleNames[name] = true; + warning$1( + false, + 'Unsupported vendor-prefixed style property %s. Did you mean %s?', + name, + name.charAt(0).toUpperCase() + name.slice(1), + ); + }; + + var warnStyleValueWithSemicolon = function (name, value) { + if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) { + return; + } + + warnedStyleValues[value] = true; + warning$1( + false, + "Style property values shouldn't contain a semicolon. " + 'Try "%s: %s" instead.', + name, + value.replace(badStyleValueWithSemicolonPattern, ''), + ); + }; + + var warnStyleValueIsNaN = function (name, value) { + if (warnedForNaNValue) { + return; + } + + warnedForNaNValue = true; + warning$1(false, '`NaN` is an invalid value for the `%s` css style property.', name); + }; + + var warnStyleValueIsInfinity = function (name, value) { + if (warnedForInfinityValue) { + return; + } + + warnedForInfinityValue = true; + warning$1(false, '`Infinity` is an invalid value for the `%s` css style property.', name); + }; + + warnValidStyle = function (name, value) { + if (name.indexOf('-') > -1) { + warnHyphenatedStyleName(name); + } else if (badVendoredStyleNamePattern.test(name)) { + warnBadVendoredStyleName(name); + } else if (badStyleValueWithSemicolonPattern.test(value)) { + warnStyleValueWithSemicolon(name, value); + } + + if (typeof value === 'number') { + if (isNaN(value)) { + warnStyleValueIsNaN(name, value); + } else if (!isFinite(value)) { + warnStyleValueIsInfinity(name, value); + } + } + }; + } + + var warnValidStyle$1 = warnValidStyle; + + /** + * Operations for dealing with CSS properties. + */ + + /** + * This creates a string that is expected to be equivalent to the style + * attribute generated by server-side rendering. It by-passes warnings and + * security checks so it's not safe to use this value for anything other than + * comparison. It is only used in DEV for SSR validation. + */ + + function createDangerousStringForStyles(styles) { + { + var serialized = ''; + var delimiter = ''; + + for (var styleName in styles) { + if (!styles.hasOwnProperty(styleName)) { + continue; + } + + var styleValue = styles[styleName]; + + if (styleValue != null) { + var isCustomProperty = styleName.indexOf('--') === 0; + serialized += + delimiter + (isCustomProperty ? styleName : hyphenateStyleName(styleName)) + ':'; + serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty); + delimiter = ';'; + } + } + + return serialized || null; + } + } + /** + * Sets the value for multiple styles on a node. If a value is specified as + * '' (empty string), the corresponding style property will be unset. + * + * @param {DOMElement} node + * @param {object} styles + */ + + function setValueForStyles(node, styles) { + var style = node.style; + + for (var styleName in styles) { + if (!styles.hasOwnProperty(styleName)) { + continue; + } + + var isCustomProperty = styleName.indexOf('--') === 0; + + { + if (!isCustomProperty) { + warnValidStyle$1(styleName, styles[styleName]); + } + } + + var styleValue = dangerousStyleValue(styleName, styles[styleName], isCustomProperty); + + if (styleName === 'float') { + styleName = 'cssFloat'; + } + + if (isCustomProperty) { + style.setProperty(styleName, styleValue); + } else { + style[styleName] = styleValue; + } + } + } + + function isValueEmpty(value) { + return value == null || typeof value === 'boolean' || value === ''; + } + /** + * Given {color: 'red', overflow: 'hidden'} returns { + * color: 'color', + * overflowX: 'overflow', + * overflowY: 'overflow', + * }. This can be read as "the overflowY property was set by the overflow + * shorthand". That is, the values are the property that each was derived from. + */ + + function expandShorthandMap(styles) { + var expanded = {}; + + for (var key in styles) { + var longhands = shorthandToLonghand[key] || [key]; + + for (var i = 0; i < longhands.length; i++) { + expanded[longhands[i]] = key; + } + } + + return expanded; + } + /** + * When mixing shorthand and longhand property names, we warn during updates if + * we expect an incorrect result to occur. In particular, we warn for: + * + * Updating a shorthand property (longhand gets overwritten): + * {font: 'foo', fontVariant: 'bar'} -> {font: 'baz', fontVariant: 'bar'} + * becomes .style.font = 'baz' + * Removing a shorthand property (longhand gets lost too): + * {font: 'foo', fontVariant: 'bar'} -> {fontVariant: 'bar'} + * becomes .style.font = '' + * Removing a longhand property (should revert to shorthand; doesn't): + * {font: 'foo', fontVariant: 'bar'} -> {font: 'foo'} + * becomes .style.fontVariant = '' + */ + + function validateShorthandPropertyCollisionInDev(styleUpdates, nextStyles) { + if (!warnAboutShorthandPropertyCollision) { + return; + } + + if (!nextStyles) { + return; + } + + var expandedUpdates = expandShorthandMap(styleUpdates); + var expandedStyles = expandShorthandMap(nextStyles); + var warnedAbout = {}; + + for (var key in expandedUpdates) { + var originalKey = expandedUpdates[key]; + var correctOriginalKey = expandedStyles[key]; + + if (correctOriginalKey && originalKey !== correctOriginalKey) { + var warningKey = originalKey + ',' + correctOriginalKey; + + if (warnedAbout[warningKey]) { + continue; + } + + warnedAbout[warningKey] = true; + warning$1( + false, + '%s a style property during rerender (%s) when a ' + + 'conflicting property is set (%s) can lead to styling bugs. To ' + + "avoid this, don't mix shorthand and non-shorthand properties " + + 'for the same value; instead, replace the shorthand with ' + + 'separate values.', + isValueEmpty(styleUpdates[originalKey]) ? 'Removing' : 'Updating', + originalKey, + correctOriginalKey, + ); + } + } + } + + // For HTML, certain tags should omit their close tag. We keep a whitelist for + // those special-case tags. + var omittedCloseTags = { + area: true, + base: true, + br: true, + col: true, + embed: true, + hr: true, + img: true, + input: true, + keygen: true, + link: true, + meta: true, + param: true, + source: true, + track: true, + wbr: true, // NOTE: menuitem's close tag should be omitted, but that causes problems. + }; + + // `omittedCloseTags` except that `menuitem` should still have its closing tag. + + var voidElementTags = _assign( + { + menuitem: true, + }, + omittedCloseTags, + ); + + // or add stack by default to invariants where possible. + + var HTML$1 = '__html'; + var ReactDebugCurrentFrame$3 = null; + + { + ReactDebugCurrentFrame$3 = ReactSharedInternals.ReactDebugCurrentFrame; + } + + function assertValidProps(tag, props) { + if (!props) { + return; + } // Note the use of `==` which checks for null or undefined. + + if (voidElementTags[tag]) { + if (!(props.children == null && props.dangerouslySetInnerHTML == null)) { + { + throw Error( + tag + + ' is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.' + + ReactDebugCurrentFrame$3.getStackAddendum(), + ); + } + } + } + + if (props.dangerouslySetInnerHTML != null) { + if (!(props.children == null)) { + { + throw Error('Can only set one of `children` or `props.dangerouslySetInnerHTML`.'); + } + } + + if ( + !( + typeof props.dangerouslySetInnerHTML === 'object' && HTML$1 in props.dangerouslySetInnerHTML + ) + ) { + { + throw Error( + '`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://fb.me/react-invariant-dangerously-set-inner-html for more information.', + ); + } + } + } + + { + !(props.suppressContentEditableWarning || !props.contentEditable || props.children == null) + ? warning$1( + false, + 'A component is `contentEditable` and contains `children` managed by ' + + 'React. It is now your responsibility to guarantee that none of ' + + 'those nodes are unexpectedly modified or duplicated. This is ' + + 'probably not intentional.', + ) + : void 0; + } + + if (!(props.style == null || typeof props.style === 'object')) { + { + throw Error( + "The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX." + + ReactDebugCurrentFrame$3.getStackAddendum(), + ); + } + } + } + + function isCustomComponent(tagName, props) { + if (tagName.indexOf('-') === -1) { + return typeof props.is === 'string'; + } + + switch (tagName) { + // These are reserved SVG and MathML elements. + // We don't mind this whitelist too much because we expect it to never grow. + // The alternative is to track the namespace in a few places which is convoluted. + // https://w3c.github.io/webcomponents/spec/custom/#custom-elements-core-concepts + case 'annotation-xml': + case 'color-profile': + case 'font-face': + case 'font-face-src': + case 'font-face-uri': + case 'font-face-format': + case 'font-face-name': + case 'missing-glyph': + return false; + + default: + return true; + } + } + + // When adding attributes to the HTML or SVG whitelist, be sure to + // also add them to this module to ensure casing and incorrect name + // warnings. + var possibleStandardNames = { + // HTML + accept: 'accept', + acceptcharset: 'acceptCharset', + 'accept-charset': 'acceptCharset', + accesskey: 'accessKey', + action: 'action', + allowfullscreen: 'allowFullScreen', + alt: 'alt', + as: 'as', + async: 'async', + autocapitalize: 'autoCapitalize', + autocomplete: 'autoComplete', + autocorrect: 'autoCorrect', + autofocus: 'autoFocus', + autoplay: 'autoPlay', + autosave: 'autoSave', + capture: 'capture', + cellpadding: 'cellPadding', + cellspacing: 'cellSpacing', + challenge: 'challenge', + charset: 'charSet', + checked: 'checked', + children: 'children', + cite: 'cite', + class: 'className', + classid: 'classID', + classname: 'className', + cols: 'cols', + colspan: 'colSpan', + content: 'content', + contenteditable: 'contentEditable', + contextmenu: 'contextMenu', + controls: 'controls', + controlslist: 'controlsList', + coords: 'coords', + crossorigin: 'crossOrigin', + dangerouslysetinnerhtml: 'dangerouslySetInnerHTML', + data: 'data', + datetime: 'dateTime', + default: 'default', + defaultchecked: 'defaultChecked', + defaultvalue: 'defaultValue', + defer: 'defer', + dir: 'dir', + disabled: 'disabled', + disablepictureinpicture: 'disablePictureInPicture', + download: 'download', + draggable: 'draggable', + enctype: 'encType', + for: 'htmlFor', + form: 'form', + formmethod: 'formMethod', + formaction: 'formAction', + formenctype: 'formEncType', + formnovalidate: 'formNoValidate', + formtarget: 'formTarget', + frameborder: 'frameBorder', + headers: 'headers', + height: 'height', + hidden: 'hidden', + high: 'high', + href: 'href', + hreflang: 'hrefLang', + htmlfor: 'htmlFor', + httpequiv: 'httpEquiv', + 'http-equiv': 'httpEquiv', + icon: 'icon', + id: 'id', + innerhtml: 'innerHTML', + inputmode: 'inputMode', + integrity: 'integrity', + is: 'is', + itemid: 'itemID', + itemprop: 'itemProp', + itemref: 'itemRef', + itemscope: 'itemScope', + itemtype: 'itemType', + keyparams: 'keyParams', + keytype: 'keyType', + kind: 'kind', + label: 'label', + lang: 'lang', + list: 'list', + loop: 'loop', + low: 'low', + manifest: 'manifest', + marginwidth: 'marginWidth', + marginheight: 'marginHeight', + max: 'max', + maxlength: 'maxLength', + media: 'media', + mediagroup: 'mediaGroup', + method: 'method', + min: 'min', + minlength: 'minLength', + multiple: 'multiple', + muted: 'muted', + name: 'name', + nomodule: 'noModule', + nonce: 'nonce', + novalidate: 'noValidate', + open: 'open', + optimum: 'optimum', + pattern: 'pattern', + placeholder: 'placeholder', + playsinline: 'playsInline', + poster: 'poster', + preload: 'preload', + profile: 'profile', + radiogroup: 'radioGroup', + readonly: 'readOnly', + referrerpolicy: 'referrerPolicy', + rel: 'rel', + required: 'required', + reversed: 'reversed', + role: 'role', + rows: 'rows', + rowspan: 'rowSpan', + sandbox: 'sandbox', + scope: 'scope', + scoped: 'scoped', + scrolling: 'scrolling', + seamless: 'seamless', + selected: 'selected', + shape: 'shape', + size: 'size', + sizes: 'sizes', + span: 'span', + spellcheck: 'spellCheck', + src: 'src', + srcdoc: 'srcDoc', + srclang: 'srcLang', + srcset: 'srcSet', + start: 'start', + step: 'step', + style: 'style', + summary: 'summary', + tabindex: 'tabIndex', + target: 'target', + title: 'title', + type: 'type', + usemap: 'useMap', + value: 'value', + width: 'width', + wmode: 'wmode', + wrap: 'wrap', + // SVG + about: 'about', + accentheight: 'accentHeight', + 'accent-height': 'accentHeight', + accumulate: 'accumulate', + additive: 'additive', + alignmentbaseline: 'alignmentBaseline', + 'alignment-baseline': 'alignmentBaseline', + allowreorder: 'allowReorder', + alphabetic: 'alphabetic', + amplitude: 'amplitude', + arabicform: 'arabicForm', + 'arabic-form': 'arabicForm', + ascent: 'ascent', + attributename: 'attributeName', + attributetype: 'attributeType', + autoreverse: 'autoReverse', + azimuth: 'azimuth', + basefrequency: 'baseFrequency', + baselineshift: 'baselineShift', + 'baseline-shift': 'baselineShift', + baseprofile: 'baseProfile', + bbox: 'bbox', + begin: 'begin', + bias: 'bias', + by: 'by', + calcmode: 'calcMode', + capheight: 'capHeight', + 'cap-height': 'capHeight', + clip: 'clip', + clippath: 'clipPath', + 'clip-path': 'clipPath', + clippathunits: 'clipPathUnits', + cliprule: 'clipRule', + 'clip-rule': 'clipRule', + color: 'color', + colorinterpolation: 'colorInterpolation', + 'color-interpolation': 'colorInterpolation', + colorinterpolationfilters: 'colorInterpolationFilters', + 'color-interpolation-filters': 'colorInterpolationFilters', + colorprofile: 'colorProfile', + 'color-profile': 'colorProfile', + colorrendering: 'colorRendering', + 'color-rendering': 'colorRendering', + contentscripttype: 'contentScriptType', + contentstyletype: 'contentStyleType', + cursor: 'cursor', + cx: 'cx', + cy: 'cy', + d: 'd', + datatype: 'datatype', + decelerate: 'decelerate', + descent: 'descent', + diffuseconstant: 'diffuseConstant', + direction: 'direction', + display: 'display', + divisor: 'divisor', + dominantbaseline: 'dominantBaseline', + 'dominant-baseline': 'dominantBaseline', + dur: 'dur', + dx: 'dx', + dy: 'dy', + edgemode: 'edgeMode', + elevation: 'elevation', + enablebackground: 'enableBackground', + 'enable-background': 'enableBackground', + end: 'end', + exponent: 'exponent', + externalresourcesrequired: 'externalResourcesRequired', + fill: 'fill', + fillopacity: 'fillOpacity', + 'fill-opacity': 'fillOpacity', + fillrule: 'fillRule', + 'fill-rule': 'fillRule', + filter: 'filter', + filterres: 'filterRes', + filterunits: 'filterUnits', + floodopacity: 'floodOpacity', + 'flood-opacity': 'floodOpacity', + floodcolor: 'floodColor', + 'flood-color': 'floodColor', + focusable: 'focusable', + fontfamily: 'fontFamily', + 'font-family': 'fontFamily', + fontsize: 'fontSize', + 'font-size': 'fontSize', + fontsizeadjust: 'fontSizeAdjust', + 'font-size-adjust': 'fontSizeAdjust', + fontstretch: 'fontStretch', + 'font-stretch': 'fontStretch', + fontstyle: 'fontStyle', + 'font-style': 'fontStyle', + fontvariant: 'fontVariant', + 'font-variant': 'fontVariant', + fontweight: 'fontWeight', + 'font-weight': 'fontWeight', + format: 'format', + from: 'from', + fx: 'fx', + fy: 'fy', + g1: 'g1', + g2: 'g2', + glyphname: 'glyphName', + 'glyph-name': 'glyphName', + glyphorientationhorizontal: 'glyphOrientationHorizontal', + 'glyph-orientation-horizontal': 'glyphOrientationHorizontal', + glyphorientationvertical: 'glyphOrientationVertical', + 'glyph-orientation-vertical': 'glyphOrientationVertical', + glyphref: 'glyphRef', + gradienttransform: 'gradientTransform', + gradientunits: 'gradientUnits', + hanging: 'hanging', + horizadvx: 'horizAdvX', + 'horiz-adv-x': 'horizAdvX', + horizoriginx: 'horizOriginX', + 'horiz-origin-x': 'horizOriginX', + ideographic: 'ideographic', + imagerendering: 'imageRendering', + 'image-rendering': 'imageRendering', + in2: 'in2', + in: 'in', + inlist: 'inlist', + intercept: 'intercept', + k1: 'k1', + k2: 'k2', + k3: 'k3', + k4: 'k4', + k: 'k', + kernelmatrix: 'kernelMatrix', + kernelunitlength: 'kernelUnitLength', + kerning: 'kerning', + keypoints: 'keyPoints', + keysplines: 'keySplines', + keytimes: 'keyTimes', + lengthadjust: 'lengthAdjust', + letterspacing: 'letterSpacing', + 'letter-spacing': 'letterSpacing', + lightingcolor: 'lightingColor', + 'lighting-color': 'lightingColor', + limitingconeangle: 'limitingConeAngle', + local: 'local', + markerend: 'markerEnd', + 'marker-end': 'markerEnd', + markerheight: 'markerHeight', + markermid: 'markerMid', + 'marker-mid': 'markerMid', + markerstart: 'markerStart', + 'marker-start': 'markerStart', + markerunits: 'markerUnits', + markerwidth: 'markerWidth', + mask: 'mask', + maskcontentunits: 'maskContentUnits', + maskunits: 'maskUnits', + mathematical: 'mathematical', + mode: 'mode', + numoctaves: 'numOctaves', + offset: 'offset', + opacity: 'opacity', + operator: 'operator', + order: 'order', + orient: 'orient', + orientation: 'orientation', + origin: 'origin', + overflow: 'overflow', + overlineposition: 'overlinePosition', + 'overline-position': 'overlinePosition', + overlinethickness: 'overlineThickness', + 'overline-thickness': 'overlineThickness', + paintorder: 'paintOrder', + 'paint-order': 'paintOrder', + panose1: 'panose1', + 'panose-1': 'panose1', + pathlength: 'pathLength', + patterncontentunits: 'patternContentUnits', + patterntransform: 'patternTransform', + patternunits: 'patternUnits', + pointerevents: 'pointerEvents', + 'pointer-events': 'pointerEvents', + points: 'points', + pointsatx: 'pointsAtX', + pointsaty: 'pointsAtY', + pointsatz: 'pointsAtZ', + prefix: 'prefix', + preservealpha: 'preserveAlpha', + preserveaspectratio: 'preserveAspectRatio', + primitiveunits: 'primitiveUnits', + property: 'property', + r: 'r', + radius: 'radius', + refx: 'refX', + refy: 'refY', + renderingintent: 'renderingIntent', + 'rendering-intent': 'renderingIntent', + repeatcount: 'repeatCount', + repeatdur: 'repeatDur', + requiredextensions: 'requiredExtensions', + requiredfeatures: 'requiredFeatures', + resource: 'resource', + restart: 'restart', + result: 'result', + results: 'results', + rotate: 'rotate', + rx: 'rx', + ry: 'ry', + scale: 'scale', + security: 'security', + seed: 'seed', + shaperendering: 'shapeRendering', + 'shape-rendering': 'shapeRendering', + slope: 'slope', + spacing: 'spacing', + specularconstant: 'specularConstant', + specularexponent: 'specularExponent', + speed: 'speed', + spreadmethod: 'spreadMethod', + startoffset: 'startOffset', + stddeviation: 'stdDeviation', + stemh: 'stemh', + stemv: 'stemv', + stitchtiles: 'stitchTiles', + stopcolor: 'stopColor', + 'stop-color': 'stopColor', + stopopacity: 'stopOpacity', + 'stop-opacity': 'stopOpacity', + strikethroughposition: 'strikethroughPosition', + 'strikethrough-position': 'strikethroughPosition', + strikethroughthickness: 'strikethroughThickness', + 'strikethrough-thickness': 'strikethroughThickness', + string: 'string', + stroke: 'stroke', + strokedasharray: 'strokeDasharray', + 'stroke-dasharray': 'strokeDasharray', + strokedashoffset: 'strokeDashoffset', + 'stroke-dashoffset': 'strokeDashoffset', + strokelinecap: 'strokeLinecap', + 'stroke-linecap': 'strokeLinecap', + strokelinejoin: 'strokeLinejoin', + 'stroke-linejoin': 'strokeLinejoin', + strokemiterlimit: 'strokeMiterlimit', + 'stroke-miterlimit': 'strokeMiterlimit', + strokewidth: 'strokeWidth', + 'stroke-width': 'strokeWidth', + strokeopacity: 'strokeOpacity', + 'stroke-opacity': 'strokeOpacity', + suppresscontenteditablewarning: 'suppressContentEditableWarning', + suppresshydrationwarning: 'suppressHydrationWarning', + surfacescale: 'surfaceScale', + systemlanguage: 'systemLanguage', + tablevalues: 'tableValues', + targetx: 'targetX', + targety: 'targetY', + textanchor: 'textAnchor', + 'text-anchor': 'textAnchor', + textdecoration: 'textDecoration', + 'text-decoration': 'textDecoration', + textlength: 'textLength', + textrendering: 'textRendering', + 'text-rendering': 'textRendering', + to: 'to', + transform: 'transform', + typeof: 'typeof', + u1: 'u1', + u2: 'u2', + underlineposition: 'underlinePosition', + 'underline-position': 'underlinePosition', + underlinethickness: 'underlineThickness', + 'underline-thickness': 'underlineThickness', + unicode: 'unicode', + unicodebidi: 'unicodeBidi', + 'unicode-bidi': 'unicodeBidi', + unicoderange: 'unicodeRange', + 'unicode-range': 'unicodeRange', + unitsperem: 'unitsPerEm', + 'units-per-em': 'unitsPerEm', + unselectable: 'unselectable', + valphabetic: 'vAlphabetic', + 'v-alphabetic': 'vAlphabetic', + values: 'values', + vectoreffect: 'vectorEffect', + 'vector-effect': 'vectorEffect', + version: 'version', + vertadvy: 'vertAdvY', + 'vert-adv-y': 'vertAdvY', + vertoriginx: 'vertOriginX', + 'vert-origin-x': 'vertOriginX', + vertoriginy: 'vertOriginY', + 'vert-origin-y': 'vertOriginY', + vhanging: 'vHanging', + 'v-hanging': 'vHanging', + videographic: 'vIdeographic', + 'v-ideographic': 'vIdeographic', + viewbox: 'viewBox', + viewtarget: 'viewTarget', + visibility: 'visibility', + vmathematical: 'vMathematical', + 'v-mathematical': 'vMathematical', + vocab: 'vocab', + widths: 'widths', + wordspacing: 'wordSpacing', + 'word-spacing': 'wordSpacing', + writingmode: 'writingMode', + 'writing-mode': 'writingMode', + x1: 'x1', + x2: 'x2', + x: 'x', + xchannelselector: 'xChannelSelector', + xheight: 'xHeight', + 'x-height': 'xHeight', + xlinkactuate: 'xlinkActuate', + 'xlink:actuate': 'xlinkActuate', + xlinkarcrole: 'xlinkArcrole', + 'xlink:arcrole': 'xlinkArcrole', + xlinkhref: 'xlinkHref', + 'xlink:href': 'xlinkHref', + xlinkrole: 'xlinkRole', + 'xlink:role': 'xlinkRole', + xlinkshow: 'xlinkShow', + 'xlink:show': 'xlinkShow', + xlinktitle: 'xlinkTitle', + 'xlink:title': 'xlinkTitle', + xlinktype: 'xlinkType', + 'xlink:type': 'xlinkType', + xmlbase: 'xmlBase', + 'xml:base': 'xmlBase', + xmllang: 'xmlLang', + 'xml:lang': 'xmlLang', + xmlns: 'xmlns', + 'xml:space': 'xmlSpace', + xmlnsxlink: 'xmlnsXlink', + 'xmlns:xlink': 'xmlnsXlink', + xmlspace: 'xmlSpace', + y1: 'y1', + y2: 'y2', + y: 'y', + ychannelselector: 'yChannelSelector', + z: 'z', + zoomandpan: 'zoomAndPan', + }; + + var ariaProperties = { + 'aria-current': 0, + // state + 'aria-details': 0, + 'aria-disabled': 0, + // state + 'aria-hidden': 0, + // state + 'aria-invalid': 0, + // state + 'aria-keyshortcuts': 0, + 'aria-label': 0, + 'aria-roledescription': 0, + // Widget Attributes + 'aria-autocomplete': 0, + 'aria-checked': 0, + 'aria-expanded': 0, + 'aria-haspopup': 0, + 'aria-level': 0, + 'aria-modal': 0, + 'aria-multiline': 0, + 'aria-multiselectable': 0, + 'aria-orientation': 0, + 'aria-placeholder': 0, + 'aria-pressed': 0, + 'aria-readonly': 0, + 'aria-required': 0, + 'aria-selected': 0, + 'aria-sort': 0, + 'aria-valuemax': 0, + 'aria-valuemin': 0, + 'aria-valuenow': 0, + 'aria-valuetext': 0, + // Live Region Attributes + 'aria-atomic': 0, + 'aria-busy': 0, + 'aria-live': 0, + 'aria-relevant': 0, + // Drag-and-Drop Attributes + 'aria-dropeffect': 0, + 'aria-grabbed': 0, + // Relationship Attributes + 'aria-activedescendant': 0, + 'aria-colcount': 0, + 'aria-colindex': 0, + 'aria-colspan': 0, + 'aria-controls': 0, + 'aria-describedby': 0, + 'aria-errormessage': 0, + 'aria-flowto': 0, + 'aria-labelledby': 0, + 'aria-owns': 0, + 'aria-posinset': 0, + 'aria-rowcount': 0, + 'aria-rowindex': 0, + 'aria-rowspan': 0, + 'aria-setsize': 0, + }; + + var warnedProperties = {}; + var rARIA = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$'); + var rARIACamel = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$'); + var hasOwnProperty$1 = Object.prototype.hasOwnProperty; + + function validateProperty(tagName, name) { + if (hasOwnProperty$1.call(warnedProperties, name) && warnedProperties[name]) { + return true; + } + + if (rARIACamel.test(name)) { + var ariaName = 'aria-' + name.slice(4).toLowerCase(); + var correctName = ariaProperties.hasOwnProperty(ariaName) ? ariaName : null; // If this is an aria-* attribute, but is not listed in the known DOM + // DOM properties, then it is an invalid aria-* attribute. + + if (correctName == null) { + warning$1( + false, + 'Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.', + name, + ); + warnedProperties[name] = true; + return true; + } // aria-* attributes should be lowercase; suggest the lowercase version. + + if (name !== correctName) { + warning$1(false, 'Invalid ARIA attribute `%s`. Did you mean `%s`?', name, correctName); + warnedProperties[name] = true; + return true; + } + } + + if (rARIA.test(name)) { + var lowerCasedName = name.toLowerCase(); + var standardName = ariaProperties.hasOwnProperty(lowerCasedName) ? lowerCasedName : null; // If this is an aria-* attribute, but is not listed in the known DOM + // DOM properties, then it is an invalid aria-* attribute. + + if (standardName == null) { + warnedProperties[name] = true; + return false; + } // aria-* attributes should be lowercase; suggest the lowercase version. + + if (name !== standardName) { + warning$1(false, 'Unknown ARIA attribute `%s`. Did you mean `%s`?', name, standardName); + warnedProperties[name] = true; + return true; + } + } + + return true; + } + + function warnInvalidARIAProps(type, props) { + var invalidProps = []; + + for (var key in props) { + var isValid = validateProperty(type, key); + + if (!isValid) { + invalidProps.push(key); + } + } + + var unknownPropString = invalidProps + .map(function (prop) { + return '`' + prop + '`'; + }) + .join(', '); + + if (invalidProps.length === 1) { + warning$1( + false, + 'Invalid aria prop %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop', + unknownPropString, + type, + ); + } else if (invalidProps.length > 1) { + warning$1( + false, + 'Invalid aria props %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop', + unknownPropString, + type, + ); + } + } + + function validateProperties(type, props) { + if (isCustomComponent(type, props)) { + return; + } + + warnInvalidARIAProps(type, props); + } + + var didWarnValueNull = false; + function validateProperties$1(type, props) { + if (type !== 'input' && type !== 'textarea' && type !== 'select') { + return; + } + + if (props != null && props.value === null && !didWarnValueNull) { + didWarnValueNull = true; + + if (type === 'select' && props.multiple) { + warning$1( + false, + '`value` prop on `%s` should not be null. ' + + 'Consider using an empty array when `multiple` is set to `true` ' + + 'to clear the component or `undefined` for uncontrolled components.', + type, + ); + } else { + warning$1( + false, + '`value` prop on `%s` should not be null. ' + + 'Consider using an empty string to clear the component or `undefined` ' + + 'for uncontrolled components.', + type, + ); + } + } + } + + var validateProperty$1 = function () {}; + + { + var warnedProperties$1 = {}; + var _hasOwnProperty = Object.prototype.hasOwnProperty; + var EVENT_NAME_REGEX = /^on./; + var INVALID_EVENT_NAME_REGEX = /^on[^A-Z]/; + var rARIA$1 = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$'); + var rARIACamel$1 = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$'); + + validateProperty$1 = function (tagName, name, value, canUseEventSystem) { + if (_hasOwnProperty.call(warnedProperties$1, name) && warnedProperties$1[name]) { + return true; + } + + var lowerCasedName = name.toLowerCase(); + + if (lowerCasedName === 'onfocusin' || lowerCasedName === 'onfocusout') { + warning$1( + false, + 'React uses onFocus and onBlur instead of onFocusIn and onFocusOut. ' + + 'All React events are normalized to bubble, so onFocusIn and onFocusOut ' + + 'are not needed/supported by React.', + ); + warnedProperties$1[name] = true; + return true; + } // We can't rely on the event system being injected on the server. + + if (canUseEventSystem) { + if (registrationNameModules.hasOwnProperty(name)) { + return true; + } + + var registrationName = possibleRegistrationNames.hasOwnProperty(lowerCasedName) + ? possibleRegistrationNames[lowerCasedName] + : null; + + if (registrationName != null) { + warning$1( + false, + 'Invalid event handler property `%s`. Did you mean `%s`?', + name, + registrationName, + ); + warnedProperties$1[name] = true; + return true; + } + + if (EVENT_NAME_REGEX.test(name)) { + warning$1(false, 'Unknown event handler property `%s`. It will be ignored.', name); + warnedProperties$1[name] = true; + return true; + } + } else if (EVENT_NAME_REGEX.test(name)) { + // If no event plugins have been injected, we are in a server environment. + // So we can't tell if the event name is correct for sure, but we can filter + // out known bad ones like `onclick`. We can't suggest a specific replacement though. + if (INVALID_EVENT_NAME_REGEX.test(name)) { + warning$1( + false, + 'Invalid event handler property `%s`. ' + + 'React events use the camelCase naming convention, for example `onClick`.', + name, + ); + } + + warnedProperties$1[name] = true; + return true; + } // Let the ARIA attribute hook validate ARIA attributes + + if (rARIA$1.test(name) || rARIACamel$1.test(name)) { + return true; + } + + if (lowerCasedName === 'innerhtml') { + warning$1( + false, + 'Directly setting property `innerHTML` is not permitted. ' + + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.', + ); + warnedProperties$1[name] = true; + return true; + } + + if (lowerCasedName === 'aria') { + warning$1( + false, + 'The `aria` attribute is reserved for future use in React. ' + + 'Pass individual `aria-` attributes instead.', + ); + warnedProperties$1[name] = true; + return true; + } + + if ( + lowerCasedName === 'is' && + value !== null && + value !== undefined && + typeof value !== 'string' + ) { + warning$1( + false, + 'Received a `%s` for a string attribute `is`. If this is expected, cast ' + + 'the value to a string.', + typeof value, + ); + warnedProperties$1[name] = true; + return true; + } + + if (typeof value === 'number' && isNaN(value)) { + warning$1( + false, + 'Received NaN for the `%s` attribute. If this is expected, cast ' + + 'the value to a string.', + name, + ); + warnedProperties$1[name] = true; + return true; + } + + var propertyInfo = getPropertyInfo(name); + var isReserved = propertyInfo !== null && propertyInfo.type === RESERVED; // Known attributes should match the casing specified in the property config. + + if (possibleStandardNames.hasOwnProperty(lowerCasedName)) { + var standardName = possibleStandardNames[lowerCasedName]; + + if (standardName !== name) { + warning$1(false, 'Invalid DOM property `%s`. Did you mean `%s`?', name, standardName); + warnedProperties$1[name] = true; + return true; + } + } else if (!isReserved && name !== lowerCasedName) { + // Unknown attributes should have lowercase casing since that's how they + // will be cased anyway with server rendering. + warning$1( + false, + 'React does not recognize the `%s` prop on a DOM element. If you ' + + 'intentionally want it to appear in the DOM as a custom ' + + 'attribute, spell it as lowercase `%s` instead. ' + + 'If you accidentally passed it from a parent component, remove ' + + 'it from the DOM element.', + name, + lowerCasedName, + ); + warnedProperties$1[name] = true; + return true; + } + + if ( + typeof value === 'boolean' && + shouldRemoveAttributeWithWarning(name, value, propertyInfo, false) + ) { + if (value) { + warning$1( + false, + 'Received `%s` for a non-boolean attribute `%s`.\n\n' + + 'If you want to write it to the DOM, pass a string instead: ' + + '%s="%s" or %s={value.toString()}.', + value, + name, + name, + value, + name, + ); + } else { + warning$1( + false, + 'Received `%s` for a non-boolean attribute `%s`.\n\n' + + 'If you want to write it to the DOM, pass a string instead: ' + + '%s="%s" or %s={value.toString()}.\n\n' + + 'If you used to conditionally omit it with %s={condition && value}, ' + + 'pass %s={condition ? value : undefined} instead.', + value, + name, + name, + value, + name, + name, + name, + ); + } + + warnedProperties$1[name] = true; + return true; + } // Now that we've validated casing, do not validate + // data types for reserved props + + if (isReserved) { + return true; + } // Warn when a known attribute is a bad type + + if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, false)) { + warnedProperties$1[name] = true; + return false; + } // Warn when passing the strings 'false' or 'true' into a boolean prop + + if ( + (value === 'false' || value === 'true') && + propertyInfo !== null && + propertyInfo.type === BOOLEAN + ) { + warning$1( + false, + 'Received the string `%s` for the boolean attribute `%s`. ' + + '%s ' + + 'Did you mean %s={%s}?', + value, + name, + value === 'false' + ? 'The browser will interpret it as a truthy value.' + : 'Although this works, it will not work as expected if you pass the string "false".', + name, + value, + ); + warnedProperties$1[name] = true; + return true; + } + + return true; + }; + } + + var warnUnknownProperties = function (type, props, canUseEventSystem) { + var unknownProps = []; + + for (var key in props) { + var isValid = validateProperty$1(type, key, props[key], canUseEventSystem); + + if (!isValid) { + unknownProps.push(key); + } + } + + var unknownPropString = unknownProps + .map(function (prop) { + return '`' + prop + '`'; + }) + .join(', '); + + if (unknownProps.length === 1) { + warning$1( + false, + 'Invalid value for prop %s on <%s> tag. Either remove it from the element, ' + + 'or pass a string or number value to keep it in the DOM. ' + + 'For details, see https://fb.me/react-attribute-behavior', + unknownPropString, + type, + ); + } else if (unknownProps.length > 1) { + warning$1( + false, + 'Invalid values for props %s on <%s> tag. Either remove them from the element, ' + + 'or pass a string or number value to keep them in the DOM. ' + + 'For details, see https://fb.me/react-attribute-behavior', + unknownPropString, + type, + ); + } + }; + + function validateProperties$2(type, props, canUseEventSystem) { + if (isCustomComponent(type, props)) { + return; + } + + warnUnknownProperties(type, props, canUseEventSystem); + } + + // TODO: direct imports like some-package/src/* are bad. Fix me. + var didWarnInvalidHydration = false; + var didWarnShadyDOM = false; + var didWarnScriptTags = false; + var DANGEROUSLY_SET_INNER_HTML = 'dangerouslySetInnerHTML'; + var SUPPRESS_CONTENT_EDITABLE_WARNING = 'suppressContentEditableWarning'; + var SUPPRESS_HYDRATION_WARNING$1 = 'suppressHydrationWarning'; + var AUTOFOCUS = 'autoFocus'; + var CHILDREN = 'children'; + var STYLE$1 = 'style'; + var HTML = '__html'; + var LISTENERS = 'listeners'; + var HTML_NAMESPACE = Namespaces.html; + var warnedUnknownTags; + var suppressHydrationWarning; + var validatePropertiesInDevelopment; + var warnForTextDifference; + var warnForPropDifference; + var warnForExtraAttributes; + var warnForInvalidEventListener; + var canDiffStyleForHydrationWarning; + var normalizeMarkupForTextOrAttribute; + var normalizeHTML; + + { + warnedUnknownTags = { + // Chrome is the only major browser not shipping <time>. But as of July + // 2017 it intends to ship it due to widespread usage. We intentionally + // *don't* warn for <time> even if it's unrecognized by Chrome because + // it soon will be, and many apps have been using it anyway. + time: true, + // There are working polyfills for <dialog>. Let people use it. + dialog: true, + // Electron ships a custom <webview> tag to display external web content in + // an isolated frame and process. + // This tag is not present in non Electron environments such as JSDom which + // is often used for testing purposes. + // @see https://electronjs.org/docs/api/webview-tag + webview: true, + }; + + validatePropertiesInDevelopment = function (type, props) { + validateProperties(type, props); + validateProperties$1(type, props); + validateProperties$2( + type, + props, + /* canUseEventSystem */ + true, + ); + }; // IE 11 parses & normalizes the style attribute as opposed to other + // browsers. It adds spaces and sorts the properties in some + // non-alphabetical order. Handling that would require sorting CSS + // properties in the client & server versions or applying + // `expectedStyle` to a temporary DOM node to read its `style` attribute + // normalized. Since it only affects IE, we're skipping style warnings + // in that browser completely in favor of doing all that work. + // See https://github.com/facebook/react/issues/11807 + + canDiffStyleForHydrationWarning = canUseDOM && !document.documentMode; // HTML parsing normalizes CR and CRLF to LF. + // It also can turn \u0000 into \uFFFD inside attributes. + // https://www.w3.org/TR/html5/single-page.html#preprocessing-the-input-stream + // If we have a mismatch, it might be caused by that. + // We will still patch up in this case but not fire the warning. + + var NORMALIZE_NEWLINES_REGEX = /\r\n?/g; + var NORMALIZE_NULL_AND_REPLACEMENT_REGEX = /\u0000|\uFFFD/g; + + normalizeMarkupForTextOrAttribute = function (markup) { + var markupString = typeof markup === 'string' ? markup : '' + markup; + return markupString + .replace(NORMALIZE_NEWLINES_REGEX, '\n') + .replace(NORMALIZE_NULL_AND_REPLACEMENT_REGEX, ''); + }; + + warnForTextDifference = function (serverText, clientText) { + if (didWarnInvalidHydration) { + return; + } + + var normalizedClientText = normalizeMarkupForTextOrAttribute(clientText); + var normalizedServerText = normalizeMarkupForTextOrAttribute(serverText); + + if (normalizedServerText === normalizedClientText) { + return; + } + + didWarnInvalidHydration = true; + warningWithoutStack$1( + false, + 'Text content did not match. Server: "%s" Client: "%s"', + normalizedServerText, + normalizedClientText, + ); + }; + + warnForPropDifference = function (propName, serverValue, clientValue) { + if (didWarnInvalidHydration) { + return; + } + + var normalizedClientValue = normalizeMarkupForTextOrAttribute(clientValue); + var normalizedServerValue = normalizeMarkupForTextOrAttribute(serverValue); + + if (normalizedServerValue === normalizedClientValue) { + return; + } + + didWarnInvalidHydration = true; + warningWithoutStack$1( + false, + 'Prop `%s` did not match. Server: %s Client: %s', + propName, + JSON.stringify(normalizedServerValue), + JSON.stringify(normalizedClientValue), + ); + }; + + warnForExtraAttributes = function (attributeNames) { + if (didWarnInvalidHydration) { + return; + } + + didWarnInvalidHydration = true; + var names = []; + attributeNames.forEach(function (name) { + names.push(name); + }); + warningWithoutStack$1(false, 'Extra attributes from the server: %s', names); + }; + + warnForInvalidEventListener = function (registrationName, listener) { + if (listener === false) { + warning$1( + false, + 'Expected `%s` listener to be a function, instead got `false`.\n\n' + + 'If you used to conditionally omit it with %s={condition && value}, ' + + 'pass %s={condition ? value : undefined} instead.', + registrationName, + registrationName, + registrationName, + ); + } else { + warning$1( + false, + 'Expected `%s` listener to be a function, instead got a value of `%s` type.', + registrationName, + typeof listener, + ); + } + }; // Parse the HTML and read it back to normalize the HTML string so that it + // can be used for comparison. + + normalizeHTML = function (parent, html) { + // We could have created a separate document here to avoid + // re-initializing custom elements if they exist. But this breaks + // how <noscript> is being handled. So we use the same document. + // See the discussion in https://github.com/facebook/react/pull/11157. + var testElement = + parent.namespaceURI === HTML_NAMESPACE + ? parent.ownerDocument.createElement(parent.tagName) + : parent.ownerDocument.createElementNS(parent.namespaceURI, parent.tagName); + testElement.innerHTML = html; + return testElement.innerHTML; + }; + } + + function ensureListeningTo(rootContainerElement, registrationName) { + var isDocumentOrFragment = + rootContainerElement.nodeType === DOCUMENT_NODE || + rootContainerElement.nodeType === DOCUMENT_FRAGMENT_NODE; + var doc = isDocumentOrFragment ? rootContainerElement : rootContainerElement.ownerDocument; + listenTo(registrationName, doc); + } + + function getOwnerDocumentFromRootContainer(rootContainerElement) { + return rootContainerElement.nodeType === DOCUMENT_NODE + ? rootContainerElement + : rootContainerElement.ownerDocument; + } + + function noop() {} + + function trapClickOnNonInteractiveElement(node) { + // Mobile Safari does not fire properly bubble click events on + // non-interactive elements, which means delegated click listeners do not + // fire. The workaround for this bug involves attaching an empty click + // listener on the target node. + // http://www.quirksmode.org/blog/archives/2010/09/click_event_del.html + // Just set it using the onclick property so that we don't have to manage any + // bookkeeping for it. Not sure if we need to clear it when the listener is + // removed. + // TODO: Only do this for the relevant Safaris maybe? + node.onclick = noop; + } + + function setInitialDOMProperties( + tag, + domElement, + rootContainerElement, + nextProps, + isCustomComponentTag, + ) { + for (var propKey in nextProps) { + if (!nextProps.hasOwnProperty(propKey)) { + continue; + } + + var nextProp = nextProps[propKey]; + + if (propKey === STYLE$1) { + { + if (nextProp) { + // Freeze the next style object so that we can assume it won't be + // mutated. We have already warned for this in the past. + Object.freeze(nextProp); + } + } // Relies on `updateStylesByID` not mutating `styleUpdates`. + + setValueForStyles(domElement, nextProp); + } else if (propKey === DANGEROUSLY_SET_INNER_HTML) { + var nextHtml = nextProp ? nextProp[HTML] : undefined; + + if (nextHtml != null) { + setInnerHTML(domElement, nextHtml); + } + } else if (propKey === CHILDREN) { + if (typeof nextProp === 'string') { + // Avoid setting initial textContent when the text is empty. In IE11 setting + // textContent on a <textarea> will cause the placeholder to not + // show within the <textarea> until it has been focused and blurred again. + // https://github.com/facebook/react/issues/6731#issuecomment-254874553 + var canSetTextContent = tag !== 'textarea' || nextProp !== ''; + + if (canSetTextContent) { + setTextContent(domElement, nextProp); + } + } else if (typeof nextProp === 'number') { + setTextContent(domElement, '' + nextProp); + } + } else if ( + (enableFlareAPI && propKey === LISTENERS) || + propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || + propKey === SUPPRESS_HYDRATION_WARNING$1 + ) { + // Noop + } else if (propKey === AUTOFOCUS) { + // We polyfill it separately on the client during commit. + // We could have excluded it in the property list instead of + // adding a special case here, but then it wouldn't be emitted + // on server rendering (but we *do* want to emit it in SSR). + } else if (registrationNameModules.hasOwnProperty(propKey)) { + if (nextProp != null) { + if (true && typeof nextProp !== 'function') { + warnForInvalidEventListener(propKey, nextProp); + } + + ensureListeningTo(rootContainerElement, propKey); + } + } else if (nextProp != null) { + setValueForProperty(domElement, propKey, nextProp, isCustomComponentTag); + } + } + } + + function updateDOMProperties( + domElement, + updatePayload, + wasCustomComponentTag, + isCustomComponentTag, + ) { + // TODO: Handle wasCustomComponentTag + for (var i = 0; i < updatePayload.length; i += 2) { + var propKey = updatePayload[i]; + var propValue = updatePayload[i + 1]; + + if (propKey === STYLE$1) { + setValueForStyles(domElement, propValue); + } else if (propKey === DANGEROUSLY_SET_INNER_HTML) { + setInnerHTML(domElement, propValue); + } else if (propKey === CHILDREN) { + setTextContent(domElement, propValue); + } else { + setValueForProperty(domElement, propKey, propValue, isCustomComponentTag); + } + } + } + + function createElement(type, props, rootContainerElement, parentNamespace) { + var isCustomComponentTag; // We create tags in the namespace of their parent container, except HTML + // tags get no namespace. + + var ownerDocument = getOwnerDocumentFromRootContainer(rootContainerElement); + var domElement; + var namespaceURI = parentNamespace; + + if (namespaceURI === HTML_NAMESPACE) { + namespaceURI = getIntrinsicNamespace(type); + } + + if (namespaceURI === HTML_NAMESPACE) { + { + isCustomComponentTag = isCustomComponent(type, props); // Should this check be gated by parent namespace? Not sure we want to + // allow <SVG> or <mATH>. + + !(isCustomComponentTag || type === type.toLowerCase()) + ? warning$1( + false, + '<%s /> is using incorrect casing. ' + + 'Use PascalCase for React components, ' + + 'or lowercase for HTML elements.', + type, + ) + : void 0; + } + + if (type === 'script') { + // Create the script via .innerHTML so its "parser-inserted" flag is + // set to true and it does not execute + var div = ownerDocument.createElement('div'); + + { + if (enableTrustedTypesIntegration && !didWarnScriptTags) { + warning$1( + false, + 'Encountered a script tag while rendering React component. ' + + 'Scripts inside React components are never executed when rendering ' + + 'on the client. Consider using template tag instead ' + + '(https://developer.mozilla.org/en-US/docs/Web/HTML/Element/template).', + ); + didWarnScriptTags = true; + } + } + + div.innerHTML = '<script><' + '/script>'; // eslint-disable-line + // This is guaranteed to yield a script element. + + var firstChild = div.firstChild; + domElement = div.removeChild(firstChild); + } else if (typeof props.is === 'string') { + // $FlowIssue `createElement` should be updated for Web Components + domElement = ownerDocument.createElement(type, { + is: props.is, + }); + } else { + // Separate else branch instead of using `props.is || undefined` above because of a Firefox bug. + // See discussion in https://github.com/facebook/react/pull/6896 + // and discussion in https://bugzilla.mozilla.org/show_bug.cgi?id=1276240 + domElement = ownerDocument.createElement(type); // Normally attributes are assigned in `setInitialDOMProperties`, however the `multiple` and `size` + // attributes on `select`s needs to be added before `option`s are inserted. + // This prevents: + // - a bug where the `select` does not scroll to the correct option because singular + // `select` elements automatically pick the first item #13222 + // - a bug where the `select` set the first item as selected despite the `size` attribute #14239 + // See https://github.com/facebook/react/issues/13222 + // and https://github.com/facebook/react/issues/14239 + + if (type === 'select') { + var node = domElement; + + if (props.multiple) { + node.multiple = true; + } else if (props.size) { + // Setting a size greater than 1 causes a select to behave like `multiple=true`, where + // it is possible that no option is selected. + // + // This is only necessary when a select in "single selection mode". + node.size = props.size; + } + } + } + } else { + domElement = ownerDocument.createElementNS(namespaceURI, type); + } + + { + if (namespaceURI === HTML_NAMESPACE) { + if ( + !isCustomComponentTag && + Object.prototype.toString.call(domElement) === '[object HTMLUnknownElement]' && + !Object.prototype.hasOwnProperty.call(warnedUnknownTags, type) + ) { + warnedUnknownTags[type] = true; + warning$1( + false, + 'The tag <%s> is unrecognized in this browser. ' + + 'If you meant to render a React component, start its name with ' + + 'an uppercase letter.', + type, + ); + } + } + } + + return domElement; + } + function createTextNode(text, rootContainerElement) { + return getOwnerDocumentFromRootContainer(rootContainerElement).createTextNode(text); + } + function setInitialProperties(domElement, tag, rawProps, rootContainerElement) { + var isCustomComponentTag = isCustomComponent(tag, rawProps); + + { + validatePropertiesInDevelopment(tag, rawProps); + + if (isCustomComponentTag && !didWarnShadyDOM && domElement.shadyRoot) { + warning$1( + false, + '%s is using shady DOM. Using shady DOM with React can ' + 'cause things to break subtly.', + getCurrentFiberOwnerNameInDevOrNull() || 'A component', + ); + didWarnShadyDOM = true; + } + } // TODO: Make sure that we check isMounted before firing any of these events. + + var props; + + switch (tag) { + case 'iframe': + case 'object': + case 'embed': + trapBubbledEvent(TOP_LOAD, domElement); + props = rawProps; + break; + + case 'video': + case 'audio': + // Create listener for each media event + for (var i = 0; i < mediaEventTypes.length; i++) { + trapBubbledEvent(mediaEventTypes[i], domElement); + } + + props = rawProps; + break; + + case 'source': + trapBubbledEvent(TOP_ERROR, domElement); + props = rawProps; + break; + + case 'img': + case 'image': + case 'link': + trapBubbledEvent(TOP_ERROR, domElement); + trapBubbledEvent(TOP_LOAD, domElement); + props = rawProps; + break; + + case 'form': + trapBubbledEvent(TOP_RESET, domElement); + trapBubbledEvent(TOP_SUBMIT, domElement); + props = rawProps; + break; + + case 'details': + trapBubbledEvent(TOP_TOGGLE, domElement); + props = rawProps; + break; + + case 'input': + initWrapperState(domElement, rawProps); + props = getHostProps(domElement, rawProps); + trapBubbledEvent(TOP_INVALID, domElement); // For controlled components we always need to ensure we're listening + // to onChange. Even if there is no listener. + + ensureListeningTo(rootContainerElement, 'onChange'); + break; + + case 'option': + validateProps(domElement, rawProps); + props = getHostProps$1(domElement, rawProps); + break; + + case 'select': + initWrapperState$1(domElement, rawProps); + props = getHostProps$2(domElement, rawProps); + trapBubbledEvent(TOP_INVALID, domElement); // For controlled components we always need to ensure we're listening + // to onChange. Even if there is no listener. + + ensureListeningTo(rootContainerElement, 'onChange'); + break; + + case 'textarea': + initWrapperState$2(domElement, rawProps); + props = getHostProps$3(domElement, rawProps); + trapBubbledEvent(TOP_INVALID, domElement); // For controlled components we always need to ensure we're listening + // to onChange. Even if there is no listener. + + ensureListeningTo(rootContainerElement, 'onChange'); + break; + + default: + props = rawProps; + } + + assertValidProps(tag, props); + setInitialDOMProperties(tag, domElement, rootContainerElement, props, isCustomComponentTag); + + switch (tag) { + case 'input': + // TODO: Make sure we check if this is still unmounted or do any clean + // up necessary since we never stop tracking anymore. + track(domElement); + postMountWrapper(domElement, rawProps, false); + break; + + case 'textarea': + // TODO: Make sure we check if this is still unmounted or do any clean + // up necessary since we never stop tracking anymore. + track(domElement); + postMountWrapper$3(domElement, rawProps); + break; + + case 'option': + postMountWrapper$1(domElement, rawProps); + break; + + case 'select': + postMountWrapper$2(domElement, rawProps); + break; + + default: + if (typeof props.onClick === 'function') { + // TODO: This cast may not be sound for SVG, MathML or custom elements. + trapClickOnNonInteractiveElement(domElement); + } + + break; + } + } // Calculate the diff between the two objects. + + function diffProperties(domElement, tag, lastRawProps, nextRawProps, rootContainerElement) { + { + validatePropertiesInDevelopment(tag, nextRawProps); + } + + var updatePayload = null; + var lastProps; + var nextProps; + + switch (tag) { + case 'input': + lastProps = getHostProps(domElement, lastRawProps); + nextProps = getHostProps(domElement, nextRawProps); + updatePayload = []; + break; + + case 'option': + lastProps = getHostProps$1(domElement, lastRawProps); + nextProps = getHostProps$1(domElement, nextRawProps); + updatePayload = []; + break; + + case 'select': + lastProps = getHostProps$2(domElement, lastRawProps); + nextProps = getHostProps$2(domElement, nextRawProps); + updatePayload = []; + break; + + case 'textarea': + lastProps = getHostProps$3(domElement, lastRawProps); + nextProps = getHostProps$3(domElement, nextRawProps); + updatePayload = []; + break; + + default: + lastProps = lastRawProps; + nextProps = nextRawProps; + + if (typeof lastProps.onClick !== 'function' && typeof nextProps.onClick === 'function') { + // TODO: This cast may not be sound for SVG, MathML or custom elements. + trapClickOnNonInteractiveElement(domElement); + } + + break; + } + + assertValidProps(tag, nextProps); + var propKey; + var styleName; + var styleUpdates = null; + + for (propKey in lastProps) { + if ( + nextProps.hasOwnProperty(propKey) || + !lastProps.hasOwnProperty(propKey) || + lastProps[propKey] == null + ) { + continue; + } + + if (propKey === STYLE$1) { + var lastStyle = lastProps[propKey]; + + for (styleName in lastStyle) { + if (lastStyle.hasOwnProperty(styleName)) { + if (!styleUpdates) { + styleUpdates = {}; + } + + styleUpdates[styleName] = ''; + } + } + } else if (propKey === DANGEROUSLY_SET_INNER_HTML || propKey === CHILDREN) { + // Noop. This is handled by the clear text mechanism. + } else if ( + (enableFlareAPI && propKey === LISTENERS) || + propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || + propKey === SUPPRESS_HYDRATION_WARNING$1 + ) { + // Noop + } else if (propKey === AUTOFOCUS) { + // Noop. It doesn't work on updates anyway. + } else if (registrationNameModules.hasOwnProperty(propKey)) { + // This is a special case. If any listener updates we need to ensure + // that the "current" fiber pointer gets updated so we need a commit + // to update this element. + if (!updatePayload) { + updatePayload = []; + } + } else { + // For all other deleted properties we add it to the queue. We use + // the whitelist in the commit phase instead. + (updatePayload = updatePayload || []).push(propKey, null); + } + } + + for (propKey in nextProps) { + var nextProp = nextProps[propKey]; + var lastProp = lastProps != null ? lastProps[propKey] : undefined; + + if ( + !nextProps.hasOwnProperty(propKey) || + nextProp === lastProp || + (nextProp == null && lastProp == null) + ) { + continue; + } + + if (propKey === STYLE$1) { + { + if (nextProp) { + // Freeze the next style object so that we can assume it won't be + // mutated. We have already warned for this in the past. + Object.freeze(nextProp); + } + } + + if (lastProp) { + // Unset styles on `lastProp` but not on `nextProp`. + for (styleName in lastProp) { + if ( + lastProp.hasOwnProperty(styleName) && + (!nextProp || !nextProp.hasOwnProperty(styleName)) + ) { + if (!styleUpdates) { + styleUpdates = {}; + } + + styleUpdates[styleName] = ''; + } + } // Update styles that changed since `lastProp`. + + for (styleName in nextProp) { + if (nextProp.hasOwnProperty(styleName) && lastProp[styleName] !== nextProp[styleName]) { + if (!styleUpdates) { + styleUpdates = {}; + } + + styleUpdates[styleName] = nextProp[styleName]; + } + } + } else { + // Relies on `updateStylesByID` not mutating `styleUpdates`. + if (!styleUpdates) { + if (!updatePayload) { + updatePayload = []; + } + + updatePayload.push(propKey, styleUpdates); + } + + styleUpdates = nextProp; + } + } else if (propKey === DANGEROUSLY_SET_INNER_HTML) { + var nextHtml = nextProp ? nextProp[HTML] : undefined; + var lastHtml = lastProp ? lastProp[HTML] : undefined; + + if (nextHtml != null) { + if (lastHtml !== nextHtml) { + (updatePayload = updatePayload || []).push(propKey, toStringOrTrustedType(nextHtml)); + } + } else { + // TODO: It might be too late to clear this if we have children + // inserted already. + } + } else if (propKey === CHILDREN) { + if (lastProp !== nextProp && (typeof nextProp === 'string' || typeof nextProp === 'number')) { + (updatePayload = updatePayload || []).push(propKey, '' + nextProp); + } + } else if ( + (enableFlareAPI && propKey === LISTENERS) || + propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || + propKey === SUPPRESS_HYDRATION_WARNING$1 + ) { + // Noop + } else if (registrationNameModules.hasOwnProperty(propKey)) { + if (nextProp != null) { + // We eagerly listen to this even though we haven't committed yet. + if (true && typeof nextProp !== 'function') { + warnForInvalidEventListener(propKey, nextProp); + } + + ensureListeningTo(rootContainerElement, propKey); + } + + if (!updatePayload && lastProp !== nextProp) { + // This is a special case. If any listener updates we need to ensure + // that the "current" props pointer gets updated so we need a commit + // to update this element. + updatePayload = []; + } + } else { + // For any other property we always add it to the queue and then we + // filter it out using the whitelist during the commit. + (updatePayload = updatePayload || []).push(propKey, nextProp); + } + } + + if (styleUpdates) { + { + validateShorthandPropertyCollisionInDev(styleUpdates, nextProps[STYLE$1]); + } + + (updatePayload = updatePayload || []).push(STYLE$1, styleUpdates); + } + + return updatePayload; + } // Apply the diff. + + function updateProperties(domElement, updatePayload, tag, lastRawProps, nextRawProps) { + // Update checked *before* name. + // In the middle of an update, it is possible to have multiple checked. + // When a checked radio tries to change name, browser makes another radio's checked false. + if (tag === 'input' && nextRawProps.type === 'radio' && nextRawProps.name != null) { + updateChecked(domElement, nextRawProps); + } + + var wasCustomComponentTag = isCustomComponent(tag, lastRawProps); + var isCustomComponentTag = isCustomComponent(tag, nextRawProps); // Apply the diff. + + updateDOMProperties(domElement, updatePayload, wasCustomComponentTag, isCustomComponentTag); // TODO: Ensure that an update gets scheduled if any of the special props + // changed. + + switch (tag) { + case 'input': + // Update the wrapper around inputs *after* updating props. This has to + // happen after `updateDOMProperties`. Otherwise HTML5 input validations + // raise warnings and prevent the new value from being assigned. + updateWrapper(domElement, nextRawProps); + break; + + case 'textarea': + updateWrapper$1(domElement, nextRawProps); + break; + + case 'select': + // <select> value update needs to occur after <option> children + // reconciliation + postUpdateWrapper(domElement, nextRawProps); + break; + } + } + + function getPossibleStandardName(propName) { + { + var lowerCasedName = propName.toLowerCase(); + + if (!possibleStandardNames.hasOwnProperty(lowerCasedName)) { + return null; + } + + return possibleStandardNames[lowerCasedName] || null; + } + + return null; + } + + function diffHydratedProperties(domElement, tag, rawProps, parentNamespace, rootContainerElement) { + var isCustomComponentTag; + var extraAttributeNames; + + { + suppressHydrationWarning = rawProps[SUPPRESS_HYDRATION_WARNING$1] === true; + isCustomComponentTag = isCustomComponent(tag, rawProps); + validatePropertiesInDevelopment(tag, rawProps); + + if (isCustomComponentTag && !didWarnShadyDOM && domElement.shadyRoot) { + warning$1( + false, + '%s is using shady DOM. Using shady DOM with React can ' + 'cause things to break subtly.', + getCurrentFiberOwnerNameInDevOrNull() || 'A component', + ); + didWarnShadyDOM = true; + } + } // TODO: Make sure that we check isMounted before firing any of these events. + + switch (tag) { + case 'iframe': + case 'object': + case 'embed': + trapBubbledEvent(TOP_LOAD, domElement); + break; + + case 'video': + case 'audio': + // Create listener for each media event + for (var i = 0; i < mediaEventTypes.length; i++) { + trapBubbledEvent(mediaEventTypes[i], domElement); + } + + break; + + case 'source': + trapBubbledEvent(TOP_ERROR, domElement); + break; + + case 'img': + case 'image': + case 'link': + trapBubbledEvent(TOP_ERROR, domElement); + trapBubbledEvent(TOP_LOAD, domElement); + break; + + case 'form': + trapBubbledEvent(TOP_RESET, domElement); + trapBubbledEvent(TOP_SUBMIT, domElement); + break; + + case 'details': + trapBubbledEvent(TOP_TOGGLE, domElement); + break; + + case 'input': + initWrapperState(domElement, rawProps); + trapBubbledEvent(TOP_INVALID, domElement); // For controlled components we always need to ensure we're listening + // to onChange. Even if there is no listener. + + ensureListeningTo(rootContainerElement, 'onChange'); + break; + + case 'option': + validateProps(domElement, rawProps); + break; + + case 'select': + initWrapperState$1(domElement, rawProps); + trapBubbledEvent(TOP_INVALID, domElement); // For controlled components we always need to ensure we're listening + // to onChange. Even if there is no listener. + + ensureListeningTo(rootContainerElement, 'onChange'); + break; + + case 'textarea': + initWrapperState$2(domElement, rawProps); + trapBubbledEvent(TOP_INVALID, domElement); // For controlled components we always need to ensure we're listening + // to onChange. Even if there is no listener. + + ensureListeningTo(rootContainerElement, 'onChange'); + break; + } + + assertValidProps(tag, rawProps); + + { + extraAttributeNames = new Set(); + var attributes = domElement.attributes; + + for (var _i = 0; _i < attributes.length; _i++) { + var name = attributes[_i].name.toLowerCase(); + + switch (name) { + // Built-in SSR attribute is whitelisted + case 'data-reactroot': + break; + // Controlled attributes are not validated + // TODO: Only ignore them on controlled tags. + + case 'value': + break; + + case 'checked': + break; + + case 'selected': + break; + + default: + // Intentionally use the original name. + // See discussion in https://github.com/facebook/react/pull/10676. + extraAttributeNames.add(attributes[_i].name); + } + } + } + + var updatePayload = null; + + for (var propKey in rawProps) { + if (!rawProps.hasOwnProperty(propKey)) { + continue; + } + + var nextProp = rawProps[propKey]; + + if (propKey === CHILDREN) { + // For text content children we compare against textContent. This + // might match additional HTML that is hidden when we read it using + // textContent. E.g. "foo" will match "f<span>oo</span>" but that still + // satisfies our requirement. Our requirement is not to produce perfect + // HTML and attributes. Ideally we should preserve structure but it's + // ok not to if the visible content is still enough to indicate what + // even listeners these nodes might be wired up to. + // TODO: Warn if there is more than a single textNode as a child. + // TODO: Should we use domElement.firstChild.nodeValue to compare? + if (typeof nextProp === 'string') { + if (domElement.textContent !== nextProp) { + if (true && !suppressHydrationWarning) { + warnForTextDifference(domElement.textContent, nextProp); + } + + updatePayload = [CHILDREN, nextProp]; + } + } else if (typeof nextProp === 'number') { + if (domElement.textContent !== '' + nextProp) { + if (true && !suppressHydrationWarning) { + warnForTextDifference(domElement.textContent, nextProp); + } + + updatePayload = [CHILDREN, '' + nextProp]; + } + } + } else if (registrationNameModules.hasOwnProperty(propKey)) { + if (nextProp != null) { + if (true && typeof nextProp !== 'function') { + warnForInvalidEventListener(propKey, nextProp); + } + + ensureListeningTo(rootContainerElement, propKey); + } + } else if ( + true && // Convince Flow we've calculated it (it's DEV-only in this method.) + typeof isCustomComponentTag === 'boolean' + ) { + // Validate that the properties correspond to their expected values. + var serverValue = void 0; + var propertyInfo = getPropertyInfo(propKey); + + if (suppressHydrationWarning) { + // Don't bother comparing. We're ignoring all these warnings. + } else if ( + (enableFlareAPI && propKey === LISTENERS) || + propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || + propKey === SUPPRESS_HYDRATION_WARNING$1 || // Controlled attributes are not validated + // TODO: Only ignore them on controlled tags. + propKey === 'value' || + propKey === 'checked' || + propKey === 'selected' + ) { + // Noop + } else if (propKey === DANGEROUSLY_SET_INNER_HTML) { + var serverHTML = domElement.innerHTML; + var nextHtml = nextProp ? nextProp[HTML] : undefined; + var expectedHTML = normalizeHTML(domElement, nextHtml != null ? nextHtml : ''); + + if (expectedHTML !== serverHTML) { + warnForPropDifference(propKey, serverHTML, expectedHTML); + } + } else if (propKey === STYLE$1) { + // $FlowFixMe - Should be inferred as not undefined. + extraAttributeNames.delete(propKey); + + if (canDiffStyleForHydrationWarning) { + var expectedStyle = createDangerousStringForStyles(nextProp); + serverValue = domElement.getAttribute('style'); + + if (expectedStyle !== serverValue) { + warnForPropDifference(propKey, serverValue, expectedStyle); + } + } + } else if (isCustomComponentTag) { + // $FlowFixMe - Should be inferred as not undefined. + extraAttributeNames.delete(propKey.toLowerCase()); + serverValue = getValueForAttribute(domElement, propKey, nextProp); + + if (nextProp !== serverValue) { + warnForPropDifference(propKey, serverValue, nextProp); + } + } else if ( + !shouldIgnoreAttribute(propKey, propertyInfo, isCustomComponentTag) && + !shouldRemoveAttribute(propKey, nextProp, propertyInfo, isCustomComponentTag) + ) { + var isMismatchDueToBadCasing = false; + + if (propertyInfo !== null) { + // $FlowFixMe - Should be inferred as not undefined. + extraAttributeNames.delete(propertyInfo.attributeName); + serverValue = getValueForProperty(domElement, propKey, nextProp, propertyInfo); + } else { + var ownNamespace = parentNamespace; + + if (ownNamespace === HTML_NAMESPACE) { + ownNamespace = getIntrinsicNamespace(tag); + } + + if (ownNamespace === HTML_NAMESPACE) { + // $FlowFixMe - Should be inferred as not undefined. + extraAttributeNames.delete(propKey.toLowerCase()); + } else { + var standardName = getPossibleStandardName(propKey); + + if (standardName !== null && standardName !== propKey) { + // If an SVG prop is supplied with bad casing, it will + // be successfully parsed from HTML, but will produce a mismatch + // (and would be incorrectly rendered on the client). + // However, we already warn about bad casing elsewhere. + // So we'll skip the misleading extra mismatch warning in this case. + isMismatchDueToBadCasing = true; // $FlowFixMe - Should be inferred as not undefined. + + extraAttributeNames.delete(standardName); + } // $FlowFixMe - Should be inferred as not undefined. + + extraAttributeNames.delete(propKey); + } + + serverValue = getValueForAttribute(domElement, propKey, nextProp); + } + + if (nextProp !== serverValue && !isMismatchDueToBadCasing) { + warnForPropDifference(propKey, serverValue, nextProp); + } + } + } + } + + { + // $FlowFixMe - Should be inferred as not undefined. + if (extraAttributeNames.size > 0 && !suppressHydrationWarning) { + // $FlowFixMe - Should be inferred as not undefined. + warnForExtraAttributes(extraAttributeNames); + } + } + + switch (tag) { + case 'input': + // TODO: Make sure we check if this is still unmounted or do any clean + // up necessary since we never stop tracking anymore. + track(domElement); + postMountWrapper(domElement, rawProps, true); + break; + + case 'textarea': + // TODO: Make sure we check if this is still unmounted or do any clean + // up necessary since we never stop tracking anymore. + track(domElement); + postMountWrapper$3(domElement, rawProps); + break; + + case 'select': + case 'option': + // For input and textarea we current always set the value property at + // post mount to force it to diverge from attributes. However, for + // option and select we don't quite do the same thing and select + // is not resilient to the DOM state changing so we don't do that here. + // TODO: Consider not doing this for input and textarea. + break; + + default: + if (typeof rawProps.onClick === 'function') { + // TODO: This cast may not be sound for SVG, MathML or custom elements. + trapClickOnNonInteractiveElement(domElement); + } + + break; + } + + return updatePayload; + } + function diffHydratedText(textNode, text) { + var isDifferent = textNode.nodeValue !== text; + return isDifferent; + } + function warnForUnmatchedText(textNode, text) { + { + warnForTextDifference(textNode.nodeValue, text); + } + } + function warnForDeletedHydratableElement(parentNode, child) { + { + if (didWarnInvalidHydration) { + return; + } + + didWarnInvalidHydration = true; + warningWithoutStack$1( + false, + 'Did not expect server HTML to contain a <%s> in <%s>.', + child.nodeName.toLowerCase(), + parentNode.nodeName.toLowerCase(), + ); + } + } + function warnForDeletedHydratableText(parentNode, child) { + { + if (didWarnInvalidHydration) { + return; + } + + didWarnInvalidHydration = true; + warningWithoutStack$1( + false, + 'Did not expect server HTML to contain the text node "%s" in <%s>.', + child.nodeValue, + parentNode.nodeName.toLowerCase(), + ); + } + } + function warnForInsertedHydratedElement(parentNode, tag, props) { + { + if (didWarnInvalidHydration) { + return; + } + + didWarnInvalidHydration = true; + warningWithoutStack$1( + false, + 'Expected server HTML to contain a matching <%s> in <%s>.', + tag, + parentNode.nodeName.toLowerCase(), + ); + } + } + function warnForInsertedHydratedText(parentNode, text) { + { + if (text === '') { + // We expect to insert empty text nodes since they're not represented in + // the HTML. + // TODO: Remove this special case if we can just avoid inserting empty + // text nodes. + return; + } + + if (didWarnInvalidHydration) { + return; + } + + didWarnInvalidHydration = true; + warningWithoutStack$1( + false, + 'Expected server HTML to contain a matching text node for "%s" in <%s>.', + text, + parentNode.nodeName.toLowerCase(), + ); + } + } + function restoreControlledState$$1(domElement, tag, props) { + switch (tag) { + case 'input': + restoreControlledState$1(domElement, props); + return; + + case 'textarea': + restoreControlledState$3(domElement, props); + return; + + case 'select': + restoreControlledState$2(domElement, props); + return; + } + } + function listenToEventResponderEventTypes(eventTypes, element) { + if (enableFlareAPI) { + // Get the listening Set for this element. We use this to track + // what events we're listening to. + var listeningSet = getListeningSetForElement(element); // Go through each target event type of the event responder + + for (var i = 0, length = eventTypes.length; i < length; ++i) { + var eventType = eventTypes[i]; + var isPassive = !endsWith(eventType, '_active'); + var eventKey = isPassive ? eventType + '_passive' : eventType; + var targetEventType = isPassive ? eventType : eventType.substring(0, eventType.length - 7); + + if (!listeningSet.has(eventKey)) { + trapEventForResponderEventSystem(element, targetEventType, isPassive); + listeningSet.add(eventKey); + } + } + } + } // We can remove this once the event API is stable and out of a flag + + if (enableFlareAPI) { + setListenToResponderEventTypes(listenToEventResponderEventTypes); + } + + function getActiveElement(doc) { + doc = doc || (typeof document !== 'undefined' ? document : undefined); + + if (typeof doc === 'undefined') { + return null; + } + + try { + return doc.activeElement || doc.body; + } catch (e) { + return doc.body; + } + } + + /** + * Given any node return the first leaf node without children. + * + * @param {DOMElement|DOMTextNode} node + * @return {DOMElement|DOMTextNode} + */ + + function getLeafNode(node) { + while (node && node.firstChild) { + node = node.firstChild; + } + + return node; + } + /** + * Get the next sibling within a container. This will walk up the + * DOM if a node's siblings have been exhausted. + * + * @param {DOMElement|DOMTextNode} node + * @return {?DOMElement|DOMTextNode} + */ + + function getSiblingNode(node) { + while (node) { + if (node.nextSibling) { + return node.nextSibling; + } + + node = node.parentNode; + } + } + /** + * Get object describing the nodes which contain characters at offset. + * + * @param {DOMElement|DOMTextNode} root + * @param {number} offset + * @return {?object} + */ + + function getNodeForCharacterOffset(root, offset) { + var node = getLeafNode(root); + var nodeStart = 0; + var nodeEnd = 0; + + while (node) { + if (node.nodeType === TEXT_NODE) { + nodeEnd = nodeStart + node.textContent.length; + + if (nodeStart <= offset && nodeEnd >= offset) { + return { + node: node, + offset: offset - nodeStart, + }; + } + + nodeStart = nodeEnd; + } + + node = getLeafNode(getSiblingNode(node)); + } + } + + /** + * @param {DOMElement} outerNode + * @return {?object} + */ + + function getOffsets(outerNode) { + var ownerDocument = outerNode.ownerDocument; + var win = (ownerDocument && ownerDocument.defaultView) || window; + var selection = win.getSelection && win.getSelection(); + + if (!selection || selection.rangeCount === 0) { + return null; + } + + var anchorNode = selection.anchorNode, + anchorOffset = selection.anchorOffset, + focusNode = selection.focusNode, + focusOffset = selection.focusOffset; // In Firefox, anchorNode and focusNode can be "anonymous divs", e.g. the + // up/down buttons on an <input type="number">. Anonymous divs do not seem to + // expose properties, triggering a "Permission denied error" if any of its + // properties are accessed. The only seemingly possible way to avoid erroring + // is to access a property that typically works for non-anonymous divs and + // catch any error that may otherwise arise. See + // https://bugzilla.mozilla.org/show_bug.cgi?id=208427 + + try { + /* eslint-disable no-unused-expressions */ + anchorNode.nodeType; + focusNode.nodeType; + /* eslint-enable no-unused-expressions */ + } catch (e) { + return null; + } + + return getModernOffsetsFromPoints(outerNode, anchorNode, anchorOffset, focusNode, focusOffset); + } + /** + * Returns {start, end} where `start` is the character/codepoint index of + * (anchorNode, anchorOffset) within the textContent of `outerNode`, and + * `end` is the index of (focusNode, focusOffset). + * + * Returns null if you pass in garbage input but we should probably just crash. + * + * Exported only for testing. + */ + + function getModernOffsetsFromPoints(outerNode, anchorNode, anchorOffset, focusNode, focusOffset) { + var length = 0; + var start = -1; + var end = -1; + var indexWithinAnchor = 0; + var indexWithinFocus = 0; + var node = outerNode; + var parentNode = null; + + outer: while (true) { + var next = null; + + while (true) { + if (node === anchorNode && (anchorOffset === 0 || node.nodeType === TEXT_NODE)) { + start = length + anchorOffset; + } + + if (node === focusNode && (focusOffset === 0 || node.nodeType === TEXT_NODE)) { + end = length + focusOffset; + } + + if (node.nodeType === TEXT_NODE) { + length += node.nodeValue.length; + } + + if ((next = node.firstChild) === null) { + break; + } // Moving from `node` to its first child `next`. + + parentNode = node; + node = next; + } + + while (true) { + if (node === outerNode) { + // If `outerNode` has children, this is always the second time visiting + // it. If it has no children, this is still the first loop, and the only + // valid selection is anchorNode and focusNode both equal to this node + // and both offsets 0, in which case we will have handled above. + break outer; + } + + if (parentNode === anchorNode && ++indexWithinAnchor === anchorOffset) { + start = length; + } + + if (parentNode === focusNode && ++indexWithinFocus === focusOffset) { + end = length; + } + + if ((next = node.nextSibling) !== null) { + break; + } + + node = parentNode; + parentNode = node.parentNode; + } // Moving from `node` to its next sibling `next`. + + node = next; + } + + if (start === -1 || end === -1) { + // This should never happen. (Would happen if the anchor/focus nodes aren't + // actually inside the passed-in node.) + return null; + } + + return { + start: start, + end: end, + }; + } + /** + * In modern non-IE browsers, we can support both forward and backward + * selections. + * + * Note: IE10+ supports the Selection object, but it does not support + * the `extend` method, which means that even in modern IE, it's not possible + * to programmatically create a backward selection. Thus, for all IE + * versions, we use the old IE API to create our selections. + * + * @param {DOMElement|DOMTextNode} node + * @param {object} offsets + */ + + function setOffsets(node, offsets) { + var doc = node.ownerDocument || document; + var win = (doc && doc.defaultView) || window; // Edge fails with "Object expected" in some scenarios. + // (For instance: TinyMCE editor used in a list component that supports pasting to add more, + // fails when pasting 100+ items) + + if (!win.getSelection) { + return; + } + + var selection = win.getSelection(); + var length = node.textContent.length; + var start = Math.min(offsets.start, length); + var end = offsets.end === undefined ? start : Math.min(offsets.end, length); // IE 11 uses modern selection, but doesn't support the extend method. + // Flip backward selections, so we can set with a single range. + + if (!selection.extend && start > end) { + var temp = end; + end = start; + start = temp; + } + + var startMarker = getNodeForCharacterOffset(node, start); + var endMarker = getNodeForCharacterOffset(node, end); + + if (startMarker && endMarker) { + if ( + selection.rangeCount === 1 && + selection.anchorNode === startMarker.node && + selection.anchorOffset === startMarker.offset && + selection.focusNode === endMarker.node && + selection.focusOffset === endMarker.offset + ) { + return; + } + + var range = doc.createRange(); + range.setStart(startMarker.node, startMarker.offset); + selection.removeAllRanges(); + + if (start > end) { + selection.addRange(range); + selection.extend(endMarker.node, endMarker.offset); + } else { + range.setEnd(endMarker.node, endMarker.offset); + selection.addRange(range); + } + } + } + + function isTextNode(node) { + return node && node.nodeType === TEXT_NODE; + } + + function containsNode(outerNode, innerNode) { + if (!outerNode || !innerNode) { + return false; + } else if (outerNode === innerNode) { + return true; + } else if (isTextNode(outerNode)) { + return false; + } else if (isTextNode(innerNode)) { + return containsNode(outerNode, innerNode.parentNode); + } else if ('contains' in outerNode) { + return outerNode.contains(innerNode); + } else if (outerNode.compareDocumentPosition) { + return !!(outerNode.compareDocumentPosition(innerNode) & 16); + } else { + return false; + } + } + + function isInDocument(node) { + return node && node.ownerDocument && containsNode(node.ownerDocument.documentElement, node); + } + + function isSameOriginFrame(iframe) { + try { + // Accessing the contentDocument of a HTMLIframeElement can cause the browser + // to throw, e.g. if it has a cross-origin src attribute. + // Safari will show an error in the console when the access results in "Blocked a frame with origin". e.g: + // iframe.contentDocument.defaultView; + // A safety way is to access one of the cross origin properties: Window or Location + // Which might result in "SecurityError" DOM Exception and it is compatible to Safari. + // https://html.spec.whatwg.org/multipage/browsers.html#integration-with-idl + return typeof iframe.contentWindow.location.href === 'string'; + } catch (err) { + return false; + } + } + + function getActiveElementDeep() { + var win = window; + var element = getActiveElement(); + + while (element instanceof win.HTMLIFrameElement) { + if (isSameOriginFrame(element)) { + win = element.contentWindow; + } else { + return element; + } + + element = getActiveElement(win.document); + } + + return element; + } + /** + * @ReactInputSelection: React input selection module. Based on Selection.js, + * but modified to be suitable for react and has a couple of bug fixes (doesn't + * assume buttons have range selections allowed). + * Input selection module for React. + */ + + /** + * @hasSelectionCapabilities: we get the element types that support selection + * from https://html.spec.whatwg.org/#do-not-apply, looking at `selectionStart` + * and `selectionEnd` rows. + */ + + function hasSelectionCapabilities(elem) { + var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase(); + return ( + nodeName && + ((nodeName === 'input' && + (elem.type === 'text' || + elem.type === 'search' || + elem.type === 'tel' || + elem.type === 'url' || + elem.type === 'password')) || + nodeName === 'textarea' || + elem.contentEditable === 'true') + ); + } + function getSelectionInformation() { + var focusedElem = getActiveElementDeep(); + return { + focusedElem: focusedElem, + selectionRange: hasSelectionCapabilities(focusedElem) ? getSelection(focusedElem) : null, + }; + } + /** + * @restoreSelection: If any selection information was potentially lost, + * restore it. This is useful when performing operations that could remove dom + * nodes and place them back in, resulting in focus being lost. + */ + + function restoreSelection(priorSelectionInformation) { + var curFocusedElem = getActiveElementDeep(); + var priorFocusedElem = priorSelectionInformation.focusedElem; + var priorSelectionRange = priorSelectionInformation.selectionRange; + + if (curFocusedElem !== priorFocusedElem && isInDocument(priorFocusedElem)) { + if (priorSelectionRange !== null && hasSelectionCapabilities(priorFocusedElem)) { + setSelection(priorFocusedElem, priorSelectionRange); + } // Focusing a node can change the scroll position, which is undesirable + + var ancestors = []; + var ancestor = priorFocusedElem; + + while ((ancestor = ancestor.parentNode)) { + if (ancestor.nodeType === ELEMENT_NODE) { + ancestors.push({ + element: ancestor, + left: ancestor.scrollLeft, + top: ancestor.scrollTop, + }); + } + } + + if (typeof priorFocusedElem.focus === 'function') { + priorFocusedElem.focus(); + } + + for (var i = 0; i < ancestors.length; i++) { + var info = ancestors[i]; + info.element.scrollLeft = info.left; + info.element.scrollTop = info.top; + } + } + } + /** + * @getSelection: Gets the selection bounds of a focused textarea, input or + * contentEditable node. + * -@input: Look up selection bounds of this input + * -@return {start: selectionStart, end: selectionEnd} + */ + + function getSelection(input) { + var selection; + + if ('selectionStart' in input) { + // Modern browser with input or textarea. + selection = { + start: input.selectionStart, + end: input.selectionEnd, + }; + } else { + // Content editable or old IE textarea. + selection = getOffsets(input); + } + + return ( + selection || { + start: 0, + end: 0, + } + ); + } + /** + * @setSelection: Sets the selection bounds of a textarea or input and focuses + * the input. + * -@input Set selection bounds of this input or textarea + * -@offsets Object of same form that is returned from get* + */ + + function setSelection(input, offsets) { + var start = offsets.start, + end = offsets.end; + + if (end === undefined) { + end = start; + } + + if ('selectionStart' in input) { + input.selectionStart = start; + input.selectionEnd = Math.min(end, input.value.length); + } else { + setOffsets(input, offsets); + } + } + + var validateDOMNesting = function () {}; + + var updatedAncestorInfo = function () {}; + + { + // This validation code was written based on the HTML5 parsing spec: + // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope + // + // Note: this does not catch all invalid nesting, nor does it try to (as it's + // not clear what practical benefit doing so provides); instead, we warn only + // for cases where the parser will give a parse tree differing from what React + // intended. For example, <b><div></div></b> is invalid but we don't warn + // because it still parses correctly; we do warn for other cases like nested + // <p> tags where the beginning of the second element implicitly closes the + // first, causing a confusing mess. + // https://html.spec.whatwg.org/multipage/syntax.html#special + var specialTags = [ + 'address', + 'applet', + 'area', + 'article', + 'aside', + 'base', + 'basefont', + 'bgsound', + 'blockquote', + 'body', + 'br', + 'button', + 'caption', + 'center', + 'col', + 'colgroup', + 'dd', + 'details', + 'dir', + 'div', + 'dl', + 'dt', + 'embed', + 'fieldset', + 'figcaption', + 'figure', + 'footer', + 'form', + 'frame', + 'frameset', + 'h1', + 'h2', + 'h3', + 'h4', + 'h5', + 'h6', + 'head', + 'header', + 'hgroup', + 'hr', + 'html', + 'iframe', + 'img', + 'input', + 'isindex', + 'li', + 'link', + 'listing', + 'main', + 'marquee', + 'menu', + 'menuitem', + 'meta', + 'nav', + 'noembed', + 'noframes', + 'noscript', + 'object', + 'ol', + 'p', + 'param', + 'plaintext', + 'pre', + 'script', + 'section', + 'select', + 'source', + 'style', + 'summary', + 'table', + 'tbody', + 'td', + 'template', + 'textarea', + 'tfoot', + 'th', + 'thead', + 'title', + 'tr', + 'track', + 'ul', + 'wbr', + 'xmp', + ]; // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope + + var inScopeTags = [ + 'applet', + 'caption', + 'html', + 'table', + 'td', + 'th', + 'marquee', + 'object', + 'template', // https://html.spec.whatwg.org/multipage/syntax.html#html-integration-point + // TODO: Distinguish by namespace here -- for <title>, including it here + // errs on the side of fewer warnings + 'foreignObject', + 'desc', + 'title', + ]; // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-button-scope + + var buttonScopeTags = inScopeTags.concat(['button']); // https://html.spec.whatwg.org/multipage/syntax.html#generate-implied-end-tags + + var impliedEndTags = ['dd', 'dt', 'li', 'option', 'optgroup', 'p', 'rp', 'rt']; + var emptyAncestorInfo = { + current: null, + formTag: null, + aTagInScope: null, + buttonTagInScope: null, + nobrTagInScope: null, + pTagInButtonScope: null, + listItemTagAutoclosing: null, + dlItemTagAutoclosing: null, + }; + + updatedAncestorInfo = function (oldInfo, tag) { + var ancestorInfo = _assign({}, oldInfo || emptyAncestorInfo); + + var info = { + tag: tag, + }; + + if (inScopeTags.indexOf(tag) !== -1) { + ancestorInfo.aTagInScope = null; + ancestorInfo.buttonTagInScope = null; + ancestorInfo.nobrTagInScope = null; + } + + if (buttonScopeTags.indexOf(tag) !== -1) { + ancestorInfo.pTagInButtonScope = null; + } // See rules for 'li', 'dd', 'dt' start tags in + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody + + if (specialTags.indexOf(tag) !== -1 && tag !== 'address' && tag !== 'div' && tag !== 'p') { + ancestorInfo.listItemTagAutoclosing = null; + ancestorInfo.dlItemTagAutoclosing = null; + } + + ancestorInfo.current = info; + + if (tag === 'form') { + ancestorInfo.formTag = info; + } + + if (tag === 'a') { + ancestorInfo.aTagInScope = info; + } + + if (tag === 'button') { + ancestorInfo.buttonTagInScope = info; + } + + if (tag === 'nobr') { + ancestorInfo.nobrTagInScope = info; + } + + if (tag === 'p') { + ancestorInfo.pTagInButtonScope = info; + } + + if (tag === 'li') { + ancestorInfo.listItemTagAutoclosing = info; + } + + if (tag === 'dd' || tag === 'dt') { + ancestorInfo.dlItemTagAutoclosing = info; + } + + return ancestorInfo; + }; + /** + * Returns whether + */ + + var isTagValidWithParent = function (tag, parentTag) { + // First, let's check if we're in an unusual parsing mode... + switch (parentTag) { + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inselect + case 'select': + return tag === 'option' || tag === 'optgroup' || tag === '#text'; + + case 'optgroup': + return tag === 'option' || tag === '#text'; + // Strictly speaking, seeing an <option> doesn't mean we're in a <select> + // but + + case 'option': + return tag === '#text'; + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intd + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incaption + // No special behavior since these rules fall back to "in body" mode for + // all except special table nodes which cause bad parsing behavior anyway. + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intr + + case 'tr': + return ( + tag === 'th' || tag === 'td' || tag === 'style' || tag === 'script' || tag === 'template' + ); + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intbody + + case 'tbody': + case 'thead': + case 'tfoot': + return tag === 'tr' || tag === 'style' || tag === 'script' || tag === 'template'; + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incolgroup + + case 'colgroup': + return tag === 'col' || tag === 'template'; + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intable + + case 'table': + return ( + tag === 'caption' || + tag === 'colgroup' || + tag === 'tbody' || + tag === 'tfoot' || + tag === 'thead' || + tag === 'style' || + tag === 'script' || + tag === 'template' + ); + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inhead + + case 'head': + return ( + tag === 'base' || + tag === 'basefont' || + tag === 'bgsound' || + tag === 'link' || + tag === 'meta' || + tag === 'title' || + tag === 'noscript' || + tag === 'noframes' || + tag === 'style' || + tag === 'script' || + tag === 'template' + ); + // https://html.spec.whatwg.org/multipage/semantics.html#the-html-element + + case 'html': + return tag === 'head' || tag === 'body' || tag === 'frameset'; + + case 'frameset': + return tag === 'frame'; + + case '#document': + return tag === 'html'; + } // Probably in the "in body" parsing mode, so we outlaw only tag combos + // where the parsing rules cause implicit opens or closes to be added. + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody + + switch (tag) { + case 'h1': + case 'h2': + case 'h3': + case 'h4': + case 'h5': + case 'h6': + return ( + parentTag !== 'h1' && + parentTag !== 'h2' && + parentTag !== 'h3' && + parentTag !== 'h4' && + parentTag !== 'h5' && + parentTag !== 'h6' + ); + + case 'rp': + case 'rt': + return impliedEndTags.indexOf(parentTag) === -1; + + case 'body': + case 'caption': + case 'col': + case 'colgroup': + case 'frameset': + case 'frame': + case 'head': + case 'html': + case 'tbody': + case 'td': + case 'tfoot': + case 'th': + case 'thead': + case 'tr': + // These tags are only valid with a few parents that have special child + // parsing rules -- if we're down here, then none of those matched and + // so we allow it only if we don't know what the parent is, as all other + // cases are invalid. + return parentTag == null; + } + + return true; + }; + /** + * Returns whether + */ + + var findInvalidAncestorForTag = function (tag, ancestorInfo) { + switch (tag) { + case 'address': + case 'article': + case 'aside': + case 'blockquote': + case 'center': + case 'details': + case 'dialog': + case 'dir': + case 'div': + case 'dl': + case 'fieldset': + case 'figcaption': + case 'figure': + case 'footer': + case 'header': + case 'hgroup': + case 'main': + case 'menu': + case 'nav': + case 'ol': + case 'p': + case 'section': + case 'summary': + case 'ul': + case 'pre': + case 'listing': + case 'table': + case 'hr': + case 'xmp': + case 'h1': + case 'h2': + case 'h3': + case 'h4': + case 'h5': + case 'h6': + return ancestorInfo.pTagInButtonScope; + + case 'form': + return ancestorInfo.formTag || ancestorInfo.pTagInButtonScope; + + case 'li': + return ancestorInfo.listItemTagAutoclosing; + + case 'dd': + case 'dt': + return ancestorInfo.dlItemTagAutoclosing; + + case 'button': + return ancestorInfo.buttonTagInScope; + + case 'a': + // Spec says something about storing a list of markers, but it sounds + // equivalent to this check. + return ancestorInfo.aTagInScope; + + case 'nobr': + return ancestorInfo.nobrTagInScope; + } + + return null; + }; + + var didWarn$1 = {}; + + validateDOMNesting = function (childTag, childText, ancestorInfo) { + ancestorInfo = ancestorInfo || emptyAncestorInfo; + var parentInfo = ancestorInfo.current; + var parentTag = parentInfo && parentInfo.tag; + + if (childText != null) { + !(childTag == null) + ? warningWithoutStack$1( + false, + 'validateDOMNesting: when childText is passed, childTag should be null', + ) + : void 0; + childTag = '#text'; + } + + var invalidParent = isTagValidWithParent(childTag, parentTag) ? null : parentInfo; + var invalidAncestor = invalidParent ? null : findInvalidAncestorForTag(childTag, ancestorInfo); + var invalidParentOrAncestor = invalidParent || invalidAncestor; + + if (!invalidParentOrAncestor) { + return; + } + + var ancestorTag = invalidParentOrAncestor.tag; + var addendum = getCurrentFiberStackInDev(); + var warnKey = !!invalidParent + '|' + childTag + '|' + ancestorTag + '|' + addendum; + + if (didWarn$1[warnKey]) { + return; + } + + didWarn$1[warnKey] = true; + var tagDisplayName = childTag; + var whitespaceInfo = ''; + + if (childTag === '#text') { + if (/\S/.test(childText)) { + tagDisplayName = 'Text nodes'; + } else { + tagDisplayName = 'Whitespace text nodes'; + whitespaceInfo = + " Make sure you don't have any extra whitespace between tags on " + + 'each line of your source code.'; + } + } else { + tagDisplayName = '<' + childTag + '>'; + } + + if (invalidParent) { + var info = ''; + + if (ancestorTag === 'table' && childTag === 'tr') { + info += + ' Add a <tbody>, <thead> or <tfoot> to your code to match the DOM tree generated by ' + + 'the browser.'; + } + + warningWithoutStack$1( + false, + 'validateDOMNesting(...): %s cannot appear as a child of <%s>.%s%s%s', + tagDisplayName, + ancestorTag, + whitespaceInfo, + info, + addendum, + ); + } else { + warningWithoutStack$1( + false, + 'validateDOMNesting(...): %s cannot appear as a descendant of ' + '<%s>.%s', + tagDisplayName, + ancestorTag, + addendum, + ); + } + }; + } + + // can re-export everything from this module. + + function shim() { + { + { + throw Error( + 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + } // Persistence (when unsupported) + + var supportsPersistence = false; + var cloneInstance = shim; + var cloneFundamentalInstance = shim; + var createContainerChildSet = shim; + var appendChildToContainerChildSet = shim; + var finalizeContainerChildren = shim; + var replaceContainerChildren = shim; + var cloneHiddenInstance = shim; + var cloneHiddenTextInstance = shim; + + var SUPPRESS_HYDRATION_WARNING; + + { + SUPPRESS_HYDRATION_WARNING = 'suppressHydrationWarning'; + } + + var SUSPENSE_START_DATA = '$'; + var SUSPENSE_END_DATA = '/$'; + var SUSPENSE_PENDING_START_DATA = '$?'; + var SUSPENSE_FALLBACK_START_DATA = '$!'; + var STYLE = 'style'; + var eventsEnabled = null; + var selectionInformation = null; + + function shouldAutoFocusHostComponent(type, props) { + switch (type) { + case 'button': + case 'input': + case 'select': + case 'textarea': + return !!props.autoFocus; + } + + return false; + } + + function getRootHostContext(rootContainerInstance) { + var type; + var namespace; + var nodeType = rootContainerInstance.nodeType; + + switch (nodeType) { + case DOCUMENT_NODE: + case DOCUMENT_FRAGMENT_NODE: { + type = nodeType === DOCUMENT_NODE ? '#document' : '#fragment'; + var root = rootContainerInstance.documentElement; + namespace = root ? root.namespaceURI : getChildNamespace(null, ''); + break; + } + + default: { + var container = + nodeType === COMMENT_NODE ? rootContainerInstance.parentNode : rootContainerInstance; + var ownNamespace = container.namespaceURI || null; + type = container.tagName; + namespace = getChildNamespace(ownNamespace, type); + break; + } + } + + { + var validatedTag = type.toLowerCase(); + var ancestorInfo = updatedAncestorInfo(null, validatedTag); + return { + namespace: namespace, + ancestorInfo: ancestorInfo, + }; + } + + return namespace; + } + function getChildHostContext(parentHostContext, type, rootContainerInstance) { + { + var parentHostContextDev = parentHostContext; + var namespace = getChildNamespace(parentHostContextDev.namespace, type); + var ancestorInfo = updatedAncestorInfo(parentHostContextDev.ancestorInfo, type); + return { + namespace: namespace, + ancestorInfo: ancestorInfo, + }; + } + + var parentNamespace = parentHostContext; + return getChildNamespace(parentNamespace, type); + } + function getPublicInstance(instance) { + return instance; + } + function prepareForCommit(containerInfo) { + eventsEnabled = isEnabled(); + selectionInformation = getSelectionInformation(); + setEnabled(false); + } + function resetAfterCommit(containerInfo) { + restoreSelection(selectionInformation); + selectionInformation = null; + setEnabled(eventsEnabled); + eventsEnabled = null; + } + function createInstance(type, props, rootContainerInstance, hostContext, internalInstanceHandle) { + var parentNamespace; + + { + // TODO: take namespace into account when validating. + var hostContextDev = hostContext; + validateDOMNesting(type, null, hostContextDev.ancestorInfo); + + if (typeof props.children === 'string' || typeof props.children === 'number') { + var string = '' + props.children; + var ownAncestorInfo = updatedAncestorInfo(hostContextDev.ancestorInfo, type); + validateDOMNesting(null, string, ownAncestorInfo); + } + + parentNamespace = hostContextDev.namespace; + } + + var domElement = createElement(type, props, rootContainerInstance, parentNamespace); + precacheFiberNode(internalInstanceHandle, domElement); + updateFiberProps(domElement, props); + return domElement; + } + function appendInitialChild(parentInstance, child) { + parentInstance.appendChild(child); + } + function finalizeInitialChildren(domElement, type, props, rootContainerInstance, hostContext) { + setInitialProperties(domElement, type, props, rootContainerInstance); + return shouldAutoFocusHostComponent(type, props); + } + function prepareUpdate(domElement, type, oldProps, newProps, rootContainerInstance, hostContext) { + { + var hostContextDev = hostContext; + + if ( + typeof newProps.children !== typeof oldProps.children && + (typeof newProps.children === 'string' || typeof newProps.children === 'number') + ) { + var string = '' + newProps.children; + var ownAncestorInfo = updatedAncestorInfo(hostContextDev.ancestorInfo, type); + validateDOMNesting(null, string, ownAncestorInfo); + } + } + + return diffProperties(domElement, type, oldProps, newProps, rootContainerInstance); + } + function shouldSetTextContent(type, props) { + return ( + type === 'textarea' || + type === 'option' || + type === 'noscript' || + typeof props.children === 'string' || + typeof props.children === 'number' || + (typeof props.dangerouslySetInnerHTML === 'object' && + props.dangerouslySetInnerHTML !== null && + props.dangerouslySetInnerHTML.__html != null) + ); + } + function shouldDeprioritizeSubtree(type, props) { + return !!props.hidden; + } + function createTextInstance(text, rootContainerInstance, hostContext, internalInstanceHandle) { + { + var hostContextDev = hostContext; + validateDOMNesting(null, text, hostContextDev.ancestorInfo); + } + + var textNode = createTextNode(text, rootContainerInstance); + precacheFiberNode(internalInstanceHandle, textNode); + return textNode; + } + var isPrimaryRenderer = true; + var warnsIfNotActing = true; // This initialization code may run even on server environments + // if a component just imports ReactDOM (e.g. for findDOMNode). + // Some environments might not have setTimeout or clearTimeout. + + var scheduleTimeout = typeof setTimeout === 'function' ? setTimeout : undefined; + var cancelTimeout = typeof clearTimeout === 'function' ? clearTimeout : undefined; + var noTimeout = -1; // ------------------- + // Mutation + // ------------------- + + var supportsMutation = true; + function commitMount(domElement, type, newProps, internalInstanceHandle) { + // Despite the naming that might imply otherwise, this method only + // fires if there is an `Update` effect scheduled during mounting. + // This happens if `finalizeInitialChildren` returns `true` (which it + // does to implement the `autoFocus` attribute on the client). But + // there are also other cases when this might happen (such as patching + // up text content during hydration mismatch). So we'll check this again. + if (shouldAutoFocusHostComponent(type, newProps)) { + domElement.focus(); + } + } + function commitUpdate(domElement, updatePayload, type, oldProps, newProps, internalInstanceHandle) { + // Update the props handle so that we know which props are the ones with + // with current event handlers. + updateFiberProps(domElement, newProps); // Apply the diff to the DOM node. + + updateProperties(domElement, updatePayload, type, oldProps, newProps); + } + function resetTextContent(domElement) { + setTextContent(domElement, ''); + } + function commitTextUpdate(textInstance, oldText, newText) { + textInstance.nodeValue = newText; + } + function appendChild(parentInstance, child) { + parentInstance.appendChild(child); + } + function appendChildToContainer(container, child) { + var parentNode; + + if (container.nodeType === COMMENT_NODE) { + parentNode = container.parentNode; + parentNode.insertBefore(child, container); + } else { + parentNode = container; + parentNode.appendChild(child); + } // This container might be used for a portal. + // If something inside a portal is clicked, that click should bubble + // through the React tree. However, on Mobile Safari the click would + // never bubble through the *DOM* tree unless an ancestor with onclick + // event exists. So we wouldn't see it and dispatch it. + // This is why we ensure that non React root containers have inline onclick + // defined. + // https://github.com/facebook/react/issues/11918 + + var reactRootContainer = container._reactRootContainer; + + if ( + (reactRootContainer === null || reactRootContainer === undefined) && + parentNode.onclick === null + ) { + // TODO: This cast may not be sound for SVG, MathML or custom elements. + trapClickOnNonInteractiveElement(parentNode); + } + } + function insertBefore(parentInstance, child, beforeChild) { + parentInstance.insertBefore(child, beforeChild); + } + function insertInContainerBefore(container, child, beforeChild) { + if (container.nodeType === COMMENT_NODE) { + container.parentNode.insertBefore(child, beforeChild); + } else { + container.insertBefore(child, beforeChild); + } + } // This is a specific event for the React Flare + // event system, so event responders can act + // accordingly to a DOM node being unmounted that + // previously had active document focus. + + function dispatchDetachedVisibleNodeEvent(child) { + if (enableFlareAPI && selectionInformation && child === selectionInformation.focusedElem) { + var targetFiber = getClosestInstanceFromNode(child); // Simlulate a blur event to the React Flare responder system. + + dispatchEventForResponderEventSystem( + 'detachedvisiblenode', + targetFiber, + { + target: child, + timeStamp: Date.now(), + }, + child, + RESPONDER_EVENT_SYSTEM | IS_PASSIVE, + ); + } + } + + function removeChild(parentInstance, child) { + dispatchDetachedVisibleNodeEvent(child); + parentInstance.removeChild(child); + } + function removeChildFromContainer(container, child) { + if (container.nodeType === COMMENT_NODE) { + container.parentNode.removeChild(child); + } else { + dispatchDetachedVisibleNodeEvent(child); + container.removeChild(child); + } + } + function clearSuspenseBoundary(parentInstance, suspenseInstance) { + var node = suspenseInstance; // Delete all nodes within this suspense boundary. + // There might be nested nodes so we need to keep track of how + // deep we are and only break out when we're back on top. + + var depth = 0; + + do { + var nextNode = node.nextSibling; + parentInstance.removeChild(node); + + if (nextNode && nextNode.nodeType === COMMENT_NODE) { + var data = nextNode.data; + + if (data === SUSPENSE_END_DATA) { + if (depth === 0) { + parentInstance.removeChild(nextNode); // Retry if any event replaying was blocked on this. + + retryIfBlockedOn(suspenseInstance); + return; + } else { + depth--; + } + } else if ( + data === SUSPENSE_START_DATA || + data === SUSPENSE_PENDING_START_DATA || + data === SUSPENSE_FALLBACK_START_DATA + ) { + depth++; + } + } + + node = nextNode; + } while (node); // TODO: Warn, we didn't find the end comment boundary. + // Retry if any event replaying was blocked on this. + + retryIfBlockedOn(suspenseInstance); + } + function clearSuspenseBoundaryFromContainer(container, suspenseInstance) { + if (container.nodeType === COMMENT_NODE) { + clearSuspenseBoundary(container.parentNode, suspenseInstance); + } else if (container.nodeType === ELEMENT_NODE) { + clearSuspenseBoundary(container, suspenseInstance); + } else { + } // Document nodes should never contain suspense boundaries. + // Retry if any event replaying was blocked on this. + + retryIfBlockedOn(container); + } + function hideInstance(instance) { + // TODO: Does this work for all element types? What about MathML? Should we + // pass host context to this method? + instance = instance; + var style = instance.style; + + if (typeof style.setProperty === 'function') { + style.setProperty('display', 'none', 'important'); + } else { + style.display = 'none'; + } + } + function hideTextInstance(textInstance) { + textInstance.nodeValue = ''; + } + function unhideInstance(instance, props) { + instance = instance; + var styleProp = props[STYLE]; + var display = + styleProp !== undefined && styleProp !== null && styleProp.hasOwnProperty('display') + ? styleProp.display + : null; + instance.style.display = dangerousStyleValue('display', display); + } + function unhideTextInstance(textInstance, text) { + textInstance.nodeValue = text; + } // ------------------- + // Hydration + // ------------------- + + var supportsHydration = true; + function canHydrateInstance(instance, type, props) { + if ( + instance.nodeType !== ELEMENT_NODE || + type.toLowerCase() !== instance.nodeName.toLowerCase() + ) { + return null; + } // This has now been refined to an element node. + + return instance; + } + function canHydrateTextInstance(instance, text) { + if (text === '' || instance.nodeType !== TEXT_NODE) { + // Empty strings are not parsed by HTML so there won't be a correct match here. + return null; + } // This has now been refined to a text node. + + return instance; + } + function canHydrateSuspenseInstance(instance) { + if (instance.nodeType !== COMMENT_NODE) { + // Empty strings are not parsed by HTML so there won't be a correct match here. + return null; + } // This has now been refined to a suspense node. + + return instance; + } + function isSuspenseInstancePending(instance) { + return instance.data === SUSPENSE_PENDING_START_DATA; + } + function isSuspenseInstanceFallback(instance) { + return instance.data === SUSPENSE_FALLBACK_START_DATA; + } + function registerSuspenseInstanceRetry(instance, callback) { + instance._reactRetry = callback; + } + + function getNextHydratable(node) { + // Skip non-hydratable nodes. + for (; node != null; node = node.nextSibling) { + var nodeType = node.nodeType; + + if (nodeType === ELEMENT_NODE || nodeType === TEXT_NODE) { + break; + } + + if (enableSuspenseServerRenderer) { + if (nodeType === COMMENT_NODE) { + var nodeData = node.data; + + if ( + nodeData === SUSPENSE_START_DATA || + nodeData === SUSPENSE_FALLBACK_START_DATA || + nodeData === SUSPENSE_PENDING_START_DATA + ) { + break; + } + } + } + } + + return node; + } + + function getNextHydratableSibling(instance) { + return getNextHydratable(instance.nextSibling); + } + function getFirstHydratableChild(parentInstance) { + return getNextHydratable(parentInstance.firstChild); + } + function hydrateInstance( + instance, + type, + props, + rootContainerInstance, + hostContext, + internalInstanceHandle, + ) { + precacheFiberNode(internalInstanceHandle, instance); // TODO: Possibly defer this until the commit phase where all the events + // get attached. + + updateFiberProps(instance, props); + var parentNamespace; + + { + var hostContextDev = hostContext; + parentNamespace = hostContextDev.namespace; + } + + return diffHydratedProperties(instance, type, props, parentNamespace, rootContainerInstance); + } + function hydrateTextInstance(textInstance, text, internalInstanceHandle) { + precacheFiberNode(internalInstanceHandle, textInstance); + return diffHydratedText(textInstance, text); + } + function hydrateSuspenseInstance(suspenseInstance, internalInstanceHandle) { + precacheFiberNode(internalInstanceHandle, suspenseInstance); + } + function getNextHydratableInstanceAfterSuspenseInstance(suspenseInstance) { + var node = suspenseInstance.nextSibling; // Skip past all nodes within this suspense boundary. + // There might be nested nodes so we need to keep track of how + // deep we are and only break out when we're back on top. + + var depth = 0; + + while (node) { + if (node.nodeType === COMMENT_NODE) { + var data = node.data; + + if (data === SUSPENSE_END_DATA) { + if (depth === 0) { + return getNextHydratableSibling(node); + } else { + depth--; + } + } else if ( + data === SUSPENSE_START_DATA || + data === SUSPENSE_FALLBACK_START_DATA || + data === SUSPENSE_PENDING_START_DATA + ) { + depth++; + } + } + + node = node.nextSibling; + } // TODO: Warn, we didn't find the end comment boundary. + + return null; + } // Returns the SuspenseInstance if this node is a direct child of a + // SuspenseInstance. I.e. if its previous sibling is a Comment with + // SUSPENSE_x_START_DATA. Otherwise, null. + + function getParentSuspenseInstance(targetInstance) { + var node = targetInstance.previousSibling; // Skip past all nodes within this suspense boundary. + // There might be nested nodes so we need to keep track of how + // deep we are and only break out when we're back on top. + + var depth = 0; + + while (node) { + if (node.nodeType === COMMENT_NODE) { + var data = node.data; + + if ( + data === SUSPENSE_START_DATA || + data === SUSPENSE_FALLBACK_START_DATA || + data === SUSPENSE_PENDING_START_DATA + ) { + if (depth === 0) { + return node; + } else { + depth--; + } + } else if (data === SUSPENSE_END_DATA) { + depth++; + } + } + + node = node.previousSibling; + } + + return null; + } + function commitHydratedContainer(container) { + // Retry if any event replaying was blocked on this. + retryIfBlockedOn(container); + } + function commitHydratedSuspenseInstance(suspenseInstance) { + // Retry if any event replaying was blocked on this. + retryIfBlockedOn(suspenseInstance); + } + function didNotMatchHydratedContainerTextInstance(parentContainer, textInstance, text) { + { + warnForUnmatchedText(textInstance, text); + } + } + function didNotMatchHydratedTextInstance( + parentType, + parentProps, + parentInstance, + textInstance, + text, + ) { + if (true && parentProps[SUPPRESS_HYDRATION_WARNING] !== true) { + warnForUnmatchedText(textInstance, text); + } + } + function didNotHydrateContainerInstance(parentContainer, instance) { + { + if (instance.nodeType === ELEMENT_NODE) { + warnForDeletedHydratableElement(parentContainer, instance); + } else if (instance.nodeType === COMMENT_NODE) { + // TODO: warnForDeletedHydratableSuspenseBoundary + } else { + warnForDeletedHydratableText(parentContainer, instance); + } + } + } + function didNotHydrateInstance(parentType, parentProps, parentInstance, instance) { + if (true && parentProps[SUPPRESS_HYDRATION_WARNING] !== true) { + if (instance.nodeType === ELEMENT_NODE) { + warnForDeletedHydratableElement(parentInstance, instance); + } else if (instance.nodeType === COMMENT_NODE) { + // TODO: warnForDeletedHydratableSuspenseBoundary + } else { + warnForDeletedHydratableText(parentInstance, instance); + } + } + } + function didNotFindHydratableContainerInstance(parentContainer, type, props) { + { + warnForInsertedHydratedElement(parentContainer, type, props); + } + } + function didNotFindHydratableContainerTextInstance(parentContainer, text) { + { + warnForInsertedHydratedText(parentContainer, text); + } + } + + function didNotFindHydratableInstance(parentType, parentProps, parentInstance, type, props) { + if (true && parentProps[SUPPRESS_HYDRATION_WARNING] !== true) { + warnForInsertedHydratedElement(parentInstance, type, props); + } + } + function didNotFindHydratableTextInstance(parentType, parentProps, parentInstance, text) { + if (true && parentProps[SUPPRESS_HYDRATION_WARNING] !== true) { + warnForInsertedHydratedText(parentInstance, text); + } + } + function didNotFindHydratableSuspenseInstance(parentType, parentProps, parentInstance) { + if (true && parentProps[SUPPRESS_HYDRATION_WARNING] !== true) { + // TODO: warnForInsertedHydratedSuspense(parentInstance); + } + } + function mountResponderInstance( + responder, + responderInstance, + responderProps, + responderState, + instance, + ) { + // Listen to events + var doc = instance.ownerDocument; + var _ref = responder, + rootEventTypes = _ref.rootEventTypes, + targetEventTypes = _ref.targetEventTypes; + + if (targetEventTypes !== null) { + listenToEventResponderEventTypes(targetEventTypes, doc); + } + + if (rootEventTypes !== null) { + addRootEventTypesForResponderInstance(responderInstance, rootEventTypes); + listenToEventResponderEventTypes(rootEventTypes, doc); + } + + mountEventResponder(responder, responderInstance, responderProps, responderState); + return responderInstance; + } + function unmountResponderInstance(responderInstance) { + if (enableFlareAPI) { + // TODO stop listening to targetEventTypes + unmountEventResponder(responderInstance); + } + } + function getFundamentalComponentInstance(fundamentalInstance) { + if (enableFundamentalAPI) { + var currentFiber = fundamentalInstance.currentFiber, + impl = fundamentalInstance.impl, + props = fundamentalInstance.props, + state = fundamentalInstance.state; + var instance = impl.getInstance(null, props, state); + precacheFiberNode(currentFiber, instance); + return instance; + } // Because of the flag above, this gets around the Flow error; + + return null; + } + function mountFundamentalComponent(fundamentalInstance) { + if (enableFundamentalAPI) { + var impl = fundamentalInstance.impl, + instance = fundamentalInstance.instance, + props = fundamentalInstance.props, + state = fundamentalInstance.state; + var onMount = impl.onMount; + + if (onMount !== undefined) { + onMount(null, instance, props, state); + } + } + } + function shouldUpdateFundamentalComponent(fundamentalInstance) { + if (enableFundamentalAPI) { + var impl = fundamentalInstance.impl, + prevProps = fundamentalInstance.prevProps, + props = fundamentalInstance.props, + state = fundamentalInstance.state; + var shouldUpdate = impl.shouldUpdate; + + if (shouldUpdate !== undefined) { + return shouldUpdate(null, prevProps, props, state); + } + } + + return true; + } + function updateFundamentalComponent(fundamentalInstance) { + if (enableFundamentalAPI) { + var impl = fundamentalInstance.impl, + instance = fundamentalInstance.instance, + prevProps = fundamentalInstance.prevProps, + props = fundamentalInstance.props, + state = fundamentalInstance.state; + var onUpdate = impl.onUpdate; + + if (onUpdate !== undefined) { + onUpdate(null, instance, prevProps, props, state); + } + } + } + function unmountFundamentalComponent(fundamentalInstance) { + if (enableFundamentalAPI) { + var impl = fundamentalInstance.impl, + instance = fundamentalInstance.instance, + props = fundamentalInstance.props, + state = fundamentalInstance.state; + var onUnmount = impl.onUnmount; + + if (onUnmount !== undefined) { + onUnmount(null, instance, props, state); + } + } + } + function getInstanceFromNode$2(node) { + return getClosestInstanceFromNode(node) || null; + } + + var randomKey = Math.random().toString(36).slice(2); + var internalInstanceKey = '__reactInternalInstance$' + randomKey; + var internalEventHandlersKey = '__reactEventHandlers$' + randomKey; + var internalContainerInstanceKey = '__reactContainere$' + randomKey; + function precacheFiberNode(hostInst, node) { + node[internalInstanceKey] = hostInst; + } + function markContainerAsRoot(hostRoot, node) { + node[internalContainerInstanceKey] = hostRoot; + } + function unmarkContainerAsRoot(node) { + node[internalContainerInstanceKey] = null; + } + function isContainerMarkedAsRoot(node) { + return !!node[internalContainerInstanceKey]; + } // Given a DOM node, return the closest HostComponent or HostText fiber ancestor. + // If the target node is part of a hydrated or not yet rendered subtree, then + // this may also return a SuspenseComponent or HostRoot to indicate that. + // Conceptually the HostRoot fiber is a child of the Container node. So if you + // pass the Container node as the targetNode, you will not actually get the + // HostRoot back. To get to the HostRoot, you need to pass a child of it. + // The same thing applies to Suspense boundaries. + + function getClosestInstanceFromNode(targetNode) { + var targetInst = targetNode[internalInstanceKey]; + + if (targetInst) { + // Don't return HostRoot or SuspenseComponent here. + return targetInst; + } // If the direct event target isn't a React owned DOM node, we need to look + // to see if one of its parents is a React owned DOM node. + + var parentNode = targetNode.parentNode; + + while (parentNode) { + // We'll check if this is a container root that could include + // React nodes in the future. We need to check this first because + // if we're a child of a dehydrated container, we need to first + // find that inner container before moving on to finding the parent + // instance. Note that we don't check this field on the targetNode + // itself because the fibers are conceptually between the container + // node and the first child. It isn't surrounding the container node. + // If it's not a container, we check if it's an instance. + targetInst = parentNode[internalContainerInstanceKey] || parentNode[internalInstanceKey]; + + if (targetInst) { + // Since this wasn't the direct target of the event, we might have + // stepped past dehydrated DOM nodes to get here. However they could + // also have been non-React nodes. We need to answer which one. + // If we the instance doesn't have any children, then there can't be + // a nested suspense boundary within it. So we can use this as a fast + // bailout. Most of the time, when people add non-React children to + // the tree, it is using a ref to a child-less DOM node. + // Normally we'd only need to check one of the fibers because if it + // has ever gone from having children to deleting them or vice versa + // it would have deleted the dehydrated boundary nested inside already. + // However, since the HostRoot starts out with an alternate it might + // have one on the alternate so we need to check in case this was a + // root. + var alternate = targetInst.alternate; + + if (targetInst.child !== null || (alternate !== null && alternate.child !== null)) { + // Next we need to figure out if the node that skipped past is + // nested within a dehydrated boundary and if so, which one. + var suspenseInstance = getParentSuspenseInstance(targetNode); + + while (suspenseInstance !== null) { + // We found a suspense instance. That means that we haven't + // hydrated it yet. Even though we leave the comments in the + // DOM after hydrating, and there are boundaries in the DOM + // that could already be hydrated, we wouldn't have found them + // through this pass since if the target is hydrated it would + // have had an internalInstanceKey on it. + // Let's get the fiber associated with the SuspenseComponent + // as the deepest instance. + var targetSuspenseInst = suspenseInstance[internalInstanceKey]; + + if (targetSuspenseInst) { + return targetSuspenseInst; + } // If we don't find a Fiber on the comment, it might be because + // we haven't gotten to hydrate it yet. There might still be a + // parent boundary that hasn't above this one so we need to find + // the outer most that is known. + + suspenseInstance = getParentSuspenseInstance(suspenseInstance); // If we don't find one, then that should mean that the parent + // host component also hasn't hydrated yet. We can return it + // below since it will bail out on the isMounted check later. + } + } + + return targetInst; + } + + targetNode = parentNode; + parentNode = targetNode.parentNode; + } + + return null; + } + /** + * Given a DOM node, return the ReactDOMComponent or ReactDOMTextComponent + * instance, or null if the node was not rendered by this React. + */ + + function getInstanceFromNode$1(node) { + var inst = node[internalInstanceKey] || node[internalContainerInstanceKey]; + + if (inst) { + if ( + inst.tag === HostComponent || + inst.tag === HostText || + inst.tag === SuspenseComponent || + inst.tag === HostRoot + ) { + return inst; + } else { + return null; + } + } + + return null; + } + /** + * Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding + * DOM node. + */ + + function getNodeFromInstance$1(inst) { + if (inst.tag === HostComponent || inst.tag === HostText) { + // In Fiber this, is just the state node right now. We assume it will be + // a host component or host text. + return inst.stateNode; + } // Without this first invariant, passing a non-DOM-component triggers the next + // invariant for a missing parent, which is super confusing. + + { + { + throw Error('getNodeFromInstance: Invalid argument.'); + } + } + } + function getFiberCurrentPropsFromNode$1(node) { + return node[internalEventHandlersKey] || null; + } + function updateFiberProps(node, props) { + node[internalEventHandlersKey] = props; + } + + /** + * These variables store information about text content of a target node, + * allowing comparison of content before and after a given event. + * + * Identify the node where selection currently begins, then observe + * both its text content and its current position in the DOM. Since the + * browser may natively replace the target node during composition, we can + * use its position to find its replacement. + * + * + */ + var root = null; + var startText = null; + var fallbackText = null; + function initialize(nativeEventTarget) { + root = nativeEventTarget; + startText = getText(); + return true; + } + function reset() { + root = null; + startText = null; + fallbackText = null; + } + function getData() { + if (fallbackText) { + return fallbackText; + } + + var start; + var startValue = startText; + var startLength = startValue.length; + var end; + var endValue = getText(); + var endLength = endValue.length; + + for (start = 0; start < startLength; start++) { + if (startValue[start] !== endValue[start]) { + break; + } + } + + var minEnd = startLength - start; + + for (end = 1; end <= minEnd; end++) { + if (startValue[startLength - end] !== endValue[endLength - end]) { + break; + } + } + + var sliceTail = end > 1 ? 1 - end : undefined; + fallbackText = endValue.slice(start, sliceTail); + return fallbackText; + } + function getText() { + if ('value' in root) { + return root.value; + } + + return root.textContent; + } + + /** + * @interface Event + * @see http://www.w3.org/TR/DOM-Level-3-Events/#events-compositionevents + */ + + var SyntheticCompositionEvent = SyntheticEvent.extend({ + data: null, + }); + + /** + * @interface Event + * @see http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105 + * /#events-inputevents + */ + + var SyntheticInputEvent = SyntheticEvent.extend({ + data: null, + }); + + var END_KEYCODES = [9, 13, 27, 32]; // Tab, Return, Esc, Space + + var START_KEYCODE = 229; + var canUseCompositionEvent = canUseDOM && 'CompositionEvent' in window; + var documentMode = null; + + if (canUseDOM && 'documentMode' in document) { + documentMode = document.documentMode; + } // Webkit offers a very useful `textInput` event that can be used to + // directly represent `beforeInput`. The IE `textinput` event is not as + // useful, so we don't use it. + + var canUseTextInputEvent = canUseDOM && 'TextEvent' in window && !documentMode; // In IE9+, we have access to composition events, but the data supplied + // by the native compositionend event may be incorrect. Japanese ideographic + // spaces, for instance (\u3000) are not recorded correctly. + + var useFallbackCompositionData = + canUseDOM && + (!canUseCompositionEvent || (documentMode && documentMode > 8 && documentMode <= 11)); + var SPACEBAR_CODE = 32; + var SPACEBAR_CHAR = String.fromCharCode(SPACEBAR_CODE); // Events and their corresponding property names. + + var eventTypes$1 = { + beforeInput: { + phasedRegistrationNames: { + bubbled: 'onBeforeInput', + captured: 'onBeforeInputCapture', + }, + dependencies: [TOP_COMPOSITION_END, TOP_KEY_PRESS, TOP_TEXT_INPUT, TOP_PASTE], + }, + compositionEnd: { + phasedRegistrationNames: { + bubbled: 'onCompositionEnd', + captured: 'onCompositionEndCapture', + }, + dependencies: [ + TOP_BLUR, + TOP_COMPOSITION_END, + TOP_KEY_DOWN, + TOP_KEY_PRESS, + TOP_KEY_UP, + TOP_MOUSE_DOWN, + ], + }, + compositionStart: { + phasedRegistrationNames: { + bubbled: 'onCompositionStart', + captured: 'onCompositionStartCapture', + }, + dependencies: [ + TOP_BLUR, + TOP_COMPOSITION_START, + TOP_KEY_DOWN, + TOP_KEY_PRESS, + TOP_KEY_UP, + TOP_MOUSE_DOWN, + ], + }, + compositionUpdate: { + phasedRegistrationNames: { + bubbled: 'onCompositionUpdate', + captured: 'onCompositionUpdateCapture', + }, + dependencies: [ + TOP_BLUR, + TOP_COMPOSITION_UPDATE, + TOP_KEY_DOWN, + TOP_KEY_PRESS, + TOP_KEY_UP, + TOP_MOUSE_DOWN, + ], + }, + }; // Track whether we've ever handled a keypress on the space key. + + var hasSpaceKeypress = false; + /** + * Return whether a native keypress event is assumed to be a command. + * This is required because Firefox fires `keypress` events for key commands + * (cut, copy, select-all, etc.) even though no character is inserted. + */ + + function isKeypressCommand(nativeEvent) { + return ( + (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) && // ctrlKey && altKey is equivalent to AltGr, and is not a command. + !(nativeEvent.ctrlKey && nativeEvent.altKey) + ); + } + /** + * Translate native top level events into event types. + * + * @param {string} topLevelType + * @return {object} + */ + + function getCompositionEventType(topLevelType) { + switch (topLevelType) { + case TOP_COMPOSITION_START: + return eventTypes$1.compositionStart; + + case TOP_COMPOSITION_END: + return eventTypes$1.compositionEnd; + + case TOP_COMPOSITION_UPDATE: + return eventTypes$1.compositionUpdate; + } + } + /** + * Does our fallback best-guess model think this event signifies that + * composition has begun? + * + * @param {string} topLevelType + * @param {object} nativeEvent + * @return {boolean} + */ + + function isFallbackCompositionStart(topLevelType, nativeEvent) { + return topLevelType === TOP_KEY_DOWN && nativeEvent.keyCode === START_KEYCODE; + } + /** + * Does our fallback mode think that this event is the end of composition? + * + * @param {string} topLevelType + * @param {object} nativeEvent + * @return {boolean} + */ + + function isFallbackCompositionEnd(topLevelType, nativeEvent) { + switch (topLevelType) { + case TOP_KEY_UP: + // Command keys insert or clear IME input. + return END_KEYCODES.indexOf(nativeEvent.keyCode) !== -1; + + case TOP_KEY_DOWN: + // Expect IME keyCode on each keydown. If we get any other + // code we must have exited earlier. + return nativeEvent.keyCode !== START_KEYCODE; + + case TOP_KEY_PRESS: + case TOP_MOUSE_DOWN: + case TOP_BLUR: + // Events are not possible without cancelling IME. + return true; + + default: + return false; + } + } + /** + * Google Input Tools provides composition data via a CustomEvent, + * with the `data` property populated in the `detail` object. If this + * is available on the event object, use it. If not, this is a plain + * composition event and we have nothing special to extract. + * + * @param {object} nativeEvent + * @return {?string} + */ + + function getDataFromCustomEvent(nativeEvent) { + var detail = nativeEvent.detail; + + if (typeof detail === 'object' && 'data' in detail) { + return detail.data; + } + + return null; + } + /** + * Check if a composition event was triggered by Korean IME. + * Our fallback mode does not work well with IE's Korean IME, + * so just use native composition events when Korean IME is used. + * Although CompositionEvent.locale property is deprecated, + * it is available in IE, where our fallback mode is enabled. + * + * @param {object} nativeEvent + * @return {boolean} + */ + + function isUsingKoreanIME(nativeEvent) { + return nativeEvent.locale === 'ko'; + } // Track the current IME composition status, if any. + + var isComposing = false; + /** + * @return {?object} A SyntheticCompositionEvent. + */ + + function extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) { + var eventType; + var fallbackData; + + if (canUseCompositionEvent) { + eventType = getCompositionEventType(topLevelType); + } else if (!isComposing) { + if (isFallbackCompositionStart(topLevelType, nativeEvent)) { + eventType = eventTypes$1.compositionStart; + } + } else if (isFallbackCompositionEnd(topLevelType, nativeEvent)) { + eventType = eventTypes$1.compositionEnd; + } + + if (!eventType) { + return null; + } + + if (useFallbackCompositionData && !isUsingKoreanIME(nativeEvent)) { + // The current composition is stored statically and must not be + // overwritten while composition continues. + if (!isComposing && eventType === eventTypes$1.compositionStart) { + isComposing = initialize(nativeEventTarget); + } else if (eventType === eventTypes$1.compositionEnd) { + if (isComposing) { + fallbackData = getData(); + } + } + } + + var event = SyntheticCompositionEvent.getPooled( + eventType, + targetInst, + nativeEvent, + nativeEventTarget, + ); + + if (fallbackData) { + // Inject data generated from fallback path into the synthetic event. + // This matches the property of native CompositionEventInterface. + event.data = fallbackData; + } else { + var customData = getDataFromCustomEvent(nativeEvent); + + if (customData !== null) { + event.data = customData; + } + } + + accumulateTwoPhaseDispatches(event); + return event; + } + /** + * @param {TopLevelType} topLevelType Number from `TopLevelType`. + * @param {object} nativeEvent Native browser event. + * @return {?string} The string corresponding to this `beforeInput` event. + */ + + function getNativeBeforeInputChars(topLevelType, nativeEvent) { + switch (topLevelType) { + case TOP_COMPOSITION_END: + return getDataFromCustomEvent(nativeEvent); + + case TOP_KEY_PRESS: + /** + * If native `textInput` events are available, our goal is to make + * use of them. However, there is a special case: the spacebar key. + * In Webkit, preventing default on a spacebar `textInput` event + * cancels character insertion, but it *also* causes the browser + * to fall back to its default spacebar behavior of scrolling the + * page. + * + * Tracking at: + * https://code.google.com/p/chromium/issues/detail?id=355103 + * + * To avoid this issue, use the keypress event as if no `textInput` + * event is available. + */ + var which = nativeEvent.which; + + if (which !== SPACEBAR_CODE) { + return null; + } + + hasSpaceKeypress = true; + return SPACEBAR_CHAR; + + case TOP_TEXT_INPUT: + // Record the characters to be added to the DOM. + var chars = nativeEvent.data; // If it's a spacebar character, assume that we have already handled + // it at the keypress level and bail immediately. Android Chrome + // doesn't give us keycodes, so we need to ignore it. + + if (chars === SPACEBAR_CHAR && hasSpaceKeypress) { + return null; + } + + return chars; + + default: + // For other native event types, do nothing. + return null; + } + } + /** + * For browsers that do not provide the `textInput` event, extract the + * appropriate string to use for SyntheticInputEvent. + * + * @param {number} topLevelType Number from `TopLevelEventTypes`. + * @param {object} nativeEvent Native browser event. + * @return {?string} The fallback string for this `beforeInput` event. + */ + + function getFallbackBeforeInputChars(topLevelType, nativeEvent) { + // If we are currently composing (IME) and using a fallback to do so, + // try to extract the composed characters from the fallback object. + // If composition event is available, we extract a string only at + // compositionevent, otherwise extract it at fallback events. + if (isComposing) { + if ( + topLevelType === TOP_COMPOSITION_END || + (!canUseCompositionEvent && isFallbackCompositionEnd(topLevelType, nativeEvent)) + ) { + var chars = getData(); + reset(); + isComposing = false; + return chars; + } + + return null; + } + + switch (topLevelType) { + case TOP_PASTE: + // If a paste event occurs after a keypress, throw out the input + // chars. Paste events should not lead to BeforeInput events. + return null; + + case TOP_KEY_PRESS: + /** + * As of v27, Firefox may fire keypress events even when no character + * will be inserted. A few possibilities: + * + * - `which` is `0`. Arrow keys, Esc key, etc. + * + * - `which` is the pressed key code, but no char is available. + * Ex: 'AltGr + d` in Polish. There is no modified character for + * this key combination and no character is inserted into the + * document, but FF fires the keypress for char code `100` anyway. + * No `input` event will occur. + * + * - `which` is the pressed key code, but a command combination is + * being used. Ex: `Cmd+C`. No character is inserted, and no + * `input` event will occur. + */ + if (!isKeypressCommand(nativeEvent)) { + // IE fires the `keypress` event when a user types an emoji via + // Touch keyboard of Windows. In such a case, the `char` property + // holds an emoji character like `\uD83D\uDE0A`. Because its length + // is 2, the property `which` does not represent an emoji correctly. + // In such a case, we directly return the `char` property instead of + // using `which`. + if (nativeEvent.char && nativeEvent.char.length > 1) { + return nativeEvent.char; + } else if (nativeEvent.which) { + return String.fromCharCode(nativeEvent.which); + } + } + + return null; + + case TOP_COMPOSITION_END: + return useFallbackCompositionData && !isUsingKoreanIME(nativeEvent) ? null : nativeEvent.data; + + default: + return null; + } + } + /** + * Extract a SyntheticInputEvent for `beforeInput`, based on either native + * `textInput` or fallback behavior. + * + * @return {?object} A SyntheticInputEvent. + */ + + function extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) { + var chars; + + if (canUseTextInputEvent) { + chars = getNativeBeforeInputChars(topLevelType, nativeEvent); + } else { + chars = getFallbackBeforeInputChars(topLevelType, nativeEvent); + } // If no characters are being inserted, no BeforeInput event should + // be fired. + + if (!chars) { + return null; + } + + var event = SyntheticInputEvent.getPooled( + eventTypes$1.beforeInput, + targetInst, + nativeEvent, + nativeEventTarget, + ); + event.data = chars; + accumulateTwoPhaseDispatches(event); + return event; + } + /** + * Create an `onBeforeInput` event to match + * http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105/#events-inputevents. + * + * This event plugin is based on the native `textInput` event + * available in Chrome, Safari, Opera, and IE. This event fires after + * `onKeyPress` and `onCompositionEnd`, but before `onInput`. + * + * `beforeInput` is spec'd but not implemented in any browsers, and + * the `input` event does not provide any useful information about what has + * actually been added, contrary to the spec. Thus, `textInput` is the best + * available event to identify the characters that have actually been inserted + * into the target node. + * + * This plugin is also responsible for emitting `composition` events, thus + * allowing us to share composition fallback code for both `beforeInput` and + * `composition` event types. + */ + + var BeforeInputEventPlugin = { + eventTypes: eventTypes$1, + extractEvents: function ( + topLevelType, + targetInst, + nativeEvent, + nativeEventTarget, + eventSystemFlags, + ) { + var composition = extractCompositionEvent( + topLevelType, + targetInst, + nativeEvent, + nativeEventTarget, + ); + var beforeInput = extractBeforeInputEvent( + topLevelType, + targetInst, + nativeEvent, + nativeEventTarget, + ); + + if (composition === null) { + return beforeInput; + } + + if (beforeInput === null) { + return composition; + } + + return [composition, beforeInput]; + }, + }; + + /** + * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary + */ + var supportedInputTypes = { + color: true, + date: true, + datetime: true, + 'datetime-local': true, + email: true, + month: true, + number: true, + password: true, + range: true, + search: true, + tel: true, + text: true, + time: true, + url: true, + week: true, + }; + + function isTextInputElement(elem) { + var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase(); + + if (nodeName === 'input') { + return !!supportedInputTypes[elem.type]; + } + + if (nodeName === 'textarea') { + return true; + } + + return false; + } + + var eventTypes$2 = { + change: { + phasedRegistrationNames: { + bubbled: 'onChange', + captured: 'onChangeCapture', + }, + dependencies: [ + TOP_BLUR, + TOP_CHANGE, + TOP_CLICK, + TOP_FOCUS, + TOP_INPUT, + TOP_KEY_DOWN, + TOP_KEY_UP, + TOP_SELECTION_CHANGE, + ], + }, + }; + + function createAndAccumulateChangeEvent(inst, nativeEvent, target) { + var event = SyntheticEvent.getPooled(eventTypes$2.change, inst, nativeEvent, target); + event.type = 'change'; // Flag this event loop as needing state restore. + + enqueueStateRestore(target); + accumulateTwoPhaseDispatches(event); + return event; + } + /** + * For IE shims + */ + + var activeElement = null; + var activeElementInst = null; + /** + * SECTION: handle `change` event + */ + + function shouldUseChangeEvent(elem) { + var nodeName = elem.nodeName && elem.nodeName.toLowerCase(); + return nodeName === 'select' || (nodeName === 'input' && elem.type === 'file'); + } + + function manualDispatchChangeEvent(nativeEvent) { + var event = createAndAccumulateChangeEvent( + activeElementInst, + nativeEvent, + getEventTarget(nativeEvent), + ); // If change and propertychange bubbled, we'd just bind to it like all the + // other events and have it go through ReactBrowserEventEmitter. Since it + // doesn't, we manually listen for the events and so we have to enqueue and + // process the abstract event manually. + // + // Batching is necessary here in order to ensure that all event handlers run + // before the next rerender (including event handlers attached to ancestor + // elements instead of directly on the input). Without this, controlled + // components don't work properly in conjunction with event bubbling because + // the component is rerendered and the value reverted before all the event + // handlers can run. See https://github.com/facebook/react/issues/708. + + batchedUpdates(runEventInBatch, event); + } + + function runEventInBatch(event) { + runEventsInBatch(event); + } + + function getInstIfValueChanged(targetInst) { + var targetNode = getNodeFromInstance$1(targetInst); + + if (updateValueIfChanged(targetNode)) { + return targetInst; + } + } + + function getTargetInstForChangeEvent(topLevelType, targetInst) { + if (topLevelType === TOP_CHANGE) { + return targetInst; + } + } + /** + * SECTION: handle `input` event + */ + + var isInputEventSupported = false; + + if (canUseDOM) { + // IE9 claims to support the input event but fails to trigger it when + // deleting text, so we ignore its input events. + isInputEventSupported = + isEventSupported('input') && (!document.documentMode || document.documentMode > 9); + } + /** + * (For IE <=9) Starts tracking propertychange events on the passed-in element + * and override the value property so that we can distinguish user events from + * value changes in JS. + */ + + function startWatchingForValueChange(target, targetInst) { + activeElement = target; + activeElementInst = targetInst; + activeElement.attachEvent('onpropertychange', handlePropertyChange); + } + /** + * (For IE <=9) Removes the event listeners from the currently-tracked element, + * if any exists. + */ + + function stopWatchingForValueChange() { + if (!activeElement) { + return; + } + + activeElement.detachEvent('onpropertychange', handlePropertyChange); + activeElement = null; + activeElementInst = null; + } + /** + * (For IE <=9) Handles a propertychange event, sending a `change` event if + * the value of the active element has changed. + */ + + function handlePropertyChange(nativeEvent) { + if (nativeEvent.propertyName !== 'value') { + return; + } + + if (getInstIfValueChanged(activeElementInst)) { + manualDispatchChangeEvent(nativeEvent); + } + } + + function handleEventsForInputEventPolyfill(topLevelType, target, targetInst) { + if (topLevelType === TOP_FOCUS) { + // In IE9, propertychange fires for most input events but is buggy and + // doesn't fire when text is deleted, but conveniently, selectionchange + // appears to fire in all of the remaining cases so we catch those and + // forward the event if the value has changed + // In either case, we don't want to call the event handler if the value + // is changed from JS so we redefine a setter for `.value` that updates + // our activeElementValue variable, allowing us to ignore those changes + // + // stopWatching() should be a noop here but we call it just in case we + // missed a blur event somehow. + stopWatchingForValueChange(); + startWatchingForValueChange(target, targetInst); + } else if (topLevelType === TOP_BLUR) { + stopWatchingForValueChange(); + } + } // For IE8 and IE9. + + function getTargetInstForInputEventPolyfill(topLevelType, targetInst) { + if ( + topLevelType === TOP_SELECTION_CHANGE || + topLevelType === TOP_KEY_UP || + topLevelType === TOP_KEY_DOWN + ) { + // On the selectionchange event, the target is just document which isn't + // helpful for us so just check activeElement instead. + // + // 99% of the time, keydown and keyup aren't necessary. IE8 fails to fire + // propertychange on the first input event after setting `value` from a + // script and fires only keydown, keypress, keyup. Catching keyup usually + // gets it and catching keydown lets us fire an event for the first + // keystroke if user does a key repeat (it'll be a little delayed: right + // before the second keystroke). Other input methods (e.g., paste) seem to + // fire selectionchange normally. + return getInstIfValueChanged(activeElementInst); + } + } + /** + * SECTION: handle `click` event + */ + + function shouldUseClickEvent(elem) { + // Use the `click` event to detect changes to checkbox and radio inputs. + // This approach works across all browsers, whereas `change` does not fire + // until `blur` in IE8. + var nodeName = elem.nodeName; + return ( + nodeName && + nodeName.toLowerCase() === 'input' && + (elem.type === 'checkbox' || elem.type === 'radio') + ); + } + + function getTargetInstForClickEvent(topLevelType, targetInst) { + if (topLevelType === TOP_CLICK) { + return getInstIfValueChanged(targetInst); + } + } + + function getTargetInstForInputOrChangeEvent(topLevelType, targetInst) { + if (topLevelType === TOP_INPUT || topLevelType === TOP_CHANGE) { + return getInstIfValueChanged(targetInst); + } + } + + function handleControlledInputBlur(node) { + var state = node._wrapperState; + + if (!state || !state.controlled || node.type !== 'number') { + return; + } + + if (!disableInputAttributeSyncing) { + // If controlled, assign the value attribute to the current value on blur + setDefaultValue(node, 'number', node.value); + } + } + /** + * This plugin creates an `onChange` event that normalizes change events + * across form elements. This event fires at a time when it's possible to + * change the element's value without seeing a flicker. + * + * Supported elements are: + * - input (see `isTextInputElement`) + * - textarea + * - select + */ + + var ChangeEventPlugin = { + eventTypes: eventTypes$2, + _isInputEventSupported: isInputEventSupported, + extractEvents: function ( + topLevelType, + targetInst, + nativeEvent, + nativeEventTarget, + eventSystemFlags, + ) { + var targetNode = targetInst ? getNodeFromInstance$1(targetInst) : window; + var getTargetInstFunc, handleEventFunc; + + if (shouldUseChangeEvent(targetNode)) { + getTargetInstFunc = getTargetInstForChangeEvent; + } else if (isTextInputElement(targetNode)) { + if (isInputEventSupported) { + getTargetInstFunc = getTargetInstForInputOrChangeEvent; + } else { + getTargetInstFunc = getTargetInstForInputEventPolyfill; + handleEventFunc = handleEventsForInputEventPolyfill; + } + } else if (shouldUseClickEvent(targetNode)) { + getTargetInstFunc = getTargetInstForClickEvent; + } + + if (getTargetInstFunc) { + var inst = getTargetInstFunc(topLevelType, targetInst); + + if (inst) { + var event = createAndAccumulateChangeEvent(inst, nativeEvent, nativeEventTarget); + return event; + } + } + + if (handleEventFunc) { + handleEventFunc(topLevelType, targetNode, targetInst); + } // When blurring, set the value attribute for number inputs + + if (topLevelType === TOP_BLUR) { + handleControlledInputBlur(targetNode); + } + }, + }; + + /** + * Module that is injectable into `EventPluginHub`, that specifies a + * deterministic ordering of `EventPlugin`s. A convenient way to reason about + * plugins, without having to package every one of them. This is better than + * having plugins be ordered in the same order that they are injected because + * that ordering would be influenced by the packaging order. + * `ResponderEventPlugin` must occur before `SimpleEventPlugin` so that + * preventing default on events is convenient in `SimpleEventPlugin` handlers. + */ + var DOMEventPluginOrder = [ + 'ResponderEventPlugin', + 'SimpleEventPlugin', + 'EnterLeaveEventPlugin', + 'ChangeEventPlugin', + 'SelectEventPlugin', + 'BeforeInputEventPlugin', + ]; + + var eventTypes$3 = { + mouseEnter: { + registrationName: 'onMouseEnter', + dependencies: [TOP_MOUSE_OUT, TOP_MOUSE_OVER], + }, + mouseLeave: { + registrationName: 'onMouseLeave', + dependencies: [TOP_MOUSE_OUT, TOP_MOUSE_OVER], + }, + pointerEnter: { + registrationName: 'onPointerEnter', + dependencies: [TOP_POINTER_OUT, TOP_POINTER_OVER], + }, + pointerLeave: { + registrationName: 'onPointerLeave', + dependencies: [TOP_POINTER_OUT, TOP_POINTER_OVER], + }, + }; // We track the lastNativeEvent to ensure that when we encounter + // cases where we process the same nativeEvent multiple times, + // which can happen when have multiple ancestors, that we don't + // duplicate enter + + var lastNativeEvent; + var EnterLeaveEventPlugin = { + eventTypes: eventTypes$3, + + /** + * For almost every interaction we care about, there will be both a top-level + * `mouseover` and `mouseout` event that occurs. Only use `mouseout` so that + * we do not extract duplicate events. However, moving the mouse into the + * browser from outside will not fire a `mouseout` event. In this case, we use + * the `mouseover` top-level event. + */ + extractEvents: function ( + topLevelType, + targetInst, + nativeEvent, + nativeEventTarget, + eventSystemFlags, + ) { + var isOverEvent = topLevelType === TOP_MOUSE_OVER || topLevelType === TOP_POINTER_OVER; + var isOutEvent = topLevelType === TOP_MOUSE_OUT || topLevelType === TOP_POINTER_OUT; + + if ( + isOverEvent && + (eventSystemFlags & IS_REPLAYED) === 0 && + (nativeEvent.relatedTarget || nativeEvent.fromElement) + ) { + // If this is an over event with a target, then we've already dispatched + // the event in the out event of the other target. If this is replayed, + // then it's because we couldn't dispatch against this target previously + // so we have to do it now instead. + return null; + } + + if (!isOutEvent && !isOverEvent) { + // Must not be a mouse or pointer in or out - ignoring. + return null; + } + + var win; + + if (nativeEventTarget.window === nativeEventTarget) { + // `nativeEventTarget` is probably a window object. + win = nativeEventTarget; + } else { + // TODO: Figure out why `ownerDocument` is sometimes undefined in IE8. + var doc = nativeEventTarget.ownerDocument; + + if (doc) { + win = doc.defaultView || doc.parentWindow; + } else { + win = window; + } + } + + var from; + var to; + + if (isOutEvent) { + from = targetInst; + var related = nativeEvent.relatedTarget || nativeEvent.toElement; + to = related ? getClosestInstanceFromNode(related) : null; + + if (to !== null) { + var nearestMounted = getNearestMountedFiber(to); + + if (to !== nearestMounted || (to.tag !== HostComponent && to.tag !== HostText)) { + to = null; + } + } + } else { + // Moving to a node from outside the window. + from = null; + to = targetInst; + } + + if (from === to) { + // Nothing pertains to our managed components. + return null; + } + + var eventInterface, leaveEventType, enterEventType, eventTypePrefix; + + if (topLevelType === TOP_MOUSE_OUT || topLevelType === TOP_MOUSE_OVER) { + eventInterface = SyntheticMouseEvent; + leaveEventType = eventTypes$3.mouseLeave; + enterEventType = eventTypes$3.mouseEnter; + eventTypePrefix = 'mouse'; + } else if (topLevelType === TOP_POINTER_OUT || topLevelType === TOP_POINTER_OVER) { + eventInterface = SyntheticPointerEvent; + leaveEventType = eventTypes$3.pointerLeave; + enterEventType = eventTypes$3.pointerEnter; + eventTypePrefix = 'pointer'; + } + + var fromNode = from == null ? win : getNodeFromInstance$1(from); + var toNode = to == null ? win : getNodeFromInstance$1(to); + var leave = eventInterface.getPooled(leaveEventType, from, nativeEvent, nativeEventTarget); + leave.type = eventTypePrefix + 'leave'; + leave.target = fromNode; + leave.relatedTarget = toNode; + var enter = eventInterface.getPooled(enterEventType, to, nativeEvent, nativeEventTarget); + enter.type = eventTypePrefix + 'enter'; + enter.target = toNode; + enter.relatedTarget = fromNode; + accumulateEnterLeaveDispatches(leave, enter, from, to); + + if (nativeEvent === lastNativeEvent) { + lastNativeEvent = null; + return [leave]; + } + + lastNativeEvent = nativeEvent; + return [leave, enter]; + }, + }; + + /** + * inlined Object.is polyfill to avoid requiring consumers ship their own + * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is + */ + function is(x, y) { + return ( + (x === y && (x !== 0 || 1 / x === 1 / y)) || (x !== x && y !== y) // eslint-disable-line no-self-compare + ); + } + + var is$1 = typeof Object.is === 'function' ? Object.is : is; + + var hasOwnProperty$2 = Object.prototype.hasOwnProperty; + /** + * Performs equality by iterating through keys on an object and returning false + * when any key has values which are not strictly equal between the arguments. + * Returns true when the values of all keys are strictly equal. + */ + + function shallowEqual(objA, objB) { + if (is$1(objA, objB)) { + return true; + } + + if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) { + return false; + } + + var keysA = Object.keys(objA); + var keysB = Object.keys(objB); + + if (keysA.length !== keysB.length) { + return false; + } // Test for A's keys different from B. + + for (var i = 0; i < keysA.length; i++) { + if (!hasOwnProperty$2.call(objB, keysA[i]) || !is$1(objA[keysA[i]], objB[keysA[i]])) { + return false; + } + } + + return true; + } + + var skipSelectionChangeEvent = + canUseDOM && 'documentMode' in document && document.documentMode <= 11; + var eventTypes$4 = { + select: { + phasedRegistrationNames: { + bubbled: 'onSelect', + captured: 'onSelectCapture', + }, + dependencies: [ + TOP_BLUR, + TOP_CONTEXT_MENU, + TOP_DRAG_END, + TOP_FOCUS, + TOP_KEY_DOWN, + TOP_KEY_UP, + TOP_MOUSE_DOWN, + TOP_MOUSE_UP, + TOP_SELECTION_CHANGE, + ], + }, + }; + var activeElement$1 = null; + var activeElementInst$1 = null; + var lastSelection = null; + var mouseDown = false; + /** + * Get an object which is a unique representation of the current selection. + * + * The return value will not be consistent across nodes or browsers, but + * two identical selections on the same node will return identical objects. + * + * @param {DOMElement} node + * @return {object} + */ + + function getSelection$1(node) { + if ('selectionStart' in node && hasSelectionCapabilities(node)) { + return { + start: node.selectionStart, + end: node.selectionEnd, + }; + } else { + var win = (node.ownerDocument && node.ownerDocument.defaultView) || window; + var selection = win.getSelection(); + return { + anchorNode: selection.anchorNode, + anchorOffset: selection.anchorOffset, + focusNode: selection.focusNode, + focusOffset: selection.focusOffset, + }; + } + } + /** + * Get document associated with the event target. + * + * @param {object} nativeEventTarget + * @return {Document} + */ + + function getEventTargetDocument(eventTarget) { + return eventTarget.window === eventTarget + ? eventTarget.document + : eventTarget.nodeType === DOCUMENT_NODE + ? eventTarget + : eventTarget.ownerDocument; + } + /** + * Poll selection to see whether it's changed. + * + * @param {object} nativeEvent + * @param {object} nativeEventTarget + * @return {?SyntheticEvent} + */ + + function constructSelectEvent(nativeEvent, nativeEventTarget) { + // Ensure we have the right element, and that the user is not dragging a + // selection (this matches native `select` event behavior). In HTML5, select + // fires only on input and textarea thus if there's no focused element we + // won't dispatch. + var doc = getEventTargetDocument(nativeEventTarget); + + if (mouseDown || activeElement$1 == null || activeElement$1 !== getActiveElement(doc)) { + return null; + } // Only fire when selection has actually changed. + + var currentSelection = getSelection$1(activeElement$1); + + if (!lastSelection || !shallowEqual(lastSelection, currentSelection)) { + lastSelection = currentSelection; + var syntheticEvent = SyntheticEvent.getPooled( + eventTypes$4.select, + activeElementInst$1, + nativeEvent, + nativeEventTarget, + ); + syntheticEvent.type = 'select'; + syntheticEvent.target = activeElement$1; + accumulateTwoPhaseDispatches(syntheticEvent); + return syntheticEvent; + } + + return null; + } + /** + * This plugin creates an `onSelect` event that normalizes select events + * across form elements. + * + * Supported elements are: + * - input (see `isTextInputElement`) + * - textarea + * - contentEditable + * + * This differs from native browser implementations in the following ways: + * - Fires on contentEditable fields as well as inputs. + * - Fires for collapsed selection. + * - Fires after user input. + */ + + var SelectEventPlugin = { + eventTypes: eventTypes$4, + extractEvents: function ( + topLevelType, + targetInst, + nativeEvent, + nativeEventTarget, + eventSystemFlags, + ) { + var doc = getEventTargetDocument(nativeEventTarget); // Track whether all listeners exists for this plugin. If none exist, we do + // not extract events. See #3639. + + if (!doc || !isListeningToAllDependencies('onSelect', doc)) { + return null; + } + + var targetNode = targetInst ? getNodeFromInstance$1(targetInst) : window; + + switch (topLevelType) { + // Track the input node that has focus. + case TOP_FOCUS: + if (isTextInputElement(targetNode) || targetNode.contentEditable === 'true') { + activeElement$1 = targetNode; + activeElementInst$1 = targetInst; + lastSelection = null; + } + + break; + + case TOP_BLUR: + activeElement$1 = null; + activeElementInst$1 = null; + lastSelection = null; + break; + // Don't fire the event while the user is dragging. This matches the + // semantics of the native select event. + + case TOP_MOUSE_DOWN: + mouseDown = true; + break; + + case TOP_CONTEXT_MENU: + case TOP_MOUSE_UP: + case TOP_DRAG_END: + mouseDown = false; + return constructSelectEvent(nativeEvent, nativeEventTarget); + // Chrome and IE fire non-standard event when selection is changed (and + // sometimes when it hasn't). IE's event fires out of order with respect + // to key and input events on deletion, so we discard it. + // + // Firefox doesn't support selectionchange, so check selection status + // after each key entry. The selection changes after keydown and before + // keyup, but we check on keydown as well in the case of holding down a + // key, when multiple keydown events are fired but only one keyup is. + // This is also our approach for IE handling, for the reason above. + + case TOP_SELECTION_CHANGE: + if (skipSelectionChangeEvent) { + break; + } + + // falls through + + case TOP_KEY_DOWN: + case TOP_KEY_UP: + return constructSelectEvent(nativeEvent, nativeEventTarget); + } + + return null; + }, + }; + + /** + * Inject modules for resolving DOM hierarchy and plugin ordering. + */ + + injection.injectEventPluginOrder(DOMEventPluginOrder); + setComponentTree(getFiberCurrentPropsFromNode$1, getInstanceFromNode$1, getNodeFromInstance$1); + /** + * Some important event plugins included by default (without having to require + * them). + */ + + injection.injectEventPluginsByName({ + SimpleEventPlugin: SimpleEventPlugin, + EnterLeaveEventPlugin: EnterLeaveEventPlugin, + ChangeEventPlugin: ChangeEventPlugin, + SelectEventPlugin: SelectEventPlugin, + BeforeInputEventPlugin: BeforeInputEventPlugin, + }); + + // Prefix measurements so that it's possible to filter them. + // Longer prefixes are hard to read in DevTools. + var reactEmoji = '\u269B'; + var warningEmoji = '\u26D4'; + var supportsUserTiming = + typeof performance !== 'undefined' && + typeof performance.mark === 'function' && + typeof performance.clearMarks === 'function' && + typeof performance.measure === 'function' && + typeof performance.clearMeasures === 'function'; // Keep track of current fiber so that we know the path to unwind on pause. + // TODO: this looks the same as nextUnitOfWork in scheduler. Can we unify them? + + var currentFiber = null; // If we're in the middle of user code, which fiber and method is it? + // Reusing `currentFiber` would be confusing for this because user code fiber + // can change during commit phase too, but we don't need to unwind it (since + // lifecycles in the commit phase don't resemble a tree). + + var currentPhase = null; + var currentPhaseFiber = null; // Did lifecycle hook schedule an update? This is often a performance problem, + // so we will keep track of it, and include it in the report. + // Track commits caused by cascading updates. + + var isCommitting = false; + var hasScheduledUpdateInCurrentCommit = false; + var hasScheduledUpdateInCurrentPhase = false; + var commitCountInCurrentWorkLoop = 0; + var effectCountInCurrentCommit = 0; + // to avoid stretch the commit phase with measurement overhead. + + var labelsInCurrentCommit = new Set(); + + var formatMarkName = function (markName) { + return reactEmoji + ' ' + markName; + }; + + var formatLabel = function (label, warning) { + var prefix = warning ? warningEmoji + ' ' : reactEmoji + ' '; + var suffix = warning ? ' Warning: ' + warning : ''; + return '' + prefix + label + suffix; + }; + + var beginMark = function (markName) { + performance.mark(formatMarkName(markName)); + }; + + var clearMark = function (markName) { + performance.clearMarks(formatMarkName(markName)); + }; + + var endMark = function (label, markName, warning) { + var formattedMarkName = formatMarkName(markName); + var formattedLabel = formatLabel(label, warning); + + try { + performance.measure(formattedLabel, formattedMarkName); + } catch (err) {} // If previous mark was missing for some reason, this will throw. + // This could only happen if React crashed in an unexpected place earlier. + // Don't pile on with more errors. + // Clear marks immediately to avoid growing buffer. + + performance.clearMarks(formattedMarkName); + performance.clearMeasures(formattedLabel); + }; + + var getFiberMarkName = function (label, debugID) { + return label + ' (#' + debugID + ')'; + }; + + var getFiberLabel = function (componentName, isMounted, phase) { + if (phase === null) { + // These are composite component total time measurements. + return componentName + ' [' + (isMounted ? 'update' : 'mount') + ']'; + } else { + // Composite component methods. + return componentName + '.' + phase; + } + }; + + var beginFiberMark = function (fiber, phase) { + var componentName = getComponentName(fiber.type) || 'Unknown'; + var debugID = fiber._debugID; + var isMounted = fiber.alternate !== null; + var label = getFiberLabel(componentName, isMounted, phase); + + if (isCommitting && labelsInCurrentCommit.has(label)) { + // During the commit phase, we don't show duplicate labels because + // there is a fixed overhead for every measurement, and we don't + // want to stretch the commit phase beyond necessary. + return false; + } + + labelsInCurrentCommit.add(label); + var markName = getFiberMarkName(label, debugID); + beginMark(markName); + return true; + }; + + var clearFiberMark = function (fiber, phase) { + var componentName = getComponentName(fiber.type) || 'Unknown'; + var debugID = fiber._debugID; + var isMounted = fiber.alternate !== null; + var label = getFiberLabel(componentName, isMounted, phase); + var markName = getFiberMarkName(label, debugID); + clearMark(markName); + }; + + var endFiberMark = function (fiber, phase, warning) { + var componentName = getComponentName(fiber.type) || 'Unknown'; + var debugID = fiber._debugID; + var isMounted = fiber.alternate !== null; + var label = getFiberLabel(componentName, isMounted, phase); + var markName = getFiberMarkName(label, debugID); + endMark(label, markName, warning); + }; + + var shouldIgnoreFiber = function (fiber) { + // Host components should be skipped in the timeline. + // We could check typeof fiber.type, but does this work with RN? + switch (fiber.tag) { + case HostRoot: + case HostComponent: + case HostText: + case HostPortal: + case Fragment: + case ContextProvider: + case ContextConsumer: + case Mode: + return true; + + default: + return false; + } + }; + + var clearPendingPhaseMeasurement = function () { + if (currentPhase !== null && currentPhaseFiber !== null) { + clearFiberMark(currentPhaseFiber, currentPhase); + } + + currentPhaseFiber = null; + currentPhase = null; + hasScheduledUpdateInCurrentPhase = false; + }; + + var pauseTimers = function () { + // Stops all currently active measurements so that they can be resumed + // if we continue in a later deferred loop from the same unit of work. + var fiber = currentFiber; + + while (fiber) { + if (fiber._debugIsCurrentlyTiming) { + endFiberMark(fiber, null, null); + } + + fiber = fiber.return; + } + }; + + var resumeTimersRecursively = function (fiber) { + if (fiber.return !== null) { + resumeTimersRecursively(fiber.return); + } + + if (fiber._debugIsCurrentlyTiming) { + beginFiberMark(fiber, null); + } + }; + + var resumeTimers = function () { + // Resumes all measurements that were active during the last deferred loop. + if (currentFiber !== null) { + resumeTimersRecursively(currentFiber); + } + }; + + function recordEffect() { + if (enableUserTimingAPI) { + effectCountInCurrentCommit++; + } + } + function recordScheduleUpdate() { + if (enableUserTimingAPI) { + if (isCommitting) { + hasScheduledUpdateInCurrentCommit = true; + } + + if ( + currentPhase !== null && + currentPhase !== 'componentWillMount' && + currentPhase !== 'componentWillReceiveProps' + ) { + hasScheduledUpdateInCurrentPhase = true; + } + } + } + + function startWorkTimer(fiber) { + if (enableUserTimingAPI) { + if (!supportsUserTiming || shouldIgnoreFiber(fiber)) { + return; + } // If we pause, this is the fiber to unwind from. + + currentFiber = fiber; + + if (!beginFiberMark(fiber, null)) { + return; + } + + fiber._debugIsCurrentlyTiming = true; + } + } + function cancelWorkTimer(fiber) { + if (enableUserTimingAPI) { + if (!supportsUserTiming || shouldIgnoreFiber(fiber)) { + return; + } // Remember we shouldn't complete measurement for this fiber. + // Otherwise flamechart will be deep even for small updates. + + fiber._debugIsCurrentlyTiming = false; + clearFiberMark(fiber, null); + } + } + function stopWorkTimer(fiber) { + if (enableUserTimingAPI) { + if (!supportsUserTiming || shouldIgnoreFiber(fiber)) { + return; + } // If we pause, its parent is the fiber to unwind from. + + currentFiber = fiber.return; + + if (!fiber._debugIsCurrentlyTiming) { + return; + } + + fiber._debugIsCurrentlyTiming = false; + endFiberMark(fiber, null, null); + } + } + function stopFailedWorkTimer(fiber) { + if (enableUserTimingAPI) { + if (!supportsUserTiming || shouldIgnoreFiber(fiber)) { + return; + } // If we pause, its parent is the fiber to unwind from. + + currentFiber = fiber.return; + + if (!fiber._debugIsCurrentlyTiming) { + return; + } + + fiber._debugIsCurrentlyTiming = false; + var warning = + fiber.tag === SuspenseComponent + ? 'Rendering was suspended' + : 'An error was thrown inside this error boundary'; + endFiberMark(fiber, null, warning); + } + } + function startPhaseTimer(fiber, phase) { + if (enableUserTimingAPI) { + if (!supportsUserTiming) { + return; + } + + clearPendingPhaseMeasurement(); + + if (!beginFiberMark(fiber, phase)) { + return; + } + + currentPhaseFiber = fiber; + currentPhase = phase; + } + } + function stopPhaseTimer() { + if (enableUserTimingAPI) { + if (!supportsUserTiming) { + return; + } + + if (currentPhase !== null && currentPhaseFiber !== null) { + var warning = hasScheduledUpdateInCurrentPhase ? 'Scheduled a cascading update' : null; + endFiberMark(currentPhaseFiber, currentPhase, warning); + } + + currentPhase = null; + currentPhaseFiber = null; + } + } + function startWorkLoopTimer(nextUnitOfWork) { + if (enableUserTimingAPI) { + currentFiber = nextUnitOfWork; + + if (!supportsUserTiming) { + return; + } + + commitCountInCurrentWorkLoop = 0; // This is top level call. + // Any other measurements are performed within. + + beginMark('(React Tree Reconciliation)'); // Resume any measurements that were in progress during the last loop. + + resumeTimers(); + } + } + function stopWorkLoopTimer(interruptedBy, didCompleteRoot) { + if (enableUserTimingAPI) { + if (!supportsUserTiming) { + return; + } + + var warning = null; + + if (interruptedBy !== null) { + if (interruptedBy.tag === HostRoot) { + warning = 'A top-level update interrupted the previous render'; + } else { + var componentName = getComponentName(interruptedBy.type) || 'Unknown'; + warning = 'An update to ' + componentName + ' interrupted the previous render'; + } + } else if (commitCountInCurrentWorkLoop > 1) { + warning = 'There were cascading updates'; + } + + commitCountInCurrentWorkLoop = 0; + var label = didCompleteRoot + ? '(React Tree Reconciliation: Completed Root)' + : '(React Tree Reconciliation: Yielded)'; // Pause any measurements until the next loop. + + pauseTimers(); + endMark(label, '(React Tree Reconciliation)', warning); + } + } + function startCommitTimer() { + if (enableUserTimingAPI) { + if (!supportsUserTiming) { + return; + } + + isCommitting = true; + hasScheduledUpdateInCurrentCommit = false; + labelsInCurrentCommit.clear(); + beginMark('(Committing Changes)'); + } + } + function stopCommitTimer() { + if (enableUserTimingAPI) { + if (!supportsUserTiming) { + return; + } + + var warning = null; + + if (hasScheduledUpdateInCurrentCommit) { + warning = 'Lifecycle hook scheduled a cascading update'; + } else if (commitCountInCurrentWorkLoop > 0) { + warning = 'Caused by a cascading update in earlier commit'; + } + + hasScheduledUpdateInCurrentCommit = false; + commitCountInCurrentWorkLoop++; + isCommitting = false; + labelsInCurrentCommit.clear(); + endMark('(Committing Changes)', '(Committing Changes)', warning); + } + } + function startCommitSnapshotEffectsTimer() { + if (enableUserTimingAPI) { + if (!supportsUserTiming) { + return; + } + + effectCountInCurrentCommit = 0; + beginMark('(Committing Snapshot Effects)'); + } + } + function stopCommitSnapshotEffectsTimer() { + if (enableUserTimingAPI) { + if (!supportsUserTiming) { + return; + } + + var count = effectCountInCurrentCommit; + effectCountInCurrentCommit = 0; + endMark( + '(Committing Snapshot Effects: ' + count + ' Total)', + '(Committing Snapshot Effects)', + null, + ); + } + } + function startCommitHostEffectsTimer() { + if (enableUserTimingAPI) { + if (!supportsUserTiming) { + return; + } + + effectCountInCurrentCommit = 0; + beginMark('(Committing Host Effects)'); + } + } + function stopCommitHostEffectsTimer() { + if (enableUserTimingAPI) { + if (!supportsUserTiming) { + return; + } + + var count = effectCountInCurrentCommit; + effectCountInCurrentCommit = 0; + endMark('(Committing Host Effects: ' + count + ' Total)', '(Committing Host Effects)', null); + } + } + function startCommitLifeCyclesTimer() { + if (enableUserTimingAPI) { + if (!supportsUserTiming) { + return; + } + + effectCountInCurrentCommit = 0; + beginMark('(Calling Lifecycle Methods)'); + } + } + function stopCommitLifeCyclesTimer() { + if (enableUserTimingAPI) { + if (!supportsUserTiming) { + return; + } + + var count = effectCountInCurrentCommit; + effectCountInCurrentCommit = 0; + endMark( + '(Calling Lifecycle Methods: ' + count + ' Total)', + '(Calling Lifecycle Methods)', + null, + ); + } + } + + var valueStack = []; + var fiberStack; + + { + fiberStack = []; + } + + var index = -1; + + function createCursor(defaultValue) { + return { + current: defaultValue, + }; + } + + function pop(cursor, fiber) { + if (index < 0) { + { + warningWithoutStack$1(false, 'Unexpected pop.'); + } + + return; + } + + { + if (fiber !== fiberStack[index]) { + warningWithoutStack$1(false, 'Unexpected Fiber popped.'); + } + } + + cursor.current = valueStack[index]; + valueStack[index] = null; + + { + fiberStack[index] = null; + } + + index--; + } + + function push(cursor, value, fiber) { + index++; + valueStack[index] = cursor.current; + + { + fiberStack[index] = fiber; + } + + cursor.current = value; + } + + var warnedAboutMissingGetChildContext; + + { + warnedAboutMissingGetChildContext = {}; + } + + var emptyContextObject = {}; + + { + Object.freeze(emptyContextObject); + } // A cursor to the current merged context object on the stack. + + var contextStackCursor = createCursor(emptyContextObject); // A cursor to a boolean indicating whether the context has changed. + + var didPerformWorkStackCursor = createCursor(false); // Keep track of the previous context object that was on the stack. + // We use this to get access to the parent context after we have already + // pushed the next context provider, and now need to merge their contexts. + + var previousContext = emptyContextObject; + + function getUnmaskedContext(workInProgress, Component, didPushOwnContextIfProvider) { + if (disableLegacyContext) { + return emptyContextObject; + } else { + if (didPushOwnContextIfProvider && isContextProvider(Component)) { + // If the fiber is a context provider itself, when we read its context + // we may have already pushed its own child context on the stack. A context + // provider should not "see" its own child context. Therefore we read the + // previous (parent) context instead for a context provider. + return previousContext; + } + + return contextStackCursor.current; + } + } + + function cacheContext(workInProgress, unmaskedContext, maskedContext) { + if (disableLegacyContext) { + return; + } else { + var instance = workInProgress.stateNode; + instance.__reactInternalMemoizedUnmaskedChildContext = unmaskedContext; + instance.__reactInternalMemoizedMaskedChildContext = maskedContext; + } + } + + function getMaskedContext(workInProgress, unmaskedContext) { + if (disableLegacyContext) { + return emptyContextObject; + } else { + var type = workInProgress.type; + var contextTypes = type.contextTypes; + + if (!contextTypes) { + return emptyContextObject; + } // Avoid recreating masked context unless unmasked context has changed. + // Failing to do this will result in unnecessary calls to componentWillReceiveProps. + // This may trigger infinite loops if componentWillReceiveProps calls setState. + + var instance = workInProgress.stateNode; + + if (instance && instance.__reactInternalMemoizedUnmaskedChildContext === unmaskedContext) { + return instance.__reactInternalMemoizedMaskedChildContext; + } + + var context = {}; + + for (var key in contextTypes) { + context[key] = unmaskedContext[key]; + } + + { + var name = getComponentName(type) || 'Unknown'; + checkPropTypes(contextTypes, context, 'context', name, getCurrentFiberStackInDev); + } // Cache unmasked context so we can avoid recreating masked context unless necessary. + // Context is created before the class component is instantiated so check for instance. + + if (instance) { + cacheContext(workInProgress, unmaskedContext, context); + } + + return context; + } + } + + function hasContextChanged() { + if (disableLegacyContext) { + return false; + } else { + return didPerformWorkStackCursor.current; + } + } + + function isContextProvider(type) { + if (disableLegacyContext) { + return false; + } else { + var childContextTypes = type.childContextTypes; + return childContextTypes !== null && childContextTypes !== undefined; + } + } + + function popContext(fiber) { + if (disableLegacyContext) { + return; + } else { + pop(didPerformWorkStackCursor, fiber); + pop(contextStackCursor, fiber); + } + } + + function popTopLevelContextObject(fiber) { + if (disableLegacyContext) { + return; + } else { + pop(didPerformWorkStackCursor, fiber); + pop(contextStackCursor, fiber); + } + } + + function pushTopLevelContextObject(fiber, context, didChange) { + if (disableLegacyContext) { + return; + } else { + if (!(contextStackCursor.current === emptyContextObject)) { + { + throw Error( + 'Unexpected context found on stack. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + + push(contextStackCursor, context, fiber); + push(didPerformWorkStackCursor, didChange, fiber); + } + } + + function processChildContext(fiber, type, parentContext) { + if (disableLegacyContext) { + return parentContext; + } else { + var instance = fiber.stateNode; + var childContextTypes = type.childContextTypes; // TODO (bvaughn) Replace this behavior with an invariant() in the future. + // It has only been added in Fiber to match the (unintentional) behavior in Stack. + + if (typeof instance.getChildContext !== 'function') { + { + var componentName = getComponentName(type) || 'Unknown'; + + if (!warnedAboutMissingGetChildContext[componentName]) { + warnedAboutMissingGetChildContext[componentName] = true; + warningWithoutStack$1( + false, + '%s.childContextTypes is specified but there is no getChildContext() method ' + + 'on the instance. You can either define getChildContext() on %s or remove ' + + 'childContextTypes from it.', + componentName, + componentName, + ); + } + } + + return parentContext; + } + + var childContext; + + { + setCurrentPhase('getChildContext'); + } + + startPhaseTimer(fiber, 'getChildContext'); + childContext = instance.getChildContext(); + stopPhaseTimer(); + + { + setCurrentPhase(null); + } + + for (var contextKey in childContext) { + if (!(contextKey in childContextTypes)) { + { + throw Error( + (getComponentName(type) || 'Unknown') + + '.getChildContext(): key "' + + contextKey + + '" is not defined in childContextTypes.', + ); + } + } + } + + { + var name = getComponentName(type) || 'Unknown'; + checkPropTypes( + childContextTypes, + childContext, + 'child context', + name, // In practice, there is one case in which we won't get a stack. It's when + // somebody calls unstable_renderSubtreeIntoContainer() and we process + // context from the parent component instance. The stack will be missing + // because it's outside of the reconciliation, and so the pointer has not + // been set. This is rare and doesn't matter. We'll also remove that API. + getCurrentFiberStackInDev, + ); + } + + return _assign({}, parentContext, {}, childContext); + } + } + + function pushContextProvider(workInProgress) { + if (disableLegacyContext) { + return false; + } else { + var instance = workInProgress.stateNode; // We push the context as early as possible to ensure stack integrity. + // If the instance does not exist yet, we will push null at first, + // and replace it on the stack later when invalidating the context. + + var memoizedMergedChildContext = + (instance && instance.__reactInternalMemoizedMergedChildContext) || emptyContextObject; // Remember the parent context so we can merge with it later. + // Inherit the parent's did-perform-work value to avoid inadvertently blocking updates. + + previousContext = contextStackCursor.current; + push(contextStackCursor, memoizedMergedChildContext, workInProgress); + push(didPerformWorkStackCursor, didPerformWorkStackCursor.current, workInProgress); + return true; + } + } + + function invalidateContextProvider(workInProgress, type, didChange) { + if (disableLegacyContext) { + return; + } else { + var instance = workInProgress.stateNode; + + if (!instance) { + { + throw Error( + 'Expected to have an instance by this point. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + + if (didChange) { + // Merge parent and own context. + // Skip this if we're not updating due to sCU. + // This avoids unnecessarily recomputing memoized values. + var mergedContext = processChildContext(workInProgress, type, previousContext); + instance.__reactInternalMemoizedMergedChildContext = mergedContext; // Replace the old (or empty) context with the new one. + // It is important to unwind the context in the reverse order. + + pop(didPerformWorkStackCursor, workInProgress); + pop(contextStackCursor, workInProgress); // Now push the new context and mark that it has changed. + + push(contextStackCursor, mergedContext, workInProgress); + push(didPerformWorkStackCursor, didChange, workInProgress); + } else { + pop(didPerformWorkStackCursor, workInProgress); + push(didPerformWorkStackCursor, didChange, workInProgress); + } + } + } + + function findCurrentUnmaskedContext(fiber) { + if (disableLegacyContext) { + return emptyContextObject; + } else { + // Currently this is only used with renderSubtreeIntoContainer; not sure if it + // makes sense elsewhere + if (!(isFiberMounted(fiber) && fiber.tag === ClassComponent)) { + { + throw Error( + 'Expected subtree parent to be a mounted class component. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + + var node = fiber; + + do { + switch (node.tag) { + case HostRoot: + return node.stateNode.context; + + case ClassComponent: { + var Component = node.type; + + if (isContextProvider(Component)) { + return node.stateNode.__reactInternalMemoizedMergedChildContext; + } + + break; + } + } + + node = node.return; + } while (node !== null); + + { + { + throw Error( + 'Found unexpected detached subtree parent. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + } + } + + var LegacyRoot = 0; + var BlockingRoot = 1; + var ConcurrentRoot = 2; + + // Intentionally not named imports because Rollup would use dynamic dispatch for + // CommonJS interop named imports. + var Scheduler_runWithPriority = Scheduler.unstable_runWithPriority; + var Scheduler_scheduleCallback = Scheduler.unstable_scheduleCallback; + var Scheduler_cancelCallback = Scheduler.unstable_cancelCallback; + var Scheduler_shouldYield = Scheduler.unstable_shouldYield; + var Scheduler_requestPaint = Scheduler.unstable_requestPaint; + var Scheduler_now = Scheduler.unstable_now; + var Scheduler_getCurrentPriorityLevel = Scheduler.unstable_getCurrentPriorityLevel; + var Scheduler_ImmediatePriority = Scheduler.unstable_ImmediatePriority; + var Scheduler_UserBlockingPriority = Scheduler.unstable_UserBlockingPriority; + var Scheduler_NormalPriority = Scheduler.unstable_NormalPriority; + var Scheduler_LowPriority = Scheduler.unstable_LowPriority; + var Scheduler_IdlePriority = Scheduler.unstable_IdlePriority; + + if (enableSchedulerTracing) { + // Provide explicit error message when production+profiling bundle of e.g. + // react-dom is used with production (non-profiling) bundle of + // scheduler/tracing + if (!(tracing.__interactionsRef != null && tracing.__interactionsRef.current != null)) { + { + throw Error( + 'It is not supported to run the profiling version of a renderer (for example, `react-dom/profiling`) without also replacing the `scheduler/tracing` module with `scheduler/tracing-profiling`. Your bundler might have a setting for aliasing both modules. Learn more at http://fb.me/react-profiling', + ); + } + } + } + + var fakeCallbackNode = {}; // Except for NoPriority, these correspond to Scheduler priorities. We use + // ascending numbers so we can compare them like numbers. They start at 90 to + // avoid clashing with Scheduler's priorities. + + var ImmediatePriority = 99; + var UserBlockingPriority$2 = 98; + var NormalPriority = 97; + var LowPriority = 96; + var IdlePriority = 95; // NoPriority is the absence of priority. Also React-only. + + var NoPriority = 90; + var shouldYield = Scheduler_shouldYield; + var requestPaint = Scheduler_requestPaint !== undefined ? Scheduler_requestPaint : function () {}; // Fall back gracefully if we're running an older version of Scheduler. + var syncQueue = null; + var immediateQueueCallbackNode = null; + var isFlushingSyncQueue = false; + var initialTimeMs = Scheduler_now(); // If the initial timestamp is reasonably small, use Scheduler's `now` directly. + // This will be the case for modern browsers that support `performance.now`. In + // older browsers, Scheduler falls back to `Date.now`, which returns a Unix + // timestamp. In that case, subtract the module initialization time to simulate + // the behavior of performance.now and keep our times small enough to fit + // within 32 bits. + // TODO: Consider lifting this into Scheduler. + + var now = + initialTimeMs < 10000 + ? Scheduler_now + : function () { + return Scheduler_now() - initialTimeMs; + }; + function getCurrentPriorityLevel() { + switch (Scheduler_getCurrentPriorityLevel()) { + case Scheduler_ImmediatePriority: + return ImmediatePriority; + + case Scheduler_UserBlockingPriority: + return UserBlockingPriority$2; + + case Scheduler_NormalPriority: + return NormalPriority; + + case Scheduler_LowPriority: + return LowPriority; + + case Scheduler_IdlePriority: + return IdlePriority; + + default: { + { + throw Error('Unknown priority level.'); + } + } + } + } + + function reactPriorityToSchedulerPriority(reactPriorityLevel) { + switch (reactPriorityLevel) { + case ImmediatePriority: + return Scheduler_ImmediatePriority; + + case UserBlockingPriority$2: + return Scheduler_UserBlockingPriority; + + case NormalPriority: + return Scheduler_NormalPriority; + + case LowPriority: + return Scheduler_LowPriority; + + case IdlePriority: + return Scheduler_IdlePriority; + + default: { + { + throw Error('Unknown priority level.'); + } + } + } + } + + function runWithPriority$2(reactPriorityLevel, fn) { + var priorityLevel = reactPriorityToSchedulerPriority(reactPriorityLevel); + return Scheduler_runWithPriority(priorityLevel, fn); + } + function scheduleCallback(reactPriorityLevel, callback, options) { + var priorityLevel = reactPriorityToSchedulerPriority(reactPriorityLevel); + return Scheduler_scheduleCallback(priorityLevel, callback, options); + } + function scheduleSyncCallback(callback) { + // Push this callback into an internal queue. We'll flush these either in + // the next tick, or earlier if something calls `flushSyncCallbackQueue`. + if (syncQueue === null) { + syncQueue = [callback]; // Flush the queue in the next tick, at the earliest. + + immediateQueueCallbackNode = Scheduler_scheduleCallback( + Scheduler_ImmediatePriority, + flushSyncCallbackQueueImpl, + ); + } else { + // Push onto existing queue. Don't need to schedule a callback because + // we already scheduled one when we created the queue. + syncQueue.push(callback); + } + + return fakeCallbackNode; + } + function cancelCallback(callbackNode) { + if (callbackNode !== fakeCallbackNode) { + Scheduler_cancelCallback(callbackNode); + } + } + function flushSyncCallbackQueue() { + if (immediateQueueCallbackNode !== null) { + var node = immediateQueueCallbackNode; + immediateQueueCallbackNode = null; + Scheduler_cancelCallback(node); + } + + flushSyncCallbackQueueImpl(); + } + + function flushSyncCallbackQueueImpl() { + if (!isFlushingSyncQueue && syncQueue !== null) { + // Prevent re-entrancy. + isFlushingSyncQueue = true; + var i = 0; + + try { + var _isSync = true; + var queue = syncQueue; + runWithPriority$2(ImmediatePriority, function () { + for (; i < queue.length; i++) { + var callback = queue[i]; + + do { + callback = callback(_isSync); + } while (callback !== null); + } + }); + syncQueue = null; + } catch (error) { + // If something throws, leave the remaining callbacks on the queue. + if (syncQueue !== null) { + syncQueue = syncQueue.slice(i + 1); + } // Resume flushing in the next tick + + Scheduler_scheduleCallback(Scheduler_ImmediatePriority, flushSyncCallbackQueue); + throw error; + } finally { + isFlushingSyncQueue = false; + } + } + } + + var NoMode = 0; + var StrictMode = 1; // TODO: Remove BlockingMode and ConcurrentMode by reading from the root + // tag instead + + var BlockingMode = 2; + var ConcurrentMode = 4; + var ProfileMode = 8; + + // Max 31 bit integer. The max integer size in V8 for 32-bit systems. + // Math.pow(2, 30) - 1 + // 0b111111111111111111111111111111 + var MAX_SIGNED_31_BIT_INT = 1073741823; + + var NoWork = 0; // TODO: Think of a better name for Never. The key difference with Idle is that + // Never work can be committed in an inconsistent state without tearing the UI. + // The main example is offscreen content, like a hidden subtree. So one possible + // name is Offscreen. However, it also includes dehydrated Suspense boundaries, + // which are inconsistent in the sense that they haven't finished yet, but + // aren't visibly inconsistent because the server rendered HTML matches what the + // hydrated tree would look like. + + var Never = 1; // Idle is slightly higher priority than Never. It must completely finish in + // order to be consistent. + + var Idle = 2; // Continuous Hydration is a moving priority. It is slightly higher than Idle + // and is used to increase priority of hover targets. It is increasing with + // each usage so that last always wins. + + var ContinuousHydration = 3; + var Sync = MAX_SIGNED_31_BIT_INT; + var Batched = Sync - 1; + var UNIT_SIZE = 10; + var MAGIC_NUMBER_OFFSET = Batched - 1; // 1 unit of expiration time represents 10ms. + + function msToExpirationTime(ms) { + // Always add an offset so that we don't clash with the magic number for NoWork. + return MAGIC_NUMBER_OFFSET - ((ms / UNIT_SIZE) | 0); + } + function expirationTimeToMs(expirationTime) { + return (MAGIC_NUMBER_OFFSET - expirationTime) * UNIT_SIZE; + } + + function ceiling(num, precision) { + return (((num / precision) | 0) + 1) * precision; + } + + function computeExpirationBucket(currentTime, expirationInMs, bucketSizeMs) { + return ( + MAGIC_NUMBER_OFFSET - + ceiling( + MAGIC_NUMBER_OFFSET - currentTime + expirationInMs / UNIT_SIZE, + bucketSizeMs / UNIT_SIZE, + ) + ); + } // TODO: This corresponds to Scheduler's NormalPriority, not LowPriority. Update + // the names to reflect. + + var LOW_PRIORITY_EXPIRATION = 5000; + var LOW_PRIORITY_BATCH_SIZE = 250; + function computeAsyncExpiration(currentTime) { + return computeExpirationBucket(currentTime, LOW_PRIORITY_EXPIRATION, LOW_PRIORITY_BATCH_SIZE); + } + function computeSuspenseExpiration(currentTime, timeoutMs) { + // TODO: Should we warn if timeoutMs is lower than the normal pri expiration time? + return computeExpirationBucket(currentTime, timeoutMs, LOW_PRIORITY_BATCH_SIZE); + } // We intentionally set a higher expiration time for interactive updates in + // dev than in production. + // + // If the main thread is being blocked so long that you hit the expiration, + // it's a problem that could be solved with better scheduling. + // + // People will be more likely to notice this and fix it with the long + // expiration time in development. + // + // In production we opt for better UX at the risk of masking scheduling + // problems, by expiring fast. + + var HIGH_PRIORITY_EXPIRATION = 500; + var HIGH_PRIORITY_BATCH_SIZE = 100; + function computeInteractiveExpiration(currentTime) { + return computeExpirationBucket(currentTime, HIGH_PRIORITY_EXPIRATION, HIGH_PRIORITY_BATCH_SIZE); + } + function computeContinuousHydrationExpiration(currentTime) { + // Each time we ask for a new one of these we increase the priority. + // This ensures that the last one always wins since we can't deprioritize + // once we've scheduled work already. + return ContinuousHydration++; + } + function inferPriorityFromExpirationTime(currentTime, expirationTime) { + if (expirationTime === Sync) { + return ImmediatePriority; + } + + if (expirationTime === Never || expirationTime === Idle) { + return IdlePriority; + } + + var msUntil = expirationTimeToMs(expirationTime) - expirationTimeToMs(currentTime); + + if (msUntil <= 0) { + return ImmediatePriority; + } + + if (msUntil <= HIGH_PRIORITY_EXPIRATION + HIGH_PRIORITY_BATCH_SIZE) { + return UserBlockingPriority$2; + } + + if (msUntil <= LOW_PRIORITY_EXPIRATION + LOW_PRIORITY_BATCH_SIZE) { + return NormalPriority; + } // TODO: Handle LowPriority + // Assume anything lower has idle priority + + return IdlePriority; + } + + /** + * Forked from fbjs/warning: + * https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js + * + * Only change is we use console.warn instead of console.error, + * and do nothing when 'console' is not supported. + * This really simplifies the code. + * --- + * Similar to invariant but only logs a warning if the condition is not met. + * This can be used to log issues in development environments in critical + * paths. Removing the logging code for production environments will keep the + * same logic and follow the same code paths. + */ + var lowPriorityWarningWithoutStack = function () {}; + + { + var printWarning = function (format) { + for ( + var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; + _key < _len; + _key++ + ) { + args[_key - 1] = arguments[_key]; + } + + var argIndex = 0; + var message = + 'Warning: ' + + format.replace(/%s/g, function () { + return args[argIndex++]; + }); + + if (typeof console !== 'undefined') { + console.warn(message); + } + + try { + // --- Welcome to debugging React --- + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + throw new Error(message); + } catch (x) {} + }; + + lowPriorityWarningWithoutStack = function (condition, format) { + if (format === undefined) { + throw new Error( + '`lowPriorityWarningWithoutStack(condition, format, ...args)` requires a warning ' + + 'message argument', + ); + } + + if (!condition) { + for ( + var _len2 = arguments.length, args = new Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; + _key2 < _len2; + _key2++ + ) { + args[_key2 - 2] = arguments[_key2]; + } + + printWarning.apply(void 0, [format].concat(args)); + } + }; + } + + var lowPriorityWarningWithoutStack$1 = lowPriorityWarningWithoutStack; + + var ReactStrictModeWarnings = { + recordUnsafeLifecycleWarnings: function (fiber, instance) {}, + flushPendingUnsafeLifecycleWarnings: function () {}, + recordLegacyContextWarning: function (fiber, instance) {}, + flushLegacyContextWarning: function () {}, + discardPendingWarnings: function () {}, + }; + + { + var findStrictRoot = function (fiber) { + var maybeStrictRoot = null; + var node = fiber; + + while (node !== null) { + if (node.mode & StrictMode) { + maybeStrictRoot = node; + } + + node = node.return; + } + + return maybeStrictRoot; + }; + + var setToSortedString = function (set) { + var array = []; + set.forEach(function (value) { + array.push(value); + }); + return array.sort().join(', '); + }; + + var pendingComponentWillMountWarnings = []; + var pendingUNSAFE_ComponentWillMountWarnings = []; + var pendingComponentWillReceivePropsWarnings = []; + var pendingUNSAFE_ComponentWillReceivePropsWarnings = []; + var pendingComponentWillUpdateWarnings = []; + var pendingUNSAFE_ComponentWillUpdateWarnings = []; // Tracks components we have already warned about. + + var didWarnAboutUnsafeLifecycles = new Set(); + + ReactStrictModeWarnings.recordUnsafeLifecycleWarnings = function (fiber, instance) { + // Dedup strategy: Warn once per component. + if (didWarnAboutUnsafeLifecycles.has(fiber.type)) { + return; + } + + if ( + typeof instance.componentWillMount === 'function' && // Don't warn about react-lifecycles-compat polyfilled components. + instance.componentWillMount.__suppressDeprecationWarning !== true + ) { + pendingComponentWillMountWarnings.push(fiber); + } + + if (fiber.mode & StrictMode && typeof instance.UNSAFE_componentWillMount === 'function') { + pendingUNSAFE_ComponentWillMountWarnings.push(fiber); + } + + if ( + typeof instance.componentWillReceiveProps === 'function' && + instance.componentWillReceiveProps.__suppressDeprecationWarning !== true + ) { + pendingComponentWillReceivePropsWarnings.push(fiber); + } + + if ( + fiber.mode & StrictMode && + typeof instance.UNSAFE_componentWillReceiveProps === 'function' + ) { + pendingUNSAFE_ComponentWillReceivePropsWarnings.push(fiber); + } + + if ( + typeof instance.componentWillUpdate === 'function' && + instance.componentWillUpdate.__suppressDeprecationWarning !== true + ) { + pendingComponentWillUpdateWarnings.push(fiber); + } + + if (fiber.mode & StrictMode && typeof instance.UNSAFE_componentWillUpdate === 'function') { + pendingUNSAFE_ComponentWillUpdateWarnings.push(fiber); + } + }; + + ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings = function () { + // We do an initial pass to gather component names + var componentWillMountUniqueNames = new Set(); + + if (pendingComponentWillMountWarnings.length > 0) { + pendingComponentWillMountWarnings.forEach(function (fiber) { + componentWillMountUniqueNames.add(getComponentName(fiber.type) || 'Component'); + didWarnAboutUnsafeLifecycles.add(fiber.type); + }); + pendingComponentWillMountWarnings = []; + } + + var UNSAFE_componentWillMountUniqueNames = new Set(); + + if (pendingUNSAFE_ComponentWillMountWarnings.length > 0) { + pendingUNSAFE_ComponentWillMountWarnings.forEach(function (fiber) { + UNSAFE_componentWillMountUniqueNames.add(getComponentName(fiber.type) || 'Component'); + didWarnAboutUnsafeLifecycles.add(fiber.type); + }); + pendingUNSAFE_ComponentWillMountWarnings = []; + } + + var componentWillReceivePropsUniqueNames = new Set(); + + if (pendingComponentWillReceivePropsWarnings.length > 0) { + pendingComponentWillReceivePropsWarnings.forEach(function (fiber) { + componentWillReceivePropsUniqueNames.add(getComponentName(fiber.type) || 'Component'); + didWarnAboutUnsafeLifecycles.add(fiber.type); + }); + pendingComponentWillReceivePropsWarnings = []; + } + + var UNSAFE_componentWillReceivePropsUniqueNames = new Set(); + + if (pendingUNSAFE_ComponentWillReceivePropsWarnings.length > 0) { + pendingUNSAFE_ComponentWillReceivePropsWarnings.forEach(function (fiber) { + UNSAFE_componentWillReceivePropsUniqueNames.add( + getComponentName(fiber.type) || 'Component', + ); + didWarnAboutUnsafeLifecycles.add(fiber.type); + }); + pendingUNSAFE_ComponentWillReceivePropsWarnings = []; + } + + var componentWillUpdateUniqueNames = new Set(); + + if (pendingComponentWillUpdateWarnings.length > 0) { + pendingComponentWillUpdateWarnings.forEach(function (fiber) { + componentWillUpdateUniqueNames.add(getComponentName(fiber.type) || 'Component'); + didWarnAboutUnsafeLifecycles.add(fiber.type); + }); + pendingComponentWillUpdateWarnings = []; + } + + var UNSAFE_componentWillUpdateUniqueNames = new Set(); + + if (pendingUNSAFE_ComponentWillUpdateWarnings.length > 0) { + pendingUNSAFE_ComponentWillUpdateWarnings.forEach(function (fiber) { + UNSAFE_componentWillUpdateUniqueNames.add(getComponentName(fiber.type) || 'Component'); + didWarnAboutUnsafeLifecycles.add(fiber.type); + }); + pendingUNSAFE_ComponentWillUpdateWarnings = []; + } // Finally, we flush all the warnings + // UNSAFE_ ones before the deprecated ones, since they'll be 'louder' + + if (UNSAFE_componentWillMountUniqueNames.size > 0) { + var sortedNames = setToSortedString(UNSAFE_componentWillMountUniqueNames); + warningWithoutStack$1( + false, + 'Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. ' + + 'See https://fb.me/react-unsafe-component-lifecycles for details.\n\n' + + '* Move code with side effects to componentDidMount, and set initial state in the constructor.\n' + + '\nPlease update the following components: %s', + sortedNames, + ); + } + + if (UNSAFE_componentWillReceivePropsUniqueNames.size > 0) { + var _sortedNames = setToSortedString(UNSAFE_componentWillReceivePropsUniqueNames); + + warningWithoutStack$1( + false, + 'Using UNSAFE_componentWillReceiveProps in strict mode is not recommended ' + + 'and may indicate bugs in your code. ' + + 'See https://fb.me/react-unsafe-component-lifecycles for details.\n\n' + + '* Move data fetching code or side effects to componentDidUpdate.\n' + + "* If you're updating state whenever props change, " + + 'refactor your code to use memoization techniques or move it to ' + + 'static getDerivedStateFromProps. Learn more at: https://fb.me/react-derived-state\n' + + '\nPlease update the following components: %s', + _sortedNames, + ); + } + + if (UNSAFE_componentWillUpdateUniqueNames.size > 0) { + var _sortedNames2 = setToSortedString(UNSAFE_componentWillUpdateUniqueNames); + + warningWithoutStack$1( + false, + 'Using UNSAFE_componentWillUpdate in strict mode is not recommended ' + + 'and may indicate bugs in your code. ' + + 'See https://fb.me/react-unsafe-component-lifecycles for details.\n\n' + + '* Move data fetching code or side effects to componentDidUpdate.\n' + + '\nPlease update the following components: %s', + _sortedNames2, + ); + } + + if (componentWillMountUniqueNames.size > 0) { + var _sortedNames3 = setToSortedString(componentWillMountUniqueNames); + + lowPriorityWarningWithoutStack$1( + false, + 'componentWillMount has been renamed, and is not recommended for use. ' + + 'See https://fb.me/react-unsafe-component-lifecycles for details.\n\n' + + '* Move code with side effects to componentDidMount, and set initial state in the constructor.\n' + + '* Rename componentWillMount to UNSAFE_componentWillMount to suppress ' + + 'this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. ' + + 'To rename all deprecated lifecycles to their new names, you can run ' + + '`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n' + + '\nPlease update the following components: %s', + _sortedNames3, + ); + } + + if (componentWillReceivePropsUniqueNames.size > 0) { + var _sortedNames4 = setToSortedString(componentWillReceivePropsUniqueNames); + + lowPriorityWarningWithoutStack$1( + false, + 'componentWillReceiveProps has been renamed, and is not recommended for use. ' + + 'See https://fb.me/react-unsafe-component-lifecycles for details.\n\n' + + '* Move data fetching code or side effects to componentDidUpdate.\n' + + "* If you're updating state whenever props change, refactor your " + + 'code to use memoization techniques or move it to ' + + 'static getDerivedStateFromProps. Learn more at: https://fb.me/react-derived-state\n' + + '* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress ' + + 'this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. ' + + 'To rename all deprecated lifecycles to their new names, you can run ' + + '`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n' + + '\nPlease update the following components: %s', + _sortedNames4, + ); + } + + if (componentWillUpdateUniqueNames.size > 0) { + var _sortedNames5 = setToSortedString(componentWillUpdateUniqueNames); + + lowPriorityWarningWithoutStack$1( + false, + 'componentWillUpdate has been renamed, and is not recommended for use. ' + + 'See https://fb.me/react-unsafe-component-lifecycles for details.\n\n' + + '* Move data fetching code or side effects to componentDidUpdate.\n' + + '* Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress ' + + 'this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. ' + + 'To rename all deprecated lifecycles to their new names, you can run ' + + '`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n' + + '\nPlease update the following components: %s', + _sortedNames5, + ); + } + }; + + var pendingLegacyContextWarning = new Map(); // Tracks components we have already warned about. + + var didWarnAboutLegacyContext = new Set(); + + ReactStrictModeWarnings.recordLegacyContextWarning = function (fiber, instance) { + var strictRoot = findStrictRoot(fiber); + + if (strictRoot === null) { + warningWithoutStack$1( + false, + 'Expected to find a StrictMode component in a strict mode tree. ' + + 'This error is likely caused by a bug in React. Please file an issue.', + ); + return; + } // Dedup strategy: Warn once per component. + + if (didWarnAboutLegacyContext.has(fiber.type)) { + return; + } + + var warningsForRoot = pendingLegacyContextWarning.get(strictRoot); + + if ( + fiber.type.contextTypes != null || + fiber.type.childContextTypes != null || + (instance !== null && typeof instance.getChildContext === 'function') + ) { + if (warningsForRoot === undefined) { + warningsForRoot = []; + pendingLegacyContextWarning.set(strictRoot, warningsForRoot); + } + + warningsForRoot.push(fiber); + } + }; + + ReactStrictModeWarnings.flushLegacyContextWarning = function () { + pendingLegacyContextWarning.forEach(function (fiberArray, strictRoot) { + var uniqueNames = new Set(); + fiberArray.forEach(function (fiber) { + uniqueNames.add(getComponentName(fiber.type) || 'Component'); + didWarnAboutLegacyContext.add(fiber.type); + }); + var sortedNames = setToSortedString(uniqueNames); + var strictRootComponentStack = getStackByFiberInDevAndProd(strictRoot); + warningWithoutStack$1( + false, + 'Legacy context API has been detected within a strict-mode tree.' + + '\n\nThe old API will be supported in all 16.x releases, but applications ' + + 'using it should migrate to the new version.' + + '\n\nPlease update the following components: %s' + + '\n\nLearn more about this warning here: https://fb.me/react-legacy-context' + + '%s', + sortedNames, + strictRootComponentStack, + ); + }); + }; + + ReactStrictModeWarnings.discardPendingWarnings = function () { + pendingComponentWillMountWarnings = []; + pendingUNSAFE_ComponentWillMountWarnings = []; + pendingComponentWillReceivePropsWarnings = []; + pendingUNSAFE_ComponentWillReceivePropsWarnings = []; + pendingComponentWillUpdateWarnings = []; + pendingUNSAFE_ComponentWillUpdateWarnings = []; + pendingLegacyContextWarning = new Map(); + }; + } + + var resolveFamily = null; // $FlowFixMe Flow gets confused by a WeakSet feature check below. + + var failedBoundaries = null; + var setRefreshHandler = function (handler) { + { + resolveFamily = handler; + } + }; + function resolveFunctionForHotReloading(type) { + { + if (resolveFamily === null) { + // Hot reloading is disabled. + return type; + } + + var family = resolveFamily(type); + + if (family === undefined) { + return type; + } // Use the latest known implementation. + + return family.current; + } + } + function resolveClassForHotReloading(type) { + // No implementation differences. + return resolveFunctionForHotReloading(type); + } + function resolveForwardRefForHotReloading(type) { + { + if (resolveFamily === null) { + // Hot reloading is disabled. + return type; + } + + var family = resolveFamily(type); + + if (family === undefined) { + // Check if we're dealing with a real forwardRef. Don't want to crash early. + if (type !== null && type !== undefined && typeof type.render === 'function') { + // ForwardRef is special because its resolved .type is an object, + // but it's possible that we only have its inner render function in the map. + // If that inner render function is different, we'll build a new forwardRef type. + var currentRender = resolveFunctionForHotReloading(type.render); + + if (type.render !== currentRender) { + var syntheticType = { + $$typeof: REACT_FORWARD_REF_TYPE, + render: currentRender, + }; + + if (type.displayName !== undefined) { + syntheticType.displayName = type.displayName; + } + + return syntheticType; + } + } + + return type; + } // Use the latest known implementation. + + return family.current; + } + } + function isCompatibleFamilyForHotReloading(fiber, element) { + { + if (resolveFamily === null) { + // Hot reloading is disabled. + return false; + } + + var prevType = fiber.elementType; + var nextType = element.type; // If we got here, we know types aren't === equal. + + var needsCompareFamilies = false; + var $$typeofNextType = + typeof nextType === 'object' && nextType !== null ? nextType.$$typeof : null; + + switch (fiber.tag) { + case ClassComponent: { + if (typeof nextType === 'function') { + needsCompareFamilies = true; + } + + break; + } + + case FunctionComponent: { + if (typeof nextType === 'function') { + needsCompareFamilies = true; + } else if ($$typeofNextType === REACT_LAZY_TYPE) { + // We don't know the inner type yet. + // We're going to assume that the lazy inner type is stable, + // and so it is sufficient to avoid reconciling it away. + // We're not going to unwrap or actually use the new lazy type. + needsCompareFamilies = true; + } + + break; + } + + case ForwardRef: { + if ($$typeofNextType === REACT_FORWARD_REF_TYPE) { + needsCompareFamilies = true; + } else if ($$typeofNextType === REACT_LAZY_TYPE) { + needsCompareFamilies = true; + } + + break; + } + + case MemoComponent: + case SimpleMemoComponent: { + if ($$typeofNextType === REACT_MEMO_TYPE) { + // TODO: if it was but can no longer be simple, + // we shouldn't set this. + needsCompareFamilies = true; + } else if ($$typeofNextType === REACT_LAZY_TYPE) { + needsCompareFamilies = true; + } + + break; + } + + default: + return false; + } // Check if both types have a family and it's the same one. + + if (needsCompareFamilies) { + // Note: memo() and forwardRef() we'll compare outer rather than inner type. + // This means both of them need to be registered to preserve state. + // If we unwrapped and compared the inner types for wrappers instead, + // then we would risk falsely saying two separate memo(Foo) + // calls are equivalent because they wrap the same Foo function. + var prevFamily = resolveFamily(prevType); + + if (prevFamily !== undefined && prevFamily === resolveFamily(nextType)) { + return true; + } + } + + return false; + } + } + function markFailedErrorBoundaryForHotReloading(fiber) { + { + if (resolveFamily === null) { + // Hot reloading is disabled. + return; + } + + if (typeof WeakSet !== 'function') { + return; + } + + if (failedBoundaries === null) { + failedBoundaries = new WeakSet(); + } + + failedBoundaries.add(fiber); + } + } + var scheduleRefresh = function (root, update) { + { + if (resolveFamily === null) { + // Hot reloading is disabled. + return; + } + + var staleFamilies = update.staleFamilies, + updatedFamilies = update.updatedFamilies; + flushPassiveEffects(); + flushSync(function () { + scheduleFibersWithFamiliesRecursively(root.current, updatedFamilies, staleFamilies); + }); + } + }; + var scheduleRoot = function (root, element) { + { + if (root.context !== emptyContextObject) { + // Super edge case: root has a legacy _renderSubtree context + // but we don't know the parentComponent so we can't pass it. + // Just ignore. We'll delete this with _renderSubtree code path later. + return; + } + + flushPassiveEffects(); + syncUpdates(function () { + updateContainer(element, root, null, null); + }); + } + }; + + function scheduleFibersWithFamiliesRecursively(fiber, updatedFamilies, staleFamilies) { + { + var alternate = fiber.alternate, + child = fiber.child, + sibling = fiber.sibling, + tag = fiber.tag, + type = fiber.type; + var candidateType = null; + + switch (tag) { + case FunctionComponent: + case SimpleMemoComponent: + case ClassComponent: + candidateType = type; + break; + + case ForwardRef: + candidateType = type.render; + break; + + default: + break; + } + + if (resolveFamily === null) { + throw new Error('Expected resolveFamily to be set during hot reload.'); + } + + var needsRender = false; + var needsRemount = false; + + if (candidateType !== null) { + var family = resolveFamily(candidateType); + + if (family !== undefined) { + if (staleFamilies.has(family)) { + needsRemount = true; + } else if (updatedFamilies.has(family)) { + if (tag === ClassComponent) { + needsRemount = true; + } else { + needsRender = true; + } + } + } + } + + if (failedBoundaries !== null) { + if (failedBoundaries.has(fiber) || (alternate !== null && failedBoundaries.has(alternate))) { + needsRemount = true; + } + } + + if (needsRemount) { + fiber._debugNeedsRemount = true; + } + + if (needsRemount || needsRender) { + scheduleWork(fiber, Sync); + } + + if (child !== null && !needsRemount) { + scheduleFibersWithFamiliesRecursively(child, updatedFamilies, staleFamilies); + } + + if (sibling !== null) { + scheduleFibersWithFamiliesRecursively(sibling, updatedFamilies, staleFamilies); + } + } + } + + var findHostInstancesForRefresh = function (root, families) { + { + var hostInstances = new Set(); + var types = new Set( + families.map(function (family) { + return family.current; + }), + ); + findHostInstancesForMatchingFibersRecursively(root.current, types, hostInstances); + return hostInstances; + } + }; + + function findHostInstancesForMatchingFibersRecursively(fiber, types, hostInstances) { + { + var child = fiber.child, + sibling = fiber.sibling, + tag = fiber.tag, + type = fiber.type; + var candidateType = null; + + switch (tag) { + case FunctionComponent: + case SimpleMemoComponent: + case ClassComponent: + candidateType = type; + break; + + case ForwardRef: + candidateType = type.render; + break; + + default: + break; + } + + var didMatch = false; + + if (candidateType !== null) { + if (types.has(candidateType)) { + didMatch = true; + } + } + + if (didMatch) { + // We have a match. This only drills down to the closest host components. + // There's no need to search deeper because for the purpose of giving + // visual feedback, "flashing" outermost parent rectangles is sufficient. + findHostInstancesForFiberShallowly(fiber, hostInstances); + } else { + // If there's no match, maybe there will be one further down in the child tree. + if (child !== null) { + findHostInstancesForMatchingFibersRecursively(child, types, hostInstances); + } + } + + if (sibling !== null) { + findHostInstancesForMatchingFibersRecursively(sibling, types, hostInstances); + } + } + } + + function findHostInstancesForFiberShallowly(fiber, hostInstances) { + { + var foundHostInstances = findChildHostInstancesForFiberShallowly(fiber, hostInstances); + + if (foundHostInstances) { + return; + } // If we didn't find any host children, fallback to closest host parent. + + var node = fiber; + + while (true) { + switch (node.tag) { + case HostComponent: + hostInstances.add(node.stateNode); + return; + + case HostPortal: + hostInstances.add(node.stateNode.containerInfo); + return; + + case HostRoot: + hostInstances.add(node.stateNode.containerInfo); + return; + } + + if (node.return === null) { + throw new Error('Expected to reach root first.'); + } + + node = node.return; + } + } + } + + function findChildHostInstancesForFiberShallowly(fiber, hostInstances) { + { + var node = fiber; + var foundHostInstances = false; + + while (true) { + if (node.tag === HostComponent) { + // We got a match. + foundHostInstances = true; + hostInstances.add(node.stateNode); // There may still be more, so keep searching. + } else if (node.child !== null) { + node.child.return = node; + node = node.child; + continue; + } + + if (node === fiber) { + return foundHostInstances; + } + + while (node.sibling === null) { + if (node.return === null || node.return === fiber) { + return foundHostInstances; + } + + node = node.return; + } + + node.sibling.return = node.return; + node = node.sibling; + } + } + + return false; + } + + function resolveDefaultProps(Component, baseProps) { + if (Component && Component.defaultProps) { + // Resolve default props. Taken from ReactElement + var props = _assign({}, baseProps); + + var defaultProps = Component.defaultProps; + + for (var propName in defaultProps) { + if (props[propName] === undefined) { + props[propName] = defaultProps[propName]; + } + } + + return props; + } + + return baseProps; + } + function readLazyComponentType(lazyComponent) { + initializeLazyComponentType(lazyComponent); + + if (lazyComponent._status !== Resolved) { + throw lazyComponent._result; + } + + return lazyComponent._result; + } + + var valueCursor = createCursor(null); + var rendererSigil; + + { + // Use this to detect multiple renderers using the same context + rendererSigil = {}; + } + + var currentlyRenderingFiber = null; + var lastContextDependency = null; + var lastContextWithAllBitsObserved = null; + var isDisallowedContextReadInDEV = false; + function resetContextDependencies() { + // This is called right before React yields execution, to ensure `readContext` + // cannot be called outside the render phase. + currentlyRenderingFiber = null; + lastContextDependency = null; + lastContextWithAllBitsObserved = null; + + { + isDisallowedContextReadInDEV = false; + } + } + function enterDisallowedContextReadInDEV() { + { + isDisallowedContextReadInDEV = true; + } + } + function exitDisallowedContextReadInDEV() { + { + isDisallowedContextReadInDEV = false; + } + } + function pushProvider(providerFiber, nextValue) { + var context = providerFiber.type._context; + + if (isPrimaryRenderer) { + push(valueCursor, context._currentValue, providerFiber); + context._currentValue = nextValue; + + { + !( + context._currentRenderer === undefined || + context._currentRenderer === null || + context._currentRenderer === rendererSigil + ) + ? warningWithoutStack$1( + false, + 'Detected multiple renderers concurrently rendering the ' + + 'same context provider. This is currently unsupported.', + ) + : void 0; + context._currentRenderer = rendererSigil; + } + } else { + push(valueCursor, context._currentValue2, providerFiber); + context._currentValue2 = nextValue; + + { + !( + context._currentRenderer2 === undefined || + context._currentRenderer2 === null || + context._currentRenderer2 === rendererSigil + ) + ? warningWithoutStack$1( + false, + 'Detected multiple renderers concurrently rendering the ' + + 'same context provider. This is currently unsupported.', + ) + : void 0; + context._currentRenderer2 = rendererSigil; + } + } + } + function popProvider(providerFiber) { + var currentValue = valueCursor.current; + pop(valueCursor, providerFiber); + var context = providerFiber.type._context; + + if (isPrimaryRenderer) { + context._currentValue = currentValue; + } else { + context._currentValue2 = currentValue; + } + } + function calculateChangedBits(context, newValue, oldValue) { + if (is$1(oldValue, newValue)) { + // No change + return 0; + } else { + var changedBits = + typeof context._calculateChangedBits === 'function' + ? context._calculateChangedBits(oldValue, newValue) + : MAX_SIGNED_31_BIT_INT; + + { + !((changedBits & MAX_SIGNED_31_BIT_INT) === changedBits) + ? warning$1( + false, + 'calculateChangedBits: Expected the return value to be a ' + + '31-bit integer. Instead received: %s', + changedBits, + ) + : void 0; + } + + return changedBits | 0; + } + } + function scheduleWorkOnParentPath(parent, renderExpirationTime) { + // Update the child expiration time of all the ancestors, including + // the alternates. + var node = parent; + + while (node !== null) { + var alternate = node.alternate; + + if (node.childExpirationTime < renderExpirationTime) { + node.childExpirationTime = renderExpirationTime; + + if (alternate !== null && alternate.childExpirationTime < renderExpirationTime) { + alternate.childExpirationTime = renderExpirationTime; + } + } else if (alternate !== null && alternate.childExpirationTime < renderExpirationTime) { + alternate.childExpirationTime = renderExpirationTime; + } else { + // Neither alternate was updated, which means the rest of the + // ancestor path already has sufficient priority. + break; + } + + node = node.return; + } + } + function propagateContextChange(workInProgress, context, changedBits, renderExpirationTime) { + var fiber = workInProgress.child; + + if (fiber !== null) { + // Set the return pointer of the child to the work-in-progress fiber. + fiber.return = workInProgress; + } + + while (fiber !== null) { + var nextFiber = void 0; // Visit this fiber. + + var list = fiber.dependencies; + + if (list !== null) { + nextFiber = fiber.child; + var dependency = list.firstContext; + + while (dependency !== null) { + // Check if the context matches. + if (dependency.context === context && (dependency.observedBits & changedBits) !== 0) { + // Match! Schedule an update on this fiber. + if (fiber.tag === ClassComponent) { + // Schedule a force update on the work-in-progress. + var update = createUpdate(renderExpirationTime, null); + update.tag = ForceUpdate; // TODO: Because we don't have a work-in-progress, this will add the + // update to the current fiber, too, which means it will persist even if + // this render is thrown away. Since it's a race condition, not sure it's + // worth fixing. + + enqueueUpdate(fiber, update); + } + + if (fiber.expirationTime < renderExpirationTime) { + fiber.expirationTime = renderExpirationTime; + } + + var alternate = fiber.alternate; + + if (alternate !== null && alternate.expirationTime < renderExpirationTime) { + alternate.expirationTime = renderExpirationTime; + } + + scheduleWorkOnParentPath(fiber.return, renderExpirationTime); // Mark the expiration time on the list, too. + + if (list.expirationTime < renderExpirationTime) { + list.expirationTime = renderExpirationTime; + } // Since we already found a match, we can stop traversing the + // dependency list. + + break; + } + + dependency = dependency.next; + } + } else if (fiber.tag === ContextProvider) { + // Don't scan deeper if this is a matching provider + nextFiber = fiber.type === workInProgress.type ? null : fiber.child; + } else if (enableSuspenseServerRenderer && fiber.tag === DehydratedFragment) { + // If a dehydrated suspense bounudary is in this subtree, we don't know + // if it will have any context consumers in it. The best we can do is + // mark it as having updates. + var parentSuspense = fiber.return; + + if (!(parentSuspense !== null)) { + { + throw Error( + 'We just came from a parent so we must have had a parent. This is a bug in React.', + ); + } + } + + if (parentSuspense.expirationTime < renderExpirationTime) { + parentSuspense.expirationTime = renderExpirationTime; + } + + var _alternate = parentSuspense.alternate; + + if (_alternate !== null && _alternate.expirationTime < renderExpirationTime) { + _alternate.expirationTime = renderExpirationTime; + } // This is intentionally passing this fiber as the parent + // because we want to schedule this fiber as having work + // on its children. We'll use the childExpirationTime on + // this fiber to indicate that a context has changed. + + scheduleWorkOnParentPath(parentSuspense, renderExpirationTime); + nextFiber = fiber.sibling; + } else { + // Traverse down. + nextFiber = fiber.child; + } + + if (nextFiber !== null) { + // Set the return pointer of the child to the work-in-progress fiber. + nextFiber.return = fiber; + } else { + // No child. Traverse to next sibling. + nextFiber = fiber; + + while (nextFiber !== null) { + if (nextFiber === workInProgress) { + // We're back to the root of this subtree. Exit. + nextFiber = null; + break; + } + + var sibling = nextFiber.sibling; + + if (sibling !== null) { + // Set the return pointer of the sibling to the work-in-progress fiber. + sibling.return = nextFiber.return; + nextFiber = sibling; + break; + } // No more siblings. Traverse up. + + nextFiber = nextFiber.return; + } + } + + fiber = nextFiber; + } + } + function prepareToReadContext(workInProgress, renderExpirationTime) { + currentlyRenderingFiber = workInProgress; + lastContextDependency = null; + lastContextWithAllBitsObserved = null; + var dependencies = workInProgress.dependencies; + + if (dependencies !== null) { + var firstContext = dependencies.firstContext; + + if (firstContext !== null) { + if (dependencies.expirationTime >= renderExpirationTime) { + // Context list has a pending update. Mark that this fiber performed work. + markWorkInProgressReceivedUpdate(); + } // Reset the work-in-progress list + + dependencies.firstContext = null; + } + } + } + function readContext(context, observedBits) { + { + // This warning would fire if you read context inside a Hook like useMemo. + // Unlike the class check below, it's not enforced in production for perf. + !!isDisallowedContextReadInDEV + ? warning$1( + false, + 'Context can only be read while React is rendering. ' + + 'In classes, you can read it in the render method or getDerivedStateFromProps. ' + + 'In function components, you can read it directly in the function body, but not ' + + 'inside Hooks like useReducer() or useMemo().', + ) + : void 0; + } + + if (lastContextWithAllBitsObserved === context) { + // Nothing to do. We already observe everything in this context. + } else if (observedBits === false || observedBits === 0) { + // Do not observe any updates. + } else { + var resolvedObservedBits; // Avoid deopting on observable arguments or heterogeneous types. + + if (typeof observedBits !== 'number' || observedBits === MAX_SIGNED_31_BIT_INT) { + // Observe all updates. + lastContextWithAllBitsObserved = context; + resolvedObservedBits = MAX_SIGNED_31_BIT_INT; + } else { + resolvedObservedBits = observedBits; + } + + var contextItem = { + context: context, + observedBits: resolvedObservedBits, + next: null, + }; + + if (lastContextDependency === null) { + if (!(currentlyRenderingFiber !== null)) { + { + throw Error( + 'Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().', + ); + } + } // This is the first dependency for this component. Create a new list. + + lastContextDependency = contextItem; + currentlyRenderingFiber.dependencies = { + expirationTime: NoWork, + firstContext: contextItem, + responders: null, + }; + } else { + // Append a new context item. + lastContextDependency = lastContextDependency.next = contextItem; + } + } + + return isPrimaryRenderer ? context._currentValue : context._currentValue2; + } + + // UpdateQueue is a linked list of prioritized updates. + // + // Like fibers, update queues come in pairs: a current queue, which represents + // the visible state of the screen, and a work-in-progress queue, which can be + // mutated and processed asynchronously before it is committed — a form of + // double buffering. If a work-in-progress render is discarded before finishing, + // we create a new work-in-progress by cloning the current queue. + // + // Both queues share a persistent, singly-linked list structure. To schedule an + // update, we append it to the end of both queues. Each queue maintains a + // pointer to first update in the persistent list that hasn't been processed. + // The work-in-progress pointer always has a position equal to or greater than + // the current queue, since we always work on that one. The current queue's + // pointer is only updated during the commit phase, when we swap in the + // work-in-progress. + // + // For example: + // + // Current pointer: A - B - C - D - E - F + // Work-in-progress pointer: D - E - F + // ^ + // The work-in-progress queue has + // processed more updates than current. + // + // The reason we append to both queues is because otherwise we might drop + // updates without ever processing them. For example, if we only add updates to + // the work-in-progress queue, some updates could be lost whenever a work-in + // -progress render restarts by cloning from current. Similarly, if we only add + // updates to the current queue, the updates will be lost whenever an already + // in-progress queue commits and swaps with the current queue. However, by + // adding to both queues, we guarantee that the update will be part of the next + // work-in-progress. (And because the work-in-progress queue becomes the + // current queue once it commits, there's no danger of applying the same + // update twice.) + // + // Prioritization + // -------------- + // + // Updates are not sorted by priority, but by insertion; new updates are always + // appended to the end of the list. + // + // The priority is still important, though. When processing the update queue + // during the render phase, only the updates with sufficient priority are + // included in the result. If we skip an update because it has insufficient + // priority, it remains in the queue to be processed later, during a lower + // priority render. Crucially, all updates subsequent to a skipped update also + // remain in the queue *regardless of their priority*. That means high priority + // updates are sometimes processed twice, at two separate priorities. We also + // keep track of a base state, that represents the state before the first + // update in the queue is applied. + // + // For example: + // + // Given a base state of '', and the following queue of updates + // + // A1 - B2 - C1 - D2 + // + // where the number indicates the priority, and the update is applied to the + // previous state by appending a letter, React will process these updates as + // two separate renders, one per distinct priority level: + // + // First render, at priority 1: + // Base state: '' + // Updates: [A1, C1] + // Result state: 'AC' + // + // Second render, at priority 2: + // Base state: 'A' <- The base state does not include C1, + // because B2 was skipped. + // Updates: [B2, C1, D2] <- C1 was rebased on top of B2 + // Result state: 'ABCD' + // + // Because we process updates in insertion order, and rebase high priority + // updates when preceding updates are skipped, the final result is deterministic + // regardless of priority. Intermediate state may vary according to system + // resources, but the final state is always the same. + var UpdateState = 0; + var ReplaceState = 1; + var ForceUpdate = 2; + var CaptureUpdate = 3; // Global state that is reset at the beginning of calling `processUpdateQueue`. + // It should only be read right after calling `processUpdateQueue`, via + // `checkHasForceUpdateAfterProcessing`. + + var hasForceUpdate = false; + var didWarnUpdateInsideUpdate; + var currentlyProcessingQueue; + + { + didWarnUpdateInsideUpdate = false; + currentlyProcessingQueue = null; + } + + function createUpdateQueue(baseState) { + var queue = { + baseState: baseState, + firstUpdate: null, + lastUpdate: null, + firstCapturedUpdate: null, + lastCapturedUpdate: null, + firstEffect: null, + lastEffect: null, + firstCapturedEffect: null, + lastCapturedEffect: null, + }; + return queue; + } + + function cloneUpdateQueue(currentQueue) { + var queue = { + baseState: currentQueue.baseState, + firstUpdate: currentQueue.firstUpdate, + lastUpdate: currentQueue.lastUpdate, + // TODO: With resuming, if we bail out and resuse the child tree, we should + // keep these effects. + firstCapturedUpdate: null, + lastCapturedUpdate: null, + firstEffect: null, + lastEffect: null, + firstCapturedEffect: null, + lastCapturedEffect: null, + }; + return queue; + } + + function createUpdate(expirationTime, suspenseConfig) { + var update = { + expirationTime: expirationTime, + suspenseConfig: suspenseConfig, + tag: UpdateState, + payload: null, + callback: null, + next: null, + nextEffect: null, + }; + + { + update.priority = getCurrentPriorityLevel(); + } + + return update; + } + + function appendUpdateToQueue(queue, update) { + // Append the update to the end of the list. + if (queue.lastUpdate === null) { + // Queue is empty + queue.firstUpdate = queue.lastUpdate = update; + } else { + queue.lastUpdate.next = update; + queue.lastUpdate = update; + } + } + + function enqueueUpdate(fiber, update) { + // Update queues are created lazily. + var alternate = fiber.alternate; + var queue1; + var queue2; + + if (alternate === null) { + // There's only one fiber. + queue1 = fiber.updateQueue; + queue2 = null; + + if (queue1 === null) { + queue1 = fiber.updateQueue = createUpdateQueue(fiber.memoizedState); + } + } else { + // There are two owners. + queue1 = fiber.updateQueue; + queue2 = alternate.updateQueue; + + if (queue1 === null) { + if (queue2 === null) { + // Neither fiber has an update queue. Create new ones. + queue1 = fiber.updateQueue = createUpdateQueue(fiber.memoizedState); + queue2 = alternate.updateQueue = createUpdateQueue(alternate.memoizedState); + } else { + // Only one fiber has an update queue. Clone to create a new one. + queue1 = fiber.updateQueue = cloneUpdateQueue(queue2); + } + } else { + if (queue2 === null) { + // Only one fiber has an update queue. Clone to create a new one. + queue2 = alternate.updateQueue = cloneUpdateQueue(queue1); + } else { + // Both owners have an update queue. + } + } + } + + if (queue2 === null || queue1 === queue2) { + // There's only a single queue. + appendUpdateToQueue(queue1, update); + } else { + // There are two queues. We need to append the update to both queues, + // while accounting for the persistent structure of the list — we don't + // want the same update to be added multiple times. + if (queue1.lastUpdate === null || queue2.lastUpdate === null) { + // One of the queues is not empty. We must add the update to both queues. + appendUpdateToQueue(queue1, update); + appendUpdateToQueue(queue2, update); + } else { + // Both queues are non-empty. The last update is the same in both lists, + // because of structural sharing. So, only append to one of the lists. + appendUpdateToQueue(queue1, update); // But we still need to update the `lastUpdate` pointer of queue2. + + queue2.lastUpdate = update; + } + } + + { + if ( + fiber.tag === ClassComponent && + (currentlyProcessingQueue === queue1 || + (queue2 !== null && currentlyProcessingQueue === queue2)) && + !didWarnUpdateInsideUpdate + ) { + warningWithoutStack$1( + false, + 'An update (setState, replaceState, or forceUpdate) was scheduled ' + + 'from inside an update function. Update functions should be pure, ' + + 'with zero side-effects. Consider using componentDidUpdate or a ' + + 'callback.', + ); + didWarnUpdateInsideUpdate = true; + } + } + } + function enqueueCapturedUpdate(workInProgress, update) { + // Captured updates go into a separate list, and only on the work-in- + // progress queue. + var workInProgressQueue = workInProgress.updateQueue; + + if (workInProgressQueue === null) { + workInProgressQueue = workInProgress.updateQueue = createUpdateQueue( + workInProgress.memoizedState, + ); + } else { + // TODO: I put this here rather than createWorkInProgress so that we don't + // clone the queue unnecessarily. There's probably a better way to + // structure this. + workInProgressQueue = ensureWorkInProgressQueueIsAClone(workInProgress, workInProgressQueue); + } // Append the update to the end of the list. + + if (workInProgressQueue.lastCapturedUpdate === null) { + // This is the first render phase update + workInProgressQueue.firstCapturedUpdate = workInProgressQueue.lastCapturedUpdate = update; + } else { + workInProgressQueue.lastCapturedUpdate.next = update; + workInProgressQueue.lastCapturedUpdate = update; + } + } + + function ensureWorkInProgressQueueIsAClone(workInProgress, queue) { + var current = workInProgress.alternate; + + if (current !== null) { + // If the work-in-progress queue is equal to the current queue, + // we need to clone it first. + if (queue === current.updateQueue) { + queue = workInProgress.updateQueue = cloneUpdateQueue(queue); + } + } + + return queue; + } + + function getStateFromUpdate(workInProgress, queue, update, prevState, nextProps, instance) { + switch (update.tag) { + case ReplaceState: { + var payload = update.payload; + + if (typeof payload === 'function') { + // Updater function + { + enterDisallowedContextReadInDEV(); + + if (debugRenderPhaseSideEffectsForStrictMode && workInProgress.mode & StrictMode) { + payload.call(instance, prevState, nextProps); + } + } + + var nextState = payload.call(instance, prevState, nextProps); + + { + exitDisallowedContextReadInDEV(); + } + + return nextState; + } // State object + + return payload; + } + + case CaptureUpdate: { + workInProgress.effectTag = (workInProgress.effectTag & ~ShouldCapture) | DidCapture; + } + // Intentional fallthrough + + case UpdateState: { + var _payload = update.payload; + var partialState; + + if (typeof _payload === 'function') { + // Updater function + { + enterDisallowedContextReadInDEV(); + + if (debugRenderPhaseSideEffectsForStrictMode && workInProgress.mode & StrictMode) { + _payload.call(instance, prevState, nextProps); + } + } + + partialState = _payload.call(instance, prevState, nextProps); + + { + exitDisallowedContextReadInDEV(); + } + } else { + // Partial state object + partialState = _payload; + } + + if (partialState === null || partialState === undefined) { + // Null and undefined are treated as no-ops. + return prevState; + } // Merge the partial state and the previous state. + + return _assign({}, prevState, partialState); + } + + case ForceUpdate: { + hasForceUpdate = true; + return prevState; + } + } + + return prevState; + } + + function processUpdateQueue(workInProgress, queue, props, instance, renderExpirationTime) { + hasForceUpdate = false; + queue = ensureWorkInProgressQueueIsAClone(workInProgress, queue); + + { + currentlyProcessingQueue = queue; + } // These values may change as we process the queue. + + var newBaseState = queue.baseState; + var newFirstUpdate = null; + var newExpirationTime = NoWork; // Iterate through the list of updates to compute the result. + + var update = queue.firstUpdate; + var resultState = newBaseState; + + while (update !== null) { + var updateExpirationTime = update.expirationTime; + + if (updateExpirationTime < renderExpirationTime) { + // This update does not have sufficient priority. Skip it. + if (newFirstUpdate === null) { + // This is the first skipped update. It will be the first update in + // the new list. + newFirstUpdate = update; // Since this is the first update that was skipped, the current result + // is the new base state. + + newBaseState = resultState; + } // Since this update will remain in the list, update the remaining + // expiration time. + + if (newExpirationTime < updateExpirationTime) { + newExpirationTime = updateExpirationTime; + } + } else { + // This update does have sufficient priority. + // Mark the event time of this update as relevant to this render pass. + // TODO: This should ideally use the true event time of this update rather than + // its priority which is a derived and not reverseable value. + // TODO: We should skip this update if it was already committed but currently + // we have no way of detecting the difference between a committed and suspended + // update here. + markRenderEventTimeAndConfig(updateExpirationTime, update.suspenseConfig); // Process it and compute a new result. + + resultState = getStateFromUpdate(workInProgress, queue, update, resultState, props, instance); + var callback = update.callback; + + if (callback !== null) { + workInProgress.effectTag |= Callback; // Set this to null, in case it was mutated during an aborted render. + + update.nextEffect = null; + + if (queue.lastEffect === null) { + queue.firstEffect = queue.lastEffect = update; + } else { + queue.lastEffect.nextEffect = update; + queue.lastEffect = update; + } + } + } // Continue to the next update. + + update = update.next; + } // Separately, iterate though the list of captured updates. + + var newFirstCapturedUpdate = null; + update = queue.firstCapturedUpdate; + + while (update !== null) { + var _updateExpirationTime = update.expirationTime; + + if (_updateExpirationTime < renderExpirationTime) { + // This update does not have sufficient priority. Skip it. + if (newFirstCapturedUpdate === null) { + // This is the first skipped captured update. It will be the first + // update in the new list. + newFirstCapturedUpdate = update; // If this is the first update that was skipped, the current result is + // the new base state. + + if (newFirstUpdate === null) { + newBaseState = resultState; + } + } // Since this update will remain in the list, update the remaining + // expiration time. + + if (newExpirationTime < _updateExpirationTime) { + newExpirationTime = _updateExpirationTime; + } + } else { + // This update does have sufficient priority. Process it and compute + // a new result. + resultState = getStateFromUpdate(workInProgress, queue, update, resultState, props, instance); + var _callback = update.callback; + + if (_callback !== null) { + workInProgress.effectTag |= Callback; // Set this to null, in case it was mutated during an aborted render. + + update.nextEffect = null; + + if (queue.lastCapturedEffect === null) { + queue.firstCapturedEffect = queue.lastCapturedEffect = update; + } else { + queue.lastCapturedEffect.nextEffect = update; + queue.lastCapturedEffect = update; + } + } + } + + update = update.next; + } + + if (newFirstUpdate === null) { + queue.lastUpdate = null; + } + + if (newFirstCapturedUpdate === null) { + queue.lastCapturedUpdate = null; + } else { + workInProgress.effectTag |= Callback; + } + + if (newFirstUpdate === null && newFirstCapturedUpdate === null) { + // We processed every update, without skipping. That means the new base + // state is the same as the result state. + newBaseState = resultState; + } + + queue.baseState = newBaseState; + queue.firstUpdate = newFirstUpdate; + queue.firstCapturedUpdate = newFirstCapturedUpdate; // Set the remaining expiration time to be whatever is remaining in the queue. + // This should be fine because the only two other things that contribute to + // expiration time are props and context. We're already in the middle of the + // begin phase by the time we start processing the queue, so we've already + // dealt with the props. Context in components that specify + // shouldComponentUpdate is tricky; but we'll have to account for + // that regardless. + + markUnprocessedUpdateTime(newExpirationTime); + workInProgress.expirationTime = newExpirationTime; + workInProgress.memoizedState = resultState; + + { + currentlyProcessingQueue = null; + } + } + + function callCallback(callback, context) { + if (!(typeof callback === 'function')) { + { + throw Error( + 'Invalid argument passed as callback. Expected a function. Instead received: ' + callback, + ); + } + } + + callback.call(context); + } + + function resetHasForceUpdateBeforeProcessing() { + hasForceUpdate = false; + } + function checkHasForceUpdateAfterProcessing() { + return hasForceUpdate; + } + function commitUpdateQueue(finishedWork, finishedQueue, instance, renderExpirationTime) { + // If the finished render included captured updates, and there are still + // lower priority updates left over, we need to keep the captured updates + // in the queue so that they are rebased and not dropped once we process the + // queue again at the lower priority. + if (finishedQueue.firstCapturedUpdate !== null) { + // Join the captured update list to the end of the normal list. + if (finishedQueue.lastUpdate !== null) { + finishedQueue.lastUpdate.next = finishedQueue.firstCapturedUpdate; + finishedQueue.lastUpdate = finishedQueue.lastCapturedUpdate; + } // Clear the list of captured updates. + + finishedQueue.firstCapturedUpdate = finishedQueue.lastCapturedUpdate = null; + } // Commit the effects + + commitUpdateEffects(finishedQueue.firstEffect, instance); + finishedQueue.firstEffect = finishedQueue.lastEffect = null; + commitUpdateEffects(finishedQueue.firstCapturedEffect, instance); + finishedQueue.firstCapturedEffect = finishedQueue.lastCapturedEffect = null; + } + + function commitUpdateEffects(effect, instance) { + while (effect !== null) { + var callback = effect.callback; + + if (callback !== null) { + effect.callback = null; + callCallback(callback, instance); + } + + effect = effect.nextEffect; + } + } + + var ReactCurrentBatchConfig = ReactSharedInternals.ReactCurrentBatchConfig; + function requestCurrentSuspenseConfig() { + return ReactCurrentBatchConfig.suspense; + } + + var fakeInternalInstance = {}; + var isArray$1 = Array.isArray; // React.Component uses a shared frozen object by default. + // We'll use it to determine whether we need to initialize legacy refs. + + var emptyRefsObject = new React.Component().refs; + var didWarnAboutStateAssignmentForComponent; + var didWarnAboutUninitializedState; + var didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate; + var didWarnAboutLegacyLifecyclesAndDerivedState; + var didWarnAboutUndefinedDerivedState; + var warnOnUndefinedDerivedState; + var warnOnInvalidCallback$1; + var didWarnAboutDirectlyAssigningPropsToState; + var didWarnAboutContextTypeAndContextTypes; + var didWarnAboutInvalidateContextType; + + { + didWarnAboutStateAssignmentForComponent = new Set(); + didWarnAboutUninitializedState = new Set(); + didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate = new Set(); + didWarnAboutLegacyLifecyclesAndDerivedState = new Set(); + didWarnAboutDirectlyAssigningPropsToState = new Set(); + didWarnAboutUndefinedDerivedState = new Set(); + didWarnAboutContextTypeAndContextTypes = new Set(); + didWarnAboutInvalidateContextType = new Set(); + var didWarnOnInvalidCallback = new Set(); + + warnOnInvalidCallback$1 = function (callback, callerName) { + if (callback === null || typeof callback === 'function') { + return; + } + + var key = callerName + '_' + callback; + + if (!didWarnOnInvalidCallback.has(key)) { + didWarnOnInvalidCallback.add(key); + warningWithoutStack$1( + false, + '%s(...): Expected the last optional `callback` argument to be a ' + + 'function. Instead received: %s.', + callerName, + callback, + ); + } + }; + + warnOnUndefinedDerivedState = function (type, partialState) { + if (partialState === undefined) { + var componentName = getComponentName(type) || 'Component'; + + if (!didWarnAboutUndefinedDerivedState.has(componentName)) { + didWarnAboutUndefinedDerivedState.add(componentName); + warningWithoutStack$1( + false, + '%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. ' + + 'You have returned undefined.', + componentName, + ); + } + } + }; // This is so gross but it's at least non-critical and can be removed if + // it causes problems. This is meant to give a nicer error message for + // ReactDOM15.unstable_renderSubtreeIntoContainer(reactDOM16Component, + // ...)) which otherwise throws a "_processChildContext is not a function" + // exception. + + Object.defineProperty(fakeInternalInstance, '_processChildContext', { + enumerable: false, + value: function () { + { + { + throw Error( + "_processChildContext is not available in React 16+. This likely means you have multiple copies of React and are attempting to nest a React 15 tree inside a React 16 tree using unstable_renderSubtreeIntoContainer, which isn't supported. Try to make sure you have only one copy of React (and ideally, switch to ReactDOM.createPortal).", + ); + } + } + }, + }); + Object.freeze(fakeInternalInstance); + } + + function applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, nextProps) { + var prevState = workInProgress.memoizedState; + + { + if (debugRenderPhaseSideEffectsForStrictMode && workInProgress.mode & StrictMode) { + // Invoke the function an extra time to help detect side-effects. + getDerivedStateFromProps(nextProps, prevState); + } + } + + var partialState = getDerivedStateFromProps(nextProps, prevState); + + { + warnOnUndefinedDerivedState(ctor, partialState); + } // Merge the partial state and the previous state. + + var memoizedState = + partialState === null || partialState === undefined + ? prevState + : _assign({}, prevState, partialState); + workInProgress.memoizedState = memoizedState; // Once the update queue is empty, persist the derived state onto the + // base state. + + var updateQueue = workInProgress.updateQueue; + + if (updateQueue !== null && workInProgress.expirationTime === NoWork) { + updateQueue.baseState = memoizedState; + } + } + var classComponentUpdater = { + isMounted: isMounted, + enqueueSetState: function (inst, payload, callback) { + var fiber = get(inst); + var currentTime = requestCurrentTimeForUpdate(); + var suspenseConfig = requestCurrentSuspenseConfig(); + var expirationTime = computeExpirationForFiber(currentTime, fiber, suspenseConfig); + var update = createUpdate(expirationTime, suspenseConfig); + update.payload = payload; + + if (callback !== undefined && callback !== null) { + { + warnOnInvalidCallback$1(callback, 'setState'); + } + + update.callback = callback; + } + + enqueueUpdate(fiber, update); + scheduleWork(fiber, expirationTime); + }, + enqueueReplaceState: function (inst, payload, callback) { + var fiber = get(inst); + var currentTime = requestCurrentTimeForUpdate(); + var suspenseConfig = requestCurrentSuspenseConfig(); + var expirationTime = computeExpirationForFiber(currentTime, fiber, suspenseConfig); + var update = createUpdate(expirationTime, suspenseConfig); + update.tag = ReplaceState; + update.payload = payload; + + if (callback !== undefined && callback !== null) { + { + warnOnInvalidCallback$1(callback, 'replaceState'); + } + + update.callback = callback; + } + + enqueueUpdate(fiber, update); + scheduleWork(fiber, expirationTime); + }, + enqueueForceUpdate: function (inst, callback) { + var fiber = get(inst); + var currentTime = requestCurrentTimeForUpdate(); + var suspenseConfig = requestCurrentSuspenseConfig(); + var expirationTime = computeExpirationForFiber(currentTime, fiber, suspenseConfig); + var update = createUpdate(expirationTime, suspenseConfig); + update.tag = ForceUpdate; + + if (callback !== undefined && callback !== null) { + { + warnOnInvalidCallback$1(callback, 'forceUpdate'); + } + + update.callback = callback; + } + + enqueueUpdate(fiber, update); + scheduleWork(fiber, expirationTime); + }, + }; + + function checkShouldComponentUpdate( + workInProgress, + ctor, + oldProps, + newProps, + oldState, + newState, + nextContext, + ) { + var instance = workInProgress.stateNode; + + if (typeof instance.shouldComponentUpdate === 'function') { + startPhaseTimer(workInProgress, 'shouldComponentUpdate'); + var shouldUpdate = instance.shouldComponentUpdate(newProps, newState, nextContext); + stopPhaseTimer(); + + { + !(shouldUpdate !== undefined) + ? warningWithoutStack$1( + false, + '%s.shouldComponentUpdate(): Returned undefined instead of a ' + + 'boolean value. Make sure to return true or false.', + getComponentName(ctor) || 'Component', + ) + : void 0; + } + + return shouldUpdate; + } + + if (ctor.prototype && ctor.prototype.isPureReactComponent) { + return !shallowEqual(oldProps, newProps) || !shallowEqual(oldState, newState); + } + + return true; + } + + function checkClassInstance(workInProgress, ctor, newProps) { + var instance = workInProgress.stateNode; + + { + var name = getComponentName(ctor) || 'Component'; + var renderPresent = instance.render; + + if (!renderPresent) { + if (ctor.prototype && typeof ctor.prototype.render === 'function') { + warningWithoutStack$1( + false, + '%s(...): No `render` method found on the returned component ' + + 'instance: did you accidentally return an object from the constructor?', + name, + ); + } else { + warningWithoutStack$1( + false, + '%s(...): No `render` method found on the returned component ' + + 'instance: you may have forgotten to define `render`.', + name, + ); + } + } + + var noGetInitialStateOnES6 = + !instance.getInitialState || instance.getInitialState.isReactClassApproved || instance.state; + !noGetInitialStateOnES6 + ? warningWithoutStack$1( + false, + 'getInitialState was defined on %s, a plain JavaScript class. ' + + 'This is only supported for classes created using React.createClass. ' + + 'Did you mean to define a state property instead?', + name, + ) + : void 0; + var noGetDefaultPropsOnES6 = + !instance.getDefaultProps || instance.getDefaultProps.isReactClassApproved; + !noGetDefaultPropsOnES6 + ? warningWithoutStack$1( + false, + 'getDefaultProps was defined on %s, a plain JavaScript class. ' + + 'This is only supported for classes created using React.createClass. ' + + 'Use a static property to define defaultProps instead.', + name, + ) + : void 0; + var noInstancePropTypes = !instance.propTypes; + !noInstancePropTypes + ? warningWithoutStack$1( + false, + 'propTypes was defined as an instance property on %s. Use a static ' + + 'property to define propTypes instead.', + name, + ) + : void 0; + var noInstanceContextType = !instance.contextType; + !noInstanceContextType + ? warningWithoutStack$1( + false, + 'contextType was defined as an instance property on %s. Use a static ' + + 'property to define contextType instead.', + name, + ) + : void 0; + + if (disableLegacyContext) { + if (ctor.childContextTypes) { + warningWithoutStack$1( + false, + '%s uses the legacy childContextTypes API which is no longer supported. ' + + 'Use React.createContext() instead.', + name, + ); + } + + if (ctor.contextTypes) { + warningWithoutStack$1( + false, + '%s uses the legacy contextTypes API which is no longer supported. ' + + 'Use React.createContext() with static contextType instead.', + name, + ); + } + } else { + var noInstanceContextTypes = !instance.contextTypes; + !noInstanceContextTypes + ? warningWithoutStack$1( + false, + 'contextTypes was defined as an instance property on %s. Use a static ' + + 'property to define contextTypes instead.', + name, + ) + : void 0; + + if ( + ctor.contextType && + ctor.contextTypes && + !didWarnAboutContextTypeAndContextTypes.has(ctor) + ) { + didWarnAboutContextTypeAndContextTypes.add(ctor); + warningWithoutStack$1( + false, + '%s declares both contextTypes and contextType static properties. ' + + 'The legacy contextTypes property will be ignored.', + name, + ); + } + } + + var noComponentShouldUpdate = typeof instance.componentShouldUpdate !== 'function'; + !noComponentShouldUpdate + ? warningWithoutStack$1( + false, + '%s has a method called ' + + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + + 'The name is phrased as a question because the function is ' + + 'expected to return a value.', + name, + ) + : void 0; + + if ( + ctor.prototype && + ctor.prototype.isPureReactComponent && + typeof instance.shouldComponentUpdate !== 'undefined' + ) { + warningWithoutStack$1( + false, + '%s has a method called shouldComponentUpdate(). ' + + 'shouldComponentUpdate should not be used when extending React.PureComponent. ' + + 'Please extend React.Component if shouldComponentUpdate is used.', + getComponentName(ctor) || 'A pure component', + ); + } + + var noComponentDidUnmount = typeof instance.componentDidUnmount !== 'function'; + !noComponentDidUnmount + ? warningWithoutStack$1( + false, + '%s has a method called ' + + 'componentDidUnmount(). But there is no such lifecycle method. ' + + 'Did you mean componentWillUnmount()?', + name, + ) + : void 0; + var noComponentDidReceiveProps = typeof instance.componentDidReceiveProps !== 'function'; + !noComponentDidReceiveProps + ? warningWithoutStack$1( + false, + '%s has a method called ' + + 'componentDidReceiveProps(). But there is no such lifecycle method. ' + + 'If you meant to update the state in response to changing props, ' + + 'use componentWillReceiveProps(). If you meant to fetch data or ' + + 'run side-effects or mutations after React has updated the UI, use componentDidUpdate().', + name, + ) + : void 0; + var noComponentWillRecieveProps = typeof instance.componentWillRecieveProps !== 'function'; + !noComponentWillRecieveProps + ? warningWithoutStack$1( + false, + '%s has a method called ' + + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', + name, + ) + : void 0; + var noUnsafeComponentWillRecieveProps = + typeof instance.UNSAFE_componentWillRecieveProps !== 'function'; + !noUnsafeComponentWillRecieveProps + ? warningWithoutStack$1( + false, + '%s has a method called ' + + 'UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?', + name, + ) + : void 0; + var hasMutatedProps = instance.props !== newProps; + !(instance.props === undefined || !hasMutatedProps) + ? warningWithoutStack$1( + false, + '%s(...): When calling super() in `%s`, make sure to pass ' + + "up the same props that your component's constructor was passed.", + name, + name, + ) + : void 0; + var noInstanceDefaultProps = !instance.defaultProps; + !noInstanceDefaultProps + ? warningWithoutStack$1( + false, + 'Setting defaultProps as an instance property on %s is not supported and will be ignored.' + + ' Instead, define defaultProps as a static property on %s.', + name, + name, + ) + : void 0; + + if ( + typeof instance.getSnapshotBeforeUpdate === 'function' && + typeof instance.componentDidUpdate !== 'function' && + !didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.has(ctor) + ) { + didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.add(ctor); + warningWithoutStack$1( + false, + '%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). ' + + 'This component defines getSnapshotBeforeUpdate() only.', + getComponentName(ctor), + ); + } + + var noInstanceGetDerivedStateFromProps = + typeof instance.getDerivedStateFromProps !== 'function'; + !noInstanceGetDerivedStateFromProps + ? warningWithoutStack$1( + false, + '%s: getDerivedStateFromProps() is defined as an instance method ' + + 'and will be ignored. Instead, declare it as a static method.', + name, + ) + : void 0; + var noInstanceGetDerivedStateFromCatch = + typeof instance.getDerivedStateFromError !== 'function'; + !noInstanceGetDerivedStateFromCatch + ? warningWithoutStack$1( + false, + '%s: getDerivedStateFromError() is defined as an instance method ' + + 'and will be ignored. Instead, declare it as a static method.', + name, + ) + : void 0; + var noStaticGetSnapshotBeforeUpdate = typeof ctor.getSnapshotBeforeUpdate !== 'function'; + !noStaticGetSnapshotBeforeUpdate + ? warningWithoutStack$1( + false, + '%s: getSnapshotBeforeUpdate() is defined as a static method ' + + 'and will be ignored. Instead, declare it as an instance method.', + name, + ) + : void 0; + var _state = instance.state; + + if (_state && (typeof _state !== 'object' || isArray$1(_state))) { + warningWithoutStack$1(false, '%s.state: must be set to an object or null', name); + } + + if (typeof instance.getChildContext === 'function') { + !(typeof ctor.childContextTypes === 'object') + ? warningWithoutStack$1( + false, + '%s.getChildContext(): childContextTypes must be defined in order to ' + + 'use getChildContext().', + name, + ) + : void 0; + } + } + } + + function adoptClassInstance(workInProgress, instance) { + instance.updater = classComponentUpdater; + workInProgress.stateNode = instance; // The instance needs access to the fiber so that it can schedule updates + + set(instance, workInProgress); + + { + instance._reactInternalInstance = fakeInternalInstance; + } + } + + function constructClassInstance(workInProgress, ctor, props, renderExpirationTime) { + var isLegacyContextConsumer = false; + var unmaskedContext = emptyContextObject; + var context = emptyContextObject; + var contextType = ctor.contextType; + + { + if ('contextType' in ctor) { + var isValid = // Allow null for conditional declaration + contextType === null || + (contextType !== undefined && + contextType.$$typeof === REACT_CONTEXT_TYPE && + contextType._context === undefined); // Not a <Context.Consumer> + + if (!isValid && !didWarnAboutInvalidateContextType.has(ctor)) { + didWarnAboutInvalidateContextType.add(ctor); + var addendum = ''; + + if (contextType === undefined) { + addendum = + ' However, it is set to undefined. ' + + 'This can be caused by a typo or by mixing up named and default imports. ' + + 'This can also happen due to a circular dependency, so ' + + 'try moving the createContext() call to a separate file.'; + } else if (typeof contextType !== 'object') { + addendum = ' However, it is set to a ' + typeof contextType + '.'; + } else if (contextType.$$typeof === REACT_PROVIDER_TYPE) { + addendum = ' Did you accidentally pass the Context.Provider instead?'; + } else if (contextType._context !== undefined) { + // <Context.Consumer> + addendum = ' Did you accidentally pass the Context.Consumer instead?'; + } else { + addendum = + ' However, it is set to an object with keys {' + + Object.keys(contextType).join(', ') + + '}.'; + } + + warningWithoutStack$1( + false, + '%s defines an invalid contextType. ' + + 'contextType should point to the Context object returned by React.createContext().%s', + getComponentName(ctor) || 'Component', + addendum, + ); + } + } + } + + if (typeof contextType === 'object' && contextType !== null) { + context = readContext(contextType); + } else if (!disableLegacyContext) { + unmaskedContext = getUnmaskedContext(workInProgress, ctor, true); + var contextTypes = ctor.contextTypes; + isLegacyContextConsumer = contextTypes !== null && contextTypes !== undefined; + context = isLegacyContextConsumer + ? getMaskedContext(workInProgress, unmaskedContext) + : emptyContextObject; + } // Instantiate twice to help detect side-effects. + + { + if (debugRenderPhaseSideEffectsForStrictMode && workInProgress.mode & StrictMode) { + new ctor(props, context); // eslint-disable-line no-new + } + } + + var instance = new ctor(props, context); + var state = (workInProgress.memoizedState = + instance.state !== null && instance.state !== undefined ? instance.state : null); + adoptClassInstance(workInProgress, instance); + + { + if (typeof ctor.getDerivedStateFromProps === 'function' && state === null) { + var componentName = getComponentName(ctor) || 'Component'; + + if (!didWarnAboutUninitializedState.has(componentName)) { + didWarnAboutUninitializedState.add(componentName); + warningWithoutStack$1( + false, + '`%s` uses `getDerivedStateFromProps` but its initial state is ' + + '%s. This is not recommended. Instead, define the initial state by ' + + 'assigning an object to `this.state` in the constructor of `%s`. ' + + 'This ensures that `getDerivedStateFromProps` arguments have a consistent shape.', + componentName, + instance.state === null ? 'null' : 'undefined', + componentName, + ); + } + } // If new component APIs are defined, "unsafe" lifecycles won't be called. + // Warn about these lifecycles if they are present. + // Don't warn about react-lifecycles-compat polyfilled methods though. + + if ( + typeof ctor.getDerivedStateFromProps === 'function' || + typeof instance.getSnapshotBeforeUpdate === 'function' + ) { + var foundWillMountName = null; + var foundWillReceivePropsName = null; + var foundWillUpdateName = null; + + if ( + typeof instance.componentWillMount === 'function' && + instance.componentWillMount.__suppressDeprecationWarning !== true + ) { + foundWillMountName = 'componentWillMount'; + } else if (typeof instance.UNSAFE_componentWillMount === 'function') { + foundWillMountName = 'UNSAFE_componentWillMount'; + } + + if ( + typeof instance.componentWillReceiveProps === 'function' && + instance.componentWillReceiveProps.__suppressDeprecationWarning !== true + ) { + foundWillReceivePropsName = 'componentWillReceiveProps'; + } else if (typeof instance.UNSAFE_componentWillReceiveProps === 'function') { + foundWillReceivePropsName = 'UNSAFE_componentWillReceiveProps'; + } + + if ( + typeof instance.componentWillUpdate === 'function' && + instance.componentWillUpdate.__suppressDeprecationWarning !== true + ) { + foundWillUpdateName = 'componentWillUpdate'; + } else if (typeof instance.UNSAFE_componentWillUpdate === 'function') { + foundWillUpdateName = 'UNSAFE_componentWillUpdate'; + } + + if ( + foundWillMountName !== null || + foundWillReceivePropsName !== null || + foundWillUpdateName !== null + ) { + var _componentName = getComponentName(ctor) || 'Component'; + + var newApiName = + typeof ctor.getDerivedStateFromProps === 'function' + ? 'getDerivedStateFromProps()' + : 'getSnapshotBeforeUpdate()'; + + if (!didWarnAboutLegacyLifecyclesAndDerivedState.has(_componentName)) { + didWarnAboutLegacyLifecyclesAndDerivedState.add(_componentName); + warningWithoutStack$1( + false, + 'Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n' + + '%s uses %s but also contains the following legacy lifecycles:%s%s%s\n\n' + + 'The above lifecycles should be removed. Learn more about this warning here:\n' + + 'https://fb.me/react-unsafe-component-lifecycles', + _componentName, + newApiName, + foundWillMountName !== null ? '\n ' + foundWillMountName : '', + foundWillReceivePropsName !== null ? '\n ' + foundWillReceivePropsName : '', + foundWillUpdateName !== null ? '\n ' + foundWillUpdateName : '', + ); + } + } + } + } // Cache unmasked context so we can avoid recreating masked context unless necessary. + // ReactFiberContext usually updates this cache but can't for newly-created instances. + + if (isLegacyContextConsumer) { + cacheContext(workInProgress, unmaskedContext, context); + } + + return instance; + } + + function callComponentWillMount(workInProgress, instance) { + startPhaseTimer(workInProgress, 'componentWillMount'); + var oldState = instance.state; + + if (typeof instance.componentWillMount === 'function') { + instance.componentWillMount(); + } + + if (typeof instance.UNSAFE_componentWillMount === 'function') { + instance.UNSAFE_componentWillMount(); + } + + stopPhaseTimer(); + + if (oldState !== instance.state) { + { + warningWithoutStack$1( + false, + '%s.componentWillMount(): Assigning directly to this.state is ' + + "deprecated (except inside a component's " + + 'constructor). Use setState instead.', + getComponentName(workInProgress.type) || 'Component', + ); + } + + classComponentUpdater.enqueueReplaceState(instance, instance.state, null); + } + } + + function callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext) { + var oldState = instance.state; + startPhaseTimer(workInProgress, 'componentWillReceiveProps'); + + if (typeof instance.componentWillReceiveProps === 'function') { + instance.componentWillReceiveProps(newProps, nextContext); + } + + if (typeof instance.UNSAFE_componentWillReceiveProps === 'function') { + instance.UNSAFE_componentWillReceiveProps(newProps, nextContext); + } + + stopPhaseTimer(); + + if (instance.state !== oldState) { + { + var componentName = getComponentName(workInProgress.type) || 'Component'; + + if (!didWarnAboutStateAssignmentForComponent.has(componentName)) { + didWarnAboutStateAssignmentForComponent.add(componentName); + warningWithoutStack$1( + false, + '%s.componentWillReceiveProps(): Assigning directly to ' + + "this.state is deprecated (except inside a component's " + + 'constructor). Use setState instead.', + componentName, + ); + } + } + + classComponentUpdater.enqueueReplaceState(instance, instance.state, null); + } + } // Invokes the mount life-cycles on a previously never rendered instance. + + function mountClassInstance(workInProgress, ctor, newProps, renderExpirationTime) { + { + checkClassInstance(workInProgress, ctor, newProps); + } + + var instance = workInProgress.stateNode; + instance.props = newProps; + instance.state = workInProgress.memoizedState; + instance.refs = emptyRefsObject; + var contextType = ctor.contextType; + + if (typeof contextType === 'object' && contextType !== null) { + instance.context = readContext(contextType); + } else if (disableLegacyContext) { + instance.context = emptyContextObject; + } else { + var unmaskedContext = getUnmaskedContext(workInProgress, ctor, true); + instance.context = getMaskedContext(workInProgress, unmaskedContext); + } + + { + if (instance.state === newProps) { + var componentName = getComponentName(ctor) || 'Component'; + + if (!didWarnAboutDirectlyAssigningPropsToState.has(componentName)) { + didWarnAboutDirectlyAssigningPropsToState.add(componentName); + warningWithoutStack$1( + false, + '%s: It is not recommended to assign props directly to state ' + + "because updates to props won't be reflected in state. " + + 'In most cases, it is better to use props directly.', + componentName, + ); + } + } + + if (workInProgress.mode & StrictMode) { + ReactStrictModeWarnings.recordLegacyContextWarning(workInProgress, instance); + } + + if (warnAboutDeprecatedLifecycles) { + ReactStrictModeWarnings.recordUnsafeLifecycleWarnings(workInProgress, instance); + } + } + + var updateQueue = workInProgress.updateQueue; + + if (updateQueue !== null) { + processUpdateQueue(workInProgress, updateQueue, newProps, instance, renderExpirationTime); + instance.state = workInProgress.memoizedState; + } + + var getDerivedStateFromProps = ctor.getDerivedStateFromProps; + + if (typeof getDerivedStateFromProps === 'function') { + applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps); + instance.state = workInProgress.memoizedState; + } // In order to support react-lifecycles-compat polyfilled components, + // Unsafe lifecycles should not be invoked for components using the new APIs. + + if ( + typeof ctor.getDerivedStateFromProps !== 'function' && + typeof instance.getSnapshotBeforeUpdate !== 'function' && + (typeof instance.UNSAFE_componentWillMount === 'function' || + typeof instance.componentWillMount === 'function') + ) { + callComponentWillMount(workInProgress, instance); // If we had additional state updates during this life-cycle, let's + // process them now. + + updateQueue = workInProgress.updateQueue; + + if (updateQueue !== null) { + processUpdateQueue(workInProgress, updateQueue, newProps, instance, renderExpirationTime); + instance.state = workInProgress.memoizedState; + } + } + + if (typeof instance.componentDidMount === 'function') { + workInProgress.effectTag |= Update; + } + } + + function resumeMountClassInstance(workInProgress, ctor, newProps, renderExpirationTime) { + var instance = workInProgress.stateNode; + var oldProps = workInProgress.memoizedProps; + instance.props = oldProps; + var oldContext = instance.context; + var contextType = ctor.contextType; + var nextContext = emptyContextObject; + + if (typeof contextType === 'object' && contextType !== null) { + nextContext = readContext(contextType); + } else if (!disableLegacyContext) { + var nextLegacyUnmaskedContext = getUnmaskedContext(workInProgress, ctor, true); + nextContext = getMaskedContext(workInProgress, nextLegacyUnmaskedContext); + } + + var getDerivedStateFromProps = ctor.getDerivedStateFromProps; + var hasNewLifecycles = + typeof getDerivedStateFromProps === 'function' || + typeof instance.getSnapshotBeforeUpdate === 'function'; // Note: During these life-cycles, instance.props/instance.state are what + // ever the previously attempted to render - not the "current". However, + // during componentDidUpdate we pass the "current" props. + // In order to support react-lifecycles-compat polyfilled components, + // Unsafe lifecycles should not be invoked for components using the new APIs. + + if ( + !hasNewLifecycles && + (typeof instance.UNSAFE_componentWillReceiveProps === 'function' || + typeof instance.componentWillReceiveProps === 'function') + ) { + if (oldProps !== newProps || oldContext !== nextContext) { + callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext); + } + } + + resetHasForceUpdateBeforeProcessing(); + var oldState = workInProgress.memoizedState; + var newState = (instance.state = oldState); + var updateQueue = workInProgress.updateQueue; + + if (updateQueue !== null) { + processUpdateQueue(workInProgress, updateQueue, newProps, instance, renderExpirationTime); + newState = workInProgress.memoizedState; + } + + if ( + oldProps === newProps && + oldState === newState && + !hasContextChanged() && + !checkHasForceUpdateAfterProcessing() + ) { + // If an update was already in progress, we should schedule an Update + // effect even though we're bailing out, so that cWU/cDU are called. + if (typeof instance.componentDidMount === 'function') { + workInProgress.effectTag |= Update; + } + + return false; + } + + if (typeof getDerivedStateFromProps === 'function') { + applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps); + newState = workInProgress.memoizedState; + } + + var shouldUpdate = + checkHasForceUpdateAfterProcessing() || + checkShouldComponentUpdate( + workInProgress, + ctor, + oldProps, + newProps, + oldState, + newState, + nextContext, + ); + + if (shouldUpdate) { + // In order to support react-lifecycles-compat polyfilled components, + // Unsafe lifecycles should not be invoked for components using the new APIs. + if ( + !hasNewLifecycles && + (typeof instance.UNSAFE_componentWillMount === 'function' || + typeof instance.componentWillMount === 'function') + ) { + startPhaseTimer(workInProgress, 'componentWillMount'); + + if (typeof instance.componentWillMount === 'function') { + instance.componentWillMount(); + } + + if (typeof instance.UNSAFE_componentWillMount === 'function') { + instance.UNSAFE_componentWillMount(); + } + + stopPhaseTimer(); + } + + if (typeof instance.componentDidMount === 'function') { + workInProgress.effectTag |= Update; + } + } else { + // If an update was already in progress, we should schedule an Update + // effect even though we're bailing out, so that cWU/cDU are called. + if (typeof instance.componentDidMount === 'function') { + workInProgress.effectTag |= Update; + } // If shouldComponentUpdate returned false, we should still update the + // memoized state to indicate that this work can be reused. + + workInProgress.memoizedProps = newProps; + workInProgress.memoizedState = newState; + } // Update the existing instance's state, props, and context pointers even + // if shouldComponentUpdate returns false. + + instance.props = newProps; + instance.state = newState; + instance.context = nextContext; + return shouldUpdate; + } // Invokes the update life-cycles and returns false if it shouldn't rerender. + + function updateClassInstance(current, workInProgress, ctor, newProps, renderExpirationTime) { + var instance = workInProgress.stateNode; + var oldProps = workInProgress.memoizedProps; + instance.props = + workInProgress.type === workInProgress.elementType + ? oldProps + : resolveDefaultProps(workInProgress.type, oldProps); + var oldContext = instance.context; + var contextType = ctor.contextType; + var nextContext = emptyContextObject; + + if (typeof contextType === 'object' && contextType !== null) { + nextContext = readContext(contextType); + } else if (!disableLegacyContext) { + var nextUnmaskedContext = getUnmaskedContext(workInProgress, ctor, true); + nextContext = getMaskedContext(workInProgress, nextUnmaskedContext); + } + + var getDerivedStateFromProps = ctor.getDerivedStateFromProps; + var hasNewLifecycles = + typeof getDerivedStateFromProps === 'function' || + typeof instance.getSnapshotBeforeUpdate === 'function'; // Note: During these life-cycles, instance.props/instance.state are what + // ever the previously attempted to render - not the "current". However, + // during componentDidUpdate we pass the "current" props. + // In order to support react-lifecycles-compat polyfilled components, + // Unsafe lifecycles should not be invoked for components using the new APIs. + + if ( + !hasNewLifecycles && + (typeof instance.UNSAFE_componentWillReceiveProps === 'function' || + typeof instance.componentWillReceiveProps === 'function') + ) { + if (oldProps !== newProps || oldContext !== nextContext) { + callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext); + } + } + + resetHasForceUpdateBeforeProcessing(); + var oldState = workInProgress.memoizedState; + var newState = (instance.state = oldState); + var updateQueue = workInProgress.updateQueue; + + if (updateQueue !== null) { + processUpdateQueue(workInProgress, updateQueue, newProps, instance, renderExpirationTime); + newState = workInProgress.memoizedState; + } + + if ( + oldProps === newProps && + oldState === newState && + !hasContextChanged() && + !checkHasForceUpdateAfterProcessing() + ) { + // If an update was already in progress, we should schedule an Update + // effect even though we're bailing out, so that cWU/cDU are called. + if (typeof instance.componentDidUpdate === 'function') { + if (oldProps !== current.memoizedProps || oldState !== current.memoizedState) { + workInProgress.effectTag |= Update; + } + } + + if (typeof instance.getSnapshotBeforeUpdate === 'function') { + if (oldProps !== current.memoizedProps || oldState !== current.memoizedState) { + workInProgress.effectTag |= Snapshot; + } + } + + return false; + } + + if (typeof getDerivedStateFromProps === 'function') { + applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps); + newState = workInProgress.memoizedState; + } + + var shouldUpdate = + checkHasForceUpdateAfterProcessing() || + checkShouldComponentUpdate( + workInProgress, + ctor, + oldProps, + newProps, + oldState, + newState, + nextContext, + ); + + if (shouldUpdate) { + // In order to support react-lifecycles-compat polyfilled components, + // Unsafe lifecycles should not be invoked for components using the new APIs. + if ( + !hasNewLifecycles && + (typeof instance.UNSAFE_componentWillUpdate === 'function' || + typeof instance.componentWillUpdate === 'function') + ) { + startPhaseTimer(workInProgress, 'componentWillUpdate'); + + if (typeof instance.componentWillUpdate === 'function') { + instance.componentWillUpdate(newProps, newState, nextContext); + } + + if (typeof instance.UNSAFE_componentWillUpdate === 'function') { + instance.UNSAFE_componentWillUpdate(newProps, newState, nextContext); + } + + stopPhaseTimer(); + } + + if (typeof instance.componentDidUpdate === 'function') { + workInProgress.effectTag |= Update; + } + + if (typeof instance.getSnapshotBeforeUpdate === 'function') { + workInProgress.effectTag |= Snapshot; + } + } else { + // If an update was already in progress, we should schedule an Update + // effect even though we're bailing out, so that cWU/cDU are called. + if (typeof instance.componentDidUpdate === 'function') { + if (oldProps !== current.memoizedProps || oldState !== current.memoizedState) { + workInProgress.effectTag |= Update; + } + } + + if (typeof instance.getSnapshotBeforeUpdate === 'function') { + if (oldProps !== current.memoizedProps || oldState !== current.memoizedState) { + workInProgress.effectTag |= Snapshot; + } + } // If shouldComponentUpdate returned false, we should still update the + // memoized props/state to indicate that this work can be reused. + + workInProgress.memoizedProps = newProps; + workInProgress.memoizedState = newState; + } // Update the existing instance's state, props, and context pointers even + // if shouldComponentUpdate returns false. + + instance.props = newProps; + instance.state = newState; + instance.context = nextContext; + return shouldUpdate; + } + + var didWarnAboutMaps; + var didWarnAboutGenerators; + var didWarnAboutStringRefs; + var ownerHasKeyUseWarning; + var ownerHasFunctionTypeWarning; + + var warnForMissingKey = function (child) {}; + + { + didWarnAboutMaps = false; + didWarnAboutGenerators = false; + didWarnAboutStringRefs = {}; + /** + * Warn if there's no key explicitly set on dynamic arrays of children or + * object keys are not valid. This allows us to keep track of children between + * updates. + */ + + ownerHasKeyUseWarning = {}; + ownerHasFunctionTypeWarning = {}; + + warnForMissingKey = function (child) { + if (child === null || typeof child !== 'object') { + return; + } + + if (!child._store || child._store.validated || child.key != null) { + return; + } + + if (!(typeof child._store === 'object')) { + { + throw Error( + 'React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + + child._store.validated = true; + var currentComponentErrorInfo = + 'Each child in a list should have a unique ' + + '"key" prop. See https://fb.me/react-warning-keys for ' + + 'more information.' + + getCurrentFiberStackInDev(); + + if (ownerHasKeyUseWarning[currentComponentErrorInfo]) { + return; + } + + ownerHasKeyUseWarning[currentComponentErrorInfo] = true; + warning$1( + false, + 'Each child in a list should have a unique ' + + '"key" prop. See https://fb.me/react-warning-keys for ' + + 'more information.', + ); + }; + } + + var isArray = Array.isArray; + + function coerceRef(returnFiber, current$$1, element) { + var mixedRef = element.ref; + + if (mixedRef !== null && typeof mixedRef !== 'function' && typeof mixedRef !== 'object') { + { + // TODO: Clean this up once we turn on the string ref warning for + // everyone, because the strict mode case will no longer be relevant + if (returnFiber.mode & StrictMode || warnAboutStringRefs) { + var componentName = getComponentName(returnFiber.type) || 'Component'; + + if (!didWarnAboutStringRefs[componentName]) { + if (warnAboutStringRefs) { + warningWithoutStack$1( + false, + 'Component "%s" contains the string ref "%s". Support for string refs ' + + 'will be removed in a future major release. We recommend using ' + + 'useRef() or createRef() instead. ' + + 'Learn more about using refs safely here: ' + + 'https://fb.me/react-strict-mode-string-ref%s', + componentName, + mixedRef, + getStackByFiberInDevAndProd(returnFiber), + ); + } else { + warningWithoutStack$1( + false, + 'A string ref, "%s", has been found within a strict mode tree. ' + + 'String refs are a source of potential bugs and should be avoided. ' + + 'We recommend using useRef() or createRef() instead. ' + + 'Learn more about using refs safely here: ' + + 'https://fb.me/react-strict-mode-string-ref%s', + mixedRef, + getStackByFiberInDevAndProd(returnFiber), + ); + } + + didWarnAboutStringRefs[componentName] = true; + } + } + } + + if (element._owner) { + var owner = element._owner; + var inst; + + if (owner) { + var ownerFiber = owner; + + if (!(ownerFiber.tag === ClassComponent)) { + { + throw Error( + 'Function components cannot have refs. Did you mean to use React.forwardRef()?', + ); + } + } + + inst = ownerFiber.stateNode; + } + + if (!inst) { + { + throw Error( + 'Missing owner for string ref ' + + mixedRef + + '. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + + var stringRef = '' + mixedRef; // Check if previous string ref matches new string ref + + if ( + current$$1 !== null && + current$$1.ref !== null && + typeof current$$1.ref === 'function' && + current$$1.ref._stringRef === stringRef + ) { + return current$$1.ref; + } + + var ref = function (value) { + var refs = inst.refs; + + if (refs === emptyRefsObject) { + // This is a lazy pooled frozen object, so we need to initialize. + refs = inst.refs = {}; + } + + if (value === null) { + delete refs[stringRef]; + } else { + refs[stringRef] = value; + } + }; + + ref._stringRef = stringRef; + return ref; + } else { + if (!(typeof mixedRef === 'string')) { + { + throw Error( + 'Expected ref to be a function, a string, an object returned by React.createRef(), or null.', + ); + } + } + + if (!element._owner) { + { + throw Error( + 'Element ref was specified as a string (' + + mixedRef + + ") but no owner was set. This could happen for one of the following reasons:\n1. You may be adding a ref to a function component\n2. You may be adding a ref to a component that was not created inside a component's render method\n3. You have multiple copies of React loaded\nSee https://fb.me/react-refs-must-have-owner for more information.", + ); + } + } + } + } + + return mixedRef; + } + + function throwOnInvalidObjectType(returnFiber, newChild) { + if (returnFiber.type !== 'textarea') { + var addendum = ''; + + { + addendum = + ' If you meant to render a collection of children, use an array ' + + 'instead.' + + getCurrentFiberStackInDev(); + } + + { + { + throw Error( + 'Objects are not valid as a React child (found: ' + + (Object.prototype.toString.call(newChild) === '[object Object]' + ? 'object with keys {' + Object.keys(newChild).join(', ') + '}' + : newChild) + + ').' + + addendum, + ); + } + } + } + } + + function warnOnFunctionType() { + var currentComponentErrorInfo = + 'Functions are not valid as a React child. This may happen if ' + + 'you return a Component instead of <Component /> from render. ' + + 'Or maybe you meant to call this function rather than return it.' + + getCurrentFiberStackInDev(); + + if (ownerHasFunctionTypeWarning[currentComponentErrorInfo]) { + return; + } + + ownerHasFunctionTypeWarning[currentComponentErrorInfo] = true; + warning$1( + false, + 'Functions are not valid as a React child. This may happen if ' + + 'you return a Component instead of <Component /> from render. ' + + 'Or maybe you meant to call this function rather than return it.', + ); + } // This wrapper function exists because I expect to clone the code in each path + // to be able to optimize each path individually by branching early. This needs + // a compiler or we can do it manually. Helpers that don't need this branching + // live outside of this function. + + function ChildReconciler(shouldTrackSideEffects) { + function deleteChild(returnFiber, childToDelete) { + if (!shouldTrackSideEffects) { + // Noop. + return; + } // Deletions are added in reversed order so we add it to the front. + // At this point, the return fiber's effect list is empty except for + // deletions, so we can just append the deletion to the list. The remaining + // effects aren't added until the complete phase. Once we implement + // resuming, this may not be true. + + var last = returnFiber.lastEffect; + + if (last !== null) { + last.nextEffect = childToDelete; + returnFiber.lastEffect = childToDelete; + } else { + returnFiber.firstEffect = returnFiber.lastEffect = childToDelete; + } + + childToDelete.nextEffect = null; + childToDelete.effectTag = Deletion; + } + + function deleteRemainingChildren(returnFiber, currentFirstChild) { + if (!shouldTrackSideEffects) { + // Noop. + return null; + } // TODO: For the shouldClone case, this could be micro-optimized a bit by + // assuming that after the first child we've already added everything. + + var childToDelete = currentFirstChild; + + while (childToDelete !== null) { + deleteChild(returnFiber, childToDelete); + childToDelete = childToDelete.sibling; + } + + return null; + } + + function mapRemainingChildren(returnFiber, currentFirstChild) { + // Add the remaining children to a temporary map so that we can find them by + // keys quickly. Implicit (null) keys get added to this set with their index + // instead. + var existingChildren = new Map(); + var existingChild = currentFirstChild; + + while (existingChild !== null) { + if (existingChild.key !== null) { + existingChildren.set(existingChild.key, existingChild); + } else { + existingChildren.set(existingChild.index, existingChild); + } + + existingChild = existingChild.sibling; + } + + return existingChildren; + } + + function useFiber(fiber, pendingProps, expirationTime) { + // We currently set sibling to null and index to 0 here because it is easy + // to forget to do before returning it. E.g. for the single child case. + var clone = createWorkInProgress(fiber, pendingProps, expirationTime); + clone.index = 0; + clone.sibling = null; + return clone; + } + + function placeChild(newFiber, lastPlacedIndex, newIndex) { + newFiber.index = newIndex; + + if (!shouldTrackSideEffects) { + // Noop. + return lastPlacedIndex; + } + + var current$$1 = newFiber.alternate; + + if (current$$1 !== null) { + var oldIndex = current$$1.index; + + if (oldIndex < lastPlacedIndex) { + // This is a move. + newFiber.effectTag = Placement; + return lastPlacedIndex; + } else { + // This item can stay in place. + return oldIndex; + } + } else { + // This is an insertion. + newFiber.effectTag = Placement; + return lastPlacedIndex; + } + } + + function placeSingleChild(newFiber) { + // This is simpler for the single child case. We only need to do a + // placement for inserting new children. + if (shouldTrackSideEffects && newFiber.alternate === null) { + newFiber.effectTag = Placement; + } + + return newFiber; + } + + function updateTextNode(returnFiber, current$$1, textContent, expirationTime) { + if (current$$1 === null || current$$1.tag !== HostText) { + // Insert + var created = createFiberFromText(textContent, returnFiber.mode, expirationTime); + created.return = returnFiber; + return created; + } else { + // Update + var existing = useFiber(current$$1, textContent, expirationTime); + existing.return = returnFiber; + return existing; + } + } + + function updateElement(returnFiber, current$$1, element, expirationTime) { + if ( + current$$1 !== null && + (current$$1.elementType === element.type || // Keep this check inline so it only runs on the false path: + isCompatibleFamilyForHotReloading(current$$1, element)) + ) { + // Move based on index + var existing = useFiber(current$$1, element.props, expirationTime); + existing.ref = coerceRef(returnFiber, current$$1, element); + existing.return = returnFiber; + + { + existing._debugSource = element._source; + existing._debugOwner = element._owner; + } + + return existing; + } else { + // Insert + var created = createFiberFromElement(element, returnFiber.mode, expirationTime); + created.ref = coerceRef(returnFiber, current$$1, element); + created.return = returnFiber; + return created; + } + } + + function updatePortal(returnFiber, current$$1, portal, expirationTime) { + if ( + current$$1 === null || + current$$1.tag !== HostPortal || + current$$1.stateNode.containerInfo !== portal.containerInfo || + current$$1.stateNode.implementation !== portal.implementation + ) { + // Insert + var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime); + created.return = returnFiber; + return created; + } else { + // Update + var existing = useFiber(current$$1, portal.children || [], expirationTime); + existing.return = returnFiber; + return existing; + } + } + + function updateFragment(returnFiber, current$$1, fragment, expirationTime, key) { + if (current$$1 === null || current$$1.tag !== Fragment) { + // Insert + var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key); + created.return = returnFiber; + return created; + } else { + // Update + var existing = useFiber(current$$1, fragment, expirationTime); + existing.return = returnFiber; + return existing; + } + } + + function createChild(returnFiber, newChild, expirationTime) { + if (typeof newChild === 'string' || typeof newChild === 'number') { + // Text nodes don't have keys. If the previous node is implicitly keyed + // we can continue to replace it without aborting even if it is not a text + // node. + var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime); + created.return = returnFiber; + return created; + } + + if (typeof newChild === 'object' && newChild !== null) { + switch (newChild.$$typeof) { + case REACT_ELEMENT_TYPE: { + var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime); + + _created.ref = coerceRef(returnFiber, null, newChild); + _created.return = returnFiber; + return _created; + } + + case REACT_PORTAL_TYPE: { + var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime); + + _created2.return = returnFiber; + return _created2; + } + } + + if (isArray(newChild) || getIteratorFn(newChild)) { + var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null); + + _created3.return = returnFiber; + return _created3; + } + + throwOnInvalidObjectType(returnFiber, newChild); + } + + { + if (typeof newChild === 'function') { + warnOnFunctionType(); + } + } + + return null; + } + + function updateSlot(returnFiber, oldFiber, newChild, expirationTime) { + // Update the fiber if the keys match, otherwise return null. + var key = oldFiber !== null ? oldFiber.key : null; + + if (typeof newChild === 'string' || typeof newChild === 'number') { + // Text nodes don't have keys. If the previous node is implicitly keyed + // we can continue to replace it without aborting even if it is not a text + // node. + if (key !== null) { + return null; + } + + return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime); + } + + if (typeof newChild === 'object' && newChild !== null) { + switch (newChild.$$typeof) { + case REACT_ELEMENT_TYPE: { + if (newChild.key === key) { + if (newChild.type === REACT_FRAGMENT_TYPE) { + return updateFragment( + returnFiber, + oldFiber, + newChild.props.children, + expirationTime, + key, + ); + } + + return updateElement(returnFiber, oldFiber, newChild, expirationTime); + } else { + return null; + } + } + + case REACT_PORTAL_TYPE: { + if (newChild.key === key) { + return updatePortal(returnFiber, oldFiber, newChild, expirationTime); + } else { + return null; + } + } + } + + if (isArray(newChild) || getIteratorFn(newChild)) { + if (key !== null) { + return null; + } + + return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null); + } + + throwOnInvalidObjectType(returnFiber, newChild); + } + + { + if (typeof newChild === 'function') { + warnOnFunctionType(); + } + } + + return null; + } + + function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) { + if (typeof newChild === 'string' || typeof newChild === 'number') { + // Text nodes don't have keys, so we neither have to check the old nor + // new node for the key. If both are text nodes, they match. + var matchedFiber = existingChildren.get(newIdx) || null; + return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime); + } + + if (typeof newChild === 'object' && newChild !== null) { + switch (newChild.$$typeof) { + case REACT_ELEMENT_TYPE: { + var _matchedFiber = + existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null; + + if (newChild.type === REACT_FRAGMENT_TYPE) { + return updateFragment( + returnFiber, + _matchedFiber, + newChild.props.children, + expirationTime, + newChild.key, + ); + } + + return updateElement(returnFiber, _matchedFiber, newChild, expirationTime); + } + + case REACT_PORTAL_TYPE: { + var _matchedFiber2 = + existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null; + + return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime); + } + } + + if (isArray(newChild) || getIteratorFn(newChild)) { + var _matchedFiber3 = existingChildren.get(newIdx) || null; + + return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null); + } + + throwOnInvalidObjectType(returnFiber, newChild); + } + + { + if (typeof newChild === 'function') { + warnOnFunctionType(); + } + } + + return null; + } + /** + * Warns if there is a duplicate or missing key + */ + + function warnOnInvalidKey(child, knownKeys) { + { + if (typeof child !== 'object' || child === null) { + return knownKeys; + } + + switch (child.$$typeof) { + case REACT_ELEMENT_TYPE: + case REACT_PORTAL_TYPE: + warnForMissingKey(child); + var key = child.key; + + if (typeof key !== 'string') { + break; + } + + if (knownKeys === null) { + knownKeys = new Set(); + knownKeys.add(key); + break; + } + + if (!knownKeys.has(key)) { + knownKeys.add(key); + break; + } + + warning$1( + false, + 'Encountered two children with the same key, `%s`. ' + + 'Keys should be unique so that components maintain their identity ' + + 'across updates. Non-unique keys may cause children to be ' + + 'duplicated and/or omitted — the behavior is unsupported and ' + + 'could change in a future version.', + key, + ); + break; + + default: + break; + } + } + + return knownKeys; + } + + function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) { + // This algorithm can't optimize by searching from both ends since we + // don't have backpointers on fibers. I'm trying to see how far we can get + // with that model. If it ends up not being worth the tradeoffs, we can + // add it later. + // Even with a two ended optimization, we'd want to optimize for the case + // where there are few changes and brute force the comparison instead of + // going for the Map. It'd like to explore hitting that path first in + // forward-only mode and only go for the Map once we notice that we need + // lots of look ahead. This doesn't handle reversal as well as two ended + // search but that's unusual. Besides, for the two ended optimization to + // work on Iterables, we'd need to copy the whole set. + // In this first iteration, we'll just live with hitting the bad case + // (adding everything to a Map) in for every insert/move. + // If you change this code, also update reconcileChildrenIterator() which + // uses the same algorithm. + { + // First, validate keys. + var knownKeys = null; + + for (var i = 0; i < newChildren.length; i++) { + var child = newChildren[i]; + knownKeys = warnOnInvalidKey(child, knownKeys); + } + } + + var resultingFirstChild = null; + var previousNewFiber = null; + var oldFiber = currentFirstChild; + var lastPlacedIndex = 0; + var newIdx = 0; + var nextOldFiber = null; + + for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) { + if (oldFiber.index > newIdx) { + nextOldFiber = oldFiber; + oldFiber = null; + } else { + nextOldFiber = oldFiber.sibling; + } + + var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime); + + if (newFiber === null) { + // TODO: This breaks on empty slots like null children. That's + // unfortunate because it triggers the slow path all the time. We need + // a better way to communicate whether this was a miss or null, + // boolean, undefined, etc. + if (oldFiber === null) { + oldFiber = nextOldFiber; + } + + break; + } + + if (shouldTrackSideEffects) { + if (oldFiber && newFiber.alternate === null) { + // We matched the slot, but we didn't reuse the existing fiber, so we + // need to delete the existing child. + deleteChild(returnFiber, oldFiber); + } + } + + lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx); + + if (previousNewFiber === null) { + // TODO: Move out of the loop. This only happens for the first run. + resultingFirstChild = newFiber; + } else { + // TODO: Defer siblings if we're not at the right index for this slot. + // I.e. if we had null values before, then we want to defer this + // for each null value. However, we also don't want to call updateSlot + // with the previous one. + previousNewFiber.sibling = newFiber; + } + + previousNewFiber = newFiber; + oldFiber = nextOldFiber; + } + + if (newIdx === newChildren.length) { + // We've reached the end of the new children. We can delete the rest. + deleteRemainingChildren(returnFiber, oldFiber); + return resultingFirstChild; + } + + if (oldFiber === null) { + // If we don't have any more existing children we can choose a fast path + // since the rest will all be insertions. + for (; newIdx < newChildren.length; newIdx++) { + var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime); + + if (_newFiber === null) { + continue; + } + + lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx); + + if (previousNewFiber === null) { + // TODO: Move out of the loop. This only happens for the first run. + resultingFirstChild = _newFiber; + } else { + previousNewFiber.sibling = _newFiber; + } + + previousNewFiber = _newFiber; + } + + return resultingFirstChild; + } // Add all children to a key map for quick lookups. + + var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves. + + for (; newIdx < newChildren.length; newIdx++) { + var _newFiber2 = updateFromMap( + existingChildren, + returnFiber, + newIdx, + newChildren[newIdx], + expirationTime, + ); + + if (_newFiber2 !== null) { + if (shouldTrackSideEffects) { + if (_newFiber2.alternate !== null) { + // The new fiber is a work in progress, but if there exists a + // current, that means that we reused the fiber. We need to delete + // it from the child list so that we don't add it to the deletion + // list. + existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key); + } + } + + lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx); + + if (previousNewFiber === null) { + resultingFirstChild = _newFiber2; + } else { + previousNewFiber.sibling = _newFiber2; + } + + previousNewFiber = _newFiber2; + } + } + + if (shouldTrackSideEffects) { + // Any existing children that weren't consumed above were deleted. We need + // to add them to the deletion list. + existingChildren.forEach(function (child) { + return deleteChild(returnFiber, child); + }); + } + + return resultingFirstChild; + } + + function reconcileChildrenIterator( + returnFiber, + currentFirstChild, + newChildrenIterable, + expirationTime, + ) { + // This is the same implementation as reconcileChildrenArray(), + // but using the iterator instead. + var iteratorFn = getIteratorFn(newChildrenIterable); + + if (!(typeof iteratorFn === 'function')) { + { + throw Error( + 'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + + { + // We don't support rendering Generators because it's a mutation. + // See https://github.com/facebook/react/issues/12995 + if ( + typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag + newChildrenIterable[Symbol.toStringTag] === 'Generator' + ) { + !didWarnAboutGenerators + ? warning$1( + false, + 'Using Generators as children is unsupported and will likely yield ' + + 'unexpected results because enumerating a generator mutates it. ' + + 'You may convert it to an array with `Array.from()` or the ' + + '`[...spread]` operator before rendering. Keep in mind ' + + 'you might need to polyfill these features for older browsers.', + ) + : void 0; + didWarnAboutGenerators = true; + } // Warn about using Maps as children + + if (newChildrenIterable.entries === iteratorFn) { + !didWarnAboutMaps + ? warning$1( + false, + 'Using Maps as children is unsupported and will likely yield ' + + 'unexpected results. Convert it to a sequence/iterable of keyed ' + + 'ReactElements instead.', + ) + : void 0; + didWarnAboutMaps = true; + } // First, validate keys. + // We'll get a different iterator later for the main pass. + + var _newChildren = iteratorFn.call(newChildrenIterable); + + if (_newChildren) { + var knownKeys = null; + + var _step = _newChildren.next(); + + for (; !_step.done; _step = _newChildren.next()) { + var child = _step.value; + knownKeys = warnOnInvalidKey(child, knownKeys); + } + } + } + + var newChildren = iteratorFn.call(newChildrenIterable); + + if (!(newChildren != null)) { + { + throw Error('An iterable object provided no iterator.'); + } + } + + var resultingFirstChild = null; + var previousNewFiber = null; + var oldFiber = currentFirstChild; + var lastPlacedIndex = 0; + var newIdx = 0; + var nextOldFiber = null; + var step = newChildren.next(); + + for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) { + if (oldFiber.index > newIdx) { + nextOldFiber = oldFiber; + oldFiber = null; + } else { + nextOldFiber = oldFiber.sibling; + } + + var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime); + + if (newFiber === null) { + // TODO: This breaks on empty slots like null children. That's + // unfortunate because it triggers the slow path all the time. We need + // a better way to communicate whether this was a miss or null, + // boolean, undefined, etc. + if (oldFiber === null) { + oldFiber = nextOldFiber; + } + + break; + } + + if (shouldTrackSideEffects) { + if (oldFiber && newFiber.alternate === null) { + // We matched the slot, but we didn't reuse the existing fiber, so we + // need to delete the existing child. + deleteChild(returnFiber, oldFiber); + } + } + + lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx); + + if (previousNewFiber === null) { + // TODO: Move out of the loop. This only happens for the first run. + resultingFirstChild = newFiber; + } else { + // TODO: Defer siblings if we're not at the right index for this slot. + // I.e. if we had null values before, then we want to defer this + // for each null value. However, we also don't want to call updateSlot + // with the previous one. + previousNewFiber.sibling = newFiber; + } + + previousNewFiber = newFiber; + oldFiber = nextOldFiber; + } + + if (step.done) { + // We've reached the end of the new children. We can delete the rest. + deleteRemainingChildren(returnFiber, oldFiber); + return resultingFirstChild; + } + + if (oldFiber === null) { + // If we don't have any more existing children we can choose a fast path + // since the rest will all be insertions. + for (; !step.done; newIdx++, step = newChildren.next()) { + var _newFiber3 = createChild(returnFiber, step.value, expirationTime); + + if (_newFiber3 === null) { + continue; + } + + lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx); + + if (previousNewFiber === null) { + // TODO: Move out of the loop. This only happens for the first run. + resultingFirstChild = _newFiber3; + } else { + previousNewFiber.sibling = _newFiber3; + } + + previousNewFiber = _newFiber3; + } + + return resultingFirstChild; + } // Add all children to a key map for quick lookups. + + var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves. + + for (; !step.done; newIdx++, step = newChildren.next()) { + var _newFiber4 = updateFromMap( + existingChildren, + returnFiber, + newIdx, + step.value, + expirationTime, + ); + + if (_newFiber4 !== null) { + if (shouldTrackSideEffects) { + if (_newFiber4.alternate !== null) { + // The new fiber is a work in progress, but if there exists a + // current, that means that we reused the fiber. We need to delete + // it from the child list so that we don't add it to the deletion + // list. + existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key); + } + } + + lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx); + + if (previousNewFiber === null) { + resultingFirstChild = _newFiber4; + } else { + previousNewFiber.sibling = _newFiber4; + } + + previousNewFiber = _newFiber4; + } + } + + if (shouldTrackSideEffects) { + // Any existing children that weren't consumed above were deleted. We need + // to add them to the deletion list. + existingChildren.forEach(function (child) { + return deleteChild(returnFiber, child); + }); + } + + return resultingFirstChild; + } + + function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) { + // There's no need to check for keys on text nodes since we don't have a + // way to define them. + if (currentFirstChild !== null && currentFirstChild.tag === HostText) { + // We already have an existing node so let's just update it and delete + // the rest. + deleteRemainingChildren(returnFiber, currentFirstChild.sibling); + var existing = useFiber(currentFirstChild, textContent, expirationTime); + existing.return = returnFiber; + return existing; + } // The existing first child is not a text node so we need to create one + // and delete the existing ones. + + deleteRemainingChildren(returnFiber, currentFirstChild); + var created = createFiberFromText(textContent, returnFiber.mode, expirationTime); + created.return = returnFiber; + return created; + } + + function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) { + var key = element.key; + var child = currentFirstChild; + + while (child !== null) { + // TODO: If key === null and child.key === null, then this only applies to + // the first item in the list. + if (child.key === key) { + if ( + child.tag === Fragment + ? element.type === REACT_FRAGMENT_TYPE + : child.elementType === element.type || // Keep this check inline so it only runs on the false path: + isCompatibleFamilyForHotReloading(child, element) + ) { + deleteRemainingChildren(returnFiber, child.sibling); + var existing = useFiber( + child, + element.type === REACT_FRAGMENT_TYPE ? element.props.children : element.props, + expirationTime, + ); + existing.ref = coerceRef(returnFiber, child, element); + existing.return = returnFiber; + + { + existing._debugSource = element._source; + existing._debugOwner = element._owner; + } + + return existing; + } else { + deleteRemainingChildren(returnFiber, child); + break; + } + } else { + deleteChild(returnFiber, child); + } + + child = child.sibling; + } + + if (element.type === REACT_FRAGMENT_TYPE) { + var created = createFiberFromFragment( + element.props.children, + returnFiber.mode, + expirationTime, + element.key, + ); + created.return = returnFiber; + return created; + } else { + var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime); + + _created4.ref = coerceRef(returnFiber, currentFirstChild, element); + _created4.return = returnFiber; + return _created4; + } + } + + function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) { + var key = portal.key; + var child = currentFirstChild; + + while (child !== null) { + // TODO: If key === null and child.key === null, then this only applies to + // the first item in the list. + if (child.key === key) { + if ( + child.tag === HostPortal && + child.stateNode.containerInfo === portal.containerInfo && + child.stateNode.implementation === portal.implementation + ) { + deleteRemainingChildren(returnFiber, child.sibling); + var existing = useFiber(child, portal.children || [], expirationTime); + existing.return = returnFiber; + return existing; + } else { + deleteRemainingChildren(returnFiber, child); + break; + } + } else { + deleteChild(returnFiber, child); + } + + child = child.sibling; + } + + var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime); + created.return = returnFiber; + return created; + } // This API will tag the children with the side-effect of the reconciliation + // itself. They will be added to the side-effect list as we pass through the + // children and the parent. + + function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) { + // This function is not recursive. + // If the top level item is an array, we treat it as a set of children, + // not as a fragment. Nested arrays on the other hand will be treated as + // fragment nodes. Recursion happens at the normal flow. + // Handle top level unkeyed fragments as if they were arrays. + // This leads to an ambiguity between <>{[...]}</> and <>...</>. + // We treat the ambiguous cases above the same. + var isUnkeyedTopLevelFragment = + typeof newChild === 'object' && + newChild !== null && + newChild.type === REACT_FRAGMENT_TYPE && + newChild.key === null; + + if (isUnkeyedTopLevelFragment) { + newChild = newChild.props.children; + } // Handle object types + + var isObject = typeof newChild === 'object' && newChild !== null; + + if (isObject) { + switch (newChild.$$typeof) { + case REACT_ELEMENT_TYPE: + return placeSingleChild( + reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime), + ); + + case REACT_PORTAL_TYPE: + return placeSingleChild( + reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime), + ); + } + } + + if (typeof newChild === 'string' || typeof newChild === 'number') { + return placeSingleChild( + reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime), + ); + } + + if (isArray(newChild)) { + return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime); + } + + if (getIteratorFn(newChild)) { + return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime); + } + + if (isObject) { + throwOnInvalidObjectType(returnFiber, newChild); + } + + { + if (typeof newChild === 'function') { + warnOnFunctionType(); + } + } + + if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) { + // If the new child is undefined, and the return fiber is a composite + // component, throw an error. If Fiber return types are disabled, + // we already threw above. + switch (returnFiber.tag) { + case ClassComponent: { + { + var instance = returnFiber.stateNode; + + if (instance.render._isMockFunction) { + // We allow auto-mocks to proceed as if they're returning null. + break; + } + } + } + // Intentionally fall through to the next case, which handles both + // functions and classes + // eslint-disable-next-lined no-fallthrough + + case FunctionComponent: { + var Component = returnFiber.type; + + { + { + throw Error( + (Component.displayName || Component.name || 'Component') + + '(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.', + ); + } + } + } + } + } // Remaining cases are all treated as empty. + + return deleteRemainingChildren(returnFiber, currentFirstChild); + } + + return reconcileChildFibers; + } + + var reconcileChildFibers = ChildReconciler(true); + var mountChildFibers = ChildReconciler(false); + function cloneChildFibers(current$$1, workInProgress) { + if (!(current$$1 === null || workInProgress.child === current$$1.child)) { + { + throw Error('Resuming work not yet implemented.'); + } + } + + if (workInProgress.child === null) { + return; + } + + var currentChild = workInProgress.child; + var newChild = createWorkInProgress( + currentChild, + currentChild.pendingProps, + currentChild.expirationTime, + ); + workInProgress.child = newChild; + newChild.return = workInProgress; + + while (currentChild.sibling !== null) { + currentChild = currentChild.sibling; + newChild = newChild.sibling = createWorkInProgress( + currentChild, + currentChild.pendingProps, + currentChild.expirationTime, + ); + newChild.return = workInProgress; + } + + newChild.sibling = null; + } // Reset a workInProgress child set to prepare it for a second pass. + + function resetChildFibers(workInProgress, renderExpirationTime) { + var child = workInProgress.child; + + while (child !== null) { + resetWorkInProgress(child, renderExpirationTime); + child = child.sibling; + } + } + + var NO_CONTEXT = {}; + var contextStackCursor$1 = createCursor(NO_CONTEXT); + var contextFiberStackCursor = createCursor(NO_CONTEXT); + var rootInstanceStackCursor = createCursor(NO_CONTEXT); + + function requiredContext(c) { + if (!(c !== NO_CONTEXT)) { + { + throw Error( + 'Expected host context to exist. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + + return c; + } + + function getRootHostContainer() { + var rootInstance = requiredContext(rootInstanceStackCursor.current); + return rootInstance; + } + + function pushHostContainer(fiber, nextRootInstance) { + // Push current root instance onto the stack; + // This allows us to reset root when portals are popped. + push(rootInstanceStackCursor, nextRootInstance, fiber); // Track the context and the Fiber that provided it. + // This enables us to pop only Fibers that provide unique contexts. + + push(contextFiberStackCursor, fiber, fiber); // Finally, we need to push the host context to the stack. + // However, we can't just call getRootHostContext() and push it because + // we'd have a different number of entries on the stack depending on + // whether getRootHostContext() throws somewhere in renderer code or not. + // So we push an empty value first. This lets us safely unwind on errors. + + push(contextStackCursor$1, NO_CONTEXT, fiber); + var nextRootContext = getRootHostContext(nextRootInstance); // Now that we know this function doesn't throw, replace it. + + pop(contextStackCursor$1, fiber); + push(contextStackCursor$1, nextRootContext, fiber); + } + + function popHostContainer(fiber) { + pop(contextStackCursor$1, fiber); + pop(contextFiberStackCursor, fiber); + pop(rootInstanceStackCursor, fiber); + } + + function getHostContext() { + var context = requiredContext(contextStackCursor$1.current); + return context; + } + + function pushHostContext(fiber) { + var rootInstance = requiredContext(rootInstanceStackCursor.current); + var context = requiredContext(contextStackCursor$1.current); + var nextContext = getChildHostContext(context, fiber.type, rootInstance); // Don't push this Fiber's context unless it's unique. + + if (context === nextContext) { + return; + } // Track the context and the Fiber that provided it. + // This enables us to pop only Fibers that provide unique contexts. + + push(contextFiberStackCursor, fiber, fiber); + push(contextStackCursor$1, nextContext, fiber); + } + + function popHostContext(fiber) { + // Do not pop unless this Fiber provided the current context. + // pushHostContext() only pushes Fibers that provide unique contexts. + if (contextFiberStackCursor.current !== fiber) { + return; + } + + pop(contextStackCursor$1, fiber); + pop(contextFiberStackCursor, fiber); + } + + var DefaultSuspenseContext = 0; // The Suspense Context is split into two parts. The lower bits is + // inherited deeply down the subtree. The upper bits only affect + // this immediate suspense boundary and gets reset each new + // boundary or suspense list. + + var SubtreeSuspenseContextMask = 1; // Subtree Flags: + // InvisibleParentSuspenseContext indicates that one of our parent Suspense + // boundaries is not currently showing visible main content. + // Either because it is already showing a fallback or is not mounted at all. + // We can use this to determine if it is desirable to trigger a fallback at + // the parent. If not, then we might need to trigger undesirable boundaries + // and/or suspend the commit to avoid hiding the parent content. + + var InvisibleParentSuspenseContext = 1; // Shallow Flags: + // ForceSuspenseFallback can be used by SuspenseList to force newly added + // items into their fallback state during one of the render passes. + + var ForceSuspenseFallback = 2; + var suspenseStackCursor = createCursor(DefaultSuspenseContext); + function hasSuspenseContext(parentContext, flag) { + return (parentContext & flag) !== 0; + } + function setDefaultShallowSuspenseContext(parentContext) { + return parentContext & SubtreeSuspenseContextMask; + } + function setShallowSuspenseContext(parentContext, shallowContext) { + return (parentContext & SubtreeSuspenseContextMask) | shallowContext; + } + function addSubtreeSuspenseContext(parentContext, subtreeContext) { + return parentContext | subtreeContext; + } + function pushSuspenseContext(fiber, newContext) { + push(suspenseStackCursor, newContext, fiber); + } + function popSuspenseContext(fiber) { + pop(suspenseStackCursor, fiber); + } + + function shouldCaptureSuspense(workInProgress, hasInvisibleParent) { + // If it was the primary children that just suspended, capture and render the + // fallback. Otherwise, don't capture and bubble to the next boundary. + var nextState = workInProgress.memoizedState; + + if (nextState !== null) { + if (nextState.dehydrated !== null) { + // A dehydrated boundary always captures. + return true; + } + + return false; + } + + var props = workInProgress.memoizedProps; // In order to capture, the Suspense component must have a fallback prop. + + if (props.fallback === undefined) { + return false; + } // Regular boundaries always capture. + + if (props.unstable_avoidThisFallback !== true) { + return true; + } // If it's a boundary we should avoid, then we prefer to bubble up to the + // parent boundary if it is currently invisible. + + if (hasInvisibleParent) { + return false; + } // If the parent is not able to handle it, we must handle it. + + return true; + } + function findFirstSuspended(row) { + var node = row; + + while (node !== null) { + if (node.tag === SuspenseComponent) { + var state = node.memoizedState; + + if (state !== null) { + var dehydrated = state.dehydrated; + + if ( + dehydrated === null || + isSuspenseInstancePending(dehydrated) || + isSuspenseInstanceFallback(dehydrated) + ) { + return node; + } + } + } else if ( + node.tag === SuspenseListComponent && // revealOrder undefined can't be trusted because it don't + // keep track of whether it suspended or not. + node.memoizedProps.revealOrder !== undefined + ) { + var didSuspend = (node.effectTag & DidCapture) !== NoEffect; + + if (didSuspend) { + return node; + } + } else if (node.child !== null) { + node.child.return = node; + node = node.child; + continue; + } + + if (node === row) { + return null; + } + + while (node.sibling === null) { + if (node.return === null || node.return === row) { + return null; + } + + node = node.return; + } + + node.sibling.return = node.return; + node = node.sibling; + } + + return null; + } + + var emptyObject = {}; + var isArray$2 = Array.isArray; + function createResponderInstance(responder, responderProps, responderState, fiber) { + return { + fiber: fiber, + props: responderProps, + responder: responder, + rootEventTypes: null, + state: responderState, + }; + } + + function mountEventResponder$1( + responder, + responderProps, + fiber, + respondersMap, + rootContainerInstance, + ) { + var responderState = emptyObject; + var getInitialState = responder.getInitialState; + + if (getInitialState !== null) { + responderState = getInitialState(responderProps); + } + + var responderInstance = createResponderInstance(responder, responderProps, responderState, fiber); + + if (!rootContainerInstance) { + var node = fiber; + + while (node !== null) { + var tag = node.tag; + + if (tag === HostComponent) { + rootContainerInstance = node.stateNode; + break; + } else if (tag === HostRoot) { + rootContainerInstance = node.stateNode.containerInfo; + break; + } + + node = node.return; + } + } + + mountResponderInstance( + responder, + responderInstance, + responderProps, + responderState, + rootContainerInstance, + ); + respondersMap.set(responder, responderInstance); + } + + function updateEventListener( + listener, + fiber, + visistedResponders, + respondersMap, + rootContainerInstance, + ) { + var responder; + var props; + + if (listener) { + responder = listener.responder; + props = listener.props; + } + + if (!(responder && responder.$$typeof === REACT_RESPONDER_TYPE)) { + { + throw Error( + 'An invalid value was used as an event listener. Expect one or many event listeners created via React.unstable_useResponder().', + ); + } + } + + var listenerProps = props; + + if (visistedResponders.has(responder)) { + // show warning + { + warning$1( + false, + 'Duplicate event responder "%s" found in event listeners. ' + + 'Event listeners passed to elements cannot use the same event responder more than once.', + responder.displayName, + ); + } + + return; + } + + visistedResponders.add(responder); + var responderInstance = respondersMap.get(responder); + + if (responderInstance === undefined) { + // Mount (happens in either complete or commit phase) + mountEventResponder$1(responder, listenerProps, fiber, respondersMap, rootContainerInstance); + } else { + // Update (happens during commit phase only) + responderInstance.props = listenerProps; + responderInstance.fiber = fiber; + } + } + + function updateEventListeners(listeners, fiber, rootContainerInstance) { + var visistedResponders = new Set(); + var dependencies = fiber.dependencies; + + if (listeners != null) { + if (dependencies === null) { + dependencies = fiber.dependencies = { + expirationTime: NoWork, + firstContext: null, + responders: new Map(), + }; + } + + var respondersMap = dependencies.responders; + + if (respondersMap === null) { + respondersMap = new Map(); + } + + if (isArray$2(listeners)) { + for (var i = 0, length = listeners.length; i < length; i++) { + var listener = listeners[i]; + updateEventListener( + listener, + fiber, + visistedResponders, + respondersMap, + rootContainerInstance, + ); + } + } else { + updateEventListener( + listeners, + fiber, + visistedResponders, + respondersMap, + rootContainerInstance, + ); + } + } + + if (dependencies !== null) { + var _respondersMap = dependencies.responders; + + if (_respondersMap !== null) { + // Unmount + var mountedResponders = Array.from(_respondersMap.keys()); + + for (var _i = 0, _length = mountedResponders.length; _i < _length; _i++) { + var mountedResponder = mountedResponders[_i]; + + if (!visistedResponders.has(mountedResponder)) { + var responderInstance = _respondersMap.get(mountedResponder); + + unmountResponderInstance(responderInstance); + + _respondersMap.delete(mountedResponder); + } + } + } + } + } + function createResponderListener(responder, props) { + var eventResponderListener = { + responder: responder, + props: props, + }; + + { + Object.freeze(eventResponderListener); + } + + return eventResponderListener; + } + + var NoEffect$1 = + /* */ + 0; + var UnmountSnapshot = + /* */ + 2; + var UnmountMutation = + /* */ + 4; + var MountMutation = + /* */ + 8; + var UnmountLayout = + /* */ + 16; + var MountLayout = + /* */ + 32; + var MountPassive = + /* */ + 64; + var UnmountPassive = + /* */ + 128; + + var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher; + var ReactCurrentBatchConfig$1 = ReactSharedInternals.ReactCurrentBatchConfig; + var didWarnAboutMismatchedHooksForComponent; + + { + didWarnAboutMismatchedHooksForComponent = new Set(); + } + + // These are set right before calling the component. + var renderExpirationTime$1 = NoWork; // The work-in-progress fiber. I've named it differently to distinguish it from + // the work-in-progress hook. + + var currentlyRenderingFiber$1 = null; // Hooks are stored as a linked list on the fiber's memoizedState field. The + // current hook list is the list that belongs to the current fiber. The + // work-in-progress hook list is a new list that will be added to the + // work-in-progress fiber. + + var currentHook = null; + var nextCurrentHook = null; + var firstWorkInProgressHook = null; + var workInProgressHook = null; + var nextWorkInProgressHook = null; + var remainingExpirationTime = NoWork; + var componentUpdateQueue = null; + var sideEffectTag = 0; // Updates scheduled during render will trigger an immediate re-render at the + // end of the current pass. We can't store these updates on the normal queue, + // because if the work is aborted, they should be discarded. Because this is + // a relatively rare case, we also don't want to add an additional field to + // either the hook or queue object types. So we store them in a lazily create + // map of queue -> render-phase updates, which are discarded once the component + // completes without re-rendering. + // Whether an update was scheduled during the currently executing render pass. + + var didScheduleRenderPhaseUpdate = false; // Lazily created map of render-phase updates + + var renderPhaseUpdates = null; // Counter to prevent infinite loops. + + var numberOfReRenders = 0; + var RE_RENDER_LIMIT = 25; // In DEV, this is the name of the currently executing primitive hook + + var currentHookNameInDev = null; // In DEV, this list ensures that hooks are called in the same order between renders. + // The list stores the order of hooks used during the initial render (mount). + // Subsequent renders (updates) reference this list. + + var hookTypesDev = null; + var hookTypesUpdateIndexDev = -1; // In DEV, this tracks whether currently rendering component needs to ignore + // the dependencies for Hooks that need them (e.g. useEffect or useMemo). + // When true, such Hooks will always be "remounted". Only used during hot reload. + + var ignorePreviousDependencies = false; + + function mountHookTypesDev() { + { + var hookName = currentHookNameInDev; + + if (hookTypesDev === null) { + hookTypesDev = [hookName]; + } else { + hookTypesDev.push(hookName); + } + } + } + + function updateHookTypesDev() { + { + var hookName = currentHookNameInDev; + + if (hookTypesDev !== null) { + hookTypesUpdateIndexDev++; + + if (hookTypesDev[hookTypesUpdateIndexDev] !== hookName) { + warnOnHookMismatchInDev(hookName); + } + } + } + } + + function checkDepsAreArrayDev(deps) { + { + if (deps !== undefined && deps !== null && !Array.isArray(deps)) { + // Verify deps, but only on mount to avoid extra checks. + // It's unlikely their type would change as usually you define them inline. + warning$1( + false, + '%s received a final argument that is not an array (instead, received `%s`). When ' + + 'specified, the final argument must be an array.', + currentHookNameInDev, + typeof deps, + ); + } + } + } + + function warnOnHookMismatchInDev(currentHookName) { + { + var componentName = getComponentName(currentlyRenderingFiber$1.type); + + if (!didWarnAboutMismatchedHooksForComponent.has(componentName)) { + didWarnAboutMismatchedHooksForComponent.add(componentName); + + if (hookTypesDev !== null) { + var table = ''; + var secondColumnStart = 30; + + for (var i = 0; i <= hookTypesUpdateIndexDev; i++) { + var oldHookName = hookTypesDev[i]; + var newHookName = i === hookTypesUpdateIndexDev ? currentHookName : oldHookName; + var row = i + 1 + '. ' + oldHookName; // Extra space so second column lines up + // lol @ IE not supporting String#repeat + + while (row.length < secondColumnStart) { + row += ' '; + } + + row += newHookName + '\n'; + table += row; + } + + warning$1( + false, + 'React has detected a change in the order of Hooks called by %s. ' + + 'This will lead to bugs and errors if not fixed. ' + + 'For more information, read the Rules of Hooks: https://fb.me/rules-of-hooks\n\n' + + ' Previous render Next render\n' + + ' ------------------------------------------------------\n' + + '%s' + + ' ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', + componentName, + table, + ); + } + } + } + } + + function throwInvalidHookError() { + { + { + throw Error( + 'Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.', + ); + } + } + } + + function areHookInputsEqual(nextDeps, prevDeps) { + { + if (ignorePreviousDependencies) { + // Only true when this component is being hot reloaded. + return false; + } + } + + if (prevDeps === null) { + { + warning$1( + false, + '%s received a final argument during this render, but not during ' + + 'the previous render. Even though the final argument is optional, ' + + 'its type cannot change between renders.', + currentHookNameInDev, + ); + } + + return false; + } + + { + // Don't bother comparing lengths in prod because these arrays should be + // passed inline. + if (nextDeps.length !== prevDeps.length) { + warning$1( + false, + 'The final argument passed to %s changed size between renders. The ' + + 'order and size of this array must remain constant.\n\n' + + 'Previous: %s\n' + + 'Incoming: %s', + currentHookNameInDev, + '[' + prevDeps.join(', ') + ']', + '[' + nextDeps.join(', ') + ']', + ); + } + } + + for (var i = 0; i < prevDeps.length && i < nextDeps.length; i++) { + if (is$1(nextDeps[i], prevDeps[i])) { + continue; + } + + return false; + } + + return true; + } + + function renderWithHooks( + current, + workInProgress, + Component, + props, + refOrContext, + nextRenderExpirationTime, + ) { + renderExpirationTime$1 = nextRenderExpirationTime; + currentlyRenderingFiber$1 = workInProgress; + nextCurrentHook = current !== null ? current.memoizedState : null; + + { + hookTypesDev = current !== null ? current._debugHookTypes : null; + hookTypesUpdateIndexDev = -1; // Used for hot reloading: + + ignorePreviousDependencies = current !== null && current.type !== workInProgress.type; + } // The following should have already been reset + // currentHook = null; + // workInProgressHook = null; + // remainingExpirationTime = NoWork; + // componentUpdateQueue = null; + // didScheduleRenderPhaseUpdate = false; + // renderPhaseUpdates = null; + // numberOfReRenders = 0; + // sideEffectTag = 0; + // TODO Warn if no hooks are used at all during mount, then some are used during update. + // Currently we will identify the update render as a mount because nextCurrentHook === null. + // This is tricky because it's valid for certain types of components (e.g. React.lazy) + // Using nextCurrentHook to differentiate between mount/update only works if at least one stateful hook is used. + // Non-stateful hooks (e.g. context) don't get added to memoizedState, + // so nextCurrentHook would be null during updates and mounts. + + { + if (nextCurrentHook !== null) { + ReactCurrentDispatcher$1.current = HooksDispatcherOnUpdateInDEV; + } else if (hookTypesDev !== null) { + // This dispatcher handles an edge case where a component is updating, + // but no stateful hooks have been used. + // We want to match the production code behavior (which will use HooksDispatcherOnMount), + // but with the extra DEV validation to ensure hooks ordering hasn't changed. + // This dispatcher does that. + ReactCurrentDispatcher$1.current = HooksDispatcherOnMountWithHookTypesInDEV; + } else { + ReactCurrentDispatcher$1.current = HooksDispatcherOnMountInDEV; + } + } + + var children = Component(props, refOrContext); + + if (didScheduleRenderPhaseUpdate) { + do { + didScheduleRenderPhaseUpdate = false; + numberOfReRenders += 1; + + { + // Even when hot reloading, allow dependencies to stabilize + // after first render to prevent infinite render phase updates. + ignorePreviousDependencies = false; + } // Start over from the beginning of the list + + nextCurrentHook = current !== null ? current.memoizedState : null; + nextWorkInProgressHook = firstWorkInProgressHook; + currentHook = null; + workInProgressHook = null; + componentUpdateQueue = null; + + { + // Also validate hook order for cascading updates. + hookTypesUpdateIndexDev = -1; + } + + ReactCurrentDispatcher$1.current = HooksDispatcherOnUpdateInDEV; + children = Component(props, refOrContext); + } while (didScheduleRenderPhaseUpdate); + + renderPhaseUpdates = null; + numberOfReRenders = 0; + } // We can assume the previous dispatcher is always this one, since we set it + // at the beginning of the render phase and there's no re-entrancy. + + ReactCurrentDispatcher$1.current = ContextOnlyDispatcher; + var renderedWork = currentlyRenderingFiber$1; + renderedWork.memoizedState = firstWorkInProgressHook; + renderedWork.expirationTime = remainingExpirationTime; + renderedWork.updateQueue = componentUpdateQueue; + renderedWork.effectTag |= sideEffectTag; + + { + renderedWork._debugHookTypes = hookTypesDev; + } // This check uses currentHook so that it works the same in DEV and prod bundles. + // hookTypesDev could catch more cases (e.g. context) but only in DEV bundles. + + var didRenderTooFewHooks = currentHook !== null && currentHook.next !== null; + renderExpirationTime$1 = NoWork; + currentlyRenderingFiber$1 = null; + currentHook = null; + nextCurrentHook = null; + firstWorkInProgressHook = null; + workInProgressHook = null; + nextWorkInProgressHook = null; + + { + currentHookNameInDev = null; + hookTypesDev = null; + hookTypesUpdateIndexDev = -1; + } + + remainingExpirationTime = NoWork; + componentUpdateQueue = null; + sideEffectTag = 0; // These were reset above + // didScheduleRenderPhaseUpdate = false; + // renderPhaseUpdates = null; + // numberOfReRenders = 0; + + if (!!didRenderTooFewHooks) { + { + throw Error( + 'Rendered fewer hooks than expected. This may be caused by an accidental early return statement.', + ); + } + } + + return children; + } + function bailoutHooks(current, workInProgress, expirationTime) { + workInProgress.updateQueue = current.updateQueue; + workInProgress.effectTag &= ~(Passive | Update); + + if (current.expirationTime <= expirationTime) { + current.expirationTime = NoWork; + } + } + function resetHooks() { + // We can assume the previous dispatcher is always this one, since we set it + // at the beginning of the render phase and there's no re-entrancy. + ReactCurrentDispatcher$1.current = ContextOnlyDispatcher; // This is used to reset the state of this module when a component throws. + // It's also called inside mountIndeterminateComponent if we determine the + // component is a module-style component. + + renderExpirationTime$1 = NoWork; + currentlyRenderingFiber$1 = null; + currentHook = null; + nextCurrentHook = null; + firstWorkInProgressHook = null; + workInProgressHook = null; + nextWorkInProgressHook = null; + + { + hookTypesDev = null; + hookTypesUpdateIndexDev = -1; + currentHookNameInDev = null; + } + + remainingExpirationTime = NoWork; + componentUpdateQueue = null; + sideEffectTag = 0; + didScheduleRenderPhaseUpdate = false; + renderPhaseUpdates = null; + numberOfReRenders = 0; + } + + function mountWorkInProgressHook() { + var hook = { + memoizedState: null, + baseState: null, + queue: null, + baseUpdate: null, + next: null, + }; + + if (workInProgressHook === null) { + // This is the first hook in the list + firstWorkInProgressHook = workInProgressHook = hook; + } else { + // Append to the end of the list + workInProgressHook = workInProgressHook.next = hook; + } + + return workInProgressHook; + } + + function updateWorkInProgressHook() { + // This function is used both for updates and for re-renders triggered by a + // render phase update. It assumes there is either a current hook we can + // clone, or a work-in-progress hook from a previous render pass that we can + // use as a base. When we reach the end of the base list, we must switch to + // the dispatcher used for mounts. + if (nextWorkInProgressHook !== null) { + // There's already a work-in-progress. Reuse it. + workInProgressHook = nextWorkInProgressHook; + nextWorkInProgressHook = workInProgressHook.next; + currentHook = nextCurrentHook; + nextCurrentHook = currentHook !== null ? currentHook.next : null; + } else { + // Clone from the current hook. + if (!(nextCurrentHook !== null)) { + { + throw Error('Rendered more hooks than during the previous render.'); + } + } + + currentHook = nextCurrentHook; + var newHook = { + memoizedState: currentHook.memoizedState, + baseState: currentHook.baseState, + queue: currentHook.queue, + baseUpdate: currentHook.baseUpdate, + next: null, + }; + + if (workInProgressHook === null) { + // This is the first hook in the list. + workInProgressHook = firstWorkInProgressHook = newHook; + } else { + // Append to the end of the list. + workInProgressHook = workInProgressHook.next = newHook; + } + + nextCurrentHook = currentHook.next; + } + + return workInProgressHook; + } + + function createFunctionComponentUpdateQueue() { + return { + lastEffect: null, + }; + } + + function basicStateReducer(state, action) { + return typeof action === 'function' ? action(state) : action; + } + + function mountReducer(reducer, initialArg, init) { + var hook = mountWorkInProgressHook(); + var initialState; + + if (init !== undefined) { + initialState = init(initialArg); + } else { + initialState = initialArg; + } + + hook.memoizedState = hook.baseState = initialState; + var queue = (hook.queue = { + last: null, + dispatch: null, + lastRenderedReducer: reducer, + lastRenderedState: initialState, + }); + var dispatch = (queue.dispatch = dispatchAction.bind( + null, // Flow doesn't know this is non-null, but we do. + currentlyRenderingFiber$1, + queue, + )); + return [hook.memoizedState, dispatch]; + } + + function updateReducer(reducer, initialArg, init) { + var hook = updateWorkInProgressHook(); + var queue = hook.queue; + + if (!(queue !== null)) { + { + throw Error('Should have a queue. This is likely a bug in React. Please file an issue.'); + } + } + + queue.lastRenderedReducer = reducer; + + if (numberOfReRenders > 0) { + // This is a re-render. Apply the new render phase updates to the previous + // work-in-progress hook. + var _dispatch = queue.dispatch; + + if (renderPhaseUpdates !== null) { + // Render phase updates are stored in a map of queue -> linked list + var firstRenderPhaseUpdate = renderPhaseUpdates.get(queue); + + if (firstRenderPhaseUpdate !== undefined) { + renderPhaseUpdates.delete(queue); + var newState = hook.memoizedState; + var update = firstRenderPhaseUpdate; + + do { + // Process this render phase update. We don't have to check the + // priority because it will always be the same as the current + // render's. + var action = update.action; + newState = reducer(newState, action); + update = update.next; + } while (update !== null); // Mark that the fiber performed work, but only if the new state is + // different from the current state. + + if (!is$1(newState, hook.memoizedState)) { + markWorkInProgressReceivedUpdate(); + } + + hook.memoizedState = newState; // Don't persist the state accumulated from the render phase updates to + // the base state unless the queue is empty. + // TODO: Not sure if this is the desired semantics, but it's what we + // do for gDSFP. I can't remember why. + + if (hook.baseUpdate === queue.last) { + hook.baseState = newState; + } + + queue.lastRenderedState = newState; + return [newState, _dispatch]; + } + } + + return [hook.memoizedState, _dispatch]; + } // The last update in the entire queue + + var last = queue.last; // The last update that is part of the base state. + + var baseUpdate = hook.baseUpdate; + var baseState = hook.baseState; // Find the first unprocessed update. + + var first; + + if (baseUpdate !== null) { + if (last !== null) { + // For the first update, the queue is a circular linked list where + // `queue.last.next = queue.first`. Once the first update commits, and + // the `baseUpdate` is no longer empty, we can unravel the list. + last.next = null; + } + + first = baseUpdate.next; + } else { + first = last !== null ? last.next : null; + } + + if (first !== null) { + var _newState = baseState; + var newBaseState = null; + var newBaseUpdate = null; + var prevUpdate = baseUpdate; + var _update = first; + var didSkip = false; + + do { + var updateExpirationTime = _update.expirationTime; + + if (updateExpirationTime < renderExpirationTime$1) { + // Priority is insufficient. Skip this update. If this is the first + // skipped update, the previous update/state is the new base + // update/state. + if (!didSkip) { + didSkip = true; + newBaseUpdate = prevUpdate; + newBaseState = _newState; + } // Update the remaining priority in the queue. + + if (updateExpirationTime > remainingExpirationTime) { + remainingExpirationTime = updateExpirationTime; + markUnprocessedUpdateTime(remainingExpirationTime); + } + } else { + // This update does have sufficient priority. + // Mark the event time of this update as relevant to this render pass. + // TODO: This should ideally use the true event time of this update rather than + // its priority which is a derived and not reverseable value. + // TODO: We should skip this update if it was already committed but currently + // we have no way of detecting the difference between a committed and suspended + // update here. + markRenderEventTimeAndConfig(updateExpirationTime, _update.suspenseConfig); // Process this update. + + if (_update.eagerReducer === reducer) { + // If this update was processed eagerly, and its reducer matches the + // current reducer, we can use the eagerly computed state. + _newState = _update.eagerState; + } else { + var _action = _update.action; + _newState = reducer(_newState, _action); + } + } + + prevUpdate = _update; + _update = _update.next; + } while (_update !== null && _update !== first); + + if (!didSkip) { + newBaseUpdate = prevUpdate; + newBaseState = _newState; + } // Mark that the fiber performed work, but only if the new state is + // different from the current state. + + if (!is$1(_newState, hook.memoizedState)) { + markWorkInProgressReceivedUpdate(); + } + + hook.memoizedState = _newState; + hook.baseUpdate = newBaseUpdate; + hook.baseState = newBaseState; + queue.lastRenderedState = _newState; + } + + var dispatch = queue.dispatch; + return [hook.memoizedState, dispatch]; + } + + function mountState(initialState) { + var hook = mountWorkInProgressHook(); + + if (typeof initialState === 'function') { + initialState = initialState(); + } + + hook.memoizedState = hook.baseState = initialState; + var queue = (hook.queue = { + last: null, + dispatch: null, + lastRenderedReducer: basicStateReducer, + lastRenderedState: initialState, + }); + var dispatch = (queue.dispatch = dispatchAction.bind( + null, // Flow doesn't know this is non-null, but we do. + currentlyRenderingFiber$1, + queue, + )); + return [hook.memoizedState, dispatch]; + } + + function updateState(initialState) { + return updateReducer(basicStateReducer, initialState); + } + + function pushEffect(tag, create, destroy, deps) { + var effect = { + tag: tag, + create: create, + destroy: destroy, + deps: deps, + // Circular + next: null, + }; + + if (componentUpdateQueue === null) { + componentUpdateQueue = createFunctionComponentUpdateQueue(); + componentUpdateQueue.lastEffect = effect.next = effect; + } else { + var lastEffect = componentUpdateQueue.lastEffect; + + if (lastEffect === null) { + componentUpdateQueue.lastEffect = effect.next = effect; + } else { + var firstEffect = lastEffect.next; + lastEffect.next = effect; + effect.next = firstEffect; + componentUpdateQueue.lastEffect = effect; + } + } + + return effect; + } + + function mountRef(initialValue) { + var hook = mountWorkInProgressHook(); + var ref = { + current: initialValue, + }; + + { + Object.seal(ref); + } + + hook.memoizedState = ref; + return ref; + } + + function updateRef(initialValue) { + var hook = updateWorkInProgressHook(); + return hook.memoizedState; + } + + function mountEffectImpl(fiberEffectTag, hookEffectTag, create, deps) { + var hook = mountWorkInProgressHook(); + var nextDeps = deps === undefined ? null : deps; + sideEffectTag |= fiberEffectTag; + hook.memoizedState = pushEffect(hookEffectTag, create, undefined, nextDeps); + } + + function updateEffectImpl(fiberEffectTag, hookEffectTag, create, deps) { + var hook = updateWorkInProgressHook(); + var nextDeps = deps === undefined ? null : deps; + var destroy = undefined; + + if (currentHook !== null) { + var prevEffect = currentHook.memoizedState; + destroy = prevEffect.destroy; + + if (nextDeps !== null) { + var prevDeps = prevEffect.deps; + + if (areHookInputsEqual(nextDeps, prevDeps)) { + pushEffect(NoEffect$1, create, destroy, nextDeps); + return; + } + } + } + + sideEffectTag |= fiberEffectTag; + hook.memoizedState = pushEffect(hookEffectTag, create, destroy, nextDeps); + } + + function mountEffect(create, deps) { + { + // $FlowExpectedError - jest isn't a global, and isn't recognized outside of tests + if ('undefined' !== typeof jest) { + warnIfNotCurrentlyActingEffectsInDEV(currentlyRenderingFiber$1); + } + } + + return mountEffectImpl(Update | Passive, UnmountPassive | MountPassive, create, deps); + } + + function updateEffect(create, deps) { + { + // $FlowExpectedError - jest isn't a global, and isn't recognized outside of tests + if ('undefined' !== typeof jest) { + warnIfNotCurrentlyActingEffectsInDEV(currentlyRenderingFiber$1); + } + } + + return updateEffectImpl(Update | Passive, UnmountPassive | MountPassive, create, deps); + } + + function mountLayoutEffect(create, deps) { + return mountEffectImpl(Update, UnmountMutation | MountLayout, create, deps); + } + + function updateLayoutEffect(create, deps) { + return updateEffectImpl(Update, UnmountMutation | MountLayout, create, deps); + } + + function imperativeHandleEffect(create, ref) { + if (typeof ref === 'function') { + var refCallback = ref; + + var _inst = create(); + + refCallback(_inst); + return function () { + refCallback(null); + }; + } else if (ref !== null && ref !== undefined) { + var refObject = ref; + + { + !refObject.hasOwnProperty('current') + ? warning$1( + false, + 'Expected useImperativeHandle() first argument to either be a ' + + 'ref callback or React.createRef() object. Instead received: %s.', + 'an object with keys {' + Object.keys(refObject).join(', ') + '}', + ) + : void 0; + } + + var _inst2 = create(); + + refObject.current = _inst2; + return function () { + refObject.current = null; + }; + } + } + + function mountImperativeHandle(ref, create, deps) { + { + !(typeof create === 'function') + ? warning$1( + false, + 'Expected useImperativeHandle() second argument to be a function ' + + 'that creates a handle. Instead received: %s.', + create !== null ? typeof create : 'null', + ) + : void 0; + } // TODO: If deps are provided, should we skip comparing the ref itself? + + var effectDeps = deps !== null && deps !== undefined ? deps.concat([ref]) : null; + return mountEffectImpl( + Update, + UnmountMutation | MountLayout, + imperativeHandleEffect.bind(null, create, ref), + effectDeps, + ); + } + + function updateImperativeHandle(ref, create, deps) { + { + !(typeof create === 'function') + ? warning$1( + false, + 'Expected useImperativeHandle() second argument to be a function ' + + 'that creates a handle. Instead received: %s.', + create !== null ? typeof create : 'null', + ) + : void 0; + } // TODO: If deps are provided, should we skip comparing the ref itself? + + var effectDeps = deps !== null && deps !== undefined ? deps.concat([ref]) : null; + return updateEffectImpl( + Update, + UnmountMutation | MountLayout, + imperativeHandleEffect.bind(null, create, ref), + effectDeps, + ); + } + + function mountDebugValue(value, formatterFn) { + // This hook is normally a no-op. + // The react-debug-hooks package injects its own implementation + // so that e.g. DevTools can display custom hook values. + } + + var updateDebugValue = mountDebugValue; + + function mountCallback(callback, deps) { + var hook = mountWorkInProgressHook(); + var nextDeps = deps === undefined ? null : deps; + hook.memoizedState = [callback, nextDeps]; + return callback; + } + + function updateCallback(callback, deps) { + var hook = updateWorkInProgressHook(); + var nextDeps = deps === undefined ? null : deps; + var prevState = hook.memoizedState; + + if (prevState !== null) { + if (nextDeps !== null) { + var prevDeps = prevState[1]; + + if (areHookInputsEqual(nextDeps, prevDeps)) { + return prevState[0]; + } + } + } + + hook.memoizedState = [callback, nextDeps]; + return callback; + } + + function mountMemo(nextCreate, deps) { + var hook = mountWorkInProgressHook(); + var nextDeps = deps === undefined ? null : deps; + var nextValue = nextCreate(); + hook.memoizedState = [nextValue, nextDeps]; + return nextValue; + } + + function updateMemo(nextCreate, deps) { + var hook = updateWorkInProgressHook(); + var nextDeps = deps === undefined ? null : deps; + var prevState = hook.memoizedState; + + if (prevState !== null) { + // Assume these are defined. If they're not, areHookInputsEqual will warn. + if (nextDeps !== null) { + var prevDeps = prevState[1]; + + if (areHookInputsEqual(nextDeps, prevDeps)) { + return prevState[0]; + } + } + } + + var nextValue = nextCreate(); + hook.memoizedState = [nextValue, nextDeps]; + return nextValue; + } + + function mountDeferredValue(value, config) { + var _mountState = mountState(value), + prevValue = _mountState[0], + setValue = _mountState[1]; + + mountEffect( + function () { + Scheduler.unstable_next(function () { + var previousConfig = ReactCurrentBatchConfig$1.suspense; + ReactCurrentBatchConfig$1.suspense = config === undefined ? null : config; + + try { + setValue(value); + } finally { + ReactCurrentBatchConfig$1.suspense = previousConfig; + } + }); + }, + [value, config], + ); + return prevValue; + } + + function updateDeferredValue(value, config) { + var _updateState = updateState(value), + prevValue = _updateState[0], + setValue = _updateState[1]; + + updateEffect( + function () { + Scheduler.unstable_next(function () { + var previousConfig = ReactCurrentBatchConfig$1.suspense; + ReactCurrentBatchConfig$1.suspense = config === undefined ? null : config; + + try { + setValue(value); + } finally { + ReactCurrentBatchConfig$1.suspense = previousConfig; + } + }); + }, + [value, config], + ); + return prevValue; + } + + function mountTransition(config) { + var _mountState2 = mountState(false), + isPending = _mountState2[0], + setPending = _mountState2[1]; + + var startTransition = mountCallback( + function (callback) { + setPending(true); + Scheduler.unstable_next(function () { + var previousConfig = ReactCurrentBatchConfig$1.suspense; + ReactCurrentBatchConfig$1.suspense = config === undefined ? null : config; + + try { + setPending(false); + callback(); + } finally { + ReactCurrentBatchConfig$1.suspense = previousConfig; + } + }); + }, + [config, isPending], + ); + return [startTransition, isPending]; + } + + function updateTransition(config) { + var _updateState2 = updateState(false), + isPending = _updateState2[0], + setPending = _updateState2[1]; + + var startTransition = updateCallback( + function (callback) { + setPending(true); + Scheduler.unstable_next(function () { + var previousConfig = ReactCurrentBatchConfig$1.suspense; + ReactCurrentBatchConfig$1.suspense = config === undefined ? null : config; + + try { + setPending(false); + callback(); + } finally { + ReactCurrentBatchConfig$1.suspense = previousConfig; + } + }); + }, + [config, isPending], + ); + return [startTransition, isPending]; + } + + function dispatchAction(fiber, queue, action) { + if (!(numberOfReRenders < RE_RENDER_LIMIT)) { + { + throw Error( + 'Too many re-renders. React limits the number of renders to prevent an infinite loop.', + ); + } + } + + { + !(typeof arguments[3] !== 'function') + ? warning$1( + false, + "State updates from the useState() and useReducer() Hooks don't support the " + + 'second callback argument. To execute a side effect after ' + + 'rendering, declare it in the component body with useEffect().', + ) + : void 0; + } + + var alternate = fiber.alternate; + + if ( + fiber === currentlyRenderingFiber$1 || + (alternate !== null && alternate === currentlyRenderingFiber$1) + ) { + // This is a render phase update. Stash it in a lazily-created map of + // queue -> linked list of updates. After this render pass, we'll restart + // and apply the stashed updates on top of the work-in-progress hook. + didScheduleRenderPhaseUpdate = true; + var update = { + expirationTime: renderExpirationTime$1, + suspenseConfig: null, + action: action, + eagerReducer: null, + eagerState: null, + next: null, + }; + + { + update.priority = getCurrentPriorityLevel(); + } + + if (renderPhaseUpdates === null) { + renderPhaseUpdates = new Map(); + } + + var firstRenderPhaseUpdate = renderPhaseUpdates.get(queue); + + if (firstRenderPhaseUpdate === undefined) { + renderPhaseUpdates.set(queue, update); + } else { + // Append the update to the end of the list. + var lastRenderPhaseUpdate = firstRenderPhaseUpdate; + + while (lastRenderPhaseUpdate.next !== null) { + lastRenderPhaseUpdate = lastRenderPhaseUpdate.next; + } + + lastRenderPhaseUpdate.next = update; + } + } else { + var currentTime = requestCurrentTimeForUpdate(); + var suspenseConfig = requestCurrentSuspenseConfig(); + var expirationTime = computeExpirationForFiber(currentTime, fiber, suspenseConfig); + var _update2 = { + expirationTime: expirationTime, + suspenseConfig: suspenseConfig, + action: action, + eagerReducer: null, + eagerState: null, + next: null, + }; + + { + _update2.priority = getCurrentPriorityLevel(); + } // Append the update to the end of the list. + + var last = queue.last; + + if (last === null) { + // This is the first update. Create a circular list. + _update2.next = _update2; + } else { + var first = last.next; + + if (first !== null) { + // Still circular. + _update2.next = first; + } + + last.next = _update2; + } + + queue.last = _update2; + + if ( + fiber.expirationTime === NoWork && + (alternate === null || alternate.expirationTime === NoWork) + ) { + // The queue is currently empty, which means we can eagerly compute the + // next state before entering the render phase. If the new state is the + // same as the current state, we may be able to bail out entirely. + var lastRenderedReducer = queue.lastRenderedReducer; + + if (lastRenderedReducer !== null) { + var prevDispatcher; + + { + prevDispatcher = ReactCurrentDispatcher$1.current; + ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV; + } + + try { + var currentState = queue.lastRenderedState; + var eagerState = lastRenderedReducer(currentState, action); // Stash the eagerly computed state, and the reducer used to compute + // it, on the update object. If the reducer hasn't changed by the + // time we enter the render phase, then the eager state can be used + // without calling the reducer again. + + _update2.eagerReducer = lastRenderedReducer; + _update2.eagerState = eagerState; + + if (is$1(eagerState, currentState)) { + // Fast path. We can bail out without scheduling React to re-render. + // It's still possible that we'll need to rebase this update later, + // if the component re-renders for a different reason and by that + // time the reducer has changed. + return; + } + } catch (error) { + // Suppress the error. It will throw again in the render phase. + } finally { + { + ReactCurrentDispatcher$1.current = prevDispatcher; + } + } + } + } + + { + // $FlowExpectedError - jest isn't a global, and isn't recognized outside of tests + if ('undefined' !== typeof jest) { + warnIfNotScopedWithMatchingAct(fiber); + warnIfNotCurrentlyActingUpdatesInDev(fiber); + } + } + + scheduleWork(fiber, expirationTime); + } + } + + var ContextOnlyDispatcher = { + readContext: readContext, + useCallback: throwInvalidHookError, + useContext: throwInvalidHookError, + useEffect: throwInvalidHookError, + useImperativeHandle: throwInvalidHookError, + useLayoutEffect: throwInvalidHookError, + useMemo: throwInvalidHookError, + useReducer: throwInvalidHookError, + useRef: throwInvalidHookError, + useState: throwInvalidHookError, + useDebugValue: throwInvalidHookError, + useResponder: throwInvalidHookError, + useDeferredValue: throwInvalidHookError, + useTransition: throwInvalidHookError, + }; + var HooksDispatcherOnMountInDEV = null; + var HooksDispatcherOnMountWithHookTypesInDEV = null; + var HooksDispatcherOnUpdateInDEV = null; + var InvalidNestedHooksDispatcherOnMountInDEV = null; + var InvalidNestedHooksDispatcherOnUpdateInDEV = null; + + { + var warnInvalidContextAccess = function () { + warning$1( + false, + 'Context can only be read while React is rendering. ' + + 'In classes, you can read it in the render method or getDerivedStateFromProps. ' + + 'In function components, you can read it directly in the function body, but not ' + + 'inside Hooks like useReducer() or useMemo().', + ); + }; + + var warnInvalidHookAccess = function () { + warning$1( + false, + 'Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. ' + + 'You can only call Hooks at the top level of your React function. ' + + 'For more information, see ' + + 'https://fb.me/rules-of-hooks', + ); + }; + + HooksDispatcherOnMountInDEV = { + readContext: function (context, observedBits) { + return readContext(context, observedBits); + }, + useCallback: function (callback, deps) { + currentHookNameInDev = 'useCallback'; + mountHookTypesDev(); + checkDepsAreArrayDev(deps); + return mountCallback(callback, deps); + }, + useContext: function (context, observedBits) { + currentHookNameInDev = 'useContext'; + mountHookTypesDev(); + return readContext(context, observedBits); + }, + useEffect: function (create, deps) { + currentHookNameInDev = 'useEffect'; + mountHookTypesDev(); + checkDepsAreArrayDev(deps); + return mountEffect(create, deps); + }, + useImperativeHandle: function (ref, create, deps) { + currentHookNameInDev = 'useImperativeHandle'; + mountHookTypesDev(); + checkDepsAreArrayDev(deps); + return mountImperativeHandle(ref, create, deps); + }, + useLayoutEffect: function (create, deps) { + currentHookNameInDev = 'useLayoutEffect'; + mountHookTypesDev(); + checkDepsAreArrayDev(deps); + return mountLayoutEffect(create, deps); + }, + useMemo: function (create, deps) { + currentHookNameInDev = 'useMemo'; + mountHookTypesDev(); + checkDepsAreArrayDev(deps); + var prevDispatcher = ReactCurrentDispatcher$1.current; + ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV; + + try { + return mountMemo(create, deps); + } finally { + ReactCurrentDispatcher$1.current = prevDispatcher; + } + }, + useReducer: function (reducer, initialArg, init) { + currentHookNameInDev = 'useReducer'; + mountHookTypesDev(); + var prevDispatcher = ReactCurrentDispatcher$1.current; + ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV; + + try { + return mountReducer(reducer, initialArg, init); + } finally { + ReactCurrentDispatcher$1.current = prevDispatcher; + } + }, + useRef: function (initialValue) { + currentHookNameInDev = 'useRef'; + mountHookTypesDev(); + return mountRef(initialValue); + }, + useState: function (initialState) { + currentHookNameInDev = 'useState'; + mountHookTypesDev(); + var prevDispatcher = ReactCurrentDispatcher$1.current; + ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV; + + try { + return mountState(initialState); + } finally { + ReactCurrentDispatcher$1.current = prevDispatcher; + } + }, + useDebugValue: function (value, formatterFn) { + currentHookNameInDev = 'useDebugValue'; + mountHookTypesDev(); + return mountDebugValue(value, formatterFn); + }, + useResponder: function (responder, props) { + currentHookNameInDev = 'useResponder'; + mountHookTypesDev(); + return createResponderListener(responder, props); + }, + useDeferredValue: function (value, config) { + currentHookNameInDev = 'useDeferredValue'; + mountHookTypesDev(); + return mountDeferredValue(value, config); + }, + useTransition: function (config) { + currentHookNameInDev = 'useTransition'; + mountHookTypesDev(); + return mountTransition(config); + }, + }; + HooksDispatcherOnMountWithHookTypesInDEV = { + readContext: function (context, observedBits) { + return readContext(context, observedBits); + }, + useCallback: function (callback, deps) { + currentHookNameInDev = 'useCallback'; + updateHookTypesDev(); + return mountCallback(callback, deps); + }, + useContext: function (context, observedBits) { + currentHookNameInDev = 'useContext'; + updateHookTypesDev(); + return readContext(context, observedBits); + }, + useEffect: function (create, deps) { + currentHookNameInDev = 'useEffect'; + updateHookTypesDev(); + return mountEffect(create, deps); + }, + useImperativeHandle: function (ref, create, deps) { + currentHookNameInDev = 'useImperativeHandle'; + updateHookTypesDev(); + return mountImperativeHandle(ref, create, deps); + }, + useLayoutEffect: function (create, deps) { + currentHookNameInDev = 'useLayoutEffect'; + updateHookTypesDev(); + return mountLayoutEffect(create, deps); + }, + useMemo: function (create, deps) { + currentHookNameInDev = 'useMemo'; + updateHookTypesDev(); + var prevDispatcher = ReactCurrentDispatcher$1.current; + ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV; + + try { + return mountMemo(create, deps); + } finally { + ReactCurrentDispatcher$1.current = prevDispatcher; + } + }, + useReducer: function (reducer, initialArg, init) { + currentHookNameInDev = 'useReducer'; + updateHookTypesDev(); + var prevDispatcher = ReactCurrentDispatcher$1.current; + ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV; + + try { + return mountReducer(reducer, initialArg, init); + } finally { + ReactCurrentDispatcher$1.current = prevDispatcher; + } + }, + useRef: function (initialValue) { + currentHookNameInDev = 'useRef'; + updateHookTypesDev(); + return mountRef(initialValue); + }, + useState: function (initialState) { + currentHookNameInDev = 'useState'; + updateHookTypesDev(); + var prevDispatcher = ReactCurrentDispatcher$1.current; + ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV; + + try { + return mountState(initialState); + } finally { + ReactCurrentDispatcher$1.current = prevDispatcher; + } + }, + useDebugValue: function (value, formatterFn) { + currentHookNameInDev = 'useDebugValue'; + updateHookTypesDev(); + return mountDebugValue(value, formatterFn); + }, + useResponder: function (responder, props) { + currentHookNameInDev = 'useResponder'; + updateHookTypesDev(); + return createResponderListener(responder, props); + }, + useDeferredValue: function (value, config) { + currentHookNameInDev = 'useDeferredValue'; + updateHookTypesDev(); + return mountDeferredValue(value, config); + }, + useTransition: function (config) { + currentHookNameInDev = 'useTransition'; + updateHookTypesDev(); + return mountTransition(config); + }, + }; + HooksDispatcherOnUpdateInDEV = { + readContext: function (context, observedBits) { + return readContext(context, observedBits); + }, + useCallback: function (callback, deps) { + currentHookNameInDev = 'useCallback'; + updateHookTypesDev(); + return updateCallback(callback, deps); + }, + useContext: function (context, observedBits) { + currentHookNameInDev = 'useContext'; + updateHookTypesDev(); + return readContext(context, observedBits); + }, + useEffect: function (create, deps) { + currentHookNameInDev = 'useEffect'; + updateHookTypesDev(); + return updateEffect(create, deps); + }, + useImperativeHandle: function (ref, create, deps) { + currentHookNameInDev = 'useImperativeHandle'; + updateHookTypesDev(); + return updateImperativeHandle(ref, create, deps); + }, + useLayoutEffect: function (create, deps) { + currentHookNameInDev = 'useLayoutEffect'; + updateHookTypesDev(); + return updateLayoutEffect(create, deps); + }, + useMemo: function (create, deps) { + currentHookNameInDev = 'useMemo'; + updateHookTypesDev(); + var prevDispatcher = ReactCurrentDispatcher$1.current; + ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV; + + try { + return updateMemo(create, deps); + } finally { + ReactCurrentDispatcher$1.current = prevDispatcher; + } + }, + useReducer: function (reducer, initialArg, init) { + currentHookNameInDev = 'useReducer'; + updateHookTypesDev(); + var prevDispatcher = ReactCurrentDispatcher$1.current; + ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV; + + try { + return updateReducer(reducer, initialArg, init); + } finally { + ReactCurrentDispatcher$1.current = prevDispatcher; + } + }, + useRef: function (initialValue) { + currentHookNameInDev = 'useRef'; + updateHookTypesDev(); + return updateRef(initialValue); + }, + useState: function (initialState) { + currentHookNameInDev = 'useState'; + updateHookTypesDev(); + var prevDispatcher = ReactCurrentDispatcher$1.current; + ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV; + + try { + return updateState(initialState); + } finally { + ReactCurrentDispatcher$1.current = prevDispatcher; + } + }, + useDebugValue: function (value, formatterFn) { + currentHookNameInDev = 'useDebugValue'; + updateHookTypesDev(); + return updateDebugValue(value, formatterFn); + }, + useResponder: function (responder, props) { + currentHookNameInDev = 'useResponder'; + updateHookTypesDev(); + return createResponderListener(responder, props); + }, + useDeferredValue: function (value, config) { + currentHookNameInDev = 'useDeferredValue'; + updateHookTypesDev(); + return updateDeferredValue(value, config); + }, + useTransition: function (config) { + currentHookNameInDev = 'useTransition'; + updateHookTypesDev(); + return updateTransition(config); + }, + }; + InvalidNestedHooksDispatcherOnMountInDEV = { + readContext: function (context, observedBits) { + warnInvalidContextAccess(); + return readContext(context, observedBits); + }, + useCallback: function (callback, deps) { + currentHookNameInDev = 'useCallback'; + warnInvalidHookAccess(); + mountHookTypesDev(); + return mountCallback(callback, deps); + }, + useContext: function (context, observedBits) { + currentHookNameInDev = 'useContext'; + warnInvalidHookAccess(); + mountHookTypesDev(); + return readContext(context, observedBits); + }, + useEffect: function (create, deps) { + currentHookNameInDev = 'useEffect'; + warnInvalidHookAccess(); + mountHookTypesDev(); + return mountEffect(create, deps); + }, + useImperativeHandle: function (ref, create, deps) { + currentHookNameInDev = 'useImperativeHandle'; + warnInvalidHookAccess(); + mountHookTypesDev(); + return mountImperativeHandle(ref, create, deps); + }, + useLayoutEffect: function (create, deps) { + currentHookNameInDev = 'useLayoutEffect'; + warnInvalidHookAccess(); + mountHookTypesDev(); + return mountLayoutEffect(create, deps); + }, + useMemo: function (create, deps) { + currentHookNameInDev = 'useMemo'; + warnInvalidHookAccess(); + mountHookTypesDev(); + var prevDispatcher = ReactCurrentDispatcher$1.current; + ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV; + + try { + return mountMemo(create, deps); + } finally { + ReactCurrentDispatcher$1.current = prevDispatcher; + } + }, + useReducer: function (reducer, initialArg, init) { + currentHookNameInDev = 'useReducer'; + warnInvalidHookAccess(); + mountHookTypesDev(); + var prevDispatcher = ReactCurrentDispatcher$1.current; + ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV; + + try { + return mountReducer(reducer, initialArg, init); + } finally { + ReactCurrentDispatcher$1.current = prevDispatcher; + } + }, + useRef: function (initialValue) { + currentHookNameInDev = 'useRef'; + warnInvalidHookAccess(); + mountHookTypesDev(); + return mountRef(initialValue); + }, + useState: function (initialState) { + currentHookNameInDev = 'useState'; + warnInvalidHookAccess(); + mountHookTypesDev(); + var prevDispatcher = ReactCurrentDispatcher$1.current; + ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV; + + try { + return mountState(initialState); + } finally { + ReactCurrentDispatcher$1.current = prevDispatcher; + } + }, + useDebugValue: function (value, formatterFn) { + currentHookNameInDev = 'useDebugValue'; + warnInvalidHookAccess(); + mountHookTypesDev(); + return mountDebugValue(value, formatterFn); + }, + useResponder: function (responder, props) { + currentHookNameInDev = 'useResponder'; + warnInvalidHookAccess(); + mountHookTypesDev(); + return createResponderListener(responder, props); + }, + useDeferredValue: function (value, config) { + currentHookNameInDev = 'useDeferredValue'; + warnInvalidHookAccess(); + mountHookTypesDev(); + return mountDeferredValue(value, config); + }, + useTransition: function (config) { + currentHookNameInDev = 'useTransition'; + warnInvalidHookAccess(); + mountHookTypesDev(); + return mountTransition(config); + }, + }; + InvalidNestedHooksDispatcherOnUpdateInDEV = { + readContext: function (context, observedBits) { + warnInvalidContextAccess(); + return readContext(context, observedBits); + }, + useCallback: function (callback, deps) { + currentHookNameInDev = 'useCallback'; + warnInvalidHookAccess(); + updateHookTypesDev(); + return updateCallback(callback, deps); + }, + useContext: function (context, observedBits) { + currentHookNameInDev = 'useContext'; + warnInvalidHookAccess(); + updateHookTypesDev(); + return readContext(context, observedBits); + }, + useEffect: function (create, deps) { + currentHookNameInDev = 'useEffect'; + warnInvalidHookAccess(); + updateHookTypesDev(); + return updateEffect(create, deps); + }, + useImperativeHandle: function (ref, create, deps) { + currentHookNameInDev = 'useImperativeHandle'; + warnInvalidHookAccess(); + updateHookTypesDev(); + return updateImperativeHandle(ref, create, deps); + }, + useLayoutEffect: function (create, deps) { + currentHookNameInDev = 'useLayoutEffect'; + warnInvalidHookAccess(); + updateHookTypesDev(); + return updateLayoutEffect(create, deps); + }, + useMemo: function (create, deps) { + currentHookNameInDev = 'useMemo'; + warnInvalidHookAccess(); + updateHookTypesDev(); + var prevDispatcher = ReactCurrentDispatcher$1.current; + ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV; + + try { + return updateMemo(create, deps); + } finally { + ReactCurrentDispatcher$1.current = prevDispatcher; + } + }, + useReducer: function (reducer, initialArg, init) { + currentHookNameInDev = 'useReducer'; + warnInvalidHookAccess(); + updateHookTypesDev(); + var prevDispatcher = ReactCurrentDispatcher$1.current; + ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV; + + try { + return updateReducer(reducer, initialArg, init); + } finally { + ReactCurrentDispatcher$1.current = prevDispatcher; + } + }, + useRef: function (initialValue) { + currentHookNameInDev = 'useRef'; + warnInvalidHookAccess(); + updateHookTypesDev(); + return updateRef(initialValue); + }, + useState: function (initialState) { + currentHookNameInDev = 'useState'; + warnInvalidHookAccess(); + updateHookTypesDev(); + var prevDispatcher = ReactCurrentDispatcher$1.current; + ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV; + + try { + return updateState(initialState); + } finally { + ReactCurrentDispatcher$1.current = prevDispatcher; + } + }, + useDebugValue: function (value, formatterFn) { + currentHookNameInDev = 'useDebugValue'; + warnInvalidHookAccess(); + updateHookTypesDev(); + return updateDebugValue(value, formatterFn); + }, + useResponder: function (responder, props) { + currentHookNameInDev = 'useResponder'; + warnInvalidHookAccess(); + updateHookTypesDev(); + return createResponderListener(responder, props); + }, + useDeferredValue: function (value, config) { + currentHookNameInDev = 'useDeferredValue'; + warnInvalidHookAccess(); + updateHookTypesDev(); + return updateDeferredValue(value, config); + }, + useTransition: function (config) { + currentHookNameInDev = 'useTransition'; + warnInvalidHookAccess(); + updateHookTypesDev(); + return updateTransition(config); + }, + }; + } + + // CommonJS interop named imports. + + var now$1 = Scheduler.unstable_now; + var commitTime = 0; + var profilerStartTime = -1; + + function getCommitTime() { + return commitTime; + } + + function recordCommitTime() { + if (!enableProfilerTimer) { + return; + } + + commitTime = now$1(); + } + + function startProfilerTimer(fiber) { + if (!enableProfilerTimer) { + return; + } + + profilerStartTime = now$1(); + + if (fiber.actualStartTime < 0) { + fiber.actualStartTime = now$1(); + } + } + + function stopProfilerTimerIfRunning(fiber) { + if (!enableProfilerTimer) { + return; + } + + profilerStartTime = -1; + } + + function stopProfilerTimerIfRunningAndRecordDelta(fiber, overrideBaseTime) { + if (!enableProfilerTimer) { + return; + } + + if (profilerStartTime >= 0) { + var elapsedTime = now$1() - profilerStartTime; + fiber.actualDuration += elapsedTime; + + if (overrideBaseTime) { + fiber.selfBaseDuration = elapsedTime; + } + + profilerStartTime = -1; + } + } + + // This may have been an insertion or a hydration. + + var hydrationParentFiber = null; + var nextHydratableInstance = null; + var isHydrating = false; + + function warnIfHydrating() { + { + !!isHydrating + ? warning$1( + false, + 'We should not be hydrating here. This is a bug in React. Please file a bug.', + ) + : void 0; + } + } + + function enterHydrationState(fiber) { + if (!supportsHydration) { + return false; + } + + var parentInstance = fiber.stateNode.containerInfo; + nextHydratableInstance = getFirstHydratableChild(parentInstance); + hydrationParentFiber = fiber; + isHydrating = true; + return true; + } + + function reenterHydrationStateFromDehydratedSuspenseInstance(fiber, suspenseInstance) { + if (!supportsHydration) { + return false; + } + + nextHydratableInstance = getNextHydratableSibling(suspenseInstance); + popToNextHostParent(fiber); + isHydrating = true; + return true; + } + + function deleteHydratableInstance(returnFiber, instance) { + { + switch (returnFiber.tag) { + case HostRoot: + didNotHydrateContainerInstance(returnFiber.stateNode.containerInfo, instance); + break; + + case HostComponent: + didNotHydrateInstance( + returnFiber.type, + returnFiber.memoizedProps, + returnFiber.stateNode, + instance, + ); + break; + } + } + + var childToDelete = createFiberFromHostInstanceForDeletion(); + childToDelete.stateNode = instance; + childToDelete.return = returnFiber; + childToDelete.effectTag = Deletion; // This might seem like it belongs on progressedFirstDeletion. However, + // these children are not part of the reconciliation list of children. + // Even if we abort and rereconcile the children, that will try to hydrate + // again and the nodes are still in the host tree so these will be + // recreated. + + if (returnFiber.lastEffect !== null) { + returnFiber.lastEffect.nextEffect = childToDelete; + returnFiber.lastEffect = childToDelete; + } else { + returnFiber.firstEffect = returnFiber.lastEffect = childToDelete; + } + } + + function insertNonHydratedInstance(returnFiber, fiber) { + fiber.effectTag = (fiber.effectTag & ~Hydrating) | Placement; + + { + switch (returnFiber.tag) { + case HostRoot: { + var parentContainer = returnFiber.stateNode.containerInfo; + + switch (fiber.tag) { + case HostComponent: + var type = fiber.type; + var props = fiber.pendingProps; + didNotFindHydratableContainerInstance(parentContainer, type, props); + break; + + case HostText: + var text = fiber.pendingProps; + didNotFindHydratableContainerTextInstance(parentContainer, text); + break; + + case SuspenseComponent: + break; + } + + break; + } + + case HostComponent: { + var parentType = returnFiber.type; + var parentProps = returnFiber.memoizedProps; + var parentInstance = returnFiber.stateNode; + + switch (fiber.tag) { + case HostComponent: + var _type = fiber.type; + var _props = fiber.pendingProps; + didNotFindHydratableInstance(parentType, parentProps, parentInstance, _type, _props); + break; + + case HostText: + var _text = fiber.pendingProps; + didNotFindHydratableTextInstance(parentType, parentProps, parentInstance, _text); + break; + + case SuspenseComponent: + didNotFindHydratableSuspenseInstance(parentType, parentProps, parentInstance); + break; + } + + break; + } + + default: + return; + } + } + } + + function tryHydrate(fiber, nextInstance) { + switch (fiber.tag) { + case HostComponent: { + var type = fiber.type; + var props = fiber.pendingProps; + var instance = canHydrateInstance(nextInstance, type, props); + + if (instance !== null) { + fiber.stateNode = instance; + return true; + } + + return false; + } + + case HostText: { + var text = fiber.pendingProps; + var textInstance = canHydrateTextInstance(nextInstance, text); + + if (textInstance !== null) { + fiber.stateNode = textInstance; + return true; + } + + return false; + } + + case SuspenseComponent: { + if (enableSuspenseServerRenderer) { + var suspenseInstance = canHydrateSuspenseInstance(nextInstance); + + if (suspenseInstance !== null) { + var suspenseState = { + dehydrated: suspenseInstance, + retryTime: Never, + }; + fiber.memoizedState = suspenseState; // Store the dehydrated fragment as a child fiber. + // This simplifies the code for getHostSibling and deleting nodes, + // since it doesn't have to consider all Suspense boundaries and + // check if they're dehydrated ones or not. + + var dehydratedFragment = createFiberFromDehydratedFragment(suspenseInstance); + dehydratedFragment.return = fiber; + fiber.child = dehydratedFragment; + return true; + } + } + + return false; + } + + default: + return false; + } + } + + function tryToClaimNextHydratableInstance(fiber) { + if (!isHydrating) { + return; + } + + var nextInstance = nextHydratableInstance; + + if (!nextInstance) { + // Nothing to hydrate. Make it an insertion. + insertNonHydratedInstance(hydrationParentFiber, fiber); + isHydrating = false; + hydrationParentFiber = fiber; + return; + } + + var firstAttemptedInstance = nextInstance; + + if (!tryHydrate(fiber, nextInstance)) { + // If we can't hydrate this instance let's try the next one. + // We use this as a heuristic. It's based on intuition and not data so it + // might be flawed or unnecessary. + nextInstance = getNextHydratableSibling(firstAttemptedInstance); + + if (!nextInstance || !tryHydrate(fiber, nextInstance)) { + // Nothing to hydrate. Make it an insertion. + insertNonHydratedInstance(hydrationParentFiber, fiber); + isHydrating = false; + hydrationParentFiber = fiber; + return; + } // We matched the next one, we'll now assume that the first one was + // superfluous and we'll delete it. Since we can't eagerly delete it + // we'll have to schedule a deletion. To do that, this node needs a dummy + // fiber associated with it. + + deleteHydratableInstance(hydrationParentFiber, firstAttemptedInstance); + } + + hydrationParentFiber = fiber; + nextHydratableInstance = getFirstHydratableChild(nextInstance); + } + + function prepareToHydrateHostInstance(fiber, rootContainerInstance, hostContext) { + if (!supportsHydration) { + { + { + throw Error( + 'Expected prepareToHydrateHostInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + } + + var instance = fiber.stateNode; + var updatePayload = hydrateInstance( + instance, + fiber.type, + fiber.memoizedProps, + rootContainerInstance, + hostContext, + fiber, + ); // TODO: Type this specific to this type of component. + + fiber.updateQueue = updatePayload; // If the update payload indicates that there is a change or if there + // is a new ref we mark this as an update. + + if (updatePayload !== null) { + return true; + } + + return false; + } + + function prepareToHydrateHostTextInstance(fiber) { + if (!supportsHydration) { + { + { + throw Error( + 'Expected prepareToHydrateHostTextInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + } + + var textInstance = fiber.stateNode; + var textContent = fiber.memoizedProps; + var shouldUpdate = hydrateTextInstance(textInstance, textContent, fiber); + + { + if (shouldUpdate) { + // We assume that prepareToHydrateHostTextInstance is called in a context where the + // hydration parent is the parent host component of this host text. + var returnFiber = hydrationParentFiber; + + if (returnFiber !== null) { + switch (returnFiber.tag) { + case HostRoot: { + var parentContainer = returnFiber.stateNode.containerInfo; + didNotMatchHydratedContainerTextInstance(parentContainer, textInstance, textContent); + break; + } + + case HostComponent: { + var parentType = returnFiber.type; + var parentProps = returnFiber.memoizedProps; + var parentInstance = returnFiber.stateNode; + didNotMatchHydratedTextInstance( + parentType, + parentProps, + parentInstance, + textInstance, + textContent, + ); + break; + } + } + } + } + } + + return shouldUpdate; + } + + function prepareToHydrateHostSuspenseInstance(fiber) { + if (!supportsHydration) { + { + { + throw Error( + 'Expected prepareToHydrateHostSuspenseInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + } + + var suspenseState = fiber.memoizedState; + var suspenseInstance = suspenseState !== null ? suspenseState.dehydrated : null; + + if (!suspenseInstance) { + { + throw Error( + 'Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + + hydrateSuspenseInstance(suspenseInstance, fiber); + } + + function skipPastDehydratedSuspenseInstance(fiber) { + if (!supportsHydration) { + { + { + throw Error( + 'Expected skipPastDehydratedSuspenseInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + } + + var suspenseState = fiber.memoizedState; + var suspenseInstance = suspenseState !== null ? suspenseState.dehydrated : null; + + if (!suspenseInstance) { + { + throw Error( + 'Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + + return getNextHydratableInstanceAfterSuspenseInstance(suspenseInstance); + } + + function popToNextHostParent(fiber) { + var parent = fiber.return; + + while ( + parent !== null && + parent.tag !== HostComponent && + parent.tag !== HostRoot && + parent.tag !== SuspenseComponent + ) { + parent = parent.return; + } + + hydrationParentFiber = parent; + } + + function popHydrationState(fiber) { + if (!supportsHydration) { + return false; + } + + if (fiber !== hydrationParentFiber) { + // We're deeper than the current hydration context, inside an inserted + // tree. + return false; + } + + if (!isHydrating) { + // If we're not currently hydrating but we're in a hydration context, then + // we were an insertion and now need to pop up reenter hydration of our + // siblings. + popToNextHostParent(fiber); + isHydrating = true; + return false; + } + + var type = fiber.type; // If we have any remaining hydratable nodes, we need to delete them now. + // We only do this deeper than head and body since they tend to have random + // other nodes in them. We also ignore components with pure text content in + // side of them. + // TODO: Better heuristic. + + if ( + fiber.tag !== HostComponent || + (type !== 'head' && type !== 'body' && !shouldSetTextContent(type, fiber.memoizedProps)) + ) { + var nextInstance = nextHydratableInstance; + + while (nextInstance) { + deleteHydratableInstance(fiber, nextInstance); + nextInstance = getNextHydratableSibling(nextInstance); + } + } + + popToNextHostParent(fiber); + + if (fiber.tag === SuspenseComponent) { + nextHydratableInstance = skipPastDehydratedSuspenseInstance(fiber); + } else { + nextHydratableInstance = hydrationParentFiber + ? getNextHydratableSibling(fiber.stateNode) + : null; + } + + return true; + } + + function resetHydrationState() { + if (!supportsHydration) { + return; + } + + hydrationParentFiber = null; + nextHydratableInstance = null; + isHydrating = false; + } + + var ReactCurrentOwner$3 = ReactSharedInternals.ReactCurrentOwner; + var didReceiveUpdate = false; + var didWarnAboutBadClass; + var didWarnAboutModulePatternComponent; + var didWarnAboutContextTypeOnFunctionComponent; + var didWarnAboutGetDerivedStateOnFunctionComponent; + var didWarnAboutFunctionRefs; + var didWarnAboutReassigningProps; + var didWarnAboutMaxDuration; + var didWarnAboutRevealOrder; + var didWarnAboutTailOptions; + var didWarnAboutDefaultPropsOnFunctionComponent; + + { + didWarnAboutBadClass = {}; + didWarnAboutModulePatternComponent = {}; + didWarnAboutContextTypeOnFunctionComponent = {}; + didWarnAboutGetDerivedStateOnFunctionComponent = {}; + didWarnAboutFunctionRefs = {}; + didWarnAboutReassigningProps = false; + didWarnAboutMaxDuration = false; + didWarnAboutRevealOrder = {}; + didWarnAboutTailOptions = {}; + didWarnAboutDefaultPropsOnFunctionComponent = {}; + } + + function reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime) { + if (current$$1 === null) { + // If this is a fresh new component that hasn't been rendered yet, we + // won't update its child set by applying minimal side-effects. Instead, + // we will add them all to the child before it gets rendered. That means + // we can optimize this reconciliation pass by not tracking side-effects. + workInProgress.child = mountChildFibers( + workInProgress, + null, + nextChildren, + renderExpirationTime, + ); + } else { + // If the current child is the same as the work in progress, it means that + // we haven't yet started any work on these children. Therefore, we use + // the clone algorithm to create a copy of all the current children. + // If we had any progressed work already, that is invalid at this point so + // let's throw it out. + workInProgress.child = reconcileChildFibers( + workInProgress, + current$$1.child, + nextChildren, + renderExpirationTime, + ); + } + } + + function forceUnmountCurrentAndReconcile( + current$$1, + workInProgress, + nextChildren, + renderExpirationTime, + ) { + // This function is fork of reconcileChildren. It's used in cases where we + // want to reconcile without matching against the existing set. This has the + // effect of all current children being unmounted; even if the type and key + // are the same, the old child is unmounted and a new child is created. + // + // To do this, we're going to go through the reconcile algorithm twice. In + // the first pass, we schedule a deletion for all the current children by + // passing null. + workInProgress.child = reconcileChildFibers( + workInProgress, + current$$1.child, + null, + renderExpirationTime, + ); // In the second pass, we mount the new children. The trick here is that we + // pass null in place of where we usually pass the current child set. This has + // the effect of remounting all children regardless of whether their their + // identity matches. + + workInProgress.child = reconcileChildFibers( + workInProgress, + null, + nextChildren, + renderExpirationTime, + ); + } + + function updateForwardRef(current$$1, workInProgress, Component, nextProps, renderExpirationTime) { + // TODO: current can be non-null here even if the component + // hasn't yet mounted. This happens after the first render suspends. + // We'll need to figure out if this is fine or can cause issues. + { + if (workInProgress.type !== workInProgress.elementType) { + // Lazy component props can't be validated in createElement + // because they're only guaranteed to be resolved here. + var innerPropTypes = Component.propTypes; + + if (innerPropTypes) { + checkPropTypes( + innerPropTypes, + nextProps, // Resolved props + 'prop', + getComponentName(Component), + getCurrentFiberStackInDev, + ); + } + } + } + + var render = Component.render; + var ref = workInProgress.ref; // The rest is a fork of updateFunctionComponent + + var nextChildren; + prepareToReadContext(workInProgress, renderExpirationTime); + + { + ReactCurrentOwner$3.current = workInProgress; + setCurrentPhase('render'); + nextChildren = renderWithHooks( + current$$1, + workInProgress, + render, + nextProps, + ref, + renderExpirationTime, + ); + + if (debugRenderPhaseSideEffectsForStrictMode && workInProgress.mode & StrictMode) { + // Only double-render components with Hooks + if (workInProgress.memoizedState !== null) { + nextChildren = renderWithHooks( + current$$1, + workInProgress, + render, + nextProps, + ref, + renderExpirationTime, + ); + } + } + + setCurrentPhase(null); + } + + if (current$$1 !== null && !didReceiveUpdate) { + bailoutHooks(current$$1, workInProgress, renderExpirationTime); + return bailoutOnAlreadyFinishedWork(current$$1, workInProgress, renderExpirationTime); + } // React DevTools reads this flag. + + workInProgress.effectTag |= PerformedWork; + reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime); + return workInProgress.child; + } + + function updateMemoComponent( + current$$1, + workInProgress, + Component, + nextProps, + updateExpirationTime, + renderExpirationTime, + ) { + if (current$$1 === null) { + var type = Component.type; + + if ( + isSimpleFunctionComponent(type) && + Component.compare === null && // SimpleMemoComponent codepath doesn't resolve outer props either. + Component.defaultProps === undefined + ) { + var resolvedType = type; + + { + resolvedType = resolveFunctionForHotReloading(type); + } // If this is a plain function component without default props, + // and with only the default shallow comparison, we upgrade it + // to a SimpleMemoComponent to allow fast path updates. + + workInProgress.tag = SimpleMemoComponent; + workInProgress.type = resolvedType; + + { + validateFunctionComponentInDev(workInProgress, type); + } + + return updateSimpleMemoComponent( + current$$1, + workInProgress, + resolvedType, + nextProps, + updateExpirationTime, + renderExpirationTime, + ); + } + + { + var innerPropTypes = type.propTypes; + + if (innerPropTypes) { + // Inner memo component props aren't currently validated in createElement. + // We could move it there, but we'd still need this for lazy code path. + checkPropTypes( + innerPropTypes, + nextProps, // Resolved props + 'prop', + getComponentName(type), + getCurrentFiberStackInDev, + ); + } + } + + var child = createFiberFromTypeAndProps( + Component.type, + null, + nextProps, + null, + workInProgress.mode, + renderExpirationTime, + ); + child.ref = workInProgress.ref; + child.return = workInProgress; + workInProgress.child = child; + return child; + } + + { + var _type = Component.type; + var _innerPropTypes = _type.propTypes; + + if (_innerPropTypes) { + // Inner memo component props aren't currently validated in createElement. + // We could move it there, but we'd still need this for lazy code path. + checkPropTypes( + _innerPropTypes, + nextProps, // Resolved props + 'prop', + getComponentName(_type), + getCurrentFiberStackInDev, + ); + } + } + + var currentChild = current$$1.child; // This is always exactly one child + + if (updateExpirationTime < renderExpirationTime) { + // This will be the props with resolved defaultProps, + // unlike current.memoizedProps which will be the unresolved ones. + var prevProps = currentChild.memoizedProps; // Default to shallow comparison + + var compare = Component.compare; + compare = compare !== null ? compare : shallowEqual; + + if (compare(prevProps, nextProps) && current$$1.ref === workInProgress.ref) { + return bailoutOnAlreadyFinishedWork(current$$1, workInProgress, renderExpirationTime); + } + } // React DevTools reads this flag. + + workInProgress.effectTag |= PerformedWork; + var newChild = createWorkInProgress(currentChild, nextProps, renderExpirationTime); + newChild.ref = workInProgress.ref; + newChild.return = workInProgress; + workInProgress.child = newChild; + return newChild; + } + + function updateSimpleMemoComponent( + current$$1, + workInProgress, + Component, + nextProps, + updateExpirationTime, + renderExpirationTime, + ) { + // TODO: current can be non-null here even if the component + // hasn't yet mounted. This happens when the inner render suspends. + // We'll need to figure out if this is fine or can cause issues. + { + if (workInProgress.type !== workInProgress.elementType) { + // Lazy component props can't be validated in createElement + // because they're only guaranteed to be resolved here. + var outerMemoType = workInProgress.elementType; + + if (outerMemoType.$$typeof === REACT_LAZY_TYPE) { + // We warn when you define propTypes on lazy() + // so let's just skip over it to find memo() outer wrapper. + // Inner props for memo are validated later. + outerMemoType = refineResolvedLazyComponent(outerMemoType); + } + + var outerPropTypes = outerMemoType && outerMemoType.propTypes; + + if (outerPropTypes) { + checkPropTypes( + outerPropTypes, + nextProps, // Resolved (SimpleMemoComponent has no defaultProps) + 'prop', + getComponentName(outerMemoType), + getCurrentFiberStackInDev, + ); + } // Inner propTypes will be validated in the function component path. + } + } + + if (current$$1 !== null) { + var prevProps = current$$1.memoizedProps; + + if ( + shallowEqual(prevProps, nextProps) && + current$$1.ref === workInProgress.ref && // Prevent bailout if the implementation changed due to hot reload: + workInProgress.type === current$$1.type + ) { + didReceiveUpdate = false; + + if (updateExpirationTime < renderExpirationTime) { + return bailoutOnAlreadyFinishedWork(current$$1, workInProgress, renderExpirationTime); + } + } + } + + return updateFunctionComponent( + current$$1, + workInProgress, + Component, + nextProps, + renderExpirationTime, + ); + } + + function updateFragment(current$$1, workInProgress, renderExpirationTime) { + var nextChildren = workInProgress.pendingProps; + reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime); + return workInProgress.child; + } + + function updateMode(current$$1, workInProgress, renderExpirationTime) { + var nextChildren = workInProgress.pendingProps.children; + reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime); + return workInProgress.child; + } + + function updateProfiler(current$$1, workInProgress, renderExpirationTime) { + if (enableProfilerTimer) { + workInProgress.effectTag |= Update; + } + + var nextProps = workInProgress.pendingProps; + var nextChildren = nextProps.children; + reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime); + return workInProgress.child; + } + + function markRef(current$$1, workInProgress) { + var ref = workInProgress.ref; + + if ((current$$1 === null && ref !== null) || (current$$1 !== null && current$$1.ref !== ref)) { + // Schedule a Ref effect + workInProgress.effectTag |= Ref; + } + } + + function updateFunctionComponent( + current$$1, + workInProgress, + Component, + nextProps, + renderExpirationTime, + ) { + { + if (workInProgress.type !== workInProgress.elementType) { + // Lazy component props can't be validated in createElement + // because they're only guaranteed to be resolved here. + var innerPropTypes = Component.propTypes; + + if (innerPropTypes) { + checkPropTypes( + innerPropTypes, + nextProps, // Resolved props + 'prop', + getComponentName(Component), + getCurrentFiberStackInDev, + ); + } + } + } + + var context; + + if (!disableLegacyContext) { + var unmaskedContext = getUnmaskedContext(workInProgress, Component, true); + context = getMaskedContext(workInProgress, unmaskedContext); + } + + var nextChildren; + prepareToReadContext(workInProgress, renderExpirationTime); + + { + ReactCurrentOwner$3.current = workInProgress; + setCurrentPhase('render'); + nextChildren = renderWithHooks( + current$$1, + workInProgress, + Component, + nextProps, + context, + renderExpirationTime, + ); + + if (debugRenderPhaseSideEffectsForStrictMode && workInProgress.mode & StrictMode) { + // Only double-render components with Hooks + if (workInProgress.memoizedState !== null) { + nextChildren = renderWithHooks( + current$$1, + workInProgress, + Component, + nextProps, + context, + renderExpirationTime, + ); + } + } + + setCurrentPhase(null); + } + + if (current$$1 !== null && !didReceiveUpdate) { + bailoutHooks(current$$1, workInProgress, renderExpirationTime); + return bailoutOnAlreadyFinishedWork(current$$1, workInProgress, renderExpirationTime); + } // React DevTools reads this flag. + + workInProgress.effectTag |= PerformedWork; + reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime); + return workInProgress.child; + } + + function updateClassComponent( + current$$1, + workInProgress, + Component, + nextProps, + renderExpirationTime, + ) { + { + if (workInProgress.type !== workInProgress.elementType) { + // Lazy component props can't be validated in createElement + // because they're only guaranteed to be resolved here. + var innerPropTypes = Component.propTypes; + + if (innerPropTypes) { + checkPropTypes( + innerPropTypes, + nextProps, // Resolved props + 'prop', + getComponentName(Component), + getCurrentFiberStackInDev, + ); + } + } + } // Push context providers early to prevent context stack mismatches. + // During mounting we don't know the child context yet as the instance doesn't exist. + // We will invalidate the child context in finishClassComponent() right after rendering. + + var hasContext; + + if (isContextProvider(Component)) { + hasContext = true; + pushContextProvider(workInProgress); + } else { + hasContext = false; + } + + prepareToReadContext(workInProgress, renderExpirationTime); + var instance = workInProgress.stateNode; + var shouldUpdate; + + if (instance === null) { + if (current$$1 !== null) { + // An class component without an instance only mounts if it suspended + // inside a non- concurrent tree, in an inconsistent state. We want to + // tree it like a new mount, even though an empty version of it already + // committed. Disconnect the alternate pointers. + current$$1.alternate = null; + workInProgress.alternate = null; // Since this is conceptually a new fiber, schedule a Placement effect + + workInProgress.effectTag |= Placement; + } // In the initial pass we might need to construct the instance. + + constructClassInstance(workInProgress, Component, nextProps, renderExpirationTime); + mountClassInstance(workInProgress, Component, nextProps, renderExpirationTime); + shouldUpdate = true; + } else if (current$$1 === null) { + // In a resume, we'll already have an instance we can reuse. + shouldUpdate = resumeMountClassInstance( + workInProgress, + Component, + nextProps, + renderExpirationTime, + ); + } else { + shouldUpdate = updateClassInstance( + current$$1, + workInProgress, + Component, + nextProps, + renderExpirationTime, + ); + } + + var nextUnitOfWork = finishClassComponent( + current$$1, + workInProgress, + Component, + shouldUpdate, + hasContext, + renderExpirationTime, + ); + + { + var inst = workInProgress.stateNode; + + if (inst.props !== nextProps) { + !didWarnAboutReassigningProps + ? warning$1( + false, + 'It looks like %s is reassigning its own `this.props` while rendering. ' + + 'This is not supported and can lead to confusing bugs.', + getComponentName(workInProgress.type) || 'a component', + ) + : void 0; + didWarnAboutReassigningProps = true; + } + } + + return nextUnitOfWork; + } + + function finishClassComponent( + current$$1, + workInProgress, + Component, + shouldUpdate, + hasContext, + renderExpirationTime, + ) { + // Refs should update even if shouldComponentUpdate returns false + markRef(current$$1, workInProgress); + var didCaptureError = (workInProgress.effectTag & DidCapture) !== NoEffect; + + if (!shouldUpdate && !didCaptureError) { + // Context providers should defer to sCU for rendering + if (hasContext) { + invalidateContextProvider(workInProgress, Component, false); + } + + return bailoutOnAlreadyFinishedWork(current$$1, workInProgress, renderExpirationTime); + } + + var instance = workInProgress.stateNode; // Rerender + + ReactCurrentOwner$3.current = workInProgress; + var nextChildren; + + if (didCaptureError && typeof Component.getDerivedStateFromError !== 'function') { + // If we captured an error, but getDerivedStateFrom catch is not defined, + // unmount all the children. componentDidCatch will schedule an update to + // re-render a fallback. This is temporary until we migrate everyone to + // the new API. + // TODO: Warn in a future release. + nextChildren = null; + + if (enableProfilerTimer) { + stopProfilerTimerIfRunning(workInProgress); + } + } else { + { + setCurrentPhase('render'); + nextChildren = instance.render(); + + if (debugRenderPhaseSideEffectsForStrictMode && workInProgress.mode & StrictMode) { + instance.render(); + } + + setCurrentPhase(null); + } + } // React DevTools reads this flag. + + workInProgress.effectTag |= PerformedWork; + + if (current$$1 !== null && didCaptureError) { + // If we're recovering from an error, reconcile without reusing any of + // the existing children. Conceptually, the normal children and the children + // that are shown on error are two different sets, so we shouldn't reuse + // normal children even if their identities match. + forceUnmountCurrentAndReconcile(current$$1, workInProgress, nextChildren, renderExpirationTime); + } else { + reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime); + } // Memoize state using the values we just used to render. + // TODO: Restructure so we never read values from the instance. + + workInProgress.memoizedState = instance.state; // The context might have changed so we need to recalculate it. + + if (hasContext) { + invalidateContextProvider(workInProgress, Component, true); + } + + return workInProgress.child; + } + + function pushHostRootContext(workInProgress) { + var root = workInProgress.stateNode; + + if (root.pendingContext) { + pushTopLevelContextObject( + workInProgress, + root.pendingContext, + root.pendingContext !== root.context, + ); + } else if (root.context) { + // Should always be set + pushTopLevelContextObject(workInProgress, root.context, false); + } + + pushHostContainer(workInProgress, root.containerInfo); + } + + function updateHostRoot(current$$1, workInProgress, renderExpirationTime) { + pushHostRootContext(workInProgress); + var updateQueue = workInProgress.updateQueue; + + if (!(updateQueue !== null)) { + { + throw Error( + 'If the root does not have an updateQueue, we should have already bailed out. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + + var nextProps = workInProgress.pendingProps; + var prevState = workInProgress.memoizedState; + var prevChildren = prevState !== null ? prevState.element : null; + processUpdateQueue(workInProgress, updateQueue, nextProps, null, renderExpirationTime); + var nextState = workInProgress.memoizedState; // Caution: React DevTools currently depends on this property + // being called "element". + + var nextChildren = nextState.element; + + if (nextChildren === prevChildren) { + // If the state is the same as before, that's a bailout because we had + // no work that expires at this time. + resetHydrationState(); + return bailoutOnAlreadyFinishedWork(current$$1, workInProgress, renderExpirationTime); + } + + var root = workInProgress.stateNode; + + if (root.hydrate && enterHydrationState(workInProgress)) { + // If we don't have any current children this might be the first pass. + // We always try to hydrate. If this isn't a hydration pass there won't + // be any children to hydrate which is effectively the same thing as + // not hydrating. + var child = mountChildFibers(workInProgress, null, nextChildren, renderExpirationTime); + workInProgress.child = child; + var node = child; + + while (node) { + // Mark each child as hydrating. This is a fast path to know whether this + // tree is part of a hydrating tree. This is used to determine if a child + // node has fully mounted yet, and for scheduling event replaying. + // Conceptually this is similar to Placement in that a new subtree is + // inserted into the React tree here. It just happens to not need DOM + // mutations because it already exists. + node.effectTag = (node.effectTag & ~Placement) | Hydrating; + node = node.sibling; + } + } else { + // Otherwise reset hydration state in case we aborted and resumed another + // root. + reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime); + resetHydrationState(); + } + + return workInProgress.child; + } + + function updateHostComponent(current$$1, workInProgress, renderExpirationTime) { + pushHostContext(workInProgress); + + if (current$$1 === null) { + tryToClaimNextHydratableInstance(workInProgress); + } + + var type = workInProgress.type; + var nextProps = workInProgress.pendingProps; + var prevProps = current$$1 !== null ? current$$1.memoizedProps : null; + var nextChildren = nextProps.children; + var isDirectTextChild = shouldSetTextContent(type, nextProps); + + if (isDirectTextChild) { + // We special case a direct text child of a host node. This is a common + // case. We won't handle it as a reified child. We will instead handle + // this in the host environment that also have access to this prop. That + // avoids allocating another HostText fiber and traversing it. + nextChildren = null; + } else if (prevProps !== null && shouldSetTextContent(type, prevProps)) { + // If we're switching from a direct text child to a normal child, or to + // empty, we need to schedule the text content to be reset. + workInProgress.effectTag |= ContentReset; + } + + markRef(current$$1, workInProgress); // Check the host config to see if the children are offscreen/hidden. + + if ( + workInProgress.mode & ConcurrentMode && + renderExpirationTime !== Never && + shouldDeprioritizeSubtree(type, nextProps) + ) { + if (enableSchedulerTracing) { + markSpawnedWork(Never); + } // Schedule this fiber to re-render at offscreen priority. Then bailout. + + workInProgress.expirationTime = workInProgress.childExpirationTime = Never; + return null; + } + + reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime); + return workInProgress.child; + } + + function updateHostText(current$$1, workInProgress) { + if (current$$1 === null) { + tryToClaimNextHydratableInstance(workInProgress); + } // Nothing to do here. This is terminal. We'll do the completion step + // immediately after. + + return null; + } + + function mountLazyComponent( + _current, + workInProgress, + elementType, + updateExpirationTime, + renderExpirationTime, + ) { + if (_current !== null) { + // An lazy component only mounts if it suspended inside a non- + // concurrent tree, in an inconsistent state. We want to treat it like + // a new mount, even though an empty version of it already committed. + // Disconnect the alternate pointers. + _current.alternate = null; + workInProgress.alternate = null; // Since this is conceptually a new fiber, schedule a Placement effect + + workInProgress.effectTag |= Placement; + } + + var props = workInProgress.pendingProps; // We can't start a User Timing measurement with correct label yet. + // Cancel and resume right after we know the tag. + + cancelWorkTimer(workInProgress); + var Component = readLazyComponentType(elementType); // Store the unwrapped component in the type. + + workInProgress.type = Component; + var resolvedTag = (workInProgress.tag = resolveLazyComponentTag(Component)); + startWorkTimer(workInProgress); + var resolvedProps = resolveDefaultProps(Component, props); + var child; + + switch (resolvedTag) { + case FunctionComponent: { + { + validateFunctionComponentInDev(workInProgress, Component); + workInProgress.type = Component = resolveFunctionForHotReloading(Component); + } + + child = updateFunctionComponent( + null, + workInProgress, + Component, + resolvedProps, + renderExpirationTime, + ); + break; + } + + case ClassComponent: { + { + workInProgress.type = Component = resolveClassForHotReloading(Component); + } + + child = updateClassComponent( + null, + workInProgress, + Component, + resolvedProps, + renderExpirationTime, + ); + break; + } + + case ForwardRef: { + { + workInProgress.type = Component = resolveForwardRefForHotReloading(Component); + } + + child = updateForwardRef( + null, + workInProgress, + Component, + resolvedProps, + renderExpirationTime, + ); + break; + } + + case MemoComponent: { + { + if (workInProgress.type !== workInProgress.elementType) { + var outerPropTypes = Component.propTypes; + + if (outerPropTypes) { + checkPropTypes( + outerPropTypes, + resolvedProps, // Resolved for outer only + 'prop', + getComponentName(Component), + getCurrentFiberStackInDev, + ); + } + } + } + + child = updateMemoComponent( + null, + workInProgress, + Component, + resolveDefaultProps(Component.type, resolvedProps), // The inner type can have defaults too + updateExpirationTime, + renderExpirationTime, + ); + break; + } + + default: { + var hint = ''; + + { + if ( + Component !== null && + typeof Component === 'object' && + Component.$$typeof === REACT_LAZY_TYPE + ) { + hint = ' Did you wrap a component in React.lazy() more than once?'; + } + } // This message intentionally doesn't mention ForwardRef or MemoComponent + // because the fact that it's a separate type of work is an + // implementation detail. + + { + { + throw Error( + 'Element type is invalid. Received a promise that resolves to: ' + + Component + + '. Lazy element type must resolve to a class or function.' + + hint, + ); + } + } + } + } + + return child; + } + + function mountIncompleteClassComponent( + _current, + workInProgress, + Component, + nextProps, + renderExpirationTime, + ) { + if (_current !== null) { + // An incomplete component only mounts if it suspended inside a non- + // concurrent tree, in an inconsistent state. We want to treat it like + // a new mount, even though an empty version of it already committed. + // Disconnect the alternate pointers. + _current.alternate = null; + workInProgress.alternate = null; // Since this is conceptually a new fiber, schedule a Placement effect + + workInProgress.effectTag |= Placement; + } // Promote the fiber to a class and try rendering again. + + workInProgress.tag = ClassComponent; // The rest of this function is a fork of `updateClassComponent` + // Push context providers early to prevent context stack mismatches. + // During mounting we don't know the child context yet as the instance doesn't exist. + // We will invalidate the child context in finishClassComponent() right after rendering. + + var hasContext; + + if (isContextProvider(Component)) { + hasContext = true; + pushContextProvider(workInProgress); + } else { + hasContext = false; + } + + prepareToReadContext(workInProgress, renderExpirationTime); + constructClassInstance(workInProgress, Component, nextProps, renderExpirationTime); + mountClassInstance(workInProgress, Component, nextProps, renderExpirationTime); + return finishClassComponent( + null, + workInProgress, + Component, + true, + hasContext, + renderExpirationTime, + ); + } + + function mountIndeterminateComponent(_current, workInProgress, Component, renderExpirationTime) { + if (_current !== null) { + // An indeterminate component only mounts if it suspended inside a non- + // concurrent tree, in an inconsistent state. We want to treat it like + // a new mount, even though an empty version of it already committed. + // Disconnect the alternate pointers. + _current.alternate = null; + workInProgress.alternate = null; // Since this is conceptually a new fiber, schedule a Placement effect + + workInProgress.effectTag |= Placement; + } + + var props = workInProgress.pendingProps; + var context; + + if (!disableLegacyContext) { + var unmaskedContext = getUnmaskedContext(workInProgress, Component, false); + context = getMaskedContext(workInProgress, unmaskedContext); + } + + prepareToReadContext(workInProgress, renderExpirationTime); + var value; + + { + if (Component.prototype && typeof Component.prototype.render === 'function') { + var componentName = getComponentName(Component) || 'Unknown'; + + if (!didWarnAboutBadClass[componentName]) { + warningWithoutStack$1( + false, + "The <%s /> component appears to have a render method, but doesn't extend React.Component. " + + 'This is likely to cause errors. Change %s to extend React.Component instead.', + componentName, + componentName, + ); + didWarnAboutBadClass[componentName] = true; + } + } + + if (workInProgress.mode & StrictMode) { + ReactStrictModeWarnings.recordLegacyContextWarning(workInProgress, null); + } + + ReactCurrentOwner$3.current = workInProgress; + value = renderWithHooks(null, workInProgress, Component, props, context, renderExpirationTime); + } // React DevTools reads this flag. + + workInProgress.effectTag |= PerformedWork; + + if ( + typeof value === 'object' && + value !== null && + typeof value.render === 'function' && + value.$$typeof === undefined + ) { + { + var _componentName = getComponentName(Component) || 'Unknown'; + + if (!didWarnAboutModulePatternComponent[_componentName]) { + warningWithoutStack$1( + false, + 'The <%s /> component appears to be a function component that returns a class instance. ' + + 'Change %s to a class that extends React.Component instead. ' + + "If you can't use a class try assigning the prototype on the function as a workaround. " + + "`%s.prototype = React.Component.prototype`. Don't use an arrow function since it " + + 'cannot be called with `new` by React.', + _componentName, + _componentName, + _componentName, + ); + didWarnAboutModulePatternComponent[_componentName] = true; + } + } // Proceed under the assumption that this is a class instance + + workInProgress.tag = ClassComponent; // Throw out any hooks that were used. + + resetHooks(); // Push context providers early to prevent context stack mismatches. + // During mounting we don't know the child context yet as the instance doesn't exist. + // We will invalidate the child context in finishClassComponent() right after rendering. + + var hasContext = false; + + if (isContextProvider(Component)) { + hasContext = true; + pushContextProvider(workInProgress); + } else { + hasContext = false; + } + + workInProgress.memoizedState = + value.state !== null && value.state !== undefined ? value.state : null; + var getDerivedStateFromProps = Component.getDerivedStateFromProps; + + if (typeof getDerivedStateFromProps === 'function') { + applyDerivedStateFromProps(workInProgress, Component, getDerivedStateFromProps, props); + } + + adoptClassInstance(workInProgress, value); + mountClassInstance(workInProgress, Component, props, renderExpirationTime); + return finishClassComponent( + null, + workInProgress, + Component, + true, + hasContext, + renderExpirationTime, + ); + } else { + // Proceed under the assumption that this is a function component + workInProgress.tag = FunctionComponent; + + { + if (disableLegacyContext && Component.contextTypes) { + warningWithoutStack$1( + false, + '%s uses the legacy contextTypes API which is no longer supported. ' + + 'Use React.createContext() with React.useContext() instead.', + getComponentName(Component) || 'Unknown', + ); + } + + if (debugRenderPhaseSideEffectsForStrictMode && workInProgress.mode & StrictMode) { + // Only double-render components with Hooks + if (workInProgress.memoizedState !== null) { + value = renderWithHooks( + null, + workInProgress, + Component, + props, + context, + renderExpirationTime, + ); + } + } + } + + reconcileChildren(null, workInProgress, value, renderExpirationTime); + + { + validateFunctionComponentInDev(workInProgress, Component); + } + + return workInProgress.child; + } + } + + function validateFunctionComponentInDev(workInProgress, Component) { + if (Component) { + !!Component.childContextTypes + ? warningWithoutStack$1( + false, + '%s(...): childContextTypes cannot be defined on a function component.', + Component.displayName || Component.name || 'Component', + ) + : void 0; + } + + if (workInProgress.ref !== null) { + var info = ''; + var ownerName = getCurrentFiberOwnerNameInDevOrNull(); + + if (ownerName) { + info += '\n\nCheck the render method of `' + ownerName + '`.'; + } + + var warningKey = ownerName || workInProgress._debugID || ''; + var debugSource = workInProgress._debugSource; + + if (debugSource) { + warningKey = debugSource.fileName + ':' + debugSource.lineNumber; + } + + if (!didWarnAboutFunctionRefs[warningKey]) { + didWarnAboutFunctionRefs[warningKey] = true; + warning$1( + false, + 'Function components cannot be given refs. ' + + 'Attempts to access this ref will fail. ' + + 'Did you mean to use React.forwardRef()?%s', + info, + ); + } + } + + if (warnAboutDefaultPropsOnFunctionComponents && Component.defaultProps !== undefined) { + var componentName = getComponentName(Component) || 'Unknown'; + + if (!didWarnAboutDefaultPropsOnFunctionComponent[componentName]) { + warningWithoutStack$1( + false, + '%s: Support for defaultProps will be removed from function components ' + + 'in a future major release. Use JavaScript default parameters instead.', + componentName, + ); + didWarnAboutDefaultPropsOnFunctionComponent[componentName] = true; + } + } + + if (typeof Component.getDerivedStateFromProps === 'function') { + var _componentName2 = getComponentName(Component) || 'Unknown'; + + if (!didWarnAboutGetDerivedStateOnFunctionComponent[_componentName2]) { + warningWithoutStack$1( + false, + '%s: Function components do not support getDerivedStateFromProps.', + _componentName2, + ); + didWarnAboutGetDerivedStateOnFunctionComponent[_componentName2] = true; + } + } + + if (typeof Component.contextType === 'object' && Component.contextType !== null) { + var _componentName3 = getComponentName(Component) || 'Unknown'; + + if (!didWarnAboutContextTypeOnFunctionComponent[_componentName3]) { + warningWithoutStack$1( + false, + '%s: Function components do not support contextType.', + _componentName3, + ); + didWarnAboutContextTypeOnFunctionComponent[_componentName3] = true; + } + } + } + + var SUSPENDED_MARKER = { + dehydrated: null, + retryTime: NoWork, + }; + + function shouldRemainOnFallback(suspenseContext, current$$1, workInProgress) { + // If the context is telling us that we should show a fallback, and we're not + // already showing content, then we should show the fallback instead. + return ( + hasSuspenseContext(suspenseContext, ForceSuspenseFallback) && + (current$$1 === null || current$$1.memoizedState !== null) + ); + } + + function updateSuspenseComponent(current$$1, workInProgress, renderExpirationTime) { + var mode = workInProgress.mode; + var nextProps = workInProgress.pendingProps; // This is used by DevTools to force a boundary to suspend. + + { + if (shouldSuspend(workInProgress)) { + workInProgress.effectTag |= DidCapture; + } + } + + var suspenseContext = suspenseStackCursor.current; + var nextDidTimeout = false; + var didSuspend = (workInProgress.effectTag & DidCapture) !== NoEffect; + + if (didSuspend || shouldRemainOnFallback(suspenseContext, current$$1, workInProgress)) { + // Something in this boundary's subtree already suspended. Switch to + // rendering the fallback children. + nextDidTimeout = true; + workInProgress.effectTag &= ~DidCapture; + } else { + // Attempting the main content + if (current$$1 === null || current$$1.memoizedState !== null) { + // This is a new mount or this boundary is already showing a fallback state. + // Mark this subtree context as having at least one invisible parent that could + // handle the fallback state. + // Boundaries without fallbacks or should be avoided are not considered since + // they cannot handle preferred fallback states. + if (nextProps.fallback !== undefined && nextProps.unstable_avoidThisFallback !== true) { + suspenseContext = addSubtreeSuspenseContext( + suspenseContext, + InvisibleParentSuspenseContext, + ); + } + } + } + + suspenseContext = setDefaultShallowSuspenseContext(suspenseContext); + pushSuspenseContext(workInProgress, suspenseContext); + + { + if ('maxDuration' in nextProps) { + if (!didWarnAboutMaxDuration) { + didWarnAboutMaxDuration = true; + warning$1( + false, + 'maxDuration has been removed from React. ' + 'Remove the maxDuration prop.', + ); + } + } + } // This next part is a bit confusing. If the children timeout, we switch to + // showing the fallback children in place of the "primary" children. + // However, we don't want to delete the primary children because then their + // state will be lost (both the React state and the host state, e.g. + // uncontrolled form inputs). Instead we keep them mounted and hide them. + // Both the fallback children AND the primary children are rendered at the + // same time. Once the primary children are un-suspended, we can delete + // the fallback children — don't need to preserve their state. + // + // The two sets of children are siblings in the host environment, but + // semantically, for purposes of reconciliation, they are two separate sets. + // So we store them using two fragment fibers. + // + // However, we want to avoid allocating extra fibers for every placeholder. + // They're only necessary when the children time out, because that's the + // only time when both sets are mounted. + // + // So, the extra fragment fibers are only used if the children time out. + // Otherwise, we render the primary children directly. This requires some + // custom reconciliation logic to preserve the state of the primary + // children. It's essentially a very basic form of re-parenting. + + if (current$$1 === null) { + // If we're currently hydrating, try to hydrate this boundary. + // But only if this has a fallback. + if (nextProps.fallback !== undefined) { + tryToClaimNextHydratableInstance(workInProgress); // This could've been a dehydrated suspense component. + + if (enableSuspenseServerRenderer) { + var suspenseState = workInProgress.memoizedState; + + if (suspenseState !== null) { + var dehydrated = suspenseState.dehydrated; + + if (dehydrated !== null) { + return mountDehydratedSuspenseComponent( + workInProgress, + dehydrated, + renderExpirationTime, + ); + } + } + } + } // This is the initial mount. This branch is pretty simple because there's + // no previous state that needs to be preserved. + + if (nextDidTimeout) { + // Mount separate fragments for primary and fallback children. + var nextFallbackChildren = nextProps.fallback; + var primaryChildFragment = createFiberFromFragment(null, mode, NoWork, null); + primaryChildFragment.return = workInProgress; + + if ((workInProgress.mode & BlockingMode) === NoMode) { + // Outside of blocking mode, we commit the effects from the + // partially completed, timed-out tree, too. + var progressedState = workInProgress.memoizedState; + var progressedPrimaryChild = + progressedState !== null ? workInProgress.child.child : workInProgress.child; + primaryChildFragment.child = progressedPrimaryChild; + var progressedChild = progressedPrimaryChild; + + while (progressedChild !== null) { + progressedChild.return = primaryChildFragment; + progressedChild = progressedChild.sibling; + } + } + + var fallbackChildFragment = createFiberFromFragment( + nextFallbackChildren, + mode, + renderExpirationTime, + null, + ); + fallbackChildFragment.return = workInProgress; + primaryChildFragment.sibling = fallbackChildFragment; // Skip the primary children, and continue working on the + // fallback children. + + workInProgress.memoizedState = SUSPENDED_MARKER; + workInProgress.child = primaryChildFragment; + return fallbackChildFragment; + } else { + // Mount the primary children without an intermediate fragment fiber. + var nextPrimaryChildren = nextProps.children; + workInProgress.memoizedState = null; + return (workInProgress.child = mountChildFibers( + workInProgress, + null, + nextPrimaryChildren, + renderExpirationTime, + )); + } + } else { + // This is an update. This branch is more complicated because we need to + // ensure the state of the primary children is preserved. + var prevState = current$$1.memoizedState; + + if (prevState !== null) { + if (enableSuspenseServerRenderer) { + var _dehydrated = prevState.dehydrated; + + if (_dehydrated !== null) { + if (!didSuspend) { + return updateDehydratedSuspenseComponent( + current$$1, + workInProgress, + _dehydrated, + prevState, + renderExpirationTime, + ); + } else if (workInProgress.memoizedState !== null) { + // Something suspended and we should still be in dehydrated mode. + // Leave the existing child in place. + workInProgress.child = current$$1.child; // The dehydrated completion pass expects this flag to be there + // but the normal suspense pass doesn't. + + workInProgress.effectTag |= DidCapture; + return null; + } else { + // Suspended but we should no longer be in dehydrated mode. + // Therefore we now have to render the fallback. Wrap the children + // in a fragment fiber to keep them separate from the fallback + // children. + var _nextFallbackChildren = nextProps.fallback; + + var _primaryChildFragment = createFiberFromFragment( + // It shouldn't matter what the pending props are because we aren't + // going to render this fragment. + null, + mode, + NoWork, + null, + ); + + _primaryChildFragment.return = workInProgress; // This is always null since we never want the previous child + // that we're not going to hydrate. + + _primaryChildFragment.child = null; + + if ((workInProgress.mode & BlockingMode) === NoMode) { + // Outside of blocking mode, we commit the effects from the + // partially completed, timed-out tree, too. + var _progressedChild = (_primaryChildFragment.child = workInProgress.child); + + while (_progressedChild !== null) { + _progressedChild.return = _primaryChildFragment; + _progressedChild = _progressedChild.sibling; + } + } else { + // We will have dropped the effect list which contains the deletion. + // We need to reconcile to delete the current child. + reconcileChildFibers(workInProgress, current$$1.child, null, renderExpirationTime); + } // Because primaryChildFragment is a new fiber that we're inserting as the + // parent of a new tree, we need to set its treeBaseDuration. + + if (enableProfilerTimer && workInProgress.mode & ProfileMode) { + // treeBaseDuration is the sum of all the child tree base durations. + var treeBaseDuration = 0; + var hiddenChild = _primaryChildFragment.child; + + while (hiddenChild !== null) { + treeBaseDuration += hiddenChild.treeBaseDuration; + hiddenChild = hiddenChild.sibling; + } + + _primaryChildFragment.treeBaseDuration = treeBaseDuration; + } // Create a fragment from the fallback children, too. + + var _fallbackChildFragment = createFiberFromFragment( + _nextFallbackChildren, + mode, + renderExpirationTime, + null, + ); + + _fallbackChildFragment.return = workInProgress; + _primaryChildFragment.sibling = _fallbackChildFragment; + _fallbackChildFragment.effectTag |= Placement; + _primaryChildFragment.childExpirationTime = NoWork; + workInProgress.memoizedState = SUSPENDED_MARKER; + workInProgress.child = _primaryChildFragment; // Skip the primary children, and continue working on the + // fallback children. + + return _fallbackChildFragment; + } + } + } // The current tree already timed out. That means each child set is + // wrapped in a fragment fiber. + + var currentPrimaryChildFragment = current$$1.child; + var currentFallbackChildFragment = currentPrimaryChildFragment.sibling; + + if (nextDidTimeout) { + // Still timed out. Reuse the current primary children by cloning + // its fragment. We're going to skip over these entirely. + var _nextFallbackChildren2 = nextProps.fallback; + + var _primaryChildFragment2 = createWorkInProgress( + currentPrimaryChildFragment, + currentPrimaryChildFragment.pendingProps, + NoWork, + ); + + _primaryChildFragment2.return = workInProgress; + + if ((workInProgress.mode & BlockingMode) === NoMode) { + // Outside of blocking mode, we commit the effects from the + // partially completed, timed-out tree, too. + var _progressedState = workInProgress.memoizedState; + + var _progressedPrimaryChild = + _progressedState !== null ? workInProgress.child.child : workInProgress.child; + + if (_progressedPrimaryChild !== currentPrimaryChildFragment.child) { + _primaryChildFragment2.child = _progressedPrimaryChild; + var _progressedChild2 = _progressedPrimaryChild; + + while (_progressedChild2 !== null) { + _progressedChild2.return = _primaryChildFragment2; + _progressedChild2 = _progressedChild2.sibling; + } + } + } // Because primaryChildFragment is a new fiber that we're inserting as the + // parent of a new tree, we need to set its treeBaseDuration. + + if (enableProfilerTimer && workInProgress.mode & ProfileMode) { + // treeBaseDuration is the sum of all the child tree base durations. + var _treeBaseDuration = 0; + var _hiddenChild = _primaryChildFragment2.child; + + while (_hiddenChild !== null) { + _treeBaseDuration += _hiddenChild.treeBaseDuration; + _hiddenChild = _hiddenChild.sibling; + } + + _primaryChildFragment2.treeBaseDuration = _treeBaseDuration; + } // Clone the fallback child fragment, too. These we'll continue + // working on. + + var _fallbackChildFragment2 = createWorkInProgress( + currentFallbackChildFragment, + _nextFallbackChildren2, + currentFallbackChildFragment.expirationTime, + ); + + _fallbackChildFragment2.return = workInProgress; + _primaryChildFragment2.sibling = _fallbackChildFragment2; + _primaryChildFragment2.childExpirationTime = NoWork; // Skip the primary children, and continue working on the + // fallback children. + + workInProgress.memoizedState = SUSPENDED_MARKER; + workInProgress.child = _primaryChildFragment2; + return _fallbackChildFragment2; + } else { + // No longer suspended. Switch back to showing the primary children, + // and remove the intermediate fragment fiber. + var _nextPrimaryChildren = nextProps.children; + var currentPrimaryChild = currentPrimaryChildFragment.child; + var primaryChild = reconcileChildFibers( + workInProgress, + currentPrimaryChild, + _nextPrimaryChildren, + renderExpirationTime, + ); // If this render doesn't suspend, we need to delete the fallback + // children. Wait until the complete phase, after we've confirmed the + // fallback is no longer needed. + // TODO: Would it be better to store the fallback fragment on + // the stateNode? + // Continue rendering the children, like we normally do. + + workInProgress.memoizedState = null; + return (workInProgress.child = primaryChild); + } + } else { + // The current tree has not already timed out. That means the primary + // children are not wrapped in a fragment fiber. + var _currentPrimaryChild = current$$1.child; + + if (nextDidTimeout) { + // Timed out. Wrap the children in a fragment fiber to keep them + // separate from the fallback children. + var _nextFallbackChildren3 = nextProps.fallback; + + var _primaryChildFragment3 = createFiberFromFragment( + // It shouldn't matter what the pending props are because we aren't + // going to render this fragment. + null, + mode, + NoWork, + null, + ); + + _primaryChildFragment3.return = workInProgress; + _primaryChildFragment3.child = _currentPrimaryChild; + + if (_currentPrimaryChild !== null) { + _currentPrimaryChild.return = _primaryChildFragment3; + } // Even though we're creating a new fiber, there are no new children, + // because we're reusing an already mounted tree. So we don't need to + // schedule a placement. + // primaryChildFragment.effectTag |= Placement; + + if ((workInProgress.mode & BlockingMode) === NoMode) { + // Outside of blocking mode, we commit the effects from the + // partially completed, timed-out tree, too. + var _progressedState2 = workInProgress.memoizedState; + + var _progressedPrimaryChild2 = + _progressedState2 !== null ? workInProgress.child.child : workInProgress.child; + + _primaryChildFragment3.child = _progressedPrimaryChild2; + var _progressedChild3 = _progressedPrimaryChild2; + + while (_progressedChild3 !== null) { + _progressedChild3.return = _primaryChildFragment3; + _progressedChild3 = _progressedChild3.sibling; + } + } // Because primaryChildFragment is a new fiber that we're inserting as the + // parent of a new tree, we need to set its treeBaseDuration. + + if (enableProfilerTimer && workInProgress.mode & ProfileMode) { + // treeBaseDuration is the sum of all the child tree base durations. + var _treeBaseDuration2 = 0; + var _hiddenChild2 = _primaryChildFragment3.child; + + while (_hiddenChild2 !== null) { + _treeBaseDuration2 += _hiddenChild2.treeBaseDuration; + _hiddenChild2 = _hiddenChild2.sibling; + } + + _primaryChildFragment3.treeBaseDuration = _treeBaseDuration2; + } // Create a fragment from the fallback children, too. + + var _fallbackChildFragment3 = createFiberFromFragment( + _nextFallbackChildren3, + mode, + renderExpirationTime, + null, + ); + + _fallbackChildFragment3.return = workInProgress; + _primaryChildFragment3.sibling = _fallbackChildFragment3; + _fallbackChildFragment3.effectTag |= Placement; + _primaryChildFragment3.childExpirationTime = NoWork; // Skip the primary children, and continue working on the + // fallback children. + + workInProgress.memoizedState = SUSPENDED_MARKER; + workInProgress.child = _primaryChildFragment3; + return _fallbackChildFragment3; + } else { + // Still haven't timed out. Continue rendering the children, like we + // normally do. + workInProgress.memoizedState = null; + var _nextPrimaryChildren2 = nextProps.children; + return (workInProgress.child = reconcileChildFibers( + workInProgress, + _currentPrimaryChild, + _nextPrimaryChildren2, + renderExpirationTime, + )); + } + } + } + } + + function retrySuspenseComponentWithoutHydrating(current$$1, workInProgress, renderExpirationTime) { + // We're now not suspended nor dehydrated. + workInProgress.memoizedState = null; // Retry with the full children. + + var nextProps = workInProgress.pendingProps; + var nextChildren = nextProps.children; // This will ensure that the children get Placement effects and + // that the old child gets a Deletion effect. + // We could also call forceUnmountCurrentAndReconcile. + + reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime); + return workInProgress.child; + } + + function mountDehydratedSuspenseComponent(workInProgress, suspenseInstance, renderExpirationTime) { + // During the first pass, we'll bail out and not drill into the children. + // Instead, we'll leave the content in place and try to hydrate it later. + if ((workInProgress.mode & BlockingMode) === NoMode) { + { + warning$1( + false, + 'Cannot hydrate Suspense in legacy mode. Switch from ' + + 'ReactDOM.hydrate(element, container) to ' + + 'ReactDOM.createBlockingRoot(container, { hydrate: true })' + + '.render(element) or remove the Suspense components from ' + + 'the server rendered components.', + ); + } + + workInProgress.expirationTime = Sync; + } else if (isSuspenseInstanceFallback(suspenseInstance)) { + // This is a client-only boundary. Since we won't get any content from the server + // for this, we need to schedule that at a higher priority based on when it would + // have timed out. In theory we could render it in this pass but it would have the + // wrong priority associated with it and will prevent hydration of parent path. + // Instead, we'll leave work left on it to render it in a separate commit. + // TODO This time should be the time at which the server rendered response that is + // a parent to this boundary was displayed. However, since we currently don't have + // a protocol to transfer that time, we'll just estimate it by using the current + // time. This will mean that Suspense timeouts are slightly shifted to later than + // they should be. + var serverDisplayTime = requestCurrentTimeForUpdate(); // Schedule a normal pri update to render this content. + + var newExpirationTime = computeAsyncExpiration(serverDisplayTime); + + if (enableSchedulerTracing) { + markSpawnedWork(newExpirationTime); + } + + workInProgress.expirationTime = newExpirationTime; + } else { + // We'll continue hydrating the rest at offscreen priority since we'll already + // be showing the right content coming from the server, it is no rush. + workInProgress.expirationTime = Never; + + if (enableSchedulerTracing) { + markSpawnedWork(Never); + } + } + + return null; + } + + function updateDehydratedSuspenseComponent( + current$$1, + workInProgress, + suspenseInstance, + suspenseState, + renderExpirationTime, + ) { + // We should never be hydrating at this point because it is the first pass, + // but after we've already committed once. + warnIfHydrating(); + + if ((workInProgress.mode & BlockingMode) === NoMode) { + return retrySuspenseComponentWithoutHydrating(current$$1, workInProgress, renderExpirationTime); + } + + if (isSuspenseInstanceFallback(suspenseInstance)) { + // This boundary is in a permanent fallback state. In this case, we'll never + // get an update and we'll never be able to hydrate the final content. Let's just try the + // client side render instead. + return retrySuspenseComponentWithoutHydrating(current$$1, workInProgress, renderExpirationTime); + } // We use childExpirationTime to indicate that a child might depend on context, so if + // any context has changed, we need to treat is as if the input might have changed. + + var hasContextChanged$$1 = current$$1.childExpirationTime >= renderExpirationTime; + + if (didReceiveUpdate || hasContextChanged$$1) { + // This boundary has changed since the first render. This means that we are now unable to + // hydrate it. We might still be able to hydrate it using an earlier expiration time, if + // we are rendering at lower expiration than sync. + if (renderExpirationTime < Sync) { + if (suspenseState.retryTime <= renderExpirationTime) { + // This render is even higher pri than we've seen before, let's try again + // at even higher pri. + var attemptHydrationAtExpirationTime = renderExpirationTime + 1; + suspenseState.retryTime = attemptHydrationAtExpirationTime; + scheduleWork(current$$1, attemptHydrationAtExpirationTime); // TODO: Early abort this render. + } else { + // We have already tried to ping at a higher priority than we're rendering with + // so if we got here, we must have failed to hydrate at those levels. We must + // now give up. Instead, we're going to delete the whole subtree and instead inject + // a new real Suspense boundary to take its place, which may render content + // or fallback. This might suspend for a while and if it does we might still have + // an opportunity to hydrate before this pass commits. + } + } // If we have scheduled higher pri work above, this will probably just abort the render + // since we now have higher priority work, but in case it doesn't, we need to prepare to + // render something, if we time out. Even if that requires us to delete everything and + // skip hydration. + // Delay having to do this as long as the suspense timeout allows us. + + renderDidSuspendDelayIfPossible(); + return retrySuspenseComponentWithoutHydrating(current$$1, workInProgress, renderExpirationTime); + } else if (isSuspenseInstancePending(suspenseInstance)) { + // This component is still pending more data from the server, so we can't hydrate its + // content. We treat it as if this component suspended itself. It might seem as if + // we could just try to render it client-side instead. However, this will perform a + // lot of unnecessary work and is unlikely to complete since it often will suspend + // on missing data anyway. Additionally, the server might be able to render more + // than we can on the client yet. In that case we'd end up with more fallback states + // on the client than if we just leave it alone. If the server times out or errors + // these should update this boundary to the permanent Fallback state instead. + // Mark it as having captured (i.e. suspended). + workInProgress.effectTag |= DidCapture; // Leave the child in place. I.e. the dehydrated fragment. + + workInProgress.child = current$$1.child; // Register a callback to retry this boundary once the server has sent the result. + + registerSuspenseInstanceRetry( + suspenseInstance, + retryDehydratedSuspenseBoundary.bind(null, current$$1), + ); + return null; + } else { + // This is the first attempt. + reenterHydrationStateFromDehydratedSuspenseInstance(workInProgress, suspenseInstance); + var nextProps = workInProgress.pendingProps; + var nextChildren = nextProps.children; + var child = mountChildFibers(workInProgress, null, nextChildren, renderExpirationTime); + var node = child; + + while (node) { + // Mark each child as hydrating. This is a fast path to know whether this + // tree is part of a hydrating tree. This is used to determine if a child + // node has fully mounted yet, and for scheduling event replaying. + // Conceptually this is similar to Placement in that a new subtree is + // inserted into the React tree here. It just happens to not need DOM + // mutations because it already exists. + node.effectTag |= Hydrating; + node = node.sibling; + } + + workInProgress.child = child; + return workInProgress.child; + } + } + + function scheduleWorkOnFiber(fiber, renderExpirationTime) { + if (fiber.expirationTime < renderExpirationTime) { + fiber.expirationTime = renderExpirationTime; + } + + var alternate = fiber.alternate; + + if (alternate !== null && alternate.expirationTime < renderExpirationTime) { + alternate.expirationTime = renderExpirationTime; + } + + scheduleWorkOnParentPath(fiber.return, renderExpirationTime); + } + + function propagateSuspenseContextChange(workInProgress, firstChild, renderExpirationTime) { + // Mark any Suspense boundaries with fallbacks as having work to do. + // If they were previously forced into fallbacks, they may now be able + // to unblock. + var node = firstChild; + + while (node !== null) { + if (node.tag === SuspenseComponent) { + var state = node.memoizedState; + + if (state !== null) { + scheduleWorkOnFiber(node, renderExpirationTime); + } + } else if (node.tag === SuspenseListComponent) { + // If the tail is hidden there might not be an Suspense boundaries + // to schedule work on. In this case we have to schedule it on the + // list itself. + // We don't have to traverse to the children of the list since + // the list will propagate the change when it rerenders. + scheduleWorkOnFiber(node, renderExpirationTime); + } else if (node.child !== null) { + node.child.return = node; + node = node.child; + continue; + } + + if (node === workInProgress) { + return; + } + + while (node.sibling === null) { + if (node.return === null || node.return === workInProgress) { + return; + } + + node = node.return; + } + + node.sibling.return = node.return; + node = node.sibling; + } + } + + function findLastContentRow(firstChild) { + // This is going to find the last row among these children that is already + // showing content on the screen, as opposed to being in fallback state or + // new. If a row has multiple Suspense boundaries, any of them being in the + // fallback state, counts as the whole row being in a fallback state. + // Note that the "rows" will be workInProgress, but any nested children + // will still be current since we haven't rendered them yet. The mounted + // order may not be the same as the new order. We use the new order. + var row = firstChild; + var lastContentRow = null; + + while (row !== null) { + var currentRow = row.alternate; // New rows can't be content rows. + + if (currentRow !== null && findFirstSuspended(currentRow) === null) { + lastContentRow = row; + } + + row = row.sibling; + } + + return lastContentRow; + } + + function validateRevealOrder(revealOrder) { + { + if ( + revealOrder !== undefined && + revealOrder !== 'forwards' && + revealOrder !== 'backwards' && + revealOrder !== 'together' && + !didWarnAboutRevealOrder[revealOrder] + ) { + didWarnAboutRevealOrder[revealOrder] = true; + + if (typeof revealOrder === 'string') { + switch (revealOrder.toLowerCase()) { + case 'together': + case 'forwards': + case 'backwards': { + warning$1( + false, + '"%s" is not a valid value for revealOrder on <SuspenseList />. ' + + 'Use lowercase "%s" instead.', + revealOrder, + revealOrder.toLowerCase(), + ); + break; + } + + case 'forward': + case 'backward': { + warning$1( + false, + '"%s" is not a valid value for revealOrder on <SuspenseList />. ' + + 'React uses the -s suffix in the spelling. Use "%ss" instead.', + revealOrder, + revealOrder.toLowerCase(), + ); + break; + } + + default: + warning$1( + false, + '"%s" is not a supported revealOrder on <SuspenseList />. ' + + 'Did you mean "together", "forwards" or "backwards"?', + revealOrder, + ); + break; + } + } else { + warning$1( + false, + '%s is not a supported value for revealOrder on <SuspenseList />. ' + + 'Did you mean "together", "forwards" or "backwards"?', + revealOrder, + ); + } + } + } + } + + function validateTailOptions(tailMode, revealOrder) { + { + if (tailMode !== undefined && !didWarnAboutTailOptions[tailMode]) { + if (tailMode !== 'collapsed' && tailMode !== 'hidden') { + didWarnAboutTailOptions[tailMode] = true; + warning$1( + false, + '"%s" is not a supported value for tail on <SuspenseList />. ' + + 'Did you mean "collapsed" or "hidden"?', + tailMode, + ); + } else if (revealOrder !== 'forwards' && revealOrder !== 'backwards') { + didWarnAboutTailOptions[tailMode] = true; + warning$1( + false, + '<SuspenseList tail="%s" /> is only valid if revealOrder is ' + + '"forwards" or "backwards". ' + + 'Did you mean to specify revealOrder="forwards"?', + tailMode, + ); + } + } + } + } + + function validateSuspenseListNestedChild(childSlot, index) { + { + var isArray = Array.isArray(childSlot); + var isIterable = !isArray && typeof getIteratorFn(childSlot) === 'function'; + + if (isArray || isIterable) { + var type = isArray ? 'array' : 'iterable'; + warning$1( + false, + 'A nested %s was passed to row #%s in <SuspenseList />. Wrap it in ' + + 'an additional SuspenseList to configure its revealOrder: ' + + '<SuspenseList revealOrder=...> ... ' + + '<SuspenseList revealOrder=...>{%s}</SuspenseList> ... ' + + '</SuspenseList>', + type, + index, + type, + ); + return false; + } + } + + return true; + } + + function validateSuspenseListChildren(children, revealOrder) { + { + if ( + (revealOrder === 'forwards' || revealOrder === 'backwards') && + children !== undefined && + children !== null && + children !== false + ) { + if (Array.isArray(children)) { + for (var i = 0; i < children.length; i++) { + if (!validateSuspenseListNestedChild(children[i], i)) { + return; + } + } + } else { + var iteratorFn = getIteratorFn(children); + + if (typeof iteratorFn === 'function') { + var childrenIterator = iteratorFn.call(children); + + if (childrenIterator) { + var step = childrenIterator.next(); + var _i = 0; + + for (; !step.done; step = childrenIterator.next()) { + if (!validateSuspenseListNestedChild(step.value, _i)) { + return; + } + + _i++; + } + } + } else { + warning$1( + false, + 'A single row was passed to a <SuspenseList revealOrder="%s" />. ' + + 'This is not useful since it needs multiple rows. ' + + 'Did you mean to pass multiple children or an array?', + revealOrder, + ); + } + } + } + } + } + + function initSuspenseListRenderState( + workInProgress, + isBackwards, + tail, + lastContentRow, + tailMode, + lastEffectBeforeRendering, + ) { + var renderState = workInProgress.memoizedState; + + if (renderState === null) { + workInProgress.memoizedState = { + isBackwards: isBackwards, + rendering: null, + last: lastContentRow, + tail: tail, + tailExpiration: 0, + tailMode: tailMode, + lastEffect: lastEffectBeforeRendering, + }; + } else { + // We can reuse the existing object from previous renders. + renderState.isBackwards = isBackwards; + renderState.rendering = null; + renderState.last = lastContentRow; + renderState.tail = tail; + renderState.tailExpiration = 0; + renderState.tailMode = tailMode; + renderState.lastEffect = lastEffectBeforeRendering; + } + } // This can end up rendering this component multiple passes. + // The first pass splits the children fibers into two sets. A head and tail. + // We first render the head. If anything is in fallback state, we do another + // pass through beginWork to rerender all children (including the tail) with + // the force suspend context. If the first render didn't have anything in + // in fallback state. Then we render each row in the tail one-by-one. + // That happens in the completeWork phase without going back to beginWork. + + function updateSuspenseListComponent(current$$1, workInProgress, renderExpirationTime) { + var nextProps = workInProgress.pendingProps; + var revealOrder = nextProps.revealOrder; + var tailMode = nextProps.tail; + var newChildren = nextProps.children; + validateRevealOrder(revealOrder); + validateTailOptions(tailMode, revealOrder); + validateSuspenseListChildren(newChildren, revealOrder); + reconcileChildren(current$$1, workInProgress, newChildren, renderExpirationTime); + var suspenseContext = suspenseStackCursor.current; + var shouldForceFallback = hasSuspenseContext(suspenseContext, ForceSuspenseFallback); + + if (shouldForceFallback) { + suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback); + workInProgress.effectTag |= DidCapture; + } else { + var didSuspendBefore = current$$1 !== null && (current$$1.effectTag & DidCapture) !== NoEffect; + + if (didSuspendBefore) { + // If we previously forced a fallback, we need to schedule work + // on any nested boundaries to let them know to try to render + // again. This is the same as context updating. + propagateSuspenseContextChange(workInProgress, workInProgress.child, renderExpirationTime); + } + + suspenseContext = setDefaultShallowSuspenseContext(suspenseContext); + } + + pushSuspenseContext(workInProgress, suspenseContext); + + if ((workInProgress.mode & BlockingMode) === NoMode) { + // Outside of blocking mode, SuspenseList doesn't work so we just + // use make it a noop by treating it as the default revealOrder. + workInProgress.memoizedState = null; + } else { + switch (revealOrder) { + case 'forwards': { + var lastContentRow = findLastContentRow(workInProgress.child); + var tail; + + if (lastContentRow === null) { + // The whole list is part of the tail. + // TODO: We could fast path by just rendering the tail now. + tail = workInProgress.child; + workInProgress.child = null; + } else { + // Disconnect the tail rows after the content row. + // We're going to render them separately later. + tail = lastContentRow.sibling; + lastContentRow.sibling = null; + } + + initSuspenseListRenderState( + workInProgress, + false, // isBackwards + tail, + lastContentRow, + tailMode, + workInProgress.lastEffect, + ); + break; + } + + case 'backwards': { + // We're going to find the first row that has existing content. + // At the same time we're going to reverse the list of everything + // we pass in the meantime. That's going to be our tail in reverse + // order. + var _tail = null; + var row = workInProgress.child; + workInProgress.child = null; + + while (row !== null) { + var currentRow = row.alternate; // New rows can't be content rows. + + if (currentRow !== null && findFirstSuspended(currentRow) === null) { + // This is the beginning of the main content. + workInProgress.child = row; + break; + } + + var nextRow = row.sibling; + row.sibling = _tail; + _tail = row; + row = nextRow; + } // TODO: If workInProgress.child is null, we can continue on the tail immediately. + + initSuspenseListRenderState( + workInProgress, + true, // isBackwards + _tail, + null, // last + tailMode, + workInProgress.lastEffect, + ); + break; + } + + case 'together': { + initSuspenseListRenderState( + workInProgress, + false, // isBackwards + null, // tail + null, // last + undefined, + workInProgress.lastEffect, + ); + break; + } + + default: { + // The default reveal order is the same as not having + // a boundary. + workInProgress.memoizedState = null; + } + } + } + + return workInProgress.child; + } + + function updatePortalComponent(current$$1, workInProgress, renderExpirationTime) { + pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo); + var nextChildren = workInProgress.pendingProps; + + if (current$$1 === null) { + // Portals are special because we don't append the children during mount + // but at commit. Therefore we need to track insertions which the normal + // flow doesn't do during mount. This doesn't happen at the root because + // the root always starts with a "current" with a null child. + // TODO: Consider unifying this with how the root works. + workInProgress.child = reconcileChildFibers( + workInProgress, + null, + nextChildren, + renderExpirationTime, + ); + } else { + reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime); + } + + return workInProgress.child; + } + + function updateContextProvider(current$$1, workInProgress, renderExpirationTime) { + var providerType = workInProgress.type; + var context = providerType._context; + var newProps = workInProgress.pendingProps; + var oldProps = workInProgress.memoizedProps; + var newValue = newProps.value; + + { + var providerPropTypes = workInProgress.type.propTypes; + + if (providerPropTypes) { + checkPropTypes( + providerPropTypes, + newProps, + 'prop', + 'Context.Provider', + getCurrentFiberStackInDev, + ); + } + } + + pushProvider(workInProgress, newValue); + + if (oldProps !== null) { + var oldValue = oldProps.value; + var changedBits = calculateChangedBits(context, newValue, oldValue); + + if (changedBits === 0) { + // No change. Bailout early if children are the same. + if (oldProps.children === newProps.children && !hasContextChanged()) { + return bailoutOnAlreadyFinishedWork(current$$1, workInProgress, renderExpirationTime); + } + } else { + // The context value changed. Search for matching consumers and schedule + // them to update. + propagateContextChange(workInProgress, context, changedBits, renderExpirationTime); + } + } + + var newChildren = newProps.children; + reconcileChildren(current$$1, workInProgress, newChildren, renderExpirationTime); + return workInProgress.child; + } + + var hasWarnedAboutUsingContextAsConsumer = false; + + function updateContextConsumer(current$$1, workInProgress, renderExpirationTime) { + var context = workInProgress.type; // The logic below for Context differs depending on PROD or DEV mode. In + // DEV mode, we create a separate object for Context.Consumer that acts + // like a proxy to Context. This proxy object adds unnecessary code in PROD + // so we use the old behaviour (Context.Consumer references Context) to + // reduce size and overhead. The separate object references context via + // a property called "_context", which also gives us the ability to check + // in DEV mode if this property exists or not and warn if it does not. + + { + if (context._context === undefined) { + // This may be because it's a Context (rather than a Consumer). + // Or it may be because it's older React where they're the same thing. + // We only want to warn if we're sure it's a new React. + if (context !== context.Consumer) { + if (!hasWarnedAboutUsingContextAsConsumer) { + hasWarnedAboutUsingContextAsConsumer = true; + warning$1( + false, + 'Rendering <Context> directly is not supported and will be removed in ' + + 'a future major release. Did you mean to render <Context.Consumer> instead?', + ); + } + } + } else { + context = context._context; + } + } + + var newProps = workInProgress.pendingProps; + var render = newProps.children; + + { + !(typeof render === 'function') + ? warningWithoutStack$1( + false, + 'A context consumer was rendered with multiple children, or a child ' + + "that isn't a function. A context consumer expects a single child " + + 'that is a function. If you did pass a function, make sure there ' + + 'is no trailing or leading whitespace around it.', + ) + : void 0; + } + + prepareToReadContext(workInProgress, renderExpirationTime); + var newValue = readContext(context, newProps.unstable_observedBits); + var newChildren; + + { + ReactCurrentOwner$3.current = workInProgress; + setCurrentPhase('render'); + newChildren = render(newValue); + setCurrentPhase(null); + } // React DevTools reads this flag. + + workInProgress.effectTag |= PerformedWork; + reconcileChildren(current$$1, workInProgress, newChildren, renderExpirationTime); + return workInProgress.child; + } + + function updateFundamentalComponent$1(current$$1, workInProgress, renderExpirationTime) { + var fundamentalImpl = workInProgress.type.impl; + + if (fundamentalImpl.reconcileChildren === false) { + return null; + } + + var nextProps = workInProgress.pendingProps; + var nextChildren = nextProps.children; + reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime); + return workInProgress.child; + } + + function updateScopeComponent(current$$1, workInProgress, renderExpirationTime) { + var nextProps = workInProgress.pendingProps; + var nextChildren = nextProps.children; + reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime); + return workInProgress.child; + } + + function markWorkInProgressReceivedUpdate() { + didReceiveUpdate = true; + } + + function bailoutOnAlreadyFinishedWork(current$$1, workInProgress, renderExpirationTime) { + cancelWorkTimer(workInProgress); + + if (current$$1 !== null) { + // Reuse previous dependencies + workInProgress.dependencies = current$$1.dependencies; + } + + if (enableProfilerTimer) { + // Don't update "base" render times for bailouts. + stopProfilerTimerIfRunning(workInProgress); + } + + var updateExpirationTime = workInProgress.expirationTime; + + if (updateExpirationTime !== NoWork) { + markUnprocessedUpdateTime(updateExpirationTime); + } // Check if the children have any pending work. + + var childExpirationTime = workInProgress.childExpirationTime; + + if (childExpirationTime < renderExpirationTime) { + // The children don't have any work either. We can skip them. + // TODO: Once we add back resuming, we should check if the children are + // a work-in-progress set. If so, we need to transfer their effects. + return null; + } else { + // This fiber doesn't have work, but its subtree does. Clone the child + // fibers and continue. + cloneChildFibers(current$$1, workInProgress); + return workInProgress.child; + } + } + + function remountFiber(current$$1, oldWorkInProgress, newWorkInProgress) { + { + var returnFiber = oldWorkInProgress.return; + + if (returnFiber === null) { + throw new Error('Cannot swap the root fiber.'); + } // Disconnect from the old current. + // It will get deleted. + + current$$1.alternate = null; + oldWorkInProgress.alternate = null; // Connect to the new tree. + + newWorkInProgress.index = oldWorkInProgress.index; + newWorkInProgress.sibling = oldWorkInProgress.sibling; + newWorkInProgress.return = oldWorkInProgress.return; + newWorkInProgress.ref = oldWorkInProgress.ref; // Replace the child/sibling pointers above it. + + if (oldWorkInProgress === returnFiber.child) { + returnFiber.child = newWorkInProgress; + } else { + var prevSibling = returnFiber.child; + + if (prevSibling === null) { + throw new Error('Expected parent to have a child.'); + } + + while (prevSibling.sibling !== oldWorkInProgress) { + prevSibling = prevSibling.sibling; + + if (prevSibling === null) { + throw new Error('Expected to find the previous sibling.'); + } + } + + prevSibling.sibling = newWorkInProgress; + } // Delete the old fiber and place the new one. + // Since the old fiber is disconnected, we have to schedule it manually. + + var last = returnFiber.lastEffect; + + if (last !== null) { + last.nextEffect = current$$1; + returnFiber.lastEffect = current$$1; + } else { + returnFiber.firstEffect = returnFiber.lastEffect = current$$1; + } + + current$$1.nextEffect = null; + current$$1.effectTag = Deletion; + newWorkInProgress.effectTag |= Placement; // Restart work from the new fiber. + + return newWorkInProgress; + } + } + + function beginWork$1(current$$1, workInProgress, renderExpirationTime) { + var updateExpirationTime = workInProgress.expirationTime; + + { + if (workInProgress._debugNeedsRemount && current$$1 !== null) { + // This will restart the begin phase with a new fiber. + return remountFiber( + current$$1, + workInProgress, + createFiberFromTypeAndProps( + workInProgress.type, + workInProgress.key, + workInProgress.pendingProps, + workInProgress._debugOwner || null, + workInProgress.mode, + workInProgress.expirationTime, + ), + ); + } + } + + if (current$$1 !== null) { + var oldProps = current$$1.memoizedProps; + var newProps = workInProgress.pendingProps; + + if ( + oldProps !== newProps || + hasContextChanged() || // Force a re-render if the implementation changed due to hot reload: + workInProgress.type !== current$$1.type + ) { + // If props or context changed, mark the fiber as having performed work. + // This may be unset if the props are determined to be equal later (memo). + didReceiveUpdate = true; + } else if (updateExpirationTime < renderExpirationTime) { + didReceiveUpdate = false; // This fiber does not have any pending work. Bailout without entering + // the begin phase. There's still some bookkeeping we that needs to be done + // in this optimized path, mostly pushing stuff onto the stack. + + switch (workInProgress.tag) { + case HostRoot: + pushHostRootContext(workInProgress); + resetHydrationState(); + break; + + case HostComponent: + pushHostContext(workInProgress); + + if ( + workInProgress.mode & ConcurrentMode && + renderExpirationTime !== Never && + shouldDeprioritizeSubtree(workInProgress.type, newProps) + ) { + if (enableSchedulerTracing) { + markSpawnedWork(Never); + } // Schedule this fiber to re-render at offscreen priority. Then bailout. + + workInProgress.expirationTime = workInProgress.childExpirationTime = Never; + return null; + } + + break; + + case ClassComponent: { + var Component = workInProgress.type; + + if (isContextProvider(Component)) { + pushContextProvider(workInProgress); + } + + break; + } + + case HostPortal: + pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo); + break; + + case ContextProvider: { + var newValue = workInProgress.memoizedProps.value; + pushProvider(workInProgress, newValue); + break; + } + + case Profiler: + if (enableProfilerTimer) { + // Profiler should only call onRender when one of its descendants actually rendered. + var hasChildWork = workInProgress.childExpirationTime >= renderExpirationTime; + + if (hasChildWork) { + workInProgress.effectTag |= Update; + } + } + + break; + + case SuspenseComponent: { + var state = workInProgress.memoizedState; + + if (state !== null) { + if (enableSuspenseServerRenderer) { + if (state.dehydrated !== null) { + pushSuspenseContext( + workInProgress, + setDefaultShallowSuspenseContext(suspenseStackCursor.current), + ); // We know that this component will suspend again because if it has + // been unsuspended it has committed as a resolved Suspense component. + // If it needs to be retried, it should have work scheduled on it. + + workInProgress.effectTag |= DidCapture; + break; + } + } // If this boundary is currently timed out, we need to decide + // whether to retry the primary children, or to skip over it and + // go straight to the fallback. Check the priority of the primary + // child fragment. + + var primaryChildFragment = workInProgress.child; + var primaryChildExpirationTime = primaryChildFragment.childExpirationTime; + + if ( + primaryChildExpirationTime !== NoWork && + primaryChildExpirationTime >= renderExpirationTime + ) { + // The primary children have pending work. Use the normal path + // to attempt to render the primary children again. + return updateSuspenseComponent(current$$1, workInProgress, renderExpirationTime); + } else { + pushSuspenseContext( + workInProgress, + setDefaultShallowSuspenseContext(suspenseStackCursor.current), + ); // The primary children do not have pending work with sufficient + // priority. Bailout. + + var child = bailoutOnAlreadyFinishedWork( + current$$1, + workInProgress, + renderExpirationTime, + ); + + if (child !== null) { + // The fallback children have pending work. Skip over the + // primary children and work on the fallback. + return child.sibling; + } else { + return null; + } + } + } else { + pushSuspenseContext( + workInProgress, + setDefaultShallowSuspenseContext(suspenseStackCursor.current), + ); + } + + break; + } + + case SuspenseListComponent: { + var didSuspendBefore = (current$$1.effectTag & DidCapture) !== NoEffect; + + var _hasChildWork = workInProgress.childExpirationTime >= renderExpirationTime; + + if (didSuspendBefore) { + if (_hasChildWork) { + // If something was in fallback state last time, and we have all the + // same children then we're still in progressive loading state. + // Something might get unblocked by state updates or retries in the + // tree which will affect the tail. So we need to use the normal + // path to compute the correct tail. + return updateSuspenseListComponent(current$$1, workInProgress, renderExpirationTime); + } // If none of the children had any work, that means that none of + // them got retried so they'll still be blocked in the same way + // as before. We can fast bail out. + + workInProgress.effectTag |= DidCapture; + } // If nothing suspended before and we're rendering the same children, + // then the tail doesn't matter. Anything new that suspends will work + // in the "together" mode, so we can continue from the state we had. + + var renderState = workInProgress.memoizedState; + + if (renderState !== null) { + // Reset to the "together" mode in case we've started a different + // update in the past but didn't complete it. + renderState.rendering = null; + renderState.tail = null; + } + + pushSuspenseContext(workInProgress, suspenseStackCursor.current); + + if (_hasChildWork) { + break; + } else { + // If none of the children had any work, that means that none of + // them got retried so they'll still be blocked in the same way + // as before. We can fast bail out. + return null; + } + } + } + + return bailoutOnAlreadyFinishedWork(current$$1, workInProgress, renderExpirationTime); + } else { + // An update was scheduled on this fiber, but there are no new props + // nor legacy context. Set this to false. If an update queue or context + // consumer produces a changed value, it will set this to true. Otherwise, + // the component will assume the children have not changed and bail out. + didReceiveUpdate = false; + } + } else { + didReceiveUpdate = false; + } // Before entering the begin phase, clear the expiration time. + + workInProgress.expirationTime = NoWork; + + switch (workInProgress.tag) { + case IndeterminateComponent: { + return mountIndeterminateComponent( + current$$1, + workInProgress, + workInProgress.type, + renderExpirationTime, + ); + } + + case LazyComponent: { + var elementType = workInProgress.elementType; + return mountLazyComponent( + current$$1, + workInProgress, + elementType, + updateExpirationTime, + renderExpirationTime, + ); + } + + case FunctionComponent: { + var _Component = workInProgress.type; + var unresolvedProps = workInProgress.pendingProps; + var resolvedProps = + workInProgress.elementType === _Component + ? unresolvedProps + : resolveDefaultProps(_Component, unresolvedProps); + return updateFunctionComponent( + current$$1, + workInProgress, + _Component, + resolvedProps, + renderExpirationTime, + ); + } + + case ClassComponent: { + var _Component2 = workInProgress.type; + var _unresolvedProps = workInProgress.pendingProps; + + var _resolvedProps = + workInProgress.elementType === _Component2 + ? _unresolvedProps + : resolveDefaultProps(_Component2, _unresolvedProps); + + return updateClassComponent( + current$$1, + workInProgress, + _Component2, + _resolvedProps, + renderExpirationTime, + ); + } + + case HostRoot: + return updateHostRoot(current$$1, workInProgress, renderExpirationTime); + + case HostComponent: + return updateHostComponent(current$$1, workInProgress, renderExpirationTime); + + case HostText: + return updateHostText(current$$1, workInProgress); + + case SuspenseComponent: + return updateSuspenseComponent(current$$1, workInProgress, renderExpirationTime); + + case HostPortal: + return updatePortalComponent(current$$1, workInProgress, renderExpirationTime); + + case ForwardRef: { + var type = workInProgress.type; + var _unresolvedProps2 = workInProgress.pendingProps; + + var _resolvedProps2 = + workInProgress.elementType === type + ? _unresolvedProps2 + : resolveDefaultProps(type, _unresolvedProps2); + + return updateForwardRef( + current$$1, + workInProgress, + type, + _resolvedProps2, + renderExpirationTime, + ); + } + + case Fragment: + return updateFragment(current$$1, workInProgress, renderExpirationTime); + + case Mode: + return updateMode(current$$1, workInProgress, renderExpirationTime); + + case Profiler: + return updateProfiler(current$$1, workInProgress, renderExpirationTime); + + case ContextProvider: + return updateContextProvider(current$$1, workInProgress, renderExpirationTime); + + case ContextConsumer: + return updateContextConsumer(current$$1, workInProgress, renderExpirationTime); + + case MemoComponent: { + var _type2 = workInProgress.type; + var _unresolvedProps3 = workInProgress.pendingProps; // Resolve outer props first, then resolve inner props. + + var _resolvedProps3 = resolveDefaultProps(_type2, _unresolvedProps3); + + { + if (workInProgress.type !== workInProgress.elementType) { + var outerPropTypes = _type2.propTypes; + + if (outerPropTypes) { + checkPropTypes( + outerPropTypes, + _resolvedProps3, // Resolved for outer only + 'prop', + getComponentName(_type2), + getCurrentFiberStackInDev, + ); + } + } + } + + _resolvedProps3 = resolveDefaultProps(_type2.type, _resolvedProps3); + return updateMemoComponent( + current$$1, + workInProgress, + _type2, + _resolvedProps3, + updateExpirationTime, + renderExpirationTime, + ); + } + + case SimpleMemoComponent: { + return updateSimpleMemoComponent( + current$$1, + workInProgress, + workInProgress.type, + workInProgress.pendingProps, + updateExpirationTime, + renderExpirationTime, + ); + } + + case IncompleteClassComponent: { + var _Component3 = workInProgress.type; + var _unresolvedProps4 = workInProgress.pendingProps; + + var _resolvedProps4 = + workInProgress.elementType === _Component3 + ? _unresolvedProps4 + : resolveDefaultProps(_Component3, _unresolvedProps4); + + return mountIncompleteClassComponent( + current$$1, + workInProgress, + _Component3, + _resolvedProps4, + renderExpirationTime, + ); + } + + case SuspenseListComponent: { + return updateSuspenseListComponent(current$$1, workInProgress, renderExpirationTime); + } + + case FundamentalComponent: { + if (enableFundamentalAPI) { + return updateFundamentalComponent$1(current$$1, workInProgress, renderExpirationTime); + } + + break; + } + + case ScopeComponent: { + if (enableScopeAPI) { + return updateScopeComponent(current$$1, workInProgress, renderExpirationTime); + } + + break; + } + } + + { + { + throw Error( + 'Unknown unit of work tag (' + + workInProgress.tag + + '). This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + } + + function createFundamentalStateInstance(currentFiber, props, impl, state) { + return { + currentFiber: currentFiber, + impl: impl, + instance: null, + prevProps: null, + props: props, + state: state, + }; + } + + function isFiberSuspenseAndTimedOut(fiber) { + return fiber.tag === SuspenseComponent && fiber.memoizedState !== null; + } + + function getSuspenseFallbackChild(fiber) { + return fiber.child.sibling.child; + } + + var emptyObject$1 = {}; + + function collectScopedNodes(node, fn, scopedNodes) { + if (enableScopeAPI) { + if (node.tag === HostComponent) { + var _type = node.type, + memoizedProps = node.memoizedProps, + stateNode = node.stateNode; + + var _instance = getPublicInstance(stateNode); + + if (_instance !== null && fn(_type, memoizedProps || emptyObject$1, _instance) === true) { + scopedNodes.push(_instance); + } + } + + var child = node.child; + + if (isFiberSuspenseAndTimedOut(node)) { + child = getSuspenseFallbackChild(node); + } + + if (child !== null) { + collectScopedNodesFromChildren(child, fn, scopedNodes); + } + } + } + + function collectFirstScopedNode(node, fn) { + if (enableScopeAPI) { + if (node.tag === HostComponent) { + var _type2 = node.type, + memoizedProps = node.memoizedProps, + stateNode = node.stateNode; + + var _instance2 = getPublicInstance(stateNode); + + if (_instance2 !== null && fn(_type2, memoizedProps, _instance2) === true) { + return _instance2; + } + } + + var child = node.child; + + if (isFiberSuspenseAndTimedOut(node)) { + child = getSuspenseFallbackChild(node); + } + + if (child !== null) { + return collectFirstScopedNodeFromChildren(child, fn); + } + } + + return null; + } + + function collectScopedNodesFromChildren(startingChild, fn, scopedNodes) { + var child = startingChild; + + while (child !== null) { + collectScopedNodes(child, fn, scopedNodes); + child = child.sibling; + } + } + + function collectFirstScopedNodeFromChildren(startingChild, fn) { + var child = startingChild; + + while (child !== null) { + var scopedNode = collectFirstScopedNode(child, fn); + + if (scopedNode !== null) { + return scopedNode; + } + + child = child.sibling; + } + + return null; + } + + function collectNearestScopeMethods(node, scope, childrenScopes) { + if (isValidScopeNode(node, scope)) { + childrenScopes.push(node.stateNode.methods); + } else { + var child = node.child; + + if (isFiberSuspenseAndTimedOut(node)) { + child = getSuspenseFallbackChild(node); + } + + if (child !== null) { + collectNearestChildScopeMethods(child, scope, childrenScopes); + } + } + } + + function collectNearestChildScopeMethods(startingChild, scope, childrenScopes) { + var child = startingChild; + + while (child !== null) { + collectNearestScopeMethods(child, scope, childrenScopes); + child = child.sibling; + } + } + + function isValidScopeNode(node, scope) { + return node.tag === ScopeComponent && node.type === scope && node.stateNode !== null; + } + + function createScopeMethods(scope, instance) { + return { + getChildren: function () { + var currentFiber = instance.fiber; + var child = currentFiber.child; + var childrenScopes = []; + + if (child !== null) { + collectNearestChildScopeMethods(child, scope, childrenScopes); + } + + return childrenScopes.length === 0 ? null : childrenScopes; + }, + getChildrenFromRoot: function () { + var currentFiber = instance.fiber; + var node = currentFiber; + + while (node !== null) { + var parent = node.return; + + if (parent === null) { + break; + } + + node = parent; + + if (node.tag === ScopeComponent && node.type === scope) { + break; + } + } + + var childrenScopes = []; + collectNearestChildScopeMethods(node.child, scope, childrenScopes); + return childrenScopes.length === 0 ? null : childrenScopes; + }, + getParent: function () { + var node = instance.fiber.return; + + while (node !== null) { + if (node.tag === ScopeComponent && node.type === scope) { + return node.stateNode.methods; + } + + node = node.return; + } + + return null; + }, + getProps: function () { + var currentFiber = instance.fiber; + return currentFiber.memoizedProps; + }, + queryAllNodes: function (fn) { + var currentFiber = instance.fiber; + var child = currentFiber.child; + var scopedNodes = []; + + if (child !== null) { + collectScopedNodesFromChildren(child, fn, scopedNodes); + } + + return scopedNodes.length === 0 ? null : scopedNodes; + }, + queryFirstNode: function (fn) { + var currentFiber = instance.fiber; + var child = currentFiber.child; + + if (child !== null) { + return collectFirstScopedNodeFromChildren(child, fn); + } + + return null; + }, + containsNode: function (node) { + var fiber = getInstanceFromNode$2(node); + + while (fiber !== null) { + if (fiber.tag === ScopeComponent && fiber.type === scope && fiber.stateNode === instance) { + return true; + } + + fiber = fiber.return; + } + + return false; + }, + }; + } + + function markUpdate(workInProgress) { + // Tag the fiber with an update effect. This turns a Placement into + // a PlacementAndUpdate. + workInProgress.effectTag |= Update; + } + + function markRef$1(workInProgress) { + workInProgress.effectTag |= Ref; + } + + var appendAllChildren; + var updateHostContainer; + var updateHostComponent$1; + var updateHostText$1; + + if (supportsMutation) { + // Mutation mode + appendAllChildren = function (parent, workInProgress, needsVisibilityToggle, isHidden) { + // We only have the top Fiber that was created but we need recurse down its + // children to find all the terminal nodes. + var node = workInProgress.child; + + while (node !== null) { + if (node.tag === HostComponent || node.tag === HostText) { + appendInitialChild(parent, node.stateNode); + } else if (enableFundamentalAPI && node.tag === FundamentalComponent) { + appendInitialChild(parent, node.stateNode.instance); + } else if (node.tag === HostPortal) { + // If we have a portal child, then we don't want to traverse + // down its children. Instead, we'll get insertions from each child in + // the portal directly. + } else if (node.child !== null) { + node.child.return = node; + node = node.child; + continue; + } + + if (node === workInProgress) { + return; + } + + while (node.sibling === null) { + if (node.return === null || node.return === workInProgress) { + return; + } + + node = node.return; + } + + node.sibling.return = node.return; + node = node.sibling; + } + }; + + updateHostContainer = function (workInProgress) { + // Noop + }; + + updateHostComponent$1 = function ( + current, + workInProgress, + type, + newProps, + rootContainerInstance, + ) { + // If we have an alternate, that means this is an update and we need to + // schedule a side-effect to do the updates. + var oldProps = current.memoizedProps; + + if (oldProps === newProps) { + // In mutation mode, this is sufficient for a bailout because + // we won't touch this node even if children changed. + return; + } // If we get updated because one of our children updated, we don't + // have newProps so we'll have to reuse them. + // TODO: Split the update API as separate for the props vs. children. + // Even better would be if children weren't special cased at all tho. + + var instance = workInProgress.stateNode; + var currentHostContext = getHostContext(); // TODO: Experiencing an error where oldProps is null. Suggests a host + // component is hitting the resume path. Figure out why. Possibly + // related to `hidden`. + + var updatePayload = prepareUpdate( + instance, + type, + oldProps, + newProps, + rootContainerInstance, + currentHostContext, + ); // TODO: Type this specific to this type of component. + + workInProgress.updateQueue = updatePayload; // If the update payload indicates that there is a change or if there + // is a new ref we mark this as an update. All the work is done in commitWork. + + if (updatePayload) { + markUpdate(workInProgress); + } + }; + + updateHostText$1 = function (current, workInProgress, oldText, newText) { + // If the text differs, mark it as an update. All the work in done in commitWork. + if (oldText !== newText) { + markUpdate(workInProgress); + } + }; + } else if (supportsPersistence) { + // Persistent host tree mode + appendAllChildren = function (parent, workInProgress, needsVisibilityToggle, isHidden) { + // We only have the top Fiber that was created but we need recurse down its + // children to find all the terminal nodes. + var node = workInProgress.child; + + while (node !== null) { + // eslint-disable-next-line no-labels + branches: if (node.tag === HostComponent) { + var instance = node.stateNode; + + if (needsVisibilityToggle && isHidden) { + // This child is inside a timed out tree. Hide it. + var props = node.memoizedProps; + var type = node.type; + instance = cloneHiddenInstance(instance, type, props, node); + } + + appendInitialChild(parent, instance); + } else if (node.tag === HostText) { + var _instance = node.stateNode; + + if (needsVisibilityToggle && isHidden) { + // This child is inside a timed out tree. Hide it. + var text = node.memoizedProps; + _instance = cloneHiddenTextInstance(_instance, text, node); + } + + appendInitialChild(parent, _instance); + } else if (enableFundamentalAPI && node.tag === FundamentalComponent) { + var _instance2 = node.stateNode.instance; + + if (needsVisibilityToggle && isHidden) { + // This child is inside a timed out tree. Hide it. + var _props = node.memoizedProps; + var _type = node.type; + _instance2 = cloneHiddenInstance(_instance2, _type, _props, node); + } + + appendInitialChild(parent, _instance2); + } else if (node.tag === HostPortal) { + // If we have a portal child, then we don't want to traverse + // down its children. Instead, we'll get insertions from each child in + // the portal directly. + } else if (node.tag === SuspenseComponent) { + if ((node.effectTag & Update) !== NoEffect) { + // Need to toggle the visibility of the primary children. + var newIsHidden = node.memoizedState !== null; + + if (newIsHidden) { + var primaryChildParent = node.child; + + if (primaryChildParent !== null) { + if (primaryChildParent.child !== null) { + primaryChildParent.child.return = primaryChildParent; + appendAllChildren(parent, primaryChildParent, true, newIsHidden); + } + + var fallbackChildParent = primaryChildParent.sibling; + + if (fallbackChildParent !== null) { + fallbackChildParent.return = node; + node = fallbackChildParent; + continue; + } + } + } + } + + if (node.child !== null) { + // Continue traversing like normal + node.child.return = node; + node = node.child; + continue; + } + } else if (node.child !== null) { + node.child.return = node; + node = node.child; + continue; + } // $FlowFixMe This is correct but Flow is confused by the labeled break. + + node = node; + + if (node === workInProgress) { + return; + } + + while (node.sibling === null) { + if (node.return === null || node.return === workInProgress) { + return; + } + + node = node.return; + } + + node.sibling.return = node.return; + node = node.sibling; + } + }; // An unfortunate fork of appendAllChildren because we have two different parent types. + + var appendAllChildrenToContainer = function ( + containerChildSet, + workInProgress, + needsVisibilityToggle, + isHidden, + ) { + // We only have the top Fiber that was created but we need recurse down its + // children to find all the terminal nodes. + var node = workInProgress.child; + + while (node !== null) { + // eslint-disable-next-line no-labels + branches: if (node.tag === HostComponent) { + var instance = node.stateNode; + + if (needsVisibilityToggle && isHidden) { + // This child is inside a timed out tree. Hide it. + var props = node.memoizedProps; + var type = node.type; + instance = cloneHiddenInstance(instance, type, props, node); + } + + appendChildToContainerChildSet(containerChildSet, instance); + } else if (node.tag === HostText) { + var _instance3 = node.stateNode; + + if (needsVisibilityToggle && isHidden) { + // This child is inside a timed out tree. Hide it. + var text = node.memoizedProps; + _instance3 = cloneHiddenTextInstance(_instance3, text, node); + } + + appendChildToContainerChildSet(containerChildSet, _instance3); + } else if (enableFundamentalAPI && node.tag === FundamentalComponent) { + var _instance4 = node.stateNode.instance; + + if (needsVisibilityToggle && isHidden) { + // This child is inside a timed out tree. Hide it. + var _props2 = node.memoizedProps; + var _type2 = node.type; + _instance4 = cloneHiddenInstance(_instance4, _type2, _props2, node); + } + + appendChildToContainerChildSet(containerChildSet, _instance4); + } else if (node.tag === HostPortal) { + // If we have a portal child, then we don't want to traverse + // down its children. Instead, we'll get insertions from each child in + // the portal directly. + } else if (node.tag === SuspenseComponent) { + if ((node.effectTag & Update) !== NoEffect) { + // Need to toggle the visibility of the primary children. + var newIsHidden = node.memoizedState !== null; + + if (newIsHidden) { + var primaryChildParent = node.child; + + if (primaryChildParent !== null) { + if (primaryChildParent.child !== null) { + primaryChildParent.child.return = primaryChildParent; + appendAllChildrenToContainer( + containerChildSet, + primaryChildParent, + true, + newIsHidden, + ); + } + + var fallbackChildParent = primaryChildParent.sibling; + + if (fallbackChildParent !== null) { + fallbackChildParent.return = node; + node = fallbackChildParent; + continue; + } + } + } + } + + if (node.child !== null) { + // Continue traversing like normal + node.child.return = node; + node = node.child; + continue; + } + } else if (node.child !== null) { + node.child.return = node; + node = node.child; + continue; + } // $FlowFixMe This is correct but Flow is confused by the labeled break. + + node = node; + + if (node === workInProgress) { + return; + } + + while (node.sibling === null) { + if (node.return === null || node.return === workInProgress) { + return; + } + + node = node.return; + } + + node.sibling.return = node.return; + node = node.sibling; + } + }; + + updateHostContainer = function (workInProgress) { + var portalOrRoot = workInProgress.stateNode; + var childrenUnchanged = workInProgress.firstEffect === null; + + if (childrenUnchanged) { + // No changes, just reuse the existing instance. + } else { + var container = portalOrRoot.containerInfo; + var newChildSet = createContainerChildSet(container); // If children might have changed, we have to add them all to the set. + + appendAllChildrenToContainer(newChildSet, workInProgress, false, false); + portalOrRoot.pendingChildren = newChildSet; // Schedule an update on the container to swap out the container. + + markUpdate(workInProgress); + finalizeContainerChildren(container, newChildSet); + } + }; + + updateHostComponent$1 = function ( + current, + workInProgress, + type, + newProps, + rootContainerInstance, + ) { + var currentInstance = current.stateNode; + var oldProps = current.memoizedProps; // If there are no effects associated with this node, then none of our children had any updates. + // This guarantees that we can reuse all of them. + + var childrenUnchanged = workInProgress.firstEffect === null; + + if (childrenUnchanged && oldProps === newProps) { + // No changes, just reuse the existing instance. + // Note that this might release a previous clone. + workInProgress.stateNode = currentInstance; + return; + } + + var recyclableInstance = workInProgress.stateNode; + var currentHostContext = getHostContext(); + var updatePayload = null; + + if (oldProps !== newProps) { + updatePayload = prepareUpdate( + recyclableInstance, + type, + oldProps, + newProps, + rootContainerInstance, + currentHostContext, + ); + } + + if (childrenUnchanged && updatePayload === null) { + // No changes, just reuse the existing instance. + // Note that this might release a previous clone. + workInProgress.stateNode = currentInstance; + return; + } + + var newInstance = cloneInstance( + currentInstance, + updatePayload, + type, + oldProps, + newProps, + workInProgress, + childrenUnchanged, + recyclableInstance, + ); + + if ( + finalizeInitialChildren( + newInstance, + type, + newProps, + rootContainerInstance, + currentHostContext, + ) + ) { + markUpdate(workInProgress); + } + + workInProgress.stateNode = newInstance; + + if (childrenUnchanged) { + // If there are no other effects in this tree, we need to flag this node as having one. + // Even though we're not going to use it for anything. + // Otherwise parents won't know that there are new children to propagate upwards. + markUpdate(workInProgress); + } else { + // If children might have changed, we have to add them all to the set. + appendAllChildren(newInstance, workInProgress, false, false); + } + }; + + updateHostText$1 = function (current, workInProgress, oldText, newText) { + if (oldText !== newText) { + // If the text content differs, we'll create a new text instance for it. + var rootContainerInstance = getRootHostContainer(); + var currentHostContext = getHostContext(); + workInProgress.stateNode = createTextInstance( + newText, + rootContainerInstance, + currentHostContext, + workInProgress, + ); // We'll have to mark it as having an effect, even though we won't use the effect for anything. + // This lets the parents know that at least one of their children has changed. + + markUpdate(workInProgress); + } + }; + } else { + // No host operations + updateHostContainer = function (workInProgress) { + // Noop + }; + + updateHostComponent$1 = function ( + current, + workInProgress, + type, + newProps, + rootContainerInstance, + ) { + // Noop + }; + + updateHostText$1 = function (current, workInProgress, oldText, newText) { + // Noop + }; + } + + function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { + switch (renderState.tailMode) { + case 'hidden': { + // Any insertions at the end of the tail list after this point + // should be invisible. If there are already mounted boundaries + // anything before them are not considered for collapsing. + // Therefore we need to go through the whole tail to find if + // there are any. + var tailNode = renderState.tail; + var lastTailNode = null; + + while (tailNode !== null) { + if (tailNode.alternate !== null) { + lastTailNode = tailNode; + } + + tailNode = tailNode.sibling; + } // Next we're simply going to delete all insertions after the + // last rendered item. + + if (lastTailNode === null) { + // All remaining items in the tail are insertions. + renderState.tail = null; + } else { + // Detach the insertion after the last node that was already + // inserted. + lastTailNode.sibling = null; + } + + break; + } + + case 'collapsed': { + // Any insertions at the end of the tail list after this point + // should be invisible. If there are already mounted boundaries + // anything before them are not considered for collapsing. + // Therefore we need to go through the whole tail to find if + // there are any. + var _tailNode = renderState.tail; + var _lastTailNode = null; + + while (_tailNode !== null) { + if (_tailNode.alternate !== null) { + _lastTailNode = _tailNode; + } + + _tailNode = _tailNode.sibling; + } // Next we're simply going to delete all insertions after the + // last rendered item. + + if (_lastTailNode === null) { + // All remaining items in the tail are insertions. + if (!hasRenderedATailFallback && renderState.tail !== null) { + // We suspended during the head. We want to show at least one + // row at the tail. So we'll keep on and cut off the rest. + renderState.tail.sibling = null; + } else { + renderState.tail = null; + } + } else { + // Detach the insertion after the last node that was already + // inserted. + _lastTailNode.sibling = null; + } + + break; + } + } + } + + function completeWork(current, workInProgress, renderExpirationTime) { + var newProps = workInProgress.pendingProps; + + switch (workInProgress.tag) { + case IndeterminateComponent: + break; + + case LazyComponent: + break; + + case SimpleMemoComponent: + case FunctionComponent: + break; + + case ClassComponent: { + var Component = workInProgress.type; + + if (isContextProvider(Component)) { + popContext(workInProgress); + } + + break; + } + + case HostRoot: { + popHostContainer(workInProgress); + popTopLevelContextObject(workInProgress); + var fiberRoot = workInProgress.stateNode; + + if (fiberRoot.pendingContext) { + fiberRoot.context = fiberRoot.pendingContext; + fiberRoot.pendingContext = null; + } + + if (current === null || current.child === null) { + // If we hydrated, pop so that we can delete any remaining children + // that weren't hydrated. + var wasHydrated = popHydrationState(workInProgress); + + if (wasHydrated) { + // If we hydrated, then we'll need to schedule an update for + // the commit side-effects on the root. + markUpdate(workInProgress); + } + } + + updateHostContainer(workInProgress); + break; + } + + case HostComponent: { + popHostContext(workInProgress); + var rootContainerInstance = getRootHostContainer(); + var type = workInProgress.type; + + if (current !== null && workInProgress.stateNode != null) { + updateHostComponent$1(current, workInProgress, type, newProps, rootContainerInstance); + + if (enableFlareAPI) { + var prevListeners = current.memoizedProps.listeners; + var nextListeners = newProps.listeners; + + if (prevListeners !== nextListeners) { + markUpdate(workInProgress); + } + } + + if (current.ref !== workInProgress.ref) { + markRef$1(workInProgress); + } + } else { + if (!newProps) { + if (!(workInProgress.stateNode !== null)) { + { + throw Error( + 'We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } // This can happen when we abort work. + + break; + } + + var currentHostContext = getHostContext(); // TODO: Move createInstance to beginWork and keep it on a context + // "stack" as the parent. Then append children as we go in beginWork + // or completeWork depending on we want to add then top->down or + // bottom->up. Top->down is faster in IE11. + + var _wasHydrated = popHydrationState(workInProgress); + + if (_wasHydrated) { + // TODO: Move this and createInstance step into the beginPhase + // to consolidate. + if ( + prepareToHydrateHostInstance(workInProgress, rootContainerInstance, currentHostContext) + ) { + // If changes to the hydrated node needs to be applied at the + // commit-phase we mark this as such. + markUpdate(workInProgress); + } + + if (enableFlareAPI) { + var listeners = newProps.listeners; + + if (listeners != null) { + updateEventListeners(listeners, workInProgress, rootContainerInstance); + } + } + } else { + var instance = createInstance( + type, + newProps, + rootContainerInstance, + currentHostContext, + workInProgress, + ); + appendAllChildren(instance, workInProgress, false, false); // This needs to be set before we mount Flare event listeners + + workInProgress.stateNode = instance; + + if (enableFlareAPI) { + var _listeners = newProps.listeners; + + if (_listeners != null) { + updateEventListeners(_listeners, workInProgress, rootContainerInstance); + } + } // Certain renderers require commit-time effects for initial mount. + // (eg DOM renderer supports auto-focus for certain elements). + // Make sure such renderers get scheduled for later work. + + if ( + finalizeInitialChildren( + instance, + type, + newProps, + rootContainerInstance, + currentHostContext, + ) + ) { + markUpdate(workInProgress); + } + } + + if (workInProgress.ref !== null) { + // If there is a ref on a host node we need to schedule a callback + markRef$1(workInProgress); + } + } + + break; + } + + case HostText: { + var newText = newProps; + + if (current && workInProgress.stateNode != null) { + var oldText = current.memoizedProps; // If we have an alternate, that means this is an update and we need + // to schedule a side-effect to do the updates. + + updateHostText$1(current, workInProgress, oldText, newText); + } else { + if (typeof newText !== 'string') { + if (!(workInProgress.stateNode !== null)) { + { + throw Error( + 'We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } // This can happen when we abort work. + } + + var _rootContainerInstance = getRootHostContainer(); + + var _currentHostContext = getHostContext(); + + var _wasHydrated2 = popHydrationState(workInProgress); + + if (_wasHydrated2) { + if (prepareToHydrateHostTextInstance(workInProgress)) { + markUpdate(workInProgress); + } + } else { + workInProgress.stateNode = createTextInstance( + newText, + _rootContainerInstance, + _currentHostContext, + workInProgress, + ); + } + } + + break; + } + + case ForwardRef: + break; + + case SuspenseComponent: { + popSuspenseContext(workInProgress); + var nextState = workInProgress.memoizedState; + + if (enableSuspenseServerRenderer) { + if (nextState !== null && nextState.dehydrated !== null) { + if (current === null) { + var _wasHydrated3 = popHydrationState(workInProgress); + + if (!_wasHydrated3) { + { + throw Error( + 'A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.', + ); + } + } + + prepareToHydrateHostSuspenseInstance(workInProgress); + + if (enableSchedulerTracing) { + markSpawnedWork(Never); + } + + return null; + } else { + // We should never have been in a hydration state if we didn't have a current. + // However, in some of those paths, we might have reentered a hydration state + // and then we might be inside a hydration state. In that case, we'll need to + // exit out of it. + resetHydrationState(); + + if ((workInProgress.effectTag & DidCapture) === NoEffect) { + // This boundary did not suspend so it's now hydrated and unsuspended. + workInProgress.memoizedState = null; + } // If nothing suspended, we need to schedule an effect to mark this boundary + // as having hydrated so events know that they're free be invoked. + // It's also a signal to replay events and the suspense callback. + // If something suspended, schedule an effect to attach retry listeners. + // So we might as well always mark this. + + workInProgress.effectTag |= Update; + return null; + } + } + } + + if ((workInProgress.effectTag & DidCapture) !== NoEffect) { + // Something suspended. Re-render with the fallback children. + workInProgress.expirationTime = renderExpirationTime; // Do not reset the effect list. + + return workInProgress; + } + + var nextDidTimeout = nextState !== null; + var prevDidTimeout = false; + + if (current === null) { + if (workInProgress.memoizedProps.fallback !== undefined) { + popHydrationState(workInProgress); + } + } else { + var prevState = current.memoizedState; + prevDidTimeout = prevState !== null; + + if (!nextDidTimeout && prevState !== null) { + // We just switched from the fallback to the normal children. + // Delete the fallback. + // TODO: Would it be better to store the fallback fragment on + // the stateNode during the begin phase? + var currentFallbackChild = current.child.sibling; + + if (currentFallbackChild !== null) { + // Deletions go at the beginning of the return fiber's effect list + var first = workInProgress.firstEffect; + + if (first !== null) { + workInProgress.firstEffect = currentFallbackChild; + currentFallbackChild.nextEffect = first; + } else { + workInProgress.firstEffect = workInProgress.lastEffect = currentFallbackChild; + currentFallbackChild.nextEffect = null; + } + + currentFallbackChild.effectTag = Deletion; + } + } + } + + if (nextDidTimeout && !prevDidTimeout) { + // If this subtreee is running in blocking mode we can suspend, + // otherwise we won't suspend. + // TODO: This will still suspend a synchronous tree if anything + // in the concurrent tree already suspended during this render. + // This is a known bug. + if ((workInProgress.mode & BlockingMode) !== NoMode) { + // TODO: Move this back to throwException because this is too late + // if this is a large tree which is common for initial loads. We + // don't know if we should restart a render or not until we get + // this marker, and this is too late. + // If this render already had a ping or lower pri updates, + // and this is the first time we know we're going to suspend we + // should be able to immediately restart from within throwException. + var hasInvisibleChildContext = + current === null && workInProgress.memoizedProps.unstable_avoidThisFallback !== true; + + if ( + hasInvisibleChildContext || + hasSuspenseContext(suspenseStackCursor.current, InvisibleParentSuspenseContext) + ) { + // If this was in an invisible tree or a new render, then showing + // this boundary is ok. + renderDidSuspend(); + } else { + // Otherwise, we're going to have to hide content so we should + // suspend for longer if possible. + renderDidSuspendDelayIfPossible(); + } + } + } + + if (supportsPersistence) { + // TODO: Only schedule updates if not prevDidTimeout. + if (nextDidTimeout) { + // If this boundary just timed out, schedule an effect to attach a + // retry listener to the proimse. This flag is also used to hide the + // primary children. + workInProgress.effectTag |= Update; + } + } + + if (supportsMutation) { + // TODO: Only schedule updates if these values are non equal, i.e. it changed. + if (nextDidTimeout || prevDidTimeout) { + // If this boundary just timed out, schedule an effect to attach a + // retry listener to the proimse. This flag is also used to hide the + // primary children. In mutation mode, we also need the flag to + // *unhide* children that were previously hidden, so check if the + // is currently timed out, too. + workInProgress.effectTag |= Update; + } + } + + if ( + enableSuspenseCallback && + workInProgress.updateQueue !== null && + workInProgress.memoizedProps.suspenseCallback != null + ) { + // Always notify the callback + workInProgress.effectTag |= Update; + } + + break; + } + + case Fragment: + break; + + case Mode: + break; + + case Profiler: + break; + + case HostPortal: + popHostContainer(workInProgress); + updateHostContainer(workInProgress); + break; + + case ContextProvider: + // Pop provider fiber + popProvider(workInProgress); + break; + + case ContextConsumer: + break; + + case MemoComponent: + break; + + case IncompleteClassComponent: { + // Same as class component case. I put it down here so that the tags are + // sequential to ensure this switch is compiled to a jump table. + var _Component = workInProgress.type; + + if (isContextProvider(_Component)) { + popContext(workInProgress); + } + + break; + } + + case SuspenseListComponent: { + popSuspenseContext(workInProgress); + var renderState = workInProgress.memoizedState; + + if (renderState === null) { + // We're running in the default, "independent" mode. We don't do anything + // in this mode. + break; + } + + var didSuspendAlready = (workInProgress.effectTag & DidCapture) !== NoEffect; + var renderedTail = renderState.rendering; + + if (renderedTail === null) { + // We just rendered the head. + if (!didSuspendAlready) { + // This is the first pass. We need to figure out if anything is still + // suspended in the rendered set. + // If new content unsuspended, but there's still some content that + // didn't. Then we need to do a second pass that forces everything + // to keep showing their fallbacks. + // We might be suspended if something in this render pass suspended, or + // something in the previous committed pass suspended. Otherwise, + // there's no chance so we can skip the expensive call to + // findFirstSuspended. + var cannotBeSuspended = + renderHasNotSuspendedYet() && + (current === null || (current.effectTag & DidCapture) === NoEffect); + + if (!cannotBeSuspended) { + var row = workInProgress.child; + + while (row !== null) { + var suspended = findFirstSuspended(row); + + if (suspended !== null) { + didSuspendAlready = true; + workInProgress.effectTag |= DidCapture; + cutOffTailIfNeeded(renderState, false); // If this is a newly suspended tree, it might not get committed as + // part of the second pass. In that case nothing will subscribe to + // its thennables. Instead, we'll transfer its thennables to the + // SuspenseList so that it can retry if they resolve. + // There might be multiple of these in the list but since we're + // going to wait for all of them anyway, it doesn't really matter + // which ones gets to ping. In theory we could get clever and keep + // track of how many dependencies remain but it gets tricky because + // in the meantime, we can add/remove/change items and dependencies. + // We might bail out of the loop before finding any but that + // doesn't matter since that means that the other boundaries that + // we did find already has their listeners attached. + + var newThennables = suspended.updateQueue; + + if (newThennables !== null) { + workInProgress.updateQueue = newThennables; + workInProgress.effectTag |= Update; + } // Rerender the whole list, but this time, we'll force fallbacks + // to stay in place. + // Reset the effect list before doing the second pass since that's now invalid. + + if (renderState.lastEffect === null) { + workInProgress.firstEffect = null; + } + + workInProgress.lastEffect = renderState.lastEffect; // Reset the child fibers to their original state. + + resetChildFibers(workInProgress, renderExpirationTime); // Set up the Suspense Context to force suspense and immediately + // rerender the children. + + pushSuspenseContext( + workInProgress, + setShallowSuspenseContext(suspenseStackCursor.current, ForceSuspenseFallback), + ); + return workInProgress.child; + } + + row = row.sibling; + } + } + } else { + cutOffTailIfNeeded(renderState, false); + } // Next we're going to render the tail. + } else { + // Append the rendered row to the child list. + if (!didSuspendAlready) { + var _suspended = findFirstSuspended(renderedTail); + + if (_suspended !== null) { + workInProgress.effectTag |= DidCapture; + didSuspendAlready = true; // Ensure we transfer the update queue to the parent so that it doesn't + // get lost if this row ends up dropped during a second pass. + + var _newThennables = _suspended.updateQueue; + + if (_newThennables !== null) { + workInProgress.updateQueue = _newThennables; + workInProgress.effectTag |= Update; + } + + cutOffTailIfNeeded(renderState, true); // This might have been modified. + + if ( + renderState.tail === null && + renderState.tailMode === 'hidden' && + !renderedTail.alternate + ) { + // We need to delete the row we just rendered. + // Reset the effect list to what it was before we rendered this + // child. The nested children have already appended themselves. + var lastEffect = (workInProgress.lastEffect = renderState.lastEffect); // Remove any effects that were appended after this point. + + if (lastEffect !== null) { + lastEffect.nextEffect = null; + } // We're done. + + return null; + } + } else if (now() > renderState.tailExpiration && renderExpirationTime > Never) { + // We have now passed our CPU deadline and we'll just give up further + // attempts to render the main content and only render fallbacks. + // The assumption is that this is usually faster. + workInProgress.effectTag |= DidCapture; + didSuspendAlready = true; + cutOffTailIfNeeded(renderState, false); // Since nothing actually suspended, there will nothing to ping this + // to get it started back up to attempt the next item. If we can show + // them, then they really have the same priority as this render. + // So we'll pick it back up the very next render pass once we've had + // an opportunity to yield for paint. + + var nextPriority = renderExpirationTime - 1; + workInProgress.expirationTime = workInProgress.childExpirationTime = nextPriority; + + if (enableSchedulerTracing) { + markSpawnedWork(nextPriority); + } + } + } + + if (renderState.isBackwards) { + // The effect list of the backwards tail will have been added + // to the end. This breaks the guarantee that life-cycles fire in + // sibling order but that isn't a strong guarantee promised by React. + // Especially since these might also just pop in during future commits. + // Append to the beginning of the list. + renderedTail.sibling = workInProgress.child; + workInProgress.child = renderedTail; + } else { + var previousSibling = renderState.last; + + if (previousSibling !== null) { + previousSibling.sibling = renderedTail; + } else { + workInProgress.child = renderedTail; + } + + renderState.last = renderedTail; + } + } + + if (renderState.tail !== null) { + // We still have tail rows to render. + if (renderState.tailExpiration === 0) { + // Heuristic for how long we're willing to spend rendering rows + // until we just give up and show what we have so far. + var TAIL_EXPIRATION_TIMEOUT_MS = 500; + renderState.tailExpiration = now() + TAIL_EXPIRATION_TIMEOUT_MS; + } // Pop a row. + + var next = renderState.tail; + renderState.rendering = next; + renderState.tail = next.sibling; + renderState.lastEffect = workInProgress.lastEffect; + next.sibling = null; // Restore the context. + // TODO: We can probably just avoid popping it instead and only + // setting it the first time we go from not suspended to suspended. + + var suspenseContext = suspenseStackCursor.current; + + if (didSuspendAlready) { + suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback); + } else { + suspenseContext = setDefaultShallowSuspenseContext(suspenseContext); + } + + pushSuspenseContext(workInProgress, suspenseContext); // Do a pass over the next row. + + return next; + } + + break; + } + + case FundamentalComponent: { + if (enableFundamentalAPI) { + var fundamentalImpl = workInProgress.type.impl; + var fundamentalInstance = workInProgress.stateNode; + + if (fundamentalInstance === null) { + var getInitialState = fundamentalImpl.getInitialState; + var fundamentalState; + + if (getInitialState !== undefined) { + fundamentalState = getInitialState(newProps); + } + + fundamentalInstance = workInProgress.stateNode = createFundamentalStateInstance( + workInProgress, + newProps, + fundamentalImpl, + fundamentalState || {}, + ); + + var _instance5 = getFundamentalComponentInstance(fundamentalInstance); + + fundamentalInstance.instance = _instance5; + + if (fundamentalImpl.reconcileChildren === false) { + return null; + } + + appendAllChildren(_instance5, workInProgress, false, false); + mountFundamentalComponent(fundamentalInstance); + } else { + // We fire update in commit phase + var prevProps = fundamentalInstance.props; + fundamentalInstance.prevProps = prevProps; + fundamentalInstance.props = newProps; + fundamentalInstance.currentFiber = workInProgress; + + if (supportsPersistence) { + var _instance6 = cloneFundamentalInstance(fundamentalInstance); + + fundamentalInstance.instance = _instance6; + appendAllChildren(_instance6, workInProgress, false, false); + } + + var shouldUpdate = shouldUpdateFundamentalComponent(fundamentalInstance); + + if (shouldUpdate) { + markUpdate(workInProgress); + } + } + } + + break; + } + + case ScopeComponent: { + if (enableScopeAPI) { + if (current === null) { + var _type3 = workInProgress.type; + var scopeInstance = { + fiber: workInProgress, + methods: null, + }; + workInProgress.stateNode = scopeInstance; + scopeInstance.methods = createScopeMethods(_type3, scopeInstance); + + if (enableFlareAPI) { + var _listeners2 = newProps.listeners; + + if (_listeners2 != null) { + var _rootContainerInstance2 = getRootHostContainer(); + + updateEventListeners(_listeners2, workInProgress, _rootContainerInstance2); + } + } + + if (workInProgress.ref !== null) { + markRef$1(workInProgress); + markUpdate(workInProgress); + } + } else { + if (enableFlareAPI) { + var _prevListeners = current.memoizedProps.listeners; + var _nextListeners = newProps.listeners; + + if (_prevListeners !== _nextListeners || workInProgress.ref !== null) { + markUpdate(workInProgress); + } + } else { + if (workInProgress.ref !== null) { + markUpdate(workInProgress); + } + } + + if (current.ref !== workInProgress.ref) { + markRef$1(workInProgress); + } + } + } + + break; + } + + default: { + { + throw Error( + 'Unknown unit of work tag (' + + workInProgress.tag + + '). This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + } + + return null; + } + + function unwindWork(workInProgress, renderExpirationTime) { + switch (workInProgress.tag) { + case ClassComponent: { + var Component = workInProgress.type; + + if (isContextProvider(Component)) { + popContext(workInProgress); + } + + var effectTag = workInProgress.effectTag; + + if (effectTag & ShouldCapture) { + workInProgress.effectTag = (effectTag & ~ShouldCapture) | DidCapture; + return workInProgress; + } + + return null; + } + + case HostRoot: { + popHostContainer(workInProgress); + popTopLevelContextObject(workInProgress); + var _effectTag = workInProgress.effectTag; + + if (!((_effectTag & DidCapture) === NoEffect)) { + { + throw Error( + 'The root failed to unmount after an error. This is likely a bug in React. Please file an issue.', + ); + } + } + + workInProgress.effectTag = (_effectTag & ~ShouldCapture) | DidCapture; + return workInProgress; + } + + case HostComponent: { + // TODO: popHydrationState + popHostContext(workInProgress); + return null; + } + + case SuspenseComponent: { + popSuspenseContext(workInProgress); + + if (enableSuspenseServerRenderer) { + var suspenseState = workInProgress.memoizedState; + + if (suspenseState !== null && suspenseState.dehydrated !== null) { + if (!(workInProgress.alternate !== null)) { + { + throw Error( + 'Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue.', + ); + } + } + + resetHydrationState(); + } + } + + var _effectTag2 = workInProgress.effectTag; + + if (_effectTag2 & ShouldCapture) { + workInProgress.effectTag = (_effectTag2 & ~ShouldCapture) | DidCapture; // Captured a suspense effect. Re-render the boundary. + + return workInProgress; + } + + return null; + } + + case SuspenseListComponent: { + popSuspenseContext(workInProgress); // SuspenseList doesn't actually catch anything. It should've been + // caught by a nested boundary. If not, it should bubble through. + + return null; + } + + case HostPortal: + popHostContainer(workInProgress); + return null; + + case ContextProvider: + popProvider(workInProgress); + return null; + + default: + return null; + } + } + + function unwindInterruptedWork(interruptedWork) { + switch (interruptedWork.tag) { + case ClassComponent: { + var childContextTypes = interruptedWork.type.childContextTypes; + + if (childContextTypes !== null && childContextTypes !== undefined) { + popContext(interruptedWork); + } + + break; + } + + case HostRoot: { + popHostContainer(interruptedWork); + popTopLevelContextObject(interruptedWork); + break; + } + + case HostComponent: { + popHostContext(interruptedWork); + break; + } + + case HostPortal: + popHostContainer(interruptedWork); + break; + + case SuspenseComponent: + popSuspenseContext(interruptedWork); + break; + + case SuspenseListComponent: + popSuspenseContext(interruptedWork); + break; + + case ContextProvider: + popProvider(interruptedWork); + break; + + default: + break; + } + } + + function createCapturedValue(value, source) { + // If the value is an error, call this function immediately after it is thrown + // so the stack is accurate. + return { + value: value, + source: source, + stack: getStackByFiberInDevAndProd(source), + }; + } + + // This module is forked in different environments. + // By default, return `true` to log errors to the console. + // Forks can return `false` if this isn't desirable. + function showErrorDialog(capturedError) { + return true; + } + + function logCapturedError(capturedError) { + var logError = showErrorDialog(capturedError); // Allow injected showErrorDialog() to prevent default console.error logging. + // This enables renderers like ReactNative to better manage redbox behavior. + + if (logError === false) { + return; + } + + var error = capturedError.error; + + { + var componentName = capturedError.componentName, + componentStack = capturedError.componentStack, + errorBoundaryName = capturedError.errorBoundaryName, + errorBoundaryFound = capturedError.errorBoundaryFound, + willRetry = capturedError.willRetry; // Browsers support silencing uncaught errors by calling + // `preventDefault()` in window `error` handler. + // We record this information as an expando on the error. + + if (error != null && error._suppressLogging) { + if (errorBoundaryFound && willRetry) { + // The error is recoverable and was silenced. + // Ignore it and don't print the stack addendum. + // This is handy for testing error boundaries without noise. + return; + } // The error is fatal. Since the silencing might have + // been accidental, we'll surface it anyway. + // However, the browser would have silenced the original error + // so we'll print it first, and then print the stack addendum. + + console.error(error); // For a more detailed description of this block, see: + // https://github.com/facebook/react/pull/13384 + } + + var componentNameMessage = componentName + ? 'The above error occurred in the <' + componentName + '> component:' + : 'The above error occurred in one of your React components:'; + var errorBoundaryMessage; // errorBoundaryFound check is sufficient; errorBoundaryName check is to satisfy Flow. + + if (errorBoundaryFound && errorBoundaryName) { + if (willRetry) { + errorBoundaryMessage = + 'React will try to recreate this component tree from scratch ' + + ('using the error boundary you provided, ' + errorBoundaryName + '.'); + } else { + errorBoundaryMessage = + 'This error was initially handled by the error boundary ' + + errorBoundaryName + + '.\n' + + 'Recreating the tree from scratch failed so React will unmount the tree.'; + } + } else { + errorBoundaryMessage = + 'Consider adding an error boundary to your tree to customize error handling behavior.\n' + + 'Visit https://fb.me/react-error-boundaries to learn more about error boundaries.'; + } + + var combinedMessage = + '' + componentNameMessage + componentStack + '\n\n' + ('' + errorBoundaryMessage); // In development, we provide our own message with just the component stack. + // We don't include the original error message and JS stack because the browser + // has already printed it. Even if the application swallows the error, it is still + // displayed by the browser thanks to the DEV-only fake event trick in ReactErrorUtils. + + console.error(combinedMessage); + } + } + + var didWarnAboutUndefinedSnapshotBeforeUpdate = null; + + { + didWarnAboutUndefinedSnapshotBeforeUpdate = new Set(); + } + + var PossiblyWeakSet = typeof WeakSet === 'function' ? WeakSet : Set; + function logError(boundary, errorInfo) { + var source = errorInfo.source; + var stack = errorInfo.stack; + + if (stack === null && source !== null) { + stack = getStackByFiberInDevAndProd(source); + } + + var capturedError = { + componentName: source !== null ? getComponentName(source.type) : null, + componentStack: stack !== null ? stack : '', + error: errorInfo.value, + errorBoundary: null, + errorBoundaryName: null, + errorBoundaryFound: false, + willRetry: false, + }; + + if (boundary !== null && boundary.tag === ClassComponent) { + capturedError.errorBoundary = boundary.stateNode; + capturedError.errorBoundaryName = getComponentName(boundary.type); + capturedError.errorBoundaryFound = true; + capturedError.willRetry = true; + } + + try { + logCapturedError(capturedError); + } catch (e) { + // This method must not throw, or React internal state will get messed up. + // If console.error is overridden, or logCapturedError() shows a dialog that throws, + // we want to report this error outside of the normal stack as a last resort. + // https://github.com/facebook/react/issues/13188 + setTimeout(function () { + throw e; + }); + } + } + + var callComponentWillUnmountWithTimer = function (current$$1, instance) { + startPhaseTimer(current$$1, 'componentWillUnmount'); + instance.props = current$$1.memoizedProps; + instance.state = current$$1.memoizedState; + instance.componentWillUnmount(); + stopPhaseTimer(); + }; // Capture errors so they don't interrupt unmounting. + + function safelyCallComponentWillUnmount(current$$1, instance) { + { + invokeGuardedCallback(null, callComponentWillUnmountWithTimer, null, current$$1, instance); + + if (hasCaughtError()) { + var unmountError = clearCaughtError(); + captureCommitPhaseError(current$$1, unmountError); + } + } + } + + function safelyDetachRef(current$$1) { + var ref = current$$1.ref; + + if (ref !== null) { + if (typeof ref === 'function') { + { + invokeGuardedCallback(null, ref, null, null); + + if (hasCaughtError()) { + var refError = clearCaughtError(); + captureCommitPhaseError(current$$1, refError); + } + } + } else { + ref.current = null; + } + } + } + + function safelyCallDestroy(current$$1, destroy) { + { + invokeGuardedCallback(null, destroy, null); + + if (hasCaughtError()) { + var error = clearCaughtError(); + captureCommitPhaseError(current$$1, error); + } + } + } + + function commitBeforeMutationLifeCycles(current$$1, finishedWork) { + switch (finishedWork.tag) { + case FunctionComponent: + case ForwardRef: + case SimpleMemoComponent: { + commitHookEffectList(UnmountSnapshot, NoEffect$1, finishedWork); + return; + } + + case ClassComponent: { + if (finishedWork.effectTag & Snapshot) { + if (current$$1 !== null) { + var prevProps = current$$1.memoizedProps; + var prevState = current$$1.memoizedState; + startPhaseTimer(finishedWork, 'getSnapshotBeforeUpdate'); + var instance = finishedWork.stateNode; // We could update instance props and state here, + // but instead we rely on them being set during last render. + // TODO: revisit this when we implement resuming. + + { + if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) { + !(instance.props === finishedWork.memoizedProps) + ? warning$1( + false, + 'Expected %s props to match memoized props before ' + + 'getSnapshotBeforeUpdate. ' + + 'This might either be because of a bug in React, or because ' + + 'a component reassigns its own `this.props`. ' + + 'Please file an issue.', + getComponentName(finishedWork.type) || 'instance', + ) + : void 0; + !(instance.state === finishedWork.memoizedState) + ? warning$1( + false, + 'Expected %s state to match memoized state before ' + + 'getSnapshotBeforeUpdate. ' + + 'This might either be because of a bug in React, or because ' + + 'a component reassigns its own `this.props`. ' + + 'Please file an issue.', + getComponentName(finishedWork.type) || 'instance', + ) + : void 0; + } + } + + var snapshot = instance.getSnapshotBeforeUpdate( + finishedWork.elementType === finishedWork.type + ? prevProps + : resolveDefaultProps(finishedWork.type, prevProps), + prevState, + ); + + { + var didWarnSet = didWarnAboutUndefinedSnapshotBeforeUpdate; + + if (snapshot === undefined && !didWarnSet.has(finishedWork.type)) { + didWarnSet.add(finishedWork.type); + warningWithoutStack$1( + false, + '%s.getSnapshotBeforeUpdate(): A snapshot value (or null) ' + + 'must be returned. You have returned undefined.', + getComponentName(finishedWork.type), + ); + } + } + + instance.__reactInternalSnapshotBeforeUpdate = snapshot; + stopPhaseTimer(); + } + } + + return; + } + + case HostRoot: + case HostComponent: + case HostText: + case HostPortal: + case IncompleteClassComponent: + // Nothing to do for these component types + return; + + default: { + { + { + throw Error( + 'This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + } + } + } + + function commitHookEffectList(unmountTag, mountTag, finishedWork) { + var updateQueue = finishedWork.updateQueue; + var lastEffect = updateQueue !== null ? updateQueue.lastEffect : null; + + if (lastEffect !== null) { + var firstEffect = lastEffect.next; + var effect = firstEffect; + + do { + if ((effect.tag & unmountTag) !== NoEffect$1) { + // Unmount + var destroy = effect.destroy; + effect.destroy = undefined; + + if (destroy !== undefined) { + destroy(); + } + } + + if ((effect.tag & mountTag) !== NoEffect$1) { + // Mount + var create = effect.create; + effect.destroy = create(); + + { + var _destroy = effect.destroy; + + if (_destroy !== undefined && typeof _destroy !== 'function') { + var addendum = void 0; + + if (_destroy === null) { + addendum = + ' You returned null. If your effect does not require clean ' + + 'up, return undefined (or nothing).'; + } else if (typeof _destroy.then === 'function') { + addendum = + '\n\nIt looks like you wrote useEffect(async () => ...) or returned a Promise. ' + + 'Instead, write the async function inside your effect ' + + 'and call it immediately:\n\n' + + 'useEffect(() => {\n' + + ' async function fetchData() {\n' + + ' // You can await here\n' + + ' const response = await MyAPI.getData(someId);\n' + + ' // ...\n' + + ' }\n' + + ' fetchData();\n' + + "}, [someId]); // Or [] if effect doesn't need props or state\n\n" + + 'Learn more about data fetching with Hooks: https://fb.me/react-hooks-data-fetching'; + } else { + addendum = ' You returned: ' + _destroy; + } + + warningWithoutStack$1( + false, + 'An effect function must not return anything besides a function, ' + + 'which is used for clean-up.%s%s', + addendum, + getStackByFiberInDevAndProd(finishedWork), + ); + } + } + } + + effect = effect.next; + } while (effect !== firstEffect); + } + } + + function commitPassiveHookEffects(finishedWork) { + if ((finishedWork.effectTag & Passive) !== NoEffect) { + switch (finishedWork.tag) { + case FunctionComponent: + case ForwardRef: + case SimpleMemoComponent: { + commitHookEffectList(UnmountPassive, NoEffect$1, finishedWork); + commitHookEffectList(NoEffect$1, MountPassive, finishedWork); + break; + } + + default: + break; + } + } + } + + function commitLifeCycles(finishedRoot, current$$1, finishedWork, committedExpirationTime) { + switch (finishedWork.tag) { + case FunctionComponent: + case ForwardRef: + case SimpleMemoComponent: { + commitHookEffectList(UnmountLayout, MountLayout, finishedWork); + break; + } + + case ClassComponent: { + var instance = finishedWork.stateNode; + + if (finishedWork.effectTag & Update) { + if (current$$1 === null) { + startPhaseTimer(finishedWork, 'componentDidMount'); // We could update instance props and state here, + // but instead we rely on them being set during last render. + // TODO: revisit this when we implement resuming. + + { + if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) { + !(instance.props === finishedWork.memoizedProps) + ? warning$1( + false, + 'Expected %s props to match memoized props before ' + + 'componentDidMount. ' + + 'This might either be because of a bug in React, or because ' + + 'a component reassigns its own `this.props`. ' + + 'Please file an issue.', + getComponentName(finishedWork.type) || 'instance', + ) + : void 0; + !(instance.state === finishedWork.memoizedState) + ? warning$1( + false, + 'Expected %s state to match memoized state before ' + + 'componentDidMount. ' + + 'This might either be because of a bug in React, or because ' + + 'a component reassigns its own `this.props`. ' + + 'Please file an issue.', + getComponentName(finishedWork.type) || 'instance', + ) + : void 0; + } + } + + instance.componentDidMount(); + stopPhaseTimer(); + } else { + var prevProps = + finishedWork.elementType === finishedWork.type + ? current$$1.memoizedProps + : resolveDefaultProps(finishedWork.type, current$$1.memoizedProps); + var prevState = current$$1.memoizedState; + startPhaseTimer(finishedWork, 'componentDidUpdate'); // We could update instance props and state here, + // but instead we rely on them being set during last render. + // TODO: revisit this when we implement resuming. + + { + if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) { + !(instance.props === finishedWork.memoizedProps) + ? warning$1( + false, + 'Expected %s props to match memoized props before ' + + 'componentDidUpdate. ' + + 'This might either be because of a bug in React, or because ' + + 'a component reassigns its own `this.props`. ' + + 'Please file an issue.', + getComponentName(finishedWork.type) || 'instance', + ) + : void 0; + !(instance.state === finishedWork.memoizedState) + ? warning$1( + false, + 'Expected %s state to match memoized state before ' + + 'componentDidUpdate. ' + + 'This might either be because of a bug in React, or because ' + + 'a component reassigns its own `this.props`. ' + + 'Please file an issue.', + getComponentName(finishedWork.type) || 'instance', + ) + : void 0; + } + } + + instance.componentDidUpdate( + prevProps, + prevState, + instance.__reactInternalSnapshotBeforeUpdate, + ); + stopPhaseTimer(); + } + } + + var updateQueue = finishedWork.updateQueue; + + if (updateQueue !== null) { + { + if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) { + !(instance.props === finishedWork.memoizedProps) + ? warning$1( + false, + 'Expected %s props to match memoized props before ' + + 'processing the update queue. ' + + 'This might either be because of a bug in React, or because ' + + 'a component reassigns its own `this.props`. ' + + 'Please file an issue.', + getComponentName(finishedWork.type) || 'instance', + ) + : void 0; + !(instance.state === finishedWork.memoizedState) + ? warning$1( + false, + 'Expected %s state to match memoized state before ' + + 'processing the update queue. ' + + 'This might either be because of a bug in React, or because ' + + 'a component reassigns its own `this.props`. ' + + 'Please file an issue.', + getComponentName(finishedWork.type) || 'instance', + ) + : void 0; + } + } // We could update instance props and state here, + // but instead we rely on them being set during last render. + // TODO: revisit this when we implement resuming. + + commitUpdateQueue(finishedWork, updateQueue, instance, committedExpirationTime); + } + + return; + } + + case HostRoot: { + var _updateQueue = finishedWork.updateQueue; + + if (_updateQueue !== null) { + var _instance = null; + + if (finishedWork.child !== null) { + switch (finishedWork.child.tag) { + case HostComponent: + _instance = getPublicInstance(finishedWork.child.stateNode); + break; + + case ClassComponent: + _instance = finishedWork.child.stateNode; + break; + } + } + + commitUpdateQueue(finishedWork, _updateQueue, _instance, committedExpirationTime); + } + + return; + } + + case HostComponent: { + var _instance2 = finishedWork.stateNode; // Renderers may schedule work to be done after host components are mounted + // (eg DOM renderer may schedule auto-focus for inputs and form controls). + // These effects should only be committed when components are first mounted, + // aka when there is no current/alternate. + + if (current$$1 === null && finishedWork.effectTag & Update) { + var type = finishedWork.type; + var props = finishedWork.memoizedProps; + commitMount(_instance2, type, props, finishedWork); + } + + return; + } + + case HostText: { + // We have no life-cycles associated with text. + return; + } + + case HostPortal: { + // We have no life-cycles associated with portals. + return; + } + + case Profiler: { + if (enableProfilerTimer) { + var onRender = finishedWork.memoizedProps.onRender; + + if (typeof onRender === 'function') { + if (enableSchedulerTracing) { + onRender( + finishedWork.memoizedProps.id, + current$$1 === null ? 'mount' : 'update', + finishedWork.actualDuration, + finishedWork.treeBaseDuration, + finishedWork.actualStartTime, + getCommitTime(), + finishedRoot.memoizedInteractions, + ); + } else { + onRender( + finishedWork.memoizedProps.id, + current$$1 === null ? 'mount' : 'update', + finishedWork.actualDuration, + finishedWork.treeBaseDuration, + finishedWork.actualStartTime, + getCommitTime(), + ); + } + } + } + + return; + } + + case SuspenseComponent: { + commitSuspenseHydrationCallbacks(finishedRoot, finishedWork); + return; + } + + case SuspenseListComponent: + case IncompleteClassComponent: + case FundamentalComponent: + case ScopeComponent: + return; + + default: { + { + { + throw Error( + 'This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + } + } + } + + function hideOrUnhideAllChildren(finishedWork, isHidden) { + if (supportsMutation) { + // We only have the top Fiber that was inserted but we need to recurse down its + // children to find all the terminal nodes. + var node = finishedWork; + + while (true) { + if (node.tag === HostComponent) { + var instance = node.stateNode; + + if (isHidden) { + hideInstance(instance); + } else { + unhideInstance(node.stateNode, node.memoizedProps); + } + } else if (node.tag === HostText) { + var _instance3 = node.stateNode; + + if (isHidden) { + hideTextInstance(_instance3); + } else { + unhideTextInstance(_instance3, node.memoizedProps); + } + } else if ( + node.tag === SuspenseComponent && + node.memoizedState !== null && + node.memoizedState.dehydrated === null + ) { + // Found a nested Suspense component that timed out. Skip over the + // primary child fragment, which should remain hidden. + var fallbackChildFragment = node.child.sibling; + fallbackChildFragment.return = node; + node = fallbackChildFragment; + continue; + } else if (node.child !== null) { + node.child.return = node; + node = node.child; + continue; + } + + if (node === finishedWork) { + return; + } + + while (node.sibling === null) { + if (node.return === null || node.return === finishedWork) { + return; + } + + node = node.return; + } + + node.sibling.return = node.return; + node = node.sibling; + } + } + } + + function commitAttachRef(finishedWork) { + var ref = finishedWork.ref; + + if (ref !== null) { + var instance = finishedWork.stateNode; + var instanceToUse; + + switch (finishedWork.tag) { + case HostComponent: + instanceToUse = getPublicInstance(instance); + break; + + default: + instanceToUse = instance; + } // Moved outside to ensure DCE works with this flag + + if (enableScopeAPI && finishedWork.tag === ScopeComponent) { + instanceToUse = instance.methods; + } + + if (typeof ref === 'function') { + ref(instanceToUse); + } else { + { + if (!ref.hasOwnProperty('current')) { + warningWithoutStack$1( + false, + 'Unexpected ref object provided for %s. ' + + 'Use either a ref-setter function or React.createRef().%s', + getComponentName(finishedWork.type), + getStackByFiberInDevAndProd(finishedWork), + ); + } + } + + ref.current = instanceToUse; + } + } + } + + function commitDetachRef(current$$1) { + var currentRef = current$$1.ref; + + if (currentRef !== null) { + if (typeof currentRef === 'function') { + currentRef(null); + } else { + currentRef.current = null; + } + } + } // User-originating errors (lifecycles and refs) should not interrupt + // deletion, so don't let them throw. Host-originating errors should + // interrupt deletion, so it's okay + + function commitUnmount(finishedRoot, current$$1, renderPriorityLevel) { + onCommitUnmount(current$$1); + + switch (current$$1.tag) { + case FunctionComponent: + case ForwardRef: + case MemoComponent: + case SimpleMemoComponent: { + var updateQueue = current$$1.updateQueue; + + if (updateQueue !== null) { + var lastEffect = updateQueue.lastEffect; + + if (lastEffect !== null) { + var firstEffect = lastEffect.next; // When the owner fiber is deleted, the destroy function of a passive + // effect hook is called during the synchronous commit phase. This is + // a concession to implementation complexity. Calling it in the + // passive effect phase (like they usually are, when dependencies + // change during an update) would require either traversing the + // children of the deleted fiber again, or including unmount effects + // as part of the fiber effect list. + // + // Because this is during the sync commit phase, we need to change + // the priority. + // + // TODO: Reconsider this implementation trade off. + + var priorityLevel = + renderPriorityLevel > NormalPriority ? NormalPriority : renderPriorityLevel; + runWithPriority$2(priorityLevel, function () { + var effect = firstEffect; + + do { + var destroy = effect.destroy; + + if (destroy !== undefined) { + safelyCallDestroy(current$$1, destroy); + } + + effect = effect.next; + } while (effect !== firstEffect); + }); + } + } + + break; + } + + case ClassComponent: { + safelyDetachRef(current$$1); + var instance = current$$1.stateNode; + + if (typeof instance.componentWillUnmount === 'function') { + safelyCallComponentWillUnmount(current$$1, instance); + } + + return; + } + + case HostComponent: { + if (enableFlareAPI) { + var dependencies = current$$1.dependencies; + + if (dependencies !== null) { + var respondersMap = dependencies.responders; + + if (respondersMap !== null) { + var responderInstances = Array.from(respondersMap.values()); + + for (var i = 0, length = responderInstances.length; i < length; i++) { + var responderInstance = responderInstances[i]; + unmountResponderInstance(responderInstance); + } + + dependencies.responders = null; + } + } + } + + safelyDetachRef(current$$1); + return; + } + + case HostPortal: { + // TODO: this is recursive. + // We are also not using this parent because + // the portal will get pushed immediately. + if (supportsMutation) { + unmountHostComponents(finishedRoot, current$$1, renderPriorityLevel); + } else if (supportsPersistence) { + emptyPortalContainer(current$$1); + } + + return; + } + + case FundamentalComponent: { + if (enableFundamentalAPI) { + var fundamentalInstance = current$$1.stateNode; + + if (fundamentalInstance !== null) { + unmountFundamentalComponent(fundamentalInstance); + current$$1.stateNode = null; + } + } + + return; + } + + case DehydratedFragment: { + if (enableSuspenseCallback) { + var hydrationCallbacks = finishedRoot.hydrationCallbacks; + + if (hydrationCallbacks !== null) { + var onDeleted = hydrationCallbacks.onDeleted; + + if (onDeleted) { + onDeleted(current$$1.stateNode); + } + } + } + + return; + } + + case ScopeComponent: { + if (enableScopeAPI) { + safelyDetachRef(current$$1); + } + } + } + } + + function commitNestedUnmounts(finishedRoot, root, renderPriorityLevel) { + // While we're inside a removed host node we don't want to call + // removeChild on the inner nodes because they're removed by the top + // call anyway. We also want to call componentWillUnmount on all + // composites before this host node is removed from the tree. Therefore + // we do an inner loop while we're still inside the host node. + var node = root; + + while (true) { + commitUnmount(finishedRoot, node, renderPriorityLevel); // Visit children because they may contain more composite or host nodes. + // Skip portals because commitUnmount() currently visits them recursively. + + if ( + node.child !== null && // If we use mutation we drill down into portals using commitUnmount above. + // If we don't use mutation we drill down into portals here instead. + (!supportsMutation || node.tag !== HostPortal) + ) { + node.child.return = node; + node = node.child; + continue; + } + + if (node === root) { + return; + } + + while (node.sibling === null) { + if (node.return === null || node.return === root) { + return; + } + + node = node.return; + } + + node.sibling.return = node.return; + node = node.sibling; + } + } + + function detachFiber(current$$1) { + var alternate = current$$1.alternate; // Cut off the return pointers to disconnect it from the tree. Ideally, we + // should clear the child pointer of the parent alternate to let this + // get GC:ed but we don't know which for sure which parent is the current + // one so we'll settle for GC:ing the subtree of this child. This child + // itself will be GC:ed when the parent updates the next time. + + current$$1.return = null; + current$$1.child = null; + current$$1.memoizedState = null; + current$$1.updateQueue = null; + current$$1.dependencies = null; + current$$1.alternate = null; + current$$1.firstEffect = null; + current$$1.lastEffect = null; + current$$1.pendingProps = null; + current$$1.memoizedProps = null; + + if (alternate !== null) { + detachFiber(alternate); + } + } + + function emptyPortalContainer(current$$1) { + if (!supportsPersistence) { + return; + } + + var portal = current$$1.stateNode; + var containerInfo = portal.containerInfo; + var emptyChildSet = createContainerChildSet(containerInfo); + replaceContainerChildren(containerInfo, emptyChildSet); + } + + function commitContainer(finishedWork) { + if (!supportsPersistence) { + return; + } + + switch (finishedWork.tag) { + case ClassComponent: + case HostComponent: + case HostText: + case FundamentalComponent: { + return; + } + + case HostRoot: + case HostPortal: { + var portalOrRoot = finishedWork.stateNode; + var containerInfo = portalOrRoot.containerInfo, + pendingChildren = portalOrRoot.pendingChildren; + replaceContainerChildren(containerInfo, pendingChildren); + return; + } + + default: { + { + { + throw Error( + 'This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + } + } + } + + function getHostParentFiber(fiber) { + var parent = fiber.return; + + while (parent !== null) { + if (isHostParent(parent)) { + return parent; + } + + parent = parent.return; + } + + { + { + throw Error( + 'Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + } + + function isHostParent(fiber) { + return fiber.tag === HostComponent || fiber.tag === HostRoot || fiber.tag === HostPortal; + } + + function getHostSibling(fiber) { + // We're going to search forward into the tree until we find a sibling host + // node. Unfortunately, if multiple insertions are done in a row we have to + // search past them. This leads to exponential search for the next sibling. + // TODO: Find a more efficient way to do this. + var node = fiber; + + siblings: while (true) { + // If we didn't find anything, let's try the next sibling. + while (node.sibling === null) { + if (node.return === null || isHostParent(node.return)) { + // If we pop out of the root or hit the parent the fiber we are the + // last sibling. + return null; + } + + node = node.return; + } + + node.sibling.return = node.return; + node = node.sibling; + + while (node.tag !== HostComponent && node.tag !== HostText && node.tag !== DehydratedFragment) { + // If it is not host node and, we might have a host node inside it. + // Try to search down until we find one. + if (node.effectTag & Placement) { + // If we don't have a child, try the siblings instead. + continue siblings; + } // If we don't have a child, try the siblings instead. + // We also skip portals because they are not part of this host tree. + + if (node.child === null || node.tag === HostPortal) { + continue siblings; + } else { + node.child.return = node; + node = node.child; + } + } // Check if this host node is stable or about to be placed. + + if (!(node.effectTag & Placement)) { + // Found it! + return node.stateNode; + } + } + } + + function commitPlacement(finishedWork) { + if (!supportsMutation) { + return; + } // Recursively insert all host nodes into the parent. + + var parentFiber = getHostParentFiber(finishedWork); // Note: these two variables *must* always be updated together. + + var parent; + var isContainer; + var parentStateNode = parentFiber.stateNode; + + switch (parentFiber.tag) { + case HostComponent: + parent = parentStateNode; + isContainer = false; + break; + + case HostRoot: + parent = parentStateNode.containerInfo; + isContainer = true; + break; + + case HostPortal: + parent = parentStateNode.containerInfo; + isContainer = true; + break; + + case FundamentalComponent: + if (enableFundamentalAPI) { + parent = parentStateNode.instance; + isContainer = false; + } + + // eslint-disable-next-line-no-fallthrough + + default: { + { + throw Error( + 'Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + } + + if (parentFiber.effectTag & ContentReset) { + // Reset the text content of the parent before doing any insertions + resetTextContent(parent); // Clear ContentReset from the effect tag + + parentFiber.effectTag &= ~ContentReset; + } + + var before = getHostSibling(finishedWork); // We only have the top Fiber that was inserted but we need to recurse down its + // children to find all the terminal nodes. + + var node = finishedWork; + + while (true) { + var isHost = node.tag === HostComponent || node.tag === HostText; + + if (isHost || (enableFundamentalAPI && node.tag === FundamentalComponent)) { + var stateNode = isHost ? node.stateNode : node.stateNode.instance; + + if (before) { + if (isContainer) { + insertInContainerBefore(parent, stateNode, before); + } else { + insertBefore(parent, stateNode, before); + } + } else { + if (isContainer) { + appendChildToContainer(parent, stateNode); + } else { + appendChild(parent, stateNode); + } + } + } else if (node.tag === HostPortal) { + // If the insertion itself is a portal, then we don't want to traverse + // down its children. Instead, we'll get insertions from each child in + // the portal directly. + } else if (node.child !== null) { + node.child.return = node; + node = node.child; + continue; + } + + if (node === finishedWork) { + return; + } + + while (node.sibling === null) { + if (node.return === null || node.return === finishedWork) { + return; + } + + node = node.return; + } + + node.sibling.return = node.return; + node = node.sibling; + } + } + + function unmountHostComponents(finishedRoot, current$$1, renderPriorityLevel) { + // We only have the top Fiber that was deleted but we need to recurse down its + // children to find all the terminal nodes. + var node = current$$1; // Each iteration, currentParent is populated with node's host parent if not + // currentParentIsValid. + + var currentParentIsValid = false; // Note: these two variables *must* always be updated together. + + var currentParent; + var currentParentIsContainer; + + while (true) { + if (!currentParentIsValid) { + var parent = node.return; + + findParent: while (true) { + if (!(parent !== null)) { + { + throw Error( + 'Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + + var parentStateNode = parent.stateNode; + + switch (parent.tag) { + case HostComponent: + currentParent = parentStateNode; + currentParentIsContainer = false; + break findParent; + + case HostRoot: + currentParent = parentStateNode.containerInfo; + currentParentIsContainer = true; + break findParent; + + case HostPortal: + currentParent = parentStateNode.containerInfo; + currentParentIsContainer = true; + break findParent; + + case FundamentalComponent: + if (enableFundamentalAPI) { + currentParent = parentStateNode.instance; + currentParentIsContainer = false; + } + } + + parent = parent.return; + } + + currentParentIsValid = true; + } + + if (node.tag === HostComponent || node.tag === HostText) { + commitNestedUnmounts(finishedRoot, node, renderPriorityLevel); // After all the children have unmounted, it is now safe to remove the + // node from the tree. + + if (currentParentIsContainer) { + removeChildFromContainer(currentParent, node.stateNode); + } else { + removeChild(currentParent, node.stateNode); + } // Don't visit children because we already visited them. + } else if (enableFundamentalAPI && node.tag === FundamentalComponent) { + var fundamentalNode = node.stateNode.instance; + commitNestedUnmounts(finishedRoot, node, renderPriorityLevel); // After all the children have unmounted, it is now safe to remove the + // node from the tree. + + if (currentParentIsContainer) { + removeChildFromContainer(currentParent, fundamentalNode); + } else { + removeChild(currentParent, fundamentalNode); + } + } else if (enableSuspenseServerRenderer && node.tag === DehydratedFragment) { + if (enableSuspenseCallback) { + var hydrationCallbacks = finishedRoot.hydrationCallbacks; + + if (hydrationCallbacks !== null) { + var onDeleted = hydrationCallbacks.onDeleted; + + if (onDeleted) { + onDeleted(node.stateNode); + } + } + } // Delete the dehydrated suspense boundary and all of its content. + + if (currentParentIsContainer) { + clearSuspenseBoundaryFromContainer(currentParent, node.stateNode); + } else { + clearSuspenseBoundary(currentParent, node.stateNode); + } + } else if (node.tag === HostPortal) { + if (node.child !== null) { + // When we go into a portal, it becomes the parent to remove from. + // We will reassign it back when we pop the portal on the way up. + currentParent = node.stateNode.containerInfo; + currentParentIsContainer = true; // Visit children because portals might contain host components. + + node.child.return = node; + node = node.child; + continue; + } + } else { + commitUnmount(finishedRoot, node, renderPriorityLevel); // Visit children because we may find more host components below. + + if (node.child !== null) { + node.child.return = node; + node = node.child; + continue; + } + } + + if (node === current$$1) { + return; + } + + while (node.sibling === null) { + if (node.return === null || node.return === current$$1) { + return; + } + + node = node.return; + + if (node.tag === HostPortal) { + // When we go out of the portal, we need to restore the parent. + // Since we don't keep a stack of them, we will search for it. + currentParentIsValid = false; + } + } + + node.sibling.return = node.return; + node = node.sibling; + } + } + + function commitDeletion(finishedRoot, current$$1, renderPriorityLevel) { + if (supportsMutation) { + // Recursively delete all host nodes from the parent. + // Detach refs and call componentWillUnmount() on the whole subtree. + unmountHostComponents(finishedRoot, current$$1, renderPriorityLevel); + } else { + // Detach refs and call componentWillUnmount() on the whole subtree. + commitNestedUnmounts(finishedRoot, current$$1, renderPriorityLevel); + } + + detachFiber(current$$1); + } + + function commitWork(current$$1, finishedWork) { + if (!supportsMutation) { + switch (finishedWork.tag) { + case FunctionComponent: + case ForwardRef: + case MemoComponent: + case SimpleMemoComponent: { + // Note: We currently never use MountMutation, but useLayout uses + // UnmountMutation. + commitHookEffectList(UnmountMutation, MountMutation, finishedWork); + return; + } + + case Profiler: { + return; + } + + case SuspenseComponent: { + commitSuspenseComponent(finishedWork); + attachSuspenseRetryListeners(finishedWork); + return; + } + + case SuspenseListComponent: { + attachSuspenseRetryListeners(finishedWork); + return; + } + + case HostRoot: { + if (supportsHydration) { + var root = finishedWork.stateNode; + + if (root.hydrate) { + // We've just hydrated. No need to hydrate again. + root.hydrate = false; + commitHydratedContainer(root.containerInfo); + } + } + + break; + } + } + + commitContainer(finishedWork); + return; + } + + switch (finishedWork.tag) { + case FunctionComponent: + case ForwardRef: + case MemoComponent: + case SimpleMemoComponent: { + // Note: We currently never use MountMutation, but useLayout uses + // UnmountMutation. + commitHookEffectList(UnmountMutation, MountMutation, finishedWork); + return; + } + + case ClassComponent: { + return; + } + + case HostComponent: { + var instance = finishedWork.stateNode; + + if (instance != null) { + // Commit the work prepared earlier. + var newProps = finishedWork.memoizedProps; // For hydration we reuse the update path but we treat the oldProps + // as the newProps. The updatePayload will contain the real change in + // this case. + + var oldProps = current$$1 !== null ? current$$1.memoizedProps : newProps; + var type = finishedWork.type; // TODO: Type the updateQueue to be specific to host components. + + var updatePayload = finishedWork.updateQueue; + finishedWork.updateQueue = null; + + if (updatePayload !== null) { + commitUpdate(instance, updatePayload, type, oldProps, newProps, finishedWork); + } + + if (enableFlareAPI) { + var prevListeners = oldProps.listeners; + var nextListeners = newProps.listeners; + + if (prevListeners !== nextListeners) { + updateEventListeners(nextListeners, finishedWork, null); + } + } + } + + return; + } + + case HostText: { + if (!(finishedWork.stateNode !== null)) { + { + throw Error( + 'This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + + var textInstance = finishedWork.stateNode; + var newText = finishedWork.memoizedProps; // For hydration we reuse the update path but we treat the oldProps + // as the newProps. The updatePayload will contain the real change in + // this case. + + var oldText = current$$1 !== null ? current$$1.memoizedProps : newText; + commitTextUpdate(textInstance, oldText, newText); + return; + } + + case HostRoot: { + if (supportsHydration) { + var _root = finishedWork.stateNode; + + if (_root.hydrate) { + // We've just hydrated. No need to hydrate again. + _root.hydrate = false; + commitHydratedContainer(_root.containerInfo); + } + } + + return; + } + + case Profiler: { + return; + } + + case SuspenseComponent: { + commitSuspenseComponent(finishedWork); + attachSuspenseRetryListeners(finishedWork); + return; + } + + case SuspenseListComponent: { + attachSuspenseRetryListeners(finishedWork); + return; + } + + case IncompleteClassComponent: { + return; + } + + case FundamentalComponent: { + if (enableFundamentalAPI) { + var fundamentalInstance = finishedWork.stateNode; + updateFundamentalComponent(fundamentalInstance); + } + + return; + } + + case ScopeComponent: { + if (enableScopeAPI) { + var scopeInstance = finishedWork.stateNode; + scopeInstance.fiber = finishedWork; + + if (enableFlareAPI) { + var _newProps = finishedWork.memoizedProps; + + var _oldProps = current$$1 !== null ? current$$1.memoizedProps : _newProps; + + var _prevListeners = _oldProps.listeners; + var _nextListeners = _newProps.listeners; + + if (_prevListeners !== _nextListeners) { + updateEventListeners(_nextListeners, finishedWork, null); + } + } + } + + return; + } + + default: { + { + { + throw Error( + 'This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + } + } + } + + function commitSuspenseComponent(finishedWork) { + var newState = finishedWork.memoizedState; + var newDidTimeout; + var primaryChildParent = finishedWork; + + if (newState === null) { + newDidTimeout = false; + } else { + newDidTimeout = true; + primaryChildParent = finishedWork.child; + markCommitTimeOfFallback(); + } + + if (supportsMutation && primaryChildParent !== null) { + hideOrUnhideAllChildren(primaryChildParent, newDidTimeout); + } + + if (enableSuspenseCallback && newState !== null) { + var suspenseCallback = finishedWork.memoizedProps.suspenseCallback; + + if (typeof suspenseCallback === 'function') { + var thenables = finishedWork.updateQueue; + + if (thenables !== null) { + suspenseCallback(new Set(thenables)); + } + } else { + if (suspenseCallback !== undefined) { + warning$1(false, 'Unexpected type for suspenseCallback.'); + } + } + } + } + + function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) { + if (!supportsHydration) { + return; + } + + var newState = finishedWork.memoizedState; + + if (newState === null) { + var current$$1 = finishedWork.alternate; + + if (current$$1 !== null) { + var prevState = current$$1.memoizedState; + + if (prevState !== null) { + var suspenseInstance = prevState.dehydrated; + + if (suspenseInstance !== null) { + commitHydratedSuspenseInstance(suspenseInstance); + + if (enableSuspenseCallback) { + var hydrationCallbacks = finishedRoot.hydrationCallbacks; + + if (hydrationCallbacks !== null) { + var onHydrated = hydrationCallbacks.onHydrated; + + if (onHydrated) { + onHydrated(suspenseInstance); + } + } + } + } + } + } + } + } + + function attachSuspenseRetryListeners(finishedWork) { + // If this boundary just timed out, then it will have a set of thenables. + // For each thenable, attach a listener so that when it resolves, React + // attempts to re-render the boundary in the primary (pre-timeout) state. + var thenables = finishedWork.updateQueue; + + if (thenables !== null) { + finishedWork.updateQueue = null; + var retryCache = finishedWork.stateNode; + + if (retryCache === null) { + retryCache = finishedWork.stateNode = new PossiblyWeakSet(); + } + + thenables.forEach(function (thenable) { + // Memoize using the boundary fiber to prevent redundant listeners. + var retry = resolveRetryThenable.bind(null, finishedWork, thenable); + + if (!retryCache.has(thenable)) { + if (enableSchedulerTracing) { + if (thenable.__reactDoNotTraceInteractions !== true) { + retry = tracing.unstable_wrap(retry); + } + } + + retryCache.add(thenable); + thenable.then(retry, retry); + } + }); + } + } + + function commitResetTextContent(current$$1) { + if (!supportsMutation) { + return; + } + + resetTextContent(current$$1.stateNode); + } + + var PossiblyWeakMap$1 = typeof WeakMap === 'function' ? WeakMap : Map; + + function createRootErrorUpdate(fiber, errorInfo, expirationTime) { + var update = createUpdate(expirationTime, null); // Unmount the root by rendering null. + + update.tag = CaptureUpdate; // Caution: React DevTools currently depends on this property + // being called "element". + + update.payload = { + element: null, + }; + var error = errorInfo.value; + + update.callback = function () { + onUncaughtError(error); + logError(fiber, errorInfo); + }; + + return update; + } + + function createClassErrorUpdate(fiber, errorInfo, expirationTime) { + var update = createUpdate(expirationTime, null); + update.tag = CaptureUpdate; + var getDerivedStateFromError = fiber.type.getDerivedStateFromError; + + if (typeof getDerivedStateFromError === 'function') { + var error = errorInfo.value; + + update.payload = function () { + logError(fiber, errorInfo); + return getDerivedStateFromError(error); + }; + } + + var inst = fiber.stateNode; + + if (inst !== null && typeof inst.componentDidCatch === 'function') { + update.callback = function callback() { + { + markFailedErrorBoundaryForHotReloading(fiber); + } + + if (typeof getDerivedStateFromError !== 'function') { + // To preserve the preexisting retry behavior of error boundaries, + // we keep track of which ones already failed during this batch. + // This gets reset before we yield back to the browser. + // TODO: Warn in strict mode if getDerivedStateFromError is + // not defined. + markLegacyErrorBoundaryAsFailed(this); // Only log here if componentDidCatch is the only error boundary method defined + + logError(fiber, errorInfo); + } + + var error = errorInfo.value; + var stack = errorInfo.stack; + this.componentDidCatch(error, { + componentStack: stack !== null ? stack : '', + }); + + { + if (typeof getDerivedStateFromError !== 'function') { + // If componentDidCatch is the only error boundary method defined, + // then it needs to call setState to recover from errors. + // If no state update is scheduled then the boundary will swallow the error. + !(fiber.expirationTime === Sync) + ? warningWithoutStack$1( + false, + '%s: Error boundaries should implement getDerivedStateFromError(). ' + + 'In that method, return a state update to display an error message or fallback UI.', + getComponentName(fiber.type) || 'Unknown', + ) + : void 0; + } + } + }; + } else { + update.callback = function () { + markFailedErrorBoundaryForHotReloading(fiber); + }; + } + + return update; + } + + function attachPingListener(root, renderExpirationTime, thenable) { + // Attach a listener to the promise to "ping" the root and retry. But + // only if one does not already exist for the current render expiration + // time (which acts like a "thread ID" here). + var pingCache = root.pingCache; + var threadIDs; + + if (pingCache === null) { + pingCache = root.pingCache = new PossiblyWeakMap$1(); + threadIDs = new Set(); + pingCache.set(thenable, threadIDs); + } else { + threadIDs = pingCache.get(thenable); + + if (threadIDs === undefined) { + threadIDs = new Set(); + pingCache.set(thenable, threadIDs); + } + } + + if (!threadIDs.has(renderExpirationTime)) { + // Memoize using the thread ID to prevent redundant listeners. + threadIDs.add(renderExpirationTime); + var ping = pingSuspendedRoot.bind(null, root, thenable, renderExpirationTime); + thenable.then(ping, ping); + } + } + + function throwException(root, returnFiber, sourceFiber, value, renderExpirationTime) { + // The source fiber did not complete. + sourceFiber.effectTag |= Incomplete; // Its effect list is no longer valid. + + sourceFiber.firstEffect = sourceFiber.lastEffect = null; + + if (value !== null && typeof value === 'object' && typeof value.then === 'function') { + // This is a thenable. + var thenable = value; + checkForWrongSuspensePriorityInDEV(sourceFiber); + var hasInvisibleParentBoundary = hasSuspenseContext( + suspenseStackCursor.current, + InvisibleParentSuspenseContext, + ); // Schedule the nearest Suspense to re-render the timed out view. + + var _workInProgress = returnFiber; + + do { + if ( + _workInProgress.tag === SuspenseComponent && + shouldCaptureSuspense(_workInProgress, hasInvisibleParentBoundary) + ) { + // Found the nearest boundary. + // Stash the promise on the boundary fiber. If the boundary times out, we'll + // attach another listener to flip the boundary back to its normal state. + var thenables = _workInProgress.updateQueue; + + if (thenables === null) { + var updateQueue = new Set(); + updateQueue.add(thenable); + _workInProgress.updateQueue = updateQueue; + } else { + thenables.add(thenable); + } // If the boundary is outside of blocking mode, we should *not* + // suspend the commit. Pretend as if the suspended component rendered + // null and keep rendering. In the commit phase, we'll schedule a + // subsequent synchronous update to re-render the Suspense. + // + // Note: It doesn't matter whether the component that suspended was + // inside a blocking mode tree. If the Suspense is outside of it, we + // should *not* suspend the commit. + + if ((_workInProgress.mode & BlockingMode) === NoMode) { + _workInProgress.effectTag |= DidCapture; // We're going to commit this fiber even though it didn't complete. + // But we shouldn't call any lifecycle methods or callbacks. Remove + // all lifecycle effect tags. + + sourceFiber.effectTag &= ~(LifecycleEffectMask | Incomplete); + + if (sourceFiber.tag === ClassComponent) { + var currentSourceFiber = sourceFiber.alternate; + + if (currentSourceFiber === null) { + // This is a new mount. Change the tag so it's not mistaken for a + // completed class component. For example, we should not call + // componentWillUnmount if it is deleted. + sourceFiber.tag = IncompleteClassComponent; + } else { + // When we try rendering again, we should not reuse the current fiber, + // since it's known to be in an inconsistent state. Use a force update to + // prevent a bail out. + var update = createUpdate(Sync, null); + update.tag = ForceUpdate; + enqueueUpdate(sourceFiber, update); + } + } // The source fiber did not complete. Mark it with Sync priority to + // indicate that it still has pending work. + + sourceFiber.expirationTime = Sync; // Exit without suspending. + + return; + } // Confirmed that the boundary is in a concurrent mode tree. Continue + // with the normal suspend path. + // + // After this we'll use a set of heuristics to determine whether this + // render pass will run to completion or restart or "suspend" the commit. + // The actual logic for this is spread out in different places. + // + // This first principle is that if we're going to suspend when we complete + // a root, then we should also restart if we get an update or ping that + // might unsuspend it, and vice versa. The only reason to suspend is + // because you think you might want to restart before committing. However, + // it doesn't make sense to restart only while in the period we're suspended. + // + // Restarting too aggressively is also not good because it starves out any + // intermediate loading state. So we use heuristics to determine when. + // Suspense Heuristics + // + // If nothing threw a Promise or all the same fallbacks are already showing, + // then don't suspend/restart. + // + // If this is an initial render of a new tree of Suspense boundaries and + // those trigger a fallback, then don't suspend/restart. We want to ensure + // that we can show the initial loading state as quickly as possible. + // + // If we hit a "Delayed" case, such as when we'd switch from content back into + // a fallback, then we should always suspend/restart. SuspenseConfig applies to + // this case. If none is defined, JND is used instead. + // + // If we're already showing a fallback and it gets "retried", allowing us to show + // another level, but there's still an inner boundary that would show a fallback, + // then we suspend/restart for 500ms since the last time we showed a fallback + // anywhere in the tree. This effectively throttles progressive loading into a + // consistent train of commits. This also gives us an opportunity to restart to + // get to the completed state slightly earlier. + // + // If there's ambiguity due to batching it's resolved in preference of: + // 1) "delayed", 2) "initial render", 3) "retry". + // + // We want to ensure that a "busy" state doesn't get force committed. We want to + // ensure that new initial loading states can commit as soon as possible. + + attachPingListener(root, renderExpirationTime, thenable); + _workInProgress.effectTag |= ShouldCapture; + _workInProgress.expirationTime = renderExpirationTime; + return; + } // This boundary already captured during this render. Continue to the next + // boundary. + + _workInProgress = _workInProgress.return; + } while (_workInProgress !== null); // No boundary was found. Fallthrough to error mode. + // TODO: Use invariant so the message is stripped in prod? + + value = new Error( + (getComponentName(sourceFiber.type) || 'A React component') + + ' suspended while rendering, but no fallback UI was specified.\n' + + '\n' + + 'Add a <Suspense fallback=...> component higher in the tree to ' + + 'provide a loading indicator or placeholder to display.' + + getStackByFiberInDevAndProd(sourceFiber), + ); + } // We didn't find a boundary that could handle this type of exception. Start + // over and traverse parent path again, this time treating the exception + // as an error. + + renderDidError(); + value = createCapturedValue(value, sourceFiber); + var workInProgress = returnFiber; + + do { + switch (workInProgress.tag) { + case HostRoot: { + var _errorInfo = value; + workInProgress.effectTag |= ShouldCapture; + workInProgress.expirationTime = renderExpirationTime; + + var _update = createRootErrorUpdate(workInProgress, _errorInfo, renderExpirationTime); + + enqueueCapturedUpdate(workInProgress, _update); + return; + } + + case ClassComponent: + // Capture and retry + var errorInfo = value; + var ctor = workInProgress.type; + var instance = workInProgress.stateNode; + + if ( + (workInProgress.effectTag & DidCapture) === NoEffect && + (typeof ctor.getDerivedStateFromError === 'function' || + (instance !== null && + typeof instance.componentDidCatch === 'function' && + !isAlreadyFailedLegacyErrorBoundary(instance))) + ) { + workInProgress.effectTag |= ShouldCapture; + workInProgress.expirationTime = renderExpirationTime; // Schedule the error boundary to re-render using updated state + + var _update2 = createClassErrorUpdate(workInProgress, errorInfo, renderExpirationTime); + + enqueueCapturedUpdate(workInProgress, _update2); + return; + } + + break; + + default: + break; + } + + workInProgress = workInProgress.return; + } while (workInProgress !== null); + } + + var ceil = Math.ceil; + var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher; + var ReactCurrentOwner$2 = ReactSharedInternals.ReactCurrentOwner; + var IsSomeRendererActing = ReactSharedInternals.IsSomeRendererActing; + var NoContext = + /* */ + 0; + var BatchedContext = + /* */ + 1; + var EventContext = + /* */ + 2; + var DiscreteEventContext = + /* */ + 4; + var LegacyUnbatchedContext = + /* */ + 8; + var RenderContext = + /* */ + 16; + var CommitContext = + /* */ + 32; + var RootIncomplete = 0; + var RootFatalErrored = 1; + var RootErrored = 2; + var RootSuspended = 3; + var RootSuspendedWithDelay = 4; + var RootCompleted = 5; + // Describes where we are in the React execution stack + var executionContext = NoContext; // The root we're working on + + var workInProgressRoot = null; // The fiber we're working on + + var workInProgress = null; // The expiration time we're rendering + + var renderExpirationTime = NoWork; // Whether to root completed, errored, suspended, etc. + + var workInProgressRootExitStatus = RootIncomplete; // A fatal error, if one is thrown + + var workInProgressRootFatalError = null; // Most recent event time among processed updates during this render. + // This is conceptually a time stamp but expressed in terms of an ExpirationTime + // because we deal mostly with expiration times in the hot path, so this avoids + // the conversion happening in the hot path. + + var workInProgressRootLatestProcessedExpirationTime = Sync; + var workInProgressRootLatestSuspenseTimeout = Sync; + var workInProgressRootCanSuspendUsingConfig = null; // The work left over by components that were visited during this render. Only + // includes unprocessed updates, not work in bailed out children. + + var workInProgressRootNextUnprocessedUpdateTime = NoWork; // If we're pinged while rendering we don't always restart immediately. + // This flag determines if it might be worthwhile to restart if an opportunity + // happens latere. + + var workInProgressRootHasPendingPing = false; // The most recent time we committed a fallback. This lets us ensure a train + // model where we don't commit new loading states in too quick succession. + + var globalMostRecentFallbackTime = 0; + var FALLBACK_THROTTLE_MS = 500; + var nextEffect = null; + var hasUncaughtError = false; + var firstUncaughtError = null; + var legacyErrorBoundariesThatAlreadyFailed = null; + var rootDoesHavePassiveEffects = false; + var rootWithPendingPassiveEffects = null; + var pendingPassiveEffectsRenderPriority = NoPriority; + var pendingPassiveEffectsExpirationTime = NoWork; + var rootsWithPendingDiscreteUpdates = null; // Use these to prevent an infinite loop of nested updates + + var NESTED_UPDATE_LIMIT = 50; + var nestedUpdateCount = 0; + var rootWithNestedUpdates = null; + var NESTED_PASSIVE_UPDATE_LIMIT = 50; + var nestedPassiveUpdateCount = 0; + var interruptedBy = null; // Marks the need to reschedule pending interactions at these expiration times + // during the commit phase. This enables them to be traced across components + // that spawn new work during render. E.g. hidden boundaries, suspended SSR + // hydration or SuspenseList. + + var spawnedWorkDuringRender = null; // Expiration times are computed by adding to the current time (the start + // time). However, if two updates are scheduled within the same event, we + // should treat their start times as simultaneous, even if the actual clock + // time has advanced between the first and second call. + // In other words, because expiration times determine how updates are batched, + // we want all updates of like priority that occur within the same event to + // receive the same expiration time. Otherwise we get tearing. + + var currentEventTime = NoWork; + function requestCurrentTimeForUpdate() { + if ((executionContext & (RenderContext | CommitContext)) !== NoContext) { + // We're inside React, so it's fine to read the actual time. + return msToExpirationTime(now()); + } // We're not inside React, so we may be in the middle of a browser event. + + if (currentEventTime !== NoWork) { + // Use the same start time for all updates until we enter React again. + return currentEventTime; + } // This is the first update since React yielded. Compute a new start time. + + currentEventTime = msToExpirationTime(now()); + return currentEventTime; + } + function getCurrentTime() { + return msToExpirationTime(now()); + } + function computeExpirationForFiber(currentTime, fiber, suspenseConfig) { + var mode = fiber.mode; + + if ((mode & BlockingMode) === NoMode) { + return Sync; + } + + var priorityLevel = getCurrentPriorityLevel(); + + if ((mode & ConcurrentMode) === NoMode) { + return priorityLevel === ImmediatePriority ? Sync : Batched; + } + + if ((executionContext & RenderContext) !== NoContext) { + // Use whatever time we're already rendering + // TODO: Should there be a way to opt out, like with `runWithPriority`? + return renderExpirationTime; + } + + var expirationTime; + + if (suspenseConfig !== null) { + // Compute an expiration time based on the Suspense timeout. + expirationTime = computeSuspenseExpiration( + currentTime, + suspenseConfig.timeoutMs | 0 || LOW_PRIORITY_EXPIRATION, + ); + } else { + // Compute an expiration time based on the Scheduler priority. + switch (priorityLevel) { + case ImmediatePriority: + expirationTime = Sync; + break; + + case UserBlockingPriority$2: + // TODO: Rename this to computeUserBlockingExpiration + expirationTime = computeInteractiveExpiration(currentTime); + break; + + case NormalPriority: + case LowPriority: + // TODO: Handle LowPriority + // TODO: Rename this to... something better. + expirationTime = computeAsyncExpiration(currentTime); + break; + + case IdlePriority: + expirationTime = Idle; + break; + + default: { + { + throw Error('Expected a valid priority level'); + } + } + } + } // If we're in the middle of rendering a tree, do not update at the same + // expiration time that is already rendering. + // TODO: We shouldn't have to do this if the update is on a different root. + // Refactor computeExpirationForFiber + scheduleUpdate so we have access to + // the root when we check for this condition. + + if (workInProgressRoot !== null && expirationTime === renderExpirationTime) { + // This is a trick to move this update into a separate batch + expirationTime -= 1; + } + + return expirationTime; + } + function scheduleUpdateOnFiber(fiber, expirationTime) { + checkForNestedUpdates(); + warnAboutInvalidUpdatesOnClassComponentsInDEV(fiber); + var root = markUpdateTimeFromFiberToRoot(fiber, expirationTime); + + if (root === null) { + warnAboutUpdateOnUnmountedFiberInDEV(fiber); + return; + } + + checkForInterruption(fiber, expirationTime); + recordScheduleUpdate(); // TODO: computeExpirationForFiber also reads the priority. Pass the + // priority as an argument to that function and this one. + + var priorityLevel = getCurrentPriorityLevel(); + + if (expirationTime === Sync) { + if ( + // Check if we're inside unbatchedUpdates + (executionContext & LegacyUnbatchedContext) !== NoContext && // Check if we're not already rendering + (executionContext & (RenderContext | CommitContext)) === NoContext + ) { + // Register pending interactions on the root to avoid losing traced interaction data. + schedulePendingInteractions(root, expirationTime); // This is a legacy edge case. The initial mount of a ReactDOM.render-ed + // root inside of batchedUpdates should be synchronous, but layout updates + // should be deferred until the end of the batch. + + performSyncWorkOnRoot(root); + } else { + ensureRootIsScheduled(root); + schedulePendingInteractions(root, expirationTime); + + if (executionContext === NoContext) { + // Flush the synchronous work now, unless we're already working or inside + // a batch. This is intentionally inside scheduleUpdateOnFiber instead of + // scheduleCallbackForFiber to preserve the ability to schedule a callback + // without immediately flushing it. We only do this for user-initiated + // updates, to preserve historical behavior of legacy mode. + flushSyncCallbackQueue(); + } + } + } else { + ensureRootIsScheduled(root); + schedulePendingInteractions(root, expirationTime); + } + + if ( + (executionContext & DiscreteEventContext) !== NoContext && // Only updates at user-blocking priority or greater are considered + // discrete, even inside a discrete event. + (priorityLevel === UserBlockingPriority$2 || priorityLevel === ImmediatePriority) + ) { + // This is the result of a discrete event. Track the lowest priority + // discrete update per root so we can flush them early, if needed. + if (rootsWithPendingDiscreteUpdates === null) { + rootsWithPendingDiscreteUpdates = new Map([[root, expirationTime]]); + } else { + var lastDiscreteTime = rootsWithPendingDiscreteUpdates.get(root); + + if (lastDiscreteTime === undefined || lastDiscreteTime > expirationTime) { + rootsWithPendingDiscreteUpdates.set(root, expirationTime); + } + } + } + } + var scheduleWork = scheduleUpdateOnFiber; // This is split into a separate function so we can mark a fiber with pending + // work without treating it as a typical update that originates from an event; + // e.g. retrying a Suspense boundary isn't an update, but it does schedule work + // on a fiber. + + function markUpdateTimeFromFiberToRoot(fiber, expirationTime) { + // Update the source fiber's expiration time + if (fiber.expirationTime < expirationTime) { + fiber.expirationTime = expirationTime; + } + + var alternate = fiber.alternate; + + if (alternate !== null && alternate.expirationTime < expirationTime) { + alternate.expirationTime = expirationTime; + } // Walk the parent path to the root and update the child expiration time. + + var node = fiber.return; + var root = null; + + if (node === null && fiber.tag === HostRoot) { + root = fiber.stateNode; + } else { + while (node !== null) { + alternate = node.alternate; + + if (node.childExpirationTime < expirationTime) { + node.childExpirationTime = expirationTime; + + if (alternate !== null && alternate.childExpirationTime < expirationTime) { + alternate.childExpirationTime = expirationTime; + } + } else if (alternate !== null && alternate.childExpirationTime < expirationTime) { + alternate.childExpirationTime = expirationTime; + } + + if (node.return === null && node.tag === HostRoot) { + root = node.stateNode; + break; + } + + node = node.return; + } + } + + if (root !== null) { + if (workInProgressRoot === root) { + // Received an update to a tree that's in the middle of rendering. Mark + // that's unprocessed work on this root. + markUnprocessedUpdateTime(expirationTime); + + if (workInProgressRootExitStatus === RootSuspendedWithDelay) { + // The root already suspended with a delay, which means this render + // definitely won't finish. Since we have a new update, let's mark it as + // suspended now, right before marking the incoming update. This has the + // effect of interrupting the current render and switching to the update. + // TODO: This happens to work when receiving an update during the render + // phase, because of the trick inside computeExpirationForFiber to + // subtract 1 from `renderExpirationTime` to move it into a + // separate bucket. But we should probably model it with an exception, + // using the same mechanism we use to force hydration of a subtree. + // TODO: This does not account for low pri updates that were already + // scheduled before the root started rendering. Need to track the next + // pending expiration time (perhaps by backtracking the return path) and + // then trigger a restart in the `renderDidSuspendDelayIfPossible` path. + markRootSuspendedAtTime(root, renderExpirationTime); + } + } // Mark that the root has a pending update. + + markRootUpdatedAtTime(root, expirationTime); + } + + return root; + } + + function getNextRootExpirationTimeToWorkOn(root) { + // Determines the next expiration time that the root should render, taking + // into account levels that may be suspended, or levels that may have + // received a ping. + var lastExpiredTime = root.lastExpiredTime; + + if (lastExpiredTime !== NoWork) { + return lastExpiredTime; + } // "Pending" refers to any update that hasn't committed yet, including if it + // suspended. The "suspended" range is therefore a subset. + + var firstPendingTime = root.firstPendingTime; + + if (!isRootSuspendedAtTime(root, firstPendingTime)) { + // The highest priority pending time is not suspended. Let's work on that. + return firstPendingTime; + } // If the first pending time is suspended, check if there's a lower priority + // pending level that we know about. Or check if we received a ping. Work + // on whichever is higher priority. + + var lastPingedTime = root.lastPingedTime; + var nextKnownPendingLevel = root.nextKnownPendingLevel; + return lastPingedTime > nextKnownPendingLevel ? lastPingedTime : nextKnownPendingLevel; + } // Use this function to schedule a task for a root. There's only one task per + // root; if a task was already scheduled, we'll check to make sure the + // expiration time of the existing task is the same as the expiration time of + // the next level that the root has work on. This function is called on every + // update, and right before exiting a task. + + function ensureRootIsScheduled(root) { + var lastExpiredTime = root.lastExpiredTime; + + if (lastExpiredTime !== NoWork) { + // Special case: Expired work should flush synchronously. + root.callbackExpirationTime = Sync; + root.callbackPriority = ImmediatePriority; + root.callbackNode = scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root)); + return; + } + + var expirationTime = getNextRootExpirationTimeToWorkOn(root); + var existingCallbackNode = root.callbackNode; + + if (expirationTime === NoWork) { + // There's nothing to work on. + if (existingCallbackNode !== null) { + root.callbackNode = null; + root.callbackExpirationTime = NoWork; + root.callbackPriority = NoPriority; + } + + return; + } // TODO: If this is an update, we already read the current time. Pass the + // time as an argument. + + var currentTime = requestCurrentTimeForUpdate(); + var priorityLevel = inferPriorityFromExpirationTime(currentTime, expirationTime); // If there's an existing render task, confirm it has the correct priority and + // expiration time. Otherwise, we'll cancel it and schedule a new one. + + if (existingCallbackNode !== null) { + var existingCallbackPriority = root.callbackPriority; + var existingCallbackExpirationTime = root.callbackExpirationTime; + + if ( + // Callback must have the exact same expiration time. + existingCallbackExpirationTime === expirationTime && // Callback must have greater or equal priority. + existingCallbackPriority >= priorityLevel + ) { + // Existing callback is sufficient. + return; + } // Need to schedule a new task. + // TODO: Instead of scheduling a new task, we should be able to change the + // priority of the existing one. + + cancelCallback(existingCallbackNode); + } + + root.callbackExpirationTime = expirationTime; + root.callbackPriority = priorityLevel; + var callbackNode; + + if (expirationTime === Sync) { + // Sync React callbacks are scheduled on a special internal queue + callbackNode = scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root)); + } else if (disableSchedulerTimeoutBasedOnReactExpirationTime) { + callbackNode = scheduleCallback(priorityLevel, performConcurrentWorkOnRoot.bind(null, root)); + } else { + callbackNode = scheduleCallback( + priorityLevel, + performConcurrentWorkOnRoot.bind(null, root), // Compute a task timeout based on the expiration time. This also affects + // ordering because tasks are processed in timeout order. + { + timeout: expirationTimeToMs(expirationTime) - now(), + }, + ); + } + + root.callbackNode = callbackNode; + } // This is the entry point for every concurrent task, i.e. anything that + // goes through Scheduler. + + function performConcurrentWorkOnRoot(root, didTimeout) { + // Since we know we're in a React event, we can clear the current + // event time. The next update will compute a new event time. + currentEventTime = NoWork; + + if (didTimeout) { + // The render task took too long to complete. Mark the current time as + // expired to synchronously render all expired work in a single batch. + var currentTime = requestCurrentTimeForUpdate(); + markRootExpiredAtTime(root, currentTime); // This will schedule a synchronous callback. + + ensureRootIsScheduled(root); + return null; + } // Determine the next expiration time to work on, using the fields stored + // on the root. + + var expirationTime = getNextRootExpirationTimeToWorkOn(root); + + if (expirationTime !== NoWork) { + var originalCallbackNode = root.callbackNode; + + if (!((executionContext & (RenderContext | CommitContext)) === NoContext)) { + { + throw Error('Should not already be working.'); + } + } + + flushPassiveEffects(); // If the root or expiration time have changed, throw out the existing stack + // and prepare a fresh one. Otherwise we'll continue where we left off. + + if (root !== workInProgressRoot || expirationTime !== renderExpirationTime) { + prepareFreshStack(root, expirationTime); + startWorkOnPendingInteractions(root, expirationTime); + } // If we have a work-in-progress fiber, it means there's still work to do + // in this root. + + if (workInProgress !== null) { + var prevExecutionContext = executionContext; + executionContext |= RenderContext; + var prevDispatcher = pushDispatcher(root); + var prevInteractions = pushInteractions(root); + startWorkLoopTimer(workInProgress); + + do { + try { + workLoopConcurrent(); + break; + } catch (thrownValue) { + handleError(root, thrownValue); + } + } while (true); + + resetContextDependencies(); + executionContext = prevExecutionContext; + popDispatcher(prevDispatcher); + + if (enableSchedulerTracing) { + popInteractions(prevInteractions); + } + + if (workInProgressRootExitStatus === RootFatalErrored) { + var fatalError = workInProgressRootFatalError; + stopInterruptedWorkLoopTimer(); + prepareFreshStack(root, expirationTime); + markRootSuspendedAtTime(root, expirationTime); + ensureRootIsScheduled(root); + throw fatalError; + } + + if (workInProgress !== null) { + // There's still work left over. Exit without committing. + stopInterruptedWorkLoopTimer(); + } else { + // We now have a consistent tree. The next step is either to commit it, + // or, if something suspended, wait to commit it after a timeout. + stopFinishedWorkLoopTimer(); + var finishedWork = (root.finishedWork = root.current.alternate); + root.finishedExpirationTime = expirationTime; + finishConcurrentRender(root, finishedWork, workInProgressRootExitStatus, expirationTime); + } + + ensureRootIsScheduled(root); + + if (root.callbackNode === originalCallbackNode) { + // The task node scheduled for this root is the same one that's + // currently executed. Need to return a continuation. + return performConcurrentWorkOnRoot.bind(null, root); + } + } + } + + return null; + } + + function finishConcurrentRender(root, finishedWork, exitStatus, expirationTime) { + // Set this to null to indicate there's no in-progress render. + workInProgressRoot = null; + + switch (exitStatus) { + case RootIncomplete: + case RootFatalErrored: { + { + { + throw Error('Root did not complete. This is a bug in React.'); + } + } + } + // Flow knows about invariant, so it complains if I add a break + // statement, but eslint doesn't know about invariant, so it complains + // if I do. eslint-disable-next-line no-fallthrough + + case RootErrored: { + // If this was an async render, the error may have happened due to + // a mutation in a concurrent event. Try rendering one more time, + // synchronously, to see if the error goes away. If there are + // lower priority updates, let's include those, too, in case they + // fix the inconsistency. Render at Idle to include all updates. + // If it was Idle or Never or some not-yet-invented time, render + // at that time. + markRootExpiredAtTime(root, expirationTime > Idle ? Idle : expirationTime); // We assume that this second render pass will be synchronous + // and therefore not hit this path again. + + break; + } + + case RootSuspended: { + markRootSuspendedAtTime(root, expirationTime); + var lastSuspendedTime = root.lastSuspendedTime; + + if (expirationTime === lastSuspendedTime) { + root.nextKnownPendingLevel = getRemainingExpirationTime(finishedWork); + } + + flushSuspensePriorityWarningInDEV(); // We have an acceptable loading state. We need to figure out if we + // should immediately commit it or wait a bit. + // If we have processed new updates during this render, we may now + // have a new loading state ready. We want to ensure that we commit + // that as soon as possible. + + var hasNotProcessedNewUpdates = workInProgressRootLatestProcessedExpirationTime === Sync; + + if ( + hasNotProcessedNewUpdates && // do not delay if we're inside an act() scope + !(true && flushSuspenseFallbacksInTests && IsThisRendererActing.current) + ) { + // If we have not processed any new updates during this pass, then + // this is either a retry of an existing fallback state or a + // hidden tree. Hidden trees shouldn't be batched with other work + // and after that's fixed it can only be a retry. We're going to + // throttle committing retries so that we don't show too many + // loading states too quickly. + var msUntilTimeout = globalMostRecentFallbackTime + FALLBACK_THROTTLE_MS - now(); // Don't bother with a very short suspense time. + + if (msUntilTimeout > 10) { + if (workInProgressRootHasPendingPing) { + var lastPingedTime = root.lastPingedTime; + + if (lastPingedTime === NoWork || lastPingedTime >= expirationTime) { + // This render was pinged but we didn't get to restart + // earlier so try restarting now instead. + root.lastPingedTime = expirationTime; + prepareFreshStack(root, expirationTime); + break; + } + } + + var nextTime = getNextRootExpirationTimeToWorkOn(root); + + if (nextTime !== NoWork && nextTime !== expirationTime) { + // There's additional work on this root. + break; + } + + if (lastSuspendedTime !== NoWork && lastSuspendedTime !== expirationTime) { + // We should prefer to render the fallback of at the last + // suspended level. Ping the last suspended level to try + // rendering it again. + root.lastPingedTime = lastSuspendedTime; + break; + } // The render is suspended, it hasn't timed out, and there's no + // lower priority work to do. Instead of committing the fallback + // immediately, wait for more data to arrive. + + root.timeoutHandle = scheduleTimeout(commitRoot.bind(null, root), msUntilTimeout); + break; + } + } // The work expired. Commit immediately. + + commitRoot(root); + break; + } + + case RootSuspendedWithDelay: { + markRootSuspendedAtTime(root, expirationTime); + var _lastSuspendedTime = root.lastSuspendedTime; + + if (expirationTime === _lastSuspendedTime) { + root.nextKnownPendingLevel = getRemainingExpirationTime(finishedWork); + } + + flushSuspensePriorityWarningInDEV(); + + if ( + // do not delay if we're inside an act() scope + !(true && flushSuspenseFallbacksInTests && IsThisRendererActing.current) + ) { + // We're suspended in a state that should be avoided. We'll try to + // avoid committing it for as long as the timeouts let us. + if (workInProgressRootHasPendingPing) { + var _lastPingedTime = root.lastPingedTime; + + if (_lastPingedTime === NoWork || _lastPingedTime >= expirationTime) { + // This render was pinged but we didn't get to restart earlier + // so try restarting now instead. + root.lastPingedTime = expirationTime; + prepareFreshStack(root, expirationTime); + break; + } + } + + var _nextTime = getNextRootExpirationTimeToWorkOn(root); + + if (_nextTime !== NoWork && _nextTime !== expirationTime) { + // There's additional work on this root. + break; + } + + if (_lastSuspendedTime !== NoWork && _lastSuspendedTime !== expirationTime) { + // We should prefer to render the fallback of at the last + // suspended level. Ping the last suspended level to try + // rendering it again. + root.lastPingedTime = _lastSuspendedTime; + break; + } + + var _msUntilTimeout; + + if (workInProgressRootLatestSuspenseTimeout !== Sync) { + // We have processed a suspense config whose expiration time we + // can use as the timeout. + _msUntilTimeout = expirationTimeToMs(workInProgressRootLatestSuspenseTimeout) - now(); + } else if (workInProgressRootLatestProcessedExpirationTime === Sync) { + // This should never normally happen because only new updates + // cause delayed states, so we should have processed something. + // However, this could also happen in an offscreen tree. + _msUntilTimeout = 0; + } else { + // If we don't have a suspense config, we're going to use a + // heuristic to determine how long we can suspend. + var eventTimeMs = inferTimeFromExpirationTime( + workInProgressRootLatestProcessedExpirationTime, + ); + var currentTimeMs = now(); + var timeUntilExpirationMs = expirationTimeToMs(expirationTime) - currentTimeMs; + var timeElapsed = currentTimeMs - eventTimeMs; + + if (timeElapsed < 0) { + // We get this wrong some time since we estimate the time. + timeElapsed = 0; + } + + _msUntilTimeout = jnd(timeElapsed) - timeElapsed; // Clamp the timeout to the expiration time. TODO: Once the + // event time is exact instead of inferred from expiration time + // we don't need this. + + if (timeUntilExpirationMs < _msUntilTimeout) { + _msUntilTimeout = timeUntilExpirationMs; + } + } // Don't bother with a very short suspense time. + + if (_msUntilTimeout > 10) { + // The render is suspended, it hasn't timed out, and there's no + // lower priority work to do. Instead of committing the fallback + // immediately, wait for more data to arrive. + root.timeoutHandle = scheduleTimeout(commitRoot.bind(null, root), _msUntilTimeout); + break; + } + } // The work expired. Commit immediately. + + commitRoot(root); + break; + } + + case RootCompleted: { + // The work completed. Ready to commit. + if ( + // do not delay if we're inside an act() scope + !(true && flushSuspenseFallbacksInTests && IsThisRendererActing.current) && + workInProgressRootLatestProcessedExpirationTime !== Sync && + workInProgressRootCanSuspendUsingConfig !== null + ) { + // If we have exceeded the minimum loading delay, which probably + // means we have shown a spinner already, we might have to suspend + // a bit longer to ensure that the spinner is shown for + // enough time. + var _msUntilTimeout2 = computeMsUntilSuspenseLoadingDelay( + workInProgressRootLatestProcessedExpirationTime, + expirationTime, + workInProgressRootCanSuspendUsingConfig, + ); + + if (_msUntilTimeout2 > 10) { + markRootSuspendedAtTime(root, expirationTime); + root.timeoutHandle = scheduleTimeout(commitRoot.bind(null, root), _msUntilTimeout2); + break; + } + } + + commitRoot(root); + break; + } + + default: { + { + { + throw Error('Unknown root exit status.'); + } + } + } + } + } // This is the entry point for synchronous tasks that don't go + // through Scheduler + + function performSyncWorkOnRoot(root) { + // Check if there's expired work on this root. Otherwise, render at Sync. + var lastExpiredTime = root.lastExpiredTime; + var expirationTime = lastExpiredTime !== NoWork ? lastExpiredTime : Sync; + + if (root.finishedExpirationTime === expirationTime) { + // There's already a pending commit at this expiration time. + // TODO: This is poorly factored. This case only exists for the + // batch.commit() API. + commitRoot(root); + } else { + if (!((executionContext & (RenderContext | CommitContext)) === NoContext)) { + { + throw Error('Should not already be working.'); + } + } + + flushPassiveEffects(); // If the root or expiration time have changed, throw out the existing stack + // and prepare a fresh one. Otherwise we'll continue where we left off. + + if (root !== workInProgressRoot || expirationTime !== renderExpirationTime) { + prepareFreshStack(root, expirationTime); + startWorkOnPendingInteractions(root, expirationTime); + } // If we have a work-in-progress fiber, it means there's still work to do + // in this root. + + if (workInProgress !== null) { + var prevExecutionContext = executionContext; + executionContext |= RenderContext; + var prevDispatcher = pushDispatcher(root); + var prevInteractions = pushInteractions(root); + startWorkLoopTimer(workInProgress); + + do { + try { + workLoopSync(); + break; + } catch (thrownValue) { + handleError(root, thrownValue); + } + } while (true); + + resetContextDependencies(); + executionContext = prevExecutionContext; + popDispatcher(prevDispatcher); + + if (enableSchedulerTracing) { + popInteractions(prevInteractions); + } + + if (workInProgressRootExitStatus === RootFatalErrored) { + var fatalError = workInProgressRootFatalError; + stopInterruptedWorkLoopTimer(); + prepareFreshStack(root, expirationTime); + markRootSuspendedAtTime(root, expirationTime); + ensureRootIsScheduled(root); + throw fatalError; + } + + if (workInProgress !== null) { + // This is a sync render, so we should have finished the whole tree. + { + { + throw Error( + 'Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } + } else { + // We now have a consistent tree. Because this is a sync render, we + // will commit it even if something suspended. + stopFinishedWorkLoopTimer(); + root.finishedWork = root.current.alternate; + root.finishedExpirationTime = expirationTime; + finishSyncRender(root, workInProgressRootExitStatus, expirationTime); + } // Before exiting, make sure there's a callback scheduled for the next + // pending level. + + ensureRootIsScheduled(root); + } + } + + return null; + } + + function finishSyncRender(root, exitStatus, expirationTime) { + // Set this to null to indicate there's no in-progress render. + workInProgressRoot = null; + + { + if (exitStatus === RootSuspended || exitStatus === RootSuspendedWithDelay) { + flushSuspensePriorityWarningInDEV(); + } + } + + commitRoot(root); + } + + function flushRoot(root, expirationTime) { + markRootExpiredAtTime(root, expirationTime); + ensureRootIsScheduled(root); + + if ((executionContext & (RenderContext | CommitContext)) === NoContext) { + flushSyncCallbackQueue(); + } + } + function flushDiscreteUpdates() { + // TODO: Should be able to flush inside batchedUpdates, but not inside `act`. + // However, `act` uses `batchedUpdates`, so there's no way to distinguish + // those two cases. Need to fix this before exposing flushDiscreteUpdates + // as a public API. + if ((executionContext & (BatchedContext | RenderContext | CommitContext)) !== NoContext) { + if (true && (executionContext & RenderContext) !== NoContext) { + warning$1( + false, + 'unstable_flushDiscreteUpdates: Cannot flush updates when React is ' + 'already rendering.', + ); + } // We're already rendering, so we can't synchronously flush pending work. + // This is probably a nested event dispatch triggered by a lifecycle/effect, + // like `el.focus()`. Exit. + + return; + } + + flushPendingDiscreteUpdates(); // If the discrete updates scheduled passive effects, flush them now so that + // they fire before the next serial event. + + flushPassiveEffects(); + } + + function syncUpdates(fn, a, b, c) { + return runWithPriority$2(ImmediatePriority, fn.bind(null, a, b, c)); + } + + function flushPendingDiscreteUpdates() { + if (rootsWithPendingDiscreteUpdates !== null) { + // For each root with pending discrete updates, schedule a callback to + // immediately flush them. + var roots = rootsWithPendingDiscreteUpdates; + rootsWithPendingDiscreteUpdates = null; + roots.forEach(function (expirationTime, root) { + markRootExpiredAtTime(root, expirationTime); + ensureRootIsScheduled(root); + }); // Now flush the immediate queue. + + flushSyncCallbackQueue(); + } + } + + function batchedUpdates$1(fn, a) { + var prevExecutionContext = executionContext; + executionContext |= BatchedContext; + + try { + return fn(a); + } finally { + executionContext = prevExecutionContext; + + if (executionContext === NoContext) { + // Flush the immediate callbacks that were scheduled during this batch + flushSyncCallbackQueue(); + } + } + } + function batchedEventUpdates$1(fn, a) { + var prevExecutionContext = executionContext; + executionContext |= EventContext; + + try { + return fn(a); + } finally { + executionContext = prevExecutionContext; + + if (executionContext === NoContext) { + // Flush the immediate callbacks that were scheduled during this batch + flushSyncCallbackQueue(); + } + } + } + function discreteUpdates$1(fn, a, b, c) { + var prevExecutionContext = executionContext; + executionContext |= DiscreteEventContext; + + try { + // Should this + return runWithPriority$2(UserBlockingPriority$2, fn.bind(null, a, b, c)); + } finally { + executionContext = prevExecutionContext; + + if (executionContext === NoContext) { + // Flush the immediate callbacks that were scheduled during this batch + flushSyncCallbackQueue(); + } + } + } + function unbatchedUpdates(fn, a) { + var prevExecutionContext = executionContext; + executionContext &= ~BatchedContext; + executionContext |= LegacyUnbatchedContext; + + try { + return fn(a); + } finally { + executionContext = prevExecutionContext; + + if (executionContext === NoContext) { + // Flush the immediate callbacks that were scheduled during this batch + flushSyncCallbackQueue(); + } + } + } + function flushSync(fn, a) { + if ((executionContext & (RenderContext | CommitContext)) !== NoContext) { + { + { + throw Error( + 'flushSync was called from inside a lifecycle method. It cannot be called when React is already rendering.', + ); + } + } + } + + var prevExecutionContext = executionContext; + executionContext |= BatchedContext; + + try { + return runWithPriority$2(ImmediatePriority, fn.bind(null, a)); + } finally { + executionContext = prevExecutionContext; // Flush the immediate callbacks that were scheduled during this batch. + // Note that this will happen even if batchedUpdates is higher up + // the stack. + + flushSyncCallbackQueue(); + } + } + function flushControlled(fn) { + var prevExecutionContext = executionContext; + executionContext |= BatchedContext; + + try { + runWithPriority$2(ImmediatePriority, fn); + } finally { + executionContext = prevExecutionContext; + + if (executionContext === NoContext) { + // Flush the immediate callbacks that were scheduled during this batch + flushSyncCallbackQueue(); + } + } + } + + function prepareFreshStack(root, expirationTime) { + root.finishedWork = null; + root.finishedExpirationTime = NoWork; + var timeoutHandle = root.timeoutHandle; + + if (timeoutHandle !== noTimeout) { + // The root previous suspended and scheduled a timeout to commit a fallback + // state. Now that we have additional work, cancel the timeout. + root.timeoutHandle = noTimeout; // $FlowFixMe Complains noTimeout is not a TimeoutID, despite the check above + + cancelTimeout(timeoutHandle); + } + + if (workInProgress !== null) { + var interruptedWork = workInProgress.return; + + while (interruptedWork !== null) { + unwindInterruptedWork(interruptedWork); + interruptedWork = interruptedWork.return; + } + } + + workInProgressRoot = root; + workInProgress = createWorkInProgress(root.current, null, expirationTime); + renderExpirationTime = expirationTime; + workInProgressRootExitStatus = RootIncomplete; + workInProgressRootFatalError = null; + workInProgressRootLatestProcessedExpirationTime = Sync; + workInProgressRootLatestSuspenseTimeout = Sync; + workInProgressRootCanSuspendUsingConfig = null; + workInProgressRootNextUnprocessedUpdateTime = NoWork; + workInProgressRootHasPendingPing = false; + + if (enableSchedulerTracing) { + spawnedWorkDuringRender = null; + } + + { + ReactStrictModeWarnings.discardPendingWarnings(); + componentsThatTriggeredHighPriSuspend = null; + } + } + + function handleError(root, thrownValue) { + do { + try { + // Reset module-level state that was set during the render phase. + resetContextDependencies(); + resetHooks(); + resetCurrentFiber(); + + if (workInProgress === null || workInProgress.return === null) { + // Expected to be working on a non-root fiber. This is a fatal error + // because there's no ancestor that can handle it; the root is + // supposed to capture all errors that weren't caught by an error + // boundary. + workInProgressRootExitStatus = RootFatalErrored; + workInProgressRootFatalError = thrownValue; + return null; + } + + if (enableProfilerTimer && workInProgress.mode & ProfileMode) { + // Record the time spent rendering before an error was thrown. This + // avoids inaccurate Profiler durations in the case of a + // suspended render. + stopProfilerTimerIfRunningAndRecordDelta(workInProgress, true); + } + + throwException( + root, + workInProgress.return, + workInProgress, + thrownValue, + renderExpirationTime, + ); + workInProgress = completeUnitOfWork(workInProgress); + } catch (yetAnotherThrownValue) { + // Something in the return path also threw. + thrownValue = yetAnotherThrownValue; + continue; + } // Return to the normal work loop. + + return; + } while (true); + } + + function pushDispatcher(root) { + var prevDispatcher = ReactCurrentDispatcher.current; + ReactCurrentDispatcher.current = ContextOnlyDispatcher; + + if (prevDispatcher === null) { + // The React isomorphic package does not include a default dispatcher. + // Instead the first renderer will lazily attach one, in order to give + // nicer error messages. + return ContextOnlyDispatcher; + } else { + return prevDispatcher; + } + } + + function popDispatcher(prevDispatcher) { + ReactCurrentDispatcher.current = prevDispatcher; + } + + function pushInteractions(root) { + if (enableSchedulerTracing) { + var prevInteractions = tracing.__interactionsRef.current; + tracing.__interactionsRef.current = root.memoizedInteractions; + return prevInteractions; + } + + return null; + } + + function popInteractions(prevInteractions) { + if (enableSchedulerTracing) { + tracing.__interactionsRef.current = prevInteractions; + } + } + + function markCommitTimeOfFallback() { + globalMostRecentFallbackTime = now(); + } + function markRenderEventTimeAndConfig(expirationTime, suspenseConfig) { + if (expirationTime < workInProgressRootLatestProcessedExpirationTime && expirationTime > Idle) { + workInProgressRootLatestProcessedExpirationTime = expirationTime; + } + + if (suspenseConfig !== null) { + if (expirationTime < workInProgressRootLatestSuspenseTimeout && expirationTime > Idle) { + workInProgressRootLatestSuspenseTimeout = expirationTime; // Most of the time we only have one config and getting wrong is not bad. + + workInProgressRootCanSuspendUsingConfig = suspenseConfig; + } + } + } + function markUnprocessedUpdateTime(expirationTime) { + if (expirationTime > workInProgressRootNextUnprocessedUpdateTime) { + workInProgressRootNextUnprocessedUpdateTime = expirationTime; + } + } + function renderDidSuspend() { + if (workInProgressRootExitStatus === RootIncomplete) { + workInProgressRootExitStatus = RootSuspended; + } + } + function renderDidSuspendDelayIfPossible() { + if ( + workInProgressRootExitStatus === RootIncomplete || + workInProgressRootExitStatus === RootSuspended + ) { + workInProgressRootExitStatus = RootSuspendedWithDelay; + } // Check if there's a lower priority update somewhere else in the tree. + + if (workInProgressRootNextUnprocessedUpdateTime !== NoWork && workInProgressRoot !== null) { + // Mark the current render as suspended, and then mark that there's a + // pending update. + // TODO: This should immediately interrupt the current render, instead + // of waiting until the next time we yield. + markRootSuspendedAtTime(workInProgressRoot, renderExpirationTime); + markRootUpdatedAtTime(workInProgressRoot, workInProgressRootNextUnprocessedUpdateTime); + } + } + function renderDidError() { + if (workInProgressRootExitStatus !== RootCompleted) { + workInProgressRootExitStatus = RootErrored; + } + } // Called during render to determine if anything has suspended. + // Returns false if we're not sure. + + function renderHasNotSuspendedYet() { + // If something errored or completed, we can't really be sure, + // so those are false. + return workInProgressRootExitStatus === RootIncomplete; + } + + function inferTimeFromExpirationTime(expirationTime) { + // We don't know exactly when the update was scheduled, but we can infer an + // approximate start time from the expiration time. + var earliestExpirationTimeMs = expirationTimeToMs(expirationTime); + return earliestExpirationTimeMs - LOW_PRIORITY_EXPIRATION; + } + + function inferTimeFromExpirationTimeWithSuspenseConfig(expirationTime, suspenseConfig) { + // We don't know exactly when the update was scheduled, but we can infer an + // approximate start time from the expiration time by subtracting the timeout + // that was added to the event time. + var earliestExpirationTimeMs = expirationTimeToMs(expirationTime); + return earliestExpirationTimeMs - (suspenseConfig.timeoutMs | 0 || LOW_PRIORITY_EXPIRATION); + } // The work loop is an extremely hot path. Tell Closure not to inline it. + + /** @noinline */ + + function workLoopSync() { + // Already timed out, so perform work without checking if we need to yield. + while (workInProgress !== null) { + workInProgress = performUnitOfWork(workInProgress); + } + } + /** @noinline */ + + function workLoopConcurrent() { + // Perform work until Scheduler asks us to yield + while (workInProgress !== null && !shouldYield()) { + workInProgress = performUnitOfWork(workInProgress); + } + } + + function performUnitOfWork(unitOfWork) { + // The current, flushed, state of this fiber is the alternate. Ideally + // nothing should rely on this, but relying on it here means that we don't + // need an additional field on the work in progress. + var current$$1 = unitOfWork.alternate; + startWorkTimer(unitOfWork); + setCurrentFiber(unitOfWork); + var next; + + if (enableProfilerTimer && (unitOfWork.mode & ProfileMode) !== NoMode) { + startProfilerTimer(unitOfWork); + next = beginWork$$1(current$$1, unitOfWork, renderExpirationTime); + stopProfilerTimerIfRunningAndRecordDelta(unitOfWork, true); + } else { + next = beginWork$$1(current$$1, unitOfWork, renderExpirationTime); + } + + resetCurrentFiber(); + unitOfWork.memoizedProps = unitOfWork.pendingProps; + + if (next === null) { + // If this doesn't spawn new work, complete the current work. + next = completeUnitOfWork(unitOfWork); + } + + ReactCurrentOwner$2.current = null; + return next; + } + + function completeUnitOfWork(unitOfWork) { + // Attempt to complete the current unit of work, then move to the next + // sibling. If there are no more siblings, return to the parent fiber. + workInProgress = unitOfWork; + + do { + // The current, flushed, state of this fiber is the alternate. Ideally + // nothing should rely on this, but relying on it here means that we don't + // need an additional field on the work in progress. + var current$$1 = workInProgress.alternate; + var returnFiber = workInProgress.return; // Check if the work completed or if something threw. + + if ((workInProgress.effectTag & Incomplete) === NoEffect) { + setCurrentFiber(workInProgress); + var next = void 0; + + if (!enableProfilerTimer || (workInProgress.mode & ProfileMode) === NoMode) { + next = completeWork(current$$1, workInProgress, renderExpirationTime); + } else { + startProfilerTimer(workInProgress); + next = completeWork(current$$1, workInProgress, renderExpirationTime); // Update render duration assuming we didn't error. + + stopProfilerTimerIfRunningAndRecordDelta(workInProgress, false); + } + + stopWorkTimer(workInProgress); + resetCurrentFiber(); + resetChildExpirationTime(workInProgress); + + if (next !== null) { + // Completing this fiber spawned new work. Work on that next. + return next; + } + + if ( + returnFiber !== null && // Do not append effects to parents if a sibling failed to complete + (returnFiber.effectTag & Incomplete) === NoEffect + ) { + // Append all the effects of the subtree and this fiber onto the effect + // list of the parent. The completion order of the children affects the + // side-effect order. + if (returnFiber.firstEffect === null) { + returnFiber.firstEffect = workInProgress.firstEffect; + } + + if (workInProgress.lastEffect !== null) { + if (returnFiber.lastEffect !== null) { + returnFiber.lastEffect.nextEffect = workInProgress.firstEffect; + } + + returnFiber.lastEffect = workInProgress.lastEffect; + } // If this fiber had side-effects, we append it AFTER the children's + // side-effects. We can perform certain side-effects earlier if needed, + // by doing multiple passes over the effect list. We don't want to + // schedule our own side-effect on our own list because if end up + // reusing children we'll schedule this effect onto itself since we're + // at the end. + + var effectTag = workInProgress.effectTag; // Skip both NoWork and PerformedWork tags when creating the effect + // list. PerformedWork effect is read by React DevTools but shouldn't be + // committed. + + if (effectTag > PerformedWork) { + if (returnFiber.lastEffect !== null) { + returnFiber.lastEffect.nextEffect = workInProgress; + } else { + returnFiber.firstEffect = workInProgress; + } + + returnFiber.lastEffect = workInProgress; + } + } + } else { + // This fiber did not complete because something threw. Pop values off + // the stack without entering the complete phase. If this is a boundary, + // capture values if possible. + var _next = unwindWork(workInProgress, renderExpirationTime); // Because this fiber did not complete, don't reset its expiration time. + + if (enableProfilerTimer && (workInProgress.mode & ProfileMode) !== NoMode) { + // Record the render duration for the fiber that errored. + stopProfilerTimerIfRunningAndRecordDelta(workInProgress, false); // Include the time spent working on failed children before continuing. + + var actualDuration = workInProgress.actualDuration; + var child = workInProgress.child; + + while (child !== null) { + actualDuration += child.actualDuration; + child = child.sibling; + } + + workInProgress.actualDuration = actualDuration; + } + + if (_next !== null) { + // If completing this work spawned new work, do that next. We'll come + // back here again. + // Since we're restarting, remove anything that is not a host effect + // from the effect tag. + // TODO: The name stopFailedWorkTimer is misleading because Suspense + // also captures and restarts. + stopFailedWorkTimer(workInProgress); + _next.effectTag &= HostEffectMask; + return _next; + } + + stopWorkTimer(workInProgress); + + if (returnFiber !== null) { + // Mark the parent fiber as incomplete and clear its effect list. + returnFiber.firstEffect = returnFiber.lastEffect = null; + returnFiber.effectTag |= Incomplete; + } + } + + var siblingFiber = workInProgress.sibling; + + if (siblingFiber !== null) { + // If there is more work to do in this returnFiber, do that next. + return siblingFiber; + } // Otherwise, return to the parent + + workInProgress = returnFiber; + } while (workInProgress !== null); // We've reached the root. + + if (workInProgressRootExitStatus === RootIncomplete) { + workInProgressRootExitStatus = RootCompleted; + } + + return null; + } + + function getRemainingExpirationTime(fiber) { + var updateExpirationTime = fiber.expirationTime; + var childExpirationTime = fiber.childExpirationTime; + return updateExpirationTime > childExpirationTime ? updateExpirationTime : childExpirationTime; + } + + function resetChildExpirationTime(completedWork) { + if (renderExpirationTime !== Never && completedWork.childExpirationTime === Never) { + // The children of this component are hidden. Don't bubble their + // expiration times. + return; + } + + var newChildExpirationTime = NoWork; // Bubble up the earliest expiration time. + + if (enableProfilerTimer && (completedWork.mode & ProfileMode) !== NoMode) { + // In profiling mode, resetChildExpirationTime is also used to reset + // profiler durations. + var actualDuration = completedWork.actualDuration; + var treeBaseDuration = completedWork.selfBaseDuration; // When a fiber is cloned, its actualDuration is reset to 0. This value will + // only be updated if work is done on the fiber (i.e. it doesn't bailout). + // When work is done, it should bubble to the parent's actualDuration. If + // the fiber has not been cloned though, (meaning no work was done), then + // this value will reflect the amount of time spent working on a previous + // render. In that case it should not bubble. We determine whether it was + // cloned by comparing the child pointer. + + var shouldBubbleActualDurations = + completedWork.alternate === null || completedWork.child !== completedWork.alternate.child; + var child = completedWork.child; + + while (child !== null) { + var childUpdateExpirationTime = child.expirationTime; + var childChildExpirationTime = child.childExpirationTime; + + if (childUpdateExpirationTime > newChildExpirationTime) { + newChildExpirationTime = childUpdateExpirationTime; + } + + if (childChildExpirationTime > newChildExpirationTime) { + newChildExpirationTime = childChildExpirationTime; + } + + if (shouldBubbleActualDurations) { + actualDuration += child.actualDuration; + } + + treeBaseDuration += child.treeBaseDuration; + child = child.sibling; + } + + completedWork.actualDuration = actualDuration; + completedWork.treeBaseDuration = treeBaseDuration; + } else { + var _child = completedWork.child; + + while (_child !== null) { + var _childUpdateExpirationTime = _child.expirationTime; + var _childChildExpirationTime = _child.childExpirationTime; + + if (_childUpdateExpirationTime > newChildExpirationTime) { + newChildExpirationTime = _childUpdateExpirationTime; + } + + if (_childChildExpirationTime > newChildExpirationTime) { + newChildExpirationTime = _childChildExpirationTime; + } + + _child = _child.sibling; + } + } + + completedWork.childExpirationTime = newChildExpirationTime; + } + + function commitRoot(root) { + var renderPriorityLevel = getCurrentPriorityLevel(); + runWithPriority$2(ImmediatePriority, commitRootImpl.bind(null, root, renderPriorityLevel)); + return null; + } + + function commitRootImpl(root, renderPriorityLevel) { + do { + // `flushPassiveEffects` will call `flushSyncUpdateQueue` at the end, which + // means `flushPassiveEffects` will sometimes result in additional + // passive effects. So we need to keep flushing in a loop until there are + // no more pending effects. + // TODO: Might be better if `flushPassiveEffects` did not automatically + // flush synchronous work at the end, to avoid factoring hazards like this. + flushPassiveEffects(); + } while (rootWithPendingPassiveEffects !== null); + + flushRenderPhaseStrictModeWarningsInDEV(); + + if (!((executionContext & (RenderContext | CommitContext)) === NoContext)) { + { + throw Error('Should not already be working.'); + } + } + + var finishedWork = root.finishedWork; + var expirationTime = root.finishedExpirationTime; + + if (finishedWork === null) { + return null; + } + + root.finishedWork = null; + root.finishedExpirationTime = NoWork; + + if (!(finishedWork !== root.current)) { + { + throw Error( + 'Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue.', + ); + } + } // commitRoot never returns a continuation; it always finishes synchronously. + // So we can clear these now to allow a new callback to be scheduled. + + root.callbackNode = null; + root.callbackExpirationTime = NoWork; + root.callbackPriority = NoPriority; + root.nextKnownPendingLevel = NoWork; + startCommitTimer(); // Update the first and last pending times on this root. The new first + // pending time is whatever is left on the root fiber. + + var remainingExpirationTimeBeforeCommit = getRemainingExpirationTime(finishedWork); + markRootFinishedAtTime(root, expirationTime, remainingExpirationTimeBeforeCommit); + + if (root === workInProgressRoot) { + // We can reset these now that they are finished. + workInProgressRoot = null; + workInProgress = null; + renderExpirationTime = NoWork; + } else { + } // This indicates that the last root we worked on is not the same one that + // we're committing now. This most commonly happens when a suspended root + // times out. + // Get the list of effects. + + var firstEffect; + + if (finishedWork.effectTag > PerformedWork) { + // A fiber's effect list consists only of its children, not itself. So if + // the root has an effect, we need to add it to the end of the list. The + // resulting list is the set that would belong to the root's parent, if it + // had one; that is, all the effects in the tree including the root. + if (finishedWork.lastEffect !== null) { + finishedWork.lastEffect.nextEffect = finishedWork; + firstEffect = finishedWork.firstEffect; + } else { + firstEffect = finishedWork; + } + } else { + // There is no effect on the root. + firstEffect = finishedWork.firstEffect; + } + + if (firstEffect !== null) { + var prevExecutionContext = executionContext; + executionContext |= CommitContext; + var prevInteractions = pushInteractions(root); // Reset this to null before calling lifecycles + + ReactCurrentOwner$2.current = null; // The commit phase is broken into several sub-phases. We do a separate pass + // of the effect list for each phase: all mutation effects come before all + // layout effects, and so on. + // The first phase a "before mutation" phase. We use this phase to read the + // state of the host tree right before we mutate it. This is where + // getSnapshotBeforeUpdate is called. + + startCommitSnapshotEffectsTimer(); + prepareForCommit(root.containerInfo); + nextEffect = firstEffect; + + do { + { + invokeGuardedCallback(null, commitBeforeMutationEffects, null); + + if (hasCaughtError()) { + if (!(nextEffect !== null)) { + { + throw Error('Should be working on an effect.'); + } + } + + var error = clearCaughtError(); + captureCommitPhaseError(nextEffect, error); + nextEffect = nextEffect.nextEffect; + } + } + } while (nextEffect !== null); + + stopCommitSnapshotEffectsTimer(); + + if (enableProfilerTimer) { + // Mark the current commit time to be shared by all Profilers in this + // batch. This enables them to be grouped later. + recordCommitTime(); + } // The next phase is the mutation phase, where we mutate the host tree. + + startCommitHostEffectsTimer(); + nextEffect = firstEffect; + + do { + { + invokeGuardedCallback(null, commitMutationEffects, null, root, renderPriorityLevel); + + if (hasCaughtError()) { + if (!(nextEffect !== null)) { + { + throw Error('Should be working on an effect.'); + } + } + + var _error = clearCaughtError(); + + captureCommitPhaseError(nextEffect, _error); + nextEffect = nextEffect.nextEffect; + } + } + } while (nextEffect !== null); + + stopCommitHostEffectsTimer(); + resetAfterCommit(root.containerInfo); // The work-in-progress tree is now the current tree. This must come after + // the mutation phase, so that the previous tree is still current during + // componentWillUnmount, but before the layout phase, so that the finished + // work is current during componentDidMount/Update. + + root.current = finishedWork; // The next phase is the layout phase, where we call effects that read + // the host tree after it's been mutated. The idiomatic use case for this is + // layout, but class component lifecycles also fire here for legacy reasons. + + startCommitLifeCyclesTimer(); + nextEffect = firstEffect; + + do { + { + invokeGuardedCallback(null, commitLayoutEffects, null, root, expirationTime); + + if (hasCaughtError()) { + if (!(nextEffect !== null)) { + { + throw Error('Should be working on an effect.'); + } + } + + var _error2 = clearCaughtError(); + + captureCommitPhaseError(nextEffect, _error2); + nextEffect = nextEffect.nextEffect; + } + } + } while (nextEffect !== null); + + stopCommitLifeCyclesTimer(); + nextEffect = null; // Tell Scheduler to yield at the end of the frame, so the browser has an + // opportunity to paint. + + requestPaint(); + + if (enableSchedulerTracing) { + popInteractions(prevInteractions); + } + + executionContext = prevExecutionContext; + } else { + // No effects. + root.current = finishedWork; // Measure these anyway so the flamegraph explicitly shows that there were + // no effects. + // TODO: Maybe there's a better way to report this. + + startCommitSnapshotEffectsTimer(); + stopCommitSnapshotEffectsTimer(); + + if (enableProfilerTimer) { + recordCommitTime(); + } + + startCommitHostEffectsTimer(); + stopCommitHostEffectsTimer(); + startCommitLifeCyclesTimer(); + stopCommitLifeCyclesTimer(); + } + + stopCommitTimer(); + var rootDidHavePassiveEffects = rootDoesHavePassiveEffects; + + if (rootDoesHavePassiveEffects) { + // This commit has passive effects. Stash a reference to them. But don't + // schedule a callback until after flushing layout work. + rootDoesHavePassiveEffects = false; + rootWithPendingPassiveEffects = root; + pendingPassiveEffectsExpirationTime = expirationTime; + pendingPassiveEffectsRenderPriority = renderPriorityLevel; + } else { + // We are done with the effect chain at this point so let's clear the + // nextEffect pointers to assist with GC. If we have passive effects, we'll + // clear this in flushPassiveEffects. + nextEffect = firstEffect; + + while (nextEffect !== null) { + var nextNextEffect = nextEffect.nextEffect; + nextEffect.nextEffect = null; + nextEffect = nextNextEffect; + } + } // Check if there's remaining work on this root + + var remainingExpirationTime = root.firstPendingTime; + + if (remainingExpirationTime !== NoWork) { + if (enableSchedulerTracing) { + if (spawnedWorkDuringRender !== null) { + var expirationTimes = spawnedWorkDuringRender; + spawnedWorkDuringRender = null; + + for (var i = 0; i < expirationTimes.length; i++) { + scheduleInteractions(root, expirationTimes[i], root.memoizedInteractions); + } + } + + schedulePendingInteractions(root, remainingExpirationTime); + } + } else { + // If there's no remaining work, we can clear the set of already failed + // error boundaries. + legacyErrorBoundariesThatAlreadyFailed = null; + } + + if (enableSchedulerTracing) { + if (!rootDidHavePassiveEffects) { + // If there are no passive effects, then we can complete the pending interactions. + // Otherwise, we'll wait until after the passive effects are flushed. + // Wait to do this until after remaining work has been scheduled, + // so that we don't prematurely signal complete for interactions when there's e.g. hidden work. + finishPendingInteractions(root, expirationTime); + } + } + + if (remainingExpirationTime === Sync) { + // Count the number of times the root synchronously re-renders without + // finishing. If there are too many, it indicates an infinite update loop. + if (root === rootWithNestedUpdates) { + nestedUpdateCount++; + } else { + nestedUpdateCount = 0; + rootWithNestedUpdates = root; + } + } else { + nestedUpdateCount = 0; + } + + onCommitRoot(finishedWork.stateNode, expirationTime); // Always call this before exiting `commitRoot`, to ensure that any + // additional work on this root is scheduled. + + ensureRootIsScheduled(root); + + if (hasUncaughtError) { + hasUncaughtError = false; + var _error3 = firstUncaughtError; + firstUncaughtError = null; + throw _error3; + } + + if ((executionContext & LegacyUnbatchedContext) !== NoContext) { + // This is a legacy edge case. We just committed the initial mount of + // a ReactDOM.render-ed root inside of batchedUpdates. The commit fired + // synchronously, but layout updates should be deferred until the end + // of the batch. + return null; + } // If layout work was scheduled, flush it now. + + flushSyncCallbackQueue(); + return null; + } + + function commitBeforeMutationEffects() { + while (nextEffect !== null) { + var effectTag = nextEffect.effectTag; + + if ((effectTag & Snapshot) !== NoEffect) { + setCurrentFiber(nextEffect); + recordEffect(); + var current$$1 = nextEffect.alternate; + commitBeforeMutationLifeCycles(current$$1, nextEffect); + resetCurrentFiber(); + } + + if ((effectTag & Passive) !== NoEffect) { + // If there are passive effects, schedule a callback to flush at + // the earliest opportunity. + if (!rootDoesHavePassiveEffects) { + rootDoesHavePassiveEffects = true; + scheduleCallback(NormalPriority, function () { + flushPassiveEffects(); + return null; + }); + } + } + + nextEffect = nextEffect.nextEffect; + } + } + + function commitMutationEffects(root, renderPriorityLevel) { + // TODO: Should probably move the bulk of this function to commitWork. + while (nextEffect !== null) { + setCurrentFiber(nextEffect); + var effectTag = nextEffect.effectTag; + + if (effectTag & ContentReset) { + commitResetTextContent(nextEffect); + } + + if (effectTag & Ref) { + var current$$1 = nextEffect.alternate; + + if (current$$1 !== null) { + commitDetachRef(current$$1); + } + } // The following switch statement is only concerned about placement, + // updates, and deletions. To avoid needing to add a case for every possible + // bitmap value, we remove the secondary effects from the effect tag and + // switch on that value. + + var primaryEffectTag = effectTag & (Placement | Update | Deletion | Hydrating); + + switch (primaryEffectTag) { + case Placement: { + commitPlacement(nextEffect); // Clear the "placement" from effect tag so that we know that this is + // inserted, before any life-cycles like componentDidMount gets called. + // TODO: findDOMNode doesn't rely on this any more but isMounted does + // and isMounted is deprecated anyway so we should be able to kill this. + + nextEffect.effectTag &= ~Placement; + break; + } + + case PlacementAndUpdate: { + // Placement + commitPlacement(nextEffect); // Clear the "placement" from effect tag so that we know that this is + // inserted, before any life-cycles like componentDidMount gets called. + + nextEffect.effectTag &= ~Placement; // Update + + var _current = nextEffect.alternate; + commitWork(_current, nextEffect); + break; + } + + case Hydrating: { + nextEffect.effectTag &= ~Hydrating; + break; + } + + case HydratingAndUpdate: { + nextEffect.effectTag &= ~Hydrating; // Update + + var _current2 = nextEffect.alternate; + commitWork(_current2, nextEffect); + break; + } + + case Update: { + var _current3 = nextEffect.alternate; + commitWork(_current3, nextEffect); + break; + } + + case Deletion: { + commitDeletion(root, nextEffect, renderPriorityLevel); + break; + } + } // TODO: Only record a mutation effect if primaryEffectTag is non-zero. + + recordEffect(); + resetCurrentFiber(); + nextEffect = nextEffect.nextEffect; + } + } + + function commitLayoutEffects(root, committedExpirationTime) { + // TODO: Should probably move the bulk of this function to commitWork. + while (nextEffect !== null) { + setCurrentFiber(nextEffect); + var effectTag = nextEffect.effectTag; + + if (effectTag & (Update | Callback)) { + recordEffect(); + var current$$1 = nextEffect.alternate; + commitLifeCycles(root, current$$1, nextEffect, committedExpirationTime); + } + + if (effectTag & Ref) { + recordEffect(); + commitAttachRef(nextEffect); + } + + resetCurrentFiber(); + nextEffect = nextEffect.nextEffect; + } + } + + function flushPassiveEffects() { + if (pendingPassiveEffectsRenderPriority !== NoPriority) { + var priorityLevel = + pendingPassiveEffectsRenderPriority > NormalPriority + ? NormalPriority + : pendingPassiveEffectsRenderPriority; + pendingPassiveEffectsRenderPriority = NoPriority; + return runWithPriority$2(priorityLevel, flushPassiveEffectsImpl); + } + } + + function flushPassiveEffectsImpl() { + if (rootWithPendingPassiveEffects === null) { + return false; + } + + var root = rootWithPendingPassiveEffects; + var expirationTime = pendingPassiveEffectsExpirationTime; + rootWithPendingPassiveEffects = null; + pendingPassiveEffectsExpirationTime = NoWork; + + if (!((executionContext & (RenderContext | CommitContext)) === NoContext)) { + { + throw Error('Cannot flush passive effects while already rendering.'); + } + } + + var prevExecutionContext = executionContext; + executionContext |= CommitContext; + var prevInteractions = pushInteractions(root); // Note: This currently assumes there are no passive effects on the root + // fiber, because the root is not part of its own effect list. This could + // change in the future. + + var effect = root.current.firstEffect; + + while (effect !== null) { + { + setCurrentFiber(effect); + invokeGuardedCallback(null, commitPassiveHookEffects, null, effect); + + if (hasCaughtError()) { + if (!(effect !== null)) { + { + throw Error('Should be working on an effect.'); + } + } + + var error = clearCaughtError(); + captureCommitPhaseError(effect, error); + } + + resetCurrentFiber(); + } + + var nextNextEffect = effect.nextEffect; // Remove nextEffect pointer to assist GC + + effect.nextEffect = null; + effect = nextNextEffect; + } + + if (enableSchedulerTracing) { + popInteractions(prevInteractions); + finishPendingInteractions(root, expirationTime); + } + + executionContext = prevExecutionContext; + flushSyncCallbackQueue(); // If additional passive effects were scheduled, increment a counter. If this + // exceeds the limit, we'll fire a warning. + + nestedPassiveUpdateCount = + rootWithPendingPassiveEffects === null ? 0 : nestedPassiveUpdateCount + 1; + return true; + } + + function isAlreadyFailedLegacyErrorBoundary(instance) { + return ( + legacyErrorBoundariesThatAlreadyFailed !== null && + legacyErrorBoundariesThatAlreadyFailed.has(instance) + ); + } + function markLegacyErrorBoundaryAsFailed(instance) { + if (legacyErrorBoundariesThatAlreadyFailed === null) { + legacyErrorBoundariesThatAlreadyFailed = new Set([instance]); + } else { + legacyErrorBoundariesThatAlreadyFailed.add(instance); + } + } + + function prepareToThrowUncaughtError(error) { + if (!hasUncaughtError) { + hasUncaughtError = true; + firstUncaughtError = error; + } + } + + var onUncaughtError = prepareToThrowUncaughtError; + + function captureCommitPhaseErrorOnRoot(rootFiber, sourceFiber, error) { + var errorInfo = createCapturedValue(error, sourceFiber); + var update = createRootErrorUpdate(rootFiber, errorInfo, Sync); + enqueueUpdate(rootFiber, update); + var root = markUpdateTimeFromFiberToRoot(rootFiber, Sync); + + if (root !== null) { + ensureRootIsScheduled(root); + schedulePendingInteractions(root, Sync); + } + } + + function captureCommitPhaseError(sourceFiber, error) { + if (sourceFiber.tag === HostRoot) { + // Error was thrown at the root. There is no parent, so the root + // itself should capture it. + captureCommitPhaseErrorOnRoot(sourceFiber, sourceFiber, error); + return; + } + + var fiber = sourceFiber.return; + + while (fiber !== null) { + if (fiber.tag === HostRoot) { + captureCommitPhaseErrorOnRoot(fiber, sourceFiber, error); + return; + } else if (fiber.tag === ClassComponent) { + var ctor = fiber.type; + var instance = fiber.stateNode; + + if ( + typeof ctor.getDerivedStateFromError === 'function' || + (typeof instance.componentDidCatch === 'function' && + !isAlreadyFailedLegacyErrorBoundary(instance)) + ) { + var errorInfo = createCapturedValue(error, sourceFiber); + var update = createClassErrorUpdate( + fiber, + errorInfo, // TODO: This is always sync + Sync, + ); + enqueueUpdate(fiber, update); + var root = markUpdateTimeFromFiberToRoot(fiber, Sync); + + if (root !== null) { + ensureRootIsScheduled(root); + schedulePendingInteractions(root, Sync); + } + + return; + } + } + + fiber = fiber.return; + } + } + function pingSuspendedRoot(root, thenable, suspendedTime) { + var pingCache = root.pingCache; + + if (pingCache !== null) { + // The thenable resolved, so we no longer need to memoize, because it will + // never be thrown again. + pingCache.delete(thenable); + } + + if (workInProgressRoot === root && renderExpirationTime === suspendedTime) { + // Received a ping at the same priority level at which we're currently + // rendering. We might want to restart this render. This should mirror + // the logic of whether or not a root suspends once it completes. + // TODO: If we're rendering sync either due to Sync, Batched or expired, + // we should probably never restart. + // If we're suspended with delay, we'll always suspend so we can always + // restart. If we're suspended without any updates, it might be a retry. + // If it's early in the retry we can restart. We can't know for sure + // whether we'll eventually process an update during this render pass, + // but it's somewhat unlikely that we get to a ping before that, since + // getting to the root most update is usually very fast. + if ( + workInProgressRootExitStatus === RootSuspendedWithDelay || + (workInProgressRootExitStatus === RootSuspended && + workInProgressRootLatestProcessedExpirationTime === Sync && + now() - globalMostRecentFallbackTime < FALLBACK_THROTTLE_MS) + ) { + // Restart from the root. Don't need to schedule a ping because + // we're already working on this tree. + prepareFreshStack(root, renderExpirationTime); + } else { + // Even though we can't restart right now, we might get an + // opportunity later. So we mark this render as having a ping. + workInProgressRootHasPendingPing = true; + } + + return; + } + + if (!isRootSuspendedAtTime(root, suspendedTime)) { + // The root is no longer suspended at this time. + return; + } + + var lastPingedTime = root.lastPingedTime; + + if (lastPingedTime !== NoWork && lastPingedTime < suspendedTime) { + // There's already a lower priority ping scheduled. + return; + } // Mark the time at which this ping was scheduled. + + root.lastPingedTime = suspendedTime; + + if (root.finishedExpirationTime === suspendedTime) { + // If there's a pending fallback waiting to commit, throw it away. + root.finishedExpirationTime = NoWork; + root.finishedWork = null; + } + + ensureRootIsScheduled(root); + schedulePendingInteractions(root, suspendedTime); + } + + function retryTimedOutBoundary(boundaryFiber, retryTime) { + // The boundary fiber (a Suspense component or SuspenseList component) + // previously was rendered in its fallback state. One of the promises that + // suspended it has resolved, which means at least part of the tree was + // likely unblocked. Try rendering again, at a new expiration time. + if (retryTime === NoWork) { + var suspenseConfig = null; // Retries don't carry over the already committed update. + + var currentTime = requestCurrentTimeForUpdate(); + retryTime = computeExpirationForFiber(currentTime, boundaryFiber, suspenseConfig); + } // TODO: Special case idle priority? + + var root = markUpdateTimeFromFiberToRoot(boundaryFiber, retryTime); + + if (root !== null) { + ensureRootIsScheduled(root); + schedulePendingInteractions(root, retryTime); + } + } + + function retryDehydratedSuspenseBoundary(boundaryFiber) { + var suspenseState = boundaryFiber.memoizedState; + var retryTime = NoWork; + + if (suspenseState !== null) { + retryTime = suspenseState.retryTime; + } + + retryTimedOutBoundary(boundaryFiber, retryTime); + } + function resolveRetryThenable(boundaryFiber, thenable) { + var retryTime = NoWork; // Default + + var retryCache; + + if (enableSuspenseServerRenderer) { + switch (boundaryFiber.tag) { + case SuspenseComponent: + retryCache = boundaryFiber.stateNode; + var suspenseState = boundaryFiber.memoizedState; + + if (suspenseState !== null) { + retryTime = suspenseState.retryTime; + } + + break; + + case SuspenseListComponent: + retryCache = boundaryFiber.stateNode; + break; + + default: { + { + throw Error('Pinged unknown suspense boundary type. This is probably a bug in React.'); + } + } + } + } else { + retryCache = boundaryFiber.stateNode; + } + + if (retryCache !== null) { + // The thenable resolved, so we no longer need to memoize, because it will + // never be thrown again. + retryCache.delete(thenable); + } + + retryTimedOutBoundary(boundaryFiber, retryTime); + } // Computes the next Just Noticeable Difference (JND) boundary. + // The theory is that a person can't tell the difference between small differences in time. + // Therefore, if we wait a bit longer than necessary that won't translate to a noticeable + // difference in the experience. However, waiting for longer might mean that we can avoid + // showing an intermediate loading state. The longer we have already waited, the harder it + // is to tell small differences in time. Therefore, the longer we've already waited, + // the longer we can wait additionally. At some point we have to give up though. + // We pick a train model where the next boundary commits at a consistent schedule. + // These particular numbers are vague estimates. We expect to adjust them based on research. + + function jnd(timeElapsed) { + return timeElapsed < 120 + ? 120 + : timeElapsed < 480 + ? 480 + : timeElapsed < 1080 + ? 1080 + : timeElapsed < 1920 + ? 1920 + : timeElapsed < 3000 + ? 3000 + : timeElapsed < 4320 + ? 4320 + : ceil(timeElapsed / 1960) * 1960; + } + + function computeMsUntilSuspenseLoadingDelay( + mostRecentEventTime, + committedExpirationTime, + suspenseConfig, + ) { + var busyMinDurationMs = suspenseConfig.busyMinDurationMs | 0; + + if (busyMinDurationMs <= 0) { + return 0; + } + + var busyDelayMs = suspenseConfig.busyDelayMs | 0; // Compute the time until this render pass would expire. + + var currentTimeMs = now(); + var eventTimeMs = inferTimeFromExpirationTimeWithSuspenseConfig( + mostRecentEventTime, + suspenseConfig, + ); + var timeElapsed = currentTimeMs - eventTimeMs; + + if (timeElapsed <= busyDelayMs) { + // If we haven't yet waited longer than the initial delay, we don't + // have to wait any additional time. + return 0; + } + + var msUntilTimeout = busyDelayMs + busyMinDurationMs - timeElapsed; // This is the value that is passed to `setTimeout`. + + return msUntilTimeout; + } + + function checkForNestedUpdates() { + if (nestedUpdateCount > NESTED_UPDATE_LIMIT) { + nestedUpdateCount = 0; + rootWithNestedUpdates = null; + + { + { + throw Error( + 'Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.', + ); + } + } + } + + { + if (nestedPassiveUpdateCount > NESTED_PASSIVE_UPDATE_LIMIT) { + nestedPassiveUpdateCount = 0; + warning$1( + false, + 'Maximum update depth exceeded. This can happen when a component ' + + "calls setState inside useEffect, but useEffect either doesn't " + + 'have a dependency array, or one of the dependencies changes on ' + + 'every render.', + ); + } + } + } + + function flushRenderPhaseStrictModeWarningsInDEV() { + { + ReactStrictModeWarnings.flushLegacyContextWarning(); + + if (warnAboutDeprecatedLifecycles) { + ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings(); + } + } + } + + function stopFinishedWorkLoopTimer() { + var didCompleteRoot = true; + stopWorkLoopTimer(interruptedBy, didCompleteRoot); + interruptedBy = null; + } + + function stopInterruptedWorkLoopTimer() { + // TODO: Track which fiber caused the interruption. + var didCompleteRoot = false; + stopWorkLoopTimer(interruptedBy, didCompleteRoot); + interruptedBy = null; + } + + function checkForInterruption(fiberThatReceivedUpdate, updateExpirationTime) { + if ( + enableUserTimingAPI && + workInProgressRoot !== null && + updateExpirationTime > renderExpirationTime + ) { + interruptedBy = fiberThatReceivedUpdate; + } + } + + var didWarnStateUpdateForUnmountedComponent = null; + + function warnAboutUpdateOnUnmountedFiberInDEV(fiber) { + { + var tag = fiber.tag; + + if ( + tag !== HostRoot && + tag !== ClassComponent && + tag !== FunctionComponent && + tag !== ForwardRef && + tag !== MemoComponent && + tag !== SimpleMemoComponent + ) { + // Only warn for user-defined components, not internal ones like Suspense. + return; + } // We show the whole stack but dedupe on the top component's name because + // the problematic code almost always lies inside that component. + + var componentName = getComponentName(fiber.type) || 'ReactComponent'; + + if (didWarnStateUpdateForUnmountedComponent !== null) { + if (didWarnStateUpdateForUnmountedComponent.has(componentName)) { + return; + } + + didWarnStateUpdateForUnmountedComponent.add(componentName); + } else { + didWarnStateUpdateForUnmountedComponent = new Set([componentName]); + } + + warningWithoutStack$1( + false, + "Can't perform a React state update on an unmounted component. This " + + 'is a no-op, but it indicates a memory leak in your application. To ' + + 'fix, cancel all subscriptions and asynchronous tasks in %s.%s', + tag === ClassComponent ? 'the componentWillUnmount method' : 'a useEffect cleanup function', + getStackByFiberInDevAndProd(fiber), + ); + } + } + + var beginWork$$1; + + if (true && replayFailedUnitOfWorkWithInvokeGuardedCallback) { + var dummyFiber = null; + + beginWork$$1 = function (current$$1, unitOfWork, expirationTime) { + // If a component throws an error, we replay it again in a synchronously + // dispatched event, so that the debugger will treat it as an uncaught + // error See ReactErrorUtils for more information. + // Before entering the begin phase, copy the work-in-progress onto a dummy + // fiber. If beginWork throws, we'll use this to reset the state. + var originalWorkInProgressCopy = assignFiberPropertiesInDEV(dummyFiber, unitOfWork); + + try { + return beginWork$1(current$$1, unitOfWork, expirationTime); + } catch (originalError) { + if ( + originalError !== null && + typeof originalError === 'object' && + typeof originalError.then === 'function' + ) { + // Don't replay promises. Treat everything else like an error. + throw originalError; + } // Keep this code in sync with handleError; any changes here must have + // corresponding changes there. + + resetContextDependencies(); + resetHooks(); // Don't reset current debug fiber, since we're about to work on the + // same fiber again. + // Unwind the failed stack frame + + unwindInterruptedWork(unitOfWork); // Restore the original properties of the fiber. + + assignFiberPropertiesInDEV(unitOfWork, originalWorkInProgressCopy); + + if (enableProfilerTimer && unitOfWork.mode & ProfileMode) { + // Reset the profiler timer. + startProfilerTimer(unitOfWork); + } // Run beginWork again. + + invokeGuardedCallback(null, beginWork$1, null, current$$1, unitOfWork, expirationTime); + + if (hasCaughtError()) { + var replayError = clearCaughtError(); // `invokeGuardedCallback` sometimes sets an expando `_suppressLogging`. + // Rethrow this error instead of the original one. + + throw replayError; + } else { + // This branch is reachable if the render phase is impure. + throw originalError; + } + } + }; + } else { + beginWork$$1 = beginWork$1; + } + + var didWarnAboutUpdateInRender = false; + var didWarnAboutUpdateInGetChildContext = false; + + function warnAboutInvalidUpdatesOnClassComponentsInDEV(fiber) { + { + if (fiber.tag === ClassComponent) { + switch (phase) { + case 'getChildContext': + if (didWarnAboutUpdateInGetChildContext) { + return; + } + + warningWithoutStack$1( + false, + 'setState(...): Cannot call setState() inside getChildContext()', + ); + didWarnAboutUpdateInGetChildContext = true; + break; + + case 'render': + if (didWarnAboutUpdateInRender) { + return; + } + + warningWithoutStack$1( + false, + 'Cannot update during an existing state transition (such as ' + + 'within `render`). Render methods should be a pure function of ' + + 'props and state.', + ); + didWarnAboutUpdateInRender = true; + break; + } + } + } + } // a 'shared' variable that changes when act() opens/closes in tests. + + var IsThisRendererActing = { + current: false, + }; + function warnIfNotScopedWithMatchingAct(fiber) { + { + if ( + warnsIfNotActing === true && + IsSomeRendererActing.current === true && + IsThisRendererActing.current !== true + ) { + warningWithoutStack$1( + false, + "It looks like you're using the wrong act() around your test interactions.\n" + + 'Be sure to use the matching version of act() corresponding to your renderer:\n\n' + + '// for react-dom:\n' + + "import {act} from 'react-dom/test-utils';\n" + + '// ...\n' + + 'act(() => ...);\n\n' + + '// for react-test-renderer:\n' + + "import TestRenderer from 'react-test-renderer';\n" + + 'const {act} = TestRenderer;\n' + + '// ...\n' + + 'act(() => ...);' + + '%s', + getStackByFiberInDevAndProd(fiber), + ); + } + } + } + function warnIfNotCurrentlyActingEffectsInDEV(fiber) { + { + if ( + warnsIfNotActing === true && + (fiber.mode & StrictMode) !== NoMode && + IsSomeRendererActing.current === false && + IsThisRendererActing.current === false + ) { + warningWithoutStack$1( + false, + 'An update to %s ran an effect, but was not wrapped in act(...).\n\n' + + 'When testing, code that causes React state updates should be ' + + 'wrapped into act(...):\n\n' + + 'act(() => {\n' + + ' /* fire events that update state */\n' + + '});\n' + + '/* assert on the output */\n\n' + + "This ensures that you're testing the behavior the user would see " + + 'in the browser.' + + ' Learn more at https://fb.me/react-wrap-tests-with-act' + + '%s', + getComponentName(fiber.type), + getStackByFiberInDevAndProd(fiber), + ); + } + } + } + + function warnIfNotCurrentlyActingUpdatesInDEV(fiber) { + { + if ( + warnsIfNotActing === true && + executionContext === NoContext && + IsSomeRendererActing.current === false && + IsThisRendererActing.current === false + ) { + warningWithoutStack$1( + false, + 'An update to %s inside a test was not wrapped in act(...).\n\n' + + 'When testing, code that causes React state updates should be ' + + 'wrapped into act(...):\n\n' + + 'act(() => {\n' + + ' /* fire events that update state */\n' + + '});\n' + + '/* assert on the output */\n\n' + + "This ensures that you're testing the behavior the user would see " + + 'in the browser.' + + ' Learn more at https://fb.me/react-wrap-tests-with-act' + + '%s', + getComponentName(fiber.type), + getStackByFiberInDevAndProd(fiber), + ); + } + } + } + + var warnIfNotCurrentlyActingUpdatesInDev = warnIfNotCurrentlyActingUpdatesInDEV; // In tests, we want to enforce a mocked scheduler. + + var didWarnAboutUnmockedScheduler = false; // TODO Before we release concurrent mode, revisit this and decide whether a mocked + // scheduler is the actual recommendation. The alternative could be a testing build, + // a new lib, or whatever; we dunno just yet. This message is for early adopters + // to get their tests right. + + function warnIfUnmockedScheduler(fiber) { + { + if ( + didWarnAboutUnmockedScheduler === false && + Scheduler.unstable_flushAllWithoutAsserting === undefined + ) { + if (fiber.mode & BlockingMode || fiber.mode & ConcurrentMode) { + didWarnAboutUnmockedScheduler = true; + warningWithoutStack$1( + false, + 'In Concurrent or Sync modes, the "scheduler" module needs to be mocked ' + + 'to guarantee consistent behaviour across tests and browsers. ' + + 'For example, with jest: \n' + + "jest.mock('scheduler', () => require('scheduler/unstable_mock'));\n\n" + + 'For more info, visit https://fb.me/react-mock-scheduler', + ); + } else if (warnAboutUnmockedScheduler === true) { + didWarnAboutUnmockedScheduler = true; + warningWithoutStack$1( + false, + 'Starting from React v17, the "scheduler" module will need to be mocked ' + + 'to guarantee consistent behaviour across tests and browsers. ' + + 'For example, with jest: \n' + + "jest.mock('scheduler', () => require('scheduler/unstable_mock'));\n\n" + + 'For more info, visit https://fb.me/react-mock-scheduler', + ); + } + } + } + } + var componentsThatTriggeredHighPriSuspend = null; + function checkForWrongSuspensePriorityInDEV(sourceFiber) { + { + var currentPriorityLevel = getCurrentPriorityLevel(); + + if ( + (sourceFiber.mode & ConcurrentMode) !== NoEffect && + (currentPriorityLevel === UserBlockingPriority$2 || + currentPriorityLevel === ImmediatePriority) + ) { + var workInProgressNode = sourceFiber; + + while (workInProgressNode !== null) { + // Add the component that triggered the suspense + var current$$1 = workInProgressNode.alternate; + + if (current$$1 !== null) { + // TODO: warn component that triggers the high priority + // suspend is the HostRoot + switch (workInProgressNode.tag) { + case ClassComponent: + // Loop through the component's update queue and see whether the component + // has triggered any high priority updates + var updateQueue = current$$1.updateQueue; + + if (updateQueue !== null) { + var update = updateQueue.firstUpdate; + + while (update !== null) { + var priorityLevel = update.priority; + + if ( + priorityLevel === UserBlockingPriority$2 || + priorityLevel === ImmediatePriority + ) { + if (componentsThatTriggeredHighPriSuspend === null) { + componentsThatTriggeredHighPriSuspend = new Set([ + getComponentName(workInProgressNode.type), + ]); + } else { + componentsThatTriggeredHighPriSuspend.add( + getComponentName(workInProgressNode.type), + ); + } + + break; + } + + update = update.next; + } + } + + break; + + case FunctionComponent: + case ForwardRef: + case SimpleMemoComponent: + if ( + workInProgressNode.memoizedState !== null && + workInProgressNode.memoizedState.baseUpdate !== null + ) { + var _update = workInProgressNode.memoizedState.baseUpdate; // Loop through the functional component's memoized state to see whether + // the component has triggered any high pri updates + + while (_update !== null) { + var priority = _update.priority; + + if (priority === UserBlockingPriority$2 || priority === ImmediatePriority) { + if (componentsThatTriggeredHighPriSuspend === null) { + componentsThatTriggeredHighPriSuspend = new Set([ + getComponentName(workInProgressNode.type), + ]); + } else { + componentsThatTriggeredHighPriSuspend.add( + getComponentName(workInProgressNode.type), + ); + } + + break; + } + + if (_update.next === workInProgressNode.memoizedState.baseUpdate) { + break; + } + + _update = _update.next; + } + } + + break; + + default: + break; + } + } + + workInProgressNode = workInProgressNode.return; + } + } + } + } + + function flushSuspensePriorityWarningInDEV() { + { + if (componentsThatTriggeredHighPriSuspend !== null) { + var componentNames = []; + componentsThatTriggeredHighPriSuspend.forEach(function (name) { + return componentNames.push(name); + }); + componentsThatTriggeredHighPriSuspend = null; + + if (componentNames.length > 0) { + warningWithoutStack$1( + false, + '%s triggered a user-blocking update that suspended.' + + '\n\n' + + 'The fix is to split the update into multiple parts: a user-blocking ' + + 'update to provide immediate feedback, and another update that ' + + 'triggers the bulk of the changes.' + + '\n\n' + + 'Refer to the documentation for useTransition to learn how ' + + 'to implement this pattern.', // TODO: Add link to React docs with more information, once it exists + componentNames.sort().join(', '), + ); + } + } + } + } + + function computeThreadID(root, expirationTime) { + // Interaction threads are unique per root and expiration time. + return expirationTime * 1000 + root.interactionThreadID; + } + + function markSpawnedWork(expirationTime) { + if (!enableSchedulerTracing) { + return; + } + + if (spawnedWorkDuringRender === null) { + spawnedWorkDuringRender = [expirationTime]; + } else { + spawnedWorkDuringRender.push(expirationTime); + } + } + + function scheduleInteractions(root, expirationTime, interactions) { + if (!enableSchedulerTracing) { + return; + } + + if (interactions.size > 0) { + var pendingInteractionMap = root.pendingInteractionMap; + var pendingInteractions = pendingInteractionMap.get(expirationTime); + + if (pendingInteractions != null) { + interactions.forEach(function (interaction) { + if (!pendingInteractions.has(interaction)) { + // Update the pending async work count for previously unscheduled interaction. + interaction.__count++; + } + + pendingInteractions.add(interaction); + }); + } else { + pendingInteractionMap.set(expirationTime, new Set(interactions)); // Update the pending async work count for the current interactions. + + interactions.forEach(function (interaction) { + interaction.__count++; + }); + } + + var subscriber = tracing.__subscriberRef.current; + + if (subscriber !== null) { + var threadID = computeThreadID(root, expirationTime); + subscriber.onWorkScheduled(interactions, threadID); + } + } + } + + function schedulePendingInteractions(root, expirationTime) { + // This is called when work is scheduled on a root. + // It associates the current interactions with the newly-scheduled expiration. + // They will be restored when that expiration is later committed. + if (!enableSchedulerTracing) { + return; + } + + scheduleInteractions(root, expirationTime, tracing.__interactionsRef.current); + } + + function startWorkOnPendingInteractions(root, expirationTime) { + // This is called when new work is started on a root. + if (!enableSchedulerTracing) { + return; + } // Determine which interactions this batch of work currently includes, So that + // we can accurately attribute time spent working on it, And so that cascading + // work triggered during the render phase will be associated with it. + + var interactions = new Set(); + root.pendingInteractionMap.forEach(function (scheduledInteractions, scheduledExpirationTime) { + if (scheduledExpirationTime >= expirationTime) { + scheduledInteractions.forEach(function (interaction) { + return interactions.add(interaction); + }); + } + }); // Store the current set of interactions on the FiberRoot for a few reasons: + // We can re-use it in hot functions like performConcurrentWorkOnRoot() + // without having to recalculate it. We will also use it in commitWork() to + // pass to any Profiler onRender() hooks. This also provides DevTools with a + // way to access it when the onCommitRoot() hook is called. + + root.memoizedInteractions = interactions; + + if (interactions.size > 0) { + var subscriber = tracing.__subscriberRef.current; + + if (subscriber !== null) { + var threadID = computeThreadID(root, expirationTime); + + try { + subscriber.onWorkStarted(interactions, threadID); + } catch (error) { + // If the subscriber throws, rethrow it in a separate task + scheduleCallback(ImmediatePriority, function () { + throw error; + }); + } + } + } + } + + function finishPendingInteractions(root, committedExpirationTime) { + if (!enableSchedulerTracing) { + return; + } + + var earliestRemainingTimeAfterCommit = root.firstPendingTime; + var subscriber; + + try { + subscriber = tracing.__subscriberRef.current; + + if (subscriber !== null && root.memoizedInteractions.size > 0) { + var threadID = computeThreadID(root, committedExpirationTime); + subscriber.onWorkStopped(root.memoizedInteractions, threadID); + } + } catch (error) { + // If the subscriber throws, rethrow it in a separate task + scheduleCallback(ImmediatePriority, function () { + throw error; + }); + } finally { + // Clear completed interactions from the pending Map. + // Unless the render was suspended or cascading work was scheduled, + // In which case– leave pending interactions until the subsequent render. + var pendingInteractionMap = root.pendingInteractionMap; + pendingInteractionMap.forEach(function (scheduledInteractions, scheduledExpirationTime) { + // Only decrement the pending interaction count if we're done. + // If there's still work at the current priority, + // That indicates that we are waiting for suspense data. + if (scheduledExpirationTime > earliestRemainingTimeAfterCommit) { + pendingInteractionMap.delete(scheduledExpirationTime); + scheduledInteractions.forEach(function (interaction) { + interaction.__count--; + + if (subscriber !== null && interaction.__count === 0) { + try { + subscriber.onInteractionScheduledWorkCompleted(interaction); + } catch (error) { + // If the subscriber throws, rethrow it in a separate task + scheduleCallback(ImmediatePriority, function () { + throw error; + }); + } + } + }); + } + }); + } + } + + var onCommitFiberRoot = null; + var onCommitFiberUnmount = null; + var hasLoggedError = false; + var isDevToolsPresent = typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined'; + function injectInternals(internals) { + if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined') { + // No DevTools + return false; + } + + var hook = __REACT_DEVTOOLS_GLOBAL_HOOK__; + + if (hook.isDisabled) { + // This isn't a real property on the hook, but it can be set to opt out + // of DevTools integration and associated warnings and logs. + // https://github.com/facebook/react/issues/3877 + return true; + } + + if (!hook.supportsFiber) { + { + warningWithoutStack$1( + false, + 'The installed version of React DevTools is too old and will not work ' + + 'with the current version of React. Please update React DevTools. ' + + 'https://fb.me/react-devtools', + ); + } // DevTools exists, even though it doesn't support Fiber. + + return true; + } + + try { + var rendererID = hook.inject(internals); // We have successfully injected, so now it is safe to set up hooks. + + onCommitFiberRoot = function (root, expirationTime) { + try { + var didError = (root.current.effectTag & DidCapture) === DidCapture; + + if (enableProfilerTimer) { + var currentTime = getCurrentTime(); + var priorityLevel = inferPriorityFromExpirationTime(currentTime, expirationTime); + hook.onCommitFiberRoot(rendererID, root, priorityLevel, didError); + } else { + hook.onCommitFiberRoot(rendererID, root, undefined, didError); + } + } catch (err) { + if (true && !hasLoggedError) { + hasLoggedError = true; + warningWithoutStack$1(false, 'React DevTools encountered an error: %s', err); + } + } + }; + + onCommitFiberUnmount = function (fiber) { + try { + hook.onCommitFiberUnmount(rendererID, fiber); + } catch (err) { + if (true && !hasLoggedError) { + hasLoggedError = true; + warningWithoutStack$1(false, 'React DevTools encountered an error: %s', err); + } + } + }; + } catch (err) { + // Catch all errors because it is unsafe to throw during initialization. + { + warningWithoutStack$1(false, 'React DevTools encountered an error: %s.', err); + } + } // DevTools exists + + return true; + } + function onCommitRoot(root, expirationTime) { + if (typeof onCommitFiberRoot === 'function') { + onCommitFiberRoot(root, expirationTime); + } + } + function onCommitUnmount(fiber) { + if (typeof onCommitFiberUnmount === 'function') { + onCommitFiberUnmount(fiber); + } + } + + var hasBadMapPolyfill; + + { + hasBadMapPolyfill = false; + + try { + var nonExtensibleObject = Object.preventExtensions({}); + var testMap = new Map([[nonExtensibleObject, null]]); + var testSet = new Set([nonExtensibleObject]); // This is necessary for Rollup to not consider these unused. + // https://github.com/rollup/rollup/issues/1771 + // TODO: we can remove these if Rollup fixes the bug. + + testMap.set(0, 0); + testSet.add(0); + } catch (e) { + // TODO: Consider warning about bad polyfills + hasBadMapPolyfill = true; + } + } + + var debugCounter = 1; + + function FiberNode(tag, pendingProps, key, mode) { + // Instance + this.tag = tag; + this.key = key; + this.elementType = null; + this.type = null; + this.stateNode = null; // Fiber + + this.return = null; + this.child = null; + this.sibling = null; + this.index = 0; + this.ref = null; + this.pendingProps = pendingProps; + this.memoizedProps = null; + this.updateQueue = null; + this.memoizedState = null; + this.dependencies = null; + this.mode = mode; // Effects + + this.effectTag = NoEffect; + this.nextEffect = null; + this.firstEffect = null; + this.lastEffect = null; + this.expirationTime = NoWork; + this.childExpirationTime = NoWork; + this.alternate = null; + + if (enableProfilerTimer) { + // Note: The following is done to avoid a v8 performance cliff. + // + // Initializing the fields below to smis and later updating them with + // double values will cause Fibers to end up having separate shapes. + // This behavior/bug has something to do with Object.preventExtension(). + // Fortunately this only impacts DEV builds. + // Unfortunately it makes React unusably slow for some applications. + // To work around this, initialize the fields below with doubles. + // + // Learn more about this here: + // https://github.com/facebook/react/issues/14365 + // https://bugs.chromium.org/p/v8/issues/detail?id=8538 + this.actualDuration = Number.NaN; + this.actualStartTime = Number.NaN; + this.selfBaseDuration = Number.NaN; + this.treeBaseDuration = Number.NaN; // It's okay to replace the initial doubles with smis after initialization. + // This won't trigger the performance cliff mentioned above, + // and it simplifies other profiler code (including DevTools). + + this.actualDuration = 0; + this.actualStartTime = -1; + this.selfBaseDuration = 0; + this.treeBaseDuration = 0; + } // This is normally DEV-only except www when it adds listeners. + // TODO: remove the User Timing integration in favor of Root Events. + + if (enableUserTimingAPI) { + this._debugID = debugCounter++; + this._debugIsCurrentlyTiming = false; + } + + { + this._debugSource = null; + this._debugOwner = null; + this._debugNeedsRemount = false; + this._debugHookTypes = null; + + if (!hasBadMapPolyfill && typeof Object.preventExtensions === 'function') { + Object.preventExtensions(this); + } + } + } // This is a constructor function, rather than a POJO constructor, still + // please ensure we do the following: + // 1) Nobody should add any instance methods on this. Instance methods can be + // more difficult to predict when they get optimized and they are almost + // never inlined properly in static compilers. + // 2) Nobody should rely on `instanceof Fiber` for type testing. We should + // always know when it is a fiber. + // 3) We might want to experiment with using numeric keys since they are easier + // to optimize in a non-JIT environment. + // 4) We can easily go from a constructor to a createFiber object literal if that + // is faster. + // 5) It should be easy to port this to a C struct and keep a C implementation + // compatible. + + var createFiber = function (tag, pendingProps, key, mode) { + // $FlowFixMe: the shapes are exact here but Flow doesn't like constructors + return new FiberNode(tag, pendingProps, key, mode); + }; + + function shouldConstruct(Component) { + var prototype = Component.prototype; + return !!(prototype && prototype.isReactComponent); + } + + function isSimpleFunctionComponent(type) { + return typeof type === 'function' && !shouldConstruct(type) && type.defaultProps === undefined; + } + function resolveLazyComponentTag(Component) { + if (typeof Component === 'function') { + return shouldConstruct(Component) ? ClassComponent : FunctionComponent; + } else if (Component !== undefined && Component !== null) { + var $$typeof = Component.$$typeof; + + if ($$typeof === REACT_FORWARD_REF_TYPE) { + return ForwardRef; + } + + if ($$typeof === REACT_MEMO_TYPE) { + return MemoComponent; + } + } + + return IndeterminateComponent; + } // This is used to create an alternate fiber to do work on. + + function createWorkInProgress(current, pendingProps, expirationTime) { + var workInProgress = current.alternate; + + if (workInProgress === null) { + // We use a double buffering pooling technique because we know that we'll + // only ever need at most two versions of a tree. We pool the "other" unused + // node that we're free to reuse. This is lazily created to avoid allocating + // extra objects for things that are never updated. It also allow us to + // reclaim the extra memory if needed. + workInProgress = createFiber(current.tag, pendingProps, current.key, current.mode); + workInProgress.elementType = current.elementType; + workInProgress.type = current.type; + workInProgress.stateNode = current.stateNode; + + { + // DEV-only fields + workInProgress._debugID = current._debugID; + workInProgress._debugSource = current._debugSource; + workInProgress._debugOwner = current._debugOwner; + workInProgress._debugHookTypes = current._debugHookTypes; + } + + workInProgress.alternate = current; + current.alternate = workInProgress; + } else { + workInProgress.pendingProps = pendingProps; // We already have an alternate. + // Reset the effect tag. + + workInProgress.effectTag = NoEffect; // The effect list is no longer valid. + + workInProgress.nextEffect = null; + workInProgress.firstEffect = null; + workInProgress.lastEffect = null; + + if (enableProfilerTimer) { + // We intentionally reset, rather than copy, actualDuration & actualStartTime. + // This prevents time from endlessly accumulating in new commits. + // This has the downside of resetting values for different priority renders, + // But works for yielding (the common case) and should support resuming. + workInProgress.actualDuration = 0; + workInProgress.actualStartTime = -1; + } + } + + workInProgress.childExpirationTime = current.childExpirationTime; + workInProgress.expirationTime = current.expirationTime; + workInProgress.child = current.child; + workInProgress.memoizedProps = current.memoizedProps; + workInProgress.memoizedState = current.memoizedState; + workInProgress.updateQueue = current.updateQueue; // Clone the dependencies object. This is mutated during the render phase, so + // it cannot be shared with the current fiber. + + var currentDependencies = current.dependencies; + workInProgress.dependencies = + currentDependencies === null + ? null + : { + expirationTime: currentDependencies.expirationTime, + firstContext: currentDependencies.firstContext, + responders: currentDependencies.responders, + }; // These will be overridden during the parent's reconciliation + + workInProgress.sibling = current.sibling; + workInProgress.index = current.index; + workInProgress.ref = current.ref; + + if (enableProfilerTimer) { + workInProgress.selfBaseDuration = current.selfBaseDuration; + workInProgress.treeBaseDuration = current.treeBaseDuration; + } + + { + workInProgress._debugNeedsRemount = current._debugNeedsRemount; + + switch (workInProgress.tag) { + case IndeterminateComponent: + case FunctionComponent: + case SimpleMemoComponent: + workInProgress.type = resolveFunctionForHotReloading(current.type); + break; + + case ClassComponent: + workInProgress.type = resolveClassForHotReloading(current.type); + break; + + case ForwardRef: + workInProgress.type = resolveForwardRefForHotReloading(current.type); + break; + + default: + break; + } + } + + return workInProgress; + } // Used to reuse a Fiber for a second pass. + + function resetWorkInProgress(workInProgress, renderExpirationTime) { + // This resets the Fiber to what createFiber or createWorkInProgress would + // have set the values to before during the first pass. Ideally this wouldn't + // be necessary but unfortunately many code paths reads from the workInProgress + // when they should be reading from current and writing to workInProgress. + // We assume pendingProps, index, key, ref, return are still untouched to + // avoid doing another reconciliation. + // Reset the effect tag but keep any Placement tags, since that's something + // that child fiber is setting, not the reconciliation. + workInProgress.effectTag &= Placement; // The effect list is no longer valid. + + workInProgress.nextEffect = null; + workInProgress.firstEffect = null; + workInProgress.lastEffect = null; + var current = workInProgress.alternate; + + if (current === null) { + // Reset to createFiber's initial values. + workInProgress.childExpirationTime = NoWork; + workInProgress.expirationTime = renderExpirationTime; + workInProgress.child = null; + workInProgress.memoizedProps = null; + workInProgress.memoizedState = null; + workInProgress.updateQueue = null; + workInProgress.dependencies = null; + + if (enableProfilerTimer) { + // Note: We don't reset the actualTime counts. It's useful to accumulate + // actual time across multiple render passes. + workInProgress.selfBaseDuration = 0; + workInProgress.treeBaseDuration = 0; + } + } else { + // Reset to the cloned values that createWorkInProgress would've. + workInProgress.childExpirationTime = current.childExpirationTime; + workInProgress.expirationTime = current.expirationTime; + workInProgress.child = current.child; + workInProgress.memoizedProps = current.memoizedProps; + workInProgress.memoizedState = current.memoizedState; + workInProgress.updateQueue = current.updateQueue; // Clone the dependencies object. This is mutated during the render phase, so + // it cannot be shared with the current fiber. + + var currentDependencies = current.dependencies; + workInProgress.dependencies = + currentDependencies === null + ? null + : { + expirationTime: currentDependencies.expirationTime, + firstContext: currentDependencies.firstContext, + responders: currentDependencies.responders, + }; + + if (enableProfilerTimer) { + // Note: We don't reset the actualTime counts. It's useful to accumulate + // actual time across multiple render passes. + workInProgress.selfBaseDuration = current.selfBaseDuration; + workInProgress.treeBaseDuration = current.treeBaseDuration; + } + } + + return workInProgress; + } + function createHostRootFiber(tag) { + var mode; + + if (tag === ConcurrentRoot) { + mode = ConcurrentMode | BlockingMode | StrictMode; + } else if (tag === BlockingRoot) { + mode = BlockingMode | StrictMode; + } else { + mode = NoMode; + } + + if (enableProfilerTimer && isDevToolsPresent) { + // Always collect profile timings when DevTools are present. + // This enables DevTools to start capturing timing at any point– + // Without some nodes in the tree having empty base times. + mode |= ProfileMode; + } + + return createFiber(HostRoot, null, null, mode); + } + function createFiberFromTypeAndProps( + type, // React$ElementType + key, + pendingProps, + owner, + mode, + expirationTime, + ) { + var fiber; + var fiberTag = IndeterminateComponent; // The resolved type is set if we know what the final type will be. I.e. it's not lazy. + + var resolvedType = type; + + if (typeof type === 'function') { + if (shouldConstruct(type)) { + fiberTag = ClassComponent; + + { + resolvedType = resolveClassForHotReloading(resolvedType); + } + } else { + { + resolvedType = resolveFunctionForHotReloading(resolvedType); + } + } + } else if (typeof type === 'string') { + fiberTag = HostComponent; + } else { + getTag: switch (type) { + case REACT_FRAGMENT_TYPE: + return createFiberFromFragment(pendingProps.children, mode, expirationTime, key); + + case REACT_CONCURRENT_MODE_TYPE: + fiberTag = Mode; + mode |= ConcurrentMode | BlockingMode | StrictMode; + break; + + case REACT_STRICT_MODE_TYPE: + fiberTag = Mode; + mode |= StrictMode; + break; + + case REACT_PROFILER_TYPE: + return createFiberFromProfiler(pendingProps, mode, expirationTime, key); + + case REACT_SUSPENSE_TYPE: + return createFiberFromSuspense(pendingProps, mode, expirationTime, key); + + case REACT_SUSPENSE_LIST_TYPE: + return createFiberFromSuspenseList(pendingProps, mode, expirationTime, key); + + default: { + if (typeof type === 'object' && type !== null) { + switch (type.$$typeof) { + case REACT_PROVIDER_TYPE: + fiberTag = ContextProvider; + break getTag; + + case REACT_CONTEXT_TYPE: + // This is a consumer + fiberTag = ContextConsumer; + break getTag; + + case REACT_FORWARD_REF_TYPE: + fiberTag = ForwardRef; + + { + resolvedType = resolveForwardRefForHotReloading(resolvedType); + } + + break getTag; + + case REACT_MEMO_TYPE: + fiberTag = MemoComponent; + break getTag; + + case REACT_LAZY_TYPE: + fiberTag = LazyComponent; + resolvedType = null; + break getTag; + + case REACT_FUNDAMENTAL_TYPE: + if (enableFundamentalAPI) { + return createFiberFromFundamental(type, pendingProps, mode, expirationTime, key); + } + + break; + + case REACT_SCOPE_TYPE: + if (enableScopeAPI) { + return createFiberFromScope(type, pendingProps, mode, expirationTime, key); + } + } + } + + var info = ''; + + { + if ( + type === undefined || + (typeof type === 'object' && type !== null && Object.keys(type).length === 0) + ) { + info += + ' You likely forgot to export your component from the file ' + + "it's defined in, or you might have mixed up default and " + + 'named imports.'; + } + + var ownerName = owner ? getComponentName(owner.type) : null; + + if (ownerName) { + info += '\n\nCheck the render method of `' + ownerName + '`.'; + } + } + + { + { + throw Error( + 'Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: ' + + (type == null ? type : typeof type) + + '.' + + info, + ); + } + } + } + } + } + + fiber = createFiber(fiberTag, pendingProps, key, mode); + fiber.elementType = type; + fiber.type = resolvedType; + fiber.expirationTime = expirationTime; + return fiber; + } + function createFiberFromElement(element, mode, expirationTime) { + var owner = null; + + { + owner = element._owner; + } + + var type = element.type; + var key = element.key; + var pendingProps = element.props; + var fiber = createFiberFromTypeAndProps(type, key, pendingProps, owner, mode, expirationTime); + + { + fiber._debugSource = element._source; + fiber._debugOwner = element._owner; + } + + return fiber; + } + function createFiberFromFragment(elements, mode, expirationTime, key) { + var fiber = createFiber(Fragment, elements, key, mode); + fiber.expirationTime = expirationTime; + return fiber; + } + function createFiberFromFundamental(fundamentalComponent, pendingProps, mode, expirationTime, key) { + var fiber = createFiber(FundamentalComponent, pendingProps, key, mode); + fiber.elementType = fundamentalComponent; + fiber.type = fundamentalComponent; + fiber.expirationTime = expirationTime; + return fiber; + } + + function createFiberFromScope(scope, pendingProps, mode, expirationTime, key) { + var fiber = createFiber(ScopeComponent, pendingProps, key, mode); + fiber.type = scope; + fiber.elementType = scope; + fiber.expirationTime = expirationTime; + return fiber; + } + + function createFiberFromProfiler(pendingProps, mode, expirationTime, key) { + { + if (typeof pendingProps.id !== 'string' || typeof pendingProps.onRender !== 'function') { + warningWithoutStack$1( + false, + 'Profiler must specify an "id" string and "onRender" function as props', + ); + } + } + + var fiber = createFiber(Profiler, pendingProps, key, mode | ProfileMode); // TODO: The Profiler fiber shouldn't have a type. It has a tag. + + fiber.elementType = REACT_PROFILER_TYPE; + fiber.type = REACT_PROFILER_TYPE; + fiber.expirationTime = expirationTime; + return fiber; + } + + function createFiberFromSuspense(pendingProps, mode, expirationTime, key) { + var fiber = createFiber(SuspenseComponent, pendingProps, key, mode); // TODO: The SuspenseComponent fiber shouldn't have a type. It has a tag. + // This needs to be fixed in getComponentName so that it relies on the tag + // instead. + + fiber.type = REACT_SUSPENSE_TYPE; + fiber.elementType = REACT_SUSPENSE_TYPE; + fiber.expirationTime = expirationTime; + return fiber; + } + function createFiberFromSuspenseList(pendingProps, mode, expirationTime, key) { + var fiber = createFiber(SuspenseListComponent, pendingProps, key, mode); + + { + // TODO: The SuspenseListComponent fiber shouldn't have a type. It has a tag. + // This needs to be fixed in getComponentName so that it relies on the tag + // instead. + fiber.type = REACT_SUSPENSE_LIST_TYPE; + } + + fiber.elementType = REACT_SUSPENSE_LIST_TYPE; + fiber.expirationTime = expirationTime; + return fiber; + } + function createFiberFromText(content, mode, expirationTime) { + var fiber = createFiber(HostText, content, null, mode); + fiber.expirationTime = expirationTime; + return fiber; + } + function createFiberFromHostInstanceForDeletion() { + var fiber = createFiber(HostComponent, null, null, NoMode); // TODO: These should not need a type. + + fiber.elementType = 'DELETED'; + fiber.type = 'DELETED'; + return fiber; + } + function createFiberFromDehydratedFragment(dehydratedNode) { + var fiber = createFiber(DehydratedFragment, null, null, NoMode); + fiber.stateNode = dehydratedNode; + return fiber; + } + function createFiberFromPortal(portal, mode, expirationTime) { + var pendingProps = portal.children !== null ? portal.children : []; + var fiber = createFiber(HostPortal, pendingProps, portal.key, mode); + fiber.expirationTime = expirationTime; + fiber.stateNode = { + containerInfo: portal.containerInfo, + pendingChildren: null, + // Used by persistent updates + implementation: portal.implementation, + }; + return fiber; + } // Used for stashing WIP properties to replay failed work in DEV. + + function assignFiberPropertiesInDEV(target, source) { + if (target === null) { + // This Fiber's initial properties will always be overwritten. + // We only use a Fiber to ensure the same hidden class so DEV isn't slow. + target = createFiber(IndeterminateComponent, null, null, NoMode); + } // This is intentionally written as a list of all properties. + // We tried to use Object.assign() instead but this is called in + // the hottest path, and Object.assign() was too slow: + // https://github.com/facebook/react/issues/12502 + // This code is DEV-only so size is not a concern. + + target.tag = source.tag; + target.key = source.key; + target.elementType = source.elementType; + target.type = source.type; + target.stateNode = source.stateNode; + target.return = source.return; + target.child = source.child; + target.sibling = source.sibling; + target.index = source.index; + target.ref = source.ref; + target.pendingProps = source.pendingProps; + target.memoizedProps = source.memoizedProps; + target.updateQueue = source.updateQueue; + target.memoizedState = source.memoizedState; + target.dependencies = source.dependencies; + target.mode = source.mode; + target.effectTag = source.effectTag; + target.nextEffect = source.nextEffect; + target.firstEffect = source.firstEffect; + target.lastEffect = source.lastEffect; + target.expirationTime = source.expirationTime; + target.childExpirationTime = source.childExpirationTime; + target.alternate = source.alternate; + + if (enableProfilerTimer) { + target.actualDuration = source.actualDuration; + target.actualStartTime = source.actualStartTime; + target.selfBaseDuration = source.selfBaseDuration; + target.treeBaseDuration = source.treeBaseDuration; + } + + target._debugID = source._debugID; + target._debugSource = source._debugSource; + target._debugOwner = source._debugOwner; + target._debugIsCurrentlyTiming = source._debugIsCurrentlyTiming; + target._debugNeedsRemount = source._debugNeedsRemount; + target._debugHookTypes = source._debugHookTypes; + return target; + } + + function FiberRootNode(containerInfo, tag, hydrate) { + this.tag = tag; + this.current = null; + this.containerInfo = containerInfo; + this.pendingChildren = null; + this.pingCache = null; + this.finishedExpirationTime = NoWork; + this.finishedWork = null; + this.timeoutHandle = noTimeout; + this.context = null; + this.pendingContext = null; + this.hydrate = hydrate; + this.callbackNode = null; + this.callbackPriority = NoPriority; + this.firstPendingTime = NoWork; + this.firstSuspendedTime = NoWork; + this.lastSuspendedTime = NoWork; + this.nextKnownPendingLevel = NoWork; + this.lastPingedTime = NoWork; + this.lastExpiredTime = NoWork; + + if (enableSchedulerTracing) { + this.interactionThreadID = tracing.unstable_getThreadID(); + this.memoizedInteractions = new Set(); + this.pendingInteractionMap = new Map(); + } + + if (enableSuspenseCallback) { + this.hydrationCallbacks = null; + } + } + + function createFiberRoot(containerInfo, tag, hydrate, hydrationCallbacks) { + var root = new FiberRootNode(containerInfo, tag, hydrate); + + if (enableSuspenseCallback) { + root.hydrationCallbacks = hydrationCallbacks; + } // Cyclic construction. This cheats the type system right now because + // stateNode is any. + + var uninitializedFiber = createHostRootFiber(tag); + root.current = uninitializedFiber; + uninitializedFiber.stateNode = root; + return root; + } + function isRootSuspendedAtTime(root, expirationTime) { + var firstSuspendedTime = root.firstSuspendedTime; + var lastSuspendedTime = root.lastSuspendedTime; + return ( + firstSuspendedTime !== NoWork && + firstSuspendedTime >= expirationTime && + lastSuspendedTime <= expirationTime + ); + } + function markRootSuspendedAtTime(root, expirationTime) { + var firstSuspendedTime = root.firstSuspendedTime; + var lastSuspendedTime = root.lastSuspendedTime; + + if (firstSuspendedTime < expirationTime) { + root.firstSuspendedTime = expirationTime; + } + + if (lastSuspendedTime > expirationTime || firstSuspendedTime === NoWork) { + root.lastSuspendedTime = expirationTime; + } + + if (expirationTime <= root.lastPingedTime) { + root.lastPingedTime = NoWork; + } + + if (expirationTime <= root.lastExpiredTime) { + root.lastExpiredTime = NoWork; + } + } + function markRootUpdatedAtTime(root, expirationTime) { + // Update the range of pending times + var firstPendingTime = root.firstPendingTime; + + if (expirationTime > firstPendingTime) { + root.firstPendingTime = expirationTime; + } // Update the range of suspended times. Treat everything lower priority or + // equal to this update as unsuspended. + + var firstSuspendedTime = root.firstSuspendedTime; + + if (firstSuspendedTime !== NoWork) { + if (expirationTime >= firstSuspendedTime) { + // The entire suspended range is now unsuspended. + root.firstSuspendedTime = root.lastSuspendedTime = root.nextKnownPendingLevel = NoWork; + } else if (expirationTime >= root.lastSuspendedTime) { + root.lastSuspendedTime = expirationTime + 1; + } // This is a pending level. Check if it's higher priority than the next + // known pending level. + + if (expirationTime > root.nextKnownPendingLevel) { + root.nextKnownPendingLevel = expirationTime; + } + } + } + function markRootFinishedAtTime(root, finishedExpirationTime, remainingExpirationTime) { + // Update the range of pending times + root.firstPendingTime = remainingExpirationTime; // Update the range of suspended times. Treat everything higher priority or + // equal to this update as unsuspended. + + if (finishedExpirationTime <= root.lastSuspendedTime) { + // The entire suspended range is now unsuspended. + root.firstSuspendedTime = root.lastSuspendedTime = root.nextKnownPendingLevel = NoWork; + } else if (finishedExpirationTime <= root.firstSuspendedTime) { + // Part of the suspended range is now unsuspended. Narrow the range to + // include everything between the unsuspended time (non-inclusive) and the + // last suspended time. + root.firstSuspendedTime = finishedExpirationTime - 1; + } + + if (finishedExpirationTime <= root.lastPingedTime) { + // Clear the pinged time + root.lastPingedTime = NoWork; + } + + if (finishedExpirationTime <= root.lastExpiredTime) { + // Clear the expired time + root.lastExpiredTime = NoWork; + } + } + function markRootExpiredAtTime(root, expirationTime) { + var lastExpiredTime = root.lastExpiredTime; + + if (lastExpiredTime === NoWork || lastExpiredTime > expirationTime) { + root.lastExpiredTime = expirationTime; + } + } + + // This lets us hook into Fiber to debug what it's doing. + // See https://github.com/facebook/react/pull/8033. + // This is not part of the public API, not even for React DevTools. + // You may only inject a debugTool if you work on React Fiber itself. + var ReactFiberInstrumentation = { + debugTool: null, + }; + var ReactFiberInstrumentation_1 = ReactFiberInstrumentation; + + var didWarnAboutNestedUpdates; + var didWarnAboutFindNodeInStrictMode; + + { + didWarnAboutNestedUpdates = false; + didWarnAboutFindNodeInStrictMode = {}; + } + + function getContextForSubtree(parentComponent) { + if (!parentComponent) { + return emptyContextObject; + } + + var fiber = get(parentComponent); + var parentContext = findCurrentUnmaskedContext(fiber); + + if (fiber.tag === ClassComponent) { + var Component = fiber.type; + + if (isContextProvider(Component)) { + return processChildContext(fiber, Component, parentContext); + } + } + + return parentContext; + } + + function findHostInstance(component) { + var fiber = get(component); + + if (fiber === undefined) { + if (typeof component.render === 'function') { + { + { + throw Error('Unable to find node on an unmounted component.'); + } + } + } else { + { + { + throw Error( + 'Argument appears to not be a ReactComponent. Keys: ' + Object.keys(component), + ); + } + } + } + } + + var hostFiber = findCurrentHostFiber(fiber); + + if (hostFiber === null) { + return null; + } + + return hostFiber.stateNode; + } + + function findHostInstanceWithWarning(component, methodName) { + { + var fiber = get(component); + + if (fiber === undefined) { + if (typeof component.render === 'function') { + { + { + throw Error('Unable to find node on an unmounted component.'); + } + } + } else { + { + { + throw Error( + 'Argument appears to not be a ReactComponent. Keys: ' + Object.keys(component), + ); + } + } + } + } + + var hostFiber = findCurrentHostFiber(fiber); + + if (hostFiber === null) { + return null; + } + + if (hostFiber.mode & StrictMode) { + var componentName = getComponentName(fiber.type) || 'Component'; + + if (!didWarnAboutFindNodeInStrictMode[componentName]) { + didWarnAboutFindNodeInStrictMode[componentName] = true; + + if (fiber.mode & StrictMode) { + warningWithoutStack$1( + false, + '%s is deprecated in StrictMode. ' + + '%s was passed an instance of %s which is inside StrictMode. ' + + 'Instead, add a ref directly to the element you want to reference. ' + + 'Learn more about using refs safely here: ' + + 'https://fb.me/react-strict-mode-find-node%s', + methodName, + methodName, + componentName, + getStackByFiberInDevAndProd(hostFiber), + ); + } else { + warningWithoutStack$1( + false, + '%s is deprecated in StrictMode. ' + + '%s was passed an instance of %s which renders StrictMode children. ' + + 'Instead, add a ref directly to the element you want to reference. ' + + 'Learn more about using refs safely here: ' + + 'https://fb.me/react-strict-mode-find-node%s', + methodName, + methodName, + componentName, + getStackByFiberInDevAndProd(hostFiber), + ); + } + } + } + + return hostFiber.stateNode; + } + + return findHostInstance(component); + } + + function createContainer(containerInfo, tag, hydrate, hydrationCallbacks) { + return createFiberRoot(containerInfo, tag, hydrate, hydrationCallbacks); + } + function updateContainer(element, container, parentComponent, callback) { + var current$$1 = container.current; + var currentTime = requestCurrentTimeForUpdate(); + + { + // $FlowExpectedError - jest isn't a global, and isn't recognized outside of tests + if ('undefined' !== typeof jest) { + warnIfUnmockedScheduler(current$$1); + warnIfNotScopedWithMatchingAct(current$$1); + } + } + + var suspenseConfig = requestCurrentSuspenseConfig(); + var expirationTime = computeExpirationForFiber(currentTime, current$$1, suspenseConfig); + + { + if (ReactFiberInstrumentation_1.debugTool) { + if (current$$1.alternate === null) { + ReactFiberInstrumentation_1.debugTool.onMountContainer(container); + } else if (element === null) { + ReactFiberInstrumentation_1.debugTool.onUnmountContainer(container); + } else { + ReactFiberInstrumentation_1.debugTool.onUpdateContainer(container); + } + } + } + + var context = getContextForSubtree(parentComponent); + + if (container.context === null) { + container.context = context; + } else { + container.pendingContext = context; + } + + { + if (phase === 'render' && current !== null && !didWarnAboutNestedUpdates) { + didWarnAboutNestedUpdates = true; + warningWithoutStack$1( + false, + 'Render methods should be a pure function of props and state; ' + + 'triggering nested component updates from render is not allowed. ' + + 'If necessary, trigger nested updates in componentDidUpdate.\n\n' + + 'Check the render method of %s.', + getComponentName(current.type) || 'Unknown', + ); + } + } + + var update = createUpdate(expirationTime, suspenseConfig); // Caution: React DevTools currently depends on this property + // being called "element". + + update.payload = { + element: element, + }; + callback = callback === undefined ? null : callback; + + if (callback !== null) { + !(typeof callback === 'function') + ? warningWithoutStack$1( + false, + 'render(...): Expected the last optional `callback` argument to be a ' + + 'function. Instead received: %s.', + callback, + ) + : void 0; + update.callback = callback; + } + + enqueueUpdate(current$$1, update); + scheduleWork(current$$1, expirationTime); + return expirationTime; + } + function getPublicRootInstance(container) { + var containerFiber = container.current; + + if (!containerFiber.child) { + return null; + } + + switch (containerFiber.child.tag) { + case HostComponent: + return getPublicInstance(containerFiber.child.stateNode); + + default: + return containerFiber.child.stateNode; + } + } + function attemptSynchronousHydration$1(fiber) { + switch (fiber.tag) { + case HostRoot: + var root = fiber.stateNode; + + if (root.hydrate) { + // Flush the first scheduled "update". + flushRoot(root, root.firstPendingTime); + } + + break; + + case SuspenseComponent: + flushSync(function () { + return scheduleWork(fiber, Sync); + }); // If we're still blocked after this, we need to increase + // the priority of any promises resolving within this + // boundary so that they next attempt also has higher pri. + + var retryExpTime = computeInteractiveExpiration(requestCurrentTimeForUpdate()); + markRetryTimeIfNotHydrated(fiber, retryExpTime); + break; + } + } + + function markRetryTimeImpl(fiber, retryTime) { + var suspenseState = fiber.memoizedState; + + if (suspenseState !== null && suspenseState.dehydrated !== null) { + if (suspenseState.retryTime < retryTime) { + suspenseState.retryTime = retryTime; + } + } + } // Increases the priority of thennables when they resolve within this boundary. + + function markRetryTimeIfNotHydrated(fiber, retryTime) { + markRetryTimeImpl(fiber, retryTime); + var alternate = fiber.alternate; + + if (alternate) { + markRetryTimeImpl(alternate, retryTime); + } + } + + function attemptUserBlockingHydration$1(fiber) { + if (fiber.tag !== SuspenseComponent) { + // We ignore HostRoots here because we can't increase + // their priority and they should not suspend on I/O, + // since you have to wrap anything that might suspend in + // Suspense. + return; + } + + var expTime = computeInteractiveExpiration(requestCurrentTimeForUpdate()); + scheduleWork(fiber, expTime); + markRetryTimeIfNotHydrated(fiber, expTime); + } + function attemptContinuousHydration$1(fiber) { + if (fiber.tag !== SuspenseComponent) { + // We ignore HostRoots here because we can't increase + // their priority and they should not suspend on I/O, + // since you have to wrap anything that might suspend in + // Suspense. + return; + } + + var expTime = computeContinuousHydrationExpiration(requestCurrentTimeForUpdate()); + scheduleWork(fiber, expTime); + markRetryTimeIfNotHydrated(fiber, expTime); + } + function attemptHydrationAtCurrentPriority$1(fiber) { + if (fiber.tag !== SuspenseComponent) { + // We ignore HostRoots here because we can't increase + // their priority other than synchronously flush it. + return; + } + + var currentTime = requestCurrentTimeForUpdate(); + var expTime = computeExpirationForFiber(currentTime, fiber, null); + scheduleWork(fiber, expTime); + markRetryTimeIfNotHydrated(fiber, expTime); + } + function findHostInstanceWithNoPortals(fiber) { + var hostFiber = findCurrentHostFiberWithNoPortals(fiber); + + if (hostFiber === null) { + return null; + } + + if (hostFiber.tag === FundamentalComponent) { + return hostFiber.stateNode.instance; + } + + return hostFiber.stateNode; + } + + var shouldSuspendImpl = function (fiber) { + return false; + }; + + function shouldSuspend(fiber) { + return shouldSuspendImpl(fiber); + } + var overrideHookState = null; + var overrideProps = null; + var scheduleUpdate = null; + var setSuspenseHandler = null; + + { + var copyWithSetImpl = function (obj, path, idx, value) { + if (idx >= path.length) { + return value; + } + + var key = path[idx]; + var updated = Array.isArray(obj) ? obj.slice() : _assign({}, obj); // $FlowFixMe number or string is fine here + + updated[key] = copyWithSetImpl(obj[key], path, idx + 1, value); + return updated; + }; + + var copyWithSet = function (obj, path, value) { + return copyWithSetImpl(obj, path, 0, value); + }; // Support DevTools editable values for useState and useReducer. + + overrideHookState = function (fiber, id, path, value) { + // For now, the "id" of stateful hooks is just the stateful hook index. + // This may change in the future with e.g. nested hooks. + var currentHook = fiber.memoizedState; + + while (currentHook !== null && id > 0) { + currentHook = currentHook.next; + id--; + } + + if (currentHook !== null) { + var newState = copyWithSet(currentHook.memoizedState, path, value); + currentHook.memoizedState = newState; + currentHook.baseState = newState; // We aren't actually adding an update to the queue, + // because there is no update we can add for useReducer hooks that won't trigger an error. + // (There's no appropriate action type for DevTools overrides.) + // As a result though, React will see the scheduled update as a noop and bailout. + // Shallow cloning props works as a workaround for now to bypass the bailout check. + + fiber.memoizedProps = _assign({}, fiber.memoizedProps); + scheduleWork(fiber, Sync); + } + }; // Support DevTools props for function components, forwardRef, memo, host components, etc. + + overrideProps = function (fiber, path, value) { + fiber.pendingProps = copyWithSet(fiber.memoizedProps, path, value); + + if (fiber.alternate) { + fiber.alternate.pendingProps = fiber.pendingProps; + } + + scheduleWork(fiber, Sync); + }; + + scheduleUpdate = function (fiber) { + scheduleWork(fiber, Sync); + }; + + setSuspenseHandler = function (newShouldSuspendImpl) { + shouldSuspendImpl = newShouldSuspendImpl; + }; + } + + function injectIntoDevTools(devToolsConfig) { + var findFiberByHostInstance = devToolsConfig.findFiberByHostInstance; + var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher; + return injectInternals( + _assign({}, devToolsConfig, { + overrideHookState: overrideHookState, + overrideProps: overrideProps, + setSuspenseHandler: setSuspenseHandler, + scheduleUpdate: scheduleUpdate, + currentDispatcherRef: ReactCurrentDispatcher, + findHostInstanceByFiber: function (fiber) { + var hostFiber = findCurrentHostFiber(fiber); + + if (hostFiber === null) { + return null; + } + + return hostFiber.stateNode; + }, + findFiberByHostInstance: function (instance) { + if (!findFiberByHostInstance) { + // Might not be implemented by the renderer. + return null; + } + + return findFiberByHostInstance(instance); + }, + // React Refresh + findHostInstancesForRefresh: findHostInstancesForRefresh, + scheduleRefresh: scheduleRefresh, + scheduleRoot: scheduleRoot, + setRefreshHandler: setRefreshHandler, + // Enables DevTools to append owner stacks to error messages in DEV mode. + getCurrentFiber: function () { + return current; + }, + }), + ); + } + + // This file intentionally does *not* have the Flow annotation. + // Don't add it. See `./inline-typed.js` for an explanation. + + // TODO: This type is shared between the reconciler and ReactDOM, but will + // eventually be lifted out to the renderer. + function ReactDOMRoot(container, options) { + this._internalRoot = createRootImpl(container, ConcurrentRoot, options); + } + + function ReactDOMBlockingRoot(container, tag, options) { + this._internalRoot = createRootImpl(container, tag, options); + } + + ReactDOMRoot.prototype.render = ReactDOMBlockingRoot.prototype.render = function ( + children, + callback, + ) { + var root = this._internalRoot; + var cb = callback === undefined ? null : callback; + + { + warnOnInvalidCallback(cb, 'render'); + } + + updateContainer(children, root, null, cb); + }; + + ReactDOMRoot.prototype.unmount = ReactDOMBlockingRoot.prototype.unmount = function (callback) { + var root = this._internalRoot; + var cb = callback === undefined ? null : callback; + + { + warnOnInvalidCallback(cb, 'render'); + } + + var container = root.containerInfo; + updateContainer(null, root, null, function () { + unmarkContainerAsRoot(container); + + if (cb !== null) { + cb(); + } + }); + }; + + function createRootImpl(container, tag, options) { + // Tag is either LegacyRoot or Concurrent Root + var hydrate = options != null && options.hydrate === true; + var hydrationCallbacks = (options != null && options.hydrationOptions) || null; + var root = createContainer(container, tag, hydrate, hydrationCallbacks); + markContainerAsRoot(root.current, container); + + if (hydrate && tag !== LegacyRoot) { + var doc = container.nodeType === DOCUMENT_NODE ? container : container.ownerDocument; + eagerlyTrapReplayableEvents(doc); + } + + return root; + } + + function createRoot(container, options) { + if (!isValidContainer(container)) { + { + throw Error('createRoot(...): Target container is not a DOM element.'); + } + } + + warnIfReactDOMContainerInDEV(container); + return new ReactDOMRoot(container, options); + } + function createBlockingRoot(container, options) { + if (!isValidContainer(container)) { + { + throw Error('createRoot(...): Target container is not a DOM element.'); + } + } + + warnIfReactDOMContainerInDEV(container); + return new ReactDOMBlockingRoot(container, BlockingRoot, options); + } + function createLegacyRoot(container, options) { + return new ReactDOMBlockingRoot(container, LegacyRoot, options); + } + function isValidContainer(node) { + return !!( + node && + (node.nodeType === ELEMENT_NODE || + node.nodeType === DOCUMENT_NODE || + node.nodeType === DOCUMENT_FRAGMENT_NODE || + (node.nodeType === COMMENT_NODE && node.nodeValue === ' react-mount-point-unstable ')) + ); + } + function warnOnInvalidCallback(callback, callerName) { + { + !(callback === null || typeof callback === 'function') + ? warningWithoutStack$1( + false, + '%s(...): Expected the last optional `callback` argument to be a ' + + 'function. Instead received: %s.', + callerName, + callback, + ) + : void 0; + } + } + + function warnIfReactDOMContainerInDEV(container) { + { + if (isContainerMarkedAsRoot(container)) { + if (container._reactRootContainer) { + warningWithoutStack$1( + false, + 'You are calling ReactDOM.createRoot() on a container that was previously ' + + 'passed to ReactDOM.render(). This is not supported.', + ); + } else { + warningWithoutStack$1( + false, + 'You are calling ReactDOM.createRoot() on a container that ' + + 'has already been passed to createRoot() before. Instead, call ' + + 'root.render() on the existing root instead if you want to update it.', + ); + } + } + } + } + + var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner; + var topLevelUpdateWarnings; + var warnedAboutHydrateAPI = false; + + { + topLevelUpdateWarnings = function (container) { + if (container._reactRootContainer && container.nodeType !== COMMENT_NODE) { + var hostInstance = findHostInstanceWithNoPortals( + container._reactRootContainer._internalRoot.current, + ); + + if (hostInstance) { + !(hostInstance.parentNode === container) + ? warningWithoutStack$1( + false, + 'render(...): It looks like the React-rendered content of this ' + + 'container was removed without using React. This is not ' + + 'supported and will cause errors. Instead, call ' + + 'ReactDOM.unmountComponentAtNode to empty a container.', + ) + : void 0; + } + } + + var isRootRenderedBySomeReact = !!container._reactRootContainer; + var rootEl = getReactRootElementInContainer(container); + var hasNonRootReactChild = !!(rootEl && getInstanceFromNode$1(rootEl)); + !(!hasNonRootReactChild || isRootRenderedBySomeReact) + ? warningWithoutStack$1( + false, + 'render(...): Replacing React-rendered children with a new root ' + + 'component. If you intended to update the children of this node, ' + + 'you should instead have the existing children update their state ' + + 'and render the new components instead of calling ReactDOM.render.', + ) + : void 0; + !( + container.nodeType !== ELEMENT_NODE || + !container.tagName || + container.tagName.toUpperCase() !== 'BODY' + ) + ? warningWithoutStack$1( + false, + 'render(): Rendering components directly into document.body is ' + + 'discouraged, since its children are often manipulated by third-party ' + + 'scripts and browser extensions. This may lead to subtle ' + + 'reconciliation issues. Try rendering into a container element created ' + + 'for your app.', + ) + : void 0; + }; + } + + function getReactRootElementInContainer(container) { + if (!container) { + return null; + } + + if (container.nodeType === DOCUMENT_NODE) { + return container.documentElement; + } else { + return container.firstChild; + } + } + + function shouldHydrateDueToLegacyHeuristic(container) { + var rootElement = getReactRootElementInContainer(container); + return !!( + rootElement && + rootElement.nodeType === ELEMENT_NODE && + rootElement.hasAttribute(ROOT_ATTRIBUTE_NAME) + ); + } + + function legacyCreateRootFromDOMContainer(container, forceHydrate) { + var shouldHydrate = forceHydrate || shouldHydrateDueToLegacyHeuristic(container); // First clear any existing content. + + if (!shouldHydrate) { + var warned = false; + var rootSibling; + + while ((rootSibling = container.lastChild)) { + { + if ( + !warned && + rootSibling.nodeType === ELEMENT_NODE && + rootSibling.hasAttribute(ROOT_ATTRIBUTE_NAME) + ) { + warned = true; + warningWithoutStack$1( + false, + 'render(): Target node has markup rendered by React, but there ' + + 'are unrelated nodes as well. This is most commonly caused by ' + + 'white-space inserted around server-rendered markup.', + ); + } + } + + container.removeChild(rootSibling); + } + } + + { + if (shouldHydrate && !forceHydrate && !warnedAboutHydrateAPI) { + warnedAboutHydrateAPI = true; + lowPriorityWarningWithoutStack$1( + false, + 'render(): Calling ReactDOM.render() to hydrate server-rendered markup ' + + 'will stop working in React v17. Replace the ReactDOM.render() call ' + + 'with ReactDOM.hydrate() if you want React to attach to the server HTML.', + ); + } + } + + return createLegacyRoot( + container, + shouldHydrate + ? { + hydrate: true, + } + : undefined, + ); + } + + function legacyRenderSubtreeIntoContainer( + parentComponent, + children, + container, + forceHydrate, + callback, + ) { + { + topLevelUpdateWarnings(container); + warnOnInvalidCallback(callback === undefined ? null : callback, 'render'); + } // TODO: Without `any` type, Flow says "Property cannot be accessed on any + // member of intersection type." Whyyyyyy. + + var root = container._reactRootContainer; + var fiberRoot; + + if (!root) { + // Initial mount + root = container._reactRootContainer = legacyCreateRootFromDOMContainer( + container, + forceHydrate, + ); + fiberRoot = root._internalRoot; + + if (typeof callback === 'function') { + var originalCallback = callback; + + callback = function () { + var instance = getPublicRootInstance(fiberRoot); + originalCallback.call(instance); + }; + } // Initial mount should not be batched. + + unbatchedUpdates(function () { + updateContainer(children, fiberRoot, parentComponent, callback); + }); + } else { + fiberRoot = root._internalRoot; + + if (typeof callback === 'function') { + var _originalCallback = callback; + + callback = function () { + var instance = getPublicRootInstance(fiberRoot); + + _originalCallback.call(instance); + }; + } // Update + + updateContainer(children, fiberRoot, parentComponent, callback); + } + + return getPublicRootInstance(fiberRoot); + } + + function findDOMNode(componentOrElement) { + { + var owner = ReactCurrentOwner$1.current; + + if (owner !== null && owner.stateNode !== null) { + var warnedAboutRefsInRender = owner.stateNode._warnedAboutRefsInRender; + !warnedAboutRefsInRender + ? warningWithoutStack$1( + false, + '%s is accessing findDOMNode inside its render(). ' + + 'render() should be a pure function of props and state. It should ' + + 'never access something that requires stale data from the previous ' + + 'render, such as refs. Move this logic to componentDidMount and ' + + 'componentDidUpdate instead.', + getComponentName(owner.type) || 'A component', + ) + : void 0; + owner.stateNode._warnedAboutRefsInRender = true; + } + } + + if (componentOrElement == null) { + return null; + } + + if (componentOrElement.nodeType === ELEMENT_NODE) { + return componentOrElement; + } + + { + return findHostInstanceWithWarning(componentOrElement, 'findDOMNode'); + } + + return findHostInstance(componentOrElement); + } + function hydrate(element, container, callback) { + if (!isValidContainer(container)) { + { + throw Error('Target container is not a DOM element.'); + } + } + + { + var isModernRoot = + isContainerMarkedAsRoot(container) && container._reactRootContainer === undefined; + + if (isModernRoot) { + warningWithoutStack$1( + false, + 'You are calling ReactDOM.hydrate() on a container that was previously ' + + 'passed to ReactDOM.createRoot(). This is not supported. ' + + 'Did you mean to call createRoot(container, {hydrate: true}).render(element)?', + ); + } + } // TODO: throw or warn if we couldn't hydrate? + + return legacyRenderSubtreeIntoContainer(null, element, container, true, callback); + } + function render(element, container, callback) { + if (!isValidContainer(container)) { + { + throw Error('Target container is not a DOM element.'); + } + } + + { + var isModernRoot = + isContainerMarkedAsRoot(container) && container._reactRootContainer === undefined; + + if (isModernRoot) { + warningWithoutStack$1( + false, + 'You are calling ReactDOM.render() on a container that was previously ' + + 'passed to ReactDOM.createRoot(). This is not supported. ' + + 'Did you mean to call root.render(element)?', + ); + } + } + + return legacyRenderSubtreeIntoContainer(null, element, container, false, callback); + } + function unstable_renderSubtreeIntoContainer(parentComponent, element, containerNode, callback) { + if (!isValidContainer(containerNode)) { + { + throw Error('Target container is not a DOM element.'); + } + } + + if (!(parentComponent != null && has(parentComponent))) { + { + throw Error('parentComponent must be a valid React Component'); + } + } + + return legacyRenderSubtreeIntoContainer(parentComponent, element, containerNode, false, callback); + } + function unmountComponentAtNode(container) { + if (!isValidContainer(container)) { + { + throw Error('unmountComponentAtNode(...): Target container is not a DOM element.'); + } + } + + { + var isModernRoot = + isContainerMarkedAsRoot(container) && container._reactRootContainer === undefined; + + if (isModernRoot) { + warningWithoutStack$1( + false, + 'You are calling ReactDOM.unmountComponentAtNode() on a container that was previously ' + + 'passed to ReactDOM.createRoot(). This is not supported. Did you mean to call root.unmount()?', + ); + } + } + + if (container._reactRootContainer) { + { + var rootEl = getReactRootElementInContainer(container); + var renderedByDifferentReact = rootEl && !getInstanceFromNode$1(rootEl); + !!renderedByDifferentReact + ? warningWithoutStack$1( + false, + "unmountComponentAtNode(): The node you're attempting to unmount " + + 'was rendered by another copy of React.', + ) + : void 0; + } // Unmount should not be batched. + + unbatchedUpdates(function () { + legacyRenderSubtreeIntoContainer(null, null, container, false, function () { + container._reactRootContainer = null; + unmarkContainerAsRoot(container); + }); + }); // If you call unmountComponentAtNode twice in quick succession, you'll + // get `true` twice. That's probably fine? + + return true; + } else { + { + var _rootEl = getReactRootElementInContainer(container); + + var hasNonRootReactChild = !!(_rootEl && getInstanceFromNode$1(_rootEl)); // Check if the container itself is a React root node. + + var isContainerReactRoot = + container.nodeType === ELEMENT_NODE && + isValidContainer(container.parentNode) && + !!container.parentNode._reactRootContainer; + !!hasNonRootReactChild + ? warningWithoutStack$1( + false, + "unmountComponentAtNode(): The node you're attempting to unmount " + + 'was rendered by React and is not a top-level container. %s', + isContainerReactRoot + ? 'You may have accidentally passed in a React root node instead ' + + 'of its container.' + : 'Instead, have the parent component update its state and ' + + 'rerender in order to remove this component.', + ) + : void 0; + } + + return false; + } + } + + function createPortal$1( + children, + containerInfo, // TODO: figure out the API for cross-renderer implementation. + implementation, + ) { + var key = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null; + return { + // This tag allow us to uniquely identify this as a React Portal + $$typeof: REACT_PORTAL_TYPE, + key: key == null ? null : '' + key, + children: children, + containerInfo: containerInfo, + implementation: implementation, + }; + } + + // TODO: this is special because it gets imported during build. + + var ReactVersion = '16.12.0'; + + setAttemptSynchronousHydration(attemptSynchronousHydration$1); + setAttemptUserBlockingHydration(attemptUserBlockingHydration$1); + setAttemptContinuousHydration(attemptContinuousHydration$1); + setAttemptHydrationAtCurrentPriority(attemptHydrationAtCurrentPriority$1); + var didWarnAboutUnstableCreatePortal = false; + + { + if ( + typeof Map !== 'function' || // $FlowIssue Flow incorrectly thinks Map has no prototype + Map.prototype == null || + typeof Map.prototype.forEach !== 'function' || + typeof Set !== 'function' || // $FlowIssue Flow incorrectly thinks Set has no prototype + Set.prototype == null || + typeof Set.prototype.clear !== 'function' || + typeof Set.prototype.forEach !== 'function' + ) { + warningWithoutStack$1( + false, + 'React depends on Map and Set built-in types. Make sure that you load a ' + + 'polyfill in older browsers. https://fb.me/react-polyfills', + ); + } + } + + setRestoreImplementation(restoreControlledState$$1); + setBatchingImplementation( + batchedUpdates$1, + discreteUpdates$1, + flushDiscreteUpdates, + batchedEventUpdates$1, + ); + + function createPortal$$1(children, container) { + var key = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null; + + if (!isValidContainer(container)) { + { + throw Error('Target container is not a DOM element.'); + } + } // TODO: pass ReactDOM portal implementation as third argument + + return createPortal$1(children, container, null, key); + } + + var ReactDOM = { + createPortal: createPortal$$1, + // Legacy + findDOMNode: findDOMNode, + hydrate: hydrate, + render: render, + unstable_renderSubtreeIntoContainer: unstable_renderSubtreeIntoContainer, + unmountComponentAtNode: unmountComponentAtNode, + // Temporary alias since we already shipped React 16 RC with it. + // TODO: remove in React 17. + unstable_createPortal: function () { + if (!didWarnAboutUnstableCreatePortal) { + didWarnAboutUnstableCreatePortal = true; + lowPriorityWarningWithoutStack$1( + false, + 'The ReactDOM.unstable_createPortal() alias has been deprecated, ' + + 'and will be removed in React 17+. Update your code to use ' + + 'ReactDOM.createPortal() instead. It has the exact same API, ' + + 'but without the "unstable_" prefix.', + ); + } + + return createPortal$$1.apply(void 0, arguments); + }, + unstable_batchedUpdates: batchedUpdates$1, + flushSync: flushSync, + __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: { + // Keep in sync with ReactDOMUnstableNativeDependencies.js + // ReactTestUtils.js, and ReactTestUtilsAct.js. This is an array for better minification. + Events: [ + getInstanceFromNode$1, + getNodeFromInstance$1, + getFiberCurrentPropsFromNode$1, + injection.injectEventPluginsByName, + eventNameDispatchConfigs, + accumulateTwoPhaseDispatches, + accumulateDirectDispatches, + enqueueStateRestore, + restoreStateIfNeeded, + dispatchEvent, + runEventsInBatch, + flushPassiveEffects, + IsThisRendererActing, + ], + }, + }; + + if (exposeConcurrentModeAPIs) { + ReactDOM.createRoot = createRoot; + ReactDOM.createBlockingRoot = createBlockingRoot; + ReactDOM.unstable_discreteUpdates = discreteUpdates$1; + ReactDOM.unstable_flushDiscreteUpdates = flushDiscreteUpdates; + ReactDOM.unstable_flushControlled = flushControlled; + + ReactDOM.unstable_scheduleHydration = function (target) { + if (target) { + queueExplicitHydrationTarget(target); + } + }; + } + + var foundDevTools = injectIntoDevTools({ + findFiberByHostInstance: getClosestInstanceFromNode, + bundleType: 1, + version: ReactVersion, + rendererPackageName: 'react-dom', + }); + + { + if (!foundDevTools && canUseDOM && window.top === window.self) { + // If we're in Chrome or Firefox, provide a download link if not installed. + if ( + (navigator.userAgent.indexOf('Chrome') > -1 && navigator.userAgent.indexOf('Edge') === -1) || + navigator.userAgent.indexOf('Firefox') > -1 + ) { + var protocol = window.location.protocol; // Don't warn in exotic cases like chrome-extension://. + + if (/^(https?|file):$/.test(protocol)) { + console.info( + '%cDownload the React DevTools ' + + 'for a better development experience: ' + + 'https://fb.me/react-devtools' + + (protocol === 'file:' + ? '\nYou might need to use a local HTTP server (instead of file://): ' + + 'https://fb.me/react-devtools-faq' + : ''), + 'font-weight:bold', + ); + } + } + } + } + + var ReactDOM$2 = Object.freeze({ + default: ReactDOM, + }); + + var ReactDOM$3 = (ReactDOM$2 && ReactDOM) || ReactDOM$2; + + // TODO: decide on the top-level export form. + // This is hacky but makes it work with both Rollup and Jest. + + var reactDom = ReactDOM$3.default || ReactDOM$3; + + module.exports = reactDom; + })(); + } + + /***/ + }, + /* 512 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** @license React v16.12.0 + * react.development.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + + if (true) { + (function () { + 'use strict'; + + var _assign = __webpack_require__(64); + var checkPropTypes = __webpack_require__(107); + + // TODO: this is special because it gets imported during build. + + var ReactVersion = '16.12.0'; + + // The Symbol used to tag the ReactElement-like types. If there is no native Symbol + // nor polyfill, then a plain number is used for performance. + var hasSymbol = typeof Symbol === 'function' && Symbol.for; + var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7; + var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca; + var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb; + var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc; + var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2; + var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd; + var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary + // (unstable) APIs that have been removed. Can we remove the symbols? + + var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf; + var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0; + var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1; + var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8; + var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3; + var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4; + var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5; + var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6; + var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7; + var MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; + var FAUX_ITERATOR_SYMBOL = '@@iterator'; + function getIteratorFn(maybeIterable) { + if (maybeIterable === null || typeof maybeIterable !== 'object') { + return null; + } + + var maybeIterator = + (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) || + maybeIterable[FAUX_ITERATOR_SYMBOL]; + + if (typeof maybeIterator === 'function') { + return maybeIterator; + } + + return null; + } + + // Do not require this module directly! Use normal `invariant` calls with + // template literal strings. The messages will be replaced with error codes + // during build. + + /** + * Use invariant() to assert state which your program assumes to be true. + * + * Provide sprintf-style format (only %s is supported) and arguments + * to provide information about what broke and what you were + * expecting. + * + * The invariant message will be stripped in production, but the invariant + * will remain to ensure logic does not differ in production. + */ + + /** + * Forked from fbjs/warning: + * https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js + * + * Only change is we use console.warn instead of console.error, + * and do nothing when 'console' is not supported. + * This really simplifies the code. + * --- + * Similar to invariant but only logs a warning if the condition is not met. + * This can be used to log issues in development environments in critical + * paths. Removing the logging code for production environments will keep the + * same logic and follow the same code paths. + */ + var lowPriorityWarningWithoutStack = function () {}; + + { + var printWarning = function (format) { + for ( + var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; + _key < _len; + _key++ + ) { + args[_key - 1] = arguments[_key]; + } + + var argIndex = 0; + var message = + 'Warning: ' + + format.replace(/%s/g, function () { + return args[argIndex++]; + }); + + if (typeof console !== 'undefined') { + console.warn(message); + } + + try { + // --- Welcome to debugging React --- + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + throw new Error(message); + } catch (x) {} + }; + + lowPriorityWarningWithoutStack = function (condition, format) { + if (format === undefined) { + throw new Error( + '`lowPriorityWarningWithoutStack(condition, format, ...args)` requires a warning ' + + 'message argument', + ); + } + + if (!condition) { + for ( + var _len2 = arguments.length, args = new Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; + _key2 < _len2; + _key2++ + ) { + args[_key2 - 2] = arguments[_key2]; + } + + printWarning.apply(void 0, [format].concat(args)); + } + }; + } + + var lowPriorityWarningWithoutStack$1 = lowPriorityWarningWithoutStack; + + /** + * Similar to invariant but only logs a warning if the condition is not met. + * This can be used to log issues in development environments in critical + * paths. Removing the logging code for production environments will keep the + * same logic and follow the same code paths. + */ + var warningWithoutStack = function () {}; + + { + warningWithoutStack = function (condition, format) { + for ( + var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; + _key < _len; + _key++ + ) { + args[_key - 2] = arguments[_key]; + } + + if (format === undefined) { + throw new Error( + '`warningWithoutStack(condition, format, ...args)` requires a warning ' + + 'message argument', + ); + } + + if (args.length > 8) { + // Check before the condition to catch violations early. + throw new Error('warningWithoutStack() currently supports at most 8 arguments.'); + } + + if (condition) { + return; + } + + if (typeof console !== 'undefined') { + var argsWithFormat = args.map(function (item) { + return '' + item; + }); + argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it + // breaks IE9: https://github.com/facebook/react/issues/13610 + + Function.prototype.apply.call(console.error, console, argsWithFormat); + } + + try { + // --- Welcome to debugging React --- + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + var argIndex = 0; + var message = + 'Warning: ' + + format.replace(/%s/g, function () { + return args[argIndex++]; + }); + throw new Error(message); + } catch (x) {} + }; + } + + var warningWithoutStack$1 = warningWithoutStack; + + var didWarnStateUpdateForUnmountedComponent = {}; + + function warnNoop(publicInstance, callerName) { + { + var _constructor = publicInstance.constructor; + var componentName = + (_constructor && (_constructor.displayName || _constructor.name)) || 'ReactClass'; + var warningKey = componentName + '.' + callerName; + + if (didWarnStateUpdateForUnmountedComponent[warningKey]) { + return; + } + + warningWithoutStack$1( + false, + "Can't call %s on a component that is not yet mounted. " + + 'This is a no-op, but it might indicate a bug in your application. ' + + 'Instead, assign to `this.state` directly or define a `state = {};` ' + + 'class property with the desired state in the %s component.', + callerName, + componentName, + ); + didWarnStateUpdateForUnmountedComponent[warningKey] = true; + } + } + /** + * This is the abstract API for an update queue. + */ + + var ReactNoopUpdateQueue = { + /** + * Checks whether or not this composite component is mounted. + * @param {ReactClass} publicInstance The instance we want to test. + * @return {boolean} True if mounted, false otherwise. + * @protected + * @final + */ + isMounted: function (publicInstance) { + return false; + }, + + /** + * Forces an update. This should only be invoked when it is known with + * certainty that we are **not** in a DOM transaction. + * + * You may want to call this when you know that some deeper aspect of the + * component's state has changed but `setState` was not called. + * + * This will not invoke `shouldComponentUpdate`, but it will invoke + * `componentWillUpdate` and `componentDidUpdate`. + * + * @param {ReactClass} publicInstance The instance that should rerender. + * @param {?function} callback Called after component is updated. + * @param {?string} callerName name of the calling function in the public API. + * @internal + */ + enqueueForceUpdate: function (publicInstance, callback, callerName) { + warnNoop(publicInstance, 'forceUpdate'); + }, + + /** + * Replaces all of the state. Always use this or `setState` to mutate state. + * You should treat `this.state` as immutable. + * + * There is no guarantee that `this.state` will be immediately updated, so + * accessing `this.state` after calling this method may return the old value. + * + * @param {ReactClass} publicInstance The instance that should rerender. + * @param {object} completeState Next state. + * @param {?function} callback Called after component is updated. + * @param {?string} callerName name of the calling function in the public API. + * @internal + */ + enqueueReplaceState: function (publicInstance, completeState, callback, callerName) { + warnNoop(publicInstance, 'replaceState'); + }, + + /** + * Sets a subset of the state. This only exists because _pendingState is + * internal. This provides a merging strategy that is not available to deep + * properties which is confusing. TODO: Expose pendingState or don't use it + * during the merge. + * + * @param {ReactClass} publicInstance The instance that should rerender. + * @param {object} partialState Next partial state to be merged with state. + * @param {?function} callback Called after component is updated. + * @param {?string} Name of the calling function in the public API. + * @internal + */ + enqueueSetState: function (publicInstance, partialState, callback, callerName) { + warnNoop(publicInstance, 'setState'); + }, + }; + + var emptyObject = {}; + + { + Object.freeze(emptyObject); + } + /** + * Base class helpers for the updating state of a component. + */ + + function Component(props, context, updater) { + this.props = props; + this.context = context; // If a component has string refs, we will assign a different object later. + + this.refs = emptyObject; // We initialize the default updater but the real one gets injected by the + // renderer. + + this.updater = updater || ReactNoopUpdateQueue; + } + + Component.prototype.isReactComponent = {}; + /** + * Sets a subset of the state. Always use this to mutate + * state. You should treat `this.state` as immutable. + * + * There is no guarantee that `this.state` will be immediately updated, so + * accessing `this.state` after calling this method may return the old value. + * + * There is no guarantee that calls to `setState` will run synchronously, + * as they may eventually be batched together. You can provide an optional + * callback that will be executed when the call to setState is actually + * completed. + * + * When a function is provided to setState, it will be called at some point in + * the future (not synchronously). It will be called with the up to date + * component arguments (state, props, context). These values can be different + * from this.* because your function may be called after receiveProps but before + * shouldComponentUpdate, and this new state, props, and context will not yet be + * assigned to this. + * + * @param {object|function} partialState Next partial state or function to + * produce next partial state to be merged with current state. + * @param {?function} callback Called after state is updated. + * @final + * @protected + */ + + Component.prototype.setState = function (partialState, callback) { + if ( + !( + typeof partialState === 'object' || + typeof partialState === 'function' || + partialState == null + ) + ) { + { + throw Error( + 'setState(...): takes an object of state variables to update or a function which returns an object of state variables.', + ); + } + } + + this.updater.enqueueSetState(this, partialState, callback, 'setState'); + }; + /** + * Forces an update. This should only be invoked when it is known with + * certainty that we are **not** in a DOM transaction. + * + * You may want to call this when you know that some deeper aspect of the + * component's state has changed but `setState` was not called. + * + * This will not invoke `shouldComponentUpdate`, but it will invoke + * `componentWillUpdate` and `componentDidUpdate`. + * + * @param {?function} callback Called after update is complete. + * @final + * @protected + */ + + Component.prototype.forceUpdate = function (callback) { + this.updater.enqueueForceUpdate(this, callback, 'forceUpdate'); + }; + /** + * Deprecated APIs. These APIs used to exist on classic React classes but since + * we would like to deprecate them, we're not going to move them over to this + * modern base class. Instead, we define a getter that warns if it's accessed. + */ + + { + var deprecatedAPIs = { + isMounted: [ + 'isMounted', + 'Instead, make sure to clean up subscriptions and pending requests in ' + + 'componentWillUnmount to prevent memory leaks.', + ], + replaceState: [ + 'replaceState', + 'Refactor your code to use setState instead (see ' + + 'https://github.com/facebook/react/issues/3236).', + ], + }; + + var defineDeprecationWarning = function (methodName, info) { + Object.defineProperty(Component.prototype, methodName, { + get: function () { + lowPriorityWarningWithoutStack$1( + false, + '%s(...) is deprecated in plain JavaScript React classes. %s', + info[0], + info[1], + ); + return undefined; + }, + }); + }; + + for (var fnName in deprecatedAPIs) { + if (deprecatedAPIs.hasOwnProperty(fnName)) { + defineDeprecationWarning(fnName, deprecatedAPIs[fnName]); + } + } + } + + function ComponentDummy() {} + + ComponentDummy.prototype = Component.prototype; + /** + * Convenience component with default shallow equality check for sCU. + */ + + function PureComponent(props, context, updater) { + this.props = props; + this.context = context; // If a component has string refs, we will assign a different object later. + + this.refs = emptyObject; + this.updater = updater || ReactNoopUpdateQueue; + } + + var pureComponentPrototype = (PureComponent.prototype = new ComponentDummy()); + pureComponentPrototype.constructor = PureComponent; // Avoid an extra prototype jump for these methods. + + _assign(pureComponentPrototype, Component.prototype); + + pureComponentPrototype.isPureReactComponent = true; + + // an immutable object with a single mutable value + function createRef() { + var refObject = { + current: null, + }; + + { + Object.seal(refObject); + } + + return refObject; + } + + /** + * Keeps track of the current dispatcher. + */ + var ReactCurrentDispatcher = { + /** + * @internal + * @type {ReactComponent} + */ + current: null, + }; + + /** + * Keeps track of the current batch's configuration such as how long an update + * should suspend for if it needs to. + */ + var ReactCurrentBatchConfig = { + suspense: null, + }; + + /** + * Keeps track of the current owner. + * + * The current owner is the component who should own any components that are + * currently being constructed. + */ + var ReactCurrentOwner = { + /** + * @internal + * @type {ReactComponent} + */ + current: null, + }; + + var BEFORE_SLASH_RE = /^(.*)[\\\/]/; + var describeComponentFrame = function (name, source, ownerName) { + var sourceInfo = ''; + + if (source) { + var path = source.fileName; + var fileName = path.replace(BEFORE_SLASH_RE, ''); + + { + // In DEV, include code for a common special case: + // prefer "folder/index.js" instead of just "index.js". + if (/^index\./.test(fileName)) { + var match = path.match(BEFORE_SLASH_RE); + + if (match) { + var pathBeforeSlash = match[1]; + + if (pathBeforeSlash) { + var folderName = pathBeforeSlash.replace(BEFORE_SLASH_RE, ''); + fileName = folderName + '/' + fileName; + } + } + } + } + + sourceInfo = ' (at ' + fileName + ':' + source.lineNumber + ')'; + } else if (ownerName) { + sourceInfo = ' (created by ' + ownerName + ')'; + } + + return '\n in ' + (name || 'Unknown') + sourceInfo; + }; + + var Resolved = 1; + + function refineResolvedLazyComponent(lazyComponent) { + return lazyComponent._status === Resolved ? lazyComponent._result : null; + } + + function getWrappedName(outerType, innerType, wrapperName) { + var functionName = innerType.displayName || innerType.name || ''; + return ( + outerType.displayName || + (functionName !== '' ? wrapperName + '(' + functionName + ')' : wrapperName) + ); + } + + function getComponentName(type) { + if (type == null) { + // Host root, text node or just invalid type. + return null; + } + + { + if (typeof type.tag === 'number') { + warningWithoutStack$1( + false, + 'Received an unexpected object in getComponentName(). ' + + 'This is likely a bug in React. Please file an issue.', + ); + } + } + + if (typeof type === 'function') { + return type.displayName || type.name || null; + } + + if (typeof type === 'string') { + return type; + } + + switch (type) { + case REACT_FRAGMENT_TYPE: + return 'Fragment'; + + case REACT_PORTAL_TYPE: + return 'Portal'; + + case REACT_PROFILER_TYPE: + return 'Profiler'; + + case REACT_STRICT_MODE_TYPE: + return 'StrictMode'; + + case REACT_SUSPENSE_TYPE: + return 'Suspense'; + + case REACT_SUSPENSE_LIST_TYPE: + return 'SuspenseList'; + } + + if (typeof type === 'object') { + switch (type.$$typeof) { + case REACT_CONTEXT_TYPE: + return 'Context.Consumer'; + + case REACT_PROVIDER_TYPE: + return 'Context.Provider'; + + case REACT_FORWARD_REF_TYPE: + return getWrappedName(type, type.render, 'ForwardRef'); + + case REACT_MEMO_TYPE: + return getComponentName(type.type); + + case REACT_LAZY_TYPE: { + var thenable = type; + var resolvedThenable = refineResolvedLazyComponent(thenable); + + if (resolvedThenable) { + return getComponentName(resolvedThenable); + } + + break; + } + } + } + + return null; + } + + var ReactDebugCurrentFrame = {}; + var currentlyValidatingElement = null; + function setCurrentlyValidatingElement(element) { + { + currentlyValidatingElement = element; + } + } + + { + // Stack implementation injected by the current renderer. + ReactDebugCurrentFrame.getCurrentStack = null; + + ReactDebugCurrentFrame.getStackAddendum = function () { + var stack = ''; // Add an extra top frame while an element is being validated + + if (currentlyValidatingElement) { + var name = getComponentName(currentlyValidatingElement.type); + var owner = currentlyValidatingElement._owner; + stack += describeComponentFrame( + name, + currentlyValidatingElement._source, + owner && getComponentName(owner.type), + ); + } // Delegate to the injected renderer-specific implementation + + var impl = ReactDebugCurrentFrame.getCurrentStack; + + if (impl) { + stack += impl() || ''; + } + + return stack; + }; + } + + /** + * Used by act() to track whether you're inside an act() scope. + */ + var IsSomeRendererActing = { + current: false, + }; + + var ReactSharedInternals = { + ReactCurrentDispatcher: ReactCurrentDispatcher, + ReactCurrentBatchConfig: ReactCurrentBatchConfig, + ReactCurrentOwner: ReactCurrentOwner, + IsSomeRendererActing: IsSomeRendererActing, + // Used by renderers to avoid bundling object-assign twice in UMD bundles: + assign: _assign, + }; + + { + _assign(ReactSharedInternals, { + // These should not be included in production. + ReactDebugCurrentFrame: ReactDebugCurrentFrame, + // Shim for React DOM 16.0.0 which still destructured (but not used) this. + // TODO: remove in React 17.0. + ReactComponentTreeHook: {}, + }); + } + + /** + * Similar to invariant but only logs a warning if the condition is not met. + * This can be used to log issues in development environments in critical + * paths. Removing the logging code for production environments will keep the + * same logic and follow the same code paths. + */ + + var warning = warningWithoutStack$1; + + { + warning = function (condition, format) { + if (condition) { + return; + } + + var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; + var stack = ReactDebugCurrentFrame.getStackAddendum(); // eslint-disable-next-line react-internal/warning-and-invariant-args + + for ( + var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; + _key < _len; + _key++ + ) { + args[_key - 2] = arguments[_key]; + } + + warningWithoutStack$1.apply(void 0, [false, format + '%s'].concat(args, [stack])); + }; + } + + var warning$1 = warning; + + var hasOwnProperty = Object.prototype.hasOwnProperty; + var RESERVED_PROPS = { + key: true, + ref: true, + __self: true, + __source: true, + }; + var specialPropKeyWarningShown; + var specialPropRefWarningShown; + + function hasValidRef(config) { + { + if (hasOwnProperty.call(config, 'ref')) { + var getter = Object.getOwnPropertyDescriptor(config, 'ref').get; + + if (getter && getter.isReactWarning) { + return false; + } + } + } + + return config.ref !== undefined; + } + + function hasValidKey(config) { + { + if (hasOwnProperty.call(config, 'key')) { + var getter = Object.getOwnPropertyDescriptor(config, 'key').get; + + if (getter && getter.isReactWarning) { + return false; + } + } + } + + return config.key !== undefined; + } + + function defineKeyPropWarningGetter(props, displayName) { + var warnAboutAccessingKey = function () { + if (!specialPropKeyWarningShown) { + specialPropKeyWarningShown = true; + warningWithoutStack$1( + false, + '%s: `key` is not a prop. Trying to access it will result ' + + 'in `undefined` being returned. If you need to access the same ' + + 'value within the child component, you should pass it as a different ' + + 'prop. (https://fb.me/react-special-props)', + displayName, + ); + } + }; + + warnAboutAccessingKey.isReactWarning = true; + Object.defineProperty(props, 'key', { + get: warnAboutAccessingKey, + configurable: true, + }); + } + + function defineRefPropWarningGetter(props, displayName) { + var warnAboutAccessingRef = function () { + if (!specialPropRefWarningShown) { + specialPropRefWarningShown = true; + warningWithoutStack$1( + false, + '%s: `ref` is not a prop. Trying to access it will result ' + + 'in `undefined` being returned. If you need to access the same ' + + 'value within the child component, you should pass it as a different ' + + 'prop. (https://fb.me/react-special-props)', + displayName, + ); + } + }; + + warnAboutAccessingRef.isReactWarning = true; + Object.defineProperty(props, 'ref', { + get: warnAboutAccessingRef, + configurable: true, + }); + } + /** + * Factory method to create a new React element. This no longer adheres to + * the class pattern, so do not use new to call it. Also, instanceof check + * will not work. Instead test $$typeof field against Symbol.for('react.element') to check + * if something is a React Element. + * + * @param {*} type + * @param {*} props + * @param {*} key + * @param {string|object} ref + * @param {*} owner + * @param {*} self A *temporary* helper to detect places where `this` is + * different from the `owner` when React.createElement is called, so that we + * can warn. We want to get rid of owner and replace string `ref`s with arrow + * functions, and as long as `this` and owner are the same, there will be no + * change in behavior. + * @param {*} source An annotation object (added by a transpiler or otherwise) + * indicating filename, line number, and/or other information. + * @internal + */ + + var ReactElement = function (type, key, ref, self, source, owner, props) { + var element = { + // This tag allows us to uniquely identify this as a React Element + $$typeof: REACT_ELEMENT_TYPE, + // Built-in properties that belong on the element + type: type, + key: key, + ref: ref, + props: props, + // Record the component responsible for creating this element. + _owner: owner, + }; + + { + // The validation flag is currently mutative. We put it on + // an external backing store so that we can freeze the whole object. + // This can be replaced with a WeakMap once they are implemented in + // commonly used development environments. + element._store = {}; // To make comparing ReactElements easier for testing purposes, we make + // the validation flag non-enumerable (where possible, which should + // include every environment we run tests in), so the test framework + // ignores it. + + Object.defineProperty(element._store, 'validated', { + configurable: false, + enumerable: false, + writable: true, + value: false, + }); // self and source are DEV only properties. + + Object.defineProperty(element, '_self', { + configurable: false, + enumerable: false, + writable: false, + value: self, + }); // Two elements created in two different places should be considered + // equal for testing purposes and therefore we hide it from enumeration. + + Object.defineProperty(element, '_source', { + configurable: false, + enumerable: false, + writable: false, + value: source, + }); + + if (Object.freeze) { + Object.freeze(element.props); + Object.freeze(element); + } + } + + return element; + }; + /** + * https://github.com/reactjs/rfcs/pull/107 + * @param {*} type + * @param {object} props + * @param {string} key + */ + + /** + * https://github.com/reactjs/rfcs/pull/107 + * @param {*} type + * @param {object} props + * @param {string} key + */ + + function jsxDEV(type, config, maybeKey, source, self) { + var propName; // Reserved names are extracted + + var props = {}; + var key = null; + var ref = null; // Currently, key can be spread in as a prop. This causes a potential + // issue if key is also explicitly declared (ie. <div {...props} key="Hi" /> + // or <div key="Hi" {...props} /> ). We want to deprecate key spread, + // but as an intermediary step, we will use jsxDEV for everything except + // <div {...props} key="Hi" />, because we aren't currently able to tell if + // key is explicitly declared to be undefined or not. + + if (maybeKey !== undefined) { + key = '' + maybeKey; + } + + if (hasValidKey(config)) { + key = '' + config.key; + } + + if (hasValidRef(config)) { + ref = config.ref; + } // Remaining properties are added to a new props object + + for (propName in config) { + if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { + props[propName] = config[propName]; + } + } // Resolve default props + + if (type && type.defaultProps) { + var defaultProps = type.defaultProps; + + for (propName in defaultProps) { + if (props[propName] === undefined) { + props[propName] = defaultProps[propName]; + } + } + } + + if (key || ref) { + var displayName = + typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type; + + if (key) { + defineKeyPropWarningGetter(props, displayName); + } + + if (ref) { + defineRefPropWarningGetter(props, displayName); + } + } + + return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props); + } + /** + * Create and return a new ReactElement of the given type. + * See https://reactjs.org/docs/react-api.html#createelement + */ + + function createElement(type, config, children) { + var propName; // Reserved names are extracted + + var props = {}; + var key = null; + var ref = null; + var self = null; + var source = null; + + if (config != null) { + if (hasValidRef(config)) { + ref = config.ref; + } + + if (hasValidKey(config)) { + key = '' + config.key; + } + + self = config.__self === undefined ? null : config.__self; + source = config.__source === undefined ? null : config.__source; // Remaining properties are added to a new props object + + for (propName in config) { + if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { + props[propName] = config[propName]; + } + } + } // Children can be more than one argument, and those are transferred onto + // the newly allocated props object. + + var childrenLength = arguments.length - 2; + + if (childrenLength === 1) { + props.children = children; + } else if (childrenLength > 1) { + var childArray = Array(childrenLength); + + for (var i = 0; i < childrenLength; i++) { + childArray[i] = arguments[i + 2]; + } + + { + if (Object.freeze) { + Object.freeze(childArray); + } + } + + props.children = childArray; + } // Resolve default props + + if (type && type.defaultProps) { + var defaultProps = type.defaultProps; + + for (propName in defaultProps) { + if (props[propName] === undefined) { + props[propName] = defaultProps[propName]; + } + } + } + + { + if (key || ref) { + var displayName = + typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type; + + if (key) { + defineKeyPropWarningGetter(props, displayName); + } + + if (ref) { + defineRefPropWarningGetter(props, displayName); + } + } + } + + return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props); + } + /** + * Return a function that produces ReactElements of a given type. + * See https://reactjs.org/docs/react-api.html#createfactory + */ + + function cloneAndReplaceKey(oldElement, newKey) { + var newElement = ReactElement( + oldElement.type, + newKey, + oldElement.ref, + oldElement._self, + oldElement._source, + oldElement._owner, + oldElement.props, + ); + return newElement; + } + /** + * Clone and return a new ReactElement using element as the starting point. + * See https://reactjs.org/docs/react-api.html#cloneelement + */ + + function cloneElement(element, config, children) { + if (!!(element === null || element === undefined)) { + { + throw Error( + 'React.cloneElement(...): The argument must be a React element, but you passed ' + + element + + '.', + ); + } + } + + var propName; // Original props are copied + + var props = _assign({}, element.props); // Reserved names are extracted + + var key = element.key; + var ref = element.ref; // Self is preserved since the owner is preserved. + + var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a + // transpiler, and the original source is probably a better indicator of the + // true owner. + + var source = element._source; // Owner will be preserved, unless ref is overridden + + var owner = element._owner; + + if (config != null) { + if (hasValidRef(config)) { + // Silently steal the ref from the parent. + ref = config.ref; + owner = ReactCurrentOwner.current; + } + + if (hasValidKey(config)) { + key = '' + config.key; + } // Remaining properties override existing props + + var defaultProps; + + if (element.type && element.type.defaultProps) { + defaultProps = element.type.defaultProps; + } + + for (propName in config) { + if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { + if (config[propName] === undefined && defaultProps !== undefined) { + // Resolve default props + props[propName] = defaultProps[propName]; + } else { + props[propName] = config[propName]; + } + } + } + } // Children can be more than one argument, and those are transferred onto + // the newly allocated props object. + + var childrenLength = arguments.length - 2; + + if (childrenLength === 1) { + props.children = children; + } else if (childrenLength > 1) { + var childArray = Array(childrenLength); + + for (var i = 0; i < childrenLength; i++) { + childArray[i] = arguments[i + 2]; + } + + props.children = childArray; + } + + return ReactElement(element.type, key, ref, self, source, owner, props); + } + /** + * Verifies the object is a ReactElement. + * See https://reactjs.org/docs/react-api.html#isvalidelement + * @param {?object} object + * @return {boolean} True if `object` is a ReactElement. + * @final + */ + + function isValidElement(object) { + return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; + } + + var SEPARATOR = '.'; + var SUBSEPARATOR = ':'; + /** + * Escape and wrap key so it is safe to use as a reactid + * + * @param {string} key to be escaped. + * @return {string} the escaped key. + */ + + function escape(key) { + var escapeRegex = /[=:]/g; + var escaperLookup = { + '=': '=0', + ':': '=2', + }; + var escapedString = ('' + key).replace(escapeRegex, function (match) { + return escaperLookup[match]; + }); + return '$' + escapedString; + } + /** + * TODO: Test that a single child and an array with one item have the same key + * pattern. + */ + + var didWarnAboutMaps = false; + var userProvidedKeyEscapeRegex = /\/+/g; + + function escapeUserProvidedKey(text) { + return ('' + text).replace(userProvidedKeyEscapeRegex, '$&/'); + } + + var POOL_SIZE = 10; + var traverseContextPool = []; + + function getPooledTraverseContext(mapResult, keyPrefix, mapFunction, mapContext) { + if (traverseContextPool.length) { + var traverseContext = traverseContextPool.pop(); + traverseContext.result = mapResult; + traverseContext.keyPrefix = keyPrefix; + traverseContext.func = mapFunction; + traverseContext.context = mapContext; + traverseContext.count = 0; + return traverseContext; + } else { + return { + result: mapResult, + keyPrefix: keyPrefix, + func: mapFunction, + context: mapContext, + count: 0, + }; + } + } + + function releaseTraverseContext(traverseContext) { + traverseContext.result = null; + traverseContext.keyPrefix = null; + traverseContext.func = null; + traverseContext.context = null; + traverseContext.count = 0; + + if (traverseContextPool.length < POOL_SIZE) { + traverseContextPool.push(traverseContext); + } + } + /** + * @param {?*} children Children tree container. + * @param {!string} nameSoFar Name of the key path so far. + * @param {!function} callback Callback to invoke with each child found. + * @param {?*} traverseContext Used to pass information throughout the traversal + * process. + * @return {!number} The number of children in this subtree. + */ + + function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) { + var type = typeof children; + + if (type === 'undefined' || type === 'boolean') { + // All of the above are perceived as null. + children = null; + } + + var invokeCallback = false; + + if (children === null) { + invokeCallback = true; + } else { + switch (type) { + case 'string': + case 'number': + invokeCallback = true; + break; + + case 'object': + switch (children.$$typeof) { + case REACT_ELEMENT_TYPE: + case REACT_PORTAL_TYPE: + invokeCallback = true; + } + } + } + + if (invokeCallback) { + callback( + traverseContext, + children, // If it's the only child, treat the name as if it was wrapped in an array + // so that it's consistent if the number of children grows. + nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar, + ); + return 1; + } + + var child; + var nextName; + var subtreeCount = 0; // Count of children found in the current subtree. + + var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR; + + if (Array.isArray(children)) { + for (var i = 0; i < children.length; i++) { + child = children[i]; + nextName = nextNamePrefix + getComponentKey(child, i); + subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext); + } + } else { + var iteratorFn = getIteratorFn(children); + + if (typeof iteratorFn === 'function') { + { + // Warn about using Maps as children + if (iteratorFn === children.entries) { + !didWarnAboutMaps + ? warning$1( + false, + 'Using Maps as children is unsupported and will likely yield ' + + 'unexpected results. Convert it to a sequence/iterable of keyed ' + + 'ReactElements instead.', + ) + : void 0; + didWarnAboutMaps = true; + } + } + + var iterator = iteratorFn.call(children); + var step; + var ii = 0; + + while (!(step = iterator.next()).done) { + child = step.value; + nextName = nextNamePrefix + getComponentKey(child, ii++); + subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext); + } + } else if (type === 'object') { + var addendum = ''; + + { + addendum = + ' If you meant to render a collection of children, use an array ' + + 'instead.' + + ReactDebugCurrentFrame.getStackAddendum(); + } + + var childrenString = '' + children; + + { + { + throw Error( + 'Objects are not valid as a React child (found: ' + + (childrenString === '[object Object]' + ? 'object with keys {' + Object.keys(children).join(', ') + '}' + : childrenString) + + ').' + + addendum, + ); + } + } + } + } + + return subtreeCount; + } + /** + * Traverses children that are typically specified as `props.children`, but + * might also be specified through attributes: + * + * - `traverseAllChildren(this.props.children, ...)` + * - `traverseAllChildren(this.props.leftPanelChildren, ...)` + * + * The `traverseContext` is an optional argument that is passed through the + * entire traversal. It can be used to store accumulations or anything else that + * the callback might find relevant. + * + * @param {?*} children Children tree object. + * @param {!function} callback To invoke upon traversing each child. + * @param {?*} traverseContext Context for traversal. + * @return {!number} The number of children in this subtree. + */ + + function traverseAllChildren(children, callback, traverseContext) { + if (children == null) { + return 0; + } + + return traverseAllChildrenImpl(children, '', callback, traverseContext); + } + /** + * Generate a key string that identifies a component within a set. + * + * @param {*} component A component that could contain a manual key. + * @param {number} index Index that is used if a manual key is not provided. + * @return {string} + */ + + function getComponentKey(component, index) { + // Do some typechecking here since we call this blindly. We want to ensure + // that we don't block potential future ES APIs. + if (typeof component === 'object' && component !== null && component.key != null) { + // Explicit key + return escape(component.key); + } // Implicit key determined by the index in the set + + return index.toString(36); + } + + function forEachSingleChild(bookKeeping, child, name) { + var func = bookKeeping.func, + context = bookKeeping.context; + func.call(context, child, bookKeeping.count++); + } + /** + * Iterates through children that are typically specified as `props.children`. + * + * See https://reactjs.org/docs/react-api.html#reactchildrenforeach + * + * The provided forEachFunc(child, index) will be called for each + * leaf child. + * + * @param {?*} children Children tree container. + * @param {function(*, int)} forEachFunc + * @param {*} forEachContext Context for forEachContext. + */ + + function forEachChildren(children, forEachFunc, forEachContext) { + if (children == null) { + return children; + } + + var traverseContext = getPooledTraverseContext(null, null, forEachFunc, forEachContext); + traverseAllChildren(children, forEachSingleChild, traverseContext); + releaseTraverseContext(traverseContext); + } + + function mapSingleChildIntoContext(bookKeeping, child, childKey) { + var result = bookKeeping.result, + keyPrefix = bookKeeping.keyPrefix, + func = bookKeeping.func, + context = bookKeeping.context; + var mappedChild = func.call(context, child, bookKeeping.count++); + + if (Array.isArray(mappedChild)) { + mapIntoWithKeyPrefixInternal(mappedChild, result, childKey, function (c) { + return c; + }); + } else if (mappedChild != null) { + if (isValidElement(mappedChild)) { + mappedChild = cloneAndReplaceKey( + mappedChild, // Keep both the (mapped) and old keys if they differ, just as + // traverseAllChildren used to do for objects as children + keyPrefix + + (mappedChild.key && (!child || child.key !== mappedChild.key) + ? escapeUserProvidedKey(mappedChild.key) + '/' + : '') + + childKey, + ); + } + + result.push(mappedChild); + } + } + + function mapIntoWithKeyPrefixInternal(children, array, prefix, func, context) { + var escapedPrefix = ''; + + if (prefix != null) { + escapedPrefix = escapeUserProvidedKey(prefix) + '/'; + } + + var traverseContext = getPooledTraverseContext(array, escapedPrefix, func, context); + traverseAllChildren(children, mapSingleChildIntoContext, traverseContext); + releaseTraverseContext(traverseContext); + } + /** + * Maps children that are typically specified as `props.children`. + * + * See https://reactjs.org/docs/react-api.html#reactchildrenmap + * + * The provided mapFunction(child, key, index) will be called for each + * leaf child. + * + * @param {?*} children Children tree container. + * @param {function(*, int)} func The map function. + * @param {*} context Context for mapFunction. + * @return {object} Object containing the ordered map of results. + */ + + function mapChildren(children, func, context) { + if (children == null) { + return children; + } + + var result = []; + mapIntoWithKeyPrefixInternal(children, result, null, func, context); + return result; + } + /** + * Count the number of children that are typically specified as + * `props.children`. + * + * See https://reactjs.org/docs/react-api.html#reactchildrencount + * + * @param {?*} children Children tree container. + * @return {number} The number of children. + */ + + function countChildren(children) { + return traverseAllChildren( + children, + function () { + return null; + }, + null, + ); + } + /** + * Flatten a children object (typically specified as `props.children`) and + * return an array with appropriately re-keyed children. + * + * See https://reactjs.org/docs/react-api.html#reactchildrentoarray + */ + + function toArray(children) { + var result = []; + mapIntoWithKeyPrefixInternal(children, result, null, function (child) { + return child; + }); + return result; + } + /** + * Returns the first child in a collection of children and verifies that there + * is only one child in the collection. + * + * See https://reactjs.org/docs/react-api.html#reactchildrenonly + * + * The current implementation of this function assumes that a single child gets + * passed without a wrapper, but the purpose of this helper function is to + * abstract away the particular structure of children. + * + * @param {?object} children Child collection structure. + * @return {ReactElement} The first and only `ReactElement` contained in the + * structure. + */ + + function onlyChild(children) { + if (!isValidElement(children)) { + { + throw Error('React.Children.only expected to receive a single React element child.'); + } + } + + return children; + } + + function createContext(defaultValue, calculateChangedBits) { + if (calculateChangedBits === undefined) { + calculateChangedBits = null; + } else { + { + !(calculateChangedBits === null || typeof calculateChangedBits === 'function') + ? warningWithoutStack$1( + false, + 'createContext: Expected the optional second argument to be a ' + + 'function. Instead received: %s', + calculateChangedBits, + ) + : void 0; + } + } + + var context = { + $$typeof: REACT_CONTEXT_TYPE, + _calculateChangedBits: calculateChangedBits, + // As a workaround to support multiple concurrent renderers, we categorize + // some renderers as primary and others as secondary. We only expect + // there to be two concurrent renderers at most: React Native (primary) and + // Fabric (secondary); React DOM (primary) and React ART (secondary). + // Secondary renderers store their context values on separate fields. + _currentValue: defaultValue, + _currentValue2: defaultValue, + // Used to track how many concurrent renderers this context currently + // supports within in a single renderer. Such as parallel server rendering. + _threadCount: 0, + // These are circular + Provider: null, + Consumer: null, + }; + context.Provider = { + $$typeof: REACT_PROVIDER_TYPE, + _context: context, + }; + var hasWarnedAboutUsingNestedContextConsumers = false; + var hasWarnedAboutUsingConsumerProvider = false; + + { + // A separate object, but proxies back to the original context object for + // backwards compatibility. It has a different $$typeof, so we can properly + // warn for the incorrect usage of Context as a Consumer. + var Consumer = { + $$typeof: REACT_CONTEXT_TYPE, + _context: context, + _calculateChangedBits: context._calculateChangedBits, + }; // $FlowFixMe: Flow complains about not setting a value, which is intentional here + + Object.defineProperties(Consumer, { + Provider: { + get: function () { + if (!hasWarnedAboutUsingConsumerProvider) { + hasWarnedAboutUsingConsumerProvider = true; + warning$1( + false, + 'Rendering <Context.Consumer.Provider> is not supported and will be removed in ' + + 'a future major release. Did you mean to render <Context.Provider> instead?', + ); + } + + return context.Provider; + }, + set: function (_Provider) { + context.Provider = _Provider; + }, + }, + _currentValue: { + get: function () { + return context._currentValue; + }, + set: function (_currentValue) { + context._currentValue = _currentValue; + }, + }, + _currentValue2: { + get: function () { + return context._currentValue2; + }, + set: function (_currentValue2) { + context._currentValue2 = _currentValue2; + }, + }, + _threadCount: { + get: function () { + return context._threadCount; + }, + set: function (_threadCount) { + context._threadCount = _threadCount; + }, + }, + Consumer: { + get: function () { + if (!hasWarnedAboutUsingNestedContextConsumers) { + hasWarnedAboutUsingNestedContextConsumers = true; + warning$1( + false, + 'Rendering <Context.Consumer.Consumer> is not supported and will be removed in ' + + 'a future major release. Did you mean to render <Context.Consumer> instead?', + ); + } + + return context.Consumer; + }, + }, + }); // $FlowFixMe: Flow complains about missing properties because it doesn't understand defineProperty + + context.Consumer = Consumer; + } + + { + context._currentRenderer = null; + context._currentRenderer2 = null; + } + + return context; + } + + function lazy(ctor) { + var lazyType = { + $$typeof: REACT_LAZY_TYPE, + _ctor: ctor, + // React uses these fields to store the result. + _status: -1, + _result: null, + }; + + { + // In production, this would just set it on the object. + var defaultProps; + var propTypes; + Object.defineProperties(lazyType, { + defaultProps: { + configurable: true, + get: function () { + return defaultProps; + }, + set: function (newDefaultProps) { + warning$1( + false, + 'React.lazy(...): It is not supported to assign `defaultProps` to ' + + 'a lazy component import. Either specify them where the component ' + + 'is defined, or create a wrapping component around it.', + ); + defaultProps = newDefaultProps; // Match production behavior more closely: + + Object.defineProperty(lazyType, 'defaultProps', { + enumerable: true, + }); + }, + }, + propTypes: { + configurable: true, + get: function () { + return propTypes; + }, + set: function (newPropTypes) { + warning$1( + false, + 'React.lazy(...): It is not supported to assign `propTypes` to ' + + 'a lazy component import. Either specify them where the component ' + + 'is defined, or create a wrapping component around it.', + ); + propTypes = newPropTypes; // Match production behavior more closely: + + Object.defineProperty(lazyType, 'propTypes', { + enumerable: true, + }); + }, + }, + }); + } + + return lazyType; + } + + function forwardRef(render) { + { + if (render != null && render.$$typeof === REACT_MEMO_TYPE) { + warningWithoutStack$1( + false, + 'forwardRef requires a render function but received a `memo` ' + + 'component. Instead of forwardRef(memo(...)), use ' + + 'memo(forwardRef(...)).', + ); + } else if (typeof render !== 'function') { + warningWithoutStack$1( + false, + 'forwardRef requires a render function but was given %s.', + render === null ? 'null' : typeof render, + ); + } else { + !( + // Do not warn for 0 arguments because it could be due to usage of the 'arguments' object + (render.length === 0 || render.length === 2) + ) + ? warningWithoutStack$1( + false, + 'forwardRef render functions accept exactly two parameters: props and ref. %s', + render.length === 1 + ? 'Did you forget to use the ref parameter?' + : 'Any additional parameter will be undefined.', + ) + : void 0; + } + + if (render != null) { + !(render.defaultProps == null && render.propTypes == null) + ? warningWithoutStack$1( + false, + 'forwardRef render functions do not support propTypes or defaultProps. ' + + 'Did you accidentally pass a React component?', + ) + : void 0; + } + } + + return { + $$typeof: REACT_FORWARD_REF_TYPE, + render: render, + }; + } + + function isValidElementType(type) { + return ( + typeof type === 'string' || + typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill. + type === REACT_FRAGMENT_TYPE || + type === REACT_CONCURRENT_MODE_TYPE || + type === REACT_PROFILER_TYPE || + type === REACT_STRICT_MODE_TYPE || + type === REACT_SUSPENSE_TYPE || + type === REACT_SUSPENSE_LIST_TYPE || + (typeof type === 'object' && + type !== null && + (type.$$typeof === REACT_LAZY_TYPE || + type.$$typeof === REACT_MEMO_TYPE || + type.$$typeof === REACT_PROVIDER_TYPE || + type.$$typeof === REACT_CONTEXT_TYPE || + type.$$typeof === REACT_FORWARD_REF_TYPE || + type.$$typeof === REACT_FUNDAMENTAL_TYPE || + type.$$typeof === REACT_RESPONDER_TYPE || + type.$$typeof === REACT_SCOPE_TYPE)) + ); + } + + function memo(type, compare) { + { + if (!isValidElementType(type)) { + warningWithoutStack$1( + false, + 'memo: The first argument must be a component. Instead ' + 'received: %s', + type === null ? 'null' : typeof type, + ); + } + } + + return { + $$typeof: REACT_MEMO_TYPE, + type: type, + compare: compare === undefined ? null : compare, + }; + } + + function resolveDispatcher() { + var dispatcher = ReactCurrentDispatcher.current; + + if (!(dispatcher !== null)) { + { + throw Error( + 'Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.', + ); + } + } + + return dispatcher; + } + + function useContext(Context, unstable_observedBits) { + var dispatcher = resolveDispatcher(); + + { + !(unstable_observedBits === undefined) + ? warning$1( + false, + 'useContext() second argument is reserved for future ' + + 'use in React. Passing it is not supported. ' + + 'You passed: %s.%s', + unstable_observedBits, + typeof unstable_observedBits === 'number' && Array.isArray(arguments[2]) + ? '\n\nDid you call array.map(useContext)? ' + + 'Calling Hooks inside a loop is not supported. ' + + 'Learn more at https://fb.me/rules-of-hooks' + : '', + ) + : void 0; // TODO: add a more generic warning for invalid values. + + if (Context._context !== undefined) { + var realContext = Context._context; // Don't deduplicate because this legitimately causes bugs + // and nobody should be using this in existing code. + + if (realContext.Consumer === Context) { + warning$1( + false, + 'Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be ' + + 'removed in a future major release. Did you mean to call useContext(Context) instead?', + ); + } else if (realContext.Provider === Context) { + warning$1( + false, + 'Calling useContext(Context.Provider) is not supported. ' + + 'Did you mean to call useContext(Context) instead?', + ); + } + } + } + + return dispatcher.useContext(Context, unstable_observedBits); + } + function useState(initialState) { + var dispatcher = resolveDispatcher(); + return dispatcher.useState(initialState); + } + function useReducer(reducer, initialArg, init) { + var dispatcher = resolveDispatcher(); + return dispatcher.useReducer(reducer, initialArg, init); + } + function useRef(initialValue) { + var dispatcher = resolveDispatcher(); + return dispatcher.useRef(initialValue); + } + function useEffect(create, inputs) { + var dispatcher = resolveDispatcher(); + return dispatcher.useEffect(create, inputs); + } + function useLayoutEffect(create, inputs) { + var dispatcher = resolveDispatcher(); + return dispatcher.useLayoutEffect(create, inputs); + } + function useCallback(callback, inputs) { + var dispatcher = resolveDispatcher(); + return dispatcher.useCallback(callback, inputs); + } + function useMemo(create, inputs) { + var dispatcher = resolveDispatcher(); + return dispatcher.useMemo(create, inputs); + } + function useImperativeHandle(ref, create, inputs) { + var dispatcher = resolveDispatcher(); + return dispatcher.useImperativeHandle(ref, create, inputs); + } + function useDebugValue(value, formatterFn) { + { + var dispatcher = resolveDispatcher(); + return dispatcher.useDebugValue(value, formatterFn); + } + } + var emptyObject$1 = {}; + function useResponder(responder, listenerProps) { + var dispatcher = resolveDispatcher(); + + { + if (responder == null || responder.$$typeof !== REACT_RESPONDER_TYPE) { + warning$1( + false, + 'useResponder: invalid first argument. Expected an event responder, but instead got %s', + responder, + ); + return; + } + } + + return dispatcher.useResponder(responder, listenerProps || emptyObject$1); + } + function useTransition(config) { + var dispatcher = resolveDispatcher(); + return dispatcher.useTransition(config); + } + function useDeferredValue(value, config) { + var dispatcher = resolveDispatcher(); + return dispatcher.useDeferredValue(value, config); + } + + function withSuspenseConfig(scope, config) { + var previousConfig = ReactCurrentBatchConfig.suspense; + ReactCurrentBatchConfig.suspense = config === undefined ? null : config; + + try { + scope(); + } finally { + ReactCurrentBatchConfig.suspense = previousConfig; + } + } + + /** + * ReactElementValidator provides a wrapper around a element factory + * which validates the props passed to the element. This is intended to be + * used only in DEV and could be replaced by a static type checker for languages + * that support it. + */ + var propTypesMisspellWarningShown; + + { + propTypesMisspellWarningShown = false; + } + + var hasOwnProperty$1 = Object.prototype.hasOwnProperty; + + function getDeclarationErrorAddendum() { + if (ReactCurrentOwner.current) { + var name = getComponentName(ReactCurrentOwner.current.type); + + if (name) { + return '\n\nCheck the render method of `' + name + '`.'; + } + } + + return ''; + } + + function getSourceInfoErrorAddendum(source) { + if (source !== undefined) { + var fileName = source.fileName.replace(/^.*[\\\/]/, ''); + var lineNumber = source.lineNumber; + return '\n\nCheck your code at ' + fileName + ':' + lineNumber + '.'; + } + + return ''; + } + + function getSourceInfoErrorAddendumForProps(elementProps) { + if (elementProps !== null && elementProps !== undefined) { + return getSourceInfoErrorAddendum(elementProps.__source); + } + + return ''; + } + /** + * Warn if there's no key explicitly set on dynamic arrays of children or + * object keys are not valid. This allows us to keep track of children between + * updates. + */ + + var ownerHasKeyUseWarning = {}; + + function getCurrentComponentErrorInfo(parentType) { + var info = getDeclarationErrorAddendum(); + + if (!info) { + var parentName = + typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name; + + if (parentName) { + info = '\n\nCheck the top-level render call using <' + parentName + '>.'; + } + } + + return info; + } + /** + * Warn if the element doesn't have an explicit key assigned to it. + * This element is in an array. The array could grow and shrink or be + * reordered. All children that haven't already been validated are required to + * have a "key" property assigned to it. Error statuses are cached so a warning + * will only be shown once. + * + * @internal + * @param {ReactElement} element Element that requires a key. + * @param {*} parentType element's parent's type. + */ + + function validateExplicitKey(element, parentType) { + if (!element._store || element._store.validated || element.key != null) { + return; + } + + element._store.validated = true; + var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType); + + if (ownerHasKeyUseWarning[currentComponentErrorInfo]) { + return; + } + + ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a + // property, it may be the creator of the child that's responsible for + // assigning it a key. + + var childOwner = ''; + + if (element && element._owner && element._owner !== ReactCurrentOwner.current) { + // Give the component that originally created this child. + childOwner = ' It was passed a child from ' + getComponentName(element._owner.type) + '.'; + } + + setCurrentlyValidatingElement(element); + + { + warning$1( + false, + 'Each child in a list should have a unique "key" prop.' + + '%s%s See https://fb.me/react-warning-keys for more information.', + currentComponentErrorInfo, + childOwner, + ); + } + + setCurrentlyValidatingElement(null); + } + /** + * Ensure that every element either is passed in a static location, in an + * array with an explicit keys property defined, or in an object literal + * with valid key property. + * + * @internal + * @param {ReactNode} node Statically passed child of any type. + * @param {*} parentType node's parent's type. + */ + + function validateChildKeys(node, parentType) { + if (typeof node !== 'object') { + return; + } + + if (Array.isArray(node)) { + for (var i = 0; i < node.length; i++) { + var child = node[i]; + + if (isValidElement(child)) { + validateExplicitKey(child, parentType); + } + } + } else if (isValidElement(node)) { + // This element was passed in a valid location. + if (node._store) { + node._store.validated = true; + } + } else if (node) { + var iteratorFn = getIteratorFn(node); + + if (typeof iteratorFn === 'function') { + // Entry iterators used to provide implicit keys, + // but now we print a separate warning for them later. + if (iteratorFn !== node.entries) { + var iterator = iteratorFn.call(node); + var step; + + while (!(step = iterator.next()).done) { + if (isValidElement(step.value)) { + validateExplicitKey(step.value, parentType); + } + } + } + } + } + } + /** + * Given an element, validate that its props follow the propTypes definition, + * provided by the type. + * + * @param {ReactElement} element + */ + + function validatePropTypes(element) { + var type = element.type; + + if (type === null || type === undefined || typeof type === 'string') { + return; + } + + var name = getComponentName(type); + var propTypes; + + if (typeof type === 'function') { + propTypes = type.propTypes; + } else if ( + typeof type === 'object' && + (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here. + // Inner props are checked in the reconciler. + type.$$typeof === REACT_MEMO_TYPE) + ) { + propTypes = type.propTypes; + } else { + return; + } + + if (propTypes) { + setCurrentlyValidatingElement(element); + checkPropTypes(propTypes, element.props, 'prop', name, ReactDebugCurrentFrame.getStackAddendum); + setCurrentlyValidatingElement(null); + } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) { + propTypesMisspellWarningShown = true; + warningWithoutStack$1( + false, + 'Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', + name || 'Unknown', + ); + } + + if (typeof type.getDefaultProps === 'function') { + !type.getDefaultProps.isReactClassApproved + ? warningWithoutStack$1( + false, + 'getDefaultProps is only used on classic React.createClass ' + + 'definitions. Use a static property named `defaultProps` instead.', + ) + : void 0; + } + } + /** + * Given a fragment, validate that it can only be provided with fragment props + * @param {ReactElement} fragment + */ + + function validateFragmentProps(fragment) { + setCurrentlyValidatingElement(fragment); + var keys = Object.keys(fragment.props); + + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + + if (key !== 'children' && key !== 'key') { + warning$1( + false, + 'Invalid prop `%s` supplied to `React.Fragment`. ' + + 'React.Fragment can only have `key` and `children` props.', + key, + ); + break; + } + } + + if (fragment.ref !== null) { + warning$1(false, 'Invalid attribute `ref` supplied to `React.Fragment`.'); + } + + setCurrentlyValidatingElement(null); + } + + function jsxWithValidation(type, props, key, isStaticChildren, source, self) { + var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to + // succeed and there will likely be errors in render. + + if (!validType) { + var info = ''; + + if ( + type === undefined || + (typeof type === 'object' && type !== null && Object.keys(type).length === 0) + ) { + info += + ' You likely forgot to export your component from the file ' + + "it's defined in, or you might have mixed up default and named imports."; + } + + var sourceInfo = getSourceInfoErrorAddendum(source); + + if (sourceInfo) { + info += sourceInfo; + } else { + info += getDeclarationErrorAddendum(); + } + + var typeString; + + if (type === null) { + typeString = 'null'; + } else if (Array.isArray(type)) { + typeString = 'array'; + } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) { + typeString = '<' + (getComponentName(type.type) || 'Unknown') + ' />'; + info = ' Did you accidentally export a JSX literal instead of a component?'; + } else { + typeString = typeof type; + } + + warning$1( + false, + 'React.jsx: type is invalid -- expected a string (for ' + + 'built-in components) or a class/function (for composite ' + + 'components) but got: %s.%s', + typeString, + info, + ); + } + + var element = jsxDEV(type, props, key, source, self); // The result can be nullish if a mock or a custom function is used. + // TODO: Drop this when these are no longer allowed as the type argument. + + if (element == null) { + return element; + } // Skip key warning if the type isn't valid since our key validation logic + // doesn't expect a non-string/function type and can throw confusing errors. + // We don't want exception behavior to differ between dev and prod. + // (Rendering will throw with a helpful message and as soon as the type is + // fixed, the key warnings will appear.) + + if (validType) { + var children = props.children; + + if (children !== undefined) { + if (isStaticChildren) { + if (Array.isArray(children)) { + for (var i = 0; i < children.length; i++) { + validateChildKeys(children[i], type); + } + + if (Object.freeze) { + Object.freeze(children); + } + } else { + warning$1( + false, + 'React.jsx: Static children should always be an array. ' + + 'You are likely explicitly calling React.jsxs or React.jsxDEV. ' + + 'Use the Babel transform instead.', + ); + } + } else { + validateChildKeys(children, type); + } + } + } + + if (hasOwnProperty$1.call(props, 'key')) { + warning$1( + false, + 'React.jsx: Spreading a key to JSX is a deprecated pattern. ' + + 'Explicitly pass a key after spreading props in your JSX call. ' + + 'E.g. <ComponentName {...props} key={key} />', + ); + } + + if (type === REACT_FRAGMENT_TYPE) { + validateFragmentProps(element); + } else { + validatePropTypes(element); + } + + return element; + } // These two functions exist to still get child warnings in dev + // even with the prod transform. This means that jsxDEV is purely + // opt-in behavior for better messages but that we won't stop + // giving you warnings if you use production apis. + + function jsxWithValidationStatic(type, props, key) { + return jsxWithValidation(type, props, key, true); + } + function jsxWithValidationDynamic(type, props, key) { + return jsxWithValidation(type, props, key, false); + } + function createElementWithValidation(type, props, children) { + var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to + // succeed and there will likely be errors in render. + + if (!validType) { + var info = ''; + + if ( + type === undefined || + (typeof type === 'object' && type !== null && Object.keys(type).length === 0) + ) { + info += + ' You likely forgot to export your component from the file ' + + "it's defined in, or you might have mixed up default and named imports."; + } + + var sourceInfo = getSourceInfoErrorAddendumForProps(props); + + if (sourceInfo) { + info += sourceInfo; + } else { + info += getDeclarationErrorAddendum(); + } + + var typeString; + + if (type === null) { + typeString = 'null'; + } else if (Array.isArray(type)) { + typeString = 'array'; + } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) { + typeString = '<' + (getComponentName(type.type) || 'Unknown') + ' />'; + info = ' Did you accidentally export a JSX literal instead of a component?'; + } else { + typeString = typeof type; + } + + warning$1( + false, + 'React.createElement: type is invalid -- expected a string (for ' + + 'built-in components) or a class/function (for composite ' + + 'components) but got: %s.%s', + typeString, + info, + ); + } + + var element = createElement.apply(this, arguments); // The result can be nullish if a mock or a custom function is used. + // TODO: Drop this when these are no longer allowed as the type argument. + + if (element == null) { + return element; + } // Skip key warning if the type isn't valid since our key validation logic + // doesn't expect a non-string/function type and can throw confusing errors. + // We don't want exception behavior to differ between dev and prod. + // (Rendering will throw with a helpful message and as soon as the type is + // fixed, the key warnings will appear.) + + if (validType) { + for (var i = 2; i < arguments.length; i++) { + validateChildKeys(arguments[i], type); + } + } + + if (type === REACT_FRAGMENT_TYPE) { + validateFragmentProps(element); + } else { + validatePropTypes(element); + } + + return element; + } + function createFactoryWithValidation(type) { + var validatedFactory = createElementWithValidation.bind(null, type); + validatedFactory.type = type; // Legacy hook: remove it + + { + Object.defineProperty(validatedFactory, 'type', { + enumerable: false, + get: function () { + lowPriorityWarningWithoutStack$1( + false, + 'Factory.type is deprecated. Access the class directly ' + + 'before passing it to createFactory.', + ); + Object.defineProperty(this, 'type', { + value: type, + }); + return type; + }, + }); + } + + return validatedFactory; + } + function cloneElementWithValidation(element, props, children) { + var newElement = cloneElement.apply(this, arguments); + + for (var i = 2; i < arguments.length; i++) { + validateChildKeys(arguments[i], newElement.type); + } + + validatePropTypes(newElement); + return newElement; + } + + var hasBadMapPolyfill; + + { + hasBadMapPolyfill = false; + + try { + var frozenObject = Object.freeze({}); + var testMap = new Map([[frozenObject, null]]); + var testSet = new Set([frozenObject]); // This is necessary for Rollup to not consider these unused. + // https://github.com/rollup/rollup/issues/1771 + // TODO: we can remove these if Rollup fixes the bug. + + testMap.set(0, 0); + testSet.add(0); + } catch (e) { + // TODO: Consider warning about bad polyfills + hasBadMapPolyfill = true; + } + } + + function createFundamentalComponent(impl) { + // We use responder as a Map key later on. When we have a bad + // polyfill, then we can't use it as a key as the polyfill tries + // to add a property to the object. + if (true && !hasBadMapPolyfill) { + Object.freeze(impl); + } + + var fundamantalComponent = { + $$typeof: REACT_FUNDAMENTAL_TYPE, + impl: impl, + }; + + { + Object.freeze(fundamantalComponent); + } + + return fundamantalComponent; + } + + function createEventResponder(displayName, responderConfig) { + var getInitialState = responderConfig.getInitialState, + onEvent = responderConfig.onEvent, + onMount = responderConfig.onMount, + onUnmount = responderConfig.onUnmount, + onRootEvent = responderConfig.onRootEvent, + rootEventTypes = responderConfig.rootEventTypes, + targetEventTypes = responderConfig.targetEventTypes, + targetPortalPropagation = responderConfig.targetPortalPropagation; + var eventResponder = { + $$typeof: REACT_RESPONDER_TYPE, + displayName: displayName, + getInitialState: getInitialState || null, + onEvent: onEvent || null, + onMount: onMount || null, + onRootEvent: onRootEvent || null, + onUnmount: onUnmount || null, + rootEventTypes: rootEventTypes || null, + targetEventTypes: targetEventTypes || null, + targetPortalPropagation: targetPortalPropagation || false, + }; // We use responder as a Map key later on. When we have a bad + // polyfill, then we can't use it as a key as the polyfill tries + // to add a property to the object. + + if (true && !hasBadMapPolyfill) { + Object.freeze(eventResponder); + } + + return eventResponder; + } + + function createScope() { + var scopeComponent = { + $$typeof: REACT_SCOPE_TYPE, + }; + + { + Object.freeze(scopeComponent); + } + + return scopeComponent; + } + + // Helps identify side effects in render-phase lifecycle hooks and setState + // reducers by double invoking them in Strict Mode. + + // To preserve the "Pause on caught exceptions" behavior of the debugger, we + // replay the begin phase of a failed component inside invokeGuardedCallback. + + // Warn about deprecated, async-unsafe lifecycles; relates to RFC #6: + + // Gather advanced timing metrics for Profiler subtrees. + + // Trace which interactions trigger each commit. + + // SSR experiments + + // Only used in www builds. + + // Only used in www builds. + + // Disable javascript: URL strings in href for XSS protection. + + // React Fire: prevent the value and checked attributes from syncing + // with their related DOM properties + + // These APIs will no longer be "unstable" in the upcoming 16.7 release, + // Control this behavior with a flag to support 16.6 minor releases in the meanwhile. + + var exposeConcurrentModeAPIs = false; + // Experimental React Flare event system and event components support. + + var enableFlareAPI = false; // Experimental Host Component support. + + var enableFundamentalAPI = false; // Experimental Scope support. + + var enableScopeAPI = false; // New API for JSX transforms to target - https://github.com/reactjs/rfcs/pull/107 + + var enableJSXTransformAPI = false; // We will enforce mocking scheduler with scheduler/unstable_mock at some point. (v17?) + // Till then, we warn about the missing mock, but still fallback to a legacy mode compatible version + + // For tests, we flush suspense fallbacks in an act scope; + // *except* in some of our own tests, where we test incremental loading states. + + // Add a callback property to suspense to notify which promises are currently + // in the update queue. This allows reporting and tracing of what is causing + // the user to see a loading state. + // Also allows hydration callbacks to fire when a dehydrated boundary gets + // hydrated or deleted. + + // Part of the simplification of React.createElement so we can eventually move + // from React.createElement to React.jsx + // https://github.com/reactjs/rfcs/blob/createlement-rfc/text/0000-create-element-changes.md + + // Flag to turn event.target and event.currentTarget in ReactNative from a reactTag to a component instance + + var React = { + Children: { + map: mapChildren, + forEach: forEachChildren, + count: countChildren, + toArray: toArray, + only: onlyChild, + }, + createRef: createRef, + Component: Component, + PureComponent: PureComponent, + createContext: createContext, + forwardRef: forwardRef, + lazy: lazy, + memo: memo, + useCallback: useCallback, + useContext: useContext, + useEffect: useEffect, + useImperativeHandle: useImperativeHandle, + useDebugValue: useDebugValue, + useLayoutEffect: useLayoutEffect, + useMemo: useMemo, + useReducer: useReducer, + useRef: useRef, + useState: useState, + Fragment: REACT_FRAGMENT_TYPE, + Profiler: REACT_PROFILER_TYPE, + StrictMode: REACT_STRICT_MODE_TYPE, + Suspense: REACT_SUSPENSE_TYPE, + createElement: createElementWithValidation, + cloneElement: cloneElementWithValidation, + createFactory: createFactoryWithValidation, + isValidElement: isValidElement, + version: ReactVersion, + __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: ReactSharedInternals, + }; + + if (exposeConcurrentModeAPIs) { + React.useTransition = useTransition; + React.useDeferredValue = useDeferredValue; + React.SuspenseList = REACT_SUSPENSE_LIST_TYPE; + React.unstable_withSuspenseConfig = withSuspenseConfig; + } + + if (enableFlareAPI) { + React.unstable_useResponder = useResponder; + React.unstable_createResponder = createEventResponder; + } + + if (enableFundamentalAPI) { + React.unstable_createFundamental = createFundamentalComponent; + } + + if (enableScopeAPI) { + React.unstable_createScope = createScope; + } // Note: some APIs are added with feature flags. + // Make sure that stable builds for open source + // don't modify the React object to avoid deopts. + // Also let's not expose their names in stable builds. + + if (enableJSXTransformAPI) { + { + React.jsxDEV = jsxWithValidation; + React.jsx = jsxWithValidationDynamic; + React.jsxs = jsxWithValidationStatic; + } + } + + var React$2 = Object.freeze({ + default: React, + }); + + var React$3 = (React$2 && React) || React$2; + + // TODO: decide on the top-level export form. + // This is hacky but makes it work with both Rollup and Jest. + + var react = React$3.default || React$3; + + module.exports = react; + })(); + } + + /***/ + }, + /* 513 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + if (false) { + module.exports = require('./cjs/scheduler.production.min.js'); + } else { + module.exports = __webpack_require__(514); + } + + /***/ + }, + /* 514 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** @license React v0.18.0 + * scheduler.development.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + + if (true) { + (function () { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { value: true }); + + var enableSchedulerDebugging = false; + var enableIsInputPending = false; + var enableProfiling = true; + + var requestHostCallback; + + var requestHostTimeout; + var cancelHostTimeout; + var shouldYieldToHost; + var requestPaint; + + if ( + // If Scheduler runs in a non-DOM environment, it falls back to a naive + // implementation using setTimeout. + typeof window === 'undefined' || // Check if MessageChannel is supported, too. + typeof MessageChannel !== 'function' + ) { + // If this accidentally gets imported in a non-browser environment, e.g. JavaScriptCore, + // fallback to a naive implementation. + var _callback = null; + var _timeoutID = null; + + var _flushCallback = function () { + if (_callback !== null) { + try { + var currentTime = exports.unstable_now(); + var hasRemainingTime = true; + + _callback(hasRemainingTime, currentTime); + + _callback = null; + } catch (e) { + setTimeout(_flushCallback, 0); + throw e; + } + } + }; + + var initialTime = Date.now(); + + exports.unstable_now = function () { + return Date.now() - initialTime; + }; + + requestHostCallback = function (cb) { + if (_callback !== null) { + // Protect against re-entrancy. + setTimeout(requestHostCallback, 0, cb); + } else { + _callback = cb; + setTimeout(_flushCallback, 0); + } + }; + + requestHostTimeout = function (cb, ms) { + _timeoutID = setTimeout(cb, ms); + }; + + cancelHostTimeout = function () { + clearTimeout(_timeoutID); + }; + + shouldYieldToHost = function () { + return false; + }; + + requestPaint = exports.unstable_forceFrameRate = function () {}; + } else { + // Capture local references to native APIs, in case a polyfill overrides them. + var performance = window.performance; + var _Date = window.Date; + var _setTimeout = window.setTimeout; + var _clearTimeout = window.clearTimeout; + + if (typeof console !== 'undefined') { + // TODO: Scheduler no longer requires these methods to be polyfilled. But + // maybe we want to continue warning if they don't exist, to preserve the + // option to rely on it in the future? + var requestAnimationFrame = window.requestAnimationFrame; + var cancelAnimationFrame = window.cancelAnimationFrame; // TODO: Remove fb.me link + + if (typeof requestAnimationFrame !== 'function') { + console.error( + "This browser doesn't support requestAnimationFrame. " + + 'Make sure that you load a ' + + 'polyfill in older browsers. https://fb.me/react-polyfills', + ); + } + + if (typeof cancelAnimationFrame !== 'function') { + console.error( + "This browser doesn't support cancelAnimationFrame. " + + 'Make sure that you load a ' + + 'polyfill in older browsers. https://fb.me/react-polyfills', + ); + } + } + + if (typeof performance === 'object' && typeof performance.now === 'function') { + exports.unstable_now = function () { + return performance.now(); + }; + } else { + var _initialTime = _Date.now(); + + exports.unstable_now = function () { + return _Date.now() - _initialTime; + }; + } + + var isMessageLoopRunning = false; + var scheduledHostCallback = null; + var taskTimeoutID = -1; // Scheduler periodically yields in case there is other work on the main + // thread, like user events. By default, it yields multiple times per frame. + // It does not attempt to align with frame boundaries, since most tasks don't + // need to be frame aligned; for those that do, use requestAnimationFrame. + + var yieldInterval = 5; + var deadline = 0; // TODO: Make this configurable + // TODO: Adjust this based on priority? + + var maxYieldInterval = 300; + var needsPaint = false; + + if ( + enableIsInputPending && + navigator !== undefined && + navigator.scheduling !== undefined && + navigator.scheduling.isInputPending !== undefined + ) { + var scheduling = navigator.scheduling; + + shouldYieldToHost = function () { + var currentTime = exports.unstable_now(); + + if (currentTime >= deadline) { + // There's no time left. We may want to yield control of the main + // thread, so the browser can perform high priority tasks. The main ones + // are painting and user input. If there's a pending paint or a pending + // input, then we should yield. But if there's neither, then we can + // yield less often while remaining responsive. We'll eventually yield + // regardless, since there could be a pending paint that wasn't + // accompanied by a call to `requestPaint`, or other main thread tasks + // like network events. + if (needsPaint || scheduling.isInputPending()) { + // There is either a pending paint or a pending input. + return true; + } // There's no pending input. Only yield if we've reached the max + // yield interval. + + return currentTime >= maxYieldInterval; + } else { + // There's still time left in the frame. + return false; + } + }; + + requestPaint = function () { + needsPaint = true; + }; + } else { + // `isInputPending` is not available. Since we have no way of knowing if + // there's pending input, always yield at the end of the frame. + shouldYieldToHost = function () { + return exports.unstable_now() >= deadline; + }; // Since we yield every frame regardless, `requestPaint` has no effect. + + requestPaint = function () {}; + } + + exports.unstable_forceFrameRate = function (fps) { + if (fps < 0 || fps > 125) { + console.error( + 'forceFrameRate takes a positive int between 0 and 125, ' + + 'forcing framerates higher than 125 fps is not unsupported', + ); + return; + } + + if (fps > 0) { + yieldInterval = Math.floor(1000 / fps); + } else { + // reset the framerate + yieldInterval = 5; + } + }; + + var performWorkUntilDeadline = function () { + if (scheduledHostCallback !== null) { + var currentTime = exports.unstable_now(); // Yield after `yieldInterval` ms, regardless of where we are in the vsync + // cycle. This means there's always time remaining at the beginning of + // the message event. + + deadline = currentTime + yieldInterval; + var hasTimeRemaining = true; + + try { + var hasMoreWork = scheduledHostCallback(hasTimeRemaining, currentTime); + + if (!hasMoreWork) { + isMessageLoopRunning = false; + scheduledHostCallback = null; + } else { + // If there's more work, schedule the next message event at the end + // of the preceding one. + port.postMessage(null); + } + } catch (error) { + // If a scheduler task throws, exit the current browser task so the + // error can be observed. + port.postMessage(null); + throw error; + } + } else { + isMessageLoopRunning = false; + } // Yielding to the browser will give it a chance to paint, so we can + // reset this. + + needsPaint = false; + }; + + var channel = new MessageChannel(); + var port = channel.port2; + channel.port1.onmessage = performWorkUntilDeadline; + + requestHostCallback = function (callback) { + scheduledHostCallback = callback; + + if (!isMessageLoopRunning) { + isMessageLoopRunning = true; + port.postMessage(null); + } + }; + + requestHostTimeout = function (callback, ms) { + taskTimeoutID = _setTimeout(function () { + callback(exports.unstable_now()); + }, ms); + }; + + cancelHostTimeout = function () { + _clearTimeout(taskTimeoutID); + + taskTimeoutID = -1; + }; + } + + function push(heap, node) { + var index = heap.length; + heap.push(node); + siftUp(heap, node, index); + } + function peek(heap) { + var first = heap[0]; + return first === undefined ? null : first; + } + function pop(heap) { + var first = heap[0]; + + if (first !== undefined) { + var last = heap.pop(); + + if (last !== first) { + heap[0] = last; + siftDown(heap, last, 0); + } + + return first; + } else { + return null; + } + } + + function siftUp(heap, node, i) { + var index = i; + + while (true) { + var parentIndex = Math.floor((index - 1) / 2); + var parent = heap[parentIndex]; + + if (parent !== undefined && compare(parent, node) > 0) { + // The parent is larger. Swap positions. + heap[parentIndex] = node; + heap[index] = parent; + index = parentIndex; + } else { + // The parent is smaller. Exit. + return; + } + } + } + + function siftDown(heap, node, i) { + var index = i; + var length = heap.length; + + while (index < length) { + var leftIndex = (index + 1) * 2 - 1; + var left = heap[leftIndex]; + var rightIndex = leftIndex + 1; + var right = heap[rightIndex]; // If the left or right node is smaller, swap with the smaller of those. + + if (left !== undefined && compare(left, node) < 0) { + if (right !== undefined && compare(right, left) < 0) { + heap[index] = right; + heap[rightIndex] = node; + index = rightIndex; + } else { + heap[index] = left; + heap[leftIndex] = node; + index = leftIndex; + } + } else if (right !== undefined && compare(right, node) < 0) { + heap[index] = right; + heap[rightIndex] = node; + index = rightIndex; + } else { + // Neither child is smaller. Exit. + return; + } + } + } + + function compare(a, b) { + // Compare sort index first, then task id. + var diff = a.sortIndex - b.sortIndex; + return diff !== 0 ? diff : a.id - b.id; + } + + // TODO: Use symbols? + var NoPriority = 0; + var ImmediatePriority = 1; + var UserBlockingPriority = 2; + var NormalPriority = 3; + var LowPriority = 4; + var IdlePriority = 5; + + var runIdCounter = 0; + var mainThreadIdCounter = 0; + var profilingStateSize = 4; + var sharedProfilingBuffer = enableProfiling // $FlowFixMe Flow doesn't know about SharedArrayBuffer + ? typeof SharedArrayBuffer === 'function' + ? new SharedArrayBuffer(profilingStateSize * Int32Array.BYTES_PER_ELEMENT) // $FlowFixMe Flow doesn't know about ArrayBuffer + : typeof ArrayBuffer === 'function' + ? new ArrayBuffer(profilingStateSize * Int32Array.BYTES_PER_ELEMENT) + : null // Don't crash the init path on IE9 + : null; + var profilingState = + enableProfiling && sharedProfilingBuffer !== null ? new Int32Array(sharedProfilingBuffer) : []; // We can't read this but it helps save bytes for null checks + + var PRIORITY = 0; + var CURRENT_TASK_ID = 1; + var CURRENT_RUN_ID = 2; + var QUEUE_SIZE = 3; + + if (enableProfiling) { + profilingState[PRIORITY] = NoPriority; // This is maintained with a counter, because the size of the priority queue + // array might include canceled tasks. + + profilingState[QUEUE_SIZE] = 0; + profilingState[CURRENT_TASK_ID] = 0; + } // Bytes per element is 4 + + var INITIAL_EVENT_LOG_SIZE = 131072; + var MAX_EVENT_LOG_SIZE = 524288; // Equivalent to 2 megabytes + + var eventLogSize = 0; + var eventLogBuffer = null; + var eventLog = null; + var eventLogIndex = 0; + var TaskStartEvent = 1; + var TaskCompleteEvent = 2; + var TaskErrorEvent = 3; + var TaskCancelEvent = 4; + var TaskRunEvent = 5; + var TaskYieldEvent = 6; + var SchedulerSuspendEvent = 7; + var SchedulerResumeEvent = 8; + + function logEvent(entries) { + if (eventLog !== null) { + var offset = eventLogIndex; + eventLogIndex += entries.length; + + if (eventLogIndex + 1 > eventLogSize) { + eventLogSize *= 2; + + if (eventLogSize > MAX_EVENT_LOG_SIZE) { + console.error( + "Scheduler Profiling: Event log exceeded maximum size. Don't " + + 'forget to call `stopLoggingProfilingEvents()`.', + ); + stopLoggingProfilingEvents(); + return; + } + + var newEventLog = new Int32Array(eventLogSize * 4); + newEventLog.set(eventLog); + eventLogBuffer = newEventLog.buffer; + eventLog = newEventLog; + } + + eventLog.set(entries, offset); + } + } + + function startLoggingProfilingEvents() { + eventLogSize = INITIAL_EVENT_LOG_SIZE; + eventLogBuffer = new ArrayBuffer(eventLogSize * 4); + eventLog = new Int32Array(eventLogBuffer); + eventLogIndex = 0; + } + function stopLoggingProfilingEvents() { + var buffer = eventLogBuffer; + eventLogSize = 0; + eventLogBuffer = null; + eventLog = null; + eventLogIndex = 0; + return buffer; + } + function markTaskStart(task, ms) { + if (enableProfiling) { + profilingState[QUEUE_SIZE]++; + + if (eventLog !== null) { + // performance.now returns a float, representing milliseconds. When the + // event is logged, it's coerced to an int. Convert to microseconds to + // maintain extra degrees of precision. + logEvent([TaskStartEvent, ms * 1000, task.id, task.priorityLevel]); + } + } + } + function markTaskCompleted(task, ms) { + if (enableProfiling) { + profilingState[PRIORITY] = NoPriority; + profilingState[CURRENT_TASK_ID] = 0; + profilingState[QUEUE_SIZE]--; + + if (eventLog !== null) { + logEvent([TaskCompleteEvent, ms * 1000, task.id]); + } + } + } + function markTaskCanceled(task, ms) { + if (enableProfiling) { + profilingState[QUEUE_SIZE]--; + + if (eventLog !== null) { + logEvent([TaskCancelEvent, ms * 1000, task.id]); + } + } + } + function markTaskErrored(task, ms) { + if (enableProfiling) { + profilingState[PRIORITY] = NoPriority; + profilingState[CURRENT_TASK_ID] = 0; + profilingState[QUEUE_SIZE]--; + + if (eventLog !== null) { + logEvent([TaskErrorEvent, ms * 1000, task.id]); + } + } + } + function markTaskRun(task, ms) { + if (enableProfiling) { + runIdCounter++; + profilingState[PRIORITY] = task.priorityLevel; + profilingState[CURRENT_TASK_ID] = task.id; + profilingState[CURRENT_RUN_ID] = runIdCounter; + + if (eventLog !== null) { + logEvent([TaskRunEvent, ms * 1000, task.id, runIdCounter]); + } + } + } + function markTaskYield(task, ms) { + if (enableProfiling) { + profilingState[PRIORITY] = NoPriority; + profilingState[CURRENT_TASK_ID] = 0; + profilingState[CURRENT_RUN_ID] = 0; + + if (eventLog !== null) { + logEvent([TaskYieldEvent, ms * 1000, task.id, runIdCounter]); + } + } + } + function markSchedulerSuspended(ms) { + if (enableProfiling) { + mainThreadIdCounter++; + + if (eventLog !== null) { + logEvent([SchedulerSuspendEvent, ms * 1000, mainThreadIdCounter]); + } + } + } + function markSchedulerUnsuspended(ms) { + if (enableProfiling) { + if (eventLog !== null) { + logEvent([SchedulerResumeEvent, ms * 1000, mainThreadIdCounter]); + } + } + } + + /* eslint-disable no-var */ + // Math.pow(2, 30) - 1 + // 0b111111111111111111111111111111 + + var maxSigned31BitInt = 1073741823; // Times out immediately + + var IMMEDIATE_PRIORITY_TIMEOUT = -1; // Eventually times out + + var USER_BLOCKING_PRIORITY = 250; + var NORMAL_PRIORITY_TIMEOUT = 5000; + var LOW_PRIORITY_TIMEOUT = 10000; // Never times out + + var IDLE_PRIORITY = maxSigned31BitInt; // Tasks are stored on a min heap + + var taskQueue = []; + var timerQueue = []; // Incrementing id counter. Used to maintain insertion order. + + var taskIdCounter = 1; // Pausing the scheduler is useful for debugging. + + var isSchedulerPaused = false; + var currentTask = null; + var currentPriorityLevel = NormalPriority; // This is set while performing work, to prevent re-entrancy. + + var isPerformingWork = false; + var isHostCallbackScheduled = false; + var isHostTimeoutScheduled = false; + + function advanceTimers(currentTime) { + // Check for tasks that are no longer delayed and add them to the queue. + var timer = peek(timerQueue); + + while (timer !== null) { + if (timer.callback === null) { + // Timer was cancelled. + pop(timerQueue); + } else if (timer.startTime <= currentTime) { + // Timer fired. Transfer to the task queue. + pop(timerQueue); + timer.sortIndex = timer.expirationTime; + push(taskQueue, timer); + + if (enableProfiling) { + markTaskStart(timer, currentTime); + timer.isQueued = true; + } + } else { + // Remaining timers are pending. + return; + } + + timer = peek(timerQueue); + } + } + + function handleTimeout(currentTime) { + isHostTimeoutScheduled = false; + advanceTimers(currentTime); + + if (!isHostCallbackScheduled) { + if (peek(taskQueue) !== null) { + isHostCallbackScheduled = true; + requestHostCallback(flushWork); + } else { + var firstTimer = peek(timerQueue); + + if (firstTimer !== null) { + requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime); + } + } + } + } + + function flushWork(hasTimeRemaining, initialTime) { + if (enableProfiling) { + markSchedulerUnsuspended(initialTime); + } // We'll need a host callback the next time work is scheduled. + + isHostCallbackScheduled = false; + + if (isHostTimeoutScheduled) { + // We scheduled a timeout but it's no longer needed. Cancel it. + isHostTimeoutScheduled = false; + cancelHostTimeout(); + } + + isPerformingWork = true; + var previousPriorityLevel = currentPriorityLevel; + + try { + if (enableProfiling) { + try { + return workLoop(hasTimeRemaining, initialTime); + } catch (error) { + if (currentTask !== null) { + var currentTime = exports.unstable_now(); + markTaskErrored(currentTask, currentTime); + currentTask.isQueued = false; + } + + throw error; + } + } else { + // No catch in prod codepath. + return workLoop(hasTimeRemaining, initialTime); + } + } finally { + currentTask = null; + currentPriorityLevel = previousPriorityLevel; + isPerformingWork = false; + + if (enableProfiling) { + var _currentTime = exports.unstable_now(); + + markSchedulerSuspended(_currentTime); + } + } + } + + function workLoop(hasTimeRemaining, initialTime) { + var currentTime = initialTime; + advanceTimers(currentTime); + currentTask = peek(taskQueue); + + while (currentTask !== null && !(enableSchedulerDebugging && isSchedulerPaused)) { + if (currentTask.expirationTime > currentTime && (!hasTimeRemaining || shouldYieldToHost())) { + // This currentTask hasn't expired, and we've reached the deadline. + break; + } + + var callback = currentTask.callback; + + if (callback !== null) { + currentTask.callback = null; + currentPriorityLevel = currentTask.priorityLevel; + var didUserCallbackTimeout = currentTask.expirationTime <= currentTime; + markTaskRun(currentTask, currentTime); + var continuationCallback = callback(didUserCallbackTimeout); + currentTime = exports.unstable_now(); + + if (typeof continuationCallback === 'function') { + currentTask.callback = continuationCallback; + markTaskYield(currentTask, currentTime); + } else { + if (enableProfiling) { + markTaskCompleted(currentTask, currentTime); + currentTask.isQueued = false; + } + + if (currentTask === peek(taskQueue)) { + pop(taskQueue); + } + } + + advanceTimers(currentTime); + } else { + pop(taskQueue); + } + + currentTask = peek(taskQueue); + } // Return whether there's additional work + + if (currentTask !== null) { + return true; + } else { + var firstTimer = peek(timerQueue); + + if (firstTimer !== null) { + requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime); + } + + return false; + } + } + + function unstable_runWithPriority(priorityLevel, eventHandler) { + switch (priorityLevel) { + case ImmediatePriority: + case UserBlockingPriority: + case NormalPriority: + case LowPriority: + case IdlePriority: + break; + + default: + priorityLevel = NormalPriority; + } + + var previousPriorityLevel = currentPriorityLevel; + currentPriorityLevel = priorityLevel; + + try { + return eventHandler(); + } finally { + currentPriorityLevel = previousPriorityLevel; + } + } + + function unstable_next(eventHandler) { + var priorityLevel; + + switch (currentPriorityLevel) { + case ImmediatePriority: + case UserBlockingPriority: + case NormalPriority: + // Shift down to normal priority + priorityLevel = NormalPriority; + break; + + default: + // Anything lower than normal priority should remain at the current level. + priorityLevel = currentPriorityLevel; + break; + } + + var previousPriorityLevel = currentPriorityLevel; + currentPriorityLevel = priorityLevel; + + try { + return eventHandler(); + } finally { + currentPriorityLevel = previousPriorityLevel; + } + } + + function unstable_wrapCallback(callback) { + var parentPriorityLevel = currentPriorityLevel; + return function () { + // This is a fork of runWithPriority, inlined for performance. + var previousPriorityLevel = currentPriorityLevel; + currentPriorityLevel = parentPriorityLevel; + + try { + return callback.apply(this, arguments); + } finally { + currentPriorityLevel = previousPriorityLevel; + } + }; + } + + function timeoutForPriorityLevel(priorityLevel) { + switch (priorityLevel) { + case ImmediatePriority: + return IMMEDIATE_PRIORITY_TIMEOUT; + + case UserBlockingPriority: + return USER_BLOCKING_PRIORITY; + + case IdlePriority: + return IDLE_PRIORITY; + + case LowPriority: + return LOW_PRIORITY_TIMEOUT; + + case NormalPriority: + default: + return NORMAL_PRIORITY_TIMEOUT; + } + } + + function unstable_scheduleCallback(priorityLevel, callback, options) { + var currentTime = exports.unstable_now(); + var startTime; + var timeout; + + if (typeof options === 'object' && options !== null) { + var delay = options.delay; + + if (typeof delay === 'number' && delay > 0) { + startTime = currentTime + delay; + } else { + startTime = currentTime; + } + + timeout = + typeof options.timeout === 'number' + ? options.timeout + : timeoutForPriorityLevel(priorityLevel); + } else { + timeout = timeoutForPriorityLevel(priorityLevel); + startTime = currentTime; + } + + var expirationTime = startTime + timeout; + var newTask = { + id: taskIdCounter++, + callback: callback, + priorityLevel: priorityLevel, + startTime: startTime, + expirationTime: expirationTime, + sortIndex: -1, + }; + + if (enableProfiling) { + newTask.isQueued = false; + } + + if (startTime > currentTime) { + // This is a delayed task. + newTask.sortIndex = startTime; + push(timerQueue, newTask); + + if (peek(taskQueue) === null && newTask === peek(timerQueue)) { + // All tasks are delayed, and this is the task with the earliest delay. + if (isHostTimeoutScheduled) { + // Cancel an existing timeout. + cancelHostTimeout(); + } else { + isHostTimeoutScheduled = true; + } // Schedule a timeout. + + requestHostTimeout(handleTimeout, startTime - currentTime); + } + } else { + newTask.sortIndex = expirationTime; + push(taskQueue, newTask); + + if (enableProfiling) { + markTaskStart(newTask, currentTime); + newTask.isQueued = true; + } // Schedule a host callback, if needed. If we're already performing work, + // wait until the next time we yield. + + if (!isHostCallbackScheduled && !isPerformingWork) { + isHostCallbackScheduled = true; + requestHostCallback(flushWork); + } + } + + return newTask; + } + + function unstable_pauseExecution() { + isSchedulerPaused = true; + } + + function unstable_continueExecution() { + isSchedulerPaused = false; + + if (!isHostCallbackScheduled && !isPerformingWork) { + isHostCallbackScheduled = true; + requestHostCallback(flushWork); + } + } + + function unstable_getFirstCallbackNode() { + return peek(taskQueue); + } + + function unstable_cancelCallback(task) { + if (enableProfiling) { + if (task.isQueued) { + var currentTime = exports.unstable_now(); + markTaskCanceled(task, currentTime); + task.isQueued = false; + } + } // Null out the callback to indicate the task has been canceled. (Can't + // remove from the queue because you can't remove arbitrary nodes from an + // array based heap, only the first one.) + + task.callback = null; + } + + function unstable_getCurrentPriorityLevel() { + return currentPriorityLevel; + } + + function unstable_shouldYield() { + var currentTime = exports.unstable_now(); + advanceTimers(currentTime); + var firstTask = peek(taskQueue); + return ( + (firstTask !== currentTask && + currentTask !== null && + firstTask !== null && + firstTask.callback !== null && + firstTask.startTime <= currentTime && + firstTask.expirationTime < currentTask.expirationTime) || + shouldYieldToHost() + ); + } + + var unstable_requestPaint = requestPaint; + var unstable_Profiling = enableProfiling + ? { + startLoggingProfilingEvents: startLoggingProfilingEvents, + stopLoggingProfilingEvents: stopLoggingProfilingEvents, + sharedProfilingBuffer: sharedProfilingBuffer, + } + : null; + + exports.unstable_ImmediatePriority = ImmediatePriority; + exports.unstable_UserBlockingPriority = UserBlockingPriority; + exports.unstable_NormalPriority = NormalPriority; + exports.unstable_IdlePriority = IdlePriority; + exports.unstable_LowPriority = LowPriority; + exports.unstable_runWithPriority = unstable_runWithPriority; + exports.unstable_next = unstable_next; + exports.unstable_scheduleCallback = unstable_scheduleCallback; + exports.unstable_cancelCallback = unstable_cancelCallback; + exports.unstable_wrapCallback = unstable_wrapCallback; + exports.unstable_getCurrentPriorityLevel = unstable_getCurrentPriorityLevel; + exports.unstable_shouldYield = unstable_shouldYield; + exports.unstable_requestPaint = unstable_requestPaint; + exports.unstable_continueExecution = unstable_continueExecution; + exports.unstable_pauseExecution = unstable_pauseExecution; + exports.unstable_getFirstCallbackNode = unstable_getFirstCallbackNode; + exports.unstable_Profiling = unstable_Profiling; + })(); + } + + /***/ + }, + /* 515 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + if (false) { + module.exports = require('./cjs/scheduler-tracing.production.min.js'); + } else { + module.exports = __webpack_require__(516); + } + + /***/ + }, + /* 516 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** @license React v0.18.0 + * scheduler-tracing.development.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + + if (true) { + (function () { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { value: true }); + + // Helps identify side effects in render-phase lifecycle hooks and setState + // reducers by double invoking them in Strict Mode. + + // To preserve the "Pause on caught exceptions" behavior of the debugger, we + // replay the begin phase of a failed component inside invokeGuardedCallback. + + // Warn about deprecated, async-unsafe lifecycles; relates to RFC #6: + + // Gather advanced timing metrics for Profiler subtrees. + + // Trace which interactions trigger each commit. + + var enableSchedulerTracing = true; // SSR experiments + + // Only used in www builds. + + // Only used in www builds. + + // Disable javascript: URL strings in href for XSS protection. + + // React Fire: prevent the value and checked attributes from syncing + // with their related DOM properties + + // These APIs will no longer be "unstable" in the upcoming 16.7 release, + // Control this behavior with a flag to support 16.6 minor releases in the meanwhile. + + // Experimental React Flare event system and event components support. + + // Experimental Host Component support. + + // Experimental Scope support. + + // New API for JSX transforms to target - https://github.com/reactjs/rfcs/pull/107 + + // We will enforce mocking scheduler with scheduler/unstable_mock at some point. (v17?) + // Till then, we warn about the missing mock, but still fallback to a legacy mode compatible version + + // For tests, we flush suspense fallbacks in an act scope; + // *except* in some of our own tests, where we test incremental loading states. + + // Add a callback property to suspense to notify which promises are currently + // in the update queue. This allows reporting and tracing of what is causing + // the user to see a loading state. + // Also allows hydration callbacks to fire when a dehydrated boundary gets + // hydrated or deleted. + + // Part of the simplification of React.createElement so we can eventually move + // from React.createElement to React.jsx + // https://github.com/reactjs/rfcs/blob/createlement-rfc/text/0000-create-element-changes.md + + // Flag to turn event.target and event.currentTarget in ReactNative from a reactTag to a component instance + + var DEFAULT_THREAD_ID = 0; // Counters used to generate unique IDs. + + var interactionIDCounter = 0; + var threadIDCounter = 0; // Set of currently traced interactions. + // Interactions "stack"– + // Meaning that newly traced interactions are appended to the previously active set. + // When an interaction goes out of scope, the previous set (if any) is restored. + + exports.__interactionsRef = null; // Listener(s) to notify when interactions begin and end. + + exports.__subscriberRef = null; + + if (enableSchedulerTracing) { + exports.__interactionsRef = { + current: new Set(), + }; + exports.__subscriberRef = { + current: null, + }; + } + + function unstable_clear(callback) { + if (!enableSchedulerTracing) { + return callback(); + } + + var prevInteractions = exports.__interactionsRef.current; + exports.__interactionsRef.current = new Set(); + + try { + return callback(); + } finally { + exports.__interactionsRef.current = prevInteractions; + } + } + function unstable_getCurrent() { + if (!enableSchedulerTracing) { + return null; + } else { + return exports.__interactionsRef.current; + } + } + function unstable_getThreadID() { + return ++threadIDCounter; + } + function unstable_trace(name, timestamp, callback) { + var threadID = + arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : DEFAULT_THREAD_ID; + + if (!enableSchedulerTracing) { + return callback(); + } + + var interaction = { + __count: 1, + id: interactionIDCounter++, + name: name, + timestamp: timestamp, + }; + var prevInteractions = exports.__interactionsRef.current; // Traced interactions should stack/accumulate. + // To do that, clone the current interactions. + // The previous set will be restored upon completion. + + var interactions = new Set(prevInteractions); + interactions.add(interaction); + exports.__interactionsRef.current = interactions; + var subscriber = exports.__subscriberRef.current; + var returnValue; + + try { + if (subscriber !== null) { + subscriber.onInteractionTraced(interaction); + } + } finally { + try { + if (subscriber !== null) { + subscriber.onWorkStarted(interactions, threadID); + } + } finally { + try { + returnValue = callback(); + } finally { + exports.__interactionsRef.current = prevInteractions; + + try { + if (subscriber !== null) { + subscriber.onWorkStopped(interactions, threadID); + } + } finally { + interaction.__count--; // If no async work was scheduled for this interaction, + // Notify subscribers that it's completed. + + if (subscriber !== null && interaction.__count === 0) { + subscriber.onInteractionScheduledWorkCompleted(interaction); + } + } + } + } + } + + return returnValue; + } + function unstable_wrap(callback) { + var threadID = + arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEFAULT_THREAD_ID; + + if (!enableSchedulerTracing) { + return callback; + } + + var wrappedInteractions = exports.__interactionsRef.current; + var subscriber = exports.__subscriberRef.current; + + if (subscriber !== null) { + subscriber.onWorkScheduled(wrappedInteractions, threadID); + } // Update the pending async work count for the current interactions. + // Update after calling subscribers in case of error. + + wrappedInteractions.forEach(function (interaction) { + interaction.__count++; + }); + var hasRun = false; + + function wrapped() { + var prevInteractions = exports.__interactionsRef.current; + exports.__interactionsRef.current = wrappedInteractions; + subscriber = exports.__subscriberRef.current; + + try { + var returnValue; + + try { + if (subscriber !== null) { + subscriber.onWorkStarted(wrappedInteractions, threadID); + } + } finally { + try { + returnValue = callback.apply(undefined, arguments); + } finally { + exports.__interactionsRef.current = prevInteractions; + + if (subscriber !== null) { + subscriber.onWorkStopped(wrappedInteractions, threadID); + } + } + } + + return returnValue; + } finally { + if (!hasRun) { + // We only expect a wrapped function to be executed once, + // But in the event that it's executed more than once– + // Only decrement the outstanding interaction counts once. + hasRun = true; // Update pending async counts for all wrapped interactions. + // If this was the last scheduled async work for any of them, + // Mark them as completed. + + wrappedInteractions.forEach(function (interaction) { + interaction.__count--; + + if (subscriber !== null && interaction.__count === 0) { + subscriber.onInteractionScheduledWorkCompleted(interaction); + } + }); + } + } + } + + wrapped.cancel = function cancel() { + subscriber = exports.__subscriberRef.current; + + try { + if (subscriber !== null) { + subscriber.onWorkCanceled(wrappedInteractions, threadID); + } + } finally { + // Update pending async counts for all wrapped interactions. + // If this was the last scheduled async work for any of them, + // Mark them as completed. + wrappedInteractions.forEach(function (interaction) { + interaction.__count--; + + if (subscriber && interaction.__count === 0) { + subscriber.onInteractionScheduledWorkCompleted(interaction); + } + }); + } + }; + + return wrapped; + } + + var subscribers = null; + + if (enableSchedulerTracing) { + subscribers = new Set(); + } + + function unstable_subscribe(subscriber) { + if (enableSchedulerTracing) { + subscribers.add(subscriber); + + if (subscribers.size === 1) { + exports.__subscriberRef.current = { + onInteractionScheduledWorkCompleted: onInteractionScheduledWorkCompleted, + onInteractionTraced: onInteractionTraced, + onWorkCanceled: onWorkCanceled, + onWorkScheduled: onWorkScheduled, + onWorkStarted: onWorkStarted, + onWorkStopped: onWorkStopped, + }; + } + } + } + function unstable_unsubscribe(subscriber) { + if (enableSchedulerTracing) { + subscribers.delete(subscriber); + + if (subscribers.size === 0) { + exports.__subscriberRef.current = null; + } + } + } + + function onInteractionTraced(interaction) { + var didCatchError = false; + var caughtError = null; + subscribers.forEach(function (subscriber) { + try { + subscriber.onInteractionTraced(interaction); + } catch (error) { + if (!didCatchError) { + didCatchError = true; + caughtError = error; + } + } + }); + + if (didCatchError) { + throw caughtError; + } + } + + function onInteractionScheduledWorkCompleted(interaction) { + var didCatchError = false; + var caughtError = null; + subscribers.forEach(function (subscriber) { + try { + subscriber.onInteractionScheduledWorkCompleted(interaction); + } catch (error) { + if (!didCatchError) { + didCatchError = true; + caughtError = error; + } + } + }); + + if (didCatchError) { + throw caughtError; + } + } + + function onWorkScheduled(interactions, threadID) { + var didCatchError = false; + var caughtError = null; + subscribers.forEach(function (subscriber) { + try { + subscriber.onWorkScheduled(interactions, threadID); + } catch (error) { + if (!didCatchError) { + didCatchError = true; + caughtError = error; + } + } + }); + + if (didCatchError) { + throw caughtError; + } + } + + function onWorkStarted(interactions, threadID) { + var didCatchError = false; + var caughtError = null; + subscribers.forEach(function (subscriber) { + try { + subscriber.onWorkStarted(interactions, threadID); + } catch (error) { + if (!didCatchError) { + didCatchError = true; + caughtError = error; + } + } + }); + + if (didCatchError) { + throw caughtError; + } + } + + function onWorkStopped(interactions, threadID) { + var didCatchError = false; + var caughtError = null; + subscribers.forEach(function (subscriber) { + try { + subscriber.onWorkStopped(interactions, threadID); + } catch (error) { + if (!didCatchError) { + didCatchError = true; + caughtError = error; + } + } + }); + + if (didCatchError) { + throw caughtError; + } + } + + function onWorkCanceled(interactions, threadID) { + var didCatchError = false; + var caughtError = null; + subscribers.forEach(function (subscriber) { + try { + subscriber.onWorkCanceled(interactions, threadID); + } catch (error) { + if (!didCatchError) { + didCatchError = true; + caughtError = error; + } + } + }); + + if (didCatchError) { + throw caughtError; + } + } + + exports.unstable_clear = unstable_clear; + exports.unstable_getCurrent = unstable_getCurrent; + exports.unstable_getThreadID = unstable_getThreadID; + exports.unstable_trace = unstable_trace; + exports.unstable_wrap = unstable_wrap; + exports.unstable_subscribe = unstable_subscribe; + exports.unstable_unsubscribe = unstable_unsubscribe; + })(); + } + + /***/ + }, + /* 517 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (global) { + var _interopRequireDefault = __webpack_require__(41); + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.reactOnRailsPageLoaded = reactOnRailsPageLoaded; + exports.clientStartup = clientStartup; + + var _stringify = _interopRequireDefault(__webpack_require__(106)); + + var _reactDom = _interopRequireDefault(__webpack_require__(230)); + + var _createReactElement = _interopRequireDefault(__webpack_require__(161)); + + var _isCreateReactElementResultNonReactComponent = _interopRequireDefault(__webpack_require__(232)); + + /* global ReactOnRails Turbolinks */ + var REACT_ON_RAILS_STORE_ATTRIBUTE = 'data-js-react-on-rails-store'; + + function findContext() { + if (typeof window.ReactOnRails !== 'undefined') { + return window; + } else if (typeof ReactOnRails !== 'undefined') { + return global; + } + + throw new Error('ReactOnRails is undefined in both global and window namespaces.\n '); + } + + function debugTurbolinks() { + if (!window) { + return; + } + + var context = findContext(); + + if (context.ReactOnRails.option('traceTurbolinks')) { + var _console; + + for (var _len = arguments.length, msg = new Array(_len), _key = 0; _key < _len; _key++) { + msg[_key] = arguments[_key]; + } + + (_console = console).log.apply(_console, ['TURBO:'].concat(msg)); + } + } + + function turbolinksInstalled() { + return typeof Turbolinks !== 'undefined'; + } + + function forEach(fn, className, railsContext) { + var els = document.getElementsByClassName(className); + + for (var i = 0; i < els.length; i += 1) { + fn(els[i], railsContext); + } + } + + function forEachByAttribute(fn, attributeName, railsContext) { + var els = document.querySelectorAll('['.concat(attributeName, ']')); + + for (var i = 0; i < els.length; i += 1) { + fn(els[i], railsContext); + } + } + + function forEachComponent(fn, railsContext) { + forEach(fn, 'js-react-on-rails-component', railsContext); + } + + function initializeStore(el, railsContext) { + var context = findContext(); + var name = el.getAttribute(REACT_ON_RAILS_STORE_ATTRIBUTE); + var props = JSON.parse(el.textContent); + var storeGenerator = context.ReactOnRails.getStoreGenerator(name); + var store = storeGenerator(props, railsContext); + context.ReactOnRails.setStore(name, store); + } + + function forEachStore(railsContext) { + forEachByAttribute(initializeStore, REACT_ON_RAILS_STORE_ATTRIBUTE, railsContext); + } + + function turbolinksVersion5() { + return typeof Turbolinks.controller !== 'undefined'; + } + + function turbolinksSupported() { + return Turbolinks.supported; + } + + function delegateToRenderer(componentObj, props, railsContext, domNodeId, trace) { + var name = componentObj.name, + component = componentObj.component, + isRenderer = componentObj.isRenderer; + + if (isRenderer) { + if (trace) { + console.log( + 'DELEGATING TO RENDERER ' + .concat(name, ' for dom node with id: ') + .concat(domNodeId, ' with props, railsContext:'), + props, + railsContext, + ); + } + + component(props, railsContext, domNodeId); + return true; + } + + return false; + } + + function domNodeIdForEl(el) { + return el.getAttribute('data-dom-id'); + } + /** + * Used for client rendering by ReactOnRails. Either calls ReactDOM.hydrate, ReactDOM.render, or + * delegates to a renderer registered by the user. + * @param el + */ + + function render(el, railsContext) { + var context = findContext(); // This must match lib/react_on_rails/helper.rb + + var name = el.getAttribute('data-component-name'); + var domNodeId = domNodeIdForEl(el); + var props = JSON.parse(el.textContent); + var trace = el.getAttribute('data-trace'); + + try { + var domNode = document.getElementById(domNodeId); + + if (domNode) { + var componentObj = context.ReactOnRails.getComponent(name); + + if (delegateToRenderer(componentObj, props, railsContext, domNodeId, trace)) { + return; + } // Hydrate if available and was server rendered + + var shouldHydrate = !!_reactDom.default.hydrate && !!domNode.innerHTML; + var reactElementOrRouterResult = (0, _createReactElement.default)({ + componentObj: componentObj, + props: props, + domNodeId: domNodeId, + trace: trace, + railsContext: railsContext, + shouldHydrate: shouldHydrate, + }); + + if ((0, _isCreateReactElementResultNonReactComponent.default)(reactElementOrRouterResult)) { + throw new Error( + 'You returned a server side type of react-router error: '.concat( + (0, _stringify.default)(reactElementOrRouterResult), + '\nYou should return a React.Component always for the client side entry point.', + ), + ); + } else if (shouldHydrate) { + _reactDom.default.hydrate(reactElementOrRouterResult, domNode); + } else { + _reactDom.default.render(reactElementOrRouterResult, domNode); + } + } + } catch (e) { + e.message = + 'ReactOnRails encountered an error while rendering component: '.concat(name, '.\n') + + 'Original message: '.concat(e.message); + throw e; + } + } + + function parseRailsContext() { + var el = document.getElementById('js-react-on-rails-context'); + + if (el) { + return JSON.parse(el.textContent); + } + + return null; + } + + function reactOnRailsPageLoaded() { + debugTurbolinks('reactOnRailsPageLoaded'); + var railsContext = parseRailsContext(); + forEachStore(railsContext); + forEachComponent(render, railsContext); + } + + function unmount(el) { + var domNodeId = domNodeIdForEl(el); + var domNode = document.getElementById(domNodeId); + + try { + _reactDom.default.unmountComponentAtNode(domNode); + } catch (e) { + console.info( + 'Caught error calling unmountComponentAtNode: '.concat(e.message, ' for domNode'), + domNode, + e, + ); + } + } + + function reactOnRailsPageUnloaded() { + debugTurbolinks('reactOnRailsPageUnloaded'); + forEachComponent(unmount); + } + + function renderInit() { + // Install listeners when running on the client (browser). + // We must do this check for turbolinks AFTER the document is loaded because we load the + // Webpack bundles first. + if (!turbolinksInstalled() || !turbolinksSupported()) { + debugTurbolinks('NOT USING TURBOLINKS: calling reactOnRailsPageLoaded'); + reactOnRailsPageLoaded(); + return; + } + + if (turbolinksVersion5()) { + debugTurbolinks( + 'USING TURBOLINKS 5: document added event listeners ' + + 'turbolinks:before-render and turbolinks:render.', + ); + document.addEventListener('turbolinks:before-render', reactOnRailsPageUnloaded); + document.addEventListener('turbolinks:render', reactOnRailsPageLoaded); + reactOnRailsPageLoaded(); + } else { + debugTurbolinks( + 'USING TURBOLINKS 2: document added event listeners page:before-unload and ' + 'page:change.', + ); + document.addEventListener('page:before-unload', reactOnRailsPageUnloaded); + document.addEventListener('page:change', reactOnRailsPageLoaded); + } + } + + function clientStartup(context) { + var document = context.document; // Check if server rendering + + if (!document) { + return; + } // Tried with a file local variable, but the install handler gets called twice. + // eslint-disable-next-line no-underscore-dangle + + if (context.__REACT_ON_RAILS_EVENT_HANDLERS_RAN_ONCE__) { + return; + } // eslint-disable-next-line no-underscore-dangle, no-param-reassign + + context.__REACT_ON_RAILS_EVENT_HANDLERS_RAN_ONCE__ = true; + debugTurbolinks('Adding DOMContentLoaded event to install event listeners.'); + + if (document.readyState === 'complete') { + window.setTimeout(renderInit); + } else { + document.addEventListener('DOMContentLoaded', renderInit); + } + } + /* WEBPACK VAR INJECTION */ + }).call(exports, __webpack_require__(38)); + + /***/ + }, + /* 518 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** @license React v16.12.0 + * react-dom-server.browser.development.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + + if (true) { + (function () { + 'use strict'; + + var _assign = __webpack_require__(64); + var React = __webpack_require__(1); + var checkPropTypes = __webpack_require__(107); + + // Do not require this module directly! Use normal `invariant` calls with + // template literal strings. The messages will be replaced with error codes + // during build. + + // TODO: this is special because it gets imported during build. + + var ReactVersion = '16.12.0'; + + /** + * Use invariant() to assert state which your program assumes to be true. + * + * Provide sprintf-style format (only %s is supported) and arguments + * to provide information about what broke and what you were + * expecting. + * + * The invariant message will be stripped in production, but the invariant + * will remain to ensure logic does not differ in production. + */ + + /** + * Similar to invariant but only logs a warning if the condition is not met. + * This can be used to log issues in development environments in critical + * paths. Removing the logging code for production environments will keep the + * same logic and follow the same code paths. + */ + var warningWithoutStack = function () {}; + + { + warningWithoutStack = function (condition, format) { + for ( + var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; + _key < _len; + _key++ + ) { + args[_key - 2] = arguments[_key]; + } + + if (format === undefined) { + throw new Error( + '`warningWithoutStack(condition, format, ...args)` requires a warning ' + + 'message argument', + ); + } + + if (args.length > 8) { + // Check before the condition to catch violations early. + throw new Error('warningWithoutStack() currently supports at most 8 arguments.'); + } + + if (condition) { + return; + } + + if (typeof console !== 'undefined') { + var argsWithFormat = args.map(function (item) { + return '' + item; + }); + argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it + // breaks IE9: https://github.com/facebook/react/issues/13610 + + Function.prototype.apply.call(console.error, console, argsWithFormat); + } + + try { + // --- Welcome to debugging React --- + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + var argIndex = 0; + var message = + 'Warning: ' + + format.replace(/%s/g, function () { + return args[argIndex++]; + }); + throw new Error(message); + } catch (x) {} + }; + } + + var warningWithoutStack$1 = warningWithoutStack; + + // The Symbol used to tag the ReactElement-like types. If there is no native Symbol + // nor polyfill, then a plain number is used for performance. + var hasSymbol = typeof Symbol === 'function' && Symbol.for; + + var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca; + var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb; + var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc; + var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2; + var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd; + var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary + // (unstable) APIs that have been removed. Can we remove the symbols? + + var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf; + var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0; + var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1; + var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8; + var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3; + var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4; + var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5; + + var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7; + + var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; // Prevent newer renderers from RTE when used with older react package versions. + // Current owner and dispatcher used to share the same ref, + // but PR #14548 split them out to better support the react-debug-tools package. + + if (!ReactSharedInternals.hasOwnProperty('ReactCurrentDispatcher')) { + ReactSharedInternals.ReactCurrentDispatcher = { + current: null, + }; + } + + if (!ReactSharedInternals.hasOwnProperty('ReactCurrentBatchConfig')) { + ReactSharedInternals.ReactCurrentBatchConfig = { + suspense: null, + }; + } + + /** + * Similar to invariant but only logs a warning if the condition is not met. + * This can be used to log issues in development environments in critical + * paths. Removing the logging code for production environments will keep the + * same logic and follow the same code paths. + */ + + var warning = warningWithoutStack$1; + + { + warning = function (condition, format) { + if (condition) { + return; + } + + var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; + var stack = ReactDebugCurrentFrame.getStackAddendum(); // eslint-disable-next-line react-internal/warning-and-invariant-args + + for ( + var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; + _key < _len; + _key++ + ) { + args[_key - 2] = arguments[_key]; + } + + warningWithoutStack$1.apply(void 0, [false, format + '%s'].concat(args, [stack])); + }; + } + + var warning$1 = warning; + + var Uninitialized = -1; + var Pending = 0; + var Resolved = 1; + var Rejected = 2; + function refineResolvedLazyComponent(lazyComponent) { + return lazyComponent._status === Resolved ? lazyComponent._result : null; + } + function initializeLazyComponentType(lazyComponent) { + if (lazyComponent._status === Uninitialized) { + lazyComponent._status = Pending; + var ctor = lazyComponent._ctor; + var thenable = ctor(); + lazyComponent._result = thenable; + thenable.then( + function (moduleObject) { + if (lazyComponent._status === Pending) { + var defaultExport = moduleObject.default; + + { + if (defaultExport === undefined) { + warning$1( + false, + 'lazy: Expected the result of a dynamic import() call. ' + + 'Instead received: %s\n\nYour code should look like: \n ' + + "const MyComponent = lazy(() => import('./MyComponent'))", + moduleObject, + ); + } + } + + lazyComponent._status = Resolved; + lazyComponent._result = defaultExport; + } + }, + function (error) { + if (lazyComponent._status === Pending) { + lazyComponent._status = Rejected; + lazyComponent._result = error; + } + }, + ); + } + } + + function getWrappedName(outerType, innerType, wrapperName) { + var functionName = innerType.displayName || innerType.name || ''; + return ( + outerType.displayName || + (functionName !== '' ? wrapperName + '(' + functionName + ')' : wrapperName) + ); + } + + function getComponentName(type) { + if (type == null) { + // Host root, text node or just invalid type. + return null; + } + + { + if (typeof type.tag === 'number') { + warningWithoutStack$1( + false, + 'Received an unexpected object in getComponentName(). ' + + 'This is likely a bug in React. Please file an issue.', + ); + } + } + + if (typeof type === 'function') { + return type.displayName || type.name || null; + } + + if (typeof type === 'string') { + return type; + } + + switch (type) { + case REACT_FRAGMENT_TYPE: + return 'Fragment'; + + case REACT_PORTAL_TYPE: + return 'Portal'; + + case REACT_PROFILER_TYPE: + return 'Profiler'; + + case REACT_STRICT_MODE_TYPE: + return 'StrictMode'; + + case REACT_SUSPENSE_TYPE: + return 'Suspense'; + + case REACT_SUSPENSE_LIST_TYPE: + return 'SuspenseList'; + } + + if (typeof type === 'object') { + switch (type.$$typeof) { + case REACT_CONTEXT_TYPE: + return 'Context.Consumer'; + + case REACT_PROVIDER_TYPE: + return 'Context.Provider'; + + case REACT_FORWARD_REF_TYPE: + return getWrappedName(type, type.render, 'ForwardRef'); + + case REACT_MEMO_TYPE: + return getComponentName(type.type); + + case REACT_LAZY_TYPE: { + var thenable = type; + var resolvedThenable = refineResolvedLazyComponent(thenable); + + if (resolvedThenable) { + return getComponentName(resolvedThenable); + } + + break; + } + } + } + + return null; + } + + /** + * Forked from fbjs/warning: + * https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js + * + * Only change is we use console.warn instead of console.error, + * and do nothing when 'console' is not supported. + * This really simplifies the code. + * --- + * Similar to invariant but only logs a warning if the condition is not met. + * This can be used to log issues in development environments in critical + * paths. Removing the logging code for production environments will keep the + * same logic and follow the same code paths. + */ + var lowPriorityWarningWithoutStack = function () {}; + + { + var printWarning = function (format) { + for ( + var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; + _key < _len; + _key++ + ) { + args[_key - 1] = arguments[_key]; + } + + var argIndex = 0; + var message = + 'Warning: ' + + format.replace(/%s/g, function () { + return args[argIndex++]; + }); + + if (typeof console !== 'undefined') { + console.warn(message); + } + + try { + // --- Welcome to debugging React --- + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + throw new Error(message); + } catch (x) {} + }; + + lowPriorityWarningWithoutStack = function (condition, format) { + if (format === undefined) { + throw new Error( + '`lowPriorityWarningWithoutStack(condition, format, ...args)` requires a warning ' + + 'message argument', + ); + } + + if (!condition) { + for ( + var _len2 = arguments.length, args = new Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; + _key2 < _len2; + _key2++ + ) { + args[_key2 - 2] = arguments[_key2]; + } + + printWarning.apply(void 0, [format].concat(args)); + } + }; + } + + var lowPriorityWarningWithoutStack$1 = lowPriorityWarningWithoutStack; + + var BEFORE_SLASH_RE = /^(.*)[\\\/]/; + var describeComponentFrame = function (name, source, ownerName) { + var sourceInfo = ''; + + if (source) { + var path = source.fileName; + var fileName = path.replace(BEFORE_SLASH_RE, ''); + + { + // In DEV, include code for a common special case: + // prefer "folder/index.js" instead of just "index.js". + if (/^index\./.test(fileName)) { + var match = path.match(BEFORE_SLASH_RE); + + if (match) { + var pathBeforeSlash = match[1]; + + if (pathBeforeSlash) { + var folderName = pathBeforeSlash.replace(BEFORE_SLASH_RE, ''); + fileName = folderName + '/' + fileName; + } + } + } + } + + sourceInfo = ' (at ' + fileName + ':' + source.lineNumber + ')'; + } else if (ownerName) { + sourceInfo = ' (created by ' + ownerName + ')'; + } + + return '\n in ' + (name || 'Unknown') + sourceInfo; + }; + + // Helps identify side effects in render-phase lifecycle hooks and setState + // reducers by double invoking them in Strict Mode. + + // To preserve the "Pause on caught exceptions" behavior of the debugger, we + // replay the begin phase of a failed component inside invokeGuardedCallback. + + // Warn about deprecated, async-unsafe lifecycles; relates to RFC #6: + + var warnAboutDeprecatedLifecycles = true; // Gather advanced timing metrics for Profiler subtrees. + + // Trace which interactions trigger each commit. + + // SSR experiments + + var enableSuspenseServerRenderer = false; + // Only used in www builds. + + // Only used in www builds. + + // Disable javascript: URL strings in href for XSS protection. + + var disableJavaScriptURLs = false; // React Fire: prevent the value and checked attributes from syncing + // with their related DOM properties + + // These APIs will no longer be "unstable" in the upcoming 16.7 release, + // Control this behavior with a flag to support 16.6 minor releases in the meanwhile. + + // Experimental React Flare event system and event components support. + + var enableFlareAPI = false; // Experimental Host Component support. + + var enableFundamentalAPI = false; // Experimental Scope support. + + var enableScopeAPI = false; // New API for JSX transforms to target - https://github.com/reactjs/rfcs/pull/107 + + // We will enforce mocking scheduler with scheduler/unstable_mock at some point. (v17?) + // Till then, we warn about the missing mock, but still fallback to a legacy mode compatible version + + // For tests, we flush suspense fallbacks in an act scope; + // *except* in some of our own tests, where we test incremental loading states. + + // Add a callback property to suspense to notify which promises are currently + // in the update queue. This allows reporting and tracing of what is causing + // the user to see a loading state. + // Also allows hydration callbacks to fire when a dehydrated boundary gets + // hydrated or deleted. + + // Part of the simplification of React.createElement so we can eventually move + // from React.createElement to React.jsx + // https://github.com/reactjs/rfcs/blob/createlement-rfc/text/0000-create-element-changes.md + + var disableLegacyContext = false; + + // Flag to turn event.target and event.currentTarget in ReactNative from a reactTag to a component instance + + var ReactDebugCurrentFrame$1; + var didWarnAboutInvalidateContextType; + + { + ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame; + didWarnAboutInvalidateContextType = new Set(); + } + + var emptyObject = {}; + + { + Object.freeze(emptyObject); + } + + function maskContext(type, context) { + var contextTypes = type.contextTypes; + + if (!contextTypes) { + return emptyObject; + } + + var maskedContext = {}; + + for (var contextName in contextTypes) { + maskedContext[contextName] = context[contextName]; + } + + return maskedContext; + } + + function checkContextTypes(typeSpecs, values, location) { + { + checkPropTypes( + typeSpecs, + values, + location, + 'Component', + ReactDebugCurrentFrame$1.getCurrentStack, + ); + } + } + + function validateContextBounds(context, threadID) { + // If we don't have enough slots in this context to store this threadID, + // fill it in without leaving any holes to ensure that the VM optimizes + // this as non-holey index properties. + // (Note: If `react` package is < 16.6, _threadCount is undefined.) + for (var i = context._threadCount | 0; i <= threadID; i++) { + // We assume that this is the same as the defaultValue which might not be + // true if we're rendering inside a secondary renderer but they are + // secondary because these use cases are very rare. + context[i] = context._currentValue2; + context._threadCount = i + 1; + } + } + function processContext(type, context, threadID, isClass) { + if (isClass) { + var contextType = type.contextType; + + { + if ('contextType' in type) { + var isValid = // Allow null for conditional declaration + contextType === null || + (contextType !== undefined && + contextType.$$typeof === REACT_CONTEXT_TYPE && + contextType._context === undefined); // Not a <Context.Consumer> + + if (!isValid && !didWarnAboutInvalidateContextType.has(type)) { + didWarnAboutInvalidateContextType.add(type); + var addendum = ''; + + if (contextType === undefined) { + addendum = + ' However, it is set to undefined. ' + + 'This can be caused by a typo or by mixing up named and default imports. ' + + 'This can also happen due to a circular dependency, so ' + + 'try moving the createContext() call to a separate file.'; + } else if (typeof contextType !== 'object') { + addendum = ' However, it is set to a ' + typeof contextType + '.'; + } else if (contextType.$$typeof === REACT_PROVIDER_TYPE) { + addendum = ' Did you accidentally pass the Context.Provider instead?'; + } else if (contextType._context !== undefined) { + // <Context.Consumer> + addendum = ' Did you accidentally pass the Context.Consumer instead?'; + } else { + addendum = + ' However, it is set to an object with keys {' + + Object.keys(contextType).join(', ') + + '}.'; + } + + warningWithoutStack$1( + false, + '%s defines an invalid contextType. ' + + 'contextType should point to the Context object returned by React.createContext().%s', + getComponentName(type) || 'Component', + addendum, + ); + } + } + } + + if (typeof contextType === 'object' && contextType !== null) { + validateContextBounds(contextType, threadID); + return contextType[threadID]; + } + + if (disableLegacyContext) { + { + if (type.contextTypes) { + warningWithoutStack$1( + false, + '%s uses the legacy contextTypes API which is no longer supported. ' + + 'Use React.createContext() with static contextType instead.', + getComponentName(type) || 'Unknown', + ); + } + } + + return emptyObject; + } else { + var maskedContext = maskContext(type, context); + + { + if (type.contextTypes) { + checkContextTypes(type.contextTypes, maskedContext, 'context'); + } + } + + return maskedContext; + } + } else { + if (disableLegacyContext) { + { + if (type.contextTypes) { + warningWithoutStack$1( + false, + '%s uses the legacy contextTypes API which is no longer supported. ' + + 'Use React.createContext() with React.useContext() instead.', + getComponentName(type) || 'Unknown', + ); + } + } + + return undefined; + } else { + var _maskedContext = maskContext(type, context); + + { + if (type.contextTypes) { + checkContextTypes(type.contextTypes, _maskedContext, 'context'); + } + } + + return _maskedContext; + } + } + } + + // Allocates a new index for each request. Tries to stay as compact as possible so that these + // indices can be used to reference a tightly packed array. As opposed to being used in a Map. + // The first allocated index is 1. + var nextAvailableThreadIDs = new Uint16Array(16); + + for (var i = 0; i < 15; i++) { + nextAvailableThreadIDs[i] = i + 1; + } + + nextAvailableThreadIDs[15] = 0; + + function growThreadCountAndReturnNextAvailable() { + var oldArray = nextAvailableThreadIDs; + var oldSize = oldArray.length; + var newSize = oldSize * 2; + + if (!(newSize <= 0x10000)) { + { + throw Error( + 'Maximum number of concurrent React renderers exceeded. This can happen if you are not properly destroying the Readable provided by React. Ensure that you call .destroy() on it if you no longer want to read from it, and did not read to the end. If you use .pipe() this should be automatic.', + ); + } + } + + var newArray = new Uint16Array(newSize); + newArray.set(oldArray); + nextAvailableThreadIDs = newArray; + nextAvailableThreadIDs[0] = oldSize + 1; + + for (var _i = oldSize; _i < newSize - 1; _i++) { + nextAvailableThreadIDs[_i] = _i + 1; + } + + nextAvailableThreadIDs[newSize - 1] = 0; + return oldSize; + } + + function allocThreadID() { + var nextID = nextAvailableThreadIDs[0]; + + if (nextID === 0) { + return growThreadCountAndReturnNextAvailable(); + } + + nextAvailableThreadIDs[0] = nextAvailableThreadIDs[nextID]; + return nextID; + } + function freeThreadID(id) { + nextAvailableThreadIDs[id] = nextAvailableThreadIDs[0]; + nextAvailableThreadIDs[0] = id; + } + + // A reserved attribute. + // It is handled by React separately and shouldn't be written to the DOM. + var RESERVED = 0; // A simple string attribute. + // Attributes that aren't in the whitelist are presumed to have this type. + + var STRING = 1; // A string attribute that accepts booleans in React. In HTML, these are called + // "enumerated" attributes with "true" and "false" as possible values. + // When true, it should be set to a "true" string. + // When false, it should be set to a "false" string. + + var BOOLEANISH_STRING = 2; // A real boolean attribute. + // When true, it should be present (set either to an empty string or its name). + // When false, it should be omitted. + + var BOOLEAN = 3; // An attribute that can be used as a flag as well as with a value. + // When true, it should be present (set either to an empty string or its name). + // When false, it should be omitted. + // For any other value, should be present with that value. + + var OVERLOADED_BOOLEAN = 4; // An attribute that must be numeric or parse as a numeric. + // When falsy, it should be removed. + + var NUMERIC = 5; // An attribute that must be positive numeric or parse as a positive numeric. + // When falsy, it should be removed. + + var POSITIVE_NUMERIC = 6; + + /* eslint-disable max-len */ + var ATTRIBUTE_NAME_START_CHAR = + ':A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD'; + /* eslint-enable max-len */ + + var ATTRIBUTE_NAME_CHAR = + ATTRIBUTE_NAME_START_CHAR + '\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040'; + + var ROOT_ATTRIBUTE_NAME = 'data-reactroot'; + var VALID_ATTRIBUTE_NAME_REGEX = new RegExp( + '^[' + ATTRIBUTE_NAME_START_CHAR + '][' + ATTRIBUTE_NAME_CHAR + ']*$', + ); + var hasOwnProperty$1 = Object.prototype.hasOwnProperty; + var illegalAttributeNameCache = {}; + var validatedAttributeNameCache = {}; + function isAttributeNameSafe(attributeName) { + if (hasOwnProperty$1.call(validatedAttributeNameCache, attributeName)) { + return true; + } + + if (hasOwnProperty$1.call(illegalAttributeNameCache, attributeName)) { + return false; + } + + if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) { + validatedAttributeNameCache[attributeName] = true; + return true; + } + + illegalAttributeNameCache[attributeName] = true; + + { + warning$1(false, 'Invalid attribute name: `%s`', attributeName); + } + + return false; + } + function shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag) { + if (propertyInfo !== null) { + return propertyInfo.type === RESERVED; + } + + if (isCustomComponentTag) { + return false; + } + + if ( + name.length > 2 && + (name[0] === 'o' || name[0] === 'O') && + (name[1] === 'n' || name[1] === 'N') + ) { + return true; + } + + return false; + } + function shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag) { + if (propertyInfo !== null && propertyInfo.type === RESERVED) { + return false; + } + + switch (typeof value) { + case 'function': // $FlowIssue symbol is perfectly valid here + + case 'symbol': + // eslint-disable-line + return true; + + case 'boolean': { + if (isCustomComponentTag) { + return false; + } + + if (propertyInfo !== null) { + return !propertyInfo.acceptsBooleans; + } else { + var prefix = name.toLowerCase().slice(0, 5); + return prefix !== 'data-' && prefix !== 'aria-'; + } + } + + default: + return false; + } + } + function shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag) { + if (value === null || typeof value === 'undefined') { + return true; + } + + if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag)) { + return true; + } + + if (isCustomComponentTag) { + return false; + } + + if (propertyInfo !== null) { + switch (propertyInfo.type) { + case BOOLEAN: + return !value; + + case OVERLOADED_BOOLEAN: + return value === false; + + case NUMERIC: + return isNaN(value); + + case POSITIVE_NUMERIC: + return isNaN(value) || value < 1; + } + } + + return false; + } + function getPropertyInfo(name) { + return properties.hasOwnProperty(name) ? properties[name] : null; + } + + function PropertyInfoRecord( + name, + type, + mustUseProperty, + attributeName, + attributeNamespace, + sanitizeURL, + ) { + this.acceptsBooleans = + type === BOOLEANISH_STRING || type === BOOLEAN || type === OVERLOADED_BOOLEAN; + this.attributeName = attributeName; + this.attributeNamespace = attributeNamespace; + this.mustUseProperty = mustUseProperty; + this.propertyName = name; + this.type = type; + this.sanitizeURL = sanitizeURL; + } // When adding attributes to this list, be sure to also add them to + // the `possibleStandardNames` module to ensure casing and incorrect + // name warnings. + + var properties = {}; // These props are reserved by React. They shouldn't be written to the DOM. + + [ + 'children', + 'dangerouslySetInnerHTML', // TODO: This prevents the assignment of defaultValue to regular + // elements (not just inputs). Now that ReactDOMInput assigns to the + // defaultValue property -- do we need this? + 'defaultValue', + 'defaultChecked', + 'innerHTML', + 'suppressContentEditableWarning', + 'suppressHydrationWarning', + 'style', + ].forEach(function (name) { + properties[name] = new PropertyInfoRecord( + name, + RESERVED, + false, // mustUseProperty + name, // attributeName + null, // attributeNamespace + false, + ); + }); // A few React string attributes have a different name. + // This is a mapping from React prop names to the attribute names. + + [ + ['acceptCharset', 'accept-charset'], + ['className', 'class'], + ['htmlFor', 'for'], + ['httpEquiv', 'http-equiv'], + ].forEach(function (_ref) { + var name = _ref[0], + attributeName = _ref[1]; + properties[name] = new PropertyInfoRecord( + name, + STRING, + false, // mustUseProperty + attributeName, // attributeName + null, // attributeNamespace + false, + ); + }); // These are "enumerated" HTML attributes that accept "true" and "false". + // In React, we let users pass `true` and `false` even though technically + // these aren't boolean attributes (they are coerced to strings). + + ['contentEditable', 'draggable', 'spellCheck', 'value'].forEach(function (name) { + properties[name] = new PropertyInfoRecord( + name, + BOOLEANISH_STRING, + false, // mustUseProperty + name.toLowerCase(), // attributeName + null, // attributeNamespace + false, + ); + }); // These are "enumerated" SVG attributes that accept "true" and "false". + // In React, we let users pass `true` and `false` even though technically + // these aren't boolean attributes (they are coerced to strings). + // Since these are SVG attributes, their attribute names are case-sensitive. + + ['autoReverse', 'externalResourcesRequired', 'focusable', 'preserveAlpha'].forEach(function (name) { + properties[name] = new PropertyInfoRecord( + name, + BOOLEANISH_STRING, + false, // mustUseProperty + name, // attributeName + null, // attributeNamespace + false, + ); + }); // These are HTML boolean attributes. + + [ + 'allowFullScreen', + 'async', // Note: there is a special case that prevents it from being written to the DOM + // on the client side because the browsers are inconsistent. Instead we call focus(). + 'autoFocus', + 'autoPlay', + 'controls', + 'default', + 'defer', + 'disabled', + 'disablePictureInPicture', + 'formNoValidate', + 'hidden', + 'loop', + 'noModule', + 'noValidate', + 'open', + 'playsInline', + 'readOnly', + 'required', + 'reversed', + 'scoped', + 'seamless', // Microdata + 'itemScope', + ].forEach(function (name) { + properties[name] = new PropertyInfoRecord( + name, + BOOLEAN, + false, // mustUseProperty + name.toLowerCase(), // attributeName + null, // attributeNamespace + false, + ); + }); // These are the few React props that we set as DOM properties + // rather than attributes. These are all booleans. + + [ + 'checked', // Note: `option.selected` is not updated if `select.multiple` is + // disabled with `removeAttribute`. We have special logic for handling this. + 'multiple', + 'muted', + 'selected', + ].forEach(function (name) { + properties[name] = new PropertyInfoRecord( + name, + BOOLEAN, + true, // mustUseProperty + name, // attributeName + null, // attributeNamespace + false, + ); + }); // These are HTML attributes that are "overloaded booleans": they behave like + // booleans, but can also accept a string value. + + ['capture', 'download'].forEach(function (name) { + properties[name] = new PropertyInfoRecord( + name, + OVERLOADED_BOOLEAN, + false, // mustUseProperty + name, // attributeName + null, // attributeNamespace + false, + ); + }); // These are HTML attributes that must be positive numbers. + + ['cols', 'rows', 'size', 'span'].forEach(function (name) { + properties[name] = new PropertyInfoRecord( + name, + POSITIVE_NUMERIC, + false, // mustUseProperty + name, // attributeName + null, // attributeNamespace + false, + ); + }); // These are HTML attributes that must be numbers. + + ['rowSpan', 'start'].forEach(function (name) { + properties[name] = new PropertyInfoRecord( + name, + NUMERIC, + false, // mustUseProperty + name.toLowerCase(), // attributeName + null, // attributeNamespace + false, + ); + }); + var CAMELIZE = /[\-\:]([a-z])/g; + + var capitalize = function (token) { + return token[1].toUpperCase(); + }; // This is a list of all SVG attributes that need special casing, namespacing, + // or boolean value assignment. Regular attributes that just accept strings + // and have the same names are omitted, just like in the HTML whitelist. + // Some of these attributes can be hard to find. This list was created by + // scrapping the MDN documentation. + + [ + 'accent-height', + 'alignment-baseline', + 'arabic-form', + 'baseline-shift', + 'cap-height', + 'clip-path', + 'clip-rule', + 'color-interpolation', + 'color-interpolation-filters', + 'color-profile', + 'color-rendering', + 'dominant-baseline', + 'enable-background', + 'fill-opacity', + 'fill-rule', + 'flood-color', + 'flood-opacity', + 'font-family', + 'font-size', + 'font-size-adjust', + 'font-stretch', + 'font-style', + 'font-variant', + 'font-weight', + 'glyph-name', + 'glyph-orientation-horizontal', + 'glyph-orientation-vertical', + 'horiz-adv-x', + 'horiz-origin-x', + 'image-rendering', + 'letter-spacing', + 'lighting-color', + 'marker-end', + 'marker-mid', + 'marker-start', + 'overline-position', + 'overline-thickness', + 'paint-order', + 'panose-1', + 'pointer-events', + 'rendering-intent', + 'shape-rendering', + 'stop-color', + 'stop-opacity', + 'strikethrough-position', + 'strikethrough-thickness', + 'stroke-dasharray', + 'stroke-dashoffset', + 'stroke-linecap', + 'stroke-linejoin', + 'stroke-miterlimit', + 'stroke-opacity', + 'stroke-width', + 'text-anchor', + 'text-decoration', + 'text-rendering', + 'underline-position', + 'underline-thickness', + 'unicode-bidi', + 'unicode-range', + 'units-per-em', + 'v-alphabetic', + 'v-hanging', + 'v-ideographic', + 'v-mathematical', + 'vector-effect', + 'vert-adv-y', + 'vert-origin-x', + 'vert-origin-y', + 'word-spacing', + 'writing-mode', + 'xmlns:xlink', + 'x-height', + ].forEach(function (attributeName) { + var name = attributeName.replace(CAMELIZE, capitalize); + properties[name] = new PropertyInfoRecord( + name, + STRING, + false, // mustUseProperty + attributeName, + null, // attributeNamespace + false, + ); + }); // String SVG attributes with the xlink namespace. + + ['xlink:actuate', 'xlink:arcrole', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type'].forEach( + function (attributeName) { + var name = attributeName.replace(CAMELIZE, capitalize); + properties[name] = new PropertyInfoRecord( + name, + STRING, + false, // mustUseProperty + attributeName, + 'http://www.w3.org/1999/xlink', + false, + ); + }, + ); // String SVG attributes with the xml namespace. + + ['xml:base', 'xml:lang', 'xml:space'].forEach(function (attributeName) { + var name = attributeName.replace(CAMELIZE, capitalize); + properties[name] = new PropertyInfoRecord( + name, + STRING, + false, // mustUseProperty + attributeName, + 'http://www.w3.org/XML/1998/namespace', + false, + ); + }); // These attribute exists both in HTML and SVG. + // The attribute name is case-sensitive in SVG so we can't just use + // the React name like we do for attributes that exist only in HTML. + + ['tabIndex', 'crossOrigin'].forEach(function (attributeName) { + properties[attributeName] = new PropertyInfoRecord( + attributeName, + STRING, + false, // mustUseProperty + attributeName.toLowerCase(), // attributeName + null, // attributeNamespace + false, + ); + }); // These attributes accept URLs. These must not allow javascript: URLS. + // These will also need to accept Trusted Types object in the future. + + var xlinkHref = 'xlinkHref'; + properties[xlinkHref] = new PropertyInfoRecord( + 'xlinkHref', + STRING, + false, // mustUseProperty + 'xlink:href', + 'http://www.w3.org/1999/xlink', + true, + ); + ['src', 'href', 'action', 'formAction'].forEach(function (attributeName) { + properties[attributeName] = new PropertyInfoRecord( + attributeName, + STRING, + false, // mustUseProperty + attributeName.toLowerCase(), // attributeName + null, // attributeNamespace + true, + ); + }); + + var ReactDebugCurrentFrame$2 = null; + + { + ReactDebugCurrentFrame$2 = ReactSharedInternals.ReactDebugCurrentFrame; + } // A javascript: URL can contain leading C0 control or \u0020 SPACE, + // and any newline or tab are filtered out as if they're not part of the URL. + // https://url.spec.whatwg.org/#url-parsing + // Tab or newline are defined as \r\n\t: + // https://infra.spec.whatwg.org/#ascii-tab-or-newline + // A C0 control is a code point in the range \u0000 NULL to \u001F + // INFORMATION SEPARATOR ONE, inclusive: + // https://infra.spec.whatwg.org/#c0-control-or-space + + /* eslint-disable max-len */ + + var isJavaScriptProtocol = + /^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i; + var didWarn = false; + + function sanitizeURL(url) { + if (disableJavaScriptURLs) { + if (!!isJavaScriptProtocol.test(url)) { + { + throw Error( + 'React has blocked a javascript: URL as a security precaution.' + + ReactDebugCurrentFrame$2.getStackAddendum(), + ); + } + } + } else if (true && !didWarn && isJavaScriptProtocol.test(url)) { + didWarn = true; + warning$1( + false, + 'A future version of React will block javascript: URLs as a security precaution. ' + + 'Use event handlers instead if you can. If you need to generate unsafe HTML try ' + + 'using dangerouslySetInnerHTML instead. React was passed %s.', + JSON.stringify(url), + ); + } + } + + // code copied and modified from escape-html + + /** + * Module variables. + * @private + */ + var matchHtmlRegExp = /["'&<>]/; + /** + * Escapes special characters and HTML entities in a given html string. + * + * @param {string} string HTML string to escape for later insertion + * @return {string} + * @public + */ + + function escapeHtml(string) { + var str = '' + string; + var match = matchHtmlRegExp.exec(str); + + if (!match) { + return str; + } + + var escape; + var html = ''; + var index; + var lastIndex = 0; + + for (index = match.index; index < str.length; index++) { + switch (str.charCodeAt(index)) { + case 34: + // " + escape = '"'; + break; + + case 38: + // & + escape = '&'; + break; + + case 39: + // ' + escape = '''; // modified from escape-html; used to be ''' + + break; + + case 60: + // < + escape = '<'; + break; + + case 62: + // > + escape = '>'; + break; + + default: + continue; + } + + if (lastIndex !== index) { + html += str.substring(lastIndex, index); + } + + lastIndex = index + 1; + html += escape; + } + + return lastIndex !== index ? html + str.substring(lastIndex, index) : html; + } // end code copied and modified from escape-html + + /** + * Escapes text to prevent scripting attacks. + * + * @param {*} text Text value to escape. + * @return {string} An escaped string. + */ + + function escapeTextForBrowser(text) { + if (typeof text === 'boolean' || typeof text === 'number') { + // this shortcircuit helps perf for types that we know will never have + // special characters, especially given that this function is used often + // for numeric dom ids. + return '' + text; + } + + return escapeHtml(text); + } + + /** + * Escapes attribute value to prevent scripting attacks. + * + * @param {*} value Value to escape. + * @return {string} An escaped string. + */ + + function quoteAttributeValueForBrowser(value) { + return '"' + escapeTextForBrowser(value) + '"'; + } + + /** + * Operations for dealing with DOM properties. + */ + + /** + * Creates markup for the ID property. + * + * @param {string} id Unescaped ID. + * @return {string} Markup string. + */ + + function createMarkupForRoot() { + return ROOT_ATTRIBUTE_NAME + '=""'; + } + /** + * Creates markup for a property. + * + * @param {string} name + * @param {*} value + * @return {?string} Markup string, or null if the property was invalid. + */ + + function createMarkupForProperty(name, value) { + var propertyInfo = getPropertyInfo(name); + + if (name !== 'style' && shouldIgnoreAttribute(name, propertyInfo, false)) { + return ''; + } + + if (shouldRemoveAttribute(name, value, propertyInfo, false)) { + return ''; + } + + if (propertyInfo !== null) { + var attributeName = propertyInfo.attributeName; + var type = propertyInfo.type; + + if (type === BOOLEAN || (type === OVERLOADED_BOOLEAN && value === true)) { + return attributeName + '=""'; + } else { + if (propertyInfo.sanitizeURL) { + value = '' + value; + sanitizeURL(value); + } + + return attributeName + '=' + quoteAttributeValueForBrowser(value); + } + } else if (isAttributeNameSafe(name)) { + return name + '=' + quoteAttributeValueForBrowser(value); + } + + return ''; + } + /** + * Creates markup for a custom property. + * + * @param {string} name + * @param {*} value + * @return {string} Markup string, or empty string if the property was invalid. + */ + + function createMarkupForCustomAttribute(name, value) { + if (!isAttributeNameSafe(name) || value == null) { + return ''; + } + + return name + '=' + quoteAttributeValueForBrowser(value); + } + + /** + * inlined Object.is polyfill to avoid requiring consumers ship their own + * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is + */ + function is(x, y) { + return ( + (x === y && (x !== 0 || 1 / x === 1 / y)) || (x !== x && y !== y) // eslint-disable-line no-self-compare + ); + } + + var is$1 = typeof Object.is === 'function' ? Object.is : is; + + var currentlyRenderingComponent = null; + var firstWorkInProgressHook = null; + var workInProgressHook = null; // Whether the work-in-progress hook is a re-rendered hook + + var isReRender = false; // Whether an update was scheduled during the currently executing render pass. + + var didScheduleRenderPhaseUpdate = false; // Lazily created map of render-phase updates + + var renderPhaseUpdates = null; // Counter to prevent infinite loops. + + var numberOfReRenders = 0; + var RE_RENDER_LIMIT = 25; + var isInHookUserCodeInDev = false; // In DEV, this is the name of the currently executing primitive hook + + var currentHookNameInDev; + + function resolveCurrentlyRenderingComponent() { + if (!(currentlyRenderingComponent !== null)) { + { + throw Error( + 'Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.', + ); + } + } + + { + !!isInHookUserCodeInDev + ? warning$1( + false, + 'Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. ' + + 'You can only call Hooks at the top level of your React function. ' + + 'For more information, see ' + + 'https://fb.me/rules-of-hooks', + ) + : void 0; + } + + return currentlyRenderingComponent; + } + + function areHookInputsEqual(nextDeps, prevDeps) { + if (prevDeps === null) { + { + warning$1( + false, + '%s received a final argument during this render, but not during ' + + 'the previous render. Even though the final argument is optional, ' + + 'its type cannot change between renders.', + currentHookNameInDev, + ); + } + + return false; + } + + { + // Don't bother comparing lengths in prod because these arrays should be + // passed inline. + if (nextDeps.length !== prevDeps.length) { + warning$1( + false, + 'The final argument passed to %s changed size between renders. The ' + + 'order and size of this array must remain constant.\n\n' + + 'Previous: %s\n' + + 'Incoming: %s', + currentHookNameInDev, + '[' + nextDeps.join(', ') + ']', + '[' + prevDeps.join(', ') + ']', + ); + } + } + + for (var i = 0; i < prevDeps.length && i < nextDeps.length; i++) { + if (is$1(nextDeps[i], prevDeps[i])) { + continue; + } + + return false; + } + + return true; + } + + function createHook() { + if (numberOfReRenders > 0) { + { + { + throw Error('Rendered more hooks than during the previous render'); + } + } + } + + return { + memoizedState: null, + queue: null, + next: null, + }; + } + + function createWorkInProgressHook() { + if (workInProgressHook === null) { + // This is the first hook in the list + if (firstWorkInProgressHook === null) { + isReRender = false; + firstWorkInProgressHook = workInProgressHook = createHook(); + } else { + // There's already a work-in-progress. Reuse it. + isReRender = true; + workInProgressHook = firstWorkInProgressHook; + } + } else { + if (workInProgressHook.next === null) { + isReRender = false; // Append to the end of the list + + workInProgressHook = workInProgressHook.next = createHook(); + } else { + // There's already a work-in-progress. Reuse it. + isReRender = true; + workInProgressHook = workInProgressHook.next; + } + } + + return workInProgressHook; + } + + function prepareToUseHooks(componentIdentity) { + currentlyRenderingComponent = componentIdentity; + + { + isInHookUserCodeInDev = false; + } // The following should have already been reset + // didScheduleRenderPhaseUpdate = false; + // firstWorkInProgressHook = null; + // numberOfReRenders = 0; + // renderPhaseUpdates = null; + // workInProgressHook = null; + } + function finishHooks(Component, props, children, refOrContext) { + // This must be called after every function component to prevent hooks from + // being used in classes. + while (didScheduleRenderPhaseUpdate) { + // Updates were scheduled during the render phase. They are stored in + // the `renderPhaseUpdates` map. Call the component again, reusing the + // work-in-progress hooks and applying the additional updates on top. Keep + // restarting until no more updates are scheduled. + didScheduleRenderPhaseUpdate = false; + numberOfReRenders += 1; // Start over from the beginning of the list + + workInProgressHook = null; + children = Component(props, refOrContext); + } + + currentlyRenderingComponent = null; + firstWorkInProgressHook = null; + numberOfReRenders = 0; + renderPhaseUpdates = null; + workInProgressHook = null; + + { + isInHookUserCodeInDev = false; + } // These were reset above + // currentlyRenderingComponent = null; + // didScheduleRenderPhaseUpdate = false; + // firstWorkInProgressHook = null; + // numberOfReRenders = 0; + // renderPhaseUpdates = null; + // workInProgressHook = null; + + return children; + } + + function readContext(context, observedBits) { + var threadID = currentThreadID; + validateContextBounds(context, threadID); + + { + !!isInHookUserCodeInDev + ? warning$1( + false, + 'Context can only be read while React is rendering. ' + + 'In classes, you can read it in the render method or getDerivedStateFromProps. ' + + 'In function components, you can read it directly in the function body, but not ' + + 'inside Hooks like useReducer() or useMemo().', + ) + : void 0; + } + + return context[threadID]; + } + + function useContext(context, observedBits) { + { + currentHookNameInDev = 'useContext'; + } + + resolveCurrentlyRenderingComponent(); + var threadID = currentThreadID; + validateContextBounds(context, threadID); + return context[threadID]; + } + + function basicStateReducer(state, action) { + return typeof action === 'function' ? action(state) : action; + } + + function useState(initialState) { + { + currentHookNameInDev = 'useState'; + } + + return useReducer( + basicStateReducer, // useReducer has a special case to support lazy useState initializers + initialState, + ); + } + function useReducer(reducer, initialArg, init) { + { + if (reducer !== basicStateReducer) { + currentHookNameInDev = 'useReducer'; + } + } + + currentlyRenderingComponent = resolveCurrentlyRenderingComponent(); + workInProgressHook = createWorkInProgressHook(); + + if (isReRender) { + // This is a re-render. Apply the new render phase updates to the previous + // current hook. + var queue = workInProgressHook.queue; + var dispatch = queue.dispatch; + + if (renderPhaseUpdates !== null) { + // Render phase updates are stored in a map of queue -> linked list + var firstRenderPhaseUpdate = renderPhaseUpdates.get(queue); + + if (firstRenderPhaseUpdate !== undefined) { + renderPhaseUpdates.delete(queue); + var newState = workInProgressHook.memoizedState; + var update = firstRenderPhaseUpdate; + + do { + // Process this render phase update. We don't have to check the + // priority because it will always be the same as the current + // render's. + var action = update.action; + + { + isInHookUserCodeInDev = true; + } + + newState = reducer(newState, action); + + { + isInHookUserCodeInDev = false; + } + + update = update.next; + } while (update !== null); + + workInProgressHook.memoizedState = newState; + return [newState, dispatch]; + } + } + + return [workInProgressHook.memoizedState, dispatch]; + } else { + { + isInHookUserCodeInDev = true; + } + + var initialState; + + if (reducer === basicStateReducer) { + // Special case for `useState`. + initialState = typeof initialArg === 'function' ? initialArg() : initialArg; + } else { + initialState = init !== undefined ? init(initialArg) : initialArg; + } + + { + isInHookUserCodeInDev = false; + } + + workInProgressHook.memoizedState = initialState; + + var _queue = (workInProgressHook.queue = { + last: null, + dispatch: null, + }); + + var _dispatch = (_queue.dispatch = dispatchAction.bind( + null, + currentlyRenderingComponent, + _queue, + )); + + return [workInProgressHook.memoizedState, _dispatch]; + } + } + + function useMemo(nextCreate, deps) { + currentlyRenderingComponent = resolveCurrentlyRenderingComponent(); + workInProgressHook = createWorkInProgressHook(); + var nextDeps = deps === undefined ? null : deps; + + if (workInProgressHook !== null) { + var prevState = workInProgressHook.memoizedState; + + if (prevState !== null) { + if (nextDeps !== null) { + var prevDeps = prevState[1]; + + if (areHookInputsEqual(nextDeps, prevDeps)) { + return prevState[0]; + } + } + } + } + + { + isInHookUserCodeInDev = true; + } + + var nextValue = nextCreate(); + + { + isInHookUserCodeInDev = false; + } + + workInProgressHook.memoizedState = [nextValue, nextDeps]; + return nextValue; + } + + function useRef(initialValue) { + currentlyRenderingComponent = resolveCurrentlyRenderingComponent(); + workInProgressHook = createWorkInProgressHook(); + var previousRef = workInProgressHook.memoizedState; + + if (previousRef === null) { + var ref = { + current: initialValue, + }; + + { + Object.seal(ref); + } + + workInProgressHook.memoizedState = ref; + return ref; + } else { + return previousRef; + } + } + + function useLayoutEffect(create, inputs) { + { + currentHookNameInDev = 'useLayoutEffect'; + } + + warning$1( + false, + 'useLayoutEffect does nothing on the server, because its effect cannot ' + + "be encoded into the server renderer's output format. This will lead " + + 'to a mismatch between the initial, non-hydrated UI and the intended ' + + 'UI. To avoid this, useLayoutEffect should only be used in ' + + 'components that render exclusively on the client. ' + + 'See https://fb.me/react-uselayouteffect-ssr for common fixes.', + ); + } + + function dispatchAction(componentIdentity, queue, action) { + if (!(numberOfReRenders < RE_RENDER_LIMIT)) { + { + throw Error( + 'Too many re-renders. React limits the number of renders to prevent an infinite loop.', + ); + } + } + + if (componentIdentity === currentlyRenderingComponent) { + // This is a render phase update. Stash it in a lazily-created map of + // queue -> linked list of updates. After this render pass, we'll restart + // and apply the stashed updates on top of the work-in-progress hook. + didScheduleRenderPhaseUpdate = true; + var update = { + action: action, + next: null, + }; + + if (renderPhaseUpdates === null) { + renderPhaseUpdates = new Map(); + } + + var firstRenderPhaseUpdate = renderPhaseUpdates.get(queue); + + if (firstRenderPhaseUpdate === undefined) { + renderPhaseUpdates.set(queue, update); + } else { + // Append the update to the end of the list. + var lastRenderPhaseUpdate = firstRenderPhaseUpdate; + + while (lastRenderPhaseUpdate.next !== null) { + lastRenderPhaseUpdate = lastRenderPhaseUpdate.next; + } + + lastRenderPhaseUpdate.next = update; + } + } else { + // This means an update has happened after the function component has + // returned. On the server this is a no-op. In React Fiber, the update + // would be scheduled for a future render. + } + } + + function useCallback(callback, deps) { + // Callbacks are passed as they are in the server environment. + return callback; + } + + function useResponder(responder, props) { + return { + props: props, + responder: responder, + }; + } + + function useDeferredValue(value, config) { + resolveCurrentlyRenderingComponent(); + return value; + } + + function useTransition(config) { + resolveCurrentlyRenderingComponent(); + + var startTransition = function (callback) { + callback(); + }; + + return [startTransition, false]; + } + + function noop() {} + + var currentThreadID = 0; + function setCurrentThreadID(threadID) { + currentThreadID = threadID; + } + var Dispatcher = { + readContext: readContext, + useContext: useContext, + useMemo: useMemo, + useReducer: useReducer, + useRef: useRef, + useState: useState, + useLayoutEffect: useLayoutEffect, + useCallback: useCallback, + // useImperativeHandle is not run in the server environment + useImperativeHandle: noop, + // Effects are not run in the server environment. + useEffect: noop, + // Debugging effect + useDebugValue: noop, + useResponder: useResponder, + useDeferredValue: useDeferredValue, + useTransition: useTransition, + }; + + var HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml'; + var MATH_NAMESPACE = 'http://www.w3.org/1998/Math/MathML'; + var SVG_NAMESPACE = 'http://www.w3.org/2000/svg'; + var Namespaces = { + html: HTML_NAMESPACE, + mathml: MATH_NAMESPACE, + svg: SVG_NAMESPACE, + }; // Assumes there is no parent namespace. + + function getIntrinsicNamespace(type) { + switch (type) { + case 'svg': + return SVG_NAMESPACE; + + case 'math': + return MATH_NAMESPACE; + + default: + return HTML_NAMESPACE; + } + } + function getChildNamespace(parentNamespace, type) { + if (parentNamespace == null || parentNamespace === HTML_NAMESPACE) { + // No (or default) parent namespace: potential entry point. + return getIntrinsicNamespace(type); + } + + if (parentNamespace === SVG_NAMESPACE && type === 'foreignObject') { + // We're leaving SVG. + return HTML_NAMESPACE; + } // By default, pass namespace below. + + return parentNamespace; + } + + var ReactDebugCurrentFrame$3 = null; + var ReactControlledValuePropTypes = { + checkPropTypes: null, + }; + + { + ReactDebugCurrentFrame$3 = ReactSharedInternals.ReactDebugCurrentFrame; + var hasReadOnlyValue = { + button: true, + checkbox: true, + image: true, + hidden: true, + radio: true, + reset: true, + submit: true, + }; + var propTypes = { + value: function (props, propName, componentName) { + if ( + hasReadOnlyValue[props.type] || + props.onChange || + props.readOnly || + props.disabled || + props[propName] == null || + (enableFlareAPI && props.listeners) + ) { + return null; + } + + return new Error( + 'You provided a `value` prop to a form field without an ' + + '`onChange` handler. This will render a read-only field. If ' + + 'the field should be mutable use `defaultValue`. Otherwise, ' + + 'set either `onChange` or `readOnly`.', + ); + }, + checked: function (props, propName, componentName) { + if ( + props.onChange || + props.readOnly || + props.disabled || + props[propName] == null || + (enableFlareAPI && props.listeners) + ) { + return null; + } + + return new Error( + 'You provided a `checked` prop to a form field without an ' + + '`onChange` handler. This will render a read-only field. If ' + + 'the field should be mutable use `defaultChecked`. Otherwise, ' + + 'set either `onChange` or `readOnly`.', + ); + }, + }; + /** + * Provide a linked `value` attribute for controlled forms. You should not use + * this outside of the ReactDOM controlled form components. + */ + + ReactControlledValuePropTypes.checkPropTypes = function (tagName, props) { + checkPropTypes(propTypes, props, 'prop', tagName, ReactDebugCurrentFrame$3.getStackAddendum); + }; + } + + // For HTML, certain tags should omit their close tag. We keep a whitelist for + // those special-case tags. + var omittedCloseTags = { + area: true, + base: true, + br: true, + col: true, + embed: true, + hr: true, + img: true, + input: true, + keygen: true, + link: true, + meta: true, + param: true, + source: true, + track: true, + wbr: true, // NOTE: menuitem's close tag should be omitted, but that causes problems. + }; + + // `omittedCloseTags` except that `menuitem` should still have its closing tag. + + var voidElementTags = _assign( + { + menuitem: true, + }, + omittedCloseTags, + ); + + // or add stack by default to invariants where possible. + + var HTML = '__html'; + var ReactDebugCurrentFrame$4 = null; + + { + ReactDebugCurrentFrame$4 = ReactSharedInternals.ReactDebugCurrentFrame; + } + + function assertValidProps(tag, props) { + if (!props) { + return; + } // Note the use of `==` which checks for null or undefined. + + if (voidElementTags[tag]) { + if (!(props.children == null && props.dangerouslySetInnerHTML == null)) { + { + throw Error( + tag + + ' is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.' + + ReactDebugCurrentFrame$4.getStackAddendum(), + ); + } + } + } + + if (props.dangerouslySetInnerHTML != null) { + if (!(props.children == null)) { + { + throw Error('Can only set one of `children` or `props.dangerouslySetInnerHTML`.'); + } + } + + if ( + !(typeof props.dangerouslySetInnerHTML === 'object' && HTML in props.dangerouslySetInnerHTML) + ) { + { + throw Error( + '`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://fb.me/react-invariant-dangerously-set-inner-html for more information.', + ); + } + } + } + + { + !(props.suppressContentEditableWarning || !props.contentEditable || props.children == null) + ? warning$1( + false, + 'A component is `contentEditable` and contains `children` managed by ' + + 'React. It is now your responsibility to guarantee that none of ' + + 'those nodes are unexpectedly modified or duplicated. This is ' + + 'probably not intentional.', + ) + : void 0; + } + + if (!(props.style == null || typeof props.style === 'object')) { + { + throw Error( + "The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX." + + ReactDebugCurrentFrame$4.getStackAddendum(), + ); + } + } + } + + /** + * CSS properties which accept numbers but are not in units of "px". + */ + var isUnitlessNumber = { + animationIterationCount: true, + borderImageOutset: true, + borderImageSlice: true, + borderImageWidth: true, + boxFlex: true, + boxFlexGroup: true, + boxOrdinalGroup: true, + columnCount: true, + columns: true, + flex: true, + flexGrow: true, + flexPositive: true, + flexShrink: true, + flexNegative: true, + flexOrder: true, + gridArea: true, + gridRow: true, + gridRowEnd: true, + gridRowSpan: true, + gridRowStart: true, + gridColumn: true, + gridColumnEnd: true, + gridColumnSpan: true, + gridColumnStart: true, + fontWeight: true, + lineClamp: true, + lineHeight: true, + opacity: true, + order: true, + orphans: true, + tabSize: true, + widows: true, + zIndex: true, + zoom: true, + // SVG-related properties + fillOpacity: true, + floodOpacity: true, + stopOpacity: true, + strokeDasharray: true, + strokeDashoffset: true, + strokeMiterlimit: true, + strokeOpacity: true, + strokeWidth: true, + }; + /** + * @param {string} prefix vendor-specific prefix, eg: Webkit + * @param {string} key style name, eg: transitionDuration + * @return {string} style name prefixed with `prefix`, properly camelCased, eg: + * WebkitTransitionDuration + */ + + function prefixKey(prefix, key) { + return prefix + key.charAt(0).toUpperCase() + key.substring(1); + } + /** + * Support style names that may come passed in prefixed by adding permutations + * of vendor prefixes. + */ + + var prefixes = ['Webkit', 'ms', 'Moz', 'O']; // Using Object.keys here, or else the vanilla for-in loop makes IE8 go into an + // infinite loop, because it iterates over the newly added props too. + + Object.keys(isUnitlessNumber).forEach(function (prop) { + prefixes.forEach(function (prefix) { + isUnitlessNumber[prefixKey(prefix, prop)] = isUnitlessNumber[prop]; + }); + }); + + /** + * Convert a value into the proper css writable value. The style name `name` + * should be logical (no hyphens), as specified + * in `CSSProperty.isUnitlessNumber`. + * + * @param {string} name CSS property name such as `topMargin`. + * @param {*} value CSS property value such as `10px`. + * @return {string} Normalized style value with dimensions applied. + */ + + function dangerousStyleValue(name, value, isCustomProperty) { + // Note that we've removed escapeTextForBrowser() calls here since the + // whole string will be escaped when the attribute is injected into + // the markup. If you provide unsafe user data here they can inject + // arbitrary CSS which may be problematic (I couldn't repro this): + // https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet + // http://www.thespanner.co.uk/2007/11/26/ultimate-xss-css-injection/ + // This is not an XSS hole but instead a potential CSS injection issue + // which has lead to a greater discussion about how we're going to + // trust URLs moving forward. See #2115901 + var isEmpty = value == null || typeof value === 'boolean' || value === ''; + + if (isEmpty) { + return ''; + } + + if ( + !isCustomProperty && + typeof value === 'number' && + value !== 0 && + !(isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name]) + ) { + return value + 'px'; // Presumes implicit 'px' suffix for unitless numbers + } + + return ('' + value).trim(); + } + + var uppercasePattern = /([A-Z])/g; + var msPattern = /^ms-/; + /** + * Hyphenates a camelcased CSS property name, for example: + * + * > hyphenateStyleName('backgroundColor') + * < "background-color" + * > hyphenateStyleName('MozTransition') + * < "-moz-transition" + * > hyphenateStyleName('msTransition') + * < "-ms-transition" + * + * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix + * is converted to `-ms-`. + */ + + function hyphenateStyleName(name) { + return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-'); + } + + function isCustomComponent(tagName, props) { + if (tagName.indexOf('-') === -1) { + return typeof props.is === 'string'; + } + + switch (tagName) { + // These are reserved SVG and MathML elements. + // We don't mind this whitelist too much because we expect it to never grow. + // The alternative is to track the namespace in a few places which is convoluted. + // https://w3c.github.io/webcomponents/spec/custom/#custom-elements-core-concepts + case 'annotation-xml': + case 'color-profile': + case 'font-face': + case 'font-face-src': + case 'font-face-uri': + case 'font-face-format': + case 'font-face-name': + case 'missing-glyph': + return false; + + default: + return true; + } + } + + var warnValidStyle = function () {}; + + { + // 'msTransform' is correct, but the other prefixes should be capitalized + var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/; + var msPattern$1 = /^-ms-/; + var hyphenPattern = /-(.)/g; // style values shouldn't contain a semicolon + + var badStyleValueWithSemicolonPattern = /;\s*$/; + var warnedStyleNames = {}; + var warnedStyleValues = {}; + var warnedForNaNValue = false; + var warnedForInfinityValue = false; + + var camelize = function (string) { + return string.replace(hyphenPattern, function (_, character) { + return character.toUpperCase(); + }); + }; + + var warnHyphenatedStyleName = function (name) { + if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) { + return; + } + + warnedStyleNames[name] = true; + warning$1( + false, + 'Unsupported style property %s. Did you mean %s?', + name, // As Andi Smith suggests + // (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix + // is converted to lowercase `ms`. + camelize(name.replace(msPattern$1, 'ms-')), + ); + }; + + var warnBadVendoredStyleName = function (name) { + if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) { + return; + } + + warnedStyleNames[name] = true; + warning$1( + false, + 'Unsupported vendor-prefixed style property %s. Did you mean %s?', + name, + name.charAt(0).toUpperCase() + name.slice(1), + ); + }; + + var warnStyleValueWithSemicolon = function (name, value) { + if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) { + return; + } + + warnedStyleValues[value] = true; + warning$1( + false, + "Style property values shouldn't contain a semicolon. " + 'Try "%s: %s" instead.', + name, + value.replace(badStyleValueWithSemicolonPattern, ''), + ); + }; + + var warnStyleValueIsNaN = function (name, value) { + if (warnedForNaNValue) { + return; + } + + warnedForNaNValue = true; + warning$1(false, '`NaN` is an invalid value for the `%s` css style property.', name); + }; + + var warnStyleValueIsInfinity = function (name, value) { + if (warnedForInfinityValue) { + return; + } + + warnedForInfinityValue = true; + warning$1(false, '`Infinity` is an invalid value for the `%s` css style property.', name); + }; + + warnValidStyle = function (name, value) { + if (name.indexOf('-') > -1) { + warnHyphenatedStyleName(name); + } else if (badVendoredStyleNamePattern.test(name)) { + warnBadVendoredStyleName(name); + } else if (badStyleValueWithSemicolonPattern.test(value)) { + warnStyleValueWithSemicolon(name, value); + } + + if (typeof value === 'number') { + if (isNaN(value)) { + warnStyleValueIsNaN(name, value); + } else if (!isFinite(value)) { + warnStyleValueIsInfinity(name, value); + } + } + }; + } + + var warnValidStyle$1 = warnValidStyle; + + var ariaProperties = { + 'aria-current': 0, + // state + 'aria-details': 0, + 'aria-disabled': 0, + // state + 'aria-hidden': 0, + // state + 'aria-invalid': 0, + // state + 'aria-keyshortcuts': 0, + 'aria-label': 0, + 'aria-roledescription': 0, + // Widget Attributes + 'aria-autocomplete': 0, + 'aria-checked': 0, + 'aria-expanded': 0, + 'aria-haspopup': 0, + 'aria-level': 0, + 'aria-modal': 0, + 'aria-multiline': 0, + 'aria-multiselectable': 0, + 'aria-orientation': 0, + 'aria-placeholder': 0, + 'aria-pressed': 0, + 'aria-readonly': 0, + 'aria-required': 0, + 'aria-selected': 0, + 'aria-sort': 0, + 'aria-valuemax': 0, + 'aria-valuemin': 0, + 'aria-valuenow': 0, + 'aria-valuetext': 0, + // Live Region Attributes + 'aria-atomic': 0, + 'aria-busy': 0, + 'aria-live': 0, + 'aria-relevant': 0, + // Drag-and-Drop Attributes + 'aria-dropeffect': 0, + 'aria-grabbed': 0, + // Relationship Attributes + 'aria-activedescendant': 0, + 'aria-colcount': 0, + 'aria-colindex': 0, + 'aria-colspan': 0, + 'aria-controls': 0, + 'aria-describedby': 0, + 'aria-errormessage': 0, + 'aria-flowto': 0, + 'aria-labelledby': 0, + 'aria-owns': 0, + 'aria-posinset': 0, + 'aria-rowcount': 0, + 'aria-rowindex': 0, + 'aria-rowspan': 0, + 'aria-setsize': 0, + }; + + var warnedProperties = {}; + var rARIA = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$'); + var rARIACamel = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$'); + var hasOwnProperty$2 = Object.prototype.hasOwnProperty; + + function validateProperty(tagName, name) { + if (hasOwnProperty$2.call(warnedProperties, name) && warnedProperties[name]) { + return true; + } + + if (rARIACamel.test(name)) { + var ariaName = 'aria-' + name.slice(4).toLowerCase(); + var correctName = ariaProperties.hasOwnProperty(ariaName) ? ariaName : null; // If this is an aria-* attribute, but is not listed in the known DOM + // DOM properties, then it is an invalid aria-* attribute. + + if (correctName == null) { + warning$1( + false, + 'Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.', + name, + ); + warnedProperties[name] = true; + return true; + } // aria-* attributes should be lowercase; suggest the lowercase version. + + if (name !== correctName) { + warning$1(false, 'Invalid ARIA attribute `%s`. Did you mean `%s`?', name, correctName); + warnedProperties[name] = true; + return true; + } + } + + if (rARIA.test(name)) { + var lowerCasedName = name.toLowerCase(); + var standardName = ariaProperties.hasOwnProperty(lowerCasedName) ? lowerCasedName : null; // If this is an aria-* attribute, but is not listed in the known DOM + // DOM properties, then it is an invalid aria-* attribute. + + if (standardName == null) { + warnedProperties[name] = true; + return false; + } // aria-* attributes should be lowercase; suggest the lowercase version. + + if (name !== standardName) { + warning$1(false, 'Unknown ARIA attribute `%s`. Did you mean `%s`?', name, standardName); + warnedProperties[name] = true; + return true; + } + } + + return true; + } + + function warnInvalidARIAProps(type, props) { + var invalidProps = []; + + for (var key in props) { + var isValid = validateProperty(type, key); + + if (!isValid) { + invalidProps.push(key); + } + } + + var unknownPropString = invalidProps + .map(function (prop) { + return '`' + prop + '`'; + }) + .join(', '); + + if (invalidProps.length === 1) { + warning$1( + false, + 'Invalid aria prop %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop', + unknownPropString, + type, + ); + } else if (invalidProps.length > 1) { + warning$1( + false, + 'Invalid aria props %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop', + unknownPropString, + type, + ); + } + } + + function validateProperties(type, props) { + if (isCustomComponent(type, props)) { + return; + } + + warnInvalidARIAProps(type, props); + } + + var didWarnValueNull = false; + function validateProperties$1(type, props) { + if (type !== 'input' && type !== 'textarea' && type !== 'select') { + return; + } + + if (props != null && props.value === null && !didWarnValueNull) { + didWarnValueNull = true; + + if (type === 'select' && props.multiple) { + warning$1( + false, + '`value` prop on `%s` should not be null. ' + + 'Consider using an empty array when `multiple` is set to `true` ' + + 'to clear the component or `undefined` for uncontrolled components.', + type, + ); + } else { + warning$1( + false, + '`value` prop on `%s` should not be null. ' + + 'Consider using an empty string to clear the component or `undefined` ' + + 'for uncontrolled components.', + type, + ); + } + } + } + + /** + * Registers plugins so that they can extract and dispatch events. + * + * @see {EventPluginHub} + */ + + /** + * Ordered list of injected plugins. + */ + + /** + * Mapping from event name to dispatch config + */ + + /** + * Mapping from registration name to plugin module + */ + + var registrationNameModules = {}; + /** + * Mapping from registration name to event name + */ + + /** + * Mapping from lowercase registration names to the properly cased version, + * used to warn in the case of missing event handlers. Available + * only in true. + * @type {Object} + */ + + var possibleRegistrationNames = {}; // Trust the developer to only use possibleRegistrationNames in true + + /** + * Injects an ordering of plugins (by plugin name). This allows the ordering + * to be decoupled from injection of the actual plugins so that ordering is + * always deterministic regardless of packaging, on-the-fly injection, etc. + * + * @param {array} InjectedEventPluginOrder + * @internal + * @see {EventPluginHub.injection.injectEventPluginOrder} + */ + + /** + * Injects plugins to be used by `EventPluginHub`. The plugin names must be + * in the ordering injected by `injectEventPluginOrder`. + * + * Plugins can be injected as part of page initialization or on-the-fly. + * + * @param {object} injectedNamesToPlugins Map from names to plugin modules. + * @internal + * @see {EventPluginHub.injection.injectEventPluginsByName} + */ + + // When adding attributes to the HTML or SVG whitelist, be sure to + // also add them to this module to ensure casing and incorrect name + // warnings. + var possibleStandardNames = { + // HTML + accept: 'accept', + acceptcharset: 'acceptCharset', + 'accept-charset': 'acceptCharset', + accesskey: 'accessKey', + action: 'action', + allowfullscreen: 'allowFullScreen', + alt: 'alt', + as: 'as', + async: 'async', + autocapitalize: 'autoCapitalize', + autocomplete: 'autoComplete', + autocorrect: 'autoCorrect', + autofocus: 'autoFocus', + autoplay: 'autoPlay', + autosave: 'autoSave', + capture: 'capture', + cellpadding: 'cellPadding', + cellspacing: 'cellSpacing', + challenge: 'challenge', + charset: 'charSet', + checked: 'checked', + children: 'children', + cite: 'cite', + class: 'className', + classid: 'classID', + classname: 'className', + cols: 'cols', + colspan: 'colSpan', + content: 'content', + contenteditable: 'contentEditable', + contextmenu: 'contextMenu', + controls: 'controls', + controlslist: 'controlsList', + coords: 'coords', + crossorigin: 'crossOrigin', + dangerouslysetinnerhtml: 'dangerouslySetInnerHTML', + data: 'data', + datetime: 'dateTime', + default: 'default', + defaultchecked: 'defaultChecked', + defaultvalue: 'defaultValue', + defer: 'defer', + dir: 'dir', + disabled: 'disabled', + disablepictureinpicture: 'disablePictureInPicture', + download: 'download', + draggable: 'draggable', + enctype: 'encType', + for: 'htmlFor', + form: 'form', + formmethod: 'formMethod', + formaction: 'formAction', + formenctype: 'formEncType', + formnovalidate: 'formNoValidate', + formtarget: 'formTarget', + frameborder: 'frameBorder', + headers: 'headers', + height: 'height', + hidden: 'hidden', + high: 'high', + href: 'href', + hreflang: 'hrefLang', + htmlfor: 'htmlFor', + httpequiv: 'httpEquiv', + 'http-equiv': 'httpEquiv', + icon: 'icon', + id: 'id', + innerhtml: 'innerHTML', + inputmode: 'inputMode', + integrity: 'integrity', + is: 'is', + itemid: 'itemID', + itemprop: 'itemProp', + itemref: 'itemRef', + itemscope: 'itemScope', + itemtype: 'itemType', + keyparams: 'keyParams', + keytype: 'keyType', + kind: 'kind', + label: 'label', + lang: 'lang', + list: 'list', + loop: 'loop', + low: 'low', + manifest: 'manifest', + marginwidth: 'marginWidth', + marginheight: 'marginHeight', + max: 'max', + maxlength: 'maxLength', + media: 'media', + mediagroup: 'mediaGroup', + method: 'method', + min: 'min', + minlength: 'minLength', + multiple: 'multiple', + muted: 'muted', + name: 'name', + nomodule: 'noModule', + nonce: 'nonce', + novalidate: 'noValidate', + open: 'open', + optimum: 'optimum', + pattern: 'pattern', + placeholder: 'placeholder', + playsinline: 'playsInline', + poster: 'poster', + preload: 'preload', + profile: 'profile', + radiogroup: 'radioGroup', + readonly: 'readOnly', + referrerpolicy: 'referrerPolicy', + rel: 'rel', + required: 'required', + reversed: 'reversed', + role: 'role', + rows: 'rows', + rowspan: 'rowSpan', + sandbox: 'sandbox', + scope: 'scope', + scoped: 'scoped', + scrolling: 'scrolling', + seamless: 'seamless', + selected: 'selected', + shape: 'shape', + size: 'size', + sizes: 'sizes', + span: 'span', + spellcheck: 'spellCheck', + src: 'src', + srcdoc: 'srcDoc', + srclang: 'srcLang', + srcset: 'srcSet', + start: 'start', + step: 'step', + style: 'style', + summary: 'summary', + tabindex: 'tabIndex', + target: 'target', + title: 'title', + type: 'type', + usemap: 'useMap', + value: 'value', + width: 'width', + wmode: 'wmode', + wrap: 'wrap', + // SVG + about: 'about', + accentheight: 'accentHeight', + 'accent-height': 'accentHeight', + accumulate: 'accumulate', + additive: 'additive', + alignmentbaseline: 'alignmentBaseline', + 'alignment-baseline': 'alignmentBaseline', + allowreorder: 'allowReorder', + alphabetic: 'alphabetic', + amplitude: 'amplitude', + arabicform: 'arabicForm', + 'arabic-form': 'arabicForm', + ascent: 'ascent', + attributename: 'attributeName', + attributetype: 'attributeType', + autoreverse: 'autoReverse', + azimuth: 'azimuth', + basefrequency: 'baseFrequency', + baselineshift: 'baselineShift', + 'baseline-shift': 'baselineShift', + baseprofile: 'baseProfile', + bbox: 'bbox', + begin: 'begin', + bias: 'bias', + by: 'by', + calcmode: 'calcMode', + capheight: 'capHeight', + 'cap-height': 'capHeight', + clip: 'clip', + clippath: 'clipPath', + 'clip-path': 'clipPath', + clippathunits: 'clipPathUnits', + cliprule: 'clipRule', + 'clip-rule': 'clipRule', + color: 'color', + colorinterpolation: 'colorInterpolation', + 'color-interpolation': 'colorInterpolation', + colorinterpolationfilters: 'colorInterpolationFilters', + 'color-interpolation-filters': 'colorInterpolationFilters', + colorprofile: 'colorProfile', + 'color-profile': 'colorProfile', + colorrendering: 'colorRendering', + 'color-rendering': 'colorRendering', + contentscripttype: 'contentScriptType', + contentstyletype: 'contentStyleType', + cursor: 'cursor', + cx: 'cx', + cy: 'cy', + d: 'd', + datatype: 'datatype', + decelerate: 'decelerate', + descent: 'descent', + diffuseconstant: 'diffuseConstant', + direction: 'direction', + display: 'display', + divisor: 'divisor', + dominantbaseline: 'dominantBaseline', + 'dominant-baseline': 'dominantBaseline', + dur: 'dur', + dx: 'dx', + dy: 'dy', + edgemode: 'edgeMode', + elevation: 'elevation', + enablebackground: 'enableBackground', + 'enable-background': 'enableBackground', + end: 'end', + exponent: 'exponent', + externalresourcesrequired: 'externalResourcesRequired', + fill: 'fill', + fillopacity: 'fillOpacity', + 'fill-opacity': 'fillOpacity', + fillrule: 'fillRule', + 'fill-rule': 'fillRule', + filter: 'filter', + filterres: 'filterRes', + filterunits: 'filterUnits', + floodopacity: 'floodOpacity', + 'flood-opacity': 'floodOpacity', + floodcolor: 'floodColor', + 'flood-color': 'floodColor', + focusable: 'focusable', + fontfamily: 'fontFamily', + 'font-family': 'fontFamily', + fontsize: 'fontSize', + 'font-size': 'fontSize', + fontsizeadjust: 'fontSizeAdjust', + 'font-size-adjust': 'fontSizeAdjust', + fontstretch: 'fontStretch', + 'font-stretch': 'fontStretch', + fontstyle: 'fontStyle', + 'font-style': 'fontStyle', + fontvariant: 'fontVariant', + 'font-variant': 'fontVariant', + fontweight: 'fontWeight', + 'font-weight': 'fontWeight', + format: 'format', + from: 'from', + fx: 'fx', + fy: 'fy', + g1: 'g1', + g2: 'g2', + glyphname: 'glyphName', + 'glyph-name': 'glyphName', + glyphorientationhorizontal: 'glyphOrientationHorizontal', + 'glyph-orientation-horizontal': 'glyphOrientationHorizontal', + glyphorientationvertical: 'glyphOrientationVertical', + 'glyph-orientation-vertical': 'glyphOrientationVertical', + glyphref: 'glyphRef', + gradienttransform: 'gradientTransform', + gradientunits: 'gradientUnits', + hanging: 'hanging', + horizadvx: 'horizAdvX', + 'horiz-adv-x': 'horizAdvX', + horizoriginx: 'horizOriginX', + 'horiz-origin-x': 'horizOriginX', + ideographic: 'ideographic', + imagerendering: 'imageRendering', + 'image-rendering': 'imageRendering', + in2: 'in2', + in: 'in', + inlist: 'inlist', + intercept: 'intercept', + k1: 'k1', + k2: 'k2', + k3: 'k3', + k4: 'k4', + k: 'k', + kernelmatrix: 'kernelMatrix', + kernelunitlength: 'kernelUnitLength', + kerning: 'kerning', + keypoints: 'keyPoints', + keysplines: 'keySplines', + keytimes: 'keyTimes', + lengthadjust: 'lengthAdjust', + letterspacing: 'letterSpacing', + 'letter-spacing': 'letterSpacing', + lightingcolor: 'lightingColor', + 'lighting-color': 'lightingColor', + limitingconeangle: 'limitingConeAngle', + local: 'local', + markerend: 'markerEnd', + 'marker-end': 'markerEnd', + markerheight: 'markerHeight', + markermid: 'markerMid', + 'marker-mid': 'markerMid', + markerstart: 'markerStart', + 'marker-start': 'markerStart', + markerunits: 'markerUnits', + markerwidth: 'markerWidth', + mask: 'mask', + maskcontentunits: 'maskContentUnits', + maskunits: 'maskUnits', + mathematical: 'mathematical', + mode: 'mode', + numoctaves: 'numOctaves', + offset: 'offset', + opacity: 'opacity', + operator: 'operator', + order: 'order', + orient: 'orient', + orientation: 'orientation', + origin: 'origin', + overflow: 'overflow', + overlineposition: 'overlinePosition', + 'overline-position': 'overlinePosition', + overlinethickness: 'overlineThickness', + 'overline-thickness': 'overlineThickness', + paintorder: 'paintOrder', + 'paint-order': 'paintOrder', + panose1: 'panose1', + 'panose-1': 'panose1', + pathlength: 'pathLength', + patterncontentunits: 'patternContentUnits', + patterntransform: 'patternTransform', + patternunits: 'patternUnits', + pointerevents: 'pointerEvents', + 'pointer-events': 'pointerEvents', + points: 'points', + pointsatx: 'pointsAtX', + pointsaty: 'pointsAtY', + pointsatz: 'pointsAtZ', + prefix: 'prefix', + preservealpha: 'preserveAlpha', + preserveaspectratio: 'preserveAspectRatio', + primitiveunits: 'primitiveUnits', + property: 'property', + r: 'r', + radius: 'radius', + refx: 'refX', + refy: 'refY', + renderingintent: 'renderingIntent', + 'rendering-intent': 'renderingIntent', + repeatcount: 'repeatCount', + repeatdur: 'repeatDur', + requiredextensions: 'requiredExtensions', + requiredfeatures: 'requiredFeatures', + resource: 'resource', + restart: 'restart', + result: 'result', + results: 'results', + rotate: 'rotate', + rx: 'rx', + ry: 'ry', + scale: 'scale', + security: 'security', + seed: 'seed', + shaperendering: 'shapeRendering', + 'shape-rendering': 'shapeRendering', + slope: 'slope', + spacing: 'spacing', + specularconstant: 'specularConstant', + specularexponent: 'specularExponent', + speed: 'speed', + spreadmethod: 'spreadMethod', + startoffset: 'startOffset', + stddeviation: 'stdDeviation', + stemh: 'stemh', + stemv: 'stemv', + stitchtiles: 'stitchTiles', + stopcolor: 'stopColor', + 'stop-color': 'stopColor', + stopopacity: 'stopOpacity', + 'stop-opacity': 'stopOpacity', + strikethroughposition: 'strikethroughPosition', + 'strikethrough-position': 'strikethroughPosition', + strikethroughthickness: 'strikethroughThickness', + 'strikethrough-thickness': 'strikethroughThickness', + string: 'string', + stroke: 'stroke', + strokedasharray: 'strokeDasharray', + 'stroke-dasharray': 'strokeDasharray', + strokedashoffset: 'strokeDashoffset', + 'stroke-dashoffset': 'strokeDashoffset', + strokelinecap: 'strokeLinecap', + 'stroke-linecap': 'strokeLinecap', + strokelinejoin: 'strokeLinejoin', + 'stroke-linejoin': 'strokeLinejoin', + strokemiterlimit: 'strokeMiterlimit', + 'stroke-miterlimit': 'strokeMiterlimit', + strokewidth: 'strokeWidth', + 'stroke-width': 'strokeWidth', + strokeopacity: 'strokeOpacity', + 'stroke-opacity': 'strokeOpacity', + suppresscontenteditablewarning: 'suppressContentEditableWarning', + suppresshydrationwarning: 'suppressHydrationWarning', + surfacescale: 'surfaceScale', + systemlanguage: 'systemLanguage', + tablevalues: 'tableValues', + targetx: 'targetX', + targety: 'targetY', + textanchor: 'textAnchor', + 'text-anchor': 'textAnchor', + textdecoration: 'textDecoration', + 'text-decoration': 'textDecoration', + textlength: 'textLength', + textrendering: 'textRendering', + 'text-rendering': 'textRendering', + to: 'to', + transform: 'transform', + typeof: 'typeof', + u1: 'u1', + u2: 'u2', + underlineposition: 'underlinePosition', + 'underline-position': 'underlinePosition', + underlinethickness: 'underlineThickness', + 'underline-thickness': 'underlineThickness', + unicode: 'unicode', + unicodebidi: 'unicodeBidi', + 'unicode-bidi': 'unicodeBidi', + unicoderange: 'unicodeRange', + 'unicode-range': 'unicodeRange', + unitsperem: 'unitsPerEm', + 'units-per-em': 'unitsPerEm', + unselectable: 'unselectable', + valphabetic: 'vAlphabetic', + 'v-alphabetic': 'vAlphabetic', + values: 'values', + vectoreffect: 'vectorEffect', + 'vector-effect': 'vectorEffect', + version: 'version', + vertadvy: 'vertAdvY', + 'vert-adv-y': 'vertAdvY', + vertoriginx: 'vertOriginX', + 'vert-origin-x': 'vertOriginX', + vertoriginy: 'vertOriginY', + 'vert-origin-y': 'vertOriginY', + vhanging: 'vHanging', + 'v-hanging': 'vHanging', + videographic: 'vIdeographic', + 'v-ideographic': 'vIdeographic', + viewbox: 'viewBox', + viewtarget: 'viewTarget', + visibility: 'visibility', + vmathematical: 'vMathematical', + 'v-mathematical': 'vMathematical', + vocab: 'vocab', + widths: 'widths', + wordspacing: 'wordSpacing', + 'word-spacing': 'wordSpacing', + writingmode: 'writingMode', + 'writing-mode': 'writingMode', + x1: 'x1', + x2: 'x2', + x: 'x', + xchannelselector: 'xChannelSelector', + xheight: 'xHeight', + 'x-height': 'xHeight', + xlinkactuate: 'xlinkActuate', + 'xlink:actuate': 'xlinkActuate', + xlinkarcrole: 'xlinkArcrole', + 'xlink:arcrole': 'xlinkArcrole', + xlinkhref: 'xlinkHref', + 'xlink:href': 'xlinkHref', + xlinkrole: 'xlinkRole', + 'xlink:role': 'xlinkRole', + xlinkshow: 'xlinkShow', + 'xlink:show': 'xlinkShow', + xlinktitle: 'xlinkTitle', + 'xlink:title': 'xlinkTitle', + xlinktype: 'xlinkType', + 'xlink:type': 'xlinkType', + xmlbase: 'xmlBase', + 'xml:base': 'xmlBase', + xmllang: 'xmlLang', + 'xml:lang': 'xmlLang', + xmlns: 'xmlns', + 'xml:space': 'xmlSpace', + xmlnsxlink: 'xmlnsXlink', + 'xmlns:xlink': 'xmlnsXlink', + xmlspace: 'xmlSpace', + y1: 'y1', + y2: 'y2', + y: 'y', + ychannelselector: 'yChannelSelector', + z: 'z', + zoomandpan: 'zoomAndPan', + }; + + var validateProperty$1 = function () {}; + + { + var warnedProperties$1 = {}; + var _hasOwnProperty = Object.prototype.hasOwnProperty; + var EVENT_NAME_REGEX = /^on./; + var INVALID_EVENT_NAME_REGEX = /^on[^A-Z]/; + var rARIA$1 = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$'); + var rARIACamel$1 = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$'); + + validateProperty$1 = function (tagName, name, value, canUseEventSystem) { + if (_hasOwnProperty.call(warnedProperties$1, name) && warnedProperties$1[name]) { + return true; + } + + var lowerCasedName = name.toLowerCase(); + + if (lowerCasedName === 'onfocusin' || lowerCasedName === 'onfocusout') { + warning$1( + false, + 'React uses onFocus and onBlur instead of onFocusIn and onFocusOut. ' + + 'All React events are normalized to bubble, so onFocusIn and onFocusOut ' + + 'are not needed/supported by React.', + ); + warnedProperties$1[name] = true; + return true; + } // We can't rely on the event system being injected on the server. + + if (canUseEventSystem) { + if (registrationNameModules.hasOwnProperty(name)) { + return true; + } + + var registrationName = possibleRegistrationNames.hasOwnProperty(lowerCasedName) + ? possibleRegistrationNames[lowerCasedName] + : null; + + if (registrationName != null) { + warning$1( + false, + 'Invalid event handler property `%s`. Did you mean `%s`?', + name, + registrationName, + ); + warnedProperties$1[name] = true; + return true; + } + + if (EVENT_NAME_REGEX.test(name)) { + warning$1(false, 'Unknown event handler property `%s`. It will be ignored.', name); + warnedProperties$1[name] = true; + return true; + } + } else if (EVENT_NAME_REGEX.test(name)) { + // If no event plugins have been injected, we are in a server environment. + // So we can't tell if the event name is correct for sure, but we can filter + // out known bad ones like `onclick`. We can't suggest a specific replacement though. + if (INVALID_EVENT_NAME_REGEX.test(name)) { + warning$1( + false, + 'Invalid event handler property `%s`. ' + + 'React events use the camelCase naming convention, for example `onClick`.', + name, + ); + } + + warnedProperties$1[name] = true; + return true; + } // Let the ARIA attribute hook validate ARIA attributes + + if (rARIA$1.test(name) || rARIACamel$1.test(name)) { + return true; + } + + if (lowerCasedName === 'innerhtml') { + warning$1( + false, + 'Directly setting property `innerHTML` is not permitted. ' + + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.', + ); + warnedProperties$1[name] = true; + return true; + } + + if (lowerCasedName === 'aria') { + warning$1( + false, + 'The `aria` attribute is reserved for future use in React. ' + + 'Pass individual `aria-` attributes instead.', + ); + warnedProperties$1[name] = true; + return true; + } + + if ( + lowerCasedName === 'is' && + value !== null && + value !== undefined && + typeof value !== 'string' + ) { + warning$1( + false, + 'Received a `%s` for a string attribute `is`. If this is expected, cast ' + + 'the value to a string.', + typeof value, + ); + warnedProperties$1[name] = true; + return true; + } + + if (typeof value === 'number' && isNaN(value)) { + warning$1( + false, + 'Received NaN for the `%s` attribute. If this is expected, cast ' + + 'the value to a string.', + name, + ); + warnedProperties$1[name] = true; + return true; + } + + var propertyInfo = getPropertyInfo(name); + var isReserved = propertyInfo !== null && propertyInfo.type === RESERVED; // Known attributes should match the casing specified in the property config. + + if (possibleStandardNames.hasOwnProperty(lowerCasedName)) { + var standardName = possibleStandardNames[lowerCasedName]; + + if (standardName !== name) { + warning$1(false, 'Invalid DOM property `%s`. Did you mean `%s`?', name, standardName); + warnedProperties$1[name] = true; + return true; + } + } else if (!isReserved && name !== lowerCasedName) { + // Unknown attributes should have lowercase casing since that's how they + // will be cased anyway with server rendering. + warning$1( + false, + 'React does not recognize the `%s` prop on a DOM element. If you ' + + 'intentionally want it to appear in the DOM as a custom ' + + 'attribute, spell it as lowercase `%s` instead. ' + + 'If you accidentally passed it from a parent component, remove ' + + 'it from the DOM element.', + name, + lowerCasedName, + ); + warnedProperties$1[name] = true; + return true; + } + + if ( + typeof value === 'boolean' && + shouldRemoveAttributeWithWarning(name, value, propertyInfo, false) + ) { + if (value) { + warning$1( + false, + 'Received `%s` for a non-boolean attribute `%s`.\n\n' + + 'If you want to write it to the DOM, pass a string instead: ' + + '%s="%s" or %s={value.toString()}.', + value, + name, + name, + value, + name, + ); + } else { + warning$1( + false, + 'Received `%s` for a non-boolean attribute `%s`.\n\n' + + 'If you want to write it to the DOM, pass a string instead: ' + + '%s="%s" or %s={value.toString()}.\n\n' + + 'If you used to conditionally omit it with %s={condition && value}, ' + + 'pass %s={condition ? value : undefined} instead.', + value, + name, + name, + value, + name, + name, + name, + ); + } + + warnedProperties$1[name] = true; + return true; + } // Now that we've validated casing, do not validate + // data types for reserved props + + if (isReserved) { + return true; + } // Warn when a known attribute is a bad type + + if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, false)) { + warnedProperties$1[name] = true; + return false; + } // Warn when passing the strings 'false' or 'true' into a boolean prop + + if ( + (value === 'false' || value === 'true') && + propertyInfo !== null && + propertyInfo.type === BOOLEAN + ) { + warning$1( + false, + 'Received the string `%s` for the boolean attribute `%s`. ' + + '%s ' + + 'Did you mean %s={%s}?', + value, + name, + value === 'false' + ? 'The browser will interpret it as a truthy value.' + : 'Although this works, it will not work as expected if you pass the string "false".', + name, + value, + ); + warnedProperties$1[name] = true; + return true; + } + + return true; + }; + } + + var warnUnknownProperties = function (type, props, canUseEventSystem) { + var unknownProps = []; + + for (var key in props) { + var isValid = validateProperty$1(type, key, props[key], canUseEventSystem); + + if (!isValid) { + unknownProps.push(key); + } + } + + var unknownPropString = unknownProps + .map(function (prop) { + return '`' + prop + '`'; + }) + .join(', '); + + if (unknownProps.length === 1) { + warning$1( + false, + 'Invalid value for prop %s on <%s> tag. Either remove it from the element, ' + + 'or pass a string or number value to keep it in the DOM. ' + + 'For details, see https://fb.me/react-attribute-behavior', + unknownPropString, + type, + ); + } else if (unknownProps.length > 1) { + warning$1( + false, + 'Invalid values for props %s on <%s> tag. Either remove them from the element, ' + + 'or pass a string or number value to keep them in the DOM. ' + + 'For details, see https://fb.me/react-attribute-behavior', + unknownPropString, + type, + ); + } + }; + + function validateProperties$2(type, props, canUseEventSystem) { + if (isCustomComponent(type, props)) { + return; + } + + warnUnknownProperties(type, props, canUseEventSystem); + } + + var toArray = React.Children.toArray; // This is only used in DEV. + // Each entry is `this.stack` from a currently executing renderer instance. + // (There may be more than one because ReactDOMServer is reentrant). + // Each stack is an array of frames which may contain nested stacks of elements. + + var currentDebugStacks = []; + var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher; + var ReactDebugCurrentFrame; + var prevGetCurrentStackImpl = null; + + var getCurrentServerStackImpl = function () { + return ''; + }; + + var describeStackFrame = function (element) { + return ''; + }; + + var validatePropertiesInDevelopment = function (type, props) {}; + + var pushCurrentDebugStack = function (stack) {}; + + var pushElementToDebugStack = function (element) {}; + + var popCurrentDebugStack = function () {}; + + var hasWarnedAboutUsingContextAsConsumer = false; + + { + ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; + + validatePropertiesInDevelopment = function (type, props) { + validateProperties(type, props); + validateProperties$1(type, props); + validateProperties$2( + type, + props, + /* canUseEventSystem */ + false, + ); + }; + + describeStackFrame = function (element) { + var source = element._source; + var type = element.type; + var name = getComponentName(type); + var ownerName = null; + return describeComponentFrame(name, source, ownerName); + }; + + pushCurrentDebugStack = function (stack) { + currentDebugStacks.push(stack); + + if (currentDebugStacks.length === 1) { + // We are entering a server renderer. + // Remember the previous (e.g. client) global stack implementation. + prevGetCurrentStackImpl = ReactDebugCurrentFrame.getCurrentStack; + ReactDebugCurrentFrame.getCurrentStack = getCurrentServerStackImpl; + } + }; + + pushElementToDebugStack = function (element) { + // For the innermost executing ReactDOMServer call, + var stack = currentDebugStacks[currentDebugStacks.length - 1]; // Take the innermost executing frame (e.g. <Foo>), + + var frame = stack[stack.length - 1]; // and record that it has one more element associated with it. + + frame.debugElementStack.push(element); // We only need this because we tail-optimize single-element + // children and directly handle them in an inner loop instead of + // creating separate frames for them. + }; + + popCurrentDebugStack = function () { + currentDebugStacks.pop(); + + if (currentDebugStacks.length === 0) { + // We are exiting the server renderer. + // Restore the previous (e.g. client) global stack implementation. + ReactDebugCurrentFrame.getCurrentStack = prevGetCurrentStackImpl; + prevGetCurrentStackImpl = null; + } + }; + + getCurrentServerStackImpl = function () { + if (currentDebugStacks.length === 0) { + // Nothing is currently rendering. + return ''; + } // ReactDOMServer is reentrant so there may be multiple calls at the same time. + // Take the frames from the innermost call which is the last in the array. + + var frames = currentDebugStacks[currentDebugStacks.length - 1]; + var stack = ''; // Go through every frame in the stack from the innermost one. + + for (var i = frames.length - 1; i >= 0; i--) { + var frame = frames[i]; // Every frame might have more than one debug element stack entry associated with it. + // This is because single-child nesting doesn't create materialized frames. + // Instead it would push them through `pushElementToDebugStack()`. + + var debugElementStack = frame.debugElementStack; + + for (var ii = debugElementStack.length - 1; ii >= 0; ii--) { + stack += describeStackFrame(debugElementStack[ii]); + } + } + + return stack; + }; + } + + var didWarnDefaultInputValue = false; + var didWarnDefaultChecked = false; + var didWarnDefaultSelectValue = false; + var didWarnDefaultTextareaValue = false; + var didWarnInvalidOptionChildren = false; + var didWarnAboutNoopUpdateForComponent = {}; + var didWarnAboutBadClass = {}; + var didWarnAboutModulePatternComponent = {}; + var didWarnAboutDeprecatedWillMount = {}; + var didWarnAboutUndefinedDerivedState = {}; + var didWarnAboutUninitializedState = {}; + var valuePropNames = ['value', 'defaultValue']; + var newlineEatingTags = { + listing: true, + pre: true, + textarea: true, + }; // We accept any tag to be rendered but since this gets injected into arbitrary + // HTML, we want to make sure that it's a safe tag. + // http://www.w3.org/TR/REC-xml/#NT-Name + + var VALID_TAG_REGEX = /^[a-zA-Z][a-zA-Z:_\.\-\d]*$/; // Simplified subset + + var validatedTagCache = {}; + + function validateDangerousTag(tag) { + if (!validatedTagCache.hasOwnProperty(tag)) { + if (!VALID_TAG_REGEX.test(tag)) { + { + throw Error('Invalid tag: ' + tag); + } + } + + validatedTagCache[tag] = true; + } + } + + var styleNameCache = {}; + + var processStyleName = function (styleName) { + if (styleNameCache.hasOwnProperty(styleName)) { + return styleNameCache[styleName]; + } + + var result = hyphenateStyleName(styleName); + styleNameCache[styleName] = result; + return result; + }; + + function createMarkupForStyles(styles) { + var serialized = ''; + var delimiter = ''; + + for (var styleName in styles) { + if (!styles.hasOwnProperty(styleName)) { + continue; + } + + var isCustomProperty = styleName.indexOf('--') === 0; + var styleValue = styles[styleName]; + + { + if (!isCustomProperty) { + warnValidStyle$1(styleName, styleValue); + } + } + + if (styleValue != null) { + serialized += delimiter + (isCustomProperty ? styleName : processStyleName(styleName)) + ':'; + serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty); + delimiter = ';'; + } + } + + return serialized || null; + } + + function warnNoop(publicInstance, callerName) { + { + var _constructor = publicInstance.constructor; + var componentName = (_constructor && getComponentName(_constructor)) || 'ReactClass'; + var warningKey = componentName + '.' + callerName; + + if (didWarnAboutNoopUpdateForComponent[warningKey]) { + return; + } + + warningWithoutStack$1( + false, + '%s(...): Can only update a mounting component. ' + + 'This usually means you called %s() outside componentWillMount() on the server. ' + + 'This is a no-op.\n\nPlease check the code for the %s component.', + callerName, + callerName, + componentName, + ); + didWarnAboutNoopUpdateForComponent[warningKey] = true; + } + } + + function shouldConstruct(Component) { + return Component.prototype && Component.prototype.isReactComponent; + } + + function getNonChildrenInnerMarkup(props) { + var innerHTML = props.dangerouslySetInnerHTML; + + if (innerHTML != null) { + if (innerHTML.__html != null) { + return innerHTML.__html; + } + } else { + var content = props.children; + + if (typeof content === 'string' || typeof content === 'number') { + return escapeTextForBrowser(content); + } + } + + return null; + } + + function flattenTopLevelChildren(children) { + if (!React.isValidElement(children)) { + return toArray(children); + } + + var element = children; + + if (element.type !== REACT_FRAGMENT_TYPE) { + return [element]; + } + + var fragmentChildren = element.props.children; + + if (!React.isValidElement(fragmentChildren)) { + return toArray(fragmentChildren); + } + + var fragmentChildElement = fragmentChildren; + return [fragmentChildElement]; + } + + function flattenOptionChildren(children) { + if (children === undefined || children === null) { + return children; + } + + var content = ''; // Flatten children and warn if they aren't strings or numbers; + // invalid types are ignored. + + React.Children.forEach(children, function (child) { + if (child == null) { + return; + } + + content += child; + + { + if (!didWarnInvalidOptionChildren && typeof child !== 'string' && typeof child !== 'number') { + didWarnInvalidOptionChildren = true; + warning$1(false, 'Only strings and numbers are supported as <option> children.'); + } + } + }); + return content; + } + + var hasOwnProperty = Object.prototype.hasOwnProperty; + var STYLE = 'style'; + var RESERVED_PROPS = { + children: null, + dangerouslySetInnerHTML: null, + suppressContentEditableWarning: null, + suppressHydrationWarning: null, + }; + + function createOpenTagMarkup( + tagVerbatim, + tagLowercase, + props, + namespace, + makeStaticMarkup, + isRootElement, + ) { + var ret = '<' + tagVerbatim; + + for (var propKey in props) { + if (!hasOwnProperty.call(props, propKey)) { + continue; + } + + if (enableFlareAPI && propKey === 'listeners') { + continue; + } + + var propValue = props[propKey]; + + if (propValue == null) { + continue; + } + + if (propKey === STYLE) { + propValue = createMarkupForStyles(propValue); + } + + var markup = null; + + if (isCustomComponent(tagLowercase, props)) { + if (!RESERVED_PROPS.hasOwnProperty(propKey)) { + markup = createMarkupForCustomAttribute(propKey, propValue); + } + } else { + markup = createMarkupForProperty(propKey, propValue); + } + + if (markup) { + ret += ' ' + markup; + } + } // For static pages, no need to put React ID and checksum. Saves lots of + // bytes. + + if (makeStaticMarkup) { + return ret; + } + + if (isRootElement) { + ret += ' ' + createMarkupForRoot(); + } + + return ret; + } + + function validateRenderResult(child, type) { + if (child === undefined) { + { + { + throw Error( + (getComponentName(type) || 'Component') + + '(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.', + ); + } + } + } + } + + function resolve(child, context, threadID) { + while (React.isValidElement(child)) { + // Safe because we just checked it's an element. + var element = child; + var Component = element.type; + + { + pushElementToDebugStack(element); + } + + if (typeof Component !== 'function') { + break; + } + + processChild(element, Component); + } // Extra closure so queue and replace can be captured properly + + function processChild(element, Component) { + var isClass = shouldConstruct(Component); + var publicContext = processContext(Component, context, threadID, isClass); + var queue = []; + var replace = false; + var updater = { + isMounted: function (publicInstance) { + return false; + }, + enqueueForceUpdate: function (publicInstance) { + if (queue === null) { + warnNoop(publicInstance, 'forceUpdate'); + return null; + } + }, + enqueueReplaceState: function (publicInstance, completeState) { + replace = true; + queue = [completeState]; + }, + enqueueSetState: function (publicInstance, currentPartialState) { + if (queue === null) { + warnNoop(publicInstance, 'setState'); + return null; + } + + queue.push(currentPartialState); + }, + }; + var inst; + + if (isClass) { + inst = new Component(element.props, publicContext, updater); + + if (typeof Component.getDerivedStateFromProps === 'function') { + { + if (inst.state === null || inst.state === undefined) { + var componentName = getComponentName(Component) || 'Unknown'; + + if (!didWarnAboutUninitializedState[componentName]) { + warningWithoutStack$1( + false, + '`%s` uses `getDerivedStateFromProps` but its initial state is ' + + '%s. This is not recommended. Instead, define the initial state by ' + + 'assigning an object to `this.state` in the constructor of `%s`. ' + + 'This ensures that `getDerivedStateFromProps` arguments have a consistent shape.', + componentName, + inst.state === null ? 'null' : 'undefined', + componentName, + ); + didWarnAboutUninitializedState[componentName] = true; + } + } + } + + var partialState = Component.getDerivedStateFromProps.call(null, element.props, inst.state); + + { + if (partialState === undefined) { + var _componentName = getComponentName(Component) || 'Unknown'; + + if (!didWarnAboutUndefinedDerivedState[_componentName]) { + warningWithoutStack$1( + false, + '%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. ' + + 'You have returned undefined.', + _componentName, + ); + didWarnAboutUndefinedDerivedState[_componentName] = true; + } + } + } + + if (partialState != null) { + inst.state = _assign({}, inst.state, partialState); + } + } + } else { + { + if (Component.prototype && typeof Component.prototype.render === 'function') { + var _componentName2 = getComponentName(Component) || 'Unknown'; + + if (!didWarnAboutBadClass[_componentName2]) { + warningWithoutStack$1( + false, + "The <%s /> component appears to have a render method, but doesn't extend React.Component. " + + 'This is likely to cause errors. Change %s to extend React.Component instead.', + _componentName2, + _componentName2, + ); + didWarnAboutBadClass[_componentName2] = true; + } + } + } + + var componentIdentity = {}; + prepareToUseHooks(componentIdentity); + inst = Component(element.props, publicContext, updater); + inst = finishHooks(Component, element.props, inst, publicContext); + + if (inst == null || inst.render == null) { + child = inst; + validateRenderResult(child, Component); + return; + } + + { + var _componentName3 = getComponentName(Component) || 'Unknown'; + + if (!didWarnAboutModulePatternComponent[_componentName3]) { + warningWithoutStack$1( + false, + 'The <%s /> component appears to be a function component that returns a class instance. ' + + 'Change %s to a class that extends React.Component instead. ' + + "If you can't use a class try assigning the prototype on the function as a workaround. " + + "`%s.prototype = React.Component.prototype`. Don't use an arrow function since it " + + 'cannot be called with `new` by React.', + _componentName3, + _componentName3, + _componentName3, + ); + didWarnAboutModulePatternComponent[_componentName3] = true; + } + } + } + + inst.props = element.props; + inst.context = publicContext; + inst.updater = updater; + var initialState = inst.state; + + if (initialState === undefined) { + inst.state = initialState = null; + } + + if ( + typeof inst.UNSAFE_componentWillMount === 'function' || + typeof inst.componentWillMount === 'function' + ) { + if (typeof inst.componentWillMount === 'function') { + { + if ( + warnAboutDeprecatedLifecycles && + inst.componentWillMount.__suppressDeprecationWarning !== true + ) { + var _componentName4 = getComponentName(Component) || 'Unknown'; + + if (!didWarnAboutDeprecatedWillMount[_componentName4]) { + lowPriorityWarningWithoutStack$1( + false, // keep this warning in sync with ReactStrictModeWarning.js + 'componentWillMount has been renamed, and is not recommended for use. ' + + 'See https://fb.me/react-unsafe-component-lifecycles for details.\n\n' + + '* Move code from componentWillMount to componentDidMount (preferred in most cases) ' + + 'or the constructor.\n' + + '\nPlease update the following components: %s', + _componentName4, + ); + didWarnAboutDeprecatedWillMount[_componentName4] = true; + } + } + } // In order to support react-lifecycles-compat polyfilled components, + // Unsafe lifecycles should not be invoked for any component with the new gDSFP. + + if (typeof Component.getDerivedStateFromProps !== 'function') { + inst.componentWillMount(); + } + } + + if ( + typeof inst.UNSAFE_componentWillMount === 'function' && + typeof Component.getDerivedStateFromProps !== 'function' + ) { + // In order to support react-lifecycles-compat polyfilled components, + // Unsafe lifecycles should not be invoked for any component with the new gDSFP. + inst.UNSAFE_componentWillMount(); + } + + if (queue.length) { + var oldQueue = queue; + var oldReplace = replace; + queue = null; + replace = false; + + if (oldReplace && oldQueue.length === 1) { + inst.state = oldQueue[0]; + } else { + var nextState = oldReplace ? oldQueue[0] : inst.state; + var dontMutate = true; + + for (var i = oldReplace ? 1 : 0; i < oldQueue.length; i++) { + var partial = oldQueue[i]; + + var _partialState = + typeof partial === 'function' + ? partial.call(inst, nextState, element.props, publicContext) + : partial; + + if (_partialState != null) { + if (dontMutate) { + dontMutate = false; + nextState = _assign({}, nextState, _partialState); + } else { + _assign(nextState, _partialState); + } + } + } + + inst.state = nextState; + } + } else { + queue = null; + } + } + + child = inst.render(); + + { + if (child === undefined && inst.render._isMockFunction) { + // This is probably bad practice. Consider warning here and + // deprecating this convenience. + child = null; + } + } + + validateRenderResult(child, Component); + var childContext; + + if (disableLegacyContext) { + { + var childContextTypes = Component.childContextTypes; + + if (childContextTypes !== undefined) { + warningWithoutStack$1( + false, + '%s uses the legacy childContextTypes API which is no longer supported. ' + + 'Use React.createContext() instead.', + getComponentName(Component) || 'Unknown', + ); + } + } + } else { + if (typeof inst.getChildContext === 'function') { + var _childContextTypes = Component.childContextTypes; + + if (typeof _childContextTypes === 'object') { + childContext = inst.getChildContext(); + + for (var contextKey in childContext) { + if (!(contextKey in _childContextTypes)) { + { + throw Error( + (getComponentName(Component) || 'Unknown') + + '.getChildContext(): key "' + + contextKey + + '" is not defined in childContextTypes.', + ); + } + } + } + } else { + warningWithoutStack$1( + false, + '%s.getChildContext(): childContextTypes must be defined in order to ' + + 'use getChildContext().', + getComponentName(Component) || 'Unknown', + ); + } + } + + if (childContext) { + context = _assign({}, context, childContext); + } + } + } + + return { + child: child, + context: context, + }; + } + + var ReactDOMServerRenderer = + /*#__PURE__*/ + (function () { + // TODO: type this more strictly: + // DEV-only + function ReactDOMServerRenderer(children, makeStaticMarkup) { + var flatChildren = flattenTopLevelChildren(children); + var topFrame = { + type: null, + // Assume all trees start in the HTML namespace (not totally true, but + // this is what we did historically) + domNamespace: Namespaces.html, + children: flatChildren, + childIndex: 0, + context: emptyObject, + footer: '', + }; + + { + topFrame.debugElementStack = []; + } + + this.threadID = allocThreadID(); + this.stack = [topFrame]; + this.exhausted = false; + this.currentSelectValue = null; + this.previousWasTextNode = false; + this.makeStaticMarkup = makeStaticMarkup; + this.suspenseDepth = 0; // Context (new API) + + this.contextIndex = -1; + this.contextStack = []; + this.contextValueStack = []; + + { + this.contextProviderStack = []; + } + } + + var _proto = ReactDOMServerRenderer.prototype; + + _proto.destroy = function destroy() { + if (!this.exhausted) { + this.exhausted = true; + this.clearProviders(); + freeThreadID(this.threadID); + } + }; + /** + * Note: We use just two stacks regardless of how many context providers you have. + * Providers are always popped in the reverse order to how they were pushed + * so we always know on the way down which provider you'll encounter next on the way up. + * On the way down, we push the current provider, and its context value *before* + * we mutated it, onto the stacks. Therefore, on the way up, we always know which + * provider needs to be "restored" to which value. + * https://github.com/facebook/react/pull/12985#issuecomment-396301248 + */ + + _proto.pushProvider = function pushProvider(provider) { + var index = ++this.contextIndex; + var context = provider.type._context; + var threadID = this.threadID; + validateContextBounds(context, threadID); + var previousValue = context[threadID]; // Remember which value to restore this context to on our way up. + + this.contextStack[index] = context; + this.contextValueStack[index] = previousValue; + + { + // Only used for push/pop mismatch warnings. + this.contextProviderStack[index] = provider; + } // Mutate the current value. + + context[threadID] = provider.props.value; + }; + + _proto.popProvider = function popProvider(provider) { + var index = this.contextIndex; + + { + !(index > -1 && provider === this.contextProviderStack[index]) + ? warningWithoutStack$1(false, 'Unexpected pop.') + : void 0; + } + + var context = this.contextStack[index]; + var previousValue = this.contextValueStack[index]; // "Hide" these null assignments from Flow by using `any` + // because conceptually they are deletions--as long as we + // promise to never access values beyond `this.contextIndex`. + + this.contextStack[index] = null; + this.contextValueStack[index] = null; + + { + this.contextProviderStack[index] = null; + } + + this.contextIndex--; // Restore to the previous value we stored as we were walking down. + // We've already verified that this context has been expanded to accommodate + // this thread id, so we don't need to do it again. + + context[this.threadID] = previousValue; + }; + + _proto.clearProviders = function clearProviders() { + // Restore any remaining providers on the stack to previous values + for (var index = this.contextIndex; index >= 0; index--) { + var context = this.contextStack[index]; + var previousValue = this.contextValueStack[index]; + context[this.threadID] = previousValue; + } + }; + + _proto.read = function read(bytes) { + if (this.exhausted) { + return null; + } + + var prevThreadID = currentThreadID; + setCurrentThreadID(this.threadID); + var prevDispatcher = ReactCurrentDispatcher.current; + ReactCurrentDispatcher.current = Dispatcher; + + try { + // Markup generated within <Suspense> ends up buffered until we know + // nothing in that boundary suspended + var out = ['']; + var suspended = false; + + while (out[0].length < bytes) { + if (this.stack.length === 0) { + this.exhausted = true; + freeThreadID(this.threadID); + break; + } + + var frame = this.stack[this.stack.length - 1]; + + if (suspended || frame.childIndex >= frame.children.length) { + var footer = frame.footer; + + if (footer !== '') { + this.previousWasTextNode = false; + } + + this.stack.pop(); + + if (frame.type === 'select') { + this.currentSelectValue = null; + } else if ( + frame.type != null && + frame.type.type != null && + frame.type.type.$$typeof === REACT_PROVIDER_TYPE + ) { + var provider = frame.type; + this.popProvider(provider); + } else if (frame.type === REACT_SUSPENSE_TYPE) { + this.suspenseDepth--; + var buffered = out.pop(); + + if (suspended) { + suspended = false; // If rendering was suspended at this boundary, render the fallbackFrame + + var fallbackFrame = frame.fallbackFrame; + + if (!fallbackFrame) { + { + throw Error( + 'ReactDOMServer did not find an internal fallback frame for Suspense. This is a bug in React. Please file an issue.', + ); + } + } + + this.stack.push(fallbackFrame); + out[this.suspenseDepth] += '<!--$!-->'; // Skip flushing output since we're switching to the fallback + + continue; + } else { + out[this.suspenseDepth] += buffered; + } + } // Flush output + + out[this.suspenseDepth] += footer; + continue; + } + + var child = frame.children[frame.childIndex++]; + var outBuffer = ''; + + { + pushCurrentDebugStack(this.stack); // We're starting work on this frame, so reset its inner stack. + + frame.debugElementStack.length = 0; + } + + try { + outBuffer += this.render(child, frame.context, frame.domNamespace); + } catch (err) { + if (err != null && typeof err.then === 'function') { + if (enableSuspenseServerRenderer) { + if (!(this.suspenseDepth > 0)) { + { + throw Error( + 'A React component suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.', + ); + } + } + + suspended = true; + } else { + { + { + throw Error('ReactDOMServer does not yet support Suspense.'); + } + } + } + } else { + throw err; + } + } finally { + { + popCurrentDebugStack(); + } + } + + if (out.length <= this.suspenseDepth) { + out.push(''); + } + + out[this.suspenseDepth] += outBuffer; + } + + return out[0]; + } finally { + ReactCurrentDispatcher.current = prevDispatcher; + setCurrentThreadID(prevThreadID); + } + }; + + _proto.render = function render(child, context, parentNamespace) { + if (typeof child === 'string' || typeof child === 'number') { + var text = '' + child; + + if (text === '') { + return ''; + } + + if (this.makeStaticMarkup) { + return escapeTextForBrowser(text); + } + + if (this.previousWasTextNode) { + return '<!-- -->' + escapeTextForBrowser(text); + } + + this.previousWasTextNode = true; + return escapeTextForBrowser(text); + } else { + var nextChild; + + var _resolve = resolve(child, context, this.threadID); + + nextChild = _resolve.child; + context = _resolve.context; + + if (nextChild === null || nextChild === false) { + return ''; + } else if (!React.isValidElement(nextChild)) { + if (nextChild != null && nextChild.$$typeof != null) { + // Catch unexpected special types early. + var $$typeof = nextChild.$$typeof; + + if (!($$typeof !== REACT_PORTAL_TYPE)) { + { + throw Error( + 'Portals are not currently supported by the server renderer. Render them conditionally so that they only appear on the client render.', + ); + } + } // Catch-all to prevent an infinite loop if React.Children.toArray() supports some new type. + + { + { + throw Error( + 'Unknown element-like object type: ' + + $$typeof.toString() + + '. This is likely a bug in React. Please file an issue.', + ); + } + } + } + + var nextChildren = toArray(nextChild); + var frame = { + type: null, + domNamespace: parentNamespace, + children: nextChildren, + childIndex: 0, + context: context, + footer: '', + }; + + { + frame.debugElementStack = []; + } + + this.stack.push(frame); + return ''; + } // Safe because we just checked it's an element. + + var nextElement = nextChild; + var elementType = nextElement.type; + + if (typeof elementType === 'string') { + return this.renderDOM(nextElement, context, parentNamespace); + } + + switch (elementType) { + case REACT_STRICT_MODE_TYPE: + case REACT_CONCURRENT_MODE_TYPE: + case REACT_PROFILER_TYPE: + case REACT_SUSPENSE_LIST_TYPE: + case REACT_FRAGMENT_TYPE: { + var _nextChildren = toArray(nextChild.props.children); + + var _frame = { + type: null, + domNamespace: parentNamespace, + children: _nextChildren, + childIndex: 0, + context: context, + footer: '', + }; + + { + _frame.debugElementStack = []; + } + + this.stack.push(_frame); + return ''; + } + + case REACT_SUSPENSE_TYPE: { + if (enableSuspenseServerRenderer) { + var fallback = nextChild.props.fallback; + + if (fallback === undefined) { + // If there is no fallback, then this just behaves as a fragment. + var _nextChildren3 = toArray(nextChild.props.children); + + var _frame3 = { + type: null, + domNamespace: parentNamespace, + children: _nextChildren3, + childIndex: 0, + context: context, + footer: '', + }; + + { + _frame3.debugElementStack = []; + } + + this.stack.push(_frame3); + return ''; + } + + var fallbackChildren = toArray(fallback); + + var _nextChildren2 = toArray(nextChild.props.children); + + var fallbackFrame = { + type: null, + domNamespace: parentNamespace, + children: fallbackChildren, + childIndex: 0, + context: context, + footer: '<!--/$-->', + }; + var _frame2 = { + fallbackFrame: fallbackFrame, + type: REACT_SUSPENSE_TYPE, + domNamespace: parentNamespace, + children: _nextChildren2, + childIndex: 0, + context: context, + footer: '<!--/$-->', + }; + + { + _frame2.debugElementStack = []; + fallbackFrame.debugElementStack = []; + } + + this.stack.push(_frame2); + this.suspenseDepth++; + return '<!--$-->'; + } else { + { + { + throw Error('ReactDOMServer does not yet support Suspense.'); + } + } + } + } + // eslint-disable-next-line-no-fallthrough + + default: + break; + } + + if (typeof elementType === 'object' && elementType !== null) { + switch (elementType.$$typeof) { + case REACT_FORWARD_REF_TYPE: { + var element = nextChild; + + var _nextChildren4; + + var componentIdentity = {}; + prepareToUseHooks(componentIdentity); + _nextChildren4 = elementType.render(element.props, element.ref); + _nextChildren4 = finishHooks( + elementType.render, + element.props, + _nextChildren4, + element.ref, + ); + _nextChildren4 = toArray(_nextChildren4); + var _frame4 = { + type: null, + domNamespace: parentNamespace, + children: _nextChildren4, + childIndex: 0, + context: context, + footer: '', + }; + + { + _frame4.debugElementStack = []; + } + + this.stack.push(_frame4); + return ''; + } + + case REACT_MEMO_TYPE: { + var _element = nextChild; + var _nextChildren5 = [ + React.createElement( + elementType.type, + _assign( + { + ref: _element.ref, + }, + _element.props, + ), + ), + ]; + var _frame5 = { + type: null, + domNamespace: parentNamespace, + children: _nextChildren5, + childIndex: 0, + context: context, + footer: '', + }; + + { + _frame5.debugElementStack = []; + } + + this.stack.push(_frame5); + return ''; + } + + case REACT_PROVIDER_TYPE: { + var provider = nextChild; + var nextProps = provider.props; + + var _nextChildren6 = toArray(nextProps.children); + + var _frame6 = { + type: provider, + domNamespace: parentNamespace, + children: _nextChildren6, + childIndex: 0, + context: context, + footer: '', + }; + + { + _frame6.debugElementStack = []; + } + + this.pushProvider(provider); + this.stack.push(_frame6); + return ''; + } + + case REACT_CONTEXT_TYPE: { + var reactContext = nextChild.type; // The logic below for Context differs depending on PROD or DEV mode. In + // DEV mode, we create a separate object for Context.Consumer that acts + // like a proxy to Context. This proxy object adds unnecessary code in PROD + // so we use the old behaviour (Context.Consumer references Context) to + // reduce size and overhead. The separate object references context via + // a property called "_context", which also gives us the ability to check + // in DEV mode if this property exists or not and warn if it does not. + + { + if (reactContext._context === undefined) { + // This may be because it's a Context (rather than a Consumer). + // Or it may be because it's older React where they're the same thing. + // We only want to warn if we're sure it's a new React. + if (reactContext !== reactContext.Consumer) { + if (!hasWarnedAboutUsingContextAsConsumer) { + hasWarnedAboutUsingContextAsConsumer = true; + warning$1( + false, + 'Rendering <Context> directly is not supported and will be removed in ' + + 'a future major release. Did you mean to render <Context.Consumer> instead?', + ); + } + } + } else { + reactContext = reactContext._context; + } + } + + var _nextProps = nextChild.props; + var threadID = this.threadID; + validateContextBounds(reactContext, threadID); + var nextValue = reactContext[threadID]; + + var _nextChildren7 = toArray(_nextProps.children(nextValue)); + + var _frame7 = { + type: nextChild, + domNamespace: parentNamespace, + children: _nextChildren7, + childIndex: 0, + context: context, + footer: '', + }; + + { + _frame7.debugElementStack = []; + } + + this.stack.push(_frame7); + return ''; + } + // eslint-disable-next-line-no-fallthrough + + case REACT_FUNDAMENTAL_TYPE: { + if (enableFundamentalAPI) { + var fundamentalImpl = elementType.impl; + var open = fundamentalImpl.getServerSideString(null, nextElement.props); + var getServerSideStringClose = fundamentalImpl.getServerSideStringClose; + var close = + getServerSideStringClose !== undefined + ? getServerSideStringClose(null, nextElement.props) + : ''; + + var _nextChildren8 = + fundamentalImpl.reconcileChildren !== false + ? toArray(nextChild.props.children) + : []; + + var _frame8 = { + type: null, + domNamespace: parentNamespace, + children: _nextChildren8, + childIndex: 0, + context: context, + footer: close, + }; + + { + _frame8.debugElementStack = []; + } + + this.stack.push(_frame8); + return open; + } + + { + { + throw Error('ReactDOMServer does not yet support the fundamental API.'); + } + } + } + // eslint-disable-next-line-no-fallthrough + + case REACT_LAZY_TYPE: { + var _element2 = nextChild; + var lazyComponent = nextChild.type; // Attempt to initialize lazy component regardless of whether the + // suspense server-side renderer is enabled so synchronously + // resolved constructors are supported. + + initializeLazyComponentType(lazyComponent); + + switch (lazyComponent._status) { + case Resolved: { + var _nextChildren9 = [ + React.createElement( + lazyComponent._result, + _assign( + { + ref: _element2.ref, + }, + _element2.props, + ), + ), + ]; + var _frame9 = { + type: null, + domNamespace: parentNamespace, + children: _nextChildren9, + childIndex: 0, + context: context, + footer: '', + }; + + { + _frame9.debugElementStack = []; + } + + this.stack.push(_frame9); + return ''; + } + + case Rejected: + throw lazyComponent._result; + + case Pending: + default: { + { + throw Error('ReactDOMServer does not yet support lazy-loaded components.'); + } + } + } + } + // eslint-disable-next-line-no-fallthrough + + case REACT_SCOPE_TYPE: { + if (enableScopeAPI) { + var _nextChildren10 = toArray(nextChild.props.children); + + var _frame10 = { + type: null, + domNamespace: parentNamespace, + children: _nextChildren10, + childIndex: 0, + context: context, + footer: '', + }; + + { + _frame10.debugElementStack = []; + } + + this.stack.push(_frame10); + return ''; + } + + { + { + throw Error('ReactDOMServer does not yet support scope components.'); + } + } + } + } + } + + var info = ''; + + { + var owner = nextElement._owner; + + if ( + elementType === undefined || + (typeof elementType === 'object' && + elementType !== null && + Object.keys(elementType).length === 0) + ) { + info += + ' You likely forgot to export your component from the file ' + + "it's defined in, or you might have mixed up default and " + + 'named imports.'; + } + + var ownerName = owner ? getComponentName(owner) : null; + + if (ownerName) { + info += '\n\nCheck the render method of `' + ownerName + '`.'; + } + } + + { + { + throw Error( + 'Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: ' + + (elementType == null ? elementType : typeof elementType) + + '.' + + info, + ); + } + } + } + }; + + _proto.renderDOM = function renderDOM(element, context, parentNamespace) { + var tag = element.type.toLowerCase(); + var namespace = parentNamespace; + + if (parentNamespace === Namespaces.html) { + namespace = getIntrinsicNamespace(tag); + } + + { + if (namespace === Namespaces.html) { + // Should this check be gated by parent namespace? Not sure we want to + // allow <SVG> or <mATH>. + !(tag === element.type) + ? warning$1( + false, + '<%s /> is using incorrect casing. ' + + 'Use PascalCase for React components, ' + + 'or lowercase for HTML elements.', + element.type, + ) + : void 0; + } + } + + validateDangerousTag(tag); + var props = element.props; + + if (tag === 'input') { + { + ReactControlledValuePropTypes.checkPropTypes('input', props); + + if ( + props.checked !== undefined && + props.defaultChecked !== undefined && + !didWarnDefaultChecked + ) { + warning$1( + false, + '%s contains an input of type %s with both checked and defaultChecked props. ' + + 'Input elements must be either controlled or uncontrolled ' + + '(specify either the checked prop, or the defaultChecked prop, but not ' + + 'both). Decide between using a controlled or uncontrolled input ' + + 'element and remove one of these props. More info: ' + + 'https://fb.me/react-controlled-components', + 'A component', + props.type, + ); + didWarnDefaultChecked = true; + } + + if ( + props.value !== undefined && + props.defaultValue !== undefined && + !didWarnDefaultInputValue + ) { + warning$1( + false, + '%s contains an input of type %s with both value and defaultValue props. ' + + 'Input elements must be either controlled or uncontrolled ' + + '(specify either the value prop, or the defaultValue prop, but not ' + + 'both). Decide between using a controlled or uncontrolled input ' + + 'element and remove one of these props. More info: ' + + 'https://fb.me/react-controlled-components', + 'A component', + props.type, + ); + didWarnDefaultInputValue = true; + } + } + + props = _assign( + { + type: undefined, + }, + props, + { + defaultChecked: undefined, + defaultValue: undefined, + value: props.value != null ? props.value : props.defaultValue, + checked: props.checked != null ? props.checked : props.defaultChecked, + }, + ); + } else if (tag === 'textarea') { + { + ReactControlledValuePropTypes.checkPropTypes('textarea', props); + + if ( + props.value !== undefined && + props.defaultValue !== undefined && + !didWarnDefaultTextareaValue + ) { + warning$1( + false, + 'Textarea elements must be either controlled or uncontrolled ' + + '(specify either the value prop, or the defaultValue prop, but not ' + + 'both). Decide between using a controlled or uncontrolled textarea ' + + 'and remove one of these props. More info: ' + + 'https://fb.me/react-controlled-components', + ); + didWarnDefaultTextareaValue = true; + } + } + + var initialValue = props.value; + + if (initialValue == null) { + var defaultValue = props.defaultValue; // TODO (yungsters): Remove support for children content in <textarea>. + + var textareaChildren = props.children; + + if (textareaChildren != null) { + { + warning$1( + false, + 'Use the `defaultValue` or `value` props instead of setting ' + + 'children on <textarea>.', + ); + } + + if (!(defaultValue == null)) { + { + throw Error('If you supply `defaultValue` on a <textarea>, do not pass children.'); + } + } + + if (Array.isArray(textareaChildren)) { + if (!(textareaChildren.length <= 1)) { + { + throw Error('<textarea> can only have at most one child.'); + } + } + + textareaChildren = textareaChildren[0]; + } + + defaultValue = '' + textareaChildren; + } + + if (defaultValue == null) { + defaultValue = ''; + } + + initialValue = defaultValue; + } + + props = _assign({}, props, { + value: undefined, + children: '' + initialValue, + }); + } else if (tag === 'select') { + { + ReactControlledValuePropTypes.checkPropTypes('select', props); + + for (var i = 0; i < valuePropNames.length; i++) { + var propName = valuePropNames[i]; + + if (props[propName] == null) { + continue; + } + + var isArray = Array.isArray(props[propName]); + + if (props.multiple && !isArray) { + warning$1( + false, + 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.', + propName, + ); + } else if (!props.multiple && isArray) { + warning$1( + false, + 'The `%s` prop supplied to <select> must be a scalar ' + + 'value if `multiple` is false.', + propName, + ); + } + } + + if ( + props.value !== undefined && + props.defaultValue !== undefined && + !didWarnDefaultSelectValue + ) { + warning$1( + false, + 'Select elements must be either controlled or uncontrolled ' + + '(specify either the value prop, or the defaultValue prop, but not ' + + 'both). Decide between using a controlled or uncontrolled select ' + + 'element and remove one of these props. More info: ' + + 'https://fb.me/react-controlled-components', + ); + didWarnDefaultSelectValue = true; + } + } + + this.currentSelectValue = props.value != null ? props.value : props.defaultValue; + props = _assign({}, props, { + value: undefined, + }); + } else if (tag === 'option') { + var selected = null; + var selectValue = this.currentSelectValue; + var optionChildren = flattenOptionChildren(props.children); + + if (selectValue != null) { + var value; + + if (props.value != null) { + value = props.value + ''; + } else { + value = optionChildren; + } + + selected = false; + + if (Array.isArray(selectValue)) { + // multiple + for (var j = 0; j < selectValue.length; j++) { + if ('' + selectValue[j] === value) { + selected = true; + break; + } + } + } else { + selected = '' + selectValue === value; + } + + props = _assign( + { + selected: undefined, + children: undefined, + }, + props, + { + selected: selected, + children: optionChildren, + }, + ); + } + } + + { + validatePropertiesInDevelopment(tag, props); + } + + assertValidProps(tag, props); + var out = createOpenTagMarkup( + element.type, + tag, + props, + namespace, + this.makeStaticMarkup, + this.stack.length === 1, + ); + var footer = ''; + + if (omittedCloseTags.hasOwnProperty(tag)) { + out += '/>'; + } else { + out += '>'; + footer = '</' + element.type + '>'; + } + + var children; + var innerMarkup = getNonChildrenInnerMarkup(props); + + if (innerMarkup != null) { + children = []; + + if (newlineEatingTags[tag] && innerMarkup.charAt(0) === '\n') { + // text/html ignores the first character in these tags if it's a newline + // Prefer to break application/xml over text/html (for now) by adding + // a newline specifically to get eaten by the parser. (Alternately for + // textareas, replacing "^\n" with "\r\n" doesn't get eaten, and the first + // \r is normalized out by HTMLTextAreaElement#value.) + // See: <http://www.w3.org/TR/html-polyglot/#newlines-in-textarea-and-pre> + // See: <http://www.w3.org/TR/html5/syntax.html#element-restrictions> + // See: <http://www.w3.org/TR/html5/syntax.html#newlines> + // See: Parsing of "textarea" "listing" and "pre" elements + // from <http://www.w3.org/TR/html5/syntax.html#parsing-main-inbody> + out += '\n'; + } + + out += innerMarkup; + } else { + children = toArray(props.children); + } + + var frame = { + domNamespace: getChildNamespace(parentNamespace, element.type), + type: tag, + children: children, + childIndex: 0, + context: context, + footer: footer, + }; + + { + frame.debugElementStack = []; + } + + this.stack.push(frame); + this.previousWasTextNode = false; + return out; + }; + + return ReactDOMServerRenderer; + })(); + + /** + * Render a ReactElement to its initial HTML. This should only be used on the + * server. + * See https://reactjs.org/docs/react-dom-server.html#rendertostring + */ + + function renderToString(element) { + var renderer = new ReactDOMServerRenderer(element, false); + + try { + var markup = renderer.read(Infinity); + return markup; + } finally { + renderer.destroy(); + } + } + /** + * Similar to renderToString, except this doesn't create extra DOM attributes + * such as data-react-id that React uses internally. + * See https://reactjs.org/docs/react-dom-server.html#rendertostaticmarkup + */ + + function renderToStaticMarkup(element) { + var renderer = new ReactDOMServerRenderer(element, true); + + try { + var markup = renderer.read(Infinity); + return markup; + } finally { + renderer.destroy(); + } + } + + function renderToNodeStream() { + { + { + throw Error( + 'ReactDOMServer.renderToNodeStream(): The streaming API is not available in the browser. Use ReactDOMServer.renderToString() instead.', + ); + } + } + } + + function renderToStaticNodeStream() { + { + { + throw Error( + 'ReactDOMServer.renderToStaticNodeStream(): The streaming API is not available in the browser. Use ReactDOMServer.renderToStaticMarkup() instead.', + ); + } + } + } // Note: when changing this, also consider https://github.com/facebook/react/issues/11526 + + var ReactDOMServerBrowser = { + renderToString: renderToString, + renderToStaticMarkup: renderToStaticMarkup, + renderToNodeStream: renderToNodeStream, + renderToStaticNodeStream: renderToStaticNodeStream, + version: ReactVersion, + }; + + var ReactDOMServerBrowser$1 = Object.freeze({ + default: ReactDOMServerBrowser, + }); + + var ReactDOMServer = (ReactDOMServerBrowser$1 && ReactDOMServerBrowser) || ReactDOMServerBrowser$1; + + // TODO: decide on the top-level export form. + // This is hacky but makes it work with both Rollup and Jest + + var server_browser = ReactDOMServer.default || ReactDOMServer; + + module.exports = server_browser; + })(); + } + + /***/ + }, + /* 519 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(144); + __webpack_require__(520); + module.exports = __webpack_require__(13).Array.from; + + /***/ + }, + /* 520 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var ctx = __webpack_require__(69); + var $export = __webpack_require__(36); + var toObject = __webpack_require__(70); + var call = __webpack_require__(222); + var isArrayIter = __webpack_require__(223); + var toLength = __webpack_require__(103); + var createProperty = __webpack_require__(521); + var getIterFn = __webpack_require__(224); + + $export( + $export.S + + $export.F * + !__webpack_require__(522)(function (iter) { + Array.from(iter); + }), + 'Array', + { + // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined) + from: function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) { + var O = toObject(arrayLike); + var C = typeof this == 'function' ? this : Array; + var aLen = arguments.length; + var mapfn = aLen > 1 ? arguments[1] : undefined; + var mapping = mapfn !== undefined; + var index = 0; + var iterFn = getIterFn(O); + var length, result, step, iterator; + if (mapping) mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2); + // if object isn't iterable or it's array with default iterator - use simple case + if (iterFn != undefined && !(C == Array && isArrayIter(iterFn))) { + for (iterator = iterFn.call(O), result = new C(); !(step = iterator.next()).done; index++) { + createProperty( + result, + index, + mapping ? call(iterator, mapfn, [step.value, index], true) : step.value, + ); + } + } else { + length = toLength(O.length); + for (result = new C(length); length > index; index++) { + createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]); + } + } + result.length = index; + return result; + }, + }, + ); + + /***/ + }, + /* 521 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var $defineProperty = __webpack_require__(30); + var createDesc = __webpack_require__(79); + + module.exports = function (object, index, value) { + if (index in object) $defineProperty.f(object, index, createDesc(0, value)); + else object[index] = value; + }; + + /***/ + }, + /* 522 */ + /***/ function (module, exports, __webpack_require__) { + var ITERATOR = __webpack_require__(22)('iterator'); + var SAFE_CLOSING = false; + + try { + var riter = [7][ITERATOR](); + riter['return'] = function () { + SAFE_CLOSING = true; + }; + // eslint-disable-next-line no-throw-literal + Array.from(riter, function () { + throw 2; + }); + } catch (e) { + /* empty */ + } + + module.exports = function (exec, skipClosing) { + if (!skipClosing && !SAFE_CLOSING) return false; + var safe = false; + try { + var arr = [7]; + var iter = arr[ITERATOR](); + iter.next = function () { + return { done: (safe = true) }; + }; + arr[ITERATOR] = function () { + return iter; + }; + exec(arr); + } catch (e) { + /* empty */ + } + return safe; + }; + + /***/ + }, + /* 523 */ + /***/ function (module, exports, __webpack_require__) { + __webpack_require__(156); + __webpack_require__(144); + __webpack_require__(152); + __webpack_require__(524); + __webpack_require__(527); + __webpack_require__(530); + __webpack_require__(531); + module.exports = __webpack_require__(13).Map; + + /***/ + }, + /* 524 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var strong = __webpack_require__(525); + var validate = __webpack_require__(84); + var MAP = 'Map'; + + // 23.1 Map Objects + module.exports = __webpack_require__(226)( + MAP, + function (get) { + return function Map() { + return get(this, arguments.length > 0 ? arguments[0] : undefined); + }; + }, + { + // 23.1.3.6 Map.prototype.get(key) + get: function get(key) { + var entry = strong.getEntry(validate(this, MAP), key); + return entry && entry.v; + }, + // 23.1.3.9 Map.prototype.set(key, value) + set: function set(key, value) { + return strong.def(validate(this, MAP), key === 0 ? 0 : key, value); + }, + }, + strong, + true, + ); + + /***/ + }, + /* 525 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var dP = __webpack_require__(30).f; + var create = __webpack_require__(148); + var redefineAll = __webpack_require__(158); + var ctx = __webpack_require__(69); + var anInstance = __webpack_require__(159); + var forOf = __webpack_require__(83); + var $iterDefine = __webpack_require__(146); + var step = __webpack_require__(218); + var setSpecies = __webpack_require__(526); + var DESCRIPTORS = __webpack_require__(28); + var fastKey = __webpack_require__(82).fastKey; + var validate = __webpack_require__(84); + var SIZE = DESCRIPTORS ? '_s' : 'size'; + + var getEntry = function (that, key) { + // fast case + var index = fastKey(key); + var entry; + if (index !== 'F') return that._i[index]; + // frozen object case + for (entry = that._f; entry; entry = entry.n) { + if (entry.k == key) return entry; + } + }; + + module.exports = { + getConstructor: function (wrapper, NAME, IS_MAP, ADDER) { + var C = wrapper(function (that, iterable) { + anInstance(that, C, NAME, '_i'); + that._t = NAME; // collection type + that._i = create(null); // index + that._f = undefined; // first entry + that._l = undefined; // last entry + that[SIZE] = 0; // size + if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that); + }); + redefineAll(C.prototype, { + // 23.1.3.1 Map.prototype.clear() + // 23.2.3.2 Set.prototype.clear() + clear: function clear() { + for (var that = validate(this, NAME), data = that._i, entry = that._f; entry; entry = entry.n) { + entry.r = true; + if (entry.p) entry.p = entry.p.n = undefined; + delete data[entry.i]; + } + that._f = that._l = undefined; + that[SIZE] = 0; + }, + // 23.1.3.3 Map.prototype.delete(key) + // 23.2.3.4 Set.prototype.delete(value) + delete: function (key) { + var that = validate(this, NAME); + var entry = getEntry(that, key); + if (entry) { + var next = entry.n; + var prev = entry.p; + delete that._i[entry.i]; + entry.r = true; + if (prev) prev.n = next; + if (next) next.p = prev; + if (that._f == entry) that._f = next; + if (that._l == entry) that._l = prev; + that[SIZE]--; + } + return !!entry; + }, + // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined) + // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined) + forEach: function forEach(callbackfn /* , that = undefined */) { + validate(this, NAME); + var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3); + var entry; + while ((entry = entry ? entry.n : this._f)) { + f(entry.v, entry.k, this); + // revert to the last existing entry + while (entry && entry.r) entry = entry.p; + } + }, + // 23.1.3.7 Map.prototype.has(key) + // 23.2.3.7 Set.prototype.has(value) + has: function has(key) { + return !!getEntry(validate(this, NAME), key); + }, + }); + if (DESCRIPTORS) + dP(C.prototype, 'size', { + get: function () { + return validate(this, NAME)[SIZE]; + }, + }); + return C; + }, + def: function (that, key, value) { + var entry = getEntry(that, key); + var prev, index; + // change existing entry + if (entry) { + entry.v = value; + // create new entry + } else { + that._l = entry = { + i: (index = fastKey(key, true)), // <- index + k: key, // <- key + v: value, // <- value + p: (prev = that._l), // <- previous entry + n: undefined, // <- next entry + r: false, // <- removed + }; + if (!that._f) that._f = entry; + if (prev) prev.n = entry; + that[SIZE]++; + // add to index + if (index !== 'F') that._i[index] = entry; + } + return that; + }, + getEntry: getEntry, + setStrong: function (C, NAME, IS_MAP) { + // add .keys, .values, .entries, [@@iterator] + // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11 + $iterDefine( + C, + NAME, + function (iterated, kind) { + this._t = validate(iterated, NAME); // target + this._k = kind; // kind + this._l = undefined; // previous + }, + function () { + var that = this; + var kind = that._k; + var entry = that._l; + // revert to the last existing entry + while (entry && entry.r) entry = entry.p; + // get next entry + if (!that._t || !(that._l = entry = entry ? entry.n : that._t._f)) { + // or finish the iteration + that._t = undefined; + return step(1); + } + // return step by kind + if (kind == 'keys') return step(0, entry.k); + if (kind == 'values') return step(0, entry.v); + return step(0, [entry.k, entry.v]); + }, + IS_MAP ? 'entries' : 'values', + !IS_MAP, + true, + ); + + // add [@@species], 23.1.2.2, 23.2.2.2 + setSpecies(NAME); + }, + }; + + /***/ + }, + /* 526 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var global = __webpack_require__(29); + var core = __webpack_require__(13); + var dP = __webpack_require__(30); + var DESCRIPTORS = __webpack_require__(28); + var SPECIES = __webpack_require__(22)('species'); + + module.exports = function (KEY) { + var C = typeof core[KEY] == 'function' ? core[KEY] : global[KEY]; + if (DESCRIPTORS && C && !C[SPECIES]) + dP.f(C, SPECIES, { + configurable: true, + get: function () { + return this; + }, + }); + }; + + /***/ + }, + /* 527 */ + /***/ function (module, exports, __webpack_require__) { + // https://github.com/DavidBruant/Map-Set.prototype.toJSON + var $export = __webpack_require__(36); + + $export($export.P + $export.R, 'Map', { toJSON: __webpack_require__(528)('Map') }); + + /***/ + }, + /* 528 */ + /***/ function (module, exports, __webpack_require__) { + // https://github.com/DavidBruant/Map-Set.prototype.toJSON + var classof = __webpack_require__(225); + var from = __webpack_require__(529); + module.exports = function (NAME) { + return function toJSON() { + if (classof(this) != NAME) throw TypeError(NAME + "#toJSON isn't generic"); + return from(this); + }; + }; + + /***/ + }, + /* 529 */ + /***/ function (module, exports, __webpack_require__) { + var forOf = __webpack_require__(83); + + module.exports = function (iter, ITERATOR) { + var result = []; + forOf(iter, false, result.push, result, ITERATOR); + return result; + }; + + /***/ + }, + /* 530 */ + /***/ function (module, exports, __webpack_require__) { + // https://tc39.github.io/proposal-setmap-offrom/#sec-map.of + __webpack_require__(227)('Map'); + + /***/ + }, + /* 531 */ + /***/ function (module, exports, __webpack_require__) { + // https://tc39.github.io/proposal-setmap-offrom/#sec-map.from + __webpack_require__(228)('Map'); + + /***/ + }, + /* 532 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.default = generatorFunction; + + // See discussion: + // https://discuss.reactjs.org/t/how-to-determine-if-js-object-is-react-component/2825/2 + + /** + * Used to determine we'll call be calling React.createElement on the component of if this is a + * generator function used return a function that takes props to return a React element + * @param component + * @returns {boolean} + */ + function generatorFunction(component) { + if (!component.prototype) { + return false; + } // es5 or es6 React Component + + return !component.prototype.isReactComponent; + } + + /***/ + }, + /* 533 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var _interopRequireDefault = __webpack_require__(41); + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.default = void 0; + + var _from = _interopRequireDefault(__webpack_require__(235)); + + var _keys = _interopRequireDefault(__webpack_require__(160)); + + var _map = _interopRequireDefault(__webpack_require__(236)); + + // key = name used by react_on_rails to identify the store + // value = redux store creator, which is a function that takes props and returns a store + var registeredStoreGenerators = new _map.default(); + var hydratedStores = new _map.default(); + var _default = { + /** + * Register a store generator, a function that takes props and returns a store. + * @param storeGenerators { name1: storeGenerator1, name2: storeGenerator2 } + */ + register: function register(storeGenerators) { + (0, _keys.default)(storeGenerators).forEach(function (name) { + if (registeredStoreGenerators.has(name)) { + console.warn('Called registerStore for store that is already registered', name); + } + + var store = storeGenerators[name]; + + if (!store) { + throw new Error( + 'Called ReactOnRails.registerStores with a null or undefined as a value ' + + 'for the store generator with key '.concat(name, '.'), + ); + } + + registeredStoreGenerators.set(name, store); + }); + }, + + /** + * Used by components to get the hydrated store which contains props. + * @param name + * @param throwIfMissing Defaults to true. Set to false to have this call return undefined if + * there is no store with the given name. + * @returns Redux Store, possibly hydrated + */ + getStore: function getStore(name) { + var throwIfMissing = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + + if (hydratedStores.has(name)) { + return hydratedStores.get(name); + } + + var storeKeys = (0, _from.default)(hydratedStores.keys()).join(', '); + + if (storeKeys.length === 0) { + var msg = 'There are no stores hydrated and you are requesting the store '.concat( + name, + ".\nThis can happen if you are server rendering and either:\n1. You do not call redux_store near the top of your controller action's view (not the layout)\n and before any call to react_component.\n2. You do not render redux_store_hydration_data anywhere on your page.", + ); + throw new Error(msg); + } + + if (throwIfMissing) { + console.log('storeKeys', storeKeys); + throw new Error( + "Could not find hydrated store with name '".concat(name, "'. ") + + 'Hydrated store names include ['.concat(storeKeys, '].'), + ); + } + + return undefined; + }, + + /** + * Internally used function to get the store creator that was passed to `register`. + * @param name + * @returns storeCreator with given name + */ + getStoreGenerator: function getStoreGenerator(name) { + if (registeredStoreGenerators.has(name)) { + return registeredStoreGenerators.get(name); + } + + var storeKeys = (0, _from.default)(registeredStoreGenerators.keys()).join(', '); + throw new Error( + "Could not find store registered with name '".concat(name, "'. Registered store ") + + 'names include [ '.concat(storeKeys, ' ]. Maybe you forgot to register the store?'), + ); + }, + + /** + * Internally used function to set the hydrated store after a Rails page is loaded. + * @param name + * @param store (not the storeGenerator, but the hydrated store) + */ + setStore: function setStore(name, store) { + hydratedStores.set(name, store); + }, + + /** + * Internally used function to completely clear hydratedStores Map. + */ + clearHydratedStores: function clearHydratedStores() { + hydratedStores.clear(); + }, + + /** + * Get a Map containing all registered store generators. Useful for debugging. + * @returns Map where key is the component name and values are the store generators. + */ + storeGenerators: function storeGenerators() { + return registeredStoreGenerators; + }, + + /** + * Get a Map containing all hydrated stores. Useful for debugging. + * @returns Map where key is the component name and values are the hydrated stores. + */ + stores: function stores() { + return hydratedStores; + }, + }; + exports.default = _default; + + /***/ + }, + /* 534 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var _interopRequireDefault = __webpack_require__(41); + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.default = serverRenderReactComponent; + + var _stringify = _interopRequireDefault(__webpack_require__(106)); + + var _server = _interopRequireDefault(__webpack_require__(108)); + + var _ComponentRegistry = _interopRequireDefault(__webpack_require__(234)); + + var _createReactElement = _interopRequireDefault(__webpack_require__(161)); + + var _isCreateReactElementResultNonReactComponent = _interopRequireDefault(__webpack_require__(232)); + + var _buildConsoleReplay = _interopRequireDefault(__webpack_require__(237)); + + var _handleError = _interopRequireDefault(__webpack_require__(233)); + + function serverRenderReactComponent(options) { + var name = options.name, + domNodeId = options.domNodeId, + trace = options.trace, + props = options.props, + railsContext = options.railsContext; + var htmlResult = ''; + var hasErrors = false; + + try { + var componentObj = _ComponentRegistry.default.get(name); + + if (componentObj.isRenderer) { + throw new Error( + "Detected a renderer while server rendering component '".concat( + name, + "'. See https://github.com/shakacode/react_on_rails#renderer-functions", + ), + ); + } + + var reactElementOrRouterResult = (0, _createReactElement.default)({ + componentObj: componentObj, + domNodeId: domNodeId, + trace: trace, + props: props, + railsContext: railsContext, + }); + + if ((0, _isCreateReactElementResultNonReactComponent.default)(reactElementOrRouterResult)) { + // We let the client side handle any redirect + // Set hasErrors in case we want to throw a Rails exception + hasErrors = !!reactElementOrRouterResult.routeError; + + if (hasErrors) { + console.error( + 'React Router ERROR: '.concat((0, _stringify.default)(reactElementOrRouterResult.routeError)), + ); + } + + if (reactElementOrRouterResult.redirectLocation) { + if (trace) { + var redirectLocation = reactElementOrRouterResult.redirectLocation; + var redirectPath = redirectLocation.pathname + redirectLocation.search; + console.log( + 'ROUTER REDIRECT: ' + .concat(name, ' to dom node with id: ') + .concat(domNodeId, ', redirect to ') + .concat(redirectPath), + ); + } // For redirects on server rendering, we can't stop Rails from returning the same result. + // Possibly, someday, we could have the rails server redirect. + } else { + htmlResult = reactElementOrRouterResult.renderedHtml; + } + } else { + htmlResult = _server.default.renderToString(reactElementOrRouterResult); + } + } catch (e) { + hasErrors = true; + htmlResult = (0, _handleError.default)({ + e: e, + name: name, + serverSide: true, + }); + } + + var consoleReplayScript = (0, _buildConsoleReplay.default)(); + return (0, _stringify.default)({ + html: htmlResult, + consoleReplayScript: consoleReplayScript, + hasErrors: hasErrors, + }); + } + + /***/ + }, + /* 535 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.default = void 0; + var _default = { + wrapInScriptTags: function wrapInScriptTags(scriptId, scriptBody) { + if (!scriptBody) { + return ''; + } + + return '\n<script id="'.concat(scriptId, '">\n').concat(scriptBody, '\n</script>'); + }, + }; + exports.default = _default; + + /***/ + }, + /* 536 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.default = void 0; + + var _default = function _default(val) { + // Replace closing + var re = /<\/\W*script/gi; + return val.replace(re, '(/script'); + }; + + exports.default = _default; + + /***/ + }, + /* 537 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var _interopRequireDefault = __webpack_require__(41); + + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.default = void 0; + + var _assign = _interopRequireDefault(__webpack_require__(229)); + + var _default = { + authenticityToken: function authenticityToken() { + var token = document.querySelector('meta[name="csrf-token"]'); + + if (token && token instanceof window.HTMLMetaElement) { + return token.content; + } + + return null; + }, + authenticityHeaders: function authenticityHeaders() { + var otherHeaders = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + return (0, _assign.default)(otherHeaders, { + 'X-CSRF-Token': this.authenticityToken(), + 'X-Requested-With': 'XMLHttpRequest', + }); + }, + }; + exports.default = _default; + + /***/ + }, + /* 538 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (global) { + Object.defineProperty(exports, '__esModule', { + value: true, + }); + exports.default = context; + + /** + * Get the context, be it window or global + * @returns {boolean|Window|*|context} + */ + function context() { + return ( + (typeof window !== 'undefined' && window) || (typeof global !== 'undefined' && global) || this + ); + } + /* WEBPACK VAR INJECTION */ + }).call(exports, __webpack_require__(38)); + + /***/ + }, + /* 539 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + // Super simple example without using React. + // This shows you can server side render any JS code. + + var HelloString = { + world: function world() { + return 'Hello WORLD! Will this work?? YES! Time to visit Maui'; + }, + }; + + var _default = HelloString; + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + HelloString, + 'HelloString', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/non_react/HelloString.js', + ); + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/non_react/HelloString.js', + ); + })(); + + /***/ + }, + /* 540 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** @license React v16.12.0 + * react-is.development.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + + if (true) { + (function () { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { value: true }); + + // The Symbol used to tag the ReactElement-like types. If there is no native Symbol + // nor polyfill, then a plain number is used for performance. + var hasSymbol = typeof Symbol === 'function' && Symbol.for; + var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7; + var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca; + var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb; + var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc; + var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2; + var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd; + var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary + // (unstable) APIs that have been removed. Can we remove the symbols? + + var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf; + var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf; + var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0; + var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1; + var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8; + var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3; + var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4; + var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5; + var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6; + var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7; + + function isValidElementType(type) { + return ( + typeof type === 'string' || + typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill. + type === REACT_FRAGMENT_TYPE || + type === REACT_CONCURRENT_MODE_TYPE || + type === REACT_PROFILER_TYPE || + type === REACT_STRICT_MODE_TYPE || + type === REACT_SUSPENSE_TYPE || + type === REACT_SUSPENSE_LIST_TYPE || + (typeof type === 'object' && + type !== null && + (type.$$typeof === REACT_LAZY_TYPE || + type.$$typeof === REACT_MEMO_TYPE || + type.$$typeof === REACT_PROVIDER_TYPE || + type.$$typeof === REACT_CONTEXT_TYPE || + type.$$typeof === REACT_FORWARD_REF_TYPE || + type.$$typeof === REACT_FUNDAMENTAL_TYPE || + type.$$typeof === REACT_RESPONDER_TYPE || + type.$$typeof === REACT_SCOPE_TYPE)) + ); + } + + /** + * Forked from fbjs/warning: + * https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js + * + * Only change is we use console.warn instead of console.error, + * and do nothing when 'console' is not supported. + * This really simplifies the code. + * --- + * Similar to invariant but only logs a warning if the condition is not met. + * This can be used to log issues in development environments in critical + * paths. Removing the logging code for production environments will keep the + * same logic and follow the same code paths. + */ + var lowPriorityWarningWithoutStack = function () {}; + + { + var printWarning = function (format) { + for ( + var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; + _key < _len; + _key++ + ) { + args[_key - 1] = arguments[_key]; + } + + var argIndex = 0; + var message = + 'Warning: ' + + format.replace(/%s/g, function () { + return args[argIndex++]; + }); + + if (typeof console !== 'undefined') { + console.warn(message); + } + + try { + // --- Welcome to debugging React --- + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + throw new Error(message); + } catch (x) {} + }; + + lowPriorityWarningWithoutStack = function (condition, format) { + if (format === undefined) { + throw new Error( + '`lowPriorityWarningWithoutStack(condition, format, ...args)` requires a warning ' + + 'message argument', + ); + } + + if (!condition) { + for ( + var _len2 = arguments.length, args = new Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; + _key2 < _len2; + _key2++ + ) { + args[_key2 - 2] = arguments[_key2]; + } + + printWarning.apply(void 0, [format].concat(args)); + } + }; + } + + var lowPriorityWarningWithoutStack$1 = lowPriorityWarningWithoutStack; + + function typeOf(object) { + if (typeof object === 'object' && object !== null) { + var $$typeof = object.$$typeof; + + switch ($$typeof) { + case REACT_ELEMENT_TYPE: + var type = object.type; + + switch (type) { + case REACT_ASYNC_MODE_TYPE: + case REACT_CONCURRENT_MODE_TYPE: + case REACT_FRAGMENT_TYPE: + case REACT_PROFILER_TYPE: + case REACT_STRICT_MODE_TYPE: + case REACT_SUSPENSE_TYPE: + return type; + + default: + var $$typeofType = type && type.$$typeof; + + switch ($$typeofType) { + case REACT_CONTEXT_TYPE: + case REACT_FORWARD_REF_TYPE: + case REACT_LAZY_TYPE: + case REACT_MEMO_TYPE: + case REACT_PROVIDER_TYPE: + return $$typeofType; + + default: + return $$typeof; + } + } + + case REACT_PORTAL_TYPE: + return $$typeof; + } + } + + return undefined; + } // AsyncMode is deprecated along with isAsyncMode + + var AsyncMode = REACT_ASYNC_MODE_TYPE; + var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE; + var ContextConsumer = REACT_CONTEXT_TYPE; + var ContextProvider = REACT_PROVIDER_TYPE; + var Element = REACT_ELEMENT_TYPE; + var ForwardRef = REACT_FORWARD_REF_TYPE; + var Fragment = REACT_FRAGMENT_TYPE; + var Lazy = REACT_LAZY_TYPE; + var Memo = REACT_MEMO_TYPE; + var Portal = REACT_PORTAL_TYPE; + var Profiler = REACT_PROFILER_TYPE; + var StrictMode = REACT_STRICT_MODE_TYPE; + var Suspense = REACT_SUSPENSE_TYPE; + var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated + + function isAsyncMode(object) { + { + if (!hasWarnedAboutDeprecatedIsAsyncMode) { + hasWarnedAboutDeprecatedIsAsyncMode = true; + lowPriorityWarningWithoutStack$1( + false, + 'The ReactIs.isAsyncMode() alias has been deprecated, ' + + 'and will be removed in React 17+. Update your code to use ' + + 'ReactIs.isConcurrentMode() instead. It has the exact same API.', + ); + } + } + + return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE; + } + function isConcurrentMode(object) { + return typeOf(object) === REACT_CONCURRENT_MODE_TYPE; + } + function isContextConsumer(object) { + return typeOf(object) === REACT_CONTEXT_TYPE; + } + function isContextProvider(object) { + return typeOf(object) === REACT_PROVIDER_TYPE; + } + function isElement(object) { + return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; + } + function isForwardRef(object) { + return typeOf(object) === REACT_FORWARD_REF_TYPE; + } + function isFragment(object) { + return typeOf(object) === REACT_FRAGMENT_TYPE; + } + function isLazy(object) { + return typeOf(object) === REACT_LAZY_TYPE; + } + function isMemo(object) { + return typeOf(object) === REACT_MEMO_TYPE; + } + function isPortal(object) { + return typeOf(object) === REACT_PORTAL_TYPE; + } + function isProfiler(object) { + return typeOf(object) === REACT_PROFILER_TYPE; + } + function isStrictMode(object) { + return typeOf(object) === REACT_STRICT_MODE_TYPE; + } + function isSuspense(object) { + return typeOf(object) === REACT_SUSPENSE_TYPE; + } + + exports.typeOf = typeOf; + exports.AsyncMode = AsyncMode; + exports.ConcurrentMode = ConcurrentMode; + exports.ContextConsumer = ContextConsumer; + exports.ContextProvider = ContextProvider; + exports.Element = Element; + exports.ForwardRef = ForwardRef; + exports.Fragment = Fragment; + exports.Lazy = Lazy; + exports.Memo = Memo; + exports.Portal = Portal; + exports.Profiler = Profiler; + exports.StrictMode = StrictMode; + exports.Suspense = Suspense; + exports.isValidElementType = isValidElementType; + exports.isAsyncMode = isAsyncMode; + exports.isConcurrentMode = isConcurrentMode; + exports.isContextConsumer = isContextConsumer; + exports.isContextProvider = isContextProvider; + exports.isElement = isElement; + exports.isForwardRef = isForwardRef; + exports.isFragment = isFragment; + exports.isLazy = isLazy; + exports.isMemo = isMemo; + exports.isPortal = isPortal; + exports.isProfiler = isProfiler; + exports.isStrictMode = isStrictMode; + exports.isSuspense = isSuspense; + })(); + } + + /***/ + }, + /* 541 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + + var ReactIs = __webpack_require__(109); + var assign = __webpack_require__(64); + + var ReactPropTypesSecret = __webpack_require__(231); + var checkPropTypes = __webpack_require__(107); + + var has = Function.call.bind(Object.prototype.hasOwnProperty); + var printWarning = function () {}; + + if (true) { + printWarning = function (text) { + var message = 'Warning: ' + text; + if (typeof console !== 'undefined') { + console.error(message); + } + try { + // --- Welcome to debugging React --- + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + throw new Error(message); + } catch (x) {} + }; + } + + function emptyFunctionThatReturnsNull() { + return null; + } + + module.exports = function (isValidElement, throwOnDirectAccess) { + /* global Symbol */ + var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; + var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec. + + /** + * Returns the iterator method function contained on the iterable object. + * + * Be sure to invoke the function with the iterable as context: + * + * var iteratorFn = getIteratorFn(myIterable); + * if (iteratorFn) { + * var iterator = iteratorFn.call(myIterable); + * ... + * } + * + * @param {?object} maybeIterable + * @return {?function} + */ + function getIteratorFn(maybeIterable) { + var iteratorFn = + maybeIterable && + ((ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL]) || maybeIterable[FAUX_ITERATOR_SYMBOL]); + if (typeof iteratorFn === 'function') { + return iteratorFn; + } + } + + /** + * Collection of methods that allow declaration and validation of props that are + * supplied to React components. Example usage: + * + * var Props = require('ReactPropTypes'); + * var MyArticle = React.createClass({ + * propTypes: { + * // An optional string prop named "description". + * description: Props.string, + * + * // A required enum prop named "category". + * category: Props.oneOf(['News','Photos']).isRequired, + * + * // A prop named "dialog" that requires an instance of Dialog. + * dialog: Props.instanceOf(Dialog).isRequired + * }, + * render: function() { ... } + * }); + * + * A more formal specification of how these methods are used: + * + * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...) + * decl := ReactPropTypes.{type}(.isRequired)? + * + * Each and every declaration produces a function with the same signature. This + * allows the creation of custom validation functions. For example: + * + * var MyLink = React.createClass({ + * propTypes: { + * // An optional string or URI prop named "href". + * href: function(props, propName, componentName) { + * var propValue = props[propName]; + * if (propValue != null && typeof propValue !== 'string' && + * !(propValue instanceof URI)) { + * return new Error( + * 'Expected a string or an URI for ' + propName + ' in ' + + * componentName + * ); + * } + * } + * }, + * render: function() {...} + * }); + * + * @internal + */ + + var ANONYMOUS = '<<anonymous>>'; + + // Important! + // Keep this list in sync with production version in `./factoryWithThrowingShims.js`. + var ReactPropTypes = { + array: createPrimitiveTypeChecker('array'), + bool: createPrimitiveTypeChecker('boolean'), + func: createPrimitiveTypeChecker('function'), + number: createPrimitiveTypeChecker('number'), + object: createPrimitiveTypeChecker('object'), + string: createPrimitiveTypeChecker('string'), + symbol: createPrimitiveTypeChecker('symbol'), + + any: createAnyTypeChecker(), + arrayOf: createArrayOfTypeChecker, + element: createElementTypeChecker(), + elementType: createElementTypeTypeChecker(), + instanceOf: createInstanceTypeChecker, + node: createNodeChecker(), + objectOf: createObjectOfTypeChecker, + oneOf: createEnumTypeChecker, + oneOfType: createUnionTypeChecker, + shape: createShapeTypeChecker, + exact: createStrictShapeTypeChecker, + }; + + /** + * inlined Object.is polyfill to avoid requiring consumers ship their own + * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is + */ + /*eslint-disable no-self-compare*/ + function is(x, y) { + // SameValue algorithm + if (x === y) { + // Steps 1-5, 7-10 + // Steps 6.b-6.e: +0 != -0 + return x !== 0 || 1 / x === 1 / y; + } else { + // Step 6.a: NaN == NaN + return x !== x && y !== y; + } + } + /*eslint-enable no-self-compare*/ + + /** + * We use an Error-like object for backward compatibility as people may call + * PropTypes directly and inspect their output. However, we don't use real + * Errors anymore. We don't inspect their stack anyway, and creating them + * is prohibitively expensive if they are created too often, such as what + * happens in oneOfType() for any type before the one that matched. + */ + function PropTypeError(message) { + this.message = message; + this.stack = ''; + } + // Make `instanceof Error` still work for returned errors. + PropTypeError.prototype = Error.prototype; + + function createChainableTypeChecker(validate) { + if (true) { + var manualPropTypeCallCache = {}; + var manualPropTypeWarningCount = 0; + } + function checkType(isRequired, props, propName, componentName, location, propFullName, secret) { + componentName = componentName || ANONYMOUS; + propFullName = propFullName || propName; + + if (secret !== ReactPropTypesSecret) { + if (throwOnDirectAccess) { + // New behavior only for users of `prop-types` package + var err = new Error( + 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' + + 'Use `PropTypes.checkPropTypes()` to call them. ' + + 'Read more at http://fb.me/use-check-prop-types', + ); + err.name = 'Invariant Violation'; + throw err; + } else if ('development' !== 'production' && typeof console !== 'undefined') { + // Old behavior for people using React.PropTypes + var cacheKey = componentName + ':' + propName; + if ( + !manualPropTypeCallCache[cacheKey] && + // Avoid spamming the console because they are often not actionable except for lib authors + manualPropTypeWarningCount < 3 + ) { + printWarning( + 'You are manually calling a React.PropTypes validation ' + + 'function for the `' + + propFullName + + '` prop on `' + + componentName + + '`. This is deprecated ' + + 'and will throw in the standalone `prop-types` package. ' + + 'You may be seeing this warning due to a third-party PropTypes ' + + 'library. See https://fb.me/react-warning-dont-call-proptypes ' + + 'for details.', + ); + manualPropTypeCallCache[cacheKey] = true; + manualPropTypeWarningCount++; + } + } + } + if (props[propName] == null) { + if (isRequired) { + if (props[propName] === null) { + return new PropTypeError( + 'The ' + + location + + ' `' + + propFullName + + '` is marked as required ' + + ('in `' + componentName + '`, but its value is `null`.'), + ); + } + return new PropTypeError( + 'The ' + + location + + ' `' + + propFullName + + '` is marked as required in ' + + ('`' + componentName + '`, but its value is `undefined`.'), + ); + } + return null; + } else { + return validate(props, propName, componentName, location, propFullName); + } + } + + var chainedCheckType = checkType.bind(null, false); + chainedCheckType.isRequired = checkType.bind(null, true); + + return chainedCheckType; + } + + function createPrimitiveTypeChecker(expectedType) { + function validate(props, propName, componentName, location, propFullName, secret) { + var propValue = props[propName]; + var propType = getPropType(propValue); + if (propType !== expectedType) { + // `propValue` being instance of, say, date/regexp, pass the 'object' + // check, but we can offer a more precise error message here rather than + // 'of type `object`'. + var preciseType = getPreciseType(propValue); + + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` of type ' + + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + + ('`' + expectedType + '`.'), + ); + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createAnyTypeChecker() { + return createChainableTypeChecker(emptyFunctionThatReturnsNull); + } + + function createArrayOfTypeChecker(typeChecker) { + function validate(props, propName, componentName, location, propFullName) { + if (typeof typeChecker !== 'function') { + return new PropTypeError( + 'Property `' + + propFullName + + '` of component `' + + componentName + + '` has invalid PropType notation inside arrayOf.', + ); + } + var propValue = props[propName]; + if (!Array.isArray(propValue)) { + var propType = getPropType(propValue); + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` of type ' + + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'), + ); + } + for (var i = 0; i < propValue.length; i++) { + var error = typeChecker( + propValue, + i, + componentName, + location, + propFullName + '[' + i + ']', + ReactPropTypesSecret, + ); + if (error instanceof Error) { + return error; + } + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createElementTypeChecker() { + function validate(props, propName, componentName, location, propFullName) { + var propValue = props[propName]; + if (!isValidElement(propValue)) { + var propType = getPropType(propValue); + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` of type ' + + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'), + ); + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createElementTypeTypeChecker() { + function validate(props, propName, componentName, location, propFullName) { + var propValue = props[propName]; + if (!ReactIs.isValidElementType(propValue)) { + var propType = getPropType(propValue); + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` of type ' + + ('`' + + propType + + '` supplied to `' + + componentName + + '`, expected a single ReactElement type.'), + ); + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createInstanceTypeChecker(expectedClass) { + function validate(props, propName, componentName, location, propFullName) { + if (!(props[propName] instanceof expectedClass)) { + var expectedClassName = expectedClass.name || ANONYMOUS; + var actualClassName = getClassName(props[propName]); + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` of type ' + + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + + ('instance of `' + expectedClassName + '`.'), + ); + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createEnumTypeChecker(expectedValues) { + if (!Array.isArray(expectedValues)) { + if (true) { + if (arguments.length > 1) { + printWarning( + 'Invalid arguments supplied to oneOf, expected an array, got ' + + arguments.length + + ' arguments. ' + + 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).', + ); + } else { + printWarning('Invalid argument supplied to oneOf, expected an array.'); + } + } + return emptyFunctionThatReturnsNull; + } + + function validate(props, propName, componentName, location, propFullName) { + var propValue = props[propName]; + for (var i = 0; i < expectedValues.length; i++) { + if (is(propValue, expectedValues[i])) { + return null; + } + } + + var valuesString = JSON.stringify(expectedValues, function replacer(key, value) { + var type = getPreciseType(value); + if (type === 'symbol') { + return String(value); + } + return value; + }); + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` of value `' + + String(propValue) + + '` ' + + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'), + ); + } + return createChainableTypeChecker(validate); + } + + function createObjectOfTypeChecker(typeChecker) { + function validate(props, propName, componentName, location, propFullName) { + if (typeof typeChecker !== 'function') { + return new PropTypeError( + 'Property `' + + propFullName + + '` of component `' + + componentName + + '` has invalid PropType notation inside objectOf.', + ); + } + var propValue = props[propName]; + var propType = getPropType(propValue); + if (propType !== 'object') { + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` of type ' + + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'), + ); + } + for (var key in propValue) { + if (has(propValue, key)) { + var error = typeChecker( + propValue, + key, + componentName, + location, + propFullName + '.' + key, + ReactPropTypesSecret, + ); + if (error instanceof Error) { + return error; + } + } + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createUnionTypeChecker(arrayOfTypeCheckers) { + if (!Array.isArray(arrayOfTypeCheckers)) { + true + ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') + : void 0; + return emptyFunctionThatReturnsNull; + } + + for (var i = 0; i < arrayOfTypeCheckers.length; i++) { + var checker = arrayOfTypeCheckers[i]; + if (typeof checker !== 'function') { + printWarning( + 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' + + 'received ' + + getPostfixForTypeWarning(checker) + + ' at index ' + + i + + '.', + ); + return emptyFunctionThatReturnsNull; + } + } + + function validate(props, propName, componentName, location, propFullName) { + for (var i = 0; i < arrayOfTypeCheckers.length; i++) { + var checker = arrayOfTypeCheckers[i]; + if ( + checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null + ) { + return null; + } + } + + return new PropTypeError( + 'Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'), + ); + } + return createChainableTypeChecker(validate); + } + + function createNodeChecker() { + function validate(props, propName, componentName, location, propFullName) { + if (!isNode(props[propName])) { + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` supplied to ' + + ('`' + componentName + '`, expected a ReactNode.'), + ); + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createShapeTypeChecker(shapeTypes) { + function validate(props, propName, componentName, location, propFullName) { + var propValue = props[propName]; + var propType = getPropType(propValue); + if (propType !== 'object') { + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` of type `' + + propType + + '` ' + + ('supplied to `' + componentName + '`, expected `object`.'), + ); + } + for (var key in shapeTypes) { + var checker = shapeTypes[key]; + if (!checker) { + continue; + } + var error = checker( + propValue, + key, + componentName, + location, + propFullName + '.' + key, + ReactPropTypesSecret, + ); + if (error) { + return error; + } + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createStrictShapeTypeChecker(shapeTypes) { + function validate(props, propName, componentName, location, propFullName) { + var propValue = props[propName]; + var propType = getPropType(propValue); + if (propType !== 'object') { + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` of type `' + + propType + + '` ' + + ('supplied to `' + componentName + '`, expected `object`.'), + ); + } + // We need to check all keys in case some are required but missing from + // props. + var allKeys = assign({}, props[propName], shapeTypes); + for (var key in allKeys) { + var checker = shapeTypes[key]; + if (!checker) { + return new PropTypeError( + 'Invalid ' + + location + + ' `' + + propFullName + + '` key `' + + key + + '` supplied to `' + + componentName + + '`.' + + '\nBad object: ' + + JSON.stringify(props[propName], null, ' ') + + '\nValid keys: ' + + JSON.stringify(Object.keys(shapeTypes), null, ' '), + ); + } + var error = checker( + propValue, + key, + componentName, + location, + propFullName + '.' + key, + ReactPropTypesSecret, + ); + if (error) { + return error; + } + } + return null; + } + + return createChainableTypeChecker(validate); + } + + function isNode(propValue) { + switch (typeof propValue) { + case 'number': + case 'string': + case 'undefined': + return true; + case 'boolean': + return !propValue; + case 'object': + if (Array.isArray(propValue)) { + return propValue.every(isNode); + } + if (propValue === null || isValidElement(propValue)) { + return true; + } + + var iteratorFn = getIteratorFn(propValue); + if (iteratorFn) { + var iterator = iteratorFn.call(propValue); + var step; + if (iteratorFn !== propValue.entries) { + while (!(step = iterator.next()).done) { + if (!isNode(step.value)) { + return false; + } + } + } else { + // Iterator will provide entry [k,v] tuples rather than values. + while (!(step = iterator.next()).done) { + var entry = step.value; + if (entry) { + if (!isNode(entry[1])) { + return false; + } + } + } + } + } else { + return false; + } + + return true; + default: + return false; + } + } + + function isSymbol(propType, propValue) { + // Native Symbol. + if (propType === 'symbol') { + return true; + } + + // falsy value can't be a Symbol + if (!propValue) { + return false; + } + + // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol' + if (propValue['@@toStringTag'] === 'Symbol') { + return true; + } + + // Fallback for non-spec compliant Symbols which are polyfilled. + if (typeof Symbol === 'function' && propValue instanceof Symbol) { + return true; + } + + return false; + } + + // Equivalent of `typeof` but with special handling for array and regexp. + function getPropType(propValue) { + var propType = typeof propValue; + if (Array.isArray(propValue)) { + return 'array'; + } + if (propValue instanceof RegExp) { + // Old webkits (at least until Android 4.0) return 'function' rather than + // 'object' for typeof a RegExp. We'll normalize this here so that /bla/ + // passes PropTypes.object. + return 'object'; + } + if (isSymbol(propType, propValue)) { + return 'symbol'; + } + return propType; + } + + // This handles more types than `getPropType`. Only used for error messages. + // See `createPrimitiveTypeChecker`. + function getPreciseType(propValue) { + if (typeof propValue === 'undefined' || propValue === null) { + return '' + propValue; + } + var propType = getPropType(propValue); + if (propType === 'object') { + if (propValue instanceof Date) { + return 'date'; + } else if (propValue instanceof RegExp) { + return 'regexp'; + } + } + return propType; + } + + // Returns a string that is postfixed to a warning about an invalid type. + // For example, "undefined" or "of type array" + function getPostfixForTypeWarning(value) { + var type = getPreciseType(value); + switch (type) { + case 'array': + case 'object': + return 'an ' + type; + case 'boolean': + case 'date': + case 'regexp': + return 'a ' + type; + default: + return type; + } + } + + // Returns class name of the object, if any. + function getClassName(propValue) { + if (!propValue.constructor || !propValue.constructor.name) { + return ANONYMOUS; + } + return propValue.constructor.name; + } + + ReactPropTypes.checkPropTypes = checkPropTypes; + ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache; + ReactPropTypes.PropTypes = ReactPropTypes; + + return ReactPropTypes; + }; + + /***/ + }, + /* 542 */ + /***/ function (module, exports, __webpack_require__) { + /* WEBPACK VAR INJECTION */ (function (global, module) { + var __WEBPACK_AMD_DEFINE_RESULT__; /** + * @license + * Lodash <https://lodash.com/> + * Copyright OpenJS Foundation and other contributors <https://openjsf.org/> + * Released under MIT license <https://lodash.com/license> + * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ + (function () { + /** Used as a safe reference for `undefined` in pre-ES5 environments. */ + var undefined; + + /** Used as the semantic version number. */ + var VERSION = '4.17.15'; + + /** Used as the size to enable large array optimizations. */ + var LARGE_ARRAY_SIZE = 200; + + /** Error message constants. */ + var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.', + FUNC_ERROR_TEXT = 'Expected a function'; + + /** Used to stand-in for `undefined` hash values. */ + var HASH_UNDEFINED = '__lodash_hash_undefined__'; + + /** Used as the maximum memoize cache size. */ + var MAX_MEMOIZE_SIZE = 500; + + /** Used as the internal argument placeholder. */ + var PLACEHOLDER = '__lodash_placeholder__'; + + /** Used to compose bitmasks for cloning. */ + var CLONE_DEEP_FLAG = 1, + CLONE_FLAT_FLAG = 2, + CLONE_SYMBOLS_FLAG = 4; + + /** Used to compose bitmasks for value comparisons. */ + var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; + + /** Used to compose bitmasks for function metadata. */ + var WRAP_BIND_FLAG = 1, + WRAP_BIND_KEY_FLAG = 2, + WRAP_CURRY_BOUND_FLAG = 4, + WRAP_CURRY_FLAG = 8, + WRAP_CURRY_RIGHT_FLAG = 16, + WRAP_PARTIAL_FLAG = 32, + WRAP_PARTIAL_RIGHT_FLAG = 64, + WRAP_ARY_FLAG = 128, + WRAP_REARG_FLAG = 256, + WRAP_FLIP_FLAG = 512; + + /** Used as default options for `_.truncate`. */ + var DEFAULT_TRUNC_LENGTH = 30, + DEFAULT_TRUNC_OMISSION = '...'; + + /** Used to detect hot functions by number of calls within a span of milliseconds. */ + var HOT_COUNT = 800, + HOT_SPAN = 16; + + /** Used to indicate the type of lazy iteratees. */ + var LAZY_FILTER_FLAG = 1, + LAZY_MAP_FLAG = 2, + LAZY_WHILE_FLAG = 3; + + /** Used as references for various `Number` constants. */ + var INFINITY = 1 / 0, + MAX_SAFE_INTEGER = 9007199254740991, + MAX_INTEGER = 1.7976931348623157e308, + NAN = 0 / 0; + + /** Used as references for the maximum length and index of an array. */ + var MAX_ARRAY_LENGTH = 4294967295, + MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1, + HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1; + + /** Used to associate wrap methods with their bit flags. */ + var wrapFlags = [ + ['ary', WRAP_ARY_FLAG], + ['bind', WRAP_BIND_FLAG], + ['bindKey', WRAP_BIND_KEY_FLAG], + ['curry', WRAP_CURRY_FLAG], + ['curryRight', WRAP_CURRY_RIGHT_FLAG], + ['flip', WRAP_FLIP_FLAG], + ['partial', WRAP_PARTIAL_FLAG], + ['partialRight', WRAP_PARTIAL_RIGHT_FLAG], + ['rearg', WRAP_REARG_FLAG], + ]; + + /** `Object#toString` result references. */ + var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + asyncTag = '[object AsyncFunction]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + domExcTag = '[object DOMException]', + errorTag = '[object Error]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + mapTag = '[object Map]', + numberTag = '[object Number]', + nullTag = '[object Null]', + objectTag = '[object Object]', + promiseTag = '[object Promise]', + proxyTag = '[object Proxy]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]', + undefinedTag = '[object Undefined]', + weakMapTag = '[object WeakMap]', + weakSetTag = '[object WeakSet]'; + + var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + + /** Used to match empty string literals in compiled template source. */ + var reEmptyStringLeading = /\b__p \+= '';/g, + reEmptyStringMiddle = /\b(__p \+=) '' \+/g, + reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g; + + /** Used to match HTML entities and HTML characters. */ + var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g, + reUnescapedHtml = /[&<>"']/g, + reHasEscapedHtml = RegExp(reEscapedHtml.source), + reHasUnescapedHtml = RegExp(reUnescapedHtml.source); + + /** Used to match template delimiters. */ + var reEscape = /<%-([\s\S]+?)%>/g, + reEvaluate = /<%([\s\S]+?)%>/g, + reInterpolate = /<%=([\s\S]+?)%>/g; + + /** Used to match property names within property paths. */ + var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, + reIsPlainProp = /^\w*$/, + rePropName = + /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; + + /** + * Used to match `RegExp` + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). + */ + var reRegExpChar = /[\\^$.*+?()[\]{}|]/g, + reHasRegExpChar = RegExp(reRegExpChar.source); + + /** Used to match leading and trailing whitespace. */ + var reTrim = /^\s+|\s+$/g, + reTrimStart = /^\s+/, + reTrimEnd = /\s+$/; + + /** Used to match wrap detail comments. */ + var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, + reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/, + reSplitDetails = /,? & /; + + /** Used to match words composed of alphanumeric characters. */ + var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g; + + /** Used to match backslashes in property paths. */ + var reEscapeChar = /\\(\\)?/g; + + /** + * Used to match + * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components). + */ + var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g; + + /** Used to match `RegExp` flags from their coerced string values. */ + var reFlags = /\w*$/; + + /** Used to detect bad signed hexadecimal string values. */ + var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; + + /** Used to detect binary string values. */ + var reIsBinary = /^0b[01]+$/i; + + /** Used to detect host constructors (Safari). */ + var reIsHostCtor = /^\[object .+?Constructor\]$/; + + /** Used to detect octal string values. */ + var reIsOctal = /^0o[0-7]+$/i; + + /** Used to detect unsigned integer values. */ + var reIsUint = /^(?:0|[1-9]\d*)$/; + + /** Used to match Latin Unicode letters (excluding mathematical operators). */ + var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g; + + /** Used to ensure capturing order of template delimiters. */ + var reNoMatch = /($^)/; + + /** Used to match unescaped characters in compiled string literals. */ + var reUnescapedString = /['\n\r\u2028\u2029\\]/g; + + /** Used to compose unicode character classes. */ + var rsAstralRange = '\\ud800-\\udfff', + rsComboMarksRange = '\\u0300-\\u036f', + reComboHalfMarksRange = '\\ufe20-\\ufe2f', + rsComboSymbolsRange = '\\u20d0-\\u20ff', + rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, + rsDingbatRange = '\\u2700-\\u27bf', + rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff', + rsMathOpRange = '\\xac\\xb1\\xd7\\xf7', + rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf', + rsPunctuationRange = '\\u2000-\\u206f', + rsSpaceRange = + ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000', + rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde', + rsVarRange = '\\ufe0e\\ufe0f', + rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange; + + /** Used to compose unicode capture groups. */ + var rsApos = "['\u2019]", + rsAstral = '[' + rsAstralRange + ']', + rsBreak = '[' + rsBreakRange + ']', + rsCombo = '[' + rsComboRange + ']', + rsDigits = '\\d+', + rsDingbat = '[' + rsDingbatRange + ']', + rsLower = '[' + rsLowerRange + ']', + rsMisc = + '[^' + + rsAstralRange + + rsBreakRange + + rsDigits + + rsDingbatRange + + rsLowerRange + + rsUpperRange + + ']', + rsFitz = '\\ud83c[\\udffb-\\udfff]', + rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', + rsNonAstral = '[^' + rsAstralRange + ']', + rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', + rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', + rsUpper = '[' + rsUpperRange + ']', + rsZWJ = '\\u200d'; + + /** Used to compose unicode regexes. */ + var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')', + rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')', + rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?', + rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?', + reOptMod = rsModifier + '?', + rsOptVar = '[' + rsVarRange + ']?', + rsOptJoin = + '(?:' + + rsZWJ + + '(?:' + + [rsNonAstral, rsRegional, rsSurrPair].join('|') + + ')' + + rsOptVar + + reOptMod + + ')*', + rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])', + rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])', + rsSeq = rsOptVar + reOptMod + rsOptJoin, + rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq, + rsSymbol = + '(?:' + + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + + ')'; + + /** Used to match apostrophes. */ + var reApos = RegExp(rsApos, 'g'); + + /** + * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and + * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols). + */ + var reComboMark = RegExp(rsCombo, 'g'); + + /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ + var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); + + /** Used to match complex or compound words. */ + var reUnicodeWord = RegExp( + [ + rsUpper + + '?' + + rsLower + + '+' + + rsOptContrLower + + '(?=' + + [rsBreak, rsUpper, '$'].join('|') + + ')', + rsMiscUpper + + '+' + + rsOptContrUpper + + '(?=' + + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + + ')', + rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower, + rsUpper + '+' + rsOptContrUpper, + rsOrdUpper, + rsOrdLower, + rsDigits, + rsEmoji, + ].join('|'), + 'g', + ); + + /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */ + var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']'); + + /** Used to detect strings that need a more robust regexp to match words. */ + var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/; + + /** Used to assign default `context` object properties. */ + var contextProps = [ + 'Array', + 'Buffer', + 'DataView', + 'Date', + 'Error', + 'Float32Array', + 'Float64Array', + 'Function', + 'Int8Array', + 'Int16Array', + 'Int32Array', + 'Map', + 'Math', + 'Object', + 'Promise', + 'RegExp', + 'Set', + 'String', + 'Symbol', + 'TypeError', + 'Uint8Array', + 'Uint8ClampedArray', + 'Uint16Array', + 'Uint32Array', + 'WeakMap', + '_', + 'clearTimeout', + 'isFinite', + 'parseInt', + 'setTimeout', + ]; + + /** Used to make template sourceURLs easier to identify. */ + var templateCounter = -1; + + /** Used to identify `toStringTag` values of typed arrays. */ + var typedArrayTags = {}; + typedArrayTags[float32Tag] = + typedArrayTags[float64Tag] = + typedArrayTags[int8Tag] = + typedArrayTags[int16Tag] = + typedArrayTags[int32Tag] = + typedArrayTags[uint8Tag] = + typedArrayTags[uint8ClampedTag] = + typedArrayTags[uint16Tag] = + typedArrayTags[uint32Tag] = + true; + typedArrayTags[argsTag] = + typedArrayTags[arrayTag] = + typedArrayTags[arrayBufferTag] = + typedArrayTags[boolTag] = + typedArrayTags[dataViewTag] = + typedArrayTags[dateTag] = + typedArrayTags[errorTag] = + typedArrayTags[funcTag] = + typedArrayTags[mapTag] = + typedArrayTags[numberTag] = + typedArrayTags[objectTag] = + typedArrayTags[regexpTag] = + typedArrayTags[setTag] = + typedArrayTags[stringTag] = + typedArrayTags[weakMapTag] = + false; + + /** Used to identify `toStringTag` values supported by `_.clone`. */ + var cloneableTags = {}; + cloneableTags[argsTag] = + cloneableTags[arrayTag] = + cloneableTags[arrayBufferTag] = + cloneableTags[dataViewTag] = + cloneableTags[boolTag] = + cloneableTags[dateTag] = + cloneableTags[float32Tag] = + cloneableTags[float64Tag] = + cloneableTags[int8Tag] = + cloneableTags[int16Tag] = + cloneableTags[int32Tag] = + cloneableTags[mapTag] = + cloneableTags[numberTag] = + cloneableTags[objectTag] = + cloneableTags[regexpTag] = + cloneableTags[setTag] = + cloneableTags[stringTag] = + cloneableTags[symbolTag] = + cloneableTags[uint8Tag] = + cloneableTags[uint8ClampedTag] = + cloneableTags[uint16Tag] = + cloneableTags[uint32Tag] = + true; + cloneableTags[errorTag] = cloneableTags[funcTag] = cloneableTags[weakMapTag] = false; + + /** Used to map Latin Unicode letters to basic Latin letters. */ + var deburredLetters = { + // Latin-1 Supplement block. + '\xc0': 'A', + '\xc1': 'A', + '\xc2': 'A', + '\xc3': 'A', + '\xc4': 'A', + '\xc5': 'A', + '\xe0': 'a', + '\xe1': 'a', + '\xe2': 'a', + '\xe3': 'a', + '\xe4': 'a', + '\xe5': 'a', + '\xc7': 'C', + '\xe7': 'c', + '\xd0': 'D', + '\xf0': 'd', + '\xc8': 'E', + '\xc9': 'E', + '\xca': 'E', + '\xcb': 'E', + '\xe8': 'e', + '\xe9': 'e', + '\xea': 'e', + '\xeb': 'e', + '\xcc': 'I', + '\xcd': 'I', + '\xce': 'I', + '\xcf': 'I', + '\xec': 'i', + '\xed': 'i', + '\xee': 'i', + '\xef': 'i', + '\xd1': 'N', + '\xf1': 'n', + '\xd2': 'O', + '\xd3': 'O', + '\xd4': 'O', + '\xd5': 'O', + '\xd6': 'O', + '\xd8': 'O', + '\xf2': 'o', + '\xf3': 'o', + '\xf4': 'o', + '\xf5': 'o', + '\xf6': 'o', + '\xf8': 'o', + '\xd9': 'U', + '\xda': 'U', + '\xdb': 'U', + '\xdc': 'U', + '\xf9': 'u', + '\xfa': 'u', + '\xfb': 'u', + '\xfc': 'u', + '\xdd': 'Y', + '\xfd': 'y', + '\xff': 'y', + '\xc6': 'Ae', + '\xe6': 'ae', + '\xde': 'Th', + '\xfe': 'th', + '\xdf': 'ss', + // Latin Extended-A block. + '\u0100': 'A', + '\u0102': 'A', + '\u0104': 'A', + '\u0101': 'a', + '\u0103': 'a', + '\u0105': 'a', + '\u0106': 'C', + '\u0108': 'C', + '\u010a': 'C', + '\u010c': 'C', + '\u0107': 'c', + '\u0109': 'c', + '\u010b': 'c', + '\u010d': 'c', + '\u010e': 'D', + '\u0110': 'D', + '\u010f': 'd', + '\u0111': 'd', + '\u0112': 'E', + '\u0114': 'E', + '\u0116': 'E', + '\u0118': 'E', + '\u011a': 'E', + '\u0113': 'e', + '\u0115': 'e', + '\u0117': 'e', + '\u0119': 'e', + '\u011b': 'e', + '\u011c': 'G', + '\u011e': 'G', + '\u0120': 'G', + '\u0122': 'G', + '\u011d': 'g', + '\u011f': 'g', + '\u0121': 'g', + '\u0123': 'g', + '\u0124': 'H', + '\u0126': 'H', + '\u0125': 'h', + '\u0127': 'h', + '\u0128': 'I', + '\u012a': 'I', + '\u012c': 'I', + '\u012e': 'I', + '\u0130': 'I', + '\u0129': 'i', + '\u012b': 'i', + '\u012d': 'i', + '\u012f': 'i', + '\u0131': 'i', + '\u0134': 'J', + '\u0135': 'j', + '\u0136': 'K', + '\u0137': 'k', + '\u0138': 'k', + '\u0139': 'L', + '\u013b': 'L', + '\u013d': 'L', + '\u013f': 'L', + '\u0141': 'L', + '\u013a': 'l', + '\u013c': 'l', + '\u013e': 'l', + '\u0140': 'l', + '\u0142': 'l', + '\u0143': 'N', + '\u0145': 'N', + '\u0147': 'N', + '\u014a': 'N', + '\u0144': 'n', + '\u0146': 'n', + '\u0148': 'n', + '\u014b': 'n', + '\u014c': 'O', + '\u014e': 'O', + '\u0150': 'O', + '\u014d': 'o', + '\u014f': 'o', + '\u0151': 'o', + '\u0154': 'R', + '\u0156': 'R', + '\u0158': 'R', + '\u0155': 'r', + '\u0157': 'r', + '\u0159': 'r', + '\u015a': 'S', + '\u015c': 'S', + '\u015e': 'S', + '\u0160': 'S', + '\u015b': 's', + '\u015d': 's', + '\u015f': 's', + '\u0161': 's', + '\u0162': 'T', + '\u0164': 'T', + '\u0166': 'T', + '\u0163': 't', + '\u0165': 't', + '\u0167': 't', + '\u0168': 'U', + '\u016a': 'U', + '\u016c': 'U', + '\u016e': 'U', + '\u0170': 'U', + '\u0172': 'U', + '\u0169': 'u', + '\u016b': 'u', + '\u016d': 'u', + '\u016f': 'u', + '\u0171': 'u', + '\u0173': 'u', + '\u0174': 'W', + '\u0175': 'w', + '\u0176': 'Y', + '\u0177': 'y', + '\u0178': 'Y', + '\u0179': 'Z', + '\u017b': 'Z', + '\u017d': 'Z', + '\u017a': 'z', + '\u017c': 'z', + '\u017e': 'z', + '\u0132': 'IJ', + '\u0133': 'ij', + '\u0152': 'Oe', + '\u0153': 'oe', + '\u0149': "'n", + '\u017f': 's', + }; + + /** Used to map characters to HTML entities. */ + var htmlEscapes = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''', + }; + + /** Used to map HTML entities to characters. */ + var htmlUnescapes = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + ''': "'", + }; + + /** Used to escape characters for inclusion in compiled string literals. */ + var stringEscapes = { + '\\': '\\', + "'": "'", + '\n': 'n', + '\r': 'r', + '\u2028': 'u2028', + '\u2029': 'u2029', + }; + + /** Built-in method references without a dependency on `root`. */ + var freeParseFloat = parseFloat, + freeParseInt = parseInt; + + /** Detect free variable `global` from Node.js. */ + var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + + /** Detect free variable `self`. */ + var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + + /** Used as a reference to the global object. */ + var root = freeGlobal || freeSelf || Function('return this')(); + + /** Detect free variable `exports`. */ + var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; + + /** Detect free variable `module`. */ + var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + + /** Detect the popular CommonJS extension `module.exports`. */ + var moduleExports = freeModule && freeModule.exports === freeExports; + + /** Detect free variable `process` from Node.js. */ + var freeProcess = moduleExports && freeGlobal.process; + + /** Used to access faster Node.js helpers. */ + var nodeUtil = (function () { + try { + // Use `util.types` for Node.js 10+. + var types = freeModule && freeModule.require && freeModule.require('util').types; + + if (types) { + return types; + } + + // Legacy `process.binding('util')` for Node.js < 10. + return freeProcess && freeProcess.binding && freeProcess.binding('util'); + } catch (e) {} + })(); + + /* Node.js helper references. */ + var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer, + nodeIsDate = nodeUtil && nodeUtil.isDate, + nodeIsMap = nodeUtil && nodeUtil.isMap, + nodeIsRegExp = nodeUtil && nodeUtil.isRegExp, + nodeIsSet = nodeUtil && nodeUtil.isSet, + nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; + + /*--------------------------------------------------------------------------*/ + + /** + * A faster alternative to `Function#apply`, this function invokes `func` + * with the `this` binding of `thisArg` and the arguments of `args`. + * + * @private + * @param {Function} func The function to invoke. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} args The arguments to invoke `func` with. + * @returns {*} Returns the result of `func`. + */ + function apply(func, thisArg, args) { + switch (args.length) { + case 0: + return func.call(thisArg); + case 1: + return func.call(thisArg, args[0]); + case 2: + return func.call(thisArg, args[0], args[1]); + case 3: + return func.call(thisArg, args[0], args[1], args[2]); + } + return func.apply(thisArg, args); + } + + /** + * A specialized version of `baseAggregator` for arrays. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} setter The function to set `accumulator` values. + * @param {Function} iteratee The iteratee to transform keys. + * @param {Object} accumulator The initial aggregated object. + * @returns {Function} Returns `accumulator`. + */ + function arrayAggregator(array, setter, iteratee, accumulator) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + var value = array[index]; + setter(accumulator, value, iteratee(value), array); + } + return accumulator; + } + + /** + * A specialized version of `_.forEach` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ + function arrayEach(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (iteratee(array[index], index, array) === false) { + break; + } + } + return array; + } + + /** + * A specialized version of `_.forEachRight` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ + function arrayEachRight(array, iteratee) { + var length = array == null ? 0 : array.length; + + while (length--) { + if (iteratee(array[length], length, array) === false) { + break; + } + } + return array; + } + + /** + * A specialized version of `_.every` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false`. + */ + function arrayEvery(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (!predicate(array[index], index, array)) { + return false; + } + } + return true; + } + + /** + * A specialized version of `_.filter` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ + function arrayFilter(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result[resIndex++] = value; + } + } + return result; + } + + /** + * A specialized version of `_.includes` for arrays without support for + * specifying an index to search from. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ + function arrayIncludes(array, value) { + var length = array == null ? 0 : array.length; + return !!length && baseIndexOf(array, value, 0) > -1; + } + + /** + * This function is like `arrayIncludes` except that it accepts a comparator. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @param {Function} comparator The comparator invoked per element. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ + function arrayIncludesWith(array, value, comparator) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (comparator(value, array[index])) { + return true; + } + } + return false; + } + + /** + * A specialized version of `_.map` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ + function arrayMap(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length, + result = Array(length); + + while (++index < length) { + result[index] = iteratee(array[index], index, array); + } + return result; + } + + /** + * Appends the elements of `values` to `array`. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to append. + * @returns {Array} Returns `array`. + */ + function arrayPush(array, values) { + var index = -1, + length = values.length, + offset = array.length; + + while (++index < length) { + array[offset + index] = values[index]; + } + return array; + } + + /** + * A specialized version of `_.reduce` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {boolean} [initAccum] Specify using the first element of `array` as + * the initial value. + * @returns {*} Returns the accumulated value. + */ + function arrayReduce(array, iteratee, accumulator, initAccum) { + var index = -1, + length = array == null ? 0 : array.length; + + if (initAccum && length) { + accumulator = array[++index]; + } + while (++index < length) { + accumulator = iteratee(accumulator, array[index], index, array); + } + return accumulator; + } + + /** + * A specialized version of `_.reduceRight` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {boolean} [initAccum] Specify using the last element of `array` as + * the initial value. + * @returns {*} Returns the accumulated value. + */ + function arrayReduceRight(array, iteratee, accumulator, initAccum) { + var length = array == null ? 0 : array.length; + if (initAccum && length) { + accumulator = array[--length]; + } + while (length--) { + accumulator = iteratee(accumulator, array[length], length, array); + } + return accumulator; + } + + /** + * A specialized version of `_.some` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ + function arraySome(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (predicate(array[index], index, array)) { + return true; + } + } + return false; + } + + /** + * Gets the size of an ASCII `string`. + * + * @private + * @param {string} string The string inspect. + * @returns {number} Returns the string size. + */ + var asciiSize = baseProperty('length'); + + /** + * Converts an ASCII `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ + function asciiToArray(string) { + return string.split(''); + } + + /** + * Splits an ASCII `string` into an array of its words. + * + * @private + * @param {string} The string to inspect. + * @returns {Array} Returns the words of `string`. + */ + function asciiWords(string) { + return string.match(reAsciiWord) || []; + } + + /** + * The base implementation of methods like `_.findKey` and `_.findLastKey`, + * without support for iteratee shorthands, which iterates over `collection` + * using `eachFunc`. + * + * @private + * @param {Array|Object} collection The collection to inspect. + * @param {Function} predicate The function invoked per iteration. + * @param {Function} eachFunc The function to iterate over `collection`. + * @returns {*} Returns the found element or its key, else `undefined`. + */ + function baseFindKey(collection, predicate, eachFunc) { + var result; + eachFunc(collection, function (value, key, collection) { + if (predicate(value, key, collection)) { + result = key; + return false; + } + }); + return result; + } + + /** + * The base implementation of `_.findIndex` and `_.findLastIndex` without + * support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} predicate The function invoked per iteration. + * @param {number} fromIndex The index to search from. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function baseFindIndex(array, predicate, fromIndex, fromRight) { + var length = array.length, + index = fromIndex + (fromRight ? 1 : -1); + + while (fromRight ? index-- : ++index < length) { + if (predicate(array[index], index, array)) { + return index; + } + } + return -1; + } + + /** + * The base implementation of `_.indexOf` without `fromIndex` bounds checks. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function baseIndexOf(array, value, fromIndex) { + return value === value + ? strictIndexOf(array, value, fromIndex) + : baseFindIndex(array, baseIsNaN, fromIndex); + } + + /** + * This function is like `baseIndexOf` except that it accepts a comparator. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @param {Function} comparator The comparator invoked per element. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function baseIndexOfWith(array, value, fromIndex, comparator) { + var index = fromIndex - 1, + length = array.length; + + while (++index < length) { + if (comparator(array[index], value)) { + return index; + } + } + return -1; + } + + /** + * The base implementation of `_.isNaN` without support for number objects. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + */ + function baseIsNaN(value) { + return value !== value; + } + + /** + * The base implementation of `_.mean` and `_.meanBy` without support for + * iteratee shorthands. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {number} Returns the mean. + */ + function baseMean(array, iteratee) { + var length = array == null ? 0 : array.length; + return length ? baseSum(array, iteratee) / length : NAN; + } + + /** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new accessor function. + */ + function baseProperty(key) { + return function (object) { + return object == null ? undefined : object[key]; + }; + } + + /** + * The base implementation of `_.propertyOf` without support for deep paths. + * + * @private + * @param {Object} object The object to query. + * @returns {Function} Returns the new accessor function. + */ + function basePropertyOf(object) { + return function (key) { + return object == null ? undefined : object[key]; + }; + } + + /** + * The base implementation of `_.reduce` and `_.reduceRight`, without support + * for iteratee shorthands, which iterates over `collection` using `eachFunc`. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} accumulator The initial value. + * @param {boolean} initAccum Specify using the first or last element of + * `collection` as the initial value. + * @param {Function} eachFunc The function to iterate over `collection`. + * @returns {*} Returns the accumulated value. + */ + function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) { + eachFunc(collection, function (value, index, collection) { + accumulator = initAccum + ? ((initAccum = false), value) + : iteratee(accumulator, value, index, collection); + }); + return accumulator; + } + + /** + * The base implementation of `_.sortBy` which uses `comparer` to define the + * sort order of `array` and replaces criteria objects with their corresponding + * values. + * + * @private + * @param {Array} array The array to sort. + * @param {Function} comparer The function to define sort order. + * @returns {Array} Returns `array`. + */ + function baseSortBy(array, comparer) { + var length = array.length; + + array.sort(comparer); + while (length--) { + array[length] = array[length].value; + } + return array; + } + + /** + * The base implementation of `_.sum` and `_.sumBy` without support for + * iteratee shorthands. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {number} Returns the sum. + */ + function baseSum(array, iteratee) { + var result, + index = -1, + length = array.length; + + while (++index < length) { + var current = iteratee(array[index]); + if (current !== undefined) { + result = result === undefined ? current : result + current; + } + } + return result; + } + + /** + * The base implementation of `_.times` without support for iteratee shorthands + * or max array length checks. + * + * @private + * @param {number} n The number of times to invoke `iteratee`. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the array of results. + */ + function baseTimes(n, iteratee) { + var index = -1, + result = Array(n); + + while (++index < n) { + result[index] = iteratee(index); + } + return result; + } + + /** + * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array + * of key-value pairs for `object` corresponding to the property names of `props`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} props The property names to get values for. + * @returns {Object} Returns the key-value pairs. + */ + function baseToPairs(object, props) { + return arrayMap(props, function (key) { + return [key, object[key]]; + }); + } + + /** + * The base implementation of `_.unary` without support for storing metadata. + * + * @private + * @param {Function} func The function to cap arguments for. + * @returns {Function} Returns the new capped function. + */ + function baseUnary(func) { + return function (value) { + return func(value); + }; + } + + /** + * The base implementation of `_.values` and `_.valuesIn` which creates an + * array of `object` property values corresponding to the property names + * of `props`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} props The property names to get values for. + * @returns {Object} Returns the array of property values. + */ + function baseValues(object, props) { + return arrayMap(props, function (key) { + return object[key]; + }); + } + + /** + * Checks if a `cache` value for `key` exists. + * + * @private + * @param {Object} cache The cache to query. + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function cacheHas(cache, key) { + return cache.has(key); + } + + /** + * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol + * that is not found in the character symbols. + * + * @private + * @param {Array} strSymbols The string symbols to inspect. + * @param {Array} chrSymbols The character symbols to find. + * @returns {number} Returns the index of the first unmatched string symbol. + */ + function charsStartIndex(strSymbols, chrSymbols) { + var index = -1, + length = strSymbols.length; + + while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} + return index; + } + + /** + * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol + * that is not found in the character symbols. + * + * @private + * @param {Array} strSymbols The string symbols to inspect. + * @param {Array} chrSymbols The character symbols to find. + * @returns {number} Returns the index of the last unmatched string symbol. + */ + function charsEndIndex(strSymbols, chrSymbols) { + var index = strSymbols.length; + + while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} + return index; + } + + /** + * Gets the number of `placeholder` occurrences in `array`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} placeholder The placeholder to search for. + * @returns {number} Returns the placeholder count. + */ + function countHolders(array, placeholder) { + var length = array.length, + result = 0; + + while (length--) { + if (array[length] === placeholder) { + ++result; + } + } + return result; + } + + /** + * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A + * letters to basic Latin letters. + * + * @private + * @param {string} letter The matched letter to deburr. + * @returns {string} Returns the deburred letter. + */ + var deburrLetter = basePropertyOf(deburredLetters); + + /** + * Used by `_.escape` to convert characters to HTML entities. + * + * @private + * @param {string} chr The matched character to escape. + * @returns {string} Returns the escaped character. + */ + var escapeHtmlChar = basePropertyOf(htmlEscapes); + + /** + * Used by `_.template` to escape characters for inclusion in compiled string literals. + * + * @private + * @param {string} chr The matched character to escape. + * @returns {string} Returns the escaped character. + */ + function escapeStringChar(chr) { + return '\\' + stringEscapes[chr]; + } + + /** + * Gets the value at `key` of `object`. + * + * @private + * @param {Object} [object] The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ + function getValue(object, key) { + return object == null ? undefined : object[key]; + } + + /** + * Checks if `string` contains Unicode symbols. + * + * @private + * @param {string} string The string to inspect. + * @returns {boolean} Returns `true` if a symbol is found, else `false`. + */ + function hasUnicode(string) { + return reHasUnicode.test(string); + } + + /** + * Checks if `string` contains a word composed of Unicode symbols. + * + * @private + * @param {string} string The string to inspect. + * @returns {boolean} Returns `true` if a word is found, else `false`. + */ + function hasUnicodeWord(string) { + return reHasUnicodeWord.test(string); + } + + /** + * Converts `iterator` to an array. + * + * @private + * @param {Object} iterator The iterator to convert. + * @returns {Array} Returns the converted array. + */ + function iteratorToArray(iterator) { + var data, + result = []; + + while (!(data = iterator.next()).done) { + result.push(data.value); + } + return result; + } + + /** + * Converts `map` to its key-value pairs. + * + * @private + * @param {Object} map The map to convert. + * @returns {Array} Returns the key-value pairs. + */ + function mapToArray(map) { + var index = -1, + result = Array(map.size); + + map.forEach(function (value, key) { + result[++index] = [key, value]; + }); + return result; + } + + /** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ + function overArg(func, transform) { + return function (arg) { + return func(transform(arg)); + }; + } + + /** + * Replaces all `placeholder` elements in `array` with an internal placeholder + * and returns an array of their indexes. + * + * @private + * @param {Array} array The array to modify. + * @param {*} placeholder The placeholder to replace. + * @returns {Array} Returns the new array of placeholder indexes. + */ + function replaceHolders(array, placeholder) { + var index = -1, + length = array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (value === placeholder || value === PLACEHOLDER) { + array[index] = PLACEHOLDER; + result[resIndex++] = index; + } + } + return result; + } + + /** + * Converts `set` to an array of its values. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the values. + */ + function setToArray(set) { + var index = -1, + result = Array(set.size); + + set.forEach(function (value) { + result[++index] = value; + }); + return result; + } + + /** + * Converts `set` to its value-value pairs. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the value-value pairs. + */ + function setToPairs(set) { + var index = -1, + result = Array(set.size); + + set.forEach(function (value) { + result[++index] = [value, value]; + }); + return result; + } + + /** + * A specialized version of `_.indexOf` which performs strict equality + * comparisons of values, i.e. `===`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function strictIndexOf(array, value, fromIndex) { + var index = fromIndex - 1, + length = array.length; + + while (++index < length) { + if (array[index] === value) { + return index; + } + } + return -1; + } + + /** + * A specialized version of `_.lastIndexOf` which performs strict equality + * comparisons of values, i.e. `===`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function strictLastIndexOf(array, value, fromIndex) { + var index = fromIndex + 1; + while (index--) { + if (array[index] === value) { + return index; + } + } + return index; + } + + /** + * Gets the number of symbols in `string`. + * + * @private + * @param {string} string The string to inspect. + * @returns {number} Returns the string size. + */ + function stringSize(string) { + return hasUnicode(string) ? unicodeSize(string) : asciiSize(string); + } + + /** + * Converts `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ + function stringToArray(string) { + return hasUnicode(string) ? unicodeToArray(string) : asciiToArray(string); + } + + /** + * Used by `_.unescape` to convert HTML entities to characters. + * + * @private + * @param {string} chr The matched character to unescape. + * @returns {string} Returns the unescaped character. + */ + var unescapeHtmlChar = basePropertyOf(htmlUnescapes); + + /** + * Gets the size of a Unicode `string`. + * + * @private + * @param {string} string The string inspect. + * @returns {number} Returns the string size. + */ + function unicodeSize(string) { + var result = (reUnicode.lastIndex = 0); + while (reUnicode.test(string)) { + ++result; + } + return result; + } + + /** + * Converts a Unicode `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ + function unicodeToArray(string) { + return string.match(reUnicode) || []; + } + + /** + * Splits a Unicode `string` into an array of its words. + * + * @private + * @param {string} The string to inspect. + * @returns {Array} Returns the words of `string`. + */ + function unicodeWords(string) { + return string.match(reUnicodeWord) || []; + } + + /*--------------------------------------------------------------------------*/ + + /** + * Create a new pristine `lodash` function using the `context` object. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category Util + * @param {Object} [context=root] The context object. + * @returns {Function} Returns a new `lodash` function. + * @example + * + * _.mixin({ 'foo': _.constant('foo') }); + * + * var lodash = _.runInContext(); + * lodash.mixin({ 'bar': lodash.constant('bar') }); + * + * _.isFunction(_.foo); + * // => true + * _.isFunction(_.bar); + * // => false + * + * lodash.isFunction(lodash.foo); + * // => false + * lodash.isFunction(lodash.bar); + * // => true + * + * // Create a suped-up `defer` in Node.js. + * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer; + */ + var runInContext = function runInContext(context) { + context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps)); + + /** Built-in constructor references. */ + var Array = context.Array, + Date = context.Date, + Error = context.Error, + Function = context.Function, + Math = context.Math, + Object = context.Object, + RegExp = context.RegExp, + String = context.String, + TypeError = context.TypeError; + + /** Used for built-in method references. */ + var arrayProto = Array.prototype, + funcProto = Function.prototype, + objectProto = Object.prototype; + + /** Used to detect overreaching core-js shims. */ + var coreJsData = context['__core-js_shared__']; + + /** Used to resolve the decompiled source of functions. */ + var funcToString = funcProto.toString; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** Used to generate unique IDs. */ + var idCounter = 0; + + /** Used to detect methods masquerading as native. */ + var maskSrcKey = (function () { + var uid = /[^.]+$/.exec((coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO) || ''); + return uid ? 'Symbol(src)_1.' + uid : ''; + })(); + + /** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ + var nativeObjectToString = objectProto.toString; + + /** Used to infer the `Object` constructor. */ + var objectCtorString = funcToString.call(Object); + + /** Used to restore the original `_` reference in `_.noConflict`. */ + var oldDash = root._; + + /** Used to detect if a method is native. */ + var reIsNative = RegExp( + '^' + + funcToString + .call(hasOwnProperty) + .replace(reRegExpChar, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + + '$', + ); + + /** Built-in value references. */ + var Buffer = moduleExports ? context.Buffer : undefined, + Symbol = context.Symbol, + Uint8Array = context.Uint8Array, + allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined, + getPrototype = overArg(Object.getPrototypeOf, Object), + objectCreate = Object.create, + propertyIsEnumerable = objectProto.propertyIsEnumerable, + splice = arrayProto.splice, + spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined, + symIterator = Symbol ? Symbol.iterator : undefined, + symToStringTag = Symbol ? Symbol.toStringTag : undefined; + + var defineProperty = (function () { + try { + var func = getNative(Object, 'defineProperty'); + func({}, '', {}); + return func; + } catch (e) {} + })(); + + /** Mocked built-ins. */ + var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout, + ctxNow = Date && Date.now !== root.Date.now && Date.now, + ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout; + + /* Built-in method references for those with the same name as other `lodash` methods. */ + var nativeCeil = Math.ceil, + nativeFloor = Math.floor, + nativeGetSymbols = Object.getOwnPropertySymbols, + nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined, + nativeIsFinite = context.isFinite, + nativeJoin = arrayProto.join, + nativeKeys = overArg(Object.keys, Object), + nativeMax = Math.max, + nativeMin = Math.min, + nativeNow = Date.now, + nativeParseInt = context.parseInt, + nativeRandom = Math.random, + nativeReverse = arrayProto.reverse; + + /* Built-in method references that are verified to be native. */ + var DataView = getNative(context, 'DataView'), + Map = getNative(context, 'Map'), + Promise = getNative(context, 'Promise'), + Set = getNative(context, 'Set'), + WeakMap = getNative(context, 'WeakMap'), + nativeCreate = getNative(Object, 'create'); + + /** Used to store function metadata. */ + var metaMap = WeakMap && new WeakMap(); + + /** Used to lookup unminified function names. */ + var realNames = {}; + + /** Used to detect maps, sets, and weakmaps. */ + var dataViewCtorString = toSource(DataView), + mapCtorString = toSource(Map), + promiseCtorString = toSource(Promise), + setCtorString = toSource(Set), + weakMapCtorString = toSource(WeakMap); + + /** Used to convert symbols to primitives and strings. */ + var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolValueOf = symbolProto ? symbolProto.valueOf : undefined, + symbolToString = symbolProto ? symbolProto.toString : undefined; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a `lodash` object which wraps `value` to enable implicit method + * chain sequences. Methods that operate on and return arrays, collections, + * and functions can be chained together. Methods that retrieve a single value + * or may return a primitive value will automatically end the chain sequence + * and return the unwrapped value. Otherwise, the value must be unwrapped + * with `_#value`. + * + * Explicit chain sequences, which must be unwrapped with `_#value`, may be + * enabled using `_.chain`. + * + * The execution of chained methods is lazy, that is, it's deferred until + * `_#value` is implicitly or explicitly called. + * + * Lazy evaluation allows several methods to support shortcut fusion. + * Shortcut fusion is an optimization to merge iteratee calls; this avoids + * the creation of intermediate arrays and can greatly reduce the number of + * iteratee executions. Sections of a chain sequence qualify for shortcut + * fusion if the section is applied to an array and iteratees accept only + * one argument. The heuristic for whether a section qualifies for shortcut + * fusion is subject to change. + * + * Chaining is supported in custom builds as long as the `_#value` method is + * directly or indirectly included in the build. + * + * In addition to lodash methods, wrappers have `Array` and `String` methods. + * + * The wrapper `Array` methods are: + * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift` + * + * The wrapper `String` methods are: + * `replace` and `split` + * + * The wrapper methods that support shortcut fusion are: + * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`, + * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`, + * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray` + * + * The chainable wrapper methods are: + * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`, + * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`, + * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`, + * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`, + * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`, + * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`, + * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`, + * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`, + * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`, + * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`, + * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`, + * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`, + * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`, + * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`, + * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`, + * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`, + * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`, + * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`, + * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`, + * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`, + * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`, + * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`, + * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`, + * `zipObject`, `zipObjectDeep`, and `zipWith` + * + * The wrapper methods that are **not** chainable by default are: + * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`, + * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`, + * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`, + * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`, + * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`, + * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`, + * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`, + * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`, + * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`, + * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`, + * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`, + * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`, + * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`, + * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`, + * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`, + * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`, + * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`, + * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`, + * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`, + * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`, + * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`, + * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`, + * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`, + * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`, + * `upperFirst`, `value`, and `words` + * + * @name _ + * @constructor + * @category Seq + * @param {*} value The value to wrap in a `lodash` instance. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * function square(n) { + * return n * n; + * } + * + * var wrapped = _([1, 2, 3]); + * + * // Returns an unwrapped value. + * wrapped.reduce(_.add); + * // => 6 + * + * // Returns a wrapped value. + * var squares = wrapped.map(square); + * + * _.isArray(squares); + * // => false + * + * _.isArray(squares.value()); + * // => true + */ + function lodash(value) { + if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) { + if (value instanceof LodashWrapper) { + return value; + } + if (hasOwnProperty.call(value, '__wrapped__')) { + return wrapperClone(value); + } + } + return new LodashWrapper(value); + } + + /** + * The base implementation of `_.create` without support for assigning + * properties to the created object. + * + * @private + * @param {Object} proto The object to inherit from. + * @returns {Object} Returns the new object. + */ + var baseCreate = (function () { + function object() {} + return function (proto) { + if (!isObject(proto)) { + return {}; + } + if (objectCreate) { + return objectCreate(proto); + } + object.prototype = proto; + var result = new object(); + object.prototype = undefined; + return result; + }; + })(); + + /** + * The function whose prototype chain sequence wrappers inherit from. + * + * @private + */ + function baseLodash() { + // No operation performed. + } + + /** + * The base constructor for creating `lodash` wrapper objects. + * + * @private + * @param {*} value The value to wrap. + * @param {boolean} [chainAll] Enable explicit method chain sequences. + */ + function LodashWrapper(value, chainAll) { + this.__wrapped__ = value; + this.__actions__ = []; + this.__chain__ = !!chainAll; + this.__index__ = 0; + this.__values__ = undefined; + } + + /** + * By default, the template delimiters used by lodash are like those in + * embedded Ruby (ERB) as well as ES2015 template strings. Change the + * following template settings to use alternative delimiters. + * + * @static + * @memberOf _ + * @type {Object} + */ + lodash.templateSettings = { + /** + * Used to detect `data` property values to be HTML-escaped. + * + * @memberOf _.templateSettings + * @type {RegExp} + */ + escape: reEscape, + + /** + * Used to detect code to be evaluated. + * + * @memberOf _.templateSettings + * @type {RegExp} + */ + evaluate: reEvaluate, + + /** + * Used to detect `data` property values to inject. + * + * @memberOf _.templateSettings + * @type {RegExp} + */ + interpolate: reInterpolate, + + /** + * Used to reference the data object in the template text. + * + * @memberOf _.templateSettings + * @type {string} + */ + variable: '', + + /** + * Used to import variables into the compiled template. + * + * @memberOf _.templateSettings + * @type {Object} + */ + imports: { + /** + * A reference to the `lodash` function. + * + * @memberOf _.templateSettings.imports + * @type {Function} + */ + _: lodash, + }, + }; + + // Ensure wrappers are instances of `baseLodash`. + lodash.prototype = baseLodash.prototype; + lodash.prototype.constructor = lodash; + + LodashWrapper.prototype = baseCreate(baseLodash.prototype); + LodashWrapper.prototype.constructor = LodashWrapper; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation. + * + * @private + * @constructor + * @param {*} value The value to wrap. + */ + function LazyWrapper(value) { + this.__wrapped__ = value; + this.__actions__ = []; + this.__dir__ = 1; + this.__filtered__ = false; + this.__iteratees__ = []; + this.__takeCount__ = MAX_ARRAY_LENGTH; + this.__views__ = []; + } + + /** + * Creates a clone of the lazy wrapper object. + * + * @private + * @name clone + * @memberOf LazyWrapper + * @returns {Object} Returns the cloned `LazyWrapper` object. + */ + function lazyClone() { + var result = new LazyWrapper(this.__wrapped__); + result.__actions__ = copyArray(this.__actions__); + result.__dir__ = this.__dir__; + result.__filtered__ = this.__filtered__; + result.__iteratees__ = copyArray(this.__iteratees__); + result.__takeCount__ = this.__takeCount__; + result.__views__ = copyArray(this.__views__); + return result; + } + + /** + * Reverses the direction of lazy iteration. + * + * @private + * @name reverse + * @memberOf LazyWrapper + * @returns {Object} Returns the new reversed `LazyWrapper` object. + */ + function lazyReverse() { + if (this.__filtered__) { + var result = new LazyWrapper(this); + result.__dir__ = -1; + result.__filtered__ = true; + } else { + result = this.clone(); + result.__dir__ *= -1; + } + return result; + } + + /** + * Extracts the unwrapped value from its lazy wrapper. + * + * @private + * @name value + * @memberOf LazyWrapper + * @returns {*} Returns the unwrapped value. + */ + function lazyValue() { + var array = this.__wrapped__.value(), + dir = this.__dir__, + isArr = isArray(array), + isRight = dir < 0, + arrLength = isArr ? array.length : 0, + view = getView(0, arrLength, this.__views__), + start = view.start, + end = view.end, + length = end - start, + index = isRight ? end : start - 1, + iteratees = this.__iteratees__, + iterLength = iteratees.length, + resIndex = 0, + takeCount = nativeMin(length, this.__takeCount__); + + if (!isArr || (!isRight && arrLength == length && takeCount == length)) { + return baseWrapperValue(array, this.__actions__); + } + var result = []; + + outer: while (length-- && resIndex < takeCount) { + index += dir; + + var iterIndex = -1, + value = array[index]; + + while (++iterIndex < iterLength) { + var data = iteratees[iterIndex], + iteratee = data.iteratee, + type = data.type, + computed = iteratee(value); + + if (type == LAZY_MAP_FLAG) { + value = computed; + } else if (!computed) { + if (type == LAZY_FILTER_FLAG) { + continue outer; + } else { + break outer; + } + } + } + result[resIndex++] = value; + } + return result; + } + + // Ensure `LazyWrapper` is an instance of `baseLodash`. + LazyWrapper.prototype = baseCreate(baseLodash.prototype); + LazyWrapper.prototype.constructor = LazyWrapper; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a hash object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function Hash(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + + /** + * Removes all key-value entries from the hash. + * + * @private + * @name clear + * @memberOf Hash + */ + function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; + this.size = 0; + } + + /** + * Removes `key` and its value from the hash. + * + * @private + * @name delete + * @memberOf Hash + * @param {Object} hash The hash to modify. + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function hashDelete(key) { + var result = this.has(key) && delete this.__data__[key]; + this.size -= result ? 1 : 0; + return result; + } + + /** + * Gets the hash value for `key`. + * + * @private + * @name get + * @memberOf Hash + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function hashGet(key) { + var data = this.__data__; + if (nativeCreate) { + var result = data[key]; + return result === HASH_UNDEFINED ? undefined : result; + } + return hasOwnProperty.call(data, key) ? data[key] : undefined; + } + + /** + * Checks if a hash value for `key` exists. + * + * @private + * @name has + * @memberOf Hash + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function hashHas(key) { + var data = this.__data__; + return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key); + } + + /** + * Sets the hash `key` to `value`. + * + * @private + * @name set + * @memberOf Hash + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the hash instance. + */ + function hashSet(key, value) { + var data = this.__data__; + this.size += this.has(key) ? 0 : 1; + data[key] = nativeCreate && value === undefined ? HASH_UNDEFINED : value; + return this; + } + + // Add methods to `Hash`. + Hash.prototype.clear = hashClear; + Hash.prototype['delete'] = hashDelete; + Hash.prototype.get = hashGet; + Hash.prototype.has = hashHas; + Hash.prototype.set = hashSet; + + /*------------------------------------------------------------------------*/ + + /** + * Creates an list cache object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function ListCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + + /** + * Removes all key-value entries from the list cache. + * + * @private + * @name clear + * @memberOf ListCache + */ + function listCacheClear() { + this.__data__ = []; + this.size = 0; + } + + /** + * Removes `key` and its value from the list cache. + * + * @private + * @name delete + * @memberOf ListCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function listCacheDelete(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + return false; + } + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + --this.size; + return true; + } + + /** + * Gets the list cache value for `key`. + * + * @private + * @name get + * @memberOf ListCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function listCacheGet(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + return index < 0 ? undefined : data[index][1]; + } + + /** + * Checks if a list cache value for `key` exists. + * + * @private + * @name has + * @memberOf ListCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; + } + + /** + * Sets the list cache `key` to `value`. + * + * @private + * @name set + * @memberOf ListCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the list cache instance. + */ + function listCacheSet(key, value) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + ++this.size; + data.push([key, value]); + } else { + data[index][1] = value; + } + return this; + } + + // Add methods to `ListCache`. + ListCache.prototype.clear = listCacheClear; + ListCache.prototype['delete'] = listCacheDelete; + ListCache.prototype.get = listCacheGet; + ListCache.prototype.has = listCacheHas; + ListCache.prototype.set = listCacheSet; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a map cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function MapCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + + /** + * Removes all key-value entries from the map. + * + * @private + * @name clear + * @memberOf MapCache + */ + function mapCacheClear() { + this.size = 0; + this.__data__ = { + hash: new Hash(), + map: new (Map || ListCache)(), + string: new Hash(), + }; + } + + /** + * Removes `key` and its value from the map. + * + * @private + * @name delete + * @memberOf MapCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function mapCacheDelete(key) { + var result = getMapData(this, key)['delete'](key); + this.size -= result ? 1 : 0; + return result; + } + + /** + * Gets the map value for `key`. + * + * @private + * @name get + * @memberOf MapCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function mapCacheGet(key) { + return getMapData(this, key).get(key); + } + + /** + * Checks if a map value for `key` exists. + * + * @private + * @name has + * @memberOf MapCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function mapCacheHas(key) { + return getMapData(this, key).has(key); + } + + /** + * Sets the map `key` to `value`. + * + * @private + * @name set + * @memberOf MapCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the map cache instance. + */ + function mapCacheSet(key, value) { + var data = getMapData(this, key), + size = data.size; + + data.set(key, value); + this.size += data.size == size ? 0 : 1; + return this; + } + + // Add methods to `MapCache`. + MapCache.prototype.clear = mapCacheClear; + MapCache.prototype['delete'] = mapCacheDelete; + MapCache.prototype.get = mapCacheGet; + MapCache.prototype.has = mapCacheHas; + MapCache.prototype.set = mapCacheSet; + + /*------------------------------------------------------------------------*/ + + /** + * + * Creates an array cache object to store unique values. + * + * @private + * @constructor + * @param {Array} [values] The values to cache. + */ + function SetCache(values) { + var index = -1, + length = values == null ? 0 : values.length; + + this.__data__ = new MapCache(); + while (++index < length) { + this.add(values[index]); + } + } + + /** + * Adds `value` to the array cache. + * + * @private + * @name add + * @memberOf SetCache + * @alias push + * @param {*} value The value to cache. + * @returns {Object} Returns the cache instance. + */ + function setCacheAdd(value) { + this.__data__.set(value, HASH_UNDEFINED); + return this; + } + + /** + * Checks if `value` is in the array cache. + * + * @private + * @name has + * @memberOf SetCache + * @param {*} value The value to search for. + * @returns {number} Returns `true` if `value` is found, else `false`. + */ + function setCacheHas(value) { + return this.__data__.has(value); + } + + // Add methods to `SetCache`. + SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; + SetCache.prototype.has = setCacheHas; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a stack cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function Stack(entries) { + var data = (this.__data__ = new ListCache(entries)); + this.size = data.size; + } + + /** + * Removes all key-value entries from the stack. + * + * @private + * @name clear + * @memberOf Stack + */ + function stackClear() { + this.__data__ = new ListCache(); + this.size = 0; + } + + /** + * Removes `key` and its value from the stack. + * + * @private + * @name delete + * @memberOf Stack + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function stackDelete(key) { + var data = this.__data__, + result = data['delete'](key); + + this.size = data.size; + return result; + } + + /** + * Gets the stack value for `key`. + * + * @private + * @name get + * @memberOf Stack + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function stackGet(key) { + return this.__data__.get(key); + } + + /** + * Checks if a stack value for `key` exists. + * + * @private + * @name has + * @memberOf Stack + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function stackHas(key) { + return this.__data__.has(key); + } + + /** + * Sets the stack `key` to `value`. + * + * @private + * @name set + * @memberOf Stack + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the stack cache instance. + */ + function stackSet(key, value) { + var data = this.__data__; + if (data instanceof ListCache) { + var pairs = data.__data__; + if (!Map || pairs.length < LARGE_ARRAY_SIZE - 1) { + pairs.push([key, value]); + this.size = ++data.size; + return this; + } + data = this.__data__ = new MapCache(pairs); + } + data.set(key, value); + this.size = data.size; + return this; + } + + // Add methods to `Stack`. + Stack.prototype.clear = stackClear; + Stack.prototype['delete'] = stackDelete; + Stack.prototype.get = stackGet; + Stack.prototype.has = stackHas; + Stack.prototype.set = stackSet; + + /*------------------------------------------------------------------------*/ + + /** + * Creates an array of the enumerable property names of the array-like `value`. + * + * @private + * @param {*} value The value to query. + * @param {boolean} inherited Specify returning inherited property names. + * @returns {Array} Returns the array of property names. + */ + function arrayLikeKeys(value, inherited) { + var isArr = isArray(value), + isArg = !isArr && isArguments(value), + isBuff = !isArr && !isArg && isBuffer(value), + isType = !isArr && !isArg && !isBuff && isTypedArray(value), + skipIndexes = isArr || isArg || isBuff || isType, + result = skipIndexes ? baseTimes(value.length, String) : [], + length = result.length; + + for (var key in value) { + if ( + (inherited || hasOwnProperty.call(value, key)) && + !( + skipIndexes && + // Safari 9 has enumerable `arguments.length` in strict mode. + (key == 'length' || + // Node.js 0.10 has enumerable non-index properties on buffers. + (isBuff && (key == 'offset' || key == 'parent')) || + // PhantomJS 2 has enumerable non-index properties on typed arrays. + (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) || + // Skip index properties. + isIndex(key, length)) + ) + ) { + result.push(key); + } + } + return result; + } + + /** + * A specialized version of `_.sample` for arrays. + * + * @private + * @param {Array} array The array to sample. + * @returns {*} Returns the random element. + */ + function arraySample(array) { + var length = array.length; + return length ? array[baseRandom(0, length - 1)] : undefined; + } + + /** + * A specialized version of `_.sampleSize` for arrays. + * + * @private + * @param {Array} array The array to sample. + * @param {number} n The number of elements to sample. + * @returns {Array} Returns the random elements. + */ + function arraySampleSize(array, n) { + return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length)); + } + + /** + * A specialized version of `_.shuffle` for arrays. + * + * @private + * @param {Array} array The array to shuffle. + * @returns {Array} Returns the new shuffled array. + */ + function arrayShuffle(array) { + return shuffleSelf(copyArray(array)); + } + + /** + * This function is like `assignValue` except that it doesn't assign + * `undefined` values. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ + function assignMergeValue(object, key, value) { + if ( + (value !== undefined && !eq(object[key], value)) || + (value === undefined && !(key in object)) + ) { + baseAssignValue(object, key, value); + } + } + + /** + * Assigns `value` to `key` of `object` if the existing value is not equivalent + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ + function assignValue(object, key, value) { + var objValue = object[key]; + if ( + !(hasOwnProperty.call(object, key) && eq(objValue, value)) || + (value === undefined && !(key in object)) + ) { + baseAssignValue(object, key, value); + } + } + + /** + * Gets the index at which the `key` is found in `array` of key-value pairs. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} key The key to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + return -1; + } + + /** + * Aggregates elements of `collection` on `accumulator` with keys transformed + * by `iteratee` and values set by `setter`. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} setter The function to set `accumulator` values. + * @param {Function} iteratee The iteratee to transform keys. + * @param {Object} accumulator The initial aggregated object. + * @returns {Function} Returns `accumulator`. + */ + function baseAggregator(collection, setter, iteratee, accumulator) { + baseEach(collection, function (value, key, collection) { + setter(accumulator, value, iteratee(value), collection); + }); + return accumulator; + } + + /** + * The base implementation of `_.assign` without support for multiple sources + * or `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ + function baseAssign(object, source) { + return object && copyObject(source, keys(source), object); + } + + /** + * The base implementation of `_.assignIn` without support for multiple sources + * or `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ + function baseAssignIn(object, source) { + return object && copyObject(source, keysIn(source), object); + } + + /** + * The base implementation of `assignValue` and `assignMergeValue` without + * value checks. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ + function baseAssignValue(object, key, value) { + if (key == '__proto__' && defineProperty) { + defineProperty(object, key, { + configurable: true, + enumerable: true, + value: value, + writable: true, + }); + } else { + object[key] = value; + } + } + + /** + * The base implementation of `_.at` without support for individual paths. + * + * @private + * @param {Object} object The object to iterate over. + * @param {string[]} paths The property paths to pick. + * @returns {Array} Returns the picked elements. + */ + function baseAt(object, paths) { + var index = -1, + length = paths.length, + result = Array(length), + skip = object == null; + + while (++index < length) { + result[index] = skip ? undefined : get(object, paths[index]); + } + return result; + } + + /** + * The base implementation of `_.clamp` which doesn't coerce arguments. + * + * @private + * @param {number} number The number to clamp. + * @param {number} [lower] The lower bound. + * @param {number} upper The upper bound. + * @returns {number} Returns the clamped number. + */ + function baseClamp(number, lower, upper) { + if (number === number) { + if (upper !== undefined) { + number = number <= upper ? number : upper; + } + if (lower !== undefined) { + number = number >= lower ? number : lower; + } + } + return number; + } + + /** + * The base implementation of `_.clone` and `_.cloneDeep` which tracks + * traversed objects. + * + * @private + * @param {*} value The value to clone. + * @param {boolean} bitmask The bitmask flags. + * 1 - Deep clone + * 2 - Flatten inherited properties + * 4 - Clone symbols + * @param {Function} [customizer] The function to customize cloning. + * @param {string} [key] The key of `value`. + * @param {Object} [object] The parent object of `value`. + * @param {Object} [stack] Tracks traversed objects and their clone counterparts. + * @returns {*} Returns the cloned value. + */ + function baseClone(value, bitmask, customizer, key, object, stack) { + var result, + isDeep = bitmask & CLONE_DEEP_FLAG, + isFlat = bitmask & CLONE_FLAT_FLAG, + isFull = bitmask & CLONE_SYMBOLS_FLAG; + + if (customizer) { + result = object ? customizer(value, key, object, stack) : customizer(value); + } + if (result !== undefined) { + return result; + } + if (!isObject(value)) { + return value; + } + var isArr = isArray(value); + if (isArr) { + result = initCloneArray(value); + if (!isDeep) { + return copyArray(value, result); + } + } else { + var tag = getTag(value), + isFunc = tag == funcTag || tag == genTag; + + if (isBuffer(value)) { + return cloneBuffer(value, isDeep); + } + if (tag == objectTag || tag == argsTag || (isFunc && !object)) { + result = isFlat || isFunc ? {} : initCloneObject(value); + if (!isDeep) { + return isFlat + ? copySymbolsIn(value, baseAssignIn(result, value)) + : copySymbols(value, baseAssign(result, value)); + } + } else { + if (!cloneableTags[tag]) { + return object ? value : {}; + } + result = initCloneByTag(value, tag, isDeep); + } + } + // Check for circular references and return its corresponding clone. + stack || (stack = new Stack()); + var stacked = stack.get(value); + if (stacked) { + return stacked; + } + stack.set(value, result); + + if (isSet(value)) { + value.forEach(function (subValue) { + result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack)); + }); + } else if (isMap(value)) { + value.forEach(function (subValue, key) { + result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack)); + }); + } + + var keysFunc = isFull ? (isFlat ? getAllKeysIn : getAllKeys) : isFlat ? keysIn : keys; + + var props = isArr ? undefined : keysFunc(value); + arrayEach(props || value, function (subValue, key) { + if (props) { + key = subValue; + subValue = value[key]; + } + // Recursively populate clone (susceptible to call stack limits). + assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack)); + }); + return result; + } + + /** + * The base implementation of `_.conforms` which doesn't clone `source`. + * + * @private + * @param {Object} source The object of property predicates to conform to. + * @returns {Function} Returns the new spec function. + */ + function baseConforms(source) { + var props = keys(source); + return function (object) { + return baseConformsTo(object, source, props); + }; + } + + /** + * The base implementation of `_.conformsTo` which accepts `props` to check. + * + * @private + * @param {Object} object The object to inspect. + * @param {Object} source The object of property predicates to conform to. + * @returns {boolean} Returns `true` if `object` conforms, else `false`. + */ + function baseConformsTo(object, source, props) { + var length = props.length; + if (object == null) { + return !length; + } + object = Object(object); + while (length--) { + var key = props[length], + predicate = source[key], + value = object[key]; + + if ((value === undefined && !(key in object)) || !predicate(value)) { + return false; + } + } + return true; + } + + /** + * The base implementation of `_.delay` and `_.defer` which accepts `args` + * to provide to `func`. + * + * @private + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @param {Array} args The arguments to provide to `func`. + * @returns {number|Object} Returns the timer id or timeout object. + */ + function baseDelay(func, wait, args) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + return setTimeout(function () { + func.apply(undefined, args); + }, wait); + } + + /** + * The base implementation of methods like `_.difference` without support + * for excluding multiple arrays or iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Array} values The values to exclude. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of filtered values. + */ + function baseDifference(array, values, iteratee, comparator) { + var index = -1, + includes = arrayIncludes, + isCommon = true, + length = array.length, + result = [], + valuesLength = values.length; + + if (!length) { + return result; + } + if (iteratee) { + values = arrayMap(values, baseUnary(iteratee)); + } + if (comparator) { + includes = arrayIncludesWith; + isCommon = false; + } else if (values.length >= LARGE_ARRAY_SIZE) { + includes = cacheHas; + isCommon = false; + values = new SetCache(values); + } + outer: while (++index < length) { + var value = array[index], + computed = iteratee == null ? value : iteratee(value); + + value = comparator || value !== 0 ? value : 0; + if (isCommon && computed === computed) { + var valuesIndex = valuesLength; + while (valuesIndex--) { + if (values[valuesIndex] === computed) { + continue outer; + } + } + result.push(value); + } else if (!includes(values, computed, comparator)) { + result.push(value); + } + } + return result; + } + + /** + * The base implementation of `_.forEach` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + */ + var baseEach = createBaseEach(baseForOwn); + + /** + * The base implementation of `_.forEachRight` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + */ + var baseEachRight = createBaseEach(baseForOwnRight, true); + + /** + * The base implementation of `_.every` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false` + */ + function baseEvery(collection, predicate) { + var result = true; + baseEach(collection, function (value, index, collection) { + result = !!predicate(value, index, collection); + return result; + }); + return result; + } + + /** + * The base implementation of methods like `_.max` and `_.min` which accepts a + * `comparator` to determine the extremum value. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The iteratee invoked per iteration. + * @param {Function} comparator The comparator used to compare values. + * @returns {*} Returns the extremum value. + */ + function baseExtremum(array, iteratee, comparator) { + var index = -1, + length = array.length; + + while (++index < length) { + var value = array[index], + current = iteratee(value); + + if ( + current != null && + (computed === undefined + ? current === current && !isSymbol(current) + : comparator(current, computed)) + ) { + var computed = current, + result = value; + } + } + return result; + } + + /** + * The base implementation of `_.fill` without an iteratee call guard. + * + * @private + * @param {Array} array The array to fill. + * @param {*} value The value to fill `array` with. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns `array`. + */ + function baseFill(array, value, start, end) { + var length = array.length; + + start = toInteger(start); + if (start < 0) { + start = -start > length ? 0 : length + start; + } + end = end === undefined || end > length ? length : toInteger(end); + if (end < 0) { + end += length; + } + end = start > end ? 0 : toLength(end); + while (start < end) { + array[start++] = value; + } + return array; + } + + /** + * The base implementation of `_.filter` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ + function baseFilter(collection, predicate) { + var result = []; + baseEach(collection, function (value, index, collection) { + if (predicate(value, index, collection)) { + result.push(value); + } + }); + return result; + } + + /** + * The base implementation of `_.flatten` with support for restricting flattening. + * + * @private + * @param {Array} array The array to flatten. + * @param {number} depth The maximum recursion depth. + * @param {boolean} [predicate=isFlattenable] The function invoked per iteration. + * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks. + * @param {Array} [result=[]] The initial result value. + * @returns {Array} Returns the new flattened array. + */ + function baseFlatten(array, depth, predicate, isStrict, result) { + var index = -1, + length = array.length; + + predicate || (predicate = isFlattenable); + result || (result = []); + + while (++index < length) { + var value = array[index]; + if (depth > 0 && predicate(value)) { + if (depth > 1) { + // Recursively flatten arrays (susceptible to call stack limits). + baseFlatten(value, depth - 1, predicate, isStrict, result); + } else { + arrayPush(result, value); + } + } else if (!isStrict) { + result[result.length] = value; + } + } + return result; + } + + /** + * The base implementation of `baseForOwn` which iterates over `object` + * properties returned by `keysFunc` and invokes `iteratee` for each property. + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ + var baseFor = createBaseFor(); + + /** + * This function is like `baseFor` except that it iterates over properties + * in the opposite order. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ + var baseForRight = createBaseFor(true); + + /** + * The base implementation of `_.forOwn` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ + function baseForOwn(object, iteratee) { + return object && baseFor(object, iteratee, keys); + } + + /** + * The base implementation of `_.forOwnRight` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ + function baseForOwnRight(object, iteratee) { + return object && baseForRight(object, iteratee, keys); + } + + /** + * The base implementation of `_.functions` which creates an array of + * `object` function property names filtered from `props`. + * + * @private + * @param {Object} object The object to inspect. + * @param {Array} props The property names to filter. + * @returns {Array} Returns the function names. + */ + function baseFunctions(object, props) { + return arrayFilter(props, function (key) { + return isFunction(object[key]); + }); + } + + /** + * The base implementation of `_.get` without support for default values. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @returns {*} Returns the resolved value. + */ + function baseGet(object, path) { + path = castPath(path, object); + + var index = 0, + length = path.length; + + while (object != null && index < length) { + object = object[toKey(path[index++])]; + } + return index && index == length ? object : undefined; + } + + /** + * The base implementation of `getAllKeys` and `getAllKeysIn` which uses + * `keysFunc` and `symbolsFunc` to get the enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Function} keysFunc The function to get the keys of `object`. + * @param {Function} symbolsFunc The function to get the symbols of `object`. + * @returns {Array} Returns the array of property names and symbols. + */ + function baseGetAllKeys(object, keysFunc, symbolsFunc) { + var result = keysFunc(object); + return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); + } + + /** + * The base implementation of `getTag` without fallbacks for buggy environments. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ + function baseGetTag(value) { + if (value == null) { + return value === undefined ? undefinedTag : nullTag; + } + return symToStringTag && symToStringTag in Object(value) + ? getRawTag(value) + : objectToString(value); + } + + /** + * The base implementation of `_.gt` which doesn't coerce arguments. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than `other`, + * else `false`. + */ + function baseGt(value, other) { + return value > other; + } + + /** + * The base implementation of `_.has` without support for deep paths. + * + * @private + * @param {Object} [object] The object to query. + * @param {Array|string} key The key to check. + * @returns {boolean} Returns `true` if `key` exists, else `false`. + */ + function baseHas(object, key) { + return object != null && hasOwnProperty.call(object, key); + } + + /** + * The base implementation of `_.hasIn` without support for deep paths. + * + * @private + * @param {Object} [object] The object to query. + * @param {Array|string} key The key to check. + * @returns {boolean} Returns `true` if `key` exists, else `false`. + */ + function baseHasIn(object, key) { + return object != null && key in Object(object); + } + + /** + * The base implementation of `_.inRange` which doesn't coerce arguments. + * + * @private + * @param {number} number The number to check. + * @param {number} start The start of the range. + * @param {number} end The end of the range. + * @returns {boolean} Returns `true` if `number` is in the range, else `false`. + */ + function baseInRange(number, start, end) { + return number >= nativeMin(start, end) && number < nativeMax(start, end); + } + + /** + * The base implementation of methods like `_.intersection`, without support + * for iteratee shorthands, that accepts an array of arrays to inspect. + * + * @private + * @param {Array} arrays The arrays to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of shared values. + */ + function baseIntersection(arrays, iteratee, comparator) { + var includes = comparator ? arrayIncludesWith : arrayIncludes, + length = arrays[0].length, + othLength = arrays.length, + othIndex = othLength, + caches = Array(othLength), + maxLength = Infinity, + result = []; + + while (othIndex--) { + var array = arrays[othIndex]; + if (othIndex && iteratee) { + array = arrayMap(array, baseUnary(iteratee)); + } + maxLength = nativeMin(array.length, maxLength); + caches[othIndex] = + !comparator && (iteratee || (length >= 120 && array.length >= 120)) + ? new SetCache(othIndex && array) + : undefined; + } + array = arrays[0]; + + var index = -1, + seen = caches[0]; + + outer: while (++index < length && result.length < maxLength) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + value = comparator || value !== 0 ? value : 0; + if (!(seen ? cacheHas(seen, computed) : includes(result, computed, comparator))) { + othIndex = othLength; + while (--othIndex) { + var cache = caches[othIndex]; + if ( + !(cache ? cacheHas(cache, computed) : includes(arrays[othIndex], computed, comparator)) + ) { + continue outer; + } + } + if (seen) { + seen.push(computed); + } + result.push(value); + } + } + return result; + } + + /** + * The base implementation of `_.invert` and `_.invertBy` which inverts + * `object` with values transformed by `iteratee` and set by `setter`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} setter The function to set `accumulator` values. + * @param {Function} iteratee The iteratee to transform values. + * @param {Object} accumulator The initial inverted object. + * @returns {Function} Returns `accumulator`. + */ + function baseInverter(object, setter, iteratee, accumulator) { + baseForOwn(object, function (value, key, object) { + setter(accumulator, iteratee(value), key, object); + }); + return accumulator; + } + + /** + * The base implementation of `_.invoke` without support for individual + * method arguments. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path of the method to invoke. + * @param {Array} args The arguments to invoke the method with. + * @returns {*} Returns the result of the invoked method. + */ + function baseInvoke(object, path, args) { + path = castPath(path, object); + object = parent(object, path); + var func = object == null ? object : object[toKey(last(path))]; + return func == null ? undefined : apply(func, object, args); + } + + /** + * The base implementation of `_.isArguments`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + */ + function baseIsArguments(value) { + return isObjectLike(value) && baseGetTag(value) == argsTag; + } + + /** + * The base implementation of `_.isArrayBuffer` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`. + */ + function baseIsArrayBuffer(value) { + return isObjectLike(value) && baseGetTag(value) == arrayBufferTag; + } + + /** + * The base implementation of `_.isDate` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a date object, else `false`. + */ + function baseIsDate(value) { + return isObjectLike(value) && baseGetTag(value) == dateTag; + } + + /** + * The base implementation of `_.isEqual` which supports partial comparisons + * and tracks traversed objects. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {boolean} bitmask The bitmask flags. + * 1 - Unordered comparison + * 2 - Partial comparison + * @param {Function} [customizer] The function to customize comparisons. + * @param {Object} [stack] Tracks traversed `value` and `other` objects. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + */ + function baseIsEqual(value, other, bitmask, customizer, stack) { + if (value === other) { + return true; + } + if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) { + return value !== value && other !== other; + } + return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); + } + + /** + * A specialized version of `baseIsEqual` for arrays and objects which performs + * deep comparisons and tracks traversed objects enabling objects with circular + * references to be compared. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} [stack] Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { + var objIsArr = isArray(object), + othIsArr = isArray(other), + objTag = objIsArr ? arrayTag : getTag(object), + othTag = othIsArr ? arrayTag : getTag(other); + + objTag = objTag == argsTag ? objectTag : objTag; + othTag = othTag == argsTag ? objectTag : othTag; + + var objIsObj = objTag == objectTag, + othIsObj = othTag == objectTag, + isSameTag = objTag == othTag; + + if (isSameTag && isBuffer(object)) { + if (!isBuffer(other)) { + return false; + } + objIsArr = true; + objIsObj = false; + } + if (isSameTag && !objIsObj) { + stack || (stack = new Stack()); + return objIsArr || isTypedArray(object) + ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) + : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); + } + if (!(bitmask & COMPARE_PARTIAL_FLAG)) { + var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), + othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); + + if (objIsWrapped || othIsWrapped) { + var objUnwrapped = objIsWrapped ? object.value() : object, + othUnwrapped = othIsWrapped ? other.value() : other; + + stack || (stack = new Stack()); + return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); + } + } + if (!isSameTag) { + return false; + } + stack || (stack = new Stack()); + return equalObjects(object, other, bitmask, customizer, equalFunc, stack); + } + + /** + * The base implementation of `_.isMap` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a map, else `false`. + */ + function baseIsMap(value) { + return isObjectLike(value) && getTag(value) == mapTag; + } + + /** + * The base implementation of `_.isMatch` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @param {Array} matchData The property names, values, and compare flags to match. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + */ + function baseIsMatch(object, source, matchData, customizer) { + var index = matchData.length, + length = index, + noCustomizer = !customizer; + + if (object == null) { + return !length; + } + object = Object(object); + while (index--) { + var data = matchData[index]; + if (noCustomizer && data[2] ? data[1] !== object[data[0]] : !(data[0] in object)) { + return false; + } + } + while (++index < length) { + data = matchData[index]; + var key = data[0], + objValue = object[key], + srcValue = data[1]; + + if (noCustomizer && data[2]) { + if (objValue === undefined && !(key in object)) { + return false; + } + } else { + var stack = new Stack(); + if (customizer) { + var result = customizer(objValue, srcValue, key, object, source, stack); + } + if ( + !(result === undefined + ? baseIsEqual( + srcValue, + objValue, + COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, + customizer, + stack, + ) + : result) + ) { + return false; + } + } + } + return true; + } + + /** + * The base implementation of `_.isNative` without bad shim checks. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + */ + function baseIsNative(value) { + if (!isObject(value) || isMasked(value)) { + return false; + } + var pattern = isFunction(value) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); + } + + /** + * The base implementation of `_.isRegExp` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. + */ + function baseIsRegExp(value) { + return isObjectLike(value) && baseGetTag(value) == regexpTag; + } + + /** + * The base implementation of `_.isSet` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a set, else `false`. + */ + function baseIsSet(value) { + return isObjectLike(value) && getTag(value) == setTag; + } + + /** + * The base implementation of `_.isTypedArray` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + */ + function baseIsTypedArray(value) { + return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; + } + + /** + * The base implementation of `_.iteratee`. + * + * @private + * @param {*} [value=_.identity] The value to convert to an iteratee. + * @returns {Function} Returns the iteratee. + */ + function baseIteratee(value) { + // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9. + // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details. + if (typeof value == 'function') { + return value; + } + if (value == null) { + return identity; + } + if (typeof value == 'object') { + return isArray(value) ? baseMatchesProperty(value[0], value[1]) : baseMatches(value); + } + return property(value); + } + + /** + * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + function baseKeys(object) { + if (!isPrototype(object)) { + return nativeKeys(object); + } + var result = []; + for (var key in Object(object)) { + if (hasOwnProperty.call(object, key) && key != 'constructor') { + result.push(key); + } + } + return result; + } + + /** + * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + function baseKeysIn(object) { + if (!isObject(object)) { + return nativeKeysIn(object); + } + var isProto = isPrototype(object), + result = []; + + for (var key in object) { + if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { + result.push(key); + } + } + return result; + } + + /** + * The base implementation of `_.lt` which doesn't coerce arguments. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than `other`, + * else `false`. + */ + function baseLt(value, other) { + return value < other; + } + + /** + * The base implementation of `_.map` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ + function baseMap(collection, iteratee) { + var index = -1, + result = isArrayLike(collection) ? Array(collection.length) : []; + + baseEach(collection, function (value, key, collection) { + result[++index] = iteratee(value, key, collection); + }); + return result; + } + + /** + * The base implementation of `_.matches` which doesn't clone `source`. + * + * @private + * @param {Object} source The object of property values to match. + * @returns {Function} Returns the new spec function. + */ + function baseMatches(source) { + var matchData = getMatchData(source); + if (matchData.length == 1 && matchData[0][2]) { + return matchesStrictComparable(matchData[0][0], matchData[0][1]); + } + return function (object) { + return object === source || baseIsMatch(object, source, matchData); + }; + } + + /** + * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`. + * + * @private + * @param {string} path The path of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + */ + function baseMatchesProperty(path, srcValue) { + if (isKey(path) && isStrictComparable(srcValue)) { + return matchesStrictComparable(toKey(path), srcValue); + } + return function (object) { + var objValue = get(object, path); + return objValue === undefined && objValue === srcValue + ? hasIn(object, path) + : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG); + }; + } + + /** + * The base implementation of `_.merge` without support for multiple sources. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {number} srcIndex The index of `source`. + * @param {Function} [customizer] The function to customize merged values. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + */ + function baseMerge(object, source, srcIndex, customizer, stack) { + if (object === source) { + return; + } + baseFor( + source, + function (srcValue, key) { + stack || (stack = new Stack()); + if (isObject(srcValue)) { + baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack); + } else { + var newValue = customizer + ? customizer(safeGet(object, key), srcValue, key + '', object, source, stack) + : undefined; + + if (newValue === undefined) { + newValue = srcValue; + } + assignMergeValue(object, key, newValue); + } + }, + keysIn, + ); + } + + /** + * A specialized version of `baseMerge` for arrays and objects which performs + * deep merges and tracks traversed objects enabling objects with circular + * references to be merged. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {string} key The key of the value to merge. + * @param {number} srcIndex The index of `source`. + * @param {Function} mergeFunc The function to merge values. + * @param {Function} [customizer] The function to customize assigned values. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + */ + function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) { + var objValue = safeGet(object, key), + srcValue = safeGet(source, key), + stacked = stack.get(srcValue); + + if (stacked) { + assignMergeValue(object, key, stacked); + return; + } + var newValue = customizer + ? customizer(objValue, srcValue, key + '', object, source, stack) + : undefined; + + var isCommon = newValue === undefined; + + if (isCommon) { + var isArr = isArray(srcValue), + isBuff = !isArr && isBuffer(srcValue), + isTyped = !isArr && !isBuff && isTypedArray(srcValue); + + newValue = srcValue; + if (isArr || isBuff || isTyped) { + if (isArray(objValue)) { + newValue = objValue; + } else if (isArrayLikeObject(objValue)) { + newValue = copyArray(objValue); + } else if (isBuff) { + isCommon = false; + newValue = cloneBuffer(srcValue, true); + } else if (isTyped) { + isCommon = false; + newValue = cloneTypedArray(srcValue, true); + } else { + newValue = []; + } + } else if (isPlainObject(srcValue) || isArguments(srcValue)) { + newValue = objValue; + if (isArguments(objValue)) { + newValue = toPlainObject(objValue); + } else if (!isObject(objValue) || isFunction(objValue)) { + newValue = initCloneObject(srcValue); + } + } else { + isCommon = false; + } + } + if (isCommon) { + // Recursively merge objects and arrays (susceptible to call stack limits). + stack.set(srcValue, newValue); + mergeFunc(newValue, srcValue, srcIndex, customizer, stack); + stack['delete'](srcValue); + } + assignMergeValue(object, key, newValue); + } + + /** + * The base implementation of `_.nth` which doesn't coerce arguments. + * + * @private + * @param {Array} array The array to query. + * @param {number} n The index of the element to return. + * @returns {*} Returns the nth element of `array`. + */ + function baseNth(array, n) { + var length = array.length; + if (!length) { + return; + } + n += n < 0 ? length : 0; + return isIndex(n, length) ? array[n] : undefined; + } + + /** + * The base implementation of `_.orderBy` without param guards. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by. + * @param {string[]} orders The sort orders of `iteratees`. + * @returns {Array} Returns the new sorted array. + */ + function baseOrderBy(collection, iteratees, orders) { + var index = -1; + iteratees = arrayMap(iteratees.length ? iteratees : [identity], baseUnary(getIteratee())); + + var result = baseMap(collection, function (value, key, collection) { + var criteria = arrayMap(iteratees, function (iteratee) { + return iteratee(value); + }); + return { criteria: criteria, index: ++index, value: value }; + }); + + return baseSortBy(result, function (object, other) { + return compareMultiple(object, other, orders); + }); + } + + /** + * The base implementation of `_.pick` without support for individual + * property identifiers. + * + * @private + * @param {Object} object The source object. + * @param {string[]} paths The property paths to pick. + * @returns {Object} Returns the new object. + */ + function basePick(object, paths) { + return basePickBy(object, paths, function (value, path) { + return hasIn(object, path); + }); + } + + /** + * The base implementation of `_.pickBy` without support for iteratee shorthands. + * + * @private + * @param {Object} object The source object. + * @param {string[]} paths The property paths to pick. + * @param {Function} predicate The function invoked per property. + * @returns {Object} Returns the new object. + */ + function basePickBy(object, paths, predicate) { + var index = -1, + length = paths.length, + result = {}; + + while (++index < length) { + var path = paths[index], + value = baseGet(object, path); + + if (predicate(value, path)) { + baseSet(result, castPath(path, object), value); + } + } + return result; + } + + /** + * A specialized version of `baseProperty` which supports deep paths. + * + * @private + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new accessor function. + */ + function basePropertyDeep(path) { + return function (object) { + return baseGet(object, path); + }; + } + + /** + * The base implementation of `_.pullAllBy` without support for iteratee + * shorthands. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns `array`. + */ + function basePullAll(array, values, iteratee, comparator) { + var indexOf = comparator ? baseIndexOfWith : baseIndexOf, + index = -1, + length = values.length, + seen = array; + + if (array === values) { + values = copyArray(values); + } + if (iteratee) { + seen = arrayMap(array, baseUnary(iteratee)); + } + while (++index < length) { + var fromIndex = 0, + value = values[index], + computed = iteratee ? iteratee(value) : value; + + while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) { + if (seen !== array) { + splice.call(seen, fromIndex, 1); + } + splice.call(array, fromIndex, 1); + } + } + return array; + } + + /** + * The base implementation of `_.pullAt` without support for individual + * indexes or capturing the removed elements. + * + * @private + * @param {Array} array The array to modify. + * @param {number[]} indexes The indexes of elements to remove. + * @returns {Array} Returns `array`. + */ + function basePullAt(array, indexes) { + var length = array ? indexes.length : 0, + lastIndex = length - 1; + + while (length--) { + var index = indexes[length]; + if (length == lastIndex || index !== previous) { + var previous = index; + if (isIndex(index)) { + splice.call(array, index, 1); + } else { + baseUnset(array, index); + } + } + } + return array; + } + + /** + * The base implementation of `_.random` without support for returning + * floating-point numbers. + * + * @private + * @param {number} lower The lower bound. + * @param {number} upper The upper bound. + * @returns {number} Returns the random number. + */ + function baseRandom(lower, upper) { + return lower + nativeFloor(nativeRandom() * (upper - lower + 1)); + } + + /** + * The base implementation of `_.range` and `_.rangeRight` which doesn't + * coerce arguments. + * + * @private + * @param {number} start The start of the range. + * @param {number} end The end of the range. + * @param {number} step The value to increment or decrement by. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Array} Returns the range of numbers. + */ + function baseRange(start, end, step, fromRight) { + var index = -1, + length = nativeMax(nativeCeil((end - start) / (step || 1)), 0), + result = Array(length); + + while (length--) { + result[fromRight ? length : ++index] = start; + start += step; + } + return result; + } + + /** + * The base implementation of `_.repeat` which doesn't coerce arguments. + * + * @private + * @param {string} string The string to repeat. + * @param {number} n The number of times to repeat the string. + * @returns {string} Returns the repeated string. + */ + function baseRepeat(string, n) { + var result = ''; + if (!string || n < 1 || n > MAX_SAFE_INTEGER) { + return result; + } + // Leverage the exponentiation by squaring algorithm for a faster repeat. + // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details. + do { + if (n % 2) { + result += string; + } + n = nativeFloor(n / 2); + if (n) { + string += string; + } + } while (n); + + return result; + } + + /** + * The base implementation of `_.rest` which doesn't validate or coerce arguments. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + */ + function baseRest(func, start) { + return setToString(overRest(func, start, identity), func + ''); + } + + /** + * The base implementation of `_.sample`. + * + * @private + * @param {Array|Object} collection The collection to sample. + * @returns {*} Returns the random element. + */ + function baseSample(collection) { + return arraySample(values(collection)); + } + + /** + * The base implementation of `_.sampleSize` without param guards. + * + * @private + * @param {Array|Object} collection The collection to sample. + * @param {number} n The number of elements to sample. + * @returns {Array} Returns the random elements. + */ + function baseSampleSize(collection, n) { + var array = values(collection); + return shuffleSelf(array, baseClamp(n, 0, array.length)); + } + + /** + * The base implementation of `_.set`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @param {Function} [customizer] The function to customize path creation. + * @returns {Object} Returns `object`. + */ + function baseSet(object, path, value, customizer) { + if (!isObject(object)) { + return object; + } + path = castPath(path, object); + + var index = -1, + length = path.length, + lastIndex = length - 1, + nested = object; + + while (nested != null && ++index < length) { + var key = toKey(path[index]), + newValue = value; + + if (index != lastIndex) { + var objValue = nested[key]; + newValue = customizer ? customizer(objValue, key, nested) : undefined; + if (newValue === undefined) { + newValue = isObject(objValue) ? objValue : isIndex(path[index + 1]) ? [] : {}; + } + } + assignValue(nested, key, newValue); + nested = nested[key]; + } + return object; + } + + /** + * The base implementation of `setData` without support for hot loop shorting. + * + * @private + * @param {Function} func The function to associate metadata with. + * @param {*} data The metadata. + * @returns {Function} Returns `func`. + */ + var baseSetData = !metaMap + ? identity + : function (func, data) { + metaMap.set(func, data); + return func; + }; + + /** + * The base implementation of `setToString` without support for hot loop shorting. + * + * @private + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. + */ + var baseSetToString = !defineProperty + ? identity + : function (func, string) { + return defineProperty(func, 'toString', { + configurable: true, + enumerable: false, + value: constant(string), + writable: true, + }); + }; + + /** + * The base implementation of `_.shuffle`. + * + * @private + * @param {Array|Object} collection The collection to shuffle. + * @returns {Array} Returns the new shuffled array. + */ + function baseShuffle(collection) { + return shuffleSelf(values(collection)); + } + + /** + * The base implementation of `_.slice` without an iteratee call guard. + * + * @private + * @param {Array} array The array to slice. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the slice of `array`. + */ + function baseSlice(array, start, end) { + var index = -1, + length = array.length; + + if (start < 0) { + start = -start > length ? 0 : length + start; + } + end = end > length ? length : end; + if (end < 0) { + end += length; + } + length = start > end ? 0 : (end - start) >>> 0; + start >>>= 0; + + var result = Array(length); + while (++index < length) { + result[index] = array[index + start]; + } + return result; + } + + /** + * The base implementation of `_.some` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ + function baseSome(collection, predicate) { + var result; + + baseEach(collection, function (value, index, collection) { + result = predicate(value, index, collection); + return !result; + }); + return !!result; + } + + /** + * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which + * performs a binary search of `array` to determine the index at which `value` + * should be inserted into `array` in order to maintain its sort order. + * + * @private + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {boolean} [retHighest] Specify returning the highest qualified index. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + */ + function baseSortedIndex(array, value, retHighest) { + var low = 0, + high = array == null ? low : array.length; + + if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) { + while (low < high) { + var mid = (low + high) >>> 1, + computed = array[mid]; + + if ( + computed !== null && + !isSymbol(computed) && + (retHighest ? computed <= value : computed < value) + ) { + low = mid + 1; + } else { + high = mid; + } + } + return high; + } + return baseSortedIndexBy(array, value, identity, retHighest); + } + + /** + * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy` + * which invokes `iteratee` for `value` and each element of `array` to compute + * their sort ranking. The iteratee is invoked with one argument; (value). + * + * @private + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function} iteratee The iteratee invoked per element. + * @param {boolean} [retHighest] Specify returning the highest qualified index. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + */ + function baseSortedIndexBy(array, value, iteratee, retHighest) { + value = iteratee(value); + + var low = 0, + high = array == null ? 0 : array.length, + valIsNaN = value !== value, + valIsNull = value === null, + valIsSymbol = isSymbol(value), + valIsUndefined = value === undefined; + + while (low < high) { + var mid = nativeFloor((low + high) / 2), + computed = iteratee(array[mid]), + othIsDefined = computed !== undefined, + othIsNull = computed === null, + othIsReflexive = computed === computed, + othIsSymbol = isSymbol(computed); + + if (valIsNaN) { + var setLow = retHighest || othIsReflexive; + } else if (valIsUndefined) { + setLow = othIsReflexive && (retHighest || othIsDefined); + } else if (valIsNull) { + setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull); + } else if (valIsSymbol) { + setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol); + } else if (othIsNull || othIsSymbol) { + setLow = false; + } else { + setLow = retHighest ? computed <= value : computed < value; + } + if (setLow) { + low = mid + 1; + } else { + high = mid; + } + } + return nativeMin(high, MAX_ARRAY_INDEX); + } + + /** + * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without + * support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @returns {Array} Returns the new duplicate free array. + */ + function baseSortedUniq(array, iteratee) { + var index = -1, + length = array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + if (!index || !eq(computed, seen)) { + var seen = computed; + result[resIndex++] = value === 0 ? 0 : value; + } + } + return result; + } + + /** + * The base implementation of `_.toNumber` which doesn't ensure correct + * conversions of binary, hexadecimal, or octal string values. + * + * @private + * @param {*} value The value to process. + * @returns {number} Returns the number. + */ + function baseToNumber(value) { + if (typeof value == 'number') { + return value; + } + if (isSymbol(value)) { + return NAN; + } + return +value; + } + + /** + * The base implementation of `_.toString` which doesn't convert nullish + * values to empty strings. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ + function baseToString(value) { + // Exit early for strings to avoid a performance hit in some environments. + if (typeof value == 'string') { + return value; + } + if (isArray(value)) { + // Recursively convert values (susceptible to call stack limits). + return arrayMap(value, baseToString) + ''; + } + if (isSymbol(value)) { + return symbolToString ? symbolToString.call(value) : ''; + } + var result = value + ''; + return result == '0' && 1 / value == -INFINITY ? '-0' : result; + } + + /** + * The base implementation of `_.uniqBy` without support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new duplicate free array. + */ + function baseUniq(array, iteratee, comparator) { + var index = -1, + includes = arrayIncludes, + length = array.length, + isCommon = true, + result = [], + seen = result; + + if (comparator) { + isCommon = false; + includes = arrayIncludesWith; + } else if (length >= LARGE_ARRAY_SIZE) { + var set = iteratee ? null : createSet(array); + if (set) { + return setToArray(set); + } + isCommon = false; + includes = cacheHas; + seen = new SetCache(); + } else { + seen = iteratee ? [] : result; + } + outer: while (++index < length) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + value = comparator || value !== 0 ? value : 0; + if (isCommon && computed === computed) { + var seenIndex = seen.length; + while (seenIndex--) { + if (seen[seenIndex] === computed) { + continue outer; + } + } + if (iteratee) { + seen.push(computed); + } + result.push(value); + } else if (!includes(seen, computed, comparator)) { + if (seen !== result) { + seen.push(computed); + } + result.push(value); + } + } + return result; + } + + /** + * The base implementation of `_.unset`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The property path to unset. + * @returns {boolean} Returns `true` if the property is deleted, else `false`. + */ + function baseUnset(object, path) { + path = castPath(path, object); + object = parent(object, path); + return object == null || delete object[toKey(last(path))]; + } + + /** + * The base implementation of `_.update`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to update. + * @param {Function} updater The function to produce the updated value. + * @param {Function} [customizer] The function to customize path creation. + * @returns {Object} Returns `object`. + */ + function baseUpdate(object, path, updater, customizer) { + return baseSet(object, path, updater(baseGet(object, path)), customizer); + } + + /** + * The base implementation of methods like `_.dropWhile` and `_.takeWhile` + * without support for iteratee shorthands. + * + * @private + * @param {Array} array The array to query. + * @param {Function} predicate The function invoked per iteration. + * @param {boolean} [isDrop] Specify dropping elements instead of taking them. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Array} Returns the slice of `array`. + */ + function baseWhile(array, predicate, isDrop, fromRight) { + var length = array.length, + index = fromRight ? length : -1; + + while ((fromRight ? index-- : ++index < length) && predicate(array[index], index, array)) {} + + return isDrop + ? baseSlice(array, fromRight ? 0 : index, fromRight ? index + 1 : length) + : baseSlice(array, fromRight ? index + 1 : 0, fromRight ? length : index); + } + + /** + * The base implementation of `wrapperValue` which returns the result of + * performing a sequence of actions on the unwrapped `value`, where each + * successive action is supplied the return value of the previous. + * + * @private + * @param {*} value The unwrapped value. + * @param {Array} actions Actions to perform to resolve the unwrapped value. + * @returns {*} Returns the resolved value. + */ + function baseWrapperValue(value, actions) { + var result = value; + if (result instanceof LazyWrapper) { + result = result.value(); + } + return arrayReduce( + actions, + function (result, action) { + return action.func.apply(action.thisArg, arrayPush([result], action.args)); + }, + result, + ); + } + + /** + * The base implementation of methods like `_.xor`, without support for + * iteratee shorthands, that accepts an array of arrays to inspect. + * + * @private + * @param {Array} arrays The arrays to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of values. + */ + function baseXor(arrays, iteratee, comparator) { + var length = arrays.length; + if (length < 2) { + return length ? baseUniq(arrays[0]) : []; + } + var index = -1, + result = Array(length); + + while (++index < length) { + var array = arrays[index], + othIndex = -1; + + while (++othIndex < length) { + if (othIndex != index) { + result[index] = baseDifference( + result[index] || array, + arrays[othIndex], + iteratee, + comparator, + ); + } + } + } + return baseUniq(baseFlatten(result, 1), iteratee, comparator); + } + + /** + * This base implementation of `_.zipObject` which assigns values using `assignFunc`. + * + * @private + * @param {Array} props The property identifiers. + * @param {Array} values The property values. + * @param {Function} assignFunc The function to assign values. + * @returns {Object} Returns the new object. + */ + function baseZipObject(props, values, assignFunc) { + var index = -1, + length = props.length, + valsLength = values.length, + result = {}; + + while (++index < length) { + var value = index < valsLength ? values[index] : undefined; + assignFunc(result, props[index], value); + } + return result; + } + + /** + * Casts `value` to an empty array if it's not an array like object. + * + * @private + * @param {*} value The value to inspect. + * @returns {Array|Object} Returns the cast array-like object. + */ + function castArrayLikeObject(value) { + return isArrayLikeObject(value) ? value : []; + } + + /** + * Casts `value` to `identity` if it's not a function. + * + * @private + * @param {*} value The value to inspect. + * @returns {Function} Returns cast function. + */ + function castFunction(value) { + return typeof value == 'function' ? value : identity; + } + + /** + * Casts `value` to a path array if it's not one. + * + * @private + * @param {*} value The value to inspect. + * @param {Object} [object] The object to query keys on. + * @returns {Array} Returns the cast property path array. + */ + function castPath(value, object) { + if (isArray(value)) { + return value; + } + return isKey(value, object) ? [value] : stringToPath(toString(value)); + } + + /** + * A `baseRest` alias which can be replaced with `identity` by module + * replacement plugins. + * + * @private + * @type {Function} + * @param {Function} func The function to apply a rest parameter to. + * @returns {Function} Returns the new function. + */ + var castRest = baseRest; + + /** + * Casts `array` to a slice if it's needed. + * + * @private + * @param {Array} array The array to inspect. + * @param {number} start The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the cast slice. + */ + function castSlice(array, start, end) { + var length = array.length; + end = end === undefined ? length : end; + return !start && end >= length ? array : baseSlice(array, start, end); + } + + /** + * A simple wrapper around the global [`clearTimeout`](https://mdn.io/clearTimeout). + * + * @private + * @param {number|Object} id The timer id or timeout object of the timer to clear. + */ + var clearTimeout = + ctxClearTimeout || + function (id) { + return root.clearTimeout(id); + }; + + /** + * Creates a clone of `buffer`. + * + * @private + * @param {Buffer} buffer The buffer to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Buffer} Returns the cloned buffer. + */ + function cloneBuffer(buffer, isDeep) { + if (isDeep) { + return buffer.slice(); + } + var length = buffer.length, + result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length); + + buffer.copy(result); + return result; + } + + /** + * Creates a clone of `arrayBuffer`. + * + * @private + * @param {ArrayBuffer} arrayBuffer The array buffer to clone. + * @returns {ArrayBuffer} Returns the cloned array buffer. + */ + function cloneArrayBuffer(arrayBuffer) { + var result = new arrayBuffer.constructor(arrayBuffer.byteLength); + new Uint8Array(result).set(new Uint8Array(arrayBuffer)); + return result; + } + + /** + * Creates a clone of `dataView`. + * + * @private + * @param {Object} dataView The data view to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned data view. + */ + function cloneDataView(dataView, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer; + return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); + } + + /** + * Creates a clone of `regexp`. + * + * @private + * @param {Object} regexp The regexp to clone. + * @returns {Object} Returns the cloned regexp. + */ + function cloneRegExp(regexp) { + var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); + result.lastIndex = regexp.lastIndex; + return result; + } + + /** + * Creates a clone of the `symbol` object. + * + * @private + * @param {Object} symbol The symbol object to clone. + * @returns {Object} Returns the cloned symbol object. + */ + function cloneSymbol(symbol) { + return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; + } + + /** + * Creates a clone of `typedArray`. + * + * @private + * @param {Object} typedArray The typed array to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned typed array. + */ + function cloneTypedArray(typedArray, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; + return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); + } + + /** + * Compares values to sort them in ascending order. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {number} Returns the sort order indicator for `value`. + */ + function compareAscending(value, other) { + if (value !== other) { + var valIsDefined = value !== undefined, + valIsNull = value === null, + valIsReflexive = value === value, + valIsSymbol = isSymbol(value); + + var othIsDefined = other !== undefined, + othIsNull = other === null, + othIsReflexive = other === other, + othIsSymbol = isSymbol(other); + + if ( + (!othIsNull && !othIsSymbol && !valIsSymbol && value > other) || + (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) || + (valIsNull && othIsDefined && othIsReflexive) || + (!valIsDefined && othIsReflexive) || + !valIsReflexive + ) { + return 1; + } + if ( + (!valIsNull && !valIsSymbol && !othIsSymbol && value < other) || + (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) || + (othIsNull && valIsDefined && valIsReflexive) || + (!othIsDefined && valIsReflexive) || + !othIsReflexive + ) { + return -1; + } + } + return 0; + } + + /** + * Used by `_.orderBy` to compare multiple properties of a value to another + * and stable sort them. + * + * If `orders` is unspecified, all values are sorted in ascending order. Otherwise, + * specify an order of "desc" for descending or "asc" for ascending sort order + * of corresponding values. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {boolean[]|string[]} orders The order to sort by for each property. + * @returns {number} Returns the sort order indicator for `object`. + */ + function compareMultiple(object, other, orders) { + var index = -1, + objCriteria = object.criteria, + othCriteria = other.criteria, + length = objCriteria.length, + ordersLength = orders.length; + + while (++index < length) { + var result = compareAscending(objCriteria[index], othCriteria[index]); + if (result) { + if (index >= ordersLength) { + return result; + } + var order = orders[index]; + return result * (order == 'desc' ? -1 : 1); + } + } + // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications + // that causes it, under certain circumstances, to provide the same value for + // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247 + // for more details. + // + // This also ensures a stable sort in V8 and other engines. + // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details. + return object.index - other.index; + } + + /** + * Creates an array that is the composition of partially applied arguments, + * placeholders, and provided arguments into a single array of arguments. + * + * @private + * @param {Array} args The provided arguments. + * @param {Array} partials The arguments to prepend to those provided. + * @param {Array} holders The `partials` placeholder indexes. + * @params {boolean} [isCurried] Specify composing for a curried function. + * @returns {Array} Returns the new array of composed arguments. + */ + function composeArgs(args, partials, holders, isCurried) { + var argsIndex = -1, + argsLength = args.length, + holdersLength = holders.length, + leftIndex = -1, + leftLength = partials.length, + rangeLength = nativeMax(argsLength - holdersLength, 0), + result = Array(leftLength + rangeLength), + isUncurried = !isCurried; + + while (++leftIndex < leftLength) { + result[leftIndex] = partials[leftIndex]; + } + while (++argsIndex < holdersLength) { + if (isUncurried || argsIndex < argsLength) { + result[holders[argsIndex]] = args[argsIndex]; + } + } + while (rangeLength--) { + result[leftIndex++] = args[argsIndex++]; + } + return result; + } + + /** + * This function is like `composeArgs` except that the arguments composition + * is tailored for `_.partialRight`. + * + * @private + * @param {Array} args The provided arguments. + * @param {Array} partials The arguments to append to those provided. + * @param {Array} holders The `partials` placeholder indexes. + * @params {boolean} [isCurried] Specify composing for a curried function. + * @returns {Array} Returns the new array of composed arguments. + */ + function composeArgsRight(args, partials, holders, isCurried) { + var argsIndex = -1, + argsLength = args.length, + holdersIndex = -1, + holdersLength = holders.length, + rightIndex = -1, + rightLength = partials.length, + rangeLength = nativeMax(argsLength - holdersLength, 0), + result = Array(rangeLength + rightLength), + isUncurried = !isCurried; + + while (++argsIndex < rangeLength) { + result[argsIndex] = args[argsIndex]; + } + var offset = argsIndex; + while (++rightIndex < rightLength) { + result[offset + rightIndex] = partials[rightIndex]; + } + while (++holdersIndex < holdersLength) { + if (isUncurried || argsIndex < argsLength) { + result[offset + holders[holdersIndex]] = args[argsIndex++]; + } + } + return result; + } + + /** + * Copies the values of `source` to `array`. + * + * @private + * @param {Array} source The array to copy values from. + * @param {Array} [array=[]] The array to copy values to. + * @returns {Array} Returns `array`. + */ + function copyArray(source, array) { + var index = -1, + length = source.length; + + array || (array = Array(length)); + while (++index < length) { + array[index] = source[index]; + } + return array; + } + + /** + * Copies properties of `source` to `object`. + * + * @private + * @param {Object} source The object to copy properties from. + * @param {Array} props The property identifiers to copy. + * @param {Object} [object={}] The object to copy properties to. + * @param {Function} [customizer] The function to customize copied values. + * @returns {Object} Returns `object`. + */ + function copyObject(source, props, object, customizer) { + var isNew = !object; + object || (object = {}); + + var index = -1, + length = props.length; + + while (++index < length) { + var key = props[index]; + + var newValue = customizer + ? customizer(object[key], source[key], key, object, source) + : undefined; + + if (newValue === undefined) { + newValue = source[key]; + } + if (isNew) { + baseAssignValue(object, key, newValue); + } else { + assignValue(object, key, newValue); + } + } + return object; + } + + /** + * Copies own symbols of `source` to `object`. + * + * @private + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. + */ + function copySymbols(source, object) { + return copyObject(source, getSymbols(source), object); + } + + /** + * Copies own and inherited symbols of `source` to `object`. + * + * @private + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. + */ + function copySymbolsIn(source, object) { + return copyObject(source, getSymbolsIn(source), object); + } + + /** + * Creates a function like `_.groupBy`. + * + * @private + * @param {Function} setter The function to set accumulator values. + * @param {Function} [initializer] The accumulator object initializer. + * @returns {Function} Returns the new aggregator function. + */ + function createAggregator(setter, initializer) { + return function (collection, iteratee) { + var func = isArray(collection) ? arrayAggregator : baseAggregator, + accumulator = initializer ? initializer() : {}; + + return func(collection, setter, getIteratee(iteratee, 2), accumulator); + }; + } + + /** + * Creates a function like `_.assign`. + * + * @private + * @param {Function} assigner The function to assign values. + * @returns {Function} Returns the new assigner function. + */ + function createAssigner(assigner) { + return baseRest(function (object, sources) { + var index = -1, + length = sources.length, + customizer = length > 1 ? sources[length - 1] : undefined, + guard = length > 2 ? sources[2] : undefined; + + customizer = + assigner.length > 3 && typeof customizer == 'function' ? (length--, customizer) : undefined; + + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + customizer = length < 3 ? undefined : customizer; + length = 1; + } + object = Object(object); + while (++index < length) { + var source = sources[index]; + if (source) { + assigner(object, source, index, customizer); + } + } + return object; + }); + } + + /** + * Creates a `baseEach` or `baseEachRight` function. + * + * @private + * @param {Function} eachFunc The function to iterate over a collection. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ + function createBaseEach(eachFunc, fromRight) { + return function (collection, iteratee) { + if (collection == null) { + return collection; + } + if (!isArrayLike(collection)) { + return eachFunc(collection, iteratee); + } + var length = collection.length, + index = fromRight ? length : -1, + iterable = Object(collection); + + while (fromRight ? index-- : ++index < length) { + if (iteratee(iterable[index], index, iterable) === false) { + break; + } + } + return collection; + }; + } + + /** + * Creates a base function for methods like `_.forIn` and `_.forOwn`. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ + function createBaseFor(fromRight) { + return function (object, iteratee, keysFunc) { + var index = -1, + iterable = Object(object), + props = keysFunc(object), + length = props.length; + + while (length--) { + var key = props[fromRight ? length : ++index]; + if (iteratee(iterable[key], key, iterable) === false) { + break; + } + } + return object; + }; + } + + /** + * Creates a function that wraps `func` to invoke it with the optional `this` + * binding of `thisArg`. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {*} [thisArg] The `this` binding of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createBind(func, bitmask, thisArg) { + var isBind = bitmask & WRAP_BIND_FLAG, + Ctor = createCtor(func); + + function wrapper() { + var fn = this && this !== root && this instanceof wrapper ? Ctor : func; + return fn.apply(isBind ? thisArg : this, arguments); + } + return wrapper; + } + + /** + * Creates a function like `_.lowerFirst`. + * + * @private + * @param {string} methodName The name of the `String` case method to use. + * @returns {Function} Returns the new case function. + */ + function createCaseFirst(methodName) { + return function (string) { + string = toString(string); + + var strSymbols = hasUnicode(string) ? stringToArray(string) : undefined; + + var chr = strSymbols ? strSymbols[0] : string.charAt(0); + + var trailing = strSymbols ? castSlice(strSymbols, 1).join('') : string.slice(1); + + return chr[methodName]() + trailing; + }; + } + + /** + * Creates a function like `_.camelCase`. + * + * @private + * @param {Function} callback The function to combine each word. + * @returns {Function} Returns the new compounder function. + */ + function createCompounder(callback) { + return function (string) { + return arrayReduce(words(deburr(string).replace(reApos, '')), callback, ''); + }; + } + + /** + * Creates a function that produces an instance of `Ctor` regardless of + * whether it was invoked as part of a `new` expression or by `call` or `apply`. + * + * @private + * @param {Function} Ctor The constructor to wrap. + * @returns {Function} Returns the new wrapped function. + */ + function createCtor(Ctor) { + return function () { + // Use a `switch` statement to work with class constructors. See + // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist + // for more details. + var args = arguments; + switch (args.length) { + case 0: + return new Ctor(); + case 1: + return new Ctor(args[0]); + case 2: + return new Ctor(args[0], args[1]); + case 3: + return new Ctor(args[0], args[1], args[2]); + case 4: + return new Ctor(args[0], args[1], args[2], args[3]); + case 5: + return new Ctor(args[0], args[1], args[2], args[3], args[4]); + case 6: + return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]); + case 7: + return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]); + } + var thisBinding = baseCreate(Ctor.prototype), + result = Ctor.apply(thisBinding, args); + + // Mimic the constructor's `return` behavior. + // See https://es5.github.io/#x13.2.2 for more details. + return isObject(result) ? result : thisBinding; + }; + } + + /** + * Creates a function that wraps `func` to enable currying. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {number} arity The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createCurry(func, bitmask, arity) { + var Ctor = createCtor(func); + + function wrapper() { + var length = arguments.length, + args = Array(length), + index = length, + placeholder = getHolder(wrapper); + + while (index--) { + args[index] = arguments[index]; + } + var holders = + length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder + ? [] + : replaceHolders(args, placeholder); + + length -= holders.length; + if (length < arity) { + return createRecurry( + func, + bitmask, + createHybrid, + wrapper.placeholder, + undefined, + args, + holders, + undefined, + undefined, + arity - length, + ); + } + var fn = this && this !== root && this instanceof wrapper ? Ctor : func; + return apply(fn, this, args); + } + return wrapper; + } + + /** + * Creates a `_.find` or `_.findLast` function. + * + * @private + * @param {Function} findIndexFunc The function to find the collection index. + * @returns {Function} Returns the new find function. + */ + function createFind(findIndexFunc) { + return function (collection, predicate, fromIndex) { + var iterable = Object(collection); + if (!isArrayLike(collection)) { + var iteratee = getIteratee(predicate, 3); + collection = keys(collection); + predicate = function (key) { + return iteratee(iterable[key], key, iterable); + }; + } + var index = findIndexFunc(collection, predicate, fromIndex); + return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined; + }; + } + + /** + * Creates a `_.flow` or `_.flowRight` function. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new flow function. + */ + function createFlow(fromRight) { + return flatRest(function (funcs) { + var length = funcs.length, + index = length, + prereq = LodashWrapper.prototype.thru; + + if (fromRight) { + funcs.reverse(); + } + while (index--) { + var func = funcs[index]; + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + if (prereq && !wrapper && getFuncName(func) == 'wrapper') { + var wrapper = new LodashWrapper([], true); + } + } + index = wrapper ? index : length; + while (++index < length) { + func = funcs[index]; + + var funcName = getFuncName(func), + data = funcName == 'wrapper' ? getData(func) : undefined; + + if ( + data && + isLaziable(data[0]) && + data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) && + !data[4].length && + data[9] == 1 + ) { + wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]); + } else { + wrapper = func.length == 1 && isLaziable(func) ? wrapper[funcName]() : wrapper.thru(func); + } + } + return function () { + var args = arguments, + value = args[0]; + + if (wrapper && args.length == 1 && isArray(value)) { + return wrapper.plant(value).value(); + } + var index = 0, + result = length ? funcs[index].apply(this, args) : value; + + while (++index < length) { + result = funcs[index].call(this, result); + } + return result; + }; + }); + } + + /** + * Creates a function that wraps `func` to invoke it with optional `this` + * binding of `thisArg`, partial application, and currying. + * + * @private + * @param {Function|string} func The function or method name to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to prepend to those provided to + * the new function. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [partialsRight] The arguments to append to those provided + * to the new function. + * @param {Array} [holdersRight] The `partialsRight` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createHybrid( + func, + bitmask, + thisArg, + partials, + holders, + partialsRight, + holdersRight, + argPos, + ary, + arity, + ) { + var isAry = bitmask & WRAP_ARY_FLAG, + isBind = bitmask & WRAP_BIND_FLAG, + isBindKey = bitmask & WRAP_BIND_KEY_FLAG, + isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG), + isFlip = bitmask & WRAP_FLIP_FLAG, + Ctor = isBindKey ? undefined : createCtor(func); + + function wrapper() { + var length = arguments.length, + args = Array(length), + index = length; + + while (index--) { + args[index] = arguments[index]; + } + if (isCurried) { + var placeholder = getHolder(wrapper), + holdersCount = countHolders(args, placeholder); + } + if (partials) { + args = composeArgs(args, partials, holders, isCurried); + } + if (partialsRight) { + args = composeArgsRight(args, partialsRight, holdersRight, isCurried); + } + length -= holdersCount; + if (isCurried && length < arity) { + var newHolders = replaceHolders(args, placeholder); + return createRecurry( + func, + bitmask, + createHybrid, + wrapper.placeholder, + thisArg, + args, + newHolders, + argPos, + ary, + arity - length, + ); + } + var thisBinding = isBind ? thisArg : this, + fn = isBindKey ? thisBinding[func] : func; + + length = args.length; + if (argPos) { + args = reorder(args, argPos); + } else if (isFlip && length > 1) { + args.reverse(); + } + if (isAry && ary < length) { + args.length = ary; + } + if (this && this !== root && this instanceof wrapper) { + fn = Ctor || createCtor(fn); + } + return fn.apply(thisBinding, args); + } + return wrapper; + } + + /** + * Creates a function like `_.invertBy`. + * + * @private + * @param {Function} setter The function to set accumulator values. + * @param {Function} toIteratee The function to resolve iteratees. + * @returns {Function} Returns the new inverter function. + */ + function createInverter(setter, toIteratee) { + return function (object, iteratee) { + return baseInverter(object, setter, toIteratee(iteratee), {}); + }; + } + + /** + * Creates a function that performs a mathematical operation on two values. + * + * @private + * @param {Function} operator The function to perform the operation. + * @param {number} [defaultValue] The value used for `undefined` arguments. + * @returns {Function} Returns the new mathematical operation function. + */ + function createMathOperation(operator, defaultValue) { + return function (value, other) { + var result; + if (value === undefined && other === undefined) { + return defaultValue; + } + if (value !== undefined) { + result = value; + } + if (other !== undefined) { + if (result === undefined) { + return other; + } + if (typeof value == 'string' || typeof other == 'string') { + value = baseToString(value); + other = baseToString(other); + } else { + value = baseToNumber(value); + other = baseToNumber(other); + } + result = operator(value, other); + } + return result; + }; + } + + /** + * Creates a function like `_.over`. + * + * @private + * @param {Function} arrayFunc The function to iterate over iteratees. + * @returns {Function} Returns the new over function. + */ + function createOver(arrayFunc) { + return flatRest(function (iteratees) { + iteratees = arrayMap(iteratees, baseUnary(getIteratee())); + return baseRest(function (args) { + var thisArg = this; + return arrayFunc(iteratees, function (iteratee) { + return apply(iteratee, thisArg, args); + }); + }); + }); + } + + /** + * Creates the padding for `string` based on `length`. The `chars` string + * is truncated if the number of characters exceeds `length`. + * + * @private + * @param {number} length The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padding for `string`. + */ + function createPadding(length, chars) { + chars = chars === undefined ? ' ' : baseToString(chars); + + var charsLength = chars.length; + if (charsLength < 2) { + return charsLength ? baseRepeat(chars, length) : chars; + } + var result = baseRepeat(chars, nativeCeil(length / stringSize(chars))); + return hasUnicode(chars) + ? castSlice(stringToArray(result), 0, length).join('') + : result.slice(0, length); + } + + /** + * Creates a function that wraps `func` to invoke it with the `this` binding + * of `thisArg` and `partials` prepended to the arguments it receives. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} partials The arguments to prepend to those provided to + * the new function. + * @returns {Function} Returns the new wrapped function. + */ + function createPartial(func, bitmask, thisArg, partials) { + var isBind = bitmask & WRAP_BIND_FLAG, + Ctor = createCtor(func); + + function wrapper() { + var argsIndex = -1, + argsLength = arguments.length, + leftIndex = -1, + leftLength = partials.length, + args = Array(leftLength + argsLength), + fn = this && this !== root && this instanceof wrapper ? Ctor : func; + + while (++leftIndex < leftLength) { + args[leftIndex] = partials[leftIndex]; + } + while (argsLength--) { + args[leftIndex++] = arguments[++argsIndex]; + } + return apply(fn, isBind ? thisArg : this, args); + } + return wrapper; + } + + /** + * Creates a `_.range` or `_.rangeRight` function. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new range function. + */ + function createRange(fromRight) { + return function (start, end, step) { + if (step && typeof step != 'number' && isIterateeCall(start, end, step)) { + end = step = undefined; + } + // Ensure the sign of `-0` is preserved. + start = toFinite(start); + if (end === undefined) { + end = start; + start = 0; + } else { + end = toFinite(end); + } + step = step === undefined ? (start < end ? 1 : -1) : toFinite(step); + return baseRange(start, end, step, fromRight); + }; + } + + /** + * Creates a function that performs a relational operation on two values. + * + * @private + * @param {Function} operator The function to perform the operation. + * @returns {Function} Returns the new relational operation function. + */ + function createRelationalOperation(operator) { + return function (value, other) { + if (!(typeof value == 'string' && typeof other == 'string')) { + value = toNumber(value); + other = toNumber(other); + } + return operator(value, other); + }; + } + + /** + * Creates a function that wraps `func` to continue currying. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {Function} wrapFunc The function to create the `func` wrapper. + * @param {*} placeholder The placeholder value. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to prepend to those provided to + * the new function. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createRecurry( + func, + bitmask, + wrapFunc, + placeholder, + thisArg, + partials, + holders, + argPos, + ary, + arity, + ) { + var isCurry = bitmask & WRAP_CURRY_FLAG, + newHolders = isCurry ? holders : undefined, + newHoldersRight = isCurry ? undefined : holders, + newPartials = isCurry ? partials : undefined, + newPartialsRight = isCurry ? undefined : partials; + + bitmask |= isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG; + bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG); + + if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) { + bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG); + } + var newData = [ + func, + bitmask, + thisArg, + newPartials, + newHolders, + newPartialsRight, + newHoldersRight, + argPos, + ary, + arity, + ]; + + var result = wrapFunc.apply(undefined, newData); + if (isLaziable(func)) { + setData(result, newData); + } + result.placeholder = placeholder; + return setWrapToString(result, func, bitmask); + } + + /** + * Creates a function like `_.round`. + * + * @private + * @param {string} methodName The name of the `Math` method to use when rounding. + * @returns {Function} Returns the new round function. + */ + function createRound(methodName) { + var func = Math[methodName]; + return function (number, precision) { + number = toNumber(number); + precision = precision == null ? 0 : nativeMin(toInteger(precision), 292); + if (precision && nativeIsFinite(number)) { + // Shift with exponential notation to avoid floating-point issues. + // See [MDN](https://mdn.io/round#Examples) for more details. + var pair = (toString(number) + 'e').split('e'), + value = func(pair[0] + 'e' + (+pair[1] + precision)); + + pair = (toString(value) + 'e').split('e'); + return +(pair[0] + 'e' + (+pair[1] - precision)); + } + return func(number); + }; + } + + /** + * Creates a set object of `values`. + * + * @private + * @param {Array} values The values to add to the set. + * @returns {Object} Returns the new set. + */ + var createSet = !(Set && 1 / setToArray(new Set([, -0]))[1] == INFINITY) + ? noop + : function (values) { + return new Set(values); + }; + + /** + * Creates a `_.toPairs` or `_.toPairsIn` function. + * + * @private + * @param {Function} keysFunc The function to get the keys of a given object. + * @returns {Function} Returns the new pairs function. + */ + function createToPairs(keysFunc) { + return function (object) { + var tag = getTag(object); + if (tag == mapTag) { + return mapToArray(object); + } + if (tag == setTag) { + return setToPairs(object); + } + return baseToPairs(object, keysFunc(object)); + }; + } + + /** + * Creates a function that either curries or invokes `func` with optional + * `this` binding and partially applied arguments. + * + * @private + * @param {Function|string} func The function or method name to wrap. + * @param {number} bitmask The bitmask flags. + * 1 - `_.bind` + * 2 - `_.bindKey` + * 4 - `_.curry` or `_.curryRight` of a bound function + * 8 - `_.curry` + * 16 - `_.curryRight` + * 32 - `_.partial` + * 64 - `_.partialRight` + * 128 - `_.rearg` + * 256 - `_.ary` + * 512 - `_.flip` + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to be partially applied. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) { + var isBindKey = bitmask & WRAP_BIND_KEY_FLAG; + if (!isBindKey && typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + var length = partials ? partials.length : 0; + if (!length) { + bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG); + partials = holders = undefined; + } + ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0); + arity = arity === undefined ? arity : toInteger(arity); + length -= holders ? holders.length : 0; + + if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) { + var partialsRight = partials, + holdersRight = holders; + + partials = holders = undefined; + } + var data = isBindKey ? undefined : getData(func); + + var newData = [ + func, + bitmask, + thisArg, + partials, + holders, + partialsRight, + holdersRight, + argPos, + ary, + arity, + ]; + + if (data) { + mergeData(newData, data); + } + func = newData[0]; + bitmask = newData[1]; + thisArg = newData[2]; + partials = newData[3]; + holders = newData[4]; + arity = newData[9] = + newData[9] === undefined ? (isBindKey ? 0 : func.length) : nativeMax(newData[9] - length, 0); + + if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) { + bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG); + } + if (!bitmask || bitmask == WRAP_BIND_FLAG) { + var result = createBind(func, bitmask, thisArg); + } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) { + result = createCurry(func, bitmask, arity); + } else if ( + (bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && + !holders.length + ) { + result = createPartial(func, bitmask, thisArg, partials); + } else { + result = createHybrid.apply(undefined, newData); + } + var setter = data ? baseSetData : setData; + return setWrapToString(setter(result, newData), func, bitmask); + } + + /** + * Used by `_.defaults` to customize its `_.assignIn` use to assign properties + * of source objects to the destination object for all destination properties + * that resolve to `undefined`. + * + * @private + * @param {*} objValue The destination value. + * @param {*} srcValue The source value. + * @param {string} key The key of the property to assign. + * @param {Object} object The parent object of `objValue`. + * @returns {*} Returns the value to assign. + */ + function customDefaultsAssignIn(objValue, srcValue, key, object) { + if ( + objValue === undefined || + (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key)) + ) { + return srcValue; + } + return objValue; + } + + /** + * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source + * objects into destination objects that are passed thru. + * + * @private + * @param {*} objValue The destination value. + * @param {*} srcValue The source value. + * @param {string} key The key of the property to merge. + * @param {Object} object The parent object of `objValue`. + * @param {Object} source The parent object of `srcValue`. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + * @returns {*} Returns the value to assign. + */ + function customDefaultsMerge(objValue, srcValue, key, object, source, stack) { + if (isObject(objValue) && isObject(srcValue)) { + // Recursively merge objects and arrays (susceptible to call stack limits). + stack.set(srcValue, objValue); + baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack); + stack['delete'](srcValue); + } + return objValue; + } + + /** + * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain + * objects. + * + * @private + * @param {*} value The value to inspect. + * @param {string} key The key of the property to inspect. + * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`. + */ + function customOmitClone(value) { + return isPlainObject(value) ? undefined : value; + } + + /** + * A specialized version of `baseIsEqualDeep` for arrays with support for + * partial deep comparisons. + * + * @private + * @param {Array} array The array to compare. + * @param {Array} other The other array to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `array` and `other` objects. + * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. + */ + function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + arrLength = array.length, + othLength = other.length; + + if (arrLength != othLength && !(isPartial && othLength > arrLength)) { + return false; + } + // Assume cyclic values are equal. + var stacked = stack.get(array); + if (stacked && stack.get(other)) { + return stacked == other; + } + var index = -1, + result = true, + seen = bitmask & COMPARE_UNORDERED_FLAG ? new SetCache() : undefined; + + stack.set(array, other); + stack.set(other, array); + + // Ignore non-index properties. + while (++index < arrLength) { + var arrValue = array[index], + othValue = other[index]; + + if (customizer) { + var compared = isPartial + ? customizer(othValue, arrValue, index, other, array, stack) + : customizer(arrValue, othValue, index, array, other, stack); + } + if (compared !== undefined) { + if (compared) { + continue; + } + result = false; + break; + } + // Recursively compare arrays (susceptible to call stack limits). + if (seen) { + if ( + !arraySome(other, function (othValue, othIndex) { + if ( + !cacheHas(seen, othIndex) && + (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack)) + ) { + return seen.push(othIndex); + } + }) + ) { + result = false; + break; + } + } else if ( + !(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack)) + ) { + result = false; + break; + } + } + stack['delete'](array); + stack['delete'](other); + return result; + } + + /** + * A specialized version of `baseIsEqualDeep` for comparing objects of + * the same `toStringTag`. + * + * **Note:** This function only supports comparing values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {string} tag The `toStringTag` of the objects to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { + switch (tag) { + case dataViewTag: + if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) { + return false; + } + object = object.buffer; + other = other.buffer; + + case arrayBufferTag: + if ( + object.byteLength != other.byteLength || + !equalFunc(new Uint8Array(object), new Uint8Array(other)) + ) { + return false; + } + return true; + + case boolTag: + case dateTag: + case numberTag: + // Coerce booleans to `1` or `0` and dates to milliseconds. + // Invalid dates are coerced to `NaN`. + return eq(+object, +other); + + case errorTag: + return object.name == other.name && object.message == other.message; + + case regexpTag: + case stringTag: + // Coerce regexes to strings and treat strings, primitives and objects, + // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring + // for more details. + return object == other + ''; + + case mapTag: + var convert = mapToArray; + + case setTag: + var isPartial = bitmask & COMPARE_PARTIAL_FLAG; + convert || (convert = setToArray); + + if (object.size != other.size && !isPartial) { + return false; + } + // Assume cyclic values are equal. + var stacked = stack.get(object); + if (stacked) { + return stacked == other; + } + bitmask |= COMPARE_UNORDERED_FLAG; + + // Recursively compare objects (susceptible to call stack limits). + stack.set(object, other); + var result = equalArrays( + convert(object), + convert(other), + bitmask, + customizer, + equalFunc, + stack, + ); + stack['delete'](object); + return result; + + case symbolTag: + if (symbolValueOf) { + return symbolValueOf.call(object) == symbolValueOf.call(other); + } + } + return false; + } + + /** + * A specialized version of `baseIsEqualDeep` for objects with support for + * partial deep comparisons. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + objProps = getAllKeys(object), + objLength = objProps.length, + othProps = getAllKeys(other), + othLength = othProps.length; + + if (objLength != othLength && !isPartial) { + return false; + } + var index = objLength; + while (index--) { + var key = objProps[index]; + if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { + return false; + } + } + // Assume cyclic values are equal. + var stacked = stack.get(object); + if (stacked && stack.get(other)) { + return stacked == other; + } + var result = true; + stack.set(object, other); + stack.set(other, object); + + var skipCtor = isPartial; + while (++index < objLength) { + key = objProps[index]; + var objValue = object[key], + othValue = other[key]; + + if (customizer) { + var compared = isPartial + ? customizer(othValue, objValue, key, other, object, stack) + : customizer(objValue, othValue, key, object, other, stack); + } + // Recursively compare objects (susceptible to call stack limits). + if ( + !(compared === undefined + ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) + : compared) + ) { + result = false; + break; + } + skipCtor || (skipCtor = key == 'constructor'); + } + if (result && !skipCtor) { + var objCtor = object.constructor, + othCtor = other.constructor; + + // Non `Object` object instances with different constructors are not equal. + if ( + objCtor != othCtor && + 'constructor' in object && + 'constructor' in other && + !( + typeof objCtor == 'function' && + objCtor instanceof objCtor && + typeof othCtor == 'function' && + othCtor instanceof othCtor + ) + ) { + result = false; + } + } + stack['delete'](object); + stack['delete'](other); + return result; + } + + /** + * A specialized version of `baseRest` which flattens the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @returns {Function} Returns the new function. + */ + function flatRest(func) { + return setToString(overRest(func, undefined, flatten), func + ''); + } + + /** + * Creates an array of own enumerable property names and symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ + function getAllKeys(object) { + return baseGetAllKeys(object, keys, getSymbols); + } + + /** + * Creates an array of own and inherited enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ + function getAllKeysIn(object) { + return baseGetAllKeys(object, keysIn, getSymbolsIn); + } + + /** + * Gets metadata for `func`. + * + * @private + * @param {Function} func The function to query. + * @returns {*} Returns the metadata for `func`. + */ + var getData = !metaMap + ? noop + : function (func) { + return metaMap.get(func); + }; + + /** + * Gets the name of `func`. + * + * @private + * @param {Function} func The function to query. + * @returns {string} Returns the function name. + */ + function getFuncName(func) { + var result = func.name + '', + array = realNames[result], + length = hasOwnProperty.call(realNames, result) ? array.length : 0; + + while (length--) { + var data = array[length], + otherFunc = data.func; + if (otherFunc == null || otherFunc == func) { + return data.name; + } + } + return result; + } + + /** + * Gets the argument placeholder value for `func`. + * + * @private + * @param {Function} func The function to inspect. + * @returns {*} Returns the placeholder value. + */ + function getHolder(func) { + var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func; + return object.placeholder; + } + + /** + * Gets the appropriate "iteratee" function. If `_.iteratee` is customized, + * this function returns the custom method, otherwise it returns `baseIteratee`. + * If arguments are provided, the chosen function is invoked with them and + * its result is returned. + * + * @private + * @param {*} [value] The value to convert to an iteratee. + * @param {number} [arity] The arity of the created iteratee. + * @returns {Function} Returns the chosen function or its result. + */ + function getIteratee() { + var result = lodash.iteratee || iteratee; + result = result === iteratee ? baseIteratee : result; + return arguments.length ? result(arguments[0], arguments[1]) : result; + } + + /** + * Gets the data for `map`. + * + * @private + * @param {Object} map The map to query. + * @param {string} key The reference key. + * @returns {*} Returns the map data. + */ + function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) ? data[typeof key == 'string' ? 'string' : 'hash'] : data.map; + } + + /** + * Gets the property names, values, and compare flags of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the match data of `object`. + */ + function getMatchData(object) { + var result = keys(object), + length = result.length; + + while (length--) { + var key = result[length], + value = object[key]; + + result[length] = [key, value, isStrictComparable(value)]; + } + return result; + } + + /** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ + function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : undefined; + } + + /** + * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the raw `toStringTag`. + */ + function getRawTag(value) { + var isOwn = hasOwnProperty.call(value, symToStringTag), + tag = value[symToStringTag]; + + try { + value[symToStringTag] = undefined; + var unmasked = true; + } catch (e) {} + + var result = nativeObjectToString.call(value); + if (unmasked) { + if (isOwn) { + value[symToStringTag] = tag; + } else { + delete value[symToStringTag]; + } + } + return result; + } + + /** + * Creates an array of the own enumerable symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ + var getSymbols = !nativeGetSymbols + ? stubArray + : function (object) { + if (object == null) { + return []; + } + object = Object(object); + return arrayFilter(nativeGetSymbols(object), function (symbol) { + return propertyIsEnumerable.call(object, symbol); + }); + }; + + /** + * Creates an array of the own and inherited enumerable symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ + var getSymbolsIn = !nativeGetSymbols + ? stubArray + : function (object) { + var result = []; + while (object) { + arrayPush(result, getSymbols(object)); + object = getPrototype(object); + } + return result; + }; + + /** + * Gets the `toStringTag` of `value`. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ + var getTag = baseGetTag; + + // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6. + if ( + (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || + (Map && getTag(new Map()) != mapTag) || + (Promise && getTag(Promise.resolve()) != promiseTag) || + (Set && getTag(new Set()) != setTag) || + (WeakMap && getTag(new WeakMap()) != weakMapTag) + ) { + getTag = function (value) { + var result = baseGetTag(value), + Ctor = result == objectTag ? value.constructor : undefined, + ctorString = Ctor ? toSource(Ctor) : ''; + + if (ctorString) { + switch (ctorString) { + case dataViewCtorString: + return dataViewTag; + case mapCtorString: + return mapTag; + case promiseCtorString: + return promiseTag; + case setCtorString: + return setTag; + case weakMapCtorString: + return weakMapTag; + } + } + return result; + }; + } + + /** + * Gets the view, applying any `transforms` to the `start` and `end` positions. + * + * @private + * @param {number} start The start of the view. + * @param {number} end The end of the view. + * @param {Array} transforms The transformations to apply to the view. + * @returns {Object} Returns an object containing the `start` and `end` + * positions of the view. + */ + function getView(start, end, transforms) { + var index = -1, + length = transforms.length; + + while (++index < length) { + var data = transforms[index], + size = data.size; + + switch (data.type) { + case 'drop': + start += size; + break; + case 'dropRight': + end -= size; + break; + case 'take': + end = nativeMin(end, start + size); + break; + case 'takeRight': + start = nativeMax(start, end - size); + break; + } + } + return { start: start, end: end }; + } + + /** + * Extracts wrapper details from the `source` body comment. + * + * @private + * @param {string} source The source to inspect. + * @returns {Array} Returns the wrapper details. + */ + function getWrapDetails(source) { + var match = source.match(reWrapDetails); + return match ? match[1].split(reSplitDetails) : []; + } + + /** + * Checks if `path` exists on `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @param {Function} hasFunc The function to check properties. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + */ + function hasPath(object, path, hasFunc) { + path = castPath(path, object); + + var index = -1, + length = path.length, + result = false; + + while (++index < length) { + var key = toKey(path[index]); + if (!(result = object != null && hasFunc(object, key))) { + break; + } + object = object[key]; + } + if (result || ++index != length) { + return result; + } + length = object == null ? 0 : object.length; + return ( + !!length && + isLength(length) && + isIndex(key, length) && + (isArray(object) || isArguments(object)) + ); + } + + /** + * Initializes an array clone. + * + * @private + * @param {Array} array The array to clone. + * @returns {Array} Returns the initialized clone. + */ + function initCloneArray(array) { + var length = array.length, + result = new array.constructor(length); + + // Add properties assigned by `RegExp#exec`. + if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) { + result.index = array.index; + result.input = array.input; + } + return result; + } + + /** + * Initializes an object clone. + * + * @private + * @param {Object} object The object to clone. + * @returns {Object} Returns the initialized clone. + */ + function initCloneObject(object) { + return typeof object.constructor == 'function' && !isPrototype(object) + ? baseCreate(getPrototype(object)) + : {}; + } + + /** + * Initializes an object clone based on its `toStringTag`. + * + * **Note:** This function only supports cloning values with tags of + * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`. + * + * @private + * @param {Object} object The object to clone. + * @param {string} tag The `toStringTag` of the object to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the initialized clone. + */ + function initCloneByTag(object, tag, isDeep) { + var Ctor = object.constructor; + switch (tag) { + case arrayBufferTag: + return cloneArrayBuffer(object); + + case boolTag: + case dateTag: + return new Ctor(+object); + + case dataViewTag: + return cloneDataView(object, isDeep); + + case float32Tag: + case float64Tag: + case int8Tag: + case int16Tag: + case int32Tag: + case uint8Tag: + case uint8ClampedTag: + case uint16Tag: + case uint32Tag: + return cloneTypedArray(object, isDeep); + + case mapTag: + return new Ctor(); + + case numberTag: + case stringTag: + return new Ctor(object); + + case regexpTag: + return cloneRegExp(object); + + case setTag: + return new Ctor(); + + case symbolTag: + return cloneSymbol(object); + } + } + + /** + * Inserts wrapper `details` in a comment at the top of the `source` body. + * + * @private + * @param {string} source The source to modify. + * @returns {Array} details The details to insert. + * @returns {string} Returns the modified source. + */ + function insertWrapDetails(source, details) { + var length = details.length; + if (!length) { + return source; + } + var lastIndex = length - 1; + details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex]; + details = details.join(length > 2 ? ', ' : ' '); + return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n'); + } + + /** + * Checks if `value` is a flattenable `arguments` object or array. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. + */ + function isFlattenable(value) { + return ( + isArray(value) || + isArguments(value) || + !!(spreadableSymbol && value && value[spreadableSymbol]) + ); + } + + /** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ + function isIndex(value, length) { + var type = typeof value; + length = length == null ? MAX_SAFE_INTEGER : length; + + return ( + !!length && + (type == 'number' || (type != 'symbol' && reIsUint.test(value))) && + value > -1 && + value % 1 == 0 && + value < length + ); + } + + /** + * Checks if the given arguments are from an iteratee call. + * + * @private + * @param {*} value The potential iteratee value argument. + * @param {*} index The potential iteratee index or key argument. + * @param {*} object The potential iteratee object argument. + * @returns {boolean} Returns `true` if the arguments are from an iteratee call, + * else `false`. + */ + function isIterateeCall(value, index, object) { + if (!isObject(object)) { + return false; + } + var type = typeof index; + if ( + type == 'number' + ? isArrayLike(object) && isIndex(index, object.length) + : type == 'string' && index in object + ) { + return eq(object[index], value); + } + return false; + } + + /** + * Checks if `value` is a property name and not a property path. + * + * @private + * @param {*} value The value to check. + * @param {Object} [object] The object to query keys on. + * @returns {boolean} Returns `true` if `value` is a property name, else `false`. + */ + function isKey(value, object) { + if (isArray(value)) { + return false; + } + var type = typeof value; + if ( + type == 'number' || + type == 'symbol' || + type == 'boolean' || + value == null || + isSymbol(value) + ) { + return true; + } + return ( + reIsPlainProp.test(value) || + !reIsDeepProp.test(value) || + (object != null && value in Object(object)) + ); + } + + /** + * Checks if `value` is suitable for use as unique object key. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is suitable, else `false`. + */ + function isKeyable(value) { + var type = typeof value; + return type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean' + ? value !== '__proto__' + : value === null; + } + + /** + * Checks if `func` has a lazy counterpart. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` has a lazy counterpart, + * else `false`. + */ + function isLaziable(func) { + var funcName = getFuncName(func), + other = lodash[funcName]; + + if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) { + return false; + } + if (func === other) { + return true; + } + var data = getData(other); + return !!data && func === data[0]; + } + + /** + * Checks if `func` has its source masked. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` is masked, else `false`. + */ + function isMasked(func) { + return !!maskSrcKey && maskSrcKey in func; + } + + /** + * Checks if `func` is capable of being masked. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `func` is maskable, else `false`. + */ + var isMaskable = coreJsData ? isFunction : stubFalse; + + /** + * Checks if `value` is likely a prototype object. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. + */ + function isPrototype(value) { + var Ctor = value && value.constructor, + proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; + + return value === proto; + } + + /** + * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` if suitable for strict + * equality comparisons, else `false`. + */ + function isStrictComparable(value) { + return value === value && !isObject(value); + } + + /** + * A specialized version of `matchesProperty` for source values suitable + * for strict equality comparisons, i.e. `===`. + * + * @private + * @param {string} key The key of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + */ + function matchesStrictComparable(key, srcValue) { + return function (object) { + if (object == null) { + return false; + } + return object[key] === srcValue && (srcValue !== undefined || key in Object(object)); + }; + } + + /** + * A specialized version of `_.memoize` which clears the memoized function's + * cache when it exceeds `MAX_MEMOIZE_SIZE`. + * + * @private + * @param {Function} func The function to have its output memoized. + * @returns {Function} Returns the new memoized function. + */ + function memoizeCapped(func) { + var result = memoize(func, function (key) { + if (cache.size === MAX_MEMOIZE_SIZE) { + cache.clear(); + } + return key; + }); + + var cache = result.cache; + return result; + } + + /** + * Merges the function metadata of `source` into `data`. + * + * Merging metadata reduces the number of wrappers used to invoke a function. + * This is possible because methods like `_.bind`, `_.curry`, and `_.partial` + * may be applied regardless of execution order. Methods like `_.ary` and + * `_.rearg` modify function arguments, making the order in which they are + * executed important, preventing the merging of metadata. However, we make + * an exception for a safe combined case where curried functions have `_.ary` + * and or `_.rearg` applied. + * + * @private + * @param {Array} data The destination metadata. + * @param {Array} source The source metadata. + * @returns {Array} Returns `data`. + */ + function mergeData(data, source) { + var bitmask = data[1], + srcBitmask = source[1], + newBitmask = bitmask | srcBitmask, + isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG); + + var isCombo = + (srcBitmask == WRAP_ARY_FLAG && bitmask == WRAP_CURRY_FLAG) || + (srcBitmask == WRAP_ARY_FLAG && bitmask == WRAP_REARG_FLAG && data[7].length <= source[8]) || + (srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG) && + source[7].length <= source[8] && + bitmask == WRAP_CURRY_FLAG); + + // Exit early if metadata can't be merged. + if (!(isCommon || isCombo)) { + return data; + } + // Use source `thisArg` if available. + if (srcBitmask & WRAP_BIND_FLAG) { + data[2] = source[2]; + // Set when currying a bound function. + newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG; + } + // Compose partial arguments. + var value = source[3]; + if (value) { + var partials = data[3]; + data[3] = partials ? composeArgs(partials, value, source[4]) : value; + data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4]; + } + // Compose partial right arguments. + value = source[5]; + if (value) { + partials = data[5]; + data[5] = partials ? composeArgsRight(partials, value, source[6]) : value; + data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6]; + } + // Use source `argPos` if available. + value = source[7]; + if (value) { + data[7] = value; + } + // Use source `ary` if it's smaller. + if (srcBitmask & WRAP_ARY_FLAG) { + data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]); + } + // Use source `arity` if one is not provided. + if (data[9] == null) { + data[9] = source[9]; + } + // Use source `func` and merge bitmasks. + data[0] = source[0]; + data[1] = newBitmask; + + return data; + } + + /** + * This function is like + * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * except that it includes inherited enumerable properties. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + function nativeKeysIn(object) { + var result = []; + if (object != null) { + for (var key in Object(object)) { + result.push(key); + } + } + return result; + } + + /** + * Converts `value` to a string using `Object.prototype.toString`. + * + * @private + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + */ + function objectToString(value) { + return nativeObjectToString.call(value); + } + + /** + * A specialized version of `baseRest` which transforms the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @param {Function} transform The rest array transform. + * @returns {Function} Returns the new function. + */ + function overRest(func, start, transform) { + start = nativeMax(start === undefined ? func.length - 1 : start, 0); + return function () { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + array = Array(length); + + while (++index < length) { + array[index] = args[start + index]; + } + index = -1; + var otherArgs = Array(start + 1); + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = transform(array); + return apply(func, this, otherArgs); + }; + } + + /** + * Gets the parent value at `path` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} path The path to get the parent value of. + * @returns {*} Returns the parent value. + */ + function parent(object, path) { + return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1)); + } + + /** + * Reorder `array` according to the specified indexes where the element at + * the first index is assigned as the first element, the element at + * the second index is assigned as the second element, and so on. + * + * @private + * @param {Array} array The array to reorder. + * @param {Array} indexes The arranged array indexes. + * @returns {Array} Returns `array`. + */ + function reorder(array, indexes) { + var arrLength = array.length, + length = nativeMin(indexes.length, arrLength), + oldArray = copyArray(array); + + while (length--) { + var index = indexes[length]; + array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined; + } + return array; + } + + /** + * Gets the value at `key`, unless `key` is "__proto__" or "constructor". + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ + function safeGet(object, key) { + if (key === 'constructor' && typeof object[key] === 'function') { + return; + } + + if (key == '__proto__') { + return; + } + + return object[key]; + } + + /** + * Sets metadata for `func`. + * + * **Note:** If this function becomes hot, i.e. is invoked a lot in a short + * period of time, it will trip its breaker and transition to an identity + * function to avoid garbage collection pauses in V8. See + * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070) + * for more details. + * + * @private + * @param {Function} func The function to associate metadata with. + * @param {*} data The metadata. + * @returns {Function} Returns `func`. + */ + var setData = shortOut(baseSetData); + + /** + * A simple wrapper around the global [`setTimeout`](https://mdn.io/setTimeout). + * + * @private + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @returns {number|Object} Returns the timer id or timeout object. + */ + var setTimeout = + ctxSetTimeout || + function (func, wait) { + return root.setTimeout(func, wait); + }; + + /** + * Sets the `toString` method of `func` to return `string`. + * + * @private + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. + */ + var setToString = shortOut(baseSetToString); + + /** + * Sets the `toString` method of `wrapper` to mimic the source of `reference` + * with wrapper details in a comment at the top of the source body. + * + * @private + * @param {Function} wrapper The function to modify. + * @param {Function} reference The reference function. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @returns {Function} Returns `wrapper`. + */ + function setWrapToString(wrapper, reference, bitmask) { + var source = reference + ''; + return setToString( + wrapper, + insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)), + ); + } + + /** + * Creates a function that'll short out and invoke `identity` instead + * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN` + * milliseconds. + * + * @private + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new shortable function. + */ + function shortOut(func) { + var count = 0, + lastCalled = 0; + + return function () { + var stamp = nativeNow(), + remaining = HOT_SPAN - (stamp - lastCalled); + + lastCalled = stamp; + if (remaining > 0) { + if (++count >= HOT_COUNT) { + return arguments[0]; + } + } else { + count = 0; + } + return func.apply(undefined, arguments); + }; + } + + /** + * A specialized version of `_.shuffle` which mutates and sets the size of `array`. + * + * @private + * @param {Array} array The array to shuffle. + * @param {number} [size=array.length] The size of `array`. + * @returns {Array} Returns `array`. + */ + function shuffleSelf(array, size) { + var index = -1, + length = array.length, + lastIndex = length - 1; + + size = size === undefined ? length : size; + while (++index < size) { + var rand = baseRandom(index, lastIndex), + value = array[rand]; + + array[rand] = array[index]; + array[index] = value; + } + array.length = size; + return array; + } + + /** + * Converts `string` to a property path array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the property path array. + */ + var stringToPath = memoizeCapped(function (string) { + var result = []; + if (string.charCodeAt(0) === 46 /* . */) { + result.push(''); + } + string.replace(rePropName, function (match, number, quote, subString) { + result.push(quote ? subString.replace(reEscapeChar, '$1') : number || match); + }); + return result; + }); + + /** + * Converts `value` to a string key if it's not a string or symbol. + * + * @private + * @param {*} value The value to inspect. + * @returns {string|symbol} Returns the key. + */ + function toKey(value) { + if (typeof value == 'string' || isSymbol(value)) { + return value; + } + var result = value + ''; + return result == '0' && 1 / value == -INFINITY ? '-0' : result; + } + + /** + * Converts `func` to its source code. + * + * @private + * @param {Function} func The function to convert. + * @returns {string} Returns the source code. + */ + function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) {} + try { + return func + ''; + } catch (e) {} + } + return ''; + } + + /** + * Updates wrapper `details` based on `bitmask` flags. + * + * @private + * @returns {Array} details The details to modify. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @returns {Array} Returns `details`. + */ + function updateWrapDetails(details, bitmask) { + arrayEach(wrapFlags, function (pair) { + var value = '_.' + pair[0]; + if (bitmask & pair[1] && !arrayIncludes(details, value)) { + details.push(value); + } + }); + return details.sort(); + } + + /** + * Creates a clone of `wrapper`. + * + * @private + * @param {Object} wrapper The wrapper to clone. + * @returns {Object} Returns the cloned wrapper. + */ + function wrapperClone(wrapper) { + if (wrapper instanceof LazyWrapper) { + return wrapper.clone(); + } + var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__); + result.__actions__ = copyArray(wrapper.__actions__); + result.__index__ = wrapper.__index__; + result.__values__ = wrapper.__values__; + return result; + } + + /*------------------------------------------------------------------------*/ + + /** + * Creates an array of elements split into groups the length of `size`. + * If `array` can't be split evenly, the final chunk will be the remaining + * elements. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to process. + * @param {number} [size=1] The length of each chunk + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the new array of chunks. + * @example + * + * _.chunk(['a', 'b', 'c', 'd'], 2); + * // => [['a', 'b'], ['c', 'd']] + * + * _.chunk(['a', 'b', 'c', 'd'], 3); + * // => [['a', 'b', 'c'], ['d']] + */ + function chunk(array, size, guard) { + if (guard ? isIterateeCall(array, size, guard) : size === undefined) { + size = 1; + } else { + size = nativeMax(toInteger(size), 0); + } + var length = array == null ? 0 : array.length; + if (!length || size < 1) { + return []; + } + var index = 0, + resIndex = 0, + result = Array(nativeCeil(length / size)); + + while (index < length) { + result[resIndex++] = baseSlice(array, index, (index += size)); + } + return result; + } + + /** + * Creates an array with all falsey values removed. The values `false`, `null`, + * `0`, `""`, `undefined`, and `NaN` are falsey. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to compact. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.compact([0, 1, false, 2, '', 3]); + * // => [1, 2, 3] + */ + function compact(array) { + var index = -1, + length = array == null ? 0 : array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (value) { + result[resIndex++] = value; + } + } + return result; + } + + /** + * Creates a new array concatenating `array` with any additional arrays + * and/or values. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to concatenate. + * @param {...*} [values] The values to concatenate. + * @returns {Array} Returns the new concatenated array. + * @example + * + * var array = [1]; + * var other = _.concat(array, 2, [3], [[4]]); + * + * console.log(other); + * // => [1, 2, 3, [4]] + * + * console.log(array); + * // => [1] + */ + function concat() { + var length = arguments.length; + if (!length) { + return []; + } + var args = Array(length - 1), + array = arguments[0], + index = length; + + while (index--) { + args[index - 1] = arguments[index]; + } + return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1)); + } + + /** + * Creates an array of `array` values not included in the other given arrays + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. The order and references of result values are + * determined by the first array. + * + * **Note:** Unlike `_.pullAll`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The values to exclude. + * @returns {Array} Returns the new array of filtered values. + * @see _.without, _.xor + * @example + * + * _.difference([2, 1], [2, 3]); + * // => [1] + */ + var difference = baseRest(function (array, values) { + return isArrayLikeObject(array) + ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true)) + : []; + }); + + /** + * This method is like `_.difference` except that it accepts `iteratee` which + * is invoked for each element of `array` and `values` to generate the criterion + * by which they're compared. The order and references of result values are + * determined by the first array. The iteratee is invoked with one argument: + * (value). + * + * **Note:** Unlike `_.pullAllBy`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The values to exclude. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor); + * // => [1.2] + * + * // The `_.property` iteratee shorthand. + * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x'); + * // => [{ 'x': 2 }] + */ + var differenceBy = baseRest(function (array, values) { + var iteratee = last(values); + if (isArrayLikeObject(iteratee)) { + iteratee = undefined; + } + return isArrayLikeObject(array) + ? baseDifference( + array, + baseFlatten(values, 1, isArrayLikeObject, true), + getIteratee(iteratee, 2), + ) + : []; + }); + + /** + * This method is like `_.difference` except that it accepts `comparator` + * which is invoked to compare elements of `array` to `values`. The order and + * references of result values are determined by the first array. The comparator + * is invoked with two arguments: (arrVal, othVal). + * + * **Note:** Unlike `_.pullAllWith`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The values to exclude. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * + * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual); + * // => [{ 'x': 2, 'y': 1 }] + */ + var differenceWith = baseRest(function (array, values) { + var comparator = last(values); + if (isArrayLikeObject(comparator)) { + comparator = undefined; + } + return isArrayLikeObject(array) + ? baseDifference( + array, + baseFlatten(values, 1, isArrayLikeObject, true), + undefined, + comparator, + ) + : []; + }); + + /** + * Creates a slice of `array` with `n` elements dropped from the beginning. + * + * @static + * @memberOf _ + * @since 0.5.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to drop. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.drop([1, 2, 3]); + * // => [2, 3] + * + * _.drop([1, 2, 3], 2); + * // => [3] + * + * _.drop([1, 2, 3], 5); + * // => [] + * + * _.drop([1, 2, 3], 0); + * // => [1, 2, 3] + */ + function drop(array, n, guard) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + n = guard || n === undefined ? 1 : toInteger(n); + return baseSlice(array, n < 0 ? 0 : n, length); + } + + /** + * Creates a slice of `array` with `n` elements dropped from the end. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to drop. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.dropRight([1, 2, 3]); + * // => [1, 2] + * + * _.dropRight([1, 2, 3], 2); + * // => [1] + * + * _.dropRight([1, 2, 3], 5); + * // => [] + * + * _.dropRight([1, 2, 3], 0); + * // => [1, 2, 3] + */ + function dropRight(array, n, guard) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + n = guard || n === undefined ? 1 : toInteger(n); + n = length - n; + return baseSlice(array, 0, n < 0 ? 0 : n); + } + + /** + * Creates a slice of `array` excluding elements dropped from the end. + * Elements are dropped until `predicate` returns falsey. The predicate is + * invoked with three arguments: (value, index, array). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * _.dropRightWhile(users, function(o) { return !o.active; }); + * // => objects for ['barney'] + * + * // The `_.matches` iteratee shorthand. + * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false }); + * // => objects for ['barney', 'fred'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.dropRightWhile(users, ['active', false]); + * // => objects for ['barney'] + * + * // The `_.property` iteratee shorthand. + * _.dropRightWhile(users, 'active'); + * // => objects for ['barney', 'fred', 'pebbles'] + */ + function dropRightWhile(array, predicate) { + return array && array.length ? baseWhile(array, getIteratee(predicate, 3), true, true) : []; + } + + /** + * Creates a slice of `array` excluding elements dropped from the beginning. + * Elements are dropped until `predicate` returns falsey. The predicate is + * invoked with three arguments: (value, index, array). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.dropWhile(users, function(o) { return !o.active; }); + * // => objects for ['pebbles'] + * + * // The `_.matches` iteratee shorthand. + * _.dropWhile(users, { 'user': 'barney', 'active': false }); + * // => objects for ['fred', 'pebbles'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.dropWhile(users, ['active', false]); + * // => objects for ['pebbles'] + * + * // The `_.property` iteratee shorthand. + * _.dropWhile(users, 'active'); + * // => objects for ['barney', 'fred', 'pebbles'] + */ + function dropWhile(array, predicate) { + return array && array.length ? baseWhile(array, getIteratee(predicate, 3), true) : []; + } + + /** + * Fills elements of `array` with `value` from `start` up to, but not + * including, `end`. + * + * **Note:** This method mutates `array`. + * + * @static + * @memberOf _ + * @since 3.2.0 + * @category Array + * @param {Array} array The array to fill. + * @param {*} value The value to fill `array` with. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns `array`. + * @example + * + * var array = [1, 2, 3]; + * + * _.fill(array, 'a'); + * console.log(array); + * // => ['a', 'a', 'a'] + * + * _.fill(Array(3), 2); + * // => [2, 2, 2] + * + * _.fill([4, 6, 8, 10], '*', 1, 3); + * // => [4, '*', '*', 10] + */ + function fill(array, value, start, end) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + if (start && typeof start != 'number' && isIterateeCall(array, value, start)) { + start = 0; + end = length; + } + return baseFill(array, value, start, end); + } + + /** + * This method is like `_.find` except that it returns the index of the first + * element `predicate` returns truthy for instead of the element itself. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.findIndex(users, function(o) { return o.user == 'barney'; }); + * // => 0 + * + * // The `_.matches` iteratee shorthand. + * _.findIndex(users, { 'user': 'fred', 'active': false }); + * // => 1 + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findIndex(users, ['active', false]); + * // => 0 + * + * // The `_.property` iteratee shorthand. + * _.findIndex(users, 'active'); + * // => 2 + */ + function findIndex(array, predicate, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = fromIndex == null ? 0 : toInteger(fromIndex); + if (index < 0) { + index = nativeMax(length + index, 0); + } + return baseFindIndex(array, getIteratee(predicate, 3), index); + } + + /** + * This method is like `_.findIndex` except that it iterates over elements + * of `collection` from right to left. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=array.length-1] The index to search from. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; }); + * // => 2 + * + * // The `_.matches` iteratee shorthand. + * _.findLastIndex(users, { 'user': 'barney', 'active': true }); + * // => 0 + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findLastIndex(users, ['active', false]); + * // => 2 + * + * // The `_.property` iteratee shorthand. + * _.findLastIndex(users, 'active'); + * // => 0 + */ + function findLastIndex(array, predicate, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = length - 1; + if (fromIndex !== undefined) { + index = toInteger(fromIndex); + index = fromIndex < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1); + } + return baseFindIndex(array, getIteratee(predicate, 3), index, true); + } + + /** + * Flattens `array` a single level deep. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to flatten. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flatten([1, [2, [3, [4]], 5]]); + * // => [1, 2, [3, [4]], 5] + */ + function flatten(array) { + var length = array == null ? 0 : array.length; + return length ? baseFlatten(array, 1) : []; + } + + /** + * Recursively flattens `array`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to flatten. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flattenDeep([1, [2, [3, [4]], 5]]); + * // => [1, 2, 3, 4, 5] + */ + function flattenDeep(array) { + var length = array == null ? 0 : array.length; + return length ? baseFlatten(array, INFINITY) : []; + } + + /** + * Recursively flatten `array` up to `depth` times. + * + * @static + * @memberOf _ + * @since 4.4.0 + * @category Array + * @param {Array} array The array to flatten. + * @param {number} [depth=1] The maximum recursion depth. + * @returns {Array} Returns the new flattened array. + * @example + * + * var array = [1, [2, [3, [4]], 5]]; + * + * _.flattenDepth(array, 1); + * // => [1, 2, [3, [4]], 5] + * + * _.flattenDepth(array, 2); + * // => [1, 2, 3, [4], 5] + */ + function flattenDepth(array, depth) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + depth = depth === undefined ? 1 : toInteger(depth); + return baseFlatten(array, depth); + } + + /** + * The inverse of `_.toPairs`; this method returns an object composed + * from key-value `pairs`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} pairs The key-value pairs. + * @returns {Object} Returns the new object. + * @example + * + * _.fromPairs([['a', 1], ['b', 2]]); + * // => { 'a': 1, 'b': 2 } + */ + function fromPairs(pairs) { + var index = -1, + length = pairs == null ? 0 : pairs.length, + result = {}; + + while (++index < length) { + var pair = pairs[index]; + result[pair[0]] = pair[1]; + } + return result; + } + + /** + * Gets the first element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @alias first + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the first element of `array`. + * @example + * + * _.head([1, 2, 3]); + * // => 1 + * + * _.head([]); + * // => undefined + */ + function head(array) { + return array && array.length ? array[0] : undefined; + } + + /** + * Gets the index at which the first occurrence of `value` is found in `array` + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. If `fromIndex` is negative, it's used as the + * offset from the end of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.indexOf([1, 2, 1, 2], 2); + * // => 1 + * + * // Search from the `fromIndex`. + * _.indexOf([1, 2, 1, 2], 2, 2); + * // => 3 + */ + function indexOf(array, value, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = fromIndex == null ? 0 : toInteger(fromIndex); + if (index < 0) { + index = nativeMax(length + index, 0); + } + return baseIndexOf(array, value, index); + } + + /** + * Gets all but the last element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.initial([1, 2, 3]); + * // => [1, 2] + */ + function initial(array) { + var length = array == null ? 0 : array.length; + return length ? baseSlice(array, 0, -1) : []; + } + + /** + * Creates an array of unique values that are included in all given arrays + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. The order and references of result values are + * determined by the first array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of intersecting values. + * @example + * + * _.intersection([2, 1], [2, 3]); + * // => [2] + */ + var intersection = baseRest(function (arrays) { + var mapped = arrayMap(arrays, castArrayLikeObject); + return mapped.length && mapped[0] === arrays[0] ? baseIntersection(mapped) : []; + }); + + /** + * This method is like `_.intersection` except that it accepts `iteratee` + * which is invoked for each element of each `arrays` to generate the criterion + * by which they're compared. The order and references of result values are + * determined by the first array. The iteratee is invoked with one argument: + * (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of intersecting values. + * @example + * + * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor); + * // => [2.1] + * + * // The `_.property` iteratee shorthand. + * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }] + */ + var intersectionBy = baseRest(function (arrays) { + var iteratee = last(arrays), + mapped = arrayMap(arrays, castArrayLikeObject); + + if (iteratee === last(mapped)) { + iteratee = undefined; + } else { + mapped.pop(); + } + return mapped.length && mapped[0] === arrays[0] + ? baseIntersection(mapped, getIteratee(iteratee, 2)) + : []; + }); + + /** + * This method is like `_.intersection` except that it accepts `comparator` + * which is invoked to compare elements of `arrays`. The order and references + * of result values are determined by the first array. The comparator is + * invoked with two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of intersecting values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.intersectionWith(objects, others, _.isEqual); + * // => [{ 'x': 1, 'y': 2 }] + */ + var intersectionWith = baseRest(function (arrays) { + var comparator = last(arrays), + mapped = arrayMap(arrays, castArrayLikeObject); + + comparator = typeof comparator == 'function' ? comparator : undefined; + if (comparator) { + mapped.pop(); + } + return mapped.length && mapped[0] === arrays[0] + ? baseIntersection(mapped, undefined, comparator) + : []; + }); + + /** + * Converts all elements in `array` into a string separated by `separator`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to convert. + * @param {string} [separator=','] The element separator. + * @returns {string} Returns the joined string. + * @example + * + * _.join(['a', 'b', 'c'], '~'); + * // => 'a~b~c' + */ + function join(array, separator) { + return array == null ? '' : nativeJoin.call(array, separator); + } + + /** + * Gets the last element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the last element of `array`. + * @example + * + * _.last([1, 2, 3]); + * // => 3 + */ + function last(array) { + var length = array == null ? 0 : array.length; + return length ? array[length - 1] : undefined; + } + + /** + * This method is like `_.indexOf` except that it iterates over elements of + * `array` from right to left. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} [fromIndex=array.length-1] The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.lastIndexOf([1, 2, 1, 2], 2); + * // => 3 + * + * // Search from the `fromIndex`. + * _.lastIndexOf([1, 2, 1, 2], 2, 2); + * // => 1 + */ + function lastIndexOf(array, value, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = length; + if (fromIndex !== undefined) { + index = toInteger(fromIndex); + index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1); + } + return value === value + ? strictLastIndexOf(array, value, index) + : baseFindIndex(array, baseIsNaN, index, true); + } + + /** + * Gets the element at index `n` of `array`. If `n` is negative, the nth + * element from the end is returned. + * + * @static + * @memberOf _ + * @since 4.11.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=0] The index of the element to return. + * @returns {*} Returns the nth element of `array`. + * @example + * + * var array = ['a', 'b', 'c', 'd']; + * + * _.nth(array, 1); + * // => 'b' + * + * _.nth(array, -2); + * // => 'c'; + */ + function nth(array, n) { + return array && array.length ? baseNth(array, toInteger(n)) : undefined; + } + + /** + * Removes all given values from `array` using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove` + * to remove elements from an array by predicate. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {...*} [values] The values to remove. + * @returns {Array} Returns `array`. + * @example + * + * var array = ['a', 'b', 'c', 'a', 'b', 'c']; + * + * _.pull(array, 'a', 'c'); + * console.log(array); + * // => ['b', 'b'] + */ + var pull = baseRest(pullAll); + + /** + * This method is like `_.pull` except that it accepts an array of values to remove. + * + * **Note:** Unlike `_.difference`, this method mutates `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @returns {Array} Returns `array`. + * @example + * + * var array = ['a', 'b', 'c', 'a', 'b', 'c']; + * + * _.pullAll(array, ['a', 'c']); + * console.log(array); + * // => ['b', 'b'] + */ + function pullAll(array, values) { + return array && array.length && values && values.length ? basePullAll(array, values) : array; + } + + /** + * This method is like `_.pullAll` except that it accepts `iteratee` which is + * invoked for each element of `array` and `values` to generate the criterion + * by which they're compared. The iteratee is invoked with one argument: (value). + * + * **Note:** Unlike `_.differenceBy`, this method mutates `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns `array`. + * @example + * + * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }]; + * + * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x'); + * console.log(array); + * // => [{ 'x': 2 }] + */ + function pullAllBy(array, values, iteratee) { + return array && array.length && values && values.length + ? basePullAll(array, values, getIteratee(iteratee, 2)) + : array; + } + + /** + * This method is like `_.pullAll` except that it accepts `comparator` which + * is invoked to compare elements of `array` to `values`. The comparator is + * invoked with two arguments: (arrVal, othVal). + * + * **Note:** Unlike `_.differenceWith`, this method mutates `array`. + * + * @static + * @memberOf _ + * @since 4.6.0 + * @category Array + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns `array`. + * @example + * + * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }]; + * + * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual); + * console.log(array); + * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }] + */ + function pullAllWith(array, values, comparator) { + return array && array.length && values && values.length + ? basePullAll(array, values, undefined, comparator) + : array; + } + + /** + * Removes elements from `array` corresponding to `indexes` and returns an + * array of removed elements. + * + * **Note:** Unlike `_.at`, this method mutates `array`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {...(number|number[])} [indexes] The indexes of elements to remove. + * @returns {Array} Returns the new array of removed elements. + * @example + * + * var array = ['a', 'b', 'c', 'd']; + * var pulled = _.pullAt(array, [1, 3]); + * + * console.log(array); + * // => ['a', 'c'] + * + * console.log(pulled); + * // => ['b', 'd'] + */ + var pullAt = flatRest(function (array, indexes) { + var length = array == null ? 0 : array.length, + result = baseAt(array, indexes); + + basePullAt( + array, + arrayMap(indexes, function (index) { + return isIndex(index, length) ? +index : index; + }).sort(compareAscending), + ); + + return result; + }); + + /** + * Removes all elements from `array` that `predicate` returns truthy for + * and returns an array of the removed elements. The predicate is invoked + * with three arguments: (value, index, array). + * + * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull` + * to pull elements from an array by value. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new array of removed elements. + * @example + * + * var array = [1, 2, 3, 4]; + * var evens = _.remove(array, function(n) { + * return n % 2 == 0; + * }); + * + * console.log(array); + * // => [1, 3] + * + * console.log(evens); + * // => [2, 4] + */ + function remove(array, predicate) { + var result = []; + if (!(array && array.length)) { + return result; + } + var index = -1, + indexes = [], + length = array.length; + + predicate = getIteratee(predicate, 3); + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result.push(value); + indexes.push(index); + } + } + basePullAt(array, indexes); + return result; + } + + /** + * Reverses `array` so that the first element becomes the last, the second + * element becomes the second to last, and so on. + * + * **Note:** This method mutates `array` and is based on + * [`Array#reverse`](https://mdn.io/Array/reverse). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to modify. + * @returns {Array} Returns `array`. + * @example + * + * var array = [1, 2, 3]; + * + * _.reverse(array); + * // => [3, 2, 1] + * + * console.log(array); + * // => [3, 2, 1] + */ + function reverse(array) { + return array == null ? array : nativeReverse.call(array); + } + + /** + * Creates a slice of `array` from `start` up to, but not including, `end`. + * + * **Note:** This method is used instead of + * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are + * returned. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to slice. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the slice of `array`. + */ + function slice(array, start, end) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + if (end && typeof end != 'number' && isIterateeCall(array, start, end)) { + start = 0; + end = length; + } else { + start = start == null ? 0 : toInteger(start); + end = end === undefined ? length : toInteger(end); + } + return baseSlice(array, start, end); + } + + /** + * Uses a binary search to determine the lowest index at which `value` + * should be inserted into `array` in order to maintain its sort order. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * _.sortedIndex([30, 50], 40); + * // => 1 + */ + function sortedIndex(array, value) { + return baseSortedIndex(array, value); + } + + /** + * This method is like `_.sortedIndex` except that it accepts `iteratee` + * which is invoked for `value` and each element of `array` to compute their + * sort ranking. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * var objects = [{ 'x': 4 }, { 'x': 5 }]; + * + * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; }); + * // => 0 + * + * // The `_.property` iteratee shorthand. + * _.sortedIndexBy(objects, { 'x': 4 }, 'x'); + * // => 0 + */ + function sortedIndexBy(array, value, iteratee) { + return baseSortedIndexBy(array, value, getIteratee(iteratee, 2)); + } + + /** + * This method is like `_.indexOf` except that it performs a binary + * search on a sorted `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.sortedIndexOf([4, 5, 5, 5, 6], 5); + * // => 1 + */ + function sortedIndexOf(array, value) { + var length = array == null ? 0 : array.length; + if (length) { + var index = baseSortedIndex(array, value); + if (index < length && eq(array[index], value)) { + return index; + } + } + return -1; + } + + /** + * This method is like `_.sortedIndex` except that it returns the highest + * index at which `value` should be inserted into `array` in order to + * maintain its sort order. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * _.sortedLastIndex([4, 5, 5, 5, 6], 5); + * // => 4 + */ + function sortedLastIndex(array, value) { + return baseSortedIndex(array, value, true); + } + + /** + * This method is like `_.sortedLastIndex` except that it accepts `iteratee` + * which is invoked for `value` and each element of `array` to compute their + * sort ranking. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * var objects = [{ 'x': 4 }, { 'x': 5 }]; + * + * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; }); + * // => 1 + * + * // The `_.property` iteratee shorthand. + * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x'); + * // => 1 + */ + function sortedLastIndexBy(array, value, iteratee) { + return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true); + } + + /** + * This method is like `_.lastIndexOf` except that it performs a binary + * search on a sorted `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5); + * // => 3 + */ + function sortedLastIndexOf(array, value) { + var length = array == null ? 0 : array.length; + if (length) { + var index = baseSortedIndex(array, value, true) - 1; + if (eq(array[index], value)) { + return index; + } + } + return -1; + } + + /** + * This method is like `_.uniq` except that it's designed and optimized + * for sorted arrays. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.sortedUniq([1, 1, 2]); + * // => [1, 2] + */ + function sortedUniq(array) { + return array && array.length ? baseSortedUniq(array) : []; + } + + /** + * This method is like `_.uniqBy` except that it's designed and optimized + * for sorted arrays. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor); + * // => [1.1, 2.3] + */ + function sortedUniqBy(array, iteratee) { + return array && array.length ? baseSortedUniq(array, getIteratee(iteratee, 2)) : []; + } + + /** + * Gets all but the first element of `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to query. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.tail([1, 2, 3]); + * // => [2, 3] + */ + function tail(array) { + var length = array == null ? 0 : array.length; + return length ? baseSlice(array, 1, length) : []; + } + + /** + * Creates a slice of `array` with `n` elements taken from the beginning. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to take. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.take([1, 2, 3]); + * // => [1] + * + * _.take([1, 2, 3], 2); + * // => [1, 2] + * + * _.take([1, 2, 3], 5); + * // => [1, 2, 3] + * + * _.take([1, 2, 3], 0); + * // => [] + */ + function take(array, n, guard) { + if (!(array && array.length)) { + return []; + } + n = guard || n === undefined ? 1 : toInteger(n); + return baseSlice(array, 0, n < 0 ? 0 : n); + } + + /** + * Creates a slice of `array` with `n` elements taken from the end. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to take. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.takeRight([1, 2, 3]); + * // => [3] + * + * _.takeRight([1, 2, 3], 2); + * // => [2, 3] + * + * _.takeRight([1, 2, 3], 5); + * // => [1, 2, 3] + * + * _.takeRight([1, 2, 3], 0); + * // => [] + */ + function takeRight(array, n, guard) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + n = guard || n === undefined ? 1 : toInteger(n); + n = length - n; + return baseSlice(array, n < 0 ? 0 : n, length); + } + + /** + * Creates a slice of `array` with elements taken from the end. Elements are + * taken until `predicate` returns falsey. The predicate is invoked with + * three arguments: (value, index, array). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * _.takeRightWhile(users, function(o) { return !o.active; }); + * // => objects for ['fred', 'pebbles'] + * + * // The `_.matches` iteratee shorthand. + * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false }); + * // => objects for ['pebbles'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.takeRightWhile(users, ['active', false]); + * // => objects for ['fred', 'pebbles'] + * + * // The `_.property` iteratee shorthand. + * _.takeRightWhile(users, 'active'); + * // => [] + */ + function takeRightWhile(array, predicate) { + return array && array.length ? baseWhile(array, getIteratee(predicate, 3), false, true) : []; + } + + /** + * Creates a slice of `array` with elements taken from the beginning. Elements + * are taken until `predicate` returns falsey. The predicate is invoked with + * three arguments: (value, index, array). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.takeWhile(users, function(o) { return !o.active; }); + * // => objects for ['barney', 'fred'] + * + * // The `_.matches` iteratee shorthand. + * _.takeWhile(users, { 'user': 'barney', 'active': false }); + * // => objects for ['barney'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.takeWhile(users, ['active', false]); + * // => objects for ['barney', 'fred'] + * + * // The `_.property` iteratee shorthand. + * _.takeWhile(users, 'active'); + * // => [] + */ + function takeWhile(array, predicate) { + return array && array.length ? baseWhile(array, getIteratee(predicate, 3)) : []; + } + + /** + * Creates an array of unique values, in order, from all given arrays using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of combined values. + * @example + * + * _.union([2], [1, 2]); + * // => [2, 1] + */ + var union = baseRest(function (arrays) { + return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true)); + }); + + /** + * This method is like `_.union` except that it accepts `iteratee` which is + * invoked for each element of each `arrays` to generate the criterion by + * which uniqueness is computed. Result values are chosen from the first + * array in which the value occurs. The iteratee is invoked with one argument: + * (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of combined values. + * @example + * + * _.unionBy([2.1], [1.2, 2.3], Math.floor); + * // => [2.1, 1.2] + * + * // The `_.property` iteratee shorthand. + * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }, { 'x': 2 }] + */ + var unionBy = baseRest(function (arrays) { + var iteratee = last(arrays); + if (isArrayLikeObject(iteratee)) { + iteratee = undefined; + } + return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2)); + }); + + /** + * This method is like `_.union` except that it accepts `comparator` which + * is invoked to compare elements of `arrays`. Result values are chosen from + * the first array in which the value occurs. The comparator is invoked + * with two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of combined values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.unionWith(objects, others, _.isEqual); + * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }] + */ + var unionWith = baseRest(function (arrays) { + var comparator = last(arrays); + comparator = typeof comparator == 'function' ? comparator : undefined; + return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator); + }); + + /** + * Creates a duplicate-free version of an array, using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons, in which only the first occurrence of each element + * is kept. The order of result values is determined by the order they occur + * in the array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.uniq([2, 1, 2]); + * // => [2, 1] + */ + function uniq(array) { + return array && array.length ? baseUniq(array) : []; + } + + /** + * This method is like `_.uniq` except that it accepts `iteratee` which is + * invoked for each element in `array` to generate the criterion by which + * uniqueness is computed. The order of result values is determined by the + * order they occur in the array. The iteratee is invoked with one argument: + * (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.uniqBy([2.1, 1.2, 2.3], Math.floor); + * // => [2.1, 1.2] + * + * // The `_.property` iteratee shorthand. + * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }, { 'x': 2 }] + */ + function uniqBy(array, iteratee) { + return array && array.length ? baseUniq(array, getIteratee(iteratee, 2)) : []; + } + + /** + * This method is like `_.uniq` except that it accepts `comparator` which + * is invoked to compare elements of `array`. The order of result values is + * determined by the order they occur in the array.The comparator is invoked + * with two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.uniqWith(objects, _.isEqual); + * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }] + */ + function uniqWith(array, comparator) { + comparator = typeof comparator == 'function' ? comparator : undefined; + return array && array.length ? baseUniq(array, undefined, comparator) : []; + } + + /** + * This method is like `_.zip` except that it accepts an array of grouped + * elements and creates an array regrouping the elements to their pre-zip + * configuration. + * + * @static + * @memberOf _ + * @since 1.2.0 + * @category Array + * @param {Array} array The array of grouped elements to process. + * @returns {Array} Returns the new array of regrouped elements. + * @example + * + * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]); + * // => [['a', 1, true], ['b', 2, false]] + * + * _.unzip(zipped); + * // => [['a', 'b'], [1, 2], [true, false]] + */ + function unzip(array) { + if (!(array && array.length)) { + return []; + } + var length = 0; + array = arrayFilter(array, function (group) { + if (isArrayLikeObject(group)) { + length = nativeMax(group.length, length); + return true; + } + }); + return baseTimes(length, function (index) { + return arrayMap(array, baseProperty(index)); + }); + } + + /** + * This method is like `_.unzip` except that it accepts `iteratee` to specify + * how regrouped values should be combined. The iteratee is invoked with the + * elements of each group: (...group). + * + * @static + * @memberOf _ + * @since 3.8.0 + * @category Array + * @param {Array} array The array of grouped elements to process. + * @param {Function} [iteratee=_.identity] The function to combine + * regrouped values. + * @returns {Array} Returns the new array of regrouped elements. + * @example + * + * var zipped = _.zip([1, 2], [10, 20], [100, 200]); + * // => [[1, 10, 100], [2, 20, 200]] + * + * _.unzipWith(zipped, _.add); + * // => [3, 30, 300] + */ + function unzipWith(array, iteratee) { + if (!(array && array.length)) { + return []; + } + var result = unzip(array); + if (iteratee == null) { + return result; + } + return arrayMap(result, function (group) { + return apply(iteratee, undefined, group); + }); + } + + /** + * Creates an array excluding all given values using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * **Note:** Unlike `_.pull`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...*} [values] The values to exclude. + * @returns {Array} Returns the new array of filtered values. + * @see _.difference, _.xor + * @example + * + * _.without([2, 1, 2, 3], 1, 2); + * // => [3] + */ + var without = baseRest(function (array, values) { + return isArrayLikeObject(array) ? baseDifference(array, values) : []; + }); + + /** + * Creates an array of unique values that is the + * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference) + * of the given arrays. The order of result values is determined by the order + * they occur in the arrays. + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of filtered values. + * @see _.difference, _.without + * @example + * + * _.xor([2, 1], [2, 3]); + * // => [1, 3] + */ + var xor = baseRest(function (arrays) { + return baseXor(arrayFilter(arrays, isArrayLikeObject)); + }); + + /** + * This method is like `_.xor` except that it accepts `iteratee` which is + * invoked for each element of each `arrays` to generate the criterion by + * which by which they're compared. The order of result values is determined + * by the order they occur in the arrays. The iteratee is invoked with one + * argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor); + * // => [1.2, 3.4] + * + * // The `_.property` iteratee shorthand. + * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 2 }] + */ + var xorBy = baseRest(function (arrays) { + var iteratee = last(arrays); + if (isArrayLikeObject(iteratee)) { + iteratee = undefined; + } + return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2)); + }); + + /** + * This method is like `_.xor` except that it accepts `comparator` which is + * invoked to compare elements of `arrays`. The order of result values is + * determined by the order they occur in the arrays. The comparator is invoked + * with two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.xorWith(objects, others, _.isEqual); + * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }] + */ + var xorWith = baseRest(function (arrays) { + var comparator = last(arrays); + comparator = typeof comparator == 'function' ? comparator : undefined; + return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator); + }); + + /** + * Creates an array of grouped elements, the first of which contains the + * first elements of the given arrays, the second of which contains the + * second elements of the given arrays, and so on. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {...Array} [arrays] The arrays to process. + * @returns {Array} Returns the new array of grouped elements. + * @example + * + * _.zip(['a', 'b'], [1, 2], [true, false]); + * // => [['a', 1, true], ['b', 2, false]] + */ + var zip = baseRest(unzip); + + /** + * This method is like `_.fromPairs` except that it accepts two arrays, + * one of property identifiers and one of corresponding values. + * + * @static + * @memberOf _ + * @since 0.4.0 + * @category Array + * @param {Array} [props=[]] The property identifiers. + * @param {Array} [values=[]] The property values. + * @returns {Object} Returns the new object. + * @example + * + * _.zipObject(['a', 'b'], [1, 2]); + * // => { 'a': 1, 'b': 2 } + */ + function zipObject(props, values) { + return baseZipObject(props || [], values || [], assignValue); + } + + /** + * This method is like `_.zipObject` except that it supports property paths. + * + * @static + * @memberOf _ + * @since 4.1.0 + * @category Array + * @param {Array} [props=[]] The property identifiers. + * @param {Array} [values=[]] The property values. + * @returns {Object} Returns the new object. + * @example + * + * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]); + * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } } + */ + function zipObjectDeep(props, values) { + return baseZipObject(props || [], values || [], baseSet); + } + + /** + * This method is like `_.zip` except that it accepts `iteratee` to specify + * how grouped values should be combined. The iteratee is invoked with the + * elements of each group: (...group). + * + * @static + * @memberOf _ + * @since 3.8.0 + * @category Array + * @param {...Array} [arrays] The arrays to process. + * @param {Function} [iteratee=_.identity] The function to combine + * grouped values. + * @returns {Array} Returns the new array of grouped elements. + * @example + * + * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) { + * return a + b + c; + * }); + * // => [111, 222] + */ + var zipWith = baseRest(function (arrays) { + var length = arrays.length, + iteratee = length > 1 ? arrays[length - 1] : undefined; + + iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined; + return unzipWith(arrays, iteratee); + }); + + /*------------------------------------------------------------------------*/ + + /** + * Creates a `lodash` wrapper instance that wraps `value` with explicit method + * chain sequences enabled. The result of such sequences must be unwrapped + * with `_#value`. + * + * @static + * @memberOf _ + * @since 1.3.0 + * @category Seq + * @param {*} value The value to wrap. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 }, + * { 'user': 'pebbles', 'age': 1 } + * ]; + * + * var youngest = _ + * .chain(users) + * .sortBy('age') + * .map(function(o) { + * return o.user + ' is ' + o.age; + * }) + * .head() + * .value(); + * // => 'pebbles is 1' + */ + function chain(value) { + var result = lodash(value); + result.__chain__ = true; + return result; + } + + /** + * This method invokes `interceptor` and returns `value`. The interceptor + * is invoked with one argument; (value). The purpose of this method is to + * "tap into" a method chain sequence in order to modify intermediate results. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Seq + * @param {*} value The value to provide to `interceptor`. + * @param {Function} interceptor The function to invoke. + * @returns {*} Returns `value`. + * @example + * + * _([1, 2, 3]) + * .tap(function(array) { + * // Mutate input array. + * array.pop(); + * }) + * .reverse() + * .value(); + * // => [2, 1] + */ + function tap(value, interceptor) { + interceptor(value); + return value; + } + + /** + * This method is like `_.tap` except that it returns the result of `interceptor`. + * The purpose of this method is to "pass thru" values replacing intermediate + * results in a method chain sequence. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Seq + * @param {*} value The value to provide to `interceptor`. + * @param {Function} interceptor The function to invoke. + * @returns {*} Returns the result of `interceptor`. + * @example + * + * _(' abc ') + * .chain() + * .trim() + * .thru(function(value) { + * return [value]; + * }) + * .value(); + * // => ['abc'] + */ + function thru(value, interceptor) { + return interceptor(value); + } + + /** + * This method is the wrapper version of `_.at`. + * + * @name at + * @memberOf _ + * @since 1.0.0 + * @category Seq + * @param {...(string|string[])} [paths] The property paths to pick. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] }; + * + * _(object).at(['a[0].b.c', 'a[1]']).value(); + * // => [3, 4] + */ + var wrapperAt = flatRest(function (paths) { + var length = paths.length, + start = length ? paths[0] : 0, + value = this.__wrapped__, + interceptor = function (object) { + return baseAt(object, paths); + }; + + if ( + length > 1 || + this.__actions__.length || + !(value instanceof LazyWrapper) || + !isIndex(start) + ) { + return this.thru(interceptor); + } + value = value.slice(start, +start + (length ? 1 : 0)); + value.__actions__.push({ + func: thru, + args: [interceptor], + thisArg: undefined, + }); + return new LodashWrapper(value, this.__chain__).thru(function (array) { + if (length && !array.length) { + array.push(undefined); + } + return array; + }); + }); + + /** + * Creates a `lodash` wrapper instance with explicit method chain sequences enabled. + * + * @name chain + * @memberOf _ + * @since 0.1.0 + * @category Seq + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 } + * ]; + * + * // A sequence without explicit chaining. + * _(users).head(); + * // => { 'user': 'barney', 'age': 36 } + * + * // A sequence with explicit chaining. + * _(users) + * .chain() + * .head() + * .pick('user') + * .value(); + * // => { 'user': 'barney' } + */ + function wrapperChain() { + return chain(this); + } + + /** + * Executes the chain sequence and returns the wrapped result. + * + * @name commit + * @memberOf _ + * @since 3.2.0 + * @category Seq + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var array = [1, 2]; + * var wrapped = _(array).push(3); + * + * console.log(array); + * // => [1, 2] + * + * wrapped = wrapped.commit(); + * console.log(array); + * // => [1, 2, 3] + * + * wrapped.last(); + * // => 3 + * + * console.log(array); + * // => [1, 2, 3] + */ + function wrapperCommit() { + return new LodashWrapper(this.value(), this.__chain__); + } + + /** + * Gets the next value on a wrapped object following the + * [iterator protocol](https://mdn.io/iteration_protocols#iterator). + * + * @name next + * @memberOf _ + * @since 4.0.0 + * @category Seq + * @returns {Object} Returns the next iterator value. + * @example + * + * var wrapped = _([1, 2]); + * + * wrapped.next(); + * // => { 'done': false, 'value': 1 } + * + * wrapped.next(); + * // => { 'done': false, 'value': 2 } + * + * wrapped.next(); + * // => { 'done': true, 'value': undefined } + */ + function wrapperNext() { + if (this.__values__ === undefined) { + this.__values__ = toArray(this.value()); + } + var done = this.__index__ >= this.__values__.length, + value = done ? undefined : this.__values__[this.__index__++]; + + return { done: done, value: value }; + } + + /** + * Enables the wrapper to be iterable. + * + * @name Symbol.iterator + * @memberOf _ + * @since 4.0.0 + * @category Seq + * @returns {Object} Returns the wrapper object. + * @example + * + * var wrapped = _([1, 2]); + * + * wrapped[Symbol.iterator]() === wrapped; + * // => true + * + * Array.from(wrapped); + * // => [1, 2] + */ + function wrapperToIterator() { + return this; + } + + /** + * Creates a clone of the chain sequence planting `value` as the wrapped value. + * + * @name plant + * @memberOf _ + * @since 3.2.0 + * @category Seq + * @param {*} value The value to plant. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * function square(n) { + * return n * n; + * } + * + * var wrapped = _([1, 2]).map(square); + * var other = wrapped.plant([3, 4]); + * + * other.value(); + * // => [9, 16] + * + * wrapped.value(); + * // => [1, 4] + */ + function wrapperPlant(value) { + var result, + parent = this; + + while (parent instanceof baseLodash) { + var clone = wrapperClone(parent); + clone.__index__ = 0; + clone.__values__ = undefined; + if (result) { + previous.__wrapped__ = clone; + } else { + result = clone; + } + var previous = clone; + parent = parent.__wrapped__; + } + previous.__wrapped__ = value; + return result; + } + + /** + * This method is the wrapper version of `_.reverse`. + * + * **Note:** This method mutates the wrapped array. + * + * @name reverse + * @memberOf _ + * @since 0.1.0 + * @category Seq + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var array = [1, 2, 3]; + * + * _(array).reverse().value() + * // => [3, 2, 1] + * + * console.log(array); + * // => [3, 2, 1] + */ + function wrapperReverse() { + var value = this.__wrapped__; + if (value instanceof LazyWrapper) { + var wrapped = value; + if (this.__actions__.length) { + wrapped = new LazyWrapper(this); + } + wrapped = wrapped.reverse(); + wrapped.__actions__.push({ + func: thru, + args: [reverse], + thisArg: undefined, + }); + return new LodashWrapper(wrapped, this.__chain__); + } + return this.thru(reverse); + } + + /** + * Executes the chain sequence to resolve the unwrapped value. + * + * @name value + * @memberOf _ + * @since 0.1.0 + * @alias toJSON, valueOf + * @category Seq + * @returns {*} Returns the resolved unwrapped value. + * @example + * + * _([1, 2, 3]).value(); + * // => [1, 2, 3] + */ + function wrapperValue() { + return baseWrapperValue(this.__wrapped__, this.__actions__); + } + + /*------------------------------------------------------------------------*/ + + /** + * Creates an object composed of keys generated from the results of running + * each element of `collection` thru `iteratee`. The corresponding value of + * each key is the number of times the key was returned by `iteratee`. The + * iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 0.5.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee to transform keys. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * _.countBy([6.1, 4.2, 6.3], Math.floor); + * // => { '4': 1, '6': 2 } + * + * // The `_.property` iteratee shorthand. + * _.countBy(['one', 'two', 'three'], 'length'); + * // => { '3': 2, '5': 1 } + */ + var countBy = createAggregator(function (result, value, key) { + if (hasOwnProperty.call(result, key)) { + ++result[key]; + } else { + baseAssignValue(result, key, 1); + } + }); + + /** + * Checks if `predicate` returns truthy for **all** elements of `collection`. + * Iteration is stopped once `predicate` returns falsey. The predicate is + * invoked with three arguments: (value, index|key, collection). + * + * **Note:** This method returns `true` for + * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because + * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of + * elements of empty collections. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false`. + * @example + * + * _.every([true, 1, null, 'yes'], Boolean); + * // => false + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * // The `_.matches` iteratee shorthand. + * _.every(users, { 'user': 'barney', 'active': false }); + * // => false + * + * // The `_.matchesProperty` iteratee shorthand. + * _.every(users, ['active', false]); + * // => true + * + * // The `_.property` iteratee shorthand. + * _.every(users, 'active'); + * // => false + */ + function every(collection, predicate, guard) { + var func = isArray(collection) ? arrayEvery : baseEvery; + if (guard && isIterateeCall(collection, predicate, guard)) { + predicate = undefined; + } + return func(collection, getIteratee(predicate, 3)); + } + + /** + * Iterates over elements of `collection`, returning an array of all elements + * `predicate` returns truthy for. The predicate is invoked with three + * arguments: (value, index|key, collection). + * + * **Note:** Unlike `_.remove`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + * @see _.reject + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * _.filter(users, function(o) { return !o.active; }); + * // => objects for ['fred'] + * + * // The `_.matches` iteratee shorthand. + * _.filter(users, { 'age': 36, 'active': true }); + * // => objects for ['barney'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.filter(users, ['active', false]); + * // => objects for ['fred'] + * + * // The `_.property` iteratee shorthand. + * _.filter(users, 'active'); + * // => objects for ['barney'] + */ + function filter(collection, predicate) { + var func = isArray(collection) ? arrayFilter : baseFilter; + return func(collection, getIteratee(predicate, 3)); + } + + /** + * Iterates over elements of `collection`, returning the first element + * `predicate` returns truthy for. The predicate is invoked with three + * arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. + * @returns {*} Returns the matched element, else `undefined`. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false }, + * { 'user': 'pebbles', 'age': 1, 'active': true } + * ]; + * + * _.find(users, function(o) { return o.age < 40; }); + * // => object for 'barney' + * + * // The `_.matches` iteratee shorthand. + * _.find(users, { 'age': 1, 'active': true }); + * // => object for 'pebbles' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.find(users, ['active', false]); + * // => object for 'fred' + * + * // The `_.property` iteratee shorthand. + * _.find(users, 'active'); + * // => object for 'barney' + */ + var find = createFind(findIndex); + + /** + * This method is like `_.find` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Collection + * @param {Array|Object} collection The collection to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=collection.length-1] The index to search from. + * @returns {*} Returns the matched element, else `undefined`. + * @example + * + * _.findLast([1, 2, 3, 4], function(n) { + * return n % 2 == 1; + * }); + * // => 3 + */ + var findLast = createFind(findLastIndex); + + /** + * Creates a flattened array of values by running each element in `collection` + * thru `iteratee` and flattening the mapped results. The iteratee is invoked + * with three arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new flattened array. + * @example + * + * function duplicate(n) { + * return [n, n]; + * } + * + * _.flatMap([1, 2], duplicate); + * // => [1, 1, 2, 2] + */ + function flatMap(collection, iteratee) { + return baseFlatten(map(collection, iteratee), 1); + } + + /** + * This method is like `_.flatMap` except that it recursively flattens the + * mapped results. + * + * @static + * @memberOf _ + * @since 4.7.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new flattened array. + * @example + * + * function duplicate(n) { + * return [[[n, n]]]; + * } + * + * _.flatMapDeep([1, 2], duplicate); + * // => [1, 1, 2, 2] + */ + function flatMapDeep(collection, iteratee) { + return baseFlatten(map(collection, iteratee), INFINITY); + } + + /** + * This method is like `_.flatMap` except that it recursively flattens the + * mapped results up to `depth` times. + * + * @static + * @memberOf _ + * @since 4.7.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {number} [depth=1] The maximum recursion depth. + * @returns {Array} Returns the new flattened array. + * @example + * + * function duplicate(n) { + * return [[[n, n]]]; + * } + * + * _.flatMapDepth([1, 2], duplicate, 2); + * // => [[1, 1], [2, 2]] + */ + function flatMapDepth(collection, iteratee, depth) { + depth = depth === undefined ? 1 : toInteger(depth); + return baseFlatten(map(collection, iteratee), depth); + } + + /** + * Iterates over elements of `collection` and invokes `iteratee` for each element. + * The iteratee is invoked with three arguments: (value, index|key, collection). + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * **Note:** As with other "Collections" methods, objects with a "length" + * property are iterated like arrays. To avoid this behavior use `_.forIn` + * or `_.forOwn` for object iteration. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @alias each + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + * @see _.forEachRight + * @example + * + * _.forEach([1, 2], function(value) { + * console.log(value); + * }); + * // => Logs `1` then `2`. + * + * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a' then 'b' (iteration order is not guaranteed). + */ + function forEach(collection, iteratee) { + var func = isArray(collection) ? arrayEach : baseEach; + return func(collection, getIteratee(iteratee, 3)); + } + + /** + * This method is like `_.forEach` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @alias eachRight + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + * @see _.forEach + * @example + * + * _.forEachRight([1, 2], function(value) { + * console.log(value); + * }); + * // => Logs `2` then `1`. + */ + function forEachRight(collection, iteratee) { + var func = isArray(collection) ? arrayEachRight : baseEachRight; + return func(collection, getIteratee(iteratee, 3)); + } + + /** + * Creates an object composed of keys generated from the results of running + * each element of `collection` thru `iteratee`. The order of grouped values + * is determined by the order they occur in `collection`. The corresponding + * value of each key is an array of elements responsible for generating the + * key. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee to transform keys. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * _.groupBy([6.1, 4.2, 6.3], Math.floor); + * // => { '4': [4.2], '6': [6.1, 6.3] } + * + * // The `_.property` iteratee shorthand. + * _.groupBy(['one', 'two', 'three'], 'length'); + * // => { '3': ['one', 'two'], '5': ['three'] } + */ + var groupBy = createAggregator(function (result, value, key) { + if (hasOwnProperty.call(result, key)) { + result[key].push(value); + } else { + baseAssignValue(result, key, [value]); + } + }); + + /** + * Checks if `value` is in `collection`. If `collection` is a string, it's + * checked for a substring of `value`, otherwise + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * is used for equality comparisons. If `fromIndex` is negative, it's used as + * the offset from the end of `collection`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object|string} collection The collection to inspect. + * @param {*} value The value to search for. + * @param {number} [fromIndex=0] The index to search from. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`. + * @returns {boolean} Returns `true` if `value` is found, else `false`. + * @example + * + * _.includes([1, 2, 3], 1); + * // => true + * + * _.includes([1, 2, 3], 1, 2); + * // => false + * + * _.includes({ 'a': 1, 'b': 2 }, 1); + * // => true + * + * _.includes('abcd', 'bc'); + * // => true + */ + function includes(collection, value, fromIndex, guard) { + collection = isArrayLike(collection) ? collection : values(collection); + fromIndex = fromIndex && !guard ? toInteger(fromIndex) : 0; + + var length = collection.length; + if (fromIndex < 0) { + fromIndex = nativeMax(length + fromIndex, 0); + } + return isString(collection) + ? fromIndex <= length && collection.indexOf(value, fromIndex) > -1 + : !!length && baseIndexOf(collection, value, fromIndex) > -1; + } + + /** + * Invokes the method at `path` of each element in `collection`, returning + * an array of the results of each invoked method. Any additional arguments + * are provided to each invoked method. If `path` is a function, it's invoked + * for, and `this` bound to, each element in `collection`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Array|Function|string} path The path of the method to invoke or + * the function invoked per iteration. + * @param {...*} [args] The arguments to invoke each method with. + * @returns {Array} Returns the array of results. + * @example + * + * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort'); + * // => [[1, 5, 7], [1, 2, 3]] + * + * _.invokeMap([123, 456], String.prototype.split, ''); + * // => [['1', '2', '3'], ['4', '5', '6']] + */ + var invokeMap = baseRest(function (collection, path, args) { + var index = -1, + isFunc = typeof path == 'function', + result = isArrayLike(collection) ? Array(collection.length) : []; + + baseEach(collection, function (value) { + result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args); + }); + return result; + }); + + /** + * Creates an object composed of keys generated from the results of running + * each element of `collection` thru `iteratee`. The corresponding value of + * each key is the last element responsible for generating the key. The + * iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee to transform keys. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * var array = [ + * { 'dir': 'left', 'code': 97 }, + * { 'dir': 'right', 'code': 100 } + * ]; + * + * _.keyBy(array, function(o) { + * return String.fromCharCode(o.code); + * }); + * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } } + * + * _.keyBy(array, 'dir'); + * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } } + */ + var keyBy = createAggregator(function (result, value, key) { + baseAssignValue(result, key, value); + }); + + /** + * Creates an array of values by running each element in `collection` thru + * `iteratee`. The iteratee is invoked with three arguments: + * (value, index|key, collection). + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. + * + * The guarded methods are: + * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`, + * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`, + * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`, + * `template`, `trim`, `trimEnd`, `trimStart`, and `words` + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + * @example + * + * function square(n) { + * return n * n; + * } + * + * _.map([4, 8], square); + * // => [16, 64] + * + * _.map({ 'a': 4, 'b': 8 }, square); + * // => [16, 64] (iteration order is not guaranteed) + * + * var users = [ + * { 'user': 'barney' }, + * { 'user': 'fred' } + * ]; + * + * // The `_.property` iteratee shorthand. + * _.map(users, 'user'); + * // => ['barney', 'fred'] + */ + function map(collection, iteratee) { + var func = isArray(collection) ? arrayMap : baseMap; + return func(collection, getIteratee(iteratee, 3)); + } + + /** + * This method is like `_.sortBy` except that it allows specifying the sort + * orders of the iteratees to sort by. If `orders` is unspecified, all values + * are sorted in ascending order. Otherwise, specify an order of "desc" for + * descending or "asc" for ascending sort order of corresponding values. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]] + * The iteratees to sort by. + * @param {string[]} [orders] The sort orders of `iteratees`. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`. + * @returns {Array} Returns the new sorted array. + * @example + * + * var users = [ + * { 'user': 'fred', 'age': 48 }, + * { 'user': 'barney', 'age': 34 }, + * { 'user': 'fred', 'age': 40 }, + * { 'user': 'barney', 'age': 36 } + * ]; + * + * // Sort by `user` in ascending order and by `age` in descending order. + * _.orderBy(users, ['user', 'age'], ['asc', 'desc']); + * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]] + */ + function orderBy(collection, iteratees, orders, guard) { + if (collection == null) { + return []; + } + if (!isArray(iteratees)) { + iteratees = iteratees == null ? [] : [iteratees]; + } + orders = guard ? undefined : orders; + if (!isArray(orders)) { + orders = orders == null ? [] : [orders]; + } + return baseOrderBy(collection, iteratees, orders); + } + + /** + * Creates an array of elements split into two groups, the first of which + * contains elements `predicate` returns truthy for, the second of which + * contains elements `predicate` returns falsey for. The predicate is + * invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the array of grouped elements. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false }, + * { 'user': 'fred', 'age': 40, 'active': true }, + * { 'user': 'pebbles', 'age': 1, 'active': false } + * ]; + * + * _.partition(users, function(o) { return o.active; }); + * // => objects for [['fred'], ['barney', 'pebbles']] + * + * // The `_.matches` iteratee shorthand. + * _.partition(users, { 'age': 1, 'active': false }); + * // => objects for [['pebbles'], ['barney', 'fred']] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.partition(users, ['active', false]); + * // => objects for [['barney', 'pebbles'], ['fred']] + * + * // The `_.property` iteratee shorthand. + * _.partition(users, 'active'); + * // => objects for [['fred'], ['barney', 'pebbles']] + */ + var partition = createAggregator( + function (result, value, key) { + result[key ? 0 : 1].push(value); + }, + function () { + return [[], []]; + }, + ); + + /** + * Reduces `collection` to a value which is the accumulated result of running + * each element in `collection` thru `iteratee`, where each successive + * invocation is supplied the return value of the previous. If `accumulator` + * is not given, the first element of `collection` is used as the initial + * value. The iteratee is invoked with four arguments: + * (accumulator, value, index|key, collection). + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.reduce`, `_.reduceRight`, and `_.transform`. + * + * The guarded methods are: + * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`, + * and `sortBy` + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @returns {*} Returns the accumulated value. + * @see _.reduceRight + * @example + * + * _.reduce([1, 2], function(sum, n) { + * return sum + n; + * }, 0); + * // => 3 + * + * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { + * (result[value] || (result[value] = [])).push(key); + * return result; + * }, {}); + * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed) + */ + function reduce(collection, iteratee, accumulator) { + var func = isArray(collection) ? arrayReduce : baseReduce, + initAccum = arguments.length < 3; + + return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach); + } + + /** + * This method is like `_.reduce` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @returns {*} Returns the accumulated value. + * @see _.reduce + * @example + * + * var array = [[0, 1], [2, 3], [4, 5]]; + * + * _.reduceRight(array, function(flattened, other) { + * return flattened.concat(other); + * }, []); + * // => [4, 5, 2, 3, 0, 1] + */ + function reduceRight(collection, iteratee, accumulator) { + var func = isArray(collection) ? arrayReduceRight : baseReduce, + initAccum = arguments.length < 3; + + return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight); + } + + /** + * The opposite of `_.filter`; this method returns the elements of `collection` + * that `predicate` does **not** return truthy for. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + * @see _.filter + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false }, + * { 'user': 'fred', 'age': 40, 'active': true } + * ]; + * + * _.reject(users, function(o) { return !o.active; }); + * // => objects for ['fred'] + * + * // The `_.matches` iteratee shorthand. + * _.reject(users, { 'age': 40, 'active': true }); + * // => objects for ['barney'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.reject(users, ['active', false]); + * // => objects for ['fred'] + * + * // The `_.property` iteratee shorthand. + * _.reject(users, 'active'); + * // => objects for ['barney'] + */ + function reject(collection, predicate) { + var func = isArray(collection) ? arrayFilter : baseFilter; + return func(collection, negate(getIteratee(predicate, 3))); + } + + /** + * Gets a random element from `collection`. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Collection + * @param {Array|Object} collection The collection to sample. + * @returns {*} Returns the random element. + * @example + * + * _.sample([1, 2, 3, 4]); + * // => 2 + */ + function sample(collection) { + var func = isArray(collection) ? arraySample : baseSample; + return func(collection); + } + + /** + * Gets `n` random elements at unique keys from `collection` up to the + * size of `collection`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to sample. + * @param {number} [n=1] The number of elements to sample. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the random elements. + * @example + * + * _.sampleSize([1, 2, 3], 2); + * // => [3, 1] + * + * _.sampleSize([1, 2, 3], 4); + * // => [2, 3, 1] + */ + function sampleSize(collection, n, guard) { + if (guard ? isIterateeCall(collection, n, guard) : n === undefined) { + n = 1; + } else { + n = toInteger(n); + } + var func = isArray(collection) ? arraySampleSize : baseSampleSize; + return func(collection, n); + } + + /** + * Creates an array of shuffled values, using a version of the + * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to shuffle. + * @returns {Array} Returns the new shuffled array. + * @example + * + * _.shuffle([1, 2, 3, 4]); + * // => [4, 1, 3, 2] + */ + function shuffle(collection) { + var func = isArray(collection) ? arrayShuffle : baseShuffle; + return func(collection); + } + + /** + * Gets the size of `collection` by returning its length for array-like + * values or the number of own enumerable string keyed properties for objects. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object|string} collection The collection to inspect. + * @returns {number} Returns the collection size. + * @example + * + * _.size([1, 2, 3]); + * // => 3 + * + * _.size({ 'a': 1, 'b': 2 }); + * // => 2 + * + * _.size('pebbles'); + * // => 7 + */ + function size(collection) { + if (collection == null) { + return 0; + } + if (isArrayLike(collection)) { + return isString(collection) ? stringSize(collection) : collection.length; + } + var tag = getTag(collection); + if (tag == mapTag || tag == setTag) { + return collection.size; + } + return baseKeys(collection).length; + } + + /** + * Checks if `predicate` returns truthy for **any** element of `collection`. + * Iteration is stopped once `predicate` returns truthy. The predicate is + * invoked with three arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + * @example + * + * _.some([null, 0, 'yes', false], Boolean); + * // => true + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false } + * ]; + * + * // The `_.matches` iteratee shorthand. + * _.some(users, { 'user': 'barney', 'active': false }); + * // => false + * + * // The `_.matchesProperty` iteratee shorthand. + * _.some(users, ['active', false]); + * // => true + * + * // The `_.property` iteratee shorthand. + * _.some(users, 'active'); + * // => true + */ + function some(collection, predicate, guard) { + var func = isArray(collection) ? arraySome : baseSome; + if (guard && isIterateeCall(collection, predicate, guard)) { + predicate = undefined; + } + return func(collection, getIteratee(predicate, 3)); + } + + /** + * Creates an array of elements, sorted in ascending order by the results of + * running each element in a collection thru each iteratee. This method + * performs a stable sort, that is, it preserves the original sort order of + * equal elements. The iteratees are invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {...(Function|Function[])} [iteratees=[_.identity]] + * The iteratees to sort by. + * @returns {Array} Returns the new sorted array. + * @example + * + * var users = [ + * { 'user': 'fred', 'age': 48 }, + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 }, + * { 'user': 'barney', 'age': 34 } + * ]; + * + * _.sortBy(users, [function(o) { return o.user; }]); + * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]] + * + * _.sortBy(users, ['user', 'age']); + * // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]] + */ + var sortBy = baseRest(function (collection, iteratees) { + if (collection == null) { + return []; + } + var length = iteratees.length; + if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) { + iteratees = []; + } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) { + iteratees = [iteratees[0]]; + } + return baseOrderBy(collection, baseFlatten(iteratees, 1), []); + }); + + /*------------------------------------------------------------------------*/ + + /** + * Gets the timestamp of the number of milliseconds that have elapsed since + * the Unix epoch (1 January 1970 00:00:00 UTC). + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Date + * @returns {number} Returns the timestamp. + * @example + * + * _.defer(function(stamp) { + * console.log(_.now() - stamp); + * }, _.now()); + * // => Logs the number of milliseconds it took for the deferred invocation. + */ + var now = + ctxNow || + function () { + return root.Date.now(); + }; + + /*------------------------------------------------------------------------*/ + + /** + * The opposite of `_.before`; this method creates a function that invokes + * `func` once it's called `n` or more times. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {number} n The number of calls before `func` is invoked. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * var saves = ['profile', 'settings']; + * + * var done = _.after(saves.length, function() { + * console.log('done saving!'); + * }); + * + * _.forEach(saves, function(type) { + * asyncSave({ 'type': type, 'complete': done }); + * }); + * // => Logs 'done saving!' after the two async saves have completed. + */ + function after(n, func) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + n = toInteger(n); + return function () { + if (--n < 1) { + return func.apply(this, arguments); + } + }; + } + + /** + * Creates a function that invokes `func`, with up to `n` arguments, + * ignoring any additional arguments. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} func The function to cap arguments for. + * @param {number} [n=func.length] The arity cap. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the new capped function. + * @example + * + * _.map(['6', '8', '10'], _.ary(parseInt, 1)); + * // => [6, 8, 10] + */ + function ary(func, n, guard) { + n = guard ? undefined : n; + n = func && n == null ? func.length : n; + return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n); + } + + /** + * Creates a function that invokes `func`, with the `this` binding and arguments + * of the created function, while it's called less than `n` times. Subsequent + * calls to the created function return the result of the last `func` invocation. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {number} n The number of calls at which `func` is no longer invoked. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * jQuery(element).on('click', _.before(5, addContactToList)); + * // => Allows adding up to 4 contacts to the list. + */ + function before(n, func) { + var result; + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + n = toInteger(n); + return function () { + if (--n > 0) { + result = func.apply(this, arguments); + } + if (n <= 1) { + func = undefined; + } + return result; + }; + } + + /** + * Creates a function that invokes `func` with the `this` binding of `thisArg` + * and `partials` prepended to the arguments it receives. + * + * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds, + * may be used as a placeholder for partially applied arguments. + * + * **Note:** Unlike native `Function#bind`, this method doesn't set the "length" + * property of bound functions. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to bind. + * @param {*} thisArg The `this` binding of `func`. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new bound function. + * @example + * + * function greet(greeting, punctuation) { + * return greeting + ' ' + this.user + punctuation; + * } + * + * var object = { 'user': 'fred' }; + * + * var bound = _.bind(greet, object, 'hi'); + * bound('!'); + * // => 'hi fred!' + * + * // Bound with placeholders. + * var bound = _.bind(greet, object, _, '!'); + * bound('hi'); + * // => 'hi fred!' + */ + var bind = baseRest(function (func, thisArg, partials) { + var bitmask = WRAP_BIND_FLAG; + if (partials.length) { + var holders = replaceHolders(partials, getHolder(bind)); + bitmask |= WRAP_PARTIAL_FLAG; + } + return createWrap(func, bitmask, thisArg, partials, holders); + }); + + /** + * Creates a function that invokes the method at `object[key]` with `partials` + * prepended to the arguments it receives. + * + * This method differs from `_.bind` by allowing bound functions to reference + * methods that may be redefined or don't yet exist. See + * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern) + * for more details. + * + * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for partially applied arguments. + * + * @static + * @memberOf _ + * @since 0.10.0 + * @category Function + * @param {Object} object The object to invoke the method on. + * @param {string} key The key of the method. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new bound function. + * @example + * + * var object = { + * 'user': 'fred', + * 'greet': function(greeting, punctuation) { + * return greeting + ' ' + this.user + punctuation; + * } + * }; + * + * var bound = _.bindKey(object, 'greet', 'hi'); + * bound('!'); + * // => 'hi fred!' + * + * object.greet = function(greeting, punctuation) { + * return greeting + 'ya ' + this.user + punctuation; + * }; + * + * bound('!'); + * // => 'hiya fred!' + * + * // Bound with placeholders. + * var bound = _.bindKey(object, 'greet', _, '!'); + * bound('hi'); + * // => 'hiya fred!' + */ + var bindKey = baseRest(function (object, key, partials) { + var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG; + if (partials.length) { + var holders = replaceHolders(partials, getHolder(bindKey)); + bitmask |= WRAP_PARTIAL_FLAG; + } + return createWrap(key, bitmask, object, partials, holders); + }); + + /** + * Creates a function that accepts arguments of `func` and either invokes + * `func` returning its result, if at least `arity` number of arguments have + * been provided, or returns a function that accepts the remaining `func` + * arguments, and so on. The arity of `func` may be specified if `func.length` + * is not sufficient. + * + * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds, + * may be used as a placeholder for provided arguments. + * + * **Note:** This method doesn't set the "length" property of curried functions. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Function + * @param {Function} func The function to curry. + * @param {number} [arity=func.length] The arity of `func`. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the new curried function. + * @example + * + * var abc = function(a, b, c) { + * return [a, b, c]; + * }; + * + * var curried = _.curry(abc); + * + * curried(1)(2)(3); + * // => [1, 2, 3] + * + * curried(1, 2)(3); + * // => [1, 2, 3] + * + * curried(1, 2, 3); + * // => [1, 2, 3] + * + * // Curried with placeholders. + * curried(1)(_, 3)(2); + * // => [1, 2, 3] + */ + function curry(func, arity, guard) { + arity = guard ? undefined : arity; + var result = createWrap( + func, + WRAP_CURRY_FLAG, + undefined, + undefined, + undefined, + undefined, + undefined, + arity, + ); + result.placeholder = curry.placeholder; + return result; + } + + /** + * This method is like `_.curry` except that arguments are applied to `func` + * in the manner of `_.partialRight` instead of `_.partial`. + * + * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for provided arguments. + * + * **Note:** This method doesn't set the "length" property of curried functions. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} func The function to curry. + * @param {number} [arity=func.length] The arity of `func`. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the new curried function. + * @example + * + * var abc = function(a, b, c) { + * return [a, b, c]; + * }; + * + * var curried = _.curryRight(abc); + * + * curried(3)(2)(1); + * // => [1, 2, 3] + * + * curried(2, 3)(1); + * // => [1, 2, 3] + * + * curried(1, 2, 3); + * // => [1, 2, 3] + * + * // Curried with placeholders. + * curried(3)(1, _)(2); + * // => [1, 2, 3] + */ + function curryRight(func, arity, guard) { + arity = guard ? undefined : arity; + var result = createWrap( + func, + WRAP_CURRY_RIGHT_FLAG, + undefined, + undefined, + undefined, + undefined, + undefined, + arity, + ); + result.placeholder = curryRight.placeholder; + return result; + } + + /** + * Creates a debounced function that delays invoking `func` until after `wait` + * milliseconds have elapsed since the last time the debounced function was + * invoked. The debounced function comes with a `cancel` method to cancel + * delayed `func` invocations and a `flush` method to immediately invoke them. + * Provide `options` to indicate whether `func` should be invoked on the + * leading and/or trailing edge of the `wait` timeout. The `func` is invoked + * with the last arguments provided to the debounced function. Subsequent + * calls to the debounced function return the result of the last `func` + * invocation. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is + * invoked on the trailing edge of the timeout only if the debounced function + * is invoked more than once during the `wait` timeout. + * + * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred + * until to the next tick, similar to `setTimeout` with a timeout of `0`. + * + * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) + * for details over the differences between `_.debounce` and `_.throttle`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to debounce. + * @param {number} [wait=0] The number of milliseconds to delay. + * @param {Object} [options={}] The options object. + * @param {boolean} [options.leading=false] + * Specify invoking on the leading edge of the timeout. + * @param {number} [options.maxWait] + * The maximum time `func` is allowed to be delayed before it's invoked. + * @param {boolean} [options.trailing=true] + * Specify invoking on the trailing edge of the timeout. + * @returns {Function} Returns the new debounced function. + * @example + * + * // Avoid costly calculations while the window size is in flux. + * jQuery(window).on('resize', _.debounce(calculateLayout, 150)); + * + * // Invoke `sendMail` when clicked, debouncing subsequent calls. + * jQuery(element).on('click', _.debounce(sendMail, 300, { + * 'leading': true, + * 'trailing': false + * })); + * + * // Ensure `batchLog` is invoked once after 1 second of debounced calls. + * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 }); + * var source = new EventSource('/stream'); + * jQuery(source).on('message', debounced); + * + * // Cancel the trailing debounced invocation. + * jQuery(window).on('popstate', debounced.cancel); + */ + function debounce(func, wait, options) { + var lastArgs, + lastThis, + maxWait, + result, + timerId, + lastCallTime, + lastInvokeTime = 0, + leading = false, + maxing = false, + trailing = true; + + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + wait = toNumber(wait) || 0; + if (isObject(options)) { + leading = !!options.leading; + maxing = 'maxWait' in options; + maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait; + trailing = 'trailing' in options ? !!options.trailing : trailing; + } + + function invokeFunc(time) { + var args = lastArgs, + thisArg = lastThis; + + lastArgs = lastThis = undefined; + lastInvokeTime = time; + result = func.apply(thisArg, args); + return result; + } + + function leadingEdge(time) { + // Reset any `maxWait` timer. + lastInvokeTime = time; + // Start the timer for the trailing edge. + timerId = setTimeout(timerExpired, wait); + // Invoke the leading edge. + return leading ? invokeFunc(time) : result; + } + + function remainingWait(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime, + timeWaiting = wait - timeSinceLastCall; + + return maxing ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) : timeWaiting; + } + + function shouldInvoke(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime; + + // Either this is the first call, activity has stopped and we're at the + // trailing edge, the system time has gone backwards and we're treating + // it as the trailing edge, or we've hit the `maxWait` limit. + return ( + lastCallTime === undefined || + timeSinceLastCall >= wait || + timeSinceLastCall < 0 || + (maxing && timeSinceLastInvoke >= maxWait) + ); + } + + function timerExpired() { + var time = now(); + if (shouldInvoke(time)) { + return trailingEdge(time); + } + // Restart the timer. + timerId = setTimeout(timerExpired, remainingWait(time)); + } + + function trailingEdge(time) { + timerId = undefined; + + // Only invoke if we have `lastArgs` which means `func` has been + // debounced at least once. + if (trailing && lastArgs) { + return invokeFunc(time); + } + lastArgs = lastThis = undefined; + return result; + } + + function cancel() { + if (timerId !== undefined) { + clearTimeout(timerId); + } + lastInvokeTime = 0; + lastArgs = lastCallTime = lastThis = timerId = undefined; + } + + function flush() { + return timerId === undefined ? result : trailingEdge(now()); + } + + function debounced() { + var time = now(), + isInvoking = shouldInvoke(time); + + lastArgs = arguments; + lastThis = this; + lastCallTime = time; + + if (isInvoking) { + if (timerId === undefined) { + return leadingEdge(lastCallTime); + } + if (maxing) { + // Handle invocations in a tight loop. + clearTimeout(timerId); + timerId = setTimeout(timerExpired, wait); + return invokeFunc(lastCallTime); + } + } + if (timerId === undefined) { + timerId = setTimeout(timerExpired, wait); + } + return result; + } + debounced.cancel = cancel; + debounced.flush = flush; + return debounced; + } + + /** + * Defers invoking the `func` until the current call stack has cleared. Any + * additional arguments are provided to `func` when it's invoked. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to defer. + * @param {...*} [args] The arguments to invoke `func` with. + * @returns {number} Returns the timer id. + * @example + * + * _.defer(function(text) { + * console.log(text); + * }, 'deferred'); + * // => Logs 'deferred' after one millisecond. + */ + var defer = baseRest(function (func, args) { + return baseDelay(func, 1, args); + }); + + /** + * Invokes `func` after `wait` milliseconds. Any additional arguments are + * provided to `func` when it's invoked. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @param {...*} [args] The arguments to invoke `func` with. + * @returns {number} Returns the timer id. + * @example + * + * _.delay(function(text) { + * console.log(text); + * }, 1000, 'later'); + * // => Logs 'later' after one second. + */ + var delay = baseRest(function (func, wait, args) { + return baseDelay(func, toNumber(wait) || 0, args); + }); + + /** + * Creates a function that invokes `func` with arguments reversed. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Function + * @param {Function} func The function to flip arguments for. + * @returns {Function} Returns the new flipped function. + * @example + * + * var flipped = _.flip(function() { + * return _.toArray(arguments); + * }); + * + * flipped('a', 'b', 'c', 'd'); + * // => ['d', 'c', 'b', 'a'] + */ + function flip(func) { + return createWrap(func, WRAP_FLIP_FLAG); + } + + /** + * Creates a function that memoizes the result of `func`. If `resolver` is + * provided, it determines the cache key for storing the result based on the + * arguments provided to the memoized function. By default, the first argument + * provided to the memoized function is used as the map cache key. The `func` + * is invoked with the `this` binding of the memoized function. + * + * **Note:** The cache is exposed as the `cache` property on the memoized + * function. Its creation may be customized by replacing the `_.memoize.Cache` + * constructor with one whose instances implement the + * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object) + * method interface of `clear`, `delete`, `get`, `has`, and `set`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to have its output memoized. + * @param {Function} [resolver] The function to resolve the cache key. + * @returns {Function} Returns the new memoized function. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * var other = { 'c': 3, 'd': 4 }; + * + * var values = _.memoize(_.values); + * values(object); + * // => [1, 2] + * + * values(other); + * // => [3, 4] + * + * object.a = 2; + * values(object); + * // => [1, 2] + * + * // Modify the result cache. + * values.cache.set(object, ['a', 'b']); + * values(object); + * // => ['a', 'b'] + * + * // Replace `_.memoize.Cache`. + * _.memoize.Cache = WeakMap; + */ + function memoize(func, resolver) { + if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) { + throw new TypeError(FUNC_ERROR_TEXT); + } + var memoized = function () { + var args = arguments, + key = resolver ? resolver.apply(this, args) : args[0], + cache = memoized.cache; + + if (cache.has(key)) { + return cache.get(key); + } + var result = func.apply(this, args); + memoized.cache = cache.set(key, result) || cache; + return result; + }; + memoized.cache = new (memoize.Cache || MapCache)(); + return memoized; + } + + // Expose `MapCache`. + memoize.Cache = MapCache; + + /** + * Creates a function that negates the result of the predicate `func`. The + * `func` predicate is invoked with the `this` binding and arguments of the + * created function. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} predicate The predicate to negate. + * @returns {Function} Returns the new negated function. + * @example + * + * function isEven(n) { + * return n % 2 == 0; + * } + * + * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven)); + * // => [1, 3, 5] + */ + function negate(predicate) { + if (typeof predicate != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + return function () { + var args = arguments; + switch (args.length) { + case 0: + return !predicate.call(this); + case 1: + return !predicate.call(this, args[0]); + case 2: + return !predicate.call(this, args[0], args[1]); + case 3: + return !predicate.call(this, args[0], args[1], args[2]); + } + return !predicate.apply(this, args); + }; + } + + /** + * Creates a function that is restricted to invoking `func` once. Repeat calls + * to the function return the value of the first invocation. The `func` is + * invoked with the `this` binding and arguments of the created function. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * var initialize = _.once(createApplication); + * initialize(); + * initialize(); + * // => `createApplication` is invoked once + */ + function once(func) { + return before(2, func); + } + + /** + * Creates a function that invokes `func` with its arguments transformed. + * + * @static + * @since 4.0.0 + * @memberOf _ + * @category Function + * @param {Function} func The function to wrap. + * @param {...(Function|Function[])} [transforms=[_.identity]] + * The argument transforms. + * @returns {Function} Returns the new function. + * @example + * + * function doubled(n) { + * return n * 2; + * } + * + * function square(n) { + * return n * n; + * } + * + * var func = _.overArgs(function(x, y) { + * return [x, y]; + * }, [square, doubled]); + * + * func(9, 3); + * // => [81, 6] + * + * func(10, 5); + * // => [100, 10] + */ + var overArgs = castRest(function (func, transforms) { + transforms = + transforms.length == 1 && isArray(transforms[0]) + ? arrayMap(transforms[0], baseUnary(getIteratee())) + : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee())); + + var funcsLength = transforms.length; + return baseRest(function (args) { + var index = -1, + length = nativeMin(args.length, funcsLength); + + while (++index < length) { + args[index] = transforms[index].call(this, args[index]); + } + return apply(func, this, args); + }); + }); + + /** + * Creates a function that invokes `func` with `partials` prepended to the + * arguments it receives. This method is like `_.bind` except it does **not** + * alter the `this` binding. + * + * The `_.partial.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for partially applied arguments. + * + * **Note:** This method doesn't set the "length" property of partially + * applied functions. + * + * @static + * @memberOf _ + * @since 0.2.0 + * @category Function + * @param {Function} func The function to partially apply arguments to. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new partially applied function. + * @example + * + * function greet(greeting, name) { + * return greeting + ' ' + name; + * } + * + * var sayHelloTo = _.partial(greet, 'hello'); + * sayHelloTo('fred'); + * // => 'hello fred' + * + * // Partially applied with placeholders. + * var greetFred = _.partial(greet, _, 'fred'); + * greetFred('hi'); + * // => 'hi fred' + */ + var partial = baseRest(function (func, partials) { + var holders = replaceHolders(partials, getHolder(partial)); + return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders); + }); + + /** + * This method is like `_.partial` except that partially applied arguments + * are appended to the arguments it receives. + * + * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for partially applied arguments. + * + * **Note:** This method doesn't set the "length" property of partially + * applied functions. + * + * @static + * @memberOf _ + * @since 1.0.0 + * @category Function + * @param {Function} func The function to partially apply arguments to. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new partially applied function. + * @example + * + * function greet(greeting, name) { + * return greeting + ' ' + name; + * } + * + * var greetFred = _.partialRight(greet, 'fred'); + * greetFred('hi'); + * // => 'hi fred' + * + * // Partially applied with placeholders. + * var sayHelloTo = _.partialRight(greet, 'hello', _); + * sayHelloTo('fred'); + * // => 'hello fred' + */ + var partialRight = baseRest(function (func, partials) { + var holders = replaceHolders(partials, getHolder(partialRight)); + return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders); + }); + + /** + * Creates a function that invokes `func` with arguments arranged according + * to the specified `indexes` where the argument value at the first index is + * provided as the first argument, the argument value at the second index is + * provided as the second argument, and so on. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} func The function to rearrange arguments for. + * @param {...(number|number[])} indexes The arranged argument indexes. + * @returns {Function} Returns the new function. + * @example + * + * var rearged = _.rearg(function(a, b, c) { + * return [a, b, c]; + * }, [2, 0, 1]); + * + * rearged('b', 'c', 'a') + * // => ['a', 'b', 'c'] + */ + var rearg = flatRest(function (func, indexes) { + return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes); + }); + + /** + * Creates a function that invokes `func` with the `this` binding of the + * created function and arguments from `start` and beyond provided as + * an array. + * + * **Note:** This method is based on the + * [rest parameter](https://mdn.io/rest_parameters). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Function + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + * @example + * + * var say = _.rest(function(what, names) { + * return what + ' ' + _.initial(names).join(', ') + + * (_.size(names) > 1 ? ', & ' : '') + _.last(names); + * }); + * + * say('hello', 'fred', 'barney', 'pebbles'); + * // => 'hello fred, barney, & pebbles' + */ + function rest(func, start) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + start = start === undefined ? start : toInteger(start); + return baseRest(func, start); + } + + /** + * Creates a function that invokes `func` with the `this` binding of the + * create function and an array of arguments much like + * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply). + * + * **Note:** This method is based on the + * [spread operator](https://mdn.io/spread_operator). + * + * @static + * @memberOf _ + * @since 3.2.0 + * @category Function + * @param {Function} func The function to spread arguments over. + * @param {number} [start=0] The start position of the spread. + * @returns {Function} Returns the new function. + * @example + * + * var say = _.spread(function(who, what) { + * return who + ' says ' + what; + * }); + * + * say(['fred', 'hello']); + * // => 'fred says hello' + * + * var numbers = Promise.all([ + * Promise.resolve(40), + * Promise.resolve(36) + * ]); + * + * numbers.then(_.spread(function(x, y) { + * return x + y; + * })); + * // => a Promise of 76 + */ + function spread(func, start) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + start = start == null ? 0 : nativeMax(toInteger(start), 0); + return baseRest(function (args) { + var array = args[start], + otherArgs = castSlice(args, 0, start); + + if (array) { + arrayPush(otherArgs, array); + } + return apply(func, this, otherArgs); + }); + } + + /** + * Creates a throttled function that only invokes `func` at most once per + * every `wait` milliseconds. The throttled function comes with a `cancel` + * method to cancel delayed `func` invocations and a `flush` method to + * immediately invoke them. Provide `options` to indicate whether `func` + * should be invoked on the leading and/or trailing edge of the `wait` + * timeout. The `func` is invoked with the last arguments provided to the + * throttled function. Subsequent calls to the throttled function return the + * result of the last `func` invocation. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is + * invoked on the trailing edge of the timeout only if the throttled function + * is invoked more than once during the `wait` timeout. + * + * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred + * until to the next tick, similar to `setTimeout` with a timeout of `0`. + * + * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) + * for details over the differences between `_.throttle` and `_.debounce`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to throttle. + * @param {number} [wait=0] The number of milliseconds to throttle invocations to. + * @param {Object} [options={}] The options object. + * @param {boolean} [options.leading=true] + * Specify invoking on the leading edge of the timeout. + * @param {boolean} [options.trailing=true] + * Specify invoking on the trailing edge of the timeout. + * @returns {Function} Returns the new throttled function. + * @example + * + * // Avoid excessively updating the position while scrolling. + * jQuery(window).on('scroll', _.throttle(updatePosition, 100)); + * + * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes. + * var throttled = _.throttle(renewToken, 300000, { 'trailing': false }); + * jQuery(element).on('click', throttled); + * + * // Cancel the trailing throttled invocation. + * jQuery(window).on('popstate', throttled.cancel); + */ + function throttle(func, wait, options) { + var leading = true, + trailing = true; + + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + if (isObject(options)) { + leading = 'leading' in options ? !!options.leading : leading; + trailing = 'trailing' in options ? !!options.trailing : trailing; + } + return debounce(func, wait, { + leading: leading, + maxWait: wait, + trailing: trailing, + }); + } + + /** + * Creates a function that accepts up to one argument, ignoring any + * additional arguments. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Function + * @param {Function} func The function to cap arguments for. + * @returns {Function} Returns the new capped function. + * @example + * + * _.map(['6', '8', '10'], _.unary(parseInt)); + * // => [6, 8, 10] + */ + function unary(func) { + return ary(func, 1); + } + + /** + * Creates a function that provides `value` to `wrapper` as its first + * argument. Any additional arguments provided to the function are appended + * to those provided to the `wrapper`. The wrapper is invoked with the `this` + * binding of the created function. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {*} value The value to wrap. + * @param {Function} [wrapper=identity] The wrapper function. + * @returns {Function} Returns the new function. + * @example + * + * var p = _.wrap(_.escape, function(func, text) { + * return '<p>' + func(text) + '</p>'; + * }); + * + * p('fred, barney, & pebbles'); + * // => '<p>fred, barney, & pebbles</p>' + */ + function wrap(value, wrapper) { + return partial(castFunction(wrapper), value); + } + + /*------------------------------------------------------------------------*/ + + /** + * Casts `value` as an array if it's not one. + * + * @static + * @memberOf _ + * @since 4.4.0 + * @category Lang + * @param {*} value The value to inspect. + * @returns {Array} Returns the cast array. + * @example + * + * _.castArray(1); + * // => [1] + * + * _.castArray({ 'a': 1 }); + * // => [{ 'a': 1 }] + * + * _.castArray('abc'); + * // => ['abc'] + * + * _.castArray(null); + * // => [null] + * + * _.castArray(undefined); + * // => [undefined] + * + * _.castArray(); + * // => [] + * + * var array = [1, 2, 3]; + * console.log(_.castArray(array) === array); + * // => true + */ + function castArray() { + if (!arguments.length) { + return []; + } + var value = arguments[0]; + return isArray(value) ? value : [value]; + } + + /** + * Creates a shallow clone of `value`. + * + * **Note:** This method is loosely based on the + * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm) + * and supports cloning arrays, array buffers, booleans, date objects, maps, + * numbers, `Object` objects, regexes, sets, strings, symbols, and typed + * arrays. The own enumerable properties of `arguments` objects are cloned + * as plain objects. An empty object is returned for uncloneable values such + * as error objects, functions, DOM nodes, and WeakMaps. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to clone. + * @returns {*} Returns the cloned value. + * @see _.cloneDeep + * @example + * + * var objects = [{ 'a': 1 }, { 'b': 2 }]; + * + * var shallow = _.clone(objects); + * console.log(shallow[0] === objects[0]); + * // => true + */ + function clone(value) { + return baseClone(value, CLONE_SYMBOLS_FLAG); + } + + /** + * This method is like `_.clone` except that it accepts `customizer` which + * is invoked to produce the cloned value. If `customizer` returns `undefined`, + * cloning is handled by the method instead. The `customizer` is invoked with + * up to four arguments; (value [, index|key, object, stack]). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to clone. + * @param {Function} [customizer] The function to customize cloning. + * @returns {*} Returns the cloned value. + * @see _.cloneDeepWith + * @example + * + * function customizer(value) { + * if (_.isElement(value)) { + * return value.cloneNode(false); + * } + * } + * + * var el = _.cloneWith(document.body, customizer); + * + * console.log(el === document.body); + * // => false + * console.log(el.nodeName); + * // => 'BODY' + * console.log(el.childNodes.length); + * // => 0 + */ + function cloneWith(value, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return baseClone(value, CLONE_SYMBOLS_FLAG, customizer); + } + + /** + * This method is like `_.clone` except that it recursively clones `value`. + * + * @static + * @memberOf _ + * @since 1.0.0 + * @category Lang + * @param {*} value The value to recursively clone. + * @returns {*} Returns the deep cloned value. + * @see _.clone + * @example + * + * var objects = [{ 'a': 1 }, { 'b': 2 }]; + * + * var deep = _.cloneDeep(objects); + * console.log(deep[0] === objects[0]); + * // => false + */ + function cloneDeep(value) { + return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG); + } + + /** + * This method is like `_.cloneWith` except that it recursively clones `value`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to recursively clone. + * @param {Function} [customizer] The function to customize cloning. + * @returns {*} Returns the deep cloned value. + * @see _.cloneWith + * @example + * + * function customizer(value) { + * if (_.isElement(value)) { + * return value.cloneNode(true); + * } + * } + * + * var el = _.cloneDeepWith(document.body, customizer); + * + * console.log(el === document.body); + * // => false + * console.log(el.nodeName); + * // => 'BODY' + * console.log(el.childNodes.length); + * // => 20 + */ + function cloneDeepWith(value, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer); + } + + /** + * Checks if `object` conforms to `source` by invoking the predicate + * properties of `source` with the corresponding property values of `object`. + * + * **Note:** This method is equivalent to `_.conforms` when `source` is + * partially applied. + * + * @static + * @memberOf _ + * @since 4.14.0 + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property predicates to conform to. + * @returns {boolean} Returns `true` if `object` conforms, else `false`. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * + * _.conformsTo(object, { 'b': function(n) { return n > 1; } }); + * // => true + * + * _.conformsTo(object, { 'b': function(n) { return n > 2; } }); + * // => false + */ + function conformsTo(object, source) { + return source == null || baseConformsTo(object, source, keys(source)); + } + + /** + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ + function eq(value, other) { + return value === other || (value !== value && other !== other); + } + + /** + * Checks if `value` is greater than `other`. + * + * @static + * @memberOf _ + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than `other`, + * else `false`. + * @see _.lt + * @example + * + * _.gt(3, 1); + * // => true + * + * _.gt(3, 3); + * // => false + * + * _.gt(1, 3); + * // => false + */ + var gt = createRelationalOperation(baseGt); + + /** + * Checks if `value` is greater than or equal to `other`. + * + * @static + * @memberOf _ + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than or equal to + * `other`, else `false`. + * @see _.lte + * @example + * + * _.gte(3, 1); + * // => true + * + * _.gte(3, 3); + * // => true + * + * _.gte(1, 3); + * // => false + */ + var gte = createRelationalOperation(function (value, other) { + return value >= other; + }); + + /** + * Checks if `value` is likely an `arguments` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + * else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ + var isArguments = baseIsArguments( + (function () { + return arguments; + })(), + ) + ? baseIsArguments + : function (value) { + return ( + isObjectLike(value) && + hasOwnProperty.call(value, 'callee') && + !propertyIsEnumerable.call(value, 'callee') + ); + }; + + /** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ + var isArray = Array.isArray; + + /** + * Checks if `value` is classified as an `ArrayBuffer` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`. + * @example + * + * _.isArrayBuffer(new ArrayBuffer(2)); + * // => true + * + * _.isArrayBuffer(new Array(2)); + * // => false + */ + var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer; + + /** + * Checks if `value` is array-like. A value is considered array-like if it's + * not a function and has a `value.length` that's an integer greater than or + * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + * @example + * + * _.isArrayLike([1, 2, 3]); + * // => true + * + * _.isArrayLike(document.body.children); + * // => true + * + * _.isArrayLike('abc'); + * // => true + * + * _.isArrayLike(_.noop); + * // => false + */ + function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); + } + + /** + * This method is like `_.isArrayLike` except that it also checks if `value` + * is an object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array-like object, + * else `false`. + * @example + * + * _.isArrayLikeObject([1, 2, 3]); + * // => true + * + * _.isArrayLikeObject(document.body.children); + * // => true + * + * _.isArrayLikeObject('abc'); + * // => false + * + * _.isArrayLikeObject(_.noop); + * // => false + */ + function isArrayLikeObject(value) { + return isObjectLike(value) && isArrayLike(value); + } + + /** + * Checks if `value` is classified as a boolean primitive or object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a boolean, else `false`. + * @example + * + * _.isBoolean(false); + * // => true + * + * _.isBoolean(null); + * // => false + */ + function isBoolean(value) { + return ( + value === true || value === false || (isObjectLike(value) && baseGetTag(value) == boolTag) + ); + } + + /** + * Checks if `value` is a buffer. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. + * @example + * + * _.isBuffer(new Buffer(2)); + * // => true + * + * _.isBuffer(new Uint8Array(2)); + * // => false + */ + var isBuffer = nativeIsBuffer || stubFalse; + + /** + * Checks if `value` is classified as a `Date` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a date object, else `false`. + * @example + * + * _.isDate(new Date); + * // => true + * + * _.isDate('Mon April 23 2012'); + * // => false + */ + var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate; + + /** + * Checks if `value` is likely a DOM element. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`. + * @example + * + * _.isElement(document.body); + * // => true + * + * _.isElement('<body>'); + * // => false + */ + function isElement(value) { + return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value); + } + + /** + * Checks if `value` is an empty object, collection, map, or set. + * + * Objects are considered empty if they have no own enumerable string keyed + * properties. + * + * Array-like values such as `arguments` objects, arrays, buffers, strings, or + * jQuery-like collections are considered empty if they have a `length` of `0`. + * Similarly, maps and sets are considered empty if they have a `size` of `0`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is empty, else `false`. + * @example + * + * _.isEmpty(null); + * // => true + * + * _.isEmpty(true); + * // => true + * + * _.isEmpty(1); + * // => true + * + * _.isEmpty([1, 2, 3]); + * // => false + * + * _.isEmpty({ 'a': 1 }); + * // => false + */ + function isEmpty(value) { + if (value == null) { + return true; + } + if ( + isArrayLike(value) && + (isArray(value) || + typeof value == 'string' || + typeof value.splice == 'function' || + isBuffer(value) || + isTypedArray(value) || + isArguments(value)) + ) { + return !value.length; + } + var tag = getTag(value); + if (tag == mapTag || tag == setTag) { + return !value.size; + } + if (isPrototype(value)) { + return !baseKeys(value).length; + } + for (var key in value) { + if (hasOwnProperty.call(value, key)) { + return false; + } + } + return true; + } + + /** + * Performs a deep comparison between two values to determine if they are + * equivalent. + * + * **Note:** This method supports comparing arrays, array buffers, booleans, + * date objects, error objects, maps, numbers, `Object` objects, regexes, + * sets, strings, symbols, and typed arrays. `Object` objects are compared + * by their own, not inherited, enumerable properties. Functions and DOM + * nodes are compared by strict equality, i.e. `===`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.isEqual(object, other); + * // => true + * + * object === other; + * // => false + */ + function isEqual(value, other) { + return baseIsEqual(value, other); + } + + /** + * This method is like `_.isEqual` except that it accepts `customizer` which + * is invoked to compare values. If `customizer` returns `undefined`, comparisons + * are handled by the method instead. The `customizer` is invoked with up to + * six arguments: (objValue, othValue [, index|key, object, other, stack]). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * function isGreeting(value) { + * return /^h(?:i|ello)$/.test(value); + * } + * + * function customizer(objValue, othValue) { + * if (isGreeting(objValue) && isGreeting(othValue)) { + * return true; + * } + * } + * + * var array = ['hello', 'goodbye']; + * var other = ['hi', 'goodbye']; + * + * _.isEqualWith(array, other, customizer); + * // => true + */ + function isEqualWith(value, other, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + var result = customizer ? customizer(value, other) : undefined; + return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result; + } + + /** + * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`, + * `SyntaxError`, `TypeError`, or `URIError` object. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an error object, else `false`. + * @example + * + * _.isError(new Error); + * // => true + * + * _.isError(Error); + * // => false + */ + function isError(value) { + if (!isObjectLike(value)) { + return false; + } + var tag = baseGetTag(value); + return ( + tag == errorTag || + tag == domExcTag || + (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value)) + ); + } + + /** + * Checks if `value` is a finite primitive number. + * + * **Note:** This method is based on + * [`Number.isFinite`](https://mdn.io/Number/isFinite). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a finite number, else `false`. + * @example + * + * _.isFinite(3); + * // => true + * + * _.isFinite(Number.MIN_VALUE); + * // => true + * + * _.isFinite(Infinity); + * // => false + * + * _.isFinite('3'); + * // => false + */ + function isFinite(value) { + return typeof value == 'number' && nativeIsFinite(value); + } + + /** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ + function isFunction(value) { + if (!isObject(value)) { + return false; + } + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 9 which returns 'object' for typed arrays and other constructors. + var tag = baseGetTag(value); + return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; + } + + /** + * Checks if `value` is an integer. + * + * **Note:** This method is based on + * [`Number.isInteger`](https://mdn.io/Number/isInteger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an integer, else `false`. + * @example + * + * _.isInteger(3); + * // => true + * + * _.isInteger(Number.MIN_VALUE); + * // => false + * + * _.isInteger(Infinity); + * // => false + * + * _.isInteger('3'); + * // => false + */ + function isInteger(value) { + return typeof value == 'number' && value == toInteger(value); + } + + /** + * Checks if `value` is a valid array-like length. + * + * **Note:** This method is loosely based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @example + * + * _.isLength(3); + * // => true + * + * _.isLength(Number.MIN_VALUE); + * // => false + * + * _.isLength(Infinity); + * // => false + * + * _.isLength('3'); + * // => false + */ + function isLength(value) { + return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + + /** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ + function isObject(value) { + var type = typeof value; + return value != null && (type == 'object' || type == 'function'); + } + + /** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ + function isObjectLike(value) { + return value != null && typeof value == 'object'; + } + + /** + * Checks if `value` is classified as a `Map` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a map, else `false`. + * @example + * + * _.isMap(new Map); + * // => true + * + * _.isMap(new WeakMap); + * // => false + */ + var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap; + + /** + * Performs a partial deep comparison between `object` and `source` to + * determine if `object` contains equivalent property values. + * + * **Note:** This method is equivalent to `_.matches` when `source` is + * partially applied. + * + * Partial comparisons will match empty array and empty object `source` + * values against any array or object value, respectively. See `_.isEqual` + * for a list of supported value comparisons. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * + * _.isMatch(object, { 'b': 2 }); + * // => true + * + * _.isMatch(object, { 'b': 1 }); + * // => false + */ + function isMatch(object, source) { + return object === source || baseIsMatch(object, source, getMatchData(source)); + } + + /** + * This method is like `_.isMatch` except that it accepts `customizer` which + * is invoked to compare values. If `customizer` returns `undefined`, comparisons + * are handled by the method instead. The `customizer` is invoked with five + * arguments: (objValue, srcValue, index|key, object, source). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + * @example + * + * function isGreeting(value) { + * return /^h(?:i|ello)$/.test(value); + * } + * + * function customizer(objValue, srcValue) { + * if (isGreeting(objValue) && isGreeting(srcValue)) { + * return true; + * } + * } + * + * var object = { 'greeting': 'hello' }; + * var source = { 'greeting': 'hi' }; + * + * _.isMatchWith(object, source, customizer); + * // => true + */ + function isMatchWith(object, source, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return baseIsMatch(object, source, getMatchData(source), customizer); + } + + /** + * Checks if `value` is `NaN`. + * + * **Note:** This method is based on + * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as + * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for + * `undefined` and other non-number values. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + * @example + * + * _.isNaN(NaN); + * // => true + * + * _.isNaN(new Number(NaN)); + * // => true + * + * isNaN(undefined); + * // => true + * + * _.isNaN(undefined); + * // => false + */ + function isNaN(value) { + // An `NaN` primitive is the only value that is not equal to itself. + // Perform the `toStringTag` check first to avoid errors with some + // ActiveX objects in IE. + return isNumber(value) && value != +value; + } + + /** + * Checks if `value` is a pristine native function. + * + * **Note:** This method can't reliably detect native functions in the presence + * of the core-js package because core-js circumvents this kind of detection. + * Despite multiple requests, the core-js maintainer has made it clear: any + * attempt to fix the detection will be obstructed. As a result, we're left + * with little choice but to throw an error. Unfortunately, this also affects + * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill), + * which rely on core-js. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + * @example + * + * _.isNative(Array.prototype.push); + * // => true + * + * _.isNative(_); + * // => false + */ + function isNative(value) { + if (isMaskable(value)) { + throw new Error(CORE_ERROR_TEXT); + } + return baseIsNative(value); + } + + /** + * Checks if `value` is `null`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `null`, else `false`. + * @example + * + * _.isNull(null); + * // => true + * + * _.isNull(void 0); + * // => false + */ + function isNull(value) { + return value === null; + } + + /** + * Checks if `value` is `null` or `undefined`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is nullish, else `false`. + * @example + * + * _.isNil(null); + * // => true + * + * _.isNil(void 0); + * // => true + * + * _.isNil(NaN); + * // => false + */ + function isNil(value) { + return value == null; + } + + /** + * Checks if `value` is classified as a `Number` primitive or object. + * + * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are + * classified as numbers, use the `_.isFinite` method. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a number, else `false`. + * @example + * + * _.isNumber(3); + * // => true + * + * _.isNumber(Number.MIN_VALUE); + * // => true + * + * _.isNumber(Infinity); + * // => true + * + * _.isNumber('3'); + * // => false + */ + function isNumber(value) { + return typeof value == 'number' || (isObjectLike(value) && baseGetTag(value) == numberTag); + } + + /** + * Checks if `value` is a plain object, that is, an object created by the + * `Object` constructor or one with a `[[Prototype]]` of `null`. + * + * @static + * @memberOf _ + * @since 0.8.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * _.isPlainObject(new Foo); + * // => false + * + * _.isPlainObject([1, 2, 3]); + * // => false + * + * _.isPlainObject({ 'x': 0, 'y': 0 }); + * // => true + * + * _.isPlainObject(Object.create(null)); + * // => true + */ + function isPlainObject(value) { + if (!isObjectLike(value) || baseGetTag(value) != objectTag) { + return false; + } + var proto = getPrototype(value); + if (proto === null) { + return true; + } + var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; + return ( + typeof Ctor == 'function' && + Ctor instanceof Ctor && + funcToString.call(Ctor) == objectCtorString + ); + } + + /** + * Checks if `value` is classified as a `RegExp` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. + * @example + * + * _.isRegExp(/abc/); + * // => true + * + * _.isRegExp('/abc/'); + * // => false + */ + var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp; + + /** + * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754 + * double precision number which isn't the result of a rounded unsafe integer. + * + * **Note:** This method is based on + * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`. + * @example + * + * _.isSafeInteger(3); + * // => true + * + * _.isSafeInteger(Number.MIN_VALUE); + * // => false + * + * _.isSafeInteger(Infinity); + * // => false + * + * _.isSafeInteger('3'); + * // => false + */ + function isSafeInteger(value) { + return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER; + } + + /** + * Checks if `value` is classified as a `Set` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a set, else `false`. + * @example + * + * _.isSet(new Set); + * // => true + * + * _.isSet(new WeakSet); + * // => false + */ + var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet; + + /** + * Checks if `value` is classified as a `String` primitive or object. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a string, else `false`. + * @example + * + * _.isString('abc'); + * // => true + * + * _.isString(1); + * // => false + */ + function isString(value) { + return ( + typeof value == 'string' || + (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag) + ); + } + + /** + * Checks if `value` is classified as a `Symbol` primitive or object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ + function isSymbol(value) { + return typeof value == 'symbol' || (isObjectLike(value) && baseGetTag(value) == symbolTag); + } + + /** + * Checks if `value` is classified as a typed array. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + * @example + * + * _.isTypedArray(new Uint8Array); + * // => true + * + * _.isTypedArray([]); + * // => false + */ + var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; + + /** + * Checks if `value` is `undefined`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`. + * @example + * + * _.isUndefined(void 0); + * // => true + * + * _.isUndefined(null); + * // => false + */ + function isUndefined(value) { + return value === undefined; + } + + /** + * Checks if `value` is classified as a `WeakMap` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a weak map, else `false`. + * @example + * + * _.isWeakMap(new WeakMap); + * // => true + * + * _.isWeakMap(new Map); + * // => false + */ + function isWeakMap(value) { + return isObjectLike(value) && getTag(value) == weakMapTag; + } + + /** + * Checks if `value` is classified as a `WeakSet` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a weak set, else `false`. + * @example + * + * _.isWeakSet(new WeakSet); + * // => true + * + * _.isWeakSet(new Set); + * // => false + */ + function isWeakSet(value) { + return isObjectLike(value) && baseGetTag(value) == weakSetTag; + } + + /** + * Checks if `value` is less than `other`. + * + * @static + * @memberOf _ + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than `other`, + * else `false`. + * @see _.gt + * @example + * + * _.lt(1, 3); + * // => true + * + * _.lt(3, 3); + * // => false + * + * _.lt(3, 1); + * // => false + */ + var lt = createRelationalOperation(baseLt); + + /** + * Checks if `value` is less than or equal to `other`. + * + * @static + * @memberOf _ + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than or equal to + * `other`, else `false`. + * @see _.gte + * @example + * + * _.lte(1, 3); + * // => true + * + * _.lte(3, 3); + * // => true + * + * _.lte(3, 1); + * // => false + */ + var lte = createRelationalOperation(function (value, other) { + return value <= other; + }); + + /** + * Converts `value` to an array. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to convert. + * @returns {Array} Returns the converted array. + * @example + * + * _.toArray({ 'a': 1, 'b': 2 }); + * // => [1, 2] + * + * _.toArray('abc'); + * // => ['a', 'b', 'c'] + * + * _.toArray(1); + * // => [] + * + * _.toArray(null); + * // => [] + */ + function toArray(value) { + if (!value) { + return []; + } + if (isArrayLike(value)) { + return isString(value) ? stringToArray(value) : copyArray(value); + } + if (symIterator && value[symIterator]) { + return iteratorToArray(value[symIterator]()); + } + var tag = getTag(value), + func = tag == mapTag ? mapToArray : tag == setTag ? setToArray : values; + + return func(value); + } + + /** + * Converts `value` to a finite number. + * + * @static + * @memberOf _ + * @since 4.12.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted number. + * @example + * + * _.toFinite(3.2); + * // => 3.2 + * + * _.toFinite(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toFinite(Infinity); + * // => 1.7976931348623157e+308 + * + * _.toFinite('3.2'); + * // => 3.2 + */ + function toFinite(value) { + if (!value) { + return value === 0 ? value : 0; + } + value = toNumber(value); + if (value === INFINITY || value === -INFINITY) { + var sign = value < 0 ? -1 : 1; + return sign * MAX_INTEGER; + } + return value === value ? value : 0; + } + + /** + * Converts `value` to an integer. + * + * **Note:** This method is loosely based on + * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted integer. + * @example + * + * _.toInteger(3.2); + * // => 3 + * + * _.toInteger(Number.MIN_VALUE); + * // => 0 + * + * _.toInteger(Infinity); + * // => 1.7976931348623157e+308 + * + * _.toInteger('3.2'); + * // => 3 + */ + function toInteger(value) { + var result = toFinite(value), + remainder = result % 1; + + return result === result ? (remainder ? result - remainder : result) : 0; + } + + /** + * Converts `value` to an integer suitable for use as the length of an + * array-like object. + * + * **Note:** This method is based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted integer. + * @example + * + * _.toLength(3.2); + * // => 3 + * + * _.toLength(Number.MIN_VALUE); + * // => 0 + * + * _.toLength(Infinity); + * // => 4294967295 + * + * _.toLength('3.2'); + * // => 3 + */ + function toLength(value) { + return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0; + } + + /** + * Converts `value` to a number. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to process. + * @returns {number} Returns the number. + * @example + * + * _.toNumber(3.2); + * // => 3.2 + * + * _.toNumber(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toNumber(Infinity); + * // => Infinity + * + * _.toNumber('3.2'); + * // => 3.2 + */ + function toNumber(value) { + if (typeof value == 'number') { + return value; + } + if (isSymbol(value)) { + return NAN; + } + if (isObject(value)) { + var other = typeof value.valueOf == 'function' ? value.valueOf() : value; + value = isObject(other) ? other + '' : other; + } + if (typeof value != 'string') { + return value === 0 ? value : +value; + } + value = value.replace(reTrim, ''); + var isBinary = reIsBinary.test(value); + return isBinary || reIsOctal.test(value) + ? freeParseInt(value.slice(2), isBinary ? 2 : 8) + : reIsBadHex.test(value) + ? NAN + : +value; + } + + /** + * Converts `value` to a plain object flattening inherited enumerable string + * keyed properties of `value` to own properties of the plain object. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {Object} Returns the converted plain object. + * @example + * + * function Foo() { + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.assign({ 'a': 1 }, new Foo); + * // => { 'a': 1, 'b': 2 } + * + * _.assign({ 'a': 1 }, _.toPlainObject(new Foo)); + * // => { 'a': 1, 'b': 2, 'c': 3 } + */ + function toPlainObject(value) { + return copyObject(value, keysIn(value)); + } + + /** + * Converts `value` to a safe integer. A safe integer can be compared and + * represented correctly. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted integer. + * @example + * + * _.toSafeInteger(3.2); + * // => 3 + * + * _.toSafeInteger(Number.MIN_VALUE); + * // => 0 + * + * _.toSafeInteger(Infinity); + * // => 9007199254740991 + * + * _.toSafeInteger('3.2'); + * // => 3 + */ + function toSafeInteger(value) { + return value + ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER) + : value === 0 + ? value + : 0; + } + + /** + * Converts `value` to a string. An empty string is returned for `null` + * and `undefined` values. The sign of `-0` is preserved. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + * @example + * + * _.toString(null); + * // => '' + * + * _.toString(-0); + * // => '-0' + * + * _.toString([1, 2, 3]); + * // => '1,2,3' + */ + function toString(value) { + return value == null ? '' : baseToString(value); + } + + /*------------------------------------------------------------------------*/ + + /** + * Assigns own enumerable string keyed properties of source objects to the + * destination object. Source objects are applied from left to right. + * Subsequent sources overwrite property assignments of previous sources. + * + * **Note:** This method mutates `object` and is loosely based on + * [`Object.assign`](https://mdn.io/Object/assign). + * + * @static + * @memberOf _ + * @since 0.10.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.assignIn + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * function Bar() { + * this.c = 3; + * } + * + * Foo.prototype.b = 2; + * Bar.prototype.d = 4; + * + * _.assign({ 'a': 0 }, new Foo, new Bar); + * // => { 'a': 1, 'c': 3 } + */ + var assign = createAssigner(function (object, source) { + if (isPrototype(source) || isArrayLike(source)) { + copyObject(source, keys(source), object); + return; + } + for (var key in source) { + if (hasOwnProperty.call(source, key)) { + assignValue(object, key, source[key]); + } + } + }); + + /** + * This method is like `_.assign` except that it iterates over own and + * inherited source properties. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias extend + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.assign + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * function Bar() { + * this.c = 3; + * } + * + * Foo.prototype.b = 2; + * Bar.prototype.d = 4; + * + * _.assignIn({ 'a': 0 }, new Foo, new Bar); + * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 } + */ + var assignIn = createAssigner(function (object, source) { + copyObject(source, keysIn(source), object); + }); + + /** + * This method is like `_.assignIn` except that it accepts `customizer` + * which is invoked to produce the assigned values. If `customizer` returns + * `undefined`, assignment is handled by the method instead. The `customizer` + * is invoked with five arguments: (objValue, srcValue, key, object, source). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias extendWith + * @category Object + * @param {Object} object The destination object. + * @param {...Object} sources The source objects. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @see _.assignWith + * @example + * + * function customizer(objValue, srcValue) { + * return _.isUndefined(objValue) ? srcValue : objValue; + * } + * + * var defaults = _.partialRight(_.assignInWith, customizer); + * + * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ + var assignInWith = createAssigner(function (object, source, srcIndex, customizer) { + copyObject(source, keysIn(source), object, customizer); + }); + + /** + * This method is like `_.assign` except that it accepts `customizer` + * which is invoked to produce the assigned values. If `customizer` returns + * `undefined`, assignment is handled by the method instead. The `customizer` + * is invoked with five arguments: (objValue, srcValue, key, object, source). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} sources The source objects. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @see _.assignInWith + * @example + * + * function customizer(objValue, srcValue) { + * return _.isUndefined(objValue) ? srcValue : objValue; + * } + * + * var defaults = _.partialRight(_.assignWith, customizer); + * + * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ + var assignWith = createAssigner(function (object, source, srcIndex, customizer) { + copyObject(source, keys(source), object, customizer); + }); + + /** + * Creates an array of values corresponding to `paths` of `object`. + * + * @static + * @memberOf _ + * @since 1.0.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {...(string|string[])} [paths] The property paths to pick. + * @returns {Array} Returns the picked values. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] }; + * + * _.at(object, ['a[0].b.c', 'a[1]']); + * // => [3, 4] + */ + var at = flatRest(baseAt); + + /** + * Creates an object that inherits from the `prototype` object. If a + * `properties` object is given, its own enumerable string keyed properties + * are assigned to the created object. + * + * @static + * @memberOf _ + * @since 2.3.0 + * @category Object + * @param {Object} prototype The object to inherit from. + * @param {Object} [properties] The properties to assign to the object. + * @returns {Object} Returns the new object. + * @example + * + * function Shape() { + * this.x = 0; + * this.y = 0; + * } + * + * function Circle() { + * Shape.call(this); + * } + * + * Circle.prototype = _.create(Shape.prototype, { + * 'constructor': Circle + * }); + * + * var circle = new Circle; + * circle instanceof Circle; + * // => true + * + * circle instanceof Shape; + * // => true + */ + function create(prototype, properties) { + var result = baseCreate(prototype); + return properties == null ? result : baseAssign(result, properties); + } + + /** + * Assigns own and inherited enumerable string keyed properties of source + * objects to the destination object for all destination properties that + * resolve to `undefined`. Source objects are applied from left to right. + * Once a property is set, additional values of the same property are ignored. + * + * **Note:** This method mutates `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.defaultsDeep + * @example + * + * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ + var defaults = baseRest(function (object, sources) { + object = Object(object); + + var index = -1; + var length = sources.length; + var guard = length > 2 ? sources[2] : undefined; + + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + length = 1; + } + + while (++index < length) { + var source = sources[index]; + var props = keysIn(source); + var propsIndex = -1; + var propsLength = props.length; + + while (++propsIndex < propsLength) { + var key = props[propsIndex]; + var value = object[key]; + + if ( + value === undefined || + (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key)) + ) { + object[key] = source[key]; + } + } + } + + return object; + }); + + /** + * This method is like `_.defaults` except that it recursively assigns + * default properties. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 3.10.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.defaults + * @example + * + * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } }); + * // => { 'a': { 'b': 2, 'c': 3 } } + */ + var defaultsDeep = baseRest(function (args) { + args.push(undefined, customDefaultsMerge); + return apply(mergeWith, undefined, args); + }); + + /** + * This method is like `_.find` except that it returns the key of the first + * element `predicate` returns truthy for instead of the element itself. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category Object + * @param {Object} object The object to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {string|undefined} Returns the key of the matched element, + * else `undefined`. + * @example + * + * var users = { + * 'barney': { 'age': 36, 'active': true }, + * 'fred': { 'age': 40, 'active': false }, + * 'pebbles': { 'age': 1, 'active': true } + * }; + * + * _.findKey(users, function(o) { return o.age < 40; }); + * // => 'barney' (iteration order is not guaranteed) + * + * // The `_.matches` iteratee shorthand. + * _.findKey(users, { 'age': 1, 'active': true }); + * // => 'pebbles' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findKey(users, ['active', false]); + * // => 'fred' + * + * // The `_.property` iteratee shorthand. + * _.findKey(users, 'active'); + * // => 'barney' + */ + function findKey(object, predicate) { + return baseFindKey(object, getIteratee(predicate, 3), baseForOwn); + } + + /** + * This method is like `_.findKey` except that it iterates over elements of + * a collection in the opposite order. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Object + * @param {Object} object The object to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {string|undefined} Returns the key of the matched element, + * else `undefined`. + * @example + * + * var users = { + * 'barney': { 'age': 36, 'active': true }, + * 'fred': { 'age': 40, 'active': false }, + * 'pebbles': { 'age': 1, 'active': true } + * }; + * + * _.findLastKey(users, function(o) { return o.age < 40; }); + * // => returns 'pebbles' assuming `_.findKey` returns 'barney' + * + * // The `_.matches` iteratee shorthand. + * _.findLastKey(users, { 'age': 36, 'active': true }); + * // => 'barney' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findLastKey(users, ['active', false]); + * // => 'fred' + * + * // The `_.property` iteratee shorthand. + * _.findLastKey(users, 'active'); + * // => 'pebbles' + */ + function findLastKey(object, predicate) { + return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight); + } + + /** + * Iterates over own and inherited enumerable string keyed properties of an + * object and invokes `iteratee` for each property. The iteratee is invoked + * with three arguments: (value, key, object). Iteratee functions may exit + * iteration early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @since 0.3.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forInRight + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forIn(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed). + */ + function forIn(object, iteratee) { + return object == null ? object : baseFor(object, getIteratee(iteratee, 3), keysIn); + } + + /** + * This method is like `_.forIn` except that it iterates over properties of + * `object` in the opposite order. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forIn + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forInRight(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'. + */ + function forInRight(object, iteratee) { + return object == null ? object : baseForRight(object, getIteratee(iteratee, 3), keysIn); + } + + /** + * Iterates over own enumerable string keyed properties of an object and + * invokes `iteratee` for each property. The iteratee is invoked with three + * arguments: (value, key, object). Iteratee functions may exit iteration + * early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @since 0.3.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forOwnRight + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forOwn(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a' then 'b' (iteration order is not guaranteed). + */ + function forOwn(object, iteratee) { + return object && baseForOwn(object, getIteratee(iteratee, 3)); + } + + /** + * This method is like `_.forOwn` except that it iterates over properties of + * `object` in the opposite order. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forOwn + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forOwnRight(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'. + */ + function forOwnRight(object, iteratee) { + return object && baseForOwnRight(object, getIteratee(iteratee, 3)); + } + + /** + * Creates an array of function property names from own enumerable properties + * of `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to inspect. + * @returns {Array} Returns the function names. + * @see _.functionsIn + * @example + * + * function Foo() { + * this.a = _.constant('a'); + * this.b = _.constant('b'); + * } + * + * Foo.prototype.c = _.constant('c'); + * + * _.functions(new Foo); + * // => ['a', 'b'] + */ + function functions(object) { + return object == null ? [] : baseFunctions(object, keys(object)); + } + + /** + * Creates an array of function property names from own and inherited + * enumerable properties of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to inspect. + * @returns {Array} Returns the function names. + * @see _.functions + * @example + * + * function Foo() { + * this.a = _.constant('a'); + * this.b = _.constant('b'); + * } + * + * Foo.prototype.c = _.constant('c'); + * + * _.functionsIn(new Foo); + * // => ['a', 'b', 'c'] + */ + function functionsIn(object) { + return object == null ? [] : baseFunctions(object, keysIn(object)); + } + + /** + * Gets the value at `path` of `object`. If the resolved value is + * `undefined`, the `defaultValue` is returned in its place. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @param {*} [defaultValue] The value returned for `undefined` resolved values. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.get(object, 'a[0].b.c'); + * // => 3 + * + * _.get(object, ['a', '0', 'b', 'c']); + * // => 3 + * + * _.get(object, 'a.b.c', 'default'); + * // => 'default' + */ + function get(object, path, defaultValue) { + var result = object == null ? undefined : baseGet(object, path); + return result === undefined ? defaultValue : result; + } + + /** + * Checks if `path` is a direct property of `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = { 'a': { 'b': 2 } }; + * var other = _.create({ 'a': _.create({ 'b': 2 }) }); + * + * _.has(object, 'a'); + * // => true + * + * _.has(object, 'a.b'); + * // => true + * + * _.has(object, ['a', 'b']); + * // => true + * + * _.has(other, 'a'); + * // => false + */ + function has(object, path) { + return object != null && hasPath(object, path, baseHas); + } + + /** + * Checks if `path` is a direct or inherited property of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = _.create({ 'a': _.create({ 'b': 2 }) }); + * + * _.hasIn(object, 'a'); + * // => true + * + * _.hasIn(object, 'a.b'); + * // => true + * + * _.hasIn(object, ['a', 'b']); + * // => true + * + * _.hasIn(object, 'b'); + * // => false + */ + function hasIn(object, path) { + return object != null && hasPath(object, path, baseHasIn); + } + + /** + * Creates an object composed of the inverted keys and values of `object`. + * If `object` contains duplicate values, subsequent values overwrite + * property assignments of previous values. + * + * @static + * @memberOf _ + * @since 0.7.0 + * @category Object + * @param {Object} object The object to invert. + * @returns {Object} Returns the new inverted object. + * @example + * + * var object = { 'a': 1, 'b': 2, 'c': 1 }; + * + * _.invert(object); + * // => { '1': 'c', '2': 'b' } + */ + var invert = createInverter(function (result, value, key) { + if (value != null && typeof value.toString != 'function') { + value = nativeObjectToString.call(value); + } + + result[value] = key; + }, constant(identity)); + + /** + * This method is like `_.invert` except that the inverted object is generated + * from the results of running each element of `object` thru `iteratee`. The + * corresponding inverted value of each inverted key is an array of keys + * responsible for generating the inverted value. The iteratee is invoked + * with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.1.0 + * @category Object + * @param {Object} object The object to invert. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Object} Returns the new inverted object. + * @example + * + * var object = { 'a': 1, 'b': 2, 'c': 1 }; + * + * _.invertBy(object); + * // => { '1': ['a', 'c'], '2': ['b'] } + * + * _.invertBy(object, function(value) { + * return 'group' + value; + * }); + * // => { 'group1': ['a', 'c'], 'group2': ['b'] } + */ + var invertBy = createInverter(function (result, value, key) { + if (value != null && typeof value.toString != 'function') { + value = nativeObjectToString.call(value); + } + + if (hasOwnProperty.call(result, value)) { + result[value].push(key); + } else { + result[value] = [key]; + } + }, getIteratee); + + /** + * Invokes the method at `path` of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the method to invoke. + * @param {...*} [args] The arguments to invoke the method with. + * @returns {*} Returns the result of the invoked method. + * @example + * + * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] }; + * + * _.invoke(object, 'a[0].b.c.slice', 1, 3); + * // => [2, 3] + */ + var invoke = baseRest(baseInvoke); + + /** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * for more details. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ + function keys(object) { + return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); + } + + /** + * Creates an array of the own and inherited enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keysIn(new Foo); + * // => ['a', 'b', 'c'] (iteration order is not guaranteed) + */ + function keysIn(object) { + return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); + } + + /** + * The opposite of `_.mapValues`; this method creates an object with the + * same values as `object` and keys generated by running each own enumerable + * string keyed property of `object` thru `iteratee`. The iteratee is invoked + * with three arguments: (value, key, object). + * + * @static + * @memberOf _ + * @since 3.8.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns the new mapped object. + * @see _.mapValues + * @example + * + * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) { + * return key + value; + * }); + * // => { 'a1': 1, 'b2': 2 } + */ + function mapKeys(object, iteratee) { + var result = {}; + iteratee = getIteratee(iteratee, 3); + + baseForOwn(object, function (value, key, object) { + baseAssignValue(result, iteratee(value, key, object), value); + }); + return result; + } + + /** + * Creates an object with the same keys as `object` and values generated + * by running each own enumerable string keyed property of `object` thru + * `iteratee`. The iteratee is invoked with three arguments: + * (value, key, object). + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns the new mapped object. + * @see _.mapKeys + * @example + * + * var users = { + * 'fred': { 'user': 'fred', 'age': 40 }, + * 'pebbles': { 'user': 'pebbles', 'age': 1 } + * }; + * + * _.mapValues(users, function(o) { return o.age; }); + * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) + * + * // The `_.property` iteratee shorthand. + * _.mapValues(users, 'age'); + * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) + */ + function mapValues(object, iteratee) { + var result = {}; + iteratee = getIteratee(iteratee, 3); + + baseForOwn(object, function (value, key, object) { + baseAssignValue(result, key, iteratee(value, key, object)); + }); + return result; + } + + /** + * This method is like `_.assign` except that it recursively merges own and + * inherited enumerable string keyed properties of source objects into the + * destination object. Source properties that resolve to `undefined` are + * skipped if a destination value exists. Array and plain object properties + * are merged recursively. Other objects and value types are overridden by + * assignment. Source objects are applied from left to right. Subsequent + * sources overwrite property assignments of previous sources. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 0.5.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @example + * + * var object = { + * 'a': [{ 'b': 2 }, { 'd': 4 }] + * }; + * + * var other = { + * 'a': [{ 'c': 3 }, { 'e': 5 }] + * }; + * + * _.merge(object, other); + * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] } + */ + var merge = createAssigner(function (object, source, srcIndex) { + baseMerge(object, source, srcIndex); + }); + + /** + * This method is like `_.merge` except that it accepts `customizer` which + * is invoked to produce the merged values of the destination and source + * properties. If `customizer` returns `undefined`, merging is handled by the + * method instead. The `customizer` is invoked with six arguments: + * (objValue, srcValue, key, object, source, stack). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} sources The source objects. + * @param {Function} customizer The function to customize assigned values. + * @returns {Object} Returns `object`. + * @example + * + * function customizer(objValue, srcValue) { + * if (_.isArray(objValue)) { + * return objValue.concat(srcValue); + * } + * } + * + * var object = { 'a': [1], 'b': [2] }; + * var other = { 'a': [3], 'b': [4] }; + * + * _.mergeWith(object, other, customizer); + * // => { 'a': [1, 3], 'b': [2, 4] } + */ + var mergeWith = createAssigner(function (object, source, srcIndex, customizer) { + baseMerge(object, source, srcIndex, customizer); + }); + + /** + * The opposite of `_.pick`; this method creates an object composed of the + * own and inherited enumerable property paths of `object` that are not omitted. + * + * **Note:** This method is considerably slower than `_.pick`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The source object. + * @param {...(string|string[])} [paths] The property paths to omit. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.omit(object, ['a', 'c']); + * // => { 'b': '2' } + */ + var omit = flatRest(function (object, paths) { + var result = {}; + if (object == null) { + return result; + } + var isDeep = false; + paths = arrayMap(paths, function (path) { + path = castPath(path, object); + isDeep || (isDeep = path.length > 1); + return path; + }); + copyObject(object, getAllKeysIn(object), result); + if (isDeep) { + result = baseClone( + result, + CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, + customOmitClone, + ); + } + var length = paths.length; + while (length--) { + baseUnset(result, paths[length]); + } + return result; + }); + + /** + * The opposite of `_.pickBy`; this method creates an object composed of + * the own and inherited enumerable string keyed properties of `object` that + * `predicate` doesn't return truthy for. The predicate is invoked with two + * arguments: (value, key). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The source object. + * @param {Function} [predicate=_.identity] The function invoked per property. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.omitBy(object, _.isNumber); + * // => { 'b': '2' } + */ + function omitBy(object, predicate) { + return pickBy(object, negate(getIteratee(predicate))); + } + + /** + * Creates an object composed of the picked `object` properties. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The source object. + * @param {...(string|string[])} [paths] The property paths to pick. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.pick(object, ['a', 'c']); + * // => { 'a': 1, 'c': 3 } + */ + var pick = flatRest(function (object, paths) { + return object == null ? {} : basePick(object, paths); + }); + + /** + * Creates an object composed of the `object` properties `predicate` returns + * truthy for. The predicate is invoked with two arguments: (value, key). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The source object. + * @param {Function} [predicate=_.identity] The function invoked per property. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.pickBy(object, _.isNumber); + * // => { 'a': 1, 'c': 3 } + */ + function pickBy(object, predicate) { + if (object == null) { + return {}; + } + var props = arrayMap(getAllKeysIn(object), function (prop) { + return [prop]; + }); + predicate = getIteratee(predicate); + return basePickBy(object, props, function (value, path) { + return predicate(value, path[0]); + }); + } + + /** + * This method is like `_.get` except that if the resolved value is a + * function it's invoked with the `this` binding of its parent object and + * its result is returned. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to resolve. + * @param {*} [defaultValue] The value returned for `undefined` resolved values. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] }; + * + * _.result(object, 'a[0].b.c1'); + * // => 3 + * + * _.result(object, 'a[0].b.c2'); + * // => 4 + * + * _.result(object, 'a[0].b.c3', 'default'); + * // => 'default' + * + * _.result(object, 'a[0].b.c3', _.constant('default')); + * // => 'default' + */ + function result(object, path, defaultValue) { + path = castPath(path, object); + + var index = -1, + length = path.length; + + // Ensure the loop is entered when path is empty. + if (!length) { + length = 1; + object = undefined; + } + while (++index < length) { + var value = object == null ? undefined : object[toKey(path[index])]; + if (value === undefined) { + index = length; + value = defaultValue; + } + object = isFunction(value) ? value.call(object) : value; + } + return object; + } + + /** + * Sets the value at `path` of `object`. If a portion of `path` doesn't exist, + * it's created. Arrays are created for missing index properties while objects + * are created for all other missing properties. Use `_.setWith` to customize + * `path` creation. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @returns {Object} Returns `object`. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.set(object, 'a[0].b.c', 4); + * console.log(object.a[0].b.c); + * // => 4 + * + * _.set(object, ['x', '0', 'y', 'z'], 5); + * console.log(object.x[0].y.z); + * // => 5 + */ + function set(object, path, value) { + return object == null ? object : baseSet(object, path, value); + } + + /** + * This method is like `_.set` except that it accepts `customizer` which is + * invoked to produce the objects of `path`. If `customizer` returns `undefined` + * path creation is handled by the method instead. The `customizer` is invoked + * with three arguments: (nsValue, key, nsObject). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @example + * + * var object = {}; + * + * _.setWith(object, '[0][1]', 'a', Object); + * // => { '0': { '1': 'a' } } + */ + function setWith(object, path, value, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return object == null ? object : baseSet(object, path, value, customizer); + } + + /** + * Creates an array of own enumerable string keyed-value pairs for `object` + * which can be consumed by `_.fromPairs`. If `object` is a map or set, its + * entries are returned. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias entries + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the key-value pairs. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.toPairs(new Foo); + * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed) + */ + var toPairs = createToPairs(keys); + + /** + * Creates an array of own and inherited enumerable string keyed-value pairs + * for `object` which can be consumed by `_.fromPairs`. If `object` is a map + * or set, its entries are returned. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias entriesIn + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the key-value pairs. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.toPairsIn(new Foo); + * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed) + */ + var toPairsIn = createToPairs(keysIn); + + /** + * An alternative to `_.reduce`; this method transforms `object` to a new + * `accumulator` object which is the result of running each of its own + * enumerable string keyed properties thru `iteratee`, with each invocation + * potentially mutating the `accumulator` object. If `accumulator` is not + * provided, a new object with the same `[[Prototype]]` will be used. The + * iteratee is invoked with four arguments: (accumulator, value, key, object). + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @since 1.3.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The custom accumulator value. + * @returns {*} Returns the accumulated value. + * @example + * + * _.transform([2, 3, 4], function(result, n) { + * result.push(n *= n); + * return n % 2 == 0; + * }, []); + * // => [4, 9] + * + * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { + * (result[value] || (result[value] = [])).push(key); + * }, {}); + * // => { '1': ['a', 'c'], '2': ['b'] } + */ + function transform(object, iteratee, accumulator) { + var isArr = isArray(object), + isArrLike = isArr || isBuffer(object) || isTypedArray(object); + + iteratee = getIteratee(iteratee, 4); + if (accumulator == null) { + var Ctor = object && object.constructor; + if (isArrLike) { + accumulator = isArr ? new Ctor() : []; + } else if (isObject(object)) { + accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {}; + } else { + accumulator = {}; + } + } + (isArrLike ? arrayEach : baseForOwn)(object, function (value, index, object) { + return iteratee(accumulator, value, index, object); + }); + return accumulator; + } + + /** + * Removes the property at `path` of `object`. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to unset. + * @returns {boolean} Returns `true` if the property is deleted, else `false`. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 7 } }] }; + * _.unset(object, 'a[0].b.c'); + * // => true + * + * console.log(object); + * // => { 'a': [{ 'b': {} }] }; + * + * _.unset(object, ['a', '0', 'b', 'c']); + * // => true + * + * console.log(object); + * // => { 'a': [{ 'b': {} }] }; + */ + function unset(object, path) { + return object == null ? true : baseUnset(object, path); + } + + /** + * This method is like `_.set` except that accepts `updater` to produce the + * value to set. Use `_.updateWith` to customize `path` creation. The `updater` + * is invoked with one argument: (value). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.6.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {Function} updater The function to produce the updated value. + * @returns {Object} Returns `object`. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.update(object, 'a[0].b.c', function(n) { return n * n; }); + * console.log(object.a[0].b.c); + * // => 9 + * + * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; }); + * console.log(object.x[0].y.z); + * // => 0 + */ + function update(object, path, updater) { + return object == null ? object : baseUpdate(object, path, castFunction(updater)); + } + + /** + * This method is like `_.update` except that it accepts `customizer` which is + * invoked to produce the objects of `path`. If `customizer` returns `undefined` + * path creation is handled by the method instead. The `customizer` is invoked + * with three arguments: (nsValue, key, nsObject). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.6.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {Function} updater The function to produce the updated value. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @example + * + * var object = {}; + * + * _.updateWith(object, '[0][1]', _.constant('a'), Object); + * // => { '0': { '1': 'a' } } + */ + function updateWith(object, path, updater, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer); + } + + /** + * Creates an array of the own enumerable string keyed property values of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property values. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.values(new Foo); + * // => [1, 2] (iteration order is not guaranteed) + * + * _.values('hi'); + * // => ['h', 'i'] + */ + function values(object) { + return object == null ? [] : baseValues(object, keys(object)); + } + + /** + * Creates an array of the own and inherited enumerable string keyed property + * values of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property values. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.valuesIn(new Foo); + * // => [1, 2, 3] (iteration order is not guaranteed) + */ + function valuesIn(object) { + return object == null ? [] : baseValues(object, keysIn(object)); + } + + /*------------------------------------------------------------------------*/ + + /** + * Clamps `number` within the inclusive `lower` and `upper` bounds. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Number + * @param {number} number The number to clamp. + * @param {number} [lower] The lower bound. + * @param {number} upper The upper bound. + * @returns {number} Returns the clamped number. + * @example + * + * _.clamp(-10, -5, 5); + * // => -5 + * + * _.clamp(10, -5, 5); + * // => 5 + */ + function clamp(number, lower, upper) { + if (upper === undefined) { + upper = lower; + lower = undefined; + } + if (upper !== undefined) { + upper = toNumber(upper); + upper = upper === upper ? upper : 0; + } + if (lower !== undefined) { + lower = toNumber(lower); + lower = lower === lower ? lower : 0; + } + return baseClamp(toNumber(number), lower, upper); + } + + /** + * Checks if `n` is between `start` and up to, but not including, `end`. If + * `end` is not specified, it's set to `start` with `start` then set to `0`. + * If `start` is greater than `end` the params are swapped to support + * negative ranges. + * + * @static + * @memberOf _ + * @since 3.3.0 + * @category Number + * @param {number} number The number to check. + * @param {number} [start=0] The start of the range. + * @param {number} end The end of the range. + * @returns {boolean} Returns `true` if `number` is in the range, else `false`. + * @see _.range, _.rangeRight + * @example + * + * _.inRange(3, 2, 4); + * // => true + * + * _.inRange(4, 8); + * // => true + * + * _.inRange(4, 2); + * // => false + * + * _.inRange(2, 2); + * // => false + * + * _.inRange(1.2, 2); + * // => true + * + * _.inRange(5.2, 4); + * // => false + * + * _.inRange(-3, -2, -6); + * // => true + */ + function inRange(number, start, end) { + start = toFinite(start); + if (end === undefined) { + end = start; + start = 0; + } else { + end = toFinite(end); + } + number = toNumber(number); + return baseInRange(number, start, end); + } + + /** + * Produces a random number between the inclusive `lower` and `upper` bounds. + * If only one argument is provided a number between `0` and the given number + * is returned. If `floating` is `true`, or either `lower` or `upper` are + * floats, a floating-point number is returned instead of an integer. + * + * **Note:** JavaScript follows the IEEE-754 standard for resolving + * floating-point values which can produce unexpected results. + * + * @static + * @memberOf _ + * @since 0.7.0 + * @category Number + * @param {number} [lower=0] The lower bound. + * @param {number} [upper=1] The upper bound. + * @param {boolean} [floating] Specify returning a floating-point number. + * @returns {number} Returns the random number. + * @example + * + * _.random(0, 5); + * // => an integer between 0 and 5 + * + * _.random(5); + * // => also an integer between 0 and 5 + * + * _.random(5, true); + * // => a floating-point number between 0 and 5 + * + * _.random(1.2, 5.2); + * // => a floating-point number between 1.2 and 5.2 + */ + function random(lower, upper, floating) { + if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) { + upper = floating = undefined; + } + if (floating === undefined) { + if (typeof upper == 'boolean') { + floating = upper; + upper = undefined; + } else if (typeof lower == 'boolean') { + floating = lower; + lower = undefined; + } + } + if (lower === undefined && upper === undefined) { + lower = 0; + upper = 1; + } else { + lower = toFinite(lower); + if (upper === undefined) { + upper = lower; + lower = 0; + } else { + upper = toFinite(upper); + } + } + if (lower > upper) { + var temp = lower; + lower = upper; + upper = temp; + } + if (floating || lower % 1 || upper % 1) { + var rand = nativeRandom(); + return nativeMin( + lower + rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1))), + upper, + ); + } + return baseRandom(lower, upper); + } + + /*------------------------------------------------------------------------*/ + + /** + * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the camel cased string. + * @example + * + * _.camelCase('Foo Bar'); + * // => 'fooBar' + * + * _.camelCase('--foo-bar--'); + * // => 'fooBar' + * + * _.camelCase('__FOO_BAR__'); + * // => 'fooBar' + */ + var camelCase = createCompounder(function (result, word, index) { + word = word.toLowerCase(); + return result + (index ? capitalize(word) : word); + }); + + /** + * Converts the first character of `string` to upper case and the remaining + * to lower case. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to capitalize. + * @returns {string} Returns the capitalized string. + * @example + * + * _.capitalize('FRED'); + * // => 'Fred' + */ + function capitalize(string) { + return upperFirst(toString(string).toLowerCase()); + } + + /** + * Deburrs `string` by converting + * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table) + * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A) + * letters to basic Latin letters and removing + * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to deburr. + * @returns {string} Returns the deburred string. + * @example + * + * _.deburr('déjà vu'); + * // => 'deja vu' + */ + function deburr(string) { + string = toString(string); + return string && string.replace(reLatin, deburrLetter).replace(reComboMark, ''); + } + + /** + * Checks if `string` ends with the given target string. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to inspect. + * @param {string} [target] The string to search for. + * @param {number} [position=string.length] The position to search up to. + * @returns {boolean} Returns `true` if `string` ends with `target`, + * else `false`. + * @example + * + * _.endsWith('abc', 'c'); + * // => true + * + * _.endsWith('abc', 'b'); + * // => false + * + * _.endsWith('abc', 'b', 2); + * // => true + */ + function endsWith(string, target, position) { + string = toString(string); + target = baseToString(target); + + var length = string.length; + position = position === undefined ? length : baseClamp(toInteger(position), 0, length); + + var end = position; + position -= target.length; + return position >= 0 && string.slice(position, end) == target; + } + + /** + * Converts the characters "&", "<", ">", '"', and "'" in `string` to their + * corresponding HTML entities. + * + * **Note:** No other characters are escaped. To escape additional + * characters use a third-party library like [_he_](https://mths.be/he). + * + * Though the ">" character is escaped for symmetry, characters like + * ">" and "/" don't need escaping in HTML and have no special meaning + * unless they're part of a tag or unquoted attribute value. See + * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands) + * (under "semi-related fun fact") for more details. + * + * When working with HTML you should always + * [quote attribute values](http://wonko.com/post/html-escaping) to reduce + * XSS vectors. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category String + * @param {string} [string=''] The string to escape. + * @returns {string} Returns the escaped string. + * @example + * + * _.escape('fred, barney, & pebbles'); + * // => 'fred, barney, & pebbles' + */ + function escape(string) { + string = toString(string); + return string && reHasUnescapedHtml.test(string) + ? string.replace(reUnescapedHtml, escapeHtmlChar) + : string; + } + + /** + * Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+", + * "?", "(", ")", "[", "]", "{", "}", and "|" in `string`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to escape. + * @returns {string} Returns the escaped string. + * @example + * + * _.escapeRegExp('[lodash](https://lodash.com/)'); + * // => '\[lodash\]\(https://lodash\.com/\)' + */ + function escapeRegExp(string) { + string = toString(string); + return string && reHasRegExpChar.test(string) ? string.replace(reRegExpChar, '\\$&') : string; + } + + /** + * Converts `string` to + * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the kebab cased string. + * @example + * + * _.kebabCase('Foo Bar'); + * // => 'foo-bar' + * + * _.kebabCase('fooBar'); + * // => 'foo-bar' + * + * _.kebabCase('__FOO_BAR__'); + * // => 'foo-bar' + */ + var kebabCase = createCompounder(function (result, word, index) { + return result + (index ? '-' : '') + word.toLowerCase(); + }); + + /** + * Converts `string`, as space separated words, to lower case. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the lower cased string. + * @example + * + * _.lowerCase('--Foo-Bar--'); + * // => 'foo bar' + * + * _.lowerCase('fooBar'); + * // => 'foo bar' + * + * _.lowerCase('__FOO_BAR__'); + * // => 'foo bar' + */ + var lowerCase = createCompounder(function (result, word, index) { + return result + (index ? ' ' : '') + word.toLowerCase(); + }); + + /** + * Converts the first character of `string` to lower case. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the converted string. + * @example + * + * _.lowerFirst('Fred'); + * // => 'fred' + * + * _.lowerFirst('FRED'); + * // => 'fRED' + */ + var lowerFirst = createCaseFirst('toLowerCase'); + + /** + * Pads `string` on the left and right sides if it's shorter than `length`. + * Padding characters are truncated if they can't be evenly divided by `length`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to pad. + * @param {number} [length=0] The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padded string. + * @example + * + * _.pad('abc', 8); + * // => ' abc ' + * + * _.pad('abc', 8, '_-'); + * // => '_-abc_-_' + * + * _.pad('abc', 3); + * // => 'abc' + */ + function pad(string, length, chars) { + string = toString(string); + length = toInteger(length); + + var strLength = length ? stringSize(string) : 0; + if (!length || strLength >= length) { + return string; + } + var mid = (length - strLength) / 2; + return createPadding(nativeFloor(mid), chars) + string + createPadding(nativeCeil(mid), chars); + } + + /** + * Pads `string` on the right side if it's shorter than `length`. Padding + * characters are truncated if they exceed `length`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to pad. + * @param {number} [length=0] The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padded string. + * @example + * + * _.padEnd('abc', 6); + * // => 'abc ' + * + * _.padEnd('abc', 6, '_-'); + * // => 'abc_-_' + * + * _.padEnd('abc', 3); + * // => 'abc' + */ + function padEnd(string, length, chars) { + string = toString(string); + length = toInteger(length); + + var strLength = length ? stringSize(string) : 0; + return length && strLength < length + ? string + createPadding(length - strLength, chars) + : string; + } + + /** + * Pads `string` on the left side if it's shorter than `length`. Padding + * characters are truncated if they exceed `length`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to pad. + * @param {number} [length=0] The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padded string. + * @example + * + * _.padStart('abc', 6); + * // => ' abc' + * + * _.padStart('abc', 6, '_-'); + * // => '_-_abc' + * + * _.padStart('abc', 3); + * // => 'abc' + */ + function padStart(string, length, chars) { + string = toString(string); + length = toInteger(length); + + var strLength = length ? stringSize(string) : 0; + return length && strLength < length + ? createPadding(length - strLength, chars) + string + : string; + } + + /** + * Converts `string` to an integer of the specified radix. If `radix` is + * `undefined` or `0`, a `radix` of `10` is used unless `value` is a + * hexadecimal, in which case a `radix` of `16` is used. + * + * **Note:** This method aligns with the + * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category String + * @param {string} string The string to convert. + * @param {number} [radix=10] The radix to interpret `value` by. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {number} Returns the converted integer. + * @example + * + * _.parseInt('08'); + * // => 8 + * + * _.map(['6', '08', '10'], _.parseInt); + * // => [6, 8, 10] + */ + function parseInt(string, radix, guard) { + if (guard || radix == null) { + radix = 0; + } else if (radix) { + radix = +radix; + } + return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0); + } + + /** + * Repeats the given string `n` times. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to repeat. + * @param {number} [n=1] The number of times to repeat the string. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {string} Returns the repeated string. + * @example + * + * _.repeat('*', 3); + * // => '***' + * + * _.repeat('abc', 2); + * // => 'abcabc' + * + * _.repeat('abc', 0); + * // => '' + */ + function repeat(string, n, guard) { + if (guard ? isIterateeCall(string, n, guard) : n === undefined) { + n = 1; + } else { + n = toInteger(n); + } + return baseRepeat(toString(string), n); + } + + /** + * Replaces matches for `pattern` in `string` with `replacement`. + * + * **Note:** This method is based on + * [`String#replace`](https://mdn.io/String/replace). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to modify. + * @param {RegExp|string} pattern The pattern to replace. + * @param {Function|string} replacement The match replacement. + * @returns {string} Returns the modified string. + * @example + * + * _.replace('Hi Fred', 'Fred', 'Barney'); + * // => 'Hi Barney' + */ + function replace() { + var args = arguments, + string = toString(args[0]); + + return args.length < 3 ? string : string.replace(args[1], args[2]); + } + + /** + * Converts `string` to + * [snake case](https://en.wikipedia.org/wiki/Snake_case). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the snake cased string. + * @example + * + * _.snakeCase('Foo Bar'); + * // => 'foo_bar' + * + * _.snakeCase('fooBar'); + * // => 'foo_bar' + * + * _.snakeCase('--FOO-BAR--'); + * // => 'foo_bar' + */ + var snakeCase = createCompounder(function (result, word, index) { + return result + (index ? '_' : '') + word.toLowerCase(); + }); + + /** + * Splits `string` by `separator`. + * + * **Note:** This method is based on + * [`String#split`](https://mdn.io/String/split). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to split. + * @param {RegExp|string} separator The separator pattern to split by. + * @param {number} [limit] The length to truncate results to. + * @returns {Array} Returns the string segments. + * @example + * + * _.split('a-b-c', '-', 2); + * // => ['a', 'b'] + */ + function split(string, separator, limit) { + if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) { + separator = limit = undefined; + } + limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0; + if (!limit) { + return []; + } + string = toString(string); + if (string && (typeof separator == 'string' || (separator != null && !isRegExp(separator)))) { + separator = baseToString(separator); + if (!separator && hasUnicode(string)) { + return castSlice(stringToArray(string), 0, limit); + } + } + return string.split(separator, limit); + } + + /** + * Converts `string` to + * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage). + * + * @static + * @memberOf _ + * @since 3.1.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the start cased string. + * @example + * + * _.startCase('--foo-bar--'); + * // => 'Foo Bar' + * + * _.startCase('fooBar'); + * // => 'Foo Bar' + * + * _.startCase('__FOO_BAR__'); + * // => 'FOO BAR' + */ + var startCase = createCompounder(function (result, word, index) { + return result + (index ? ' ' : '') + upperFirst(word); + }); + + /** + * Checks if `string` starts with the given target string. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to inspect. + * @param {string} [target] The string to search for. + * @param {number} [position=0] The position to search from. + * @returns {boolean} Returns `true` if `string` starts with `target`, + * else `false`. + * @example + * + * _.startsWith('abc', 'a'); + * // => true + * + * _.startsWith('abc', 'b'); + * // => false + * + * _.startsWith('abc', 'b', 1); + * // => true + */ + function startsWith(string, target, position) { + string = toString(string); + position = position == null ? 0 : baseClamp(toInteger(position), 0, string.length); + + target = baseToString(target); + return string.slice(position, position + target.length) == target; + } + + /** + * Creates a compiled template function that can interpolate data properties + * in "interpolate" delimiters, HTML-escape interpolated data properties in + * "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data + * properties may be accessed as free variables in the template. If a setting + * object is given, it takes precedence over `_.templateSettings` values. + * + * **Note:** In the development build `_.template` utilizes + * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl) + * for easier debugging. + * + * For more information on precompiling templates see + * [lodash's custom builds documentation](https://lodash.com/custom-builds). + * + * For more information on Chrome extension sandboxes see + * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval). + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category String + * @param {string} [string=''] The template string. + * @param {Object} [options={}] The options object. + * @param {RegExp} [options.escape=_.templateSettings.escape] + * The HTML "escape" delimiter. + * @param {RegExp} [options.evaluate=_.templateSettings.evaluate] + * The "evaluate" delimiter. + * @param {Object} [options.imports=_.templateSettings.imports] + * An object to import into the template as free variables. + * @param {RegExp} [options.interpolate=_.templateSettings.interpolate] + * The "interpolate" delimiter. + * @param {string} [options.sourceURL='lodash.templateSources[n]'] + * The sourceURL of the compiled template. + * @param {string} [options.variable='obj'] + * The data object variable name. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the compiled template function. + * @example + * + * // Use the "interpolate" delimiter to create a compiled template. + * var compiled = _.template('hello <%= user %>!'); + * compiled({ 'user': 'fred' }); + * // => 'hello fred!' + * + * // Use the HTML "escape" delimiter to escape data property values. + * var compiled = _.template('<b><%- value %></b>'); + * compiled({ 'value': '<script>' }); + * // => '<b><script></b>' + * + * // Use the "evaluate" delimiter to execute JavaScript and generate HTML. + * var compiled = _.template('<% _.forEach(users, function(user) { %><li><%- user %></li><% }); %>'); + * compiled({ 'users': ['fred', 'barney'] }); + * // => '<li>fred</li><li>barney</li>' + * + * // Use the internal `print` function in "evaluate" delimiters. + * var compiled = _.template('<% print("hello " + user); %>!'); + * compiled({ 'user': 'barney' }); + * // => 'hello barney!' + * + * // Use the ES template literal delimiter as an "interpolate" delimiter. + * // Disable support by replacing the "interpolate" delimiter. + * var compiled = _.template('hello ${ user }!'); + * compiled({ 'user': 'pebbles' }); + * // => 'hello pebbles!' + * + * // Use backslashes to treat delimiters as plain text. + * var compiled = _.template('<%= "\\<%- value %\\>" %>'); + * compiled({ 'value': 'ignored' }); + * // => '<%- value %>' + * + * // Use the `imports` option to import `jQuery` as `jq`. + * var text = '<% jq.each(users, function(user) { %><li><%- user %></li><% }); %>'; + * var compiled = _.template(text, { 'imports': { 'jq': jQuery } }); + * compiled({ 'users': ['fred', 'barney'] }); + * // => '<li>fred</li><li>barney</li>' + * + * // Use the `sourceURL` option to specify a custom sourceURL for the template. + * var compiled = _.template('hello <%= user %>!', { 'sourceURL': '/basic/greeting.jst' }); + * compiled(data); + * // => Find the source of "greeting.jst" under the Sources tab or Resources panel of the web inspector. + * + * // Use the `variable` option to ensure a with-statement isn't used in the compiled template. + * var compiled = _.template('hi <%= data.user %>!', { 'variable': 'data' }); + * compiled.source; + * // => function(data) { + * // var __t, __p = ''; + * // __p += 'hi ' + ((__t = ( data.user )) == null ? '' : __t) + '!'; + * // return __p; + * // } + * + * // Use custom template delimiters. + * _.templateSettings.interpolate = /{{([\s\S]+?)}}/g; + * var compiled = _.template('hello {{ user }}!'); + * compiled({ 'user': 'mustache' }); + * // => 'hello mustache!' + * + * // Use the `source` property to inline compiled templates for meaningful + * // line numbers in error messages and stack traces. + * fs.writeFileSync(path.join(process.cwd(), 'jst.js'), '\ + * var JST = {\ + * "main": ' + _.template(mainText).source + '\ + * };\ + * '); + */ + function template(string, options, guard) { + // Based on John Resig's `tmpl` implementation + // (http://ejohn.org/blog/javascript-micro-templating/) + // and Laura Doktorova's doT.js (https://github.com/olado/doT). + var settings = lodash.templateSettings; + + if (guard && isIterateeCall(string, options, guard)) { + options = undefined; + } + string = toString(string); + options = assignInWith({}, options, settings, customDefaultsAssignIn); + + var imports = assignInWith({}, options.imports, settings.imports, customDefaultsAssignIn), + importsKeys = keys(imports), + importsValues = baseValues(imports, importsKeys); + + var isEscaping, + isEvaluating, + index = 0, + interpolate = options.interpolate || reNoMatch, + source = "__p += '"; + + // Compile the regexp to match each delimiter. + var reDelimiters = RegExp( + (options.escape || reNoMatch).source + + '|' + + interpolate.source + + '|' + + (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + + '|' + + (options.evaluate || reNoMatch).source + + '|$', + 'g', + ); + + // Use a sourceURL for easier debugging. + // The sourceURL gets injected into the source that's eval-ed, so be careful + // with lookup (in case of e.g. prototype pollution), and strip newlines if any. + // A newline wouldn't be a valid sourceURL anyway, and it'd enable code injection. + var sourceURL = + '//# sourceURL=' + + (hasOwnProperty.call(options, 'sourceURL') + ? (options.sourceURL + '').replace(/[\r\n]/g, ' ') + : 'lodash.templateSources[' + ++templateCounter + ']') + + '\n'; + + string.replace( + reDelimiters, + function (match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) { + interpolateValue || (interpolateValue = esTemplateValue); + + // Escape characters that can't be included in string literals. + source += string.slice(index, offset).replace(reUnescapedString, escapeStringChar); + + // Replace delimiters with snippets. + if (escapeValue) { + isEscaping = true; + source += "' +\n__e(" + escapeValue + ") +\n'"; + } + if (evaluateValue) { + isEvaluating = true; + source += "';\n" + evaluateValue + ";\n__p += '"; + } + if (interpolateValue) { + source += "' +\n((__t = (" + interpolateValue + ")) == null ? '' : __t) +\n'"; + } + index = offset + match.length; + + // The JS engine embedded in Adobe products needs `match` returned in + // order to produce the correct `offset` value. + return match; + }, + ); + + source += "';\n"; + + // If `variable` is not specified wrap a with-statement around the generated + // code to add the data object to the top of the scope chain. + // Like with sourceURL, we take care to not check the option's prototype, + // as this configuration is a code injection vector. + var variable = hasOwnProperty.call(options, 'variable') && options.variable; + if (!variable) { + source = 'with (obj) {\n' + source + '\n}\n'; + } + // Cleanup code by stripping empty strings. + source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source) + .replace(reEmptyStringMiddle, '$1') + .replace(reEmptyStringTrailing, '$1;'); + + // Frame code as the function body. + source = + 'function(' + + (variable || 'obj') + + ') {\n' + + (variable ? '' : 'obj || (obj = {});\n') + + "var __t, __p = ''" + + (isEscaping ? ', __e = _.escape' : '') + + (isEvaluating + ? ', __j = Array.prototype.join;\n' + + "function print() { __p += __j.call(arguments, '') }\n" + : ';\n') + + source + + 'return __p\n}'; + + var result = attempt(function () { + return Function(importsKeys, sourceURL + 'return ' + source).apply(undefined, importsValues); + }); + + // Provide the compiled function's source by its `toString` method or + // the `source` property as a convenience for inlining compiled templates. + result.source = source; + if (isError(result)) { + throw result; + } + return result; + } + + /** + * Converts `string`, as a whole, to lower case just like + * [String#toLowerCase](https://mdn.io/toLowerCase). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the lower cased string. + * @example + * + * _.toLower('--Foo-Bar--'); + * // => '--foo-bar--' + * + * _.toLower('fooBar'); + * // => 'foobar' + * + * _.toLower('__FOO_BAR__'); + * // => '__foo_bar__' + */ + function toLower(value) { + return toString(value).toLowerCase(); + } + + /** + * Converts `string`, as a whole, to upper case just like + * [String#toUpperCase](https://mdn.io/toUpperCase). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the upper cased string. + * @example + * + * _.toUpper('--foo-bar--'); + * // => '--FOO-BAR--' + * + * _.toUpper('fooBar'); + * // => 'FOOBAR' + * + * _.toUpper('__foo_bar__'); + * // => '__FOO_BAR__' + */ + function toUpper(value) { + return toString(value).toUpperCase(); + } + + /** + * Removes leading and trailing whitespace or specified characters from `string`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to trim. + * @param {string} [chars=whitespace] The characters to trim. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {string} Returns the trimmed string. + * @example + * + * _.trim(' abc '); + * // => 'abc' + * + * _.trim('-_-abc-_-', '_-'); + * // => 'abc' + * + * _.map([' foo ', ' bar '], _.trim); + * // => ['foo', 'bar'] + */ + function trim(string, chars, guard) { + string = toString(string); + if (string && (guard || chars === undefined)) { + return string.replace(reTrim, ''); + } + if (!string || !(chars = baseToString(chars))) { + return string; + } + var strSymbols = stringToArray(string), + chrSymbols = stringToArray(chars), + start = charsStartIndex(strSymbols, chrSymbols), + end = charsEndIndex(strSymbols, chrSymbols) + 1; + + return castSlice(strSymbols, start, end).join(''); + } + + /** + * Removes trailing whitespace or specified characters from `string`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to trim. + * @param {string} [chars=whitespace] The characters to trim. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {string} Returns the trimmed string. + * @example + * + * _.trimEnd(' abc '); + * // => ' abc' + * + * _.trimEnd('-_-abc-_-', '_-'); + * // => '-_-abc' + */ + function trimEnd(string, chars, guard) { + string = toString(string); + if (string && (guard || chars === undefined)) { + return string.replace(reTrimEnd, ''); + } + if (!string || !(chars = baseToString(chars))) { + return string; + } + var strSymbols = stringToArray(string), + end = charsEndIndex(strSymbols, stringToArray(chars)) + 1; + + return castSlice(strSymbols, 0, end).join(''); + } + + /** + * Removes leading whitespace or specified characters from `string`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to trim. + * @param {string} [chars=whitespace] The characters to trim. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {string} Returns the trimmed string. + * @example + * + * _.trimStart(' abc '); + * // => 'abc ' + * + * _.trimStart('-_-abc-_-', '_-'); + * // => 'abc-_-' + */ + function trimStart(string, chars, guard) { + string = toString(string); + if (string && (guard || chars === undefined)) { + return string.replace(reTrimStart, ''); + } + if (!string || !(chars = baseToString(chars))) { + return string; + } + var strSymbols = stringToArray(string), + start = charsStartIndex(strSymbols, stringToArray(chars)); + + return castSlice(strSymbols, start).join(''); + } + + /** + * Truncates `string` if it's longer than the given maximum string length. + * The last characters of the truncated string are replaced with the omission + * string which defaults to "...". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to truncate. + * @param {Object} [options={}] The options object. + * @param {number} [options.length=30] The maximum string length. + * @param {string} [options.omission='...'] The string to indicate text is omitted. + * @param {RegExp|string} [options.separator] The separator pattern to truncate to. + * @returns {string} Returns the truncated string. + * @example + * + * _.truncate('hi-diddly-ho there, neighborino'); + * // => 'hi-diddly-ho there, neighbo...' + * + * _.truncate('hi-diddly-ho there, neighborino', { + * 'length': 24, + * 'separator': ' ' + * }); + * // => 'hi-diddly-ho there,...' + * + * _.truncate('hi-diddly-ho there, neighborino', { + * 'length': 24, + * 'separator': /,? +/ + * }); + * // => 'hi-diddly-ho there...' + * + * _.truncate('hi-diddly-ho there, neighborino', { + * 'omission': ' [...]' + * }); + * // => 'hi-diddly-ho there, neig [...]' + */ + function truncate(string, options) { + var length = DEFAULT_TRUNC_LENGTH, + omission = DEFAULT_TRUNC_OMISSION; + + if (isObject(options)) { + var separator = 'separator' in options ? options.separator : separator; + length = 'length' in options ? toInteger(options.length) : length; + omission = 'omission' in options ? baseToString(options.omission) : omission; + } + string = toString(string); + + var strLength = string.length; + if (hasUnicode(string)) { + var strSymbols = stringToArray(string); + strLength = strSymbols.length; + } + if (length >= strLength) { + return string; + } + var end = length - stringSize(omission); + if (end < 1) { + return omission; + } + var result = strSymbols ? castSlice(strSymbols, 0, end).join('') : string.slice(0, end); + + if (separator === undefined) { + return result + omission; + } + if (strSymbols) { + end += result.length - end; + } + if (isRegExp(separator)) { + if (string.slice(end).search(separator)) { + var match, + substring = result; + + if (!separator.global) { + separator = RegExp(separator.source, toString(reFlags.exec(separator)) + 'g'); + } + separator.lastIndex = 0; + while ((match = separator.exec(substring))) { + var newEnd = match.index; + } + result = result.slice(0, newEnd === undefined ? end : newEnd); + } + } else if (string.indexOf(baseToString(separator), end) != end) { + var index = result.lastIndexOf(separator); + if (index > -1) { + result = result.slice(0, index); + } + } + return result + omission; + } + + /** + * The inverse of `_.escape`; this method converts the HTML entities + * `&`, `<`, `>`, `"`, and `'` in `string` to + * their corresponding characters. + * + * **Note:** No other HTML entities are unescaped. To unescape additional + * HTML entities use a third-party library like [_he_](https://mths.be/he). + * + * @static + * @memberOf _ + * @since 0.6.0 + * @category String + * @param {string} [string=''] The string to unescape. + * @returns {string} Returns the unescaped string. + * @example + * + * _.unescape('fred, barney, & pebbles'); + * // => 'fred, barney, & pebbles' + */ + function unescape(string) { + string = toString(string); + return string && reHasEscapedHtml.test(string) + ? string.replace(reEscapedHtml, unescapeHtmlChar) + : string; + } + + /** + * Converts `string`, as space separated words, to upper case. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the upper cased string. + * @example + * + * _.upperCase('--foo-bar'); + * // => 'FOO BAR' + * + * _.upperCase('fooBar'); + * // => 'FOO BAR' + * + * _.upperCase('__foo_bar__'); + * // => 'FOO BAR' + */ + var upperCase = createCompounder(function (result, word, index) { + return result + (index ? ' ' : '') + word.toUpperCase(); + }); + + /** + * Converts the first character of `string` to upper case. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the converted string. + * @example + * + * _.upperFirst('fred'); + * // => 'Fred' + * + * _.upperFirst('FRED'); + * // => 'FRED' + */ + var upperFirst = createCaseFirst('toUpperCase'); + + /** + * Splits `string` into an array of its words. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to inspect. + * @param {RegExp|string} [pattern] The pattern to match words. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the words of `string`. + * @example + * + * _.words('fred, barney, & pebbles'); + * // => ['fred', 'barney', 'pebbles'] + * + * _.words('fred, barney, & pebbles', /[^, ]+/g); + * // => ['fred', 'barney', '&', 'pebbles'] + */ + function words(string, pattern, guard) { + string = toString(string); + pattern = guard ? undefined : pattern; + + if (pattern === undefined) { + return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string); + } + return string.match(pattern) || []; + } + + /*------------------------------------------------------------------------*/ + + /** + * Attempts to invoke `func`, returning either the result or the caught error + * object. Any additional arguments are provided to `func` when it's invoked. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Util + * @param {Function} func The function to attempt. + * @param {...*} [args] The arguments to invoke `func` with. + * @returns {*} Returns the `func` result or error object. + * @example + * + * // Avoid throwing errors for invalid selectors. + * var elements = _.attempt(function(selector) { + * return document.querySelectorAll(selector); + * }, '>_>'); + * + * if (_.isError(elements)) { + * elements = []; + * } + */ + var attempt = baseRest(function (func, args) { + try { + return apply(func, undefined, args); + } catch (e) { + return isError(e) ? e : new Error(e); + } + }); + + /** + * Binds methods of an object to the object itself, overwriting the existing + * method. + * + * **Note:** This method doesn't set the "length" property of bound functions. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {Object} object The object to bind and assign the bound methods to. + * @param {...(string|string[])} methodNames The object method names to bind. + * @returns {Object} Returns `object`. + * @example + * + * var view = { + * 'label': 'docs', + * 'click': function() { + * console.log('clicked ' + this.label); + * } + * }; + * + * _.bindAll(view, ['click']); + * jQuery(element).on('click', view.click); + * // => Logs 'clicked docs' when clicked. + */ + var bindAll = flatRest(function (object, methodNames) { + arrayEach(methodNames, function (key) { + key = toKey(key); + baseAssignValue(object, key, bind(object[key], object)); + }); + return object; + }); + + /** + * Creates a function that iterates over `pairs` and invokes the corresponding + * function of the first predicate to return truthy. The predicate-function + * pairs are invoked with the `this` binding and arguments of the created + * function. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Util + * @param {Array} pairs The predicate-function pairs. + * @returns {Function} Returns the new composite function. + * @example + * + * var func = _.cond([ + * [_.matches({ 'a': 1 }), _.constant('matches A')], + * [_.conforms({ 'b': _.isNumber }), _.constant('matches B')], + * [_.stubTrue, _.constant('no match')] + * ]); + * + * func({ 'a': 1, 'b': 2 }); + * // => 'matches A' + * + * func({ 'a': 0, 'b': 1 }); + * // => 'matches B' + * + * func({ 'a': '1', 'b': '2' }); + * // => 'no match' + */ + function cond(pairs) { + var length = pairs == null ? 0 : pairs.length, + toIteratee = getIteratee(); + + pairs = !length + ? [] + : arrayMap(pairs, function (pair) { + if (typeof pair[1] != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + return [toIteratee(pair[0]), pair[1]]; + }); + + return baseRest(function (args) { + var index = -1; + while (++index < length) { + var pair = pairs[index]; + if (apply(pair[0], this, args)) { + return apply(pair[1], this, args); + } + } + }); + } + + /** + * Creates a function that invokes the predicate properties of `source` with + * the corresponding property values of a given object, returning `true` if + * all predicates return truthy, else `false`. + * + * **Note:** The created function is equivalent to `_.conformsTo` with + * `source` partially applied. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Util + * @param {Object} source The object of property predicates to conform to. + * @returns {Function} Returns the new spec function. + * @example + * + * var objects = [ + * { 'a': 2, 'b': 1 }, + * { 'a': 1, 'b': 2 } + * ]; + * + * _.filter(objects, _.conforms({ 'b': function(n) { return n > 1; } })); + * // => [{ 'a': 1, 'b': 2 }] + */ + function conforms(source) { + return baseConforms(baseClone(source, CLONE_DEEP_FLAG)); + } + + /** + * Creates a function that returns `value`. + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Util + * @param {*} value The value to return from the new function. + * @returns {Function} Returns the new constant function. + * @example + * + * var objects = _.times(2, _.constant({ 'a': 1 })); + * + * console.log(objects); + * // => [{ 'a': 1 }, { 'a': 1 }] + * + * console.log(objects[0] === objects[1]); + * // => true + */ + function constant(value) { + return function () { + return value; + }; + } + + /** + * Checks `value` to determine whether a default value should be returned in + * its place. The `defaultValue` is returned if `value` is `NaN`, `null`, + * or `undefined`. + * + * @static + * @memberOf _ + * @since 4.14.0 + * @category Util + * @param {*} value The value to check. + * @param {*} defaultValue The default value. + * @returns {*} Returns the resolved value. + * @example + * + * _.defaultTo(1, 10); + * // => 1 + * + * _.defaultTo(undefined, 10); + * // => 10 + */ + function defaultTo(value, defaultValue) { + return value == null || value !== value ? defaultValue : value; + } + + /** + * Creates a function that returns the result of invoking the given functions + * with the `this` binding of the created function, where each successive + * invocation is supplied the return value of the previous. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Util + * @param {...(Function|Function[])} [funcs] The functions to invoke. + * @returns {Function} Returns the new composite function. + * @see _.flowRight + * @example + * + * function square(n) { + * return n * n; + * } + * + * var addSquare = _.flow([_.add, square]); + * addSquare(1, 2); + * // => 9 + */ + var flow = createFlow(); + + /** + * This method is like `_.flow` except that it creates a function that + * invokes the given functions from right to left. + * + * @static + * @since 3.0.0 + * @memberOf _ + * @category Util + * @param {...(Function|Function[])} [funcs] The functions to invoke. + * @returns {Function} Returns the new composite function. + * @see _.flow + * @example + * + * function square(n) { + * return n * n; + * } + * + * var addSquare = _.flowRight([square, _.add]); + * addSquare(1, 2); + * // => 9 + */ + var flowRight = createFlow(true); + + /** + * This method returns the first argument it receives. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {*} value Any value. + * @returns {*} Returns `value`. + * @example + * + * var object = { 'a': 1 }; + * + * console.log(_.identity(object) === object); + * // => true + */ + function identity(value) { + return value; + } + + /** + * Creates a function that invokes `func` with the arguments of the created + * function. If `func` is a property name, the created function returns the + * property value for a given element. If `func` is an array or object, the + * created function returns `true` for elements that contain the equivalent + * source properties, otherwise it returns `false`. + * + * @static + * @since 4.0.0 + * @memberOf _ + * @category Util + * @param {*} [func=_.identity] The value to convert to a callback. + * @returns {Function} Returns the callback. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * // The `_.matches` iteratee shorthand. + * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true })); + * // => [{ 'user': 'barney', 'age': 36, 'active': true }] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.filter(users, _.iteratee(['user', 'fred'])); + * // => [{ 'user': 'fred', 'age': 40 }] + * + * // The `_.property` iteratee shorthand. + * _.map(users, _.iteratee('user')); + * // => ['barney', 'fred'] + * + * // Create custom iteratee shorthands. + * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) { + * return !_.isRegExp(func) ? iteratee(func) : function(string) { + * return func.test(string); + * }; + * }); + * + * _.filter(['abc', 'def'], /ef/); + * // => ['def'] + */ + function iteratee(func) { + return baseIteratee(typeof func == 'function' ? func : baseClone(func, CLONE_DEEP_FLAG)); + } + + /** + * Creates a function that performs a partial deep comparison between a given + * object and `source`, returning `true` if the given object has equivalent + * property values, else `false`. + * + * **Note:** The created function is equivalent to `_.isMatch` with `source` + * partially applied. + * + * Partial comparisons will match empty array and empty object `source` + * values against any array or object value, respectively. See `_.isEqual` + * for a list of supported value comparisons. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Util + * @param {Object} source The object of property values to match. + * @returns {Function} Returns the new spec function. + * @example + * + * var objects = [ + * { 'a': 1, 'b': 2, 'c': 3 }, + * { 'a': 4, 'b': 5, 'c': 6 } + * ]; + * + * _.filter(objects, _.matches({ 'a': 4, 'c': 6 })); + * // => [{ 'a': 4, 'b': 5, 'c': 6 }] + */ + function matches(source) { + return baseMatches(baseClone(source, CLONE_DEEP_FLAG)); + } + + /** + * Creates a function that performs a partial deep comparison between the + * value at `path` of a given object to `srcValue`, returning `true` if the + * object value is equivalent, else `false`. + * + * **Note:** Partial comparisons will match empty array and empty object + * `srcValue` values against any array or object value, respectively. See + * `_.isEqual` for a list of supported value comparisons. + * + * @static + * @memberOf _ + * @since 3.2.0 + * @category Util + * @param {Array|string} path The path of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + * @example + * + * var objects = [ + * { 'a': 1, 'b': 2, 'c': 3 }, + * { 'a': 4, 'b': 5, 'c': 6 } + * ]; + * + * _.find(objects, _.matchesProperty('a', 4)); + * // => { 'a': 4, 'b': 5, 'c': 6 } + */ + function matchesProperty(path, srcValue) { + return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG)); + } + + /** + * Creates a function that invokes the method at `path` of a given object. + * Any additional arguments are provided to the invoked method. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Util + * @param {Array|string} path The path of the method to invoke. + * @param {...*} [args] The arguments to invoke the method with. + * @returns {Function} Returns the new invoker function. + * @example + * + * var objects = [ + * { 'a': { 'b': _.constant(2) } }, + * { 'a': { 'b': _.constant(1) } } + * ]; + * + * _.map(objects, _.method('a.b')); + * // => [2, 1] + * + * _.map(objects, _.method(['a', 'b'])); + * // => [2, 1] + */ + var method = baseRest(function (path, args) { + return function (object) { + return baseInvoke(object, path, args); + }; + }); + + /** + * The opposite of `_.method`; this method creates a function that invokes + * the method at a given path of `object`. Any additional arguments are + * provided to the invoked method. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Util + * @param {Object} object The object to query. + * @param {...*} [args] The arguments to invoke the method with. + * @returns {Function} Returns the new invoker function. + * @example + * + * var array = _.times(3, _.constant), + * object = { 'a': array, 'b': array, 'c': array }; + * + * _.map(['a[2]', 'c[0]'], _.methodOf(object)); + * // => [2, 0] + * + * _.map([['a', '2'], ['c', '0']], _.methodOf(object)); + * // => [2, 0] + */ + var methodOf = baseRest(function (object, args) { + return function (path) { + return baseInvoke(object, path, args); + }; + }); + + /** + * Adds all own enumerable string keyed function properties of a source + * object to the destination object. If `object` is a function, then methods + * are added to its prototype as well. + * + * **Note:** Use `_.runInContext` to create a pristine `lodash` function to + * avoid conflicts caused by modifying the original. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {Function|Object} [object=lodash] The destination object. + * @param {Object} source The object of functions to add. + * @param {Object} [options={}] The options object. + * @param {boolean} [options.chain=true] Specify whether mixins are chainable. + * @returns {Function|Object} Returns `object`. + * @example + * + * function vowels(string) { + * return _.filter(string, function(v) { + * return /[aeiou]/i.test(v); + * }); + * } + * + * _.mixin({ 'vowels': vowels }); + * _.vowels('fred'); + * // => ['e'] + * + * _('fred').vowels().value(); + * // => ['e'] + * + * _.mixin({ 'vowels': vowels }, { 'chain': false }); + * _('fred').vowels(); + * // => ['e'] + */ + function mixin(object, source, options) { + var props = keys(source), + methodNames = baseFunctions(source, props); + + if (options == null && !(isObject(source) && (methodNames.length || !props.length))) { + options = source; + source = object; + object = this; + methodNames = baseFunctions(source, keys(source)); + } + var chain = !(isObject(options) && 'chain' in options) || !!options.chain, + isFunc = isFunction(object); + + arrayEach(methodNames, function (methodName) { + var func = source[methodName]; + object[methodName] = func; + if (isFunc) { + object.prototype[methodName] = function () { + var chainAll = this.__chain__; + if (chain || chainAll) { + var result = object(this.__wrapped__), + actions = (result.__actions__ = copyArray(this.__actions__)); + + actions.push({ func: func, args: arguments, thisArg: object }); + result.__chain__ = chainAll; + return result; + } + return func.apply(object, arrayPush([this.value()], arguments)); + }; + } + }); + + return object; + } + + /** + * Reverts the `_` variable to its previous value and returns a reference to + * the `lodash` function. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @returns {Function} Returns the `lodash` function. + * @example + * + * var lodash = _.noConflict(); + */ + function noConflict() { + if (root._ === this) { + root._ = oldDash; + } + return this; + } + + /** + * This method returns `undefined`. + * + * @static + * @memberOf _ + * @since 2.3.0 + * @category Util + * @example + * + * _.times(2, _.noop); + * // => [undefined, undefined] + */ + function noop() { + // No operation performed. + } + + /** + * Creates a function that gets the argument at index `n`. If `n` is negative, + * the nth argument from the end is returned. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Util + * @param {number} [n=0] The index of the argument to return. + * @returns {Function} Returns the new pass-thru function. + * @example + * + * var func = _.nthArg(1); + * func('a', 'b', 'c', 'd'); + * // => 'b' + * + * var func = _.nthArg(-2); + * func('a', 'b', 'c', 'd'); + * // => 'c' + */ + function nthArg(n) { + n = toInteger(n); + return baseRest(function (args) { + return baseNth(args, n); + }); + } + + /** + * Creates a function that invokes `iteratees` with the arguments it receives + * and returns their results. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Util + * @param {...(Function|Function[])} [iteratees=[_.identity]] + * The iteratees to invoke. + * @returns {Function} Returns the new function. + * @example + * + * var func = _.over([Math.max, Math.min]); + * + * func(1, 2, 3, 4); + * // => [4, 1] + */ + var over = createOver(arrayMap); + + /** + * Creates a function that checks if **all** of the `predicates` return + * truthy when invoked with the arguments it receives. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Util + * @param {...(Function|Function[])} [predicates=[_.identity]] + * The predicates to check. + * @returns {Function} Returns the new function. + * @example + * + * var func = _.overEvery([Boolean, isFinite]); + * + * func('1'); + * // => true + * + * func(null); + * // => false + * + * func(NaN); + * // => false + */ + var overEvery = createOver(arrayEvery); + + /** + * Creates a function that checks if **any** of the `predicates` return + * truthy when invoked with the arguments it receives. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Util + * @param {...(Function|Function[])} [predicates=[_.identity]] + * The predicates to check. + * @returns {Function} Returns the new function. + * @example + * + * var func = _.overSome([Boolean, isFinite]); + * + * func('1'); + * // => true + * + * func(null); + * // => true + * + * func(NaN); + * // => false + */ + var overSome = createOver(arraySome); + + /** + * Creates a function that returns the value at `path` of a given object. + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Util + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new accessor function. + * @example + * + * var objects = [ + * { 'a': { 'b': 2 } }, + * { 'a': { 'b': 1 } } + * ]; + * + * _.map(objects, _.property('a.b')); + * // => [2, 1] + * + * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b'); + * // => [1, 2] + */ + function property(path) { + return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path); + } + + /** + * The opposite of `_.property`; this method creates a function that returns + * the value at a given path of `object`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Util + * @param {Object} object The object to query. + * @returns {Function} Returns the new accessor function. + * @example + * + * var array = [0, 1, 2], + * object = { 'a': array, 'b': array, 'c': array }; + * + * _.map(['a[2]', 'c[0]'], _.propertyOf(object)); + * // => [2, 0] + * + * _.map([['a', '2'], ['c', '0']], _.propertyOf(object)); + * // => [2, 0] + */ + function propertyOf(object) { + return function (path) { + return object == null ? undefined : baseGet(object, path); + }; + } + + /** + * Creates an array of numbers (positive and/or negative) progressing from + * `start` up to, but not including, `end`. A step of `-1` is used if a negative + * `start` is specified without an `end` or `step`. If `end` is not specified, + * it's set to `start` with `start` then set to `0`. + * + * **Note:** JavaScript follows the IEEE-754 standard for resolving + * floating-point values which can produce unexpected results. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {number} [start=0] The start of the range. + * @param {number} end The end of the range. + * @param {number} [step=1] The value to increment or decrement by. + * @returns {Array} Returns the range of numbers. + * @see _.inRange, _.rangeRight + * @example + * + * _.range(4); + * // => [0, 1, 2, 3] + * + * _.range(-4); + * // => [0, -1, -2, -3] + * + * _.range(1, 5); + * // => [1, 2, 3, 4] + * + * _.range(0, 20, 5); + * // => [0, 5, 10, 15] + * + * _.range(0, -4, -1); + * // => [0, -1, -2, -3] + * + * _.range(1, 4, 0); + * // => [1, 1, 1] + * + * _.range(0); + * // => [] + */ + var range = createRange(); + + /** + * This method is like `_.range` except that it populates values in + * descending order. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Util + * @param {number} [start=0] The start of the range. + * @param {number} end The end of the range. + * @param {number} [step=1] The value to increment or decrement by. + * @returns {Array} Returns the range of numbers. + * @see _.inRange, _.range + * @example + * + * _.rangeRight(4); + * // => [3, 2, 1, 0] + * + * _.rangeRight(-4); + * // => [-3, -2, -1, 0] + * + * _.rangeRight(1, 5); + * // => [4, 3, 2, 1] + * + * _.rangeRight(0, 20, 5); + * // => [15, 10, 5, 0] + * + * _.rangeRight(0, -4, -1); + * // => [-3, -2, -1, 0] + * + * _.rangeRight(1, 4, 0); + * // => [1, 1, 1] + * + * _.rangeRight(0); + * // => [] + */ + var rangeRight = createRange(true); + + /** + * This method returns a new empty array. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {Array} Returns the new empty array. + * @example + * + * var arrays = _.times(2, _.stubArray); + * + * console.log(arrays); + * // => [[], []] + * + * console.log(arrays[0] === arrays[1]); + * // => false + */ + function stubArray() { + return []; + } + + /** + * This method returns `false`. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {boolean} Returns `false`. + * @example + * + * _.times(2, _.stubFalse); + * // => [false, false] + */ + function stubFalse() { + return false; + } + + /** + * This method returns a new empty object. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {Object} Returns the new empty object. + * @example + * + * var objects = _.times(2, _.stubObject); + * + * console.log(objects); + * // => [{}, {}] + * + * console.log(objects[0] === objects[1]); + * // => false + */ + function stubObject() { + return {}; + } + + /** + * This method returns an empty string. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {string} Returns the empty string. + * @example + * + * _.times(2, _.stubString); + * // => ['', ''] + */ + function stubString() { + return ''; + } + + /** + * This method returns `true`. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {boolean} Returns `true`. + * @example + * + * _.times(2, _.stubTrue); + * // => [true, true] + */ + function stubTrue() { + return true; + } + + /** + * Invokes the iteratee `n` times, returning an array of the results of + * each invocation. The iteratee is invoked with one argument; (index). + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {number} n The number of times to invoke `iteratee`. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the array of results. + * @example + * + * _.times(3, String); + * // => ['0', '1', '2'] + * + * _.times(4, _.constant(0)); + * // => [0, 0, 0, 0] + */ + function times(n, iteratee) { + n = toInteger(n); + if (n < 1 || n > MAX_SAFE_INTEGER) { + return []; + } + var index = MAX_ARRAY_LENGTH, + length = nativeMin(n, MAX_ARRAY_LENGTH); + + iteratee = getIteratee(iteratee); + n -= MAX_ARRAY_LENGTH; + + var result = baseTimes(length, iteratee); + while (++index < n) { + iteratee(index); + } + return result; + } + + /** + * Converts `value` to a property path array. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Util + * @param {*} value The value to convert. + * @returns {Array} Returns the new property path array. + * @example + * + * _.toPath('a.b.c'); + * // => ['a', 'b', 'c'] + * + * _.toPath('a[0].b.c'); + * // => ['a', '0', 'b', 'c'] + */ + function toPath(value) { + if (isArray(value)) { + return arrayMap(value, toKey); + } + return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value))); + } + + /** + * Generates a unique ID. If `prefix` is given, the ID is appended to it. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {string} [prefix=''] The value to prefix the ID with. + * @returns {string} Returns the unique ID. + * @example + * + * _.uniqueId('contact_'); + * // => 'contact_104' + * + * _.uniqueId(); + * // => '105' + */ + function uniqueId(prefix) { + var id = ++idCounter; + return toString(prefix) + id; + } + + /*------------------------------------------------------------------------*/ + + /** + * Adds two numbers. + * + * @static + * @memberOf _ + * @since 3.4.0 + * @category Math + * @param {number} augend The first number in an addition. + * @param {number} addend The second number in an addition. + * @returns {number} Returns the total. + * @example + * + * _.add(6, 4); + * // => 10 + */ + var add = createMathOperation(function (augend, addend) { + return augend + addend; + }, 0); + + /** + * Computes `number` rounded up to `precision`. + * + * @static + * @memberOf _ + * @since 3.10.0 + * @category Math + * @param {number} number The number to round up. + * @param {number} [precision=0] The precision to round up to. + * @returns {number} Returns the rounded up number. + * @example + * + * _.ceil(4.006); + * // => 5 + * + * _.ceil(6.004, 2); + * // => 6.01 + * + * _.ceil(6040, -2); + * // => 6100 + */ + var ceil = createRound('ceil'); + + /** + * Divide two numbers. + * + * @static + * @memberOf _ + * @since 4.7.0 + * @category Math + * @param {number} dividend The first number in a division. + * @param {number} divisor The second number in a division. + * @returns {number} Returns the quotient. + * @example + * + * _.divide(6, 4); + * // => 1.5 + */ + var divide = createMathOperation(function (dividend, divisor) { + return dividend / divisor; + }, 1); + + /** + * Computes `number` rounded down to `precision`. + * + * @static + * @memberOf _ + * @since 3.10.0 + * @category Math + * @param {number} number The number to round down. + * @param {number} [precision=0] The precision to round down to. + * @returns {number} Returns the rounded down number. + * @example + * + * _.floor(4.006); + * // => 4 + * + * _.floor(0.046, 2); + * // => 0.04 + * + * _.floor(4060, -2); + * // => 4000 + */ + var floor = createRound('floor'); + + /** + * Computes the maximum value of `array`. If `array` is empty or falsey, + * `undefined` is returned. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Math + * @param {Array} array The array to iterate over. + * @returns {*} Returns the maximum value. + * @example + * + * _.max([4, 2, 8, 6]); + * // => 8 + * + * _.max([]); + * // => undefined + */ + function max(array) { + return array && array.length ? baseExtremum(array, identity, baseGt) : undefined; + } + + /** + * This method is like `_.max` except that it accepts `iteratee` which is + * invoked for each element in `array` to generate the criterion by which + * the value is ranked. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Math + * @param {Array} array The array to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {*} Returns the maximum value. + * @example + * + * var objects = [{ 'n': 1 }, { 'n': 2 }]; + * + * _.maxBy(objects, function(o) { return o.n; }); + * // => { 'n': 2 } + * + * // The `_.property` iteratee shorthand. + * _.maxBy(objects, 'n'); + * // => { 'n': 2 } + */ + function maxBy(array, iteratee) { + return array && array.length + ? baseExtremum(array, getIteratee(iteratee, 2), baseGt) + : undefined; + } + + /** + * Computes the mean of the values in `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Math + * @param {Array} array The array to iterate over. + * @returns {number} Returns the mean. + * @example + * + * _.mean([4, 2, 8, 6]); + * // => 5 + */ + function mean(array) { + return baseMean(array, identity); + } + + /** + * This method is like `_.mean` except that it accepts `iteratee` which is + * invoked for each element in `array` to generate the value to be averaged. + * The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.7.0 + * @category Math + * @param {Array} array The array to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {number} Returns the mean. + * @example + * + * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }]; + * + * _.meanBy(objects, function(o) { return o.n; }); + * // => 5 + * + * // The `_.property` iteratee shorthand. + * _.meanBy(objects, 'n'); + * // => 5 + */ + function meanBy(array, iteratee) { + return baseMean(array, getIteratee(iteratee, 2)); + } + + /** + * Computes the minimum value of `array`. If `array` is empty or falsey, + * `undefined` is returned. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Math + * @param {Array} array The array to iterate over. + * @returns {*} Returns the minimum value. + * @example + * + * _.min([4, 2, 8, 6]); + * // => 2 + * + * _.min([]); + * // => undefined + */ + function min(array) { + return array && array.length ? baseExtremum(array, identity, baseLt) : undefined; + } + + /** + * This method is like `_.min` except that it accepts `iteratee` which is + * invoked for each element in `array` to generate the criterion by which + * the value is ranked. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Math + * @param {Array} array The array to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {*} Returns the minimum value. + * @example + * + * var objects = [{ 'n': 1 }, { 'n': 2 }]; + * + * _.minBy(objects, function(o) { return o.n; }); + * // => { 'n': 1 } + * + * // The `_.property` iteratee shorthand. + * _.minBy(objects, 'n'); + * // => { 'n': 1 } + */ + function minBy(array, iteratee) { + return array && array.length + ? baseExtremum(array, getIteratee(iteratee, 2), baseLt) + : undefined; + } + + /** + * Multiply two numbers. + * + * @static + * @memberOf _ + * @since 4.7.0 + * @category Math + * @param {number} multiplier The first number in a multiplication. + * @param {number} multiplicand The second number in a multiplication. + * @returns {number} Returns the product. + * @example + * + * _.multiply(6, 4); + * // => 24 + */ + var multiply = createMathOperation(function (multiplier, multiplicand) { + return multiplier * multiplicand; + }, 1); + + /** + * Computes `number` rounded to `precision`. + * + * @static + * @memberOf _ + * @since 3.10.0 + * @category Math + * @param {number} number The number to round. + * @param {number} [precision=0] The precision to round to. + * @returns {number} Returns the rounded number. + * @example + * + * _.round(4.006); + * // => 4 + * + * _.round(4.006, 2); + * // => 4.01 + * + * _.round(4060, -2); + * // => 4100 + */ + var round = createRound('round'); + + /** + * Subtract two numbers. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Math + * @param {number} minuend The first number in a subtraction. + * @param {number} subtrahend The second number in a subtraction. + * @returns {number} Returns the difference. + * @example + * + * _.subtract(6, 4); + * // => 2 + */ + var subtract = createMathOperation(function (minuend, subtrahend) { + return minuend - subtrahend; + }, 0); + + /** + * Computes the sum of the values in `array`. + * + * @static + * @memberOf _ + * @since 3.4.0 + * @category Math + * @param {Array} array The array to iterate over. + * @returns {number} Returns the sum. + * @example + * + * _.sum([4, 2, 8, 6]); + * // => 20 + */ + function sum(array) { + return array && array.length ? baseSum(array, identity) : 0; + } + + /** + * This method is like `_.sum` except that it accepts `iteratee` which is + * invoked for each element in `array` to generate the value to be summed. + * The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Math + * @param {Array} array The array to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {number} Returns the sum. + * @example + * + * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }]; + * + * _.sumBy(objects, function(o) { return o.n; }); + * // => 20 + * + * // The `_.property` iteratee shorthand. + * _.sumBy(objects, 'n'); + * // => 20 + */ + function sumBy(array, iteratee) { + return array && array.length ? baseSum(array, getIteratee(iteratee, 2)) : 0; + } + + /*------------------------------------------------------------------------*/ + + // Add methods that return wrapped values in chain sequences. + lodash.after = after; + lodash.ary = ary; + lodash.assign = assign; + lodash.assignIn = assignIn; + lodash.assignInWith = assignInWith; + lodash.assignWith = assignWith; + lodash.at = at; + lodash.before = before; + lodash.bind = bind; + lodash.bindAll = bindAll; + lodash.bindKey = bindKey; + lodash.castArray = castArray; + lodash.chain = chain; + lodash.chunk = chunk; + lodash.compact = compact; + lodash.concat = concat; + lodash.cond = cond; + lodash.conforms = conforms; + lodash.constant = constant; + lodash.countBy = countBy; + lodash.create = create; + lodash.curry = curry; + lodash.curryRight = curryRight; + lodash.debounce = debounce; + lodash.defaults = defaults; + lodash.defaultsDeep = defaultsDeep; + lodash.defer = defer; + lodash.delay = delay; + lodash.difference = difference; + lodash.differenceBy = differenceBy; + lodash.differenceWith = differenceWith; + lodash.drop = drop; + lodash.dropRight = dropRight; + lodash.dropRightWhile = dropRightWhile; + lodash.dropWhile = dropWhile; + lodash.fill = fill; + lodash.filter = filter; + lodash.flatMap = flatMap; + lodash.flatMapDeep = flatMapDeep; + lodash.flatMapDepth = flatMapDepth; + lodash.flatten = flatten; + lodash.flattenDeep = flattenDeep; + lodash.flattenDepth = flattenDepth; + lodash.flip = flip; + lodash.flow = flow; + lodash.flowRight = flowRight; + lodash.fromPairs = fromPairs; + lodash.functions = functions; + lodash.functionsIn = functionsIn; + lodash.groupBy = groupBy; + lodash.initial = initial; + lodash.intersection = intersection; + lodash.intersectionBy = intersectionBy; + lodash.intersectionWith = intersectionWith; + lodash.invert = invert; + lodash.invertBy = invertBy; + lodash.invokeMap = invokeMap; + lodash.iteratee = iteratee; + lodash.keyBy = keyBy; + lodash.keys = keys; + lodash.keysIn = keysIn; + lodash.map = map; + lodash.mapKeys = mapKeys; + lodash.mapValues = mapValues; + lodash.matches = matches; + lodash.matchesProperty = matchesProperty; + lodash.memoize = memoize; + lodash.merge = merge; + lodash.mergeWith = mergeWith; + lodash.method = method; + lodash.methodOf = methodOf; + lodash.mixin = mixin; + lodash.negate = negate; + lodash.nthArg = nthArg; + lodash.omit = omit; + lodash.omitBy = omitBy; + lodash.once = once; + lodash.orderBy = orderBy; + lodash.over = over; + lodash.overArgs = overArgs; + lodash.overEvery = overEvery; + lodash.overSome = overSome; + lodash.partial = partial; + lodash.partialRight = partialRight; + lodash.partition = partition; + lodash.pick = pick; + lodash.pickBy = pickBy; + lodash.property = property; + lodash.propertyOf = propertyOf; + lodash.pull = pull; + lodash.pullAll = pullAll; + lodash.pullAllBy = pullAllBy; + lodash.pullAllWith = pullAllWith; + lodash.pullAt = pullAt; + lodash.range = range; + lodash.rangeRight = rangeRight; + lodash.rearg = rearg; + lodash.reject = reject; + lodash.remove = remove; + lodash.rest = rest; + lodash.reverse = reverse; + lodash.sampleSize = sampleSize; + lodash.set = set; + lodash.setWith = setWith; + lodash.shuffle = shuffle; + lodash.slice = slice; + lodash.sortBy = sortBy; + lodash.sortedUniq = sortedUniq; + lodash.sortedUniqBy = sortedUniqBy; + lodash.split = split; + lodash.spread = spread; + lodash.tail = tail; + lodash.take = take; + lodash.takeRight = takeRight; + lodash.takeRightWhile = takeRightWhile; + lodash.takeWhile = takeWhile; + lodash.tap = tap; + lodash.throttle = throttle; + lodash.thru = thru; + lodash.toArray = toArray; + lodash.toPairs = toPairs; + lodash.toPairsIn = toPairsIn; + lodash.toPath = toPath; + lodash.toPlainObject = toPlainObject; + lodash.transform = transform; + lodash.unary = unary; + lodash.union = union; + lodash.unionBy = unionBy; + lodash.unionWith = unionWith; + lodash.uniq = uniq; + lodash.uniqBy = uniqBy; + lodash.uniqWith = uniqWith; + lodash.unset = unset; + lodash.unzip = unzip; + lodash.unzipWith = unzipWith; + lodash.update = update; + lodash.updateWith = updateWith; + lodash.values = values; + lodash.valuesIn = valuesIn; + lodash.without = without; + lodash.words = words; + lodash.wrap = wrap; + lodash.xor = xor; + lodash.xorBy = xorBy; + lodash.xorWith = xorWith; + lodash.zip = zip; + lodash.zipObject = zipObject; + lodash.zipObjectDeep = zipObjectDeep; + lodash.zipWith = zipWith; + + // Add aliases. + lodash.entries = toPairs; + lodash.entriesIn = toPairsIn; + lodash.extend = assignIn; + lodash.extendWith = assignInWith; + + // Add methods to `lodash.prototype`. + mixin(lodash, lodash); + + /*------------------------------------------------------------------------*/ + + // Add methods that return unwrapped values in chain sequences. + lodash.add = add; + lodash.attempt = attempt; + lodash.camelCase = camelCase; + lodash.capitalize = capitalize; + lodash.ceil = ceil; + lodash.clamp = clamp; + lodash.clone = clone; + lodash.cloneDeep = cloneDeep; + lodash.cloneDeepWith = cloneDeepWith; + lodash.cloneWith = cloneWith; + lodash.conformsTo = conformsTo; + lodash.deburr = deburr; + lodash.defaultTo = defaultTo; + lodash.divide = divide; + lodash.endsWith = endsWith; + lodash.eq = eq; + lodash.escape = escape; + lodash.escapeRegExp = escapeRegExp; + lodash.every = every; + lodash.find = find; + lodash.findIndex = findIndex; + lodash.findKey = findKey; + lodash.findLast = findLast; + lodash.findLastIndex = findLastIndex; + lodash.findLastKey = findLastKey; + lodash.floor = floor; + lodash.forEach = forEach; + lodash.forEachRight = forEachRight; + lodash.forIn = forIn; + lodash.forInRight = forInRight; + lodash.forOwn = forOwn; + lodash.forOwnRight = forOwnRight; + lodash.get = get; + lodash.gt = gt; + lodash.gte = gte; + lodash.has = has; + lodash.hasIn = hasIn; + lodash.head = head; + lodash.identity = identity; + lodash.includes = includes; + lodash.indexOf = indexOf; + lodash.inRange = inRange; + lodash.invoke = invoke; + lodash.isArguments = isArguments; + lodash.isArray = isArray; + lodash.isArrayBuffer = isArrayBuffer; + lodash.isArrayLike = isArrayLike; + lodash.isArrayLikeObject = isArrayLikeObject; + lodash.isBoolean = isBoolean; + lodash.isBuffer = isBuffer; + lodash.isDate = isDate; + lodash.isElement = isElement; + lodash.isEmpty = isEmpty; + lodash.isEqual = isEqual; + lodash.isEqualWith = isEqualWith; + lodash.isError = isError; + lodash.isFinite = isFinite; + lodash.isFunction = isFunction; + lodash.isInteger = isInteger; + lodash.isLength = isLength; + lodash.isMap = isMap; + lodash.isMatch = isMatch; + lodash.isMatchWith = isMatchWith; + lodash.isNaN = isNaN; + lodash.isNative = isNative; + lodash.isNil = isNil; + lodash.isNull = isNull; + lodash.isNumber = isNumber; + lodash.isObject = isObject; + lodash.isObjectLike = isObjectLike; + lodash.isPlainObject = isPlainObject; + lodash.isRegExp = isRegExp; + lodash.isSafeInteger = isSafeInteger; + lodash.isSet = isSet; + lodash.isString = isString; + lodash.isSymbol = isSymbol; + lodash.isTypedArray = isTypedArray; + lodash.isUndefined = isUndefined; + lodash.isWeakMap = isWeakMap; + lodash.isWeakSet = isWeakSet; + lodash.join = join; + lodash.kebabCase = kebabCase; + lodash.last = last; + lodash.lastIndexOf = lastIndexOf; + lodash.lowerCase = lowerCase; + lodash.lowerFirst = lowerFirst; + lodash.lt = lt; + lodash.lte = lte; + lodash.max = max; + lodash.maxBy = maxBy; + lodash.mean = mean; + lodash.meanBy = meanBy; + lodash.min = min; + lodash.minBy = minBy; + lodash.stubArray = stubArray; + lodash.stubFalse = stubFalse; + lodash.stubObject = stubObject; + lodash.stubString = stubString; + lodash.stubTrue = stubTrue; + lodash.multiply = multiply; + lodash.nth = nth; + lodash.noConflict = noConflict; + lodash.noop = noop; + lodash.now = now; + lodash.pad = pad; + lodash.padEnd = padEnd; + lodash.padStart = padStart; + lodash.parseInt = parseInt; + lodash.random = random; + lodash.reduce = reduce; + lodash.reduceRight = reduceRight; + lodash.repeat = repeat; + lodash.replace = replace; + lodash.result = result; + lodash.round = round; + lodash.runInContext = runInContext; + lodash.sample = sample; + lodash.size = size; + lodash.snakeCase = snakeCase; + lodash.some = some; + lodash.sortedIndex = sortedIndex; + lodash.sortedIndexBy = sortedIndexBy; + lodash.sortedIndexOf = sortedIndexOf; + lodash.sortedLastIndex = sortedLastIndex; + lodash.sortedLastIndexBy = sortedLastIndexBy; + lodash.sortedLastIndexOf = sortedLastIndexOf; + lodash.startCase = startCase; + lodash.startsWith = startsWith; + lodash.subtract = subtract; + lodash.sum = sum; + lodash.sumBy = sumBy; + lodash.template = template; + lodash.times = times; + lodash.toFinite = toFinite; + lodash.toInteger = toInteger; + lodash.toLength = toLength; + lodash.toLower = toLower; + lodash.toNumber = toNumber; + lodash.toSafeInteger = toSafeInteger; + lodash.toString = toString; + lodash.toUpper = toUpper; + lodash.trim = trim; + lodash.trimEnd = trimEnd; + lodash.trimStart = trimStart; + lodash.truncate = truncate; + lodash.unescape = unescape; + lodash.uniqueId = uniqueId; + lodash.upperCase = upperCase; + lodash.upperFirst = upperFirst; + + // Add aliases. + lodash.each = forEach; + lodash.eachRight = forEachRight; + lodash.first = head; + + mixin( + lodash, + (function () { + var source = {}; + baseForOwn(lodash, function (func, methodName) { + if (!hasOwnProperty.call(lodash.prototype, methodName)) { + source[methodName] = func; + } + }); + return source; + })(), + { chain: false }, + ); + + /*------------------------------------------------------------------------*/ + + /** + * The semantic version number. + * + * @static + * @memberOf _ + * @type {string} + */ + lodash.VERSION = VERSION; + + // Assign default placeholders. + arrayEach( + ['bind', 'bindKey', 'curry', 'curryRight', 'partial', 'partialRight'], + function (methodName) { + lodash[methodName].placeholder = lodash; + }, + ); + + // Add `LazyWrapper` methods for `_.drop` and `_.take` variants. + arrayEach(['drop', 'take'], function (methodName, index) { + LazyWrapper.prototype[methodName] = function (n) { + n = n === undefined ? 1 : nativeMax(toInteger(n), 0); + + var result = this.__filtered__ && !index ? new LazyWrapper(this) : this.clone(); + + if (result.__filtered__) { + result.__takeCount__ = nativeMin(n, result.__takeCount__); + } else { + result.__views__.push({ + size: nativeMin(n, MAX_ARRAY_LENGTH), + type: methodName + (result.__dir__ < 0 ? 'Right' : ''), + }); + } + return result; + }; + + LazyWrapper.prototype[methodName + 'Right'] = function (n) { + return this.reverse()[methodName](n).reverse(); + }; + }); + + // Add `LazyWrapper` methods that accept an `iteratee` value. + arrayEach(['filter', 'map', 'takeWhile'], function (methodName, index) { + var type = index + 1, + isFilter = type == LAZY_FILTER_FLAG || type == LAZY_WHILE_FLAG; + + LazyWrapper.prototype[methodName] = function (iteratee) { + var result = this.clone(); + result.__iteratees__.push({ + iteratee: getIteratee(iteratee, 3), + type: type, + }); + result.__filtered__ = result.__filtered__ || isFilter; + return result; + }; + }); + + // Add `LazyWrapper` methods for `_.head` and `_.last`. + arrayEach(['head', 'last'], function (methodName, index) { + var takeName = 'take' + (index ? 'Right' : ''); + + LazyWrapper.prototype[methodName] = function () { + return this[takeName](1).value()[0]; + }; + }); + + // Add `LazyWrapper` methods for `_.initial` and `_.tail`. + arrayEach(['initial', 'tail'], function (methodName, index) { + var dropName = 'drop' + (index ? '' : 'Right'); + + LazyWrapper.prototype[methodName] = function () { + return this.__filtered__ ? new LazyWrapper(this) : this[dropName](1); + }; + }); + + LazyWrapper.prototype.compact = function () { + return this.filter(identity); + }; + + LazyWrapper.prototype.find = function (predicate) { + return this.filter(predicate).head(); + }; + + LazyWrapper.prototype.findLast = function (predicate) { + return this.reverse().find(predicate); + }; + + LazyWrapper.prototype.invokeMap = baseRest(function (path, args) { + if (typeof path == 'function') { + return new LazyWrapper(this); + } + return this.map(function (value) { + return baseInvoke(value, path, args); + }); + }); + + LazyWrapper.prototype.reject = function (predicate) { + return this.filter(negate(getIteratee(predicate))); + }; + + LazyWrapper.prototype.slice = function (start, end) { + start = toInteger(start); + + var result = this; + if (result.__filtered__ && (start > 0 || end < 0)) { + return new LazyWrapper(result); + } + if (start < 0) { + result = result.takeRight(-start); + } else if (start) { + result = result.drop(start); + } + if (end !== undefined) { + end = toInteger(end); + result = end < 0 ? result.dropRight(-end) : result.take(end - start); + } + return result; + }; + + LazyWrapper.prototype.takeRightWhile = function (predicate) { + return this.reverse().takeWhile(predicate).reverse(); + }; + + LazyWrapper.prototype.toArray = function () { + return this.take(MAX_ARRAY_LENGTH); + }; + + // Add `LazyWrapper` methods to `lodash.prototype`. + baseForOwn(LazyWrapper.prototype, function (func, methodName) { + var checkIteratee = /^(?:filter|find|map|reject)|While$/.test(methodName), + isTaker = /^(?:head|last)$/.test(methodName), + lodashFunc = lodash[isTaker ? 'take' + (methodName == 'last' ? 'Right' : '') : methodName], + retUnwrapped = isTaker || /^find/.test(methodName); + + if (!lodashFunc) { + return; + } + lodash.prototype[methodName] = function () { + var value = this.__wrapped__, + args = isTaker ? [1] : arguments, + isLazy = value instanceof LazyWrapper, + iteratee = args[0], + useLazy = isLazy || isArray(value); + + var interceptor = function (value) { + var result = lodashFunc.apply(lodash, arrayPush([value], args)); + return isTaker && chainAll ? result[0] : result; + }; + + if (useLazy && checkIteratee && typeof iteratee == 'function' && iteratee.length != 1) { + // Avoid lazy use if the iteratee has a "length" value other than `1`. + isLazy = useLazy = false; + } + var chainAll = this.__chain__, + isHybrid = !!this.__actions__.length, + isUnwrapped = retUnwrapped && !chainAll, + onlyLazy = isLazy && !isHybrid; + + if (!retUnwrapped && useLazy) { + value = onlyLazy ? value : new LazyWrapper(this); + var result = func.apply(value, args); + result.__actions__.push({ func: thru, args: [interceptor], thisArg: undefined }); + return new LodashWrapper(result, chainAll); + } + if (isUnwrapped && onlyLazy) { + return func.apply(this, args); + } + result = this.thru(interceptor); + return isUnwrapped ? (isTaker ? result.value()[0] : result.value()) : result; + }; + }); + + // Add `Array` methods to `lodash.prototype`. + arrayEach(['pop', 'push', 'shift', 'sort', 'splice', 'unshift'], function (methodName) { + var func = arrayProto[methodName], + chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru', + retUnwrapped = /^(?:pop|shift)$/.test(methodName); + + lodash.prototype[methodName] = function () { + var args = arguments; + if (retUnwrapped && !this.__chain__) { + var value = this.value(); + return func.apply(isArray(value) ? value : [], args); + } + return this[chainName](function (value) { + return func.apply(isArray(value) ? value : [], args); + }); + }; + }); + + // Map minified method names to their real names. + baseForOwn(LazyWrapper.prototype, function (func, methodName) { + var lodashFunc = lodash[methodName]; + if (lodashFunc) { + var key = lodashFunc.name + ''; + if (!hasOwnProperty.call(realNames, key)) { + realNames[key] = []; + } + realNames[key].push({ name: methodName, func: lodashFunc }); + } + }); + + realNames[createHybrid(undefined, WRAP_BIND_KEY_FLAG).name] = [ + { + name: 'wrapper', + func: undefined, + }, + ]; + + // Add methods to `LazyWrapper`. + LazyWrapper.prototype.clone = lazyClone; + LazyWrapper.prototype.reverse = lazyReverse; + LazyWrapper.prototype.value = lazyValue; + + // Add chain sequence methods to the `lodash` wrapper. + lodash.prototype.at = wrapperAt; + lodash.prototype.chain = wrapperChain; + lodash.prototype.commit = wrapperCommit; + lodash.prototype.next = wrapperNext; + lodash.prototype.plant = wrapperPlant; + lodash.prototype.reverse = wrapperReverse; + lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue; + + // Add lazy aliases. + lodash.prototype.first = lodash.prototype.head; + + if (symIterator) { + lodash.prototype[symIterator] = wrapperToIterator; + } + return lodash; + }; + + /*--------------------------------------------------------------------------*/ + + // Export lodash. + var _ = runInContext(); + + // Some AMD build optimizers, like r.js, check for condition patterns like: + if (true) { + // Expose Lodash on the global object to prevent errors when Lodash is + // loaded by a script tag in the presence of an AMD loader. + // See http://requirejs.org/docs/errors.html#mismatch for more details. + // Use `_.noConflict` to remove Lodash from the global object. + root._ = _; + + // Define as an anonymous module so, through path mapping, it can be + // referenced as the "underscore" module. + !((__WEBPACK_AMD_DEFINE_RESULT__ = function () { + return _; + }.call(exports, __webpack_require__, exports, module)), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } + // Check for `exports` after `define` in case a build optimizer adds it. + else if (freeModule) { + // Export for Node.js. + (freeModule.exports = _)._ = _; + // Export for CommonJS support. + freeExports._ = _; + } else { + // Export to the global object. + root._ = _; + } + }).call(this); + + /* WEBPACK VAR INJECTION */ + }).call(exports, __webpack_require__(38), __webpack_require__(239)(module)); + + /***/ + }, + /* 543 */ + /***/ function (module, exports) { + module.exports = { + brightColor: 'HelloWorld__brightColor__1M8yw', + }; + + /***/ + }, + /* 544 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(10); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_create_react_class__ = __webpack_require__(37); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_create_react_class___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_create_react_class__); + /* eslint-disable react/prefer-es6-class */ + + // Super simple example of React component using React.createClass + var HelloWorldES5 = __WEBPACK_IMPORTED_MODULE_2_create_react_class___default()({ + displayName: 'HelloWorldES5', + + propTypes: { + helloWorldData: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object, + }, + + getInitialState: function getInitialState() { + return this.props.helloWorldData; + }, + setNameDomRef: function setNameDomRef(nameDomNode) { + this.nameDomRef = nameDomNode; + }, + handleChange: function handleChange() { + var name = this.nameDomRef.value; + this.setState({ name: name }); + }, + render: function render() { + var name = this.state.name; + + return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'div', + null, + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('h3', null, 'Hello ES5, ', name, '!'), + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'p', + null, + 'Say hello to:', + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('input', { + type: 'text', + ref: this.setNameDomRef, + defaultValue: name, + onChange: this.handleChange, + }), + ), + ); + }, + }); + + var _default = HelloWorldES5; + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + HelloWorldES5, + 'HelloWorldES5', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/HelloWorldES5.jsx', + ); + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/HelloWorldES5.jsx', + ); + })(); + + /***/ + }, + /* 545 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + */ + + var _assign = __webpack_require__(64); + + var emptyObject = __webpack_require__(546); + var _invariant = __webpack_require__(547); + + if (true) { + var warning = __webpack_require__(548); + } + + var MIXINS_KEY = 'mixins'; + + // Helper function to allow the creation of anonymous functions which do not + // have .name set to the name of the variable being assigned to. + function identity(fn) { + return fn; + } + + var ReactPropTypeLocationNames; + if (true) { + ReactPropTypeLocationNames = { + prop: 'prop', + context: 'context', + childContext: 'child context', + }; + } else { + ReactPropTypeLocationNames = {}; + } + + function factory(ReactComponent, isValidElement, ReactNoopUpdateQueue) { + /** + * Policies that describe methods in `ReactClassInterface`. + */ + + var injectedMixins = []; + + /** + * Composite components are higher-level components that compose other composite + * or host components. + * + * To create a new type of `ReactClass`, pass a specification of + * your new class to `React.createClass`. The only requirement of your class + * specification is that you implement a `render` method. + * + * var MyComponent = React.createClass({ + * render: function() { + * return <div>Hello World</div>; + * } + * }); + * + * The class specification supports a specific protocol of methods that have + * special meaning (e.g. `render`). See `ReactClassInterface` for + * more the comprehensive protocol. Any other properties and methods in the + * class specification will be available on the prototype. + * + * @interface ReactClassInterface + * @internal + */ + var ReactClassInterface = { + /** + * An array of Mixin objects to include when defining your component. + * + * @type {array} + * @optional + */ + mixins: 'DEFINE_MANY', + + /** + * An object containing properties and methods that should be defined on + * the component's constructor instead of its prototype (static methods). + * + * @type {object} + * @optional + */ + statics: 'DEFINE_MANY', + + /** + * Definition of prop types for this component. + * + * @type {object} + * @optional + */ + propTypes: 'DEFINE_MANY', + + /** + * Definition of context types for this component. + * + * @type {object} + * @optional + */ + contextTypes: 'DEFINE_MANY', + + /** + * Definition of context types this component sets for its children. + * + * @type {object} + * @optional + */ + childContextTypes: 'DEFINE_MANY', + + // ==== Definition methods ==== + + /** + * Invoked when the component is mounted. Values in the mapping will be set on + * `this.props` if that prop is not specified (i.e. using an `in` check). + * + * This method is invoked before `getInitialState` and therefore cannot rely + * on `this.state` or use `this.setState`. + * + * @return {object} + * @optional + */ + getDefaultProps: 'DEFINE_MANY_MERGED', + + /** + * Invoked once before the component is mounted. The return value will be used + * as the initial value of `this.state`. + * + * getInitialState: function() { + * return { + * isOn: false, + * fooBaz: new BazFoo() + * } + * } + * + * @return {object} + * @optional + */ + getInitialState: 'DEFINE_MANY_MERGED', + + /** + * @return {object} + * @optional + */ + getChildContext: 'DEFINE_MANY_MERGED', + + /** + * Uses props from `this.props` and state from `this.state` to render the + * structure of the component. + * + * No guarantees are made about when or how often this method is invoked, so + * it must not have side effects. + * + * render: function() { + * var name = this.props.name; + * return <div>Hello, {name}!</div>; + * } + * + * @return {ReactComponent} + * @required + */ + render: 'DEFINE_ONCE', + + // ==== Delegate methods ==== + + /** + * Invoked when the component is initially created and about to be mounted. + * This may have side effects, but any external subscriptions or data created + * by this method must be cleaned up in `componentWillUnmount`. + * + * @optional + */ + componentWillMount: 'DEFINE_MANY', + + /** + * Invoked when the component has been mounted and has a DOM representation. + * However, there is no guarantee that the DOM node is in the document. + * + * Use this as an opportunity to operate on the DOM when the component has + * been mounted (initialized and rendered) for the first time. + * + * @param {DOMElement} rootNode DOM element representing the component. + * @optional + */ + componentDidMount: 'DEFINE_MANY', + + /** + * Invoked before the component receives new props. + * + * Use this as an opportunity to react to a prop transition by updating the + * state using `this.setState`. Current props are accessed via `this.props`. + * + * componentWillReceiveProps: function(nextProps, nextContext) { + * this.setState({ + * likesIncreasing: nextProps.likeCount > this.props.likeCount + * }); + * } + * + * NOTE: There is no equivalent `componentWillReceiveState`. An incoming prop + * transition may cause a state change, but the opposite is not true. If you + * need it, you are probably looking for `componentWillUpdate`. + * + * @param {object} nextProps + * @optional + */ + componentWillReceiveProps: 'DEFINE_MANY', + + /** + * Invoked while deciding if the component should be updated as a result of + * receiving new props, state and/or context. + * + * Use this as an opportunity to `return false` when you're certain that the + * transition to the new props/state/context will not require a component + * update. + * + * shouldComponentUpdate: function(nextProps, nextState, nextContext) { + * return !equal(nextProps, this.props) || + * !equal(nextState, this.state) || + * !equal(nextContext, this.context); + * } + * + * @param {object} nextProps + * @param {?object} nextState + * @param {?object} nextContext + * @return {boolean} True if the component should update. + * @optional + */ + shouldComponentUpdate: 'DEFINE_ONCE', + + /** + * Invoked when the component is about to update due to a transition from + * `this.props`, `this.state` and `this.context` to `nextProps`, `nextState` + * and `nextContext`. + * + * Use this as an opportunity to perform preparation before an update occurs. + * + * NOTE: You **cannot** use `this.setState()` in this method. + * + * @param {object} nextProps + * @param {?object} nextState + * @param {?object} nextContext + * @param {ReactReconcileTransaction} transaction + * @optional + */ + componentWillUpdate: 'DEFINE_MANY', + + /** + * Invoked when the component's DOM representation has been updated. + * + * Use this as an opportunity to operate on the DOM when the component has + * been updated. + * + * @param {object} prevProps + * @param {?object} prevState + * @param {?object} prevContext + * @param {DOMElement} rootNode DOM element representing the component. + * @optional + */ + componentDidUpdate: 'DEFINE_MANY', + + /** + * Invoked when the component is about to be removed from its parent and have + * its DOM representation destroyed. + * + * Use this as an opportunity to deallocate any external resources. + * + * NOTE: There is no `componentDidUnmount` since your component will have been + * destroyed by that point. + * + * @optional + */ + componentWillUnmount: 'DEFINE_MANY', + + /** + * Replacement for (deprecated) `componentWillMount`. + * + * @optional + */ + UNSAFE_componentWillMount: 'DEFINE_MANY', + + /** + * Replacement for (deprecated) `componentWillReceiveProps`. + * + * @optional + */ + UNSAFE_componentWillReceiveProps: 'DEFINE_MANY', + + /** + * Replacement for (deprecated) `componentWillUpdate`. + * + * @optional + */ + UNSAFE_componentWillUpdate: 'DEFINE_MANY', + + // ==== Advanced methods ==== + + /** + * Updates the component's currently mounted DOM representation. + * + * By default, this implements React's rendering and reconciliation algorithm. + * Sophisticated clients may wish to override this. + * + * @param {ReactReconcileTransaction} transaction + * @internal + * @overridable + */ + updateComponent: 'OVERRIDE_BASE', + }; + + /** + * Similar to ReactClassInterface but for static methods. + */ + var ReactClassStaticInterface = { + /** + * This method is invoked after a component is instantiated and when it + * receives new props. Return an object to update state in response to + * prop changes. Return null to indicate no change to state. + * + * If an object is returned, its keys will be merged into the existing state. + * + * @return {object || null} + * @optional + */ + getDerivedStateFromProps: 'DEFINE_MANY_MERGED', + }; + + /** + * Mapping from class specification keys to special processing functions. + * + * Although these are declared like instance properties in the specification + * when defining classes using `React.createClass`, they are actually static + * and are accessible on the constructor instead of the prototype. Despite + * being static, they must be defined outside of the "statics" key under + * which all other static methods are defined. + */ + var RESERVED_SPEC_KEYS = { + displayName: function (Constructor, displayName) { + Constructor.displayName = displayName; + }, + mixins: function (Constructor, mixins) { + if (mixins) { + for (var i = 0; i < mixins.length; i++) { + mixSpecIntoComponent(Constructor, mixins[i]); + } + } + }, + childContextTypes: function (Constructor, childContextTypes) { + if (true) { + validateTypeDef(Constructor, childContextTypes, 'childContext'); + } + Constructor.childContextTypes = _assign({}, Constructor.childContextTypes, childContextTypes); + }, + contextTypes: function (Constructor, contextTypes) { + if (true) { + validateTypeDef(Constructor, contextTypes, 'context'); + } + Constructor.contextTypes = _assign({}, Constructor.contextTypes, contextTypes); + }, + /** + * Special case getDefaultProps which should move into statics but requires + * automatic merging. + */ + getDefaultProps: function (Constructor, getDefaultProps) { + if (Constructor.getDefaultProps) { + Constructor.getDefaultProps = createMergedResultFunction( + Constructor.getDefaultProps, + getDefaultProps, + ); + } else { + Constructor.getDefaultProps = getDefaultProps; + } + }, + propTypes: function (Constructor, propTypes) { + if (true) { + validateTypeDef(Constructor, propTypes, 'prop'); + } + Constructor.propTypes = _assign({}, Constructor.propTypes, propTypes); + }, + statics: function (Constructor, statics) { + mixStaticSpecIntoComponent(Constructor, statics); + }, + autobind: function () {}, + }; + + function validateTypeDef(Constructor, typeDef, location) { + for (var propName in typeDef) { + if (typeDef.hasOwnProperty(propName)) { + // use a warning instead of an _invariant so components + // don't show up in prod but only in __DEV__ + if (true) { + warning( + typeof typeDef[propName] === 'function', + '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', + Constructor.displayName || 'ReactClass', + ReactPropTypeLocationNames[location], + propName, + ); + } + } + } + } + + function validateMethodOverride(isAlreadyDefined, name) { + var specPolicy = ReactClassInterface.hasOwnProperty(name) ? ReactClassInterface[name] : null; + + // Disallow overriding of base class methods unless explicitly allowed. + if (ReactClassMixin.hasOwnProperty(name)) { + _invariant( + specPolicy === 'OVERRIDE_BASE', + 'ReactClassInterface: You are attempting to override ' + + '`%s` from your class specification. Ensure that your method names ' + + 'do not overlap with React methods.', + name, + ); + } + + // Disallow defining methods more than once unless explicitly allowed. + if (isAlreadyDefined) { + _invariant( + specPolicy === 'DEFINE_MANY' || specPolicy === 'DEFINE_MANY_MERGED', + 'ReactClassInterface: You are attempting to define ' + + '`%s` on your component more than once. This conflict may be due ' + + 'to a mixin.', + name, + ); + } + } + + /** + * Mixin helper which handles policy validation and reserved + * specification keys when building React classes. + */ + function mixSpecIntoComponent(Constructor, spec) { + if (!spec) { + if (true) { + var typeofSpec = typeof spec; + var isMixinValid = typeofSpec === 'object' && spec !== null; + + if (true) { + warning( + isMixinValid, + "%s: You're attempting to include a mixin that is either null " + + 'or not an object. Check the mixins included by the component, ' + + 'as well as any mixins they include themselves. ' + + 'Expected object but got %s.', + Constructor.displayName || 'ReactClass', + spec === null ? null : typeofSpec, + ); + } + } + + return; + } + + _invariant( + typeof spec !== 'function', + "ReactClass: You're attempting to " + + 'use a component class or function as a mixin. Instead, just use a ' + + 'regular object.', + ); + _invariant( + !isValidElement(spec), + "ReactClass: You're attempting to " + + 'use a component as a mixin. Instead, just use a regular object.', + ); + + var proto = Constructor.prototype; + var autoBindPairs = proto.__reactAutoBindPairs; + + // By handling mixins before any other properties, we ensure the same + // chaining order is applied to methods with DEFINE_MANY policy, whether + // mixins are listed before or after these methods in the spec. + if (spec.hasOwnProperty(MIXINS_KEY)) { + RESERVED_SPEC_KEYS.mixins(Constructor, spec.mixins); + } + + for (var name in spec) { + if (!spec.hasOwnProperty(name)) { + continue; + } + + if (name === MIXINS_KEY) { + // We have already handled mixins in a special case above. + continue; + } + + var property = spec[name]; + var isAlreadyDefined = proto.hasOwnProperty(name); + validateMethodOverride(isAlreadyDefined, name); + + if (RESERVED_SPEC_KEYS.hasOwnProperty(name)) { + RESERVED_SPEC_KEYS[name](Constructor, property); + } else { + // Setup methods on prototype: + // The following member methods should not be automatically bound: + // 1. Expected ReactClass methods (in the "interface"). + // 2. Overridden methods (that were mixed in). + var isReactClassMethod = ReactClassInterface.hasOwnProperty(name); + var isFunction = typeof property === 'function'; + var shouldAutoBind = + isFunction && !isReactClassMethod && !isAlreadyDefined && spec.autobind !== false; + + if (shouldAutoBind) { + autoBindPairs.push(name, property); + proto[name] = property; + } else { + if (isAlreadyDefined) { + var specPolicy = ReactClassInterface[name]; + + // These cases should already be caught by validateMethodOverride. + _invariant( + isReactClassMethod && + (specPolicy === 'DEFINE_MANY_MERGED' || specPolicy === 'DEFINE_MANY'), + 'ReactClass: Unexpected spec policy %s for key %s ' + 'when mixing in component specs.', + specPolicy, + name, + ); + + // For methods which are defined more than once, call the existing + // methods before calling the new property, merging if appropriate. + if (specPolicy === 'DEFINE_MANY_MERGED') { + proto[name] = createMergedResultFunction(proto[name], property); + } else if (specPolicy === 'DEFINE_MANY') { + proto[name] = createChainedFunction(proto[name], property); + } + } else { + proto[name] = property; + if (true) { + // Add verbose displayName to the function, which helps when looking + // at profiling tools. + if (typeof property === 'function' && spec.displayName) { + proto[name].displayName = spec.displayName + '_' + name; + } + } + } + } + } + } + } + + function mixStaticSpecIntoComponent(Constructor, statics) { + if (!statics) { + return; + } + + for (var name in statics) { + var property = statics[name]; + if (!statics.hasOwnProperty(name)) { + continue; + } + + var isReserved = name in RESERVED_SPEC_KEYS; + _invariant( + !isReserved, + 'ReactClass: You are attempting to define a reserved ' + + 'property, `%s`, that shouldn\'t be on the "statics" key. Define it ' + + 'as an instance property instead; it will still be accessible on the ' + + 'constructor.', + name, + ); + + var isAlreadyDefined = name in Constructor; + if (isAlreadyDefined) { + var specPolicy = ReactClassStaticInterface.hasOwnProperty(name) + ? ReactClassStaticInterface[name] + : null; + + _invariant( + specPolicy === 'DEFINE_MANY_MERGED', + 'ReactClass: You are attempting to define ' + + '`%s` on your component more than once. This conflict may be ' + + 'due to a mixin.', + name, + ); + + Constructor[name] = createMergedResultFunction(Constructor[name], property); + + return; + } + + Constructor[name] = property; + } + } + + /** + * Merge two objects, but throw if both contain the same key. + * + * @param {object} one The first object, which is mutated. + * @param {object} two The second object + * @return {object} one after it has been mutated to contain everything in two. + */ + function mergeIntoWithNoDuplicateKeys(one, two) { + _invariant( + one && two && typeof one === 'object' && typeof two === 'object', + 'mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.', + ); + + for (var key in two) { + if (two.hasOwnProperty(key)) { + _invariant( + one[key] === undefined, + 'mergeIntoWithNoDuplicateKeys(): ' + + 'Tried to merge two objects with the same key: `%s`. This conflict ' + + 'may be due to a mixin; in particular, this may be caused by two ' + + 'getInitialState() or getDefaultProps() methods returning objects ' + + 'with clashing keys.', + key, + ); + one[key] = two[key]; + } + } + return one; + } + + /** + * Creates a function that invokes two functions and merges their return values. + * + * @param {function} one Function to invoke first. + * @param {function} two Function to invoke second. + * @return {function} Function that invokes the two argument functions. + * @private + */ + function createMergedResultFunction(one, two) { + return function mergedResult() { + var a = one.apply(this, arguments); + var b = two.apply(this, arguments); + if (a == null) { + return b; + } else if (b == null) { + return a; + } + var c = {}; + mergeIntoWithNoDuplicateKeys(c, a); + mergeIntoWithNoDuplicateKeys(c, b); + return c; + }; + } + + /** + * Creates a function that invokes two functions and ignores their return vales. + * + * @param {function} one Function to invoke first. + * @param {function} two Function to invoke second. + * @return {function} Function that invokes the two argument functions. + * @private + */ + function createChainedFunction(one, two) { + return function chainedFunction() { + one.apply(this, arguments); + two.apply(this, arguments); + }; + } + + /** + * Binds a method to the component. + * + * @param {object} component Component whose method is going to be bound. + * @param {function} method Method to be bound. + * @return {function} The bound method. + */ + function bindAutoBindMethod(component, method) { + var boundMethod = method.bind(component); + if (true) { + boundMethod.__reactBoundContext = component; + boundMethod.__reactBoundMethod = method; + boundMethod.__reactBoundArguments = null; + var componentName = component.constructor.displayName; + var _bind = boundMethod.bind; + boundMethod.bind = function (newThis) { + for ( + var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; + _key < _len; + _key++ + ) { + args[_key - 1] = arguments[_key]; + } + + // User is trying to bind() an autobound method; we effectively will + // ignore the value of "this" that the user is trying to use, so + // let's warn. + if (newThis !== component && newThis !== null) { + if (true) { + warning( + false, + 'bind(): React component methods may only be bound to the ' + + 'component instance. See %s', + componentName, + ); + } + } else if (!args.length) { + if (true) { + warning( + false, + 'bind(): You are binding a component method to the component. ' + + 'React does this for you automatically in a high-performance ' + + 'way, so you can safely remove this call. See %s', + componentName, + ); + } + return boundMethod; + } + var reboundMethod = _bind.apply(boundMethod, arguments); + reboundMethod.__reactBoundContext = component; + reboundMethod.__reactBoundMethod = method; + reboundMethod.__reactBoundArguments = args; + return reboundMethod; + }; + } + return boundMethod; + } + + /** + * Binds all auto-bound methods in a component. + * + * @param {object} component Component whose method is going to be bound. + */ + function bindAutoBindMethods(component) { + var pairs = component.__reactAutoBindPairs; + for (var i = 0; i < pairs.length; i += 2) { + var autoBindKey = pairs[i]; + var method = pairs[i + 1]; + component[autoBindKey] = bindAutoBindMethod(component, method); + } + } + + var IsMountedPreMixin = { + componentDidMount: function () { + this.__isMounted = true; + }, + }; + + var IsMountedPostMixin = { + componentWillUnmount: function () { + this.__isMounted = false; + }, + }; + + /** + * Add more to the ReactClass base class. These are all legacy features and + * therefore not already part of the modern ReactComponent. + */ + var ReactClassMixin = { + /** + * TODO: This will be deprecated because state should always keep a consistent + * type signature and the only use case for this, is to avoid that. + */ + replaceState: function (newState, callback) { + this.updater.enqueueReplaceState(this, newState, callback); + }, + + /** + * Checks whether or not this composite component is mounted. + * @return {boolean} True if mounted, false otherwise. + * @protected + * @final + */ + isMounted: function () { + if (true) { + warning( + this.__didWarnIsMounted, + '%s: isMounted is deprecated. Instead, make sure to clean up ' + + 'subscriptions and pending requests in componentWillUnmount to ' + + 'prevent memory leaks.', + (this.constructor && this.constructor.displayName) || this.name || 'Component', + ); + this.__didWarnIsMounted = true; + } + return !!this.__isMounted; + }, + }; + + var ReactClassComponent = function () {}; + _assign(ReactClassComponent.prototype, ReactComponent.prototype, ReactClassMixin); + + /** + * Creates a composite component class given a class specification. + * See https://facebook.github.io/react/docs/top-level-api.html#react.createclass + * + * @param {object} spec Class specification (which must define `render`). + * @return {function} Component constructor function. + * @public + */ + function createClass(spec) { + // To keep our warnings more understandable, we'll use a little hack here to + // ensure that Constructor.name !== 'Constructor'. This makes sure we don't + // unnecessarily identify a class without displayName as 'Constructor'. + var Constructor = identity(function (props, context, updater) { + // This constructor gets overridden by mocks. The argument is used + // by mocks to assert on what gets mounted. + + if (true) { + warning( + this instanceof Constructor, + 'Something is calling a React component directly. Use a factory or ' + + 'JSX instead. See: https://fb.me/react-legacyfactory', + ); + } + + // Wire up auto-binding + if (this.__reactAutoBindPairs.length) { + bindAutoBindMethods(this); + } + + this.props = props; + this.context = context; + this.refs = emptyObject; + this.updater = updater || ReactNoopUpdateQueue; + + this.state = null; + + // ReactClasses doesn't have constructors. Instead, they use the + // getInitialState and componentWillMount methods for initialization. + + var initialState = this.getInitialState ? this.getInitialState() : null; + if (true) { + // We allow auto-mocks to proceed as if they're returning null. + if (initialState === undefined && this.getInitialState._isMockFunction) { + // This is probably bad practice. Consider warning here and + // deprecating this convenience. + initialState = null; + } + } + _invariant( + typeof initialState === 'object' && !Array.isArray(initialState), + '%s.getInitialState(): must return an object or null', + Constructor.displayName || 'ReactCompositeComponent', + ); + + this.state = initialState; + }); + Constructor.prototype = new ReactClassComponent(); + Constructor.prototype.constructor = Constructor; + Constructor.prototype.__reactAutoBindPairs = []; + + injectedMixins.forEach(mixSpecIntoComponent.bind(null, Constructor)); + + mixSpecIntoComponent(Constructor, IsMountedPreMixin); + mixSpecIntoComponent(Constructor, spec); + mixSpecIntoComponent(Constructor, IsMountedPostMixin); + + // Initialize the defaultProps property after all mixins have been merged. + if (Constructor.getDefaultProps) { + Constructor.defaultProps = Constructor.getDefaultProps(); + } + + if (true) { + // This is a tag to indicate that the use of these method names is ok, + // since it's used with createClass. If it's not, then it's likely a + // mistake so we'll warn you to use the static property, property + // initializer or constructor respectively. + if (Constructor.getDefaultProps) { + Constructor.getDefaultProps.isReactClassApproved = {}; + } + if (Constructor.prototype.getInitialState) { + Constructor.prototype.getInitialState.isReactClassApproved = {}; + } + } + + _invariant( + Constructor.prototype.render, + 'createClass(...): Class specification must implement a `render` method.', + ); + + if (true) { + warning( + !Constructor.prototype.componentShouldUpdate, + '%s has a method called ' + + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + + 'The name is phrased as a question because the function is ' + + 'expected to return a value.', + spec.displayName || 'A component', + ); + warning( + !Constructor.prototype.componentWillRecieveProps, + '%s has a method called ' + + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', + spec.displayName || 'A component', + ); + warning( + !Constructor.prototype.UNSAFE_componentWillRecieveProps, + '%s has a method called UNSAFE_componentWillRecieveProps(). ' + + 'Did you mean UNSAFE_componentWillReceiveProps()?', + spec.displayName || 'A component', + ); + } + + // Reduce time spent doing lookups by setting these on the prototype. + for (var methodName in ReactClassInterface) { + if (!Constructor.prototype[methodName]) { + Constructor.prototype[methodName] = null; + } + } + + return Constructor; + } + + return createClass; + } + + module.exports = factory; + + /***/ + }, + /* 546 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + */ + + var emptyObject = {}; + + if (true) { + Object.freeze(emptyObject); + } + + module.exports = emptyObject; + + /***/ + }, + /* 547 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + */ + + /** + * Use invariant() to assert state which your program assumes to be true. + * + * Provide sprintf-style format (only %s is supported) and arguments + * to provide information about what broke and what you were + * expecting. + * + * The invariant message will be stripped in production, but the invariant + * will remain to ensure logic does not differ in production. + */ + + var validateFormat = function validateFormat(format) {}; + + if (true) { + validateFormat = function validateFormat(format) { + if (format === undefined) { + throw new Error('invariant requires an error message argument'); + } + }; + } + + function invariant(condition, format, a, b, c, d, e, f) { + validateFormat(format); + + if (!condition) { + var error; + if (format === undefined) { + error = new Error( + 'Minified exception occurred; use the non-minified dev environment ' + + 'for the full error message and additional helpful warnings.', + ); + } else { + var args = [a, b, c, d, e, f]; + var argIndex = 0; + error = new Error( + format.replace(/%s/g, function () { + return args[argIndex++]; + }), + ); + error.name = 'Invariant Violation'; + } + + error.framesToPop = 1; // we don't care about invariant's own frame + throw error; + } + } + + module.exports = invariant; + + /***/ + }, + /* 548 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright (c) 2014-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + */ + + var emptyFunction = __webpack_require__(549); + + /** + * Similar to invariant but only logs a warning if the condition is not met. + * This can be used to log issues in development environments in critical + * paths. Removing the logging code for production environments will keep the + * same logic and follow the same code paths. + */ + + var warning = emptyFunction; + + if (true) { + var printWarning = function printWarning(format) { + for ( + var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; + _key < _len; + _key++ + ) { + args[_key - 1] = arguments[_key]; + } + + var argIndex = 0; + var message = + 'Warning: ' + + format.replace(/%s/g, function () { + return args[argIndex++]; + }); + if (typeof console !== 'undefined') { + console.error(message); + } + try { + // --- Welcome to debugging React --- + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + throw new Error(message); + } catch (x) {} + }; + + warning = function warning(condition, format) { + if (format === undefined) { + throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument'); + } + + if (format.indexOf('Failed Composite propType: ') === 0) { + return; // Ignore CompositeComponent proptype check. + } + + if (!condition) { + for ( + var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; + _key2 < _len2; + _key2++ + ) { + args[_key2 - 2] = arguments[_key2]; + } + + printWarning.apply(undefined, [format].concat(args)); + } + }; + } + + module.exports = warning; + + /***/ + }, + /* 549 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + /** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * + */ + + function makeEmptyFunction(arg) { + return function () { + return arg; + }; + } + + /** + * This function accepts and discards inputs; it has no side effects. This is + * primarily useful idiomatically for overridable function endpoints which + * always need to be callable, since JS lacks a null-call idiom ala Cocoa. + */ + var emptyFunction = function emptyFunction() {}; + + emptyFunction.thatReturns = makeEmptyFunction; + emptyFunction.thatReturnsFalse = makeEmptyFunction(false); + emptyFunction.thatReturnsTrue = makeEmptyFunction(true); + emptyFunction.thatReturnsNull = makeEmptyFunction(null); + emptyFunction.thatReturnsThis = function () { + return this; + }; + emptyFunction.thatReturnsArgument = function (arg) { + return arg; + }; + + module.exports = emptyFunction; + + /***/ + }, + /* 550 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + /* eslint-disable no-unused-vars */ + + // Example of logging and throw error handling + + var HelloWorldWithLogAndThrow = function HelloWorldWithLogAndThrow(props, context) { + /* eslint-disable no-console */ + console.log('console.log in HelloWorld'); + console.warn('console.warn in HelloWorld'); + console.error('console.error in HelloWorld'); + throw new Error('throw in HelloWorldWithLogAndThrow'); + }; + + var _default = HelloWorldWithLogAndThrow; + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + HelloWorldWithLogAndThrow, + 'HelloWorldWithLogAndThrow', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/HelloWorldWithLogAndThrow.jsx', + ); + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/HelloWorldWithLogAndThrow.jsx', + ); + })(); + + /***/ + }, + /* 551 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__components_HelloWorld__ = + __webpack_require__(162); + // Top level component for simple client side only rendering + + /* + * Export a function that takes the props and returns a ReactComponent. + * This is used for the client rendering hook after the page html is rendered. + * React will see that the state is the same and not do anything. + * Note, this is imported as "HelloWorldApp" by "clientRegistration.jsx" + * + * Note, this is a fictional example, as you'd only use a generator function if you wanted to run + * some extra code, such as setting up Redux and React-Router. + */ + + var _default = function _default(props) { + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_1__components_HelloWorld__['a' /* default */], + props, + ); + }; + + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/startup/HelloWorldApp.jsx', + ); + })(); + + /***/ + }, + /* 552 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + // Top level component for simple client side only rendering + + /* + * Just an example of what can go wrong while coding. No import. Whoops! + */ + + var _default = function _default(props) { + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(HelloWorld, props); + }; + + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/startup/BrokenApp.jsx', + ); + })(); + + /***/ + }, + /* 553 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_redux__ = __webpack_require__(110); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_redux__ = __webpack_require__(163); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_redux_thunk__ = __webpack_require__(250); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__reducers_reducersIndex__ = + __webpack_require__(251); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__store_composeInitialState__ = + __webpack_require__(582); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__components_HelloWorldContainer__ = + __webpack_require__(253); + // This is loaded by execJs and Rails to generate the HTML used for server rendering. + // Compare this file to ./ClientApp.jsx + // This module should export one default method that take props and returns the react component to + // render. + + // Uses the index + + /* + * Export a function that takes the props and returns a ReactComponent. + * This is used for the server rendering. + * In the client, React will see that the state is the same and not do anything. + */ + + var _default = function _default(props, railsContext) { + var combinedReducer = Object(__WEBPACK_IMPORTED_MODULE_1_redux__['c' /* combineReducers */])( + __WEBPACK_IMPORTED_MODULE_4__reducers_reducersIndex__['a' /* default */], + ); + var combinedProps = Object( + __WEBPACK_IMPORTED_MODULE_5__store_composeInitialState__['a' /* default */], + )(props, railsContext); + + // This is where we'll put in the middleware for the async function. Placeholder. + // store will have helloWorldData as a top level property + var store = Object(__WEBPACK_IMPORTED_MODULE_1_redux__['a' /* applyMiddleware */])( + __WEBPACK_IMPORTED_MODULE_3_redux_thunk__['a' /* default */], + )(__WEBPACK_IMPORTED_MODULE_1_redux__['d' /* createStore */])(combinedReducer, combinedProps); + + // Provider uses the this.props.children, so we're not typical React syntax. + // This allows redux to add additional props to the HelloWorldContainer. + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_2_react_redux__['a' /* Provider */], + { store: store }, + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_6__components_HelloWorldContainer__['a' /* default */], + null, + ), + ); + }; + + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/startup/ServerReduxApp.jsx', + ); + })(); + + /***/ + }, + /* 554 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Symbol_js__ = __webpack_require__(242); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getRawTag_js__ = __webpack_require__(557); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__objectToString_js__ = __webpack_require__(558); + + /** `Object#toString` result references. */ + var nullTag = '[object Null]', + undefinedTag = '[object Undefined]'; + + /** Built-in value references. */ + var symToStringTag = __WEBPACK_IMPORTED_MODULE_0__Symbol_js__['a' /* default */] + ? __WEBPACK_IMPORTED_MODULE_0__Symbol_js__['a' /* default */].toStringTag + : undefined; + + /** + * The base implementation of `getTag` without fallbacks for buggy environments. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ + function baseGetTag(value) { + if (value == null) { + return value === undefined ? undefinedTag : nullTag; + } + return symToStringTag && symToStringTag in Object(value) + ? Object(__WEBPACK_IMPORTED_MODULE_1__getRawTag_js__['a' /* default */])(value) + : Object(__WEBPACK_IMPORTED_MODULE_2__objectToString_js__['a' /* default */])(value); + } + + /* harmony default export */ __webpack_exports__['a'] = baseGetTag; + + /***/ + }, + /* 555 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__freeGlobal_js__ = __webpack_require__(556); + + /** Detect free variable `self`. */ + var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + + /** Used as a reference to the global object. */ + var root = + __WEBPACK_IMPORTED_MODULE_0__freeGlobal_js__['a' /* default */] || + freeSelf || + Function('return this')(); + + /* harmony default export */ __webpack_exports__['a'] = root; + + /***/ + }, + /* 556 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (global) { + /** Detect free variable `global` from Node.js. */ + var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + + /* harmony default export */ __webpack_exports__['a'] = freeGlobal; + + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(38)); + + /***/ + }, + /* 557 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Symbol_js__ = __webpack_require__(242); + + /** Used for built-in method references. */ + var objectProto = Object.prototype; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ + var nativeObjectToString = objectProto.toString; + + /** Built-in value references. */ + var symToStringTag = __WEBPACK_IMPORTED_MODULE_0__Symbol_js__['a' /* default */] + ? __WEBPACK_IMPORTED_MODULE_0__Symbol_js__['a' /* default */].toStringTag + : undefined; + + /** + * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the raw `toStringTag`. + */ + function getRawTag(value) { + var isOwn = hasOwnProperty.call(value, symToStringTag), + tag = value[symToStringTag]; + + try { + value[symToStringTag] = undefined; + var unmasked = true; + } catch (e) {} + + var result = nativeObjectToString.call(value); + if (unmasked) { + if (isOwn) { + value[symToStringTag] = tag; + } else { + delete value[symToStringTag]; + } + } + return result; + } + + /* harmony default export */ __webpack_exports__['a'] = getRawTag; + + /***/ + }, + /* 558 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /** Used for built-in method references. */ + var objectProto = Object.prototype; + + /** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ + var nativeObjectToString = objectProto.toString; + + /** + * Converts `value` to a string using `Object.prototype.toString`. + * + * @private + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + */ + function objectToString(value) { + return nativeObjectToString.call(value); + } + + /* harmony default export */ __webpack_exports__['a'] = objectToString; + + /***/ + }, + /* 559 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__overArg_js__ = __webpack_require__(560); + + /** Built-in value references. */ + var getPrototype = Object(__WEBPACK_IMPORTED_MODULE_0__overArg_js__['a' /* default */])( + Object.getPrototypeOf, + Object, + ); + + /* harmony default export */ __webpack_exports__['a'] = getPrototype; + + /***/ + }, + /* 560 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ + function overArg(func, transform) { + return function (arg) { + return func(transform(arg)); + }; + } + + /* harmony default export */ __webpack_exports__['a'] = overArg; + + /***/ + }, + /* 561 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ + function isObjectLike(value) { + return value != null && typeof value == 'object'; + } + + /* harmony default export */ __webpack_exports__['a'] = isObjectLike; + + /***/ + }, + /* 562 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* WEBPACK VAR INJECTION */ (function (global, module) { + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__ponyfill_js__ = __webpack_require__(564); + /* global window */ + + var root; + + if (typeof self !== 'undefined') { + root = self; + } else if (typeof window !== 'undefined') { + root = window; + } else if (typeof global !== 'undefined') { + root = global; + } else if (true) { + root = module; + } else { + root = Function('return this')(); + } + + var result = Object(__WEBPACK_IMPORTED_MODULE_0__ponyfill_js__['a' /* default */])(root); + /* harmony default export */ __webpack_exports__['a'] = result; + + /* WEBPACK VAR INJECTION */ + }).call(__webpack_exports__, __webpack_require__(38), __webpack_require__(563)(module)); + + /***/ + }, + /* 563 */ + /***/ function (module, exports) { + module.exports = function (originalModule) { + if (!originalModule.webpackPolyfill) { + var module = Object.create(originalModule); + // module.parent = undefined by default + if (!module.children) module.children = []; + Object.defineProperty(module, 'loaded', { + enumerable: true, + get: function () { + return module.l; + }, + }); + Object.defineProperty(module, 'id', { + enumerable: true, + get: function () { + return module.i; + }, + }); + Object.defineProperty(module, 'exports', { + enumerable: true, + }); + module.webpackPolyfill = 1; + } + return module; + }; + + /***/ + }, + /* 564 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = symbolObservablePonyfill; + function symbolObservablePonyfill(root) { + var result; + var Symbol = root.Symbol; + + if (typeof Symbol === 'function') { + if (Symbol.observable) { + result = Symbol.observable; + } else { + result = Symbol('observable'); + Symbol.observable = result; + } + } else { + result = '@@observable'; + } + + return result; + } + + /***/ + }, + /* 565 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = combineReducers; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createStore__ = __webpack_require__(240); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_es_isPlainObject__ = + __webpack_require__(241); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_warning__ = __webpack_require__(243); + + function getUndefinedStateErrorMessage(key, action) { + var actionType = action && action.type; + var actionName = (actionType && '"' + actionType.toString() + '"') || 'an action'; + + return ( + 'Given action ' + + actionName + + ', reducer "' + + key + + '" returned undefined. ' + + 'To ignore an action, you must explicitly return the previous state. ' + + 'If you want this reducer to hold no value, you can return null instead of undefined.' + ); + } + + function getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) { + var reducerKeys = Object.keys(reducers); + var argumentName = + action && action.type === __WEBPACK_IMPORTED_MODULE_0__createStore__['a' /* ActionTypes */].INIT + ? 'preloadedState argument passed to createStore' + : 'previous state received by the reducer'; + + if (reducerKeys.length === 0) { + return ( + 'Store does not have a valid reducer. Make sure the argument passed ' + + 'to combineReducers is an object whose values are reducers.' + ); + } + + if (!Object(__WEBPACK_IMPORTED_MODULE_1_lodash_es_isPlainObject__['a' /* default */])(inputState)) { + return ( + 'The ' + + argumentName + + ' has unexpected type of "' + + {}.toString.call(inputState).match(/\s([a-z|A-Z]+)/)[1] + + '". Expected argument to be an object with the following ' + + ('keys: "' + reducerKeys.join('", "') + '"') + ); + } + + var unexpectedKeys = Object.keys(inputState).filter(function (key) { + return !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key]; + }); + + unexpectedKeys.forEach(function (key) { + unexpectedKeyCache[key] = true; + }); + + if (unexpectedKeys.length > 0) { + return ( + 'Unexpected ' + + (unexpectedKeys.length > 1 ? 'keys' : 'key') + + ' ' + + ('"' + unexpectedKeys.join('", "') + '" found in ' + argumentName + '. ') + + 'Expected to find one of the known reducer keys instead: ' + + ('"' + reducerKeys.join('", "') + '". Unexpected keys will be ignored.') + ); + } + } + + function assertReducerShape(reducers) { + Object.keys(reducers).forEach(function (key) { + var reducer = reducers[key]; + var initialState = reducer(undefined, { + type: __WEBPACK_IMPORTED_MODULE_0__createStore__['a' /* ActionTypes */].INIT, + }); + + if (typeof initialState === 'undefined') { + throw new Error( + 'Reducer "' + + key + + '" returned undefined during initialization. ' + + 'If the state passed to the reducer is undefined, you must ' + + 'explicitly return the initial state. The initial state may ' + + "not be undefined. If you don't want to set a value for this reducer, " + + 'you can use null instead of undefined.', + ); + } + + var type = + '@@redux/PROBE_UNKNOWN_ACTION_' + Math.random().toString(36).substring(7).split('').join('.'); + if (typeof reducer(undefined, { type: type }) === 'undefined') { + throw new Error( + 'Reducer "' + + key + + '" returned undefined when probed with a random type. ' + + ("Don't try to handle " + + __WEBPACK_IMPORTED_MODULE_0__createStore__['a' /* ActionTypes */].INIT + + ' or other actions in "redux/*" ') + + 'namespace. They are considered private. Instead, you must return the ' + + 'current state for any unknown actions, unless it is undefined, ' + + 'in which case you must return the initial state, regardless of the ' + + 'action type. The initial state may not be undefined, but can be null.', + ); + } + }); + } + + /** + * Turns an object whose values are different reducer functions, into a single + * reducer function. It will call every child reducer, and gather their results + * into a single state object, whose keys correspond to the keys of the passed + * reducer functions. + * + * @param {Object} reducers An object whose values correspond to different + * reducer functions that need to be combined into one. One handy way to obtain + * it is to use ES6 `import * as reducers` syntax. The reducers may never return + * undefined for any action. Instead, they should return their initial state + * if the state passed to them was undefined, and the current state for any + * unrecognized action. + * + * @returns {Function} A reducer function that invokes every reducer inside the + * passed object, and builds a state object with the same shape. + */ + function combineReducers(reducers) { + var reducerKeys = Object.keys(reducers); + var finalReducers = {}; + for (var i = 0; i < reducerKeys.length; i++) { + var key = reducerKeys[i]; + + if (true) { + if (typeof reducers[key] === 'undefined') { + Object(__WEBPACK_IMPORTED_MODULE_2__utils_warning__['a' /* default */])( + 'No reducer provided for key "' + key + '"', + ); + } + } + + if (typeof reducers[key] === 'function') { + finalReducers[key] = reducers[key]; + } + } + var finalReducerKeys = Object.keys(finalReducers); + + var unexpectedKeyCache = void 0; + if (true) { + unexpectedKeyCache = {}; + } + + var shapeAssertionError = void 0; + try { + assertReducerShape(finalReducers); + } catch (e) { + shapeAssertionError = e; + } + + return function combination() { + var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + var action = arguments[1]; + + if (shapeAssertionError) { + throw shapeAssertionError; + } + + if (true) { + var warningMessage = getUnexpectedStateShapeWarningMessage( + state, + finalReducers, + action, + unexpectedKeyCache, + ); + if (warningMessage) { + Object(__WEBPACK_IMPORTED_MODULE_2__utils_warning__['a' /* default */])(warningMessage); + } + } + + var hasChanged = false; + var nextState = {}; + for (var _i = 0; _i < finalReducerKeys.length; _i++) { + var _key = finalReducerKeys[_i]; + var reducer = finalReducers[_key]; + var previousStateForKey = state[_key]; + var nextStateForKey = reducer(previousStateForKey, action); + if (typeof nextStateForKey === 'undefined') { + var errorMessage = getUndefinedStateErrorMessage(_key, action); + throw new Error(errorMessage); + } + nextState[_key] = nextStateForKey; + hasChanged = hasChanged || nextStateForKey !== previousStateForKey; + } + return hasChanged ? nextState : state; + }; + } + + /***/ + }, + /* 566 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = bindActionCreators; + function bindActionCreator(actionCreator, dispatch) { + return function () { + return dispatch(actionCreator.apply(undefined, arguments)); + }; + } + + /** + * Turns an object whose values are action creators, into an object with the + * same keys, but with every function wrapped into a `dispatch` call so they + * may be invoked directly. This is just a convenience method, as you can call + * `store.dispatch(MyActionCreators.doSomething())` yourself just fine. + * + * For convenience, you can also pass a single function as the first argument, + * and get a function in return. + * + * @param {Function|Object} actionCreators An object whose values are action + * creator functions. One handy way to obtain it is to use ES6 `import * as` + * syntax. You may also pass a single function. + * + * @param {Function} dispatch The `dispatch` function available on your Redux + * store. + * + * @returns {Function|Object} The object mimicking the original object, but with + * every action creator wrapped into the `dispatch` call. If you passed a + * function as `actionCreators`, the return value will also be a single + * function. + */ + function bindActionCreators(actionCreators, dispatch) { + if (typeof actionCreators === 'function') { + return bindActionCreator(actionCreators, dispatch); + } + + if (typeof actionCreators !== 'object' || actionCreators === null) { + throw new Error( + 'bindActionCreators expected an object or a function, instead received ' + + (actionCreators === null ? 'null' : typeof actionCreators) + + '. ' + + 'Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?', + ); + } + + var keys = Object.keys(actionCreators); + var boundActionCreators = {}; + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + var actionCreator = actionCreators[key]; + if (typeof actionCreator === 'function') { + boundActionCreators[key] = bindActionCreator(actionCreator, dispatch); + } + } + return boundActionCreators; + } + + /***/ + }, + /* 567 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = applyMiddleware; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__compose__ = __webpack_require__(244); + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + /** + * Creates a store enhancer that applies middleware to the dispatch method + * of the Redux store. This is handy for a variety of tasks, such as expressing + * asynchronous actions in a concise manner, or logging every action payload. + * + * See `redux-thunk` package as an example of the Redux middleware. + * + * Because middleware is potentially asynchronous, this should be the first + * store enhancer in the composition chain. + * + * Note that each middleware will be given the `dispatch` and `getState` functions + * as named arguments. + * + * @param {...Function} middlewares The middleware chain to be applied. + * @returns {Function} A store enhancer applying the middleware. + */ + function applyMiddleware() { + for (var _len = arguments.length, middlewares = Array(_len), _key = 0; _key < _len; _key++) { + middlewares[_key] = arguments[_key]; + } + + return function (createStore) { + return function (reducer, preloadedState, enhancer) { + var store = createStore(reducer, preloadedState, enhancer); + var _dispatch = store.dispatch; + var chain = []; + + var middlewareAPI = { + getState: store.getState, + dispatch: function dispatch(action) { + return _dispatch(action); + }, + }; + chain = middlewares.map(function (middleware) { + return middleware(middlewareAPI); + }); + _dispatch = __WEBPACK_IMPORTED_MODULE_0__compose__['a' /* default */].apply( + undefined, + chain, + )(store.dispatch); + + return _extends({}, store, { + dispatch: _dispatch, + }); + }; + }; + } + + /***/ + }, + /* 568 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* unused harmony export createProvider */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_inheritsLoose__ = + __webpack_require__(245); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types__ = __webpack_require__(10); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_2_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__utils_PropTypes__ = __webpack_require__(246); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__utils_warning__ = __webpack_require__(164); + + var prefixUnsafeLifecycleMethods = + typeof __WEBPACK_IMPORTED_MODULE_1_react___default.a.forwardRef !== 'undefined'; + var didWarnAboutReceivingStore = false; + + function warnAboutReceivingStore() { + if (didWarnAboutReceivingStore) { + return; + } + + didWarnAboutReceivingStore = true; + Object(__WEBPACK_IMPORTED_MODULE_4__utils_warning__['a' /* default */])( + '<Provider> does not support changing `store` on the fly. ' + + 'It is most likely that you see this error because you updated to ' + + 'Redux 2.x and React Redux 2.x which no longer hot reload reducers ' + + 'automatically. See https://github.com/reduxjs/react-redux/releases/' + + 'tag/v2.0.0 for the migration instructions.', + ); + } + + function createProvider(storeKey) { + var _Provider$childContex; + + if (storeKey === void 0) { + storeKey = 'store'; + } + + var subscriptionKey = storeKey + 'Subscription'; + + var Provider = + /*#__PURE__*/ + (function (_Component) { + Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_inheritsLoose__['a' /* default */])( + Provider, + _Component, + ); + + var _proto = Provider.prototype; + + _proto.getChildContext = function getChildContext() { + var _ref; + + return (_ref = {}), (_ref[storeKey] = this[storeKey]), (_ref[subscriptionKey] = null), _ref; + }; + + function Provider(props, context) { + var _this; + + _this = _Component.call(this, props, context) || this; + _this[storeKey] = props.store; + return _this; + } + + _proto.render = function render() { + return __WEBPACK_IMPORTED_MODULE_1_react__['Children'].only(this.props.children); + }; + + return Provider; + })(__WEBPACK_IMPORTED_MODULE_1_react__['Component']); + + if (true) { + // Use UNSAFE_ event name where supported + var eventName = prefixUnsafeLifecycleMethods + ? 'UNSAFE_componentWillReceiveProps' + : 'componentWillReceiveProps'; + + Provider.prototype[eventName] = function (nextProps) { + if (this[storeKey] !== nextProps.store) { + warnAboutReceivingStore(); + } + }; + } + + Provider.propTypes = { + store: __WEBPACK_IMPORTED_MODULE_3__utils_PropTypes__['a' /* storeShape */].isRequired, + children: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.element.isRequired, + }; + Provider.childContextTypes = + ((_Provider$childContex = {}), + (_Provider$childContex[storeKey] = + __WEBPACK_IMPORTED_MODULE_3__utils_PropTypes__['a' /* storeShape */].isRequired), + (_Provider$childContex[subscriptionKey] = + __WEBPACK_IMPORTED_MODULE_3__utils_PropTypes__['b' /* subscriptionShape */]), + _Provider$childContex); + return Provider; + } + /* harmony default export */ __webpack_exports__['a'] = createProvider(); + + /***/ + }, + /* 569 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = _assertThisInitialized; + function _assertThisInitialized(self) { + if (self === void 0) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return self; + } + + /***/ + }, + /* 570 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var reactIs = __webpack_require__(109); + + /** + * Copyright 2015, Yahoo! Inc. + * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. + */ + var REACT_STATICS = { + childContextTypes: true, + contextType: true, + contextTypes: true, + defaultProps: true, + displayName: true, + getDefaultProps: true, + getDerivedStateFromError: true, + getDerivedStateFromProps: true, + mixins: true, + propTypes: true, + type: true, + }; + var KNOWN_STATICS = { + name: true, + length: true, + prototype: true, + caller: true, + callee: true, + arguments: true, + arity: true, + }; + var FORWARD_REF_STATICS = { + $$typeof: true, + render: true, + defaultProps: true, + displayName: true, + propTypes: true, + }; + var MEMO_STATICS = { + $$typeof: true, + compare: true, + defaultProps: true, + displayName: true, + propTypes: true, + type: true, + }; + var TYPE_STATICS = {}; + TYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS; + TYPE_STATICS[reactIs.Memo] = MEMO_STATICS; + + function getStatics(component) { + // React v16.11 and below + if (reactIs.isMemo(component)) { + return MEMO_STATICS; + } // React v16.12 and above + + return TYPE_STATICS[component['$$typeof']] || REACT_STATICS; + } + + var defineProperty = Object.defineProperty; + var getOwnPropertyNames = Object.getOwnPropertyNames; + var getOwnPropertySymbols = Object.getOwnPropertySymbols; + var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; + var getPrototypeOf = Object.getPrototypeOf; + var objectPrototype = Object.prototype; + function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) { + if (typeof sourceComponent !== 'string') { + // don't hoist over string (html) components + if (objectPrototype) { + var inheritedComponent = getPrototypeOf(sourceComponent); + + if (inheritedComponent && inheritedComponent !== objectPrototype) { + hoistNonReactStatics(targetComponent, inheritedComponent, blacklist); + } + } + + var keys = getOwnPropertyNames(sourceComponent); + + if (getOwnPropertySymbols) { + keys = keys.concat(getOwnPropertySymbols(sourceComponent)); + } + + var targetStatics = getStatics(targetComponent); + var sourceStatics = getStatics(sourceComponent); + + for (var i = 0; i < keys.length; ++i) { + var key = keys[i]; + + if ( + !KNOWN_STATICS[key] && + !(blacklist && blacklist[key]) && + !(sourceStatics && sourceStatics[key]) && + !(targetStatics && targetStatics[key]) + ) { + var descriptor = getOwnPropertyDescriptor(sourceComponent, key); + + try { + // Avoid failures from read-only properties + defineProperty(targetComponent, key, descriptor); + } catch (e) {} + } + } + } + + return targetComponent; + } + + module.exports = hoistNonReactStatics; + + /***/ + }, + /* 571 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 'a', function () { + return Subscription; + }); + // encapsulates the subscription logic for connecting a component to the redux store, as + // well as nesting subscriptions of descendant components, so that we can ensure the + // ancestor components re-render before descendants + var CLEARED = null; + var nullListeners = { + notify: function notify() {}, + }; + + function createListenerCollection() { + // the current/next pattern is copied from redux's createStore code. + // TODO: refactor+expose that code to be reusable here? + var current = []; + var next = []; + return { + clear: function clear() { + next = CLEARED; + current = CLEARED; + }, + notify: function notify() { + var listeners = (current = next); + + for (var i = 0; i < listeners.length; i++) { + listeners[i](); + } + }, + get: function get() { + return next; + }, + subscribe: function subscribe(listener) { + var isSubscribed = true; + if (next === current) next = current.slice(); + next.push(listener); + return function unsubscribe() { + if (!isSubscribed || current === CLEARED) return; + isSubscribed = false; + if (next === current) next = current.slice(); + next.splice(next.indexOf(listener), 1); + }; + }, + }; + } + + var Subscription = + /*#__PURE__*/ + (function () { + function Subscription(store, parentSub, onStateChange) { + this.store = store; + this.parentSub = parentSub; + this.onStateChange = onStateChange; + this.unsubscribe = null; + this.listeners = nullListeners; + } + + var _proto = Subscription.prototype; + + _proto.addNestedSub = function addNestedSub(listener) { + this.trySubscribe(); + return this.listeners.subscribe(listener); + }; + + _proto.notifyNestedSubs = function notifyNestedSubs() { + this.listeners.notify(); + }; + + _proto.isSubscribed = function isSubscribed() { + return Boolean(this.unsubscribe); + }; + + _proto.trySubscribe = function trySubscribe() { + if (!this.unsubscribe) { + this.unsubscribe = this.parentSub + ? this.parentSub.addNestedSub(this.onStateChange) + : this.store.subscribe(this.onStateChange); + this.listeners = createListenerCollection(); + } + }; + + _proto.tryUnsubscribe = function tryUnsubscribe() { + if (this.unsubscribe) { + this.unsubscribe(); + this.unsubscribe = null; + this.listeners.clear(); + this.listeners = nullListeners; + } + }; + + return Subscription; + })(); + + /***/ + }, + /* 572 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* unused harmony export createConnect */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_extends__ = + __webpack_require__(165); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_esm_objectWithoutPropertiesLoose__ = + __webpack_require__(166); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__components_connectAdvanced__ = + __webpack_require__(247); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__utils_shallowEqual__ = __webpack_require__(573); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__mapDispatchToProps__ = __webpack_require__(574); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__mapStateToProps__ = __webpack_require__(576); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__mergeProps__ = __webpack_require__(577); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__selectorFactory__ = __webpack_require__(578); + + /* + connect is a facade over connectAdvanced. It turns its args into a compatible + selectorFactory, which has the signature: + + (dispatch, options) => (nextState, nextOwnProps) => nextFinalProps + + connect passes its args to connectAdvanced as options, which will in turn pass them to + selectorFactory each time a Connect component instance is instantiated or hot reloaded. + + selectorFactory returns a final props selector from its mapStateToProps, + mapStateToPropsFactories, mapDispatchToProps, mapDispatchToPropsFactories, mergeProps, + mergePropsFactories, and pure args. + + The resulting final props selector is called by the Connect component instance whenever + it receives new props or store state. + */ + + function match(arg, factories, name) { + for (var i = factories.length - 1; i >= 0; i--) { + var result = factories[i](arg); + if (result) return result; + } + + return function (dispatch, options) { + throw new Error( + 'Invalid value of type ' + + typeof arg + + ' for ' + + name + + ' argument when connecting component ' + + options.wrappedComponentName + + '.', + ); + }; + } + + function strictEqual(a, b) { + return a === b; + } // createConnect with default args builds the 'official' connect behavior. Calling it with + // different options opens up some testing and extensibility scenarios + + function createConnect(_temp) { + var _ref = _temp === void 0 ? {} : _temp, + _ref$connectHOC = _ref.connectHOC, + connectHOC = + _ref$connectHOC === void 0 + ? __WEBPACK_IMPORTED_MODULE_2__components_connectAdvanced__['a' /* default */] + : _ref$connectHOC, + _ref$mapStateToPropsF = _ref.mapStateToPropsFactories, + mapStateToPropsFactories = + _ref$mapStateToPropsF === void 0 + ? __WEBPACK_IMPORTED_MODULE_5__mapStateToProps__['a' /* default */] + : _ref$mapStateToPropsF, + _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories, + mapDispatchToPropsFactories = + _ref$mapDispatchToPro === void 0 + ? __WEBPACK_IMPORTED_MODULE_4__mapDispatchToProps__['a' /* default */] + : _ref$mapDispatchToPro, + _ref$mergePropsFactor = _ref.mergePropsFactories, + mergePropsFactories = + _ref$mergePropsFactor === void 0 + ? __WEBPACK_IMPORTED_MODULE_6__mergeProps__['a' /* default */] + : _ref$mergePropsFactor, + _ref$selectorFactory = _ref.selectorFactory, + selectorFactory = + _ref$selectorFactory === void 0 + ? __WEBPACK_IMPORTED_MODULE_7__selectorFactory__['a' /* default */] + : _ref$selectorFactory; + + return function connect(mapStateToProps, mapDispatchToProps, mergeProps, _ref2) { + if (_ref2 === void 0) { + _ref2 = {}; + } + + var _ref3 = _ref2, + _ref3$pure = _ref3.pure, + pure = _ref3$pure === void 0 ? true : _ref3$pure, + _ref3$areStatesEqual = _ref3.areStatesEqual, + areStatesEqual = _ref3$areStatesEqual === void 0 ? strictEqual : _ref3$areStatesEqual, + _ref3$areOwnPropsEqua = _ref3.areOwnPropsEqual, + areOwnPropsEqual = + _ref3$areOwnPropsEqua === void 0 + ? __WEBPACK_IMPORTED_MODULE_3__utils_shallowEqual__['a' /* default */] + : _ref3$areOwnPropsEqua, + _ref3$areStatePropsEq = _ref3.areStatePropsEqual, + areStatePropsEqual = + _ref3$areStatePropsEq === void 0 + ? __WEBPACK_IMPORTED_MODULE_3__utils_shallowEqual__['a' /* default */] + : _ref3$areStatePropsEq, + _ref3$areMergedPropsE = _ref3.areMergedPropsEqual, + areMergedPropsEqual = + _ref3$areMergedPropsE === void 0 + ? __WEBPACK_IMPORTED_MODULE_3__utils_shallowEqual__['a' /* default */] + : _ref3$areMergedPropsE, + extraOptions = Object( + __WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_esm_objectWithoutPropertiesLoose__[ + 'a' /* default */ + ], + )(_ref3, [ + 'pure', + 'areStatesEqual', + 'areOwnPropsEqual', + 'areStatePropsEqual', + 'areMergedPropsEqual', + ]); + + var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps'); + var initMapDispatchToProps = match( + mapDispatchToProps, + mapDispatchToPropsFactories, + 'mapDispatchToProps', + ); + var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps'); + return connectHOC( + selectorFactory, + Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_extends__['a' /* default */])( + { + // used in error messages + methodName: 'connect', + // used to compute Connect's displayName from the wrapped component's displayName. + getDisplayName: function getDisplayName(name) { + return 'Connect(' + name + ')'; + }, + // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes + shouldHandleStateChanges: Boolean(mapStateToProps), + // passed through to selectorFactory + initMapStateToProps: initMapStateToProps, + initMapDispatchToProps: initMapDispatchToProps, + initMergeProps: initMergeProps, + pure: pure, + areStatesEqual: areStatesEqual, + areOwnPropsEqual: areOwnPropsEqual, + areStatePropsEqual: areStatePropsEqual, + areMergedPropsEqual: areMergedPropsEqual, + }, + extraOptions, + ), + ); + }; + } + /* harmony default export */ __webpack_exports__['a'] = createConnect(); + + /***/ + }, + /* 573 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = shallowEqual; + var hasOwn = Object.prototype.hasOwnProperty; + + function is(x, y) { + if (x === y) { + return x !== 0 || y !== 0 || 1 / x === 1 / y; + } else { + return x !== x && y !== y; + } + } + + function shallowEqual(objA, objB) { + if (is(objA, objB)) return true; + + if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) { + return false; + } + + var keysA = Object.keys(objA); + var keysB = Object.keys(objB); + if (keysA.length !== keysB.length) return false; + + for (var i = 0; i < keysA.length; i++) { + if (!hasOwn.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) { + return false; + } + } + + return true; + } + + /***/ + }, + /* 574 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* unused harmony export whenMapDispatchToPropsIsFunction */ + /* unused harmony export whenMapDispatchToPropsIsMissing */ + /* unused harmony export whenMapDispatchToPropsIsObject */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_redux__ = __webpack_require__(110); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__wrapMapToProps__ = __webpack_require__(248); + + function whenMapDispatchToPropsIsFunction(mapDispatchToProps) { + return typeof mapDispatchToProps === 'function' + ? Object(__WEBPACK_IMPORTED_MODULE_1__wrapMapToProps__['b' /* wrapMapToPropsFunc */])( + mapDispatchToProps, + 'mapDispatchToProps', + ) + : undefined; + } + function whenMapDispatchToPropsIsMissing(mapDispatchToProps) { + return !mapDispatchToProps + ? Object(__WEBPACK_IMPORTED_MODULE_1__wrapMapToProps__['a' /* wrapMapToPropsConstant */])( + function (dispatch) { + return { + dispatch: dispatch, + }; + }, + ) + : undefined; + } + function whenMapDispatchToPropsIsObject(mapDispatchToProps) { + return mapDispatchToProps && typeof mapDispatchToProps === 'object' + ? Object(__WEBPACK_IMPORTED_MODULE_1__wrapMapToProps__['a' /* wrapMapToPropsConstant */])( + function (dispatch) { + return Object(__WEBPACK_IMPORTED_MODULE_0_redux__['b' /* bindActionCreators */])( + mapDispatchToProps, + dispatch, + ); + }, + ) + : undefined; + } + /* harmony default export */ __webpack_exports__['a'] = [ + whenMapDispatchToPropsIsFunction, + whenMapDispatchToPropsIsMissing, + whenMapDispatchToPropsIsObject, + ]; + + /***/ + }, + /* 575 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = isPlainObject; + /** + * @param {any} obj The object to inspect. + * @returns {boolean} True if the argument appears to be a plain object. + */ + function isPlainObject(obj) { + if (typeof obj !== 'object' || obj === null) return false; + var proto = Object.getPrototypeOf(obj); + if (proto === null) return true; + var baseProto = proto; + + while (Object.getPrototypeOf(baseProto) !== null) { + baseProto = Object.getPrototypeOf(baseProto); + } + + return proto === baseProto; + } + + /***/ + }, + /* 576 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* unused harmony export whenMapStateToPropsIsFunction */ + /* unused harmony export whenMapStateToPropsIsMissing */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__wrapMapToProps__ = __webpack_require__(248); + + function whenMapStateToPropsIsFunction(mapStateToProps) { + return typeof mapStateToProps === 'function' + ? Object(__WEBPACK_IMPORTED_MODULE_0__wrapMapToProps__['b' /* wrapMapToPropsFunc */])( + mapStateToProps, + 'mapStateToProps', + ) + : undefined; + } + function whenMapStateToPropsIsMissing(mapStateToProps) { + return !mapStateToProps + ? Object(__WEBPACK_IMPORTED_MODULE_0__wrapMapToProps__['a' /* wrapMapToPropsConstant */])( + function () { + return {}; + }, + ) + : undefined; + } + /* harmony default export */ __webpack_exports__['a'] = [ + whenMapStateToPropsIsFunction, + whenMapStateToPropsIsMissing, + ]; + + /***/ + }, + /* 577 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* unused harmony export defaultMergeProps */ + /* unused harmony export wrapMergePropsFunc */ + /* unused harmony export whenMergePropsIsFunction */ + /* unused harmony export whenMergePropsIsOmitted */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_extends__ = + __webpack_require__(165); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__utils_verifyPlainObject__ = + __webpack_require__(249); + + function defaultMergeProps(stateProps, dispatchProps, ownProps) { + return Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_extends__['a' /* default */])( + {}, + ownProps, + stateProps, + dispatchProps, + ); + } + function wrapMergePropsFunc(mergeProps) { + return function initMergePropsProxy(dispatch, _ref) { + var displayName = _ref.displayName, + pure = _ref.pure, + areMergedPropsEqual = _ref.areMergedPropsEqual; + var hasRunOnce = false; + var mergedProps; + return function mergePropsProxy(stateProps, dispatchProps, ownProps) { + var nextMergedProps = mergeProps(stateProps, dispatchProps, ownProps); + + if (hasRunOnce) { + if (!pure || !areMergedPropsEqual(nextMergedProps, mergedProps)) mergedProps = nextMergedProps; + } else { + hasRunOnce = true; + mergedProps = nextMergedProps; + if (true) + Object(__WEBPACK_IMPORTED_MODULE_1__utils_verifyPlainObject__['a' /* default */])( + mergedProps, + displayName, + 'mergeProps', + ); + } + + return mergedProps; + }; + }; + } + function whenMergePropsIsFunction(mergeProps) { + return typeof mergeProps === 'function' ? wrapMergePropsFunc(mergeProps) : undefined; + } + function whenMergePropsIsOmitted(mergeProps) { + return !mergeProps + ? function () { + return defaultMergeProps; + } + : undefined; + } + /* harmony default export */ __webpack_exports__['a'] = [ + whenMergePropsIsFunction, + whenMergePropsIsOmitted, + ]; + + /***/ + }, + /* 578 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* unused harmony export impureFinalPropsSelectorFactory */ + /* unused harmony export pureFinalPropsSelectorFactory */ + /* harmony export (immutable) */ __webpack_exports__['a'] = finalPropsSelectorFactory; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_objectWithoutPropertiesLoose__ = + __webpack_require__(166); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__verifySubselectors__ = __webpack_require__(579); + + function impureFinalPropsSelectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch) { + return function impureFinalPropsSelector(state, ownProps) { + return mergeProps( + mapStateToProps(state, ownProps), + mapDispatchToProps(dispatch, ownProps), + ownProps, + ); + }; + } + function pureFinalPropsSelectorFactory( + mapStateToProps, + mapDispatchToProps, + mergeProps, + dispatch, + _ref, + ) { + var areStatesEqual = _ref.areStatesEqual, + areOwnPropsEqual = _ref.areOwnPropsEqual, + areStatePropsEqual = _ref.areStatePropsEqual; + var hasRunAtLeastOnce = false; + var state; + var ownProps; + var stateProps; + var dispatchProps; + var mergedProps; + + function handleFirstCall(firstState, firstOwnProps) { + state = firstState; + ownProps = firstOwnProps; + stateProps = mapStateToProps(state, ownProps); + dispatchProps = mapDispatchToProps(dispatch, ownProps); + mergedProps = mergeProps(stateProps, dispatchProps, ownProps); + hasRunAtLeastOnce = true; + return mergedProps; + } + + function handleNewPropsAndNewState() { + stateProps = mapStateToProps(state, ownProps); + if (mapDispatchToProps.dependsOnOwnProps) dispatchProps = mapDispatchToProps(dispatch, ownProps); + mergedProps = mergeProps(stateProps, dispatchProps, ownProps); + return mergedProps; + } + + function handleNewProps() { + if (mapStateToProps.dependsOnOwnProps) stateProps = mapStateToProps(state, ownProps); + if (mapDispatchToProps.dependsOnOwnProps) dispatchProps = mapDispatchToProps(dispatch, ownProps); + mergedProps = mergeProps(stateProps, dispatchProps, ownProps); + return mergedProps; + } + + function handleNewState() { + var nextStateProps = mapStateToProps(state, ownProps); + var statePropsChanged = !areStatePropsEqual(nextStateProps, stateProps); + stateProps = nextStateProps; + if (statePropsChanged) mergedProps = mergeProps(stateProps, dispatchProps, ownProps); + return mergedProps; + } + + function handleSubsequentCalls(nextState, nextOwnProps) { + var propsChanged = !areOwnPropsEqual(nextOwnProps, ownProps); + var stateChanged = !areStatesEqual(nextState, state); + state = nextState; + ownProps = nextOwnProps; + if (propsChanged && stateChanged) return handleNewPropsAndNewState(); + if (propsChanged) return handleNewProps(); + if (stateChanged) return handleNewState(); + return mergedProps; + } + + return function pureFinalPropsSelector(nextState, nextOwnProps) { + return hasRunAtLeastOnce + ? handleSubsequentCalls(nextState, nextOwnProps) + : handleFirstCall(nextState, nextOwnProps); + }; + } // TODO: Add more comments + // If pure is true, the selector returned by selectorFactory will memoize its results, + // allowing connectAdvanced's shouldComponentUpdate to return false if final + // props have not changed. If false, the selector will always return a new + // object and shouldComponentUpdate will always return true. + + function finalPropsSelectorFactory(dispatch, _ref2) { + var initMapStateToProps = _ref2.initMapStateToProps, + initMapDispatchToProps = _ref2.initMapDispatchToProps, + initMergeProps = _ref2.initMergeProps, + options = Object( + __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_objectWithoutPropertiesLoose__[ + 'a' /* default */ + ], + )(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']); + + var mapStateToProps = initMapStateToProps(dispatch, options); + var mapDispatchToProps = initMapDispatchToProps(dispatch, options); + var mergeProps = initMergeProps(dispatch, options); + + if (true) { + Object(__WEBPACK_IMPORTED_MODULE_1__verifySubselectors__['a' /* default */])( + mapStateToProps, + mapDispatchToProps, + mergeProps, + options.displayName, + ); + } + + var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory; + return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options); + } + + /***/ + }, + /* 579 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = verifySubselectors; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils_warning__ = __webpack_require__(164); + + function verify(selector, methodName, displayName) { + if (!selector) { + throw new Error('Unexpected value for ' + methodName + ' in ' + displayName + '.'); + } else if (methodName === 'mapStateToProps' || methodName === 'mapDispatchToProps') { + if (!selector.hasOwnProperty('dependsOnOwnProps')) { + Object(__WEBPACK_IMPORTED_MODULE_0__utils_warning__['a' /* default */])( + 'The selector for ' + + methodName + + ' of ' + + displayName + + ' did not specify a value for dependsOnOwnProps.', + ); + } + } + } + + function verifySubselectors(mapStateToProps, mapDispatchToProps, mergeProps, displayName) { + verify(mapStateToProps, 'mapStateToProps', displayName); + verify(mapDispatchToProps, 'mapDispatchToProps', displayName); + verify(mergeProps, 'mergeProps', displayName); + } + + /***/ + }, + /* 580 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = helloWorldReducer; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__constants_HelloWorldConstants__ = + __webpack_require__(252); + + var initialState = { + lastActionType: null, + name: 'Alex', + }; + + // Why name function the same as the reducer? + // https://github.com/gaearon/redux/issues/428#issuecomment-129223274 + // Naming the function will help with debugging! + function helloWorldReducer() { + var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState; + var action = arguments[1]; + var type = action.type, + name = action.name; + + switch (type) { + case __WEBPACK_IMPORTED_MODULE_0__constants_HelloWorldConstants__[ + 'a' /* HELLO_WORLD_NAME_UPDATE */ + ]: + return { + lastActionType: type, + name: name, + }; + default: + return state; + } + } + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + initialState, + 'initialState', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/reducers/HelloWorldReducer.jsx', + ); + + __REACT_HOT_LOADER__.register( + helloWorldReducer, + 'helloWorldReducer', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/reducers/HelloWorldReducer.jsx', + ); + })(); + + /***/ + }, + /* 581 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = railsContextReducer; + // This will always get set + var initialState = {}; + + // Why name function the same as the reducer? + // https://github.com/gaearon/redux/issues/428#issuecomment-129223274 + // Naming the function will help with debugging! + /* eslint-disable no-unused-vars */ + function railsContextReducer() { + var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState; + var action = arguments[1]; + + return state; + } + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + initialState, + 'initialState', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/reducers/RailsContextReducer.jsx', + ); + + __REACT_HOT_LOADER__.register( + railsContextReducer, + 'railsContextReducer', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/reducers/RailsContextReducer.jsx', + ); + })(); + + /***/ + }, + /* 582 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + var _default = function _default(props, railsContext) { + return Object.assign({}, props, { railsContext: railsContext }); + }; + + // Real world is that you'll want to do lots of manipulations of the data you get back from Rails + // to coerce it into exactly what you want your initial redux state. + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/store/composeInitialState.js', + ); + })(); + + /***/ + }, + /* 583 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(10); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__RailsContext__ = __webpack_require__(238); + var _createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ('value' in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === 'object' || typeof call === 'function') ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, enumerable: false, writable: true, configurable: true }, + }); + if (superClass) + Object.setPrototypeOf + ? Object.setPrototypeOf(subClass, superClass) + : (subClass.__proto__ = superClass); + } + + // Super simple example of the simplest possible React component + + var HelloWorldRedux = (function (_React$Component) { + _inherits(HelloWorldRedux, _React$Component); + + // Not necessary if we only call super, but we'll need to initialize state, etc. + function HelloWorldRedux(props) { + _classCallCheck(this, HelloWorldRedux); + + var _this = _possibleConstructorReturn( + this, + (HelloWorldRedux.__proto__ || Object.getPrototypeOf(HelloWorldRedux)).call(this, props), + ); + + _this.setNameDomRef = _this.setNameDomRef.bind(_this); + _this.handleChange = _this.handleChange.bind(_this); + return _this; + } + + _createClass(HelloWorldRedux, [ + { + key: 'setNameDomRef', + value: function setNameDomRef(nameDomNode) { + this.nameDomRef = nameDomNode; + }, + }, + { + key: 'handleChange', + value: function handleChange() { + var name = this.nameDomRef.value; + this.props.actions.updateName(name); + }, + }, + { + key: 'render', + value: function render() { + var _props = this.props, + data = _props.data, + railsContext = _props.railsContext; + var name = data.name; + + // If this creates an alert, we have a problem! + // see file packages/node-renderer/src/scriptSanitizedVal.js for the fix to this prior issue. + + /* eslint-disable no-console */ + + console.log('This is a script:"</div>"</script> <script>alert(\'WTF1\')</script>'); + console.log('Script2:"</div>"</script xx> <script>alert(\'WTF2\')</script xx>'); + console.log('Script3:"</div>"</ SCRIPT xx> <script>alert(\'WTF3\')</script xx>'); + console.log('Script4"</div>"</script <script>alert(\'WTF4\')</script>'); + console.log('Script5:"</div>"</ script> <script>alert(\'WTF5\')</script>'); + + return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'div', + null, + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'h3', + null, + 'Redux Hello, ', + name, + '!', + ), + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'p', + null, + 'With Redux, say hello to:', + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('input', { + type: 'text', + ref: this.setNameDomRef, + value: name || '', + onChange: this.handleChange, + }), + ), + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_2__RailsContext__['a' /* default */], + { railsContext: railsContext }, + ), + ); + }, + }, + ]); + + return HelloWorldRedux; + })(__WEBPACK_IMPORTED_MODULE_1_react___default.a.Component); + + HelloWorldRedux.propTypes = { + actions: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object.isRequired, + data: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object.isRequired, + railsContext: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object.isRequired, + }; + var _default = HelloWorldRedux; + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + HelloWorldRedux, + 'HelloWorldRedux', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/HelloWorldRedux.jsx', + ); + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/HelloWorldRedux.jsx', + ); + })(); + + /***/ + }, + /* 584 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + Object.defineProperty(__webpack_exports__, '__esModule', { value: true }); + /* harmony export (immutable) */ __webpack_exports__['updateName'] = updateName; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__constants_HelloWorldConstants__ = + __webpack_require__(252); + + /* eslint-disable import/prefer-default-export */ + function updateName(name) { + return { + type: __WEBPACK_IMPORTED_MODULE_0__constants_HelloWorldConstants__[ + 'a' /* HELLO_WORLD_NAME_UPDATE */ + ], + name: name, + }; + } + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + updateName, + 'updateName', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/actions/HelloWorldActions.jsx', + ); + })(); + + /***/ + }, + /* 585 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_on_rails__ = __webpack_require__(211); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_on_rails___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_react_on_rails__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_redux__ = __webpack_require__(163); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__components_HelloWorldContainer__ = + __webpack_require__(253); + // Top level component for serer side. + // Compare this to the ./ClientReduxSharedStoreApp.jsx file which is used for client side rendering. + + /* + * Export a function that returns a ReactComponent, depending on a store named SharedReduxStore. + * This is used for the server rendering. + * React will see that the state is the same and not do anything. + */ + + var _default = function _default() { + // This is where we get the existing store. + var store = __WEBPACK_IMPORTED_MODULE_1_react_on_rails___default.a.getStore('SharedReduxStore'); + + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_2_react_redux__['a' /* Provider */], + { store: store }, + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_3__components_HelloWorldContainer__['a' /* default */], + null, + ), + ); + }; + + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/startup/ServerReduxSharedStoreApp.jsx', + ); + })(); + + /***/ + }, + /* 586 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_router__ = __webpack_require__(85); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__routes_routes__ = __webpack_require__(612); + + var _default = function _default(_props, railsContext) { + var error = void 0; + var redirectLocation = void 0; + var routeProps = void 0; + + var location = railsContext.location; + + // See https://github.com/reactjs/react-router/blob/master/docs/guides/ServerRendering.md + + Object(__WEBPACK_IMPORTED_MODULE_1_react_router__['d' /* match */])( + { routes: __WEBPACK_IMPORTED_MODULE_2__routes_routes__['a' /* default */], location: location }, + function (_error, _redirectLocation, _routeProps) { + error = _error; + redirectLocation = _redirectLocation; + routeProps = _routeProps; + }, + ); + + // This tell react_on_rails to skip server rendering any HTML. Note, client rendering + // will handle the redirect. What's key is that we don't try to render. + // Critical to return the Object properties to match this { error, redirectLocation } + if (error || redirectLocation) { + return { error: error, redirectLocation: redirectLocation }; + } + + // Important that you don't do this if you are redirecting or have an error. + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_1_react_router__['c' /* RouterContext */], + routeProps, + ); + }; + + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/startup/ServerRouterApp.jsx', + ); + })(); + + /***/ + }, + /* 587 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant__ = __webpack_require__(14); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_invariant__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_create_react_class__ = __webpack_require__(37); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_create_react_class___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_create_react_class__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types__ = __webpack_require__(10); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_3_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__createTransitionManager__ = + __webpack_require__(254); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__ = __webpack_require__(86); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__RouterContext__ = __webpack_require__(168); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__RouteUtils__ = __webpack_require__(48); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__RouterUtils__ = __webpack_require__(256); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__routerWarning__ = __webpack_require__(71); + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + function _objectWithoutProperties(obj, keys) { + var target = {}; + for (var i in obj) { + if (keys.indexOf(i) >= 0) continue; + if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; + target[i] = obj[i]; + } + return target; + } + + var propTypes = { + history: __WEBPACK_IMPORTED_MODULE_3_prop_types__['object'], + children: __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__['d' /* routes */], + routes: __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__['d' /* routes */], // alias for children + render: __WEBPACK_IMPORTED_MODULE_3_prop_types__['func'], + createElement: __WEBPACK_IMPORTED_MODULE_3_prop_types__['func'], + onError: __WEBPACK_IMPORTED_MODULE_3_prop_types__['func'], + onUpdate: __WEBPACK_IMPORTED_MODULE_3_prop_types__['func'], + + // PRIVATE: For client-side rehydration of server match. + matchContext: __WEBPACK_IMPORTED_MODULE_3_prop_types__['object'], + }; + + /** + * A <Router> is a high-level API for automatically setting up + * a router that renders a <RouterContext> with all the props + * it needs each time the URL changes. + */ + var Router = __WEBPACK_IMPORTED_MODULE_2_create_react_class___default()({ + displayName: 'Router', + + propTypes: propTypes, + + getDefaultProps: function getDefaultProps() { + return { + render: function render(props) { + return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_6__RouterContext__['a' /* default */], + props, + ); + }, + }; + }, + getInitialState: function getInitialState() { + return { + location: null, + routes: null, + params: null, + components: null, + }; + }, + handleError: function handleError(error) { + if (this.props.onError) { + this.props.onError.call(this, error); + } else { + // Throw errors by default so we don't silently swallow them! + throw error; // This error probably occurred in getChildRoutes or getComponents. + } + }, + createRouterObject: function createRouterObject(state) { + var matchContext = this.props.matchContext; + + if (matchContext) { + return matchContext.router; + } + + var history = this.props.history; + + return Object(__WEBPACK_IMPORTED_MODULE_8__RouterUtils__['b' /* createRouterObject */])( + history, + this.transitionManager, + state, + ); + }, + createTransitionManager: function createTransitionManager() { + var matchContext = this.props.matchContext; + + if (matchContext) { + return matchContext.transitionManager; + } + + var history = this.props.history; + var _props = this.props, + routes = _props.routes, + children = _props.children; + + !history.getCurrentLocation + ? true + ? __WEBPACK_IMPORTED_MODULE_0_invariant___default()( + false, + 'You have provided a history object created with history v4.x or v2.x ' + + 'and earlier. This version of React Router is only compatible with v3 ' + + 'history objects. Please change to history v3.x.', + ) + : invariant(false) + : void 0; + + return Object(__WEBPACK_IMPORTED_MODULE_4__createTransitionManager__['a' /* default */])( + history, + Object(__WEBPACK_IMPORTED_MODULE_7__RouteUtils__['b' /* createRoutes */])(routes || children), + ); + }, + componentWillMount: function componentWillMount() { + var _this = this; + + this.transitionManager = this.createTransitionManager(); + this.router = this.createRouterObject(this.state); + + this._unlisten = this.transitionManager.listen(function (error, state) { + if (error) { + _this.handleError(error); + } else { + // Keep the identity of this.router because of a caveat in ContextUtils: + // they only work if the object identity is preserved. + Object(__WEBPACK_IMPORTED_MODULE_8__RouterUtils__['a' /* assignRouterState */])( + _this.router, + state, + ); + _this.setState(state, _this.props.onUpdate); + } + }); + }, + + /* istanbul ignore next: sanity check */ + componentWillReceiveProps: function componentWillReceiveProps(nextProps) { + true + ? Object(__WEBPACK_IMPORTED_MODULE_9__routerWarning__['a' /* default */])( + nextProps.history === this.props.history, + 'You cannot change <Router history>; it will be ignored', + ) + : void 0; + + true + ? Object(__WEBPACK_IMPORTED_MODULE_9__routerWarning__['a' /* default */])( + (nextProps.routes || nextProps.children) === (this.props.routes || this.props.children), + 'You cannot change <Router routes>; it will be ignored', + ) + : void 0; + }, + componentWillUnmount: function componentWillUnmount() { + if (this._unlisten) this._unlisten(); + }, + render: function render() { + var _state = this.state, + location = _state.location, + routes = _state.routes, + params = _state.params, + components = _state.components; + + var _props2 = this.props, + createElement = _props2.createElement, + render = _props2.render, + props = _objectWithoutProperties(_props2, ['createElement', 'render']); + + if (location == null) return null; // Async match + + // Only forward non-Router-specific props to routing context, as those are + // the only ones that might be custom routing context props. + Object.keys(propTypes).forEach(function (propType) { + return delete props[propType]; + }); + + return render( + _extends({}, props, { + router: this.router, + location: location, + routes: routes, + params: params, + components: components, + createElement: createElement, + }), + ); + }, + }); + + /* unused harmony default export */ var _unused_webpack_default_export = Router; + + /***/ + }, + /* 588 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__PatternUtils__ = __webpack_require__(72); + + function routeParamsChanged(route, prevState, nextState) { + if (!route.path) return false; + + var paramNames = Object(__WEBPACK_IMPORTED_MODULE_0__PatternUtils__['b' /* getParamNames */])( + route.path, + ); + + return paramNames.some(function (paramName) { + return prevState.params[paramName] !== nextState.params[paramName]; + }); + } + + /** + * Returns an object of { leaveRoutes, changeRoutes, enterRoutes } determined by + * the change from prevState to nextState. We leave routes if either + * 1) they are not in the next state or 2) they are in the next state + * but their params have changed (i.e. /users/123 => /users/456). + * + * leaveRoutes are ordered starting at the leaf route of the tree + * we're leaving up to the common parent route. enterRoutes are ordered + * from the top of the tree we're entering down to the leaf route. + * + * changeRoutes are any routes that didn't leave or enter during + * the transition. + */ + function computeChangedRoutes(prevState, nextState) { + var prevRoutes = prevState && prevState.routes; + var nextRoutes = nextState.routes; + + var leaveRoutes = void 0, + changeRoutes = void 0, + enterRoutes = void 0; + if (prevRoutes) { + var parentIsLeaving = false; + leaveRoutes = prevRoutes.filter(function (route) { + if (parentIsLeaving) { + return true; + } else { + var isLeaving = + nextRoutes.indexOf(route) === -1 || routeParamsChanged(route, prevState, nextState); + if (isLeaving) parentIsLeaving = true; + return isLeaving; + } + }); + + // onLeave hooks start at the leaf route. + leaveRoutes.reverse(); + + enterRoutes = []; + changeRoutes = []; + + nextRoutes.forEach(function (route) { + var isNew = prevRoutes.indexOf(route) === -1; + var paramsChanged = leaveRoutes.indexOf(route) !== -1; + + if (isNew || paramsChanged) enterRoutes.push(route); + else changeRoutes.push(route); + }); + } else { + leaveRoutes = []; + changeRoutes = []; + enterRoutes = nextRoutes; + } + + return { + leaveRoutes: leaveRoutes, + changeRoutes: changeRoutes, + enterRoutes: enterRoutes, + }; + } + + /* harmony default export */ __webpack_exports__['a'] = computeChangedRoutes; + + /***/ + }, + /* 589 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = getTransitionUtils; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__AsyncUtils__ = __webpack_require__(167); + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + var PendingHooks = function PendingHooks() { + var _this = this; + + _classCallCheck(this, PendingHooks); + + this.hooks = []; + + this.add = function (hook) { + return _this.hooks.push(hook); + }; + + this.remove = function (hook) { + return (_this.hooks = _this.hooks.filter(function (h) { + return h !== hook; + })); + }; + + this.has = function (hook) { + return _this.hooks.indexOf(hook) !== -1; + }; + + this.clear = function () { + return (_this.hooks = []); + }; + }; + + function getTransitionUtils() { + var enterHooks = new PendingHooks(); + var changeHooks = new PendingHooks(); + + function createTransitionHook(hook, route, asyncArity, pendingHooks) { + var isSync = hook.length < asyncArity; + + var transitionHook = function transitionHook() { + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + hook.apply(route, args); + + if (isSync) { + var callback = args[args.length - 1]; + // Assume hook executes synchronously and + // automatically call the callback. + callback(); + } + }; + + pendingHooks.add(transitionHook); + + return transitionHook; + } + + function getEnterHooks(routes) { + return routes.reduce(function (hooks, route) { + if (route.onEnter) hooks.push(createTransitionHook(route.onEnter, route, 3, enterHooks)); + return hooks; + }, []); + } + + function getChangeHooks(routes) { + return routes.reduce(function (hooks, route) { + if (route.onChange) hooks.push(createTransitionHook(route.onChange, route, 4, changeHooks)); + return hooks; + }, []); + } + + function runTransitionHooks(length, iter, callback) { + if (!length) { + callback(); + return; + } + + var redirectInfo = void 0; + function replace(location) { + redirectInfo = location; + } + + Object(__WEBPACK_IMPORTED_MODULE_0__AsyncUtils__['a' /* loopAsync */])( + length, + function (index, next, done) { + iter(index, replace, function (error) { + if (error || redirectInfo) { + done(error, redirectInfo); // No need to continue. + } else { + next(); + } + }); + }, + callback, + ); + } + + /** + * Runs all onEnter hooks in the given array of routes in order + * with onEnter(nextState, replace, callback) and calls + * callback(error, redirectInfo) when finished. The first hook + * to use replace short-circuits the loop. + * + * If a hook needs to run asynchronously, it may use the callback + * function. However, doing so will cause the transition to pause, + * which could lead to a non-responsive UI if the hook is slow. + */ + function runEnterHooks(routes, nextState, callback) { + enterHooks.clear(); + var hooks = getEnterHooks(routes); + return runTransitionHooks( + hooks.length, + function (index, replace, next) { + var wrappedNext = function wrappedNext() { + if (enterHooks.has(hooks[index])) { + next.apply(undefined, arguments); + enterHooks.remove(hooks[index]); + } + }; + hooks[index](nextState, replace, wrappedNext); + }, + callback, + ); + } + + /** + * Runs all onChange hooks in the given array of routes in order + * with onChange(prevState, nextState, replace, callback) and calls + * callback(error, redirectInfo) when finished. The first hook + * to use replace short-circuits the loop. + * + * If a hook needs to run asynchronously, it may use the callback + * function. However, doing so will cause the transition to pause, + * which could lead to a non-responsive UI if the hook is slow. + */ + function runChangeHooks(routes, state, nextState, callback) { + changeHooks.clear(); + var hooks = getChangeHooks(routes); + return runTransitionHooks( + hooks.length, + function (index, replace, next) { + var wrappedNext = function wrappedNext() { + if (changeHooks.has(hooks[index])) { + next.apply(undefined, arguments); + changeHooks.remove(hooks[index]); + } + }; + hooks[index](state, nextState, replace, wrappedNext); + }, + callback, + ); + } + + /** + * Runs all onLeave hooks in the given array of routes in order. + */ + function runLeaveHooks(routes, prevState) { + for (var i = 0, len = routes.length; i < len; ++i) { + if (routes[i].onLeave) routes[i].onLeave.call(routes[i], prevState); + } + } + + return { + runEnterHooks: runEnterHooks, + runChangeHooks: runChangeHooks, + runLeaveHooks: runLeaveHooks, + }; + } + + /***/ + }, + /* 590 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = isActive; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__PatternUtils__ = __webpack_require__(72); + var _typeof = + typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' + ? function (obj) { + return typeof obj; + } + : function (obj) { + return obj && + typeof Symbol === 'function' && + obj.constructor === Symbol && + obj !== Symbol.prototype + ? 'symbol' + : typeof obj; + }; + + function deepEqual(a, b) { + if (a == b) return true; + + if (a == null || b == null) return false; + + if (Array.isArray(a)) { + return ( + Array.isArray(b) && + a.length === b.length && + a.every(function (item, index) { + return deepEqual(item, b[index]); + }) + ); + } + + if ((typeof a === 'undefined' ? 'undefined' : _typeof(a)) === 'object') { + for (var p in a) { + if (!Object.prototype.hasOwnProperty.call(a, p)) { + continue; + } + + if (a[p] === undefined) { + if (b[p] !== undefined) { + return false; + } + } else if (!Object.prototype.hasOwnProperty.call(b, p)) { + return false; + } else if (!deepEqual(a[p], b[p])) { + return false; + } + } + + return true; + } + + return String(a) === String(b); + } + + /** + * Returns true if the current pathname matches the supplied one, net of + * leading and trailing slash normalization. This is sufficient for an + * indexOnly route match. + */ + function pathIsActive(pathname, currentPathname) { + // Normalize leading slash for consistency. Leading slash on pathname has + // already been normalized in isActive. See caveat there. + if (currentPathname.charAt(0) !== '/') { + currentPathname = '/' + currentPathname; + } + + // Normalize the end of both path names too. Maybe `/foo/` shouldn't show + // `/foo` as active, but in this case, we would already have failed the + // match. + if (pathname.charAt(pathname.length - 1) !== '/') { + pathname += '/'; + } + if (currentPathname.charAt(currentPathname.length - 1) !== '/') { + currentPathname += '/'; + } + + return currentPathname === pathname; + } + + /** + * Returns true if the given pathname matches the active routes and params. + */ + function routeIsActive(pathname, routes, params) { + var remainingPathname = pathname, + paramNames = [], + paramValues = []; + + // for...of would work here but it's probably slower post-transpilation. + for (var i = 0, len = routes.length; i < len; ++i) { + var route = routes[i]; + var pattern = route.path || ''; + + if (pattern.charAt(0) === '/') { + remainingPathname = pathname; + paramNames = []; + paramValues = []; + } + + if (remainingPathname !== null && pattern) { + var matched = Object(__WEBPACK_IMPORTED_MODULE_0__PatternUtils__['c' /* matchPattern */])( + pattern, + remainingPathname, + ); + if (matched) { + remainingPathname = matched.remainingPathname; + paramNames = [].concat(paramNames, matched.paramNames); + paramValues = [].concat(paramValues, matched.paramValues); + } else { + remainingPathname = null; + } + + if (remainingPathname === '') { + // We have an exact match on the route. Just check that all the params + // match. + // FIXME: This doesn't work on repeated params. + return paramNames.every(function (paramName, index) { + return String(paramValues[index]) === String(params[paramName]); + }); + } + } + } + + return false; + } + + /** + * Returns true if all key/value pairs in the given query are + * currently active. + */ + function queryIsActive(query, activeQuery) { + if (activeQuery == null) return query == null; + + if (query == null) return true; + + return deepEqual(query, activeQuery); + } + + /** + * Returns true if a <Link> to the given pathname/query combination is + * currently active. + */ + function isActive(_ref, indexOnly, currentLocation, routes, params) { + var pathname = _ref.pathname, + query = _ref.query; + + if (currentLocation == null) return false; + + // TODO: This is a bit ugly. It keeps around support for treating pathnames + // without preceding slashes as absolute paths, but possibly also works + // around the same quirks with basenames as in matchRoutes. + if (pathname.charAt(0) !== '/') { + pathname = '/' + pathname; + } + + if (!pathIsActive(pathname, currentLocation.pathname)) { + // The path check is necessary and sufficient for indexOnly, but otherwise + // we still need to check the routes. + if (indexOnly || !routeIsActive(pathname, routes, params)) { + return false; + } + } + + return queryIsActive(query, currentLocation.query); + } + + /***/ + }, + /* 591 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__AsyncUtils__ = __webpack_require__(167); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__PromiseUtils__ = __webpack_require__(255); + + function getComponentsForRoute(nextState, route, callback) { + if (route.component || route.components) { + callback(null, route.component || route.components); + return; + } + + var getComponent = route.getComponent || route.getComponents; + if (getComponent) { + var componentReturn = getComponent.call(route, nextState, callback); + if (Object(__WEBPACK_IMPORTED_MODULE_1__PromiseUtils__['a' /* isPromise */])(componentReturn)) + componentReturn.then(function (component) { + return callback(null, component); + }, callback); + } else { + callback(); + } + } + + /** + * Asynchronously fetches all components needed for the given router + * state and calls callback(error, components) when finished. + * + * Note: This operation may finish synchronously if no routes have an + * asynchronous getComponents method. + */ + function getComponents(nextState, callback) { + Object(__WEBPACK_IMPORTED_MODULE_0__AsyncUtils__['b' /* mapAsync */])( + nextState.routes, + function (route, index, callback) { + getComponentsForRoute(nextState, route, callback); + }, + callback, + ); + } + + /* harmony default export */ __webpack_exports__['a'] = getComponents; + + /***/ + }, + /* 592 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony export (immutable) */ __webpack_exports__['a'] = matchRoutes; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__AsyncUtils__ = __webpack_require__(167); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__PromiseUtils__ = __webpack_require__(255); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__PatternUtils__ = __webpack_require__(72); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__routerWarning__ = __webpack_require__(71); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__RouteUtils__ = __webpack_require__(48); + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + function getChildRoutes(route, location, paramNames, paramValues, callback) { + if (route.childRoutes) { + return [null, route.childRoutes]; + } + if (!route.getChildRoutes) { + return []; + } + + var sync = true, + result = void 0; + + var partialNextState = { + location: location, + params: createParams(paramNames, paramValues), + }; + + var childRoutesReturn = route.getChildRoutes(partialNextState, function (error, childRoutes) { + childRoutes = + !error && Object(__WEBPACK_IMPORTED_MODULE_4__RouteUtils__['b' /* createRoutes */])(childRoutes); + if (sync) { + result = [error, childRoutes]; + return; + } + + callback(error, childRoutes); + }); + + if (Object(__WEBPACK_IMPORTED_MODULE_1__PromiseUtils__['a' /* isPromise */])(childRoutesReturn)) + childRoutesReturn.then(function (childRoutes) { + return callback( + null, + Object(__WEBPACK_IMPORTED_MODULE_4__RouteUtils__['b' /* createRoutes */])(childRoutes), + ); + }, callback); + + sync = false; + return result; // Might be undefined. + } + + function getIndexRoute(route, location, paramNames, paramValues, callback) { + if (route.indexRoute) { + callback(null, route.indexRoute); + } else if (route.getIndexRoute) { + var partialNextState = { + location: location, + params: createParams(paramNames, paramValues), + }; + + var indexRoutesReturn = route.getIndexRoute(partialNextState, function (error, indexRoute) { + callback( + error, + !error && + Object(__WEBPACK_IMPORTED_MODULE_4__RouteUtils__['b' /* createRoutes */])(indexRoute)[0], + ); + }); + + if (Object(__WEBPACK_IMPORTED_MODULE_1__PromiseUtils__['a' /* isPromise */])(indexRoutesReturn)) + indexRoutesReturn.then(function (indexRoute) { + return callback( + null, + Object(__WEBPACK_IMPORTED_MODULE_4__RouteUtils__['b' /* createRoutes */])(indexRoute)[0], + ); + }, callback); + } else if (route.childRoutes || route.getChildRoutes) { + var onChildRoutes = function onChildRoutes(error, childRoutes) { + if (error) { + callback(error); + return; + } + + var pathless = childRoutes.filter(function (childRoute) { + return !childRoute.path; + }); + + Object(__WEBPACK_IMPORTED_MODULE_0__AsyncUtils__['a' /* loopAsync */])( + pathless.length, + function (index, next, done) { + getIndexRoute( + pathless[index], + location, + paramNames, + paramValues, + function (error, indexRoute) { + if (error || indexRoute) { + var routes = [pathless[index]].concat( + Array.isArray(indexRoute) ? indexRoute : [indexRoute], + ); + done(error, routes); + } else { + next(); + } + }, + ); + }, + function (err, routes) { + callback(null, routes); + }, + ); + }; + + var result = getChildRoutes(route, location, paramNames, paramValues, onChildRoutes); + if (result) { + onChildRoutes.apply(undefined, result); + } + } else { + callback(); + } + } + + function assignParams(params, paramNames, paramValues) { + return paramNames.reduce(function (params, paramName, index) { + var paramValue = paramValues && paramValues[index]; + + if (Array.isArray(params[paramName])) { + params[paramName].push(paramValue); + } else if (paramName in params) { + params[paramName] = [params[paramName], paramValue]; + } else { + params[paramName] = paramValue; + } + + return params; + }, params); + } + + function createParams(paramNames, paramValues) { + return assignParams({}, paramNames, paramValues); + } + + function matchRouteDeep(route, location, remainingPathname, paramNames, paramValues, callback) { + var pattern = route.path || ''; + + if (pattern.charAt(0) === '/') { + remainingPathname = location.pathname; + paramNames = []; + paramValues = []; + } + + // Only try to match the path if the route actually has a pattern, and if + // we're not just searching for potential nested absolute paths. + if (remainingPathname !== null && pattern) { + try { + var matched = Object(__WEBPACK_IMPORTED_MODULE_2__PatternUtils__['c' /* matchPattern */])( + pattern, + remainingPathname, + ); + if (matched) { + remainingPathname = matched.remainingPathname; + paramNames = [].concat(paramNames, matched.paramNames); + paramValues = [].concat(paramValues, matched.paramValues); + } else { + remainingPathname = null; + } + } catch (error) { + callback(error); + } + + // By assumption, pattern is non-empty here, which is the prerequisite for + // actually terminating a match. + if (remainingPathname === '') { + var match = { + routes: [route], + params: createParams(paramNames, paramValues), + }; + + getIndexRoute(route, location, paramNames, paramValues, function (error, indexRoute) { + if (error) { + callback(error); + } else { + if (Array.isArray(indexRoute)) { + var _match$routes; + + true + ? Object(__WEBPACK_IMPORTED_MODULE_3__routerWarning__['a' /* default */])( + indexRoute.every(function (route) { + return !route.path; + }), + 'Index routes should not have paths', + ) + : void 0; + (_match$routes = match.routes).push.apply(_match$routes, indexRoute); + } else if (indexRoute) { + true + ? Object(__WEBPACK_IMPORTED_MODULE_3__routerWarning__['a' /* default */])( + !indexRoute.path, + 'Index routes should not have paths', + ) + : void 0; + match.routes.push(indexRoute); + } + + callback(null, match); + } + }); + + return; + } + } + + if (remainingPathname != null || route.childRoutes) { + // Either a) this route matched at least some of the path or b) + // we don't have to load this route's children asynchronously. In + // either case continue checking for matches in the subtree. + var onChildRoutes = function onChildRoutes(error, childRoutes) { + if (error) { + callback(error); + } else if (childRoutes) { + // Check the child routes to see if any of them match. + matchRoutes( + childRoutes, + location, + function (error, match) { + if (error) { + callback(error); + } else if (match) { + // A child route matched! Augment the match and pass it up the stack. + match.routes.unshift(route); + callback(null, match); + } else { + callback(); + } + }, + remainingPathname, + paramNames, + paramValues, + ); + } else { + callback(); + } + }; + + var result = getChildRoutes(route, location, paramNames, paramValues, onChildRoutes); + if (result) { + onChildRoutes.apply(undefined, result); + } + } else { + callback(); + } + } + + /** + * Asynchronously matches the given location to a set of routes and calls + * callback(error, state) when finished. The state object will have the + * following properties: + * + * - routes An array of routes that matched, in hierarchical order + * - params An object of URL parameters + * + * Note: This operation may finish synchronously if no routes have an + * asynchronous getChildRoutes method. + */ + function matchRoutes(routes, location, callback, remainingPathname) { + var paramNames = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : []; + var paramValues = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : []; + + if (remainingPathname === undefined) { + // TODO: This is a little bit ugly, but it works around a quirk in history + // that strips the leading slash from pathnames when using basenames with + // trailing slashes. + if (location.pathname.charAt(0) !== '/') { + location = _extends({}, location, { + pathname: '/' + location.pathname, + }); + } + remainingPathname = location.pathname; + } + + Object(__WEBPACK_IMPORTED_MODULE_0__AsyncUtils__['a' /* loopAsync */])( + routes.length, + function (index, next, done) { + matchRouteDeep( + routes[index], + location, + remainingPathname, + paramNames, + paramValues, + function (error, match) { + if (error || match) { + done(error, match); + } else { + next(); + } + }, + ); + }, + callback, + ); + } + + /***/ + }, + /* 593 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__PatternUtils__ = __webpack_require__(72); + + /** + * Extracts an object of params the given route cares about from + * the given params object. + */ + function getRouteParams(route, params) { + var routeParams = {}; + + if (!route.path) return routeParams; + + Object(__WEBPACK_IMPORTED_MODULE_0__PatternUtils__['b' /* getParamNames */])(route.path).forEach( + function (p) { + if (Object.prototype.hasOwnProperty.call(params, p)) { + routeParams[p] = params[p]; + } + }, + ); + + return routeParams; + } + + /* harmony default export */ __webpack_exports__['a'] = getRouteParams; + + /***/ + }, + /* 594 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_create_react_class__ = __webpack_require__(37); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_create_react_class___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_create_react_class__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Link__ = __webpack_require__(257); + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + /** + * An <IndexLink> is used to link to an <IndexRoute>. + */ + var IndexLink = __WEBPACK_IMPORTED_MODULE_1_create_react_class___default()({ + displayName: 'IndexLink', + + render: function render() { + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_2__Link__['a' /* default */], + _extends({}, this.props, { onlyActiveOnIndex: true }), + ); + }, + }); + + /* unused harmony default export */ var _unused_webpack_default_export = IndexLink; + + /***/ + }, + /* 595 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* unused harmony export default */ + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant__ = __webpack_require__(14); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_invariant__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_create_react_class__ = __webpack_require__(37); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_create_react_class___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_create_react_class__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_hoist_non_react_statics__ = + __webpack_require__(596); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_hoist_non_react_statics___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_hoist_non_react_statics__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__ContextUtils__ = __webpack_require__(169); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__PropTypes__ = __webpack_require__(170); + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + function getDisplayName(WrappedComponent) { + return WrappedComponent.displayName || WrappedComponent.name || 'Component'; + } + + function withRouter(WrappedComponent, options) { + var withRef = options && options.withRef; + + var WithRouter = __WEBPACK_IMPORTED_MODULE_2_create_react_class___default()({ + displayName: 'WithRouter', + + mixins: [ + Object(__WEBPACK_IMPORTED_MODULE_4__ContextUtils__['b' /* ContextSubscriber */])('router'), + ], + + contextTypes: { router: __WEBPACK_IMPORTED_MODULE_5__PropTypes__['a' /* routerShape */] }, + propTypes: { router: __WEBPACK_IMPORTED_MODULE_5__PropTypes__['a' /* routerShape */] }, + + getWrappedInstance: function getWrappedInstance() { + !withRef + ? true + ? __WEBPACK_IMPORTED_MODULE_0_invariant___default()( + false, + 'To access the wrapped instance, you need to specify ' + + '`{ withRef: true }` as the second argument of the withRouter() call.', + ) + : invariant(false) + : void 0; + + return this.wrappedInstance; + }, + render: function render() { + var _this = this; + + var router = this.props.router || this.context.router; + if (!router) { + return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + WrappedComponent, + this.props, + ); + } + + var params = router.params, + location = router.location, + routes = router.routes; + + var props = _extends({}, this.props, { + router: router, + params: params, + location: location, + routes: routes, + }); + + if (withRef) { + props.ref = function (c) { + _this.wrappedInstance = c; + }; + } + + return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(WrappedComponent, props); + }, + }); + + WithRouter.displayName = 'withRouter(' + getDisplayName(WrappedComponent) + ')'; + WithRouter.WrappedComponent = WrappedComponent; + + return __WEBPACK_IMPORTED_MODULE_3_hoist_non_react_statics___default()(WithRouter, WrappedComponent); + } + + /***/ + }, + /* 596 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + /** + * Copyright 2015, Yahoo! Inc. + * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. + */ + + var REACT_STATICS = { + childContextTypes: true, + contextTypes: true, + defaultProps: true, + displayName: true, + getDefaultProps: true, + mixins: true, + propTypes: true, + type: true, + }; + + var KNOWN_STATICS = { + name: true, + length: true, + prototype: true, + caller: true, + arguments: true, + arity: true, + }; + + var isGetOwnPropertySymbolsAvailable = typeof Object.getOwnPropertySymbols === 'function'; + + module.exports = function hoistNonReactStatics(targetComponent, sourceComponent, customStatics) { + if (typeof sourceComponent !== 'string') { + // don't hoist over string (html) components + var keys = Object.getOwnPropertyNames(sourceComponent); + + /* istanbul ignore else */ + if (isGetOwnPropertySymbolsAvailable) { + keys = keys.concat(Object.getOwnPropertySymbols(sourceComponent)); + } + + for (var i = 0; i < keys.length; ++i) { + if ( + !REACT_STATICS[keys[i]] && + !KNOWN_STATICS[keys[i]] && + (!customStatics || !customStatics[keys[i]]) + ) { + try { + targetComponent[keys[i]] = sourceComponent[keys[i]]; + } catch (error) {} + } + } + } + + return targetComponent; + }; + + /***/ + }, + /* 597 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_create_react_class__ = __webpack_require__(37); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_create_react_class___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_create_react_class__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(10); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__routerWarning__ = __webpack_require__(71); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_invariant__ = __webpack_require__(14); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_invariant___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_3_invariant__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Redirect__ = __webpack_require__(258); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__ = __webpack_require__(86); + + /** + * An <IndexRedirect> is used to redirect from an indexRoute. + */ + /* eslint-disable react/require-render-return */ + var IndexRedirect = __WEBPACK_IMPORTED_MODULE_0_create_react_class___default()({ + displayName: 'IndexRedirect', + + statics: { + createRouteFromReactElement: function createRouteFromReactElement(element, parentRoute) { + /* istanbul ignore else: sanity check */ + if (parentRoute) { + parentRoute.indexRoute = + __WEBPACK_IMPORTED_MODULE_4__Redirect__['a' /* default */].createRouteFromReactElement( + element, + ); + } else { + true + ? Object(__WEBPACK_IMPORTED_MODULE_2__routerWarning__['a' /* default */])( + false, + 'An <IndexRedirect> does not make sense at the root of your route config', + ) + : void 0; + } + }, + }, + + propTypes: { + to: __WEBPACK_IMPORTED_MODULE_1_prop_types__['string'].isRequired, + query: __WEBPACK_IMPORTED_MODULE_1_prop_types__['object'], + state: __WEBPACK_IMPORTED_MODULE_1_prop_types__['object'], + onEnter: __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__['c' /* falsy */], + children: __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__['c' /* falsy */], + }, + + /* istanbul ignore next: sanity check */ + render: function render() { + true + ? true + ? __WEBPACK_IMPORTED_MODULE_3_invariant___default()( + false, + '<IndexRedirect> elements are for router configuration only and should not be rendered', + ) + : invariant(false) + : void 0; + }, + }); + + /* unused harmony default export */ var _unused_webpack_default_export = IndexRedirect; + + /***/ + }, + /* 598 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_create_react_class__ = __webpack_require__(37); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_create_react_class___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_create_react_class__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(10); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__routerWarning__ = __webpack_require__(71); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_invariant__ = __webpack_require__(14); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_invariant___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_3_invariant__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__RouteUtils__ = __webpack_require__(48); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__ = __webpack_require__(86); + + /** + * An <IndexRoute> is used to specify its parent's <Route indexRoute> in + * a JSX route config. + */ + /* eslint-disable react/require-render-return */ + var IndexRoute = __WEBPACK_IMPORTED_MODULE_0_create_react_class___default()({ + displayName: 'IndexRoute', + + statics: { + createRouteFromReactElement: function createRouteFromReactElement(element, parentRoute) { + /* istanbul ignore else: sanity check */ + if (parentRoute) { + parentRoute.indexRoute = Object( + __WEBPACK_IMPORTED_MODULE_4__RouteUtils__['a' /* createRouteFromReactElement */], + )(element); + } else { + true + ? Object(__WEBPACK_IMPORTED_MODULE_2__routerWarning__['a' /* default */])( + false, + 'An <IndexRoute> does not make sense at the root of your route config', + ) + : void 0; + } + }, + }, + + propTypes: { + path: __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__['c' /* falsy */], + component: __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__['a' /* component */], + components: __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__['b' /* components */], + getComponent: __WEBPACK_IMPORTED_MODULE_1_prop_types__['func'], + getComponents: __WEBPACK_IMPORTED_MODULE_1_prop_types__['func'], + }, + + /* istanbul ignore next: sanity check */ + render: function render() { + true + ? true + ? __WEBPACK_IMPORTED_MODULE_3_invariant___default()( + false, + '<IndexRoute> elements are for router configuration only and should not be rendered', + ) + : invariant(false) + : void 0; + }, + }); + + /* unused harmony default export */ var _unused_webpack_default_export = IndexRoute; + + /***/ + }, + /* 599 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_create_react_class__ = __webpack_require__(37); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_create_react_class___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_create_react_class__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(10); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant__ = __webpack_require__(14); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_2_invariant__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__RouteUtils__ = __webpack_require__(48); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__InternalPropTypes__ = __webpack_require__(86); + + /** + * A <Route> is used to declare which components are rendered to the + * page when the URL matches a given pattern. + * + * Routes are arranged in a nested tree structure. When a new URL is + * requested, the tree is searched depth-first to find a route whose + * path matches the URL. When one is found, all routes in the tree + * that lead to it are considered "active" and their components are + * rendered into the DOM, nested in the same order as in the tree. + */ + /* eslint-disable react/require-render-return */ + var Route = __WEBPACK_IMPORTED_MODULE_0_create_react_class___default()({ + displayName: 'Route', + + statics: { + createRouteFromReactElement: + __WEBPACK_IMPORTED_MODULE_3__RouteUtils__['a' /* createRouteFromReactElement */], + }, + + propTypes: { + path: __WEBPACK_IMPORTED_MODULE_1_prop_types__['string'], + component: __WEBPACK_IMPORTED_MODULE_4__InternalPropTypes__['a' /* component */], + components: __WEBPACK_IMPORTED_MODULE_4__InternalPropTypes__['b' /* components */], + getComponent: __WEBPACK_IMPORTED_MODULE_1_prop_types__['func'], + getComponents: __WEBPACK_IMPORTED_MODULE_1_prop_types__['func'], + }, + + /* istanbul ignore next: sanity check */ + render: function render() { + true + ? true + ? __WEBPACK_IMPORTED_MODULE_2_invariant___default()( + false, + '<Route> elements are for router configuration only and should not be rendered', + ) + : invariant(false) + : void 0; + }, + }); + + /* harmony default export */ __webpack_exports__['a'] = Route; + + /***/ + }, + /* 600 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_Actions__ = __webpack_require__(111); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_Actions___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_history_lib_Actions__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(14); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_invariant__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__createMemoryHistory__ = __webpack_require__(259); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__createTransitionManager__ = + __webpack_require__(254); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__RouteUtils__ = __webpack_require__(48); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__RouterUtils__ = __webpack_require__(256); + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + function _objectWithoutProperties(obj, keys) { + var target = {}; + for (var i in obj) { + if (keys.indexOf(i) >= 0) continue; + if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; + target[i] = obj[i]; + } + return target; + } + + /** + * A high-level API to be used for server-side rendering. + * + * This function matches a location to a set of routes and calls + * callback(error, redirectLocation, renderProps) when finished. + * + * Note: You probably don't want to use this in a browser unless you're using + * server-side rendering with async routes. + */ + function match(_ref, callback) { + var history = _ref.history, + routes = _ref.routes, + location = _ref.location, + options = _objectWithoutProperties(_ref, ['history', 'routes', 'location']); + + !(history || location) + ? true + ? __WEBPACK_IMPORTED_MODULE_1_invariant___default()(false, 'match needs a history or a location') + : invariant(false) + : void 0; + + history = history + ? history + : Object(__WEBPACK_IMPORTED_MODULE_2__createMemoryHistory__['a' /* default */])(options); + var transitionManager = Object( + __WEBPACK_IMPORTED_MODULE_3__createTransitionManager__['a' /* default */], + )(history, Object(__WEBPACK_IMPORTED_MODULE_4__RouteUtils__['b' /* createRoutes */])(routes)); + + if (location) { + // Allow match({ location: '/the/path', ... }) + location = history.createLocation(location); + } else { + location = history.getCurrentLocation(); + } + + transitionManager.match(location, function (error, redirectLocation, nextState) { + var renderProps = void 0; + + if (nextState) { + var router = Object(__WEBPACK_IMPORTED_MODULE_5__RouterUtils__['b' /* createRouterObject */])( + history, + transitionManager, + nextState, + ); + renderProps = _extends({}, nextState, { + router: router, + matchContext: { transitionManager: transitionManager, router: router }, + }); + } + + callback( + error, + redirectLocation && + history.createLocation( + redirectLocation, + __WEBPACK_IMPORTED_MODULE_0_history_lib_Actions__['REPLACE'], + ), + renderProps, + ); + }); + } + + /* harmony default export */ __webpack_exports__['a'] = match; + + /***/ + }, + /* 601 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var strictUriEncode = __webpack_require__(602); + var objectAssign = __webpack_require__(64); + + function encoderForArrayFormat(opts) { + switch (opts.arrayFormat) { + case 'index': + return function (key, value, index) { + return value === null + ? [encode(key, opts), '[', index, ']'].join('') + : [encode(key, opts), '[', encode(index, opts), ']=', encode(value, opts)].join(''); + }; + + case 'bracket': + return function (key, value) { + return value === null + ? encode(key, opts) + : [encode(key, opts), '[]=', encode(value, opts)].join(''); + }; + + default: + return function (key, value) { + return value === null + ? encode(key, opts) + : [encode(key, opts), '=', encode(value, opts)].join(''); + }; + } + } + + function parserForArrayFormat(opts) { + var result; + + switch (opts.arrayFormat) { + case 'index': + return function (key, value, accumulator) { + result = /\[(\d*)\]$/.exec(key); + + key = key.replace(/\[\d*\]$/, ''); + + if (!result) { + accumulator[key] = value; + return; + } + + if (accumulator[key] === undefined) { + accumulator[key] = {}; + } + + accumulator[key][result[1]] = value; + }; + + case 'bracket': + return function (key, value, accumulator) { + result = /(\[\])$/.exec(key); + key = key.replace(/\[\]$/, ''); + + if (!result) { + accumulator[key] = value; + return; + } else if (accumulator[key] === undefined) { + accumulator[key] = [value]; + return; + } + + accumulator[key] = [].concat(accumulator[key], value); + }; + + default: + return function (key, value, accumulator) { + if (accumulator[key] === undefined) { + accumulator[key] = value; + return; + } + + accumulator[key] = [].concat(accumulator[key], value); + }; + } + } + + function encode(value, opts) { + if (opts.encode) { + return opts.strict ? strictUriEncode(value) : encodeURIComponent(value); + } + + return value; + } + + function keysSorter(input) { + if (Array.isArray(input)) { + return input.sort(); + } else if (typeof input === 'object') { + return keysSorter(Object.keys(input)) + .sort(function (a, b) { + return Number(a) - Number(b); + }) + .map(function (key) { + return input[key]; + }); + } + + return input; + } + + exports.extract = function (str) { + return str.split('?')[1] || ''; + }; + + exports.parse = function (str, opts) { + opts = objectAssign({ arrayFormat: 'none' }, opts); + + var formatter = parserForArrayFormat(opts); + + // Create an object with no prototype + // https://github.com/sindresorhus/query-string/issues/47 + var ret = Object.create(null); + + if (typeof str !== 'string') { + return ret; + } + + str = str.trim().replace(/^(\?|#|&)/, ''); + + if (!str) { + return ret; + } + + str.split('&').forEach(function (param) { + var parts = param.replace(/\+/g, ' ').split('='); + // Firefox (pre 40) decodes `%3D` to `=` + // https://github.com/sindresorhus/query-string/pull/37 + var key = parts.shift(); + var val = parts.length > 0 ? parts.join('=') : undefined; + + // missing `=` should be `null`: + // http://w3.org/TR/2012/WD-url-20120524/#collect-url-parameters + val = val === undefined ? null : decodeURIComponent(val); + + formatter(decodeURIComponent(key), val, ret); + }); + + return Object.keys(ret) + .sort() + .reduce(function (result, key) { + var val = ret[key]; + if (Boolean(val) && typeof val === 'object' && !Array.isArray(val)) { + // Sort object keys, not values + result[key] = keysSorter(val); + } else { + result[key] = val; + } + + return result; + }, Object.create(null)); + }; + + exports.stringify = function (obj, opts) { + var defaults = { + encode: true, + strict: true, + arrayFormat: 'none', + }; + + opts = objectAssign(defaults, opts); + + var formatter = encoderForArrayFormat(opts); + + return obj + ? Object.keys(obj) + .sort() + .map(function (key) { + var val = obj[key]; + + if (val === undefined) { + return ''; + } + + if (val === null) { + return encode(key, opts); + } + + if (Array.isArray(val)) { + var result = []; + + val.slice().forEach(function (val2) { + if (val2 === undefined) { + return; + } + + result.push(formatter(key, val2, result.length)); + }); + + return result.join('&'); + } + + return encode(key, opts) + '=' + encode(val, opts); + }) + .filter(function (x) { + return x.length > 0; + }) + .join('&') + : ''; + }; + + /***/ + }, + /* 602 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + module.exports = function (str) { + return encodeURIComponent(str).replace(/[!'()*]/g, function (c) { + return '%' + c.charCodeAt(0).toString(16).toUpperCase(); + }); + }; + + /***/ + }, + /* 603 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + var _warning = __webpack_require__(47); + + var _warning2 = _interopRequireDefault(_warning); + + var _invariant = __webpack_require__(14); + + var _invariant2 = _interopRequireDefault(_invariant); + + var _LocationUtils = __webpack_require__(73); + + var _PathUtils = __webpack_require__(49); + + var _createHistory = __webpack_require__(172); + + var _createHistory2 = _interopRequireDefault(_createHistory); + + var _Actions = __webpack_require__(111); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + var createStateStorage = function createStateStorage(entries) { + return entries + .filter(function (entry) { + return entry.state; + }) + .reduce(function (memo, entry) { + memo[entry.key] = entry.state; + return memo; + }, {}); + }; + + var createMemoryHistory = function createMemoryHistory() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + + if (Array.isArray(options)) { + options = { entries: options }; + } else if (typeof options === 'string') { + options = { entries: [options] }; + } + + var getCurrentLocation = function getCurrentLocation() { + var entry = entries[current]; + var path = (0, _PathUtils.createPath)(entry); + + var key = void 0, + state = void 0; + if (entry.key) { + key = entry.key; + state = readState(key); + } + + var init = (0, _PathUtils.parsePath)(path); + + return (0, _LocationUtils.createLocation)(_extends({}, init, { state: state }), undefined, key); + }; + + var canGo = function canGo(n) { + var index = current + n; + return index >= 0 && index < entries.length; + }; + + var go = function go(n) { + if (!n) return; + + if (!canGo(n)) { + true ? (0, _warning2.default)(false, 'Cannot go(%s) there is not enough history', n) : void 0; + + return; + } + + current += n; + var currentLocation = getCurrentLocation(); + + // Change action to POP + history.transitionTo(_extends({}, currentLocation, { action: _Actions.POP })); + }; + + var pushLocation = function pushLocation(location) { + current += 1; + + if (current < entries.length) entries.splice(current); + + entries.push(location); + + saveState(location.key, location.state); + }; + + var replaceLocation = function replaceLocation(location) { + entries[current] = location; + saveState(location.key, location.state); + }; + + var history = (0, _createHistory2.default)( + _extends({}, options, { + getCurrentLocation: getCurrentLocation, + pushLocation: pushLocation, + replaceLocation: replaceLocation, + go: go, + }), + ); + + var _options = options, + entries = _options.entries, + current = _options.current; + + if (typeof entries === 'string') { + entries = [entries]; + } else if (!Array.isArray(entries)) { + entries = ['/']; + } + + entries = entries.map(function (entry) { + return (0, _LocationUtils.createLocation)(entry); + }); + + if (current == null) { + current = entries.length - 1; + } else { + !(current >= 0 && current < entries.length) + ? true + ? (0, _invariant2.default)( + false, + 'Current index must be >= 0 and < %s, was %s', + entries.length, + current, + ) + : (0, _invariant2.default)(false) + : void 0; + } + + var storage = createStateStorage(entries); + + var saveState = function saveState(key, state) { + return (storage[key] = state); + }; + + var readState = function readState(key) { + return storage[key]; + }; + + return _extends({}, history, { + canGo: canGo, + }); + }; + + exports.default = createMemoryHistory; + + /***/ + }, + /* 604 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + var loopAsync = (exports.loopAsync = function loopAsync(turns, work, callback) { + var currentTurn = 0, + isDone = false; + var isSync = false, + hasNext = false, + doneArgs = void 0; + + var done = function done() { + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + isDone = true; + + if (isSync) { + // Iterate instead of recursing if possible. + doneArgs = args; + return; + } + + callback.apply(undefined, args); + }; + + var next = function next() { + if (isDone) return; + + hasNext = true; + + if (isSync) return; // Iterate instead of recursing if possible. + + isSync = true; + + while (!isDone && currentTurn < turns && hasNext) { + hasNext = false; + work(currentTurn++, next, done); + } + + isSync = false; + + if (isDone) { + // This means the loop finished synchronously. + callback.apply(undefined, doneArgs); + return; + } + + if (currentTurn >= turns && hasNext) { + isDone = true; + callback(); + } + }; + + next(); + }); + + /***/ + }, + /* 605 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__RouterContext__ = __webpack_require__(168); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__routerWarning__ = __webpack_require__(71); + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + /* unused harmony default export */ var _unused_webpack_default_export = function () { + for (var _len = arguments.length, middlewares = Array(_len), _key = 0; _key < _len; _key++) { + middlewares[_key] = arguments[_key]; + } + + if (true) { + middlewares.forEach(function (middleware, index) { + true + ? Object(__WEBPACK_IMPORTED_MODULE_2__routerWarning__['a' /* default */])( + middleware.renderRouterContext || middleware.renderRouteComponent, + 'The middleware specified at index ' + + index + + ' does not appear to be ' + + 'a valid React Router middleware.', + ) + : void 0; + }); + } + + var withContext = middlewares + .map(function (middleware) { + return middleware.renderRouterContext; + }) + .filter(Boolean); + var withComponent = middlewares + .map(function (middleware) { + return middleware.renderRouteComponent; + }) + .filter(Boolean); + + var makeCreateElement = function makeCreateElement() { + var baseCreateElement = + arguments.length > 0 && arguments[0] !== undefined + ? arguments[0] + : __WEBPACK_IMPORTED_MODULE_0_react__['createElement']; + return function (Component, props) { + return withComponent.reduceRight( + function (previous, renderRouteComponent) { + return renderRouteComponent(previous, props); + }, + baseCreateElement(Component, props), + ); + }; + }; + + return function (renderProps) { + return withContext.reduceRight( + function (previous, renderRouterContext) { + return renderRouterContext(previous, renderProps); + }, + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_1__RouterContext__['a' /* default */], + _extends({}, renderProps, { + createElement: makeCreateElement(renderProps.createElement), + }), + ), + ); + }; + }; + + /***/ + }, + /* 606 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_createBrowserHistory__ = + __webpack_require__(607); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_createBrowserHistory___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_history_lib_createBrowserHistory__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__createRouterHistory__ = __webpack_require__(264); + + /* unused harmony default export */ var _unused_webpack_default_export = Object( + __WEBPACK_IMPORTED_MODULE_1__createRouterHistory__['a' /* default */], + )(__WEBPACK_IMPORTED_MODULE_0_history_lib_createBrowserHistory___default.a); + + /***/ + }, + /* 607 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + var _invariant = __webpack_require__(14); + + var _invariant2 = _interopRequireDefault(_invariant); + + var _ExecutionEnvironment = __webpack_require__(173); + + var _BrowserProtocol = __webpack_require__(174); + + var BrowserProtocol = _interopRequireWildcard(_BrowserProtocol); + + var _RefreshProtocol = __webpack_require__(608); + + var RefreshProtocol = _interopRequireWildcard(_RefreshProtocol); + + var _DOMUtils = __webpack_require__(112); + + var _createHistory = __webpack_require__(172); + + var _createHistory2 = _interopRequireDefault(_createHistory); + + function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; + } + } + newObj.default = obj; + return newObj; + } + } + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + /** + * Creates and returns a history object that uses HTML5's history API + * (pushState, replaceState, and the popstate event) to manage history. + * This is the recommended method of managing history in browsers because + * it provides the cleanest URLs. + * + * Note: In browsers that do not support the HTML5 history API full + * page reloads will be used to preserve clean URLs. You can force this + * behavior using { forceRefresh: true } in options. + */ + var createBrowserHistory = function createBrowserHistory() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + + !_ExecutionEnvironment.canUseDOM + ? true + ? (0, _invariant2.default)(false, 'Browser history needs a DOM') + : (0, _invariant2.default)(false) + : void 0; + + var useRefresh = options.forceRefresh || !(0, _DOMUtils.supportsHistory)(); + var Protocol = useRefresh ? RefreshProtocol : BrowserProtocol; + + var getUserConfirmation = Protocol.getUserConfirmation, + getCurrentLocation = Protocol.getCurrentLocation, + pushLocation = Protocol.pushLocation, + replaceLocation = Protocol.replaceLocation, + go = Protocol.go; + + var history = (0, _createHistory2.default)( + _extends( + { + getUserConfirmation: getUserConfirmation, + }, + options, + { + getCurrentLocation: getCurrentLocation, + pushLocation: pushLocation, + replaceLocation: replaceLocation, + go: go, + }, + ), + ); + + var listenerCount = 0, + stopListener = void 0; + + var startListener = function startListener(listener, before) { + if (++listenerCount === 1) stopListener = BrowserProtocol.startListener(history.transitionTo); + + var unlisten = before ? history.listenBefore(listener) : history.listen(listener); + + return function () { + unlisten(); + + if (--listenerCount === 0) stopListener(); + }; + }; + + var listenBefore = function listenBefore(listener) { + return startListener(listener, true); + }; + + var listen = function listen(listener) { + return startListener(listener, false); + }; + + return _extends({}, history, { + listenBefore: listenBefore, + listen: listen, + }); + }; + + exports.default = createBrowserHistory; + + /***/ + }, + /* 608 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + exports.replaceLocation = + exports.pushLocation = + exports.getCurrentLocation = + exports.go = + exports.getUserConfirmation = + undefined; + + var _BrowserProtocol = __webpack_require__(174); + + Object.defineProperty(exports, 'getUserConfirmation', { + enumerable: true, + get: function get() { + return _BrowserProtocol.getUserConfirmation; + }, + }); + Object.defineProperty(exports, 'go', { + enumerable: true, + get: function get() { + return _BrowserProtocol.go; + }, + }); + + var _LocationUtils = __webpack_require__(73); + + var _PathUtils = __webpack_require__(49); + + var getCurrentLocation = (exports.getCurrentLocation = function getCurrentLocation() { + return (0, _LocationUtils.createLocation)(window.location); + }); + + var pushLocation = (exports.pushLocation = function pushLocation(location) { + window.location.href = (0, _PathUtils.createPath)(location); + return false; // Don't update location + }); + + var replaceLocation = (exports.replaceLocation = function replaceLocation(location) { + window.location.replace((0, _PathUtils.createPath)(location)); + return false; // Don't update location + }); + + /***/ + }, + /* 609 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_createHashHistory__ = + __webpack_require__(610); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_createHashHistory___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_history_lib_createHashHistory__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__createRouterHistory__ = __webpack_require__(264); + + /* unused harmony default export */ var _unused_webpack_default_export = Object( + __WEBPACK_IMPORTED_MODULE_1__createRouterHistory__['a' /* default */], + )(__WEBPACK_IMPORTED_MODULE_0_history_lib_createHashHistory___default.a); + + /***/ + }, + /* 610 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + var _warning = __webpack_require__(47); + + var _warning2 = _interopRequireDefault(_warning); + + var _invariant = __webpack_require__(14); + + var _invariant2 = _interopRequireDefault(_invariant); + + var _ExecutionEnvironment = __webpack_require__(173); + + var _DOMUtils = __webpack_require__(112); + + var _HashProtocol = __webpack_require__(611); + + var HashProtocol = _interopRequireWildcard(_HashProtocol); + + var _createHistory = __webpack_require__(172); + + var _createHistory2 = _interopRequireDefault(_createHistory); + + function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; + } + } + newObj.default = obj; + return newObj; + } + } + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + var DefaultQueryKey = '_k'; + + var addLeadingSlash = function addLeadingSlash(path) { + return path.charAt(0) === '/' ? path : '/' + path; + }; + + var HashPathCoders = { + hashbang: { + encodePath: function encodePath(path) { + return path.charAt(0) === '!' ? path : '!' + path; + }, + decodePath: function decodePath(path) { + return path.charAt(0) === '!' ? path.substring(1) : path; + }, + }, + noslash: { + encodePath: function encodePath(path) { + return path.charAt(0) === '/' ? path.substring(1) : path; + }, + decodePath: addLeadingSlash, + }, + slash: { + encodePath: addLeadingSlash, + decodePath: addLeadingSlash, + }, + }; + + var createHashHistory = function createHashHistory() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + + !_ExecutionEnvironment.canUseDOM + ? true + ? (0, _invariant2.default)(false, 'Hash history needs a DOM') + : (0, _invariant2.default)(false) + : void 0; + + var queryKey = options.queryKey, + hashType = options.hashType; + + true + ? (0, _warning2.default)( + queryKey !== false, + "Using { queryKey: false } no longer works. Instead, just don't " + + "use location state if you don't want a key in your URL query string", + ) + : void 0; + + if (typeof queryKey !== 'string') queryKey = DefaultQueryKey; + + if (hashType == null) hashType = 'slash'; + + if (!(hashType in HashPathCoders)) { + true ? (0, _warning2.default)(false, 'Invalid hash type: %s', hashType) : void 0; + + hashType = 'slash'; + } + + var pathCoder = HashPathCoders[hashType]; + + var getUserConfirmation = HashProtocol.getUserConfirmation; + + var getCurrentLocation = function getCurrentLocation() { + return HashProtocol.getCurrentLocation(pathCoder, queryKey); + }; + + var pushLocation = function pushLocation(location) { + return HashProtocol.pushLocation(location, pathCoder, queryKey); + }; + + var replaceLocation = function replaceLocation(location) { + return HashProtocol.replaceLocation(location, pathCoder, queryKey); + }; + + var history = (0, _createHistory2.default)( + _extends( + { + getUserConfirmation: getUserConfirmation, + }, + options, + { + getCurrentLocation: getCurrentLocation, + pushLocation: pushLocation, + replaceLocation: replaceLocation, + go: HashProtocol.go, + }, + ), + ); + + var listenerCount = 0, + stopListener = void 0; + + var startListener = function startListener(listener, before) { + if (++listenerCount === 1) + stopListener = HashProtocol.startListener(history.transitionTo, pathCoder, queryKey); + + var unlisten = before ? history.listenBefore(listener) : history.listen(listener); + + return function () { + unlisten(); + + if (--listenerCount === 0) stopListener(); + }; + }; + + var listenBefore = function listenBefore(listener) { + return startListener(listener, true); + }; + + var listen = function listen(listener) { + return startListener(listener, false); + }; + + var goIsSupportedWithoutReload = (0, _DOMUtils.supportsGoWithoutReloadUsingHash)(); + + var go = function go(n) { + true + ? (0, _warning2.default)( + goIsSupportedWithoutReload, + 'Hash history go(n) causes a full page reload in this browser', + ) + : void 0; + + history.go(n); + }; + + var createHref = function createHref(path) { + return '#' + pathCoder.encodePath(history.createHref(path)); + }; + + return _extends({}, history, { + listenBefore: listenBefore, + listen: listen, + go: go, + createHref: createHref, + }); + }; + + exports.default = createHashHistory; + + /***/ + }, + /* 611 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + exports.__esModule = true; + exports.replaceLocation = + exports.pushLocation = + exports.startListener = + exports.getCurrentLocation = + exports.go = + exports.getUserConfirmation = + undefined; + + var _BrowserProtocol = __webpack_require__(174); + + Object.defineProperty(exports, 'getUserConfirmation', { + enumerable: true, + get: function get() { + return _BrowserProtocol.getUserConfirmation; + }, + }); + Object.defineProperty(exports, 'go', { + enumerable: true, + get: function get() { + return _BrowserProtocol.go; + }, + }); + + var _warning = __webpack_require__(47); + + var _warning2 = _interopRequireDefault(_warning); + + var _LocationUtils = __webpack_require__(73); + + var _DOMUtils = __webpack_require__(112); + + var _DOMStateStorage = __webpack_require__(263); + + var _PathUtils = __webpack_require__(49); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + var HashChangeEvent = 'hashchange'; + + var getHashPath = function getHashPath() { + // We can't use window.location.hash here because it's not + // consistent across browsers - Firefox will pre-decode it! + var href = window.location.href; + var hashIndex = href.indexOf('#'); + return hashIndex === -1 ? '' : href.substring(hashIndex + 1); + }; + + var pushHashPath = function pushHashPath(path) { + return (window.location.hash = path); + }; + + var replaceHashPath = function replaceHashPath(path) { + var hashIndex = window.location.href.indexOf('#'); + + window.location.replace(window.location.href.slice(0, hashIndex >= 0 ? hashIndex : 0) + '#' + path); + }; + + var getCurrentLocation = (exports.getCurrentLocation = function getCurrentLocation( + pathCoder, + queryKey, + ) { + var path = pathCoder.decodePath(getHashPath()); + var key = (0, _PathUtils.getQueryStringValueFromPath)(path, queryKey); + + var state = void 0; + if (key) { + path = (0, _PathUtils.stripQueryStringValueFromPath)(path, queryKey); + state = (0, _DOMStateStorage.readState)(key); + } + + var init = (0, _PathUtils.parsePath)(path); + init.state = state; + + return (0, _LocationUtils.createLocation)(init, undefined, key); + }); + + var prevLocation = void 0; + + var startListener = (exports.startListener = function startListener(listener, pathCoder, queryKey) { + var handleHashChange = function handleHashChange() { + var path = getHashPath(); + var encodedPath = pathCoder.encodePath(path); + + if (path !== encodedPath) { + // Always be sure we have a properly-encoded hash. + replaceHashPath(encodedPath); + } else { + var currentLocation = getCurrentLocation(pathCoder, queryKey); + + if (prevLocation && currentLocation.key && prevLocation.key === currentLocation.key) return; // Ignore extraneous hashchange events + + prevLocation = currentLocation; + + listener(currentLocation); + } + }; + + // Ensure the hash is encoded properly. + var path = getHashPath(); + var encodedPath = pathCoder.encodePath(path); + + if (path !== encodedPath) replaceHashPath(encodedPath); + + (0, _DOMUtils.addEventListener)(window, HashChangeEvent, handleHashChange); + + return function () { + return (0, _DOMUtils.removeEventListener)(window, HashChangeEvent, handleHashChange); + }; + }); + + var updateLocation = function updateLocation(location, pathCoder, queryKey, updateHash) { + var state = location.state, + key = location.key; + + var path = pathCoder.encodePath((0, _PathUtils.createPath)(location)); + + if (state !== undefined) { + path = (0, _PathUtils.addQueryStringValueToPath)(path, queryKey, key); + (0, _DOMStateStorage.saveState)(key, state); + } + + prevLocation = location; + + updateHash(path); + }; + + var pushLocation = (exports.pushLocation = function pushLocation(location, pathCoder, queryKey) { + return updateLocation(location, pathCoder, queryKey, function (path) { + if (getHashPath() !== path) { + pushHashPath(path); + } else { + true ? (0, _warning2.default)(false, 'You cannot PUSH the same path using hash history') : void 0; + } + }); + }); + + var replaceLocation = (exports.replaceLocation = function replaceLocation( + location, + pathCoder, + queryKey, + ) { + return updateLocation(location, pathCoder, queryKey, function (path) { + if (getHashPath() !== path) replaceHashPath(path); + }); + }); + + /***/ + }, + /* 612 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_router__ = __webpack_require__(85); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__components_RouterLayout__ = + __webpack_require__(613); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__components_RouterFirstPage__ = + __webpack_require__(614); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__components_RouterSecondPage__ = + __webpack_require__(615); + + var _default = __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_1_react_router__['b' /* Route */], + { + path: 'react_router', + component: __WEBPACK_IMPORTED_MODULE_2__components_RouterLayout__['a' /* default */], + }, + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_1_react_router__['b' /* Route */], + { + path: 'first_page', + component: __WEBPACK_IMPORTED_MODULE_3__components_RouterFirstPage__['a' /* default */], + }, + ), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_1_react_router__['b' /* Route */], + { + path: 'second_page', + component: __WEBPACK_IMPORTED_MODULE_4__components_RouterSecondPage__['a' /* default */], + }, + ), + ); + + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/routes/routes.jsx', + ); + })(); + + /***/ + }, + /* 613 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(10); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_router__ = __webpack_require__(85); + + var RouterLayout = function RouterLayout(_ref) { + var children = _ref.children; + return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'div', + { className: 'container' }, + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('h1', null, 'React Router is working!'), + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'p', + null, + 'Woohoo, we can use ', + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('code', null, 'react-router'), + ' here!', + ), + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'ul', + null, + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'li', + null, + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_2_react_router__['a' /* Link */], + { to: '/react_router' }, + 'React Router Layout Only', + ), + ), + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'li', + null, + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_2_react_router__['a' /* Link */], + { to: '/react_router/first_page' }, + 'Router First Page', + ), + ), + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'li', + null, + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_2_react_router__['a' /* Link */], + { to: '/react_router/second_page' }, + 'Router Second Page', + ), + ), + ), + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('hr', null), + children, + ); + }; + + RouterLayout.propTypes = { + children: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object, + }; + + var _default = RouterLayout; + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + RouterLayout, + 'RouterLayout', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/RouterLayout.jsx', + ); + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/RouterLayout.jsx', + ); + })(); + + /***/ + }, + /* 614 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + + var RouterFirstPage = function RouterFirstPage() { + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'div', + { className: 'container' }, + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('h2', null, 'React Router First Page'), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'p', + null, + 'This page brought to you by React Router', + ), + ); + }; + + var _default = RouterFirstPage; + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + RouterFirstPage, + 'RouterFirstPage', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/RouterFirstPage.jsx', + ); + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/RouterFirstPage.jsx', + ); + })(); + + /***/ + }, + /* 615 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + + var RouterSecondPage = function RouterSecondPage() { + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'div', + { className: 'container' }, + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('h2', null, 'React Router Second Page'), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'p', + null, + 'This page brought to you by React Router', + ), + ); + }; + + var _default = RouterSecondPage; + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + RouterSecondPage, + 'RouterSecondPage', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/RouterSecondPage.jsx', + ); + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/RouterSecondPage.jsx', + ); + })(); + + /***/ + }, + /* 616 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + /* eslint-disable react/prop-types */ + + var _default = function _default(props) { + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('h1', null, props.title); + }; + + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/PureComponent.jsx', + ); + })(); + + /***/ + }, + /* 617 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__CssModulesImagesFontsExample_scss__ = + __webpack_require__(618); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__CssModulesImagesFontsExample_scss___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__CssModulesImagesFontsExample_scss__); + /* eslint-disable react/prop-types */ + + var _default = function _default(_props, _railsContext) { + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'div', + null, + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'h1', + { className: __WEBPACK_IMPORTED_MODULE_1__CssModulesImagesFontsExample_scss___default.a.heading }, + 'This should be open sans light', + ), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'div', + null, + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'h2', + null, + 'Last Call (relative path)', + ), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div', { + className: __WEBPACK_IMPORTED_MODULE_1__CssModulesImagesFontsExample_scss___default.a.lastCall, + }), + ), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'div', + null, + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('h2', null, 'Check (URL encoded)'), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div', { + className: __WEBPACK_IMPORTED_MODULE_1__CssModulesImagesFontsExample_scss___default.a.check, + }), + ), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'div', + null, + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'h2', + null, + 'Rails on Maui Logo (absolute path)', + ), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div', { + className: + __WEBPACK_IMPORTED_MODULE_1__CssModulesImagesFontsExample_scss___default.a.railsOnMaui, + }), + ), + ); + }; + + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/CssModulesImagesFontsExample.jsx', + ); + })(); + + /***/ + }, + /* 618 */ + /***/ function (module, exports) { + module.exports = { + heading: 'CssModulesImagesFontsExample__heading__2GwOW', + check: 'CssModulesImagesFontsExample__check__Fa5t1', + lastCall: 'CssModulesImagesFontsExample__lastCall__2o_LE', + railsOnMaui: 'CssModulesImagesFontsExample__railsOnMaui__3s9ht', + }; + + /***/ + }, + /* 619 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_redux__ = __webpack_require__(110); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_redux_thunk__ = __webpack_require__(250); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__reducers_reducersIndex__ = + __webpack_require__(251); + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + /* + * Export a function that takes the props and returns a Redux store + * This is used so that 2 components can have the same store. + */ + + var _default = function _default(props, railsContext) { + var combinedReducer = Object(__WEBPACK_IMPORTED_MODULE_0_redux__['c' /* combineReducers */])( + __WEBPACK_IMPORTED_MODULE_2__reducers_reducersIndex__['a' /* default */], + ); + var newProps = _extends({}, props, { railsContext: railsContext }); + return Object(__WEBPACK_IMPORTED_MODULE_0_redux__['a' /* applyMiddleware */])( + __WEBPACK_IMPORTED_MODULE_1_redux_thunk__['a' /* default */], + )(__WEBPACK_IMPORTED_MODULE_0_redux__['d' /* createStore */])(combinedReducer, newProps); + }; + + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/stores/SharedReduxStore.jsx', + ); + })(); + + /***/ + }, + /* 620 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_router__ = __webpack_require__(85); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__components_DeferredRender__ = + __webpack_require__(621); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__components_DeferredRenderAsyncPage__ = + __webpack_require__(622); + + var DeferredRenderAppServer = function DeferredRenderAppServer(_props, railsContext) { + var error = void 0; + var redirectLocation = void 0; + var routerProps = void 0; + + var location = railsContext.location; + + var routes = { + path: '/deferred_render_with_server_rendering', + component: __WEBPACK_IMPORTED_MODULE_2__components_DeferredRender__['a' /* default */], + childRoutes: [ + { + path: '/deferred_render_with_server_rendering/async_page', + component: __WEBPACK_IMPORTED_MODULE_3__components_DeferredRenderAsyncPage__['a' /* default */], + }, + ], + }; + + // Unlike the match in DeferredRenderAppRenderer, this match is always + // syncronous because we directly require all the routes. Do not do anything + // asyncronous in code that will run on the server. + Object(__WEBPACK_IMPORTED_MODULE_1_react_router__['d' /* match */])( + { location: location, routes: routes }, + function (_error, _redirectLocation, _routerProps) { + error = _error; + redirectLocation = _redirectLocation; + routerProps = _routerProps; + }, + ); + + if (error || redirectLocation) { + return { error: error, redirectLocation: redirectLocation }; + } + + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_1_react_router__['c' /* RouterContext */], + routerProps, + ); + }; + + var _default = DeferredRenderAppServer; + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + DeferredRenderAppServer, + 'DeferredRenderAppServer', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/startup/DeferredRenderAppServer.jsx', + ); + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/startup/DeferredRenderAppServer.jsx', + ); + })(); + + /***/ + }, + /* 621 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(10); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_router__ = __webpack_require__(85); + + var DeferredRender = function DeferredRender(_ref) { + var children = _ref.children; + return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'div', + null, + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('h1', null, 'Deferred Rendering'), + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'p', + null, + "Here, we're testing async routes with server rendering. By deferring the initial render, we can prevent a client/server checksum mismatch error.", + ), + children || + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + 'p', + null, + __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_2_react_router__['a' /* Link */], + { to: '/deferred_render_with_server_rendering/async_page' }, + 'Test Async Route', + ), + ), + ); + }; + + DeferredRender.propTypes = { + children: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.node, + }; + + var _default = DeferredRender; + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + DeferredRender, + 'DeferredRender', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/DeferredRender.jsx', + ); + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/DeferredRender.jsx', + ); + })(); + + /***/ + }, + /* 622 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + + var DeferredRenderAsyncPage = function DeferredRenderAsyncPage() { + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'div', + null, + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('p', null, 'Noice! It works.'), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'p', + null, + "Now, try reloading this page and looking at the developer console. There shouldn't be any client/server mismatch error from React.", + ), + ); + }; + + var _default = DeferredRenderAsyncPage; + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + DeferredRenderAsyncPage, + 'DeferredRenderAsyncPage', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/DeferredRenderAsyncPage.jsx', + ); + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/DeferredRenderAsyncPage.jsx', + ); + })(); + + /***/ + }, + /* 623 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_dom_server__ = __webpack_require__(108); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_dom_server___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_react_dom_server__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__components_EchoProps__ = __webpack_require__(624); + // Top level component for simple client side only rendering + + /* + * Export a function that takes the props and returns an object with { renderedHtml } + * Note, this is imported as "RenderedHtml" by "serverRegistration.jsx" + * + * Note, this is a fictional example, as you'd only use a generator function if you wanted to run + * some extra code, such as setting up Redux and React-Router. + * + * And the use of renderToString would probably be done with react-router v4 + * + */ + + var _default = function _default(props, _railsContext) { + var renderedHtml = Object(__WEBPACK_IMPORTED_MODULE_1_react_dom_server__['renderToString'])( + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_2__components_EchoProps__['a' /* default */], + props, + ), + ); + return { renderedHtml: renderedHtml }; + }; + + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/startup/ServerRenderedHtml.jsx', + ); + })(); + + /***/ + }, + /* 624 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + + var EchoProps = function EchoProps(props) { + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'div', + null, + 'Props: ', + JSON.stringify(props), + ); + }; + + var _default = EchoProps; + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + EchoProps, + 'EchoProps', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/EchoProps.jsx', + ); + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/EchoProps.jsx', + ); + })(); + + /***/ + }, + /* 625 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_dom_server__ = __webpack_require__(108); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_dom_server___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_react_dom_server__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_helmet__ = __webpack_require__(265); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_helmet___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_2_react_helmet__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__components_ReactHelmet__ = + __webpack_require__(630); + // Top level component for simple client side only rendering + + /* + * Export a function that takes the props and returns an object with { renderedHtml } + * This example shows returning renderedHtml as an object itself that contains rendered + * component markup and additional HTML strings. + * + * This is imported as "ReactHelmetApp" by "serverRegistration.jsx". Note that rendered + * component markup must go under "componentHtml" key. + */ + + var _default = function _default(props, _railsContext) { + var componentHtml = Object(__WEBPACK_IMPORTED_MODULE_1_react_dom_server__['renderToString'])( + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_3__components_ReactHelmet__['a' /* default */], + props, + ), + ); + var helmet = __WEBPACK_IMPORTED_MODULE_2_react_helmet__['Helmet'].renderStatic(); + + var renderedHtml = { + componentHtml: componentHtml, + title: helmet.title.toString(), + }; + return { renderedHtml: renderedHtml }; + }; + + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/startup/ReactHelmetServerApp.jsx', + ); + })(); + + /***/ + }, + /* 626 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + function _interopDefault(ex) { + return ex && typeof ex === 'object' && 'default' in ex ? ex['default'] : ex; + } + + var React = __webpack_require__(1); + var React__default = _interopDefault(React); + var shallowEqual = _interopDefault(__webpack_require__(627)); + + 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 _inheritsLoose(subClass, superClass) { + subClass.prototype = Object.create(superClass.prototype); + subClass.prototype.constructor = subClass; + subClass.__proto__ = superClass; + } + + var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement); + function withSideEffect(reducePropsToState, handleStateChangeOnClient, mapStateOnServer) { + if (typeof reducePropsToState !== 'function') { + throw new Error('Expected reducePropsToState to be a function.'); + } + + if (typeof handleStateChangeOnClient !== 'function') { + throw new Error('Expected handleStateChangeOnClient to be a function.'); + } + + if (typeof mapStateOnServer !== 'undefined' && typeof mapStateOnServer !== 'function') { + throw new Error('Expected mapStateOnServer to either be undefined or a function.'); + } + + function getDisplayName(WrappedComponent) { + return WrappedComponent.displayName || WrappedComponent.name || 'Component'; + } + + return function wrap(WrappedComponent) { + if (typeof WrappedComponent !== 'function') { + throw new Error('Expected WrappedComponent to be a React component.'); + } + + var mountedInstances = []; + var state; + + function emitChange() { + state = reducePropsToState( + mountedInstances.map(function (instance) { + return instance.props; + }), + ); + + if (SideEffect.canUseDOM) { + handleStateChangeOnClient(state); + } else if (mapStateOnServer) { + state = mapStateOnServer(state); + } + } + + var SideEffect = + /*#__PURE__*/ + (function (_Component) { + _inheritsLoose(SideEffect, _Component); + + function SideEffect() { + return _Component.apply(this, arguments) || this; + } + + // Try to use displayName of wrapped component + // Expose canUseDOM so tests can monkeypatch it + SideEffect.peek = function peek() { + return state; + }; + + SideEffect.rewind = function rewind() { + if (SideEffect.canUseDOM) { + throw new Error( + 'You may only call rewind() on the server. Call peek() to read the current state.', + ); + } + + var recordedState = state; + state = undefined; + mountedInstances = []; + return recordedState; + }; + + var _proto = SideEffect.prototype; + + _proto.shouldComponentUpdate = function shouldComponentUpdate(nextProps) { + return !shallowEqual(nextProps, this.props); + }; + + _proto.componentWillMount = function componentWillMount() { + mountedInstances.push(this); + emitChange(); + }; + + _proto.componentDidUpdate = function componentDidUpdate() { + emitChange(); + }; + + _proto.componentWillUnmount = function componentWillUnmount() { + var index = mountedInstances.indexOf(this); + mountedInstances.splice(index, 1); + emitChange(); + }; + + _proto.render = function render() { + return React__default.createElement(WrappedComponent, this.props); + }; + + return SideEffect; + })(React.Component); + + _defineProperty(SideEffect, 'displayName', 'SideEffect(' + getDisplayName(WrappedComponent) + ')'); + + _defineProperty(SideEffect, 'canUseDOM', canUseDOM); + + return SideEffect; + }; + } + + module.exports = withSideEffect; + + /***/ + }, + /* 627 */ + /***/ function (module, exports) { + // + + module.exports = function shallowEqual(objA, objB, compare, compareContext) { + var ret = compare ? compare.call(compareContext, objA, objB) : void 0; + + if (ret !== void 0) { + return !!ret; + } + + if (objA === objB) { + return true; + } + + if (typeof objA !== 'object' || !objA || typeof objB !== 'object' || !objB) { + return false; + } + + var keysA = Object.keys(objA); + var keysB = Object.keys(objB); + + if (keysA.length !== keysB.length) { + return false; + } + + var bHasOwnProperty = Object.prototype.hasOwnProperty.bind(objB); + + // Test for A's keys different from B. + for (var idx = 0; idx < keysA.length; idx++) { + var key = keysA[idx]; + + if (!bHasOwnProperty(key)) { + return false; + } + + var valueA = objA[key]; + var valueB = objB[key]; + + ret = compare ? compare.call(compareContext, valueA, valueB, key) : void 0; + + if (ret === false || (ret === void 0 && valueA !== valueB)) { + return false; + } + } + + return true; + }; + + /***/ + }, + /* 628 */ + /***/ function (module, exports, __webpack_require__) { + 'use strict'; + + var isArray = Array.isArray; + var keyList = Object.keys; + var hasProp = Object.prototype.hasOwnProperty; + var hasElementType = typeof Element !== 'undefined'; + + function equal(a, b) { + // fast-deep-equal index.js 2.0.1 + if (a === b) return true; + + if (a && b && typeof a == 'object' && typeof b == 'object') { + var arrA = isArray(a), + arrB = isArray(b), + i, + length, + key; + + if (arrA && arrB) { + length = a.length; + if (length != b.length) return false; + for (i = length; i-- !== 0; ) if (!equal(a[i], b[i])) return false; + return true; + } + + if (arrA != arrB) return false; + + var dateA = a instanceof Date, + dateB = b instanceof Date; + if (dateA != dateB) return false; + if (dateA && dateB) return a.getTime() == b.getTime(); + + var regexpA = a instanceof RegExp, + regexpB = b instanceof RegExp; + if (regexpA != regexpB) return false; + if (regexpA && regexpB) return a.toString() == b.toString(); + + var keys = keyList(a); + length = keys.length; + + if (length !== keyList(b).length) return false; + + for (i = length; i-- !== 0; ) if (!hasProp.call(b, keys[i])) return false; + // end fast-deep-equal + + // start react-fast-compare + // custom handling for DOM elements + if (hasElementType && a instanceof Element && b instanceof Element) return a === b; + + // custom handling for React + for (i = length; i-- !== 0; ) { + key = keys[i]; + if (key === '_owner' && a.$$typeof) { + // React-specific: avoid traversing React elements' _owner. + // _owner contains circular references + // and is not needed when comparing the actual elements (and not their owners) + // .$$typeof and ._store on just reasonable markers of a react element + continue; + } else { + // all other properties should be traversed as usual + if (!equal(a[key], b[key])) return false; + } + } + // end react-fast-compare + + // fast-deep-equal index.js 2.0.1 + return true; + } + + return a !== a && b !== b; + } + // end fast-deep-equal + + module.exports = function exportedEqual(a, b) { + try { + return equal(a, b); + } catch (error) { + if ((error.message && error.message.match(/stack|recursion/i)) || error.number === -2146828260) { + // warn on circular references, don't crash + // browsers give this different errors name and messages: + // chrome/safari: "RangeError", "Maximum call stack size exceeded" + // firefox: "InternalError", too much recursion" + // edge: "Error", "Out of stack space" + console.warn( + 'Warning: react-fast-compare does not handle circular references.', + error.name, + error.message, + ); + return false; + } + // some other error. we should definitely know about these + throw error; + } + }; + + /***/ + }, + /* 629 */ + /***/ function (module, exports, __webpack_require__) { + /* WEBPACK VAR INJECTION */ (function (global) { + exports.__esModule = true; + exports.warn = + exports.requestAnimationFrame = + exports.reducePropsToState = + exports.mapStateOnServer = + exports.handleClientStateChange = + exports.convertReactPropstoHtmlAttributes = + undefined; + + var _typeof = + typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' + ? function (obj) { + return typeof obj; + } + : function (obj) { + return obj && + typeof Symbol === 'function' && + obj.constructor === Symbol && + obj !== Symbol.prototype + ? 'symbol' + : typeof obj; + }; + + var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + var _react = __webpack_require__(1); + + var _react2 = _interopRequireDefault(_react); + + var _objectAssign = __webpack_require__(64); + + var _objectAssign2 = _interopRequireDefault(_objectAssign); + + var _HelmetConstants = __webpack_require__(266); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + var encodeSpecialCharacters = function encodeSpecialCharacters(str) { + var encode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + + if (encode === false) { + return String(str); + } + + return String(str) + .replace(/&/g, '&') + .replace(/</g, '<') + .replace(/>/g, '>') + .replace(/"/g, '"') + .replace(/'/g, '''); + }; + + var getTitleFromPropsList = function getTitleFromPropsList(propsList) { + var innermostTitle = getInnermostProperty(propsList, _HelmetConstants.TAG_NAMES.TITLE); + var innermostTemplate = getInnermostProperty( + propsList, + _HelmetConstants.HELMET_PROPS.TITLE_TEMPLATE, + ); + + if (innermostTemplate && innermostTitle) { + // use function arg to avoid need to escape $ characters + return innermostTemplate.replace(/%s/g, function () { + return innermostTitle; + }); + } + + var innermostDefaultTitle = getInnermostProperty( + propsList, + _HelmetConstants.HELMET_PROPS.DEFAULT_TITLE, + ); + + return innermostTitle || innermostDefaultTitle || undefined; + }; + + var getOnChangeClientState = function getOnChangeClientState(propsList) { + return ( + getInnermostProperty(propsList, _HelmetConstants.HELMET_PROPS.ON_CHANGE_CLIENT_STATE) || + function () {} + ); + }; + + var getAttributesFromPropsList = function getAttributesFromPropsList(tagType, propsList) { + return propsList + .filter(function (props) { + return typeof props[tagType] !== 'undefined'; + }) + .map(function (props) { + return props[tagType]; + }) + .reduce(function (tagAttrs, current) { + return _extends({}, tagAttrs, current); + }, {}); + }; + + var getBaseTagFromPropsList = function getBaseTagFromPropsList(primaryAttributes, propsList) { + return propsList + .filter(function (props) { + return typeof props[_HelmetConstants.TAG_NAMES.BASE] !== 'undefined'; + }) + .map(function (props) { + return props[_HelmetConstants.TAG_NAMES.BASE]; + }) + .reverse() + .reduce(function (innermostBaseTag, tag) { + if (!innermostBaseTag.length) { + var keys = Object.keys(tag); + + for (var i = 0; i < keys.length; i++) { + var attributeKey = keys[i]; + var lowerCaseAttributeKey = attributeKey.toLowerCase(); + + if (primaryAttributes.indexOf(lowerCaseAttributeKey) !== -1 && tag[lowerCaseAttributeKey]) { + return innermostBaseTag.concat(tag); + } + } + } + + return innermostBaseTag; + }, []); + }; + + var getTagsFromPropsList = function getTagsFromPropsList(tagName, primaryAttributes, propsList) { + // Calculate list of tags, giving priority innermost component (end of the propslist) + var approvedSeenTags = {}; + + return propsList + .filter(function (props) { + if (Array.isArray(props[tagName])) { + return true; + } + if (typeof props[tagName] !== 'undefined') { + warn( + 'Helmet: ' + + tagName + + ' should be of type "Array". Instead found type "' + + _typeof(props[tagName]) + + '"', + ); + } + return false; + }) + .map(function (props) { + return props[tagName]; + }) + .reverse() + .reduce(function (approvedTags, instanceTags) { + var instanceSeenTags = {}; + + instanceTags + .filter(function (tag) { + var primaryAttributeKey = void 0; + var keys = Object.keys(tag); + for (var i = 0; i < keys.length; i++) { + var attributeKey = keys[i]; + var lowerCaseAttributeKey = attributeKey.toLowerCase(); + + // Special rule with link tags, since rel and href are both primary tags, rel takes priority + if ( + primaryAttributes.indexOf(lowerCaseAttributeKey) !== -1 && + !( + primaryAttributeKey === _HelmetConstants.TAG_PROPERTIES.REL && + tag[primaryAttributeKey].toLowerCase() === 'canonical' + ) && + !( + lowerCaseAttributeKey === _HelmetConstants.TAG_PROPERTIES.REL && + tag[lowerCaseAttributeKey].toLowerCase() === 'stylesheet' + ) + ) { + primaryAttributeKey = lowerCaseAttributeKey; + } + // Special case for innerHTML which doesn't work lowercased + if ( + primaryAttributes.indexOf(attributeKey) !== -1 && + (attributeKey === _HelmetConstants.TAG_PROPERTIES.INNER_HTML || + attributeKey === _HelmetConstants.TAG_PROPERTIES.CSS_TEXT || + attributeKey === _HelmetConstants.TAG_PROPERTIES.ITEM_PROP) + ) { + primaryAttributeKey = attributeKey; + } + } + + if (!primaryAttributeKey || !tag[primaryAttributeKey]) { + return false; + } + + var value = tag[primaryAttributeKey].toLowerCase(); + + if (!approvedSeenTags[primaryAttributeKey]) { + approvedSeenTags[primaryAttributeKey] = {}; + } + + if (!instanceSeenTags[primaryAttributeKey]) { + instanceSeenTags[primaryAttributeKey] = {}; + } + + if (!approvedSeenTags[primaryAttributeKey][value]) { + instanceSeenTags[primaryAttributeKey][value] = true; + return true; + } + + return false; + }) + .reverse() + .forEach(function (tag) { + return approvedTags.push(tag); + }); + + // Update seen tags with tags from this instance + var keys = Object.keys(instanceSeenTags); + for (var i = 0; i < keys.length; i++) { + var attributeKey = keys[i]; + var tagUnion = (0, _objectAssign2.default)( + {}, + approvedSeenTags[attributeKey], + instanceSeenTags[attributeKey], + ); + + approvedSeenTags[attributeKey] = tagUnion; + } + + return approvedTags; + }, []) + .reverse(); + }; + + var getInnermostProperty = function getInnermostProperty(propsList, property) { + for (var i = propsList.length - 1; i >= 0; i--) { + var props = propsList[i]; + + if (props.hasOwnProperty(property)) { + return props[property]; + } + } + + return null; + }; + + var reducePropsToState = function reducePropsToState(propsList) { + return { + baseTag: getBaseTagFromPropsList([_HelmetConstants.TAG_PROPERTIES.HREF], propsList), + bodyAttributes: getAttributesFromPropsList(_HelmetConstants.ATTRIBUTE_NAMES.BODY, propsList), + defer: getInnermostProperty(propsList, _HelmetConstants.HELMET_PROPS.DEFER), + encode: getInnermostProperty(propsList, _HelmetConstants.HELMET_PROPS.ENCODE_SPECIAL_CHARACTERS), + htmlAttributes: getAttributesFromPropsList(_HelmetConstants.ATTRIBUTE_NAMES.HTML, propsList), + linkTags: getTagsFromPropsList( + _HelmetConstants.TAG_NAMES.LINK, + [_HelmetConstants.TAG_PROPERTIES.REL, _HelmetConstants.TAG_PROPERTIES.HREF], + propsList, + ), + metaTags: getTagsFromPropsList( + _HelmetConstants.TAG_NAMES.META, + [ + _HelmetConstants.TAG_PROPERTIES.NAME, + _HelmetConstants.TAG_PROPERTIES.CHARSET, + _HelmetConstants.TAG_PROPERTIES.HTTPEQUIV, + _HelmetConstants.TAG_PROPERTIES.PROPERTY, + _HelmetConstants.TAG_PROPERTIES.ITEM_PROP, + ], + propsList, + ), + noscriptTags: getTagsFromPropsList( + _HelmetConstants.TAG_NAMES.NOSCRIPT, + [_HelmetConstants.TAG_PROPERTIES.INNER_HTML], + propsList, + ), + onChangeClientState: getOnChangeClientState(propsList), + scriptTags: getTagsFromPropsList( + _HelmetConstants.TAG_NAMES.SCRIPT, + [_HelmetConstants.TAG_PROPERTIES.SRC, _HelmetConstants.TAG_PROPERTIES.INNER_HTML], + propsList, + ), + styleTags: getTagsFromPropsList( + _HelmetConstants.TAG_NAMES.STYLE, + [_HelmetConstants.TAG_PROPERTIES.CSS_TEXT], + propsList, + ), + title: getTitleFromPropsList(propsList), + titleAttributes: getAttributesFromPropsList(_HelmetConstants.ATTRIBUTE_NAMES.TITLE, propsList), + }; + }; + + var rafPolyfill = (function () { + var clock = Date.now(); + + return function (callback) { + var currentTime = Date.now(); + + if (currentTime - clock > 16) { + clock = currentTime; + callback(currentTime); + } else { + setTimeout(function () { + rafPolyfill(callback); + }, 0); + } + }; + })(); + + var cafPolyfill = function cafPolyfill(id) { + return clearTimeout(id); + }; + + var requestAnimationFrame = + typeof window !== 'undefined' + ? window.requestAnimationFrame || + window.webkitRequestAnimationFrame || + window.mozRequestAnimationFrame || + rafPolyfill + : global.requestAnimationFrame || rafPolyfill; + + var cancelAnimationFrame = + typeof window !== 'undefined' + ? window.cancelAnimationFrame || + window.webkitCancelAnimationFrame || + window.mozCancelAnimationFrame || + cafPolyfill + : global.cancelAnimationFrame || cafPolyfill; + + var warn = function warn(msg) { + return console && typeof console.warn === 'function' && console.warn(msg); + }; + + var _helmetCallback = null; + + var handleClientStateChange = function handleClientStateChange(newState) { + if (_helmetCallback) { + cancelAnimationFrame(_helmetCallback); + } + + if (newState.defer) { + _helmetCallback = requestAnimationFrame(function () { + commitTagChanges(newState, function () { + _helmetCallback = null; + }); + }); + } else { + commitTagChanges(newState); + _helmetCallback = null; + } + }; + + var commitTagChanges = function commitTagChanges(newState, cb) { + var baseTag = newState.baseTag, + bodyAttributes = newState.bodyAttributes, + htmlAttributes = newState.htmlAttributes, + linkTags = newState.linkTags, + metaTags = newState.metaTags, + noscriptTags = newState.noscriptTags, + onChangeClientState = newState.onChangeClientState, + scriptTags = newState.scriptTags, + styleTags = newState.styleTags, + title = newState.title, + titleAttributes = newState.titleAttributes; + + updateAttributes(_HelmetConstants.TAG_NAMES.BODY, bodyAttributes); + updateAttributes(_HelmetConstants.TAG_NAMES.HTML, htmlAttributes); + + updateTitle(title, titleAttributes); + + var tagUpdates = { + baseTag: updateTags(_HelmetConstants.TAG_NAMES.BASE, baseTag), + linkTags: updateTags(_HelmetConstants.TAG_NAMES.LINK, linkTags), + metaTags: updateTags(_HelmetConstants.TAG_NAMES.META, metaTags), + noscriptTags: updateTags(_HelmetConstants.TAG_NAMES.NOSCRIPT, noscriptTags), + scriptTags: updateTags(_HelmetConstants.TAG_NAMES.SCRIPT, scriptTags), + styleTags: updateTags(_HelmetConstants.TAG_NAMES.STYLE, styleTags), + }; + + var addedTags = {}; + var removedTags = {}; + + Object.keys(tagUpdates).forEach(function (tagType) { + var _tagUpdates$tagType = tagUpdates[tagType], + newTags = _tagUpdates$tagType.newTags, + oldTags = _tagUpdates$tagType.oldTags; + + if (newTags.length) { + addedTags[tagType] = newTags; + } + if (oldTags.length) { + removedTags[tagType] = tagUpdates[tagType].oldTags; + } + }); + + cb && cb(); + + onChangeClientState(newState, addedTags, removedTags); + }; + + var flattenArray = function flattenArray(possibleArray) { + return Array.isArray(possibleArray) ? possibleArray.join('') : possibleArray; + }; + + var updateTitle = function updateTitle(title, attributes) { + if (typeof title !== 'undefined' && document.title !== title) { + document.title = flattenArray(title); + } + + updateAttributes(_HelmetConstants.TAG_NAMES.TITLE, attributes); + }; + + var updateAttributes = function updateAttributes(tagName, attributes) { + var elementTag = document.getElementsByTagName(tagName)[0]; + + if (!elementTag) { + return; + } + + var helmetAttributeString = elementTag.getAttribute(_HelmetConstants.HELMET_ATTRIBUTE); + var helmetAttributes = helmetAttributeString ? helmetAttributeString.split(',') : []; + var attributesToRemove = [].concat(helmetAttributes); + var attributeKeys = Object.keys(attributes); + + for (var i = 0; i < attributeKeys.length; i++) { + var attribute = attributeKeys[i]; + var value = attributes[attribute] || ''; + + if (elementTag.getAttribute(attribute) !== value) { + elementTag.setAttribute(attribute, value); + } + + if (helmetAttributes.indexOf(attribute) === -1) { + helmetAttributes.push(attribute); + } + + var indexToSave = attributesToRemove.indexOf(attribute); + if (indexToSave !== -1) { + attributesToRemove.splice(indexToSave, 1); + } + } + + for (var _i = attributesToRemove.length - 1; _i >= 0; _i--) { + elementTag.removeAttribute(attributesToRemove[_i]); + } + + if (helmetAttributes.length === attributesToRemove.length) { + elementTag.removeAttribute(_HelmetConstants.HELMET_ATTRIBUTE); + } else if (elementTag.getAttribute(_HelmetConstants.HELMET_ATTRIBUTE) !== attributeKeys.join(',')) { + elementTag.setAttribute(_HelmetConstants.HELMET_ATTRIBUTE, attributeKeys.join(',')); + } + }; + + var updateTags = function updateTags(type, tags) { + var headElement = document.head || document.querySelector(_HelmetConstants.TAG_NAMES.HEAD); + var tagNodes = headElement.querySelectorAll(type + '[' + _HelmetConstants.HELMET_ATTRIBUTE + ']'); + var oldTags = Array.prototype.slice.call(tagNodes); + var newTags = []; + var indexToDelete = void 0; + + if (tags && tags.length) { + tags.forEach(function (tag) { + var newElement = document.createElement(type); + + for (var attribute in tag) { + if (tag.hasOwnProperty(attribute)) { + if (attribute === _HelmetConstants.TAG_PROPERTIES.INNER_HTML) { + newElement.innerHTML = tag.innerHTML; + } else if (attribute === _HelmetConstants.TAG_PROPERTIES.CSS_TEXT) { + if (newElement.styleSheet) { + newElement.styleSheet.cssText = tag.cssText; + } else { + newElement.appendChild(document.createTextNode(tag.cssText)); + } + } else { + var value = typeof tag[attribute] === 'undefined' ? '' : tag[attribute]; + newElement.setAttribute(attribute, value); + } + } + } + + newElement.setAttribute(_HelmetConstants.HELMET_ATTRIBUTE, 'true'); + + // Remove a duplicate tag from domTagstoRemove, so it isn't cleared. + if ( + oldTags.some(function (existingTag, index) { + indexToDelete = index; + return newElement.isEqualNode(existingTag); + }) + ) { + oldTags.splice(indexToDelete, 1); + } else { + newTags.push(newElement); + } + }); + } + + oldTags.forEach(function (tag) { + return tag.parentNode.removeChild(tag); + }); + newTags.forEach(function (tag) { + return headElement.appendChild(tag); + }); + + return { + oldTags: oldTags, + newTags: newTags, + }; + }; + + var generateElementAttributesAsString = function generateElementAttributesAsString(attributes) { + return Object.keys(attributes).reduce(function (str, key) { + var attr = typeof attributes[key] !== 'undefined' ? key + '="' + attributes[key] + '"' : '' + key; + return str ? str + ' ' + attr : attr; + }, ''); + }; + + var generateTitleAsString = function generateTitleAsString(type, title, attributes, encode) { + var attributeString = generateElementAttributesAsString(attributes); + var flattenedTitle = flattenArray(title); + return attributeString + ? '<' + + type + + ' ' + + _HelmetConstants.HELMET_ATTRIBUTE + + '="true" ' + + attributeString + + '>' + + encodeSpecialCharacters(flattenedTitle, encode) + + '</' + + type + + '>' + : '<' + + type + + ' ' + + _HelmetConstants.HELMET_ATTRIBUTE + + '="true">' + + encodeSpecialCharacters(flattenedTitle, encode) + + '</' + + type + + '>'; + }; + + var generateTagsAsString = function generateTagsAsString(type, tags, encode) { + return tags.reduce(function (str, tag) { + var attributeHtml = Object.keys(tag) + .filter(function (attribute) { + return !( + attribute === _HelmetConstants.TAG_PROPERTIES.INNER_HTML || + attribute === _HelmetConstants.TAG_PROPERTIES.CSS_TEXT + ); + }) + .reduce(function (string, attribute) { + var attr = + typeof tag[attribute] === 'undefined' + ? attribute + : attribute + '="' + encodeSpecialCharacters(tag[attribute], encode) + '"'; + return string ? string + ' ' + attr : attr; + }, ''); + + var tagContent = tag.innerHTML || tag.cssText || ''; + + var isSelfClosing = _HelmetConstants.SELF_CLOSING_TAGS.indexOf(type) === -1; + + return ( + str + + '<' + + type + + ' ' + + _HelmetConstants.HELMET_ATTRIBUTE + + '="true" ' + + attributeHtml + + (isSelfClosing ? '/>' : '>' + tagContent + '</' + type + '>') + ); + }, ''); + }; + + var convertElementAttributestoReactProps = function convertElementAttributestoReactProps(attributes) { + var initProps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + return Object.keys(attributes).reduce(function (obj, key) { + obj[_HelmetConstants.REACT_TAG_MAP[key] || key] = attributes[key]; + return obj; + }, initProps); + }; + + var convertReactPropstoHtmlAttributes = function convertReactPropstoHtmlAttributes(props) { + var initAttributes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + return Object.keys(props).reduce(function (obj, key) { + obj[_HelmetConstants.HTML_TAG_MAP[key] || key] = props[key]; + return obj; + }, initAttributes); + }; + + var generateTitleAsReactComponent = function generateTitleAsReactComponent(type, title, attributes) { + var _initProps; + + // assigning into an array to define toString function on it + var initProps = + ((_initProps = { + key: title, + }), + (_initProps[_HelmetConstants.HELMET_ATTRIBUTE] = true), + _initProps); + var props = convertElementAttributestoReactProps(attributes, initProps); + + return [_react2.default.createElement(_HelmetConstants.TAG_NAMES.TITLE, props, title)]; + }; + + var generateTagsAsReactComponent = function generateTagsAsReactComponent(type, tags) { + return tags.map(function (tag, i) { + var _mappedTag; + + var mappedTag = + ((_mappedTag = { + key: i, + }), + (_mappedTag[_HelmetConstants.HELMET_ATTRIBUTE] = true), + _mappedTag); + + Object.keys(tag).forEach(function (attribute) { + var mappedAttribute = _HelmetConstants.REACT_TAG_MAP[attribute] || attribute; + + if ( + mappedAttribute === _HelmetConstants.TAG_PROPERTIES.INNER_HTML || + mappedAttribute === _HelmetConstants.TAG_PROPERTIES.CSS_TEXT + ) { + var content = tag.innerHTML || tag.cssText; + mappedTag.dangerouslySetInnerHTML = { __html: content }; + } else { + mappedTag[mappedAttribute] = tag[attribute]; + } + }); + + return _react2.default.createElement(type, mappedTag); + }); + }; + + var getMethodsForTag = function getMethodsForTag(type, tags, encode) { + switch (type) { + case _HelmetConstants.TAG_NAMES.TITLE: + return { + toComponent: function toComponent() { + return generateTitleAsReactComponent(type, tags.title, tags.titleAttributes, encode); + }, + toString: function toString() { + return generateTitleAsString(type, tags.title, tags.titleAttributes, encode); + }, + }; + case _HelmetConstants.ATTRIBUTE_NAMES.BODY: + case _HelmetConstants.ATTRIBUTE_NAMES.HTML: + return { + toComponent: function toComponent() { + return convertElementAttributestoReactProps(tags); + }, + toString: function toString() { + return generateElementAttributesAsString(tags); + }, + }; + default: + return { + toComponent: function toComponent() { + return generateTagsAsReactComponent(type, tags); + }, + toString: function toString() { + return generateTagsAsString(type, tags, encode); + }, + }; + } + }; + + var mapStateOnServer = function mapStateOnServer(_ref) { + var baseTag = _ref.baseTag, + bodyAttributes = _ref.bodyAttributes, + encode = _ref.encode, + htmlAttributes = _ref.htmlAttributes, + linkTags = _ref.linkTags, + metaTags = _ref.metaTags, + noscriptTags = _ref.noscriptTags, + scriptTags = _ref.scriptTags, + styleTags = _ref.styleTags, + _ref$title = _ref.title, + title = _ref$title === undefined ? '' : _ref$title, + titleAttributes = _ref.titleAttributes; + return { + base: getMethodsForTag(_HelmetConstants.TAG_NAMES.BASE, baseTag, encode), + bodyAttributes: getMethodsForTag(_HelmetConstants.ATTRIBUTE_NAMES.BODY, bodyAttributes, encode), + htmlAttributes: getMethodsForTag(_HelmetConstants.ATTRIBUTE_NAMES.HTML, htmlAttributes, encode), + link: getMethodsForTag(_HelmetConstants.TAG_NAMES.LINK, linkTags, encode), + meta: getMethodsForTag(_HelmetConstants.TAG_NAMES.META, metaTags, encode), + noscript: getMethodsForTag(_HelmetConstants.TAG_NAMES.NOSCRIPT, noscriptTags, encode), + script: getMethodsForTag(_HelmetConstants.TAG_NAMES.SCRIPT, scriptTags, encode), + style: getMethodsForTag(_HelmetConstants.TAG_NAMES.STYLE, styleTags, encode), + title: getMethodsForTag( + _HelmetConstants.TAG_NAMES.TITLE, + { title: title, titleAttributes: titleAttributes }, + encode, + ), + }; + }; + + exports.convertReactPropstoHtmlAttributes = convertReactPropstoHtmlAttributes; + exports.handleClientStateChange = handleClientStateChange; + exports.mapStateOnServer = mapStateOnServer; + exports.reducePropsToState = reducePropsToState; + exports.requestAnimationFrame = requestAnimationFrame; + exports.warn = warn; + /* WEBPACK VAR INJECTION */ + }).call(exports, __webpack_require__(38)); + + /***/ + }, + /* 630 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_helmet__ = __webpack_require__(265); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_helmet___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_react_helmet__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__HelloWorld__ = __webpack_require__(162); + + var EchoProps = function EchoProps(props) { + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'div', + null, + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_1_react_helmet__['Helmet'], + null, + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('title', null, 'Custom page title'), + ), + 'Props: ', + JSON.stringify(props), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_2__HelloWorld__['a' /* default */], + props, + ), + ); + }; + + var _default = EchoProps; + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + EchoProps, + 'EchoProps', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/ReactHelmet.jsx', + ); + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/ReactHelmet.jsx', + ); + })(); + + /***/ + }, + /* 631 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__ImageExample__ = __webpack_require__(632); + /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, 'a', function () { + return __WEBPACK_IMPORTED_MODULE_0__ImageExample__['a']; + }); + + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + })(); + + /***/ + }, + /* 632 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(10); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_prop_types__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__ImageExample_scss__ = __webpack_require__(633); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__ImageExample_scss___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__ImageExample_scss__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_images_256egghead_png__ = __webpack_require__(634); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_images_256egghead_png___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_images_256egghead_png__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__bower_png__ = __webpack_require__(635); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__bower_png___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_4__bower_png__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__blueprint_icon_svg__ = __webpack_require__(636); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__blueprint_icon_svg___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5__blueprint_icon_svg__); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_images_lego_icon_svg__ = __webpack_require__(637); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_images_lego_icon_svg___default = + __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_images_lego_icon_svg__); + + // Note the global alias for images + + var TestComponent = function TestComponent(props) { + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'div', + null, + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'h1', + { className: __WEBPACK_IMPORTED_MODULE_2__ImageExample_scss___default.a.red }, + 'This is a test of CSS module color red.', + ), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('hr', null), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'h1', + { className: __WEBPACK_IMPORTED_MODULE_2__ImageExample_scss___default.a.background }, + 'Here is a label with a background-image from the CSS modules imported', + ), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('img', { + src: __WEBPACK_IMPORTED_MODULE_3_images_256egghead_png___default.a, + }), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('hr', null), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'h1', + { className: __WEBPACK_IMPORTED_MODULE_2__ImageExample_scss___default.a.backgroundSameDirectory }, + 'This label has a background image from the same directory. Below is an img tag in the same directory', + ), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('img', { + src: __WEBPACK_IMPORTED_MODULE_4__bower_png___default.a, + }), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('hr', null), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'h1', + null, + ' Below is an img tag of a svg in the same directory', + ), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('img', { + src: __WEBPACK_IMPORTED_MODULE_5__blueprint_icon_svg___default.a, + }), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('hr', null), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'h1', + null, + 'Below is a div with a background svg', + ), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div', { + className: __WEBPACK_IMPORTED_MODULE_2__ImageExample_scss___default.a.googleLogo, + }), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('hr', null), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'h1', + null, + 'SVG lego icon img tag with global path', + ), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('img', { + src: __WEBPACK_IMPORTED_MODULE_6_images_lego_icon_svg___default.a, + }), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('hr', null), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'h1', + null, + 'SVG lego icon with background image to global path', + ), + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div', { + className: __WEBPACK_IMPORTED_MODULE_2__ImageExample_scss___default.a.legoIcon, + }), + ); + }; + + TestComponent.propTypes = { + message: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string, + }; + + var _default = TestComponent; + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + TestComponent, + 'TestComponent', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/ImageExample/ImageExample.js', + ); + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/ImageExample/ImageExample.js', + ); + })(); + + /***/ + }, + /* 633 */ + /***/ function (module, exports) { + module.exports = { + red: 'ImageExample__red__3ax2T', + background: 'ImageExample__background__2X-y3', + backgroundSameDirectory: 'ImageExample__backgroundSameDirectory__2Sn4F', + googleLogo: 'ImageExample__googleLogo__DoneW', + legoIcon: 'ImageExample__legoIcon__1AnHH', + }; + + /***/ + }, + /* 634 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = __webpack_require__.p + 'images/256egghead-0a0d6f5484f79e0ea2c2666cde44588c.png'; + + /***/ + }, + /* 635 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = __webpack_require__.p + 'images/bower-57ad2e565a98cf71ab6b0925ea211ea2.png'; + + /***/ + }, + /* 636 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = __webpack_require__.p + 'images/blueprint_icon-8e2f62bdd4e1cce1884907f5fafb6c61.svg'; + + /***/ + }, + /* 637 */ + /***/ function (module, exports, __webpack_require__) { + module.exports = __webpack_require__.p + 'images/lego_icon-431dba39c343f8a5f0d8a7b890de4ad9.svg'; + + /***/ + }, + /* 638 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + + var SetTimeoutLoggingApp = function SetTimeoutLoggingApp(props) { + setTimeout(function () { + return console.error('*****TIMEOUT DONE!*****'); + }, 5000); + + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div', null, 'Called setTimeout.'); + }; + + var _default = SetTimeoutLoggingApp; + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + SetTimeoutLoggingApp, + 'SetTimeoutLoggingApp', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/startup/SetTimeoutLoggingApp.jsx', + ); + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/startup/SetTimeoutLoggingApp.jsx', + ); + })(); + + /***/ + }, + /* 639 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__components_ComponentWithLodash__ = + __webpack_require__(640); + + /* + * Export a function that returns a ReactComponent, depending on a store named SharedReduxStore. + * This is used for the client rendering hook after the page html is rendered. + * React will see that the state is the same and not do anything. + */ + + var _default = function _default() { + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + __WEBPACK_IMPORTED_MODULE_1__components_ComponentWithLodash__['a' /* default */], + null, + ); + }; + + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/startup/ComponentWithLodashApp.jsx', + ); + })(); + + /***/ + }, + /* 640 */ + /***/ function (module, __webpack_exports__, __webpack_require__) { + 'use strict'; + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_0_react__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_fp__ = __webpack_require__(641); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_fp___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_1_lodash_fp__, + ); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__index_scss__ = __webpack_require__(646); + /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__index_scss___default = __webpack_require__.n( + __WEBPACK_IMPORTED_MODULE_2__index_scss__, + ); + + var _default = function _default() { + var paddedWord = __WEBPACK_IMPORTED_MODULE_1_lodash_fp___default.a.padStart(7)('works!'); + + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'div', + null, + __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( + 'h3', + { className: __WEBPACK_IMPORTED_MODULE_2__index_scss___default.a.message }, + 'Lodash still', + paddedWord, + ), + ); + }; + + /* harmony default export */ __webpack_exports__['a'] = _default; + var _temp = (function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register( + _default, + 'default', + '/Users/justin/shakacode/react-on-rails/react_on_rails_pro/spec/dummy/client/app/components/ComponentWithLodash/index.jsx', + ); + })(); + + /***/ + }, + /* 641 */ + /***/ function (module, exports, __webpack_require__) { + var _ = __webpack_require__(642).runInContext(); + module.exports = __webpack_require__(643)(_, _); + + /***/ + }, + /* 642 */ + /***/ function (module, exports, __webpack_require__) { + /* WEBPACK VAR INJECTION */ (function (global, module) { + var __WEBPACK_AMD_DEFINE_RESULT__; /** + * @license + * Lodash lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE + */ + (function () { + function n(n, t, r) { + switch (r.length) { + case 0: + return n.call(t); + case 1: + return n.call(t, r[0]); + case 2: + return n.call(t, r[0], r[1]); + case 3: + return n.call(t, r[0], r[1], r[2]); + } + return n.apply(t, r); + } + function t(n, t, r, e) { + for (var u = -1, i = null == n ? 0 : n.length; ++u < i; ) { + var o = n[u]; + t(e, o, r(o), n); + } + return e; + } + function r(n, t) { + for (var r = -1, e = null == n ? 0 : n.length; ++r < e && false !== t(n[r], r, n); ); + return n; + } + function e(n, t) { + for (var r = null == n ? 0 : n.length; r-- && false !== t(n[r], r, n); ); + return n; + } + function u(n, t) { + for (var r = -1, e = null == n ? 0 : n.length; ++r < e; ) if (!t(n[r], r, n)) return false; + return true; + } + function i(n, t) { + for (var r = -1, e = null == n ? 0 : n.length, u = 0, i = []; ++r < e; ) { + var o = n[r]; + t(o, r, n) && (i[u++] = o); + } + return i; + } + function o(n, t) { + return !(null == n || !n.length) && -1 < v(n, t, 0); + } + function f(n, t, r) { + for (var e = -1, u = null == n ? 0 : n.length; ++e < u; ) if (r(t, n[e])) return true; + return false; + } + function c(n, t) { + for (var r = -1, e = null == n ? 0 : n.length, u = Array(e); ++r < e; ) u[r] = t(n[r], r, n); + return u; + } + function a(n, t) { + for (var r = -1, e = t.length, u = n.length; ++r < e; ) n[u + r] = t[r]; + return n; + } + function l(n, t, r, e) { + var u = -1, + i = null == n ? 0 : n.length; + for (e && i && (r = n[++u]); ++u < i; ) r = t(r, n[u], u, n); + return r; + } + function s(n, t, r, e) { + var u = null == n ? 0 : n.length; + for (e && u && (r = n[--u]); u--; ) r = t(r, n[u], u, n); + return r; + } + function h(n, t) { + for (var r = -1, e = null == n ? 0 : n.length; ++r < e; ) if (t(n[r], r, n)) return true; + return false; + } + function p(n, t, r) { + var e; + return ( + r(n, function (n, r, u) { + if (t(n, r, u)) return (e = r), false; + }), + e + ); + } + function _(n, t, r, e) { + var u = n.length; + for (r += e ? 1 : -1; e ? r-- : ++r < u; ) if (t(n[r], r, n)) return r; + return -1; + } + function v(n, t, r) { + if (t === t) + n: { + --r; + for (var e = n.length; ++r < e; ) + if (n[r] === t) { + n = r; + break n; + } + n = -1; + } + else n = _(n, d, r); + return n; + } + function g(n, t, r, e) { + --r; + for (var u = n.length; ++r < u; ) if (e(n[r], t)) return r; + return -1; + } + function d(n) { + return n !== n; + } + function y(n, t) { + var r = null == n ? 0 : n.length; + return r ? m(n, t) / r : F; + } + function b(n) { + return function (t) { + return null == t ? T : t[n]; + }; + } + function x(n) { + return function (t) { + return null == n ? T : n[t]; + }; + } + function j(n, t, r, e, u) { + return ( + u(n, function (n, u, i) { + r = e ? ((e = false), n) : t(r, n, u, i); + }), + r + ); + } + function w(n, t) { + var r = n.length; + for (n.sort(t); r--; ) n[r] = n[r].c; + return n; + } + function m(n, t) { + for (var r, e = -1, u = n.length; ++e < u; ) { + var i = t(n[e]); + i !== T && (r = r === T ? i : r + i); + } + return r; + } + function A(n, t) { + for (var r = -1, e = Array(n); ++r < n; ) e[r] = t(r); + return e; + } + function E(n, t) { + return c(t, function (t) { + return [t, n[t]]; + }); + } + function k(n) { + return function (t) { + return n(t); + }; + } + function S(n, t) { + return c(t, function (t) { + return n[t]; + }); + } + function O(n, t) { + return n.has(t); + } + function I(n, t) { + for (var r = -1, e = n.length; ++r < e && -1 < v(t, n[r], 0); ); + return r; + } + function R(n, t) { + for (var r = n.length; r-- && -1 < v(t, n[r], 0); ); + return r; + } + function z(n) { + return '\\' + Un[n]; + } + function W(n) { + var t = -1, + r = Array(n.size); + return ( + n.forEach(function (n, e) { + r[++t] = [e, n]; + }), + r + ); + } + function B(n, t) { + return function (r) { + return n(t(r)); + }; + } + function L(n, t) { + for (var r = -1, e = n.length, u = 0, i = []; ++r < e; ) { + var o = n[r]; + (o !== t && '__lodash_placeholder__' !== o) || + ((n[r] = '__lodash_placeholder__'), (i[u++] = r)); + } + return i; + } + function U(n) { + var t = -1, + r = Array(n.size); + return ( + n.forEach(function (n) { + r[++t] = n; + }), + r + ); + } + function C(n) { + var t = -1, + r = Array(n.size); + return ( + n.forEach(function (n) { + r[++t] = [n, n]; + }), + r + ); + } + function D(n) { + if (Rn.test(n)) { + for (var t = (On.lastIndex = 0); On.test(n); ) ++t; + n = t; + } else n = Qn(n); + return n; + } + function M(n) { + return Rn.test(n) ? n.match(On) || [] : n.split(''); + } + var T, + $ = 1 / 0, + F = NaN, + N = [ + ['ary', 128], + ['bind', 1], + ['bindKey', 2], + ['curry', 8], + ['curryRight', 16], + ['flip', 512], + ['partial', 32], + ['partialRight', 64], + ['rearg', 256], + ], + P = /\b__p\+='';/g, + Z = /\b(__p\+=)''\+/g, + q = /(__e\(.*?\)|\b__t\))\+'';/g, + V = /&(?:amp|lt|gt|quot|#39);/g, + K = /[&<>"']/g, + G = RegExp(V.source), + H = RegExp(K.source), + J = /<%-([\s\S]+?)%>/g, + Y = /<%([\s\S]+?)%>/g, + Q = /<%=([\s\S]+?)%>/g, + X = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, + nn = /^\w*$/, + tn = + /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, + rn = /[\\^$.*+?()[\]{}|]/g, + en = RegExp(rn.source), + un = /^\s+|\s+$/g, + on = /^\s+/, + fn = /\s+$/, + cn = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, + an = /\{\n\/\* \[wrapped with (.+)\] \*/, + ln = /,? & /, + sn = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g, + hn = /\\(\\)?/g, + pn = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g, + _n = /\w*$/, + vn = /^[-+]0x[0-9a-f]+$/i, + gn = /^0b[01]+$/i, + dn = /^\[object .+?Constructor\]$/, + yn = /^0o[0-7]+$/i, + bn = /^(?:0|[1-9]\d*)$/, + xn = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g, + jn = /($^)/, + wn = /['\n\r\u2028\u2029\\]/g, + mn = + '[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?(?:\\u200d(?:[^\\ud800-\\udfff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?)*', + An = + '(?:[\\u2700-\\u27bf]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])' + mn, + En = + '(?:[^\\ud800-\\udfff][\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]?|[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\ud800-\\udfff])', + kn = RegExp("['\u2019]", 'g'), + Sn = RegExp('[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]', 'g'), + On = RegExp('\\ud83c[\\udffb-\\udfff](?=\\ud83c[\\udffb-\\udfff])|' + En + mn, 'g'), + In = RegExp( + [ + "[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+(?:['\u2019](?:d|ll|m|re|s|t|ve))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde]|$)|(?:[A-Z\\xc0-\\xd6\\xd8-\\xde]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde](?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])|$)|[A-Z\\xc0-\\xd6\\xd8-\\xde]?(?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['\u2019](?:d|ll|m|re|s|t|ve))?|[A-Z\\xc0-\\xd6\\xd8-\\xde]+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?|\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])|\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])|\\d+", + An, + ].join('|'), + 'g', + ), + Rn = RegExp( + '[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]', + ), + zn = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/, + Wn = + 'Array Buffer DataView Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Map Math Object Promise RegExp Set String Symbol TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array WeakMap _ clearTimeout isFinite parseInt setTimeout'.split( + ' ', + ), + Bn = {}; + (Bn['[object Float32Array]'] = + Bn['[object Float64Array]'] = + Bn['[object Int8Array]'] = + Bn['[object Int16Array]'] = + Bn['[object Int32Array]'] = + Bn['[object Uint8Array]'] = + Bn['[object Uint8ClampedArray]'] = + Bn['[object Uint16Array]'] = + Bn['[object Uint32Array]'] = + true), + (Bn['[object Arguments]'] = + Bn['[object Array]'] = + Bn['[object ArrayBuffer]'] = + Bn['[object Boolean]'] = + Bn['[object DataView]'] = + Bn['[object Date]'] = + Bn['[object Error]'] = + Bn['[object Function]'] = + Bn['[object Map]'] = + Bn['[object Number]'] = + Bn['[object Object]'] = + Bn['[object RegExp]'] = + Bn['[object Set]'] = + Bn['[object String]'] = + Bn['[object WeakMap]'] = + false); + var Ln = {}; + (Ln['[object Arguments]'] = + Ln['[object Array]'] = + Ln['[object ArrayBuffer]'] = + Ln['[object DataView]'] = + Ln['[object Boolean]'] = + Ln['[object Date]'] = + Ln['[object Float32Array]'] = + Ln['[object Float64Array]'] = + Ln['[object Int8Array]'] = + Ln['[object Int16Array]'] = + Ln['[object Int32Array]'] = + Ln['[object Map]'] = + Ln['[object Number]'] = + Ln['[object Object]'] = + Ln['[object RegExp]'] = + Ln['[object Set]'] = + Ln['[object String]'] = + Ln['[object Symbol]'] = + Ln['[object Uint8Array]'] = + Ln['[object Uint8ClampedArray]'] = + Ln['[object Uint16Array]'] = + Ln['[object Uint32Array]'] = + true), + (Ln['[object Error]'] = Ln['[object Function]'] = Ln['[object WeakMap]'] = false); + var Un = { '\\': '\\', "'": "'", '\n': 'n', '\r': 'r', '\u2028': 'u2028', '\u2029': 'u2029' }, + Cn = parseFloat, + Dn = parseInt, + Mn = typeof global == 'object' && global && global.Object === Object && global, + Tn = typeof self == 'object' && self && self.Object === Object && self, + $n = Mn || Tn || Function('return this')(), + Fn = typeof exports == 'object' && exports && !exports.nodeType && exports, + Nn = Fn && typeof module == 'object' && module && !module.nodeType && module, + Pn = Nn && Nn.exports === Fn, + Zn = Pn && Mn.process, + qn = (function () { + try { + var n = Nn && Nn.f && Nn.f('util').types; + return n ? n : Zn && Zn.binding && Zn.binding('util'); + } catch (n) {} + })(), + Vn = qn && qn.isArrayBuffer, + Kn = qn && qn.isDate, + Gn = qn && qn.isMap, + Hn = qn && qn.isRegExp, + Jn = qn && qn.isSet, + Yn = qn && qn.isTypedArray, + Qn = b('length'), + Xn = x({ + '\xc0': 'A', + '\xc1': 'A', + '\xc2': 'A', + '\xc3': 'A', + '\xc4': 'A', + '\xc5': 'A', + '\xe0': 'a', + '\xe1': 'a', + '\xe2': 'a', + '\xe3': 'a', + '\xe4': 'a', + '\xe5': 'a', + '\xc7': 'C', + '\xe7': 'c', + '\xd0': 'D', + '\xf0': 'd', + '\xc8': 'E', + '\xc9': 'E', + '\xca': 'E', + '\xcb': 'E', + '\xe8': 'e', + '\xe9': 'e', + '\xea': 'e', + '\xeb': 'e', + '\xcc': 'I', + '\xcd': 'I', + '\xce': 'I', + '\xcf': 'I', + '\xec': 'i', + '\xed': 'i', + '\xee': 'i', + '\xef': 'i', + '\xd1': 'N', + '\xf1': 'n', + '\xd2': 'O', + '\xd3': 'O', + '\xd4': 'O', + '\xd5': 'O', + '\xd6': 'O', + '\xd8': 'O', + '\xf2': 'o', + '\xf3': 'o', + '\xf4': 'o', + '\xf5': 'o', + '\xf6': 'o', + '\xf8': 'o', + '\xd9': 'U', + '\xda': 'U', + '\xdb': 'U', + '\xdc': 'U', + '\xf9': 'u', + '\xfa': 'u', + '\xfb': 'u', + '\xfc': 'u', + '\xdd': 'Y', + '\xfd': 'y', + '\xff': 'y', + '\xc6': 'Ae', + '\xe6': 'ae', + '\xde': 'Th', + '\xfe': 'th', + '\xdf': 'ss', + '\u0100': 'A', + '\u0102': 'A', + '\u0104': 'A', + '\u0101': 'a', + '\u0103': 'a', + '\u0105': 'a', + '\u0106': 'C', + '\u0108': 'C', + '\u010a': 'C', + '\u010c': 'C', + '\u0107': 'c', + '\u0109': 'c', + '\u010b': 'c', + '\u010d': 'c', + '\u010e': 'D', + '\u0110': 'D', + '\u010f': 'd', + '\u0111': 'd', + '\u0112': 'E', + '\u0114': 'E', + '\u0116': 'E', + '\u0118': 'E', + '\u011a': 'E', + '\u0113': 'e', + '\u0115': 'e', + '\u0117': 'e', + '\u0119': 'e', + '\u011b': 'e', + '\u011c': 'G', + '\u011e': 'G', + '\u0120': 'G', + '\u0122': 'G', + '\u011d': 'g', + '\u011f': 'g', + '\u0121': 'g', + '\u0123': 'g', + '\u0124': 'H', + '\u0126': 'H', + '\u0125': 'h', + '\u0127': 'h', + '\u0128': 'I', + '\u012a': 'I', + '\u012c': 'I', + '\u012e': 'I', + '\u0130': 'I', + '\u0129': 'i', + '\u012b': 'i', + '\u012d': 'i', + '\u012f': 'i', + '\u0131': 'i', + '\u0134': 'J', + '\u0135': 'j', + '\u0136': 'K', + '\u0137': 'k', + '\u0138': 'k', + '\u0139': 'L', + '\u013b': 'L', + '\u013d': 'L', + '\u013f': 'L', + '\u0141': 'L', + '\u013a': 'l', + '\u013c': 'l', + '\u013e': 'l', + '\u0140': 'l', + '\u0142': 'l', + '\u0143': 'N', + '\u0145': 'N', + '\u0147': 'N', + '\u014a': 'N', + '\u0144': 'n', + '\u0146': 'n', + '\u0148': 'n', + '\u014b': 'n', + '\u014c': 'O', + '\u014e': 'O', + '\u0150': 'O', + '\u014d': 'o', + '\u014f': 'o', + '\u0151': 'o', + '\u0154': 'R', + '\u0156': 'R', + '\u0158': 'R', + '\u0155': 'r', + '\u0157': 'r', + '\u0159': 'r', + '\u015a': 'S', + '\u015c': 'S', + '\u015e': 'S', + '\u0160': 'S', + '\u015b': 's', + '\u015d': 's', + '\u015f': 's', + '\u0161': 's', + '\u0162': 'T', + '\u0164': 'T', + '\u0166': 'T', + '\u0163': 't', + '\u0165': 't', + '\u0167': 't', + '\u0168': 'U', + '\u016a': 'U', + '\u016c': 'U', + '\u016e': 'U', + '\u0170': 'U', + '\u0172': 'U', + '\u0169': 'u', + '\u016b': 'u', + '\u016d': 'u', + '\u016f': 'u', + '\u0171': 'u', + '\u0173': 'u', + '\u0174': 'W', + '\u0175': 'w', + '\u0176': 'Y', + '\u0177': 'y', + '\u0178': 'Y', + '\u0179': 'Z', + '\u017b': 'Z', + '\u017d': 'Z', + '\u017a': 'z', + '\u017c': 'z', + '\u017e': 'z', + '\u0132': 'IJ', + '\u0133': 'ij', + '\u0152': 'Oe', + '\u0153': 'oe', + '\u0149': "'n", + '\u017f': 's', + }), + nt = x({ '&': '&', '<': '<', '>': '>', '"': '"', "'": ''' }), + tt = x({ '&': '&', '<': '<', '>': '>', '"': '"', ''': "'" }), + rt = (function x(mn) { + function An(n) { + if (yu(n) && !ff(n) && !(n instanceof Un)) { + if (n instanceof On) return n; + if (oi.call(n, '__wrapped__')) return Fe(n); + } + return new On(n); + } + function En() {} + function On(n, t) { + (this.__wrapped__ = n), + (this.__actions__ = []), + (this.__chain__ = !!t), + (this.__index__ = 0), + (this.__values__ = T); + } + function Un(n) { + (this.__wrapped__ = n), + (this.__actions__ = []), + (this.__dir__ = 1), + (this.__filtered__ = false), + (this.__iteratees__ = []), + (this.__takeCount__ = 4294967295), + (this.__views__ = []); + } + function Mn(n) { + var t = -1, + r = null == n ? 0 : n.length; + for (this.clear(); ++t < r; ) { + var e = n[t]; + this.set(e[0], e[1]); + } + } + function Tn(n) { + var t = -1, + r = null == n ? 0 : n.length; + for (this.clear(); ++t < r; ) { + var e = n[t]; + this.set(e[0], e[1]); + } + } + function Fn(n) { + var t = -1, + r = null == n ? 0 : n.length; + for (this.clear(); ++t < r; ) { + var e = n[t]; + this.set(e[0], e[1]); + } + } + function Nn(n) { + var t = -1, + r = null == n ? 0 : n.length; + for (this.__data__ = new Fn(); ++t < r; ) this.add(n[t]); + } + function Zn(n) { + this.size = (this.__data__ = new Tn(n)).size; + } + function qn(n, t) { + var r, + e = ff(n), + u = !e && of(n), + i = !e && !u && af(n), + o = !e && !u && !i && _f(n), + u = (e = e || u || i || o) ? A(n.length, ni) : [], + f = u.length; + for (r in n) + (!t && !oi.call(n, r)) || + (e && + ('length' == r || + (i && ('offset' == r || 'parent' == r)) || + (o && ('buffer' == r || 'byteLength' == r || 'byteOffset' == r)) || + Se(r, f))) || + u.push(r); + return u; + } + function Qn(n) { + var t = n.length; + return t ? n[ir(0, t - 1)] : T; + } + function et(n, t) { + return De(Ur(n), pt(t, 0, n.length)); + } + function ut(n) { + return De(Ur(n)); + } + function it(n, t, r) { + ((r === T || lu(n[t], r)) && (r !== T || t in n)) || st(n, t, r); + } + function ot(n, t, r) { + var e = n[t]; + (oi.call(n, t) && lu(e, r) && (r !== T || t in n)) || st(n, t, r); + } + function ft(n, t) { + for (var r = n.length; r--; ) if (lu(n[r][0], t)) return r; + return -1; + } + function ct(n, t, r, e) { + return ( + uo(n, function (n, u, i) { + t(e, n, r(n), i); + }), + e + ); + } + function at(n, t) { + return n && Cr(t, Wu(t), n); + } + function lt(n, t) { + return n && Cr(t, Bu(t), n); + } + function st(n, t, r) { + '__proto__' == t && Ai + ? Ai(n, t, { configurable: true, enumerable: true, value: r, writable: true }) + : (n[t] = r); + } + function ht(n, t) { + for (var r = -1, e = t.length, u = Ku(e), i = null == n; ++r < e; ) + u[r] = i ? T : Ru(n, t[r]); + return u; + } + function pt(n, t, r) { + return n === n && (r !== T && (n = n <= r ? n : r), t !== T && (n = n >= t ? n : t)), n; + } + function _t(n, t, e, u, i, o) { + var f, + c = 1 & t, + a = 2 & t, + l = 4 & t; + if ((e && (f = i ? e(n, u, i, o) : e(n)), f !== T)) return f; + if (!du(n)) return n; + if ((u = ff(n))) { + if (((f = me(n)), !c)) return Ur(n, f); + } else { + var s = vo(n), + h = '[object Function]' == s || '[object GeneratorFunction]' == s; + if (af(n)) return Ir(n, c); + if ('[object Object]' == s || '[object Arguments]' == s || (h && !i)) { + if (((f = a || h ? {} : Ae(n)), !c)) return a ? Mr(n, lt(f, n)) : Dr(n, at(f, n)); + } else { + if (!Ln[s]) return i ? n : {}; + f = Ee(n, s, c); + } + } + if ((o || (o = new Zn()), (i = o.get(n)))) return i; + o.set(n, f), + pf(n) + ? n.forEach(function (r) { + f.add(_t(r, t, e, r, n, o)); + }) + : sf(n) && + n.forEach(function (r, u) { + f.set(u, _t(r, t, e, u, n, o)); + }); + var a = l ? (a ? ve : _e) : a ? Bu : Wu, + p = u ? T : a(n); + return ( + r(p || n, function (r, u) { + p && ((u = r), (r = n[u])), ot(f, u, _t(r, t, e, u, n, o)); + }), + f + ); + } + function vt(n) { + var t = Wu(n); + return function (r) { + return gt(r, n, t); + }; + } + function gt(n, t, r) { + var e = r.length; + if (null == n) return !e; + for (n = Qu(n); e--; ) { + var u = r[e], + i = t[u], + o = n[u]; + if ((o === T && !(u in n)) || !i(o)) return false; + } + return true; + } + function dt(n, t, r) { + if (typeof n != 'function') throw new ti('Expected a function'); + return bo(function () { + n.apply(T, r); + }, t); + } + function yt(n, t, r, e) { + var u = -1, + i = o, + a = true, + l = n.length, + s = [], + h = t.length; + if (!l) return s; + r && (t = c(t, k(r))), + e ? ((i = f), (a = false)) : 200 <= t.length && ((i = O), (a = false), (t = new Nn(t))); + n: for (; ++u < l; ) { + var p = n[u], + _ = null == r ? p : r(p), + p = e || 0 !== p ? p : 0; + if (a && _ === _) { + for (var v = h; v--; ) if (t[v] === _) continue n; + s.push(p); + } else i(t, _, e) || s.push(p); + } + return s; + } + function bt(n, t) { + var r = true; + return ( + uo(n, function (n, e, u) { + return (r = !!t(n, e, u)); + }), + r + ); + } + function xt(n, t, r) { + for (var e = -1, u = n.length; ++e < u; ) { + var i = n[e], + o = t(i); + if (null != o && (f === T ? o === o && !wu(o) : r(o, f))) + var f = o, + c = i; + } + return c; + } + function jt(n, t) { + var r = []; + return ( + uo(n, function (n, e, u) { + t(n, e, u) && r.push(n); + }), + r + ); + } + function wt(n, t, r, e, u) { + var i = -1, + o = n.length; + for (r || (r = ke), u || (u = []); ++i < o; ) { + var f = n[i]; + 0 < t && r(f) ? (1 < t ? wt(f, t - 1, r, e, u) : a(u, f)) : e || (u[u.length] = f); + } + return u; + } + function mt(n, t) { + return n && oo(n, t, Wu); + } + function At(n, t) { + return n && fo(n, t, Wu); + } + function Et(n, t) { + return i(t, function (t) { + return _u(n[t]); + }); + } + function kt(n, t) { + t = Sr(t, n); + for (var r = 0, e = t.length; null != n && r < e; ) n = n[Me(t[r++])]; + return r && r == e ? n : T; + } + function St(n, t, r) { + return (t = t(n)), ff(n) ? t : a(t, r(n)); + } + function Ot(n) { + if (null == n) n = n === T ? '[object Undefined]' : '[object Null]'; + else if (mi && mi in Qu(n)) { + var t = oi.call(n, mi), + r = n[mi]; + try { + n[mi] = T; + var e = true; + } catch (n) {} + var u = ai.call(n); + e && (t ? (n[mi] = r) : delete n[mi]), (n = u); + } else n = ai.call(n); + return n; + } + function It(n, t) { + return n > t; + } + function Rt(n, t) { + return null != n && oi.call(n, t); + } + function zt(n, t) { + return null != n && t in Qu(n); + } + function Wt(n, t, r) { + for ( + var e = r ? f : o, u = n[0].length, i = n.length, a = i, l = Ku(i), s = 1 / 0, h = []; + a--; + + ) { + var p = n[a]; + a && t && (p = c(p, k(t))), + (s = Ci(p.length, s)), + (l[a] = !r && (t || (120 <= u && 120 <= p.length)) ? new Nn(a && p) : T); + } + var p = n[0], + _ = -1, + v = l[0]; + n: for (; ++_ < u && h.length < s; ) { + var g = p[_], + d = t ? t(g) : g, + g = r || 0 !== g ? g : 0; + if (v ? !O(v, d) : !e(h, d, r)) { + for (a = i; --a; ) { + var y = l[a]; + if (y ? !O(y, d) : !e(n[a], d, r)) continue n; + } + v && v.push(d), h.push(g); + } + } + return h; + } + function Bt(n, t, r) { + var e = {}; + return ( + mt(n, function (n, u, i) { + t(e, r(n), u, i); + }), + e + ); + } + function Lt(t, r, e) { + return ( + (r = Sr(r, t)), + (t = 2 > r.length ? t : kt(t, hr(r, 0, -1))), + (r = null == t ? t : t[Me(Ve(r))]), + null == r ? T : n(r, t, e) + ); + } + function Ut(n) { + return yu(n) && '[object Arguments]' == Ot(n); + } + function Ct(n) { + return yu(n) && '[object ArrayBuffer]' == Ot(n); + } + function Dt(n) { + return yu(n) && '[object Date]' == Ot(n); + } + function Mt(n, t, r, e, u) { + if (n === t) t = true; + else if (null == n || null == t || (!yu(n) && !yu(t))) t = n !== n && t !== t; + else + n: { + var i = ff(n), + o = ff(t), + f = i ? '[object Array]' : vo(n), + c = o ? '[object Array]' : vo(t), + f = '[object Arguments]' == f ? '[object Object]' : f, + c = '[object Arguments]' == c ? '[object Object]' : c, + a = '[object Object]' == f, + o = '[object Object]' == c; + if ((c = f == c) && af(n)) { + if (!af(t)) { + t = false; + break n; + } + (i = true), (a = false); + } + if (c && !a) + u || (u = new Zn()), + (t = i || _f(n) ? se(n, t, r, e, Mt, u) : he(n, t, f, r, e, Mt, u)); + else { + if ( + !(1 & r) && + ((i = a && oi.call(n, '__wrapped__')), (f = o && oi.call(t, '__wrapped__')), i || f) + ) { + (n = i ? n.value() : n), + (t = f ? t.value() : t), + u || (u = new Zn()), + (t = Mt(n, t, r, e, u)); + break n; + } + if (c) + t: if ( + (u || (u = new Zn()), + (i = 1 & r), + (f = _e(n)), + (o = f.length), + (c = _e(t).length), + o == c || i) + ) { + for (a = o; a--; ) { + var l = f[a]; + if (!(i ? l in t : oi.call(t, l))) { + t = false; + break t; + } + } + if ((c = u.get(n)) && u.get(t)) t = c == t; + else { + (c = true), u.set(n, t), u.set(t, n); + for (var s = i; ++a < o; ) { + var l = f[a], + h = n[l], + p = t[l]; + if (e) var _ = i ? e(p, h, l, t, n, u) : e(h, p, l, n, t, u); + if (_ === T ? h !== p && !Mt(h, p, r, e, u) : !_) { + c = false; + break; + } + s || (s = 'constructor' == l); + } + c && + !s && + ((r = n.constructor), + (e = t.constructor), + r != e && + 'constructor' in n && + 'constructor' in t && + !( + typeof r == 'function' && + r instanceof r && + typeof e == 'function' && + e instanceof e + ) && + (c = false)), + u.delete(n), + u.delete(t), + (t = c); + } + } else t = false; + else t = false; + } + } + return t; + } + function Tt(n) { + return yu(n) && '[object Map]' == vo(n); + } + function $t(n, t, r, e) { + var u = r.length, + i = u, + o = !e; + if (null == n) return !i; + for (n = Qu(n); u--; ) { + var f = r[u]; + if (o && f[2] ? f[1] !== n[f[0]] : !(f[0] in n)) return false; + } + for (; ++u < i; ) { + var f = r[u], + c = f[0], + a = n[c], + l = f[1]; + if (o && f[2]) { + if (a === T && !(c in n)) return false; + } else { + if (((f = new Zn()), e)) var s = e(a, l, c, n, t, f); + if (s === T ? !Mt(l, a, 3, e, f) : !s) return false; + } + } + return true; + } + function Ft(n) { + return !(!du(n) || (ci && ci in n)) && (_u(n) ? hi : dn).test(Te(n)); + } + function Nt(n) { + return yu(n) && '[object RegExp]' == Ot(n); + } + function Pt(n) { + return yu(n) && '[object Set]' == vo(n); + } + function Zt(n) { + return yu(n) && gu(n.length) && !!Bn[Ot(n)]; + } + function qt(n) { + return typeof n == 'function' + ? n + : null == n + ? $u + : typeof n == 'object' + ? ff(n) + ? Jt(n[0], n[1]) + : Ht(n) + : Zu(n); + } + function Vt(n) { + if (!ze(n)) return Li(n); + var t, + r = []; + for (t in Qu(n)) oi.call(n, t) && 'constructor' != t && r.push(t); + return r; + } + function Kt(n, t) { + return n < t; + } + function Gt(n, t) { + var r = -1, + e = su(n) ? Ku(n.length) : []; + return ( + uo(n, function (n, u, i) { + e[++r] = t(n, u, i); + }), + e + ); + } + function Ht(n) { + var t = xe(n); + return 1 == t.length && t[0][2] + ? We(t[0][0], t[0][1]) + : function (r) { + return r === n || $t(r, n, t); + }; + } + function Jt(n, t) { + return Ie(n) && t === t && !du(t) + ? We(Me(n), t) + : function (r) { + var e = Ru(r, n); + return e === T && e === t ? zu(r, n) : Mt(t, e, 3); + }; + } + function Yt(n, t, r, e, u) { + n !== t && + oo( + t, + function (i, o) { + if ((u || (u = new Zn()), du(i))) { + var f = u, + c = Le(n, o), + a = Le(t, o), + l = f.get(a); + if (l) it(n, o, l); + else { + var l = e ? e(c, a, o + '', n, t, f) : T, + s = l === T; + if (s) { + var h = ff(a), + p = !h && af(a), + _ = !h && !p && _f(a), + l = a; + h || p || _ + ? ff(c) + ? (l = c) + : hu(c) + ? (l = Ur(c)) + : p + ? ((s = false), (l = Ir(a, true))) + : _ + ? ((s = false), (l = zr(a, true))) + : (l = []) + : xu(a) || of(a) + ? ((l = c), of(c) ? (l = Ou(c)) : (du(c) && !_u(c)) || (l = Ae(a))) + : (s = false); + } + s && (f.set(a, l), Yt(l, a, r, e, f), f.delete(a)), it(n, o, l); + } + } else (f = e ? e(Le(n, o), i, o + '', n, t, u) : T), f === T && (f = i), it(n, o, f); + }, + Bu, + ); + } + function Qt(n, t) { + var r = n.length; + if (r) return (t += 0 > t ? r : 0), Se(t, r) ? n[t] : T; + } + function Xt(n, t, r) { + var e = -1; + return ( + (t = c(t.length ? t : [$u], k(ye()))), + (n = Gt(n, function (n) { + return { + a: c(t, function (t) { + return t(n); + }), + b: ++e, + c: n, + }; + })), + w(n, function (n, t) { + var e; + n: { + e = -1; + for (var u = n.a, i = t.a, o = u.length, f = r.length; ++e < o; ) { + var c = Wr(u[e], i[e]); + if (c) { + e = e >= f ? c : c * ('desc' == r[e] ? -1 : 1); + break n; + } + } + e = n.b - t.b; + } + return e; + }) + ); + } + function nr(n, t) { + return tr(n, t, function (t, r) { + return zu(n, r); + }); + } + function tr(n, t, r) { + for (var e = -1, u = t.length, i = {}; ++e < u; ) { + var o = t[e], + f = kt(n, o); + r(f, o) && lr(i, Sr(o, n), f); + } + return i; + } + function rr(n) { + return function (t) { + return kt(t, n); + }; + } + function er(n, t, r, e) { + var u = e ? g : v, + i = -1, + o = t.length, + f = n; + for (n === t && (t = Ur(t)), r && (f = c(n, k(r))); ++i < o; ) + for (var a = 0, l = t[i], l = r ? r(l) : l; -1 < (a = u(f, l, a, e)); ) + f !== n && xi.call(f, a, 1), xi.call(n, a, 1); + return n; + } + function ur(n, t) { + for (var r = n ? t.length : 0, e = r - 1; r--; ) { + var u = t[r]; + if (r == e || u !== i) { + var i = u; + Se(u) ? xi.call(n, u, 1) : xr(n, u); + } + } + } + function ir(n, t) { + return n + Ii(Ti() * (t - n + 1)); + } + function or(n, t) { + var r = ''; + if (!n || 1 > t || 9007199254740991 < t) return r; + do t % 2 && (r += n), (t = Ii(t / 2)) && (n += n); + while (t); + return r; + } + function fr(n, t) { + return xo(Be(n, t, $u), n + ''); + } + function cr(n) { + return Qn(Uu(n)); + } + function ar(n, t) { + var r = Uu(n); + return De(r, pt(t, 0, r.length)); + } + function lr(n, t, r, e) { + if (!du(n)) return n; + t = Sr(t, n); + for (var u = -1, i = t.length, o = i - 1, f = n; null != f && ++u < i; ) { + var c = Me(t[u]), + a = r; + if (u != o) { + var l = f[c], + a = e ? e(l, c, f) : T; + a === T && (a = du(l) ? l : Se(t[u + 1]) ? [] : {}); + } + ot(f, c, a), (f = f[c]); + } + return n; + } + function sr(n) { + return De(Uu(n)); + } + function hr(n, t, r) { + var e = -1, + u = n.length; + for ( + 0 > t && (t = -t > u ? 0 : u + t), + r = r > u ? u : r, + 0 > r && (r += u), + u = t > r ? 0 : (r - t) >>> 0, + t >>>= 0, + r = Ku(u); + ++e < u; + + ) + r[e] = n[e + t]; + return r; + } + function pr(n, t) { + var r; + return ( + uo(n, function (n, e, u) { + return (r = t(n, e, u)), !r; + }), + !!r + ); + } + function _r(n, t, r) { + var e = 0, + u = null == n ? e : n.length; + if (typeof t == 'number' && t === t && 2147483647 >= u) { + for (; e < u; ) { + var i = (e + u) >>> 1, + o = n[i]; + null !== o && !wu(o) && (r ? o <= t : o < t) ? (e = i + 1) : (u = i); + } + return u; + } + return vr(n, t, $u, r); + } + function vr(n, t, r, e) { + t = r(t); + for ( + var u = 0, + i = null == n ? 0 : n.length, + o = t !== t, + f = null === t, + c = wu(t), + a = t === T; + u < i; + + ) { + var l = Ii((u + i) / 2), + s = r(n[l]), + h = s !== T, + p = null === s, + _ = s === s, + v = wu(s); + ( + o + ? e || _ + : a + ? _ && (e || h) + : f + ? _ && h && (e || !p) + : c + ? _ && h && !p && (e || !v) + : p || v + ? 0 + : e + ? s <= t + : s < t + ) + ? (u = l + 1) + : (i = l); + } + return Ci(i, 4294967294); + } + function gr(n, t) { + for (var r = -1, e = n.length, u = 0, i = []; ++r < e; ) { + var o = n[r], + f = t ? t(o) : o; + if (!r || !lu(f, c)) { + var c = f; + i[u++] = 0 === o ? 0 : o; + } + } + return i; + } + function dr(n) { + return typeof n == 'number' ? n : wu(n) ? F : +n; + } + function yr(n) { + if (typeof n == 'string') return n; + if (ff(n)) return c(n, yr) + ''; + if (wu(n)) return ro ? ro.call(n) : ''; + var t = n + ''; + return '0' == t && 1 / n == -$ ? '-0' : t; + } + function br(n, t, r) { + var e = -1, + u = o, + i = n.length, + c = true, + a = [], + l = a; + if (r) (c = false), (u = f); + else if (200 <= i) { + if ((u = t ? null : so(n))) return U(u); + (c = false), (u = O), (l = new Nn()); + } else l = t ? [] : a; + n: for (; ++e < i; ) { + var s = n[e], + h = t ? t(s) : s, + s = r || 0 !== s ? s : 0; + if (c && h === h) { + for (var p = l.length; p--; ) if (l[p] === h) continue n; + t && l.push(h), a.push(s); + } else u(l, h, r) || (l !== a && l.push(h), a.push(s)); + } + return a; + } + function xr(n, t) { + return ( + (t = Sr(t, n)), + (n = 2 > t.length ? n : kt(n, hr(t, 0, -1))), + null == n || delete n[Me(Ve(t))] + ); + } + function jr(n, t, r, e) { + for (var u = n.length, i = e ? u : -1; (e ? i-- : ++i < u) && t(n[i], i, n); ); + return r ? hr(n, e ? 0 : i, e ? i + 1 : u) : hr(n, e ? i + 1 : 0, e ? u : i); + } + function wr(n, t) { + var r = n; + return ( + r instanceof Un && (r = r.value()), + l( + t, + function (n, t) { + return t.func.apply(t.thisArg, a([n], t.args)); + }, + r, + ) + ); + } + function mr(n, t, r) { + var e = n.length; + if (2 > e) return e ? br(n[0]) : []; + for (var u = -1, i = Ku(e); ++u < e; ) + for (var o = n[u], f = -1; ++f < e; ) f != u && (i[u] = yt(i[u] || o, n[f], t, r)); + return br(wt(i, 1), t, r); + } + function Ar(n, t, r) { + for (var e = -1, u = n.length, i = t.length, o = {}; ++e < u; ) r(o, n[e], e < i ? t[e] : T); + return o; + } + function Er(n) { + return hu(n) ? n : []; + } + function kr(n) { + return typeof n == 'function' ? n : $u; + } + function Sr(n, t) { + return ff(n) ? n : Ie(n, t) ? [n] : jo(Iu(n)); + } + function Or(n, t, r) { + var e = n.length; + return (r = r === T ? e : r), !t && r >= e ? n : hr(n, t, r); + } + function Ir(n, t) { + if (t) return n.slice(); + var r = n.length, + r = gi ? gi(r) : new n.constructor(r); + return n.copy(r), r; + } + function Rr(n) { + var t = new n.constructor(n.byteLength); + return new vi(t).set(new vi(n)), t; + } + function zr(n, t) { + return new n.constructor(t ? Rr(n.buffer) : n.buffer, n.byteOffset, n.length); + } + function Wr(n, t) { + if (n !== t) { + var r = n !== T, + e = null === n, + u = n === n, + i = wu(n), + o = t !== T, + f = null === t, + c = t === t, + a = wu(t); + if ( + (!f && !a && !i && n > t) || + (i && o && c && !f && !a) || + (e && o && c) || + (!r && c) || + !u + ) + return 1; + if ( + (!e && !i && !a && n < t) || + (a && r && u && !e && !i) || + (f && r && u) || + (!o && u) || + !c + ) + return -1; + } + return 0; + } + function Br(n, t, r, e) { + var u = -1, + i = n.length, + o = r.length, + f = -1, + c = t.length, + a = Ui(i - o, 0), + l = Ku(c + a); + for (e = !e; ++f < c; ) l[f] = t[f]; + for (; ++u < o; ) (e || u < i) && (l[r[u]] = n[u]); + for (; a--; ) l[f++] = n[u++]; + return l; + } + function Lr(n, t, r, e) { + var u = -1, + i = n.length, + o = -1, + f = r.length, + c = -1, + a = t.length, + l = Ui(i - f, 0), + s = Ku(l + a); + for (e = !e; ++u < l; ) s[u] = n[u]; + for (l = u; ++c < a; ) s[l + c] = t[c]; + for (; ++o < f; ) (e || u < i) && (s[l + r[o]] = n[u++]); + return s; + } + function Ur(n, t) { + var r = -1, + e = n.length; + for (t || (t = Ku(e)); ++r < e; ) t[r] = n[r]; + return t; + } + function Cr(n, t, r, e) { + var u = !r; + r || (r = {}); + for (var i = -1, o = t.length; ++i < o; ) { + var f = t[i], + c = e ? e(r[f], n[f], f, r, n) : T; + c === T && (c = n[f]), u ? st(r, f, c) : ot(r, f, c); + } + return r; + } + function Dr(n, t) { + return Cr(n, po(n), t); + } + function Mr(n, t) { + return Cr(n, _o(n), t); + } + function Tr(n, r) { + return function (e, u) { + var i = ff(e) ? t : ct, + o = r ? r() : {}; + return i(e, n, ye(u, 2), o); + }; + } + function $r(n) { + return fr(function (t, r) { + var e = -1, + u = r.length, + i = 1 < u ? r[u - 1] : T, + o = 2 < u ? r[2] : T, + i = 3 < n.length && typeof i == 'function' ? (u--, i) : T; + for (o && Oe(r[0], r[1], o) && ((i = 3 > u ? T : i), (u = 1)), t = Qu(t); ++e < u; ) + (o = r[e]) && n(t, o, e, i); + return t; + }); + } + function Fr(n, t) { + return function (r, e) { + if (null == r) return r; + if (!su(r)) return n(r, e); + for ( + var u = r.length, i = t ? u : -1, o = Qu(r); + (t ? i-- : ++i < u) && false !== e(o[i], i, o); + + ); + return r; + }; + } + function Nr(n) { + return function (t, r, e) { + var u = -1, + i = Qu(t); + e = e(t); + for (var o = e.length; o--; ) { + var f = e[n ? o : ++u]; + if (false === r(i[f], f, i)) break; + } + return t; + }; + } + function Pr(n, t, r) { + function e() { + return (this && this !== $n && this instanceof e ? i : n).apply(u ? r : this, arguments); + } + var u = 1 & t, + i = Vr(n); + return e; + } + function Zr(n) { + return function (t) { + t = Iu(t); + var r = Rn.test(t) ? M(t) : T, + e = r ? r[0] : t.charAt(0); + return (t = r ? Or(r, 1).join('') : t.slice(1)), e[n]() + t; + }; + } + function qr(n) { + return function (t) { + return l(Mu(Du(t).replace(kn, '')), n, ''); + }; + } + function Vr(n) { + return function () { + var t = arguments; + switch (t.length) { + case 0: + return new n(); + case 1: + return new n(t[0]); + case 2: + return new n(t[0], t[1]); + case 3: + return new n(t[0], t[1], t[2]); + case 4: + return new n(t[0], t[1], t[2], t[3]); + case 5: + return new n(t[0], t[1], t[2], t[3], t[4]); + case 6: + return new n(t[0], t[1], t[2], t[3], t[4], t[5]); + case 7: + return new n(t[0], t[1], t[2], t[3], t[4], t[5], t[6]); + } + var r = eo(n.prototype), + t = n.apply(r, t); + return du(t) ? t : r; + }; + } + function Kr(t, r, e) { + function u() { + for (var o = arguments.length, f = Ku(o), c = o, a = de(u); c--; ) f[c] = arguments[c]; + return ( + (c = 3 > o && f[0] !== a && f[o - 1] !== a ? [] : L(f, a)), + (o -= c.length), + o < e + ? ue(t, r, Jr, u.placeholder, T, f, c, T, T, e - o) + : n(this && this !== $n && this instanceof u ? i : t, this, f) + ); + } + var i = Vr(t); + return u; + } + function Gr(n) { + return function (t, r, e) { + var u = Qu(t); + if (!su(t)) { + var i = ye(r, 3); + (t = Wu(t)), + (r = function (n) { + return i(u[n], n, u); + }); + } + return (r = n(t, r, e)), -1 < r ? u[i ? t[r] : r] : T; + }; + } + function Hr(n) { + return pe(function (t) { + var r = t.length, + e = r, + u = On.prototype.thru; + for (n && t.reverse(); e--; ) { + var i = t[e]; + if (typeof i != 'function') throw new ti('Expected a function'); + if (u && !o && 'wrapper' == ge(i)) var o = new On([], true); + } + for (e = o ? e : r; ++e < r; ) + var i = t[e], + u = ge(i), + f = 'wrapper' == u ? ho(i) : T, + o = + f && Re(f[0]) && 424 == f[1] && !f[4].length && 1 == f[9] + ? o[ge(f[0])].apply(o, f[3]) + : 1 == i.length && Re(i) + ? o[u]() + : o.thru(i); + return function () { + var n = arguments, + e = n[0]; + if (o && 1 == n.length && ff(e)) return o.plant(e).value(); + for (var u = 0, n = r ? t[u].apply(this, n) : e; ++u < r; ) n = t[u].call(this, n); + return n; + }; + }); + } + function Jr(n, t, r, e, u, i, o, f, c, a) { + function l() { + for (var d = arguments.length, y = Ku(d), b = d; b--; ) y[b] = arguments[b]; + if (_) { + var x, + j = de(l), + b = y.length; + for (x = 0; b--; ) y[b] === j && ++x; + } + if ((e && (y = Br(y, e, u, _)), i && (y = Lr(y, i, o, _)), (d -= x), _ && d < a)) + return (j = L(y, j)), ue(n, t, Jr, l.placeholder, r, y, j, f, c, a - d); + if (((j = h ? r : this), (b = p ? j[n] : n), (d = y.length), f)) { + x = y.length; + for (var w = Ci(f.length, x), m = Ur(y); w--; ) { + var A = f[w]; + y[w] = Se(A, x) ? m[A] : T; + } + } else v && 1 < d && y.reverse(); + return ( + s && c < d && (y.length = c), + this && this !== $n && this instanceof l && (b = g || Vr(b)), + b.apply(j, y) + ); + } + var s = 128 & t, + h = 1 & t, + p = 2 & t, + _ = 24 & t, + v = 512 & t, + g = p ? T : Vr(n); + return l; + } + function Yr(n, t) { + return function (r, e) { + return Bt(r, n, t(e)); + }; + } + function Qr(n, t) { + return function (r, e) { + var u; + if (r === T && e === T) return t; + if ((r !== T && (u = r), e !== T)) { + if (u === T) return e; + typeof r == 'string' || typeof e == 'string' + ? ((r = yr(r)), (e = yr(e))) + : ((r = dr(r)), (e = dr(e))), + (u = n(r, e)); + } + return u; + }; + } + function Xr(t) { + return pe(function (r) { + return ( + (r = c(r, k(ye()))), + fr(function (e) { + var u = this; + return t(r, function (t) { + return n(t, u, e); + }); + }) + ); + }); + } + function ne(n, t) { + t = t === T ? ' ' : yr(t); + var r = t.length; + return 2 > r + ? r + ? or(t, n) + : t + : ((r = or(t, Oi(n / D(t)))), Rn.test(t) ? Or(M(r), 0, n).join('') : r.slice(0, n)); + } + function te(t, r, e, u) { + function i() { + for ( + var r = -1, + c = arguments.length, + a = -1, + l = u.length, + s = Ku(l + c), + h = this && this !== $n && this instanceof i ? f : t; + ++a < l; + + ) + s[a] = u[a]; + for (; c--; ) s[a++] = arguments[++r]; + return n(h, o ? e : this, s); + } + var o = 1 & r, + f = Vr(t); + return i; + } + function re(n) { + return function (t, r, e) { + e && typeof e != 'number' && Oe(t, r, e) && (r = e = T), + (t = Au(t)), + r === T ? ((r = t), (t = 0)) : (r = Au(r)), + (e = e === T ? (t < r ? 1 : -1) : Au(e)); + var u = -1; + r = Ui(Oi((r - t) / (e || 1)), 0); + for (var i = Ku(r); r--; ) (i[n ? r : ++u] = t), (t += e); + return i; + }; + } + function ee(n) { + return function (t, r) { + return ( + (typeof t == 'string' && typeof r == 'string') || ((t = Su(t)), (r = Su(r))), n(t, r) + ); + }; + } + function ue(n, t, r, e, u, i, o, f, c, a) { + var l = 8 & t, + s = l ? o : T; + o = l ? T : o; + var h = l ? i : T; + return ( + (i = l ? T : i), + (t = (t | (l ? 32 : 64)) & ~(l ? 64 : 32)), + 4 & t || (t &= -4), + (u = [n, t, u, h, s, i, o, f, c, a]), + (r = r.apply(T, u)), + Re(n) && yo(r, u), + (r.placeholder = e), + Ue(r, n, t) + ); + } + function ie(n) { + var t = Yu[n]; + return function (n, r) { + if (((n = Su(n)), (r = null == r ? 0 : Ci(Eu(r), 292)) && Wi(n))) { + var e = (Iu(n) + 'e').split('e'), + e = t(e[0] + 'e' + (+e[1] + r)), + e = (Iu(e) + 'e').split('e'); + return +(e[0] + 'e' + (+e[1] - r)); + } + return t(n); + }; + } + function oe(n) { + return function (t) { + var r = vo(t); + return '[object Map]' == r ? W(t) : '[object Set]' == r ? C(t) : E(t, n(t)); + }; + } + function fe(n, t, r, e, u, i, o, f) { + var c = 2 & t; + if (!c && typeof n != 'function') throw new ti('Expected a function'); + var a = e ? e.length : 0; + if ( + (a || ((t &= -97), (e = u = T)), + (o = o === T ? o : Ui(Eu(o), 0)), + (f = f === T ? f : Eu(f)), + (a -= u ? u.length : 0), + 64 & t) + ) { + var l = e, + s = u; + e = u = T; + } + var h = c ? T : ho(n); + return ( + (i = [n, t, r, e, u, l, s, i, o, f]), + h && + ((r = i[1]), + (n = h[1]), + (t = r | n), + (e = + (128 == n && 8 == r) || + (128 == n && 256 == r && i[7].length <= h[8]) || + (384 == n && h[7].length <= h[8] && 8 == r)), + 131 > t || e) && + (1 & n && ((i[2] = h[2]), (t |= 1 & r ? 0 : 4)), + (r = h[3]) && + ((e = i[3]), + (i[3] = e ? Br(e, r, h[4]) : r), + (i[4] = e ? L(i[3], '__lodash_placeholder__') : h[4])), + (r = h[5]) && + ((e = i[5]), + (i[5] = e ? Lr(e, r, h[6]) : r), + (i[6] = e ? L(i[5], '__lodash_placeholder__') : h[6])), + (r = h[7]) && (i[7] = r), + 128 & n && (i[8] = null == i[8] ? h[8] : Ci(i[8], h[8])), + null == i[9] && (i[9] = h[9]), + (i[0] = h[0]), + (i[1] = t)), + (n = i[0]), + (t = i[1]), + (r = i[2]), + (e = i[3]), + (u = i[4]), + (f = i[9] = i[9] === T ? (c ? 0 : n.length) : Ui(i[9] - a, 0)), + !f && 24 & t && (t &= -25), + Ue( + (h ? co : yo)( + t && 1 != t + ? 8 == t || 16 == t + ? Kr(n, t, f) + : (32 != t && 33 != t) || u.length + ? Jr.apply(T, i) + : te(n, t, r, e) + : Pr(n, t, r), + i, + ), + n, + t, + ) + ); + } + function ce(n, t, r, e) { + return n === T || (lu(n, ei[r]) && !oi.call(e, r)) ? t : n; + } + function ae(n, t, r, e, u, i) { + return du(n) && du(t) && (i.set(t, n), Yt(n, t, T, ae, i), i.delete(t)), n; + } + function le(n) { + return xu(n) ? T : n; + } + function se(n, t, r, e, u, i) { + var o = 1 & r, + f = n.length, + c = t.length; + if (f != c && !(o && c > f)) return false; + if ((c = i.get(n)) && i.get(t)) return c == t; + var c = -1, + a = true, + l = 2 & r ? new Nn() : T; + for (i.set(n, t), i.set(t, n); ++c < f; ) { + var s = n[c], + p = t[c]; + if (e) var _ = o ? e(p, s, c, t, n, i) : e(s, p, c, n, t, i); + if (_ !== T) { + if (_) continue; + a = false; + break; + } + if (l) { + if ( + !h(t, function (n, t) { + if (!O(l, t) && (s === n || u(s, n, r, e, i))) return l.push(t); + }) + ) { + a = false; + break; + } + } else if (s !== p && !u(s, p, r, e, i)) { + a = false; + break; + } + } + return i.delete(n), i.delete(t), a; + } + function he(n, t, r, e, u, i, o) { + switch (r) { + case '[object DataView]': + if (n.byteLength != t.byteLength || n.byteOffset != t.byteOffset) break; + (n = n.buffer), (t = t.buffer); + case '[object ArrayBuffer]': + if (n.byteLength != t.byteLength || !i(new vi(n), new vi(t))) break; + return true; + case '[object Boolean]': + case '[object Date]': + case '[object Number]': + return lu(+n, +t); + case '[object Error]': + return n.name == t.name && n.message == t.message; + case '[object RegExp]': + case '[object String]': + return n == t + ''; + case '[object Map]': + var f = W; + case '[object Set]': + if ((f || (f = U), n.size != t.size && !(1 & e))) break; + return (r = o.get(n)) + ? r == t + : ((e |= 2), o.set(n, t), (t = se(f(n), f(t), e, u, i, o)), o.delete(n), t); + case '[object Symbol]': + if (to) return to.call(n) == to.call(t); + } + return false; + } + function pe(n) { + return xo(Be(n, T, Ze), n + ''); + } + function _e(n) { + return St(n, Wu, po); + } + function ve(n) { + return St(n, Bu, _o); + } + function ge(n) { + for (var t = n.name + '', r = Gi[t], e = oi.call(Gi, t) ? r.length : 0; e--; ) { + var u = r[e], + i = u.func; + if (null == i || i == n) return u.name; + } + return t; + } + function de(n) { + return (oi.call(An, 'placeholder') ? An : n).placeholder; + } + function ye() { + var n = An.iteratee || Fu, + n = n === Fu ? qt : n; + return arguments.length ? n(arguments[0], arguments[1]) : n; + } + function be(n, t) { + var r = n.__data__, + e = typeof t; + return ( + 'string' == e || 'number' == e || 'symbol' == e || 'boolean' == e + ? '__proto__' !== t + : null === t + ) + ? r[typeof t == 'string' ? 'string' : 'hash'] + : r.map; + } + function xe(n) { + for (var t = Wu(n), r = t.length; r--; ) { + var e = t[r], + u = n[e]; + t[r] = [e, u, u === u && !du(u)]; + } + return t; + } + function je(n, t) { + var r = null == n ? T : n[t]; + return Ft(r) ? r : T; + } + function we(n, t, r) { + t = Sr(t, n); + for (var e = -1, u = t.length, i = false; ++e < u; ) { + var o = Me(t[e]); + if (!(i = null != n && r(n, o))) break; + n = n[o]; + } + return i || ++e != u + ? i + : ((u = null == n ? 0 : n.length), !!u && gu(u) && Se(o, u) && (ff(n) || of(n))); + } + function me(n) { + var t = n.length, + r = new n.constructor(t); + return ( + t && + 'string' == typeof n[0] && + oi.call(n, 'index') && + ((r.index = n.index), (r.input = n.input)), + r + ); + } + function Ae(n) { + return typeof n.constructor != 'function' || ze(n) ? {} : eo(di(n)); + } + function Ee(n, t, r) { + var e = n.constructor; + switch (t) { + case '[object ArrayBuffer]': + return Rr(n); + case '[object Boolean]': + case '[object Date]': + return new e(+n); + case '[object DataView]': + return ( + (t = r ? Rr(n.buffer) : n.buffer), new n.constructor(t, n.byteOffset, n.byteLength) + ); + case '[object Float32Array]': + case '[object Float64Array]': + case '[object Int8Array]': + case '[object Int16Array]': + case '[object Int32Array]': + case '[object Uint8Array]': + case '[object Uint8ClampedArray]': + case '[object Uint16Array]': + case '[object Uint32Array]': + return zr(n, r); + case '[object Map]': + return new e(); + case '[object Number]': + case '[object String]': + return new e(n); + case '[object RegExp]': + return (t = new n.constructor(n.source, _n.exec(n))), (t.lastIndex = n.lastIndex), t; + case '[object Set]': + return new e(); + case '[object Symbol]': + return to ? Qu(to.call(n)) : {}; + } + } + function ke(n) { + return ff(n) || of(n) || !!(ji && n && n[ji]); + } + function Se(n, t) { + var r = typeof n; + return ( + (t = null == t ? 9007199254740991 : t), + !!t && ('number' == r || ('symbol' != r && bn.test(n))) && -1 < n && 0 == n % 1 && n < t + ); + } + function Oe(n, t, r) { + if (!du(r)) return false; + var e = typeof t; + return !!('number' == e ? su(r) && Se(t, r.length) : 'string' == e && t in r) && lu(r[t], n); + } + function Ie(n, t) { + if (ff(n)) return false; + var r = typeof n; + return ( + !('number' != r && 'symbol' != r && 'boolean' != r && null != n && !wu(n)) || + nn.test(n) || + !X.test(n) || + (null != t && n in Qu(t)) + ); + } + function Re(n) { + var t = ge(n), + r = An[t]; + return ( + typeof r == 'function' && t in Un.prototype && (n === r || ((t = ho(r)), !!t && n === t[0])) + ); + } + function ze(n) { + var t = n && n.constructor; + return n === ((typeof t == 'function' && t.prototype) || ei); + } + function We(n, t) { + return function (r) { + return null != r && r[n] === t && (t !== T || n in Qu(r)); + }; + } + function Be(t, r, e) { + return ( + (r = Ui(r === T ? t.length - 1 : r, 0)), + function () { + for (var u = arguments, i = -1, o = Ui(u.length - r, 0), f = Ku(o); ++i < o; ) + f[i] = u[r + i]; + for (i = -1, o = Ku(r + 1); ++i < r; ) o[i] = u[i]; + return (o[r] = e(f)), n(t, this, o); + } + ); + } + function Le(n, t) { + if (('constructor' !== t || 'function' != typeof n[t]) && '__proto__' != t) return n[t]; + } + function Ue(n, t, r) { + var e = t + ''; + t = xo; + var u, + i = $e; + return ( + (u = (u = e.match(an)) ? u[1].split(ln) : []), + (r = i(u, r)), + (i = r.length) && + ((u = i - 1), + (r[u] = (1 < i ? '& ' : '') + r[u]), + (r = r.join(2 < i ? ', ' : ' ')), + (e = e.replace(cn, '{\n/* [wrapped with ' + r + '] */\n'))), + t(n, e) + ); + } + function Ce(n) { + var t = 0, + r = 0; + return function () { + var e = Di(), + u = 16 - (e - r); + if (((r = e), 0 < u)) { + if (800 <= ++t) return arguments[0]; + } else t = 0; + return n.apply(T, arguments); + }; + } + function De(n, t) { + var r = -1, + e = n.length, + u = e - 1; + for (t = t === T ? e : t; ++r < t; ) { + var e = ir(r, u), + i = n[e]; + (n[e] = n[r]), (n[r] = i); + } + return (n.length = t), n; + } + function Me(n) { + if (typeof n == 'string' || wu(n)) return n; + var t = n + ''; + return '0' == t && 1 / n == -$ ? '-0' : t; + } + function Te(n) { + if (null != n) { + try { + return ii.call(n); + } catch (n) {} + return n + ''; + } + return ''; + } + function $e(n, t) { + return ( + r(N, function (r) { + var e = '_.' + r[0]; + t & r[1] && !o(n, e) && n.push(e); + }), + n.sort() + ); + } + function Fe(n) { + if (n instanceof Un) return n.clone(); + var t = new On(n.__wrapped__, n.__chain__); + return ( + (t.__actions__ = Ur(n.__actions__)), + (t.__index__ = n.__index__), + (t.__values__ = n.__values__), + t + ); + } + function Ne(n, t, r) { + var e = null == n ? 0 : n.length; + return e ? ((r = null == r ? 0 : Eu(r)), 0 > r && (r = Ui(e + r, 0)), _(n, ye(t, 3), r)) : -1; + } + function Pe(n, t, r) { + var e = null == n ? 0 : n.length; + if (!e) return -1; + var u = e - 1; + return ( + r !== T && ((u = Eu(r)), (u = 0 > r ? Ui(e + u, 0) : Ci(u, e - 1))), _(n, ye(t, 3), u, true) + ); + } + function Ze(n) { + return (null == n ? 0 : n.length) ? wt(n, 1) : []; + } + function qe(n) { + return n && n.length ? n[0] : T; + } + function Ve(n) { + var t = null == n ? 0 : n.length; + return t ? n[t - 1] : T; + } + function Ke(n, t) { + return n && n.length && t && t.length ? er(n, t) : n; + } + function Ge(n) { + return null == n ? n : $i.call(n); + } + function He(n) { + if (!n || !n.length) return []; + var t = 0; + return ( + (n = i(n, function (n) { + if (hu(n)) return (t = Ui(n.length, t)), true; + })), + A(t, function (t) { + return c(n, b(t)); + }) + ); + } + function Je(t, r) { + if (!t || !t.length) return []; + var e = He(t); + return null == r + ? e + : c(e, function (t) { + return n(r, T, t); + }); + } + function Ye(n) { + return (n = An(n)), (n.__chain__ = true), n; + } + function Qe(n, t) { + return t(n); + } + function Xe() { + return this; + } + function nu(n, t) { + return (ff(n) ? r : uo)(n, ye(t, 3)); + } + function tu(n, t) { + return (ff(n) ? e : io)(n, ye(t, 3)); + } + function ru(n, t) { + return (ff(n) ? c : Gt)(n, ye(t, 3)); + } + function eu(n, t, r) { + return (t = r ? T : t), (t = n && null == t ? n.length : t), fe(n, 128, T, T, T, T, t); + } + function uu(n, t) { + var r; + if (typeof t != 'function') throw new ti('Expected a function'); + return ( + (n = Eu(n)), + function () { + return 0 < --n && (r = t.apply(this, arguments)), 1 >= n && (t = T), r; + } + ); + } + function iu(n, t, r) { + return (t = r ? T : t), (n = fe(n, 8, T, T, T, T, T, t)), (n.placeholder = iu.placeholder), n; + } + function ou(n, t, r) { + return ( + (t = r ? T : t), (n = fe(n, 16, T, T, T, T, T, t)), (n.placeholder = ou.placeholder), n + ); + } + function fu(n, t, r) { + function e(t) { + var r = c, + e = a; + return (c = a = T), (_ = t), (s = n.apply(e, r)); + } + function u(n) { + var r = n - p; + return (n -= _), p === T || r >= t || 0 > r || (g && n >= l); + } + function i() { + var n = Go(); + if (u(n)) return o(n); + var r, + e = bo; + (r = n - _), (n = t - (n - p)), (r = g ? Ci(n, l - r) : n), (h = e(i, r)); + } + function o(n) { + return (h = T), d && c ? e(n) : ((c = a = T), s); + } + function f() { + var n = Go(), + r = u(n); + if (((c = arguments), (a = this), (p = n), r)) { + if (h === T) return (_ = n = p), (h = bo(i, t)), v ? e(n) : s; + if (g) return lo(h), (h = bo(i, t)), e(p); + } + return h === T && (h = bo(i, t)), s; + } + var c, + a, + l, + s, + h, + p, + _ = 0, + v = false, + g = false, + d = true; + if (typeof n != 'function') throw new ti('Expected a function'); + return ( + (t = Su(t) || 0), + du(r) && + ((v = !!r.leading), + (l = (g = 'maxWait' in r) ? Ui(Su(r.maxWait) || 0, t) : l), + (d = 'trailing' in r ? !!r.trailing : d)), + (f.cancel = function () { + h !== T && lo(h), (_ = 0), (c = p = a = h = T); + }), + (f.flush = function () { + return h === T ? s : o(Go()); + }), + f + ); + } + function cu(n, t) { + function r() { + var e = arguments, + u = t ? t.apply(this, e) : e[0], + i = r.cache; + return i.has(u) ? i.get(u) : ((e = n.apply(this, e)), (r.cache = i.set(u, e) || i), e); + } + if (typeof n != 'function' || (null != t && typeof t != 'function')) + throw new ti('Expected a function'); + return (r.cache = new (cu.Cache || Fn)()), r; + } + function au(n) { + if (typeof n != 'function') throw new ti('Expected a function'); + return function () { + var t = arguments; + switch (t.length) { + case 0: + return !n.call(this); + case 1: + return !n.call(this, t[0]); + case 2: + return !n.call(this, t[0], t[1]); + case 3: + return !n.call(this, t[0], t[1], t[2]); + } + return !n.apply(this, t); + }; + } + function lu(n, t) { + return n === t || (n !== n && t !== t); + } + function su(n) { + return null != n && gu(n.length) && !_u(n); + } + function hu(n) { + return yu(n) && su(n); + } + function pu(n) { + if (!yu(n)) return false; + var t = Ot(n); + return ( + '[object Error]' == t || + '[object DOMException]' == t || + (typeof n.message == 'string' && typeof n.name == 'string' && !xu(n)) + ); + } + function _u(n) { + return ( + !!du(n) && + ((n = Ot(n)), + '[object Function]' == n || + '[object GeneratorFunction]' == n || + '[object AsyncFunction]' == n || + '[object Proxy]' == n) + ); + } + function vu(n) { + return typeof n == 'number' && n == Eu(n); + } + function gu(n) { + return typeof n == 'number' && -1 < n && 0 == n % 1 && 9007199254740991 >= n; + } + function du(n) { + var t = typeof n; + return null != n && ('object' == t || 'function' == t); + } + function yu(n) { + return null != n && typeof n == 'object'; + } + function bu(n) { + return typeof n == 'number' || (yu(n) && '[object Number]' == Ot(n)); + } + function xu(n) { + return ( + !(!yu(n) || '[object Object]' != Ot(n)) && + ((n = di(n)), + null === n || + ((n = oi.call(n, 'constructor') && n.constructor), + typeof n == 'function' && n instanceof n && ii.call(n) == li)) + ); + } + function ju(n) { + return typeof n == 'string' || (!ff(n) && yu(n) && '[object String]' == Ot(n)); + } + function wu(n) { + return typeof n == 'symbol' || (yu(n) && '[object Symbol]' == Ot(n)); + } + function mu(n) { + if (!n) return []; + if (su(n)) return ju(n) ? M(n) : Ur(n); + if (wi && n[wi]) { + n = n[wi](); + for (var t, r = []; !(t = n.next()).done; ) r.push(t.value); + return r; + } + return (t = vo(n)), ('[object Map]' == t ? W : '[object Set]' == t ? U : Uu)(n); + } + function Au(n) { + return n + ? ((n = Su(n)), + n === $ || n === -$ ? 1.7976931348623157e308 * (0 > n ? -1 : 1) : n === n ? n : 0) + : 0 === n + ? n + : 0; + } + function Eu(n) { + n = Au(n); + var t = n % 1; + return n === n ? (t ? n - t : n) : 0; + } + function ku(n) { + return n ? pt(Eu(n), 0, 4294967295) : 0; + } + function Su(n) { + if (typeof n == 'number') return n; + if (wu(n)) return F; + if ( + (du(n) && + ((n = typeof n.valueOf == 'function' ? n.valueOf() : n), (n = du(n) ? n + '' : n)), + typeof n != 'string') + ) + return 0 === n ? n : +n; + n = n.replace(un, ''); + var t = gn.test(n); + return t || yn.test(n) ? Dn(n.slice(2), t ? 2 : 8) : vn.test(n) ? F : +n; + } + function Ou(n) { + return Cr(n, Bu(n)); + } + function Iu(n) { + return null == n ? '' : yr(n); + } + function Ru(n, t, r) { + return (n = null == n ? T : kt(n, t)), n === T ? r : n; + } + function zu(n, t) { + return null != n && we(n, t, zt); + } + function Wu(n) { + return su(n) ? qn(n) : Vt(n); + } + function Bu(n) { + if (su(n)) n = qn(n, true); + else if (du(n)) { + var t, + r = ze(n), + e = []; + for (t in n) ('constructor' != t || (!r && oi.call(n, t))) && e.push(t); + n = e; + } else { + if (((t = []), null != n)) for (r in Qu(n)) t.push(r); + n = t; + } + return n; + } + function Lu(n, t) { + if (null == n) return {}; + var r = c(ve(n), function (n) { + return [n]; + }); + return ( + (t = ye(t)), + tr(n, r, function (n, r) { + return t(n, r[0]); + }) + ); + } + function Uu(n) { + return null == n ? [] : S(n, Wu(n)); + } + function Cu(n) { + return $f(Iu(n).toLowerCase()); + } + function Du(n) { + return (n = Iu(n)) && n.replace(xn, Xn).replace(Sn, ''); + } + function Mu(n, t, r) { + return ( + (n = Iu(n)), + (t = r ? T : t), + t === T ? (zn.test(n) ? n.match(In) || [] : n.match(sn) || []) : n.match(t) || [] + ); + } + function Tu(n) { + return function () { + return n; + }; + } + function $u(n) { + return n; + } + function Fu(n) { + return qt(typeof n == 'function' ? n : _t(n, 1)); + } + function Nu(n, t, e) { + var u = Wu(t), + i = Et(t, u); + null != e || + (du(t) && (i.length || !u.length)) || + ((e = t), (t = n), (n = this), (i = Et(t, Wu(t)))); + var o = !(du(e) && 'chain' in e && !e.chain), + f = _u(n); + return ( + r(i, function (r) { + var e = t[r]; + (n[r] = e), + f && + (n.prototype[r] = function () { + var t = this.__chain__; + if (o || t) { + var r = n(this.__wrapped__); + return ( + (r.__actions__ = Ur(this.__actions__)).push({ + func: e, + args: arguments, + thisArg: n, + }), + (r.__chain__ = t), + r + ); + } + return e.apply(n, a([this.value()], arguments)); + }); + }), + n + ); + } + function Pu() {} + function Zu(n) { + return Ie(n) ? b(Me(n)) : rr(n); + } + function qu() { + return []; + } + function Vu() { + return false; + } + mn = null == mn ? $n : rt.defaults($n.Object(), mn, rt.pick($n, Wn)); + var Ku = mn.Array, + Gu = mn.Date, + Hu = mn.Error, + Ju = mn.Function, + Yu = mn.Math, + Qu = mn.Object, + Xu = mn.RegExp, + ni = mn.String, + ti = mn.TypeError, + ri = Ku.prototype, + ei = Qu.prototype, + ui = mn['__core-js_shared__'], + ii = Ju.prototype.toString, + oi = ei.hasOwnProperty, + fi = 0, + ci = (function () { + var n = /[^.]+$/.exec((ui && ui.keys && ui.keys.IE_PROTO) || ''); + return n ? 'Symbol(src)_1.' + n : ''; + })(), + ai = ei.toString, + li = ii.call(Qu), + si = $n._, + hi = Xu( + '^' + + ii + .call(oi) + .replace(rn, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + + '$', + ), + pi = Pn ? mn.Buffer : T, + _i = mn.Symbol, + vi = mn.Uint8Array, + gi = pi ? pi.g : T, + di = B(Qu.getPrototypeOf, Qu), + yi = Qu.create, + bi = ei.propertyIsEnumerable, + xi = ri.splice, + ji = _i ? _i.isConcatSpreadable : T, + wi = _i ? _i.iterator : T, + mi = _i ? _i.toStringTag : T, + Ai = (function () { + try { + var n = je(Qu, 'defineProperty'); + return n({}, '', {}), n; + } catch (n) {} + })(), + Ei = mn.clearTimeout !== $n.clearTimeout && mn.clearTimeout, + ki = Gu && Gu.now !== $n.Date.now && Gu.now, + Si = mn.setTimeout !== $n.setTimeout && mn.setTimeout, + Oi = Yu.ceil, + Ii = Yu.floor, + Ri = Qu.getOwnPropertySymbols, + zi = pi ? pi.isBuffer : T, + Wi = mn.isFinite, + Bi = ri.join, + Li = B(Qu.keys, Qu), + Ui = Yu.max, + Ci = Yu.min, + Di = Gu.now, + Mi = mn.parseInt, + Ti = Yu.random, + $i = ri.reverse, + Fi = je(mn, 'DataView'), + Ni = je(mn, 'Map'), + Pi = je(mn, 'Promise'), + Zi = je(mn, 'Set'), + qi = je(mn, 'WeakMap'), + Vi = je(Qu, 'create'), + Ki = qi && new qi(), + Gi = {}, + Hi = Te(Fi), + Ji = Te(Ni), + Yi = Te(Pi), + Qi = Te(Zi), + Xi = Te(qi), + no = _i ? _i.prototype : T, + to = no ? no.valueOf : T, + ro = no ? no.toString : T, + eo = (function () { + function n() {} + return function (t) { + return du(t) + ? yi + ? yi(t) + : ((n.prototype = t), (t = new n()), (n.prototype = T), t) + : {}; + }; + })(); + (An.templateSettings = { + escape: J, + evaluate: Y, + interpolate: Q, + variable: '', + imports: { _: An }, + }), + (An.prototype = En.prototype), + (An.prototype.constructor = An), + (On.prototype = eo(En.prototype)), + (On.prototype.constructor = On), + (Un.prototype = eo(En.prototype)), + (Un.prototype.constructor = Un), + (Mn.prototype.clear = function () { + (this.__data__ = Vi ? Vi(null) : {}), (this.size = 0); + }), + (Mn.prototype.delete = function (n) { + return (n = this.has(n) && delete this.__data__[n]), (this.size -= n ? 1 : 0), n; + }), + (Mn.prototype.get = function (n) { + var t = this.__data__; + return Vi + ? ((n = t[n]), '__lodash_hash_undefined__' === n ? T : n) + : oi.call(t, n) + ? t[n] + : T; + }), + (Mn.prototype.has = function (n) { + var t = this.__data__; + return Vi ? t[n] !== T : oi.call(t, n); + }), + (Mn.prototype.set = function (n, t) { + var r = this.__data__; + return ( + (this.size += this.has(n) ? 0 : 1), + (r[n] = Vi && t === T ? '__lodash_hash_undefined__' : t), + this + ); + }), + (Tn.prototype.clear = function () { + (this.__data__ = []), (this.size = 0); + }), + (Tn.prototype.delete = function (n) { + var t = this.__data__; + return ( + (n = ft(t, n)), + !(0 > n) && (n == t.length - 1 ? t.pop() : xi.call(t, n, 1), --this.size, true) + ); + }), + (Tn.prototype.get = function (n) { + var t = this.__data__; + return (n = ft(t, n)), 0 > n ? T : t[n][1]; + }), + (Tn.prototype.has = function (n) { + return -1 < ft(this.__data__, n); + }), + (Tn.prototype.set = function (n, t) { + var r = this.__data__, + e = ft(r, n); + return 0 > e ? (++this.size, r.push([n, t])) : (r[e][1] = t), this; + }), + (Fn.prototype.clear = function () { + (this.size = 0), + (this.__data__ = { hash: new Mn(), map: new (Ni || Tn)(), string: new Mn() }); + }), + (Fn.prototype.delete = function (n) { + return (n = be(this, n).delete(n)), (this.size -= n ? 1 : 0), n; + }), + (Fn.prototype.get = function (n) { + return be(this, n).get(n); + }), + (Fn.prototype.has = function (n) { + return be(this, n).has(n); + }), + (Fn.prototype.set = function (n, t) { + var r = be(this, n), + e = r.size; + return r.set(n, t), (this.size += r.size == e ? 0 : 1), this; + }), + (Nn.prototype.add = Nn.prototype.push = + function (n) { + return this.__data__.set(n, '__lodash_hash_undefined__'), this; + }), + (Nn.prototype.has = function (n) { + return this.__data__.has(n); + }), + (Zn.prototype.clear = function () { + (this.__data__ = new Tn()), (this.size = 0); + }), + (Zn.prototype.delete = function (n) { + var t = this.__data__; + return (n = t.delete(n)), (this.size = t.size), n; + }), + (Zn.prototype.get = function (n) { + return this.__data__.get(n); + }), + (Zn.prototype.has = function (n) { + return this.__data__.has(n); + }), + (Zn.prototype.set = function (n, t) { + var r = this.__data__; + if (r instanceof Tn) { + var e = r.__data__; + if (!Ni || 199 > e.length) return e.push([n, t]), (this.size = ++r.size), this; + r = this.__data__ = new Fn(e); + } + return r.set(n, t), (this.size = r.size), this; + }); + var uo = Fr(mt), + io = Fr(At, true), + oo = Nr(), + fo = Nr(true), + co = Ki + ? function (n, t) { + return Ki.set(n, t), n; + } + : $u, + ao = Ai + ? function (n, t) { + return Ai(n, 'toString', { + configurable: true, + enumerable: false, + value: Tu(t), + writable: true, + }); + } + : $u, + lo = + Ei || + function (n) { + return $n.clearTimeout(n); + }, + so = + Zi && 1 / U(new Zi([, -0]))[1] == $ + ? function (n) { + return new Zi(n); + } + : Pu, + ho = Ki + ? function (n) { + return Ki.get(n); + } + : Pu, + po = Ri + ? function (n) { + return null == n + ? [] + : ((n = Qu(n)), + i(Ri(n), function (t) { + return bi.call(n, t); + })); + } + : qu, + _o = Ri + ? function (n) { + for (var t = []; n; ) a(t, po(n)), (n = di(n)); + return t; + } + : qu, + vo = Ot; + ((Fi && '[object DataView]' != vo(new Fi(new ArrayBuffer(1)))) || + (Ni && '[object Map]' != vo(new Ni())) || + (Pi && '[object Promise]' != vo(Pi.resolve())) || + (Zi && '[object Set]' != vo(new Zi())) || + (qi && '[object WeakMap]' != vo(new qi()))) && + (vo = function (n) { + var t = Ot(n); + if ((n = (n = '[object Object]' == t ? n.constructor : T) ? Te(n) : '')) + switch (n) { + case Hi: + return '[object DataView]'; + case Ji: + return '[object Map]'; + case Yi: + return '[object Promise]'; + case Qi: + return '[object Set]'; + case Xi: + return '[object WeakMap]'; + } + return t; + }); + var go = ui ? _u : Vu, + yo = Ce(co), + bo = + Si || + function (n, t) { + return $n.setTimeout(n, t); + }, + xo = Ce(ao), + jo = (function (n) { + n = cu(n, function (n) { + return 500 === t.size && t.clear(), n; + }); + var t = n.cache; + return n; + })(function (n) { + var t = []; + return ( + 46 === n.charCodeAt(0) && t.push(''), + n.replace(tn, function (n, r, e, u) { + t.push(e ? u.replace(hn, '$1') : r || n); + }), + t + ); + }), + wo = fr(function (n, t) { + return hu(n) ? yt(n, wt(t, 1, hu, true)) : []; + }), + mo = fr(function (n, t) { + var r = Ve(t); + return hu(r) && (r = T), hu(n) ? yt(n, wt(t, 1, hu, true), ye(r, 2)) : []; + }), + Ao = fr(function (n, t) { + var r = Ve(t); + return hu(r) && (r = T), hu(n) ? yt(n, wt(t, 1, hu, true), T, r) : []; + }), + Eo = fr(function (n) { + var t = c(n, Er); + return t.length && t[0] === n[0] ? Wt(t) : []; + }), + ko = fr(function (n) { + var t = Ve(n), + r = c(n, Er); + return t === Ve(r) ? (t = T) : r.pop(), r.length && r[0] === n[0] ? Wt(r, ye(t, 2)) : []; + }), + So = fr(function (n) { + var t = Ve(n), + r = c(n, Er); + return ( + (t = typeof t == 'function' ? t : T) && r.pop(), + r.length && r[0] === n[0] ? Wt(r, T, t) : [] + ); + }), + Oo = fr(Ke), + Io = pe(function (n, t) { + var r = null == n ? 0 : n.length, + e = ht(n, t); + return ( + ur( + n, + c(t, function (n) { + return Se(n, r) ? +n : n; + }).sort(Wr), + ), + e + ); + }), + Ro = fr(function (n) { + return br(wt(n, 1, hu, true)); + }), + zo = fr(function (n) { + var t = Ve(n); + return hu(t) && (t = T), br(wt(n, 1, hu, true), ye(t, 2)); + }), + Wo = fr(function (n) { + var t = Ve(n), + t = typeof t == 'function' ? t : T; + return br(wt(n, 1, hu, true), T, t); + }), + Bo = fr(function (n, t) { + return hu(n) ? yt(n, t) : []; + }), + Lo = fr(function (n) { + return mr(i(n, hu)); + }), + Uo = fr(function (n) { + var t = Ve(n); + return hu(t) && (t = T), mr(i(n, hu), ye(t, 2)); + }), + Co = fr(function (n) { + var t = Ve(n), + t = typeof t == 'function' ? t : T; + return mr(i(n, hu), T, t); + }), + Do = fr(He), + Mo = fr(function (n) { + var t = n.length, + t = 1 < t ? n[t - 1] : T, + t = typeof t == 'function' ? (n.pop(), t) : T; + return Je(n, t); + }), + To = pe(function (n) { + function t(t) { + return ht(t, n); + } + var r = n.length, + e = r ? n[0] : 0, + u = this.__wrapped__; + return !(1 < r || this.__actions__.length) && u instanceof Un && Se(e) + ? ((u = u.slice(e, +e + (r ? 1 : 0))), + u.__actions__.push({ func: Qe, args: [t], thisArg: T }), + new On(u, this.__chain__).thru(function (n) { + return r && !n.length && n.push(T), n; + })) + : this.thru(t); + }), + $o = Tr(function (n, t, r) { + oi.call(n, r) ? ++n[r] : st(n, r, 1); + }), + Fo = Gr(Ne), + No = Gr(Pe), + Po = Tr(function (n, t, r) { + oi.call(n, r) ? n[r].push(t) : st(n, r, [t]); + }), + Zo = fr(function (t, r, e) { + var u = -1, + i = typeof r == 'function', + o = su(t) ? Ku(t.length) : []; + return ( + uo(t, function (t) { + o[++u] = i ? n(r, t, e) : Lt(t, r, e); + }), + o + ); + }), + qo = Tr(function (n, t, r) { + st(n, r, t); + }), + Vo = Tr( + function (n, t, r) { + n[r ? 0 : 1].push(t); + }, + function () { + return [[], []]; + }, + ), + Ko = fr(function (n, t) { + if (null == n) return []; + var r = t.length; + return ( + 1 < r && Oe(n, t[0], t[1]) ? (t = []) : 2 < r && Oe(t[0], t[1], t[2]) && (t = [t[0]]), + Xt(n, wt(t, 1), []) + ); + }), + Go = + ki || + function () { + return $n.Date.now(); + }, + Ho = fr(function (n, t, r) { + var e = 1; + if (r.length) + var u = L(r, de(Ho)), + e = 32 | e; + return fe(n, e, t, r, u); + }), + Jo = fr(function (n, t, r) { + var e = 3; + if (r.length) + var u = L(r, de(Jo)), + e = 32 | e; + return fe(t, e, n, r, u); + }), + Yo = fr(function (n, t) { + return dt(n, 1, t); + }), + Qo = fr(function (n, t, r) { + return dt(n, Su(t) || 0, r); + }); + cu.Cache = Fn; + var Xo = fr(function (t, r) { + r = 1 == r.length && ff(r[0]) ? c(r[0], k(ye())) : c(wt(r, 1), k(ye())); + var e = r.length; + return fr(function (u) { + for (var i = -1, o = Ci(u.length, e); ++i < o; ) u[i] = r[i].call(this, u[i]); + return n(t, this, u); + }); + }), + nf = fr(function (n, t) { + return fe(n, 32, T, t, L(t, de(nf))); + }), + tf = fr(function (n, t) { + return fe(n, 64, T, t, L(t, de(tf))); + }), + rf = pe(function (n, t) { + return fe(n, 256, T, T, T, t); + }), + ef = ee(It), + uf = ee(function (n, t) { + return n >= t; + }), + of = Ut( + (function () { + return arguments; + })(), + ) + ? Ut + : function (n) { + return yu(n) && oi.call(n, 'callee') && !bi.call(n, 'callee'); + }, + ff = Ku.isArray, + cf = Vn ? k(Vn) : Ct, + af = zi || Vu, + lf = Kn ? k(Kn) : Dt, + sf = Gn ? k(Gn) : Tt, + hf = Hn ? k(Hn) : Nt, + pf = Jn ? k(Jn) : Pt, + _f = Yn ? k(Yn) : Zt, + vf = ee(Kt), + gf = ee(function (n, t) { + return n <= t; + }), + df = $r(function (n, t) { + if (ze(t) || su(t)) Cr(t, Wu(t), n); + else for (var r in t) oi.call(t, r) && ot(n, r, t[r]); + }), + yf = $r(function (n, t) { + Cr(t, Bu(t), n); + }), + bf = $r(function (n, t, r, e) { + Cr(t, Bu(t), n, e); + }), + xf = $r(function (n, t, r, e) { + Cr(t, Wu(t), n, e); + }), + jf = pe(ht), + wf = fr(function (n, t) { + n = Qu(n); + var r = -1, + e = t.length, + u = 2 < e ? t[2] : T; + for (u && Oe(t[0], t[1], u) && (e = 1); ++r < e; ) + for (var u = t[r], i = Bu(u), o = -1, f = i.length; ++o < f; ) { + var c = i[o], + a = n[c]; + (a === T || (lu(a, ei[c]) && !oi.call(n, c))) && (n[c] = u[c]); + } + return n; + }), + mf = fr(function (t) { + return t.push(T, ae), n(Of, T, t); + }), + Af = Yr(function (n, t, r) { + null != t && typeof t.toString != 'function' && (t = ai.call(t)), (n[t] = r); + }, Tu($u)), + Ef = Yr(function (n, t, r) { + null != t && typeof t.toString != 'function' && (t = ai.call(t)), + oi.call(n, t) ? n[t].push(r) : (n[t] = [r]); + }, ye), + kf = fr(Lt), + Sf = $r(function (n, t, r) { + Yt(n, t, r); + }), + Of = $r(function (n, t, r, e) { + Yt(n, t, r, e); + }), + If = pe(function (n, t) { + var r = {}; + if (null == n) return r; + var e = false; + (t = c(t, function (t) { + return (t = Sr(t, n)), e || (e = 1 < t.length), t; + })), + Cr(n, ve(n), r), + e && (r = _t(r, 7, le)); + for (var u = t.length; u--; ) xr(r, t[u]); + return r; + }), + Rf = pe(function (n, t) { + return null == n ? {} : nr(n, t); + }), + zf = oe(Wu), + Wf = oe(Bu), + Bf = qr(function (n, t, r) { + return (t = t.toLowerCase()), n + (r ? Cu(t) : t); + }), + Lf = qr(function (n, t, r) { + return n + (r ? '-' : '') + t.toLowerCase(); + }), + Uf = qr(function (n, t, r) { + return n + (r ? ' ' : '') + t.toLowerCase(); + }), + Cf = Zr('toLowerCase'), + Df = qr(function (n, t, r) { + return n + (r ? '_' : '') + t.toLowerCase(); + }), + Mf = qr(function (n, t, r) { + return n + (r ? ' ' : '') + $f(t); + }), + Tf = qr(function (n, t, r) { + return n + (r ? ' ' : '') + t.toUpperCase(); + }), + $f = Zr('toUpperCase'), + Ff = fr(function (t, r) { + try { + return n(t, T, r); + } catch (n) { + return pu(n) ? n : new Hu(n); + } + }), + Nf = pe(function (n, t) { + return ( + r(t, function (t) { + (t = Me(t)), st(n, t, Ho(n[t], n)); + }), + n + ); + }), + Pf = Hr(), + Zf = Hr(true), + qf = fr(function (n, t) { + return function (r) { + return Lt(r, n, t); + }; + }), + Vf = fr(function (n, t) { + return function (r) { + return Lt(n, r, t); + }; + }), + Kf = Xr(c), + Gf = Xr(u), + Hf = Xr(h), + Jf = re(), + Yf = re(true), + Qf = Qr(function (n, t) { + return n + t; + }, 0), + Xf = ie('ceil'), + nc = Qr(function (n, t) { + return n / t; + }, 1), + tc = ie('floor'), + rc = Qr(function (n, t) { + return n * t; + }, 1), + ec = ie('round'), + uc = Qr(function (n, t) { + return n - t; + }, 0); + return ( + (An.after = function (n, t) { + if (typeof t != 'function') throw new ti('Expected a function'); + return ( + (n = Eu(n)), + function () { + if (1 > --n) return t.apply(this, arguments); + } + ); + }), + (An.ary = eu), + (An.assign = df), + (An.assignIn = yf), + (An.assignInWith = bf), + (An.assignWith = xf), + (An.at = jf), + (An.before = uu), + (An.bind = Ho), + (An.bindAll = Nf), + (An.bindKey = Jo), + (An.castArray = function () { + if (!arguments.length) return []; + var n = arguments[0]; + return ff(n) ? n : [n]; + }), + (An.chain = Ye), + (An.chunk = function (n, t, r) { + if ( + ((t = (r ? Oe(n, t, r) : t === T) ? 1 : Ui(Eu(t), 0)), + (r = null == n ? 0 : n.length), + !r || 1 > t) + ) + return []; + for (var e = 0, u = 0, i = Ku(Oi(r / t)); e < r; ) i[u++] = hr(n, e, (e += t)); + return i; + }), + (An.compact = function (n) { + for (var t = -1, r = null == n ? 0 : n.length, e = 0, u = []; ++t < r; ) { + var i = n[t]; + i && (u[e++] = i); + } + return u; + }), + (An.concat = function () { + var n = arguments.length; + if (!n) return []; + for (var t = Ku(n - 1), r = arguments[0]; n--; ) t[n - 1] = arguments[n]; + return a(ff(r) ? Ur(r) : [r], wt(t, 1)); + }), + (An.cond = function (t) { + var r = null == t ? 0 : t.length, + e = ye(); + return ( + (t = r + ? c(t, function (n) { + if ('function' != typeof n[1]) throw new ti('Expected a function'); + return [e(n[0]), n[1]]; + }) + : []), + fr(function (e) { + for (var u = -1; ++u < r; ) { + var i = t[u]; + if (n(i[0], this, e)) return n(i[1], this, e); + } + }) + ); + }), + (An.conforms = function (n) { + return vt(_t(n, 1)); + }), + (An.constant = Tu), + (An.countBy = $o), + (An.create = function (n, t) { + var r = eo(n); + return null == t ? r : at(r, t); + }), + (An.curry = iu), + (An.curryRight = ou), + (An.debounce = fu), + (An.defaults = wf), + (An.defaultsDeep = mf), + (An.defer = Yo), + (An.delay = Qo), + (An.difference = wo), + (An.differenceBy = mo), + (An.differenceWith = Ao), + (An.drop = function (n, t, r) { + var e = null == n ? 0 : n.length; + return e ? ((t = r || t === T ? 1 : Eu(t)), hr(n, 0 > t ? 0 : t, e)) : []; + }), + (An.dropRight = function (n, t, r) { + var e = null == n ? 0 : n.length; + return e ? ((t = r || t === T ? 1 : Eu(t)), (t = e - t), hr(n, 0, 0 > t ? 0 : t)) : []; + }), + (An.dropRightWhile = function (n, t) { + return n && n.length ? jr(n, ye(t, 3), true, true) : []; + }), + (An.dropWhile = function (n, t) { + return n && n.length ? jr(n, ye(t, 3), true) : []; + }), + (An.fill = function (n, t, r, e) { + var u = null == n ? 0 : n.length; + if (!u) return []; + for ( + r && typeof r != 'number' && Oe(n, t, r) && ((r = 0), (e = u)), + u = n.length, + r = Eu(r), + 0 > r && (r = -r > u ? 0 : u + r), + e = e === T || e > u ? u : Eu(e), + 0 > e && (e += u), + e = r > e ? 0 : ku(e); + r < e; + + ) + n[r++] = t; + return n; + }), + (An.filter = function (n, t) { + return (ff(n) ? i : jt)(n, ye(t, 3)); + }), + (An.flatMap = function (n, t) { + return wt(ru(n, t), 1); + }), + (An.flatMapDeep = function (n, t) { + return wt(ru(n, t), $); + }), + (An.flatMapDepth = function (n, t, r) { + return (r = r === T ? 1 : Eu(r)), wt(ru(n, t), r); + }), + (An.flatten = Ze), + (An.flattenDeep = function (n) { + return (null == n ? 0 : n.length) ? wt(n, $) : []; + }), + (An.flattenDepth = function (n, t) { + return null != n && n.length ? ((t = t === T ? 1 : Eu(t)), wt(n, t)) : []; + }), + (An.flip = function (n) { + return fe(n, 512); + }), + (An.flow = Pf), + (An.flowRight = Zf), + (An.fromPairs = function (n) { + for (var t = -1, r = null == n ? 0 : n.length, e = {}; ++t < r; ) { + var u = n[t]; + e[u[0]] = u[1]; + } + return e; + }), + (An.functions = function (n) { + return null == n ? [] : Et(n, Wu(n)); + }), + (An.functionsIn = function (n) { + return null == n ? [] : Et(n, Bu(n)); + }), + (An.groupBy = Po), + (An.initial = function (n) { + return (null == n ? 0 : n.length) ? hr(n, 0, -1) : []; + }), + (An.intersection = Eo), + (An.intersectionBy = ko), + (An.intersectionWith = So), + (An.invert = Af), + (An.invertBy = Ef), + (An.invokeMap = Zo), + (An.iteratee = Fu), + (An.keyBy = qo), + (An.keys = Wu), + (An.keysIn = Bu), + (An.map = ru), + (An.mapKeys = function (n, t) { + var r = {}; + return ( + (t = ye(t, 3)), + mt(n, function (n, e, u) { + st(r, t(n, e, u), n); + }), + r + ); + }), + (An.mapValues = function (n, t) { + var r = {}; + return ( + (t = ye(t, 3)), + mt(n, function (n, e, u) { + st(r, e, t(n, e, u)); + }), + r + ); + }), + (An.matches = function (n) { + return Ht(_t(n, 1)); + }), + (An.matchesProperty = function (n, t) { + return Jt(n, _t(t, 1)); + }), + (An.memoize = cu), + (An.merge = Sf), + (An.mergeWith = Of), + (An.method = qf), + (An.methodOf = Vf), + (An.mixin = Nu), + (An.negate = au), + (An.nthArg = function (n) { + return ( + (n = Eu(n)), + fr(function (t) { + return Qt(t, n); + }) + ); + }), + (An.omit = If), + (An.omitBy = function (n, t) { + return Lu(n, au(ye(t))); + }), + (An.once = function (n) { + return uu(2, n); + }), + (An.orderBy = function (n, t, r, e) { + return null == n + ? [] + : (ff(t) || (t = null == t ? [] : [t]), + (r = e ? T : r), + ff(r) || (r = null == r ? [] : [r]), + Xt(n, t, r)); + }), + (An.over = Kf), + (An.overArgs = Xo), + (An.overEvery = Gf), + (An.overSome = Hf), + (An.partial = nf), + (An.partialRight = tf), + (An.partition = Vo), + (An.pick = Rf), + (An.pickBy = Lu), + (An.property = Zu), + (An.propertyOf = function (n) { + return function (t) { + return null == n ? T : kt(n, t); + }; + }), + (An.pull = Oo), + (An.pullAll = Ke), + (An.pullAllBy = function (n, t, r) { + return n && n.length && t && t.length ? er(n, t, ye(r, 2)) : n; + }), + (An.pullAllWith = function (n, t, r) { + return n && n.length && t && t.length ? er(n, t, T, r) : n; + }), + (An.pullAt = Io), + (An.range = Jf), + (An.rangeRight = Yf), + (An.rearg = rf), + (An.reject = function (n, t) { + return (ff(n) ? i : jt)(n, au(ye(t, 3))); + }), + (An.remove = function (n, t) { + var r = []; + if (!n || !n.length) return r; + var e = -1, + u = [], + i = n.length; + for (t = ye(t, 3); ++e < i; ) { + var o = n[e]; + t(o, e, n) && (r.push(o), u.push(e)); + } + return ur(n, u), r; + }), + (An.rest = function (n, t) { + if (typeof n != 'function') throw new ti('Expected a function'); + return (t = t === T ? t : Eu(t)), fr(n, t); + }), + (An.reverse = Ge), + (An.sampleSize = function (n, t, r) { + return (t = (r ? Oe(n, t, r) : t === T) ? 1 : Eu(t)), (ff(n) ? et : ar)(n, t); + }), + (An.set = function (n, t, r) { + return null == n ? n : lr(n, t, r); + }), + (An.setWith = function (n, t, r, e) { + return (e = typeof e == 'function' ? e : T), null == n ? n : lr(n, t, r, e); + }), + (An.shuffle = function (n) { + return (ff(n) ? ut : sr)(n); + }), + (An.slice = function (n, t, r) { + var e = null == n ? 0 : n.length; + return e + ? (r && typeof r != 'number' && Oe(n, t, r) + ? ((t = 0), (r = e)) + : ((t = null == t ? 0 : Eu(t)), (r = r === T ? e : Eu(r))), + hr(n, t, r)) + : []; + }), + (An.sortBy = Ko), + (An.sortedUniq = function (n) { + return n && n.length ? gr(n) : []; + }), + (An.sortedUniqBy = function (n, t) { + return n && n.length ? gr(n, ye(t, 2)) : []; + }), + (An.split = function (n, t, r) { + return ( + r && typeof r != 'number' && Oe(n, t, r) && (t = r = T), + (r = r === T ? 4294967295 : r >>> 0), + r + ? (n = Iu(n)) && + (typeof t == 'string' || (null != t && !hf(t))) && + ((t = yr(t)), !t && Rn.test(n)) + ? Or(M(n), 0, r) + : n.split(t, r) + : [] + ); + }), + (An.spread = function (t, r) { + if (typeof t != 'function') throw new ti('Expected a function'); + return ( + (r = null == r ? 0 : Ui(Eu(r), 0)), + fr(function (e) { + var u = e[r]; + return (e = Or(e, 0, r)), u && a(e, u), n(t, this, e); + }) + ); + }), + (An.tail = function (n) { + var t = null == n ? 0 : n.length; + return t ? hr(n, 1, t) : []; + }), + (An.take = function (n, t, r) { + return n && n.length ? ((t = r || t === T ? 1 : Eu(t)), hr(n, 0, 0 > t ? 0 : t)) : []; + }), + (An.takeRight = function (n, t, r) { + var e = null == n ? 0 : n.length; + return e ? ((t = r || t === T ? 1 : Eu(t)), (t = e - t), hr(n, 0 > t ? 0 : t, e)) : []; + }), + (An.takeRightWhile = function (n, t) { + return n && n.length ? jr(n, ye(t, 3), false, true) : []; + }), + (An.takeWhile = function (n, t) { + return n && n.length ? jr(n, ye(t, 3)) : []; + }), + (An.tap = function (n, t) { + return t(n), n; + }), + (An.throttle = function (n, t, r) { + var e = true, + u = true; + if (typeof n != 'function') throw new ti('Expected a function'); + return ( + du(r) && + ((e = 'leading' in r ? !!r.leading : e), (u = 'trailing' in r ? !!r.trailing : u)), + fu(n, t, { leading: e, maxWait: t, trailing: u }) + ); + }), + (An.thru = Qe), + (An.toArray = mu), + (An.toPairs = zf), + (An.toPairsIn = Wf), + (An.toPath = function (n) { + return ff(n) ? c(n, Me) : wu(n) ? [n] : Ur(jo(Iu(n))); + }), + (An.toPlainObject = Ou), + (An.transform = function (n, t, e) { + var u = ff(n), + i = u || af(n) || _f(n); + if (((t = ye(t, 4)), null == e)) { + var o = n && n.constructor; + e = i ? (u ? new o() : []) : du(n) && _u(o) ? eo(di(n)) : {}; + } + return ( + (i ? r : mt)(n, function (n, r, u) { + return t(e, n, r, u); + }), + e + ); + }), + (An.unary = function (n) { + return eu(n, 1); + }), + (An.union = Ro), + (An.unionBy = zo), + (An.unionWith = Wo), + (An.uniq = function (n) { + return n && n.length ? br(n) : []; + }), + (An.uniqBy = function (n, t) { + return n && n.length ? br(n, ye(t, 2)) : []; + }), + (An.uniqWith = function (n, t) { + return (t = typeof t == 'function' ? t : T), n && n.length ? br(n, T, t) : []; + }), + (An.unset = function (n, t) { + return null == n || xr(n, t); + }), + (An.unzip = He), + (An.unzipWith = Je), + (An.update = function (n, t, r) { + return null == n ? n : lr(n, t, kr(r)(kt(n, t)), void 0); + }), + (An.updateWith = function (n, t, r, e) { + return ( + (e = typeof e == 'function' ? e : T), null != n && (n = lr(n, t, kr(r)(kt(n, t)), e)), n + ); + }), + (An.values = Uu), + (An.valuesIn = function (n) { + return null == n ? [] : S(n, Bu(n)); + }), + (An.without = Bo), + (An.words = Mu), + (An.wrap = function (n, t) { + return nf(kr(t), n); + }), + (An.xor = Lo), + (An.xorBy = Uo), + (An.xorWith = Co), + (An.zip = Do), + (An.zipObject = function (n, t) { + return Ar(n || [], t || [], ot); + }), + (An.zipObjectDeep = function (n, t) { + return Ar(n || [], t || [], lr); + }), + (An.zipWith = Mo), + (An.entries = zf), + (An.entriesIn = Wf), + (An.extend = yf), + (An.extendWith = bf), + Nu(An, An), + (An.add = Qf), + (An.attempt = Ff), + (An.camelCase = Bf), + (An.capitalize = Cu), + (An.ceil = Xf), + (An.clamp = function (n, t, r) { + return ( + r === T && ((r = t), (t = T)), + r !== T && ((r = Su(r)), (r = r === r ? r : 0)), + t !== T && ((t = Su(t)), (t = t === t ? t : 0)), + pt(Su(n), t, r) + ); + }), + (An.clone = function (n) { + return _t(n, 4); + }), + (An.cloneDeep = function (n) { + return _t(n, 5); + }), + (An.cloneDeepWith = function (n, t) { + return (t = typeof t == 'function' ? t : T), _t(n, 5, t); + }), + (An.cloneWith = function (n, t) { + return (t = typeof t == 'function' ? t : T), _t(n, 4, t); + }), + (An.conformsTo = function (n, t) { + return null == t || gt(n, t, Wu(t)); + }), + (An.deburr = Du), + (An.defaultTo = function (n, t) { + return null == n || n !== n ? t : n; + }), + (An.divide = nc), + (An.endsWith = function (n, t, r) { + (n = Iu(n)), (t = yr(t)); + var e = n.length, + e = (r = r === T ? e : pt(Eu(r), 0, e)); + return (r -= t.length), 0 <= r && n.slice(r, e) == t; + }), + (An.eq = lu), + (An.escape = function (n) { + return (n = Iu(n)) && H.test(n) ? n.replace(K, nt) : n; + }), + (An.escapeRegExp = function (n) { + return (n = Iu(n)) && en.test(n) ? n.replace(rn, '\\$&') : n; + }), + (An.every = function (n, t, r) { + var e = ff(n) ? u : bt; + return r && Oe(n, t, r) && (t = T), e(n, ye(t, 3)); + }), + (An.find = Fo), + (An.findIndex = Ne), + (An.findKey = function (n, t) { + return p(n, ye(t, 3), mt); + }), + (An.findLast = No), + (An.findLastIndex = Pe), + (An.findLastKey = function (n, t) { + return p(n, ye(t, 3), At); + }), + (An.floor = tc), + (An.forEach = nu), + (An.forEachRight = tu), + (An.forIn = function (n, t) { + return null == n ? n : oo(n, ye(t, 3), Bu); + }), + (An.forInRight = function (n, t) { + return null == n ? n : fo(n, ye(t, 3), Bu); + }), + (An.forOwn = function (n, t) { + return n && mt(n, ye(t, 3)); + }), + (An.forOwnRight = function (n, t) { + return n && At(n, ye(t, 3)); + }), + (An.get = Ru), + (An.gt = ef), + (An.gte = uf), + (An.has = function (n, t) { + return null != n && we(n, t, Rt); + }), + (An.hasIn = zu), + (An.head = qe), + (An.identity = $u), + (An.includes = function (n, t, r, e) { + return ( + (n = su(n) ? n : Uu(n)), + (r = r && !e ? Eu(r) : 0), + (e = n.length), + 0 > r && (r = Ui(e + r, 0)), + ju(n) ? r <= e && -1 < n.indexOf(t, r) : !!e && -1 < v(n, t, r) + ); + }), + (An.indexOf = function (n, t, r) { + var e = null == n ? 0 : n.length; + return e ? ((r = null == r ? 0 : Eu(r)), 0 > r && (r = Ui(e + r, 0)), v(n, t, r)) : -1; + }), + (An.inRange = function (n, t, r) { + return ( + (t = Au(t)), + r === T ? ((r = t), (t = 0)) : (r = Au(r)), + (n = Su(n)), + n >= Ci(t, r) && n < Ui(t, r) + ); + }), + (An.invoke = kf), + (An.isArguments = of), + (An.isArray = ff), + (An.isArrayBuffer = cf), + (An.isArrayLike = su), + (An.isArrayLikeObject = hu), + (An.isBoolean = function (n) { + return true === n || false === n || (yu(n) && '[object Boolean]' == Ot(n)); + }), + (An.isBuffer = af), + (An.isDate = lf), + (An.isElement = function (n) { + return yu(n) && 1 === n.nodeType && !xu(n); + }), + (An.isEmpty = function (n) { + if (null == n) return true; + if ( + su(n) && + (ff(n) || + typeof n == 'string' || + typeof n.splice == 'function' || + af(n) || + _f(n) || + of(n)) + ) + return !n.length; + var t = vo(n); + if ('[object Map]' == t || '[object Set]' == t) return !n.size; + if (ze(n)) return !Vt(n).length; + for (var r in n) if (oi.call(n, r)) return false; + return true; + }), + (An.isEqual = function (n, t) { + return Mt(n, t); + }), + (An.isEqualWith = function (n, t, r) { + var e = (r = typeof r == 'function' ? r : T) ? r(n, t) : T; + return e === T ? Mt(n, t, T, r) : !!e; + }), + (An.isError = pu), + (An.isFinite = function (n) { + return typeof n == 'number' && Wi(n); + }), + (An.isFunction = _u), + (An.isInteger = vu), + (An.isLength = gu), + (An.isMap = sf), + (An.isMatch = function (n, t) { + return n === t || $t(n, t, xe(t)); + }), + (An.isMatchWith = function (n, t, r) { + return (r = typeof r == 'function' ? r : T), $t(n, t, xe(t), r); + }), + (An.isNaN = function (n) { + return bu(n) && n != +n; + }), + (An.isNative = function (n) { + if (go(n)) throw new Hu('Unsupported core-js use. Try https://npms.io/search?q=ponyfill.'); + return Ft(n); + }), + (An.isNil = function (n) { + return null == n; + }), + (An.isNull = function (n) { + return null === n; + }), + (An.isNumber = bu), + (An.isObject = du), + (An.isObjectLike = yu), + (An.isPlainObject = xu), + (An.isRegExp = hf), + (An.isSafeInteger = function (n) { + return vu(n) && -9007199254740991 <= n && 9007199254740991 >= n; + }), + (An.isSet = pf), + (An.isString = ju), + (An.isSymbol = wu), + (An.isTypedArray = _f), + (An.isUndefined = function (n) { + return n === T; + }), + (An.isWeakMap = function (n) { + return yu(n) && '[object WeakMap]' == vo(n); + }), + (An.isWeakSet = function (n) { + return yu(n) && '[object WeakSet]' == Ot(n); + }), + (An.join = function (n, t) { + return null == n ? '' : Bi.call(n, t); + }), + (An.kebabCase = Lf), + (An.last = Ve), + (An.lastIndexOf = function (n, t, r) { + var e = null == n ? 0 : n.length; + if (!e) return -1; + var u = e; + if ((r !== T && ((u = Eu(r)), (u = 0 > u ? Ui(e + u, 0) : Ci(u, e - 1))), t === t)) { + for (r = u + 1; r-- && n[r] !== t; ); + n = r; + } else n = _(n, d, u, true); + return n; + }), + (An.lowerCase = Uf), + (An.lowerFirst = Cf), + (An.lt = vf), + (An.lte = gf), + (An.max = function (n) { + return n && n.length ? xt(n, $u, It) : T; + }), + (An.maxBy = function (n, t) { + return n && n.length ? xt(n, ye(t, 2), It) : T; + }), + (An.mean = function (n) { + return y(n, $u); + }), + (An.meanBy = function (n, t) { + return y(n, ye(t, 2)); + }), + (An.min = function (n) { + return n && n.length ? xt(n, $u, Kt) : T; + }), + (An.minBy = function (n, t) { + return n && n.length ? xt(n, ye(t, 2), Kt) : T; + }), + (An.stubArray = qu), + (An.stubFalse = Vu), + (An.stubObject = function () { + return {}; + }), + (An.stubString = function () { + return ''; + }), + (An.stubTrue = function () { + return true; + }), + (An.multiply = rc), + (An.nth = function (n, t) { + return n && n.length ? Qt(n, Eu(t)) : T; + }), + (An.noConflict = function () { + return $n._ === this && ($n._ = si), this; + }), + (An.noop = Pu), + (An.now = Go), + (An.pad = function (n, t, r) { + n = Iu(n); + var e = (t = Eu(t)) ? D(n) : 0; + return !t || e >= t ? n : ((t = (t - e) / 2), ne(Ii(t), r) + n + ne(Oi(t), r)); + }), + (An.padEnd = function (n, t, r) { + n = Iu(n); + var e = (t = Eu(t)) ? D(n) : 0; + return t && e < t ? n + ne(t - e, r) : n; + }), + (An.padStart = function (n, t, r) { + n = Iu(n); + var e = (t = Eu(t)) ? D(n) : 0; + return t && e < t ? ne(t - e, r) + n : n; + }), + (An.parseInt = function (n, t, r) { + return r || null == t ? (t = 0) : t && (t = +t), Mi(Iu(n).replace(on, ''), t || 0); + }), + (An.random = function (n, t, r) { + if ( + (r && typeof r != 'boolean' && Oe(n, t, r) && (t = r = T), + r === T && + (typeof t == 'boolean' + ? ((r = t), (t = T)) + : typeof n == 'boolean' && ((r = n), (n = T))), + n === T && t === T + ? ((n = 0), (t = 1)) + : ((n = Au(n)), t === T ? ((t = n), (n = 0)) : (t = Au(t))), + n > t) + ) { + var e = n; + (n = t), (t = e); + } + return r || n % 1 || t % 1 + ? ((r = Ti()), Ci(n + r * (t - n + Cn('1e-' + ((r + '').length - 1))), t)) + : ir(n, t); + }), + (An.reduce = function (n, t, r) { + var e = ff(n) ? l : j, + u = 3 > arguments.length; + return e(n, ye(t, 4), r, u, uo); + }), + (An.reduceRight = function (n, t, r) { + var e = ff(n) ? s : j, + u = 3 > arguments.length; + return e(n, ye(t, 4), r, u, io); + }), + (An.repeat = function (n, t, r) { + return (t = (r ? Oe(n, t, r) : t === T) ? 1 : Eu(t)), or(Iu(n), t); + }), + (An.replace = function () { + var n = arguments, + t = Iu(n[0]); + return 3 > n.length ? t : t.replace(n[1], n[2]); + }), + (An.result = function (n, t, r) { + t = Sr(t, n); + var e = -1, + u = t.length; + for (u || ((u = 1), (n = T)); ++e < u; ) { + var i = null == n ? T : n[Me(t[e])]; + i === T && ((e = u), (i = r)), (n = _u(i) ? i.call(n) : i); + } + return n; + }), + (An.round = ec), + (An.runInContext = x), + (An.sample = function (n) { + return (ff(n) ? Qn : cr)(n); + }), + (An.size = function (n) { + if (null == n) return 0; + if (su(n)) return ju(n) ? D(n) : n.length; + var t = vo(n); + return '[object Map]' == t || '[object Set]' == t ? n.size : Vt(n).length; + }), + (An.snakeCase = Df), + (An.some = function (n, t, r) { + var e = ff(n) ? h : pr; + return r && Oe(n, t, r) && (t = T), e(n, ye(t, 3)); + }), + (An.sortedIndex = function (n, t) { + return _r(n, t); + }), + (An.sortedIndexBy = function (n, t, r) { + return vr(n, t, ye(r, 2)); + }), + (An.sortedIndexOf = function (n, t) { + var r = null == n ? 0 : n.length; + if (r) { + var e = _r(n, t); + if (e < r && lu(n[e], t)) return e; + } + return -1; + }), + (An.sortedLastIndex = function (n, t) { + return _r(n, t, true); + }), + (An.sortedLastIndexBy = function (n, t, r) { + return vr(n, t, ye(r, 2), true); + }), + (An.sortedLastIndexOf = function (n, t) { + if (null == n ? 0 : n.length) { + var r = _r(n, t, true) - 1; + if (lu(n[r], t)) return r; + } + return -1; + }), + (An.startCase = Mf), + (An.startsWith = function (n, t, r) { + return ( + (n = Iu(n)), + (r = null == r ? 0 : pt(Eu(r), 0, n.length)), + (t = yr(t)), + n.slice(r, r + t.length) == t + ); + }), + (An.subtract = uc), + (An.sum = function (n) { + return n && n.length ? m(n, $u) : 0; + }), + (An.sumBy = function (n, t) { + return n && n.length ? m(n, ye(t, 2)) : 0; + }), + (An.template = function (n, t, r) { + var e = An.templateSettings; + r && Oe(n, t, r) && (t = T), + (n = Iu(n)), + (t = bf({}, t, e, ce)), + (r = bf({}, t.imports, e.imports, ce)); + var u, + i, + o = Wu(r), + f = S(r, o), + c = 0; + r = t.interpolate || jn; + var a = "__p+='"; + r = Xu( + (t.escape || jn).source + + '|' + + r.source + + '|' + + (r === Q ? pn : jn).source + + '|' + + (t.evaluate || jn).source + + '|$', + 'g', + ); + var l = oi.call(t, 'sourceURL') + ? '//# sourceURL=' + (t.sourceURL + '').replace(/[\r\n]/g, ' ') + '\n' + : ''; + if ( + (n.replace(r, function (t, r, e, o, f, l) { + return ( + e || (e = o), + (a += n.slice(c, l).replace(wn, z)), + r && ((u = true), (a += "'+__e(" + r + ")+'")), + f && ((i = true), (a += "';" + f + ";\n__p+='")), + e && (a += "'+((__t=(" + e + "))==null?'':__t)+'"), + (c = l + t.length), + t + ); + }), + (a += "';"), + (t = oi.call(t, 'variable') && t.variable) || (a = 'with(obj){' + a + '}'), + (a = (i ? a.replace(P, '') : a).replace(Z, '$1').replace(q, '$1;')), + (a = + 'function(' + + (t || 'obj') + + '){' + + (t ? '' : 'obj||(obj={});') + + "var __t,__p=''" + + (u ? ',__e=_.escape' : '') + + (i ? ",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}" : ';') + + a + + 'return __p}'), + (t = Ff(function () { + return Ju(o, l + 'return ' + a).apply(T, f); + })), + (t.source = a), + pu(t)) + ) + throw t; + return t; + }), + (An.times = function (n, t) { + if (((n = Eu(n)), 1 > n || 9007199254740991 < n)) return []; + var r = 4294967295, + e = Ci(n, 4294967295); + for (t = ye(t), n -= 4294967295, e = A(e, t); ++r < n; ) t(r); + return e; + }), + (An.toFinite = Au), + (An.toInteger = Eu), + (An.toLength = ku), + (An.toLower = function (n) { + return Iu(n).toLowerCase(); + }), + (An.toNumber = Su), + (An.toSafeInteger = function (n) { + return n ? pt(Eu(n), -9007199254740991, 9007199254740991) : 0 === n ? n : 0; + }), + (An.toString = Iu), + (An.toUpper = function (n) { + return Iu(n).toUpperCase(); + }), + (An.trim = function (n, t, r) { + return (n = Iu(n)) && (r || t === T) + ? n.replace(un, '') + : n && (t = yr(t)) + ? ((n = M(n)), (r = M(t)), (t = I(n, r)), (r = R(n, r) + 1), Or(n, t, r).join('')) + : n; + }), + (An.trimEnd = function (n, t, r) { + return (n = Iu(n)) && (r || t === T) + ? n.replace(fn, '') + : n && (t = yr(t)) + ? ((n = M(n)), (t = R(n, M(t)) + 1), Or(n, 0, t).join('')) + : n; + }), + (An.trimStart = function (n, t, r) { + return (n = Iu(n)) && (r || t === T) + ? n.replace(on, '') + : n && (t = yr(t)) + ? ((n = M(n)), (t = I(n, M(t))), Or(n, t).join('')) + : n; + }), + (An.truncate = function (n, t) { + var r = 30, + e = '...'; + if (du(t)) + var u = 'separator' in t ? t.separator : u, + r = 'length' in t ? Eu(t.length) : r, + e = 'omission' in t ? yr(t.omission) : e; + n = Iu(n); + var i = n.length; + if (Rn.test(n)) + var o = M(n), + i = o.length; + if (r >= i) return n; + if (((i = r - D(e)), 1 > i)) return e; + if (((r = o ? Or(o, 0, i).join('') : n.slice(0, i)), u === T)) return r + e; + if ((o && (i += r.length - i), hf(u))) { + if (n.slice(i).search(u)) { + var f = r; + for ( + u.global || (u = Xu(u.source, Iu(_n.exec(u)) + 'g')), u.lastIndex = 0; + (o = u.exec(f)); + + ) + var c = o.index; + r = r.slice(0, c === T ? i : c); + } + } else n.indexOf(yr(u), i) != i && ((u = r.lastIndexOf(u)), -1 < u && (r = r.slice(0, u))); + return r + e; + }), + (An.unescape = function (n) { + return (n = Iu(n)) && G.test(n) ? n.replace(V, tt) : n; + }), + (An.uniqueId = function (n) { + var t = ++fi; + return Iu(n) + t; + }), + (An.upperCase = Tf), + (An.upperFirst = $f), + (An.each = nu), + (An.eachRight = tu), + (An.first = qe), + Nu( + An, + (function () { + var n = {}; + return ( + mt(An, function (t, r) { + oi.call(An.prototype, r) || (n[r] = t); + }), + n + ); + })(), + { chain: false }, + ), + (An.VERSION = '4.17.15'), + r('bind bindKey curry curryRight partial partialRight'.split(' '), function (n) { + An[n].placeholder = An; + }), + r(['drop', 'take'], function (n, t) { + (Un.prototype[n] = function (r) { + r = r === T ? 1 : Ui(Eu(r), 0); + var e = this.__filtered__ && !t ? new Un(this) : this.clone(); + return ( + e.__filtered__ + ? (e.__takeCount__ = Ci(r, e.__takeCount__)) + : e.__views__.push({ + size: Ci(r, 4294967295), + type: n + (0 > e.__dir__ ? 'Right' : ''), + }), + e + ); + }), + (Un.prototype[n + 'Right'] = function (t) { + return this.reverse()[n](t).reverse(); + }); + }), + r(['filter', 'map', 'takeWhile'], function (n, t) { + var r = t + 1, + e = 1 == r || 3 == r; + Un.prototype[n] = function (n) { + var t = this.clone(); + return ( + t.__iteratees__.push({ iteratee: ye(n, 3), type: r }), + (t.__filtered__ = t.__filtered__ || e), + t + ); + }; + }), + r(['head', 'last'], function (n, t) { + var r = 'take' + (t ? 'Right' : ''); + Un.prototype[n] = function () { + return this[r](1).value()[0]; + }; + }), + r(['initial', 'tail'], function (n, t) { + var r = 'drop' + (t ? '' : 'Right'); + Un.prototype[n] = function () { + return this.__filtered__ ? new Un(this) : this[r](1); + }; + }), + (Un.prototype.compact = function () { + return this.filter($u); + }), + (Un.prototype.find = function (n) { + return this.filter(n).head(); + }), + (Un.prototype.findLast = function (n) { + return this.reverse().find(n); + }), + (Un.prototype.invokeMap = fr(function (n, t) { + return typeof n == 'function' + ? new Un(this) + : this.map(function (r) { + return Lt(r, n, t); + }); + })), + (Un.prototype.reject = function (n) { + return this.filter(au(ye(n))); + }), + (Un.prototype.slice = function (n, t) { + n = Eu(n); + var r = this; + return r.__filtered__ && (0 < n || 0 > t) + ? new Un(r) + : (0 > n ? (r = r.takeRight(-n)) : n && (r = r.drop(n)), + t !== T && ((t = Eu(t)), (r = 0 > t ? r.dropRight(-t) : r.take(t - n))), + r); + }), + (Un.prototype.takeRightWhile = function (n) { + return this.reverse().takeWhile(n).reverse(); + }), + (Un.prototype.toArray = function () { + return this.take(4294967295); + }), + mt(Un.prototype, function (n, t) { + var r = /^(?:filter|find|map|reject)|While$/.test(t), + e = /^(?:head|last)$/.test(t), + u = An[e ? 'take' + ('last' == t ? 'Right' : '') : t], + i = e || /^find/.test(t); + u && + (An.prototype[t] = function () { + function t(n) { + return (n = u.apply(An, a([n], f))), e && h ? n[0] : n; + } + var o = this.__wrapped__, + f = e ? [1] : arguments, + c = o instanceof Un, + l = f[0], + s = c || ff(o); + s && r && typeof l == 'function' && 1 != l.length && (c = s = false); + var h = this.__chain__, + p = !!this.__actions__.length, + l = i && !h, + c = c && !p; + return !i && s + ? ((o = c ? o : new Un(this)), + (o = n.apply(o, f)), + o.__actions__.push({ func: Qe, args: [t], thisArg: T }), + new On(o, h)) + : l && c + ? n.apply(this, f) + : ((o = this.thru(t)), l ? (e ? o.value()[0] : o.value()) : o); + }); + }), + r('pop push shift sort splice unshift'.split(' '), function (n) { + var t = ri[n], + r = /^(?:push|sort|unshift)$/.test(n) ? 'tap' : 'thru', + e = /^(?:pop|shift)$/.test(n); + An.prototype[n] = function () { + var n = arguments; + if (e && !this.__chain__) { + var u = this.value(); + return t.apply(ff(u) ? u : [], n); + } + return this[r](function (r) { + return t.apply(ff(r) ? r : [], n); + }); + }; + }), + mt(Un.prototype, function (n, t) { + var r = An[t]; + if (r) { + var e = r.name + ''; + oi.call(Gi, e) || (Gi[e] = []), Gi[e].push({ name: t, func: r }); + } + }), + (Gi[Jr(T, 2).name] = [{ name: 'wrapper', func: T }]), + (Un.prototype.clone = function () { + var n = new Un(this.__wrapped__); + return ( + (n.__actions__ = Ur(this.__actions__)), + (n.__dir__ = this.__dir__), + (n.__filtered__ = this.__filtered__), + (n.__iteratees__ = Ur(this.__iteratees__)), + (n.__takeCount__ = this.__takeCount__), + (n.__views__ = Ur(this.__views__)), + n + ); + }), + (Un.prototype.reverse = function () { + if (this.__filtered__) { + var n = new Un(this); + (n.__dir__ = -1), (n.__filtered__ = true); + } else (n = this.clone()), (n.__dir__ *= -1); + return n; + }), + (Un.prototype.value = function () { + var n, + t = this.__wrapped__.value(), + r = this.__dir__, + e = ff(t), + u = 0 > r, + i = e ? t.length : 0; + n = i; + for (var o = this.__views__, f = 0, c = -1, a = o.length; ++c < a; ) { + var l = o[c], + s = l.size; + switch (l.type) { + case 'drop': + f += s; + break; + case 'dropRight': + n -= s; + break; + case 'take': + n = Ci(n, f + s); + break; + case 'takeRight': + f = Ui(f, n - s); + } + } + if ( + ((n = { start: f, end: n }), + (o = n.start), + (f = n.end), + (n = f - o), + (o = u ? f : o - 1), + (f = this.__iteratees__), + (c = f.length), + (a = 0), + (l = Ci(n, this.__takeCount__)), + !e || (!u && i == n && l == n)) + ) + return wr(t, this.__actions__); + e = []; + n: for (; n-- && a < l; ) { + for (o += r, u = -1, i = t[o]; ++u < c; ) { + var h = f[u], + s = h.type, + h = (0, h.iteratee)(i); + if (2 == s) i = h; + else if (!h) { + if (1 == s) continue n; + break n; + } + } + e[a++] = i; + } + return e; + }), + (An.prototype.at = To), + (An.prototype.chain = function () { + return Ye(this); + }), + (An.prototype.commit = function () { + return new On(this.value(), this.__chain__); + }), + (An.prototype.next = function () { + this.__values__ === T && (this.__values__ = mu(this.value())); + var n = this.__index__ >= this.__values__.length; + return { done: n, value: n ? T : this.__values__[this.__index__++] }; + }), + (An.prototype.plant = function (n) { + for (var t, r = this; r instanceof En; ) { + var e = Fe(r); + (e.__index__ = 0), (e.__values__ = T), t ? (u.__wrapped__ = e) : (t = e); + var u = e, + r = r.__wrapped__; + } + return (u.__wrapped__ = n), t; + }), + (An.prototype.reverse = function () { + var n = this.__wrapped__; + return n instanceof Un + ? (this.__actions__.length && (n = new Un(this)), + (n = n.reverse()), + n.__actions__.push({ func: Qe, args: [Ge], thisArg: T }), + new On(n, this.__chain__)) + : this.thru(Ge); + }), + (An.prototype.toJSON = + An.prototype.valueOf = + An.prototype.value = + function () { + return wr(this.__wrapped__, this.__actions__); + }), + (An.prototype.first = An.prototype.head), + wi && (An.prototype[wi] = Xe), + An + ); + })(); + true + ? (($n._ = rt), + !((__WEBPACK_AMD_DEFINE_RESULT__ = function () { + return rt; + }.call(exports, __webpack_require__, exports, module)), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && + (module.exports = __WEBPACK_AMD_DEFINE_RESULT__))) + : Nn + ? (((Nn.exports = rt)._ = rt), (Fn._ = rt)) + : ($n._ = rt); + }).call(this); + /* WEBPACK VAR INJECTION */ + }).call(exports, __webpack_require__(38), __webpack_require__(239)(module)); + + /***/ + }, + /* 643 */ + /***/ function (module, exports, __webpack_require__) { + var mapping = __webpack_require__(644), + fallbackHolder = __webpack_require__(645); + + /** Built-in value reference. */ + var push = Array.prototype.push; + + /** + * Creates a function, with an arity of `n`, that invokes `func` with the + * arguments it receives. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} n The arity of the new function. + * @returns {Function} Returns the new function. + */ + function baseArity(func, n) { + return n == 2 + ? function (a, b) { + return func.apply(undefined, arguments); + } + : function (a) { + return func.apply(undefined, arguments); + }; + } + + /** + * Creates a function that invokes `func`, with up to `n` arguments, ignoring + * any additional arguments. + * + * @private + * @param {Function} func The function to cap arguments for. + * @param {number} n The arity cap. + * @returns {Function} Returns the new function. + */ + function baseAry(func, n) { + return n == 2 + ? function (a, b) { + return func(a, b); + } + : function (a) { + return func(a); + }; + } + + /** + * Creates a clone of `array`. + * + * @private + * @param {Array} array The array to clone. + * @returns {Array} Returns the cloned array. + */ + function cloneArray(array) { + var length = array ? array.length : 0, + result = Array(length); + + while (length--) { + result[length] = array[length]; + } + return result; + } + + /** + * Creates a function that clones a given object using the assignment `func`. + * + * @private + * @param {Function} func The assignment function. + * @returns {Function} Returns the new cloner function. + */ + function createCloner(func) { + return function (object) { + return func({}, object); + }; + } + + /** + * A specialized version of `_.spread` which flattens the spread array into + * the arguments of the invoked `func`. + * + * @private + * @param {Function} func The function to spread arguments over. + * @param {number} start The start position of the spread. + * @returns {Function} Returns the new function. + */ + function flatSpread(func, start) { + return function () { + var length = arguments.length, + lastIndex = length - 1, + args = Array(length); + + while (length--) { + args[length] = arguments[length]; + } + var array = args[start], + otherArgs = args.slice(0, start); + + if (array) { + push.apply(otherArgs, array); + } + if (start != lastIndex) { + push.apply(otherArgs, args.slice(start + 1)); + } + return func.apply(this, otherArgs); + }; + } + + /** + * Creates a function that wraps `func` and uses `cloner` to clone the first + * argument it receives. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} cloner The function to clone arguments. + * @returns {Function} Returns the new immutable function. + */ + function wrapImmutable(func, cloner) { + return function () { + var length = arguments.length; + if (!length) { + return; + } + var args = Array(length); + while (length--) { + args[length] = arguments[length]; + } + var result = (args[0] = cloner.apply(undefined, args)); + func.apply(undefined, args); + return result; + }; + } + + /** + * The base implementation of `convert` which accepts a `util` object of methods + * required to perform conversions. + * + * @param {Object} util The util object. + * @param {string} name The name of the function to convert. + * @param {Function} func The function to convert. + * @param {Object} [options] The options object. + * @param {boolean} [options.cap=true] Specify capping iteratee arguments. + * @param {boolean} [options.curry=true] Specify currying. + * @param {boolean} [options.fixed=true] Specify fixed arity. + * @param {boolean} [options.immutable=true] Specify immutable operations. + * @param {boolean} [options.rearg=true] Specify rearranging arguments. + * @returns {Function|Object} Returns the converted function or object. + */ + function baseConvert(util, name, func, options) { + var isLib = typeof name == 'function', + isObj = name === Object(name); + + if (isObj) { + options = func; + func = name; + name = undefined; + } + if (func == null) { + throw new TypeError(); + } + options || (options = {}); + + var config = { + cap: 'cap' in options ? options.cap : true, + curry: 'curry' in options ? options.curry : true, + fixed: 'fixed' in options ? options.fixed : true, + immutable: 'immutable' in options ? options.immutable : true, + rearg: 'rearg' in options ? options.rearg : true, + }; + + var defaultHolder = isLib ? func : fallbackHolder, + forceCurry = 'curry' in options && options.curry, + forceFixed = 'fixed' in options && options.fixed, + forceRearg = 'rearg' in options && options.rearg, + pristine = isLib ? func.runInContext() : undefined; + + var helpers = isLib + ? func + : { + ary: util.ary, + assign: util.assign, + clone: util.clone, + curry: util.curry, + forEach: util.forEach, + isArray: util.isArray, + isError: util.isError, + isFunction: util.isFunction, + isWeakMap: util.isWeakMap, + iteratee: util.iteratee, + keys: util.keys, + rearg: util.rearg, + toInteger: util.toInteger, + toPath: util.toPath, + }; + + var ary = helpers.ary, + assign = helpers.assign, + clone = helpers.clone, + curry = helpers.curry, + each = helpers.forEach, + isArray = helpers.isArray, + isError = helpers.isError, + isFunction = helpers.isFunction, + isWeakMap = helpers.isWeakMap, + keys = helpers.keys, + rearg = helpers.rearg, + toInteger = helpers.toInteger, + toPath = helpers.toPath; + + var aryMethodKeys = keys(mapping.aryMethod); + + var wrappers = { + castArray: function (castArray) { + return function () { + var value = arguments[0]; + return isArray(value) ? castArray(cloneArray(value)) : castArray.apply(undefined, arguments); + }; + }, + iteratee: function (iteratee) { + return function () { + var func = arguments[0], + arity = arguments[1], + result = iteratee(func, arity), + length = result.length; + + if (config.cap && typeof arity == 'number') { + arity = arity > 2 ? arity - 2 : 1; + return length && length <= arity ? result : baseAry(result, arity); + } + return result; + }; + }, + mixin: function (mixin) { + return function (source) { + var func = this; + if (!isFunction(func)) { + return mixin(func, Object(source)); + } + var pairs = []; + each(keys(source), function (key) { + if (isFunction(source[key])) { + pairs.push([key, func.prototype[key]]); + } + }); + + mixin(func, Object(source)); + + each(pairs, function (pair) { + var value = pair[1]; + if (isFunction(value)) { + func.prototype[pair[0]] = value; + } else { + delete func.prototype[pair[0]]; + } + }); + return func; + }; + }, + nthArg: function (nthArg) { + return function (n) { + var arity = n < 0 ? 1 : toInteger(n) + 1; + return curry(nthArg(n), arity); + }; + }, + rearg: function (rearg) { + return function (func, indexes) { + var arity = indexes ? indexes.length : 0; + return curry(rearg(func, indexes), arity); + }; + }, + runInContext: function (runInContext) { + return function (context) { + return baseConvert(util, runInContext(context), options); + }; + }, + }; + + /*--------------------------------------------------------------------------*/ + + /** + * Casts `func` to a function with an arity capped iteratee if needed. + * + * @private + * @param {string} name The name of the function to inspect. + * @param {Function} func The function to inspect. + * @returns {Function} Returns the cast function. + */ + function castCap(name, func) { + if (config.cap) { + var indexes = mapping.iterateeRearg[name]; + if (indexes) { + return iterateeRearg(func, indexes); + } + var n = !isLib && mapping.iterateeAry[name]; + if (n) { + return iterateeAry(func, n); + } + } + return func; + } + + /** + * Casts `func` to a curried function if needed. + * + * @private + * @param {string} name The name of the function to inspect. + * @param {Function} func The function to inspect. + * @param {number} n The arity of `func`. + * @returns {Function} Returns the cast function. + */ + function castCurry(name, func, n) { + return forceCurry || (config.curry && n > 1) ? curry(func, n) : func; + } + + /** + * Casts `func` to a fixed arity function if needed. + * + * @private + * @param {string} name The name of the function to inspect. + * @param {Function} func The function to inspect. + * @param {number} n The arity cap. + * @returns {Function} Returns the cast function. + */ + function castFixed(name, func, n) { + if (config.fixed && (forceFixed || !mapping.skipFixed[name])) { + var data = mapping.methodSpread[name], + start = data && data.start; + + return start === undefined ? ary(func, n) : flatSpread(func, start); + } + return func; + } + + /** + * Casts `func` to an rearged function if needed. + * + * @private + * @param {string} name The name of the function to inspect. + * @param {Function} func The function to inspect. + * @param {number} n The arity of `func`. + * @returns {Function} Returns the cast function. + */ + function castRearg(name, func, n) { + return config.rearg && n > 1 && (forceRearg || !mapping.skipRearg[name]) + ? rearg(func, mapping.methodRearg[name] || mapping.aryRearg[n]) + : func; + } + + /** + * Creates a clone of `object` by `path`. + * + * @private + * @param {Object} object The object to clone. + * @param {Array|string} path The path to clone by. + * @returns {Object} Returns the cloned object. + */ + function cloneByPath(object, path) { + path = toPath(path); + + var index = -1, + length = path.length, + lastIndex = length - 1, + result = clone(Object(object)), + nested = result; + + while (nested != null && ++index < length) { + var key = path[index], + value = nested[key]; + + if (value != null && !(isFunction(value) || isError(value) || isWeakMap(value))) { + nested[key] = clone(index == lastIndex ? value : Object(value)); + } + nested = nested[key]; + } + return result; + } + + /** + * Converts `lodash` to an immutable auto-curried iteratee-first data-last + * version with conversion `options` applied. + * + * @param {Object} [options] The options object. See `baseConvert` for more details. + * @returns {Function} Returns the converted `lodash`. + */ + function convertLib(options) { + return _.runInContext.convert(options)(undefined); + } + + /** + * Create a converter function for `func` of `name`. + * + * @param {string} name The name of the function to convert. + * @param {Function} func The function to convert. + * @returns {Function} Returns the new converter function. + */ + function createConverter(name, func) { + var realName = mapping.aliasToReal[name] || name, + methodName = mapping.remap[realName] || realName, + oldOptions = options; + + return function (options) { + var newUtil = isLib ? pristine : helpers, + newFunc = isLib ? pristine[methodName] : func, + newOptions = assign(assign({}, oldOptions), options); + + return baseConvert(newUtil, realName, newFunc, newOptions); + }; + } + + /** + * Creates a function that wraps `func` to invoke its iteratee, with up to `n` + * arguments, ignoring any additional arguments. + * + * @private + * @param {Function} func The function to cap iteratee arguments for. + * @param {number} n The arity cap. + * @returns {Function} Returns the new function. + */ + function iterateeAry(func, n) { + return overArg(func, function (func) { + return typeof func == 'function' ? baseAry(func, n) : func; + }); + } + + /** + * Creates a function that wraps `func` to invoke its iteratee with arguments + * arranged according to the specified `indexes` where the argument value at + * the first index is provided as the first argument, the argument value at + * the second index is provided as the second argument, and so on. + * + * @private + * @param {Function} func The function to rearrange iteratee arguments for. + * @param {number[]} indexes The arranged argument indexes. + * @returns {Function} Returns the new function. + */ + function iterateeRearg(func, indexes) { + return overArg(func, function (func) { + var n = indexes.length; + return baseArity(rearg(baseAry(func, n), indexes), n); + }); + } + + /** + * Creates a function that invokes `func` with its first argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ + function overArg(func, transform) { + return function () { + var length = arguments.length; + if (!length) { + return func(); + } + var args = Array(length); + while (length--) { + args[length] = arguments[length]; + } + var index = config.rearg ? 0 : length - 1; + args[index] = transform(args[index]); + return func.apply(undefined, args); + }; + } + + /** + * Creates a function that wraps `func` and applys the conversions + * rules by `name`. + * + * @private + * @param {string} name The name of the function to wrap. + * @param {Function} func The function to wrap. + * @returns {Function} Returns the converted function. + */ + function wrap(name, func, placeholder) { + var result, + realName = mapping.aliasToReal[name] || name, + wrapped = func, + wrapper = wrappers[realName]; + + if (wrapper) { + wrapped = wrapper(func); + } else if (config.immutable) { + if (mapping.mutate.array[realName]) { + wrapped = wrapImmutable(func, cloneArray); + } else if (mapping.mutate.object[realName]) { + wrapped = wrapImmutable(func, createCloner(func)); + } else if (mapping.mutate.set[realName]) { + wrapped = wrapImmutable(func, cloneByPath); + } + } + each(aryMethodKeys, function (aryKey) { + each(mapping.aryMethod[aryKey], function (otherName) { + if (realName == otherName) { + var data = mapping.methodSpread[realName], + afterRearg = data && data.afterRearg; + + result = afterRearg + ? castFixed(realName, castRearg(realName, wrapped, aryKey), aryKey) + : castRearg(realName, castFixed(realName, wrapped, aryKey), aryKey); + + result = castCap(realName, result); + result = castCurry(realName, result, aryKey); + return false; + } + }); + return !result; + }); + + result || (result = wrapped); + if (result == func) { + result = forceCurry + ? curry(result, 1) + : function () { + return func.apply(this, arguments); + }; + } + result.convert = createConverter(realName, func); + result.placeholder = func.placeholder = placeholder; + + return result; + } + + /*--------------------------------------------------------------------------*/ + + if (!isObj) { + return wrap(name, func, defaultHolder); + } + var _ = func; + + // Convert methods by ary cap. + var pairs = []; + each(aryMethodKeys, function (aryKey) { + each(mapping.aryMethod[aryKey], function (key) { + var func = _[mapping.remap[key] || key]; + if (func) { + pairs.push([key, wrap(key, func, _)]); + } + }); + }); + + // Convert remaining methods. + each(keys(_), function (key) { + var func = _[key]; + if (typeof func == 'function') { + var length = pairs.length; + while (length--) { + if (pairs[length][0] == key) { + return; + } + } + func.convert = createConverter(key, func); + pairs.push([key, func]); + } + }); + + // Assign to `_` leaving `_.prototype` unchanged to allow chaining. + each(pairs, function (pair) { + _[pair[0]] = pair[1]; + }); + + _.convert = convertLib; + _.placeholder = _; + + // Assign aliases. + each(keys(_), function (key) { + each(mapping.realToAlias[key] || [], function (alias) { + _[alias] = _[key]; + }); + }); + + return _; + } + + module.exports = baseConvert; + + /***/ + }, + /* 644 */ + /***/ function (module, exports) { + /** Used to map aliases to their real names. */ + exports.aliasToReal = { + // Lodash aliases. + each: 'forEach', + eachRight: 'forEachRight', + entries: 'toPairs', + entriesIn: 'toPairsIn', + extend: 'assignIn', + extendAll: 'assignInAll', + extendAllWith: 'assignInAllWith', + extendWith: 'assignInWith', + first: 'head', + + // Methods that are curried variants of others. + conforms: 'conformsTo', + matches: 'isMatch', + property: 'get', + + // Ramda aliases. + __: 'placeholder', + F: 'stubFalse', + T: 'stubTrue', + all: 'every', + allPass: 'overEvery', + always: 'constant', + any: 'some', + anyPass: 'overSome', + apply: 'spread', + assoc: 'set', + assocPath: 'set', + complement: 'negate', + compose: 'flowRight', + contains: 'includes', + dissoc: 'unset', + dissocPath: 'unset', + dropLast: 'dropRight', + dropLastWhile: 'dropRightWhile', + equals: 'isEqual', + identical: 'eq', + indexBy: 'keyBy', + init: 'initial', + invertObj: 'invert', + juxt: 'over', + omitAll: 'omit', + nAry: 'ary', + path: 'get', + pathEq: 'matchesProperty', + pathOr: 'getOr', + paths: 'at', + pickAll: 'pick', + pipe: 'flow', + pluck: 'map', + prop: 'get', + propEq: 'matchesProperty', + propOr: 'getOr', + props: 'at', + symmetricDifference: 'xor', + symmetricDifferenceBy: 'xorBy', + symmetricDifferenceWith: 'xorWith', + takeLast: 'takeRight', + takeLastWhile: 'takeRightWhile', + unapply: 'rest', + unnest: 'flatten', + useWith: 'overArgs', + where: 'conformsTo', + whereEq: 'isMatch', + zipObj: 'zipObject', + }; + + /** Used to map ary to method names. */ + exports.aryMethod = { + 1: [ + 'assignAll', + 'assignInAll', + 'attempt', + 'castArray', + 'ceil', + 'create', + 'curry', + 'curryRight', + 'defaultsAll', + 'defaultsDeepAll', + 'floor', + 'flow', + 'flowRight', + 'fromPairs', + 'invert', + 'iteratee', + 'memoize', + 'method', + 'mergeAll', + 'methodOf', + 'mixin', + 'nthArg', + 'over', + 'overEvery', + 'overSome', + 'rest', + 'reverse', + 'round', + 'runInContext', + 'spread', + 'template', + 'trim', + 'trimEnd', + 'trimStart', + 'uniqueId', + 'words', + 'zipAll', + ], + 2: [ + 'add', + 'after', + 'ary', + 'assign', + 'assignAllWith', + 'assignIn', + 'assignInAllWith', + 'at', + 'before', + 'bind', + 'bindAll', + 'bindKey', + 'chunk', + 'cloneDeepWith', + 'cloneWith', + 'concat', + 'conformsTo', + 'countBy', + 'curryN', + 'curryRightN', + 'debounce', + 'defaults', + 'defaultsDeep', + 'defaultTo', + 'delay', + 'difference', + 'divide', + 'drop', + 'dropRight', + 'dropRightWhile', + 'dropWhile', + 'endsWith', + 'eq', + 'every', + 'filter', + 'find', + 'findIndex', + 'findKey', + 'findLast', + 'findLastIndex', + 'findLastKey', + 'flatMap', + 'flatMapDeep', + 'flattenDepth', + 'forEach', + 'forEachRight', + 'forIn', + 'forInRight', + 'forOwn', + 'forOwnRight', + 'get', + 'groupBy', + 'gt', + 'gte', + 'has', + 'hasIn', + 'includes', + 'indexOf', + 'intersection', + 'invertBy', + 'invoke', + 'invokeMap', + 'isEqual', + 'isMatch', + 'join', + 'keyBy', + 'lastIndexOf', + 'lt', + 'lte', + 'map', + 'mapKeys', + 'mapValues', + 'matchesProperty', + 'maxBy', + 'meanBy', + 'merge', + 'mergeAllWith', + 'minBy', + 'multiply', + 'nth', + 'omit', + 'omitBy', + 'overArgs', + 'pad', + 'padEnd', + 'padStart', + 'parseInt', + 'partial', + 'partialRight', + 'partition', + 'pick', + 'pickBy', + 'propertyOf', + 'pull', + 'pullAll', + 'pullAt', + 'random', + 'range', + 'rangeRight', + 'rearg', + 'reject', + 'remove', + 'repeat', + 'restFrom', + 'result', + 'sampleSize', + 'some', + 'sortBy', + 'sortedIndex', + 'sortedIndexOf', + 'sortedLastIndex', + 'sortedLastIndexOf', + 'sortedUniqBy', + 'split', + 'spreadFrom', + 'startsWith', + 'subtract', + 'sumBy', + 'take', + 'takeRight', + 'takeRightWhile', + 'takeWhile', + 'tap', + 'throttle', + 'thru', + 'times', + 'trimChars', + 'trimCharsEnd', + 'trimCharsStart', + 'truncate', + 'union', + 'uniqBy', + 'uniqWith', + 'unset', + 'unzipWith', + 'without', + 'wrap', + 'xor', + 'zip', + 'zipObject', + 'zipObjectDeep', + ], + 3: [ + 'assignInWith', + 'assignWith', + 'clamp', + 'differenceBy', + 'differenceWith', + 'findFrom', + 'findIndexFrom', + 'findLastFrom', + 'findLastIndexFrom', + 'getOr', + 'includesFrom', + 'indexOfFrom', + 'inRange', + 'intersectionBy', + 'intersectionWith', + 'invokeArgs', + 'invokeArgsMap', + 'isEqualWith', + 'isMatchWith', + 'flatMapDepth', + 'lastIndexOfFrom', + 'mergeWith', + 'orderBy', + 'padChars', + 'padCharsEnd', + 'padCharsStart', + 'pullAllBy', + 'pullAllWith', + 'rangeStep', + 'rangeStepRight', + 'reduce', + 'reduceRight', + 'replace', + 'set', + 'slice', + 'sortedIndexBy', + 'sortedLastIndexBy', + 'transform', + 'unionBy', + 'unionWith', + 'update', + 'xorBy', + 'xorWith', + 'zipWith', + ], + 4: ['fill', 'setWith', 'updateWith'], + }; + + /** Used to map ary to rearg configs. */ + exports.aryRearg = { + 2: [1, 0], + 3: [2, 0, 1], + 4: [3, 2, 0, 1], + }; + + /** Used to map method names to their iteratee ary. */ + exports.iterateeAry = { + dropRightWhile: 1, + dropWhile: 1, + every: 1, + filter: 1, + find: 1, + findFrom: 1, + findIndex: 1, + findIndexFrom: 1, + findKey: 1, + findLast: 1, + findLastFrom: 1, + findLastIndex: 1, + findLastIndexFrom: 1, + findLastKey: 1, + flatMap: 1, + flatMapDeep: 1, + flatMapDepth: 1, + forEach: 1, + forEachRight: 1, + forIn: 1, + forInRight: 1, + forOwn: 1, + forOwnRight: 1, + map: 1, + mapKeys: 1, + mapValues: 1, + partition: 1, + reduce: 2, + reduceRight: 2, + reject: 1, + remove: 1, + some: 1, + takeRightWhile: 1, + takeWhile: 1, + times: 1, + transform: 2, + }; + + /** Used to map method names to iteratee rearg configs. */ + exports.iterateeRearg = { + mapKeys: [1], + reduceRight: [1, 0], + }; + + /** Used to map method names to rearg configs. */ + exports.methodRearg = { + assignInAllWith: [1, 0], + assignInWith: [1, 2, 0], + assignAllWith: [1, 0], + assignWith: [1, 2, 0], + differenceBy: [1, 2, 0], + differenceWith: [1, 2, 0], + getOr: [2, 1, 0], + intersectionBy: [1, 2, 0], + intersectionWith: [1, 2, 0], + isEqualWith: [1, 2, 0], + isMatchWith: [2, 1, 0], + mergeAllWith: [1, 0], + mergeWith: [1, 2, 0], + padChars: [2, 1, 0], + padCharsEnd: [2, 1, 0], + padCharsStart: [2, 1, 0], + pullAllBy: [2, 1, 0], + pullAllWith: [2, 1, 0], + rangeStep: [1, 2, 0], + rangeStepRight: [1, 2, 0], + setWith: [3, 1, 2, 0], + sortedIndexBy: [2, 1, 0], + sortedLastIndexBy: [2, 1, 0], + unionBy: [1, 2, 0], + unionWith: [1, 2, 0], + updateWith: [3, 1, 2, 0], + xorBy: [1, 2, 0], + xorWith: [1, 2, 0], + zipWith: [1, 2, 0], + }; + + /** Used to map method names to spread configs. */ + exports.methodSpread = { + assignAll: { start: 0 }, + assignAllWith: { start: 0 }, + assignInAll: { start: 0 }, + assignInAllWith: { start: 0 }, + defaultsAll: { start: 0 }, + defaultsDeepAll: { start: 0 }, + invokeArgs: { start: 2 }, + invokeArgsMap: { start: 2 }, + mergeAll: { start: 0 }, + mergeAllWith: { start: 0 }, + partial: { start: 1 }, + partialRight: { start: 1 }, + without: { start: 1 }, + zipAll: { start: 0 }, + }; + + /** Used to identify methods which mutate arrays or objects. */ + exports.mutate = { + array: { + fill: true, + pull: true, + pullAll: true, + pullAllBy: true, + pullAllWith: true, + pullAt: true, + remove: true, + reverse: true, + }, + object: { + assign: true, + assignAll: true, + assignAllWith: true, + assignIn: true, + assignInAll: true, + assignInAllWith: true, + assignInWith: true, + assignWith: true, + defaults: true, + defaultsAll: true, + defaultsDeep: true, + defaultsDeepAll: true, + merge: true, + mergeAll: true, + mergeAllWith: true, + mergeWith: true, + }, + set: { + set: true, + setWith: true, + unset: true, + update: true, + updateWith: true, + }, + }; + + /** Used to map real names to their aliases. */ + exports.realToAlias = (function () { + var hasOwnProperty = Object.prototype.hasOwnProperty, + object = exports.aliasToReal, + result = {}; + + for (var key in object) { + var value = object[key]; + if (hasOwnProperty.call(result, value)) { + result[value].push(key); + } else { + result[value] = [key]; + } + } + return result; + })(); + + /** Used to map method names to other names. */ + exports.remap = { + assignAll: 'assign', + assignAllWith: 'assignWith', + assignInAll: 'assignIn', + assignInAllWith: 'assignInWith', + curryN: 'curry', + curryRightN: 'curryRight', + defaultsAll: 'defaults', + defaultsDeepAll: 'defaultsDeep', + findFrom: 'find', + findIndexFrom: 'findIndex', + findLastFrom: 'findLast', + findLastIndexFrom: 'findLastIndex', + getOr: 'get', + includesFrom: 'includes', + indexOfFrom: 'indexOf', + invokeArgs: 'invoke', + invokeArgsMap: 'invokeMap', + lastIndexOfFrom: 'lastIndexOf', + mergeAll: 'merge', + mergeAllWith: 'mergeWith', + padChars: 'pad', + padCharsEnd: 'padEnd', + padCharsStart: 'padStart', + propertyOf: 'get', + rangeStep: 'range', + rangeStepRight: 'rangeRight', + restFrom: 'rest', + spreadFrom: 'spread', + trimChars: 'trim', + trimCharsEnd: 'trimEnd', + trimCharsStart: 'trimStart', + zipAll: 'zip', + }; + + /** Used to track methods that skip fixing their arity. */ + exports.skipFixed = { + castArray: true, + flow: true, + flowRight: true, + iteratee: true, + mixin: true, + rearg: true, + runInContext: true, + }; + + /** Used to track methods that skip rearranging arguments. */ + exports.skipRearg = { + add: true, + assign: true, + assignIn: true, + bind: true, + bindKey: true, + concat: true, + difference: true, + divide: true, + eq: true, + gt: true, + gte: true, + isEqual: true, + lt: true, + lte: true, + matchesProperty: true, + merge: true, + multiply: true, + overArgs: true, + partial: true, + partialRight: true, + propertyOf: true, + random: true, + range: true, + rangeRight: true, + subtract: true, + zip: true, + zipObject: true, + zipObjectDeep: true, + }; + + /***/ + }, + /* 645 */ + /***/ function (module, exports) { + /** + * The default argument placeholder value for methods. + * + * @type {Object} + */ + module.exports = {}; + + /***/ + }, + /* 646 */ + /***/ function (module, exports) { + module.exports = { + message: 'index__message__2coBI', + }; + + /***/ + }, + /******/ + ], +); diff --git a/packages/react-on-rails-pro-node-renderer/tests/fixtures/projects/spec-dummy/asyncComponentsTreeForTestingRenderingRequest.js b/packages/react-on-rails-pro-node-renderer/tests/fixtures/projects/spec-dummy/asyncComponentsTreeForTestingRenderingRequest.js new file mode 100644 index 0000000000..02d4de5dd7 --- /dev/null +++ b/packages/react-on-rails-pro-node-renderer/tests/fixtures/projects/spec-dummy/asyncComponentsTreeForTestingRenderingRequest.js @@ -0,0 +1,31 @@ +(function(componentName = 'AsyncComponentsTreeForTesting', props = undefined) { + var railsContext = {"componentRegistryTimeout":5000,"railsEnv":"development","inMailer":false,"i18nLocale":"en","i18nDefaultLocale":"en","rorVersion":"15.0.0.alpha.2","rorPro":true,"rscPayloadGenerationUrl":"rsc_payload/","rorProVersion":"4.0.0.rc.13","href":"http://localhost:3000/stream_async_components_for_testing","location":"/stream_async_components_for_testing","scheme":"http","host":"localhost","port":3000,"pathname":"/stream_async_components_for_testing","search":null,"httpAcceptLanguage":"en-US,en-GB;q=0.9,en;q=0.8,ar;q=0.7","somethingUseful":"REALLY USEFUL","serverSide":true}; + railsContext.reactClientManifestFileName = 'react-client-manifest.json'; + railsContext.reactServerClientManifestFileName = 'react-server-client-manifest.json'; + + railsContext.serverSideRSCPayloadParameters = { + renderingRequest, + rscBundleHash: '88888-test', + } + + if (typeof generateRSCPayload !== 'function') { + globalThis.generateRSCPayload = function generateRSCPayload(componentName, props, railsContext) { + const { renderingRequest, rscBundleHash } = railsContext.serverSideRSCPayloadParameters; + const propsString = JSON.stringify(props); + const newRenderingRequest = renderingRequest.replace(/\(\s*\)\s*$/, `('${componentName}', ${propsString})`); + return runOnOtherBundle(rscBundleHash, newRenderingRequest); + } + } + + ReactOnRails.clearHydratedStores(); + var usedProps = typeof props === 'undefined' ? {"helloWorldData":{"name":"Mr. Server Side Rendering","\u003cscript\u003ewindow.alert('xss1');\u003c/script\u003e":"\u003cscript\u003ewindow.alert(\"xss2\");\u003c/script\u003e"}} : props; + return ReactOnRails[ReactOnRails.isRSCBundle ? 'serverRenderRSCReactComponent' : 'streamServerRenderedReactComponent']({ + name: componentName, + domNodeId: 'AsyncComponentsTreeForTesting-react-component-0', + props: usedProps, + trace: true, + railsContext: railsContext, + throwJsErrors: false, + renderingReturnsPromises: true, + }); +})() diff --git a/packages/react-on-rails-pro-node-renderer/tests/fixtures/projects/spec-dummy/e5e10d1/consoleLogsInAsyncServerRequest.js b/packages/react-on-rails-pro-node-renderer/tests/fixtures/projects/spec-dummy/e5e10d1/consoleLogsInAsyncServerRequest.js new file mode 100644 index 0000000000..af48ce47d1 --- /dev/null +++ b/packages/react-on-rails-pro-node-renderer/tests/fixtures/projects/spec-dummy/e5e10d1/consoleLogsInAsyncServerRequest.js @@ -0,0 +1,34 @@ +(function () { + var railsContext = { + railsEnv: 'development', + inMailer: false, + i18nLocale: 'en', + i18nDefaultLocale: 'en', + rorVersion: '14.0.5', + rorPro: true, + rorProVersion: '4.0.0.rc.5', + href: 'http://localhost:3000/console_logs_in_async_server', + location: '/console_logs_in_async_server', + scheme: 'http', + host: 'localhost', + port: 3000, + pathname: '/console_logs_in_async_server', + search: null, + httpAcceptLanguage: 'en-US,en-GB;q=0.9,en;q=0.8,ar;q=0.7', + somethingUseful: 'REALLY USEFUL', + serverSide: true, + }; + + ReactOnRails.clearHydratedStores(); + + var props = { requestId: '6ce0caf9-2691-472a-b59b-5de390bcffdf' }; + return ReactOnRails.serverRenderReactComponent({ + name: 'ConsoleLogsInAsyncServer', + domNodeId: 'ConsoleLogsInAsyncServer-react-component', + props: props, + trace: true, + railsContext: railsContext, + throwJsErrors: false, + renderingReturnsPromises: true, + }); +})(); diff --git a/packages/react-on-rails-pro-node-renderer/tests/fixtures/projects/spec-dummy/e5e10d1/server-bundle-node-target.js b/packages/react-on-rails-pro-node-renderer/tests/fixtures/projects/spec-dummy/e5e10d1/server-bundle-node-target.js new file mode 100644 index 0000000000..0669b3877b --- /dev/null +++ b/packages/react-on-rails-pro-node-renderer/tests/fixtures/projects/spec-dummy/e5e10d1/server-bundle-node-target.js @@ -0,0 +1,3796 @@ +/* + * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development"). + * This devtool is neither made for production nor for readable output files. + * It uses "eval()" calls to create a separate source file in the browser devtools. + * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/) + * or disable the default devtool with "devtool: false". + * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/). + */ +/******/ (() => { + // webpackBootstrap + /******/ var __webpack_modules__ = { + /***/ 7252: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var map = {\n\t"./": [\n\t\t5211\n\t],\n\t"./A": [\n\t\t9322,\n\t\t367\n\t],\n\t"./A.css": [\n\t\t1807,\n\t\t367\n\t],\n\t"./A.js": [\n\t\t9322,\n\t\t367\n\t],\n\t"./B": [\n\t\t6231,\n\t\t367\n\t],\n\t"./B.js": [\n\t\t6231,\n\t\t367\n\t],\n\t"./C": [\n\t\t7456,\n\t\t367\n\t],\n\t"./C.js": [\n\t\t7456,\n\t\t367\n\t],\n\t"./D": [\n\t\t7957,\n\t\t367\n\t],\n\t"./D.js": [\n\t\t7957,\n\t\t367\n\t],\n\t"./E": [\n\t\t9718,\n\t\t367\n\t],\n\t"./E.js": [\n\t\t9718,\n\t\t367\n\t],\n\t"./F": [\n\t\t9363,\n\t\t367\n\t],\n\t"./F.js": [\n\t\t9363,\n\t\t367\n\t],\n\t"./G": [\n\t\t1260,\n\t\t367\n\t],\n\t"./G.js": [\n\t\t1260,\n\t\t367\n\t],\n\t"./Letters.imports-hmr": [\n\t\t4958,\n\t\t367\n\t],\n\t"./Letters.imports-hmr.jsx": [\n\t\t4958,\n\t\t367\n\t],\n\t"./Letters.imports-loadable": [\n\t\t3507\n\t],\n\t"./Letters.imports-loadable.jsx": [\n\t\t3507\n\t],\n\t"./Z/file": [\n\t\t7816,\n\t\t367\n\t],\n\t"./Z/file.js": [\n\t\t7816,\n\t\t367\n\t],\n\t"./index": [\n\t\t5211\n\t],\n\t"./index.jsx": [\n\t\t5211\n\t],\n\t"./main": [\n\t\t9227\n\t],\n\t"./main.css": [\n\t\t9227\n\t]\n};\nfunction webpackAsyncContext(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\treturn Promise.resolve().then(() => {\n\t\t\tvar e = new Error("Cannot find module \'" + req + "\'");\n\t\t\te.code = \'MODULE_NOT_FOUND\';\n\t\t\tthrow e;\n\t\t});\n\t}\n\n\tvar ids = map[req], id = ids[0];\n\treturn Promise.all(ids.slice(1).map(__webpack_require__.e)).then(() => {\n\t\treturn __webpack_require__(id);\n\t});\n}\nwebpackAsyncContext.keys = () => (Object.keys(map));\nwebpackAsyncContext.id = 7252;\nmodule.exports = webpackAsyncContext;\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./client/app/components/Loadable/letters/_lazy_^\\.\\/.*$_chunkName:_%5Brequest%5D_namespace_object?', + ); + + /***/ + }, + + /***/ 9983: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var map = {\n\t"./Z/file": [\n\t\t7816,\n\t\t367\n\t]\n};\nfunction webpackAsyncContext(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\treturn Promise.resolve().then(() => {\n\t\t\tvar e = new Error("Cannot find module \'" + req + "\'");\n\t\t\te.code = \'MODULE_NOT_FOUND\';\n\t\t\tthrow e;\n\t\t});\n\t}\n\n\tvar ids = map[req], id = ids[0];\n\treturn __webpack_require__.e(ids[1]).then(() => {\n\t\treturn __webpack_require__(id);\n\t});\n}\nwebpackAsyncContext.keys = () => (Object.keys(map));\nwebpackAsyncContext.id = 9983;\nmodule.exports = webpackAsyncContext;\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./client/app/components/Loadable/letters/_lazy_^\\.\\/.*\\/file$_chunkName:_%5Brequest%5D_namespace_object?', + ); + + /***/ + }, + + /***/ 2478: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var map = {\n\t"./": 5211,\n\t"./A": 9322,\n\t"./A.css": 1807,\n\t"./A.js": 9322,\n\t"./B": 6231,\n\t"./B.js": 6231,\n\t"./C": 7456,\n\t"./C.js": 7456,\n\t"./D": 7957,\n\t"./D.js": 7957,\n\t"./E": 9718,\n\t"./E.js": 9718,\n\t"./F": 9363,\n\t"./F.js": 9363,\n\t"./G": 1260,\n\t"./G.js": 1260,\n\t"./Letters.imports-hmr": 4958,\n\t"./Letters.imports-hmr.jsx": 4958,\n\t"./Letters.imports-loadable": 3507,\n\t"./Letters.imports-loadable.jsx": 3507,\n\t"./Z/file": 7816,\n\t"./Z/file.js": 7816,\n\t"./index": 5211,\n\t"./index.jsx": 5211,\n\t"./main": 9227,\n\t"./main.css": 9227\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\tif(!__webpack_require__.m[id]) {\n\t\tvar e = new Error("Module \'" + req + "\' (\'" + id + "\') is not available (weak dependency)");\n\t\te.code = \'MODULE_NOT_FOUND\';\n\t\tthrow e;\n\t}\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error("Cannot find module \'" + req + "\'");\n\t\te.code = \'MODULE_NOT_FOUND\';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nwebpackContext.id = 2478;\nmodule.exports = webpackContext;\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./client/app/components/Loadable/letters/_weak_^\\.\\/.*$?', + ); + + /***/ + }, + + /***/ 1015: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var map = {\n\t"./Z/file": 7816\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\tif(!__webpack_require__.m[id]) {\n\t\tvar e = new Error("Module \'" + req + "\' (\'" + id + "\') is not available (weak dependency)");\n\t\te.code = \'MODULE_NOT_FOUND\';\n\t\tthrow e;\n\t}\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error("Cannot find module \'" + req + "\'");\n\t\te.code = \'MODULE_NOT_FOUND\';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nwebpackContext.id = 1015;\nmodule.exports = webpackContext;\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./client/app/components/Loadable/letters/_weak_^\\.\\/.*\\/file$?', + ); + + /***/ + }, + + /***/ 8630: /***/ (__unused_webpack_module, exports, __webpack_require__) => { + 'use strict'; + eval( + "\n\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\n\nfunction _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }\n\nvar React = _interopDefault(__webpack_require__(6540));\nvar _objectWithoutPropertiesLoose = _interopDefault(__webpack_require__(4893));\nvar _extends = _interopDefault(__webpack_require__(4634));\nvar _assertThisInitialized = _interopDefault(__webpack_require__(2475));\nvar _inheritsLoose = _interopDefault(__webpack_require__(6221));\nvar hoistNonReactStatics = _interopDefault(__webpack_require__(4146));\n\n/* eslint-disable import/prefer-default-export */\nfunction invariant(condition, message) {\n if (condition) return;\n var error = new Error(\"loadable: \" + message);\n error.framesToPop = 1;\n error.name = 'Invariant Violation';\n throw error;\n}\nfunction warn(message) {\n // eslint-disable-next-line no-console\n console.warn(\"loadable: \" + message);\n}\n\nvar Context = /*#__PURE__*/\nReact.createContext();\n\nvar LOADABLE_REQUIRED_CHUNKS_KEY = '__LOADABLE_REQUIRED_CHUNKS__';\nfunction getRequiredChunkKey(namespace) {\n return \"\" + namespace + LOADABLE_REQUIRED_CHUNKS_KEY;\n}\n\nvar sharedInternals = /*#__PURE__*/Object.freeze({\n __proto__: null,\n getRequiredChunkKey: getRequiredChunkKey,\n invariant: invariant,\n Context: Context\n});\n\nvar LOADABLE_SHARED = {\n initialChunks: {}\n};\n\nvar STATUS_PENDING = 'PENDING';\nvar STATUS_RESOLVED = 'RESOLVED';\nvar STATUS_REJECTED = 'REJECTED';\n\nfunction resolveConstructor(ctor) {\n if (typeof ctor === 'function') {\n return {\n requireAsync: ctor,\n resolve: function resolve() {\n return undefined;\n },\n chunkName: function chunkName() {\n return undefined;\n }\n };\n }\n\n return ctor;\n}\n\nvar withChunkExtractor = function withChunkExtractor(Component) {\n var LoadableWithChunkExtractor = function LoadableWithChunkExtractor(props) {\n return React.createElement(Context.Consumer, null, function (extractor) {\n return React.createElement(Component, Object.assign({\n __chunkExtractor: extractor\n }, props));\n });\n };\n\n if (Component.displayName) {\n LoadableWithChunkExtractor.displayName = Component.displayName + \"WithChunkExtractor\";\n }\n\n return LoadableWithChunkExtractor;\n};\n\nvar identity = function identity(v) {\n return v;\n};\n\nfunction createLoadable(_ref) {\n var _ref$defaultResolveCo = _ref.defaultResolveComponent,\n defaultResolveComponent = _ref$defaultResolveCo === void 0 ? identity : _ref$defaultResolveCo,\n _render = _ref.render,\n onLoad = _ref.onLoad;\n\n function loadable(loadableConstructor, options) {\n if (options === void 0) {\n options = {};\n }\n\n var ctor = resolveConstructor(loadableConstructor);\n var cache = {};\n /**\n * Cachekey represents the component to be loaded\n * if key changes - component has to be reloaded\n * @param props\n * @returns {null|Component}\n */\n\n function _getCacheKey(props) {\n if (options.cacheKey) {\n return options.cacheKey(props);\n }\n\n if (ctor.resolve) {\n return ctor.resolve(props);\n }\n\n return 'static';\n }\n /**\n * Resolves loaded `module` to a specific `Component\n * @param module\n * @param props\n * @param Loadable\n * @returns Component\n */\n\n\n function resolve(module, props, Loadable) {\n var Component = options.resolveComponent ? options.resolveComponent(module, props) : defaultResolveComponent(module); // FIXME: suppressed due to https://github.com/gregberge/loadable-components/issues/990\n // if (options.resolveComponent && !ReactIs.isValidElementType(Component)) {\n // throw new Error(\n // `resolveComponent returned something that is not a React component!`,\n // )\n // }\n\n hoistNonReactStatics(Loadable, Component, {\n preload: true\n });\n return Component;\n }\n\n var cachedLoad = function cachedLoad(props) {\n var cacheKey = _getCacheKey(props);\n\n var promise = cache[cacheKey];\n\n if (!promise || promise.status === STATUS_REJECTED) {\n promise = ctor.requireAsync(props);\n promise.status = STATUS_PENDING;\n cache[cacheKey] = promise;\n promise.then(function () {\n promise.status = STATUS_RESOLVED;\n }, function (error) {\n console.error('loadable-components: failed to asynchronously load component', {\n fileName: ctor.resolve(props),\n chunkName: ctor.chunkName(props),\n error: error ? error.message : error\n });\n promise.status = STATUS_REJECTED;\n });\n }\n\n return promise;\n };\n\n var InnerLoadable =\n /*#__PURE__*/\n function (_React$Component) {\n _inheritsLoose(InnerLoadable, _React$Component);\n\n InnerLoadable.getDerivedStateFromProps = function getDerivedStateFromProps(props, state) {\n var cacheKey = _getCacheKey(props);\n\n return _extends({}, state, {\n cacheKey: cacheKey,\n // change of a key triggers loading state automatically\n loading: state.loading || state.cacheKey !== cacheKey\n });\n };\n\n function InnerLoadable(props) {\n var _this;\n\n _this = _React$Component.call(this, props) || this;\n _this.state = {\n result: null,\n error: null,\n loading: true,\n cacheKey: _getCacheKey(props)\n };\n invariant(!props.__chunkExtractor || ctor.requireSync, 'SSR requires `@loadable/babel-plugin`, please install it'); // Server-side\n\n if (props.__chunkExtractor) {\n // This module has been marked with no SSR\n if (options.ssr === false) {\n return _assertThisInitialized(_this);\n } // We run load function, we assume that it won't fail and that it\n // triggers a synchronous loading of the module\n\n\n ctor.requireAsync(props)[\"catch\"](function () {\n return null;\n }); // So we can require now the module synchronously\n\n _this.loadSync();\n\n props.__chunkExtractor.addChunk(ctor.chunkName(props));\n\n return _assertThisInitialized(_this);\n } // Client-side with `isReady` method present (SSR probably)\n // If module is already loaded, we use a synchronous loading\n // Only perform this synchronous loading if the component has not\n // been marked with no SSR, else we risk hydration mismatches\n\n\n if (options.ssr !== false && ( // is ready - was loaded in this session\n ctor.isReady && ctor.isReady(props) || // is ready - was loaded during SSR process\n ctor.chunkName && LOADABLE_SHARED.initialChunks[ctor.chunkName(props)])) {\n _this.loadSync();\n }\n\n return _this;\n }\n\n var _proto = InnerLoadable.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n this.mounted = true; // retrieve loading promise from a global cache\n\n var cachedPromise = this.getCache(); // if promise exists, but rejected - clear cache\n\n if (cachedPromise && cachedPromise.status === STATUS_REJECTED) {\n this.setCache();\n } // component might be resolved synchronously in the constructor\n\n\n if (this.state.loading) {\n this.loadAsync();\n }\n };\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps, prevState) {\n // Component has to be reloaded on cacheKey change\n if (prevState.cacheKey !== this.state.cacheKey) {\n this.loadAsync();\n }\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.mounted = false;\n };\n\n _proto.safeSetState = function safeSetState(nextState, callback) {\n if (this.mounted) {\n this.setState(nextState, callback);\n }\n }\n /**\n * returns a cache key for the current props\n * @returns {Component|string}\n */\n ;\n\n _proto.getCacheKey = function getCacheKey() {\n return _getCacheKey(this.props);\n }\n /**\n * access the persistent cache\n */\n ;\n\n _proto.getCache = function getCache() {\n return cache[this.getCacheKey()];\n }\n /**\n * sets the cache value. If called without value sets it as undefined\n */\n ;\n\n _proto.setCache = function setCache(value) {\n if (value === void 0) {\n value = undefined;\n }\n\n cache[this.getCacheKey()] = value;\n };\n\n _proto.triggerOnLoad = function triggerOnLoad() {\n var _this2 = this;\n\n if (onLoad) {\n setTimeout(function () {\n onLoad(_this2.state.result, _this2.props);\n });\n }\n }\n /**\n * Synchronously loads component\n * target module is expected to already exists in the module cache\n * or be capable to resolve synchronously (webpack target=node)\n */\n ;\n\n _proto.loadSync = function loadSync() {\n // load sync is expecting component to be in the \"loading\" state already\n // sounds weird, but loading=true is the initial state of InnerLoadable\n if (!this.state.loading) return;\n\n try {\n var loadedModule = ctor.requireSync(this.props);\n var result = resolve(loadedModule, this.props, Loadable);\n this.state.result = result;\n this.state.loading = false;\n } catch (error) {\n console.error('loadable-components: failed to synchronously load component, which expected to be available', {\n fileName: ctor.resolve(this.props),\n chunkName: ctor.chunkName(this.props),\n error: error ? error.message : error\n });\n this.state.error = error;\n }\n }\n /**\n * Asynchronously loads a component.\n */\n ;\n\n _proto.loadAsync = function loadAsync() {\n var _this3 = this;\n\n var promise = this.resolveAsync();\n promise.then(function (loadedModule) {\n var result = resolve(loadedModule, _this3.props, Loadable);\n\n _this3.safeSetState({\n result: result,\n loading: false\n }, function () {\n return _this3.triggerOnLoad();\n });\n })[\"catch\"](function (error) {\n return _this3.safeSetState({\n error: error,\n loading: false\n });\n });\n return promise;\n }\n /**\n * Asynchronously resolves(not loads) a component.\n * Note - this function does not change the state\n */\n ;\n\n _proto.resolveAsync = function resolveAsync() {\n var _this$props = this.props,\n __chunkExtractor = _this$props.__chunkExtractor,\n forwardedRef = _this$props.forwardedRef,\n props = _objectWithoutPropertiesLoose(_this$props, [\"__chunkExtractor\", \"forwardedRef\"]);\n\n return cachedLoad(props);\n };\n\n _proto.render = function render() {\n var _this$props2 = this.props,\n forwardedRef = _this$props2.forwardedRef,\n propFallback = _this$props2.fallback,\n __chunkExtractor = _this$props2.__chunkExtractor,\n props = _objectWithoutPropertiesLoose(_this$props2, [\"forwardedRef\", \"fallback\", \"__chunkExtractor\"]);\n\n var _this$state = this.state,\n error = _this$state.error,\n loading = _this$state.loading,\n result = _this$state.result;\n\n if (options.suspense) {\n var cachedPromise = this.getCache() || this.loadAsync();\n\n if (cachedPromise.status === STATUS_PENDING) {\n throw this.loadAsync();\n }\n }\n\n if (error) {\n throw error;\n }\n\n var fallback = propFallback || options.fallback || null;\n\n if (loading) {\n return fallback;\n }\n\n return _render({\n fallback: fallback,\n result: result,\n options: options,\n props: _extends({}, props, {\n ref: forwardedRef\n })\n });\n };\n\n return InnerLoadable;\n }(React.Component);\n\n var EnhancedInnerLoadable = withChunkExtractor(InnerLoadable);\n var Loadable = React.forwardRef(function (props, ref) {\n return React.createElement(EnhancedInnerLoadable, Object.assign({\n forwardedRef: ref\n }, props));\n });\n Loadable.displayName = 'Loadable'; // In future, preload could use `<link rel=\"preload\">`\n\n Loadable.preload = function (props) {\n Loadable.load(props);\n };\n\n Loadable.load = function (props) {\n return cachedLoad(props);\n };\n\n return Loadable;\n }\n\n function lazy(ctor, options) {\n return loadable(ctor, _extends({}, options, {\n suspense: true\n }));\n }\n\n return {\n loadable: loadable,\n lazy: lazy\n };\n}\n\nfunction defaultResolveComponent(loadedModule) {\n // eslint-disable-next-line no-underscore-dangle\n return loadedModule.__esModule ? loadedModule[\"default\"] : loadedModule[\"default\"] || loadedModule;\n}\n\n/* eslint-disable no-use-before-define, react/no-multi-comp */\n\nvar _createLoadable =\n/*#__PURE__*/\ncreateLoadable({\n defaultResolveComponent: defaultResolveComponent,\n render: function render(_ref) {\n var Component = _ref.result,\n props = _ref.props;\n return React.createElement(Component, props);\n }\n}),\n loadable = _createLoadable.loadable,\n lazy = _createLoadable.lazy;\n\n/* eslint-disable no-use-before-define, react/no-multi-comp */\n\nvar _createLoadable$1 =\n/*#__PURE__*/\ncreateLoadable({\n onLoad: function onLoad(result, props) {\n if (result && props.forwardedRef) {\n if (typeof props.forwardedRef === 'function') {\n props.forwardedRef(result);\n } else {\n props.forwardedRef.current = result;\n }\n }\n },\n render: function render(_ref) {\n var result = _ref.result,\n props = _ref.props;\n\n if (props.children) {\n return props.children(result);\n }\n\n return null;\n }\n}),\n loadable$1 = _createLoadable$1.loadable,\n lazy$1 = _createLoadable$1.lazy;\n\n/* eslint-disable no-underscore-dangle, camelcase */\nvar BROWSER = typeof window !== 'undefined';\nfunction loadableReady(done, _temp) {\n if (done === void 0) {\n done = function done() {};\n }\n\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$namespace = _ref.namespace,\n namespace = _ref$namespace === void 0 ? '' : _ref$namespace,\n _ref$chunkLoadingGlob = _ref.chunkLoadingGlobal,\n chunkLoadingGlobal = _ref$chunkLoadingGlob === void 0 ? '__LOADABLE_LOADED_CHUNKS__' : _ref$chunkLoadingGlob;\n\n if (!BROWSER) {\n warn('`loadableReady()` must be called in browser only');\n done();\n return Promise.resolve();\n }\n\n var requiredChunks = null;\n\n if (BROWSER) {\n var id = getRequiredChunkKey(namespace);\n var dataElement = document.getElementById(id);\n\n if (dataElement) {\n requiredChunks = JSON.parse(dataElement.textContent);\n var extElement = document.getElementById(id + \"_ext\");\n\n if (extElement) {\n var _JSON$parse = JSON.parse(extElement.textContent),\n namedChunks = _JSON$parse.namedChunks;\n\n namedChunks.forEach(function (chunkName) {\n LOADABLE_SHARED.initialChunks[chunkName] = true;\n });\n } else {\n // version mismatch\n throw new Error('loadable-component: @loadable/server does not match @loadable/component');\n }\n }\n }\n\n if (!requiredChunks) {\n warn('`loadableReady()` requires state, please use `getScriptTags` or `getScriptElements` server-side');\n done();\n return Promise.resolve();\n }\n\n var resolved = false;\n return new Promise(function (resolve) {\n window[chunkLoadingGlobal] = window[chunkLoadingGlobal] || [];\n var loadedChunks = window[chunkLoadingGlobal];\n var originalPush = loadedChunks.push.bind(loadedChunks);\n\n function checkReadyState() {\n if (requiredChunks.every(function (chunk) {\n return loadedChunks.some(function (_ref2) {\n var chunks = _ref2[0];\n return chunks.indexOf(chunk) > -1;\n });\n })) {\n if (!resolved) {\n resolved = true;\n resolve();\n }\n }\n }\n\n loadedChunks.push = function () {\n originalPush.apply(void 0, arguments);\n checkReadyState();\n };\n\n checkReadyState();\n }).then(done);\n}\n\n/* eslint-disable no-underscore-dangle */\nvar loadable$2 = loadable;\nloadable$2.lib = loadable$1;\nvar lazy$2 = lazy;\nlazy$2.lib = lazy$1;\nvar __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = sharedInternals;\n\nexports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\nexports[\"default\"] = loadable$2;\nexports.lazy = lazy$2;\nexports.loadableReady = loadableReady;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@loadable/component/dist/loadable.cjs.js?", + ); + + /***/ + }, + + /***/ 6888: /***/ (__unused_webpack_module, exports, __webpack_require__) => { + 'use strict'; + eval( + "\n\nexports.__esModule = true;\nexports[\"default\"] = void 0;\n\nvar _path = _interopRequireDefault(__webpack_require__(6928));\n\nvar _fs = _interopRequireDefault(__webpack_require__(9896));\n\nvar _uniq = _interopRequireDefault(__webpack_require__(3375));\n\nvar _uniqBy = _interopRequireDefault(__webpack_require__(14));\n\nvar _flatMap = _interopRequireDefault(__webpack_require__(7307));\n\nvar _react = _interopRequireDefault(__webpack_require__(6540));\n\nvar _sharedInternals = __webpack_require__(9506);\n\nvar _ChunkExtractorManager = _interopRequireDefault(__webpack_require__(3917));\n\nvar _util = __webpack_require__(9203);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nconst EXTENSION_SCRIPT_TYPES = {\n '.js': 'script',\n '.mjs': 'script',\n '.css': 'style'\n};\n\nfunction extensionToScriptType(extension) {\n return EXTENSION_SCRIPT_TYPES[extension] || null;\n}\n/**\n * some files can be references with extra query arguments which have to be removed\n * @param name\n * @returns {*}\n */\n\n\nfunction cleanFileName(name) {\n return name.split('?')[0];\n}\n\nfunction getFileScriptType(fileName) {\n return extensionToScriptType(cleanFileName(_path.default.extname(fileName)).toLowerCase());\n}\n\nfunction isScriptFile(fileName) {\n return getFileScriptType(fileName) === 'script';\n}\n\nfunction getAssets(chunks, getAsset) {\n return (0, _uniqBy.default)((0, _flatMap.default)(chunks, chunk => getAsset(chunk)), 'url');\n}\n\nfunction handleExtraProps(asset, extraProps) {\n return typeof extraProps === 'function' ? extraProps(asset) : extraProps;\n}\n\nfunction extraPropsToString(asset, extraProps) {\n return Object.entries(handleExtraProps(asset, extraProps)).reduce((acc, [key, value]) => `${acc} ${key}=\"${value}\"`, '');\n}\n\nfunction getSriHtmlAttributes(asset) {\n if (!asset.integrity) {\n return '';\n }\n\n return ` integrity=\"${asset.integrity}\"`;\n}\n\nfunction assetToScriptTag(asset, extraProps) {\n return `<script async data-chunk=\"${asset.chunk}\" src=\"${asset.url}\"${getSriHtmlAttributes(asset)}${extraPropsToString(asset, extraProps)}></script>`;\n}\n\nfunction assetToScriptElement(asset, extraProps) {\n return _react.default.createElement(\"script\", Object.assign({\n key: asset.url,\n async: true,\n \"data-chunk\": asset.chunk,\n src: asset.url\n }, handleExtraProps(asset, extraProps)));\n}\n\nfunction assetToStyleString(asset, {\n inputFileSystem\n}) {\n return new Promise((resolve, reject) => {\n inputFileSystem.readFile(asset.path, 'utf8', (err, data) => {\n if (err) {\n reject(err);\n return;\n }\n\n resolve(data);\n });\n });\n}\n\nfunction assetToStyleTag(asset, extraProps) {\n return `<link data-chunk=\"${asset.chunk}\" rel=\"stylesheet\" href=\"${asset.url}\"${getSriHtmlAttributes(asset)}${extraPropsToString(asset, extraProps)}>`;\n}\n\nfunction assetToStyleTagInline(asset, extraProps, {\n inputFileSystem\n}) {\n return new Promise((resolve, reject) => {\n inputFileSystem.readFile(asset.path, 'utf8', (err, data) => {\n if (err) {\n reject(err);\n return;\n }\n\n resolve(`<style type=\"text/css\" data-chunk=\"${asset.chunk}\"${extraPropsToString(asset, extraProps)}>\n${data}\n</style>`);\n });\n });\n}\n\nfunction assetToStyleElement(asset, extraProps) {\n return _react.default.createElement(\"link\", Object.assign({\n key: asset.url,\n \"data-chunk\": asset.chunk,\n rel: \"stylesheet\",\n href: asset.url\n }, handleExtraProps(asset, extraProps)));\n}\n\nfunction assetToStyleElementInline(asset, extraProps, {\n inputFileSystem\n}) {\n return new Promise((resolve, reject) => {\n inputFileSystem.readFile(asset.path, 'utf8', (err, data) => {\n if (err) {\n reject(err);\n return;\n }\n\n resolve(_react.default.createElement(\"style\", Object.assign({\n key: asset.url,\n \"data-chunk\": asset.chunk,\n dangerouslySetInnerHTML: {\n __html: data\n }\n }, handleExtraProps(asset, extraProps))));\n });\n });\n}\n\nconst LINK_ASSET_HINTS = {\n mainAsset: 'data-chunk',\n childAsset: 'data-parent-chunk'\n};\n\nfunction assetToLinkTag(asset, extraProps) {\n const hint = LINK_ASSET_HINTS[asset.type];\n return `<link ${hint}=\"${asset.chunk}\" rel=\"${asset.linkType}\" as=\"${asset.scriptType}\" href=\"${asset.url}\"${getSriHtmlAttributes(asset)}${extraPropsToString(asset, extraProps)}>`;\n}\n\nfunction assetToLinkElement(asset, extraProps) {\n const hint = LINK_ASSET_HINTS[asset.type];\n\n const props = _extends({\n key: asset.url,\n [hint]: asset.chunk,\n rel: asset.linkType,\n as: asset.scriptType,\n href: asset.url\n }, handleExtraProps(asset, extraProps));\n\n return _react.default.createElement(\"link\", props);\n}\n\nfunction joinTags(tags) {\n return tags.join('\\n');\n}\n\nconst HOT_UPDATE_REGEXP = /\\.hot-update\\.js$/;\n\nfunction isValidChunkAsset(chunkAsset) {\n return chunkAsset.scriptType && !HOT_UPDATE_REGEXP.test(chunkAsset.filename);\n}\n\nfunction checkIfChunkIncludesJs(chunkInfo) {\n return chunkInfo.files.some(file => isScriptFile(file));\n}\n\nclass ChunkExtractor {\n constructor({\n statsFile,\n stats,\n entrypoints = ['main'],\n namespace = '',\n outputPath,\n publicPath,\n inputFileSystem = _fs.default\n } = {}) {\n this.namespace = namespace;\n this.stats = stats || (0, _util.readJsonFileSync)(inputFileSystem, statsFile);\n this.publicPath = publicPath || this.stats.publicPath;\n this.outputPath = outputPath || this.stats.outputPath;\n this.statsFile = statsFile;\n this.entrypoints = Array.isArray(entrypoints) ? entrypoints : [entrypoints];\n this.chunks = [];\n this.inputFileSystem = inputFileSystem;\n }\n\n resolvePublicUrl(filename) {\n return (0, _util.joinURLPath)(this.publicPath, filename);\n }\n\n getChunkGroup(chunk) {\n const chunkGroup = this.stats.namedChunkGroups[chunk];\n (0, _sharedInternals.invariant)(chunkGroup, `cannot find ${chunk} in stats`);\n return chunkGroup;\n }\n\n getChunkInfo(chunkId) {\n const chunkInfo = this.stats.chunks.find(chunk => chunk.id === chunkId);\n (0, _sharedInternals.invariant)(chunkInfo, `cannot find chunk (chunkId: ${chunkId}) in stats`);\n return chunkInfo;\n }\n\n createChunkAsset({\n filename,\n chunk,\n type,\n linkType\n }) {\n const resolvedFilename = typeof filename === 'object' && filename.name ? filename.name : filename;\n const resolvedIntegrity = typeof filename === 'object' && filename.integrity ? filename.integrity : null;\n return {\n filename: resolvedFilename,\n integrity: resolvedIntegrity,\n scriptType: getFileScriptType(resolvedFilename),\n chunk,\n url: this.resolvePublicUrl(resolvedFilename),\n path: _path.default.join(this.outputPath, resolvedFilename),\n type,\n linkType\n };\n }\n\n getChunkAssets(chunks) {\n const one = chunk => {\n const chunkGroup = this.getChunkGroup(chunk);\n return chunkGroup.assets.map(filename => this.createChunkAsset({\n filename,\n chunk,\n type: 'mainAsset',\n linkType: 'preload'\n })).filter(isValidChunkAsset);\n };\n\n if (Array.isArray(chunks)) {\n return getAssets(chunks, one);\n }\n\n return one(chunks);\n }\n\n getChunkChildAssets(chunks, type) {\n const one = chunk => {\n const chunkGroup = this.getChunkGroup(chunk);\n const assets = chunkGroup.childAssets[type] || [];\n return assets.map(filename => this.createChunkAsset({\n filename,\n chunk,\n type: 'childAsset',\n linkType: type\n })).filter(isValidChunkAsset);\n };\n\n if (Array.isArray(chunks)) {\n return getAssets(chunks, one);\n }\n\n return one(chunks);\n }\n\n getChunkDependencies(chunks) {\n const one = chunk => {\n const chunkGroup = this.getChunkGroup(chunk); // ignore chunk that only contains css files.\n\n return chunkGroup.chunks.filter(chunkId => {\n const chunkInfo = this.getChunkInfo(chunkId);\n\n if (!chunkInfo) {\n return false;\n }\n\n return checkIfChunkIncludesJs(chunkInfo);\n });\n };\n\n if (Array.isArray(chunks)) {\n return (0, _uniq.default)((0, _flatMap.default)(chunks, one));\n }\n\n return one(chunks);\n }\n\n getRequiredChunksScriptContent() {\n return JSON.stringify(this.getChunkDependencies(this.chunks));\n }\n\n getRequiredChunksNamesScriptContent() {\n return JSON.stringify({\n namedChunks: this.chunks\n });\n }\n\n getRequiredChunksScriptTag(extraProps) {\n const id = (0, _sharedInternals.getRequiredChunkKey)(this.namespace);\n const props = `type=\"application/json\"${extraPropsToString(null, extraProps)}`;\n return [`<script id=\"${id}\" ${props}>${this.getRequiredChunksScriptContent()}</script>`, `<script id=\"${id}_ext\" ${props}>${this.getRequiredChunksNamesScriptContent()}</script>`].join('');\n }\n\n getRequiredChunksScriptElements(extraProps) {\n const id = (0, _sharedInternals.getRequiredChunkKey)(this.namespace);\n\n const props = _extends({\n type: 'application/json'\n }, handleExtraProps(null, extraProps));\n\n return [_react.default.createElement(\"script\", Object.assign({\n id: id,\n key: id,\n dangerouslySetInnerHTML: {\n __html: this.getRequiredChunksScriptContent()\n }\n }, props)), _react.default.createElement(\"script\", Object.assign({\n id: `${id}_ext`,\n key: `${id}_ext`,\n dangerouslySetInnerHTML: {\n __html: this.getRequiredChunksNamesScriptContent()\n }\n }, props))];\n } // Public methods\n // -----------------\n // Collect\n\n\n addChunk(chunk) {\n if (this.chunks.indexOf(chunk) !== -1) return;\n this.chunks.push(chunk);\n }\n\n collectChunks(app) {\n return _react.default.createElement(_ChunkExtractorManager.default, {\n extractor: this\n }, app);\n } // Utilities\n\n\n requireEntrypoint(entrypoint) {\n const entrypointPath = this.getEntrypointPath(this.entrypoint);\n this.getAllScriptAssetsPaths().forEach(assetPath => {\n (0, _util.smartRequire)(assetPath);\n });\n return (0, _util.smartRequire)(entrypointPath);\n }\n\n getEntrypointPath(entrypoint) {\n entrypoint = entrypoint || this.entrypoints[0];\n const assets = this.getChunkAssets(entrypoint);\n const mainAsset = assets.find(asset => asset.scriptType === 'script');\n (0, _sharedInternals.invariant)(mainAsset, 'asset not found');\n return cleanFileName(mainAsset.path);\n }\n\n getAllScriptAssetsPaths() {\n return this.stats.assets.filter(({\n name\n }) => isScriptFile(name)).map(({\n name\n }) => {\n return _path.default.join(this.outputPath, cleanFileName(name));\n });\n } // Main assets\n\n\n getMainAssets(scriptType) {\n const chunks = [...this.entrypoints, ...this.chunks];\n const assets = this.getChunkAssets(chunks);\n\n if (scriptType) {\n return assets.filter(asset => asset.scriptType === scriptType);\n }\n\n return assets;\n }\n\n getScriptTags(extraProps = {}) {\n const requiredScriptTag = this.getRequiredChunksScriptTag(extraProps);\n const mainAssets = this.getMainAssets('script');\n const assetsScriptTags = mainAssets.map(asset => assetToScriptTag(asset, extraProps));\n return joinTags([requiredScriptTag, ...assetsScriptTags]);\n }\n\n getScriptElements(extraProps = {}) {\n const requiredScriptElements = this.getRequiredChunksScriptElements(extraProps);\n const mainAssets = this.getMainAssets('script');\n const assetsScriptElements = mainAssets.map(asset => assetToScriptElement(asset, extraProps));\n return [...requiredScriptElements, ...assetsScriptElements];\n }\n\n getCssString() {\n const mainAssets = this.getMainAssets('style');\n const promises = mainAssets.map(asset => assetToStyleString(asset, this).then(data => data));\n return Promise.all(promises).then(results => joinTags(results));\n }\n\n getStyleTags(extraProps = {}) {\n const mainAssets = this.getMainAssets('style');\n return joinTags(mainAssets.map(asset => assetToStyleTag(asset, extraProps)));\n }\n\n getInlineStyleTags(extraProps = {}) {\n const mainAssets = this.getMainAssets('style');\n const promises = mainAssets.map(asset => assetToStyleTagInline(asset, extraProps, this).then(data => data));\n return Promise.all(promises).then(results => joinTags(results));\n }\n\n getStyleElements(extraProps = {}) {\n const mainAssets = this.getMainAssets('style');\n return mainAssets.map(asset => assetToStyleElement(asset, extraProps));\n }\n\n getInlineStyleElements(extraProps = {}) {\n const mainAssets = this.getMainAssets('style');\n const promises = mainAssets.map(asset => assetToStyleElementInline(asset, extraProps, this).then(data => data));\n return Promise.all(promises).then(results => results);\n } // Pre assets\n\n\n getPreAssets() {\n const mainAssets = this.getMainAssets();\n const chunks = [...this.entrypoints, ...this.chunks];\n const preloadAssets = this.getChunkChildAssets(chunks, 'preload');\n const prefetchAssets = this.getChunkChildAssets(chunks, 'prefetch');\n return [...mainAssets, ...preloadAssets, ...prefetchAssets].sort(a => a.scriptType === 'style' ? -1 : 0);\n }\n\n getLinkTags(extraProps = {}) {\n const assets = this.getPreAssets();\n const linkTags = assets.map(asset => assetToLinkTag(asset, extraProps));\n return joinTags(linkTags);\n }\n\n getLinkElements(extraProps = {}) {\n const assets = this.getPreAssets();\n return assets.map(asset => assetToLinkElement(asset, extraProps));\n }\n\n}\n\nvar _default = ChunkExtractor;\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@loadable/server/lib/ChunkExtractor.js?", + ); + + /***/ + }, + + /***/ 3917: /***/ (__unused_webpack_module, exports, __webpack_require__) => { + 'use strict'; + eval( + '\n\nexports.__esModule = true;\nexports["default"] = void 0;\n\nvar _react = _interopRequireDefault(__webpack_require__(6540));\n\nvar _sharedInternals = __webpack_require__(9506);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst ChunkExtractorManager = ({\n extractor,\n children\n}) => _react.default.createElement(_sharedInternals.Context.Provider, {\n value: extractor\n}, children);\n\nvar _default = ChunkExtractorManager;\nexports["default"] = _default;\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@loadable/server/lib/ChunkExtractorManager.js?', + ); + + /***/ + }, + + /***/ 427: /***/ (__unused_webpack_module, exports, __webpack_require__) => { + 'use strict'; + eval( + 'var __webpack_unused_export__;\n\n\n__webpack_unused_export__ = true;\nexports.ky = __webpack_unused_export__ = void 0;\n\nvar _ChunkExtractorManager = _interopRequireDefault(__webpack_require__(3917));\n\n__webpack_unused_export__ = _ChunkExtractorManager.default;\n\nvar _ChunkExtractor = _interopRequireDefault(__webpack_require__(6888));\n\nexports.ky = _ChunkExtractor.default;\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@loadable/server/lib/index.js?', + ); + + /***/ + }, + + /***/ 9506: /***/ (__unused_webpack_module, exports, __webpack_require__) => { + 'use strict'; + eval( + '\n\nexports.__esModule = true;\nexports.getRequiredChunkKey = exports.Context = exports.invariant = void 0;\n\nvar _component = __webpack_require__(8630);\n\n/* eslint-disable no-underscore-dangle */\nconst {\n invariant,\n Context,\n getRequiredChunkKey\n} = _component.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\nexports.getRequiredChunkKey = getRequiredChunkKey;\nexports.Context = Context;\nexports.invariant = invariant;\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@loadable/server/lib/sharedInternals.js?', + ); + + /***/ + }, + + /***/ 9203: /***/ (__unused_webpack_module, exports) => { + 'use strict'; + eval( + "\n\nexports.__esModule = true;\nexports.readJsonFileSync = exports.joinURLPath = exports.smartRequire = exports.clearModuleCache = void 0;\n\n// Use __non_webpack_require__ to prevent Webpack from compiling it\n// when the server-side code is compiled with Webpack\n// eslint-disable-next-line camelcase, no-undef, global-require, import/no-dynamic-require, no-eval\nconst getRequire = () => typeof require !== 'undefined' ? require : eval('require');\n\nconst clearModuleCache = moduleName => {\n const {\n cache\n } = getRequire();\n const m = cache[moduleName];\n\n if (m) {\n // remove self from own parents\n if (m.parent && m.parent.children) {\n m.parent.children = m.parent.children.filter(x => x !== m);\n } // remove self from own children\n\n\n if (m.children) {\n m.children.forEach(child => {\n if (child.parent && child.parent === m) {\n child.parent = null;\n }\n });\n }\n\n delete cache[moduleName];\n }\n};\n\nexports.clearModuleCache = clearModuleCache;\n\nconst smartRequire = modulePath => {\n if (false) {}\n\n return getRequire()(modulePath);\n};\n\nexports.smartRequire = smartRequire;\n\nconst joinURLPath = (publicPath, filename) => {\n if (publicPath.substr(-1) === '/') {\n return `${publicPath}${filename}`;\n }\n\n return `${publicPath}/${filename}`;\n};\n\nexports.joinURLPath = joinURLPath;\n\nconst readJsonFileSync = (inputFileSystem, jsonFilePath) => {\n return JSON.parse(inputFileSystem.readFileSync(jsonFilePath));\n};\n\nexports.readJsonFileSync = readJsonFileSync;\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@loadable/server/lib/util.js?", + ); + + /***/ + }, + + /***/ 5588: /***/ (__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ AbortedDeferredError: () => (/* binding */ AbortedDeferredError),\n/* harmony export */ Action: () => (/* binding */ Action),\n/* harmony export */ IDLE_BLOCKER: () => (/* binding */ IDLE_BLOCKER),\n/* harmony export */ IDLE_FETCHER: () => (/* binding */ IDLE_FETCHER),\n/* harmony export */ IDLE_NAVIGATION: () => (/* binding */ IDLE_NAVIGATION),\n/* harmony export */ UNSAFE_DEFERRED_SYMBOL: () => (/* binding */ UNSAFE_DEFERRED_SYMBOL),\n/* harmony export */ UNSAFE_DeferredData: () => (/* binding */ DeferredData),\n/* harmony export */ UNSAFE_ErrorResponseImpl: () => (/* binding */ ErrorResponseImpl),\n/* harmony export */ UNSAFE_convertRouteMatchToUiMatch: () => (/* binding */ convertRouteMatchToUiMatch),\n/* harmony export */ UNSAFE_convertRoutesToDataRoutes: () => (/* binding */ convertRoutesToDataRoutes),\n/* harmony export */ UNSAFE_getResolveToMatches: () => (/* binding */ getResolveToMatches),\n/* harmony export */ UNSAFE_invariant: () => (/* binding */ invariant),\n/* harmony export */ UNSAFE_warning: () => (/* binding */ warning),\n/* harmony export */ createBrowserHistory: () => (/* binding */ createBrowserHistory),\n/* harmony export */ createHashHistory: () => (/* binding */ createHashHistory),\n/* harmony export */ createMemoryHistory: () => (/* binding */ createMemoryHistory),\n/* harmony export */ createPath: () => (/* binding */ createPath),\n/* harmony export */ createRouter: () => (/* binding */ createRouter),\n/* harmony export */ createStaticHandler: () => (/* binding */ createStaticHandler),\n/* harmony export */ defer: () => (/* binding */ defer),\n/* harmony export */ generatePath: () => (/* binding */ generatePath),\n/* harmony export */ getStaticContextFromError: () => (/* binding */ getStaticContextFromError),\n/* harmony export */ getToPathname: () => (/* binding */ getToPathname),\n/* harmony export */ isDeferredData: () => (/* binding */ isDeferredData),\n/* harmony export */ isRouteErrorResponse: () => (/* binding */ isRouteErrorResponse),\n/* harmony export */ joinPaths: () => (/* binding */ joinPaths),\n/* harmony export */ json: () => (/* binding */ json),\n/* harmony export */ matchPath: () => (/* binding */ matchPath),\n/* harmony export */ matchRoutes: () => (/* binding */ matchRoutes),\n/* harmony export */ normalizePathname: () => (/* binding */ normalizePathname),\n/* harmony export */ parsePath: () => (/* binding */ parsePath),\n/* harmony export */ redirect: () => (/* binding */ redirect),\n/* harmony export */ redirectDocument: () => (/* binding */ redirectDocument),\n/* harmony export */ resolvePath: () => (/* binding */ resolvePath),\n/* harmony export */ resolveTo: () => (/* binding */ resolveTo),\n/* harmony export */ stripBasename: () => (/* binding */ stripBasename)\n/* harmony export */ });\n/**\n * @remix-run/router v1.17.1\n *\n * Copyright (c) Remix Software Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE.md file in the root directory of this source tree.\n *\n * @license MIT\n */\nfunction _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}\n\n////////////////////////////////////////////////////////////////////////////////\n//#region Types and Constants\n////////////////////////////////////////////////////////////////////////////////\n/**\n * Actions represent the type of change to a location value.\n */\nvar Action;\n(function (Action) {\n /**\n * A POP indicates a change to an arbitrary index in the history stack, such\n * as a back or forward navigation. It does not describe the direction of the\n * navigation, only that the current index changed.\n *\n * Note: This is the default action for newly created history objects.\n */\n Action["Pop"] = "POP";\n /**\n * A PUSH indicates a new entry being added to the history stack, such as when\n * a link is clicked and a new page loads. When this happens, all subsequent\n * entries in the stack are lost.\n */\n Action["Push"] = "PUSH";\n /**\n * A REPLACE indicates the entry at the current index in the history stack\n * being replaced by a new one.\n */\n Action["Replace"] = "REPLACE";\n})(Action || (Action = {}));\nconst PopStateEventType = "popstate";\n/**\n * Memory history stores the current location in memory. It is designed for use\n * in stateful non-browser environments like tests and React Native.\n */\nfunction createMemoryHistory(options) {\n if (options === void 0) {\n options = {};\n }\n let {\n initialEntries = ["/"],\n initialIndex,\n v5Compat = false\n } = options;\n let entries; // Declare so we can access from createMemoryLocation\n entries = initialEntries.map((entry, index) => createMemoryLocation(entry, typeof entry === "string" ? null : entry.state, index === 0 ? "default" : undefined));\n let index = clampIndex(initialIndex == null ? entries.length - 1 : initialIndex);\n let action = Action.Pop;\n let listener = null;\n function clampIndex(n) {\n return Math.min(Math.max(n, 0), entries.length - 1);\n }\n function getCurrentLocation() {\n return entries[index];\n }\n function createMemoryLocation(to, state, key) {\n if (state === void 0) {\n state = null;\n }\n let location = createLocation(entries ? getCurrentLocation().pathname : "/", to, state, key);\n warning(location.pathname.charAt(0) === "/", "relative pathnames are not supported in memory history: " + JSON.stringify(to));\n return location;\n }\n function createHref(to) {\n return typeof to === "string" ? to : createPath(to);\n }\n let history = {\n get index() {\n return index;\n },\n get action() {\n return action;\n },\n get location() {\n return getCurrentLocation();\n },\n createHref,\n createURL(to) {\n return new URL(createHref(to), "http://localhost");\n },\n encodeLocation(to) {\n let path = typeof to === "string" ? parsePath(to) : to;\n return {\n pathname: path.pathname || "",\n search: path.search || "",\n hash: path.hash || ""\n };\n },\n push(to, state) {\n action = Action.Push;\n let nextLocation = createMemoryLocation(to, state);\n index += 1;\n entries.splice(index, entries.length, nextLocation);\n if (v5Compat && listener) {\n listener({\n action,\n location: nextLocation,\n delta: 1\n });\n }\n },\n replace(to, state) {\n action = Action.Replace;\n let nextLocation = createMemoryLocation(to, state);\n entries[index] = nextLocation;\n if (v5Compat && listener) {\n listener({\n action,\n location: nextLocation,\n delta: 0\n });\n }\n },\n go(delta) {\n action = Action.Pop;\n let nextIndex = clampIndex(index + delta);\n let nextLocation = entries[nextIndex];\n index = nextIndex;\n if (listener) {\n listener({\n action,\n location: nextLocation,\n delta\n });\n }\n },\n listen(fn) {\n listener = fn;\n return () => {\n listener = null;\n };\n }\n };\n return history;\n}\n/**\n * Browser history stores the location in regular URLs. This is the standard for\n * most web apps, but it requires some configuration on the server to ensure you\n * serve the same app at multiple URLs.\n *\n * @see https://github.com/remix-run/history/tree/main/docs/api-reference.md#createbrowserhistory\n */\nfunction createBrowserHistory(options) {\n if (options === void 0) {\n options = {};\n }\n function createBrowserLocation(window, globalHistory) {\n let {\n pathname,\n search,\n hash\n } = window.location;\n return createLocation("", {\n pathname,\n search,\n hash\n },\n // state defaults to `null` because `window.history.state` does\n globalHistory.state && globalHistory.state.usr || null, globalHistory.state && globalHistory.state.key || "default");\n }\n function createBrowserHref(window, to) {\n return typeof to === "string" ? to : createPath(to);\n }\n return getUrlBasedHistory(createBrowserLocation, createBrowserHref, null, options);\n}\n/**\n * Hash history stores the location in window.location.hash. This makes it ideal\n * for situations where you don\'t want to send the location to the server for\n * some reason, either because you do cannot configure it or the URL space is\n * reserved for something else.\n *\n * @see https://github.com/remix-run/history/tree/main/docs/api-reference.md#createhashhistory\n */\nfunction createHashHistory(options) {\n if (options === void 0) {\n options = {};\n }\n function createHashLocation(window, globalHistory) {\n let {\n pathname = "/",\n search = "",\n hash = ""\n } = parsePath(window.location.hash.substr(1));\n // Hash URL should always have a leading / just like window.location.pathname\n // does, so if an app ends up at a route like /#something then we add a\n // leading slash so all of our path-matching behaves the same as if it would\n // in a browser router. This is particularly important when there exists a\n // root splat route (<Route path="*">) since that matches internally against\n // "/*" and we\'d expect /#something to 404 in a hash router app.\n if (!pathname.startsWith("/") && !pathname.startsWith(".")) {\n pathname = "/" + pathname;\n }\n return createLocation("", {\n pathname,\n search,\n hash\n },\n // state defaults to `null` because `window.history.state` does\n globalHistory.state && globalHistory.state.usr || null, globalHistory.state && globalHistory.state.key || "default");\n }\n function createHashHref(window, to) {\n let base = window.document.querySelector("base");\n let href = "";\n if (base && base.getAttribute("href")) {\n let url = window.location.href;\n let hashIndex = url.indexOf("#");\n href = hashIndex === -1 ? url : url.slice(0, hashIndex);\n }\n return href + "#" + (typeof to === "string" ? to : createPath(to));\n }\n function validateHashLocation(location, to) {\n warning(location.pathname.charAt(0) === "/", "relative pathnames are not supported in hash history.push(" + JSON.stringify(to) + ")");\n }\n return getUrlBasedHistory(createHashLocation, createHashHref, validateHashLocation, options);\n}\nfunction invariant(value, message) {\n if (value === false || value === null || typeof value === "undefined") {\n throw new Error(message);\n }\n}\nfunction warning(cond, message) {\n if (!cond) {\n // eslint-disable-next-line no-console\n if (typeof console !== "undefined") console.warn(message);\n try {\n // Welcome to debugging history!\n //\n // This error is thrown as a convenience, so you can more easily\n // find the source for a warning that appears in the console by\n // enabling "pause on exceptions" in your JavaScript debugger.\n throw new Error(message);\n // eslint-disable-next-line no-empty\n } catch (e) {}\n }\n}\nfunction createKey() {\n return Math.random().toString(36).substr(2, 8);\n}\n/**\n * For browser-based histories, we combine the state and key into an object\n */\nfunction getHistoryState(location, index) {\n return {\n usr: location.state,\n key: location.key,\n idx: index\n };\n}\n/**\n * Creates a Location object with a unique key from the given Path\n */\nfunction createLocation(current, to, state, key) {\n if (state === void 0) {\n state = null;\n }\n let location = _extends({\n pathname: typeof current === "string" ? current : current.pathname,\n search: "",\n hash: ""\n }, typeof to === "string" ? parsePath(to) : to, {\n state,\n // TODO: This could be cleaned up. push/replace should probably just take\n // full Locations now and avoid the need to run through this flow at all\n // But that\'s a pretty big refactor to the current test suite so going to\n // keep as is for the time being and just let any incoming keys take precedence\n key: to && to.key || key || createKey()\n });\n return location;\n}\n/**\n * Creates a string URL path from the given pathname, search, and hash components.\n */\nfunction createPath(_ref) {\n let {\n pathname = "/",\n search = "",\n hash = ""\n } = _ref;\n if (search && search !== "?") pathname += search.charAt(0) === "?" ? search : "?" + search;\n if (hash && hash !== "#") pathname += hash.charAt(0) === "#" ? hash : "#" + hash;\n return pathname;\n}\n/**\n * Parses a string URL path into its separate pathname, search, and hash components.\n */\nfunction parsePath(path) {\n let parsedPath = {};\n if (path) {\n let hashIndex = path.indexOf("#");\n if (hashIndex >= 0) {\n parsedPath.hash = path.substr(hashIndex);\n path = path.substr(0, hashIndex);\n }\n let searchIndex = path.indexOf("?");\n if (searchIndex >= 0) {\n parsedPath.search = path.substr(searchIndex);\n path = path.substr(0, searchIndex);\n }\n if (path) {\n parsedPath.pathname = path;\n }\n }\n return parsedPath;\n}\nfunction getUrlBasedHistory(getLocation, createHref, validateLocation, options) {\n if (options === void 0) {\n options = {};\n }\n let {\n window = document.defaultView,\n v5Compat = false\n } = options;\n let globalHistory = window.history;\n let action = Action.Pop;\n let listener = null;\n let index = getIndex();\n // Index should only be null when we initialize. If not, it\'s because the\n // user called history.pushState or history.replaceState directly, in which\n // case we should log a warning as it will result in bugs.\n if (index == null) {\n index = 0;\n globalHistory.replaceState(_extends({}, globalHistory.state, {\n idx: index\n }), "");\n }\n function getIndex() {\n let state = globalHistory.state || {\n idx: null\n };\n return state.idx;\n }\n function handlePop() {\n action = Action.Pop;\n let nextIndex = getIndex();\n let delta = nextIndex == null ? null : nextIndex - index;\n index = nextIndex;\n if (listener) {\n listener({\n action,\n location: history.location,\n delta\n });\n }\n }\n function push(to, state) {\n action = Action.Push;\n let location = createLocation(history.location, to, state);\n if (validateLocation) validateLocation(location, to);\n index = getIndex() + 1;\n let historyState = getHistoryState(location, index);\n let url = history.createHref(location);\n // try...catch because iOS limits us to 100 pushState calls :/\n try {\n globalHistory.pushState(historyState, "", url);\n } catch (error) {\n // If the exception is because `state` can\'t be serialized, let that throw\n // outwards just like a replace call would so the dev knows the cause\n // https://html.spec.whatwg.org/multipage/nav-history-apis.html#shared-history-push/replace-state-steps\n // https://html.spec.whatwg.org/multipage/structured-data.html#structuredserializeinternal\n if (error instanceof DOMException && error.name === "DataCloneError") {\n throw error;\n }\n // They are going to lose state here, but there is no real\n // way to warn them about it since the page will refresh...\n window.location.assign(url);\n }\n if (v5Compat && listener) {\n listener({\n action,\n location: history.location,\n delta: 1\n });\n }\n }\n function replace(to, state) {\n action = Action.Replace;\n let location = createLocation(history.location, to, state);\n if (validateLocation) validateLocation(location, to);\n index = getIndex();\n let historyState = getHistoryState(location, index);\n let url = history.createHref(location);\n globalHistory.replaceState(historyState, "", url);\n if (v5Compat && listener) {\n listener({\n action,\n location: history.location,\n delta: 0\n });\n }\n }\n function createURL(to) {\n // window.location.origin is "null" (the literal string value) in Firefox\n // under certain conditions, notably when serving from a local HTML file\n // See https://bugzilla.mozilla.org/show_bug.cgi?id=878297\n let base = window.location.origin !== "null" ? window.location.origin : window.location.href;\n let href = typeof to === "string" ? to : createPath(to);\n // Treating this as a full URL will strip any trailing spaces so we need to\n // pre-encode them since they might be part of a matching splat param from\n // an ancestor route\n href = href.replace(/ $/, "%20");\n invariant(base, "No window.location.(origin|href) available to create URL for href: " + href);\n return new URL(href, base);\n }\n let history = {\n get action() {\n return action;\n },\n get location() {\n return getLocation(window, globalHistory);\n },\n listen(fn) {\n if (listener) {\n throw new Error("A history only accepts one active listener");\n }\n window.addEventListener(PopStateEventType, handlePop);\n listener = fn;\n return () => {\n window.removeEventListener(PopStateEventType, handlePop);\n listener = null;\n };\n },\n createHref(to) {\n return createHref(window, to);\n },\n createURL,\n encodeLocation(to) {\n // Encode a Location the same way window.location would\n let url = createURL(to);\n return {\n pathname: url.pathname,\n search: url.search,\n hash: url.hash\n };\n },\n push,\n replace,\n go(n) {\n return globalHistory.go(n);\n }\n };\n return history;\n}\n//#endregion\n\nvar ResultType;\n(function (ResultType) {\n ResultType["data"] = "data";\n ResultType["deferred"] = "deferred";\n ResultType["redirect"] = "redirect";\n ResultType["error"] = "error";\n})(ResultType || (ResultType = {}));\nconst immutableRouteKeys = new Set(["lazy", "caseSensitive", "path", "id", "index", "children"]);\nfunction isIndexRoute(route) {\n return route.index === true;\n}\n// Walk the route tree generating unique IDs where necessary, so we are working\n// solely with AgnosticDataRouteObject\'s within the Router\nfunction convertRoutesToDataRoutes(routes, mapRouteProperties, parentPath, manifest) {\n if (parentPath === void 0) {\n parentPath = [];\n }\n if (manifest === void 0) {\n manifest = {};\n }\n return routes.map((route, index) => {\n let treePath = [...parentPath, String(index)];\n let id = typeof route.id === "string" ? route.id : treePath.join("-");\n invariant(route.index !== true || !route.children, "Cannot specify children on an index route");\n invariant(!manifest[id], "Found a route id collision on id \\"" + id + "\\". Route " + "id\'s must be globally unique within Data Router usages");\n if (isIndexRoute(route)) {\n let indexRoute = _extends({}, route, mapRouteProperties(route), {\n id\n });\n manifest[id] = indexRoute;\n return indexRoute;\n } else {\n let pathOrLayoutRoute = _extends({}, route, mapRouteProperties(route), {\n id,\n children: undefined\n });\n manifest[id] = pathOrLayoutRoute;\n if (route.children) {\n pathOrLayoutRoute.children = convertRoutesToDataRoutes(route.children, mapRouteProperties, treePath, manifest);\n }\n return pathOrLayoutRoute;\n }\n });\n}\n/**\n * Matches the given routes to a location and returns the match data.\n *\n * @see https://reactrouter.com/utils/match-routes\n */\nfunction matchRoutes(routes, locationArg, basename) {\n if (basename === void 0) {\n basename = "/";\n }\n return matchRoutesImpl(routes, locationArg, basename, false);\n}\nfunction matchRoutesImpl(routes, locationArg, basename, allowPartial) {\n let location = typeof locationArg === "string" ? parsePath(locationArg) : locationArg;\n let pathname = stripBasename(location.pathname || "/", basename);\n if (pathname == null) {\n return null;\n }\n let branches = flattenRoutes(routes);\n rankRouteBranches(branches);\n let matches = null;\n for (let i = 0; matches == null && i < branches.length; ++i) {\n // Incoming pathnames are generally encoded from either window.location\n // or from router.navigate, but we want to match against the unencoded\n // paths in the route definitions. Memory router locations won\'t be\n // encoded here but there also shouldn\'t be anything to decode so this\n // should be a safe operation. This avoids needing matchRoutes to be\n // history-aware.\n let decoded = decodePath(pathname);\n matches = matchRouteBranch(branches[i], decoded, allowPartial);\n }\n return matches;\n}\nfunction convertRouteMatchToUiMatch(match, loaderData) {\n let {\n route,\n pathname,\n params\n } = match;\n return {\n id: route.id,\n pathname,\n params,\n data: loaderData[route.id],\n handle: route.handle\n };\n}\nfunction flattenRoutes(routes, branches, parentsMeta, parentPath) {\n if (branches === void 0) {\n branches = [];\n }\n if (parentsMeta === void 0) {\n parentsMeta = [];\n }\n if (parentPath === void 0) {\n parentPath = "";\n }\n let flattenRoute = (route, index, relativePath) => {\n let meta = {\n relativePath: relativePath === undefined ? route.path || "" : relativePath,\n caseSensitive: route.caseSensitive === true,\n childrenIndex: index,\n route\n };\n if (meta.relativePath.startsWith("/")) {\n invariant(meta.relativePath.startsWith(parentPath), "Absolute route path \\"" + meta.relativePath + "\\" nested under path " + ("\\"" + parentPath + "\\" is not valid. An absolute child route path ") + "must start with the combined path of all its parent routes.");\n meta.relativePath = meta.relativePath.slice(parentPath.length);\n }\n let path = joinPaths([parentPath, meta.relativePath]);\n let routesMeta = parentsMeta.concat(meta);\n // Add the children before adding this route to the array, so we traverse the\n // route tree depth-first and child routes appear before their parents in\n // the "flattened" version.\n if (route.children && route.children.length > 0) {\n invariant(\n // Our types know better, but runtime JS may not!\n // @ts-expect-error\n route.index !== true, "Index routes must not have child routes. Please remove " + ("all child routes from route path \\"" + path + "\\"."));\n flattenRoutes(route.children, branches, routesMeta, path);\n }\n // Routes without a path shouldn\'t ever match by themselves unless they are\n // index routes, so don\'t add them to the list of possible branches.\n if (route.path == null && !route.index) {\n return;\n }\n branches.push({\n path,\n score: computeScore(path, route.index),\n routesMeta\n });\n };\n routes.forEach((route, index) => {\n var _route$path;\n // coarse-grain check for optional params\n if (route.path === "" || !((_route$path = route.path) != null && _route$path.includes("?"))) {\n flattenRoute(route, index);\n } else {\n for (let exploded of explodeOptionalSegments(route.path)) {\n flattenRoute(route, index, exploded);\n }\n }\n });\n return branches;\n}\n/**\n * Computes all combinations of optional path segments for a given path,\n * excluding combinations that are ambiguous and of lower priority.\n *\n * For example, `/one/:two?/three/:four?/:five?` explodes to:\n * - `/one/three`\n * - `/one/:two/three`\n * - `/one/three/:four`\n * - `/one/three/:five`\n * - `/one/:two/three/:four`\n * - `/one/:two/three/:five`\n * - `/one/three/:four/:five`\n * - `/one/:two/three/:four/:five`\n */\nfunction explodeOptionalSegments(path) {\n let segments = path.split("/");\n if (segments.length === 0) return [];\n let [first, ...rest] = segments;\n // Optional path segments are denoted by a trailing `?`\n let isOptional = first.endsWith("?");\n // Compute the corresponding required segment: `foo?` -> `foo`\n let required = first.replace(/\\?$/, "");\n if (rest.length === 0) {\n // Intepret empty string as omitting an optional segment\n // `["one", "", "three"]` corresponds to omitting `:two` from `/one/:two?/three` -> `/one/three`\n return isOptional ? [required, ""] : [required];\n }\n let restExploded = explodeOptionalSegments(rest.join("/"));\n let result = [];\n // All child paths with the prefix. Do this for all children before the\n // optional version for all children, so we get consistent ordering where the\n // parent optional aspect is preferred as required. Otherwise, we can get\n // child sections interspersed where deeper optional segments are higher than\n // parent optional segments, where for example, /:two would explode _earlier_\n // then /:one. By always including the parent as required _for all children_\n // first, we avoid this issue\n result.push(...restExploded.map(subpath => subpath === "" ? required : [required, subpath].join("/")));\n // Then, if this is an optional value, add all child versions without\n if (isOptional) {\n result.push(...restExploded);\n }\n // for absolute paths, ensure `/` instead of empty segment\n return result.map(exploded => path.startsWith("/") && exploded === "" ? "/" : exploded);\n}\nfunction rankRouteBranches(branches) {\n branches.sort((a, b) => a.score !== b.score ? b.score - a.score // Higher score first\n : compareIndexes(a.routesMeta.map(meta => meta.childrenIndex), b.routesMeta.map(meta => meta.childrenIndex)));\n}\nconst paramRe = /^:[\\w-]+$/;\nconst dynamicSegmentValue = 3;\nconst indexRouteValue = 2;\nconst emptySegmentValue = 1;\nconst staticSegmentValue = 10;\nconst splatPenalty = -2;\nconst isSplat = s => s === "*";\nfunction computeScore(path, index) {\n let segments = path.split("/");\n let initialScore = segments.length;\n if (segments.some(isSplat)) {\n initialScore += splatPenalty;\n }\n if (index) {\n initialScore += indexRouteValue;\n }\n return segments.filter(s => !isSplat(s)).reduce((score, segment) => score + (paramRe.test(segment) ? dynamicSegmentValue : segment === "" ? emptySegmentValue : staticSegmentValue), initialScore);\n}\nfunction compareIndexes(a, b) {\n let siblings = a.length === b.length && a.slice(0, -1).every((n, i) => n === b[i]);\n return siblings ?\n // If two routes are siblings, we should try to match the earlier sibling\n // first. This allows people to have fine-grained control over the matching\n // behavior by simply putting routes with identical paths in the order they\n // want them tried.\n a[a.length - 1] - b[b.length - 1] :\n // Otherwise, it doesn\'t really make sense to rank non-siblings by index,\n // so they sort equally.\n 0;\n}\nfunction matchRouteBranch(branch, pathname, allowPartial) {\n if (allowPartial === void 0) {\n allowPartial = false;\n }\n let {\n routesMeta\n } = branch;\n let matchedParams = {};\n let matchedPathname = "/";\n let matches = [];\n for (let i = 0; i < routesMeta.length; ++i) {\n let meta = routesMeta[i];\n let end = i === routesMeta.length - 1;\n let remainingPathname = matchedPathname === "/" ? pathname : pathname.slice(matchedPathname.length) || "/";\n let match = matchPath({\n path: meta.relativePath,\n caseSensitive: meta.caseSensitive,\n end\n }, remainingPathname);\n let route = meta.route;\n if (!match && end && allowPartial && !routesMeta[routesMeta.length - 1].route.index) {\n match = matchPath({\n path: meta.relativePath,\n caseSensitive: meta.caseSensitive,\n end: false\n }, remainingPathname);\n }\n if (!match) {\n return null;\n }\n Object.assign(matchedParams, match.params);\n matches.push({\n // TODO: Can this as be avoided?\n params: matchedParams,\n pathname: joinPaths([matchedPathname, match.pathname]),\n pathnameBase: normalizePathname(joinPaths([matchedPathname, match.pathnameBase])),\n route\n });\n if (match.pathnameBase !== "/") {\n matchedPathname = joinPaths([matchedPathname, match.pathnameBase]);\n }\n }\n return matches;\n}\n/**\n * Returns a path with params interpolated.\n *\n * @see https://reactrouter.com/utils/generate-path\n */\nfunction generatePath(originalPath, params) {\n if (params === void 0) {\n params = {};\n }\n let path = originalPath;\n if (path.endsWith("*") && path !== "*" && !path.endsWith("/*")) {\n warning(false, "Route path \\"" + path + "\\" will be treated as if it were " + ("\\"" + path.replace(/\\*$/, "/*") + "\\" because the `*` character must ") + "always follow a `/` in the pattern. To get rid of this warning, " + ("please change the route path to \\"" + path.replace(/\\*$/, "/*") + "\\"."));\n path = path.replace(/\\*$/, "/*");\n }\n // ensure `/` is added at the beginning if the path is absolute\n const prefix = path.startsWith("/") ? "/" : "";\n const stringify = p => p == null ? "" : typeof p === "string" ? p : String(p);\n const segments = path.split(/\\/+/).map((segment, index, array) => {\n const isLastSegment = index === array.length - 1;\n // only apply the splat if it\'s the last segment\n if (isLastSegment && segment === "*") {\n const star = "*";\n // Apply the splat\n return stringify(params[star]);\n }\n const keyMatch = segment.match(/^:([\\w-]+)(\\??)$/);\n if (keyMatch) {\n const [, key, optional] = keyMatch;\n let param = params[key];\n invariant(optional === "?" || param != null, "Missing \\":" + key + "\\" param");\n return stringify(param);\n }\n // Remove any optional markers from optional static segments\n return segment.replace(/\\?$/g, "");\n })\n // Remove empty segments\n .filter(segment => !!segment);\n return prefix + segments.join("/");\n}\n/**\n * Performs pattern matching on a URL pathname and returns information about\n * the match.\n *\n * @see https://reactrouter.com/utils/match-path\n */\nfunction matchPath(pattern, pathname) {\n if (typeof pattern === "string") {\n pattern = {\n path: pattern,\n caseSensitive: false,\n end: true\n };\n }\n let [matcher, compiledParams] = compilePath(pattern.path, pattern.caseSensitive, pattern.end);\n let match = pathname.match(matcher);\n if (!match) return null;\n let matchedPathname = match[0];\n let pathnameBase = matchedPathname.replace(/(.)\\/+$/, "$1");\n let captureGroups = match.slice(1);\n let params = compiledParams.reduce((memo, _ref, index) => {\n let {\n paramName,\n isOptional\n } = _ref;\n // We need to compute the pathnameBase here using the raw splat value\n // instead of using params["*"] later because it will be decoded then\n if (paramName === "*") {\n let splatValue = captureGroups[index] || "";\n pathnameBase = matchedPathname.slice(0, matchedPathname.length - splatValue.length).replace(/(.)\\/+$/, "$1");\n }\n const value = captureGroups[index];\n if (isOptional && !value) {\n memo[paramName] = undefined;\n } else {\n memo[paramName] = (value || "").replace(/%2F/g, "/");\n }\n return memo;\n }, {});\n return {\n params,\n pathname: matchedPathname,\n pathnameBase,\n pattern\n };\n}\nfunction compilePath(path, caseSensitive, end) {\n if (caseSensitive === void 0) {\n caseSensitive = false;\n }\n if (end === void 0) {\n end = true;\n }\n warning(path === "*" || !path.endsWith("*") || path.endsWith("/*"), "Route path \\"" + path + "\\" will be treated as if it were " + ("\\"" + path.replace(/\\*$/, "/*") + "\\" because the `*` character must ") + "always follow a `/` in the pattern. To get rid of this warning, " + ("please change the route path to \\"" + path.replace(/\\*$/, "/*") + "\\"."));\n let params = [];\n let regexpSource = "^" + path.replace(/\\/*\\*?$/, "") // Ignore trailing / and /*, we\'ll handle it below\n .replace(/^\\/*/, "/") // Make sure it has a leading /\n .replace(/[\\\\.*+^${}|()[\\]]/g, "\\\\$&") // Escape special regex chars\n .replace(/\\/:([\\w-]+)(\\?)?/g, (_, paramName, isOptional) => {\n params.push({\n paramName,\n isOptional: isOptional != null\n });\n return isOptional ? "/?([^\\\\/]+)?" : "/([^\\\\/]+)";\n });\n if (path.endsWith("*")) {\n params.push({\n paramName: "*"\n });\n regexpSource += path === "*" || path === "/*" ? "(.*)$" // Already matched the initial /, just match the rest\n : "(?:\\\\/(.+)|\\\\/*)$"; // Don\'t include the / in params["*"]\n } else if (end) {\n // When matching to the end, ignore trailing slashes\n regexpSource += "\\\\/*$";\n } else if (path !== "" && path !== "/") {\n // If our path is non-empty and contains anything beyond an initial slash,\n // then we have _some_ form of path in our regex, so we should expect to\n // match only if we find the end of this path segment. Look for an optional\n // non-captured trailing slash (to match a portion of the URL) or the end\n // of the path (if we\'ve matched to the end). We used to do this with a\n // word boundary but that gives false positives on routes like\n // /user-preferences since `-` counts as a word boundary.\n regexpSource += "(?:(?=\\\\/|$))";\n } else ;\n let matcher = new RegExp(regexpSource, caseSensitive ? undefined : "i");\n return [matcher, params];\n}\nfunction decodePath(value) {\n try {\n return value.split("/").map(v => decodeURIComponent(v).replace(/\\//g, "%2F")).join("/");\n } catch (error) {\n warning(false, "The URL path \\"" + value + "\\" could not be decoded because it is is a " + "malformed URL segment. This is probably due to a bad percent " + ("encoding (" + error + ")."));\n return value;\n }\n}\n/**\n * @private\n */\nfunction stripBasename(pathname, basename) {\n if (basename === "/") return pathname;\n if (!pathname.toLowerCase().startsWith(basename.toLowerCase())) {\n return null;\n }\n // We want to leave trailing slash behavior in the user\'s control, so if they\n // specify a basename with a trailing slash, we should support it\n let startIndex = basename.endsWith("/") ? basename.length - 1 : basename.length;\n let nextChar = pathname.charAt(startIndex);\n if (nextChar && nextChar !== "/") {\n // pathname does not start with basename/\n return null;\n }\n return pathname.slice(startIndex) || "/";\n}\n/**\n * Returns a resolved path object relative to the given pathname.\n *\n * @see https://reactrouter.com/utils/resolve-path\n */\nfunction resolvePath(to, fromPathname) {\n if (fromPathname === void 0) {\n fromPathname = "/";\n }\n let {\n pathname: toPathname,\n search = "",\n hash = ""\n } = typeof to === "string" ? parsePath(to) : to;\n let pathname = toPathname ? toPathname.startsWith("/") ? toPathname : resolvePathname(toPathname, fromPathname) : fromPathname;\n return {\n pathname,\n search: normalizeSearch(search),\n hash: normalizeHash(hash)\n };\n}\nfunction resolvePathname(relativePath, fromPathname) {\n let segments = fromPathname.replace(/\\/+$/, "").split("/");\n let relativeSegments = relativePath.split("/");\n relativeSegments.forEach(segment => {\n if (segment === "..") {\n // Keep the root "" segment so the pathname starts at /\n if (segments.length > 1) segments.pop();\n } else if (segment !== ".") {\n segments.push(segment);\n }\n });\n return segments.length > 1 ? segments.join("/") : "/";\n}\nfunction getInvalidPathError(char, field, dest, path) {\n return "Cannot include a \'" + char + "\' character in a manually specified " + ("`to." + field + "` field [" + JSON.stringify(path) + "]. Please separate it out to the ") + ("`to." + dest + "` field. Alternatively you may provide the full path as ") + "a string in <Link to=\\"...\\"> and the router will parse it for you.";\n}\n/**\n * @private\n *\n * When processing relative navigation we want to ignore ancestor routes that\n * do not contribute to the path, such that index/pathless layout routes don\'t\n * interfere.\n *\n * For example, when moving a route element into an index route and/or a\n * pathless layout route, relative link behavior contained within should stay\n * the same. Both of the following examples should link back to the root:\n *\n * <Route path="/">\n * <Route path="accounts" element={<Link to=".."}>\n * </Route>\n *\n * <Route path="/">\n * <Route path="accounts">\n * <Route element={<AccountsLayout />}> // <-- Does not contribute\n * <Route index element={<Link to=".."} /> // <-- Does not contribute\n * </Route\n * </Route>\n * </Route>\n */\nfunction getPathContributingMatches(matches) {\n return matches.filter((match, index) => index === 0 || match.route.path && match.route.path.length > 0);\n}\n// Return the array of pathnames for the current route matches - used to\n// generate the routePathnames input for resolveTo()\nfunction getResolveToMatches(matches, v7_relativeSplatPath) {\n let pathMatches = getPathContributingMatches(matches);\n // When v7_relativeSplatPath is enabled, use the full pathname for the leaf\n // match so we include splat values for "." links. See:\n // https://github.com/remix-run/react-router/issues/11052#issuecomment-1836589329\n if (v7_relativeSplatPath) {\n return pathMatches.map((match, idx) => idx === pathMatches.length - 1 ? match.pathname : match.pathnameBase);\n }\n return pathMatches.map(match => match.pathnameBase);\n}\n/**\n * @private\n */\nfunction resolveTo(toArg, routePathnames, locationPathname, isPathRelative) {\n if (isPathRelative === void 0) {\n isPathRelative = false;\n }\n let to;\n if (typeof toArg === "string") {\n to = parsePath(toArg);\n } else {\n to = _extends({}, toArg);\n invariant(!to.pathname || !to.pathname.includes("?"), getInvalidPathError("?", "pathname", "search", to));\n invariant(!to.pathname || !to.pathname.includes("#"), getInvalidPathError("#", "pathname", "hash", to));\n invariant(!to.search || !to.search.includes("#"), getInvalidPathError("#", "search", "hash", to));\n }\n let isEmptyPath = toArg === "" || to.pathname === "";\n let toPathname = isEmptyPath ? "/" : to.pathname;\n let from;\n // Routing is relative to the current pathname if explicitly requested.\n //\n // If a pathname is explicitly provided in `to`, it should be relative to the\n // route context. This is explained in `Note on `<Link to>` values` in our\n // migration guide from v5 as a means of disambiguation between `to` values\n // that begin with `/` and those that do not. However, this is problematic for\n // `to` values that do not provide a pathname. `to` can simply be a search or\n // hash string, in which case we should assume that the navigation is relative\n // to the current location\'s pathname and *not* the route pathname.\n if (toPathname == null) {\n from = locationPathname;\n } else {\n let routePathnameIndex = routePathnames.length - 1;\n // With relative="route" (the default), each leading .. segment means\n // "go up one route" instead of "go up one URL segment". This is a key\n // difference from how <a href> works and a major reason we call this a\n // "to" value instead of a "href".\n if (!isPathRelative && toPathname.startsWith("..")) {\n let toSegments = toPathname.split("/");\n while (toSegments[0] === "..") {\n toSegments.shift();\n routePathnameIndex -= 1;\n }\n to.pathname = toSegments.join("/");\n }\n from = routePathnameIndex >= 0 ? routePathnames[routePathnameIndex] : "/";\n }\n let path = resolvePath(to, from);\n // Ensure the pathname has a trailing slash if the original "to" had one\n let hasExplicitTrailingSlash = toPathname && toPathname !== "/" && toPathname.endsWith("/");\n // Or if this was a link to the current path which has a trailing slash\n let hasCurrentTrailingSlash = (isEmptyPath || toPathname === ".") && locationPathname.endsWith("/");\n if (!path.pathname.endsWith("/") && (hasExplicitTrailingSlash || hasCurrentTrailingSlash)) {\n path.pathname += "/";\n }\n return path;\n}\n/**\n * @private\n */\nfunction getToPathname(to) {\n // Empty strings should be treated the same as / paths\n return to === "" || to.pathname === "" ? "/" : typeof to === "string" ? parsePath(to).pathname : to.pathname;\n}\n/**\n * @private\n */\nconst joinPaths = paths => paths.join("/").replace(/\\/\\/+/g, "/");\n/**\n * @private\n */\nconst normalizePathname = pathname => pathname.replace(/\\/+$/, "").replace(/^\\/*/, "/");\n/**\n * @private\n */\nconst normalizeSearch = search => !search || search === "?" ? "" : search.startsWith("?") ? search : "?" + search;\n/**\n * @private\n */\nconst normalizeHash = hash => !hash || hash === "#" ? "" : hash.startsWith("#") ? hash : "#" + hash;\n/**\n * This is a shortcut for creating `application/json` responses. Converts `data`\n * to JSON and sets the `Content-Type` header.\n */\nconst json = function json(data, init) {\n if (init === void 0) {\n init = {};\n }\n let responseInit = typeof init === "number" ? {\n status: init\n } : init;\n let headers = new Headers(responseInit.headers);\n if (!headers.has("Content-Type")) {\n headers.set("Content-Type", "application/json; charset=utf-8");\n }\n return new Response(JSON.stringify(data), _extends({}, responseInit, {\n headers\n }));\n};\nclass AbortedDeferredError extends Error {}\nclass DeferredData {\n constructor(data, responseInit) {\n this.pendingKeysSet = new Set();\n this.subscribers = new Set();\n this.deferredKeys = [];\n invariant(data && typeof data === "object" && !Array.isArray(data), "defer() only accepts plain objects");\n // Set up an AbortController + Promise we can race against to exit early\n // cancellation\n let reject;\n this.abortPromise = new Promise((_, r) => reject = r);\n this.controller = new AbortController();\n let onAbort = () => reject(new AbortedDeferredError("Deferred data aborted"));\n this.unlistenAbortSignal = () => this.controller.signal.removeEventListener("abort", onAbort);\n this.controller.signal.addEventListener("abort", onAbort);\n this.data = Object.entries(data).reduce((acc, _ref2) => {\n let [key, value] = _ref2;\n return Object.assign(acc, {\n [key]: this.trackPromise(key, value)\n });\n }, {});\n if (this.done) {\n // All incoming values were resolved\n this.unlistenAbortSignal();\n }\n this.init = responseInit;\n }\n trackPromise(key, value) {\n if (!(value instanceof Promise)) {\n return value;\n }\n this.deferredKeys.push(key);\n this.pendingKeysSet.add(key);\n // We store a little wrapper promise that will be extended with\n // _data/_error props upon resolve/reject\n let promise = Promise.race([value, this.abortPromise]).then(data => this.onSettle(promise, key, undefined, data), error => this.onSettle(promise, key, error));\n // Register rejection listeners to avoid uncaught promise rejections on\n // errors or aborted deferred values\n promise.catch(() => {});\n Object.defineProperty(promise, "_tracked", {\n get: () => true\n });\n return promise;\n }\n onSettle(promise, key, error, data) {\n if (this.controller.signal.aborted && error instanceof AbortedDeferredError) {\n this.unlistenAbortSignal();\n Object.defineProperty(promise, "_error", {\n get: () => error\n });\n return Promise.reject(error);\n }\n this.pendingKeysSet.delete(key);\n if (this.done) {\n // Nothing left to abort!\n this.unlistenAbortSignal();\n }\n // If the promise was resolved/rejected with undefined, we\'ll throw an error as you\n // should always resolve with a value or null\n if (error === undefined && data === undefined) {\n let undefinedError = new Error("Deferred data for key \\"" + key + "\\" resolved/rejected with `undefined`, " + "you must resolve/reject with a value or `null`.");\n Object.defineProperty(promise, "_error", {\n get: () => undefinedError\n });\n this.emit(false, key);\n return Promise.reject(undefinedError);\n }\n if (data === undefined) {\n Object.defineProperty(promise, "_error", {\n get: () => error\n });\n this.emit(false, key);\n return Promise.reject(error);\n }\n Object.defineProperty(promise, "_data", {\n get: () => data\n });\n this.emit(false, key);\n return data;\n }\n emit(aborted, settledKey) {\n this.subscribers.forEach(subscriber => subscriber(aborted, settledKey));\n }\n subscribe(fn) {\n this.subscribers.add(fn);\n return () => this.subscribers.delete(fn);\n }\n cancel() {\n this.controller.abort();\n this.pendingKeysSet.forEach((v, k) => this.pendingKeysSet.delete(k));\n this.emit(true);\n }\n async resolveData(signal) {\n let aborted = false;\n if (!this.done) {\n let onAbort = () => this.cancel();\n signal.addEventListener("abort", onAbort);\n aborted = await new Promise(resolve => {\n this.subscribe(aborted => {\n signal.removeEventListener("abort", onAbort);\n if (aborted || this.done) {\n resolve(aborted);\n }\n });\n });\n }\n return aborted;\n }\n get done() {\n return this.pendingKeysSet.size === 0;\n }\n get unwrappedData() {\n invariant(this.data !== null && this.done, "Can only unwrap data on initialized and settled deferreds");\n return Object.entries(this.data).reduce((acc, _ref3) => {\n let [key, value] = _ref3;\n return Object.assign(acc, {\n [key]: unwrapTrackedPromise(value)\n });\n }, {});\n }\n get pendingKeys() {\n return Array.from(this.pendingKeysSet);\n }\n}\nfunction isTrackedPromise(value) {\n return value instanceof Promise && value._tracked === true;\n}\nfunction unwrapTrackedPromise(value) {\n if (!isTrackedPromise(value)) {\n return value;\n }\n if (value._error) {\n throw value._error;\n }\n return value._data;\n}\nconst defer = function defer(data, init) {\n if (init === void 0) {\n init = {};\n }\n let responseInit = typeof init === "number" ? {\n status: init\n } : init;\n return new DeferredData(data, responseInit);\n};\n/**\n * A redirect response. Sets the status code and the `Location` header.\n * Defaults to "302 Found".\n */\nconst redirect = function redirect(url, init) {\n if (init === void 0) {\n init = 302;\n }\n let responseInit = init;\n if (typeof responseInit === "number") {\n responseInit = {\n status: responseInit\n };\n } else if (typeof responseInit.status === "undefined") {\n responseInit.status = 302;\n }\n let headers = new Headers(responseInit.headers);\n headers.set("Location", url);\n return new Response(null, _extends({}, responseInit, {\n headers\n }));\n};\n/**\n * A redirect response that will force a document reload to the new location.\n * Sets the status code and the `Location` header.\n * Defaults to "302 Found".\n */\nconst redirectDocument = (url, init) => {\n let response = redirect(url, init);\n response.headers.set("X-Remix-Reload-Document", "true");\n return response;\n};\n/**\n * @private\n * Utility class we use to hold auto-unwrapped 4xx/5xx Response bodies\n *\n * We don\'t export the class for public use since it\'s an implementation\n * detail, but we export the interface above so folks can build their own\n * abstractions around instances via isRouteErrorResponse()\n */\nclass ErrorResponseImpl {\n constructor(status, statusText, data, internal) {\n if (internal === void 0) {\n internal = false;\n }\n this.status = status;\n this.statusText = statusText || "";\n this.internal = internal;\n if (data instanceof Error) {\n this.data = data.toString();\n this.error = data;\n } else {\n this.data = data;\n }\n }\n}\n/**\n * Check if the given error is an ErrorResponse generated from a 4xx/5xx\n * Response thrown from an action/loader\n */\nfunction isRouteErrorResponse(error) {\n return error != null && typeof error.status === "number" && typeof error.statusText === "string" && typeof error.internal === "boolean" && "data" in error;\n}\n\nconst validMutationMethodsArr = ["post", "put", "patch", "delete"];\nconst validMutationMethods = new Set(validMutationMethodsArr);\nconst validRequestMethodsArr = ["get", ...validMutationMethodsArr];\nconst validRequestMethods = new Set(validRequestMethodsArr);\nconst redirectStatusCodes = new Set([301, 302, 303, 307, 308]);\nconst redirectPreserveMethodStatusCodes = new Set([307, 308]);\nconst IDLE_NAVIGATION = {\n state: "idle",\n location: undefined,\n formMethod: undefined,\n formAction: undefined,\n formEncType: undefined,\n formData: undefined,\n json: undefined,\n text: undefined\n};\nconst IDLE_FETCHER = {\n state: "idle",\n data: undefined,\n formMethod: undefined,\n formAction: undefined,\n formEncType: undefined,\n formData: undefined,\n json: undefined,\n text: undefined\n};\nconst IDLE_BLOCKER = {\n state: "unblocked",\n proceed: undefined,\n reset: undefined,\n location: undefined\n};\nconst ABSOLUTE_URL_REGEX = /^(?:[a-z][a-z0-9+.-]*:|\\/\\/)/i;\nconst defaultMapRouteProperties = route => ({\n hasErrorBoundary: Boolean(route.hasErrorBoundary)\n});\nconst TRANSITIONS_STORAGE_KEY = "remix-router-transitions";\n//#endregion\n////////////////////////////////////////////////////////////////////////////////\n//#region createRouter\n////////////////////////////////////////////////////////////////////////////////\n/**\n * Create a router and listen to history POP navigations\n */\nfunction createRouter(init) {\n const routerWindow = init.window ? init.window : typeof window !== "undefined" ? window : undefined;\n const isBrowser = typeof routerWindow !== "undefined" && typeof routerWindow.document !== "undefined" && typeof routerWindow.document.createElement !== "undefined";\n const isServer = !isBrowser;\n invariant(init.routes.length > 0, "You must provide a non-empty routes array to createRouter");\n let mapRouteProperties;\n if (init.mapRouteProperties) {\n mapRouteProperties = init.mapRouteProperties;\n } else if (init.detectErrorBoundary) {\n // If they are still using the deprecated version, wrap it with the new API\n let detectErrorBoundary = init.detectErrorBoundary;\n mapRouteProperties = route => ({\n hasErrorBoundary: detectErrorBoundary(route)\n });\n } else {\n mapRouteProperties = defaultMapRouteProperties;\n }\n // Routes keyed by ID\n let manifest = {};\n // Routes in tree format for matching\n let dataRoutes = convertRoutesToDataRoutes(init.routes, mapRouteProperties, undefined, manifest);\n let inFlightDataRoutes;\n let basename = init.basename || "/";\n let dataStrategyImpl = init.unstable_dataStrategy || defaultDataStrategy;\n let patchRoutesOnMissImpl = init.unstable_patchRoutesOnMiss;\n // Config driven behavior flags\n let future = _extends({\n v7_fetcherPersist: false,\n v7_normalizeFormMethod: false,\n v7_partialHydration: false,\n v7_prependBasename: false,\n v7_relativeSplatPath: false,\n unstable_skipActionErrorRevalidation: false\n }, init.future);\n // Cleanup function for history\n let unlistenHistory = null;\n // Externally-provided functions to call on all state changes\n let subscribers = new Set();\n // Externally-provided object to hold scroll restoration locations during routing\n let savedScrollPositions = null;\n // Externally-provided function to get scroll restoration keys\n let getScrollRestorationKey = null;\n // Externally-provided function to get current scroll position\n let getScrollPosition = null;\n // One-time flag to control the initial hydration scroll restoration. Because\n // we don\'t get the saved positions from <ScrollRestoration /> until _after_\n // the initial render, we need to manually trigger a separate updateState to\n // send along the restoreScrollPosition\n // Set to true if we have `hydrationData` since we assume we were SSR\'d and that\n // SSR did the initial scroll restoration.\n let initialScrollRestored = init.hydrationData != null;\n let initialMatches = matchRoutes(dataRoutes, init.history.location, basename);\n let initialErrors = null;\n if (initialMatches == null && !patchRoutesOnMissImpl) {\n // If we do not match a user-provided-route, fall back to the root\n // to allow the error boundary to take over\n let error = getInternalRouterError(404, {\n pathname: init.history.location.pathname\n });\n let {\n matches,\n route\n } = getShortCircuitMatches(dataRoutes);\n initialMatches = matches;\n initialErrors = {\n [route.id]: error\n };\n }\n // If the user provided a patchRoutesOnMiss implementation and our initial\n // match is a splat route, clear them out so we run through lazy discovery\n // on hydration in case there\'s a more accurate lazy route match\n if (initialMatches && patchRoutesOnMissImpl) {\n let fogOfWar = checkFogOfWar(initialMatches, dataRoutes, init.history.location.pathname);\n if (fogOfWar.active) {\n initialMatches = null;\n }\n }\n let initialized;\n if (!initialMatches) {\n // We need to run patchRoutesOnMiss in initialize()\n initialized = false;\n initialMatches = [];\n } else if (initialMatches.some(m => m.route.lazy)) {\n // All initialMatches need to be loaded before we\'re ready. If we have lazy\n // functions around still then we\'ll need to run them in initialize()\n initialized = false;\n } else if (!initialMatches.some(m => m.route.loader)) {\n // If we\'ve got no loaders to run, then we\'re good to go\n initialized = true;\n } else if (future.v7_partialHydration) {\n // If partial hydration is enabled, we\'re initialized so long as we were\n // provided with hydrationData for every route with a loader, and no loaders\n // were marked for explicit hydration\n let loaderData = init.hydrationData ? init.hydrationData.loaderData : null;\n let errors = init.hydrationData ? init.hydrationData.errors : null;\n let isRouteInitialized = m => {\n // No loader, nothing to initialize\n if (!m.route.loader) {\n return true;\n }\n // Explicitly opting-in to running on hydration\n if (typeof m.route.loader === "function" && m.route.loader.hydrate === true) {\n return false;\n }\n // Otherwise, initialized if hydrated with data or an error\n return loaderData && loaderData[m.route.id] !== undefined || errors && errors[m.route.id] !== undefined;\n };\n // If errors exist, don\'t consider routes below the boundary\n if (errors) {\n let idx = initialMatches.findIndex(m => errors[m.route.id] !== undefined);\n initialized = initialMatches.slice(0, idx + 1).every(isRouteInitialized);\n } else {\n initialized = initialMatches.every(isRouteInitialized);\n }\n } else {\n // Without partial hydration - we\'re initialized if we were provided any\n // hydrationData - which is expected to be complete\n initialized = init.hydrationData != null;\n }\n let router;\n let state = {\n historyAction: init.history.action,\n location: init.history.location,\n matches: initialMatches,\n initialized,\n navigation: IDLE_NAVIGATION,\n // Don\'t restore on initial updateState() if we were SSR\'d\n restoreScrollPosition: init.hydrationData != null ? false : null,\n preventScrollReset: false,\n revalidation: "idle",\n loaderData: init.hydrationData && init.hydrationData.loaderData || {},\n actionData: init.hydrationData && init.hydrationData.actionData || null,\n errors: init.hydrationData && init.hydrationData.errors || initialErrors,\n fetchers: new Map(),\n blockers: new Map()\n };\n // -- Stateful internal variables to manage navigations --\n // Current navigation in progress (to be committed in completeNavigation)\n let pendingAction = Action.Pop;\n // Should the current navigation prevent the scroll reset if scroll cannot\n // be restored?\n let pendingPreventScrollReset = false;\n // AbortController for the active navigation\n let pendingNavigationController;\n // Should the current navigation enable document.startViewTransition?\n let pendingViewTransitionEnabled = false;\n // Store applied view transitions so we can apply them on POP\n let appliedViewTransitions = new Map();\n // Cleanup function for persisting applied transitions to sessionStorage\n let removePageHideEventListener = null;\n // We use this to avoid touching history in completeNavigation if a\n // revalidation is entirely uninterrupted\n let isUninterruptedRevalidation = false;\n // Use this internal flag to force revalidation of all loaders:\n // - submissions (completed or interrupted)\n // - useRevalidator()\n // - X-Remix-Revalidate (from redirect)\n let isRevalidationRequired = false;\n // Use this internal array to capture routes that require revalidation due\n // to a cancelled deferred on action submission\n let cancelledDeferredRoutes = [];\n // Use this internal array to capture fetcher loads that were cancelled by an\n // action navigation and require revalidation\n let cancelledFetcherLoads = [];\n // AbortControllers for any in-flight fetchers\n let fetchControllers = new Map();\n // Track loads based on the order in which they started\n let incrementingLoadId = 0;\n // Track the outstanding pending navigation data load to be compared against\n // the globally incrementing load when a fetcher load lands after a completed\n // navigation\n let pendingNavigationLoadId = -1;\n // Fetchers that triggered data reloads as a result of their actions\n let fetchReloadIds = new Map();\n // Fetchers that triggered redirect navigations\n let fetchRedirectIds = new Set();\n // Most recent href/match for fetcher.load calls for fetchers\n let fetchLoadMatches = new Map();\n // Ref-count mounted fetchers so we know when it\'s ok to clean them up\n let activeFetchers = new Map();\n // Fetchers that have requested a delete when using v7_fetcherPersist,\n // they\'ll be officially removed after they return to idle\n let deletedFetchers = new Set();\n // Store DeferredData instances for active route matches. When a\n // route loader returns defer() we stick one in here. Then, when a nested\n // promise resolves we update loaderData. If a new navigation starts we\n // cancel active deferreds for eliminated routes.\n let activeDeferreds = new Map();\n // Store blocker functions in a separate Map outside of router state since\n // we don\'t need to update UI state if they change\n let blockerFunctions = new Map();\n // Map of pending patchRoutesOnMiss() promises (keyed by path/matches) so\n // that we only kick them off once for a given combo\n let pendingPatchRoutes = new Map();\n // Flag to ignore the next history update, so we can revert the URL change on\n // a POP navigation that was blocked by the user without touching router state\n let ignoreNextHistoryUpdate = false;\n // Initialize the router, all side effects should be kicked off from here.\n // Implemented as a Fluent API for ease of:\n // let router = createRouter(init).initialize();\n function initialize() {\n // If history informs us of a POP navigation, start the navigation but do not update\n // state. We\'ll update our own state once the navigation completes\n unlistenHistory = init.history.listen(_ref => {\n let {\n action: historyAction,\n location,\n delta\n } = _ref;\n // Ignore this event if it was just us resetting the URL from a\n // blocked POP navigation\n if (ignoreNextHistoryUpdate) {\n ignoreNextHistoryUpdate = false;\n return;\n }\n warning(blockerFunctions.size === 0 || delta != null, "You are trying to use a blocker on a POP navigation to a location " + "that was not created by @remix-run/router. This will fail silently in " + "production. This can happen if you are navigating outside the router " + "via `window.history.pushState`/`window.location.hash` instead of using " + "router navigation APIs. This can also happen if you are using " + "createHashRouter and the user manually changes the URL.");\n let blockerKey = shouldBlockNavigation({\n currentLocation: state.location,\n nextLocation: location,\n historyAction\n });\n if (blockerKey && delta != null) {\n // Restore the URL to match the current UI, but don\'t update router state\n ignoreNextHistoryUpdate = true;\n init.history.go(delta * -1);\n // Put the blocker into a blocked state\n updateBlocker(blockerKey, {\n state: "blocked",\n location,\n proceed() {\n updateBlocker(blockerKey, {\n state: "proceeding",\n proceed: undefined,\n reset: undefined,\n location\n });\n // Re-do the same POP navigation we just blocked\n init.history.go(delta);\n },\n reset() {\n let blockers = new Map(state.blockers);\n blockers.set(blockerKey, IDLE_BLOCKER);\n updateState({\n blockers\n });\n }\n });\n return;\n }\n return startNavigation(historyAction, location);\n });\n if (isBrowser) {\n // FIXME: This feels gross. How can we cleanup the lines between\n // scrollRestoration/appliedTransitions persistance?\n restoreAppliedTransitions(routerWindow, appliedViewTransitions);\n let _saveAppliedTransitions = () => persistAppliedTransitions(routerWindow, appliedViewTransitions);\n routerWindow.addEventListener("pagehide", _saveAppliedTransitions);\n removePageHideEventListener = () => routerWindow.removeEventListener("pagehide", _saveAppliedTransitions);\n }\n // Kick off initial data load if needed. Use Pop to avoid modifying history\n // Note we don\'t do any handling of lazy here. For SPA\'s it\'ll get handled\n // in the normal navigation flow. For SSR it\'s expected that lazy modules are\n // resolved prior to router creation since we can\'t go into a fallbackElement\n // UI for SSR\'d apps\n if (!state.initialized) {\n startNavigation(Action.Pop, state.location, {\n initialHydration: true\n });\n }\n return router;\n }\n // Clean up a router and it\'s side effects\n function dispose() {\n if (unlistenHistory) {\n unlistenHistory();\n }\n if (removePageHideEventListener) {\n removePageHideEventListener();\n }\n subscribers.clear();\n pendingNavigationController && pendingNavigationController.abort();\n state.fetchers.forEach((_, key) => deleteFetcher(key));\n state.blockers.forEach((_, key) => deleteBlocker(key));\n }\n // Subscribe to state updates for the router\n function subscribe(fn) {\n subscribers.add(fn);\n return () => subscribers.delete(fn);\n }\n // Update our state and notify the calling context of the change\n function updateState(newState, opts) {\n if (opts === void 0) {\n opts = {};\n }\n state = _extends({}, state, newState);\n // Prep fetcher cleanup so we can tell the UI which fetcher data entries\n // can be removed\n let completedFetchers = [];\n let deletedFetchersKeys = [];\n if (future.v7_fetcherPersist) {\n state.fetchers.forEach((fetcher, key) => {\n if (fetcher.state === "idle") {\n if (deletedFetchers.has(key)) {\n // Unmounted from the UI and can be totally removed\n deletedFetchersKeys.push(key);\n } else {\n // Returned to idle but still mounted in the UI, so semi-remains for\n // revalidations and such\n completedFetchers.push(key);\n }\n }\n });\n }\n // Iterate over a local copy so that if flushSync is used and we end up\n // removing and adding a new subscriber due to the useCallback dependencies,\n // we don\'t get ourselves into a loop calling the new subscriber immediately\n [...subscribers].forEach(subscriber => subscriber(state, {\n deletedFetchers: deletedFetchersKeys,\n unstable_viewTransitionOpts: opts.viewTransitionOpts,\n unstable_flushSync: opts.flushSync === true\n }));\n // Remove idle fetchers from state since we only care about in-flight fetchers.\n if (future.v7_fetcherPersist) {\n completedFetchers.forEach(key => state.fetchers.delete(key));\n deletedFetchersKeys.forEach(key => deleteFetcher(key));\n }\n }\n // Complete a navigation returning the state.navigation back to the IDLE_NAVIGATION\n // and setting state.[historyAction/location/matches] to the new route.\n // - Location is a required param\n // - Navigation will always be set to IDLE_NAVIGATION\n // - Can pass any other state in newState\n function completeNavigation(location, newState, _temp) {\n var _location$state, _location$state2;\n let {\n flushSync\n } = _temp === void 0 ? {} : _temp;\n // Deduce if we\'re in a loading/actionReload state:\n // - We have committed actionData in the store\n // - The current navigation was a mutation submission\n // - We\'re past the submitting state and into the loading state\n // - The location being loaded is not the result of a redirect\n let isActionReload = state.actionData != null && state.navigation.formMethod != null && isMutationMethod(state.navigation.formMethod) && state.navigation.state === "loading" && ((_location$state = location.state) == null ? void 0 : _location$state._isRedirect) !== true;\n let actionData;\n if (newState.actionData) {\n if (Object.keys(newState.actionData).length > 0) {\n actionData = newState.actionData;\n } else {\n // Empty actionData -> clear prior actionData due to an action error\n actionData = null;\n }\n } else if (isActionReload) {\n // Keep the current data if we\'re wrapping up the action reload\n actionData = state.actionData;\n } else {\n // Clear actionData on any other completed navigations\n actionData = null;\n }\n // Always preserve any existing loaderData from re-used routes\n let loaderData = newState.loaderData ? mergeLoaderData(state.loaderData, newState.loaderData, newState.matches || [], newState.errors) : state.loaderData;\n // On a successful navigation we can assume we got through all blockers\n // so we can start fresh\n let blockers = state.blockers;\n if (blockers.size > 0) {\n blockers = new Map(blockers);\n blockers.forEach((_, k) => blockers.set(k, IDLE_BLOCKER));\n }\n // Always respect the user flag. Otherwise don\'t reset on mutation\n // submission navigations unless they redirect\n let preventScrollReset = pendingPreventScrollReset === true || state.navigation.formMethod != null && isMutationMethod(state.navigation.formMethod) && ((_location$state2 = location.state) == null ? void 0 : _location$state2._isRedirect) !== true;\n // Commit any in-flight routes at the end of the HMR revalidation "navigation"\n if (inFlightDataRoutes) {\n dataRoutes = inFlightDataRoutes;\n inFlightDataRoutes = undefined;\n }\n if (isUninterruptedRevalidation) ; else if (pendingAction === Action.Pop) ; else if (pendingAction === Action.Push) {\n init.history.push(location, location.state);\n } else if (pendingAction === Action.Replace) {\n init.history.replace(location, location.state);\n }\n let viewTransitionOpts;\n // On POP, enable transitions if they were enabled on the original navigation\n if (pendingAction === Action.Pop) {\n // Forward takes precedence so they behave like the original navigation\n let priorPaths = appliedViewTransitions.get(state.location.pathname);\n if (priorPaths && priorPaths.has(location.pathname)) {\n viewTransitionOpts = {\n currentLocation: state.location,\n nextLocation: location\n };\n } else if (appliedViewTransitions.has(location.pathname)) {\n // If we don\'t have a previous forward nav, assume we\'re popping back to\n // the new location and enable if that location previously enabled\n viewTransitionOpts = {\n currentLocation: location,\n nextLocation: state.location\n };\n }\n } else if (pendingViewTransitionEnabled) {\n // Store the applied transition on PUSH/REPLACE\n let toPaths = appliedViewTransitions.get(state.location.pathname);\n if (toPaths) {\n toPaths.add(location.pathname);\n } else {\n toPaths = new Set([location.pathname]);\n appliedViewTransitions.set(state.location.pathname, toPaths);\n }\n viewTransitionOpts = {\n currentLocation: state.location,\n nextLocation: location\n };\n }\n updateState(_extends({}, newState, {\n actionData,\n loaderData,\n historyAction: pendingAction,\n location,\n initialized: true,\n navigation: IDLE_NAVIGATION,\n revalidation: "idle",\n restoreScrollPosition: getSavedScrollPosition(location, newState.matches || state.matches),\n preventScrollReset,\n blockers\n }), {\n viewTransitionOpts,\n flushSync: flushSync === true\n });\n // Reset stateful navigation vars\n pendingAction = Action.Pop;\n pendingPreventScrollReset = false;\n pendingViewTransitionEnabled = false;\n isUninterruptedRevalidation = false;\n isRevalidationRequired = false;\n cancelledDeferredRoutes = [];\n cancelledFetcherLoads = [];\n }\n // Trigger a navigation event, which can either be a numerical POP or a PUSH\n // replace with an optional submission\n async function navigate(to, opts) {\n if (typeof to === "number") {\n init.history.go(to);\n return;\n }\n let normalizedPath = normalizeTo(state.location, state.matches, basename, future.v7_prependBasename, to, future.v7_relativeSplatPath, opts == null ? void 0 : opts.fromRouteId, opts == null ? void 0 : opts.relative);\n let {\n path,\n submission,\n error\n } = normalizeNavigateOptions(future.v7_normalizeFormMethod, false, normalizedPath, opts);\n let currentLocation = state.location;\n let nextLocation = createLocation(state.location, path, opts && opts.state);\n // When using navigate as a PUSH/REPLACE we aren\'t reading an already-encoded\n // URL from window.location, so we need to encode it here so the behavior\n // remains the same as POP and non-data-router usages. new URL() does all\n // the same encoding we\'d get from a history.pushState/window.location read\n // without having to touch history\n nextLocation = _extends({}, nextLocation, init.history.encodeLocation(nextLocation));\n let userReplace = opts && opts.replace != null ? opts.replace : undefined;\n let historyAction = Action.Push;\n if (userReplace === true) {\n historyAction = Action.Replace;\n } else if (userReplace === false) ; else if (submission != null && isMutationMethod(submission.formMethod) && submission.formAction === state.location.pathname + state.location.search) {\n // By default on submissions to the current location we REPLACE so that\n // users don\'t have to double-click the back button to get to the prior\n // location. If the user redirects to a different location from the\n // action/loader this will be ignored and the redirect will be a PUSH\n historyAction = Action.Replace;\n }\n let preventScrollReset = opts && "preventScrollReset" in opts ? opts.preventScrollReset === true : undefined;\n let flushSync = (opts && opts.unstable_flushSync) === true;\n let blockerKey = shouldBlockNavigation({\n currentLocation,\n nextLocation,\n historyAction\n });\n if (blockerKey) {\n // Put the blocker into a blocked state\n updateBlocker(blockerKey, {\n state: "blocked",\n location: nextLocation,\n proceed() {\n updateBlocker(blockerKey, {\n state: "proceeding",\n proceed: undefined,\n reset: undefined,\n location: nextLocation\n });\n // Send the same navigation through\n navigate(to, opts);\n },\n reset() {\n let blockers = new Map(state.blockers);\n blockers.set(blockerKey, IDLE_BLOCKER);\n updateState({\n blockers\n });\n }\n });\n return;\n }\n return await startNavigation(historyAction, nextLocation, {\n submission,\n // Send through the formData serialization error if we have one so we can\n // render at the right error boundary after we match routes\n pendingError: error,\n preventScrollReset,\n replace: opts && opts.replace,\n enableViewTransition: opts && opts.unstable_viewTransition,\n flushSync\n });\n }\n // Revalidate all current loaders. If a navigation is in progress or if this\n // is interrupted by a navigation, allow this to "succeed" by calling all\n // loaders during the next loader round\n function revalidate() {\n interruptActiveLoads();\n updateState({\n revalidation: "loading"\n });\n // If we\'re currently submitting an action, we don\'t need to start a new\n // navigation, we\'ll just let the follow up loader execution call all loaders\n if (state.navigation.state === "submitting") {\n return;\n }\n // If we\'re currently in an idle state, start a new navigation for the current\n // action/location and mark it as uninterrupted, which will skip the history\n // update in completeNavigation\n if (state.navigation.state === "idle") {\n startNavigation(state.historyAction, state.location, {\n startUninterruptedRevalidation: true\n });\n return;\n }\n // Otherwise, if we\'re currently in a loading state, just start a new\n // navigation to the navigation.location but do not trigger an uninterrupted\n // revalidation so that history correctly updates once the navigation completes\n startNavigation(pendingAction || state.historyAction, state.navigation.location, {\n overrideNavigation: state.navigation\n });\n }\n // Start a navigation to the given action/location. Can optionally provide a\n // overrideNavigation which will override the normalLoad in the case of a redirect\n // navigation\n async function startNavigation(historyAction, location, opts) {\n // Abort any in-progress navigations and start a new one. Unset any ongoing\n // uninterrupted revalidations unless told otherwise, since we want this\n // new navigation to update history normally\n pendingNavigationController && pendingNavigationController.abort();\n pendingNavigationController = null;\n pendingAction = historyAction;\n isUninterruptedRevalidation = (opts && opts.startUninterruptedRevalidation) === true;\n // Save the current scroll position every time we start a new navigation,\n // and track whether we should reset scroll on completion\n saveScrollPosition(state.location, state.matches);\n pendingPreventScrollReset = (opts && opts.preventScrollReset) === true;\n pendingViewTransitionEnabled = (opts && opts.enableViewTransition) === true;\n let routesToUse = inFlightDataRoutes || dataRoutes;\n let loadingNavigation = opts && opts.overrideNavigation;\n let matches = matchRoutes(routesToUse, location, basename);\n let flushSync = (opts && opts.flushSync) === true;\n let fogOfWar = checkFogOfWar(matches, routesToUse, location.pathname);\n if (fogOfWar.active && fogOfWar.matches) {\n matches = fogOfWar.matches;\n }\n // Short circuit with a 404 on the root error boundary if we match nothing\n if (!matches) {\n let {\n error,\n notFoundMatches,\n route\n } = handleNavigational404(location.pathname);\n completeNavigation(location, {\n matches: notFoundMatches,\n loaderData: {},\n errors: {\n [route.id]: error\n }\n }, {\n flushSync\n });\n return;\n }\n // Short circuit if it\'s only a hash change and not a revalidation or\n // mutation submission.\n //\n // Ignore on initial page loads because since the initial load will always\n // be "same hash". For example, on /page#hash and submit a <Form method="post">\n // which will default to a navigation to /page\n if (state.initialized && !isRevalidationRequired && isHashChangeOnly(state.location, location) && !(opts && opts.submission && isMutationMethod(opts.submission.formMethod))) {\n completeNavigation(location, {\n matches\n }, {\n flushSync\n });\n return;\n }\n // Create a controller/Request for this navigation\n pendingNavigationController = new AbortController();\n let request = createClientSideRequest(init.history, location, pendingNavigationController.signal, opts && opts.submission);\n let pendingActionResult;\n if (opts && opts.pendingError) {\n // If we have a pendingError, it means the user attempted a GET submission\n // with binary FormData so assign here and skip to handleLoaders. That\n // way we handle calling loaders above the boundary etc. It\'s not really\n // different from an actionError in that sense.\n pendingActionResult = [findNearestBoundary(matches).route.id, {\n type: ResultType.error,\n error: opts.pendingError\n }];\n } else if (opts && opts.submission && isMutationMethod(opts.submission.formMethod)) {\n // Call action if we received an action submission\n let actionResult = await handleAction(request, location, opts.submission, matches, fogOfWar.active, {\n replace: opts.replace,\n flushSync\n });\n if (actionResult.shortCircuited) {\n return;\n }\n // If we received a 404 from handleAction, it\'s because we couldn\'t lazily\n // discover the destination route so we don\'t want to call loaders\n if (actionResult.pendingActionResult) {\n let [routeId, result] = actionResult.pendingActionResult;\n if (isErrorResult(result) && isRouteErrorResponse(result.error) && result.error.status === 404) {\n pendingNavigationController = null;\n completeNavigation(location, {\n matches: actionResult.matches,\n loaderData: {},\n errors: {\n [routeId]: result.error\n }\n });\n return;\n }\n }\n matches = actionResult.matches || matches;\n pendingActionResult = actionResult.pendingActionResult;\n loadingNavigation = getLoadingNavigation(location, opts.submission);\n flushSync = false;\n // No need to do fog of war matching again on loader execution\n fogOfWar.active = false;\n // Create a GET request for the loaders\n request = createClientSideRequest(init.history, request.url, request.signal);\n }\n // Call loaders\n let {\n shortCircuited,\n matches: updatedMatches,\n loaderData,\n errors\n } = await handleLoaders(request, location, matches, fogOfWar.active, loadingNavigation, opts && opts.submission, opts && opts.fetcherSubmission, opts && opts.replace, opts && opts.initialHydration === true, flushSync, pendingActionResult);\n if (shortCircuited) {\n return;\n }\n // Clean up now that the action/loaders have completed. Don\'t clean up if\n // we short circuited because pendingNavigationController will have already\n // been assigned to a new controller for the next navigation\n pendingNavigationController = null;\n completeNavigation(location, _extends({\n matches: updatedMatches || matches\n }, getActionDataForCommit(pendingActionResult), {\n loaderData,\n errors\n }));\n }\n // Call the action matched by the leaf route for this navigation and handle\n // redirects/errors\n async function handleAction(request, location, submission, matches, isFogOfWar, opts) {\n if (opts === void 0) {\n opts = {};\n }\n interruptActiveLoads();\n // Put us in a submitting state\n let navigation = getSubmittingNavigation(location, submission);\n updateState({\n navigation\n }, {\n flushSync: opts.flushSync === true\n });\n if (isFogOfWar) {\n let discoverResult = await discoverRoutes(matches, location.pathname, request.signal);\n if (discoverResult.type === "aborted") {\n return {\n shortCircuited: true\n };\n } else if (discoverResult.type === "error") {\n let {\n error,\n notFoundMatches,\n route\n } = handleDiscoverRouteError(location.pathname, discoverResult);\n return {\n matches: notFoundMatches,\n pendingActionResult: [route.id, {\n type: ResultType.error,\n error\n }]\n };\n } else if (!discoverResult.matches) {\n let {\n notFoundMatches,\n error,\n route\n } = handleNavigational404(location.pathname);\n return {\n matches: notFoundMatches,\n pendingActionResult: [route.id, {\n type: ResultType.error,\n error\n }]\n };\n } else {\n matches = discoverResult.matches;\n }\n }\n // Call our action and get the result\n let result;\n let actionMatch = getTargetMatch(matches, location);\n if (!actionMatch.route.action && !actionMatch.route.lazy) {\n result = {\n type: ResultType.error,\n error: getInternalRouterError(405, {\n method: request.method,\n pathname: location.pathname,\n routeId: actionMatch.route.id\n })\n };\n } else {\n let results = await callDataStrategy("action", request, [actionMatch], matches);\n result = results[0];\n if (request.signal.aborted) {\n return {\n shortCircuited: true\n };\n }\n }\n if (isRedirectResult(result)) {\n let replace;\n if (opts && opts.replace != null) {\n replace = opts.replace;\n } else {\n // If the user didn\'t explicity indicate replace behavior, replace if\n // we redirected to the exact same location we\'re currently at to avoid\n // double back-buttons\n let location = normalizeRedirectLocation(result.response.headers.get("Location"), new URL(request.url), basename);\n replace = location === state.location.pathname + state.location.search;\n }\n await startRedirectNavigation(request, result, {\n submission,\n replace\n });\n return {\n shortCircuited: true\n };\n }\n if (isDeferredResult(result)) {\n throw getInternalRouterError(400, {\n type: "defer-action"\n });\n }\n if (isErrorResult(result)) {\n // Store off the pending error - we use it to determine which loaders\n // to call and will commit it when we complete the navigation\n let boundaryMatch = findNearestBoundary(matches, actionMatch.route.id);\n // By default, all submissions to the current location are REPLACE\n // navigations, but if the action threw an error that\'ll be rendered in\n // an errorElement, we fall back to PUSH so that the user can use the\n // back button to get back to the pre-submission form location to try\n // again\n if ((opts && opts.replace) !== true) {\n pendingAction = Action.Push;\n }\n return {\n matches,\n pendingActionResult: [boundaryMatch.route.id, result]\n };\n }\n return {\n matches,\n pendingActionResult: [actionMatch.route.id, result]\n };\n }\n // Call all applicable loaders for the given matches, handling redirects,\n // errors, etc.\n async function handleLoaders(request, location, matches, isFogOfWar, overrideNavigation, submission, fetcherSubmission, replace, initialHydration, flushSync, pendingActionResult) {\n // Figure out the right navigation we want to use for data loading\n let loadingNavigation = overrideNavigation || getLoadingNavigation(location, submission);\n // If this was a redirect from an action we don\'t have a "submission" but\n // we have it on the loading navigation so use that if available\n let activeSubmission = submission || fetcherSubmission || getSubmissionFromNavigation(loadingNavigation);\n // If this is an uninterrupted revalidation, we remain in our current idle\n // state. If not, we need to switch to our loading state and load data,\n // preserving any new action data or existing action data (in the case of\n // a revalidation interrupting an actionReload)\n // If we have partialHydration enabled, then don\'t update the state for the\n // initial data load since it\'s not a "navigation"\n let shouldUpdateNavigationState = !isUninterruptedRevalidation && (!future.v7_partialHydration || !initialHydration);\n // When fog of war is enabled, we enter our `loading` state earlier so we\n // can discover new routes during the `loading` state. We skip this if\n // we\'ve already run actions since we would have done our matching already.\n // If the children() function threw then, we want to proceed with the\n // partial matches it discovered.\n if (isFogOfWar) {\n if (shouldUpdateNavigationState) {\n let actionData = getUpdatedActionData(pendingActionResult);\n updateState(_extends({\n navigation: loadingNavigation\n }, actionData !== undefined ? {\n actionData\n } : {}), {\n flushSync\n });\n }\n let discoverResult = await discoverRoutes(matches, location.pathname, request.signal);\n if (discoverResult.type === "aborted") {\n return {\n shortCircuited: true\n };\n } else if (discoverResult.type === "error") {\n let {\n error,\n notFoundMatches,\n route\n } = handleDiscoverRouteError(location.pathname, discoverResult);\n return {\n matches: notFoundMatches,\n loaderData: {},\n errors: {\n [route.id]: error\n }\n };\n } else if (!discoverResult.matches) {\n let {\n error,\n notFoundMatches,\n route\n } = handleNavigational404(location.pathname);\n return {\n matches: notFoundMatches,\n loaderData: {},\n errors: {\n [route.id]: error\n }\n };\n } else {\n matches = discoverResult.matches;\n }\n }\n let routesToUse = inFlightDataRoutes || dataRoutes;\n let [matchesToLoad, revalidatingFetchers] = getMatchesToLoad(init.history, state, matches, activeSubmission, location, future.v7_partialHydration && initialHydration === true, future.unstable_skipActionErrorRevalidation, isRevalidationRequired, cancelledDeferredRoutes, cancelledFetcherLoads, deletedFetchers, fetchLoadMatches, fetchRedirectIds, routesToUse, basename, pendingActionResult);\n // Cancel pending deferreds for no-longer-matched routes or routes we\'re\n // about to reload. Note that if this is an action reload we would have\n // already cancelled all pending deferreds so this would be a no-op\n cancelActiveDeferreds(routeId => !(matches && matches.some(m => m.route.id === routeId)) || matchesToLoad && matchesToLoad.some(m => m.route.id === routeId));\n pendingNavigationLoadId = ++incrementingLoadId;\n // Short circuit if we have no loaders to run\n if (matchesToLoad.length === 0 && revalidatingFetchers.length === 0) {\n let updatedFetchers = markFetchRedirectsDone();\n completeNavigation(location, _extends({\n matches,\n loaderData: {},\n // Commit pending error if we\'re short circuiting\n errors: pendingActionResult && isErrorResult(pendingActionResult[1]) ? {\n [pendingActionResult[0]]: pendingActionResult[1].error\n } : null\n }, getActionDataForCommit(pendingActionResult), updatedFetchers ? {\n fetchers: new Map(state.fetchers)\n } : {}), {\n flushSync\n });\n return {\n shortCircuited: true\n };\n }\n if (shouldUpdateNavigationState) {\n let updates = {};\n if (!isFogOfWar) {\n // Only update navigation/actionNData if we didn\'t already do it above\n updates.navigation = loadingNavigation;\n let actionData = getUpdatedActionData(pendingActionResult);\n if (actionData !== undefined) {\n updates.actionData = actionData;\n }\n }\n if (revalidatingFetchers.length > 0) {\n updates.fetchers = getUpdatedRevalidatingFetchers(revalidatingFetchers);\n }\n updateState(updates, {\n flushSync\n });\n }\n revalidatingFetchers.forEach(rf => {\n if (fetchControllers.has(rf.key)) {\n abortFetcher(rf.key);\n }\n if (rf.controller) {\n // Fetchers use an independent AbortController so that aborting a fetcher\n // (via deleteFetcher) does not abort the triggering navigation that\n // triggered the revalidation\n fetchControllers.set(rf.key, rf.controller);\n }\n });\n // Proxy navigation abort through to revalidation fetchers\n let abortPendingFetchRevalidations = () => revalidatingFetchers.forEach(f => abortFetcher(f.key));\n if (pendingNavigationController) {\n pendingNavigationController.signal.addEventListener("abort", abortPendingFetchRevalidations);\n }\n let {\n loaderResults,\n fetcherResults\n } = await callLoadersAndMaybeResolveData(state.matches, matches, matchesToLoad, revalidatingFetchers, request);\n if (request.signal.aborted) {\n return {\n shortCircuited: true\n };\n }\n // Clean up _after_ loaders have completed. Don\'t clean up if we short\n // circuited because fetchControllers would have been aborted and\n // reassigned to new controllers for the next navigation\n if (pendingNavigationController) {\n pendingNavigationController.signal.removeEventListener("abort", abortPendingFetchRevalidations);\n }\n revalidatingFetchers.forEach(rf => fetchControllers.delete(rf.key));\n // If any loaders returned a redirect Response, start a new REPLACE navigation\n let redirect = findRedirect([...loaderResults, ...fetcherResults]);\n if (redirect) {\n if (redirect.idx >= matchesToLoad.length) {\n // If this redirect came from a fetcher make sure we mark it in\n // fetchRedirectIds so it doesn\'t get revalidated on the next set of\n // loader executions\n let fetcherKey = revalidatingFetchers[redirect.idx - matchesToLoad.length].key;\n fetchRedirectIds.add(fetcherKey);\n }\n await startRedirectNavigation(request, redirect.result, {\n replace\n });\n return {\n shortCircuited: true\n };\n }\n // Process and commit output from loaders\n let {\n loaderData,\n errors\n } = processLoaderData(state, matches, matchesToLoad, loaderResults, pendingActionResult, revalidatingFetchers, fetcherResults, activeDeferreds);\n // Wire up subscribers to update loaderData as promises settle\n activeDeferreds.forEach((deferredData, routeId) => {\n deferredData.subscribe(aborted => {\n // Note: No need to updateState here since the TrackedPromise on\n // loaderData is stable across resolve/reject\n // Remove this instance if we were aborted or if promises have settled\n if (aborted || deferredData.done) {\n activeDeferreds.delete(routeId);\n }\n });\n });\n // During partial hydration, preserve SSR errors for routes that don\'t re-run\n if (future.v7_partialHydration && initialHydration && state.errors) {\n Object.entries(state.errors).filter(_ref2 => {\n let [id] = _ref2;\n return !matchesToLoad.some(m => m.route.id === id);\n }).forEach(_ref3 => {\n let [routeId, error] = _ref3;\n errors = Object.assign(errors || {}, {\n [routeId]: error\n });\n });\n }\n let updatedFetchers = markFetchRedirectsDone();\n let didAbortFetchLoads = abortStaleFetchLoads(pendingNavigationLoadId);\n let shouldUpdateFetchers = updatedFetchers || didAbortFetchLoads || revalidatingFetchers.length > 0;\n return _extends({\n matches,\n loaderData,\n errors\n }, shouldUpdateFetchers ? {\n fetchers: new Map(state.fetchers)\n } : {});\n }\n function getUpdatedActionData(pendingActionResult) {\n if (pendingActionResult && !isErrorResult(pendingActionResult[1])) {\n // This is cast to `any` currently because `RouteData`uses any and it\n // would be a breaking change to use any.\n // TODO: v7 - change `RouteData` to use `unknown` instead of `any`\n return {\n [pendingActionResult[0]]: pendingActionResult[1].data\n };\n } else if (state.actionData) {\n if (Object.keys(state.actionData).length === 0) {\n return null;\n } else {\n return state.actionData;\n }\n }\n }\n function getUpdatedRevalidatingFetchers(revalidatingFetchers) {\n revalidatingFetchers.forEach(rf => {\n let fetcher = state.fetchers.get(rf.key);\n let revalidatingFetcher = getLoadingFetcher(undefined, fetcher ? fetcher.data : undefined);\n state.fetchers.set(rf.key, revalidatingFetcher);\n });\n return new Map(state.fetchers);\n }\n // Trigger a fetcher load/submit for the given fetcher key\n function fetch(key, routeId, href, opts) {\n if (isServer) {\n throw new Error("router.fetch() was called during the server render, but it shouldn\'t be. " + "You are likely calling a useFetcher() method in the body of your component. " + "Try moving it to a useEffect or a callback.");\n }\n if (fetchControllers.has(key)) abortFetcher(key);\n let flushSync = (opts && opts.unstable_flushSync) === true;\n let routesToUse = inFlightDataRoutes || dataRoutes;\n let normalizedPath = normalizeTo(state.location, state.matches, basename, future.v7_prependBasename, href, future.v7_relativeSplatPath, routeId, opts == null ? void 0 : opts.relative);\n let matches = matchRoutes(routesToUse, normalizedPath, basename);\n let fogOfWar = checkFogOfWar(matches, routesToUse, normalizedPath);\n if (fogOfWar.active && fogOfWar.matches) {\n matches = fogOfWar.matches;\n }\n if (!matches) {\n setFetcherError(key, routeId, getInternalRouterError(404, {\n pathname: normalizedPath\n }), {\n flushSync\n });\n return;\n }\n let {\n path,\n submission,\n error\n } = normalizeNavigateOptions(future.v7_normalizeFormMethod, true, normalizedPath, opts);\n if (error) {\n setFetcherError(key, routeId, error, {\n flushSync\n });\n return;\n }\n let match = getTargetMatch(matches, path);\n pendingPreventScrollReset = (opts && opts.preventScrollReset) === true;\n if (submission && isMutationMethod(submission.formMethod)) {\n handleFetcherAction(key, routeId, path, match, matches, fogOfWar.active, flushSync, submission);\n return;\n }\n // Store off the match so we can call it\'s shouldRevalidate on subsequent\n // revalidations\n fetchLoadMatches.set(key, {\n routeId,\n path\n });\n handleFetcherLoader(key, routeId, path, match, matches, fogOfWar.active, flushSync, submission);\n }\n // Call the action for the matched fetcher.submit(), and then handle redirects,\n // errors, and revalidation\n async function handleFetcherAction(key, routeId, path, match, requestMatches, isFogOfWar, flushSync, submission) {\n interruptActiveLoads();\n fetchLoadMatches.delete(key);\n function detectAndHandle405Error(m) {\n if (!m.route.action && !m.route.lazy) {\n let error = getInternalRouterError(405, {\n method: submission.formMethod,\n pathname: path,\n routeId: routeId\n });\n setFetcherError(key, routeId, error, {\n flushSync\n });\n return true;\n }\n return false;\n }\n if (!isFogOfWar && detectAndHandle405Error(match)) {\n return;\n }\n // Put this fetcher into it\'s submitting state\n let existingFetcher = state.fetchers.get(key);\n updateFetcherState(key, getSubmittingFetcher(submission, existingFetcher), {\n flushSync\n });\n let abortController = new AbortController();\n let fetchRequest = createClientSideRequest(init.history, path, abortController.signal, submission);\n if (isFogOfWar) {\n let discoverResult = await discoverRoutes(requestMatches, path, fetchRequest.signal);\n if (discoverResult.type === "aborted") {\n return;\n } else if (discoverResult.type === "error") {\n let {\n error\n } = handleDiscoverRouteError(path, discoverResult);\n setFetcherError(key, routeId, error, {\n flushSync\n });\n return;\n } else if (!discoverResult.matches) {\n setFetcherError(key, routeId, getInternalRouterError(404, {\n pathname: path\n }), {\n flushSync\n });\n return;\n } else {\n requestMatches = discoverResult.matches;\n match = getTargetMatch(requestMatches, path);\n if (detectAndHandle405Error(match)) {\n return;\n }\n }\n }\n // Call the action for the fetcher\n fetchControllers.set(key, abortController);\n let originatingLoadId = incrementingLoadId;\n let actionResults = await callDataStrategy("action", fetchRequest, [match], requestMatches);\n let actionResult = actionResults[0];\n if (fetchRequest.signal.aborted) {\n // We can delete this so long as we weren\'t aborted by our own fetcher\n // re-submit which would have put _new_ controller is in fetchControllers\n if (fetchControllers.get(key) === abortController) {\n fetchControllers.delete(key);\n }\n return;\n }\n // When using v7_fetcherPersist, we don\'t want errors bubbling up to the UI\n // or redirects processed for unmounted fetchers so we just revert them to\n // idle\n if (future.v7_fetcherPersist && deletedFetchers.has(key)) {\n if (isRedirectResult(actionResult) || isErrorResult(actionResult)) {\n updateFetcherState(key, getDoneFetcher(undefined));\n return;\n }\n // Let SuccessResult\'s fall through for revalidation\n } else {\n if (isRedirectResult(actionResult)) {\n fetchControllers.delete(key);\n if (pendingNavigationLoadId > originatingLoadId) {\n // A new navigation was kicked off after our action started, so that\n // should take precedence over this redirect navigation. We already\n // set isRevalidationRequired so all loaders for the new route should\n // fire unless opted out via shouldRevalidate\n updateFetcherState(key, getDoneFetcher(undefined));\n return;\n } else {\n fetchRedirectIds.add(key);\n updateFetcherState(key, getLoadingFetcher(submission));\n return startRedirectNavigation(fetchRequest, actionResult, {\n fetcherSubmission: submission\n });\n }\n }\n // Process any non-redirect errors thrown\n if (isErrorResult(actionResult)) {\n setFetcherError(key, routeId, actionResult.error);\n return;\n }\n }\n if (isDeferredResult(actionResult)) {\n throw getInternalRouterError(400, {\n type: "defer-action"\n });\n }\n // Start the data load for current matches, or the next location if we\'re\n // in the middle of a navigation\n let nextLocation = state.navigation.location || state.location;\n let revalidationRequest = createClientSideRequest(init.history, nextLocation, abortController.signal);\n let routesToUse = inFlightDataRoutes || dataRoutes;\n let matches = state.navigation.state !== "idle" ? matchRoutes(routesToUse, state.navigation.location, basename) : state.matches;\n invariant(matches, "Didn\'t find any matches after fetcher action");\n let loadId = ++incrementingLoadId;\n fetchReloadIds.set(key, loadId);\n let loadFetcher = getLoadingFetcher(submission, actionResult.data);\n state.fetchers.set(key, loadFetcher);\n let [matchesToLoad, revalidatingFetchers] = getMatchesToLoad(init.history, state, matches, submission, nextLocation, false, future.unstable_skipActionErrorRevalidation, isRevalidationRequired, cancelledDeferredRoutes, cancelledFetcherLoads, deletedFetchers, fetchLoadMatches, fetchRedirectIds, routesToUse, basename, [match.route.id, actionResult]);\n // Put all revalidating fetchers into the loading state, except for the\n // current fetcher which we want to keep in it\'s current loading state which\n // contains it\'s action submission info + action data\n revalidatingFetchers.filter(rf => rf.key !== key).forEach(rf => {\n let staleKey = rf.key;\n let existingFetcher = state.fetchers.get(staleKey);\n let revalidatingFetcher = getLoadingFetcher(undefined, existingFetcher ? existingFetcher.data : undefined);\n state.fetchers.set(staleKey, revalidatingFetcher);\n if (fetchControllers.has(staleKey)) {\n abortFetcher(staleKey);\n }\n if (rf.controller) {\n fetchControllers.set(staleKey, rf.controller);\n }\n });\n updateState({\n fetchers: new Map(state.fetchers)\n });\n let abortPendingFetchRevalidations = () => revalidatingFetchers.forEach(rf => abortFetcher(rf.key));\n abortController.signal.addEventListener("abort", abortPendingFetchRevalidations);\n let {\n loaderResults,\n fetcherResults\n } = await callLoadersAndMaybeResolveData(state.matches, matches, matchesToLoad, revalidatingFetchers, revalidationRequest);\n if (abortController.signal.aborted) {\n return;\n }\n abortController.signal.removeEventListener("abort", abortPendingFetchRevalidations);\n fetchReloadIds.delete(key);\n fetchControllers.delete(key);\n revalidatingFetchers.forEach(r => fetchControllers.delete(r.key));\n let redirect = findRedirect([...loaderResults, ...fetcherResults]);\n if (redirect) {\n if (redirect.idx >= matchesToLoad.length) {\n // If this redirect came from a fetcher make sure we mark it in\n // fetchRedirectIds so it doesn\'t get revalidated on the next set of\n // loader executions\n let fetcherKey = revalidatingFetchers[redirect.idx - matchesToLoad.length].key;\n fetchRedirectIds.add(fetcherKey);\n }\n return startRedirectNavigation(revalidationRequest, redirect.result);\n }\n // Process and commit output from loaders\n let {\n loaderData,\n errors\n } = processLoaderData(state, state.matches, matchesToLoad, loaderResults, undefined, revalidatingFetchers, fetcherResults, activeDeferreds);\n // Since we let revalidations complete even if the submitting fetcher was\n // deleted, only put it back to idle if it hasn\'t been deleted\n if (state.fetchers.has(key)) {\n let doneFetcher = getDoneFetcher(actionResult.data);\n state.fetchers.set(key, doneFetcher);\n }\n abortStaleFetchLoads(loadId);\n // If we are currently in a navigation loading state and this fetcher is\n // more recent than the navigation, we want the newer data so abort the\n // navigation and complete it with the fetcher data\n if (state.navigation.state === "loading" && loadId > pendingNavigationLoadId) {\n invariant(pendingAction, "Expected pending action");\n pendingNavigationController && pendingNavigationController.abort();\n completeNavigation(state.navigation.location, {\n matches,\n loaderData,\n errors,\n fetchers: new Map(state.fetchers)\n });\n } else {\n // otherwise just update with the fetcher data, preserving any existing\n // loaderData for loaders that did not need to reload. We have to\n // manually merge here since we aren\'t going through completeNavigation\n updateState({\n errors,\n loaderData: mergeLoaderData(state.loaderData, loaderData, matches, errors),\n fetchers: new Map(state.fetchers)\n });\n isRevalidationRequired = false;\n }\n }\n // Call the matched loader for fetcher.load(), handling redirects, errors, etc.\n async function handleFetcherLoader(key, routeId, path, match, matches, isFogOfWar, flushSync, submission) {\n let existingFetcher = state.fetchers.get(key);\n updateFetcherState(key, getLoadingFetcher(submission, existingFetcher ? existingFetcher.data : undefined), {\n flushSync\n });\n let abortController = new AbortController();\n let fetchRequest = createClientSideRequest(init.history, path, abortController.signal);\n if (isFogOfWar) {\n let discoverResult = await discoverRoutes(matches, path, fetchRequest.signal);\n if (discoverResult.type === "aborted") {\n return;\n } else if (discoverResult.type === "error") {\n let {\n error\n } = handleDiscoverRouteError(path, discoverResult);\n setFetcherError(key, routeId, error, {\n flushSync\n });\n return;\n } else if (!discoverResult.matches) {\n setFetcherError(key, routeId, getInternalRouterError(404, {\n pathname: path\n }), {\n flushSync\n });\n return;\n } else {\n matches = discoverResult.matches;\n match = getTargetMatch(matches, path);\n }\n }\n // Call the loader for this fetcher route match\n fetchControllers.set(key, abortController);\n let originatingLoadId = incrementingLoadId;\n let results = await callDataStrategy("loader", fetchRequest, [match], matches);\n let result = results[0];\n // Deferred isn\'t supported for fetcher loads, await everything and treat it\n // as a normal load. resolveDeferredData will return undefined if this\n // fetcher gets aborted, so we just leave result untouched and short circuit\n // below if that happens\n if (isDeferredResult(result)) {\n result = (await resolveDeferredData(result, fetchRequest.signal, true)) || result;\n }\n // We can delete this so long as we weren\'t aborted by our our own fetcher\n // re-load which would have put _new_ controller is in fetchControllers\n if (fetchControllers.get(key) === abortController) {\n fetchControllers.delete(key);\n }\n if (fetchRequest.signal.aborted) {\n return;\n }\n // We don\'t want errors bubbling up or redirects followed for unmounted\n // fetchers, so short circuit here if it was removed from the UI\n if (deletedFetchers.has(key)) {\n updateFetcherState(key, getDoneFetcher(undefined));\n return;\n }\n // If the loader threw a redirect Response, start a new REPLACE navigation\n if (isRedirectResult(result)) {\n if (pendingNavigationLoadId > originatingLoadId) {\n // A new navigation was kicked off after our loader started, so that\n // should take precedence over this redirect navigation\n updateFetcherState(key, getDoneFetcher(undefined));\n return;\n } else {\n fetchRedirectIds.add(key);\n await startRedirectNavigation(fetchRequest, result);\n return;\n }\n }\n // Process any non-redirect errors thrown\n if (isErrorResult(result)) {\n setFetcherError(key, routeId, result.error);\n return;\n }\n invariant(!isDeferredResult(result), "Unhandled fetcher deferred data");\n // Put the fetcher back into an idle state\n updateFetcherState(key, getDoneFetcher(result.data));\n }\n /**\n * Utility function to handle redirects returned from an action or loader.\n * Normally, a redirect "replaces" the navigation that triggered it. So, for\n * example:\n *\n * - user is on /a\n * - user clicks a link to /b\n * - loader for /b redirects to /c\n *\n * In a non-JS app the browser would track the in-flight navigation to /b and\n * then replace it with /c when it encountered the redirect response. In\n * the end it would only ever update the URL bar with /c.\n *\n * In client-side routing using pushState/replaceState, we aim to emulate\n * this behavior and we also do not update history until the end of the\n * navigation (including processed redirects). This means that we never\n * actually touch history until we\'ve processed redirects, so we just use\n * the history action from the original navigation (PUSH or REPLACE).\n */\n async function startRedirectNavigation(request, redirect, _temp2) {\n let {\n submission,\n fetcherSubmission,\n replace\n } = _temp2 === void 0 ? {} : _temp2;\n if (redirect.response.headers.has("X-Remix-Revalidate")) {\n isRevalidationRequired = true;\n }\n let location = redirect.response.headers.get("Location");\n invariant(location, "Expected a Location header on the redirect Response");\n location = normalizeRedirectLocation(location, new URL(request.url), basename);\n let redirectLocation = createLocation(state.location, location, {\n _isRedirect: true\n });\n if (isBrowser) {\n let isDocumentReload = false;\n if (redirect.response.headers.has("X-Remix-Reload-Document")) {\n // Hard reload if the response contained X-Remix-Reload-Document\n isDocumentReload = true;\n } else if (ABSOLUTE_URL_REGEX.test(location)) {\n const url = init.history.createURL(location);\n isDocumentReload =\n // Hard reload if it\'s an absolute URL to a new origin\n url.origin !== routerWindow.location.origin ||\n // Hard reload if it\'s an absolute URL that does not match our basename\n stripBasename(url.pathname, basename) == null;\n }\n if (isDocumentReload) {\n if (replace) {\n routerWindow.location.replace(location);\n } else {\n routerWindow.location.assign(location);\n }\n return;\n }\n }\n // There\'s no need to abort on redirects, since we don\'t detect the\n // redirect until the action/loaders have settled\n pendingNavigationController = null;\n let redirectHistoryAction = replace === true ? Action.Replace : Action.Push;\n // Use the incoming submission if provided, fallback on the active one in\n // state.navigation\n let {\n formMethod,\n formAction,\n formEncType\n } = state.navigation;\n if (!submission && !fetcherSubmission && formMethod && formAction && formEncType) {\n submission = getSubmissionFromNavigation(state.navigation);\n }\n // If this was a 307/308 submission we want to preserve the HTTP method and\n // re-submit the GET/POST/PUT/PATCH/DELETE as a submission navigation to the\n // redirected location\n let activeSubmission = submission || fetcherSubmission;\n if (redirectPreserveMethodStatusCodes.has(redirect.response.status) && activeSubmission && isMutationMethod(activeSubmission.formMethod)) {\n await startNavigation(redirectHistoryAction, redirectLocation, {\n submission: _extends({}, activeSubmission, {\n formAction: location\n }),\n // Preserve this flag across redirects\n preventScrollReset: pendingPreventScrollReset\n });\n } else {\n // If we have a navigation submission, we will preserve it through the\n // redirect navigation\n let overrideNavigation = getLoadingNavigation(redirectLocation, submission);\n await startNavigation(redirectHistoryAction, redirectLocation, {\n overrideNavigation,\n // Send fetcher submissions through for shouldRevalidate\n fetcherSubmission,\n // Preserve this flag across redirects\n preventScrollReset: pendingPreventScrollReset\n });\n }\n }\n // Utility wrapper for calling dataStrategy client-side without having to\n // pass around the manifest, mapRouteProperties, etc.\n async function callDataStrategy(type, request, matchesToLoad, matches) {\n try {\n let results = await callDataStrategyImpl(dataStrategyImpl, type, request, matchesToLoad, matches, manifest, mapRouteProperties);\n return await Promise.all(results.map((result, i) => {\n if (isRedirectHandlerResult(result)) {\n let response = result.result;\n return {\n type: ResultType.redirect,\n response: normalizeRelativeRoutingRedirectResponse(response, request, matchesToLoad[i].route.id, matches, basename, future.v7_relativeSplatPath)\n };\n }\n return convertHandlerResultToDataResult(result);\n }));\n } catch (e) {\n // If the outer dataStrategy method throws, just return the error for all\n // matches - and it\'ll naturally bubble to the root\n return matchesToLoad.map(() => ({\n type: ResultType.error,\n error: e\n }));\n }\n }\n async function callLoadersAndMaybeResolveData(currentMatches, matches, matchesToLoad, fetchersToLoad, request) {\n let [loaderResults, ...fetcherResults] = await Promise.all([matchesToLoad.length ? callDataStrategy("loader", request, matchesToLoad, matches) : [], ...fetchersToLoad.map(f => {\n if (f.matches && f.match && f.controller) {\n let fetcherRequest = createClientSideRequest(init.history, f.path, f.controller.signal);\n return callDataStrategy("loader", fetcherRequest, [f.match], f.matches).then(r => r[0]);\n } else {\n return Promise.resolve({\n type: ResultType.error,\n error: getInternalRouterError(404, {\n pathname: f.path\n })\n });\n }\n })]);\n await Promise.all([resolveDeferredResults(currentMatches, matchesToLoad, loaderResults, loaderResults.map(() => request.signal), false, state.loaderData), resolveDeferredResults(currentMatches, fetchersToLoad.map(f => f.match), fetcherResults, fetchersToLoad.map(f => f.controller ? f.controller.signal : null), true)]);\n return {\n loaderResults,\n fetcherResults\n };\n }\n function interruptActiveLoads() {\n // Every interruption triggers a revalidation\n isRevalidationRequired = true;\n // Cancel pending route-level deferreds and mark cancelled routes for\n // revalidation\n cancelledDeferredRoutes.push(...cancelActiveDeferreds());\n // Abort in-flight fetcher loads\n fetchLoadMatches.forEach((_, key) => {\n if (fetchControllers.has(key)) {\n cancelledFetcherLoads.push(key);\n abortFetcher(key);\n }\n });\n }\n function updateFetcherState(key, fetcher, opts) {\n if (opts === void 0) {\n opts = {};\n }\n state.fetchers.set(key, fetcher);\n updateState({\n fetchers: new Map(state.fetchers)\n }, {\n flushSync: (opts && opts.flushSync) === true\n });\n }\n function setFetcherError(key, routeId, error, opts) {\n if (opts === void 0) {\n opts = {};\n }\n let boundaryMatch = findNearestBoundary(state.matches, routeId);\n deleteFetcher(key);\n updateState({\n errors: {\n [boundaryMatch.route.id]: error\n },\n fetchers: new Map(state.fetchers)\n }, {\n flushSync: (opts && opts.flushSync) === true\n });\n }\n function getFetcher(key) {\n if (future.v7_fetcherPersist) {\n activeFetchers.set(key, (activeFetchers.get(key) || 0) + 1);\n // If this fetcher was previously marked for deletion, unmark it since we\n // have a new instance\n if (deletedFetchers.has(key)) {\n deletedFetchers.delete(key);\n }\n }\n return state.fetchers.get(key) || IDLE_FETCHER;\n }\n function deleteFetcher(key) {\n let fetcher = state.fetchers.get(key);\n // Don\'t abort the controller if this is a deletion of a fetcher.submit()\n // in it\'s loading phase since - we don\'t want to abort the corresponding\n // revalidation and want them to complete and land\n if (fetchControllers.has(key) && !(fetcher && fetcher.state === "loading" && fetchReloadIds.has(key))) {\n abortFetcher(key);\n }\n fetchLoadMatches.delete(key);\n fetchReloadIds.delete(key);\n fetchRedirectIds.delete(key);\n deletedFetchers.delete(key);\n state.fetchers.delete(key);\n }\n function deleteFetcherAndUpdateState(key) {\n if (future.v7_fetcherPersist) {\n let count = (activeFetchers.get(key) || 0) - 1;\n if (count <= 0) {\n activeFetchers.delete(key);\n deletedFetchers.add(key);\n } else {\n activeFetchers.set(key, count);\n }\n } else {\n deleteFetcher(key);\n }\n updateState({\n fetchers: new Map(state.fetchers)\n });\n }\n function abortFetcher(key) {\n let controller = fetchControllers.get(key);\n invariant(controller, "Expected fetch controller: " + key);\n controller.abort();\n fetchControllers.delete(key);\n }\n function markFetchersDone(keys) {\n for (let key of keys) {\n let fetcher = getFetcher(key);\n let doneFetcher = getDoneFetcher(fetcher.data);\n state.fetchers.set(key, doneFetcher);\n }\n }\n function markFetchRedirectsDone() {\n let doneKeys = [];\n let updatedFetchers = false;\n for (let key of fetchRedirectIds) {\n let fetcher = state.fetchers.get(key);\n invariant(fetcher, "Expected fetcher: " + key);\n if (fetcher.state === "loading") {\n fetchRedirectIds.delete(key);\n doneKeys.push(key);\n updatedFetchers = true;\n }\n }\n markFetchersDone(doneKeys);\n return updatedFetchers;\n }\n function abortStaleFetchLoads(landedId) {\n let yeetedKeys = [];\n for (let [key, id] of fetchReloadIds) {\n if (id < landedId) {\n let fetcher = state.fetchers.get(key);\n invariant(fetcher, "Expected fetcher: " + key);\n if (fetcher.state === "loading") {\n abortFetcher(key);\n fetchReloadIds.delete(key);\n yeetedKeys.push(key);\n }\n }\n }\n markFetchersDone(yeetedKeys);\n return yeetedKeys.length > 0;\n }\n function getBlocker(key, fn) {\n let blocker = state.blockers.get(key) || IDLE_BLOCKER;\n if (blockerFunctions.get(key) !== fn) {\n blockerFunctions.set(key, fn);\n }\n return blocker;\n }\n function deleteBlocker(key) {\n state.blockers.delete(key);\n blockerFunctions.delete(key);\n }\n // Utility function to update blockers, ensuring valid state transitions\n function updateBlocker(key, newBlocker) {\n let blocker = state.blockers.get(key) || IDLE_BLOCKER;\n // Poor mans state machine :)\n // https://mermaid.live/edit#pako:eNqVkc9OwzAMxl8l8nnjAYrEtDIOHEBIgwvKJTReGy3_lDpIqO27k6awMG0XcrLlnz87nwdonESogKXXBuE79rq75XZO3-yHds0RJVuv70YrPlUrCEe2HfrORS3rubqZfuhtpg5C9wk5tZ4VKcRUq88q9Z8RS0-48cE1iHJkL0ugbHuFLus9L6spZy8nX9MP2CNdomVaposqu3fGayT8T8-jJQwhepo_UtpgBQaDEUom04dZhAN1aJBDlUKJBxE1ceB2Smj0Mln-IBW5AFU2dwUiktt_2Qaq2dBfaKdEup85UV7Yd-dKjlnkabl2Pvr0DTkTreM\n invariant(blocker.state === "unblocked" && newBlocker.state === "blocked" || blocker.state === "blocked" && newBlocker.state === "blocked" || blocker.state === "blocked" && newBlocker.state === "proceeding" || blocker.state === "blocked" && newBlocker.state === "unblocked" || blocker.state === "proceeding" && newBlocker.state === "unblocked", "Invalid blocker state transition: " + blocker.state + " -> " + newBlocker.state);\n let blockers = new Map(state.blockers);\n blockers.set(key, newBlocker);\n updateState({\n blockers\n });\n }\n function shouldBlockNavigation(_ref4) {\n let {\n currentLocation,\n nextLocation,\n historyAction\n } = _ref4;\n if (blockerFunctions.size === 0) {\n return;\n }\n // We ony support a single active blocker at the moment since we don\'t have\n // any compelling use cases for multi-blocker yet\n if (blockerFunctions.size > 1) {\n warning(false, "A router only supports one blocker at a time");\n }\n let entries = Array.from(blockerFunctions.entries());\n let [blockerKey, blockerFunction] = entries[entries.length - 1];\n let blocker = state.blockers.get(blockerKey);\n if (blocker && blocker.state === "proceeding") {\n // If the blocker is currently proceeding, we don\'t need to re-check\n // it and can let this navigation continue\n return;\n }\n // At this point, we know we\'re unblocked/blocked so we need to check the\n // user-provided blocker function\n if (blockerFunction({\n currentLocation,\n nextLocation,\n historyAction\n })) {\n return blockerKey;\n }\n }\n function handleNavigational404(pathname) {\n let error = getInternalRouterError(404, {\n pathname\n });\n let routesToUse = inFlightDataRoutes || dataRoutes;\n let {\n matches,\n route\n } = getShortCircuitMatches(routesToUse);\n // Cancel all pending deferred on 404s since we don\'t keep any routes\n cancelActiveDeferreds();\n return {\n notFoundMatches: matches,\n route,\n error\n };\n }\n function handleDiscoverRouteError(pathname, discoverResult) {\n let matches = discoverResult.partialMatches;\n let route = matches[matches.length - 1].route;\n let error = getInternalRouterError(400, {\n type: "route-discovery",\n routeId: route.id,\n pathname,\n message: discoverResult.error != null && "message" in discoverResult.error ? discoverResult.error : String(discoverResult.error)\n });\n return {\n notFoundMatches: matches,\n route,\n error\n };\n }\n function cancelActiveDeferreds(predicate) {\n let cancelledRouteIds = [];\n activeDeferreds.forEach((dfd, routeId) => {\n if (!predicate || predicate(routeId)) {\n // Cancel the deferred - but do not remove from activeDeferreds here -\n // we rely on the subscribers to do that so our tests can assert proper\n // cleanup via _internalActiveDeferreds\n dfd.cancel();\n cancelledRouteIds.push(routeId);\n activeDeferreds.delete(routeId);\n }\n });\n return cancelledRouteIds;\n }\n // Opt in to capturing and reporting scroll positions during navigations,\n // used by the <ScrollRestoration> component\n function enableScrollRestoration(positions, getPosition, getKey) {\n savedScrollPositions = positions;\n getScrollPosition = getPosition;\n getScrollRestorationKey = getKey || null;\n // Perform initial hydration scroll restoration, since we miss the boat on\n // the initial updateState() because we\'ve not yet rendered <ScrollRestoration/>\n // and therefore have no savedScrollPositions available\n if (!initialScrollRestored && state.navigation === IDLE_NAVIGATION) {\n initialScrollRestored = true;\n let y = getSavedScrollPosition(state.location, state.matches);\n if (y != null) {\n updateState({\n restoreScrollPosition: y\n });\n }\n }\n return () => {\n savedScrollPositions = null;\n getScrollPosition = null;\n getScrollRestorationKey = null;\n };\n }\n function getScrollKey(location, matches) {\n if (getScrollRestorationKey) {\n let key = getScrollRestorationKey(location, matches.map(m => convertRouteMatchToUiMatch(m, state.loaderData)));\n return key || location.key;\n }\n return location.key;\n }\n function saveScrollPosition(location, matches) {\n if (savedScrollPositions && getScrollPosition) {\n let key = getScrollKey(location, matches);\n savedScrollPositions[key] = getScrollPosition();\n }\n }\n function getSavedScrollPosition(location, matches) {\n if (savedScrollPositions) {\n let key = getScrollKey(location, matches);\n let y = savedScrollPositions[key];\n if (typeof y === "number") {\n return y;\n }\n }\n return null;\n }\n function checkFogOfWar(matches, routesToUse, pathname) {\n if (patchRoutesOnMissImpl) {\n if (!matches) {\n let fogMatches = matchRoutesImpl(routesToUse, pathname, basename, true);\n return {\n active: true,\n matches: fogMatches || []\n };\n } else {\n let leafRoute = matches[matches.length - 1].route;\n if (leafRoute.path && (leafRoute.path === "*" || leafRoute.path.endsWith("/*"))) {\n // If we matched a splat, it might only be because we haven\'t yet fetched\n // the children that would match with a higher score, so let\'s fetch\n // around and find out\n let partialMatches = matchRoutesImpl(routesToUse, pathname, basename, true);\n return {\n active: true,\n matches: partialMatches\n };\n }\n }\n }\n return {\n active: false,\n matches: null\n };\n }\n async function discoverRoutes(matches, pathname, signal) {\n let partialMatches = matches;\n let route = partialMatches.length > 0 ? partialMatches[partialMatches.length - 1].route : null;\n while (true) {\n let isNonHMR = inFlightDataRoutes == null;\n let routesToUse = inFlightDataRoutes || dataRoutes;\n try {\n await loadLazyRouteChildren(patchRoutesOnMissImpl, pathname, partialMatches, routesToUse, manifest, mapRouteProperties, pendingPatchRoutes, signal);\n } catch (e) {\n return {\n type: "error",\n error: e,\n partialMatches\n };\n } finally {\n // If we are not in the middle of an HMR revalidation and we changed the\n // routes, provide a new identity so when we `updateState` at the end of\n // this navigation/fetch `router.routes` will be a new identity and\n // trigger a re-run of memoized `router.routes` dependencies.\n // HMR will already update the identity and reflow when it lands\n // `inFlightDataRoutes` in `completeNavigation`\n if (isNonHMR) {\n dataRoutes = [...dataRoutes];\n }\n }\n if (signal.aborted) {\n return {\n type: "aborted"\n };\n }\n let newMatches = matchRoutes(routesToUse, pathname, basename);\n let matchedSplat = false;\n if (newMatches) {\n let leafRoute = newMatches[newMatches.length - 1].route;\n if (leafRoute.index) {\n // If we found an index route, we can stop\n return {\n type: "success",\n matches: newMatches\n };\n }\n if (leafRoute.path && leafRoute.path.length > 0) {\n if (leafRoute.path === "*") {\n // If we found a splat route, we can\'t be sure there\'s not a\n // higher-scoring route down some partial matches trail so we need\n // to check that out\n matchedSplat = true;\n } else {\n // If we found a non-splat route, we can stop\n return {\n type: "success",\n matches: newMatches\n };\n }\n }\n }\n let newPartialMatches = matchRoutesImpl(routesToUse, pathname, basename, true);\n // If we are no longer partially matching anything, this was either a\n // legit splat match above, or it\'s a 404. Also avoid loops if the\n // second pass results in the same partial matches\n if (!newPartialMatches || partialMatches.map(m => m.route.id).join("-") === newPartialMatches.map(m => m.route.id).join("-")) {\n return {\n type: "success",\n matches: matchedSplat ? newMatches : null\n };\n }\n partialMatches = newPartialMatches;\n route = partialMatches[partialMatches.length - 1].route;\n if (route.path === "*") {\n // The splat is still our most accurate partial, so run with it\n return {\n type: "success",\n matches: partialMatches\n };\n }\n }\n }\n function _internalSetRoutes(newRoutes) {\n manifest = {};\n inFlightDataRoutes = convertRoutesToDataRoutes(newRoutes, mapRouteProperties, undefined, manifest);\n }\n function patchRoutes(routeId, children) {\n let isNonHMR = inFlightDataRoutes == null;\n let routesToUse = inFlightDataRoutes || dataRoutes;\n patchRoutesImpl(routeId, children, routesToUse, manifest, mapRouteProperties);\n // If we are not in the middle of an HMR revalidation and we changed the\n // routes, provide a new identity and trigger a reflow via `updateState`\n // to re-run memoized `router.routes` dependencies.\n // HMR will already update the identity and reflow when it lands\n // `inFlightDataRoutes` in `completeNavigation`\n if (isNonHMR) {\n dataRoutes = [...dataRoutes];\n updateState({});\n }\n }\n router = {\n get basename() {\n return basename;\n },\n get future() {\n return future;\n },\n get state() {\n return state;\n },\n get routes() {\n return dataRoutes;\n },\n get window() {\n return routerWindow;\n },\n initialize,\n subscribe,\n enableScrollRestoration,\n navigate,\n fetch,\n revalidate,\n // Passthrough to history-aware createHref used by useHref so we get proper\n // hash-aware URLs in DOM paths\n createHref: to => init.history.createHref(to),\n encodeLocation: to => init.history.encodeLocation(to),\n getFetcher,\n deleteFetcher: deleteFetcherAndUpdateState,\n dispose,\n getBlocker,\n deleteBlocker,\n patchRoutes,\n _internalFetchControllers: fetchControllers,\n _internalActiveDeferreds: activeDeferreds,\n // TODO: Remove setRoutes, it\'s temporary to avoid dealing with\n // updating the tree while validating the update algorithm.\n _internalSetRoutes\n };\n return router;\n}\n//#endregion\n////////////////////////////////////////////////////////////////////////////////\n//#region createStaticHandler\n////////////////////////////////////////////////////////////////////////////////\nconst UNSAFE_DEFERRED_SYMBOL = Symbol("deferred");\nfunction createStaticHandler(routes, opts) {\n invariant(routes.length > 0, "You must provide a non-empty routes array to createStaticHandler");\n let manifest = {};\n let basename = (opts ? opts.basename : null) || "/";\n let mapRouteProperties;\n if (opts != null && opts.mapRouteProperties) {\n mapRouteProperties = opts.mapRouteProperties;\n } else if (opts != null && opts.detectErrorBoundary) {\n // If they are still using the deprecated version, wrap it with the new API\n let detectErrorBoundary = opts.detectErrorBoundary;\n mapRouteProperties = route => ({\n hasErrorBoundary: detectErrorBoundary(route)\n });\n } else {\n mapRouteProperties = defaultMapRouteProperties;\n }\n // Config driven behavior flags\n let future = _extends({\n v7_relativeSplatPath: false,\n v7_throwAbortReason: false\n }, opts ? opts.future : null);\n let dataRoutes = convertRoutesToDataRoutes(routes, mapRouteProperties, undefined, manifest);\n /**\n * The query() method is intended for document requests, in which we want to\n * call an optional action and potentially multiple loaders for all nested\n * routes. It returns a StaticHandlerContext object, which is very similar\n * to the router state (location, loaderData, actionData, errors, etc.) and\n * also adds SSR-specific information such as the statusCode and headers\n * from action/loaders Responses.\n *\n * It _should_ never throw and should report all errors through the\n * returned context.errors object, properly associating errors to their error\n * boundary. Additionally, it tracks _deepestRenderedBoundaryId which can be\n * used to emulate React error boundaries during SSr by performing a second\n * pass only down to the boundaryId.\n *\n * The one exception where we do not return a StaticHandlerContext is when a\n * redirect response is returned or thrown from any action/loader. We\n * propagate that out and return the raw Response so the HTTP server can\n * return it directly.\n *\n * - `opts.requestContext` is an optional server context that will be passed\n * to actions/loaders in the `context` parameter\n * - `opts.skipLoaderErrorBubbling` is an optional parameter that will prevent\n * the bubbling of errors which allows single-fetch-type implementations\n * where the client will handle the bubbling and we may need to return data\n * for the handling route\n */\n async function query(request, _temp3) {\n let {\n requestContext,\n skipLoaderErrorBubbling,\n unstable_dataStrategy\n } = _temp3 === void 0 ? {} : _temp3;\n let url = new URL(request.url);\n let method = request.method;\n let location = createLocation("", createPath(url), null, "default");\n let matches = matchRoutes(dataRoutes, location, basename);\n // SSR supports HEAD requests while SPA doesn\'t\n if (!isValidMethod(method) && method !== "HEAD") {\n let error = getInternalRouterError(405, {\n method\n });\n let {\n matches: methodNotAllowedMatches,\n route\n } = getShortCircuitMatches(dataRoutes);\n return {\n basename,\n location,\n matches: methodNotAllowedMatches,\n loaderData: {},\n actionData: null,\n errors: {\n [route.id]: error\n },\n statusCode: error.status,\n loaderHeaders: {},\n actionHeaders: {},\n activeDeferreds: null\n };\n } else if (!matches) {\n let error = getInternalRouterError(404, {\n pathname: location.pathname\n });\n let {\n matches: notFoundMatches,\n route\n } = getShortCircuitMatches(dataRoutes);\n return {\n basename,\n location,\n matches: notFoundMatches,\n loaderData: {},\n actionData: null,\n errors: {\n [route.id]: error\n },\n statusCode: error.status,\n loaderHeaders: {},\n actionHeaders: {},\n activeDeferreds: null\n };\n }\n let result = await queryImpl(request, location, matches, requestContext, unstable_dataStrategy || null, skipLoaderErrorBubbling === true, null);\n if (isResponse(result)) {\n return result;\n }\n // When returning StaticHandlerContext, we patch back in the location here\n // since we need it for React Context. But this helps keep our submit and\n // loadRouteData operating on a Request instead of a Location\n return _extends({\n location,\n basename\n }, result);\n }\n /**\n * The queryRoute() method is intended for targeted route requests, either\n * for fetch ?_data requests or resource route requests. In this case, we\n * are only ever calling a single action or loader, and we are returning the\n * returned value directly. In most cases, this will be a Response returned\n * from the action/loader, but it may be a primitive or other value as well -\n * and in such cases the calling context should handle that accordingly.\n *\n * We do respect the throw/return differentiation, so if an action/loader\n * throws, then this method will throw the value. This is important so we\n * can do proper boundary identification in Remix where a thrown Response\n * must go to the Catch Boundary but a returned Response is happy-path.\n *\n * One thing to note is that any Router-initiated Errors that make sense\n * to associate with a status code will be thrown as an ErrorResponse\n * instance which include the raw Error, such that the calling context can\n * serialize the error as they see fit while including the proper response\n * code. Examples here are 404 and 405 errors that occur prior to reaching\n * any user-defined loaders.\n *\n * - `opts.routeId` allows you to specify the specific route handler to call.\n * If not provided the handler will determine the proper route by matching\n * against `request.url`\n * - `opts.requestContext` is an optional server context that will be passed\n * to actions/loaders in the `context` parameter\n */\n async function queryRoute(request, _temp4) {\n let {\n routeId,\n requestContext,\n unstable_dataStrategy\n } = _temp4 === void 0 ? {} : _temp4;\n let url = new URL(request.url);\n let method = request.method;\n let location = createLocation("", createPath(url), null, "default");\n let matches = matchRoutes(dataRoutes, location, basename);\n // SSR supports HEAD requests while SPA doesn\'t\n if (!isValidMethod(method) && method !== "HEAD" && method !== "OPTIONS") {\n throw getInternalRouterError(405, {\n method\n });\n } else if (!matches) {\n throw getInternalRouterError(404, {\n pathname: location.pathname\n });\n }\n let match = routeId ? matches.find(m => m.route.id === routeId) : getTargetMatch(matches, location);\n if (routeId && !match) {\n throw getInternalRouterError(403, {\n pathname: location.pathname,\n routeId\n });\n } else if (!match) {\n // This should never hit I don\'t think?\n throw getInternalRouterError(404, {\n pathname: location.pathname\n });\n }\n let result = await queryImpl(request, location, matches, requestContext, unstable_dataStrategy || null, false, match);\n if (isResponse(result)) {\n return result;\n }\n let error = result.errors ? Object.values(result.errors)[0] : undefined;\n if (error !== undefined) {\n // If we got back result.errors, that means the loader/action threw\n // _something_ that wasn\'t a Response, but it\'s not guaranteed/required\n // to be an `instanceof Error` either, so we have to use throw here to\n // preserve the "error" state outside of queryImpl.\n throw error;\n }\n // Pick off the right state value to return\n if (result.actionData) {\n return Object.values(result.actionData)[0];\n }\n if (result.loaderData) {\n var _result$activeDeferre;\n let data = Object.values(result.loaderData)[0];\n if ((_result$activeDeferre = result.activeDeferreds) != null && _result$activeDeferre[match.route.id]) {\n data[UNSAFE_DEFERRED_SYMBOL] = result.activeDeferreds[match.route.id];\n }\n return data;\n }\n return undefined;\n }\n async function queryImpl(request, location, matches, requestContext, unstable_dataStrategy, skipLoaderErrorBubbling, routeMatch) {\n invariant(request.signal, "query()/queryRoute() requests must contain an AbortController signal");\n try {\n if (isMutationMethod(request.method.toLowerCase())) {\n let result = await submit(request, matches, routeMatch || getTargetMatch(matches, location), requestContext, unstable_dataStrategy, skipLoaderErrorBubbling, routeMatch != null);\n return result;\n }\n let result = await loadRouteData(request, matches, requestContext, unstable_dataStrategy, skipLoaderErrorBubbling, routeMatch);\n return isResponse(result) ? result : _extends({}, result, {\n actionData: null,\n actionHeaders: {}\n });\n } catch (e) {\n // If the user threw/returned a Response in callLoaderOrAction for a\n // `queryRoute` call, we throw the `HandlerResult` to bail out early\n // and then return or throw the raw Response here accordingly\n if (isHandlerResult(e) && isResponse(e.result)) {\n if (e.type === ResultType.error) {\n throw e.result;\n }\n return e.result;\n }\n // Redirects are always returned since they don\'t propagate to catch\n // boundaries\n if (isRedirectResponse(e)) {\n return e;\n }\n throw e;\n }\n }\n async function submit(request, matches, actionMatch, requestContext, unstable_dataStrategy, skipLoaderErrorBubbling, isRouteRequest) {\n let result;\n if (!actionMatch.route.action && !actionMatch.route.lazy) {\n let error = getInternalRouterError(405, {\n method: request.method,\n pathname: new URL(request.url).pathname,\n routeId: actionMatch.route.id\n });\n if (isRouteRequest) {\n throw error;\n }\n result = {\n type: ResultType.error,\n error\n };\n } else {\n let results = await callDataStrategy("action", request, [actionMatch], matches, isRouteRequest, requestContext, unstable_dataStrategy);\n result = results[0];\n if (request.signal.aborted) {\n throwStaticHandlerAbortedError(request, isRouteRequest, future);\n }\n }\n if (isRedirectResult(result)) {\n // Uhhhh - this should never happen, we should always throw these from\n // callLoaderOrAction, but the type narrowing here keeps TS happy and we\n // can get back on the "throw all redirect responses" train here should\n // this ever happen :/\n throw new Response(null, {\n status: result.response.status,\n headers: {\n Location: result.response.headers.get("Location")\n }\n });\n }\n if (isDeferredResult(result)) {\n let error = getInternalRouterError(400, {\n type: "defer-action"\n });\n if (isRouteRequest) {\n throw error;\n }\n result = {\n type: ResultType.error,\n error\n };\n }\n if (isRouteRequest) {\n // Note: This should only be non-Response values if we get here, since\n // isRouteRequest should throw any Response received in callLoaderOrAction\n if (isErrorResult(result)) {\n throw result.error;\n }\n return {\n matches: [actionMatch],\n loaderData: {},\n actionData: {\n [actionMatch.route.id]: result.data\n },\n errors: null,\n // Note: statusCode + headers are unused here since queryRoute will\n // return the raw Response or value\n statusCode: 200,\n loaderHeaders: {},\n actionHeaders: {},\n activeDeferreds: null\n };\n }\n // Create a GET request for the loaders\n let loaderRequest = new Request(request.url, {\n headers: request.headers,\n redirect: request.redirect,\n signal: request.signal\n });\n if (isErrorResult(result)) {\n // Store off the pending error - we use it to determine which loaders\n // to call and will commit it when we complete the navigation\n let boundaryMatch = skipLoaderErrorBubbling ? actionMatch : findNearestBoundary(matches, actionMatch.route.id);\n let context = await loadRouteData(loaderRequest, matches, requestContext, unstable_dataStrategy, skipLoaderErrorBubbling, null, [boundaryMatch.route.id, result]);\n // action status codes take precedence over loader status codes\n return _extends({}, context, {\n statusCode: isRouteErrorResponse(result.error) ? result.error.status : result.statusCode != null ? result.statusCode : 500,\n actionData: null,\n actionHeaders: _extends({}, result.headers ? {\n [actionMatch.route.id]: result.headers\n } : {})\n });\n }\n let context = await loadRouteData(loaderRequest, matches, requestContext, unstable_dataStrategy, skipLoaderErrorBubbling, null);\n return _extends({}, context, {\n actionData: {\n [actionMatch.route.id]: result.data\n }\n }, result.statusCode ? {\n statusCode: result.statusCode\n } : {}, {\n actionHeaders: result.headers ? {\n [actionMatch.route.id]: result.headers\n } : {}\n });\n }\n async function loadRouteData(request, matches, requestContext, unstable_dataStrategy, skipLoaderErrorBubbling, routeMatch, pendingActionResult) {\n let isRouteRequest = routeMatch != null;\n // Short circuit if we have no loaders to run (queryRoute())\n if (isRouteRequest && !(routeMatch != null && routeMatch.route.loader) && !(routeMatch != null && routeMatch.route.lazy)) {\n throw getInternalRouterError(400, {\n method: request.method,\n pathname: new URL(request.url).pathname,\n routeId: routeMatch == null ? void 0 : routeMatch.route.id\n });\n }\n let requestMatches = routeMatch ? [routeMatch] : pendingActionResult && isErrorResult(pendingActionResult[1]) ? getLoaderMatchesUntilBoundary(matches, pendingActionResult[0]) : matches;\n let matchesToLoad = requestMatches.filter(m => m.route.loader || m.route.lazy);\n // Short circuit if we have no loaders to run (query())\n if (matchesToLoad.length === 0) {\n return {\n matches,\n // Add a null for all matched routes for proper revalidation on the client\n loaderData: matches.reduce((acc, m) => Object.assign(acc, {\n [m.route.id]: null\n }), {}),\n errors: pendingActionResult && isErrorResult(pendingActionResult[1]) ? {\n [pendingActionResult[0]]: pendingActionResult[1].error\n } : null,\n statusCode: 200,\n loaderHeaders: {},\n activeDeferreds: null\n };\n }\n let results = await callDataStrategy("loader", request, matchesToLoad, matches, isRouteRequest, requestContext, unstable_dataStrategy);\n if (request.signal.aborted) {\n throwStaticHandlerAbortedError(request, isRouteRequest, future);\n }\n // Process and commit output from loaders\n let activeDeferreds = new Map();\n let context = processRouteLoaderData(matches, matchesToLoad, results, pendingActionResult, activeDeferreds, skipLoaderErrorBubbling);\n // Add a null for any non-loader matches for proper revalidation on the client\n let executedLoaders = new Set(matchesToLoad.map(match => match.route.id));\n matches.forEach(match => {\n if (!executedLoaders.has(match.route.id)) {\n context.loaderData[match.route.id] = null;\n }\n });\n return _extends({}, context, {\n matches,\n activeDeferreds: activeDeferreds.size > 0 ? Object.fromEntries(activeDeferreds.entries()) : null\n });\n }\n // Utility wrapper for calling dataStrategy server-side without having to\n // pass around the manifest, mapRouteProperties, etc.\n async function callDataStrategy(type, request, matchesToLoad, matches, isRouteRequest, requestContext, unstable_dataStrategy) {\n let results = await callDataStrategyImpl(unstable_dataStrategy || defaultDataStrategy, type, request, matchesToLoad, matches, manifest, mapRouteProperties, requestContext);\n return await Promise.all(results.map((result, i) => {\n if (isRedirectHandlerResult(result)) {\n let response = result.result;\n // Throw redirects and let the server handle them with an HTTP redirect\n throw normalizeRelativeRoutingRedirectResponse(response, request, matchesToLoad[i].route.id, matches, basename, future.v7_relativeSplatPath);\n }\n if (isResponse(result.result) && isRouteRequest) {\n // For SSR single-route requests, we want to hand Responses back\n // directly without unwrapping\n throw result;\n }\n return convertHandlerResultToDataResult(result);\n }));\n }\n return {\n dataRoutes,\n query,\n queryRoute\n };\n}\n//#endregion\n////////////////////////////////////////////////////////////////////////////////\n//#region Helpers\n////////////////////////////////////////////////////////////////////////////////\n/**\n * Given an existing StaticHandlerContext and an error thrown at render time,\n * provide an updated StaticHandlerContext suitable for a second SSR render\n */\nfunction getStaticContextFromError(routes, context, error) {\n let newContext = _extends({}, context, {\n statusCode: isRouteErrorResponse(error) ? error.status : 500,\n errors: {\n [context._deepestRenderedBoundaryId || routes[0].id]: error\n }\n });\n return newContext;\n}\nfunction throwStaticHandlerAbortedError(request, isRouteRequest, future) {\n if (future.v7_throwAbortReason && request.signal.reason !== undefined) {\n throw request.signal.reason;\n }\n let method = isRouteRequest ? "queryRoute" : "query";\n throw new Error(method + "() call aborted: " + request.method + " " + request.url);\n}\nfunction isSubmissionNavigation(opts) {\n return opts != null && ("formData" in opts && opts.formData != null || "body" in opts && opts.body !== undefined);\n}\nfunction normalizeTo(location, matches, basename, prependBasename, to, v7_relativeSplatPath, fromRouteId, relative) {\n let contextualMatches;\n let activeRouteMatch;\n if (fromRouteId) {\n // Grab matches up to the calling route so our route-relative logic is\n // relative to the correct source route\n contextualMatches = [];\n for (let match of matches) {\n contextualMatches.push(match);\n if (match.route.id === fromRouteId) {\n activeRouteMatch = match;\n break;\n }\n }\n } else {\n contextualMatches = matches;\n activeRouteMatch = matches[matches.length - 1];\n }\n // Resolve the relative path\n let path = resolveTo(to ? to : ".", getResolveToMatches(contextualMatches, v7_relativeSplatPath), stripBasename(location.pathname, basename) || location.pathname, relative === "path");\n // When `to` is not specified we inherit search/hash from the current\n // location, unlike when to="." and we just inherit the path.\n // See https://github.com/remix-run/remix/issues/927\n if (to == null) {\n path.search = location.search;\n path.hash = location.hash;\n }\n // Add an ?index param for matched index routes if we don\'t already have one\n if ((to == null || to === "" || to === ".") && activeRouteMatch && activeRouteMatch.route.index && !hasNakedIndexQuery(path.search)) {\n path.search = path.search ? path.search.replace(/^\\?/, "?index&") : "?index";\n }\n // If we\'re operating within a basename, prepend it to the pathname. If\n // this is a root navigation, then just use the raw basename which allows\n // the basename to have full control over the presence of a trailing slash\n // on root actions\n if (prependBasename && basename !== "/") {\n path.pathname = path.pathname === "/" ? basename : joinPaths([basename, path.pathname]);\n }\n return createPath(path);\n}\n// Normalize navigation options by converting formMethod=GET formData objects to\n// URLSearchParams so they behave identically to links with query params\nfunction normalizeNavigateOptions(normalizeFormMethod, isFetcher, path, opts) {\n // Return location verbatim on non-submission navigations\n if (!opts || !isSubmissionNavigation(opts)) {\n return {\n path\n };\n }\n if (opts.formMethod && !isValidMethod(opts.formMethod)) {\n return {\n path,\n error: getInternalRouterError(405, {\n method: opts.formMethod\n })\n };\n }\n let getInvalidBodyError = () => ({\n path,\n error: getInternalRouterError(400, {\n type: "invalid-body"\n })\n });\n // Create a Submission on non-GET navigations\n let rawFormMethod = opts.formMethod || "get";\n let formMethod = normalizeFormMethod ? rawFormMethod.toUpperCase() : rawFormMethod.toLowerCase();\n let formAction = stripHashFromPath(path);\n if (opts.body !== undefined) {\n if (opts.formEncType === "text/plain") {\n // text only support POST/PUT/PATCH/DELETE submissions\n if (!isMutationMethod(formMethod)) {\n return getInvalidBodyError();\n }\n let text = typeof opts.body === "string" ? opts.body : opts.body instanceof FormData || opts.body instanceof URLSearchParams ?\n // https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#plain-text-form-data\n Array.from(opts.body.entries()).reduce((acc, _ref5) => {\n let [name, value] = _ref5;\n return "" + acc + name + "=" + value + "\\n";\n }, "") : String(opts.body);\n return {\n path,\n submission: {\n formMethod,\n formAction,\n formEncType: opts.formEncType,\n formData: undefined,\n json: undefined,\n text\n }\n };\n } else if (opts.formEncType === "application/json") {\n // json only supports POST/PUT/PATCH/DELETE submissions\n if (!isMutationMethod(formMethod)) {\n return getInvalidBodyError();\n }\n try {\n let json = typeof opts.body === "string" ? JSON.parse(opts.body) : opts.body;\n return {\n path,\n submission: {\n formMethod,\n formAction,\n formEncType: opts.formEncType,\n formData: undefined,\n json,\n text: undefined\n }\n };\n } catch (e) {\n return getInvalidBodyError();\n }\n }\n }\n invariant(typeof FormData === "function", "FormData is not available in this environment");\n let searchParams;\n let formData;\n if (opts.formData) {\n searchParams = convertFormDataToSearchParams(opts.formData);\n formData = opts.formData;\n } else if (opts.body instanceof FormData) {\n searchParams = convertFormDataToSearchParams(opts.body);\n formData = opts.body;\n } else if (opts.body instanceof URLSearchParams) {\n searchParams = opts.body;\n formData = convertSearchParamsToFormData(searchParams);\n } else if (opts.body == null) {\n searchParams = new URLSearchParams();\n formData = new FormData();\n } else {\n try {\n searchParams = new URLSearchParams(opts.body);\n formData = convertSearchParamsToFormData(searchParams);\n } catch (e) {\n return getInvalidBodyError();\n }\n }\n let submission = {\n formMethod,\n formAction,\n formEncType: opts && opts.formEncType || "application/x-www-form-urlencoded",\n formData,\n json: undefined,\n text: undefined\n };\n if (isMutationMethod(submission.formMethod)) {\n return {\n path,\n submission\n };\n }\n // Flatten submission onto URLSearchParams for GET submissions\n let parsedPath = parsePath(path);\n // On GET navigation submissions we can drop the ?index param from the\n // resulting location since all loaders will run. But fetcher GET submissions\n // only run a single loader so we need to preserve any incoming ?index params\n if (isFetcher && parsedPath.search && hasNakedIndexQuery(parsedPath.search)) {\n searchParams.append("index", "");\n }\n parsedPath.search = "?" + searchParams;\n return {\n path: createPath(parsedPath),\n submission\n };\n}\n// Filter out all routes below any caught error as they aren\'t going to\n// render so we don\'t need to load them\nfunction getLoaderMatchesUntilBoundary(matches, boundaryId) {\n let boundaryMatches = matches;\n if (boundaryId) {\n let index = matches.findIndex(m => m.route.id === boundaryId);\n if (index >= 0) {\n boundaryMatches = matches.slice(0, index);\n }\n }\n return boundaryMatches;\n}\nfunction getMatchesToLoad(history, state, matches, submission, location, isInitialLoad, skipActionErrorRevalidation, isRevalidationRequired, cancelledDeferredRoutes, cancelledFetcherLoads, deletedFetchers, fetchLoadMatches, fetchRedirectIds, routesToUse, basename, pendingActionResult) {\n let actionResult = pendingActionResult ? isErrorResult(pendingActionResult[1]) ? pendingActionResult[1].error : pendingActionResult[1].data : undefined;\n let currentUrl = history.createURL(state.location);\n let nextUrl = history.createURL(location);\n // Pick navigation matches that are net-new or qualify for revalidation\n let boundaryId = pendingActionResult && isErrorResult(pendingActionResult[1]) ? pendingActionResult[0] : undefined;\n let boundaryMatches = boundaryId ? getLoaderMatchesUntilBoundary(matches, boundaryId) : matches;\n // Don\'t revalidate loaders by default after action 4xx/5xx responses\n // when the flag is enabled. They can still opt-into revalidation via\n // `shouldRevalidate` via `actionResult`\n let actionStatus = pendingActionResult ? pendingActionResult[1].statusCode : undefined;\n let shouldSkipRevalidation = skipActionErrorRevalidation && actionStatus && actionStatus >= 400;\n let navigationMatches = boundaryMatches.filter((match, index) => {\n let {\n route\n } = match;\n if (route.lazy) {\n // We haven\'t loaded this route yet so we don\'t know if it\'s got a loader!\n return true;\n }\n if (route.loader == null) {\n return false;\n }\n if (isInitialLoad) {\n if (typeof route.loader !== "function" || route.loader.hydrate) {\n return true;\n }\n return state.loaderData[route.id] === undefined && (\n // Don\'t re-run if the loader ran and threw an error\n !state.errors || state.errors[route.id] === undefined);\n }\n // Always call the loader on new route instances and pending defer cancellations\n if (isNewLoader(state.loaderData, state.matches[index], match) || cancelledDeferredRoutes.some(id => id === match.route.id)) {\n return true;\n }\n // This is the default implementation for when we revalidate. If the route\n // provides it\'s own implementation, then we give them full control but\n // provide this value so they can leverage it if needed after they check\n // their own specific use cases\n let currentRouteMatch = state.matches[index];\n let nextRouteMatch = match;\n return shouldRevalidateLoader(match, _extends({\n currentUrl,\n currentParams: currentRouteMatch.params,\n nextUrl,\n nextParams: nextRouteMatch.params\n }, submission, {\n actionResult,\n unstable_actionStatus: actionStatus,\n defaultShouldRevalidate: shouldSkipRevalidation ? false :\n // Forced revalidation due to submission, useRevalidator, or X-Remix-Revalidate\n isRevalidationRequired || currentUrl.pathname + currentUrl.search === nextUrl.pathname + nextUrl.search ||\n // Search params affect all loaders\n currentUrl.search !== nextUrl.search || isNewRouteInstance(currentRouteMatch, nextRouteMatch)\n }));\n });\n // Pick fetcher.loads that need to be revalidated\n let revalidatingFetchers = [];\n fetchLoadMatches.forEach((f, key) => {\n // Don\'t revalidate:\n // - on initial load (shouldn\'t be any fetchers then anyway)\n // - if fetcher won\'t be present in the subsequent render\n // - no longer matches the URL (v7_fetcherPersist=false)\n // - was unmounted but persisted due to v7_fetcherPersist=true\n if (isInitialLoad || !matches.some(m => m.route.id === f.routeId) || deletedFetchers.has(key)) {\n return;\n }\n let fetcherMatches = matchRoutes(routesToUse, f.path, basename);\n // If the fetcher path no longer matches, push it in with null matches so\n // we can trigger a 404 in callLoadersAndMaybeResolveData. Note this is\n // currently only a use-case for Remix HMR where the route tree can change\n // at runtime and remove a route previously loaded via a fetcher\n if (!fetcherMatches) {\n revalidatingFetchers.push({\n key,\n routeId: f.routeId,\n path: f.path,\n matches: null,\n match: null,\n controller: null\n });\n return;\n }\n // Revalidating fetchers are decoupled from the route matches since they\n // load from a static href. They revalidate based on explicit revalidation\n // (submission, useRevalidator, or X-Remix-Revalidate)\n let fetcher = state.fetchers.get(key);\n let fetcherMatch = getTargetMatch(fetcherMatches, f.path);\n let shouldRevalidate = false;\n if (fetchRedirectIds.has(key)) {\n // Never trigger a revalidation of an actively redirecting fetcher\n shouldRevalidate = false;\n } else if (cancelledFetcherLoads.includes(key)) {\n // Always revalidate if the fetcher was cancelled\n shouldRevalidate = true;\n } else if (fetcher && fetcher.state !== "idle" && fetcher.data === undefined) {\n // If the fetcher hasn\'t ever completed loading yet, then this isn\'t a\n // revalidation, it would just be a brand new load if an explicit\n // revalidation is required\n shouldRevalidate = isRevalidationRequired;\n } else {\n // Otherwise fall back on any user-defined shouldRevalidate, defaulting\n // to explicit revalidations only\n shouldRevalidate = shouldRevalidateLoader(fetcherMatch, _extends({\n currentUrl,\n currentParams: state.matches[state.matches.length - 1].params,\n nextUrl,\n nextParams: matches[matches.length - 1].params\n }, submission, {\n actionResult,\n unstable_actionStatus: actionStatus,\n defaultShouldRevalidate: shouldSkipRevalidation ? false : isRevalidationRequired\n }));\n }\n if (shouldRevalidate) {\n revalidatingFetchers.push({\n key,\n routeId: f.routeId,\n path: f.path,\n matches: fetcherMatches,\n match: fetcherMatch,\n controller: new AbortController()\n });\n }\n });\n return [navigationMatches, revalidatingFetchers];\n}\nfunction isNewLoader(currentLoaderData, currentMatch, match) {\n let isNew =\n // [a] -> [a, b]\n !currentMatch ||\n // [a, b] -> [a, c]\n match.route.id !== currentMatch.route.id;\n // Handle the case that we don\'t have data for a re-used route, potentially\n // from a prior error or from a cancelled pending deferred\n let isMissingData = currentLoaderData[match.route.id] === undefined;\n // Always load if this is a net-new route or we don\'t yet have data\n return isNew || isMissingData;\n}\nfunction isNewRouteInstance(currentMatch, match) {\n let currentPath = currentMatch.route.path;\n return (\n // param change for this match, /users/123 -> /users/456\n currentMatch.pathname !== match.pathname ||\n // splat param changed, which is not present in match.path\n // e.g. /files/images/avatar.jpg -> files/finances.xls\n currentPath != null && currentPath.endsWith("*") && currentMatch.params["*"] !== match.params["*"]\n );\n}\nfunction shouldRevalidateLoader(loaderMatch, arg) {\n if (loaderMatch.route.shouldRevalidate) {\n let routeChoice = loaderMatch.route.shouldRevalidate(arg);\n if (typeof routeChoice === "boolean") {\n return routeChoice;\n }\n }\n return arg.defaultShouldRevalidate;\n}\n/**\n * Idempotent utility to execute patchRoutesOnMiss() to lazily load route\n * definitions and update the routes/routeManifest\n */\nasync function loadLazyRouteChildren(patchRoutesOnMissImpl, path, matches, routes, manifest, mapRouteProperties, pendingRouteChildren, signal) {\n let key = [path, ...matches.map(m => m.route.id)].join("-");\n try {\n let pending = pendingRouteChildren.get(key);\n if (!pending) {\n pending = patchRoutesOnMissImpl({\n path,\n matches,\n patch: (routeId, children) => {\n if (!signal.aborted) {\n patchRoutesImpl(routeId, children, routes, manifest, mapRouteProperties);\n }\n }\n });\n pendingRouteChildren.set(key, pending);\n }\n if (pending && isPromise(pending)) {\n await pending;\n }\n } finally {\n pendingRouteChildren.delete(key);\n }\n}\nfunction patchRoutesImpl(routeId, children, routesToUse, manifest, mapRouteProperties) {\n if (routeId) {\n var _route$children;\n let route = manifest[routeId];\n invariant(route, "No route found to patch children into: routeId = " + routeId);\n let dataChildren = convertRoutesToDataRoutes(children, mapRouteProperties, [routeId, "patch", String(((_route$children = route.children) == null ? void 0 : _route$children.length) || "0")], manifest);\n if (route.children) {\n route.children.push(...dataChildren);\n } else {\n route.children = dataChildren;\n }\n } else {\n let dataChildren = convertRoutesToDataRoutes(children, mapRouteProperties, ["patch", String(routesToUse.length || "0")], manifest);\n routesToUse.push(...dataChildren);\n }\n}\n/**\n * Execute route.lazy() methods to lazily load route modules (loader, action,\n * shouldRevalidate) and update the routeManifest in place which shares objects\n * with dataRoutes so those get updated as well.\n */\nasync function loadLazyRouteModule(route, mapRouteProperties, manifest) {\n if (!route.lazy) {\n return;\n }\n let lazyRoute = await route.lazy();\n // If the lazy route function was executed and removed by another parallel\n // call then we can return - first lazy() to finish wins because the return\n // value of lazy is expected to be static\n if (!route.lazy) {\n return;\n }\n let routeToUpdate = manifest[route.id];\n invariant(routeToUpdate, "No route found in manifest");\n // Update the route in place. This should be safe because there\'s no way\n // we could yet be sitting on this route as we can\'t get there without\n // resolving lazy() first.\n //\n // This is different than the HMR "update" use-case where we may actively be\n // on the route being updated. The main concern boils down to "does this\n // mutation affect any ongoing navigations or any current state.matches\n // values?". If not, it should be safe to update in place.\n let routeUpdates = {};\n for (let lazyRouteProperty in lazyRoute) {\n let staticRouteValue = routeToUpdate[lazyRouteProperty];\n let isPropertyStaticallyDefined = staticRouteValue !== undefined &&\n // This property isn\'t static since it should always be updated based\n // on the route updates\n lazyRouteProperty !== "hasErrorBoundary";\n warning(!isPropertyStaticallyDefined, "Route \\"" + routeToUpdate.id + "\\" has a static property \\"" + lazyRouteProperty + "\\" " + "defined but its lazy function is also returning a value for this property. " + ("The lazy route property \\"" + lazyRouteProperty + "\\" will be ignored."));\n if (!isPropertyStaticallyDefined && !immutableRouteKeys.has(lazyRouteProperty)) {\n routeUpdates[lazyRouteProperty] = lazyRoute[lazyRouteProperty];\n }\n }\n // Mutate the route with the provided updates. Do this first so we pass\n // the updated version to mapRouteProperties\n Object.assign(routeToUpdate, routeUpdates);\n // Mutate the `hasErrorBoundary` property on the route based on the route\n // updates and remove the `lazy` function so we don\'t resolve the lazy\n // route again.\n Object.assign(routeToUpdate, _extends({}, mapRouteProperties(routeToUpdate), {\n lazy: undefined\n }));\n}\n// Default implementation of `dataStrategy` which fetches all loaders in parallel\nfunction defaultDataStrategy(opts) {\n return Promise.all(opts.matches.map(m => m.resolve()));\n}\nasync function callDataStrategyImpl(dataStrategyImpl, type, request, matchesToLoad, matches, manifest, mapRouteProperties, requestContext) {\n let routeIdsToLoad = matchesToLoad.reduce((acc, m) => acc.add(m.route.id), new Set());\n let loadedMatches = new Set();\n // Send all matches here to allow for a middleware-type implementation.\n // handler will be a no-op for unneeded routes and we filter those results\n // back out below.\n let results = await dataStrategyImpl({\n matches: matches.map(match => {\n let shouldLoad = routeIdsToLoad.has(match.route.id);\n // `resolve` encapsulates the route.lazy, executing the\n // loader/action, and mapping return values/thrown errors to a\n // HandlerResult. Users can pass a callback to take fine-grained control\n // over the execution of the loader/action\n let resolve = handlerOverride => {\n loadedMatches.add(match.route.id);\n return shouldLoad ? callLoaderOrAction(type, request, match, manifest, mapRouteProperties, handlerOverride, requestContext) : Promise.resolve({\n type: ResultType.data,\n result: undefined\n });\n };\n return _extends({}, match, {\n shouldLoad,\n resolve\n });\n }),\n request,\n params: matches[0].params,\n context: requestContext\n });\n // Throw if any loadRoute implementations not called since they are what\n // ensures a route is fully loaded\n matches.forEach(m => invariant(loadedMatches.has(m.route.id), "`match.resolve()` was not called for route id \\"" + m.route.id + "\\". " + "You must call `match.resolve()` on every match passed to " + "`dataStrategy` to ensure all routes are properly loaded."));\n // Filter out any middleware-only matches for which we didn\'t need to run handlers\n return results.filter((_, i) => routeIdsToLoad.has(matches[i].route.id));\n}\n// Default logic for calling a loader/action is the user has no specified a dataStrategy\nasync function callLoaderOrAction(type, request, match, manifest, mapRouteProperties, handlerOverride, staticContext) {\n let result;\n let onReject;\n let runHandler = handler => {\n // Setup a promise we can race against so that abort signals short circuit\n let reject;\n // This will never resolve so safe to type it as Promise<HandlerResult> to\n // satisfy the function return value\n let abortPromise = new Promise((_, r) => reject = r);\n onReject = () => reject();\n request.signal.addEventListener("abort", onReject);\n let actualHandler = ctx => {\n if (typeof handler !== "function") {\n return Promise.reject(new Error("You cannot call the handler for a route which defines a boolean " + ("\\"" + type + "\\" [routeId: " + match.route.id + "]")));\n }\n return handler({\n request,\n params: match.params,\n context: staticContext\n }, ...(ctx !== undefined ? [ctx] : []));\n };\n let handlerPromise;\n if (handlerOverride) {\n handlerPromise = handlerOverride(ctx => actualHandler(ctx));\n } else {\n handlerPromise = (async () => {\n try {\n let val = await actualHandler();\n return {\n type: "data",\n result: val\n };\n } catch (e) {\n return {\n type: "error",\n result: e\n };\n }\n })();\n }\n return Promise.race([handlerPromise, abortPromise]);\n };\n try {\n let handler = match.route[type];\n if (match.route.lazy) {\n if (handler) {\n // Run statically defined handler in parallel with lazy()\n let handlerError;\n let [value] = await Promise.all([\n // If the handler throws, don\'t let it immediately bubble out,\n // since we need to let the lazy() execution finish so we know if this\n // route has a boundary that can handle the error\n runHandler(handler).catch(e => {\n handlerError = e;\n }), loadLazyRouteModule(match.route, mapRouteProperties, manifest)]);\n if (handlerError !== undefined) {\n throw handlerError;\n }\n result = value;\n } else {\n // Load lazy route module, then run any returned handler\n await loadLazyRouteModule(match.route, mapRouteProperties, manifest);\n handler = match.route[type];\n if (handler) {\n // Handler still runs even if we got interrupted to maintain consistency\n // with un-abortable behavior of handler execution on non-lazy or\n // previously-lazy-loaded routes\n result = await runHandler(handler);\n } else if (type === "action") {\n let url = new URL(request.url);\n let pathname = url.pathname + url.search;\n throw getInternalRouterError(405, {\n method: request.method,\n pathname,\n routeId: match.route.id\n });\n } else {\n // lazy() route has no loader to run. Short circuit here so we don\'t\n // hit the invariant below that errors on returning undefined.\n return {\n type: ResultType.data,\n result: undefined\n };\n }\n }\n } else if (!handler) {\n let url = new URL(request.url);\n let pathname = url.pathname + url.search;\n throw getInternalRouterError(404, {\n pathname\n });\n } else {\n result = await runHandler(handler);\n }\n invariant(result.result !== undefined, "You defined " + (type === "action" ? "an action" : "a loader") + " for route " + ("\\"" + match.route.id + "\\" but didn\'t return anything from your `" + type + "` ") + "function. Please return a value or `null`.");\n } catch (e) {\n // We should already be catching and converting normal handler executions to\n // HandlerResults and returning them, so anything that throws here is an\n // unexpected error we still need to wrap\n return {\n type: ResultType.error,\n result: e\n };\n } finally {\n if (onReject) {\n request.signal.removeEventListener("abort", onReject);\n }\n }\n return result;\n}\nasync function convertHandlerResultToDataResult(handlerResult) {\n let {\n result,\n type,\n status\n } = handlerResult;\n if (isResponse(result)) {\n let data;\n try {\n let contentType = result.headers.get("Content-Type");\n // Check between word boundaries instead of startsWith() due to the last\n // paragraph of https://httpwg.org/specs/rfc9110.html#field.content-type\n if (contentType && /\\bapplication\\/json\\b/.test(contentType)) {\n if (result.body == null) {\n data = null;\n } else {\n data = await result.json();\n }\n } else {\n data = await result.text();\n }\n } catch (e) {\n return {\n type: ResultType.error,\n error: e\n };\n }\n if (type === ResultType.error) {\n return {\n type: ResultType.error,\n error: new ErrorResponseImpl(result.status, result.statusText, data),\n statusCode: result.status,\n headers: result.headers\n };\n }\n return {\n type: ResultType.data,\n data,\n statusCode: result.status,\n headers: result.headers\n };\n }\n if (type === ResultType.error) {\n return {\n type: ResultType.error,\n error: result,\n statusCode: isRouteErrorResponse(result) ? result.status : status\n };\n }\n if (isDeferredData(result)) {\n var _result$init, _result$init2;\n return {\n type: ResultType.deferred,\n deferredData: result,\n statusCode: (_result$init = result.init) == null ? void 0 : _result$init.status,\n headers: ((_result$init2 = result.init) == null ? void 0 : _result$init2.headers) && new Headers(result.init.headers)\n };\n }\n return {\n type: ResultType.data,\n data: result,\n statusCode: status\n };\n}\n// Support relative routing in internal redirects\nfunction normalizeRelativeRoutingRedirectResponse(response, request, routeId, matches, basename, v7_relativeSplatPath) {\n let location = response.headers.get("Location");\n invariant(location, "Redirects returned/thrown from loaders/actions must have a Location header");\n if (!ABSOLUTE_URL_REGEX.test(location)) {\n let trimmedMatches = matches.slice(0, matches.findIndex(m => m.route.id === routeId) + 1);\n location = normalizeTo(new URL(request.url), trimmedMatches, basename, true, location, v7_relativeSplatPath);\n response.headers.set("Location", location);\n }\n return response;\n}\nfunction normalizeRedirectLocation(location, currentUrl, basename) {\n if (ABSOLUTE_URL_REGEX.test(location)) {\n // Strip off the protocol+origin for same-origin + same-basename absolute redirects\n let normalizedLocation = location;\n let url = normalizedLocation.startsWith("//") ? new URL(currentUrl.protocol + normalizedLocation) : new URL(normalizedLocation);\n let isSameBasename = stripBasename(url.pathname, basename) != null;\n if (url.origin === currentUrl.origin && isSameBasename) {\n return url.pathname + url.search + url.hash;\n }\n }\n return location;\n}\n// Utility method for creating the Request instances for loaders/actions during\n// client-side navigations and fetches. During SSR we will always have a\n// Request instance from the static handler (query/queryRoute)\nfunction createClientSideRequest(history, location, signal, submission) {\n let url = history.createURL(stripHashFromPath(location)).toString();\n let init = {\n signal\n };\n if (submission && isMutationMethod(submission.formMethod)) {\n let {\n formMethod,\n formEncType\n } = submission;\n // Didn\'t think we needed this but it turns out unlike other methods, patch\n // won\'t be properly normalized to uppercase and results in a 405 error.\n // See: https://fetch.spec.whatwg.org/#concept-method\n init.method = formMethod.toUpperCase();\n if (formEncType === "application/json") {\n init.headers = new Headers({\n "Content-Type": formEncType\n });\n init.body = JSON.stringify(submission.json);\n } else if (formEncType === "text/plain") {\n // Content-Type is inferred (https://fetch.spec.whatwg.org/#dom-request)\n init.body = submission.text;\n } else if (formEncType === "application/x-www-form-urlencoded" && submission.formData) {\n // Content-Type is inferred (https://fetch.spec.whatwg.org/#dom-request)\n init.body = convertFormDataToSearchParams(submission.formData);\n } else {\n // Content-Type is inferred (https://fetch.spec.whatwg.org/#dom-request)\n init.body = submission.formData;\n }\n }\n return new Request(url, init);\n}\nfunction convertFormDataToSearchParams(formData) {\n let searchParams = new URLSearchParams();\n for (let [key, value] of formData.entries()) {\n // https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#converting-an-entry-list-to-a-list-of-name-value-pairs\n searchParams.append(key, typeof value === "string" ? value : value.name);\n }\n return searchParams;\n}\nfunction convertSearchParamsToFormData(searchParams) {\n let formData = new FormData();\n for (let [key, value] of searchParams.entries()) {\n formData.append(key, value);\n }\n return formData;\n}\nfunction processRouteLoaderData(matches, matchesToLoad, results, pendingActionResult, activeDeferreds, skipLoaderErrorBubbling) {\n // Fill in loaderData/errors from our loaders\n let loaderData = {};\n let errors = null;\n let statusCode;\n let foundError = false;\n let loaderHeaders = {};\n let pendingError = pendingActionResult && isErrorResult(pendingActionResult[1]) ? pendingActionResult[1].error : undefined;\n // Process loader results into state.loaderData/state.errors\n results.forEach((result, index) => {\n let id = matchesToLoad[index].route.id;\n invariant(!isRedirectResult(result), "Cannot handle redirect results in processLoaderData");\n if (isErrorResult(result)) {\n let error = result.error;\n // If we have a pending action error, we report it at the highest-route\n // that throws a loader error, and then clear it out to indicate that\n // it was consumed\n if (pendingError !== undefined) {\n error = pendingError;\n pendingError = undefined;\n }\n errors = errors || {};\n if (skipLoaderErrorBubbling) {\n errors[id] = error;\n } else {\n // Look upwards from the matched route for the closest ancestor error\n // boundary, defaulting to the root match. Prefer higher error values\n // if lower errors bubble to the same boundary\n let boundaryMatch = findNearestBoundary(matches, id);\n if (errors[boundaryMatch.route.id] == null) {\n errors[boundaryMatch.route.id] = error;\n }\n }\n // Clear our any prior loaderData for the throwing route\n loaderData[id] = undefined;\n // Once we find our first (highest) error, we set the status code and\n // prevent deeper status codes from overriding\n if (!foundError) {\n foundError = true;\n statusCode = isRouteErrorResponse(result.error) ? result.error.status : 500;\n }\n if (result.headers) {\n loaderHeaders[id] = result.headers;\n }\n } else {\n if (isDeferredResult(result)) {\n activeDeferreds.set(id, result.deferredData);\n loaderData[id] = result.deferredData.data;\n // Error status codes always override success status codes, but if all\n // loaders are successful we take the deepest status code.\n if (result.statusCode != null && result.statusCode !== 200 && !foundError) {\n statusCode = result.statusCode;\n }\n if (result.headers) {\n loaderHeaders[id] = result.headers;\n }\n } else {\n loaderData[id] = result.data;\n // Error status codes always override success status codes, but if all\n // loaders are successful we take the deepest status code.\n if (result.statusCode && result.statusCode !== 200 && !foundError) {\n statusCode = result.statusCode;\n }\n if (result.headers) {\n loaderHeaders[id] = result.headers;\n }\n }\n }\n });\n // If we didn\'t consume the pending action error (i.e., all loaders\n // resolved), then consume it here. Also clear out any loaderData for the\n // throwing route\n if (pendingError !== undefined && pendingActionResult) {\n errors = {\n [pendingActionResult[0]]: pendingError\n };\n loaderData[pendingActionResult[0]] = undefined;\n }\n return {\n loaderData,\n errors,\n statusCode: statusCode || 200,\n loaderHeaders\n };\n}\nfunction processLoaderData(state, matches, matchesToLoad, results, pendingActionResult, revalidatingFetchers, fetcherResults, activeDeferreds) {\n let {\n loaderData,\n errors\n } = processRouteLoaderData(matches, matchesToLoad, results, pendingActionResult, activeDeferreds, false // This method is only called client side so we always want to bubble\n );\n // Process results from our revalidating fetchers\n for (let index = 0; index < revalidatingFetchers.length; index++) {\n let {\n key,\n match,\n controller\n } = revalidatingFetchers[index];\n invariant(fetcherResults !== undefined && fetcherResults[index] !== undefined, "Did not find corresponding fetcher result");\n let result = fetcherResults[index];\n // Process fetcher non-redirect errors\n if (controller && controller.signal.aborted) {\n // Nothing to do for aborted fetchers\n continue;\n } else if (isErrorResult(result)) {\n let boundaryMatch = findNearestBoundary(state.matches, match == null ? void 0 : match.route.id);\n if (!(errors && errors[boundaryMatch.route.id])) {\n errors = _extends({}, errors, {\n [boundaryMatch.route.id]: result.error\n });\n }\n state.fetchers.delete(key);\n } else if (isRedirectResult(result)) {\n // Should never get here, redirects should get processed above, but we\n // keep this to type narrow to a success result in the else\n invariant(false, "Unhandled fetcher revalidation redirect");\n } else if (isDeferredResult(result)) {\n // Should never get here, deferred data should be awaited for fetchers\n // in resolveDeferredResults\n invariant(false, "Unhandled fetcher deferred data");\n } else {\n let doneFetcher = getDoneFetcher(result.data);\n state.fetchers.set(key, doneFetcher);\n }\n }\n return {\n loaderData,\n errors\n };\n}\nfunction mergeLoaderData(loaderData, newLoaderData, matches, errors) {\n let mergedLoaderData = _extends({}, newLoaderData);\n for (let match of matches) {\n let id = match.route.id;\n if (newLoaderData.hasOwnProperty(id)) {\n if (newLoaderData[id] !== undefined) {\n mergedLoaderData[id] = newLoaderData[id];\n }\n } else if (loaderData[id] !== undefined && match.route.loader) {\n // Preserve existing keys not included in newLoaderData and where a loader\n // wasn\'t removed by HMR\n mergedLoaderData[id] = loaderData[id];\n }\n if (errors && errors.hasOwnProperty(id)) {\n // Don\'t keep any loader data below the boundary\n break;\n }\n }\n return mergedLoaderData;\n}\nfunction getActionDataForCommit(pendingActionResult) {\n if (!pendingActionResult) {\n return {};\n }\n return isErrorResult(pendingActionResult[1]) ? {\n // Clear out prior actionData on errors\n actionData: {}\n } : {\n actionData: {\n [pendingActionResult[0]]: pendingActionResult[1].data\n }\n };\n}\n// Find the nearest error boundary, looking upwards from the leaf route (or the\n// route specified by routeId) for the closest ancestor error boundary,\n// defaulting to the root match\nfunction findNearestBoundary(matches, routeId) {\n let eligibleMatches = routeId ? matches.slice(0, matches.findIndex(m => m.route.id === routeId) + 1) : [...matches];\n return eligibleMatches.reverse().find(m => m.route.hasErrorBoundary === true) || matches[0];\n}\nfunction getShortCircuitMatches(routes) {\n // Prefer a root layout route if present, otherwise shim in a route object\n let route = routes.length === 1 ? routes[0] : routes.find(r => r.index || !r.path || r.path === "/") || {\n id: "__shim-error-route__"\n };\n return {\n matches: [{\n params: {},\n pathname: "",\n pathnameBase: "",\n route\n }],\n route\n };\n}\nfunction getInternalRouterError(status, _temp5) {\n let {\n pathname,\n routeId,\n method,\n type,\n message\n } = _temp5 === void 0 ? {} : _temp5;\n let statusText = "Unknown Server Error";\n let errorMessage = "Unknown @remix-run/router error";\n if (status === 400) {\n statusText = "Bad Request";\n if (type === "route-discovery") {\n errorMessage = "Unable to match URL \\"" + pathname + "\\" - the `children()` function for " + ("route `" + routeId + "` threw the following error:\\n" + message);\n } else if (method && pathname && routeId) {\n errorMessage = "You made a " + method + " request to \\"" + pathname + "\\" but " + ("did not provide a `loader` for route \\"" + routeId + "\\", ") + "so there is no way to handle the request.";\n } else if (type === "defer-action") {\n errorMessage = "defer() is not supported in actions";\n } else if (type === "invalid-body") {\n errorMessage = "Unable to encode submission body";\n }\n } else if (status === 403) {\n statusText = "Forbidden";\n errorMessage = "Route \\"" + routeId + "\\" does not match URL \\"" + pathname + "\\"";\n } else if (status === 404) {\n statusText = "Not Found";\n errorMessage = "No route matches URL \\"" + pathname + "\\"";\n } else if (status === 405) {\n statusText = "Method Not Allowed";\n if (method && pathname && routeId) {\n errorMessage = "You made a " + method.toUpperCase() + " request to \\"" + pathname + "\\" but " + ("did not provide an `action` for route \\"" + routeId + "\\", ") + "so there is no way to handle the request.";\n } else if (method) {\n errorMessage = "Invalid request method \\"" + method.toUpperCase() + "\\"";\n }\n }\n return new ErrorResponseImpl(status || 500, statusText, new Error(errorMessage), true);\n}\n// Find any returned redirect errors, starting from the lowest match\nfunction findRedirect(results) {\n for (let i = results.length - 1; i >= 0; i--) {\n let result = results[i];\n if (isRedirectResult(result)) {\n return {\n result,\n idx: i\n };\n }\n }\n}\nfunction stripHashFromPath(path) {\n let parsedPath = typeof path === "string" ? parsePath(path) : path;\n return createPath(_extends({}, parsedPath, {\n hash: ""\n }));\n}\nfunction isHashChangeOnly(a, b) {\n if (a.pathname !== b.pathname || a.search !== b.search) {\n return false;\n }\n if (a.hash === "") {\n // /page -> /page#hash\n return b.hash !== "";\n } else if (a.hash === b.hash) {\n // /page#hash -> /page#hash\n return true;\n } else if (b.hash !== "") {\n // /page#hash -> /page#other\n return true;\n }\n // If the hash is removed the browser will re-perform a request to the server\n // /page#hash -> /page\n return false;\n}\nfunction isPromise(val) {\n return typeof val === "object" && val != null && "then" in val;\n}\nfunction isHandlerResult(result) {\n return result != null && typeof result === "object" && "type" in result && "result" in result && (result.type === ResultType.data || result.type === ResultType.error);\n}\nfunction isRedirectHandlerResult(result) {\n return isResponse(result.result) && redirectStatusCodes.has(result.result.status);\n}\nfunction isDeferredResult(result) {\n return result.type === ResultType.deferred;\n}\nfunction isErrorResult(result) {\n return result.type === ResultType.error;\n}\nfunction isRedirectResult(result) {\n return (result && result.type) === ResultType.redirect;\n}\nfunction isDeferredData(value) {\n let deferred = value;\n return deferred && typeof deferred === "object" && typeof deferred.data === "object" && typeof deferred.subscribe === "function" && typeof deferred.cancel === "function" && typeof deferred.resolveData === "function";\n}\nfunction isResponse(value) {\n return value != null && typeof value.status === "number" && typeof value.statusText === "string" && typeof value.headers === "object" && typeof value.body !== "undefined";\n}\nfunction isRedirectResponse(result) {\n if (!isResponse(result)) {\n return false;\n }\n let status = result.status;\n let location = result.headers.get("Location");\n return status >= 300 && status <= 399 && location != null;\n}\nfunction isValidMethod(method) {\n return validRequestMethods.has(method.toLowerCase());\n}\nfunction isMutationMethod(method) {\n return validMutationMethods.has(method.toLowerCase());\n}\nasync function resolveDeferredResults(currentMatches, matchesToLoad, results, signals, isFetcher, currentLoaderData) {\n for (let index = 0; index < results.length; index++) {\n let result = results[index];\n let match = matchesToLoad[index];\n // If we don\'t have a match, then we can have a deferred result to do\n // anything with. This is for revalidating fetchers where the route was\n // removed during HMR\n if (!match) {\n continue;\n }\n let currentMatch = currentMatches.find(m => m.route.id === match.route.id);\n let isRevalidatingLoader = currentMatch != null && !isNewRouteInstance(currentMatch, match) && (currentLoaderData && currentLoaderData[match.route.id]) !== undefined;\n if (isDeferredResult(result) && (isFetcher || isRevalidatingLoader)) {\n // Note: we do not have to touch activeDeferreds here since we race them\n // against the signal in resolveDeferredData and they\'ll get aborted\n // there if needed\n let signal = signals[index];\n invariant(signal, "Expected an AbortSignal for revalidating fetcher deferred result");\n await resolveDeferredData(result, signal, isFetcher).then(result => {\n if (result) {\n results[index] = result || results[index];\n }\n });\n }\n }\n}\nasync function resolveDeferredData(result, signal, unwrap) {\n if (unwrap === void 0) {\n unwrap = false;\n }\n let aborted = await result.deferredData.resolveData(signal);\n if (aborted) {\n return;\n }\n if (unwrap) {\n try {\n return {\n type: ResultType.data,\n data: result.deferredData.unwrappedData\n };\n } catch (e) {\n // Handle any TrackedPromise._error values encountered while unwrapping\n return {\n type: ResultType.error,\n error: e\n };\n }\n }\n return {\n type: ResultType.data,\n data: result.deferredData.data\n };\n}\nfunction hasNakedIndexQuery(search) {\n return new URLSearchParams(search).getAll("index").some(v => v === "");\n}\nfunction getTargetMatch(matches, location) {\n let search = typeof location === "string" ? parsePath(location).search : location.search;\n if (matches[matches.length - 1].route.index && hasNakedIndexQuery(search || "")) {\n // Return the leaf index route when index is present\n return matches[matches.length - 1];\n }\n // Otherwise grab the deepest "path contributing" match (ignoring index and\n // pathless layout routes)\n let pathMatches = getPathContributingMatches(matches);\n return pathMatches[pathMatches.length - 1];\n}\nfunction getSubmissionFromNavigation(navigation) {\n let {\n formMethod,\n formAction,\n formEncType,\n text,\n formData,\n json\n } = navigation;\n if (!formMethod || !formAction || !formEncType) {\n return;\n }\n if (text != null) {\n return {\n formMethod,\n formAction,\n formEncType,\n formData: undefined,\n json: undefined,\n text\n };\n } else if (formData != null) {\n return {\n formMethod,\n formAction,\n formEncType,\n formData,\n json: undefined,\n text: undefined\n };\n } else if (json !== undefined) {\n return {\n formMethod,\n formAction,\n formEncType,\n formData: undefined,\n json,\n text: undefined\n };\n }\n}\nfunction getLoadingNavigation(location, submission) {\n if (submission) {\n let navigation = {\n state: "loading",\n location,\n formMethod: submission.formMethod,\n formAction: submission.formAction,\n formEncType: submission.formEncType,\n formData: submission.formData,\n json: submission.json,\n text: submission.text\n };\n return navigation;\n } else {\n let navigation = {\n state: "loading",\n location,\n formMethod: undefined,\n formAction: undefined,\n formEncType: undefined,\n formData: undefined,\n json: undefined,\n text: undefined\n };\n return navigation;\n }\n}\nfunction getSubmittingNavigation(location, submission) {\n let navigation = {\n state: "submitting",\n location,\n formMethod: submission.formMethod,\n formAction: submission.formAction,\n formEncType: submission.formEncType,\n formData: submission.formData,\n json: submission.json,\n text: submission.text\n };\n return navigation;\n}\nfunction getLoadingFetcher(submission, data) {\n if (submission) {\n let fetcher = {\n state: "loading",\n formMethod: submission.formMethod,\n formAction: submission.formAction,\n formEncType: submission.formEncType,\n formData: submission.formData,\n json: submission.json,\n text: submission.text,\n data\n };\n return fetcher;\n } else {\n let fetcher = {\n state: "loading",\n formMethod: undefined,\n formAction: undefined,\n formEncType: undefined,\n formData: undefined,\n json: undefined,\n text: undefined,\n data\n };\n return fetcher;\n }\n}\nfunction getSubmittingFetcher(submission, existingFetcher) {\n let fetcher = {\n state: "submitting",\n formMethod: submission.formMethod,\n formAction: submission.formAction,\n formEncType: submission.formEncType,\n formData: submission.formData,\n json: submission.json,\n text: submission.text,\n data: existingFetcher ? existingFetcher.data : undefined\n };\n return fetcher;\n}\nfunction getDoneFetcher(data) {\n let fetcher = {\n state: "idle",\n formMethod: undefined,\n formAction: undefined,\n formEncType: undefined,\n formData: undefined,\n json: undefined,\n text: undefined,\n data\n };\n return fetcher;\n}\nfunction restoreAppliedTransitions(_window, transitions) {\n try {\n let sessionPositions = _window.sessionStorage.getItem(TRANSITIONS_STORAGE_KEY);\n if (sessionPositions) {\n let json = JSON.parse(sessionPositions);\n for (let [k, v] of Object.entries(json || {})) {\n if (v && Array.isArray(v)) {\n transitions.set(k, new Set(v || []));\n }\n }\n }\n } catch (e) {\n // no-op, use default empty object\n }\n}\nfunction persistAppliedTransitions(_window, transitions) {\n if (transitions.size > 0) {\n let json = {};\n for (let [k, v] of transitions) {\n json[k] = [...v];\n }\n try {\n _window.sessionStorage.setItem(TRANSITIONS_STORAGE_KEY, JSON.stringify(json));\n } catch (error) {\n warning(false, "Failed to save applied view transitions in sessionStorage (" + error + ").");\n }\n }\n}\n//#endregion\n\n\n//# sourceMappingURL=router.js.map\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@remix-run/router/dist/router.js?', + ); + + /***/ + }, + + /***/ 9322: /***/ (__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5093);\n/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _A_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1807);\n// We simulate that "moment" is called in "A" and "B"\n\n\nconst A = () => \'A\';\n\n// We keep a reference to prevent uglify remove\nA.moment = (moment__WEBPACK_IMPORTED_MODULE_0___default());\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (A);\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./client/app/components/Loadable/letters/A.js?', + ); + + /***/ + }, + + /***/ 6231: /***/ (__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5093);\n/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_0__);\n// We simulate that "moment" is called in "A" and "B"\n\nconst B = () => \'B\';\n\n// We keep a reference to prevent uglify remove\nB.moment = (moment__WEBPACK_IMPORTED_MODULE_0___default());\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (B);\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./client/app/components/Loadable/letters/B.js?', + ); + + /***/ + }, + + /***/ 7456: /***/ (__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (() => \'C\');\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./client/app/components/Loadable/letters/C.js?', + ); + + /***/ + }, + + /***/ 7957: /***/ (__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (() => \'D\');\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./client/app/components/Loadable/letters/D.js?', + ); + + /***/ + }, + + /***/ 9718: /***/ (__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (() => \'E\');\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./client/app/components/Loadable/letters/E.js?', + ); + + /***/ + }, + + /***/ 6700: /***/ (__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (() => \'E\');\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./client/app/components/Loadable/letters/E.js?', + ); + + /***/ + }, + + /***/ 9363: /***/ (__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (() => \'F\');\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./client/app/components/Loadable/letters/F.js?', + ); + + /***/ + }, + + /***/ 1260: /***/ (__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6540);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\nvar _jsxFileName = "/mnt/ssd/react_on_rails_pro/spec/dummy/client/app/components/Loadable/letters/G.js";\n\nconst G = ({\n prefix\n}) => /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", {\n className: "my-cool-class",\n __self: undefined,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 3,\n columnNumber: 27\n }\n}, prefix, " - G");\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (G);\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./client/app/components/Loadable/letters/G.js?', + ); + + /***/ + }, + + /***/ 4958: /***/ (__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ A: () => (/* reexport safe */ _A__WEBPACK_IMPORTED_MODULE_1__["default"]),\n/* harmony export */ B: () => (/* reexport safe */ _B__WEBPACK_IMPORTED_MODULE_2__["default"]),\n/* harmony export */ C: () => (/* reexport safe */ _C__WEBPACK_IMPORTED_MODULE_3__["default"]),\n/* harmony export */ D: () => (/* reexport safe */ _D__WEBPACK_IMPORTED_MODULE_4__["default"]),\n/* harmony export */ E: () => (/* reexport safe */ _E__WEBPACK_IMPORTED_MODULE_5__["default"]),\n/* harmony export */ GClient: () => (/* binding */ GClient),\n/* harmony export */ GServer: () => (/* binding */ GServer),\n/* harmony export */ Moment: () => (/* binding */ Moment),\n/* harmony export */ Sub: () => (/* reexport safe */ _Z_file__WEBPACK_IMPORTED_MODULE_8__["default"]),\n/* harmony export */ X: () => (/* binding */ X)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6540);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _A__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9322);\n/* harmony import */ var _B__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6231);\n/* harmony import */ var _C__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(7456);\n/* harmony import */ var _D__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(7957);\n/* harmony import */ var _E__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(9718);\n/* harmony import */ var _F__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(9363);\n/* harmony import */ var _Z_file__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(7816);\n/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(5093);\n/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_7__);\nvar _jsxFileName = "/mnt/ssd/react_on_rails_pro/spec/dummy/client/app/components/Loadable/letters/Letters.imports-hmr.jsx";\n\n\n\n\n\n\n\n\nconst components = {\n A: _A__WEBPACK_IMPORTED_MODULE_1__["default"],\n B: _B__WEBPACK_IMPORTED_MODULE_2__["default"],\n C: _C__WEBPACK_IMPORTED_MODULE_3__["default"],\n D: _D__WEBPACK_IMPORTED_MODULE_4__["default"],\n E: _E__WEBPACK_IMPORTED_MODULE_5__["default"],\n F: _F__WEBPACK_IMPORTED_MODULE_6__["default"]\n};\n\n// Not the same functionality as loadable-components because I have to\n// create a registry instead of dynamically importing a file\nconst X = props => {\n const RegisteredComponent = components[props.letter];\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(RegisteredComponent, {\n __self: undefined,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 24,\n columnNumber: 10\n }\n });\n};\n\n// The loadable-compnents equivalents of the below components also depend on dynamic importing\nconst GClient = () => /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", {\n className: "loading-state",\n __self: undefined,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 28,\n columnNumber: 23\n }\n}, "ssr: false - Loading...");\nconst GServer = () => /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", {\n className: "loading-state",\n __self: undefined,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 30,\n columnNumber: 23\n }\n}, "ssr: true - Loading...");\n\nconst Moment = props => props.children((moment__WEBPACK_IMPORTED_MODULE_7___default()));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./client/app/components/Loadable/letters/Letters.imports-hmr.jsx?', + ); + + /***/ + }, + + /***/ 3507: /***/ (__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ A: () => (/* binding */ A),\n/* harmony export */ B: () => (/* binding */ B),\n/* harmony export */ C: () => (/* binding */ C),\n/* harmony export */ D: () => (/* binding */ D),\n/* harmony export */ E: () => (/* binding */ E),\n/* harmony export */ GClient: () => (/* binding */ GClient),\n/* harmony export */ GServer: () => (/* binding */ GServer),\n/* harmony export */ Moment: () => (/* binding */ Moment),\n/* harmony export */ Sub: () => (/* binding */ Sub),\n/* harmony export */ X: () => (/* binding */ X)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6540);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _loadable_component__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6007);\nvar _jsxFileName = "/mnt/ssd/react_on_rails_pro/spec/dummy/client/app/components/Loadable/letters/Letters.imports-loadable.jsx";\n\n// eslint-disable-next-line import/no-extraneous-dependencies\n\nconst A = (0,_loadable_component__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Ay)({\n resolved: {},\n chunkName() {\n return "A";\n },\n isReady(props) {\n const key = this.resolve(props);\n if (this.resolved[key] !== true) {\n return false;\n }\n if (true) {\n return !!__webpack_require__.m[key];\n }\n return false;\n },\n importAsync: () => Promise.resolve(/* import() | A */).then(__webpack_require__.bind(__webpack_require__, 9322)),\n requireAsync(props) {\n const key = this.resolve(props);\n this.resolved[key] = false;\n return this.importAsync(props).then(resolved => {\n this.resolved[key] = true;\n return resolved;\n });\n },\n requireSync(props) {\n const id = this.resolve(props);\n if (true) {\n return __webpack_require__(id);\n }\n return eval(\'module.require\')(id);\n },\n resolve() {\n if (true) {\n return /*require.resolve*/(9322);\n }\n return eval(\'require.resolve\')("./A");\n }\n});\nconst B = (0,_loadable_component__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Ay)({\n resolved: {},\n chunkName() {\n return "B";\n },\n isReady(props) {\n const key = this.resolve(props);\n if (this.resolved[key] !== true) {\n return false;\n }\n if (true) {\n return !!__webpack_require__.m[key];\n }\n return false;\n },\n importAsync: () => Promise.resolve(/* import() | B */).then(__webpack_require__.bind(__webpack_require__, 6231)),\n requireAsync(props) {\n const key = this.resolve(props);\n this.resolved[key] = false;\n return this.importAsync(props).then(resolved => {\n this.resolved[key] = true;\n return resolved;\n });\n },\n requireSync(props) {\n const id = this.resolve(props);\n if (true) {\n return __webpack_require__(id);\n }\n return eval(\'module.require\')(id);\n },\n resolve() {\n if (true) {\n return /*require.resolve*/(6231);\n }\n return eval(\'require.resolve\')("./B");\n }\n});\nconst C = (0,_loadable_component__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Ay)({\n resolved: {},\n chunkName() {\n return "C";\n },\n isReady(props) {\n const key = this.resolve(props);\n if (this.resolved[key] !== true) {\n return false;\n }\n if (true) {\n return !!__webpack_require__.m[key];\n }\n return false;\n },\n importAsync: () => Promise.resolve(/* import() | C */).then(__webpack_require__.bind(__webpack_require__, 7456)),\n requireAsync(props) {\n const key = this.resolve(props);\n this.resolved[key] = false;\n return this.importAsync(props).then(resolved => {\n this.resolved[key] = true;\n return resolved;\n });\n },\n requireSync(props) {\n const id = this.resolve(props);\n if (true) {\n return __webpack_require__(id);\n }\n return eval(\'module.require\')(id);\n },\n resolve() {\n if (true) {\n return /*require.resolve*/(7456);\n }\n return eval(\'require.resolve\')("./C");\n }\n});\nconst D = (0,_loadable_component__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Ay)({\n resolved: {},\n chunkName() {\n return "D";\n },\n isReady(props) {\n const key = this.resolve(props);\n if (this.resolved[key] !== true) {\n return false;\n }\n if (true) {\n return !!__webpack_require__.m[key];\n }\n return false;\n },\n importAsync: () => Promise.resolve(/* import() | D */).then(__webpack_require__.bind(__webpack_require__, 7957)),\n requireAsync(props) {\n const key = this.resolve(props);\n this.resolved[key] = false;\n return this.importAsync(props).then(resolved => {\n this.resolved[key] = true;\n return resolved;\n });\n },\n requireSync(props) {\n const id = this.resolve(props);\n if (true) {\n return __webpack_require__(id);\n }\n return eval(\'module.require\')(id);\n },\n resolve() {\n if (true) {\n return /*require.resolve*/(7957);\n }\n return eval(\'require.resolve\')("./D");\n }\n});\nconst E = (0,_loadable_component__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Ay)({\n resolved: {},\n chunkName() {\n return "E-param";\n },\n isReady(props) {\n const key = this.resolve(props);\n if (this.resolved[key] !== true) {\n return false;\n }\n if (true) {\n return !!__webpack_require__.m[key];\n }\n return false;\n },\n importAsync: () => Promise.resolve(/* import() | E-param */).then(__webpack_require__.bind(__webpack_require__, 6700)),\n requireAsync(props) {\n const key = this.resolve(props);\n this.resolved[key] = false;\n return this.importAsync(props).then(resolved => {\n this.resolved[key] = true;\n return resolved;\n });\n },\n requireSync(props) {\n const id = this.resolve(props);\n if (true) {\n return __webpack_require__(id);\n }\n return eval(\'module.require\')(id);\n },\n resolve() {\n if (true) {\n return /*require.resolve*/(6700);\n }\n return eval(\'require.resolve\')("./E?param");\n }\n}, {\n ssr: false\n});\nconst X = (0,_loadable_component__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Ay)({\n resolved: {},\n chunkName(props) {\n return `${props.letter}`.replace(/[^a-zA-Z0-9_!§$()=\\-^°]+/g, "-");\n },\n isReady(props) {\n const key = this.resolve(props);\n if (this.resolved[key] !== true) {\n return false;\n }\n if (true) {\n return !!__webpack_require__.m[key];\n }\n return false;\n },\n importAsync: props => __webpack_require__(7252)(`./${props.letter}`),\n requireAsync(props) {\n const key = this.resolve(props);\n this.resolved[key] = false;\n return this.importAsync(props).then(resolved => {\n this.resolved[key] = true;\n return resolved;\n });\n },\n requireSync(props) {\n const id = this.resolve(props);\n if (true) {\n return __webpack_require__(id);\n }\n return eval(\'module.require\')(id);\n },\n resolve(props) {\n if (true) {\n return /*require.resolve*/(__webpack_require__(2478).resolve(`./${props.letter}`));\n }\n return eval(\'require.resolve\')(`./${props.letter}`);\n }\n});\nconst Sub = (0,_loadable_component__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Ay)({\n resolved: {},\n chunkName(props) {\n return `${props.letter}-file`.replace(/[^a-zA-Z0-9_!§$()=\\-^°]+/g, "-");\n },\n isReady(props) {\n const key = this.resolve(props);\n if (this.resolved[key] !== true) {\n return false;\n }\n if (true) {\n return !!__webpack_require__.m[key];\n }\n return false;\n },\n importAsync: props => __webpack_require__(9983)(`./${props.letter}/file`),\n requireAsync(props) {\n const key = this.resolve(props);\n this.resolved[key] = false;\n return this.importAsync(props).then(resolved => {\n this.resolved[key] = true;\n return resolved;\n });\n },\n requireSync(props) {\n const id = this.resolve(props);\n if (true) {\n return __webpack_require__(id);\n }\n return eval(\'module.require\')(id);\n },\n resolve(props) {\n if (true) {\n return /*require.resolve*/(__webpack_require__(1015).resolve(`./${props.letter}/file`));\n }\n return eval(\'require.resolve\')(`./${props.letter}/file`);\n }\n});\n\n// Load the \'G\' component twice: once in SSR and once fully client-side\nconst GClient = (0,_loadable_component__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Ay)({\n resolved: {},\n chunkName() {\n return "G";\n },\n isReady(props) {\n const key = this.resolve(props);\n if (this.resolved[key] !== true) {\n return false;\n }\n if (true) {\n return !!__webpack_require__.m[key];\n }\n return false;\n },\n importAsync: () => Promise.resolve(/* import() | G */).then(__webpack_require__.bind(__webpack_require__, 1260)),\n requireAsync(props) {\n const key = this.resolve(props);\n this.resolved[key] = false;\n return this.importAsync(props).then(resolved => {\n this.resolved[key] = true;\n return resolved;\n });\n },\n requireSync(props) {\n const id = this.resolve(props);\n if (true) {\n return __webpack_require__(id);\n }\n return eval(\'module.require\')(id);\n },\n resolve() {\n if (true) {\n return /*require.resolve*/(1260);\n }\n return eval(\'require.resolve\')("./G");\n }\n}, {\n ssr: false,\n fallback: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", {\n className: "loading-state",\n __self: undefined,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 16,\n columnNumber: 13\n }\n }, "ssr: false - Loading...")\n});\nconst GServer = (0,_loadable_component__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Ay)({\n resolved: {},\n chunkName() {\n return "G";\n },\n isReady(props) {\n const key = this.resolve(props);\n if (this.resolved[key] !== true) {\n return false;\n }\n if (true) {\n return !!__webpack_require__.m[key];\n }\n return false;\n },\n importAsync: () => Promise.resolve(/* import() | G */).then(__webpack_require__.bind(__webpack_require__, 1260)),\n requireAsync(props) {\n const key = this.resolve(props);\n this.resolved[key] = false;\n return this.importAsync(props).then(resolved => {\n this.resolved[key] = true;\n return resolved;\n });\n },\n requireSync(props) {\n const id = this.resolve(props);\n if (true) {\n return __webpack_require__(id);\n }\n return eval(\'module.require\')(id);\n },\n resolve() {\n if (true) {\n return /*require.resolve*/(1260);\n }\n return eval(\'require.resolve\')("./G");\n }\n}, {\n ssr: true,\n fallback: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", {\n className: "loading-state",\n __self: undefined,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 21,\n columnNumber: 13\n }\n }, "ssr: true - Loading...")\n});\nconst Moment = _loadable_component__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Ay.lib({\n resolved: {},\n chunkName() {\n return "moment";\n },\n isReady(props) {\n const key = this.resolve(props);\n if (this.resolved[key] !== true) {\n return false;\n }\n if (true) {\n return !!__webpack_require__.m[key];\n }\n return false;\n },\n importAsync: () => Promise.resolve(/* import() | moment */).then(__webpack_require__.t.bind(__webpack_require__, 5093, 23)),\n requireAsync(props) {\n const key = this.resolve(props);\n this.resolved[key] = false;\n return this.importAsync(props).then(resolved => {\n this.resolved[key] = true;\n return resolved;\n });\n },\n requireSync(props) {\n const id = this.resolve(props);\n if (true) {\n return __webpack_require__(id);\n }\n return eval(\'module.require\')(id);\n },\n resolve() {\n if (true) {\n return /*require.resolve*/(5093);\n }\n return eval(\'require.resolve\')("moment");\n }\n}, {\n resolveComponent: moment => moment.default || moment\n});\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./client/app/components/Loadable/letters/Letters.imports-loadable.jsx?', + ); + + /***/ + }, + + /***/ 7816: /***/ (__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (() => \'Z\');\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./client/app/components/Loadable/letters/Z/file.js?', + ); + + /***/ + }, + + /***/ 5211: /***/ (__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6540);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Letters_imports_loadable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3507);\n/* harmony import */ var _main_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(9227);\nvar _jsxFileName = "/mnt/ssd/react_on_rails_pro/spec/dummy/client/app/components/Loadable/letters/index.jsx";\n\n\n\nconst Letters = () => /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {\n __self: undefined,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 6,\n columnNumber: 3\n }\n}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("h1", {\n __self: undefined,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 7,\n columnNumber: 5\n }\n}, "Check out how these letters are imported in the source code!"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Letters_imports_loadable__WEBPACK_IMPORTED_MODULE_1__.A, {\n __self: undefined,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 8,\n columnNumber: 5\n }\n}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("br", {\n __self: undefined,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 9,\n columnNumber: 5\n }\n}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Letters_imports_loadable__WEBPACK_IMPORTED_MODULE_1__.B, {\n __self: undefined,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 10,\n columnNumber: 5\n }\n}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("br", {\n __self: undefined,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 11,\n columnNumber: 5\n }\n}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Letters_imports_loadable__WEBPACK_IMPORTED_MODULE_1__.C, {\n __self: undefined,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 12,\n columnNumber: 5\n }\n}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("br", {\n __self: undefined,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 13,\n columnNumber: 5\n }\n}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Letters_imports_loadable__WEBPACK_IMPORTED_MODULE_1__.D, {\n __self: undefined,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 14,\n columnNumber: 5\n }\n}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("br", {\n __self: undefined,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 15,\n columnNumber: 5\n }\n}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Letters_imports_loadable__WEBPACK_IMPORTED_MODULE_1__.X, {\n letter: "A",\n __self: undefined,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 16,\n columnNumber: 5\n }\n}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("br", {\n __self: undefined,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 17,\n columnNumber: 5\n }\n}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Letters_imports_loadable__WEBPACK_IMPORTED_MODULE_1__.X, {\n letter: "F",\n __self: undefined,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 18,\n columnNumber: 5\n }\n}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("br", {\n __self: undefined,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 19,\n columnNumber: 5\n }\n}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Letters_imports_loadable__WEBPACK_IMPORTED_MODULE_1__.E, {\n __self: undefined,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 20,\n columnNumber: 5\n }\n}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("br", {\n __self: undefined,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 21,\n columnNumber: 5\n }\n}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Letters_imports_loadable__WEBPACK_IMPORTED_MODULE_1__.GClient, {\n prefix: "ssr: false",\n __self: undefined,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 22,\n columnNumber: 5\n }\n}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("br", {\n __self: undefined,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 23,\n columnNumber: 5\n }\n}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Letters_imports_loadable__WEBPACK_IMPORTED_MODULE_1__.GServer, {\n prefix: "ssr: true",\n __self: undefined,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 24,\n columnNumber: 5\n }\n}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("br", {\n __self: undefined,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 25,\n columnNumber: 5\n }\n}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Letters_imports_loadable__WEBPACK_IMPORTED_MODULE_1__.Sub, {\n letter: "Z",\n __self: undefined,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 26,\n columnNumber: 5\n }\n}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("br", {\n __self: undefined,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 27,\n columnNumber: 5\n }\n}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Letters_imports_loadable__WEBPACK_IMPORTED_MODULE_1__.Moment, {\n __self: undefined,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 28,\n columnNumber: 5\n }\n}, moment => moment().format(\'HH:mm\')));\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Letters);\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./client/app/components/Loadable/letters/index.jsx?', + ); + + /***/ + }, + + /***/ 8609: /***/ (__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6540);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react_helmet__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8154);\nvar _jsxFileName = "/mnt/ssd/react_on_rails_pro/spec/dummy/client/app/components/Loadable/pages/A.jsx";\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (() => /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), {\n __self: undefined,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 5,\n columnNumber: 3\n }\n}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react_helmet__WEBPACK_IMPORTED_MODULE_1__/* .Helmet */ .m, {\n __self: undefined,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 6,\n columnNumber: 5\n }\n}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("title", {\n __self: undefined,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 7,\n columnNumber: 7\n }\n}, "Page A")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("h1", {\n __self: undefined,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 9,\n columnNumber: 5\n }\n}, "This is Page A.")));\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./client/app/components/Loadable/pages/A.jsx?', + ); + + /***/ + }, + + /***/ 1338: /***/ (__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6540);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react_helmet__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8154);\nvar _jsxFileName = "/mnt/ssd/react_on_rails_pro/spec/dummy/client/app/components/Loadable/pages/B.jsx";\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (() => /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), {\n __self: undefined,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 5,\n columnNumber: 3\n }\n}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react_helmet__WEBPACK_IMPORTED_MODULE_1__/* .Helmet */ .m, {\n __self: undefined,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 6,\n columnNumber: 5\n }\n}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("title", {\n __self: undefined,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 7,\n columnNumber: 7\n }\n}, "Page B")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("h1", {\n __self: undefined,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 9,\n columnNumber: 5\n }\n}, "This is Page B.")));\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./client/app/components/Loadable/pages/B.jsx?', + ); + + /***/ + }, + + /***/ 8813: /***/ (__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ $: () => (/* binding */ PageA),\n/* harmony export */ i: () => (/* binding */ PageB)\n/* harmony export */ });\n/* harmony import */ var _loadable_component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6007);\n\nconst PageA = (0,_loadable_component__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Ay)({\n resolved: {},\n chunkName() {\n return "pages-A";\n },\n isReady(props) {\n const key = this.resolve(props);\n if (this.resolved[key] !== true) {\n return false;\n }\n if (true) {\n return !!__webpack_require__.m[key];\n }\n return false;\n },\n importAsync: () => Promise.resolve(/* import() | pages-A */).then(__webpack_require__.bind(__webpack_require__, 8609)),\n requireAsync(props) {\n const key = this.resolve(props);\n this.resolved[key] = false;\n return this.importAsync(props).then(resolved => {\n this.resolved[key] = true;\n return resolved;\n });\n },\n requireSync(props) {\n const id = this.resolve(props);\n if (true) {\n return __webpack_require__(id);\n }\n return eval(\'module.require\')(id);\n },\n resolve() {\n if (true) {\n return /*require.resolve*/(8609);\n }\n return eval(\'require.resolve\')("../pages/A");\n }\n});\nconst PageB = (0,_loadable_component__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Ay)({\n resolved: {},\n chunkName() {\n return "pages-B";\n },\n isReady(props) {\n const key = this.resolve(props);\n if (this.resolved[key] !== true) {\n return false;\n }\n if (true) {\n return !!__webpack_require__.m[key];\n }\n return false;\n },\n importAsync: () => Promise.resolve(/* import() | pages-B */).then(__webpack_require__.bind(__webpack_require__, 1338)),\n requireAsync(props) {\n const key = this.resolve(props);\n this.resolved[key] = false;\n return this.importAsync(props).then(resolved => {\n this.resolved[key] = true;\n return resolved;\n });\n },\n requireSync(props) {\n const id = this.resolve(props);\n if (true) {\n return __webpack_require__(id);\n }\n return eval(\'module.require\')(id);\n },\n resolve() {\n if (true) {\n return /*require.resolve*/(1338);\n }\n return eval(\'require.resolve\')("../pages/B");\n }\n});\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./client/app/components/Loadable/routes/Routes.imports-loadable.jsx?', + ); + + /***/ + }, + + /***/ 9416: /***/ (__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '// ESM COMPAT FLAG\n__webpack_require__.r(__webpack_exports__);\n\n// NAMESPACE OBJECT: ./client/app/ssr-computations/userQuery.ssr-computation.ts\nvar userQuery_ssr_computation_namespaceObject = {};\n__webpack_require__.r(userQuery_ssr_computation_namespaceObject);\n__webpack_require__.d(userQuery_ssr_computation_namespaceObject, {\n compute: () => (compute),\n preloadQuery: () => (preloadQuery),\n subscribe: () => (subscribe)\n});\n\n// NAMESPACE OBJECT: ./client/app/actions/HelloWorldActions.jsx\nvar HelloWorldActions_namespaceObject = {};\n__webpack_require__.r(HelloWorldActions_namespaceObject);\n__webpack_require__.d(HelloWorldActions_namespaceObject, {\n updateName: () => (updateName)\n});\n\n// EXTERNAL MODULE: ./node_modules/react-on-rails/node_package/lib/ReactOnRails.js\nvar ReactOnRails = __webpack_require__(2765);\nvar ReactOnRails_default = /*#__PURE__*/__webpack_require__.n(ReactOnRails);\n// EXTERNAL MODULE: ./node_modules/react/index.js\nvar react = __webpack_require__(6540);\nvar react_default = /*#__PURE__*/__webpack_require__.n(react);\n;// CONCATENATED MODULE: ./client/app/ror-auto-load-components/BrokenApp.jsx\nvar _jsxFileName = "/mnt/ssd/react_on_rails_pro/spec/dummy/client/app/ror-auto-load-components/BrokenApp.jsx";\n// Top level component for simple client side only rendering\n\n\n/*\n * Just an example of what can go wrong while coding. No import. Whoops!\n */\n// eslint-disable-next-line react/jsx-no-undef\n/* harmony default export */ const BrokenApp = (props => /*#__PURE__*/react_default().createElement(HelloWorld, Object.assign({}, props, {\n __self: undefined,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 8,\n columnNumber: 27\n }\n})));\n;// CONCATENATED MODULE: ./client/app/ror-auto-load-components/CacheDisabled.jsx\nvar CacheDisabled_jsxFileName = "/mnt/ssd/react_on_rails_pro/spec/dummy/client/app/ror-auto-load-components/CacheDisabled.jsx";\n\nclass CacheDisabled extends (react_default()).Component {\n componentWillUnmount() {\n // eslint-disable-next-line no-console\n console.log(\'CacheDisabled#componentWillUnmount\');\n }\n render() {\n return /*#__PURE__*/react_default().createElement("div", {\n className: "container",\n __self: this,\n __source: {\n fileName: CacheDisabled_jsxFileName,\n lineNumber: 11,\n columnNumber: 7\n }\n }, /*#__PURE__*/react_default().createElement("h2", {\n __self: this,\n __source: {\n fileName: CacheDisabled_jsxFileName,\n lineNumber: 12,\n columnNumber: 9\n }\n }, "Turbolinks cache is disabled"), /*#__PURE__*/react_default().createElement("p", {\n __self: this,\n __source: {\n fileName: CacheDisabled_jsxFileName,\n lineNumber: 13,\n columnNumber: 9\n }\n }, "Must call componentWillUnmount."));\n }\n}\n;// CONCATENATED MODULE: ./client/app/CssModulesImagesFontsExample.module.scss\n// Exports\n/* harmony default export */ const CssModulesImagesFontsExample_module = ({\n\t"heading": `f225CmwQmsvHGWNJSxDE`,\n\t"check": `KrEBMb1v6LQe83HhY7mE`,\n\t"lastCall": `lccSG44s3Mm3TsjFEiK5`,\n\t"railsOnMaui": `MZqs0PczLfioTw0Zo0_U`\n});\n\n;// CONCATENATED MODULE: ./client/app/ror-auto-load-components/CssModulesImagesFontsExample.jsx\nvar CssModulesImagesFontsExample_jsxFileName = "/mnt/ssd/react_on_rails_pro/spec/dummy/client/app/ror-auto-load-components/CssModulesImagesFontsExample.jsx";\n/* eslint-disable react/prop-types */\n\n\n/* harmony default export */ const CssModulesImagesFontsExample = ((_props, _railsContext) => () => /*#__PURE__*/react_default().createElement("div", {\n __self: undefined,\n __source: {\n fileName: CssModulesImagesFontsExample_jsxFileName,\n lineNumber: 7,\n columnNumber: 3\n }\n}, /*#__PURE__*/react_default().createElement("h1", {\n className: CssModulesImagesFontsExample_module.heading,\n __self: undefined,\n __source: {\n fileName: CssModulesImagesFontsExample_jsxFileName,\n lineNumber: 8,\n columnNumber: 5\n }\n}, "This should be open sans light"), /*#__PURE__*/react_default().createElement("div", {\n __self: undefined,\n __source: {\n fileName: CssModulesImagesFontsExample_jsxFileName,\n lineNumber: 9,\n columnNumber: 5\n }\n}, /*#__PURE__*/react_default().createElement("h2", {\n __self: undefined,\n __source: {\n fileName: CssModulesImagesFontsExample_jsxFileName,\n lineNumber: 10,\n columnNumber: 7\n }\n}, "Last Call (relative path)"), /*#__PURE__*/react_default().createElement("div", {\n className: CssModulesImagesFontsExample_module.lastCall,\n __self: undefined,\n __source: {\n fileName: CssModulesImagesFontsExample_jsxFileName,\n lineNumber: 11,\n columnNumber: 7\n }\n})), /*#__PURE__*/react_default().createElement("div", {\n __self: undefined,\n __source: {\n fileName: CssModulesImagesFontsExample_jsxFileName,\n lineNumber: 13,\n columnNumber: 5\n }\n}, /*#__PURE__*/react_default().createElement("h2", {\n __self: undefined,\n __source: {\n fileName: CssModulesImagesFontsExample_jsxFileName,\n lineNumber: 14,\n columnNumber: 7\n }\n}, "Check (URL encoded)"), /*#__PURE__*/react_default().createElement("div", {\n className: CssModulesImagesFontsExample_module.check,\n __self: undefined,\n __source: {\n fileName: CssModulesImagesFontsExample_jsxFileName,\n lineNumber: 15,\n columnNumber: 7\n }\n})), /*#__PURE__*/react_default().createElement("div", {\n __self: undefined,\n __source: {\n fileName: CssModulesImagesFontsExample_jsxFileName,\n lineNumber: 17,\n columnNumber: 5\n }\n}, /*#__PURE__*/react_default().createElement("h2", {\n __self: undefined,\n __source: {\n fileName: CssModulesImagesFontsExample_jsxFileName,\n lineNumber: 18,\n columnNumber: 7\n }\n}, "Rails on Maui Logo (absolute path)"), /*#__PURE__*/react_default().createElement("div", {\n className: CssModulesImagesFontsExample_module.railsOnMaui,\n __self: undefined,\n __source: {\n fileName: CssModulesImagesFontsExample_jsxFileName,\n lineNumber: 19,\n columnNumber: 7\n }\n}))));\n// EXTERNAL MODULE: ./node_modules/prop-types/index.js\nvar prop_types = __webpack_require__(5556);\nvar prop_types_default = /*#__PURE__*/__webpack_require__.n(prop_types);\n// EXTERNAL MODULE: ./node_modules/lodash/lodash.js\nvar lodash = __webpack_require__(2543);\n;// CONCATENATED MODULE: ./client/app/components/RailsContext.jsx\nvar RailsContext_jsxFileName = "/mnt/ssd/react_on_rails_pro/spec/dummy/client/app/components/RailsContext.jsx";\n\n\n\nfunction renderContextRows(railsContext) {\n // eslint-disable-next-line no-console\n console.log(\'railsContext.serverSide is \', railsContext.serverSide);\n return (0,lodash.transform)(railsContext, (accum, value, key) => {\n if (key !== \'serverSide\') {\n const className = `js-${key}`;\n accum.push( /*#__PURE__*/react_default().createElement("tr", {\n key: className,\n __self: this,\n __source: {\n fileName: RailsContext_jsxFileName,\n lineNumber: 14,\n columnNumber: 11\n }\n }, /*#__PURE__*/react_default().createElement("td", {\n __self: this,\n __source: {\n fileName: RailsContext_jsxFileName,\n lineNumber: 15,\n columnNumber: 13\n }\n }, /*#__PURE__*/react_default().createElement("strong", {\n __self: this,\n __source: {\n fileName: RailsContext_jsxFileName,\n lineNumber: 16,\n columnNumber: 15\n }\n }, key, ":\\xA0")), /*#__PURE__*/react_default().createElement("td", {\n className: className,\n __self: this,\n __source: {\n fileName: RailsContext_jsxFileName,\n lineNumber: 18,\n columnNumber: 13\n }\n }, `${value}`)));\n }\n }, []);\n}\nconst RailsContext = props => /*#__PURE__*/react_default().createElement("table", {\n __self: undefined,\n __source: {\n fileName: RailsContext_jsxFileName,\n lineNumber: 28,\n columnNumber: 3\n }\n}, /*#__PURE__*/react_default().createElement("thead", {\n __self: undefined,\n __source: {\n fileName: RailsContext_jsxFileName,\n lineNumber: 29,\n columnNumber: 5\n }\n}, /*#__PURE__*/react_default().createElement("tr", {\n __self: undefined,\n __source: {\n fileName: RailsContext_jsxFileName,\n lineNumber: 30,\n columnNumber: 7\n }\n}, /*#__PURE__*/react_default().createElement("th", {\n __self: undefined,\n __source: {\n fileName: RailsContext_jsxFileName,\n lineNumber: 31,\n columnNumber: 9\n }\n}, /*#__PURE__*/react_default().createElement("i", {\n __self: undefined,\n __source: {\n fileName: RailsContext_jsxFileName,\n lineNumber: 32,\n columnNumber: 11\n }\n}, "key")), /*#__PURE__*/react_default().createElement("th", {\n __self: undefined,\n __source: {\n fileName: RailsContext_jsxFileName,\n lineNumber: 34,\n columnNumber: 9\n }\n}, /*#__PURE__*/react_default().createElement("i", {\n __self: undefined,\n __source: {\n fileName: RailsContext_jsxFileName,\n lineNumber: 35,\n columnNumber: 11\n }\n}, "value")))), /*#__PURE__*/react_default().createElement("tbody", {\n __self: undefined,\n __source: {\n fileName: RailsContext_jsxFileName,\n lineNumber: 39,\n columnNumber: 5\n }\n}, renderContextRows(props.railsContext)));\nRailsContext.propTypes = {\n railsContext: (prop_types_default()).object.isRequired\n};\n/* harmony default export */ const components_RailsContext = (RailsContext);\n;// CONCATENATED MODULE: ./client/app/components/HelloWorld.module.scss\n// Exports\n/* harmony default export */ const HelloWorld_module = ({\n\t"brightColor": `lAeMDCOjEs1j1FVQohl2`\n});\n\n;// CONCATENATED MODULE: ./client/app/ror-auto-load-components/HelloWorld.jsx\nvar HelloWorld_jsxFileName = "/mnt/ssd/react_on_rails_pro/spec/dummy/client/app/ror-auto-load-components/HelloWorld.jsx";\n\n\n\n\n// Example of CSS modules.\n\n\n// Super simple example of the simplest possible React component\nclass HelloWorld_HelloWorld extends (react_default()).Component {\n static propTypes = {\n helloWorldData: prop_types_default().shape({\n name: (prop_types_default()).string\n }).isRequired,\n railsContext: (prop_types_default()).object\n };\n\n // Not necessary if we only call super, but we\'ll need to initialize state, etc.\n constructor(props) {\n super(props);\n this.state = props.helloWorldData;\n this.setNameDomRef = this.setNameDomRef.bind(this);\n this.handleChange = this.handleChange.bind(this);\n }\n setNameDomRef(nameDomNode) {\n this.nameDomRef = nameDomNode;\n }\n handleChange() {\n const name = this.nameDomRef.value;\n this.setState({\n name\n });\n }\n render() {\n // eslint-disable-next-line no-console\n console.log(\'HelloWorld demonstrating a call to console.log in \' + \'spec/dummy/client/app/components/HelloWorld.jsx:18\');\n const {\n name\n } = this.state;\n const {\n railsContext\n } = this.props;\n return /*#__PURE__*/react_default().createElement("div", {\n __self: this,\n __source: {\n fileName: HelloWorld_jsxFileName,\n lineNumber: 45,\n columnNumber: 7\n }\n }, /*#__PURE__*/react_default().createElement("h3", {\n className: HelloWorld_module.brightColor,\n __self: this,\n __source: {\n fileName: HelloWorld_jsxFileName,\n lineNumber: 46,\n columnNumber: 9\n }\n }, "Hello, ", name, "!"), /*#__PURE__*/react_default().createElement("p", {\n __self: this,\n __source: {\n fileName: HelloWorld_jsxFileName,\n lineNumber: 47,\n columnNumber: 9\n }\n }, "Say hello to:", /*#__PURE__*/react_default().createElement("input", {\n type: "text",\n ref: this.setNameDomRef,\n defaultValue: name,\n onChange: this.handleChange,\n __self: this,\n __source: {\n fileName: HelloWorld_jsxFileName,\n lineNumber: 49,\n columnNumber: 11\n }\n })), railsContext && /*#__PURE__*/react_default().createElement(components_RailsContext, {\n railsContext,\n __self: this,\n __source: {\n fileName: HelloWorld_jsxFileName,\n lineNumber: 51,\n columnNumber: 26\n }\n }));\n }\n}\n/* harmony default export */ const ror_auto_load_components_HelloWorld = (HelloWorld_HelloWorld);\n;// CONCATENATED MODULE: ./client/app/ror-auto-load-components/HelloWorldApp.jsx\nvar HelloWorldApp_jsxFileName = "/mnt/ssd/react_on_rails_pro/spec/dummy/client/app/ror-auto-load-components/HelloWorldApp.jsx";\n// Top level component for simple client side only rendering\n\n\n\n/*\n * Export a function that takes the props and returns a ReactComponent.\n * This is used for the client rendering hook after the page html is rendered.\n * React will see that the state is the same and not do anything.\n * Note, this is imported as "HelloWorldApp" by "clientRegistration.jsx"\n *\n * Note, this is a fictional example, as you\'d only use a generator function if you wanted to run\n * some extra code, such as setting up Redux and React-Router.\n */\n/* harmony default export */ const HelloWorldApp = (props => /*#__PURE__*/react_default().createElement(ror_auto_load_components_HelloWorld, Object.assign({}, props, {\n __self: undefined,\n __source: {\n fileName: HelloWorldApp_jsxFileName,\n lineNumber: 14,\n columnNumber: 27\n }\n})));\n// EXTERNAL MODULE: ./node_modules/create-react-class/index.js\nvar create_react_class = __webpack_require__(2306);\nvar create_react_class_default = /*#__PURE__*/__webpack_require__.n(create_react_class);\n;// CONCATENATED MODULE: ./client/app/ror-auto-load-components/HelloWorldES5.jsx\nvar HelloWorldES5_jsxFileName = "/mnt/ssd/react_on_rails_pro/spec/dummy/client/app/ror-auto-load-components/HelloWorldES5.jsx";\n/* eslint-disable react/prefer-es6-class */\n\n\n\n\n\n// Super simple example of React component using React.createClass\nconst HelloWorldES5 = create_react_class_default()({\n displayName: "HelloWorldES5",\n propTypes: {\n helloWorldData: (prop_types_default()).object\n },\n getInitialState() {\n return this.props.helloWorldData;\n },\n setNameDomRef(nameDomNode) {\n this.nameDomRef = nameDomNode;\n },\n handleChange() {\n const name = this.nameDomRef.value;\n this.setState({\n name\n });\n },\n render() {\n const {\n name\n } = this.state;\n return /*#__PURE__*/react_default().createElement("div", {\n __self: this,\n __source: {\n fileName: HelloWorldES5_jsxFileName,\n lineNumber: 30,\n columnNumber: 7\n }\n }, /*#__PURE__*/react_default().createElement("h3", {\n __self: this,\n __source: {\n fileName: HelloWorldES5_jsxFileName,\n lineNumber: 31,\n columnNumber: 9\n }\n }, "Hello ES5, ", name, "!"), /*#__PURE__*/react_default().createElement("p", {\n __self: this,\n __source: {\n fileName: HelloWorldES5_jsxFileName,\n lineNumber: 32,\n columnNumber: 9\n }\n }, "Say hello to:", /*#__PURE__*/react_default().createElement("input", {\n type: "text",\n ref: this.setNameDomRef,\n defaultValue: name,\n onChange: this.handleChange,\n __self: this,\n __source: {\n fileName: HelloWorldES5_jsxFileName,\n lineNumber: 34,\n columnNumber: 11\n }\n })));\n }\n});\n/* harmony default export */ const ror_auto_load_components_HelloWorldES5 = (HelloWorldES5);\n;// CONCATENATED MODULE: ./client/app/ror-auto-load-components/HelloWorldHooks.jsx\nvar HelloWorldHooks_jsxFileName = "/mnt/ssd/react_on_rails_pro/spec/dummy/client/app/ror-auto-load-components/HelloWorldHooks.jsx";\n// Super simple example of the simplest possible React component\n\n\n\n// TODO: make more like the HelloWorld.jsx\nfunction HelloWorldHooks(props) {\n const [name, setName] = (0,react.useState)(props.helloWorldData.name);\n return /*#__PURE__*/react_default().createElement("div", {\n __self: this,\n __source: {\n fileName: HelloWorldHooks_jsxFileName,\n lineNumber: 9,\n columnNumber: 5\n }\n }, /*#__PURE__*/react_default().createElement("h3", {\n className: HelloWorld_module.brightColor,\n __self: this,\n __source: {\n fileName: HelloWorldHooks_jsxFileName,\n lineNumber: 10,\n columnNumber: 7\n }\n }, "Hello, ", name, "!"), /*#__PURE__*/react_default().createElement("p", {\n __self: this,\n __source: {\n fileName: HelloWorldHooks_jsxFileName,\n lineNumber: 11,\n columnNumber: 7\n }\n }, "Say hello to:", /*#__PURE__*/react_default().createElement("input", {\n type: "text",\n value: name,\n onChange: e => setName(e.target.value),\n __self: this,\n __source: {\n fileName: HelloWorldHooks_jsxFileName,\n lineNumber: 13,\n columnNumber: 9\n }\n })));\n}\n/* harmony default export */ const ror_auto_load_components_HelloWorldHooks = (HelloWorldHooks);\n;// CONCATENATED MODULE: ./client/app/ror-auto-load-components/HelloWorldHooksContext.jsx\nvar HelloWorldHooksContext_jsxFileName = "/mnt/ssd/react_on_rails_pro/spec/dummy/client/app/ror-auto-load-components/HelloWorldHooksContext.jsx";\n// Example of using hooks when taking the props and railsContext\n// Note, you need the call the hooks API within the react component stateless function\n\n\n\nconst HelloWorldHooksContext = (props, railsContext) => {\n // You could pass props here or use the closure\n return () => {\n const [name, setName] = (0,react.useState)(props.helloWorldData.name);\n return /*#__PURE__*/react_default().createElement((react_default()).Fragment, null, /*#__PURE__*/react_default().createElement("h3", {\n className: HelloWorld_module.brightColor,\n __self: undefined,\n __source: {\n fileName: HelloWorldHooksContext_jsxFileName,\n lineNumber: 13,\n columnNumber: 9\n }\n }, "Hello, ", name, "!"), /*#__PURE__*/react_default().createElement("p", {\n __self: undefined,\n __source: {\n fileName: HelloWorldHooksContext_jsxFileName,\n lineNumber: 14,\n columnNumber: 9\n }\n }, "Say hello to:", /*#__PURE__*/react_default().createElement("input", {\n type: "text",\n value: name,\n onChange: e => setName(e.target.value),\n __self: undefined,\n __source: {\n fileName: HelloWorldHooksContext_jsxFileName,\n lineNumber: 16,\n columnNumber: 11\n }\n })), /*#__PURE__*/react_default().createElement("p", {\n __self: undefined,\n __source: {\n fileName: HelloWorldHooksContext_jsxFileName,\n lineNumber: 18,\n columnNumber: 9\n }\n }, "Rails Context :"), /*#__PURE__*/react_default().createElement(components_RailsContext, {\n railsContext,\n __self: undefined,\n __source: {\n fileName: HelloWorldHooksContext_jsxFileName,\n lineNumber: 19,\n columnNumber: 9\n }\n }));\n };\n};\n/* harmony default export */ const ror_auto_load_components_HelloWorldHooksContext = (HelloWorldHooksContext);\n;// CONCATENATED MODULE: ./client/app/ror-auto-load-components/HelloWorldRehydratable.jsx\nvar HelloWorldRehydratable_jsxFileName = "/mnt/ssd/react_on_rails_pro/spec/dummy/client/app/ror-auto-load-components/HelloWorldRehydratable.jsx";\n\n\n\n\nclass HelloWorldRehydratable extends (react_default()).Component {\n static propTypes = {\n helloWorldData: prop_types_default().shape({\n name: (prop_types_default()).string\n }).isRequired,\n railsContext: (prop_types_default()).object\n };\n\n // Not necessary if we only call super, but we\'ll need to initialize state, etc.\n constructor(props) {\n super(props);\n this.state = props.helloWorldData;\n this.setNameDomRef = this.setNameDomRef.bind(this);\n this.forceClientHydration = this.forceClientHydration.bind(this);\n this.handleChange = this.handleChange.bind(this);\n }\n componentDidMount() {\n document.addEventListener(\'hydrate\', this.forceClientHydration);\n }\n componentWillUnmount() {\n document.removeEventListener(\'hydrate\', this.forceClientHydration);\n }\n setNameDomRef(nameDomNode) {\n this.nameDomRef = nameDomNode;\n }\n forceClientHydration() {\n const registeredComponentName = \'HelloWorldRehydratable\';\n const {\n railsContext\n } = this.props;\n\n // Target all instances of the component in the DOM\n const match = document.querySelectorAll(`[id^=${registeredComponentName}-react-component-]`);\n // Not all browsers support forEach on NodeList so we go with a classic for-loop\n for (let i = 0; i < match.length; i += 1) {\n const component = match[i];\n // Get component specification <script> tag\n const componentSpecificationTag = document.querySelector(`script[data-dom-id=${component.id}]`);\n // Read props from the component specification tag and merge railsContext\n const mergedProps = {\n ...JSON.parse(componentSpecificationTag.textContent),\n railsContext\n };\n // Hydrate\n ReactOnRails_default().render(registeredComponentName, mergedProps, component.id, true);\n }\n }\n handleChange() {\n const name = this.nameDomRef.value;\n this.setState({\n name\n });\n }\n render() {\n const {\n name\n } = this.state;\n const {\n railsContext\n } = this.props;\n return /*#__PURE__*/react_default().createElement("div", {\n __self: this,\n __source: {\n fileName: HelloWorldRehydratable_jsxFileName,\n lineNumber: 63,\n columnNumber: 7\n }\n }, /*#__PURE__*/react_default().createElement("h3", {\n __self: this,\n __source: {\n fileName: HelloWorldRehydratable_jsxFileName,\n lineNumber: 64,\n columnNumber: 9\n }\n }, "Hello, ", name, "!"), /*#__PURE__*/react_default().createElement("p", {\n __self: this,\n __source: {\n fileName: HelloWorldRehydratable_jsxFileName,\n lineNumber: 65,\n columnNumber: 9\n }\n }, "Say hello to:", /*#__PURE__*/react_default().createElement("input", {\n type: "text",\n ref: this.setNameDomRef,\n defaultValue: name,\n onChange: this.handleChange,\n __self: this,\n __source: {\n fileName: HelloWorldRehydratable_jsxFileName,\n lineNumber: 67,\n columnNumber: 11\n }\n })), railsContext && /*#__PURE__*/react_default().createElement(components_RailsContext, {\n railsContext,\n __self: this,\n __source: {\n fileName: HelloWorldRehydratable_jsxFileName,\n lineNumber: 69,\n columnNumber: 26\n }\n }));\n }\n}\n/* harmony default export */ const ror_auto_load_components_HelloWorldRehydratable = (HelloWorldRehydratable);\n;// CONCATENATED MODULE: ./client/app/ror-auto-load-components/HelloWorldWithLogAndThrow.jsx\n/* eslint-disable no-unused-vars */\n\n\n// Example of logging and throw error handling\n\nconst HelloWorldWithLogAndThrow = (props, context) => {\n /* eslint-disable no-console */\n console.log(\'console.log in HelloWorld\');\n console.warn(\'console.warn in HelloWorld\');\n console.error(\'console.error in HelloWorld\');\n throw new Error(\'throw in HelloWorldWithLogAndThrow\');\n};\n/* harmony default export */ const ror_auto_load_components_HelloWorldWithLogAndThrow = (HelloWorldWithLogAndThrow);\n;// CONCATENATED MODULE: ./client/app/components/ImageExample/ImageExample.module.scss\n// Exports\n/* harmony default export */ const ImageExample_module = ({\n\t"red": `m0VunKQyA3s4CKeJ1O1P`,\n\t"background": `CD3TJZfpbY48gzW31uCR`,\n\t"backgroundSameDirectory": `c45FS3FaYo_nujsxhtkB`,\n\t"googleLogo": `ECVZDbluRA99sVqWiGpj`,\n\t"legoIcon": `AggSCoW0f4GkwE_ZsrZM`\n});\n\n;// CONCATENATED MODULE: ./client/app/assets/images/256egghead.png\nconst _256egghead_namespaceObject = __webpack_require__.p + "static/assets/images/256egghead-56c6d1ce61e86e0d344e.png";\n;// CONCATENATED MODULE: ./client/app/components/ImageExample/bower.png\nconst bower_namespaceObject = __webpack_require__.p + "static/components/ImageExample/bower-84b294626064a0c1f5a5.png";\n;// CONCATENATED MODULE: ./client/app/components/ImageExample/blueprint_icon.svg\nconst blueprint_icon_namespaceObject = __webpack_require__.p + "static/components/ImageExample/blueprint_icon-6c833e6cfe2aa70969a2.svg";\n;// CONCATENATED MODULE: ./client/app/assets/images/lego_icon.svg\nconst lego_icon_namespaceObject = __webpack_require__.p + "static/assets/images/lego_icon-6e54a18b7232e09de939.svg";\n;// CONCATENATED MODULE: ./client/app/ror-auto-load-components/ImageExample.jsx\nvar ImageExample_jsxFileName = "/mnt/ssd/react_on_rails_pro/spec/dummy/client/app/ror-auto-load-components/ImageExample.jsx";\n\n\n\n\n// Note the global alias for images\n\n\n\n\nconst TestComponent = props => /*#__PURE__*/react_default().createElement("div", {\n __self: undefined,\n __source: {\n fileName: ImageExample_jsxFileName,\n lineNumber: 11,\n columnNumber: 3\n }\n}, /*#__PURE__*/react_default().createElement("h1", {\n className: ImageExample_module.red,\n __self: undefined,\n __source: {\n fileName: ImageExample_jsxFileName,\n lineNumber: 12,\n columnNumber: 5\n }\n}, "This is a test of CSS module color red."), /*#__PURE__*/react_default().createElement("hr", {\n __self: undefined,\n __source: {\n fileName: ImageExample_jsxFileName,\n lineNumber: 13,\n columnNumber: 5\n }\n}), /*#__PURE__*/react_default().createElement("h1", {\n className: ImageExample_module.background,\n __self: undefined,\n __source: {\n fileName: ImageExample_jsxFileName,\n lineNumber: 14,\n columnNumber: 5\n }\n}, "Here is a label with a background-image from the CSS modules imported"), /*#__PURE__*/react_default().createElement("img", {\n src: _256egghead_namespaceObject,\n __self: undefined,\n __source: {\n fileName: ImageExample_jsxFileName,\n lineNumber: 15,\n columnNumber: 5\n }\n}), /*#__PURE__*/react_default().createElement("hr", {\n __self: undefined,\n __source: {\n fileName: ImageExample_jsxFileName,\n lineNumber: 16,\n columnNumber: 5\n }\n}), /*#__PURE__*/react_default().createElement("h1", {\n className: ImageExample_module.backgroundSameDirectory,\n __self: undefined,\n __source: {\n fileName: ImageExample_jsxFileName,\n lineNumber: 17,\n columnNumber: 5\n }\n}, "This label has a background image from the same directory. Below is an img tag in the same directory"), /*#__PURE__*/react_default().createElement("img", {\n src: bower_namespaceObject,\n __self: undefined,\n __source: {\n fileName: ImageExample_jsxFileName,\n lineNumber: 20,\n columnNumber: 5\n }\n}), /*#__PURE__*/react_default().createElement("hr", {\n __self: undefined,\n __source: {\n fileName: ImageExample_jsxFileName,\n lineNumber: 21,\n columnNumber: 5\n }\n}), /*#__PURE__*/react_default().createElement("h1", {\n __self: undefined,\n __source: {\n fileName: ImageExample_jsxFileName,\n lineNumber: 22,\n columnNumber: 5\n }\n}, " Below is an img tag of a svg in the same directory"), /*#__PURE__*/react_default().createElement("img", {\n src: blueprint_icon_namespaceObject,\n __self: undefined,\n __source: {\n fileName: ImageExample_jsxFileName,\n lineNumber: 23,\n columnNumber: 5\n }\n}), /*#__PURE__*/react_default().createElement("hr", {\n __self: undefined,\n __source: {\n fileName: ImageExample_jsxFileName,\n lineNumber: 24,\n columnNumber: 5\n }\n}), /*#__PURE__*/react_default().createElement("h1", {\n __self: undefined,\n __source: {\n fileName: ImageExample_jsxFileName,\n lineNumber: 25,\n columnNumber: 5\n }\n}, "Below is a div with a background svg"), /*#__PURE__*/react_default().createElement("div", {\n className: ImageExample_module.googleLogo,\n __self: undefined,\n __source: {\n fileName: ImageExample_jsxFileName,\n lineNumber: 26,\n columnNumber: 5\n }\n}), /*#__PURE__*/react_default().createElement("hr", {\n __self: undefined,\n __source: {\n fileName: ImageExample_jsxFileName,\n lineNumber: 27,\n columnNumber: 5\n }\n}), /*#__PURE__*/react_default().createElement("h1", {\n __self: undefined,\n __source: {\n fileName: ImageExample_jsxFileName,\n lineNumber: 28,\n columnNumber: 5\n }\n}, "SVG lego icon img tag with global path"), /*#__PURE__*/react_default().createElement("img", {\n src: lego_icon_namespaceObject,\n __self: undefined,\n __source: {\n fileName: ImageExample_jsxFileName,\n lineNumber: 29,\n columnNumber: 5\n }\n}), /*#__PURE__*/react_default().createElement("hr", {\n __self: undefined,\n __source: {\n fileName: ImageExample_jsxFileName,\n lineNumber: 30,\n columnNumber: 5\n }\n}), /*#__PURE__*/react_default().createElement("h1", {\n __self: undefined,\n __source: {\n fileName: ImageExample_jsxFileName,\n lineNumber: 31,\n columnNumber: 5\n }\n}, "SVG lego icon with background image to global path"), /*#__PURE__*/react_default().createElement("div", {\n className: ImageExample_module.legoIcon,\n __self: undefined,\n __source: {\n fileName: ImageExample_jsxFileName,\n lineNumber: 32,\n columnNumber: 5\n }\n}));\nTestComponent.propTypes = {\n message: (prop_types_default()).string\n};\n/* harmony default export */ const ImageExample = (TestComponent);\n// EXTERNAL MODULE: ./node_modules/react-dom/client.js\nvar client = __webpack_require__(5338);\n;// CONCATENATED MODULE: ./client/app/ror-auto-load-components/ManualRenderApp.jsx\nvar ManualRenderApp_jsxFileName = "/mnt/ssd/react_on_rails_pro/spec/dummy/client/app/ror-auto-load-components/ManualRenderApp.jsx";\n\n\nconst hydrateOrRender = (domEl, reactEl, prerender) => {\n if (prerender) {\n return (0,client.hydrateRoot)(domEl, reactEl);\n } else {\n const root = (0,client.createRoot)(domEl);\n root.render(reactEl);\n return root;\n }\n};\n/* harmony default export */ const ManualRenderApp = ((props, _railsContext, domNodeId) => {\n const {\n prerender\n } = props;\n const reactElement = /*#__PURE__*/react_default().createElement("div", {\n __self: undefined,\n __source: {\n fileName: ManualRenderApp_jsxFileName,\n lineNumber: 18,\n columnNumber: 5\n }\n }, /*#__PURE__*/react_default().createElement("h1", {\n id: "manual-render",\n __self: undefined,\n __source: {\n fileName: ManualRenderApp_jsxFileName,\n lineNumber: 19,\n columnNumber: 7\n }\n }, "Manual Render Example"), /*#__PURE__*/react_default().createElement("p", {\n __self: undefined,\n __source: {\n fileName: ManualRenderApp_jsxFileName,\n lineNumber: 20,\n columnNumber: 7\n }\n }, "If you can see this, you can register renderer functions."));\n hydrateOrRender(document.getElementById(domNodeId), reactElement, prerender);\n});\n;// CONCATENATED MODULE: ./client/app/ror-auto-load-components/PureComponent.jsx\nvar PureComponent_jsxFileName = "/mnt/ssd/react_on_rails_pro/spec/dummy/client/app/ror-auto-load-components/PureComponent.jsx";\n/* eslint-disable react/prop-types */\n\n/* harmony default export */ const PureComponent = (props => /*#__PURE__*/react_default().createElement("h1", {\n __self: undefined,\n __source: {\n fileName: PureComponent_jsxFileName,\n lineNumber: 4,\n columnNumber: 27\n }\n}, props.title));\n// EXTERNAL MODULE: ./node_modules/react-dom/server.node.js\nvar server_node = __webpack_require__(4362);\n// EXTERNAL MODULE: ./node_modules/tslib/tslib.es6.mjs\nvar tslib_es6 = __webpack_require__(1635);\n// EXTERNAL MODULE: ./node_modules/rehackt/index.js\nvar rehackt = __webpack_require__(7243);\nvar rehackt_namespaceObject = /*#__PURE__*/__webpack_require__.t(rehackt, 2);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/common/canUse.js\nvar canUse = __webpack_require__(2619);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/globals/index.js + 4 modules\nvar globals = __webpack_require__(6319);\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/react/context/ApolloContext.js\n\n\n\n// To make sure Apollo Client doesn\'t create more than one React context\n// (which can lead to problems like having an Apollo Client instance added\n// in one context, then attempting to retrieve it from another different\n// context), a single Apollo context is created and tracked in global state.\nvar contextKey = canUse/* canUseSymbol */.ol ? Symbol.for("__APOLLO_CONTEXT__") : "__APOLLO_CONTEXT__";\nfunction getApolloContext() {\n (0,globals/* invariant */.V1)("createContext" in rehackt_namespaceObject, 45);\n var context = rehackt.createContext[contextKey];\n if (!context) {\n Object.defineProperty(rehackt.createContext, contextKey, {\n value: (context = rehackt.createContext({})),\n enumerable: false,\n writable: false,\n configurable: true,\n });\n context.displayName = "ApolloContext";\n }\n return context;\n}\n/**\n * @deprecated This function has no "resetting" effect since Apollo Client 3.4.12,\n * and will be removed in the next major version of Apollo Client.\n * If you want to get the Apollo Context, use `getApolloContext` instead.\n */\nvar resetApolloContext = (/* unused pure expression or super */ null && (getApolloContext));\n//# sourceMappingURL=ApolloContext.js.map\n// EXTERNAL MODULE: ./node_modules/@wry/trie/lib/index.js\nvar lib = __webpack_require__(2453);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/common/canonicalStringify.js\nvar canonicalStringify = __webpack_require__(6269);\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/react/ssr/RenderPromises.js\n\n\nfunction makeQueryInfoTrie() {\n // these Tries are very short-lived, so we don\'t need to worry about making it\n // "weak" - it\'s easier to test and debug as a strong Trie.\n return new lib/* Trie */.b(false, function () { return ({\n seen: false,\n observable: null,\n }); });\n}\nvar RenderPromises = /** @class */ (function () {\n function RenderPromises() {\n // Map from Query component instances to pending fetchData promises.\n this.queryPromises = new Map();\n // Two-layered map from (query document, stringified variables) to QueryInfo\n // objects. These QueryInfo objects are intended to survive through the whole\n // getMarkupFromTree process, whereas specific Query instances do not survive\n // beyond a single call to renderToStaticMarkup.\n this.queryInfoTrie = makeQueryInfoTrie();\n this.stopped = false;\n }\n RenderPromises.prototype.stop = function () {\n if (!this.stopped) {\n this.queryPromises.clear();\n this.queryInfoTrie = makeQueryInfoTrie();\n this.stopped = true;\n }\n };\n // Registers the server side rendered observable.\n RenderPromises.prototype.registerSSRObservable = function (observable) {\n if (this.stopped)\n return;\n this.lookupQueryInfo(observable.options).observable = observable;\n };\n // Get\'s the cached observable that matches the SSR Query instances query and variables.\n RenderPromises.prototype.getSSRObservable = function (props) {\n return this.lookupQueryInfo(props).observable;\n };\n RenderPromises.prototype.addQueryPromise = function (queryInstance, finish) {\n if (!this.stopped) {\n var info = this.lookupQueryInfo(queryInstance.getOptions());\n if (!info.seen) {\n this.queryPromises.set(queryInstance.getOptions(), new Promise(function (resolve) {\n resolve(queryInstance.fetchData());\n }));\n // Render null to abandon this subtree for this rendering, so that we\n // can wait for the data to arrive.\n return null;\n }\n }\n return finish ? finish() : null;\n };\n RenderPromises.prototype.addObservableQueryPromise = function (obsQuery) {\n return this.addQueryPromise({\n // The only options which seem to actually be used by the\n // RenderPromises class are query and variables.\n getOptions: function () { return obsQuery.options; },\n fetchData: function () {\n return new Promise(function (resolve) {\n var sub = obsQuery.subscribe({\n next: function (result) {\n if (!result.loading) {\n resolve();\n sub.unsubscribe();\n }\n },\n error: function () {\n resolve();\n sub.unsubscribe();\n },\n complete: function () {\n resolve();\n },\n });\n });\n },\n });\n };\n RenderPromises.prototype.hasPromises = function () {\n return this.queryPromises.size > 0;\n };\n RenderPromises.prototype.consumeAndAwaitPromises = function () {\n var _this = this;\n var promises = [];\n this.queryPromises.forEach(function (promise, queryInstance) {\n // Make sure we never try to call fetchData for this query document and\n // these variables again. Since the queryInstance objects change with\n // every rendering, deduplicating them by query and variables is the\n // best we can do. If a different Query component happens to have the\n // same query document and variables, it will be immediately rendered\n // by calling finish() in addQueryPromise, which could result in the\n // rendering of an unwanted loading state, but that\'s not nearly as bad\n // as getting stuck in an infinite rendering loop because we kept calling\n // queryInstance.fetchData for the same Query component indefinitely.\n _this.lookupQueryInfo(queryInstance).seen = true;\n promises.push(promise);\n });\n this.queryPromises.clear();\n return Promise.all(promises);\n };\n RenderPromises.prototype.lookupQueryInfo = function (props) {\n return this.queryInfoTrie.lookup(props.query, (0,canonicalStringify/* canonicalStringify */.M)(props.variables));\n };\n return RenderPromises;\n}());\n\n//# sourceMappingURL=RenderPromises.js.map\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/react/ssr/getDataFromTree.js\n\n\n\n\n\nfunction getDataFromTree(tree, context) {\n if (context === void 0) { context = {}; }\n return getMarkupFromTree({\n tree: tree,\n context: context,\n // If you need to configure this renderFunction, call getMarkupFromTree\n // directly instead of getDataFromTree.\n renderFunction: renderToStaticMarkup,\n });\n}\nfunction getMarkupFromTree(_a) {\n var tree = _a.tree, _b = _a.context, context = _b === void 0 ? {} : _b, \n // The rendering function is configurable! We use renderToStaticMarkup as\n // the default, because it\'s a little less expensive than renderToString,\n // and legacy usage of getDataFromTree ignores the return value anyway.\n _c = _a.renderFunction, \n // The rendering function is configurable! We use renderToStaticMarkup as\n // the default, because it\'s a little less expensive than renderToString,\n // and legacy usage of getDataFromTree ignores the return value anyway.\n renderFunction = _c === void 0 ? server_node.renderToStaticMarkup : _c;\n var renderPromises = new RenderPromises();\n function process() {\n // Always re-render from the rootElement, even though it might seem\n // better to render the children of the component responsible for the\n // promise, because it is not possible to reconstruct the full context\n // of the original rendering (including all unknown context provider\n // elements) for a subtree of the original component tree.\n var ApolloContext = getApolloContext();\n return new Promise(function (resolve) {\n var element = rehackt.createElement(ApolloContext.Provider, { value: (0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, context), { renderPromises: renderPromises }) }, tree);\n resolve(renderFunction(element));\n })\n .then(function (html) {\n return renderPromises.hasPromises() ?\n renderPromises.consumeAndAwaitPromises().then(process)\n : html;\n })\n .finally(function () {\n renderPromises.stop();\n });\n }\n return Promise.resolve().then(process);\n}\n//# sourceMappingURL=getDataFromTree.js.map\n// EXTERNAL MODULE: ./node_modules/graphql-tag/lib/index.js + 12 modules\nvar graphql_tag_lib = __webpack_require__(9708);\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/react/hooks/useSyncExternalStore.js\n\n\n\nvar didWarnUncachedGetSnapshot = false;\n// Prevent webpack from complaining about our feature detection of the\n// useSyncExternalStore property of the React namespace, which is expected not\n// to exist when using React 17 and earlier, and that\'s fine.\nvar uSESKey = "useSyncExternalStore";\nvar realHook = rehackt_namespaceObject[uSESKey];\n// Adapted from https://www.npmjs.com/package/use-sync-external-store, with\n// Apollo Client deviations called out by "// DEVIATION ..." comments.\n// When/if React.useSyncExternalStore is defined, delegate fully to it.\nvar useSyncExternalStore = realHook ||\n (function (subscribe, getSnapshot, getServerSnapshot) {\n // Read the current snapshot from the store on every render. Again, this\n // breaks the rules of React, and only works here because of specific\n // implementation details, most importantly that updates are\n // always synchronous.\n var value = getSnapshot();\n if (\n // DEVIATION: Using __DEV__\n globalThis.__DEV__ !== false &&\n !didWarnUncachedGetSnapshot &&\n // DEVIATION: Not using Object.is because we know our snapshots will never\n // be exotic primitive values like NaN, which is !== itself.\n value !== getSnapshot()) {\n didWarnUncachedGetSnapshot = true;\n // DEVIATION: Using invariant.error instead of console.error directly.\n globalThis.__DEV__ !== false && globals/* invariant */.V1.error(58);\n }\n // Because updates are synchronous, we don\'t queue them. Instead we force a\n // re-render whenever the subscribed state changes by updating an some\n // arbitrary useState hook. Then, during render, we call getSnapshot to read\n // the current value.\n //\n // Because we don\'t actually use the state returned by the useState hook, we\n // can save a bit of memory by storing other stuff in that slot.\n //\n // To implement the early bailout, we need to track some things on a mutable\n // object. Usually, we would put that in a useRef hook, but we can stash it in\n // our useState hook instead.\n //\n // To force a re-render, we call forceUpdate({inst}). That works because the\n // new object always fails an equality check.\n var _a = rehackt.useState({\n inst: { value: value, getSnapshot: getSnapshot },\n }), inst = _a[0].inst, forceUpdate = _a[1];\n // Track the latest getSnapshot function with a ref. This needs to be updated\n // in the layout phase so we can access it during the tearing check that\n // happens on subscribe.\n if (canUse/* canUseLayoutEffect */.JR) {\n // DEVIATION: We avoid calling useLayoutEffect when !canUseLayoutEffect,\n // which may seem like a conditional hook, but this code ends up behaving\n // unconditionally (one way or the other) because canUseLayoutEffect is\n // constant.\n rehackt.useLayoutEffect(function () {\n Object.assign(inst, { value: value, getSnapshot: getSnapshot });\n // Whenever getSnapshot or subscribe changes, we need to check in the\n // commit phase if there was an interleaved mutation. In concurrent mode\n // this can happen all the time, but even in synchronous mode, an earlier\n // effect may have mutated the store.\n if (checkIfSnapshotChanged(inst)) {\n // Force a re-render.\n forceUpdate({ inst: inst });\n }\n // React Hook React.useLayoutEffect has a missing dependency: \'inst\'. Either include it or remove the dependency array.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [subscribe, value, getSnapshot]);\n }\n else {\n Object.assign(inst, { value: value, getSnapshot: getSnapshot });\n }\n rehackt.useEffect(function () {\n // Check for changes right before subscribing. Subsequent changes will be\n // detected in the subscription handler.\n if (checkIfSnapshotChanged(inst)) {\n // Force a re-render.\n forceUpdate({ inst: inst });\n }\n // Subscribe to the store and return a clean-up function.\n return subscribe(function handleStoreChange() {\n // TODO: Because there is no cross-renderer API for batching updates, it\'s\n // up to the consumer of this library to wrap their subscription event\n // with unstable_batchedUpdates. Should we try to detect when this isn\'t\n // the case and print a warning in development?\n // The store changed. Check if the snapshot changed since the last time we\n // read from the store.\n if (checkIfSnapshotChanged(inst)) {\n // Force a re-render.\n forceUpdate({ inst: inst });\n }\n });\n // React Hook React.useEffect has a missing dependency: \'inst\'. Either include it or remove the dependency array.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [subscribe]);\n return value;\n });\nfunction checkIfSnapshotChanged(_a) {\n var value = _a.value, getSnapshot = _a.getSnapshot;\n try {\n return value !== getSnapshot();\n }\n catch (_b) {\n return true;\n }\n}\n//# sourceMappingURL=useSyncExternalStore.js.map\n// EXTERNAL MODULE: ./node_modules/@wry/equality/lib/index.js\nvar equality_lib = __webpack_require__(5381);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/common/mergeOptions.js\nvar mergeOptions = __webpack_require__(144);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/errors/index.js\nvar errors = __webpack_require__(9211);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/core/networkStatus.js\nvar networkStatus = __webpack_require__(8599);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/caching/caches.js\nvar caches = __webpack_require__(599);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/caching/sizes.js\nvar sizes = __webpack_require__(1212);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/caching/getMemoryInternals.js\nvar getMemoryInternals = __webpack_require__(5051);\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/react/parser/index.js\n\n\n\nvar DocumentType;\n(function (DocumentType) {\n DocumentType[DocumentType["Query"] = 0] = "Query";\n DocumentType[DocumentType["Mutation"] = 1] = "Mutation";\n DocumentType[DocumentType["Subscription"] = 2] = "Subscription";\n})(DocumentType || (DocumentType = {}));\nvar cache;\nfunction operationName(type) {\n var name;\n switch (type) {\n case DocumentType.Query:\n name = "Query";\n break;\n case DocumentType.Mutation:\n name = "Mutation";\n break;\n case DocumentType.Subscription:\n name = "Subscription";\n break;\n }\n return name;\n}\n// This parser is mostly used to safety check incoming documents.\nfunction parser(document) {\n if (!cache) {\n cache = new caches/* AutoCleanedWeakCache */.A(sizes/* cacheSizes */.v.parser || 1000 /* defaultCacheSizes.parser */);\n }\n var cached = cache.get(document);\n if (cached)\n return cached;\n var variables, type, name;\n (0,globals/* invariant */.V1)(!!document && !!document.kind, 60, document);\n var fragments = [];\n var queries = [];\n var mutations = [];\n var subscriptions = [];\n for (var _i = 0, _a = document.definitions; _i < _a.length; _i++) {\n var x = _a[_i];\n if (x.kind === "FragmentDefinition") {\n fragments.push(x);\n continue;\n }\n if (x.kind === "OperationDefinition") {\n switch (x.operation) {\n case "query":\n queries.push(x);\n break;\n case "mutation":\n mutations.push(x);\n break;\n case "subscription":\n subscriptions.push(x);\n break;\n }\n }\n }\n (0,globals/* invariant */.V1)(!fragments.length ||\n queries.length ||\n mutations.length ||\n subscriptions.length, 61);\n (0,globals/* invariant */.V1)(\n queries.length + mutations.length + subscriptions.length <= 1,\n 62,\n document,\n queries.length,\n subscriptions.length,\n mutations.length\n );\n type = queries.length ? DocumentType.Query : DocumentType.Mutation;\n if (!queries.length && !mutations.length)\n type = DocumentType.Subscription;\n var definitions = queries.length ? queries\n : mutations.length ? mutations\n : subscriptions;\n (0,globals/* invariant */.V1)(definitions.length === 1, 63, document, definitions.length);\n var definition = definitions[0];\n variables = definition.variableDefinitions || [];\n if (definition.name && definition.name.kind === "Name") {\n name = definition.name.value;\n }\n else {\n name = "data"; // fallback to using data if no name\n }\n var payload = { name: name, type: type, variables: variables };\n cache.set(document, payload);\n return payload;\n}\nparser.resetCache = function () {\n cache = undefined;\n};\nif (globalThis.__DEV__ !== false) {\n (0,getMemoryInternals/* registerGlobalCache */.D_)("parser", function () { return (cache ? cache.size : 0); });\n}\nfunction verifyDocumentType(document, type) {\n var operation = parser(document);\n var requiredOperationName = operationName(type);\n var usedOperationName = operationName(operation.type);\n (0,globals/* invariant */.V1)(\n operation.type === type,\n 64,\n requiredOperationName,\n requiredOperationName,\n usedOperationName\n );\n}\n//# sourceMappingURL=index.js.map\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/react/hooks/useApolloClient.js\n\n\n\n/**\n * @example\n * ```jsx\n * import { useApolloClient } from \'@apollo/client\';\n *\n * function SomeComponent() {\n * const client = useApolloClient();\n * // `client` is now set to the `ApolloClient` instance being used by the\n * // application (that was configured using something like `ApolloProvider`)\n * }\n * ```\n *\n * @since 3.0.0\n * @returns The `ApolloClient` instance being used by the application.\n */\nfunction useApolloClient(override) {\n var context = rehackt.useContext(getApolloContext());\n var client = override || context.client;\n (0,globals/* invariant */.V1)(!!client, 49);\n return client;\n}\n//# sourceMappingURL=useApolloClient.js.map\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/common/maybeDeepFreeze.js\nvar maybeDeepFreeze = __webpack_require__(1469);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/common/compact.js\nvar compact = __webpack_require__(7945);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/common/arrays.js\nvar arrays = __webpack_require__(5636);\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/react/hooks/internal/wrapHook.js\nvar wrapperSymbol = Symbol.for("apollo.hook.wrappers");\n/**\n * @internal\n *\n * Makes an Apollo Client hook "wrappable".\n * That means that the Apollo Client instance can expose a "wrapper" that will be\n * used to wrap the original hook implementation with additional logic.\n * @example\n * ```tsx\n * // this is already done in `@apollo/client` for all wrappable hooks (see `WrappableHooks`)\n * // following this pattern\n * function useQuery() {\n * return wrapHook(\'useQuery\', _useQuery, options.client)(query, options);\n * }\n * function _useQuery(query, options) {\n * // original implementation\n * }\n *\n * // this is what a library like `@apollo/client-react-streaming` would do\n * class ApolloClientWithStreaming extends ApolloClient {\n * constructor(options) {\n * super(options);\n * this.queryManager[Symbol.for("apollo.hook.wrappers")] = {\n * useQuery: (original) => (query, options) => {\n * console.log("useQuery was called with options", options);\n * return original(query, options);\n * }\n * }\n * }\n * }\n *\n * // this will now log the options and then call the original `useQuery`\n * const client = new ApolloClientWithStreaming({ ... });\n * useQuery(query, { client });\n * ```\n */\nfunction wrapHook(hookName, useHook, clientOrObsQuery) {\n var queryManager = clientOrObsQuery["queryManager"];\n var wrappers = queryManager && queryManager[wrapperSymbol];\n var wrapper = wrappers && wrappers[hookName];\n return wrapper ? wrapper(useHook) : useHook;\n}\n//# sourceMappingURL=wrapHook.js.map\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/react/hooks/useQuery.js\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar useQuery_hasOwnProperty = Object.prototype.hasOwnProperty;\n/**\n * A hook for executing queries in an Apollo application.\n *\n * To run a query within a React component, call `useQuery` and pass it a GraphQL query document.\n *\n * When your component renders, `useQuery` returns an object from Apollo Client that contains `loading`, `error`, and `data` properties you can use to render your UI.\n *\n * > Refer to the [Queries](https://www.apollographql.com/docs/react/data/queries) section for a more in-depth overview of `useQuery`.\n *\n * @example\n * ```jsx\n * import { gql, useQuery } from \'@apollo/client\';\n *\n * const GET_GREETING = gql`\n * query GetGreeting($language: String!) {\n * greeting(language: $language) {\n * message\n * }\n * }\n * `;\n *\n * function Hello() {\n * const { loading, error, data } = useQuery(GET_GREETING, {\n * variables: { language: \'english\' },\n * });\n * if (loading) return <p>Loading ...</p>;\n * return <h1>Hello {data.greeting.message}!</h1>;\n * }\n * ```\n * @since 3.0.0\n * @param query - A GraphQL query document parsed into an AST by `gql`.\n * @param options - Options to control how the query is executed.\n * @returns Query result object\n */\nfunction useQuery(query, options) {\n if (options === void 0) { options = Object.create(null); }\n return wrapHook("useQuery", _useQuery, useApolloClient(options && options.client))(query, options);\n}\nfunction _useQuery(query, options) {\n return useInternalState(useApolloClient(options.client), query).useQuery(options);\n}\nfunction useInternalState(client, query) {\n // By default, InternalState.prototype.forceUpdate is an empty function, but\n // we replace it here (before anyone has had a chance to see this state yet)\n // with a function that unconditionally forces an update, using the latest\n // setTick function. Updating this state by calling state.forceUpdate or the\n // uSES notification callback are the only way we trigger React component updates.\n var forceUpdateState = rehackt.useReducer(function (tick) { return tick + 1; }, 0)[1];\n function createInternalState(previous) {\n return Object.assign(new InternalState(client, query, previous), {\n forceUpdateState: forceUpdateState,\n });\n }\n var _a = rehackt.useState(createInternalState), state = _a[0], updateState = _a[1];\n if (client !== state.client || query !== state.query) {\n // If the client or query have changed, we need to create a new InternalState.\n // This will trigger a re-render with the new state, but it will also continue\n // to run the current render function to completion.\n // Since we sometimes trigger some side-effects in the render function, we\n // re-assign `state` to the new state to ensure that those side-effects are\n // triggered with the new state.\n updateState((state = createInternalState(state)));\n }\n return state;\n}\nvar InternalState = /** @class */ (function () {\n function InternalState(client, query, previous) {\n var _this = this;\n this.client = client;\n this.query = query;\n /**\n * Will be overwritten by the `useSyncExternalStore` "force update" method\n * whenever it is available and reset to `forceUpdateState` when it isn\'t.\n */\n this.forceUpdate = function () { return _this.forceUpdateState(); };\n this.ssrDisabledResult = (0,maybeDeepFreeze/* maybeDeepFreeze */.G)({\n loading: true,\n data: void 0,\n error: void 0,\n networkStatus: networkStatus/* NetworkStatus */.pT.loading,\n });\n this.skipStandbyResult = (0,maybeDeepFreeze/* maybeDeepFreeze */.G)({\n loading: false,\n data: void 0,\n error: void 0,\n networkStatus: networkStatus/* NetworkStatus */.pT.ready,\n });\n // This cache allows the referential stability of this.result (as returned by\n // getCurrentResult) to translate into referential stability of the resulting\n // QueryResult object returned by toQueryResult.\n this.toQueryResultCache = new (canUse/* canUseWeakMap */.et ? WeakMap : Map)();\n verifyDocumentType(query, DocumentType.Query);\n // Reuse previousData from previous InternalState (if any) to provide\n // continuity of previousData even if/when the query or client changes.\n var previousResult = previous && previous.result;\n var previousData = previousResult && previousResult.data;\n if (previousData) {\n this.previousData = previousData;\n }\n }\n /**\n * Forces an update using local component state.\n * As this is not batched with `useSyncExternalStore` updates,\n * this is only used as a fallback if the `useSyncExternalStore` "force update"\n * method is not registered at the moment.\n * See https://github.com/facebook/react/issues/25191\n * */\n InternalState.prototype.forceUpdateState = function () {\n // Replaced (in useInternalState) with a method that triggers an update.\n globalThis.__DEV__ !== false && globals/* invariant */.V1.warn(51);\n };\n InternalState.prototype.executeQuery = function (options) {\n var _this = this;\n var _a;\n if (options.query) {\n Object.assign(this, { query: options.query });\n }\n this.watchQueryOptions = this.createWatchQueryOptions((this.queryHookOptions = options));\n var concast = this.observable.reobserveAsConcast(this.getObsQueryOptions());\n // Make sure getCurrentResult returns a fresh ApolloQueryResult<TData>,\n // but save the current data as this.previousData, just like setResult\n // usually does.\n this.previousData = ((_a = this.result) === null || _a === void 0 ? void 0 : _a.data) || this.previousData;\n this.result = void 0;\n this.forceUpdate();\n return new Promise(function (resolve) {\n var result;\n // Subscribe to the concast independently of the ObservableQuery in case\n // the component gets unmounted before the promise resolves. This prevents\n // the concast from terminating early and resolving with `undefined` when\n // there are no more subscribers for the concast.\n concast.subscribe({\n next: function (value) {\n result = value;\n },\n error: function () {\n resolve(_this.toQueryResult(_this.observable.getCurrentResult()));\n },\n complete: function () {\n resolve(_this.toQueryResult(result));\n },\n });\n });\n };\n // Methods beginning with use- should be called according to the standard\n // rules of React hooks: only at the top level of the calling function, and\n // without any dynamic conditional logic.\n InternalState.prototype.useQuery = function (options) {\n var _this = this;\n // The renderPromises field gets initialized here in the useQuery method, at\n // the beginning of everything (for a given component rendering, at least),\n // so we can safely use this.renderPromises in other/later InternalState\n // methods without worrying it might be uninitialized. Even after\n // initialization, this.renderPromises is usually undefined (unless SSR is\n // happening), but that\'s fine as long as it has been initialized that way,\n // rather than left uninitialized.\n // eslint-disable-next-line react-hooks/rules-of-hooks\n this.renderPromises = rehackt.useContext(getApolloContext()).renderPromises;\n this.useOptions(options);\n var obsQuery = this.useObservableQuery();\n // eslint-disable-next-line react-hooks/rules-of-hooks\n var result = useSyncExternalStore(\n // eslint-disable-next-line react-hooks/rules-of-hooks\n rehackt.useCallback(function (handleStoreChange) {\n if (_this.renderPromises) {\n return function () { };\n }\n _this.forceUpdate = handleStoreChange;\n var onNext = function () {\n var previousResult = _this.result;\n // We use `getCurrentResult()` instead of the onNext argument because\n // the values differ slightly. Specifically, loading results will have\n // an empty object for data instead of `undefined` for some reason.\n var result = obsQuery.getCurrentResult();\n // Make sure we\'re not attempting to re-render similar results\n if (previousResult &&\n previousResult.loading === result.loading &&\n previousResult.networkStatus === result.networkStatus &&\n (0,equality_lib/* equal */.L)(previousResult.data, result.data)) {\n return;\n }\n _this.setResult(result);\n };\n var onError = function (error) {\n subscription.unsubscribe();\n subscription = obsQuery.resubscribeAfterError(onNext, onError);\n if (!useQuery_hasOwnProperty.call(error, "graphQLErrors")) {\n // The error is not a GraphQL error\n throw error;\n }\n var previousResult = _this.result;\n if (!previousResult ||\n (previousResult && previousResult.loading) ||\n !(0,equality_lib/* equal */.L)(error, previousResult.error)) {\n _this.setResult({\n data: (previousResult && previousResult.data),\n error: error,\n loading: false,\n networkStatus: networkStatus/* NetworkStatus */.pT.error,\n });\n }\n };\n var subscription = obsQuery.subscribe(onNext, onError);\n // Do the "unsubscribe" with a short delay.\n // This way, an existing subscription can be reused without an additional\n // request if "unsubscribe" and "resubscribe" to the same ObservableQuery\n // happen in very fast succession.\n return function () {\n setTimeout(function () { return subscription.unsubscribe(); });\n _this.forceUpdate = function () { return _this.forceUpdateState(); };\n };\n }, [\n // We memoize the subscribe function using useCallback and the following\n // dependency keys, because the subscribe function reference is all that\n // useSyncExternalStore uses internally as a dependency key for the\n // useEffect ultimately responsible for the subscription, so we are\n // effectively passing this dependency array to that useEffect buried\n // inside useSyncExternalStore, as desired.\n obsQuery,\n // eslint-disable-next-line react-hooks/exhaustive-deps\n this.renderPromises,\n // eslint-disable-next-line react-hooks/exhaustive-deps\n this.client.disableNetworkFetches,\n ]), function () { return _this.getCurrentResult(); }, function () { return _this.getCurrentResult(); });\n // TODO Remove this method when we remove support for options.partialRefetch.\n this.unsafeHandlePartialRefetch(result);\n return this.toQueryResult(result);\n };\n InternalState.prototype.useOptions = function (options) {\n var _a;\n var watchQueryOptions = this.createWatchQueryOptions((this.queryHookOptions = options));\n // Update this.watchQueryOptions, but only when they have changed, which\n // allows us to depend on the referential stability of\n // this.watchQueryOptions elsewhere.\n var currentWatchQueryOptions = this.watchQueryOptions;\n if (!(0,equality_lib/* equal */.L)(watchQueryOptions, currentWatchQueryOptions)) {\n this.watchQueryOptions = watchQueryOptions;\n if (currentWatchQueryOptions && this.observable) {\n // Though it might be tempting to postpone this reobserve call to the\n // useEffect block, we need getCurrentResult to return an appropriate\n // loading:true result synchronously (later within the same call to\n // useQuery). Since we already have this.observable here (not true for\n // the very first call to useQuery), we are not initiating any new\n // subscriptions, though it does feel less than ideal that reobserve\n // (potentially) kicks off a network request (for example, when the\n // variables have changed), which is technically a side-effect.\n this.observable.reobserve(this.getObsQueryOptions());\n // Make sure getCurrentResult returns a fresh ApolloQueryResult<TData>,\n // but save the current data as this.previousData, just like setResult\n // usually does.\n this.previousData = ((_a = this.result) === null || _a === void 0 ? void 0 : _a.data) || this.previousData;\n this.result = void 0;\n }\n }\n // Make sure state.onCompleted and state.onError always reflect the latest\n // options.onCompleted and options.onError callbacks provided to useQuery,\n // since those functions are often recreated every time useQuery is called.\n // Like the forceUpdate method, the versions of these methods inherited from\n // InternalState.prototype are empty no-ops, but we can override them on the\n // base state object (without modifying the prototype).\n this.onCompleted =\n options.onCompleted || InternalState.prototype.onCompleted;\n this.onError = options.onError || InternalState.prototype.onError;\n if ((this.renderPromises || this.client.disableNetworkFetches) &&\n this.queryHookOptions.ssr === false &&\n !this.queryHookOptions.skip) {\n // If SSR has been explicitly disabled, and this function has been called\n // on the server side, return the default loading state.\n this.result = this.ssrDisabledResult;\n }\n else if (this.queryHookOptions.skip ||\n this.watchQueryOptions.fetchPolicy === "standby") {\n // When skipping a query (ie. we\'re not querying for data but still want to\n // render children), make sure the `data` is cleared out and `loading` is\n // set to `false` (since we aren\'t loading anything).\n //\n // NOTE: We no longer think this is the correct behavior. Skipping should\n // not automatically set `data` to `undefined`, but instead leave the\n // previous data in place. In other words, skipping should not mandate that\n // previously received data is all of a sudden removed. Unfortunately,\n // changing this is breaking, so we\'ll have to wait until Apollo Client 4.0\n // to address this.\n this.result = this.skipStandbyResult;\n }\n else if (this.result === this.ssrDisabledResult ||\n this.result === this.skipStandbyResult) {\n this.result = void 0;\n }\n };\n InternalState.prototype.getObsQueryOptions = function () {\n var toMerge = [];\n var globalDefaults = this.client.defaultOptions.watchQuery;\n if (globalDefaults)\n toMerge.push(globalDefaults);\n if (this.queryHookOptions.defaultOptions) {\n toMerge.push(this.queryHookOptions.defaultOptions);\n }\n // We use compact rather than mergeOptions for this part of the merge,\n // because we want watchQueryOptions.variables (if defined) to replace\n // this.observable.options.variables whole. This replacement allows\n // removing variables by removing them from the variables input to\n // useQuery. If the variables were always merged together (rather than\n // replaced), there would be no way to remove existing variables.\n // However, the variables from options.defaultOptions and globalDefaults\n // (if provided) should be merged, to ensure individual defaulted\n // variables always have values, if not otherwise defined in\n // observable.options or watchQueryOptions.\n toMerge.push((0,compact/* compact */.o)(this.observable && this.observable.options, this.watchQueryOptions));\n return toMerge.reduce(mergeOptions/* mergeOptions */.l);\n };\n // A function to massage options before passing them to ObservableQuery.\n InternalState.prototype.createWatchQueryOptions = function (_a) {\n var _b;\n if (_a === void 0) { _a = {}; }\n var skip = _a.skip, ssr = _a.ssr, onCompleted = _a.onCompleted, onError = _a.onError, defaultOptions = _a.defaultOptions, \n // The above options are useQuery-specific, so this ...otherOptions spread\n // makes otherOptions almost a WatchQueryOptions object, except for the\n // query property that we add below.\n otherOptions = (0,tslib_es6/* __rest */.Tt)(_a, ["skip", "ssr", "onCompleted", "onError", "defaultOptions"]);\n // This Object.assign is safe because otherOptions is a fresh ...rest object\n // that did not exist until just now, so modifications are still allowed.\n var watchQueryOptions = Object.assign(otherOptions, { query: this.query });\n if (this.renderPromises &&\n (watchQueryOptions.fetchPolicy === "network-only" ||\n watchQueryOptions.fetchPolicy === "cache-and-network")) {\n // this behavior was added to react-apollo without explanation in this PR\n // https://github.com/apollographql/react-apollo/pull/1579\n watchQueryOptions.fetchPolicy = "cache-first";\n }\n if (!watchQueryOptions.variables) {\n watchQueryOptions.variables = {};\n }\n if (skip) {\n var _c = watchQueryOptions.fetchPolicy, fetchPolicy = _c === void 0 ? this.getDefaultFetchPolicy() : _c, _d = watchQueryOptions.initialFetchPolicy, initialFetchPolicy = _d === void 0 ? fetchPolicy : _d;\n // When skipping, we set watchQueryOptions.fetchPolicy initially to\n // "standby", but we also need/want to preserve the initial non-standby\n // fetchPolicy that would have been used if not skipping.\n Object.assign(watchQueryOptions, {\n initialFetchPolicy: initialFetchPolicy,\n fetchPolicy: "standby",\n });\n }\n else if (!watchQueryOptions.fetchPolicy) {\n watchQueryOptions.fetchPolicy =\n ((_b = this.observable) === null || _b === void 0 ? void 0 : _b.options.initialFetchPolicy) ||\n this.getDefaultFetchPolicy();\n }\n return watchQueryOptions;\n };\n InternalState.prototype.getDefaultFetchPolicy = function () {\n var _a, _b;\n return (((_a = this.queryHookOptions.defaultOptions) === null || _a === void 0 ? void 0 : _a.fetchPolicy) ||\n ((_b = this.client.defaultOptions.watchQuery) === null || _b === void 0 ? void 0 : _b.fetchPolicy) ||\n "cache-first");\n };\n // Defining these methods as no-ops on the prototype allows us to call\n // state.onCompleted and/or state.onError without worrying about whether a\n // callback was provided.\n InternalState.prototype.onCompleted = function (data) { };\n InternalState.prototype.onError = function (error) { };\n InternalState.prototype.useObservableQuery = function () {\n // See if there is an existing observable that was used to fetch the same\n // data and if so, use it instead since it will contain the proper queryId\n // to fetch the result set. This is used during SSR.\n var obsQuery = (this.observable =\n (this.renderPromises &&\n this.renderPromises.getSSRObservable(this.watchQueryOptions)) ||\n this.observable || // Reuse this.observable if possible (and not SSR)\n this.client.watchQuery(this.getObsQueryOptions()));\n // eslint-disable-next-line react-hooks/rules-of-hooks\n this.obsQueryFields = rehackt.useMemo(function () { return ({\n refetch: obsQuery.refetch.bind(obsQuery),\n reobserve: obsQuery.reobserve.bind(obsQuery),\n fetchMore: obsQuery.fetchMore.bind(obsQuery),\n updateQuery: obsQuery.updateQuery.bind(obsQuery),\n startPolling: obsQuery.startPolling.bind(obsQuery),\n stopPolling: obsQuery.stopPolling.bind(obsQuery),\n subscribeToMore: obsQuery.subscribeToMore.bind(obsQuery),\n }); }, [obsQuery]);\n var ssrAllowed = !(this.queryHookOptions.ssr === false || this.queryHookOptions.skip);\n if (this.renderPromises && ssrAllowed) {\n this.renderPromises.registerSSRObservable(obsQuery);\n if (obsQuery.getCurrentResult().loading) {\n // TODO: This is a legacy API which could probably be cleaned up\n this.renderPromises.addObservableQueryPromise(obsQuery);\n }\n }\n return obsQuery;\n };\n InternalState.prototype.setResult = function (nextResult) {\n var previousResult = this.result;\n if (previousResult && previousResult.data) {\n this.previousData = previousResult.data;\n }\n this.result = nextResult;\n // Calling state.setResult always triggers an update, though some call sites\n // perform additional equality checks before committing to an update.\n this.forceUpdate();\n this.handleErrorOrCompleted(nextResult, previousResult);\n };\n InternalState.prototype.handleErrorOrCompleted = function (result, previousResult) {\n var _this = this;\n if (!result.loading) {\n var error_1 = this.toApolloError(result);\n // wait a tick in case we are in the middle of rendering a component\n Promise.resolve()\n .then(function () {\n if (error_1) {\n _this.onError(error_1);\n }\n else if (result.data &&\n (previousResult === null || previousResult === void 0 ? void 0 : previousResult.networkStatus) !== result.networkStatus &&\n result.networkStatus === networkStatus/* NetworkStatus */.pT.ready) {\n _this.onCompleted(result.data);\n }\n })\n .catch(function (error) {\n globalThis.__DEV__ !== false && globals/* invariant */.V1.warn(error);\n });\n }\n };\n InternalState.prototype.toApolloError = function (result) {\n return (0,arrays/* isNonEmptyArray */.E)(result.errors) ?\n new errors/* ApolloError */.K4({ graphQLErrors: result.errors })\n : result.error;\n };\n InternalState.prototype.getCurrentResult = function () {\n // Using this.result as a cache ensures getCurrentResult continues returning\n // the same (===) result object, unless state.setResult has been called, or\n // we\'re doing server rendering and therefore override the result below.\n if (!this.result) {\n this.handleErrorOrCompleted((this.result = this.observable.getCurrentResult()));\n }\n return this.result;\n };\n InternalState.prototype.toQueryResult = function (result) {\n var queryResult = this.toQueryResultCache.get(result);\n if (queryResult)\n return queryResult;\n var data = result.data, partial = result.partial, resultWithoutPartial = (0,tslib_es6/* __rest */.Tt)(result, ["data", "partial"]);\n this.toQueryResultCache.set(result, (queryResult = (0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({ data: data }, resultWithoutPartial), this.obsQueryFields), { client: this.client, observable: this.observable, variables: this.observable.variables, called: !this.queryHookOptions.skip, previousData: this.previousData })));\n if (!queryResult.error && (0,arrays/* isNonEmptyArray */.E)(result.errors)) {\n // Until a set naming convention for networkError and graphQLErrors is\n // decided upon, we map errors (graphQLErrors) to the error options.\n // TODO: Is it possible for both result.error and result.errors to be\n // defined here?\n queryResult.error = new errors/* ApolloError */.K4({ graphQLErrors: result.errors });\n }\n return queryResult;\n };\n InternalState.prototype.unsafeHandlePartialRefetch = function (result) {\n // WARNING: SIDE-EFFECTS IN THE RENDER FUNCTION\n //\n // TODO: This code should be removed when the partialRefetch option is\n // removed. I was unable to get this hook to behave reasonably in certain\n // edge cases when this block was put in an effect.\n if (result.partial &&\n this.queryHookOptions.partialRefetch &&\n !result.loading &&\n (!result.data || Object.keys(result.data).length === 0) &&\n this.observable.options.fetchPolicy !== "cache-only") {\n Object.assign(result, {\n loading: true,\n networkStatus: networkStatus/* NetworkStatus */.pT.refetch,\n });\n this.observable.refetch();\n }\n };\n return InternalState;\n}());\n//# sourceMappingURL=useQuery.js.map\n;// CONCATENATED MODULE: ./client/app/components/ApolloGraphQL.jsx\nvar ApolloGraphQL_jsxFileName = "/mnt/ssd/react_on_rails_pro/spec/dummy/client/app/components/ApolloGraphQL.jsx";\n\n\nconst GET_FIRST_USER = (0,graphql_tag_lib/* gql */.J1)`\n query FirstUser {\n user(id: 1) {\n name\n email\n }\n }\n`;\nconst ApolloGraphQL = () => {\n const {\n data,\n error,\n loading\n } = useQuery(GET_FIRST_USER);\n if (error) {\n throw error;\n }\n if (loading) {\n return /*#__PURE__*/react_default().createElement("div", {\n __self: undefined,\n __source: {\n fileName: ApolloGraphQL_jsxFileName,\n lineNumber: 20,\n columnNumber: 12\n }\n }, "Loading...");\n }\n const {\n name,\n email\n } = data.user;\n return /*#__PURE__*/react_default().createElement("p", {\n __self: undefined,\n __source: {\n fileName: ApolloGraphQL_jsxFileName,\n lineNumber: 24,\n columnNumber: 5\n }\n }, /*#__PURE__*/react_default().createElement("b", {\n __self: undefined,\n __source: {\n fileName: ApolloGraphQL_jsxFileName,\n lineNumber: 25,\n columnNumber: 7\n }\n }, name, ": "), email);\n};\n/* harmony default export */ const components_ApolloGraphQL = (ApolloGraphQL);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/core/ApolloClient.js + 12 modules\nvar ApolloClient = __webpack_require__(8067);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/link/http/createHttpLink.js + 14 modules\nvar createHttpLink = __webpack_require__(4132);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/cache/inmemory/inMemoryCache.js + 9 modules\nvar inMemoryCache = __webpack_require__(7404);\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/react/context/ApolloProvider.js\n\n\n\n\nvar ApolloProvider = function (_a) {\n var client = _a.client, children = _a.children;\n var ApolloContext = getApolloContext();\n var parentContext = rehackt.useContext(ApolloContext);\n var context = rehackt.useMemo(function () {\n return (0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, parentContext), { client: client || parentContext.client });\n }, [parentContext, client]);\n (0,globals/* invariant */.V1)(context.client, 46);\n return (rehackt.createElement(ApolloContext.Provider, { value: context }, children));\n};\n//# sourceMappingURL=ApolloProvider.js.map\n;// CONCATENATED MODULE: ./client/app/ror-auto-load-components/ApolloGraphQLApp.server.jsx\nvar ApolloGraphQLApp_server_jsxFileName = "/mnt/ssd/react_on_rails_pro/spec/dummy/client/app/ror-auto-load-components/ApolloGraphQLApp.server.jsx";\n\n\n\n\n\n/* harmony default export */ const ApolloGraphQLApp_server = (async (props, _railsContext) => {\n const {\n csrf,\n sessionCookie\n } = props.ssrOnlyProps;\n const client = new ApolloClient/* ApolloClient */.R({\n ssrMode: true,\n link: (0,createHttpLink/* createHttpLink */.$)({\n uri: \'http://localhost:3000/graphql\',\n headers: {\n \'X-CSRF-Token\': csrf,\n Cookie: `_dummy_session=${sessionCookie}`\n }\n }),\n cache: new inMemoryCache/* InMemoryCache */.D()\n });\n const App = /*#__PURE__*/react_default().createElement(ApolloProvider, {\n client: client,\n __self: undefined,\n __source: {\n fileName: ApolloGraphQLApp_server_jsxFileName,\n lineNumber: 21,\n columnNumber: 5\n }\n }, /*#__PURE__*/react_default().createElement(components_ApolloGraphQL, {\n __self: undefined,\n __source: {\n fileName: ApolloGraphQLApp_server_jsxFileName,\n lineNumber: 22,\n columnNumber: 7\n }\n }));\n const componentHtml = await getMarkupFromTree({\n renderFunction: server_node.renderToString,\n tree: App\n });\n const initialState = client.extract();\n\n // you need to return additional property `apolloStateTag`, to fulfill the state for hydration\n const apolloStateTag = (0,server_node.renderToString)( /*#__PURE__*/react_default().createElement("script", {\n dangerouslySetInnerHTML: {\n __html: `window.__APOLLO_STATE__=${JSON.stringify(initialState).replace(/</g, \'\\\\u003c\')};`\n },\n __self: undefined,\n __source: {\n fileName: ApolloGraphQLApp_server_jsxFileName,\n lineNumber: 35,\n columnNumber: 5\n }\n }));\n return {\n componentHtml,\n apolloStateTag\n };\n});\n;// CONCATENATED MODULE: ./client/app/components/ConsoleLogsInAsyncServer.jsx\nvar ConsoleLogsInAsyncServer_jsxFileName = "/mnt/ssd/react_on_rails_pro/spec/dummy/client/app/components/ConsoleLogsInAsyncServer.jsx";\n\nconst ConsoleLogsInAsyncServer = ({\n requestId\n}) => /*#__PURE__*/react_default().createElement("div", {\n __self: undefined,\n __source: {\n fileName: ConsoleLogsInAsyncServer_jsxFileName,\n lineNumber: 4,\n columnNumber: 3\n }\n}, /*#__PURE__*/react_default().createElement("h1", {\n __self: undefined,\n __source: {\n fileName: ConsoleLogsInAsyncServer_jsxFileName,\n lineNumber: 5,\n columnNumber: 5\n }\n}, "Console logs in async server"), /*#__PURE__*/react_default().createElement("p", {\n __self: undefined,\n __source: {\n fileName: ConsoleLogsInAsyncServer_jsxFileName,\n lineNumber: 6,\n columnNumber: 5\n }\n}, "Request ID: ", /*#__PURE__*/react_default().createElement("b", {\n __self: undefined,\n __source: {\n fileName: ConsoleLogsInAsyncServer_jsxFileName,\n lineNumber: 7,\n columnNumber: 19\n }\n}, requestId)), /*#__PURE__*/react_default().createElement("p", {\n __self: undefined,\n __source: {\n fileName: ConsoleLogsInAsyncServer_jsxFileName,\n lineNumber: 9,\n columnNumber: 5\n }\n}, "Request ID should prefix all console logs logged on the server. You shouldn\'t see more than one request ID in the console logs."), /*#__PURE__*/react_default().createElement("br", {\n __self: undefined,\n __source: {\n fileName: ConsoleLogsInAsyncServer_jsxFileName,\n lineNumber: 14,\n columnNumber: 5\n }\n}), /*#__PURE__*/react_default().createElement("div", {\n __self: undefined,\n __source: {\n fileName: ConsoleLogsInAsyncServer_jsxFileName,\n lineNumber: 16,\n columnNumber: 5\n }\n}, /*#__PURE__*/react_default().createElement("p", {\n __self: undefined,\n __source: {\n fileName: ConsoleLogsInAsyncServer_jsxFileName,\n lineNumber: 17,\n columnNumber: 7\n }\n}, "If ", /*#__PURE__*/react_default().createElement("code", {\n __self: undefined,\n __source: {\n fileName: ConsoleLogsInAsyncServer_jsxFileName,\n lineNumber: 18,\n columnNumber: 12\n }\n}, "replayServerAsyncOperationLogs"), " is set to ", /*#__PURE__*/react_default().createElement("code", {\n __self: undefined,\n __source: {\n fileName: ConsoleLogsInAsyncServer_jsxFileName,\n lineNumber: 18,\n columnNumber: 66\n }\n}, "true"), " (or not set at all because it\'s the default value), you should see all logs either logged in sync or async server operations."), /*#__PURE__*/react_default().createElement("p", {\n __self: undefined,\n __source: {\n fileName: ConsoleLogsInAsyncServer_jsxFileName,\n lineNumber: 22,\n columnNumber: 7\n }\n}, "So, you should see the following logs in the console:"), /*#__PURE__*/react_default().createElement("ul", {\n __self: undefined,\n __source: {\n fileName: ConsoleLogsInAsyncServer_jsxFileName,\n lineNumber: 23,\n columnNumber: 7\n }\n}, /*#__PURE__*/react_default().createElement("li", {\n __self: undefined,\n __source: {\n fileName: ConsoleLogsInAsyncServer_jsxFileName,\n lineNumber: 24,\n columnNumber: 9\n }\n}, "[SERVER][", requestId, "] Console log from Sync Server"), /*#__PURE__*/react_default().createElement("li", {\n __self: undefined,\n __source: {\n fileName: ConsoleLogsInAsyncServer_jsxFileName,\n lineNumber: 25,\n columnNumber: 9\n }\n}, "[SERVER][", requestId, "] Console log from Recursive Async Function at level <repeated 10 times>"), /*#__PURE__*/react_default().createElement("li", {\n __self: undefined,\n __source: {\n fileName: ConsoleLogsInAsyncServer_jsxFileName,\n lineNumber: 28,\n columnNumber: 9\n }\n}, "[SERVER][", requestId, "] Console log from Simple Async Function at iteration <repeated 10 times>"), /*#__PURE__*/react_default().createElement("li", {\n __self: undefined,\n __source: {\n fileName: ConsoleLogsInAsyncServer_jsxFileName,\n lineNumber: 31,\n columnNumber: 9\n }\n}, "[SERVER][", requestId, "] Console log from Async Server after calling async functions"))), /*#__PURE__*/react_default().createElement("br", {\n __self: undefined,\n __source: {\n fileName: ConsoleLogsInAsyncServer_jsxFileName,\n lineNumber: 35,\n columnNumber: 5\n }\n}), /*#__PURE__*/react_default().createElement("div", {\n __self: undefined,\n __source: {\n fileName: ConsoleLogsInAsyncServer_jsxFileName,\n lineNumber: 37,\n columnNumber: 5\n }\n}, /*#__PURE__*/react_default().createElement("p", {\n __self: undefined,\n __source: {\n fileName: ConsoleLogsInAsyncServer_jsxFileName,\n lineNumber: 38,\n columnNumber: 7\n }\n}, "If ", /*#__PURE__*/react_default().createElement("code", {\n __self: undefined,\n __source: {\n fileName: ConsoleLogsInAsyncServer_jsxFileName,\n lineNumber: 39,\n columnNumber: 12\n }\n}, "replayServerAsyncOperationLogs"), " is set to ", /*#__PURE__*/react_default().createElement("code", {\n __self: undefined,\n __source: {\n fileName: ConsoleLogsInAsyncServer_jsxFileName,\n lineNumber: 39,\n columnNumber: 66\n }\n}, "false"), ", you should see only logs from sync server operations."), /*#__PURE__*/react_default().createElement("p", {\n __self: undefined,\n __source: {\n fileName: ConsoleLogsInAsyncServer_jsxFileName,\n lineNumber: 43,\n columnNumber: 7\n }\n}, "So, you should see the following logs in the console:"), /*#__PURE__*/react_default().createElement("ul", {\n __self: undefined,\n __source: {\n fileName: ConsoleLogsInAsyncServer_jsxFileName,\n lineNumber: 44,\n columnNumber: 7\n }\n}, /*#__PURE__*/react_default().createElement("li", {\n __self: undefined,\n __source: {\n fileName: ConsoleLogsInAsyncServer_jsxFileName,\n lineNumber: 45,\n columnNumber: 9\n }\n}, "[SERVER][", requestId, "] Console log from Sync Server"))));\n/* harmony default export */ const components_ConsoleLogsInAsyncServer = (ConsoleLogsInAsyncServer);\n;// CONCATENATED MODULE: ./client/app/ror-auto-load-components/ConsoleLogsInAsyncServer.server.jsx\nvar ConsoleLogsInAsyncServer_server_jsxFileName = "/mnt/ssd/react_on_rails_pro/spec/dummy/client/app/ror-auto-load-components/ConsoleLogsInAsyncServer.server.jsx";\n\n\n\n/* harmony default export */ const ConsoleLogsInAsyncServer_server = (async ({\n requestId\n}, _railsContext) => {\n console.log(`[${requestId}] Console log from Sync Server`);\n const recursiveAsyncFunction = async (level = 0) => {\n await new Promise(resolve => setTimeout(resolve, 100));\n console.log(`[${requestId}] Console log from Recursive Async Function at level ${level}`);\n if (level < 10) {\n await recursiveAsyncFunction(level + 1);\n }\n };\n const loopCallOfAsyncFunction = async () => {\n const simpleAsyncFunction = async iteration => {\n await new Promise(resolve => setTimeout(resolve, 100));\n console.log(`[${requestId}] Console log from Simple Async Function at iteration ${iteration}`);\n };\n for (let i = 0; i < 10; i++) {\n await simpleAsyncFunction(i);\n }\n };\n await recursiveAsyncFunction();\n await loopCallOfAsyncFunction();\n console.log(`[${requestId}] Console log from Async Server after calling async functions`);\n return (0,server_node.renderToString)( /*#__PURE__*/react_default().createElement(components_ConsoleLogsInAsyncServer, {\n requestId: requestId,\n __self: undefined,\n __source: {\n fileName: ConsoleLogsInAsyncServer_server_jsxFileName,\n lineNumber: 31,\n columnNumber: 25\n }\n }));\n});\n;// CONCATENATED MODULE: ./node_modules/@shakacode/use-ssr-computation.runtime/lib/errorHandler.js\nclass InternalUseSSRComputationError extends Error {\n constructor(message, result) {\n super(message);\n this.name = \'InternalUseSSRComputationError\';\n this.result = result;\n }\n}\nclass UseSSRComputationError extends Error {\n constructor(message, dependencies, ssrComputationFile, error, partialResult) {\n super(message);\n this.name = \'UseSSRComputationError\';\n this.dependencies = dependencies;\n this.error = error;\n this.result = partialResult;\n this.ssrComputationFile = ssrComputationFile;\n }\n}\nlet errorHandler = () => { };\nconst setErrorHandler = (handler) => {\n errorHandler = handler;\n};\nconst handleError = (error) => {\n if (typeof errorHandler === \'function\') {\n errorHandler(error);\n }\n else {\n console.error(error);\n }\n};\nconst wrapErrorHandler = (useSSRComputation) => {\n return (...args) => {\n try {\n return useSSRComputation(...args);\n }\n catch (error) {\n let message = \'\';\n let result = null;\n if (error instanceof InternalUseSSRComputationError) {\n message = error.message;\n result = error.result;\n }\n else {\n message = String(error);\n }\n const [_, dependencies, __, relativePathToCwd] = args;\n const useSSRComputationError = new UseSSRComputationError(message, dependencies, relativePathToCwd, error, result);\n handleError(useSSRComputationError);\n return result;\n }\n };\n};\n\n;// CONCATENATED MODULE: ./node_modules/@shakacode/use-ssr-computation.runtime/lib/ssrCache.js\nlet ssrCache = {};\nconst setSSRCache = (newCache) => {\n ssrCache = newCache;\n};\nconst getSSRCache = () => {\n return ssrCache;\n};\n\n;// CONCATENATED MODULE: ./node_modules/@shakacode/use-ssr-computation.runtime/lib/utils.js\nconst NoResult = Symbol("NoResult");\nfunction isDependency(element) {\n return typeof element === \'number\' || typeof element === \'string\' || (typeof element === \'object\' && element.uniqueId !== undefined);\n}\nfunction parseDependencies(dependencies) {\n if (!Array.isArray(dependencies)) {\n throw new Error(\'Dependencies must be an array.\');\n }\n return dependencies.map((dependency) => {\n if (isDependency(dependency)) {\n return dependency;\n }\n throw new Error(`useSSRComputation: dependency ${dependency} is not a valid dependency object`);\n });\n}\nconst mapDependencyToValue = (dependency) => {\n if (typeof dependency === \'number\') {\n return dependency.toString();\n }\n if (typeof dependency === \'string\') {\n return dependency;\n }\n return dependency.uniqueId;\n};\nconst calculateCacheKey = (modulePath, dependencies) => {\n const dependenciesString = dependencies.map(mapDependencyToValue).join(\',\');\n return `${modulePath}::${dependenciesString}`;\n};\n\n;// CONCATENATED MODULE: ./node_modules/@shakacode/use-ssr-computation.runtime/lib/subscriptions.js\nlet fetchSubscriptions = () => undefined;\nlet fetchSubscriptionsPromise = new Promise((resolve) => {\n fetchSubscriptions = () => resolve();\n});\n// Used only in unit tests to reset the subscription state before the start of the next test. Not exported to the user.\nconst resetFetchingSubscriptionsForTesting = () => {\n fetchSubscriptions = () => undefined;\n fetchSubscriptionsPromise = new Promise((resolve) => {\n fetchSubscriptions = () => resolve();\n });\n};\nasync function runOnSubscriptionsResumed(callback) {\n await fetchSubscriptionsPromise;\n return callback();\n}\n\n;// CONCATENATED MODULE: ./node_modules/@shakacode/use-ssr-computation.runtime/lib/index.runtime.js\n\n\n\n\n\n// EXTERNAL MODULE: ./client/app/utils/lazyApollo.ts\nvar lazyApollo = __webpack_require__(2580);\n;// CONCATENATED MODULE: ./client/app/utils/dom.ts\nconst isSSR = typeof window === \'undefined\';\n;// CONCATENATED MODULE: ./client/app/ssr-computations/userQuery.ssr-computation.ts\n\n\n\n\nconst USER_QUERY = (0,graphql_tag_lib/* gql */.J1)`\n query User($id: ID!) {\n user(id: $id) {\n id\n name\n email\n }\n }\n`;\nconst preloadQuery = userId => {\n const apolloClient = (0,lazyApollo.getApolloClient)();\n if (!apolloClient) {\n throw new Error(\'Apollo client not found\');\n }\n return apolloClient.query({\n query: USER_QUERY,\n variables: {\n id: userId\n }\n });\n};\nconst compute = userId => {\n const initializedApolloClient = (0,lazyApollo.getApolloClient)();\n if (!initializedApolloClient && isSSR) {\n console.log(\'Apollo Client is not initialized on server-side before calling useSSRComputation\');\n }\n const apolloClient = initializedApolloClient ?? (0,lazyApollo.initializeApolloClient)();\n const data = apolloClient.cache.readQuery({\n query: USER_QUERY,\n variables: {\n id: userId\n }\n });\n return data ?? NoResult;\n};\nconst subscribe = (getCurrentResult, next, userId) => {\n const apolloClient = (0,lazyApollo.getApolloClient)();\n if (!apolloClient) {\n throw new Error(\'Apollo client not found\');\n }\n return apolloClient.watchQuery({\n query: USER_QUERY,\n variables: {\n id: userId\n }\n }).subscribe({\n next: result => {\n next(result.data);\n }\n });\n};\n;// CONCATENATED MODULE: ./node_modules/@shakacode/use-ssr-computation.runtime/lib/useSSRComputation_Server.js\n\n\n\nconst useSSRComputation_Server = (computationModule, dependencies, options, relativePathToCwd) => {\n const cache = getSSRCache();\n if (options.skip)\n return null;\n const result = computationModule.compute(...dependencies);\n if (result === NoResult) {\n throw new Error(\'The SSR Computation module must return a result on server side\');\n }\n // relativePathToCwd is used to make sure that the cache key is unique for each module\n // and it\'s not affected by the file that calls it\n const cacheKey = calculateCacheKey(relativePathToCwd, dependencies);\n cache[cacheKey] = {\n result,\n isSubscription: !!computationModule.subscribe,\n };\n return result;\n};\n/* harmony default export */ const lib_useSSRComputation_Server = (wrapErrorHandler(useSSRComputation_Server));\n\n;// CONCATENATED MODULE: ./client/app/utils/useLazyMutation.ts\n\n\nconst useLazyMutation = (loadMutation, options) => {\n const [result, setResult] = (0,react.useState)({\n loading: false\n });\n const currentOptions = (0,react.useRef)(options);\n currentOptions.current = options;\n const isMounted = (0,react.useRef)(true);\n (0,react.useEffect)(() => {\n return () => {\n isMounted.current = false;\n };\n }, []);\n const execute = (0,react.useCallback)(async variables => {\n fetchSubscriptions();\n setResult({\n loading: true\n });\n const [apolloClient, mutation] = await Promise.all([Promise.resolve(/* import() */).then(__webpack_require__.bind(__webpack_require__, 2580)).then(lazyApollo => lazyApollo.initializeApolloClient()), loadMutation()]);\n if (!isMounted.current) return;\n const result = await apolloClient.mutate({\n mutation,\n ...currentOptions.current,\n variables: {\n ...currentOptions.current?.variables,\n ...variables\n }\n });\n if (!isMounted.current) return;\n setResult({\n ...result,\n loading: false\n });\n }, [loadMutation]);\n return [execute, result];\n};\n;// CONCATENATED MODULE: ./client/app/components/LazyApolloGraphQL.tsx\nvar LazyApolloGraphQL_jsxFileName = "/mnt/ssd/react_on_rails_pro/spec/dummy/client/app/components/LazyApolloGraphQL.tsx";\n\n\n\n\n\nsetErrorHandler(error => {\n throw error;\n});\nconst UserPanel = () => {\n const [userId, setUserId] = (0,react.useState)(1);\n const newNameInputRef = (0,react.useRef)(null);\n const data = lib_useSSRComputation_Server(userQuery_ssr_computation_namespaceObject, [userId], {}, "client/app/ssr-computations/userQuery.ssr-computation");\n const [updateUserMutation, {\n errors: updateError,\n loading: updating\n }] = useLazyMutation(() => Promise.resolve(/* import() */).then(__webpack_require__.bind(__webpack_require__, 4766)).then(lazyApolloOperations => lazyApolloOperations.UPDATE_USER_MUTATION));\n const renderUserInfo = () => {\n if (!data) {\n return /*#__PURE__*/react_default().createElement("div", {\n __self: undefined,\n __source: {\n fileName: LazyApolloGraphQL_jsxFileName,\n lineNumber: 23,\n columnNumber: 14\n }\n }, "Loading...");\n }\n const {\n name,\n email\n } = data.user;\n return /*#__PURE__*/react_default().createElement("p", {\n __self: undefined,\n __source: {\n fileName: LazyApolloGraphQL_jsxFileName,\n lineNumber: 27,\n columnNumber: 7\n }\n }, /*#__PURE__*/react_default().createElement("b", {\n __self: undefined,\n __source: {\n fileName: LazyApolloGraphQL_jsxFileName,\n lineNumber: 28,\n columnNumber: 9\n }\n }, name, ": "), email);\n };\n const changeUser = () => {\n setUserId(prevState => prevState === 1 ? 2 : 1);\n };\n const updateUser = () => {\n const newName = newNameInputRef.current?.value;\n if (!newName) return;\n void updateUserMutation({\n newName: newName,\n userId: userId\n });\n };\n const buttonStyle = {\n background: \'rgba(51, 51, 51, 0.05)\',\n border: \'1px solid rgba(51, 51, 51, 0.1)\',\n borderRadius: \'4px\',\n padding: \'4px 8px\'\n };\n return /*#__PURE__*/react_default().createElement("div", {\n __self: undefined,\n __source: {\n fileName: LazyApolloGraphQL_jsxFileName,\n lineNumber: 51,\n columnNumber: 5\n }\n }, renderUserInfo(), /*#__PURE__*/react_default().createElement("button", {\n style: buttonStyle,\n onClick: changeUser,\n __self: undefined,\n __source: {\n fileName: LazyApolloGraphQL_jsxFileName,\n lineNumber: 53,\n columnNumber: 7\n }\n }, "Change User"), /*#__PURE__*/react_default().createElement("br", {\n __self: undefined,\n __source: {\n fileName: LazyApolloGraphQL_jsxFileName,\n lineNumber: 56,\n columnNumber: 7\n }\n }), /*#__PURE__*/react_default().createElement("br", {\n __self: undefined,\n __source: {\n fileName: LazyApolloGraphQL_jsxFileName,\n lineNumber: 57,\n columnNumber: 7\n }\n }), /*#__PURE__*/react_default().createElement("div", {\n __self: undefined,\n __source: {\n fileName: LazyApolloGraphQL_jsxFileName,\n lineNumber: 58,\n columnNumber: 7\n }\n }, /*#__PURE__*/react_default().createElement("b", {\n __self: undefined,\n __source: {\n fileName: LazyApolloGraphQL_jsxFileName,\n lineNumber: 59,\n columnNumber: 9\n }\n }, "Update User")), /*#__PURE__*/react_default().createElement("label", {\n __self: undefined,\n __source: {\n fileName: LazyApolloGraphQL_jsxFileName,\n lineNumber: 61,\n columnNumber: 7\n }\n }, "New User Name: "), /*#__PURE__*/react_default().createElement("input", {\n type: "text",\n ref: newNameInputRef,\n __self: undefined,\n __source: {\n fileName: LazyApolloGraphQL_jsxFileName,\n lineNumber: 62,\n columnNumber: 7\n }\n }), /*#__PURE__*/react_default().createElement("br", {\n __self: undefined,\n __source: {\n fileName: LazyApolloGraphQL_jsxFileName,\n lineNumber: 63,\n columnNumber: 7\n }\n }), /*#__PURE__*/react_default().createElement("button", {\n style: buttonStyle,\n className: "bg-blue-500 hover:bg-blue-700",\n onClick: updateUser,\n __self: undefined,\n __source: {\n fileName: LazyApolloGraphQL_jsxFileName,\n lineNumber: 64,\n columnNumber: 7\n }\n }, "Update User"), updating && /*#__PURE__*/react_default().createElement("div", {\n __self: undefined,\n __source: {\n fileName: LazyApolloGraphQL_jsxFileName,\n lineNumber: 68,\n columnNumber: 20\n }\n }, "Updating..."), updateError && /*#__PURE__*/react_default().createElement("div", {\n style: {\n color: \'red\'\n },\n __self: undefined,\n __source: {\n fileName: LazyApolloGraphQL_jsxFileName,\n lineNumber: 69,\n columnNumber: 23\n }\n }, "Error while updating User: ", updateError.toString()));\n};\nconst UserPanels = () => {\n return /*#__PURE__*/react_default().createElement("div", {\n style: {\n display: \'flex\',\n justifyContent: \'space-evenly\'\n },\n __self: undefined,\n __source: {\n fileName: LazyApolloGraphQL_jsxFileName,\n lineNumber: 76,\n columnNumber: 5\n }\n }, /*#__PURE__*/react_default().createElement(UserPanel, {\n __self: undefined,\n __source: {\n fileName: LazyApolloGraphQL_jsxFileName,\n lineNumber: 77,\n columnNumber: 7\n }\n }), /*#__PURE__*/react_default().createElement(UserPanel, {\n __self: undefined,\n __source: {\n fileName: LazyApolloGraphQL_jsxFileName,\n lineNumber: 78,\n columnNumber: 7\n }\n }));\n};\n/* harmony default export */ const LazyApolloGraphQL = (UserPanels);\n;// CONCATENATED MODULE: ./client/app/ror-auto-load-components/LazyApolloGraphQLApp.server.tsx\nvar LazyApolloGraphQLApp_server_jsxFileName = "/mnt/ssd/react_on_rails_pro/spec/dummy/client/app/ror-auto-load-components/LazyApolloGraphQLApp.server.tsx";\n\n\n\n\n\n\n\n\n/* harmony default export */ const LazyApolloGraphQLApp_server = (async (props, _railsContext) => {\n const {\n csrf,\n sessionCookie\n } = props.ssrOnlyProps;\n const client = new ApolloClient/* ApolloClient */.R({\n ssrMode: true,\n link: (0,createHttpLink/* createHttpLink */.$)({\n uri: \'http://localhost:3000/graphql\',\n headers: {\n \'X-CSRF-Token\': csrf,\n Cookie: `_dummy_session=${sessionCookie}`\n }\n }),\n cache: new inMemoryCache/* InMemoryCache */.D()\n });\n (0,lazyApollo.setApolloClient)(client);\n const App = /*#__PURE__*/react_default().createElement(LazyApolloGraphQL, {\n __self: undefined,\n __source: {\n fileName: LazyApolloGraphQLApp_server_jsxFileName,\n lineNumber: 32,\n columnNumber: 15\n }\n });\n\n // `ssr-computation` doesn\'t support async code on server side, so needs to preload the query before rendering\n await preloadQuery(1);\n const componentHtml = await getMarkupFromTree({\n renderFunction: server_node.renderToString,\n tree: App\n });\n const initialState = client.extract();\n\n // you need to return additional property `apolloStateTag`, to fulfill the state for hydration\n const apolloStateTag = (0,server_node.renderToString)( /*#__PURE__*/react_default().createElement("script", {\n dangerouslySetInnerHTML: {\n __html: `\n window.__APOLLO_STATE__=${JSON.stringify(initialState).replace(/</g, \'\\\\u003c\')};\n window.__SSR_COMPUTATION_CACHE=${JSON.stringify(getSSRCache())};\n `\n },\n __self: undefined,\n __source: {\n fileName: LazyApolloGraphQLApp_server_jsxFileName,\n lineNumber: 45,\n columnNumber: 5\n }\n }));\n return {\n componentHtml,\n apolloStateTag\n };\n});\n// EXTERNAL MODULE: ./node_modules/@loadable/server/lib/index.js\nvar server_lib = __webpack_require__(427);\n// EXTERNAL MODULE: ./node_modules/react-helmet/es/Helmet.js\nvar Helmet = __webpack_require__(8154);\n// EXTERNAL MODULE: ./node_modules/react-router-dom/dist/index.js\nvar dist = __webpack_require__(4976);\n// EXTERNAL MODULE: ./node_modules/react-router-dom/server.js\nvar server = __webpack_require__(3984);\n// EXTERNAL MODULE: ./node_modules/react-router/dist/index.js\nvar react_router_dist = __webpack_require__(7767);\n;// CONCATENATED MODULE: ./client/app/components/Loadable/ActiveLink.jsx\nvar ActiveLink_jsxFileName = "/mnt/ssd/react_on_rails_pro/spec/dummy/client/app/components/Loadable/ActiveLink.jsx";\n\n\nfunction ActiveLink({\n text,\n to\n}) {\n const match = (0,react_router_dist.useMatch)({\n path: to\n });\n return /*#__PURE__*/react_default().createElement("div", {\n className: match ? \'active\' : \'\',\n __self: this,\n __source: {\n fileName: ActiveLink_jsxFileName,\n lineNumber: 10,\n columnNumber: 5\n }\n }, match && \'> \', /*#__PURE__*/react_default().createElement(dist.Link, {\n to: to,\n __self: this,\n __source: {\n fileName: ActiveLink_jsxFileName,\n lineNumber: 12,\n columnNumber: 7\n }\n }, text));\n}\n/* harmony default export */ const Loadable_ActiveLink = (ActiveLink);\n;// CONCATENATED MODULE: ./client/app/components/Loadable/Header.jsx\nvar Header_jsxFileName = "/mnt/ssd/react_on_rails_pro/spec/dummy/client/app/components/Loadable/Header.jsx";\n\n\n\nconst Header = () => /*#__PURE__*/react_default().createElement("div", {\n __self: undefined,\n __source: {\n fileName: Header_jsxFileName,\n lineNumber: 6,\n columnNumber: 3\n }\n}, /*#__PURE__*/react_default().createElement(Helmet/* Helmet */.m, {\n __self: undefined,\n __source: {\n fileName: Header_jsxFileName,\n lineNumber: 7,\n columnNumber: 5\n }\n}, /*#__PURE__*/react_default().createElement("title", {\n __self: undefined,\n __source: {\n fileName: Header_jsxFileName,\n lineNumber: 8,\n columnNumber: 7\n }\n}, "Index Page")), /*#__PURE__*/react_default().createElement(Loadable_ActiveLink, {\n to: "/A",\n text: "Path A",\n __self: undefined,\n __source: {\n fileName: Header_jsxFileName,\n lineNumber: 10,\n columnNumber: 5\n }\n}), /*#__PURE__*/react_default().createElement(Loadable_ActiveLink, {\n to: "/B",\n text: "Path B",\n __self: undefined,\n __source: {\n fileName: Header_jsxFileName,\n lineNumber: 11,\n columnNumber: 5\n }\n}));\n/* harmony default export */ const Loadable_Header = (Header);\n// EXTERNAL MODULE: ./client/app/components/Loadable/routes/Routes.imports-loadable.jsx\nvar Routes_imports_loadable = __webpack_require__(8813);\n;// CONCATENATED MODULE: ./client/app/components/Loadable/routes/Routes.jsx\nvar Routes_jsxFileName = "/mnt/ssd/react_on_rails_pro/spec/dummy/client/app/components/Loadable/routes/Routes.jsx";\n\n\n\nclass LoadableRoutes extends (react_default()).PureComponent {\n render() {\n return /*#__PURE__*/react_default().createElement(react_router_dist.Routes, {\n __self: this,\n __source: {\n fileName: Routes_jsxFileName,\n lineNumber: 9,\n columnNumber: 7\n }\n }, /*#__PURE__*/react_default().createElement(react_router_dist.Route, {\n path: "A",\n Component: Routes_imports_loadable/* PageA */.$,\n __self: this,\n __source: {\n fileName: Routes_jsxFileName,\n lineNumber: 10,\n columnNumber: 9\n }\n }), /*#__PURE__*/react_default().createElement(react_router_dist.Route, {\n path: "B",\n Component: Routes_imports_loadable/* PageB */.i,\n __self: this,\n __source: {\n fileName: Routes_jsxFileName,\n lineNumber: 11,\n columnNumber: 9\n }\n }));\n }\n}\n/* harmony default export */ const Routes = (LoadableRoutes);\n// EXTERNAL MODULE: ./client/app/components/Loadable/letters/index.jsx\nvar letters = __webpack_require__(5211);\n;// CONCATENATED MODULE: ./client/app/loadable/LoadableApp.jsx\nvar LoadableApp_jsxFileName = "/mnt/ssd/react_on_rails_pro/spec/dummy/client/app/loadable/LoadableApp.jsx";\n\n\n\n\n\n\nconst basename = \'loadable\';\nconst LoadableApp = props => {\n if (typeof window === `undefined`) {\n return /*#__PURE__*/react_default().createElement(server/* StaticRouter */.kO, {\n basename: basename,\n location: props.path,\n context: {},\n __self: undefined,\n __source: {\n fileName: LoadableApp_jsxFileName,\n lineNumber: 14,\n columnNumber: 7\n }\n }, /*#__PURE__*/react_default().createElement(Loadable_Header, {\n __self: undefined,\n __source: {\n fileName: LoadableApp_jsxFileName,\n lineNumber: 15,\n columnNumber: 9\n }\n }), /*#__PURE__*/react_default().createElement(Routes, {\n __self: undefined,\n __source: {\n fileName: LoadableApp_jsxFileName,\n lineNumber: 16,\n columnNumber: 9\n }\n }), /*#__PURE__*/react_default().createElement(letters["default"], {\n __self: undefined,\n __source: {\n fileName: LoadableApp_jsxFileName,\n lineNumber: 17,\n columnNumber: 9\n }\n }));\n }\n return /*#__PURE__*/react_default().createElement(dist.BrowserRouter, {\n basename: basename,\n __self: undefined,\n __source: {\n fileName: LoadableApp_jsxFileName,\n lineNumber: 22,\n columnNumber: 5\n }\n }, /*#__PURE__*/react_default().createElement(Loadable_Header, {\n __self: undefined,\n __source: {\n fileName: LoadableApp_jsxFileName,\n lineNumber: 23,\n columnNumber: 7\n }\n }), /*#__PURE__*/react_default().createElement(Routes, {\n __self: undefined,\n __source: {\n fileName: LoadableApp_jsxFileName,\n lineNumber: 24,\n columnNumber: 7\n }\n }), /*#__PURE__*/react_default().createElement(letters["default"], {\n __self: undefined,\n __source: {\n fileName: LoadableApp_jsxFileName,\n lineNumber: 25,\n columnNumber: 7\n }\n }));\n};\n/* harmony default export */ const loadable_LoadableApp = (LoadableApp);\n;// CONCATENATED MODULE: ./client/app/loadable/loadable-server.imports-loadable.jsx\nvar loadable_server_imports_loadable_jsxFileName = "/mnt/ssd/react_on_rails_pro/spec/dummy/client/app/loadable/loadable-server.imports-loadable.jsx";\n\n\n\n\n\nconst loadableApp = (props, railsContext) => {\n const path = __webpack_require__(6928);\n\n // Note, React on Rails Pro copies the loadable-stats.json to the same place as the\n // server-bundle.js. Thus, the __dirname of this code is where we can find loadable-stats.json.\n const statsFile = path.resolve(__dirname, \'loadable-stats.json\');\n const extractor = new server_lib/* ChunkExtractor */.ky({\n entrypoints: [\'client-bundle\'],\n statsFile\n });\n const {\n pathname\n } = railsContext;\n const componentHtml = (0,server_node.renderToString)(extractor.collectChunks( /*#__PURE__*/react_default().createElement(loadable_LoadableApp, Object.assign({}, props, {\n path: pathname,\n __self: undefined,\n __source: {\n fileName: loadable_server_imports_loadable_jsxFileName,\n lineNumber: 16,\n columnNumber: 64\n }\n }))));\n const helmet = Helmet/* Helmet */.m.renderStatic();\n return {\n renderedHtml: {\n componentHtml,\n link: helmet.link.toString(),\n linkTags: extractor.getLinkTags(),\n styleTags: extractor.getStyleTags(),\n meta: helmet.meta.toString(),\n scriptTags: extractor.getScriptTags(),\n style: helmet.style.toString(),\n title: helmet.title.toString()\n }\n };\n};\n/* harmony default export */ const loadable_server_imports_loadable = (loadableApp);\n;// CONCATENATED MODULE: ./client/app/ror-auto-load-components/Loadable.server.jsx\n\n// EXTERNAL MODULE: ./node_modules/cross-fetch/dist/node-polyfill.js\nvar node_polyfill = __webpack_require__(7143);\n;// CONCATENATED MODULE: ./client/app/utils/json.ts\nconst consistentKeysReplacer = (key, value) => {\n if (value instanceof Object && !(value instanceof Array)) {\n const sortedObject = Object.keys(value).sort().reduce((sorted, currentKey) => {\n const keyValue = value[currentKey];\n sorted[currentKey] = keyValue;\n return sorted;\n }, {});\n return sortedObject;\n }\n return value;\n};\n;// CONCATENATED MODULE: ./client/app/components/ReactHelmet.jsx\nvar ReactHelmet_jsxFileName = "/mnt/ssd/react_on_rails_pro/spec/dummy/client/app/components/ReactHelmet.jsx";\n\n\n\n\nconst ReactHelmet = props => /*#__PURE__*/react_default().createElement("div", {\n __self: undefined,\n __source: {\n fileName: ReactHelmet_jsxFileName,\n lineNumber: 6,\n columnNumber: 3\n }\n}, /*#__PURE__*/react_default().createElement(Helmet/* Helmet */.m, {\n __self: undefined,\n __source: {\n fileName: ReactHelmet_jsxFileName,\n lineNumber: 7,\n columnNumber: 5\n }\n}, /*#__PURE__*/react_default().createElement("title", {\n __self: undefined,\n __source: {\n fileName: ReactHelmet_jsxFileName,\n lineNumber: 8,\n columnNumber: 7\n }\n}, "Custom page title")), "Props: ", JSON.stringify(props, consistentKeysReplacer), /*#__PURE__*/react_default().createElement(ror_auto_load_components_HelloWorld, Object.assign({}, props, {\n __self: undefined,\n __source: {\n fileName: ReactHelmet_jsxFileName,\n lineNumber: 11,\n columnNumber: 5\n }\n})), /*#__PURE__*/react_default().createElement("div", {\n __self: undefined,\n __source: {\n fileName: ReactHelmet_jsxFileName,\n lineNumber: 12,\n columnNumber: 5\n }\n}, "result from api request during server rendering:", \' \', JSON.stringify(props.apiRequestResponse, consistentKeysReplacer)));\n/* harmony default export */ const components_ReactHelmet = (ReactHelmet);\n;// CONCATENATED MODULE: ./client/app/ror-auto-load-components/ReactHelmetApp.server.jsx\nvar ReactHelmetApp_server_jsxFileName = "/mnt/ssd/react_on_rails_pro/spec/dummy/client/app/ror-auto-load-components/ReactHelmetApp.server.jsx";\n\n\n// Top level component for simple client side only rendering\n\n\n\n\n\n/*\n * Export a function that takes the props and returns an object with { renderedHtml }\n * This example shows returning renderedHtml as an object itself that contains rendered\n * component markup and additional HTML strings.\n *\n * This is imported as "ReactHelmetApp" by "serverRegistration.jsx". Note that rendered\n * component markup must go under "componentHtml" key.\n */\n/* harmony default export */ const ReactHelmetApp_server = (async (props, railsContext) => {\n const portSuffix = railsContext.port ? `:${railsContext.port}` : \'\';\n const apiRequestResponse = await fetch(`https://api.nationalize.io/?name=ReactOnRails`).then(function (response) {\n if (response.status >= 400) {\n throw new Error(\'Bad response from server\');\n }\n return response.json();\n }).catch(error => console.error(`There was an error doing an API request during server rendering: ${error}`));\n const componentHtml = (0,server_node.renderToString)( /*#__PURE__*/react_default().createElement(components_ReactHelmet, Object.assign({}, props, {\n apiRequestResponse: apiRequestResponse,\n __self: undefined,\n __source: {\n fileName: ReactHelmetApp_server_jsxFileName,\n lineNumber: 30,\n columnNumber: 40\n }\n })));\n const helmet = Helmet/* Helmet */.m.renderStatic();\n const promiseObject = {\n componentHtml,\n title: helmet.title.toString()\n };\n return promiseObject;\n});\n;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/typeof.js\nfunction _typeof(o) {\n "@babel/helpers - typeof";\n\n return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;\n }, _typeof(o);\n}\n\n;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toPrimitive.js\n\nfunction toPrimitive(t, r) {\n if ("object" != _typeof(t) || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || "default");\n if ("object" != _typeof(i)) return i;\n throw new TypeError("@@toPrimitive must return a primitive value.");\n }\n return ("string" === r ? String : Number)(t);\n}\n\n;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js\n\n\nfunction toPropertyKey(t) {\n var i = toPrimitive(t, "string");\n return "symbol" == _typeof(i) ? i : i + "";\n}\n\n;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js\n\nfunction _defineProperty(e, r, t) {\n return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {\n value: t,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }) : e[r] = t, e;\n}\n\n;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js\n\nfunction ownKeys(e, r) {\n var t = Object.keys(e);\n if (Object.getOwnPropertySymbols) {\n var o = Object.getOwnPropertySymbols(e);\n r && (o = o.filter(function (r) {\n return Object.getOwnPropertyDescriptor(e, r).enumerable;\n })), t.push.apply(t, o);\n }\n return t;\n}\nfunction _objectSpread2(e) {\n for (var r = 1; r < arguments.length; r++) {\n var t = null != arguments[r] ? arguments[r] : {};\n r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {\n _defineProperty(e, r, t[r]);\n }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {\n Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));\n });\n }\n return e;\n}\n\n;// CONCATENATED MODULE: ./node_modules/redux/es/redux.js\n\n\n/**\n * Adapted from React: https://github.com/facebook/react/blob/master/packages/shared/formatProdErrorMessage.js\n *\n * Do not require this module directly! Use normal throw error calls. These messages will be replaced with error codes\n * during build.\n * @param {number} code\n */\nfunction formatProdErrorMessage(code) {\n return "Minified Redux error #" + code + "; visit https://redux.js.org/Errors?code=" + code + " for the full message or " + \'use the non-minified dev environment for full errors. \';\n}\n\n// Inlined version of the `symbol-observable` polyfill\nvar $$observable = (function () {\n return typeof Symbol === \'function\' && Symbol.observable || \'@@observable\';\n})();\n\n/**\n * These are private action types reserved by Redux.\n * For any unknown actions, you must return the current state.\n * If the current state is undefined, you must return the initial state.\n * Do not reference these action types directly in your code.\n */\nvar randomString = function randomString() {\n return Math.random().toString(36).substring(7).split(\'\').join(\'.\');\n};\n\nvar ActionTypes = {\n INIT: "@@redux/INIT" + randomString(),\n REPLACE: "@@redux/REPLACE" + randomString(),\n PROBE_UNKNOWN_ACTION: function PROBE_UNKNOWN_ACTION() {\n return "@@redux/PROBE_UNKNOWN_ACTION" + randomString();\n }\n};\n\n/**\n * @param {any} obj The object to inspect.\n * @returns {boolean} True if the argument appears to be a plain object.\n */\nfunction isPlainObject(obj) {\n if (typeof obj !== \'object\' || obj === null) return false;\n var proto = obj;\n\n while (Object.getPrototypeOf(proto) !== null) {\n proto = Object.getPrototypeOf(proto);\n }\n\n return Object.getPrototypeOf(obj) === proto;\n}\n\n// Inlined / shortened version of `kindOf` from https://github.com/jonschlinkert/kind-of\nfunction miniKindOf(val) {\n if (val === void 0) return \'undefined\';\n if (val === null) return \'null\';\n var type = typeof val;\n\n switch (type) {\n case \'boolean\':\n case \'string\':\n case \'number\':\n case \'symbol\':\n case \'function\':\n {\n return type;\n }\n }\n\n if (Array.isArray(val)) return \'array\';\n if (isDate(val)) return \'date\';\n if (isError(val)) return \'error\';\n var constructorName = ctorName(val);\n\n switch (constructorName) {\n case \'Symbol\':\n case \'Promise\':\n case \'WeakMap\':\n case \'WeakSet\':\n case \'Map\':\n case \'Set\':\n return constructorName;\n } // other\n\n\n return type.slice(8, -1).toLowerCase().replace(/\\s/g, \'\');\n}\n\nfunction ctorName(val) {\n return typeof val.constructor === \'function\' ? val.constructor.name : null;\n}\n\nfunction isError(val) {\n return val instanceof Error || typeof val.message === \'string\' && val.constructor && typeof val.constructor.stackTraceLimit === \'number\';\n}\n\nfunction isDate(val) {\n if (val instanceof Date) return true;\n return typeof val.toDateString === \'function\' && typeof val.getDate === \'function\' && typeof val.setDate === \'function\';\n}\n\nfunction kindOf(val) {\n var typeOfVal = typeof val;\n\n if (true) {\n typeOfVal = miniKindOf(val);\n }\n\n return typeOfVal;\n}\n\n/**\n * @deprecated\n *\n * **We recommend using the `configureStore` method\n * of the `@reduxjs/toolkit` package**, which replaces `createStore`.\n *\n * Redux Toolkit is our recommended approach for writing Redux logic today,\n * including store setup, reducers, data fetching, and more.\n *\n * **For more details, please read this Redux docs page:**\n * **https://redux.js.org/introduction/why-rtk-is-redux-today**\n *\n * `configureStore` from Redux Toolkit is an improved version of `createStore` that\n * simplifies setup and helps avoid common bugs.\n *\n * You should not be using the `redux` core package by itself today, except for learning purposes.\n * The `createStore` method from the core `redux` package will not be removed, but we encourage\n * all users to migrate to using Redux Toolkit for all Redux code.\n *\n * If you want to use `createStore` without this visual deprecation warning, use\n * the `legacy_createStore` import instead:\n *\n * `import { legacy_createStore as createStore} from \'redux\'`\n *\n */\n\nfunction createStore(reducer, preloadedState, enhancer) {\n var _ref2;\n\n if (typeof preloadedState === \'function\' && typeof enhancer === \'function\' || typeof enhancer === \'function\' && typeof arguments[3] === \'function\') {\n throw new Error( false ? 0 : \'It looks like you are passing several store enhancers to \' + \'createStore(). This is not supported. Instead, compose them \' + \'together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.\');\n }\n\n if (typeof preloadedState === \'function\' && typeof enhancer === \'undefined\') {\n enhancer = preloadedState;\n preloadedState = undefined;\n }\n\n if (typeof enhancer !== \'undefined\') {\n if (typeof enhancer !== \'function\') {\n throw new Error( false ? 0 : "Expected the enhancer to be a function. Instead, received: \'" + kindOf(enhancer) + "\'");\n }\n\n return enhancer(createStore)(reducer, preloadedState);\n }\n\n if (typeof reducer !== \'function\') {\n throw new Error( false ? 0 : "Expected the root reducer to be a function. Instead, received: \'" + kindOf(reducer) + "\'");\n }\n\n var currentReducer = reducer;\n var currentState = preloadedState;\n var currentListeners = [];\n var nextListeners = currentListeners;\n var isDispatching = false;\n /**\n * This makes a shallow copy of currentListeners so we can use\n * nextListeners as a temporary list while dispatching.\n *\n * This prevents any bugs around consumers calling\n * subscribe/unsubscribe in the middle of a dispatch.\n */\n\n function ensureCanMutateNextListeners() {\n if (nextListeners === currentListeners) {\n nextListeners = currentListeners.slice();\n }\n }\n /**\n * Reads the state tree managed by the store.\n *\n * @returns {any} The current state tree of your application.\n */\n\n\n function getState() {\n if (isDispatching) {\n throw new Error( false ? 0 : \'You may not call store.getState() while the reducer is executing. \' + \'The reducer has already received the state as an argument. \' + \'Pass it down from the top reducer instead of reading it from the store.\');\n }\n\n return currentState;\n }\n /**\n * Adds a change listener. It will be called any time an action is dispatched,\n * and some part of the state tree may potentially have changed. You may then\n * call `getState()` to read the current state tree inside the callback.\n *\n * You may call `dispatch()` from a change listener, with the following\n * caveats:\n *\n * 1. The subscriptions are snapshotted just before every `dispatch()` call.\n * If you subscribe or unsubscribe while the listeners are being invoked, this\n * will not have any effect on the `dispatch()` that is currently in progress.\n * However, the next `dispatch()` call, whether nested or not, will use a more\n * recent snapshot of the subscription list.\n *\n * 2. The listener should not expect to see all state changes, as the state\n * might have been updated multiple times during a nested `dispatch()` before\n * the listener is called. It is, however, guaranteed that all subscribers\n * registered before the `dispatch()` started will be called with the latest\n * state by the time it exits.\n *\n * @param {Function} listener A callback to be invoked on every dispatch.\n * @returns {Function} A function to remove this change listener.\n */\n\n\n function subscribe(listener) {\n if (typeof listener !== \'function\') {\n throw new Error( false ? 0 : "Expected the listener to be a function. Instead, received: \'" + kindOf(listener) + "\'");\n }\n\n if (isDispatching) {\n throw new Error( false ? 0 : \'You may not call store.subscribe() while the reducer is executing. \' + \'If you would like to be notified after the store has been updated, subscribe from a \' + \'component and invoke store.getState() in the callback to access the latest state. \' + \'See https://redux.js.org/api/store#subscribelistener for more details.\');\n }\n\n var isSubscribed = true;\n ensureCanMutateNextListeners();\n nextListeners.push(listener);\n return function unsubscribe() {\n if (!isSubscribed) {\n return;\n }\n\n if (isDispatching) {\n throw new Error( false ? 0 : \'You may not unsubscribe from a store listener while the reducer is executing. \' + \'See https://redux.js.org/api/store#subscribelistener for more details.\');\n }\n\n isSubscribed = false;\n ensureCanMutateNextListeners();\n var index = nextListeners.indexOf(listener);\n nextListeners.splice(index, 1);\n currentListeners = null;\n };\n }\n /**\n * Dispatches an action. It is the only way to trigger a state change.\n *\n * The `reducer` function, used to create the store, will be called with the\n * current state tree and the given `action`. Its return value will\n * be considered the **next** state of the tree, and the change listeners\n * will be notified.\n *\n * The base implementation only supports plain object actions. If you want to\n * dispatch a Promise, an Observable, a thunk, or something else, you need to\n * wrap your store creating function into the corresponding middleware. For\n * example, see the documentation for the `redux-thunk` package. Even the\n * middleware will eventually dispatch plain object actions using this method.\n *\n * @param {Object} action A plain object representing “what changed”. It is\n * a good idea to keep actions serializable so you can record and replay user\n * sessions, or use the time travelling `redux-devtools`. An action must have\n * a `type` property which may not be `undefined`. It is a good idea to use\n * string constants for action types.\n *\n * @returns {Object} For convenience, the same action object you dispatched.\n *\n * Note that, if you use a custom middleware, it may wrap `dispatch()` to\n * return something else (for example, a Promise you can await).\n */\n\n\n function dispatch(action) {\n if (!isPlainObject(action)) {\n throw new Error( false ? 0 : "Actions must be plain objects. Instead, the actual type was: \'" + kindOf(action) + "\'. You may need to add middleware to your store setup to handle dispatching other values, such as \'redux-thunk\' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.");\n }\n\n if (typeof action.type === \'undefined\') {\n throw new Error( false ? 0 : \'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.\');\n }\n\n if (isDispatching) {\n throw new Error( false ? 0 : \'Reducers may not dispatch actions.\');\n }\n\n try {\n isDispatching = true;\n currentState = currentReducer(currentState, action);\n } finally {\n isDispatching = false;\n }\n\n var listeners = currentListeners = nextListeners;\n\n for (var i = 0; i < listeners.length; i++) {\n var listener = listeners[i];\n listener();\n }\n\n return action;\n }\n /**\n * Replaces the reducer currently used by the store to calculate the state.\n *\n * You might need this if your app implements code splitting and you want to\n * load some of the reducers dynamically. You might also need this if you\n * implement a hot reloading mechanism for Redux.\n *\n * @param {Function} nextReducer The reducer for the store to use instead.\n * @returns {void}\n */\n\n\n function replaceReducer(nextReducer) {\n if (typeof nextReducer !== \'function\') {\n throw new Error( false ? 0 : "Expected the nextReducer to be a function. Instead, received: \'" + kindOf(nextReducer));\n }\n\n currentReducer = nextReducer; // This action has a similiar effect to ActionTypes.INIT.\n // Any reducers that existed in both the new and old rootReducer\n // will receive the previous state. This effectively populates\n // the new state tree with any relevant data from the old one.\n\n dispatch({\n type: ActionTypes.REPLACE\n });\n }\n /**\n * Interoperability point for observable/reactive libraries.\n * @returns {observable} A minimal observable of state changes.\n * For more information, see the observable proposal:\n * https://github.com/tc39/proposal-observable\n */\n\n\n function observable() {\n var _ref;\n\n var outerSubscribe = subscribe;\n return _ref = {\n /**\n * The minimal observable subscription method.\n * @param {Object} observer Any object that can be used as an observer.\n * The observer object should have a `next` method.\n * @returns {subscription} An object with an `unsubscribe` method that can\n * be used to unsubscribe the observable from the store, and prevent further\n * emission of values from the observable.\n */\n subscribe: function subscribe(observer) {\n if (typeof observer !== \'object\' || observer === null) {\n throw new Error( false ? 0 : "Expected the observer to be an object. Instead, received: \'" + kindOf(observer) + "\'");\n }\n\n function observeState() {\n if (observer.next) {\n observer.next(getState());\n }\n }\n\n observeState();\n var unsubscribe = outerSubscribe(observeState);\n return {\n unsubscribe: unsubscribe\n };\n }\n }, _ref[$$observable] = function () {\n return this;\n }, _ref;\n } // When a store is created, an "INIT" action is dispatched so that every\n // reducer returns their initial state. This effectively populates\n // the initial state tree.\n\n\n dispatch({\n type: ActionTypes.INIT\n });\n return _ref2 = {\n dispatch: dispatch,\n subscribe: subscribe,\n getState: getState,\n replaceReducer: replaceReducer\n }, _ref2[$$observable] = observable, _ref2;\n}\n/**\n * Creates a Redux store that holds the state tree.\n *\n * **We recommend using `configureStore` from the\n * `@reduxjs/toolkit` package**, which replaces `createStore`:\n * **https://redux.js.org/introduction/why-rtk-is-redux-today**\n *\n * The only way to change the data in the store is to call `dispatch()` on it.\n *\n * There should only be a single store in your app. To specify how different\n * parts of the state tree respond to actions, you may combine several reducers\n * into a single reducer function by using `combineReducers`.\n *\n * @param {Function} reducer A function that returns the next state tree, given\n * the current state tree and the action to handle.\n *\n * @param {any} [preloadedState] The initial state. You may optionally specify it\n * to hydrate the state from the server in universal apps, or to restore a\n * previously serialized user session.\n * If you use `combineReducers` to produce the root reducer function, this must be\n * an object with the same shape as `combineReducers` keys.\n *\n * @param {Function} [enhancer] The store enhancer. You may optionally specify it\n * to enhance the store with third-party capabilities such as middleware,\n * time travel, persistence, etc. The only store enhancer that ships with Redux\n * is `applyMiddleware()`.\n *\n * @returns {Store} A Redux store that lets you read the state, dispatch actions\n * and subscribe to changes.\n */\n\nvar legacy_createStore = (/* unused pure expression or super */ null && (createStore));\n\n/**\n * Prints a warning in the console if it exists.\n *\n * @param {String} message The warning message.\n * @returns {void}\n */\nfunction warning(message) {\n /* eslint-disable no-console */\n if (typeof console !== \'undefined\' && typeof console.error === \'function\') {\n console.error(message);\n }\n /* eslint-enable no-console */\n\n\n try {\n // This error was thrown as a convenience so that if you enable\n // "break on all exceptions" in your console,\n // it would pause the execution at this line.\n throw new Error(message);\n } catch (e) {} // eslint-disable-line no-empty\n\n}\n\nfunction getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) {\n var reducerKeys = Object.keys(reducers);\n var argumentName = action && action.type === ActionTypes.INIT ? \'preloadedState argument passed to createStore\' : \'previous state received by the reducer\';\n\n if (reducerKeys.length === 0) {\n return \'Store does not have a valid reducer. Make sure the argument passed \' + \'to combineReducers is an object whose values are reducers.\';\n }\n\n if (!isPlainObject(inputState)) {\n return "The " + argumentName + " has unexpected type of \\"" + kindOf(inputState) + "\\". Expected argument to be an object with the following " + ("keys: \\"" + reducerKeys.join(\'", "\') + "\\"");\n }\n\n var unexpectedKeys = Object.keys(inputState).filter(function (key) {\n return !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key];\n });\n unexpectedKeys.forEach(function (key) {\n unexpectedKeyCache[key] = true;\n });\n if (action && action.type === ActionTypes.REPLACE) return;\n\n if (unexpectedKeys.length > 0) {\n return "Unexpected " + (unexpectedKeys.length > 1 ? \'keys\' : \'key\') + " " + ("\\"" + unexpectedKeys.join(\'", "\') + "\\" found in " + argumentName + ". ") + "Expected to find one of the known reducer keys instead: " + ("\\"" + reducerKeys.join(\'", "\') + "\\". Unexpected keys will be ignored.");\n }\n}\n\nfunction assertReducerShape(reducers) {\n Object.keys(reducers).forEach(function (key) {\n var reducer = reducers[key];\n var initialState = reducer(undefined, {\n type: ActionTypes.INIT\n });\n\n if (typeof initialState === \'undefined\') {\n throw new Error( false ? 0 : "The slice reducer for key \\"" + key + "\\" returned undefined during initialization. " + "If the state passed to the reducer is undefined, you must " + "explicitly return the initial state. The initial state may " + "not be undefined. If you don\'t want to set a value for this reducer, " + "you can use null instead of undefined.");\n }\n\n if (typeof reducer(undefined, {\n type: ActionTypes.PROBE_UNKNOWN_ACTION()\n }) === \'undefined\') {\n throw new Error( false ? 0 : "The slice reducer for key \\"" + key + "\\" returned undefined when probed with a random type. " + ("Don\'t try to handle \'" + ActionTypes.INIT + "\' or other actions in \\"redux/*\\" ") + "namespace. They are considered private. Instead, you must return the " + "current state for any unknown actions, unless it is undefined, " + "in which case you must return the initial state, regardless of the " + "action type. The initial state may not be undefined, but can be null.");\n }\n });\n}\n/**\n * Turns an object whose values are different reducer functions, into a single\n * reducer function. It will call every child reducer, and gather their results\n * into a single state object, whose keys correspond to the keys of the passed\n * reducer functions.\n *\n * @param {Object} reducers An object whose values correspond to different\n * reducer functions that need to be combined into one. One handy way to obtain\n * it is to use ES6 `import * as reducers` syntax. The reducers may never return\n * undefined for any action. Instead, they should return their initial state\n * if the state passed to them was undefined, and the current state for any\n * unrecognized action.\n *\n * @returns {Function} A reducer function that invokes every reducer inside the\n * passed object, and builds a state object with the same shape.\n */\n\n\nfunction combineReducers(reducers) {\n var reducerKeys = Object.keys(reducers);\n var finalReducers = {};\n\n for (var i = 0; i < reducerKeys.length; i++) {\n var key = reducerKeys[i];\n\n if (true) {\n if (typeof reducers[key] === \'undefined\') {\n warning("No reducer provided for key \\"" + key + "\\"");\n }\n }\n\n if (typeof reducers[key] === \'function\') {\n finalReducers[key] = reducers[key];\n }\n }\n\n var finalReducerKeys = Object.keys(finalReducers); // This is used to make sure we don\'t warn about the same\n // keys multiple times.\n\n var unexpectedKeyCache;\n\n if (true) {\n unexpectedKeyCache = {};\n }\n\n var shapeAssertionError;\n\n try {\n assertReducerShape(finalReducers);\n } catch (e) {\n shapeAssertionError = e;\n }\n\n return function combination(state, action) {\n if (state === void 0) {\n state = {};\n }\n\n if (shapeAssertionError) {\n throw shapeAssertionError;\n }\n\n if (true) {\n var warningMessage = getUnexpectedStateShapeWarningMessage(state, finalReducers, action, unexpectedKeyCache);\n\n if (warningMessage) {\n warning(warningMessage);\n }\n }\n\n var hasChanged = false;\n var nextState = {};\n\n for (var _i = 0; _i < finalReducerKeys.length; _i++) {\n var _key = finalReducerKeys[_i];\n var reducer = finalReducers[_key];\n var previousStateForKey = state[_key];\n var nextStateForKey = reducer(previousStateForKey, action);\n\n if (typeof nextStateForKey === \'undefined\') {\n var actionType = action && action.type;\n throw new Error( false ? 0 : "When called with an action of type " + (actionType ? "\\"" + String(actionType) + "\\"" : \'(unknown type)\') + ", the slice reducer for key \\"" + _key + "\\" returned undefined. " + "To ignore an action, you must explicitly return the previous state. " + "If you want this reducer to hold no value, you can return null instead of undefined.");\n }\n\n nextState[_key] = nextStateForKey;\n hasChanged = hasChanged || nextStateForKey !== previousStateForKey;\n }\n\n hasChanged = hasChanged || finalReducerKeys.length !== Object.keys(state).length;\n return hasChanged ? nextState : state;\n };\n}\n\nfunction bindActionCreator(actionCreator, dispatch) {\n return function () {\n return dispatch(actionCreator.apply(this, arguments));\n };\n}\n/**\n * Turns an object whose values are action creators, into an object with the\n * same keys, but with every function wrapped into a `dispatch` call so they\n * may be invoked directly. This is just a convenience method, as you can call\n * `store.dispatch(MyActionCreators.doSomething())` yourself just fine.\n *\n * For convenience, you can also pass an action creator as the first argument,\n * and get a dispatch wrapped function in return.\n *\n * @param {Function|Object} actionCreators An object whose values are action\n * creator functions. One handy way to obtain it is to use ES6 `import * as`\n * syntax. You may also pass a single function.\n *\n * @param {Function} dispatch The `dispatch` function available on your Redux\n * store.\n *\n * @returns {Function|Object} The object mimicking the original object, but with\n * every action creator wrapped into the `dispatch` call. If you passed a\n * function as `actionCreators`, the return value will also be a single\n * function.\n */\n\n\nfunction bindActionCreators(actionCreators, dispatch) {\n if (typeof actionCreators === \'function\') {\n return bindActionCreator(actionCreators, dispatch);\n }\n\n if (typeof actionCreators !== \'object\' || actionCreators === null) {\n throw new Error( false ? 0 : "bindActionCreators expected an object or a function, but instead received: \'" + kindOf(actionCreators) + "\'. " + "Did you write \\"import ActionCreators from\\" instead of \\"import * as ActionCreators from\\"?");\n }\n\n var boundActionCreators = {};\n\n for (var key in actionCreators) {\n var actionCreator = actionCreators[key];\n\n if (typeof actionCreator === \'function\') {\n boundActionCreators[key] = bindActionCreator(actionCreator, dispatch);\n }\n }\n\n return boundActionCreators;\n}\n\n/**\n * Composes single-argument functions from right to left. The rightmost\n * function can take multiple arguments as it provides the signature for\n * the resulting composite function.\n *\n * @param {...Function} funcs The functions to compose.\n * @returns {Function} A function obtained by composing the argument functions\n * from right to left. For example, compose(f, g, h) is identical to doing\n * (...args) => f(g(h(...args))).\n */\nfunction compose() {\n for (var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++) {\n funcs[_key] = arguments[_key];\n }\n\n if (funcs.length === 0) {\n return function (arg) {\n return arg;\n };\n }\n\n if (funcs.length === 1) {\n return funcs[0];\n }\n\n return funcs.reduce(function (a, b) {\n return function () {\n return a(b.apply(void 0, arguments));\n };\n });\n}\n\n/**\n * Creates a store enhancer that applies middleware to the dispatch method\n * of the Redux store. This is handy for a variety of tasks, such as expressing\n * asynchronous actions in a concise manner, or logging every action payload.\n *\n * See `redux-thunk` package as an example of the Redux middleware.\n *\n * Because middleware is potentially asynchronous, this should be the first\n * store enhancer in the composition chain.\n *\n * Note that each middleware will be given the `dispatch` and `getState` functions\n * as named arguments.\n *\n * @param {...Function} middlewares The middleware chain to be applied.\n * @returns {Function} A store enhancer applying the middleware.\n */\n\nfunction applyMiddleware() {\n for (var _len = arguments.length, middlewares = new Array(_len), _key = 0; _key < _len; _key++) {\n middlewares[_key] = arguments[_key];\n }\n\n return function (createStore) {\n return function () {\n var store = createStore.apply(void 0, arguments);\n\n var _dispatch = function dispatch() {\n throw new Error( false ? 0 : \'Dispatching while constructing your middleware is not allowed. \' + \'Other middleware would not be applied to this dispatch.\');\n };\n\n var middlewareAPI = {\n getState: store.getState,\n dispatch: function dispatch() {\n return _dispatch.apply(void 0, arguments);\n }\n };\n var chain = middlewares.map(function (middleware) {\n return middleware(middlewareAPI);\n });\n _dispatch = compose.apply(void 0, chain)(store.dispatch);\n return _objectSpread2(_objectSpread2({}, store), {}, {\n dispatch: _dispatch\n });\n };\n };\n}\n\n\n\n// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js + 1 modules\nvar inheritsLoose = __webpack_require__(5540);\n;// CONCATENATED MODULE: ./node_modules/react-redux/es/utils/PropTypes.js\n\nvar subscriptionShape = prop_types_default().shape({\n trySubscribe: (prop_types_default()).func.isRequired,\n tryUnsubscribe: (prop_types_default()).func.isRequired,\n notifyNestedSubs: (prop_types_default()).func.isRequired,\n isSubscribed: (prop_types_default()).func.isRequired\n});\nvar storeShape = prop_types_default().shape({\n subscribe: (prop_types_default()).func.isRequired,\n dispatch: (prop_types_default()).func.isRequired,\n getState: (prop_types_default()).func.isRequired\n});\n;// CONCATENATED MODULE: ./node_modules/react-redux/es/utils/warning.js\n/**\n * Prints a warning in the console if it exists.\n *\n * @param {String} message The warning message.\n * @returns {void}\n */\nfunction warning_warning(message) {\n /* eslint-disable no-console */\n if (typeof console !== \'undefined\' && typeof console.error === \'function\') {\n console.error(message);\n }\n /* eslint-enable no-console */\n\n\n try {\n // This error was thrown as a convenience so that if you enable\n // "break on all exceptions" in your console,\n // it would pause the execution at this line.\n throw new Error(message);\n /* eslint-disable no-empty */\n } catch (e) {}\n /* eslint-enable no-empty */\n\n}\n;// CONCATENATED MODULE: ./node_modules/react-redux/es/components/Provider.js\n\n\n\n\n\nvar prefixUnsafeLifecycleMethods = typeof (react_default()).forwardRef !== "undefined";\nvar didWarnAboutReceivingStore = false;\n\nfunction warnAboutReceivingStore() {\n if (didWarnAboutReceivingStore) {\n return;\n }\n\n didWarnAboutReceivingStore = true;\n warning_warning(\'<Provider> does not support changing `store` on the fly. \' + \'It is most likely that you see this error because you updated to \' + \'Redux 2.x and React Redux 2.x which no longer hot reload reducers \' + \'automatically. See https://github.com/reduxjs/react-redux/releases/\' + \'tag/v2.0.0 for the migration instructions.\');\n}\n\nfunction createProvider(storeKey) {\n var _Provider$childContex;\n\n if (storeKey === void 0) {\n storeKey = \'store\';\n }\n\n var subscriptionKey = storeKey + "Subscription";\n\n var Provider =\n /*#__PURE__*/\n function (_Component) {\n (0,inheritsLoose/* default */.A)(Provider, _Component);\n\n var _proto = Provider.prototype;\n\n _proto.getChildContext = function getChildContext() {\n var _ref;\n\n return _ref = {}, _ref[storeKey] = this[storeKey], _ref[subscriptionKey] = null, _ref;\n };\n\n function Provider(props, context) {\n var _this;\n\n _this = _Component.call(this, props, context) || this;\n _this[storeKey] = props.store;\n return _this;\n }\n\n _proto.render = function render() {\n return react.Children.only(this.props.children);\n };\n\n return Provider;\n }(react.Component);\n\n if (true) {\n // Use UNSAFE_ event name where supported\n var eventName = prefixUnsafeLifecycleMethods ? \'UNSAFE_componentWillReceiveProps\' : \'componentWillReceiveProps\';\n\n Provider.prototype[eventName] = function (nextProps) {\n if (this[storeKey] !== nextProps.store) {\n warnAboutReceivingStore();\n }\n };\n }\n\n Provider.propTypes = {\n store: storeShape.isRequired,\n children: (prop_types_default()).element.isRequired\n };\n Provider.childContextTypes = (_Provider$childContex = {}, _Provider$childContex[storeKey] = storeShape.isRequired, _Provider$childContex[subscriptionKey] = subscriptionShape, _Provider$childContex);\n return Provider;\n}\n/* harmony default export */ const Provider = (createProvider());\n// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js\nvar assertThisInitialized = __webpack_require__(9417);\n// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js\nvar esm_extends = __webpack_require__(8168);\n// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js\nvar objectWithoutPropertiesLoose = __webpack_require__(8587);\n// EXTERNAL MODULE: ./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js\nvar hoist_non_react_statics_cjs = __webpack_require__(4146);\nvar hoist_non_react_statics_cjs_default = /*#__PURE__*/__webpack_require__.n(hoist_non_react_statics_cjs);\n// EXTERNAL MODULE: ./node_modules/invariant/invariant.js\nvar invariant = __webpack_require__(7927);\nvar invariant_default = /*#__PURE__*/__webpack_require__.n(invariant);\n// EXTERNAL MODULE: ./node_modules/react-is/index.js\nvar react_is = __webpack_require__(4363);\n;// CONCATENATED MODULE: ./node_modules/react-redux/es/utils/Subscription.js\n// encapsulates the subscription logic for connecting a component to the redux store, as\n// well as nesting subscriptions of descendant components, so that we can ensure the\n// ancestor components re-render before descendants\nvar CLEARED = null;\nvar nullListeners = {\n notify: function notify() {}\n};\n\nfunction createListenerCollection() {\n // the current/next pattern is copied from redux\'s createStore code.\n // TODO: refactor+expose that code to be reusable here?\n var current = [];\n var next = [];\n return {\n clear: function clear() {\n next = CLEARED;\n current = CLEARED;\n },\n notify: function notify() {\n var listeners = current = next;\n\n for (var i = 0; i < listeners.length; i++) {\n listeners[i]();\n }\n },\n get: function get() {\n return next;\n },\n subscribe: function subscribe(listener) {\n var isSubscribed = true;\n if (next === current) next = current.slice();\n next.push(listener);\n return function unsubscribe() {\n if (!isSubscribed || current === CLEARED) return;\n isSubscribed = false;\n if (next === current) next = current.slice();\n next.splice(next.indexOf(listener), 1);\n };\n }\n };\n}\n\nvar Subscription =\n/*#__PURE__*/\nfunction () {\n function Subscription(store, parentSub, onStateChange) {\n this.store = store;\n this.parentSub = parentSub;\n this.onStateChange = onStateChange;\n this.unsubscribe = null;\n this.listeners = nullListeners;\n }\n\n var _proto = Subscription.prototype;\n\n _proto.addNestedSub = function addNestedSub(listener) {\n this.trySubscribe();\n return this.listeners.subscribe(listener);\n };\n\n _proto.notifyNestedSubs = function notifyNestedSubs() {\n this.listeners.notify();\n };\n\n _proto.isSubscribed = function isSubscribed() {\n return Boolean(this.unsubscribe);\n };\n\n _proto.trySubscribe = function trySubscribe() {\n if (!this.unsubscribe) {\n this.unsubscribe = this.parentSub ? this.parentSub.addNestedSub(this.onStateChange) : this.store.subscribe(this.onStateChange);\n this.listeners = createListenerCollection();\n }\n };\n\n _proto.tryUnsubscribe = function tryUnsubscribe() {\n if (this.unsubscribe) {\n this.unsubscribe();\n this.unsubscribe = null;\n this.listeners.clear();\n this.listeners = nullListeners;\n }\n };\n\n return Subscription;\n}();\n\n\n;// CONCATENATED MODULE: ./node_modules/react-redux/es/components/connectAdvanced.js\n\n\n\n\n\n\n\n\n\n\nvar connectAdvanced_prefixUnsafeLifecycleMethods = typeof (react_default()).forwardRef !== "undefined";\nvar hotReloadingVersion = 0;\nvar dummyState = {};\n\nfunction noop() {}\n\nfunction makeSelectorStateful(sourceSelector, store) {\n // wrap the selector in an object that tracks its results between runs.\n var selector = {\n run: function runComponentSelector(props) {\n try {\n var nextProps = sourceSelector(store.getState(), props);\n\n if (nextProps !== selector.props || selector.error) {\n selector.shouldComponentUpdate = true;\n selector.props = nextProps;\n selector.error = null;\n }\n } catch (error) {\n selector.shouldComponentUpdate = true;\n selector.error = error;\n }\n }\n };\n return selector;\n}\n\nfunction connectAdvanced(\n/*\n selectorFactory is a func that is responsible for returning the selector function used to\n compute new props from state, props, and dispatch. For example:\n export default connectAdvanced((dispatch, options) => (state, props) => ({\n thing: state.things[props.thingId],\n saveThing: fields => dispatch(actionCreators.saveThing(props.thingId, fields)),\n }))(YourComponent)\n Access to dispatch is provided to the factory so selectorFactories can bind actionCreators\n outside of their selector as an optimization. Options passed to connectAdvanced are passed to\n the selectorFactory, along with displayName and WrappedComponent, as the second argument.\n Note that selectorFactory is responsible for all caching/memoization of inbound and outbound\n props. Do not use connectAdvanced directly without memoizing results between calls to your\n selector, otherwise the Connect component will re-render on every state or props change.\n*/\nselectorFactory, // options object:\n_ref) {\n var _contextTypes, _childContextTypes;\n\n if (_ref === void 0) {\n _ref = {};\n }\n\n var _ref2 = _ref,\n _ref2$getDisplayName = _ref2.getDisplayName,\n getDisplayName = _ref2$getDisplayName === void 0 ? function (name) {\n return "ConnectAdvanced(" + name + ")";\n } : _ref2$getDisplayName,\n _ref2$methodName = _ref2.methodName,\n methodName = _ref2$methodName === void 0 ? \'connectAdvanced\' : _ref2$methodName,\n _ref2$renderCountProp = _ref2.renderCountProp,\n renderCountProp = _ref2$renderCountProp === void 0 ? undefined : _ref2$renderCountProp,\n _ref2$shouldHandleSta = _ref2.shouldHandleStateChanges,\n shouldHandleStateChanges = _ref2$shouldHandleSta === void 0 ? true : _ref2$shouldHandleSta,\n _ref2$storeKey = _ref2.storeKey,\n storeKey = _ref2$storeKey === void 0 ? \'store\' : _ref2$storeKey,\n _ref2$withRef = _ref2.withRef,\n withRef = _ref2$withRef === void 0 ? false : _ref2$withRef,\n connectOptions = (0,objectWithoutPropertiesLoose/* default */.A)(_ref2, ["getDisplayName", "methodName", "renderCountProp", "shouldHandleStateChanges", "storeKey", "withRef"]);\n\n var subscriptionKey = storeKey + \'Subscription\';\n var version = hotReloadingVersion++;\n var contextTypes = (_contextTypes = {}, _contextTypes[storeKey] = storeShape, _contextTypes[subscriptionKey] = subscriptionShape, _contextTypes);\n var childContextTypes = (_childContextTypes = {}, _childContextTypes[subscriptionKey] = subscriptionShape, _childContextTypes);\n return function wrapWithConnect(WrappedComponent) {\n invariant_default()((0,react_is.isValidElementType)(WrappedComponent), "You must pass a component to the function returned by " + (methodName + ". Instead received " + JSON.stringify(WrappedComponent)));\n var wrappedComponentName = WrappedComponent.displayName || WrappedComponent.name || \'Component\';\n var displayName = getDisplayName(wrappedComponentName);\n\n var selectorFactoryOptions = (0,esm_extends/* default */.A)({}, connectOptions, {\n getDisplayName: getDisplayName,\n methodName: methodName,\n renderCountProp: renderCountProp,\n shouldHandleStateChanges: shouldHandleStateChanges,\n storeKey: storeKey,\n withRef: withRef,\n displayName: displayName,\n wrappedComponentName: wrappedComponentName,\n WrappedComponent: WrappedComponent // TODO Actually fix our use of componentWillReceiveProps\n\n /* eslint-disable react/no-deprecated */\n\n });\n\n var Connect =\n /*#__PURE__*/\n function (_Component) {\n (0,inheritsLoose/* default */.A)(Connect, _Component);\n\n function Connect(props, context) {\n var _this;\n\n _this = _Component.call(this, props, context) || this;\n _this.version = version;\n _this.state = {};\n _this.renderCount = 0;\n _this.store = props[storeKey] || context[storeKey];\n _this.propsMode = Boolean(props[storeKey]);\n _this.setWrappedInstance = _this.setWrappedInstance.bind((0,assertThisInitialized/* default */.A)((0,assertThisInitialized/* default */.A)(_this)));\n invariant_default()(_this.store, "Could not find \\"" + storeKey + "\\" in either the context or props of " + ("\\"" + displayName + "\\". Either wrap the root component in a <Provider>, ") + ("or explicitly pass \\"" + storeKey + "\\" as a prop to \\"" + displayName + "\\"."));\n\n _this.initSelector();\n\n _this.initSubscription();\n\n return _this;\n }\n\n var _proto = Connect.prototype;\n\n _proto.getChildContext = function getChildContext() {\n var _ref3;\n\n // If this component received store from props, its subscription should be transparent\n // to any descendants receiving store+subscription from context; it passes along\n // subscription passed to it. Otherwise, it shadows the parent subscription, which allows\n // Connect to control ordering of notifications to flow top-down.\n var subscription = this.propsMode ? null : this.subscription;\n return _ref3 = {}, _ref3[subscriptionKey] = subscription || this.context[subscriptionKey], _ref3;\n };\n\n _proto.componentDidMount = function componentDidMount() {\n if (!shouldHandleStateChanges) return; // componentWillMount fires during server side rendering, but componentDidMount and\n // componentWillUnmount do not. Because of this, trySubscribe happens during ...didMount.\n // Otherwise, unsubscription would never take place during SSR, causing a memory leak.\n // To handle the case where a child component may have triggered a state change by\n // dispatching an action in its componentWillMount, we have to re-run the select and maybe\n // re-render.\n\n this.subscription.trySubscribe();\n this.selector.run(this.props);\n if (this.selector.shouldComponentUpdate) this.forceUpdate();\n }; // Note: this is renamed below to the UNSAFE_ version in React >=16.3.0\n\n\n _proto.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {\n this.selector.run(nextProps);\n };\n\n _proto.shouldComponentUpdate = function shouldComponentUpdate() {\n return this.selector.shouldComponentUpdate;\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n if (this.subscription) this.subscription.tryUnsubscribe();\n this.subscription = null;\n this.notifyNestedSubs = noop;\n this.store = null;\n this.selector.run = noop;\n this.selector.shouldComponentUpdate = false;\n };\n\n _proto.getWrappedInstance = function getWrappedInstance() {\n invariant_default()(withRef, "To access the wrapped instance, you need to specify " + ("{ withRef: true } in the options argument of the " + methodName + "() call."));\n return this.wrappedInstance;\n };\n\n _proto.setWrappedInstance = function setWrappedInstance(ref) {\n this.wrappedInstance = ref;\n };\n\n _proto.initSelector = function initSelector() {\n var sourceSelector = selectorFactory(this.store.dispatch, selectorFactoryOptions);\n this.selector = makeSelectorStateful(sourceSelector, this.store);\n this.selector.run(this.props);\n };\n\n _proto.initSubscription = function initSubscription() {\n if (!shouldHandleStateChanges) return; // parentSub\'s source should match where store came from: props vs. context. A component\n // connected to the store via props shouldn\'t use subscription from context, or vice versa.\n\n var parentSub = (this.propsMode ? this.props : this.context)[subscriptionKey];\n this.subscription = new Subscription(this.store, parentSub, this.onStateChange.bind(this)); // `notifyNestedSubs` is duplicated to handle the case where the component is unmounted in\n // the middle of the notification loop, where `this.subscription` will then be null. An\n // extra null check every change can be avoided by copying the method onto `this` and then\n // replacing it with a no-op on unmount. This can probably be avoided if Subscription\'s\n // listeners logic is changed to not call listeners that have been unsubscribed in the\n // middle of the notification loop.\n\n this.notifyNestedSubs = this.subscription.notifyNestedSubs.bind(this.subscription);\n };\n\n _proto.onStateChange = function onStateChange() {\n this.selector.run(this.props);\n\n if (!this.selector.shouldComponentUpdate) {\n this.notifyNestedSubs();\n } else {\n this.componentDidUpdate = this.notifyNestedSubsOnComponentDidUpdate;\n this.setState(dummyState);\n }\n };\n\n _proto.notifyNestedSubsOnComponentDidUpdate = function notifyNestedSubsOnComponentDidUpdate() {\n // `componentDidUpdate` is conditionally implemented when `onStateChange` determines it\n // needs to notify nested subs. Once called, it unimplements itself until further state\n // changes occur. Doing it this way vs having a permanent `componentDidUpdate` that does\n // a boolean check every time avoids an extra method call most of the time, resulting\n // in some perf boost.\n this.componentDidUpdate = undefined;\n this.notifyNestedSubs();\n };\n\n _proto.isSubscribed = function isSubscribed() {\n return Boolean(this.subscription) && this.subscription.isSubscribed();\n };\n\n _proto.addExtraProps = function addExtraProps(props) {\n if (!withRef && !renderCountProp && !(this.propsMode && this.subscription)) return props; // make a shallow copy so that fields added don\'t leak to the original selector.\n // this is especially important for \'ref\' since that\'s a reference back to the component\n // instance. a singleton memoized selector would then be holding a reference to the\n // instance, preventing the instance from being garbage collected, and that would be bad\n\n var withExtras = (0,esm_extends/* default */.A)({}, props);\n\n if (withRef) withExtras.ref = this.setWrappedInstance;\n if (renderCountProp) withExtras[renderCountProp] = this.renderCount++;\n if (this.propsMode && this.subscription) withExtras[subscriptionKey] = this.subscription;\n return withExtras;\n };\n\n _proto.render = function render() {\n var selector = this.selector;\n selector.shouldComponentUpdate = false;\n\n if (selector.error) {\n throw selector.error;\n } else {\n return (0,react.createElement)(WrappedComponent, this.addExtraProps(selector.props));\n }\n };\n\n return Connect;\n }(react.Component);\n\n if (connectAdvanced_prefixUnsafeLifecycleMethods) {\n // Use UNSAFE_ event name where supported\n Connect.prototype.UNSAFE_componentWillReceiveProps = Connect.prototype.componentWillReceiveProps;\n delete Connect.prototype.componentWillReceiveProps;\n }\n /* eslint-enable react/no-deprecated */\n\n\n Connect.WrappedComponent = WrappedComponent;\n Connect.displayName = displayName;\n Connect.childContextTypes = childContextTypes;\n Connect.contextTypes = contextTypes;\n Connect.propTypes = contextTypes;\n\n if (true) {\n // Use UNSAFE_ event name where supported\n var eventName = connectAdvanced_prefixUnsafeLifecycleMethods ? \'UNSAFE_componentWillUpdate\' : \'componentWillUpdate\';\n\n Connect.prototype[eventName] = function componentWillUpdate() {\n var _this2 = this;\n\n // We are hot reloading!\n if (this.version !== version) {\n this.version = version;\n this.initSelector(); // If any connected descendants don\'t hot reload (and resubscribe in the process), their\n // listeners will be lost when we unsubscribe. Unfortunately, by copying over all\n // listeners, this does mean that the old versions of connected descendants will still be\n // notified of state changes; however, their onStateChange function is a no-op so this\n // isn\'t a huge deal.\n\n var oldListeners = [];\n\n if (this.subscription) {\n oldListeners = this.subscription.listeners.get();\n this.subscription.tryUnsubscribe();\n }\n\n this.initSubscription();\n\n if (shouldHandleStateChanges) {\n this.subscription.trySubscribe();\n oldListeners.forEach(function (listener) {\n return _this2.subscription.listeners.subscribe(listener);\n });\n }\n }\n };\n }\n\n return hoist_non_react_statics_cjs_default()(Connect, WrappedComponent);\n };\n}\n;// CONCATENATED MODULE: ./node_modules/react-redux/es/utils/shallowEqual.js\nvar hasOwn = Object.prototype.hasOwnProperty;\n\nfunction is(x, y) {\n if (x === y) {\n return x !== 0 || y !== 0 || 1 / x === 1 / y;\n } else {\n return x !== x && y !== y;\n }\n}\n\nfunction shallowEqual(objA, objB) {\n if (is(objA, objB)) return true;\n\n if (typeof objA !== \'object\' || objA === null || typeof objB !== \'object\' || objB === null) {\n return false;\n }\n\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n if (keysA.length !== keysB.length) return false;\n\n for (var i = 0; i < keysA.length; i++) {\n if (!hasOwn.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n return false;\n }\n }\n\n return true;\n}\n;// CONCATENATED MODULE: ./node_modules/react-redux/es/utils/isPlainObject.js\n/**\r\n * @param {any} obj The object to inspect.\r\n * @returns {boolean} True if the argument appears to be a plain object.\r\n */\nfunction isPlainObject_isPlainObject(obj) {\n if (typeof obj !== \'object\' || obj === null) return false;\n var proto = Object.getPrototypeOf(obj);\n if (proto === null) return true;\n var baseProto = proto;\n\n while (Object.getPrototypeOf(baseProto) !== null) {\n baseProto = Object.getPrototypeOf(baseProto);\n }\n\n return proto === baseProto;\n}\n;// CONCATENATED MODULE: ./node_modules/react-redux/es/utils/verifyPlainObject.js\n\n\nfunction verifyPlainObject(value, displayName, methodName) {\n if (!isPlainObject_isPlainObject(value)) {\n warning_warning(methodName + "() in " + displayName + " must return a plain object. Instead received " + value + ".");\n }\n}\n;// CONCATENATED MODULE: ./node_modules/react-redux/es/connect/wrapMapToProps.js\n\nfunction wrapMapToPropsConstant(getConstant) {\n return function initConstantSelector(dispatch, options) {\n var constant = getConstant(dispatch, options);\n\n function constantSelector() {\n return constant;\n }\n\n constantSelector.dependsOnOwnProps = false;\n return constantSelector;\n };\n} // dependsOnOwnProps is used by createMapToPropsProxy to determine whether to pass props as args\n// to the mapToProps function being wrapped. It is also used by makePurePropsSelector to determine\n// whether mapToProps needs to be invoked when props have changed.\n// \n// A length of one signals that mapToProps does not depend on props from the parent component.\n// A length of zero is assumed to mean mapToProps is getting args via arguments or ...args and\n// therefore not reporting its length accurately..\n\nfunction getDependsOnOwnProps(mapToProps) {\n return mapToProps.dependsOnOwnProps !== null && mapToProps.dependsOnOwnProps !== undefined ? Boolean(mapToProps.dependsOnOwnProps) : mapToProps.length !== 1;\n} // Used by whenMapStateToPropsIsFunction and whenMapDispatchToPropsIsFunction,\n// this function wraps mapToProps in a proxy function which does several things:\n// \n// * Detects whether the mapToProps function being called depends on props, which\n// is used by selectorFactory to decide if it should reinvoke on props changes.\n// \n// * On first call, handles mapToProps if returns another function, and treats that\n// new function as the true mapToProps for subsequent calls.\n// \n// * On first call, verifies the first result is a plain object, in order to warn\n// the developer that their mapToProps function is not returning a valid result.\n// \n\nfunction wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === \'function\') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) verifyPlainObject(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}\n;// CONCATENATED MODULE: ./node_modules/react-redux/es/connect/mapDispatchToProps.js\n\n\nfunction whenMapDispatchToPropsIsFunction(mapDispatchToProps) {\n return typeof mapDispatchToProps === \'function\' ? wrapMapToPropsFunc(mapDispatchToProps, \'mapDispatchToProps\') : undefined;\n}\nfunction whenMapDispatchToPropsIsMissing(mapDispatchToProps) {\n return !mapDispatchToProps ? wrapMapToPropsConstant(function (dispatch) {\n return {\n dispatch: dispatch\n };\n }) : undefined;\n}\nfunction whenMapDispatchToPropsIsObject(mapDispatchToProps) {\n return mapDispatchToProps && typeof mapDispatchToProps === \'object\' ? wrapMapToPropsConstant(function (dispatch) {\n return bindActionCreators(mapDispatchToProps, dispatch);\n }) : undefined;\n}\n/* harmony default export */ const mapDispatchToProps = ([whenMapDispatchToPropsIsFunction, whenMapDispatchToPropsIsMissing, whenMapDispatchToPropsIsObject]);\n;// CONCATENATED MODULE: ./node_modules/react-redux/es/connect/mapStateToProps.js\n\nfunction whenMapStateToPropsIsFunction(mapStateToProps) {\n return typeof mapStateToProps === \'function\' ? wrapMapToPropsFunc(mapStateToProps, \'mapStateToProps\') : undefined;\n}\nfunction whenMapStateToPropsIsMissing(mapStateToProps) {\n return !mapStateToProps ? wrapMapToPropsConstant(function () {\n return {};\n }) : undefined;\n}\n/* harmony default export */ const mapStateToProps = ([whenMapStateToPropsIsFunction, whenMapStateToPropsIsMissing]);\n;// CONCATENATED MODULE: ./node_modules/react-redux/es/connect/mergeProps.js\n\n\nfunction defaultMergeProps(stateProps, dispatchProps, ownProps) {\n return (0,esm_extends/* default */.A)({}, ownProps, stateProps, dispatchProps);\n}\nfunction wrapMergePropsFunc(mergeProps) {\n return function initMergePropsProxy(dispatch, _ref) {\n var displayName = _ref.displayName,\n pure = _ref.pure,\n areMergedPropsEqual = _ref.areMergedPropsEqual;\n var hasRunOnce = false;\n var mergedProps;\n return function mergePropsProxy(stateProps, dispatchProps, ownProps) {\n var nextMergedProps = mergeProps(stateProps, dispatchProps, ownProps);\n\n if (hasRunOnce) {\n if (!pure || !areMergedPropsEqual(nextMergedProps, mergedProps)) mergedProps = nextMergedProps;\n } else {\n hasRunOnce = true;\n mergedProps = nextMergedProps;\n if (true) verifyPlainObject(mergedProps, displayName, \'mergeProps\');\n }\n\n return mergedProps;\n };\n };\n}\nfunction whenMergePropsIsFunction(mergeProps) {\n return typeof mergeProps === \'function\' ? wrapMergePropsFunc(mergeProps) : undefined;\n}\nfunction whenMergePropsIsOmitted(mergeProps) {\n return !mergeProps ? function () {\n return defaultMergeProps;\n } : undefined;\n}\n/* harmony default export */ const mergeProps = ([whenMergePropsIsFunction, whenMergePropsIsOmitted]);\n;// CONCATENATED MODULE: ./node_modules/react-redux/es/connect/verifySubselectors.js\n\n\nfunction verify(selector, methodName, displayName) {\n if (!selector) {\n throw new Error("Unexpected value for " + methodName + " in " + displayName + ".");\n } else if (methodName === \'mapStateToProps\' || methodName === \'mapDispatchToProps\') {\n if (!selector.hasOwnProperty(\'dependsOnOwnProps\')) {\n warning_warning("The selector for " + methodName + " of " + displayName + " did not specify a value for dependsOnOwnProps.");\n }\n }\n}\n\nfunction verifySubselectors(mapStateToProps, mapDispatchToProps, mergeProps, displayName) {\n verify(mapStateToProps, \'mapStateToProps\', displayName);\n verify(mapDispatchToProps, \'mapDispatchToProps\', displayName);\n verify(mergeProps, \'mergeProps\', displayName);\n}\n;// CONCATENATED MODULE: ./node_modules/react-redux/es/connect/selectorFactory.js\n\n\nfunction impureFinalPropsSelectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch) {\n return function impureFinalPropsSelector(state, ownProps) {\n return mergeProps(mapStateToProps(state, ownProps), mapDispatchToProps(dispatch, ownProps), ownProps);\n };\n}\nfunction pureFinalPropsSelectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, _ref) {\n var areStatesEqual = _ref.areStatesEqual,\n areOwnPropsEqual = _ref.areOwnPropsEqual,\n areStatePropsEqual = _ref.areStatePropsEqual;\n var hasRunAtLeastOnce = false;\n var state;\n var ownProps;\n var stateProps;\n var dispatchProps;\n var mergedProps;\n\n function handleFirstCall(firstState, firstOwnProps) {\n state = firstState;\n ownProps = firstOwnProps;\n stateProps = mapStateToProps(state, ownProps);\n dispatchProps = mapDispatchToProps(dispatch, ownProps);\n mergedProps = mergeProps(stateProps, dispatchProps, ownProps);\n hasRunAtLeastOnce = true;\n return mergedProps;\n }\n\n function handleNewPropsAndNewState() {\n stateProps = mapStateToProps(state, ownProps);\n if (mapDispatchToProps.dependsOnOwnProps) dispatchProps = mapDispatchToProps(dispatch, ownProps);\n mergedProps = mergeProps(stateProps, dispatchProps, ownProps);\n return mergedProps;\n }\n\n function handleNewProps() {\n if (mapStateToProps.dependsOnOwnProps) stateProps = mapStateToProps(state, ownProps);\n if (mapDispatchToProps.dependsOnOwnProps) dispatchProps = mapDispatchToProps(dispatch, ownProps);\n mergedProps = mergeProps(stateProps, dispatchProps, ownProps);\n return mergedProps;\n }\n\n function handleNewState() {\n var nextStateProps = mapStateToProps(state, ownProps);\n var statePropsChanged = !areStatePropsEqual(nextStateProps, stateProps);\n stateProps = nextStateProps;\n if (statePropsChanged) mergedProps = mergeProps(stateProps, dispatchProps, ownProps);\n return mergedProps;\n }\n\n function handleSubsequentCalls(nextState, nextOwnProps) {\n var propsChanged = !areOwnPropsEqual(nextOwnProps, ownProps);\n var stateChanged = !areStatesEqual(nextState, state);\n state = nextState;\n ownProps = nextOwnProps;\n if (propsChanged && stateChanged) return handleNewPropsAndNewState();\n if (propsChanged) return handleNewProps();\n if (stateChanged) return handleNewState();\n return mergedProps;\n }\n\n return function pureFinalPropsSelector(nextState, nextOwnProps) {\n return hasRunAtLeastOnce ? handleSubsequentCalls(nextState, nextOwnProps) : handleFirstCall(nextState, nextOwnProps);\n };\n} // TODO: Add more comments\n// If pure is true, the selector returned by selectorFactory will memoize its results,\n// allowing connectAdvanced\'s shouldComponentUpdate to return false if final\n// props have not changed. If false, the selector will always return a new\n// object and shouldComponentUpdate will always return true.\n\nfunction finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = (0,objectWithoutPropertiesLoose/* default */.A)(_ref2, ["initMapStateToProps", "initMapDispatchToProps", "initMergeProps"]);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (true) {\n verifySubselectors(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}\n;// CONCATENATED MODULE: ./node_modules/react-redux/es/connect/connect.js\n\n\n\n\n\n\n\n\n/*\n connect is a facade over connectAdvanced. It turns its args into a compatible\n selectorFactory, which has the signature:\n\n (dispatch, options) => (nextState, nextOwnProps) => nextFinalProps\n \n connect passes its args to connectAdvanced as options, which will in turn pass them to\n selectorFactory each time a Connect component instance is instantiated or hot reloaded.\n\n selectorFactory returns a final props selector from its mapStateToProps,\n mapStateToPropsFactories, mapDispatchToProps, mapDispatchToPropsFactories, mergeProps,\n mergePropsFactories, and pure args.\n\n The resulting final props selector is called by the Connect component instance whenever\n it receives new props or store state.\n */\n\nfunction match(arg, factories, name) {\n for (var i = factories.length - 1; i >= 0; i--) {\n var result = factories[i](arg);\n if (result) return result;\n }\n\n return function (dispatch, options) {\n throw new Error("Invalid value of type " + typeof arg + " for " + name + " argument when connecting component " + options.wrappedComponentName + ".");\n };\n}\n\nfunction strictEqual(a, b) {\n return a === b;\n} // createConnect with default args builds the \'official\' connect behavior. Calling it with\n// different options opens up some testing and extensibility scenarios\n\n\nfunction createConnect(_temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === void 0 ? connectAdvanced : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === void 0 ? mapStateToProps : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === void 0 ? mapDispatchToProps : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === void 0 ? mergeProps : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === void 0 ? finalPropsSelectorFactory : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps, _ref2) {\n if (_ref2 === void 0) {\n _ref2 = {};\n }\n\n var _ref3 = _ref2,\n _ref3$pure = _ref3.pure,\n pure = _ref3$pure === void 0 ? true : _ref3$pure,\n _ref3$areStatesEqual = _ref3.areStatesEqual,\n areStatesEqual = _ref3$areStatesEqual === void 0 ? strictEqual : _ref3$areStatesEqual,\n _ref3$areOwnPropsEqua = _ref3.areOwnPropsEqual,\n areOwnPropsEqual = _ref3$areOwnPropsEqua === void 0 ? shallowEqual : _ref3$areOwnPropsEqua,\n _ref3$areStatePropsEq = _ref3.areStatePropsEqual,\n areStatePropsEqual = _ref3$areStatePropsEq === void 0 ? shallowEqual : _ref3$areStatePropsEq,\n _ref3$areMergedPropsE = _ref3.areMergedPropsEqual,\n areMergedPropsEqual = _ref3$areMergedPropsE === void 0 ? shallowEqual : _ref3$areMergedPropsE,\n extraOptions = (0,objectWithoutPropertiesLoose/* default */.A)(_ref3, ["pure", "areStatesEqual", "areOwnPropsEqual", "areStatePropsEqual", "areMergedPropsEqual"]);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, \'mapStateToProps\');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, \'mapDispatchToProps\');\n var initMergeProps = match(mergeProps, mergePropsFactories, \'mergeProps\');\n return connectHOC(selectorFactory, (0,esm_extends/* default */.A)({\n // used in error messages\n methodName: \'connect\',\n // used to compute Connect\'s displayName from the wrapped component\'s displayName.\n getDisplayName: function getDisplayName(name) {\n return "Connect(" + name + ")";\n },\n // if mapStateToProps is falsy, the Connect component doesn\'t subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n }, extraOptions));\n };\n}\n/* harmony default export */ const connect = (createConnect());\n;// CONCATENATED MODULE: ./node_modules/react-redux/es/index.js\n\n\n\n\n;// CONCATENATED MODULE: ./node_modules/redux-thunk/es/index.js\n/** A function that accepts a potential "extra argument" value to be injected later,\r\n * and returns an instance of the thunk middleware that uses that value\r\n */\nfunction createThunkMiddleware(extraArgument) {\n // Standard Redux middleware definition pattern:\n // See: https://redux.js.org/tutorials/fundamentals/part-4-store#writing-custom-middleware\n var middleware = function middleware(_ref) {\n var dispatch = _ref.dispatch,\n getState = _ref.getState;\n return function (next) {\n return function (action) {\n // The thunk middleware looks for any functions that were passed to `store.dispatch`.\n // If this "action" is really a function, call it and return the result.\n if (typeof action === \'function\') {\n // Inject the store\'s `dispatch` and `getState` methods, as well as any "extra arg"\n return action(dispatch, getState, extraArgument);\n } // Otherwise, pass the action down the middleware chain as usual\n\n\n return next(action);\n };\n };\n };\n\n return middleware;\n}\n\nvar thunk = createThunkMiddleware(); // Attach the factory function so users can create a customized version\n// with whatever "extra arg" they want to inject into their thunks\n\nthunk.withExtraArgument = createThunkMiddleware;\n/* harmony default export */ const es = (thunk);\n;// CONCATENATED MODULE: ./client/app/constants/HelloWorldConstants.jsx\n/* eslint-disable import/prefer-default-export */\nconst HELLO_WORLD_NAME_UPDATE = \'HELLO_WORLD_NAME_UPDATE\';\n;// CONCATENATED MODULE: ./client/app/reducers/HelloWorldReducer.jsx\n\nconst initialState = {\n lastActionType: null,\n name: \'Alex\'\n};\n\n// Why name function the same as the reducer?\n// https://github.com/gaearon/redux/issues/428#issuecomment-129223274\n// Naming the function will help with debugging!\nfunction helloWorldReducer(state = initialState, action) {\n const {\n type,\n name\n } = action;\n switch (type) {\n case HELLO_WORLD_NAME_UPDATE:\n return {\n lastActionType: type,\n name\n };\n default:\n return state;\n }\n}\n;// CONCATENATED MODULE: ./client/app/reducers/RailsContextReducer.jsx\n// This will always get set\nconst RailsContextReducer_initialState = {};\n\n// Why name function the same as the reducer?\n// https://github.com/gaearon/redux/issues/428#issuecomment-129223274\n// Naming the function will help with debugging!\n/* eslint-disable no-unused-vars */\nfunction railsContextReducer(state = RailsContextReducer_initialState, action) {\n return state;\n}\n;// CONCATENATED MODULE: ./client/app/reducers/reducersIndex.jsx\n\n\n\n// This is how you do a directory of reducers.\n// The `import * as reducers` does not work for a directory, but only with a single file\n/* harmony default export */ const reducersIndex = ({\n helloWorldData: helloWorldReducer,\n railsContext: railsContextReducer\n});\n;// CONCATENATED MODULE: ./client/app/store/composeInitialState.js\n// Real world is that you\'ll want to do lots of manipulations of the data you get back from Rails\n// to coerce it into exactly what you want your initial redux state.\n/* harmony default export */ const composeInitialState = ((props, railsContext) => Object.assign({}, props, {\n railsContext\n}));\n;// CONCATENATED MODULE: ./client/app/components/HelloWorldRedux.jsx\nvar HelloWorldRedux_jsxFileName = "/mnt/ssd/react_on_rails_pro/spec/dummy/client/app/components/HelloWorldRedux.jsx";\n\n\n\n\n// Super simple example of the simplest possible React component\nclass HelloWorldRedux extends (react_default()).Component {\n static propTypes = {\n actions: (prop_types_default()).object.isRequired,\n data: (prop_types_default()).object.isRequired,\n railsContext: (prop_types_default()).object.isRequired\n };\n\n // Not necessary if we only call super, but we\'ll need to initialize state, etc.\n constructor(props) {\n super(props);\n this.setNameDomRef = this.setNameDomRef.bind(this);\n this.handleChange = this.handleChange.bind(this);\n }\n setNameDomRef(nameDomNode) {\n this.nameDomRef = nameDomNode;\n }\n handleChange() {\n const name = this.nameDomRef.value;\n this.props.actions.updateName(name);\n }\n render() {\n const {\n data,\n railsContext\n } = this.props;\n const {\n name\n } = data;\n\n // If this creates an alert, we have a problem!\n // see file node_package/src/scriptSanitizedVal.js for the fix to this prior issue.\n\n /* eslint-disable no-console */\n console.log(\'This is a script:"</div>"</script> <script>alert(\\\'WTF1\\\')</script>\');\n console.log(\'Script2:"</div>"</script xx> <script>alert(\\\'WTF2\\\')</script xx>\');\n console.log(\'Script3:"</div>"</ SCRIPT xx> <script>alert(\\\'WTF3\\\')</script xx>\');\n console.log(\'Script4"</div>"</script <script>alert(\\\'WTF4\\\')</script>\');\n console.log(\'Script5:"</div>"</ script> <script>alert(\\\'WTF5\\\')</script>\');\n return /*#__PURE__*/react_default().createElement("div", {\n __self: this,\n __source: {\n fileName: HelloWorldRedux_jsxFileName,\n lineNumber: 44,\n columnNumber: 7\n }\n }, /*#__PURE__*/react_default().createElement("h3", {\n __self: this,\n __source: {\n fileName: HelloWorldRedux_jsxFileName,\n lineNumber: 45,\n columnNumber: 9\n }\n }, "Redux Hello, ", name, "!"), /*#__PURE__*/react_default().createElement("p", {\n __self: this,\n __source: {\n fileName: HelloWorldRedux_jsxFileName,\n lineNumber: 46,\n columnNumber: 9\n }\n }, "With Redux, say hello to:", /*#__PURE__*/react_default().createElement("input", {\n type: "text",\n ref: this.setNameDomRef,\n value: name,\n onChange: this.handleChange,\n __self: this,\n __source: {\n fileName: HelloWorldRedux_jsxFileName,\n lineNumber: 48,\n columnNumber: 11\n }\n })), /*#__PURE__*/react_default().createElement(components_RailsContext, {\n railsContext,\n __self: this,\n __source: {\n fileName: HelloWorldRedux_jsxFileName,\n lineNumber: 50,\n columnNumber: 9\n }\n }));\n }\n}\n;// CONCATENATED MODULE: ./client/app/actions/HelloWorldActions.jsx\n\n\n/* eslint-disable import/prefer-default-export */\nfunction updateName(name) {\n return {\n type: HELLO_WORLD_NAME_UPDATE,\n name\n };\n}\n;// CONCATENATED MODULE: ./client/app/components/HelloWorldContainer.jsx\nvar HelloWorldContainer_jsxFileName = "/mnt/ssd/react_on_rails_pro/spec/dummy/client/app/components/HelloWorldContainer.jsx";\n\n\n\n\n\n\nconst HelloWorldContainer = ({\n actions,\n data,\n railsContext\n}) => /*#__PURE__*/react_default().createElement(HelloWorldRedux, {\n actions,\n data,\n railsContext,\n __self: undefined,\n __source: {\n fileName: HelloWorldContainer_jsxFileName,\n lineNumber: 11,\n columnNumber: 3\n }\n});\nHelloWorldContainer.propTypes = {\n actions: (prop_types_default()).object.isRequired,\n data: (prop_types_default()).object.isRequired,\n railsContext: (prop_types_default()).object.isRequired\n};\nfunction HelloWorldContainer_mapStateToProps(state) {\n return {\n data: state.helloWorldData,\n railsContext: state.railsContext\n };\n}\nfunction HelloWorldContainer_mapDispatchToProps(dispatch) {\n return {\n actions: bindActionCreators(HelloWorldActions_namespaceObject, dispatch)\n };\n}\n\n// Don\'t forget to actually use connect!\n/* harmony default export */ const components_HelloWorldContainer = (connect(HelloWorldContainer_mapStateToProps, HelloWorldContainer_mapDispatchToProps)(HelloWorldContainer));\n;// CONCATENATED MODULE: ./client/app/ror-auto-load-components/ReduxApp.server.jsx\nvar ReduxApp_server_jsxFileName = "/mnt/ssd/react_on_rails_pro/spec/dummy/client/app/ror-auto-load-components/ReduxApp.server.jsx";\n// This is loaded by execJs and Rails to generate the HTML used for server rendering.\n// Compare this file to ./ClientApp.jsx\n// This module should export one default method that take props and returns the react component to\n// render.\n\n\n\n\n\n\n// Uses the index\n\n\n\n\n/*\n * Export a function that takes the props and returns a ReactComponent.\n * This is used for the server rendering.\n * In the client, React will see that the state is the same and not do anything.\n */\n/* harmony default export */ const ReduxApp_server = ((props, railsContext) => {\n // eslint-disable-next-line\n delete props.prerender;\n const combinedReducer = combineReducers(reducersIndex);\n const combinedProps = composeInitialState(props, railsContext);\n\n // This is where we\'ll put in the middleware for the async function. Placeholder.\n // store will have helloWorldData as a top level property\n const store = applyMiddleware(es)(createStore)(combinedReducer, combinedProps);\n\n // Provider uses the this.props.children, so we\'re not typical React syntax.\n // This allows redux to add additional props to the HelloWorldContainer.\n return () => /*#__PURE__*/react_default().createElement(Provider, {\n store: store,\n __self: undefined,\n __source: {\n fileName: ReduxApp_server_jsxFileName,\n lineNumber: 36,\n columnNumber: 5\n }\n }, /*#__PURE__*/react_default().createElement(components_HelloWorldContainer, {\n __self: undefined,\n __source: {\n fileName: ReduxApp_server_jsxFileName,\n lineNumber: 37,\n columnNumber: 7\n }\n }));\n});\n;// CONCATENATED MODULE: ./client/app/ror-auto-load-components/ReduxSharedStoreApp.server.jsx\nvar ReduxSharedStoreApp_server_jsxFileName = "/mnt/ssd/react_on_rails_pro/spec/dummy/client/app/ror-auto-load-components/ReduxSharedStoreApp.server.jsx";\n// Top level component for serer side.\n// Compare this to the ./ClientReduxSharedStoreApp.jsx file which is used for client side rendering.\n\n\n\n\n\n\n/*\n * Export a function that returns a ReactComponent, depending on a store named SharedReduxStore.\n * This is used for the server rendering.\n * React will see that the state is the same and not do anything.\n */\n/* harmony default export */ const ReduxSharedStoreApp_server = (() => {\n // This is where we get the existing store.\n const store = ReactOnRails_default().getStore(\'SharedReduxStore\');\n return /*#__PURE__*/react_default().createElement(Provider, {\n store: store,\n __self: undefined,\n __source: {\n fileName: ReduxSharedStoreApp_server_jsxFileName,\n lineNumber: 20,\n columnNumber: 5\n }\n }, /*#__PURE__*/react_default().createElement(components_HelloWorldContainer, {\n __self: undefined,\n __source: {\n fileName: ReduxSharedStoreApp_server_jsxFileName,\n lineNumber: 21,\n columnNumber: 7\n }\n }));\n});\n;// CONCATENATED MODULE: ./client/app/components/EchoProps.jsx\nvar EchoProps_jsxFileName = "/mnt/ssd/react_on_rails_pro/spec/dummy/client/app/components/EchoProps.jsx";\n\nconst EchoProps = props => /*#__PURE__*/react_default().createElement("div", {\n __self: undefined,\n __source: {\n fileName: EchoProps_jsxFileName,\n lineNumber: 3,\n columnNumber: 30\n }\n}, "Props: ", JSON.stringify(props));\n/* harmony default export */ const components_EchoProps = (EchoProps);\n;// CONCATENATED MODULE: ./client/app/ror-auto-load-components/RenderedHtml.server.jsx\nvar RenderedHtml_server_jsxFileName = "/mnt/ssd/react_on_rails_pro/spec/dummy/client/app/ror-auto-load-components/RenderedHtml.server.jsx";\n// Top level component for simple client side only rendering\n\n\n\n\n/*\n * Export a function that takes the props and returns an object with { renderedHtml }\n * Note, this is imported as "RenderedHtml" by "serverRegistration.jsx"\n *\n * Note, this is a fictional example, as you\'d only use a generator function if you wanted to run\n * some extra code, such as setting up Redux and React-Router.\n *\n * And the use of renderToString would probably be done with react-router v4\n *\n */\n/* harmony default export */ const RenderedHtml_server = ((props, _railsContext) => {\n const renderedHtml = (0,server_node.renderToString)( /*#__PURE__*/react_default().createElement(components_EchoProps, Object.assign({}, props, {\n __self: undefined,\n __source: {\n fileName: RenderedHtml_server_jsxFileName,\n lineNumber: 17,\n columnNumber: 39\n }\n })));\n return {\n renderedHtml\n };\n});\n;// CONCATENATED MODULE: ./client/app/components/RouterLayout.jsx\nvar RouterLayout_jsxFileName = "/mnt/ssd/react_on_rails_pro/spec/dummy/client/app/components/RouterLayout.jsx";\n\n\n\nconst RouterLayout = ({\n children\n}) => {\n console.log(`The result of react-router\'s loaderFunction (which is called when then route is initialized) is: ${(0,react_router_dist.useLoaderData)()}`);\n return /*#__PURE__*/react_default().createElement("div", {\n className: "container",\n __self: undefined,\n __source: {\n fileName: RouterLayout_jsxFileName,\n lineNumber: 10,\n columnNumber: 5\n }\n }, /*#__PURE__*/react_default().createElement("h1", {\n __self: undefined,\n __source: {\n fileName: RouterLayout_jsxFileName,\n lineNumber: 11,\n columnNumber: 7\n }\n }, "React Router is working!"), /*#__PURE__*/react_default().createElement("p", {\n __self: undefined,\n __source: {\n fileName: RouterLayout_jsxFileName,\n lineNumber: 12,\n columnNumber: 7\n }\n }, "Woohoo, we can use ", /*#__PURE__*/react_default().createElement("code", {\n __self: undefined,\n __source: {\n fileName: RouterLayout_jsxFileName,\n lineNumber: 13,\n columnNumber: 28\n }\n }, "react-router"), " here!"), /*#__PURE__*/react_default().createElement("ul", {\n __self: undefined,\n __source: {\n fileName: RouterLayout_jsxFileName,\n lineNumber: 15,\n columnNumber: 7\n }\n }, /*#__PURE__*/react_default().createElement("li", {\n __self: undefined,\n __source: {\n fileName: RouterLayout_jsxFileName,\n lineNumber: 16,\n columnNumber: 9\n }\n }, /*#__PURE__*/react_default().createElement(dist.Link, {\n to: "/react_router",\n __self: undefined,\n __source: {\n fileName: RouterLayout_jsxFileName,\n lineNumber: 17,\n columnNumber: 11\n }\n }, "React Router Layout Only")), /*#__PURE__*/react_default().createElement("li", {\n __self: undefined,\n __source: {\n fileName: RouterLayout_jsxFileName,\n lineNumber: 19,\n columnNumber: 9\n }\n }, /*#__PURE__*/react_default().createElement(dist.Link, {\n to: "/react_router/first_page",\n __self: undefined,\n __source: {\n fileName: RouterLayout_jsxFileName,\n lineNumber: 20,\n columnNumber: 11\n }\n }, "Router First Page")), /*#__PURE__*/react_default().createElement("li", {\n __self: undefined,\n __source: {\n fileName: RouterLayout_jsxFileName,\n lineNumber: 22,\n columnNumber: 9\n }\n }, /*#__PURE__*/react_default().createElement(dist.Link, {\n to: "/react_router/second_page",\n __self: undefined,\n __source: {\n fileName: RouterLayout_jsxFileName,\n lineNumber: 23,\n columnNumber: 11\n }\n }, "Router Second Page"))), /*#__PURE__*/react_default().createElement("hr", {\n __self: undefined,\n __source: {\n fileName: RouterLayout_jsxFileName,\n lineNumber: 26,\n columnNumber: 7\n }\n }), /*#__PURE__*/react_default().createElement(react_router_dist.Outlet, {\n __self: undefined,\n __source: {\n fileName: RouterLayout_jsxFileName,\n lineNumber: 27,\n columnNumber: 7\n }\n }));\n};\nRouterLayout.propTypes = {\n children: (prop_types_default()).object\n};\n/* harmony default export */ const components_RouterLayout = (RouterLayout);\n;// CONCATENATED MODULE: ./client/app/components/RouterFirstPage.jsx\nvar RouterFirstPage_jsxFileName = "/mnt/ssd/react_on_rails_pro/spec/dummy/client/app/components/RouterFirstPage.jsx";\n\nconst RouterFirstPage = () => /*#__PURE__*/react_default().createElement("div", {\n className: "container",\n __self: undefined,\n __source: {\n fileName: RouterFirstPage_jsxFileName,\n lineNumber: 4,\n columnNumber: 3\n }\n}, /*#__PURE__*/react_default().createElement("h2", {\n id: "first-page",\n __self: undefined,\n __source: {\n fileName: RouterFirstPage_jsxFileName,\n lineNumber: 5,\n columnNumber: 5\n }\n}, "React Router First Page"), /*#__PURE__*/react_default().createElement("p", {\n __self: undefined,\n __source: {\n fileName: RouterFirstPage_jsxFileName,\n lineNumber: 6,\n columnNumber: 5\n }\n}, "This page brought to you by React Router"));\n/* harmony default export */ const components_RouterFirstPage = (RouterFirstPage);\n;// CONCATENATED MODULE: ./client/app/components/RouterSecondPage.jsx\nvar RouterSecondPage_jsxFileName = "/mnt/ssd/react_on_rails_pro/spec/dummy/client/app/components/RouterSecondPage.jsx";\n\nconst RouterSecondPage = () => /*#__PURE__*/react_default().createElement("div", {\n className: "container",\n __self: undefined,\n __source: {\n fileName: RouterSecondPage_jsxFileName,\n lineNumber: 4,\n columnNumber: 3\n }\n}, /*#__PURE__*/react_default().createElement("h2", {\n id: "second-page",\n __self: undefined,\n __source: {\n fileName: RouterSecondPage_jsxFileName,\n lineNumber: 5,\n columnNumber: 5\n }\n}, "React Router Second Page"), /*#__PURE__*/react_default().createElement("p", {\n __self: undefined,\n __source: {\n fileName: RouterSecondPage_jsxFileName,\n lineNumber: 6,\n columnNumber: 5\n }\n}, "This page brought to you by React Router"));\n/* harmony default export */ const components_RouterSecondPage = (RouterSecondPage);\n;// CONCATENATED MODULE: ./client/app/routes/routes.jsx\nvar routes_jsxFileName = "/mnt/ssd/react_on_rails_pro/spec/dummy/client/app/routes/routes.jsx";\n\n\n\n\nconst loaderFunction = () => {\n console.log("/react_router\'s loader function was called.");\n return "return result from /react_router\'s loader function";\n};\n/* harmony default export */ const routes = ([{\n path: \'/react_router\',\n element: /*#__PURE__*/react_default().createElement(components_RouterLayout, {\n __self: undefined,\n __source: {\n fileName: routes_jsxFileName,\n lineNumber: 15,\n columnNumber: 14\n }\n }),\n loader: loaderFunction,\n children: [{\n path: \'first_page\',\n element: /*#__PURE__*/react_default().createElement(components_RouterFirstPage, {\n __self: undefined,\n __source: {\n fileName: routes_jsxFileName,\n lineNumber: 20,\n columnNumber: 18\n }\n }),\n loader: loaderFunction\n }, {\n path: \'second_page\',\n element: /*#__PURE__*/react_default().createElement(components_RouterSecondPage, {\n __self: undefined,\n __source: {\n fileName: routes_jsxFileName,\n lineNumber: 25,\n columnNumber: 18\n }\n }),\n loader: loaderFunction\n }]\n}]);\n;// CONCATENATED MODULE: ./client/app/ror-auto-load-components/RouterApp.server.jsx\nvar RouterApp_server_jsxFileName = "/mnt/ssd/react_on_rails_pro/spec/dummy/client/app/ror-auto-load-components/RouterApp.server.jsx";\n\n\n\n\nconst dataServerRouter = async (_props, railsContext) => {\n const controller = new AbortController();\n const request = new Request(new URL(railsContext.href), {\n signal: controller.signal\n });\n const handler = (0,server/* createStaticHandler */.d6)(routes);\n const routerContext = await handler.query(request);\n const router = (0,server/* createStaticRouter */.KD)(handler.dataRoutes, routerContext);\n return (0,server_node.renderToString)( /*#__PURE__*/react_default().createElement(server/* StaticRouterProvider */.je, {\n router: router,\n context: routerContext,\n __self: undefined,\n __source: {\n fileName: RouterApp_server_jsxFileName,\n lineNumber: 14,\n columnNumber: 25\n }\n }));\n};\n/* harmony default export */ const RouterApp_server = (dataServerRouter);\n;// CONCATENATED MODULE: ./client/app/ror-auto-load-components/SetTimeoutLoggingApp.server.jsx\nvar SetTimeoutLoggingApp_server_jsxFileName = "/mnt/ssd/react_on_rails_pro/spec/dummy/client/app/ror-auto-load-components/SetTimeoutLoggingApp.server.jsx";\n\n\n\n/**\n * TODO: Node rendering server should handle a timeout.\n */\n/* harmony default export */ const SetTimeoutLoggingApp_server = (async (_props, _railsContext) => {\n const delayedValuePromise = new Promise(resolve => {\n setTimeout(() => {\n console.log(\'Console log from setTimeout in SetTimeoutLoggingApp.server.jsx\');\n }, 1);\n setTimeout(() => {\n console.log(\'Console log from setTimeout100 in SetTimeoutLoggingApp.server.jsx\');\n resolve(\'this value is set by setTimeout during SSR\');\n }, 100);\n });\n console.log(\'Console log from SetTimeoutLoggingApp.server.jsx\');\n const delayedValue = await delayedValuePromise;\n const element = /*#__PURE__*/react_default().createElement("div", {\n __self: undefined,\n __source: {\n fileName: SetTimeoutLoggingApp_server_jsxFileName,\n lineNumber: 21,\n columnNumber: 19\n }\n }, "Disable javascript in your browser options to confirm ", delayedValue, ".");\n return (0,server_node.renderToString)(element);\n});\n;// CONCATENATED MODULE: ./client/app/generated/server-bundle-generated.js\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nReactOnRails_default().register({\n BrokenApp: BrokenApp,\n CacheDisabled: CacheDisabled,\n CssModulesImagesFontsExample: CssModulesImagesFontsExample,\n HelloWorld: ror_auto_load_components_HelloWorld,\n HelloWorldApp: HelloWorldApp,\n HelloWorldES5: ror_auto_load_components_HelloWorldES5,\n HelloWorldHooks: ror_auto_load_components_HelloWorldHooks,\n HelloWorldHooksContext: ror_auto_load_components_HelloWorldHooksContext,\n HelloWorldRehydratable: ror_auto_load_components_HelloWorldRehydratable,\n HelloWorldWithLogAndThrow: ror_auto_load_components_HelloWorldWithLogAndThrow,\n ImageExample: ImageExample,\n ManualRenderApp: ManualRenderApp,\n PureComponent: PureComponent,\n ApolloGraphQLApp: ApolloGraphQLApp_server,\n ConsoleLogsInAsyncServer: ConsoleLogsInAsyncServer_server,\n LazyApolloGraphQLApp: LazyApolloGraphQLApp_server,\n Loadable: loadable_server_imports_loadable,\n ReactHelmetApp: ReactHelmetApp_server,\n ReduxApp: ReduxApp_server,\n ReduxSharedStoreApp: ReduxSharedStoreApp_server,\n RenderedHtml: RenderedHtml_server,\n RouterApp: RouterApp_server,\n SetTimeoutLoggingApp: SetTimeoutLoggingApp_server\n});\n;// CONCATENATED MODULE: ./client/app/non_react/HelloString.js\n// Super simple example without using React.\n// This shows you can server side render any JS code.\n\nconst HelloString = {\n world() {\n return \'Hello WORLD! Will this work?? YES! Time to visit Maui\';\n }\n};\n/* harmony default export */ const non_react_HelloString = (HelloString);\n;// CONCATENATED MODULE: ./client/app/stores/SharedReduxStore.jsx\n\n\n\n\n/*\n * Export a function that takes the props and returns a Redux store\n * This is used so that 2 components can have the same store.\n */\n/* harmony default export */ const SharedReduxStore = ((props, railsContext) => {\n // eslint-disable-next-line no-param-reassign\n delete props.prerender;\n const combinedReducer = combineReducers(reducersIndex);\n const newProps = {\n ...props,\n railsContext\n };\n return applyMiddleware(es)(createStore)(combinedReducer, newProps);\n});\n;// CONCATENATED MODULE: ./client/app/packs/server-bundle.js\n// import statement added by react_on_rails:generate_packs rake task\n\n// Shows the mapping from the exported object to the name used by the server rendering.\n\n\n// Example of server rendering with no React\n\n\nReactOnRails_default().register({\n HelloString: non_react_HelloString\n});\nReactOnRails_default().registerStore({\n SharedReduxStore: SharedReduxStore\n});\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./client/app/packs/server-bundle.js_+_98_modules?', + ); + + /***/ + }, + + /***/ 2580: /***/ (__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + "__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ getApolloClient: () => (/* binding */ getApolloClient),\n/* harmony export */ initializeApolloClient: () => (/* binding */ initializeApolloClient),\n/* harmony export */ setApolloClient: () => (/* binding */ setApolloClient)\n/* harmony export */ });\n/* harmony import */ var _apollo_client__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8067);\n/* harmony import */ var _apollo_client__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7404);\n/* harmony import */ var _apollo_client__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4132);\n\nlet apolloClient;\nconst getApolloClient = () => {\n return apolloClient;\n};\nconst setApolloClient = client => {\n apolloClient = client;\n};\nconst initializeApolloClient = () => {\n let client = getApolloClient();\n if (client) {\n return client;\n }\n const csrfToken = document.querySelector('meta[name=\"csrf-token\"]')?.getAttribute('content');\n if (!csrfToken) {\n throw new Error('CSRF token not found: Are you missing a meta tag in your layout?');\n }\n // fulfill the store with the server data\n const initialState = window.__APOLLO_STATE__;\n client = new _apollo_client__WEBPACK_IMPORTED_MODULE_0__/* .ApolloClient */ .R({\n cache: new _apollo_client__WEBPACK_IMPORTED_MODULE_1__/* .InMemoryCache */ .D().restore(initialState),\n link: (0,_apollo_client__WEBPACK_IMPORTED_MODULE_2__/* .createHttpLink */ .$)({\n uri: `${window.location.origin}/graphql`,\n credentials: 'same-origin',\n headers: {\n 'X-CSRF-Token': csrfToken\n }\n }),\n ssrForceFetchDelay: 100\n });\n setApolloClient(client);\n return client;\n};\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./client/app/utils/lazyApollo.ts?", + ); + + /***/ + }, + + /***/ 4766: /***/ (__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ UPDATE_USER_MUTATION: () => (/* binding */ UPDATE_USER_MUTATION)\n/* harmony export */ });\n/* harmony import */ var _apollo_client__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9708);\n\nconst UPDATE_USER_MUTATION = (0,_apollo_client__WEBPACK_IMPORTED_MODULE_0__/* .gql */ .J1)`\n mutation updateUser($userId: ID!, $newName: String!) {\n updateUser(input: { userId: $userId, newName: $newName }) {\n user {\n id\n name\n email\n }\n }\n }\n`;\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./client/app/utils/lazyApolloOperations.ts?', + ); + + /***/ + }, + + /***/ 1804: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + 'use strict'; + eval( + "/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n\n\nvar _assign = __webpack_require__(5228);\n\n// -- Inlined from fbjs --\n\nvar emptyObject = {};\n\nif (true) {\n Object.freeze(emptyObject);\n}\n\nvar validateFormat = function validateFormat(format) {};\n\nif (true) {\n validateFormat = function validateFormat(format) {\n if (format === undefined) {\n throw new Error('invariant requires an error message argument');\n }\n };\n}\n\nfunction _invariant(condition, format, a, b, c, d, e, f) {\n validateFormat(format);\n\n if (!condition) {\n var error;\n if (format === undefined) {\n error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');\n } else {\n var args = [a, b, c, d, e, f];\n var argIndex = 0;\n error = new Error(format.replace(/%s/g, function () {\n return args[argIndex++];\n }));\n error.name = 'Invariant Violation';\n }\n\n error.framesToPop = 1; // we don't care about invariant's own frame\n throw error;\n }\n}\n\nvar warning = function(){};\n\nif (true) {\n var printWarning = function printWarning(format) {\n for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n var argIndex = 0;\n var message = 'Warning: ' + format.replace(/%s/g, function () {\n return args[argIndex++];\n });\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n };\n\n warning = function warning(condition, format) {\n if (format === undefined) {\n throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');\n }\n\n if (format.indexOf('Failed Composite propType: ') === 0) {\n return; // Ignore CompositeComponent proptype check.\n }\n\n if (!condition) {\n for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {\n args[_key2 - 2] = arguments[_key2];\n }\n\n printWarning.apply(undefined, [format].concat(args));\n }\n };\n}\n\n// /-- Inlined from fbjs --\n\nvar MIXINS_KEY = 'mixins';\n\n// Helper function to allow the creation of anonymous functions which do not\n// have .name set to the name of the variable being assigned to.\nfunction identity(fn) {\n return fn;\n}\n\nvar ReactPropTypeLocationNames;\nif (true) {\n ReactPropTypeLocationNames = {\n prop: 'prop',\n context: 'context',\n childContext: 'child context'\n };\n} else {}\n\nfunction factory(ReactComponent, isValidElement, ReactNoopUpdateQueue) {\n /**\n * Policies that describe methods in `ReactClassInterface`.\n */\n\n var injectedMixins = [];\n\n /**\n * Composite components are higher-level components that compose other composite\n * or host components.\n *\n * To create a new type of `ReactClass`, pass a specification of\n * your new class to `React.createClass`. The only requirement of your class\n * specification is that you implement a `render` method.\n *\n * var MyComponent = React.createClass({\n * render: function() {\n * return <div>Hello World</div>;\n * }\n * });\n *\n * The class specification supports a specific protocol of methods that have\n * special meaning (e.g. `render`). See `ReactClassInterface` for\n * more the comprehensive protocol. Any other properties and methods in the\n * class specification will be available on the prototype.\n *\n * @interface ReactClassInterface\n * @internal\n */\n var ReactClassInterface = {\n /**\n * An array of Mixin objects to include when defining your component.\n *\n * @type {array}\n * @optional\n */\n mixins: 'DEFINE_MANY',\n\n /**\n * An object containing properties and methods that should be defined on\n * the component's constructor instead of its prototype (static methods).\n *\n * @type {object}\n * @optional\n */\n statics: 'DEFINE_MANY',\n\n /**\n * Definition of prop types for this component.\n *\n * @type {object}\n * @optional\n */\n propTypes: 'DEFINE_MANY',\n\n /**\n * Definition of context types for this component.\n *\n * @type {object}\n * @optional\n */\n contextTypes: 'DEFINE_MANY',\n\n /**\n * Definition of context types this component sets for its children.\n *\n * @type {object}\n * @optional\n */\n childContextTypes: 'DEFINE_MANY',\n\n // ==== Definition methods ====\n\n /**\n * Invoked when the component is mounted. Values in the mapping will be set on\n * `this.props` if that prop is not specified (i.e. using an `in` check).\n *\n * This method is invoked before `getInitialState` and therefore cannot rely\n * on `this.state` or use `this.setState`.\n *\n * @return {object}\n * @optional\n */\n getDefaultProps: 'DEFINE_MANY_MERGED',\n\n /**\n * Invoked once before the component is mounted. The return value will be used\n * as the initial value of `this.state`.\n *\n * getInitialState: function() {\n * return {\n * isOn: false,\n * fooBaz: new BazFoo()\n * }\n * }\n *\n * @return {object}\n * @optional\n */\n getInitialState: 'DEFINE_MANY_MERGED',\n\n /**\n * @return {object}\n * @optional\n */\n getChildContext: 'DEFINE_MANY_MERGED',\n\n /**\n * Uses props from `this.props` and state from `this.state` to render the\n * structure of the component.\n *\n * No guarantees are made about when or how often this method is invoked, so\n * it must not have side effects.\n *\n * render: function() {\n * var name = this.props.name;\n * return <div>Hello, {name}!</div>;\n * }\n *\n * @return {ReactComponent}\n * @required\n */\n render: 'DEFINE_ONCE',\n\n // ==== Delegate methods ====\n\n /**\n * Invoked when the component is initially created and about to be mounted.\n * This may have side effects, but any external subscriptions or data created\n * by this method must be cleaned up in `componentWillUnmount`.\n *\n * @optional\n */\n componentWillMount: 'DEFINE_MANY',\n\n /**\n * Invoked when the component has been mounted and has a DOM representation.\n * However, there is no guarantee that the DOM node is in the document.\n *\n * Use this as an opportunity to operate on the DOM when the component has\n * been mounted (initialized and rendered) for the first time.\n *\n * @param {DOMElement} rootNode DOM element representing the component.\n * @optional\n */\n componentDidMount: 'DEFINE_MANY',\n\n /**\n * Invoked before the component receives new props.\n *\n * Use this as an opportunity to react to a prop transition by updating the\n * state using `this.setState`. Current props are accessed via `this.props`.\n *\n * componentWillReceiveProps: function(nextProps, nextContext) {\n * this.setState({\n * likesIncreasing: nextProps.likeCount > this.props.likeCount\n * });\n * }\n *\n * NOTE: There is no equivalent `componentWillReceiveState`. An incoming prop\n * transition may cause a state change, but the opposite is not true. If you\n * need it, you are probably looking for `componentWillUpdate`.\n *\n * @param {object} nextProps\n * @optional\n */\n componentWillReceiveProps: 'DEFINE_MANY',\n\n /**\n * Invoked while deciding if the component should be updated as a result of\n * receiving new props, state and/or context.\n *\n * Use this as an opportunity to `return false` when you're certain that the\n * transition to the new props/state/context will not require a component\n * update.\n *\n * shouldComponentUpdate: function(nextProps, nextState, nextContext) {\n * return !equal(nextProps, this.props) ||\n * !equal(nextState, this.state) ||\n * !equal(nextContext, this.context);\n * }\n *\n * @param {object} nextProps\n * @param {?object} nextState\n * @param {?object} nextContext\n * @return {boolean} True if the component should update.\n * @optional\n */\n shouldComponentUpdate: 'DEFINE_ONCE',\n\n /**\n * Invoked when the component is about to update due to a transition from\n * `this.props`, `this.state` and `this.context` to `nextProps`, `nextState`\n * and `nextContext`.\n *\n * Use this as an opportunity to perform preparation before an update occurs.\n *\n * NOTE: You **cannot** use `this.setState()` in this method.\n *\n * @param {object} nextProps\n * @param {?object} nextState\n * @param {?object} nextContext\n * @param {ReactReconcileTransaction} transaction\n * @optional\n */\n componentWillUpdate: 'DEFINE_MANY',\n\n /**\n * Invoked when the component's DOM representation has been updated.\n *\n * Use this as an opportunity to operate on the DOM when the component has\n * been updated.\n *\n * @param {object} prevProps\n * @param {?object} prevState\n * @param {?object} prevContext\n * @param {DOMElement} rootNode DOM element representing the component.\n * @optional\n */\n componentDidUpdate: 'DEFINE_MANY',\n\n /**\n * Invoked when the component is about to be removed from its parent and have\n * its DOM representation destroyed.\n *\n * Use this as an opportunity to deallocate any external resources.\n *\n * NOTE: There is no `componentDidUnmount` since your component will have been\n * destroyed by that point.\n *\n * @optional\n */\n componentWillUnmount: 'DEFINE_MANY',\n\n /**\n * Replacement for (deprecated) `componentWillMount`.\n *\n * @optional\n */\n UNSAFE_componentWillMount: 'DEFINE_MANY',\n\n /**\n * Replacement for (deprecated) `componentWillReceiveProps`.\n *\n * @optional\n */\n UNSAFE_componentWillReceiveProps: 'DEFINE_MANY',\n\n /**\n * Replacement for (deprecated) `componentWillUpdate`.\n *\n * @optional\n */\n UNSAFE_componentWillUpdate: 'DEFINE_MANY',\n\n // ==== Advanced methods ====\n\n /**\n * Updates the component's currently mounted DOM representation.\n *\n * By default, this implements React's rendering and reconciliation algorithm.\n * Sophisticated clients may wish to override this.\n *\n * @param {ReactReconcileTransaction} transaction\n * @internal\n * @overridable\n */\n updateComponent: 'OVERRIDE_BASE'\n };\n\n /**\n * Similar to ReactClassInterface but for static methods.\n */\n var ReactClassStaticInterface = {\n /**\n * This method is invoked after a component is instantiated and when it\n * receives new props. Return an object to update state in response to\n * prop changes. Return null to indicate no change to state.\n *\n * If an object is returned, its keys will be merged into the existing state.\n *\n * @return {object || null}\n * @optional\n */\n getDerivedStateFromProps: 'DEFINE_MANY_MERGED'\n };\n\n /**\n * Mapping from class specification keys to special processing functions.\n *\n * Although these are declared like instance properties in the specification\n * when defining classes using `React.createClass`, they are actually static\n * and are accessible on the constructor instead of the prototype. Despite\n * being static, they must be defined outside of the \"statics\" key under\n * which all other static methods are defined.\n */\n var RESERVED_SPEC_KEYS = {\n displayName: function(Constructor, displayName) {\n Constructor.displayName = displayName;\n },\n mixins: function(Constructor, mixins) {\n if (mixins) {\n for (var i = 0; i < mixins.length; i++) {\n mixSpecIntoComponent(Constructor, mixins[i]);\n }\n }\n },\n childContextTypes: function(Constructor, childContextTypes) {\n if (true) {\n validateTypeDef(Constructor, childContextTypes, 'childContext');\n }\n Constructor.childContextTypes = _assign(\n {},\n Constructor.childContextTypes,\n childContextTypes\n );\n },\n contextTypes: function(Constructor, contextTypes) {\n if (true) {\n validateTypeDef(Constructor, contextTypes, 'context');\n }\n Constructor.contextTypes = _assign(\n {},\n Constructor.contextTypes,\n contextTypes\n );\n },\n /**\n * Special case getDefaultProps which should move into statics but requires\n * automatic merging.\n */\n getDefaultProps: function(Constructor, getDefaultProps) {\n if (Constructor.getDefaultProps) {\n Constructor.getDefaultProps = createMergedResultFunction(\n Constructor.getDefaultProps,\n getDefaultProps\n );\n } else {\n Constructor.getDefaultProps = getDefaultProps;\n }\n },\n propTypes: function(Constructor, propTypes) {\n if (true) {\n validateTypeDef(Constructor, propTypes, 'prop');\n }\n Constructor.propTypes = _assign({}, Constructor.propTypes, propTypes);\n },\n statics: function(Constructor, statics) {\n mixStaticSpecIntoComponent(Constructor, statics);\n },\n autobind: function() {}\n };\n\n function validateTypeDef(Constructor, typeDef, location) {\n for (var propName in typeDef) {\n if (typeDef.hasOwnProperty(propName)) {\n // use a warning instead of an _invariant so components\n // don't show up in prod but only in __DEV__\n if (true) {\n warning(\n typeof typeDef[propName] === 'function',\n '%s: %s type `%s` is invalid; it must be a function, usually from ' +\n 'React.PropTypes.',\n Constructor.displayName || 'ReactClass',\n ReactPropTypeLocationNames[location],\n propName\n );\n }\n }\n }\n }\n\n function validateMethodOverride(isAlreadyDefined, name) {\n var specPolicy = ReactClassInterface.hasOwnProperty(name)\n ? ReactClassInterface[name]\n : null;\n\n // Disallow overriding of base class methods unless explicitly allowed.\n if (ReactClassMixin.hasOwnProperty(name)) {\n _invariant(\n specPolicy === 'OVERRIDE_BASE',\n 'ReactClassInterface: You are attempting to override ' +\n '`%s` from your class specification. Ensure that your method names ' +\n 'do not overlap with React methods.',\n name\n );\n }\n\n // Disallow defining methods more than once unless explicitly allowed.\n if (isAlreadyDefined) {\n _invariant(\n specPolicy === 'DEFINE_MANY' || specPolicy === 'DEFINE_MANY_MERGED',\n 'ReactClassInterface: You are attempting to define ' +\n '`%s` on your component more than once. This conflict may be due ' +\n 'to a mixin.',\n name\n );\n }\n }\n\n /**\n * Mixin helper which handles policy validation and reserved\n * specification keys when building React classes.\n */\n function mixSpecIntoComponent(Constructor, spec) {\n if (!spec) {\n if (true) {\n var typeofSpec = typeof spec;\n var isMixinValid = typeofSpec === 'object' && spec !== null;\n\n if (true) {\n warning(\n isMixinValid,\n \"%s: You're attempting to include a mixin that is either null \" +\n 'or not an object. Check the mixins included by the component, ' +\n 'as well as any mixins they include themselves. ' +\n 'Expected object but got %s.',\n Constructor.displayName || 'ReactClass',\n spec === null ? null : typeofSpec\n );\n }\n }\n\n return;\n }\n\n _invariant(\n typeof spec !== 'function',\n \"ReactClass: You're attempting to \" +\n 'use a component class or function as a mixin. Instead, just use a ' +\n 'regular object.'\n );\n _invariant(\n !isValidElement(spec),\n \"ReactClass: You're attempting to \" +\n 'use a component as a mixin. Instead, just use a regular object.'\n );\n\n var proto = Constructor.prototype;\n var autoBindPairs = proto.__reactAutoBindPairs;\n\n // By handling mixins before any other properties, we ensure the same\n // chaining order is applied to methods with DEFINE_MANY policy, whether\n // mixins are listed before or after these methods in the spec.\n if (spec.hasOwnProperty(MIXINS_KEY)) {\n RESERVED_SPEC_KEYS.mixins(Constructor, spec.mixins);\n }\n\n for (var name in spec) {\n if (!spec.hasOwnProperty(name)) {\n continue;\n }\n\n if (name === MIXINS_KEY) {\n // We have already handled mixins in a special case above.\n continue;\n }\n\n var property = spec[name];\n var isAlreadyDefined = proto.hasOwnProperty(name);\n validateMethodOverride(isAlreadyDefined, name);\n\n if (RESERVED_SPEC_KEYS.hasOwnProperty(name)) {\n RESERVED_SPEC_KEYS[name](Constructor, property);\n } else {\n // Setup methods on prototype:\n // The following member methods should not be automatically bound:\n // 1. Expected ReactClass methods (in the \"interface\").\n // 2. Overridden methods (that were mixed in).\n var isReactClassMethod = ReactClassInterface.hasOwnProperty(name);\n var isFunction = typeof property === 'function';\n var shouldAutoBind =\n isFunction &&\n !isReactClassMethod &&\n !isAlreadyDefined &&\n spec.autobind !== false;\n\n if (shouldAutoBind) {\n autoBindPairs.push(name, property);\n proto[name] = property;\n } else {\n if (isAlreadyDefined) {\n var specPolicy = ReactClassInterface[name];\n\n // These cases should already be caught by validateMethodOverride.\n _invariant(\n isReactClassMethod &&\n (specPolicy === 'DEFINE_MANY_MERGED' ||\n specPolicy === 'DEFINE_MANY'),\n 'ReactClass: Unexpected spec policy %s for key %s ' +\n 'when mixing in component specs.',\n specPolicy,\n name\n );\n\n // For methods which are defined more than once, call the existing\n // methods before calling the new property, merging if appropriate.\n if (specPolicy === 'DEFINE_MANY_MERGED') {\n proto[name] = createMergedResultFunction(proto[name], property);\n } else if (specPolicy === 'DEFINE_MANY') {\n proto[name] = createChainedFunction(proto[name], property);\n }\n } else {\n proto[name] = property;\n if (true) {\n // Add verbose displayName to the function, which helps when looking\n // at profiling tools.\n if (typeof property === 'function' && spec.displayName) {\n proto[name].displayName = spec.displayName + '_' + name;\n }\n }\n }\n }\n }\n }\n }\n\n function mixStaticSpecIntoComponent(Constructor, statics) {\n if (!statics) {\n return;\n }\n\n for (var name in statics) {\n var property = statics[name];\n if (!statics.hasOwnProperty(name)) {\n continue;\n }\n\n var isReserved = name in RESERVED_SPEC_KEYS;\n _invariant(\n !isReserved,\n 'ReactClass: You are attempting to define a reserved ' +\n 'property, `%s`, that shouldn\\'t be on the \"statics\" key. Define it ' +\n 'as an instance property instead; it will still be accessible on the ' +\n 'constructor.',\n name\n );\n\n var isAlreadyDefined = name in Constructor;\n if (isAlreadyDefined) {\n var specPolicy = ReactClassStaticInterface.hasOwnProperty(name)\n ? ReactClassStaticInterface[name]\n : null;\n\n _invariant(\n specPolicy === 'DEFINE_MANY_MERGED',\n 'ReactClass: You are attempting to define ' +\n '`%s` on your component more than once. This conflict may be ' +\n 'due to a mixin.',\n name\n );\n\n Constructor[name] = createMergedResultFunction(Constructor[name], property);\n\n return;\n }\n\n Constructor[name] = property;\n }\n }\n\n /**\n * Merge two objects, but throw if both contain the same key.\n *\n * @param {object} one The first object, which is mutated.\n * @param {object} two The second object\n * @return {object} one after it has been mutated to contain everything in two.\n */\n function mergeIntoWithNoDuplicateKeys(one, two) {\n _invariant(\n one && two && typeof one === 'object' && typeof two === 'object',\n 'mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.'\n );\n\n for (var key in two) {\n if (two.hasOwnProperty(key)) {\n _invariant(\n one[key] === undefined,\n 'mergeIntoWithNoDuplicateKeys(): ' +\n 'Tried to merge two objects with the same key: `%s`. This conflict ' +\n 'may be due to a mixin; in particular, this may be caused by two ' +\n 'getInitialState() or getDefaultProps() methods returning objects ' +\n 'with clashing keys.',\n key\n );\n one[key] = two[key];\n }\n }\n return one;\n }\n\n /**\n * Creates a function that invokes two functions and merges their return values.\n *\n * @param {function} one Function to invoke first.\n * @param {function} two Function to invoke second.\n * @return {function} Function that invokes the two argument functions.\n * @private\n */\n function createMergedResultFunction(one, two) {\n return function mergedResult() {\n var a = one.apply(this, arguments);\n var b = two.apply(this, arguments);\n if (a == null) {\n return b;\n } else if (b == null) {\n return a;\n }\n var c = {};\n mergeIntoWithNoDuplicateKeys(c, a);\n mergeIntoWithNoDuplicateKeys(c, b);\n return c;\n };\n }\n\n /**\n * Creates a function that invokes two functions and ignores their return vales.\n *\n * @param {function} one Function to invoke first.\n * @param {function} two Function to invoke second.\n * @return {function} Function that invokes the two argument functions.\n * @private\n */\n function createChainedFunction(one, two) {\n return function chainedFunction() {\n one.apply(this, arguments);\n two.apply(this, arguments);\n };\n }\n\n /**\n * Binds a method to the component.\n *\n * @param {object} component Component whose method is going to be bound.\n * @param {function} method Method to be bound.\n * @return {function} The bound method.\n */\n function bindAutoBindMethod(component, method) {\n var boundMethod = method.bind(component);\n if (true) {\n boundMethod.__reactBoundContext = component;\n boundMethod.__reactBoundMethod = method;\n boundMethod.__reactBoundArguments = null;\n var componentName = component.constructor.displayName;\n var _bind = boundMethod.bind;\n boundMethod.bind = function(newThis) {\n for (\n var _len = arguments.length,\n args = Array(_len > 1 ? _len - 1 : 0),\n _key = 1;\n _key < _len;\n _key++\n ) {\n args[_key - 1] = arguments[_key];\n }\n\n // User is trying to bind() an autobound method; we effectively will\n // ignore the value of \"this\" that the user is trying to use, so\n // let's warn.\n if (newThis !== component && newThis !== null) {\n if (true) {\n warning(\n false,\n 'bind(): React component methods may only be bound to the ' +\n 'component instance. See %s',\n componentName\n );\n }\n } else if (!args.length) {\n if (true) {\n warning(\n false,\n 'bind(): You are binding a component method to the component. ' +\n 'React does this for you automatically in a high-performance ' +\n 'way, so you can safely remove this call. See %s',\n componentName\n );\n }\n return boundMethod;\n }\n var reboundMethod = _bind.apply(boundMethod, arguments);\n reboundMethod.__reactBoundContext = component;\n reboundMethod.__reactBoundMethod = method;\n reboundMethod.__reactBoundArguments = args;\n return reboundMethod;\n };\n }\n return boundMethod;\n }\n\n /**\n * Binds all auto-bound methods in a component.\n *\n * @param {object} component Component whose method is going to be bound.\n */\n function bindAutoBindMethods(component) {\n var pairs = component.__reactAutoBindPairs;\n for (var i = 0; i < pairs.length; i += 2) {\n var autoBindKey = pairs[i];\n var method = pairs[i + 1];\n component[autoBindKey] = bindAutoBindMethod(component, method);\n }\n }\n\n var IsMountedPreMixin = {\n componentDidMount: function() {\n this.__isMounted = true;\n }\n };\n\n var IsMountedPostMixin = {\n componentWillUnmount: function() {\n this.__isMounted = false;\n }\n };\n\n /**\n * Add more to the ReactClass base class. These are all legacy features and\n * therefore not already part of the modern ReactComponent.\n */\n var ReactClassMixin = {\n /**\n * TODO: This will be deprecated because state should always keep a consistent\n * type signature and the only use case for this, is to avoid that.\n */\n replaceState: function(newState, callback) {\n this.updater.enqueueReplaceState(this, newState, callback);\n },\n\n /**\n * Checks whether or not this composite component is mounted.\n * @return {boolean} True if mounted, false otherwise.\n * @protected\n * @final\n */\n isMounted: function() {\n if (true) {\n warning(\n this.__didWarnIsMounted,\n '%s: isMounted is deprecated. Instead, make sure to clean up ' +\n 'subscriptions and pending requests in componentWillUnmount to ' +\n 'prevent memory leaks.',\n (this.constructor && this.constructor.displayName) ||\n this.name ||\n 'Component'\n );\n this.__didWarnIsMounted = true;\n }\n return !!this.__isMounted;\n }\n };\n\n var ReactClassComponent = function() {};\n _assign(\n ReactClassComponent.prototype,\n ReactComponent.prototype,\n ReactClassMixin\n );\n\n /**\n * Creates a composite component class given a class specification.\n * See https://facebook.github.io/react/docs/top-level-api.html#react.createclass\n *\n * @param {object} spec Class specification (which must define `render`).\n * @return {function} Component constructor function.\n * @public\n */\n function createClass(spec) {\n // To keep our warnings more understandable, we'll use a little hack here to\n // ensure that Constructor.name !== 'Constructor'. This makes sure we don't\n // unnecessarily identify a class without displayName as 'Constructor'.\n var Constructor = identity(function(props, context, updater) {\n // This constructor gets overridden by mocks. The argument is used\n // by mocks to assert on what gets mounted.\n\n if (true) {\n warning(\n this instanceof Constructor,\n 'Something is calling a React component directly. Use a factory or ' +\n 'JSX instead. See: https://fb.me/react-legacyfactory'\n );\n }\n\n // Wire up auto-binding\n if (this.__reactAutoBindPairs.length) {\n bindAutoBindMethods(this);\n }\n\n this.props = props;\n this.context = context;\n this.refs = emptyObject;\n this.updater = updater || ReactNoopUpdateQueue;\n\n this.state = null;\n\n // ReactClasses doesn't have constructors. Instead, they use the\n // getInitialState and componentWillMount methods for initialization.\n\n var initialState = this.getInitialState ? this.getInitialState() : null;\n if (true) {\n // We allow auto-mocks to proceed as if they're returning null.\n if (\n initialState === undefined &&\n this.getInitialState._isMockFunction\n ) {\n // This is probably bad practice. Consider warning here and\n // deprecating this convenience.\n initialState = null;\n }\n }\n _invariant(\n typeof initialState === 'object' && !Array.isArray(initialState),\n '%s.getInitialState(): must return an object or null',\n Constructor.displayName || 'ReactCompositeComponent'\n );\n\n this.state = initialState;\n });\n Constructor.prototype = new ReactClassComponent();\n Constructor.prototype.constructor = Constructor;\n Constructor.prototype.__reactAutoBindPairs = [];\n\n injectedMixins.forEach(mixSpecIntoComponent.bind(null, Constructor));\n\n mixSpecIntoComponent(Constructor, IsMountedPreMixin);\n mixSpecIntoComponent(Constructor, spec);\n mixSpecIntoComponent(Constructor, IsMountedPostMixin);\n\n // Initialize the defaultProps property after all mixins have been merged.\n if (Constructor.getDefaultProps) {\n Constructor.defaultProps = Constructor.getDefaultProps();\n }\n\n if (true) {\n // This is a tag to indicate that the use of these method names is ok,\n // since it's used with createClass. If it's not, then it's likely a\n // mistake so we'll warn you to use the static property, property\n // initializer or constructor respectively.\n if (Constructor.getDefaultProps) {\n Constructor.getDefaultProps.isReactClassApproved = {};\n }\n if (Constructor.prototype.getInitialState) {\n Constructor.prototype.getInitialState.isReactClassApproved = {};\n }\n }\n\n _invariant(\n Constructor.prototype.render,\n 'createClass(...): Class specification must implement a `render` method.'\n );\n\n if (true) {\n warning(\n !Constructor.prototype.componentShouldUpdate,\n '%s has a method called ' +\n 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' +\n 'The name is phrased as a question because the function is ' +\n 'expected to return a value.',\n spec.displayName || 'A component'\n );\n warning(\n !Constructor.prototype.componentWillRecieveProps,\n '%s has a method called ' +\n 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?',\n spec.displayName || 'A component'\n );\n warning(\n !Constructor.prototype.UNSAFE_componentWillRecieveProps,\n '%s has a method called UNSAFE_componentWillRecieveProps(). ' +\n 'Did you mean UNSAFE_componentWillReceiveProps()?',\n spec.displayName || 'A component'\n );\n }\n\n // Reduce time spent doing lookups by setting these on the prototype.\n for (var methodName in ReactClassInterface) {\n if (!Constructor.prototype[methodName]) {\n Constructor.prototype[methodName] = null;\n }\n }\n\n return Constructor;\n }\n\n return createClass;\n}\n\nmodule.exports = factory;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/create-react-class/factory.js?", + ); + + /***/ + }, + + /***/ 2306: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + 'use strict'; + eval( + "/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n\n\nvar React = __webpack_require__(6540);\nvar factory = __webpack_require__(1804);\n\nif (typeof React === 'undefined') {\n throw Error(\n 'create-react-class could not find the React object. If you are using script tags, ' +\n 'make sure that React is being loaded before create-react-class.'\n );\n}\n\n// Hack to grab NoopUpdateQueue from isomorphic React\nvar ReactNoopUpdateQueue = new React.Component().updater;\n\nmodule.exports = factory(\n React.Component,\n React.isValidElement,\n ReactNoopUpdateQueue\n);\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/create-react-class/index.js?", + ); + + /***/ + }, + + /***/ 7143: /***/ (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'const fetchNode = __webpack_require__(5221)\nconst fetch = fetchNode.fetch.bind({})\n\nfetch.polyfill = true\n\nif (!global.fetch) {\n global.fetch = fetch\n global.Response = fetchNode.Response\n global.Headers = fetchNode.Headers\n global.Request = fetchNode.Request\n}\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/cross-fetch/dist/node-polyfill.js?', + ); + + /***/ + }, + + /***/ 5221: /***/ (module, exports, __webpack_require__) => { + eval( + 'const nodeFetch = __webpack_require__(9778)\nconst realFetch = nodeFetch.default || nodeFetch\n\nconst fetch = function (url, options) {\n // Support schemaless URIs on the server for parity with the browser.\n // Ex: //github.com/ -> https://github.com/\n if (/^\\/\\//.test(url)) {\n url = \'https:\' + url\n }\n return realFetch.call(this, url, options)\n}\n\nfetch.ponyfill = true\n\nmodule.exports = exports = fetch\nexports.fetch = fetch\nexports.Headers = nodeFetch.Headers\nexports.Request = nodeFetch.Request\nexports.Response = nodeFetch.Response\n\n// Needed for TypeScript consumers without esModuleInterop.\nexports["default"] = fetch\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/cross-fetch/dist/node-ponyfill.js?', + ); + + /***/ + }, + + /***/ 1807: /***/ (__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({\n\n});\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./client/app/components/Loadable/letters/A.css?', + ); + + /***/ + }, + + /***/ 9227: /***/ (__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({\n\n});\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./client/app/components/Loadable/letters/main.css?', + ); + + /***/ + }, + + /***/ 9708: /***/ (__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + "\n// EXPORTS\n__webpack_require__.d(__webpack_exports__, {\n J1: () => (/* binding */ gql)\n});\n\n// UNUSED EXPORTS: default, disableExperimentalFragmentVariables, disableFragmentWarnings, enableExperimentalFragmentVariables, resetCaches\n\n// EXTERNAL MODULE: ./node_modules/tslib/tslib.es6.mjs\nvar tslib_es6 = __webpack_require__(1635);\n;// CONCATENATED MODULE: ./node_modules/graphql/jsutils/isObjectLike.mjs\n/**\n * Return true if `value` is object-like. A value is object-like if it's not\n * `null` and has a `typeof` result of \"object\".\n */\nfunction isObjectLike(value) {\n return typeof value == 'object' && value !== null;\n}\n\n;// CONCATENATED MODULE: ./node_modules/graphql/jsutils/invariant.mjs\nfunction invariant(condition, message) {\n const booleanCondition = Boolean(condition);\n\n if (!booleanCondition) {\n throw new Error(\n message != null ? message : 'Unexpected invariant triggered.',\n );\n }\n}\n\n;// CONCATENATED MODULE: ./node_modules/graphql/language/location.mjs\n\nconst LineRegExp = /\\r\\n|[\\n\\r]/g;\n/**\n * Represents a location in a Source.\n */\n\n/**\n * Takes a Source and a UTF-8 character offset, and returns the corresponding\n * line and column as a SourceLocation.\n */\nfunction getLocation(source, position) {\n let lastLineStart = 0;\n let line = 1;\n\n for (const match of source.body.matchAll(LineRegExp)) {\n typeof match.index === 'number' || invariant(false);\n\n if (match.index >= position) {\n break;\n }\n\n lastLineStart = match.index + match[0].length;\n line += 1;\n }\n\n return {\n line,\n column: position + 1 - lastLineStart,\n };\n}\n\n;// CONCATENATED MODULE: ./node_modules/graphql/language/printLocation.mjs\n\n\n/**\n * Render a helpful description of the location in the GraphQL Source document.\n */\nfunction printLocation(location) {\n return printSourceLocation(\n location.source,\n getLocation(location.source, location.start),\n );\n}\n/**\n * Render a helpful description of the location in the GraphQL Source document.\n */\n\nfunction printSourceLocation(source, sourceLocation) {\n const firstLineColumnOffset = source.locationOffset.column - 1;\n const body = ''.padStart(firstLineColumnOffset) + source.body;\n const lineIndex = sourceLocation.line - 1;\n const lineOffset = source.locationOffset.line - 1;\n const lineNum = sourceLocation.line + lineOffset;\n const columnOffset = sourceLocation.line === 1 ? firstLineColumnOffset : 0;\n const columnNum = sourceLocation.column + columnOffset;\n const locationStr = `${source.name}:${lineNum}:${columnNum}\\n`;\n const lines = body.split(/\\r\\n|[\\n\\r]/g);\n const locationLine = lines[lineIndex]; // Special case for minified documents\n\n if (locationLine.length > 120) {\n const subLineIndex = Math.floor(columnNum / 80);\n const subLineColumnNum = columnNum % 80;\n const subLines = [];\n\n for (let i = 0; i < locationLine.length; i += 80) {\n subLines.push(locationLine.slice(i, i + 80));\n }\n\n return (\n locationStr +\n printPrefixedLines([\n [`${lineNum} |`, subLines[0]],\n ...subLines.slice(1, subLineIndex + 1).map((subLine) => ['|', subLine]),\n ['|', '^'.padStart(subLineColumnNum)],\n ['|', subLines[subLineIndex + 1]],\n ])\n );\n }\n\n return (\n locationStr +\n printPrefixedLines([\n // Lines specified like this: [\"prefix\", \"string\"],\n [`${lineNum - 1} |`, lines[lineIndex - 1]],\n [`${lineNum} |`, locationLine],\n ['|', '^'.padStart(columnNum)],\n [`${lineNum + 1} |`, lines[lineIndex + 1]],\n ])\n );\n}\n\nfunction printPrefixedLines(lines) {\n const existingLines = lines.filter(([_, line]) => line !== undefined);\n const padLen = Math.max(...existingLines.map(([prefix]) => prefix.length));\n return existingLines\n .map(([prefix, line]) => prefix.padStart(padLen) + (line ? ' ' + line : ''))\n .join('\\n');\n}\n\n;// CONCATENATED MODULE: ./node_modules/graphql/error/GraphQLError.mjs\n\n\n\n\nfunction toNormalizedOptions(args) {\n const firstArg = args[0];\n\n if (firstArg == null || 'kind' in firstArg || 'length' in firstArg) {\n return {\n nodes: firstArg,\n source: args[1],\n positions: args[2],\n path: args[3],\n originalError: args[4],\n extensions: args[5],\n };\n }\n\n return firstArg;\n}\n/**\n * A GraphQLError describes an Error found during the parse, validate, or\n * execute phases of performing a GraphQL operation. In addition to a message\n * and stack trace, it also includes information about the locations in a\n * GraphQL document and/or execution result that correspond to the Error.\n */\n\nclass GraphQLError extends Error {\n /**\n * An array of `{ line, column }` locations within the source GraphQL document\n * which correspond to this error.\n *\n * Errors during validation often contain multiple locations, for example to\n * point out two things with the same name. Errors during execution include a\n * single location, the field which produced the error.\n *\n * Enumerable, and appears in the result of JSON.stringify().\n */\n\n /**\n * An array describing the JSON-path into the execution response which\n * corresponds to this error. Only included for errors during execution.\n *\n * Enumerable, and appears in the result of JSON.stringify().\n */\n\n /**\n * An array of GraphQL AST Nodes corresponding to this error.\n */\n\n /**\n * The source GraphQL document for the first location of this error.\n *\n * Note that if this Error represents more than one node, the source may not\n * represent nodes after the first node.\n */\n\n /**\n * An array of character offsets within the source GraphQL document\n * which correspond to this error.\n */\n\n /**\n * The original error thrown from a field resolver during execution.\n */\n\n /**\n * Extension fields to add to the formatted error.\n */\n\n /**\n * @deprecated Please use the `GraphQLErrorOptions` constructor overload instead.\n */\n constructor(message, ...rawArgs) {\n var _this$nodes, _nodeLocations$, _ref;\n\n const { nodes, source, positions, path, originalError, extensions } =\n toNormalizedOptions(rawArgs);\n super(message);\n this.name = 'GraphQLError';\n this.path = path !== null && path !== void 0 ? path : undefined;\n this.originalError =\n originalError !== null && originalError !== void 0\n ? originalError\n : undefined; // Compute list of blame nodes.\n\n this.nodes = undefinedIfEmpty(\n Array.isArray(nodes) ? nodes : nodes ? [nodes] : undefined,\n );\n const nodeLocations = undefinedIfEmpty(\n (_this$nodes = this.nodes) === null || _this$nodes === void 0\n ? void 0\n : _this$nodes.map((node) => node.loc).filter((loc) => loc != null),\n ); // Compute locations in the source for the given nodes/positions.\n\n this.source =\n source !== null && source !== void 0\n ? source\n : nodeLocations === null || nodeLocations === void 0\n ? void 0\n : (_nodeLocations$ = nodeLocations[0]) === null ||\n _nodeLocations$ === void 0\n ? void 0\n : _nodeLocations$.source;\n this.positions =\n positions !== null && positions !== void 0\n ? positions\n : nodeLocations === null || nodeLocations === void 0\n ? void 0\n : nodeLocations.map((loc) => loc.start);\n this.locations =\n positions && source\n ? positions.map((pos) => getLocation(source, pos))\n : nodeLocations === null || nodeLocations === void 0\n ? void 0\n : nodeLocations.map((loc) => getLocation(loc.source, loc.start));\n const originalExtensions = isObjectLike(\n originalError === null || originalError === void 0\n ? void 0\n : originalError.extensions,\n )\n ? originalError === null || originalError === void 0\n ? void 0\n : originalError.extensions\n : undefined;\n this.extensions =\n (_ref =\n extensions !== null && extensions !== void 0\n ? extensions\n : originalExtensions) !== null && _ref !== void 0\n ? _ref\n : Object.create(null); // Only properties prescribed by the spec should be enumerable.\n // Keep the rest as non-enumerable.\n\n Object.defineProperties(this, {\n message: {\n writable: true,\n enumerable: true,\n },\n name: {\n enumerable: false,\n },\n nodes: {\n enumerable: false,\n },\n source: {\n enumerable: false,\n },\n positions: {\n enumerable: false,\n },\n originalError: {\n enumerable: false,\n },\n }); // Include (non-enumerable) stack trace.\n\n /* c8 ignore start */\n // FIXME: https://github.com/graphql/graphql-js/issues/2317\n\n if (\n originalError !== null &&\n originalError !== void 0 &&\n originalError.stack\n ) {\n Object.defineProperty(this, 'stack', {\n value: originalError.stack,\n writable: true,\n configurable: true,\n });\n } else if (Error.captureStackTrace) {\n Error.captureStackTrace(this, GraphQLError);\n } else {\n Object.defineProperty(this, 'stack', {\n value: Error().stack,\n writable: true,\n configurable: true,\n });\n }\n /* c8 ignore stop */\n }\n\n get [Symbol.toStringTag]() {\n return 'GraphQLError';\n }\n\n toString() {\n let output = this.message;\n\n if (this.nodes) {\n for (const node of this.nodes) {\n if (node.loc) {\n output += '\\n\\n' + printLocation(node.loc);\n }\n }\n } else if (this.source && this.locations) {\n for (const location of this.locations) {\n output += '\\n\\n' + printSourceLocation(this.source, location);\n }\n }\n\n return output;\n }\n\n toJSON() {\n const formattedError = {\n message: this.message,\n };\n\n if (this.locations != null) {\n formattedError.locations = this.locations;\n }\n\n if (this.path != null) {\n formattedError.path = this.path;\n }\n\n if (this.extensions != null && Object.keys(this.extensions).length > 0) {\n formattedError.extensions = this.extensions;\n }\n\n return formattedError;\n }\n}\n\nfunction undefinedIfEmpty(array) {\n return array === undefined || array.length === 0 ? undefined : array;\n}\n/**\n * See: https://spec.graphql.org/draft/#sec-Errors\n */\n\n/**\n * Prints a GraphQLError to a string, representing useful location information\n * about the error's position in the source.\n *\n * @deprecated Please use `error.toString` instead. Will be removed in v17\n */\nfunction printError(error) {\n return error.toString();\n}\n/**\n * Given a GraphQLError, format it according to the rules described by the\n * Response Format, Errors section of the GraphQL Specification.\n *\n * @deprecated Please use `error.toJSON` instead. Will be removed in v17\n */\n\nfunction formatError(error) {\n return error.toJSON();\n}\n\n;// CONCATENATED MODULE: ./node_modules/graphql/error/syntaxError.mjs\n\n/**\n * Produces a GraphQLError representing a syntax error, containing useful\n * descriptive information about the syntax error's position in the source.\n */\n\nfunction syntaxError(source, position, description) {\n return new GraphQLError(`Syntax Error: ${description}`, {\n source,\n positions: [position],\n });\n}\n\n// EXTERNAL MODULE: ./node_modules/graphql/language/ast.mjs\nvar ast = __webpack_require__(475);\n;// CONCATENATED MODULE: ./node_modules/graphql/language/directiveLocation.mjs\n/**\n * The set of allowed directive location values.\n */\nvar DirectiveLocation;\n\n(function (DirectiveLocation) {\n DirectiveLocation['QUERY'] = 'QUERY';\n DirectiveLocation['MUTATION'] = 'MUTATION';\n DirectiveLocation['SUBSCRIPTION'] = 'SUBSCRIPTION';\n DirectiveLocation['FIELD'] = 'FIELD';\n DirectiveLocation['FRAGMENT_DEFINITION'] = 'FRAGMENT_DEFINITION';\n DirectiveLocation['FRAGMENT_SPREAD'] = 'FRAGMENT_SPREAD';\n DirectiveLocation['INLINE_FRAGMENT'] = 'INLINE_FRAGMENT';\n DirectiveLocation['VARIABLE_DEFINITION'] = 'VARIABLE_DEFINITION';\n DirectiveLocation['SCHEMA'] = 'SCHEMA';\n DirectiveLocation['SCALAR'] = 'SCALAR';\n DirectiveLocation['OBJECT'] = 'OBJECT';\n DirectiveLocation['FIELD_DEFINITION'] = 'FIELD_DEFINITION';\n DirectiveLocation['ARGUMENT_DEFINITION'] = 'ARGUMENT_DEFINITION';\n DirectiveLocation['INTERFACE'] = 'INTERFACE';\n DirectiveLocation['UNION'] = 'UNION';\n DirectiveLocation['ENUM'] = 'ENUM';\n DirectiveLocation['ENUM_VALUE'] = 'ENUM_VALUE';\n DirectiveLocation['INPUT_OBJECT'] = 'INPUT_OBJECT';\n DirectiveLocation['INPUT_FIELD_DEFINITION'] = 'INPUT_FIELD_DEFINITION';\n})(DirectiveLocation || (DirectiveLocation = {}));\n\n\n/**\n * The enum type representing the directive location values.\n *\n * @deprecated Please use `DirectiveLocation`. Will be remove in v17.\n */\n\n// EXTERNAL MODULE: ./node_modules/graphql/language/kinds.mjs\nvar kinds = __webpack_require__(3298);\n// EXTERNAL MODULE: ./node_modules/graphql/language/blockString.mjs\nvar blockString = __webpack_require__(5995);\n// EXTERNAL MODULE: ./node_modules/graphql/language/characterClasses.mjs\nvar characterClasses = __webpack_require__(9646);\n;// CONCATENATED MODULE: ./node_modules/graphql/language/tokenKind.mjs\n/**\n * An exported enum describing the different kinds of tokens that the\n * lexer emits.\n */\nvar tokenKind_TokenKind;\n\n(function (TokenKind) {\n TokenKind['SOF'] = '<SOF>';\n TokenKind['EOF'] = '<EOF>';\n TokenKind['BANG'] = '!';\n TokenKind['DOLLAR'] = '$';\n TokenKind['AMP'] = '&';\n TokenKind['PAREN_L'] = '(';\n TokenKind['PAREN_R'] = ')';\n TokenKind['SPREAD'] = '...';\n TokenKind['COLON'] = ':';\n TokenKind['EQUALS'] = '=';\n TokenKind['AT'] = '@';\n TokenKind['BRACKET_L'] = '[';\n TokenKind['BRACKET_R'] = ']';\n TokenKind['BRACE_L'] = '{';\n TokenKind['PIPE'] = '|';\n TokenKind['BRACE_R'] = '}';\n TokenKind['NAME'] = 'Name';\n TokenKind['INT'] = 'Int';\n TokenKind['FLOAT'] = 'Float';\n TokenKind['STRING'] = 'String';\n TokenKind['BLOCK_STRING'] = 'BlockString';\n TokenKind['COMMENT'] = 'Comment';\n})(tokenKind_TokenKind || (tokenKind_TokenKind = {}));\n\n\n/**\n * The enum type representing the token kinds values.\n *\n * @deprecated Please use `TokenKind`. Will be remove in v17.\n */\n\n;// CONCATENATED MODULE: ./node_modules/graphql/language/lexer.mjs\n\n\n\n\n\n/**\n * Given a Source object, creates a Lexer for that source.\n * A Lexer is a stateful stream generator in that every time\n * it is advanced, it returns the next token in the Source. Assuming the\n * source lexes, the final Token emitted by the lexer will be of kind\n * EOF, after which the lexer will repeatedly return the same EOF token\n * whenever called.\n */\n\nclass Lexer {\n /**\n * The previously focused non-ignored token.\n */\n\n /**\n * The currently focused non-ignored token.\n */\n\n /**\n * The (1-indexed) line containing the current token.\n */\n\n /**\n * The character offset at which the current line begins.\n */\n constructor(source) {\n const startOfFileToken = new ast/* Token */.ou(tokenKind_TokenKind.SOF, 0, 0, 0, 0);\n this.source = source;\n this.lastToken = startOfFileToken;\n this.token = startOfFileToken;\n this.line = 1;\n this.lineStart = 0;\n }\n\n get [Symbol.toStringTag]() {\n return 'Lexer';\n }\n /**\n * Advances the token stream to the next non-ignored token.\n */\n\n advance() {\n this.lastToken = this.token;\n const token = (this.token = this.lookahead());\n return token;\n }\n /**\n * Looks ahead and returns the next non-ignored token, but does not change\n * the state of Lexer.\n */\n\n lookahead() {\n let token = this.token;\n\n if (token.kind !== tokenKind_TokenKind.EOF) {\n do {\n if (token.next) {\n token = token.next;\n } else {\n // Read the next token and form a link in the token linked-list.\n const nextToken = readNextToken(this, token.end); // @ts-expect-error next is only mutable during parsing.\n\n token.next = nextToken; // @ts-expect-error prev is only mutable during parsing.\n\n nextToken.prev = token;\n token = nextToken;\n }\n } while (token.kind === tokenKind_TokenKind.COMMENT);\n }\n\n return token;\n }\n}\n/**\n * @internal\n */\n\nfunction isPunctuatorTokenKind(kind) {\n return (\n kind === tokenKind_TokenKind.BANG ||\n kind === tokenKind_TokenKind.DOLLAR ||\n kind === tokenKind_TokenKind.AMP ||\n kind === tokenKind_TokenKind.PAREN_L ||\n kind === tokenKind_TokenKind.PAREN_R ||\n kind === tokenKind_TokenKind.SPREAD ||\n kind === tokenKind_TokenKind.COLON ||\n kind === tokenKind_TokenKind.EQUALS ||\n kind === tokenKind_TokenKind.AT ||\n kind === tokenKind_TokenKind.BRACKET_L ||\n kind === tokenKind_TokenKind.BRACKET_R ||\n kind === tokenKind_TokenKind.BRACE_L ||\n kind === tokenKind_TokenKind.PIPE ||\n kind === tokenKind_TokenKind.BRACE_R\n );\n}\n/**\n * A Unicode scalar value is any Unicode code point except surrogate code\n * points. In other words, the inclusive ranges of values 0x0000 to 0xD7FF and\n * 0xE000 to 0x10FFFF.\n *\n * SourceCharacter ::\n * - \"Any Unicode scalar value\"\n */\n\nfunction isUnicodeScalarValue(code) {\n return (\n (code >= 0x0000 && code <= 0xd7ff) || (code >= 0xe000 && code <= 0x10ffff)\n );\n}\n/**\n * The GraphQL specification defines source text as a sequence of unicode scalar\n * values (which Unicode defines to exclude surrogate code points). However\n * JavaScript defines strings as a sequence of UTF-16 code units which may\n * include surrogates. A surrogate pair is a valid source character as it\n * encodes a supplementary code point (above U+FFFF), but unpaired surrogate\n * code points are not valid source characters.\n */\n\nfunction isSupplementaryCodePoint(body, location) {\n return (\n isLeadingSurrogate(body.charCodeAt(location)) &&\n isTrailingSurrogate(body.charCodeAt(location + 1))\n );\n}\n\nfunction isLeadingSurrogate(code) {\n return code >= 0xd800 && code <= 0xdbff;\n}\n\nfunction isTrailingSurrogate(code) {\n return code >= 0xdc00 && code <= 0xdfff;\n}\n/**\n * Prints the code point (or end of file reference) at a given location in a\n * source for use in error messages.\n *\n * Printable ASCII is printed quoted, while other points are printed in Unicode\n * code point form (ie. U+1234).\n */\n\nfunction printCodePointAt(lexer, location) {\n const code = lexer.source.body.codePointAt(location);\n\n if (code === undefined) {\n return tokenKind_TokenKind.EOF;\n } else if (code >= 0x0020 && code <= 0x007e) {\n // Printable ASCII\n const char = String.fromCodePoint(code);\n return char === '\"' ? \"'\\\"'\" : `\"${char}\"`;\n } // Unicode code point\n\n return 'U+' + code.toString(16).toUpperCase().padStart(4, '0');\n}\n/**\n * Create a token with line and column location information.\n */\n\nfunction createToken(lexer, kind, start, end, value) {\n const line = lexer.line;\n const col = 1 + start - lexer.lineStart;\n return new ast/* Token */.ou(kind, start, end, line, col, value);\n}\n/**\n * Gets the next token from the source starting at the given position.\n *\n * This skips over whitespace until it finds the next lexable token, then lexes\n * punctuators immediately or calls the appropriate helper function for more\n * complicated tokens.\n */\n\nfunction readNextToken(lexer, start) {\n const body = lexer.source.body;\n const bodyLength = body.length;\n let position = start;\n\n while (position < bodyLength) {\n const code = body.charCodeAt(position); // SourceCharacter\n\n switch (code) {\n // Ignored ::\n // - UnicodeBOM\n // - WhiteSpace\n // - LineTerminator\n // - Comment\n // - Comma\n //\n // UnicodeBOM :: \"Byte Order Mark (U+FEFF)\"\n //\n // WhiteSpace ::\n // - \"Horizontal Tab (U+0009)\"\n // - \"Space (U+0020)\"\n //\n // Comma :: ,\n case 0xfeff: // <BOM>\n\n case 0x0009: // \\t\n\n case 0x0020: // <space>\n\n case 0x002c:\n // ,\n ++position;\n continue;\n // LineTerminator ::\n // - \"New Line (U+000A)\"\n // - \"Carriage Return (U+000D)\" [lookahead != \"New Line (U+000A)\"]\n // - \"Carriage Return (U+000D)\" \"New Line (U+000A)\"\n\n case 0x000a:\n // \\n\n ++position;\n ++lexer.line;\n lexer.lineStart = position;\n continue;\n\n case 0x000d:\n // \\r\n if (body.charCodeAt(position + 1) === 0x000a) {\n position += 2;\n } else {\n ++position;\n }\n\n ++lexer.line;\n lexer.lineStart = position;\n continue;\n // Comment\n\n case 0x0023:\n // #\n return readComment(lexer, position);\n // Token ::\n // - Punctuator\n // - Name\n // - IntValue\n // - FloatValue\n // - StringValue\n //\n // Punctuator :: one of ! $ & ( ) ... : = @ [ ] { | }\n\n case 0x0021:\n // !\n return createToken(lexer, tokenKind_TokenKind.BANG, position, position + 1);\n\n case 0x0024:\n // $\n return createToken(lexer, tokenKind_TokenKind.DOLLAR, position, position + 1);\n\n case 0x0026:\n // &\n return createToken(lexer, tokenKind_TokenKind.AMP, position, position + 1);\n\n case 0x0028:\n // (\n return createToken(lexer, tokenKind_TokenKind.PAREN_L, position, position + 1);\n\n case 0x0029:\n // )\n return createToken(lexer, tokenKind_TokenKind.PAREN_R, position, position + 1);\n\n case 0x002e:\n // .\n if (\n body.charCodeAt(position + 1) === 0x002e &&\n body.charCodeAt(position + 2) === 0x002e\n ) {\n return createToken(lexer, tokenKind_TokenKind.SPREAD, position, position + 3);\n }\n\n break;\n\n case 0x003a:\n // :\n return createToken(lexer, tokenKind_TokenKind.COLON, position, position + 1);\n\n case 0x003d:\n // =\n return createToken(lexer, tokenKind_TokenKind.EQUALS, position, position + 1);\n\n case 0x0040:\n // @\n return createToken(lexer, tokenKind_TokenKind.AT, position, position + 1);\n\n case 0x005b:\n // [\n return createToken(lexer, tokenKind_TokenKind.BRACKET_L, position, position + 1);\n\n case 0x005d:\n // ]\n return createToken(lexer, tokenKind_TokenKind.BRACKET_R, position, position + 1);\n\n case 0x007b:\n // {\n return createToken(lexer, tokenKind_TokenKind.BRACE_L, position, position + 1);\n\n case 0x007c:\n // |\n return createToken(lexer, tokenKind_TokenKind.PIPE, position, position + 1);\n\n case 0x007d:\n // }\n return createToken(lexer, tokenKind_TokenKind.BRACE_R, position, position + 1);\n // StringValue\n\n case 0x0022:\n // \"\n if (\n body.charCodeAt(position + 1) === 0x0022 &&\n body.charCodeAt(position + 2) === 0x0022\n ) {\n return readBlockString(lexer, position);\n }\n\n return readString(lexer, position);\n } // IntValue | FloatValue (Digit | -)\n\n if ((0,characterClasses/* isDigit */.yp)(code) || code === 0x002d) {\n return readNumber(lexer, position, code);\n } // Name\n\n if ((0,characterClasses/* isNameStart */.un)(code)) {\n return readName(lexer, position);\n }\n\n throw syntaxError(\n lexer.source,\n position,\n code === 0x0027\n ? 'Unexpected single quote character (\\'), did you mean to use a double quote (\")?'\n : isUnicodeScalarValue(code) || isSupplementaryCodePoint(body, position)\n ? `Unexpected character: ${printCodePointAt(lexer, position)}.`\n : `Invalid character: ${printCodePointAt(lexer, position)}.`,\n );\n }\n\n return createToken(lexer, tokenKind_TokenKind.EOF, bodyLength, bodyLength);\n}\n/**\n * Reads a comment token from the source file.\n *\n * ```\n * Comment :: # CommentChar* [lookahead != CommentChar]\n *\n * CommentChar :: SourceCharacter but not LineTerminator\n * ```\n */\n\nfunction readComment(lexer, start) {\n const body = lexer.source.body;\n const bodyLength = body.length;\n let position = start + 1;\n\n while (position < bodyLength) {\n const code = body.charCodeAt(position); // LineTerminator (\\n | \\r)\n\n if (code === 0x000a || code === 0x000d) {\n break;\n } // SourceCharacter\n\n if (isUnicodeScalarValue(code)) {\n ++position;\n } else if (isSupplementaryCodePoint(body, position)) {\n position += 2;\n } else {\n break;\n }\n }\n\n return createToken(\n lexer,\n tokenKind_TokenKind.COMMENT,\n start,\n position,\n body.slice(start + 1, position),\n );\n}\n/**\n * Reads a number token from the source file, either a FloatValue or an IntValue\n * depending on whether a FractionalPart or ExponentPart is encountered.\n *\n * ```\n * IntValue :: IntegerPart [lookahead != {Digit, `.`, NameStart}]\n *\n * IntegerPart ::\n * - NegativeSign? 0\n * - NegativeSign? NonZeroDigit Digit*\n *\n * NegativeSign :: -\n *\n * NonZeroDigit :: Digit but not `0`\n *\n * FloatValue ::\n * - IntegerPart FractionalPart ExponentPart [lookahead != {Digit, `.`, NameStart}]\n * - IntegerPart FractionalPart [lookahead != {Digit, `.`, NameStart}]\n * - IntegerPart ExponentPart [lookahead != {Digit, `.`, NameStart}]\n *\n * FractionalPart :: . Digit+\n *\n * ExponentPart :: ExponentIndicator Sign? Digit+\n *\n * ExponentIndicator :: one of `e` `E`\n *\n * Sign :: one of + -\n * ```\n */\n\nfunction readNumber(lexer, start, firstCode) {\n const body = lexer.source.body;\n let position = start;\n let code = firstCode;\n let isFloat = false; // NegativeSign (-)\n\n if (code === 0x002d) {\n code = body.charCodeAt(++position);\n } // Zero (0)\n\n if (code === 0x0030) {\n code = body.charCodeAt(++position);\n\n if ((0,characterClasses/* isDigit */.yp)(code)) {\n throw syntaxError(\n lexer.source,\n position,\n `Invalid number, unexpected digit after 0: ${printCodePointAt(\n lexer,\n position,\n )}.`,\n );\n }\n } else {\n position = readDigits(lexer, position, code);\n code = body.charCodeAt(position);\n } // Full stop (.)\n\n if (code === 0x002e) {\n isFloat = true;\n code = body.charCodeAt(++position);\n position = readDigits(lexer, position, code);\n code = body.charCodeAt(position);\n } // E e\n\n if (code === 0x0045 || code === 0x0065) {\n isFloat = true;\n code = body.charCodeAt(++position); // + -\n\n if (code === 0x002b || code === 0x002d) {\n code = body.charCodeAt(++position);\n }\n\n position = readDigits(lexer, position, code);\n code = body.charCodeAt(position);\n } // Numbers cannot be followed by . or NameStart\n\n if (code === 0x002e || (0,characterClasses/* isNameStart */.un)(code)) {\n throw syntaxError(\n lexer.source,\n position,\n `Invalid number, expected digit but got: ${printCodePointAt(\n lexer,\n position,\n )}.`,\n );\n }\n\n return createToken(\n lexer,\n isFloat ? tokenKind_TokenKind.FLOAT : tokenKind_TokenKind.INT,\n start,\n position,\n body.slice(start, position),\n );\n}\n/**\n * Returns the new position in the source after reading one or more digits.\n */\n\nfunction readDigits(lexer, start, firstCode) {\n if (!(0,characterClasses/* isDigit */.yp)(firstCode)) {\n throw syntaxError(\n lexer.source,\n start,\n `Invalid number, expected digit but got: ${printCodePointAt(\n lexer,\n start,\n )}.`,\n );\n }\n\n const body = lexer.source.body;\n let position = start + 1; // +1 to skip first firstCode\n\n while ((0,characterClasses/* isDigit */.yp)(body.charCodeAt(position))) {\n ++position;\n }\n\n return position;\n}\n/**\n * Reads a single-quote string token from the source file.\n *\n * ```\n * StringValue ::\n * - `\"\"` [lookahead != `\"`]\n * - `\"` StringCharacter+ `\"`\n *\n * StringCharacter ::\n * - SourceCharacter but not `\"` or `\\` or LineTerminator\n * - `\\u` EscapedUnicode\n * - `\\` EscapedCharacter\n *\n * EscapedUnicode ::\n * - `{` HexDigit+ `}`\n * - HexDigit HexDigit HexDigit HexDigit\n *\n * EscapedCharacter :: one of `\"` `\\` `/` `b` `f` `n` `r` `t`\n * ```\n */\n\nfunction readString(lexer, start) {\n const body = lexer.source.body;\n const bodyLength = body.length;\n let position = start + 1;\n let chunkStart = position;\n let value = '';\n\n while (position < bodyLength) {\n const code = body.charCodeAt(position); // Closing Quote (\")\n\n if (code === 0x0022) {\n value += body.slice(chunkStart, position);\n return createToken(lexer, tokenKind_TokenKind.STRING, start, position + 1, value);\n } // Escape Sequence (\\)\n\n if (code === 0x005c) {\n value += body.slice(chunkStart, position);\n const escape =\n body.charCodeAt(position + 1) === 0x0075 // u\n ? body.charCodeAt(position + 2) === 0x007b // {\n ? readEscapedUnicodeVariableWidth(lexer, position)\n : readEscapedUnicodeFixedWidth(lexer, position)\n : readEscapedCharacter(lexer, position);\n value += escape.value;\n position += escape.size;\n chunkStart = position;\n continue;\n } // LineTerminator (\\n | \\r)\n\n if (code === 0x000a || code === 0x000d) {\n break;\n } // SourceCharacter\n\n if (isUnicodeScalarValue(code)) {\n ++position;\n } else if (isSupplementaryCodePoint(body, position)) {\n position += 2;\n } else {\n throw syntaxError(\n lexer.source,\n position,\n `Invalid character within String: ${printCodePointAt(\n lexer,\n position,\n )}.`,\n );\n }\n }\n\n throw syntaxError(lexer.source, position, 'Unterminated string.');\n} // The string value and lexed size of an escape sequence.\n\nfunction readEscapedUnicodeVariableWidth(lexer, position) {\n const body = lexer.source.body;\n let point = 0;\n let size = 3; // Cannot be larger than 12 chars (\\u{00000000}).\n\n while (size < 12) {\n const code = body.charCodeAt(position + size++); // Closing Brace (})\n\n if (code === 0x007d) {\n // Must be at least 5 chars (\\u{0}) and encode a Unicode scalar value.\n if (size < 5 || !isUnicodeScalarValue(point)) {\n break;\n }\n\n return {\n value: String.fromCodePoint(point),\n size,\n };\n } // Append this hex digit to the code point.\n\n point = (point << 4) | readHexDigit(code);\n\n if (point < 0) {\n break;\n }\n }\n\n throw syntaxError(\n lexer.source,\n position,\n `Invalid Unicode escape sequence: \"${body.slice(\n position,\n position + size,\n )}\".`,\n );\n}\n\nfunction readEscapedUnicodeFixedWidth(lexer, position) {\n const body = lexer.source.body;\n const code = read16BitHexCode(body, position + 2);\n\n if (isUnicodeScalarValue(code)) {\n return {\n value: String.fromCodePoint(code),\n size: 6,\n };\n } // GraphQL allows JSON-style surrogate pair escape sequences, but only when\n // a valid pair is formed.\n\n if (isLeadingSurrogate(code)) {\n // \\u\n if (\n body.charCodeAt(position + 6) === 0x005c &&\n body.charCodeAt(position + 7) === 0x0075\n ) {\n const trailingCode = read16BitHexCode(body, position + 8);\n\n if (isTrailingSurrogate(trailingCode)) {\n // JavaScript defines strings as a sequence of UTF-16 code units and\n // encodes Unicode code points above U+FFFF using a surrogate pair of\n // code units. Since this is a surrogate pair escape sequence, just\n // include both codes into the JavaScript string value. Had JavaScript\n // not been internally based on UTF-16, then this surrogate pair would\n // be decoded to retrieve the supplementary code point.\n return {\n value: String.fromCodePoint(code, trailingCode),\n size: 12,\n };\n }\n }\n }\n\n throw syntaxError(\n lexer.source,\n position,\n `Invalid Unicode escape sequence: \"${body.slice(position, position + 6)}\".`,\n );\n}\n/**\n * Reads four hexadecimal characters and returns the positive integer that 16bit\n * hexadecimal string represents. For example, \"000f\" will return 15, and \"dead\"\n * will return 57005.\n *\n * Returns a negative number if any char was not a valid hexadecimal digit.\n */\n\nfunction read16BitHexCode(body, position) {\n // readHexDigit() returns -1 on error. ORing a negative value with any other\n // value always produces a negative value.\n return (\n (readHexDigit(body.charCodeAt(position)) << 12) |\n (readHexDigit(body.charCodeAt(position + 1)) << 8) |\n (readHexDigit(body.charCodeAt(position + 2)) << 4) |\n readHexDigit(body.charCodeAt(position + 3))\n );\n}\n/**\n * Reads a hexadecimal character and returns its positive integer value (0-15).\n *\n * '0' becomes 0, '9' becomes 9\n * 'A' becomes 10, 'F' becomes 15\n * 'a' becomes 10, 'f' becomes 15\n *\n * Returns -1 if the provided character code was not a valid hexadecimal digit.\n *\n * HexDigit :: one of\n * - `0` `1` `2` `3` `4` `5` `6` `7` `8` `9`\n * - `A` `B` `C` `D` `E` `F`\n * - `a` `b` `c` `d` `e` `f`\n */\n\nfunction readHexDigit(code) {\n return code >= 0x0030 && code <= 0x0039 // 0-9\n ? code - 0x0030\n : code >= 0x0041 && code <= 0x0046 // A-F\n ? code - 0x0037\n : code >= 0x0061 && code <= 0x0066 // a-f\n ? code - 0x0057\n : -1;\n}\n/**\n * | Escaped Character | Code Point | Character Name |\n * | ----------------- | ---------- | ---------------------------- |\n * | `\"` | U+0022 | double quote |\n * | `\\` | U+005C | reverse solidus (back slash) |\n * | `/` | U+002F | solidus (forward slash) |\n * | `b` | U+0008 | backspace |\n * | `f` | U+000C | form feed |\n * | `n` | U+000A | line feed (new line) |\n * | `r` | U+000D | carriage return |\n * | `t` | U+0009 | horizontal tab |\n */\n\nfunction readEscapedCharacter(lexer, position) {\n const body = lexer.source.body;\n const code = body.charCodeAt(position + 1);\n\n switch (code) {\n case 0x0022:\n // \"\n return {\n value: '\\u0022',\n size: 2,\n };\n\n case 0x005c:\n // \\\n return {\n value: '\\u005c',\n size: 2,\n };\n\n case 0x002f:\n // /\n return {\n value: '\\u002f',\n size: 2,\n };\n\n case 0x0062:\n // b\n return {\n value: '\\u0008',\n size: 2,\n };\n\n case 0x0066:\n // f\n return {\n value: '\\u000c',\n size: 2,\n };\n\n case 0x006e:\n // n\n return {\n value: '\\u000a',\n size: 2,\n };\n\n case 0x0072:\n // r\n return {\n value: '\\u000d',\n size: 2,\n };\n\n case 0x0074:\n // t\n return {\n value: '\\u0009',\n size: 2,\n };\n }\n\n throw syntaxError(\n lexer.source,\n position,\n `Invalid character escape sequence: \"${body.slice(\n position,\n position + 2,\n )}\".`,\n );\n}\n/**\n * Reads a block string token from the source file.\n *\n * ```\n * StringValue ::\n * - `\"\"\"` BlockStringCharacter* `\"\"\"`\n *\n * BlockStringCharacter ::\n * - SourceCharacter but not `\"\"\"` or `\\\"\"\"`\n * - `\\\"\"\"`\n * ```\n */\n\nfunction readBlockString(lexer, start) {\n const body = lexer.source.body;\n const bodyLength = body.length;\n let lineStart = lexer.lineStart;\n let position = start + 3;\n let chunkStart = position;\n let currentLine = '';\n const blockLines = [];\n\n while (position < bodyLength) {\n const code = body.charCodeAt(position); // Closing Triple-Quote (\"\"\")\n\n if (\n code === 0x0022 &&\n body.charCodeAt(position + 1) === 0x0022 &&\n body.charCodeAt(position + 2) === 0x0022\n ) {\n currentLine += body.slice(chunkStart, position);\n blockLines.push(currentLine);\n const token = createToken(\n lexer,\n tokenKind_TokenKind.BLOCK_STRING,\n start,\n position + 3, // Return a string of the lines joined with U+000A.\n (0,blockString/* dedentBlockStringLines */.OC)(blockLines).join('\\n'),\n );\n lexer.line += blockLines.length - 1;\n lexer.lineStart = lineStart;\n return token;\n } // Escaped Triple-Quote (\\\"\"\")\n\n if (\n code === 0x005c &&\n body.charCodeAt(position + 1) === 0x0022 &&\n body.charCodeAt(position + 2) === 0x0022 &&\n body.charCodeAt(position + 3) === 0x0022\n ) {\n currentLine += body.slice(chunkStart, position);\n chunkStart = position + 1; // skip only slash\n\n position += 4;\n continue;\n } // LineTerminator\n\n if (code === 0x000a || code === 0x000d) {\n currentLine += body.slice(chunkStart, position);\n blockLines.push(currentLine);\n\n if (code === 0x000d && body.charCodeAt(position + 1) === 0x000a) {\n position += 2;\n } else {\n ++position;\n }\n\n currentLine = '';\n chunkStart = position;\n lineStart = position;\n continue;\n } // SourceCharacter\n\n if (isUnicodeScalarValue(code)) {\n ++position;\n } else if (isSupplementaryCodePoint(body, position)) {\n position += 2;\n } else {\n throw syntaxError(\n lexer.source,\n position,\n `Invalid character within String: ${printCodePointAt(\n lexer,\n position,\n )}.`,\n );\n }\n }\n\n throw syntaxError(lexer.source, position, 'Unterminated string.');\n}\n/**\n * Reads an alphanumeric + underscore name from the source.\n *\n * ```\n * Name ::\n * - NameStart NameContinue* [lookahead != NameContinue]\n * ```\n */\n\nfunction readName(lexer, start) {\n const body = lexer.source.body;\n const bodyLength = body.length;\n let position = start + 1;\n\n while (position < bodyLength) {\n const code = body.charCodeAt(position);\n\n if ((0,characterClasses/* isNameContinue */.xr)(code)) {\n ++position;\n } else {\n break;\n }\n }\n\n return createToken(\n lexer,\n tokenKind_TokenKind.NAME,\n start,\n position,\n body.slice(start, position),\n );\n}\n\n// EXTERNAL MODULE: ./node_modules/graphql/jsutils/devAssert.mjs\nvar devAssert = __webpack_require__(6286);\n// EXTERNAL MODULE: ./node_modules/graphql/jsutils/inspect.mjs\nvar inspect = __webpack_require__(129);\n;// CONCATENATED MODULE: ./node_modules/graphql/jsutils/instanceOf.mjs\n\n/* c8 ignore next 3 */\n\nconst isProduction =\n globalThis.process && // eslint-disable-next-line no-undef\n \"test\" === 'production';\n/**\n * A replacement for instanceof which includes an error warning when multi-realm\n * constructors are detected.\n * See: https://expressjs.com/en/advanced/best-practice-performance.html#set-node_env-to-production\n * See: https://webpack.js.org/guides/production/\n */\n\nconst instanceOf =\n /* c8 ignore next 6 */\n // FIXME: https://github.com/graphql/graphql-js/issues/2317\n isProduction\n ? function instanceOf(value, constructor) {\n return value instanceof constructor;\n }\n : function instanceOf(value, constructor) {\n if (value instanceof constructor) {\n return true;\n }\n\n if (typeof value === 'object' && value !== null) {\n var _value$constructor;\n\n // Prefer Symbol.toStringTag since it is immune to minification.\n const className = constructor.prototype[Symbol.toStringTag];\n const valueClassName = // We still need to support constructor's name to detect conflicts with older versions of this library.\n Symbol.toStringTag in value // @ts-expect-error TS bug see, https://github.com/microsoft/TypeScript/issues/38009\n ? value[Symbol.toStringTag]\n : (_value$constructor = value.constructor) === null ||\n _value$constructor === void 0\n ? void 0\n : _value$constructor.name;\n\n if (className === valueClassName) {\n const stringifiedValue = (0,inspect/* inspect */.N)(value);\n throw new Error(`Cannot use ${className} \"${stringifiedValue}\" from another module or realm.\n\nEnsure that there is only one instance of \"graphql\" in the node_modules\ndirectory. If different versions of \"graphql\" are the dependencies of other\nrelied on modules, use \"resolutions\" to ensure only one version is installed.\n\nhttps://yarnpkg.com/en/docs/selective-version-resolutions\n\nDuplicate \"graphql\" modules cannot be used at the same time since different\nversions may have different capabilities and behavior. The data from one\nversion used in the function from another could produce confusing and\nspurious results.`);\n }\n }\n\n return false;\n };\n\n;// CONCATENATED MODULE: ./node_modules/graphql/language/source.mjs\n\n\n\n\n/**\n * A representation of source input to GraphQL. The `name` and `locationOffset` parameters are\n * optional, but they are useful for clients who store GraphQL documents in source files.\n * For example, if the GraphQL input starts at line 40 in a file named `Foo.graphql`, it might\n * be useful for `name` to be `\"Foo.graphql\"` and location to be `{ line: 40, column: 1 }`.\n * The `line` and `column` properties in `locationOffset` are 1-indexed.\n */\nclass Source {\n constructor(\n body,\n name = 'GraphQL request',\n locationOffset = {\n line: 1,\n column: 1,\n },\n ) {\n typeof body === 'string' ||\n (0,devAssert/* devAssert */.U)(false, `Body must be a string. Received: ${(0,inspect/* inspect */.N)(body)}.`);\n this.body = body;\n this.name = name;\n this.locationOffset = locationOffset;\n this.locationOffset.line > 0 ||\n (0,devAssert/* devAssert */.U)(\n false,\n 'line in locationOffset is 1-indexed and must be positive.',\n );\n this.locationOffset.column > 0 ||\n (0,devAssert/* devAssert */.U)(\n false,\n 'column in locationOffset is 1-indexed and must be positive.',\n );\n }\n\n get [Symbol.toStringTag]() {\n return 'Source';\n }\n}\n/**\n * Test if the given value is a Source object.\n *\n * @internal\n */\n\nfunction isSource(source) {\n return instanceOf(source, Source);\n}\n\n;// CONCATENATED MODULE: ./node_modules/graphql/language/parser.mjs\n\n\n\n\n\n\n\n/**\n * Configuration options to control parser behavior\n */\n\n/**\n * Given a GraphQL source, parses it into a Document.\n * Throws GraphQLError if a syntax error is encountered.\n */\nfunction parse(source, options) {\n const parser = new Parser(source, options);\n return parser.parseDocument();\n}\n/**\n * Given a string containing a GraphQL value (ex. `[42]`), parse the AST for\n * that value.\n * Throws GraphQLError if a syntax error is encountered.\n *\n * This is useful within tools that operate upon GraphQL Values directly and\n * in isolation of complete GraphQL documents.\n *\n * Consider providing the results to the utility function: valueFromAST().\n */\n\nfunction parseValue(source, options) {\n const parser = new Parser(source, options);\n parser.expectToken(TokenKind.SOF);\n const value = parser.parseValueLiteral(false);\n parser.expectToken(TokenKind.EOF);\n return value;\n}\n/**\n * Similar to parseValue(), but raises a parse error if it encounters a\n * variable. The return type will be a constant value.\n */\n\nfunction parseConstValue(source, options) {\n const parser = new Parser(source, options);\n parser.expectToken(TokenKind.SOF);\n const value = parser.parseConstValueLiteral();\n parser.expectToken(TokenKind.EOF);\n return value;\n}\n/**\n * Given a string containing a GraphQL Type (ex. `[Int!]`), parse the AST for\n * that type.\n * Throws GraphQLError if a syntax error is encountered.\n *\n * This is useful within tools that operate upon GraphQL Types directly and\n * in isolation of complete GraphQL documents.\n *\n * Consider providing the results to the utility function: typeFromAST().\n */\n\nfunction parseType(source, options) {\n const parser = new Parser(source, options);\n parser.expectToken(TokenKind.SOF);\n const type = parser.parseTypeReference();\n parser.expectToken(TokenKind.EOF);\n return type;\n}\n/**\n * This class is exported only to assist people in implementing their own parsers\n * without duplicating too much code and should be used only as last resort for cases\n * such as experimental syntax or if certain features could not be contributed upstream.\n *\n * It is still part of the internal API and is versioned, so any changes to it are never\n * considered breaking changes. If you still need to support multiple versions of the\n * library, please use the `versionInfo` variable for version detection.\n *\n * @internal\n */\n\nclass Parser {\n constructor(source, options = {}) {\n const sourceObj = isSource(source) ? source : new Source(source);\n this._lexer = new Lexer(sourceObj);\n this._options = options;\n this._tokenCounter = 0;\n }\n /**\n * Converts a name lex token into a name parse node.\n */\n\n parseName() {\n const token = this.expectToken(tokenKind_TokenKind.NAME);\n return this.node(token, {\n kind: kinds/* Kind */.b.NAME,\n value: token.value,\n });\n } // Implements the parsing rules in the Document section.\n\n /**\n * Document : Definition+\n */\n\n parseDocument() {\n return this.node(this._lexer.token, {\n kind: kinds/* Kind */.b.DOCUMENT,\n definitions: this.many(\n tokenKind_TokenKind.SOF,\n this.parseDefinition,\n tokenKind_TokenKind.EOF,\n ),\n });\n }\n /**\n * Definition :\n * - ExecutableDefinition\n * - TypeSystemDefinition\n * - TypeSystemExtension\n *\n * ExecutableDefinition :\n * - OperationDefinition\n * - FragmentDefinition\n *\n * TypeSystemDefinition :\n * - SchemaDefinition\n * - TypeDefinition\n * - DirectiveDefinition\n *\n * TypeDefinition :\n * - ScalarTypeDefinition\n * - ObjectTypeDefinition\n * - InterfaceTypeDefinition\n * - UnionTypeDefinition\n * - EnumTypeDefinition\n * - InputObjectTypeDefinition\n */\n\n parseDefinition() {\n if (this.peek(tokenKind_TokenKind.BRACE_L)) {\n return this.parseOperationDefinition();\n } // Many definitions begin with a description and require a lookahead.\n\n const hasDescription = this.peekDescription();\n const keywordToken = hasDescription\n ? this._lexer.lookahead()\n : this._lexer.token;\n\n if (keywordToken.kind === tokenKind_TokenKind.NAME) {\n switch (keywordToken.value) {\n case 'schema':\n return this.parseSchemaDefinition();\n\n case 'scalar':\n return this.parseScalarTypeDefinition();\n\n case 'type':\n return this.parseObjectTypeDefinition();\n\n case 'interface':\n return this.parseInterfaceTypeDefinition();\n\n case 'union':\n return this.parseUnionTypeDefinition();\n\n case 'enum':\n return this.parseEnumTypeDefinition();\n\n case 'input':\n return this.parseInputObjectTypeDefinition();\n\n case 'directive':\n return this.parseDirectiveDefinition();\n }\n\n if (hasDescription) {\n throw syntaxError(\n this._lexer.source,\n this._lexer.token.start,\n 'Unexpected description, descriptions are supported only on type definitions.',\n );\n }\n\n switch (keywordToken.value) {\n case 'query':\n case 'mutation':\n case 'subscription':\n return this.parseOperationDefinition();\n\n case 'fragment':\n return this.parseFragmentDefinition();\n\n case 'extend':\n return this.parseTypeSystemExtension();\n }\n }\n\n throw this.unexpected(keywordToken);\n } // Implements the parsing rules in the Operations section.\n\n /**\n * OperationDefinition :\n * - SelectionSet\n * - OperationType Name? VariableDefinitions? Directives? SelectionSet\n */\n\n parseOperationDefinition() {\n const start = this._lexer.token;\n\n if (this.peek(tokenKind_TokenKind.BRACE_L)) {\n return this.node(start, {\n kind: kinds/* Kind */.b.OPERATION_DEFINITION,\n operation: ast/* OperationTypeNode */.cE.QUERY,\n name: undefined,\n variableDefinitions: [],\n directives: [],\n selectionSet: this.parseSelectionSet(),\n });\n }\n\n const operation = this.parseOperationType();\n let name;\n\n if (this.peek(tokenKind_TokenKind.NAME)) {\n name = this.parseName();\n }\n\n return this.node(start, {\n kind: kinds/* Kind */.b.OPERATION_DEFINITION,\n operation,\n name,\n variableDefinitions: this.parseVariableDefinitions(),\n directives: this.parseDirectives(false),\n selectionSet: this.parseSelectionSet(),\n });\n }\n /**\n * OperationType : one of query mutation subscription\n */\n\n parseOperationType() {\n const operationToken = this.expectToken(tokenKind_TokenKind.NAME);\n\n switch (operationToken.value) {\n case 'query':\n return ast/* OperationTypeNode */.cE.QUERY;\n\n case 'mutation':\n return ast/* OperationTypeNode */.cE.MUTATION;\n\n case 'subscription':\n return ast/* OperationTypeNode */.cE.SUBSCRIPTION;\n }\n\n throw this.unexpected(operationToken);\n }\n /**\n * VariableDefinitions : ( VariableDefinition+ )\n */\n\n parseVariableDefinitions() {\n return this.optionalMany(\n tokenKind_TokenKind.PAREN_L,\n this.parseVariableDefinition,\n tokenKind_TokenKind.PAREN_R,\n );\n }\n /**\n * VariableDefinition : Variable : Type DefaultValue? Directives[Const]?\n */\n\n parseVariableDefinition() {\n return this.node(this._lexer.token, {\n kind: kinds/* Kind */.b.VARIABLE_DEFINITION,\n variable: this.parseVariable(),\n type: (this.expectToken(tokenKind_TokenKind.COLON), this.parseTypeReference()),\n defaultValue: this.expectOptionalToken(tokenKind_TokenKind.EQUALS)\n ? this.parseConstValueLiteral()\n : undefined,\n directives: this.parseConstDirectives(),\n });\n }\n /**\n * Variable : $ Name\n */\n\n parseVariable() {\n const start = this._lexer.token;\n this.expectToken(tokenKind_TokenKind.DOLLAR);\n return this.node(start, {\n kind: kinds/* Kind */.b.VARIABLE,\n name: this.parseName(),\n });\n }\n /**\n * ```\n * SelectionSet : { Selection+ }\n * ```\n */\n\n parseSelectionSet() {\n return this.node(this._lexer.token, {\n kind: kinds/* Kind */.b.SELECTION_SET,\n selections: this.many(\n tokenKind_TokenKind.BRACE_L,\n this.parseSelection,\n tokenKind_TokenKind.BRACE_R,\n ),\n });\n }\n /**\n * Selection :\n * - Field\n * - FragmentSpread\n * - InlineFragment\n */\n\n parseSelection() {\n return this.peek(tokenKind_TokenKind.SPREAD)\n ? this.parseFragment()\n : this.parseField();\n }\n /**\n * Field : Alias? Name Arguments? Directives? SelectionSet?\n *\n * Alias : Name :\n */\n\n parseField() {\n const start = this._lexer.token;\n const nameOrAlias = this.parseName();\n let alias;\n let name;\n\n if (this.expectOptionalToken(tokenKind_TokenKind.COLON)) {\n alias = nameOrAlias;\n name = this.parseName();\n } else {\n name = nameOrAlias;\n }\n\n return this.node(start, {\n kind: kinds/* Kind */.b.FIELD,\n alias,\n name,\n arguments: this.parseArguments(false),\n directives: this.parseDirectives(false),\n selectionSet: this.peek(tokenKind_TokenKind.BRACE_L)\n ? this.parseSelectionSet()\n : undefined,\n });\n }\n /**\n * Arguments[Const] : ( Argument[?Const]+ )\n */\n\n parseArguments(isConst) {\n const item = isConst ? this.parseConstArgument : this.parseArgument;\n return this.optionalMany(tokenKind_TokenKind.PAREN_L, item, tokenKind_TokenKind.PAREN_R);\n }\n /**\n * Argument[Const] : Name : Value[?Const]\n */\n\n parseArgument(isConst = false) {\n const start = this._lexer.token;\n const name = this.parseName();\n this.expectToken(tokenKind_TokenKind.COLON);\n return this.node(start, {\n kind: kinds/* Kind */.b.ARGUMENT,\n name,\n value: this.parseValueLiteral(isConst),\n });\n }\n\n parseConstArgument() {\n return this.parseArgument(true);\n } // Implements the parsing rules in the Fragments section.\n\n /**\n * Corresponds to both FragmentSpread and InlineFragment in the spec.\n *\n * FragmentSpread : ... FragmentName Directives?\n *\n * InlineFragment : ... TypeCondition? Directives? SelectionSet\n */\n\n parseFragment() {\n const start = this._lexer.token;\n this.expectToken(tokenKind_TokenKind.SPREAD);\n const hasTypeCondition = this.expectOptionalKeyword('on');\n\n if (!hasTypeCondition && this.peek(tokenKind_TokenKind.NAME)) {\n return this.node(start, {\n kind: kinds/* Kind */.b.FRAGMENT_SPREAD,\n name: this.parseFragmentName(),\n directives: this.parseDirectives(false),\n });\n }\n\n return this.node(start, {\n kind: kinds/* Kind */.b.INLINE_FRAGMENT,\n typeCondition: hasTypeCondition ? this.parseNamedType() : undefined,\n directives: this.parseDirectives(false),\n selectionSet: this.parseSelectionSet(),\n });\n }\n /**\n * FragmentDefinition :\n * - fragment FragmentName on TypeCondition Directives? SelectionSet\n *\n * TypeCondition : NamedType\n */\n\n parseFragmentDefinition() {\n const start = this._lexer.token;\n this.expectKeyword('fragment'); // Legacy support for defining variables within fragments changes\n // the grammar of FragmentDefinition:\n // - fragment FragmentName VariableDefinitions? on TypeCondition Directives? SelectionSet\n\n if (this._options.allowLegacyFragmentVariables === true) {\n return this.node(start, {\n kind: kinds/* Kind */.b.FRAGMENT_DEFINITION,\n name: this.parseFragmentName(),\n variableDefinitions: this.parseVariableDefinitions(),\n typeCondition: (this.expectKeyword('on'), this.parseNamedType()),\n directives: this.parseDirectives(false),\n selectionSet: this.parseSelectionSet(),\n });\n }\n\n return this.node(start, {\n kind: kinds/* Kind */.b.FRAGMENT_DEFINITION,\n name: this.parseFragmentName(),\n typeCondition: (this.expectKeyword('on'), this.parseNamedType()),\n directives: this.parseDirectives(false),\n selectionSet: this.parseSelectionSet(),\n });\n }\n /**\n * FragmentName : Name but not `on`\n */\n\n parseFragmentName() {\n if (this._lexer.token.value === 'on') {\n throw this.unexpected();\n }\n\n return this.parseName();\n } // Implements the parsing rules in the Values section.\n\n /**\n * Value[Const] :\n * - [~Const] Variable\n * - IntValue\n * - FloatValue\n * - StringValue\n * - BooleanValue\n * - NullValue\n * - EnumValue\n * - ListValue[?Const]\n * - ObjectValue[?Const]\n *\n * BooleanValue : one of `true` `false`\n *\n * NullValue : `null`\n *\n * EnumValue : Name but not `true`, `false` or `null`\n */\n\n parseValueLiteral(isConst) {\n const token = this._lexer.token;\n\n switch (token.kind) {\n case tokenKind_TokenKind.BRACKET_L:\n return this.parseList(isConst);\n\n case tokenKind_TokenKind.BRACE_L:\n return this.parseObject(isConst);\n\n case tokenKind_TokenKind.INT:\n this.advanceLexer();\n return this.node(token, {\n kind: kinds/* Kind */.b.INT,\n value: token.value,\n });\n\n case tokenKind_TokenKind.FLOAT:\n this.advanceLexer();\n return this.node(token, {\n kind: kinds/* Kind */.b.FLOAT,\n value: token.value,\n });\n\n case tokenKind_TokenKind.STRING:\n case tokenKind_TokenKind.BLOCK_STRING:\n return this.parseStringLiteral();\n\n case tokenKind_TokenKind.NAME:\n this.advanceLexer();\n\n switch (token.value) {\n case 'true':\n return this.node(token, {\n kind: kinds/* Kind */.b.BOOLEAN,\n value: true,\n });\n\n case 'false':\n return this.node(token, {\n kind: kinds/* Kind */.b.BOOLEAN,\n value: false,\n });\n\n case 'null':\n return this.node(token, {\n kind: kinds/* Kind */.b.NULL,\n });\n\n default:\n return this.node(token, {\n kind: kinds/* Kind */.b.ENUM,\n value: token.value,\n });\n }\n\n case tokenKind_TokenKind.DOLLAR:\n if (isConst) {\n this.expectToken(tokenKind_TokenKind.DOLLAR);\n\n if (this._lexer.token.kind === tokenKind_TokenKind.NAME) {\n const varName = this._lexer.token.value;\n throw syntaxError(\n this._lexer.source,\n token.start,\n `Unexpected variable \"$${varName}\" in constant value.`,\n );\n } else {\n throw this.unexpected(token);\n }\n }\n\n return this.parseVariable();\n\n default:\n throw this.unexpected();\n }\n }\n\n parseConstValueLiteral() {\n return this.parseValueLiteral(true);\n }\n\n parseStringLiteral() {\n const token = this._lexer.token;\n this.advanceLexer();\n return this.node(token, {\n kind: kinds/* Kind */.b.STRING,\n value: token.value,\n block: token.kind === tokenKind_TokenKind.BLOCK_STRING,\n });\n }\n /**\n * ListValue[Const] :\n * - [ ]\n * - [ Value[?Const]+ ]\n */\n\n parseList(isConst) {\n const item = () => this.parseValueLiteral(isConst);\n\n return this.node(this._lexer.token, {\n kind: kinds/* Kind */.b.LIST,\n values: this.any(tokenKind_TokenKind.BRACKET_L, item, tokenKind_TokenKind.BRACKET_R),\n });\n }\n /**\n * ```\n * ObjectValue[Const] :\n * - { }\n * - { ObjectField[?Const]+ }\n * ```\n */\n\n parseObject(isConst) {\n const item = () => this.parseObjectField(isConst);\n\n return this.node(this._lexer.token, {\n kind: kinds/* Kind */.b.OBJECT,\n fields: this.any(tokenKind_TokenKind.BRACE_L, item, tokenKind_TokenKind.BRACE_R),\n });\n }\n /**\n * ObjectField[Const] : Name : Value[?Const]\n */\n\n parseObjectField(isConst) {\n const start = this._lexer.token;\n const name = this.parseName();\n this.expectToken(tokenKind_TokenKind.COLON);\n return this.node(start, {\n kind: kinds/* Kind */.b.OBJECT_FIELD,\n name,\n value: this.parseValueLiteral(isConst),\n });\n } // Implements the parsing rules in the Directives section.\n\n /**\n * Directives[Const] : Directive[?Const]+\n */\n\n parseDirectives(isConst) {\n const directives = [];\n\n while (this.peek(tokenKind_TokenKind.AT)) {\n directives.push(this.parseDirective(isConst));\n }\n\n return directives;\n }\n\n parseConstDirectives() {\n return this.parseDirectives(true);\n }\n /**\n * ```\n * Directive[Const] : @ Name Arguments[?Const]?\n * ```\n */\n\n parseDirective(isConst) {\n const start = this._lexer.token;\n this.expectToken(tokenKind_TokenKind.AT);\n return this.node(start, {\n kind: kinds/* Kind */.b.DIRECTIVE,\n name: this.parseName(),\n arguments: this.parseArguments(isConst),\n });\n } // Implements the parsing rules in the Types section.\n\n /**\n * Type :\n * - NamedType\n * - ListType\n * - NonNullType\n */\n\n parseTypeReference() {\n const start = this._lexer.token;\n let type;\n\n if (this.expectOptionalToken(tokenKind_TokenKind.BRACKET_L)) {\n const innerType = this.parseTypeReference();\n this.expectToken(tokenKind_TokenKind.BRACKET_R);\n type = this.node(start, {\n kind: kinds/* Kind */.b.LIST_TYPE,\n type: innerType,\n });\n } else {\n type = this.parseNamedType();\n }\n\n if (this.expectOptionalToken(tokenKind_TokenKind.BANG)) {\n return this.node(start, {\n kind: kinds/* Kind */.b.NON_NULL_TYPE,\n type,\n });\n }\n\n return type;\n }\n /**\n * NamedType : Name\n */\n\n parseNamedType() {\n return this.node(this._lexer.token, {\n kind: kinds/* Kind */.b.NAMED_TYPE,\n name: this.parseName(),\n });\n } // Implements the parsing rules in the Type Definition section.\n\n peekDescription() {\n return this.peek(tokenKind_TokenKind.STRING) || this.peek(tokenKind_TokenKind.BLOCK_STRING);\n }\n /**\n * Description : StringValue\n */\n\n parseDescription() {\n if (this.peekDescription()) {\n return this.parseStringLiteral();\n }\n }\n /**\n * ```\n * SchemaDefinition : Description? schema Directives[Const]? { OperationTypeDefinition+ }\n * ```\n */\n\n parseSchemaDefinition() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n this.expectKeyword('schema');\n const directives = this.parseConstDirectives();\n const operationTypes = this.many(\n tokenKind_TokenKind.BRACE_L,\n this.parseOperationTypeDefinition,\n tokenKind_TokenKind.BRACE_R,\n );\n return this.node(start, {\n kind: kinds/* Kind */.b.SCHEMA_DEFINITION,\n description,\n directives,\n operationTypes,\n });\n }\n /**\n * OperationTypeDefinition : OperationType : NamedType\n */\n\n parseOperationTypeDefinition() {\n const start = this._lexer.token;\n const operation = this.parseOperationType();\n this.expectToken(tokenKind_TokenKind.COLON);\n const type = this.parseNamedType();\n return this.node(start, {\n kind: kinds/* Kind */.b.OPERATION_TYPE_DEFINITION,\n operation,\n type,\n });\n }\n /**\n * ScalarTypeDefinition : Description? scalar Name Directives[Const]?\n */\n\n parseScalarTypeDefinition() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n this.expectKeyword('scalar');\n const name = this.parseName();\n const directives = this.parseConstDirectives();\n return this.node(start, {\n kind: kinds/* Kind */.b.SCALAR_TYPE_DEFINITION,\n description,\n name,\n directives,\n });\n }\n /**\n * ObjectTypeDefinition :\n * Description?\n * type Name ImplementsInterfaces? Directives[Const]? FieldsDefinition?\n */\n\n parseObjectTypeDefinition() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n this.expectKeyword('type');\n const name = this.parseName();\n const interfaces = this.parseImplementsInterfaces();\n const directives = this.parseConstDirectives();\n const fields = this.parseFieldsDefinition();\n return this.node(start, {\n kind: kinds/* Kind */.b.OBJECT_TYPE_DEFINITION,\n description,\n name,\n interfaces,\n directives,\n fields,\n });\n }\n /**\n * ImplementsInterfaces :\n * - implements `&`? NamedType\n * - ImplementsInterfaces & NamedType\n */\n\n parseImplementsInterfaces() {\n return this.expectOptionalKeyword('implements')\n ? this.delimitedMany(tokenKind_TokenKind.AMP, this.parseNamedType)\n : [];\n }\n /**\n * ```\n * FieldsDefinition : { FieldDefinition+ }\n * ```\n */\n\n parseFieldsDefinition() {\n return this.optionalMany(\n tokenKind_TokenKind.BRACE_L,\n this.parseFieldDefinition,\n tokenKind_TokenKind.BRACE_R,\n );\n }\n /**\n * FieldDefinition :\n * - Description? Name ArgumentsDefinition? : Type Directives[Const]?\n */\n\n parseFieldDefinition() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n const name = this.parseName();\n const args = this.parseArgumentDefs();\n this.expectToken(tokenKind_TokenKind.COLON);\n const type = this.parseTypeReference();\n const directives = this.parseConstDirectives();\n return this.node(start, {\n kind: kinds/* Kind */.b.FIELD_DEFINITION,\n description,\n name,\n arguments: args,\n type,\n directives,\n });\n }\n /**\n * ArgumentsDefinition : ( InputValueDefinition+ )\n */\n\n parseArgumentDefs() {\n return this.optionalMany(\n tokenKind_TokenKind.PAREN_L,\n this.parseInputValueDef,\n tokenKind_TokenKind.PAREN_R,\n );\n }\n /**\n * InputValueDefinition :\n * - Description? Name : Type DefaultValue? Directives[Const]?\n */\n\n parseInputValueDef() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n const name = this.parseName();\n this.expectToken(tokenKind_TokenKind.COLON);\n const type = this.parseTypeReference();\n let defaultValue;\n\n if (this.expectOptionalToken(tokenKind_TokenKind.EQUALS)) {\n defaultValue = this.parseConstValueLiteral();\n }\n\n const directives = this.parseConstDirectives();\n return this.node(start, {\n kind: kinds/* Kind */.b.INPUT_VALUE_DEFINITION,\n description,\n name,\n type,\n defaultValue,\n directives,\n });\n }\n /**\n * InterfaceTypeDefinition :\n * - Description? interface Name Directives[Const]? FieldsDefinition?\n */\n\n parseInterfaceTypeDefinition() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n this.expectKeyword('interface');\n const name = this.parseName();\n const interfaces = this.parseImplementsInterfaces();\n const directives = this.parseConstDirectives();\n const fields = this.parseFieldsDefinition();\n return this.node(start, {\n kind: kinds/* Kind */.b.INTERFACE_TYPE_DEFINITION,\n description,\n name,\n interfaces,\n directives,\n fields,\n });\n }\n /**\n * UnionTypeDefinition :\n * - Description? union Name Directives[Const]? UnionMemberTypes?\n */\n\n parseUnionTypeDefinition() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n this.expectKeyword('union');\n const name = this.parseName();\n const directives = this.parseConstDirectives();\n const types = this.parseUnionMemberTypes();\n return this.node(start, {\n kind: kinds/* Kind */.b.UNION_TYPE_DEFINITION,\n description,\n name,\n directives,\n types,\n });\n }\n /**\n * UnionMemberTypes :\n * - = `|`? NamedType\n * - UnionMemberTypes | NamedType\n */\n\n parseUnionMemberTypes() {\n return this.expectOptionalToken(tokenKind_TokenKind.EQUALS)\n ? this.delimitedMany(tokenKind_TokenKind.PIPE, this.parseNamedType)\n : [];\n }\n /**\n * EnumTypeDefinition :\n * - Description? enum Name Directives[Const]? EnumValuesDefinition?\n */\n\n parseEnumTypeDefinition() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n this.expectKeyword('enum');\n const name = this.parseName();\n const directives = this.parseConstDirectives();\n const values = this.parseEnumValuesDefinition();\n return this.node(start, {\n kind: kinds/* Kind */.b.ENUM_TYPE_DEFINITION,\n description,\n name,\n directives,\n values,\n });\n }\n /**\n * ```\n * EnumValuesDefinition : { EnumValueDefinition+ }\n * ```\n */\n\n parseEnumValuesDefinition() {\n return this.optionalMany(\n tokenKind_TokenKind.BRACE_L,\n this.parseEnumValueDefinition,\n tokenKind_TokenKind.BRACE_R,\n );\n }\n /**\n * EnumValueDefinition : Description? EnumValue Directives[Const]?\n */\n\n parseEnumValueDefinition() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n const name = this.parseEnumValueName();\n const directives = this.parseConstDirectives();\n return this.node(start, {\n kind: kinds/* Kind */.b.ENUM_VALUE_DEFINITION,\n description,\n name,\n directives,\n });\n }\n /**\n * EnumValue : Name but not `true`, `false` or `null`\n */\n\n parseEnumValueName() {\n if (\n this._lexer.token.value === 'true' ||\n this._lexer.token.value === 'false' ||\n this._lexer.token.value === 'null'\n ) {\n throw syntaxError(\n this._lexer.source,\n this._lexer.token.start,\n `${getTokenDesc(\n this._lexer.token,\n )} is reserved and cannot be used for an enum value.`,\n );\n }\n\n return this.parseName();\n }\n /**\n * InputObjectTypeDefinition :\n * - Description? input Name Directives[Const]? InputFieldsDefinition?\n */\n\n parseInputObjectTypeDefinition() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n this.expectKeyword('input');\n const name = this.parseName();\n const directives = this.parseConstDirectives();\n const fields = this.parseInputFieldsDefinition();\n return this.node(start, {\n kind: kinds/* Kind */.b.INPUT_OBJECT_TYPE_DEFINITION,\n description,\n name,\n directives,\n fields,\n });\n }\n /**\n * ```\n * InputFieldsDefinition : { InputValueDefinition+ }\n * ```\n */\n\n parseInputFieldsDefinition() {\n return this.optionalMany(\n tokenKind_TokenKind.BRACE_L,\n this.parseInputValueDef,\n tokenKind_TokenKind.BRACE_R,\n );\n }\n /**\n * TypeSystemExtension :\n * - SchemaExtension\n * - TypeExtension\n *\n * TypeExtension :\n * - ScalarTypeExtension\n * - ObjectTypeExtension\n * - InterfaceTypeExtension\n * - UnionTypeExtension\n * - EnumTypeExtension\n * - InputObjectTypeDefinition\n */\n\n parseTypeSystemExtension() {\n const keywordToken = this._lexer.lookahead();\n\n if (keywordToken.kind === tokenKind_TokenKind.NAME) {\n switch (keywordToken.value) {\n case 'schema':\n return this.parseSchemaExtension();\n\n case 'scalar':\n return this.parseScalarTypeExtension();\n\n case 'type':\n return this.parseObjectTypeExtension();\n\n case 'interface':\n return this.parseInterfaceTypeExtension();\n\n case 'union':\n return this.parseUnionTypeExtension();\n\n case 'enum':\n return this.parseEnumTypeExtension();\n\n case 'input':\n return this.parseInputObjectTypeExtension();\n }\n }\n\n throw this.unexpected(keywordToken);\n }\n /**\n * ```\n * SchemaExtension :\n * - extend schema Directives[Const]? { OperationTypeDefinition+ }\n * - extend schema Directives[Const]\n * ```\n */\n\n parseSchemaExtension() {\n const start = this._lexer.token;\n this.expectKeyword('extend');\n this.expectKeyword('schema');\n const directives = this.parseConstDirectives();\n const operationTypes = this.optionalMany(\n tokenKind_TokenKind.BRACE_L,\n this.parseOperationTypeDefinition,\n tokenKind_TokenKind.BRACE_R,\n );\n\n if (directives.length === 0 && operationTypes.length === 0) {\n throw this.unexpected();\n }\n\n return this.node(start, {\n kind: kinds/* Kind */.b.SCHEMA_EXTENSION,\n directives,\n operationTypes,\n });\n }\n /**\n * ScalarTypeExtension :\n * - extend scalar Name Directives[Const]\n */\n\n parseScalarTypeExtension() {\n const start = this._lexer.token;\n this.expectKeyword('extend');\n this.expectKeyword('scalar');\n const name = this.parseName();\n const directives = this.parseConstDirectives();\n\n if (directives.length === 0) {\n throw this.unexpected();\n }\n\n return this.node(start, {\n kind: kinds/* Kind */.b.SCALAR_TYPE_EXTENSION,\n name,\n directives,\n });\n }\n /**\n * ObjectTypeExtension :\n * - extend type Name ImplementsInterfaces? Directives[Const]? FieldsDefinition\n * - extend type Name ImplementsInterfaces? Directives[Const]\n * - extend type Name ImplementsInterfaces\n */\n\n parseObjectTypeExtension() {\n const start = this._lexer.token;\n this.expectKeyword('extend');\n this.expectKeyword('type');\n const name = this.parseName();\n const interfaces = this.parseImplementsInterfaces();\n const directives = this.parseConstDirectives();\n const fields = this.parseFieldsDefinition();\n\n if (\n interfaces.length === 0 &&\n directives.length === 0 &&\n fields.length === 0\n ) {\n throw this.unexpected();\n }\n\n return this.node(start, {\n kind: kinds/* Kind */.b.OBJECT_TYPE_EXTENSION,\n name,\n interfaces,\n directives,\n fields,\n });\n }\n /**\n * InterfaceTypeExtension :\n * - extend interface Name ImplementsInterfaces? Directives[Const]? FieldsDefinition\n * - extend interface Name ImplementsInterfaces? Directives[Const]\n * - extend interface Name ImplementsInterfaces\n */\n\n parseInterfaceTypeExtension() {\n const start = this._lexer.token;\n this.expectKeyword('extend');\n this.expectKeyword('interface');\n const name = this.parseName();\n const interfaces = this.parseImplementsInterfaces();\n const directives = this.parseConstDirectives();\n const fields = this.parseFieldsDefinition();\n\n if (\n interfaces.length === 0 &&\n directives.length === 0 &&\n fields.length === 0\n ) {\n throw this.unexpected();\n }\n\n return this.node(start, {\n kind: kinds/* Kind */.b.INTERFACE_TYPE_EXTENSION,\n name,\n interfaces,\n directives,\n fields,\n });\n }\n /**\n * UnionTypeExtension :\n * - extend union Name Directives[Const]? UnionMemberTypes\n * - extend union Name Directives[Const]\n */\n\n parseUnionTypeExtension() {\n const start = this._lexer.token;\n this.expectKeyword('extend');\n this.expectKeyword('union');\n const name = this.parseName();\n const directives = this.parseConstDirectives();\n const types = this.parseUnionMemberTypes();\n\n if (directives.length === 0 && types.length === 0) {\n throw this.unexpected();\n }\n\n return this.node(start, {\n kind: kinds/* Kind */.b.UNION_TYPE_EXTENSION,\n name,\n directives,\n types,\n });\n }\n /**\n * EnumTypeExtension :\n * - extend enum Name Directives[Const]? EnumValuesDefinition\n * - extend enum Name Directives[Const]\n */\n\n parseEnumTypeExtension() {\n const start = this._lexer.token;\n this.expectKeyword('extend');\n this.expectKeyword('enum');\n const name = this.parseName();\n const directives = this.parseConstDirectives();\n const values = this.parseEnumValuesDefinition();\n\n if (directives.length === 0 && values.length === 0) {\n throw this.unexpected();\n }\n\n return this.node(start, {\n kind: kinds/* Kind */.b.ENUM_TYPE_EXTENSION,\n name,\n directives,\n values,\n });\n }\n /**\n * InputObjectTypeExtension :\n * - extend input Name Directives[Const]? InputFieldsDefinition\n * - extend input Name Directives[Const]\n */\n\n parseInputObjectTypeExtension() {\n const start = this._lexer.token;\n this.expectKeyword('extend');\n this.expectKeyword('input');\n const name = this.parseName();\n const directives = this.parseConstDirectives();\n const fields = this.parseInputFieldsDefinition();\n\n if (directives.length === 0 && fields.length === 0) {\n throw this.unexpected();\n }\n\n return this.node(start, {\n kind: kinds/* Kind */.b.INPUT_OBJECT_TYPE_EXTENSION,\n name,\n directives,\n fields,\n });\n }\n /**\n * ```\n * DirectiveDefinition :\n * - Description? directive @ Name ArgumentsDefinition? `repeatable`? on DirectiveLocations\n * ```\n */\n\n parseDirectiveDefinition() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n this.expectKeyword('directive');\n this.expectToken(tokenKind_TokenKind.AT);\n const name = this.parseName();\n const args = this.parseArgumentDefs();\n const repeatable = this.expectOptionalKeyword('repeatable');\n this.expectKeyword('on');\n const locations = this.parseDirectiveLocations();\n return this.node(start, {\n kind: kinds/* Kind */.b.DIRECTIVE_DEFINITION,\n description,\n name,\n arguments: args,\n repeatable,\n locations,\n });\n }\n /**\n * DirectiveLocations :\n * - `|`? DirectiveLocation\n * - DirectiveLocations | DirectiveLocation\n */\n\n parseDirectiveLocations() {\n return this.delimitedMany(tokenKind_TokenKind.PIPE, this.parseDirectiveLocation);\n }\n /*\n * DirectiveLocation :\n * - ExecutableDirectiveLocation\n * - TypeSystemDirectiveLocation\n *\n * ExecutableDirectiveLocation : one of\n * `QUERY`\n * `MUTATION`\n * `SUBSCRIPTION`\n * `FIELD`\n * `FRAGMENT_DEFINITION`\n * `FRAGMENT_SPREAD`\n * `INLINE_FRAGMENT`\n *\n * TypeSystemDirectiveLocation : one of\n * `SCHEMA`\n * `SCALAR`\n * `OBJECT`\n * `FIELD_DEFINITION`\n * `ARGUMENT_DEFINITION`\n * `INTERFACE`\n * `UNION`\n * `ENUM`\n * `ENUM_VALUE`\n * `INPUT_OBJECT`\n * `INPUT_FIELD_DEFINITION`\n */\n\n parseDirectiveLocation() {\n const start = this._lexer.token;\n const name = this.parseName();\n\n if (Object.prototype.hasOwnProperty.call(DirectiveLocation, name.value)) {\n return name;\n }\n\n throw this.unexpected(start);\n } // Core parsing utility functions\n\n /**\n * Returns a node that, if configured to do so, sets a \"loc\" field as a\n * location object, used to identify the place in the source that created a\n * given parsed object.\n */\n\n node(startToken, node) {\n if (this._options.noLocation !== true) {\n node.loc = new ast/* Location */.aZ(\n startToken,\n this._lexer.lastToken,\n this._lexer.source,\n );\n }\n\n return node;\n }\n /**\n * Determines if the next token is of a given kind\n */\n\n peek(kind) {\n return this._lexer.token.kind === kind;\n }\n /**\n * If the next token is of the given kind, return that token after advancing the lexer.\n * Otherwise, do not change the parser state and throw an error.\n */\n\n expectToken(kind) {\n const token = this._lexer.token;\n\n if (token.kind === kind) {\n this.advanceLexer();\n return token;\n }\n\n throw syntaxError(\n this._lexer.source,\n token.start,\n `Expected ${getTokenKindDesc(kind)}, found ${getTokenDesc(token)}.`,\n );\n }\n /**\n * If the next token is of the given kind, return \"true\" after advancing the lexer.\n * Otherwise, do not change the parser state and return \"false\".\n */\n\n expectOptionalToken(kind) {\n const token = this._lexer.token;\n\n if (token.kind === kind) {\n this.advanceLexer();\n return true;\n }\n\n return false;\n }\n /**\n * If the next token is a given keyword, advance the lexer.\n * Otherwise, do not change the parser state and throw an error.\n */\n\n expectKeyword(value) {\n const token = this._lexer.token;\n\n if (token.kind === tokenKind_TokenKind.NAME && token.value === value) {\n this.advanceLexer();\n } else {\n throw syntaxError(\n this._lexer.source,\n token.start,\n `Expected \"${value}\", found ${getTokenDesc(token)}.`,\n );\n }\n }\n /**\n * If the next token is a given keyword, return \"true\" after advancing the lexer.\n * Otherwise, do not change the parser state and return \"false\".\n */\n\n expectOptionalKeyword(value) {\n const token = this._lexer.token;\n\n if (token.kind === tokenKind_TokenKind.NAME && token.value === value) {\n this.advanceLexer();\n return true;\n }\n\n return false;\n }\n /**\n * Helper function for creating an error when an unexpected lexed token is encountered.\n */\n\n unexpected(atToken) {\n const token =\n atToken !== null && atToken !== void 0 ? atToken : this._lexer.token;\n return syntaxError(\n this._lexer.source,\n token.start,\n `Unexpected ${getTokenDesc(token)}.`,\n );\n }\n /**\n * Returns a possibly empty list of parse nodes, determined by the parseFn.\n * This list begins with a lex token of openKind and ends with a lex token of closeKind.\n * Advances the parser to the next lex token after the closing token.\n */\n\n any(openKind, parseFn, closeKind) {\n this.expectToken(openKind);\n const nodes = [];\n\n while (!this.expectOptionalToken(closeKind)) {\n nodes.push(parseFn.call(this));\n }\n\n return nodes;\n }\n /**\n * Returns a list of parse nodes, determined by the parseFn.\n * It can be empty only if open token is missing otherwise it will always return non-empty list\n * that begins with a lex token of openKind and ends with a lex token of closeKind.\n * Advances the parser to the next lex token after the closing token.\n */\n\n optionalMany(openKind, parseFn, closeKind) {\n if (this.expectOptionalToken(openKind)) {\n const nodes = [];\n\n do {\n nodes.push(parseFn.call(this));\n } while (!this.expectOptionalToken(closeKind));\n\n return nodes;\n }\n\n return [];\n }\n /**\n * Returns a non-empty list of parse nodes, determined by the parseFn.\n * This list begins with a lex token of openKind and ends with a lex token of closeKind.\n * Advances the parser to the next lex token after the closing token.\n */\n\n many(openKind, parseFn, closeKind) {\n this.expectToken(openKind);\n const nodes = [];\n\n do {\n nodes.push(parseFn.call(this));\n } while (!this.expectOptionalToken(closeKind));\n\n return nodes;\n }\n /**\n * Returns a non-empty list of parse nodes, determined by the parseFn.\n * This list may begin with a lex token of delimiterKind followed by items separated by lex tokens of tokenKind.\n * Advances the parser to the next lex token after last item in the list.\n */\n\n delimitedMany(delimiterKind, parseFn) {\n this.expectOptionalToken(delimiterKind);\n const nodes = [];\n\n do {\n nodes.push(parseFn.call(this));\n } while (this.expectOptionalToken(delimiterKind));\n\n return nodes;\n }\n\n advanceLexer() {\n const { maxTokens } = this._options;\n\n const token = this._lexer.advance();\n\n if (maxTokens !== undefined && token.kind !== tokenKind_TokenKind.EOF) {\n ++this._tokenCounter;\n\n if (this._tokenCounter > maxTokens) {\n throw syntaxError(\n this._lexer.source,\n token.start,\n `Document contains more that ${maxTokens} tokens. Parsing aborted.`,\n );\n }\n }\n }\n}\n/**\n * A helper function to describe a token as a string for debugging.\n */\n\nfunction getTokenDesc(token) {\n const value = token.value;\n return getTokenKindDesc(token.kind) + (value != null ? ` \"${value}\"` : '');\n}\n/**\n * A helper function to describe a token kind as a string for debugging.\n */\n\nfunction getTokenKindDesc(kind) {\n return isPunctuatorTokenKind(kind) ? `\"${kind}\"` : kind;\n}\n\n;// CONCATENATED MODULE: ./node_modules/graphql-tag/lib/index.js\n\n\nvar docCache = new Map();\nvar fragmentSourceMap = new Map();\nvar printFragmentWarnings = true;\nvar experimentalFragmentVariables = false;\nfunction normalize(string) {\n return string.replace(/[\\s,]+/g, ' ').trim();\n}\nfunction cacheKeyFromLoc(loc) {\n return normalize(loc.source.body.substring(loc.start, loc.end));\n}\nfunction processFragments(ast) {\n var seenKeys = new Set();\n var definitions = [];\n ast.definitions.forEach(function (fragmentDefinition) {\n if (fragmentDefinition.kind === 'FragmentDefinition') {\n var fragmentName = fragmentDefinition.name.value;\n var sourceKey = cacheKeyFromLoc(fragmentDefinition.loc);\n var sourceKeySet = fragmentSourceMap.get(fragmentName);\n if (sourceKeySet && !sourceKeySet.has(sourceKey)) {\n if (printFragmentWarnings) {\n console.warn(\"Warning: fragment with name \" + fragmentName + \" already exists.\\n\"\n + \"graphql-tag enforces all fragment names across your application to be unique; read more about\\n\"\n + \"this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names\");\n }\n }\n else if (!sourceKeySet) {\n fragmentSourceMap.set(fragmentName, sourceKeySet = new Set);\n }\n sourceKeySet.add(sourceKey);\n if (!seenKeys.has(sourceKey)) {\n seenKeys.add(sourceKey);\n definitions.push(fragmentDefinition);\n }\n }\n else {\n definitions.push(fragmentDefinition);\n }\n });\n return (0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, ast), { definitions: definitions });\n}\nfunction stripLoc(doc) {\n var workSet = new Set(doc.definitions);\n workSet.forEach(function (node) {\n if (node.loc)\n delete node.loc;\n Object.keys(node).forEach(function (key) {\n var value = node[key];\n if (value && typeof value === 'object') {\n workSet.add(value);\n }\n });\n });\n var loc = doc.loc;\n if (loc) {\n delete loc.startToken;\n delete loc.endToken;\n }\n return doc;\n}\nfunction parseDocument(source) {\n var cacheKey = normalize(source);\n if (!docCache.has(cacheKey)) {\n var parsed = parse(source, {\n experimentalFragmentVariables: experimentalFragmentVariables,\n allowLegacyFragmentVariables: experimentalFragmentVariables\n });\n if (!parsed || parsed.kind !== 'Document') {\n throw new Error('Not a valid GraphQL document.');\n }\n docCache.set(cacheKey, stripLoc(processFragments(parsed)));\n }\n return docCache.get(cacheKey);\n}\nfunction gql(literals) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n if (typeof literals === 'string') {\n literals = [literals];\n }\n var result = literals[0];\n args.forEach(function (arg, i) {\n if (arg && arg.kind === 'Document') {\n result += arg.loc.source.body;\n }\n else {\n result += arg;\n }\n result += literals[i + 1];\n });\n return parseDocument(result);\n}\nfunction resetCaches() {\n docCache.clear();\n fragmentSourceMap.clear();\n}\nfunction disableFragmentWarnings() {\n printFragmentWarnings = false;\n}\nfunction enableExperimentalFragmentVariables() {\n experimentalFragmentVariables = true;\n}\nfunction disableExperimentalFragmentVariables() {\n experimentalFragmentVariables = false;\n}\nvar extras = {\n gql: gql,\n resetCaches: resetCaches,\n disableFragmentWarnings: disableFragmentWarnings,\n enableExperimentalFragmentVariables: enableExperimentalFragmentVariables,\n disableExperimentalFragmentVariables: disableExperimentalFragmentVariables\n};\n(function (gql_1) {\n gql_1.gql = extras.gql, gql_1.resetCaches = extras.resetCaches, gql_1.disableFragmentWarnings = extras.disableFragmentWarnings, gql_1.enableExperimentalFragmentVariables = extras.enableExperimentalFragmentVariables, gql_1.disableExperimentalFragmentVariables = extras.disableExperimentalFragmentVariables;\n})(gql || (gql = {}));\ngql[\"default\"] = gql;\n/* harmony default export */ const lib = ((/* unused pure expression or super */ null && (gql)));\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/graphql-tag/lib/index.js_+_12_modules?", + ); + + /***/ + }, + + /***/ 4146: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + 'use strict'; + eval( + "\n\nvar reactIs = __webpack_require__(4363);\n\n/**\n * Copyright 2015, Yahoo! Inc.\n * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.\n */\nvar REACT_STATICS = {\n childContextTypes: true,\n contextType: true,\n contextTypes: true,\n defaultProps: true,\n displayName: true,\n getDefaultProps: true,\n getDerivedStateFromError: true,\n getDerivedStateFromProps: true,\n mixins: true,\n propTypes: true,\n type: true\n};\nvar KNOWN_STATICS = {\n name: true,\n length: true,\n prototype: true,\n caller: true,\n callee: true,\n arguments: true,\n arity: true\n};\nvar FORWARD_REF_STATICS = {\n '$$typeof': true,\n render: true,\n defaultProps: true,\n displayName: true,\n propTypes: true\n};\nvar MEMO_STATICS = {\n '$$typeof': true,\n compare: true,\n defaultProps: true,\n displayName: true,\n propTypes: true,\n type: true\n};\nvar TYPE_STATICS = {};\nTYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;\nTYPE_STATICS[reactIs.Memo] = MEMO_STATICS;\n\nfunction getStatics(component) {\n // React v16.11 and below\n if (reactIs.isMemo(component)) {\n return MEMO_STATICS;\n } // React v16.12 and above\n\n\n return TYPE_STATICS[component['$$typeof']] || REACT_STATICS;\n}\n\nvar defineProperty = Object.defineProperty;\nvar getOwnPropertyNames = Object.getOwnPropertyNames;\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nvar getPrototypeOf = Object.getPrototypeOf;\nvar objectPrototype = Object.prototype;\nfunction hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {\n if (typeof sourceComponent !== 'string') {\n // don't hoist over string (html) components\n if (objectPrototype) {\n var inheritedComponent = getPrototypeOf(sourceComponent);\n\n if (inheritedComponent && inheritedComponent !== objectPrototype) {\n hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);\n }\n }\n\n var keys = getOwnPropertyNames(sourceComponent);\n\n if (getOwnPropertySymbols) {\n keys = keys.concat(getOwnPropertySymbols(sourceComponent));\n }\n\n var targetStatics = getStatics(targetComponent);\n var sourceStatics = getStatics(sourceComponent);\n\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n\n if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {\n var descriptor = getOwnPropertyDescriptor(sourceComponent, key);\n\n try {\n // Avoid failures from read-only properties\n defineProperty(targetComponent, key, descriptor);\n } catch (e) {}\n }\n }\n }\n\n return targetComponent;\n}\n\nmodule.exports = hoistNonReactStatics;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js?", + ); + + /***/ + }, + + /***/ 7927: /***/ (module) => { + 'use strict'; + eval( + "/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar NODE_ENV = \"test\";\n\nvar invariant = function(condition, format, a, b, c, d, e, f) {\n if (NODE_ENV !== 'production') {\n if (format === undefined) {\n throw new Error('invariant requires an error message argument');\n }\n }\n\n if (!condition) {\n var error;\n if (format === undefined) {\n error = new Error(\n 'Minified exception occurred; use the non-minified dev environment ' +\n 'for the full error message and additional helpful warnings.'\n );\n } else {\n var args = [a, b, c, d, e, f];\n var argIndex = 0;\n error = new Error(\n format.replace(/%s/g, function() { return args[argIndex++]; })\n );\n error.name = 'Invariant Violation';\n }\n\n error.framesToPop = 1; // we don't care about invariant's own frame\n throw error;\n }\n};\n\nmodule.exports = invariant;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/invariant/invariant.js?", + ); + + /***/ + }, + + /***/ 5580: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var getNative = __webpack_require__(6110),\n root = __webpack_require__(9325);\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nmodule.exports = DataView;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_DataView.js?", + ); + + /***/ + }, + + /***/ 1549: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var hashClear = __webpack_require__(2032),\n hashDelete = __webpack_require__(3862),\n hashGet = __webpack_require__(6721),\n hashHas = __webpack_require__(2749),\n hashSet = __webpack_require__(5749);\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_Hash.js?", + ); + + /***/ + }, + + /***/ 79: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var listCacheClear = __webpack_require__(3702),\n listCacheDelete = __webpack_require__(80),\n listCacheGet = __webpack_require__(4739),\n listCacheHas = __webpack_require__(8655),\n listCacheSet = __webpack_require__(1175);\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_ListCache.js?", + ); + + /***/ + }, + + /***/ 8223: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var getNative = __webpack_require__(6110),\n root = __webpack_require__(9325);\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_Map.js?", + ); + + /***/ + }, + + /***/ 3661: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var mapCacheClear = __webpack_require__(3040),\n mapCacheDelete = __webpack_require__(7670),\n mapCacheGet = __webpack_require__(289),\n mapCacheHas = __webpack_require__(4509),\n mapCacheSet = __webpack_require__(2949);\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_MapCache.js?", + ); + + /***/ + }, + + /***/ 2804: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var getNative = __webpack_require__(6110),\n root = __webpack_require__(9325);\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nmodule.exports = Promise;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_Promise.js?", + ); + + /***/ + }, + + /***/ 6545: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var getNative = __webpack_require__(6110),\n root = __webpack_require__(9325);\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nmodule.exports = Set;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_Set.js?", + ); + + /***/ + }, + + /***/ 8859: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var MapCache = __webpack_require__(3661),\n setCacheAdd = __webpack_require__(1380),\n setCacheHas = __webpack_require__(1459);\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nmodule.exports = SetCache;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_SetCache.js?', + ); + + /***/ + }, + + /***/ 7217: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var ListCache = __webpack_require__(79),\n stackClear = __webpack_require__(1420),\n stackDelete = __webpack_require__(938),\n stackGet = __webpack_require__(3605),\n stackHas = __webpack_require__(9817),\n stackSet = __webpack_require__(945);\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nmodule.exports = Stack;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_Stack.js?", + ); + + /***/ + }, + + /***/ 1873: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var root = __webpack_require__(9325);\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_Symbol.js?', + ); + + /***/ + }, + + /***/ 7828: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var root = __webpack_require__(9325);\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nmodule.exports = Uint8Array;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_Uint8Array.js?', + ); + + /***/ + }, + + /***/ 8303: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var getNative = __webpack_require__(6110),\n root = __webpack_require__(9325);\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nmodule.exports = WeakMap;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_WeakMap.js?", + ); + + /***/ + }, + + /***/ 9770: /***/ (module) => { + eval( + '/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nmodule.exports = arrayFilter;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_arrayFilter.js?', + ); + + /***/ + }, + + /***/ 5325: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var baseIndexOf = __webpack_require__(6131);\n\n/**\n * A specialized version of `_.includes` for arrays without support for\n * specifying an index to search from.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\nfunction arrayIncludes(array, value) {\n var length = array == null ? 0 : array.length;\n return !!length && baseIndexOf(array, value, 0) > -1;\n}\n\nmodule.exports = arrayIncludes;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_arrayIncludes.js?', + ); + + /***/ + }, + + /***/ 9905: /***/ (module) => { + eval( + '/**\n * This function is like `arrayIncludes` except that it accepts a comparator.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @param {Function} comparator The comparator invoked per element.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\nfunction arrayIncludesWith(array, value, comparator) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (comparator(value, array[index])) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arrayIncludesWith;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_arrayIncludesWith.js?', + ); + + /***/ + }, + + /***/ 695: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var baseTimes = __webpack_require__(8096),\n isArguments = __webpack_require__(2428),\n isArray = __webpack_require__(6449),\n isBuffer = __webpack_require__(3656),\n isIndex = __webpack_require__(361),\n isTypedArray = __webpack_require__(7167);\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = arrayLikeKeys;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_arrayLikeKeys.js?", + ); + + /***/ + }, + + /***/ 4932: /***/ (module) => { + eval( + '/**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction arrayMap(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length,\n result = Array(length);\n\n while (++index < length) {\n result[index] = iteratee(array[index], index, array);\n }\n return result;\n}\n\nmodule.exports = arrayMap;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_arrayMap.js?', + ); + + /***/ + }, + + /***/ 4528: /***/ (module) => { + eval( + '/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nmodule.exports = arrayPush;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_arrayPush.js?', + ); + + /***/ + }, + + /***/ 4248: /***/ (module) => { + eval( + '/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arraySome;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_arraySome.js?', + ); + + /***/ + }, + + /***/ 6025: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var eq = __webpack_require__(5288);\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nmodule.exports = assocIndexOf;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_assocIndexOf.js?', + ); + + /***/ + }, + + /***/ 909: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var baseForOwn = __webpack_require__(641),\n createBaseEach = __webpack_require__(8329);\n\n/**\n * The base implementation of `_.forEach` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n */\nvar baseEach = createBaseEach(baseForOwn);\n\nmodule.exports = baseEach;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_baseEach.js?', + ); + + /***/ + }, + + /***/ 2523: /***/ (module) => { + eval( + '/**\n * The base implementation of `_.findIndex` and `_.findLastIndex` without\n * support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} predicate The function invoked per iteration.\n * @param {number} fromIndex The index to search from.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseFindIndex(array, predicate, fromIndex, fromRight) {\n var length = array.length,\n index = fromIndex + (fromRight ? 1 : -1);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (predicate(array[index], index, array)) {\n return index;\n }\n }\n return -1;\n}\n\nmodule.exports = baseFindIndex;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_baseFindIndex.js?', + ); + + /***/ + }, + + /***/ 3120: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var arrayPush = __webpack_require__(4528),\n isFlattenable = __webpack_require__(5891);\n\n/**\n * The base implementation of `_.flatten` with support for restricting flattening.\n *\n * @private\n * @param {Array} array The array to flatten.\n * @param {number} depth The maximum recursion depth.\n * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.\n * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.\n * @param {Array} [result=[]] The initial result value.\n * @returns {Array} Returns the new flattened array.\n */\nfunction baseFlatten(array, depth, predicate, isStrict, result) {\n var index = -1,\n length = array.length;\n\n predicate || (predicate = isFlattenable);\n result || (result = []);\n\n while (++index < length) {\n var value = array[index];\n if (depth > 0 && predicate(value)) {\n if (depth > 1) {\n // Recursively flatten arrays (susceptible to call stack limits).\n baseFlatten(value, depth - 1, predicate, isStrict, result);\n } else {\n arrayPush(result, value);\n }\n } else if (!isStrict) {\n result[result.length] = value;\n }\n }\n return result;\n}\n\nmodule.exports = baseFlatten;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_baseFlatten.js?', + ); + + /***/ + }, + + /***/ 6649: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var createBaseFor = __webpack_require__(3221);\n\n/**\n * The base implementation of `baseForOwn` which iterates over `object`\n * properties returned by `keysFunc` and invokes `iteratee` for each property.\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\nvar baseFor = createBaseFor();\n\nmodule.exports = baseFor;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_baseFor.js?', + ); + + /***/ + }, + + /***/ 641: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var baseFor = __webpack_require__(6649),\n keys = __webpack_require__(5950);\n\n/**\n * The base implementation of `_.forOwn` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\nfunction baseForOwn(object, iteratee) {\n return object && baseFor(object, iteratee, keys);\n}\n\nmodule.exports = baseForOwn;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_baseForOwn.js?', + ); + + /***/ + }, + + /***/ 7422: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var castPath = __webpack_require__(1769),\n toKey = __webpack_require__(7797);\n\n/**\n * The base implementation of `_.get` without support for default values.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @returns {*} Returns the resolved value.\n */\nfunction baseGet(object, path) {\n path = castPath(path, object);\n\n var index = 0,\n length = path.length;\n\n while (object != null && index < length) {\n object = object[toKey(path[index++])];\n }\n return (index && index == length) ? object : undefined;\n}\n\nmodule.exports = baseGet;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_baseGet.js?', + ); + + /***/ + }, + + /***/ 2199: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var arrayPush = __webpack_require__(4528),\n isArray = __webpack_require__(6449);\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nmodule.exports = baseGetAllKeys;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_baseGetAllKeys.js?', + ); + + /***/ + }, + + /***/ 2552: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var Symbol = __webpack_require__(1873),\n getRawTag = __webpack_require__(659),\n objectToString = __webpack_require__(9350);\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_baseGetTag.js?", + ); + + /***/ + }, + + /***/ 8077: /***/ (module) => { + eval( + '/**\n * The base implementation of `_.hasIn` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\nfunction baseHasIn(object, key) {\n return object != null && key in Object(object);\n}\n\nmodule.exports = baseHasIn;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_baseHasIn.js?', + ); + + /***/ + }, + + /***/ 6131: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var baseFindIndex = __webpack_require__(2523),\n baseIsNaN = __webpack_require__(5463),\n strictIndexOf = __webpack_require__(6959);\n\n/**\n * The base implementation of `_.indexOf` without `fromIndex` bounds checks.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseIndexOf(array, value, fromIndex) {\n return value === value\n ? strictIndexOf(array, value, fromIndex)\n : baseFindIndex(array, baseIsNaN, fromIndex);\n}\n\nmodule.exports = baseIndexOf;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_baseIndexOf.js?', + ); + + /***/ + }, + + /***/ 7534: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var baseGetTag = __webpack_require__(2552),\n isObjectLike = __webpack_require__(346);\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_baseIsArguments.js?", + ); + + /***/ + }, + + /***/ 270: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var baseIsEqualDeep = __webpack_require__(7068),\n isObjectLike = __webpack_require__(346);\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nmodule.exports = baseIsEqual;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_baseIsEqual.js?', + ); + + /***/ + }, + + /***/ 7068: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var Stack = __webpack_require__(7217),\n equalArrays = __webpack_require__(5911),\n equalByTag = __webpack_require__(1986),\n equalObjects = __webpack_require__(689),\n getTag = __webpack_require__(5861),\n isArray = __webpack_require__(6449),\n isBuffer = __webpack_require__(3656),\n isTypedArray = __webpack_require__(7167);\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nmodule.exports = baseIsEqualDeep;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_baseIsEqualDeep.js?", + ); + + /***/ + }, + + /***/ 1799: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var Stack = __webpack_require__(7217),\n baseIsEqual = __webpack_require__(270);\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * The base implementation of `_.isMatch` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @param {Array} matchData The property names, values, and compare flags to match.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n */\nfunction baseIsMatch(object, source, matchData, customizer) {\n var index = matchData.length,\n length = index,\n noCustomizer = !customizer;\n\n if (object == null) {\n return !length;\n }\n object = Object(object);\n while (index--) {\n var data = matchData[index];\n if ((noCustomizer && data[2])\n ? data[1] !== object[data[0]]\n : !(data[0] in object)\n ) {\n return false;\n }\n }\n while (++index < length) {\n data = matchData[index];\n var key = data[0],\n objValue = object[key],\n srcValue = data[1];\n\n if (noCustomizer && data[2]) {\n if (objValue === undefined && !(key in object)) {\n return false;\n }\n } else {\n var stack = new Stack;\n if (customizer) {\n var result = customizer(objValue, srcValue, key, object, source, stack);\n }\n if (!(result === undefined\n ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)\n : result\n )) {\n return false;\n }\n }\n }\n return true;\n}\n\nmodule.exports = baseIsMatch;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_baseIsMatch.js?', + ); + + /***/ + }, + + /***/ 5463: /***/ (module) => { + eval( + '/**\n * The base implementation of `_.isNaN` without support for number objects.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n */\nfunction baseIsNaN(value) {\n return value !== value;\n}\n\nmodule.exports = baseIsNaN;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_baseIsNaN.js?', + ); + + /***/ + }, + + /***/ 5083: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var isFunction = __webpack_require__(1882),\n isMasked = __webpack_require__(7296),\n isObject = __webpack_require__(3805),\n toSource = __webpack_require__(7473);\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_baseIsNative.js?", + ); + + /***/ + }, + + /***/ 4901: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var baseGetTag = __webpack_require__(2552),\n isLength = __webpack_require__(294),\n isObjectLike = __webpack_require__(346);\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_baseIsTypedArray.js?", + ); + + /***/ + }, + + /***/ 5389: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var baseMatches = __webpack_require__(3663),\n baseMatchesProperty = __webpack_require__(7978),\n identity = __webpack_require__(3488),\n isArray = __webpack_require__(6449),\n property = __webpack_require__(583);\n\n/**\n * The base implementation of `_.iteratee`.\n *\n * @private\n * @param {*} [value=_.identity] The value to convert to an iteratee.\n * @returns {Function} Returns the iteratee.\n */\nfunction baseIteratee(value) {\n // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.\n // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.\n if (typeof value == 'function') {\n return value;\n }\n if (value == null) {\n return identity;\n }\n if (typeof value == 'object') {\n return isArray(value)\n ? baseMatchesProperty(value[0], value[1])\n : baseMatches(value);\n }\n return property(value);\n}\n\nmodule.exports = baseIteratee;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_baseIteratee.js?", + ); + + /***/ + }, + + /***/ 8984: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var isPrototype = __webpack_require__(5527),\n nativeKeys = __webpack_require__(3650);\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeys;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_baseKeys.js?", + ); + + /***/ + }, + + /***/ 5128: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var baseEach = __webpack_require__(909),\n isArrayLike = __webpack_require__(4894);\n\n/**\n * The base implementation of `_.map` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction baseMap(collection, iteratee) {\n var index = -1,\n result = isArrayLike(collection) ? Array(collection.length) : [];\n\n baseEach(collection, function(value, key, collection) {\n result[++index] = iteratee(value, key, collection);\n });\n return result;\n}\n\nmodule.exports = baseMap;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_baseMap.js?', + ); + + /***/ + }, + + /***/ 3663: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var baseIsMatch = __webpack_require__(1799),\n getMatchData = __webpack_require__(776),\n matchesStrictComparable = __webpack_require__(7197);\n\n/**\n * The base implementation of `_.matches` which doesn't clone `source`.\n *\n * @private\n * @param {Object} source The object of property values to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction baseMatches(source) {\n var matchData = getMatchData(source);\n if (matchData.length == 1 && matchData[0][2]) {\n return matchesStrictComparable(matchData[0][0], matchData[0][1]);\n }\n return function(object) {\n return object === source || baseIsMatch(object, source, matchData);\n };\n}\n\nmodule.exports = baseMatches;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_baseMatches.js?", + ); + + /***/ + }, + + /***/ 7978: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var baseIsEqual = __webpack_require__(270),\n get = __webpack_require__(8156),\n hasIn = __webpack_require__(631),\n isKey = __webpack_require__(8586),\n isStrictComparable = __webpack_require__(756),\n matchesStrictComparable = __webpack_require__(7197),\n toKey = __webpack_require__(7797);\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.\n *\n * @private\n * @param {string} path The path of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction baseMatchesProperty(path, srcValue) {\n if (isKey(path) && isStrictComparable(srcValue)) {\n return matchesStrictComparable(toKey(path), srcValue);\n }\n return function(object) {\n var objValue = get(object, path);\n return (objValue === undefined && objValue === srcValue)\n ? hasIn(object, path)\n : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);\n };\n}\n\nmodule.exports = baseMatchesProperty;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_baseMatchesProperty.js?", + ); + + /***/ + }, + + /***/ 7237: /***/ (module) => { + eval( + '/**\n * The base implementation of `_.property` without support for deep paths.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\nfunction baseProperty(key) {\n return function(object) {\n return object == null ? undefined : object[key];\n };\n}\n\nmodule.exports = baseProperty;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_baseProperty.js?', + ); + + /***/ + }, + + /***/ 7255: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var baseGet = __webpack_require__(7422);\n\n/**\n * A specialized version of `baseProperty` which supports deep paths.\n *\n * @private\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\nfunction basePropertyDeep(path) {\n return function(object) {\n return baseGet(object, path);\n };\n}\n\nmodule.exports = basePropertyDeep;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_basePropertyDeep.js?', + ); + + /***/ + }, + + /***/ 8096: /***/ (module) => { + eval( + '/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\nmodule.exports = baseTimes;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_baseTimes.js?', + ); + + /***/ + }, + + /***/ 7556: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var Symbol = __webpack_require__(1873),\n arrayMap = __webpack_require__(4932),\n isArray = __webpack_require__(6449),\n isSymbol = __webpack_require__(4394);\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n/**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\nfunction baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n if (isArray(value)) {\n // Recursively convert values (susceptible to call stack limits).\n return arrayMap(value, baseToString) + '';\n }\n if (isSymbol(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nmodule.exports = baseToString;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_baseToString.js?", + ); + + /***/ + }, + + /***/ 7301: /***/ (module) => { + eval( + '/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nmodule.exports = baseUnary;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_baseUnary.js?', + ); + + /***/ + }, + + /***/ 5765: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var SetCache = __webpack_require__(8859),\n arrayIncludes = __webpack_require__(5325),\n arrayIncludesWith = __webpack_require__(9905),\n cacheHas = __webpack_require__(9219),\n createSet = __webpack_require__(4517),\n setToArray = __webpack_require__(4247);\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * The base implementation of `_.uniqBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n */\nfunction baseUniq(array, iteratee, comparator) {\n var index = -1,\n includes = arrayIncludes,\n length = array.length,\n isCommon = true,\n result = [],\n seen = result;\n\n if (comparator) {\n isCommon = false;\n includes = arrayIncludesWith;\n }\n else if (length >= LARGE_ARRAY_SIZE) {\n var set = iteratee ? null : createSet(array);\n if (set) {\n return setToArray(set);\n }\n isCommon = false;\n includes = cacheHas;\n seen = new SetCache;\n }\n else {\n seen = iteratee ? [] : result;\n }\n outer:\n while (++index < length) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n value = (comparator || value !== 0) ? value : 0;\n if (isCommon && computed === computed) {\n var seenIndex = seen.length;\n while (seenIndex--) {\n if (seen[seenIndex] === computed) {\n continue outer;\n }\n }\n if (iteratee) {\n seen.push(computed);\n }\n result.push(value);\n }\n else if (!includes(seen, computed, comparator)) {\n if (seen !== result) {\n seen.push(computed);\n }\n result.push(value);\n }\n }\n return result;\n}\n\nmodule.exports = baseUniq;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_baseUniq.js?', + ); + + /***/ + }, + + /***/ 9219: /***/ (module) => { + eval( + '/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\nmodule.exports = cacheHas;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_cacheHas.js?', + ); + + /***/ + }, + + /***/ 1769: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var isArray = __webpack_require__(6449),\n isKey = __webpack_require__(8586),\n stringToPath = __webpack_require__(1802),\n toString = __webpack_require__(3222);\n\n/**\n * Casts `value` to a path array if it's not one.\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {Object} [object] The object to query keys on.\n * @returns {Array} Returns the cast property path array.\n */\nfunction castPath(value, object) {\n if (isArray(value)) {\n return value;\n }\n return isKey(value, object) ? [value] : stringToPath(toString(value));\n}\n\nmodule.exports = castPath;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_castPath.js?", + ); + + /***/ + }, + + /***/ 5481: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var root = __webpack_require__(9325);\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_coreJsData.js?", + ); + + /***/ + }, + + /***/ 8329: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var isArrayLike = __webpack_require__(4894);\n\n/**\n * Creates a `baseEach` or `baseEachRight` function.\n *\n * @private\n * @param {Function} eachFunc The function to iterate over a collection.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseEach(eachFunc, fromRight) {\n return function(collection, iteratee) {\n if (collection == null) {\n return collection;\n }\n if (!isArrayLike(collection)) {\n return eachFunc(collection, iteratee);\n }\n var length = collection.length,\n index = fromRight ? length : -1,\n iterable = Object(collection);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (iteratee(iterable[index], index, iterable) === false) {\n break;\n }\n }\n return collection;\n };\n}\n\nmodule.exports = createBaseEach;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_createBaseEach.js?', + ); + + /***/ + }, + + /***/ 3221: /***/ (module) => { + eval( + '/**\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseFor(fromRight) {\n return function(object, iteratee, keysFunc) {\n var index = -1,\n iterable = Object(object),\n props = keysFunc(object),\n length = props.length;\n\n while (length--) {\n var key = props[fromRight ? length : ++index];\n if (iteratee(iterable[key], key, iterable) === false) {\n break;\n }\n }\n return object;\n };\n}\n\nmodule.exports = createBaseFor;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_createBaseFor.js?', + ); + + /***/ + }, + + /***/ 4517: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var Set = __webpack_require__(6545),\n noop = __webpack_require__(3950),\n setToArray = __webpack_require__(4247);\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * Creates a set object of `values`.\n *\n * @private\n * @param {Array} values The values to add to the set.\n * @returns {Object} Returns the new set.\n */\nvar createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {\n return new Set(values);\n};\n\nmodule.exports = createSet;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_createSet.js?', + ); + + /***/ + }, + + /***/ 5911: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var SetCache = __webpack_require__(8859),\n arraySome = __webpack_require__(4248),\n cacheHas = __webpack_require__(9219);\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalArrays;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_equalArrays.js?", + ); + + /***/ + }, + + /***/ 1986: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var Symbol = __webpack_require__(1873),\n Uint8Array = __webpack_require__(7828),\n eq = __webpack_require__(5288),\n equalArrays = __webpack_require__(5911),\n mapToArray = __webpack_require__(317),\n setToArray = __webpack_require__(4247);\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\nmodule.exports = equalByTag;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_equalByTag.js?", + ); + + /***/ + }, + + /***/ 689: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var getAllKeys = __webpack_require__(2);\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalObjects;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_equalObjects.js?", + ); + + /***/ + }, + + /***/ 4840: /***/ (module) => { + eval( + "/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_freeGlobal.js?", + ); + + /***/ + }, + + /***/ 2: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var baseGetAllKeys = __webpack_require__(2199),\n getSymbols = __webpack_require__(4664),\n keys = __webpack_require__(5950);\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\nmodule.exports = getAllKeys;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_getAllKeys.js?', + ); + + /***/ + }, + + /***/ 2651: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var isKeyable = __webpack_require__(4218);\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nmodule.exports = getMapData;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_getMapData.js?", + ); + + /***/ + }, + + /***/ 776: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var isStrictComparable = __webpack_require__(756),\n keys = __webpack_require__(5950);\n\n/**\n * Gets the property names, values, and compare flags of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the match data of `object`.\n */\nfunction getMatchData(object) {\n var result = keys(object),\n length = result.length;\n\n while (length--) {\n var key = result[length],\n value = object[key];\n\n result[length] = [key, value, isStrictComparable(value)];\n }\n return result;\n}\n\nmodule.exports = getMatchData;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_getMatchData.js?', + ); + + /***/ + }, + + /***/ 6110: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var baseIsNative = __webpack_require__(5083),\n getValue = __webpack_require__(392);\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_getNative.js?", + ); + + /***/ + }, + + /***/ 659: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var Symbol = __webpack_require__(1873);\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_getRawTag.js?', + ); + + /***/ + }, + + /***/ 4664: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var arrayFilter = __webpack_require__(9770),\n stubArray = __webpack_require__(3345);\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\nmodule.exports = getSymbols;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_getSymbols.js?', + ); + + /***/ + }, + + /***/ 5861: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var DataView = __webpack_require__(5580),\n Map = __webpack_require__(8223),\n Promise = __webpack_require__(2804),\n Set = __webpack_require__(6545),\n WeakMap = __webpack_require__(8303),\n baseGetTag = __webpack_require__(2552),\n toSource = __webpack_require__(7473);\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\nmodule.exports = getTag;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_getTag.js?", + ); + + /***/ + }, + + /***/ 392: /***/ (module) => { + eval( + '/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_getValue.js?', + ); + + /***/ + }, + + /***/ 9326: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var castPath = __webpack_require__(1769),\n isArguments = __webpack_require__(2428),\n isArray = __webpack_require__(6449),\n isIndex = __webpack_require__(361),\n isLength = __webpack_require__(294),\n toKey = __webpack_require__(7797);\n\n/**\n * Checks if `path` exists on `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @param {Function} hasFunc The function to check properties.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n */\nfunction hasPath(object, path, hasFunc) {\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n result = false;\n\n while (++index < length) {\n var key = toKey(path[index]);\n if (!(result = object != null && hasFunc(object, key))) {\n break;\n }\n object = object[key];\n }\n if (result || ++index != length) {\n return result;\n }\n length = object == null ? 0 : object.length;\n return !!length && isLength(length) && isIndex(key, length) &&\n (isArray(object) || isArguments(object));\n}\n\nmodule.exports = hasPath;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_hasPath.js?', + ); + + /***/ + }, + + /***/ 2032: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var nativeCreate = __webpack_require__(1042);\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nmodule.exports = hashClear;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_hashClear.js?', + ); + + /***/ + }, + + /***/ 3862: /***/ (module) => { + eval( + '/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = hashDelete;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_hashDelete.js?', + ); + + /***/ + }, + + /***/ 6721: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var nativeCreate = __webpack_require__(1042);\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_hashGet.js?", + ); + + /***/ + }, + + /***/ 2749: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var nativeCreate = __webpack_require__(1042);\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_hashHas.js?', + ); + + /***/ + }, + + /***/ 5749: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var nativeCreate = __webpack_require__(1042);\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nmodule.exports = hashSet;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_hashSet.js?", + ); + + /***/ + }, + + /***/ 5891: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var Symbol = __webpack_require__(1873),\n isArguments = __webpack_require__(2428),\n isArray = __webpack_require__(6449);\n\n/** Built-in value references. */\nvar spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined;\n\n/**\n * Checks if `value` is a flattenable `arguments` object or array.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.\n */\nfunction isFlattenable(value) {\n return isArray(value) || isArguments(value) ||\n !!(spreadableSymbol && value && value[spreadableSymbol]);\n}\n\nmodule.exports = isFlattenable;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_isFlattenable.js?', + ); + + /***/ + }, + + /***/ 361: /***/ (module) => { + eval( + "/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_isIndex.js?", + ); + + /***/ + }, + + /***/ 8586: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var isArray = __webpack_require__(6449),\n isSymbol = __webpack_require__(4394);\n\n/** Used to match property names within property paths. */\nvar reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n reIsPlainProp = /^\\w*$/;\n\n/**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\nfunction isKey(value, object) {\n if (isArray(value)) {\n return false;\n }\n var type = typeof value;\n if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n value == null || isSymbol(value)) {\n return true;\n }\n return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n (object != null && value in Object(object));\n}\n\nmodule.exports = isKey;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_isKey.js?", + ); + + /***/ + }, + + /***/ 4218: /***/ (module) => { + eval( + "/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nmodule.exports = isKeyable;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_isKeyable.js?", + ); + + /***/ + }, + + /***/ 7296: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var coreJsData = __webpack_require__(5481);\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_isMasked.js?", + ); + + /***/ + }, + + /***/ 5527: /***/ (module) => { + eval( + "/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\nmodule.exports = isPrototype;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_isPrototype.js?", + ); + + /***/ + }, + + /***/ 756: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var isObject = __webpack_require__(3805);\n\n/**\n * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` if suitable for strict\n * equality comparisons, else `false`.\n */\nfunction isStrictComparable(value) {\n return value === value && !isObject(value);\n}\n\nmodule.exports = isStrictComparable;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_isStrictComparable.js?', + ); + + /***/ + }, + + /***/ 3702: /***/ (module) => { + eval( + '/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_listCacheClear.js?', + ); + + /***/ + }, + + /***/ 80: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var assocIndexOf = __webpack_require__(6025);\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_listCacheDelete.js?', + ); + + /***/ + }, + + /***/ 4739: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var assocIndexOf = __webpack_require__(6025);\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_listCacheGet.js?', + ); + + /***/ + }, + + /***/ 8655: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var assocIndexOf = __webpack_require__(6025);\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_listCacheHas.js?', + ); + + /***/ + }, + + /***/ 1175: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var assocIndexOf = __webpack_require__(6025);\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nmodule.exports = listCacheSet;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_listCacheSet.js?', + ); + + /***/ + }, + + /***/ 3040: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var Hash = __webpack_require__(1549),\n ListCache = __webpack_require__(79),\n Map = __webpack_require__(8223);\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nmodule.exports = mapCacheClear;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_mapCacheClear.js?", + ); + + /***/ + }, + + /***/ 7670: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var getMapData = __webpack_require__(2651);\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = mapCacheDelete;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_mapCacheDelete.js?", + ); + + /***/ + }, + + /***/ 289: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var getMapData = __webpack_require__(2651);\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_mapCacheGet.js?', + ); + + /***/ + }, + + /***/ 4509: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var getMapData = __webpack_require__(2651);\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_mapCacheHas.js?', + ); + + /***/ + }, + + /***/ 2949: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var getMapData = __webpack_require__(2651);\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nmodule.exports = mapCacheSet;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_mapCacheSet.js?', + ); + + /***/ + }, + + /***/ 317: /***/ (module) => { + eval( + '/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\nmodule.exports = mapToArray;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_mapToArray.js?', + ); + + /***/ + }, + + /***/ 7197: /***/ (module) => { + eval( + '/**\n * A specialized version of `matchesProperty` for source values suitable\n * for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction matchesStrictComparable(key, srcValue) {\n return function(object) {\n if (object == null) {\n return false;\n }\n return object[key] === srcValue &&\n (srcValue !== undefined || (key in Object(object)));\n };\n}\n\nmodule.exports = matchesStrictComparable;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_matchesStrictComparable.js?', + ); + + /***/ + }, + + /***/ 2224: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var memoize = __webpack_require__(104);\n\n/** Used as the maximum memoize cache size. */\nvar MAX_MEMOIZE_SIZE = 500;\n\n/**\n * A specialized version of `_.memoize` which clears the memoized function's\n * cache when it exceeds `MAX_MEMOIZE_SIZE`.\n *\n * @private\n * @param {Function} func The function to have its output memoized.\n * @returns {Function} Returns the new memoized function.\n */\nfunction memoizeCapped(func) {\n var result = memoize(func, function(key) {\n if (cache.size === MAX_MEMOIZE_SIZE) {\n cache.clear();\n }\n return key;\n });\n\n var cache = result.cache;\n return result;\n}\n\nmodule.exports = memoizeCapped;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_memoizeCapped.js?", + ); + + /***/ + }, + + /***/ 1042: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var getNative = __webpack_require__(6110);\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_nativeCreate.js?", + ); + + /***/ + }, + + /***/ 3650: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var overArg = __webpack_require__(4335);\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nmodule.exports = nativeKeys;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_nativeKeys.js?', + ); + + /***/ + }, + + /***/ 6009: /***/ (module, exports, __webpack_require__) => { + eval( + "/* module decorator */ module = __webpack_require__.nmd(module);\nvar freeGlobal = __webpack_require__(4840);\n\n/** Detect free variable `exports`. */\nvar freeExports = true && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && \"object\" == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_nodeUtil.js?", + ); + + /***/ + }, + + /***/ 9350: /***/ (module) => { + eval( + '/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_objectToString.js?', + ); + + /***/ + }, + + /***/ 4335: /***/ (module) => { + eval( + '/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_overArg.js?', + ); + + /***/ + }, + + /***/ 9325: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var freeGlobal = __webpack_require__(4840);\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_root.js?", + ); + + /***/ + }, + + /***/ 1380: /***/ (module) => { + eval( + "/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\nmodule.exports = setCacheAdd;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_setCacheAdd.js?", + ); + + /***/ + }, + + /***/ 1459: /***/ (module) => { + eval( + '/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\nmodule.exports = setCacheHas;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_setCacheHas.js?', + ); + + /***/ + }, + + /***/ 4247: /***/ (module) => { + eval( + '/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\nmodule.exports = setToArray;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_setToArray.js?', + ); + + /***/ + }, + + /***/ 1420: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var ListCache = __webpack_require__(79);\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\nmodule.exports = stackClear;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_stackClear.js?', + ); + + /***/ + }, + + /***/ 938: /***/ (module) => { + eval( + "/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\nmodule.exports = stackDelete;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_stackDelete.js?", + ); + + /***/ + }, + + /***/ 3605: /***/ (module) => { + eval( + '/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\nmodule.exports = stackGet;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_stackGet.js?', + ); + + /***/ + }, + + /***/ 9817: /***/ (module) => { + eval( + '/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\nmodule.exports = stackHas;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_stackHas.js?', + ); + + /***/ + }, + + /***/ 945: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var ListCache = __webpack_require__(79),\n Map = __webpack_require__(8223),\n MapCache = __webpack_require__(3661);\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\nmodule.exports = stackSet;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_stackSet.js?', + ); + + /***/ + }, + + /***/ 6959: /***/ (module) => { + eval( + '/**\n * A specialized version of `_.indexOf` which performs strict equality\n * comparisons of values, i.e. `===`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction strictIndexOf(array, value, fromIndex) {\n var index = fromIndex - 1,\n length = array.length;\n\n while (++index < length) {\n if (array[index] === value) {\n return index;\n }\n }\n return -1;\n}\n\nmodule.exports = strictIndexOf;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_strictIndexOf.js?', + ); + + /***/ + }, + + /***/ 1802: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var memoizeCapped = __webpack_require__(2224);\n\n/** Used to match property names within property paths. */\nvar rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n/** Used to match backslashes in property paths. */\nvar reEscapeChar = /\\\\(\\\\)?/g;\n\n/**\n * Converts `string` to a property path array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the property path array.\n */\nvar stringToPath = memoizeCapped(function(string) {\n var result = [];\n if (string.charCodeAt(0) === 46 /* . */) {\n result.push('');\n }\n string.replace(rePropName, function(match, number, quote, subString) {\n result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));\n });\n return result;\n});\n\nmodule.exports = stringToPath;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_stringToPath.js?", + ); + + /***/ + }, + + /***/ 7797: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var isSymbol = __webpack_require__(4394);\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\nfunction toKey(value) {\n if (typeof value == 'string' || isSymbol(value)) {\n return value;\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nmodule.exports = toKey;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_toKey.js?", + ); + + /***/ + }, + + /***/ 7473: /***/ (module) => { + eval( + "/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nmodule.exports = toSource;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/_toSource.js?", + ); + + /***/ + }, + + /***/ 5288: /***/ (module) => { + eval( + "/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/eq.js?", + ); + + /***/ + }, + + /***/ 7307: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var baseFlatten = __webpack_require__(3120),\n map = __webpack_require__(5378);\n\n/**\n * Creates a flattened array of values by running each element in `collection`\n * thru `iteratee` and flattening the mapped results. The iteratee is invoked\n * with three arguments: (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * function duplicate(n) {\n * return [n, n];\n * }\n *\n * _.flatMap([1, 2], duplicate);\n * // => [1, 1, 2, 2]\n */\nfunction flatMap(collection, iteratee) {\n return baseFlatten(map(collection, iteratee), 1);\n}\n\nmodule.exports = flatMap;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/flatMap.js?', + ); + + /***/ + }, + + /***/ 8156: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var baseGet = __webpack_require__(7422);\n\n/**\n * Gets the value at `path` of `object`. If the resolved value is\n * `undefined`, the `defaultValue` is returned in its place.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.get(object, 'a[0].b.c');\n * // => 3\n *\n * _.get(object, ['a', '0', 'b', 'c']);\n * // => 3\n *\n * _.get(object, 'a.b.c', 'default');\n * // => 'default'\n */\nfunction get(object, path, defaultValue) {\n var result = object == null ? undefined : baseGet(object, path);\n return result === undefined ? defaultValue : result;\n}\n\nmodule.exports = get;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/get.js?", + ); + + /***/ + }, + + /***/ 631: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var baseHasIn = __webpack_require__(8077),\n hasPath = __webpack_require__(9326);\n\n/**\n * Checks if `path` is a direct or inherited property of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.hasIn(object, 'a');\n * // => true\n *\n * _.hasIn(object, 'a.b');\n * // => true\n *\n * _.hasIn(object, ['a', 'b']);\n * // => true\n *\n * _.hasIn(object, 'b');\n * // => false\n */\nfunction hasIn(object, path) {\n return object != null && hasPath(object, path, baseHasIn);\n}\n\nmodule.exports = hasIn;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/hasIn.js?", + ); + + /***/ + }, + + /***/ 3488: /***/ (module) => { + eval( + "/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\nmodule.exports = identity;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/identity.js?", + ); + + /***/ + }, + + /***/ 2428: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var baseIsArguments = __webpack_require__(7534),\n isObjectLike = __webpack_require__(346);\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/isArguments.js?", + ); + + /***/ + }, + + /***/ 6449: /***/ (module) => { + eval( + "/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/isArray.js?", + ); + + /***/ + }, + + /***/ 4894: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var isFunction = __webpack_require__(1882),\n isLength = __webpack_require__(294);\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/isArrayLike.js?", + ); + + /***/ + }, + + /***/ 3656: /***/ (module, exports, __webpack_require__) => { + eval( + '/* module decorator */ module = __webpack_require__.nmd(module);\nvar root = __webpack_require__(9325),\n stubFalse = __webpack_require__(9935);\n\n/** Detect free variable `exports`. */\nvar freeExports = true && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && "object" == \'object\' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nmodule.exports = isBuffer;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/isBuffer.js?', + ); + + /***/ + }, + + /***/ 1882: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var baseGetTag = __webpack_require__(2552),\n isObject = __webpack_require__(3805);\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/isFunction.js?", + ); + + /***/ + }, + + /***/ 294: /***/ (module) => { + eval( + "/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/isLength.js?", + ); + + /***/ + }, + + /***/ 3805: /***/ (module) => { + eval( + "/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/isObject.js?", + ); + + /***/ + }, + + /***/ 346: /***/ (module) => { + eval( + "/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/isObjectLike.js?", + ); + + /***/ + }, + + /***/ 4394: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var baseGetTag = __webpack_require__(2552),\n isObjectLike = __webpack_require__(346);\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nmodule.exports = isSymbol;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/isSymbol.js?", + ); + + /***/ + }, + + /***/ 7167: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var baseIsTypedArray = __webpack_require__(4901),\n baseUnary = __webpack_require__(7301),\n nodeUtil = __webpack_require__(6009);\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/isTypedArray.js?', + ); + + /***/ + }, + + /***/ 5950: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var arrayLikeKeys = __webpack_require__(695),\n baseKeys = __webpack_require__(8984),\n isArrayLike = __webpack_require__(4894);\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = keys;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/keys.js?", + ); + + /***/ + }, + + /***/ 2543: /***/ function (module, exports, __webpack_require__) { + eval( + "/* module decorator */ module = __webpack_require__.nmd(module);\nvar __WEBPACK_AMD_DEFINE_RESULT__;/**\n * @license\n * Lodash <https://lodash.com/>\n * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n;(function() {\n\n /** Used as a safe reference for `undefined` in pre-ES5 environments. */\n var undefined;\n\n /** Used as the semantic version number. */\n var VERSION = '4.17.21';\n\n /** Used as the size to enable large array optimizations. */\n var LARGE_ARRAY_SIZE = 200;\n\n /** Error message constants. */\n var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.',\n FUNC_ERROR_TEXT = 'Expected a function',\n INVALID_TEMPL_VAR_ERROR_TEXT = 'Invalid `variable` option passed into `_.template`';\n\n /** Used to stand-in for `undefined` hash values. */\n var HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n /** Used as the maximum memoize cache size. */\n var MAX_MEMOIZE_SIZE = 500;\n\n /** Used as the internal argument placeholder. */\n var PLACEHOLDER = '__lodash_placeholder__';\n\n /** Used to compose bitmasks for cloning. */\n var CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n /** Used to compose bitmasks for value comparisons. */\n var COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n /** Used to compose bitmasks for function metadata. */\n var WRAP_BIND_FLAG = 1,\n WRAP_BIND_KEY_FLAG = 2,\n WRAP_CURRY_BOUND_FLAG = 4,\n WRAP_CURRY_FLAG = 8,\n WRAP_CURRY_RIGHT_FLAG = 16,\n WRAP_PARTIAL_FLAG = 32,\n WRAP_PARTIAL_RIGHT_FLAG = 64,\n WRAP_ARY_FLAG = 128,\n WRAP_REARG_FLAG = 256,\n WRAP_FLIP_FLAG = 512;\n\n /** Used as default options for `_.truncate`. */\n var DEFAULT_TRUNC_LENGTH = 30,\n DEFAULT_TRUNC_OMISSION = '...';\n\n /** Used to detect hot functions by number of calls within a span of milliseconds. */\n var HOT_COUNT = 800,\n HOT_SPAN = 16;\n\n /** Used to indicate the type of lazy iteratees. */\n var LAZY_FILTER_FLAG = 1,\n LAZY_MAP_FLAG = 2,\n LAZY_WHILE_FLAG = 3;\n\n /** Used as references for various `Number` constants. */\n var INFINITY = 1 / 0,\n MAX_SAFE_INTEGER = 9007199254740991,\n MAX_INTEGER = 1.7976931348623157e+308,\n NAN = 0 / 0;\n\n /** Used as references for the maximum length and index of an array. */\n var MAX_ARRAY_LENGTH = 4294967295,\n MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1,\n HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;\n\n /** Used to associate wrap methods with their bit flags. */\n var wrapFlags = [\n ['ary', WRAP_ARY_FLAG],\n ['bind', WRAP_BIND_FLAG],\n ['bindKey', WRAP_BIND_KEY_FLAG],\n ['curry', WRAP_CURRY_FLAG],\n ['curryRight', WRAP_CURRY_RIGHT_FLAG],\n ['flip', WRAP_FLIP_FLAG],\n ['partial', WRAP_PARTIAL_FLAG],\n ['partialRight', WRAP_PARTIAL_RIGHT_FLAG],\n ['rearg', WRAP_REARG_FLAG]\n ];\n\n /** `Object#toString` result references. */\n var argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n asyncTag = '[object AsyncFunction]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n domExcTag = '[object DOMException]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n nullTag = '[object Null]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n proxyTag = '[object Proxy]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n undefinedTag = '[object Undefined]',\n weakMapTag = '[object WeakMap]',\n weakSetTag = '[object WeakSet]';\n\n var arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n /** Used to match empty string literals in compiled template source. */\n var reEmptyStringLeading = /\\b__p \\+= '';/g,\n reEmptyStringMiddle = /\\b(__p \\+=) '' \\+/g,\n reEmptyStringTrailing = /(__e\\(.*?\\)|\\b__t\\)) \\+\\n'';/g;\n\n /** Used to match HTML entities and HTML characters. */\n var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g,\n reUnescapedHtml = /[&<>\"']/g,\n reHasEscapedHtml = RegExp(reEscapedHtml.source),\n reHasUnescapedHtml = RegExp(reUnescapedHtml.source);\n\n /** Used to match template delimiters. */\n var reEscape = /<%-([\\s\\S]+?)%>/g,\n reEvaluate = /<%([\\s\\S]+?)%>/g,\n reInterpolate = /<%=([\\s\\S]+?)%>/g;\n\n /** Used to match property names within property paths. */\n var reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n reIsPlainProp = /^\\w*$/,\n rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n /**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\n var reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g,\n reHasRegExpChar = RegExp(reRegExpChar.source);\n\n /** Used to match leading whitespace. */\n var reTrimStart = /^\\s+/;\n\n /** Used to match a single whitespace character. */\n var reWhitespace = /\\s/;\n\n /** Used to match wrap detail comments. */\n var reWrapComment = /\\{(?:\\n\\/\\* \\[wrapped with .+\\] \\*\\/)?\\n?/,\n reWrapDetails = /\\{\\n\\/\\* \\[wrapped with (.+)\\] \\*/,\n reSplitDetails = /,? & /;\n\n /** Used to match words composed of alphanumeric characters. */\n var reAsciiWord = /[^\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\x7f]+/g;\n\n /**\n * Used to validate the `validate` option in `_.template` variable.\n *\n * Forbids characters which could potentially change the meaning of the function argument definition:\n * - \"(),\" (modification of function parameters)\n * - \"=\" (default value)\n * - \"[]{}\" (destructuring of function parameters)\n * - \"/\" (beginning of a comment)\n * - whitespace\n */\n var reForbiddenIdentifierChars = /[()=,{}\\[\\]\\/\\s]/;\n\n /** Used to match backslashes in property paths. */\n var reEscapeChar = /\\\\(\\\\)?/g;\n\n /**\n * Used to match\n * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components).\n */\n var reEsTemplate = /\\$\\{([^\\\\}]*(?:\\\\.[^\\\\}]*)*)\\}/g;\n\n /** Used to match `RegExp` flags from their coerced string values. */\n var reFlags = /\\w*$/;\n\n /** Used to detect bad signed hexadecimal string values. */\n var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n /** Used to detect binary string values. */\n var reIsBinary = /^0b[01]+$/i;\n\n /** Used to detect host constructors (Safari). */\n var reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n /** Used to detect octal string values. */\n var reIsOctal = /^0o[0-7]+$/i;\n\n /** Used to detect unsigned integer values. */\n var reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n /** Used to match Latin Unicode letters (excluding mathematical operators). */\n var reLatin = /[\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\xff\\u0100-\\u017f]/g;\n\n /** Used to ensure capturing order of template delimiters. */\n var reNoMatch = /($^)/;\n\n /** Used to match unescaped characters in compiled string literals. */\n var reUnescapedString = /['\\n\\r\\u2028\\u2029\\\\]/g;\n\n /** Used to compose unicode character classes. */\n var rsAstralRange = '\\\\ud800-\\\\udfff',\n rsComboMarksRange = '\\\\u0300-\\\\u036f',\n reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,\n rsDingbatRange = '\\\\u2700-\\\\u27bf',\n rsLowerRange = 'a-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xff',\n rsMathOpRange = '\\\\xac\\\\xb1\\\\xd7\\\\xf7',\n rsNonCharRange = '\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf',\n rsPunctuationRange = '\\\\u2000-\\\\u206f',\n rsSpaceRange = ' \\\\t\\\\x0b\\\\f\\\\xa0\\\\ufeff\\\\n\\\\r\\\\u2028\\\\u2029\\\\u1680\\\\u180e\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200a\\\\u202f\\\\u205f\\\\u3000',\n rsUpperRange = 'A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde',\n rsVarRange = '\\\\ufe0e\\\\ufe0f',\n rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;\n\n /** Used to compose unicode capture groups. */\n var rsApos = \"['\\u2019]\",\n rsAstral = '[' + rsAstralRange + ']',\n rsBreak = '[' + rsBreakRange + ']',\n rsCombo = '[' + rsComboRange + ']',\n rsDigits = '\\\\d+',\n rsDingbat = '[' + rsDingbatRange + ']',\n rsLower = '[' + rsLowerRange + ']',\n rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',\n rsFitz = '\\\\ud83c[\\\\udffb-\\\\udfff]',\n rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',\n rsNonAstral = '[^' + rsAstralRange + ']',\n rsRegional = '(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}',\n rsSurrPair = '[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]',\n rsUpper = '[' + rsUpperRange + ']',\n rsZWJ = '\\\\u200d';\n\n /** Used to compose unicode regexes. */\n var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',\n rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',\n rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',\n rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',\n reOptMod = rsModifier + '?',\n rsOptVar = '[' + rsVarRange + ']?',\n rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',\n rsOrdLower = '\\\\d*(?:1st|2nd|3rd|(?![123])\\\\dth)(?=\\\\b|[A-Z_])',\n rsOrdUpper = '\\\\d*(?:1ST|2ND|3RD|(?![123])\\\\dTH)(?=\\\\b|[a-z_])',\n rsSeq = rsOptVar + reOptMod + rsOptJoin,\n rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq,\n rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';\n\n /** Used to match apostrophes. */\n var reApos = RegExp(rsApos, 'g');\n\n /**\n * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and\n * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).\n */\n var reComboMark = RegExp(rsCombo, 'g');\n\n /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */\n var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');\n\n /** Used to match complex or compound words. */\n var reUnicodeWord = RegExp([\n rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',\n rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',\n rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,\n rsUpper + '+' + rsOptContrUpper,\n rsOrdUpper,\n rsOrdLower,\n rsDigits,\n rsEmoji\n ].join('|'), 'g');\n\n /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */\n var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']');\n\n /** Used to detect strings that need a more robust regexp to match words. */\n var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;\n\n /** Used to assign default `context` object properties. */\n var contextProps = [\n 'Array', 'Buffer', 'DataView', 'Date', 'Error', 'Float32Array', 'Float64Array',\n 'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object',\n 'Promise', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', 'Uint8Array',\n 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap',\n '_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout'\n ];\n\n /** Used to make template sourceURLs easier to identify. */\n var templateCounter = -1;\n\n /** Used to identify `toStringTag` values of typed arrays. */\n var typedArrayTags = {};\n typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\n typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\n typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\n typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\n typedArrayTags[uint32Tag] = true;\n typedArrayTags[argsTag] = typedArrayTags[arrayTag] =\n typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\n typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\n typedArrayTags[errorTag] = typedArrayTags[funcTag] =\n typedArrayTags[mapTag] = typedArrayTags[numberTag] =\n typedArrayTags[objectTag] = typedArrayTags[regexpTag] =\n typedArrayTags[setTag] = typedArrayTags[stringTag] =\n typedArrayTags[weakMapTag] = false;\n\n /** Used to identify `toStringTag` values supported by `_.clone`. */\n var cloneableTags = {};\n cloneableTags[argsTag] = cloneableTags[arrayTag] =\n cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\n cloneableTags[boolTag] = cloneableTags[dateTag] =\n cloneableTags[float32Tag] = cloneableTags[float64Tag] =\n cloneableTags[int8Tag] = cloneableTags[int16Tag] =\n cloneableTags[int32Tag] = cloneableTags[mapTag] =\n cloneableTags[numberTag] = cloneableTags[objectTag] =\n cloneableTags[regexpTag] = cloneableTags[setTag] =\n cloneableTags[stringTag] = cloneableTags[symbolTag] =\n cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\n cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\n cloneableTags[errorTag] = cloneableTags[funcTag] =\n cloneableTags[weakMapTag] = false;\n\n /** Used to map Latin Unicode letters to basic Latin letters. */\n var deburredLetters = {\n // Latin-1 Supplement block.\n '\\xc0': 'A', '\\xc1': 'A', '\\xc2': 'A', '\\xc3': 'A', '\\xc4': 'A', '\\xc5': 'A',\n '\\xe0': 'a', '\\xe1': 'a', '\\xe2': 'a', '\\xe3': 'a', '\\xe4': 'a', '\\xe5': 'a',\n '\\xc7': 'C', '\\xe7': 'c',\n '\\xd0': 'D', '\\xf0': 'd',\n '\\xc8': 'E', '\\xc9': 'E', '\\xca': 'E', '\\xcb': 'E',\n '\\xe8': 'e', '\\xe9': 'e', '\\xea': 'e', '\\xeb': 'e',\n '\\xcc': 'I', '\\xcd': 'I', '\\xce': 'I', '\\xcf': 'I',\n '\\xec': 'i', '\\xed': 'i', '\\xee': 'i', '\\xef': 'i',\n '\\xd1': 'N', '\\xf1': 'n',\n '\\xd2': 'O', '\\xd3': 'O', '\\xd4': 'O', '\\xd5': 'O', '\\xd6': 'O', '\\xd8': 'O',\n '\\xf2': 'o', '\\xf3': 'o', '\\xf4': 'o', '\\xf5': 'o', '\\xf6': 'o', '\\xf8': 'o',\n '\\xd9': 'U', '\\xda': 'U', '\\xdb': 'U', '\\xdc': 'U',\n '\\xf9': 'u', '\\xfa': 'u', '\\xfb': 'u', '\\xfc': 'u',\n '\\xdd': 'Y', '\\xfd': 'y', '\\xff': 'y',\n '\\xc6': 'Ae', '\\xe6': 'ae',\n '\\xde': 'Th', '\\xfe': 'th',\n '\\xdf': 'ss',\n // Latin Extended-A block.\n '\\u0100': 'A', '\\u0102': 'A', '\\u0104': 'A',\n '\\u0101': 'a', '\\u0103': 'a', '\\u0105': 'a',\n '\\u0106': 'C', '\\u0108': 'C', '\\u010a': 'C', '\\u010c': 'C',\n '\\u0107': 'c', '\\u0109': 'c', '\\u010b': 'c', '\\u010d': 'c',\n '\\u010e': 'D', '\\u0110': 'D', '\\u010f': 'd', '\\u0111': 'd',\n '\\u0112': 'E', '\\u0114': 'E', '\\u0116': 'E', '\\u0118': 'E', '\\u011a': 'E',\n '\\u0113': 'e', '\\u0115': 'e', '\\u0117': 'e', '\\u0119': 'e', '\\u011b': 'e',\n '\\u011c': 'G', '\\u011e': 'G', '\\u0120': 'G', '\\u0122': 'G',\n '\\u011d': 'g', '\\u011f': 'g', '\\u0121': 'g', '\\u0123': 'g',\n '\\u0124': 'H', '\\u0126': 'H', '\\u0125': 'h', '\\u0127': 'h',\n '\\u0128': 'I', '\\u012a': 'I', '\\u012c': 'I', '\\u012e': 'I', '\\u0130': 'I',\n '\\u0129': 'i', '\\u012b': 'i', '\\u012d': 'i', '\\u012f': 'i', '\\u0131': 'i',\n '\\u0134': 'J', '\\u0135': 'j',\n '\\u0136': 'K', '\\u0137': 'k', '\\u0138': 'k',\n '\\u0139': 'L', '\\u013b': 'L', '\\u013d': 'L', '\\u013f': 'L', '\\u0141': 'L',\n '\\u013a': 'l', '\\u013c': 'l', '\\u013e': 'l', '\\u0140': 'l', '\\u0142': 'l',\n '\\u0143': 'N', '\\u0145': 'N', '\\u0147': 'N', '\\u014a': 'N',\n '\\u0144': 'n', '\\u0146': 'n', '\\u0148': 'n', '\\u014b': 'n',\n '\\u014c': 'O', '\\u014e': 'O', '\\u0150': 'O',\n '\\u014d': 'o', '\\u014f': 'o', '\\u0151': 'o',\n '\\u0154': 'R', '\\u0156': 'R', '\\u0158': 'R',\n '\\u0155': 'r', '\\u0157': 'r', '\\u0159': 'r',\n '\\u015a': 'S', '\\u015c': 'S', '\\u015e': 'S', '\\u0160': 'S',\n '\\u015b': 's', '\\u015d': 's', '\\u015f': 's', '\\u0161': 's',\n '\\u0162': 'T', '\\u0164': 'T', '\\u0166': 'T',\n '\\u0163': 't', '\\u0165': 't', '\\u0167': 't',\n '\\u0168': 'U', '\\u016a': 'U', '\\u016c': 'U', '\\u016e': 'U', '\\u0170': 'U', '\\u0172': 'U',\n '\\u0169': 'u', '\\u016b': 'u', '\\u016d': 'u', '\\u016f': 'u', '\\u0171': 'u', '\\u0173': 'u',\n '\\u0174': 'W', '\\u0175': 'w',\n '\\u0176': 'Y', '\\u0177': 'y', '\\u0178': 'Y',\n '\\u0179': 'Z', '\\u017b': 'Z', '\\u017d': 'Z',\n '\\u017a': 'z', '\\u017c': 'z', '\\u017e': 'z',\n '\\u0132': 'IJ', '\\u0133': 'ij',\n '\\u0152': 'Oe', '\\u0153': 'oe',\n '\\u0149': \"'n\", '\\u017f': 's'\n };\n\n /** Used to map characters to HTML entities. */\n var htmlEscapes = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": '''\n };\n\n /** Used to map HTML entities to characters. */\n var htmlUnescapes = {\n '&': '&',\n '<': '<',\n '>': '>',\n '"': '\"',\n ''': \"'\"\n };\n\n /** Used to escape characters for inclusion in compiled string literals. */\n var stringEscapes = {\n '\\\\': '\\\\',\n \"'\": \"'\",\n '\\n': 'n',\n '\\r': 'r',\n '\\u2028': 'u2028',\n '\\u2029': 'u2029'\n };\n\n /** Built-in method references without a dependency on `root`. */\n var freeParseFloat = parseFloat,\n freeParseInt = parseInt;\n\n /** Detect free variable `global` from Node.js. */\n var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n /** Detect free variable `self`. */\n var freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n /** Used as a reference to the global object. */\n var root = freeGlobal || freeSelf || Function('return this')();\n\n /** Detect free variable `exports`. */\n var freeExports = true && exports && !exports.nodeType && exports;\n\n /** Detect free variable `module`. */\n var freeModule = freeExports && \"object\" == 'object' && module && !module.nodeType && module;\n\n /** Detect the popular CommonJS extension `module.exports`. */\n var moduleExports = freeModule && freeModule.exports === freeExports;\n\n /** Detect free variable `process` from Node.js. */\n var freeProcess = moduleExports && freeGlobal.process;\n\n /** Used to access faster Node.js helpers. */\n var nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n }());\n\n /* Node.js helper references. */\n var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer,\n nodeIsDate = nodeUtil && nodeUtil.isDate,\n nodeIsMap = nodeUtil && nodeUtil.isMap,\n nodeIsRegExp = nodeUtil && nodeUtil.isRegExp,\n nodeIsSet = nodeUtil && nodeUtil.isSet,\n nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n /*--------------------------------------------------------------------------*/\n\n /**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\n function apply(func, thisArg, args) {\n switch (args.length) {\n case 0: return func.call(thisArg);\n case 1: return func.call(thisArg, args[0]);\n case 2: return func.call(thisArg, args[0], args[1]);\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\n }\n return func.apply(thisArg, args);\n }\n\n /**\n * A specialized version of `baseAggregator` for arrays.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform keys.\n * @param {Object} accumulator The initial aggregated object.\n * @returns {Function} Returns `accumulator`.\n */\n function arrayAggregator(array, setter, iteratee, accumulator) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n var value = array[index];\n setter(accumulator, value, iteratee(value), array);\n }\n return accumulator;\n }\n\n /**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\n function arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n }\n\n /**\n * A specialized version of `_.forEachRight` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\n function arrayEachRight(array, iteratee) {\n var length = array == null ? 0 : array.length;\n\n while (length--) {\n if (iteratee(array[length], length, array) === false) {\n break;\n }\n }\n return array;\n }\n\n /**\n * A specialized version of `_.every` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\n * else `false`.\n */\n function arrayEvery(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (!predicate(array[index], index, array)) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\n function arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n }\n\n /**\n * A specialized version of `_.includes` for arrays without support for\n * specifying an index to search from.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\n function arrayIncludes(array, value) {\n var length = array == null ? 0 : array.length;\n return !!length && baseIndexOf(array, value, 0) > -1;\n }\n\n /**\n * This function is like `arrayIncludes` except that it accepts a comparator.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @param {Function} comparator The comparator invoked per element.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\n function arrayIncludesWith(array, value, comparator) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (comparator(value, array[index])) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\n function arrayMap(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length,\n result = Array(length);\n\n while (++index < length) {\n result[index] = iteratee(array[index], index, array);\n }\n return result;\n }\n\n /**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\n function arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n }\n\n /**\n * A specialized version of `_.reduce` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @param {boolean} [initAccum] Specify using the first element of `array` as\n * the initial value.\n * @returns {*} Returns the accumulated value.\n */\n function arrayReduce(array, iteratee, accumulator, initAccum) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n if (initAccum && length) {\n accumulator = array[++index];\n }\n while (++index < length) {\n accumulator = iteratee(accumulator, array[index], index, array);\n }\n return accumulator;\n }\n\n /**\n * A specialized version of `_.reduceRight` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @param {boolean} [initAccum] Specify using the last element of `array` as\n * the initial value.\n * @returns {*} Returns the accumulated value.\n */\n function arrayReduceRight(array, iteratee, accumulator, initAccum) {\n var length = array == null ? 0 : array.length;\n if (initAccum && length) {\n accumulator = array[--length];\n }\n while (length--) {\n accumulator = iteratee(accumulator, array[length], length, array);\n }\n return accumulator;\n }\n\n /**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\n function arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * Gets the size of an ASCII `string`.\n *\n * @private\n * @param {string} string The string inspect.\n * @returns {number} Returns the string size.\n */\n var asciiSize = baseProperty('length');\n\n /**\n * Converts an ASCII `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\n function asciiToArray(string) {\n return string.split('');\n }\n\n /**\n * Splits an ASCII `string` into an array of its words.\n *\n * @private\n * @param {string} The string to inspect.\n * @returns {Array} Returns the words of `string`.\n */\n function asciiWords(string) {\n return string.match(reAsciiWord) || [];\n }\n\n /**\n * The base implementation of methods like `_.findKey` and `_.findLastKey`,\n * without support for iteratee shorthands, which iterates over `collection`\n * using `eachFunc`.\n *\n * @private\n * @param {Array|Object} collection The collection to inspect.\n * @param {Function} predicate The function invoked per iteration.\n * @param {Function} eachFunc The function to iterate over `collection`.\n * @returns {*} Returns the found element or its key, else `undefined`.\n */\n function baseFindKey(collection, predicate, eachFunc) {\n var result;\n eachFunc(collection, function(value, key, collection) {\n if (predicate(value, key, collection)) {\n result = key;\n return false;\n }\n });\n return result;\n }\n\n /**\n * The base implementation of `_.findIndex` and `_.findLastIndex` without\n * support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} predicate The function invoked per iteration.\n * @param {number} fromIndex The index to search from.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function baseFindIndex(array, predicate, fromIndex, fromRight) {\n var length = array.length,\n index = fromIndex + (fromRight ? 1 : -1);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (predicate(array[index], index, array)) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * The base implementation of `_.indexOf` without `fromIndex` bounds checks.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function baseIndexOf(array, value, fromIndex) {\n return value === value\n ? strictIndexOf(array, value, fromIndex)\n : baseFindIndex(array, baseIsNaN, fromIndex);\n }\n\n /**\n * This function is like `baseIndexOf` except that it accepts a comparator.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @param {Function} comparator The comparator invoked per element.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function baseIndexOfWith(array, value, fromIndex, comparator) {\n var index = fromIndex - 1,\n length = array.length;\n\n while (++index < length) {\n if (comparator(array[index], value)) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * The base implementation of `_.isNaN` without support for number objects.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n */\n function baseIsNaN(value) {\n return value !== value;\n }\n\n /**\n * The base implementation of `_.mean` and `_.meanBy` without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {number} Returns the mean.\n */\n function baseMean(array, iteratee) {\n var length = array == null ? 0 : array.length;\n return length ? (baseSum(array, iteratee) / length) : NAN;\n }\n\n /**\n * The base implementation of `_.property` without support for deep paths.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\n function baseProperty(key) {\n return function(object) {\n return object == null ? undefined : object[key];\n };\n }\n\n /**\n * The base implementation of `_.propertyOf` without support for deep paths.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Function} Returns the new accessor function.\n */\n function basePropertyOf(object) {\n return function(key) {\n return object == null ? undefined : object[key];\n };\n }\n\n /**\n * The base implementation of `_.reduce` and `_.reduceRight`, without support\n * for iteratee shorthands, which iterates over `collection` using `eachFunc`.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} accumulator The initial value.\n * @param {boolean} initAccum Specify using the first or last element of\n * `collection` as the initial value.\n * @param {Function} eachFunc The function to iterate over `collection`.\n * @returns {*} Returns the accumulated value.\n */\n function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {\n eachFunc(collection, function(value, index, collection) {\n accumulator = initAccum\n ? (initAccum = false, value)\n : iteratee(accumulator, value, index, collection);\n });\n return accumulator;\n }\n\n /**\n * The base implementation of `_.sortBy` which uses `comparer` to define the\n * sort order of `array` and replaces criteria objects with their corresponding\n * values.\n *\n * @private\n * @param {Array} array The array to sort.\n * @param {Function} comparer The function to define sort order.\n * @returns {Array} Returns `array`.\n */\n function baseSortBy(array, comparer) {\n var length = array.length;\n\n array.sort(comparer);\n while (length--) {\n array[length] = array[length].value;\n }\n return array;\n }\n\n /**\n * The base implementation of `_.sum` and `_.sumBy` without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {number} Returns the sum.\n */\n function baseSum(array, iteratee) {\n var result,\n index = -1,\n length = array.length;\n\n while (++index < length) {\n var current = iteratee(array[index]);\n if (current !== undefined) {\n result = result === undefined ? current : (result + current);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\n function baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n }\n\n /**\n * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array\n * of key-value pairs for `object` corresponding to the property names of `props`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array} props The property names to get values for.\n * @returns {Object} Returns the key-value pairs.\n */\n function baseToPairs(object, props) {\n return arrayMap(props, function(key) {\n return [key, object[key]];\n });\n }\n\n /**\n * The base implementation of `_.trim`.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} Returns the trimmed string.\n */\n function baseTrim(string) {\n return string\n ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n : string;\n }\n\n /**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\n function baseUnary(func) {\n return function(value) {\n return func(value);\n };\n }\n\n /**\n * The base implementation of `_.values` and `_.valuesIn` which creates an\n * array of `object` property values corresponding to the property names\n * of `props`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array} props The property names to get values for.\n * @returns {Object} Returns the array of property values.\n */\n function baseValues(object, props) {\n return arrayMap(props, function(key) {\n return object[key];\n });\n }\n\n /**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function cacheHas(cache, key) {\n return cache.has(key);\n }\n\n /**\n * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol\n * that is not found in the character symbols.\n *\n * @private\n * @param {Array} strSymbols The string symbols to inspect.\n * @param {Array} chrSymbols The character symbols to find.\n * @returns {number} Returns the index of the first unmatched string symbol.\n */\n function charsStartIndex(strSymbols, chrSymbols) {\n var index = -1,\n length = strSymbols.length;\n\n while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}\n return index;\n }\n\n /**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol\n * that is not found in the character symbols.\n *\n * @private\n * @param {Array} strSymbols The string symbols to inspect.\n * @param {Array} chrSymbols The character symbols to find.\n * @returns {number} Returns the index of the last unmatched string symbol.\n */\n function charsEndIndex(strSymbols, chrSymbols) {\n var index = strSymbols.length;\n\n while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}\n return index;\n }\n\n /**\n * Gets the number of `placeholder` occurrences in `array`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} placeholder The placeholder to search for.\n * @returns {number} Returns the placeholder count.\n */\n function countHolders(array, placeholder) {\n var length = array.length,\n result = 0;\n\n while (length--) {\n if (array[length] === placeholder) {\n ++result;\n }\n }\n return result;\n }\n\n /**\n * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A\n * letters to basic Latin letters.\n *\n * @private\n * @param {string} letter The matched letter to deburr.\n * @returns {string} Returns the deburred letter.\n */\n var deburrLetter = basePropertyOf(deburredLetters);\n\n /**\n * Used by `_.escape` to convert characters to HTML entities.\n *\n * @private\n * @param {string} chr The matched character to escape.\n * @returns {string} Returns the escaped character.\n */\n var escapeHtmlChar = basePropertyOf(htmlEscapes);\n\n /**\n * Used by `_.template` to escape characters for inclusion in compiled string literals.\n *\n * @private\n * @param {string} chr The matched character to escape.\n * @returns {string} Returns the escaped character.\n */\n function escapeStringChar(chr) {\n return '\\\\' + stringEscapes[chr];\n }\n\n /**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\n function getValue(object, key) {\n return object == null ? undefined : object[key];\n }\n\n /**\n * Checks if `string` contains Unicode symbols.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {boolean} Returns `true` if a symbol is found, else `false`.\n */\n function hasUnicode(string) {\n return reHasUnicode.test(string);\n }\n\n /**\n * Checks if `string` contains a word composed of Unicode symbols.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {boolean} Returns `true` if a word is found, else `false`.\n */\n function hasUnicodeWord(string) {\n return reHasUnicodeWord.test(string);\n }\n\n /**\n * Converts `iterator` to an array.\n *\n * @private\n * @param {Object} iterator The iterator to convert.\n * @returns {Array} Returns the converted array.\n */\n function iteratorToArray(iterator) {\n var data,\n result = [];\n\n while (!(data = iterator.next()).done) {\n result.push(data.value);\n }\n return result;\n }\n\n /**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\n function mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n }\n\n /**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\n function overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n }\n\n /**\n * Replaces all `placeholder` elements in `array` with an internal placeholder\n * and returns an array of their indexes.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {*} placeholder The placeholder to replace.\n * @returns {Array} Returns the new array of placeholder indexes.\n */\n function replaceHolders(array, placeholder) {\n var index = -1,\n length = array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (value === placeholder || value === PLACEHOLDER) {\n array[index] = PLACEHOLDER;\n result[resIndex++] = index;\n }\n }\n return result;\n }\n\n /**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\n function setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n }\n\n /**\n * Converts `set` to its value-value pairs.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the value-value pairs.\n */\n function setToPairs(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = [value, value];\n });\n return result;\n }\n\n /**\n * A specialized version of `_.indexOf` which performs strict equality\n * comparisons of values, i.e. `===`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function strictIndexOf(array, value, fromIndex) {\n var index = fromIndex - 1,\n length = array.length;\n\n while (++index < length) {\n if (array[index] === value) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * A specialized version of `_.lastIndexOf` which performs strict equality\n * comparisons of values, i.e. `===`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function strictLastIndexOf(array, value, fromIndex) {\n var index = fromIndex + 1;\n while (index--) {\n if (array[index] === value) {\n return index;\n }\n }\n return index;\n }\n\n /**\n * Gets the number of symbols in `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the string size.\n */\n function stringSize(string) {\n return hasUnicode(string)\n ? unicodeSize(string)\n : asciiSize(string);\n }\n\n /**\n * Converts `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\n function stringToArray(string) {\n return hasUnicode(string)\n ? unicodeToArray(string)\n : asciiToArray(string);\n }\n\n /**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the last non-whitespace character.\n */\n function trimmedEndIndex(string) {\n var index = string.length;\n\n while (index-- && reWhitespace.test(string.charAt(index))) {}\n return index;\n }\n\n /**\n * Used by `_.unescape` to convert HTML entities to characters.\n *\n * @private\n * @param {string} chr The matched character to unescape.\n * @returns {string} Returns the unescaped character.\n */\n var unescapeHtmlChar = basePropertyOf(htmlUnescapes);\n\n /**\n * Gets the size of a Unicode `string`.\n *\n * @private\n * @param {string} string The string inspect.\n * @returns {number} Returns the string size.\n */\n function unicodeSize(string) {\n var result = reUnicode.lastIndex = 0;\n while (reUnicode.test(string)) {\n ++result;\n }\n return result;\n }\n\n /**\n * Converts a Unicode `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\n function unicodeToArray(string) {\n return string.match(reUnicode) || [];\n }\n\n /**\n * Splits a Unicode `string` into an array of its words.\n *\n * @private\n * @param {string} The string to inspect.\n * @returns {Array} Returns the words of `string`.\n */\n function unicodeWords(string) {\n return string.match(reUnicodeWord) || [];\n }\n\n /*--------------------------------------------------------------------------*/\n\n /**\n * Create a new pristine `lodash` function using the `context` object.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category Util\n * @param {Object} [context=root] The context object.\n * @returns {Function} Returns a new `lodash` function.\n * @example\n *\n * _.mixin({ 'foo': _.constant('foo') });\n *\n * var lodash = _.runInContext();\n * lodash.mixin({ 'bar': lodash.constant('bar') });\n *\n * _.isFunction(_.foo);\n * // => true\n * _.isFunction(_.bar);\n * // => false\n *\n * lodash.isFunction(lodash.foo);\n * // => false\n * lodash.isFunction(lodash.bar);\n * // => true\n *\n * // Create a suped-up `defer` in Node.js.\n * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer;\n */\n var runInContext = (function runInContext(context) {\n context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps));\n\n /** Built-in constructor references. */\n var Array = context.Array,\n Date = context.Date,\n Error = context.Error,\n Function = context.Function,\n Math = context.Math,\n Object = context.Object,\n RegExp = context.RegExp,\n String = context.String,\n TypeError = context.TypeError;\n\n /** Used for built-in method references. */\n var arrayProto = Array.prototype,\n funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n /** Used to detect overreaching core-js shims. */\n var coreJsData = context['__core-js_shared__'];\n\n /** Used to resolve the decompiled source of functions. */\n var funcToString = funcProto.toString;\n\n /** Used to check objects for own properties. */\n var hasOwnProperty = objectProto.hasOwnProperty;\n\n /** Used to generate unique IDs. */\n var idCounter = 0;\n\n /** Used to detect methods masquerading as native. */\n var maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n }());\n\n /**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\n var nativeObjectToString = objectProto.toString;\n\n /** Used to infer the `Object` constructor. */\n var objectCtorString = funcToString.call(Object);\n\n /** Used to restore the original `_` reference in `_.noConflict`. */\n var oldDash = root._;\n\n /** Used to detect if a method is native. */\n var reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n );\n\n /** Built-in value references. */\n var Buffer = moduleExports ? context.Buffer : undefined,\n Symbol = context.Symbol,\n Uint8Array = context.Uint8Array,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined,\n getPrototype = overArg(Object.getPrototypeOf, Object),\n objectCreate = Object.create,\n propertyIsEnumerable = objectProto.propertyIsEnumerable,\n splice = arrayProto.splice,\n spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined,\n symIterator = Symbol ? Symbol.iterator : undefined,\n symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n var defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n }());\n\n /** Mocked built-ins. */\n var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout,\n ctxNow = Date && Date.now !== root.Date.now && Date.now,\n ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;\n\n /* Built-in method references for those with the same name as other `lodash` methods. */\n var nativeCeil = Math.ceil,\n nativeFloor = Math.floor,\n nativeGetSymbols = Object.getOwnPropertySymbols,\n nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,\n nativeIsFinite = context.isFinite,\n nativeJoin = arrayProto.join,\n nativeKeys = overArg(Object.keys, Object),\n nativeMax = Math.max,\n nativeMin = Math.min,\n nativeNow = Date.now,\n nativeParseInt = context.parseInt,\n nativeRandom = Math.random,\n nativeReverse = arrayProto.reverse;\n\n /* Built-in method references that are verified to be native. */\n var DataView = getNative(context, 'DataView'),\n Map = getNative(context, 'Map'),\n Promise = getNative(context, 'Promise'),\n Set = getNative(context, 'Set'),\n WeakMap = getNative(context, 'WeakMap'),\n nativeCreate = getNative(Object, 'create');\n\n /** Used to store function metadata. */\n var metaMap = WeakMap && new WeakMap;\n\n /** Used to lookup unminified function names. */\n var realNames = {};\n\n /** Used to detect maps, sets, and weakmaps. */\n var dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n /** Used to convert symbols to primitives and strings. */\n var symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a `lodash` object which wraps `value` to enable implicit method\n * chain sequences. Methods that operate on and return arrays, collections,\n * and functions can be chained together. Methods that retrieve a single value\n * or may return a primitive value will automatically end the chain sequence\n * and return the unwrapped value. Otherwise, the value must be unwrapped\n * with `_#value`.\n *\n * Explicit chain sequences, which must be unwrapped with `_#value`, may be\n * enabled using `_.chain`.\n *\n * The execution of chained methods is lazy, that is, it's deferred until\n * `_#value` is implicitly or explicitly called.\n *\n * Lazy evaluation allows several methods to support shortcut fusion.\n * Shortcut fusion is an optimization to merge iteratee calls; this avoids\n * the creation of intermediate arrays and can greatly reduce the number of\n * iteratee executions. Sections of a chain sequence qualify for shortcut\n * fusion if the section is applied to an array and iteratees accept only\n * one argument. The heuristic for whether a section qualifies for shortcut\n * fusion is subject to change.\n *\n * Chaining is supported in custom builds as long as the `_#value` method is\n * directly or indirectly included in the build.\n *\n * In addition to lodash methods, wrappers have `Array` and `String` methods.\n *\n * The wrapper `Array` methods are:\n * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`\n *\n * The wrapper `String` methods are:\n * `replace` and `split`\n *\n * The wrapper methods that support shortcut fusion are:\n * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,\n * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,\n * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`\n *\n * The chainable wrapper methods are:\n * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,\n * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,\n * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,\n * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,\n * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,\n * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,\n * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,\n * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,\n * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,\n * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,\n * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,\n * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,\n * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,\n * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,\n * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,\n * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,\n * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,\n * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,\n * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,\n * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,\n * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,\n * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,\n * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,\n * `zipObject`, `zipObjectDeep`, and `zipWith`\n *\n * The wrapper methods that are **not** chainable by default are:\n * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,\n * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`,\n * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`,\n * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,\n * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`,\n * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,\n * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,\n * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`,\n * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`,\n * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`,\n * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,\n * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,\n * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`,\n * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`,\n * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,\n * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`,\n * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,\n * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,\n * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,\n * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`,\n * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`,\n * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,\n * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`,\n * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`,\n * `upperFirst`, `value`, and `words`\n *\n * @name _\n * @constructor\n * @category Seq\n * @param {*} value The value to wrap in a `lodash` instance.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * var wrapped = _([1, 2, 3]);\n *\n * // Returns an unwrapped value.\n * wrapped.reduce(_.add);\n * // => 6\n *\n * // Returns a wrapped value.\n * var squares = wrapped.map(square);\n *\n * _.isArray(squares);\n * // => false\n *\n * _.isArray(squares.value());\n * // => true\n */\n function lodash(value) {\n if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {\n if (value instanceof LodashWrapper) {\n return value;\n }\n if (hasOwnProperty.call(value, '__wrapped__')) {\n return wrapperClone(value);\n }\n }\n return new LodashWrapper(value);\n }\n\n /**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\n var baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n }());\n\n /**\n * The function whose prototype chain sequence wrappers inherit from.\n *\n * @private\n */\n function baseLodash() {\n // No operation performed.\n }\n\n /**\n * The base constructor for creating `lodash` wrapper objects.\n *\n * @private\n * @param {*} value The value to wrap.\n * @param {boolean} [chainAll] Enable explicit method chain sequences.\n */\n function LodashWrapper(value, chainAll) {\n this.__wrapped__ = value;\n this.__actions__ = [];\n this.__chain__ = !!chainAll;\n this.__index__ = 0;\n this.__values__ = undefined;\n }\n\n /**\n * By default, the template delimiters used by lodash are like those in\n * embedded Ruby (ERB) as well as ES2015 template strings. Change the\n * following template settings to use alternative delimiters.\n *\n * @static\n * @memberOf _\n * @type {Object}\n */\n lodash.templateSettings = {\n\n /**\n * Used to detect `data` property values to be HTML-escaped.\n *\n * @memberOf _.templateSettings\n * @type {RegExp}\n */\n 'escape': reEscape,\n\n /**\n * Used to detect code to be evaluated.\n *\n * @memberOf _.templateSettings\n * @type {RegExp}\n */\n 'evaluate': reEvaluate,\n\n /**\n * Used to detect `data` property values to inject.\n *\n * @memberOf _.templateSettings\n * @type {RegExp}\n */\n 'interpolate': reInterpolate,\n\n /**\n * Used to reference the data object in the template text.\n *\n * @memberOf _.templateSettings\n * @type {string}\n */\n 'variable': '',\n\n /**\n * Used to import variables into the compiled template.\n *\n * @memberOf _.templateSettings\n * @type {Object}\n */\n 'imports': {\n\n /**\n * A reference to the `lodash` function.\n *\n * @memberOf _.templateSettings.imports\n * @type {Function}\n */\n '_': lodash\n }\n };\n\n // Ensure wrappers are instances of `baseLodash`.\n lodash.prototype = baseLodash.prototype;\n lodash.prototype.constructor = lodash;\n\n LodashWrapper.prototype = baseCreate(baseLodash.prototype);\n LodashWrapper.prototype.constructor = LodashWrapper;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.\n *\n * @private\n * @constructor\n * @param {*} value The value to wrap.\n */\n function LazyWrapper(value) {\n this.__wrapped__ = value;\n this.__actions__ = [];\n this.__dir__ = 1;\n this.__filtered__ = false;\n this.__iteratees__ = [];\n this.__takeCount__ = MAX_ARRAY_LENGTH;\n this.__views__ = [];\n }\n\n /**\n * Creates a clone of the lazy wrapper object.\n *\n * @private\n * @name clone\n * @memberOf LazyWrapper\n * @returns {Object} Returns the cloned `LazyWrapper` object.\n */\n function lazyClone() {\n var result = new LazyWrapper(this.__wrapped__);\n result.__actions__ = copyArray(this.__actions__);\n result.__dir__ = this.__dir__;\n result.__filtered__ = this.__filtered__;\n result.__iteratees__ = copyArray(this.__iteratees__);\n result.__takeCount__ = this.__takeCount__;\n result.__views__ = copyArray(this.__views__);\n return result;\n }\n\n /**\n * Reverses the direction of lazy iteration.\n *\n * @private\n * @name reverse\n * @memberOf LazyWrapper\n * @returns {Object} Returns the new reversed `LazyWrapper` object.\n */\n function lazyReverse() {\n if (this.__filtered__) {\n var result = new LazyWrapper(this);\n result.__dir__ = -1;\n result.__filtered__ = true;\n } else {\n result = this.clone();\n result.__dir__ *= -1;\n }\n return result;\n }\n\n /**\n * Extracts the unwrapped value from its lazy wrapper.\n *\n * @private\n * @name value\n * @memberOf LazyWrapper\n * @returns {*} Returns the unwrapped value.\n */\n function lazyValue() {\n var array = this.__wrapped__.value(),\n dir = this.__dir__,\n isArr = isArray(array),\n isRight = dir < 0,\n arrLength = isArr ? array.length : 0,\n view = getView(0, arrLength, this.__views__),\n start = view.start,\n end = view.end,\n length = end - start,\n index = isRight ? end : (start - 1),\n iteratees = this.__iteratees__,\n iterLength = iteratees.length,\n resIndex = 0,\n takeCount = nativeMin(length, this.__takeCount__);\n\n if (!isArr || (!isRight && arrLength == length && takeCount == length)) {\n return baseWrapperValue(array, this.__actions__);\n }\n var result = [];\n\n outer:\n while (length-- && resIndex < takeCount) {\n index += dir;\n\n var iterIndex = -1,\n value = array[index];\n\n while (++iterIndex < iterLength) {\n var data = iteratees[iterIndex],\n iteratee = data.iteratee,\n type = data.type,\n computed = iteratee(value);\n\n if (type == LAZY_MAP_FLAG) {\n value = computed;\n } else if (!computed) {\n if (type == LAZY_FILTER_FLAG) {\n continue outer;\n } else {\n break outer;\n }\n }\n }\n result[resIndex++] = value;\n }\n return result;\n }\n\n // Ensure `LazyWrapper` is an instance of `baseLodash`.\n LazyWrapper.prototype = baseCreate(baseLodash.prototype);\n LazyWrapper.prototype.constructor = LazyWrapper;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\n function Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n }\n\n /**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\n function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }\n\n /**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\n function hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n }\n\n /**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\n function hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n }\n\n /**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n }\n\n /**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\n function hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n }\n\n // Add methods to `Hash`.\n Hash.prototype.clear = hashClear;\n Hash.prototype['delete'] = hashDelete;\n Hash.prototype.get = hashGet;\n Hash.prototype.has = hashHas;\n Hash.prototype.set = hashSet;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\n function ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n }\n\n /**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\n function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }\n\n /**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\n function listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n }\n\n /**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\n function listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n }\n\n /**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n }\n\n /**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\n function listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n }\n\n // Add methods to `ListCache`.\n ListCache.prototype.clear = listCacheClear;\n ListCache.prototype['delete'] = listCacheDelete;\n ListCache.prototype.get = listCacheGet;\n ListCache.prototype.has = listCacheHas;\n ListCache.prototype.set = listCacheSet;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\n function MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n }\n\n /**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\n function mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n }\n\n /**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\n function mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n }\n\n /**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\n function mapCacheGet(key) {\n return getMapData(this, key).get(key);\n }\n\n /**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function mapCacheHas(key) {\n return getMapData(this, key).has(key);\n }\n\n /**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\n function mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n }\n\n // Add methods to `MapCache`.\n MapCache.prototype.clear = mapCacheClear;\n MapCache.prototype['delete'] = mapCacheDelete;\n MapCache.prototype.get = mapCacheGet;\n MapCache.prototype.has = mapCacheHas;\n MapCache.prototype.set = mapCacheSet;\n\n /*------------------------------------------------------------------------*/\n\n /**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\n function SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n }\n\n /**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\n function setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n }\n\n /**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\n function setCacheHas(value) {\n return this.__data__.has(value);\n }\n\n // Add methods to `SetCache`.\n SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\n SetCache.prototype.has = setCacheHas;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\n function Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n }\n\n /**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\n function stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n }\n\n /**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\n function stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n }\n\n /**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\n function stackGet(key) {\n return this.__data__.get(key);\n }\n\n /**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function stackHas(key) {\n return this.__data__.has(key);\n }\n\n /**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\n function stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n }\n\n // Add methods to `Stack`.\n Stack.prototype.clear = stackClear;\n Stack.prototype['delete'] = stackDelete;\n Stack.prototype.get = stackGet;\n Stack.prototype.has = stackHas;\n Stack.prototype.set = stackSet;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\n function arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n }\n\n /**\n * A specialized version of `_.sample` for arrays.\n *\n * @private\n * @param {Array} array The array to sample.\n * @returns {*} Returns the random element.\n */\n function arraySample(array) {\n var length = array.length;\n return length ? array[baseRandom(0, length - 1)] : undefined;\n }\n\n /**\n * A specialized version of `_.sampleSize` for arrays.\n *\n * @private\n * @param {Array} array The array to sample.\n * @param {number} n The number of elements to sample.\n * @returns {Array} Returns the random elements.\n */\n function arraySampleSize(array, n) {\n return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length));\n }\n\n /**\n * A specialized version of `_.shuffle` for arrays.\n *\n * @private\n * @param {Array} array The array to shuffle.\n * @returns {Array} Returns the new shuffled array.\n */\n function arrayShuffle(array) {\n return shuffleSelf(copyArray(array));\n }\n\n /**\n * This function is like `assignValue` except that it doesn't assign\n * `undefined` values.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\n function assignMergeValue(object, key, value) {\n if ((value !== undefined && !eq(object[key], value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n }\n\n /**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\n function assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n }\n\n /**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n }\n\n /**\n * Aggregates elements of `collection` on `accumulator` with keys transformed\n * by `iteratee` and values set by `setter`.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform keys.\n * @param {Object} accumulator The initial aggregated object.\n * @returns {Function} Returns `accumulator`.\n */\n function baseAggregator(collection, setter, iteratee, accumulator) {\n baseEach(collection, function(value, key, collection) {\n setter(accumulator, value, iteratee(value), collection);\n });\n return accumulator;\n }\n\n /**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\n function baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n }\n\n /**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\n function baseAssignIn(object, source) {\n return object && copyObject(source, keysIn(source), object);\n }\n\n /**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\n function baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n }\n\n /**\n * The base implementation of `_.at` without support for individual paths.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {string[]} paths The property paths to pick.\n * @returns {Array} Returns the picked elements.\n */\n function baseAt(object, paths) {\n var index = -1,\n length = paths.length,\n result = Array(length),\n skip = object == null;\n\n while (++index < length) {\n result[index] = skip ? undefined : get(object, paths[index]);\n }\n return result;\n }\n\n /**\n * The base implementation of `_.clamp` which doesn't coerce arguments.\n *\n * @private\n * @param {number} number The number to clamp.\n * @param {number} [lower] The lower bound.\n * @param {number} upper The upper bound.\n * @returns {number} Returns the clamped number.\n */\n function baseClamp(number, lower, upper) {\n if (number === number) {\n if (upper !== undefined) {\n number = number <= upper ? number : upper;\n }\n if (lower !== undefined) {\n number = number >= lower ? number : lower;\n }\n }\n return number;\n }\n\n /**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\n function baseClone(value, bitmask, customizer, key, object, stack) {\n var result,\n isDeep = bitmask & CLONE_DEEP_FLAG,\n isFlat = bitmask & CLONE_FLAT_FLAG,\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\n if (!isDeep) {\n return isFlat\n ? copySymbolsIn(value, baseAssignIn(result, value))\n : copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (isSet(value)) {\n value.forEach(function(subValue) {\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n });\n } else if (isMap(value)) {\n value.forEach(function(subValue, key) {\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n }\n\n var keysFunc = isFull\n ? (isFlat ? getAllKeysIn : getAllKeys)\n : (isFlat ? keysIn : keys);\n\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n }\n\n /**\n * The base implementation of `_.conforms` which doesn't clone `source`.\n *\n * @private\n * @param {Object} source The object of property predicates to conform to.\n * @returns {Function} Returns the new spec function.\n */\n function baseConforms(source) {\n var props = keys(source);\n return function(object) {\n return baseConformsTo(object, source, props);\n };\n }\n\n /**\n * The base implementation of `_.conformsTo` which accepts `props` to check.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property predicates to conform to.\n * @returns {boolean} Returns `true` if `object` conforms, else `false`.\n */\n function baseConformsTo(object, source, props) {\n var length = props.length;\n if (object == null) {\n return !length;\n }\n object = Object(object);\n while (length--) {\n var key = props[length],\n predicate = source[key],\n value = object[key];\n\n if ((value === undefined && !(key in object)) || !predicate(value)) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * The base implementation of `_.delay` and `_.defer` which accepts `args`\n * to provide to `func`.\n *\n * @private\n * @param {Function} func The function to delay.\n * @param {number} wait The number of milliseconds to delay invocation.\n * @param {Array} args The arguments to provide to `func`.\n * @returns {number|Object} Returns the timer id or timeout object.\n */\n function baseDelay(func, wait, args) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n return setTimeout(function() { func.apply(undefined, args); }, wait);\n }\n\n /**\n * The base implementation of methods like `_.difference` without support\n * for excluding multiple arrays or iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Array} values The values to exclude.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n */\n function baseDifference(array, values, iteratee, comparator) {\n var index = -1,\n includes = arrayIncludes,\n isCommon = true,\n length = array.length,\n result = [],\n valuesLength = values.length;\n\n if (!length) {\n return result;\n }\n if (iteratee) {\n values = arrayMap(values, baseUnary(iteratee));\n }\n if (comparator) {\n includes = arrayIncludesWith;\n isCommon = false;\n }\n else if (values.length >= LARGE_ARRAY_SIZE) {\n includes = cacheHas;\n isCommon = false;\n values = new SetCache(values);\n }\n outer:\n while (++index < length) {\n var value = array[index],\n computed = iteratee == null ? value : iteratee(value);\n\n value = (comparator || value !== 0) ? value : 0;\n if (isCommon && computed === computed) {\n var valuesIndex = valuesLength;\n while (valuesIndex--) {\n if (values[valuesIndex] === computed) {\n continue outer;\n }\n }\n result.push(value);\n }\n else if (!includes(values, computed, comparator)) {\n result.push(value);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.forEach` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n */\n var baseEach = createBaseEach(baseForOwn);\n\n /**\n * The base implementation of `_.forEachRight` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n */\n var baseEachRight = createBaseEach(baseForOwnRight, true);\n\n /**\n * The base implementation of `_.every` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\n * else `false`\n */\n function baseEvery(collection, predicate) {\n var result = true;\n baseEach(collection, function(value, index, collection) {\n result = !!predicate(value, index, collection);\n return result;\n });\n return result;\n }\n\n /**\n * The base implementation of methods like `_.max` and `_.min` which accepts a\n * `comparator` to determine the extremum value.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The iteratee invoked per iteration.\n * @param {Function} comparator The comparator used to compare values.\n * @returns {*} Returns the extremum value.\n */\n function baseExtremum(array, iteratee, comparator) {\n var index = -1,\n length = array.length;\n\n while (++index < length) {\n var value = array[index],\n current = iteratee(value);\n\n if (current != null && (computed === undefined\n ? (current === current && !isSymbol(current))\n : comparator(current, computed)\n )) {\n var computed = current,\n result = value;\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.fill` without an iteratee call guard.\n *\n * @private\n * @param {Array} array The array to fill.\n * @param {*} value The value to fill `array` with.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns `array`.\n */\n function baseFill(array, value, start, end) {\n var length = array.length;\n\n start = toInteger(start);\n if (start < 0) {\n start = -start > length ? 0 : (length + start);\n }\n end = (end === undefined || end > length) ? length : toInteger(end);\n if (end < 0) {\n end += length;\n }\n end = start > end ? 0 : toLength(end);\n while (start < end) {\n array[start++] = value;\n }\n return array;\n }\n\n /**\n * The base implementation of `_.filter` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\n function baseFilter(collection, predicate) {\n var result = [];\n baseEach(collection, function(value, index, collection) {\n if (predicate(value, index, collection)) {\n result.push(value);\n }\n });\n return result;\n }\n\n /**\n * The base implementation of `_.flatten` with support for restricting flattening.\n *\n * @private\n * @param {Array} array The array to flatten.\n * @param {number} depth The maximum recursion depth.\n * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.\n * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.\n * @param {Array} [result=[]] The initial result value.\n * @returns {Array} Returns the new flattened array.\n */\n function baseFlatten(array, depth, predicate, isStrict, result) {\n var index = -1,\n length = array.length;\n\n predicate || (predicate = isFlattenable);\n result || (result = []);\n\n while (++index < length) {\n var value = array[index];\n if (depth > 0 && predicate(value)) {\n if (depth > 1) {\n // Recursively flatten arrays (susceptible to call stack limits).\n baseFlatten(value, depth - 1, predicate, isStrict, result);\n } else {\n arrayPush(result, value);\n }\n } else if (!isStrict) {\n result[result.length] = value;\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `baseForOwn` which iterates over `object`\n * properties returned by `keysFunc` and invokes `iteratee` for each property.\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\n var baseFor = createBaseFor();\n\n /**\n * This function is like `baseFor` except that it iterates over properties\n * in the opposite order.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\n var baseForRight = createBaseFor(true);\n\n /**\n * The base implementation of `_.forOwn` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\n function baseForOwn(object, iteratee) {\n return object && baseFor(object, iteratee, keys);\n }\n\n /**\n * The base implementation of `_.forOwnRight` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\n function baseForOwnRight(object, iteratee) {\n return object && baseForRight(object, iteratee, keys);\n }\n\n /**\n * The base implementation of `_.functions` which creates an array of\n * `object` function property names filtered from `props`.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Array} props The property names to filter.\n * @returns {Array} Returns the function names.\n */\n function baseFunctions(object, props) {\n return arrayFilter(props, function(key) {\n return isFunction(object[key]);\n });\n }\n\n /**\n * The base implementation of `_.get` without support for default values.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @returns {*} Returns the resolved value.\n */\n function baseGet(object, path) {\n path = castPath(path, object);\n\n var index = 0,\n length = path.length;\n\n while (object != null && index < length) {\n object = object[toKey(path[index++])];\n }\n return (index && index == length) ? object : undefined;\n }\n\n /**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\n function baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n }\n\n /**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\n function baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n }\n\n /**\n * The base implementation of `_.gt` which doesn't coerce arguments.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is greater than `other`,\n * else `false`.\n */\n function baseGt(value, other) {\n return value > other;\n }\n\n /**\n * The base implementation of `_.has` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\n function baseHas(object, key) {\n return object != null && hasOwnProperty.call(object, key);\n }\n\n /**\n * The base implementation of `_.hasIn` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\n function baseHasIn(object, key) {\n return object != null && key in Object(object);\n }\n\n /**\n * The base implementation of `_.inRange` which doesn't coerce arguments.\n *\n * @private\n * @param {number} number The number to check.\n * @param {number} start The start of the range.\n * @param {number} end The end of the range.\n * @returns {boolean} Returns `true` if `number` is in the range, else `false`.\n */\n function baseInRange(number, start, end) {\n return number >= nativeMin(start, end) && number < nativeMax(start, end);\n }\n\n /**\n * The base implementation of methods like `_.intersection`, without support\n * for iteratee shorthands, that accepts an array of arrays to inspect.\n *\n * @private\n * @param {Array} arrays The arrays to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of shared values.\n */\n function baseIntersection(arrays, iteratee, comparator) {\n var includes = comparator ? arrayIncludesWith : arrayIncludes,\n length = arrays[0].length,\n othLength = arrays.length,\n othIndex = othLength,\n caches = Array(othLength),\n maxLength = Infinity,\n result = [];\n\n while (othIndex--) {\n var array = arrays[othIndex];\n if (othIndex && iteratee) {\n array = arrayMap(array, baseUnary(iteratee));\n }\n maxLength = nativeMin(array.length, maxLength);\n caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))\n ? new SetCache(othIndex && array)\n : undefined;\n }\n array = arrays[0];\n\n var index = -1,\n seen = caches[0];\n\n outer:\n while (++index < length && result.length < maxLength) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n value = (comparator || value !== 0) ? value : 0;\n if (!(seen\n ? cacheHas(seen, computed)\n : includes(result, computed, comparator)\n )) {\n othIndex = othLength;\n while (--othIndex) {\n var cache = caches[othIndex];\n if (!(cache\n ? cacheHas(cache, computed)\n : includes(arrays[othIndex], computed, comparator))\n ) {\n continue outer;\n }\n }\n if (seen) {\n seen.push(computed);\n }\n result.push(value);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.invert` and `_.invertBy` which inverts\n * `object` with values transformed by `iteratee` and set by `setter`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform values.\n * @param {Object} accumulator The initial inverted object.\n * @returns {Function} Returns `accumulator`.\n */\n function baseInverter(object, setter, iteratee, accumulator) {\n baseForOwn(object, function(value, key, object) {\n setter(accumulator, iteratee(value), key, object);\n });\n return accumulator;\n }\n\n /**\n * The base implementation of `_.invoke` without support for individual\n * method arguments.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the method to invoke.\n * @param {Array} args The arguments to invoke the method with.\n * @returns {*} Returns the result of the invoked method.\n */\n function baseInvoke(object, path, args) {\n path = castPath(path, object);\n object = parent(object, path);\n var func = object == null ? object : object[toKey(last(path))];\n return func == null ? undefined : apply(func, object, args);\n }\n\n /**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\n function baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n }\n\n /**\n * The base implementation of `_.isArrayBuffer` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.\n */\n function baseIsArrayBuffer(value) {\n return isObjectLike(value) && baseGetTag(value) == arrayBufferTag;\n }\n\n /**\n * The base implementation of `_.isDate` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a date object, else `false`.\n */\n function baseIsDate(value) {\n return isObjectLike(value) && baseGetTag(value) == dateTag;\n }\n\n /**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\n function baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n }\n\n /**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\n function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n }\n\n /**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\n function baseIsMap(value) {\n return isObjectLike(value) && getTag(value) == mapTag;\n }\n\n /**\n * The base implementation of `_.isMatch` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @param {Array} matchData The property names, values, and compare flags to match.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n */\n function baseIsMatch(object, source, matchData, customizer) {\n var index = matchData.length,\n length = index,\n noCustomizer = !customizer;\n\n if (object == null) {\n return !length;\n }\n object = Object(object);\n while (index--) {\n var data = matchData[index];\n if ((noCustomizer && data[2])\n ? data[1] !== object[data[0]]\n : !(data[0] in object)\n ) {\n return false;\n }\n }\n while (++index < length) {\n data = matchData[index];\n var key = data[0],\n objValue = object[key],\n srcValue = data[1];\n\n if (noCustomizer && data[2]) {\n if (objValue === undefined && !(key in object)) {\n return false;\n }\n } else {\n var stack = new Stack;\n if (customizer) {\n var result = customizer(objValue, srcValue, key, object, source, stack);\n }\n if (!(result === undefined\n ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)\n : result\n )) {\n return false;\n }\n }\n }\n return true;\n }\n\n /**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\n function baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n }\n\n /**\n * The base implementation of `_.isRegExp` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.\n */\n function baseIsRegExp(value) {\n return isObjectLike(value) && baseGetTag(value) == regexpTag;\n }\n\n /**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\n function baseIsSet(value) {\n return isObjectLike(value) && getTag(value) == setTag;\n }\n\n /**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\n function baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n }\n\n /**\n * The base implementation of `_.iteratee`.\n *\n * @private\n * @param {*} [value=_.identity] The value to convert to an iteratee.\n * @returns {Function} Returns the iteratee.\n */\n function baseIteratee(value) {\n // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.\n // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.\n if (typeof value == 'function') {\n return value;\n }\n if (value == null) {\n return identity;\n }\n if (typeof value == 'object') {\n return isArray(value)\n ? baseMatchesProperty(value[0], value[1])\n : baseMatches(value);\n }\n return property(value);\n }\n\n /**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\n function baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\n function baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.lt` which doesn't coerce arguments.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is less than `other`,\n * else `false`.\n */\n function baseLt(value, other) {\n return value < other;\n }\n\n /**\n * The base implementation of `_.map` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\n function baseMap(collection, iteratee) {\n var index = -1,\n result = isArrayLike(collection) ? Array(collection.length) : [];\n\n baseEach(collection, function(value, key, collection) {\n result[++index] = iteratee(value, key, collection);\n });\n return result;\n }\n\n /**\n * The base implementation of `_.matches` which doesn't clone `source`.\n *\n * @private\n * @param {Object} source The object of property values to match.\n * @returns {Function} Returns the new spec function.\n */\n function baseMatches(source) {\n var matchData = getMatchData(source);\n if (matchData.length == 1 && matchData[0][2]) {\n return matchesStrictComparable(matchData[0][0], matchData[0][1]);\n }\n return function(object) {\n return object === source || baseIsMatch(object, source, matchData);\n };\n }\n\n /**\n * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.\n *\n * @private\n * @param {string} path The path of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\n function baseMatchesProperty(path, srcValue) {\n if (isKey(path) && isStrictComparable(srcValue)) {\n return matchesStrictComparable(toKey(path), srcValue);\n }\n return function(object) {\n var objValue = get(object, path);\n return (objValue === undefined && objValue === srcValue)\n ? hasIn(object, path)\n : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);\n };\n }\n\n /**\n * The base implementation of `_.merge` without support for multiple sources.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} [customizer] The function to customize merged values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\n function baseMerge(object, source, srcIndex, customizer, stack) {\n if (object === source) {\n return;\n }\n baseFor(source, function(srcValue, key) {\n stack || (stack = new Stack);\n if (isObject(srcValue)) {\n baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);\n }\n else {\n var newValue = customizer\n ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)\n : undefined;\n\n if (newValue === undefined) {\n newValue = srcValue;\n }\n assignMergeValue(object, key, newValue);\n }\n }, keysIn);\n }\n\n /**\n * A specialized version of `baseMerge` for arrays and objects which performs\n * deep merges and tracks traversed objects enabling objects with circular\n * references to be merged.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {string} key The key of the value to merge.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} mergeFunc The function to merge values.\n * @param {Function} [customizer] The function to customize assigned values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\n function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {\n var objValue = safeGet(object, key),\n srcValue = safeGet(source, key),\n stacked = stack.get(srcValue);\n\n if (stacked) {\n assignMergeValue(object, key, stacked);\n return;\n }\n var newValue = customizer\n ? customizer(objValue, srcValue, (key + ''), object, source, stack)\n : undefined;\n\n var isCommon = newValue === undefined;\n\n if (isCommon) {\n var isArr = isArray(srcValue),\n isBuff = !isArr && isBuffer(srcValue),\n isTyped = !isArr && !isBuff && isTypedArray(srcValue);\n\n newValue = srcValue;\n if (isArr || isBuff || isTyped) {\n if (isArray(objValue)) {\n newValue = objValue;\n }\n else if (isArrayLikeObject(objValue)) {\n newValue = copyArray(objValue);\n }\n else if (isBuff) {\n isCommon = false;\n newValue = cloneBuffer(srcValue, true);\n }\n else if (isTyped) {\n isCommon = false;\n newValue = cloneTypedArray(srcValue, true);\n }\n else {\n newValue = [];\n }\n }\n else if (isPlainObject(srcValue) || isArguments(srcValue)) {\n newValue = objValue;\n if (isArguments(objValue)) {\n newValue = toPlainObject(objValue);\n }\n else if (!isObject(objValue) || isFunction(objValue)) {\n newValue = initCloneObject(srcValue);\n }\n }\n else {\n isCommon = false;\n }\n }\n if (isCommon) {\n // Recursively merge objects and arrays (susceptible to call stack limits).\n stack.set(srcValue, newValue);\n mergeFunc(newValue, srcValue, srcIndex, customizer, stack);\n stack['delete'](srcValue);\n }\n assignMergeValue(object, key, newValue);\n }\n\n /**\n * The base implementation of `_.nth` which doesn't coerce arguments.\n *\n * @private\n * @param {Array} array The array to query.\n * @param {number} n The index of the element to return.\n * @returns {*} Returns the nth element of `array`.\n */\n function baseNth(array, n) {\n var length = array.length;\n if (!length) {\n return;\n }\n n += n < 0 ? length : 0;\n return isIndex(n, length) ? array[n] : undefined;\n }\n\n /**\n * The base implementation of `_.orderBy` without param guards.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.\n * @param {string[]} orders The sort orders of `iteratees`.\n * @returns {Array} Returns the new sorted array.\n */\n function baseOrderBy(collection, iteratees, orders) {\n if (iteratees.length) {\n iteratees = arrayMap(iteratees, function(iteratee) {\n if (isArray(iteratee)) {\n return function(value) {\n return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee);\n }\n }\n return iteratee;\n });\n } else {\n iteratees = [identity];\n }\n\n var index = -1;\n iteratees = arrayMap(iteratees, baseUnary(getIteratee()));\n\n var result = baseMap(collection, function(value, key, collection) {\n var criteria = arrayMap(iteratees, function(iteratee) {\n return iteratee(value);\n });\n return { 'criteria': criteria, 'index': ++index, 'value': value };\n });\n\n return baseSortBy(result, function(object, other) {\n return compareMultiple(object, other, orders);\n });\n }\n\n /**\n * The base implementation of `_.pick` without support for individual\n * property identifiers.\n *\n * @private\n * @param {Object} object The source object.\n * @param {string[]} paths The property paths to pick.\n * @returns {Object} Returns the new object.\n */\n function basePick(object, paths) {\n return basePickBy(object, paths, function(value, path) {\n return hasIn(object, path);\n });\n }\n\n /**\n * The base implementation of `_.pickBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The source object.\n * @param {string[]} paths The property paths to pick.\n * @param {Function} predicate The function invoked per property.\n * @returns {Object} Returns the new object.\n */\n function basePickBy(object, paths, predicate) {\n var index = -1,\n length = paths.length,\n result = {};\n\n while (++index < length) {\n var path = paths[index],\n value = baseGet(object, path);\n\n if (predicate(value, path)) {\n baseSet(result, castPath(path, object), value);\n }\n }\n return result;\n }\n\n /**\n * A specialized version of `baseProperty` which supports deep paths.\n *\n * @private\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\n function basePropertyDeep(path) {\n return function(object) {\n return baseGet(object, path);\n };\n }\n\n /**\n * The base implementation of `_.pullAllBy` without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to remove.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns `array`.\n */\n function basePullAll(array, values, iteratee, comparator) {\n var indexOf = comparator ? baseIndexOfWith : baseIndexOf,\n index = -1,\n length = values.length,\n seen = array;\n\n if (array === values) {\n values = copyArray(values);\n }\n if (iteratee) {\n seen = arrayMap(array, baseUnary(iteratee));\n }\n while (++index < length) {\n var fromIndex = 0,\n value = values[index],\n computed = iteratee ? iteratee(value) : value;\n\n while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) {\n if (seen !== array) {\n splice.call(seen, fromIndex, 1);\n }\n splice.call(array, fromIndex, 1);\n }\n }\n return array;\n }\n\n /**\n * The base implementation of `_.pullAt` without support for individual\n * indexes or capturing the removed elements.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {number[]} indexes The indexes of elements to remove.\n * @returns {Array} Returns `array`.\n */\n function basePullAt(array, indexes) {\n var length = array ? indexes.length : 0,\n lastIndex = length - 1;\n\n while (length--) {\n var index = indexes[length];\n if (length == lastIndex || index !== previous) {\n var previous = index;\n if (isIndex(index)) {\n splice.call(array, index, 1);\n } else {\n baseUnset(array, index);\n }\n }\n }\n return array;\n }\n\n /**\n * The base implementation of `_.random` without support for returning\n * floating-point numbers.\n *\n * @private\n * @param {number} lower The lower bound.\n * @param {number} upper The upper bound.\n * @returns {number} Returns the random number.\n */\n function baseRandom(lower, upper) {\n return lower + nativeFloor(nativeRandom() * (upper - lower + 1));\n }\n\n /**\n * The base implementation of `_.range` and `_.rangeRight` which doesn't\n * coerce arguments.\n *\n * @private\n * @param {number} start The start of the range.\n * @param {number} end The end of the range.\n * @param {number} step The value to increment or decrement by.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Array} Returns the range of numbers.\n */\n function baseRange(start, end, step, fromRight) {\n var index = -1,\n length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),\n result = Array(length);\n\n while (length--) {\n result[fromRight ? length : ++index] = start;\n start += step;\n }\n return result;\n }\n\n /**\n * The base implementation of `_.repeat` which doesn't coerce arguments.\n *\n * @private\n * @param {string} string The string to repeat.\n * @param {number} n The number of times to repeat the string.\n * @returns {string} Returns the repeated string.\n */\n function baseRepeat(string, n) {\n var result = '';\n if (!string || n < 1 || n > MAX_SAFE_INTEGER) {\n return result;\n }\n // Leverage the exponentiation by squaring algorithm for a faster repeat.\n // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details.\n do {\n if (n % 2) {\n result += string;\n }\n n = nativeFloor(n / 2);\n if (n) {\n string += string;\n }\n } while (n);\n\n return result;\n }\n\n /**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\n function baseRest(func, start) {\n return setToString(overRest(func, start, identity), func + '');\n }\n\n /**\n * The base implementation of `_.sample`.\n *\n * @private\n * @param {Array|Object} collection The collection to sample.\n * @returns {*} Returns the random element.\n */\n function baseSample(collection) {\n return arraySample(values(collection));\n }\n\n /**\n * The base implementation of `_.sampleSize` without param guards.\n *\n * @private\n * @param {Array|Object} collection The collection to sample.\n * @param {number} n The number of elements to sample.\n * @returns {Array} Returns the random elements.\n */\n function baseSampleSize(collection, n) {\n var array = values(collection);\n return shuffleSelf(array, baseClamp(n, 0, array.length));\n }\n\n /**\n * The base implementation of `_.set`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @param {Function} [customizer] The function to customize path creation.\n * @returns {Object} Returns `object`.\n */\n function baseSet(object, path, value, customizer) {\n if (!isObject(object)) {\n return object;\n }\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n lastIndex = length - 1,\n nested = object;\n\n while (nested != null && ++index < length) {\n var key = toKey(path[index]),\n newValue = value;\n\n if (key === '__proto__' || key === 'constructor' || key === 'prototype') {\n return object;\n }\n\n if (index != lastIndex) {\n var objValue = nested[key];\n newValue = customizer ? customizer(objValue, key, nested) : undefined;\n if (newValue === undefined) {\n newValue = isObject(objValue)\n ? objValue\n : (isIndex(path[index + 1]) ? [] : {});\n }\n }\n assignValue(nested, key, newValue);\n nested = nested[key];\n }\n return object;\n }\n\n /**\n * The base implementation of `setData` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to associate metadata with.\n * @param {*} data The metadata.\n * @returns {Function} Returns `func`.\n */\n var baseSetData = !metaMap ? identity : function(func, data) {\n metaMap.set(func, data);\n return func;\n };\n\n /**\n * The base implementation of `setToString` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\n var baseSetToString = !defineProperty ? identity : function(func, string) {\n return defineProperty(func, 'toString', {\n 'configurable': true,\n 'enumerable': false,\n 'value': constant(string),\n 'writable': true\n });\n };\n\n /**\n * The base implementation of `_.shuffle`.\n *\n * @private\n * @param {Array|Object} collection The collection to shuffle.\n * @returns {Array} Returns the new shuffled array.\n */\n function baseShuffle(collection) {\n return shuffleSelf(values(collection));\n }\n\n /**\n * The base implementation of `_.slice` without an iteratee call guard.\n *\n * @private\n * @param {Array} array The array to slice.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the slice of `array`.\n */\n function baseSlice(array, start, end) {\n var index = -1,\n length = array.length;\n\n if (start < 0) {\n start = -start > length ? 0 : (length + start);\n }\n end = end > length ? length : end;\n if (end < 0) {\n end += length;\n }\n length = start > end ? 0 : ((end - start) >>> 0);\n start >>>= 0;\n\n var result = Array(length);\n while (++index < length) {\n result[index] = array[index + start];\n }\n return result;\n }\n\n /**\n * The base implementation of `_.some` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\n function baseSome(collection, predicate) {\n var result;\n\n baseEach(collection, function(value, index, collection) {\n result = predicate(value, index, collection);\n return !result;\n });\n return !!result;\n }\n\n /**\n * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which\n * performs a binary search of `array` to determine the index at which `value`\n * should be inserted into `array` in order to maintain its sort order.\n *\n * @private\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {boolean} [retHighest] Specify returning the highest qualified index.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n */\n function baseSortedIndex(array, value, retHighest) {\n var low = 0,\n high = array == null ? low : array.length;\n\n if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) {\n while (low < high) {\n var mid = (low + high) >>> 1,\n computed = array[mid];\n\n if (computed !== null && !isSymbol(computed) &&\n (retHighest ? (computed <= value) : (computed < value))) {\n low = mid + 1;\n } else {\n high = mid;\n }\n }\n return high;\n }\n return baseSortedIndexBy(array, value, identity, retHighest);\n }\n\n /**\n * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy`\n * which invokes `iteratee` for `value` and each element of `array` to compute\n * their sort ranking. The iteratee is invoked with one argument; (value).\n *\n * @private\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {Function} iteratee The iteratee invoked per element.\n * @param {boolean} [retHighest] Specify returning the highest qualified index.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n */\n function baseSortedIndexBy(array, value, iteratee, retHighest) {\n var low = 0,\n high = array == null ? 0 : array.length;\n if (high === 0) {\n return 0;\n }\n\n value = iteratee(value);\n var valIsNaN = value !== value,\n valIsNull = value === null,\n valIsSymbol = isSymbol(value),\n valIsUndefined = value === undefined;\n\n while (low < high) {\n var mid = nativeFloor((low + high) / 2),\n computed = iteratee(array[mid]),\n othIsDefined = computed !== undefined,\n othIsNull = computed === null,\n othIsReflexive = computed === computed,\n othIsSymbol = isSymbol(computed);\n\n if (valIsNaN) {\n var setLow = retHighest || othIsReflexive;\n } else if (valIsUndefined) {\n setLow = othIsReflexive && (retHighest || othIsDefined);\n } else if (valIsNull) {\n setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull);\n } else if (valIsSymbol) {\n setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol);\n } else if (othIsNull || othIsSymbol) {\n setLow = false;\n } else {\n setLow = retHighest ? (computed <= value) : (computed < value);\n }\n if (setLow) {\n low = mid + 1;\n } else {\n high = mid;\n }\n }\n return nativeMin(high, MAX_ARRAY_INDEX);\n }\n\n /**\n * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without\n * support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n */\n function baseSortedUniq(array, iteratee) {\n var index = -1,\n length = array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n if (!index || !eq(computed, seen)) {\n var seen = computed;\n result[resIndex++] = value === 0 ? 0 : value;\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.toNumber` which doesn't ensure correct\n * conversions of binary, hexadecimal, or octal string values.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n */\n function baseToNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n return +value;\n }\n\n /**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\n function baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n if (isArray(value)) {\n // Recursively convert values (susceptible to call stack limits).\n return arrayMap(value, baseToString) + '';\n }\n if (isSymbol(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n }\n\n /**\n * The base implementation of `_.uniqBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n */\n function baseUniq(array, iteratee, comparator) {\n var index = -1,\n includes = arrayIncludes,\n length = array.length,\n isCommon = true,\n result = [],\n seen = result;\n\n if (comparator) {\n isCommon = false;\n includes = arrayIncludesWith;\n }\n else if (length >= LARGE_ARRAY_SIZE) {\n var set = iteratee ? null : createSet(array);\n if (set) {\n return setToArray(set);\n }\n isCommon = false;\n includes = cacheHas;\n seen = new SetCache;\n }\n else {\n seen = iteratee ? [] : result;\n }\n outer:\n while (++index < length) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n value = (comparator || value !== 0) ? value : 0;\n if (isCommon && computed === computed) {\n var seenIndex = seen.length;\n while (seenIndex--) {\n if (seen[seenIndex] === computed) {\n continue outer;\n }\n }\n if (iteratee) {\n seen.push(computed);\n }\n result.push(value);\n }\n else if (!includes(seen, computed, comparator)) {\n if (seen !== result) {\n seen.push(computed);\n }\n result.push(value);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.unset`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The property path to unset.\n * @returns {boolean} Returns `true` if the property is deleted, else `false`.\n */\n function baseUnset(object, path) {\n path = castPath(path, object);\n object = parent(object, path);\n return object == null || delete object[toKey(last(path))];\n }\n\n /**\n * The base implementation of `_.update`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to update.\n * @param {Function} updater The function to produce the updated value.\n * @param {Function} [customizer] The function to customize path creation.\n * @returns {Object} Returns `object`.\n */\n function baseUpdate(object, path, updater, customizer) {\n return baseSet(object, path, updater(baseGet(object, path)), customizer);\n }\n\n /**\n * The base implementation of methods like `_.dropWhile` and `_.takeWhile`\n * without support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to query.\n * @param {Function} predicate The function invoked per iteration.\n * @param {boolean} [isDrop] Specify dropping elements instead of taking them.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Array} Returns the slice of `array`.\n */\n function baseWhile(array, predicate, isDrop, fromRight) {\n var length = array.length,\n index = fromRight ? length : -1;\n\n while ((fromRight ? index-- : ++index < length) &&\n predicate(array[index], index, array)) {}\n\n return isDrop\n ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length))\n : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index));\n }\n\n /**\n * The base implementation of `wrapperValue` which returns the result of\n * performing a sequence of actions on the unwrapped `value`, where each\n * successive action is supplied the return value of the previous.\n *\n * @private\n * @param {*} value The unwrapped value.\n * @param {Array} actions Actions to perform to resolve the unwrapped value.\n * @returns {*} Returns the resolved value.\n */\n function baseWrapperValue(value, actions) {\n var result = value;\n if (result instanceof LazyWrapper) {\n result = result.value();\n }\n return arrayReduce(actions, function(result, action) {\n return action.func.apply(action.thisArg, arrayPush([result], action.args));\n }, result);\n }\n\n /**\n * The base implementation of methods like `_.xor`, without support for\n * iteratee shorthands, that accepts an array of arrays to inspect.\n *\n * @private\n * @param {Array} arrays The arrays to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of values.\n */\n function baseXor(arrays, iteratee, comparator) {\n var length = arrays.length;\n if (length < 2) {\n return length ? baseUniq(arrays[0]) : [];\n }\n var index = -1,\n result = Array(length);\n\n while (++index < length) {\n var array = arrays[index],\n othIndex = -1;\n\n while (++othIndex < length) {\n if (othIndex != index) {\n result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator);\n }\n }\n }\n return baseUniq(baseFlatten(result, 1), iteratee, comparator);\n }\n\n /**\n * This base implementation of `_.zipObject` which assigns values using `assignFunc`.\n *\n * @private\n * @param {Array} props The property identifiers.\n * @param {Array} values The property values.\n * @param {Function} assignFunc The function to assign values.\n * @returns {Object} Returns the new object.\n */\n function baseZipObject(props, values, assignFunc) {\n var index = -1,\n length = props.length,\n valsLength = values.length,\n result = {};\n\n while (++index < length) {\n var value = index < valsLength ? values[index] : undefined;\n assignFunc(result, props[index], value);\n }\n return result;\n }\n\n /**\n * Casts `value` to an empty array if it's not an array like object.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {Array|Object} Returns the cast array-like object.\n */\n function castArrayLikeObject(value) {\n return isArrayLikeObject(value) ? value : [];\n }\n\n /**\n * Casts `value` to `identity` if it's not a function.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {Function} Returns cast function.\n */\n function castFunction(value) {\n return typeof value == 'function' ? value : identity;\n }\n\n /**\n * Casts `value` to a path array if it's not one.\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {Object} [object] The object to query keys on.\n * @returns {Array} Returns the cast property path array.\n */\n function castPath(value, object) {\n if (isArray(value)) {\n return value;\n }\n return isKey(value, object) ? [value] : stringToPath(toString(value));\n }\n\n /**\n * A `baseRest` alias which can be replaced with `identity` by module\n * replacement plugins.\n *\n * @private\n * @type {Function}\n * @param {Function} func The function to apply a rest parameter to.\n * @returns {Function} Returns the new function.\n */\n var castRest = baseRest;\n\n /**\n * Casts `array` to a slice if it's needed.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {number} start The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the cast slice.\n */\n function castSlice(array, start, end) {\n var length = array.length;\n end = end === undefined ? length : end;\n return (!start && end >= length) ? array : baseSlice(array, start, end);\n }\n\n /**\n * A simple wrapper around the global [`clearTimeout`](https://mdn.io/clearTimeout).\n *\n * @private\n * @param {number|Object} id The timer id or timeout object of the timer to clear.\n */\n var clearTimeout = ctxClearTimeout || function(id) {\n return root.clearTimeout(id);\n };\n\n /**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\n function cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n }\n\n /**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\n function cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n }\n\n /**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\n function cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n }\n\n /**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\n function cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n }\n\n /**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\n function cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n }\n\n /**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\n function cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n }\n\n /**\n * Compares values to sort them in ascending order.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {number} Returns the sort order indicator for `value`.\n */\n function compareAscending(value, other) {\n if (value !== other) {\n var valIsDefined = value !== undefined,\n valIsNull = value === null,\n valIsReflexive = value === value,\n valIsSymbol = isSymbol(value);\n\n var othIsDefined = other !== undefined,\n othIsNull = other === null,\n othIsReflexive = other === other,\n othIsSymbol = isSymbol(other);\n\n if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||\n (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||\n (valIsNull && othIsDefined && othIsReflexive) ||\n (!valIsDefined && othIsReflexive) ||\n !valIsReflexive) {\n return 1;\n }\n if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||\n (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||\n (othIsNull && valIsDefined && valIsReflexive) ||\n (!othIsDefined && valIsReflexive) ||\n !othIsReflexive) {\n return -1;\n }\n }\n return 0;\n }\n\n /**\n * Used by `_.orderBy` to compare multiple properties of a value to another\n * and stable sort them.\n *\n * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,\n * specify an order of \"desc\" for descending or \"asc\" for ascending sort order\n * of corresponding values.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {boolean[]|string[]} orders The order to sort by for each property.\n * @returns {number} Returns the sort order indicator for `object`.\n */\n function compareMultiple(object, other, orders) {\n var index = -1,\n objCriteria = object.criteria,\n othCriteria = other.criteria,\n length = objCriteria.length,\n ordersLength = orders.length;\n\n while (++index < length) {\n var result = compareAscending(objCriteria[index], othCriteria[index]);\n if (result) {\n if (index >= ordersLength) {\n return result;\n }\n var order = orders[index];\n return result * (order == 'desc' ? -1 : 1);\n }\n }\n // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications\n // that causes it, under certain circumstances, to provide the same value for\n // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247\n // for more details.\n //\n // This also ensures a stable sort in V8 and other engines.\n // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.\n return object.index - other.index;\n }\n\n /**\n * Creates an array that is the composition of partially applied arguments,\n * placeholders, and provided arguments into a single array of arguments.\n *\n * @private\n * @param {Array} args The provided arguments.\n * @param {Array} partials The arguments to prepend to those provided.\n * @param {Array} holders The `partials` placeholder indexes.\n * @params {boolean} [isCurried] Specify composing for a curried function.\n * @returns {Array} Returns the new array of composed arguments.\n */\n function composeArgs(args, partials, holders, isCurried) {\n var argsIndex = -1,\n argsLength = args.length,\n holdersLength = holders.length,\n leftIndex = -1,\n leftLength = partials.length,\n rangeLength = nativeMax(argsLength - holdersLength, 0),\n result = Array(leftLength + rangeLength),\n isUncurried = !isCurried;\n\n while (++leftIndex < leftLength) {\n result[leftIndex] = partials[leftIndex];\n }\n while (++argsIndex < holdersLength) {\n if (isUncurried || argsIndex < argsLength) {\n result[holders[argsIndex]] = args[argsIndex];\n }\n }\n while (rangeLength--) {\n result[leftIndex++] = args[argsIndex++];\n }\n return result;\n }\n\n /**\n * This function is like `composeArgs` except that the arguments composition\n * is tailored for `_.partialRight`.\n *\n * @private\n * @param {Array} args The provided arguments.\n * @param {Array} partials The arguments to append to those provided.\n * @param {Array} holders The `partials` placeholder indexes.\n * @params {boolean} [isCurried] Specify composing for a curried function.\n * @returns {Array} Returns the new array of composed arguments.\n */\n function composeArgsRight(args, partials, holders, isCurried) {\n var argsIndex = -1,\n argsLength = args.length,\n holdersIndex = -1,\n holdersLength = holders.length,\n rightIndex = -1,\n rightLength = partials.length,\n rangeLength = nativeMax(argsLength - holdersLength, 0),\n result = Array(rangeLength + rightLength),\n isUncurried = !isCurried;\n\n while (++argsIndex < rangeLength) {\n result[argsIndex] = args[argsIndex];\n }\n var offset = argsIndex;\n while (++rightIndex < rightLength) {\n result[offset + rightIndex] = partials[rightIndex];\n }\n while (++holdersIndex < holdersLength) {\n if (isUncurried || argsIndex < argsLength) {\n result[offset + holders[holdersIndex]] = args[argsIndex++];\n }\n }\n return result;\n }\n\n /**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\n function copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n }\n\n /**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\n function copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n }\n\n /**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\n function copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n }\n\n /**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\n function copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n }\n\n /**\n * Creates a function like `_.groupBy`.\n *\n * @private\n * @param {Function} setter The function to set accumulator values.\n * @param {Function} [initializer] The accumulator object initializer.\n * @returns {Function} Returns the new aggregator function.\n */\n function createAggregator(setter, initializer) {\n return function(collection, iteratee) {\n var func = isArray(collection) ? arrayAggregator : baseAggregator,\n accumulator = initializer ? initializer() : {};\n\n return func(collection, setter, getIteratee(iteratee, 2), accumulator);\n };\n }\n\n /**\n * Creates a function like `_.assign`.\n *\n * @private\n * @param {Function} assigner The function to assign values.\n * @returns {Function} Returns the new assigner function.\n */\n function createAssigner(assigner) {\n return baseRest(function(object, sources) {\n var index = -1,\n length = sources.length,\n customizer = length > 1 ? sources[length - 1] : undefined,\n guard = length > 2 ? sources[2] : undefined;\n\n customizer = (assigner.length > 3 && typeof customizer == 'function')\n ? (length--, customizer)\n : undefined;\n\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n customizer = length < 3 ? undefined : customizer;\n length = 1;\n }\n object = Object(object);\n while (++index < length) {\n var source = sources[index];\n if (source) {\n assigner(object, source, index, customizer);\n }\n }\n return object;\n });\n }\n\n /**\n * Creates a `baseEach` or `baseEachRight` function.\n *\n * @private\n * @param {Function} eachFunc The function to iterate over a collection.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\n function createBaseEach(eachFunc, fromRight) {\n return function(collection, iteratee) {\n if (collection == null) {\n return collection;\n }\n if (!isArrayLike(collection)) {\n return eachFunc(collection, iteratee);\n }\n var length = collection.length,\n index = fromRight ? length : -1,\n iterable = Object(collection);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (iteratee(iterable[index], index, iterable) === false) {\n break;\n }\n }\n return collection;\n };\n }\n\n /**\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\n function createBaseFor(fromRight) {\n return function(object, iteratee, keysFunc) {\n var index = -1,\n iterable = Object(object),\n props = keysFunc(object),\n length = props.length;\n\n while (length--) {\n var key = props[fromRight ? length : ++index];\n if (iteratee(iterable[key], key, iterable) === false) {\n break;\n }\n }\n return object;\n };\n }\n\n /**\n * Creates a function that wraps `func` to invoke it with the optional `this`\n * binding of `thisArg`.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {*} [thisArg] The `this` binding of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createBind(func, bitmask, thisArg) {\n var isBind = bitmask & WRAP_BIND_FLAG,\n Ctor = createCtor(func);\n\n function wrapper() {\n var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n return fn.apply(isBind ? thisArg : this, arguments);\n }\n return wrapper;\n }\n\n /**\n * Creates a function like `_.lowerFirst`.\n *\n * @private\n * @param {string} methodName The name of the `String` case method to use.\n * @returns {Function} Returns the new case function.\n */\n function createCaseFirst(methodName) {\n return function(string) {\n string = toString(string);\n\n var strSymbols = hasUnicode(string)\n ? stringToArray(string)\n : undefined;\n\n var chr = strSymbols\n ? strSymbols[0]\n : string.charAt(0);\n\n var trailing = strSymbols\n ? castSlice(strSymbols, 1).join('')\n : string.slice(1);\n\n return chr[methodName]() + trailing;\n };\n }\n\n /**\n * Creates a function like `_.camelCase`.\n *\n * @private\n * @param {Function} callback The function to combine each word.\n * @returns {Function} Returns the new compounder function.\n */\n function createCompounder(callback) {\n return function(string) {\n return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');\n };\n }\n\n /**\n * Creates a function that produces an instance of `Ctor` regardless of\n * whether it was invoked as part of a `new` expression or by `call` or `apply`.\n *\n * @private\n * @param {Function} Ctor The constructor to wrap.\n * @returns {Function} Returns the new wrapped function.\n */\n function createCtor(Ctor) {\n return function() {\n // Use a `switch` statement to work with class constructors. See\n // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist\n // for more details.\n var args = arguments;\n switch (args.length) {\n case 0: return new Ctor;\n case 1: return new Ctor(args[0]);\n case 2: return new Ctor(args[0], args[1]);\n case 3: return new Ctor(args[0], args[1], args[2]);\n case 4: return new Ctor(args[0], args[1], args[2], args[3]);\n case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);\n case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);\n case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);\n }\n var thisBinding = baseCreate(Ctor.prototype),\n result = Ctor.apply(thisBinding, args);\n\n // Mimic the constructor's `return` behavior.\n // See https://es5.github.io/#x13.2.2 for more details.\n return isObject(result) ? result : thisBinding;\n };\n }\n\n /**\n * Creates a function that wraps `func` to enable currying.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {number} arity The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createCurry(func, bitmask, arity) {\n var Ctor = createCtor(func);\n\n function wrapper() {\n var length = arguments.length,\n args = Array(length),\n index = length,\n placeholder = getHolder(wrapper);\n\n while (index--) {\n args[index] = arguments[index];\n }\n var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder)\n ? []\n : replaceHolders(args, placeholder);\n\n length -= holders.length;\n if (length < arity) {\n return createRecurry(\n func, bitmask, createHybrid, wrapper.placeholder, undefined,\n args, holders, undefined, undefined, arity - length);\n }\n var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n return apply(fn, this, args);\n }\n return wrapper;\n }\n\n /**\n * Creates a `_.find` or `_.findLast` function.\n *\n * @private\n * @param {Function} findIndexFunc The function to find the collection index.\n * @returns {Function} Returns the new find function.\n */\n function createFind(findIndexFunc) {\n return function(collection, predicate, fromIndex) {\n var iterable = Object(collection);\n if (!isArrayLike(collection)) {\n var iteratee = getIteratee(predicate, 3);\n collection = keys(collection);\n predicate = function(key) { return iteratee(iterable[key], key, iterable); };\n }\n var index = findIndexFunc(collection, predicate, fromIndex);\n return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;\n };\n }\n\n /**\n * Creates a `_.flow` or `_.flowRight` function.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new flow function.\n */\n function createFlow(fromRight) {\n return flatRest(function(funcs) {\n var length = funcs.length,\n index = length,\n prereq = LodashWrapper.prototype.thru;\n\n if (fromRight) {\n funcs.reverse();\n }\n while (index--) {\n var func = funcs[index];\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n if (prereq && !wrapper && getFuncName(func) == 'wrapper') {\n var wrapper = new LodashWrapper([], true);\n }\n }\n index = wrapper ? index : length;\n while (++index < length) {\n func = funcs[index];\n\n var funcName = getFuncName(func),\n data = funcName == 'wrapper' ? getData(func) : undefined;\n\n if (data && isLaziable(data[0]) &&\n data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) &&\n !data[4].length && data[9] == 1\n ) {\n wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);\n } else {\n wrapper = (func.length == 1 && isLaziable(func))\n ? wrapper[funcName]()\n : wrapper.thru(func);\n }\n }\n return function() {\n var args = arguments,\n value = args[0];\n\n if (wrapper && args.length == 1 && isArray(value)) {\n return wrapper.plant(value).value();\n }\n var index = 0,\n result = length ? funcs[index].apply(this, args) : value;\n\n while (++index < length) {\n result = funcs[index].call(this, result);\n }\n return result;\n };\n });\n }\n\n /**\n * Creates a function that wraps `func` to invoke it with optional `this`\n * binding of `thisArg`, partial application, and currying.\n *\n * @private\n * @param {Function|string} func The function or method name to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {*} [thisArg] The `this` binding of `func`.\n * @param {Array} [partials] The arguments to prepend to those provided to\n * the new function.\n * @param {Array} [holders] The `partials` placeholder indexes.\n * @param {Array} [partialsRight] The arguments to append to those provided\n * to the new function.\n * @param {Array} [holdersRight] The `partialsRight` placeholder indexes.\n * @param {Array} [argPos] The argument positions of the new function.\n * @param {number} [ary] The arity cap of `func`.\n * @param {number} [arity] The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {\n var isAry = bitmask & WRAP_ARY_FLAG,\n isBind = bitmask & WRAP_BIND_FLAG,\n isBindKey = bitmask & WRAP_BIND_KEY_FLAG,\n isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG),\n isFlip = bitmask & WRAP_FLIP_FLAG,\n Ctor = isBindKey ? undefined : createCtor(func);\n\n function wrapper() {\n var length = arguments.length,\n args = Array(length),\n index = length;\n\n while (index--) {\n args[index] = arguments[index];\n }\n if (isCurried) {\n var placeholder = getHolder(wrapper),\n holdersCount = countHolders(args, placeholder);\n }\n if (partials) {\n args = composeArgs(args, partials, holders, isCurried);\n }\n if (partialsRight) {\n args = composeArgsRight(args, partialsRight, holdersRight, isCurried);\n }\n length -= holdersCount;\n if (isCurried && length < arity) {\n var newHolders = replaceHolders(args, placeholder);\n return createRecurry(\n func, bitmask, createHybrid, wrapper.placeholder, thisArg,\n args, newHolders, argPos, ary, arity - length\n );\n }\n var thisBinding = isBind ? thisArg : this,\n fn = isBindKey ? thisBinding[func] : func;\n\n length = args.length;\n if (argPos) {\n args = reorder(args, argPos);\n } else if (isFlip && length > 1) {\n args.reverse();\n }\n if (isAry && ary < length) {\n args.length = ary;\n }\n if (this && this !== root && this instanceof wrapper) {\n fn = Ctor || createCtor(fn);\n }\n return fn.apply(thisBinding, args);\n }\n return wrapper;\n }\n\n /**\n * Creates a function like `_.invertBy`.\n *\n * @private\n * @param {Function} setter The function to set accumulator values.\n * @param {Function} toIteratee The function to resolve iteratees.\n * @returns {Function} Returns the new inverter function.\n */\n function createInverter(setter, toIteratee) {\n return function(object, iteratee) {\n return baseInverter(object, setter, toIteratee(iteratee), {});\n };\n }\n\n /**\n * Creates a function that performs a mathematical operation on two values.\n *\n * @private\n * @param {Function} operator The function to perform the operation.\n * @param {number} [defaultValue] The value used for `undefined` arguments.\n * @returns {Function} Returns the new mathematical operation function.\n */\n function createMathOperation(operator, defaultValue) {\n return function(value, other) {\n var result;\n if (value === undefined && other === undefined) {\n return defaultValue;\n }\n if (value !== undefined) {\n result = value;\n }\n if (other !== undefined) {\n if (result === undefined) {\n return other;\n }\n if (typeof value == 'string' || typeof other == 'string') {\n value = baseToString(value);\n other = baseToString(other);\n } else {\n value = baseToNumber(value);\n other = baseToNumber(other);\n }\n result = operator(value, other);\n }\n return result;\n };\n }\n\n /**\n * Creates a function like `_.over`.\n *\n * @private\n * @param {Function} arrayFunc The function to iterate over iteratees.\n * @returns {Function} Returns the new over function.\n */\n function createOver(arrayFunc) {\n return flatRest(function(iteratees) {\n iteratees = arrayMap(iteratees, baseUnary(getIteratee()));\n return baseRest(function(args) {\n var thisArg = this;\n return arrayFunc(iteratees, function(iteratee) {\n return apply(iteratee, thisArg, args);\n });\n });\n });\n }\n\n /**\n * Creates the padding for `string` based on `length`. The `chars` string\n * is truncated if the number of characters exceeds `length`.\n *\n * @private\n * @param {number} length The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padding for `string`.\n */\n function createPadding(length, chars) {\n chars = chars === undefined ? ' ' : baseToString(chars);\n\n var charsLength = chars.length;\n if (charsLength < 2) {\n return charsLength ? baseRepeat(chars, length) : chars;\n }\n var result = baseRepeat(chars, nativeCeil(length / stringSize(chars)));\n return hasUnicode(chars)\n ? castSlice(stringToArray(result), 0, length).join('')\n : result.slice(0, length);\n }\n\n /**\n * Creates a function that wraps `func` to invoke it with the `this` binding\n * of `thisArg` and `partials` prepended to the arguments it receives.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} partials The arguments to prepend to those provided to\n * the new function.\n * @returns {Function} Returns the new wrapped function.\n */\n function createPartial(func, bitmask, thisArg, partials) {\n var isBind = bitmask & WRAP_BIND_FLAG,\n Ctor = createCtor(func);\n\n function wrapper() {\n var argsIndex = -1,\n argsLength = arguments.length,\n leftIndex = -1,\n leftLength = partials.length,\n args = Array(leftLength + argsLength),\n fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n\n while (++leftIndex < leftLength) {\n args[leftIndex] = partials[leftIndex];\n }\n while (argsLength--) {\n args[leftIndex++] = arguments[++argsIndex];\n }\n return apply(fn, isBind ? thisArg : this, args);\n }\n return wrapper;\n }\n\n /**\n * Creates a `_.range` or `_.rangeRight` function.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new range function.\n */\n function createRange(fromRight) {\n return function(start, end, step) {\n if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {\n end = step = undefined;\n }\n // Ensure the sign of `-0` is preserved.\n start = toFinite(start);\n if (end === undefined) {\n end = start;\n start = 0;\n } else {\n end = toFinite(end);\n }\n step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);\n return baseRange(start, end, step, fromRight);\n };\n }\n\n /**\n * Creates a function that performs a relational operation on two values.\n *\n * @private\n * @param {Function} operator The function to perform the operation.\n * @returns {Function} Returns the new relational operation function.\n */\n function createRelationalOperation(operator) {\n return function(value, other) {\n if (!(typeof value == 'string' && typeof other == 'string')) {\n value = toNumber(value);\n other = toNumber(other);\n }\n return operator(value, other);\n };\n }\n\n /**\n * Creates a function that wraps `func` to continue currying.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {Function} wrapFunc The function to create the `func` wrapper.\n * @param {*} placeholder The placeholder value.\n * @param {*} [thisArg] The `this` binding of `func`.\n * @param {Array} [partials] The arguments to prepend to those provided to\n * the new function.\n * @param {Array} [holders] The `partials` placeholder indexes.\n * @param {Array} [argPos] The argument positions of the new function.\n * @param {number} [ary] The arity cap of `func`.\n * @param {number} [arity] The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {\n var isCurry = bitmask & WRAP_CURRY_FLAG,\n newHolders = isCurry ? holders : undefined,\n newHoldersRight = isCurry ? undefined : holders,\n newPartials = isCurry ? partials : undefined,\n newPartialsRight = isCurry ? undefined : partials;\n\n bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG);\n bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);\n\n if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {\n bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG);\n }\n var newData = [\n func, bitmask, thisArg, newPartials, newHolders, newPartialsRight,\n newHoldersRight, argPos, ary, arity\n ];\n\n var result = wrapFunc.apply(undefined, newData);\n if (isLaziable(func)) {\n setData(result, newData);\n }\n result.placeholder = placeholder;\n return setWrapToString(result, func, bitmask);\n }\n\n /**\n * Creates a function like `_.round`.\n *\n * @private\n * @param {string} methodName The name of the `Math` method to use when rounding.\n * @returns {Function} Returns the new round function.\n */\n function createRound(methodName) {\n var func = Math[methodName];\n return function(number, precision) {\n number = toNumber(number);\n precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);\n if (precision && nativeIsFinite(number)) {\n // Shift with exponential notation to avoid floating-point issues.\n // See [MDN](https://mdn.io/round#Examples) for more details.\n var pair = (toString(number) + 'e').split('e'),\n value = func(pair[0] + 'e' + (+pair[1] + precision));\n\n pair = (toString(value) + 'e').split('e');\n return +(pair[0] + 'e' + (+pair[1] - precision));\n }\n return func(number);\n };\n }\n\n /**\n * Creates a set object of `values`.\n *\n * @private\n * @param {Array} values The values to add to the set.\n * @returns {Object} Returns the new set.\n */\n var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {\n return new Set(values);\n };\n\n /**\n * Creates a `_.toPairs` or `_.toPairsIn` function.\n *\n * @private\n * @param {Function} keysFunc The function to get the keys of a given object.\n * @returns {Function} Returns the new pairs function.\n */\n function createToPairs(keysFunc) {\n return function(object) {\n var tag = getTag(object);\n if (tag == mapTag) {\n return mapToArray(object);\n }\n if (tag == setTag) {\n return setToPairs(object);\n }\n return baseToPairs(object, keysFunc(object));\n };\n }\n\n /**\n * Creates a function that either curries or invokes `func` with optional\n * `this` binding and partially applied arguments.\n *\n * @private\n * @param {Function|string} func The function or method name to wrap.\n * @param {number} bitmask The bitmask flags.\n * 1 - `_.bind`\n * 2 - `_.bindKey`\n * 4 - `_.curry` or `_.curryRight` of a bound function\n * 8 - `_.curry`\n * 16 - `_.curryRight`\n * 32 - `_.partial`\n * 64 - `_.partialRight`\n * 128 - `_.rearg`\n * 256 - `_.ary`\n * 512 - `_.flip`\n * @param {*} [thisArg] The `this` binding of `func`.\n * @param {Array} [partials] The arguments to be partially applied.\n * @param {Array} [holders] The `partials` placeholder indexes.\n * @param {Array} [argPos] The argument positions of the new function.\n * @param {number} [ary] The arity cap of `func`.\n * @param {number} [arity] The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {\n var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;\n if (!isBindKey && typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var length = partials ? partials.length : 0;\n if (!length) {\n bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG);\n partials = holders = undefined;\n }\n ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0);\n arity = arity === undefined ? arity : toInteger(arity);\n length -= holders ? holders.length : 0;\n\n if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) {\n var partialsRight = partials,\n holdersRight = holders;\n\n partials = holders = undefined;\n }\n var data = isBindKey ? undefined : getData(func);\n\n var newData = [\n func, bitmask, thisArg, partials, holders, partialsRight, holdersRight,\n argPos, ary, arity\n ];\n\n if (data) {\n mergeData(newData, data);\n }\n func = newData[0];\n bitmask = newData[1];\n thisArg = newData[2];\n partials = newData[3];\n holders = newData[4];\n arity = newData[9] = newData[9] === undefined\n ? (isBindKey ? 0 : func.length)\n : nativeMax(newData[9] - length, 0);\n\n if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {\n bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);\n }\n if (!bitmask || bitmask == WRAP_BIND_FLAG) {\n var result = createBind(func, bitmask, thisArg);\n } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) {\n result = createCurry(func, bitmask, arity);\n } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) {\n result = createPartial(func, bitmask, thisArg, partials);\n } else {\n result = createHybrid.apply(undefined, newData);\n }\n var setter = data ? baseSetData : setData;\n return setWrapToString(setter(result, newData), func, bitmask);\n }\n\n /**\n * Used by `_.defaults` to customize its `_.assignIn` use to assign properties\n * of source objects to the destination object for all destination properties\n * that resolve to `undefined`.\n *\n * @private\n * @param {*} objValue The destination value.\n * @param {*} srcValue The source value.\n * @param {string} key The key of the property to assign.\n * @param {Object} object The parent object of `objValue`.\n * @returns {*} Returns the value to assign.\n */\n function customDefaultsAssignIn(objValue, srcValue, key, object) {\n if (objValue === undefined ||\n (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {\n return srcValue;\n }\n return objValue;\n }\n\n /**\n * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source\n * objects into destination objects that are passed thru.\n *\n * @private\n * @param {*} objValue The destination value.\n * @param {*} srcValue The source value.\n * @param {string} key The key of the property to merge.\n * @param {Object} object The parent object of `objValue`.\n * @param {Object} source The parent object of `srcValue`.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n * @returns {*} Returns the value to assign.\n */\n function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {\n if (isObject(objValue) && isObject(srcValue)) {\n // Recursively merge objects and arrays (susceptible to call stack limits).\n stack.set(srcValue, objValue);\n baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack);\n stack['delete'](srcValue);\n }\n return objValue;\n }\n\n /**\n * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain\n * objects.\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {string} key The key of the property to inspect.\n * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`.\n */\n function customOmitClone(value) {\n return isPlainObject(value) ? undefined : value;\n }\n\n /**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\n function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n }\n\n /**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\n function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n }\n\n /**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\n function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n }\n\n /**\n * A specialized version of `baseRest` which flattens the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @returns {Function} Returns the new function.\n */\n function flatRest(func) {\n return setToString(overRest(func, undefined, flatten), func + '');\n }\n\n /**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\n function getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n }\n\n /**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\n function getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n }\n\n /**\n * Gets metadata for `func`.\n *\n * @private\n * @param {Function} func The function to query.\n * @returns {*} Returns the metadata for `func`.\n */\n var getData = !metaMap ? noop : function(func) {\n return metaMap.get(func);\n };\n\n /**\n * Gets the name of `func`.\n *\n * @private\n * @param {Function} func The function to query.\n * @returns {string} Returns the function name.\n */\n function getFuncName(func) {\n var result = (func.name + ''),\n array = realNames[result],\n length = hasOwnProperty.call(realNames, result) ? array.length : 0;\n\n while (length--) {\n var data = array[length],\n otherFunc = data.func;\n if (otherFunc == null || otherFunc == func) {\n return data.name;\n }\n }\n return result;\n }\n\n /**\n * Gets the argument placeholder value for `func`.\n *\n * @private\n * @param {Function} func The function to inspect.\n * @returns {*} Returns the placeholder value.\n */\n function getHolder(func) {\n var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func;\n return object.placeholder;\n }\n\n /**\n * Gets the appropriate \"iteratee\" function. If `_.iteratee` is customized,\n * this function returns the custom method, otherwise it returns `baseIteratee`.\n * If arguments are provided, the chosen function is invoked with them and\n * its result is returned.\n *\n * @private\n * @param {*} [value] The value to convert to an iteratee.\n * @param {number} [arity] The arity of the created iteratee.\n * @returns {Function} Returns the chosen function or its result.\n */\n function getIteratee() {\n var result = lodash.iteratee || iteratee;\n result = result === iteratee ? baseIteratee : result;\n return arguments.length ? result(arguments[0], arguments[1]) : result;\n }\n\n /**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\n function getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n }\n\n /**\n * Gets the property names, values, and compare flags of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the match data of `object`.\n */\n function getMatchData(object) {\n var result = keys(object),\n length = result.length;\n\n while (length--) {\n var key = result[length],\n value = object[key];\n\n result[length] = [key, value, isStrictComparable(value)];\n }\n return result;\n }\n\n /**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\n function getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n }\n\n /**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\n function getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n }\n\n /**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\n var getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n };\n\n /**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\n var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n };\n\n /**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\n var getTag = baseGetTag;\n\n // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\n if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n }\n\n /**\n * Gets the view, applying any `transforms` to the `start` and `end` positions.\n *\n * @private\n * @param {number} start The start of the view.\n * @param {number} end The end of the view.\n * @param {Array} transforms The transformations to apply to the view.\n * @returns {Object} Returns an object containing the `start` and `end`\n * positions of the view.\n */\n function getView(start, end, transforms) {\n var index = -1,\n length = transforms.length;\n\n while (++index < length) {\n var data = transforms[index],\n size = data.size;\n\n switch (data.type) {\n case 'drop': start += size; break;\n case 'dropRight': end -= size; break;\n case 'take': end = nativeMin(end, start + size); break;\n case 'takeRight': start = nativeMax(start, end - size); break;\n }\n }\n return { 'start': start, 'end': end };\n }\n\n /**\n * Extracts wrapper details from the `source` body comment.\n *\n * @private\n * @param {string} source The source to inspect.\n * @returns {Array} Returns the wrapper details.\n */\n function getWrapDetails(source) {\n var match = source.match(reWrapDetails);\n return match ? match[1].split(reSplitDetails) : [];\n }\n\n /**\n * Checks if `path` exists on `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @param {Function} hasFunc The function to check properties.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n */\n function hasPath(object, path, hasFunc) {\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n result = false;\n\n while (++index < length) {\n var key = toKey(path[index]);\n if (!(result = object != null && hasFunc(object, key))) {\n break;\n }\n object = object[key];\n }\n if (result || ++index != length) {\n return result;\n }\n length = object == null ? 0 : object.length;\n return !!length && isLength(length) && isIndex(key, length) &&\n (isArray(object) || isArguments(object));\n }\n\n /**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\n function initCloneArray(array) {\n var length = array.length,\n result = new array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n }\n\n /**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\n function initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n }\n\n /**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\n function initCloneByTag(object, tag, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return new Ctor;\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return new Ctor;\n\n case symbolTag:\n return cloneSymbol(object);\n }\n }\n\n /**\n * Inserts wrapper `details` in a comment at the top of the `source` body.\n *\n * @private\n * @param {string} source The source to modify.\n * @returns {Array} details The details to insert.\n * @returns {string} Returns the modified source.\n */\n function insertWrapDetails(source, details) {\n var length = details.length;\n if (!length) {\n return source;\n }\n var lastIndex = length - 1;\n details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex];\n details = details.join(length > 2 ? ', ' : ' ');\n return source.replace(reWrapComment, '{\\n/* [wrapped with ' + details + '] */\\n');\n }\n\n /**\n * Checks if `value` is a flattenable `arguments` object or array.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.\n */\n function isFlattenable(value) {\n return isArray(value) || isArguments(value) ||\n !!(spreadableSymbol && value && value[spreadableSymbol]);\n }\n\n /**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\n function isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n }\n\n /**\n * Checks if the given arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n * else `false`.\n */\n function isIterateeCall(value, index, object) {\n if (!isObject(object)) {\n return false;\n }\n var type = typeof index;\n if (type == 'number'\n ? (isArrayLike(object) && isIndex(index, object.length))\n : (type == 'string' && index in object)\n ) {\n return eq(object[index], value);\n }\n return false;\n }\n\n /**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\n function isKey(value, object) {\n if (isArray(value)) {\n return false;\n }\n var type = typeof value;\n if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n value == null || isSymbol(value)) {\n return true;\n }\n return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n (object != null && value in Object(object));\n }\n\n /**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\n function isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n }\n\n /**\n * Checks if `func` has a lazy counterpart.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` has a lazy counterpart,\n * else `false`.\n */\n function isLaziable(func) {\n var funcName = getFuncName(func),\n other = lodash[funcName];\n\n if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {\n return false;\n }\n if (func === other) {\n return true;\n }\n var data = getData(other);\n return !!data && func === data[0];\n }\n\n /**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\n function isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n }\n\n /**\n * Checks if `func` is capable of being masked.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `func` is maskable, else `false`.\n */\n var isMaskable = coreJsData ? isFunction : stubFalse;\n\n /**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\n function isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n }\n\n /**\n * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` if suitable for strict\n * equality comparisons, else `false`.\n */\n function isStrictComparable(value) {\n return value === value && !isObject(value);\n }\n\n /**\n * A specialized version of `matchesProperty` for source values suitable\n * for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\n function matchesStrictComparable(key, srcValue) {\n return function(object) {\n if (object == null) {\n return false;\n }\n return object[key] === srcValue &&\n (srcValue !== undefined || (key in Object(object)));\n };\n }\n\n /**\n * A specialized version of `_.memoize` which clears the memoized function's\n * cache when it exceeds `MAX_MEMOIZE_SIZE`.\n *\n * @private\n * @param {Function} func The function to have its output memoized.\n * @returns {Function} Returns the new memoized function.\n */\n function memoizeCapped(func) {\n var result = memoize(func, function(key) {\n if (cache.size === MAX_MEMOIZE_SIZE) {\n cache.clear();\n }\n return key;\n });\n\n var cache = result.cache;\n return result;\n }\n\n /**\n * Merges the function metadata of `source` into `data`.\n *\n * Merging metadata reduces the number of wrappers used to invoke a function.\n * This is possible because methods like `_.bind`, `_.curry`, and `_.partial`\n * may be applied regardless of execution order. Methods like `_.ary` and\n * `_.rearg` modify function arguments, making the order in which they are\n * executed important, preventing the merging of metadata. However, we make\n * an exception for a safe combined case where curried functions have `_.ary`\n * and or `_.rearg` applied.\n *\n * @private\n * @param {Array} data The destination metadata.\n * @param {Array} source The source metadata.\n * @returns {Array} Returns `data`.\n */\n function mergeData(data, source) {\n var bitmask = data[1],\n srcBitmask = source[1],\n newBitmask = bitmask | srcBitmask,\n isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);\n\n var isCombo =\n ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) ||\n ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) ||\n ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG));\n\n // Exit early if metadata can't be merged.\n if (!(isCommon || isCombo)) {\n return data;\n }\n // Use source `thisArg` if available.\n if (srcBitmask & WRAP_BIND_FLAG) {\n data[2] = source[2];\n // Set when currying a bound function.\n newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;\n }\n // Compose partial arguments.\n var value = source[3];\n if (value) {\n var partials = data[3];\n data[3] = partials ? composeArgs(partials, value, source[4]) : value;\n data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];\n }\n // Compose partial right arguments.\n value = source[5];\n if (value) {\n partials = data[5];\n data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;\n data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];\n }\n // Use source `argPos` if available.\n value = source[7];\n if (value) {\n data[7] = value;\n }\n // Use source `ary` if it's smaller.\n if (srcBitmask & WRAP_ARY_FLAG) {\n data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);\n }\n // Use source `arity` if one is not provided.\n if (data[9] == null) {\n data[9] = source[9];\n }\n // Use source `func` and merge bitmasks.\n data[0] = source[0];\n data[1] = newBitmask;\n\n return data;\n }\n\n /**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\n function nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n }\n\n /**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\n function objectToString(value) {\n return nativeObjectToString.call(value);\n }\n\n /**\n * A specialized version of `baseRest` which transforms the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @param {Function} transform The rest array transform.\n * @returns {Function} Returns the new function.\n */\n function overRest(func, start, transform) {\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n index = -1;\n var otherArgs = Array(start + 1);\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = transform(array);\n return apply(func, this, otherArgs);\n };\n }\n\n /**\n * Gets the parent value at `path` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array} path The path to get the parent value of.\n * @returns {*} Returns the parent value.\n */\n function parent(object, path) {\n return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));\n }\n\n /**\n * Reorder `array` according to the specified indexes where the element at\n * the first index is assigned as the first element, the element at\n * the second index is assigned as the second element, and so on.\n *\n * @private\n * @param {Array} array The array to reorder.\n * @param {Array} indexes The arranged array indexes.\n * @returns {Array} Returns `array`.\n */\n function reorder(array, indexes) {\n var arrLength = array.length,\n length = nativeMin(indexes.length, arrLength),\n oldArray = copyArray(array);\n\n while (length--) {\n var index = indexes[length];\n array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;\n }\n return array;\n }\n\n /**\n * Gets the value at `key`, unless `key` is \"__proto__\" or \"constructor\".\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\n function safeGet(object, key) {\n if (key === 'constructor' && typeof object[key] === 'function') {\n return;\n }\n\n if (key == '__proto__') {\n return;\n }\n\n return object[key];\n }\n\n /**\n * Sets metadata for `func`.\n *\n * **Note:** If this function becomes hot, i.e. is invoked a lot in a short\n * period of time, it will trip its breaker and transition to an identity\n * function to avoid garbage collection pauses in V8. See\n * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070)\n * for more details.\n *\n * @private\n * @param {Function} func The function to associate metadata with.\n * @param {*} data The metadata.\n * @returns {Function} Returns `func`.\n */\n var setData = shortOut(baseSetData);\n\n /**\n * A simple wrapper around the global [`setTimeout`](https://mdn.io/setTimeout).\n *\n * @private\n * @param {Function} func The function to delay.\n * @param {number} wait The number of milliseconds to delay invocation.\n * @returns {number|Object} Returns the timer id or timeout object.\n */\n var setTimeout = ctxSetTimeout || function(func, wait) {\n return root.setTimeout(func, wait);\n };\n\n /**\n * Sets the `toString` method of `func` to return `string`.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\n var setToString = shortOut(baseSetToString);\n\n /**\n * Sets the `toString` method of `wrapper` to mimic the source of `reference`\n * with wrapper details in a comment at the top of the source body.\n *\n * @private\n * @param {Function} wrapper The function to modify.\n * @param {Function} reference The reference function.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @returns {Function} Returns `wrapper`.\n */\n function setWrapToString(wrapper, reference, bitmask) {\n var source = (reference + '');\n return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));\n }\n\n /**\n * Creates a function that'll short out and invoke `identity` instead\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n * milliseconds.\n *\n * @private\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new shortable function.\n */\n function shortOut(func) {\n var count = 0,\n lastCalled = 0;\n\n return function() {\n var stamp = nativeNow(),\n remaining = HOT_SPAN - (stamp - lastCalled);\n\n lastCalled = stamp;\n if (remaining > 0) {\n if (++count >= HOT_COUNT) {\n return arguments[0];\n }\n } else {\n count = 0;\n }\n return func.apply(undefined, arguments);\n };\n }\n\n /**\n * A specialized version of `_.shuffle` which mutates and sets the size of `array`.\n *\n * @private\n * @param {Array} array The array to shuffle.\n * @param {number} [size=array.length] The size of `array`.\n * @returns {Array} Returns `array`.\n */\n function shuffleSelf(array, size) {\n var index = -1,\n length = array.length,\n lastIndex = length - 1;\n\n size = size === undefined ? length : size;\n while (++index < size) {\n var rand = baseRandom(index, lastIndex),\n value = array[rand];\n\n array[rand] = array[index];\n array[index] = value;\n }\n array.length = size;\n return array;\n }\n\n /**\n * Converts `string` to a property path array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the property path array.\n */\n var stringToPath = memoizeCapped(function(string) {\n var result = [];\n if (string.charCodeAt(0) === 46 /* . */) {\n result.push('');\n }\n string.replace(rePropName, function(match, number, quote, subString) {\n result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));\n });\n return result;\n });\n\n /**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\n function toKey(value) {\n if (typeof value == 'string' || isSymbol(value)) {\n return value;\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n }\n\n /**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\n function toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n }\n\n /**\n * Updates wrapper `details` based on `bitmask` flags.\n *\n * @private\n * @returns {Array} details The details to modify.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @returns {Array} Returns `details`.\n */\n function updateWrapDetails(details, bitmask) {\n arrayEach(wrapFlags, function(pair) {\n var value = '_.' + pair[0];\n if ((bitmask & pair[1]) && !arrayIncludes(details, value)) {\n details.push(value);\n }\n });\n return details.sort();\n }\n\n /**\n * Creates a clone of `wrapper`.\n *\n * @private\n * @param {Object} wrapper The wrapper to clone.\n * @returns {Object} Returns the cloned wrapper.\n */\n function wrapperClone(wrapper) {\n if (wrapper instanceof LazyWrapper) {\n return wrapper.clone();\n }\n var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);\n result.__actions__ = copyArray(wrapper.__actions__);\n result.__index__ = wrapper.__index__;\n result.__values__ = wrapper.__values__;\n return result;\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates an array of elements split into groups the length of `size`.\n * If `array` can't be split evenly, the final chunk will be the remaining\n * elements.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to process.\n * @param {number} [size=1] The length of each chunk\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the new array of chunks.\n * @example\n *\n * _.chunk(['a', 'b', 'c', 'd'], 2);\n * // => [['a', 'b'], ['c', 'd']]\n *\n * _.chunk(['a', 'b', 'c', 'd'], 3);\n * // => [['a', 'b', 'c'], ['d']]\n */\n function chunk(array, size, guard) {\n if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) {\n size = 1;\n } else {\n size = nativeMax(toInteger(size), 0);\n }\n var length = array == null ? 0 : array.length;\n if (!length || size < 1) {\n return [];\n }\n var index = 0,\n resIndex = 0,\n result = Array(nativeCeil(length / size));\n\n while (index < length) {\n result[resIndex++] = baseSlice(array, index, (index += size));\n }\n return result;\n }\n\n /**\n * Creates an array with all falsey values removed. The values `false`, `null`,\n * `0`, `\"\"`, `undefined`, and `NaN` are falsey.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to compact.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * _.compact([0, 1, false, 2, '', 3]);\n * // => [1, 2, 3]\n */\n function compact(array) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (value) {\n result[resIndex++] = value;\n }\n }\n return result;\n }\n\n /**\n * Creates a new array concatenating `array` with any additional arrays\n * and/or values.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to concatenate.\n * @param {...*} [values] The values to concatenate.\n * @returns {Array} Returns the new concatenated array.\n * @example\n *\n * var array = [1];\n * var other = _.concat(array, 2, [3], [[4]]);\n *\n * console.log(other);\n * // => [1, 2, 3, [4]]\n *\n * console.log(array);\n * // => [1]\n */\n function concat() {\n var length = arguments.length;\n if (!length) {\n return [];\n }\n var args = Array(length - 1),\n array = arguments[0],\n index = length;\n\n while (index--) {\n args[index - 1] = arguments[index];\n }\n return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));\n }\n\n /**\n * Creates an array of `array` values not included in the other given arrays\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons. The order and references of result values are\n * determined by the first array.\n *\n * **Note:** Unlike `_.pullAll`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...Array} [values] The values to exclude.\n * @returns {Array} Returns the new array of filtered values.\n * @see _.without, _.xor\n * @example\n *\n * _.difference([2, 1], [2, 3]);\n * // => [1]\n */\n var difference = baseRest(function(array, values) {\n return isArrayLikeObject(array)\n ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))\n : [];\n });\n\n /**\n * This method is like `_.difference` except that it accepts `iteratee` which\n * is invoked for each element of `array` and `values` to generate the criterion\n * by which they're compared. The order and references of result values are\n * determined by the first array. The iteratee is invoked with one argument:\n * (value).\n *\n * **Note:** Unlike `_.pullAllBy`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...Array} [values] The values to exclude.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n * // => [1.2]\n *\n * // The `_.property` iteratee shorthand.\n * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x');\n * // => [{ 'x': 2 }]\n */\n var differenceBy = baseRest(function(array, values) {\n var iteratee = last(values);\n if (isArrayLikeObject(iteratee)) {\n iteratee = undefined;\n }\n return isArrayLikeObject(array)\n ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee, 2))\n : [];\n });\n\n /**\n * This method is like `_.difference` except that it accepts `comparator`\n * which is invoked to compare elements of `array` to `values`. The order and\n * references of result values are determined by the first array. The comparator\n * is invoked with two arguments: (arrVal, othVal).\n *\n * **Note:** Unlike `_.pullAllWith`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...Array} [values] The values to exclude.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n *\n * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);\n * // => [{ 'x': 2, 'y': 1 }]\n */\n var differenceWith = baseRest(function(array, values) {\n var comparator = last(values);\n if (isArrayLikeObject(comparator)) {\n comparator = undefined;\n }\n return isArrayLikeObject(array)\n ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator)\n : [];\n });\n\n /**\n * Creates a slice of `array` with `n` elements dropped from the beginning.\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to drop.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.drop([1, 2, 3]);\n * // => [2, 3]\n *\n * _.drop([1, 2, 3], 2);\n * // => [3]\n *\n * _.drop([1, 2, 3], 5);\n * // => []\n *\n * _.drop([1, 2, 3], 0);\n * // => [1, 2, 3]\n */\n function drop(array, n, guard) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n n = (guard || n === undefined) ? 1 : toInteger(n);\n return baseSlice(array, n < 0 ? 0 : n, length);\n }\n\n /**\n * Creates a slice of `array` with `n` elements dropped from the end.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to drop.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.dropRight([1, 2, 3]);\n * // => [1, 2]\n *\n * _.dropRight([1, 2, 3], 2);\n * // => [1]\n *\n * _.dropRight([1, 2, 3], 5);\n * // => []\n *\n * _.dropRight([1, 2, 3], 0);\n * // => [1, 2, 3]\n */\n function dropRight(array, n, guard) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n n = (guard || n === undefined) ? 1 : toInteger(n);\n n = length - n;\n return baseSlice(array, 0, n < 0 ? 0 : n);\n }\n\n /**\n * Creates a slice of `array` excluding elements dropped from the end.\n * Elements are dropped until `predicate` returns falsey. The predicate is\n * invoked with three arguments: (value, index, array).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': false }\n * ];\n *\n * _.dropRightWhile(users, function(o) { return !o.active; });\n * // => objects for ['barney']\n *\n * // The `_.matches` iteratee shorthand.\n * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false });\n * // => objects for ['barney', 'fred']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.dropRightWhile(users, ['active', false]);\n * // => objects for ['barney']\n *\n * // The `_.property` iteratee shorthand.\n * _.dropRightWhile(users, 'active');\n * // => objects for ['barney', 'fred', 'pebbles']\n */\n function dropRightWhile(array, predicate) {\n return (array && array.length)\n ? baseWhile(array, getIteratee(predicate, 3), true, true)\n : [];\n }\n\n /**\n * Creates a slice of `array` excluding elements dropped from the beginning.\n * Elements are dropped until `predicate` returns falsey. The predicate is\n * invoked with three arguments: (value, index, array).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.dropWhile(users, function(o) { return !o.active; });\n * // => objects for ['pebbles']\n *\n * // The `_.matches` iteratee shorthand.\n * _.dropWhile(users, { 'user': 'barney', 'active': false });\n * // => objects for ['fred', 'pebbles']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.dropWhile(users, ['active', false]);\n * // => objects for ['pebbles']\n *\n * // The `_.property` iteratee shorthand.\n * _.dropWhile(users, 'active');\n * // => objects for ['barney', 'fred', 'pebbles']\n */\n function dropWhile(array, predicate) {\n return (array && array.length)\n ? baseWhile(array, getIteratee(predicate, 3), true)\n : [];\n }\n\n /**\n * Fills elements of `array` with `value` from `start` up to, but not\n * including, `end`.\n *\n * **Note:** This method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 3.2.0\n * @category Array\n * @param {Array} array The array to fill.\n * @param {*} value The value to fill `array` with.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [1, 2, 3];\n *\n * _.fill(array, 'a');\n * console.log(array);\n * // => ['a', 'a', 'a']\n *\n * _.fill(Array(3), 2);\n * // => [2, 2, 2]\n *\n * _.fill([4, 6, 8, 10], '*', 1, 3);\n * // => [4, '*', '*', 10]\n */\n function fill(array, value, start, end) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n if (start && typeof start != 'number' && isIterateeCall(array, value, start)) {\n start = 0;\n end = length;\n }\n return baseFill(array, value, start, end);\n }\n\n /**\n * This method is like `_.find` except that it returns the index of the first\n * element `predicate` returns truthy for instead of the element itself.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {number} Returns the index of the found element, else `-1`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.findIndex(users, function(o) { return o.user == 'barney'; });\n * // => 0\n *\n * // The `_.matches` iteratee shorthand.\n * _.findIndex(users, { 'user': 'fred', 'active': false });\n * // => 1\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findIndex(users, ['active', false]);\n * // => 0\n *\n * // The `_.property` iteratee shorthand.\n * _.findIndex(users, 'active');\n * // => 2\n */\n function findIndex(array, predicate, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = fromIndex == null ? 0 : toInteger(fromIndex);\n if (index < 0) {\n index = nativeMax(length + index, 0);\n }\n return baseFindIndex(array, getIteratee(predicate, 3), index);\n }\n\n /**\n * This method is like `_.findIndex` except that it iterates over elements\n * of `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=array.length-1] The index to search from.\n * @returns {number} Returns the index of the found element, else `-1`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': false }\n * ];\n *\n * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; });\n * // => 2\n *\n * // The `_.matches` iteratee shorthand.\n * _.findLastIndex(users, { 'user': 'barney', 'active': true });\n * // => 0\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findLastIndex(users, ['active', false]);\n * // => 2\n *\n * // The `_.property` iteratee shorthand.\n * _.findLastIndex(users, 'active');\n * // => 0\n */\n function findLastIndex(array, predicate, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = length - 1;\n if (fromIndex !== undefined) {\n index = toInteger(fromIndex);\n index = fromIndex < 0\n ? nativeMax(length + index, 0)\n : nativeMin(index, length - 1);\n }\n return baseFindIndex(array, getIteratee(predicate, 3), index, true);\n }\n\n /**\n * Flattens `array` a single level deep.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * _.flatten([1, [2, [3, [4]], 5]]);\n * // => [1, 2, [3, [4]], 5]\n */\n function flatten(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseFlatten(array, 1) : [];\n }\n\n /**\n * Recursively flattens `array`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * _.flattenDeep([1, [2, [3, [4]], 5]]);\n * // => [1, 2, 3, 4, 5]\n */\n function flattenDeep(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseFlatten(array, INFINITY) : [];\n }\n\n /**\n * Recursively flatten `array` up to `depth` times.\n *\n * @static\n * @memberOf _\n * @since 4.4.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @param {number} [depth=1] The maximum recursion depth.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * var array = [1, [2, [3, [4]], 5]];\n *\n * _.flattenDepth(array, 1);\n * // => [1, 2, [3, [4]], 5]\n *\n * _.flattenDepth(array, 2);\n * // => [1, 2, 3, [4], 5]\n */\n function flattenDepth(array, depth) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n depth = depth === undefined ? 1 : toInteger(depth);\n return baseFlatten(array, depth);\n }\n\n /**\n * The inverse of `_.toPairs`; this method returns an object composed\n * from key-value `pairs`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} pairs The key-value pairs.\n * @returns {Object} Returns the new object.\n * @example\n *\n * _.fromPairs([['a', 1], ['b', 2]]);\n * // => { 'a': 1, 'b': 2 }\n */\n function fromPairs(pairs) {\n var index = -1,\n length = pairs == null ? 0 : pairs.length,\n result = {};\n\n while (++index < length) {\n var pair = pairs[index];\n result[pair[0]] = pair[1];\n }\n return result;\n }\n\n /**\n * Gets the first element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @alias first\n * @category Array\n * @param {Array} array The array to query.\n * @returns {*} Returns the first element of `array`.\n * @example\n *\n * _.head([1, 2, 3]);\n * // => 1\n *\n * _.head([]);\n * // => undefined\n */\n function head(array) {\n return (array && array.length) ? array[0] : undefined;\n }\n\n /**\n * Gets the index at which the first occurrence of `value` is found in `array`\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons. If `fromIndex` is negative, it's used as the\n * offset from the end of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.indexOf([1, 2, 1, 2], 2);\n * // => 1\n *\n * // Search from the `fromIndex`.\n * _.indexOf([1, 2, 1, 2], 2, 2);\n * // => 3\n */\n function indexOf(array, value, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = fromIndex == null ? 0 : toInteger(fromIndex);\n if (index < 0) {\n index = nativeMax(length + index, 0);\n }\n return baseIndexOf(array, value, index);\n }\n\n /**\n * Gets all but the last element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.initial([1, 2, 3]);\n * // => [1, 2]\n */\n function initial(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseSlice(array, 0, -1) : [];\n }\n\n /**\n * Creates an array of unique values that are included in all given arrays\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons. The order and references of result values are\n * determined by the first array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @returns {Array} Returns the new array of intersecting values.\n * @example\n *\n * _.intersection([2, 1], [2, 3]);\n * // => [2]\n */\n var intersection = baseRest(function(arrays) {\n var mapped = arrayMap(arrays, castArrayLikeObject);\n return (mapped.length && mapped[0] === arrays[0])\n ? baseIntersection(mapped)\n : [];\n });\n\n /**\n * This method is like `_.intersection` except that it accepts `iteratee`\n * which is invoked for each element of each `arrays` to generate the criterion\n * by which they're compared. The order and references of result values are\n * determined by the first array. The iteratee is invoked with one argument:\n * (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new array of intersecting values.\n * @example\n *\n * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n * // => [2.1]\n *\n * // The `_.property` iteratee shorthand.\n * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 1 }]\n */\n var intersectionBy = baseRest(function(arrays) {\n var iteratee = last(arrays),\n mapped = arrayMap(arrays, castArrayLikeObject);\n\n if (iteratee === last(mapped)) {\n iteratee = undefined;\n } else {\n mapped.pop();\n }\n return (mapped.length && mapped[0] === arrays[0])\n ? baseIntersection(mapped, getIteratee(iteratee, 2))\n : [];\n });\n\n /**\n * This method is like `_.intersection` except that it accepts `comparator`\n * which is invoked to compare elements of `arrays`. The order and references\n * of result values are determined by the first array. The comparator is\n * invoked with two arguments: (arrVal, othVal).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of intersecting values.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n *\n * _.intersectionWith(objects, others, _.isEqual);\n * // => [{ 'x': 1, 'y': 2 }]\n */\n var intersectionWith = baseRest(function(arrays) {\n var comparator = last(arrays),\n mapped = arrayMap(arrays, castArrayLikeObject);\n\n comparator = typeof comparator == 'function' ? comparator : undefined;\n if (comparator) {\n mapped.pop();\n }\n return (mapped.length && mapped[0] === arrays[0])\n ? baseIntersection(mapped, undefined, comparator)\n : [];\n });\n\n /**\n * Converts all elements in `array` into a string separated by `separator`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to convert.\n * @param {string} [separator=','] The element separator.\n * @returns {string} Returns the joined string.\n * @example\n *\n * _.join(['a', 'b', 'c'], '~');\n * // => 'a~b~c'\n */\n function join(array, separator) {\n return array == null ? '' : nativeJoin.call(array, separator);\n }\n\n /**\n * Gets the last element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {*} Returns the last element of `array`.\n * @example\n *\n * _.last([1, 2, 3]);\n * // => 3\n */\n function last(array) {\n var length = array == null ? 0 : array.length;\n return length ? array[length - 1] : undefined;\n }\n\n /**\n * This method is like `_.indexOf` except that it iterates over elements of\n * `array` from right to left.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} [fromIndex=array.length-1] The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.lastIndexOf([1, 2, 1, 2], 2);\n * // => 3\n *\n * // Search from the `fromIndex`.\n * _.lastIndexOf([1, 2, 1, 2], 2, 2);\n * // => 1\n */\n function lastIndexOf(array, value, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = length;\n if (fromIndex !== undefined) {\n index = toInteger(fromIndex);\n index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);\n }\n return value === value\n ? strictLastIndexOf(array, value, index)\n : baseFindIndex(array, baseIsNaN, index, true);\n }\n\n /**\n * Gets the element at index `n` of `array`. If `n` is negative, the nth\n * element from the end is returned.\n *\n * @static\n * @memberOf _\n * @since 4.11.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=0] The index of the element to return.\n * @returns {*} Returns the nth element of `array`.\n * @example\n *\n * var array = ['a', 'b', 'c', 'd'];\n *\n * _.nth(array, 1);\n * // => 'b'\n *\n * _.nth(array, -2);\n * // => 'c';\n */\n function nth(array, n) {\n return (array && array.length) ? baseNth(array, toInteger(n)) : undefined;\n }\n\n /**\n * Removes all given values from `array` using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove`\n * to remove elements from an array by predicate.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {...*} [values] The values to remove.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = ['a', 'b', 'c', 'a', 'b', 'c'];\n *\n * _.pull(array, 'a', 'c');\n * console.log(array);\n * // => ['b', 'b']\n */\n var pull = baseRest(pullAll);\n\n /**\n * This method is like `_.pull` except that it accepts an array of values to remove.\n *\n * **Note:** Unlike `_.difference`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Array} values The values to remove.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = ['a', 'b', 'c', 'a', 'b', 'c'];\n *\n * _.pullAll(array, ['a', 'c']);\n * console.log(array);\n * // => ['b', 'b']\n */\n function pullAll(array, values) {\n return (array && array.length && values && values.length)\n ? basePullAll(array, values)\n : array;\n }\n\n /**\n * This method is like `_.pullAll` except that it accepts `iteratee` which is\n * invoked for each element of `array` and `values` to generate the criterion\n * by which they're compared. The iteratee is invoked with one argument: (value).\n *\n * **Note:** Unlike `_.differenceBy`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Array} values The values to remove.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];\n *\n * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x');\n * console.log(array);\n * // => [{ 'x': 2 }]\n */\n function pullAllBy(array, values, iteratee) {\n return (array && array.length && values && values.length)\n ? basePullAll(array, values, getIteratee(iteratee, 2))\n : array;\n }\n\n /**\n * This method is like `_.pullAll` except that it accepts `comparator` which\n * is invoked to compare elements of `array` to `values`. The comparator is\n * invoked with two arguments: (arrVal, othVal).\n *\n * **Note:** Unlike `_.differenceWith`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 4.6.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Array} values The values to remove.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }];\n *\n * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual);\n * console.log(array);\n * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }]\n */\n function pullAllWith(array, values, comparator) {\n return (array && array.length && values && values.length)\n ? basePullAll(array, values, undefined, comparator)\n : array;\n }\n\n /**\n * Removes elements from `array` corresponding to `indexes` and returns an\n * array of removed elements.\n *\n * **Note:** Unlike `_.at`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {...(number|number[])} [indexes] The indexes of elements to remove.\n * @returns {Array} Returns the new array of removed elements.\n * @example\n *\n * var array = ['a', 'b', 'c', 'd'];\n * var pulled = _.pullAt(array, [1, 3]);\n *\n * console.log(array);\n * // => ['a', 'c']\n *\n * console.log(pulled);\n * // => ['b', 'd']\n */\n var pullAt = flatRest(function(array, indexes) {\n var length = array == null ? 0 : array.length,\n result = baseAt(array, indexes);\n\n basePullAt(array, arrayMap(indexes, function(index) {\n return isIndex(index, length) ? +index : index;\n }).sort(compareAscending));\n\n return result;\n });\n\n /**\n * Removes all elements from `array` that `predicate` returns truthy for\n * and returns an array of the removed elements. The predicate is invoked\n * with three arguments: (value, index, array).\n *\n * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull`\n * to pull elements from an array by value.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new array of removed elements.\n * @example\n *\n * var array = [1, 2, 3, 4];\n * var evens = _.remove(array, function(n) {\n * return n % 2 == 0;\n * });\n *\n * console.log(array);\n * // => [1, 3]\n *\n * console.log(evens);\n * // => [2, 4]\n */\n function remove(array, predicate) {\n var result = [];\n if (!(array && array.length)) {\n return result;\n }\n var index = -1,\n indexes = [],\n length = array.length;\n\n predicate = getIteratee(predicate, 3);\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result.push(value);\n indexes.push(index);\n }\n }\n basePullAt(array, indexes);\n return result;\n }\n\n /**\n * Reverses `array` so that the first element becomes the last, the second\n * element becomes the second to last, and so on.\n *\n * **Note:** This method mutates `array` and is based on\n * [`Array#reverse`](https://mdn.io/Array/reverse).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [1, 2, 3];\n *\n * _.reverse(array);\n * // => [3, 2, 1]\n *\n * console.log(array);\n * // => [3, 2, 1]\n */\n function reverse(array) {\n return array == null ? array : nativeReverse.call(array);\n }\n\n /**\n * Creates a slice of `array` from `start` up to, but not including, `end`.\n *\n * **Note:** This method is used instead of\n * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are\n * returned.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to slice.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the slice of `array`.\n */\n function slice(array, start, end) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n if (end && typeof end != 'number' && isIterateeCall(array, start, end)) {\n start = 0;\n end = length;\n }\n else {\n start = start == null ? 0 : toInteger(start);\n end = end === undefined ? length : toInteger(end);\n }\n return baseSlice(array, start, end);\n }\n\n /**\n * Uses a binary search to determine the lowest index at which `value`\n * should be inserted into `array` in order to maintain its sort order.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n * @example\n *\n * _.sortedIndex([30, 50], 40);\n * // => 1\n */\n function sortedIndex(array, value) {\n return baseSortedIndex(array, value);\n }\n\n /**\n * This method is like `_.sortedIndex` except that it accepts `iteratee`\n * which is invoked for `value` and each element of `array` to compute their\n * sort ranking. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n * @example\n *\n * var objects = [{ 'x': 4 }, { 'x': 5 }];\n *\n * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });\n * // => 0\n *\n * // The `_.property` iteratee shorthand.\n * _.sortedIndexBy(objects, { 'x': 4 }, 'x');\n * // => 0\n */\n function sortedIndexBy(array, value, iteratee) {\n return baseSortedIndexBy(array, value, getIteratee(iteratee, 2));\n }\n\n /**\n * This method is like `_.indexOf` except that it performs a binary\n * search on a sorted `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.sortedIndexOf([4, 5, 5, 5, 6], 5);\n * // => 1\n */\n function sortedIndexOf(array, value) {\n var length = array == null ? 0 : array.length;\n if (length) {\n var index = baseSortedIndex(array, value);\n if (index < length && eq(array[index], value)) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * This method is like `_.sortedIndex` except that it returns the highest\n * index at which `value` should be inserted into `array` in order to\n * maintain its sort order.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n * @example\n *\n * _.sortedLastIndex([4, 5, 5, 5, 6], 5);\n * // => 4\n */\n function sortedLastIndex(array, value) {\n return baseSortedIndex(array, value, true);\n }\n\n /**\n * This method is like `_.sortedLastIndex` except that it accepts `iteratee`\n * which is invoked for `value` and each element of `array` to compute their\n * sort ranking. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n * @example\n *\n * var objects = [{ 'x': 4 }, { 'x': 5 }];\n *\n * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });\n * // => 1\n *\n * // The `_.property` iteratee shorthand.\n * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x');\n * // => 1\n */\n function sortedLastIndexBy(array, value, iteratee) {\n return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true);\n }\n\n /**\n * This method is like `_.lastIndexOf` except that it performs a binary\n * search on a sorted `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5);\n * // => 3\n */\n function sortedLastIndexOf(array, value) {\n var length = array == null ? 0 : array.length;\n if (length) {\n var index = baseSortedIndex(array, value, true) - 1;\n if (eq(array[index], value)) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * This method is like `_.uniq` except that it's designed and optimized\n * for sorted arrays.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.sortedUniq([1, 1, 2]);\n * // => [1, 2]\n */\n function sortedUniq(array) {\n return (array && array.length)\n ? baseSortedUniq(array)\n : [];\n }\n\n /**\n * This method is like `_.uniqBy` except that it's designed and optimized\n * for sorted arrays.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor);\n * // => [1.1, 2.3]\n */\n function sortedUniqBy(array, iteratee) {\n return (array && array.length)\n ? baseSortedUniq(array, getIteratee(iteratee, 2))\n : [];\n }\n\n /**\n * Gets all but the first element of `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.tail([1, 2, 3]);\n * // => [2, 3]\n */\n function tail(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseSlice(array, 1, length) : [];\n }\n\n /**\n * Creates a slice of `array` with `n` elements taken from the beginning.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to take.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.take([1, 2, 3]);\n * // => [1]\n *\n * _.take([1, 2, 3], 2);\n * // => [1, 2]\n *\n * _.take([1, 2, 3], 5);\n * // => [1, 2, 3]\n *\n * _.take([1, 2, 3], 0);\n * // => []\n */\n function take(array, n, guard) {\n if (!(array && array.length)) {\n return [];\n }\n n = (guard || n === undefined) ? 1 : toInteger(n);\n return baseSlice(array, 0, n < 0 ? 0 : n);\n }\n\n /**\n * Creates a slice of `array` with `n` elements taken from the end.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to take.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.takeRight([1, 2, 3]);\n * // => [3]\n *\n * _.takeRight([1, 2, 3], 2);\n * // => [2, 3]\n *\n * _.takeRight([1, 2, 3], 5);\n * // => [1, 2, 3]\n *\n * _.takeRight([1, 2, 3], 0);\n * // => []\n */\n function takeRight(array, n, guard) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n n = (guard || n === undefined) ? 1 : toInteger(n);\n n = length - n;\n return baseSlice(array, n < 0 ? 0 : n, length);\n }\n\n /**\n * Creates a slice of `array` with elements taken from the end. Elements are\n * taken until `predicate` returns falsey. The predicate is invoked with\n * three arguments: (value, index, array).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': false }\n * ];\n *\n * _.takeRightWhile(users, function(o) { return !o.active; });\n * // => objects for ['fred', 'pebbles']\n *\n * // The `_.matches` iteratee shorthand.\n * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false });\n * // => objects for ['pebbles']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.takeRightWhile(users, ['active', false]);\n * // => objects for ['fred', 'pebbles']\n *\n * // The `_.property` iteratee shorthand.\n * _.takeRightWhile(users, 'active');\n * // => []\n */\n function takeRightWhile(array, predicate) {\n return (array && array.length)\n ? baseWhile(array, getIteratee(predicate, 3), false, true)\n : [];\n }\n\n /**\n * Creates a slice of `array` with elements taken from the beginning. Elements\n * are taken until `predicate` returns falsey. The predicate is invoked with\n * three arguments: (value, index, array).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.takeWhile(users, function(o) { return !o.active; });\n * // => objects for ['barney', 'fred']\n *\n * // The `_.matches` iteratee shorthand.\n * _.takeWhile(users, { 'user': 'barney', 'active': false });\n * // => objects for ['barney']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.takeWhile(users, ['active', false]);\n * // => objects for ['barney', 'fred']\n *\n * // The `_.property` iteratee shorthand.\n * _.takeWhile(users, 'active');\n * // => []\n */\n function takeWhile(array, predicate) {\n return (array && array.length)\n ? baseWhile(array, getIteratee(predicate, 3))\n : [];\n }\n\n /**\n * Creates an array of unique values, in order, from all given arrays using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @returns {Array} Returns the new array of combined values.\n * @example\n *\n * _.union([2], [1, 2]);\n * // => [2, 1]\n */\n var union = baseRest(function(arrays) {\n return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));\n });\n\n /**\n * This method is like `_.union` except that it accepts `iteratee` which is\n * invoked for each element of each `arrays` to generate the criterion by\n * which uniqueness is computed. Result values are chosen from the first\n * array in which the value occurs. The iteratee is invoked with one argument:\n * (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new array of combined values.\n * @example\n *\n * _.unionBy([2.1], [1.2, 2.3], Math.floor);\n * // => [2.1, 1.2]\n *\n * // The `_.property` iteratee shorthand.\n * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 1 }, { 'x': 2 }]\n */\n var unionBy = baseRest(function(arrays) {\n var iteratee = last(arrays);\n if (isArrayLikeObject(iteratee)) {\n iteratee = undefined;\n }\n return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2));\n });\n\n /**\n * This method is like `_.union` except that it accepts `comparator` which\n * is invoked to compare elements of `arrays`. Result values are chosen from\n * the first array in which the value occurs. The comparator is invoked\n * with two arguments: (arrVal, othVal).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of combined values.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n *\n * _.unionWith(objects, others, _.isEqual);\n * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]\n */\n var unionWith = baseRest(function(arrays) {\n var comparator = last(arrays);\n comparator = typeof comparator == 'function' ? comparator : undefined;\n return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator);\n });\n\n /**\n * Creates a duplicate-free version of an array, using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons, in which only the first occurrence of each element\n * is kept. The order of result values is determined by the order they occur\n * in the array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.uniq([2, 1, 2]);\n * // => [2, 1]\n */\n function uniq(array) {\n return (array && array.length) ? baseUniq(array) : [];\n }\n\n /**\n * This method is like `_.uniq` except that it accepts `iteratee` which is\n * invoked for each element in `array` to generate the criterion by which\n * uniqueness is computed. The order of result values is determined by the\n * order they occur in the array. The iteratee is invoked with one argument:\n * (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.uniqBy([2.1, 1.2, 2.3], Math.floor);\n * // => [2.1, 1.2]\n *\n * // The `_.property` iteratee shorthand.\n * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 1 }, { 'x': 2 }]\n */\n function uniqBy(array, iteratee) {\n return (array && array.length) ? baseUniq(array, getIteratee(iteratee, 2)) : [];\n }\n\n /**\n * This method is like `_.uniq` except that it accepts `comparator` which\n * is invoked to compare elements of `array`. The order of result values is\n * determined by the order they occur in the array.The comparator is invoked\n * with two arguments: (arrVal, othVal).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }];\n *\n * _.uniqWith(objects, _.isEqual);\n * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]\n */\n function uniqWith(array, comparator) {\n comparator = typeof comparator == 'function' ? comparator : undefined;\n return (array && array.length) ? baseUniq(array, undefined, comparator) : [];\n }\n\n /**\n * This method is like `_.zip` except that it accepts an array of grouped\n * elements and creates an array regrouping the elements to their pre-zip\n * configuration.\n *\n * @static\n * @memberOf _\n * @since 1.2.0\n * @category Array\n * @param {Array} array The array of grouped elements to process.\n * @returns {Array} Returns the new array of regrouped elements.\n * @example\n *\n * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]);\n * // => [['a', 1, true], ['b', 2, false]]\n *\n * _.unzip(zipped);\n * // => [['a', 'b'], [1, 2], [true, false]]\n */\n function unzip(array) {\n if (!(array && array.length)) {\n return [];\n }\n var length = 0;\n array = arrayFilter(array, function(group) {\n if (isArrayLikeObject(group)) {\n length = nativeMax(group.length, length);\n return true;\n }\n });\n return baseTimes(length, function(index) {\n return arrayMap(array, baseProperty(index));\n });\n }\n\n /**\n * This method is like `_.unzip` except that it accepts `iteratee` to specify\n * how regrouped values should be combined. The iteratee is invoked with the\n * elements of each group: (...group).\n *\n * @static\n * @memberOf _\n * @since 3.8.0\n * @category Array\n * @param {Array} array The array of grouped elements to process.\n * @param {Function} [iteratee=_.identity] The function to combine\n * regrouped values.\n * @returns {Array} Returns the new array of regrouped elements.\n * @example\n *\n * var zipped = _.zip([1, 2], [10, 20], [100, 200]);\n * // => [[1, 10, 100], [2, 20, 200]]\n *\n * _.unzipWith(zipped, _.add);\n * // => [3, 30, 300]\n */\n function unzipWith(array, iteratee) {\n if (!(array && array.length)) {\n return [];\n }\n var result = unzip(array);\n if (iteratee == null) {\n return result;\n }\n return arrayMap(result, function(group) {\n return apply(iteratee, undefined, group);\n });\n }\n\n /**\n * Creates an array excluding all given values using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * **Note:** Unlike `_.pull`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...*} [values] The values to exclude.\n * @returns {Array} Returns the new array of filtered values.\n * @see _.difference, _.xor\n * @example\n *\n * _.without([2, 1, 2, 3], 1, 2);\n * // => [3]\n */\n var without = baseRest(function(array, values) {\n return isArrayLikeObject(array)\n ? baseDifference(array, values)\n : [];\n });\n\n /**\n * Creates an array of unique values that is the\n * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference)\n * of the given arrays. The order of result values is determined by the order\n * they occur in the arrays.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @returns {Array} Returns the new array of filtered values.\n * @see _.difference, _.without\n * @example\n *\n * _.xor([2, 1], [2, 3]);\n * // => [1, 3]\n */\n var xor = baseRest(function(arrays) {\n return baseXor(arrayFilter(arrays, isArrayLikeObject));\n });\n\n /**\n * This method is like `_.xor` except that it accepts `iteratee` which is\n * invoked for each element of each `arrays` to generate the criterion by\n * which by which they're compared. The order of result values is determined\n * by the order they occur in the arrays. The iteratee is invoked with one\n * argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n * // => [1.2, 3.4]\n *\n * // The `_.property` iteratee shorthand.\n * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 2 }]\n */\n var xorBy = baseRest(function(arrays) {\n var iteratee = last(arrays);\n if (isArrayLikeObject(iteratee)) {\n iteratee = undefined;\n }\n return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2));\n });\n\n /**\n * This method is like `_.xor` except that it accepts `comparator` which is\n * invoked to compare elements of `arrays`. The order of result values is\n * determined by the order they occur in the arrays. The comparator is invoked\n * with two arguments: (arrVal, othVal).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n *\n * _.xorWith(objects, others, _.isEqual);\n * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]\n */\n var xorWith = baseRest(function(arrays) {\n var comparator = last(arrays);\n comparator = typeof comparator == 'function' ? comparator : undefined;\n return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator);\n });\n\n /**\n * Creates an array of grouped elements, the first of which contains the\n * first elements of the given arrays, the second of which contains the\n * second elements of the given arrays, and so on.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {...Array} [arrays] The arrays to process.\n * @returns {Array} Returns the new array of grouped elements.\n * @example\n *\n * _.zip(['a', 'b'], [1, 2], [true, false]);\n * // => [['a', 1, true], ['b', 2, false]]\n */\n var zip = baseRest(unzip);\n\n /**\n * This method is like `_.fromPairs` except that it accepts two arrays,\n * one of property identifiers and one of corresponding values.\n *\n * @static\n * @memberOf _\n * @since 0.4.0\n * @category Array\n * @param {Array} [props=[]] The property identifiers.\n * @param {Array} [values=[]] The property values.\n * @returns {Object} Returns the new object.\n * @example\n *\n * _.zipObject(['a', 'b'], [1, 2]);\n * // => { 'a': 1, 'b': 2 }\n */\n function zipObject(props, values) {\n return baseZipObject(props || [], values || [], assignValue);\n }\n\n /**\n * This method is like `_.zipObject` except that it supports property paths.\n *\n * @static\n * @memberOf _\n * @since 4.1.0\n * @category Array\n * @param {Array} [props=[]] The property identifiers.\n * @param {Array} [values=[]] The property values.\n * @returns {Object} Returns the new object.\n * @example\n *\n * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]);\n * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } }\n */\n function zipObjectDeep(props, values) {\n return baseZipObject(props || [], values || [], baseSet);\n }\n\n /**\n * This method is like `_.zip` except that it accepts `iteratee` to specify\n * how grouped values should be combined. The iteratee is invoked with the\n * elements of each group: (...group).\n *\n * @static\n * @memberOf _\n * @since 3.8.0\n * @category Array\n * @param {...Array} [arrays] The arrays to process.\n * @param {Function} [iteratee=_.identity] The function to combine\n * grouped values.\n * @returns {Array} Returns the new array of grouped elements.\n * @example\n *\n * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) {\n * return a + b + c;\n * });\n * // => [111, 222]\n */\n var zipWith = baseRest(function(arrays) {\n var length = arrays.length,\n iteratee = length > 1 ? arrays[length - 1] : undefined;\n\n iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined;\n return unzipWith(arrays, iteratee);\n });\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a `lodash` wrapper instance that wraps `value` with explicit method\n * chain sequences enabled. The result of such sequences must be unwrapped\n * with `_#value`.\n *\n * @static\n * @memberOf _\n * @since 1.3.0\n * @category Seq\n * @param {*} value The value to wrap.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36 },\n * { 'user': 'fred', 'age': 40 },\n * { 'user': 'pebbles', 'age': 1 }\n * ];\n *\n * var youngest = _\n * .chain(users)\n * .sortBy('age')\n * .map(function(o) {\n * return o.user + ' is ' + o.age;\n * })\n * .head()\n * .value();\n * // => 'pebbles is 1'\n */\n function chain(value) {\n var result = lodash(value);\n result.__chain__ = true;\n return result;\n }\n\n /**\n * This method invokes `interceptor` and returns `value`. The interceptor\n * is invoked with one argument; (value). The purpose of this method is to\n * \"tap into\" a method chain sequence in order to modify intermediate results.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Seq\n * @param {*} value The value to provide to `interceptor`.\n * @param {Function} interceptor The function to invoke.\n * @returns {*} Returns `value`.\n * @example\n *\n * _([1, 2, 3])\n * .tap(function(array) {\n * // Mutate input array.\n * array.pop();\n * })\n * .reverse()\n * .value();\n * // => [2, 1]\n */\n function tap(value, interceptor) {\n interceptor(value);\n return value;\n }\n\n /**\n * This method is like `_.tap` except that it returns the result of `interceptor`.\n * The purpose of this method is to \"pass thru\" values replacing intermediate\n * results in a method chain sequence.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Seq\n * @param {*} value The value to provide to `interceptor`.\n * @param {Function} interceptor The function to invoke.\n * @returns {*} Returns the result of `interceptor`.\n * @example\n *\n * _(' abc ')\n * .chain()\n * .trim()\n * .thru(function(value) {\n * return [value];\n * })\n * .value();\n * // => ['abc']\n */\n function thru(value, interceptor) {\n return interceptor(value);\n }\n\n /**\n * This method is the wrapper version of `_.at`.\n *\n * @name at\n * @memberOf _\n * @since 1.0.0\n * @category Seq\n * @param {...(string|string[])} [paths] The property paths to pick.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };\n *\n * _(object).at(['a[0].b.c', 'a[1]']).value();\n * // => [3, 4]\n */\n var wrapperAt = flatRest(function(paths) {\n var length = paths.length,\n start = length ? paths[0] : 0,\n value = this.__wrapped__,\n interceptor = function(object) { return baseAt(object, paths); };\n\n if (length > 1 || this.__actions__.length ||\n !(value instanceof LazyWrapper) || !isIndex(start)) {\n return this.thru(interceptor);\n }\n value = value.slice(start, +start + (length ? 1 : 0));\n value.__actions__.push({\n 'func': thru,\n 'args': [interceptor],\n 'thisArg': undefined\n });\n return new LodashWrapper(value, this.__chain__).thru(function(array) {\n if (length && !array.length) {\n array.push(undefined);\n }\n return array;\n });\n });\n\n /**\n * Creates a `lodash` wrapper instance with explicit method chain sequences enabled.\n *\n * @name chain\n * @memberOf _\n * @since 0.1.0\n * @category Seq\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36 },\n * { 'user': 'fred', 'age': 40 }\n * ];\n *\n * // A sequence without explicit chaining.\n * _(users).head();\n * // => { 'user': 'barney', 'age': 36 }\n *\n * // A sequence with explicit chaining.\n * _(users)\n * .chain()\n * .head()\n * .pick('user')\n * .value();\n * // => { 'user': 'barney' }\n */\n function wrapperChain() {\n return chain(this);\n }\n\n /**\n * Executes the chain sequence and returns the wrapped result.\n *\n * @name commit\n * @memberOf _\n * @since 3.2.0\n * @category Seq\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var array = [1, 2];\n * var wrapped = _(array).push(3);\n *\n * console.log(array);\n * // => [1, 2]\n *\n * wrapped = wrapped.commit();\n * console.log(array);\n * // => [1, 2, 3]\n *\n * wrapped.last();\n * // => 3\n *\n * console.log(array);\n * // => [1, 2, 3]\n */\n function wrapperCommit() {\n return new LodashWrapper(this.value(), this.__chain__);\n }\n\n /**\n * Gets the next value on a wrapped object following the\n * [iterator protocol](https://mdn.io/iteration_protocols#iterator).\n *\n * @name next\n * @memberOf _\n * @since 4.0.0\n * @category Seq\n * @returns {Object} Returns the next iterator value.\n * @example\n *\n * var wrapped = _([1, 2]);\n *\n * wrapped.next();\n * // => { 'done': false, 'value': 1 }\n *\n * wrapped.next();\n * // => { 'done': false, 'value': 2 }\n *\n * wrapped.next();\n * // => { 'done': true, 'value': undefined }\n */\n function wrapperNext() {\n if (this.__values__ === undefined) {\n this.__values__ = toArray(this.value());\n }\n var done = this.__index__ >= this.__values__.length,\n value = done ? undefined : this.__values__[this.__index__++];\n\n return { 'done': done, 'value': value };\n }\n\n /**\n * Enables the wrapper to be iterable.\n *\n * @name Symbol.iterator\n * @memberOf _\n * @since 4.0.0\n * @category Seq\n * @returns {Object} Returns the wrapper object.\n * @example\n *\n * var wrapped = _([1, 2]);\n *\n * wrapped[Symbol.iterator]() === wrapped;\n * // => true\n *\n * Array.from(wrapped);\n * // => [1, 2]\n */\n function wrapperToIterator() {\n return this;\n }\n\n /**\n * Creates a clone of the chain sequence planting `value` as the wrapped value.\n *\n * @name plant\n * @memberOf _\n * @since 3.2.0\n * @category Seq\n * @param {*} value The value to plant.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * var wrapped = _([1, 2]).map(square);\n * var other = wrapped.plant([3, 4]);\n *\n * other.value();\n * // => [9, 16]\n *\n * wrapped.value();\n * // => [1, 4]\n */\n function wrapperPlant(value) {\n var result,\n parent = this;\n\n while (parent instanceof baseLodash) {\n var clone = wrapperClone(parent);\n clone.__index__ = 0;\n clone.__values__ = undefined;\n if (result) {\n previous.__wrapped__ = clone;\n } else {\n result = clone;\n }\n var previous = clone;\n parent = parent.__wrapped__;\n }\n previous.__wrapped__ = value;\n return result;\n }\n\n /**\n * This method is the wrapper version of `_.reverse`.\n *\n * **Note:** This method mutates the wrapped array.\n *\n * @name reverse\n * @memberOf _\n * @since 0.1.0\n * @category Seq\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var array = [1, 2, 3];\n *\n * _(array).reverse().value()\n * // => [3, 2, 1]\n *\n * console.log(array);\n * // => [3, 2, 1]\n */\n function wrapperReverse() {\n var value = this.__wrapped__;\n if (value instanceof LazyWrapper) {\n var wrapped = value;\n if (this.__actions__.length) {\n wrapped = new LazyWrapper(this);\n }\n wrapped = wrapped.reverse();\n wrapped.__actions__.push({\n 'func': thru,\n 'args': [reverse],\n 'thisArg': undefined\n });\n return new LodashWrapper(wrapped, this.__chain__);\n }\n return this.thru(reverse);\n }\n\n /**\n * Executes the chain sequence to resolve the unwrapped value.\n *\n * @name value\n * @memberOf _\n * @since 0.1.0\n * @alias toJSON, valueOf\n * @category Seq\n * @returns {*} Returns the resolved unwrapped value.\n * @example\n *\n * _([1, 2, 3]).value();\n * // => [1, 2, 3]\n */\n function wrapperValue() {\n return baseWrapperValue(this.__wrapped__, this.__actions__);\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates an object composed of keys generated from the results of running\n * each element of `collection` thru `iteratee`. The corresponding value of\n * each key is the number of times the key was returned by `iteratee`. The\n * iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n * @returns {Object} Returns the composed aggregate object.\n * @example\n *\n * _.countBy([6.1, 4.2, 6.3], Math.floor);\n * // => { '4': 1, '6': 2 }\n *\n * // The `_.property` iteratee shorthand.\n * _.countBy(['one', 'two', 'three'], 'length');\n * // => { '3': 2, '5': 1 }\n */\n var countBy = createAggregator(function(result, value, key) {\n if (hasOwnProperty.call(result, key)) {\n ++result[key];\n } else {\n baseAssignValue(result, key, 1);\n }\n });\n\n /**\n * Checks if `predicate` returns truthy for **all** elements of `collection`.\n * Iteration is stopped once `predicate` returns falsey. The predicate is\n * invoked with three arguments: (value, index|key, collection).\n *\n * **Note:** This method returns `true` for\n * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because\n * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of\n * elements of empty collections.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\n * else `false`.\n * @example\n *\n * _.every([true, 1, null, 'yes'], Boolean);\n * // => false\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': false },\n * { 'user': 'fred', 'age': 40, 'active': false }\n * ];\n *\n * // The `_.matches` iteratee shorthand.\n * _.every(users, { 'user': 'barney', 'active': false });\n * // => false\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.every(users, ['active', false]);\n * // => true\n *\n * // The `_.property` iteratee shorthand.\n * _.every(users, 'active');\n * // => false\n */\n function every(collection, predicate, guard) {\n var func = isArray(collection) ? arrayEvery : baseEvery;\n if (guard && isIterateeCall(collection, predicate, guard)) {\n predicate = undefined;\n }\n return func(collection, getIteratee(predicate, 3));\n }\n\n /**\n * Iterates over elements of `collection`, returning an array of all elements\n * `predicate` returns truthy for. The predicate is invoked with three\n * arguments: (value, index|key, collection).\n *\n * **Note:** Unlike `_.remove`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n * @see _.reject\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': true },\n * { 'user': 'fred', 'age': 40, 'active': false }\n * ];\n *\n * _.filter(users, function(o) { return !o.active; });\n * // => objects for ['fred']\n *\n * // The `_.matches` iteratee shorthand.\n * _.filter(users, { 'age': 36, 'active': true });\n * // => objects for ['barney']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.filter(users, ['active', false]);\n * // => objects for ['fred']\n *\n * // The `_.property` iteratee shorthand.\n * _.filter(users, 'active');\n * // => objects for ['barney']\n *\n * // Combining several predicates using `_.overEvery` or `_.overSome`.\n * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]]));\n * // => objects for ['fred', 'barney']\n */\n function filter(collection, predicate) {\n var func = isArray(collection) ? arrayFilter : baseFilter;\n return func(collection, getIteratee(predicate, 3));\n }\n\n /**\n * Iterates over elements of `collection`, returning the first element\n * `predicate` returns truthy for. The predicate is invoked with three\n * arguments: (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {*} Returns the matched element, else `undefined`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': true },\n * { 'user': 'fred', 'age': 40, 'active': false },\n * { 'user': 'pebbles', 'age': 1, 'active': true }\n * ];\n *\n * _.find(users, function(o) { return o.age < 40; });\n * // => object for 'barney'\n *\n * // The `_.matches` iteratee shorthand.\n * _.find(users, { 'age': 1, 'active': true });\n * // => object for 'pebbles'\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.find(users, ['active', false]);\n * // => object for 'fred'\n *\n * // The `_.property` iteratee shorthand.\n * _.find(users, 'active');\n * // => object for 'barney'\n */\n var find = createFind(findIndex);\n\n /**\n * This method is like `_.find` except that it iterates over elements of\n * `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=collection.length-1] The index to search from.\n * @returns {*} Returns the matched element, else `undefined`.\n * @example\n *\n * _.findLast([1, 2, 3, 4], function(n) {\n * return n % 2 == 1;\n * });\n * // => 3\n */\n var findLast = createFind(findLastIndex);\n\n /**\n * Creates a flattened array of values by running each element in `collection`\n * thru `iteratee` and flattening the mapped results. The iteratee is invoked\n * with three arguments: (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * function duplicate(n) {\n * return [n, n];\n * }\n *\n * _.flatMap([1, 2], duplicate);\n * // => [1, 1, 2, 2]\n */\n function flatMap(collection, iteratee) {\n return baseFlatten(map(collection, iteratee), 1);\n }\n\n /**\n * This method is like `_.flatMap` except that it recursively flattens the\n * mapped results.\n *\n * @static\n * @memberOf _\n * @since 4.7.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * function duplicate(n) {\n * return [[[n, n]]];\n * }\n *\n * _.flatMapDeep([1, 2], duplicate);\n * // => [1, 1, 2, 2]\n */\n function flatMapDeep(collection, iteratee) {\n return baseFlatten(map(collection, iteratee), INFINITY);\n }\n\n /**\n * This method is like `_.flatMap` except that it recursively flattens the\n * mapped results up to `depth` times.\n *\n * @static\n * @memberOf _\n * @since 4.7.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {number} [depth=1] The maximum recursion depth.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * function duplicate(n) {\n * return [[[n, n]]];\n * }\n *\n * _.flatMapDepth([1, 2], duplicate, 2);\n * // => [[1, 1], [2, 2]]\n */\n function flatMapDepth(collection, iteratee, depth) {\n depth = depth === undefined ? 1 : toInteger(depth);\n return baseFlatten(map(collection, iteratee), depth);\n }\n\n /**\n * Iterates over elements of `collection` and invokes `iteratee` for each element.\n * The iteratee is invoked with three arguments: (value, index|key, collection).\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * **Note:** As with other \"Collections\" methods, objects with a \"length\"\n * property are iterated like arrays. To avoid this behavior use `_.forIn`\n * or `_.forOwn` for object iteration.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @alias each\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n * @see _.forEachRight\n * @example\n *\n * _.forEach([1, 2], function(value) {\n * console.log(value);\n * });\n * // => Logs `1` then `2`.\n *\n * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'a' then 'b' (iteration order is not guaranteed).\n */\n function forEach(collection, iteratee) {\n var func = isArray(collection) ? arrayEach : baseEach;\n return func(collection, getIteratee(iteratee, 3));\n }\n\n /**\n * This method is like `_.forEach` except that it iterates over elements of\n * `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @alias eachRight\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n * @see _.forEach\n * @example\n *\n * _.forEachRight([1, 2], function(value) {\n * console.log(value);\n * });\n * // => Logs `2` then `1`.\n */\n function forEachRight(collection, iteratee) {\n var func = isArray(collection) ? arrayEachRight : baseEachRight;\n return func(collection, getIteratee(iteratee, 3));\n }\n\n /**\n * Creates an object composed of keys generated from the results of running\n * each element of `collection` thru `iteratee`. The order of grouped values\n * is determined by the order they occur in `collection`. The corresponding\n * value of each key is an array of elements responsible for generating the\n * key. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n * @returns {Object} Returns the composed aggregate object.\n * @example\n *\n * _.groupBy([6.1, 4.2, 6.3], Math.floor);\n * // => { '4': [4.2], '6': [6.1, 6.3] }\n *\n * // The `_.property` iteratee shorthand.\n * _.groupBy(['one', 'two', 'three'], 'length');\n * // => { '3': ['one', 'two'], '5': ['three'] }\n */\n var groupBy = createAggregator(function(result, value, key) {\n if (hasOwnProperty.call(result, key)) {\n result[key].push(value);\n } else {\n baseAssignValue(result, key, [value]);\n }\n });\n\n /**\n * Checks if `value` is in `collection`. If `collection` is a string, it's\n * checked for a substring of `value`, otherwise\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * is used for equality comparisons. If `fromIndex` is negative, it's used as\n * the offset from the end of `collection`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object|string} collection The collection to inspect.\n * @param {*} value The value to search for.\n * @param {number} [fromIndex=0] The index to search from.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.\n * @returns {boolean} Returns `true` if `value` is found, else `false`.\n * @example\n *\n * _.includes([1, 2, 3], 1);\n * // => true\n *\n * _.includes([1, 2, 3], 1, 2);\n * // => false\n *\n * _.includes({ 'a': 1, 'b': 2 }, 1);\n * // => true\n *\n * _.includes('abcd', 'bc');\n * // => true\n */\n function includes(collection, value, fromIndex, guard) {\n collection = isArrayLike(collection) ? collection : values(collection);\n fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0;\n\n var length = collection.length;\n if (fromIndex < 0) {\n fromIndex = nativeMax(length + fromIndex, 0);\n }\n return isString(collection)\n ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1)\n : (!!length && baseIndexOf(collection, value, fromIndex) > -1);\n }\n\n /**\n * Invokes the method at `path` of each element in `collection`, returning\n * an array of the results of each invoked method. Any additional arguments\n * are provided to each invoked method. If `path` is a function, it's invoked\n * for, and `this` bound to, each element in `collection`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Array|Function|string} path The path of the method to invoke or\n * the function invoked per iteration.\n * @param {...*} [args] The arguments to invoke each method with.\n * @returns {Array} Returns the array of results.\n * @example\n *\n * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort');\n * // => [[1, 5, 7], [1, 2, 3]]\n *\n * _.invokeMap([123, 456], String.prototype.split, '');\n * // => [['1', '2', '3'], ['4', '5', '6']]\n */\n var invokeMap = baseRest(function(collection, path, args) {\n var index = -1,\n isFunc = typeof path == 'function',\n result = isArrayLike(collection) ? Array(collection.length) : [];\n\n baseEach(collection, function(value) {\n result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args);\n });\n return result;\n });\n\n /**\n * Creates an object composed of keys generated from the results of running\n * each element of `collection` thru `iteratee`. The corresponding value of\n * each key is the last element responsible for generating the key. The\n * iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n * @returns {Object} Returns the composed aggregate object.\n * @example\n *\n * var array = [\n * { 'dir': 'left', 'code': 97 },\n * { 'dir': 'right', 'code': 100 }\n * ];\n *\n * _.keyBy(array, function(o) {\n * return String.fromCharCode(o.code);\n * });\n * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }\n *\n * _.keyBy(array, 'dir');\n * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }\n */\n var keyBy = createAggregator(function(result, value, key) {\n baseAssignValue(result, key, value);\n });\n\n /**\n * Creates an array of values by running each element in `collection` thru\n * `iteratee`. The iteratee is invoked with three arguments:\n * (value, index|key, collection).\n *\n * Many lodash methods are guarded to work as iteratees for methods like\n * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.\n *\n * The guarded methods are:\n * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,\n * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,\n * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,\n * `template`, `trim`, `trimEnd`, `trimStart`, and `words`\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * _.map([4, 8], square);\n * // => [16, 64]\n *\n * _.map({ 'a': 4, 'b': 8 }, square);\n * // => [16, 64] (iteration order is not guaranteed)\n *\n * var users = [\n * { 'user': 'barney' },\n * { 'user': 'fred' }\n * ];\n *\n * // The `_.property` iteratee shorthand.\n * _.map(users, 'user');\n * // => ['barney', 'fred']\n */\n function map(collection, iteratee) {\n var func = isArray(collection) ? arrayMap : baseMap;\n return func(collection, getIteratee(iteratee, 3));\n }\n\n /**\n * This method is like `_.sortBy` except that it allows specifying the sort\n * orders of the iteratees to sort by. If `orders` is unspecified, all values\n * are sorted in ascending order. Otherwise, specify an order of \"desc\" for\n * descending or \"asc\" for ascending sort order of corresponding values.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]]\n * The iteratees to sort by.\n * @param {string[]} [orders] The sort orders of `iteratees`.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.\n * @returns {Array} Returns the new sorted array.\n * @example\n *\n * var users = [\n * { 'user': 'fred', 'age': 48 },\n * { 'user': 'barney', 'age': 34 },\n * { 'user': 'fred', 'age': 40 },\n * { 'user': 'barney', 'age': 36 }\n * ];\n *\n * // Sort by `user` in ascending order and by `age` in descending order.\n * _.orderBy(users, ['user', 'age'], ['asc', 'desc']);\n * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]\n */\n function orderBy(collection, iteratees, orders, guard) {\n if (collection == null) {\n return [];\n }\n if (!isArray(iteratees)) {\n iteratees = iteratees == null ? [] : [iteratees];\n }\n orders = guard ? undefined : orders;\n if (!isArray(orders)) {\n orders = orders == null ? [] : [orders];\n }\n return baseOrderBy(collection, iteratees, orders);\n }\n\n /**\n * Creates an array of elements split into two groups, the first of which\n * contains elements `predicate` returns truthy for, the second of which\n * contains elements `predicate` returns falsey for. The predicate is\n * invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the array of grouped elements.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': false },\n * { 'user': 'fred', 'age': 40, 'active': true },\n * { 'user': 'pebbles', 'age': 1, 'active': false }\n * ];\n *\n * _.partition(users, function(o) { return o.active; });\n * // => objects for [['fred'], ['barney', 'pebbles']]\n *\n * // The `_.matches` iteratee shorthand.\n * _.partition(users, { 'age': 1, 'active': false });\n * // => objects for [['pebbles'], ['barney', 'fred']]\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.partition(users, ['active', false]);\n * // => objects for [['barney', 'pebbles'], ['fred']]\n *\n * // The `_.property` iteratee shorthand.\n * _.partition(users, 'active');\n * // => objects for [['fred'], ['barney', 'pebbles']]\n */\n var partition = createAggregator(function(result, value, key) {\n result[key ? 0 : 1].push(value);\n }, function() { return [[], []]; });\n\n /**\n * Reduces `collection` to a value which is the accumulated result of running\n * each element in `collection` thru `iteratee`, where each successive\n * invocation is supplied the return value of the previous. If `accumulator`\n * is not given, the first element of `collection` is used as the initial\n * value. The iteratee is invoked with four arguments:\n * (accumulator, value, index|key, collection).\n *\n * Many lodash methods are guarded to work as iteratees for methods like\n * `_.reduce`, `_.reduceRight`, and `_.transform`.\n *\n * The guarded methods are:\n * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,\n * and `sortBy`\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @returns {*} Returns the accumulated value.\n * @see _.reduceRight\n * @example\n *\n * _.reduce([1, 2], function(sum, n) {\n * return sum + n;\n * }, 0);\n * // => 3\n *\n * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {\n * (result[value] || (result[value] = [])).push(key);\n * return result;\n * }, {});\n * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)\n */\n function reduce(collection, iteratee, accumulator) {\n var func = isArray(collection) ? arrayReduce : baseReduce,\n initAccum = arguments.length < 3;\n\n return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach);\n }\n\n /**\n * This method is like `_.reduce` except that it iterates over elements of\n * `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @returns {*} Returns the accumulated value.\n * @see _.reduce\n * @example\n *\n * var array = [[0, 1], [2, 3], [4, 5]];\n *\n * _.reduceRight(array, function(flattened, other) {\n * return flattened.concat(other);\n * }, []);\n * // => [4, 5, 2, 3, 0, 1]\n */\n function reduceRight(collection, iteratee, accumulator) {\n var func = isArray(collection) ? arrayReduceRight : baseReduce,\n initAccum = arguments.length < 3;\n\n return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight);\n }\n\n /**\n * The opposite of `_.filter`; this method returns the elements of `collection`\n * that `predicate` does **not** return truthy for.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n * @see _.filter\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': false },\n * { 'user': 'fred', 'age': 40, 'active': true }\n * ];\n *\n * _.reject(users, function(o) { return !o.active; });\n * // => objects for ['fred']\n *\n * // The `_.matches` iteratee shorthand.\n * _.reject(users, { 'age': 40, 'active': true });\n * // => objects for ['barney']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.reject(users, ['active', false]);\n * // => objects for ['fred']\n *\n * // The `_.property` iteratee shorthand.\n * _.reject(users, 'active');\n * // => objects for ['barney']\n */\n function reject(collection, predicate) {\n var func = isArray(collection) ? arrayFilter : baseFilter;\n return func(collection, negate(getIteratee(predicate, 3)));\n }\n\n /**\n * Gets a random element from `collection`.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to sample.\n * @returns {*} Returns the random element.\n * @example\n *\n * _.sample([1, 2, 3, 4]);\n * // => 2\n */\n function sample(collection) {\n var func = isArray(collection) ? arraySample : baseSample;\n return func(collection);\n }\n\n /**\n * Gets `n` random elements at unique keys from `collection` up to the\n * size of `collection`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to sample.\n * @param {number} [n=1] The number of elements to sample.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the random elements.\n * @example\n *\n * _.sampleSize([1, 2, 3], 2);\n * // => [3, 1]\n *\n * _.sampleSize([1, 2, 3], 4);\n * // => [2, 3, 1]\n */\n function sampleSize(collection, n, guard) {\n if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) {\n n = 1;\n } else {\n n = toInteger(n);\n }\n var func = isArray(collection) ? arraySampleSize : baseSampleSize;\n return func(collection, n);\n }\n\n /**\n * Creates an array of shuffled values, using a version of the\n * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to shuffle.\n * @returns {Array} Returns the new shuffled array.\n * @example\n *\n * _.shuffle([1, 2, 3, 4]);\n * // => [4, 1, 3, 2]\n */\n function shuffle(collection) {\n var func = isArray(collection) ? arrayShuffle : baseShuffle;\n return func(collection);\n }\n\n /**\n * Gets the size of `collection` by returning its length for array-like\n * values or the number of own enumerable string keyed properties for objects.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object|string} collection The collection to inspect.\n * @returns {number} Returns the collection size.\n * @example\n *\n * _.size([1, 2, 3]);\n * // => 3\n *\n * _.size({ 'a': 1, 'b': 2 });\n * // => 2\n *\n * _.size('pebbles');\n * // => 7\n */\n function size(collection) {\n if (collection == null) {\n return 0;\n }\n if (isArrayLike(collection)) {\n return isString(collection) ? stringSize(collection) : collection.length;\n }\n var tag = getTag(collection);\n if (tag == mapTag || tag == setTag) {\n return collection.size;\n }\n return baseKeys(collection).length;\n }\n\n /**\n * Checks if `predicate` returns truthy for **any** element of `collection`.\n * Iteration is stopped once `predicate` returns truthy. The predicate is\n * invoked with three arguments: (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n * @example\n *\n * _.some([null, 0, 'yes', false], Boolean);\n * // => true\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false }\n * ];\n *\n * // The `_.matches` iteratee shorthand.\n * _.some(users, { 'user': 'barney', 'active': false });\n * // => false\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.some(users, ['active', false]);\n * // => true\n *\n * // The `_.property` iteratee shorthand.\n * _.some(users, 'active');\n * // => true\n */\n function some(collection, predicate, guard) {\n var func = isArray(collection) ? arraySome : baseSome;\n if (guard && isIterateeCall(collection, predicate, guard)) {\n predicate = undefined;\n }\n return func(collection, getIteratee(predicate, 3));\n }\n\n /**\n * Creates an array of elements, sorted in ascending order by the results of\n * running each element in a collection thru each iteratee. This method\n * performs a stable sort, that is, it preserves the original sort order of\n * equal elements. The iteratees are invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {...(Function|Function[])} [iteratees=[_.identity]]\n * The iteratees to sort by.\n * @returns {Array} Returns the new sorted array.\n * @example\n *\n * var users = [\n * { 'user': 'fred', 'age': 48 },\n * { 'user': 'barney', 'age': 36 },\n * { 'user': 'fred', 'age': 30 },\n * { 'user': 'barney', 'age': 34 }\n * ];\n *\n * _.sortBy(users, [function(o) { return o.user; }]);\n * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]]\n *\n * _.sortBy(users, ['user', 'age']);\n * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]]\n */\n var sortBy = baseRest(function(collection, iteratees) {\n if (collection == null) {\n return [];\n }\n var length = iteratees.length;\n if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {\n iteratees = [];\n } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {\n iteratees = [iteratees[0]];\n }\n return baseOrderBy(collection, baseFlatten(iteratees, 1), []);\n });\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\n var now = ctxNow || function() {\n return root.Date.now();\n };\n\n /*------------------------------------------------------------------------*/\n\n /**\n * The opposite of `_.before`; this method creates a function that invokes\n * `func` once it's called `n` or more times.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {number} n The number of calls before `func` is invoked.\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * var saves = ['profile', 'settings'];\n *\n * var done = _.after(saves.length, function() {\n * console.log('done saving!');\n * });\n *\n * _.forEach(saves, function(type) {\n * asyncSave({ 'type': type, 'complete': done });\n * });\n * // => Logs 'done saving!' after the two async saves have completed.\n */\n function after(n, func) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n n = toInteger(n);\n return function() {\n if (--n < 1) {\n return func.apply(this, arguments);\n }\n };\n }\n\n /**\n * Creates a function that invokes `func`, with up to `n` arguments,\n * ignoring any additional arguments.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} func The function to cap arguments for.\n * @param {number} [n=func.length] The arity cap.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the new capped function.\n * @example\n *\n * _.map(['6', '8', '10'], _.ary(parseInt, 1));\n * // => [6, 8, 10]\n */\n function ary(func, n, guard) {\n n = guard ? undefined : n;\n n = (func && n == null) ? func.length : n;\n return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n);\n }\n\n /**\n * Creates a function that invokes `func`, with the `this` binding and arguments\n * of the created function, while it's called less than `n` times. Subsequent\n * calls to the created function return the result of the last `func` invocation.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {number} n The number of calls at which `func` is no longer invoked.\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * jQuery(element).on('click', _.before(5, addContactToList));\n * // => Allows adding up to 4 contacts to the list.\n */\n function before(n, func) {\n var result;\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n n = toInteger(n);\n return function() {\n if (--n > 0) {\n result = func.apply(this, arguments);\n }\n if (n <= 1) {\n func = undefined;\n }\n return result;\n };\n }\n\n /**\n * Creates a function that invokes `func` with the `this` binding of `thisArg`\n * and `partials` prepended to the arguments it receives.\n *\n * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,\n * may be used as a placeholder for partially applied arguments.\n *\n * **Note:** Unlike native `Function#bind`, this method doesn't set the \"length\"\n * property of bound functions.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to bind.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {...*} [partials] The arguments to be partially applied.\n * @returns {Function} Returns the new bound function.\n * @example\n *\n * function greet(greeting, punctuation) {\n * return greeting + ' ' + this.user + punctuation;\n * }\n *\n * var object = { 'user': 'fred' };\n *\n * var bound = _.bind(greet, object, 'hi');\n * bound('!');\n * // => 'hi fred!'\n *\n * // Bound with placeholders.\n * var bound = _.bind(greet, object, _, '!');\n * bound('hi');\n * // => 'hi fred!'\n */\n var bind = baseRest(function(func, thisArg, partials) {\n var bitmask = WRAP_BIND_FLAG;\n if (partials.length) {\n var holders = replaceHolders(partials, getHolder(bind));\n bitmask |= WRAP_PARTIAL_FLAG;\n }\n return createWrap(func, bitmask, thisArg, partials, holders);\n });\n\n /**\n * Creates a function that invokes the method at `object[key]` with `partials`\n * prepended to the arguments it receives.\n *\n * This method differs from `_.bind` by allowing bound functions to reference\n * methods that may be redefined or don't yet exist. See\n * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern)\n * for more details.\n *\n * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic\n * builds, may be used as a placeholder for partially applied arguments.\n *\n * @static\n * @memberOf _\n * @since 0.10.0\n * @category Function\n * @param {Object} object The object to invoke the method on.\n * @param {string} key The key of the method.\n * @param {...*} [partials] The arguments to be partially applied.\n * @returns {Function} Returns the new bound function.\n * @example\n *\n * var object = {\n * 'user': 'fred',\n * 'greet': function(greeting, punctuation) {\n * return greeting + ' ' + this.user + punctuation;\n * }\n * };\n *\n * var bound = _.bindKey(object, 'greet', 'hi');\n * bound('!');\n * // => 'hi fred!'\n *\n * object.greet = function(greeting, punctuation) {\n * return greeting + 'ya ' + this.user + punctuation;\n * };\n *\n * bound('!');\n * // => 'hiya fred!'\n *\n * // Bound with placeholders.\n * var bound = _.bindKey(object, 'greet', _, '!');\n * bound('hi');\n * // => 'hiya fred!'\n */\n var bindKey = baseRest(function(object, key, partials) {\n var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG;\n if (partials.length) {\n var holders = replaceHolders(partials, getHolder(bindKey));\n bitmask |= WRAP_PARTIAL_FLAG;\n }\n return createWrap(key, bitmask, object, partials, holders);\n });\n\n /**\n * Creates a function that accepts arguments of `func` and either invokes\n * `func` returning its result, if at least `arity` number of arguments have\n * been provided, or returns a function that accepts the remaining `func`\n * arguments, and so on. The arity of `func` may be specified if `func.length`\n * is not sufficient.\n *\n * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,\n * may be used as a placeholder for provided arguments.\n *\n * **Note:** This method doesn't set the \"length\" property of curried functions.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Function\n * @param {Function} func The function to curry.\n * @param {number} [arity=func.length] The arity of `func`.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the new curried function.\n * @example\n *\n * var abc = function(a, b, c) {\n * return [a, b, c];\n * };\n *\n * var curried = _.curry(abc);\n *\n * curried(1)(2)(3);\n * // => [1, 2, 3]\n *\n * curried(1, 2)(3);\n * // => [1, 2, 3]\n *\n * curried(1, 2, 3);\n * // => [1, 2, 3]\n *\n * // Curried with placeholders.\n * curried(1)(_, 3)(2);\n * // => [1, 2, 3]\n */\n function curry(func, arity, guard) {\n arity = guard ? undefined : arity;\n var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity);\n result.placeholder = curry.placeholder;\n return result;\n }\n\n /**\n * This method is like `_.curry` except that arguments are applied to `func`\n * in the manner of `_.partialRight` instead of `_.partial`.\n *\n * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic\n * builds, may be used as a placeholder for provided arguments.\n *\n * **Note:** This method doesn't set the \"length\" property of curried functions.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} func The function to curry.\n * @param {number} [arity=func.length] The arity of `func`.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the new curried function.\n * @example\n *\n * var abc = function(a, b, c) {\n * return [a, b, c];\n * };\n *\n * var curried = _.curryRight(abc);\n *\n * curried(3)(2)(1);\n * // => [1, 2, 3]\n *\n * curried(2, 3)(1);\n * // => [1, 2, 3]\n *\n * curried(1, 2, 3);\n * // => [1, 2, 3]\n *\n * // Curried with placeholders.\n * curried(3)(1, _)(2);\n * // => [1, 2, 3]\n */\n function curryRight(func, arity, guard) {\n arity = guard ? undefined : arity;\n var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity);\n result.placeholder = curryRight.placeholder;\n return result;\n }\n\n /**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\n function debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n\n return maxing\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n clearTimeout(timerId);\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n }\n\n /**\n * Defers invoking the `func` until the current call stack has cleared. Any\n * additional arguments are provided to `func` when it's invoked.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to defer.\n * @param {...*} [args] The arguments to invoke `func` with.\n * @returns {number} Returns the timer id.\n * @example\n *\n * _.defer(function(text) {\n * console.log(text);\n * }, 'deferred');\n * // => Logs 'deferred' after one millisecond.\n */\n var defer = baseRest(function(func, args) {\n return baseDelay(func, 1, args);\n });\n\n /**\n * Invokes `func` after `wait` milliseconds. Any additional arguments are\n * provided to `func` when it's invoked.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to delay.\n * @param {number} wait The number of milliseconds to delay invocation.\n * @param {...*} [args] The arguments to invoke `func` with.\n * @returns {number} Returns the timer id.\n * @example\n *\n * _.delay(function(text) {\n * console.log(text);\n * }, 1000, 'later');\n * // => Logs 'later' after one second.\n */\n var delay = baseRest(function(func, wait, args) {\n return baseDelay(func, toNumber(wait) || 0, args);\n });\n\n /**\n * Creates a function that invokes `func` with arguments reversed.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Function\n * @param {Function} func The function to flip arguments for.\n * @returns {Function} Returns the new flipped function.\n * @example\n *\n * var flipped = _.flip(function() {\n * return _.toArray(arguments);\n * });\n *\n * flipped('a', 'b', 'c', 'd');\n * // => ['d', 'c', 'b', 'a']\n */\n function flip(func) {\n return createWrap(func, WRAP_FLIP_FLAG);\n }\n\n /**\n * Creates a function that memoizes the result of `func`. If `resolver` is\n * provided, it determines the cache key for storing the result based on the\n * arguments provided to the memoized function. By default, the first argument\n * provided to the memoized function is used as the map cache key. The `func`\n * is invoked with the `this` binding of the memoized function.\n *\n * **Note:** The cache is exposed as the `cache` property on the memoized\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\n * constructor with one whose instances implement the\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n * method interface of `clear`, `delete`, `get`, `has`, and `set`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to have its output memoized.\n * @param {Function} [resolver] The function to resolve the cache key.\n * @returns {Function} Returns the new memoized function.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n * var other = { 'c': 3, 'd': 4 };\n *\n * var values = _.memoize(_.values);\n * values(object);\n * // => [1, 2]\n *\n * values(other);\n * // => [3, 4]\n *\n * object.a = 2;\n * values(object);\n * // => [1, 2]\n *\n * // Modify the result cache.\n * values.cache.set(object, ['a', 'b']);\n * values(object);\n * // => ['a', 'b']\n *\n * // Replace `_.memoize.Cache`.\n * _.memoize.Cache = WeakMap;\n */\n function memoize(func, resolver) {\n if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var memoized = function() {\n var args = arguments,\n key = resolver ? resolver.apply(this, args) : args[0],\n cache = memoized.cache;\n\n if (cache.has(key)) {\n return cache.get(key);\n }\n var result = func.apply(this, args);\n memoized.cache = cache.set(key, result) || cache;\n return result;\n };\n memoized.cache = new (memoize.Cache || MapCache);\n return memoized;\n }\n\n // Expose `MapCache`.\n memoize.Cache = MapCache;\n\n /**\n * Creates a function that negates the result of the predicate `func`. The\n * `func` predicate is invoked with the `this` binding and arguments of the\n * created function.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} predicate The predicate to negate.\n * @returns {Function} Returns the new negated function.\n * @example\n *\n * function isEven(n) {\n * return n % 2 == 0;\n * }\n *\n * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));\n * // => [1, 3, 5]\n */\n function negate(predicate) {\n if (typeof predicate != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n return function() {\n var args = arguments;\n switch (args.length) {\n case 0: return !predicate.call(this);\n case 1: return !predicate.call(this, args[0]);\n case 2: return !predicate.call(this, args[0], args[1]);\n case 3: return !predicate.call(this, args[0], args[1], args[2]);\n }\n return !predicate.apply(this, args);\n };\n }\n\n /**\n * Creates a function that is restricted to invoking `func` once. Repeat calls\n * to the function return the value of the first invocation. The `func` is\n * invoked with the `this` binding and arguments of the created function.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * var initialize = _.once(createApplication);\n * initialize();\n * initialize();\n * // => `createApplication` is invoked once\n */\n function once(func) {\n return before(2, func);\n }\n\n /**\n * Creates a function that invokes `func` with its arguments transformed.\n *\n * @static\n * @since 4.0.0\n * @memberOf _\n * @category Function\n * @param {Function} func The function to wrap.\n * @param {...(Function|Function[])} [transforms=[_.identity]]\n * The argument transforms.\n * @returns {Function} Returns the new function.\n * @example\n *\n * function doubled(n) {\n * return n * 2;\n * }\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * var func = _.overArgs(function(x, y) {\n * return [x, y];\n * }, [square, doubled]);\n *\n * func(9, 3);\n * // => [81, 6]\n *\n * func(10, 5);\n * // => [100, 10]\n */\n var overArgs = castRest(function(func, transforms) {\n transforms = (transforms.length == 1 && isArray(transforms[0]))\n ? arrayMap(transforms[0], baseUnary(getIteratee()))\n : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee()));\n\n var funcsLength = transforms.length;\n return baseRest(function(args) {\n var index = -1,\n length = nativeMin(args.length, funcsLength);\n\n while (++index < length) {\n args[index] = transforms[index].call(this, args[index]);\n }\n return apply(func, this, args);\n });\n });\n\n /**\n * Creates a function that invokes `func` with `partials` prepended to the\n * arguments it receives. This method is like `_.bind` except it does **not**\n * alter the `this` binding.\n *\n * The `_.partial.placeholder` value, which defaults to `_` in monolithic\n * builds, may be used as a placeholder for partially applied arguments.\n *\n * **Note:** This method doesn't set the \"length\" property of partially\n * applied functions.\n *\n * @static\n * @memberOf _\n * @since 0.2.0\n * @category Function\n * @param {Function} func The function to partially apply arguments to.\n * @param {...*} [partials] The arguments to be partially applied.\n * @returns {Function} Returns the new partially applied function.\n * @example\n *\n * function greet(greeting, name) {\n * return greeting + ' ' + name;\n * }\n *\n * var sayHelloTo = _.partial(greet, 'hello');\n * sayHelloTo('fred');\n * // => 'hello fred'\n *\n * // Partially applied with placeholders.\n * var greetFred = _.partial(greet, _, 'fred');\n * greetFred('hi');\n * // => 'hi fred'\n */\n var partial = baseRest(function(func, partials) {\n var holders = replaceHolders(partials, getHolder(partial));\n return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders);\n });\n\n /**\n * This method is like `_.partial` except that partially applied arguments\n * are appended to the arguments it receives.\n *\n * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic\n * builds, may be used as a placeholder for partially applied arguments.\n *\n * **Note:** This method doesn't set the \"length\" property of partially\n * applied functions.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Function\n * @param {Function} func The function to partially apply arguments to.\n * @param {...*} [partials] The arguments to be partially applied.\n * @returns {Function} Returns the new partially applied function.\n * @example\n *\n * function greet(greeting, name) {\n * return greeting + ' ' + name;\n * }\n *\n * var greetFred = _.partialRight(greet, 'fred');\n * greetFred('hi');\n * // => 'hi fred'\n *\n * // Partially applied with placeholders.\n * var sayHelloTo = _.partialRight(greet, 'hello', _);\n * sayHelloTo('fred');\n * // => 'hello fred'\n */\n var partialRight = baseRest(function(func, partials) {\n var holders = replaceHolders(partials, getHolder(partialRight));\n return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders);\n });\n\n /**\n * Creates a function that invokes `func` with arguments arranged according\n * to the specified `indexes` where the argument value at the first index is\n * provided as the first argument, the argument value at the second index is\n * provided as the second argument, and so on.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} func The function to rearrange arguments for.\n * @param {...(number|number[])} indexes The arranged argument indexes.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var rearged = _.rearg(function(a, b, c) {\n * return [a, b, c];\n * }, [2, 0, 1]);\n *\n * rearged('b', 'c', 'a')\n * // => ['a', 'b', 'c']\n */\n var rearg = flatRest(function(func, indexes) {\n return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes);\n });\n\n /**\n * Creates a function that invokes `func` with the `this` binding of the\n * created function and arguments from `start` and beyond provided as\n * an array.\n *\n * **Note:** This method is based on the\n * [rest parameter](https://mdn.io/rest_parameters).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Function\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var say = _.rest(function(what, names) {\n * return what + ' ' + _.initial(names).join(', ') +\n * (_.size(names) > 1 ? ', & ' : '') + _.last(names);\n * });\n *\n * say('hello', 'fred', 'barney', 'pebbles');\n * // => 'hello fred, barney, & pebbles'\n */\n function rest(func, start) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n start = start === undefined ? start : toInteger(start);\n return baseRest(func, start);\n }\n\n /**\n * Creates a function that invokes `func` with the `this` binding of the\n * create function and an array of arguments much like\n * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply).\n *\n * **Note:** This method is based on the\n * [spread operator](https://mdn.io/spread_operator).\n *\n * @static\n * @memberOf _\n * @since 3.2.0\n * @category Function\n * @param {Function} func The function to spread arguments over.\n * @param {number} [start=0] The start position of the spread.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var say = _.spread(function(who, what) {\n * return who + ' says ' + what;\n * });\n *\n * say(['fred', 'hello']);\n * // => 'fred says hello'\n *\n * var numbers = Promise.all([\n * Promise.resolve(40),\n * Promise.resolve(36)\n * ]);\n *\n * numbers.then(_.spread(function(x, y) {\n * return x + y;\n * }));\n * // => a Promise of 76\n */\n function spread(func, start) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n start = start == null ? 0 : nativeMax(toInteger(start), 0);\n return baseRest(function(args) {\n var array = args[start],\n otherArgs = castSlice(args, 0, start);\n\n if (array) {\n arrayPush(otherArgs, array);\n }\n return apply(func, this, otherArgs);\n });\n }\n\n /**\n * Creates a throttled function that only invokes `func` at most once per\n * every `wait` milliseconds. The throttled function comes with a `cancel`\n * method to cancel delayed `func` invocations and a `flush` method to\n * immediately invoke them. Provide `options` to indicate whether `func`\n * should be invoked on the leading and/or trailing edge of the `wait`\n * timeout. The `func` is invoked with the last arguments provided to the\n * throttled function. Subsequent calls to the throttled function return the\n * result of the last `func` invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the throttled function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.throttle` and `_.debounce`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to throttle.\n * @param {number} [wait=0] The number of milliseconds to throttle invocations to.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=true]\n * Specify invoking on the leading edge of the timeout.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new throttled function.\n * @example\n *\n * // Avoid excessively updating the position while scrolling.\n * jQuery(window).on('scroll', _.throttle(updatePosition, 100));\n *\n * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.\n * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });\n * jQuery(element).on('click', throttled);\n *\n * // Cancel the trailing throttled invocation.\n * jQuery(window).on('popstate', throttled.cancel);\n */\n function throttle(func, wait, options) {\n var leading = true,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n if (isObject(options)) {\n leading = 'leading' in options ? !!options.leading : leading;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n return debounce(func, wait, {\n 'leading': leading,\n 'maxWait': wait,\n 'trailing': trailing\n });\n }\n\n /**\n * Creates a function that accepts up to one argument, ignoring any\n * additional arguments.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Function\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n * @example\n *\n * _.map(['6', '8', '10'], _.unary(parseInt));\n * // => [6, 8, 10]\n */\n function unary(func) {\n return ary(func, 1);\n }\n\n /**\n * Creates a function that provides `value` to `wrapper` as its first\n * argument. Any additional arguments provided to the function are appended\n * to those provided to the `wrapper`. The wrapper is invoked with the `this`\n * binding of the created function.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {*} value The value to wrap.\n * @param {Function} [wrapper=identity] The wrapper function.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var p = _.wrap(_.escape, function(func, text) {\n * return '<p>' + func(text) + '</p>';\n * });\n *\n * p('fred, barney, & pebbles');\n * // => '<p>fred, barney, & pebbles</p>'\n */\n function wrap(value, wrapper) {\n return partial(castFunction(wrapper), value);\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Casts `value` as an array if it's not one.\n *\n * @static\n * @memberOf _\n * @since 4.4.0\n * @category Lang\n * @param {*} value The value to inspect.\n * @returns {Array} Returns the cast array.\n * @example\n *\n * _.castArray(1);\n * // => [1]\n *\n * _.castArray({ 'a': 1 });\n * // => [{ 'a': 1 }]\n *\n * _.castArray('abc');\n * // => ['abc']\n *\n * _.castArray(null);\n * // => [null]\n *\n * _.castArray(undefined);\n * // => [undefined]\n *\n * _.castArray();\n * // => []\n *\n * var array = [1, 2, 3];\n * console.log(_.castArray(array) === array);\n * // => true\n */\n function castArray() {\n if (!arguments.length) {\n return [];\n }\n var value = arguments[0];\n return isArray(value) ? value : [value];\n }\n\n /**\n * Creates a shallow clone of `value`.\n *\n * **Note:** This method is loosely based on the\n * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)\n * and supports cloning arrays, array buffers, booleans, date objects, maps,\n * numbers, `Object` objects, regexes, sets, strings, symbols, and typed\n * arrays. The own enumerable properties of `arguments` objects are cloned\n * as plain objects. An empty object is returned for uncloneable values such\n * as error objects, functions, DOM nodes, and WeakMaps.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to clone.\n * @returns {*} Returns the cloned value.\n * @see _.cloneDeep\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var shallow = _.clone(objects);\n * console.log(shallow[0] === objects[0]);\n * // => true\n */\n function clone(value) {\n return baseClone(value, CLONE_SYMBOLS_FLAG);\n }\n\n /**\n * This method is like `_.clone` except that it accepts `customizer` which\n * is invoked to produce the cloned value. If `customizer` returns `undefined`,\n * cloning is handled by the method instead. The `customizer` is invoked with\n * up to four arguments; (value [, index|key, object, stack]).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to clone.\n * @param {Function} [customizer] The function to customize cloning.\n * @returns {*} Returns the cloned value.\n * @see _.cloneDeepWith\n * @example\n *\n * function customizer(value) {\n * if (_.isElement(value)) {\n * return value.cloneNode(false);\n * }\n * }\n *\n * var el = _.cloneWith(document.body, customizer);\n *\n * console.log(el === document.body);\n * // => false\n * console.log(el.nodeName);\n * // => 'BODY'\n * console.log(el.childNodes.length);\n * // => 0\n */\n function cloneWith(value, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return baseClone(value, CLONE_SYMBOLS_FLAG, customizer);\n }\n\n /**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\n function cloneDeep(value) {\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n }\n\n /**\n * This method is like `_.cloneWith` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @param {Function} [customizer] The function to customize cloning.\n * @returns {*} Returns the deep cloned value.\n * @see _.cloneWith\n * @example\n *\n * function customizer(value) {\n * if (_.isElement(value)) {\n * return value.cloneNode(true);\n * }\n * }\n *\n * var el = _.cloneDeepWith(document.body, customizer);\n *\n * console.log(el === document.body);\n * // => false\n * console.log(el.nodeName);\n * // => 'BODY'\n * console.log(el.childNodes.length);\n * // => 20\n */\n function cloneDeepWith(value, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer);\n }\n\n /**\n * Checks if `object` conforms to `source` by invoking the predicate\n * properties of `source` with the corresponding property values of `object`.\n *\n * **Note:** This method is equivalent to `_.conforms` when `source` is\n * partially applied.\n *\n * @static\n * @memberOf _\n * @since 4.14.0\n * @category Lang\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property predicates to conform to.\n * @returns {boolean} Returns `true` if `object` conforms, else `false`.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n *\n * _.conformsTo(object, { 'b': function(n) { return n > 1; } });\n * // => true\n *\n * _.conformsTo(object, { 'b': function(n) { return n > 2; } });\n * // => false\n */\n function conformsTo(object, source) {\n return source == null || baseConformsTo(object, source, keys(source));\n }\n\n /**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\n function eq(value, other) {\n return value === other || (value !== value && other !== other);\n }\n\n /**\n * Checks if `value` is greater than `other`.\n *\n * @static\n * @memberOf _\n * @since 3.9.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is greater than `other`,\n * else `false`.\n * @see _.lt\n * @example\n *\n * _.gt(3, 1);\n * // => true\n *\n * _.gt(3, 3);\n * // => false\n *\n * _.gt(1, 3);\n * // => false\n */\n var gt = createRelationalOperation(baseGt);\n\n /**\n * Checks if `value` is greater than or equal to `other`.\n *\n * @static\n * @memberOf _\n * @since 3.9.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is greater than or equal to\n * `other`, else `false`.\n * @see _.lte\n * @example\n *\n * _.gte(3, 1);\n * // => true\n *\n * _.gte(3, 3);\n * // => true\n *\n * _.gte(1, 3);\n * // => false\n */\n var gte = createRelationalOperation(function(value, other) {\n return value >= other;\n });\n\n /**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\n var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n };\n\n /**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\n var isArray = Array.isArray;\n\n /**\n * Checks if `value` is classified as an `ArrayBuffer` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.\n * @example\n *\n * _.isArrayBuffer(new ArrayBuffer(2));\n * // => true\n *\n * _.isArrayBuffer(new Array(2));\n * // => false\n */\n var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer;\n\n /**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\n function isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n }\n\n /**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n * else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\n function isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n }\n\n /**\n * Checks if `value` is classified as a boolean primitive or object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a boolean, else `false`.\n * @example\n *\n * _.isBoolean(false);\n * // => true\n *\n * _.isBoolean(null);\n * // => false\n */\n function isBoolean(value) {\n return value === true || value === false ||\n (isObjectLike(value) && baseGetTag(value) == boolTag);\n }\n\n /**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\n var isBuffer = nativeIsBuffer || stubFalse;\n\n /**\n * Checks if `value` is classified as a `Date` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a date object, else `false`.\n * @example\n *\n * _.isDate(new Date);\n * // => true\n *\n * _.isDate('Mon April 23 2012');\n * // => false\n */\n var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;\n\n /**\n * Checks if `value` is likely a DOM element.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`.\n * @example\n *\n * _.isElement(document.body);\n * // => true\n *\n * _.isElement('<body>');\n * // => false\n */\n function isElement(value) {\n return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);\n }\n\n /**\n * Checks if `value` is an empty object, collection, map, or set.\n *\n * Objects are considered empty if they have no own enumerable string keyed\n * properties.\n *\n * Array-like values such as `arguments` objects, arrays, buffers, strings, or\n * jQuery-like collections are considered empty if they have a `length` of `0`.\n * Similarly, maps and sets are considered empty if they have a `size` of `0`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is empty, else `false`.\n * @example\n *\n * _.isEmpty(null);\n * // => true\n *\n * _.isEmpty(true);\n * // => true\n *\n * _.isEmpty(1);\n * // => true\n *\n * _.isEmpty([1, 2, 3]);\n * // => false\n *\n * _.isEmpty({ 'a': 1 });\n * // => false\n */\n function isEmpty(value) {\n if (value == null) {\n return true;\n }\n if (isArrayLike(value) &&\n (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||\n isBuffer(value) || isTypedArray(value) || isArguments(value))) {\n return !value.length;\n }\n var tag = getTag(value);\n if (tag == mapTag || tag == setTag) {\n return !value.size;\n }\n if (isPrototype(value)) {\n return !baseKeys(value).length;\n }\n for (var key in value) {\n if (hasOwnProperty.call(value, key)) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\n function isEqual(value, other) {\n return baseIsEqual(value, other);\n }\n\n /**\n * This method is like `_.isEqual` except that it accepts `customizer` which\n * is invoked to compare values. If `customizer` returns `undefined`, comparisons\n * are handled by the method instead. The `customizer` is invoked with up to\n * six arguments: (objValue, othValue [, index|key, object, other, stack]).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * function isGreeting(value) {\n * return /^h(?:i|ello)$/.test(value);\n * }\n *\n * function customizer(objValue, othValue) {\n * if (isGreeting(objValue) && isGreeting(othValue)) {\n * return true;\n * }\n * }\n *\n * var array = ['hello', 'goodbye'];\n * var other = ['hi', 'goodbye'];\n *\n * _.isEqualWith(array, other, customizer);\n * // => true\n */\n function isEqualWith(value, other, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n var result = customizer ? customizer(value, other) : undefined;\n return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result;\n }\n\n /**\n * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,\n * `SyntaxError`, `TypeError`, or `URIError` object.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an error object, else `false`.\n * @example\n *\n * _.isError(new Error);\n * // => true\n *\n * _.isError(Error);\n * // => false\n */\n function isError(value) {\n if (!isObjectLike(value)) {\n return false;\n }\n var tag = baseGetTag(value);\n return tag == errorTag || tag == domExcTag ||\n (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value));\n }\n\n /**\n * Checks if `value` is a finite primitive number.\n *\n * **Note:** This method is based on\n * [`Number.isFinite`](https://mdn.io/Number/isFinite).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a finite number, else `false`.\n * @example\n *\n * _.isFinite(3);\n * // => true\n *\n * _.isFinite(Number.MIN_VALUE);\n * // => true\n *\n * _.isFinite(Infinity);\n * // => false\n *\n * _.isFinite('3');\n * // => false\n */\n function isFinite(value) {\n return typeof value == 'number' && nativeIsFinite(value);\n }\n\n /**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\n function isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n }\n\n /**\n * Checks if `value` is an integer.\n *\n * **Note:** This method is based on\n * [`Number.isInteger`](https://mdn.io/Number/isInteger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an integer, else `false`.\n * @example\n *\n * _.isInteger(3);\n * // => true\n *\n * _.isInteger(Number.MIN_VALUE);\n * // => false\n *\n * _.isInteger(Infinity);\n * // => false\n *\n * _.isInteger('3');\n * // => false\n */\n function isInteger(value) {\n return typeof value == 'number' && value == toInteger(value);\n }\n\n /**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\n function isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n }\n\n /**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\n function isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n }\n\n /**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\n function isObjectLike(value) {\n return value != null && typeof value == 'object';\n }\n\n /**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\n var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\n /**\n * Performs a partial deep comparison between `object` and `source` to\n * determine if `object` contains equivalent property values.\n *\n * **Note:** This method is equivalent to `_.matches` when `source` is\n * partially applied.\n *\n * Partial comparisons will match empty array and empty object `source`\n * values against any array or object value, respectively. See `_.isEqual`\n * for a list of supported value comparisons.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n *\n * _.isMatch(object, { 'b': 2 });\n * // => true\n *\n * _.isMatch(object, { 'b': 1 });\n * // => false\n */\n function isMatch(object, source) {\n return object === source || baseIsMatch(object, source, getMatchData(source));\n }\n\n /**\n * This method is like `_.isMatch` except that it accepts `customizer` which\n * is invoked to compare values. If `customizer` returns `undefined`, comparisons\n * are handled by the method instead. The `customizer` is invoked with five\n * arguments: (objValue, srcValue, index|key, object, source).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n * @example\n *\n * function isGreeting(value) {\n * return /^h(?:i|ello)$/.test(value);\n * }\n *\n * function customizer(objValue, srcValue) {\n * if (isGreeting(objValue) && isGreeting(srcValue)) {\n * return true;\n * }\n * }\n *\n * var object = { 'greeting': 'hello' };\n * var source = { 'greeting': 'hi' };\n *\n * _.isMatchWith(object, source, customizer);\n * // => true\n */\n function isMatchWith(object, source, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return baseIsMatch(object, source, getMatchData(source), customizer);\n }\n\n /**\n * Checks if `value` is `NaN`.\n *\n * **Note:** This method is based on\n * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as\n * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for\n * `undefined` and other non-number values.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n * @example\n *\n * _.isNaN(NaN);\n * // => true\n *\n * _.isNaN(new Number(NaN));\n * // => true\n *\n * isNaN(undefined);\n * // => true\n *\n * _.isNaN(undefined);\n * // => false\n */\n function isNaN(value) {\n // An `NaN` primitive is the only value that is not equal to itself.\n // Perform the `toStringTag` check first to avoid errors with some\n // ActiveX objects in IE.\n return isNumber(value) && value != +value;\n }\n\n /**\n * Checks if `value` is a pristine native function.\n *\n * **Note:** This method can't reliably detect native functions in the presence\n * of the core-js package because core-js circumvents this kind of detection.\n * Despite multiple requests, the core-js maintainer has made it clear: any\n * attempt to fix the detection will be obstructed. As a result, we're left\n * with little choice but to throw an error. Unfortunately, this also affects\n * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill),\n * which rely on core-js.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n * @example\n *\n * _.isNative(Array.prototype.push);\n * // => true\n *\n * _.isNative(_);\n * // => false\n */\n function isNative(value) {\n if (isMaskable(value)) {\n throw new Error(CORE_ERROR_TEXT);\n }\n return baseIsNative(value);\n }\n\n /**\n * Checks if `value` is `null`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `null`, else `false`.\n * @example\n *\n * _.isNull(null);\n * // => true\n *\n * _.isNull(void 0);\n * // => false\n */\n function isNull(value) {\n return value === null;\n }\n\n /**\n * Checks if `value` is `null` or `undefined`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is nullish, else `false`.\n * @example\n *\n * _.isNil(null);\n * // => true\n *\n * _.isNil(void 0);\n * // => true\n *\n * _.isNil(NaN);\n * // => false\n */\n function isNil(value) {\n return value == null;\n }\n\n /**\n * Checks if `value` is classified as a `Number` primitive or object.\n *\n * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are\n * classified as numbers, use the `_.isFinite` method.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a number, else `false`.\n * @example\n *\n * _.isNumber(3);\n * // => true\n *\n * _.isNumber(Number.MIN_VALUE);\n * // => true\n *\n * _.isNumber(Infinity);\n * // => true\n *\n * _.isNumber('3');\n * // => false\n */\n function isNumber(value) {\n return typeof value == 'number' ||\n (isObjectLike(value) && baseGetTag(value) == numberTag);\n }\n\n /**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\n function isPlainObject(value) {\n if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n return false;\n }\n var proto = getPrototype(value);\n if (proto === null) {\n return true;\n }\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n funcToString.call(Ctor) == objectCtorString;\n }\n\n /**\n * Checks if `value` is classified as a `RegExp` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.\n * @example\n *\n * _.isRegExp(/abc/);\n * // => true\n *\n * _.isRegExp('/abc/');\n * // => false\n */\n var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;\n\n /**\n * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754\n * double precision number which isn't the result of a rounded unsafe integer.\n *\n * **Note:** This method is based on\n * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`.\n * @example\n *\n * _.isSafeInteger(3);\n * // => true\n *\n * _.isSafeInteger(Number.MIN_VALUE);\n * // => false\n *\n * _.isSafeInteger(Infinity);\n * // => false\n *\n * _.isSafeInteger('3');\n * // => false\n */\n function isSafeInteger(value) {\n return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER;\n }\n\n /**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\n var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\n /**\n * Checks if `value` is classified as a `String` primitive or object.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a string, else `false`.\n * @example\n *\n * _.isString('abc');\n * // => true\n *\n * _.isString(1);\n * // => false\n */\n function isString(value) {\n return typeof value == 'string' ||\n (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);\n }\n\n /**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\n function isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n }\n\n /**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\n var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\n /**\n * Checks if `value` is `undefined`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.\n * @example\n *\n * _.isUndefined(void 0);\n * // => true\n *\n * _.isUndefined(null);\n * // => false\n */\n function isUndefined(value) {\n return value === undefined;\n }\n\n /**\n * Checks if `value` is classified as a `WeakMap` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a weak map, else `false`.\n * @example\n *\n * _.isWeakMap(new WeakMap);\n * // => true\n *\n * _.isWeakMap(new Map);\n * // => false\n */\n function isWeakMap(value) {\n return isObjectLike(value) && getTag(value) == weakMapTag;\n }\n\n /**\n * Checks if `value` is classified as a `WeakSet` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a weak set, else `false`.\n * @example\n *\n * _.isWeakSet(new WeakSet);\n * // => true\n *\n * _.isWeakSet(new Set);\n * // => false\n */\n function isWeakSet(value) {\n return isObjectLike(value) && baseGetTag(value) == weakSetTag;\n }\n\n /**\n * Checks if `value` is less than `other`.\n *\n * @static\n * @memberOf _\n * @since 3.9.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is less than `other`,\n * else `false`.\n * @see _.gt\n * @example\n *\n * _.lt(1, 3);\n * // => true\n *\n * _.lt(3, 3);\n * // => false\n *\n * _.lt(3, 1);\n * // => false\n */\n var lt = createRelationalOperation(baseLt);\n\n /**\n * Checks if `value` is less than or equal to `other`.\n *\n * @static\n * @memberOf _\n * @since 3.9.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is less than or equal to\n * `other`, else `false`.\n * @see _.gte\n * @example\n *\n * _.lte(1, 3);\n * // => true\n *\n * _.lte(3, 3);\n * // => true\n *\n * _.lte(3, 1);\n * // => false\n */\n var lte = createRelationalOperation(function(value, other) {\n return value <= other;\n });\n\n /**\n * Converts `value` to an array.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Array} Returns the converted array.\n * @example\n *\n * _.toArray({ 'a': 1, 'b': 2 });\n * // => [1, 2]\n *\n * _.toArray('abc');\n * // => ['a', 'b', 'c']\n *\n * _.toArray(1);\n * // => []\n *\n * _.toArray(null);\n * // => []\n */\n function toArray(value) {\n if (!value) {\n return [];\n }\n if (isArrayLike(value)) {\n return isString(value) ? stringToArray(value) : copyArray(value);\n }\n if (symIterator && value[symIterator]) {\n return iteratorToArray(value[symIterator]());\n }\n var tag = getTag(value),\n func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values);\n\n return func(value);\n }\n\n /**\n * Converts `value` to a finite number.\n *\n * @static\n * @memberOf _\n * @since 4.12.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted number.\n * @example\n *\n * _.toFinite(3.2);\n * // => 3.2\n *\n * _.toFinite(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toFinite(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toFinite('3.2');\n * // => 3.2\n */\n function toFinite(value) {\n if (!value) {\n return value === 0 ? value : 0;\n }\n value = toNumber(value);\n if (value === INFINITY || value === -INFINITY) {\n var sign = (value < 0 ? -1 : 1);\n return sign * MAX_INTEGER;\n }\n return value === value ? value : 0;\n }\n\n /**\n * Converts `value` to an integer.\n *\n * **Note:** This method is loosely based on\n * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toInteger(3.2);\n * // => 3\n *\n * _.toInteger(Number.MIN_VALUE);\n * // => 0\n *\n * _.toInteger(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toInteger('3.2');\n * // => 3\n */\n function toInteger(value) {\n var result = toFinite(value),\n remainder = result % 1;\n\n return result === result ? (remainder ? result - remainder : result) : 0;\n }\n\n /**\n * Converts `value` to an integer suitable for use as the length of an\n * array-like object.\n *\n * **Note:** This method is based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toLength(3.2);\n * // => 3\n *\n * _.toLength(Number.MIN_VALUE);\n * // => 0\n *\n * _.toLength(Infinity);\n * // => 4294967295\n *\n * _.toLength('3.2');\n * // => 3\n */\n function toLength(value) {\n return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0;\n }\n\n /**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\n function toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = baseTrim(value);\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n }\n\n /**\n * Converts `value` to a plain object flattening inherited enumerable string\n * keyed properties of `value` to own properties of the plain object.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Object} Returns the converted plain object.\n * @example\n *\n * function Foo() {\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.assign({ 'a': 1 }, new Foo);\n * // => { 'a': 1, 'b': 2 }\n *\n * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));\n * // => { 'a': 1, 'b': 2, 'c': 3 }\n */\n function toPlainObject(value) {\n return copyObject(value, keysIn(value));\n }\n\n /**\n * Converts `value` to a safe integer. A safe integer can be compared and\n * represented correctly.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toSafeInteger(3.2);\n * // => 3\n *\n * _.toSafeInteger(Number.MIN_VALUE);\n * // => 0\n *\n * _.toSafeInteger(Infinity);\n * // => 9007199254740991\n *\n * _.toSafeInteger('3.2');\n * // => 3\n */\n function toSafeInteger(value) {\n return value\n ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER)\n : (value === 0 ? value : 0);\n }\n\n /**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\n function toString(value) {\n return value == null ? '' : baseToString(value);\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Assigns own enumerable string keyed properties of source objects to the\n * destination object. Source objects are applied from left to right.\n * Subsequent sources overwrite property assignments of previous sources.\n *\n * **Note:** This method mutates `object` and is loosely based on\n * [`Object.assign`](https://mdn.io/Object/assign).\n *\n * @static\n * @memberOf _\n * @since 0.10.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.assignIn\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * function Bar() {\n * this.c = 3;\n * }\n *\n * Foo.prototype.b = 2;\n * Bar.prototype.d = 4;\n *\n * _.assign({ 'a': 0 }, new Foo, new Bar);\n * // => { 'a': 1, 'c': 3 }\n */\n var assign = createAssigner(function(object, source) {\n if (isPrototype(source) || isArrayLike(source)) {\n copyObject(source, keys(source), object);\n return;\n }\n for (var key in source) {\n if (hasOwnProperty.call(source, key)) {\n assignValue(object, key, source[key]);\n }\n }\n });\n\n /**\n * This method is like `_.assign` except that it iterates over own and\n * inherited source properties.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @alias extend\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.assign\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * function Bar() {\n * this.c = 3;\n * }\n *\n * Foo.prototype.b = 2;\n * Bar.prototype.d = 4;\n *\n * _.assignIn({ 'a': 0 }, new Foo, new Bar);\n * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 }\n */\n var assignIn = createAssigner(function(object, source) {\n copyObject(source, keysIn(source), object);\n });\n\n /**\n * This method is like `_.assignIn` except that it accepts `customizer`\n * which is invoked to produce the assigned values. If `customizer` returns\n * `undefined`, assignment is handled by the method instead. The `customizer`\n * is invoked with five arguments: (objValue, srcValue, key, object, source).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @alias extendWith\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} sources The source objects.\n * @param {Function} [customizer] The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @see _.assignWith\n * @example\n *\n * function customizer(objValue, srcValue) {\n * return _.isUndefined(objValue) ? srcValue : objValue;\n * }\n *\n * var defaults = _.partialRight(_.assignInWith, customizer);\n *\n * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n * // => { 'a': 1, 'b': 2 }\n */\n var assignInWith = createAssigner(function(object, source, srcIndex, customizer) {\n copyObject(source, keysIn(source), object, customizer);\n });\n\n /**\n * This method is like `_.assign` except that it accepts `customizer`\n * which is invoked to produce the assigned values. If `customizer` returns\n * `undefined`, assignment is handled by the method instead. The `customizer`\n * is invoked with five arguments: (objValue, srcValue, key, object, source).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} sources The source objects.\n * @param {Function} [customizer] The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @see _.assignInWith\n * @example\n *\n * function customizer(objValue, srcValue) {\n * return _.isUndefined(objValue) ? srcValue : objValue;\n * }\n *\n * var defaults = _.partialRight(_.assignWith, customizer);\n *\n * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n * // => { 'a': 1, 'b': 2 }\n */\n var assignWith = createAssigner(function(object, source, srcIndex, customizer) {\n copyObject(source, keys(source), object, customizer);\n });\n\n /**\n * Creates an array of values corresponding to `paths` of `object`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {...(string|string[])} [paths] The property paths to pick.\n * @returns {Array} Returns the picked values.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };\n *\n * _.at(object, ['a[0].b.c', 'a[1]']);\n * // => [3, 4]\n */\n var at = flatRest(baseAt);\n\n /**\n * Creates an object that inherits from the `prototype` object. If a\n * `properties` object is given, its own enumerable string keyed properties\n * are assigned to the created object.\n *\n * @static\n * @memberOf _\n * @since 2.3.0\n * @category Object\n * @param {Object} prototype The object to inherit from.\n * @param {Object} [properties] The properties to assign to the object.\n * @returns {Object} Returns the new object.\n * @example\n *\n * function Shape() {\n * this.x = 0;\n * this.y = 0;\n * }\n *\n * function Circle() {\n * Shape.call(this);\n * }\n *\n * Circle.prototype = _.create(Shape.prototype, {\n * 'constructor': Circle\n * });\n *\n * var circle = new Circle;\n * circle instanceof Circle;\n * // => true\n *\n * circle instanceof Shape;\n * // => true\n */\n function create(prototype, properties) {\n var result = baseCreate(prototype);\n return properties == null ? result : baseAssign(result, properties);\n }\n\n /**\n * Assigns own and inherited enumerable string keyed properties of source\n * objects to the destination object for all destination properties that\n * resolve to `undefined`. Source objects are applied from left to right.\n * Once a property is set, additional values of the same property are ignored.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.defaultsDeep\n * @example\n *\n * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n * // => { 'a': 1, 'b': 2 }\n */\n var defaults = baseRest(function(object, sources) {\n object = Object(object);\n\n var index = -1;\n var length = sources.length;\n var guard = length > 2 ? sources[2] : undefined;\n\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n length = 1;\n }\n\n while (++index < length) {\n var source = sources[index];\n var props = keysIn(source);\n var propsIndex = -1;\n var propsLength = props.length;\n\n while (++propsIndex < propsLength) {\n var key = props[propsIndex];\n var value = object[key];\n\n if (value === undefined ||\n (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) {\n object[key] = source[key];\n }\n }\n }\n\n return object;\n });\n\n /**\n * This method is like `_.defaults` except that it recursively assigns\n * default properties.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 3.10.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.defaults\n * @example\n *\n * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } });\n * // => { 'a': { 'b': 2, 'c': 3 } }\n */\n var defaultsDeep = baseRest(function(args) {\n args.push(undefined, customDefaultsMerge);\n return apply(mergeWith, undefined, args);\n });\n\n /**\n * This method is like `_.find` except that it returns the key of the first\n * element `predicate` returns truthy for instead of the element itself.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category Object\n * @param {Object} object The object to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {string|undefined} Returns the key of the matched element,\n * else `undefined`.\n * @example\n *\n * var users = {\n * 'barney': { 'age': 36, 'active': true },\n * 'fred': { 'age': 40, 'active': false },\n * 'pebbles': { 'age': 1, 'active': true }\n * };\n *\n * _.findKey(users, function(o) { return o.age < 40; });\n * // => 'barney' (iteration order is not guaranteed)\n *\n * // The `_.matches` iteratee shorthand.\n * _.findKey(users, { 'age': 1, 'active': true });\n * // => 'pebbles'\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findKey(users, ['active', false]);\n * // => 'fred'\n *\n * // The `_.property` iteratee shorthand.\n * _.findKey(users, 'active');\n * // => 'barney'\n */\n function findKey(object, predicate) {\n return baseFindKey(object, getIteratee(predicate, 3), baseForOwn);\n }\n\n /**\n * This method is like `_.findKey` except that it iterates over elements of\n * a collection in the opposite order.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Object\n * @param {Object} object The object to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {string|undefined} Returns the key of the matched element,\n * else `undefined`.\n * @example\n *\n * var users = {\n * 'barney': { 'age': 36, 'active': true },\n * 'fred': { 'age': 40, 'active': false },\n * 'pebbles': { 'age': 1, 'active': true }\n * };\n *\n * _.findLastKey(users, function(o) { return o.age < 40; });\n * // => returns 'pebbles' assuming `_.findKey` returns 'barney'\n *\n * // The `_.matches` iteratee shorthand.\n * _.findLastKey(users, { 'age': 36, 'active': true });\n * // => 'barney'\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findLastKey(users, ['active', false]);\n * // => 'fred'\n *\n * // The `_.property` iteratee shorthand.\n * _.findLastKey(users, 'active');\n * // => 'pebbles'\n */\n function findLastKey(object, predicate) {\n return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight);\n }\n\n /**\n * Iterates over own and inherited enumerable string keyed properties of an\n * object and invokes `iteratee` for each property. The iteratee is invoked\n * with three arguments: (value, key, object). Iteratee functions may exit\n * iteration early by explicitly returning `false`.\n *\n * @static\n * @memberOf _\n * @since 0.3.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forInRight\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forIn(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed).\n */\n function forIn(object, iteratee) {\n return object == null\n ? object\n : baseFor(object, getIteratee(iteratee, 3), keysIn);\n }\n\n /**\n * This method is like `_.forIn` except that it iterates over properties of\n * `object` in the opposite order.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forIn\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forInRight(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'.\n */\n function forInRight(object, iteratee) {\n return object == null\n ? object\n : baseForRight(object, getIteratee(iteratee, 3), keysIn);\n }\n\n /**\n * Iterates over own enumerable string keyed properties of an object and\n * invokes `iteratee` for each property. The iteratee is invoked with three\n * arguments: (value, key, object). Iteratee functions may exit iteration\n * early by explicitly returning `false`.\n *\n * @static\n * @memberOf _\n * @since 0.3.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forOwnRight\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forOwn(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'a' then 'b' (iteration order is not guaranteed).\n */\n function forOwn(object, iteratee) {\n return object && baseForOwn(object, getIteratee(iteratee, 3));\n }\n\n /**\n * This method is like `_.forOwn` except that it iterates over properties of\n * `object` in the opposite order.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forOwn\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forOwnRight(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'.\n */\n function forOwnRight(object, iteratee) {\n return object && baseForOwnRight(object, getIteratee(iteratee, 3));\n }\n\n /**\n * Creates an array of function property names from own enumerable properties\n * of `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to inspect.\n * @returns {Array} Returns the function names.\n * @see _.functionsIn\n * @example\n *\n * function Foo() {\n * this.a = _.constant('a');\n * this.b = _.constant('b');\n * }\n *\n * Foo.prototype.c = _.constant('c');\n *\n * _.functions(new Foo);\n * // => ['a', 'b']\n */\n function functions(object) {\n return object == null ? [] : baseFunctions(object, keys(object));\n }\n\n /**\n * Creates an array of function property names from own and inherited\n * enumerable properties of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to inspect.\n * @returns {Array} Returns the function names.\n * @see _.functions\n * @example\n *\n * function Foo() {\n * this.a = _.constant('a');\n * this.b = _.constant('b');\n * }\n *\n * Foo.prototype.c = _.constant('c');\n *\n * _.functionsIn(new Foo);\n * // => ['a', 'b', 'c']\n */\n function functionsIn(object) {\n return object == null ? [] : baseFunctions(object, keysIn(object));\n }\n\n /**\n * Gets the value at `path` of `object`. If the resolved value is\n * `undefined`, the `defaultValue` is returned in its place.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.get(object, 'a[0].b.c');\n * // => 3\n *\n * _.get(object, ['a', '0', 'b', 'c']);\n * // => 3\n *\n * _.get(object, 'a.b.c', 'default');\n * // => 'default'\n */\n function get(object, path, defaultValue) {\n var result = object == null ? undefined : baseGet(object, path);\n return result === undefined ? defaultValue : result;\n }\n\n /**\n * Checks if `path` is a direct property of `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = { 'a': { 'b': 2 } };\n * var other = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.has(object, 'a');\n * // => true\n *\n * _.has(object, 'a.b');\n * // => true\n *\n * _.has(object, ['a', 'b']);\n * // => true\n *\n * _.has(other, 'a');\n * // => false\n */\n function has(object, path) {\n return object != null && hasPath(object, path, baseHas);\n }\n\n /**\n * Checks if `path` is a direct or inherited property of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.hasIn(object, 'a');\n * // => true\n *\n * _.hasIn(object, 'a.b');\n * // => true\n *\n * _.hasIn(object, ['a', 'b']);\n * // => true\n *\n * _.hasIn(object, 'b');\n * // => false\n */\n function hasIn(object, path) {\n return object != null && hasPath(object, path, baseHasIn);\n }\n\n /**\n * Creates an object composed of the inverted keys and values of `object`.\n * If `object` contains duplicate values, subsequent values overwrite\n * property assignments of previous values.\n *\n * @static\n * @memberOf _\n * @since 0.7.0\n * @category Object\n * @param {Object} object The object to invert.\n * @returns {Object} Returns the new inverted object.\n * @example\n *\n * var object = { 'a': 1, 'b': 2, 'c': 1 };\n *\n * _.invert(object);\n * // => { '1': 'c', '2': 'b' }\n */\n var invert = createInverter(function(result, value, key) {\n if (value != null &&\n typeof value.toString != 'function') {\n value = nativeObjectToString.call(value);\n }\n\n result[value] = key;\n }, constant(identity));\n\n /**\n * This method is like `_.invert` except that the inverted object is generated\n * from the results of running each element of `object` thru `iteratee`. The\n * corresponding inverted value of each inverted key is an array of keys\n * responsible for generating the inverted value. The iteratee is invoked\n * with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.1.0\n * @category Object\n * @param {Object} object The object to invert.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Object} Returns the new inverted object.\n * @example\n *\n * var object = { 'a': 1, 'b': 2, 'c': 1 };\n *\n * _.invertBy(object);\n * // => { '1': ['a', 'c'], '2': ['b'] }\n *\n * _.invertBy(object, function(value) {\n * return 'group' + value;\n * });\n * // => { 'group1': ['a', 'c'], 'group2': ['b'] }\n */\n var invertBy = createInverter(function(result, value, key) {\n if (value != null &&\n typeof value.toString != 'function') {\n value = nativeObjectToString.call(value);\n }\n\n if (hasOwnProperty.call(result, value)) {\n result[value].push(key);\n } else {\n result[value] = [key];\n }\n }, getIteratee);\n\n /**\n * Invokes the method at `path` of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the method to invoke.\n * @param {...*} [args] The arguments to invoke the method with.\n * @returns {*} Returns the result of the invoked method.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] };\n *\n * _.invoke(object, 'a[0].b.c.slice', 1, 3);\n * // => [2, 3]\n */\n var invoke = baseRest(baseInvoke);\n\n /**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\n function keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n }\n\n /**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\n function keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n }\n\n /**\n * The opposite of `_.mapValues`; this method creates an object with the\n * same values as `object` and keys generated by running each own enumerable\n * string keyed property of `object` thru `iteratee`. The iteratee is invoked\n * with three arguments: (value, key, object).\n *\n * @static\n * @memberOf _\n * @since 3.8.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns the new mapped object.\n * @see _.mapValues\n * @example\n *\n * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {\n * return key + value;\n * });\n * // => { 'a1': 1, 'b2': 2 }\n */\n function mapKeys(object, iteratee) {\n var result = {};\n iteratee = getIteratee(iteratee, 3);\n\n baseForOwn(object, function(value, key, object) {\n baseAssignValue(result, iteratee(value, key, object), value);\n });\n return result;\n }\n\n /**\n * Creates an object with the same keys as `object` and values generated\n * by running each own enumerable string keyed property of `object` thru\n * `iteratee`. The iteratee is invoked with three arguments:\n * (value, key, object).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns the new mapped object.\n * @see _.mapKeys\n * @example\n *\n * var users = {\n * 'fred': { 'user': 'fred', 'age': 40 },\n * 'pebbles': { 'user': 'pebbles', 'age': 1 }\n * };\n *\n * _.mapValues(users, function(o) { return o.age; });\n * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\n *\n * // The `_.property` iteratee shorthand.\n * _.mapValues(users, 'age');\n * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\n */\n function mapValues(object, iteratee) {\n var result = {};\n iteratee = getIteratee(iteratee, 3);\n\n baseForOwn(object, function(value, key, object) {\n baseAssignValue(result, key, iteratee(value, key, object));\n });\n return result;\n }\n\n /**\n * This method is like `_.assign` except that it recursively merges own and\n * inherited enumerable string keyed properties of source objects into the\n * destination object. Source properties that resolve to `undefined` are\n * skipped if a destination value exists. Array and plain object properties\n * are merged recursively. Other objects and value types are overridden by\n * assignment. Source objects are applied from left to right. Subsequent\n * sources overwrite property assignments of previous sources.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {\n * 'a': [{ 'b': 2 }, { 'd': 4 }]\n * };\n *\n * var other = {\n * 'a': [{ 'c': 3 }, { 'e': 5 }]\n * };\n *\n * _.merge(object, other);\n * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }\n */\n var merge = createAssigner(function(object, source, srcIndex) {\n baseMerge(object, source, srcIndex);\n });\n\n /**\n * This method is like `_.merge` except that it accepts `customizer` which\n * is invoked to produce the merged values of the destination and source\n * properties. If `customizer` returns `undefined`, merging is handled by the\n * method instead. The `customizer` is invoked with six arguments:\n * (objValue, srcValue, key, object, source, stack).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} sources The source objects.\n * @param {Function} customizer The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @example\n *\n * function customizer(objValue, srcValue) {\n * if (_.isArray(objValue)) {\n * return objValue.concat(srcValue);\n * }\n * }\n *\n * var object = { 'a': [1], 'b': [2] };\n * var other = { 'a': [3], 'b': [4] };\n *\n * _.mergeWith(object, other, customizer);\n * // => { 'a': [1, 3], 'b': [2, 4] }\n */\n var mergeWith = createAssigner(function(object, source, srcIndex, customizer) {\n baseMerge(object, source, srcIndex, customizer);\n });\n\n /**\n * The opposite of `_.pick`; this method creates an object composed of the\n * own and inherited enumerable property paths of `object` that are not omitted.\n *\n * **Note:** This method is considerably slower than `_.pick`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The source object.\n * @param {...(string|string[])} [paths] The property paths to omit.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.omit(object, ['a', 'c']);\n * // => { 'b': '2' }\n */\n var omit = flatRest(function(object, paths) {\n var result = {};\n if (object == null) {\n return result;\n }\n var isDeep = false;\n paths = arrayMap(paths, function(path) {\n path = castPath(path, object);\n isDeep || (isDeep = path.length > 1);\n return path;\n });\n copyObject(object, getAllKeysIn(object), result);\n if (isDeep) {\n result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);\n }\n var length = paths.length;\n while (length--) {\n baseUnset(result, paths[length]);\n }\n return result;\n });\n\n /**\n * The opposite of `_.pickBy`; this method creates an object composed of\n * the own and inherited enumerable string keyed properties of `object` that\n * `predicate` doesn't return truthy for. The predicate is invoked with two\n * arguments: (value, key).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The source object.\n * @param {Function} [predicate=_.identity] The function invoked per property.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.omitBy(object, _.isNumber);\n * // => { 'b': '2' }\n */\n function omitBy(object, predicate) {\n return pickBy(object, negate(getIteratee(predicate)));\n }\n\n /**\n * Creates an object composed of the picked `object` properties.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The source object.\n * @param {...(string|string[])} [paths] The property paths to pick.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.pick(object, ['a', 'c']);\n * // => { 'a': 1, 'c': 3 }\n */\n var pick = flatRest(function(object, paths) {\n return object == null ? {} : basePick(object, paths);\n });\n\n /**\n * Creates an object composed of the `object` properties `predicate` returns\n * truthy for. The predicate is invoked with two arguments: (value, key).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The source object.\n * @param {Function} [predicate=_.identity] The function invoked per property.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.pickBy(object, _.isNumber);\n * // => { 'a': 1, 'c': 3 }\n */\n function pickBy(object, predicate) {\n if (object == null) {\n return {};\n }\n var props = arrayMap(getAllKeysIn(object), function(prop) {\n return [prop];\n });\n predicate = getIteratee(predicate);\n return basePickBy(object, props, function(value, path) {\n return predicate(value, path[0]);\n });\n }\n\n /**\n * This method is like `_.get` except that if the resolved value is a\n * function it's invoked with the `this` binding of its parent object and\n * its result is returned.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to resolve.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };\n *\n * _.result(object, 'a[0].b.c1');\n * // => 3\n *\n * _.result(object, 'a[0].b.c2');\n * // => 4\n *\n * _.result(object, 'a[0].b.c3', 'default');\n * // => 'default'\n *\n * _.result(object, 'a[0].b.c3', _.constant('default'));\n * // => 'default'\n */\n function result(object, path, defaultValue) {\n path = castPath(path, object);\n\n var index = -1,\n length = path.length;\n\n // Ensure the loop is entered when path is empty.\n if (!length) {\n length = 1;\n object = undefined;\n }\n while (++index < length) {\n var value = object == null ? undefined : object[toKey(path[index])];\n if (value === undefined) {\n index = length;\n value = defaultValue;\n }\n object = isFunction(value) ? value.call(object) : value;\n }\n return object;\n }\n\n /**\n * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,\n * it's created. Arrays are created for missing index properties while objects\n * are created for all other missing properties. Use `_.setWith` to customize\n * `path` creation.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.set(object, 'a[0].b.c', 4);\n * console.log(object.a[0].b.c);\n * // => 4\n *\n * _.set(object, ['x', '0', 'y', 'z'], 5);\n * console.log(object.x[0].y.z);\n * // => 5\n */\n function set(object, path, value) {\n return object == null ? object : baseSet(object, path, value);\n }\n\n /**\n * This method is like `_.set` except that it accepts `customizer` which is\n * invoked to produce the objects of `path`. If `customizer` returns `undefined`\n * path creation is handled by the method instead. The `customizer` is invoked\n * with three arguments: (nsValue, key, nsObject).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @param {Function} [customizer] The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {};\n *\n * _.setWith(object, '[0][1]', 'a', Object);\n * // => { '0': { '1': 'a' } }\n */\n function setWith(object, path, value, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return object == null ? object : baseSet(object, path, value, customizer);\n }\n\n /**\n * Creates an array of own enumerable string keyed-value pairs for `object`\n * which can be consumed by `_.fromPairs`. If `object` is a map or set, its\n * entries are returned.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @alias entries\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the key-value pairs.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.toPairs(new Foo);\n * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed)\n */\n var toPairs = createToPairs(keys);\n\n /**\n * Creates an array of own and inherited enumerable string keyed-value pairs\n * for `object` which can be consumed by `_.fromPairs`. If `object` is a map\n * or set, its entries are returned.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @alias entriesIn\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the key-value pairs.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.toPairsIn(new Foo);\n * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed)\n */\n var toPairsIn = createToPairs(keysIn);\n\n /**\n * An alternative to `_.reduce`; this method transforms `object` to a new\n * `accumulator` object which is the result of running each of its own\n * enumerable string keyed properties thru `iteratee`, with each invocation\n * potentially mutating the `accumulator` object. If `accumulator` is not\n * provided, a new object with the same `[[Prototype]]` will be used. The\n * iteratee is invoked with four arguments: (accumulator, value, key, object).\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @static\n * @memberOf _\n * @since 1.3.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {*} [accumulator] The custom accumulator value.\n * @returns {*} Returns the accumulated value.\n * @example\n *\n * _.transform([2, 3, 4], function(result, n) {\n * result.push(n *= n);\n * return n % 2 == 0;\n * }, []);\n * // => [4, 9]\n *\n * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {\n * (result[value] || (result[value] = [])).push(key);\n * }, {});\n * // => { '1': ['a', 'c'], '2': ['b'] }\n */\n function transform(object, iteratee, accumulator) {\n var isArr = isArray(object),\n isArrLike = isArr || isBuffer(object) || isTypedArray(object);\n\n iteratee = getIteratee(iteratee, 4);\n if (accumulator == null) {\n var Ctor = object && object.constructor;\n if (isArrLike) {\n accumulator = isArr ? new Ctor : [];\n }\n else if (isObject(object)) {\n accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};\n }\n else {\n accumulator = {};\n }\n }\n (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) {\n return iteratee(accumulator, value, index, object);\n });\n return accumulator;\n }\n\n /**\n * Removes the property at `path` of `object`.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to unset.\n * @returns {boolean} Returns `true` if the property is deleted, else `false`.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 7 } }] };\n * _.unset(object, 'a[0].b.c');\n * // => true\n *\n * console.log(object);\n * // => { 'a': [{ 'b': {} }] };\n *\n * _.unset(object, ['a', '0', 'b', 'c']);\n * // => true\n *\n * console.log(object);\n * // => { 'a': [{ 'b': {} }] };\n */\n function unset(object, path) {\n return object == null ? true : baseUnset(object, path);\n }\n\n /**\n * This method is like `_.set` except that accepts `updater` to produce the\n * value to set. Use `_.updateWith` to customize `path` creation. The `updater`\n * is invoked with one argument: (value).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.6.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {Function} updater The function to produce the updated value.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.update(object, 'a[0].b.c', function(n) { return n * n; });\n * console.log(object.a[0].b.c);\n * // => 9\n *\n * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; });\n * console.log(object.x[0].y.z);\n * // => 0\n */\n function update(object, path, updater) {\n return object == null ? object : baseUpdate(object, path, castFunction(updater));\n }\n\n /**\n * This method is like `_.update` except that it accepts `customizer` which is\n * invoked to produce the objects of `path`. If `customizer` returns `undefined`\n * path creation is handled by the method instead. The `customizer` is invoked\n * with three arguments: (nsValue, key, nsObject).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.6.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {Function} updater The function to produce the updated value.\n * @param {Function} [customizer] The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {};\n *\n * _.updateWith(object, '[0][1]', _.constant('a'), Object);\n * // => { '0': { '1': 'a' } }\n */\n function updateWith(object, path, updater, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer);\n }\n\n /**\n * Creates an array of the own enumerable string keyed property values of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property values.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.values(new Foo);\n * // => [1, 2] (iteration order is not guaranteed)\n *\n * _.values('hi');\n * // => ['h', 'i']\n */\n function values(object) {\n return object == null ? [] : baseValues(object, keys(object));\n }\n\n /**\n * Creates an array of the own and inherited enumerable string keyed property\n * values of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property values.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.valuesIn(new Foo);\n * // => [1, 2, 3] (iteration order is not guaranteed)\n */\n function valuesIn(object) {\n return object == null ? [] : baseValues(object, keysIn(object));\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Clamps `number` within the inclusive `lower` and `upper` bounds.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Number\n * @param {number} number The number to clamp.\n * @param {number} [lower] The lower bound.\n * @param {number} upper The upper bound.\n * @returns {number} Returns the clamped number.\n * @example\n *\n * _.clamp(-10, -5, 5);\n * // => -5\n *\n * _.clamp(10, -5, 5);\n * // => 5\n */\n function clamp(number, lower, upper) {\n if (upper === undefined) {\n upper = lower;\n lower = undefined;\n }\n if (upper !== undefined) {\n upper = toNumber(upper);\n upper = upper === upper ? upper : 0;\n }\n if (lower !== undefined) {\n lower = toNumber(lower);\n lower = lower === lower ? lower : 0;\n }\n return baseClamp(toNumber(number), lower, upper);\n }\n\n /**\n * Checks if `n` is between `start` and up to, but not including, `end`. If\n * `end` is not specified, it's set to `start` with `start` then set to `0`.\n * If `start` is greater than `end` the params are swapped to support\n * negative ranges.\n *\n * @static\n * @memberOf _\n * @since 3.3.0\n * @category Number\n * @param {number} number The number to check.\n * @param {number} [start=0] The start of the range.\n * @param {number} end The end of the range.\n * @returns {boolean} Returns `true` if `number` is in the range, else `false`.\n * @see _.range, _.rangeRight\n * @example\n *\n * _.inRange(3, 2, 4);\n * // => true\n *\n * _.inRange(4, 8);\n * // => true\n *\n * _.inRange(4, 2);\n * // => false\n *\n * _.inRange(2, 2);\n * // => false\n *\n * _.inRange(1.2, 2);\n * // => true\n *\n * _.inRange(5.2, 4);\n * // => false\n *\n * _.inRange(-3, -2, -6);\n * // => true\n */\n function inRange(number, start, end) {\n start = toFinite(start);\n if (end === undefined) {\n end = start;\n start = 0;\n } else {\n end = toFinite(end);\n }\n number = toNumber(number);\n return baseInRange(number, start, end);\n }\n\n /**\n * Produces a random number between the inclusive `lower` and `upper` bounds.\n * If only one argument is provided a number between `0` and the given number\n * is returned. If `floating` is `true`, or either `lower` or `upper` are\n * floats, a floating-point number is returned instead of an integer.\n *\n * **Note:** JavaScript follows the IEEE-754 standard for resolving\n * floating-point values which can produce unexpected results.\n *\n * @static\n * @memberOf _\n * @since 0.7.0\n * @category Number\n * @param {number} [lower=0] The lower bound.\n * @param {number} [upper=1] The upper bound.\n * @param {boolean} [floating] Specify returning a floating-point number.\n * @returns {number} Returns the random number.\n * @example\n *\n * _.random(0, 5);\n * // => an integer between 0 and 5\n *\n * _.random(5);\n * // => also an integer between 0 and 5\n *\n * _.random(5, true);\n * // => a floating-point number between 0 and 5\n *\n * _.random(1.2, 5.2);\n * // => a floating-point number between 1.2 and 5.2\n */\n function random(lower, upper, floating) {\n if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) {\n upper = floating = undefined;\n }\n if (floating === undefined) {\n if (typeof upper == 'boolean') {\n floating = upper;\n upper = undefined;\n }\n else if (typeof lower == 'boolean') {\n floating = lower;\n lower = undefined;\n }\n }\n if (lower === undefined && upper === undefined) {\n lower = 0;\n upper = 1;\n }\n else {\n lower = toFinite(lower);\n if (upper === undefined) {\n upper = lower;\n lower = 0;\n } else {\n upper = toFinite(upper);\n }\n }\n if (lower > upper) {\n var temp = lower;\n lower = upper;\n upper = temp;\n }\n if (floating || lower % 1 || upper % 1) {\n var rand = nativeRandom();\n return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper);\n }\n return baseRandom(lower, upper);\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the camel cased string.\n * @example\n *\n * _.camelCase('Foo Bar');\n * // => 'fooBar'\n *\n * _.camelCase('--foo-bar--');\n * // => 'fooBar'\n *\n * _.camelCase('__FOO_BAR__');\n * // => 'fooBar'\n */\n var camelCase = createCompounder(function(result, word, index) {\n word = word.toLowerCase();\n return result + (index ? capitalize(word) : word);\n });\n\n /**\n * Converts the first character of `string` to upper case and the remaining\n * to lower case.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to capitalize.\n * @returns {string} Returns the capitalized string.\n * @example\n *\n * _.capitalize('FRED');\n * // => 'Fred'\n */\n function capitalize(string) {\n return upperFirst(toString(string).toLowerCase());\n }\n\n /**\n * Deburrs `string` by converting\n * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)\n * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)\n * letters to basic Latin letters and removing\n * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to deburr.\n * @returns {string} Returns the deburred string.\n * @example\n *\n * _.deburr('déjà vu');\n * // => 'deja vu'\n */\n function deburr(string) {\n string = toString(string);\n return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');\n }\n\n /**\n * Checks if `string` ends with the given target string.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to inspect.\n * @param {string} [target] The string to search for.\n * @param {number} [position=string.length] The position to search up to.\n * @returns {boolean} Returns `true` if `string` ends with `target`,\n * else `false`.\n * @example\n *\n * _.endsWith('abc', 'c');\n * // => true\n *\n * _.endsWith('abc', 'b');\n * // => false\n *\n * _.endsWith('abc', 'b', 2);\n * // => true\n */\n function endsWith(string, target, position) {\n string = toString(string);\n target = baseToString(target);\n\n var length = string.length;\n position = position === undefined\n ? length\n : baseClamp(toInteger(position), 0, length);\n\n var end = position;\n position -= target.length;\n return position >= 0 && string.slice(position, end) == target;\n }\n\n /**\n * Converts the characters \"&\", \"<\", \">\", '\"', and \"'\" in `string` to their\n * corresponding HTML entities.\n *\n * **Note:** No other characters are escaped. To escape additional\n * characters use a third-party library like [_he_](https://mths.be/he).\n *\n * Though the \">\" character is escaped for symmetry, characters like\n * \">\" and \"/\" don't need escaping in HTML and have no special meaning\n * unless they're part of a tag or unquoted attribute value. See\n * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)\n * (under \"semi-related fun fact\") for more details.\n *\n * When working with HTML you should always\n * [quote attribute values](http://wonko.com/post/html-escaping) to reduce\n * XSS vectors.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category String\n * @param {string} [string=''] The string to escape.\n * @returns {string} Returns the escaped string.\n * @example\n *\n * _.escape('fred, barney, & pebbles');\n * // => 'fred, barney, & pebbles'\n */\n function escape(string) {\n string = toString(string);\n return (string && reHasUnescapedHtml.test(string))\n ? string.replace(reUnescapedHtml, escapeHtmlChar)\n : string;\n }\n\n /**\n * Escapes the `RegExp` special characters \"^\", \"$\", \"\\\", \".\", \"*\", \"+\",\n * \"?\", \"(\", \")\", \"[\", \"]\", \"{\", \"}\", and \"|\" in `string`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to escape.\n * @returns {string} Returns the escaped string.\n * @example\n *\n * _.escapeRegExp('[lodash](https://lodash.com/)');\n * // => '\\[lodash\\]\\(https://lodash\\.com/\\)'\n */\n function escapeRegExp(string) {\n string = toString(string);\n return (string && reHasRegExpChar.test(string))\n ? string.replace(reRegExpChar, '\\\\$&')\n : string;\n }\n\n /**\n * Converts `string` to\n * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the kebab cased string.\n * @example\n *\n * _.kebabCase('Foo Bar');\n * // => 'foo-bar'\n *\n * _.kebabCase('fooBar');\n * // => 'foo-bar'\n *\n * _.kebabCase('__FOO_BAR__');\n * // => 'foo-bar'\n */\n var kebabCase = createCompounder(function(result, word, index) {\n return result + (index ? '-' : '') + word.toLowerCase();\n });\n\n /**\n * Converts `string`, as space separated words, to lower case.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the lower cased string.\n * @example\n *\n * _.lowerCase('--Foo-Bar--');\n * // => 'foo bar'\n *\n * _.lowerCase('fooBar');\n * // => 'foo bar'\n *\n * _.lowerCase('__FOO_BAR__');\n * // => 'foo bar'\n */\n var lowerCase = createCompounder(function(result, word, index) {\n return result + (index ? ' ' : '') + word.toLowerCase();\n });\n\n /**\n * Converts the first character of `string` to lower case.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.lowerFirst('Fred');\n * // => 'fred'\n *\n * _.lowerFirst('FRED');\n * // => 'fRED'\n */\n var lowerFirst = createCaseFirst('toLowerCase');\n\n /**\n * Pads `string` on the left and right sides if it's shorter than `length`.\n * Padding characters are truncated if they can't be evenly divided by `length`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to pad.\n * @param {number} [length=0] The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padded string.\n * @example\n *\n * _.pad('abc', 8);\n * // => ' abc '\n *\n * _.pad('abc', 8, '_-');\n * // => '_-abc_-_'\n *\n * _.pad('abc', 3);\n * // => 'abc'\n */\n function pad(string, length, chars) {\n string = toString(string);\n length = toInteger(length);\n\n var strLength = length ? stringSize(string) : 0;\n if (!length || strLength >= length) {\n return string;\n }\n var mid = (length - strLength) / 2;\n return (\n createPadding(nativeFloor(mid), chars) +\n string +\n createPadding(nativeCeil(mid), chars)\n );\n }\n\n /**\n * Pads `string` on the right side if it's shorter than `length`. Padding\n * characters are truncated if they exceed `length`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to pad.\n * @param {number} [length=0] The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padded string.\n * @example\n *\n * _.padEnd('abc', 6);\n * // => 'abc '\n *\n * _.padEnd('abc', 6, '_-');\n * // => 'abc_-_'\n *\n * _.padEnd('abc', 3);\n * // => 'abc'\n */\n function padEnd(string, length, chars) {\n string = toString(string);\n length = toInteger(length);\n\n var strLength = length ? stringSize(string) : 0;\n return (length && strLength < length)\n ? (string + createPadding(length - strLength, chars))\n : string;\n }\n\n /**\n * Pads `string` on the left side if it's shorter than `length`. Padding\n * characters are truncated if they exceed `length`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to pad.\n * @param {number} [length=0] The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padded string.\n * @example\n *\n * _.padStart('abc', 6);\n * // => ' abc'\n *\n * _.padStart('abc', 6, '_-');\n * // => '_-_abc'\n *\n * _.padStart('abc', 3);\n * // => 'abc'\n */\n function padStart(string, length, chars) {\n string = toString(string);\n length = toInteger(length);\n\n var strLength = length ? stringSize(string) : 0;\n return (length && strLength < length)\n ? (createPadding(length - strLength, chars) + string)\n : string;\n }\n\n /**\n * Converts `string` to an integer of the specified radix. If `radix` is\n * `undefined` or `0`, a `radix` of `10` is used unless `value` is a\n * hexadecimal, in which case a `radix` of `16` is used.\n *\n * **Note:** This method aligns with the\n * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category String\n * @param {string} string The string to convert.\n * @param {number} [radix=10] The radix to interpret `value` by.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.parseInt('08');\n * // => 8\n *\n * _.map(['6', '08', '10'], _.parseInt);\n * // => [6, 8, 10]\n */\n function parseInt(string, radix, guard) {\n if (guard || radix == null) {\n radix = 0;\n } else if (radix) {\n radix = +radix;\n }\n return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0);\n }\n\n /**\n * Repeats the given string `n` times.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to repeat.\n * @param {number} [n=1] The number of times to repeat the string.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {string} Returns the repeated string.\n * @example\n *\n * _.repeat('*', 3);\n * // => '***'\n *\n * _.repeat('abc', 2);\n * // => 'abcabc'\n *\n * _.repeat('abc', 0);\n * // => ''\n */\n function repeat(string, n, guard) {\n if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) {\n n = 1;\n } else {\n n = toInteger(n);\n }\n return baseRepeat(toString(string), n);\n }\n\n /**\n * Replaces matches for `pattern` in `string` with `replacement`.\n *\n * **Note:** This method is based on\n * [`String#replace`](https://mdn.io/String/replace).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to modify.\n * @param {RegExp|string} pattern The pattern to replace.\n * @param {Function|string} replacement The match replacement.\n * @returns {string} Returns the modified string.\n * @example\n *\n * _.replace('Hi Fred', 'Fred', 'Barney');\n * // => 'Hi Barney'\n */\n function replace() {\n var args = arguments,\n string = toString(args[0]);\n\n return args.length < 3 ? string : string.replace(args[1], args[2]);\n }\n\n /**\n * Converts `string` to\n * [snake case](https://en.wikipedia.org/wiki/Snake_case).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the snake cased string.\n * @example\n *\n * _.snakeCase('Foo Bar');\n * // => 'foo_bar'\n *\n * _.snakeCase('fooBar');\n * // => 'foo_bar'\n *\n * _.snakeCase('--FOO-BAR--');\n * // => 'foo_bar'\n */\n var snakeCase = createCompounder(function(result, word, index) {\n return result + (index ? '_' : '') + word.toLowerCase();\n });\n\n /**\n * Splits `string` by `separator`.\n *\n * **Note:** This method is based on\n * [`String#split`](https://mdn.io/String/split).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to split.\n * @param {RegExp|string} separator The separator pattern to split by.\n * @param {number} [limit] The length to truncate results to.\n * @returns {Array} Returns the string segments.\n * @example\n *\n * _.split('a-b-c', '-', 2);\n * // => ['a', 'b']\n */\n function split(string, separator, limit) {\n if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) {\n separator = limit = undefined;\n }\n limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0;\n if (!limit) {\n return [];\n }\n string = toString(string);\n if (string && (\n typeof separator == 'string' ||\n (separator != null && !isRegExp(separator))\n )) {\n separator = baseToString(separator);\n if (!separator && hasUnicode(string)) {\n return castSlice(stringToArray(string), 0, limit);\n }\n }\n return string.split(separator, limit);\n }\n\n /**\n * Converts `string` to\n * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage).\n *\n * @static\n * @memberOf _\n * @since 3.1.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the start cased string.\n * @example\n *\n * _.startCase('--foo-bar--');\n * // => 'Foo Bar'\n *\n * _.startCase('fooBar');\n * // => 'Foo Bar'\n *\n * _.startCase('__FOO_BAR__');\n * // => 'FOO BAR'\n */\n var startCase = createCompounder(function(result, word, index) {\n return result + (index ? ' ' : '') + upperFirst(word);\n });\n\n /**\n * Checks if `string` starts with the given target string.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to inspect.\n * @param {string} [target] The string to search for.\n * @param {number} [position=0] The position to search from.\n * @returns {boolean} Returns `true` if `string` starts with `target`,\n * else `false`.\n * @example\n *\n * _.startsWith('abc', 'a');\n * // => true\n *\n * _.startsWith('abc', 'b');\n * // => false\n *\n * _.startsWith('abc', 'b', 1);\n * // => true\n */\n function startsWith(string, target, position) {\n string = toString(string);\n position = position == null\n ? 0\n : baseClamp(toInteger(position), 0, string.length);\n\n target = baseToString(target);\n return string.slice(position, position + target.length) == target;\n }\n\n /**\n * Creates a compiled template function that can interpolate data properties\n * in \"interpolate\" delimiters, HTML-escape interpolated data properties in\n * \"escape\" delimiters, and execute JavaScript in \"evaluate\" delimiters. Data\n * properties may be accessed as free variables in the template. If a setting\n * object is given, it takes precedence over `_.templateSettings` values.\n *\n * **Note:** In the development build `_.template` utilizes\n * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)\n * for easier debugging.\n *\n * For more information on precompiling templates see\n * [lodash's custom builds documentation](https://lodash.com/custom-builds).\n *\n * For more information on Chrome extension sandboxes see\n * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category String\n * @param {string} [string=''] The template string.\n * @param {Object} [options={}] The options object.\n * @param {RegExp} [options.escape=_.templateSettings.escape]\n * The HTML \"escape\" delimiter.\n * @param {RegExp} [options.evaluate=_.templateSettings.evaluate]\n * The \"evaluate\" delimiter.\n * @param {Object} [options.imports=_.templateSettings.imports]\n * An object to import into the template as free variables.\n * @param {RegExp} [options.interpolate=_.templateSettings.interpolate]\n * The \"interpolate\" delimiter.\n * @param {string} [options.sourceURL='lodash.templateSources[n]']\n * The sourceURL of the compiled template.\n * @param {string} [options.variable='obj']\n * The data object variable name.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the compiled template function.\n * @example\n *\n * // Use the \"interpolate\" delimiter to create a compiled template.\n * var compiled = _.template('hello <%= user %>!');\n * compiled({ 'user': 'fred' });\n * // => 'hello fred!'\n *\n * // Use the HTML \"escape\" delimiter to escape data property values.\n * var compiled = _.template('<b><%- value %></b>');\n * compiled({ 'value': '<script>' });\n * // => '<b><script></b>'\n *\n * // Use the \"evaluate\" delimiter to execute JavaScript and generate HTML.\n * var compiled = _.template('<% _.forEach(users, function(user) { %><li><%- user %></li><% }); %>');\n * compiled({ 'users': ['fred', 'barney'] });\n * // => '<li>fred</li><li>barney</li>'\n *\n * // Use the internal `print` function in \"evaluate\" delimiters.\n * var compiled = _.template('<% print(\"hello \" + user); %>!');\n * compiled({ 'user': 'barney' });\n * // => 'hello barney!'\n *\n * // Use the ES template literal delimiter as an \"interpolate\" delimiter.\n * // Disable support by replacing the \"interpolate\" delimiter.\n * var compiled = _.template('hello ${ user }!');\n * compiled({ 'user': 'pebbles' });\n * // => 'hello pebbles!'\n *\n * // Use backslashes to treat delimiters as plain text.\n * var compiled = _.template('<%= \"\\\\<%- value %\\\\>\" %>');\n * compiled({ 'value': 'ignored' });\n * // => '<%- value %>'\n *\n * // Use the `imports` option to import `jQuery` as `jq`.\n * var text = '<% jq.each(users, function(user) { %><li><%- user %></li><% }); %>';\n * var compiled = _.template(text, { 'imports': { 'jq': jQuery } });\n * compiled({ 'users': ['fred', 'barney'] });\n * // => '<li>fred</li><li>barney</li>'\n *\n * // Use the `sourceURL` option to specify a custom sourceURL for the template.\n * var compiled = _.template('hello <%= user %>!', { 'sourceURL': '/basic/greeting.jst' });\n * compiled(data);\n * // => Find the source of \"greeting.jst\" under the Sources tab or Resources panel of the web inspector.\n *\n * // Use the `variable` option to ensure a with-statement isn't used in the compiled template.\n * var compiled = _.template('hi <%= data.user %>!', { 'variable': 'data' });\n * compiled.source;\n * // => function(data) {\n * // var __t, __p = '';\n * // __p += 'hi ' + ((__t = ( data.user )) == null ? '' : __t) + '!';\n * // return __p;\n * // }\n *\n * // Use custom template delimiters.\n * _.templateSettings.interpolate = /{{([\\s\\S]+?)}}/g;\n * var compiled = _.template('hello {{ user }}!');\n * compiled({ 'user': 'mustache' });\n * // => 'hello mustache!'\n *\n * // Use the `source` property to inline compiled templates for meaningful\n * // line numbers in error messages and stack traces.\n * fs.writeFileSync(path.join(process.cwd(), 'jst.js'), '\\\n * var JST = {\\\n * \"main\": ' + _.template(mainText).source + '\\\n * };\\\n * ');\n */\n function template(string, options, guard) {\n // Based on John Resig's `tmpl` implementation\n // (http://ejohn.org/blog/javascript-micro-templating/)\n // and Laura Doktorova's doT.js (https://github.com/olado/doT).\n var settings = lodash.templateSettings;\n\n if (guard && isIterateeCall(string, options, guard)) {\n options = undefined;\n }\n string = toString(string);\n options = assignInWith({}, options, settings, customDefaultsAssignIn);\n\n var imports = assignInWith({}, options.imports, settings.imports, customDefaultsAssignIn),\n importsKeys = keys(imports),\n importsValues = baseValues(imports, importsKeys);\n\n var isEscaping,\n isEvaluating,\n index = 0,\n interpolate = options.interpolate || reNoMatch,\n source = \"__p += '\";\n\n // Compile the regexp to match each delimiter.\n var reDelimiters = RegExp(\n (options.escape || reNoMatch).source + '|' +\n interpolate.source + '|' +\n (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + '|' +\n (options.evaluate || reNoMatch).source + '|$'\n , 'g');\n\n // Use a sourceURL for easier debugging.\n // The sourceURL gets injected into the source that's eval-ed, so be careful\n // to normalize all kinds of whitespace, so e.g. newlines (and unicode versions of it) can't sneak in\n // and escape the comment, thus injecting code that gets evaled.\n var sourceURL = '//# sourceURL=' +\n (hasOwnProperty.call(options, 'sourceURL')\n ? (options.sourceURL + '').replace(/\\s/g, ' ')\n : ('lodash.templateSources[' + (++templateCounter) + ']')\n ) + '\\n';\n\n string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) {\n interpolateValue || (interpolateValue = esTemplateValue);\n\n // Escape characters that can't be included in string literals.\n source += string.slice(index, offset).replace(reUnescapedString, escapeStringChar);\n\n // Replace delimiters with snippets.\n if (escapeValue) {\n isEscaping = true;\n source += \"' +\\n__e(\" + escapeValue + \") +\\n'\";\n }\n if (evaluateValue) {\n isEvaluating = true;\n source += \"';\\n\" + evaluateValue + \";\\n__p += '\";\n }\n if (interpolateValue) {\n source += \"' +\\n((__t = (\" + interpolateValue + \")) == null ? '' : __t) +\\n'\";\n }\n index = offset + match.length;\n\n // The JS engine embedded in Adobe products needs `match` returned in\n // order to produce the correct `offset` value.\n return match;\n });\n\n source += \"';\\n\";\n\n // If `variable` is not specified wrap a with-statement around the generated\n // code to add the data object to the top of the scope chain.\n var variable = hasOwnProperty.call(options, 'variable') && options.variable;\n if (!variable) {\n source = 'with (obj) {\\n' + source + '\\n}\\n';\n }\n // Throw an error if a forbidden character was found in `variable`, to prevent\n // potential command injection attacks.\n else if (reForbiddenIdentifierChars.test(variable)) {\n throw new Error(INVALID_TEMPL_VAR_ERROR_TEXT);\n }\n\n // Cleanup code by stripping empty strings.\n source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source)\n .replace(reEmptyStringMiddle, '$1')\n .replace(reEmptyStringTrailing, '$1;');\n\n // Frame code as the function body.\n source = 'function(' + (variable || 'obj') + ') {\\n' +\n (variable\n ? ''\n : 'obj || (obj = {});\\n'\n ) +\n \"var __t, __p = ''\" +\n (isEscaping\n ? ', __e = _.escape'\n : ''\n ) +\n (isEvaluating\n ? ', __j = Array.prototype.join;\\n' +\n \"function print() { __p += __j.call(arguments, '') }\\n\"\n : ';\\n'\n ) +\n source +\n 'return __p\\n}';\n\n var result = attempt(function() {\n return Function(importsKeys, sourceURL + 'return ' + source)\n .apply(undefined, importsValues);\n });\n\n // Provide the compiled function's source by its `toString` method or\n // the `source` property as a convenience for inlining compiled templates.\n result.source = source;\n if (isError(result)) {\n throw result;\n }\n return result;\n }\n\n /**\n * Converts `string`, as a whole, to lower case just like\n * [String#toLowerCase](https://mdn.io/toLowerCase).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the lower cased string.\n * @example\n *\n * _.toLower('--Foo-Bar--');\n * // => '--foo-bar--'\n *\n * _.toLower('fooBar');\n * // => 'foobar'\n *\n * _.toLower('__FOO_BAR__');\n * // => '__foo_bar__'\n */\n function toLower(value) {\n return toString(value).toLowerCase();\n }\n\n /**\n * Converts `string`, as a whole, to upper case just like\n * [String#toUpperCase](https://mdn.io/toUpperCase).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the upper cased string.\n * @example\n *\n * _.toUpper('--foo-bar--');\n * // => '--FOO-BAR--'\n *\n * _.toUpper('fooBar');\n * // => 'FOOBAR'\n *\n * _.toUpper('__foo_bar__');\n * // => '__FOO_BAR__'\n */\n function toUpper(value) {\n return toString(value).toUpperCase();\n }\n\n /**\n * Removes leading and trailing whitespace or specified characters from `string`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to trim.\n * @param {string} [chars=whitespace] The characters to trim.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {string} Returns the trimmed string.\n * @example\n *\n * _.trim(' abc ');\n * // => 'abc'\n *\n * _.trim('-_-abc-_-', '_-');\n * // => 'abc'\n *\n * _.map([' foo ', ' bar '], _.trim);\n * // => ['foo', 'bar']\n */\n function trim(string, chars, guard) {\n string = toString(string);\n if (string && (guard || chars === undefined)) {\n return baseTrim(string);\n }\n if (!string || !(chars = baseToString(chars))) {\n return string;\n }\n var strSymbols = stringToArray(string),\n chrSymbols = stringToArray(chars),\n start = charsStartIndex(strSymbols, chrSymbols),\n end = charsEndIndex(strSymbols, chrSymbols) + 1;\n\n return castSlice(strSymbols, start, end).join('');\n }\n\n /**\n * Removes trailing whitespace or specified characters from `string`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to trim.\n * @param {string} [chars=whitespace] The characters to trim.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {string} Returns the trimmed string.\n * @example\n *\n * _.trimEnd(' abc ');\n * // => ' abc'\n *\n * _.trimEnd('-_-abc-_-', '_-');\n * // => '-_-abc'\n */\n function trimEnd(string, chars, guard) {\n string = toString(string);\n if (string && (guard || chars === undefined)) {\n return string.slice(0, trimmedEndIndex(string) + 1);\n }\n if (!string || !(chars = baseToString(chars))) {\n return string;\n }\n var strSymbols = stringToArray(string),\n end = charsEndIndex(strSymbols, stringToArray(chars)) + 1;\n\n return castSlice(strSymbols, 0, end).join('');\n }\n\n /**\n * Removes leading whitespace or specified characters from `string`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to trim.\n * @param {string} [chars=whitespace] The characters to trim.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {string} Returns the trimmed string.\n * @example\n *\n * _.trimStart(' abc ');\n * // => 'abc '\n *\n * _.trimStart('-_-abc-_-', '_-');\n * // => 'abc-_-'\n */\n function trimStart(string, chars, guard) {\n string = toString(string);\n if (string && (guard || chars === undefined)) {\n return string.replace(reTrimStart, '');\n }\n if (!string || !(chars = baseToString(chars))) {\n return string;\n }\n var strSymbols = stringToArray(string),\n start = charsStartIndex(strSymbols, stringToArray(chars));\n\n return castSlice(strSymbols, start).join('');\n }\n\n /**\n * Truncates `string` if it's longer than the given maximum string length.\n * The last characters of the truncated string are replaced with the omission\n * string which defaults to \"...\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to truncate.\n * @param {Object} [options={}] The options object.\n * @param {number} [options.length=30] The maximum string length.\n * @param {string} [options.omission='...'] The string to indicate text is omitted.\n * @param {RegExp|string} [options.separator] The separator pattern to truncate to.\n * @returns {string} Returns the truncated string.\n * @example\n *\n * _.truncate('hi-diddly-ho there, neighborino');\n * // => 'hi-diddly-ho there, neighbo...'\n *\n * _.truncate('hi-diddly-ho there, neighborino', {\n * 'length': 24,\n * 'separator': ' '\n * });\n * // => 'hi-diddly-ho there,...'\n *\n * _.truncate('hi-diddly-ho there, neighborino', {\n * 'length': 24,\n * 'separator': /,? +/\n * });\n * // => 'hi-diddly-ho there...'\n *\n * _.truncate('hi-diddly-ho there, neighborino', {\n * 'omission': ' [...]'\n * });\n * // => 'hi-diddly-ho there, neig [...]'\n */\n function truncate(string, options) {\n var length = DEFAULT_TRUNC_LENGTH,\n omission = DEFAULT_TRUNC_OMISSION;\n\n if (isObject(options)) {\n var separator = 'separator' in options ? options.separator : separator;\n length = 'length' in options ? toInteger(options.length) : length;\n omission = 'omission' in options ? baseToString(options.omission) : omission;\n }\n string = toString(string);\n\n var strLength = string.length;\n if (hasUnicode(string)) {\n var strSymbols = stringToArray(string);\n strLength = strSymbols.length;\n }\n if (length >= strLength) {\n return string;\n }\n var end = length - stringSize(omission);\n if (end < 1) {\n return omission;\n }\n var result = strSymbols\n ? castSlice(strSymbols, 0, end).join('')\n : string.slice(0, end);\n\n if (separator === undefined) {\n return result + omission;\n }\n if (strSymbols) {\n end += (result.length - end);\n }\n if (isRegExp(separator)) {\n if (string.slice(end).search(separator)) {\n var match,\n substring = result;\n\n if (!separator.global) {\n separator = RegExp(separator.source, toString(reFlags.exec(separator)) + 'g');\n }\n separator.lastIndex = 0;\n while ((match = separator.exec(substring))) {\n var newEnd = match.index;\n }\n result = result.slice(0, newEnd === undefined ? end : newEnd);\n }\n } else if (string.indexOf(baseToString(separator), end) != end) {\n var index = result.lastIndexOf(separator);\n if (index > -1) {\n result = result.slice(0, index);\n }\n }\n return result + omission;\n }\n\n /**\n * The inverse of `_.escape`; this method converts the HTML entities\n * `&`, `<`, `>`, `"`, and `'` in `string` to\n * their corresponding characters.\n *\n * **Note:** No other HTML entities are unescaped. To unescape additional\n * HTML entities use a third-party library like [_he_](https://mths.be/he).\n *\n * @static\n * @memberOf _\n * @since 0.6.0\n * @category String\n * @param {string} [string=''] The string to unescape.\n * @returns {string} Returns the unescaped string.\n * @example\n *\n * _.unescape('fred, barney, & pebbles');\n * // => 'fred, barney, & pebbles'\n */\n function unescape(string) {\n string = toString(string);\n return (string && reHasEscapedHtml.test(string))\n ? string.replace(reEscapedHtml, unescapeHtmlChar)\n : string;\n }\n\n /**\n * Converts `string`, as space separated words, to upper case.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the upper cased string.\n * @example\n *\n * _.upperCase('--foo-bar');\n * // => 'FOO BAR'\n *\n * _.upperCase('fooBar');\n * // => 'FOO BAR'\n *\n * _.upperCase('__foo_bar__');\n * // => 'FOO BAR'\n */\n var upperCase = createCompounder(function(result, word, index) {\n return result + (index ? ' ' : '') + word.toUpperCase();\n });\n\n /**\n * Converts the first character of `string` to upper case.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.upperFirst('fred');\n * // => 'Fred'\n *\n * _.upperFirst('FRED');\n * // => 'FRED'\n */\n var upperFirst = createCaseFirst('toUpperCase');\n\n /**\n * Splits `string` into an array of its words.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to inspect.\n * @param {RegExp|string} [pattern] The pattern to match words.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the words of `string`.\n * @example\n *\n * _.words('fred, barney, & pebbles');\n * // => ['fred', 'barney', 'pebbles']\n *\n * _.words('fred, barney, & pebbles', /[^, ]+/g);\n * // => ['fred', 'barney', '&', 'pebbles']\n */\n function words(string, pattern, guard) {\n string = toString(string);\n pattern = guard ? undefined : pattern;\n\n if (pattern === undefined) {\n return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);\n }\n return string.match(pattern) || [];\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Attempts to invoke `func`, returning either the result or the caught error\n * object. Any additional arguments are provided to `func` when it's invoked.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Util\n * @param {Function} func The function to attempt.\n * @param {...*} [args] The arguments to invoke `func` with.\n * @returns {*} Returns the `func` result or error object.\n * @example\n *\n * // Avoid throwing errors for invalid selectors.\n * var elements = _.attempt(function(selector) {\n * return document.querySelectorAll(selector);\n * }, '>_>');\n *\n * if (_.isError(elements)) {\n * elements = [];\n * }\n */\n var attempt = baseRest(function(func, args) {\n try {\n return apply(func, undefined, args);\n } catch (e) {\n return isError(e) ? e : new Error(e);\n }\n });\n\n /**\n * Binds methods of an object to the object itself, overwriting the existing\n * method.\n *\n * **Note:** This method doesn't set the \"length\" property of bound functions.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {Object} object The object to bind and assign the bound methods to.\n * @param {...(string|string[])} methodNames The object method names to bind.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var view = {\n * 'label': 'docs',\n * 'click': function() {\n * console.log('clicked ' + this.label);\n * }\n * };\n *\n * _.bindAll(view, ['click']);\n * jQuery(element).on('click', view.click);\n * // => Logs 'clicked docs' when clicked.\n */\n var bindAll = flatRest(function(object, methodNames) {\n arrayEach(methodNames, function(key) {\n key = toKey(key);\n baseAssignValue(object, key, bind(object[key], object));\n });\n return object;\n });\n\n /**\n * Creates a function that iterates over `pairs` and invokes the corresponding\n * function of the first predicate to return truthy. The predicate-function\n * pairs are invoked with the `this` binding and arguments of the created\n * function.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Util\n * @param {Array} pairs The predicate-function pairs.\n * @returns {Function} Returns the new composite function.\n * @example\n *\n * var func = _.cond([\n * [_.matches({ 'a': 1 }), _.constant('matches A')],\n * [_.conforms({ 'b': _.isNumber }), _.constant('matches B')],\n * [_.stubTrue, _.constant('no match')]\n * ]);\n *\n * func({ 'a': 1, 'b': 2 });\n * // => 'matches A'\n *\n * func({ 'a': 0, 'b': 1 });\n * // => 'matches B'\n *\n * func({ 'a': '1', 'b': '2' });\n * // => 'no match'\n */\n function cond(pairs) {\n var length = pairs == null ? 0 : pairs.length,\n toIteratee = getIteratee();\n\n pairs = !length ? [] : arrayMap(pairs, function(pair) {\n if (typeof pair[1] != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n return [toIteratee(pair[0]), pair[1]];\n });\n\n return baseRest(function(args) {\n var index = -1;\n while (++index < length) {\n var pair = pairs[index];\n if (apply(pair[0], this, args)) {\n return apply(pair[1], this, args);\n }\n }\n });\n }\n\n /**\n * Creates a function that invokes the predicate properties of `source` with\n * the corresponding property values of a given object, returning `true` if\n * all predicates return truthy, else `false`.\n *\n * **Note:** The created function is equivalent to `_.conformsTo` with\n * `source` partially applied.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Util\n * @param {Object} source The object of property predicates to conform to.\n * @returns {Function} Returns the new spec function.\n * @example\n *\n * var objects = [\n * { 'a': 2, 'b': 1 },\n * { 'a': 1, 'b': 2 }\n * ];\n *\n * _.filter(objects, _.conforms({ 'b': function(n) { return n > 1; } }));\n * // => [{ 'a': 1, 'b': 2 }]\n */\n function conforms(source) {\n return baseConforms(baseClone(source, CLONE_DEEP_FLAG));\n }\n\n /**\n * Creates a function that returns `value`.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {*} value The value to return from the new function.\n * @returns {Function} Returns the new constant function.\n * @example\n *\n * var objects = _.times(2, _.constant({ 'a': 1 }));\n *\n * console.log(objects);\n * // => [{ 'a': 1 }, { 'a': 1 }]\n *\n * console.log(objects[0] === objects[1]);\n * // => true\n */\n function constant(value) {\n return function() {\n return value;\n };\n }\n\n /**\n * Checks `value` to determine whether a default value should be returned in\n * its place. The `defaultValue` is returned if `value` is `NaN`, `null`,\n * or `undefined`.\n *\n * @static\n * @memberOf _\n * @since 4.14.0\n * @category Util\n * @param {*} value The value to check.\n * @param {*} defaultValue The default value.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * _.defaultTo(1, 10);\n * // => 1\n *\n * _.defaultTo(undefined, 10);\n * // => 10\n */\n function defaultTo(value, defaultValue) {\n return (value == null || value !== value) ? defaultValue : value;\n }\n\n /**\n * Creates a function that returns the result of invoking the given functions\n * with the `this` binding of the created function, where each successive\n * invocation is supplied the return value of the previous.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Util\n * @param {...(Function|Function[])} [funcs] The functions to invoke.\n * @returns {Function} Returns the new composite function.\n * @see _.flowRight\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * var addSquare = _.flow([_.add, square]);\n * addSquare(1, 2);\n * // => 9\n */\n var flow = createFlow();\n\n /**\n * This method is like `_.flow` except that it creates a function that\n * invokes the given functions from right to left.\n *\n * @static\n * @since 3.0.0\n * @memberOf _\n * @category Util\n * @param {...(Function|Function[])} [funcs] The functions to invoke.\n * @returns {Function} Returns the new composite function.\n * @see _.flow\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * var addSquare = _.flowRight([square, _.add]);\n * addSquare(1, 2);\n * // => 9\n */\n var flowRight = createFlow(true);\n\n /**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\n function identity(value) {\n return value;\n }\n\n /**\n * Creates a function that invokes `func` with the arguments of the created\n * function. If `func` is a property name, the created function returns the\n * property value for a given element. If `func` is an array or object, the\n * created function returns `true` for elements that contain the equivalent\n * source properties, otherwise it returns `false`.\n *\n * @static\n * @since 4.0.0\n * @memberOf _\n * @category Util\n * @param {*} [func=_.identity] The value to convert to a callback.\n * @returns {Function} Returns the callback.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': true },\n * { 'user': 'fred', 'age': 40, 'active': false }\n * ];\n *\n * // The `_.matches` iteratee shorthand.\n * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true }));\n * // => [{ 'user': 'barney', 'age': 36, 'active': true }]\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.filter(users, _.iteratee(['user', 'fred']));\n * // => [{ 'user': 'fred', 'age': 40 }]\n *\n * // The `_.property` iteratee shorthand.\n * _.map(users, _.iteratee('user'));\n * // => ['barney', 'fred']\n *\n * // Create custom iteratee shorthands.\n * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) {\n * return !_.isRegExp(func) ? iteratee(func) : function(string) {\n * return func.test(string);\n * };\n * });\n *\n * _.filter(['abc', 'def'], /ef/);\n * // => ['def']\n */\n function iteratee(func) {\n return baseIteratee(typeof func == 'function' ? func : baseClone(func, CLONE_DEEP_FLAG));\n }\n\n /**\n * Creates a function that performs a partial deep comparison between a given\n * object and `source`, returning `true` if the given object has equivalent\n * property values, else `false`.\n *\n * **Note:** The created function is equivalent to `_.isMatch` with `source`\n * partially applied.\n *\n * Partial comparisons will match empty array and empty object `source`\n * values against any array or object value, respectively. See `_.isEqual`\n * for a list of supported value comparisons.\n *\n * **Note:** Multiple values can be checked by combining several matchers\n * using `_.overSome`\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Util\n * @param {Object} source The object of property values to match.\n * @returns {Function} Returns the new spec function.\n * @example\n *\n * var objects = [\n * { 'a': 1, 'b': 2, 'c': 3 },\n * { 'a': 4, 'b': 5, 'c': 6 }\n * ];\n *\n * _.filter(objects, _.matches({ 'a': 4, 'c': 6 }));\n * // => [{ 'a': 4, 'b': 5, 'c': 6 }]\n *\n * // Checking for several possible values\n * _.filter(objects, _.overSome([_.matches({ 'a': 1 }), _.matches({ 'a': 4 })]));\n * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }]\n */\n function matches(source) {\n return baseMatches(baseClone(source, CLONE_DEEP_FLAG));\n }\n\n /**\n * Creates a function that performs a partial deep comparison between the\n * value at `path` of a given object to `srcValue`, returning `true` if the\n * object value is equivalent, else `false`.\n *\n * **Note:** Partial comparisons will match empty array and empty object\n * `srcValue` values against any array or object value, respectively. See\n * `_.isEqual` for a list of supported value comparisons.\n *\n * **Note:** Multiple values can be checked by combining several matchers\n * using `_.overSome`\n *\n * @static\n * @memberOf _\n * @since 3.2.0\n * @category Util\n * @param {Array|string} path The path of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n * @example\n *\n * var objects = [\n * { 'a': 1, 'b': 2, 'c': 3 },\n * { 'a': 4, 'b': 5, 'c': 6 }\n * ];\n *\n * _.find(objects, _.matchesProperty('a', 4));\n * // => { 'a': 4, 'b': 5, 'c': 6 }\n *\n * // Checking for several possible values\n * _.filter(objects, _.overSome([_.matchesProperty('a', 1), _.matchesProperty('a', 4)]));\n * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }]\n */\n function matchesProperty(path, srcValue) {\n return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG));\n }\n\n /**\n * Creates a function that invokes the method at `path` of a given object.\n * Any additional arguments are provided to the invoked method.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Util\n * @param {Array|string} path The path of the method to invoke.\n * @param {...*} [args] The arguments to invoke the method with.\n * @returns {Function} Returns the new invoker function.\n * @example\n *\n * var objects = [\n * { 'a': { 'b': _.constant(2) } },\n * { 'a': { 'b': _.constant(1) } }\n * ];\n *\n * _.map(objects, _.method('a.b'));\n * // => [2, 1]\n *\n * _.map(objects, _.method(['a', 'b']));\n * // => [2, 1]\n */\n var method = baseRest(function(path, args) {\n return function(object) {\n return baseInvoke(object, path, args);\n };\n });\n\n /**\n * The opposite of `_.method`; this method creates a function that invokes\n * the method at a given path of `object`. Any additional arguments are\n * provided to the invoked method.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Util\n * @param {Object} object The object to query.\n * @param {...*} [args] The arguments to invoke the method with.\n * @returns {Function} Returns the new invoker function.\n * @example\n *\n * var array = _.times(3, _.constant),\n * object = { 'a': array, 'b': array, 'c': array };\n *\n * _.map(['a[2]', 'c[0]'], _.methodOf(object));\n * // => [2, 0]\n *\n * _.map([['a', '2'], ['c', '0']], _.methodOf(object));\n * // => [2, 0]\n */\n var methodOf = baseRest(function(object, args) {\n return function(path) {\n return baseInvoke(object, path, args);\n };\n });\n\n /**\n * Adds all own enumerable string keyed function properties of a source\n * object to the destination object. If `object` is a function, then methods\n * are added to its prototype as well.\n *\n * **Note:** Use `_.runInContext` to create a pristine `lodash` function to\n * avoid conflicts caused by modifying the original.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {Function|Object} [object=lodash] The destination object.\n * @param {Object} source The object of functions to add.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.chain=true] Specify whether mixins are chainable.\n * @returns {Function|Object} Returns `object`.\n * @example\n *\n * function vowels(string) {\n * return _.filter(string, function(v) {\n * return /[aeiou]/i.test(v);\n * });\n * }\n *\n * _.mixin({ 'vowels': vowels });\n * _.vowels('fred');\n * // => ['e']\n *\n * _('fred').vowels().value();\n * // => ['e']\n *\n * _.mixin({ 'vowels': vowels }, { 'chain': false });\n * _('fred').vowels();\n * // => ['e']\n */\n function mixin(object, source, options) {\n var props = keys(source),\n methodNames = baseFunctions(source, props);\n\n if (options == null &&\n !(isObject(source) && (methodNames.length || !props.length))) {\n options = source;\n source = object;\n object = this;\n methodNames = baseFunctions(source, keys(source));\n }\n var chain = !(isObject(options) && 'chain' in options) || !!options.chain,\n isFunc = isFunction(object);\n\n arrayEach(methodNames, function(methodName) {\n var func = source[methodName];\n object[methodName] = func;\n if (isFunc) {\n object.prototype[methodName] = function() {\n var chainAll = this.__chain__;\n if (chain || chainAll) {\n var result = object(this.__wrapped__),\n actions = result.__actions__ = copyArray(this.__actions__);\n\n actions.push({ 'func': func, 'args': arguments, 'thisArg': object });\n result.__chain__ = chainAll;\n return result;\n }\n return func.apply(object, arrayPush([this.value()], arguments));\n };\n }\n });\n\n return object;\n }\n\n /**\n * Reverts the `_` variable to its previous value and returns a reference to\n * the `lodash` function.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @returns {Function} Returns the `lodash` function.\n * @example\n *\n * var lodash = _.noConflict();\n */\n function noConflict() {\n if (root._ === this) {\n root._ = oldDash;\n }\n return this;\n }\n\n /**\n * This method returns `undefined`.\n *\n * @static\n * @memberOf _\n * @since 2.3.0\n * @category Util\n * @example\n *\n * _.times(2, _.noop);\n * // => [undefined, undefined]\n */\n function noop() {\n // No operation performed.\n }\n\n /**\n * Creates a function that gets the argument at index `n`. If `n` is negative,\n * the nth argument from the end is returned.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Util\n * @param {number} [n=0] The index of the argument to return.\n * @returns {Function} Returns the new pass-thru function.\n * @example\n *\n * var func = _.nthArg(1);\n * func('a', 'b', 'c', 'd');\n * // => 'b'\n *\n * var func = _.nthArg(-2);\n * func('a', 'b', 'c', 'd');\n * // => 'c'\n */\n function nthArg(n) {\n n = toInteger(n);\n return baseRest(function(args) {\n return baseNth(args, n);\n });\n }\n\n /**\n * Creates a function that invokes `iteratees` with the arguments it receives\n * and returns their results.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Util\n * @param {...(Function|Function[])} [iteratees=[_.identity]]\n * The iteratees to invoke.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var func = _.over([Math.max, Math.min]);\n *\n * func(1, 2, 3, 4);\n * // => [4, 1]\n */\n var over = createOver(arrayMap);\n\n /**\n * Creates a function that checks if **all** of the `predicates` return\n * truthy when invoked with the arguments it receives.\n *\n * Following shorthands are possible for providing predicates.\n * Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate.\n * Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Util\n * @param {...(Function|Function[])} [predicates=[_.identity]]\n * The predicates to check.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var func = _.overEvery([Boolean, isFinite]);\n *\n * func('1');\n * // => true\n *\n * func(null);\n * // => false\n *\n * func(NaN);\n * // => false\n */\n var overEvery = createOver(arrayEvery);\n\n /**\n * Creates a function that checks if **any** of the `predicates` return\n * truthy when invoked with the arguments it receives.\n *\n * Following shorthands are possible for providing predicates.\n * Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate.\n * Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Util\n * @param {...(Function|Function[])} [predicates=[_.identity]]\n * The predicates to check.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var func = _.overSome([Boolean, isFinite]);\n *\n * func('1');\n * // => true\n *\n * func(null);\n * // => true\n *\n * func(NaN);\n * // => false\n *\n * var matchesFunc = _.overSome([{ 'a': 1 }, { 'a': 2 }])\n * var matchesPropertyFunc = _.overSome([['a', 1], ['a', 2]])\n */\n var overSome = createOver(arraySome);\n\n /**\n * Creates a function that returns the value at `path` of a given object.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n * @example\n *\n * var objects = [\n * { 'a': { 'b': 2 } },\n * { 'a': { 'b': 1 } }\n * ];\n *\n * _.map(objects, _.property('a.b'));\n * // => [2, 1]\n *\n * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');\n * // => [1, 2]\n */\n function property(path) {\n return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);\n }\n\n /**\n * The opposite of `_.property`; this method creates a function that returns\n * the value at a given path of `object`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Util\n * @param {Object} object The object to query.\n * @returns {Function} Returns the new accessor function.\n * @example\n *\n * var array = [0, 1, 2],\n * object = { 'a': array, 'b': array, 'c': array };\n *\n * _.map(['a[2]', 'c[0]'], _.propertyOf(object));\n * // => [2, 0]\n *\n * _.map([['a', '2'], ['c', '0']], _.propertyOf(object));\n * // => [2, 0]\n */\n function propertyOf(object) {\n return function(path) {\n return object == null ? undefined : baseGet(object, path);\n };\n }\n\n /**\n * Creates an array of numbers (positive and/or negative) progressing from\n * `start` up to, but not including, `end`. A step of `-1` is used if a negative\n * `start` is specified without an `end` or `step`. If `end` is not specified,\n * it's set to `start` with `start` then set to `0`.\n *\n * **Note:** JavaScript follows the IEEE-754 standard for resolving\n * floating-point values which can produce unexpected results.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {number} [start=0] The start of the range.\n * @param {number} end The end of the range.\n * @param {number} [step=1] The value to increment or decrement by.\n * @returns {Array} Returns the range of numbers.\n * @see _.inRange, _.rangeRight\n * @example\n *\n * _.range(4);\n * // => [0, 1, 2, 3]\n *\n * _.range(-4);\n * // => [0, -1, -2, -3]\n *\n * _.range(1, 5);\n * // => [1, 2, 3, 4]\n *\n * _.range(0, 20, 5);\n * // => [0, 5, 10, 15]\n *\n * _.range(0, -4, -1);\n * // => [0, -1, -2, -3]\n *\n * _.range(1, 4, 0);\n * // => [1, 1, 1]\n *\n * _.range(0);\n * // => []\n */\n var range = createRange();\n\n /**\n * This method is like `_.range` except that it populates values in\n * descending order.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Util\n * @param {number} [start=0] The start of the range.\n * @param {number} end The end of the range.\n * @param {number} [step=1] The value to increment or decrement by.\n * @returns {Array} Returns the range of numbers.\n * @see _.inRange, _.range\n * @example\n *\n * _.rangeRight(4);\n * // => [3, 2, 1, 0]\n *\n * _.rangeRight(-4);\n * // => [-3, -2, -1, 0]\n *\n * _.rangeRight(1, 5);\n * // => [4, 3, 2, 1]\n *\n * _.rangeRight(0, 20, 5);\n * // => [15, 10, 5, 0]\n *\n * _.rangeRight(0, -4, -1);\n * // => [-3, -2, -1, 0]\n *\n * _.rangeRight(1, 4, 0);\n * // => [1, 1, 1]\n *\n * _.rangeRight(0);\n * // => []\n */\n var rangeRight = createRange(true);\n\n /**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\n function stubArray() {\n return [];\n }\n\n /**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\n function stubFalse() {\n return false;\n }\n\n /**\n * This method returns a new empty object.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Object} Returns the new empty object.\n * @example\n *\n * var objects = _.times(2, _.stubObject);\n *\n * console.log(objects);\n * // => [{}, {}]\n *\n * console.log(objects[0] === objects[1]);\n * // => false\n */\n function stubObject() {\n return {};\n }\n\n /**\n * This method returns an empty string.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {string} Returns the empty string.\n * @example\n *\n * _.times(2, _.stubString);\n * // => ['', '']\n */\n function stubString() {\n return '';\n }\n\n /**\n * This method returns `true`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `true`.\n * @example\n *\n * _.times(2, _.stubTrue);\n * // => [true, true]\n */\n function stubTrue() {\n return true;\n }\n\n /**\n * Invokes the iteratee `n` times, returning an array of the results of\n * each invocation. The iteratee is invoked with one argument; (index).\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n * @example\n *\n * _.times(3, String);\n * // => ['0', '1', '2']\n *\n * _.times(4, _.constant(0));\n * // => [0, 0, 0, 0]\n */\n function times(n, iteratee) {\n n = toInteger(n);\n if (n < 1 || n > MAX_SAFE_INTEGER) {\n return [];\n }\n var index = MAX_ARRAY_LENGTH,\n length = nativeMin(n, MAX_ARRAY_LENGTH);\n\n iteratee = getIteratee(iteratee);\n n -= MAX_ARRAY_LENGTH;\n\n var result = baseTimes(length, iteratee);\n while (++index < n) {\n iteratee(index);\n }\n return result;\n }\n\n /**\n * Converts `value` to a property path array.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Util\n * @param {*} value The value to convert.\n * @returns {Array} Returns the new property path array.\n * @example\n *\n * _.toPath('a.b.c');\n * // => ['a', 'b', 'c']\n *\n * _.toPath('a[0].b.c');\n * // => ['a', '0', 'b', 'c']\n */\n function toPath(value) {\n if (isArray(value)) {\n return arrayMap(value, toKey);\n }\n return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value)));\n }\n\n /**\n * Generates a unique ID. If `prefix` is given, the ID is appended to it.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {string} [prefix=''] The value to prefix the ID with.\n * @returns {string} Returns the unique ID.\n * @example\n *\n * _.uniqueId('contact_');\n * // => 'contact_104'\n *\n * _.uniqueId();\n * // => '105'\n */\n function uniqueId(prefix) {\n var id = ++idCounter;\n return toString(prefix) + id;\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Adds two numbers.\n *\n * @static\n * @memberOf _\n * @since 3.4.0\n * @category Math\n * @param {number} augend The first number in an addition.\n * @param {number} addend The second number in an addition.\n * @returns {number} Returns the total.\n * @example\n *\n * _.add(6, 4);\n * // => 10\n */\n var add = createMathOperation(function(augend, addend) {\n return augend + addend;\n }, 0);\n\n /**\n * Computes `number` rounded up to `precision`.\n *\n * @static\n * @memberOf _\n * @since 3.10.0\n * @category Math\n * @param {number} number The number to round up.\n * @param {number} [precision=0] The precision to round up to.\n * @returns {number} Returns the rounded up number.\n * @example\n *\n * _.ceil(4.006);\n * // => 5\n *\n * _.ceil(6.004, 2);\n * // => 6.01\n *\n * _.ceil(6040, -2);\n * // => 6100\n */\n var ceil = createRound('ceil');\n\n /**\n * Divide two numbers.\n *\n * @static\n * @memberOf _\n * @since 4.7.0\n * @category Math\n * @param {number} dividend The first number in a division.\n * @param {number} divisor The second number in a division.\n * @returns {number} Returns the quotient.\n * @example\n *\n * _.divide(6, 4);\n * // => 1.5\n */\n var divide = createMathOperation(function(dividend, divisor) {\n return dividend / divisor;\n }, 1);\n\n /**\n * Computes `number` rounded down to `precision`.\n *\n * @static\n * @memberOf _\n * @since 3.10.0\n * @category Math\n * @param {number} number The number to round down.\n * @param {number} [precision=0] The precision to round down to.\n * @returns {number} Returns the rounded down number.\n * @example\n *\n * _.floor(4.006);\n * // => 4\n *\n * _.floor(0.046, 2);\n * // => 0.04\n *\n * _.floor(4060, -2);\n * // => 4000\n */\n var floor = createRound('floor');\n\n /**\n * Computes the maximum value of `array`. If `array` is empty or falsey,\n * `undefined` is returned.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Math\n * @param {Array} array The array to iterate over.\n * @returns {*} Returns the maximum value.\n * @example\n *\n * _.max([4, 2, 8, 6]);\n * // => 8\n *\n * _.max([]);\n * // => undefined\n */\n function max(array) {\n return (array && array.length)\n ? baseExtremum(array, identity, baseGt)\n : undefined;\n }\n\n /**\n * This method is like `_.max` except that it accepts `iteratee` which is\n * invoked for each element in `array` to generate the criterion by which\n * the value is ranked. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Math\n * @param {Array} array The array to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {*} Returns the maximum value.\n * @example\n *\n * var objects = [{ 'n': 1 }, { 'n': 2 }];\n *\n * _.maxBy(objects, function(o) { return o.n; });\n * // => { 'n': 2 }\n *\n * // The `_.property` iteratee shorthand.\n * _.maxBy(objects, 'n');\n * // => { 'n': 2 }\n */\n function maxBy(array, iteratee) {\n return (array && array.length)\n ? baseExtremum(array, getIteratee(iteratee, 2), baseGt)\n : undefined;\n }\n\n /**\n * Computes the mean of the values in `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Math\n * @param {Array} array The array to iterate over.\n * @returns {number} Returns the mean.\n * @example\n *\n * _.mean([4, 2, 8, 6]);\n * // => 5\n */\n function mean(array) {\n return baseMean(array, identity);\n }\n\n /**\n * This method is like `_.mean` except that it accepts `iteratee` which is\n * invoked for each element in `array` to generate the value to be averaged.\n * The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.7.0\n * @category Math\n * @param {Array} array The array to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {number} Returns the mean.\n * @example\n *\n * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];\n *\n * _.meanBy(objects, function(o) { return o.n; });\n * // => 5\n *\n * // The `_.property` iteratee shorthand.\n * _.meanBy(objects, 'n');\n * // => 5\n */\n function meanBy(array, iteratee) {\n return baseMean(array, getIteratee(iteratee, 2));\n }\n\n /**\n * Computes the minimum value of `array`. If `array` is empty or falsey,\n * `undefined` is returned.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Math\n * @param {Array} array The array to iterate over.\n * @returns {*} Returns the minimum value.\n * @example\n *\n * _.min([4, 2, 8, 6]);\n * // => 2\n *\n * _.min([]);\n * // => undefined\n */\n function min(array) {\n return (array && array.length)\n ? baseExtremum(array, identity, baseLt)\n : undefined;\n }\n\n /**\n * This method is like `_.min` except that it accepts `iteratee` which is\n * invoked for each element in `array` to generate the criterion by which\n * the value is ranked. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Math\n * @param {Array} array The array to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {*} Returns the minimum value.\n * @example\n *\n * var objects = [{ 'n': 1 }, { 'n': 2 }];\n *\n * _.minBy(objects, function(o) { return o.n; });\n * // => { 'n': 1 }\n *\n * // The `_.property` iteratee shorthand.\n * _.minBy(objects, 'n');\n * // => { 'n': 1 }\n */\n function minBy(array, iteratee) {\n return (array && array.length)\n ? baseExtremum(array, getIteratee(iteratee, 2), baseLt)\n : undefined;\n }\n\n /**\n * Multiply two numbers.\n *\n * @static\n * @memberOf _\n * @since 4.7.0\n * @category Math\n * @param {number} multiplier The first number in a multiplication.\n * @param {number} multiplicand The second number in a multiplication.\n * @returns {number} Returns the product.\n * @example\n *\n * _.multiply(6, 4);\n * // => 24\n */\n var multiply = createMathOperation(function(multiplier, multiplicand) {\n return multiplier * multiplicand;\n }, 1);\n\n /**\n * Computes `number` rounded to `precision`.\n *\n * @static\n * @memberOf _\n * @since 3.10.0\n * @category Math\n * @param {number} number The number to round.\n * @param {number} [precision=0] The precision to round to.\n * @returns {number} Returns the rounded number.\n * @example\n *\n * _.round(4.006);\n * // => 4\n *\n * _.round(4.006, 2);\n * // => 4.01\n *\n * _.round(4060, -2);\n * // => 4100\n */\n var round = createRound('round');\n\n /**\n * Subtract two numbers.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Math\n * @param {number} minuend The first number in a subtraction.\n * @param {number} subtrahend The second number in a subtraction.\n * @returns {number} Returns the difference.\n * @example\n *\n * _.subtract(6, 4);\n * // => 2\n */\n var subtract = createMathOperation(function(minuend, subtrahend) {\n return minuend - subtrahend;\n }, 0);\n\n /**\n * Computes the sum of the values in `array`.\n *\n * @static\n * @memberOf _\n * @since 3.4.0\n * @category Math\n * @param {Array} array The array to iterate over.\n * @returns {number} Returns the sum.\n * @example\n *\n * _.sum([4, 2, 8, 6]);\n * // => 20\n */\n function sum(array) {\n return (array && array.length)\n ? baseSum(array, identity)\n : 0;\n }\n\n /**\n * This method is like `_.sum` except that it accepts `iteratee` which is\n * invoked for each element in `array` to generate the value to be summed.\n * The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Math\n * @param {Array} array The array to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {number} Returns the sum.\n * @example\n *\n * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];\n *\n * _.sumBy(objects, function(o) { return o.n; });\n * // => 20\n *\n * // The `_.property` iteratee shorthand.\n * _.sumBy(objects, 'n');\n * // => 20\n */\n function sumBy(array, iteratee) {\n return (array && array.length)\n ? baseSum(array, getIteratee(iteratee, 2))\n : 0;\n }\n\n /*------------------------------------------------------------------------*/\n\n // Add methods that return wrapped values in chain sequences.\n lodash.after = after;\n lodash.ary = ary;\n lodash.assign = assign;\n lodash.assignIn = assignIn;\n lodash.assignInWith = assignInWith;\n lodash.assignWith = assignWith;\n lodash.at = at;\n lodash.before = before;\n lodash.bind = bind;\n lodash.bindAll = bindAll;\n lodash.bindKey = bindKey;\n lodash.castArray = castArray;\n lodash.chain = chain;\n lodash.chunk = chunk;\n lodash.compact = compact;\n lodash.concat = concat;\n lodash.cond = cond;\n lodash.conforms = conforms;\n lodash.constant = constant;\n lodash.countBy = countBy;\n lodash.create = create;\n lodash.curry = curry;\n lodash.curryRight = curryRight;\n lodash.debounce = debounce;\n lodash.defaults = defaults;\n lodash.defaultsDeep = defaultsDeep;\n lodash.defer = defer;\n lodash.delay = delay;\n lodash.difference = difference;\n lodash.differenceBy = differenceBy;\n lodash.differenceWith = differenceWith;\n lodash.drop = drop;\n lodash.dropRight = dropRight;\n lodash.dropRightWhile = dropRightWhile;\n lodash.dropWhile = dropWhile;\n lodash.fill = fill;\n lodash.filter = filter;\n lodash.flatMap = flatMap;\n lodash.flatMapDeep = flatMapDeep;\n lodash.flatMapDepth = flatMapDepth;\n lodash.flatten = flatten;\n lodash.flattenDeep = flattenDeep;\n lodash.flattenDepth = flattenDepth;\n lodash.flip = flip;\n lodash.flow = flow;\n lodash.flowRight = flowRight;\n lodash.fromPairs = fromPairs;\n lodash.functions = functions;\n lodash.functionsIn = functionsIn;\n lodash.groupBy = groupBy;\n lodash.initial = initial;\n lodash.intersection = intersection;\n lodash.intersectionBy = intersectionBy;\n lodash.intersectionWith = intersectionWith;\n lodash.invert = invert;\n lodash.invertBy = invertBy;\n lodash.invokeMap = invokeMap;\n lodash.iteratee = iteratee;\n lodash.keyBy = keyBy;\n lodash.keys = keys;\n lodash.keysIn = keysIn;\n lodash.map = map;\n lodash.mapKeys = mapKeys;\n lodash.mapValues = mapValues;\n lodash.matches = matches;\n lodash.matchesProperty = matchesProperty;\n lodash.memoize = memoize;\n lodash.merge = merge;\n lodash.mergeWith = mergeWith;\n lodash.method = method;\n lodash.methodOf = methodOf;\n lodash.mixin = mixin;\n lodash.negate = negate;\n lodash.nthArg = nthArg;\n lodash.omit = omit;\n lodash.omitBy = omitBy;\n lodash.once = once;\n lodash.orderBy = orderBy;\n lodash.over = over;\n lodash.overArgs = overArgs;\n lodash.overEvery = overEvery;\n lodash.overSome = overSome;\n lodash.partial = partial;\n lodash.partialRight = partialRight;\n lodash.partition = partition;\n lodash.pick = pick;\n lodash.pickBy = pickBy;\n lodash.property = property;\n lodash.propertyOf = propertyOf;\n lodash.pull = pull;\n lodash.pullAll = pullAll;\n lodash.pullAllBy = pullAllBy;\n lodash.pullAllWith = pullAllWith;\n lodash.pullAt = pullAt;\n lodash.range = range;\n lodash.rangeRight = rangeRight;\n lodash.rearg = rearg;\n lodash.reject = reject;\n lodash.remove = remove;\n lodash.rest = rest;\n lodash.reverse = reverse;\n lodash.sampleSize = sampleSize;\n lodash.set = set;\n lodash.setWith = setWith;\n lodash.shuffle = shuffle;\n lodash.slice = slice;\n lodash.sortBy = sortBy;\n lodash.sortedUniq = sortedUniq;\n lodash.sortedUniqBy = sortedUniqBy;\n lodash.split = split;\n lodash.spread = spread;\n lodash.tail = tail;\n lodash.take = take;\n lodash.takeRight = takeRight;\n lodash.takeRightWhile = takeRightWhile;\n lodash.takeWhile = takeWhile;\n lodash.tap = tap;\n lodash.throttle = throttle;\n lodash.thru = thru;\n lodash.toArray = toArray;\n lodash.toPairs = toPairs;\n lodash.toPairsIn = toPairsIn;\n lodash.toPath = toPath;\n lodash.toPlainObject = toPlainObject;\n lodash.transform = transform;\n lodash.unary = unary;\n lodash.union = union;\n lodash.unionBy = unionBy;\n lodash.unionWith = unionWith;\n lodash.uniq = uniq;\n lodash.uniqBy = uniqBy;\n lodash.uniqWith = uniqWith;\n lodash.unset = unset;\n lodash.unzip = unzip;\n lodash.unzipWith = unzipWith;\n lodash.update = update;\n lodash.updateWith = updateWith;\n lodash.values = values;\n lodash.valuesIn = valuesIn;\n lodash.without = without;\n lodash.words = words;\n lodash.wrap = wrap;\n lodash.xor = xor;\n lodash.xorBy = xorBy;\n lodash.xorWith = xorWith;\n lodash.zip = zip;\n lodash.zipObject = zipObject;\n lodash.zipObjectDeep = zipObjectDeep;\n lodash.zipWith = zipWith;\n\n // Add aliases.\n lodash.entries = toPairs;\n lodash.entriesIn = toPairsIn;\n lodash.extend = assignIn;\n lodash.extendWith = assignInWith;\n\n // Add methods to `lodash.prototype`.\n mixin(lodash, lodash);\n\n /*------------------------------------------------------------------------*/\n\n // Add methods that return unwrapped values in chain sequences.\n lodash.add = add;\n lodash.attempt = attempt;\n lodash.camelCase = camelCase;\n lodash.capitalize = capitalize;\n lodash.ceil = ceil;\n lodash.clamp = clamp;\n lodash.clone = clone;\n lodash.cloneDeep = cloneDeep;\n lodash.cloneDeepWith = cloneDeepWith;\n lodash.cloneWith = cloneWith;\n lodash.conformsTo = conformsTo;\n lodash.deburr = deburr;\n lodash.defaultTo = defaultTo;\n lodash.divide = divide;\n lodash.endsWith = endsWith;\n lodash.eq = eq;\n lodash.escape = escape;\n lodash.escapeRegExp = escapeRegExp;\n lodash.every = every;\n lodash.find = find;\n lodash.findIndex = findIndex;\n lodash.findKey = findKey;\n lodash.findLast = findLast;\n lodash.findLastIndex = findLastIndex;\n lodash.findLastKey = findLastKey;\n lodash.floor = floor;\n lodash.forEach = forEach;\n lodash.forEachRight = forEachRight;\n lodash.forIn = forIn;\n lodash.forInRight = forInRight;\n lodash.forOwn = forOwn;\n lodash.forOwnRight = forOwnRight;\n lodash.get = get;\n lodash.gt = gt;\n lodash.gte = gte;\n lodash.has = has;\n lodash.hasIn = hasIn;\n lodash.head = head;\n lodash.identity = identity;\n lodash.includes = includes;\n lodash.indexOf = indexOf;\n lodash.inRange = inRange;\n lodash.invoke = invoke;\n lodash.isArguments = isArguments;\n lodash.isArray = isArray;\n lodash.isArrayBuffer = isArrayBuffer;\n lodash.isArrayLike = isArrayLike;\n lodash.isArrayLikeObject = isArrayLikeObject;\n lodash.isBoolean = isBoolean;\n lodash.isBuffer = isBuffer;\n lodash.isDate = isDate;\n lodash.isElement = isElement;\n lodash.isEmpty = isEmpty;\n lodash.isEqual = isEqual;\n lodash.isEqualWith = isEqualWith;\n lodash.isError = isError;\n lodash.isFinite = isFinite;\n lodash.isFunction = isFunction;\n lodash.isInteger = isInteger;\n lodash.isLength = isLength;\n lodash.isMap = isMap;\n lodash.isMatch = isMatch;\n lodash.isMatchWith = isMatchWith;\n lodash.isNaN = isNaN;\n lodash.isNative = isNative;\n lodash.isNil = isNil;\n lodash.isNull = isNull;\n lodash.isNumber = isNumber;\n lodash.isObject = isObject;\n lodash.isObjectLike = isObjectLike;\n lodash.isPlainObject = isPlainObject;\n lodash.isRegExp = isRegExp;\n lodash.isSafeInteger = isSafeInteger;\n lodash.isSet = isSet;\n lodash.isString = isString;\n lodash.isSymbol = isSymbol;\n lodash.isTypedArray = isTypedArray;\n lodash.isUndefined = isUndefined;\n lodash.isWeakMap = isWeakMap;\n lodash.isWeakSet = isWeakSet;\n lodash.join = join;\n lodash.kebabCase = kebabCase;\n lodash.last = last;\n lodash.lastIndexOf = lastIndexOf;\n lodash.lowerCase = lowerCase;\n lodash.lowerFirst = lowerFirst;\n lodash.lt = lt;\n lodash.lte = lte;\n lodash.max = max;\n lodash.maxBy = maxBy;\n lodash.mean = mean;\n lodash.meanBy = meanBy;\n lodash.min = min;\n lodash.minBy = minBy;\n lodash.stubArray = stubArray;\n lodash.stubFalse = stubFalse;\n lodash.stubObject = stubObject;\n lodash.stubString = stubString;\n lodash.stubTrue = stubTrue;\n lodash.multiply = multiply;\n lodash.nth = nth;\n lodash.noConflict = noConflict;\n lodash.noop = noop;\n lodash.now = now;\n lodash.pad = pad;\n lodash.padEnd = padEnd;\n lodash.padStart = padStart;\n lodash.parseInt = parseInt;\n lodash.random = random;\n lodash.reduce = reduce;\n lodash.reduceRight = reduceRight;\n lodash.repeat = repeat;\n lodash.replace = replace;\n lodash.result = result;\n lodash.round = round;\n lodash.runInContext = runInContext;\n lodash.sample = sample;\n lodash.size = size;\n lodash.snakeCase = snakeCase;\n lodash.some = some;\n lodash.sortedIndex = sortedIndex;\n lodash.sortedIndexBy = sortedIndexBy;\n lodash.sortedIndexOf = sortedIndexOf;\n lodash.sortedLastIndex = sortedLastIndex;\n lodash.sortedLastIndexBy = sortedLastIndexBy;\n lodash.sortedLastIndexOf = sortedLastIndexOf;\n lodash.startCase = startCase;\n lodash.startsWith = startsWith;\n lodash.subtract = subtract;\n lodash.sum = sum;\n lodash.sumBy = sumBy;\n lodash.template = template;\n lodash.times = times;\n lodash.toFinite = toFinite;\n lodash.toInteger = toInteger;\n lodash.toLength = toLength;\n lodash.toLower = toLower;\n lodash.toNumber = toNumber;\n lodash.toSafeInteger = toSafeInteger;\n lodash.toString = toString;\n lodash.toUpper = toUpper;\n lodash.trim = trim;\n lodash.trimEnd = trimEnd;\n lodash.trimStart = trimStart;\n lodash.truncate = truncate;\n lodash.unescape = unescape;\n lodash.uniqueId = uniqueId;\n lodash.upperCase = upperCase;\n lodash.upperFirst = upperFirst;\n\n // Add aliases.\n lodash.each = forEach;\n lodash.eachRight = forEachRight;\n lodash.first = head;\n\n mixin(lodash, (function() {\n var source = {};\n baseForOwn(lodash, function(func, methodName) {\n if (!hasOwnProperty.call(lodash.prototype, methodName)) {\n source[methodName] = func;\n }\n });\n return source;\n }()), { 'chain': false });\n\n /*------------------------------------------------------------------------*/\n\n /**\n * The semantic version number.\n *\n * @static\n * @memberOf _\n * @type {string}\n */\n lodash.VERSION = VERSION;\n\n // Assign default placeholders.\n arrayEach(['bind', 'bindKey', 'curry', 'curryRight', 'partial', 'partialRight'], function(methodName) {\n lodash[methodName].placeholder = lodash;\n });\n\n // Add `LazyWrapper` methods for `_.drop` and `_.take` variants.\n arrayEach(['drop', 'take'], function(methodName, index) {\n LazyWrapper.prototype[methodName] = function(n) {\n n = n === undefined ? 1 : nativeMax(toInteger(n), 0);\n\n var result = (this.__filtered__ && !index)\n ? new LazyWrapper(this)\n : this.clone();\n\n if (result.__filtered__) {\n result.__takeCount__ = nativeMin(n, result.__takeCount__);\n } else {\n result.__views__.push({\n 'size': nativeMin(n, MAX_ARRAY_LENGTH),\n 'type': methodName + (result.__dir__ < 0 ? 'Right' : '')\n });\n }\n return result;\n };\n\n LazyWrapper.prototype[methodName + 'Right'] = function(n) {\n return this.reverse()[methodName](n).reverse();\n };\n });\n\n // Add `LazyWrapper` methods that accept an `iteratee` value.\n arrayEach(['filter', 'map', 'takeWhile'], function(methodName, index) {\n var type = index + 1,\n isFilter = type == LAZY_FILTER_FLAG || type == LAZY_WHILE_FLAG;\n\n LazyWrapper.prototype[methodName] = function(iteratee) {\n var result = this.clone();\n result.__iteratees__.push({\n 'iteratee': getIteratee(iteratee, 3),\n 'type': type\n });\n result.__filtered__ = result.__filtered__ || isFilter;\n return result;\n };\n });\n\n // Add `LazyWrapper` methods for `_.head` and `_.last`.\n arrayEach(['head', 'last'], function(methodName, index) {\n var takeName = 'take' + (index ? 'Right' : '');\n\n LazyWrapper.prototype[methodName] = function() {\n return this[takeName](1).value()[0];\n };\n });\n\n // Add `LazyWrapper` methods for `_.initial` and `_.tail`.\n arrayEach(['initial', 'tail'], function(methodName, index) {\n var dropName = 'drop' + (index ? '' : 'Right');\n\n LazyWrapper.prototype[methodName] = function() {\n return this.__filtered__ ? new LazyWrapper(this) : this[dropName](1);\n };\n });\n\n LazyWrapper.prototype.compact = function() {\n return this.filter(identity);\n };\n\n LazyWrapper.prototype.find = function(predicate) {\n return this.filter(predicate).head();\n };\n\n LazyWrapper.prototype.findLast = function(predicate) {\n return this.reverse().find(predicate);\n };\n\n LazyWrapper.prototype.invokeMap = baseRest(function(path, args) {\n if (typeof path == 'function') {\n return new LazyWrapper(this);\n }\n return this.map(function(value) {\n return baseInvoke(value, path, args);\n });\n });\n\n LazyWrapper.prototype.reject = function(predicate) {\n return this.filter(negate(getIteratee(predicate)));\n };\n\n LazyWrapper.prototype.slice = function(start, end) {\n start = toInteger(start);\n\n var result = this;\n if (result.__filtered__ && (start > 0 || end < 0)) {\n return new LazyWrapper(result);\n }\n if (start < 0) {\n result = result.takeRight(-start);\n } else if (start) {\n result = result.drop(start);\n }\n if (end !== undefined) {\n end = toInteger(end);\n result = end < 0 ? result.dropRight(-end) : result.take(end - start);\n }\n return result;\n };\n\n LazyWrapper.prototype.takeRightWhile = function(predicate) {\n return this.reverse().takeWhile(predicate).reverse();\n };\n\n LazyWrapper.prototype.toArray = function() {\n return this.take(MAX_ARRAY_LENGTH);\n };\n\n // Add `LazyWrapper` methods to `lodash.prototype`.\n baseForOwn(LazyWrapper.prototype, function(func, methodName) {\n var checkIteratee = /^(?:filter|find|map|reject)|While$/.test(methodName),\n isTaker = /^(?:head|last)$/.test(methodName),\n lodashFunc = lodash[isTaker ? ('take' + (methodName == 'last' ? 'Right' : '')) : methodName],\n retUnwrapped = isTaker || /^find/.test(methodName);\n\n if (!lodashFunc) {\n return;\n }\n lodash.prototype[methodName] = function() {\n var value = this.__wrapped__,\n args = isTaker ? [1] : arguments,\n isLazy = value instanceof LazyWrapper,\n iteratee = args[0],\n useLazy = isLazy || isArray(value);\n\n var interceptor = function(value) {\n var result = lodashFunc.apply(lodash, arrayPush([value], args));\n return (isTaker && chainAll) ? result[0] : result;\n };\n\n if (useLazy && checkIteratee && typeof iteratee == 'function' && iteratee.length != 1) {\n // Avoid lazy use if the iteratee has a \"length\" value other than `1`.\n isLazy = useLazy = false;\n }\n var chainAll = this.__chain__,\n isHybrid = !!this.__actions__.length,\n isUnwrapped = retUnwrapped && !chainAll,\n onlyLazy = isLazy && !isHybrid;\n\n if (!retUnwrapped && useLazy) {\n value = onlyLazy ? value : new LazyWrapper(this);\n var result = func.apply(value, args);\n result.__actions__.push({ 'func': thru, 'args': [interceptor], 'thisArg': undefined });\n return new LodashWrapper(result, chainAll);\n }\n if (isUnwrapped && onlyLazy) {\n return func.apply(this, args);\n }\n result = this.thru(interceptor);\n return isUnwrapped ? (isTaker ? result.value()[0] : result.value()) : result;\n };\n });\n\n // Add `Array` methods to `lodash.prototype`.\n arrayEach(['pop', 'push', 'shift', 'sort', 'splice', 'unshift'], function(methodName) {\n var func = arrayProto[methodName],\n chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru',\n retUnwrapped = /^(?:pop|shift)$/.test(methodName);\n\n lodash.prototype[methodName] = function() {\n var args = arguments;\n if (retUnwrapped && !this.__chain__) {\n var value = this.value();\n return func.apply(isArray(value) ? value : [], args);\n }\n return this[chainName](function(value) {\n return func.apply(isArray(value) ? value : [], args);\n });\n };\n });\n\n // Map minified method names to their real names.\n baseForOwn(LazyWrapper.prototype, function(func, methodName) {\n var lodashFunc = lodash[methodName];\n if (lodashFunc) {\n var key = lodashFunc.name + '';\n if (!hasOwnProperty.call(realNames, key)) {\n realNames[key] = [];\n }\n realNames[key].push({ 'name': methodName, 'func': lodashFunc });\n }\n });\n\n realNames[createHybrid(undefined, WRAP_BIND_KEY_FLAG).name] = [{\n 'name': 'wrapper',\n 'func': undefined\n }];\n\n // Add methods to `LazyWrapper`.\n LazyWrapper.prototype.clone = lazyClone;\n LazyWrapper.prototype.reverse = lazyReverse;\n LazyWrapper.prototype.value = lazyValue;\n\n // Add chain sequence methods to the `lodash` wrapper.\n lodash.prototype.at = wrapperAt;\n lodash.prototype.chain = wrapperChain;\n lodash.prototype.commit = wrapperCommit;\n lodash.prototype.next = wrapperNext;\n lodash.prototype.plant = wrapperPlant;\n lodash.prototype.reverse = wrapperReverse;\n lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue;\n\n // Add lazy aliases.\n lodash.prototype.first = lodash.prototype.head;\n\n if (symIterator) {\n lodash.prototype[symIterator] = wrapperToIterator;\n }\n return lodash;\n });\n\n /*--------------------------------------------------------------------------*/\n\n // Export lodash.\n var _ = runInContext();\n\n // Some AMD build optimizers, like r.js, check for condition patterns like:\n if (true) {\n // Expose Lodash on the global object to prevent errors when Lodash is\n // loaded by a script tag in the presence of an AMD loader.\n // See http://requirejs.org/docs/errors.html#mismatch for more details.\n // Use `_.noConflict` to remove Lodash from the global object.\n root._ = _;\n\n // Define as an anonymous module so, through path mapping, it can be\n // referenced as the \"underscore\" module.\n !(__WEBPACK_AMD_DEFINE_RESULT__ = (function() {\n return _;\n }).call(exports, __webpack_require__, exports, module),\n\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n }\n // Check for `exports` after `define` in case a build optimizer adds it.\n else {}\n}.call(this));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/lodash.js?", + ); + + /***/ + }, + + /***/ 5378: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var arrayMap = __webpack_require__(4932),\n baseIteratee = __webpack_require__(5389),\n baseMap = __webpack_require__(5128),\n isArray = __webpack_require__(6449);\n\n/**\n * Creates an array of values by running each element in `collection` thru\n * `iteratee`. The iteratee is invoked with three arguments:\n * (value, index|key, collection).\n *\n * Many lodash methods are guarded to work as iteratees for methods like\n * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.\n *\n * The guarded methods are:\n * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,\n * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,\n * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,\n * `template`, `trim`, `trimEnd`, `trimStart`, and `words`\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * _.map([4, 8], square);\n * // => [16, 64]\n *\n * _.map({ 'a': 4, 'b': 8 }, square);\n * // => [16, 64] (iteration order is not guaranteed)\n *\n * var users = [\n * { 'user': 'barney' },\n * { 'user': 'fred' }\n * ];\n *\n * // The `_.property` iteratee shorthand.\n * _.map(users, 'user');\n * // => ['barney', 'fred']\n */\nfunction map(collection, iteratee) {\n var func = isArray(collection) ? arrayMap : baseMap;\n return func(collection, baseIteratee(iteratee, 3));\n}\n\nmodule.exports = map;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/map.js?", + ); + + /***/ + }, + + /***/ 104: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var MapCache = __webpack_require__(3661);\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a function that memoizes the result of `func`. If `resolver` is\n * provided, it determines the cache key for storing the result based on the\n * arguments provided to the memoized function. By default, the first argument\n * provided to the memoized function is used as the map cache key. The `func`\n * is invoked with the `this` binding of the memoized function.\n *\n * **Note:** The cache is exposed as the `cache` property on the memoized\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\n * constructor with one whose instances implement the\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n * method interface of `clear`, `delete`, `get`, `has`, and `set`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to have its output memoized.\n * @param {Function} [resolver] The function to resolve the cache key.\n * @returns {Function} Returns the new memoized function.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n * var other = { 'c': 3, 'd': 4 };\n *\n * var values = _.memoize(_.values);\n * values(object);\n * // => [1, 2]\n *\n * values(other);\n * // => [3, 4]\n *\n * object.a = 2;\n * values(object);\n * // => [1, 2]\n *\n * // Modify the result cache.\n * values.cache.set(object, ['a', 'b']);\n * values(object);\n * // => ['a', 'b']\n *\n * // Replace `_.memoize.Cache`.\n * _.memoize.Cache = WeakMap;\n */\nfunction memoize(func, resolver) {\n if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var memoized = function() {\n var args = arguments,\n key = resolver ? resolver.apply(this, args) : args[0],\n cache = memoized.cache;\n\n if (cache.has(key)) {\n return cache.get(key);\n }\n var result = func.apply(this, args);\n memoized.cache = cache.set(key, result) || cache;\n return result;\n };\n memoized.cache = new (memoize.Cache || MapCache);\n return memoized;\n}\n\n// Expose `MapCache`.\nmemoize.Cache = MapCache;\n\nmodule.exports = memoize;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/memoize.js?", + ); + + /***/ + }, + + /***/ 3950: /***/ (module) => { + eval( + '/**\n * This method returns `undefined`.\n *\n * @static\n * @memberOf _\n * @since 2.3.0\n * @category Util\n * @example\n *\n * _.times(2, _.noop);\n * // => [undefined, undefined]\n */\nfunction noop() {\n // No operation performed.\n}\n\nmodule.exports = noop;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/noop.js?', + ); + + /***/ + }, + + /***/ 583: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var baseProperty = __webpack_require__(7237),\n basePropertyDeep = __webpack_require__(7255),\n isKey = __webpack_require__(8586),\n toKey = __webpack_require__(7797);\n\n/**\n * Creates a function that returns the value at `path` of a given object.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n * @example\n *\n * var objects = [\n * { 'a': { 'b': 2 } },\n * { 'a': { 'b': 1 } }\n * ];\n *\n * _.map(objects, _.property('a.b'));\n * // => [2, 1]\n *\n * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');\n * // => [1, 2]\n */\nfunction property(path) {\n return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);\n}\n\nmodule.exports = property;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/property.js?", + ); + + /***/ + }, + + /***/ 3345: /***/ (module) => { + eval( + '/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nmodule.exports = stubArray;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/stubArray.js?', + ); + + /***/ + }, + + /***/ 9935: /***/ (module) => { + eval( + '/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = stubFalse;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/stubFalse.js?', + ); + + /***/ + }, + + /***/ 3222: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var baseToString = __webpack_require__(7556);\n\n/**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\nfunction toString(value) {\n return value == null ? '' : baseToString(value);\n}\n\nmodule.exports = toString;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/toString.js?", + ); + + /***/ + }, + + /***/ 3375: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var baseUniq = __webpack_require__(5765);\n\n/**\n * Creates a duplicate-free version of an array, using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons, in which only the first occurrence of each element\n * is kept. The order of result values is determined by the order they occur\n * in the array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.uniq([2, 1, 2]);\n * // => [2, 1]\n */\nfunction uniq(array) {\n return (array && array.length) ? baseUniq(array) : [];\n}\n\nmodule.exports = uniq;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/uniq.js?', + ); + + /***/ + }, + + /***/ 14: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + "var baseIteratee = __webpack_require__(5389),\n baseUniq = __webpack_require__(5765);\n\n/**\n * This method is like `_.uniq` except that it accepts `iteratee` which is\n * invoked for each element in `array` to generate the criterion by which\n * uniqueness is computed. The order of result values is determined by the\n * order they occur in the array. The iteratee is invoked with one argument:\n * (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.uniqBy([2.1, 1.2, 2.3], Math.floor);\n * // => [2.1, 1.2]\n *\n * // The `_.property` iteratee shorthand.\n * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 1 }, { 'x': 2 }]\n */\nfunction uniqBy(array, iteratee) {\n return (array && array.length) ? baseUniq(array, baseIteratee(iteratee, 2)) : [];\n}\n\nmodule.exports = uniqBy;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/lodash/uniqBy.js?", + ); + + /***/ + }, + + /***/ 5177: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Afrikaans [af]\n//! author : Werner Mollentze : https://github.com/wernerm\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var af = moment.defineLocale('af', {\n months: 'Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember'.split(\n '_'\n ),\n monthsShort: 'Jan_Feb_Mrt_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des'.split('_'),\n weekdays: 'Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag'.split(\n '_'\n ),\n weekdaysShort: 'Son_Maa_Din_Woe_Don_Vry_Sat'.split('_'),\n weekdaysMin: 'So_Ma_Di_Wo_Do_Vr_Sa'.split('_'),\n meridiemParse: /vm|nm/i,\n isPM: function (input) {\n return /^nm$/i.test(input);\n },\n meridiem: function (hours, minutes, isLower) {\n if (hours < 12) {\n return isLower ? 'vm' : 'VM';\n } else {\n return isLower ? 'nm' : 'NM';\n }\n },\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Vandag om] LT',\n nextDay: '[Môre om] LT',\n nextWeek: 'dddd [om] LT',\n lastDay: '[Gister om] LT',\n lastWeek: '[Laas] dddd [om] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'oor %s',\n past: '%s gelede',\n s: \"'n paar sekondes\",\n ss: '%d sekondes',\n m: \"'n minuut\",\n mm: '%d minute',\n h: \"'n uur\",\n hh: '%d ure',\n d: \"'n dag\",\n dd: '%d dae',\n M: \"'n maand\",\n MM: '%d maande',\n y: \"'n jaar\",\n yy: '%d jaar',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(ste|de)/,\n ordinal: function (number) {\n return (\n number +\n (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de')\n ); // Thanks to Joris Röling : https://github.com/jjupiter\n },\n week: {\n dow: 1, // Maandag is die eerste dag van die week.\n doy: 4, // Die week wat die 4de Januarie bevat is die eerste week van die jaar.\n },\n });\n\n return af;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/af.js?", + ); + + /***/ + }, + + /***/ 1488: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Arabic (Algeria) [ar-dz]\n//! author : Amine Roukh: https://github.com/Amine27\n//! author : Abdel Said: https://github.com/abdelsaid\n//! author : Ahmed Elkhatib\n//! author : forabi https://github.com/forabi\n//! author : Noureddine LOUAHEDJ : https://github.com/noureddinem\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var pluralForm = function (n) {\n return n === 0\n ? 0\n : n === 1\n ? 1\n : n === 2\n ? 2\n : n % 100 >= 3 && n % 100 <= 10\n ? 3\n : n % 100 >= 11\n ? 4\n : 5;\n },\n plurals = {\n s: [\n 'أقل من ثانية',\n 'ثانية واحدة',\n ['ثانيتان', 'ثانيتين'],\n '%d ثوان',\n '%d ثانية',\n '%d ثانية',\n ],\n m: [\n 'أقل من دقيقة',\n 'دقيقة واحدة',\n ['دقيقتان', 'دقيقتين'],\n '%d دقائق',\n '%d دقيقة',\n '%d دقيقة',\n ],\n h: [\n 'أقل من ساعة',\n 'ساعة واحدة',\n ['ساعتان', 'ساعتين'],\n '%d ساعات',\n '%d ساعة',\n '%d ساعة',\n ],\n d: [\n 'أقل من يوم',\n 'يوم واحد',\n ['يومان', 'يومين'],\n '%d أيام',\n '%d يومًا',\n '%d يوم',\n ],\n M: [\n 'أقل من شهر',\n 'شهر واحد',\n ['شهران', 'شهرين'],\n '%d أشهر',\n '%d شهرا',\n '%d شهر',\n ],\n y: [\n 'أقل من عام',\n 'عام واحد',\n ['عامان', 'عامين'],\n '%d أعوام',\n '%d عامًا',\n '%d عام',\n ],\n },\n pluralize = function (u) {\n return function (number, withoutSuffix, string, isFuture) {\n var f = pluralForm(number),\n str = plurals[u][pluralForm(number)];\n if (f === 2) {\n str = str[withoutSuffix ? 0 : 1];\n }\n return str.replace(/%d/i, number);\n };\n },\n months = [\n 'جانفي',\n 'فيفري',\n 'مارس',\n 'أفريل',\n 'ماي',\n 'جوان',\n 'جويلية',\n 'أوت',\n 'سبتمبر',\n 'أكتوبر',\n 'نوفمبر',\n 'ديسمبر',\n ];\n\n var arDz = moment.defineLocale('ar-dz', {\n months: months,\n monthsShort: months,\n weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),\n weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'D/\\u200FM/\\u200FYYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n meridiemParse: /ص|م/,\n isPM: function (input) {\n return 'م' === input;\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 12) {\n return 'ص';\n } else {\n return 'م';\n }\n },\n calendar: {\n sameDay: '[اليوم عند الساعة] LT',\n nextDay: '[غدًا عند الساعة] LT',\n nextWeek: 'dddd [عند الساعة] LT',\n lastDay: '[أمس عند الساعة] LT',\n lastWeek: 'dddd [عند الساعة] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'بعد %s',\n past: 'منذ %s',\n s: pluralize('s'),\n ss: pluralize('s'),\n m: pluralize('m'),\n mm: pluralize('m'),\n h: pluralize('h'),\n hh: pluralize('h'),\n d: pluralize('d'),\n dd: pluralize('d'),\n M: pluralize('M'),\n MM: pluralize('M'),\n y: pluralize('y'),\n yy: pluralize('y'),\n },\n postformat: function (string) {\n return string.replace(/,/g, '،');\n },\n week: {\n dow: 0, // Sunday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return arDz;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/ar-dz.js?", + ); + + /***/ + }, + + /***/ 8676: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Arabic (Kuwait) [ar-kw]\n//! author : Nusret Parlak: https://github.com/nusretparlak\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var arKw = moment.defineLocale('ar-kw', {\n months: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(\n '_'\n ),\n monthsShort:\n 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(\n '_'\n ),\n weekdays: 'الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n weekdaysShort: 'احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'),\n weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[اليوم على الساعة] LT',\n nextDay: '[غدا على الساعة] LT',\n nextWeek: 'dddd [على الساعة] LT',\n lastDay: '[أمس على الساعة] LT',\n lastWeek: 'dddd [على الساعة] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'في %s',\n past: 'منذ %s',\n s: 'ثوان',\n ss: '%d ثانية',\n m: 'دقيقة',\n mm: '%d دقائق',\n h: 'ساعة',\n hh: '%d ساعات',\n d: 'يوم',\n dd: '%d أيام',\n M: 'شهر',\n MM: '%d أشهر',\n y: 'سنة',\n yy: '%d سنوات',\n },\n week: {\n dow: 0, // Sunday is the first day of the week.\n doy: 12, // The week that contains Jan 12th is the first week of the year.\n },\n });\n\n return arKw;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/ar-kw.js?", + ); + + /***/ + }, + + /***/ 2353: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Arabic (Libya) [ar-ly]\n//! author : Ali Hmer: https://github.com/kikoanis\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var symbolMap = {\n 1: '1',\n 2: '2',\n 3: '3',\n 4: '4',\n 5: '5',\n 6: '6',\n 7: '7',\n 8: '8',\n 9: '9',\n 0: '0',\n },\n pluralForm = function (n) {\n return n === 0\n ? 0\n : n === 1\n ? 1\n : n === 2\n ? 2\n : n % 100 >= 3 && n % 100 <= 10\n ? 3\n : n % 100 >= 11\n ? 4\n : 5;\n },\n plurals = {\n s: [\n 'أقل من ثانية',\n 'ثانية واحدة',\n ['ثانيتان', 'ثانيتين'],\n '%d ثوان',\n '%d ثانية',\n '%d ثانية',\n ],\n m: [\n 'أقل من دقيقة',\n 'دقيقة واحدة',\n ['دقيقتان', 'دقيقتين'],\n '%d دقائق',\n '%d دقيقة',\n '%d دقيقة',\n ],\n h: [\n 'أقل من ساعة',\n 'ساعة واحدة',\n ['ساعتان', 'ساعتين'],\n '%d ساعات',\n '%d ساعة',\n '%d ساعة',\n ],\n d: [\n 'أقل من يوم',\n 'يوم واحد',\n ['يومان', 'يومين'],\n '%d أيام',\n '%d يومًا',\n '%d يوم',\n ],\n M: [\n 'أقل من شهر',\n 'شهر واحد',\n ['شهران', 'شهرين'],\n '%d أشهر',\n '%d شهرا',\n '%d شهر',\n ],\n y: [\n 'أقل من عام',\n 'عام واحد',\n ['عامان', 'عامين'],\n '%d أعوام',\n '%d عامًا',\n '%d عام',\n ],\n },\n pluralize = function (u) {\n return function (number, withoutSuffix, string, isFuture) {\n var f = pluralForm(number),\n str = plurals[u][pluralForm(number)];\n if (f === 2) {\n str = str[withoutSuffix ? 0 : 1];\n }\n return str.replace(/%d/i, number);\n };\n },\n months = [\n 'يناير',\n 'فبراير',\n 'مارس',\n 'أبريل',\n 'مايو',\n 'يونيو',\n 'يوليو',\n 'أغسطس',\n 'سبتمبر',\n 'أكتوبر',\n 'نوفمبر',\n 'ديسمبر',\n ];\n\n var arLy = moment.defineLocale('ar-ly', {\n months: months,\n monthsShort: months,\n weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),\n weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'D/\\u200FM/\\u200FYYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n meridiemParse: /ص|م/,\n isPM: function (input) {\n return 'م' === input;\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 12) {\n return 'ص';\n } else {\n return 'م';\n }\n },\n calendar: {\n sameDay: '[اليوم عند الساعة] LT',\n nextDay: '[غدًا عند الساعة] LT',\n nextWeek: 'dddd [عند الساعة] LT',\n lastDay: '[أمس عند الساعة] LT',\n lastWeek: 'dddd [عند الساعة] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'بعد %s',\n past: 'منذ %s',\n s: pluralize('s'),\n ss: pluralize('s'),\n m: pluralize('m'),\n mm: pluralize('m'),\n h: pluralize('h'),\n hh: pluralize('h'),\n d: pluralize('d'),\n dd: pluralize('d'),\n M: pluralize('M'),\n MM: pluralize('M'),\n y: pluralize('y'),\n yy: pluralize('y'),\n },\n preparse: function (string) {\n return string.replace(/،/g, ',');\n },\n postformat: function (string) {\n return string\n .replace(/\\d/g, function (match) {\n return symbolMap[match];\n })\n .replace(/,/g, '،');\n },\n week: {\n dow: 6, // Saturday is the first day of the week.\n doy: 12, // The week that contains Jan 12th is the first week of the year.\n },\n });\n\n return arLy;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/ar-ly.js?", + ); + + /***/ + }, + + /***/ 4496: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Arabic (Morocco) [ar-ma]\n//! author : ElFadili Yassine : https://github.com/ElFadiliY\n//! author : Abdel Said : https://github.com/abdelsaid\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var arMa = moment.defineLocale('ar-ma', {\n months: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(\n '_'\n ),\n monthsShort:\n 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(\n '_'\n ),\n weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n weekdaysShort: 'احد_اثنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'),\n weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[اليوم على الساعة] LT',\n nextDay: '[غدا على الساعة] LT',\n nextWeek: 'dddd [على الساعة] LT',\n lastDay: '[أمس على الساعة] LT',\n lastWeek: 'dddd [على الساعة] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'في %s',\n past: 'منذ %s',\n s: 'ثوان',\n ss: '%d ثانية',\n m: 'دقيقة',\n mm: '%d دقائق',\n h: 'ساعة',\n hh: '%d ساعات',\n d: 'يوم',\n dd: '%d أيام',\n M: 'شهر',\n MM: '%d أشهر',\n y: 'سنة',\n yy: '%d سنوات',\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return arMa;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/ar-ma.js?", + ); + + /***/ + }, + + /***/ 6947: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Arabic (Palestine) [ar-ps]\n//! author : Majd Al-Shihabi : https://github.com/majdal\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var symbolMap = {\n 1: '١',\n 2: '٢',\n 3: '٣',\n 4: '٤',\n 5: '٥',\n 6: '٦',\n 7: '٧',\n 8: '٨',\n 9: '٩',\n 0: '٠',\n },\n numberMap = {\n '١': '1',\n '٢': '2',\n '٣': '3',\n '٤': '4',\n '٥': '5',\n '٦': '6',\n '٧': '7',\n '٨': '8',\n '٩': '9',\n '٠': '0',\n };\n\n var arPs = moment.defineLocale('ar-ps', {\n months: 'كانون الثاني_شباط_آذار_نيسان_أيّار_حزيران_تمّوز_آب_أيلول_تشري الأوّل_تشرين الثاني_كانون الأوّل'.split(\n '_'\n ),\n monthsShort:\n 'ك٢_شباط_آذار_نيسان_أيّار_حزيران_تمّوز_آب_أيلول_ت١_ت٢_ك١'.split('_'),\n weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),\n weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n meridiemParse: /ص|م/,\n isPM: function (input) {\n return 'م' === input;\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 12) {\n return 'ص';\n } else {\n return 'م';\n }\n },\n calendar: {\n sameDay: '[اليوم على الساعة] LT',\n nextDay: '[غدا على الساعة] LT',\n nextWeek: 'dddd [على الساعة] LT',\n lastDay: '[أمس على الساعة] LT',\n lastWeek: 'dddd [على الساعة] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'في %s',\n past: 'منذ %s',\n s: 'ثوان',\n ss: '%d ثانية',\n m: 'دقيقة',\n mm: '%d دقائق',\n h: 'ساعة',\n hh: '%d ساعات',\n d: 'يوم',\n dd: '%d أيام',\n M: 'شهر',\n MM: '%d أشهر',\n y: 'سنة',\n yy: '%d سنوات',\n },\n preparse: function (string) {\n return string\n .replace(/[٣٤٥٦٧٨٩٠]/g, function (match) {\n return numberMap[match];\n })\n .split('') // reversed since negative lookbehind not supported everywhere\n .reverse()\n .join('')\n .replace(/[١٢](?![\\u062a\\u0643])/g, function (match) {\n return numberMap[match];\n })\n .split('')\n .reverse()\n .join('')\n .replace(/،/g, ',');\n },\n postformat: function (string) {\n return string\n .replace(/\\d/g, function (match) {\n return symbolMap[match];\n })\n .replace(/,/g, '،');\n },\n week: {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n },\n });\n\n return arPs;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/ar-ps.js?", + ); + + /***/ + }, + + /***/ 2682: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Arabic (Saudi Arabia) [ar-sa]\n//! author : Suhail Alkowaileet : https://github.com/xsoh\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var symbolMap = {\n 1: '١',\n 2: '٢',\n 3: '٣',\n 4: '٤',\n 5: '٥',\n 6: '٦',\n 7: '٧',\n 8: '٨',\n 9: '٩',\n 0: '٠',\n },\n numberMap = {\n '١': '1',\n '٢': '2',\n '٣': '3',\n '٤': '4',\n '٥': '5',\n '٦': '6',\n '٧': '7',\n '٨': '8',\n '٩': '9',\n '٠': '0',\n };\n\n var arSa = moment.defineLocale('ar-sa', {\n months: 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(\n '_'\n ),\n monthsShort:\n 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(\n '_'\n ),\n weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),\n weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n meridiemParse: /ص|م/,\n isPM: function (input) {\n return 'م' === input;\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 12) {\n return 'ص';\n } else {\n return 'م';\n }\n },\n calendar: {\n sameDay: '[اليوم على الساعة] LT',\n nextDay: '[غدا على الساعة] LT',\n nextWeek: 'dddd [على الساعة] LT',\n lastDay: '[أمس على الساعة] LT',\n lastWeek: 'dddd [على الساعة] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'في %s',\n past: 'منذ %s',\n s: 'ثوان',\n ss: '%d ثانية',\n m: 'دقيقة',\n mm: '%d دقائق',\n h: 'ساعة',\n hh: '%d ساعات',\n d: 'يوم',\n dd: '%d أيام',\n M: 'شهر',\n MM: '%d أشهر',\n y: 'سنة',\n yy: '%d سنوات',\n },\n preparse: function (string) {\n return string\n .replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {\n return numberMap[match];\n })\n .replace(/،/g, ',');\n },\n postformat: function (string) {\n return string\n .replace(/\\d/g, function (match) {\n return symbolMap[match];\n })\n .replace(/,/g, '،');\n },\n week: {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n },\n });\n\n return arSa;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/ar-sa.js?", + ); + + /***/ + }, + + /***/ 9756: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Arabic (Tunisia) [ar-tn]\n//! author : Nader Toukabri : https://github.com/naderio\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var arTn = moment.defineLocale('ar-tn', {\n months: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(\n '_'\n ),\n monthsShort:\n 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(\n '_'\n ),\n weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),\n weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[اليوم على الساعة] LT',\n nextDay: '[غدا على الساعة] LT',\n nextWeek: 'dddd [على الساعة] LT',\n lastDay: '[أمس على الساعة] LT',\n lastWeek: 'dddd [على الساعة] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'في %s',\n past: 'منذ %s',\n s: 'ثوان',\n ss: '%d ثانية',\n m: 'دقيقة',\n mm: '%d دقائق',\n h: 'ساعة',\n hh: '%d ساعات',\n d: 'يوم',\n dd: '%d أيام',\n M: 'شهر',\n MM: '%d أشهر',\n y: 'سنة',\n yy: '%d سنوات',\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return arTn;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/ar-tn.js?", + ); + + /***/ + }, + + /***/ 1509: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Arabic [ar]\n//! author : Abdel Said: https://github.com/abdelsaid\n//! author : Ahmed Elkhatib\n//! author : forabi https://github.com/forabi\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var symbolMap = {\n 1: '١',\n 2: '٢',\n 3: '٣',\n 4: '٤',\n 5: '٥',\n 6: '٦',\n 7: '٧',\n 8: '٨',\n 9: '٩',\n 0: '٠',\n },\n numberMap = {\n '١': '1',\n '٢': '2',\n '٣': '3',\n '٤': '4',\n '٥': '5',\n '٦': '6',\n '٧': '7',\n '٨': '8',\n '٩': '9',\n '٠': '0',\n },\n pluralForm = function (n) {\n return n === 0\n ? 0\n : n === 1\n ? 1\n : n === 2\n ? 2\n : n % 100 >= 3 && n % 100 <= 10\n ? 3\n : n % 100 >= 11\n ? 4\n : 5;\n },\n plurals = {\n s: [\n 'أقل من ثانية',\n 'ثانية واحدة',\n ['ثانيتان', 'ثانيتين'],\n '%d ثوان',\n '%d ثانية',\n '%d ثانية',\n ],\n m: [\n 'أقل من دقيقة',\n 'دقيقة واحدة',\n ['دقيقتان', 'دقيقتين'],\n '%d دقائق',\n '%d دقيقة',\n '%d دقيقة',\n ],\n h: [\n 'أقل من ساعة',\n 'ساعة واحدة',\n ['ساعتان', 'ساعتين'],\n '%d ساعات',\n '%d ساعة',\n '%d ساعة',\n ],\n d: [\n 'أقل من يوم',\n 'يوم واحد',\n ['يومان', 'يومين'],\n '%d أيام',\n '%d يومًا',\n '%d يوم',\n ],\n M: [\n 'أقل من شهر',\n 'شهر واحد',\n ['شهران', 'شهرين'],\n '%d أشهر',\n '%d شهرا',\n '%d شهر',\n ],\n y: [\n 'أقل من عام',\n 'عام واحد',\n ['عامان', 'عامين'],\n '%d أعوام',\n '%d عامًا',\n '%d عام',\n ],\n },\n pluralize = function (u) {\n return function (number, withoutSuffix, string, isFuture) {\n var f = pluralForm(number),\n str = plurals[u][pluralForm(number)];\n if (f === 2) {\n str = str[withoutSuffix ? 0 : 1];\n }\n return str.replace(/%d/i, number);\n };\n },\n months = [\n 'يناير',\n 'فبراير',\n 'مارس',\n 'أبريل',\n 'مايو',\n 'يونيو',\n 'يوليو',\n 'أغسطس',\n 'سبتمبر',\n 'أكتوبر',\n 'نوفمبر',\n 'ديسمبر',\n ];\n\n var ar = moment.defineLocale('ar', {\n months: months,\n monthsShort: months,\n weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),\n weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'D/\\u200FM/\\u200FYYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n meridiemParse: /ص|م/,\n isPM: function (input) {\n return 'م' === input;\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 12) {\n return 'ص';\n } else {\n return 'م';\n }\n },\n calendar: {\n sameDay: '[اليوم عند الساعة] LT',\n nextDay: '[غدًا عند الساعة] LT',\n nextWeek: 'dddd [عند الساعة] LT',\n lastDay: '[أمس عند الساعة] LT',\n lastWeek: 'dddd [عند الساعة] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'بعد %s',\n past: 'منذ %s',\n s: pluralize('s'),\n ss: pluralize('s'),\n m: pluralize('m'),\n mm: pluralize('m'),\n h: pluralize('h'),\n hh: pluralize('h'),\n d: pluralize('d'),\n dd: pluralize('d'),\n M: pluralize('M'),\n MM: pluralize('M'),\n y: pluralize('y'),\n yy: pluralize('y'),\n },\n preparse: function (string) {\n return string\n .replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {\n return numberMap[match];\n })\n .replace(/،/g, ',');\n },\n postformat: function (string) {\n return string\n .replace(/\\d/g, function (match) {\n return symbolMap[match];\n })\n .replace(/,/g, '،');\n },\n week: {\n dow: 6, // Saturday is the first day of the week.\n doy: 12, // The week that contains Jan 12th is the first week of the year.\n },\n });\n\n return ar;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/ar.js?", + ); + + /***/ + }, + + /***/ 5533: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Azerbaijani [az]\n//! author : topchiyev : https://github.com/topchiyev\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var suffixes = {\n 1: '-inci',\n 5: '-inci',\n 8: '-inci',\n 70: '-inci',\n 80: '-inci',\n 2: '-nci',\n 7: '-nci',\n 20: '-nci',\n 50: '-nci',\n 3: '-üncü',\n 4: '-üncü',\n 100: '-üncü',\n 6: '-ncı',\n 9: '-uncu',\n 10: '-uncu',\n 30: '-uncu',\n 60: '-ıncı',\n 90: '-ıncı',\n };\n\n var az = moment.defineLocale('az', {\n months: 'yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr'.split(\n '_'\n ),\n monthsShort: 'yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek'.split('_'),\n weekdays:\n 'Bazar_Bazar ertəsi_Çərşənbə axşamı_Çərşənbə_Cümə axşamı_Cümə_Şənbə'.split(\n '_'\n ),\n weekdaysShort: 'Baz_BzE_ÇAx_Çər_CAx_Cüm_Şən'.split('_'),\n weekdaysMin: 'Bz_BE_ÇA_Çə_CA_Cü_Şə'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[bugün saat] LT',\n nextDay: '[sabah saat] LT',\n nextWeek: '[gələn həftə] dddd [saat] LT',\n lastDay: '[dünən] LT',\n lastWeek: '[keçən həftə] dddd [saat] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s sonra',\n past: '%s əvvəl',\n s: 'bir neçə saniyə',\n ss: '%d saniyə',\n m: 'bir dəqiqə',\n mm: '%d dəqiqə',\n h: 'bir saat',\n hh: '%d saat',\n d: 'bir gün',\n dd: '%d gün',\n M: 'bir ay',\n MM: '%d ay',\n y: 'bir il',\n yy: '%d il',\n },\n meridiemParse: /gecə|səhər|gündüz|axşam/,\n isPM: function (input) {\n return /^(gündüz|axşam)$/.test(input);\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 4) {\n return 'gecə';\n } else if (hour < 12) {\n return 'səhər';\n } else if (hour < 17) {\n return 'gündüz';\n } else {\n return 'axşam';\n }\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-(ıncı|inci|nci|üncü|ncı|uncu)/,\n ordinal: function (number) {\n if (number === 0) {\n // special case for zero\n return number + '-ıncı';\n }\n var a = number % 10,\n b = (number % 100) - a,\n c = number >= 100 ? 100 : null;\n return number + (suffixes[a] || suffixes[b] || suffixes[c]);\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return az;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/az.js?", + ); + + /***/ + }, + + /***/ 8959: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Belarusian [be]\n//! author : Dmitry Demidov : https://github.com/demidov91\n//! author: Praleska: http://praleska.pro/\n//! Author : Menelion Elensúle : https://github.com/Oire\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function plural(word, num) {\n var forms = word.split('_');\n return num % 10 === 1 && num % 100 !== 11\n ? forms[0]\n : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20)\n ? forms[1]\n : forms[2];\n }\n function relativeTimeWithPlural(number, withoutSuffix, key) {\n var format = {\n ss: withoutSuffix ? 'секунда_секунды_секунд' : 'секунду_секунды_секунд',\n mm: withoutSuffix ? 'хвіліна_хвіліны_хвілін' : 'хвіліну_хвіліны_хвілін',\n hh: withoutSuffix ? 'гадзіна_гадзіны_гадзін' : 'гадзіну_гадзіны_гадзін',\n dd: 'дзень_дні_дзён',\n MM: 'месяц_месяцы_месяцаў',\n yy: 'год_гады_гадоў',\n };\n if (key === 'm') {\n return withoutSuffix ? 'хвіліна' : 'хвіліну';\n } else if (key === 'h') {\n return withoutSuffix ? 'гадзіна' : 'гадзіну';\n } else {\n return number + ' ' + plural(format[key], +number);\n }\n }\n\n var be = moment.defineLocale('be', {\n months: {\n format: 'студзеня_лютага_сакавіка_красавіка_траўня_чэрвеня_ліпеня_жніўня_верасня_кастрычніка_лістапада_снежня'.split(\n '_'\n ),\n standalone:\n 'студзень_люты_сакавік_красавік_травень_чэрвень_ліпень_жнівень_верасень_кастрычнік_лістапад_снежань'.split(\n '_'\n ),\n },\n monthsShort:\n 'студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж'.split('_'),\n weekdays: {\n format: 'нядзелю_панядзелак_аўторак_сераду_чацвер_пятніцу_суботу'.split(\n '_'\n ),\n standalone:\n 'нядзеля_панядзелак_аўторак_серада_чацвер_пятніца_субота'.split(\n '_'\n ),\n isFormat: /\\[ ?[Ууў] ?(?:мінулую|наступную)? ?\\] ?dddd/,\n },\n weekdaysShort: 'нд_пн_ат_ср_чц_пт_сб'.split('_'),\n weekdaysMin: 'нд_пн_ат_ср_чц_пт_сб'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY г.',\n LLL: 'D MMMM YYYY г., HH:mm',\n LLLL: 'dddd, D MMMM YYYY г., HH:mm',\n },\n calendar: {\n sameDay: '[Сёння ў] LT',\n nextDay: '[Заўтра ў] LT',\n lastDay: '[Учора ў] LT',\n nextWeek: function () {\n return '[У] dddd [ў] LT';\n },\n lastWeek: function () {\n switch (this.day()) {\n case 0:\n case 3:\n case 5:\n case 6:\n return '[У мінулую] dddd [ў] LT';\n case 1:\n case 2:\n case 4:\n return '[У мінулы] dddd [ў] LT';\n }\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'праз %s',\n past: '%s таму',\n s: 'некалькі секунд',\n m: relativeTimeWithPlural,\n mm: relativeTimeWithPlural,\n h: relativeTimeWithPlural,\n hh: relativeTimeWithPlural,\n d: 'дзень',\n dd: relativeTimeWithPlural,\n M: 'месяц',\n MM: relativeTimeWithPlural,\n y: 'год',\n yy: relativeTimeWithPlural,\n },\n meridiemParse: /ночы|раніцы|дня|вечара/,\n isPM: function (input) {\n return /^(дня|вечара)$/.test(input);\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 4) {\n return 'ночы';\n } else if (hour < 12) {\n return 'раніцы';\n } else if (hour < 17) {\n return 'дня';\n } else {\n return 'вечара';\n }\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-(і|ы|га)/,\n ordinal: function (number, period) {\n switch (period) {\n case 'M':\n case 'd':\n case 'DDD':\n case 'w':\n case 'W':\n return (number % 10 === 2 || number % 10 === 3) &&\n number % 100 !== 12 &&\n number % 100 !== 13\n ? number + '-і'\n : number + '-ы';\n case 'D':\n return number + '-га';\n default:\n return number;\n }\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return be;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/be.js?", + ); + + /***/ + }, + + /***/ 7777: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Bulgarian [bg]\n//! author : Krasen Borisov : https://github.com/kraz\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var bg = moment.defineLocale('bg', {\n months: 'януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември'.split(\n '_'\n ),\n monthsShort: 'яну_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек'.split('_'),\n weekdays: 'неделя_понеделник_вторник_сряда_четвъртък_петък_събота'.split(\n '_'\n ),\n weekdaysShort: 'нед_пон_вто_сря_чет_пет_съб'.split('_'),\n weekdaysMin: 'нд_пн_вт_ср_чт_пт_сб'.split('_'),\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'D.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY H:mm',\n LLLL: 'dddd, D MMMM YYYY H:mm',\n },\n calendar: {\n sameDay: '[Днес в] LT',\n nextDay: '[Утре в] LT',\n nextWeek: 'dddd [в] LT',\n lastDay: '[Вчера в] LT',\n lastWeek: function () {\n switch (this.day()) {\n case 0:\n case 3:\n case 6:\n return '[Миналата] dddd [в] LT';\n case 1:\n case 2:\n case 4:\n case 5:\n return '[Миналия] dddd [в] LT';\n }\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'след %s',\n past: 'преди %s',\n s: 'няколко секунди',\n ss: '%d секунди',\n m: 'минута',\n mm: '%d минути',\n h: 'час',\n hh: '%d часа',\n d: 'ден',\n dd: '%d дена',\n w: 'седмица',\n ww: '%d седмици',\n M: 'месец',\n MM: '%d месеца',\n y: 'година',\n yy: '%d години',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-(ев|ен|ти|ви|ри|ми)/,\n ordinal: function (number) {\n var lastDigit = number % 10,\n last2Digits = number % 100;\n if (number === 0) {\n return number + '-ев';\n } else if (last2Digits === 0) {\n return number + '-ен';\n } else if (last2Digits > 10 && last2Digits < 20) {\n return number + '-ти';\n } else if (lastDigit === 1) {\n return number + '-ви';\n } else if (lastDigit === 2) {\n return number + '-ри';\n } else if (lastDigit === 7 || lastDigit === 8) {\n return number + '-ми';\n } else {\n return number + '-ти';\n }\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return bg;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/bg.js?", + ); + + /***/ + }, + + /***/ 4903: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Bambara [bm]\n//! author : Estelle Comment : https://github.com/estellecomment\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var bm = moment.defineLocale('bm', {\n months: 'Zanwuyekalo_Fewuruyekalo_Marisikalo_Awirilikalo_Mɛkalo_Zuwɛnkalo_Zuluyekalo_Utikalo_Sɛtanburukalo_ɔkutɔburukalo_Nowanburukalo_Desanburukalo'.split(\n '_'\n ),\n monthsShort: 'Zan_Few_Mar_Awi_Mɛ_Zuw_Zul_Uti_Sɛt_ɔku_Now_Des'.split('_'),\n weekdays: 'Kari_Ntɛnɛn_Tarata_Araba_Alamisa_Juma_Sibiri'.split('_'),\n weekdaysShort: 'Kar_Ntɛ_Tar_Ara_Ala_Jum_Sib'.split('_'),\n weekdaysMin: 'Ka_Nt_Ta_Ar_Al_Ju_Si'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'MMMM [tile] D [san] YYYY',\n LLL: 'MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm',\n LLLL: 'dddd MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm',\n },\n calendar: {\n sameDay: '[Bi lɛrɛ] LT',\n nextDay: '[Sini lɛrɛ] LT',\n nextWeek: 'dddd [don lɛrɛ] LT',\n lastDay: '[Kunu lɛrɛ] LT',\n lastWeek: 'dddd [tɛmɛnen lɛrɛ] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s kɔnɔ',\n past: 'a bɛ %s bɔ',\n s: 'sanga dama dama',\n ss: 'sekondi %d',\n m: 'miniti kelen',\n mm: 'miniti %d',\n h: 'lɛrɛ kelen',\n hh: 'lɛrɛ %d',\n d: 'tile kelen',\n dd: 'tile %d',\n M: 'kalo kelen',\n MM: 'kalo %d',\n y: 'san kelen',\n yy: 'san %d',\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return bm;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/bm.js?", + ); + + /***/ + }, + + /***/ 7357: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Bengali (Bangladesh) [bn-bd]\n//! author : Asraf Hossain Patoary : https://github.com/ashwoolford\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var symbolMap = {\n 1: '১',\n 2: '২',\n 3: '৩',\n 4: '৪',\n 5: '৫',\n 6: '৬',\n 7: '৭',\n 8: '৮',\n 9: '৯',\n 0: '০',\n },\n numberMap = {\n '১': '1',\n '২': '2',\n '৩': '3',\n '৪': '4',\n '৫': '5',\n '৬': '6',\n '৭': '7',\n '৮': '8',\n '৯': '9',\n '০': '0',\n };\n\n var bnBd = moment.defineLocale('bn-bd', {\n months: 'জানুয়ারি_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর'.split(\n '_'\n ),\n monthsShort:\n 'জানু_ফেব্রু_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্ট_অক্টো_নভে_ডিসে'.split(\n '_'\n ),\n weekdays: 'রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার'.split(\n '_'\n ),\n weekdaysShort: 'রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি'.split('_'),\n weekdaysMin: 'রবি_সোম_মঙ্গল_বুধ_বৃহ_শুক্র_শনি'.split('_'),\n longDateFormat: {\n LT: 'A h:mm সময়',\n LTS: 'A h:mm:ss সময়',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, A h:mm সময়',\n LLLL: 'dddd, D MMMM YYYY, A h:mm সময়',\n },\n calendar: {\n sameDay: '[আজ] LT',\n nextDay: '[আগামীকাল] LT',\n nextWeek: 'dddd, LT',\n lastDay: '[গতকাল] LT',\n lastWeek: '[গত] dddd, LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s পরে',\n past: '%s আগে',\n s: 'কয়েক সেকেন্ড',\n ss: '%d সেকেন্ড',\n m: 'এক মিনিট',\n mm: '%d মিনিট',\n h: 'এক ঘন্টা',\n hh: '%d ঘন্টা',\n d: 'এক দিন',\n dd: '%d দিন',\n M: 'এক মাস',\n MM: '%d মাস',\n y: 'এক বছর',\n yy: '%d বছর',\n },\n preparse: function (string) {\n return string.replace(/[১২৩৪৫৬৭৮৯০]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function (string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n\n meridiemParse: /রাত|ভোর|সকাল|দুপুর|বিকাল|সন্ধ্যা|রাত/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'রাত') {\n return hour < 4 ? hour : hour + 12;\n } else if (meridiem === 'ভোর') {\n return hour;\n } else if (meridiem === 'সকাল') {\n return hour;\n } else if (meridiem === 'দুপুর') {\n return hour >= 3 ? hour : hour + 12;\n } else if (meridiem === 'বিকাল') {\n return hour + 12;\n } else if (meridiem === 'সন্ধ্যা') {\n return hour + 12;\n }\n },\n\n meridiem: function (hour, minute, isLower) {\n if (hour < 4) {\n return 'রাত';\n } else if (hour < 6) {\n return 'ভোর';\n } else if (hour < 12) {\n return 'সকাল';\n } else if (hour < 15) {\n return 'দুপুর';\n } else if (hour < 18) {\n return 'বিকাল';\n } else if (hour < 20) {\n return 'সন্ধ্যা';\n } else {\n return 'রাত';\n }\n },\n week: {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n },\n });\n\n return bnBd;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/bn-bd.js?", + ); + + /***/ + }, + + /***/ 1290: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Bengali [bn]\n//! author : Kaushik Gandhi : https://github.com/kaushikgandhi\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var symbolMap = {\n 1: '১',\n 2: '২',\n 3: '৩',\n 4: '৪',\n 5: '৫',\n 6: '৬',\n 7: '৭',\n 8: '৮',\n 9: '৯',\n 0: '০',\n },\n numberMap = {\n '১': '1',\n '২': '2',\n '৩': '3',\n '৪': '4',\n '৫': '5',\n '৬': '6',\n '৭': '7',\n '৮': '8',\n '৯': '9',\n '০': '0',\n };\n\n var bn = moment.defineLocale('bn', {\n months: 'জানুয়ারি_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর'.split(\n '_'\n ),\n monthsShort:\n 'জানু_ফেব্রু_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্ট_অক্টো_নভে_ডিসে'.split(\n '_'\n ),\n weekdays: 'রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার'.split(\n '_'\n ),\n weekdaysShort: 'রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি'.split('_'),\n weekdaysMin: 'রবি_সোম_মঙ্গল_বুধ_বৃহ_শুক্র_শনি'.split('_'),\n longDateFormat: {\n LT: 'A h:mm সময়',\n LTS: 'A h:mm:ss সময়',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, A h:mm সময়',\n LLLL: 'dddd, D MMMM YYYY, A h:mm সময়',\n },\n calendar: {\n sameDay: '[আজ] LT',\n nextDay: '[আগামীকাল] LT',\n nextWeek: 'dddd, LT',\n lastDay: '[গতকাল] LT',\n lastWeek: '[গত] dddd, LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s পরে',\n past: '%s আগে',\n s: 'কয়েক সেকেন্ড',\n ss: '%d সেকেন্ড',\n m: 'এক মিনিট',\n mm: '%d মিনিট',\n h: 'এক ঘন্টা',\n hh: '%d ঘন্টা',\n d: 'এক দিন',\n dd: '%d দিন',\n M: 'এক মাস',\n MM: '%d মাস',\n y: 'এক বছর',\n yy: '%d বছর',\n },\n preparse: function (string) {\n return string.replace(/[১২৩৪৫৬৭৮৯০]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function (string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n meridiemParse: /রাত|সকাল|দুপুর|বিকাল|রাত/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (\n (meridiem === 'রাত' && hour >= 4) ||\n (meridiem === 'দুপুর' && hour < 5) ||\n meridiem === 'বিকাল'\n ) {\n return hour + 12;\n } else {\n return hour;\n }\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 4) {\n return 'রাত';\n } else if (hour < 10) {\n return 'সকাল';\n } else if (hour < 17) {\n return 'দুপুর';\n } else if (hour < 20) {\n return 'বিকাল';\n } else {\n return 'রাত';\n }\n },\n week: {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n },\n });\n\n return bn;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/bn.js?", + ); + + /***/ + }, + + /***/ 1545: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Tibetan [bo]\n//! author : Thupten N. Chakrishar : https://github.com/vajradog\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var symbolMap = {\n 1: '༡',\n 2: '༢',\n 3: '༣',\n 4: '༤',\n 5: '༥',\n 6: '༦',\n 7: '༧',\n 8: '༨',\n 9: '༩',\n 0: '༠',\n },\n numberMap = {\n '༡': '1',\n '༢': '2',\n '༣': '3',\n '༤': '4',\n '༥': '5',\n '༦': '6',\n '༧': '7',\n '༨': '8',\n '༩': '9',\n '༠': '0',\n };\n\n var bo = moment.defineLocale('bo', {\n months: 'ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ'.split(\n '_'\n ),\n monthsShort:\n 'ཟླ་1_ཟླ་2_ཟླ་3_ཟླ་4_ཟླ་5_ཟླ་6_ཟླ་7_ཟླ་8_ཟླ་9_ཟླ་10_ཟླ་11_ཟླ་12'.split(\n '_'\n ),\n monthsShortRegex: /^(ཟླ་\\d{1,2})/,\n monthsParseExact: true,\n weekdays:\n 'གཟའ་ཉི་མ་_གཟའ་ཟླ་བ་_གཟའ་མིག་དམར་_གཟའ་ལྷག་པ་_གཟའ་ཕུར་བུ_གཟའ་པ་སངས་_གཟའ་སྤེན་པ་'.split(\n '_'\n ),\n weekdaysShort: 'ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་'.split(\n '_'\n ),\n weekdaysMin: 'ཉི_ཟླ_མིག_ལྷག_ཕུར_སངས_སྤེན'.split('_'),\n longDateFormat: {\n LT: 'A h:mm',\n LTS: 'A h:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, A h:mm',\n LLLL: 'dddd, D MMMM YYYY, A h:mm',\n },\n calendar: {\n sameDay: '[དི་རིང] LT',\n nextDay: '[སང་ཉིན] LT',\n nextWeek: '[བདུན་ཕྲག་རྗེས་མ], LT',\n lastDay: '[ཁ་སང] LT',\n lastWeek: '[བདུན་ཕྲག་མཐའ་མ] dddd, LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s ལ་',\n past: '%s སྔན་ལ',\n s: 'ལམ་སང',\n ss: '%d སྐར་ཆ།',\n m: 'སྐར་མ་གཅིག',\n mm: '%d སྐར་མ',\n h: 'ཆུ་ཚོད་གཅིག',\n hh: '%d ཆུ་ཚོད',\n d: 'ཉིན་གཅིག',\n dd: '%d ཉིན་',\n M: 'ཟླ་བ་གཅིག',\n MM: '%d ཟླ་བ',\n y: 'ལོ་གཅིག',\n yy: '%d ལོ',\n },\n preparse: function (string) {\n return string.replace(/[༡༢༣༤༥༦༧༨༩༠]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function (string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n meridiemParse: /མཚན་མོ|ཞོགས་ཀས|ཉིན་གུང|དགོང་དག|མཚན་མོ/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (\n (meridiem === 'མཚན་མོ' && hour >= 4) ||\n (meridiem === 'ཉིན་གུང' && hour < 5) ||\n meridiem === 'དགོང་དག'\n ) {\n return hour + 12;\n } else {\n return hour;\n }\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 4) {\n return 'མཚན་མོ';\n } else if (hour < 10) {\n return 'ཞོགས་ཀས';\n } else if (hour < 17) {\n return 'ཉིན་གུང';\n } else if (hour < 20) {\n return 'དགོང་དག';\n } else {\n return 'མཚན་མོ';\n }\n },\n week: {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n },\n });\n\n return bo;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/bo.js?", + ); + + /***/ + }, + + /***/ 1470: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Breton [br]\n//! author : Jean-Baptiste Le Duigou : https://github.com/jbleduigou\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function relativeTimeWithMutation(number, withoutSuffix, key) {\n var format = {\n mm: 'munutenn',\n MM: 'miz',\n dd: 'devezh',\n };\n return number + ' ' + mutation(format[key], number);\n }\n function specialMutationForYears(number) {\n switch (lastNumber(number)) {\n case 1:\n case 3:\n case 4:\n case 5:\n case 9:\n return number + ' bloaz';\n default:\n return number + ' vloaz';\n }\n }\n function lastNumber(number) {\n if (number > 9) {\n return lastNumber(number % 10);\n }\n return number;\n }\n function mutation(text, number) {\n if (number === 2) {\n return softMutation(text);\n }\n return text;\n }\n function softMutation(text) {\n var mutationTable = {\n m: 'v',\n b: 'v',\n d: 'z',\n };\n if (mutationTable[text.charAt(0)] === undefined) {\n return text;\n }\n return mutationTable[text.charAt(0)] + text.substring(1);\n }\n\n var monthsParse = [\n /^gen/i,\n /^c[ʼ\\']hwe/i,\n /^meu/i,\n /^ebr/i,\n /^mae/i,\n /^(mez|eve)/i,\n /^gou/i,\n /^eos/i,\n /^gwe/i,\n /^her/i,\n /^du/i,\n /^ker/i,\n ],\n monthsRegex =\n /^(genver|c[ʼ\\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu|gen|c[ʼ\\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,\n monthsStrictRegex =\n /^(genver|c[ʼ\\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu)/i,\n monthsShortStrictRegex =\n /^(gen|c[ʼ\\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,\n fullWeekdaysParse = [\n /^sul/i,\n /^lun/i,\n /^meurzh/i,\n /^merc[ʼ\\']her/i,\n /^yaou/i,\n /^gwener/i,\n /^sadorn/i,\n ],\n shortWeekdaysParse = [\n /^Sul/i,\n /^Lun/i,\n /^Meu/i,\n /^Mer/i,\n /^Yao/i,\n /^Gwe/i,\n /^Sad/i,\n ],\n minWeekdaysParse = [\n /^Su/i,\n /^Lu/i,\n /^Me([^r]|$)/i,\n /^Mer/i,\n /^Ya/i,\n /^Gw/i,\n /^Sa/i,\n ];\n\n var br = moment.defineLocale('br', {\n months: 'Genver_Cʼhwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu'.split(\n '_'\n ),\n monthsShort: 'Gen_Cʼhwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker'.split('_'),\n weekdays: 'Sul_Lun_Meurzh_Mercʼher_Yaou_Gwener_Sadorn'.split('_'),\n weekdaysShort: 'Sul_Lun_Meu_Mer_Yao_Gwe_Sad'.split('_'),\n weekdaysMin: 'Su_Lu_Me_Mer_Ya_Gw_Sa'.split('_'),\n weekdaysParse: minWeekdaysParse,\n fullWeekdaysParse: fullWeekdaysParse,\n shortWeekdaysParse: shortWeekdaysParse,\n minWeekdaysParse: minWeekdaysParse,\n\n monthsRegex: monthsRegex,\n monthsShortRegex: monthsRegex,\n monthsStrictRegex: monthsStrictRegex,\n monthsShortStrictRegex: monthsShortStrictRegex,\n monthsParse: monthsParse,\n longMonthsParse: monthsParse,\n shortMonthsParse: monthsParse,\n\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D [a viz] MMMM YYYY',\n LLL: 'D [a viz] MMMM YYYY HH:mm',\n LLLL: 'dddd, D [a viz] MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Hiziv da] LT',\n nextDay: '[Warcʼhoazh da] LT',\n nextWeek: 'dddd [da] LT',\n lastDay: '[Decʼh da] LT',\n lastWeek: 'dddd [paset da] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'a-benn %s',\n past: '%s ʼzo',\n s: 'un nebeud segondennoù',\n ss: '%d eilenn',\n m: 'ur vunutenn',\n mm: relativeTimeWithMutation,\n h: 'un eur',\n hh: '%d eur',\n d: 'un devezh',\n dd: relativeTimeWithMutation,\n M: 'ur miz',\n MM: relativeTimeWithMutation,\n y: 'ur bloaz',\n yy: specialMutationForYears,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(añ|vet)/,\n ordinal: function (number) {\n var output = number === 1 ? 'añ' : 'vet';\n return number + output;\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n meridiemParse: /a.m.|g.m./, // goude merenn | a-raok merenn\n isPM: function (token) {\n return token === 'g.m.';\n },\n meridiem: function (hour, minute, isLower) {\n return hour < 12 ? 'a.m.' : 'g.m.';\n },\n });\n\n return br;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/br.js?", + ); + + /***/ + }, + + /***/ 4429: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Bosnian [bs]\n//! author : Nedim Cholich : https://github.com/frontyard\n//! author : Rasid Redzic : https://github.com/rasidre\n//! based on (hr) translation by Bojan Marković\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function processRelativeTime(number, withoutSuffix, key, isFuture) {\n switch (key) {\n case 'm':\n return withoutSuffix\n ? 'jedna minuta'\n : isFuture\n ? 'jednu minutu'\n : 'jedne minute';\n }\n }\n\n function translate(number, withoutSuffix, key) {\n var result = number + ' ';\n switch (key) {\n case 'ss':\n if (number === 1) {\n result += 'sekunda';\n } else if (number === 2 || number === 3 || number === 4) {\n result += 'sekunde';\n } else {\n result += 'sekundi';\n }\n return result;\n case 'mm':\n if (number === 1) {\n result += 'minuta';\n } else if (number === 2 || number === 3 || number === 4) {\n result += 'minute';\n } else {\n result += 'minuta';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'jedan sat' : 'jedan sat';\n case 'hh':\n if (number === 1) {\n result += 'sat';\n } else if (number === 2 || number === 3 || number === 4) {\n result += 'sata';\n } else {\n result += 'sati';\n }\n return result;\n case 'dd':\n if (number === 1) {\n result += 'dan';\n } else {\n result += 'dana';\n }\n return result;\n case 'MM':\n if (number === 1) {\n result += 'mjesec';\n } else if (number === 2 || number === 3 || number === 4) {\n result += 'mjeseca';\n } else {\n result += 'mjeseci';\n }\n return result;\n case 'yy':\n if (number === 1) {\n result += 'godina';\n } else if (number === 2 || number === 3 || number === 4) {\n result += 'godine';\n } else {\n result += 'godina';\n }\n return result;\n }\n }\n\n var bs = moment.defineLocale('bs', {\n months: 'januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar'.split(\n '_'\n ),\n monthsShort:\n 'jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split(\n '_'\n ),\n weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),\n weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY H:mm',\n LLLL: 'dddd, D. MMMM YYYY H:mm',\n },\n calendar: {\n sameDay: '[danas u] LT',\n nextDay: '[sutra u] LT',\n nextWeek: function () {\n switch (this.day()) {\n case 0:\n return '[u] [nedjelju] [u] LT';\n case 3:\n return '[u] [srijedu] [u] LT';\n case 6:\n return '[u] [subotu] [u] LT';\n case 1:\n case 2:\n case 4:\n case 5:\n return '[u] dddd [u] LT';\n }\n },\n lastDay: '[jučer u] LT',\n lastWeek: function () {\n switch (this.day()) {\n case 0:\n case 3:\n return '[prošlu] dddd [u] LT';\n case 6:\n return '[prošle] [subote] [u] LT';\n case 1:\n case 2:\n case 4:\n case 5:\n return '[prošli] dddd [u] LT';\n }\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'za %s',\n past: 'prije %s',\n s: 'par sekundi',\n ss: translate,\n m: processRelativeTime,\n mm: translate,\n h: translate,\n hh: translate,\n d: 'dan',\n dd: translate,\n M: 'mjesec',\n MM: translate,\n y: 'godinu',\n yy: translate,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return bs;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/bs.js?", + ); + + /***/ + }, + + /***/ 7306: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Catalan [ca]\n//! author : Juan G. Hurtado : https://github.com/juanghurtado\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var ca = moment.defineLocale('ca', {\n months: {\n standalone:\n 'gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre'.split(\n '_'\n ),\n format: \"de gener_de febrer_de març_d'abril_de maig_de juny_de juliol_d'agost_de setembre_d'octubre_de novembre_de desembre\".split(\n '_'\n ),\n isFormat: /D[oD]?(\\s)+MMMM/,\n },\n monthsShort:\n 'gen._febr._març_abr._maig_juny_jul._ag._set._oct._nov._des.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays:\n 'diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte'.split(\n '_'\n ),\n weekdaysShort: 'dg._dl._dt._dc._dj._dv._ds.'.split('_'),\n weekdaysMin: 'dg_dl_dt_dc_dj_dv_ds'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM [de] YYYY',\n ll: 'D MMM YYYY',\n LLL: 'D MMMM [de] YYYY [a les] H:mm',\n lll: 'D MMM YYYY, H:mm',\n LLLL: 'dddd D MMMM [de] YYYY [a les] H:mm',\n llll: 'ddd D MMM YYYY, H:mm',\n },\n calendar: {\n sameDay: function () {\n return '[avui a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';\n },\n nextDay: function () {\n return '[demà a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';\n },\n nextWeek: function () {\n return 'dddd [a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';\n },\n lastDay: function () {\n return '[ahir a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';\n },\n lastWeek: function () {\n return (\n '[el] dddd [passat a ' +\n (this.hours() !== 1 ? 'les' : 'la') +\n '] LT'\n );\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: \"d'aquí %s\",\n past: 'fa %s',\n s: 'uns segons',\n ss: '%d segons',\n m: 'un minut',\n mm: '%d minuts',\n h: 'una hora',\n hh: '%d hores',\n d: 'un dia',\n dd: '%d dies',\n M: 'un mes',\n MM: '%d mesos',\n y: 'un any',\n yy: '%d anys',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(r|n|t|è|a)/,\n ordinal: function (number, period) {\n var output =\n number === 1\n ? 'r'\n : number === 2\n ? 'n'\n : number === 3\n ? 'r'\n : number === 4\n ? 't'\n : 'è';\n if (period === 'w' || period === 'W') {\n output = 'a';\n }\n return number + output;\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return ca;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/ca.js?", + ); + + /***/ + }, + + /***/ 6464: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Czech [cs]\n//! author : petrbela : https://github.com/petrbela\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var months = {\n standalone:\n 'leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec'.split(\n '_'\n ),\n format: 'ledna_února_března_dubna_května_června_července_srpna_září_října_listopadu_prosince'.split(\n '_'\n ),\n isFormat: /DD?[o.]?(\\[[^\\[\\]]*\\]|\\s)+MMMM/,\n },\n monthsShort = 'led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro'.split('_'),\n monthsParse = [\n /^led/i,\n /^úno/i,\n /^bře/i,\n /^dub/i,\n /^kvě/i,\n /^(čvn|červen$|června)/i,\n /^(čvc|červenec|července)/i,\n /^srp/i,\n /^zář/i,\n /^říj/i,\n /^lis/i,\n /^pro/i,\n ],\n // NOTE: 'červen' is substring of 'červenec'; therefore 'červenec' must precede 'červen' in the regex to be fully matched.\n // Otherwise parser matches '1. červenec' as '1. červen' + 'ec'.\n monthsRegex =\n /^(leden|únor|březen|duben|květen|červenec|července|červen|června|srpen|září|říjen|listopad|prosinec|led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i;\n\n function plural(n) {\n return n > 1 && n < 5 && ~~(n / 10) !== 1;\n }\n function translate(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's': // a few seconds / in a few seconds / a few seconds ago\n return withoutSuffix || isFuture ? 'pár sekund' : 'pár sekundami';\n case 'ss': // 9 seconds / in 9 seconds / 9 seconds ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'sekundy' : 'sekund');\n } else {\n return result + 'sekundami';\n }\n case 'm': // a minute / in a minute / a minute ago\n return withoutSuffix ? 'minuta' : isFuture ? 'minutu' : 'minutou';\n case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'minuty' : 'minut');\n } else {\n return result + 'minutami';\n }\n case 'h': // an hour / in an hour / an hour ago\n return withoutSuffix ? 'hodina' : isFuture ? 'hodinu' : 'hodinou';\n case 'hh': // 9 hours / in 9 hours / 9 hours ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'hodiny' : 'hodin');\n } else {\n return result + 'hodinami';\n }\n case 'd': // a day / in a day / a day ago\n return withoutSuffix || isFuture ? 'den' : 'dnem';\n case 'dd': // 9 days / in 9 days / 9 days ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'dny' : 'dní');\n } else {\n return result + 'dny';\n }\n case 'M': // a month / in a month / a month ago\n return withoutSuffix || isFuture ? 'měsíc' : 'měsícem';\n case 'MM': // 9 months / in 9 months / 9 months ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'měsíce' : 'měsíců');\n } else {\n return result + 'měsíci';\n }\n case 'y': // a year / in a year / a year ago\n return withoutSuffix || isFuture ? 'rok' : 'rokem';\n case 'yy': // 9 years / in 9 years / 9 years ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'roky' : 'let');\n } else {\n return result + 'lety';\n }\n }\n }\n\n var cs = moment.defineLocale('cs', {\n months: months,\n monthsShort: monthsShort,\n monthsRegex: monthsRegex,\n monthsShortRegex: monthsRegex,\n // NOTE: 'červen' is substring of 'červenec'; therefore 'červenec' must precede 'červen' in the regex to be fully matched.\n // Otherwise parser matches '1. červenec' as '1. červen' + 'ec'.\n monthsStrictRegex:\n /^(leden|ledna|února|únor|březen|března|duben|dubna|květen|května|červenec|července|červen|června|srpen|srpna|září|říjen|října|listopadu|listopad|prosinec|prosince)/i,\n monthsShortStrictRegex:\n /^(led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i,\n monthsParse: monthsParse,\n longMonthsParse: monthsParse,\n shortMonthsParse: monthsParse,\n weekdays: 'neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota'.split('_'),\n weekdaysShort: 'ne_po_út_st_čt_pá_so'.split('_'),\n weekdaysMin: 'ne_po_út_st_čt_pá_so'.split('_'),\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY H:mm',\n LLLL: 'dddd D. MMMM YYYY H:mm',\n l: 'D. M. YYYY',\n },\n calendar: {\n sameDay: '[dnes v] LT',\n nextDay: '[zítra v] LT',\n nextWeek: function () {\n switch (this.day()) {\n case 0:\n return '[v neděli v] LT';\n case 1:\n case 2:\n return '[v] dddd [v] LT';\n case 3:\n return '[ve středu v] LT';\n case 4:\n return '[ve čtvrtek v] LT';\n case 5:\n return '[v pátek v] LT';\n case 6:\n return '[v sobotu v] LT';\n }\n },\n lastDay: '[včera v] LT',\n lastWeek: function () {\n switch (this.day()) {\n case 0:\n return '[minulou neděli v] LT';\n case 1:\n case 2:\n return '[minulé] dddd [v] LT';\n case 3:\n return '[minulou středu v] LT';\n case 4:\n case 5:\n return '[minulý] dddd [v] LT';\n case 6:\n return '[minulou sobotu v] LT';\n }\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'za %s',\n past: 'před %s',\n s: translate,\n ss: translate,\n m: translate,\n mm: translate,\n h: translate,\n hh: translate,\n d: translate,\n dd: translate,\n M: translate,\n MM: translate,\n y: translate,\n yy: translate,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return cs;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/cs.js?", + ); + + /***/ + }, + + /***/ 3635: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Chuvash [cv]\n//! author : Anatoly Mironov : https://github.com/mirontoli\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var cv = moment.defineLocale('cv', {\n months: 'кӑрлач_нарӑс_пуш_ака_май_ҫӗртме_утӑ_ҫурла_авӑн_юпа_чӳк_раштав'.split(\n '_'\n ),\n monthsShort: 'кӑр_нар_пуш_ака_май_ҫӗр_утӑ_ҫур_авн_юпа_чӳк_раш'.split('_'),\n weekdays:\n 'вырсарникун_тунтикун_ытларикун_юнкун_кӗҫнерникун_эрнекун_шӑматкун'.split(\n '_'\n ),\n weekdaysShort: 'выр_тун_ытл_юн_кӗҫ_эрн_шӑм'.split('_'),\n weekdaysMin: 'вр_тн_ыт_юн_кҫ_эр_шм'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD-MM-YYYY',\n LL: 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ]',\n LLL: 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm',\n LLLL: 'dddd, YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm',\n },\n calendar: {\n sameDay: '[Паян] LT [сехетре]',\n nextDay: '[Ыран] LT [сехетре]',\n lastDay: '[Ӗнер] LT [сехетре]',\n nextWeek: '[Ҫитес] dddd LT [сехетре]',\n lastWeek: '[Иртнӗ] dddd LT [сехетре]',\n sameElse: 'L',\n },\n relativeTime: {\n future: function (output) {\n var affix = /сехет$/i.exec(output)\n ? 'рен'\n : /ҫул$/i.exec(output)\n ? 'тан'\n : 'ран';\n return output + affix;\n },\n past: '%s каялла',\n s: 'пӗр-ик ҫеккунт',\n ss: '%d ҫеккунт',\n m: 'пӗр минут',\n mm: '%d минут',\n h: 'пӗр сехет',\n hh: '%d сехет',\n d: 'пӗр кун',\n dd: '%d кун',\n M: 'пӗр уйӑх',\n MM: '%d уйӑх',\n y: 'пӗр ҫул',\n yy: '%d ҫул',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-мӗш/,\n ordinal: '%d-мӗш',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return cv;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/cv.js?", + ); + + /***/ + }, + + /***/ 4226: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Welsh [cy]\n//! author : Robert Allen : https://github.com/robgallen\n//! author : https://github.com/ryangreaves\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var cy = moment.defineLocale('cy', {\n months: 'Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr'.split(\n '_'\n ),\n monthsShort: 'Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag'.split(\n '_'\n ),\n weekdays:\n 'Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn'.split(\n '_'\n ),\n weekdaysShort: 'Sul_Llun_Maw_Mer_Iau_Gwe_Sad'.split('_'),\n weekdaysMin: 'Su_Ll_Ma_Me_Ia_Gw_Sa'.split('_'),\n weekdaysParseExact: true,\n // time formats are the same as en-gb\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Heddiw am] LT',\n nextDay: '[Yfory am] LT',\n nextWeek: 'dddd [am] LT',\n lastDay: '[Ddoe am] LT',\n lastWeek: 'dddd [diwethaf am] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'mewn %s',\n past: '%s yn ôl',\n s: 'ychydig eiliadau',\n ss: '%d eiliad',\n m: 'munud',\n mm: '%d munud',\n h: 'awr',\n hh: '%d awr',\n d: 'diwrnod',\n dd: '%d diwrnod',\n M: 'mis',\n MM: '%d mis',\n y: 'blwyddyn',\n yy: '%d flynedd',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(fed|ain|af|il|ydd|ed|eg)/,\n // traditional ordinal numbers above 31 are not commonly used in colloquial Welsh\n ordinal: function (number) {\n var b = number,\n output = '',\n lookup = [\n '',\n 'af',\n 'il',\n 'ydd',\n 'ydd',\n 'ed',\n 'ed',\n 'ed',\n 'fed',\n 'fed',\n 'fed', // 1af to 10fed\n 'eg',\n 'fed',\n 'eg',\n 'eg',\n 'fed',\n 'eg',\n 'eg',\n 'fed',\n 'eg',\n 'fed', // 11eg to 20fed\n ];\n if (b > 20) {\n if (b === 40 || b === 50 || b === 60 || b === 80 || b === 100) {\n output = 'fed'; // not 30ain, 70ain or 90ain\n } else {\n output = 'ain';\n }\n } else if (b > 0) {\n output = lookup[b];\n }\n return number + output;\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return cy;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/cy.js?", + ); + + /***/ + }, + + /***/ 3601: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Danish [da]\n//! author : Ulrik Nielsen : https://github.com/mrbase\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var da = moment.defineLocale('da', {\n months: 'januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december'.split(\n '_'\n ),\n monthsShort: 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'),\n weekdays: 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'),\n weekdaysShort: 'søn_man_tir_ons_tor_fre_lør'.split('_'),\n weekdaysMin: 'sø_ma_ti_on_to_fr_lø'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY HH:mm',\n LLLL: 'dddd [d.] D. MMMM YYYY [kl.] HH:mm',\n },\n calendar: {\n sameDay: '[i dag kl.] LT',\n nextDay: '[i morgen kl.] LT',\n nextWeek: 'på dddd [kl.] LT',\n lastDay: '[i går kl.] LT',\n lastWeek: '[i] dddd[s kl.] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'om %s',\n past: '%s siden',\n s: 'få sekunder',\n ss: '%d sekunder',\n m: 'et minut',\n mm: '%d minutter',\n h: 'en time',\n hh: '%d timer',\n d: 'en dag',\n dd: '%d dage',\n M: 'en måned',\n MM: '%d måneder',\n y: 'et år',\n yy: '%d år',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return da;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/da.js?", + ); + + /***/ + }, + + /***/ 6111: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : German (Austria) [de-at]\n//! author : lluchs : https://github.com/lluchs\n//! author: Menelion Elensúle: https://github.com/Oire\n//! author : Martin Groller : https://github.com/MadMG\n//! author : Mikolaj Dadela : https://github.com/mik01aj\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var format = {\n m: ['eine Minute', 'einer Minute'],\n h: ['eine Stunde', 'einer Stunde'],\n d: ['ein Tag', 'einem Tag'],\n dd: [number + ' Tage', number + ' Tagen'],\n w: ['eine Woche', 'einer Woche'],\n M: ['ein Monat', 'einem Monat'],\n MM: [number + ' Monate', number + ' Monaten'],\n y: ['ein Jahr', 'einem Jahr'],\n yy: [number + ' Jahre', number + ' Jahren'],\n };\n return withoutSuffix ? format[key][0] : format[key][1];\n }\n\n var deAt = moment.defineLocale('de-at', {\n months: 'Jänner_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split(\n '_'\n ),\n monthsShort:\n 'Jän._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'),\n monthsParseExact: true,\n weekdays:\n 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split(\n '_'\n ),\n weekdaysShort: 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'),\n weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY HH:mm',\n LLLL: 'dddd, D. MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[heute um] LT [Uhr]',\n sameElse: 'L',\n nextDay: '[morgen um] LT [Uhr]',\n nextWeek: 'dddd [um] LT [Uhr]',\n lastDay: '[gestern um] LT [Uhr]',\n lastWeek: '[letzten] dddd [um] LT [Uhr]',\n },\n relativeTime: {\n future: 'in %s',\n past: 'vor %s',\n s: 'ein paar Sekunden',\n ss: '%d Sekunden',\n m: processRelativeTime,\n mm: '%d Minuten',\n h: processRelativeTime,\n hh: '%d Stunden',\n d: processRelativeTime,\n dd: processRelativeTime,\n w: processRelativeTime,\n ww: '%d Wochen',\n M: processRelativeTime,\n MM: processRelativeTime,\n y: processRelativeTime,\n yy: processRelativeTime,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return deAt;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/de-at.js?", + ); + + /***/ + }, + + /***/ 4697: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : German (Switzerland) [de-ch]\n//! author : sschueller : https://github.com/sschueller\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var format = {\n m: ['eine Minute', 'einer Minute'],\n h: ['eine Stunde', 'einer Stunde'],\n d: ['ein Tag', 'einem Tag'],\n dd: [number + ' Tage', number + ' Tagen'],\n w: ['eine Woche', 'einer Woche'],\n M: ['ein Monat', 'einem Monat'],\n MM: [number + ' Monate', number + ' Monaten'],\n y: ['ein Jahr', 'einem Jahr'],\n yy: [number + ' Jahre', number + ' Jahren'],\n };\n return withoutSuffix ? format[key][0] : format[key][1];\n }\n\n var deCh = moment.defineLocale('de-ch', {\n months: 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split(\n '_'\n ),\n monthsShort:\n 'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'),\n monthsParseExact: true,\n weekdays:\n 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split(\n '_'\n ),\n weekdaysShort: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),\n weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY HH:mm',\n LLLL: 'dddd, D. MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[heute um] LT [Uhr]',\n sameElse: 'L',\n nextDay: '[morgen um] LT [Uhr]',\n nextWeek: 'dddd [um] LT [Uhr]',\n lastDay: '[gestern um] LT [Uhr]',\n lastWeek: '[letzten] dddd [um] LT [Uhr]',\n },\n relativeTime: {\n future: 'in %s',\n past: 'vor %s',\n s: 'ein paar Sekunden',\n ss: '%d Sekunden',\n m: processRelativeTime,\n mm: '%d Minuten',\n h: processRelativeTime,\n hh: '%d Stunden',\n d: processRelativeTime,\n dd: processRelativeTime,\n w: processRelativeTime,\n ww: '%d Wochen',\n M: processRelativeTime,\n MM: processRelativeTime,\n y: processRelativeTime,\n yy: processRelativeTime,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return deCh;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/de-ch.js?", + ); + + /***/ + }, + + /***/ 7853: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : German [de]\n//! author : lluchs : https://github.com/lluchs\n//! author: Menelion Elensúle: https://github.com/Oire\n//! author : Mikolaj Dadela : https://github.com/mik01aj\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var format = {\n m: ['eine Minute', 'einer Minute'],\n h: ['eine Stunde', 'einer Stunde'],\n d: ['ein Tag', 'einem Tag'],\n dd: [number + ' Tage', number + ' Tagen'],\n w: ['eine Woche', 'einer Woche'],\n M: ['ein Monat', 'einem Monat'],\n MM: [number + ' Monate', number + ' Monaten'],\n y: ['ein Jahr', 'einem Jahr'],\n yy: [number + ' Jahre', number + ' Jahren'],\n };\n return withoutSuffix ? format[key][0] : format[key][1];\n }\n\n var de = moment.defineLocale('de', {\n months: 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split(\n '_'\n ),\n monthsShort:\n 'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'),\n monthsParseExact: true,\n weekdays:\n 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split(\n '_'\n ),\n weekdaysShort: 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'),\n weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY HH:mm',\n LLLL: 'dddd, D. MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[heute um] LT [Uhr]',\n sameElse: 'L',\n nextDay: '[morgen um] LT [Uhr]',\n nextWeek: 'dddd [um] LT [Uhr]',\n lastDay: '[gestern um] LT [Uhr]',\n lastWeek: '[letzten] dddd [um] LT [Uhr]',\n },\n relativeTime: {\n future: 'in %s',\n past: 'vor %s',\n s: 'ein paar Sekunden',\n ss: '%d Sekunden',\n m: processRelativeTime,\n mm: '%d Minuten',\n h: processRelativeTime,\n hh: '%d Stunden',\n d: processRelativeTime,\n dd: processRelativeTime,\n w: processRelativeTime,\n ww: '%d Wochen',\n M: processRelativeTime,\n MM: processRelativeTime,\n y: processRelativeTime,\n yy: processRelativeTime,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return de;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/de.js?", + ); + + /***/ + }, + + /***/ 708: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Maldivian [dv]\n//! author : Jawish Hameed : https://github.com/jawish\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var months = [\n 'ޖެނުއަރީ',\n 'ފެބްރުއަރީ',\n 'މާރިޗު',\n 'އޭޕްރީލު',\n 'މޭ',\n 'ޖޫން',\n 'ޖުލައި',\n 'އޯގަސްޓު',\n 'ސެޕްޓެމްބަރު',\n 'އޮކްޓޯބަރު',\n 'ނޮވެމްބަރު',\n 'ޑިސެމްބަރު',\n ],\n weekdays = [\n 'އާދިއްތަ',\n 'ހޯމަ',\n 'އަންގާރަ',\n 'ބުދަ',\n 'ބުރާސްފަތި',\n 'ހުކުރު',\n 'ހޮނިހިރު',\n ];\n\n var dv = moment.defineLocale('dv', {\n months: months,\n monthsShort: months,\n weekdays: weekdays,\n weekdaysShort: weekdays,\n weekdaysMin: 'އާދި_ހޯމަ_އަން_ބުދަ_ބުރާ_ހުކު_ހޮނި'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'D/M/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n meridiemParse: /މކ|މފ/,\n isPM: function (input) {\n return 'މފ' === input;\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 12) {\n return 'މކ';\n } else {\n return 'މފ';\n }\n },\n calendar: {\n sameDay: '[މިއަދު] LT',\n nextDay: '[މާދަމާ] LT',\n nextWeek: 'dddd LT',\n lastDay: '[އިއްޔެ] LT',\n lastWeek: '[ފާއިތުވި] dddd LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'ތެރޭގައި %s',\n past: 'ކުރިން %s',\n s: 'ސިކުންތުކޮޅެއް',\n ss: 'd% ސިކުންތު',\n m: 'މިނިޓެއް',\n mm: 'މިނިޓު %d',\n h: 'ގަޑިއިރެއް',\n hh: 'ގަޑިއިރު %d',\n d: 'ދުވަހެއް',\n dd: 'ދުވަސް %d',\n M: 'މަހެއް',\n MM: 'މަސް %d',\n y: 'އަހަރެއް',\n yy: 'އަހަރު %d',\n },\n preparse: function (string) {\n return string.replace(/،/g, ',');\n },\n postformat: function (string) {\n return string.replace(/,/g, '،');\n },\n week: {\n dow: 7, // Sunday is the first day of the week.\n doy: 12, // The week that contains Jan 12th is the first week of the year.\n },\n });\n\n return dv;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/dv.js?", + ); + + /***/ + }, + + /***/ 4691: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Greek [el]\n//! author : Aggelos Karalias : https://github.com/mehiel\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function isFunction(input) {\n return (\n (typeof Function !== 'undefined' && input instanceof Function) ||\n Object.prototype.toString.call(input) === '[object Function]'\n );\n }\n\n var el = moment.defineLocale('el', {\n monthsNominativeEl:\n 'Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος'.split(\n '_'\n ),\n monthsGenitiveEl:\n 'Ιανουαρίου_Φεβρουαρίου_Μαρτίου_Απριλίου_Μαΐου_Ιουνίου_Ιουλίου_Αυγούστου_Σεπτεμβρίου_Οκτωβρίου_Νοεμβρίου_Δεκεμβρίου'.split(\n '_'\n ),\n months: function (momentToFormat, format) {\n if (!momentToFormat) {\n return this._monthsNominativeEl;\n } else if (\n typeof format === 'string' &&\n /D/.test(format.substring(0, format.indexOf('MMMM')))\n ) {\n // if there is a day number before 'MMMM'\n return this._monthsGenitiveEl[momentToFormat.month()];\n } else {\n return this._monthsNominativeEl[momentToFormat.month()];\n }\n },\n monthsShort: 'Ιαν_Φεβ_Μαρ_Απρ_Μαϊ_Ιουν_Ιουλ_Αυγ_Σεπ_Οκτ_Νοε_Δεκ'.split('_'),\n weekdays: 'Κυριακή_Δευτέρα_Τρίτη_Τετάρτη_Πέμπτη_Παρασκευή_Σάββατο'.split(\n '_'\n ),\n weekdaysShort: 'Κυρ_Δευ_Τρι_Τετ_Πεμ_Παρ_Σαβ'.split('_'),\n weekdaysMin: 'Κυ_Δε_Τρ_Τε_Πε_Πα_Σα'.split('_'),\n meridiem: function (hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'μμ' : 'ΜΜ';\n } else {\n return isLower ? 'πμ' : 'ΠΜ';\n }\n },\n isPM: function (input) {\n return (input + '').toLowerCase()[0] === 'μ';\n },\n meridiemParse: /[ΠΜ]\\.?Μ?\\.?/i,\n longDateFormat: {\n LT: 'h:mm A',\n LTS: 'h:mm:ss A',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY h:mm A',\n LLLL: 'dddd, D MMMM YYYY h:mm A',\n },\n calendarEl: {\n sameDay: '[Σήμερα {}] LT',\n nextDay: '[Αύριο {}] LT',\n nextWeek: 'dddd [{}] LT',\n lastDay: '[Χθες {}] LT',\n lastWeek: function () {\n switch (this.day()) {\n case 6:\n return '[το προηγούμενο] dddd [{}] LT';\n default:\n return '[την προηγούμενη] dddd [{}] LT';\n }\n },\n sameElse: 'L',\n },\n calendar: function (key, mom) {\n var output = this._calendarEl[key],\n hours = mom && mom.hours();\n if (isFunction(output)) {\n output = output.apply(mom);\n }\n return output.replace('{}', hours % 12 === 1 ? 'στη' : 'στις');\n },\n relativeTime: {\n future: 'σε %s',\n past: '%s πριν',\n s: 'λίγα δευτερόλεπτα',\n ss: '%d δευτερόλεπτα',\n m: 'ένα λεπτό',\n mm: '%d λεπτά',\n h: 'μία ώρα',\n hh: '%d ώρες',\n d: 'μία μέρα',\n dd: '%d μέρες',\n M: 'ένας μήνας',\n MM: '%d μήνες',\n y: 'ένας χρόνος',\n yy: '%d χρόνια',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}η/,\n ordinal: '%dη',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4st is the first week of the year.\n },\n });\n\n return el;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/el.js?", + ); + + /***/ + }, + + /***/ 3872: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : English (Australia) [en-au]\n//! author : Jared Morse : https://github.com/jarcoal\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var enAu = moment.defineLocale('en-au', {\n months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n '_'\n ),\n monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(\n '_'\n ),\n weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n longDateFormat: {\n LT: 'h:mm A',\n LTS: 'h:mm:ss A',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY h:mm A',\n LLLL: 'dddd, D MMMM YYYY h:mm A',\n },\n calendar: {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n ~~((number % 100) / 10) === 1\n ? 'th'\n : b === 1\n ? 'st'\n : b === 2\n ? 'nd'\n : b === 3\n ? 'rd'\n : 'th';\n return number + output;\n },\n week: {\n dow: 0, // Sunday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return enAu;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/en-au.js?", + ); + + /***/ + }, + + /***/ 8298: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : English (Canada) [en-ca]\n//! author : Jonathan Abourbih : https://github.com/jonbca\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var enCa = moment.defineLocale('en-ca', {\n months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n '_'\n ),\n monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(\n '_'\n ),\n weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n longDateFormat: {\n LT: 'h:mm A',\n LTS: 'h:mm:ss A',\n L: 'YYYY-MM-DD',\n LL: 'MMMM D, YYYY',\n LLL: 'MMMM D, YYYY h:mm A',\n LLLL: 'dddd, MMMM D, YYYY h:mm A',\n },\n calendar: {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n ~~((number % 100) / 10) === 1\n ? 'th'\n : b === 1\n ? 'st'\n : b === 2\n ? 'nd'\n : b === 3\n ? 'rd'\n : 'th';\n return number + output;\n },\n });\n\n return enCa;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/en-ca.js?", + ); + + /***/ + }, + + /***/ 6195: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : English (United Kingdom) [en-gb]\n//! author : Chris Gedrim : https://github.com/chrisgedrim\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var enGb = moment.defineLocale('en-gb', {\n months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n '_'\n ),\n monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(\n '_'\n ),\n weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n ~~((number % 100) / 10) === 1\n ? 'th'\n : b === 1\n ? 'st'\n : b === 2\n ? 'nd'\n : b === 3\n ? 'rd'\n : 'th';\n return number + output;\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return enGb;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/en-gb.js?", + ); + + /***/ + }, + + /***/ 6584: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : English (Ireland) [en-ie]\n//! author : Chris Cartlidge : https://github.com/chriscartlidge\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var enIe = moment.defineLocale('en-ie', {\n months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n '_'\n ),\n monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(\n '_'\n ),\n weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n ~~((number % 100) / 10) === 1\n ? 'th'\n : b === 1\n ? 'st'\n : b === 2\n ? 'nd'\n : b === 3\n ? 'rd'\n : 'th';\n return number + output;\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return enIe;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/en-ie.js?", + ); + + /***/ + }, + + /***/ 5543: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : English (Israel) [en-il]\n//! author : Chris Gedrim : https://github.com/chrisgedrim\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var enIl = moment.defineLocale('en-il', {\n months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n '_'\n ),\n monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(\n '_'\n ),\n weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n ~~((number % 100) / 10) === 1\n ? 'th'\n : b === 1\n ? 'st'\n : b === 2\n ? 'nd'\n : b === 3\n ? 'rd'\n : 'th';\n return number + output;\n },\n });\n\n return enIl;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/en-il.js?", + ); + + /***/ + }, + + /***/ 9033: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : English (India) [en-in]\n//! author : Jatin Agrawal : https://github.com/jatinag22\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var enIn = moment.defineLocale('en-in', {\n months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n '_'\n ),\n monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(\n '_'\n ),\n weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n longDateFormat: {\n LT: 'h:mm A',\n LTS: 'h:mm:ss A',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY h:mm A',\n LLLL: 'dddd, D MMMM YYYY h:mm A',\n },\n calendar: {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n ~~((number % 100) / 10) === 1\n ? 'th'\n : b === 1\n ? 'st'\n : b === 2\n ? 'nd'\n : b === 3\n ? 'rd'\n : 'th';\n return number + output;\n },\n week: {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 1st is the first week of the year.\n },\n });\n\n return enIn;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/en-in.js?", + ); + + /***/ + }, + + /***/ 9402: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : English (New Zealand) [en-nz]\n//! author : Luke McGregor : https://github.com/lukemcgregor\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var enNz = moment.defineLocale('en-nz', {\n months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n '_'\n ),\n monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(\n '_'\n ),\n weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n longDateFormat: {\n LT: 'h:mm A',\n LTS: 'h:mm:ss A',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY h:mm A',\n LLLL: 'dddd, D MMMM YYYY h:mm A',\n },\n calendar: {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n ~~((number % 100) / 10) === 1\n ? 'th'\n : b === 1\n ? 'st'\n : b === 2\n ? 'nd'\n : b === 3\n ? 'rd'\n : 'th';\n return number + output;\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return enNz;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/en-nz.js?", + ); + + /***/ + }, + + /***/ 3004: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : English (Singapore) [en-sg]\n//! author : Matthew Castrillon-Madrigal : https://github.com/techdimension\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var enSg = moment.defineLocale('en-sg', {\n months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n '_'\n ),\n monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(\n '_'\n ),\n weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n ~~((number % 100) / 10) === 1\n ? 'th'\n : b === 1\n ? 'st'\n : b === 2\n ? 'nd'\n : b === 3\n ? 'rd'\n : 'th';\n return number + output;\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return enSg;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/en-sg.js?", + ); + + /***/ + }, + + /***/ 2934: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Esperanto [eo]\n//! author : Colin Dean : https://github.com/colindean\n//! author : Mia Nordentoft Imperatori : https://github.com/miestasmia\n//! comment : miestasmia corrected the translation by colindean\n//! comment : Vivakvo corrected the translation by colindean and miestasmia\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var eo = moment.defineLocale('eo', {\n months: 'januaro_februaro_marto_aprilo_majo_junio_julio_aŭgusto_septembro_oktobro_novembro_decembro'.split(\n '_'\n ),\n monthsShort: 'jan_feb_mart_apr_maj_jun_jul_aŭg_sept_okt_nov_dec'.split('_'),\n weekdays: 'dimanĉo_lundo_mardo_merkredo_ĵaŭdo_vendredo_sabato'.split('_'),\n weekdaysShort: 'dim_lun_mard_merk_ĵaŭ_ven_sab'.split('_'),\n weekdaysMin: 'di_lu_ma_me_ĵa_ve_sa'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'YYYY-MM-DD',\n LL: '[la] D[-an de] MMMM, YYYY',\n LLL: '[la] D[-an de] MMMM, YYYY HH:mm',\n LLLL: 'dddd[n], [la] D[-an de] MMMM, YYYY HH:mm',\n llll: 'ddd, [la] D[-an de] MMM, YYYY HH:mm',\n },\n meridiemParse: /[ap]\\.t\\.m/i,\n isPM: function (input) {\n return input.charAt(0).toLowerCase() === 'p';\n },\n meridiem: function (hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'p.t.m.' : 'P.T.M.';\n } else {\n return isLower ? 'a.t.m.' : 'A.T.M.';\n }\n },\n calendar: {\n sameDay: '[Hodiaŭ je] LT',\n nextDay: '[Morgaŭ je] LT',\n nextWeek: 'dddd[n je] LT',\n lastDay: '[Hieraŭ je] LT',\n lastWeek: '[pasintan] dddd[n je] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'post %s',\n past: 'antaŭ %s',\n s: 'kelkaj sekundoj',\n ss: '%d sekundoj',\n m: 'unu minuto',\n mm: '%d minutoj',\n h: 'unu horo',\n hh: '%d horoj',\n d: 'unu tago', //ne 'diurno', ĉar estas uzita por proksimumo\n dd: '%d tagoj',\n M: 'unu monato',\n MM: '%d monatoj',\n y: 'unu jaro',\n yy: '%d jaroj',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}a/,\n ordinal: '%da',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return eo;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/eo.js?", + ); + + /***/ + }, + + /***/ 838: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Spanish (Dominican Republic) [es-do]\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var monthsShortDot =\n 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split(\n '_'\n ),\n monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),\n monthsParse = [\n /^ene/i,\n /^feb/i,\n /^mar/i,\n /^abr/i,\n /^may/i,\n /^jun/i,\n /^jul/i,\n /^ago/i,\n /^sep/i,\n /^oct/i,\n /^nov/i,\n /^dic/i,\n ],\n monthsRegex =\n /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i;\n\n var esDo = moment.defineLocale('es-do', {\n months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split(\n '_'\n ),\n monthsShort: function (m, format) {\n if (!m) {\n return monthsShortDot;\n } else if (/-MMM-/.test(format)) {\n return monthsShort[m.month()];\n } else {\n return monthsShortDot[m.month()];\n }\n },\n monthsRegex: monthsRegex,\n monthsShortRegex: monthsRegex,\n monthsStrictRegex:\n /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,\n monthsShortStrictRegex:\n /^(ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i,\n monthsParse: monthsParse,\n longMonthsParse: monthsParse,\n shortMonthsParse: monthsParse,\n weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),\n weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),\n weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'h:mm A',\n LTS: 'h:mm:ss A',\n L: 'DD/MM/YYYY',\n LL: 'D [de] MMMM [de] YYYY',\n LLL: 'D [de] MMMM [de] YYYY h:mm A',\n LLLL: 'dddd, D [de] MMMM [de] YYYY h:mm A',\n },\n calendar: {\n sameDay: function () {\n return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n nextDay: function () {\n return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n nextWeek: function () {\n return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n lastDay: function () {\n return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n lastWeek: function () {\n return (\n '[el] dddd [pasado a la' +\n (this.hours() !== 1 ? 's' : '') +\n '] LT'\n );\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'en %s',\n past: 'hace %s',\n s: 'unos segundos',\n ss: '%d segundos',\n m: 'un minuto',\n mm: '%d minutos',\n h: 'una hora',\n hh: '%d horas',\n d: 'un día',\n dd: '%d días',\n w: 'una semana',\n ww: '%d semanas',\n M: 'un mes',\n MM: '%d meses',\n y: 'un año',\n yy: '%d años',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal: '%dº',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return esDo;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/es-do.js?", + ); + + /***/ + }, + + /***/ 7730: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Spanish (Mexico) [es-mx]\n//! author : JC Franco : https://github.com/jcfranco\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var monthsShortDot =\n 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split(\n '_'\n ),\n monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),\n monthsParse = [\n /^ene/i,\n /^feb/i,\n /^mar/i,\n /^abr/i,\n /^may/i,\n /^jun/i,\n /^jul/i,\n /^ago/i,\n /^sep/i,\n /^oct/i,\n /^nov/i,\n /^dic/i,\n ],\n monthsRegex =\n /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i;\n\n var esMx = moment.defineLocale('es-mx', {\n months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split(\n '_'\n ),\n monthsShort: function (m, format) {\n if (!m) {\n return monthsShortDot;\n } else if (/-MMM-/.test(format)) {\n return monthsShort[m.month()];\n } else {\n return monthsShortDot[m.month()];\n }\n },\n monthsRegex: monthsRegex,\n monthsShortRegex: monthsRegex,\n monthsStrictRegex:\n /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,\n monthsShortStrictRegex:\n /^(ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i,\n monthsParse: monthsParse,\n longMonthsParse: monthsParse,\n shortMonthsParse: monthsParse,\n weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),\n weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),\n weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D [de] MMMM [de] YYYY',\n LLL: 'D [de] MMMM [de] YYYY H:mm',\n LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm',\n },\n calendar: {\n sameDay: function () {\n return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n nextDay: function () {\n return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n nextWeek: function () {\n return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n lastDay: function () {\n return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n lastWeek: function () {\n return (\n '[el] dddd [pasado a la' +\n (this.hours() !== 1 ? 's' : '') +\n '] LT'\n );\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'en %s',\n past: 'hace %s',\n s: 'unos segundos',\n ss: '%d segundos',\n m: 'un minuto',\n mm: '%d minutos',\n h: 'una hora',\n hh: '%d horas',\n d: 'un día',\n dd: '%d días',\n w: 'una semana',\n ww: '%d semanas',\n M: 'un mes',\n MM: '%d meses',\n y: 'un año',\n yy: '%d años',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal: '%dº',\n week: {\n dow: 0, // Sunday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n invalidDate: 'Fecha inválida',\n });\n\n return esMx;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/es-mx.js?", + ); + + /***/ + }, + + /***/ 6575: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Spanish (United States) [es-us]\n//! author : bustta : https://github.com/bustta\n//! author : chrisrodz : https://github.com/chrisrodz\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var monthsShortDot =\n 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split(\n '_'\n ),\n monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),\n monthsParse = [\n /^ene/i,\n /^feb/i,\n /^mar/i,\n /^abr/i,\n /^may/i,\n /^jun/i,\n /^jul/i,\n /^ago/i,\n /^sep/i,\n /^oct/i,\n /^nov/i,\n /^dic/i,\n ],\n monthsRegex =\n /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i;\n\n var esUs = moment.defineLocale('es-us', {\n months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split(\n '_'\n ),\n monthsShort: function (m, format) {\n if (!m) {\n return monthsShortDot;\n } else if (/-MMM-/.test(format)) {\n return monthsShort[m.month()];\n } else {\n return monthsShortDot[m.month()];\n }\n },\n monthsRegex: monthsRegex,\n monthsShortRegex: monthsRegex,\n monthsStrictRegex:\n /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,\n monthsShortStrictRegex:\n /^(ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i,\n monthsParse: monthsParse,\n longMonthsParse: monthsParse,\n shortMonthsParse: monthsParse,\n weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),\n weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),\n weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'h:mm A',\n LTS: 'h:mm:ss A',\n L: 'MM/DD/YYYY',\n LL: 'D [de] MMMM [de] YYYY',\n LLL: 'D [de] MMMM [de] YYYY h:mm A',\n LLLL: 'dddd, D [de] MMMM [de] YYYY h:mm A',\n },\n calendar: {\n sameDay: function () {\n return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n nextDay: function () {\n return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n nextWeek: function () {\n return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n lastDay: function () {\n return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n lastWeek: function () {\n return (\n '[el] dddd [pasado a la' +\n (this.hours() !== 1 ? 's' : '') +\n '] LT'\n );\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'en %s',\n past: 'hace %s',\n s: 'unos segundos',\n ss: '%d segundos',\n m: 'un minuto',\n mm: '%d minutos',\n h: 'una hora',\n hh: '%d horas',\n d: 'un día',\n dd: '%d días',\n w: 'una semana',\n ww: '%d semanas',\n M: 'un mes',\n MM: '%d meses',\n y: 'un año',\n yy: '%d años',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal: '%dº',\n week: {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n },\n });\n\n return esUs;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/es-us.js?", + ); + + /***/ + }, + + /***/ 7650: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Spanish [es]\n//! author : Julio Napurí : https://github.com/julionc\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var monthsShortDot =\n 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split(\n '_'\n ),\n monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),\n monthsParse = [\n /^ene/i,\n /^feb/i,\n /^mar/i,\n /^abr/i,\n /^may/i,\n /^jun/i,\n /^jul/i,\n /^ago/i,\n /^sep/i,\n /^oct/i,\n /^nov/i,\n /^dic/i,\n ],\n monthsRegex =\n /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i;\n\n var es = moment.defineLocale('es', {\n months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split(\n '_'\n ),\n monthsShort: function (m, format) {\n if (!m) {\n return monthsShortDot;\n } else if (/-MMM-/.test(format)) {\n return monthsShort[m.month()];\n } else {\n return monthsShortDot[m.month()];\n }\n },\n monthsRegex: monthsRegex,\n monthsShortRegex: monthsRegex,\n monthsStrictRegex:\n /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,\n monthsShortStrictRegex:\n /^(ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i,\n monthsParse: monthsParse,\n longMonthsParse: monthsParse,\n shortMonthsParse: monthsParse,\n weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),\n weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),\n weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D [de] MMMM [de] YYYY',\n LLL: 'D [de] MMMM [de] YYYY H:mm',\n LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm',\n },\n calendar: {\n sameDay: function () {\n return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n nextDay: function () {\n return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n nextWeek: function () {\n return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n lastDay: function () {\n return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n lastWeek: function () {\n return (\n '[el] dddd [pasado a la' +\n (this.hours() !== 1 ? 's' : '') +\n '] LT'\n );\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'en %s',\n past: 'hace %s',\n s: 'unos segundos',\n ss: '%d segundos',\n m: 'un minuto',\n mm: '%d minutos',\n h: 'una hora',\n hh: '%d horas',\n d: 'un día',\n dd: '%d días',\n w: 'una semana',\n ww: '%d semanas',\n M: 'un mes',\n MM: '%d meses',\n y: 'un año',\n yy: '%d años',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal: '%dº',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n invalidDate: 'Fecha inválida',\n });\n\n return es;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/es.js?", + ); + + /***/ + }, + + /***/ 3035: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Estonian [et]\n//! author : Henry Kehlmann : https://github.com/madhenry\n//! improvements : Illimar Tambek : https://github.com/ragulka\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var format = {\n s: ['mõne sekundi', 'mõni sekund', 'paar sekundit'],\n ss: [number + 'sekundi', number + 'sekundit'],\n m: ['ühe minuti', 'üks minut'],\n mm: [number + ' minuti', number + ' minutit'],\n h: ['ühe tunni', 'tund aega', 'üks tund'],\n hh: [number + ' tunni', number + ' tundi'],\n d: ['ühe päeva', 'üks päev'],\n M: ['kuu aja', 'kuu aega', 'üks kuu'],\n MM: [number + ' kuu', number + ' kuud'],\n y: ['ühe aasta', 'aasta', 'üks aasta'],\n yy: [number + ' aasta', number + ' aastat'],\n };\n if (withoutSuffix) {\n return format[key][2] ? format[key][2] : format[key][1];\n }\n return isFuture ? format[key][0] : format[key][1];\n }\n\n var et = moment.defineLocale('et', {\n months: 'jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember'.split(\n '_'\n ),\n monthsShort:\n 'jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets'.split('_'),\n weekdays:\n 'pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev'.split(\n '_'\n ),\n weekdaysShort: 'P_E_T_K_N_R_L'.split('_'),\n weekdaysMin: 'P_E_T_K_N_R_L'.split('_'),\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY H:mm',\n LLLL: 'dddd, D. MMMM YYYY H:mm',\n },\n calendar: {\n sameDay: '[Täna,] LT',\n nextDay: '[Homme,] LT',\n nextWeek: '[Järgmine] dddd LT',\n lastDay: '[Eile,] LT',\n lastWeek: '[Eelmine] dddd LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s pärast',\n past: '%s tagasi',\n s: processRelativeTime,\n ss: processRelativeTime,\n m: processRelativeTime,\n mm: processRelativeTime,\n h: processRelativeTime,\n hh: processRelativeTime,\n d: processRelativeTime,\n dd: '%d päeva',\n M: processRelativeTime,\n MM: processRelativeTime,\n y: processRelativeTime,\n yy: processRelativeTime,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return et;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/et.js?", + ); + + /***/ + }, + + /***/ 3508: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Basque [eu]\n//! author : Eneko Illarramendi : https://github.com/eillarra\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var eu = moment.defineLocale('eu', {\n months: 'urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua'.split(\n '_'\n ),\n monthsShort:\n 'urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays:\n 'igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata'.split(\n '_'\n ),\n weekdaysShort: 'ig._al._ar._az._og._ol._lr.'.split('_'),\n weekdaysMin: 'ig_al_ar_az_og_ol_lr'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'YYYY-MM-DD',\n LL: 'YYYY[ko] MMMM[ren] D[a]',\n LLL: 'YYYY[ko] MMMM[ren] D[a] HH:mm',\n LLLL: 'dddd, YYYY[ko] MMMM[ren] D[a] HH:mm',\n l: 'YYYY-M-D',\n ll: 'YYYY[ko] MMM D[a]',\n lll: 'YYYY[ko] MMM D[a] HH:mm',\n llll: 'ddd, YYYY[ko] MMM D[a] HH:mm',\n },\n calendar: {\n sameDay: '[gaur] LT[etan]',\n nextDay: '[bihar] LT[etan]',\n nextWeek: 'dddd LT[etan]',\n lastDay: '[atzo] LT[etan]',\n lastWeek: '[aurreko] dddd LT[etan]',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s barru',\n past: 'duela %s',\n s: 'segundo batzuk',\n ss: '%d segundo',\n m: 'minutu bat',\n mm: '%d minutu',\n h: 'ordu bat',\n hh: '%d ordu',\n d: 'egun bat',\n dd: '%d egun',\n M: 'hilabete bat',\n MM: '%d hilabete',\n y: 'urte bat',\n yy: '%d urte',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return eu;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/eu.js?", + ); + + /***/ + }, + + /***/ 119: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Persian [fa]\n//! author : Ebrahim Byagowi : https://github.com/ebraminio\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var symbolMap = {\n 1: '۱',\n 2: '۲',\n 3: '۳',\n 4: '۴',\n 5: '۵',\n 6: '۶',\n 7: '۷',\n 8: '۸',\n 9: '۹',\n 0: '۰',\n },\n numberMap = {\n '۱': '1',\n '۲': '2',\n '۳': '3',\n '۴': '4',\n '۵': '5',\n '۶': '6',\n '۷': '7',\n '۸': '8',\n '۹': '9',\n '۰': '0',\n };\n\n var fa = moment.defineLocale('fa', {\n months: 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split(\n '_'\n ),\n monthsShort:\n 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split(\n '_'\n ),\n weekdays:\n 'یک\\u200cشنبه_دوشنبه_سه\\u200cشنبه_چهارشنبه_پنج\\u200cشنبه_جمعه_شنبه'.split(\n '_'\n ),\n weekdaysShort:\n 'یک\\u200cشنبه_دوشنبه_سه\\u200cشنبه_چهارشنبه_پنج\\u200cشنبه_جمعه_شنبه'.split(\n '_'\n ),\n weekdaysMin: 'ی_د_س_چ_پ_ج_ش'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n meridiemParse: /قبل از ظهر|بعد از ظهر/,\n isPM: function (input) {\n return /بعد از ظهر/.test(input);\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 12) {\n return 'قبل از ظهر';\n } else {\n return 'بعد از ظهر';\n }\n },\n calendar: {\n sameDay: '[امروز ساعت] LT',\n nextDay: '[فردا ساعت] LT',\n nextWeek: 'dddd [ساعت] LT',\n lastDay: '[دیروز ساعت] LT',\n lastWeek: 'dddd [پیش] [ساعت] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'در %s',\n past: '%s پیش',\n s: 'چند ثانیه',\n ss: '%d ثانیه',\n m: 'یک دقیقه',\n mm: '%d دقیقه',\n h: 'یک ساعت',\n hh: '%d ساعت',\n d: 'یک روز',\n dd: '%d روز',\n M: 'یک ماه',\n MM: '%d ماه',\n y: 'یک سال',\n yy: '%d سال',\n },\n preparse: function (string) {\n return string\n .replace(/[۰-۹]/g, function (match) {\n return numberMap[match];\n })\n .replace(/،/g, ',');\n },\n postformat: function (string) {\n return string\n .replace(/\\d/g, function (match) {\n return symbolMap[match];\n })\n .replace(/,/g, '،');\n },\n dayOfMonthOrdinalParse: /\\d{1,2}م/,\n ordinal: '%dم',\n week: {\n dow: 6, // Saturday is the first day of the week.\n doy: 12, // The week that contains Jan 12th is the first week of the year.\n },\n });\n\n return fa;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/fa.js?", + ); + + /***/ + }, + + /***/ 527: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Finnish [fi]\n//! author : Tarmo Aidantausta : https://github.com/bleadof\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var numbersPast =\n 'nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän'.split(\n ' '\n ),\n numbersFuture = [\n 'nolla',\n 'yhden',\n 'kahden',\n 'kolmen',\n 'neljän',\n 'viiden',\n 'kuuden',\n numbersPast[7],\n numbersPast[8],\n numbersPast[9],\n ];\n function translate(number, withoutSuffix, key, isFuture) {\n var result = '';\n switch (key) {\n case 's':\n return isFuture ? 'muutaman sekunnin' : 'muutama sekunti';\n case 'ss':\n result = isFuture ? 'sekunnin' : 'sekuntia';\n break;\n case 'm':\n return isFuture ? 'minuutin' : 'minuutti';\n case 'mm':\n result = isFuture ? 'minuutin' : 'minuuttia';\n break;\n case 'h':\n return isFuture ? 'tunnin' : 'tunti';\n case 'hh':\n result = isFuture ? 'tunnin' : 'tuntia';\n break;\n case 'd':\n return isFuture ? 'päivän' : 'päivä';\n case 'dd':\n result = isFuture ? 'päivän' : 'päivää';\n break;\n case 'M':\n return isFuture ? 'kuukauden' : 'kuukausi';\n case 'MM':\n result = isFuture ? 'kuukauden' : 'kuukautta';\n break;\n case 'y':\n return isFuture ? 'vuoden' : 'vuosi';\n case 'yy':\n result = isFuture ? 'vuoden' : 'vuotta';\n break;\n }\n result = verbalNumber(number, isFuture) + ' ' + result;\n return result;\n }\n function verbalNumber(number, isFuture) {\n return number < 10\n ? isFuture\n ? numbersFuture[number]\n : numbersPast[number]\n : number;\n }\n\n var fi = moment.defineLocale('fi', {\n months: 'tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu'.split(\n '_'\n ),\n monthsShort:\n 'tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu'.split(\n '_'\n ),\n weekdays:\n 'sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai'.split(\n '_'\n ),\n weekdaysShort: 'su_ma_ti_ke_to_pe_la'.split('_'),\n weekdaysMin: 'su_ma_ti_ke_to_pe_la'.split('_'),\n longDateFormat: {\n LT: 'HH.mm',\n LTS: 'HH.mm.ss',\n L: 'DD.MM.YYYY',\n LL: 'Do MMMM[ta] YYYY',\n LLL: 'Do MMMM[ta] YYYY, [klo] HH.mm',\n LLLL: 'dddd, Do MMMM[ta] YYYY, [klo] HH.mm',\n l: 'D.M.YYYY',\n ll: 'Do MMM YYYY',\n lll: 'Do MMM YYYY, [klo] HH.mm',\n llll: 'ddd, Do MMM YYYY, [klo] HH.mm',\n },\n calendar: {\n sameDay: '[tänään] [klo] LT',\n nextDay: '[huomenna] [klo] LT',\n nextWeek: 'dddd [klo] LT',\n lastDay: '[eilen] [klo] LT',\n lastWeek: '[viime] dddd[na] [klo] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s päästä',\n past: '%s sitten',\n s: translate,\n ss: translate,\n m: translate,\n mm: translate,\n h: translate,\n hh: translate,\n d: translate,\n dd: translate,\n M: translate,\n MM: translate,\n y: translate,\n yy: translate,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return fi;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/fi.js?", + ); + + /***/ + }, + + /***/ 8376: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Filipino [fil]\n//! author : Dan Hagman : https://github.com/hagmandan\n//! author : Matthew Co : https://github.com/matthewdeeco\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var fil = moment.defineLocale('fil', {\n months: 'Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre'.split(\n '_'\n ),\n monthsShort: 'Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis'.split('_'),\n weekdays: 'Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado'.split(\n '_'\n ),\n weekdaysShort: 'Lin_Lun_Mar_Miy_Huw_Biy_Sab'.split('_'),\n weekdaysMin: 'Li_Lu_Ma_Mi_Hu_Bi_Sab'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'MM/D/YYYY',\n LL: 'MMMM D, YYYY',\n LLL: 'MMMM D, YYYY HH:mm',\n LLLL: 'dddd, MMMM DD, YYYY HH:mm',\n },\n calendar: {\n sameDay: 'LT [ngayong araw]',\n nextDay: '[Bukas ng] LT',\n nextWeek: 'LT [sa susunod na] dddd',\n lastDay: 'LT [kahapon]',\n lastWeek: 'LT [noong nakaraang] dddd',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'sa loob ng %s',\n past: '%s ang nakalipas',\n s: 'ilang segundo',\n ss: '%d segundo',\n m: 'isang minuto',\n mm: '%d minuto',\n h: 'isang oras',\n hh: '%d oras',\n d: 'isang araw',\n dd: '%d araw',\n M: 'isang buwan',\n MM: '%d buwan',\n y: 'isang taon',\n yy: '%d taon',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}/,\n ordinal: function (number) {\n return number;\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return fil;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/fil.js?", + ); + + /***/ + }, + + /***/ 2477: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Faroese [fo]\n//! author : Ragnar Johannesen : https://github.com/ragnar123\n//! author : Kristian Sakarisson : https://github.com/sakarisson\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var fo = moment.defineLocale('fo', {\n months: 'januar_februar_mars_apríl_mai_juni_juli_august_september_oktober_november_desember'.split(\n '_'\n ),\n monthsShort: 'jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_'),\n weekdays:\n 'sunnudagur_mánadagur_týsdagur_mikudagur_hósdagur_fríggjadagur_leygardagur'.split(\n '_'\n ),\n weekdaysShort: 'sun_mán_týs_mik_hós_frí_ley'.split('_'),\n weekdaysMin: 'su_má_tý_mi_hó_fr_le'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D. MMMM, YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Í dag kl.] LT',\n nextDay: '[Í morgin kl.] LT',\n nextWeek: 'dddd [kl.] LT',\n lastDay: '[Í gjár kl.] LT',\n lastWeek: '[síðstu] dddd [kl] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'um %s',\n past: '%s síðani',\n s: 'fá sekund',\n ss: '%d sekundir',\n m: 'ein minuttur',\n mm: '%d minuttir',\n h: 'ein tími',\n hh: '%d tímar',\n d: 'ein dagur',\n dd: '%d dagar',\n M: 'ein mánaður',\n MM: '%d mánaðir',\n y: 'eitt ár',\n yy: '%d ár',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return fo;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/fo.js?", + ); + + /***/ + }, + + /***/ 6435: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : French (Canada) [fr-ca]\n//! author : Jonathan Abourbih : https://github.com/jonbca\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var frCa = moment.defineLocale('fr-ca', {\n months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split(\n '_'\n ),\n monthsShort:\n 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),\n weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),\n weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'YYYY-MM-DD',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Aujourd’hui à] LT',\n nextDay: '[Demain à] LT',\n nextWeek: 'dddd [à] LT',\n lastDay: '[Hier à] LT',\n lastWeek: 'dddd [dernier à] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'dans %s',\n past: 'il y a %s',\n s: 'quelques secondes',\n ss: '%d secondes',\n m: 'une minute',\n mm: '%d minutes',\n h: 'une heure',\n hh: '%d heures',\n d: 'un jour',\n dd: '%d jours',\n M: 'un mois',\n MM: '%d mois',\n y: 'un an',\n yy: '%d ans',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(er|e)/,\n ordinal: function (number, period) {\n switch (period) {\n // Words with masculine grammatical gender: mois, trimestre, jour\n default:\n case 'M':\n case 'Q':\n case 'D':\n case 'DDD':\n case 'd':\n return number + (number === 1 ? 'er' : 'e');\n\n // Words with feminine grammatical gender: semaine\n case 'w':\n case 'W':\n return number + (number === 1 ? 're' : 'e');\n }\n },\n });\n\n return frCa;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/fr-ca.js?", + ); + + /***/ + }, + + /***/ 7892: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : French (Switzerland) [fr-ch]\n//! author : Gaspard Bucher : https://github.com/gaspard\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var frCh = moment.defineLocale('fr-ch', {\n months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split(\n '_'\n ),\n monthsShort:\n 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),\n weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),\n weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Aujourd’hui à] LT',\n nextDay: '[Demain à] LT',\n nextWeek: 'dddd [à] LT',\n lastDay: '[Hier à] LT',\n lastWeek: 'dddd [dernier à] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'dans %s',\n past: 'il y a %s',\n s: 'quelques secondes',\n ss: '%d secondes',\n m: 'une minute',\n mm: '%d minutes',\n h: 'une heure',\n hh: '%d heures',\n d: 'un jour',\n dd: '%d jours',\n M: 'un mois',\n MM: '%d mois',\n y: 'un an',\n yy: '%d ans',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(er|e)/,\n ordinal: function (number, period) {\n switch (period) {\n // Words with masculine grammatical gender: mois, trimestre, jour\n default:\n case 'M':\n case 'Q':\n case 'D':\n case 'DDD':\n case 'd':\n return number + (number === 1 ? 'er' : 'e');\n\n // Words with feminine grammatical gender: semaine\n case 'w':\n case 'W':\n return number + (number === 1 ? 're' : 'e');\n }\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return frCh;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/fr-ch.js?", + ); + + /***/ + }, + + /***/ 5498: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : French [fr]\n//! author : John Fischer : https://github.com/jfroffice\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var monthsStrictRegex =\n /^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,\n monthsShortStrictRegex =\n /(janv\\.?|févr\\.?|mars|avr\\.?|mai|juin|juil\\.?|août|sept\\.?|oct\\.?|nov\\.?|déc\\.?)/i,\n monthsRegex =\n /(janv\\.?|févr\\.?|mars|avr\\.?|mai|juin|juil\\.?|août|sept\\.?|oct\\.?|nov\\.?|déc\\.?|janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,\n monthsParse = [\n /^janv/i,\n /^févr/i,\n /^mars/i,\n /^avr/i,\n /^mai/i,\n /^juin/i,\n /^juil/i,\n /^août/i,\n /^sept/i,\n /^oct/i,\n /^nov/i,\n /^déc/i,\n ];\n\n var fr = moment.defineLocale('fr', {\n months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split(\n '_'\n ),\n monthsShort:\n 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split(\n '_'\n ),\n monthsRegex: monthsRegex,\n monthsShortRegex: monthsRegex,\n monthsStrictRegex: monthsStrictRegex,\n monthsShortStrictRegex: monthsShortStrictRegex,\n monthsParse: monthsParse,\n longMonthsParse: monthsParse,\n shortMonthsParse: monthsParse,\n weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),\n weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),\n weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Aujourd’hui à] LT',\n nextDay: '[Demain à] LT',\n nextWeek: 'dddd [à] LT',\n lastDay: '[Hier à] LT',\n lastWeek: 'dddd [dernier à] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'dans %s',\n past: 'il y a %s',\n s: 'quelques secondes',\n ss: '%d secondes',\n m: 'une minute',\n mm: '%d minutes',\n h: 'une heure',\n hh: '%d heures',\n d: 'un jour',\n dd: '%d jours',\n w: 'une semaine',\n ww: '%d semaines',\n M: 'un mois',\n MM: '%d mois',\n y: 'un an',\n yy: '%d ans',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(er|)/,\n ordinal: function (number, period) {\n switch (period) {\n // TODO: Return 'e' when day of month > 1. Move this case inside\n // block for masculine words below.\n // See https://github.com/moment/moment/issues/3375\n case 'D':\n return number + (number === 1 ? 'er' : '');\n\n // Words with masculine grammatical gender: mois, trimestre, jour\n default:\n case 'M':\n case 'Q':\n case 'DDD':\n case 'd':\n return number + (number === 1 ? 'er' : 'e');\n\n // Words with feminine grammatical gender: semaine\n case 'w':\n case 'W':\n return number + (number === 1 ? 're' : 'e');\n }\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return fr;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/fr.js?", + ); + + /***/ + }, + + /***/ 7071: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Frisian [fy]\n//! author : Robin van der Vliet : https://github.com/robin0van0der0v\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var monthsShortWithDots =\n 'jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.'.split('_'),\n monthsShortWithoutDots =\n 'jan_feb_mrt_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_');\n\n var fy = moment.defineLocale('fy', {\n months: 'jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber'.split(\n '_'\n ),\n monthsShort: function (m, format) {\n if (!m) {\n return monthsShortWithDots;\n } else if (/-MMM-/.test(format)) {\n return monthsShortWithoutDots[m.month()];\n } else {\n return monthsShortWithDots[m.month()];\n }\n },\n monthsParseExact: true,\n weekdays: 'snein_moandei_tiisdei_woansdei_tongersdei_freed_sneon'.split(\n '_'\n ),\n weekdaysShort: 'si._mo._ti._wo._to._fr._so.'.split('_'),\n weekdaysMin: 'Si_Mo_Ti_Wo_To_Fr_So'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD-MM-YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[hjoed om] LT',\n nextDay: '[moarn om] LT',\n nextWeek: 'dddd [om] LT',\n lastDay: '[juster om] LT',\n lastWeek: '[ôfrûne] dddd [om] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'oer %s',\n past: '%s lyn',\n s: 'in pear sekonden',\n ss: '%d sekonden',\n m: 'ien minút',\n mm: '%d minuten',\n h: 'ien oere',\n hh: '%d oeren',\n d: 'ien dei',\n dd: '%d dagen',\n M: 'ien moanne',\n MM: '%d moannen',\n y: 'ien jier',\n yy: '%d jierren',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(ste|de)/,\n ordinal: function (number) {\n return (\n number +\n (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de')\n );\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return fy;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/fy.js?", + ); + + /***/ + }, + + /***/ 1734: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Irish or Irish Gaelic [ga]\n//! author : André Silva : https://github.com/askpt\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var months = [\n 'Eanáir',\n 'Feabhra',\n 'Márta',\n 'Aibreán',\n 'Bealtaine',\n 'Meitheamh',\n 'Iúil',\n 'Lúnasa',\n 'Meán Fómhair',\n 'Deireadh Fómhair',\n 'Samhain',\n 'Nollaig',\n ],\n monthsShort = [\n 'Ean',\n 'Feabh',\n 'Márt',\n 'Aib',\n 'Beal',\n 'Meith',\n 'Iúil',\n 'Lún',\n 'M.F.',\n 'D.F.',\n 'Samh',\n 'Noll',\n ],\n weekdays = [\n 'Dé Domhnaigh',\n 'Dé Luain',\n 'Dé Máirt',\n 'Dé Céadaoin',\n 'Déardaoin',\n 'Dé hAoine',\n 'Dé Sathairn',\n ],\n weekdaysShort = ['Domh', 'Luan', 'Máirt', 'Céad', 'Déar', 'Aoine', 'Sath'],\n weekdaysMin = ['Do', 'Lu', 'Má', 'Cé', 'Dé', 'A', 'Sa'];\n\n var ga = moment.defineLocale('ga', {\n months: months,\n monthsShort: monthsShort,\n monthsParseExact: true,\n weekdays: weekdays,\n weekdaysShort: weekdaysShort,\n weekdaysMin: weekdaysMin,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Inniu ag] LT',\n nextDay: '[Amárach ag] LT',\n nextWeek: 'dddd [ag] LT',\n lastDay: '[Inné ag] LT',\n lastWeek: 'dddd [seo caite] [ag] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'i %s',\n past: '%s ó shin',\n s: 'cúpla soicind',\n ss: '%d soicind',\n m: 'nóiméad',\n mm: '%d nóiméad',\n h: 'uair an chloig',\n hh: '%d uair an chloig',\n d: 'lá',\n dd: '%d lá',\n M: 'mí',\n MM: '%d míonna',\n y: 'bliain',\n yy: '%d bliain',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(d|na|mh)/,\n ordinal: function (number) {\n var output = number === 1 ? 'd' : number % 10 === 2 ? 'na' : 'mh';\n return number + output;\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return ga;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/ga.js?", + ); + + /***/ + }, + + /***/ 217: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Scottish Gaelic [gd]\n//! author : Jon Ashdown : https://github.com/jonashdown\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var months = [\n 'Am Faoilleach',\n 'An Gearran',\n 'Am Màrt',\n 'An Giblean',\n 'An Cèitean',\n 'An t-Ògmhios',\n 'An t-Iuchar',\n 'An Lùnastal',\n 'An t-Sultain',\n 'An Dàmhair',\n 'An t-Samhain',\n 'An Dùbhlachd',\n ],\n monthsShort = [\n 'Faoi',\n 'Gear',\n 'Màrt',\n 'Gibl',\n 'Cèit',\n 'Ògmh',\n 'Iuch',\n 'Lùn',\n 'Sult',\n 'Dàmh',\n 'Samh',\n 'Dùbh',\n ],\n weekdays = [\n 'Didòmhnaich',\n 'Diluain',\n 'Dimàirt',\n 'Diciadain',\n 'Diardaoin',\n 'Dihaoine',\n 'Disathairne',\n ],\n weekdaysShort = ['Did', 'Dil', 'Dim', 'Dic', 'Dia', 'Dih', 'Dis'],\n weekdaysMin = ['Dò', 'Lu', 'Mà', 'Ci', 'Ar', 'Ha', 'Sa'];\n\n var gd = moment.defineLocale('gd', {\n months: months,\n monthsShort: monthsShort,\n monthsParseExact: true,\n weekdays: weekdays,\n weekdaysShort: weekdaysShort,\n weekdaysMin: weekdaysMin,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[An-diugh aig] LT',\n nextDay: '[A-màireach aig] LT',\n nextWeek: 'dddd [aig] LT',\n lastDay: '[An-dè aig] LT',\n lastWeek: 'dddd [seo chaidh] [aig] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'ann an %s',\n past: 'bho chionn %s',\n s: 'beagan diogan',\n ss: '%d diogan',\n m: 'mionaid',\n mm: '%d mionaidean',\n h: 'uair',\n hh: '%d uairean',\n d: 'latha',\n dd: '%d latha',\n M: 'mìos',\n MM: '%d mìosan',\n y: 'bliadhna',\n yy: '%d bliadhna',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(d|na|mh)/,\n ordinal: function (number) {\n var output = number === 1 ? 'd' : number % 10 === 2 ? 'na' : 'mh';\n return number + output;\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return gd;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/gd.js?", + ); + + /***/ + }, + + /***/ 7329: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Galician [gl]\n//! author : Juan G. Hurtado : https://github.com/juanghurtado\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var gl = moment.defineLocale('gl', {\n months: 'xaneiro_febreiro_marzo_abril_maio_xuño_xullo_agosto_setembro_outubro_novembro_decembro'.split(\n '_'\n ),\n monthsShort:\n 'xan._feb._mar._abr._mai._xuñ._xul._ago._set._out._nov._dec.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays: 'domingo_luns_martes_mércores_xoves_venres_sábado'.split('_'),\n weekdaysShort: 'dom._lun._mar._mér._xov._ven._sáb.'.split('_'),\n weekdaysMin: 'do_lu_ma_mé_xo_ve_sá'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D [de] MMMM [de] YYYY',\n LLL: 'D [de] MMMM [de] YYYY H:mm',\n LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm',\n },\n calendar: {\n sameDay: function () {\n return '[hoxe ' + (this.hours() !== 1 ? 'ás' : 'á') + '] LT';\n },\n nextDay: function () {\n return '[mañá ' + (this.hours() !== 1 ? 'ás' : 'á') + '] LT';\n },\n nextWeek: function () {\n return 'dddd [' + (this.hours() !== 1 ? 'ás' : 'a') + '] LT';\n },\n lastDay: function () {\n return '[onte ' + (this.hours() !== 1 ? 'á' : 'a') + '] LT';\n },\n lastWeek: function () {\n return (\n '[o] dddd [pasado ' + (this.hours() !== 1 ? 'ás' : 'a') + '] LT'\n );\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: function (str) {\n if (str.indexOf('un') === 0) {\n return 'n' + str;\n }\n return 'en ' + str;\n },\n past: 'hai %s',\n s: 'uns segundos',\n ss: '%d segundos',\n m: 'un minuto',\n mm: '%d minutos',\n h: 'unha hora',\n hh: '%d horas',\n d: 'un día',\n dd: '%d días',\n M: 'un mes',\n MM: '%d meses',\n y: 'un ano',\n yy: '%d anos',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal: '%dº',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return gl;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/gl.js?", + ); + + /***/ + }, + + /***/ 2124: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Konkani Devanagari script [gom-deva]\n//! author : The Discoverer : https://github.com/WikiDiscoverer\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var format = {\n s: ['थोडया सॅकंडांनी', 'थोडे सॅकंड'],\n ss: [number + ' सॅकंडांनी', number + ' सॅकंड'],\n m: ['एका मिणटान', 'एक मिनूट'],\n mm: [number + ' मिणटांनी', number + ' मिणटां'],\n h: ['एका वरान', 'एक वर'],\n hh: [number + ' वरांनी', number + ' वरां'],\n d: ['एका दिसान', 'एक दीस'],\n dd: [number + ' दिसांनी', number + ' दीस'],\n M: ['एका म्हयन्यान', 'एक म्हयनो'],\n MM: [number + ' म्हयन्यानी', number + ' म्हयने'],\n y: ['एका वर्सान', 'एक वर्स'],\n yy: [number + ' वर्सांनी', number + ' वर्सां'],\n };\n return isFuture ? format[key][0] : format[key][1];\n }\n\n var gomDeva = moment.defineLocale('gom-deva', {\n months: {\n standalone:\n 'जानेवारी_फेब्रुवारी_मार्च_एप्रील_मे_जून_जुलय_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर'.split(\n '_'\n ),\n format: 'जानेवारीच्या_फेब्रुवारीच्या_मार्चाच्या_एप्रीलाच्या_मेयाच्या_जूनाच्या_जुलयाच्या_ऑगस्टाच्या_सप्टेंबराच्या_ऑक्टोबराच्या_नोव्हेंबराच्या_डिसेंबराच्या'.split(\n '_'\n ),\n isFormat: /MMMM(\\s)+D[oD]?/,\n },\n monthsShort:\n 'जाने._फेब्रु._मार्च_एप्री._मे_जून_जुल._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays: 'आयतार_सोमार_मंगळार_बुधवार_बिरेस्तार_सुक्रार_शेनवार'.split('_'),\n weekdaysShort: 'आयत._सोम._मंगळ._बुध._ब्रेस्त._सुक्र._शेन.'.split('_'),\n weekdaysMin: 'आ_सो_मं_बु_ब्रे_सु_शे'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'A h:mm [वाजतां]',\n LTS: 'A h:mm:ss [वाजतां]',\n L: 'DD-MM-YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY A h:mm [वाजतां]',\n LLLL: 'dddd, MMMM Do, YYYY, A h:mm [वाजतां]',\n llll: 'ddd, D MMM YYYY, A h:mm [वाजतां]',\n },\n calendar: {\n sameDay: '[आयज] LT',\n nextDay: '[फाल्यां] LT',\n nextWeek: '[फुडलो] dddd[,] LT',\n lastDay: '[काल] LT',\n lastWeek: '[फाटलो] dddd[,] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s',\n past: '%s आदीं',\n s: processRelativeTime,\n ss: processRelativeTime,\n m: processRelativeTime,\n mm: processRelativeTime,\n h: processRelativeTime,\n hh: processRelativeTime,\n d: processRelativeTime,\n dd: processRelativeTime,\n M: processRelativeTime,\n MM: processRelativeTime,\n y: processRelativeTime,\n yy: processRelativeTime,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(वेर)/,\n ordinal: function (number, period) {\n switch (period) {\n // the ordinal 'वेर' only applies to day of the month\n case 'D':\n return number + 'वेर';\n default:\n case 'M':\n case 'Q':\n case 'DDD':\n case 'd':\n case 'w':\n case 'W':\n return number;\n }\n },\n week: {\n dow: 0, // Sunday is the first day of the week\n doy: 3, // The week that contains Jan 4th is the first week of the year (7 + 0 - 4)\n },\n meridiemParse: /राती|सकाळीं|दनपारां|सांजे/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'राती') {\n return hour < 4 ? hour : hour + 12;\n } else if (meridiem === 'सकाळीं') {\n return hour;\n } else if (meridiem === 'दनपारां') {\n return hour > 12 ? hour : hour + 12;\n } else if (meridiem === 'सांजे') {\n return hour + 12;\n }\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 4) {\n return 'राती';\n } else if (hour < 12) {\n return 'सकाळीं';\n } else if (hour < 16) {\n return 'दनपारां';\n } else if (hour < 20) {\n return 'सांजे';\n } else {\n return 'राती';\n }\n },\n });\n\n return gomDeva;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/gom-deva.js?", + ); + + /***/ + }, + + /***/ 3383: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Konkani Latin script [gom-latn]\n//! author : The Discoverer : https://github.com/WikiDiscoverer\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var format = {\n s: ['thoddea sekondamni', 'thodde sekond'],\n ss: [number + ' sekondamni', number + ' sekond'],\n m: ['eka mintan', 'ek minut'],\n mm: [number + ' mintamni', number + ' mintam'],\n h: ['eka voran', 'ek vor'],\n hh: [number + ' voramni', number + ' voram'],\n d: ['eka disan', 'ek dis'],\n dd: [number + ' disamni', number + ' dis'],\n M: ['eka mhoinean', 'ek mhoino'],\n MM: [number + ' mhoineamni', number + ' mhoine'],\n y: ['eka vorsan', 'ek voros'],\n yy: [number + ' vorsamni', number + ' vorsam'],\n };\n return isFuture ? format[key][0] : format[key][1];\n }\n\n var gomLatn = moment.defineLocale('gom-latn', {\n months: {\n standalone:\n 'Janer_Febrer_Mars_Abril_Mai_Jun_Julai_Agost_Setembr_Otubr_Novembr_Dezembr'.split(\n '_'\n ),\n format: 'Janerachea_Febrerachea_Marsachea_Abrilachea_Maiachea_Junachea_Julaiachea_Agostachea_Setembrachea_Otubrachea_Novembrachea_Dezembrachea'.split(\n '_'\n ),\n isFormat: /MMMM(\\s)+D[oD]?/,\n },\n monthsShort:\n 'Jan._Feb._Mars_Abr._Mai_Jun_Jul._Ago._Set._Otu._Nov._Dez.'.split('_'),\n monthsParseExact: true,\n weekdays: \"Aitar_Somar_Mongllar_Budhvar_Birestar_Sukrar_Son'var\".split('_'),\n weekdaysShort: 'Ait._Som._Mon._Bud._Bre._Suk._Son.'.split('_'),\n weekdaysMin: 'Ai_Sm_Mo_Bu_Br_Su_Sn'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'A h:mm [vazta]',\n LTS: 'A h:mm:ss [vazta]',\n L: 'DD-MM-YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY A h:mm [vazta]',\n LLLL: 'dddd, MMMM Do, YYYY, A h:mm [vazta]',\n llll: 'ddd, D MMM YYYY, A h:mm [vazta]',\n },\n calendar: {\n sameDay: '[Aiz] LT',\n nextDay: '[Faleam] LT',\n nextWeek: '[Fuddlo] dddd[,] LT',\n lastDay: '[Kal] LT',\n lastWeek: '[Fattlo] dddd[,] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s',\n past: '%s adim',\n s: processRelativeTime,\n ss: processRelativeTime,\n m: processRelativeTime,\n mm: processRelativeTime,\n h: processRelativeTime,\n hh: processRelativeTime,\n d: processRelativeTime,\n dd: processRelativeTime,\n M: processRelativeTime,\n MM: processRelativeTime,\n y: processRelativeTime,\n yy: processRelativeTime,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(er)/,\n ordinal: function (number, period) {\n switch (period) {\n // the ordinal 'er' only applies to day of the month\n case 'D':\n return number + 'er';\n default:\n case 'M':\n case 'Q':\n case 'DDD':\n case 'd':\n case 'w':\n case 'W':\n return number;\n }\n },\n week: {\n dow: 0, // Sunday is the first day of the week\n doy: 3, // The week that contains Jan 4th is the first week of the year (7 + 0 - 4)\n },\n meridiemParse: /rati|sokallim|donparam|sanje/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'rati') {\n return hour < 4 ? hour : hour + 12;\n } else if (meridiem === 'sokallim') {\n return hour;\n } else if (meridiem === 'donparam') {\n return hour > 12 ? hour : hour + 12;\n } else if (meridiem === 'sanje') {\n return hour + 12;\n }\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 4) {\n return 'rati';\n } else if (hour < 12) {\n return 'sokallim';\n } else if (hour < 16) {\n return 'donparam';\n } else if (hour < 20) {\n return 'sanje';\n } else {\n return 'rati';\n }\n },\n });\n\n return gomLatn;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/gom-latn.js?", + ); + + /***/ + }, + + /***/ 5050: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Gujarati [gu]\n//! author : Kaushik Thanki : https://github.com/Kaushik1987\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var symbolMap = {\n 1: '૧',\n 2: '૨',\n 3: '૩',\n 4: '૪',\n 5: '૫',\n 6: '૬',\n 7: '૭',\n 8: '૮',\n 9: '૯',\n 0: '૦',\n },\n numberMap = {\n '૧': '1',\n '૨': '2',\n '૩': '3',\n '૪': '4',\n '૫': '5',\n '૬': '6',\n '૭': '7',\n '૮': '8',\n '૯': '9',\n '૦': '0',\n };\n\n var gu = moment.defineLocale('gu', {\n months: 'જાન્યુઆરી_ફેબ્રુઆરી_માર્ચ_એપ્રિલ_મે_જૂન_જુલાઈ_ઑગસ્ટ_સપ્ટેમ્બર_ઑક્ટ્બર_નવેમ્બર_ડિસેમ્બર'.split(\n '_'\n ),\n monthsShort:\n 'જાન્યુ._ફેબ્રુ._માર્ચ_એપ્રિ._મે_જૂન_જુલા._ઑગ._સપ્ટે._ઑક્ટ્._નવે._ડિસે.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays: 'રવિવાર_સોમવાર_મંગળવાર_બુધ્વાર_ગુરુવાર_શુક્રવાર_શનિવાર'.split(\n '_'\n ),\n weekdaysShort: 'રવિ_સોમ_મંગળ_બુધ્_ગુરુ_શુક્ર_શનિ'.split('_'),\n weekdaysMin: 'ર_સો_મં_બુ_ગુ_શુ_શ'.split('_'),\n longDateFormat: {\n LT: 'A h:mm વાગ્યે',\n LTS: 'A h:mm:ss વાગ્યે',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, A h:mm વાગ્યે',\n LLLL: 'dddd, D MMMM YYYY, A h:mm વાગ્યે',\n },\n calendar: {\n sameDay: '[આજ] LT',\n nextDay: '[કાલે] LT',\n nextWeek: 'dddd, LT',\n lastDay: '[ગઇકાલે] LT',\n lastWeek: '[પાછલા] dddd, LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s મા',\n past: '%s પહેલા',\n s: 'અમુક પળો',\n ss: '%d સેકંડ',\n m: 'એક મિનિટ',\n mm: '%d મિનિટ',\n h: 'એક કલાક',\n hh: '%d કલાક',\n d: 'એક દિવસ',\n dd: '%d દિવસ',\n M: 'એક મહિનો',\n MM: '%d મહિનો',\n y: 'એક વર્ષ',\n yy: '%d વર્ષ',\n },\n preparse: function (string) {\n return string.replace(/[૧૨૩૪૫૬૭૮૯૦]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function (string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n // Gujarati notation for meridiems are quite fuzzy in practice. While there exists\n // a rigid notion of a 'Pahar' it is not used as rigidly in modern Gujarati.\n meridiemParse: /રાત|બપોર|સવાર|સાંજ/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'રાત') {\n return hour < 4 ? hour : hour + 12;\n } else if (meridiem === 'સવાર') {\n return hour;\n } else if (meridiem === 'બપોર') {\n return hour >= 10 ? hour : hour + 12;\n } else if (meridiem === 'સાંજ') {\n return hour + 12;\n }\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 4) {\n return 'રાત';\n } else if (hour < 10) {\n return 'સવાર';\n } else if (hour < 17) {\n return 'બપોર';\n } else if (hour < 20) {\n return 'સાંજ';\n } else {\n return 'રાત';\n }\n },\n week: {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n },\n });\n\n return gu;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/gu.js?", + ); + + /***/ + }, + + /***/ 1713: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Hebrew [he]\n//! author : Tomer Cohen : https://github.com/tomer\n//! author : Moshe Simantov : https://github.com/DevelopmentIL\n//! author : Tal Ater : https://github.com/TalAter\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var he = moment.defineLocale('he', {\n months: 'ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר'.split(\n '_'\n ),\n monthsShort:\n 'ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳'.split('_'),\n weekdays: 'ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת'.split('_'),\n weekdaysShort: 'א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳'.split('_'),\n weekdaysMin: 'א_ב_ג_ד_ה_ו_ש'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D [ב]MMMM YYYY',\n LLL: 'D [ב]MMMM YYYY HH:mm',\n LLLL: 'dddd, D [ב]MMMM YYYY HH:mm',\n l: 'D/M/YYYY',\n ll: 'D MMM YYYY',\n lll: 'D MMM YYYY HH:mm',\n llll: 'ddd, D MMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[היום ב־]LT',\n nextDay: '[מחר ב־]LT',\n nextWeek: 'dddd [בשעה] LT',\n lastDay: '[אתמול ב־]LT',\n lastWeek: '[ביום] dddd [האחרון בשעה] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'בעוד %s',\n past: 'לפני %s',\n s: 'מספר שניות',\n ss: '%d שניות',\n m: 'דקה',\n mm: '%d דקות',\n h: 'שעה',\n hh: function (number) {\n if (number === 2) {\n return 'שעתיים';\n }\n return number + ' שעות';\n },\n d: 'יום',\n dd: function (number) {\n if (number === 2) {\n return 'יומיים';\n }\n return number + ' ימים';\n },\n M: 'חודש',\n MM: function (number) {\n if (number === 2) {\n return 'חודשיים';\n }\n return number + ' חודשים';\n },\n y: 'שנה',\n yy: function (number) {\n if (number === 2) {\n return 'שנתיים';\n } else if (number % 10 === 0 && number !== 10) {\n return number + ' שנה';\n }\n return number + ' שנים';\n },\n },\n meridiemParse:\n /אחה\"צ|לפנה\"צ|אחרי הצהריים|לפני הצהריים|לפנות בוקר|בבוקר|בערב/i,\n isPM: function (input) {\n return /^(אחה\"צ|אחרי הצהריים|בערב)$/.test(input);\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 5) {\n return 'לפנות בוקר';\n } else if (hour < 10) {\n return 'בבוקר';\n } else if (hour < 12) {\n return isLower ? 'לפנה\"צ' : 'לפני הצהריים';\n } else if (hour < 18) {\n return isLower ? 'אחה\"צ' : 'אחרי הצהריים';\n } else {\n return 'בערב';\n }\n },\n });\n\n return he;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/he.js?", + ); + + /***/ + }, + + /***/ 3861: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Hindi [hi]\n//! author : Mayank Singhal : https://github.com/mayanksinghal\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var symbolMap = {\n 1: '१',\n 2: '२',\n 3: '३',\n 4: '४',\n 5: '५',\n 6: '६',\n 7: '७',\n 8: '८',\n 9: '९',\n 0: '०',\n },\n numberMap = {\n '१': '1',\n '२': '2',\n '३': '3',\n '४': '4',\n '५': '5',\n '६': '6',\n '७': '7',\n '८': '8',\n '९': '9',\n '०': '0',\n },\n monthsParse = [\n /^जन/i,\n /^फ़र|फर/i,\n /^मार्च/i,\n /^अप्रै/i,\n /^मई/i,\n /^जून/i,\n /^जुल/i,\n /^अग/i,\n /^सितं|सित/i,\n /^अक्टू/i,\n /^नव|नवं/i,\n /^दिसं|दिस/i,\n ],\n shortMonthsParse = [\n /^जन/i,\n /^फ़र/i,\n /^मार्च/i,\n /^अप्रै/i,\n /^मई/i,\n /^जून/i,\n /^जुल/i,\n /^अग/i,\n /^सित/i,\n /^अक्टू/i,\n /^नव/i,\n /^दिस/i,\n ];\n\n var hi = moment.defineLocale('hi', {\n months: {\n format: 'जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर'.split(\n '_'\n ),\n standalone:\n 'जनवरी_फरवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितंबर_अक्टूबर_नवंबर_दिसंबर'.split(\n '_'\n ),\n },\n monthsShort:\n 'जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.'.split('_'),\n weekdays: 'रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'),\n weekdaysShort: 'रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि'.split('_'),\n weekdaysMin: 'र_सो_मं_बु_गु_शु_श'.split('_'),\n longDateFormat: {\n LT: 'A h:mm बजे',\n LTS: 'A h:mm:ss बजे',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, A h:mm बजे',\n LLLL: 'dddd, D MMMM YYYY, A h:mm बजे',\n },\n\n monthsParse: monthsParse,\n longMonthsParse: monthsParse,\n shortMonthsParse: shortMonthsParse,\n\n monthsRegex:\n /^(जनवरी|जन\\.?|फ़रवरी|फरवरी|फ़र\\.?|मार्च?|अप्रैल|अप्रै\\.?|मई?|जून?|जुलाई|जुल\\.?|अगस्त|अग\\.?|सितम्बर|सितंबर|सित\\.?|अक्टूबर|अक्टू\\.?|नवम्बर|नवंबर|नव\\.?|दिसम्बर|दिसंबर|दिस\\.?)/i,\n\n monthsShortRegex:\n /^(जनवरी|जन\\.?|फ़रवरी|फरवरी|फ़र\\.?|मार्च?|अप्रैल|अप्रै\\.?|मई?|जून?|जुलाई|जुल\\.?|अगस्त|अग\\.?|सितम्बर|सितंबर|सित\\.?|अक्टूबर|अक्टू\\.?|नवम्बर|नवंबर|नव\\.?|दिसम्बर|दिसंबर|दिस\\.?)/i,\n\n monthsStrictRegex:\n /^(जनवरी?|फ़रवरी|फरवरी?|मार्च?|अप्रैल?|मई?|जून?|जुलाई?|अगस्त?|सितम्बर|सितंबर|सित?\\.?|अक्टूबर|अक्टू\\.?|नवम्बर|नवंबर?|दिसम्बर|दिसंबर?)/i,\n\n monthsShortStrictRegex:\n /^(जन\\.?|फ़र\\.?|मार्च?|अप्रै\\.?|मई?|जून?|जुल\\.?|अग\\.?|सित\\.?|अक्टू\\.?|नव\\.?|दिस\\.?)/i,\n\n calendar: {\n sameDay: '[आज] LT',\n nextDay: '[कल] LT',\n nextWeek: 'dddd, LT',\n lastDay: '[कल] LT',\n lastWeek: '[पिछले] dddd, LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s में',\n past: '%s पहले',\n s: 'कुछ ही क्षण',\n ss: '%d सेकंड',\n m: 'एक मिनट',\n mm: '%d मिनट',\n h: 'एक घंटा',\n hh: '%d घंटे',\n d: 'एक दिन',\n dd: '%d दिन',\n M: 'एक महीने',\n MM: '%d महीने',\n y: 'एक वर्ष',\n yy: '%d वर्ष',\n },\n preparse: function (string) {\n return string.replace(/[१२३४५६७८९०]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function (string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n // Hindi notation for meridiems are quite fuzzy in practice. While there exists\n // a rigid notion of a 'Pahar' it is not used as rigidly in modern Hindi.\n meridiemParse: /रात|सुबह|दोपहर|शाम/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'रात') {\n return hour < 4 ? hour : hour + 12;\n } else if (meridiem === 'सुबह') {\n return hour;\n } else if (meridiem === 'दोपहर') {\n return hour >= 10 ? hour : hour + 12;\n } else if (meridiem === 'शाम') {\n return hour + 12;\n }\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 4) {\n return 'रात';\n } else if (hour < 10) {\n return 'सुबह';\n } else if (hour < 17) {\n return 'दोपहर';\n } else if (hour < 20) {\n return 'शाम';\n } else {\n return 'रात';\n }\n },\n week: {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n },\n });\n\n return hi;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/hi.js?", + ); + + /***/ + }, + + /***/ 6308: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Croatian [hr]\n//! author : Bojan Marković : https://github.com/bmarkovic\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function translate(number, withoutSuffix, key) {\n var result = number + ' ';\n switch (key) {\n case 'ss':\n if (number === 1) {\n result += 'sekunda';\n } else if (number === 2 || number === 3 || number === 4) {\n result += 'sekunde';\n } else {\n result += 'sekundi';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'jedna minuta' : 'jedne minute';\n case 'mm':\n if (number === 1) {\n result += 'minuta';\n } else if (number === 2 || number === 3 || number === 4) {\n result += 'minute';\n } else {\n result += 'minuta';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'jedan sat' : 'jednog sata';\n case 'hh':\n if (number === 1) {\n result += 'sat';\n } else if (number === 2 || number === 3 || number === 4) {\n result += 'sata';\n } else {\n result += 'sati';\n }\n return result;\n case 'dd':\n if (number === 1) {\n result += 'dan';\n } else {\n result += 'dana';\n }\n return result;\n case 'MM':\n if (number === 1) {\n result += 'mjesec';\n } else if (number === 2 || number === 3 || number === 4) {\n result += 'mjeseca';\n } else {\n result += 'mjeseci';\n }\n return result;\n case 'yy':\n if (number === 1) {\n result += 'godina';\n } else if (number === 2 || number === 3 || number === 4) {\n result += 'godine';\n } else {\n result += 'godina';\n }\n return result;\n }\n }\n\n var hr = moment.defineLocale('hr', {\n months: {\n format: 'siječnja_veljače_ožujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca'.split(\n '_'\n ),\n standalone:\n 'siječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac'.split(\n '_'\n ),\n },\n monthsShort:\n 'sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split(\n '_'\n ),\n weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),\n weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'Do MMMM YYYY',\n LLL: 'Do MMMM YYYY H:mm',\n LLLL: 'dddd, Do MMMM YYYY H:mm',\n },\n calendar: {\n sameDay: '[danas u] LT',\n nextDay: '[sutra u] LT',\n nextWeek: function () {\n switch (this.day()) {\n case 0:\n return '[u] [nedjelju] [u] LT';\n case 3:\n return '[u] [srijedu] [u] LT';\n case 6:\n return '[u] [subotu] [u] LT';\n case 1:\n case 2:\n case 4:\n case 5:\n return '[u] dddd [u] LT';\n }\n },\n lastDay: '[jučer u] LT',\n lastWeek: function () {\n switch (this.day()) {\n case 0:\n return '[prošlu] [nedjelju] [u] LT';\n case 3:\n return '[prošlu] [srijedu] [u] LT';\n case 6:\n return '[prošle] [subote] [u] LT';\n case 1:\n case 2:\n case 4:\n case 5:\n return '[prošli] dddd [u] LT';\n }\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'za %s',\n past: 'prije %s',\n s: 'par sekundi',\n ss: translate,\n m: translate,\n mm: translate,\n h: translate,\n hh: translate,\n d: 'dan',\n dd: translate,\n M: 'mjesec',\n MM: translate,\n y: 'godinu',\n yy: translate,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return hr;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/hr.js?", + ); + + /***/ + }, + + /***/ 609: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Hungarian [hu]\n//! author : Adam Brunner : https://github.com/adambrunner\n//! author : Peter Viszt : https://github.com/passatgt\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var weekEndings =\n 'vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton'.split(' ');\n function translate(number, withoutSuffix, key, isFuture) {\n var num = number;\n switch (key) {\n case 's':\n return isFuture || withoutSuffix\n ? 'néhány másodperc'\n : 'néhány másodperce';\n case 'ss':\n return num + (isFuture || withoutSuffix)\n ? ' másodperc'\n : ' másodperce';\n case 'm':\n return 'egy' + (isFuture || withoutSuffix ? ' perc' : ' perce');\n case 'mm':\n return num + (isFuture || withoutSuffix ? ' perc' : ' perce');\n case 'h':\n return 'egy' + (isFuture || withoutSuffix ? ' óra' : ' órája');\n case 'hh':\n return num + (isFuture || withoutSuffix ? ' óra' : ' órája');\n case 'd':\n return 'egy' + (isFuture || withoutSuffix ? ' nap' : ' napja');\n case 'dd':\n return num + (isFuture || withoutSuffix ? ' nap' : ' napja');\n case 'M':\n return 'egy' + (isFuture || withoutSuffix ? ' hónap' : ' hónapja');\n case 'MM':\n return num + (isFuture || withoutSuffix ? ' hónap' : ' hónapja');\n case 'y':\n return 'egy' + (isFuture || withoutSuffix ? ' év' : ' éve');\n case 'yy':\n return num + (isFuture || withoutSuffix ? ' év' : ' éve');\n }\n return '';\n }\n function week(isFuture) {\n return (\n (isFuture ? '' : '[múlt] ') +\n '[' +\n weekEndings[this.day()] +\n '] LT[-kor]'\n );\n }\n\n var hu = moment.defineLocale('hu', {\n months: 'január_február_március_április_május_június_július_augusztus_szeptember_október_november_december'.split(\n '_'\n ),\n monthsShort:\n 'jan._feb._márc._ápr._máj._jún._júl._aug._szept._okt._nov._dec.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays: 'vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat'.split('_'),\n weekdaysShort: 'vas_hét_kedd_sze_csüt_pén_szo'.split('_'),\n weekdaysMin: 'v_h_k_sze_cs_p_szo'.split('_'),\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'YYYY.MM.DD.',\n LL: 'YYYY. MMMM D.',\n LLL: 'YYYY. MMMM D. H:mm',\n LLLL: 'YYYY. MMMM D., dddd H:mm',\n },\n meridiemParse: /de|du/i,\n isPM: function (input) {\n return input.charAt(1).toLowerCase() === 'u';\n },\n meridiem: function (hours, minutes, isLower) {\n if (hours < 12) {\n return isLower === true ? 'de' : 'DE';\n } else {\n return isLower === true ? 'du' : 'DU';\n }\n },\n calendar: {\n sameDay: '[ma] LT[-kor]',\n nextDay: '[holnap] LT[-kor]',\n nextWeek: function () {\n return week.call(this, true);\n },\n lastDay: '[tegnap] LT[-kor]',\n lastWeek: function () {\n return week.call(this, false);\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s múlva',\n past: '%s',\n s: translate,\n ss: translate,\n m: translate,\n mm: translate,\n h: translate,\n hh: translate,\n d: translate,\n dd: translate,\n M: translate,\n MM: translate,\n y: translate,\n yy: translate,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return hu;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/hu.js?", + ); + + /***/ + }, + + /***/ 7160: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Armenian [hy-am]\n//! author : Armendarabyan : https://github.com/armendarabyan\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var hyAm = moment.defineLocale('hy-am', {\n months: {\n format: 'հունվարի_փետրվարի_մարտի_ապրիլի_մայիսի_հունիսի_հուլիսի_օգոստոսի_սեպտեմբերի_հոկտեմբերի_նոյեմբերի_դեկտեմբերի'.split(\n '_'\n ),\n standalone:\n 'հունվար_փետրվար_մարտ_ապրիլ_մայիս_հունիս_հուլիս_օգոստոս_սեպտեմբեր_հոկտեմբեր_նոյեմբեր_դեկտեմբեր'.split(\n '_'\n ),\n },\n monthsShort: 'հնվ_փտր_մրտ_ապր_մյս_հնս_հլս_օգս_սպտ_հկտ_նմբ_դկտ'.split('_'),\n weekdays:\n 'կիրակի_երկուշաբթի_երեքշաբթի_չորեքշաբթի_հինգշաբթի_ուրբաթ_շաբաթ'.split(\n '_'\n ),\n weekdaysShort: 'կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ'.split('_'),\n weekdaysMin: 'կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY թ.',\n LLL: 'D MMMM YYYY թ., HH:mm',\n LLLL: 'dddd, D MMMM YYYY թ., HH:mm',\n },\n calendar: {\n sameDay: '[այսօր] LT',\n nextDay: '[վաղը] LT',\n lastDay: '[երեկ] LT',\n nextWeek: function () {\n return 'dddd [օրը ժամը] LT';\n },\n lastWeek: function () {\n return '[անցած] dddd [օրը ժամը] LT';\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s հետո',\n past: '%s առաջ',\n s: 'մի քանի վայրկյան',\n ss: '%d վայրկյան',\n m: 'րոպե',\n mm: '%d րոպե',\n h: 'ժամ',\n hh: '%d ժամ',\n d: 'օր',\n dd: '%d օր',\n M: 'ամիս',\n MM: '%d ամիս',\n y: 'տարի',\n yy: '%d տարի',\n },\n meridiemParse: /գիշերվա|առավոտվա|ցերեկվա|երեկոյան/,\n isPM: function (input) {\n return /^(ցերեկվա|երեկոյան)$/.test(input);\n },\n meridiem: function (hour) {\n if (hour < 4) {\n return 'գիշերվա';\n } else if (hour < 12) {\n return 'առավոտվա';\n } else if (hour < 17) {\n return 'ցերեկվա';\n } else {\n return 'երեկոյան';\n }\n },\n dayOfMonthOrdinalParse: /\\d{1,2}|\\d{1,2}-(ին|րդ)/,\n ordinal: function (number, period) {\n switch (period) {\n case 'DDD':\n case 'w':\n case 'W':\n case 'DDDo':\n if (number === 1) {\n return number + '-ին';\n }\n return number + '-րդ';\n default:\n return number;\n }\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return hyAm;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/hy-am.js?", + ); + + /***/ + }, + + /***/ 4063: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Indonesian [id]\n//! author : Mohammad Satrio Utomo : https://github.com/tyok\n//! reference: http://id.wikisource.org/wiki/Pedoman_Umum_Ejaan_Bahasa_Indonesia_yang_Disempurnakan\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var id = moment.defineLocale('id', {\n months: 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember'.split(\n '_'\n ),\n monthsShort: 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Agt_Sep_Okt_Nov_Des'.split('_'),\n weekdays: 'Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu'.split('_'),\n weekdaysShort: 'Min_Sen_Sel_Rab_Kam_Jum_Sab'.split('_'),\n weekdaysMin: 'Mg_Sn_Sl_Rb_Km_Jm_Sb'.split('_'),\n longDateFormat: {\n LT: 'HH.mm',\n LTS: 'HH.mm.ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY [pukul] HH.mm',\n LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm',\n },\n meridiemParse: /pagi|siang|sore|malam/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'pagi') {\n return hour;\n } else if (meridiem === 'siang') {\n return hour >= 11 ? hour : hour + 12;\n } else if (meridiem === 'sore' || meridiem === 'malam') {\n return hour + 12;\n }\n },\n meridiem: function (hours, minutes, isLower) {\n if (hours < 11) {\n return 'pagi';\n } else if (hours < 15) {\n return 'siang';\n } else if (hours < 19) {\n return 'sore';\n } else {\n return 'malam';\n }\n },\n calendar: {\n sameDay: '[Hari ini pukul] LT',\n nextDay: '[Besok pukul] LT',\n nextWeek: 'dddd [pukul] LT',\n lastDay: '[Kemarin pukul] LT',\n lastWeek: 'dddd [lalu pukul] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'dalam %s',\n past: '%s yang lalu',\n s: 'beberapa detik',\n ss: '%d detik',\n m: 'semenit',\n mm: '%d menit',\n h: 'sejam',\n hh: '%d jam',\n d: 'sehari',\n dd: '%d hari',\n M: 'sebulan',\n MM: '%d bulan',\n y: 'setahun',\n yy: '%d tahun',\n },\n week: {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n },\n });\n\n return id;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/id.js?", + ); + + /***/ + }, + + /***/ 9374: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Icelandic [is]\n//! author : Hinrik Örn Sigurðsson : https://github.com/hinrik\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function plural(n) {\n if (n % 100 === 11) {\n return true;\n } else if (n % 10 === 1) {\n return false;\n }\n return true;\n }\n function translate(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nokkrar sekúndur'\n : 'nokkrum sekúndum';\n case 'ss':\n if (plural(number)) {\n return (\n result +\n (withoutSuffix || isFuture ? 'sekúndur' : 'sekúndum')\n );\n }\n return result + 'sekúnda';\n case 'm':\n return withoutSuffix ? 'mínúta' : 'mínútu';\n case 'mm':\n if (plural(number)) {\n return (\n result + (withoutSuffix || isFuture ? 'mínútur' : 'mínútum')\n );\n } else if (withoutSuffix) {\n return result + 'mínúta';\n }\n return result + 'mínútu';\n case 'hh':\n if (plural(number)) {\n return (\n result +\n (withoutSuffix || isFuture\n ? 'klukkustundir'\n : 'klukkustundum')\n );\n }\n return result + 'klukkustund';\n case 'd':\n if (withoutSuffix) {\n return 'dagur';\n }\n return isFuture ? 'dag' : 'degi';\n case 'dd':\n if (plural(number)) {\n if (withoutSuffix) {\n return result + 'dagar';\n }\n return result + (isFuture ? 'daga' : 'dögum');\n } else if (withoutSuffix) {\n return result + 'dagur';\n }\n return result + (isFuture ? 'dag' : 'degi');\n case 'M':\n if (withoutSuffix) {\n return 'mánuður';\n }\n return isFuture ? 'mánuð' : 'mánuði';\n case 'MM':\n if (plural(number)) {\n if (withoutSuffix) {\n return result + 'mánuðir';\n }\n return result + (isFuture ? 'mánuði' : 'mánuðum');\n } else if (withoutSuffix) {\n return result + 'mánuður';\n }\n return result + (isFuture ? 'mánuð' : 'mánuði');\n case 'y':\n return withoutSuffix || isFuture ? 'ár' : 'ári';\n case 'yy':\n if (plural(number)) {\n return result + (withoutSuffix || isFuture ? 'ár' : 'árum');\n }\n return result + (withoutSuffix || isFuture ? 'ár' : 'ári');\n }\n }\n\n var is = moment.defineLocale('is', {\n months: 'janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember'.split(\n '_'\n ),\n monthsShort: 'jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des'.split('_'),\n weekdays:\n 'sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur'.split(\n '_'\n ),\n weekdaysShort: 'sun_mán_þri_mið_fim_fös_lau'.split('_'),\n weekdaysMin: 'Su_Má_Þr_Mi_Fi_Fö_La'.split('_'),\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY [kl.] H:mm',\n LLLL: 'dddd, D. MMMM YYYY [kl.] H:mm',\n },\n calendar: {\n sameDay: '[í dag kl.] LT',\n nextDay: '[á morgun kl.] LT',\n nextWeek: 'dddd [kl.] LT',\n lastDay: '[í gær kl.] LT',\n lastWeek: '[síðasta] dddd [kl.] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'eftir %s',\n past: 'fyrir %s síðan',\n s: translate,\n ss: translate,\n m: translate,\n mm: translate,\n h: 'klukkustund',\n hh: translate,\n d: translate,\n dd: translate,\n M: translate,\n MM: translate,\n y: translate,\n yy: translate,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return is;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/is.js?", + ); + + /***/ + }, + + /***/ 1827: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Italian (Switzerland) [it-ch]\n//! author : xfh : https://github.com/xfh\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var itCh = moment.defineLocale('it-ch', {\n months: 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split(\n '_'\n ),\n monthsShort: 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'),\n weekdays: 'domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato'.split(\n '_'\n ),\n weekdaysShort: 'dom_lun_mar_mer_gio_ven_sab'.split('_'),\n weekdaysMin: 'do_lu_ma_me_gi_ve_sa'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Oggi alle] LT',\n nextDay: '[Domani alle] LT',\n nextWeek: 'dddd [alle] LT',\n lastDay: '[Ieri alle] LT',\n lastWeek: function () {\n switch (this.day()) {\n case 0:\n return '[la scorsa] dddd [alle] LT';\n default:\n return '[lo scorso] dddd [alle] LT';\n }\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: function (s) {\n return (/^[0-9].+$/.test(s) ? 'tra' : 'in') + ' ' + s;\n },\n past: '%s fa',\n s: 'alcuni secondi',\n ss: '%d secondi',\n m: 'un minuto',\n mm: '%d minuti',\n h: \"un'ora\",\n hh: '%d ore',\n d: 'un giorno',\n dd: '%d giorni',\n M: 'un mese',\n MM: '%d mesi',\n y: 'un anno',\n yy: '%d anni',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal: '%dº',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return itCh;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/it-ch.js?", + ); + + /***/ + }, + + /***/ 8383: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Italian [it]\n//! author : Lorenzo : https://github.com/aliem\n//! author: Mattia Larentis: https://github.com/nostalgiaz\n//! author: Marco : https://github.com/Manfre98\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var it = moment.defineLocale('it', {\n months: 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split(\n '_'\n ),\n monthsShort: 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'),\n weekdays: 'domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato'.split(\n '_'\n ),\n weekdaysShort: 'dom_lun_mar_mer_gio_ven_sab'.split('_'),\n weekdaysMin: 'do_lu_ma_me_gi_ve_sa'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: function () {\n return (\n '[Oggi a' +\n (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : \"ll'\") +\n ']LT'\n );\n },\n nextDay: function () {\n return (\n '[Domani a' +\n (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : \"ll'\") +\n ']LT'\n );\n },\n nextWeek: function () {\n return (\n 'dddd [a' +\n (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : \"ll'\") +\n ']LT'\n );\n },\n lastDay: function () {\n return (\n '[Ieri a' +\n (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : \"ll'\") +\n ']LT'\n );\n },\n lastWeek: function () {\n switch (this.day()) {\n case 0:\n return (\n '[La scorsa] dddd [a' +\n (this.hours() > 1\n ? 'lle '\n : this.hours() === 0\n ? ' '\n : \"ll'\") +\n ']LT'\n );\n default:\n return (\n '[Lo scorso] dddd [a' +\n (this.hours() > 1\n ? 'lle '\n : this.hours() === 0\n ? ' '\n : \"ll'\") +\n ']LT'\n );\n }\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'tra %s',\n past: '%s fa',\n s: 'alcuni secondi',\n ss: '%d secondi',\n m: 'un minuto',\n mm: '%d minuti',\n h: \"un'ora\",\n hh: '%d ore',\n d: 'un giorno',\n dd: '%d giorni',\n w: 'una settimana',\n ww: '%d settimane',\n M: 'un mese',\n MM: '%d mesi',\n y: 'un anno',\n yy: '%d anni',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal: '%dº',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return it;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/it.js?", + ); + + /***/ + }, + + /***/ 3827: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Japanese [ja]\n//! author : LI Long : https://github.com/baryon\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var ja = moment.defineLocale('ja', {\n eras: [\n {\n since: '2019-05-01',\n offset: 1,\n name: '令和',\n narrow: '㋿',\n abbr: 'R',\n },\n {\n since: '1989-01-08',\n until: '2019-04-30',\n offset: 1,\n name: '平成',\n narrow: '㍻',\n abbr: 'H',\n },\n {\n since: '1926-12-25',\n until: '1989-01-07',\n offset: 1,\n name: '昭和',\n narrow: '㍼',\n abbr: 'S',\n },\n {\n since: '1912-07-30',\n until: '1926-12-24',\n offset: 1,\n name: '大正',\n narrow: '㍽',\n abbr: 'T',\n },\n {\n since: '1873-01-01',\n until: '1912-07-29',\n offset: 6,\n name: '明治',\n narrow: '㍾',\n abbr: 'M',\n },\n {\n since: '0001-01-01',\n until: '1873-12-31',\n offset: 1,\n name: '西暦',\n narrow: 'AD',\n abbr: 'AD',\n },\n {\n since: '0000-12-31',\n until: -Infinity,\n offset: 1,\n name: '紀元前',\n narrow: 'BC',\n abbr: 'BC',\n },\n ],\n eraYearOrdinalRegex: /(元|\\d+)年/,\n eraYearOrdinalParse: function (input, match) {\n return match[1] === '元' ? 1 : parseInt(match[1] || input, 10);\n },\n months: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),\n monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(\n '_'\n ),\n weekdays: '日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日'.split('_'),\n weekdaysShort: '日_月_火_水_木_金_土'.split('_'),\n weekdaysMin: '日_月_火_水_木_金_土'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'YYYY/MM/DD',\n LL: 'YYYY年M月D日',\n LLL: 'YYYY年M月D日 HH:mm',\n LLLL: 'YYYY年M月D日 dddd HH:mm',\n l: 'YYYY/MM/DD',\n ll: 'YYYY年M月D日',\n lll: 'YYYY年M月D日 HH:mm',\n llll: 'YYYY年M月D日(ddd) HH:mm',\n },\n meridiemParse: /午前|午後/i,\n isPM: function (input) {\n return input === '午後';\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 12) {\n return '午前';\n } else {\n return '午後';\n }\n },\n calendar: {\n sameDay: '[今日] LT',\n nextDay: '[明日] LT',\n nextWeek: function (now) {\n if (now.week() !== this.week()) {\n return '[来週]dddd LT';\n } else {\n return 'dddd LT';\n }\n },\n lastDay: '[昨日] LT',\n lastWeek: function (now) {\n if (this.week() !== now.week()) {\n return '[先週]dddd LT';\n } else {\n return 'dddd LT';\n }\n },\n sameElse: 'L',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}日/,\n ordinal: function (number, period) {\n switch (period) {\n case 'y':\n return number === 1 ? '元年' : number + '年';\n case 'd':\n case 'D':\n case 'DDD':\n return number + '日';\n default:\n return number;\n }\n },\n relativeTime: {\n future: '%s後',\n past: '%s前',\n s: '数秒',\n ss: '%d秒',\n m: '1分',\n mm: '%d分',\n h: '1時間',\n hh: '%d時間',\n d: '1日',\n dd: '%d日',\n M: '1ヶ月',\n MM: '%dヶ月',\n y: '1年',\n yy: '%d年',\n },\n });\n\n return ja;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/ja.js?", + ); + + /***/ + }, + + /***/ 9722: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Javanese [jv]\n//! author : Rony Lantip : https://github.com/lantip\n//! reference: http://jv.wikipedia.org/wiki/Basa_Jawa\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var jv = moment.defineLocale('jv', {\n months: 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_Nopember_Desember'.split(\n '_'\n ),\n monthsShort: 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nop_Des'.split('_'),\n weekdays: 'Minggu_Senen_Seloso_Rebu_Kemis_Jemuwah_Septu'.split('_'),\n weekdaysShort: 'Min_Sen_Sel_Reb_Kem_Jem_Sep'.split('_'),\n weekdaysMin: 'Mg_Sn_Sl_Rb_Km_Jm_Sp'.split('_'),\n longDateFormat: {\n LT: 'HH.mm',\n LTS: 'HH.mm.ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY [pukul] HH.mm',\n LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm',\n },\n meridiemParse: /enjing|siyang|sonten|ndalu/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'enjing') {\n return hour;\n } else if (meridiem === 'siyang') {\n return hour >= 11 ? hour : hour + 12;\n } else if (meridiem === 'sonten' || meridiem === 'ndalu') {\n return hour + 12;\n }\n },\n meridiem: function (hours, minutes, isLower) {\n if (hours < 11) {\n return 'enjing';\n } else if (hours < 15) {\n return 'siyang';\n } else if (hours < 19) {\n return 'sonten';\n } else {\n return 'ndalu';\n }\n },\n calendar: {\n sameDay: '[Dinten puniko pukul] LT',\n nextDay: '[Mbenjang pukul] LT',\n nextWeek: 'dddd [pukul] LT',\n lastDay: '[Kala wingi pukul] LT',\n lastWeek: 'dddd [kepengker pukul] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'wonten ing %s',\n past: '%s ingkang kepengker',\n s: 'sawetawis detik',\n ss: '%d detik',\n m: 'setunggal menit',\n mm: '%d menit',\n h: 'setunggal jam',\n hh: '%d jam',\n d: 'sedinten',\n dd: '%d dinten',\n M: 'sewulan',\n MM: '%d wulan',\n y: 'setaun',\n yy: '%d taun',\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return jv;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/jv.js?", + ); + + /***/ + }, + + /***/ 1794: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Georgian [ka]\n//! author : Irakli Janiashvili : https://github.com/IrakliJani\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var ka = moment.defineLocale('ka', {\n months: 'იანვარი_თებერვალი_მარტი_აპრილი_მაისი_ივნისი_ივლისი_აგვისტო_სექტემბერი_ოქტომბერი_ნოემბერი_დეკემბერი'.split(\n '_'\n ),\n monthsShort: 'იან_თებ_მარ_აპრ_მაი_ივნ_ივლ_აგვ_სექ_ოქტ_ნოე_დეკ'.split('_'),\n weekdays: {\n standalone:\n 'კვირა_ორშაბათი_სამშაბათი_ოთხშაბათი_ხუთშაბათი_პარასკევი_შაბათი'.split(\n '_'\n ),\n format: 'კვირას_ორშაბათს_სამშაბათს_ოთხშაბათს_ხუთშაბათს_პარასკევს_შაბათს'.split(\n '_'\n ),\n isFormat: /(წინა|შემდეგ)/,\n },\n weekdaysShort: 'კვი_ორშ_სამ_ოთხ_ხუთ_პარ_შაბ'.split('_'),\n weekdaysMin: 'კვ_ორ_სა_ოთ_ხუ_პა_შა'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[დღეს] LT[-ზე]',\n nextDay: '[ხვალ] LT[-ზე]',\n lastDay: '[გუშინ] LT[-ზე]',\n nextWeek: '[შემდეგ] dddd LT[-ზე]',\n lastWeek: '[წინა] dddd LT-ზე',\n sameElse: 'L',\n },\n relativeTime: {\n future: function (s) {\n return s.replace(\n /(წამ|წუთ|საათ|წელ|დღ|თვ)(ი|ე)/,\n function ($0, $1, $2) {\n return $2 === 'ი' ? $1 + 'ში' : $1 + $2 + 'ში';\n }\n );\n },\n past: function (s) {\n if (/(წამი|წუთი|საათი|დღე|თვე)/.test(s)) {\n return s.replace(/(ი|ე)$/, 'ის წინ');\n }\n if (/წელი/.test(s)) {\n return s.replace(/წელი$/, 'წლის წინ');\n }\n return s;\n },\n s: 'რამდენიმე წამი',\n ss: '%d წამი',\n m: 'წუთი',\n mm: '%d წუთი',\n h: 'საათი',\n hh: '%d საათი',\n d: 'დღე',\n dd: '%d დღე',\n M: 'თვე',\n MM: '%d თვე',\n y: 'წელი',\n yy: '%d წელი',\n },\n dayOfMonthOrdinalParse: /0|1-ლი|მე-\\d{1,2}|\\d{1,2}-ე/,\n ordinal: function (number) {\n if (number === 0) {\n return number;\n }\n if (number === 1) {\n return number + '-ლი';\n }\n if (\n number < 20 ||\n (number <= 100 && number % 20 === 0) ||\n number % 100 === 0\n ) {\n return 'მე-' + number;\n }\n return number + '-ე';\n },\n week: {\n dow: 1,\n doy: 7,\n },\n });\n\n return ka;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/ka.js?", + ); + + /***/ + }, + + /***/ 7088: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Kazakh [kk]\n//! authors : Nurlan Rakhimzhanov : https://github.com/nurlan\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var suffixes = {\n 0: '-ші',\n 1: '-ші',\n 2: '-ші',\n 3: '-ші',\n 4: '-ші',\n 5: '-ші',\n 6: '-шы',\n 7: '-ші',\n 8: '-ші',\n 9: '-шы',\n 10: '-шы',\n 20: '-шы',\n 30: '-шы',\n 40: '-шы',\n 50: '-ші',\n 60: '-шы',\n 70: '-ші',\n 80: '-ші',\n 90: '-шы',\n 100: '-ші',\n };\n\n var kk = moment.defineLocale('kk', {\n months: 'қаңтар_ақпан_наурыз_сәуір_мамыр_маусым_шілде_тамыз_қыркүйек_қазан_қараша_желтоқсан'.split(\n '_'\n ),\n monthsShort: 'қаң_ақп_нау_сәу_мам_мау_шіл_там_қыр_қаз_қар_жел'.split('_'),\n weekdays: 'жексенбі_дүйсенбі_сейсенбі_сәрсенбі_бейсенбі_жұма_сенбі'.split(\n '_'\n ),\n weekdaysShort: 'жек_дүй_сей_сәр_бей_жұм_сен'.split('_'),\n weekdaysMin: 'жк_дй_сй_ср_бй_жм_сн'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Бүгін сағат] LT',\n nextDay: '[Ертең сағат] LT',\n nextWeek: 'dddd [сағат] LT',\n lastDay: '[Кеше сағат] LT',\n lastWeek: '[Өткен аптаның] dddd [сағат] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s ішінде',\n past: '%s бұрын',\n s: 'бірнеше секунд',\n ss: '%d секунд',\n m: 'бір минут',\n mm: '%d минут',\n h: 'бір сағат',\n hh: '%d сағат',\n d: 'бір күн',\n dd: '%d күн',\n M: 'бір ай',\n MM: '%d ай',\n y: 'бір жыл',\n yy: '%d жыл',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-(ші|шы)/,\n ordinal: function (number) {\n var a = number % 10,\n b = number >= 100 ? 100 : null;\n return number + (suffixes[number] || suffixes[a] || suffixes[b]);\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return kk;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/kk.js?", + ); + + /***/ + }, + + /***/ 6870: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Cambodian [km]\n//! author : Kruy Vanna : https://github.com/kruyvanna\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var symbolMap = {\n 1: '១',\n 2: '២',\n 3: '៣',\n 4: '៤',\n 5: '៥',\n 6: '៦',\n 7: '៧',\n 8: '៨',\n 9: '៩',\n 0: '០',\n },\n numberMap = {\n '១': '1',\n '២': '2',\n '៣': '3',\n '៤': '4',\n '៥': '5',\n '៦': '6',\n '៧': '7',\n '៨': '8',\n '៩': '9',\n '០': '0',\n };\n\n var km = moment.defineLocale('km', {\n months: 'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split(\n '_'\n ),\n monthsShort:\n 'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split(\n '_'\n ),\n weekdays: 'អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍'.split('_'),\n weekdaysShort: 'អា_ច_អ_ព_ព្រ_សុ_ស'.split('_'),\n weekdaysMin: 'អា_ច_អ_ព_ព្រ_សុ_ស'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n meridiemParse: /ព្រឹក|ល្ងាច/,\n isPM: function (input) {\n return input === 'ល្ងាច';\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 12) {\n return 'ព្រឹក';\n } else {\n return 'ល្ងាច';\n }\n },\n calendar: {\n sameDay: '[ថ្ងៃនេះ ម៉ោង] LT',\n nextDay: '[ស្អែក ម៉ោង] LT',\n nextWeek: 'dddd [ម៉ោង] LT',\n lastDay: '[ម្សិលមិញ ម៉ោង] LT',\n lastWeek: 'dddd [សប្តាហ៍មុន] [ម៉ោង] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%sទៀត',\n past: '%sមុន',\n s: 'ប៉ុន្មានវិនាទី',\n ss: '%d វិនាទី',\n m: 'មួយនាទី',\n mm: '%d នាទី',\n h: 'មួយម៉ោង',\n hh: '%d ម៉ោង',\n d: 'មួយថ្ងៃ',\n dd: '%d ថ្ងៃ',\n M: 'មួយខែ',\n MM: '%d ខែ',\n y: 'មួយឆ្នាំ',\n yy: '%d ឆ្នាំ',\n },\n dayOfMonthOrdinalParse: /ទី\\d{1,2}/,\n ordinal: 'ទី%d',\n preparse: function (string) {\n return string.replace(/[១២៣៤៥៦៧៨៩០]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function (string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return km;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/km.js?", + ); + + /***/ + }, + + /***/ 4451: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Kannada [kn]\n//! author : Rajeev Naik : https://github.com/rajeevnaikte\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var symbolMap = {\n 1: '೧',\n 2: '೨',\n 3: '೩',\n 4: '೪',\n 5: '೫',\n 6: '೬',\n 7: '೭',\n 8: '೮',\n 9: '೯',\n 0: '೦',\n },\n numberMap = {\n '೧': '1',\n '೨': '2',\n '೩': '3',\n '೪': '4',\n '೫': '5',\n '೬': '6',\n '೭': '7',\n '೮': '8',\n '೯': '9',\n '೦': '0',\n };\n\n var kn = moment.defineLocale('kn', {\n months: 'ಜನವರಿ_ಫೆಬ್ರವರಿ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂಬರ್_ಅಕ್ಟೋಬರ್_ನವೆಂಬರ್_ಡಿಸೆಂಬರ್'.split(\n '_'\n ),\n monthsShort:\n 'ಜನ_ಫೆಬ್ರ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂ_ಅಕ್ಟೋ_ನವೆಂ_ಡಿಸೆಂ'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays: 'ಭಾನುವಾರ_ಸೋಮವಾರ_ಮಂಗಳವಾರ_ಬುಧವಾರ_ಗುರುವಾರ_ಶುಕ್ರವಾರ_ಶನಿವಾರ'.split(\n '_'\n ),\n weekdaysShort: 'ಭಾನು_ಸೋಮ_ಮಂಗಳ_ಬುಧ_ಗುರು_ಶುಕ್ರ_ಶನಿ'.split('_'),\n weekdaysMin: 'ಭಾ_ಸೋ_ಮಂ_ಬು_ಗು_ಶು_ಶ'.split('_'),\n longDateFormat: {\n LT: 'A h:mm',\n LTS: 'A h:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, A h:mm',\n LLLL: 'dddd, D MMMM YYYY, A h:mm',\n },\n calendar: {\n sameDay: '[ಇಂದು] LT',\n nextDay: '[ನಾಳೆ] LT',\n nextWeek: 'dddd, LT',\n lastDay: '[ನಿನ್ನೆ] LT',\n lastWeek: '[ಕೊನೆಯ] dddd, LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s ನಂತರ',\n past: '%s ಹಿಂದೆ',\n s: 'ಕೆಲವು ಕ್ಷಣಗಳು',\n ss: '%d ಸೆಕೆಂಡುಗಳು',\n m: 'ಒಂದು ನಿಮಿಷ',\n mm: '%d ನಿಮಿಷ',\n h: 'ಒಂದು ಗಂಟೆ',\n hh: '%d ಗಂಟೆ',\n d: 'ಒಂದು ದಿನ',\n dd: '%d ದಿನ',\n M: 'ಒಂದು ತಿಂಗಳು',\n MM: '%d ತಿಂಗಳು',\n y: 'ಒಂದು ವರ್ಷ',\n yy: '%d ವರ್ಷ',\n },\n preparse: function (string) {\n return string.replace(/[೧೨೩೪೫೬೭೮೯೦]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function (string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n meridiemParse: /ರಾತ್ರಿ|ಬೆಳಿಗ್ಗೆ|ಮಧ್ಯಾಹ್ನ|ಸಂಜೆ/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'ರಾತ್ರಿ') {\n return hour < 4 ? hour : hour + 12;\n } else if (meridiem === 'ಬೆಳಿಗ್ಗೆ') {\n return hour;\n } else if (meridiem === 'ಮಧ್ಯಾಹ್ನ') {\n return hour >= 10 ? hour : hour + 12;\n } else if (meridiem === 'ಸಂಜೆ') {\n return hour + 12;\n }\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 4) {\n return 'ರಾತ್ರಿ';\n } else if (hour < 10) {\n return 'ಬೆಳಿಗ್ಗೆ';\n } else if (hour < 17) {\n return 'ಮಧ್ಯಾಹ್ನ';\n } else if (hour < 20) {\n return 'ಸಂಜೆ';\n } else {\n return 'ರಾತ್ರಿ';\n }\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(ನೇ)/,\n ordinal: function (number) {\n return number + 'ನೇ';\n },\n week: {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n },\n });\n\n return kn;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/kn.js?", + ); + + /***/ + }, + + /***/ 3164: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Korean [ko]\n//! author : Kyungwook, Park : https://github.com/kyungw00k\n//! author : Jeeeyul Lee <jeeeyul@gmail.com>\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var ko = moment.defineLocale('ko', {\n months: '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split('_'),\n monthsShort: '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split(\n '_'\n ),\n weekdays: '일요일_월요일_화요일_수요일_목요일_금요일_토요일'.split('_'),\n weekdaysShort: '일_월_화_수_목_금_토'.split('_'),\n weekdaysMin: '일_월_화_수_목_금_토'.split('_'),\n longDateFormat: {\n LT: 'A h:mm',\n LTS: 'A h:mm:ss',\n L: 'YYYY.MM.DD.',\n LL: 'YYYY년 MMMM D일',\n LLL: 'YYYY년 MMMM D일 A h:mm',\n LLLL: 'YYYY년 MMMM D일 dddd A h:mm',\n l: 'YYYY.MM.DD.',\n ll: 'YYYY년 MMMM D일',\n lll: 'YYYY년 MMMM D일 A h:mm',\n llll: 'YYYY년 MMMM D일 dddd A h:mm',\n },\n calendar: {\n sameDay: '오늘 LT',\n nextDay: '내일 LT',\n nextWeek: 'dddd LT',\n lastDay: '어제 LT',\n lastWeek: '지난주 dddd LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s 후',\n past: '%s 전',\n s: '몇 초',\n ss: '%d초',\n m: '1분',\n mm: '%d분',\n h: '한 시간',\n hh: '%d시간',\n d: '하루',\n dd: '%d일',\n M: '한 달',\n MM: '%d달',\n y: '일 년',\n yy: '%d년',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(일|월|주)/,\n ordinal: function (number, period) {\n switch (period) {\n case 'd':\n case 'D':\n case 'DDD':\n return number + '일';\n case 'M':\n return number + '월';\n case 'w':\n case 'W':\n return number + '주';\n default:\n return number;\n }\n },\n meridiemParse: /오전|오후/,\n isPM: function (token) {\n return token === '오후';\n },\n meridiem: function (hour, minute, isUpper) {\n return hour < 12 ? '오전' : '오후';\n },\n });\n\n return ko;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/ko.js?", + ); + + /***/ + }, + + /***/ 6181: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Northern Kurdish [ku-kmr]\n//! authors : Mazlum Özdogan : https://github.com/mergehez\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function processRelativeTime(num, withoutSuffix, key, isFuture) {\n var format = {\n s: ['çend sanîye', 'çend sanîyeyan'],\n ss: [num + ' sanîye', num + ' sanîyeyan'],\n m: ['deqîqeyek', 'deqîqeyekê'],\n mm: [num + ' deqîqe', num + ' deqîqeyan'],\n h: ['saetek', 'saetekê'],\n hh: [num + ' saet', num + ' saetan'],\n d: ['rojek', 'rojekê'],\n dd: [num + ' roj', num + ' rojan'],\n w: ['hefteyek', 'hefteyekê'],\n ww: [num + ' hefte', num + ' hefteyan'],\n M: ['mehek', 'mehekê'],\n MM: [num + ' meh', num + ' mehan'],\n y: ['salek', 'salekê'],\n yy: [num + ' sal', num + ' salan'],\n };\n return withoutSuffix ? format[key][0] : format[key][1];\n }\n // function obliqueNumSuffix(num) {\n // if(num.includes(':'))\n // num = parseInt(num.split(':')[0]);\n // else\n // num = parseInt(num);\n // return num == 0 || num % 10 == 1 ? 'ê'\n // : (num > 10 && num % 10 == 0 ? 'î' : 'an');\n // }\n function ezafeNumSuffix(num) {\n num = '' + num;\n var l = num.substring(num.length - 1),\n ll = num.length > 1 ? num.substring(num.length - 2) : '';\n if (\n !(ll == 12 || ll == 13) &&\n (l == '2' || l == '3' || ll == '50' || l == '70' || l == '80')\n )\n return 'yê';\n return 'ê';\n }\n\n var kuKmr = moment.defineLocale('ku-kmr', {\n // According to the spelling rules defined by the work group of Weqfa Mezopotamyayê (Mesopotamia Foundation)\n // this should be: 'Kanûna Paşîn_Sibat_Adar_Nîsan_Gulan_Hezîran_Tîrmeh_Tebax_Îlon_Çirîya Pêşîn_Çirîya Paşîn_Kanûna Pêşîn'\n // But the names below are more well known and handy\n months: 'Rêbendan_Sibat_Adar_Nîsan_Gulan_Hezîran_Tîrmeh_Tebax_Îlon_Cotmeh_Mijdar_Berfanbar'.split(\n '_'\n ),\n monthsShort: 'Rêb_Sib_Ada_Nîs_Gul_Hez_Tîr_Teb_Îlo_Cot_Mij_Ber'.split('_'),\n monthsParseExact: true,\n weekdays: 'Yekşem_Duşem_Sêşem_Çarşem_Pêncşem_În_Şemî'.split('_'),\n weekdaysShort: 'Yek_Du_Sê_Çar_Pên_În_Şem'.split('_'),\n weekdaysMin: 'Ye_Du_Sê_Ça_Pê_În_Şe'.split('_'),\n meridiem: function (hours, minutes, isLower) {\n if (hours < 12) {\n return isLower ? 'bn' : 'BN';\n } else {\n return isLower ? 'pn' : 'PN';\n }\n },\n meridiemParse: /bn|BN|pn|PN/,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'Do MMMM[a] YYYY[an]',\n LLL: 'Do MMMM[a] YYYY[an] HH:mm',\n LLLL: 'dddd, Do MMMM[a] YYYY[an] HH:mm',\n ll: 'Do MMM[.] YYYY[an]',\n lll: 'Do MMM[.] YYYY[an] HH:mm',\n llll: 'ddd[.], Do MMM[.] YYYY[an] HH:mm',\n },\n calendar: {\n sameDay: '[Îro di saet] LT [de]',\n nextDay: '[Sibê di saet] LT [de]',\n nextWeek: 'dddd [di saet] LT [de]',\n lastDay: '[Duh di saet] LT [de]',\n lastWeek: 'dddd[a borî di saet] LT [de]',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'di %s de',\n past: 'berî %s',\n s: processRelativeTime,\n ss: processRelativeTime,\n m: processRelativeTime,\n mm: processRelativeTime,\n h: processRelativeTime,\n hh: processRelativeTime,\n d: processRelativeTime,\n dd: processRelativeTime,\n w: processRelativeTime,\n ww: processRelativeTime,\n M: processRelativeTime,\n MM: processRelativeTime,\n y: processRelativeTime,\n yy: processRelativeTime,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(?:yê|ê|\\.)/,\n ordinal: function (num, period) {\n var p = period.toLowerCase();\n if (p.includes('w') || p.includes('m')) return num + '.';\n\n return num + ezafeNumSuffix(num);\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return kuKmr;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/ku-kmr.js?", + ); + + /***/ + }, + + /***/ 8174: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Kurdish [ku]\n//! author : Shahram Mebashar : https://github.com/ShahramMebashar\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var symbolMap = {\n 1: '١',\n 2: '٢',\n 3: '٣',\n 4: '٤',\n 5: '٥',\n 6: '٦',\n 7: '٧',\n 8: '٨',\n 9: '٩',\n 0: '٠',\n },\n numberMap = {\n '١': '1',\n '٢': '2',\n '٣': '3',\n '٤': '4',\n '٥': '5',\n '٦': '6',\n '٧': '7',\n '٨': '8',\n '٩': '9',\n '٠': '0',\n },\n months = [\n 'کانونی دووەم',\n 'شوبات',\n 'ئازار',\n 'نیسان',\n 'ئایار',\n 'حوزەیران',\n 'تەمموز',\n 'ئاب',\n 'ئەیلوول',\n 'تشرینی یەكەم',\n 'تشرینی دووەم',\n 'كانونی یەکەم',\n ];\n\n var ku = moment.defineLocale('ku', {\n months: months,\n monthsShort: months,\n weekdays:\n 'یه‌كشه‌ممه‌_دووشه‌ممه‌_سێشه‌ممه‌_چوارشه‌ممه‌_پێنجشه‌ممه‌_هه‌ینی_شه‌ممه‌'.split(\n '_'\n ),\n weekdaysShort:\n 'یه‌كشه‌م_دووشه‌م_سێشه‌م_چوارشه‌م_پێنجشه‌م_هه‌ینی_شه‌ممه‌'.split('_'),\n weekdaysMin: 'ی_د_س_چ_پ_ه_ش'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n meridiemParse: /ئێواره‌|به‌یانی/,\n isPM: function (input) {\n return /ئێواره‌/.test(input);\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 12) {\n return 'به‌یانی';\n } else {\n return 'ئێواره‌';\n }\n },\n calendar: {\n sameDay: '[ئه‌مرۆ كاتژمێر] LT',\n nextDay: '[به‌یانی كاتژمێر] LT',\n nextWeek: 'dddd [كاتژمێر] LT',\n lastDay: '[دوێنێ كاتژمێر] LT',\n lastWeek: 'dddd [كاتژمێر] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'له‌ %s',\n past: '%s',\n s: 'چه‌ند چركه‌یه‌ك',\n ss: 'چركه‌ %d',\n m: 'یه‌ك خوله‌ك',\n mm: '%d خوله‌ك',\n h: 'یه‌ك كاتژمێر',\n hh: '%d كاتژمێر',\n d: 'یه‌ك ڕۆژ',\n dd: '%d ڕۆژ',\n M: 'یه‌ك مانگ',\n MM: '%d مانگ',\n y: 'یه‌ك ساڵ',\n yy: '%d ساڵ',\n },\n preparse: function (string) {\n return string\n .replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {\n return numberMap[match];\n })\n .replace(/،/g, ',');\n },\n postformat: function (string) {\n return string\n .replace(/\\d/g, function (match) {\n return symbolMap[match];\n })\n .replace(/,/g, '،');\n },\n week: {\n dow: 6, // Saturday is the first day of the week.\n doy: 12, // The week that contains Jan 12th is the first week of the year.\n },\n });\n\n return ku;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/ku.js?", + ); + + /***/ + }, + + /***/ 8474: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Kyrgyz [ky]\n//! author : Chyngyz Arystan uulu : https://github.com/chyngyz\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var suffixes = {\n 0: '-чү',\n 1: '-чи',\n 2: '-чи',\n 3: '-чү',\n 4: '-чү',\n 5: '-чи',\n 6: '-чы',\n 7: '-чи',\n 8: '-чи',\n 9: '-чу',\n 10: '-чу',\n 20: '-чы',\n 30: '-чу',\n 40: '-чы',\n 50: '-чү',\n 60: '-чы',\n 70: '-чи',\n 80: '-чи',\n 90: '-чу',\n 100: '-чү',\n };\n\n var ky = moment.defineLocale('ky', {\n months: 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split(\n '_'\n ),\n monthsShort: 'янв_фев_март_апр_май_июнь_июль_авг_сен_окт_ноя_дек'.split(\n '_'\n ),\n weekdays: 'Жекшемби_Дүйшөмбү_Шейшемби_Шаршемби_Бейшемби_Жума_Ишемби'.split(\n '_'\n ),\n weekdaysShort: 'Жек_Дүй_Шей_Шар_Бей_Жум_Ише'.split('_'),\n weekdaysMin: 'Жк_Дй_Шй_Шр_Бй_Жм_Иш'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Бүгүн саат] LT',\n nextDay: '[Эртең саат] LT',\n nextWeek: 'dddd [саат] LT',\n lastDay: '[Кечээ саат] LT',\n lastWeek: '[Өткөн аптанын] dddd [күнү] [саат] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s ичинде',\n past: '%s мурун',\n s: 'бирнече секунд',\n ss: '%d секунд',\n m: 'бир мүнөт',\n mm: '%d мүнөт',\n h: 'бир саат',\n hh: '%d саат',\n d: 'бир күн',\n dd: '%d күн',\n M: 'бир ай',\n MM: '%d ай',\n y: 'бир жыл',\n yy: '%d жыл',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-(чи|чы|чү|чу)/,\n ordinal: function (number) {\n var a = number % 10,\n b = number >= 100 ? 100 : null;\n return number + (suffixes[number] || suffixes[a] || suffixes[b]);\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return ky;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/ky.js?", + ); + + /***/ + }, + + /***/ 9680: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Luxembourgish [lb]\n//! author : mweimerskirch : https://github.com/mweimerskirch\n//! author : David Raison : https://github.com/kwisatz\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var format = {\n m: ['eng Minutt', 'enger Minutt'],\n h: ['eng Stonn', 'enger Stonn'],\n d: ['een Dag', 'engem Dag'],\n M: ['ee Mount', 'engem Mount'],\n y: ['ee Joer', 'engem Joer'],\n };\n return withoutSuffix ? format[key][0] : format[key][1];\n }\n function processFutureTime(string) {\n var number = string.substr(0, string.indexOf(' '));\n if (eifelerRegelAppliesToNumber(number)) {\n return 'a ' + string;\n }\n return 'an ' + string;\n }\n function processPastTime(string) {\n var number = string.substr(0, string.indexOf(' '));\n if (eifelerRegelAppliesToNumber(number)) {\n return 'viru ' + string;\n }\n return 'virun ' + string;\n }\n /**\n * Returns true if the word before the given number loses the '-n' ending.\n * e.g. 'an 10 Deeg' but 'a 5 Deeg'\n *\n * @param number {integer}\n * @returns {boolean}\n */\n function eifelerRegelAppliesToNumber(number) {\n number = parseInt(number, 10);\n if (isNaN(number)) {\n return false;\n }\n if (number < 0) {\n // Negative Number --> always true\n return true;\n } else if (number < 10) {\n // Only 1 digit\n if (4 <= number && number <= 7) {\n return true;\n }\n return false;\n } else if (number < 100) {\n // 2 digits\n var lastDigit = number % 10,\n firstDigit = number / 10;\n if (lastDigit === 0) {\n return eifelerRegelAppliesToNumber(firstDigit);\n }\n return eifelerRegelAppliesToNumber(lastDigit);\n } else if (number < 10000) {\n // 3 or 4 digits --> recursively check first digit\n while (number >= 10) {\n number = number / 10;\n }\n return eifelerRegelAppliesToNumber(number);\n } else {\n // Anything larger than 4 digits: recursively check first n-3 digits\n number = number / 1000;\n return eifelerRegelAppliesToNumber(number);\n }\n }\n\n var lb = moment.defineLocale('lb', {\n months: 'Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember'.split(\n '_'\n ),\n monthsShort:\n 'Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays:\n 'Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg'.split(\n '_'\n ),\n weekdaysShort: 'So._Mé._Dë._Më._Do._Fr._Sa.'.split('_'),\n weekdaysMin: 'So_Mé_Dë_Më_Do_Fr_Sa'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm [Auer]',\n LTS: 'H:mm:ss [Auer]',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY H:mm [Auer]',\n LLLL: 'dddd, D. MMMM YYYY H:mm [Auer]',\n },\n calendar: {\n sameDay: '[Haut um] LT',\n sameElse: 'L',\n nextDay: '[Muer um] LT',\n nextWeek: 'dddd [um] LT',\n lastDay: '[Gëschter um] LT',\n lastWeek: function () {\n // Different date string for 'Dënschdeg' (Tuesday) and 'Donneschdeg' (Thursday) due to phonological rule\n switch (this.day()) {\n case 2:\n case 4:\n return '[Leschten] dddd [um] LT';\n default:\n return '[Leschte] dddd [um] LT';\n }\n },\n },\n relativeTime: {\n future: processFutureTime,\n past: processPastTime,\n s: 'e puer Sekonnen',\n ss: '%d Sekonnen',\n m: processRelativeTime,\n mm: '%d Minutten',\n h: processRelativeTime,\n hh: '%d Stonnen',\n d: processRelativeTime,\n dd: '%d Deeg',\n M: processRelativeTime,\n MM: '%d Méint',\n y: processRelativeTime,\n yy: '%d Joer',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return lb;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/lb.js?", + ); + + /***/ + }, + + /***/ 5867: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Lao [lo]\n//! author : Ryan Hart : https://github.com/ryanhart2\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var lo = moment.defineLocale('lo', {\n months: 'ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ'.split(\n '_'\n ),\n monthsShort:\n 'ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ'.split(\n '_'\n ),\n weekdays: 'ອາທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ'.split('_'),\n weekdaysShort: 'ທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ'.split('_'),\n weekdaysMin: 'ທ_ຈ_ອຄ_ພ_ພຫ_ສກ_ສ'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'ວັນdddd D MMMM YYYY HH:mm',\n },\n meridiemParse: /ຕອນເຊົ້າ|ຕອນແລງ/,\n isPM: function (input) {\n return input === 'ຕອນແລງ';\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 12) {\n return 'ຕອນເຊົ້າ';\n } else {\n return 'ຕອນແລງ';\n }\n },\n calendar: {\n sameDay: '[ມື້ນີ້ເວລາ] LT',\n nextDay: '[ມື້ອື່ນເວລາ] LT',\n nextWeek: '[ວັນ]dddd[ໜ້າເວລາ] LT',\n lastDay: '[ມື້ວານນີ້ເວລາ] LT',\n lastWeek: '[ວັນ]dddd[ແລ້ວນີ້ເວລາ] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'ອີກ %s',\n past: '%sຜ່ານມາ',\n s: 'ບໍ່ເທົ່າໃດວິນາທີ',\n ss: '%d ວິນາທີ',\n m: '1 ນາທີ',\n mm: '%d ນາທີ',\n h: '1 ຊົ່ວໂມງ',\n hh: '%d ຊົ່ວໂມງ',\n d: '1 ມື້',\n dd: '%d ມື້',\n M: '1 ເດືອນ',\n MM: '%d ເດືອນ',\n y: '1 ປີ',\n yy: '%d ປີ',\n },\n dayOfMonthOrdinalParse: /(ທີ່)\\d{1,2}/,\n ordinal: function (number) {\n return 'ທີ່' + number;\n },\n });\n\n return lo;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/lo.js?", + ); + + /***/ + }, + + /***/ 5766: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Lithuanian [lt]\n//! author : Mindaugas Mozūras : https://github.com/mmozuras\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var units = {\n ss: 'sekundė_sekundžių_sekundes',\n m: 'minutė_minutės_minutę',\n mm: 'minutės_minučių_minutes',\n h: 'valanda_valandos_valandą',\n hh: 'valandos_valandų_valandas',\n d: 'diena_dienos_dieną',\n dd: 'dienos_dienų_dienas',\n M: 'mėnuo_mėnesio_mėnesį',\n MM: 'mėnesiai_mėnesių_mėnesius',\n y: 'metai_metų_metus',\n yy: 'metai_metų_metus',\n };\n function translateSeconds(number, withoutSuffix, key, isFuture) {\n if (withoutSuffix) {\n return 'kelios sekundės';\n } else {\n return isFuture ? 'kelių sekundžių' : 'kelias sekundes';\n }\n }\n function translateSingular(number, withoutSuffix, key, isFuture) {\n return withoutSuffix\n ? forms(key)[0]\n : isFuture\n ? forms(key)[1]\n : forms(key)[2];\n }\n function special(number) {\n return number % 10 === 0 || (number > 10 && number < 20);\n }\n function forms(key) {\n return units[key].split('_');\n }\n function translate(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n if (number === 1) {\n return (\n result + translateSingular(number, withoutSuffix, key[0], isFuture)\n );\n } else if (withoutSuffix) {\n return result + (special(number) ? forms(key)[1] : forms(key)[0]);\n } else {\n if (isFuture) {\n return result + forms(key)[1];\n } else {\n return result + (special(number) ? forms(key)[1] : forms(key)[2]);\n }\n }\n }\n var lt = moment.defineLocale('lt', {\n months: {\n format: 'sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio'.split(\n '_'\n ),\n standalone:\n 'sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis'.split(\n '_'\n ),\n isFormat: /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?|MMMM?(\\[[^\\[\\]]*\\]|\\s)+D[oD]?/,\n },\n monthsShort: 'sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd'.split('_'),\n weekdays: {\n format: 'sekmadienį_pirmadienį_antradienį_trečiadienį_ketvirtadienį_penktadienį_šeštadienį'.split(\n '_'\n ),\n standalone:\n 'sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis'.split(\n '_'\n ),\n isFormat: /dddd HH:mm/,\n },\n weekdaysShort: 'Sek_Pir_Ant_Tre_Ket_Pen_Šeš'.split('_'),\n weekdaysMin: 'S_P_A_T_K_Pn_Š'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'YYYY-MM-DD',\n LL: 'YYYY [m.] MMMM D [d.]',\n LLL: 'YYYY [m.] MMMM D [d.], HH:mm [val.]',\n LLLL: 'YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]',\n l: 'YYYY-MM-DD',\n ll: 'YYYY [m.] MMMM D [d.]',\n lll: 'YYYY [m.] MMMM D [d.], HH:mm [val.]',\n llll: 'YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]',\n },\n calendar: {\n sameDay: '[Šiandien] LT',\n nextDay: '[Rytoj] LT',\n nextWeek: 'dddd LT',\n lastDay: '[Vakar] LT',\n lastWeek: '[Praėjusį] dddd LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'po %s',\n past: 'prieš %s',\n s: translateSeconds,\n ss: translate,\n m: translateSingular,\n mm: translate,\n h: translateSingular,\n hh: translate,\n d: translateSingular,\n dd: translate,\n M: translateSingular,\n MM: translate,\n y: translateSingular,\n yy: translate,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-oji/,\n ordinal: function (number) {\n return number + '-oji';\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return lt;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/lt.js?", + ); + + /***/ + }, + + /***/ 9532: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Latvian [lv]\n//! author : Kristaps Karlsons : https://github.com/skakri\n//! author : Jānis Elmeris : https://github.com/JanisE\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var units = {\n ss: 'sekundes_sekundēm_sekunde_sekundes'.split('_'),\n m: 'minūtes_minūtēm_minūte_minūtes'.split('_'),\n mm: 'minūtes_minūtēm_minūte_minūtes'.split('_'),\n h: 'stundas_stundām_stunda_stundas'.split('_'),\n hh: 'stundas_stundām_stunda_stundas'.split('_'),\n d: 'dienas_dienām_diena_dienas'.split('_'),\n dd: 'dienas_dienām_diena_dienas'.split('_'),\n M: 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'),\n MM: 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'),\n y: 'gada_gadiem_gads_gadi'.split('_'),\n yy: 'gada_gadiem_gads_gadi'.split('_'),\n };\n /**\n * @param withoutSuffix boolean true = a length of time; false = before/after a period of time.\n */\n function format(forms, number, withoutSuffix) {\n if (withoutSuffix) {\n // E.g. \"21 minūte\", \"3 minūtes\".\n return number % 10 === 1 && number % 100 !== 11 ? forms[2] : forms[3];\n } else {\n // E.g. \"21 minūtes\" as in \"pēc 21 minūtes\".\n // E.g. \"3 minūtēm\" as in \"pēc 3 minūtēm\".\n return number % 10 === 1 && number % 100 !== 11 ? forms[0] : forms[1];\n }\n }\n function relativeTimeWithPlural(number, withoutSuffix, key) {\n return number + ' ' + format(units[key], number, withoutSuffix);\n }\n function relativeTimeWithSingular(number, withoutSuffix, key) {\n return format(units[key], number, withoutSuffix);\n }\n function relativeSeconds(number, withoutSuffix) {\n return withoutSuffix ? 'dažas sekundes' : 'dažām sekundēm';\n }\n\n var lv = moment.defineLocale('lv', {\n months: 'janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris'.split(\n '_'\n ),\n monthsShort: 'jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec'.split('_'),\n weekdays:\n 'svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena'.split(\n '_'\n ),\n weekdaysShort: 'Sv_P_O_T_C_Pk_S'.split('_'),\n weekdaysMin: 'Sv_P_O_T_C_Pk_S'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY.',\n LL: 'YYYY. [gada] D. MMMM',\n LLL: 'YYYY. [gada] D. MMMM, HH:mm',\n LLLL: 'YYYY. [gada] D. MMMM, dddd, HH:mm',\n },\n calendar: {\n sameDay: '[Šodien pulksten] LT',\n nextDay: '[Rīt pulksten] LT',\n nextWeek: 'dddd [pulksten] LT',\n lastDay: '[Vakar pulksten] LT',\n lastWeek: '[Pagājušā] dddd [pulksten] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'pēc %s',\n past: 'pirms %s',\n s: relativeSeconds,\n ss: relativeTimeWithPlural,\n m: relativeTimeWithSingular,\n mm: relativeTimeWithPlural,\n h: relativeTimeWithSingular,\n hh: relativeTimeWithPlural,\n d: relativeTimeWithSingular,\n dd: relativeTimeWithPlural,\n M: relativeTimeWithSingular,\n MM: relativeTimeWithPlural,\n y: relativeTimeWithSingular,\n yy: relativeTimeWithPlural,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return lv;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/lv.js?", + ); + + /***/ + }, + + /***/ 8076: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Montenegrin [me]\n//! author : Miodrag Nikač <miodrag@restartit.me> : https://github.com/miodragnikac\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var translator = {\n words: {\n //Different grammatical cases\n ss: ['sekund', 'sekunda', 'sekundi'],\n m: ['jedan minut', 'jednog minuta'],\n mm: ['minut', 'minuta', 'minuta'],\n h: ['jedan sat', 'jednog sata'],\n hh: ['sat', 'sata', 'sati'],\n dd: ['dan', 'dana', 'dana'],\n MM: ['mjesec', 'mjeseca', 'mjeseci'],\n yy: ['godina', 'godine', 'godina'],\n },\n correctGrammaticalCase: function (number, wordKey) {\n return number === 1\n ? wordKey[0]\n : number >= 2 && number <= 4\n ? wordKey[1]\n : wordKey[2];\n },\n translate: function (number, withoutSuffix, key) {\n var wordKey = translator.words[key];\n if (key.length === 1) {\n return withoutSuffix ? wordKey[0] : wordKey[1];\n } else {\n return (\n number +\n ' ' +\n translator.correctGrammaticalCase(number, wordKey)\n );\n }\n },\n };\n\n var me = moment.defineLocale('me', {\n months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split(\n '_'\n ),\n monthsShort:\n 'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split('_'),\n monthsParseExact: true,\n weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split(\n '_'\n ),\n weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),\n weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY H:mm',\n LLLL: 'dddd, D. MMMM YYYY H:mm',\n },\n calendar: {\n sameDay: '[danas u] LT',\n nextDay: '[sjutra u] LT',\n\n nextWeek: function () {\n switch (this.day()) {\n case 0:\n return '[u] [nedjelju] [u] LT';\n case 3:\n return '[u] [srijedu] [u] LT';\n case 6:\n return '[u] [subotu] [u] LT';\n case 1:\n case 2:\n case 4:\n case 5:\n return '[u] dddd [u] LT';\n }\n },\n lastDay: '[juče u] LT',\n lastWeek: function () {\n var lastWeekDays = [\n '[prošle] [nedjelje] [u] LT',\n '[prošlog] [ponedjeljka] [u] LT',\n '[prošlog] [utorka] [u] LT',\n '[prošle] [srijede] [u] LT',\n '[prošlog] [četvrtka] [u] LT',\n '[prošlog] [petka] [u] LT',\n '[prošle] [subote] [u] LT',\n ];\n return lastWeekDays[this.day()];\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'za %s',\n past: 'prije %s',\n s: 'nekoliko sekundi',\n ss: translator.translate,\n m: translator.translate,\n mm: translator.translate,\n h: translator.translate,\n hh: translator.translate,\n d: 'dan',\n dd: translator.translate,\n M: 'mjesec',\n MM: translator.translate,\n y: 'godinu',\n yy: translator.translate,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return me;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/me.js?", + ); + + /***/ + }, + + /***/ 1848: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Maori [mi]\n//! author : John Corrigan <robbiecloset@gmail.com> : https://github.com/johnideal\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var mi = moment.defineLocale('mi', {\n months: 'Kohi-tāte_Hui-tanguru_Poutū-te-rangi_Paenga-whāwhā_Haratua_Pipiri_Hōngoingoi_Here-turi-kōkā_Mahuru_Whiringa-ā-nuku_Whiringa-ā-rangi_Hakihea'.split(\n '_'\n ),\n monthsShort:\n 'Kohi_Hui_Pou_Pae_Hara_Pipi_Hōngoi_Here_Mahu_Whi-nu_Whi-ra_Haki'.split(\n '_'\n ),\n monthsRegex: /(?:['a-z\\u0101\\u014D\\u016B]+\\-?){1,3}/i,\n monthsStrictRegex: /(?:['a-z\\u0101\\u014D\\u016B]+\\-?){1,3}/i,\n monthsShortRegex: /(?:['a-z\\u0101\\u014D\\u016B]+\\-?){1,3}/i,\n monthsShortStrictRegex: /(?:['a-z\\u0101\\u014D\\u016B]+\\-?){1,2}/i,\n weekdays: 'Rātapu_Mane_Tūrei_Wenerei_Tāite_Paraire_Hātarei'.split('_'),\n weekdaysShort: 'Ta_Ma_Tū_We_Tāi_Pa_Hā'.split('_'),\n weekdaysMin: 'Ta_Ma_Tū_We_Tāi_Pa_Hā'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY [i] HH:mm',\n LLLL: 'dddd, D MMMM YYYY [i] HH:mm',\n },\n calendar: {\n sameDay: '[i teie mahana, i] LT',\n nextDay: '[apopo i] LT',\n nextWeek: 'dddd [i] LT',\n lastDay: '[inanahi i] LT',\n lastWeek: 'dddd [whakamutunga i] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'i roto i %s',\n past: '%s i mua',\n s: 'te hēkona ruarua',\n ss: '%d hēkona',\n m: 'he meneti',\n mm: '%d meneti',\n h: 'te haora',\n hh: '%d haora',\n d: 'he ra',\n dd: '%d ra',\n M: 'he marama',\n MM: '%d marama',\n y: 'he tau',\n yy: '%d tau',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal: '%dº',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return mi;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/mi.js?", + ); + + /***/ + }, + + /***/ 306: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Macedonian [mk]\n//! author : Borislav Mickov : https://github.com/B0k0\n//! author : Sashko Todorov : https://github.com/bkyceh\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var mk = moment.defineLocale('mk', {\n months: 'јануари_февруари_март_април_мај_јуни_јули_август_септември_октомври_ноември_декември'.split(\n '_'\n ),\n monthsShort: 'јан_фев_мар_апр_мај_јун_јул_авг_сеп_окт_ное_дек'.split('_'),\n weekdays: 'недела_понеделник_вторник_среда_четврток_петок_сабота'.split(\n '_'\n ),\n weekdaysShort: 'нед_пон_вто_сре_чет_пет_саб'.split('_'),\n weekdaysMin: 'нe_пo_вт_ср_че_пе_сa'.split('_'),\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'D.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY H:mm',\n LLLL: 'dddd, D MMMM YYYY H:mm',\n },\n calendar: {\n sameDay: '[Денес во] LT',\n nextDay: '[Утре во] LT',\n nextWeek: '[Во] dddd [во] LT',\n lastDay: '[Вчера во] LT',\n lastWeek: function () {\n switch (this.day()) {\n case 0:\n case 3:\n case 6:\n return '[Изминатата] dddd [во] LT';\n case 1:\n case 2:\n case 4:\n case 5:\n return '[Изминатиот] dddd [во] LT';\n }\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'за %s',\n past: 'пред %s',\n s: 'неколку секунди',\n ss: '%d секунди',\n m: 'една минута',\n mm: '%d минути',\n h: 'еден час',\n hh: '%d часа',\n d: 'еден ден',\n dd: '%d дена',\n M: 'еден месец',\n MM: '%d месеци',\n y: 'една година',\n yy: '%d години',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-(ев|ен|ти|ви|ри|ми)/,\n ordinal: function (number) {\n var lastDigit = number % 10,\n last2Digits = number % 100;\n if (number === 0) {\n return number + '-ев';\n } else if (last2Digits === 0) {\n return number + '-ен';\n } else if (last2Digits > 10 && last2Digits < 20) {\n return number + '-ти';\n } else if (lastDigit === 1) {\n return number + '-ви';\n } else if (lastDigit === 2) {\n return number + '-ри';\n } else if (lastDigit === 7 || lastDigit === 8) {\n return number + '-ми';\n } else {\n return number + '-ти';\n }\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return mk;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/mk.js?", + ); + + /***/ + }, + + /***/ 3739: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Malayalam [ml]\n//! author : Floyd Pink : https://github.com/floydpink\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var ml = moment.defineLocale('ml', {\n months: 'ജനുവരി_ഫെബ്രുവരി_മാർച്ച്_ഏപ്രിൽ_മേയ്_ജൂൺ_ജൂലൈ_ഓഗസ്റ്റ്_സെപ്റ്റംബർ_ഒക്ടോബർ_നവംബർ_ഡിസംബർ'.split(\n '_'\n ),\n monthsShort:\n 'ജനു._ഫെബ്രു._മാർ._ഏപ്രി._മേയ്_ജൂൺ_ജൂലൈ._ഓഗ._സെപ്റ്റ._ഒക്ടോ._നവം._ഡിസം.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays:\n 'ഞായറാഴ്ച_തിങ്കളാഴ്ച_ചൊവ്വാഴ്ച_ബുധനാഴ്ച_വ്യാഴാഴ്ച_വെള്ളിയാഴ്ച_ശനിയാഴ്ച'.split(\n '_'\n ),\n weekdaysShort: 'ഞായർ_തിങ്കൾ_ചൊവ്വ_ബുധൻ_വ്യാഴം_വെള്ളി_ശനി'.split('_'),\n weekdaysMin: 'ഞാ_തി_ചൊ_ബു_വ്യാ_വെ_ശ'.split('_'),\n longDateFormat: {\n LT: 'A h:mm -നു',\n LTS: 'A h:mm:ss -നു',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, A h:mm -നു',\n LLLL: 'dddd, D MMMM YYYY, A h:mm -നു',\n },\n calendar: {\n sameDay: '[ഇന്ന്] LT',\n nextDay: '[നാളെ] LT',\n nextWeek: 'dddd, LT',\n lastDay: '[ഇന്നലെ] LT',\n lastWeek: '[കഴിഞ്ഞ] dddd, LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s കഴിഞ്ഞ്',\n past: '%s മുൻപ്',\n s: 'അൽപ നിമിഷങ്ങൾ',\n ss: '%d സെക്കൻഡ്',\n m: 'ഒരു മിനിറ്റ്',\n mm: '%d മിനിറ്റ്',\n h: 'ഒരു മണിക്കൂർ',\n hh: '%d മണിക്കൂർ',\n d: 'ഒരു ദിവസം',\n dd: '%d ദിവസം',\n M: 'ഒരു മാസം',\n MM: '%d മാസം',\n y: 'ഒരു വർഷം',\n yy: '%d വർഷം',\n },\n meridiemParse: /രാത്രി|രാവിലെ|ഉച്ച കഴിഞ്ഞ്|വൈകുന്നേരം|രാത്രി/i,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (\n (meridiem === 'രാത്രി' && hour >= 4) ||\n meridiem === 'ഉച്ച കഴിഞ്ഞ്' ||\n meridiem === 'വൈകുന്നേരം'\n ) {\n return hour + 12;\n } else {\n return hour;\n }\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 4) {\n return 'രാത്രി';\n } else if (hour < 12) {\n return 'രാവിലെ';\n } else if (hour < 17) {\n return 'ഉച്ച കഴിഞ്ഞ്';\n } else if (hour < 20) {\n return 'വൈകുന്നേരം';\n } else {\n return 'രാത്രി';\n }\n },\n });\n\n return ml;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/ml.js?", + ); + + /***/ + }, + + /***/ 9053: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Mongolian [mn]\n//! author : Javkhlantugs Nyamdorj : https://github.com/javkhaanj7\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function translate(number, withoutSuffix, key, isFuture) {\n switch (key) {\n case 's':\n return withoutSuffix ? 'хэдхэн секунд' : 'хэдхэн секундын';\n case 'ss':\n return number + (withoutSuffix ? ' секунд' : ' секундын');\n case 'm':\n case 'mm':\n return number + (withoutSuffix ? ' минут' : ' минутын');\n case 'h':\n case 'hh':\n return number + (withoutSuffix ? ' цаг' : ' цагийн');\n case 'd':\n case 'dd':\n return number + (withoutSuffix ? ' өдөр' : ' өдрийн');\n case 'M':\n case 'MM':\n return number + (withoutSuffix ? ' сар' : ' сарын');\n case 'y':\n case 'yy':\n return number + (withoutSuffix ? ' жил' : ' жилийн');\n default:\n return number;\n }\n }\n\n var mn = moment.defineLocale('mn', {\n months: 'Нэгдүгээр сар_Хоёрдугаар сар_Гуравдугаар сар_Дөрөвдүгээр сар_Тавдугаар сар_Зургадугаар сар_Долдугаар сар_Наймдугаар сар_Есдүгээр сар_Аравдугаар сар_Арван нэгдүгээр сар_Арван хоёрдугаар сар'.split(\n '_'\n ),\n monthsShort:\n '1 сар_2 сар_3 сар_4 сар_5 сар_6 сар_7 сар_8 сар_9 сар_10 сар_11 сар_12 сар'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays: 'Ням_Даваа_Мягмар_Лхагва_Пүрэв_Баасан_Бямба'.split('_'),\n weekdaysShort: 'Ням_Дав_Мяг_Лха_Пүр_Баа_Бям'.split('_'),\n weekdaysMin: 'Ня_Да_Мя_Лх_Пү_Ба_Бя'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'YYYY-MM-DD',\n LL: 'YYYY оны MMMMын D',\n LLL: 'YYYY оны MMMMын D HH:mm',\n LLLL: 'dddd, YYYY оны MMMMын D HH:mm',\n },\n meridiemParse: /ҮӨ|ҮХ/i,\n isPM: function (input) {\n return input === 'ҮХ';\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 12) {\n return 'ҮӨ';\n } else {\n return 'ҮХ';\n }\n },\n calendar: {\n sameDay: '[Өнөөдөр] LT',\n nextDay: '[Маргааш] LT',\n nextWeek: '[Ирэх] dddd LT',\n lastDay: '[Өчигдөр] LT',\n lastWeek: '[Өнгөрсөн] dddd LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s дараа',\n past: '%s өмнө',\n s: translate,\n ss: translate,\n m: translate,\n mm: translate,\n h: translate,\n hh: translate,\n d: translate,\n dd: translate,\n M: translate,\n MM: translate,\n y: translate,\n yy: translate,\n },\n dayOfMonthOrdinalParse: /\\d{1,2} өдөр/,\n ordinal: function (number, period) {\n switch (period) {\n case 'd':\n case 'D':\n case 'DDD':\n return number + ' өдөр';\n default:\n return number;\n }\n },\n });\n\n return mn;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/mn.js?", + ); + + /***/ + }, + + /***/ 6169: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Marathi [mr]\n//! author : Harshad Kale : https://github.com/kalehv\n//! author : Vivek Athalye : https://github.com/vnathalye\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var symbolMap = {\n 1: '१',\n 2: '२',\n 3: '३',\n 4: '४',\n 5: '५',\n 6: '६',\n 7: '७',\n 8: '८',\n 9: '९',\n 0: '०',\n },\n numberMap = {\n '१': '1',\n '२': '2',\n '३': '3',\n '४': '4',\n '५': '5',\n '६': '6',\n '७': '7',\n '८': '8',\n '९': '9',\n '०': '0',\n };\n\n function relativeTimeMr(number, withoutSuffix, string, isFuture) {\n var output = '';\n if (withoutSuffix) {\n switch (string) {\n case 's':\n output = 'काही सेकंद';\n break;\n case 'ss':\n output = '%d सेकंद';\n break;\n case 'm':\n output = 'एक मिनिट';\n break;\n case 'mm':\n output = '%d मिनिटे';\n break;\n case 'h':\n output = 'एक तास';\n break;\n case 'hh':\n output = '%d तास';\n break;\n case 'd':\n output = 'एक दिवस';\n break;\n case 'dd':\n output = '%d दिवस';\n break;\n case 'M':\n output = 'एक महिना';\n break;\n case 'MM':\n output = '%d महिने';\n break;\n case 'y':\n output = 'एक वर्ष';\n break;\n case 'yy':\n output = '%d वर्षे';\n break;\n }\n } else {\n switch (string) {\n case 's':\n output = 'काही सेकंदां';\n break;\n case 'ss':\n output = '%d सेकंदां';\n break;\n case 'm':\n output = 'एका मिनिटा';\n break;\n case 'mm':\n output = '%d मिनिटां';\n break;\n case 'h':\n output = 'एका तासा';\n break;\n case 'hh':\n output = '%d तासां';\n break;\n case 'd':\n output = 'एका दिवसा';\n break;\n case 'dd':\n output = '%d दिवसां';\n break;\n case 'M':\n output = 'एका महिन्या';\n break;\n case 'MM':\n output = '%d महिन्यां';\n break;\n case 'y':\n output = 'एका वर्षा';\n break;\n case 'yy':\n output = '%d वर्षां';\n break;\n }\n }\n return output.replace(/%d/i, number);\n }\n\n var mr = moment.defineLocale('mr', {\n months: 'जानेवारी_फेब्रुवारी_मार्च_एप्रिल_मे_जून_जुलै_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर'.split(\n '_'\n ),\n monthsShort:\n 'जाने._फेब्रु._मार्च._एप्रि._मे._जून._जुलै._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays: 'रविवार_सोमवार_मंगळवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'),\n weekdaysShort: 'रवि_सोम_मंगळ_बुध_गुरू_शुक्र_शनि'.split('_'),\n weekdaysMin: 'र_सो_मं_बु_गु_शु_श'.split('_'),\n longDateFormat: {\n LT: 'A h:mm वाजता',\n LTS: 'A h:mm:ss वाजता',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, A h:mm वाजता',\n LLLL: 'dddd, D MMMM YYYY, A h:mm वाजता',\n },\n calendar: {\n sameDay: '[आज] LT',\n nextDay: '[उद्या] LT',\n nextWeek: 'dddd, LT',\n lastDay: '[काल] LT',\n lastWeek: '[मागील] dddd, LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%sमध्ये',\n past: '%sपूर्वी',\n s: relativeTimeMr,\n ss: relativeTimeMr,\n m: relativeTimeMr,\n mm: relativeTimeMr,\n h: relativeTimeMr,\n hh: relativeTimeMr,\n d: relativeTimeMr,\n dd: relativeTimeMr,\n M: relativeTimeMr,\n MM: relativeTimeMr,\n y: relativeTimeMr,\n yy: relativeTimeMr,\n },\n preparse: function (string) {\n return string.replace(/[१२३४५६७८९०]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function (string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n meridiemParse: /पहाटे|सकाळी|दुपारी|सायंकाळी|रात्री/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'पहाटे' || meridiem === 'सकाळी') {\n return hour;\n } else if (\n meridiem === 'दुपारी' ||\n meridiem === 'सायंकाळी' ||\n meridiem === 'रात्री'\n ) {\n return hour >= 12 ? hour : hour + 12;\n }\n },\n meridiem: function (hour, minute, isLower) {\n if (hour >= 0 && hour < 6) {\n return 'पहाटे';\n } else if (hour < 12) {\n return 'सकाळी';\n } else if (hour < 17) {\n return 'दुपारी';\n } else if (hour < 20) {\n return 'सायंकाळी';\n } else {\n return 'रात्री';\n }\n },\n week: {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n },\n });\n\n return mr;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/mr.js?", + ); + + /***/ + }, + + /***/ 2297: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Malay [ms-my]\n//! note : DEPRECATED, the correct one is [ms]\n//! author : Weldan Jamili : https://github.com/weldan\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var msMy = moment.defineLocale('ms-my', {\n months: 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split(\n '_'\n ),\n monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'),\n weekdays: 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'),\n weekdaysShort: 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'),\n weekdaysMin: 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'),\n longDateFormat: {\n LT: 'HH.mm',\n LTS: 'HH.mm.ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY [pukul] HH.mm',\n LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm',\n },\n meridiemParse: /pagi|tengahari|petang|malam/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'pagi') {\n return hour;\n } else if (meridiem === 'tengahari') {\n return hour >= 11 ? hour : hour + 12;\n } else if (meridiem === 'petang' || meridiem === 'malam') {\n return hour + 12;\n }\n },\n meridiem: function (hours, minutes, isLower) {\n if (hours < 11) {\n return 'pagi';\n } else if (hours < 15) {\n return 'tengahari';\n } else if (hours < 19) {\n return 'petang';\n } else {\n return 'malam';\n }\n },\n calendar: {\n sameDay: '[Hari ini pukul] LT',\n nextDay: '[Esok pukul] LT',\n nextWeek: 'dddd [pukul] LT',\n lastDay: '[Kelmarin pukul] LT',\n lastWeek: 'dddd [lepas pukul] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'dalam %s',\n past: '%s yang lepas',\n s: 'beberapa saat',\n ss: '%d saat',\n m: 'seminit',\n mm: '%d minit',\n h: 'sejam',\n hh: '%d jam',\n d: 'sehari',\n dd: '%d hari',\n M: 'sebulan',\n MM: '%d bulan',\n y: 'setahun',\n yy: '%d tahun',\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return msMy;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/ms-my.js?", + ); + + /***/ + }, + + /***/ 3386: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Malay [ms]\n//! author : Weldan Jamili : https://github.com/weldan\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var ms = moment.defineLocale('ms', {\n months: 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split(\n '_'\n ),\n monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'),\n weekdays: 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'),\n weekdaysShort: 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'),\n weekdaysMin: 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'),\n longDateFormat: {\n LT: 'HH.mm',\n LTS: 'HH.mm.ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY [pukul] HH.mm',\n LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm',\n },\n meridiemParse: /pagi|tengahari|petang|malam/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'pagi') {\n return hour;\n } else if (meridiem === 'tengahari') {\n return hour >= 11 ? hour : hour + 12;\n } else if (meridiem === 'petang' || meridiem === 'malam') {\n return hour + 12;\n }\n },\n meridiem: function (hours, minutes, isLower) {\n if (hours < 11) {\n return 'pagi';\n } else if (hours < 15) {\n return 'tengahari';\n } else if (hours < 19) {\n return 'petang';\n } else {\n return 'malam';\n }\n },\n calendar: {\n sameDay: '[Hari ini pukul] LT',\n nextDay: '[Esok pukul] LT',\n nextWeek: 'dddd [pukul] LT',\n lastDay: '[Kelmarin pukul] LT',\n lastWeek: 'dddd [lepas pukul] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'dalam %s',\n past: '%s yang lepas',\n s: 'beberapa saat',\n ss: '%d saat',\n m: 'seminit',\n mm: '%d minit',\n h: 'sejam',\n hh: '%d jam',\n d: 'sehari',\n dd: '%d hari',\n M: 'sebulan',\n MM: '%d bulan',\n y: 'setahun',\n yy: '%d tahun',\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return ms;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/ms.js?", + ); + + /***/ + }, + + /***/ 7075: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Maltese (Malta) [mt]\n//! author : Alessandro Maruccia : https://github.com/alesma\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var mt = moment.defineLocale('mt', {\n months: 'Jannar_Frar_Marzu_April_Mejju_Ġunju_Lulju_Awwissu_Settembru_Ottubru_Novembru_Diċembru'.split(\n '_'\n ),\n monthsShort: 'Jan_Fra_Mar_Apr_Mej_Ġun_Lul_Aww_Set_Ott_Nov_Diċ'.split('_'),\n weekdays:\n 'Il-Ħadd_It-Tnejn_It-Tlieta_L-Erbgħa_Il-Ħamis_Il-Ġimgħa_Is-Sibt'.split(\n '_'\n ),\n weekdaysShort: 'Ħad_Tne_Tli_Erb_Ħam_Ġim_Sib'.split('_'),\n weekdaysMin: 'Ħa_Tn_Tl_Er_Ħa_Ġi_Si'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Illum fil-]LT',\n nextDay: '[Għada fil-]LT',\n nextWeek: 'dddd [fil-]LT',\n lastDay: '[Il-bieraħ fil-]LT',\n lastWeek: 'dddd [li għadda] [fil-]LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'f’ %s',\n past: '%s ilu',\n s: 'ftit sekondi',\n ss: '%d sekondi',\n m: 'minuta',\n mm: '%d minuti',\n h: 'siegħa',\n hh: '%d siegħat',\n d: 'ġurnata',\n dd: '%d ġranet',\n M: 'xahar',\n MM: '%d xhur',\n y: 'sena',\n yy: '%d sni',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal: '%dº',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return mt;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/mt.js?", + ); + + /***/ + }, + + /***/ 2264: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Burmese [my]\n//! author : Squar team, mysquar.com\n//! author : David Rossellat : https://github.com/gholadr\n//! author : Tin Aung Lin : https://github.com/thanyawzinmin\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var symbolMap = {\n 1: '၁',\n 2: '၂',\n 3: '၃',\n 4: '၄',\n 5: '၅',\n 6: '၆',\n 7: '၇',\n 8: '၈',\n 9: '၉',\n 0: '၀',\n },\n numberMap = {\n '၁': '1',\n '၂': '2',\n '၃': '3',\n '၄': '4',\n '၅': '5',\n '၆': '6',\n '၇': '7',\n '၈': '8',\n '၉': '9',\n '၀': '0',\n };\n\n var my = moment.defineLocale('my', {\n months: 'ဇန်နဝါရီ_ဖေဖော်ဝါရီ_မတ်_ဧပြီ_မေ_ဇွန်_ဇူလိုင်_သြဂုတ်_စက်တင်ဘာ_အောက်တိုဘာ_နိုဝင်ဘာ_ဒီဇင်ဘာ'.split(\n '_'\n ),\n monthsShort: 'ဇန်_ဖေ_မတ်_ပြီ_မေ_ဇွန်_လိုင်_သြ_စက်_အောက်_နို_ဒီ'.split('_'),\n weekdays: 'တနင်္ဂနွေ_တနင်္လာ_အင်္ဂါ_ဗုဒ္ဓဟူး_ကြာသပတေး_သောကြာ_စနေ'.split(\n '_'\n ),\n weekdaysShort: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'),\n weekdaysMin: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'),\n\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[ယနေ.] LT [မှာ]',\n nextDay: '[မနက်ဖြန်] LT [မှာ]',\n nextWeek: 'dddd LT [မှာ]',\n lastDay: '[မနေ.က] LT [မှာ]',\n lastWeek: '[ပြီးခဲ့သော] dddd LT [မှာ]',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'လာမည့် %s မှာ',\n past: 'လွန်ခဲ့သော %s က',\n s: 'စက္ကန်.အနည်းငယ်',\n ss: '%d စက္ကန့်',\n m: 'တစ်မိနစ်',\n mm: '%d မိနစ်',\n h: 'တစ်နာရီ',\n hh: '%d နာရီ',\n d: 'တစ်ရက်',\n dd: '%d ရက်',\n M: 'တစ်လ',\n MM: '%d လ',\n y: 'တစ်နှစ်',\n yy: '%d နှစ်',\n },\n preparse: function (string) {\n return string.replace(/[၁၂၃၄၅၆၇၈၉၀]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function (string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return my;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/my.js?", + ); + + /***/ + }, + + /***/ 2274: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Norwegian Bokmål [nb]\n//! authors : Espen Hovlandsdal : https://github.com/rexxars\n//! Sigurd Gartmann : https://github.com/sigurdga\n//! Stephen Ramthun : https://github.com/stephenramthun\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var nb = moment.defineLocale('nb', {\n months: 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split(\n '_'\n ),\n monthsShort:\n 'jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.'.split('_'),\n monthsParseExact: true,\n weekdays: 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'),\n weekdaysShort: 'sø._ma._ti._on._to._fr._lø.'.split('_'),\n weekdaysMin: 'sø_ma_ti_on_to_fr_lø'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY [kl.] HH:mm',\n LLLL: 'dddd D. MMMM YYYY [kl.] HH:mm',\n },\n calendar: {\n sameDay: '[i dag kl.] LT',\n nextDay: '[i morgen kl.] LT',\n nextWeek: 'dddd [kl.] LT',\n lastDay: '[i går kl.] LT',\n lastWeek: '[forrige] dddd [kl.] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'om %s',\n past: '%s siden',\n s: 'noen sekunder',\n ss: '%d sekunder',\n m: 'ett minutt',\n mm: '%d minutter',\n h: 'én time',\n hh: '%d timer',\n d: 'én dag',\n dd: '%d dager',\n w: 'én uke',\n ww: '%d uker',\n M: 'én måned',\n MM: '%d måneder',\n y: 'ett år',\n yy: '%d år',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return nb;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/nb.js?", + ); + + /***/ + }, + + /***/ 8235: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Nepalese [ne]\n//! author : suvash : https://github.com/suvash\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var symbolMap = {\n 1: '१',\n 2: '२',\n 3: '३',\n 4: '४',\n 5: '५',\n 6: '६',\n 7: '७',\n 8: '८',\n 9: '९',\n 0: '०',\n },\n numberMap = {\n '१': '1',\n '२': '2',\n '३': '3',\n '४': '4',\n '५': '5',\n '६': '6',\n '७': '7',\n '८': '8',\n '९': '9',\n '०': '0',\n };\n\n var ne = moment.defineLocale('ne', {\n months: 'जनवरी_फेब्रुवरी_मार्च_अप्रिल_मई_जुन_जुलाई_अगष्ट_सेप्टेम्बर_अक्टोबर_नोभेम्बर_डिसेम्बर'.split(\n '_'\n ),\n monthsShort:\n 'जन._फेब्रु._मार्च_अप्रि._मई_जुन_जुलाई._अग._सेप्ट._अक्टो._नोभे._डिसे.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays: 'आइतबार_सोमबार_मङ्गलबार_बुधबार_बिहिबार_शुक्रबार_शनिबार'.split(\n '_'\n ),\n weekdaysShort: 'आइत._सोम._मङ्गल._बुध._बिहि._शुक्र._शनि.'.split('_'),\n weekdaysMin: 'आ._सो._मं._बु._बि._शु._श.'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'Aको h:mm बजे',\n LTS: 'Aको h:mm:ss बजे',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, Aको h:mm बजे',\n LLLL: 'dddd, D MMMM YYYY, Aको h:mm बजे',\n },\n preparse: function (string) {\n return string.replace(/[१२३४५६७८९०]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function (string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n meridiemParse: /राति|बिहान|दिउँसो|साँझ/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'राति') {\n return hour < 4 ? hour : hour + 12;\n } else if (meridiem === 'बिहान') {\n return hour;\n } else if (meridiem === 'दिउँसो') {\n return hour >= 10 ? hour : hour + 12;\n } else if (meridiem === 'साँझ') {\n return hour + 12;\n }\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 3) {\n return 'राति';\n } else if (hour < 12) {\n return 'बिहान';\n } else if (hour < 16) {\n return 'दिउँसो';\n } else if (hour < 20) {\n return 'साँझ';\n } else {\n return 'राति';\n }\n },\n calendar: {\n sameDay: '[आज] LT',\n nextDay: '[भोलि] LT',\n nextWeek: '[आउँदो] dddd[,] LT',\n lastDay: '[हिजो] LT',\n lastWeek: '[गएको] dddd[,] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%sमा',\n past: '%s अगाडि',\n s: 'केही क्षण',\n ss: '%d सेकेण्ड',\n m: 'एक मिनेट',\n mm: '%d मिनेट',\n h: 'एक घण्टा',\n hh: '%d घण्टा',\n d: 'एक दिन',\n dd: '%d दिन',\n M: 'एक महिना',\n MM: '%d महिना',\n y: 'एक बर्ष',\n yy: '%d बर्ष',\n },\n week: {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n },\n });\n\n return ne;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/ne.js?", + ); + + /***/ + }, + + /***/ 3784: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Dutch (Belgium) [nl-be]\n//! author : Joris Röling : https://github.com/jorisroling\n//! author : Jacob Middag : https://github.com/middagj\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var monthsShortWithDots =\n 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split('_'),\n monthsShortWithoutDots =\n 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split('_'),\n monthsParse = [\n /^jan/i,\n /^feb/i,\n /^(maart|mrt\\.?)$/i,\n /^apr/i,\n /^mei$/i,\n /^jun[i.]?$/i,\n /^jul[i.]?$/i,\n /^aug/i,\n /^sep/i,\n /^okt/i,\n /^nov/i,\n /^dec/i,\n ],\n monthsRegex =\n /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\\.?|feb\\.?|mrt\\.?|apr\\.?|ju[nl]\\.?|aug\\.?|sep\\.?|okt\\.?|nov\\.?|dec\\.?)/i;\n\n var nlBe = moment.defineLocale('nl-be', {\n months: 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split(\n '_'\n ),\n monthsShort: function (m, format) {\n if (!m) {\n return monthsShortWithDots;\n } else if (/-MMM-/.test(format)) {\n return monthsShortWithoutDots[m.month()];\n } else {\n return monthsShortWithDots[m.month()];\n }\n },\n\n monthsRegex: monthsRegex,\n monthsShortRegex: monthsRegex,\n monthsStrictRegex:\n /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,\n monthsShortStrictRegex:\n /^(jan\\.?|feb\\.?|mrt\\.?|apr\\.?|mei|ju[nl]\\.?|aug\\.?|sep\\.?|okt\\.?|nov\\.?|dec\\.?)/i,\n\n monthsParse: monthsParse,\n longMonthsParse: monthsParse,\n shortMonthsParse: monthsParse,\n\n weekdays:\n 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split('_'),\n weekdaysShort: 'zo._ma._di._wo._do._vr._za.'.split('_'),\n weekdaysMin: 'zo_ma_di_wo_do_vr_za'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[vandaag om] LT',\n nextDay: '[morgen om] LT',\n nextWeek: 'dddd [om] LT',\n lastDay: '[gisteren om] LT',\n lastWeek: '[afgelopen] dddd [om] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'over %s',\n past: '%s geleden',\n s: 'een paar seconden',\n ss: '%d seconden',\n m: 'één minuut',\n mm: '%d minuten',\n h: 'één uur',\n hh: '%d uur',\n d: 'één dag',\n dd: '%d dagen',\n M: 'één maand',\n MM: '%d maanden',\n y: 'één jaar',\n yy: '%d jaar',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(ste|de)/,\n ordinal: function (number) {\n return (\n number +\n (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de')\n );\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return nlBe;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/nl-be.js?", + ); + + /***/ + }, + + /***/ 2572: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Dutch [nl]\n//! author : Joris Röling : https://github.com/jorisroling\n//! author : Jacob Middag : https://github.com/middagj\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var monthsShortWithDots =\n 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split('_'),\n monthsShortWithoutDots =\n 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split('_'),\n monthsParse = [\n /^jan/i,\n /^feb/i,\n /^(maart|mrt\\.?)$/i,\n /^apr/i,\n /^mei$/i,\n /^jun[i.]?$/i,\n /^jul[i.]?$/i,\n /^aug/i,\n /^sep/i,\n /^okt/i,\n /^nov/i,\n /^dec/i,\n ],\n monthsRegex =\n /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\\.?|feb\\.?|mrt\\.?|apr\\.?|ju[nl]\\.?|aug\\.?|sep\\.?|okt\\.?|nov\\.?|dec\\.?)/i;\n\n var nl = moment.defineLocale('nl', {\n months: 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split(\n '_'\n ),\n monthsShort: function (m, format) {\n if (!m) {\n return monthsShortWithDots;\n } else if (/-MMM-/.test(format)) {\n return monthsShortWithoutDots[m.month()];\n } else {\n return monthsShortWithDots[m.month()];\n }\n },\n\n monthsRegex: monthsRegex,\n monthsShortRegex: monthsRegex,\n monthsStrictRegex:\n /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,\n monthsShortStrictRegex:\n /^(jan\\.?|feb\\.?|mrt\\.?|apr\\.?|mei|ju[nl]\\.?|aug\\.?|sep\\.?|okt\\.?|nov\\.?|dec\\.?)/i,\n\n monthsParse: monthsParse,\n longMonthsParse: monthsParse,\n shortMonthsParse: monthsParse,\n\n weekdays:\n 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split('_'),\n weekdaysShort: 'zo._ma._di._wo._do._vr._za.'.split('_'),\n weekdaysMin: 'zo_ma_di_wo_do_vr_za'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD-MM-YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[vandaag om] LT',\n nextDay: '[morgen om] LT',\n nextWeek: 'dddd [om] LT',\n lastDay: '[gisteren om] LT',\n lastWeek: '[afgelopen] dddd [om] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'over %s',\n past: '%s geleden',\n s: 'een paar seconden',\n ss: '%d seconden',\n m: 'één minuut',\n mm: '%d minuten',\n h: 'één uur',\n hh: '%d uur',\n d: 'één dag',\n dd: '%d dagen',\n w: 'één week',\n ww: '%d weken',\n M: 'één maand',\n MM: '%d maanden',\n y: 'één jaar',\n yy: '%d jaar',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(ste|de)/,\n ordinal: function (number) {\n return (\n number +\n (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de')\n );\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return nl;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/nl.js?", + ); + + /***/ + }, + + /***/ 4566: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Nynorsk [nn]\n//! authors : https://github.com/mechuwind\n//! Stephen Ramthun : https://github.com/stephenramthun\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var nn = moment.defineLocale('nn', {\n months: 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split(\n '_'\n ),\n monthsShort:\n 'jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.'.split('_'),\n monthsParseExact: true,\n weekdays: 'sundag_måndag_tysdag_onsdag_torsdag_fredag_laurdag'.split('_'),\n weekdaysShort: 'su._må._ty._on._to._fr._lau.'.split('_'),\n weekdaysMin: 'su_må_ty_on_to_fr_la'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY [kl.] H:mm',\n LLLL: 'dddd D. MMMM YYYY [kl.] HH:mm',\n },\n calendar: {\n sameDay: '[I dag klokka] LT',\n nextDay: '[I morgon klokka] LT',\n nextWeek: 'dddd [klokka] LT',\n lastDay: '[I går klokka] LT',\n lastWeek: '[Føregåande] dddd [klokka] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'om %s',\n past: '%s sidan',\n s: 'nokre sekund',\n ss: '%d sekund',\n m: 'eit minutt',\n mm: '%d minutt',\n h: 'ein time',\n hh: '%d timar',\n d: 'ein dag',\n dd: '%d dagar',\n w: 'ei veke',\n ww: '%d veker',\n M: 'ein månad',\n MM: '%d månader',\n y: 'eit år',\n yy: '%d år',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return nn;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/nn.js?", + ); + + /***/ + }, + + /***/ 9330: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Occitan, lengadocian dialecte [oc-lnc]\n//! author : Quentin PAGÈS : https://github.com/Quenty31\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var ocLnc = moment.defineLocale('oc-lnc', {\n months: {\n standalone:\n 'genièr_febrièr_març_abril_mai_junh_julhet_agost_setembre_octòbre_novembre_decembre'.split(\n '_'\n ),\n format: \"de genièr_de febrièr_de març_d'abril_de mai_de junh_de julhet_d'agost_de setembre_d'octòbre_de novembre_de decembre\".split(\n '_'\n ),\n isFormat: /D[oD]?(\\s)+MMMM/,\n },\n monthsShort:\n 'gen._febr._març_abr._mai_junh_julh._ago._set._oct._nov._dec.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays: 'dimenge_diluns_dimars_dimècres_dijòus_divendres_dissabte'.split(\n '_'\n ),\n weekdaysShort: 'dg._dl._dm._dc._dj._dv._ds.'.split('_'),\n weekdaysMin: 'dg_dl_dm_dc_dj_dv_ds'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM [de] YYYY',\n ll: 'D MMM YYYY',\n LLL: 'D MMMM [de] YYYY [a] H:mm',\n lll: 'D MMM YYYY, H:mm',\n LLLL: 'dddd D MMMM [de] YYYY [a] H:mm',\n llll: 'ddd D MMM YYYY, H:mm',\n },\n calendar: {\n sameDay: '[uèi a] LT',\n nextDay: '[deman a] LT',\n nextWeek: 'dddd [a] LT',\n lastDay: '[ièr a] LT',\n lastWeek: 'dddd [passat a] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: \"d'aquí %s\",\n past: 'fa %s',\n s: 'unas segondas',\n ss: '%d segondas',\n m: 'una minuta',\n mm: '%d minutas',\n h: 'una ora',\n hh: '%d oras',\n d: 'un jorn',\n dd: '%d jorns',\n M: 'un mes',\n MM: '%d meses',\n y: 'un an',\n yy: '%d ans',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(r|n|t|è|a)/,\n ordinal: function (number, period) {\n var output =\n number === 1\n ? 'r'\n : number === 2\n ? 'n'\n : number === 3\n ? 'r'\n : number === 4\n ? 't'\n : 'è';\n if (period === 'w' || period === 'W') {\n output = 'a';\n }\n return number + output;\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4,\n },\n });\n\n return ocLnc;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/oc-lnc.js?", + ); + + /***/ + }, + + /***/ 9849: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Punjabi (India) [pa-in]\n//! author : Harpreet Singh : https://github.com/harpreetkhalsagtbit\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var symbolMap = {\n 1: '੧',\n 2: '੨',\n 3: '੩',\n 4: '੪',\n 5: '੫',\n 6: '੬',\n 7: '੭',\n 8: '੮',\n 9: '੯',\n 0: '੦',\n },\n numberMap = {\n '੧': '1',\n '੨': '2',\n '੩': '3',\n '੪': '4',\n '੫': '5',\n '੬': '6',\n '੭': '7',\n '੮': '8',\n '੯': '9',\n '੦': '0',\n };\n\n var paIn = moment.defineLocale('pa-in', {\n // There are months name as per Nanakshahi Calendar but they are not used as rigidly in modern Punjabi.\n months: 'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split(\n '_'\n ),\n monthsShort:\n 'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split(\n '_'\n ),\n weekdays: 'ਐਤਵਾਰ_ਸੋਮਵਾਰ_ਮੰਗਲਵਾਰ_ਬੁਧਵਾਰ_ਵੀਰਵਾਰ_ਸ਼ੁੱਕਰਵਾਰ_ਸ਼ਨੀਚਰਵਾਰ'.split(\n '_'\n ),\n weekdaysShort: 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'),\n weekdaysMin: 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'),\n longDateFormat: {\n LT: 'A h:mm ਵਜੇ',\n LTS: 'A h:mm:ss ਵਜੇ',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, A h:mm ਵਜੇ',\n LLLL: 'dddd, D MMMM YYYY, A h:mm ਵਜੇ',\n },\n calendar: {\n sameDay: '[ਅਜ] LT',\n nextDay: '[ਕਲ] LT',\n nextWeek: '[ਅਗਲਾ] dddd, LT',\n lastDay: '[ਕਲ] LT',\n lastWeek: '[ਪਿਛਲੇ] dddd, LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s ਵਿੱਚ',\n past: '%s ਪਿਛਲੇ',\n s: 'ਕੁਝ ਸਕਿੰਟ',\n ss: '%d ਸਕਿੰਟ',\n m: 'ਇਕ ਮਿੰਟ',\n mm: '%d ਮਿੰਟ',\n h: 'ਇੱਕ ਘੰਟਾ',\n hh: '%d ਘੰਟੇ',\n d: 'ਇੱਕ ਦਿਨ',\n dd: '%d ਦਿਨ',\n M: 'ਇੱਕ ਮਹੀਨਾ',\n MM: '%d ਮਹੀਨੇ',\n y: 'ਇੱਕ ਸਾਲ',\n yy: '%d ਸਾਲ',\n },\n preparse: function (string) {\n return string.replace(/[੧੨੩੪੫੬੭੮੯੦]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function (string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n // Punjabi notation for meridiems are quite fuzzy in practice. While there exists\n // a rigid notion of a 'Pahar' it is not used as rigidly in modern Punjabi.\n meridiemParse: /ਰਾਤ|ਸਵੇਰ|ਦੁਪਹਿਰ|ਸ਼ਾਮ/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'ਰਾਤ') {\n return hour < 4 ? hour : hour + 12;\n } else if (meridiem === 'ਸਵੇਰ') {\n return hour;\n } else if (meridiem === 'ਦੁਪਹਿਰ') {\n return hour >= 10 ? hour : hour + 12;\n } else if (meridiem === 'ਸ਼ਾਮ') {\n return hour + 12;\n }\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 4) {\n return 'ਰਾਤ';\n } else if (hour < 10) {\n return 'ਸਵੇਰ';\n } else if (hour < 17) {\n return 'ਦੁਪਹਿਰ';\n } else if (hour < 20) {\n return 'ਸ਼ਾਮ';\n } else {\n return 'ਰਾਤ';\n }\n },\n week: {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n },\n });\n\n return paIn;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/pa-in.js?", + ); + + /***/ + }, + + /***/ 4418: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Polish [pl]\n//! author : Rafal Hirsz : https://github.com/evoL\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var monthsNominative =\n 'styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień'.split(\n '_'\n ),\n monthsSubjective =\n 'stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia'.split(\n '_'\n ),\n monthsParse = [\n /^sty/i,\n /^lut/i,\n /^mar/i,\n /^kwi/i,\n /^maj/i,\n /^cze/i,\n /^lip/i,\n /^sie/i,\n /^wrz/i,\n /^paź/i,\n /^lis/i,\n /^gru/i,\n ];\n function plural(n) {\n return n % 10 < 5 && n % 10 > 1 && ~~(n / 10) % 10 !== 1;\n }\n function translate(number, withoutSuffix, key) {\n var result = number + ' ';\n switch (key) {\n case 'ss':\n return result + (plural(number) ? 'sekundy' : 'sekund');\n case 'm':\n return withoutSuffix ? 'minuta' : 'minutę';\n case 'mm':\n return result + (plural(number) ? 'minuty' : 'minut');\n case 'h':\n return withoutSuffix ? 'godzina' : 'godzinę';\n case 'hh':\n return result + (plural(number) ? 'godziny' : 'godzin');\n case 'ww':\n return result + (plural(number) ? 'tygodnie' : 'tygodni');\n case 'MM':\n return result + (plural(number) ? 'miesiące' : 'miesięcy');\n case 'yy':\n return result + (plural(number) ? 'lata' : 'lat');\n }\n }\n\n var pl = moment.defineLocale('pl', {\n months: function (momentToFormat, format) {\n if (!momentToFormat) {\n return monthsNominative;\n } else if (/D MMMM/.test(format)) {\n return monthsSubjective[momentToFormat.month()];\n } else {\n return monthsNominative[momentToFormat.month()];\n }\n },\n monthsShort: 'sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru'.split('_'),\n monthsParse: monthsParse,\n longMonthsParse: monthsParse,\n shortMonthsParse: monthsParse,\n weekdays:\n 'niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota'.split('_'),\n weekdaysShort: 'ndz_pon_wt_śr_czw_pt_sob'.split('_'),\n weekdaysMin: 'Nd_Pn_Wt_Śr_Cz_Pt_So'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Dziś o] LT',\n nextDay: '[Jutro o] LT',\n nextWeek: function () {\n switch (this.day()) {\n case 0:\n return '[W niedzielę o] LT';\n\n case 2:\n return '[We wtorek o] LT';\n\n case 3:\n return '[W środę o] LT';\n\n case 6:\n return '[W sobotę o] LT';\n\n default:\n return '[W] dddd [o] LT';\n }\n },\n lastDay: '[Wczoraj o] LT',\n lastWeek: function () {\n switch (this.day()) {\n case 0:\n return '[W zeszłą niedzielę o] LT';\n case 3:\n return '[W zeszłą środę o] LT';\n case 6:\n return '[W zeszłą sobotę o] LT';\n default:\n return '[W zeszły] dddd [o] LT';\n }\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'za %s',\n past: '%s temu',\n s: 'kilka sekund',\n ss: translate,\n m: translate,\n mm: translate,\n h: translate,\n hh: translate,\n d: '1 dzień',\n dd: '%d dni',\n w: 'tydzień',\n ww: translate,\n M: 'miesiąc',\n MM: translate,\n y: 'rok',\n yy: translate,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return pl;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/pl.js?", + ); + + /***/ + }, + + /***/ 684: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Portuguese (Brazil) [pt-br]\n//! author : Caio Ribeiro Pereira : https://github.com/caio-ribeiro-pereira\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var ptBr = moment.defineLocale('pt-br', {\n months: 'janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro'.split(\n '_'\n ),\n monthsShort: 'jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez'.split('_'),\n weekdays:\n 'domingo_segunda-feira_terça-feira_quarta-feira_quinta-feira_sexta-feira_sábado'.split(\n '_'\n ),\n weekdaysShort: 'dom_seg_ter_qua_qui_sex_sáb'.split('_'),\n weekdaysMin: 'do_2ª_3ª_4ª_5ª_6ª_sá'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D [de] MMMM [de] YYYY',\n LLL: 'D [de] MMMM [de] YYYY [às] HH:mm',\n LLLL: 'dddd, D [de] MMMM [de] YYYY [às] HH:mm',\n },\n calendar: {\n sameDay: '[Hoje às] LT',\n nextDay: '[Amanhã às] LT',\n nextWeek: 'dddd [às] LT',\n lastDay: '[Ontem às] LT',\n lastWeek: function () {\n return this.day() === 0 || this.day() === 6\n ? '[Último] dddd [às] LT' // Saturday + Sunday\n : '[Última] dddd [às] LT'; // Monday - Friday\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'em %s',\n past: 'há %s',\n s: 'poucos segundos',\n ss: '%d segundos',\n m: 'um minuto',\n mm: '%d minutos',\n h: 'uma hora',\n hh: '%d horas',\n d: 'um dia',\n dd: '%d dias',\n M: 'um mês',\n MM: '%d meses',\n y: 'um ano',\n yy: '%d anos',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal: '%dº',\n invalidDate: 'Data inválida',\n });\n\n return ptBr;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/pt-br.js?", + ); + + /***/ + }, + + /***/ 9834: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Portuguese [pt]\n//! author : Jefferson : https://github.com/jalex79\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var pt = moment.defineLocale('pt', {\n months: 'janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro'.split(\n '_'\n ),\n monthsShort: 'jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez'.split('_'),\n weekdays:\n 'Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado'.split(\n '_'\n ),\n weekdaysShort: 'Dom_Seg_Ter_Qua_Qui_Sex_Sáb'.split('_'),\n weekdaysMin: 'Do_2ª_3ª_4ª_5ª_6ª_Sá'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D [de] MMMM [de] YYYY',\n LLL: 'D [de] MMMM [de] YYYY HH:mm',\n LLLL: 'dddd, D [de] MMMM [de] YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Hoje às] LT',\n nextDay: '[Amanhã às] LT',\n nextWeek: 'dddd [às] LT',\n lastDay: '[Ontem às] LT',\n lastWeek: function () {\n return this.day() === 0 || this.day() === 6\n ? '[Último] dddd [às] LT' // Saturday + Sunday\n : '[Última] dddd [às] LT'; // Monday - Friday\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'em %s',\n past: 'há %s',\n s: 'segundos',\n ss: '%d segundos',\n m: 'um minuto',\n mm: '%d minutos',\n h: 'uma hora',\n hh: '%d horas',\n d: 'um dia',\n dd: '%d dias',\n w: 'uma semana',\n ww: '%d semanas',\n M: 'um mês',\n MM: '%d meses',\n y: 'um ano',\n yy: '%d anos',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal: '%dº',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return pt;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/pt.js?", + ); + + /***/ + }, + + /***/ 4457: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Romanian [ro]\n//! author : Vlad Gurdiga : https://github.com/gurdiga\n//! author : Valentin Agachi : https://github.com/avaly\n//! author : Emanuel Cepoi : https://github.com/cepem\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function relativeTimeWithPlural(number, withoutSuffix, key) {\n var format = {\n ss: 'secunde',\n mm: 'minute',\n hh: 'ore',\n dd: 'zile',\n ww: 'săptămâni',\n MM: 'luni',\n yy: 'ani',\n },\n separator = ' ';\n if (number % 100 >= 20 || (number >= 100 && number % 100 === 0)) {\n separator = ' de ';\n }\n return number + separator + format[key];\n }\n\n var ro = moment.defineLocale('ro', {\n months: 'ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie'.split(\n '_'\n ),\n monthsShort:\n 'ian._feb._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays: 'duminică_luni_marți_miercuri_joi_vineri_sâmbătă'.split('_'),\n weekdaysShort: 'Dum_Lun_Mar_Mie_Joi_Vin_Sâm'.split('_'),\n weekdaysMin: 'Du_Lu_Ma_Mi_Jo_Vi_Sâ'.split('_'),\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY H:mm',\n LLLL: 'dddd, D MMMM YYYY H:mm',\n },\n calendar: {\n sameDay: '[azi la] LT',\n nextDay: '[mâine la] LT',\n nextWeek: 'dddd [la] LT',\n lastDay: '[ieri la] LT',\n lastWeek: '[fosta] dddd [la] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'peste %s',\n past: '%s în urmă',\n s: 'câteva secunde',\n ss: relativeTimeWithPlural,\n m: 'un minut',\n mm: relativeTimeWithPlural,\n h: 'o oră',\n hh: relativeTimeWithPlural,\n d: 'o zi',\n dd: relativeTimeWithPlural,\n w: 'o săptămână',\n ww: relativeTimeWithPlural,\n M: 'o lună',\n MM: relativeTimeWithPlural,\n y: 'un an',\n yy: relativeTimeWithPlural,\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return ro;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/ro.js?", + ); + + /***/ + }, + + /***/ 2271: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Russian [ru]\n//! author : Viktorminator : https://github.com/Viktorminator\n//! author : Menelion Elensúle : https://github.com/Oire\n//! author : Коренберг Марк : https://github.com/socketpair\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function plural(word, num) {\n var forms = word.split('_');\n return num % 10 === 1 && num % 100 !== 11\n ? forms[0]\n : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20)\n ? forms[1]\n : forms[2];\n }\n function relativeTimeWithPlural(number, withoutSuffix, key) {\n var format = {\n ss: withoutSuffix ? 'секунда_секунды_секунд' : 'секунду_секунды_секунд',\n mm: withoutSuffix ? 'минута_минуты_минут' : 'минуту_минуты_минут',\n hh: 'час_часа_часов',\n dd: 'день_дня_дней',\n ww: 'неделя_недели_недель',\n MM: 'месяц_месяца_месяцев',\n yy: 'год_года_лет',\n };\n if (key === 'm') {\n return withoutSuffix ? 'минута' : 'минуту';\n } else {\n return number + ' ' + plural(format[key], +number);\n }\n }\n var monthsParse = [\n /^янв/i,\n /^фев/i,\n /^мар/i,\n /^апр/i,\n /^ма[йя]/i,\n /^июн/i,\n /^июл/i,\n /^авг/i,\n /^сен/i,\n /^окт/i,\n /^ноя/i,\n /^дек/i,\n ];\n\n // http://new.gramota.ru/spravka/rules/139-prop : § 103\n // Сокращения месяцев: http://new.gramota.ru/spravka/buro/search-answer?s=242637\n // CLDR data: http://www.unicode.org/cldr/charts/28/summary/ru.html#1753\n var ru = moment.defineLocale('ru', {\n months: {\n format: 'января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря'.split(\n '_'\n ),\n standalone:\n 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split(\n '_'\n ),\n },\n monthsShort: {\n // по CLDR именно \"июл.\" и \"июн.\", но какой смысл менять букву на точку?\n format: 'янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.'.split(\n '_'\n ),\n standalone:\n 'янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.'.split(\n '_'\n ),\n },\n weekdays: {\n standalone:\n 'воскресенье_понедельник_вторник_среда_четверг_пятница_суббота'.split(\n '_'\n ),\n format: 'воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу'.split(\n '_'\n ),\n isFormat: /\\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?] ?dddd/,\n },\n weekdaysShort: 'вс_пн_вт_ср_чт_пт_сб'.split('_'),\n weekdaysMin: 'вс_пн_вт_ср_чт_пт_сб'.split('_'),\n monthsParse: monthsParse,\n longMonthsParse: monthsParse,\n shortMonthsParse: monthsParse,\n\n // полные названия с падежами, по три буквы, для некоторых, по 4 буквы, сокращения с точкой и без точки\n monthsRegex:\n /^(январ[ья]|янв\\.?|феврал[ья]|февр?\\.?|марта?|мар\\.?|апрел[ья]|апр\\.?|ма[йя]|июн[ья]|июн\\.?|июл[ья]|июл\\.?|августа?|авг\\.?|сентябр[ья]|сент?\\.?|октябр[ья]|окт\\.?|ноябр[ья]|нояб?\\.?|декабр[ья]|дек\\.?)/i,\n\n // копия предыдущего\n monthsShortRegex:\n /^(январ[ья]|янв\\.?|феврал[ья]|февр?\\.?|марта?|мар\\.?|апрел[ья]|апр\\.?|ма[йя]|июн[ья]|июн\\.?|июл[ья]|июл\\.?|августа?|авг\\.?|сентябр[ья]|сент?\\.?|октябр[ья]|окт\\.?|ноябр[ья]|нояб?\\.?|декабр[ья]|дек\\.?)/i,\n\n // полные названия с падежами\n monthsStrictRegex:\n /^(январ[яь]|феврал[яь]|марта?|апрел[яь]|ма[яй]|июн[яь]|июл[яь]|августа?|сентябр[яь]|октябр[яь]|ноябр[яь]|декабр[яь])/i,\n\n // Выражение, которое соответствует только сокращённым формам\n monthsShortStrictRegex:\n /^(янв\\.|февр?\\.|мар[т.]|апр\\.|ма[яй]|июн[ья.]|июл[ья.]|авг\\.|сент?\\.|окт\\.|нояб?\\.|дек\\.)/i,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY г.',\n LLL: 'D MMMM YYYY г., H:mm',\n LLLL: 'dddd, D MMMM YYYY г., H:mm',\n },\n calendar: {\n sameDay: '[Сегодня, в] LT',\n nextDay: '[Завтра, в] LT',\n lastDay: '[Вчера, в] LT',\n nextWeek: function (now) {\n if (now.week() !== this.week()) {\n switch (this.day()) {\n case 0:\n return '[В следующее] dddd, [в] LT';\n case 1:\n case 2:\n case 4:\n return '[В следующий] dddd, [в] LT';\n case 3:\n case 5:\n case 6:\n return '[В следующую] dddd, [в] LT';\n }\n } else {\n if (this.day() === 2) {\n return '[Во] dddd, [в] LT';\n } else {\n return '[В] dddd, [в] LT';\n }\n }\n },\n lastWeek: function (now) {\n if (now.week() !== this.week()) {\n switch (this.day()) {\n case 0:\n return '[В прошлое] dddd, [в] LT';\n case 1:\n case 2:\n case 4:\n return '[В прошлый] dddd, [в] LT';\n case 3:\n case 5:\n case 6:\n return '[В прошлую] dddd, [в] LT';\n }\n } else {\n if (this.day() === 2) {\n return '[Во] dddd, [в] LT';\n } else {\n return '[В] dddd, [в] LT';\n }\n }\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'через %s',\n past: '%s назад',\n s: 'несколько секунд',\n ss: relativeTimeWithPlural,\n m: relativeTimeWithPlural,\n mm: relativeTimeWithPlural,\n h: 'час',\n hh: relativeTimeWithPlural,\n d: 'день',\n dd: relativeTimeWithPlural,\n w: 'неделя',\n ww: relativeTimeWithPlural,\n M: 'месяц',\n MM: relativeTimeWithPlural,\n y: 'год',\n yy: relativeTimeWithPlural,\n },\n meridiemParse: /ночи|утра|дня|вечера/i,\n isPM: function (input) {\n return /^(дня|вечера)$/.test(input);\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 4) {\n return 'ночи';\n } else if (hour < 12) {\n return 'утра';\n } else if (hour < 17) {\n return 'дня';\n } else {\n return 'вечера';\n }\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-(й|го|я)/,\n ordinal: function (number, period) {\n switch (period) {\n case 'M':\n case 'd':\n case 'DDD':\n return number + '-й';\n case 'D':\n return number + '-го';\n case 'w':\n case 'W':\n return number + '-я';\n default:\n return number;\n }\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return ru;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/ru.js?", + ); + + /***/ + }, + + /***/ 1221: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Sindhi [sd]\n//! author : Narain Sagar : https://github.com/narainsagar\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var months = [\n 'جنوري',\n 'فيبروري',\n 'مارچ',\n 'اپريل',\n 'مئي',\n 'جون',\n 'جولاءِ',\n 'آگسٽ',\n 'سيپٽمبر',\n 'آڪٽوبر',\n 'نومبر',\n 'ڊسمبر',\n ],\n days = ['آچر', 'سومر', 'اڱارو', 'اربع', 'خميس', 'جمع', 'ڇنڇر'];\n\n var sd = moment.defineLocale('sd', {\n months: months,\n monthsShort: months,\n weekdays: days,\n weekdaysShort: days,\n weekdaysMin: days,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd، D MMMM YYYY HH:mm',\n },\n meridiemParse: /صبح|شام/,\n isPM: function (input) {\n return 'شام' === input;\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 12) {\n return 'صبح';\n }\n return 'شام';\n },\n calendar: {\n sameDay: '[اڄ] LT',\n nextDay: '[سڀاڻي] LT',\n nextWeek: 'dddd [اڳين هفتي تي] LT',\n lastDay: '[ڪالهه] LT',\n lastWeek: '[گزريل هفتي] dddd [تي] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s پوء',\n past: '%s اڳ',\n s: 'چند سيڪنڊ',\n ss: '%d سيڪنڊ',\n m: 'هڪ منٽ',\n mm: '%d منٽ',\n h: 'هڪ ڪلاڪ',\n hh: '%d ڪلاڪ',\n d: 'هڪ ڏينهن',\n dd: '%d ڏينهن',\n M: 'هڪ مهينو',\n MM: '%d مهينا',\n y: 'هڪ سال',\n yy: '%d سال',\n },\n preparse: function (string) {\n return string.replace(/،/g, ',');\n },\n postformat: function (string) {\n return string.replace(/,/g, '،');\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return sd;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/sd.js?", + ); + + /***/ + }, + + /***/ 3478: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Northern Sami [se]\n//! authors : Bård Rolstad Henriksen : https://github.com/karamell\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var se = moment.defineLocale('se', {\n months: 'ođđajagemánnu_guovvamánnu_njukčamánnu_cuoŋománnu_miessemánnu_geassemánnu_suoidnemánnu_borgemánnu_čakčamánnu_golggotmánnu_skábmamánnu_juovlamánnu'.split(\n '_'\n ),\n monthsShort:\n 'ođđj_guov_njuk_cuo_mies_geas_suoi_borg_čakč_golg_skáb_juov'.split('_'),\n weekdays:\n 'sotnabeaivi_vuossárga_maŋŋebárga_gaskavahkku_duorastat_bearjadat_lávvardat'.split(\n '_'\n ),\n weekdaysShort: 'sotn_vuos_maŋ_gask_duor_bear_láv'.split('_'),\n weekdaysMin: 's_v_m_g_d_b_L'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'MMMM D. [b.] YYYY',\n LLL: 'MMMM D. [b.] YYYY [ti.] HH:mm',\n LLLL: 'dddd, MMMM D. [b.] YYYY [ti.] HH:mm',\n },\n calendar: {\n sameDay: '[otne ti] LT',\n nextDay: '[ihttin ti] LT',\n nextWeek: 'dddd [ti] LT',\n lastDay: '[ikte ti] LT',\n lastWeek: '[ovddit] dddd [ti] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s geažes',\n past: 'maŋit %s',\n s: 'moadde sekunddat',\n ss: '%d sekunddat',\n m: 'okta minuhta',\n mm: '%d minuhtat',\n h: 'okta diimmu',\n hh: '%d diimmut',\n d: 'okta beaivi',\n dd: '%d beaivvit',\n M: 'okta mánnu',\n MM: '%d mánut',\n y: 'okta jahki',\n yy: '%d jagit',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return se;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/se.js?", + ); + + /***/ + }, + + /***/ 7538: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Sinhalese [si]\n//! author : Sampath Sitinamaluwa : https://github.com/sampathsris\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n /*jshint -W100*/\n var si = moment.defineLocale('si', {\n months: 'ජනවාරි_පෙබරවාරි_මාර්තු_අප්‍රේල්_මැයි_ජූනි_ජූලි_අගෝස්තු_සැප්තැම්බර්_ඔක්තෝබර්_නොවැම්බර්_දෙසැම්බර්'.split(\n '_'\n ),\n monthsShort: 'ජන_පෙබ_මාර්_අප්_මැයි_ජූනි_ජූලි_අගෝ_සැප්_ඔක්_නොවැ_දෙසැ'.split(\n '_'\n ),\n weekdays:\n 'ඉරිදා_සඳුදා_අඟහරුවාදා_බදාදා_බ්‍රහස්පතින්දා_සිකුරාදා_සෙනසුරාදා'.split(\n '_'\n ),\n weekdaysShort: 'ඉරි_සඳු_අඟ_බදා_බ්‍රහ_සිකු_සෙන'.split('_'),\n weekdaysMin: 'ඉ_ස_අ_බ_බ්‍ර_සි_සෙ'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'a h:mm',\n LTS: 'a h:mm:ss',\n L: 'YYYY/MM/DD',\n LL: 'YYYY MMMM D',\n LLL: 'YYYY MMMM D, a h:mm',\n LLLL: 'YYYY MMMM D [වැනි] dddd, a h:mm:ss',\n },\n calendar: {\n sameDay: '[අද] LT[ට]',\n nextDay: '[හෙට] LT[ට]',\n nextWeek: 'dddd LT[ට]',\n lastDay: '[ඊයේ] LT[ට]',\n lastWeek: '[පසුගිය] dddd LT[ට]',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%sකින්',\n past: '%sකට පෙර',\n s: 'තත්පර කිහිපය',\n ss: 'තත්පර %d',\n m: 'මිනිත්තුව',\n mm: 'මිනිත්තු %d',\n h: 'පැය',\n hh: 'පැය %d',\n d: 'දිනය',\n dd: 'දින %d',\n M: 'මාසය',\n MM: 'මාස %d',\n y: 'වසර',\n yy: 'වසර %d',\n },\n dayOfMonthOrdinalParse: /\\d{1,2} වැනි/,\n ordinal: function (number) {\n return number + ' වැනි';\n },\n meridiemParse: /පෙර වරු|පස් වරු|පෙ.ව|ප.ව./,\n isPM: function (input) {\n return input === 'ප.ව.' || input === 'පස් වරු';\n },\n meridiem: function (hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'ප.ව.' : 'පස් වරු';\n } else {\n return isLower ? 'පෙ.ව.' : 'පෙර වරු';\n }\n },\n });\n\n return si;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/si.js?", + ); + + /***/ + }, + + /***/ 5784: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Slovak [sk]\n//! author : Martin Minka : https://github.com/k2s\n//! based on work of petrbela : https://github.com/petrbela\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var months =\n 'január_február_marec_apríl_máj_jún_júl_august_september_október_november_december'.split(\n '_'\n ),\n monthsShort = 'jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec'.split('_');\n function plural(n) {\n return n > 1 && n < 5;\n }\n function translate(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's': // a few seconds / in a few seconds / a few seconds ago\n return withoutSuffix || isFuture ? 'pár sekúnd' : 'pár sekundami';\n case 'ss': // 9 seconds / in 9 seconds / 9 seconds ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'sekundy' : 'sekúnd');\n } else {\n return result + 'sekundami';\n }\n case 'm': // a minute / in a minute / a minute ago\n return withoutSuffix ? 'minúta' : isFuture ? 'minútu' : 'minútou';\n case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'minúty' : 'minút');\n } else {\n return result + 'minútami';\n }\n case 'h': // an hour / in an hour / an hour ago\n return withoutSuffix ? 'hodina' : isFuture ? 'hodinu' : 'hodinou';\n case 'hh': // 9 hours / in 9 hours / 9 hours ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'hodiny' : 'hodín');\n } else {\n return result + 'hodinami';\n }\n case 'd': // a day / in a day / a day ago\n return withoutSuffix || isFuture ? 'deň' : 'dňom';\n case 'dd': // 9 days / in 9 days / 9 days ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'dni' : 'dní');\n } else {\n return result + 'dňami';\n }\n case 'M': // a month / in a month / a month ago\n return withoutSuffix || isFuture ? 'mesiac' : 'mesiacom';\n case 'MM': // 9 months / in 9 months / 9 months ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'mesiace' : 'mesiacov');\n } else {\n return result + 'mesiacmi';\n }\n case 'y': // a year / in a year / a year ago\n return withoutSuffix || isFuture ? 'rok' : 'rokom';\n case 'yy': // 9 years / in 9 years / 9 years ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'roky' : 'rokov');\n } else {\n return result + 'rokmi';\n }\n }\n }\n\n var sk = moment.defineLocale('sk', {\n months: months,\n monthsShort: monthsShort,\n weekdays: 'nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota'.split('_'),\n weekdaysShort: 'ne_po_ut_st_št_pi_so'.split('_'),\n weekdaysMin: 'ne_po_ut_st_št_pi_so'.split('_'),\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY H:mm',\n LLLL: 'dddd D. MMMM YYYY H:mm',\n },\n calendar: {\n sameDay: '[dnes o] LT',\n nextDay: '[zajtra o] LT',\n nextWeek: function () {\n switch (this.day()) {\n case 0:\n return '[v nedeľu o] LT';\n case 1:\n case 2:\n return '[v] dddd [o] LT';\n case 3:\n return '[v stredu o] LT';\n case 4:\n return '[vo štvrtok o] LT';\n case 5:\n return '[v piatok o] LT';\n case 6:\n return '[v sobotu o] LT';\n }\n },\n lastDay: '[včera o] LT',\n lastWeek: function () {\n switch (this.day()) {\n case 0:\n return '[minulú nedeľu o] LT';\n case 1:\n case 2:\n return '[minulý] dddd [o] LT';\n case 3:\n return '[minulú stredu o] LT';\n case 4:\n case 5:\n return '[minulý] dddd [o] LT';\n case 6:\n return '[minulú sobotu o] LT';\n }\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'za %s',\n past: 'pred %s',\n s: translate,\n ss: translate,\n m: translate,\n mm: translate,\n h: translate,\n hh: translate,\n d: translate,\n dd: translate,\n M: translate,\n MM: translate,\n y: translate,\n yy: translate,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return sk;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/sk.js?", + ); + + /***/ + }, + + /***/ 6637: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Slovenian [sl]\n//! author : Robert Sedovšek : https://github.com/sedovsek\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }\n\n var sl = moment.defineLocale('sl', {\n months: 'januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december'.split(\n '_'\n ),\n monthsShort:\n 'jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays: 'nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota'.split('_'),\n weekdaysShort: 'ned._pon._tor._sre._čet._pet._sob.'.split('_'),\n weekdaysMin: 'ne_po_to_sr_če_pe_so'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD. MM. YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY H:mm',\n LLLL: 'dddd, D. MMMM YYYY H:mm',\n },\n calendar: {\n sameDay: '[danes ob] LT',\n nextDay: '[jutri ob] LT',\n\n nextWeek: function () {\n switch (this.day()) {\n case 0:\n return '[v] [nedeljo] [ob] LT';\n case 3:\n return '[v] [sredo] [ob] LT';\n case 6:\n return '[v] [soboto] [ob] LT';\n case 1:\n case 2:\n case 4:\n case 5:\n return '[v] dddd [ob] LT';\n }\n },\n lastDay: '[včeraj ob] LT',\n lastWeek: function () {\n switch (this.day()) {\n case 0:\n return '[prejšnjo] [nedeljo] [ob] LT';\n case 3:\n return '[prejšnjo] [sredo] [ob] LT';\n case 6:\n return '[prejšnjo] [soboto] [ob] LT';\n case 1:\n case 2:\n case 4:\n case 5:\n return '[prejšnji] dddd [ob] LT';\n }\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'čez %s',\n past: 'pred %s',\n s: processRelativeTime,\n ss: processRelativeTime,\n m: processRelativeTime,\n mm: processRelativeTime,\n h: processRelativeTime,\n hh: processRelativeTime,\n d: processRelativeTime,\n dd: processRelativeTime,\n M: processRelativeTime,\n MM: processRelativeTime,\n y: processRelativeTime,\n yy: processRelativeTime,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return sl;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/sl.js?", + ); + + /***/ + }, + + /***/ 6794: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Albanian [sq]\n//! author : Flakërim Ismani : https://github.com/flakerimi\n//! author : Menelion Elensúle : https://github.com/Oire\n//! author : Oerd Cukalla : https://github.com/oerd\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var sq = moment.defineLocale('sq', {\n months: 'Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_Nëntor_Dhjetor'.split(\n '_'\n ),\n monthsShort: 'Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_Nën_Dhj'.split('_'),\n weekdays: 'E Diel_E Hënë_E Martë_E Mërkurë_E Enjte_E Premte_E Shtunë'.split(\n '_'\n ),\n weekdaysShort: 'Die_Hën_Mar_Mër_Enj_Pre_Sht'.split('_'),\n weekdaysMin: 'D_H_Ma_Më_E_P_Sh'.split('_'),\n weekdaysParseExact: true,\n meridiemParse: /PD|MD/,\n isPM: function (input) {\n return input.charAt(0) === 'M';\n },\n meridiem: function (hours, minutes, isLower) {\n return hours < 12 ? 'PD' : 'MD';\n },\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Sot në] LT',\n nextDay: '[Nesër në] LT',\n nextWeek: 'dddd [në] LT',\n lastDay: '[Dje në] LT',\n lastWeek: 'dddd [e kaluar në] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'në %s',\n past: '%s më parë',\n s: 'disa sekonda',\n ss: '%d sekonda',\n m: 'një minutë',\n mm: '%d minuta',\n h: 'një orë',\n hh: '%d orë',\n d: 'një ditë',\n dd: '%d ditë',\n M: 'një muaj',\n MM: '%d muaj',\n y: 'një vit',\n yy: '%d vite',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return sq;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/sq.js?", + ); + + /***/ + }, + + /***/ 3322: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Serbian Cyrillic [sr-cyrl]\n//! author : Milan Janačković<milanjanackovic@gmail.com> : https://github.com/milan-j\n//! author : Stefan Crnjaković <stefan@hotmail.rs> : https://github.com/crnjakovic\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var translator = {\n words: {\n //Different grammatical cases\n ss: ['секунда', 'секунде', 'секунди'],\n m: ['један минут', 'једног минута'],\n mm: ['минут', 'минута', 'минута'],\n h: ['један сат', 'једног сата'],\n hh: ['сат', 'сата', 'сати'],\n d: ['један дан', 'једног дана'],\n dd: ['дан', 'дана', 'дана'],\n M: ['један месец', 'једног месеца'],\n MM: ['месец', 'месеца', 'месеци'],\n y: ['једну годину', 'једне године'],\n yy: ['годину', 'године', 'година'],\n },\n correctGrammaticalCase: function (number, wordKey) {\n if (\n number % 10 >= 1 &&\n number % 10 <= 4 &&\n (number % 100 < 10 || number % 100 >= 20)\n ) {\n return number % 10 === 1 ? wordKey[0] : wordKey[1];\n }\n return wordKey[2];\n },\n translate: function (number, withoutSuffix, key, isFuture) {\n var wordKey = translator.words[key],\n word;\n\n if (key.length === 1) {\n // Nominativ\n if (key === 'y' && withoutSuffix) return 'једна година';\n return isFuture || withoutSuffix ? wordKey[0] : wordKey[1];\n }\n\n word = translator.correctGrammaticalCase(number, wordKey);\n // Nominativ\n if (key === 'yy' && withoutSuffix && word === 'годину') {\n return number + ' година';\n }\n\n return number + ' ' + word;\n },\n };\n\n var srCyrl = moment.defineLocale('sr-cyrl', {\n months: 'јануар_фебруар_март_април_мај_јун_јул_август_септембар_октобар_новембар_децембар'.split(\n '_'\n ),\n monthsShort:\n 'јан._феб._мар._апр._мај_јун_јул_авг._сеп._окт._нов._дец.'.split('_'),\n monthsParseExact: true,\n weekdays: 'недеља_понедељак_уторак_среда_четвртак_петак_субота'.split('_'),\n weekdaysShort: 'нед._пон._уто._сре._чет._пет._суб.'.split('_'),\n weekdaysMin: 'не_по_ут_ср_че_пе_су'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'D. M. YYYY.',\n LL: 'D. MMMM YYYY.',\n LLL: 'D. MMMM YYYY. H:mm',\n LLLL: 'dddd, D. MMMM YYYY. H:mm',\n },\n calendar: {\n sameDay: '[данас у] LT',\n nextDay: '[сутра у] LT',\n nextWeek: function () {\n switch (this.day()) {\n case 0:\n return '[у] [недељу] [у] LT';\n case 3:\n return '[у] [среду] [у] LT';\n case 6:\n return '[у] [суботу] [у] LT';\n case 1:\n case 2:\n case 4:\n case 5:\n return '[у] dddd [у] LT';\n }\n },\n lastDay: '[јуче у] LT',\n lastWeek: function () {\n var lastWeekDays = [\n '[прошле] [недеље] [у] LT',\n '[прошлог] [понедељка] [у] LT',\n '[прошлог] [уторка] [у] LT',\n '[прошле] [среде] [у] LT',\n '[прошлог] [четвртка] [у] LT',\n '[прошлог] [петка] [у] LT',\n '[прошле] [суботе] [у] LT',\n ];\n return lastWeekDays[this.day()];\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'за %s',\n past: 'пре %s',\n s: 'неколико секунди',\n ss: translator.translate,\n m: translator.translate,\n mm: translator.translate,\n h: translator.translate,\n hh: translator.translate,\n d: translator.translate,\n dd: translator.translate,\n M: translator.translate,\n MM: translator.translate,\n y: translator.translate,\n yy: translator.translate,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 1st is the first week of the year.\n },\n });\n\n return srCyrl;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/sr-cyrl.js?", + ); + + /***/ + }, + + /***/ 5719: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Serbian [sr]\n//! author : Milan Janačković<milanjanackovic@gmail.com> : https://github.com/milan-j\n//! author : Stefan Crnjaković <stefan@hotmail.rs> : https://github.com/crnjakovic\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var translator = {\n words: {\n //Different grammatical cases\n ss: ['sekunda', 'sekunde', 'sekundi'],\n m: ['jedan minut', 'jednog minuta'],\n mm: ['minut', 'minuta', 'minuta'],\n h: ['jedan sat', 'jednog sata'],\n hh: ['sat', 'sata', 'sati'],\n d: ['jedan dan', 'jednog dana'],\n dd: ['dan', 'dana', 'dana'],\n M: ['jedan mesec', 'jednog meseca'],\n MM: ['mesec', 'meseca', 'meseci'],\n y: ['jednu godinu', 'jedne godine'],\n yy: ['godinu', 'godine', 'godina'],\n },\n correctGrammaticalCase: function (number, wordKey) {\n if (\n number % 10 >= 1 &&\n number % 10 <= 4 &&\n (number % 100 < 10 || number % 100 >= 20)\n ) {\n return number % 10 === 1 ? wordKey[0] : wordKey[1];\n }\n return wordKey[2];\n },\n translate: function (number, withoutSuffix, key, isFuture) {\n var wordKey = translator.words[key],\n word;\n\n if (key.length === 1) {\n // Nominativ\n if (key === 'y' && withoutSuffix) return 'jedna godina';\n return isFuture || withoutSuffix ? wordKey[0] : wordKey[1];\n }\n\n word = translator.correctGrammaticalCase(number, wordKey);\n // Nominativ\n if (key === 'yy' && withoutSuffix && word === 'godinu') {\n return number + ' godina';\n }\n\n return number + ' ' + word;\n },\n };\n\n var sr = moment.defineLocale('sr', {\n months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split(\n '_'\n ),\n monthsShort:\n 'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split('_'),\n monthsParseExact: true,\n weekdays: 'nedelja_ponedeljak_utorak_sreda_četvrtak_petak_subota'.split(\n '_'\n ),\n weekdaysShort: 'ned._pon._uto._sre._čet._pet._sub.'.split('_'),\n weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'D. M. YYYY.',\n LL: 'D. MMMM YYYY.',\n LLL: 'D. MMMM YYYY. H:mm',\n LLLL: 'dddd, D. MMMM YYYY. H:mm',\n },\n calendar: {\n sameDay: '[danas u] LT',\n nextDay: '[sutra u] LT',\n nextWeek: function () {\n switch (this.day()) {\n case 0:\n return '[u] [nedelju] [u] LT';\n case 3:\n return '[u] [sredu] [u] LT';\n case 6:\n return '[u] [subotu] [u] LT';\n case 1:\n case 2:\n case 4:\n case 5:\n return '[u] dddd [u] LT';\n }\n },\n lastDay: '[juče u] LT',\n lastWeek: function () {\n var lastWeekDays = [\n '[prošle] [nedelje] [u] LT',\n '[prošlog] [ponedeljka] [u] LT',\n '[prošlog] [utorka] [u] LT',\n '[prošle] [srede] [u] LT',\n '[prošlog] [četvrtka] [u] LT',\n '[prošlog] [petka] [u] LT',\n '[prošle] [subote] [u] LT',\n ];\n return lastWeekDays[this.day()];\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'za %s',\n past: 'pre %s',\n s: 'nekoliko sekundi',\n ss: translator.translate,\n m: translator.translate,\n mm: translator.translate,\n h: translator.translate,\n hh: translator.translate,\n d: translator.translate,\n dd: translator.translate,\n M: translator.translate,\n MM: translator.translate,\n y: translator.translate,\n yy: translator.translate,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return sr;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/sr.js?", + ); + + /***/ + }, + + /***/ 6000: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : siSwati [ss]\n//! author : Nicolai Davies<mail@nicolai.io> : https://github.com/nicolaidavies\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var ss = moment.defineLocale('ss', {\n months: \"Bhimbidvwane_Indlovana_Indlov'lenkhulu_Mabasa_Inkhwekhweti_Inhlaba_Kholwane_Ingci_Inyoni_Imphala_Lweti_Ingongoni\".split(\n '_'\n ),\n monthsShort: 'Bhi_Ina_Inu_Mab_Ink_Inh_Kho_Igc_Iny_Imp_Lwe_Igo'.split('_'),\n weekdays:\n 'Lisontfo_Umsombuluko_Lesibili_Lesitsatfu_Lesine_Lesihlanu_Umgcibelo'.split(\n '_'\n ),\n weekdaysShort: 'Lis_Umb_Lsb_Les_Lsi_Lsh_Umg'.split('_'),\n weekdaysMin: 'Li_Us_Lb_Lt_Ls_Lh_Ug'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'h:mm A',\n LTS: 'h:mm:ss A',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY h:mm A',\n LLLL: 'dddd, D MMMM YYYY h:mm A',\n },\n calendar: {\n sameDay: '[Namuhla nga] LT',\n nextDay: '[Kusasa nga] LT',\n nextWeek: 'dddd [nga] LT',\n lastDay: '[Itolo nga] LT',\n lastWeek: 'dddd [leliphelile] [nga] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'nga %s',\n past: 'wenteka nga %s',\n s: 'emizuzwana lomcane',\n ss: '%d mzuzwana',\n m: 'umzuzu',\n mm: '%d emizuzu',\n h: 'lihora',\n hh: '%d emahora',\n d: 'lilanga',\n dd: '%d emalanga',\n M: 'inyanga',\n MM: '%d tinyanga',\n y: 'umnyaka',\n yy: '%d iminyaka',\n },\n meridiemParse: /ekuseni|emini|entsambama|ebusuku/,\n meridiem: function (hours, minutes, isLower) {\n if (hours < 11) {\n return 'ekuseni';\n } else if (hours < 15) {\n return 'emini';\n } else if (hours < 19) {\n return 'entsambama';\n } else {\n return 'ebusuku';\n }\n },\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'ekuseni') {\n return hour;\n } else if (meridiem === 'emini') {\n return hour >= 11 ? hour : hour + 12;\n } else if (meridiem === 'entsambama' || meridiem === 'ebusuku') {\n if (hour === 0) {\n return 0;\n }\n return hour + 12;\n }\n },\n dayOfMonthOrdinalParse: /\\d{1,2}/,\n ordinal: '%d',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return ss;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/ss.js?", + ); + + /***/ + }, + + /***/ 1011: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Swedish [sv]\n//! author : Jens Alm : https://github.com/ulmus\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var sv = moment.defineLocale('sv', {\n months: 'januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december'.split(\n '_'\n ),\n monthsShort: 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'),\n weekdays: 'söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag'.split('_'),\n weekdaysShort: 'sön_mån_tis_ons_tor_fre_lör'.split('_'),\n weekdaysMin: 'sö_må_ti_on_to_fr_lö'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'YYYY-MM-DD',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY [kl.] HH:mm',\n LLLL: 'dddd D MMMM YYYY [kl.] HH:mm',\n lll: 'D MMM YYYY HH:mm',\n llll: 'ddd D MMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Idag] LT',\n nextDay: '[Imorgon] LT',\n lastDay: '[Igår] LT',\n nextWeek: '[På] dddd LT',\n lastWeek: '[I] dddd[s] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'om %s',\n past: 'för %s sedan',\n s: 'några sekunder',\n ss: '%d sekunder',\n m: 'en minut',\n mm: '%d minuter',\n h: 'en timme',\n hh: '%d timmar',\n d: 'en dag',\n dd: '%d dagar',\n M: 'en månad',\n MM: '%d månader',\n y: 'ett år',\n yy: '%d år',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(\\:e|\\:a)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n ~~((number % 100) / 10) === 1\n ? ':e'\n : b === 1\n ? ':a'\n : b === 2\n ? ':a'\n : b === 3\n ? ':e'\n : ':e';\n return number + output;\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return sv;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/sv.js?", + ); + + /***/ + }, + + /***/ 748: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Swahili [sw]\n//! author : Fahad Kassim : https://github.com/fadsel\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var sw = moment.defineLocale('sw', {\n months: 'Januari_Februari_Machi_Aprili_Mei_Juni_Julai_Agosti_Septemba_Oktoba_Novemba_Desemba'.split(\n '_'\n ),\n monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ago_Sep_Okt_Nov_Des'.split('_'),\n weekdays:\n 'Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijumaa_Jumamosi'.split(\n '_'\n ),\n weekdaysShort: 'Jpl_Jtat_Jnne_Jtan_Alh_Ijm_Jmos'.split('_'),\n weekdaysMin: 'J2_J3_J4_J5_Al_Ij_J1'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'hh:mm A',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[leo saa] LT',\n nextDay: '[kesho saa] LT',\n nextWeek: '[wiki ijayo] dddd [saat] LT',\n lastDay: '[jana] LT',\n lastWeek: '[wiki iliyopita] dddd [saat] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s baadaye',\n past: 'tokea %s',\n s: 'hivi punde',\n ss: 'sekunde %d',\n m: 'dakika moja',\n mm: 'dakika %d',\n h: 'saa limoja',\n hh: 'masaa %d',\n d: 'siku moja',\n dd: 'siku %d',\n M: 'mwezi mmoja',\n MM: 'miezi %d',\n y: 'mwaka mmoja',\n yy: 'miaka %d',\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return sw;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/sw.js?", + ); + + /***/ + }, + + /***/ 1025: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Tamil [ta]\n//! author : Arjunkumar Krishnamoorthy : https://github.com/tk120404\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var symbolMap = {\n 1: '௧',\n 2: '௨',\n 3: '௩',\n 4: '௪',\n 5: '௫',\n 6: '௬',\n 7: '௭',\n 8: '௮',\n 9: '௯',\n 0: '௦',\n },\n numberMap = {\n '௧': '1',\n '௨': '2',\n '௩': '3',\n '௪': '4',\n '௫': '5',\n '௬': '6',\n '௭': '7',\n '௮': '8',\n '௯': '9',\n '௦': '0',\n };\n\n var ta = moment.defineLocale('ta', {\n months: 'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split(\n '_'\n ),\n monthsShort:\n 'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split(\n '_'\n ),\n weekdays:\n 'ஞாயிற்றுக்கிழமை_திங்கட்கிழமை_செவ்வாய்கிழமை_புதன்கிழமை_வியாழக்கிழமை_வெள்ளிக்கிழமை_சனிக்கிழமை'.split(\n '_'\n ),\n weekdaysShort: 'ஞாயிறு_திங்கள்_செவ்வாய்_புதன்_வியாழன்_வெள்ளி_சனி'.split(\n '_'\n ),\n weekdaysMin: 'ஞா_தி_செ_பு_வி_வெ_ச'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, HH:mm',\n LLLL: 'dddd, D MMMM YYYY, HH:mm',\n },\n calendar: {\n sameDay: '[இன்று] LT',\n nextDay: '[நாளை] LT',\n nextWeek: 'dddd, LT',\n lastDay: '[நேற்று] LT',\n lastWeek: '[கடந்த வாரம்] dddd, LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s இல்',\n past: '%s முன்',\n s: 'ஒரு சில விநாடிகள்',\n ss: '%d விநாடிகள்',\n m: 'ஒரு நிமிடம்',\n mm: '%d நிமிடங்கள்',\n h: 'ஒரு மணி நேரம்',\n hh: '%d மணி நேரம்',\n d: 'ஒரு நாள்',\n dd: '%d நாட்கள்',\n M: 'ஒரு மாதம்',\n MM: '%d மாதங்கள்',\n y: 'ஒரு வருடம்',\n yy: '%d ஆண்டுகள்',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}வது/,\n ordinal: function (number) {\n return number + 'வது';\n },\n preparse: function (string) {\n return string.replace(/[௧௨௩௪௫௬௭௮௯௦]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function (string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n // refer http://ta.wikipedia.org/s/1er1\n meridiemParse: /யாமம்|வைகறை|காலை|நண்பகல்|எற்பாடு|மாலை/,\n meridiem: function (hour, minute, isLower) {\n if (hour < 2) {\n return ' யாமம்';\n } else if (hour < 6) {\n return ' வைகறை'; // வைகறை\n } else if (hour < 10) {\n return ' காலை'; // காலை\n } else if (hour < 14) {\n return ' நண்பகல்'; // நண்பகல்\n } else if (hour < 18) {\n return ' எற்பாடு'; // எற்பாடு\n } else if (hour < 22) {\n return ' மாலை'; // மாலை\n } else {\n return ' யாமம்';\n }\n },\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'யாமம்') {\n return hour < 2 ? hour : hour + 12;\n } else if (meridiem === 'வைகறை' || meridiem === 'காலை') {\n return hour;\n } else if (meridiem === 'நண்பகல்') {\n return hour >= 10 ? hour : hour + 12;\n } else {\n return hour + 12;\n }\n },\n week: {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n },\n });\n\n return ta;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/ta.js?", + ); + + /***/ + }, + + /***/ 1885: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Telugu [te]\n//! author : Krishna Chaitanya Thota : https://github.com/kcthota\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var te = moment.defineLocale('te', {\n months: 'జనవరి_ఫిబ్రవరి_మార్చి_ఏప్రిల్_మే_జూన్_జులై_ఆగస్టు_సెప్టెంబర్_అక్టోబర్_నవంబర్_డిసెంబర్'.split(\n '_'\n ),\n monthsShort:\n 'జన._ఫిబ్ర._మార్చి_ఏప్రి._మే_జూన్_జులై_ఆగ._సెప్._అక్టో._నవ._డిసె.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays:\n 'ఆదివారం_సోమవారం_మంగళవారం_బుధవారం_గురువారం_శుక్రవారం_శనివారం'.split(\n '_'\n ),\n weekdaysShort: 'ఆది_సోమ_మంగళ_బుధ_గురు_శుక్ర_శని'.split('_'),\n weekdaysMin: 'ఆ_సో_మం_బు_గు_శు_శ'.split('_'),\n longDateFormat: {\n LT: 'A h:mm',\n LTS: 'A h:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, A h:mm',\n LLLL: 'dddd, D MMMM YYYY, A h:mm',\n },\n calendar: {\n sameDay: '[నేడు] LT',\n nextDay: '[రేపు] LT',\n nextWeek: 'dddd, LT',\n lastDay: '[నిన్న] LT',\n lastWeek: '[గత] dddd, LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s లో',\n past: '%s క్రితం',\n s: 'కొన్ని క్షణాలు',\n ss: '%d సెకన్లు',\n m: 'ఒక నిమిషం',\n mm: '%d నిమిషాలు',\n h: 'ఒక గంట',\n hh: '%d గంటలు',\n d: 'ఒక రోజు',\n dd: '%d రోజులు',\n M: 'ఒక నెల',\n MM: '%d నెలలు',\n y: 'ఒక సంవత్సరం',\n yy: '%d సంవత్సరాలు',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}వ/,\n ordinal: '%dవ',\n meridiemParse: /రాత్రి|ఉదయం|మధ్యాహ్నం|సాయంత్రం/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'రాత్రి') {\n return hour < 4 ? hour : hour + 12;\n } else if (meridiem === 'ఉదయం') {\n return hour;\n } else if (meridiem === 'మధ్యాహ్నం') {\n return hour >= 10 ? hour : hour + 12;\n } else if (meridiem === 'సాయంత్రం') {\n return hour + 12;\n }\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 4) {\n return 'రాత్రి';\n } else if (hour < 10) {\n return 'ఉదయం';\n } else if (hour < 17) {\n return 'మధ్యాహ్నం';\n } else if (hour < 20) {\n return 'సాయంత్రం';\n } else {\n return 'రాత్రి';\n }\n },\n week: {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n },\n });\n\n return te;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/te.js?", + ); + + /***/ + }, + + /***/ 8861: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Tetun Dili (East Timor) [tet]\n//! author : Joshua Brooks : https://github.com/joshbrooks\n//! author : Onorio De J. Afonso : https://github.com/marobo\n//! author : Sonia Simoes : https://github.com/soniasimoes\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var tet = moment.defineLocale('tet', {\n months: 'Janeiru_Fevereiru_Marsu_Abril_Maiu_Juñu_Jullu_Agustu_Setembru_Outubru_Novembru_Dezembru'.split(\n '_'\n ),\n monthsShort: 'Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez'.split('_'),\n weekdays: 'Domingu_Segunda_Tersa_Kuarta_Kinta_Sesta_Sabadu'.split('_'),\n weekdaysShort: 'Dom_Seg_Ters_Kua_Kint_Sest_Sab'.split('_'),\n weekdaysMin: 'Do_Seg_Te_Ku_Ki_Ses_Sa'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Ohin iha] LT',\n nextDay: '[Aban iha] LT',\n nextWeek: 'dddd [iha] LT',\n lastDay: '[Horiseik iha] LT',\n lastWeek: 'dddd [semana kotuk] [iha] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'iha %s',\n past: '%s liuba',\n s: 'segundu balun',\n ss: 'segundu %d',\n m: 'minutu ida',\n mm: 'minutu %d',\n h: 'oras ida',\n hh: 'oras %d',\n d: 'loron ida',\n dd: 'loron %d',\n M: 'fulan ida',\n MM: 'fulan %d',\n y: 'tinan ida',\n yy: 'tinan %d',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n ~~((number % 100) / 10) === 1\n ? 'th'\n : b === 1\n ? 'st'\n : b === 2\n ? 'nd'\n : b === 3\n ? 'rd'\n : 'th';\n return number + output;\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return tet;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/tet.js?", + ); + + /***/ + }, + + /***/ 6571: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Tajik [tg]\n//! author : Orif N. Jr. : https://github.com/orif-jr\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var suffixes = {\n 0: '-ум',\n 1: '-ум',\n 2: '-юм',\n 3: '-юм',\n 4: '-ум',\n 5: '-ум',\n 6: '-ум',\n 7: '-ум',\n 8: '-ум',\n 9: '-ум',\n 10: '-ум',\n 12: '-ум',\n 13: '-ум',\n 20: '-ум',\n 30: '-юм',\n 40: '-ум',\n 50: '-ум',\n 60: '-ум',\n 70: '-ум',\n 80: '-ум',\n 90: '-ум',\n 100: '-ум',\n };\n\n var tg = moment.defineLocale('tg', {\n months: {\n format: 'январи_феврали_марти_апрели_майи_июни_июли_августи_сентябри_октябри_ноябри_декабри'.split(\n '_'\n ),\n standalone:\n 'январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр'.split(\n '_'\n ),\n },\n monthsShort: 'янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек'.split('_'),\n weekdays: 'якшанбе_душанбе_сешанбе_чоршанбе_панҷшанбе_ҷумъа_шанбе'.split(\n '_'\n ),\n weekdaysShort: 'яшб_дшб_сшб_чшб_пшб_ҷум_шнб'.split('_'),\n weekdaysMin: 'яш_дш_сш_чш_пш_ҷм_шб'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Имрӯз соати] LT',\n nextDay: '[Фардо соати] LT',\n lastDay: '[Дирӯз соати] LT',\n nextWeek: 'dddd[и] [ҳафтаи оянда соати] LT',\n lastWeek: 'dddd[и] [ҳафтаи гузашта соати] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'баъди %s',\n past: '%s пеш',\n s: 'якчанд сония',\n m: 'як дақиқа',\n mm: '%d дақиқа',\n h: 'як соат',\n hh: '%d соат',\n d: 'як рӯз',\n dd: '%d рӯз',\n M: 'як моҳ',\n MM: '%d моҳ',\n y: 'як сол',\n yy: '%d сол',\n },\n meridiemParse: /шаб|субҳ|рӯз|бегоҳ/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'шаб') {\n return hour < 4 ? hour : hour + 12;\n } else if (meridiem === 'субҳ') {\n return hour;\n } else if (meridiem === 'рӯз') {\n return hour >= 11 ? hour : hour + 12;\n } else if (meridiem === 'бегоҳ') {\n return hour + 12;\n }\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 4) {\n return 'шаб';\n } else if (hour < 11) {\n return 'субҳ';\n } else if (hour < 16) {\n return 'рӯз';\n } else if (hour < 19) {\n return 'бегоҳ';\n } else {\n return 'шаб';\n }\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-(ум|юм)/,\n ordinal: function (number) {\n var a = number % 10,\n b = number >= 100 ? 100 : null;\n return number + (suffixes[number] || suffixes[a] || suffixes[b]);\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 1th is the first week of the year.\n },\n });\n\n return tg;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/tg.js?", + ); + + /***/ + }, + + /***/ 5802: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Thai [th]\n//! author : Kridsada Thanabulpong : https://github.com/sirn\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var th = moment.defineLocale('th', {\n months: 'มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม'.split(\n '_'\n ),\n monthsShort:\n 'ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays: 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์'.split('_'),\n weekdaysShort: 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์'.split('_'), // yes, three characters difference\n weekdaysMin: 'อา._จ._อ._พ._พฤ._ศ._ส.'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY เวลา H:mm',\n LLLL: 'วันddddที่ D MMMM YYYY เวลา H:mm',\n },\n meridiemParse: /ก่อนเที่ยง|หลังเที่ยง/,\n isPM: function (input) {\n return input === 'หลังเที่ยง';\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 12) {\n return 'ก่อนเที่ยง';\n } else {\n return 'หลังเที่ยง';\n }\n },\n calendar: {\n sameDay: '[วันนี้ เวลา] LT',\n nextDay: '[พรุ่งนี้ เวลา] LT',\n nextWeek: 'dddd[หน้า เวลา] LT',\n lastDay: '[เมื่อวานนี้ เวลา] LT',\n lastWeek: '[วัน]dddd[ที่แล้ว เวลา] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'อีก %s',\n past: '%sที่แล้ว',\n s: 'ไม่กี่วินาที',\n ss: '%d วินาที',\n m: '1 นาที',\n mm: '%d นาที',\n h: '1 ชั่วโมง',\n hh: '%d ชั่วโมง',\n d: '1 วัน',\n dd: '%d วัน',\n w: '1 สัปดาห์',\n ww: '%d สัปดาห์',\n M: '1 เดือน',\n MM: '%d เดือน',\n y: '1 ปี',\n yy: '%d ปี',\n },\n });\n\n return th;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/th.js?", + ); + + /***/ + }, + + /***/ 9527: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Turkmen [tk]\n//! author : Atamyrat Abdyrahmanov : https://github.com/atamyratabdy\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var suffixes = {\n 1: \"'inji\",\n 5: \"'inji\",\n 8: \"'inji\",\n 70: \"'inji\",\n 80: \"'inji\",\n 2: \"'nji\",\n 7: \"'nji\",\n 20: \"'nji\",\n 50: \"'nji\",\n 3: \"'ünji\",\n 4: \"'ünji\",\n 100: \"'ünji\",\n 6: \"'njy\",\n 9: \"'unjy\",\n 10: \"'unjy\",\n 30: \"'unjy\",\n 60: \"'ynjy\",\n 90: \"'ynjy\",\n };\n\n var tk = moment.defineLocale('tk', {\n months: 'Ýanwar_Fewral_Mart_Aprel_Maý_Iýun_Iýul_Awgust_Sentýabr_Oktýabr_Noýabr_Dekabr'.split(\n '_'\n ),\n monthsShort: 'Ýan_Few_Mar_Apr_Maý_Iýn_Iýl_Awg_Sen_Okt_Noý_Dek'.split('_'),\n weekdays: 'Ýekşenbe_Duşenbe_Sişenbe_Çarşenbe_Penşenbe_Anna_Şenbe'.split(\n '_'\n ),\n weekdaysShort: 'Ýek_Duş_Siş_Çar_Pen_Ann_Şen'.split('_'),\n weekdaysMin: 'Ýk_Dş_Sş_Çr_Pn_An_Şn'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[bugün sagat] LT',\n nextDay: '[ertir sagat] LT',\n nextWeek: '[indiki] dddd [sagat] LT',\n lastDay: '[düýn] LT',\n lastWeek: '[geçen] dddd [sagat] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s soň',\n past: '%s öň',\n s: 'birnäçe sekunt',\n m: 'bir minut',\n mm: '%d minut',\n h: 'bir sagat',\n hh: '%d sagat',\n d: 'bir gün',\n dd: '%d gün',\n M: 'bir aý',\n MM: '%d aý',\n y: 'bir ýyl',\n yy: '%d ýyl',\n },\n ordinal: function (number, period) {\n switch (period) {\n case 'd':\n case 'D':\n case 'Do':\n case 'DD':\n return number;\n default:\n if (number === 0) {\n // special case for zero\n return number + \"'unjy\";\n }\n var a = number % 10,\n b = (number % 100) - a,\n c = number >= 100 ? 100 : null;\n return number + (suffixes[a] || suffixes[b] || suffixes[c]);\n }\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return tk;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/tk.js?", + ); + + /***/ + }, + + /***/ 9231: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Tagalog (Philippines) [tl-ph]\n//! author : Dan Hagman : https://github.com/hagmandan\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var tlPh = moment.defineLocale('tl-ph', {\n months: 'Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre'.split(\n '_'\n ),\n monthsShort: 'Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis'.split('_'),\n weekdays: 'Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado'.split(\n '_'\n ),\n weekdaysShort: 'Lin_Lun_Mar_Miy_Huw_Biy_Sab'.split('_'),\n weekdaysMin: 'Li_Lu_Ma_Mi_Hu_Bi_Sab'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'MM/D/YYYY',\n LL: 'MMMM D, YYYY',\n LLL: 'MMMM D, YYYY HH:mm',\n LLLL: 'dddd, MMMM DD, YYYY HH:mm',\n },\n calendar: {\n sameDay: 'LT [ngayong araw]',\n nextDay: '[Bukas ng] LT',\n nextWeek: 'LT [sa susunod na] dddd',\n lastDay: 'LT [kahapon]',\n lastWeek: 'LT [noong nakaraang] dddd',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'sa loob ng %s',\n past: '%s ang nakalipas',\n s: 'ilang segundo',\n ss: '%d segundo',\n m: 'isang minuto',\n mm: '%d minuto',\n h: 'isang oras',\n hh: '%d oras',\n d: 'isang araw',\n dd: '%d araw',\n M: 'isang buwan',\n MM: '%d buwan',\n y: 'isang taon',\n yy: '%d taon',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}/,\n ordinal: function (number) {\n return number;\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return tlPh;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/tl-ph.js?", + ); + + /***/ + }, + + /***/ 1052: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Klingon [tlh]\n//! author : Dominika Kruk : https://github.com/amaranthrose\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var numbersNouns = 'pagh_wa’_cha’_wej_loS_vagh_jav_Soch_chorgh_Hut'.split('_');\n\n function translateFuture(output) {\n var time = output;\n time =\n output.indexOf('jaj') !== -1\n ? time.slice(0, -3) + 'leS'\n : output.indexOf('jar') !== -1\n ? time.slice(0, -3) + 'waQ'\n : output.indexOf('DIS') !== -1\n ? time.slice(0, -3) + 'nem'\n : time + ' pIq';\n return time;\n }\n\n function translatePast(output) {\n var time = output;\n time =\n output.indexOf('jaj') !== -1\n ? time.slice(0, -3) + 'Hu’'\n : output.indexOf('jar') !== -1\n ? time.slice(0, -3) + 'wen'\n : output.indexOf('DIS') !== -1\n ? time.slice(0, -3) + 'ben'\n : time + ' ret';\n return time;\n }\n\n function translate(number, withoutSuffix, string, isFuture) {\n var numberNoun = numberAsNoun(number);\n switch (string) {\n case 'ss':\n return numberNoun + ' lup';\n case 'mm':\n return numberNoun + ' tup';\n case 'hh':\n return numberNoun + ' rep';\n case 'dd':\n return numberNoun + ' jaj';\n case 'MM':\n return numberNoun + ' jar';\n case 'yy':\n return numberNoun + ' DIS';\n }\n }\n\n function numberAsNoun(number) {\n var hundred = Math.floor((number % 1000) / 100),\n ten = Math.floor((number % 100) / 10),\n one = number % 10,\n word = '';\n if (hundred > 0) {\n word += numbersNouns[hundred] + 'vatlh';\n }\n if (ten > 0) {\n word += (word !== '' ? ' ' : '') + numbersNouns[ten] + 'maH';\n }\n if (one > 0) {\n word += (word !== '' ? ' ' : '') + numbersNouns[one];\n }\n return word === '' ? 'pagh' : word;\n }\n\n var tlh = moment.defineLocale('tlh', {\n months: 'tera’ jar wa’_tera’ jar cha’_tera’ jar wej_tera’ jar loS_tera’ jar vagh_tera’ jar jav_tera’ jar Soch_tera’ jar chorgh_tera’ jar Hut_tera’ jar wa’maH_tera’ jar wa’maH wa’_tera’ jar wa’maH cha’'.split(\n '_'\n ),\n monthsShort:\n 'jar wa’_jar cha’_jar wej_jar loS_jar vagh_jar jav_jar Soch_jar chorgh_jar Hut_jar wa’maH_jar wa’maH wa’_jar wa’maH cha’'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays: 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split(\n '_'\n ),\n weekdaysShort:\n 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'),\n weekdaysMin:\n 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[DaHjaj] LT',\n nextDay: '[wa’leS] LT',\n nextWeek: 'LLL',\n lastDay: '[wa’Hu’] LT',\n lastWeek: 'LLL',\n sameElse: 'L',\n },\n relativeTime: {\n future: translateFuture,\n past: translatePast,\n s: 'puS lup',\n ss: translate,\n m: 'wa’ tup',\n mm: translate,\n h: 'wa’ rep',\n hh: translate,\n d: 'wa’ jaj',\n dd: translate,\n M: 'wa’ jar',\n MM: translate,\n y: 'wa’ DIS',\n yy: translate,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return tlh;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/tlh.js?", + ); + + /***/ + }, + + /***/ 5096: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Turkish [tr]\n//! authors : Erhan Gundogan : https://github.com/erhangundogan,\n//! Burak Yiğit Kaya: https://github.com/BYK\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var suffixes = {\n 1: \"'inci\",\n 5: \"'inci\",\n 8: \"'inci\",\n 70: \"'inci\",\n 80: \"'inci\",\n 2: \"'nci\",\n 7: \"'nci\",\n 20: \"'nci\",\n 50: \"'nci\",\n 3: \"'üncü\",\n 4: \"'üncü\",\n 100: \"'üncü\",\n 6: \"'ncı\",\n 9: \"'uncu\",\n 10: \"'uncu\",\n 30: \"'uncu\",\n 60: \"'ıncı\",\n 90: \"'ıncı\",\n };\n\n var tr = moment.defineLocale('tr', {\n months: 'Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık'.split(\n '_'\n ),\n monthsShort: 'Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara'.split('_'),\n weekdays: 'Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi'.split(\n '_'\n ),\n weekdaysShort: 'Paz_Pzt_Sal_Çar_Per_Cum_Cmt'.split('_'),\n weekdaysMin: 'Pz_Pt_Sa_Ça_Pe_Cu_Ct'.split('_'),\n meridiem: function (hours, minutes, isLower) {\n if (hours < 12) {\n return isLower ? 'öö' : 'ÖÖ';\n } else {\n return isLower ? 'ös' : 'ÖS';\n }\n },\n meridiemParse: /öö|ÖÖ|ös|ÖS/,\n isPM: function (input) {\n return input === 'ös' || input === 'ÖS';\n },\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[bugün saat] LT',\n nextDay: '[yarın saat] LT',\n nextWeek: '[gelecek] dddd [saat] LT',\n lastDay: '[dün] LT',\n lastWeek: '[geçen] dddd [saat] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s sonra',\n past: '%s önce',\n s: 'birkaç saniye',\n ss: '%d saniye',\n m: 'bir dakika',\n mm: '%d dakika',\n h: 'bir saat',\n hh: '%d saat',\n d: 'bir gün',\n dd: '%d gün',\n w: 'bir hafta',\n ww: '%d hafta',\n M: 'bir ay',\n MM: '%d ay',\n y: 'bir yıl',\n yy: '%d yıl',\n },\n ordinal: function (number, period) {\n switch (period) {\n case 'd':\n case 'D':\n case 'Do':\n case 'DD':\n return number;\n default:\n if (number === 0) {\n // special case for zero\n return number + \"'ıncı\";\n }\n var a = number % 10,\n b = (number % 100) - a,\n c = number >= 100 ? 100 : null;\n return number + (suffixes[a] || suffixes[b] || suffixes[c]);\n }\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return tr;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/tr.js?", + ); + + /***/ + }, + + /***/ 9846: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Talossan [tzl]\n//! author : Robin van der Vliet : https://github.com/robin0van0der0v\n//! author : Iustì Canun\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n // After the year there should be a slash and the amount of years since December 26, 1979 in Roman numerals.\n // This is currently too difficult (maybe even impossible) to add.\n var tzl = moment.defineLocale('tzl', {\n months: 'Januar_Fevraglh_Març_Avrïu_Mai_Gün_Julia_Guscht_Setemvar_Listopäts_Noemvar_Zecemvar'.split(\n '_'\n ),\n monthsShort: 'Jan_Fev_Mar_Avr_Mai_Gün_Jul_Gus_Set_Lis_Noe_Zec'.split('_'),\n weekdays: 'Súladi_Lúneçi_Maitzi_Márcuri_Xhúadi_Viénerçi_Sáturi'.split('_'),\n weekdaysShort: 'Súl_Lún_Mai_Már_Xhú_Vié_Sát'.split('_'),\n weekdaysMin: 'Sú_Lú_Ma_Má_Xh_Vi_Sá'.split('_'),\n longDateFormat: {\n LT: 'HH.mm',\n LTS: 'HH.mm.ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM [dallas] YYYY',\n LLL: 'D. MMMM [dallas] YYYY HH.mm',\n LLLL: 'dddd, [li] D. MMMM [dallas] YYYY HH.mm',\n },\n meridiemParse: /d\\'o|d\\'a/i,\n isPM: function (input) {\n return \"d'o\" === input.toLowerCase();\n },\n meridiem: function (hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? \"d'o\" : \"D'O\";\n } else {\n return isLower ? \"d'a\" : \"D'A\";\n }\n },\n calendar: {\n sameDay: '[oxhi à] LT',\n nextDay: '[demà à] LT',\n nextWeek: 'dddd [à] LT',\n lastDay: '[ieiri à] LT',\n lastWeek: '[sür el] dddd [lasteu à] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'osprei %s',\n past: 'ja%s',\n s: processRelativeTime,\n ss: processRelativeTime,\n m: processRelativeTime,\n mm: processRelativeTime,\n h: processRelativeTime,\n hh: processRelativeTime,\n d: processRelativeTime,\n dd: processRelativeTime,\n M: processRelativeTime,\n MM: processRelativeTime,\n y: processRelativeTime,\n yy: processRelativeTime,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var format = {\n s: ['viensas secunds', \"'iensas secunds\"],\n ss: [number + ' secunds', '' + number + ' secunds'],\n m: [\"'n míut\", \"'iens míut\"],\n mm: [number + ' míuts', '' + number + ' míuts'],\n h: [\"'n þora\", \"'iensa þora\"],\n hh: [number + ' þoras', '' + number + ' þoras'],\n d: [\"'n ziua\", \"'iensa ziua\"],\n dd: [number + ' ziuas', '' + number + ' ziuas'],\n M: [\"'n mes\", \"'iens mes\"],\n MM: [number + ' mesen', '' + number + ' mesen'],\n y: [\"'n ar\", \"'iens ar\"],\n yy: [number + ' ars', '' + number + ' ars'],\n };\n return isFuture\n ? format[key][0]\n : withoutSuffix\n ? format[key][0]\n : format[key][1];\n }\n\n return tzl;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/tzl.js?", + ); + + /***/ + }, + + /***/ 7711: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Central Atlas Tamazight Latin [tzm-latn]\n//! author : Abdel Said : https://github.com/abdelsaid\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var tzmLatn = moment.defineLocale('tzm-latn', {\n months: 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split(\n '_'\n ),\n monthsShort:\n 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split(\n '_'\n ),\n weekdays: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),\n weekdaysShort: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),\n weekdaysMin: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[asdkh g] LT',\n nextDay: '[aska g] LT',\n nextWeek: 'dddd [g] LT',\n lastDay: '[assant g] LT',\n lastWeek: 'dddd [g] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'dadkh s yan %s',\n past: 'yan %s',\n s: 'imik',\n ss: '%d imik',\n m: 'minuḍ',\n mm: '%d minuḍ',\n h: 'saɛa',\n hh: '%d tassaɛin',\n d: 'ass',\n dd: '%d ossan',\n M: 'ayowr',\n MM: '%d iyyirn',\n y: 'asgas',\n yy: '%d isgasn',\n },\n week: {\n dow: 6, // Saturday is the first day of the week.\n doy: 12, // The week that contains Jan 12th is the first week of the year.\n },\n });\n\n return tzmLatn;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/tzm-latn.js?", + ); + + /***/ + }, + + /***/ 1765: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Central Atlas Tamazight [tzm]\n//! author : Abdel Said : https://github.com/abdelsaid\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var tzm = moment.defineLocale('tzm', {\n months: 'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split(\n '_'\n ),\n monthsShort:\n 'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split(\n '_'\n ),\n weekdays: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),\n weekdaysShort: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),\n weekdaysMin: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[ⴰⵙⴷⵅ ⴴ] LT',\n nextDay: '[ⴰⵙⴽⴰ ⴴ] LT',\n nextWeek: 'dddd [ⴴ] LT',\n lastDay: '[ⴰⵚⴰⵏⵜ ⴴ] LT',\n lastWeek: 'dddd [ⴴ] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ %s',\n past: 'ⵢⴰⵏ %s',\n s: 'ⵉⵎⵉⴽ',\n ss: '%d ⵉⵎⵉⴽ',\n m: 'ⵎⵉⵏⵓⴺ',\n mm: '%d ⵎⵉⵏⵓⴺ',\n h: 'ⵙⴰⵄⴰ',\n hh: '%d ⵜⴰⵙⵙⴰⵄⵉⵏ',\n d: 'ⴰⵙⵙ',\n dd: '%d oⵙⵙⴰⵏ',\n M: 'ⴰⵢoⵓⵔ',\n MM: '%d ⵉⵢⵢⵉⵔⵏ',\n y: 'ⴰⵙⴳⴰⵙ',\n yy: '%d ⵉⵙⴳⴰⵙⵏ',\n },\n week: {\n dow: 6, // Saturday is the first day of the week.\n doy: 12, // The week that contains Jan 12th is the first week of the year.\n },\n });\n\n return tzm;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/tzm.js?", + ); + + /***/ + }, + + /***/ 8414: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Uyghur (China) [ug-cn]\n//! author: boyaq : https://github.com/boyaq\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var ugCn = moment.defineLocale('ug-cn', {\n months: 'يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر'.split(\n '_'\n ),\n monthsShort:\n 'يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر'.split(\n '_'\n ),\n weekdays: 'يەكشەنبە_دۈشەنبە_سەيشەنبە_چارشەنبە_پەيشەنبە_جۈمە_شەنبە'.split(\n '_'\n ),\n weekdaysShort: 'يە_دۈ_سە_چا_پە_جۈ_شە'.split('_'),\n weekdaysMin: 'يە_دۈ_سە_چا_پە_جۈ_شە'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'YYYY-MM-DD',\n LL: 'YYYY-يىلىM-ئاينىڭD-كۈنى',\n LLL: 'YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm',\n LLLL: 'dddd، YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm',\n },\n meridiemParse: /يېرىم كېچە|سەھەر|چۈشتىن بۇرۇن|چۈش|چۈشتىن كېيىن|كەچ/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (\n meridiem === 'يېرىم كېچە' ||\n meridiem === 'سەھەر' ||\n meridiem === 'چۈشتىن بۇرۇن'\n ) {\n return hour;\n } else if (meridiem === 'چۈشتىن كېيىن' || meridiem === 'كەچ') {\n return hour + 12;\n } else {\n return hour >= 11 ? hour : hour + 12;\n }\n },\n meridiem: function (hour, minute, isLower) {\n var hm = hour * 100 + minute;\n if (hm < 600) {\n return 'يېرىم كېچە';\n } else if (hm < 900) {\n return 'سەھەر';\n } else if (hm < 1130) {\n return 'چۈشتىن بۇرۇن';\n } else if (hm < 1230) {\n return 'چۈش';\n } else if (hm < 1800) {\n return 'چۈشتىن كېيىن';\n } else {\n return 'كەچ';\n }\n },\n calendar: {\n sameDay: '[بۈگۈن سائەت] LT',\n nextDay: '[ئەتە سائەت] LT',\n nextWeek: '[كېلەركى] dddd [سائەت] LT',\n lastDay: '[تۆنۈگۈن] LT',\n lastWeek: '[ئالدىنقى] dddd [سائەت] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s كېيىن',\n past: '%s بۇرۇن',\n s: 'نەچچە سېكونت',\n ss: '%d سېكونت',\n m: 'بىر مىنۇت',\n mm: '%d مىنۇت',\n h: 'بىر سائەت',\n hh: '%d سائەت',\n d: 'بىر كۈن',\n dd: '%d كۈن',\n M: 'بىر ئاي',\n MM: '%d ئاي',\n y: 'بىر يىل',\n yy: '%d يىل',\n },\n\n dayOfMonthOrdinalParse: /\\d{1,2}(-كۈنى|-ئاي|-ھەپتە)/,\n ordinal: function (number, period) {\n switch (period) {\n case 'd':\n case 'D':\n case 'DDD':\n return number + '-كۈنى';\n case 'w':\n case 'W':\n return number + '-ھەپتە';\n default:\n return number;\n }\n },\n preparse: function (string) {\n return string.replace(/،/g, ',');\n },\n postformat: function (string) {\n return string.replace(/,/g, '،');\n },\n week: {\n // GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 1st is the first week of the year.\n },\n });\n\n return ugCn;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/ug-cn.js?", + ); + + /***/ + }, + + /***/ 6618: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Ukrainian [uk]\n//! author : zemlanin : https://github.com/zemlanin\n//! Author : Menelion Elensúle : https://github.com/Oire\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function plural(word, num) {\n var forms = word.split('_');\n return num % 10 === 1 && num % 100 !== 11\n ? forms[0]\n : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20)\n ? forms[1]\n : forms[2];\n }\n function relativeTimeWithPlural(number, withoutSuffix, key) {\n var format = {\n ss: withoutSuffix ? 'секунда_секунди_секунд' : 'секунду_секунди_секунд',\n mm: withoutSuffix ? 'хвилина_хвилини_хвилин' : 'хвилину_хвилини_хвилин',\n hh: withoutSuffix ? 'година_години_годин' : 'годину_години_годин',\n dd: 'день_дні_днів',\n MM: 'місяць_місяці_місяців',\n yy: 'рік_роки_років',\n };\n if (key === 'm') {\n return withoutSuffix ? 'хвилина' : 'хвилину';\n } else if (key === 'h') {\n return withoutSuffix ? 'година' : 'годину';\n } else {\n return number + ' ' + plural(format[key], +number);\n }\n }\n function weekdaysCaseReplace(m, format) {\n var weekdays = {\n nominative:\n 'неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота'.split(\n '_'\n ),\n accusative:\n 'неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу'.split(\n '_'\n ),\n genitive:\n 'неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи'.split(\n '_'\n ),\n },\n nounCase;\n\n if (m === true) {\n return weekdays['nominative']\n .slice(1, 7)\n .concat(weekdays['nominative'].slice(0, 1));\n }\n if (!m) {\n return weekdays['nominative'];\n }\n\n nounCase = /(\\[[ВвУу]\\]) ?dddd/.test(format)\n ? 'accusative'\n : /\\[?(?:минулої|наступної)? ?\\] ?dddd/.test(format)\n ? 'genitive'\n : 'nominative';\n return weekdays[nounCase][m.day()];\n }\n function processHoursFunction(str) {\n return function () {\n return str + 'о' + (this.hours() === 11 ? 'б' : '') + '] LT';\n };\n }\n\n var uk = moment.defineLocale('uk', {\n months: {\n format: 'січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня'.split(\n '_'\n ),\n standalone:\n 'січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень'.split(\n '_'\n ),\n },\n monthsShort: 'січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд'.split(\n '_'\n ),\n weekdays: weekdaysCaseReplace,\n weekdaysShort: 'нд_пн_вт_ср_чт_пт_сб'.split('_'),\n weekdaysMin: 'нд_пн_вт_ср_чт_пт_сб'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY р.',\n LLL: 'D MMMM YYYY р., HH:mm',\n LLLL: 'dddd, D MMMM YYYY р., HH:mm',\n },\n calendar: {\n sameDay: processHoursFunction('[Сьогодні '),\n nextDay: processHoursFunction('[Завтра '),\n lastDay: processHoursFunction('[Вчора '),\n nextWeek: processHoursFunction('[У] dddd ['),\n lastWeek: function () {\n switch (this.day()) {\n case 0:\n case 3:\n case 5:\n case 6:\n return processHoursFunction('[Минулої] dddd [').call(this);\n case 1:\n case 2:\n case 4:\n return processHoursFunction('[Минулого] dddd [').call(this);\n }\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'за %s',\n past: '%s тому',\n s: 'декілька секунд',\n ss: relativeTimeWithPlural,\n m: relativeTimeWithPlural,\n mm: relativeTimeWithPlural,\n h: 'годину',\n hh: relativeTimeWithPlural,\n d: 'день',\n dd: relativeTimeWithPlural,\n M: 'місяць',\n MM: relativeTimeWithPlural,\n y: 'рік',\n yy: relativeTimeWithPlural,\n },\n // M. E.: those two are virtually unused but a user might want to implement them for his/her website for some reason\n meridiemParse: /ночі|ранку|дня|вечора/,\n isPM: function (input) {\n return /^(дня|вечора)$/.test(input);\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 4) {\n return 'ночі';\n } else if (hour < 12) {\n return 'ранку';\n } else if (hour < 17) {\n return 'дня';\n } else {\n return 'вечора';\n }\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-(й|го)/,\n ordinal: function (number, period) {\n switch (period) {\n case 'M':\n case 'd':\n case 'DDD':\n case 'w':\n case 'W':\n return number + '-й';\n case 'D':\n return number + '-го';\n default:\n return number;\n }\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return uk;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/uk.js?", + ); + + /***/ + }, + + /***/ 158: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Urdu [ur]\n//! author : Sawood Alam : https://github.com/ibnesayeed\n//! author : Zack : https://github.com/ZackVision\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var months = [\n 'جنوری',\n 'فروری',\n 'مارچ',\n 'اپریل',\n 'مئی',\n 'جون',\n 'جولائی',\n 'اگست',\n 'ستمبر',\n 'اکتوبر',\n 'نومبر',\n 'دسمبر',\n ],\n days = ['اتوار', 'پیر', 'منگل', 'بدھ', 'جمعرات', 'جمعہ', 'ہفتہ'];\n\n var ur = moment.defineLocale('ur', {\n months: months,\n monthsShort: months,\n weekdays: days,\n weekdaysShort: days,\n weekdaysMin: days,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd، D MMMM YYYY HH:mm',\n },\n meridiemParse: /صبح|شام/,\n isPM: function (input) {\n return 'شام' === input;\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 12) {\n return 'صبح';\n }\n return 'شام';\n },\n calendar: {\n sameDay: '[آج بوقت] LT',\n nextDay: '[کل بوقت] LT',\n nextWeek: 'dddd [بوقت] LT',\n lastDay: '[گذشتہ روز بوقت] LT',\n lastWeek: '[گذشتہ] dddd [بوقت] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s بعد',\n past: '%s قبل',\n s: 'چند سیکنڈ',\n ss: '%d سیکنڈ',\n m: 'ایک منٹ',\n mm: '%d منٹ',\n h: 'ایک گھنٹہ',\n hh: '%d گھنٹے',\n d: 'ایک دن',\n dd: '%d دن',\n M: 'ایک ماہ',\n MM: '%d ماہ',\n y: 'ایک سال',\n yy: '%d سال',\n },\n preparse: function (string) {\n return string.replace(/،/g, ',');\n },\n postformat: function (string) {\n return string.replace(/,/g, '،');\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return ur;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/ur.js?", + ); + + /***/ + }, + + /***/ 4856: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Uzbek Latin [uz-latn]\n//! author : Rasulbek Mirzayev : github.com/Rasulbeeek\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var uzLatn = moment.defineLocale('uz-latn', {\n months: 'Yanvar_Fevral_Mart_Aprel_May_Iyun_Iyul_Avgust_Sentabr_Oktabr_Noyabr_Dekabr'.split(\n '_'\n ),\n monthsShort: 'Yan_Fev_Mar_Apr_May_Iyun_Iyul_Avg_Sen_Okt_Noy_Dek'.split('_'),\n weekdays:\n 'Yakshanba_Dushanba_Seshanba_Chorshanba_Payshanba_Juma_Shanba'.split(\n '_'\n ),\n weekdaysShort: 'Yak_Dush_Sesh_Chor_Pay_Jum_Shan'.split('_'),\n weekdaysMin: 'Ya_Du_Se_Cho_Pa_Ju_Sha'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'D MMMM YYYY, dddd HH:mm',\n },\n calendar: {\n sameDay: '[Bugun soat] LT [da]',\n nextDay: '[Ertaga] LT [da]',\n nextWeek: 'dddd [kuni soat] LT [da]',\n lastDay: '[Kecha soat] LT [da]',\n lastWeek: \"[O'tgan] dddd [kuni soat] LT [da]\",\n sameElse: 'L',\n },\n relativeTime: {\n future: 'Yaqin %s ichida',\n past: 'Bir necha %s oldin',\n s: 'soniya',\n ss: '%d soniya',\n m: 'bir daqiqa',\n mm: '%d daqiqa',\n h: 'bir soat',\n hh: '%d soat',\n d: 'bir kun',\n dd: '%d kun',\n M: 'bir oy',\n MM: '%d oy',\n y: 'bir yil',\n yy: '%d yil',\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return uzLatn;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/uz-latn.js?", + ); + + /***/ + }, + + /***/ 7609: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Uzbek [uz]\n//! author : Sardor Muminov : https://github.com/muminoff\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var uz = moment.defineLocale('uz', {\n months: 'январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр'.split(\n '_'\n ),\n monthsShort: 'янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек'.split('_'),\n weekdays: 'Якшанба_Душанба_Сешанба_Чоршанба_Пайшанба_Жума_Шанба'.split('_'),\n weekdaysShort: 'Якш_Душ_Сеш_Чор_Пай_Жум_Шан'.split('_'),\n weekdaysMin: 'Як_Ду_Се_Чо_Па_Жу_Ша'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'D MMMM YYYY, dddd HH:mm',\n },\n calendar: {\n sameDay: '[Бугун соат] LT [да]',\n nextDay: '[Эртага] LT [да]',\n nextWeek: 'dddd [куни соат] LT [да]',\n lastDay: '[Кеча соат] LT [да]',\n lastWeek: '[Утган] dddd [куни соат] LT [да]',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'Якин %s ичида',\n past: 'Бир неча %s олдин',\n s: 'фурсат',\n ss: '%d фурсат',\n m: 'бир дакика',\n mm: '%d дакика',\n h: 'бир соат',\n hh: '%d соат',\n d: 'бир кун',\n dd: '%d кун',\n M: 'бир ой',\n MM: '%d ой',\n y: 'бир йил',\n yy: '%d йил',\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return uz;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/uz.js?", + ); + + /***/ + }, + + /***/ 1135: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Vietnamese [vi]\n//! author : Bang Nguyen : https://github.com/bangnk\n//! author : Chien Kira : https://github.com/chienkira\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var vi = moment.defineLocale('vi', {\n months: 'tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12'.split(\n '_'\n ),\n monthsShort:\n 'Thg 01_Thg 02_Thg 03_Thg 04_Thg 05_Thg 06_Thg 07_Thg 08_Thg 09_Thg 10_Thg 11_Thg 12'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays: 'chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy'.split(\n '_'\n ),\n weekdaysShort: 'CN_T2_T3_T4_T5_T6_T7'.split('_'),\n weekdaysMin: 'CN_T2_T3_T4_T5_T6_T7'.split('_'),\n weekdaysParseExact: true,\n meridiemParse: /sa|ch/i,\n isPM: function (input) {\n return /^ch$/i.test(input);\n },\n meridiem: function (hours, minutes, isLower) {\n if (hours < 12) {\n return isLower ? 'sa' : 'SA';\n } else {\n return isLower ? 'ch' : 'CH';\n }\n },\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM [năm] YYYY',\n LLL: 'D MMMM [năm] YYYY HH:mm',\n LLLL: 'dddd, D MMMM [năm] YYYY HH:mm',\n l: 'DD/M/YYYY',\n ll: 'D MMM YYYY',\n lll: 'D MMM YYYY HH:mm',\n llll: 'ddd, D MMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Hôm nay lúc] LT',\n nextDay: '[Ngày mai lúc] LT',\n nextWeek: 'dddd [tuần tới lúc] LT',\n lastDay: '[Hôm qua lúc] LT',\n lastWeek: 'dddd [tuần trước lúc] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s tới',\n past: '%s trước',\n s: 'vài giây',\n ss: '%d giây',\n m: 'một phút',\n mm: '%d phút',\n h: 'một giờ',\n hh: '%d giờ',\n d: 'một ngày',\n dd: '%d ngày',\n w: 'một tuần',\n ww: '%d tuần',\n M: 'một tháng',\n MM: '%d tháng',\n y: 'một năm',\n yy: '%d năm',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}/,\n ordinal: function (number) {\n return number;\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return vi;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/vi.js?", + ); + + /***/ + }, + + /***/ 4051: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Pseudo [x-pseudo]\n//! author : Andrew Hood : https://github.com/andrewhood125\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var xPseudo = moment.defineLocale('x-pseudo', {\n months: 'J~áñúá~rý_F~ébrú~árý_~Márc~h_Áp~ríl_~Máý_~Júñé~_Júl~ý_Áú~gúst~_Sép~témb~ér_Ó~ctób~ér_Ñ~óvém~bér_~Décé~mbér'.split(\n '_'\n ),\n monthsShort:\n 'J~áñ_~Féb_~Már_~Ápr_~Máý_~Júñ_~Júl_~Áúg_~Sép_~Óct_~Ñóv_~Déc'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays:\n 'S~úñdá~ý_Mó~ñdáý~_Túé~sdáý~_Wéd~ñésd~áý_T~húrs~dáý_~Fríd~áý_S~átúr~dáý'.split(\n '_'\n ),\n weekdaysShort: 'S~úñ_~Móñ_~Túé_~Wéd_~Thú_~Frí_~Sát'.split('_'),\n weekdaysMin: 'S~ú_Mó~_Tú_~Wé_T~h_Fr~_Sá'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[T~ódá~ý át] LT',\n nextDay: '[T~ómó~rró~w át] LT',\n nextWeek: 'dddd [át] LT',\n lastDay: '[Ý~ést~érdá~ý át] LT',\n lastWeek: '[L~ást] dddd [át] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'í~ñ %s',\n past: '%s á~gó',\n s: 'á ~féw ~sécó~ñds',\n ss: '%d s~écóñ~ds',\n m: 'á ~míñ~úté',\n mm: '%d m~íñú~tés',\n h: 'á~ñ hó~úr',\n hh: '%d h~óúrs',\n d: 'á ~dáý',\n dd: '%d d~áýs',\n M: 'á ~móñ~th',\n MM: '%d m~óñt~hs',\n y: 'á ~ýéár',\n yy: '%d ý~éárs',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n ~~((number % 100) / 10) === 1\n ? 'th'\n : b === 1\n ? 'st'\n : b === 2\n ? 'nd'\n : b === 3\n ? 'rd'\n : 'th';\n return number + output;\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return xPseudo;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/x-pseudo.js?", + ); + + /***/ + }, + + /***/ 2218: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Yoruba Nigeria [yo]\n//! author : Atolagbe Abisoye : https://github.com/andela-batolagbe\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var yo = moment.defineLocale('yo', {\n months: 'Sẹ́rẹ́_Èrèlè_Ẹrẹ̀nà_Ìgbé_Èbibi_Òkùdu_Agẹmo_Ògún_Owewe_Ọ̀wàrà_Bélú_Ọ̀pẹ̀̀'.split(\n '_'\n ),\n monthsShort: 'Sẹ́r_Èrl_Ẹrn_Ìgb_Èbi_Òkù_Agẹ_Ògú_Owe_Ọ̀wà_Bél_Ọ̀pẹ̀̀'.split('_'),\n weekdays: 'Àìkú_Ajé_Ìsẹ́gun_Ọjọ́rú_Ọjọ́bọ_Ẹtì_Àbámẹ́ta'.split('_'),\n weekdaysShort: 'Àìk_Ajé_Ìsẹ́_Ọjr_Ọjb_Ẹtì_Àbá'.split('_'),\n weekdaysMin: 'Àì_Aj_Ìs_Ọr_Ọb_Ẹt_Àb'.split('_'),\n longDateFormat: {\n LT: 'h:mm A',\n LTS: 'h:mm:ss A',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY h:mm A',\n LLLL: 'dddd, D MMMM YYYY h:mm A',\n },\n calendar: {\n sameDay: '[Ònì ni] LT',\n nextDay: '[Ọ̀la ni] LT',\n nextWeek: \"dddd [Ọsẹ̀ tón'bọ] [ni] LT\",\n lastDay: '[Àna ni] LT',\n lastWeek: 'dddd [Ọsẹ̀ tólọ́] [ni] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'ní %s',\n past: '%s kọjá',\n s: 'ìsẹjú aayá die',\n ss: 'aayá %d',\n m: 'ìsẹjú kan',\n mm: 'ìsẹjú %d',\n h: 'wákati kan',\n hh: 'wákati %d',\n d: 'ọjọ́ kan',\n dd: 'ọjọ́ %d',\n M: 'osù kan',\n MM: 'osù %d',\n y: 'ọdún kan',\n yy: 'ọdún %d',\n },\n dayOfMonthOrdinalParse: /ọjọ́\\s\\d{1,2}/,\n ordinal: 'ọjọ́ %d',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return yo;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/yo.js?", + ); + + /***/ + }, + + /***/ 2648: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Chinese (China) [zh-cn]\n//! author : suupic : https://github.com/suupic\n//! author : Zeno Zeng : https://github.com/zenozeng\n//! author : uu109 : https://github.com/uu109\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var zhCn = moment.defineLocale('zh-cn', {\n months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(\n '_'\n ),\n monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(\n '_'\n ),\n weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),\n weekdaysShort: '周日_周一_周二_周三_周四_周五_周六'.split('_'),\n weekdaysMin: '日_一_二_三_四_五_六'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'YYYY/MM/DD',\n LL: 'YYYY年M月D日',\n LLL: 'YYYY年M月D日Ah点mm分',\n LLLL: 'YYYY年M月D日ddddAh点mm分',\n l: 'YYYY/M/D',\n ll: 'YYYY年M月D日',\n lll: 'YYYY年M月D日 HH:mm',\n llll: 'YYYY年M月D日dddd HH:mm',\n },\n meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {\n return hour;\n } else if (meridiem === '下午' || meridiem === '晚上') {\n return hour + 12;\n } else {\n // '中午'\n return hour >= 11 ? hour : hour + 12;\n }\n },\n meridiem: function (hour, minute, isLower) {\n var hm = hour * 100 + minute;\n if (hm < 600) {\n return '凌晨';\n } else if (hm < 900) {\n return '早上';\n } else if (hm < 1130) {\n return '上午';\n } else if (hm < 1230) {\n return '中午';\n } else if (hm < 1800) {\n return '下午';\n } else {\n return '晚上';\n }\n },\n calendar: {\n sameDay: '[今天]LT',\n nextDay: '[明天]LT',\n nextWeek: function (now) {\n if (now.week() !== this.week()) {\n return '[下]dddLT';\n } else {\n return '[本]dddLT';\n }\n },\n lastDay: '[昨天]LT',\n lastWeek: function (now) {\n if (this.week() !== now.week()) {\n return '[上]dddLT';\n } else {\n return '[本]dddLT';\n }\n },\n sameElse: 'L',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(日|月|周)/,\n ordinal: function (number, period) {\n switch (period) {\n case 'd':\n case 'D':\n case 'DDD':\n return number + '日';\n case 'M':\n return number + '月';\n case 'w':\n case 'W':\n return number + '周';\n default:\n return number;\n }\n },\n relativeTime: {\n future: '%s后',\n past: '%s前',\n s: '几秒',\n ss: '%d 秒',\n m: '1 分钟',\n mm: '%d 分钟',\n h: '1 小时',\n hh: '%d 小时',\n d: '1 天',\n dd: '%d 天',\n w: '1 周',\n ww: '%d 周',\n M: '1 个月',\n MM: '%d 个月',\n y: '1 年',\n yy: '%d 年',\n },\n week: {\n // GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return zhCn;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/zh-cn.js?", + ); + + /***/ + }, + + /***/ 1632: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Chinese (Hong Kong) [zh-hk]\n//! author : Ben : https://github.com/ben-lin\n//! author : Chris Lam : https://github.com/hehachris\n//! author : Konstantin : https://github.com/skfd\n//! author : Anthony : https://github.com/anthonylau\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var zhHk = moment.defineLocale('zh-hk', {\n months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(\n '_'\n ),\n monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(\n '_'\n ),\n weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),\n weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'),\n weekdaysMin: '日_一_二_三_四_五_六'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'YYYY/MM/DD',\n LL: 'YYYY年M月D日',\n LLL: 'YYYY年M月D日 HH:mm',\n LLLL: 'YYYY年M月D日dddd HH:mm',\n l: 'YYYY/M/D',\n ll: 'YYYY年M月D日',\n lll: 'YYYY年M月D日 HH:mm',\n llll: 'YYYY年M月D日dddd HH:mm',\n },\n meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {\n return hour;\n } else if (meridiem === '中午') {\n return hour >= 11 ? hour : hour + 12;\n } else if (meridiem === '下午' || meridiem === '晚上') {\n return hour + 12;\n }\n },\n meridiem: function (hour, minute, isLower) {\n var hm = hour * 100 + minute;\n if (hm < 600) {\n return '凌晨';\n } else if (hm < 900) {\n return '早上';\n } else if (hm < 1200) {\n return '上午';\n } else if (hm === 1200) {\n return '中午';\n } else if (hm < 1800) {\n return '下午';\n } else {\n return '晚上';\n }\n },\n calendar: {\n sameDay: '[今天]LT',\n nextDay: '[明天]LT',\n nextWeek: '[下]ddddLT',\n lastDay: '[昨天]LT',\n lastWeek: '[上]ddddLT',\n sameElse: 'L',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(日|月|週)/,\n ordinal: function (number, period) {\n switch (period) {\n case 'd':\n case 'D':\n case 'DDD':\n return number + '日';\n case 'M':\n return number + '月';\n case 'w':\n case 'W':\n return number + '週';\n default:\n return number;\n }\n },\n relativeTime: {\n future: '%s後',\n past: '%s前',\n s: '幾秒',\n ss: '%d 秒',\n m: '1 分鐘',\n mm: '%d 分鐘',\n h: '1 小時',\n hh: '%d 小時',\n d: '1 天',\n dd: '%d 天',\n M: '1 個月',\n MM: '%d 個月',\n y: '1 年',\n yy: '%d 年',\n },\n });\n\n return zhHk;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/zh-hk.js?", + ); + + /***/ + }, + + /***/ 1541: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Chinese (Macau) [zh-mo]\n//! author : Ben : https://github.com/ben-lin\n//! author : Chris Lam : https://github.com/hehachris\n//! author : Tan Yuanhong : https://github.com/le0tan\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var zhMo = moment.defineLocale('zh-mo', {\n months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(\n '_'\n ),\n monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(\n '_'\n ),\n weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),\n weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'),\n weekdaysMin: '日_一_二_三_四_五_六'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'YYYY年M月D日',\n LLL: 'YYYY年M月D日 HH:mm',\n LLLL: 'YYYY年M月D日dddd HH:mm',\n l: 'D/M/YYYY',\n ll: 'YYYY年M月D日',\n lll: 'YYYY年M月D日 HH:mm',\n llll: 'YYYY年M月D日dddd HH:mm',\n },\n meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {\n return hour;\n } else if (meridiem === '中午') {\n return hour >= 11 ? hour : hour + 12;\n } else if (meridiem === '下午' || meridiem === '晚上') {\n return hour + 12;\n }\n },\n meridiem: function (hour, minute, isLower) {\n var hm = hour * 100 + minute;\n if (hm < 600) {\n return '凌晨';\n } else if (hm < 900) {\n return '早上';\n } else if (hm < 1130) {\n return '上午';\n } else if (hm < 1230) {\n return '中午';\n } else if (hm < 1800) {\n return '下午';\n } else {\n return '晚上';\n }\n },\n calendar: {\n sameDay: '[今天] LT',\n nextDay: '[明天] LT',\n nextWeek: '[下]dddd LT',\n lastDay: '[昨天] LT',\n lastWeek: '[上]dddd LT',\n sameElse: 'L',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(日|月|週)/,\n ordinal: function (number, period) {\n switch (period) {\n case 'd':\n case 'D':\n case 'DDD':\n return number + '日';\n case 'M':\n return number + '月';\n case 'w':\n case 'W':\n return number + '週';\n default:\n return number;\n }\n },\n relativeTime: {\n future: '%s內',\n past: '%s前',\n s: '幾秒',\n ss: '%d 秒',\n m: '1 分鐘',\n mm: '%d 分鐘',\n h: '1 小時',\n hh: '%d 小時',\n d: '1 天',\n dd: '%d 天',\n M: '1 個月',\n MM: '%d 個月',\n y: '1 年',\n yy: '%d 年',\n },\n });\n\n return zhMo;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/zh-mo.js?", + ); + + /***/ + }, + + /***/ 304: /***/ function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + eval( + "//! moment.js locale configuration\n//! locale : Chinese (Taiwan) [zh-tw]\n//! author : Ben : https://github.com/ben-lin\n//! author : Chris Lam : https://github.com/hehachris\n\n;(function (global, factory) {\n true ? factory(__webpack_require__(5093)) :\n 0\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var zhTw = moment.defineLocale('zh-tw', {\n months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(\n '_'\n ),\n monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(\n '_'\n ),\n weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),\n weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'),\n weekdaysMin: '日_一_二_三_四_五_六'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'YYYY/MM/DD',\n LL: 'YYYY年M月D日',\n LLL: 'YYYY年M月D日 HH:mm',\n LLLL: 'YYYY年M月D日dddd HH:mm',\n l: 'YYYY/M/D',\n ll: 'YYYY年M月D日',\n lll: 'YYYY年M月D日 HH:mm',\n llll: 'YYYY年M月D日dddd HH:mm',\n },\n meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {\n return hour;\n } else if (meridiem === '中午') {\n return hour >= 11 ? hour : hour + 12;\n } else if (meridiem === '下午' || meridiem === '晚上') {\n return hour + 12;\n }\n },\n meridiem: function (hour, minute, isLower) {\n var hm = hour * 100 + minute;\n if (hm < 600) {\n return '凌晨';\n } else if (hm < 900) {\n return '早上';\n } else if (hm < 1130) {\n return '上午';\n } else if (hm < 1230) {\n return '中午';\n } else if (hm < 1800) {\n return '下午';\n } else {\n return '晚上';\n }\n },\n calendar: {\n sameDay: '[今天] LT',\n nextDay: '[明天] LT',\n nextWeek: '[下]dddd LT',\n lastDay: '[昨天] LT',\n lastWeek: '[上]dddd LT',\n sameElse: 'L',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(日|月|週)/,\n ordinal: function (number, period) {\n switch (period) {\n case 'd':\n case 'D':\n case 'DDD':\n return number + '日';\n case 'M':\n return number + '月';\n case 'w':\n case 'W':\n return number + '週';\n default:\n return number;\n }\n },\n relativeTime: {\n future: '%s後',\n past: '%s前',\n s: '幾秒',\n ss: '%d 秒',\n m: '1 分鐘',\n mm: '%d 分鐘',\n h: '1 小時',\n hh: '%d 小時',\n d: '1 天',\n dd: '%d 天',\n M: '1 個月',\n MM: '%d 個月',\n y: '1 年',\n yy: '%d 年',\n },\n });\n\n return zhTw;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/zh-tw.js?", + ); + + /***/ + }, + + /***/ 5358: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var map = {\n\t"./af": 5177,\n\t"./af.js": 5177,\n\t"./ar": 1509,\n\t"./ar-dz": 1488,\n\t"./ar-dz.js": 1488,\n\t"./ar-kw": 8676,\n\t"./ar-kw.js": 8676,\n\t"./ar-ly": 2353,\n\t"./ar-ly.js": 2353,\n\t"./ar-ma": 4496,\n\t"./ar-ma.js": 4496,\n\t"./ar-ps": 6947,\n\t"./ar-ps.js": 6947,\n\t"./ar-sa": 2682,\n\t"./ar-sa.js": 2682,\n\t"./ar-tn": 9756,\n\t"./ar-tn.js": 9756,\n\t"./ar.js": 1509,\n\t"./az": 5533,\n\t"./az.js": 5533,\n\t"./be": 8959,\n\t"./be.js": 8959,\n\t"./bg": 7777,\n\t"./bg.js": 7777,\n\t"./bm": 4903,\n\t"./bm.js": 4903,\n\t"./bn": 1290,\n\t"./bn-bd": 7357,\n\t"./bn-bd.js": 7357,\n\t"./bn.js": 1290,\n\t"./bo": 1545,\n\t"./bo.js": 1545,\n\t"./br": 1470,\n\t"./br.js": 1470,\n\t"./bs": 4429,\n\t"./bs.js": 4429,\n\t"./ca": 7306,\n\t"./ca.js": 7306,\n\t"./cs": 6464,\n\t"./cs.js": 6464,\n\t"./cv": 3635,\n\t"./cv.js": 3635,\n\t"./cy": 4226,\n\t"./cy.js": 4226,\n\t"./da": 3601,\n\t"./da.js": 3601,\n\t"./de": 7853,\n\t"./de-at": 6111,\n\t"./de-at.js": 6111,\n\t"./de-ch": 4697,\n\t"./de-ch.js": 4697,\n\t"./de.js": 7853,\n\t"./dv": 708,\n\t"./dv.js": 708,\n\t"./el": 4691,\n\t"./el.js": 4691,\n\t"./en-au": 3872,\n\t"./en-au.js": 3872,\n\t"./en-ca": 8298,\n\t"./en-ca.js": 8298,\n\t"./en-gb": 6195,\n\t"./en-gb.js": 6195,\n\t"./en-ie": 6584,\n\t"./en-ie.js": 6584,\n\t"./en-il": 5543,\n\t"./en-il.js": 5543,\n\t"./en-in": 9033,\n\t"./en-in.js": 9033,\n\t"./en-nz": 9402,\n\t"./en-nz.js": 9402,\n\t"./en-sg": 3004,\n\t"./en-sg.js": 3004,\n\t"./eo": 2934,\n\t"./eo.js": 2934,\n\t"./es": 7650,\n\t"./es-do": 838,\n\t"./es-do.js": 838,\n\t"./es-mx": 7730,\n\t"./es-mx.js": 7730,\n\t"./es-us": 6575,\n\t"./es-us.js": 6575,\n\t"./es.js": 7650,\n\t"./et": 3035,\n\t"./et.js": 3035,\n\t"./eu": 3508,\n\t"./eu.js": 3508,\n\t"./fa": 119,\n\t"./fa.js": 119,\n\t"./fi": 527,\n\t"./fi.js": 527,\n\t"./fil": 8376,\n\t"./fil.js": 8376,\n\t"./fo": 2477,\n\t"./fo.js": 2477,\n\t"./fr": 5498,\n\t"./fr-ca": 6435,\n\t"./fr-ca.js": 6435,\n\t"./fr-ch": 7892,\n\t"./fr-ch.js": 7892,\n\t"./fr.js": 5498,\n\t"./fy": 7071,\n\t"./fy.js": 7071,\n\t"./ga": 1734,\n\t"./ga.js": 1734,\n\t"./gd": 217,\n\t"./gd.js": 217,\n\t"./gl": 7329,\n\t"./gl.js": 7329,\n\t"./gom-deva": 2124,\n\t"./gom-deva.js": 2124,\n\t"./gom-latn": 3383,\n\t"./gom-latn.js": 3383,\n\t"./gu": 5050,\n\t"./gu.js": 5050,\n\t"./he": 1713,\n\t"./he.js": 1713,\n\t"./hi": 3861,\n\t"./hi.js": 3861,\n\t"./hr": 6308,\n\t"./hr.js": 6308,\n\t"./hu": 609,\n\t"./hu.js": 609,\n\t"./hy-am": 7160,\n\t"./hy-am.js": 7160,\n\t"./id": 4063,\n\t"./id.js": 4063,\n\t"./is": 9374,\n\t"./is.js": 9374,\n\t"./it": 8383,\n\t"./it-ch": 1827,\n\t"./it-ch.js": 1827,\n\t"./it.js": 8383,\n\t"./ja": 3827,\n\t"./ja.js": 3827,\n\t"./jv": 9722,\n\t"./jv.js": 9722,\n\t"./ka": 1794,\n\t"./ka.js": 1794,\n\t"./kk": 7088,\n\t"./kk.js": 7088,\n\t"./km": 6870,\n\t"./km.js": 6870,\n\t"./kn": 4451,\n\t"./kn.js": 4451,\n\t"./ko": 3164,\n\t"./ko.js": 3164,\n\t"./ku": 8174,\n\t"./ku-kmr": 6181,\n\t"./ku-kmr.js": 6181,\n\t"./ku.js": 8174,\n\t"./ky": 8474,\n\t"./ky.js": 8474,\n\t"./lb": 9680,\n\t"./lb.js": 9680,\n\t"./lo": 5867,\n\t"./lo.js": 5867,\n\t"./lt": 5766,\n\t"./lt.js": 5766,\n\t"./lv": 9532,\n\t"./lv.js": 9532,\n\t"./me": 8076,\n\t"./me.js": 8076,\n\t"./mi": 1848,\n\t"./mi.js": 1848,\n\t"./mk": 306,\n\t"./mk.js": 306,\n\t"./ml": 3739,\n\t"./ml.js": 3739,\n\t"./mn": 9053,\n\t"./mn.js": 9053,\n\t"./mr": 6169,\n\t"./mr.js": 6169,\n\t"./ms": 3386,\n\t"./ms-my": 2297,\n\t"./ms-my.js": 2297,\n\t"./ms.js": 3386,\n\t"./mt": 7075,\n\t"./mt.js": 7075,\n\t"./my": 2264,\n\t"./my.js": 2264,\n\t"./nb": 2274,\n\t"./nb.js": 2274,\n\t"./ne": 8235,\n\t"./ne.js": 8235,\n\t"./nl": 2572,\n\t"./nl-be": 3784,\n\t"./nl-be.js": 3784,\n\t"./nl.js": 2572,\n\t"./nn": 4566,\n\t"./nn.js": 4566,\n\t"./oc-lnc": 9330,\n\t"./oc-lnc.js": 9330,\n\t"./pa-in": 9849,\n\t"./pa-in.js": 9849,\n\t"./pl": 4418,\n\t"./pl.js": 4418,\n\t"./pt": 9834,\n\t"./pt-br": 684,\n\t"./pt-br.js": 684,\n\t"./pt.js": 9834,\n\t"./ro": 4457,\n\t"./ro.js": 4457,\n\t"./ru": 2271,\n\t"./ru.js": 2271,\n\t"./sd": 1221,\n\t"./sd.js": 1221,\n\t"./se": 3478,\n\t"./se.js": 3478,\n\t"./si": 7538,\n\t"./si.js": 7538,\n\t"./sk": 5784,\n\t"./sk.js": 5784,\n\t"./sl": 6637,\n\t"./sl.js": 6637,\n\t"./sq": 6794,\n\t"./sq.js": 6794,\n\t"./sr": 5719,\n\t"./sr-cyrl": 3322,\n\t"./sr-cyrl.js": 3322,\n\t"./sr.js": 5719,\n\t"./ss": 6000,\n\t"./ss.js": 6000,\n\t"./sv": 1011,\n\t"./sv.js": 1011,\n\t"./sw": 748,\n\t"./sw.js": 748,\n\t"./ta": 1025,\n\t"./ta.js": 1025,\n\t"./te": 1885,\n\t"./te.js": 1885,\n\t"./tet": 8861,\n\t"./tet.js": 8861,\n\t"./tg": 6571,\n\t"./tg.js": 6571,\n\t"./th": 5802,\n\t"./th.js": 5802,\n\t"./tk": 9527,\n\t"./tk.js": 9527,\n\t"./tl-ph": 9231,\n\t"./tl-ph.js": 9231,\n\t"./tlh": 1052,\n\t"./tlh.js": 1052,\n\t"./tr": 5096,\n\t"./tr.js": 5096,\n\t"./tzl": 9846,\n\t"./tzl.js": 9846,\n\t"./tzm": 1765,\n\t"./tzm-latn": 7711,\n\t"./tzm-latn.js": 7711,\n\t"./tzm.js": 1765,\n\t"./ug-cn": 8414,\n\t"./ug-cn.js": 8414,\n\t"./uk": 6618,\n\t"./uk.js": 6618,\n\t"./ur": 158,\n\t"./ur.js": 158,\n\t"./uz": 7609,\n\t"./uz-latn": 4856,\n\t"./uz-latn.js": 4856,\n\t"./uz.js": 7609,\n\t"./vi": 1135,\n\t"./vi.js": 1135,\n\t"./x-pseudo": 4051,\n\t"./x-pseudo.js": 4051,\n\t"./yo": 2218,\n\t"./yo.js": 2218,\n\t"./zh-cn": 2648,\n\t"./zh-cn.js": 2648,\n\t"./zh-hk": 1632,\n\t"./zh-hk.js": 1632,\n\t"./zh-mo": 1541,\n\t"./zh-mo.js": 1541,\n\t"./zh-tw": 304,\n\t"./zh-tw.js": 304\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error("Cannot find module \'" + req + "\'");\n\t\te.code = \'MODULE_NOT_FOUND\';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 5358;\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/locale/_sync_^\\.\\/.*$?', + ); + + /***/ + }, + + /***/ 5093: /***/ function (module, __unused_webpack_exports, __webpack_require__) { + eval( + "/* module decorator */ module = __webpack_require__.nmd(module);\n//! moment.js\n//! version : 2.30.1\n//! authors : Tim Wood, Iskren Chernev, Moment.js contributors\n//! license : MIT\n//! momentjs.com\n\n;(function (global, factory) {\n true ? module.exports = factory() :\n 0\n}(this, (function () { 'use strict';\n\n var hookCallback;\n\n function hooks() {\n return hookCallback.apply(null, arguments);\n }\n\n // This is done to register the method called with moment()\n // without creating circular dependencies.\n function setHookCallback(callback) {\n hookCallback = callback;\n }\n\n function isArray(input) {\n return (\n input instanceof Array ||\n Object.prototype.toString.call(input) === '[object Array]'\n );\n }\n\n function isObject(input) {\n // IE8 will treat undefined and null as object if it wasn't for\n // input != null\n return (\n input != null &&\n Object.prototype.toString.call(input) === '[object Object]'\n );\n }\n\n function hasOwnProp(a, b) {\n return Object.prototype.hasOwnProperty.call(a, b);\n }\n\n function isObjectEmpty(obj) {\n if (Object.getOwnPropertyNames) {\n return Object.getOwnPropertyNames(obj).length === 0;\n } else {\n var k;\n for (k in obj) {\n if (hasOwnProp(obj, k)) {\n return false;\n }\n }\n return true;\n }\n }\n\n function isUndefined(input) {\n return input === void 0;\n }\n\n function isNumber(input) {\n return (\n typeof input === 'number' ||\n Object.prototype.toString.call(input) === '[object Number]'\n );\n }\n\n function isDate(input) {\n return (\n input instanceof Date ||\n Object.prototype.toString.call(input) === '[object Date]'\n );\n }\n\n function map(arr, fn) {\n var res = [],\n i,\n arrLen = arr.length;\n for (i = 0; i < arrLen; ++i) {\n res.push(fn(arr[i], i));\n }\n return res;\n }\n\n function extend(a, b) {\n for (var i in b) {\n if (hasOwnProp(b, i)) {\n a[i] = b[i];\n }\n }\n\n if (hasOwnProp(b, 'toString')) {\n a.toString = b.toString;\n }\n\n if (hasOwnProp(b, 'valueOf')) {\n a.valueOf = b.valueOf;\n }\n\n return a;\n }\n\n function createUTC(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, true).utc();\n }\n\n function defaultParsingFlags() {\n // We need to deep clone this object.\n return {\n empty: false,\n unusedTokens: [],\n unusedInput: [],\n overflow: -2,\n charsLeftOver: 0,\n nullInput: false,\n invalidEra: null,\n invalidMonth: null,\n invalidFormat: false,\n userInvalidated: false,\n iso: false,\n parsedDateParts: [],\n era: null,\n meridiem: null,\n rfc2822: false,\n weekdayMismatch: false,\n };\n }\n\n function getParsingFlags(m) {\n if (m._pf == null) {\n m._pf = defaultParsingFlags();\n }\n return m._pf;\n }\n\n var some;\n if (Array.prototype.some) {\n some = Array.prototype.some;\n } else {\n some = function (fun) {\n var t = Object(this),\n len = t.length >>> 0,\n i;\n\n for (i = 0; i < len; i++) {\n if (i in t && fun.call(this, t[i], i, t)) {\n return true;\n }\n }\n\n return false;\n };\n }\n\n function isValid(m) {\n var flags = null,\n parsedParts = false,\n isNowValid = m._d && !isNaN(m._d.getTime());\n if (isNowValid) {\n flags = getParsingFlags(m);\n parsedParts = some.call(flags.parsedDateParts, function (i) {\n return i != null;\n });\n isNowValid =\n flags.overflow < 0 &&\n !flags.empty &&\n !flags.invalidEra &&\n !flags.invalidMonth &&\n !flags.invalidWeekday &&\n !flags.weekdayMismatch &&\n !flags.nullInput &&\n !flags.invalidFormat &&\n !flags.userInvalidated &&\n (!flags.meridiem || (flags.meridiem && parsedParts));\n if (m._strict) {\n isNowValid =\n isNowValid &&\n flags.charsLeftOver === 0 &&\n flags.unusedTokens.length === 0 &&\n flags.bigHour === undefined;\n }\n }\n if (Object.isFrozen == null || !Object.isFrozen(m)) {\n m._isValid = isNowValid;\n } else {\n return isNowValid;\n }\n return m._isValid;\n }\n\n function createInvalid(flags) {\n var m = createUTC(NaN);\n if (flags != null) {\n extend(getParsingFlags(m), flags);\n } else {\n getParsingFlags(m).userInvalidated = true;\n }\n\n return m;\n }\n\n // Plugins that add properties should also add the key here (null value),\n // so we can properly clone ourselves.\n var momentProperties = (hooks.momentProperties = []),\n updateInProgress = false;\n\n function copyConfig(to, from) {\n var i,\n prop,\n val,\n momentPropertiesLen = momentProperties.length;\n\n if (!isUndefined(from._isAMomentObject)) {\n to._isAMomentObject = from._isAMomentObject;\n }\n if (!isUndefined(from._i)) {\n to._i = from._i;\n }\n if (!isUndefined(from._f)) {\n to._f = from._f;\n }\n if (!isUndefined(from._l)) {\n to._l = from._l;\n }\n if (!isUndefined(from._strict)) {\n to._strict = from._strict;\n }\n if (!isUndefined(from._tzm)) {\n to._tzm = from._tzm;\n }\n if (!isUndefined(from._isUTC)) {\n to._isUTC = from._isUTC;\n }\n if (!isUndefined(from._offset)) {\n to._offset = from._offset;\n }\n if (!isUndefined(from._pf)) {\n to._pf = getParsingFlags(from);\n }\n if (!isUndefined(from._locale)) {\n to._locale = from._locale;\n }\n\n if (momentPropertiesLen > 0) {\n for (i = 0; i < momentPropertiesLen; i++) {\n prop = momentProperties[i];\n val = from[prop];\n if (!isUndefined(val)) {\n to[prop] = val;\n }\n }\n }\n\n return to;\n }\n\n // Moment prototype object\n function Moment(config) {\n copyConfig(this, config);\n this._d = new Date(config._d != null ? config._d.getTime() : NaN);\n if (!this.isValid()) {\n this._d = new Date(NaN);\n }\n // Prevent infinite loop in case updateOffset creates new moment\n // objects.\n if (updateInProgress === false) {\n updateInProgress = true;\n hooks.updateOffset(this);\n updateInProgress = false;\n }\n }\n\n function isMoment(obj) {\n return (\n obj instanceof Moment || (obj != null && obj._isAMomentObject != null)\n );\n }\n\n function warn(msg) {\n if (\n hooks.suppressDeprecationWarnings === false &&\n typeof console !== 'undefined' &&\n console.warn\n ) {\n console.warn('Deprecation warning: ' + msg);\n }\n }\n\n function deprecate(msg, fn) {\n var firstTime = true;\n\n return extend(function () {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(null, msg);\n }\n if (firstTime) {\n var args = [],\n arg,\n i,\n key,\n argLen = arguments.length;\n for (i = 0; i < argLen; i++) {\n arg = '';\n if (typeof arguments[i] === 'object') {\n arg += '\\n[' + i + '] ';\n for (key in arguments[0]) {\n if (hasOwnProp(arguments[0], key)) {\n arg += key + ': ' + arguments[0][key] + ', ';\n }\n }\n arg = arg.slice(0, -2); // Remove trailing comma and space\n } else {\n arg = arguments[i];\n }\n args.push(arg);\n }\n warn(\n msg +\n '\\nArguments: ' +\n Array.prototype.slice.call(args).join('') +\n '\\n' +\n new Error().stack\n );\n firstTime = false;\n }\n return fn.apply(this, arguments);\n }, fn);\n }\n\n var deprecations = {};\n\n function deprecateSimple(name, msg) {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(name, msg);\n }\n if (!deprecations[name]) {\n warn(msg);\n deprecations[name] = true;\n }\n }\n\n hooks.suppressDeprecationWarnings = false;\n hooks.deprecationHandler = null;\n\n function isFunction(input) {\n return (\n (typeof Function !== 'undefined' && input instanceof Function) ||\n Object.prototype.toString.call(input) === '[object Function]'\n );\n }\n\n function set(config) {\n var prop, i;\n for (i in config) {\n if (hasOwnProp(config, i)) {\n prop = config[i];\n if (isFunction(prop)) {\n this[i] = prop;\n } else {\n this['_' + i] = prop;\n }\n }\n }\n this._config = config;\n // Lenient ordinal parsing accepts just a number in addition to\n // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n this._dayOfMonthOrdinalParseLenient = new RegExp(\n (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +\n '|' +\n /\\d{1,2}/.source\n );\n }\n\n function mergeConfigs(parentConfig, childConfig) {\n var res = extend({}, parentConfig),\n prop;\n for (prop in childConfig) {\n if (hasOwnProp(childConfig, prop)) {\n if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {\n res[prop] = {};\n extend(res[prop], parentConfig[prop]);\n extend(res[prop], childConfig[prop]);\n } else if (childConfig[prop] != null) {\n res[prop] = childConfig[prop];\n } else {\n delete res[prop];\n }\n }\n }\n for (prop in parentConfig) {\n if (\n hasOwnProp(parentConfig, prop) &&\n !hasOwnProp(childConfig, prop) &&\n isObject(parentConfig[prop])\n ) {\n // make sure changes to properties don't modify parent config\n res[prop] = extend({}, res[prop]);\n }\n }\n return res;\n }\n\n function Locale(config) {\n if (config != null) {\n this.set(config);\n }\n }\n\n var keys;\n\n if (Object.keys) {\n keys = Object.keys;\n } else {\n keys = function (obj) {\n var i,\n res = [];\n for (i in obj) {\n if (hasOwnProp(obj, i)) {\n res.push(i);\n }\n }\n return res;\n };\n }\n\n var defaultCalendar = {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L',\n };\n\n function calendar(key, mom, now) {\n var output = this._calendar[key] || this._calendar['sameElse'];\n return isFunction(output) ? output.call(mom, now) : output;\n }\n\n function zeroFill(number, targetLength, forceSign) {\n var absNumber = '' + Math.abs(number),\n zerosToFill = targetLength - absNumber.length,\n sign = number >= 0;\n return (\n (sign ? (forceSign ? '+' : '') : '-') +\n Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) +\n absNumber\n );\n }\n\n var formattingTokens =\n /(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,\n localFormattingTokens = /(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g,\n formatFunctions = {},\n formatTokenFunctions = {};\n\n // token: 'M'\n // padded: ['MM', 2]\n // ordinal: 'Mo'\n // callback: function () { this.month() + 1 }\n function addFormatToken(token, padded, ordinal, callback) {\n var func = callback;\n if (typeof callback === 'string') {\n func = function () {\n return this[callback]();\n };\n }\n if (token) {\n formatTokenFunctions[token] = func;\n }\n if (padded) {\n formatTokenFunctions[padded[0]] = function () {\n return zeroFill(func.apply(this, arguments), padded[1], padded[2]);\n };\n }\n if (ordinal) {\n formatTokenFunctions[ordinal] = function () {\n return this.localeData().ordinal(\n func.apply(this, arguments),\n token\n );\n };\n }\n }\n\n function removeFormattingTokens(input) {\n if (input.match(/\\[[\\s\\S]/)) {\n return input.replace(/^\\[|\\]$/g, '');\n }\n return input.replace(/\\\\/g, '');\n }\n\n function makeFormatFunction(format) {\n var array = format.match(formattingTokens),\n i,\n length;\n\n for (i = 0, length = array.length; i < length; i++) {\n if (formatTokenFunctions[array[i]]) {\n array[i] = formatTokenFunctions[array[i]];\n } else {\n array[i] = removeFormattingTokens(array[i]);\n }\n }\n\n return function (mom) {\n var output = '',\n i;\n for (i = 0; i < length; i++) {\n output += isFunction(array[i])\n ? array[i].call(mom, format)\n : array[i];\n }\n return output;\n };\n }\n\n // format date using native date object\n function formatMoment(m, format) {\n if (!m.isValid()) {\n return m.localeData().invalidDate();\n }\n\n format = expandFormat(format, m.localeData());\n formatFunctions[format] =\n formatFunctions[format] || makeFormatFunction(format);\n\n return formatFunctions[format](m);\n }\n\n function expandFormat(format, locale) {\n var i = 5;\n\n function replaceLongDateFormatTokens(input) {\n return locale.longDateFormat(input) || input;\n }\n\n localFormattingTokens.lastIndex = 0;\n while (i >= 0 && localFormattingTokens.test(format)) {\n format = format.replace(\n localFormattingTokens,\n replaceLongDateFormatTokens\n );\n localFormattingTokens.lastIndex = 0;\n i -= 1;\n }\n\n return format;\n }\n\n var defaultLongDateFormat = {\n LTS: 'h:mm:ss A',\n LT: 'h:mm A',\n L: 'MM/DD/YYYY',\n LL: 'MMMM D, YYYY',\n LLL: 'MMMM D, YYYY h:mm A',\n LLLL: 'dddd, MMMM D, YYYY h:mm A',\n };\n\n function longDateFormat(key) {\n var format = this._longDateFormat[key],\n formatUpper = this._longDateFormat[key.toUpperCase()];\n\n if (format || !formatUpper) {\n return format;\n }\n\n this._longDateFormat[key] = formatUpper\n .match(formattingTokens)\n .map(function (tok) {\n if (\n tok === 'MMMM' ||\n tok === 'MM' ||\n tok === 'DD' ||\n tok === 'dddd'\n ) {\n return tok.slice(1);\n }\n return tok;\n })\n .join('');\n\n return this._longDateFormat[key];\n }\n\n var defaultInvalidDate = 'Invalid date';\n\n function invalidDate() {\n return this._invalidDate;\n }\n\n var defaultOrdinal = '%d',\n defaultDayOfMonthOrdinalParse = /\\d{1,2}/;\n\n function ordinal(number) {\n return this._ordinal.replace('%d', number);\n }\n\n var defaultRelativeTime = {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n w: 'a week',\n ww: '%d weeks',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years',\n };\n\n function relativeTime(number, withoutSuffix, string, isFuture) {\n var output = this._relativeTime[string];\n return isFunction(output)\n ? output(number, withoutSuffix, string, isFuture)\n : output.replace(/%d/i, number);\n }\n\n function pastFuture(diff, output) {\n var format = this._relativeTime[diff > 0 ? 'future' : 'past'];\n return isFunction(format) ? format(output) : format.replace(/%s/i, output);\n }\n\n var aliases = {\n D: 'date',\n dates: 'date',\n date: 'date',\n d: 'day',\n days: 'day',\n day: 'day',\n e: 'weekday',\n weekdays: 'weekday',\n weekday: 'weekday',\n E: 'isoWeekday',\n isoweekdays: 'isoWeekday',\n isoweekday: 'isoWeekday',\n DDD: 'dayOfYear',\n dayofyears: 'dayOfYear',\n dayofyear: 'dayOfYear',\n h: 'hour',\n hours: 'hour',\n hour: 'hour',\n ms: 'millisecond',\n milliseconds: 'millisecond',\n millisecond: 'millisecond',\n m: 'minute',\n minutes: 'minute',\n minute: 'minute',\n M: 'month',\n months: 'month',\n month: 'month',\n Q: 'quarter',\n quarters: 'quarter',\n quarter: 'quarter',\n s: 'second',\n seconds: 'second',\n second: 'second',\n gg: 'weekYear',\n weekyears: 'weekYear',\n weekyear: 'weekYear',\n GG: 'isoWeekYear',\n isoweekyears: 'isoWeekYear',\n isoweekyear: 'isoWeekYear',\n w: 'week',\n weeks: 'week',\n week: 'week',\n W: 'isoWeek',\n isoweeks: 'isoWeek',\n isoweek: 'isoWeek',\n y: 'year',\n years: 'year',\n year: 'year',\n };\n\n function normalizeUnits(units) {\n return typeof units === 'string'\n ? aliases[units] || aliases[units.toLowerCase()]\n : undefined;\n }\n\n function normalizeObjectUnits(inputObject) {\n var normalizedInput = {},\n normalizedProp,\n prop;\n\n for (prop in inputObject) {\n if (hasOwnProp(inputObject, prop)) {\n normalizedProp = normalizeUnits(prop);\n if (normalizedProp) {\n normalizedInput[normalizedProp] = inputObject[prop];\n }\n }\n }\n\n return normalizedInput;\n }\n\n var priorities = {\n date: 9,\n day: 11,\n weekday: 11,\n isoWeekday: 11,\n dayOfYear: 4,\n hour: 13,\n millisecond: 16,\n minute: 14,\n month: 8,\n quarter: 7,\n second: 15,\n weekYear: 1,\n isoWeekYear: 1,\n week: 5,\n isoWeek: 5,\n year: 1,\n };\n\n function getPrioritizedUnits(unitsObj) {\n var units = [],\n u;\n for (u in unitsObj) {\n if (hasOwnProp(unitsObj, u)) {\n units.push({ unit: u, priority: priorities[u] });\n }\n }\n units.sort(function (a, b) {\n return a.priority - b.priority;\n });\n return units;\n }\n\n var match1 = /\\d/, // 0 - 9\n match2 = /\\d\\d/, // 00 - 99\n match3 = /\\d{3}/, // 000 - 999\n match4 = /\\d{4}/, // 0000 - 9999\n match6 = /[+-]?\\d{6}/, // -999999 - 999999\n match1to2 = /\\d\\d?/, // 0 - 99\n match3to4 = /\\d\\d\\d\\d?/, // 999 - 9999\n match5to6 = /\\d\\d\\d\\d\\d\\d?/, // 99999 - 999999\n match1to3 = /\\d{1,3}/, // 0 - 999\n match1to4 = /\\d{1,4}/, // 0 - 9999\n match1to6 = /[+-]?\\d{1,6}/, // -999999 - 999999\n matchUnsigned = /\\d+/, // 0 - inf\n matchSigned = /[+-]?\\d+/, // -inf - inf\n matchOffset = /Z|[+-]\\d\\d:?\\d\\d/gi, // +00:00 -00:00 +0000 -0000 or Z\n matchShortOffset = /Z|[+-]\\d\\d(?::?\\d\\d)?/gi, // +00 -00 +00:00 -00:00 +0000 -0000 or Z\n matchTimestamp = /[+-]?\\d+(\\.\\d{1,3})?/, // 123456789 123456789.123\n // any word (or two) characters or numbers including two/three word month in arabic.\n // includes scottish gaelic two word and hyphenated months\n matchWord =\n /[0-9]{0,256}['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFF07\\uFF10-\\uFFEF]{1,256}|[\\u0600-\\u06FF\\/]{1,256}(\\s*?[\\u0600-\\u06FF]{1,256}){1,2}/i,\n match1to2NoLeadingZero = /^[1-9]\\d?/, // 1-99\n match1to2HasZero = /^([1-9]\\d|\\d)/, // 0-99\n regexes;\n\n regexes = {};\n\n function addRegexToken(token, regex, strictRegex) {\n regexes[token] = isFunction(regex)\n ? regex\n : function (isStrict, localeData) {\n return isStrict && strictRegex ? strictRegex : regex;\n };\n }\n\n function getParseRegexForToken(token, config) {\n if (!hasOwnProp(regexes, token)) {\n return new RegExp(unescapeFormat(token));\n }\n\n return regexes[token](config._strict, config._locale);\n }\n\n // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript\n function unescapeFormat(s) {\n return regexEscape(\n s\n .replace('\\\\', '')\n .replace(\n /\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g,\n function (matched, p1, p2, p3, p4) {\n return p1 || p2 || p3 || p4;\n }\n )\n );\n }\n\n function regexEscape(s) {\n return s.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n }\n\n function absFloor(number) {\n if (number < 0) {\n // -0 -> 0\n return Math.ceil(number) || 0;\n } else {\n return Math.floor(number);\n }\n }\n\n function toInt(argumentForCoercion) {\n var coercedNumber = +argumentForCoercion,\n value = 0;\n\n if (coercedNumber !== 0 && isFinite(coercedNumber)) {\n value = absFloor(coercedNumber);\n }\n\n return value;\n }\n\n var tokens = {};\n\n function addParseToken(token, callback) {\n var i,\n func = callback,\n tokenLen;\n if (typeof token === 'string') {\n token = [token];\n }\n if (isNumber(callback)) {\n func = function (input, array) {\n array[callback] = toInt(input);\n };\n }\n tokenLen = token.length;\n for (i = 0; i < tokenLen; i++) {\n tokens[token[i]] = func;\n }\n }\n\n function addWeekParseToken(token, callback) {\n addParseToken(token, function (input, array, config, token) {\n config._w = config._w || {};\n callback(input, config._w, config, token);\n });\n }\n\n function addTimeToArrayFromToken(token, input, config) {\n if (input != null && hasOwnProp(tokens, token)) {\n tokens[token](input, config._a, config, token);\n }\n }\n\n function isLeapYear(year) {\n return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n }\n\n var YEAR = 0,\n MONTH = 1,\n DATE = 2,\n HOUR = 3,\n MINUTE = 4,\n SECOND = 5,\n MILLISECOND = 6,\n WEEK = 7,\n WEEKDAY = 8;\n\n // FORMATTING\n\n addFormatToken('Y', 0, 0, function () {\n var y = this.year();\n return y <= 9999 ? zeroFill(y, 4) : '+' + y;\n });\n\n addFormatToken(0, ['YY', 2], 0, function () {\n return this.year() % 100;\n });\n\n addFormatToken(0, ['YYYY', 4], 0, 'year');\n addFormatToken(0, ['YYYYY', 5], 0, 'year');\n addFormatToken(0, ['YYYYYY', 6, true], 0, 'year');\n\n // PARSING\n\n addRegexToken('Y', matchSigned);\n addRegexToken('YY', match1to2, match2);\n addRegexToken('YYYY', match1to4, match4);\n addRegexToken('YYYYY', match1to6, match6);\n addRegexToken('YYYYYY', match1to6, match6);\n\n addParseToken(['YYYYY', 'YYYYYY'], YEAR);\n addParseToken('YYYY', function (input, array) {\n array[YEAR] =\n input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);\n });\n addParseToken('YY', function (input, array) {\n array[YEAR] = hooks.parseTwoDigitYear(input);\n });\n addParseToken('Y', function (input, array) {\n array[YEAR] = parseInt(input, 10);\n });\n\n // HELPERS\n\n function daysInYear(year) {\n return isLeapYear(year) ? 366 : 365;\n }\n\n // HOOKS\n\n hooks.parseTwoDigitYear = function (input) {\n return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);\n };\n\n // MOMENTS\n\n var getSetYear = makeGetSet('FullYear', true);\n\n function getIsLeapYear() {\n return isLeapYear(this.year());\n }\n\n function makeGetSet(unit, keepTime) {\n return function (value) {\n if (value != null) {\n set$1(this, unit, value);\n hooks.updateOffset(this, keepTime);\n return this;\n } else {\n return get(this, unit);\n }\n };\n }\n\n function get(mom, unit) {\n if (!mom.isValid()) {\n return NaN;\n }\n\n var d = mom._d,\n isUTC = mom._isUTC;\n\n switch (unit) {\n case 'Milliseconds':\n return isUTC ? d.getUTCMilliseconds() : d.getMilliseconds();\n case 'Seconds':\n return isUTC ? d.getUTCSeconds() : d.getSeconds();\n case 'Minutes':\n return isUTC ? d.getUTCMinutes() : d.getMinutes();\n case 'Hours':\n return isUTC ? d.getUTCHours() : d.getHours();\n case 'Date':\n return isUTC ? d.getUTCDate() : d.getDate();\n case 'Day':\n return isUTC ? d.getUTCDay() : d.getDay();\n case 'Month':\n return isUTC ? d.getUTCMonth() : d.getMonth();\n case 'FullYear':\n return isUTC ? d.getUTCFullYear() : d.getFullYear();\n default:\n return NaN; // Just in case\n }\n }\n\n function set$1(mom, unit, value) {\n var d, isUTC, year, month, date;\n\n if (!mom.isValid() || isNaN(value)) {\n return;\n }\n\n d = mom._d;\n isUTC = mom._isUTC;\n\n switch (unit) {\n case 'Milliseconds':\n return void (isUTC\n ? d.setUTCMilliseconds(value)\n : d.setMilliseconds(value));\n case 'Seconds':\n return void (isUTC ? d.setUTCSeconds(value) : d.setSeconds(value));\n case 'Minutes':\n return void (isUTC ? d.setUTCMinutes(value) : d.setMinutes(value));\n case 'Hours':\n return void (isUTC ? d.setUTCHours(value) : d.setHours(value));\n case 'Date':\n return void (isUTC ? d.setUTCDate(value) : d.setDate(value));\n // case 'Day': // Not real\n // return void (isUTC ? d.setUTCDay(value) : d.setDay(value));\n // case 'Month': // Not used because we need to pass two variables\n // return void (isUTC ? d.setUTCMonth(value) : d.setMonth(value));\n case 'FullYear':\n break; // See below ...\n default:\n return; // Just in case\n }\n\n year = value;\n month = mom.month();\n date = mom.date();\n date = date === 29 && month === 1 && !isLeapYear(year) ? 28 : date;\n void (isUTC\n ? d.setUTCFullYear(year, month, date)\n : d.setFullYear(year, month, date));\n }\n\n // MOMENTS\n\n function stringGet(units) {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units]();\n }\n return this;\n }\n\n function stringSet(units, value) {\n if (typeof units === 'object') {\n units = normalizeObjectUnits(units);\n var prioritized = getPrioritizedUnits(units),\n i,\n prioritizedLen = prioritized.length;\n for (i = 0; i < prioritizedLen; i++) {\n this[prioritized[i].unit](units[prioritized[i].unit]);\n }\n } else {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units](value);\n }\n }\n return this;\n }\n\n function mod(n, x) {\n return ((n % x) + x) % x;\n }\n\n var indexOf;\n\n if (Array.prototype.indexOf) {\n indexOf = Array.prototype.indexOf;\n } else {\n indexOf = function (o) {\n // I know\n var i;\n for (i = 0; i < this.length; ++i) {\n if (this[i] === o) {\n return i;\n }\n }\n return -1;\n };\n }\n\n function daysInMonth(year, month) {\n if (isNaN(year) || isNaN(month)) {\n return NaN;\n }\n var modMonth = mod(month, 12);\n year += (month - modMonth) / 12;\n return modMonth === 1\n ? isLeapYear(year)\n ? 29\n : 28\n : 31 - ((modMonth % 7) % 2);\n }\n\n // FORMATTING\n\n addFormatToken('M', ['MM', 2], 'Mo', function () {\n return this.month() + 1;\n });\n\n addFormatToken('MMM', 0, 0, function (format) {\n return this.localeData().monthsShort(this, format);\n });\n\n addFormatToken('MMMM', 0, 0, function (format) {\n return this.localeData().months(this, format);\n });\n\n // PARSING\n\n addRegexToken('M', match1to2, match1to2NoLeadingZero);\n addRegexToken('MM', match1to2, match2);\n addRegexToken('MMM', function (isStrict, locale) {\n return locale.monthsShortRegex(isStrict);\n });\n addRegexToken('MMMM', function (isStrict, locale) {\n return locale.monthsRegex(isStrict);\n });\n\n addParseToken(['M', 'MM'], function (input, array) {\n array[MONTH] = toInt(input) - 1;\n });\n\n addParseToken(['MMM', 'MMMM'], function (input, array, config, token) {\n var month = config._locale.monthsParse(input, token, config._strict);\n // if we didn't find a month name, mark the date as invalid.\n if (month != null) {\n array[MONTH] = month;\n } else {\n getParsingFlags(config).invalidMonth = input;\n }\n });\n\n // LOCALES\n\n var defaultLocaleMonths =\n 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n '_'\n ),\n defaultLocaleMonthsShort =\n 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n MONTHS_IN_FORMAT = /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?/,\n defaultMonthsShortRegex = matchWord,\n defaultMonthsRegex = matchWord;\n\n function localeMonths(m, format) {\n if (!m) {\n return isArray(this._months)\n ? this._months\n : this._months['standalone'];\n }\n return isArray(this._months)\n ? this._months[m.month()]\n : this._months[\n (this._months.isFormat || MONTHS_IN_FORMAT).test(format)\n ? 'format'\n : 'standalone'\n ][m.month()];\n }\n\n function localeMonthsShort(m, format) {\n if (!m) {\n return isArray(this._monthsShort)\n ? this._monthsShort\n : this._monthsShort['standalone'];\n }\n return isArray(this._monthsShort)\n ? this._monthsShort[m.month()]\n : this._monthsShort[\n MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'\n ][m.month()];\n }\n\n function handleStrictParse(monthName, format, strict) {\n var i,\n ii,\n mom,\n llc = monthName.toLocaleLowerCase();\n if (!this._monthsParse) {\n // this is not used\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n for (i = 0; i < 12; ++i) {\n mom = createUTC([2000, i]);\n this._shortMonthsParse[i] = this.monthsShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n }\n\n function localeMonthsParse(monthName, format, strict) {\n var i, mom, regex;\n\n if (this._monthsParseExact) {\n return handleStrictParse.call(this, monthName, format, strict);\n }\n\n if (!this._monthsParse) {\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n }\n\n // TODO: add sorting\n // Sorting makes sure if one month (or abbr) is a prefix of another\n // see sorting in computeMonthsParse\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n if (strict && !this._longMonthsParse[i]) {\n this._longMonthsParse[i] = new RegExp(\n '^' + this.months(mom, '').replace('.', '') + '$',\n 'i'\n );\n this._shortMonthsParse[i] = new RegExp(\n '^' + this.monthsShort(mom, '').replace('.', '') + '$',\n 'i'\n );\n }\n if (!strict && !this._monthsParse[i]) {\n regex =\n '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');\n this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'MMMM' &&\n this._longMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'MMM' &&\n this._shortMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (!strict && this._monthsParse[i].test(monthName)) {\n return i;\n }\n }\n }\n\n // MOMENTS\n\n function setMonth(mom, value) {\n if (!mom.isValid()) {\n // No op\n return mom;\n }\n\n if (typeof value === 'string') {\n if (/^\\d+$/.test(value)) {\n value = toInt(value);\n } else {\n value = mom.localeData().monthsParse(value);\n // TODO: Another silent failure?\n if (!isNumber(value)) {\n return mom;\n }\n }\n }\n\n var month = value,\n date = mom.date();\n\n date = date < 29 ? date : Math.min(date, daysInMonth(mom.year(), month));\n void (mom._isUTC\n ? mom._d.setUTCMonth(month, date)\n : mom._d.setMonth(month, date));\n return mom;\n }\n\n function getSetMonth(value) {\n if (value != null) {\n setMonth(this, value);\n hooks.updateOffset(this, true);\n return this;\n } else {\n return get(this, 'Month');\n }\n }\n\n function getDaysInMonth() {\n return daysInMonth(this.year(), this.month());\n }\n\n function monthsShortRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsShortStrictRegex;\n } else {\n return this._monthsShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsShortRegex')) {\n this._monthsShortRegex = defaultMonthsShortRegex;\n }\n return this._monthsShortStrictRegex && isStrict\n ? this._monthsShortStrictRegex\n : this._monthsShortRegex;\n }\n }\n\n function monthsRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsStrictRegex;\n } else {\n return this._monthsRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsRegex')) {\n this._monthsRegex = defaultMonthsRegex;\n }\n return this._monthsStrictRegex && isStrict\n ? this._monthsStrictRegex\n : this._monthsRegex;\n }\n }\n\n function computeMonthsParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom,\n shortP,\n longP;\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n shortP = regexEscape(this.monthsShort(mom, ''));\n longP = regexEscape(this.months(mom, ''));\n shortPieces.push(shortP);\n longPieces.push(longP);\n mixedPieces.push(longP);\n mixedPieces.push(shortP);\n }\n // Sorting makes sure if one month (or abbr) is a prefix of another it\n // will match the longer piece.\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n\n this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._monthsShortRegex = this._monthsRegex;\n this._monthsStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._monthsShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n }\n\n function createDate(y, m, d, h, M, s, ms) {\n // can't just apply() to create a date:\n // https://stackoverflow.com/q/181348\n var date;\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n date = new Date(y + 400, m, d, h, M, s, ms);\n if (isFinite(date.getFullYear())) {\n date.setFullYear(y);\n }\n } else {\n date = new Date(y, m, d, h, M, s, ms);\n }\n\n return date;\n }\n\n function createUTCDate(y) {\n var date, args;\n // the Date.UTC function remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n args = Array.prototype.slice.call(arguments);\n // preserve leap years using a full 400 year cycle, then reset\n args[0] = y + 400;\n date = new Date(Date.UTC.apply(null, args));\n if (isFinite(date.getUTCFullYear())) {\n date.setUTCFullYear(y);\n }\n } else {\n date = new Date(Date.UTC.apply(null, arguments));\n }\n\n return date;\n }\n\n // start-of-first-week - start-of-year\n function firstWeekOffset(year, dow, doy) {\n var // first-week day -- which january is always in the first week (4 for iso, 1 for other)\n fwd = 7 + dow - doy,\n // first-week day local weekday -- which local weekday is fwd\n fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;\n\n return -fwdlw + fwd - 1;\n }\n\n // https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday\n function dayOfYearFromWeeks(year, week, weekday, dow, doy) {\n var localWeekday = (7 + weekday - dow) % 7,\n weekOffset = firstWeekOffset(year, dow, doy),\n dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,\n resYear,\n resDayOfYear;\n\n if (dayOfYear <= 0) {\n resYear = year - 1;\n resDayOfYear = daysInYear(resYear) + dayOfYear;\n } else if (dayOfYear > daysInYear(year)) {\n resYear = year + 1;\n resDayOfYear = dayOfYear - daysInYear(year);\n } else {\n resYear = year;\n resDayOfYear = dayOfYear;\n }\n\n return {\n year: resYear,\n dayOfYear: resDayOfYear,\n };\n }\n\n function weekOfYear(mom, dow, doy) {\n var weekOffset = firstWeekOffset(mom.year(), dow, doy),\n week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,\n resWeek,\n resYear;\n\n if (week < 1) {\n resYear = mom.year() - 1;\n resWeek = week + weeksInYear(resYear, dow, doy);\n } else if (week > weeksInYear(mom.year(), dow, doy)) {\n resWeek = week - weeksInYear(mom.year(), dow, doy);\n resYear = mom.year() + 1;\n } else {\n resYear = mom.year();\n resWeek = week;\n }\n\n return {\n week: resWeek,\n year: resYear,\n };\n }\n\n function weeksInYear(year, dow, doy) {\n var weekOffset = firstWeekOffset(year, dow, doy),\n weekOffsetNext = firstWeekOffset(year + 1, dow, doy);\n return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;\n }\n\n // FORMATTING\n\n addFormatToken('w', ['ww', 2], 'wo', 'week');\n addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');\n\n // PARSING\n\n addRegexToken('w', match1to2, match1to2NoLeadingZero);\n addRegexToken('ww', match1to2, match2);\n addRegexToken('W', match1to2, match1to2NoLeadingZero);\n addRegexToken('WW', match1to2, match2);\n\n addWeekParseToken(\n ['w', 'ww', 'W', 'WW'],\n function (input, week, config, token) {\n week[token.substr(0, 1)] = toInt(input);\n }\n );\n\n // HELPERS\n\n // LOCALES\n\n function localeWeek(mom) {\n return weekOfYear(mom, this._week.dow, this._week.doy).week;\n }\n\n var defaultLocaleWeek = {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n };\n\n function localeFirstDayOfWeek() {\n return this._week.dow;\n }\n\n function localeFirstDayOfYear() {\n return this._week.doy;\n }\n\n // MOMENTS\n\n function getSetWeek(input) {\n var week = this.localeData().week(this);\n return input == null ? week : this.add((input - week) * 7, 'd');\n }\n\n function getSetISOWeek(input) {\n var week = weekOfYear(this, 1, 4).week;\n return input == null ? week : this.add((input - week) * 7, 'd');\n }\n\n // FORMATTING\n\n addFormatToken('d', 0, 'do', 'day');\n\n addFormatToken('dd', 0, 0, function (format) {\n return this.localeData().weekdaysMin(this, format);\n });\n\n addFormatToken('ddd', 0, 0, function (format) {\n return this.localeData().weekdaysShort(this, format);\n });\n\n addFormatToken('dddd', 0, 0, function (format) {\n return this.localeData().weekdays(this, format);\n });\n\n addFormatToken('e', 0, 0, 'weekday');\n addFormatToken('E', 0, 0, 'isoWeekday');\n\n // PARSING\n\n addRegexToken('d', match1to2);\n addRegexToken('e', match1to2);\n addRegexToken('E', match1to2);\n addRegexToken('dd', function (isStrict, locale) {\n return locale.weekdaysMinRegex(isStrict);\n });\n addRegexToken('ddd', function (isStrict, locale) {\n return locale.weekdaysShortRegex(isStrict);\n });\n addRegexToken('dddd', function (isStrict, locale) {\n return locale.weekdaysRegex(isStrict);\n });\n\n addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {\n var weekday = config._locale.weekdaysParse(input, token, config._strict);\n // if we didn't get a weekday name, mark the date as invalid\n if (weekday != null) {\n week.d = weekday;\n } else {\n getParsingFlags(config).invalidWeekday = input;\n }\n });\n\n addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {\n week[token] = toInt(input);\n });\n\n // HELPERS\n\n function parseWeekday(input, locale) {\n if (typeof input !== 'string') {\n return input;\n }\n\n if (!isNaN(input)) {\n return parseInt(input, 10);\n }\n\n input = locale.weekdaysParse(input);\n if (typeof input === 'number') {\n return input;\n }\n\n return null;\n }\n\n function parseIsoWeekday(input, locale) {\n if (typeof input === 'string') {\n return locale.weekdaysParse(input) % 7 || 7;\n }\n return isNaN(input) ? null : input;\n }\n\n // LOCALES\n function shiftWeekdays(ws, n) {\n return ws.slice(n, 7).concat(ws.slice(0, n));\n }\n\n var defaultLocaleWeekdays =\n 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n defaultWeekdaysRegex = matchWord,\n defaultWeekdaysShortRegex = matchWord,\n defaultWeekdaysMinRegex = matchWord;\n\n function localeWeekdays(m, format) {\n var weekdays = isArray(this._weekdays)\n ? this._weekdays\n : this._weekdays[\n m && m !== true && this._weekdays.isFormat.test(format)\n ? 'format'\n : 'standalone'\n ];\n return m === true\n ? shiftWeekdays(weekdays, this._week.dow)\n : m\n ? weekdays[m.day()]\n : weekdays;\n }\n\n function localeWeekdaysShort(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysShort, this._week.dow)\n : m\n ? this._weekdaysShort[m.day()]\n : this._weekdaysShort;\n }\n\n function localeWeekdaysMin(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysMin, this._week.dow)\n : m\n ? this._weekdaysMin[m.day()]\n : this._weekdaysMin;\n }\n\n function handleStrictParse$1(weekdayName, format, strict) {\n var i,\n ii,\n mom,\n llc = weekdayName.toLocaleLowerCase();\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._minWeekdaysParse = [];\n\n for (i = 0; i < 7; ++i) {\n mom = createUTC([2000, 1]).day(i);\n this._minWeekdaysParse[i] = this.weekdaysMin(\n mom,\n ''\n ).toLocaleLowerCase();\n this._shortWeekdaysParse[i] = this.weekdaysShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n }\n\n function localeWeekdaysParse(weekdayName, format, strict) {\n var i, mom, regex;\n\n if (this._weekdaysParseExact) {\n return handleStrictParse$1.call(this, weekdayName, format, strict);\n }\n\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._minWeekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._fullWeekdaysParse = [];\n }\n\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n\n mom = createUTC([2000, 1]).day(i);\n if (strict && !this._fullWeekdaysParse[i]) {\n this._fullWeekdaysParse[i] = new RegExp(\n '^' + this.weekdays(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._shortWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysShort(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._minWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysMin(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n }\n if (!this._weekdaysParse[i]) {\n regex =\n '^' +\n this.weekdays(mom, '') +\n '|^' +\n this.weekdaysShort(mom, '') +\n '|^' +\n this.weekdaysMin(mom, '');\n this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'dddd' &&\n this._fullWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'ddd' &&\n this._shortWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'dd' &&\n this._minWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {\n return i;\n }\n }\n }\n\n // MOMENTS\n\n function getSetDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n var day = get(this, 'Day');\n if (input != null) {\n input = parseWeekday(input, this.localeData());\n return this.add(input - day, 'd');\n } else {\n return day;\n }\n }\n\n function getSetLocaleDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;\n return input == null ? weekday : this.add(input - weekday, 'd');\n }\n\n function getSetISODayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n // behaves the same as moment#day except\n // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)\n // as a setter, sunday should belong to the previous week.\n\n if (input != null) {\n var weekday = parseIsoWeekday(input, this.localeData());\n return this.day(this.day() % 7 ? weekday : weekday - 7);\n } else {\n return this.day() || 7;\n }\n }\n\n function weekdaysRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysStrictRegex;\n } else {\n return this._weekdaysRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n this._weekdaysRegex = defaultWeekdaysRegex;\n }\n return this._weekdaysStrictRegex && isStrict\n ? this._weekdaysStrictRegex\n : this._weekdaysRegex;\n }\n }\n\n function weekdaysShortRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysShortStrictRegex;\n } else {\n return this._weekdaysShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysShortRegex')) {\n this._weekdaysShortRegex = defaultWeekdaysShortRegex;\n }\n return this._weekdaysShortStrictRegex && isStrict\n ? this._weekdaysShortStrictRegex\n : this._weekdaysShortRegex;\n }\n }\n\n function weekdaysMinRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysMinStrictRegex;\n } else {\n return this._weekdaysMinRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysMinRegex')) {\n this._weekdaysMinRegex = defaultWeekdaysMinRegex;\n }\n return this._weekdaysMinStrictRegex && isStrict\n ? this._weekdaysMinStrictRegex\n : this._weekdaysMinRegex;\n }\n }\n\n function computeWeekdaysParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var minPieces = [],\n shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom,\n minp,\n shortp,\n longp;\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, 1]).day(i);\n minp = regexEscape(this.weekdaysMin(mom, ''));\n shortp = regexEscape(this.weekdaysShort(mom, ''));\n longp = regexEscape(this.weekdays(mom, ''));\n minPieces.push(minp);\n shortPieces.push(shortp);\n longPieces.push(longp);\n mixedPieces.push(minp);\n mixedPieces.push(shortp);\n mixedPieces.push(longp);\n }\n // Sorting makes sure if one weekday (or abbr) is a prefix of another it\n // will match the longer piece.\n minPieces.sort(cmpLenRev);\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n\n this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._weekdaysShortRegex = this._weekdaysRegex;\n this._weekdaysMinRegex = this._weekdaysRegex;\n\n this._weekdaysStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysMinStrictRegex = new RegExp(\n '^(' + minPieces.join('|') + ')',\n 'i'\n );\n }\n\n // FORMATTING\n\n function hFormat() {\n return this.hours() % 12 || 12;\n }\n\n function kFormat() {\n return this.hours() || 24;\n }\n\n addFormatToken('H', ['HH', 2], 0, 'hour');\n addFormatToken('h', ['hh', 2], 0, hFormat);\n addFormatToken('k', ['kk', 2], 0, kFormat);\n\n addFormatToken('hmm', 0, 0, function () {\n return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);\n });\n\n addFormatToken('hmmss', 0, 0, function () {\n return (\n '' +\n hFormat.apply(this) +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n });\n\n addFormatToken('Hmm', 0, 0, function () {\n return '' + this.hours() + zeroFill(this.minutes(), 2);\n });\n\n addFormatToken('Hmmss', 0, 0, function () {\n return (\n '' +\n this.hours() +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n });\n\n function meridiem(token, lowercase) {\n addFormatToken(token, 0, 0, function () {\n return this.localeData().meridiem(\n this.hours(),\n this.minutes(),\n lowercase\n );\n });\n }\n\n meridiem('a', true);\n meridiem('A', false);\n\n // PARSING\n\n function matchMeridiem(isStrict, locale) {\n return locale._meridiemParse;\n }\n\n addRegexToken('a', matchMeridiem);\n addRegexToken('A', matchMeridiem);\n addRegexToken('H', match1to2, match1to2HasZero);\n addRegexToken('h', match1to2, match1to2NoLeadingZero);\n addRegexToken('k', match1to2, match1to2NoLeadingZero);\n addRegexToken('HH', match1to2, match2);\n addRegexToken('hh', match1to2, match2);\n addRegexToken('kk', match1to2, match2);\n\n addRegexToken('hmm', match3to4);\n addRegexToken('hmmss', match5to6);\n addRegexToken('Hmm', match3to4);\n addRegexToken('Hmmss', match5to6);\n\n addParseToken(['H', 'HH'], HOUR);\n addParseToken(['k', 'kk'], function (input, array, config) {\n var kInput = toInt(input);\n array[HOUR] = kInput === 24 ? 0 : kInput;\n });\n addParseToken(['a', 'A'], function (input, array, config) {\n config._isPm = config._locale.isPM(input);\n config._meridiem = input;\n });\n addParseToken(['h', 'hh'], function (input, array, config) {\n array[HOUR] = toInt(input);\n getParsingFlags(config).bigHour = true;\n });\n addParseToken('hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n getParsingFlags(config).bigHour = true;\n });\n addParseToken('hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n getParsingFlags(config).bigHour = true;\n });\n addParseToken('Hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n });\n addParseToken('Hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n });\n\n // LOCALES\n\n function localeIsPM(input) {\n // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays\n // Using charAt should be more compatible.\n return (input + '').toLowerCase().charAt(0) === 'p';\n }\n\n var defaultLocaleMeridiemParse = /[ap]\\.?m?\\.?/i,\n // Setting the hour should keep the time, because the user explicitly\n // specified which hour they want. So trying to maintain the same hour (in\n // a new timezone) makes sense. Adding/subtracting hours does not follow\n // this rule.\n getSetHour = makeGetSet('Hours', true);\n\n function localeMeridiem(hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'pm' : 'PM';\n } else {\n return isLower ? 'am' : 'AM';\n }\n }\n\n var baseConfig = {\n calendar: defaultCalendar,\n longDateFormat: defaultLongDateFormat,\n invalidDate: defaultInvalidDate,\n ordinal: defaultOrdinal,\n dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,\n relativeTime: defaultRelativeTime,\n\n months: defaultLocaleMonths,\n monthsShort: defaultLocaleMonthsShort,\n\n week: defaultLocaleWeek,\n\n weekdays: defaultLocaleWeekdays,\n weekdaysMin: defaultLocaleWeekdaysMin,\n weekdaysShort: defaultLocaleWeekdaysShort,\n\n meridiemParse: defaultLocaleMeridiemParse,\n };\n\n // internal storage for locale config files\n var locales = {},\n localeFamilies = {},\n globalLocale;\n\n function commonPrefix(arr1, arr2) {\n var i,\n minl = Math.min(arr1.length, arr2.length);\n for (i = 0; i < minl; i += 1) {\n if (arr1[i] !== arr2[i]) {\n return i;\n }\n }\n return minl;\n }\n\n function normalizeLocale(key) {\n return key ? key.toLowerCase().replace('_', '-') : key;\n }\n\n // pick the locale from the array\n // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each\n // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root\n function chooseLocale(names) {\n var i = 0,\n j,\n next,\n locale,\n split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (\n next &&\n next.length >= j &&\n commonPrefix(split, next) >= j - 1\n ) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return globalLocale;\n }\n\n function isLocaleNameSane(name) {\n // Prevent names that look like filesystem paths, i.e contain '/' or '\\'\n // Ensure name is available and function returns boolean\n return !!(name && name.match('^[^/\\\\\\\\]*$'));\n }\n\n function loadLocale(name) {\n var oldLocale = null,\n aliasedRequire;\n // TODO: Find a better way to register and load all the locales in Node\n if (\n locales[name] === undefined &&\n \"object\" !== 'undefined' &&\n module &&\n module.exports &&\n isLocaleNameSane(name)\n ) {\n try {\n oldLocale = globalLocale._abbr;\n aliasedRequire = undefined;\n __webpack_require__(5358)(\"./\" + name);\n getSetGlobalLocale(oldLocale);\n } catch (e) {\n // mark as not found to avoid repeating expensive file require call causing high CPU\n // when trying to find en-US, en_US, en-us for every format call\n locales[name] = null; // null means not found\n }\n }\n return locales[name];\n }\n\n // This function will load locale and then set the global locale. If\n // no arguments are passed in, it will simply return the current global\n // locale key.\n function getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn(\n 'Locale ' + key + ' not found. Did you forget to load it?'\n );\n }\n }\n }\n\n return globalLocale._abbr;\n }\n\n function defineLocale(name, config) {\n if (config !== null) {\n var locale,\n parentConfig = baseConfig;\n config.abbr = name;\n if (locales[name] != null) {\n deprecateSimple(\n 'defineLocaleOverride',\n 'use moment.updateLocale(localeName, config) to change ' +\n 'an existing locale. moment.defineLocale(localeName, ' +\n 'config) should only be used for creating a new locale ' +\n 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'\n );\n parentConfig = locales[name]._config;\n } else if (config.parentLocale != null) {\n if (locales[config.parentLocale] != null) {\n parentConfig = locales[config.parentLocale]._config;\n } else {\n locale = loadLocale(config.parentLocale);\n if (locale != null) {\n parentConfig = locale._config;\n } else {\n if (!localeFamilies[config.parentLocale]) {\n localeFamilies[config.parentLocale] = [];\n }\n localeFamilies[config.parentLocale].push({\n name: name,\n config: config,\n });\n return null;\n }\n }\n }\n locales[name] = new Locale(mergeConfigs(parentConfig, config));\n\n if (localeFamilies[name]) {\n localeFamilies[name].forEach(function (x) {\n defineLocale(x.name, x.config);\n });\n }\n\n // backwards compat for now: also set the locale\n // make sure we set the locale AFTER all child locales have been\n // created, so we won't end up with the child locale set.\n getSetGlobalLocale(name);\n\n return locales[name];\n } else {\n // useful for testing\n delete locales[name];\n return null;\n }\n }\n\n function updateLocale(name, config) {\n if (config != null) {\n var locale,\n tmpLocale,\n parentConfig = baseConfig;\n\n if (locales[name] != null && locales[name].parentLocale != null) {\n // Update existing child locale in-place to avoid memory-leaks\n locales[name].set(mergeConfigs(locales[name]._config, config));\n } else {\n // MERGE\n tmpLocale = loadLocale(name);\n if (tmpLocale != null) {\n parentConfig = tmpLocale._config;\n }\n config = mergeConfigs(parentConfig, config);\n if (tmpLocale == null) {\n // updateLocale is called for creating a new locale\n // Set abbr so it will have a name (getters return\n // undefined otherwise).\n config.abbr = name;\n }\n locale = new Locale(config);\n locale.parentLocale = locales[name];\n locales[name] = locale;\n }\n\n // backwards compat for now: also set the locale\n getSetGlobalLocale(name);\n } else {\n // pass null for config to unupdate, useful for tests\n if (locales[name] != null) {\n if (locales[name].parentLocale != null) {\n locales[name] = locales[name].parentLocale;\n if (name === getSetGlobalLocale()) {\n getSetGlobalLocale(name);\n }\n } else if (locales[name] != null) {\n delete locales[name];\n }\n }\n }\n return locales[name];\n }\n\n // returns locale data\n function getLocale(key) {\n var locale;\n\n if (key && key._locale && key._locale._abbr) {\n key = key._locale._abbr;\n }\n\n if (!key) {\n return globalLocale;\n }\n\n if (!isArray(key)) {\n //short-circuit everything else\n locale = loadLocale(key);\n if (locale) {\n return locale;\n }\n key = [key];\n }\n\n return chooseLocale(key);\n }\n\n function listLocales() {\n return keys(locales);\n }\n\n function checkOverflow(m) {\n var overflow,\n a = m._a;\n\n if (a && getParsingFlags(m).overflow === -2) {\n overflow =\n a[MONTH] < 0 || a[MONTH] > 11\n ? MONTH\n : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH])\n ? DATE\n : a[HOUR] < 0 ||\n a[HOUR] > 24 ||\n (a[HOUR] === 24 &&\n (a[MINUTE] !== 0 ||\n a[SECOND] !== 0 ||\n a[MILLISECOND] !== 0))\n ? HOUR\n : a[MINUTE] < 0 || a[MINUTE] > 59\n ? MINUTE\n : a[SECOND] < 0 || a[SECOND] > 59\n ? SECOND\n : a[MILLISECOND] < 0 || a[MILLISECOND] > 999\n ? MILLISECOND\n : -1;\n\n if (\n getParsingFlags(m)._overflowDayOfYear &&\n (overflow < YEAR || overflow > DATE)\n ) {\n overflow = DATE;\n }\n if (getParsingFlags(m)._overflowWeeks && overflow === -1) {\n overflow = WEEK;\n }\n if (getParsingFlags(m)._overflowWeekday && overflow === -1) {\n overflow = WEEKDAY;\n }\n\n getParsingFlags(m).overflow = overflow;\n }\n\n return m;\n }\n\n // iso 8601 regex\n // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)\n var extendedIsoRegex =\n /^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n basicIsoRegex =\n /^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d|))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n tzRegex = /Z|[+-]\\d\\d(?::?\\d\\d)?/,\n isoDates = [\n ['YYYYYY-MM-DD', /[+-]\\d{6}-\\d\\d-\\d\\d/],\n ['YYYY-MM-DD', /\\d{4}-\\d\\d-\\d\\d/],\n ['GGGG-[W]WW-E', /\\d{4}-W\\d\\d-\\d/],\n ['GGGG-[W]WW', /\\d{4}-W\\d\\d/, false],\n ['YYYY-DDD', /\\d{4}-\\d{3}/],\n ['YYYY-MM', /\\d{4}-\\d\\d/, false],\n ['YYYYYYMMDD', /[+-]\\d{10}/],\n ['YYYYMMDD', /\\d{8}/],\n ['GGGG[W]WWE', /\\d{4}W\\d{3}/],\n ['GGGG[W]WW', /\\d{4}W\\d{2}/, false],\n ['YYYYDDD', /\\d{7}/],\n ['YYYYMM', /\\d{6}/, false],\n ['YYYY', /\\d{4}/, false],\n ],\n // iso time formats and regexes\n isoTimes = [\n ['HH:mm:ss.SSSS', /\\d\\d:\\d\\d:\\d\\d\\.\\d+/],\n ['HH:mm:ss,SSSS', /\\d\\d:\\d\\d:\\d\\d,\\d+/],\n ['HH:mm:ss', /\\d\\d:\\d\\d:\\d\\d/],\n ['HH:mm', /\\d\\d:\\d\\d/],\n ['HHmmss.SSSS', /\\d\\d\\d\\d\\d\\d\\.\\d+/],\n ['HHmmss,SSSS', /\\d\\d\\d\\d\\d\\d,\\d+/],\n ['HHmmss', /\\d\\d\\d\\d\\d\\d/],\n ['HHmm', /\\d\\d\\d\\d/],\n ['HH', /\\d\\d/],\n ],\n aspNetJsonRegex = /^\\/?Date\\((-?\\d+)/i,\n // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3\n rfc2822 =\n /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\\d{4}))$/,\n obsOffsets = {\n UT: 0,\n GMT: 0,\n EDT: -4 * 60,\n EST: -5 * 60,\n CDT: -5 * 60,\n CST: -6 * 60,\n MDT: -6 * 60,\n MST: -7 * 60,\n PDT: -7 * 60,\n PST: -8 * 60,\n };\n\n // date from iso format\n function configFromISO(config) {\n var i,\n l,\n string = config._i,\n match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),\n allowTime,\n dateFormat,\n timeFormat,\n tzFormat,\n isoDatesLen = isoDates.length,\n isoTimesLen = isoTimes.length;\n\n if (match) {\n getParsingFlags(config).iso = true;\n for (i = 0, l = isoDatesLen; i < l; i++) {\n if (isoDates[i][1].exec(match[1])) {\n dateFormat = isoDates[i][0];\n allowTime = isoDates[i][2] !== false;\n break;\n }\n }\n if (dateFormat == null) {\n config._isValid = false;\n return;\n }\n if (match[3]) {\n for (i = 0, l = isoTimesLen; i < l; i++) {\n if (isoTimes[i][1].exec(match[3])) {\n // match[2] should be 'T' or space\n timeFormat = (match[2] || ' ') + isoTimes[i][0];\n break;\n }\n }\n if (timeFormat == null) {\n config._isValid = false;\n return;\n }\n }\n if (!allowTime && timeFormat != null) {\n config._isValid = false;\n return;\n }\n if (match[4]) {\n if (tzRegex.exec(match[4])) {\n tzFormat = 'Z';\n } else {\n config._isValid = false;\n return;\n }\n }\n config._f = dateFormat + (timeFormat || '') + (tzFormat || '');\n configFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n }\n\n function extractFromRFC2822Strings(\n yearStr,\n monthStr,\n dayStr,\n hourStr,\n minuteStr,\n secondStr\n ) {\n var result = [\n untruncateYear(yearStr),\n defaultLocaleMonthsShort.indexOf(monthStr),\n parseInt(dayStr, 10),\n parseInt(hourStr, 10),\n parseInt(minuteStr, 10),\n ];\n\n if (secondStr) {\n result.push(parseInt(secondStr, 10));\n }\n\n return result;\n }\n\n function untruncateYear(yearStr) {\n var year = parseInt(yearStr, 10);\n if (year <= 49) {\n return 2000 + year;\n } else if (year <= 999) {\n return 1900 + year;\n }\n return year;\n }\n\n function preprocessRFC2822(s) {\n // Remove comments and folding whitespace and replace multiple-spaces with a single space\n return s\n .replace(/\\([^()]*\\)|[\\n\\t]/g, ' ')\n .replace(/(\\s\\s+)/g, ' ')\n .replace(/^\\s\\s*/, '')\n .replace(/\\s\\s*$/, '');\n }\n\n function checkWeekday(weekdayStr, parsedInput, config) {\n if (weekdayStr) {\n // TODO: Replace the vanilla JS Date object with an independent day-of-week check.\n var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),\n weekdayActual = new Date(\n parsedInput[0],\n parsedInput[1],\n parsedInput[2]\n ).getDay();\n if (weekdayProvided !== weekdayActual) {\n getParsingFlags(config).weekdayMismatch = true;\n config._isValid = false;\n return false;\n }\n }\n return true;\n }\n\n function calculateOffset(obsOffset, militaryOffset, numOffset) {\n if (obsOffset) {\n return obsOffsets[obsOffset];\n } else if (militaryOffset) {\n // the only allowed military tz is Z\n return 0;\n } else {\n var hm = parseInt(numOffset, 10),\n m = hm % 100,\n h = (hm - m) / 100;\n return h * 60 + m;\n }\n }\n\n // date and time from ref 2822 format\n function configFromRFC2822(config) {\n var match = rfc2822.exec(preprocessRFC2822(config._i)),\n parsedArray;\n if (match) {\n parsedArray = extractFromRFC2822Strings(\n match[4],\n match[3],\n match[2],\n match[5],\n match[6],\n match[7]\n );\n if (!checkWeekday(match[1], parsedArray, config)) {\n return;\n }\n\n config._a = parsedArray;\n config._tzm = calculateOffset(match[8], match[9], match[10]);\n\n config._d = createUTCDate.apply(null, config._a);\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n\n getParsingFlags(config).rfc2822 = true;\n } else {\n config._isValid = false;\n }\n }\n\n // date from 1) ASP.NET, 2) ISO, 3) RFC 2822 formats, or 4) optional fallback if parsing isn't strict\n function configFromString(config) {\n var matched = aspNetJsonRegex.exec(config._i);\n if (matched !== null) {\n config._d = new Date(+matched[1]);\n return;\n }\n\n configFromISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n configFromRFC2822(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n if (config._strict) {\n config._isValid = false;\n } else {\n // Final attempt, use Input Fallback\n hooks.createFromInputFallback(config);\n }\n }\n\n hooks.createFromInputFallback = deprecate(\n 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +\n 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +\n 'discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.',\n function (config) {\n config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));\n }\n );\n\n // Pick the first defined of two or three arguments.\n function defaults(a, b, c) {\n if (a != null) {\n return a;\n }\n if (b != null) {\n return b;\n }\n return c;\n }\n\n function currentDateArray(config) {\n // hooks is actually the exported moment object\n var nowValue = new Date(hooks.now());\n if (config._useUTC) {\n return [\n nowValue.getUTCFullYear(),\n nowValue.getUTCMonth(),\n nowValue.getUTCDate(),\n ];\n }\n return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];\n }\n\n // convert an array to a date.\n // the array should mirror the parameters below\n // note: all values past the year are optional and will default to the lowest possible value.\n // [year, month, day , hour, minute, second, millisecond]\n function configFromArray(config) {\n var i,\n date,\n input = [],\n currentDate,\n expectedWeekday,\n yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear != null) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (\n config._dayOfYear > daysInYear(yearToUse) ||\n config._dayOfYear === 0\n ) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] =\n config._a[i] == null ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (\n config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0\n ) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(\n null,\n input\n );\n expectedWeekday = config._useUTC\n ? config._d.getUTCDay()\n : config._d.getDay();\n\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n\n // check for mismatching day of week\n if (\n config._w &&\n typeof config._w.d !== 'undefined' &&\n config._w.d !== expectedWeekday\n ) {\n getParsingFlags(config).weekdayMismatch = true;\n }\n }\n\n function dayOfYearFromWeekInfo(config) {\n var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek;\n\n w = config._w;\n if (w.GG != null || w.W != null || w.E != null) {\n dow = 1;\n doy = 4;\n\n // TODO: We need to take the current isoWeekYear, but that depends on\n // how we interpret now (local, utc, fixed offset). So create\n // a now version of current config (take local/utc/offset flags, and\n // create now).\n weekYear = defaults(\n w.GG,\n config._a[YEAR],\n weekOfYear(createLocal(), 1, 4).year\n );\n week = defaults(w.W, 1);\n weekday = defaults(w.E, 1);\n if (weekday < 1 || weekday > 7) {\n weekdayOverflow = true;\n }\n } else {\n dow = config._locale._week.dow;\n doy = config._locale._week.doy;\n\n curWeek = weekOfYear(createLocal(), dow, doy);\n\n weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);\n\n // Default to current week.\n week = defaults(w.w, curWeek.week);\n\n if (w.d != null) {\n // weekday -- low day numbers are considered next week\n weekday = w.d;\n if (weekday < 0 || weekday > 6) {\n weekdayOverflow = true;\n }\n } else if (w.e != null) {\n // local weekday -- counting starts from beginning of week\n weekday = w.e + dow;\n if (w.e < 0 || w.e > 6) {\n weekdayOverflow = true;\n }\n } else {\n // default to beginning of week\n weekday = dow;\n }\n }\n if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {\n getParsingFlags(config)._overflowWeeks = true;\n } else if (weekdayOverflow != null) {\n getParsingFlags(config)._overflowWeekday = true;\n } else {\n temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);\n config._a[YEAR] = temp.year;\n config._dayOfYear = temp.dayOfYear;\n }\n }\n\n // constant that refers to the ISO standard\n hooks.ISO_8601 = function () {};\n\n // constant that refers to the RFC 2822 form\n hooks.RFC_2822 = function () {};\n\n // date from string and format string\n function configFromStringAndFormat(config) {\n // TODO: Move this to another part of the creation flow to prevent circular deps\n if (config._f === hooks.ISO_8601) {\n configFromISO(config);\n return;\n }\n if (config._f === hooks.RFC_2822) {\n configFromRFC2822(config);\n return;\n }\n config._a = [];\n getParsingFlags(config).empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i,\n parsedInput,\n tokens,\n token,\n skipped,\n stringLength = string.length,\n totalParsedInputLength = 0,\n era,\n tokenLen;\n\n tokens =\n expandFormat(config._f, config._locale).match(formattingTokens) || [];\n tokenLen = tokens.length;\n for (i = 0; i < tokenLen; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) ||\n [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n getParsingFlags(config).unusedInput.push(skipped);\n }\n string = string.slice(\n string.indexOf(parsedInput) + parsedInput.length\n );\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n getParsingFlags(config).empty = false;\n } else {\n getParsingFlags(config).unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n } else if (config._strict && !parsedInput) {\n getParsingFlags(config).unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n getParsingFlags(config).charsLeftOver =\n stringLength - totalParsedInputLength;\n if (string.length > 0) {\n getParsingFlags(config).unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (\n config._a[HOUR] <= 12 &&\n getParsingFlags(config).bigHour === true &&\n config._a[HOUR] > 0\n ) {\n getParsingFlags(config).bigHour = undefined;\n }\n\n getParsingFlags(config).parsedDateParts = config._a.slice(0);\n getParsingFlags(config).meridiem = config._meridiem;\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(\n config._locale,\n config._a[HOUR],\n config._meridiem\n );\n\n // handle era\n era = getParsingFlags(config).era;\n if (era !== null) {\n config._a[YEAR] = config._locale.erasConvertYear(era, config._a[YEAR]);\n }\n\n configFromArray(config);\n checkOverflow(config);\n }\n\n function meridiemFixWrap(locale, hour, meridiem) {\n var isPm;\n\n if (meridiem == null) {\n // nothing to do\n return hour;\n }\n if (locale.meridiemHour != null) {\n return locale.meridiemHour(hour, meridiem);\n } else if (locale.isPM != null) {\n // Fallback\n isPm = locale.isPM(meridiem);\n if (isPm && hour < 12) {\n hour += 12;\n }\n if (!isPm && hour === 12) {\n hour = 0;\n }\n return hour;\n } else {\n // this is not supposed to happen\n return hour;\n }\n }\n\n // date from string and array of format strings\n function configFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n scoreToBeat,\n i,\n currentScore,\n validFormatFound,\n bestFormatIsValid = false,\n configfLen = config._f.length;\n\n if (configfLen === 0) {\n getParsingFlags(config).invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < configfLen; i++) {\n currentScore = 0;\n validFormatFound = false;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._f = config._f[i];\n configFromStringAndFormat(tempConfig);\n\n if (isValid(tempConfig)) {\n validFormatFound = true;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += getParsingFlags(tempConfig).charsLeftOver;\n\n //or tokens\n currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;\n\n getParsingFlags(tempConfig).score = currentScore;\n\n if (!bestFormatIsValid) {\n if (\n scoreToBeat == null ||\n currentScore < scoreToBeat ||\n validFormatFound\n ) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n if (validFormatFound) {\n bestFormatIsValid = true;\n }\n }\n } else {\n if (currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }\n\n function configFromObject(config) {\n if (config._d) {\n return;\n }\n\n var i = normalizeObjectUnits(config._i),\n dayOrDate = i.day === undefined ? i.date : i.day;\n config._a = map(\n [i.year, i.month, dayOrDate, i.hour, i.minute, i.second, i.millisecond],\n function (obj) {\n return obj && parseInt(obj, 10);\n }\n );\n\n configFromArray(config);\n }\n\n function createFromConfig(config) {\n var res = new Moment(checkOverflow(prepareConfig(config)));\n if (res._nextDay) {\n // Adding is smart enough around DST\n res.add(1, 'd');\n res._nextDay = undefined;\n }\n\n return res;\n }\n\n function prepareConfig(config) {\n var input = config._i,\n format = config._f;\n\n config._locale = config._locale || getLocale(config._l);\n\n if (input === null || (format === undefined && input === '')) {\n return createInvalid({ nullInput: true });\n }\n\n if (typeof input === 'string') {\n config._i = input = config._locale.preparse(input);\n }\n\n if (isMoment(input)) {\n return new Moment(checkOverflow(input));\n } else if (isDate(input)) {\n config._d = input;\n } else if (isArray(format)) {\n configFromStringAndArray(config);\n } else if (format) {\n configFromStringAndFormat(config);\n } else {\n configFromInput(config);\n }\n\n if (!isValid(config)) {\n config._d = null;\n }\n\n return config;\n }\n\n function configFromInput(config) {\n var input = config._i;\n if (isUndefined(input)) {\n config._d = new Date(hooks.now());\n } else if (isDate(input)) {\n config._d = new Date(input.valueOf());\n } else if (typeof input === 'string') {\n configFromString(config);\n } else if (isArray(input)) {\n config._a = map(input.slice(0), function (obj) {\n return parseInt(obj, 10);\n });\n configFromArray(config);\n } else if (isObject(input)) {\n configFromObject(config);\n } else if (isNumber(input)) {\n // from milliseconds\n config._d = new Date(input);\n } else {\n hooks.createFromInputFallback(config);\n }\n }\n\n function createLocalOrUTC(input, format, locale, strict, isUTC) {\n var c = {};\n\n if (format === true || format === false) {\n strict = format;\n format = undefined;\n }\n\n if (locale === true || locale === false) {\n strict = locale;\n locale = undefined;\n }\n\n if (\n (isObject(input) && isObjectEmpty(input)) ||\n (isArray(input) && input.length === 0)\n ) {\n input = undefined;\n }\n // object construction must be done this way.\n // https://github.com/moment/moment/issues/1423\n c._isAMomentObject = true;\n c._useUTC = c._isUTC = isUTC;\n c._l = locale;\n c._i = input;\n c._f = format;\n c._strict = strict;\n\n return createFromConfig(c);\n }\n\n function createLocal(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, false);\n }\n\n var prototypeMin = deprecate(\n 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other < this ? this : other;\n } else {\n return createInvalid();\n }\n }\n ),\n prototypeMax = deprecate(\n 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other > this ? this : other;\n } else {\n return createInvalid();\n }\n }\n );\n\n // Pick a moment m from moments so that m[fn](other) is true for all\n // other. This relies on the function fn to be transitive.\n //\n // moments should either be an array of moment objects or an array, whose\n // first element is an array of moment objects.\n function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }\n\n // TODO: Use [].sort instead?\n function min() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isBefore', args);\n }\n\n function max() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isAfter', args);\n }\n\n var now = function () {\n return Date.now ? Date.now() : +new Date();\n };\n\n var ordering = [\n 'year',\n 'quarter',\n 'month',\n 'week',\n 'day',\n 'hour',\n 'minute',\n 'second',\n 'millisecond',\n ];\n\n function isDurationValid(m) {\n var key,\n unitHasDecimal = false,\n i,\n orderLen = ordering.length;\n for (key in m) {\n if (\n hasOwnProp(m, key) &&\n !(\n indexOf.call(ordering, key) !== -1 &&\n (m[key] == null || !isNaN(m[key]))\n )\n ) {\n return false;\n }\n }\n\n for (i = 0; i < orderLen; ++i) {\n if (m[ordering[i]]) {\n if (unitHasDecimal) {\n return false; // only allow non-integers for smallest unit\n }\n if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {\n unitHasDecimal = true;\n }\n }\n }\n\n return true;\n }\n\n function isValid$1() {\n return this._isValid;\n }\n\n function createInvalid$1() {\n return createDuration(NaN);\n }\n\n function Duration(duration) {\n var normalizedInput = normalizeObjectUnits(duration),\n years = normalizedInput.year || 0,\n quarters = normalizedInput.quarter || 0,\n months = normalizedInput.month || 0,\n weeks = normalizedInput.week || normalizedInput.isoWeek || 0,\n days = normalizedInput.day || 0,\n hours = normalizedInput.hour || 0,\n minutes = normalizedInput.minute || 0,\n seconds = normalizedInput.second || 0,\n milliseconds = normalizedInput.millisecond || 0;\n\n this._isValid = isDurationValid(normalizedInput);\n\n // representation for dateAddRemove\n this._milliseconds =\n +milliseconds +\n seconds * 1e3 + // 1000\n minutes * 6e4 + // 1000 * 60\n hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978\n // Because of dateAddRemove treats 24 hours as different from a\n // day when working around DST, we need to store them separately\n this._days = +days + weeks * 7;\n // It is impossible to translate months into days without knowing\n // which months you are are talking about, so we have to store\n // it separately.\n this._months = +months + quarters * 3 + years * 12;\n\n this._data = {};\n\n this._locale = getLocale();\n\n this._bubble();\n }\n\n function isDuration(obj) {\n return obj instanceof Duration;\n }\n\n function absRound(number) {\n if (number < 0) {\n return Math.round(-1 * number) * -1;\n } else {\n return Math.round(number);\n }\n }\n\n // compare two arrays, return the number of differences\n function compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if (\n (dontConvert && array1[i] !== array2[i]) ||\n (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))\n ) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n }\n\n // FORMATTING\n\n function offset(token, separator) {\n addFormatToken(token, 0, 0, function () {\n var offset = this.utcOffset(),\n sign = '+';\n if (offset < 0) {\n offset = -offset;\n sign = '-';\n }\n return (\n sign +\n zeroFill(~~(offset / 60), 2) +\n separator +\n zeroFill(~~offset % 60, 2)\n );\n });\n }\n\n offset('Z', ':');\n offset('ZZ', '');\n\n // PARSING\n\n addRegexToken('Z', matchShortOffset);\n addRegexToken('ZZ', matchShortOffset);\n addParseToken(['Z', 'ZZ'], function (input, array, config) {\n config._useUTC = true;\n config._tzm = offsetFromString(matchShortOffset, input);\n });\n\n // HELPERS\n\n // timezone chunker\n // '+10:00' > ['10', '00']\n // '-1530' > ['-15', '30']\n var chunkOffset = /([\\+\\-]|\\d\\d)/gi;\n\n function offsetFromString(matcher, string) {\n var matches = (string || '').match(matcher),\n chunk,\n parts,\n minutes;\n\n if (matches === null) {\n return null;\n }\n\n chunk = matches[matches.length - 1] || [];\n parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];\n minutes = +(parts[1] * 60) + toInt(parts[2]);\n\n return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes;\n }\n\n // Return a moment from input, that is local/utc/zone equivalent to model.\n function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff =\n (isMoment(input) || isDate(input)\n ? input.valueOf()\n : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n }\n\n function getDateOffset(m) {\n // On Firefox.24 Date#getTimezoneOffset returns a floating point.\n // https://github.com/moment/moment/pull/1871\n return -Math.round(m._d.getTimezoneOffset());\n }\n\n // HOOKS\n\n // This function will be called whenever a moment is mutated.\n // It is intended to keep the offset in sync with the timezone.\n hooks.updateOffset = function () {};\n\n // MOMENTS\n\n // keepLocalTime = true means only change the timezone, without\n // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->\n // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset\n // +0200, so we adjust the time as needed, to be valid.\n //\n // Keeping the time actually adds/subtracts (one hour)\n // from the actual represented time. That is why we call updateOffset\n // a second time. In case it wants us to change the offset again\n // _changeInProgress == true case, then we have to adjust, because\n // there is no such time in the given timezone.\n function getSetOffset(input, keepLocalTime, keepMinutes) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16 && !keepMinutes) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(\n this,\n createDuration(input - offset, 'm'),\n 1,\n false\n );\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }\n\n function getSetZone(input, keepLocalTime) {\n if (input != null) {\n if (typeof input !== 'string') {\n input = -input;\n }\n\n this.utcOffset(input, keepLocalTime);\n\n return this;\n } else {\n return -this.utcOffset();\n }\n }\n\n function setOffsetToUTC(keepLocalTime) {\n return this.utcOffset(0, keepLocalTime);\n }\n\n function setOffsetToLocal(keepLocalTime) {\n if (this._isUTC) {\n this.utcOffset(0, keepLocalTime);\n this._isUTC = false;\n\n if (keepLocalTime) {\n this.subtract(getDateOffset(this), 'm');\n }\n }\n return this;\n }\n\n function setOffsetToParsedOffset() {\n if (this._tzm != null) {\n this.utcOffset(this._tzm, false, true);\n } else if (typeof this._i === 'string') {\n var tZone = offsetFromString(matchOffset, this._i);\n if (tZone != null) {\n this.utcOffset(tZone);\n } else {\n this.utcOffset(0, true);\n }\n }\n return this;\n }\n\n function hasAlignedHourOffset(input) {\n if (!this.isValid()) {\n return false;\n }\n input = input ? createLocal(input).utcOffset() : 0;\n\n return (this.utcOffset() - input) % 60 === 0;\n }\n\n function isDaylightSavingTime() {\n return (\n this.utcOffset() > this.clone().month(0).utcOffset() ||\n this.utcOffset() > this.clone().month(5).utcOffset()\n );\n }\n\n function isDaylightSavingTimeShifted() {\n if (!isUndefined(this._isDSTShifted)) {\n return this._isDSTShifted;\n }\n\n var c = {},\n other;\n\n copyConfig(c, this);\n c = prepareConfig(c);\n\n if (c._a) {\n other = c._isUTC ? createUTC(c._a) : createLocal(c._a);\n this._isDSTShifted =\n this.isValid() && compareArrays(c._a, other.toArray()) > 0;\n } else {\n this._isDSTShifted = false;\n }\n\n return this._isDSTShifted;\n }\n\n function isLocal() {\n return this.isValid() ? !this._isUTC : false;\n }\n\n function isUtcOffset() {\n return this.isValid() ? this._isUTC : false;\n }\n\n function isUtc() {\n return this.isValid() ? this._isUTC && this._offset === 0 : false;\n }\n\n // ASP.NET json date format regex\n var aspNetRegex = /^(-|\\+)?(?:(\\d*)[. ])?(\\d+):(\\d+)(?::(\\d+)(\\.\\d*)?)?$/,\n // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html\n // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere\n // and further modified to allow for strings containing both week and day\n isoRegex =\n /^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;\n\n function createDuration(input, key) {\n var duration = input,\n // matching against regexp is expensive, do it on demand\n match = null,\n sign,\n ret,\n diffRes;\n\n if (isDuration(input)) {\n duration = {\n ms: input._milliseconds,\n d: input._days,\n M: input._months,\n };\n } else if (isNumber(input) || !isNaN(+input)) {\n duration = {};\n if (key) {\n duration[key] = +input;\n } else {\n duration.milliseconds = +input;\n }\n } else if ((match = aspNetRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: 0,\n d: toInt(match[DATE]) * sign,\n h: toInt(match[HOUR]) * sign,\n m: toInt(match[MINUTE]) * sign,\n s: toInt(match[SECOND]) * sign,\n ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign, // the millisecond decimal point is included in the match\n };\n } else if ((match = isoRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: parseIso(match[2], sign),\n M: parseIso(match[3], sign),\n w: parseIso(match[4], sign),\n d: parseIso(match[5], sign),\n h: parseIso(match[6], sign),\n m: parseIso(match[7], sign),\n s: parseIso(match[8], sign),\n };\n } else if (duration == null) {\n // checks for null or undefined\n duration = {};\n } else if (\n typeof duration === 'object' &&\n ('from' in duration || 'to' in duration)\n ) {\n diffRes = momentsDifference(\n createLocal(duration.from),\n createLocal(duration.to)\n );\n\n duration = {};\n duration.ms = diffRes.milliseconds;\n duration.M = diffRes.months;\n }\n\n ret = new Duration(duration);\n\n if (isDuration(input) && hasOwnProp(input, '_locale')) {\n ret._locale = input._locale;\n }\n\n if (isDuration(input) && hasOwnProp(input, '_isValid')) {\n ret._isValid = input._isValid;\n }\n\n return ret;\n }\n\n createDuration.fn = Duration.prototype;\n createDuration.invalid = createInvalid$1;\n\n function parseIso(inp, sign) {\n // We'd normally use ~~inp for this, but unfortunately it also\n // converts floats to ints.\n // inp may be undefined, so careful calling replace on it.\n var res = inp && parseFloat(inp.replace(',', '.'));\n // apply sign while we're at it\n return (isNaN(res) ? 0 : res) * sign;\n }\n\n function positiveMomentsDifference(base, other) {\n var res = {};\n\n res.months =\n other.month() - base.month() + (other.year() - base.year()) * 12;\n if (base.clone().add(res.months, 'M').isAfter(other)) {\n --res.months;\n }\n\n res.milliseconds = +other - +base.clone().add(res.months, 'M');\n\n return res;\n }\n\n function momentsDifference(base, other) {\n var res;\n if (!(base.isValid() && other.isValid())) {\n return { milliseconds: 0, months: 0 };\n }\n\n other = cloneWithOffset(other, base);\n if (base.isBefore(other)) {\n res = positiveMomentsDifference(base, other);\n } else {\n res = positiveMomentsDifference(other, base);\n res.milliseconds = -res.milliseconds;\n res.months = -res.months;\n }\n\n return res;\n }\n\n // TODO: remove 'name' arg after deprecation is removed\n function createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(\n name,\n 'moment().' +\n name +\n '(period, number) is deprecated. Please use moment().' +\n name +\n '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n );\n tmp = val;\n val = period;\n period = tmp;\n }\n\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n }\n\n function addSubtract(mom, duration, isAdding, updateOffset) {\n var milliseconds = duration._milliseconds,\n days = absRound(duration._days),\n months = absRound(duration._months);\n\n if (!mom.isValid()) {\n // No op\n return;\n }\n\n updateOffset = updateOffset == null ? true : updateOffset;\n\n if (months) {\n setMonth(mom, get(mom, 'Month') + months * isAdding);\n }\n if (days) {\n set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);\n }\n if (milliseconds) {\n mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);\n }\n if (updateOffset) {\n hooks.updateOffset(mom, days || months);\n }\n }\n\n var add = createAdder(1, 'add'),\n subtract = createAdder(-1, 'subtract');\n\n function isString(input) {\n return typeof input === 'string' || input instanceof String;\n }\n\n // type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void; // null | undefined\n function isMomentInput(input) {\n return (\n isMoment(input) ||\n isDate(input) ||\n isString(input) ||\n isNumber(input) ||\n isNumberOrStringArray(input) ||\n isMomentInputObject(input) ||\n input === null ||\n input === undefined\n );\n }\n\n function isMomentInputObject(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'years',\n 'year',\n 'y',\n 'months',\n 'month',\n 'M',\n 'days',\n 'day',\n 'd',\n 'dates',\n 'date',\n 'D',\n 'hours',\n 'hour',\n 'h',\n 'minutes',\n 'minute',\n 'm',\n 'seconds',\n 'second',\n 's',\n 'milliseconds',\n 'millisecond',\n 'ms',\n ],\n i,\n property,\n propertyLen = properties.length;\n\n for (i = 0; i < propertyLen; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n }\n\n function isNumberOrStringArray(input) {\n var arrayTest = isArray(input),\n dataTypeTest = false;\n if (arrayTest) {\n dataTypeTest =\n input.filter(function (item) {\n return !isNumber(item) && isString(input);\n }).length === 0;\n }\n return arrayTest && dataTypeTest;\n }\n\n function isCalendarSpec(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'sameDay',\n 'nextDay',\n 'lastDay',\n 'nextWeek',\n 'lastWeek',\n 'sameElse',\n ],\n i,\n property;\n\n for (i = 0; i < properties.length; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n }\n\n function getCalendarFormat(myMoment, now) {\n var diff = myMoment.diff(now, 'days', true);\n return diff < -6\n ? 'sameElse'\n : diff < -1\n ? 'lastWeek'\n : diff < 0\n ? 'lastDay'\n : diff < 1\n ? 'sameDay'\n : diff < 2\n ? 'nextDay'\n : diff < 7\n ? 'nextWeek'\n : 'sameElse';\n }\n\n function calendar$1(time, formats) {\n // Support for single parameter, formats only overload to the calendar function\n if (arguments.length === 1) {\n if (!arguments[0]) {\n time = undefined;\n formats = undefined;\n } else if (isMomentInput(arguments[0])) {\n time = arguments[0];\n formats = undefined;\n } else if (isCalendarSpec(arguments[0])) {\n formats = arguments[0];\n time = undefined;\n }\n }\n // We want to compare the start of today, vs this.\n // Getting start-of-today depends on whether we're local/utc/offset or not.\n var now = time || createLocal(),\n sod = cloneWithOffset(now, this).startOf('day'),\n format = hooks.calendarFormat(this, sod) || 'sameElse',\n output =\n formats &&\n (isFunction(formats[format])\n ? formats[format].call(this, now)\n : formats[format]);\n\n return this.format(\n output || this.localeData().calendar(format, this, createLocal(now))\n );\n }\n\n function clone() {\n return new Moment(this);\n }\n\n function isAfter(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() > localInput.valueOf();\n } else {\n return localInput.valueOf() < this.clone().startOf(units).valueOf();\n }\n }\n\n function isBefore(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() < localInput.valueOf();\n } else {\n return this.clone().endOf(units).valueOf() < localInput.valueOf();\n }\n }\n\n function isBetween(from, to, units, inclusivity) {\n var localFrom = isMoment(from) ? from : createLocal(from),\n localTo = isMoment(to) ? to : createLocal(to);\n if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {\n return false;\n }\n inclusivity = inclusivity || '()';\n return (\n (inclusivity[0] === '('\n ? this.isAfter(localFrom, units)\n : !this.isBefore(localFrom, units)) &&\n (inclusivity[1] === ')'\n ? this.isBefore(localTo, units)\n : !this.isAfter(localTo, units))\n );\n }\n\n function isSame(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input),\n inputMs;\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() === localInput.valueOf();\n } else {\n inputMs = localInput.valueOf();\n return (\n this.clone().startOf(units).valueOf() <= inputMs &&\n inputMs <= this.clone().endOf(units).valueOf()\n );\n }\n }\n\n function isSameOrAfter(input, units) {\n return this.isSame(input, units) || this.isAfter(input, units);\n }\n\n function isSameOrBefore(input, units) {\n return this.isSame(input, units) || this.isBefore(input, units);\n }\n\n function diff(input, units, asFloat) {\n var that, zoneDelta, output;\n\n if (!this.isValid()) {\n return NaN;\n }\n\n that = cloneWithOffset(input, this);\n\n if (!that.isValid()) {\n return NaN;\n }\n\n zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;\n\n units = normalizeUnits(units);\n\n switch (units) {\n case 'year':\n output = monthDiff(this, that) / 12;\n break;\n case 'month':\n output = monthDiff(this, that);\n break;\n case 'quarter':\n output = monthDiff(this, that) / 3;\n break;\n case 'second':\n output = (this - that) / 1e3;\n break; // 1000\n case 'minute':\n output = (this - that) / 6e4;\n break; // 1000 * 60\n case 'hour':\n output = (this - that) / 36e5;\n break; // 1000 * 60 * 60\n case 'day':\n output = (this - that - zoneDelta) / 864e5;\n break; // 1000 * 60 * 60 * 24, negate dst\n case 'week':\n output = (this - that - zoneDelta) / 6048e5;\n break; // 1000 * 60 * 60 * 24 * 7, negate dst\n default:\n output = this - that;\n }\n\n return asFloat ? output : absFloor(output);\n }\n\n function monthDiff(a, b) {\n if (a.date() < b.date()) {\n // end-of-month calculations work correct when the start month has more\n // days than the end month.\n return -monthDiff(b, a);\n }\n // difference in months\n var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()),\n // b is in (anchor - 1 month, anchor + 1 month)\n anchor = a.clone().add(wholeMonthDiff, 'months'),\n anchor2,\n adjust;\n\n if (b - anchor < 0) {\n anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor - anchor2);\n } else {\n anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor2 - anchor);\n }\n\n //check for negative zero, return zero if negative zero\n return -(wholeMonthDiff + adjust) || 0;\n }\n\n hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';\n hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';\n\n function toString() {\n return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');\n }\n\n function toISOString(keepOffset) {\n if (!this.isValid()) {\n return null;\n }\n var utc = keepOffset !== true,\n m = utc ? this.clone().utc() : this;\n if (m.year() < 0 || m.year() > 9999) {\n return formatMoment(\n m,\n utc\n ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]'\n : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n }\n if (isFunction(Date.prototype.toISOString)) {\n // native implementation is ~50x faster, use it when we can\n if (utc) {\n return this.toDate().toISOString();\n } else {\n return new Date(this.valueOf() + this.utcOffset() * 60 * 1000)\n .toISOString()\n .replace('Z', formatMoment(m, 'Z'));\n }\n }\n return formatMoment(\n m,\n utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n }\n\n /**\n * Return a human readable representation of a moment that can\n * also be evaluated to get a new moment which is the same\n *\n * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects\n */\n function inspect() {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment',\n zone = '',\n prefix,\n year,\n datetime,\n suffix;\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n prefix = '[' + func + '(\"]';\n year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY';\n datetime = '-MM-DD[T]HH:mm:ss.SSS';\n suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n }\n\n function format(inputString) {\n if (!inputString) {\n inputString = this.isUtc()\n ? hooks.defaultFormatUtc\n : hooks.defaultFormat;\n }\n var output = formatMoment(this, inputString);\n return this.localeData().postformat(output);\n }\n\n function from(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ to: this, from: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n }\n\n function fromNow(withoutSuffix) {\n return this.from(createLocal(), withoutSuffix);\n }\n\n function to(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ from: this, to: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n }\n\n function toNow(withoutSuffix) {\n return this.to(createLocal(), withoutSuffix);\n }\n\n // If passed a locale key, it will set the locale for this\n // instance. Otherwise, it will return the locale configuration\n // variables for this instance.\n function locale(key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n }\n\n var lang = deprecate(\n 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',\n function (key) {\n if (key === undefined) {\n return this.localeData();\n } else {\n return this.locale(key);\n }\n }\n );\n\n function localeData() {\n return this._locale;\n }\n\n var MS_PER_SECOND = 1000,\n MS_PER_MINUTE = 60 * MS_PER_SECOND,\n MS_PER_HOUR = 60 * MS_PER_MINUTE,\n MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR;\n\n // actual modulo - handles negative numbers (for dates before 1970):\n function mod$1(dividend, divisor) {\n return ((dividend % divisor) + divisor) % divisor;\n }\n\n function localStartOfDate(y, m, d) {\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return new Date(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return new Date(y, m, d).valueOf();\n }\n }\n\n function utcStartOfDate(y, m, d) {\n // Date.UTC remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return Date.UTC(y, m, d);\n }\n }\n\n function startOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year(), 0, 1);\n break;\n case 'quarter':\n time = startOfDate(\n this.year(),\n this.month() - (this.month() % 3),\n 1\n );\n break;\n case 'month':\n time = startOfDate(this.year(), this.month(), 1);\n break;\n case 'week':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday()\n );\n break;\n case 'isoWeek':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1)\n );\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date());\n break;\n case 'hour':\n time = this._d.valueOf();\n time -= mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n );\n break;\n case 'minute':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_MINUTE);\n break;\n case 'second':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_SECOND);\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n }\n\n function endOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year() + 1, 0, 1) - 1;\n break;\n case 'quarter':\n time =\n startOfDate(\n this.year(),\n this.month() - (this.month() % 3) + 3,\n 1\n ) - 1;\n break;\n case 'month':\n time = startOfDate(this.year(), this.month() + 1, 1) - 1;\n break;\n case 'week':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday() + 7\n ) - 1;\n break;\n case 'isoWeek':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1) + 7\n ) - 1;\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;\n break;\n case 'hour':\n time = this._d.valueOf();\n time +=\n MS_PER_HOUR -\n mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n ) -\n 1;\n break;\n case 'minute':\n time = this._d.valueOf();\n time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1;\n break;\n case 'second':\n time = this._d.valueOf();\n time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1;\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n }\n\n function valueOf() {\n return this._d.valueOf() - (this._offset || 0) * 60000;\n }\n\n function unix() {\n return Math.floor(this.valueOf() / 1000);\n }\n\n function toDate() {\n return new Date(this.valueOf());\n }\n\n function toArray() {\n var m = this;\n return [\n m.year(),\n m.month(),\n m.date(),\n m.hour(),\n m.minute(),\n m.second(),\n m.millisecond(),\n ];\n }\n\n function toObject() {\n var m = this;\n return {\n years: m.year(),\n months: m.month(),\n date: m.date(),\n hours: m.hours(),\n minutes: m.minutes(),\n seconds: m.seconds(),\n milliseconds: m.milliseconds(),\n };\n }\n\n function toJSON() {\n // new Date(NaN).toJSON() === null\n return this.isValid() ? this.toISOString() : null;\n }\n\n function isValid$2() {\n return isValid(this);\n }\n\n function parsingFlags() {\n return extend({}, getParsingFlags(this));\n }\n\n function invalidAt() {\n return getParsingFlags(this).overflow;\n }\n\n function creationData() {\n return {\n input: this._i,\n format: this._f,\n locale: this._locale,\n isUTC: this._isUTC,\n strict: this._strict,\n };\n }\n\n addFormatToken('N', 0, 0, 'eraAbbr');\n addFormatToken('NN', 0, 0, 'eraAbbr');\n addFormatToken('NNN', 0, 0, 'eraAbbr');\n addFormatToken('NNNN', 0, 0, 'eraName');\n addFormatToken('NNNNN', 0, 0, 'eraNarrow');\n\n addFormatToken('y', ['y', 1], 'yo', 'eraYear');\n addFormatToken('y', ['yy', 2], 0, 'eraYear');\n addFormatToken('y', ['yyy', 3], 0, 'eraYear');\n addFormatToken('y', ['yyyy', 4], 0, 'eraYear');\n\n addRegexToken('N', matchEraAbbr);\n addRegexToken('NN', matchEraAbbr);\n addRegexToken('NNN', matchEraAbbr);\n addRegexToken('NNNN', matchEraName);\n addRegexToken('NNNNN', matchEraNarrow);\n\n addParseToken(\n ['N', 'NN', 'NNN', 'NNNN', 'NNNNN'],\n function (input, array, config, token) {\n var era = config._locale.erasParse(input, token, config._strict);\n if (era) {\n getParsingFlags(config).era = era;\n } else {\n getParsingFlags(config).invalidEra = input;\n }\n }\n );\n\n addRegexToken('y', matchUnsigned);\n addRegexToken('yy', matchUnsigned);\n addRegexToken('yyy', matchUnsigned);\n addRegexToken('yyyy', matchUnsigned);\n addRegexToken('yo', matchEraYearOrdinal);\n\n addParseToken(['y', 'yy', 'yyy', 'yyyy'], YEAR);\n addParseToken(['yo'], function (input, array, config, token) {\n var match;\n if (config._locale._eraYearOrdinalRegex) {\n match = input.match(config._locale._eraYearOrdinalRegex);\n }\n\n if (config._locale.eraYearOrdinalParse) {\n array[YEAR] = config._locale.eraYearOrdinalParse(input, match);\n } else {\n array[YEAR] = parseInt(input, 10);\n }\n });\n\n function localeEras(m, format) {\n var i,\n l,\n date,\n eras = this._eras || getLocale('en')._eras;\n for (i = 0, l = eras.length; i < l; ++i) {\n switch (typeof eras[i].since) {\n case 'string':\n // truncate time\n date = hooks(eras[i].since).startOf('day');\n eras[i].since = date.valueOf();\n break;\n }\n\n switch (typeof eras[i].until) {\n case 'undefined':\n eras[i].until = +Infinity;\n break;\n case 'string':\n // truncate time\n date = hooks(eras[i].until).startOf('day').valueOf();\n eras[i].until = date.valueOf();\n break;\n }\n }\n return eras;\n }\n\n function localeErasParse(eraName, format, strict) {\n var i,\n l,\n eras = this.eras(),\n name,\n abbr,\n narrow;\n eraName = eraName.toUpperCase();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n name = eras[i].name.toUpperCase();\n abbr = eras[i].abbr.toUpperCase();\n narrow = eras[i].narrow.toUpperCase();\n\n if (strict) {\n switch (format) {\n case 'N':\n case 'NN':\n case 'NNN':\n if (abbr === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNN':\n if (name === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNNN':\n if (narrow === eraName) {\n return eras[i];\n }\n break;\n }\n } else if ([name, abbr, narrow].indexOf(eraName) >= 0) {\n return eras[i];\n }\n }\n }\n\n function localeErasConvertYear(era, year) {\n var dir = era.since <= era.until ? +1 : -1;\n if (year === undefined) {\n return hooks(era.since).year();\n } else {\n return hooks(era.since).year() + (year - era.offset) * dir;\n }\n }\n\n function getEraName() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].name;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].name;\n }\n }\n\n return '';\n }\n\n function getEraNarrow() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].narrow;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].narrow;\n }\n }\n\n return '';\n }\n\n function getEraAbbr() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].abbr;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].abbr;\n }\n }\n\n return '';\n }\n\n function getEraYear() {\n var i,\n l,\n dir,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n dir = eras[i].since <= eras[i].until ? +1 : -1;\n\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (\n (eras[i].since <= val && val <= eras[i].until) ||\n (eras[i].until <= val && val <= eras[i].since)\n ) {\n return (\n (this.year() - hooks(eras[i].since).year()) * dir +\n eras[i].offset\n );\n }\n }\n\n return this.year();\n }\n\n function erasNameRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNameRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNameRegex : this._erasRegex;\n }\n\n function erasAbbrRegex(isStrict) {\n if (!hasOwnProp(this, '_erasAbbrRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasAbbrRegex : this._erasRegex;\n }\n\n function erasNarrowRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNarrowRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNarrowRegex : this._erasRegex;\n }\n\n function matchEraAbbr(isStrict, locale) {\n return locale.erasAbbrRegex(isStrict);\n }\n\n function matchEraName(isStrict, locale) {\n return locale.erasNameRegex(isStrict);\n }\n\n function matchEraNarrow(isStrict, locale) {\n return locale.erasNarrowRegex(isStrict);\n }\n\n function matchEraYearOrdinal(isStrict, locale) {\n return locale._eraYearOrdinalRegex || matchUnsigned;\n }\n\n function computeErasParse() {\n var abbrPieces = [],\n namePieces = [],\n narrowPieces = [],\n mixedPieces = [],\n i,\n l,\n erasName,\n erasAbbr,\n erasNarrow,\n eras = this.eras();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n erasName = regexEscape(eras[i].name);\n erasAbbr = regexEscape(eras[i].abbr);\n erasNarrow = regexEscape(eras[i].narrow);\n\n namePieces.push(erasName);\n abbrPieces.push(erasAbbr);\n narrowPieces.push(erasNarrow);\n mixedPieces.push(erasName);\n mixedPieces.push(erasAbbr);\n mixedPieces.push(erasNarrow);\n }\n\n this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._erasNameRegex = new RegExp('^(' + namePieces.join('|') + ')', 'i');\n this._erasAbbrRegex = new RegExp('^(' + abbrPieces.join('|') + ')', 'i');\n this._erasNarrowRegex = new RegExp(\n '^(' + narrowPieces.join('|') + ')',\n 'i'\n );\n }\n\n // FORMATTING\n\n addFormatToken(0, ['gg', 2], 0, function () {\n return this.weekYear() % 100;\n });\n\n addFormatToken(0, ['GG', 2], 0, function () {\n return this.isoWeekYear() % 100;\n });\n\n function addWeekYearFormatToken(token, getter) {\n addFormatToken(0, [token, token.length], 0, getter);\n }\n\n addWeekYearFormatToken('gggg', 'weekYear');\n addWeekYearFormatToken('ggggg', 'weekYear');\n addWeekYearFormatToken('GGGG', 'isoWeekYear');\n addWeekYearFormatToken('GGGGG', 'isoWeekYear');\n\n // ALIASES\n\n // PARSING\n\n addRegexToken('G', matchSigned);\n addRegexToken('g', matchSigned);\n addRegexToken('GG', match1to2, match2);\n addRegexToken('gg', match1to2, match2);\n addRegexToken('GGGG', match1to4, match4);\n addRegexToken('gggg', match1to4, match4);\n addRegexToken('GGGGG', match1to6, match6);\n addRegexToken('ggggg', match1to6, match6);\n\n addWeekParseToken(\n ['gggg', 'ggggg', 'GGGG', 'GGGGG'],\n function (input, week, config, token) {\n week[token.substr(0, 2)] = toInt(input);\n }\n );\n\n addWeekParseToken(['gg', 'GG'], function (input, week, config, token) {\n week[token] = hooks.parseTwoDigitYear(input);\n });\n\n // MOMENTS\n\n function getSetWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.week(),\n this.weekday() + this.localeData()._week.dow,\n this.localeData()._week.dow,\n this.localeData()._week.doy\n );\n }\n\n function getSetISOWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.isoWeek(),\n this.isoWeekday(),\n 1,\n 4\n );\n }\n\n function getISOWeeksInYear() {\n return weeksInYear(this.year(), 1, 4);\n }\n\n function getISOWeeksInISOWeekYear() {\n return weeksInYear(this.isoWeekYear(), 1, 4);\n }\n\n function getWeeksInYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);\n }\n\n function getWeeksInWeekYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.weekYear(), weekInfo.dow, weekInfo.doy);\n }\n\n function getSetWeekYearHelper(input, week, weekday, dow, doy) {\n var weeksTarget;\n if (input == null) {\n return weekOfYear(this, dow, doy).year;\n } else {\n weeksTarget = weeksInYear(input, dow, doy);\n if (week > weeksTarget) {\n week = weeksTarget;\n }\n return setWeekAll.call(this, input, week, weekday, dow, doy);\n }\n }\n\n function setWeekAll(weekYear, week, weekday, dow, doy) {\n var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),\n date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);\n\n this.year(date.getUTCFullYear());\n this.month(date.getUTCMonth());\n this.date(date.getUTCDate());\n return this;\n }\n\n // FORMATTING\n\n addFormatToken('Q', 0, 'Qo', 'quarter');\n\n // PARSING\n\n addRegexToken('Q', match1);\n addParseToken('Q', function (input, array) {\n array[MONTH] = (toInt(input) - 1) * 3;\n });\n\n // MOMENTS\n\n function getSetQuarter(input) {\n return input == null\n ? Math.ceil((this.month() + 1) / 3)\n : this.month((input - 1) * 3 + (this.month() % 3));\n }\n\n // FORMATTING\n\n addFormatToken('D', ['DD', 2], 'Do', 'date');\n\n // PARSING\n\n addRegexToken('D', match1to2, match1to2NoLeadingZero);\n addRegexToken('DD', match1to2, match2);\n addRegexToken('Do', function (isStrict, locale) {\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n return isStrict\n ? locale._dayOfMonthOrdinalParse || locale._ordinalParse\n : locale._dayOfMonthOrdinalParseLenient;\n });\n\n addParseToken(['D', 'DD'], DATE);\n addParseToken('Do', function (input, array) {\n array[DATE] = toInt(input.match(match1to2)[0]);\n });\n\n // MOMENTS\n\n var getSetDayOfMonth = makeGetSet('Date', true);\n\n // FORMATTING\n\n addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');\n\n // PARSING\n\n addRegexToken('DDD', match1to3);\n addRegexToken('DDDD', match3);\n addParseToken(['DDD', 'DDDD'], function (input, array, config) {\n config._dayOfYear = toInt(input);\n });\n\n // HELPERS\n\n // MOMENTS\n\n function getSetDayOfYear(input) {\n var dayOfYear =\n Math.round(\n (this.clone().startOf('day') - this.clone().startOf('year')) / 864e5\n ) + 1;\n return input == null ? dayOfYear : this.add(input - dayOfYear, 'd');\n }\n\n // FORMATTING\n\n addFormatToken('m', ['mm', 2], 0, 'minute');\n\n // PARSING\n\n addRegexToken('m', match1to2, match1to2HasZero);\n addRegexToken('mm', match1to2, match2);\n addParseToken(['m', 'mm'], MINUTE);\n\n // MOMENTS\n\n var getSetMinute = makeGetSet('Minutes', false);\n\n // FORMATTING\n\n addFormatToken('s', ['ss', 2], 0, 'second');\n\n // PARSING\n\n addRegexToken('s', match1to2, match1to2HasZero);\n addRegexToken('ss', match1to2, match2);\n addParseToken(['s', 'ss'], SECOND);\n\n // MOMENTS\n\n var getSetSecond = makeGetSet('Seconds', false);\n\n // FORMATTING\n\n addFormatToken('S', 0, 0, function () {\n return ~~(this.millisecond() / 100);\n });\n\n addFormatToken(0, ['SS', 2], 0, function () {\n return ~~(this.millisecond() / 10);\n });\n\n addFormatToken(0, ['SSS', 3], 0, 'millisecond');\n addFormatToken(0, ['SSSS', 4], 0, function () {\n return this.millisecond() * 10;\n });\n addFormatToken(0, ['SSSSS', 5], 0, function () {\n return this.millisecond() * 100;\n });\n addFormatToken(0, ['SSSSSS', 6], 0, function () {\n return this.millisecond() * 1000;\n });\n addFormatToken(0, ['SSSSSSS', 7], 0, function () {\n return this.millisecond() * 10000;\n });\n addFormatToken(0, ['SSSSSSSS', 8], 0, function () {\n return this.millisecond() * 100000;\n });\n addFormatToken(0, ['SSSSSSSSS', 9], 0, function () {\n return this.millisecond() * 1000000;\n });\n\n // PARSING\n\n addRegexToken('S', match1to3, match1);\n addRegexToken('SS', match1to3, match2);\n addRegexToken('SSS', match1to3, match3);\n\n var token, getSetMillisecond;\n for (token = 'SSSS'; token.length <= 9; token += 'S') {\n addRegexToken(token, matchUnsigned);\n }\n\n function parseMs(input, array) {\n array[MILLISECOND] = toInt(('0.' + input) * 1000);\n }\n\n for (token = 'S'; token.length <= 9; token += 'S') {\n addParseToken(token, parseMs);\n }\n\n getSetMillisecond = makeGetSet('Milliseconds', false);\n\n // FORMATTING\n\n addFormatToken('z', 0, 0, 'zoneAbbr');\n addFormatToken('zz', 0, 0, 'zoneName');\n\n // MOMENTS\n\n function getZoneAbbr() {\n return this._isUTC ? 'UTC' : '';\n }\n\n function getZoneName() {\n return this._isUTC ? 'Coordinated Universal Time' : '';\n }\n\n var proto = Moment.prototype;\n\n proto.add = add;\n proto.calendar = calendar$1;\n proto.clone = clone;\n proto.diff = diff;\n proto.endOf = endOf;\n proto.format = format;\n proto.from = from;\n proto.fromNow = fromNow;\n proto.to = to;\n proto.toNow = toNow;\n proto.get = stringGet;\n proto.invalidAt = invalidAt;\n proto.isAfter = isAfter;\n proto.isBefore = isBefore;\n proto.isBetween = isBetween;\n proto.isSame = isSame;\n proto.isSameOrAfter = isSameOrAfter;\n proto.isSameOrBefore = isSameOrBefore;\n proto.isValid = isValid$2;\n proto.lang = lang;\n proto.locale = locale;\n proto.localeData = localeData;\n proto.max = prototypeMax;\n proto.min = prototypeMin;\n proto.parsingFlags = parsingFlags;\n proto.set = stringSet;\n proto.startOf = startOf;\n proto.subtract = subtract;\n proto.toArray = toArray;\n proto.toObject = toObject;\n proto.toDate = toDate;\n proto.toISOString = toISOString;\n proto.inspect = inspect;\n if (typeof Symbol !== 'undefined' && Symbol.for != null) {\n proto[Symbol.for('nodejs.util.inspect.custom')] = function () {\n return 'Moment<' + this.format() + '>';\n };\n }\n proto.toJSON = toJSON;\n proto.toString = toString;\n proto.unix = unix;\n proto.valueOf = valueOf;\n proto.creationData = creationData;\n proto.eraName = getEraName;\n proto.eraNarrow = getEraNarrow;\n proto.eraAbbr = getEraAbbr;\n proto.eraYear = getEraYear;\n proto.year = getSetYear;\n proto.isLeapYear = getIsLeapYear;\n proto.weekYear = getSetWeekYear;\n proto.isoWeekYear = getSetISOWeekYear;\n proto.quarter = proto.quarters = getSetQuarter;\n proto.month = getSetMonth;\n proto.daysInMonth = getDaysInMonth;\n proto.week = proto.weeks = getSetWeek;\n proto.isoWeek = proto.isoWeeks = getSetISOWeek;\n proto.weeksInYear = getWeeksInYear;\n proto.weeksInWeekYear = getWeeksInWeekYear;\n proto.isoWeeksInYear = getISOWeeksInYear;\n proto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear;\n proto.date = getSetDayOfMonth;\n proto.day = proto.days = getSetDayOfWeek;\n proto.weekday = getSetLocaleDayOfWeek;\n proto.isoWeekday = getSetISODayOfWeek;\n proto.dayOfYear = getSetDayOfYear;\n proto.hour = proto.hours = getSetHour;\n proto.minute = proto.minutes = getSetMinute;\n proto.second = proto.seconds = getSetSecond;\n proto.millisecond = proto.milliseconds = getSetMillisecond;\n proto.utcOffset = getSetOffset;\n proto.utc = setOffsetToUTC;\n proto.local = setOffsetToLocal;\n proto.parseZone = setOffsetToParsedOffset;\n proto.hasAlignedHourOffset = hasAlignedHourOffset;\n proto.isDST = isDaylightSavingTime;\n proto.isLocal = isLocal;\n proto.isUtcOffset = isUtcOffset;\n proto.isUtc = isUtc;\n proto.isUTC = isUtc;\n proto.zoneAbbr = getZoneAbbr;\n proto.zoneName = getZoneName;\n proto.dates = deprecate(\n 'dates accessor is deprecated. Use date instead.',\n getSetDayOfMonth\n );\n proto.months = deprecate(\n 'months accessor is deprecated. Use month instead',\n getSetMonth\n );\n proto.years = deprecate(\n 'years accessor is deprecated. Use year instead',\n getSetYear\n );\n proto.zone = deprecate(\n 'moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/',\n getSetZone\n );\n proto.isDSTShifted = deprecate(\n 'isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information',\n isDaylightSavingTimeShifted\n );\n\n function createUnix(input) {\n return createLocal(input * 1000);\n }\n\n function createInZone() {\n return createLocal.apply(null, arguments).parseZone();\n }\n\n function preParsePostFormat(string) {\n return string;\n }\n\n var proto$1 = Locale.prototype;\n\n proto$1.calendar = calendar;\n proto$1.longDateFormat = longDateFormat;\n proto$1.invalidDate = invalidDate;\n proto$1.ordinal = ordinal;\n proto$1.preparse = preParsePostFormat;\n proto$1.postformat = preParsePostFormat;\n proto$1.relativeTime = relativeTime;\n proto$1.pastFuture = pastFuture;\n proto$1.set = set;\n proto$1.eras = localeEras;\n proto$1.erasParse = localeErasParse;\n proto$1.erasConvertYear = localeErasConvertYear;\n proto$1.erasAbbrRegex = erasAbbrRegex;\n proto$1.erasNameRegex = erasNameRegex;\n proto$1.erasNarrowRegex = erasNarrowRegex;\n\n proto$1.months = localeMonths;\n proto$1.monthsShort = localeMonthsShort;\n proto$1.monthsParse = localeMonthsParse;\n proto$1.monthsRegex = monthsRegex;\n proto$1.monthsShortRegex = monthsShortRegex;\n proto$1.week = localeWeek;\n proto$1.firstDayOfYear = localeFirstDayOfYear;\n proto$1.firstDayOfWeek = localeFirstDayOfWeek;\n\n proto$1.weekdays = localeWeekdays;\n proto$1.weekdaysMin = localeWeekdaysMin;\n proto$1.weekdaysShort = localeWeekdaysShort;\n proto$1.weekdaysParse = localeWeekdaysParse;\n\n proto$1.weekdaysRegex = weekdaysRegex;\n proto$1.weekdaysShortRegex = weekdaysShortRegex;\n proto$1.weekdaysMinRegex = weekdaysMinRegex;\n\n proto$1.isPM = localeIsPM;\n proto$1.meridiem = localeMeridiem;\n\n function get$1(format, index, field, setter) {\n var locale = getLocale(),\n utc = createUTC().set(setter, index);\n return locale[field](utc, format);\n }\n\n function listMonthsImpl(format, index, field) {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n\n if (index != null) {\n return get$1(format, index, field, 'month');\n }\n\n var i,\n out = [];\n for (i = 0; i < 12; i++) {\n out[i] = get$1(format, i, field, 'month');\n }\n return out;\n }\n\n // ()\n // (5)\n // (fmt, 5)\n // (fmt)\n // (true)\n // (true, 5)\n // (true, fmt, 5)\n // (true, fmt)\n function listWeekdaysImpl(localeSorted, format, index, field) {\n if (typeof localeSorted === 'boolean') {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n } else {\n format = localeSorted;\n index = format;\n localeSorted = false;\n\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n }\n\n var locale = getLocale(),\n shift = localeSorted ? locale._week.dow : 0,\n i,\n out = [];\n\n if (index != null) {\n return get$1(format, (index + shift) % 7, field, 'day');\n }\n\n for (i = 0; i < 7; i++) {\n out[i] = get$1(format, (i + shift) % 7, field, 'day');\n }\n return out;\n }\n\n function listMonths(format, index) {\n return listMonthsImpl(format, index, 'months');\n }\n\n function listMonthsShort(format, index) {\n return listMonthsImpl(format, index, 'monthsShort');\n }\n\n function listWeekdays(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdays');\n }\n\n function listWeekdaysShort(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');\n }\n\n function listWeekdaysMin(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');\n }\n\n getSetGlobalLocale('en', {\n eras: [\n {\n since: '0001-01-01',\n until: +Infinity,\n offset: 1,\n name: 'Anno Domini',\n narrow: 'AD',\n abbr: 'AD',\n },\n {\n since: '0000-12-31',\n until: -Infinity,\n offset: 1,\n name: 'Before Christ',\n narrow: 'BC',\n abbr: 'BC',\n },\n ],\n dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n toInt((number % 100) / 10) === 1\n ? 'th'\n : b === 1\n ? 'st'\n : b === 2\n ? 'nd'\n : b === 3\n ? 'rd'\n : 'th';\n return number + output;\n },\n });\n\n // Side effect imports\n\n hooks.lang = deprecate(\n 'moment.lang is deprecated. Use moment.locale instead.',\n getSetGlobalLocale\n );\n hooks.langData = deprecate(\n 'moment.langData is deprecated. Use moment.localeData instead.',\n getLocale\n );\n\n var mathAbs = Math.abs;\n\n function abs() {\n var data = this._data;\n\n this._milliseconds = mathAbs(this._milliseconds);\n this._days = mathAbs(this._days);\n this._months = mathAbs(this._months);\n\n data.milliseconds = mathAbs(data.milliseconds);\n data.seconds = mathAbs(data.seconds);\n data.minutes = mathAbs(data.minutes);\n data.hours = mathAbs(data.hours);\n data.months = mathAbs(data.months);\n data.years = mathAbs(data.years);\n\n return this;\n }\n\n function addSubtract$1(duration, input, value, direction) {\n var other = createDuration(input, value);\n\n duration._milliseconds += direction * other._milliseconds;\n duration._days += direction * other._days;\n duration._months += direction * other._months;\n\n return duration._bubble();\n }\n\n // supports only 2.0-style add(1, 's') or add(duration)\n function add$1(input, value) {\n return addSubtract$1(this, input, value, 1);\n }\n\n // supports only 2.0-style subtract(1, 's') or subtract(duration)\n function subtract$1(input, value) {\n return addSubtract$1(this, input, value, -1);\n }\n\n function absCeil(number) {\n if (number < 0) {\n return Math.floor(number);\n } else {\n return Math.ceil(number);\n }\n }\n\n function bubble() {\n var milliseconds = this._milliseconds,\n days = this._days,\n months = this._months,\n data = this._data,\n seconds,\n minutes,\n hours,\n years,\n monthsFromDays;\n\n // if we have a mix of positive and negative values, bubble down first\n // check: https://github.com/moment/moment/issues/2166\n if (\n !(\n (milliseconds >= 0 && days >= 0 && months >= 0) ||\n (milliseconds <= 0 && days <= 0 && months <= 0)\n )\n ) {\n milliseconds += absCeil(monthsToDays(months) + days) * 864e5;\n days = 0;\n months = 0;\n }\n\n // The following code bubbles up values, see the tests for\n // examples of what that means.\n data.milliseconds = milliseconds % 1000;\n\n seconds = absFloor(milliseconds / 1000);\n data.seconds = seconds % 60;\n\n minutes = absFloor(seconds / 60);\n data.minutes = minutes % 60;\n\n hours = absFloor(minutes / 60);\n data.hours = hours % 24;\n\n days += absFloor(hours / 24);\n\n // convert days to months\n monthsFromDays = absFloor(daysToMonths(days));\n months += monthsFromDays;\n days -= absCeil(monthsToDays(monthsFromDays));\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n data.days = days;\n data.months = months;\n data.years = years;\n\n return this;\n }\n\n function daysToMonths(days) {\n // 400 years have 146097 days (taking into account leap year rules)\n // 400 years have 12 months === 4800\n return (days * 4800) / 146097;\n }\n\n function monthsToDays(months) {\n // the reverse of daysToMonths\n return (months * 146097) / 4800;\n }\n\n function as(units) {\n if (!this.isValid()) {\n return NaN;\n }\n var days,\n months,\n milliseconds = this._milliseconds;\n\n units = normalizeUnits(units);\n\n if (units === 'month' || units === 'quarter' || units === 'year') {\n days = this._days + milliseconds / 864e5;\n months = this._months + daysToMonths(days);\n switch (units) {\n case 'month':\n return months;\n case 'quarter':\n return months / 3;\n case 'year':\n return months / 12;\n }\n } else {\n // handle milliseconds separately because of floating point math errors (issue #1867)\n days = this._days + Math.round(monthsToDays(this._months));\n switch (units) {\n case 'week':\n return days / 7 + milliseconds / 6048e5;\n case 'day':\n return days + milliseconds / 864e5;\n case 'hour':\n return days * 24 + milliseconds / 36e5;\n case 'minute':\n return days * 1440 + milliseconds / 6e4;\n case 'second':\n return days * 86400 + milliseconds / 1000;\n // Math.floor prevents floating point math errors here\n case 'millisecond':\n return Math.floor(days * 864e5) + milliseconds;\n default:\n throw new Error('Unknown unit ' + units);\n }\n }\n }\n\n function makeAs(alias) {\n return function () {\n return this.as(alias);\n };\n }\n\n var asMilliseconds = makeAs('ms'),\n asSeconds = makeAs('s'),\n asMinutes = makeAs('m'),\n asHours = makeAs('h'),\n asDays = makeAs('d'),\n asWeeks = makeAs('w'),\n asMonths = makeAs('M'),\n asQuarters = makeAs('Q'),\n asYears = makeAs('y'),\n valueOf$1 = asMilliseconds;\n\n function clone$1() {\n return createDuration(this);\n }\n\n function get$2(units) {\n units = normalizeUnits(units);\n return this.isValid() ? this[units + 's']() : NaN;\n }\n\n function makeGetter(name) {\n return function () {\n return this.isValid() ? this._data[name] : NaN;\n };\n }\n\n var milliseconds = makeGetter('milliseconds'),\n seconds = makeGetter('seconds'),\n minutes = makeGetter('minutes'),\n hours = makeGetter('hours'),\n days = makeGetter('days'),\n months = makeGetter('months'),\n years = makeGetter('years');\n\n function weeks() {\n return absFloor(this.days() / 7);\n }\n\n var round = Math.round,\n thresholds = {\n ss: 44, // a few seconds to seconds\n s: 45, // seconds to minute\n m: 45, // minutes to hour\n h: 22, // hours to day\n d: 26, // days to month/week\n w: null, // weeks to month\n M: 11, // months to year\n };\n\n // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize\n function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {\n return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);\n }\n\n function relativeTime$1(posNegDuration, withoutSuffix, thresholds, locale) {\n var duration = createDuration(posNegDuration).abs(),\n seconds = round(duration.as('s')),\n minutes = round(duration.as('m')),\n hours = round(duration.as('h')),\n days = round(duration.as('d')),\n months = round(duration.as('M')),\n weeks = round(duration.as('w')),\n years = round(duration.as('y')),\n a =\n (seconds <= thresholds.ss && ['s', seconds]) ||\n (seconds < thresholds.s && ['ss', seconds]) ||\n (minutes <= 1 && ['m']) ||\n (minutes < thresholds.m && ['mm', minutes]) ||\n (hours <= 1 && ['h']) ||\n (hours < thresholds.h && ['hh', hours]) ||\n (days <= 1 && ['d']) ||\n (days < thresholds.d && ['dd', days]);\n\n if (thresholds.w != null) {\n a =\n a ||\n (weeks <= 1 && ['w']) ||\n (weeks < thresholds.w && ['ww', weeks]);\n }\n a = a ||\n (months <= 1 && ['M']) ||\n (months < thresholds.M && ['MM', months]) ||\n (years <= 1 && ['y']) || ['yy', years];\n\n a[2] = withoutSuffix;\n a[3] = +posNegDuration > 0;\n a[4] = locale;\n return substituteTimeAgo.apply(null, a);\n }\n\n // This function allows you to set the rounding function for relative time strings\n function getSetRelativeTimeRounding(roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof roundingFunction === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n }\n\n // This function allows you to set a threshold for relative time strings\n function getSetRelativeTimeThreshold(threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }\n\n function humanize(argWithSuffix, argThresholds) {\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var withSuffix = false,\n th = thresholds,\n locale,\n output;\n\n if (typeof argWithSuffix === 'object') {\n argThresholds = argWithSuffix;\n argWithSuffix = false;\n }\n if (typeof argWithSuffix === 'boolean') {\n withSuffix = argWithSuffix;\n }\n if (typeof argThresholds === 'object') {\n th = Object.assign({}, thresholds, argThresholds);\n if (argThresholds.s != null && argThresholds.ss == null) {\n th.ss = argThresholds.s - 1;\n }\n }\n\n locale = this.localeData();\n output = relativeTime$1(this, !withSuffix, th, locale);\n\n if (withSuffix) {\n output = locale.pastFuture(+this, output);\n }\n\n return locale.postformat(output);\n }\n\n var abs$1 = Math.abs;\n\n function sign(x) {\n return (x > 0) - (x < 0) || +x;\n }\n\n function toISOString$1() {\n // for ISO strings we do not use the normal bubbling rules:\n // * milliseconds bubble up until they become hours\n // * days do not bubble at all\n // * months bubble up until they become years\n // This is because there is no context-free conversion between hours and days\n // (think of clock changes)\n // and also not between days and months (28-31 days per month)\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var seconds = abs$1(this._milliseconds) / 1000,\n days = abs$1(this._days),\n months = abs$1(this._months),\n minutes,\n hours,\n years,\n s,\n total = this.asSeconds(),\n totalSign,\n ymSign,\n daysSign,\n hmsSign;\n\n if (!total) {\n // this is the same as C#'s (Noda) and python (isodate)...\n // but not other JS (goog.date)\n return 'P0D';\n }\n\n // 3600 seconds -> 60 minutes -> 1 hour\n minutes = absFloor(seconds / 60);\n hours = absFloor(minutes / 60);\n seconds %= 60;\n minutes %= 60;\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js\n s = seconds ? seconds.toFixed(3).replace(/\\.?0+$/, '') : '';\n\n totalSign = total < 0 ? '-' : '';\n ymSign = sign(this._months) !== sign(total) ? '-' : '';\n daysSign = sign(this._days) !== sign(total) ? '-' : '';\n hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';\n\n return (\n totalSign +\n 'P' +\n (years ? ymSign + years + 'Y' : '') +\n (months ? ymSign + months + 'M' : '') +\n (days ? daysSign + days + 'D' : '') +\n (hours || minutes || seconds ? 'T' : '') +\n (hours ? hmsSign + hours + 'H' : '') +\n (minutes ? hmsSign + minutes + 'M' : '') +\n (seconds ? hmsSign + s + 'S' : '')\n );\n }\n\n var proto$2 = Duration.prototype;\n\n proto$2.isValid = isValid$1;\n proto$2.abs = abs;\n proto$2.add = add$1;\n proto$2.subtract = subtract$1;\n proto$2.as = as;\n proto$2.asMilliseconds = asMilliseconds;\n proto$2.asSeconds = asSeconds;\n proto$2.asMinutes = asMinutes;\n proto$2.asHours = asHours;\n proto$2.asDays = asDays;\n proto$2.asWeeks = asWeeks;\n proto$2.asMonths = asMonths;\n proto$2.asQuarters = asQuarters;\n proto$2.asYears = asYears;\n proto$2.valueOf = valueOf$1;\n proto$2._bubble = bubble;\n proto$2.clone = clone$1;\n proto$2.get = get$2;\n proto$2.milliseconds = milliseconds;\n proto$2.seconds = seconds;\n proto$2.minutes = minutes;\n proto$2.hours = hours;\n proto$2.days = days;\n proto$2.weeks = weeks;\n proto$2.months = months;\n proto$2.years = years;\n proto$2.humanize = humanize;\n proto$2.toISOString = toISOString$1;\n proto$2.toString = toISOString$1;\n proto$2.toJSON = toISOString$1;\n proto$2.locale = locale;\n proto$2.localeData = localeData;\n\n proto$2.toIsoString = deprecate(\n 'toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)',\n toISOString$1\n );\n proto$2.lang = lang;\n\n // FORMATTING\n\n addFormatToken('X', 0, 0, 'unix');\n addFormatToken('x', 0, 0, 'valueOf');\n\n // PARSING\n\n addRegexToken('x', matchSigned);\n addRegexToken('X', matchTimestamp);\n addParseToken('X', function (input, array, config) {\n config._d = new Date(parseFloat(input) * 1000);\n });\n addParseToken('x', function (input, array, config) {\n config._d = new Date(toInt(input));\n });\n\n //! moment.js\n\n hooks.version = '2.30.1';\n\n setHookCallback(createLocal);\n\n hooks.fn = proto;\n hooks.min = min;\n hooks.max = max;\n hooks.now = now;\n hooks.utc = createUTC;\n hooks.unix = createUnix;\n hooks.months = listMonths;\n hooks.isDate = isDate;\n hooks.locale = getSetGlobalLocale;\n hooks.invalid = createInvalid;\n hooks.duration = createDuration;\n hooks.isMoment = isMoment;\n hooks.weekdays = listWeekdays;\n hooks.parseZone = createInZone;\n hooks.localeData = getLocale;\n hooks.isDuration = isDuration;\n hooks.monthsShort = listMonthsShort;\n hooks.weekdaysMin = listWeekdaysMin;\n hooks.defineLocale = defineLocale;\n hooks.updateLocale = updateLocale;\n hooks.locales = listLocales;\n hooks.weekdaysShort = listWeekdaysShort;\n hooks.normalizeUnits = normalizeUnits;\n hooks.relativeTimeRounding = getSetRelativeTimeRounding;\n hooks.relativeTimeThreshold = getSetRelativeTimeThreshold;\n hooks.calendarFormat = getCalendarFormat;\n hooks.prototype = proto;\n\n // currently HTML5 input type only supports 24-hour formats\n hooks.HTML5_FMT = {\n DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // <input type=\"datetime-local\" />\n DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // <input type=\"datetime-local\" step=\"1\" />\n DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // <input type=\"datetime-local\" step=\"0.001\" />\n DATE: 'YYYY-MM-DD', // <input type=\"date\" />\n TIME: 'HH:mm', // <input type=\"time\" />\n TIME_SECONDS: 'HH:mm:ss', // <input type=\"time\" step=\"1\" />\n TIME_MS: 'HH:mm:ss.SSS', // <input type=\"time\" step=\"0.001\" />\n WEEK: 'GGGG-[W]WW', // <input type=\"week\" />\n MONTH: 'YYYY-MM', // <input type=\"month\" />\n };\n\n return hooks;\n\n})));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/moment/moment.js?", + ); + + /***/ + }, + + /***/ 2128: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + 'use strict'; + eval( + '\n\nvar punycode = __webpack_require__(4876);\nvar mappingTable = __webpack_require__(7963);\n\nvar PROCESSING_OPTIONS = {\n TRANSITIONAL: 0,\n NONTRANSITIONAL: 1\n};\n\nfunction normalize(str) { // fix bug in v8\n return str.split(\'\\u0000\').map(function (s) { return s.normalize(\'NFC\'); }).join(\'\\u0000\');\n}\n\nfunction findStatus(val) {\n var start = 0;\n var end = mappingTable.length - 1;\n\n while (start <= end) {\n var mid = Math.floor((start + end) / 2);\n\n var target = mappingTable[mid];\n if (target[0][0] <= val && target[0][1] >= val) {\n return target;\n } else if (target[0][0] > val) {\n end = mid - 1;\n } else {\n start = mid + 1;\n }\n }\n\n return null;\n}\n\nvar regexAstralSymbols = /[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/g;\n\nfunction countSymbols(string) {\n return string\n // replace every surrogate pair with a BMP symbol\n .replace(regexAstralSymbols, \'_\')\n // then get the length\n .length;\n}\n\nfunction mapChars(domain_name, useSTD3, processing_option) {\n var hasError = false;\n var processed = "";\n\n var len = countSymbols(domain_name);\n for (var i = 0; i < len; ++i) {\n var codePoint = domain_name.codePointAt(i);\n var status = findStatus(codePoint);\n\n switch (status[1]) {\n case "disallowed":\n hasError = true;\n processed += String.fromCodePoint(codePoint);\n break;\n case "ignored":\n break;\n case "mapped":\n processed += String.fromCodePoint.apply(String, status[2]);\n break;\n case "deviation":\n if (processing_option === PROCESSING_OPTIONS.TRANSITIONAL) {\n processed += String.fromCodePoint.apply(String, status[2]);\n } else {\n processed += String.fromCodePoint(codePoint);\n }\n break;\n case "valid":\n processed += String.fromCodePoint(codePoint);\n break;\n case "disallowed_STD3_mapped":\n if (useSTD3) {\n hasError = true;\n processed += String.fromCodePoint(codePoint);\n } else {\n processed += String.fromCodePoint.apply(String, status[2]);\n }\n break;\n case "disallowed_STD3_valid":\n if (useSTD3) {\n hasError = true;\n }\n\n processed += String.fromCodePoint(codePoint);\n break;\n }\n }\n\n return {\n string: processed,\n error: hasError\n };\n}\n\nvar combiningMarksRegex = /[\\u0300-\\u036F\\u0483-\\u0489\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u0610-\\u061A\\u064B-\\u065F\\u0670\\u06D6-\\u06DC\\u06DF-\\u06E4\\u06E7\\u06E8\\u06EA-\\u06ED\\u0711\\u0730-\\u074A\\u07A6-\\u07B0\\u07EB-\\u07F3\\u0816-\\u0819\\u081B-\\u0823\\u0825-\\u0827\\u0829-\\u082D\\u0859-\\u085B\\u08E4-\\u0903\\u093A-\\u093C\\u093E-\\u094F\\u0951-\\u0957\\u0962\\u0963\\u0981-\\u0983\\u09BC\\u09BE-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CD\\u09D7\\u09E2\\u09E3\\u0A01-\\u0A03\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A70\\u0A71\\u0A75\\u0A81-\\u0A83\\u0ABC\\u0ABE-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AE2\\u0AE3\\u0B01-\\u0B03\\u0B3C\\u0B3E-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B56\\u0B57\\u0B62\\u0B63\\u0B82\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD7\\u0C00-\\u0C03\\u0C3E-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C62\\u0C63\\u0C81-\\u0C83\\u0CBC\\u0CBE-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0CE2\\u0CE3\\u0D01-\\u0D03\\u0D3E-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4D\\u0D57\\u0D62\\u0D63\\u0D82\\u0D83\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DF2\\u0DF3\\u0E31\\u0E34-\\u0E3A\\u0E47-\\u0E4E\\u0EB1\\u0EB4-\\u0EB9\\u0EBB\\u0EBC\\u0EC8-\\u0ECD\\u0F18\\u0F19\\u0F35\\u0F37\\u0F39\\u0F3E\\u0F3F\\u0F71-\\u0F84\\u0F86\\u0F87\\u0F8D-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u102B-\\u103E\\u1056-\\u1059\\u105E-\\u1060\\u1062-\\u1064\\u1067-\\u106D\\u1071-\\u1074\\u1082-\\u108D\\u108F\\u109A-\\u109D\\u135D-\\u135F\\u1712-\\u1714\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17B4-\\u17D3\\u17DD\\u180B-\\u180D\\u18A9\\u1920-\\u192B\\u1930-\\u193B\\u19B0-\\u19C0\\u19C8\\u19C9\\u1A17-\\u1A1B\\u1A55-\\u1A5E\\u1A60-\\u1A7C\\u1A7F\\u1AB0-\\u1ABE\\u1B00-\\u1B04\\u1B34-\\u1B44\\u1B6B-\\u1B73\\u1B80-\\u1B82\\u1BA1-\\u1BAD\\u1BE6-\\u1BF3\\u1C24-\\u1C37\\u1CD0-\\u1CD2\\u1CD4-\\u1CE8\\u1CED\\u1CF2-\\u1CF4\\u1CF8\\u1CF9\\u1DC0-\\u1DF5\\u1DFC-\\u1DFF\\u20D0-\\u20F0\\u2CEF-\\u2CF1\\u2D7F\\u2DE0-\\u2DFF\\u302A-\\u302F\\u3099\\u309A\\uA66F-\\uA672\\uA674-\\uA67D\\uA69F\\uA6F0\\uA6F1\\uA802\\uA806\\uA80B\\uA823-\\uA827\\uA880\\uA881\\uA8B4-\\uA8C4\\uA8E0-\\uA8F1\\uA926-\\uA92D\\uA947-\\uA953\\uA980-\\uA983\\uA9B3-\\uA9C0\\uA9E5\\uAA29-\\uAA36\\uAA43\\uAA4C\\uAA4D\\uAA7B-\\uAA7D\\uAAB0\\uAAB2-\\uAAB4\\uAAB7\\uAAB8\\uAABE\\uAABF\\uAAC1\\uAAEB-\\uAAEF\\uAAF5\\uAAF6\\uABE3-\\uABEA\\uABEC\\uABED\\uFB1E\\uFE00-\\uFE0F\\uFE20-\\uFE2D]|\\uD800[\\uDDFD\\uDEE0\\uDF76-\\uDF7A]|\\uD802[\\uDE01-\\uDE03\\uDE05\\uDE06\\uDE0C-\\uDE0F\\uDE38-\\uDE3A\\uDE3F\\uDEE5\\uDEE6]|\\uD804[\\uDC00-\\uDC02\\uDC38-\\uDC46\\uDC7F-\\uDC82\\uDCB0-\\uDCBA\\uDD00-\\uDD02\\uDD27-\\uDD34\\uDD73\\uDD80-\\uDD82\\uDDB3-\\uDDC0\\uDE2C-\\uDE37\\uDEDF-\\uDEEA\\uDF01-\\uDF03\\uDF3C\\uDF3E-\\uDF44\\uDF47\\uDF48\\uDF4B-\\uDF4D\\uDF57\\uDF62\\uDF63\\uDF66-\\uDF6C\\uDF70-\\uDF74]|\\uD805[\\uDCB0-\\uDCC3\\uDDAF-\\uDDB5\\uDDB8-\\uDDC0\\uDE30-\\uDE40\\uDEAB-\\uDEB7]|\\uD81A[\\uDEF0-\\uDEF4\\uDF30-\\uDF36]|\\uD81B[\\uDF51-\\uDF7E\\uDF8F-\\uDF92]|\\uD82F[\\uDC9D\\uDC9E]|\\uD834[\\uDD65-\\uDD69\\uDD6D-\\uDD72\\uDD7B-\\uDD82\\uDD85-\\uDD8B\\uDDAA-\\uDDAD\\uDE42-\\uDE44]|\\uD83A[\\uDCD0-\\uDCD6]|\\uDB40[\\uDD00-\\uDDEF]/;\n\nfunction validateLabel(label, processing_option) {\n if (label.substr(0, 4) === "xn--") {\n label = punycode.toUnicode(label);\n processing_option = PROCESSING_OPTIONS.NONTRANSITIONAL;\n }\n\n var error = false;\n\n if (normalize(label) !== label ||\n (label[3] === "-" && label[4] === "-") ||\n label[0] === "-" || label[label.length - 1] === "-" ||\n label.indexOf(".") !== -1 ||\n label.search(combiningMarksRegex) === 0) {\n error = true;\n }\n\n var len = countSymbols(label);\n for (var i = 0; i < len; ++i) {\n var status = findStatus(label.codePointAt(i));\n if ((processing === PROCESSING_OPTIONS.TRANSITIONAL && status[1] !== "valid") ||\n (processing === PROCESSING_OPTIONS.NONTRANSITIONAL &&\n status[1] !== "valid" && status[1] !== "deviation")) {\n error = true;\n break;\n }\n }\n\n return {\n label: label,\n error: error\n };\n}\n\nfunction processing(domain_name, useSTD3, processing_option) {\n var result = mapChars(domain_name, useSTD3, processing_option);\n result.string = normalize(result.string);\n\n var labels = result.string.split(".");\n for (var i = 0; i < labels.length; ++i) {\n try {\n var validation = validateLabel(labels[i]);\n labels[i] = validation.label;\n result.error = result.error || validation.error;\n } catch(e) {\n result.error = true;\n }\n }\n\n return {\n string: labels.join("."),\n error: result.error\n };\n}\n\nmodule.exports.toASCII = function(domain_name, useSTD3, processing_option, verifyDnsLength) {\n var result = processing(domain_name, useSTD3, processing_option);\n var labels = result.string.split(".");\n labels = labels.map(function(l) {\n try {\n return punycode.toASCII(l);\n } catch(e) {\n result.error = true;\n return l;\n }\n });\n\n if (verifyDnsLength) {\n var total = labels.slice(0, labels.length - 1).join(".").length;\n if (total.length > 253 || total.length === 0) {\n result.error = true;\n }\n\n for (var i=0; i < labels.length; ++i) {\n if (labels.length > 63 || labels.length === 0) {\n result.error = true;\n break;\n }\n }\n }\n\n if (result.error) return null;\n return labels.join(".");\n};\n\nmodule.exports.toUnicode = function(domain_name, useSTD3) {\n var result = processing(domain_name, useSTD3, PROCESSING_OPTIONS.NONTRANSITIONAL);\n\n return {\n domain: result.string,\n error: result.error\n };\n};\n\nmodule.exports.PROCESSING_OPTIONS = PROCESSING_OPTIONS;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/node-fetch/node_modules/tr46/index.js?', + ); + + /***/ + }, + + /***/ 1461: /***/ (module) => { + 'use strict'; + eval( + '\n\nvar conversions = {};\nmodule.exports = conversions;\n\nfunction sign(x) {\n return x < 0 ? -1 : 1;\n}\n\nfunction evenRound(x) {\n // Round x to the nearest integer, choosing the even integer if it lies halfway between two.\n if ((x % 1) === 0.5 && (x & 1) === 0) { // [even number].5; round down (i.e. floor)\n return Math.floor(x);\n } else {\n return Math.round(x);\n }\n}\n\nfunction createNumberConversion(bitLength, typeOpts) {\n if (!typeOpts.unsigned) {\n --bitLength;\n }\n const lowerBound = typeOpts.unsigned ? 0 : -Math.pow(2, bitLength);\n const upperBound = Math.pow(2, bitLength) - 1;\n\n const moduloVal = typeOpts.moduloBitLength ? Math.pow(2, typeOpts.moduloBitLength) : Math.pow(2, bitLength);\n const moduloBound = typeOpts.moduloBitLength ? Math.pow(2, typeOpts.moduloBitLength - 1) : Math.pow(2, bitLength - 1);\n\n return function(V, opts) {\n if (!opts) opts = {};\n\n let x = +V;\n\n if (opts.enforceRange) {\n if (!Number.isFinite(x)) {\n throw new TypeError("Argument is not a finite number");\n }\n\n x = sign(x) * Math.floor(Math.abs(x));\n if (x < lowerBound || x > upperBound) {\n throw new TypeError("Argument is not in byte range");\n }\n\n return x;\n }\n\n if (!isNaN(x) && opts.clamp) {\n x = evenRound(x);\n\n if (x < lowerBound) x = lowerBound;\n if (x > upperBound) x = upperBound;\n return x;\n }\n\n if (!Number.isFinite(x) || x === 0) {\n return 0;\n }\n\n x = sign(x) * Math.floor(Math.abs(x));\n x = x % moduloVal;\n\n if (!typeOpts.unsigned && x >= moduloBound) {\n return x - moduloVal;\n } else if (typeOpts.unsigned) {\n if (x < 0) {\n x += moduloVal;\n } else if (x === -0) { // don\'t return negative zero\n return 0;\n }\n }\n\n return x;\n }\n}\n\nconversions["void"] = function () {\n return undefined;\n};\n\nconversions["boolean"] = function (val) {\n return !!val;\n};\n\nconversions["byte"] = createNumberConversion(8, { unsigned: false });\nconversions["octet"] = createNumberConversion(8, { unsigned: true });\n\nconversions["short"] = createNumberConversion(16, { unsigned: false });\nconversions["unsigned short"] = createNumberConversion(16, { unsigned: true });\n\nconversions["long"] = createNumberConversion(32, { unsigned: false });\nconversions["unsigned long"] = createNumberConversion(32, { unsigned: true });\n\nconversions["long long"] = createNumberConversion(32, { unsigned: false, moduloBitLength: 64 });\nconversions["unsigned long long"] = createNumberConversion(32, { unsigned: true, moduloBitLength: 64 });\n\nconversions["double"] = function (V) {\n const x = +V;\n\n if (!Number.isFinite(x)) {\n throw new TypeError("Argument is not a finite floating-point value");\n }\n\n return x;\n};\n\nconversions["unrestricted double"] = function (V) {\n const x = +V;\n\n if (isNaN(x)) {\n throw new TypeError("Argument is NaN");\n }\n\n return x;\n};\n\n// not quite valid, but good enough for JS\nconversions["float"] = conversions["double"];\nconversions["unrestricted float"] = conversions["unrestricted double"];\n\nconversions["DOMString"] = function (V, opts) {\n if (!opts) opts = {};\n\n if (opts.treatNullAsEmptyString && V === null) {\n return "";\n }\n\n return String(V);\n};\n\nconversions["ByteString"] = function (V, opts) {\n const x = String(V);\n let c = undefined;\n for (let i = 0; (c = x.codePointAt(i)) !== undefined; ++i) {\n if (c > 255) {\n throw new TypeError("Argument is not a valid bytestring");\n }\n }\n\n return x;\n};\n\nconversions["USVString"] = function (V) {\n const S = String(V);\n const n = S.length;\n const U = [];\n for (let i = 0; i < n; ++i) {\n const c = S.charCodeAt(i);\n if (c < 0xD800 || c > 0xDFFF) {\n U.push(String.fromCodePoint(c));\n } else if (0xDC00 <= c && c <= 0xDFFF) {\n U.push(String.fromCodePoint(0xFFFD));\n } else {\n if (i === n - 1) {\n U.push(String.fromCodePoint(0xFFFD));\n } else {\n const d = S.charCodeAt(i + 1);\n if (0xDC00 <= d && d <= 0xDFFF) {\n const a = c & 0x3FF;\n const b = d & 0x3FF;\n U.push(String.fromCodePoint((2 << 15) + (2 << 9) * a + b));\n ++i;\n } else {\n U.push(String.fromCodePoint(0xFFFD));\n }\n }\n }\n }\n\n return U.join(\'\');\n};\n\nconversions["Date"] = function (V, opts) {\n if (!(V instanceof Date)) {\n throw new TypeError("Argument is not a Date object");\n }\n if (isNaN(V)) {\n return undefined;\n }\n\n return V;\n};\n\nconversions["RegExp"] = function (V, opts) {\n if (!(V instanceof RegExp)) {\n V = new RegExp(V);\n }\n\n return V;\n};\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/node-fetch/node_modules/webidl-conversions/lib/index.js?', + ); + + /***/ + }, + + /***/ 8832: /***/ (__unused_webpack_module, exports, __webpack_require__) => { + 'use strict'; + eval( + '\nconst usm = __webpack_require__(4569);\n\nexports.implementation = class URLImpl {\n constructor(constructorArgs) {\n const url = constructorArgs[0];\n const base = constructorArgs[1];\n\n let parsedBase = null;\n if (base !== undefined) {\n parsedBase = usm.basicURLParse(base);\n if (parsedBase === "failure") {\n throw new TypeError("Invalid base URL");\n }\n }\n\n const parsedURL = usm.basicURLParse(url, { baseURL: parsedBase });\n if (parsedURL === "failure") {\n throw new TypeError("Invalid URL");\n }\n\n this._url = parsedURL;\n\n // TODO: query stuff\n }\n\n get href() {\n return usm.serializeURL(this._url);\n }\n\n set href(v) {\n const parsedURL = usm.basicURLParse(v);\n if (parsedURL === "failure") {\n throw new TypeError("Invalid URL");\n }\n\n this._url = parsedURL;\n }\n\n get origin() {\n return usm.serializeURLOrigin(this._url);\n }\n\n get protocol() {\n return this._url.scheme + ":";\n }\n\n set protocol(v) {\n usm.basicURLParse(v + ":", { url: this._url, stateOverride: "scheme start" });\n }\n\n get username() {\n return this._url.username;\n }\n\n set username(v) {\n if (usm.cannotHaveAUsernamePasswordPort(this._url)) {\n return;\n }\n\n usm.setTheUsername(this._url, v);\n }\n\n get password() {\n return this._url.password;\n }\n\n set password(v) {\n if (usm.cannotHaveAUsernamePasswordPort(this._url)) {\n return;\n }\n\n usm.setThePassword(this._url, v);\n }\n\n get host() {\n const url = this._url;\n\n if (url.host === null) {\n return "";\n }\n\n if (url.port === null) {\n return usm.serializeHost(url.host);\n }\n\n return usm.serializeHost(url.host) + ":" + usm.serializeInteger(url.port);\n }\n\n set host(v) {\n if (this._url.cannotBeABaseURL) {\n return;\n }\n\n usm.basicURLParse(v, { url: this._url, stateOverride: "host" });\n }\n\n get hostname() {\n if (this._url.host === null) {\n return "";\n }\n\n return usm.serializeHost(this._url.host);\n }\n\n set hostname(v) {\n if (this._url.cannotBeABaseURL) {\n return;\n }\n\n usm.basicURLParse(v, { url: this._url, stateOverride: "hostname" });\n }\n\n get port() {\n if (this._url.port === null) {\n return "";\n }\n\n return usm.serializeInteger(this._url.port);\n }\n\n set port(v) {\n if (usm.cannotHaveAUsernamePasswordPort(this._url)) {\n return;\n }\n\n if (v === "") {\n this._url.port = null;\n } else {\n usm.basicURLParse(v, { url: this._url, stateOverride: "port" });\n }\n }\n\n get pathname() {\n if (this._url.cannotBeABaseURL) {\n return this._url.path[0];\n }\n\n if (this._url.path.length === 0) {\n return "";\n }\n\n return "/" + this._url.path.join("/");\n }\n\n set pathname(v) {\n if (this._url.cannotBeABaseURL) {\n return;\n }\n\n this._url.path = [];\n usm.basicURLParse(v, { url: this._url, stateOverride: "path start" });\n }\n\n get search() {\n if (this._url.query === null || this._url.query === "") {\n return "";\n }\n\n return "?" + this._url.query;\n }\n\n set search(v) {\n // TODO: query stuff\n\n const url = this._url;\n\n if (v === "") {\n url.query = null;\n return;\n }\n\n const input = v[0] === "?" ? v.substring(1) : v;\n url.query = "";\n usm.basicURLParse(input, { url, stateOverride: "query" });\n }\n\n get hash() {\n if (this._url.fragment === null || this._url.fragment === "") {\n return "";\n }\n\n return "#" + this._url.fragment;\n }\n\n set hash(v) {\n if (v === "") {\n this._url.fragment = null;\n return;\n }\n\n const input = v[0] === "#" ? v.substring(1) : v;\n this._url.fragment = "";\n usm.basicURLParse(input, { url: this._url, stateOverride: "fragment" });\n }\n\n toJSON() {\n return this.href;\n }\n};\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/node-fetch/node_modules/whatwg-url/lib/URL-impl.js?', + ); + + /***/ + }, + + /***/ 8265: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + 'use strict'; + eval( + '\n\nconst conversions = __webpack_require__(1461);\nconst utils = __webpack_require__(8673);\nconst Impl = __webpack_require__(8832);\n\nconst impl = utils.implSymbol;\n\nfunction URL(url) {\n if (!this || this[impl] || !(this instanceof URL)) {\n throw new TypeError("Failed to construct \'URL\': Please use the \'new\' operator, this DOM object constructor cannot be called as a function.");\n }\n if (arguments.length < 1) {\n throw new TypeError("Failed to construct \'URL\': 1 argument required, but only " + arguments.length + " present.");\n }\n const args = [];\n for (let i = 0; i < arguments.length && i < 2; ++i) {\n args[i] = arguments[i];\n }\n args[0] = conversions["USVString"](args[0]);\n if (args[1] !== undefined) {\n args[1] = conversions["USVString"](args[1]);\n }\n\n module.exports.setup(this, args);\n}\n\nURL.prototype.toJSON = function toJSON() {\n if (!this || !module.exports.is(this)) {\n throw new TypeError("Illegal invocation");\n }\n const args = [];\n for (let i = 0; i < arguments.length && i < 0; ++i) {\n args[i] = arguments[i];\n }\n return this[impl].toJSON.apply(this[impl], args);\n};\nObject.defineProperty(URL.prototype, "href", {\n get() {\n return this[impl].href;\n },\n set(V) {\n V = conversions["USVString"](V);\n this[impl].href = V;\n },\n enumerable: true,\n configurable: true\n});\n\nURL.prototype.toString = function () {\n if (!this || !module.exports.is(this)) {\n throw new TypeError("Illegal invocation");\n }\n return this.href;\n};\n\nObject.defineProperty(URL.prototype, "origin", {\n get() {\n return this[impl].origin;\n },\n enumerable: true,\n configurable: true\n});\n\nObject.defineProperty(URL.prototype, "protocol", {\n get() {\n return this[impl].protocol;\n },\n set(V) {\n V = conversions["USVString"](V);\n this[impl].protocol = V;\n },\n enumerable: true,\n configurable: true\n});\n\nObject.defineProperty(URL.prototype, "username", {\n get() {\n return this[impl].username;\n },\n set(V) {\n V = conversions["USVString"](V);\n this[impl].username = V;\n },\n enumerable: true,\n configurable: true\n});\n\nObject.defineProperty(URL.prototype, "password", {\n get() {\n return this[impl].password;\n },\n set(V) {\n V = conversions["USVString"](V);\n this[impl].password = V;\n },\n enumerable: true,\n configurable: true\n});\n\nObject.defineProperty(URL.prototype, "host", {\n get() {\n return this[impl].host;\n },\n set(V) {\n V = conversions["USVString"](V);\n this[impl].host = V;\n },\n enumerable: true,\n configurable: true\n});\n\nObject.defineProperty(URL.prototype, "hostname", {\n get() {\n return this[impl].hostname;\n },\n set(V) {\n V = conversions["USVString"](V);\n this[impl].hostname = V;\n },\n enumerable: true,\n configurable: true\n});\n\nObject.defineProperty(URL.prototype, "port", {\n get() {\n return this[impl].port;\n },\n set(V) {\n V = conversions["USVString"](V);\n this[impl].port = V;\n },\n enumerable: true,\n configurable: true\n});\n\nObject.defineProperty(URL.prototype, "pathname", {\n get() {\n return this[impl].pathname;\n },\n set(V) {\n V = conversions["USVString"](V);\n this[impl].pathname = V;\n },\n enumerable: true,\n configurable: true\n});\n\nObject.defineProperty(URL.prototype, "search", {\n get() {\n return this[impl].search;\n },\n set(V) {\n V = conversions["USVString"](V);\n this[impl].search = V;\n },\n enumerable: true,\n configurable: true\n});\n\nObject.defineProperty(URL.prototype, "hash", {\n get() {\n return this[impl].hash;\n },\n set(V) {\n V = conversions["USVString"](V);\n this[impl].hash = V;\n },\n enumerable: true,\n configurable: true\n});\n\n\nmodule.exports = {\n is(obj) {\n return !!obj && obj[impl] instanceof Impl.implementation;\n },\n create(constructorArgs, privateData) {\n let obj = Object.create(URL.prototype);\n this.setup(obj, constructorArgs, privateData);\n return obj;\n },\n setup(obj, constructorArgs, privateData) {\n if (!privateData) privateData = {};\n privateData.wrapper = obj;\n\n obj[impl] = new Impl.implementation(constructorArgs, privateData);\n obj[impl][utils.wrapperSymbol] = obj;\n },\n interface: URL,\n expose: {\n Window: { URL: URL },\n Worker: { URL: URL }\n }\n};\n\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/node-fetch/node_modules/whatwg-url/lib/URL.js?', + ); + + /***/ + }, + + /***/ 6862: /***/ (__unused_webpack_module, exports, __webpack_require__) => { + 'use strict'; + eval( + '\n\nexports.URL = __webpack_require__(8265)["interface"];\n/* unused reexport */ __webpack_require__(4569).serializeURL;\n/* unused reexport */ __webpack_require__(4569).serializeURLOrigin;\n/* unused reexport */ __webpack_require__(4569).basicURLParse;\n/* unused reexport */ __webpack_require__(4569).setTheUsername;\n/* unused reexport */ __webpack_require__(4569).setThePassword;\n/* unused reexport */ __webpack_require__(4569).serializeHost;\n/* unused reexport */ __webpack_require__(4569).serializeInteger;\n/* unused reexport */ __webpack_require__(4569).parseURL;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/node-fetch/node_modules/whatwg-url/lib/public-api.js?', + ); + + /***/ + }, + + /***/ 4569: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + 'use strict'; + eval( + '\r\nconst punycode = __webpack_require__(4876);\r\nconst tr46 = __webpack_require__(2128);\r\n\r\nconst specialSchemes = {\r\n ftp: 21,\r\n file: null,\r\n gopher: 70,\r\n http: 80,\r\n https: 443,\r\n ws: 80,\r\n wss: 443\r\n};\r\n\r\nconst failure = Symbol("failure");\r\n\r\nfunction countSymbols(str) {\r\n return punycode.ucs2.decode(str).length;\r\n}\r\n\r\nfunction at(input, idx) {\r\n const c = input[idx];\r\n return isNaN(c) ? undefined : String.fromCodePoint(c);\r\n}\r\n\r\nfunction isASCIIDigit(c) {\r\n return c >= 0x30 && c <= 0x39;\r\n}\r\n\r\nfunction isASCIIAlpha(c) {\r\n return (c >= 0x41 && c <= 0x5A) || (c >= 0x61 && c <= 0x7A);\r\n}\r\n\r\nfunction isASCIIAlphanumeric(c) {\r\n return isASCIIAlpha(c) || isASCIIDigit(c);\r\n}\r\n\r\nfunction isASCIIHex(c) {\r\n return isASCIIDigit(c) || (c >= 0x41 && c <= 0x46) || (c >= 0x61 && c <= 0x66);\r\n}\r\n\r\nfunction isSingleDot(buffer) {\r\n return buffer === "." || buffer.toLowerCase() === "%2e";\r\n}\r\n\r\nfunction isDoubleDot(buffer) {\r\n buffer = buffer.toLowerCase();\r\n return buffer === ".." || buffer === "%2e." || buffer === ".%2e" || buffer === "%2e%2e";\r\n}\r\n\r\nfunction isWindowsDriveLetterCodePoints(cp1, cp2) {\r\n return isASCIIAlpha(cp1) && (cp2 === 58 || cp2 === 124);\r\n}\r\n\r\nfunction isWindowsDriveLetterString(string) {\r\n return string.length === 2 && isASCIIAlpha(string.codePointAt(0)) && (string[1] === ":" || string[1] === "|");\r\n}\r\n\r\nfunction isNormalizedWindowsDriveLetterString(string) {\r\n return string.length === 2 && isASCIIAlpha(string.codePointAt(0)) && string[1] === ":";\r\n}\r\n\r\nfunction containsForbiddenHostCodePoint(string) {\r\n return string.search(/\\u0000|\\u0009|\\u000A|\\u000D|\\u0020|#|%|\\/|:|\\?|@|\\[|\\\\|\\]/) !== -1;\r\n}\r\n\r\nfunction containsForbiddenHostCodePointExcludingPercent(string) {\r\n return string.search(/\\u0000|\\u0009|\\u000A|\\u000D|\\u0020|#|\\/|:|\\?|@|\\[|\\\\|\\]/) !== -1;\r\n}\r\n\r\nfunction isSpecialScheme(scheme) {\r\n return specialSchemes[scheme] !== undefined;\r\n}\r\n\r\nfunction isSpecial(url) {\r\n return isSpecialScheme(url.scheme);\r\n}\r\n\r\nfunction defaultPort(scheme) {\r\n return specialSchemes[scheme];\r\n}\r\n\r\nfunction percentEncode(c) {\r\n let hex = c.toString(16).toUpperCase();\r\n if (hex.length === 1) {\r\n hex = "0" + hex;\r\n }\r\n\r\n return "%" + hex;\r\n}\r\n\r\nfunction utf8PercentEncode(c) {\r\n const buf = new Buffer(c);\r\n\r\n let str = "";\r\n\r\n for (let i = 0; i < buf.length; ++i) {\r\n str += percentEncode(buf[i]);\r\n }\r\n\r\n return str;\r\n}\r\n\r\nfunction utf8PercentDecode(str) {\r\n const input = new Buffer(str);\r\n const output = [];\r\n for (let i = 0; i < input.length; ++i) {\r\n if (input[i] !== 37) {\r\n output.push(input[i]);\r\n } else if (input[i] === 37 && isASCIIHex(input[i + 1]) && isASCIIHex(input[i + 2])) {\r\n output.push(parseInt(input.slice(i + 1, i + 3).toString(), 16));\r\n i += 2;\r\n } else {\r\n output.push(input[i]);\r\n }\r\n }\r\n return new Buffer(output).toString();\r\n}\r\n\r\nfunction isC0ControlPercentEncode(c) {\r\n return c <= 0x1F || c > 0x7E;\r\n}\r\n\r\nconst extraPathPercentEncodeSet = new Set([32, 34, 35, 60, 62, 63, 96, 123, 125]);\r\nfunction isPathPercentEncode(c) {\r\n return isC0ControlPercentEncode(c) || extraPathPercentEncodeSet.has(c);\r\n}\r\n\r\nconst extraUserinfoPercentEncodeSet =\r\n new Set([47, 58, 59, 61, 64, 91, 92, 93, 94, 124]);\r\nfunction isUserinfoPercentEncode(c) {\r\n return isPathPercentEncode(c) || extraUserinfoPercentEncodeSet.has(c);\r\n}\r\n\r\nfunction percentEncodeChar(c, encodeSetPredicate) {\r\n const cStr = String.fromCodePoint(c);\r\n\r\n if (encodeSetPredicate(c)) {\r\n return utf8PercentEncode(cStr);\r\n }\r\n\r\n return cStr;\r\n}\r\n\r\nfunction parseIPv4Number(input) {\r\n let R = 10;\r\n\r\n if (input.length >= 2 && input.charAt(0) === "0" && input.charAt(1).toLowerCase() === "x") {\r\n input = input.substring(2);\r\n R = 16;\r\n } else if (input.length >= 2 && input.charAt(0) === "0") {\r\n input = input.substring(1);\r\n R = 8;\r\n }\r\n\r\n if (input === "") {\r\n return 0;\r\n }\r\n\r\n const regex = R === 10 ? /[^0-9]/ : (R === 16 ? /[^0-9A-Fa-f]/ : /[^0-7]/);\r\n if (regex.test(input)) {\r\n return failure;\r\n }\r\n\r\n return parseInt(input, R);\r\n}\r\n\r\nfunction parseIPv4(input) {\r\n const parts = input.split(".");\r\n if (parts[parts.length - 1] === "") {\r\n if (parts.length > 1) {\r\n parts.pop();\r\n }\r\n }\r\n\r\n if (parts.length > 4) {\r\n return input;\r\n }\r\n\r\n const numbers = [];\r\n for (const part of parts) {\r\n if (part === "") {\r\n return input;\r\n }\r\n const n = parseIPv4Number(part);\r\n if (n === failure) {\r\n return input;\r\n }\r\n\r\n numbers.push(n);\r\n }\r\n\r\n for (let i = 0; i < numbers.length - 1; ++i) {\r\n if (numbers[i] > 255) {\r\n return failure;\r\n }\r\n }\r\n if (numbers[numbers.length - 1] >= Math.pow(256, 5 - numbers.length)) {\r\n return failure;\r\n }\r\n\r\n let ipv4 = numbers.pop();\r\n let counter = 0;\r\n\r\n for (const n of numbers) {\r\n ipv4 += n * Math.pow(256, 3 - counter);\r\n ++counter;\r\n }\r\n\r\n return ipv4;\r\n}\r\n\r\nfunction serializeIPv4(address) {\r\n let output = "";\r\n let n = address;\r\n\r\n for (let i = 1; i <= 4; ++i) {\r\n output = String(n % 256) + output;\r\n if (i !== 4) {\r\n output = "." + output;\r\n }\r\n n = Math.floor(n / 256);\r\n }\r\n\r\n return output;\r\n}\r\n\r\nfunction parseIPv6(input) {\r\n const address = [0, 0, 0, 0, 0, 0, 0, 0];\r\n let pieceIndex = 0;\r\n let compress = null;\r\n let pointer = 0;\r\n\r\n input = punycode.ucs2.decode(input);\r\n\r\n if (input[pointer] === 58) {\r\n if (input[pointer + 1] !== 58) {\r\n return failure;\r\n }\r\n\r\n pointer += 2;\r\n ++pieceIndex;\r\n compress = pieceIndex;\r\n }\r\n\r\n while (pointer < input.length) {\r\n if (pieceIndex === 8) {\r\n return failure;\r\n }\r\n\r\n if (input[pointer] === 58) {\r\n if (compress !== null) {\r\n return failure;\r\n }\r\n ++pointer;\r\n ++pieceIndex;\r\n compress = pieceIndex;\r\n continue;\r\n }\r\n\r\n let value = 0;\r\n let length = 0;\r\n\r\n while (length < 4 && isASCIIHex(input[pointer])) {\r\n value = value * 0x10 + parseInt(at(input, pointer), 16);\r\n ++pointer;\r\n ++length;\r\n }\r\n\r\n if (input[pointer] === 46) {\r\n if (length === 0) {\r\n return failure;\r\n }\r\n\r\n pointer -= length;\r\n\r\n if (pieceIndex > 6) {\r\n return failure;\r\n }\r\n\r\n let numbersSeen = 0;\r\n\r\n while (input[pointer] !== undefined) {\r\n let ipv4Piece = null;\r\n\r\n if (numbersSeen > 0) {\r\n if (input[pointer] === 46 && numbersSeen < 4) {\r\n ++pointer;\r\n } else {\r\n return failure;\r\n }\r\n }\r\n\r\n if (!isASCIIDigit(input[pointer])) {\r\n return failure;\r\n }\r\n\r\n while (isASCIIDigit(input[pointer])) {\r\n const number = parseInt(at(input, pointer));\r\n if (ipv4Piece === null) {\r\n ipv4Piece = number;\r\n } else if (ipv4Piece === 0) {\r\n return failure;\r\n } else {\r\n ipv4Piece = ipv4Piece * 10 + number;\r\n }\r\n if (ipv4Piece > 255) {\r\n return failure;\r\n }\r\n ++pointer;\r\n }\r\n\r\n address[pieceIndex] = address[pieceIndex] * 0x100 + ipv4Piece;\r\n\r\n ++numbersSeen;\r\n\r\n if (numbersSeen === 2 || numbersSeen === 4) {\r\n ++pieceIndex;\r\n }\r\n }\r\n\r\n if (numbersSeen !== 4) {\r\n return failure;\r\n }\r\n\r\n break;\r\n } else if (input[pointer] === 58) {\r\n ++pointer;\r\n if (input[pointer] === undefined) {\r\n return failure;\r\n }\r\n } else if (input[pointer] !== undefined) {\r\n return failure;\r\n }\r\n\r\n address[pieceIndex] = value;\r\n ++pieceIndex;\r\n }\r\n\r\n if (compress !== null) {\r\n let swaps = pieceIndex - compress;\r\n pieceIndex = 7;\r\n while (pieceIndex !== 0 && swaps > 0) {\r\n const temp = address[compress + swaps - 1];\r\n address[compress + swaps - 1] = address[pieceIndex];\r\n address[pieceIndex] = temp;\r\n --pieceIndex;\r\n --swaps;\r\n }\r\n } else if (compress === null && pieceIndex !== 8) {\r\n return failure;\r\n }\r\n\r\n return address;\r\n}\r\n\r\nfunction serializeIPv6(address) {\r\n let output = "";\r\n const seqResult = findLongestZeroSequence(address);\r\n const compress = seqResult.idx;\r\n let ignore0 = false;\r\n\r\n for (let pieceIndex = 0; pieceIndex <= 7; ++pieceIndex) {\r\n if (ignore0 && address[pieceIndex] === 0) {\r\n continue;\r\n } else if (ignore0) {\r\n ignore0 = false;\r\n }\r\n\r\n if (compress === pieceIndex) {\r\n const separator = pieceIndex === 0 ? "::" : ":";\r\n output += separator;\r\n ignore0 = true;\r\n continue;\r\n }\r\n\r\n output += address[pieceIndex].toString(16);\r\n\r\n if (pieceIndex !== 7) {\r\n output += ":";\r\n }\r\n }\r\n\r\n return output;\r\n}\r\n\r\nfunction parseHost(input, isSpecialArg) {\r\n if (input[0] === "[") {\r\n if (input[input.length - 1] !== "]") {\r\n return failure;\r\n }\r\n\r\n return parseIPv6(input.substring(1, input.length - 1));\r\n }\r\n\r\n if (!isSpecialArg) {\r\n return parseOpaqueHost(input);\r\n }\r\n\r\n const domain = utf8PercentDecode(input);\r\n const asciiDomain = tr46.toASCII(domain, false, tr46.PROCESSING_OPTIONS.NONTRANSITIONAL, false);\r\n if (asciiDomain === null) {\r\n return failure;\r\n }\r\n\r\n if (containsForbiddenHostCodePoint(asciiDomain)) {\r\n return failure;\r\n }\r\n\r\n const ipv4Host = parseIPv4(asciiDomain);\r\n if (typeof ipv4Host === "number" || ipv4Host === failure) {\r\n return ipv4Host;\r\n }\r\n\r\n return asciiDomain;\r\n}\r\n\r\nfunction parseOpaqueHost(input) {\r\n if (containsForbiddenHostCodePointExcludingPercent(input)) {\r\n return failure;\r\n }\r\n\r\n let output = "";\r\n const decoded = punycode.ucs2.decode(input);\r\n for (let i = 0; i < decoded.length; ++i) {\r\n output += percentEncodeChar(decoded[i], isC0ControlPercentEncode);\r\n }\r\n return output;\r\n}\r\n\r\nfunction findLongestZeroSequence(arr) {\r\n let maxIdx = null;\r\n let maxLen = 1; // only find elements > 1\r\n let currStart = null;\r\n let currLen = 0;\r\n\r\n for (let i = 0; i < arr.length; ++i) {\r\n if (arr[i] !== 0) {\r\n if (currLen > maxLen) {\r\n maxIdx = currStart;\r\n maxLen = currLen;\r\n }\r\n\r\n currStart = null;\r\n currLen = 0;\r\n } else {\r\n if (currStart === null) {\r\n currStart = i;\r\n }\r\n ++currLen;\r\n }\r\n }\r\n\r\n // if trailing zeros\r\n if (currLen > maxLen) {\r\n maxIdx = currStart;\r\n maxLen = currLen;\r\n }\r\n\r\n return {\r\n idx: maxIdx,\r\n len: maxLen\r\n };\r\n}\r\n\r\nfunction serializeHost(host) {\r\n if (typeof host === "number") {\r\n return serializeIPv4(host);\r\n }\r\n\r\n // IPv6 serializer\r\n if (host instanceof Array) {\r\n return "[" + serializeIPv6(host) + "]";\r\n }\r\n\r\n return host;\r\n}\r\n\r\nfunction trimControlChars(url) {\r\n return url.replace(/^[\\u0000-\\u001F\\u0020]+|[\\u0000-\\u001F\\u0020]+$/g, "");\r\n}\r\n\r\nfunction trimTabAndNewline(url) {\r\n return url.replace(/\\u0009|\\u000A|\\u000D/g, "");\r\n}\r\n\r\nfunction shortenPath(url) {\r\n const path = url.path;\r\n if (path.length === 0) {\r\n return;\r\n }\r\n if (url.scheme === "file" && path.length === 1 && isNormalizedWindowsDriveLetter(path[0])) {\r\n return;\r\n }\r\n\r\n path.pop();\r\n}\r\n\r\nfunction includesCredentials(url) {\r\n return url.username !== "" || url.password !== "";\r\n}\r\n\r\nfunction cannotHaveAUsernamePasswordPort(url) {\r\n return url.host === null || url.host === "" || url.cannotBeABaseURL || url.scheme === "file";\r\n}\r\n\r\nfunction isNormalizedWindowsDriveLetter(string) {\r\n return /^[A-Za-z]:$/.test(string);\r\n}\r\n\r\nfunction URLStateMachine(input, base, encodingOverride, url, stateOverride) {\r\n this.pointer = 0;\r\n this.input = input;\r\n this.base = base || null;\r\n this.encodingOverride = encodingOverride || "utf-8";\r\n this.stateOverride = stateOverride;\r\n this.url = url;\r\n this.failure = false;\r\n this.parseError = false;\r\n\r\n if (!this.url) {\r\n this.url = {\r\n scheme: "",\r\n username: "",\r\n password: "",\r\n host: null,\r\n port: null,\r\n path: [],\r\n query: null,\r\n fragment: null,\r\n\r\n cannotBeABaseURL: false\r\n };\r\n\r\n const res = trimControlChars(this.input);\r\n if (res !== this.input) {\r\n this.parseError = true;\r\n }\r\n this.input = res;\r\n }\r\n\r\n const res = trimTabAndNewline(this.input);\r\n if (res !== this.input) {\r\n this.parseError = true;\r\n }\r\n this.input = res;\r\n\r\n this.state = stateOverride || "scheme start";\r\n\r\n this.buffer = "";\r\n this.atFlag = false;\r\n this.arrFlag = false;\r\n this.passwordTokenSeenFlag = false;\r\n\r\n this.input = punycode.ucs2.decode(this.input);\r\n\r\n for (; this.pointer <= this.input.length; ++this.pointer) {\r\n const c = this.input[this.pointer];\r\n const cStr = isNaN(c) ? undefined : String.fromCodePoint(c);\r\n\r\n // exec state machine\r\n const ret = this["parse " + this.state](c, cStr);\r\n if (!ret) {\r\n break; // terminate algorithm\r\n } else if (ret === failure) {\r\n this.failure = true;\r\n break;\r\n }\r\n }\r\n}\r\n\r\nURLStateMachine.prototype["parse scheme start"] = function parseSchemeStart(c, cStr) {\r\n if (isASCIIAlpha(c)) {\r\n this.buffer += cStr.toLowerCase();\r\n this.state = "scheme";\r\n } else if (!this.stateOverride) {\r\n this.state = "no scheme";\r\n --this.pointer;\r\n } else {\r\n this.parseError = true;\r\n return failure;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype["parse scheme"] = function parseScheme(c, cStr) {\r\n if (isASCIIAlphanumeric(c) || c === 43 || c === 45 || c === 46) {\r\n this.buffer += cStr.toLowerCase();\r\n } else if (c === 58) {\r\n if (this.stateOverride) {\r\n if (isSpecial(this.url) && !isSpecialScheme(this.buffer)) {\r\n return false;\r\n }\r\n\r\n if (!isSpecial(this.url) && isSpecialScheme(this.buffer)) {\r\n return false;\r\n }\r\n\r\n if ((includesCredentials(this.url) || this.url.port !== null) && this.buffer === "file") {\r\n return false;\r\n }\r\n\r\n if (this.url.scheme === "file" && (this.url.host === "" || this.url.host === null)) {\r\n return false;\r\n }\r\n }\r\n this.url.scheme = this.buffer;\r\n this.buffer = "";\r\n if (this.stateOverride) {\r\n return false;\r\n }\r\n if (this.url.scheme === "file") {\r\n if (this.input[this.pointer + 1] !== 47 || this.input[this.pointer + 2] !== 47) {\r\n this.parseError = true;\r\n }\r\n this.state = "file";\r\n } else if (isSpecial(this.url) && this.base !== null && this.base.scheme === this.url.scheme) {\r\n this.state = "special relative or authority";\r\n } else if (isSpecial(this.url)) {\r\n this.state = "special authority slashes";\r\n } else if (this.input[this.pointer + 1] === 47) {\r\n this.state = "path or authority";\r\n ++this.pointer;\r\n } else {\r\n this.url.cannotBeABaseURL = true;\r\n this.url.path.push("");\r\n this.state = "cannot-be-a-base-URL path";\r\n }\r\n } else if (!this.stateOverride) {\r\n this.buffer = "";\r\n this.state = "no scheme";\r\n this.pointer = -1;\r\n } else {\r\n this.parseError = true;\r\n return failure;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype["parse no scheme"] = function parseNoScheme(c) {\r\n if (this.base === null || (this.base.cannotBeABaseURL && c !== 35)) {\r\n return failure;\r\n } else if (this.base.cannotBeABaseURL && c === 35) {\r\n this.url.scheme = this.base.scheme;\r\n this.url.path = this.base.path.slice();\r\n this.url.query = this.base.query;\r\n this.url.fragment = "";\r\n this.url.cannotBeABaseURL = true;\r\n this.state = "fragment";\r\n } else if (this.base.scheme === "file") {\r\n this.state = "file";\r\n --this.pointer;\r\n } else {\r\n this.state = "relative";\r\n --this.pointer;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype["parse special relative or authority"] = function parseSpecialRelativeOrAuthority(c) {\r\n if (c === 47 && this.input[this.pointer + 1] === 47) {\r\n this.state = "special authority ignore slashes";\r\n ++this.pointer;\r\n } else {\r\n this.parseError = true;\r\n this.state = "relative";\r\n --this.pointer;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype["parse path or authority"] = function parsePathOrAuthority(c) {\r\n if (c === 47) {\r\n this.state = "authority";\r\n } else {\r\n this.state = "path";\r\n --this.pointer;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype["parse relative"] = function parseRelative(c) {\r\n this.url.scheme = this.base.scheme;\r\n if (isNaN(c)) {\r\n this.url.username = this.base.username;\r\n this.url.password = this.base.password;\r\n this.url.host = this.base.host;\r\n this.url.port = this.base.port;\r\n this.url.path = this.base.path.slice();\r\n this.url.query = this.base.query;\r\n } else if (c === 47) {\r\n this.state = "relative slash";\r\n } else if (c === 63) {\r\n this.url.username = this.base.username;\r\n this.url.password = this.base.password;\r\n this.url.host = this.base.host;\r\n this.url.port = this.base.port;\r\n this.url.path = this.base.path.slice();\r\n this.url.query = "";\r\n this.state = "query";\r\n } else if (c === 35) {\r\n this.url.username = this.base.username;\r\n this.url.password = this.base.password;\r\n this.url.host = this.base.host;\r\n this.url.port = this.base.port;\r\n this.url.path = this.base.path.slice();\r\n this.url.query = this.base.query;\r\n this.url.fragment = "";\r\n this.state = "fragment";\r\n } else if (isSpecial(this.url) && c === 92) {\r\n this.parseError = true;\r\n this.state = "relative slash";\r\n } else {\r\n this.url.username = this.base.username;\r\n this.url.password = this.base.password;\r\n this.url.host = this.base.host;\r\n this.url.port = this.base.port;\r\n this.url.path = this.base.path.slice(0, this.base.path.length - 1);\r\n\r\n this.state = "path";\r\n --this.pointer;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype["parse relative slash"] = function parseRelativeSlash(c) {\r\n if (isSpecial(this.url) && (c === 47 || c === 92)) {\r\n if (c === 92) {\r\n this.parseError = true;\r\n }\r\n this.state = "special authority ignore slashes";\r\n } else if (c === 47) {\r\n this.state = "authority";\r\n } else {\r\n this.url.username = this.base.username;\r\n this.url.password = this.base.password;\r\n this.url.host = this.base.host;\r\n this.url.port = this.base.port;\r\n this.state = "path";\r\n --this.pointer;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype["parse special authority slashes"] = function parseSpecialAuthoritySlashes(c) {\r\n if (c === 47 && this.input[this.pointer + 1] === 47) {\r\n this.state = "special authority ignore slashes";\r\n ++this.pointer;\r\n } else {\r\n this.parseError = true;\r\n this.state = "special authority ignore slashes";\r\n --this.pointer;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype["parse special authority ignore slashes"] = function parseSpecialAuthorityIgnoreSlashes(c) {\r\n if (c !== 47 && c !== 92) {\r\n this.state = "authority";\r\n --this.pointer;\r\n } else {\r\n this.parseError = true;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype["parse authority"] = function parseAuthority(c, cStr) {\r\n if (c === 64) {\r\n this.parseError = true;\r\n if (this.atFlag) {\r\n this.buffer = "%40" + this.buffer;\r\n }\r\n this.atFlag = true;\r\n\r\n // careful, this is based on buffer and has its own pointer (this.pointer != pointer) and inner chars\r\n const len = countSymbols(this.buffer);\r\n for (let pointer = 0; pointer < len; ++pointer) {\r\n const codePoint = this.buffer.codePointAt(pointer);\r\n\r\n if (codePoint === 58 && !this.passwordTokenSeenFlag) {\r\n this.passwordTokenSeenFlag = true;\r\n continue;\r\n }\r\n const encodedCodePoints = percentEncodeChar(codePoint, isUserinfoPercentEncode);\r\n if (this.passwordTokenSeenFlag) {\r\n this.url.password += encodedCodePoints;\r\n } else {\r\n this.url.username += encodedCodePoints;\r\n }\r\n }\r\n this.buffer = "";\r\n } else if (isNaN(c) || c === 47 || c === 63 || c === 35 ||\r\n (isSpecial(this.url) && c === 92)) {\r\n if (this.atFlag && this.buffer === "") {\r\n this.parseError = true;\r\n return failure;\r\n }\r\n this.pointer -= countSymbols(this.buffer) + 1;\r\n this.buffer = "";\r\n this.state = "host";\r\n } else {\r\n this.buffer += cStr;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype["parse hostname"] =\r\nURLStateMachine.prototype["parse host"] = function parseHostName(c, cStr) {\r\n if (this.stateOverride && this.url.scheme === "file") {\r\n --this.pointer;\r\n this.state = "file host";\r\n } else if (c === 58 && !this.arrFlag) {\r\n if (this.buffer === "") {\r\n this.parseError = true;\r\n return failure;\r\n }\r\n\r\n const host = parseHost(this.buffer, isSpecial(this.url));\r\n if (host === failure) {\r\n return failure;\r\n }\r\n\r\n this.url.host = host;\r\n this.buffer = "";\r\n this.state = "port";\r\n if (this.stateOverride === "hostname") {\r\n return false;\r\n }\r\n } else if (isNaN(c) || c === 47 || c === 63 || c === 35 ||\r\n (isSpecial(this.url) && c === 92)) {\r\n --this.pointer;\r\n if (isSpecial(this.url) && this.buffer === "") {\r\n this.parseError = true;\r\n return failure;\r\n } else if (this.stateOverride && this.buffer === "" &&\r\n (includesCredentials(this.url) || this.url.port !== null)) {\r\n this.parseError = true;\r\n return false;\r\n }\r\n\r\n const host = parseHost(this.buffer, isSpecial(this.url));\r\n if (host === failure) {\r\n return failure;\r\n }\r\n\r\n this.url.host = host;\r\n this.buffer = "";\r\n this.state = "path start";\r\n if (this.stateOverride) {\r\n return false;\r\n }\r\n } else {\r\n if (c === 91) {\r\n this.arrFlag = true;\r\n } else if (c === 93) {\r\n this.arrFlag = false;\r\n }\r\n this.buffer += cStr;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype["parse port"] = function parsePort(c, cStr) {\r\n if (isASCIIDigit(c)) {\r\n this.buffer += cStr;\r\n } else if (isNaN(c) || c === 47 || c === 63 || c === 35 ||\r\n (isSpecial(this.url) && c === 92) ||\r\n this.stateOverride) {\r\n if (this.buffer !== "") {\r\n const port = parseInt(this.buffer);\r\n if (port > Math.pow(2, 16) - 1) {\r\n this.parseError = true;\r\n return failure;\r\n }\r\n this.url.port = port === defaultPort(this.url.scheme) ? null : port;\r\n this.buffer = "";\r\n }\r\n if (this.stateOverride) {\r\n return false;\r\n }\r\n this.state = "path start";\r\n --this.pointer;\r\n } else {\r\n this.parseError = true;\r\n return failure;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nconst fileOtherwiseCodePoints = new Set([47, 92, 63, 35]);\r\n\r\nURLStateMachine.prototype["parse file"] = function parseFile(c) {\r\n this.url.scheme = "file";\r\n\r\n if (c === 47 || c === 92) {\r\n if (c === 92) {\r\n this.parseError = true;\r\n }\r\n this.state = "file slash";\r\n } else if (this.base !== null && this.base.scheme === "file") {\r\n if (isNaN(c)) {\r\n this.url.host = this.base.host;\r\n this.url.path = this.base.path.slice();\r\n this.url.query = this.base.query;\r\n } else if (c === 63) {\r\n this.url.host = this.base.host;\r\n this.url.path = this.base.path.slice();\r\n this.url.query = "";\r\n this.state = "query";\r\n } else if (c === 35) {\r\n this.url.host = this.base.host;\r\n this.url.path = this.base.path.slice();\r\n this.url.query = this.base.query;\r\n this.url.fragment = "";\r\n this.state = "fragment";\r\n } else {\r\n if (this.input.length - this.pointer - 1 === 0 || // remaining consists of 0 code points\r\n !isWindowsDriveLetterCodePoints(c, this.input[this.pointer + 1]) ||\r\n (this.input.length - this.pointer - 1 >= 2 && // remaining has at least 2 code points\r\n !fileOtherwiseCodePoints.has(this.input[this.pointer + 2]))) {\r\n this.url.host = this.base.host;\r\n this.url.path = this.base.path.slice();\r\n shortenPath(this.url);\r\n } else {\r\n this.parseError = true;\r\n }\r\n\r\n this.state = "path";\r\n --this.pointer;\r\n }\r\n } else {\r\n this.state = "path";\r\n --this.pointer;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype["parse file slash"] = function parseFileSlash(c) {\r\n if (c === 47 || c === 92) {\r\n if (c === 92) {\r\n this.parseError = true;\r\n }\r\n this.state = "file host";\r\n } else {\r\n if (this.base !== null && this.base.scheme === "file") {\r\n if (isNormalizedWindowsDriveLetterString(this.base.path[0])) {\r\n this.url.path.push(this.base.path[0]);\r\n } else {\r\n this.url.host = this.base.host;\r\n }\r\n }\r\n this.state = "path";\r\n --this.pointer;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype["parse file host"] = function parseFileHost(c, cStr) {\r\n if (isNaN(c) || c === 47 || c === 92 || c === 63 || c === 35) {\r\n --this.pointer;\r\n if (!this.stateOverride && isWindowsDriveLetterString(this.buffer)) {\r\n this.parseError = true;\r\n this.state = "path";\r\n } else if (this.buffer === "") {\r\n this.url.host = "";\r\n if (this.stateOverride) {\r\n return false;\r\n }\r\n this.state = "path start";\r\n } else {\r\n let host = parseHost(this.buffer, isSpecial(this.url));\r\n if (host === failure) {\r\n return failure;\r\n }\r\n if (host === "localhost") {\r\n host = "";\r\n }\r\n this.url.host = host;\r\n\r\n if (this.stateOverride) {\r\n return false;\r\n }\r\n\r\n this.buffer = "";\r\n this.state = "path start";\r\n }\r\n } else {\r\n this.buffer += cStr;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype["parse path start"] = function parsePathStart(c) {\r\n if (isSpecial(this.url)) {\r\n if (c === 92) {\r\n this.parseError = true;\r\n }\r\n this.state = "path";\r\n\r\n if (c !== 47 && c !== 92) {\r\n --this.pointer;\r\n }\r\n } else if (!this.stateOverride && c === 63) {\r\n this.url.query = "";\r\n this.state = "query";\r\n } else if (!this.stateOverride && c === 35) {\r\n this.url.fragment = "";\r\n this.state = "fragment";\r\n } else if (c !== undefined) {\r\n this.state = "path";\r\n if (c !== 47) {\r\n --this.pointer;\r\n }\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype["parse path"] = function parsePath(c) {\r\n if (isNaN(c) || c === 47 || (isSpecial(this.url) && c === 92) ||\r\n (!this.stateOverride && (c === 63 || c === 35))) {\r\n if (isSpecial(this.url) && c === 92) {\r\n this.parseError = true;\r\n }\r\n\r\n if (isDoubleDot(this.buffer)) {\r\n shortenPath(this.url);\r\n if (c !== 47 && !(isSpecial(this.url) && c === 92)) {\r\n this.url.path.push("");\r\n }\r\n } else if (isSingleDot(this.buffer) && c !== 47 &&\r\n !(isSpecial(this.url) && c === 92)) {\r\n this.url.path.push("");\r\n } else if (!isSingleDot(this.buffer)) {\r\n if (this.url.scheme === "file" && this.url.path.length === 0 && isWindowsDriveLetterString(this.buffer)) {\r\n if (this.url.host !== "" && this.url.host !== null) {\r\n this.parseError = true;\r\n this.url.host = "";\r\n }\r\n this.buffer = this.buffer[0] + ":";\r\n }\r\n this.url.path.push(this.buffer);\r\n }\r\n this.buffer = "";\r\n if (this.url.scheme === "file" && (c === undefined || c === 63 || c === 35)) {\r\n while (this.url.path.length > 1 && this.url.path[0] === "") {\r\n this.parseError = true;\r\n this.url.path.shift();\r\n }\r\n }\r\n if (c === 63) {\r\n this.url.query = "";\r\n this.state = "query";\r\n }\r\n if (c === 35) {\r\n this.url.fragment = "";\r\n this.state = "fragment";\r\n }\r\n } else {\r\n // TODO: If c is not a URL code point and not "%", parse error.\r\n\r\n if (c === 37 &&\r\n (!isASCIIHex(this.input[this.pointer + 1]) ||\r\n !isASCIIHex(this.input[this.pointer + 2]))) {\r\n this.parseError = true;\r\n }\r\n\r\n this.buffer += percentEncodeChar(c, isPathPercentEncode);\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype["parse cannot-be-a-base-URL path"] = function parseCannotBeABaseURLPath(c) {\r\n if (c === 63) {\r\n this.url.query = "";\r\n this.state = "query";\r\n } else if (c === 35) {\r\n this.url.fragment = "";\r\n this.state = "fragment";\r\n } else {\r\n // TODO: Add: not a URL code point\r\n if (!isNaN(c) && c !== 37) {\r\n this.parseError = true;\r\n }\r\n\r\n if (c === 37 &&\r\n (!isASCIIHex(this.input[this.pointer + 1]) ||\r\n !isASCIIHex(this.input[this.pointer + 2]))) {\r\n this.parseError = true;\r\n }\r\n\r\n if (!isNaN(c)) {\r\n this.url.path[0] = this.url.path[0] + percentEncodeChar(c, isC0ControlPercentEncode);\r\n }\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype["parse query"] = function parseQuery(c, cStr) {\r\n if (isNaN(c) || (!this.stateOverride && c === 35)) {\r\n if (!isSpecial(this.url) || this.url.scheme === "ws" || this.url.scheme === "wss") {\r\n this.encodingOverride = "utf-8";\r\n }\r\n\r\n const buffer = new Buffer(this.buffer); // TODO: Use encoding override instead\r\n for (let i = 0; i < buffer.length; ++i) {\r\n if (buffer[i] < 0x21 || buffer[i] > 0x7E || buffer[i] === 0x22 || buffer[i] === 0x23 ||\r\n buffer[i] === 0x3C || buffer[i] === 0x3E) {\r\n this.url.query += percentEncode(buffer[i]);\r\n } else {\r\n this.url.query += String.fromCodePoint(buffer[i]);\r\n }\r\n }\r\n\r\n this.buffer = "";\r\n if (c === 35) {\r\n this.url.fragment = "";\r\n this.state = "fragment";\r\n }\r\n } else {\r\n // TODO: If c is not a URL code point and not "%", parse error.\r\n if (c === 37 &&\r\n (!isASCIIHex(this.input[this.pointer + 1]) ||\r\n !isASCIIHex(this.input[this.pointer + 2]))) {\r\n this.parseError = true;\r\n }\r\n\r\n this.buffer += cStr;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype["parse fragment"] = function parseFragment(c) {\r\n if (isNaN(c)) { // do nothing\r\n } else if (c === 0x0) {\r\n this.parseError = true;\r\n } else {\r\n // TODO: If c is not a URL code point and not "%", parse error.\r\n if (c === 37 &&\r\n (!isASCIIHex(this.input[this.pointer + 1]) ||\r\n !isASCIIHex(this.input[this.pointer + 2]))) {\r\n this.parseError = true;\r\n }\r\n\r\n this.url.fragment += percentEncodeChar(c, isC0ControlPercentEncode);\r\n }\r\n\r\n return true;\r\n};\r\n\r\nfunction serializeURL(url, excludeFragment) {\r\n let output = url.scheme + ":";\r\n if (url.host !== null) {\r\n output += "//";\r\n\r\n if (url.username !== "" || url.password !== "") {\r\n output += url.username;\r\n if (url.password !== "") {\r\n output += ":" + url.password;\r\n }\r\n output += "@";\r\n }\r\n\r\n output += serializeHost(url.host);\r\n\r\n if (url.port !== null) {\r\n output += ":" + url.port;\r\n }\r\n } else if (url.host === null && url.scheme === "file") {\r\n output += "//";\r\n }\r\n\r\n if (url.cannotBeABaseURL) {\r\n output += url.path[0];\r\n } else {\r\n for (const string of url.path) {\r\n output += "/" + string;\r\n }\r\n }\r\n\r\n if (url.query !== null) {\r\n output += "?" + url.query;\r\n }\r\n\r\n if (!excludeFragment && url.fragment !== null) {\r\n output += "#" + url.fragment;\r\n }\r\n\r\n return output;\r\n}\r\n\r\nfunction serializeOrigin(tuple) {\r\n let result = tuple.scheme + "://";\r\n result += serializeHost(tuple.host);\r\n\r\n if (tuple.port !== null) {\r\n result += ":" + tuple.port;\r\n }\r\n\r\n return result;\r\n}\r\n\r\nmodule.exports.serializeURL = serializeURL;\r\n\r\nmodule.exports.serializeURLOrigin = function (url) {\r\n // https://url.spec.whatwg.org/#concept-url-origin\r\n switch (url.scheme) {\r\n case "blob":\r\n try {\r\n return module.exports.serializeURLOrigin(module.exports.parseURL(url.path[0]));\r\n } catch (e) {\r\n // serializing an opaque origin returns "null"\r\n return "null";\r\n }\r\n case "ftp":\r\n case "gopher":\r\n case "http":\r\n case "https":\r\n case "ws":\r\n case "wss":\r\n return serializeOrigin({\r\n scheme: url.scheme,\r\n host: url.host,\r\n port: url.port\r\n });\r\n case "file":\r\n // spec says "exercise to the reader", chrome says "file://"\r\n return "file://";\r\n default:\r\n // serializing an opaque origin returns "null"\r\n return "null";\r\n }\r\n};\r\n\r\nmodule.exports.basicURLParse = function (input, options) {\r\n if (options === undefined) {\r\n options = {};\r\n }\r\n\r\n const usm = new URLStateMachine(input, options.baseURL, options.encodingOverride, options.url, options.stateOverride);\r\n if (usm.failure) {\r\n return "failure";\r\n }\r\n\r\n return usm.url;\r\n};\r\n\r\nmodule.exports.setTheUsername = function (url, username) {\r\n url.username = "";\r\n const decoded = punycode.ucs2.decode(username);\r\n for (let i = 0; i < decoded.length; ++i) {\r\n url.username += percentEncodeChar(decoded[i], isUserinfoPercentEncode);\r\n }\r\n};\r\n\r\nmodule.exports.setThePassword = function (url, password) {\r\n url.password = "";\r\n const decoded = punycode.ucs2.decode(password);\r\n for (let i = 0; i < decoded.length; ++i) {\r\n url.password += percentEncodeChar(decoded[i], isUserinfoPercentEncode);\r\n }\r\n};\r\n\r\nmodule.exports.serializeHost = serializeHost;\r\n\r\nmodule.exports.cannotHaveAUsernamePasswordPort = cannotHaveAUsernamePasswordPort;\r\n\r\nmodule.exports.serializeInteger = function (integer) {\r\n return String(integer);\r\n};\r\n\r\nmodule.exports.parseURL = function (input, options) {\r\n if (options === undefined) {\r\n options = {};\r\n }\r\n\r\n // We don\'t handle blobs, so this just delegates:\r\n return module.exports.basicURLParse(input, { baseURL: options.baseURL, encodingOverride: options.encodingOverride });\r\n};\r\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/node-fetch/node_modules/whatwg-url/lib/url-state-machine.js?', + ); + + /***/ + }, + + /***/ 8673: /***/ (module) => { + 'use strict'; + eval( + '\n\nmodule.exports.mixin = function mixin(target, source) {\n const keys = Object.getOwnPropertyNames(source);\n for (let i = 0; i < keys.length; ++i) {\n Object.defineProperty(target, keys[i], Object.getOwnPropertyDescriptor(source, keys[i]));\n }\n};\n\nmodule.exports.wrapperSymbol = Symbol("wrapper");\nmodule.exports.implSymbol = Symbol("impl");\n\nmodule.exports.wrapperForImpl = function (impl) {\n return impl[module.exports.wrapperSymbol];\n};\n\nmodule.exports.implForWrapper = function (wrapper) {\n return wrapper[module.exports.implSymbol];\n};\n\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/node-fetch/node_modules/whatwg-url/lib/utils.js?', + ); + + /***/ + }, + + /***/ 5228: /***/ (module) => { + 'use strict'; + eval( + "/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/object-assign/index.js?", + ); + + /***/ + }, + + /***/ 228: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + 'use strict'; + eval( + "/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\nvar printWarning = function() {};\n\nif (true) {\n var ReactPropTypesSecret = __webpack_require__(6925);\n var loggedTypeFailures = {};\n var has = __webpack_require__(9376);\n\n printWarning = function(text) {\n var message = 'Warning: ' + text;\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) { /**/ }\n };\n}\n\n/**\n * Assert that the values match with the type specs.\n * Error messages are memorized and will only be shown once.\n *\n * @param {object} typeSpecs Map of name to a ReactPropType\n * @param {object} values Runtime values that need to be type-checked\n * @param {string} location e.g. \"prop\", \"context\", \"child context\"\n * @param {string} componentName Name of the component for error messages.\n * @param {?Function} getStack Returns the component stack.\n * @private\n */\nfunction checkPropTypes(typeSpecs, values, location, componentName, getStack) {\n if (true) {\n for (var typeSpecName in typeSpecs) {\n if (has(typeSpecs, typeSpecName)) {\n var error;\n // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n if (typeof typeSpecs[typeSpecName] !== 'function') {\n var err = Error(\n (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +\n 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' +\n 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'\n );\n err.name = 'Invariant Violation';\n throw err;\n }\n error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);\n } catch (ex) {\n error = ex;\n }\n if (error && !(error instanceof Error)) {\n printWarning(\n (componentName || 'React class') + ': type specification of ' +\n location + ' `' + typeSpecName + '` is invalid; the type checker ' +\n 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +\n 'You may have forgotten to pass an argument to the type checker ' +\n 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +\n 'shape all require an argument).'\n );\n }\n if (error instanceof Error && !(error.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error.message] = true;\n\n var stack = getStack ? getStack() : '';\n\n printWarning(\n 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')\n );\n }\n }\n }\n }\n}\n\n/**\n * Resets warning cache when testing.\n *\n * @private\n */\ncheckPropTypes.resetWarningCache = function() {\n if (true) {\n loggedTypeFailures = {};\n }\n}\n\nmodule.exports = checkPropTypes;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/prop-types/checkPropTypes.js?", + ); + + /***/ + }, + + /***/ 4574: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + 'use strict'; + eval( + "/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\nvar ReactIs = __webpack_require__(4363);\nvar assign = __webpack_require__(5228);\n\nvar ReactPropTypesSecret = __webpack_require__(6925);\nvar has = __webpack_require__(9376);\nvar checkPropTypes = __webpack_require__(228);\n\nvar printWarning = function() {};\n\nif (true) {\n printWarning = function(text) {\n var message = 'Warning: ' + text;\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n };\n}\n\nfunction emptyFunctionThatReturnsNull() {\n return null;\n}\n\nmodule.exports = function(isValidElement, throwOnDirectAccess) {\n /* global Symbol */\n var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\n var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.\n\n /**\n * Returns the iterator method function contained on the iterable object.\n *\n * Be sure to invoke the function with the iterable as context:\n *\n * var iteratorFn = getIteratorFn(myIterable);\n * if (iteratorFn) {\n * var iterator = iteratorFn.call(myIterable);\n * ...\n * }\n *\n * @param {?object} maybeIterable\n * @return {?function}\n */\n function getIteratorFn(maybeIterable) {\n var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);\n if (typeof iteratorFn === 'function') {\n return iteratorFn;\n }\n }\n\n /**\n * Collection of methods that allow declaration and validation of props that are\n * supplied to React components. Example usage:\n *\n * var Props = require('ReactPropTypes');\n * var MyArticle = React.createClass({\n * propTypes: {\n * // An optional string prop named \"description\".\n * description: Props.string,\n *\n * // A required enum prop named \"category\".\n * category: Props.oneOf(['News','Photos']).isRequired,\n *\n * // A prop named \"dialog\" that requires an instance of Dialog.\n * dialog: Props.instanceOf(Dialog).isRequired\n * },\n * render: function() { ... }\n * });\n *\n * A more formal specification of how these methods are used:\n *\n * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)\n * decl := ReactPropTypes.{type}(.isRequired)?\n *\n * Each and every declaration produces a function with the same signature. This\n * allows the creation of custom validation functions. For example:\n *\n * var MyLink = React.createClass({\n * propTypes: {\n * // An optional string or URI prop named \"href\".\n * href: function(props, propName, componentName) {\n * var propValue = props[propName];\n * if (propValue != null && typeof propValue !== 'string' &&\n * !(propValue instanceof URI)) {\n * return new Error(\n * 'Expected a string or an URI for ' + propName + ' in ' +\n * componentName\n * );\n * }\n * }\n * },\n * render: function() {...}\n * });\n *\n * @internal\n */\n\n var ANONYMOUS = '<<anonymous>>';\n\n // Important!\n // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.\n var ReactPropTypes = {\n array: createPrimitiveTypeChecker('array'),\n bigint: createPrimitiveTypeChecker('bigint'),\n bool: createPrimitiveTypeChecker('boolean'),\n func: createPrimitiveTypeChecker('function'),\n number: createPrimitiveTypeChecker('number'),\n object: createPrimitiveTypeChecker('object'),\n string: createPrimitiveTypeChecker('string'),\n symbol: createPrimitiveTypeChecker('symbol'),\n\n any: createAnyTypeChecker(),\n arrayOf: createArrayOfTypeChecker,\n element: createElementTypeChecker(),\n elementType: createElementTypeTypeChecker(),\n instanceOf: createInstanceTypeChecker,\n node: createNodeChecker(),\n objectOf: createObjectOfTypeChecker,\n oneOf: createEnumTypeChecker,\n oneOfType: createUnionTypeChecker,\n shape: createShapeTypeChecker,\n exact: createStrictShapeTypeChecker,\n };\n\n /**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\n /*eslint-disable no-self-compare*/\n function is(x, y) {\n // SameValue algorithm\n if (x === y) {\n // Steps 1-5, 7-10\n // Steps 6.b-6.e: +0 != -0\n return x !== 0 || 1 / x === 1 / y;\n } else {\n // Step 6.a: NaN == NaN\n return x !== x && y !== y;\n }\n }\n /*eslint-enable no-self-compare*/\n\n /**\n * We use an Error-like object for backward compatibility as people may call\n * PropTypes directly and inspect their output. However, we don't use real\n * Errors anymore. We don't inspect their stack anyway, and creating them\n * is prohibitively expensive if they are created too often, such as what\n * happens in oneOfType() for any type before the one that matched.\n */\n function PropTypeError(message, data) {\n this.message = message;\n this.data = data && typeof data === 'object' ? data: {};\n this.stack = '';\n }\n // Make `instanceof Error` still work for returned errors.\n PropTypeError.prototype = Error.prototype;\n\n function createChainableTypeChecker(validate) {\n if (true) {\n var manualPropTypeCallCache = {};\n var manualPropTypeWarningCount = 0;\n }\n function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {\n componentName = componentName || ANONYMOUS;\n propFullName = propFullName || propName;\n\n if (secret !== ReactPropTypesSecret) {\n if (throwOnDirectAccess) {\n // New behavior only for users of `prop-types` package\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use `PropTypes.checkPropTypes()` to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n } else if ( true && typeof console !== 'undefined') {\n // Old behavior for people using React.PropTypes\n var cacheKey = componentName + ':' + propName;\n if (\n !manualPropTypeCallCache[cacheKey] &&\n // Avoid spamming the console because they are often not actionable except for lib authors\n manualPropTypeWarningCount < 3\n ) {\n printWarning(\n 'You are manually calling a React.PropTypes validation ' +\n 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +\n 'and will throw in the standalone `prop-types` package. ' +\n 'You may be seeing this warning due to a third-party PropTypes ' +\n 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'\n );\n manualPropTypeCallCache[cacheKey] = true;\n manualPropTypeWarningCount++;\n }\n }\n }\n if (props[propName] == null) {\n if (isRequired) {\n if (props[propName] === null) {\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));\n }\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));\n }\n return null;\n } else {\n return validate(props, propName, componentName, location, propFullName);\n }\n }\n\n var chainedCheckType = checkType.bind(null, false);\n chainedCheckType.isRequired = checkType.bind(null, true);\n\n return chainedCheckType;\n }\n\n function createPrimitiveTypeChecker(expectedType) {\n function validate(props, propName, componentName, location, propFullName, secret) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== expectedType) {\n // `propValue` being instance of, say, date/regexp, pass the 'object'\n // check, but we can offer a more precise error message here rather than\n // 'of type `object`'.\n var preciseType = getPreciseType(propValue);\n\n return new PropTypeError(\n 'Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'),\n {expectedType: expectedType}\n );\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createAnyTypeChecker() {\n return createChainableTypeChecker(emptyFunctionThatReturnsNull);\n }\n\n function createArrayOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');\n }\n var propValue = props[propName];\n if (!Array.isArray(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));\n }\n for (var i = 0; i < propValue.length; i++) {\n var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createElementTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (!isValidElement(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createElementTypeTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (!ReactIs.isValidElementType(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createInstanceTypeChecker(expectedClass) {\n function validate(props, propName, componentName, location, propFullName) {\n if (!(props[propName] instanceof expectedClass)) {\n var expectedClassName = expectedClass.name || ANONYMOUS;\n var actualClassName = getClassName(props[propName]);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createEnumTypeChecker(expectedValues) {\n if (!Array.isArray(expectedValues)) {\n if (true) {\n if (arguments.length > 1) {\n printWarning(\n 'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +\n 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'\n );\n } else {\n printWarning('Invalid argument supplied to oneOf, expected an array.');\n }\n }\n return emptyFunctionThatReturnsNull;\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n for (var i = 0; i < expectedValues.length; i++) {\n if (is(propValue, expectedValues[i])) {\n return null;\n }\n }\n\n var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {\n var type = getPreciseType(value);\n if (type === 'symbol') {\n return String(value);\n }\n return value;\n });\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createObjectOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');\n }\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));\n }\n for (var key in propValue) {\n if (has(propValue, key)) {\n var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createUnionTypeChecker(arrayOfTypeCheckers) {\n if (!Array.isArray(arrayOfTypeCheckers)) {\n true ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : 0;\n return emptyFunctionThatReturnsNull;\n }\n\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n if (typeof checker !== 'function') {\n printWarning(\n 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +\n 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'\n );\n return emptyFunctionThatReturnsNull;\n }\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n var expectedTypes = [];\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret);\n if (checkerResult == null) {\n return null;\n }\n if (checkerResult.data && has(checkerResult.data, 'expectedType')) {\n expectedTypes.push(checkerResult.data.expectedType);\n }\n }\n var expectedTypesMessage = (expectedTypes.length > 0) ? ', expected one of type [' + expectedTypes.join(', ') + ']': '';\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createNodeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n if (!isNode(props[propName])) {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function invalidValidatorError(componentName, location, propFullName, key, type) {\n return new PropTypeError(\n (componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' +\n 'it must be a function, usually from the `prop-types` package, but received `' + type + '`.'\n );\n }\n\n function createShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n for (var key in shapeTypes) {\n var checker = shapeTypes[key];\n if (typeof checker !== 'function') {\n return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createStrictShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n // We need to check all keys in case some are required but missing from props.\n var allKeys = assign({}, props[propName], shapeTypes);\n for (var key in allKeys) {\n var checker = shapeTypes[key];\n if (has(shapeTypes, key) && typeof checker !== 'function') {\n return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));\n }\n if (!checker) {\n return new PropTypeError(\n 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +\n '\\nBad object: ' + JSON.stringify(props[propName], null, ' ') +\n '\\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')\n );\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n\n return createChainableTypeChecker(validate);\n }\n\n function isNode(propValue) {\n switch (typeof propValue) {\n case 'number':\n case 'string':\n case 'undefined':\n return true;\n case 'boolean':\n return !propValue;\n case 'object':\n if (Array.isArray(propValue)) {\n return propValue.every(isNode);\n }\n if (propValue === null || isValidElement(propValue)) {\n return true;\n }\n\n var iteratorFn = getIteratorFn(propValue);\n if (iteratorFn) {\n var iterator = iteratorFn.call(propValue);\n var step;\n if (iteratorFn !== propValue.entries) {\n while (!(step = iterator.next()).done) {\n if (!isNode(step.value)) {\n return false;\n }\n }\n } else {\n // Iterator will provide entry [k,v] tuples rather than values.\n while (!(step = iterator.next()).done) {\n var entry = step.value;\n if (entry) {\n if (!isNode(entry[1])) {\n return false;\n }\n }\n }\n }\n } else {\n return false;\n }\n\n return true;\n default:\n return false;\n }\n }\n\n function isSymbol(propType, propValue) {\n // Native Symbol.\n if (propType === 'symbol') {\n return true;\n }\n\n // falsy value can't be a Symbol\n if (!propValue) {\n return false;\n }\n\n // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'\n if (propValue['@@toStringTag'] === 'Symbol') {\n return true;\n }\n\n // Fallback for non-spec compliant Symbols which are polyfilled.\n if (typeof Symbol === 'function' && propValue instanceof Symbol) {\n return true;\n }\n\n return false;\n }\n\n // Equivalent of `typeof` but with special handling for array and regexp.\n function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }\n\n // This handles more types than `getPropType`. Only used for error messages.\n // See `createPrimitiveTypeChecker`.\n function getPreciseType(propValue) {\n if (typeof propValue === 'undefined' || propValue === null) {\n return '' + propValue;\n }\n var propType = getPropType(propValue);\n if (propType === 'object') {\n if (propValue instanceof Date) {\n return 'date';\n } else if (propValue instanceof RegExp) {\n return 'regexp';\n }\n }\n return propType;\n }\n\n // Returns a string that is postfixed to a warning about an invalid type.\n // For example, \"undefined\" or \"of type array\"\n function getPostfixForTypeWarning(value) {\n var type = getPreciseType(value);\n switch (type) {\n case 'array':\n case 'object':\n return 'an ' + type;\n case 'boolean':\n case 'date':\n case 'regexp':\n return 'a ' + type;\n default:\n return type;\n }\n }\n\n // Returns class name of the object, if any.\n function getClassName(propValue) {\n if (!propValue.constructor || !propValue.constructor.name) {\n return ANONYMOUS;\n }\n return propValue.constructor.name;\n }\n\n ReactPropTypes.checkPropTypes = checkPropTypes;\n ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/prop-types/factoryWithTypeCheckers.js?", + ); + + /***/ + }, + + /***/ 5556: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + '/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (true) {\n var ReactIs = __webpack_require__(4363);\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = __webpack_require__(4574)(ReactIs.isElement, throwOnDirectAccess);\n} else {}\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/prop-types/index.js?', + ); + + /***/ + }, + + /***/ 6925: /***/ (module) => { + 'use strict'; + eval( + "/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/prop-types/lib/ReactPropTypesSecret.js?", + ); + + /***/ + }, + + /***/ 9376: /***/ (module) => { + eval( + 'module.exports = Function.call.bind(Object.prototype.hasOwnProperty);\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/prop-types/lib/has.js?', + ); + + /***/ + }, + + /***/ 8021: /***/ (__unused_webpack_module, exports, __webpack_require__) => { + 'use strict'; + eval( + "/**\n * @license React\n * react-dom-server-legacy.node.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\nif (true) {\n (function() {\n'use strict';\n\nvar React = __webpack_require__(6540);\nvar stream = __webpack_require__(2203);\n\nvar ReactVersion = '18.3.1';\n\nvar ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n\n// by calls to these methods by a Babel plugin.\n//\n// In PROD (or in packages without access to React internals),\n// they are left as they are instead.\n\nfunction warn(format) {\n {\n {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n printWarning('warn', format, args);\n }\n }\n}\nfunction error(format) {\n {\n {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n printWarning('error', format, args);\n }\n }\n}\n\nfunction printWarning(level, format, args) {\n // When changing this logic, you might want to also\n // update consoleWithStackDev.www.js as well.\n {\n var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n var stack = ReactDebugCurrentFrame.getStackAddendum();\n\n if (stack !== '') {\n format += '%s';\n args = args.concat([stack]);\n } // eslint-disable-next-line react-internal/safe-string-coercion\n\n\n var argsWithFormat = args.map(function (item) {\n return String(item);\n }); // Careful: RN currently depends on this prefix\n\n argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it\n // breaks IE9: https://github.com/facebook/react/issues/13610\n // eslint-disable-next-line react-internal/no-production-logging\n\n Function.prototype.apply.call(console[level], console, argsWithFormat);\n }\n}\n\nfunction scheduleWork(callback) {\n callback();\n}\nfunction beginWriting(destination) {}\nfunction writeChunk(destination, chunk) {\n writeChunkAndReturn(destination, chunk);\n}\nfunction writeChunkAndReturn(destination, chunk) {\n return destination.push(chunk);\n}\nfunction completeWriting(destination) {}\nfunction close(destination) {\n destination.push(null);\n}\nfunction stringToChunk(content) {\n return content;\n}\nfunction stringToPrecomputedChunk(content) {\n return content;\n}\nfunction closeWithError(destination, error) {\n // $FlowFixMe: This is an Error object or the destination accepts other types.\n destination.destroy(error);\n}\n\n/*\n * The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol\n * and Temporal.* types. See https://github.com/facebook/react/pull/22064.\n *\n * The functions in this module will throw an easier-to-understand,\n * easier-to-debug exception with a clear errors message message explaining the\n * problem. (Instead of a confusing exception thrown inside the implementation\n * of the `value` object).\n */\n// $FlowFixMe only called in DEV, so void return is not possible.\nfunction typeName(value) {\n {\n // toStringTag is needed for namespaced types like Temporal.Instant\n var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;\n var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object';\n return type;\n }\n} // $FlowFixMe only called in DEV, so void return is not possible.\n\n\nfunction willCoercionThrow(value) {\n {\n try {\n testStringCoercion(value);\n return false;\n } catch (e) {\n return true;\n }\n }\n}\n\nfunction testStringCoercion(value) {\n // If you ended up here by following an exception call stack, here's what's\n // happened: you supplied an object or symbol value to React (as a prop, key,\n // DOM attribute, CSS property, string ref, etc.) and when React tried to\n // coerce it to a string using `'' + value`, an exception was thrown.\n //\n // The most common types that will cause this exception are `Symbol` instances\n // and Temporal objects like `Temporal.Instant`. But any object that has a\n // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this\n // exception. (Library authors do this to prevent users from using built-in\n // numeric operators like `+` or comparison operators like `>=` because custom\n // methods are needed to perform accurate arithmetic or comparison.)\n //\n // To fix the problem, coerce this object or symbol value to a string before\n // passing it to React. The most reliable way is usually `String(value)`.\n //\n // To find which value is throwing, check the browser or debugger console.\n // Before this exception was thrown, there should be `console.error` output\n // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the\n // problem and how that type was used: key, atrribute, input value prop, etc.\n // In most cases, this console output also shows the component and its\n // ancestor components where the exception happened.\n //\n // eslint-disable-next-line react-internal/safe-string-coercion\n return '' + value;\n}\n\nfunction checkAttributeStringCoercion(value, attributeName) {\n {\n if (willCoercionThrow(value)) {\n error('The provided `%s` attribute is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', attributeName, typeName(value));\n\n return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n }\n }\n}\nfunction checkCSSPropertyStringCoercion(value, propName) {\n {\n if (willCoercionThrow(value)) {\n error('The provided `%s` CSS property is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', propName, typeName(value));\n\n return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n }\n }\n}\nfunction checkHtmlStringCoercion(value) {\n {\n if (willCoercionThrow(value)) {\n error('The provided HTML markup uses a value of unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));\n\n return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n }\n }\n}\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\n// A reserved attribute.\n// It is handled by React separately and shouldn't be written to the DOM.\nvar RESERVED = 0; // A simple string attribute.\n// Attributes that aren't in the filter are presumed to have this type.\n\nvar STRING = 1; // A string attribute that accepts booleans in React. In HTML, these are called\n// \"enumerated\" attributes with \"true\" and \"false\" as possible values.\n// When true, it should be set to a \"true\" string.\n// When false, it should be set to a \"false\" string.\n\nvar BOOLEANISH_STRING = 2; // A real boolean attribute.\n// When true, it should be present (set either to an empty string or its name).\n// When false, it should be omitted.\n\nvar BOOLEAN = 3; // An attribute that can be used as a flag as well as with a value.\n// When true, it should be present (set either to an empty string or its name).\n// When false, it should be omitted.\n// For any other value, should be present with that value.\n\nvar OVERLOADED_BOOLEAN = 4; // An attribute that must be numeric or parse as a numeric.\n// When falsy, it should be removed.\n\nvar NUMERIC = 5; // An attribute that must be positive numeric or parse as a positive numeric.\n// When falsy, it should be removed.\n\nvar POSITIVE_NUMERIC = 6;\n\n/* eslint-disable max-len */\nvar ATTRIBUTE_NAME_START_CHAR = \":A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD\";\n/* eslint-enable max-len */\n\nvar ATTRIBUTE_NAME_CHAR = ATTRIBUTE_NAME_START_CHAR + \"\\\\-.0-9\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040\";\nvar VALID_ATTRIBUTE_NAME_REGEX = new RegExp('^[' + ATTRIBUTE_NAME_START_CHAR + '][' + ATTRIBUTE_NAME_CHAR + ']*$');\nvar illegalAttributeNameCache = {};\nvar validatedAttributeNameCache = {};\nfunction isAttributeNameSafe(attributeName) {\n if (hasOwnProperty.call(validatedAttributeNameCache, attributeName)) {\n return true;\n }\n\n if (hasOwnProperty.call(illegalAttributeNameCache, attributeName)) {\n return false;\n }\n\n if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) {\n validatedAttributeNameCache[attributeName] = true;\n return true;\n }\n\n illegalAttributeNameCache[attributeName] = true;\n\n {\n error('Invalid attribute name: `%s`', attributeName);\n }\n\n return false;\n}\nfunction shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag) {\n if (propertyInfo !== null && propertyInfo.type === RESERVED) {\n return false;\n }\n\n switch (typeof value) {\n case 'function': // $FlowIssue symbol is perfectly valid here\n\n case 'symbol':\n // eslint-disable-line\n return true;\n\n case 'boolean':\n {\n if (isCustomComponentTag) {\n return false;\n }\n\n if (propertyInfo !== null) {\n return !propertyInfo.acceptsBooleans;\n } else {\n var prefix = name.toLowerCase().slice(0, 5);\n return prefix !== 'data-' && prefix !== 'aria-';\n }\n }\n\n default:\n return false;\n }\n}\nfunction getPropertyInfo(name) {\n return properties.hasOwnProperty(name) ? properties[name] : null;\n}\n\nfunction PropertyInfoRecord(name, type, mustUseProperty, attributeName, attributeNamespace, sanitizeURL, removeEmptyString) {\n this.acceptsBooleans = type === BOOLEANISH_STRING || type === BOOLEAN || type === OVERLOADED_BOOLEAN;\n this.attributeName = attributeName;\n this.attributeNamespace = attributeNamespace;\n this.mustUseProperty = mustUseProperty;\n this.propertyName = name;\n this.type = type;\n this.sanitizeURL = sanitizeURL;\n this.removeEmptyString = removeEmptyString;\n} // When adding attributes to this list, be sure to also add them to\n// the `possibleStandardNames` module to ensure casing and incorrect\n// name warnings.\n\n\nvar properties = {}; // These props are reserved by React. They shouldn't be written to the DOM.\n\nvar reservedProps = ['children', 'dangerouslySetInnerHTML', // TODO: This prevents the assignment of defaultValue to regular\n// elements (not just inputs). Now that ReactDOMInput assigns to the\n// defaultValue property -- do we need this?\n'defaultValue', 'defaultChecked', 'innerHTML', 'suppressContentEditableWarning', 'suppressHydrationWarning', 'style'];\n\nreservedProps.forEach(function (name) {\n properties[name] = new PropertyInfoRecord(name, RESERVED, false, // mustUseProperty\n name, // attributeName\n null, // attributeNamespace\n false, // sanitizeURL\n false);\n}); // A few React string attributes have a different name.\n// This is a mapping from React prop names to the attribute names.\n\n[['acceptCharset', 'accept-charset'], ['className', 'class'], ['htmlFor', 'for'], ['httpEquiv', 'http-equiv']].forEach(function (_ref) {\n var name = _ref[0],\n attributeName = _ref[1];\n properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty\n attributeName, // attributeName\n null, // attributeNamespace\n false, // sanitizeURL\n false);\n}); // These are \"enumerated\" HTML attributes that accept \"true\" and \"false\".\n// In React, we let users pass `true` and `false` even though technically\n// these aren't boolean attributes (they are coerced to strings).\n\n['contentEditable', 'draggable', 'spellCheck', 'value'].forEach(function (name) {\n properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty\n name.toLowerCase(), // attributeName\n null, // attributeNamespace\n false, // sanitizeURL\n false);\n}); // These are \"enumerated\" SVG attributes that accept \"true\" and \"false\".\n// In React, we let users pass `true` and `false` even though technically\n// these aren't boolean attributes (they are coerced to strings).\n// Since these are SVG attributes, their attribute names are case-sensitive.\n\n['autoReverse', 'externalResourcesRequired', 'focusable', 'preserveAlpha'].forEach(function (name) {\n properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty\n name, // attributeName\n null, // attributeNamespace\n false, // sanitizeURL\n false);\n}); // These are HTML boolean attributes.\n\n['allowFullScreen', 'async', // Note: there is a special case that prevents it from being written to the DOM\n// on the client side because the browsers are inconsistent. Instead we call focus().\n'autoFocus', 'autoPlay', 'controls', 'default', 'defer', 'disabled', 'disablePictureInPicture', 'disableRemotePlayback', 'formNoValidate', 'hidden', 'loop', 'noModule', 'noValidate', 'open', 'playsInline', 'readOnly', 'required', 'reversed', 'scoped', 'seamless', // Microdata\n'itemScope'].forEach(function (name) {\n properties[name] = new PropertyInfoRecord(name, BOOLEAN, false, // mustUseProperty\n name.toLowerCase(), // attributeName\n null, // attributeNamespace\n false, // sanitizeURL\n false);\n}); // These are the few React props that we set as DOM properties\n// rather than attributes. These are all booleans.\n\n['checked', // Note: `option.selected` is not updated if `select.multiple` is\n// disabled with `removeAttribute`. We have special logic for handling this.\n'multiple', 'muted', 'selected' // NOTE: if you add a camelCased prop to this list,\n// you'll need to set attributeName to name.toLowerCase()\n// instead in the assignment below.\n].forEach(function (name) {\n properties[name] = new PropertyInfoRecord(name, BOOLEAN, true, // mustUseProperty\n name, // attributeName\n null, // attributeNamespace\n false, // sanitizeURL\n false);\n}); // These are HTML attributes that are \"overloaded booleans\": they behave like\n// booleans, but can also accept a string value.\n\n['capture', 'download' // NOTE: if you add a camelCased prop to this list,\n// you'll need to set attributeName to name.toLowerCase()\n// instead in the assignment below.\n].forEach(function (name) {\n properties[name] = new PropertyInfoRecord(name, OVERLOADED_BOOLEAN, false, // mustUseProperty\n name, // attributeName\n null, // attributeNamespace\n false, // sanitizeURL\n false);\n}); // These are HTML attributes that must be positive numbers.\n\n['cols', 'rows', 'size', 'span' // NOTE: if you add a camelCased prop to this list,\n// you'll need to set attributeName to name.toLowerCase()\n// instead in the assignment below.\n].forEach(function (name) {\n properties[name] = new PropertyInfoRecord(name, POSITIVE_NUMERIC, false, // mustUseProperty\n name, // attributeName\n null, // attributeNamespace\n false, // sanitizeURL\n false);\n}); // These are HTML attributes that must be numbers.\n\n['rowSpan', 'start'].forEach(function (name) {\n properties[name] = new PropertyInfoRecord(name, NUMERIC, false, // mustUseProperty\n name.toLowerCase(), // attributeName\n null, // attributeNamespace\n false, // sanitizeURL\n false);\n});\nvar CAMELIZE = /[\\-\\:]([a-z])/g;\n\nvar capitalize = function (token) {\n return token[1].toUpperCase();\n}; // This is a list of all SVG attributes that need special casing, namespacing,\n// or boolean value assignment. Regular attributes that just accept strings\n// and have the same names are omitted, just like in the HTML attribute filter.\n// Some of these attributes can be hard to find. This list was created by\n// scraping the MDN documentation.\n\n\n['accent-height', 'alignment-baseline', 'arabic-form', 'baseline-shift', 'cap-height', 'clip-path', 'clip-rule', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'dominant-baseline', 'enable-background', 'fill-opacity', 'fill-rule', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'glyph-name', 'glyph-orientation-horizontal', 'glyph-orientation-vertical', 'horiz-adv-x', 'horiz-origin-x', 'image-rendering', 'letter-spacing', 'lighting-color', 'marker-end', 'marker-mid', 'marker-start', 'overline-position', 'overline-thickness', 'paint-order', 'panose-1', 'pointer-events', 'rendering-intent', 'shape-rendering', 'stop-color', 'stop-opacity', 'strikethrough-position', 'strikethrough-thickness', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke-width', 'text-anchor', 'text-decoration', 'text-rendering', 'underline-position', 'underline-thickness', 'unicode-bidi', 'unicode-range', 'units-per-em', 'v-alphabetic', 'v-hanging', 'v-ideographic', 'v-mathematical', 'vector-effect', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'word-spacing', 'writing-mode', 'xmlns:xlink', 'x-height' // NOTE: if you add a camelCased prop to this list,\n// you'll need to set attributeName to name.toLowerCase()\n// instead in the assignment below.\n].forEach(function (attributeName) {\n var name = attributeName.replace(CAMELIZE, capitalize);\n properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty\n attributeName, null, // attributeNamespace\n false, // sanitizeURL\n false);\n}); // String SVG attributes with the xlink namespace.\n\n['xlink:actuate', 'xlink:arcrole', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type' // NOTE: if you add a camelCased prop to this list,\n// you'll need to set attributeName to name.toLowerCase()\n// instead in the assignment below.\n].forEach(function (attributeName) {\n var name = attributeName.replace(CAMELIZE, capitalize);\n properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty\n attributeName, 'http://www.w3.org/1999/xlink', false, // sanitizeURL\n false);\n}); // String SVG attributes with the xml namespace.\n\n['xml:base', 'xml:lang', 'xml:space' // NOTE: if you add a camelCased prop to this list,\n// you'll need to set attributeName to name.toLowerCase()\n// instead in the assignment below.\n].forEach(function (attributeName) {\n var name = attributeName.replace(CAMELIZE, capitalize);\n properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty\n attributeName, 'http://www.w3.org/XML/1998/namespace', false, // sanitizeURL\n false);\n}); // These attribute exists both in HTML and SVG.\n// The attribute name is case-sensitive in SVG so we can't just use\n// the React name like we do for attributes that exist only in HTML.\n\n['tabIndex', 'crossOrigin'].forEach(function (attributeName) {\n properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, // mustUseProperty\n attributeName.toLowerCase(), // attributeName\n null, // attributeNamespace\n false, // sanitizeURL\n false);\n}); // These attributes accept URLs. These must not allow javascript: URLS.\n// These will also need to accept Trusted Types object in the future.\n\nvar xlinkHref = 'xlinkHref';\nproperties[xlinkHref] = new PropertyInfoRecord('xlinkHref', STRING, false, // mustUseProperty\n'xlink:href', 'http://www.w3.org/1999/xlink', true, // sanitizeURL\nfalse);\n['src', 'href', 'action', 'formAction'].forEach(function (attributeName) {\n properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, // mustUseProperty\n attributeName.toLowerCase(), // attributeName\n null, // attributeNamespace\n true, // sanitizeURL\n true);\n});\n\n/**\n * CSS properties which accept numbers but are not in units of \"px\".\n */\nvar isUnitlessNumber = {\n animationIterationCount: true,\n aspectRatio: true,\n borderImageOutset: true,\n borderImageSlice: true,\n borderImageWidth: true,\n boxFlex: true,\n boxFlexGroup: true,\n boxOrdinalGroup: true,\n columnCount: true,\n columns: true,\n flex: true,\n flexGrow: true,\n flexPositive: true,\n flexShrink: true,\n flexNegative: true,\n flexOrder: true,\n gridArea: true,\n gridRow: true,\n gridRowEnd: true,\n gridRowSpan: true,\n gridRowStart: true,\n gridColumn: true,\n gridColumnEnd: true,\n gridColumnSpan: true,\n gridColumnStart: true,\n fontWeight: true,\n lineClamp: true,\n lineHeight: true,\n opacity: true,\n order: true,\n orphans: true,\n tabSize: true,\n widows: true,\n zIndex: true,\n zoom: true,\n // SVG-related properties\n fillOpacity: true,\n floodOpacity: true,\n stopOpacity: true,\n strokeDasharray: true,\n strokeDashoffset: true,\n strokeMiterlimit: true,\n strokeOpacity: true,\n strokeWidth: true\n};\n/**\n * @param {string} prefix vendor-specific prefix, eg: Webkit\n * @param {string} key style name, eg: transitionDuration\n * @return {string} style name prefixed with `prefix`, properly camelCased, eg:\n * WebkitTransitionDuration\n */\n\nfunction prefixKey(prefix, key) {\n return prefix + key.charAt(0).toUpperCase() + key.substring(1);\n}\n/**\n * Support style names that may come passed in prefixed by adding permutations\n * of vendor prefixes.\n */\n\n\nvar prefixes = ['Webkit', 'ms', 'Moz', 'O']; // Using Object.keys here, or else the vanilla for-in loop makes IE8 go into an\n// infinite loop, because it iterates over the newly added props too.\n\nObject.keys(isUnitlessNumber).forEach(function (prop) {\n prefixes.forEach(function (prefix) {\n isUnitlessNumber[prefixKey(prefix, prop)] = isUnitlessNumber[prop];\n });\n});\n\nvar hasReadOnlyValue = {\n button: true,\n checkbox: true,\n image: true,\n hidden: true,\n radio: true,\n reset: true,\n submit: true\n};\nfunction checkControlledValueProps(tagName, props) {\n {\n if (!(hasReadOnlyValue[props.type] || props.onChange || props.onInput || props.readOnly || props.disabled || props.value == null)) {\n error('You provided a `value` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultValue`. Otherwise, ' + 'set either `onChange` or `readOnly`.');\n }\n\n if (!(props.onChange || props.readOnly || props.disabled || props.checked == null)) {\n error('You provided a `checked` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultChecked`. Otherwise, ' + 'set either `onChange` or `readOnly`.');\n }\n }\n}\n\nfunction isCustomComponent(tagName, props) {\n if (tagName.indexOf('-') === -1) {\n return typeof props.is === 'string';\n }\n\n switch (tagName) {\n // These are reserved SVG and MathML elements.\n // We don't mind this list too much because we expect it to never grow.\n // The alternative is to track the namespace in a few places which is convoluted.\n // https://w3c.github.io/webcomponents/spec/custom/#custom-elements-core-concepts\n case 'annotation-xml':\n case 'color-profile':\n case 'font-face':\n case 'font-face-src':\n case 'font-face-uri':\n case 'font-face-format':\n case 'font-face-name':\n case 'missing-glyph':\n return false;\n\n default:\n return true;\n }\n}\n\nvar ariaProperties = {\n 'aria-current': 0,\n // state\n 'aria-description': 0,\n 'aria-details': 0,\n 'aria-disabled': 0,\n // state\n 'aria-hidden': 0,\n // state\n 'aria-invalid': 0,\n // state\n 'aria-keyshortcuts': 0,\n 'aria-label': 0,\n 'aria-roledescription': 0,\n // Widget Attributes\n 'aria-autocomplete': 0,\n 'aria-checked': 0,\n 'aria-expanded': 0,\n 'aria-haspopup': 0,\n 'aria-level': 0,\n 'aria-modal': 0,\n 'aria-multiline': 0,\n 'aria-multiselectable': 0,\n 'aria-orientation': 0,\n 'aria-placeholder': 0,\n 'aria-pressed': 0,\n 'aria-readonly': 0,\n 'aria-required': 0,\n 'aria-selected': 0,\n 'aria-sort': 0,\n 'aria-valuemax': 0,\n 'aria-valuemin': 0,\n 'aria-valuenow': 0,\n 'aria-valuetext': 0,\n // Live Region Attributes\n 'aria-atomic': 0,\n 'aria-busy': 0,\n 'aria-live': 0,\n 'aria-relevant': 0,\n // Drag-and-Drop Attributes\n 'aria-dropeffect': 0,\n 'aria-grabbed': 0,\n // Relationship Attributes\n 'aria-activedescendant': 0,\n 'aria-colcount': 0,\n 'aria-colindex': 0,\n 'aria-colspan': 0,\n 'aria-controls': 0,\n 'aria-describedby': 0,\n 'aria-errormessage': 0,\n 'aria-flowto': 0,\n 'aria-labelledby': 0,\n 'aria-owns': 0,\n 'aria-posinset': 0,\n 'aria-rowcount': 0,\n 'aria-rowindex': 0,\n 'aria-rowspan': 0,\n 'aria-setsize': 0\n};\n\nvar warnedProperties = {};\nvar rARIA = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$');\nvar rARIACamel = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$');\n\nfunction validateProperty(tagName, name) {\n {\n if (hasOwnProperty.call(warnedProperties, name) && warnedProperties[name]) {\n return true;\n }\n\n if (rARIACamel.test(name)) {\n var ariaName = 'aria-' + name.slice(4).toLowerCase();\n var correctName = ariaProperties.hasOwnProperty(ariaName) ? ariaName : null; // If this is an aria-* attribute, but is not listed in the known DOM\n // DOM properties, then it is an invalid aria-* attribute.\n\n if (correctName == null) {\n error('Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.', name);\n\n warnedProperties[name] = true;\n return true;\n } // aria-* attributes should be lowercase; suggest the lowercase version.\n\n\n if (name !== correctName) {\n error('Invalid ARIA attribute `%s`. Did you mean `%s`?', name, correctName);\n\n warnedProperties[name] = true;\n return true;\n }\n }\n\n if (rARIA.test(name)) {\n var lowerCasedName = name.toLowerCase();\n var standardName = ariaProperties.hasOwnProperty(lowerCasedName) ? lowerCasedName : null; // If this is an aria-* attribute, but is not listed in the known DOM\n // DOM properties, then it is an invalid aria-* attribute.\n\n if (standardName == null) {\n warnedProperties[name] = true;\n return false;\n } // aria-* attributes should be lowercase; suggest the lowercase version.\n\n\n if (name !== standardName) {\n error('Unknown ARIA attribute `%s`. Did you mean `%s`?', name, standardName);\n\n warnedProperties[name] = true;\n return true;\n }\n }\n }\n\n return true;\n}\n\nfunction warnInvalidARIAProps(type, props) {\n {\n var invalidProps = [];\n\n for (var key in props) {\n var isValid = validateProperty(type, key);\n\n if (!isValid) {\n invalidProps.push(key);\n }\n }\n\n var unknownPropString = invalidProps.map(function (prop) {\n return '`' + prop + '`';\n }).join(', ');\n\n if (invalidProps.length === 1) {\n error('Invalid aria prop %s on <%s> tag. ' + 'For details, see https://reactjs.org/link/invalid-aria-props', unknownPropString, type);\n } else if (invalidProps.length > 1) {\n error('Invalid aria props %s on <%s> tag. ' + 'For details, see https://reactjs.org/link/invalid-aria-props', unknownPropString, type);\n }\n }\n}\n\nfunction validateProperties(type, props) {\n if (isCustomComponent(type, props)) {\n return;\n }\n\n warnInvalidARIAProps(type, props);\n}\n\nvar didWarnValueNull = false;\nfunction validateProperties$1(type, props) {\n {\n if (type !== 'input' && type !== 'textarea' && type !== 'select') {\n return;\n }\n\n if (props != null && props.value === null && !didWarnValueNull) {\n didWarnValueNull = true;\n\n if (type === 'select' && props.multiple) {\n error('`value` prop on `%s` should not be null. ' + 'Consider using an empty array when `multiple` is set to `true` ' + 'to clear the component or `undefined` for uncontrolled components.', type);\n } else {\n error('`value` prop on `%s` should not be null. ' + 'Consider using an empty string to clear the component or `undefined` ' + 'for uncontrolled components.', type);\n }\n }\n }\n}\n\n// When adding attributes to the HTML or SVG allowed attribute list, be sure to\n// also add them to this module to ensure casing and incorrect name\n// warnings.\nvar possibleStandardNames = {\n // HTML\n accept: 'accept',\n acceptcharset: 'acceptCharset',\n 'accept-charset': 'acceptCharset',\n accesskey: 'accessKey',\n action: 'action',\n allowfullscreen: 'allowFullScreen',\n alt: 'alt',\n as: 'as',\n async: 'async',\n autocapitalize: 'autoCapitalize',\n autocomplete: 'autoComplete',\n autocorrect: 'autoCorrect',\n autofocus: 'autoFocus',\n autoplay: 'autoPlay',\n autosave: 'autoSave',\n capture: 'capture',\n cellpadding: 'cellPadding',\n cellspacing: 'cellSpacing',\n challenge: 'challenge',\n charset: 'charSet',\n checked: 'checked',\n children: 'children',\n cite: 'cite',\n class: 'className',\n classid: 'classID',\n classname: 'className',\n cols: 'cols',\n colspan: 'colSpan',\n content: 'content',\n contenteditable: 'contentEditable',\n contextmenu: 'contextMenu',\n controls: 'controls',\n controlslist: 'controlsList',\n coords: 'coords',\n crossorigin: 'crossOrigin',\n dangerouslysetinnerhtml: 'dangerouslySetInnerHTML',\n data: 'data',\n datetime: 'dateTime',\n default: 'default',\n defaultchecked: 'defaultChecked',\n defaultvalue: 'defaultValue',\n defer: 'defer',\n dir: 'dir',\n disabled: 'disabled',\n disablepictureinpicture: 'disablePictureInPicture',\n disableremoteplayback: 'disableRemotePlayback',\n download: 'download',\n draggable: 'draggable',\n enctype: 'encType',\n enterkeyhint: 'enterKeyHint',\n for: 'htmlFor',\n form: 'form',\n formmethod: 'formMethod',\n formaction: 'formAction',\n formenctype: 'formEncType',\n formnovalidate: 'formNoValidate',\n formtarget: 'formTarget',\n frameborder: 'frameBorder',\n headers: 'headers',\n height: 'height',\n hidden: 'hidden',\n high: 'high',\n href: 'href',\n hreflang: 'hrefLang',\n htmlfor: 'htmlFor',\n httpequiv: 'httpEquiv',\n 'http-equiv': 'httpEquiv',\n icon: 'icon',\n id: 'id',\n imagesizes: 'imageSizes',\n imagesrcset: 'imageSrcSet',\n innerhtml: 'innerHTML',\n inputmode: 'inputMode',\n integrity: 'integrity',\n is: 'is',\n itemid: 'itemID',\n itemprop: 'itemProp',\n itemref: 'itemRef',\n itemscope: 'itemScope',\n itemtype: 'itemType',\n keyparams: 'keyParams',\n keytype: 'keyType',\n kind: 'kind',\n label: 'label',\n lang: 'lang',\n list: 'list',\n loop: 'loop',\n low: 'low',\n manifest: 'manifest',\n marginwidth: 'marginWidth',\n marginheight: 'marginHeight',\n max: 'max',\n maxlength: 'maxLength',\n media: 'media',\n mediagroup: 'mediaGroup',\n method: 'method',\n min: 'min',\n minlength: 'minLength',\n multiple: 'multiple',\n muted: 'muted',\n name: 'name',\n nomodule: 'noModule',\n nonce: 'nonce',\n novalidate: 'noValidate',\n open: 'open',\n optimum: 'optimum',\n pattern: 'pattern',\n placeholder: 'placeholder',\n playsinline: 'playsInline',\n poster: 'poster',\n preload: 'preload',\n profile: 'profile',\n radiogroup: 'radioGroup',\n readonly: 'readOnly',\n referrerpolicy: 'referrerPolicy',\n rel: 'rel',\n required: 'required',\n reversed: 'reversed',\n role: 'role',\n rows: 'rows',\n rowspan: 'rowSpan',\n sandbox: 'sandbox',\n scope: 'scope',\n scoped: 'scoped',\n scrolling: 'scrolling',\n seamless: 'seamless',\n selected: 'selected',\n shape: 'shape',\n size: 'size',\n sizes: 'sizes',\n span: 'span',\n spellcheck: 'spellCheck',\n src: 'src',\n srcdoc: 'srcDoc',\n srclang: 'srcLang',\n srcset: 'srcSet',\n start: 'start',\n step: 'step',\n style: 'style',\n summary: 'summary',\n tabindex: 'tabIndex',\n target: 'target',\n title: 'title',\n type: 'type',\n usemap: 'useMap',\n value: 'value',\n width: 'width',\n wmode: 'wmode',\n wrap: 'wrap',\n // SVG\n about: 'about',\n accentheight: 'accentHeight',\n 'accent-height': 'accentHeight',\n accumulate: 'accumulate',\n additive: 'additive',\n alignmentbaseline: 'alignmentBaseline',\n 'alignment-baseline': 'alignmentBaseline',\n allowreorder: 'allowReorder',\n alphabetic: 'alphabetic',\n amplitude: 'amplitude',\n arabicform: 'arabicForm',\n 'arabic-form': 'arabicForm',\n ascent: 'ascent',\n attributename: 'attributeName',\n attributetype: 'attributeType',\n autoreverse: 'autoReverse',\n azimuth: 'azimuth',\n basefrequency: 'baseFrequency',\n baselineshift: 'baselineShift',\n 'baseline-shift': 'baselineShift',\n baseprofile: 'baseProfile',\n bbox: 'bbox',\n begin: 'begin',\n bias: 'bias',\n by: 'by',\n calcmode: 'calcMode',\n capheight: 'capHeight',\n 'cap-height': 'capHeight',\n clip: 'clip',\n clippath: 'clipPath',\n 'clip-path': 'clipPath',\n clippathunits: 'clipPathUnits',\n cliprule: 'clipRule',\n 'clip-rule': 'clipRule',\n color: 'color',\n colorinterpolation: 'colorInterpolation',\n 'color-interpolation': 'colorInterpolation',\n colorinterpolationfilters: 'colorInterpolationFilters',\n 'color-interpolation-filters': 'colorInterpolationFilters',\n colorprofile: 'colorProfile',\n 'color-profile': 'colorProfile',\n colorrendering: 'colorRendering',\n 'color-rendering': 'colorRendering',\n contentscripttype: 'contentScriptType',\n contentstyletype: 'contentStyleType',\n cursor: 'cursor',\n cx: 'cx',\n cy: 'cy',\n d: 'd',\n datatype: 'datatype',\n decelerate: 'decelerate',\n descent: 'descent',\n diffuseconstant: 'diffuseConstant',\n direction: 'direction',\n display: 'display',\n divisor: 'divisor',\n dominantbaseline: 'dominantBaseline',\n 'dominant-baseline': 'dominantBaseline',\n dur: 'dur',\n dx: 'dx',\n dy: 'dy',\n edgemode: 'edgeMode',\n elevation: 'elevation',\n enablebackground: 'enableBackground',\n 'enable-background': 'enableBackground',\n end: 'end',\n exponent: 'exponent',\n externalresourcesrequired: 'externalResourcesRequired',\n fill: 'fill',\n fillopacity: 'fillOpacity',\n 'fill-opacity': 'fillOpacity',\n fillrule: 'fillRule',\n 'fill-rule': 'fillRule',\n filter: 'filter',\n filterres: 'filterRes',\n filterunits: 'filterUnits',\n floodopacity: 'floodOpacity',\n 'flood-opacity': 'floodOpacity',\n floodcolor: 'floodColor',\n 'flood-color': 'floodColor',\n focusable: 'focusable',\n fontfamily: 'fontFamily',\n 'font-family': 'fontFamily',\n fontsize: 'fontSize',\n 'font-size': 'fontSize',\n fontsizeadjust: 'fontSizeAdjust',\n 'font-size-adjust': 'fontSizeAdjust',\n fontstretch: 'fontStretch',\n 'font-stretch': 'fontStretch',\n fontstyle: 'fontStyle',\n 'font-style': 'fontStyle',\n fontvariant: 'fontVariant',\n 'font-variant': 'fontVariant',\n fontweight: 'fontWeight',\n 'font-weight': 'fontWeight',\n format: 'format',\n from: 'from',\n fx: 'fx',\n fy: 'fy',\n g1: 'g1',\n g2: 'g2',\n glyphname: 'glyphName',\n 'glyph-name': 'glyphName',\n glyphorientationhorizontal: 'glyphOrientationHorizontal',\n 'glyph-orientation-horizontal': 'glyphOrientationHorizontal',\n glyphorientationvertical: 'glyphOrientationVertical',\n 'glyph-orientation-vertical': 'glyphOrientationVertical',\n glyphref: 'glyphRef',\n gradienttransform: 'gradientTransform',\n gradientunits: 'gradientUnits',\n hanging: 'hanging',\n horizadvx: 'horizAdvX',\n 'horiz-adv-x': 'horizAdvX',\n horizoriginx: 'horizOriginX',\n 'horiz-origin-x': 'horizOriginX',\n ideographic: 'ideographic',\n imagerendering: 'imageRendering',\n 'image-rendering': 'imageRendering',\n in2: 'in2',\n in: 'in',\n inlist: 'inlist',\n intercept: 'intercept',\n k1: 'k1',\n k2: 'k2',\n k3: 'k3',\n k4: 'k4',\n k: 'k',\n kernelmatrix: 'kernelMatrix',\n kernelunitlength: 'kernelUnitLength',\n kerning: 'kerning',\n keypoints: 'keyPoints',\n keysplines: 'keySplines',\n keytimes: 'keyTimes',\n lengthadjust: 'lengthAdjust',\n letterspacing: 'letterSpacing',\n 'letter-spacing': 'letterSpacing',\n lightingcolor: 'lightingColor',\n 'lighting-color': 'lightingColor',\n limitingconeangle: 'limitingConeAngle',\n local: 'local',\n markerend: 'markerEnd',\n 'marker-end': 'markerEnd',\n markerheight: 'markerHeight',\n markermid: 'markerMid',\n 'marker-mid': 'markerMid',\n markerstart: 'markerStart',\n 'marker-start': 'markerStart',\n markerunits: 'markerUnits',\n markerwidth: 'markerWidth',\n mask: 'mask',\n maskcontentunits: 'maskContentUnits',\n maskunits: 'maskUnits',\n mathematical: 'mathematical',\n mode: 'mode',\n numoctaves: 'numOctaves',\n offset: 'offset',\n opacity: 'opacity',\n operator: 'operator',\n order: 'order',\n orient: 'orient',\n orientation: 'orientation',\n origin: 'origin',\n overflow: 'overflow',\n overlineposition: 'overlinePosition',\n 'overline-position': 'overlinePosition',\n overlinethickness: 'overlineThickness',\n 'overline-thickness': 'overlineThickness',\n paintorder: 'paintOrder',\n 'paint-order': 'paintOrder',\n panose1: 'panose1',\n 'panose-1': 'panose1',\n pathlength: 'pathLength',\n patterncontentunits: 'patternContentUnits',\n patterntransform: 'patternTransform',\n patternunits: 'patternUnits',\n pointerevents: 'pointerEvents',\n 'pointer-events': 'pointerEvents',\n points: 'points',\n pointsatx: 'pointsAtX',\n pointsaty: 'pointsAtY',\n pointsatz: 'pointsAtZ',\n prefix: 'prefix',\n preservealpha: 'preserveAlpha',\n preserveaspectratio: 'preserveAspectRatio',\n primitiveunits: 'primitiveUnits',\n property: 'property',\n r: 'r',\n radius: 'radius',\n refx: 'refX',\n refy: 'refY',\n renderingintent: 'renderingIntent',\n 'rendering-intent': 'renderingIntent',\n repeatcount: 'repeatCount',\n repeatdur: 'repeatDur',\n requiredextensions: 'requiredExtensions',\n requiredfeatures: 'requiredFeatures',\n resource: 'resource',\n restart: 'restart',\n result: 'result',\n results: 'results',\n rotate: 'rotate',\n rx: 'rx',\n ry: 'ry',\n scale: 'scale',\n security: 'security',\n seed: 'seed',\n shaperendering: 'shapeRendering',\n 'shape-rendering': 'shapeRendering',\n slope: 'slope',\n spacing: 'spacing',\n specularconstant: 'specularConstant',\n specularexponent: 'specularExponent',\n speed: 'speed',\n spreadmethod: 'spreadMethod',\n startoffset: 'startOffset',\n stddeviation: 'stdDeviation',\n stemh: 'stemh',\n stemv: 'stemv',\n stitchtiles: 'stitchTiles',\n stopcolor: 'stopColor',\n 'stop-color': 'stopColor',\n stopopacity: 'stopOpacity',\n 'stop-opacity': 'stopOpacity',\n strikethroughposition: 'strikethroughPosition',\n 'strikethrough-position': 'strikethroughPosition',\n strikethroughthickness: 'strikethroughThickness',\n 'strikethrough-thickness': 'strikethroughThickness',\n string: 'string',\n stroke: 'stroke',\n strokedasharray: 'strokeDasharray',\n 'stroke-dasharray': 'strokeDasharray',\n strokedashoffset: 'strokeDashoffset',\n 'stroke-dashoffset': 'strokeDashoffset',\n strokelinecap: 'strokeLinecap',\n 'stroke-linecap': 'strokeLinecap',\n strokelinejoin: 'strokeLinejoin',\n 'stroke-linejoin': 'strokeLinejoin',\n strokemiterlimit: 'strokeMiterlimit',\n 'stroke-miterlimit': 'strokeMiterlimit',\n strokewidth: 'strokeWidth',\n 'stroke-width': 'strokeWidth',\n strokeopacity: 'strokeOpacity',\n 'stroke-opacity': 'strokeOpacity',\n suppresscontenteditablewarning: 'suppressContentEditableWarning',\n suppresshydrationwarning: 'suppressHydrationWarning',\n surfacescale: 'surfaceScale',\n systemlanguage: 'systemLanguage',\n tablevalues: 'tableValues',\n targetx: 'targetX',\n targety: 'targetY',\n textanchor: 'textAnchor',\n 'text-anchor': 'textAnchor',\n textdecoration: 'textDecoration',\n 'text-decoration': 'textDecoration',\n textlength: 'textLength',\n textrendering: 'textRendering',\n 'text-rendering': 'textRendering',\n to: 'to',\n transform: 'transform',\n typeof: 'typeof',\n u1: 'u1',\n u2: 'u2',\n underlineposition: 'underlinePosition',\n 'underline-position': 'underlinePosition',\n underlinethickness: 'underlineThickness',\n 'underline-thickness': 'underlineThickness',\n unicode: 'unicode',\n unicodebidi: 'unicodeBidi',\n 'unicode-bidi': 'unicodeBidi',\n unicoderange: 'unicodeRange',\n 'unicode-range': 'unicodeRange',\n unitsperem: 'unitsPerEm',\n 'units-per-em': 'unitsPerEm',\n unselectable: 'unselectable',\n valphabetic: 'vAlphabetic',\n 'v-alphabetic': 'vAlphabetic',\n values: 'values',\n vectoreffect: 'vectorEffect',\n 'vector-effect': 'vectorEffect',\n version: 'version',\n vertadvy: 'vertAdvY',\n 'vert-adv-y': 'vertAdvY',\n vertoriginx: 'vertOriginX',\n 'vert-origin-x': 'vertOriginX',\n vertoriginy: 'vertOriginY',\n 'vert-origin-y': 'vertOriginY',\n vhanging: 'vHanging',\n 'v-hanging': 'vHanging',\n videographic: 'vIdeographic',\n 'v-ideographic': 'vIdeographic',\n viewbox: 'viewBox',\n viewtarget: 'viewTarget',\n visibility: 'visibility',\n vmathematical: 'vMathematical',\n 'v-mathematical': 'vMathematical',\n vocab: 'vocab',\n widths: 'widths',\n wordspacing: 'wordSpacing',\n 'word-spacing': 'wordSpacing',\n writingmode: 'writingMode',\n 'writing-mode': 'writingMode',\n x1: 'x1',\n x2: 'x2',\n x: 'x',\n xchannelselector: 'xChannelSelector',\n xheight: 'xHeight',\n 'x-height': 'xHeight',\n xlinkactuate: 'xlinkActuate',\n 'xlink:actuate': 'xlinkActuate',\n xlinkarcrole: 'xlinkArcrole',\n 'xlink:arcrole': 'xlinkArcrole',\n xlinkhref: 'xlinkHref',\n 'xlink:href': 'xlinkHref',\n xlinkrole: 'xlinkRole',\n 'xlink:role': 'xlinkRole',\n xlinkshow: 'xlinkShow',\n 'xlink:show': 'xlinkShow',\n xlinktitle: 'xlinkTitle',\n 'xlink:title': 'xlinkTitle',\n xlinktype: 'xlinkType',\n 'xlink:type': 'xlinkType',\n xmlbase: 'xmlBase',\n 'xml:base': 'xmlBase',\n xmllang: 'xmlLang',\n 'xml:lang': 'xmlLang',\n xmlns: 'xmlns',\n 'xml:space': 'xmlSpace',\n xmlnsxlink: 'xmlnsXlink',\n 'xmlns:xlink': 'xmlnsXlink',\n xmlspace: 'xmlSpace',\n y1: 'y1',\n y2: 'y2',\n y: 'y',\n ychannelselector: 'yChannelSelector',\n z: 'z',\n zoomandpan: 'zoomAndPan'\n};\n\nvar validateProperty$1 = function () {};\n\n{\n var warnedProperties$1 = {};\n var EVENT_NAME_REGEX = /^on./;\n var INVALID_EVENT_NAME_REGEX = /^on[^A-Z]/;\n var rARIA$1 = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$');\n var rARIACamel$1 = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$');\n\n validateProperty$1 = function (tagName, name, value, eventRegistry) {\n if (hasOwnProperty.call(warnedProperties$1, name) && warnedProperties$1[name]) {\n return true;\n }\n\n var lowerCasedName = name.toLowerCase();\n\n if (lowerCasedName === 'onfocusin' || lowerCasedName === 'onfocusout') {\n error('React uses onFocus and onBlur instead of onFocusIn and onFocusOut. ' + 'All React events are normalized to bubble, so onFocusIn and onFocusOut ' + 'are not needed/supported by React.');\n\n warnedProperties$1[name] = true;\n return true;\n } // We can't rely on the event system being injected on the server.\n\n\n if (eventRegistry != null) {\n var registrationNameDependencies = eventRegistry.registrationNameDependencies,\n possibleRegistrationNames = eventRegistry.possibleRegistrationNames;\n\n if (registrationNameDependencies.hasOwnProperty(name)) {\n return true;\n }\n\n var registrationName = possibleRegistrationNames.hasOwnProperty(lowerCasedName) ? possibleRegistrationNames[lowerCasedName] : null;\n\n if (registrationName != null) {\n error('Invalid event handler property `%s`. Did you mean `%s`?', name, registrationName);\n\n warnedProperties$1[name] = true;\n return true;\n }\n\n if (EVENT_NAME_REGEX.test(name)) {\n error('Unknown event handler property `%s`. It will be ignored.', name);\n\n warnedProperties$1[name] = true;\n return true;\n }\n } else if (EVENT_NAME_REGEX.test(name)) {\n // If no event plugins have been injected, we are in a server environment.\n // So we can't tell if the event name is correct for sure, but we can filter\n // out known bad ones like `onclick`. We can't suggest a specific replacement though.\n if (INVALID_EVENT_NAME_REGEX.test(name)) {\n error('Invalid event handler property `%s`. ' + 'React events use the camelCase naming convention, for example `onClick`.', name);\n }\n\n warnedProperties$1[name] = true;\n return true;\n } // Let the ARIA attribute hook validate ARIA attributes\n\n\n if (rARIA$1.test(name) || rARIACamel$1.test(name)) {\n return true;\n }\n\n if (lowerCasedName === 'innerhtml') {\n error('Directly setting property `innerHTML` is not permitted. ' + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.');\n\n warnedProperties$1[name] = true;\n return true;\n }\n\n if (lowerCasedName === 'aria') {\n error('The `aria` attribute is reserved for future use in React. ' + 'Pass individual `aria-` attributes instead.');\n\n warnedProperties$1[name] = true;\n return true;\n }\n\n if (lowerCasedName === 'is' && value !== null && value !== undefined && typeof value !== 'string') {\n error('Received a `%s` for a string attribute `is`. If this is expected, cast ' + 'the value to a string.', typeof value);\n\n warnedProperties$1[name] = true;\n return true;\n }\n\n if (typeof value === 'number' && isNaN(value)) {\n error('Received NaN for the `%s` attribute. If this is expected, cast ' + 'the value to a string.', name);\n\n warnedProperties$1[name] = true;\n return true;\n }\n\n var propertyInfo = getPropertyInfo(name);\n var isReserved = propertyInfo !== null && propertyInfo.type === RESERVED; // Known attributes should match the casing specified in the property config.\n\n if (possibleStandardNames.hasOwnProperty(lowerCasedName)) {\n var standardName = possibleStandardNames[lowerCasedName];\n\n if (standardName !== name) {\n error('Invalid DOM property `%s`. Did you mean `%s`?', name, standardName);\n\n warnedProperties$1[name] = true;\n return true;\n }\n } else if (!isReserved && name !== lowerCasedName) {\n // Unknown attributes should have lowercase casing since that's how they\n // will be cased anyway with server rendering.\n error('React does not recognize the `%s` prop on a DOM element. If you ' + 'intentionally want it to appear in the DOM as a custom ' + 'attribute, spell it as lowercase `%s` instead. ' + 'If you accidentally passed it from a parent component, remove ' + 'it from the DOM element.', name, lowerCasedName);\n\n warnedProperties$1[name] = true;\n return true;\n }\n\n if (typeof value === 'boolean' && shouldRemoveAttributeWithWarning(name, value, propertyInfo, false)) {\n if (value) {\n error('Received `%s` for a non-boolean attribute `%s`.\\n\\n' + 'If you want to write it to the DOM, pass a string instead: ' + '%s=\"%s\" or %s={value.toString()}.', value, name, name, value, name);\n } else {\n error('Received `%s` for a non-boolean attribute `%s`.\\n\\n' + 'If you want to write it to the DOM, pass a string instead: ' + '%s=\"%s\" or %s={value.toString()}.\\n\\n' + 'If you used to conditionally omit it with %s={condition && value}, ' + 'pass %s={condition ? value : undefined} instead.', value, name, name, value, name, name, name);\n }\n\n warnedProperties$1[name] = true;\n return true;\n } // Now that we've validated casing, do not validate\n // data types for reserved props\n\n\n if (isReserved) {\n return true;\n } // Warn when a known attribute is a bad type\n\n\n if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, false)) {\n warnedProperties$1[name] = true;\n return false;\n } // Warn when passing the strings 'false' or 'true' into a boolean prop\n\n\n if ((value === 'false' || value === 'true') && propertyInfo !== null && propertyInfo.type === BOOLEAN) {\n error('Received the string `%s` for the boolean attribute `%s`. ' + '%s ' + 'Did you mean %s={%s}?', value, name, value === 'false' ? 'The browser will interpret it as a truthy value.' : 'Although this works, it will not work as expected if you pass the string \"false\".', name, value);\n\n warnedProperties$1[name] = true;\n return true;\n }\n\n return true;\n };\n}\n\nvar warnUnknownProperties = function (type, props, eventRegistry) {\n {\n var unknownProps = [];\n\n for (var key in props) {\n var isValid = validateProperty$1(type, key, props[key], eventRegistry);\n\n if (!isValid) {\n unknownProps.push(key);\n }\n }\n\n var unknownPropString = unknownProps.map(function (prop) {\n return '`' + prop + '`';\n }).join(', ');\n\n if (unknownProps.length === 1) {\n error('Invalid value for prop %s on <%s> tag. Either remove it from the element, ' + 'or pass a string or number value to keep it in the DOM. ' + 'For details, see https://reactjs.org/link/attribute-behavior ', unknownPropString, type);\n } else if (unknownProps.length > 1) {\n error('Invalid values for props %s on <%s> tag. Either remove them from the element, ' + 'or pass a string or number value to keep them in the DOM. ' + 'For details, see https://reactjs.org/link/attribute-behavior ', unknownPropString, type);\n }\n }\n};\n\nfunction validateProperties$2(type, props, eventRegistry) {\n if (isCustomComponent(type, props)) {\n return;\n }\n\n warnUnknownProperties(type, props, eventRegistry);\n}\n\nvar warnValidStyle = function () {};\n\n{\n // 'msTransform' is correct, but the other prefixes should be capitalized\n var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/;\n var msPattern = /^-ms-/;\n var hyphenPattern = /-(.)/g; // style values shouldn't contain a semicolon\n\n var badStyleValueWithSemicolonPattern = /;\\s*$/;\n var warnedStyleNames = {};\n var warnedStyleValues = {};\n var warnedForNaNValue = false;\n var warnedForInfinityValue = false;\n\n var camelize = function (string) {\n return string.replace(hyphenPattern, function (_, character) {\n return character.toUpperCase();\n });\n };\n\n var warnHyphenatedStyleName = function (name) {\n if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {\n return;\n }\n\n warnedStyleNames[name] = true;\n\n error('Unsupported style property %s. Did you mean %s?', name, // As Andi Smith suggests\n // (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix\n // is converted to lowercase `ms`.\n camelize(name.replace(msPattern, 'ms-')));\n };\n\n var warnBadVendoredStyleName = function (name) {\n if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {\n return;\n }\n\n warnedStyleNames[name] = true;\n\n error('Unsupported vendor-prefixed style property %s. Did you mean %s?', name, name.charAt(0).toUpperCase() + name.slice(1));\n };\n\n var warnStyleValueWithSemicolon = function (name, value) {\n if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) {\n return;\n }\n\n warnedStyleValues[value] = true;\n\n error(\"Style property values shouldn't contain a semicolon. \" + 'Try \"%s: %s\" instead.', name, value.replace(badStyleValueWithSemicolonPattern, ''));\n };\n\n var warnStyleValueIsNaN = function (name, value) {\n if (warnedForNaNValue) {\n return;\n }\n\n warnedForNaNValue = true;\n\n error('`NaN` is an invalid value for the `%s` css style property.', name);\n };\n\n var warnStyleValueIsInfinity = function (name, value) {\n if (warnedForInfinityValue) {\n return;\n }\n\n warnedForInfinityValue = true;\n\n error('`Infinity` is an invalid value for the `%s` css style property.', name);\n };\n\n warnValidStyle = function (name, value) {\n if (name.indexOf('-') > -1) {\n warnHyphenatedStyleName(name);\n } else if (badVendoredStyleNamePattern.test(name)) {\n warnBadVendoredStyleName(name);\n } else if (badStyleValueWithSemicolonPattern.test(value)) {\n warnStyleValueWithSemicolon(name, value);\n }\n\n if (typeof value === 'number') {\n if (isNaN(value)) {\n warnStyleValueIsNaN(name, value);\n } else if (!isFinite(value)) {\n warnStyleValueIsInfinity(name, value);\n }\n }\n };\n}\n\nvar warnValidStyle$1 = warnValidStyle;\n\n// code copied and modified from escape-html\nvar matchHtmlRegExp = /[\"'&<>]/;\n/**\n * Escapes special characters and HTML entities in a given html string.\n *\n * @param {string} string HTML string to escape for later insertion\n * @return {string}\n * @public\n */\n\nfunction escapeHtml(string) {\n {\n checkHtmlStringCoercion(string);\n }\n\n var str = '' + string;\n var match = matchHtmlRegExp.exec(str);\n\n if (!match) {\n return str;\n }\n\n var escape;\n var html = '';\n var index;\n var lastIndex = 0;\n\n for (index = match.index; index < str.length; index++) {\n switch (str.charCodeAt(index)) {\n case 34:\n // \"\n escape = '"';\n break;\n\n case 38:\n // &\n escape = '&';\n break;\n\n case 39:\n // '\n escape = '''; // modified from escape-html; used to be '''\n\n break;\n\n case 60:\n // <\n escape = '<';\n break;\n\n case 62:\n // >\n escape = '>';\n break;\n\n default:\n continue;\n }\n\n if (lastIndex !== index) {\n html += str.substring(lastIndex, index);\n }\n\n lastIndex = index + 1;\n html += escape;\n }\n\n return lastIndex !== index ? html + str.substring(lastIndex, index) : html;\n} // end code copied and modified from escape-html\n\n/**\n * Escapes text to prevent scripting attacks.\n *\n * @param {*} text Text value to escape.\n * @return {string} An escaped string.\n */\n\n\nfunction escapeTextForBrowser(text) {\n if (typeof text === 'boolean' || typeof text === 'number') {\n // this shortcircuit helps perf for types that we know will never have\n // special characters, especially given that this function is used often\n // for numeric dom ids.\n return '' + text;\n }\n\n return escapeHtml(text);\n}\n\nvar uppercasePattern = /([A-Z])/g;\nvar msPattern$1 = /^ms-/;\n/**\n * Hyphenates a camelcased CSS property name, for example:\n *\n * > hyphenateStyleName('backgroundColor')\n * < \"background-color\"\n * > hyphenateStyleName('MozTransition')\n * < \"-moz-transition\"\n * > hyphenateStyleName('msTransition')\n * < \"-ms-transition\"\n *\n * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix\n * is converted to `-ms-`.\n */\n\nfunction hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern$1, '-ms-');\n}\n\n// and any newline or tab are filtered out as if they're not part of the URL.\n// https://url.spec.whatwg.org/#url-parsing\n// Tab or newline are defined as \\r\\n\\t:\n// https://infra.spec.whatwg.org/#ascii-tab-or-newline\n// A C0 control is a code point in the range \\u0000 NULL to \\u001F\n// INFORMATION SEPARATOR ONE, inclusive:\n// https://infra.spec.whatwg.org/#c0-control-or-space\n\n/* eslint-disable max-len */\n\nvar isJavaScriptProtocol = /^[\\u0000-\\u001F ]*j[\\r\\n\\t]*a[\\r\\n\\t]*v[\\r\\n\\t]*a[\\r\\n\\t]*s[\\r\\n\\t]*c[\\r\\n\\t]*r[\\r\\n\\t]*i[\\r\\n\\t]*p[\\r\\n\\t]*t[\\r\\n\\t]*\\:/i;\nvar didWarn = false;\n\nfunction sanitizeURL(url) {\n {\n if (!didWarn && isJavaScriptProtocol.test(url)) {\n didWarn = true;\n\n error('A future version of React will block javascript: URLs as a security precaution. ' + 'Use event handlers instead if you can. If you need to generate unsafe HTML try ' + 'using dangerouslySetInnerHTML instead. React was passed %s.', JSON.stringify(url));\n }\n }\n}\n\nvar isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare\n\nfunction isArray(a) {\n return isArrayImpl(a);\n}\n\nvar startInlineScript = stringToPrecomputedChunk('<script>');\nvar endInlineScript = stringToPrecomputedChunk('</script>');\nvar startScriptSrc = stringToPrecomputedChunk('<script src=\"');\nvar startModuleSrc = stringToPrecomputedChunk('<script type=\"module\" src=\"');\nvar endAsyncScript = stringToPrecomputedChunk('\" async=\"\"></script>');\n/**\n * This escaping function is designed to work with bootstrapScriptContent only.\n * because we know we are escaping the entire script. We can avoid for instance\n * escaping html comment string sequences that are valid javascript as well because\n * if there are no sebsequent <script sequences the html parser will never enter\n * script data double escaped state (see: https://www.w3.org/TR/html53/syntax.html#script-data-double-escaped-state)\n *\n * While untrusted script content should be made safe before using this api it will\n * ensure that the script cannot be early terminated or never terminated state\n */\n\nfunction escapeBootstrapScriptContent(scriptText) {\n {\n checkHtmlStringCoercion(scriptText);\n }\n\n return ('' + scriptText).replace(scriptRegex, scriptReplacer);\n}\n\nvar scriptRegex = /(<\\/|<)(s)(cript)/gi;\n\nvar scriptReplacer = function (match, prefix, s, suffix) {\n return \"\" + prefix + (s === 's' ? \"\\\\u0073\" : \"\\\\u0053\") + suffix;\n}; // Allows us to keep track of what we've already written so we can refer back to it.\n\n\nfunction createResponseState(identifierPrefix, nonce, bootstrapScriptContent, bootstrapScripts, bootstrapModules) {\n var idPrefix = identifierPrefix === undefined ? '' : identifierPrefix;\n var inlineScriptWithNonce = nonce === undefined ? startInlineScript : stringToPrecomputedChunk('<script nonce=\"' + escapeTextForBrowser(nonce) + '\">');\n var bootstrapChunks = [];\n\n if (bootstrapScriptContent !== undefined) {\n bootstrapChunks.push(inlineScriptWithNonce, stringToChunk(escapeBootstrapScriptContent(bootstrapScriptContent)), endInlineScript);\n }\n\n if (bootstrapScripts !== undefined) {\n for (var i = 0; i < bootstrapScripts.length; i++) {\n bootstrapChunks.push(startScriptSrc, stringToChunk(escapeTextForBrowser(bootstrapScripts[i])), endAsyncScript);\n }\n }\n\n if (bootstrapModules !== undefined) {\n for (var _i = 0; _i < bootstrapModules.length; _i++) {\n bootstrapChunks.push(startModuleSrc, stringToChunk(escapeTextForBrowser(bootstrapModules[_i])), endAsyncScript);\n }\n }\n\n return {\n bootstrapChunks: bootstrapChunks,\n startInlineScript: inlineScriptWithNonce,\n placeholderPrefix: stringToPrecomputedChunk(idPrefix + 'P:'),\n segmentPrefix: stringToPrecomputedChunk(idPrefix + 'S:'),\n boundaryPrefix: idPrefix + 'B:',\n idPrefix: idPrefix,\n nextSuspenseID: 0,\n sentCompleteSegmentFunction: false,\n sentCompleteBoundaryFunction: false,\n sentClientRenderFunction: false\n };\n} // Constants for the insertion mode we're currently writing in. We don't encode all HTML5 insertion\n// modes. We only include the variants as they matter for the sake of our purposes.\n// We don't actually provide the namespace therefore we use constants instead of the string.\n\nvar ROOT_HTML_MODE = 0; // Used for the root most element tag.\n\nvar HTML_MODE = 1;\nvar SVG_MODE = 2;\nvar MATHML_MODE = 3;\nvar HTML_TABLE_MODE = 4;\nvar HTML_TABLE_BODY_MODE = 5;\nvar HTML_TABLE_ROW_MODE = 6;\nvar HTML_COLGROUP_MODE = 7; // We have a greater than HTML_TABLE_MODE check elsewhere. If you add more cases here, make sure it\n// still makes sense\n\nfunction createFormatContext(insertionMode, selectedValue) {\n return {\n insertionMode: insertionMode,\n selectedValue: selectedValue\n };\n}\nfunction getChildFormatContext(parentContext, type, props) {\n switch (type) {\n case 'select':\n return createFormatContext(HTML_MODE, props.value != null ? props.value : props.defaultValue);\n\n case 'svg':\n return createFormatContext(SVG_MODE, null);\n\n case 'math':\n return createFormatContext(MATHML_MODE, null);\n\n case 'foreignObject':\n return createFormatContext(HTML_MODE, null);\n // Table parents are special in that their children can only be created at all if they're\n // wrapped in a table parent. So we need to encode that we're entering this mode.\n\n case 'table':\n return createFormatContext(HTML_TABLE_MODE, null);\n\n case 'thead':\n case 'tbody':\n case 'tfoot':\n return createFormatContext(HTML_TABLE_BODY_MODE, null);\n\n case 'colgroup':\n return createFormatContext(HTML_COLGROUP_MODE, null);\n\n case 'tr':\n return createFormatContext(HTML_TABLE_ROW_MODE, null);\n }\n\n if (parentContext.insertionMode >= HTML_TABLE_MODE) {\n // Whatever tag this was, it wasn't a table parent or other special parent, so we must have\n // entered plain HTML again.\n return createFormatContext(HTML_MODE, null);\n }\n\n if (parentContext.insertionMode === ROOT_HTML_MODE) {\n // We've emitted the root and is now in plain HTML mode.\n return createFormatContext(HTML_MODE, null);\n }\n\n return parentContext;\n}\nvar UNINITIALIZED_SUSPENSE_BOUNDARY_ID = null;\nfunction assignSuspenseBoundaryID(responseState) {\n var generatedID = responseState.nextSuspenseID++;\n return stringToPrecomputedChunk(responseState.boundaryPrefix + generatedID.toString(16));\n}\nfunction makeId(responseState, treeId, localId) {\n var idPrefix = responseState.idPrefix;\n var id = ':' + idPrefix + 'R' + treeId; // Unless this is the first id at this level, append a number at the end\n // that represents the position of this useId hook among all the useId\n // hooks for this fiber.\n\n if (localId > 0) {\n id += 'H' + localId.toString(32);\n }\n\n return id + ':';\n}\n\nfunction encodeHTMLTextNode(text) {\n return escapeTextForBrowser(text);\n}\n\nvar textSeparator = stringToPrecomputedChunk('<!-- -->');\nfunction pushTextInstance(target, text, responseState, textEmbedded) {\n if (text === '') {\n // Empty text doesn't have a DOM node representation and the hydration is aware of this.\n return textEmbedded;\n }\n\n if (textEmbedded) {\n target.push(textSeparator);\n }\n\n target.push(stringToChunk(encodeHTMLTextNode(text)));\n return true;\n} // Called when Fizz is done with a Segment. Currently the only purpose is to conditionally\n// emit a text separator when we don't know for sure it is safe to omit\n\nfunction pushSegmentFinale(target, responseState, lastPushedText, textEmbedded) {\n if (lastPushedText && textEmbedded) {\n target.push(textSeparator);\n }\n}\nvar styleNameCache = new Map();\n\nfunction processStyleName(styleName) {\n var chunk = styleNameCache.get(styleName);\n\n if (chunk !== undefined) {\n return chunk;\n }\n\n var result = stringToPrecomputedChunk(escapeTextForBrowser(hyphenateStyleName(styleName)));\n styleNameCache.set(styleName, result);\n return result;\n}\n\nvar styleAttributeStart = stringToPrecomputedChunk(' style=\"');\nvar styleAssign = stringToPrecomputedChunk(':');\nvar styleSeparator = stringToPrecomputedChunk(';');\n\nfunction pushStyle(target, responseState, style) {\n if (typeof style !== 'object') {\n throw new Error('The `style` prop expects a mapping from style properties to values, ' + \"not a string. For example, style={{marginRight: spacing + 'em'}} when \" + 'using JSX.');\n }\n\n var isFirst = true;\n\n for (var styleName in style) {\n if (!hasOwnProperty.call(style, styleName)) {\n continue;\n } // If you provide unsafe user data here they can inject arbitrary CSS\n // which may be problematic (I couldn't repro this):\n // https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet\n // http://www.thespanner.co.uk/2007/11/26/ultimate-xss-css-injection/\n // This is not an XSS hole but instead a potential CSS injection issue\n // which has lead to a greater discussion about how we're going to\n // trust URLs moving forward. See #2115901\n\n\n var styleValue = style[styleName];\n\n if (styleValue == null || typeof styleValue === 'boolean' || styleValue === '') {\n // TODO: We used to set empty string as a style with an empty value. Does that ever make sense?\n continue;\n }\n\n var nameChunk = void 0;\n var valueChunk = void 0;\n var isCustomProperty = styleName.indexOf('--') === 0;\n\n if (isCustomProperty) {\n nameChunk = stringToChunk(escapeTextForBrowser(styleName));\n\n {\n checkCSSPropertyStringCoercion(styleValue, styleName);\n }\n\n valueChunk = stringToChunk(escapeTextForBrowser(('' + styleValue).trim()));\n } else {\n {\n warnValidStyle$1(styleName, styleValue);\n }\n\n nameChunk = processStyleName(styleName);\n\n if (typeof styleValue === 'number') {\n if (styleValue !== 0 && !hasOwnProperty.call(isUnitlessNumber, styleName)) {\n valueChunk = stringToChunk(styleValue + 'px'); // Presumes implicit 'px' suffix for unitless numbers\n } else {\n valueChunk = stringToChunk('' + styleValue);\n }\n } else {\n {\n checkCSSPropertyStringCoercion(styleValue, styleName);\n }\n\n valueChunk = stringToChunk(escapeTextForBrowser(('' + styleValue).trim()));\n }\n }\n\n if (isFirst) {\n isFirst = false; // If it's first, we don't need any separators prefixed.\n\n target.push(styleAttributeStart, nameChunk, styleAssign, valueChunk);\n } else {\n target.push(styleSeparator, nameChunk, styleAssign, valueChunk);\n }\n }\n\n if (!isFirst) {\n target.push(attributeEnd);\n }\n}\n\nvar attributeSeparator = stringToPrecomputedChunk(' ');\nvar attributeAssign = stringToPrecomputedChunk('=\"');\nvar attributeEnd = stringToPrecomputedChunk('\"');\nvar attributeEmptyString = stringToPrecomputedChunk('=\"\"');\n\nfunction pushAttribute(target, responseState, name, value) {\n switch (name) {\n case 'style':\n {\n pushStyle(target, responseState, value);\n return;\n }\n\n case 'defaultValue':\n case 'defaultChecked': // These shouldn't be set as attributes on generic HTML elements.\n\n case 'innerHTML': // Must use dangerouslySetInnerHTML instead.\n\n case 'suppressContentEditableWarning':\n case 'suppressHydrationWarning':\n // Ignored. These are built-in to React on the client.\n return;\n }\n\n if ( // shouldIgnoreAttribute\n // We have already filtered out null/undefined and reserved words.\n name.length > 2 && (name[0] === 'o' || name[0] === 'O') && (name[1] === 'n' || name[1] === 'N')) {\n return;\n }\n\n var propertyInfo = getPropertyInfo(name);\n\n if (propertyInfo !== null) {\n // shouldRemoveAttribute\n switch (typeof value) {\n case 'function': // $FlowIssue symbol is perfectly valid here\n\n case 'symbol':\n // eslint-disable-line\n return;\n\n case 'boolean':\n {\n if (!propertyInfo.acceptsBooleans) {\n return;\n }\n }\n }\n\n var attributeName = propertyInfo.attributeName;\n var attributeNameChunk = stringToChunk(attributeName); // TODO: If it's known we can cache the chunk.\n\n switch (propertyInfo.type) {\n case BOOLEAN:\n if (value) {\n target.push(attributeSeparator, attributeNameChunk, attributeEmptyString);\n }\n\n return;\n\n case OVERLOADED_BOOLEAN:\n if (value === true) {\n target.push(attributeSeparator, attributeNameChunk, attributeEmptyString);\n } else if (value === false) ; else {\n target.push(attributeSeparator, attributeNameChunk, attributeAssign, stringToChunk(escapeTextForBrowser(value)), attributeEnd);\n }\n\n return;\n\n case NUMERIC:\n if (!isNaN(value)) {\n target.push(attributeSeparator, attributeNameChunk, attributeAssign, stringToChunk(escapeTextForBrowser(value)), attributeEnd);\n }\n\n break;\n\n case POSITIVE_NUMERIC:\n if (!isNaN(value) && value >= 1) {\n target.push(attributeSeparator, attributeNameChunk, attributeAssign, stringToChunk(escapeTextForBrowser(value)), attributeEnd);\n }\n\n break;\n\n default:\n if (propertyInfo.sanitizeURL) {\n {\n checkAttributeStringCoercion(value, attributeName);\n }\n\n value = '' + value;\n sanitizeURL(value);\n }\n\n target.push(attributeSeparator, attributeNameChunk, attributeAssign, stringToChunk(escapeTextForBrowser(value)), attributeEnd);\n }\n } else if (isAttributeNameSafe(name)) {\n // shouldRemoveAttribute\n switch (typeof value) {\n case 'function': // $FlowIssue symbol is perfectly valid here\n\n case 'symbol':\n // eslint-disable-line\n return;\n\n case 'boolean':\n {\n var prefix = name.toLowerCase().slice(0, 5);\n\n if (prefix !== 'data-' && prefix !== 'aria-') {\n return;\n }\n }\n }\n\n target.push(attributeSeparator, stringToChunk(name), attributeAssign, stringToChunk(escapeTextForBrowser(value)), attributeEnd);\n }\n}\n\nvar endOfStartTag = stringToPrecomputedChunk('>');\nvar endOfStartTagSelfClosing = stringToPrecomputedChunk('/>');\n\nfunction pushInnerHTML(target, innerHTML, children) {\n if (innerHTML != null) {\n if (children != null) {\n throw new Error('Can only set one of `children` or `props.dangerouslySetInnerHTML`.');\n }\n\n if (typeof innerHTML !== 'object' || !('__html' in innerHTML)) {\n throw new Error('`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. ' + 'Please visit https://reactjs.org/link/dangerously-set-inner-html ' + 'for more information.');\n }\n\n var html = innerHTML.__html;\n\n if (html !== null && html !== undefined) {\n {\n checkHtmlStringCoercion(html);\n }\n\n target.push(stringToChunk('' + html));\n }\n }\n} // TODO: Move these to ResponseState so that we warn for every request.\n// It would help debugging in stateful servers (e.g. service worker).\n\n\nvar didWarnDefaultInputValue = false;\nvar didWarnDefaultChecked = false;\nvar didWarnDefaultSelectValue = false;\nvar didWarnDefaultTextareaValue = false;\nvar didWarnInvalidOptionChildren = false;\nvar didWarnInvalidOptionInnerHTML = false;\nvar didWarnSelectedSetOnOption = false;\n\nfunction checkSelectProp(props, propName) {\n {\n var value = props[propName];\n\n if (value != null) {\n var array = isArray(value);\n\n if (props.multiple && !array) {\n error('The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.', propName);\n } else if (!props.multiple && array) {\n error('The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.', propName);\n }\n }\n }\n}\n\nfunction pushStartSelect(target, props, responseState) {\n {\n checkControlledValueProps('select', props);\n checkSelectProp(props, 'value');\n checkSelectProp(props, 'defaultValue');\n\n if (props.value !== undefined && props.defaultValue !== undefined && !didWarnDefaultSelectValue) {\n error('Select elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled select ' + 'element and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components');\n\n didWarnDefaultSelectValue = true;\n }\n }\n\n target.push(startChunkForTag('select'));\n var children = null;\n var innerHTML = null;\n\n for (var propKey in props) {\n if (hasOwnProperty.call(props, propKey)) {\n var propValue = props[propKey];\n\n if (propValue == null) {\n continue;\n }\n\n switch (propKey) {\n case 'children':\n children = propValue;\n break;\n\n case 'dangerouslySetInnerHTML':\n // TODO: This doesn't really make sense for select since it can't use the controlled\n // value in the innerHTML.\n innerHTML = propValue;\n break;\n\n case 'defaultValue':\n case 'value':\n // These are set on the Context instead and applied to the nested options.\n break;\n\n default:\n pushAttribute(target, responseState, propKey, propValue);\n break;\n }\n }\n }\n\n target.push(endOfStartTag);\n pushInnerHTML(target, innerHTML, children);\n return children;\n}\n\nfunction flattenOptionChildren(children) {\n var content = ''; // Flatten children and warn if they aren't strings or numbers;\n // invalid types are ignored.\n\n React.Children.forEach(children, function (child) {\n if (child == null) {\n return;\n }\n\n content += child;\n\n {\n if (!didWarnInvalidOptionChildren && typeof child !== 'string' && typeof child !== 'number') {\n didWarnInvalidOptionChildren = true;\n\n error('Cannot infer the option value of complex children. ' + 'Pass a `value` prop or use a plain string as children to <option>.');\n }\n }\n });\n return content;\n}\n\nvar selectedMarkerAttribute = stringToPrecomputedChunk(' selected=\"\"');\n\nfunction pushStartOption(target, props, responseState, formatContext) {\n var selectedValue = formatContext.selectedValue;\n target.push(startChunkForTag('option'));\n var children = null;\n var value = null;\n var selected = null;\n var innerHTML = null;\n\n for (var propKey in props) {\n if (hasOwnProperty.call(props, propKey)) {\n var propValue = props[propKey];\n\n if (propValue == null) {\n continue;\n }\n\n switch (propKey) {\n case 'children':\n children = propValue;\n break;\n\n case 'selected':\n // ignore\n selected = propValue;\n\n {\n // TODO: Remove support for `selected` in <option>.\n if (!didWarnSelectedSetOnOption) {\n error('Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.');\n\n didWarnSelectedSetOnOption = true;\n }\n }\n\n break;\n\n case 'dangerouslySetInnerHTML':\n innerHTML = propValue;\n break;\n // eslint-disable-next-line-no-fallthrough\n\n case 'value':\n value = propValue;\n // We intentionally fallthrough to also set the attribute on the node.\n // eslint-disable-next-line-no-fallthrough\n\n default:\n pushAttribute(target, responseState, propKey, propValue);\n break;\n }\n }\n }\n\n if (selectedValue != null) {\n var stringValue;\n\n if (value !== null) {\n {\n checkAttributeStringCoercion(value, 'value');\n }\n\n stringValue = '' + value;\n } else {\n {\n if (innerHTML !== null) {\n if (!didWarnInvalidOptionInnerHTML) {\n didWarnInvalidOptionInnerHTML = true;\n\n error('Pass a `value` prop if you set dangerouslyInnerHTML so React knows ' + 'which value should be selected.');\n }\n }\n }\n\n stringValue = flattenOptionChildren(children);\n }\n\n if (isArray(selectedValue)) {\n // multiple\n for (var i = 0; i < selectedValue.length; i++) {\n {\n checkAttributeStringCoercion(selectedValue[i], 'value');\n }\n\n var v = '' + selectedValue[i];\n\n if (v === stringValue) {\n target.push(selectedMarkerAttribute);\n break;\n }\n }\n } else {\n {\n checkAttributeStringCoercion(selectedValue, 'select.value');\n }\n\n if ('' + selectedValue === stringValue) {\n target.push(selectedMarkerAttribute);\n }\n }\n } else if (selected) {\n target.push(selectedMarkerAttribute);\n }\n\n target.push(endOfStartTag);\n pushInnerHTML(target, innerHTML, children);\n return children;\n}\n\nfunction pushInput(target, props, responseState) {\n {\n checkControlledValueProps('input', props);\n\n if (props.checked !== undefined && props.defaultChecked !== undefined && !didWarnDefaultChecked) {\n error('%s contains an input of type %s with both checked and defaultChecked props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the checked prop, or the defaultChecked prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components', 'A component', props.type);\n\n didWarnDefaultChecked = true;\n }\n\n if (props.value !== undefined && props.defaultValue !== undefined && !didWarnDefaultInputValue) {\n error('%s contains an input of type %s with both value and defaultValue props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components', 'A component', props.type);\n\n didWarnDefaultInputValue = true;\n }\n }\n\n target.push(startChunkForTag('input'));\n var value = null;\n var defaultValue = null;\n var checked = null;\n var defaultChecked = null;\n\n for (var propKey in props) {\n if (hasOwnProperty.call(props, propKey)) {\n var propValue = props[propKey];\n\n if (propValue == null) {\n continue;\n }\n\n switch (propKey) {\n case 'children':\n case 'dangerouslySetInnerHTML':\n throw new Error('input' + \" is a self-closing tag and must neither have `children` nor \" + 'use `dangerouslySetInnerHTML`.');\n // eslint-disable-next-line-no-fallthrough\n\n case 'defaultChecked':\n defaultChecked = propValue;\n break;\n\n case 'defaultValue':\n defaultValue = propValue;\n break;\n\n case 'checked':\n checked = propValue;\n break;\n\n case 'value':\n value = propValue;\n break;\n\n default:\n pushAttribute(target, responseState, propKey, propValue);\n break;\n }\n }\n }\n\n if (checked !== null) {\n pushAttribute(target, responseState, 'checked', checked);\n } else if (defaultChecked !== null) {\n pushAttribute(target, responseState, 'checked', defaultChecked);\n }\n\n if (value !== null) {\n pushAttribute(target, responseState, 'value', value);\n } else if (defaultValue !== null) {\n pushAttribute(target, responseState, 'value', defaultValue);\n }\n\n target.push(endOfStartTagSelfClosing);\n return null;\n}\n\nfunction pushStartTextArea(target, props, responseState) {\n {\n checkControlledValueProps('textarea', props);\n\n if (props.value !== undefined && props.defaultValue !== undefined && !didWarnDefaultTextareaValue) {\n error('Textarea elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled textarea ' + 'and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components');\n\n didWarnDefaultTextareaValue = true;\n }\n }\n\n target.push(startChunkForTag('textarea'));\n var value = null;\n var defaultValue = null;\n var children = null;\n\n for (var propKey in props) {\n if (hasOwnProperty.call(props, propKey)) {\n var propValue = props[propKey];\n\n if (propValue == null) {\n continue;\n }\n\n switch (propKey) {\n case 'children':\n children = propValue;\n break;\n\n case 'value':\n value = propValue;\n break;\n\n case 'defaultValue':\n defaultValue = propValue;\n break;\n\n case 'dangerouslySetInnerHTML':\n throw new Error('`dangerouslySetInnerHTML` does not make sense on <textarea>.');\n // eslint-disable-next-line-no-fallthrough\n\n default:\n pushAttribute(target, responseState, propKey, propValue);\n break;\n }\n }\n }\n\n if (value === null && defaultValue !== null) {\n value = defaultValue;\n }\n\n target.push(endOfStartTag); // TODO (yungsters): Remove support for children content in <textarea>.\n\n if (children != null) {\n {\n error('Use the `defaultValue` or `value` props instead of setting ' + 'children on <textarea>.');\n }\n\n if (value != null) {\n throw new Error('If you supply `defaultValue` on a <textarea>, do not pass children.');\n }\n\n if (isArray(children)) {\n if (children.length > 1) {\n throw new Error('<textarea> can only have at most one child.');\n } // TODO: remove the coercion and the DEV check below because it will\n // always be overwritten by the coercion several lines below it. #22309\n\n\n {\n checkHtmlStringCoercion(children[0]);\n }\n\n value = '' + children[0];\n }\n\n {\n checkHtmlStringCoercion(children);\n }\n\n value = '' + children;\n }\n\n if (typeof value === 'string' && value[0] === '\\n') {\n // text/html ignores the first character in these tags if it's a newline\n // Prefer to break application/xml over text/html (for now) by adding\n // a newline specifically to get eaten by the parser. (Alternately for\n // textareas, replacing \"^\\n\" with \"\\r\\n\" doesn't get eaten, and the first\n // \\r is normalized out by HTMLTextAreaElement#value.)\n // See: <http://www.w3.org/TR/html-polyglot/#newlines-in-textarea-and-pre>\n // See: <http://www.w3.org/TR/html5/syntax.html#element-restrictions>\n // See: <http://www.w3.org/TR/html5/syntax.html#newlines>\n // See: Parsing of \"textarea\" \"listing\" and \"pre\" elements\n // from <http://www.w3.org/TR/html5/syntax.html#parsing-main-inbody>\n target.push(leadingNewline);\n } // ToString and push directly instead of recurse over children.\n // We don't really support complex children in the value anyway.\n // This also currently avoids a trailing comment node which breaks textarea.\n\n\n if (value !== null) {\n {\n checkAttributeStringCoercion(value, 'value');\n }\n\n target.push(stringToChunk(encodeHTMLTextNode('' + value)));\n }\n\n return null;\n}\n\nfunction pushSelfClosing(target, props, tag, responseState) {\n target.push(startChunkForTag(tag));\n\n for (var propKey in props) {\n if (hasOwnProperty.call(props, propKey)) {\n var propValue = props[propKey];\n\n if (propValue == null) {\n continue;\n }\n\n switch (propKey) {\n case 'children':\n case 'dangerouslySetInnerHTML':\n throw new Error(tag + \" is a self-closing tag and must neither have `children` nor \" + 'use `dangerouslySetInnerHTML`.');\n // eslint-disable-next-line-no-fallthrough\n\n default:\n pushAttribute(target, responseState, propKey, propValue);\n break;\n }\n }\n }\n\n target.push(endOfStartTagSelfClosing);\n return null;\n}\n\nfunction pushStartMenuItem(target, props, responseState) {\n target.push(startChunkForTag('menuitem'));\n\n for (var propKey in props) {\n if (hasOwnProperty.call(props, propKey)) {\n var propValue = props[propKey];\n\n if (propValue == null) {\n continue;\n }\n\n switch (propKey) {\n case 'children':\n case 'dangerouslySetInnerHTML':\n throw new Error('menuitems cannot have `children` nor `dangerouslySetInnerHTML`.');\n // eslint-disable-next-line-no-fallthrough\n\n default:\n pushAttribute(target, responseState, propKey, propValue);\n break;\n }\n }\n }\n\n target.push(endOfStartTag);\n return null;\n}\n\nfunction pushStartTitle(target, props, responseState) {\n target.push(startChunkForTag('title'));\n var children = null;\n\n for (var propKey in props) {\n if (hasOwnProperty.call(props, propKey)) {\n var propValue = props[propKey];\n\n if (propValue == null) {\n continue;\n }\n\n switch (propKey) {\n case 'children':\n children = propValue;\n break;\n\n case 'dangerouslySetInnerHTML':\n throw new Error('`dangerouslySetInnerHTML` does not make sense on <title>.');\n // eslint-disable-next-line-no-fallthrough\n\n default:\n pushAttribute(target, responseState, propKey, propValue);\n break;\n }\n }\n }\n\n target.push(endOfStartTag);\n\n {\n var child = Array.isArray(children) && children.length < 2 ? children[0] || null : children;\n\n if (Array.isArray(children) && children.length > 1) {\n error('A title element received an array with more than 1 element as children. ' + 'In browsers title Elements can only have Text Nodes as children. If ' + 'the children being rendered output more than a single text node in aggregate the browser ' + 'will display markup and comments as text in the title and hydration will likely fail and ' + 'fall back to client rendering');\n } else if (child != null && child.$$typeof != null) {\n error('A title element received a React element for children. ' + 'In the browser title Elements can only have Text Nodes as children. If ' + 'the children being rendered output more than a single text node in aggregate the browser ' + 'will display markup and comments as text in the title and hydration will likely fail and ' + 'fall back to client rendering');\n } else if (child != null && typeof child !== 'string' && typeof child !== 'number') {\n error('A title element received a value that was not a string or number for children. ' + 'In the browser title Elements can only have Text Nodes as children. If ' + 'the children being rendered output more than a single text node in aggregate the browser ' + 'will display markup and comments as text in the title and hydration will likely fail and ' + 'fall back to client rendering');\n }\n }\n\n return children;\n}\n\nfunction pushStartGenericElement(target, props, tag, responseState) {\n target.push(startChunkForTag(tag));\n var children = null;\n var innerHTML = null;\n\n for (var propKey in props) {\n if (hasOwnProperty.call(props, propKey)) {\n var propValue = props[propKey];\n\n if (propValue == null) {\n continue;\n }\n\n switch (propKey) {\n case 'children':\n children = propValue;\n break;\n\n case 'dangerouslySetInnerHTML':\n innerHTML = propValue;\n break;\n\n default:\n pushAttribute(target, responseState, propKey, propValue);\n break;\n }\n }\n }\n\n target.push(endOfStartTag);\n pushInnerHTML(target, innerHTML, children);\n\n if (typeof children === 'string') {\n // Special case children as a string to avoid the unnecessary comment.\n // TODO: Remove this special case after the general optimization is in place.\n target.push(stringToChunk(encodeHTMLTextNode(children)));\n return null;\n }\n\n return children;\n}\n\nfunction pushStartCustomElement(target, props, tag, responseState) {\n target.push(startChunkForTag(tag));\n var children = null;\n var innerHTML = null;\n\n for (var propKey in props) {\n if (hasOwnProperty.call(props, propKey)) {\n var propValue = props[propKey];\n\n if (propValue == null) {\n continue;\n }\n\n switch (propKey) {\n case 'children':\n children = propValue;\n break;\n\n case 'dangerouslySetInnerHTML':\n innerHTML = propValue;\n break;\n\n case 'style':\n pushStyle(target, responseState, propValue);\n break;\n\n case 'suppressContentEditableWarning':\n case 'suppressHydrationWarning':\n // Ignored. These are built-in to React on the client.\n break;\n\n default:\n if (isAttributeNameSafe(propKey) && typeof propValue !== 'function' && typeof propValue !== 'symbol') {\n target.push(attributeSeparator, stringToChunk(propKey), attributeAssign, stringToChunk(escapeTextForBrowser(propValue)), attributeEnd);\n }\n\n break;\n }\n }\n }\n\n target.push(endOfStartTag);\n pushInnerHTML(target, innerHTML, children);\n return children;\n}\n\nvar leadingNewline = stringToPrecomputedChunk('\\n');\n\nfunction pushStartPreformattedElement(target, props, tag, responseState) {\n target.push(startChunkForTag(tag));\n var children = null;\n var innerHTML = null;\n\n for (var propKey in props) {\n if (hasOwnProperty.call(props, propKey)) {\n var propValue = props[propKey];\n\n if (propValue == null) {\n continue;\n }\n\n switch (propKey) {\n case 'children':\n children = propValue;\n break;\n\n case 'dangerouslySetInnerHTML':\n innerHTML = propValue;\n break;\n\n default:\n pushAttribute(target, responseState, propKey, propValue);\n break;\n }\n }\n }\n\n target.push(endOfStartTag); // text/html ignores the first character in these tags if it's a newline\n // Prefer to break application/xml over text/html (for now) by adding\n // a newline specifically to get eaten by the parser. (Alternately for\n // textareas, replacing \"^\\n\" with \"\\r\\n\" doesn't get eaten, and the first\n // \\r is normalized out by HTMLTextAreaElement#value.)\n // See: <http://www.w3.org/TR/html-polyglot/#newlines-in-textarea-and-pre>\n // See: <http://www.w3.org/TR/html5/syntax.html#element-restrictions>\n // See: <http://www.w3.org/TR/html5/syntax.html#newlines>\n // See: Parsing of \"textarea\" \"listing\" and \"pre\" elements\n // from <http://www.w3.org/TR/html5/syntax.html#parsing-main-inbody>\n // TODO: This doesn't deal with the case where the child is an array\n // or component that returns a string.\n\n if (innerHTML != null) {\n if (children != null) {\n throw new Error('Can only set one of `children` or `props.dangerouslySetInnerHTML`.');\n }\n\n if (typeof innerHTML !== 'object' || !('__html' in innerHTML)) {\n throw new Error('`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. ' + 'Please visit https://reactjs.org/link/dangerously-set-inner-html ' + 'for more information.');\n }\n\n var html = innerHTML.__html;\n\n if (html !== null && html !== undefined) {\n if (typeof html === 'string' && html.length > 0 && html[0] === '\\n') {\n target.push(leadingNewline, stringToChunk(html));\n } else {\n {\n checkHtmlStringCoercion(html);\n }\n\n target.push(stringToChunk('' + html));\n }\n }\n }\n\n if (typeof children === 'string' && children[0] === '\\n') {\n target.push(leadingNewline);\n }\n\n return children;\n} // We accept any tag to be rendered but since this gets injected into arbitrary\n// HTML, we want to make sure that it's a safe tag.\n// http://www.w3.org/TR/REC-xml/#NT-Name\n\n\nvar VALID_TAG_REGEX = /^[a-zA-Z][a-zA-Z:_\\.\\-\\d]*$/; // Simplified subset\n\nvar validatedTagCache = new Map();\n\nfunction startChunkForTag(tag) {\n var tagStartChunk = validatedTagCache.get(tag);\n\n if (tagStartChunk === undefined) {\n if (!VALID_TAG_REGEX.test(tag)) {\n throw new Error(\"Invalid tag: \" + tag);\n }\n\n tagStartChunk = stringToPrecomputedChunk('<' + tag);\n validatedTagCache.set(tag, tagStartChunk);\n }\n\n return tagStartChunk;\n}\n\nvar DOCTYPE = stringToPrecomputedChunk('<!DOCTYPE html>');\nfunction pushStartInstance(target, type, props, responseState, formatContext) {\n {\n validateProperties(type, props);\n validateProperties$1(type, props);\n validateProperties$2(type, props, null);\n\n if (!props.suppressContentEditableWarning && props.contentEditable && props.children != null) {\n error('A component is `contentEditable` and contains `children` managed by ' + 'React. It is now your responsibility to guarantee that none of ' + 'those nodes are unexpectedly modified or duplicated. This is ' + 'probably not intentional.');\n }\n\n if (formatContext.insertionMode !== SVG_MODE && formatContext.insertionMode !== MATHML_MODE) {\n if (type.indexOf('-') === -1 && typeof props.is !== 'string' && type.toLowerCase() !== type) {\n error('<%s /> is using incorrect casing. ' + 'Use PascalCase for React components, ' + 'or lowercase for HTML elements.', type);\n }\n }\n }\n\n switch (type) {\n // Special tags\n case 'select':\n return pushStartSelect(target, props, responseState);\n\n case 'option':\n return pushStartOption(target, props, responseState, formatContext);\n\n case 'textarea':\n return pushStartTextArea(target, props, responseState);\n\n case 'input':\n return pushInput(target, props, responseState);\n\n case 'menuitem':\n return pushStartMenuItem(target, props, responseState);\n\n case 'title':\n return pushStartTitle(target, props, responseState);\n // Newline eating tags\n\n case 'listing':\n case 'pre':\n {\n return pushStartPreformattedElement(target, props, type, responseState);\n }\n // Omitted close tags\n\n case 'area':\n case 'base':\n case 'br':\n case 'col':\n case 'embed':\n case 'hr':\n case 'img':\n case 'keygen':\n case 'link':\n case 'meta':\n case 'param':\n case 'source':\n case 'track':\n case 'wbr':\n {\n return pushSelfClosing(target, props, type, responseState);\n }\n // These are reserved SVG and MathML elements, that are never custom elements.\n // https://w3c.github.io/webcomponents/spec/custom/#custom-elements-core-concepts\n\n case 'annotation-xml':\n case 'color-profile':\n case 'font-face':\n case 'font-face-src':\n case 'font-face-uri':\n case 'font-face-format':\n case 'font-face-name':\n case 'missing-glyph':\n {\n return pushStartGenericElement(target, props, type, responseState);\n }\n\n case 'html':\n {\n if (formatContext.insertionMode === ROOT_HTML_MODE) {\n // If we're rendering the html tag and we're at the root (i.e. not in foreignObject)\n // then we also emit the DOCTYPE as part of the root content as a convenience for\n // rendering the whole document.\n target.push(DOCTYPE);\n }\n\n return pushStartGenericElement(target, props, type, responseState);\n }\n\n default:\n {\n if (type.indexOf('-') === -1 && typeof props.is !== 'string') {\n // Generic element\n return pushStartGenericElement(target, props, type, responseState);\n } else {\n // Custom element\n return pushStartCustomElement(target, props, type, responseState);\n }\n }\n }\n}\nvar endTag1 = stringToPrecomputedChunk('</');\nvar endTag2 = stringToPrecomputedChunk('>');\nfunction pushEndInstance(target, type, props) {\n switch (type) {\n // Omitted close tags\n // TODO: Instead of repeating this switch we could try to pass a flag from above.\n // That would require returning a tuple. Which might be ok if it gets inlined.\n case 'area':\n case 'base':\n case 'br':\n case 'col':\n case 'embed':\n case 'hr':\n case 'img':\n case 'input':\n case 'keygen':\n case 'link':\n case 'meta':\n case 'param':\n case 'source':\n case 'track':\n case 'wbr':\n {\n // No close tag needed.\n break;\n }\n\n default:\n {\n target.push(endTag1, stringToChunk(type), endTag2);\n }\n }\n}\nfunction writeCompletedRoot(destination, responseState) {\n var bootstrapChunks = responseState.bootstrapChunks;\n var i = 0;\n\n for (; i < bootstrapChunks.length - 1; i++) {\n writeChunk(destination, bootstrapChunks[i]);\n }\n\n if (i < bootstrapChunks.length) {\n return writeChunkAndReturn(destination, bootstrapChunks[i]);\n }\n\n return true;\n} // Structural Nodes\n// A placeholder is a node inside a hidden partial tree that can be filled in later, but before\n// display. It's never visible to users. We use the template tag because it can be used in every\n// type of parent. <script> tags also work in every other tag except <colgroup>.\n\nvar placeholder1 = stringToPrecomputedChunk('<template id=\"');\nvar placeholder2 = stringToPrecomputedChunk('\"></template>');\nfunction writePlaceholder(destination, responseState, id) {\n writeChunk(destination, placeholder1);\n writeChunk(destination, responseState.placeholderPrefix);\n var formattedID = stringToChunk(id.toString(16));\n writeChunk(destination, formattedID);\n return writeChunkAndReturn(destination, placeholder2);\n} // Suspense boundaries are encoded as comments.\n\nvar startCompletedSuspenseBoundary = stringToPrecomputedChunk('<!--$-->');\nvar startPendingSuspenseBoundary1 = stringToPrecomputedChunk('<!--$?--><template id=\"');\nvar startPendingSuspenseBoundary2 = stringToPrecomputedChunk('\"></template>');\nvar startClientRenderedSuspenseBoundary = stringToPrecomputedChunk('<!--$!-->');\nvar endSuspenseBoundary = stringToPrecomputedChunk('<!--/$-->');\nvar clientRenderedSuspenseBoundaryError1 = stringToPrecomputedChunk('<template');\nvar clientRenderedSuspenseBoundaryErrorAttrInterstitial = stringToPrecomputedChunk('\"');\nvar clientRenderedSuspenseBoundaryError1A = stringToPrecomputedChunk(' data-dgst=\"');\nvar clientRenderedSuspenseBoundaryError1B = stringToPrecomputedChunk(' data-msg=\"');\nvar clientRenderedSuspenseBoundaryError1C = stringToPrecomputedChunk(' data-stck=\"');\nvar clientRenderedSuspenseBoundaryError2 = stringToPrecomputedChunk('></template>');\nfunction writeStartCompletedSuspenseBoundary(destination, responseState) {\n return writeChunkAndReturn(destination, startCompletedSuspenseBoundary);\n}\nfunction writeStartPendingSuspenseBoundary(destination, responseState, id) {\n writeChunk(destination, startPendingSuspenseBoundary1);\n\n if (id === null) {\n throw new Error('An ID must have been assigned before we can complete the boundary.');\n }\n\n writeChunk(destination, id);\n return writeChunkAndReturn(destination, startPendingSuspenseBoundary2);\n}\nfunction writeStartClientRenderedSuspenseBoundary(destination, responseState, errorDigest, errorMesssage, errorComponentStack) {\n var result;\n result = writeChunkAndReturn(destination, startClientRenderedSuspenseBoundary);\n writeChunk(destination, clientRenderedSuspenseBoundaryError1);\n\n if (errorDigest) {\n writeChunk(destination, clientRenderedSuspenseBoundaryError1A);\n writeChunk(destination, stringToChunk(escapeTextForBrowser(errorDigest)));\n writeChunk(destination, clientRenderedSuspenseBoundaryErrorAttrInterstitial);\n }\n\n {\n if (errorMesssage) {\n writeChunk(destination, clientRenderedSuspenseBoundaryError1B);\n writeChunk(destination, stringToChunk(escapeTextForBrowser(errorMesssage)));\n writeChunk(destination, clientRenderedSuspenseBoundaryErrorAttrInterstitial);\n }\n\n if (errorComponentStack) {\n writeChunk(destination, clientRenderedSuspenseBoundaryError1C);\n writeChunk(destination, stringToChunk(escapeTextForBrowser(errorComponentStack)));\n writeChunk(destination, clientRenderedSuspenseBoundaryErrorAttrInterstitial);\n }\n }\n\n result = writeChunkAndReturn(destination, clientRenderedSuspenseBoundaryError2);\n return result;\n}\nfunction writeEndCompletedSuspenseBoundary(destination, responseState) {\n return writeChunkAndReturn(destination, endSuspenseBoundary);\n}\nfunction writeEndPendingSuspenseBoundary(destination, responseState) {\n return writeChunkAndReturn(destination, endSuspenseBoundary);\n}\nfunction writeEndClientRenderedSuspenseBoundary(destination, responseState) {\n return writeChunkAndReturn(destination, endSuspenseBoundary);\n}\nvar startSegmentHTML = stringToPrecomputedChunk('<div hidden id=\"');\nvar startSegmentHTML2 = stringToPrecomputedChunk('\">');\nvar endSegmentHTML = stringToPrecomputedChunk('</div>');\nvar startSegmentSVG = stringToPrecomputedChunk('<svg aria-hidden=\"true\" style=\"display:none\" id=\"');\nvar startSegmentSVG2 = stringToPrecomputedChunk('\">');\nvar endSegmentSVG = stringToPrecomputedChunk('</svg>');\nvar startSegmentMathML = stringToPrecomputedChunk('<math aria-hidden=\"true\" style=\"display:none\" id=\"');\nvar startSegmentMathML2 = stringToPrecomputedChunk('\">');\nvar endSegmentMathML = stringToPrecomputedChunk('</math>');\nvar startSegmentTable = stringToPrecomputedChunk('<table hidden id=\"');\nvar startSegmentTable2 = stringToPrecomputedChunk('\">');\nvar endSegmentTable = stringToPrecomputedChunk('</table>');\nvar startSegmentTableBody = stringToPrecomputedChunk('<table hidden><tbody id=\"');\nvar startSegmentTableBody2 = stringToPrecomputedChunk('\">');\nvar endSegmentTableBody = stringToPrecomputedChunk('</tbody></table>');\nvar startSegmentTableRow = stringToPrecomputedChunk('<table hidden><tr id=\"');\nvar startSegmentTableRow2 = stringToPrecomputedChunk('\">');\nvar endSegmentTableRow = stringToPrecomputedChunk('</tr></table>');\nvar startSegmentColGroup = stringToPrecomputedChunk('<table hidden><colgroup id=\"');\nvar startSegmentColGroup2 = stringToPrecomputedChunk('\">');\nvar endSegmentColGroup = stringToPrecomputedChunk('</colgroup></table>');\nfunction writeStartSegment(destination, responseState, formatContext, id) {\n switch (formatContext.insertionMode) {\n case ROOT_HTML_MODE:\n case HTML_MODE:\n {\n writeChunk(destination, startSegmentHTML);\n writeChunk(destination, responseState.segmentPrefix);\n writeChunk(destination, stringToChunk(id.toString(16)));\n return writeChunkAndReturn(destination, startSegmentHTML2);\n }\n\n case SVG_MODE:\n {\n writeChunk(destination, startSegmentSVG);\n writeChunk(destination, responseState.segmentPrefix);\n writeChunk(destination, stringToChunk(id.toString(16)));\n return writeChunkAndReturn(destination, startSegmentSVG2);\n }\n\n case MATHML_MODE:\n {\n writeChunk(destination, startSegmentMathML);\n writeChunk(destination, responseState.segmentPrefix);\n writeChunk(destination, stringToChunk(id.toString(16)));\n return writeChunkAndReturn(destination, startSegmentMathML2);\n }\n\n case HTML_TABLE_MODE:\n {\n writeChunk(destination, startSegmentTable);\n writeChunk(destination, responseState.segmentPrefix);\n writeChunk(destination, stringToChunk(id.toString(16)));\n return writeChunkAndReturn(destination, startSegmentTable2);\n }\n // TODO: For the rest of these, there will be extra wrapper nodes that never\n // get deleted from the document. We need to delete the table too as part\n // of the injected scripts. They are invisible though so it's not too terrible\n // and it's kind of an edge case to suspend in a table. Totally supported though.\n\n case HTML_TABLE_BODY_MODE:\n {\n writeChunk(destination, startSegmentTableBody);\n writeChunk(destination, responseState.segmentPrefix);\n writeChunk(destination, stringToChunk(id.toString(16)));\n return writeChunkAndReturn(destination, startSegmentTableBody2);\n }\n\n case HTML_TABLE_ROW_MODE:\n {\n writeChunk(destination, startSegmentTableRow);\n writeChunk(destination, responseState.segmentPrefix);\n writeChunk(destination, stringToChunk(id.toString(16)));\n return writeChunkAndReturn(destination, startSegmentTableRow2);\n }\n\n case HTML_COLGROUP_MODE:\n {\n writeChunk(destination, startSegmentColGroup);\n writeChunk(destination, responseState.segmentPrefix);\n writeChunk(destination, stringToChunk(id.toString(16)));\n return writeChunkAndReturn(destination, startSegmentColGroup2);\n }\n\n default:\n {\n throw new Error('Unknown insertion mode. This is a bug in React.');\n }\n }\n}\nfunction writeEndSegment(destination, formatContext) {\n switch (formatContext.insertionMode) {\n case ROOT_HTML_MODE:\n case HTML_MODE:\n {\n return writeChunkAndReturn(destination, endSegmentHTML);\n }\n\n case SVG_MODE:\n {\n return writeChunkAndReturn(destination, endSegmentSVG);\n }\n\n case MATHML_MODE:\n {\n return writeChunkAndReturn(destination, endSegmentMathML);\n }\n\n case HTML_TABLE_MODE:\n {\n return writeChunkAndReturn(destination, endSegmentTable);\n }\n\n case HTML_TABLE_BODY_MODE:\n {\n return writeChunkAndReturn(destination, endSegmentTableBody);\n }\n\n case HTML_TABLE_ROW_MODE:\n {\n return writeChunkAndReturn(destination, endSegmentTableRow);\n }\n\n case HTML_COLGROUP_MODE:\n {\n return writeChunkAndReturn(destination, endSegmentColGroup);\n }\n\n default:\n {\n throw new Error('Unknown insertion mode. This is a bug in React.');\n }\n }\n} // Instruction Set\n// The following code is the source scripts that we then minify and inline below,\n// with renamed function names that we hope don't collide:\n// const COMMENT_NODE = 8;\n// const SUSPENSE_START_DATA = '$';\n// const SUSPENSE_END_DATA = '/$';\n// const SUSPENSE_PENDING_START_DATA = '$?';\n// const SUSPENSE_FALLBACK_START_DATA = '$!';\n//\n// function clientRenderBoundary(suspenseBoundaryID, errorDigest, errorMsg, errorComponentStack) {\n// // Find the fallback's first element.\n// const suspenseIdNode = document.getElementById(suspenseBoundaryID);\n// if (!suspenseIdNode) {\n// // The user must have already navigated away from this tree.\n// // E.g. because the parent was hydrated.\n// return;\n// }\n// // Find the boundary around the fallback. This is always the previous node.\n// const suspenseNode = suspenseIdNode.previousSibling;\n// // Tag it to be client rendered.\n// suspenseNode.data = SUSPENSE_FALLBACK_START_DATA;\n// // assign error metadata to first sibling\n// let dataset = suspenseIdNode.dataset;\n// if (errorDigest) dataset.dgst = errorDigest;\n// if (errorMsg) dataset.msg = errorMsg;\n// if (errorComponentStack) dataset.stck = errorComponentStack;\n// // Tell React to retry it if the parent already hydrated.\n// if (suspenseNode._reactRetry) {\n// suspenseNode._reactRetry();\n// }\n// }\n//\n// function completeBoundary(suspenseBoundaryID, contentID) {\n// // Find the fallback's first element.\n// const suspenseIdNode = document.getElementById(suspenseBoundaryID);\n// const contentNode = document.getElementById(contentID);\n// // We'll detach the content node so that regardless of what happens next we don't leave in the tree.\n// // This might also help by not causing recalcing each time we move a child from here to the target.\n// contentNode.parentNode.removeChild(contentNode);\n// if (!suspenseIdNode) {\n// // The user must have already navigated away from this tree.\n// // E.g. because the parent was hydrated. That's fine there's nothing to do\n// // but we have to make sure that we already deleted the container node.\n// return;\n// }\n// // Find the boundary around the fallback. This is always the previous node.\n// const suspenseNode = suspenseIdNode.previousSibling;\n//\n// // Clear all the existing children. This is complicated because\n// // there can be embedded Suspense boundaries in the fallback.\n// // This is similar to clearSuspenseBoundary in ReactDOMHostConfig.\n// // TODO: We could avoid this if we never emitted suspense boundaries in fallback trees.\n// // They never hydrate anyway. However, currently we support incrementally loading the fallback.\n// const parentInstance = suspenseNode.parentNode;\n// let node = suspenseNode.nextSibling;\n// let depth = 0;\n// do {\n// if (node && node.nodeType === COMMENT_NODE) {\n// const data = node.data;\n// if (data === SUSPENSE_END_DATA) {\n// if (depth === 0) {\n// break;\n// } else {\n// depth--;\n// }\n// } else if (\n// data === SUSPENSE_START_DATA ||\n// data === SUSPENSE_PENDING_START_DATA ||\n// data === SUSPENSE_FALLBACK_START_DATA\n// ) {\n// depth++;\n// }\n// }\n//\n// const nextNode = node.nextSibling;\n// parentInstance.removeChild(node);\n// node = nextNode;\n// } while (node);\n//\n// const endOfBoundary = node;\n//\n// // Insert all the children from the contentNode between the start and end of suspense boundary.\n// while (contentNode.firstChild) {\n// parentInstance.insertBefore(contentNode.firstChild, endOfBoundary);\n// }\n// suspenseNode.data = SUSPENSE_START_DATA;\n// if (suspenseNode._reactRetry) {\n// suspenseNode._reactRetry();\n// }\n// }\n//\n// function completeSegment(containerID, placeholderID) {\n// const segmentContainer = document.getElementById(containerID);\n// const placeholderNode = document.getElementById(placeholderID);\n// // We always expect both nodes to exist here because, while we might\n// // have navigated away from the main tree, we still expect the detached\n// // tree to exist.\n// segmentContainer.parentNode.removeChild(segmentContainer);\n// while (segmentContainer.firstChild) {\n// placeholderNode.parentNode.insertBefore(\n// segmentContainer.firstChild,\n// placeholderNode,\n// );\n// }\n// placeholderNode.parentNode.removeChild(placeholderNode);\n// }\n\nvar completeSegmentFunction = 'function $RS(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)}';\nvar completeBoundaryFunction = 'function $RC(a,b){a=document.getElementById(a);b=document.getElementById(b);b.parentNode.removeChild(b);if(a){a=a.previousSibling;var f=a.parentNode,c=a.nextSibling,e=0;do{if(c&&8===c.nodeType){var d=c.data;if(\"/$\"===d)if(0===e)break;else e--;else\"$\"!==d&&\"$?\"!==d&&\"$!\"!==d||e++}d=c.nextSibling;f.removeChild(c);c=d}while(c);for(;b.firstChild;)f.insertBefore(b.firstChild,c);a.data=\"$\";a._reactRetry&&a._reactRetry()}}';\nvar clientRenderFunction = 'function $RX(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data=\"$!\",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())}';\nvar completeSegmentScript1Full = stringToPrecomputedChunk(completeSegmentFunction + ';$RS(\"');\nvar completeSegmentScript1Partial = stringToPrecomputedChunk('$RS(\"');\nvar completeSegmentScript2 = stringToPrecomputedChunk('\",\"');\nvar completeSegmentScript3 = stringToPrecomputedChunk('\")</script>');\nfunction writeCompletedSegmentInstruction(destination, responseState, contentSegmentID) {\n writeChunk(destination, responseState.startInlineScript);\n\n if (!responseState.sentCompleteSegmentFunction) {\n // The first time we write this, we'll need to include the full implementation.\n responseState.sentCompleteSegmentFunction = true;\n writeChunk(destination, completeSegmentScript1Full);\n } else {\n // Future calls can just reuse the same function.\n writeChunk(destination, completeSegmentScript1Partial);\n }\n\n writeChunk(destination, responseState.segmentPrefix);\n var formattedID = stringToChunk(contentSegmentID.toString(16));\n writeChunk(destination, formattedID);\n writeChunk(destination, completeSegmentScript2);\n writeChunk(destination, responseState.placeholderPrefix);\n writeChunk(destination, formattedID);\n return writeChunkAndReturn(destination, completeSegmentScript3);\n}\nvar completeBoundaryScript1Full = stringToPrecomputedChunk(completeBoundaryFunction + ';$RC(\"');\nvar completeBoundaryScript1Partial = stringToPrecomputedChunk('$RC(\"');\nvar completeBoundaryScript2 = stringToPrecomputedChunk('\",\"');\nvar completeBoundaryScript3 = stringToPrecomputedChunk('\")</script>');\nfunction writeCompletedBoundaryInstruction(destination, responseState, boundaryID, contentSegmentID) {\n writeChunk(destination, responseState.startInlineScript);\n\n if (!responseState.sentCompleteBoundaryFunction) {\n // The first time we write this, we'll need to include the full implementation.\n responseState.sentCompleteBoundaryFunction = true;\n writeChunk(destination, completeBoundaryScript1Full);\n } else {\n // Future calls can just reuse the same function.\n writeChunk(destination, completeBoundaryScript1Partial);\n }\n\n if (boundaryID === null) {\n throw new Error('An ID must have been assigned before we can complete the boundary.');\n }\n\n var formattedContentID = stringToChunk(contentSegmentID.toString(16));\n writeChunk(destination, boundaryID);\n writeChunk(destination, completeBoundaryScript2);\n writeChunk(destination, responseState.segmentPrefix);\n writeChunk(destination, formattedContentID);\n return writeChunkAndReturn(destination, completeBoundaryScript3);\n}\nvar clientRenderScript1Full = stringToPrecomputedChunk(clientRenderFunction + ';$RX(\"');\nvar clientRenderScript1Partial = stringToPrecomputedChunk('$RX(\"');\nvar clientRenderScript1A = stringToPrecomputedChunk('\"');\nvar clientRenderScript2 = stringToPrecomputedChunk(')</script>');\nvar clientRenderErrorScriptArgInterstitial = stringToPrecomputedChunk(',');\nfunction writeClientRenderBoundaryInstruction(destination, responseState, boundaryID, errorDigest, errorMessage, errorComponentStack) {\n writeChunk(destination, responseState.startInlineScript);\n\n if (!responseState.sentClientRenderFunction) {\n // The first time we write this, we'll need to include the full implementation.\n responseState.sentClientRenderFunction = true;\n writeChunk(destination, clientRenderScript1Full);\n } else {\n // Future calls can just reuse the same function.\n writeChunk(destination, clientRenderScript1Partial);\n }\n\n if (boundaryID === null) {\n throw new Error('An ID must have been assigned before we can complete the boundary.');\n }\n\n writeChunk(destination, boundaryID);\n writeChunk(destination, clientRenderScript1A);\n\n if (errorDigest || errorMessage || errorComponentStack) {\n writeChunk(destination, clientRenderErrorScriptArgInterstitial);\n writeChunk(destination, stringToChunk(escapeJSStringsForInstructionScripts(errorDigest || '')));\n }\n\n if (errorMessage || errorComponentStack) {\n writeChunk(destination, clientRenderErrorScriptArgInterstitial);\n writeChunk(destination, stringToChunk(escapeJSStringsForInstructionScripts(errorMessage || '')));\n }\n\n if (errorComponentStack) {\n writeChunk(destination, clientRenderErrorScriptArgInterstitial);\n writeChunk(destination, stringToChunk(escapeJSStringsForInstructionScripts(errorComponentStack)));\n }\n\n return writeChunkAndReturn(destination, clientRenderScript2);\n}\nvar regexForJSStringsInScripts = /[<\\u2028\\u2029]/g;\n\nfunction escapeJSStringsForInstructionScripts(input) {\n var escaped = JSON.stringify(input);\n return escaped.replace(regexForJSStringsInScripts, function (match) {\n switch (match) {\n // santizing breaking out of strings and script tags\n case '<':\n return \"\\\\u003c\";\n\n case \"\\u2028\":\n return \"\\\\u2028\";\n\n case \"\\u2029\":\n return \"\\\\u2029\";\n\n default:\n {\n // eslint-disable-next-line react-internal/prod-error-codes\n throw new Error('escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React');\n }\n }\n });\n}\n\nfunction createResponseState$1(generateStaticMarkup, identifierPrefix) {\n var responseState = createResponseState(identifierPrefix, undefined);\n return {\n // Keep this in sync with ReactDOMServerFormatConfig\n bootstrapChunks: responseState.bootstrapChunks,\n startInlineScript: responseState.startInlineScript,\n placeholderPrefix: responseState.placeholderPrefix,\n segmentPrefix: responseState.segmentPrefix,\n boundaryPrefix: responseState.boundaryPrefix,\n idPrefix: responseState.idPrefix,\n nextSuspenseID: responseState.nextSuspenseID,\n sentCompleteSegmentFunction: responseState.sentCompleteSegmentFunction,\n sentCompleteBoundaryFunction: responseState.sentCompleteBoundaryFunction,\n sentClientRenderFunction: responseState.sentClientRenderFunction,\n // This is an extra field for the legacy renderer\n generateStaticMarkup: generateStaticMarkup\n };\n}\nfunction createRootFormatContext() {\n return {\n insertionMode: HTML_MODE,\n // We skip the root mode because we don't want to emit the DOCTYPE in legacy mode.\n selectedValue: null\n };\n}\nfunction pushTextInstance$1(target, text, responseState, textEmbedded) {\n if (responseState.generateStaticMarkup) {\n target.push(stringToChunk(escapeTextForBrowser(text)));\n return false;\n } else {\n return pushTextInstance(target, text, responseState, textEmbedded);\n }\n}\nfunction pushSegmentFinale$1(target, responseState, lastPushedText, textEmbedded) {\n if (responseState.generateStaticMarkup) {\n return;\n } else {\n return pushSegmentFinale(target, responseState, lastPushedText, textEmbedded);\n }\n}\nfunction writeStartCompletedSuspenseBoundary$1(destination, responseState) {\n if (responseState.generateStaticMarkup) {\n // A completed boundary is done and doesn't need a representation in the HTML\n // if we're not going to be hydrating it.\n return true;\n }\n\n return writeStartCompletedSuspenseBoundary(destination);\n}\nfunction writeStartClientRenderedSuspenseBoundary$1(destination, responseState, // flushing these error arguments are not currently supported in this legacy streaming format.\nerrorDigest, errorMessage, errorComponentStack) {\n if (responseState.generateStaticMarkup) {\n // A client rendered boundary is done and doesn't need a representation in the HTML\n // since we'll never hydrate it. This is arguably an error in static generation.\n return true;\n }\n\n return writeStartClientRenderedSuspenseBoundary(destination, responseState, errorDigest, errorMessage, errorComponentStack);\n}\nfunction writeEndCompletedSuspenseBoundary$1(destination, responseState) {\n if (responseState.generateStaticMarkup) {\n return true;\n }\n\n return writeEndCompletedSuspenseBoundary(destination);\n}\nfunction writeEndClientRenderedSuspenseBoundary$1(destination, responseState) {\n if (responseState.generateStaticMarkup) {\n return true;\n }\n\n return writeEndClientRenderedSuspenseBoundary(destination);\n}\n\nvar assign = Object.assign;\n\n// ATTENTION\n// When adding new symbols to this file,\n// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'\n// The Symbol used to tag the ReactElement-like types.\nvar REACT_ELEMENT_TYPE = Symbol.for('react.element');\nvar REACT_PORTAL_TYPE = Symbol.for('react.portal');\nvar REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');\nvar REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');\nvar REACT_PROFILER_TYPE = Symbol.for('react.profiler');\nvar REACT_PROVIDER_TYPE = Symbol.for('react.provider');\nvar REACT_CONTEXT_TYPE = Symbol.for('react.context');\nvar REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');\nvar REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');\nvar REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');\nvar REACT_MEMO_TYPE = Symbol.for('react.memo');\nvar REACT_LAZY_TYPE = Symbol.for('react.lazy');\nvar REACT_SCOPE_TYPE = Symbol.for('react.scope');\nvar REACT_DEBUG_TRACING_MODE_TYPE = Symbol.for('react.debug_trace_mode');\nvar REACT_LEGACY_HIDDEN_TYPE = Symbol.for('react.legacy_hidden');\nvar REACT_SERVER_CONTEXT_DEFAULT_VALUE_NOT_LOADED = Symbol.for('react.default_value');\nvar MAYBE_ITERATOR_SYMBOL = Symbol.iterator;\nvar FAUX_ITERATOR_SYMBOL = '@@iterator';\nfunction getIteratorFn(maybeIterable) {\n if (maybeIterable === null || typeof maybeIterable !== 'object') {\n return null;\n }\n\n var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];\n\n if (typeof maybeIterator === 'function') {\n return maybeIterator;\n }\n\n return null;\n}\n\nfunction getWrappedName(outerType, innerType, wrapperName) {\n var displayName = outerType.displayName;\n\n if (displayName) {\n return displayName;\n }\n\n var functionName = innerType.displayName || innerType.name || '';\n return functionName !== '' ? wrapperName + \"(\" + functionName + \")\" : wrapperName;\n} // Keep in sync with react-reconciler/getComponentNameFromFiber\n\n\nfunction getContextName(type) {\n return type.displayName || 'Context';\n} // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead.\n\n\nfunction getComponentNameFromType(type) {\n if (type == null) {\n // Host root, text node or just invalid type.\n return null;\n }\n\n {\n if (typeof type.tag === 'number') {\n error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.');\n }\n }\n\n if (typeof type === 'function') {\n return type.displayName || type.name || null;\n }\n\n if (typeof type === 'string') {\n return type;\n }\n\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return 'Fragment';\n\n case REACT_PORTAL_TYPE:\n return 'Portal';\n\n case REACT_PROFILER_TYPE:\n return 'Profiler';\n\n case REACT_STRICT_MODE_TYPE:\n return 'StrictMode';\n\n case REACT_SUSPENSE_TYPE:\n return 'Suspense';\n\n case REACT_SUSPENSE_LIST_TYPE:\n return 'SuspenseList';\n\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_CONTEXT_TYPE:\n var context = type;\n return getContextName(context) + '.Consumer';\n\n case REACT_PROVIDER_TYPE:\n var provider = type;\n return getContextName(provider._context) + '.Provider';\n\n case REACT_FORWARD_REF_TYPE:\n return getWrappedName(type, type.render, 'ForwardRef');\n\n case REACT_MEMO_TYPE:\n var outerName = type.displayName || null;\n\n if (outerName !== null) {\n return outerName;\n }\n\n return getComponentNameFromType(type.type) || 'Memo';\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n return getComponentNameFromType(init(payload));\n } catch (x) {\n return null;\n }\n }\n\n // eslint-disable-next-line no-fallthrough\n }\n }\n\n return null;\n}\n\n// Helpers to patch console.logs to avoid logging during side-effect free\n// replaying on render function. This currently only patches the object\n// lazily which won't cover if the log function was extracted eagerly.\n// We could also eagerly patch the method.\nvar disabledDepth = 0;\nvar prevLog;\nvar prevInfo;\nvar prevWarn;\nvar prevError;\nvar prevGroup;\nvar prevGroupCollapsed;\nvar prevGroupEnd;\n\nfunction disabledLog() {}\n\ndisabledLog.__reactDisabledLog = true;\nfunction disableLogs() {\n {\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n prevLog = console.log;\n prevInfo = console.info;\n prevWarn = console.warn;\n prevError = console.error;\n prevGroup = console.group;\n prevGroupCollapsed = console.groupCollapsed;\n prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099\n\n var props = {\n configurable: true,\n enumerable: true,\n value: disabledLog,\n writable: true\n }; // $FlowFixMe Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n info: props,\n log: props,\n warn: props,\n error: props,\n group: props,\n groupCollapsed: props,\n groupEnd: props\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n disabledDepth++;\n }\n}\nfunction reenableLogs() {\n {\n disabledDepth--;\n\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n var props = {\n configurable: true,\n enumerable: true,\n writable: true\n }; // $FlowFixMe Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n log: assign({}, props, {\n value: prevLog\n }),\n info: assign({}, props, {\n value: prevInfo\n }),\n warn: assign({}, props, {\n value: prevWarn\n }),\n error: assign({}, props, {\n value: prevError\n }),\n group: assign({}, props, {\n value: prevGroup\n }),\n groupCollapsed: assign({}, props, {\n value: prevGroupCollapsed\n }),\n groupEnd: assign({}, props, {\n value: prevGroupEnd\n })\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n if (disabledDepth < 0) {\n error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');\n }\n }\n}\n\nvar ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;\nvar prefix;\nfunction describeBuiltInComponentFrame(name, source, ownerFn) {\n {\n if (prefix === undefined) {\n // Extract the VM specific prefix used by each line.\n try {\n throw Error();\n } catch (x) {\n var match = x.stack.trim().match(/\\n( *(at )?)/);\n prefix = match && match[1] || '';\n }\n } // We use the prefix to ensure our stacks line up with native stack frames.\n\n\n return '\\n' + prefix + name;\n }\n}\nvar reentry = false;\nvar componentFrameCache;\n\n{\n var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;\n componentFrameCache = new PossiblyWeakMap();\n}\n\nfunction describeNativeComponentFrame(fn, construct) {\n // If something asked for a stack inside a fake render, it should get ignored.\n if ( !fn || reentry) {\n return '';\n }\n\n {\n var frame = componentFrameCache.get(fn);\n\n if (frame !== undefined) {\n return frame;\n }\n }\n\n var control;\n reentry = true;\n var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.\n\n Error.prepareStackTrace = undefined;\n var previousDispatcher;\n\n {\n previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function\n // for warnings.\n\n ReactCurrentDispatcher.current = null;\n disableLogs();\n }\n\n try {\n // This should throw.\n if (construct) {\n // Something should be setting the props in the constructor.\n var Fake = function () {\n throw Error();\n }; // $FlowFixMe\n\n\n Object.defineProperty(Fake.prototype, 'props', {\n set: function () {\n // We use a throwing setter instead of frozen or non-writable props\n // because that won't throw in a non-strict mode function.\n throw Error();\n }\n });\n\n if (typeof Reflect === 'object' && Reflect.construct) {\n // We construct a different control for this case to include any extra\n // frames added by the construct call.\n try {\n Reflect.construct(Fake, []);\n } catch (x) {\n control = x;\n }\n\n Reflect.construct(fn, [], Fake);\n } else {\n try {\n Fake.call();\n } catch (x) {\n control = x;\n }\n\n fn.call(Fake.prototype);\n }\n } else {\n try {\n throw Error();\n } catch (x) {\n control = x;\n }\n\n fn();\n }\n } catch (sample) {\n // This is inlined manually because closure doesn't do it for us.\n if (sample && control && typeof sample.stack === 'string') {\n // This extracts the first frame from the sample that isn't also in the control.\n // Skipping one frame that we assume is the frame that calls the two.\n var sampleLines = sample.stack.split('\\n');\n var controlLines = control.stack.split('\\n');\n var s = sampleLines.length - 1;\n var c = controlLines.length - 1;\n\n while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {\n // We expect at least one stack frame to be shared.\n // Typically this will be the root most one. However, stack frames may be\n // cut off due to maximum stack limits. In this case, one maybe cut off\n // earlier than the other. We assume that the sample is longer or the same\n // and there for cut off earlier. So we should find the root most frame in\n // the sample somewhere in the control.\n c--;\n }\n\n for (; s >= 1 && c >= 0; s--, c--) {\n // Next we find the first one that isn't the same which should be the\n // frame that called our sample function and the control.\n if (sampleLines[s] !== controlLines[c]) {\n // In V8, the first line is describing the message but other VMs don't.\n // If we're about to return the first line, and the control is also on the same\n // line, that's a pretty good indicator that our sample threw at same line as\n // the control. I.e. before we entered the sample frame. So we ignore this result.\n // This can happen if you passed a class to function component, or non-function.\n if (s !== 1 || c !== 1) {\n do {\n s--;\n c--; // We may still have similar intermediate frames from the construct call.\n // The next one that isn't the same should be our match though.\n\n if (c < 0 || sampleLines[s] !== controlLines[c]) {\n // V8 adds a \"new\" prefix for native classes. Let's remove it to make it prettier.\n var _frame = '\\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled \"<anonymous>\"\n // but we have a user-provided \"displayName\"\n // splice it in to make the stack more readable.\n\n\n if (fn.displayName && _frame.includes('<anonymous>')) {\n _frame = _frame.replace('<anonymous>', fn.displayName);\n }\n\n {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, _frame);\n }\n } // Return the line we found.\n\n\n return _frame;\n }\n } while (s >= 1 && c >= 0);\n }\n\n break;\n }\n }\n }\n } finally {\n reentry = false;\n\n {\n ReactCurrentDispatcher.current = previousDispatcher;\n reenableLogs();\n }\n\n Error.prepareStackTrace = previousPrepareStackTrace;\n } // Fallback to just using the name if we couldn't make it throw.\n\n\n var name = fn ? fn.displayName || fn.name : '';\n var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';\n\n {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, syntheticFrame);\n }\n }\n\n return syntheticFrame;\n}\n\nfunction describeClassComponentFrame(ctor, source, ownerFn) {\n {\n return describeNativeComponentFrame(ctor, true);\n }\n}\nfunction describeFunctionComponentFrame(fn, source, ownerFn) {\n {\n return describeNativeComponentFrame(fn, false);\n }\n}\n\nfunction shouldConstruct(Component) {\n var prototype = Component.prototype;\n return !!(prototype && prototype.isReactComponent);\n}\n\nfunction describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {\n\n if (type == null) {\n return '';\n }\n\n if (typeof type === 'function') {\n {\n return describeNativeComponentFrame(type, shouldConstruct(type));\n }\n }\n\n if (typeof type === 'string') {\n return describeBuiltInComponentFrame(type);\n }\n\n switch (type) {\n case REACT_SUSPENSE_TYPE:\n return describeBuiltInComponentFrame('Suspense');\n\n case REACT_SUSPENSE_LIST_TYPE:\n return describeBuiltInComponentFrame('SuspenseList');\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_FORWARD_REF_TYPE:\n return describeFunctionComponentFrame(type.render);\n\n case REACT_MEMO_TYPE:\n // Memo may contain any component type so we recursively resolve it.\n return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n // Lazy may contain any component type so we recursively resolve it.\n return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);\n } catch (x) {}\n }\n }\n }\n\n return '';\n}\n\nvar loggedTypeFailures = {};\nvar ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n\nfunction setCurrentlyValidatingElement(element) {\n {\n if (element) {\n var owner = element._owner;\n var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n ReactDebugCurrentFrame.setExtraStackFrame(stack);\n } else {\n ReactDebugCurrentFrame.setExtraStackFrame(null);\n }\n }\n}\n\nfunction checkPropTypes(typeSpecs, values, location, componentName, element) {\n {\n // $FlowFixMe This is okay but Flow doesn't know it.\n var has = Function.call.bind(hasOwnProperty);\n\n for (var typeSpecName in typeSpecs) {\n if (has(typeSpecs, typeSpecName)) {\n var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n if (typeof typeSpecs[typeSpecName] !== 'function') {\n // eslint-disable-next-line react-internal/prod-error-codes\n var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');\n err.name = 'Invariant Violation';\n throw err;\n }\n\n error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');\n } catch (ex) {\n error$1 = ex;\n }\n\n if (error$1 && !(error$1 instanceof Error)) {\n setCurrentlyValidatingElement(element);\n\n error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1);\n\n setCurrentlyValidatingElement(null);\n }\n\n if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error$1.message] = true;\n setCurrentlyValidatingElement(element);\n\n error('Failed %s type: %s', location, error$1.message);\n\n setCurrentlyValidatingElement(null);\n }\n }\n }\n }\n}\n\nvar warnedAboutMissingGetChildContext;\n\n{\n warnedAboutMissingGetChildContext = {};\n}\n\nvar emptyContextObject = {};\n\n{\n Object.freeze(emptyContextObject);\n}\n\nfunction getMaskedContext(type, unmaskedContext) {\n {\n var contextTypes = type.contextTypes;\n\n if (!contextTypes) {\n return emptyContextObject;\n }\n\n var context = {};\n\n for (var key in contextTypes) {\n context[key] = unmaskedContext[key];\n }\n\n {\n var name = getComponentNameFromType(type) || 'Unknown';\n checkPropTypes(contextTypes, context, 'context', name);\n }\n\n return context;\n }\n}\nfunction processChildContext(instance, type, parentContext, childContextTypes) {\n {\n // TODO (bvaughn) Replace this behavior with an invariant() in the future.\n // It has only been added in Fiber to match the (unintentional) behavior in Stack.\n if (typeof instance.getChildContext !== 'function') {\n {\n var componentName = getComponentNameFromType(type) || 'Unknown';\n\n if (!warnedAboutMissingGetChildContext[componentName]) {\n warnedAboutMissingGetChildContext[componentName] = true;\n\n error('%s.childContextTypes is specified but there is no getChildContext() method ' + 'on the instance. You can either define getChildContext() on %s or remove ' + 'childContextTypes from it.', componentName, componentName);\n }\n }\n\n return parentContext;\n }\n\n var childContext = instance.getChildContext();\n\n for (var contextKey in childContext) {\n if (!(contextKey in childContextTypes)) {\n throw new Error((getComponentNameFromType(type) || 'Unknown') + \".getChildContext(): key \\\"\" + contextKey + \"\\\" is not defined in childContextTypes.\");\n }\n }\n\n {\n var name = getComponentNameFromType(type) || 'Unknown';\n checkPropTypes(childContextTypes, childContext, 'child context', name);\n }\n\n return assign({}, parentContext, childContext);\n }\n}\n\nvar rendererSigil;\n\n{\n // Use this to detect multiple renderers using the same context\n rendererSigil = {};\n} // Used to store the parent path of all context overrides in a shared linked list.\n// Forming a reverse tree.\n\n\nvar rootContextSnapshot = null; // We assume that this runtime owns the \"current\" field on all ReactContext instances.\n// This global (actually thread local) state represents what state all those \"current\",\n// fields are currently in.\n\nvar currentActiveSnapshot = null;\n\nfunction popNode(prev) {\n {\n prev.context._currentValue2 = prev.parentValue;\n }\n}\n\nfunction pushNode(next) {\n {\n next.context._currentValue2 = next.value;\n }\n}\n\nfunction popToNearestCommonAncestor(prev, next) {\n if (prev === next) ; else {\n popNode(prev);\n var parentPrev = prev.parent;\n var parentNext = next.parent;\n\n if (parentPrev === null) {\n if (parentNext !== null) {\n throw new Error('The stacks must reach the root at the same time. This is a bug in React.');\n }\n } else {\n if (parentNext === null) {\n throw new Error('The stacks must reach the root at the same time. This is a bug in React.');\n }\n\n popToNearestCommonAncestor(parentPrev, parentNext);\n } // On the way back, we push the new ones that weren't common.\n\n\n pushNode(next);\n }\n}\n\nfunction popAllPrevious(prev) {\n popNode(prev);\n var parentPrev = prev.parent;\n\n if (parentPrev !== null) {\n popAllPrevious(parentPrev);\n }\n}\n\nfunction pushAllNext(next) {\n var parentNext = next.parent;\n\n if (parentNext !== null) {\n pushAllNext(parentNext);\n }\n\n pushNode(next);\n}\n\nfunction popPreviousToCommonLevel(prev, next) {\n popNode(prev);\n var parentPrev = prev.parent;\n\n if (parentPrev === null) {\n throw new Error('The depth must equal at least at zero before reaching the root. This is a bug in React.');\n }\n\n if (parentPrev.depth === next.depth) {\n // We found the same level. Now we just need to find a shared ancestor.\n popToNearestCommonAncestor(parentPrev, next);\n } else {\n // We must still be deeper.\n popPreviousToCommonLevel(parentPrev, next);\n }\n}\n\nfunction popNextToCommonLevel(prev, next) {\n var parentNext = next.parent;\n\n if (parentNext === null) {\n throw new Error('The depth must equal at least at zero before reaching the root. This is a bug in React.');\n }\n\n if (prev.depth === parentNext.depth) {\n // We found the same level. Now we just need to find a shared ancestor.\n popToNearestCommonAncestor(prev, parentNext);\n } else {\n // We must still be deeper.\n popNextToCommonLevel(prev, parentNext);\n }\n\n pushNode(next);\n} // Perform context switching to the new snapshot.\n// To make it cheap to read many contexts, while not suspending, we make the switch eagerly by\n// updating all the context's current values. That way reads, always just read the current value.\n// At the cost of updating contexts even if they're never read by this subtree.\n\n\nfunction switchContext(newSnapshot) {\n // The basic algorithm we need to do is to pop back any contexts that are no longer on the stack.\n // We also need to update any new contexts that are now on the stack with the deepest value.\n // The easiest way to update new contexts is to just reapply them in reverse order from the\n // perspective of the backpointers. To avoid allocating a lot when switching, we use the stack\n // for that. Therefore this algorithm is recursive.\n // 1) First we pop which ever snapshot tree was deepest. Popping old contexts as we go.\n // 2) Then we find the nearest common ancestor from there. Popping old contexts as we go.\n // 3) Then we reapply new contexts on the way back up the stack.\n var prev = currentActiveSnapshot;\n var next = newSnapshot;\n\n if (prev !== next) {\n if (prev === null) {\n // $FlowFixMe: This has to be non-null since it's not equal to prev.\n pushAllNext(next);\n } else if (next === null) {\n popAllPrevious(prev);\n } else if (prev.depth === next.depth) {\n popToNearestCommonAncestor(prev, next);\n } else if (prev.depth > next.depth) {\n popPreviousToCommonLevel(prev, next);\n } else {\n popNextToCommonLevel(prev, next);\n }\n\n currentActiveSnapshot = next;\n }\n}\nfunction pushProvider(context, nextValue) {\n var prevValue;\n\n {\n prevValue = context._currentValue2;\n context._currentValue2 = nextValue;\n\n {\n if (context._currentRenderer2 !== undefined && context._currentRenderer2 !== null && context._currentRenderer2 !== rendererSigil) {\n error('Detected multiple renderers concurrently rendering the ' + 'same context provider. This is currently unsupported.');\n }\n\n context._currentRenderer2 = rendererSigil;\n }\n }\n\n var prevNode = currentActiveSnapshot;\n var newNode = {\n parent: prevNode,\n depth: prevNode === null ? 0 : prevNode.depth + 1,\n context: context,\n parentValue: prevValue,\n value: nextValue\n };\n currentActiveSnapshot = newNode;\n return newNode;\n}\nfunction popProvider(context) {\n var prevSnapshot = currentActiveSnapshot;\n\n if (prevSnapshot === null) {\n throw new Error('Tried to pop a Context at the root of the app. This is a bug in React.');\n }\n\n {\n if (prevSnapshot.context !== context) {\n error('The parent context is not the expected context. This is probably a bug in React.');\n }\n }\n\n {\n var _value = prevSnapshot.parentValue;\n\n if (_value === REACT_SERVER_CONTEXT_DEFAULT_VALUE_NOT_LOADED) {\n prevSnapshot.context._currentValue2 = prevSnapshot.context._defaultValue;\n } else {\n prevSnapshot.context._currentValue2 = _value;\n }\n\n {\n if (context._currentRenderer2 !== undefined && context._currentRenderer2 !== null && context._currentRenderer2 !== rendererSigil) {\n error('Detected multiple renderers concurrently rendering the ' + 'same context provider. This is currently unsupported.');\n }\n\n context._currentRenderer2 = rendererSigil;\n }\n }\n\n return currentActiveSnapshot = prevSnapshot.parent;\n}\nfunction getActiveContext() {\n return currentActiveSnapshot;\n}\nfunction readContext(context) {\n var value = context._currentValue2;\n return value;\n}\n\n/**\n * `ReactInstanceMap` maintains a mapping from a public facing stateful\n * instance (key) and the internal representation (value). This allows public\n * methods to accept the user facing instance as an argument and map them back\n * to internal methods.\n *\n * Note that this module is currently shared and assumed to be stateless.\n * If this becomes an actual Map, that will break.\n */\nfunction get(key) {\n return key._reactInternals;\n}\nfunction set(key, value) {\n key._reactInternals = value;\n}\n\nvar didWarnAboutNoopUpdateForComponent = {};\nvar didWarnAboutDeprecatedWillMount = {};\nvar didWarnAboutUninitializedState;\nvar didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate;\nvar didWarnAboutLegacyLifecyclesAndDerivedState;\nvar didWarnAboutUndefinedDerivedState;\nvar warnOnUndefinedDerivedState;\nvar warnOnInvalidCallback;\nvar didWarnAboutDirectlyAssigningPropsToState;\nvar didWarnAboutContextTypeAndContextTypes;\nvar didWarnAboutInvalidateContextType;\n\n{\n didWarnAboutUninitializedState = new Set();\n didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate = new Set();\n didWarnAboutLegacyLifecyclesAndDerivedState = new Set();\n didWarnAboutDirectlyAssigningPropsToState = new Set();\n didWarnAboutUndefinedDerivedState = new Set();\n didWarnAboutContextTypeAndContextTypes = new Set();\n didWarnAboutInvalidateContextType = new Set();\n var didWarnOnInvalidCallback = new Set();\n\n warnOnInvalidCallback = function (callback, callerName) {\n if (callback === null || typeof callback === 'function') {\n return;\n }\n\n var key = callerName + '_' + callback;\n\n if (!didWarnOnInvalidCallback.has(key)) {\n didWarnOnInvalidCallback.add(key);\n\n error('%s(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callerName, callback);\n }\n };\n\n warnOnUndefinedDerivedState = function (type, partialState) {\n if (partialState === undefined) {\n var componentName = getComponentNameFromType(type) || 'Component';\n\n if (!didWarnAboutUndefinedDerivedState.has(componentName)) {\n didWarnAboutUndefinedDerivedState.add(componentName);\n\n error('%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. ' + 'You have returned undefined.', componentName);\n }\n }\n };\n}\n\nfunction warnNoop(publicInstance, callerName) {\n {\n var _constructor = publicInstance.constructor;\n var componentName = _constructor && getComponentNameFromType(_constructor) || 'ReactClass';\n var warningKey = componentName + '.' + callerName;\n\n if (didWarnAboutNoopUpdateForComponent[warningKey]) {\n return;\n }\n\n error('%s(...): Can only update a mounting component. ' + 'This usually means you called %s() outside componentWillMount() on the server. ' + 'This is a no-op.\\n\\nPlease check the code for the %s component.', callerName, callerName, componentName);\n\n didWarnAboutNoopUpdateForComponent[warningKey] = true;\n }\n}\n\nvar classComponentUpdater = {\n isMounted: function (inst) {\n return false;\n },\n enqueueSetState: function (inst, payload, callback) {\n var internals = get(inst);\n\n if (internals.queue === null) {\n warnNoop(inst, 'setState');\n } else {\n internals.queue.push(payload);\n\n {\n if (callback !== undefined && callback !== null) {\n warnOnInvalidCallback(callback, 'setState');\n }\n }\n }\n },\n enqueueReplaceState: function (inst, payload, callback) {\n var internals = get(inst);\n internals.replace = true;\n internals.queue = [payload];\n\n {\n if (callback !== undefined && callback !== null) {\n warnOnInvalidCallback(callback, 'setState');\n }\n }\n },\n enqueueForceUpdate: function (inst, callback) {\n var internals = get(inst);\n\n if (internals.queue === null) {\n warnNoop(inst, 'forceUpdate');\n } else {\n {\n if (callback !== undefined && callback !== null) {\n warnOnInvalidCallback(callback, 'setState');\n }\n }\n }\n }\n};\n\nfunction applyDerivedStateFromProps(instance, ctor, getDerivedStateFromProps, prevState, nextProps) {\n var partialState = getDerivedStateFromProps(nextProps, prevState);\n\n {\n warnOnUndefinedDerivedState(ctor, partialState);\n } // Merge the partial state and the previous state.\n\n\n var newState = partialState === null || partialState === undefined ? prevState : assign({}, prevState, partialState);\n return newState;\n}\n\nfunction constructClassInstance(ctor, props, maskedLegacyContext) {\n var context = emptyContextObject;\n var contextType = ctor.contextType;\n\n {\n if ('contextType' in ctor) {\n var isValid = // Allow null for conditional declaration\n contextType === null || contextType !== undefined && contextType.$$typeof === REACT_CONTEXT_TYPE && contextType._context === undefined; // Not a <Context.Consumer>\n\n if (!isValid && !didWarnAboutInvalidateContextType.has(ctor)) {\n didWarnAboutInvalidateContextType.add(ctor);\n var addendum = '';\n\n if (contextType === undefined) {\n addendum = ' However, it is set to undefined. ' + 'This can be caused by a typo or by mixing up named and default imports. ' + 'This can also happen due to a circular dependency, so ' + 'try moving the createContext() call to a separate file.';\n } else if (typeof contextType !== 'object') {\n addendum = ' However, it is set to a ' + typeof contextType + '.';\n } else if (contextType.$$typeof === REACT_PROVIDER_TYPE) {\n addendum = ' Did you accidentally pass the Context.Provider instead?';\n } else if (contextType._context !== undefined) {\n // <Context.Consumer>\n addendum = ' Did you accidentally pass the Context.Consumer instead?';\n } else {\n addendum = ' However, it is set to an object with keys {' + Object.keys(contextType).join(', ') + '}.';\n }\n\n error('%s defines an invalid contextType. ' + 'contextType should point to the Context object returned by React.createContext().%s', getComponentNameFromType(ctor) || 'Component', addendum);\n }\n }\n }\n\n if (typeof contextType === 'object' && contextType !== null) {\n context = readContext(contextType);\n } else {\n context = maskedLegacyContext;\n }\n\n var instance = new ctor(props, context);\n\n {\n if (typeof ctor.getDerivedStateFromProps === 'function' && (instance.state === null || instance.state === undefined)) {\n var componentName = getComponentNameFromType(ctor) || 'Component';\n\n if (!didWarnAboutUninitializedState.has(componentName)) {\n didWarnAboutUninitializedState.add(componentName);\n\n error('`%s` uses `getDerivedStateFromProps` but its initial state is ' + '%s. This is not recommended. Instead, define the initial state by ' + 'assigning an object to `this.state` in the constructor of `%s`. ' + 'This ensures that `getDerivedStateFromProps` arguments have a consistent shape.', componentName, instance.state === null ? 'null' : 'undefined', componentName);\n }\n } // If new component APIs are defined, \"unsafe\" lifecycles won't be called.\n // Warn about these lifecycles if they are present.\n // Don't warn about react-lifecycles-compat polyfilled methods though.\n\n\n if (typeof ctor.getDerivedStateFromProps === 'function' || typeof instance.getSnapshotBeforeUpdate === 'function') {\n var foundWillMountName = null;\n var foundWillReceivePropsName = null;\n var foundWillUpdateName = null;\n\n if (typeof instance.componentWillMount === 'function' && instance.componentWillMount.__suppressDeprecationWarning !== true) {\n foundWillMountName = 'componentWillMount';\n } else if (typeof instance.UNSAFE_componentWillMount === 'function') {\n foundWillMountName = 'UNSAFE_componentWillMount';\n }\n\n if (typeof instance.componentWillReceiveProps === 'function' && instance.componentWillReceiveProps.__suppressDeprecationWarning !== true) {\n foundWillReceivePropsName = 'componentWillReceiveProps';\n } else if (typeof instance.UNSAFE_componentWillReceiveProps === 'function') {\n foundWillReceivePropsName = 'UNSAFE_componentWillReceiveProps';\n }\n\n if (typeof instance.componentWillUpdate === 'function' && instance.componentWillUpdate.__suppressDeprecationWarning !== true) {\n foundWillUpdateName = 'componentWillUpdate';\n } else if (typeof instance.UNSAFE_componentWillUpdate === 'function') {\n foundWillUpdateName = 'UNSAFE_componentWillUpdate';\n }\n\n if (foundWillMountName !== null || foundWillReceivePropsName !== null || foundWillUpdateName !== null) {\n var _componentName = getComponentNameFromType(ctor) || 'Component';\n\n var newApiName = typeof ctor.getDerivedStateFromProps === 'function' ? 'getDerivedStateFromProps()' : 'getSnapshotBeforeUpdate()';\n\n if (!didWarnAboutLegacyLifecyclesAndDerivedState.has(_componentName)) {\n didWarnAboutLegacyLifecyclesAndDerivedState.add(_componentName);\n\n error('Unsafe legacy lifecycles will not be called for components using new component APIs.\\n\\n' + '%s uses %s but also contains the following legacy lifecycles:%s%s%s\\n\\n' + 'The above lifecycles should be removed. Learn more about this warning here:\\n' + 'https://reactjs.org/link/unsafe-component-lifecycles', _componentName, newApiName, foundWillMountName !== null ? \"\\n \" + foundWillMountName : '', foundWillReceivePropsName !== null ? \"\\n \" + foundWillReceivePropsName : '', foundWillUpdateName !== null ? \"\\n \" + foundWillUpdateName : '');\n }\n }\n }\n }\n\n return instance;\n}\n\nfunction checkClassInstance(instance, ctor, newProps) {\n {\n var name = getComponentNameFromType(ctor) || 'Component';\n var renderPresent = instance.render;\n\n if (!renderPresent) {\n if (ctor.prototype && typeof ctor.prototype.render === 'function') {\n error('%s(...): No `render` method found on the returned component ' + 'instance: did you accidentally return an object from the constructor?', name);\n } else {\n error('%s(...): No `render` method found on the returned component ' + 'instance: you may have forgotten to define `render`.', name);\n }\n }\n\n if (instance.getInitialState && !instance.getInitialState.isReactClassApproved && !instance.state) {\n error('getInitialState was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Did you mean to define a state property instead?', name);\n }\n\n if (instance.getDefaultProps && !instance.getDefaultProps.isReactClassApproved) {\n error('getDefaultProps was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Use a static property to define defaultProps instead.', name);\n }\n\n if (instance.propTypes) {\n error('propTypes was defined as an instance property on %s. Use a static ' + 'property to define propTypes instead.', name);\n }\n\n if (instance.contextType) {\n error('contextType was defined as an instance property on %s. Use a static ' + 'property to define contextType instead.', name);\n }\n\n {\n if (instance.contextTypes) {\n error('contextTypes was defined as an instance property on %s. Use a static ' + 'property to define contextTypes instead.', name);\n }\n\n if (ctor.contextType && ctor.contextTypes && !didWarnAboutContextTypeAndContextTypes.has(ctor)) {\n didWarnAboutContextTypeAndContextTypes.add(ctor);\n\n error('%s declares both contextTypes and contextType static properties. ' + 'The legacy contextTypes property will be ignored.', name);\n }\n }\n\n if (typeof instance.componentShouldUpdate === 'function') {\n error('%s has a method called ' + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + 'The name is phrased as a question because the function is ' + 'expected to return a value.', name);\n }\n\n if (ctor.prototype && ctor.prototype.isPureReactComponent && typeof instance.shouldComponentUpdate !== 'undefined') {\n error('%s has a method called shouldComponentUpdate(). ' + 'shouldComponentUpdate should not be used when extending React.PureComponent. ' + 'Please extend React.Component if shouldComponentUpdate is used.', getComponentNameFromType(ctor) || 'A pure component');\n }\n\n if (typeof instance.componentDidUnmount === 'function') {\n error('%s has a method called ' + 'componentDidUnmount(). But there is no such lifecycle method. ' + 'Did you mean componentWillUnmount()?', name);\n }\n\n if (typeof instance.componentDidReceiveProps === 'function') {\n error('%s has a method called ' + 'componentDidReceiveProps(). But there is no such lifecycle method. ' + 'If you meant to update the state in response to changing props, ' + 'use componentWillReceiveProps(). If you meant to fetch data or ' + 'run side-effects or mutations after React has updated the UI, use componentDidUpdate().', name);\n }\n\n if (typeof instance.componentWillRecieveProps === 'function') {\n error('%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', name);\n }\n\n if (typeof instance.UNSAFE_componentWillRecieveProps === 'function') {\n error('%s has a method called ' + 'UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?', name);\n }\n\n var hasMutatedProps = instance.props !== newProps;\n\n if (instance.props !== undefined && hasMutatedProps) {\n error('%s(...): When calling super() in `%s`, make sure to pass ' + \"up the same props that your component's constructor was passed.\", name, name);\n }\n\n if (instance.defaultProps) {\n error('Setting defaultProps as an instance property on %s is not supported and will be ignored.' + ' Instead, define defaultProps as a static property on %s.', name, name);\n }\n\n if (typeof instance.getSnapshotBeforeUpdate === 'function' && typeof instance.componentDidUpdate !== 'function' && !didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.has(ctor)) {\n didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.add(ctor);\n\n error('%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). ' + 'This component defines getSnapshotBeforeUpdate() only.', getComponentNameFromType(ctor));\n }\n\n if (typeof instance.getDerivedStateFromProps === 'function') {\n error('%s: getDerivedStateFromProps() is defined as an instance method ' + 'and will be ignored. Instead, declare it as a static method.', name);\n }\n\n if (typeof instance.getDerivedStateFromError === 'function') {\n error('%s: getDerivedStateFromError() is defined as an instance method ' + 'and will be ignored. Instead, declare it as a static method.', name);\n }\n\n if (typeof ctor.getSnapshotBeforeUpdate === 'function') {\n error('%s: getSnapshotBeforeUpdate() is defined as a static method ' + 'and will be ignored. Instead, declare it as an instance method.', name);\n }\n\n var _state = instance.state;\n\n if (_state && (typeof _state !== 'object' || isArray(_state))) {\n error('%s.state: must be set to an object or null', name);\n }\n\n if (typeof instance.getChildContext === 'function' && typeof ctor.childContextTypes !== 'object') {\n error('%s.getChildContext(): childContextTypes must be defined in order to ' + 'use getChildContext().', name);\n }\n }\n}\n\nfunction callComponentWillMount(type, instance) {\n var oldState = instance.state;\n\n if (typeof instance.componentWillMount === 'function') {\n {\n if ( instance.componentWillMount.__suppressDeprecationWarning !== true) {\n var componentName = getComponentNameFromType(type) || 'Unknown';\n\n if (!didWarnAboutDeprecatedWillMount[componentName]) {\n warn( // keep this warning in sync with ReactStrictModeWarning.js\n 'componentWillMount has been renamed, and is not recommended for use. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\\n\\n' + '* Move code from componentWillMount to componentDidMount (preferred in most cases) ' + 'or the constructor.\\n' + '\\nPlease update the following components: %s', componentName);\n\n didWarnAboutDeprecatedWillMount[componentName] = true;\n }\n }\n }\n\n instance.componentWillMount();\n }\n\n if (typeof instance.UNSAFE_componentWillMount === 'function') {\n instance.UNSAFE_componentWillMount();\n }\n\n if (oldState !== instance.state) {\n {\n error('%s.componentWillMount(): Assigning directly to this.state is ' + \"deprecated (except inside a component's \" + 'constructor). Use setState instead.', getComponentNameFromType(type) || 'Component');\n }\n\n classComponentUpdater.enqueueReplaceState(instance, instance.state, null);\n }\n}\n\nfunction processUpdateQueue(internalInstance, inst, props, maskedLegacyContext) {\n if (internalInstance.queue !== null && internalInstance.queue.length > 0) {\n var oldQueue = internalInstance.queue;\n var oldReplace = internalInstance.replace;\n internalInstance.queue = null;\n internalInstance.replace = false;\n\n if (oldReplace && oldQueue.length === 1) {\n inst.state = oldQueue[0];\n } else {\n var nextState = oldReplace ? oldQueue[0] : inst.state;\n var dontMutate = true;\n\n for (var i = oldReplace ? 1 : 0; i < oldQueue.length; i++) {\n var partial = oldQueue[i];\n var partialState = typeof partial === 'function' ? partial.call(inst, nextState, props, maskedLegacyContext) : partial;\n\n if (partialState != null) {\n if (dontMutate) {\n dontMutate = false;\n nextState = assign({}, nextState, partialState);\n } else {\n assign(nextState, partialState);\n }\n }\n }\n\n inst.state = nextState;\n }\n } else {\n internalInstance.queue = null;\n }\n} // Invokes the mount life-cycles on a previously never rendered instance.\n\n\nfunction mountClassInstance(instance, ctor, newProps, maskedLegacyContext) {\n {\n checkClassInstance(instance, ctor, newProps);\n }\n\n var initialState = instance.state !== undefined ? instance.state : null;\n instance.updater = classComponentUpdater;\n instance.props = newProps;\n instance.state = initialState; // We don't bother initializing the refs object on the server, since we're not going to resolve them anyway.\n // The internal instance will be used to manage updates that happen during this mount.\n\n var internalInstance = {\n queue: [],\n replace: false\n };\n set(instance, internalInstance);\n var contextType = ctor.contextType;\n\n if (typeof contextType === 'object' && contextType !== null) {\n instance.context = readContext(contextType);\n } else {\n instance.context = maskedLegacyContext;\n }\n\n {\n if (instance.state === newProps) {\n var componentName = getComponentNameFromType(ctor) || 'Component';\n\n if (!didWarnAboutDirectlyAssigningPropsToState.has(componentName)) {\n didWarnAboutDirectlyAssigningPropsToState.add(componentName);\n\n error('%s: It is not recommended to assign props directly to state ' + \"because updates to props won't be reflected in state. \" + 'In most cases, it is better to use props directly.', componentName);\n }\n }\n }\n\n var getDerivedStateFromProps = ctor.getDerivedStateFromProps;\n\n if (typeof getDerivedStateFromProps === 'function') {\n instance.state = applyDerivedStateFromProps(instance, ctor, getDerivedStateFromProps, initialState, newProps);\n } // In order to support react-lifecycles-compat polyfilled components,\n // Unsafe lifecycles should not be invoked for components using the new APIs.\n\n\n if (typeof ctor.getDerivedStateFromProps !== 'function' && typeof instance.getSnapshotBeforeUpdate !== 'function' && (typeof instance.UNSAFE_componentWillMount === 'function' || typeof instance.componentWillMount === 'function')) {\n callComponentWillMount(ctor, instance); // If we had additional state updates during this life-cycle, let's\n // process them now.\n\n processUpdateQueue(internalInstance, instance, newProps, maskedLegacyContext);\n }\n}\n\n// Ids are base 32 strings whose binary representation corresponds to the\n// position of a node in a tree.\n// Every time the tree forks into multiple children, we add additional bits to\n// the left of the sequence that represent the position of the child within the\n// current level of children.\n//\n// 00101 00010001011010101\n// ╰─┬─╯ ╰───────┬───────╯\n// Fork 5 of 20 Parent id\n//\n// The leading 0s are important. In the above example, you only need 3 bits to\n// represent slot 5. However, you need 5 bits to represent all the forks at\n// the current level, so we must account for the empty bits at the end.\n//\n// For this same reason, slots are 1-indexed instead of 0-indexed. Otherwise,\n// the zeroth id at a level would be indistinguishable from its parent.\n//\n// If a node has only one child, and does not materialize an id (i.e. does not\n// contain a useId hook), then we don't need to allocate any space in the\n// sequence. It's treated as a transparent indirection. For example, these two\n// trees produce the same ids:\n//\n// <> <>\n// <Indirection> <A />\n// <A /> <B />\n// </Indirection> </>\n// <B />\n// </>\n//\n// However, we cannot skip any node that materializes an id. Otherwise, a parent\n// id that does not fork would be indistinguishable from its child id. For\n// example, this tree does not fork, but the parent and child must have\n// different ids.\n//\n// <Parent>\n// <Child />\n// </Parent>\n//\n// To handle this scenario, every time we materialize an id, we allocate a\n// new level with a single slot. You can think of this as a fork with only one\n// prong, or an array of children with length 1.\n//\n// It's possible for the size of the sequence to exceed 32 bits, the max\n// size for bitwise operations. When this happens, we make more room by\n// converting the right part of the id to a string and storing it in an overflow\n// variable. We use a base 32 string representation, because 32 is the largest\n// power of 2 that is supported by toString(). We want the base to be large so\n// that the resulting ids are compact, and we want the base to be a power of 2\n// because every log2(base) bits corresponds to a single character, i.e. every\n// log2(32) = 5 bits. That means we can lop bits off the end 5 at a time without\n// affecting the final result.\nvar emptyTreeContext = {\n id: 1,\n overflow: ''\n};\nfunction getTreeId(context) {\n var overflow = context.overflow;\n var idWithLeadingBit = context.id;\n var id = idWithLeadingBit & ~getLeadingBit(idWithLeadingBit);\n return id.toString(32) + overflow;\n}\nfunction pushTreeContext(baseContext, totalChildren, index) {\n var baseIdWithLeadingBit = baseContext.id;\n var baseOverflow = baseContext.overflow; // The leftmost 1 marks the end of the sequence, non-inclusive. It's not part\n // of the id; we use it to account for leading 0s.\n\n var baseLength = getBitLength(baseIdWithLeadingBit) - 1;\n var baseId = baseIdWithLeadingBit & ~(1 << baseLength);\n var slot = index + 1;\n var length = getBitLength(totalChildren) + baseLength; // 30 is the max length we can store without overflowing, taking into\n // consideration the leading 1 we use to mark the end of the sequence.\n\n if (length > 30) {\n // We overflowed the bitwise-safe range. Fall back to slower algorithm.\n // This branch assumes the length of the base id is greater than 5; it won't\n // work for smaller ids, because you need 5 bits per character.\n //\n // We encode the id in multiple steps: first the base id, then the\n // remaining digits.\n //\n // Each 5 bit sequence corresponds to a single base 32 character. So for\n // example, if the current id is 23 bits long, we can convert 20 of those\n // bits into a string of 4 characters, with 3 bits left over.\n //\n // First calculate how many bits in the base id represent a complete\n // sequence of characters.\n var numberOfOverflowBits = baseLength - baseLength % 5; // Then create a bitmask that selects only those bits.\n\n var newOverflowBits = (1 << numberOfOverflowBits) - 1; // Select the bits, and convert them to a base 32 string.\n\n var newOverflow = (baseId & newOverflowBits).toString(32); // Now we can remove those bits from the base id.\n\n var restOfBaseId = baseId >> numberOfOverflowBits;\n var restOfBaseLength = baseLength - numberOfOverflowBits; // Finally, encode the rest of the bits using the normal algorithm. Because\n // we made more room, this time it won't overflow.\n\n var restOfLength = getBitLength(totalChildren) + restOfBaseLength;\n var restOfNewBits = slot << restOfBaseLength;\n var id = restOfNewBits | restOfBaseId;\n var overflow = newOverflow + baseOverflow;\n return {\n id: 1 << restOfLength | id,\n overflow: overflow\n };\n } else {\n // Normal path\n var newBits = slot << baseLength;\n\n var _id = newBits | baseId;\n\n var _overflow = baseOverflow;\n return {\n id: 1 << length | _id,\n overflow: _overflow\n };\n }\n}\n\nfunction getBitLength(number) {\n return 32 - clz32(number);\n}\n\nfunction getLeadingBit(id) {\n return 1 << getBitLength(id) - 1;\n} // TODO: Math.clz32 is supported in Node 12+. Maybe we can drop the fallback.\n\n\nvar clz32 = Math.clz32 ? Math.clz32 : clz32Fallback; // Count leading zeros.\n// Based on:\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/clz32\n\nvar log = Math.log;\nvar LN2 = Math.LN2;\n\nfunction clz32Fallback(x) {\n var asUint = x >>> 0;\n\n if (asUint === 0) {\n return 32;\n }\n\n return 31 - (log(asUint) / LN2 | 0) | 0;\n}\n\n/**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\nfunction is(x, y) {\n return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y // eslint-disable-line no-self-compare\n ;\n}\n\nvar objectIs = typeof Object.is === 'function' ? Object.is : is;\n\nvar currentlyRenderingComponent = null;\nvar currentlyRenderingTask = null;\nvar firstWorkInProgressHook = null;\nvar workInProgressHook = null; // Whether the work-in-progress hook is a re-rendered hook\n\nvar isReRender = false; // Whether an update was scheduled during the currently executing render pass.\n\nvar didScheduleRenderPhaseUpdate = false; // Counts the number of useId hooks in this component\n\nvar localIdCounter = 0; // Lazily created map of render-phase updates\n\nvar renderPhaseUpdates = null; // Counter to prevent infinite loops.\n\nvar numberOfReRenders = 0;\nvar RE_RENDER_LIMIT = 25;\nvar isInHookUserCodeInDev = false; // In DEV, this is the name of the currently executing primitive hook\n\nvar currentHookNameInDev;\n\nfunction resolveCurrentlyRenderingComponent() {\n if (currentlyRenderingComponent === null) {\n throw new Error('Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for' + ' one of the following reasons:\\n' + '1. You might have mismatching versions of React and the renderer (such as React DOM)\\n' + '2. You might be breaking the Rules of Hooks\\n' + '3. You might have more than one copy of React in the same app\\n' + 'See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.');\n }\n\n {\n if (isInHookUserCodeInDev) {\n error('Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. ' + 'You can only call Hooks at the top level of your React function. ' + 'For more information, see ' + 'https://reactjs.org/link/rules-of-hooks');\n }\n }\n\n return currentlyRenderingComponent;\n}\n\nfunction areHookInputsEqual(nextDeps, prevDeps) {\n if (prevDeps === null) {\n {\n error('%s received a final argument during this render, but not during ' + 'the previous render. Even though the final argument is optional, ' + 'its type cannot change between renders.', currentHookNameInDev);\n }\n\n return false;\n }\n\n {\n // Don't bother comparing lengths in prod because these arrays should be\n // passed inline.\n if (nextDeps.length !== prevDeps.length) {\n error('The final argument passed to %s changed size between renders. The ' + 'order and size of this array must remain constant.\\n\\n' + 'Previous: %s\\n' + 'Incoming: %s', currentHookNameInDev, \"[\" + nextDeps.join(', ') + \"]\", \"[\" + prevDeps.join(', ') + \"]\");\n }\n }\n\n for (var i = 0; i < prevDeps.length && i < nextDeps.length; i++) {\n if (objectIs(nextDeps[i], prevDeps[i])) {\n continue;\n }\n\n return false;\n }\n\n return true;\n}\n\nfunction createHook() {\n if (numberOfReRenders > 0) {\n throw new Error('Rendered more hooks than during the previous render');\n }\n\n return {\n memoizedState: null,\n queue: null,\n next: null\n };\n}\n\nfunction createWorkInProgressHook() {\n if (workInProgressHook === null) {\n // This is the first hook in the list\n if (firstWorkInProgressHook === null) {\n isReRender = false;\n firstWorkInProgressHook = workInProgressHook = createHook();\n } else {\n // There's already a work-in-progress. Reuse it.\n isReRender = true;\n workInProgressHook = firstWorkInProgressHook;\n }\n } else {\n if (workInProgressHook.next === null) {\n isReRender = false; // Append to the end of the list\n\n workInProgressHook = workInProgressHook.next = createHook();\n } else {\n // There's already a work-in-progress. Reuse it.\n isReRender = true;\n workInProgressHook = workInProgressHook.next;\n }\n }\n\n return workInProgressHook;\n}\n\nfunction prepareToUseHooks(task, componentIdentity) {\n currentlyRenderingComponent = componentIdentity;\n currentlyRenderingTask = task;\n\n {\n isInHookUserCodeInDev = false;\n } // The following should have already been reset\n // didScheduleRenderPhaseUpdate = false;\n // localIdCounter = 0;\n // firstWorkInProgressHook = null;\n // numberOfReRenders = 0;\n // renderPhaseUpdates = null;\n // workInProgressHook = null;\n\n\n localIdCounter = 0;\n}\nfunction finishHooks(Component, props, children, refOrContext) {\n // This must be called after every function component to prevent hooks from\n // being used in classes.\n while (didScheduleRenderPhaseUpdate) {\n // Updates were scheduled during the render phase. They are stored in\n // the `renderPhaseUpdates` map. Call the component again, reusing the\n // work-in-progress hooks and applying the additional updates on top. Keep\n // restarting until no more updates are scheduled.\n didScheduleRenderPhaseUpdate = false;\n localIdCounter = 0;\n numberOfReRenders += 1; // Start over from the beginning of the list\n\n workInProgressHook = null;\n children = Component(props, refOrContext);\n }\n\n resetHooksState();\n return children;\n}\nfunction checkDidRenderIdHook() {\n // This should be called immediately after every finishHooks call.\n // Conceptually, it's part of the return value of finishHooks; it's only a\n // separate function to avoid using an array tuple.\n var didRenderIdHook = localIdCounter !== 0;\n return didRenderIdHook;\n} // Reset the internal hooks state if an error occurs while rendering a component\n\nfunction resetHooksState() {\n {\n isInHookUserCodeInDev = false;\n }\n\n currentlyRenderingComponent = null;\n currentlyRenderingTask = null;\n didScheduleRenderPhaseUpdate = false;\n firstWorkInProgressHook = null;\n numberOfReRenders = 0;\n renderPhaseUpdates = null;\n workInProgressHook = null;\n}\n\nfunction readContext$1(context) {\n {\n if (isInHookUserCodeInDev) {\n error('Context can only be read while React is rendering. ' + 'In classes, you can read it in the render method or getDerivedStateFromProps. ' + 'In function components, you can read it directly in the function body, but not ' + 'inside Hooks like useReducer() or useMemo().');\n }\n }\n\n return readContext(context);\n}\n\nfunction useContext(context) {\n {\n currentHookNameInDev = 'useContext';\n }\n\n resolveCurrentlyRenderingComponent();\n return readContext(context);\n}\n\nfunction basicStateReducer(state, action) {\n // $FlowFixMe: Flow doesn't like mixed types\n return typeof action === 'function' ? action(state) : action;\n}\n\nfunction useState(initialState) {\n {\n currentHookNameInDev = 'useState';\n }\n\n return useReducer(basicStateReducer, // useReducer has a special case to support lazy useState initializers\n initialState);\n}\nfunction useReducer(reducer, initialArg, init) {\n {\n if (reducer !== basicStateReducer) {\n currentHookNameInDev = 'useReducer';\n }\n }\n\n currentlyRenderingComponent = resolveCurrentlyRenderingComponent();\n workInProgressHook = createWorkInProgressHook();\n\n if (isReRender) {\n // This is a re-render. Apply the new render phase updates to the previous\n // current hook.\n var queue = workInProgressHook.queue;\n var dispatch = queue.dispatch;\n\n if (renderPhaseUpdates !== null) {\n // Render phase updates are stored in a map of queue -> linked list\n var firstRenderPhaseUpdate = renderPhaseUpdates.get(queue);\n\n if (firstRenderPhaseUpdate !== undefined) {\n renderPhaseUpdates.delete(queue);\n var newState = workInProgressHook.memoizedState;\n var update = firstRenderPhaseUpdate;\n\n do {\n // Process this render phase update. We don't have to check the\n // priority because it will always be the same as the current\n // render's.\n var action = update.action;\n\n {\n isInHookUserCodeInDev = true;\n }\n\n newState = reducer(newState, action);\n\n {\n isInHookUserCodeInDev = false;\n }\n\n update = update.next;\n } while (update !== null);\n\n workInProgressHook.memoizedState = newState;\n return [newState, dispatch];\n }\n }\n\n return [workInProgressHook.memoizedState, dispatch];\n } else {\n {\n isInHookUserCodeInDev = true;\n }\n\n var initialState;\n\n if (reducer === basicStateReducer) {\n // Special case for `useState`.\n initialState = typeof initialArg === 'function' ? initialArg() : initialArg;\n } else {\n initialState = init !== undefined ? init(initialArg) : initialArg;\n }\n\n {\n isInHookUserCodeInDev = false;\n }\n\n workInProgressHook.memoizedState = initialState;\n\n var _queue = workInProgressHook.queue = {\n last: null,\n dispatch: null\n };\n\n var _dispatch = _queue.dispatch = dispatchAction.bind(null, currentlyRenderingComponent, _queue);\n\n return [workInProgressHook.memoizedState, _dispatch];\n }\n}\n\nfunction useMemo(nextCreate, deps) {\n currentlyRenderingComponent = resolveCurrentlyRenderingComponent();\n workInProgressHook = createWorkInProgressHook();\n var nextDeps = deps === undefined ? null : deps;\n\n if (workInProgressHook !== null) {\n var prevState = workInProgressHook.memoizedState;\n\n if (prevState !== null) {\n if (nextDeps !== null) {\n var prevDeps = prevState[1];\n\n if (areHookInputsEqual(nextDeps, prevDeps)) {\n return prevState[0];\n }\n }\n }\n }\n\n {\n isInHookUserCodeInDev = true;\n }\n\n var nextValue = nextCreate();\n\n {\n isInHookUserCodeInDev = false;\n }\n\n workInProgressHook.memoizedState = [nextValue, nextDeps];\n return nextValue;\n}\n\nfunction useRef(initialValue) {\n currentlyRenderingComponent = resolveCurrentlyRenderingComponent();\n workInProgressHook = createWorkInProgressHook();\n var previousRef = workInProgressHook.memoizedState;\n\n if (previousRef === null) {\n var ref = {\n current: initialValue\n };\n\n {\n Object.seal(ref);\n }\n\n workInProgressHook.memoizedState = ref;\n return ref;\n } else {\n return previousRef;\n }\n}\n\nfunction useLayoutEffect(create, inputs) {\n {\n currentHookNameInDev = 'useLayoutEffect';\n\n error('useLayoutEffect does nothing on the server, because its effect cannot ' + \"be encoded into the server renderer's output format. This will lead \" + 'to a mismatch between the initial, non-hydrated UI and the intended ' + 'UI. To avoid this, useLayoutEffect should only be used in ' + 'components that render exclusively on the client. ' + 'See https://reactjs.org/link/uselayouteffect-ssr for common fixes.');\n }\n}\n\nfunction dispatchAction(componentIdentity, queue, action) {\n if (numberOfReRenders >= RE_RENDER_LIMIT) {\n throw new Error('Too many re-renders. React limits the number of renders to prevent ' + 'an infinite loop.');\n }\n\n if (componentIdentity === currentlyRenderingComponent) {\n // This is a render phase update. Stash it in a lazily-created map of\n // queue -> linked list of updates. After this render pass, we'll restart\n // and apply the stashed updates on top of the work-in-progress hook.\n didScheduleRenderPhaseUpdate = true;\n var update = {\n action: action,\n next: null\n };\n\n if (renderPhaseUpdates === null) {\n renderPhaseUpdates = new Map();\n }\n\n var firstRenderPhaseUpdate = renderPhaseUpdates.get(queue);\n\n if (firstRenderPhaseUpdate === undefined) {\n renderPhaseUpdates.set(queue, update);\n } else {\n // Append the update to the end of the list.\n var lastRenderPhaseUpdate = firstRenderPhaseUpdate;\n\n while (lastRenderPhaseUpdate.next !== null) {\n lastRenderPhaseUpdate = lastRenderPhaseUpdate.next;\n }\n\n lastRenderPhaseUpdate.next = update;\n }\n }\n}\n\nfunction useCallback(callback, deps) {\n return useMemo(function () {\n return callback;\n }, deps);\n} // TODO Decide on how to implement this hook for server rendering.\n// If a mutation occurs during render, consider triggering a Suspense boundary\n// and falling back to client rendering.\n\nfunction useMutableSource(source, getSnapshot, subscribe) {\n resolveCurrentlyRenderingComponent();\n return getSnapshot(source._source);\n}\n\nfunction useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {\n if (getServerSnapshot === undefined) {\n throw new Error('Missing getServerSnapshot, which is required for ' + 'server-rendered content. Will revert to client rendering.');\n }\n\n return getServerSnapshot();\n}\n\nfunction useDeferredValue(value) {\n resolveCurrentlyRenderingComponent();\n return value;\n}\n\nfunction unsupportedStartTransition() {\n throw new Error('startTransition cannot be called during server rendering.');\n}\n\nfunction useTransition() {\n resolveCurrentlyRenderingComponent();\n return [false, unsupportedStartTransition];\n}\n\nfunction useId() {\n var task = currentlyRenderingTask;\n var treeId = getTreeId(task.treeContext);\n var responseState = currentResponseState;\n\n if (responseState === null) {\n throw new Error('Invalid hook call. Hooks can only be called inside of the body of a function component.');\n }\n\n var localId = localIdCounter++;\n return makeId(responseState, treeId, localId);\n}\n\nfunction noop() {}\n\nvar Dispatcher = {\n readContext: readContext$1,\n useContext: useContext,\n useMemo: useMemo,\n useReducer: useReducer,\n useRef: useRef,\n useState: useState,\n useInsertionEffect: noop,\n useLayoutEffect: useLayoutEffect,\n useCallback: useCallback,\n // useImperativeHandle is not run in the server environment\n useImperativeHandle: noop,\n // Effects are not run in the server environment.\n useEffect: noop,\n // Debugging effect\n useDebugValue: noop,\n useDeferredValue: useDeferredValue,\n useTransition: useTransition,\n useId: useId,\n // Subscriptions are not setup in a server environment.\n useMutableSource: useMutableSource,\n useSyncExternalStore: useSyncExternalStore\n};\n\nvar currentResponseState = null;\nfunction setCurrentResponseState(responseState) {\n currentResponseState = responseState;\n}\n\nfunction getStackByComponentStackNode(componentStack) {\n try {\n var info = '';\n var node = componentStack;\n\n do {\n switch (node.tag) {\n case 0:\n info += describeBuiltInComponentFrame(node.type, null, null);\n break;\n\n case 1:\n info += describeFunctionComponentFrame(node.type, null, null);\n break;\n\n case 2:\n info += describeClassComponentFrame(node.type, null, null);\n break;\n }\n\n node = node.parent;\n } while (node);\n\n return info;\n } catch (x) {\n return '\\nError generating stack: ' + x.message + '\\n' + x.stack;\n }\n}\n\nvar ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher;\nvar ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;\nvar PENDING = 0;\nvar COMPLETED = 1;\nvar FLUSHED = 2;\nvar ABORTED = 3;\nvar ERRORED = 4;\nvar OPEN = 0;\nvar CLOSING = 1;\nvar CLOSED = 2;\n// This is a default heuristic for how to split up the HTML content into progressive\n// loading. Our goal is to be able to display additional new content about every 500ms.\n// Faster than that is unnecessary and should be throttled on the client. It also\n// adds unnecessary overhead to do more splits. We don't know if it's a higher or lower\n// end device but higher end suffer less from the overhead than lower end does from\n// not getting small enough pieces. We error on the side of low end.\n// We base this on low end 3G speeds which is about 500kbits per second. We assume\n// that there can be a reasonable drop off from max bandwidth which leaves you with\n// as little as 80%. We can receive half of that each 500ms - at best. In practice,\n// a little bandwidth is lost to processing and contention - e.g. CSS and images that\n// are downloaded along with the main content. So we estimate about half of that to be\n// the lower end throughput. In other words, we expect that you can at least show\n// about 12.5kb of content per 500ms. Not counting starting latency for the first\n// paint.\n// 500 * 1024 / 8 * .8 * 0.5 / 2\nvar DEFAULT_PROGRESSIVE_CHUNK_SIZE = 12800;\n\nfunction defaultErrorHandler(error) {\n console['error'](error); // Don't transform to our wrapper\n\n return null;\n}\n\nfunction noop$1() {}\n\nfunction createRequest(children, responseState, rootFormatContext, progressiveChunkSize, onError, onAllReady, onShellReady, onShellError, onFatalError) {\n var pingedTasks = [];\n var abortSet = new Set();\n var request = {\n destination: null,\n responseState: responseState,\n progressiveChunkSize: progressiveChunkSize === undefined ? DEFAULT_PROGRESSIVE_CHUNK_SIZE : progressiveChunkSize,\n status: OPEN,\n fatalError: null,\n nextSegmentId: 0,\n allPendingTasks: 0,\n pendingRootTasks: 0,\n completedRootSegment: null,\n abortableTasks: abortSet,\n pingedTasks: pingedTasks,\n clientRenderedBoundaries: [],\n completedBoundaries: [],\n partialBoundaries: [],\n onError: onError === undefined ? defaultErrorHandler : onError,\n onAllReady: onAllReady === undefined ? noop$1 : onAllReady,\n onShellReady: onShellReady === undefined ? noop$1 : onShellReady,\n onShellError: onShellError === undefined ? noop$1 : onShellError,\n onFatalError: onFatalError === undefined ? noop$1 : onFatalError\n }; // This segment represents the root fallback.\n\n var rootSegment = createPendingSegment(request, 0, null, rootFormatContext, // Root segments are never embedded in Text on either edge\n false, false); // There is no parent so conceptually, we're unblocked to flush this segment.\n\n rootSegment.parentFlushed = true;\n var rootTask = createTask(request, children, null, rootSegment, abortSet, emptyContextObject, rootContextSnapshot, emptyTreeContext);\n pingedTasks.push(rootTask);\n return request;\n}\n\nfunction pingTask(request, task) {\n var pingedTasks = request.pingedTasks;\n pingedTasks.push(task);\n\n if (pingedTasks.length === 1) {\n scheduleWork(function () {\n return performWork(request);\n });\n }\n}\n\nfunction createSuspenseBoundary(request, fallbackAbortableTasks) {\n return {\n id: UNINITIALIZED_SUSPENSE_BOUNDARY_ID,\n rootSegmentID: -1,\n parentFlushed: false,\n pendingTasks: 0,\n forceClientRender: false,\n completedSegments: [],\n byteSize: 0,\n fallbackAbortableTasks: fallbackAbortableTasks,\n errorDigest: null\n };\n}\n\nfunction createTask(request, node, blockedBoundary, blockedSegment, abortSet, legacyContext, context, treeContext) {\n request.allPendingTasks++;\n\n if (blockedBoundary === null) {\n request.pendingRootTasks++;\n } else {\n blockedBoundary.pendingTasks++;\n }\n\n var task = {\n node: node,\n ping: function () {\n return pingTask(request, task);\n },\n blockedBoundary: blockedBoundary,\n blockedSegment: blockedSegment,\n abortSet: abortSet,\n legacyContext: legacyContext,\n context: context,\n treeContext: treeContext\n };\n\n {\n task.componentStack = null;\n }\n\n abortSet.add(task);\n return task;\n}\n\nfunction createPendingSegment(request, index, boundary, formatContext, lastPushedText, textEmbedded) {\n return {\n status: PENDING,\n id: -1,\n // lazily assigned later\n index: index,\n parentFlushed: false,\n chunks: [],\n children: [],\n formatContext: formatContext,\n boundary: boundary,\n lastPushedText: lastPushedText,\n textEmbedded: textEmbedded\n };\n} // DEV-only global reference to the currently executing task\n\n\nvar currentTaskInDEV = null;\n\nfunction getCurrentStackInDEV() {\n {\n if (currentTaskInDEV === null || currentTaskInDEV.componentStack === null) {\n return '';\n }\n\n return getStackByComponentStackNode(currentTaskInDEV.componentStack);\n }\n}\n\nfunction pushBuiltInComponentStackInDEV(task, type) {\n {\n task.componentStack = {\n tag: 0,\n parent: task.componentStack,\n type: type\n };\n }\n}\n\nfunction pushFunctionComponentStackInDEV(task, type) {\n {\n task.componentStack = {\n tag: 1,\n parent: task.componentStack,\n type: type\n };\n }\n}\n\nfunction pushClassComponentStackInDEV(task, type) {\n {\n task.componentStack = {\n tag: 2,\n parent: task.componentStack,\n type: type\n };\n }\n}\n\nfunction popComponentStackInDEV(task) {\n {\n if (task.componentStack === null) {\n error('Unexpectedly popped too many stack frames. This is a bug in React.');\n } else {\n task.componentStack = task.componentStack.parent;\n }\n }\n} // stash the component stack of an unwinding error until it is processed\n\n\nvar lastBoundaryErrorComponentStackDev = null;\n\nfunction captureBoundaryErrorDetailsDev(boundary, error) {\n {\n var errorMessage;\n\n if (typeof error === 'string') {\n errorMessage = error;\n } else if (error && typeof error.message === 'string') {\n errorMessage = error.message;\n } else {\n // eslint-disable-next-line react-internal/safe-string-coercion\n errorMessage = String(error);\n }\n\n var errorComponentStack = lastBoundaryErrorComponentStackDev || getCurrentStackInDEV();\n lastBoundaryErrorComponentStackDev = null;\n boundary.errorMessage = errorMessage;\n boundary.errorComponentStack = errorComponentStack;\n }\n}\n\nfunction logRecoverableError(request, error) {\n // If this callback errors, we intentionally let that error bubble up to become a fatal error\n // so that someone fixes the error reporting instead of hiding it.\n var errorDigest = request.onError(error);\n\n if (errorDigest != null && typeof errorDigest !== 'string') {\n // eslint-disable-next-line react-internal/prod-error-codes\n throw new Error(\"onError returned something with a type other than \\\"string\\\". onError should return a string and may return null or undefined but must not return anything else. It received something of type \\\"\" + typeof errorDigest + \"\\\" instead\");\n }\n\n return errorDigest;\n}\n\nfunction fatalError(request, error) {\n // This is called outside error handling code such as if the root errors outside\n // a suspense boundary or if the root suspense boundary's fallback errors.\n // It's also called if React itself or its host configs errors.\n var onShellError = request.onShellError;\n onShellError(error);\n var onFatalError = request.onFatalError;\n onFatalError(error);\n\n if (request.destination !== null) {\n request.status = CLOSED;\n closeWithError(request.destination, error);\n } else {\n request.status = CLOSING;\n request.fatalError = error;\n }\n}\n\nfunction renderSuspenseBoundary(request, task, props) {\n pushBuiltInComponentStackInDEV(task, 'Suspense');\n var parentBoundary = task.blockedBoundary;\n var parentSegment = task.blockedSegment; // Each time we enter a suspense boundary, we split out into a new segment for\n // the fallback so that we can later replace that segment with the content.\n // This also lets us split out the main content even if it doesn't suspend,\n // in case it ends up generating a large subtree of content.\n\n var fallback = props.fallback;\n var content = props.children;\n var fallbackAbortSet = new Set();\n var newBoundary = createSuspenseBoundary(request, fallbackAbortSet);\n var insertionIndex = parentSegment.chunks.length; // The children of the boundary segment is actually the fallback.\n\n var boundarySegment = createPendingSegment(request, insertionIndex, newBoundary, parentSegment.formatContext, // boundaries never require text embedding at their edges because comment nodes bound them\n false, false);\n parentSegment.children.push(boundarySegment); // The parentSegment has a child Segment at this index so we reset the lastPushedText marker on the parent\n\n parentSegment.lastPushedText = false; // This segment is the actual child content. We can start rendering that immediately.\n\n var contentRootSegment = createPendingSegment(request, 0, null, parentSegment.formatContext, // boundaries never require text embedding at their edges because comment nodes bound them\n false, false); // We mark the root segment as having its parent flushed. It's not really flushed but there is\n // no parent segment so there's nothing to wait on.\n\n contentRootSegment.parentFlushed = true; // Currently this is running synchronously. We could instead schedule this to pingedTasks.\n // I suspect that there might be some efficiency benefits from not creating the suspended task\n // and instead just using the stack if possible.\n // TODO: Call this directly instead of messing with saving and restoring contexts.\n // We can reuse the current context and task to render the content immediately without\n // context switching. We just need to temporarily switch which boundary and which segment\n // we're writing to. If something suspends, it'll spawn new suspended task with that context.\n\n task.blockedBoundary = newBoundary;\n task.blockedSegment = contentRootSegment;\n\n try {\n // We use the safe form because we don't handle suspending here. Only error handling.\n renderNode(request, task, content);\n pushSegmentFinale$1(contentRootSegment.chunks, request.responseState, contentRootSegment.lastPushedText, contentRootSegment.textEmbedded);\n contentRootSegment.status = COMPLETED;\n queueCompletedSegment(newBoundary, contentRootSegment);\n\n if (newBoundary.pendingTasks === 0) {\n // This must have been the last segment we were waiting on. This boundary is now complete.\n // Therefore we won't need the fallback. We early return so that we don't have to create\n // the fallback.\n popComponentStackInDEV(task);\n return;\n }\n } catch (error) {\n contentRootSegment.status = ERRORED;\n newBoundary.forceClientRender = true;\n newBoundary.errorDigest = logRecoverableError(request, error);\n\n {\n captureBoundaryErrorDetailsDev(newBoundary, error);\n } // We don't need to decrement any task numbers because we didn't spawn any new task.\n // We don't need to schedule any task because we know the parent has written yet.\n // We do need to fallthrough to create the fallback though.\n\n } finally {\n task.blockedBoundary = parentBoundary;\n task.blockedSegment = parentSegment;\n } // We create suspended task for the fallback because we don't want to actually work\n // on it yet in case we finish the main content, so we queue for later.\n\n\n var suspendedFallbackTask = createTask(request, fallback, parentBoundary, boundarySegment, fallbackAbortSet, task.legacyContext, task.context, task.treeContext);\n\n {\n suspendedFallbackTask.componentStack = task.componentStack;\n } // TODO: This should be queued at a separate lower priority queue so that we only work\n // on preparing fallbacks if we don't have any more main content to task on.\n\n\n request.pingedTasks.push(suspendedFallbackTask);\n popComponentStackInDEV(task);\n}\n\nfunction renderHostElement(request, task, type, props) {\n pushBuiltInComponentStackInDEV(task, type);\n var segment = task.blockedSegment;\n var children = pushStartInstance(segment.chunks, type, props, request.responseState, segment.formatContext);\n segment.lastPushedText = false;\n var prevContext = segment.formatContext;\n segment.formatContext = getChildFormatContext(prevContext, type, props); // We use the non-destructive form because if something suspends, we still\n // need to pop back up and finish this subtree of HTML.\n\n renderNode(request, task, children); // We expect that errors will fatal the whole task and that we don't need\n // the correct context. Therefore this is not in a finally.\n\n segment.formatContext = prevContext;\n pushEndInstance(segment.chunks, type);\n segment.lastPushedText = false;\n popComponentStackInDEV(task);\n}\n\nfunction shouldConstruct$1(Component) {\n return Component.prototype && Component.prototype.isReactComponent;\n}\n\nfunction renderWithHooks(request, task, Component, props, secondArg) {\n var componentIdentity = {};\n prepareToUseHooks(task, componentIdentity);\n var result = Component(props, secondArg);\n return finishHooks(Component, props, result, secondArg);\n}\n\nfunction finishClassComponent(request, task, instance, Component, props) {\n var nextChildren = instance.render();\n\n {\n if (instance.props !== props) {\n if (!didWarnAboutReassigningProps) {\n error('It looks like %s is reassigning its own `this.props` while rendering. ' + 'This is not supported and can lead to confusing bugs.', getComponentNameFromType(Component) || 'a component');\n }\n\n didWarnAboutReassigningProps = true;\n }\n }\n\n {\n var childContextTypes = Component.childContextTypes;\n\n if (childContextTypes !== null && childContextTypes !== undefined) {\n var previousContext = task.legacyContext;\n var mergedContext = processChildContext(instance, Component, previousContext, childContextTypes);\n task.legacyContext = mergedContext;\n renderNodeDestructive(request, task, nextChildren);\n task.legacyContext = previousContext;\n return;\n }\n }\n\n renderNodeDestructive(request, task, nextChildren);\n}\n\nfunction renderClassComponent(request, task, Component, props) {\n pushClassComponentStackInDEV(task, Component);\n var maskedContext = getMaskedContext(Component, task.legacyContext) ;\n var instance = constructClassInstance(Component, props, maskedContext);\n mountClassInstance(instance, Component, props, maskedContext);\n finishClassComponent(request, task, instance, Component, props);\n popComponentStackInDEV(task);\n}\n\nvar didWarnAboutBadClass = {};\nvar didWarnAboutModulePatternComponent = {};\nvar didWarnAboutContextTypeOnFunctionComponent = {};\nvar didWarnAboutGetDerivedStateOnFunctionComponent = {};\nvar didWarnAboutReassigningProps = false;\nvar didWarnAboutDefaultPropsOnFunctionComponent = {};\nvar didWarnAboutGenerators = false;\nvar didWarnAboutMaps = false;\nvar hasWarnedAboutUsingContextAsConsumer = false; // This would typically be a function component but we still support module pattern\n// components for some reason.\n\nfunction renderIndeterminateComponent(request, task, Component, props) {\n var legacyContext;\n\n {\n legacyContext = getMaskedContext(Component, task.legacyContext);\n }\n\n pushFunctionComponentStackInDEV(task, Component);\n\n {\n if (Component.prototype && typeof Component.prototype.render === 'function') {\n var componentName = getComponentNameFromType(Component) || 'Unknown';\n\n if (!didWarnAboutBadClass[componentName]) {\n error(\"The <%s /> component appears to have a render method, but doesn't extend React.Component. \" + 'This is likely to cause errors. Change %s to extend React.Component instead.', componentName, componentName);\n\n didWarnAboutBadClass[componentName] = true;\n }\n }\n }\n\n var value = renderWithHooks(request, task, Component, props, legacyContext);\n var hasId = checkDidRenderIdHook();\n\n {\n // Support for module components is deprecated and is removed behind a flag.\n // Whether or not it would crash later, we want to show a good message in DEV first.\n if (typeof value === 'object' && value !== null && typeof value.render === 'function' && value.$$typeof === undefined) {\n var _componentName = getComponentNameFromType(Component) || 'Unknown';\n\n if (!didWarnAboutModulePatternComponent[_componentName]) {\n error('The <%s /> component appears to be a function component that returns a class instance. ' + 'Change %s to a class that extends React.Component instead. ' + \"If you can't use a class try assigning the prototype on the function as a workaround. \" + \"`%s.prototype = React.Component.prototype`. Don't use an arrow function since it \" + 'cannot be called with `new` by React.', _componentName, _componentName, _componentName);\n\n didWarnAboutModulePatternComponent[_componentName] = true;\n }\n }\n }\n\n if ( // Run these checks in production only if the flag is off.\n // Eventually we'll delete this branch altogether.\n typeof value === 'object' && value !== null && typeof value.render === 'function' && value.$$typeof === undefined) {\n {\n var _componentName2 = getComponentNameFromType(Component) || 'Unknown';\n\n if (!didWarnAboutModulePatternComponent[_componentName2]) {\n error('The <%s /> component appears to be a function component that returns a class instance. ' + 'Change %s to a class that extends React.Component instead. ' + \"If you can't use a class try assigning the prototype on the function as a workaround. \" + \"`%s.prototype = React.Component.prototype`. Don't use an arrow function since it \" + 'cannot be called with `new` by React.', _componentName2, _componentName2, _componentName2);\n\n didWarnAboutModulePatternComponent[_componentName2] = true;\n }\n }\n\n mountClassInstance(value, Component, props, legacyContext);\n finishClassComponent(request, task, value, Component, props);\n } else {\n\n {\n validateFunctionComponentInDev(Component);\n } // We're now successfully past this task, and we don't have to pop back to\n // the previous task every again, so we can use the destructive recursive form.\n\n\n if (hasId) {\n // This component materialized an id. We treat this as its own level, with\n // a single \"child\" slot.\n var prevTreeContext = task.treeContext;\n var totalChildren = 1;\n var index = 0;\n task.treeContext = pushTreeContext(prevTreeContext, totalChildren, index);\n\n try {\n renderNodeDestructive(request, task, value);\n } finally {\n task.treeContext = prevTreeContext;\n }\n } else {\n renderNodeDestructive(request, task, value);\n }\n }\n\n popComponentStackInDEV(task);\n}\n\nfunction validateFunctionComponentInDev(Component) {\n {\n if (Component) {\n if (Component.childContextTypes) {\n error('%s(...): childContextTypes cannot be defined on a function component.', Component.displayName || Component.name || 'Component');\n }\n }\n\n if ( Component.defaultProps !== undefined) {\n var componentName = getComponentNameFromType(Component) || 'Unknown';\n\n if (!didWarnAboutDefaultPropsOnFunctionComponent[componentName]) {\n error('%s: Support for defaultProps will be removed from function components ' + 'in a future major release. Use JavaScript default parameters instead.', componentName);\n\n didWarnAboutDefaultPropsOnFunctionComponent[componentName] = true;\n }\n }\n\n if (typeof Component.getDerivedStateFromProps === 'function') {\n var _componentName3 = getComponentNameFromType(Component) || 'Unknown';\n\n if (!didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3]) {\n error('%s: Function components do not support getDerivedStateFromProps.', _componentName3);\n\n didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3] = true;\n }\n }\n\n if (typeof Component.contextType === 'object' && Component.contextType !== null) {\n var _componentName4 = getComponentNameFromType(Component) || 'Unknown';\n\n if (!didWarnAboutContextTypeOnFunctionComponent[_componentName4]) {\n error('%s: Function components do not support contextType.', _componentName4);\n\n didWarnAboutContextTypeOnFunctionComponent[_componentName4] = true;\n }\n }\n }\n}\n\nfunction resolveDefaultProps(Component, baseProps) {\n if (Component && Component.defaultProps) {\n // Resolve default props. Taken from ReactElement\n var props = assign({}, baseProps);\n var defaultProps = Component.defaultProps;\n\n for (var propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n\n return props;\n }\n\n return baseProps;\n}\n\nfunction renderForwardRef(request, task, type, props, ref) {\n pushFunctionComponentStackInDEV(task, type.render);\n var children = renderWithHooks(request, task, type.render, props, ref);\n var hasId = checkDidRenderIdHook();\n\n if (hasId) {\n // This component materialized an id. We treat this as its own level, with\n // a single \"child\" slot.\n var prevTreeContext = task.treeContext;\n var totalChildren = 1;\n var index = 0;\n task.treeContext = pushTreeContext(prevTreeContext, totalChildren, index);\n\n try {\n renderNodeDestructive(request, task, children);\n } finally {\n task.treeContext = prevTreeContext;\n }\n } else {\n renderNodeDestructive(request, task, children);\n }\n\n popComponentStackInDEV(task);\n}\n\nfunction renderMemo(request, task, type, props, ref) {\n var innerType = type.type;\n var resolvedProps = resolveDefaultProps(innerType, props);\n renderElement(request, task, innerType, resolvedProps, ref);\n}\n\nfunction renderContextConsumer(request, task, context, props) {\n // The logic below for Context differs depending on PROD or DEV mode. In\n // DEV mode, we create a separate object for Context.Consumer that acts\n // like a proxy to Context. This proxy object adds unnecessary code in PROD\n // so we use the old behaviour (Context.Consumer references Context) to\n // reduce size and overhead. The separate object references context via\n // a property called \"_context\", which also gives us the ability to check\n // in DEV mode if this property exists or not and warn if it does not.\n {\n if (context._context === undefined) {\n // This may be because it's a Context (rather than a Consumer).\n // Or it may be because it's older React where they're the same thing.\n // We only want to warn if we're sure it's a new React.\n if (context !== context.Consumer) {\n if (!hasWarnedAboutUsingContextAsConsumer) {\n hasWarnedAboutUsingContextAsConsumer = true;\n\n error('Rendering <Context> directly is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Consumer> instead?');\n }\n }\n } else {\n context = context._context;\n }\n }\n\n var render = props.children;\n\n {\n if (typeof render !== 'function') {\n error('A context consumer was rendered with multiple children, or a child ' + \"that isn't a function. A context consumer expects a single child \" + 'that is a function. If you did pass a function, make sure there ' + 'is no trailing or leading whitespace around it.');\n }\n }\n\n var newValue = readContext(context);\n var newChildren = render(newValue);\n renderNodeDestructive(request, task, newChildren);\n}\n\nfunction renderContextProvider(request, task, type, props) {\n var context = type._context;\n var value = props.value;\n var children = props.children;\n var prevSnapshot;\n\n {\n prevSnapshot = task.context;\n }\n\n task.context = pushProvider(context, value);\n renderNodeDestructive(request, task, children);\n task.context = popProvider(context);\n\n {\n if (prevSnapshot !== task.context) {\n error('Popping the context provider did not return back to the original snapshot. This is a bug in React.');\n }\n }\n}\n\nfunction renderLazyComponent(request, task, lazyComponent, props, ref) {\n pushBuiltInComponentStackInDEV(task, 'Lazy');\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n var Component = init(payload);\n var resolvedProps = resolveDefaultProps(Component, props);\n renderElement(request, task, Component, resolvedProps, ref);\n popComponentStackInDEV(task);\n}\n\nfunction renderElement(request, task, type, props, ref) {\n if (typeof type === 'function') {\n if (shouldConstruct$1(type)) {\n renderClassComponent(request, task, type, props);\n return;\n } else {\n renderIndeterminateComponent(request, task, type, props);\n return;\n }\n }\n\n if (typeof type === 'string') {\n renderHostElement(request, task, type, props);\n return;\n }\n\n switch (type) {\n // TODO: LegacyHidden acts the same as a fragment. This only works\n // because we currently assume that every instance of LegacyHidden is\n // accompanied by a host component wrapper. In the hidden mode, the host\n // component is given a `hidden` attribute, which ensures that the\n // initial HTML is not visible. To support the use of LegacyHidden as a\n // true fragment, without an extra DOM node, we would have to hide the\n // initial HTML in some other way.\n // TODO: Add REACT_OFFSCREEN_TYPE here too with the same capability.\n case REACT_LEGACY_HIDDEN_TYPE:\n case REACT_DEBUG_TRACING_MODE_TYPE:\n case REACT_STRICT_MODE_TYPE:\n case REACT_PROFILER_TYPE:\n case REACT_FRAGMENT_TYPE:\n {\n renderNodeDestructive(request, task, props.children);\n return;\n }\n\n case REACT_SUSPENSE_LIST_TYPE:\n {\n pushBuiltInComponentStackInDEV(task, 'SuspenseList'); // TODO: SuspenseList should control the boundaries.\n\n renderNodeDestructive(request, task, props.children);\n popComponentStackInDEV(task);\n return;\n }\n\n case REACT_SCOPE_TYPE:\n {\n\n throw new Error('ReactDOMServer does not yet support scope components.');\n }\n // eslint-disable-next-line-no-fallthrough\n\n case REACT_SUSPENSE_TYPE:\n {\n {\n renderSuspenseBoundary(request, task, props);\n }\n\n return;\n }\n }\n\n if (typeof type === 'object' && type !== null) {\n switch (type.$$typeof) {\n case REACT_FORWARD_REF_TYPE:\n {\n renderForwardRef(request, task, type, props, ref);\n return;\n }\n\n case REACT_MEMO_TYPE:\n {\n renderMemo(request, task, type, props, ref);\n return;\n }\n\n case REACT_PROVIDER_TYPE:\n {\n renderContextProvider(request, task, type, props);\n return;\n }\n\n case REACT_CONTEXT_TYPE:\n {\n renderContextConsumer(request, task, type, props);\n return;\n }\n\n case REACT_LAZY_TYPE:\n {\n renderLazyComponent(request, task, type, props);\n return;\n }\n }\n }\n\n var info = '';\n\n {\n if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {\n info += ' You likely forgot to export your component from the file ' + \"it's defined in, or you might have mixed up default and \" + 'named imports.';\n }\n }\n\n throw new Error('Element type is invalid: expected a string (for built-in ' + 'components) or a class/function (for composite components) ' + (\"but got: \" + (type == null ? type : typeof type) + \".\" + info));\n}\n\nfunction validateIterable(iterable, iteratorFn) {\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n iterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (iterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n }\n }\n}\n\nfunction renderNodeDestructive(request, task, node) {\n {\n // In Dev we wrap renderNodeDestructiveImpl in a try / catch so we can capture\n // a component stack at the right place in the tree. We don't do this in renderNode\n // becuase it is not called at every layer of the tree and we may lose frames\n try {\n return renderNodeDestructiveImpl(request, task, node);\n } catch (x) {\n if (typeof x === 'object' && x !== null && typeof x.then === 'function') ; else {\n // This is an error, stash the component stack if it is null.\n lastBoundaryErrorComponentStackDev = lastBoundaryErrorComponentStackDev !== null ? lastBoundaryErrorComponentStackDev : getCurrentStackInDEV();\n } // rethrow so normal suspense logic can handle thrown value accordingly\n\n\n throw x;\n }\n }\n} // This function by it self renders a node and consumes the task by mutating it\n// to update the current execution state.\n\n\nfunction renderNodeDestructiveImpl(request, task, node) {\n // Stash the node we're working on. We'll pick up from this task in case\n // something suspends.\n task.node = node; // Handle object types\n\n if (typeof node === 'object' && node !== null) {\n switch (node.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var element = node;\n var type = element.type;\n var props = element.props;\n var ref = element.ref;\n renderElement(request, task, type, props, ref);\n return;\n }\n\n case REACT_PORTAL_TYPE:\n throw new Error('Portals are not currently supported by the server renderer. ' + 'Render them conditionally so that they only appear on the client render.');\n // eslint-disable-next-line-no-fallthrough\n\n case REACT_LAZY_TYPE:\n {\n var lazyNode = node;\n var payload = lazyNode._payload;\n var init = lazyNode._init;\n var resolvedNode;\n\n {\n try {\n resolvedNode = init(payload);\n } catch (x) {\n if (typeof x === 'object' && x !== null && typeof x.then === 'function') {\n // this Lazy initializer is suspending. push a temporary frame onto the stack so it can be\n // popped off in spawnNewSuspendedTask. This aligns stack behavior between Lazy in element position\n // vs Component position. We do not want the frame for Errors so we exclusively do this in\n // the wakeable branch\n pushBuiltInComponentStackInDEV(task, 'Lazy');\n }\n\n throw x;\n }\n }\n\n renderNodeDestructive(request, task, resolvedNode);\n return;\n }\n }\n\n if (isArray(node)) {\n renderChildrenArray(request, task, node);\n return;\n }\n\n var iteratorFn = getIteratorFn(node);\n\n if (iteratorFn) {\n {\n validateIterable(node, iteratorFn);\n }\n\n var iterator = iteratorFn.call(node);\n\n if (iterator) {\n // We need to know how many total children are in this set, so that we\n // can allocate enough id slots to acommodate them. So we must exhaust\n // the iterator before we start recursively rendering the children.\n // TODO: This is not great but I think it's inherent to the id\n // generation algorithm.\n var step = iterator.next(); // If there are not entries, we need to push an empty so we start by checking that.\n\n if (!step.done) {\n var children = [];\n\n do {\n children.push(step.value);\n step = iterator.next();\n } while (!step.done);\n\n renderChildrenArray(request, task, children);\n return;\n }\n\n return;\n }\n }\n\n var childString = Object.prototype.toString.call(node);\n throw new Error(\"Objects are not valid as a React child (found: \" + (childString === '[object Object]' ? 'object with keys {' + Object.keys(node).join(', ') + '}' : childString) + \"). \" + 'If you meant to render a collection of children, use an array ' + 'instead.');\n }\n\n if (typeof node === 'string') {\n var segment = task.blockedSegment;\n segment.lastPushedText = pushTextInstance$1(task.blockedSegment.chunks, node, request.responseState, segment.lastPushedText);\n return;\n }\n\n if (typeof node === 'number') {\n var _segment = task.blockedSegment;\n _segment.lastPushedText = pushTextInstance$1(task.blockedSegment.chunks, '' + node, request.responseState, _segment.lastPushedText);\n return;\n }\n\n {\n if (typeof node === 'function') {\n error('Functions are not valid as a React child. This may happen if ' + 'you return a Component instead of <Component /> from render. ' + 'Or maybe you meant to call this function rather than return it.');\n }\n }\n}\n\nfunction renderChildrenArray(request, task, children) {\n var totalChildren = children.length;\n\n for (var i = 0; i < totalChildren; i++) {\n var prevTreeContext = task.treeContext;\n task.treeContext = pushTreeContext(prevTreeContext, totalChildren, i);\n\n try {\n // We need to use the non-destructive form so that we can safely pop back\n // up and render the sibling if something suspends.\n renderNode(request, task, children[i]);\n } finally {\n task.treeContext = prevTreeContext;\n }\n }\n}\n\nfunction spawnNewSuspendedTask(request, task, x) {\n // Something suspended, we'll need to create a new segment and resolve it later.\n var segment = task.blockedSegment;\n var insertionIndex = segment.chunks.length;\n var newSegment = createPendingSegment(request, insertionIndex, null, segment.formatContext, // Adopt the parent segment's leading text embed\n segment.lastPushedText, // Assume we are text embedded at the trailing edge\n true);\n segment.children.push(newSegment); // Reset lastPushedText for current Segment since the new Segment \"consumed\" it\n\n segment.lastPushedText = false;\n var newTask = createTask(request, task.node, task.blockedBoundary, newSegment, task.abortSet, task.legacyContext, task.context, task.treeContext);\n\n {\n if (task.componentStack !== null) {\n // We pop one task off the stack because the node that suspended will be tried again,\n // which will add it back onto the stack.\n newTask.componentStack = task.componentStack.parent;\n }\n }\n\n var ping = newTask.ping;\n x.then(ping, ping);\n} // This is a non-destructive form of rendering a node. If it suspends it spawns\n// a new task and restores the context of this task to what it was before.\n\n\nfunction renderNode(request, task, node) {\n // TODO: Store segment.children.length here and reset it in case something\n // suspended partially through writing something.\n // Snapshot the current context in case something throws to interrupt the\n // process.\n var previousFormatContext = task.blockedSegment.formatContext;\n var previousLegacyContext = task.legacyContext;\n var previousContext = task.context;\n var previousComponentStack = null;\n\n {\n previousComponentStack = task.componentStack;\n }\n\n try {\n return renderNodeDestructive(request, task, node);\n } catch (x) {\n resetHooksState();\n\n if (typeof x === 'object' && x !== null && typeof x.then === 'function') {\n spawnNewSuspendedTask(request, task, x); // Restore the context. We assume that this will be restored by the inner\n // functions in case nothing throws so we don't use \"finally\" here.\n\n task.blockedSegment.formatContext = previousFormatContext;\n task.legacyContext = previousLegacyContext;\n task.context = previousContext; // Restore all active ReactContexts to what they were before.\n\n switchContext(previousContext);\n\n {\n task.componentStack = previousComponentStack;\n }\n\n return;\n } else {\n // Restore the context. We assume that this will be restored by the inner\n // functions in case nothing throws so we don't use \"finally\" here.\n task.blockedSegment.formatContext = previousFormatContext;\n task.legacyContext = previousLegacyContext;\n task.context = previousContext; // Restore all active ReactContexts to what they were before.\n\n switchContext(previousContext);\n\n {\n task.componentStack = previousComponentStack;\n } // We assume that we don't need the correct context.\n // Let's terminate the rest of the tree and don't render any siblings.\n\n\n throw x;\n }\n }\n}\n\nfunction erroredTask(request, boundary, segment, error) {\n // Report the error to a global handler.\n var errorDigest = logRecoverableError(request, error);\n\n if (boundary === null) {\n fatalError(request, error);\n } else {\n boundary.pendingTasks--;\n\n if (!boundary.forceClientRender) {\n boundary.forceClientRender = true;\n boundary.errorDigest = errorDigest;\n\n {\n captureBoundaryErrorDetailsDev(boundary, error);\n } // Regardless of what happens next, this boundary won't be displayed,\n // so we can flush it, if the parent already flushed.\n\n\n if (boundary.parentFlushed) {\n // We don't have a preference where in the queue this goes since it's likely\n // to error on the client anyway. However, intentionally client-rendered\n // boundaries should be flushed earlier so that they can start on the client.\n // We reuse the same queue for errors.\n request.clientRenderedBoundaries.push(boundary);\n }\n }\n }\n\n request.allPendingTasks--;\n\n if (request.allPendingTasks === 0) {\n var onAllReady = request.onAllReady;\n onAllReady();\n }\n}\n\nfunction abortTaskSoft(task) {\n // This aborts task without aborting the parent boundary that it blocks.\n // It's used for when we didn't need this task to complete the tree.\n // If task was needed, then it should use abortTask instead.\n var request = this;\n var boundary = task.blockedBoundary;\n var segment = task.blockedSegment;\n segment.status = ABORTED;\n finishedTask(request, boundary, segment);\n}\n\nfunction abortTask(task, request, reason) {\n // This aborts the task and aborts the parent that it blocks, putting it into\n // client rendered mode.\n var boundary = task.blockedBoundary;\n var segment = task.blockedSegment;\n segment.status = ABORTED;\n\n if (boundary === null) {\n request.allPendingTasks--; // We didn't complete the root so we have nothing to show. We can close\n // the request;\n\n if (request.status !== CLOSED) {\n request.status = CLOSED;\n\n if (request.destination !== null) {\n close(request.destination);\n }\n }\n } else {\n boundary.pendingTasks--;\n\n if (!boundary.forceClientRender) {\n boundary.forceClientRender = true;\n\n var _error = reason === undefined ? new Error('The render was aborted by the server without a reason.') : reason;\n\n boundary.errorDigest = request.onError(_error);\n\n {\n var errorPrefix = 'The server did not finish this Suspense boundary: ';\n\n if (_error && typeof _error.message === 'string') {\n _error = errorPrefix + _error.message;\n } else {\n // eslint-disable-next-line react-internal/safe-string-coercion\n _error = errorPrefix + String(_error);\n }\n\n var previousTaskInDev = currentTaskInDEV;\n currentTaskInDEV = task;\n\n try {\n captureBoundaryErrorDetailsDev(boundary, _error);\n } finally {\n currentTaskInDEV = previousTaskInDev;\n }\n }\n\n if (boundary.parentFlushed) {\n request.clientRenderedBoundaries.push(boundary);\n }\n } // If this boundary was still pending then we haven't already cancelled its fallbacks.\n // We'll need to abort the fallbacks, which will also error that parent boundary.\n\n\n boundary.fallbackAbortableTasks.forEach(function (fallbackTask) {\n return abortTask(fallbackTask, request, reason);\n });\n boundary.fallbackAbortableTasks.clear();\n request.allPendingTasks--;\n\n if (request.allPendingTasks === 0) {\n var onAllReady = request.onAllReady;\n onAllReady();\n }\n }\n}\n\nfunction queueCompletedSegment(boundary, segment) {\n if (segment.chunks.length === 0 && segment.children.length === 1 && segment.children[0].boundary === null) {\n // This is an empty segment. There's nothing to write, so we can instead transfer the ID\n // to the child. That way any existing references point to the child.\n var childSegment = segment.children[0];\n childSegment.id = segment.id;\n childSegment.parentFlushed = true;\n\n if (childSegment.status === COMPLETED) {\n queueCompletedSegment(boundary, childSegment);\n }\n } else {\n var completedSegments = boundary.completedSegments;\n completedSegments.push(segment);\n }\n}\n\nfunction finishedTask(request, boundary, segment) {\n if (boundary === null) {\n if (segment.parentFlushed) {\n if (request.completedRootSegment !== null) {\n throw new Error('There can only be one root segment. This is a bug in React.');\n }\n\n request.completedRootSegment = segment;\n }\n\n request.pendingRootTasks--;\n\n if (request.pendingRootTasks === 0) {\n // We have completed the shell so the shell can't error anymore.\n request.onShellError = noop$1;\n var onShellReady = request.onShellReady;\n onShellReady();\n }\n } else {\n boundary.pendingTasks--;\n\n if (boundary.forceClientRender) ; else if (boundary.pendingTasks === 0) {\n // This must have been the last segment we were waiting on. This boundary is now complete.\n if (segment.parentFlushed) {\n // Our parent segment already flushed, so we need to schedule this segment to be emitted.\n // If it is a segment that was aborted, we'll write other content instead so we don't need\n // to emit it.\n if (segment.status === COMPLETED) {\n queueCompletedSegment(boundary, segment);\n }\n }\n\n if (boundary.parentFlushed) {\n // The segment might be part of a segment that didn't flush yet, but if the boundary's\n // parent flushed, we need to schedule the boundary to be emitted.\n request.completedBoundaries.push(boundary);\n } // We can now cancel any pending task on the fallback since we won't need to show it anymore.\n // This needs to happen after we read the parentFlushed flags because aborting can finish\n // work which can trigger user code, which can start flushing, which can change those flags.\n\n\n boundary.fallbackAbortableTasks.forEach(abortTaskSoft, request);\n boundary.fallbackAbortableTasks.clear();\n } else {\n if (segment.parentFlushed) {\n // Our parent already flushed, so we need to schedule this segment to be emitted.\n // If it is a segment that was aborted, we'll write other content instead so we don't need\n // to emit it.\n if (segment.status === COMPLETED) {\n queueCompletedSegment(boundary, segment);\n var completedSegments = boundary.completedSegments;\n\n if (completedSegments.length === 1) {\n // This is the first time since we last flushed that we completed anything.\n // We can schedule this boundary to emit its partially completed segments early\n // in case the parent has already been flushed.\n if (boundary.parentFlushed) {\n request.partialBoundaries.push(boundary);\n }\n }\n }\n }\n }\n }\n\n request.allPendingTasks--;\n\n if (request.allPendingTasks === 0) {\n // This needs to be called at the very end so that we can synchronously write the result\n // in the callback if needed.\n var onAllReady = request.onAllReady;\n onAllReady();\n }\n}\n\nfunction retryTask(request, task) {\n var segment = task.blockedSegment;\n\n if (segment.status !== PENDING) {\n // We completed this by other means before we had a chance to retry it.\n return;\n } // We restore the context to what it was when we suspended.\n // We don't restore it after we leave because it's likely that we'll end up\n // needing a very similar context soon again.\n\n\n switchContext(task.context);\n var prevTaskInDEV = null;\n\n {\n prevTaskInDEV = currentTaskInDEV;\n currentTaskInDEV = task;\n }\n\n try {\n // We call the destructive form that mutates this task. That way if something\n // suspends again, we can reuse the same task instead of spawning a new one.\n renderNodeDestructive(request, task, task.node);\n pushSegmentFinale$1(segment.chunks, request.responseState, segment.lastPushedText, segment.textEmbedded);\n task.abortSet.delete(task);\n segment.status = COMPLETED;\n finishedTask(request, task.blockedBoundary, segment);\n } catch (x) {\n resetHooksState();\n\n if (typeof x === 'object' && x !== null && typeof x.then === 'function') {\n // Something suspended again, let's pick it back up later.\n var ping = task.ping;\n x.then(ping, ping);\n } else {\n task.abortSet.delete(task);\n segment.status = ERRORED;\n erroredTask(request, task.blockedBoundary, segment, x);\n }\n } finally {\n {\n currentTaskInDEV = prevTaskInDEV;\n }\n }\n}\n\nfunction performWork(request) {\n if (request.status === CLOSED) {\n return;\n }\n\n var prevContext = getActiveContext();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = Dispatcher;\n var prevGetCurrentStackImpl;\n\n {\n prevGetCurrentStackImpl = ReactDebugCurrentFrame$1.getCurrentStack;\n ReactDebugCurrentFrame$1.getCurrentStack = getCurrentStackInDEV;\n }\n\n var prevResponseState = currentResponseState;\n setCurrentResponseState(request.responseState);\n\n try {\n var pingedTasks = request.pingedTasks;\n var i;\n\n for (i = 0; i < pingedTasks.length; i++) {\n var task = pingedTasks[i];\n retryTask(request, task);\n }\n\n pingedTasks.splice(0, i);\n\n if (request.destination !== null) {\n flushCompletedQueues(request, request.destination);\n }\n } catch (error) {\n logRecoverableError(request, error);\n fatalError(request, error);\n } finally {\n setCurrentResponseState(prevResponseState);\n ReactCurrentDispatcher$1.current = prevDispatcher;\n\n {\n ReactDebugCurrentFrame$1.getCurrentStack = prevGetCurrentStackImpl;\n }\n\n if (prevDispatcher === Dispatcher) {\n // This means that we were in a reentrant work loop. This could happen\n // in a renderer that supports synchronous work like renderToString,\n // when it's called from within another renderer.\n // Normally we don't bother switching the contexts to their root/default\n // values when leaving because we'll likely need the same or similar\n // context again. However, when we're inside a synchronous loop like this\n // we'll to restore the context to what it was before returning.\n switchContext(prevContext);\n }\n }\n}\n\nfunction flushSubtree(request, destination, segment) {\n segment.parentFlushed = true;\n\n switch (segment.status) {\n case PENDING:\n {\n // We're emitting a placeholder for this segment to be filled in later.\n // Therefore we'll need to assign it an ID - to refer to it by.\n var segmentID = segment.id = request.nextSegmentId++; // When this segment finally completes it won't be embedded in text since it will flush separately\n\n segment.lastPushedText = false;\n segment.textEmbedded = false;\n return writePlaceholder(destination, request.responseState, segmentID);\n }\n\n case COMPLETED:\n {\n segment.status = FLUSHED;\n var r = true;\n var chunks = segment.chunks;\n var chunkIdx = 0;\n var children = segment.children;\n\n for (var childIdx = 0; childIdx < children.length; childIdx++) {\n var nextChild = children[childIdx]; // Write all the chunks up until the next child.\n\n for (; chunkIdx < nextChild.index; chunkIdx++) {\n writeChunk(destination, chunks[chunkIdx]);\n }\n\n r = flushSegment(request, destination, nextChild);\n } // Finally just write all the remaining chunks\n\n\n for (; chunkIdx < chunks.length - 1; chunkIdx++) {\n writeChunk(destination, chunks[chunkIdx]);\n }\n\n if (chunkIdx < chunks.length) {\n r = writeChunkAndReturn(destination, chunks[chunkIdx]);\n }\n\n return r;\n }\n\n default:\n {\n throw new Error('Aborted, errored or already flushed boundaries should not be flushed again. This is a bug in React.');\n }\n }\n}\n\nfunction flushSegment(request, destination, segment) {\n var boundary = segment.boundary;\n\n if (boundary === null) {\n // Not a suspense boundary.\n return flushSubtree(request, destination, segment);\n }\n\n boundary.parentFlushed = true; // This segment is a Suspense boundary. We need to decide whether to\n // emit the content or the fallback now.\n\n if (boundary.forceClientRender) {\n // Emit a client rendered suspense boundary wrapper.\n // We never queue the inner boundary so we'll never emit its content or partial segments.\n writeStartClientRenderedSuspenseBoundary$1(destination, request.responseState, boundary.errorDigest, boundary.errorMessage, boundary.errorComponentStack); // Flush the fallback.\n\n flushSubtree(request, destination, segment);\n return writeEndClientRenderedSuspenseBoundary$1(destination, request.responseState);\n } else if (boundary.pendingTasks > 0) {\n // This boundary is still loading. Emit a pending suspense boundary wrapper.\n // Assign an ID to refer to the future content by.\n boundary.rootSegmentID = request.nextSegmentId++;\n\n if (boundary.completedSegments.length > 0) {\n // If this is at least partially complete, we can queue it to be partially emitted early.\n request.partialBoundaries.push(boundary);\n } /// This is the first time we should have referenced this ID.\n\n\n var id = boundary.id = assignSuspenseBoundaryID(request.responseState);\n writeStartPendingSuspenseBoundary(destination, request.responseState, id); // Flush the fallback.\n\n flushSubtree(request, destination, segment);\n return writeEndPendingSuspenseBoundary(destination, request.responseState);\n } else if (boundary.byteSize > request.progressiveChunkSize) {\n // This boundary is large and will be emitted separately so that we can progressively show\n // other content. We add it to the queue during the flush because we have to ensure that\n // the parent flushes first so that there's something to inject it into.\n // We also have to make sure that it's emitted into the queue in a deterministic slot.\n // I.e. we can't insert it here when it completes.\n // Assign an ID to refer to the future content by.\n boundary.rootSegmentID = request.nextSegmentId++;\n request.completedBoundaries.push(boundary); // Emit a pending rendered suspense boundary wrapper.\n\n writeStartPendingSuspenseBoundary(destination, request.responseState, boundary.id); // Flush the fallback.\n\n flushSubtree(request, destination, segment);\n return writeEndPendingSuspenseBoundary(destination, request.responseState);\n } else {\n // We can inline this boundary's content as a complete boundary.\n writeStartCompletedSuspenseBoundary$1(destination, request.responseState);\n var completedSegments = boundary.completedSegments;\n\n if (completedSegments.length !== 1) {\n throw new Error('A previously unvisited boundary must have exactly one root segment. This is a bug in React.');\n }\n\n var contentSegment = completedSegments[0];\n flushSegment(request, destination, contentSegment);\n return writeEndCompletedSuspenseBoundary$1(destination, request.responseState);\n }\n}\n\nfunction flushClientRenderedBoundary(request, destination, boundary) {\n return writeClientRenderBoundaryInstruction(destination, request.responseState, boundary.id, boundary.errorDigest, boundary.errorMessage, boundary.errorComponentStack);\n}\n\nfunction flushSegmentContainer(request, destination, segment) {\n writeStartSegment(destination, request.responseState, segment.formatContext, segment.id);\n flushSegment(request, destination, segment);\n return writeEndSegment(destination, segment.formatContext);\n}\n\nfunction flushCompletedBoundary(request, destination, boundary) {\n var completedSegments = boundary.completedSegments;\n var i = 0;\n\n for (; i < completedSegments.length; i++) {\n var segment = completedSegments[i];\n flushPartiallyCompletedSegment(request, destination, boundary, segment);\n }\n\n completedSegments.length = 0;\n return writeCompletedBoundaryInstruction(destination, request.responseState, boundary.id, boundary.rootSegmentID);\n}\n\nfunction flushPartialBoundary(request, destination, boundary) {\n var completedSegments = boundary.completedSegments;\n var i = 0;\n\n for (; i < completedSegments.length; i++) {\n var segment = completedSegments[i];\n\n if (!flushPartiallyCompletedSegment(request, destination, boundary, segment)) {\n i++;\n completedSegments.splice(0, i); // Only write as much as the buffer wants. Something higher priority\n // might want to write later.\n\n return false;\n }\n }\n\n completedSegments.splice(0, i);\n return true;\n}\n\nfunction flushPartiallyCompletedSegment(request, destination, boundary, segment) {\n if (segment.status === FLUSHED) {\n // We've already flushed this inline.\n return true;\n }\n\n var segmentID = segment.id;\n\n if (segmentID === -1) {\n // This segment wasn't previously referred to. This happens at the root of\n // a boundary. We make kind of a leap here and assume this is the root.\n var rootSegmentID = segment.id = boundary.rootSegmentID;\n\n if (rootSegmentID === -1) {\n throw new Error('A root segment ID must have been assigned by now. This is a bug in React.');\n }\n\n return flushSegmentContainer(request, destination, segment);\n } else {\n flushSegmentContainer(request, destination, segment);\n return writeCompletedSegmentInstruction(destination, request.responseState, segmentID);\n }\n}\n\nfunction flushCompletedQueues(request, destination) {\n\n try {\n // The structure of this is to go through each queue one by one and write\n // until the sink tells us to stop. When we should stop, we still finish writing\n // that item fully and then yield. At that point we remove the already completed\n // items up until the point we completed them.\n // TODO: Emit preloading.\n // TODO: It's kind of unfortunate to keep checking this array after we've already\n // emitted the root.\n var completedRootSegment = request.completedRootSegment;\n\n if (completedRootSegment !== null && request.pendingRootTasks === 0) {\n flushSegment(request, destination, completedRootSegment);\n request.completedRootSegment = null;\n writeCompletedRoot(destination, request.responseState);\n } // We emit client rendering instructions for already emitted boundaries first.\n // This is so that we can signal to the client to start client rendering them as\n // soon as possible.\n\n\n var clientRenderedBoundaries = request.clientRenderedBoundaries;\n var i;\n\n for (i = 0; i < clientRenderedBoundaries.length; i++) {\n var boundary = clientRenderedBoundaries[i];\n\n if (!flushClientRenderedBoundary(request, destination, boundary)) {\n request.destination = null;\n i++;\n clientRenderedBoundaries.splice(0, i);\n return;\n }\n }\n\n clientRenderedBoundaries.splice(0, i); // Next we emit any complete boundaries. It's better to favor boundaries\n // that are completely done since we can actually show them, than it is to emit\n // any individual segments from a partially complete boundary.\n\n var completedBoundaries = request.completedBoundaries;\n\n for (i = 0; i < completedBoundaries.length; i++) {\n var _boundary = completedBoundaries[i];\n\n if (!flushCompletedBoundary(request, destination, _boundary)) {\n request.destination = null;\n i++;\n completedBoundaries.splice(0, i);\n return;\n }\n }\n\n completedBoundaries.splice(0, i); // Allow anything written so far to flush to the underlying sink before\n // we continue with lower priorities.\n\n completeWriting(destination);\n beginWriting(destination); // TODO: Here we'll emit data used by hydration.\n // Next we emit any segments of any boundaries that are partially complete\n // but not deeply complete.\n\n var partialBoundaries = request.partialBoundaries;\n\n for (i = 0; i < partialBoundaries.length; i++) {\n var _boundary2 = partialBoundaries[i];\n\n if (!flushPartialBoundary(request, destination, _boundary2)) {\n request.destination = null;\n i++;\n partialBoundaries.splice(0, i);\n return;\n }\n }\n\n partialBoundaries.splice(0, i); // Next we check the completed boundaries again. This may have had\n // boundaries added to it in case they were too larged to be inlined.\n // New ones might be added in this loop.\n\n var largeBoundaries = request.completedBoundaries;\n\n for (i = 0; i < largeBoundaries.length; i++) {\n var _boundary3 = largeBoundaries[i];\n\n if (!flushCompletedBoundary(request, destination, _boundary3)) {\n request.destination = null;\n i++;\n largeBoundaries.splice(0, i);\n return;\n }\n }\n\n largeBoundaries.splice(0, i);\n } finally {\n\n if (request.allPendingTasks === 0 && request.pingedTasks.length === 0 && request.clientRenderedBoundaries.length === 0 && request.completedBoundaries.length === 0 // We don't need to check any partially completed segments because\n // either they have pending task or they're complete.\n ) {\n {\n if (request.abortableTasks.size !== 0) {\n error('There was still abortable task at the root when we closed. This is a bug in React.');\n }\n } // We're done.\n\n\n close(destination);\n }\n }\n}\n\nfunction startWork(request) {\n scheduleWork(function () {\n return performWork(request);\n });\n}\nfunction startFlowing(request, destination) {\n if (request.status === CLOSING) {\n request.status = CLOSED;\n closeWithError(destination, request.fatalError);\n return;\n }\n\n if (request.status === CLOSED) {\n return;\n }\n\n if (request.destination !== null) {\n // We're already flowing.\n return;\n }\n\n request.destination = destination;\n\n try {\n flushCompletedQueues(request, destination);\n } catch (error) {\n logRecoverableError(request, error);\n fatalError(request, error);\n }\n} // This is called to early terminate a request. It puts all pending boundaries in client rendered state.\n\nfunction abort(request, reason) {\n try {\n var abortableTasks = request.abortableTasks;\n abortableTasks.forEach(function (task) {\n return abortTask(task, request, reason);\n });\n abortableTasks.clear();\n\n if (request.destination !== null) {\n flushCompletedQueues(request, request.destination);\n }\n } catch (error) {\n logRecoverableError(request, error);\n fatalError(request, error);\n }\n}\n\nfunction onError() {// Non-fatal errors are ignored.\n}\n\nfunction renderToStringImpl(children, options, generateStaticMarkup, abortReason) {\n var didFatal = false;\n var fatalError = null;\n var result = '';\n var destination = {\n push: function (chunk) {\n if (chunk !== null) {\n result += chunk;\n }\n\n return true;\n },\n destroy: function (error) {\n didFatal = true;\n fatalError = error;\n }\n };\n var readyToStream = false;\n\n function onShellReady() {\n readyToStream = true;\n }\n\n var request = createRequest(children, createResponseState$1(generateStaticMarkup, options ? options.identifierPrefix : undefined), createRootFormatContext(), Infinity, onError, undefined, onShellReady, undefined, undefined);\n startWork(request); // If anything suspended and is still pending, we'll abort it before writing.\n // That way we write only client-rendered boundaries from the start.\n\n abort(request, abortReason);\n startFlowing(request, destination);\n\n if (didFatal) {\n throw fatalError;\n }\n\n if (!readyToStream) {\n // Note: This error message is the one we use on the client. It doesn't\n // really make sense here. But this is the legacy server renderer, anyway.\n // We're going to delete it soon.\n throw new Error('A component suspended while responding to synchronous input. This ' + 'will cause the UI to be replaced with a loading indicator. To fix, ' + 'updates that suspend should be wrapped with startTransition.');\n }\n\n return result;\n}\n\nfunction _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n}\n\nvar ReactMarkupReadableStream = /*#__PURE__*/function (_Readable) {\n _inheritsLoose(ReactMarkupReadableStream, _Readable);\n\n function ReactMarkupReadableStream() {\n var _this;\n\n // Calls the stream.Readable(options) constructor. Consider exposing built-in\n // features like highWaterMark in the future.\n _this = _Readable.call(this, {}) || this;\n _this.request = null;\n _this.startedFlowing = false;\n return _this;\n }\n\n var _proto = ReactMarkupReadableStream.prototype;\n\n _proto._destroy = function _destroy(err, callback) {\n abort(this.request); // $FlowFixMe: The type definition for the callback should allow undefined and null.\n\n callback(err);\n };\n\n _proto._read = function _read(size) {\n if (this.startedFlowing) {\n startFlowing(this.request, this);\n }\n };\n\n return ReactMarkupReadableStream;\n}(stream.Readable);\n\nfunction onError$1() {// Non-fatal errors are ignored.\n}\n\nfunction renderToNodeStreamImpl(children, options, generateStaticMarkup) {\n function onAllReady() {\n // We wait until everything has loaded before starting to write.\n // That way we only end up with fully resolved HTML even if we suspend.\n destination.startedFlowing = true;\n startFlowing(request, destination);\n }\n\n var destination = new ReactMarkupReadableStream();\n var request = createRequest(children, createResponseState$1(false, options ? options.identifierPrefix : undefined), createRootFormatContext(), Infinity, onError$1, onAllReady, undefined, undefined);\n destination.request = request;\n startWork(request);\n return destination;\n}\n\nfunction renderToNodeStream(children, options) {\n {\n error('renderToNodeStream is deprecated. Use renderToPipeableStream instead.');\n }\n\n return renderToNodeStreamImpl(children, options);\n}\n\nfunction renderToStaticNodeStream(children, options) {\n {\n error('ReactDOMServer.renderToStaticNodeStream() is deprecated.' + ' Use ReactDOMServer.renderToPipeableStream() and wait to `pipe` until the `onAllReady`' + ' callback has been called instead.');\n }\n\n return renderToNodeStreamImpl(children, options);\n}\n\nfunction renderToString(children, options) {\n return renderToStringImpl(children, options, false, 'The server used \"renderToString\" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to \"renderToPipeableStream\" which supports Suspense on the server');\n}\n\nfunction renderToStaticMarkup(children, options) {\n return renderToStringImpl(children, options, true, 'The server used \"renderToStaticMarkup\" which does not support Suspense. If you intended to have the server wait for the suspended component please switch to \"renderToPipeableStream\" which supports Suspense on the server');\n}\n\nexports.renderToNodeStream = renderToNodeStream;\nexports.renderToStaticMarkup = renderToStaticMarkup;\nexports.renderToStaticNodeStream = renderToStaticNodeStream;\nexports.renderToString = renderToString;\nexports.version = ReactVersion;\n })();\n}\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/react-dom/cjs/react-dom-server-legacy.node.development.js?", + ); + + /***/ + }, + + /***/ 3771: /***/ (__unused_webpack_module, exports, __webpack_require__) => { + 'use strict'; + eval( + "/**\n * @license React\n * react-dom-server.node.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\nif (true) {\n (function() {\n'use strict';\n\nvar React = __webpack_require__(6540);\nvar util = __webpack_require__(9023);\n\nvar ReactVersion = '18.3.1';\n\nvar ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n\n// by calls to these methods by a Babel plugin.\n//\n// In PROD (or in packages without access to React internals),\n// they are left as they are instead.\n\nfunction warn(format) {\n {\n {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n printWarning('warn', format, args);\n }\n }\n}\nfunction error(format) {\n {\n {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n printWarning('error', format, args);\n }\n }\n}\n\nfunction printWarning(level, format, args) {\n // When changing this logic, you might want to also\n // update consoleWithStackDev.www.js as well.\n {\n var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n var stack = ReactDebugCurrentFrame.getStackAddendum();\n\n if (stack !== '') {\n format += '%s';\n args = args.concat([stack]);\n } // eslint-disable-next-line react-internal/safe-string-coercion\n\n\n var argsWithFormat = args.map(function (item) {\n return String(item);\n }); // Careful: RN currently depends on this prefix\n\n argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it\n // breaks IE9: https://github.com/facebook/react/issues/13610\n // eslint-disable-next-line react-internal/no-production-logging\n\n Function.prototype.apply.call(console[level], console, argsWithFormat);\n }\n}\n\nfunction scheduleWork(callback) {\n setImmediate(callback);\n}\nfunction flushBuffered(destination) {\n // If we don't have any more data to send right now.\n // Flush whatever is in the buffer to the wire.\n if (typeof destination.flush === 'function') {\n // By convention the Zlib streams provide a flush function for this purpose.\n // For Express, compression middleware adds this method.\n destination.flush();\n }\n}\nvar VIEW_SIZE = 2048;\nvar currentView = null;\nvar writtenBytes = 0;\nvar destinationHasCapacity = true;\nfunction beginWriting(destination) {\n currentView = new Uint8Array(VIEW_SIZE);\n writtenBytes = 0;\n destinationHasCapacity = true;\n}\n\nfunction writeStringChunk(destination, stringChunk) {\n if (stringChunk.length === 0) {\n return;\n } // maximum possible view needed to encode entire string\n\n\n if (stringChunk.length * 3 > VIEW_SIZE) {\n if (writtenBytes > 0) {\n writeToDestination(destination, currentView.subarray(0, writtenBytes));\n currentView = new Uint8Array(VIEW_SIZE);\n writtenBytes = 0;\n }\n\n writeToDestination(destination, textEncoder.encode(stringChunk));\n return;\n }\n\n var target = currentView;\n\n if (writtenBytes > 0) {\n target = currentView.subarray(writtenBytes);\n }\n\n var _textEncoder$encodeIn = textEncoder.encodeInto(stringChunk, target),\n read = _textEncoder$encodeIn.read,\n written = _textEncoder$encodeIn.written;\n\n writtenBytes += written;\n\n if (read < stringChunk.length) {\n writeToDestination(destination, currentView);\n currentView = new Uint8Array(VIEW_SIZE);\n writtenBytes = textEncoder.encodeInto(stringChunk.slice(read), currentView).written;\n }\n\n if (writtenBytes === VIEW_SIZE) {\n writeToDestination(destination, currentView);\n currentView = new Uint8Array(VIEW_SIZE);\n writtenBytes = 0;\n }\n}\n\nfunction writeViewChunk(destination, chunk) {\n if (chunk.byteLength === 0) {\n return;\n }\n\n if (chunk.byteLength > VIEW_SIZE) {\n // this chunk may overflow a single view which implies it was not\n // one that is cached by the streaming renderer. We will enqueu\n // it directly and expect it is not re-used\n if (writtenBytes > 0) {\n writeToDestination(destination, currentView.subarray(0, writtenBytes));\n currentView = new Uint8Array(VIEW_SIZE);\n writtenBytes = 0;\n }\n\n writeToDestination(destination, chunk);\n return;\n }\n\n var bytesToWrite = chunk;\n var allowableBytes = currentView.length - writtenBytes;\n\n if (allowableBytes < bytesToWrite.byteLength) {\n // this chunk would overflow the current view. We enqueue a full view\n // and start a new view with the remaining chunk\n if (allowableBytes === 0) {\n // the current view is already full, send it\n writeToDestination(destination, currentView);\n } else {\n // fill up the current view and apply the remaining chunk bytes\n // to a new view.\n currentView.set(bytesToWrite.subarray(0, allowableBytes), writtenBytes);\n writtenBytes += allowableBytes;\n writeToDestination(destination, currentView);\n bytesToWrite = bytesToWrite.subarray(allowableBytes);\n }\n\n currentView = new Uint8Array(VIEW_SIZE);\n writtenBytes = 0;\n }\n\n currentView.set(bytesToWrite, writtenBytes);\n writtenBytes += bytesToWrite.byteLength;\n\n if (writtenBytes === VIEW_SIZE) {\n writeToDestination(destination, currentView);\n currentView = new Uint8Array(VIEW_SIZE);\n writtenBytes = 0;\n }\n}\n\nfunction writeChunk(destination, chunk) {\n if (typeof chunk === 'string') {\n writeStringChunk(destination, chunk);\n } else {\n writeViewChunk(destination, chunk);\n }\n}\n\nfunction writeToDestination(destination, view) {\n var currentHasCapacity = destination.write(view);\n destinationHasCapacity = destinationHasCapacity && currentHasCapacity;\n}\n\nfunction writeChunkAndReturn(destination, chunk) {\n writeChunk(destination, chunk);\n return destinationHasCapacity;\n}\nfunction completeWriting(destination) {\n if (currentView && writtenBytes > 0) {\n destination.write(currentView.subarray(0, writtenBytes));\n }\n\n currentView = null;\n writtenBytes = 0;\n destinationHasCapacity = true;\n}\nfunction close(destination) {\n destination.end();\n}\nvar textEncoder = new util.TextEncoder();\nfunction stringToChunk(content) {\n return content;\n}\nfunction stringToPrecomputedChunk(content) {\n return textEncoder.encode(content);\n}\nfunction closeWithError(destination, error) {\n // $FlowFixMe: This is an Error object or the destination accepts other types.\n destination.destroy(error);\n}\n\n/*\n * The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol\n * and Temporal.* types. See https://github.com/facebook/react/pull/22064.\n *\n * The functions in this module will throw an easier-to-understand,\n * easier-to-debug exception with a clear errors message message explaining the\n * problem. (Instead of a confusing exception thrown inside the implementation\n * of the `value` object).\n */\n// $FlowFixMe only called in DEV, so void return is not possible.\nfunction typeName(value) {\n {\n // toStringTag is needed for namespaced types like Temporal.Instant\n var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;\n var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object';\n return type;\n }\n} // $FlowFixMe only called in DEV, so void return is not possible.\n\n\nfunction willCoercionThrow(value) {\n {\n try {\n testStringCoercion(value);\n return false;\n } catch (e) {\n return true;\n }\n }\n}\n\nfunction testStringCoercion(value) {\n // If you ended up here by following an exception call stack, here's what's\n // happened: you supplied an object or symbol value to React (as a prop, key,\n // DOM attribute, CSS property, string ref, etc.) and when React tried to\n // coerce it to a string using `'' + value`, an exception was thrown.\n //\n // The most common types that will cause this exception are `Symbol` instances\n // and Temporal objects like `Temporal.Instant`. But any object that has a\n // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this\n // exception. (Library authors do this to prevent users from using built-in\n // numeric operators like `+` or comparison operators like `>=` because custom\n // methods are needed to perform accurate arithmetic or comparison.)\n //\n // To fix the problem, coerce this object or symbol value to a string before\n // passing it to React. The most reliable way is usually `String(value)`.\n //\n // To find which value is throwing, check the browser or debugger console.\n // Before this exception was thrown, there should be `console.error` output\n // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the\n // problem and how that type was used: key, atrribute, input value prop, etc.\n // In most cases, this console output also shows the component and its\n // ancestor components where the exception happened.\n //\n // eslint-disable-next-line react-internal/safe-string-coercion\n return '' + value;\n}\n\nfunction checkAttributeStringCoercion(value, attributeName) {\n {\n if (willCoercionThrow(value)) {\n error('The provided `%s` attribute is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', attributeName, typeName(value));\n\n return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n }\n }\n}\nfunction checkCSSPropertyStringCoercion(value, propName) {\n {\n if (willCoercionThrow(value)) {\n error('The provided `%s` CSS property is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', propName, typeName(value));\n\n return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n }\n }\n}\nfunction checkHtmlStringCoercion(value) {\n {\n if (willCoercionThrow(value)) {\n error('The provided HTML markup uses a value of unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));\n\n return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n }\n }\n}\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\n// A reserved attribute.\n// It is handled by React separately and shouldn't be written to the DOM.\nvar RESERVED = 0; // A simple string attribute.\n// Attributes that aren't in the filter are presumed to have this type.\n\nvar STRING = 1; // A string attribute that accepts booleans in React. In HTML, these are called\n// \"enumerated\" attributes with \"true\" and \"false\" as possible values.\n// When true, it should be set to a \"true\" string.\n// When false, it should be set to a \"false\" string.\n\nvar BOOLEANISH_STRING = 2; // A real boolean attribute.\n// When true, it should be present (set either to an empty string or its name).\n// When false, it should be omitted.\n\nvar BOOLEAN = 3; // An attribute that can be used as a flag as well as with a value.\n// When true, it should be present (set either to an empty string or its name).\n// When false, it should be omitted.\n// For any other value, should be present with that value.\n\nvar OVERLOADED_BOOLEAN = 4; // An attribute that must be numeric or parse as a numeric.\n// When falsy, it should be removed.\n\nvar NUMERIC = 5; // An attribute that must be positive numeric or parse as a positive numeric.\n// When falsy, it should be removed.\n\nvar POSITIVE_NUMERIC = 6;\n\n/* eslint-disable max-len */\nvar ATTRIBUTE_NAME_START_CHAR = \":A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD\";\n/* eslint-enable max-len */\n\nvar ATTRIBUTE_NAME_CHAR = ATTRIBUTE_NAME_START_CHAR + \"\\\\-.0-9\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040\";\nvar VALID_ATTRIBUTE_NAME_REGEX = new RegExp('^[' + ATTRIBUTE_NAME_START_CHAR + '][' + ATTRIBUTE_NAME_CHAR + ']*$');\nvar illegalAttributeNameCache = {};\nvar validatedAttributeNameCache = {};\nfunction isAttributeNameSafe(attributeName) {\n if (hasOwnProperty.call(validatedAttributeNameCache, attributeName)) {\n return true;\n }\n\n if (hasOwnProperty.call(illegalAttributeNameCache, attributeName)) {\n return false;\n }\n\n if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) {\n validatedAttributeNameCache[attributeName] = true;\n return true;\n }\n\n illegalAttributeNameCache[attributeName] = true;\n\n {\n error('Invalid attribute name: `%s`', attributeName);\n }\n\n return false;\n}\nfunction shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag) {\n if (propertyInfo !== null && propertyInfo.type === RESERVED) {\n return false;\n }\n\n switch (typeof value) {\n case 'function': // $FlowIssue symbol is perfectly valid here\n\n case 'symbol':\n // eslint-disable-line\n return true;\n\n case 'boolean':\n {\n if (isCustomComponentTag) {\n return false;\n }\n\n if (propertyInfo !== null) {\n return !propertyInfo.acceptsBooleans;\n } else {\n var prefix = name.toLowerCase().slice(0, 5);\n return prefix !== 'data-' && prefix !== 'aria-';\n }\n }\n\n default:\n return false;\n }\n}\nfunction getPropertyInfo(name) {\n return properties.hasOwnProperty(name) ? properties[name] : null;\n}\n\nfunction PropertyInfoRecord(name, type, mustUseProperty, attributeName, attributeNamespace, sanitizeURL, removeEmptyString) {\n this.acceptsBooleans = type === BOOLEANISH_STRING || type === BOOLEAN || type === OVERLOADED_BOOLEAN;\n this.attributeName = attributeName;\n this.attributeNamespace = attributeNamespace;\n this.mustUseProperty = mustUseProperty;\n this.propertyName = name;\n this.type = type;\n this.sanitizeURL = sanitizeURL;\n this.removeEmptyString = removeEmptyString;\n} // When adding attributes to this list, be sure to also add them to\n// the `possibleStandardNames` module to ensure casing and incorrect\n// name warnings.\n\n\nvar properties = {}; // These props are reserved by React. They shouldn't be written to the DOM.\n\nvar reservedProps = ['children', 'dangerouslySetInnerHTML', // TODO: This prevents the assignment of defaultValue to regular\n// elements (not just inputs). Now that ReactDOMInput assigns to the\n// defaultValue property -- do we need this?\n'defaultValue', 'defaultChecked', 'innerHTML', 'suppressContentEditableWarning', 'suppressHydrationWarning', 'style'];\n\nreservedProps.forEach(function (name) {\n properties[name] = new PropertyInfoRecord(name, RESERVED, false, // mustUseProperty\n name, // attributeName\n null, // attributeNamespace\n false, // sanitizeURL\n false);\n}); // A few React string attributes have a different name.\n// This is a mapping from React prop names to the attribute names.\n\n[['acceptCharset', 'accept-charset'], ['className', 'class'], ['htmlFor', 'for'], ['httpEquiv', 'http-equiv']].forEach(function (_ref) {\n var name = _ref[0],\n attributeName = _ref[1];\n properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty\n attributeName, // attributeName\n null, // attributeNamespace\n false, // sanitizeURL\n false);\n}); // These are \"enumerated\" HTML attributes that accept \"true\" and \"false\".\n// In React, we let users pass `true` and `false` even though technically\n// these aren't boolean attributes (they are coerced to strings).\n\n['contentEditable', 'draggable', 'spellCheck', 'value'].forEach(function (name) {\n properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty\n name.toLowerCase(), // attributeName\n null, // attributeNamespace\n false, // sanitizeURL\n false);\n}); // These are \"enumerated\" SVG attributes that accept \"true\" and \"false\".\n// In React, we let users pass `true` and `false` even though technically\n// these aren't boolean attributes (they are coerced to strings).\n// Since these are SVG attributes, their attribute names are case-sensitive.\n\n['autoReverse', 'externalResourcesRequired', 'focusable', 'preserveAlpha'].forEach(function (name) {\n properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty\n name, // attributeName\n null, // attributeNamespace\n false, // sanitizeURL\n false);\n}); // These are HTML boolean attributes.\n\n['allowFullScreen', 'async', // Note: there is a special case that prevents it from being written to the DOM\n// on the client side because the browsers are inconsistent. Instead we call focus().\n'autoFocus', 'autoPlay', 'controls', 'default', 'defer', 'disabled', 'disablePictureInPicture', 'disableRemotePlayback', 'formNoValidate', 'hidden', 'loop', 'noModule', 'noValidate', 'open', 'playsInline', 'readOnly', 'required', 'reversed', 'scoped', 'seamless', // Microdata\n'itemScope'].forEach(function (name) {\n properties[name] = new PropertyInfoRecord(name, BOOLEAN, false, // mustUseProperty\n name.toLowerCase(), // attributeName\n null, // attributeNamespace\n false, // sanitizeURL\n false);\n}); // These are the few React props that we set as DOM properties\n// rather than attributes. These are all booleans.\n\n['checked', // Note: `option.selected` is not updated if `select.multiple` is\n// disabled with `removeAttribute`. We have special logic for handling this.\n'multiple', 'muted', 'selected' // NOTE: if you add a camelCased prop to this list,\n// you'll need to set attributeName to name.toLowerCase()\n// instead in the assignment below.\n].forEach(function (name) {\n properties[name] = new PropertyInfoRecord(name, BOOLEAN, true, // mustUseProperty\n name, // attributeName\n null, // attributeNamespace\n false, // sanitizeURL\n false);\n}); // These are HTML attributes that are \"overloaded booleans\": they behave like\n// booleans, but can also accept a string value.\n\n['capture', 'download' // NOTE: if you add a camelCased prop to this list,\n// you'll need to set attributeName to name.toLowerCase()\n// instead in the assignment below.\n].forEach(function (name) {\n properties[name] = new PropertyInfoRecord(name, OVERLOADED_BOOLEAN, false, // mustUseProperty\n name, // attributeName\n null, // attributeNamespace\n false, // sanitizeURL\n false);\n}); // These are HTML attributes that must be positive numbers.\n\n['cols', 'rows', 'size', 'span' // NOTE: if you add a camelCased prop to this list,\n// you'll need to set attributeName to name.toLowerCase()\n// instead in the assignment below.\n].forEach(function (name) {\n properties[name] = new PropertyInfoRecord(name, POSITIVE_NUMERIC, false, // mustUseProperty\n name, // attributeName\n null, // attributeNamespace\n false, // sanitizeURL\n false);\n}); // These are HTML attributes that must be numbers.\n\n['rowSpan', 'start'].forEach(function (name) {\n properties[name] = new PropertyInfoRecord(name, NUMERIC, false, // mustUseProperty\n name.toLowerCase(), // attributeName\n null, // attributeNamespace\n false, // sanitizeURL\n false);\n});\nvar CAMELIZE = /[\\-\\:]([a-z])/g;\n\nvar capitalize = function (token) {\n return token[1].toUpperCase();\n}; // This is a list of all SVG attributes that need special casing, namespacing,\n// or boolean value assignment. Regular attributes that just accept strings\n// and have the same names are omitted, just like in the HTML attribute filter.\n// Some of these attributes can be hard to find. This list was created by\n// scraping the MDN documentation.\n\n\n['accent-height', 'alignment-baseline', 'arabic-form', 'baseline-shift', 'cap-height', 'clip-path', 'clip-rule', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'dominant-baseline', 'enable-background', 'fill-opacity', 'fill-rule', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'glyph-name', 'glyph-orientation-horizontal', 'glyph-orientation-vertical', 'horiz-adv-x', 'horiz-origin-x', 'image-rendering', 'letter-spacing', 'lighting-color', 'marker-end', 'marker-mid', 'marker-start', 'overline-position', 'overline-thickness', 'paint-order', 'panose-1', 'pointer-events', 'rendering-intent', 'shape-rendering', 'stop-color', 'stop-opacity', 'strikethrough-position', 'strikethrough-thickness', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke-width', 'text-anchor', 'text-decoration', 'text-rendering', 'underline-position', 'underline-thickness', 'unicode-bidi', 'unicode-range', 'units-per-em', 'v-alphabetic', 'v-hanging', 'v-ideographic', 'v-mathematical', 'vector-effect', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'word-spacing', 'writing-mode', 'xmlns:xlink', 'x-height' // NOTE: if you add a camelCased prop to this list,\n// you'll need to set attributeName to name.toLowerCase()\n// instead in the assignment below.\n].forEach(function (attributeName) {\n var name = attributeName.replace(CAMELIZE, capitalize);\n properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty\n attributeName, null, // attributeNamespace\n false, // sanitizeURL\n false);\n}); // String SVG attributes with the xlink namespace.\n\n['xlink:actuate', 'xlink:arcrole', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type' // NOTE: if you add a camelCased prop to this list,\n// you'll need to set attributeName to name.toLowerCase()\n// instead in the assignment below.\n].forEach(function (attributeName) {\n var name = attributeName.replace(CAMELIZE, capitalize);\n properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty\n attributeName, 'http://www.w3.org/1999/xlink', false, // sanitizeURL\n false);\n}); // String SVG attributes with the xml namespace.\n\n['xml:base', 'xml:lang', 'xml:space' // NOTE: if you add a camelCased prop to this list,\n// you'll need to set attributeName to name.toLowerCase()\n// instead in the assignment below.\n].forEach(function (attributeName) {\n var name = attributeName.replace(CAMELIZE, capitalize);\n properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty\n attributeName, 'http://www.w3.org/XML/1998/namespace', false, // sanitizeURL\n false);\n}); // These attribute exists both in HTML and SVG.\n// The attribute name is case-sensitive in SVG so we can't just use\n// the React name like we do for attributes that exist only in HTML.\n\n['tabIndex', 'crossOrigin'].forEach(function (attributeName) {\n properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, // mustUseProperty\n attributeName.toLowerCase(), // attributeName\n null, // attributeNamespace\n false, // sanitizeURL\n false);\n}); // These attributes accept URLs. These must not allow javascript: URLS.\n// These will also need to accept Trusted Types object in the future.\n\nvar xlinkHref = 'xlinkHref';\nproperties[xlinkHref] = new PropertyInfoRecord('xlinkHref', STRING, false, // mustUseProperty\n'xlink:href', 'http://www.w3.org/1999/xlink', true, // sanitizeURL\nfalse);\n['src', 'href', 'action', 'formAction'].forEach(function (attributeName) {\n properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, // mustUseProperty\n attributeName.toLowerCase(), // attributeName\n null, // attributeNamespace\n true, // sanitizeURL\n true);\n});\n\n/**\n * CSS properties which accept numbers but are not in units of \"px\".\n */\nvar isUnitlessNumber = {\n animationIterationCount: true,\n aspectRatio: true,\n borderImageOutset: true,\n borderImageSlice: true,\n borderImageWidth: true,\n boxFlex: true,\n boxFlexGroup: true,\n boxOrdinalGroup: true,\n columnCount: true,\n columns: true,\n flex: true,\n flexGrow: true,\n flexPositive: true,\n flexShrink: true,\n flexNegative: true,\n flexOrder: true,\n gridArea: true,\n gridRow: true,\n gridRowEnd: true,\n gridRowSpan: true,\n gridRowStart: true,\n gridColumn: true,\n gridColumnEnd: true,\n gridColumnSpan: true,\n gridColumnStart: true,\n fontWeight: true,\n lineClamp: true,\n lineHeight: true,\n opacity: true,\n order: true,\n orphans: true,\n tabSize: true,\n widows: true,\n zIndex: true,\n zoom: true,\n // SVG-related properties\n fillOpacity: true,\n floodOpacity: true,\n stopOpacity: true,\n strokeDasharray: true,\n strokeDashoffset: true,\n strokeMiterlimit: true,\n strokeOpacity: true,\n strokeWidth: true\n};\n/**\n * @param {string} prefix vendor-specific prefix, eg: Webkit\n * @param {string} key style name, eg: transitionDuration\n * @return {string} style name prefixed with `prefix`, properly camelCased, eg:\n * WebkitTransitionDuration\n */\n\nfunction prefixKey(prefix, key) {\n return prefix + key.charAt(0).toUpperCase() + key.substring(1);\n}\n/**\n * Support style names that may come passed in prefixed by adding permutations\n * of vendor prefixes.\n */\n\n\nvar prefixes = ['Webkit', 'ms', 'Moz', 'O']; // Using Object.keys here, or else the vanilla for-in loop makes IE8 go into an\n// infinite loop, because it iterates over the newly added props too.\n\nObject.keys(isUnitlessNumber).forEach(function (prop) {\n prefixes.forEach(function (prefix) {\n isUnitlessNumber[prefixKey(prefix, prop)] = isUnitlessNumber[prop];\n });\n});\n\nvar hasReadOnlyValue = {\n button: true,\n checkbox: true,\n image: true,\n hidden: true,\n radio: true,\n reset: true,\n submit: true\n};\nfunction checkControlledValueProps(tagName, props) {\n {\n if (!(hasReadOnlyValue[props.type] || props.onChange || props.onInput || props.readOnly || props.disabled || props.value == null)) {\n error('You provided a `value` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultValue`. Otherwise, ' + 'set either `onChange` or `readOnly`.');\n }\n\n if (!(props.onChange || props.readOnly || props.disabled || props.checked == null)) {\n error('You provided a `checked` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultChecked`. Otherwise, ' + 'set either `onChange` or `readOnly`.');\n }\n }\n}\n\nfunction isCustomComponent(tagName, props) {\n if (tagName.indexOf('-') === -1) {\n return typeof props.is === 'string';\n }\n\n switch (tagName) {\n // These are reserved SVG and MathML elements.\n // We don't mind this list too much because we expect it to never grow.\n // The alternative is to track the namespace in a few places which is convoluted.\n // https://w3c.github.io/webcomponents/spec/custom/#custom-elements-core-concepts\n case 'annotation-xml':\n case 'color-profile':\n case 'font-face':\n case 'font-face-src':\n case 'font-face-uri':\n case 'font-face-format':\n case 'font-face-name':\n case 'missing-glyph':\n return false;\n\n default:\n return true;\n }\n}\n\nvar ariaProperties = {\n 'aria-current': 0,\n // state\n 'aria-description': 0,\n 'aria-details': 0,\n 'aria-disabled': 0,\n // state\n 'aria-hidden': 0,\n // state\n 'aria-invalid': 0,\n // state\n 'aria-keyshortcuts': 0,\n 'aria-label': 0,\n 'aria-roledescription': 0,\n // Widget Attributes\n 'aria-autocomplete': 0,\n 'aria-checked': 0,\n 'aria-expanded': 0,\n 'aria-haspopup': 0,\n 'aria-level': 0,\n 'aria-modal': 0,\n 'aria-multiline': 0,\n 'aria-multiselectable': 0,\n 'aria-orientation': 0,\n 'aria-placeholder': 0,\n 'aria-pressed': 0,\n 'aria-readonly': 0,\n 'aria-required': 0,\n 'aria-selected': 0,\n 'aria-sort': 0,\n 'aria-valuemax': 0,\n 'aria-valuemin': 0,\n 'aria-valuenow': 0,\n 'aria-valuetext': 0,\n // Live Region Attributes\n 'aria-atomic': 0,\n 'aria-busy': 0,\n 'aria-live': 0,\n 'aria-relevant': 0,\n // Drag-and-Drop Attributes\n 'aria-dropeffect': 0,\n 'aria-grabbed': 0,\n // Relationship Attributes\n 'aria-activedescendant': 0,\n 'aria-colcount': 0,\n 'aria-colindex': 0,\n 'aria-colspan': 0,\n 'aria-controls': 0,\n 'aria-describedby': 0,\n 'aria-errormessage': 0,\n 'aria-flowto': 0,\n 'aria-labelledby': 0,\n 'aria-owns': 0,\n 'aria-posinset': 0,\n 'aria-rowcount': 0,\n 'aria-rowindex': 0,\n 'aria-rowspan': 0,\n 'aria-setsize': 0\n};\n\nvar warnedProperties = {};\nvar rARIA = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$');\nvar rARIACamel = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$');\n\nfunction validateProperty(tagName, name) {\n {\n if (hasOwnProperty.call(warnedProperties, name) && warnedProperties[name]) {\n return true;\n }\n\n if (rARIACamel.test(name)) {\n var ariaName = 'aria-' + name.slice(4).toLowerCase();\n var correctName = ariaProperties.hasOwnProperty(ariaName) ? ariaName : null; // If this is an aria-* attribute, but is not listed in the known DOM\n // DOM properties, then it is an invalid aria-* attribute.\n\n if (correctName == null) {\n error('Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.', name);\n\n warnedProperties[name] = true;\n return true;\n } // aria-* attributes should be lowercase; suggest the lowercase version.\n\n\n if (name !== correctName) {\n error('Invalid ARIA attribute `%s`. Did you mean `%s`?', name, correctName);\n\n warnedProperties[name] = true;\n return true;\n }\n }\n\n if (rARIA.test(name)) {\n var lowerCasedName = name.toLowerCase();\n var standardName = ariaProperties.hasOwnProperty(lowerCasedName) ? lowerCasedName : null; // If this is an aria-* attribute, but is not listed in the known DOM\n // DOM properties, then it is an invalid aria-* attribute.\n\n if (standardName == null) {\n warnedProperties[name] = true;\n return false;\n } // aria-* attributes should be lowercase; suggest the lowercase version.\n\n\n if (name !== standardName) {\n error('Unknown ARIA attribute `%s`. Did you mean `%s`?', name, standardName);\n\n warnedProperties[name] = true;\n return true;\n }\n }\n }\n\n return true;\n}\n\nfunction warnInvalidARIAProps(type, props) {\n {\n var invalidProps = [];\n\n for (var key in props) {\n var isValid = validateProperty(type, key);\n\n if (!isValid) {\n invalidProps.push(key);\n }\n }\n\n var unknownPropString = invalidProps.map(function (prop) {\n return '`' + prop + '`';\n }).join(', ');\n\n if (invalidProps.length === 1) {\n error('Invalid aria prop %s on <%s> tag. ' + 'For details, see https://reactjs.org/link/invalid-aria-props', unknownPropString, type);\n } else if (invalidProps.length > 1) {\n error('Invalid aria props %s on <%s> tag. ' + 'For details, see https://reactjs.org/link/invalid-aria-props', unknownPropString, type);\n }\n }\n}\n\nfunction validateProperties(type, props) {\n if (isCustomComponent(type, props)) {\n return;\n }\n\n warnInvalidARIAProps(type, props);\n}\n\nvar didWarnValueNull = false;\nfunction validateProperties$1(type, props) {\n {\n if (type !== 'input' && type !== 'textarea' && type !== 'select') {\n return;\n }\n\n if (props != null && props.value === null && !didWarnValueNull) {\n didWarnValueNull = true;\n\n if (type === 'select' && props.multiple) {\n error('`value` prop on `%s` should not be null. ' + 'Consider using an empty array when `multiple` is set to `true` ' + 'to clear the component or `undefined` for uncontrolled components.', type);\n } else {\n error('`value` prop on `%s` should not be null. ' + 'Consider using an empty string to clear the component or `undefined` ' + 'for uncontrolled components.', type);\n }\n }\n }\n}\n\n// When adding attributes to the HTML or SVG allowed attribute list, be sure to\n// also add them to this module to ensure casing and incorrect name\n// warnings.\nvar possibleStandardNames = {\n // HTML\n accept: 'accept',\n acceptcharset: 'acceptCharset',\n 'accept-charset': 'acceptCharset',\n accesskey: 'accessKey',\n action: 'action',\n allowfullscreen: 'allowFullScreen',\n alt: 'alt',\n as: 'as',\n async: 'async',\n autocapitalize: 'autoCapitalize',\n autocomplete: 'autoComplete',\n autocorrect: 'autoCorrect',\n autofocus: 'autoFocus',\n autoplay: 'autoPlay',\n autosave: 'autoSave',\n capture: 'capture',\n cellpadding: 'cellPadding',\n cellspacing: 'cellSpacing',\n challenge: 'challenge',\n charset: 'charSet',\n checked: 'checked',\n children: 'children',\n cite: 'cite',\n class: 'className',\n classid: 'classID',\n classname: 'className',\n cols: 'cols',\n colspan: 'colSpan',\n content: 'content',\n contenteditable: 'contentEditable',\n contextmenu: 'contextMenu',\n controls: 'controls',\n controlslist: 'controlsList',\n coords: 'coords',\n crossorigin: 'crossOrigin',\n dangerouslysetinnerhtml: 'dangerouslySetInnerHTML',\n data: 'data',\n datetime: 'dateTime',\n default: 'default',\n defaultchecked: 'defaultChecked',\n defaultvalue: 'defaultValue',\n defer: 'defer',\n dir: 'dir',\n disabled: 'disabled',\n disablepictureinpicture: 'disablePictureInPicture',\n disableremoteplayback: 'disableRemotePlayback',\n download: 'download',\n draggable: 'draggable',\n enctype: 'encType',\n enterkeyhint: 'enterKeyHint',\n for: 'htmlFor',\n form: 'form',\n formmethod: 'formMethod',\n formaction: 'formAction',\n formenctype: 'formEncType',\n formnovalidate: 'formNoValidate',\n formtarget: 'formTarget',\n frameborder: 'frameBorder',\n headers: 'headers',\n height: 'height',\n hidden: 'hidden',\n high: 'high',\n href: 'href',\n hreflang: 'hrefLang',\n htmlfor: 'htmlFor',\n httpequiv: 'httpEquiv',\n 'http-equiv': 'httpEquiv',\n icon: 'icon',\n id: 'id',\n imagesizes: 'imageSizes',\n imagesrcset: 'imageSrcSet',\n innerhtml: 'innerHTML',\n inputmode: 'inputMode',\n integrity: 'integrity',\n is: 'is',\n itemid: 'itemID',\n itemprop: 'itemProp',\n itemref: 'itemRef',\n itemscope: 'itemScope',\n itemtype: 'itemType',\n keyparams: 'keyParams',\n keytype: 'keyType',\n kind: 'kind',\n label: 'label',\n lang: 'lang',\n list: 'list',\n loop: 'loop',\n low: 'low',\n manifest: 'manifest',\n marginwidth: 'marginWidth',\n marginheight: 'marginHeight',\n max: 'max',\n maxlength: 'maxLength',\n media: 'media',\n mediagroup: 'mediaGroup',\n method: 'method',\n min: 'min',\n minlength: 'minLength',\n multiple: 'multiple',\n muted: 'muted',\n name: 'name',\n nomodule: 'noModule',\n nonce: 'nonce',\n novalidate: 'noValidate',\n open: 'open',\n optimum: 'optimum',\n pattern: 'pattern',\n placeholder: 'placeholder',\n playsinline: 'playsInline',\n poster: 'poster',\n preload: 'preload',\n profile: 'profile',\n radiogroup: 'radioGroup',\n readonly: 'readOnly',\n referrerpolicy: 'referrerPolicy',\n rel: 'rel',\n required: 'required',\n reversed: 'reversed',\n role: 'role',\n rows: 'rows',\n rowspan: 'rowSpan',\n sandbox: 'sandbox',\n scope: 'scope',\n scoped: 'scoped',\n scrolling: 'scrolling',\n seamless: 'seamless',\n selected: 'selected',\n shape: 'shape',\n size: 'size',\n sizes: 'sizes',\n span: 'span',\n spellcheck: 'spellCheck',\n src: 'src',\n srcdoc: 'srcDoc',\n srclang: 'srcLang',\n srcset: 'srcSet',\n start: 'start',\n step: 'step',\n style: 'style',\n summary: 'summary',\n tabindex: 'tabIndex',\n target: 'target',\n title: 'title',\n type: 'type',\n usemap: 'useMap',\n value: 'value',\n width: 'width',\n wmode: 'wmode',\n wrap: 'wrap',\n // SVG\n about: 'about',\n accentheight: 'accentHeight',\n 'accent-height': 'accentHeight',\n accumulate: 'accumulate',\n additive: 'additive',\n alignmentbaseline: 'alignmentBaseline',\n 'alignment-baseline': 'alignmentBaseline',\n allowreorder: 'allowReorder',\n alphabetic: 'alphabetic',\n amplitude: 'amplitude',\n arabicform: 'arabicForm',\n 'arabic-form': 'arabicForm',\n ascent: 'ascent',\n attributename: 'attributeName',\n attributetype: 'attributeType',\n autoreverse: 'autoReverse',\n azimuth: 'azimuth',\n basefrequency: 'baseFrequency',\n baselineshift: 'baselineShift',\n 'baseline-shift': 'baselineShift',\n baseprofile: 'baseProfile',\n bbox: 'bbox',\n begin: 'begin',\n bias: 'bias',\n by: 'by',\n calcmode: 'calcMode',\n capheight: 'capHeight',\n 'cap-height': 'capHeight',\n clip: 'clip',\n clippath: 'clipPath',\n 'clip-path': 'clipPath',\n clippathunits: 'clipPathUnits',\n cliprule: 'clipRule',\n 'clip-rule': 'clipRule',\n color: 'color',\n colorinterpolation: 'colorInterpolation',\n 'color-interpolation': 'colorInterpolation',\n colorinterpolationfilters: 'colorInterpolationFilters',\n 'color-interpolation-filters': 'colorInterpolationFilters',\n colorprofile: 'colorProfile',\n 'color-profile': 'colorProfile',\n colorrendering: 'colorRendering',\n 'color-rendering': 'colorRendering',\n contentscripttype: 'contentScriptType',\n contentstyletype: 'contentStyleType',\n cursor: 'cursor',\n cx: 'cx',\n cy: 'cy',\n d: 'd',\n datatype: 'datatype',\n decelerate: 'decelerate',\n descent: 'descent',\n diffuseconstant: 'diffuseConstant',\n direction: 'direction',\n display: 'display',\n divisor: 'divisor',\n dominantbaseline: 'dominantBaseline',\n 'dominant-baseline': 'dominantBaseline',\n dur: 'dur',\n dx: 'dx',\n dy: 'dy',\n edgemode: 'edgeMode',\n elevation: 'elevation',\n enablebackground: 'enableBackground',\n 'enable-background': 'enableBackground',\n end: 'end',\n exponent: 'exponent',\n externalresourcesrequired: 'externalResourcesRequired',\n fill: 'fill',\n fillopacity: 'fillOpacity',\n 'fill-opacity': 'fillOpacity',\n fillrule: 'fillRule',\n 'fill-rule': 'fillRule',\n filter: 'filter',\n filterres: 'filterRes',\n filterunits: 'filterUnits',\n floodopacity: 'floodOpacity',\n 'flood-opacity': 'floodOpacity',\n floodcolor: 'floodColor',\n 'flood-color': 'floodColor',\n focusable: 'focusable',\n fontfamily: 'fontFamily',\n 'font-family': 'fontFamily',\n fontsize: 'fontSize',\n 'font-size': 'fontSize',\n fontsizeadjust: 'fontSizeAdjust',\n 'font-size-adjust': 'fontSizeAdjust',\n fontstretch: 'fontStretch',\n 'font-stretch': 'fontStretch',\n fontstyle: 'fontStyle',\n 'font-style': 'fontStyle',\n fontvariant: 'fontVariant',\n 'font-variant': 'fontVariant',\n fontweight: 'fontWeight',\n 'font-weight': 'fontWeight',\n format: 'format',\n from: 'from',\n fx: 'fx',\n fy: 'fy',\n g1: 'g1',\n g2: 'g2',\n glyphname: 'glyphName',\n 'glyph-name': 'glyphName',\n glyphorientationhorizontal: 'glyphOrientationHorizontal',\n 'glyph-orientation-horizontal': 'glyphOrientationHorizontal',\n glyphorientationvertical: 'glyphOrientationVertical',\n 'glyph-orientation-vertical': 'glyphOrientationVertical',\n glyphref: 'glyphRef',\n gradienttransform: 'gradientTransform',\n gradientunits: 'gradientUnits',\n hanging: 'hanging',\n horizadvx: 'horizAdvX',\n 'horiz-adv-x': 'horizAdvX',\n horizoriginx: 'horizOriginX',\n 'horiz-origin-x': 'horizOriginX',\n ideographic: 'ideographic',\n imagerendering: 'imageRendering',\n 'image-rendering': 'imageRendering',\n in2: 'in2',\n in: 'in',\n inlist: 'inlist',\n intercept: 'intercept',\n k1: 'k1',\n k2: 'k2',\n k3: 'k3',\n k4: 'k4',\n k: 'k',\n kernelmatrix: 'kernelMatrix',\n kernelunitlength: 'kernelUnitLength',\n kerning: 'kerning',\n keypoints: 'keyPoints',\n keysplines: 'keySplines',\n keytimes: 'keyTimes',\n lengthadjust: 'lengthAdjust',\n letterspacing: 'letterSpacing',\n 'letter-spacing': 'letterSpacing',\n lightingcolor: 'lightingColor',\n 'lighting-color': 'lightingColor',\n limitingconeangle: 'limitingConeAngle',\n local: 'local',\n markerend: 'markerEnd',\n 'marker-end': 'markerEnd',\n markerheight: 'markerHeight',\n markermid: 'markerMid',\n 'marker-mid': 'markerMid',\n markerstart: 'markerStart',\n 'marker-start': 'markerStart',\n markerunits: 'markerUnits',\n markerwidth: 'markerWidth',\n mask: 'mask',\n maskcontentunits: 'maskContentUnits',\n maskunits: 'maskUnits',\n mathematical: 'mathematical',\n mode: 'mode',\n numoctaves: 'numOctaves',\n offset: 'offset',\n opacity: 'opacity',\n operator: 'operator',\n order: 'order',\n orient: 'orient',\n orientation: 'orientation',\n origin: 'origin',\n overflow: 'overflow',\n overlineposition: 'overlinePosition',\n 'overline-position': 'overlinePosition',\n overlinethickness: 'overlineThickness',\n 'overline-thickness': 'overlineThickness',\n paintorder: 'paintOrder',\n 'paint-order': 'paintOrder',\n panose1: 'panose1',\n 'panose-1': 'panose1',\n pathlength: 'pathLength',\n patterncontentunits: 'patternContentUnits',\n patterntransform: 'patternTransform',\n patternunits: 'patternUnits',\n pointerevents: 'pointerEvents',\n 'pointer-events': 'pointerEvents',\n points: 'points',\n pointsatx: 'pointsAtX',\n pointsaty: 'pointsAtY',\n pointsatz: 'pointsAtZ',\n prefix: 'prefix',\n preservealpha: 'preserveAlpha',\n preserveaspectratio: 'preserveAspectRatio',\n primitiveunits: 'primitiveUnits',\n property: 'property',\n r: 'r',\n radius: 'radius',\n refx: 'refX',\n refy: 'refY',\n renderingintent: 'renderingIntent',\n 'rendering-intent': 'renderingIntent',\n repeatcount: 'repeatCount',\n repeatdur: 'repeatDur',\n requiredextensions: 'requiredExtensions',\n requiredfeatures: 'requiredFeatures',\n resource: 'resource',\n restart: 'restart',\n result: 'result',\n results: 'results',\n rotate: 'rotate',\n rx: 'rx',\n ry: 'ry',\n scale: 'scale',\n security: 'security',\n seed: 'seed',\n shaperendering: 'shapeRendering',\n 'shape-rendering': 'shapeRendering',\n slope: 'slope',\n spacing: 'spacing',\n specularconstant: 'specularConstant',\n specularexponent: 'specularExponent',\n speed: 'speed',\n spreadmethod: 'spreadMethod',\n startoffset: 'startOffset',\n stddeviation: 'stdDeviation',\n stemh: 'stemh',\n stemv: 'stemv',\n stitchtiles: 'stitchTiles',\n stopcolor: 'stopColor',\n 'stop-color': 'stopColor',\n stopopacity: 'stopOpacity',\n 'stop-opacity': 'stopOpacity',\n strikethroughposition: 'strikethroughPosition',\n 'strikethrough-position': 'strikethroughPosition',\n strikethroughthickness: 'strikethroughThickness',\n 'strikethrough-thickness': 'strikethroughThickness',\n string: 'string',\n stroke: 'stroke',\n strokedasharray: 'strokeDasharray',\n 'stroke-dasharray': 'strokeDasharray',\n strokedashoffset: 'strokeDashoffset',\n 'stroke-dashoffset': 'strokeDashoffset',\n strokelinecap: 'strokeLinecap',\n 'stroke-linecap': 'strokeLinecap',\n strokelinejoin: 'strokeLinejoin',\n 'stroke-linejoin': 'strokeLinejoin',\n strokemiterlimit: 'strokeMiterlimit',\n 'stroke-miterlimit': 'strokeMiterlimit',\n strokewidth: 'strokeWidth',\n 'stroke-width': 'strokeWidth',\n strokeopacity: 'strokeOpacity',\n 'stroke-opacity': 'strokeOpacity',\n suppresscontenteditablewarning: 'suppressContentEditableWarning',\n suppresshydrationwarning: 'suppressHydrationWarning',\n surfacescale: 'surfaceScale',\n systemlanguage: 'systemLanguage',\n tablevalues: 'tableValues',\n targetx: 'targetX',\n targety: 'targetY',\n textanchor: 'textAnchor',\n 'text-anchor': 'textAnchor',\n textdecoration: 'textDecoration',\n 'text-decoration': 'textDecoration',\n textlength: 'textLength',\n textrendering: 'textRendering',\n 'text-rendering': 'textRendering',\n to: 'to',\n transform: 'transform',\n typeof: 'typeof',\n u1: 'u1',\n u2: 'u2',\n underlineposition: 'underlinePosition',\n 'underline-position': 'underlinePosition',\n underlinethickness: 'underlineThickness',\n 'underline-thickness': 'underlineThickness',\n unicode: 'unicode',\n unicodebidi: 'unicodeBidi',\n 'unicode-bidi': 'unicodeBidi',\n unicoderange: 'unicodeRange',\n 'unicode-range': 'unicodeRange',\n unitsperem: 'unitsPerEm',\n 'units-per-em': 'unitsPerEm',\n unselectable: 'unselectable',\n valphabetic: 'vAlphabetic',\n 'v-alphabetic': 'vAlphabetic',\n values: 'values',\n vectoreffect: 'vectorEffect',\n 'vector-effect': 'vectorEffect',\n version: 'version',\n vertadvy: 'vertAdvY',\n 'vert-adv-y': 'vertAdvY',\n vertoriginx: 'vertOriginX',\n 'vert-origin-x': 'vertOriginX',\n vertoriginy: 'vertOriginY',\n 'vert-origin-y': 'vertOriginY',\n vhanging: 'vHanging',\n 'v-hanging': 'vHanging',\n videographic: 'vIdeographic',\n 'v-ideographic': 'vIdeographic',\n viewbox: 'viewBox',\n viewtarget: 'viewTarget',\n visibility: 'visibility',\n vmathematical: 'vMathematical',\n 'v-mathematical': 'vMathematical',\n vocab: 'vocab',\n widths: 'widths',\n wordspacing: 'wordSpacing',\n 'word-spacing': 'wordSpacing',\n writingmode: 'writingMode',\n 'writing-mode': 'writingMode',\n x1: 'x1',\n x2: 'x2',\n x: 'x',\n xchannelselector: 'xChannelSelector',\n xheight: 'xHeight',\n 'x-height': 'xHeight',\n xlinkactuate: 'xlinkActuate',\n 'xlink:actuate': 'xlinkActuate',\n xlinkarcrole: 'xlinkArcrole',\n 'xlink:arcrole': 'xlinkArcrole',\n xlinkhref: 'xlinkHref',\n 'xlink:href': 'xlinkHref',\n xlinkrole: 'xlinkRole',\n 'xlink:role': 'xlinkRole',\n xlinkshow: 'xlinkShow',\n 'xlink:show': 'xlinkShow',\n xlinktitle: 'xlinkTitle',\n 'xlink:title': 'xlinkTitle',\n xlinktype: 'xlinkType',\n 'xlink:type': 'xlinkType',\n xmlbase: 'xmlBase',\n 'xml:base': 'xmlBase',\n xmllang: 'xmlLang',\n 'xml:lang': 'xmlLang',\n xmlns: 'xmlns',\n 'xml:space': 'xmlSpace',\n xmlnsxlink: 'xmlnsXlink',\n 'xmlns:xlink': 'xmlnsXlink',\n xmlspace: 'xmlSpace',\n y1: 'y1',\n y2: 'y2',\n y: 'y',\n ychannelselector: 'yChannelSelector',\n z: 'z',\n zoomandpan: 'zoomAndPan'\n};\n\nvar validateProperty$1 = function () {};\n\n{\n var warnedProperties$1 = {};\n var EVENT_NAME_REGEX = /^on./;\n var INVALID_EVENT_NAME_REGEX = /^on[^A-Z]/;\n var rARIA$1 = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$');\n var rARIACamel$1 = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$');\n\n validateProperty$1 = function (tagName, name, value, eventRegistry) {\n if (hasOwnProperty.call(warnedProperties$1, name) && warnedProperties$1[name]) {\n return true;\n }\n\n var lowerCasedName = name.toLowerCase();\n\n if (lowerCasedName === 'onfocusin' || lowerCasedName === 'onfocusout') {\n error('React uses onFocus and onBlur instead of onFocusIn and onFocusOut. ' + 'All React events are normalized to bubble, so onFocusIn and onFocusOut ' + 'are not needed/supported by React.');\n\n warnedProperties$1[name] = true;\n return true;\n } // We can't rely on the event system being injected on the server.\n\n\n if (eventRegistry != null) {\n var registrationNameDependencies = eventRegistry.registrationNameDependencies,\n possibleRegistrationNames = eventRegistry.possibleRegistrationNames;\n\n if (registrationNameDependencies.hasOwnProperty(name)) {\n return true;\n }\n\n var registrationName = possibleRegistrationNames.hasOwnProperty(lowerCasedName) ? possibleRegistrationNames[lowerCasedName] : null;\n\n if (registrationName != null) {\n error('Invalid event handler property `%s`. Did you mean `%s`?', name, registrationName);\n\n warnedProperties$1[name] = true;\n return true;\n }\n\n if (EVENT_NAME_REGEX.test(name)) {\n error('Unknown event handler property `%s`. It will be ignored.', name);\n\n warnedProperties$1[name] = true;\n return true;\n }\n } else if (EVENT_NAME_REGEX.test(name)) {\n // If no event plugins have been injected, we are in a server environment.\n // So we can't tell if the event name is correct for sure, but we can filter\n // out known bad ones like `onclick`. We can't suggest a specific replacement though.\n if (INVALID_EVENT_NAME_REGEX.test(name)) {\n error('Invalid event handler property `%s`. ' + 'React events use the camelCase naming convention, for example `onClick`.', name);\n }\n\n warnedProperties$1[name] = true;\n return true;\n } // Let the ARIA attribute hook validate ARIA attributes\n\n\n if (rARIA$1.test(name) || rARIACamel$1.test(name)) {\n return true;\n }\n\n if (lowerCasedName === 'innerhtml') {\n error('Directly setting property `innerHTML` is not permitted. ' + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.');\n\n warnedProperties$1[name] = true;\n return true;\n }\n\n if (lowerCasedName === 'aria') {\n error('The `aria` attribute is reserved for future use in React. ' + 'Pass individual `aria-` attributes instead.');\n\n warnedProperties$1[name] = true;\n return true;\n }\n\n if (lowerCasedName === 'is' && value !== null && value !== undefined && typeof value !== 'string') {\n error('Received a `%s` for a string attribute `is`. If this is expected, cast ' + 'the value to a string.', typeof value);\n\n warnedProperties$1[name] = true;\n return true;\n }\n\n if (typeof value === 'number' && isNaN(value)) {\n error('Received NaN for the `%s` attribute. If this is expected, cast ' + 'the value to a string.', name);\n\n warnedProperties$1[name] = true;\n return true;\n }\n\n var propertyInfo = getPropertyInfo(name);\n var isReserved = propertyInfo !== null && propertyInfo.type === RESERVED; // Known attributes should match the casing specified in the property config.\n\n if (possibleStandardNames.hasOwnProperty(lowerCasedName)) {\n var standardName = possibleStandardNames[lowerCasedName];\n\n if (standardName !== name) {\n error('Invalid DOM property `%s`. Did you mean `%s`?', name, standardName);\n\n warnedProperties$1[name] = true;\n return true;\n }\n } else if (!isReserved && name !== lowerCasedName) {\n // Unknown attributes should have lowercase casing since that's how they\n // will be cased anyway with server rendering.\n error('React does not recognize the `%s` prop on a DOM element. If you ' + 'intentionally want it to appear in the DOM as a custom ' + 'attribute, spell it as lowercase `%s` instead. ' + 'If you accidentally passed it from a parent component, remove ' + 'it from the DOM element.', name, lowerCasedName);\n\n warnedProperties$1[name] = true;\n return true;\n }\n\n if (typeof value === 'boolean' && shouldRemoveAttributeWithWarning(name, value, propertyInfo, false)) {\n if (value) {\n error('Received `%s` for a non-boolean attribute `%s`.\\n\\n' + 'If you want to write it to the DOM, pass a string instead: ' + '%s=\"%s\" or %s={value.toString()}.', value, name, name, value, name);\n } else {\n error('Received `%s` for a non-boolean attribute `%s`.\\n\\n' + 'If you want to write it to the DOM, pass a string instead: ' + '%s=\"%s\" or %s={value.toString()}.\\n\\n' + 'If you used to conditionally omit it with %s={condition && value}, ' + 'pass %s={condition ? value : undefined} instead.', value, name, name, value, name, name, name);\n }\n\n warnedProperties$1[name] = true;\n return true;\n } // Now that we've validated casing, do not validate\n // data types for reserved props\n\n\n if (isReserved) {\n return true;\n } // Warn when a known attribute is a bad type\n\n\n if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, false)) {\n warnedProperties$1[name] = true;\n return false;\n } // Warn when passing the strings 'false' or 'true' into a boolean prop\n\n\n if ((value === 'false' || value === 'true') && propertyInfo !== null && propertyInfo.type === BOOLEAN) {\n error('Received the string `%s` for the boolean attribute `%s`. ' + '%s ' + 'Did you mean %s={%s}?', value, name, value === 'false' ? 'The browser will interpret it as a truthy value.' : 'Although this works, it will not work as expected if you pass the string \"false\".', name, value);\n\n warnedProperties$1[name] = true;\n return true;\n }\n\n return true;\n };\n}\n\nvar warnUnknownProperties = function (type, props, eventRegistry) {\n {\n var unknownProps = [];\n\n for (var key in props) {\n var isValid = validateProperty$1(type, key, props[key], eventRegistry);\n\n if (!isValid) {\n unknownProps.push(key);\n }\n }\n\n var unknownPropString = unknownProps.map(function (prop) {\n return '`' + prop + '`';\n }).join(', ');\n\n if (unknownProps.length === 1) {\n error('Invalid value for prop %s on <%s> tag. Either remove it from the element, ' + 'or pass a string or number value to keep it in the DOM. ' + 'For details, see https://reactjs.org/link/attribute-behavior ', unknownPropString, type);\n } else if (unknownProps.length > 1) {\n error('Invalid values for props %s on <%s> tag. Either remove them from the element, ' + 'or pass a string or number value to keep them in the DOM. ' + 'For details, see https://reactjs.org/link/attribute-behavior ', unknownPropString, type);\n }\n }\n};\n\nfunction validateProperties$2(type, props, eventRegistry) {\n if (isCustomComponent(type, props)) {\n return;\n }\n\n warnUnknownProperties(type, props, eventRegistry);\n}\n\nvar warnValidStyle = function () {};\n\n{\n // 'msTransform' is correct, but the other prefixes should be capitalized\n var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/;\n var msPattern = /^-ms-/;\n var hyphenPattern = /-(.)/g; // style values shouldn't contain a semicolon\n\n var badStyleValueWithSemicolonPattern = /;\\s*$/;\n var warnedStyleNames = {};\n var warnedStyleValues = {};\n var warnedForNaNValue = false;\n var warnedForInfinityValue = false;\n\n var camelize = function (string) {\n return string.replace(hyphenPattern, function (_, character) {\n return character.toUpperCase();\n });\n };\n\n var warnHyphenatedStyleName = function (name) {\n if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {\n return;\n }\n\n warnedStyleNames[name] = true;\n\n error('Unsupported style property %s. Did you mean %s?', name, // As Andi Smith suggests\n // (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix\n // is converted to lowercase `ms`.\n camelize(name.replace(msPattern, 'ms-')));\n };\n\n var warnBadVendoredStyleName = function (name) {\n if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {\n return;\n }\n\n warnedStyleNames[name] = true;\n\n error('Unsupported vendor-prefixed style property %s. Did you mean %s?', name, name.charAt(0).toUpperCase() + name.slice(1));\n };\n\n var warnStyleValueWithSemicolon = function (name, value) {\n if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) {\n return;\n }\n\n warnedStyleValues[value] = true;\n\n error(\"Style property values shouldn't contain a semicolon. \" + 'Try \"%s: %s\" instead.', name, value.replace(badStyleValueWithSemicolonPattern, ''));\n };\n\n var warnStyleValueIsNaN = function (name, value) {\n if (warnedForNaNValue) {\n return;\n }\n\n warnedForNaNValue = true;\n\n error('`NaN` is an invalid value for the `%s` css style property.', name);\n };\n\n var warnStyleValueIsInfinity = function (name, value) {\n if (warnedForInfinityValue) {\n return;\n }\n\n warnedForInfinityValue = true;\n\n error('`Infinity` is an invalid value for the `%s` css style property.', name);\n };\n\n warnValidStyle = function (name, value) {\n if (name.indexOf('-') > -1) {\n warnHyphenatedStyleName(name);\n } else if (badVendoredStyleNamePattern.test(name)) {\n warnBadVendoredStyleName(name);\n } else if (badStyleValueWithSemicolonPattern.test(value)) {\n warnStyleValueWithSemicolon(name, value);\n }\n\n if (typeof value === 'number') {\n if (isNaN(value)) {\n warnStyleValueIsNaN(name, value);\n } else if (!isFinite(value)) {\n warnStyleValueIsInfinity(name, value);\n }\n }\n };\n}\n\nvar warnValidStyle$1 = warnValidStyle;\n\n// code copied and modified from escape-html\nvar matchHtmlRegExp = /[\"'&<>]/;\n/**\n * Escapes special characters and HTML entities in a given html string.\n *\n * @param {string} string HTML string to escape for later insertion\n * @return {string}\n * @public\n */\n\nfunction escapeHtml(string) {\n {\n checkHtmlStringCoercion(string);\n }\n\n var str = '' + string;\n var match = matchHtmlRegExp.exec(str);\n\n if (!match) {\n return str;\n }\n\n var escape;\n var html = '';\n var index;\n var lastIndex = 0;\n\n for (index = match.index; index < str.length; index++) {\n switch (str.charCodeAt(index)) {\n case 34:\n // \"\n escape = '"';\n break;\n\n case 38:\n // &\n escape = '&';\n break;\n\n case 39:\n // '\n escape = '''; // modified from escape-html; used to be '''\n\n break;\n\n case 60:\n // <\n escape = '<';\n break;\n\n case 62:\n // >\n escape = '>';\n break;\n\n default:\n continue;\n }\n\n if (lastIndex !== index) {\n html += str.substring(lastIndex, index);\n }\n\n lastIndex = index + 1;\n html += escape;\n }\n\n return lastIndex !== index ? html + str.substring(lastIndex, index) : html;\n} // end code copied and modified from escape-html\n\n/**\n * Escapes text to prevent scripting attacks.\n *\n * @param {*} text Text value to escape.\n * @return {string} An escaped string.\n */\n\n\nfunction escapeTextForBrowser(text) {\n if (typeof text === 'boolean' || typeof text === 'number') {\n // this shortcircuit helps perf for types that we know will never have\n // special characters, especially given that this function is used often\n // for numeric dom ids.\n return '' + text;\n }\n\n return escapeHtml(text);\n}\n\nvar uppercasePattern = /([A-Z])/g;\nvar msPattern$1 = /^ms-/;\n/**\n * Hyphenates a camelcased CSS property name, for example:\n *\n * > hyphenateStyleName('backgroundColor')\n * < \"background-color\"\n * > hyphenateStyleName('MozTransition')\n * < \"-moz-transition\"\n * > hyphenateStyleName('msTransition')\n * < \"-ms-transition\"\n *\n * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix\n * is converted to `-ms-`.\n */\n\nfunction hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern$1, '-ms-');\n}\n\n// and any newline or tab are filtered out as if they're not part of the URL.\n// https://url.spec.whatwg.org/#url-parsing\n// Tab or newline are defined as \\r\\n\\t:\n// https://infra.spec.whatwg.org/#ascii-tab-or-newline\n// A C0 control is a code point in the range \\u0000 NULL to \\u001F\n// INFORMATION SEPARATOR ONE, inclusive:\n// https://infra.spec.whatwg.org/#c0-control-or-space\n\n/* eslint-disable max-len */\n\nvar isJavaScriptProtocol = /^[\\u0000-\\u001F ]*j[\\r\\n\\t]*a[\\r\\n\\t]*v[\\r\\n\\t]*a[\\r\\n\\t]*s[\\r\\n\\t]*c[\\r\\n\\t]*r[\\r\\n\\t]*i[\\r\\n\\t]*p[\\r\\n\\t]*t[\\r\\n\\t]*\\:/i;\nvar didWarn = false;\n\nfunction sanitizeURL(url) {\n {\n if (!didWarn && isJavaScriptProtocol.test(url)) {\n didWarn = true;\n\n error('A future version of React will block javascript: URLs as a security precaution. ' + 'Use event handlers instead if you can. If you need to generate unsafe HTML try ' + 'using dangerouslySetInnerHTML instead. React was passed %s.', JSON.stringify(url));\n }\n }\n}\n\nvar isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare\n\nfunction isArray(a) {\n return isArrayImpl(a);\n}\n\nvar startInlineScript = stringToPrecomputedChunk('<script>');\nvar endInlineScript = stringToPrecomputedChunk('</script>');\nvar startScriptSrc = stringToPrecomputedChunk('<script src=\"');\nvar startModuleSrc = stringToPrecomputedChunk('<script type=\"module\" src=\"');\nvar endAsyncScript = stringToPrecomputedChunk('\" async=\"\"></script>');\n/**\n * This escaping function is designed to work with bootstrapScriptContent only.\n * because we know we are escaping the entire script. We can avoid for instance\n * escaping html comment string sequences that are valid javascript as well because\n * if there are no sebsequent <script sequences the html parser will never enter\n * script data double escaped state (see: https://www.w3.org/TR/html53/syntax.html#script-data-double-escaped-state)\n *\n * While untrusted script content should be made safe before using this api it will\n * ensure that the script cannot be early terminated or never terminated state\n */\n\nfunction escapeBootstrapScriptContent(scriptText) {\n {\n checkHtmlStringCoercion(scriptText);\n }\n\n return ('' + scriptText).replace(scriptRegex, scriptReplacer);\n}\n\nvar scriptRegex = /(<\\/|<)(s)(cript)/gi;\n\nvar scriptReplacer = function (match, prefix, s, suffix) {\n return \"\" + prefix + (s === 's' ? \"\\\\u0073\" : \"\\\\u0053\") + suffix;\n}; // Allows us to keep track of what we've already written so we can refer back to it.\n\n\nfunction createResponseState(identifierPrefix, nonce, bootstrapScriptContent, bootstrapScripts, bootstrapModules) {\n var idPrefix = identifierPrefix === undefined ? '' : identifierPrefix;\n var inlineScriptWithNonce = nonce === undefined ? startInlineScript : stringToPrecomputedChunk('<script nonce=\"' + escapeTextForBrowser(nonce) + '\">');\n var bootstrapChunks = [];\n\n if (bootstrapScriptContent !== undefined) {\n bootstrapChunks.push(inlineScriptWithNonce, stringToChunk(escapeBootstrapScriptContent(bootstrapScriptContent)), endInlineScript);\n }\n\n if (bootstrapScripts !== undefined) {\n for (var i = 0; i < bootstrapScripts.length; i++) {\n bootstrapChunks.push(startScriptSrc, stringToChunk(escapeTextForBrowser(bootstrapScripts[i])), endAsyncScript);\n }\n }\n\n if (bootstrapModules !== undefined) {\n for (var _i = 0; _i < bootstrapModules.length; _i++) {\n bootstrapChunks.push(startModuleSrc, stringToChunk(escapeTextForBrowser(bootstrapModules[_i])), endAsyncScript);\n }\n }\n\n return {\n bootstrapChunks: bootstrapChunks,\n startInlineScript: inlineScriptWithNonce,\n placeholderPrefix: stringToPrecomputedChunk(idPrefix + 'P:'),\n segmentPrefix: stringToPrecomputedChunk(idPrefix + 'S:'),\n boundaryPrefix: idPrefix + 'B:',\n idPrefix: idPrefix,\n nextSuspenseID: 0,\n sentCompleteSegmentFunction: false,\n sentCompleteBoundaryFunction: false,\n sentClientRenderFunction: false\n };\n} // Constants for the insertion mode we're currently writing in. We don't encode all HTML5 insertion\n// modes. We only include the variants as they matter for the sake of our purposes.\n// We don't actually provide the namespace therefore we use constants instead of the string.\n\nvar ROOT_HTML_MODE = 0; // Used for the root most element tag.\n\nvar HTML_MODE = 1;\nvar SVG_MODE = 2;\nvar MATHML_MODE = 3;\nvar HTML_TABLE_MODE = 4;\nvar HTML_TABLE_BODY_MODE = 5;\nvar HTML_TABLE_ROW_MODE = 6;\nvar HTML_COLGROUP_MODE = 7; // We have a greater than HTML_TABLE_MODE check elsewhere. If you add more cases here, make sure it\n// still makes sense\n\nfunction createFormatContext(insertionMode, selectedValue) {\n return {\n insertionMode: insertionMode,\n selectedValue: selectedValue\n };\n}\n\nfunction createRootFormatContext(namespaceURI) {\n var insertionMode = namespaceURI === 'http://www.w3.org/2000/svg' ? SVG_MODE : namespaceURI === 'http://www.w3.org/1998/Math/MathML' ? MATHML_MODE : ROOT_HTML_MODE;\n return createFormatContext(insertionMode, null);\n}\nfunction getChildFormatContext(parentContext, type, props) {\n switch (type) {\n case 'select':\n return createFormatContext(HTML_MODE, props.value != null ? props.value : props.defaultValue);\n\n case 'svg':\n return createFormatContext(SVG_MODE, null);\n\n case 'math':\n return createFormatContext(MATHML_MODE, null);\n\n case 'foreignObject':\n return createFormatContext(HTML_MODE, null);\n // Table parents are special in that their children can only be created at all if they're\n // wrapped in a table parent. So we need to encode that we're entering this mode.\n\n case 'table':\n return createFormatContext(HTML_TABLE_MODE, null);\n\n case 'thead':\n case 'tbody':\n case 'tfoot':\n return createFormatContext(HTML_TABLE_BODY_MODE, null);\n\n case 'colgroup':\n return createFormatContext(HTML_COLGROUP_MODE, null);\n\n case 'tr':\n return createFormatContext(HTML_TABLE_ROW_MODE, null);\n }\n\n if (parentContext.insertionMode >= HTML_TABLE_MODE) {\n // Whatever tag this was, it wasn't a table parent or other special parent, so we must have\n // entered plain HTML again.\n return createFormatContext(HTML_MODE, null);\n }\n\n if (parentContext.insertionMode === ROOT_HTML_MODE) {\n // We've emitted the root and is now in plain HTML mode.\n return createFormatContext(HTML_MODE, null);\n }\n\n return parentContext;\n}\nvar UNINITIALIZED_SUSPENSE_BOUNDARY_ID = null;\nfunction assignSuspenseBoundaryID(responseState) {\n var generatedID = responseState.nextSuspenseID++;\n return stringToPrecomputedChunk(responseState.boundaryPrefix + generatedID.toString(16));\n}\nfunction makeId(responseState, treeId, localId) {\n var idPrefix = responseState.idPrefix;\n var id = ':' + idPrefix + 'R' + treeId; // Unless this is the first id at this level, append a number at the end\n // that represents the position of this useId hook among all the useId\n // hooks for this fiber.\n\n if (localId > 0) {\n id += 'H' + localId.toString(32);\n }\n\n return id + ':';\n}\n\nfunction encodeHTMLTextNode(text) {\n return escapeTextForBrowser(text);\n}\n\nvar textSeparator = stringToPrecomputedChunk('<!-- -->');\nfunction pushTextInstance(target, text, responseState, textEmbedded) {\n if (text === '') {\n // Empty text doesn't have a DOM node representation and the hydration is aware of this.\n return textEmbedded;\n }\n\n if (textEmbedded) {\n target.push(textSeparator);\n }\n\n target.push(stringToChunk(encodeHTMLTextNode(text)));\n return true;\n} // Called when Fizz is done with a Segment. Currently the only purpose is to conditionally\n// emit a text separator when we don't know for sure it is safe to omit\n\nfunction pushSegmentFinale(target, responseState, lastPushedText, textEmbedded) {\n if (lastPushedText && textEmbedded) {\n target.push(textSeparator);\n }\n}\nvar styleNameCache = new Map();\n\nfunction processStyleName(styleName) {\n var chunk = styleNameCache.get(styleName);\n\n if (chunk !== undefined) {\n return chunk;\n }\n\n var result = stringToPrecomputedChunk(escapeTextForBrowser(hyphenateStyleName(styleName)));\n styleNameCache.set(styleName, result);\n return result;\n}\n\nvar styleAttributeStart = stringToPrecomputedChunk(' style=\"');\nvar styleAssign = stringToPrecomputedChunk(':');\nvar styleSeparator = stringToPrecomputedChunk(';');\n\nfunction pushStyle(target, responseState, style) {\n if (typeof style !== 'object') {\n throw new Error('The `style` prop expects a mapping from style properties to values, ' + \"not a string. For example, style={{marginRight: spacing + 'em'}} when \" + 'using JSX.');\n }\n\n var isFirst = true;\n\n for (var styleName in style) {\n if (!hasOwnProperty.call(style, styleName)) {\n continue;\n } // If you provide unsafe user data here they can inject arbitrary CSS\n // which may be problematic (I couldn't repro this):\n // https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet\n // http://www.thespanner.co.uk/2007/11/26/ultimate-xss-css-injection/\n // This is not an XSS hole but instead a potential CSS injection issue\n // which has lead to a greater discussion about how we're going to\n // trust URLs moving forward. See #2115901\n\n\n var styleValue = style[styleName];\n\n if (styleValue == null || typeof styleValue === 'boolean' || styleValue === '') {\n // TODO: We used to set empty string as a style with an empty value. Does that ever make sense?\n continue;\n }\n\n var nameChunk = void 0;\n var valueChunk = void 0;\n var isCustomProperty = styleName.indexOf('--') === 0;\n\n if (isCustomProperty) {\n nameChunk = stringToChunk(escapeTextForBrowser(styleName));\n\n {\n checkCSSPropertyStringCoercion(styleValue, styleName);\n }\n\n valueChunk = stringToChunk(escapeTextForBrowser(('' + styleValue).trim()));\n } else {\n {\n warnValidStyle$1(styleName, styleValue);\n }\n\n nameChunk = processStyleName(styleName);\n\n if (typeof styleValue === 'number') {\n if (styleValue !== 0 && !hasOwnProperty.call(isUnitlessNumber, styleName)) {\n valueChunk = stringToChunk(styleValue + 'px'); // Presumes implicit 'px' suffix for unitless numbers\n } else {\n valueChunk = stringToChunk('' + styleValue);\n }\n } else {\n {\n checkCSSPropertyStringCoercion(styleValue, styleName);\n }\n\n valueChunk = stringToChunk(escapeTextForBrowser(('' + styleValue).trim()));\n }\n }\n\n if (isFirst) {\n isFirst = false; // If it's first, we don't need any separators prefixed.\n\n target.push(styleAttributeStart, nameChunk, styleAssign, valueChunk);\n } else {\n target.push(styleSeparator, nameChunk, styleAssign, valueChunk);\n }\n }\n\n if (!isFirst) {\n target.push(attributeEnd);\n }\n}\n\nvar attributeSeparator = stringToPrecomputedChunk(' ');\nvar attributeAssign = stringToPrecomputedChunk('=\"');\nvar attributeEnd = stringToPrecomputedChunk('\"');\nvar attributeEmptyString = stringToPrecomputedChunk('=\"\"');\n\nfunction pushAttribute(target, responseState, name, value) {\n switch (name) {\n case 'style':\n {\n pushStyle(target, responseState, value);\n return;\n }\n\n case 'defaultValue':\n case 'defaultChecked': // These shouldn't be set as attributes on generic HTML elements.\n\n case 'innerHTML': // Must use dangerouslySetInnerHTML instead.\n\n case 'suppressContentEditableWarning':\n case 'suppressHydrationWarning':\n // Ignored. These are built-in to React on the client.\n return;\n }\n\n if ( // shouldIgnoreAttribute\n // We have already filtered out null/undefined and reserved words.\n name.length > 2 && (name[0] === 'o' || name[0] === 'O') && (name[1] === 'n' || name[1] === 'N')) {\n return;\n }\n\n var propertyInfo = getPropertyInfo(name);\n\n if (propertyInfo !== null) {\n // shouldRemoveAttribute\n switch (typeof value) {\n case 'function': // $FlowIssue symbol is perfectly valid here\n\n case 'symbol':\n // eslint-disable-line\n return;\n\n case 'boolean':\n {\n if (!propertyInfo.acceptsBooleans) {\n return;\n }\n }\n }\n\n var attributeName = propertyInfo.attributeName;\n var attributeNameChunk = stringToChunk(attributeName); // TODO: If it's known we can cache the chunk.\n\n switch (propertyInfo.type) {\n case BOOLEAN:\n if (value) {\n target.push(attributeSeparator, attributeNameChunk, attributeEmptyString);\n }\n\n return;\n\n case OVERLOADED_BOOLEAN:\n if (value === true) {\n target.push(attributeSeparator, attributeNameChunk, attributeEmptyString);\n } else if (value === false) ; else {\n target.push(attributeSeparator, attributeNameChunk, attributeAssign, stringToChunk(escapeTextForBrowser(value)), attributeEnd);\n }\n\n return;\n\n case NUMERIC:\n if (!isNaN(value)) {\n target.push(attributeSeparator, attributeNameChunk, attributeAssign, stringToChunk(escapeTextForBrowser(value)), attributeEnd);\n }\n\n break;\n\n case POSITIVE_NUMERIC:\n if (!isNaN(value) && value >= 1) {\n target.push(attributeSeparator, attributeNameChunk, attributeAssign, stringToChunk(escapeTextForBrowser(value)), attributeEnd);\n }\n\n break;\n\n default:\n if (propertyInfo.sanitizeURL) {\n {\n checkAttributeStringCoercion(value, attributeName);\n }\n\n value = '' + value;\n sanitizeURL(value);\n }\n\n target.push(attributeSeparator, attributeNameChunk, attributeAssign, stringToChunk(escapeTextForBrowser(value)), attributeEnd);\n }\n } else if (isAttributeNameSafe(name)) {\n // shouldRemoveAttribute\n switch (typeof value) {\n case 'function': // $FlowIssue symbol is perfectly valid here\n\n case 'symbol':\n // eslint-disable-line\n return;\n\n case 'boolean':\n {\n var prefix = name.toLowerCase().slice(0, 5);\n\n if (prefix !== 'data-' && prefix !== 'aria-') {\n return;\n }\n }\n }\n\n target.push(attributeSeparator, stringToChunk(name), attributeAssign, stringToChunk(escapeTextForBrowser(value)), attributeEnd);\n }\n}\n\nvar endOfStartTag = stringToPrecomputedChunk('>');\nvar endOfStartTagSelfClosing = stringToPrecomputedChunk('/>');\n\nfunction pushInnerHTML(target, innerHTML, children) {\n if (innerHTML != null) {\n if (children != null) {\n throw new Error('Can only set one of `children` or `props.dangerouslySetInnerHTML`.');\n }\n\n if (typeof innerHTML !== 'object' || !('__html' in innerHTML)) {\n throw new Error('`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. ' + 'Please visit https://reactjs.org/link/dangerously-set-inner-html ' + 'for more information.');\n }\n\n var html = innerHTML.__html;\n\n if (html !== null && html !== undefined) {\n {\n checkHtmlStringCoercion(html);\n }\n\n target.push(stringToChunk('' + html));\n }\n }\n} // TODO: Move these to ResponseState so that we warn for every request.\n// It would help debugging in stateful servers (e.g. service worker).\n\n\nvar didWarnDefaultInputValue = false;\nvar didWarnDefaultChecked = false;\nvar didWarnDefaultSelectValue = false;\nvar didWarnDefaultTextareaValue = false;\nvar didWarnInvalidOptionChildren = false;\nvar didWarnInvalidOptionInnerHTML = false;\nvar didWarnSelectedSetOnOption = false;\n\nfunction checkSelectProp(props, propName) {\n {\n var value = props[propName];\n\n if (value != null) {\n var array = isArray(value);\n\n if (props.multiple && !array) {\n error('The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.', propName);\n } else if (!props.multiple && array) {\n error('The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.', propName);\n }\n }\n }\n}\n\nfunction pushStartSelect(target, props, responseState) {\n {\n checkControlledValueProps('select', props);\n checkSelectProp(props, 'value');\n checkSelectProp(props, 'defaultValue');\n\n if (props.value !== undefined && props.defaultValue !== undefined && !didWarnDefaultSelectValue) {\n error('Select elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled select ' + 'element and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components');\n\n didWarnDefaultSelectValue = true;\n }\n }\n\n target.push(startChunkForTag('select'));\n var children = null;\n var innerHTML = null;\n\n for (var propKey in props) {\n if (hasOwnProperty.call(props, propKey)) {\n var propValue = props[propKey];\n\n if (propValue == null) {\n continue;\n }\n\n switch (propKey) {\n case 'children':\n children = propValue;\n break;\n\n case 'dangerouslySetInnerHTML':\n // TODO: This doesn't really make sense for select since it can't use the controlled\n // value in the innerHTML.\n innerHTML = propValue;\n break;\n\n case 'defaultValue':\n case 'value':\n // These are set on the Context instead and applied to the nested options.\n break;\n\n default:\n pushAttribute(target, responseState, propKey, propValue);\n break;\n }\n }\n }\n\n target.push(endOfStartTag);\n pushInnerHTML(target, innerHTML, children);\n return children;\n}\n\nfunction flattenOptionChildren(children) {\n var content = ''; // Flatten children and warn if they aren't strings or numbers;\n // invalid types are ignored.\n\n React.Children.forEach(children, function (child) {\n if (child == null) {\n return;\n }\n\n content += child;\n\n {\n if (!didWarnInvalidOptionChildren && typeof child !== 'string' && typeof child !== 'number') {\n didWarnInvalidOptionChildren = true;\n\n error('Cannot infer the option value of complex children. ' + 'Pass a `value` prop or use a plain string as children to <option>.');\n }\n }\n });\n return content;\n}\n\nvar selectedMarkerAttribute = stringToPrecomputedChunk(' selected=\"\"');\n\nfunction pushStartOption(target, props, responseState, formatContext) {\n var selectedValue = formatContext.selectedValue;\n target.push(startChunkForTag('option'));\n var children = null;\n var value = null;\n var selected = null;\n var innerHTML = null;\n\n for (var propKey in props) {\n if (hasOwnProperty.call(props, propKey)) {\n var propValue = props[propKey];\n\n if (propValue == null) {\n continue;\n }\n\n switch (propKey) {\n case 'children':\n children = propValue;\n break;\n\n case 'selected':\n // ignore\n selected = propValue;\n\n {\n // TODO: Remove support for `selected` in <option>.\n if (!didWarnSelectedSetOnOption) {\n error('Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.');\n\n didWarnSelectedSetOnOption = true;\n }\n }\n\n break;\n\n case 'dangerouslySetInnerHTML':\n innerHTML = propValue;\n break;\n // eslint-disable-next-line-no-fallthrough\n\n case 'value':\n value = propValue;\n // We intentionally fallthrough to also set the attribute on the node.\n // eslint-disable-next-line-no-fallthrough\n\n default:\n pushAttribute(target, responseState, propKey, propValue);\n break;\n }\n }\n }\n\n if (selectedValue != null) {\n var stringValue;\n\n if (value !== null) {\n {\n checkAttributeStringCoercion(value, 'value');\n }\n\n stringValue = '' + value;\n } else {\n {\n if (innerHTML !== null) {\n if (!didWarnInvalidOptionInnerHTML) {\n didWarnInvalidOptionInnerHTML = true;\n\n error('Pass a `value` prop if you set dangerouslyInnerHTML so React knows ' + 'which value should be selected.');\n }\n }\n }\n\n stringValue = flattenOptionChildren(children);\n }\n\n if (isArray(selectedValue)) {\n // multiple\n for (var i = 0; i < selectedValue.length; i++) {\n {\n checkAttributeStringCoercion(selectedValue[i], 'value');\n }\n\n var v = '' + selectedValue[i];\n\n if (v === stringValue) {\n target.push(selectedMarkerAttribute);\n break;\n }\n }\n } else {\n {\n checkAttributeStringCoercion(selectedValue, 'select.value');\n }\n\n if ('' + selectedValue === stringValue) {\n target.push(selectedMarkerAttribute);\n }\n }\n } else if (selected) {\n target.push(selectedMarkerAttribute);\n }\n\n target.push(endOfStartTag);\n pushInnerHTML(target, innerHTML, children);\n return children;\n}\n\nfunction pushInput(target, props, responseState) {\n {\n checkControlledValueProps('input', props);\n\n if (props.checked !== undefined && props.defaultChecked !== undefined && !didWarnDefaultChecked) {\n error('%s contains an input of type %s with both checked and defaultChecked props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the checked prop, or the defaultChecked prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components', 'A component', props.type);\n\n didWarnDefaultChecked = true;\n }\n\n if (props.value !== undefined && props.defaultValue !== undefined && !didWarnDefaultInputValue) {\n error('%s contains an input of type %s with both value and defaultValue props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components', 'A component', props.type);\n\n didWarnDefaultInputValue = true;\n }\n }\n\n target.push(startChunkForTag('input'));\n var value = null;\n var defaultValue = null;\n var checked = null;\n var defaultChecked = null;\n\n for (var propKey in props) {\n if (hasOwnProperty.call(props, propKey)) {\n var propValue = props[propKey];\n\n if (propValue == null) {\n continue;\n }\n\n switch (propKey) {\n case 'children':\n case 'dangerouslySetInnerHTML':\n throw new Error('input' + \" is a self-closing tag and must neither have `children` nor \" + 'use `dangerouslySetInnerHTML`.');\n // eslint-disable-next-line-no-fallthrough\n\n case 'defaultChecked':\n defaultChecked = propValue;\n break;\n\n case 'defaultValue':\n defaultValue = propValue;\n break;\n\n case 'checked':\n checked = propValue;\n break;\n\n case 'value':\n value = propValue;\n break;\n\n default:\n pushAttribute(target, responseState, propKey, propValue);\n break;\n }\n }\n }\n\n if (checked !== null) {\n pushAttribute(target, responseState, 'checked', checked);\n } else if (defaultChecked !== null) {\n pushAttribute(target, responseState, 'checked', defaultChecked);\n }\n\n if (value !== null) {\n pushAttribute(target, responseState, 'value', value);\n } else if (defaultValue !== null) {\n pushAttribute(target, responseState, 'value', defaultValue);\n }\n\n target.push(endOfStartTagSelfClosing);\n return null;\n}\n\nfunction pushStartTextArea(target, props, responseState) {\n {\n checkControlledValueProps('textarea', props);\n\n if (props.value !== undefined && props.defaultValue !== undefined && !didWarnDefaultTextareaValue) {\n error('Textarea elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled textarea ' + 'and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components');\n\n didWarnDefaultTextareaValue = true;\n }\n }\n\n target.push(startChunkForTag('textarea'));\n var value = null;\n var defaultValue = null;\n var children = null;\n\n for (var propKey in props) {\n if (hasOwnProperty.call(props, propKey)) {\n var propValue = props[propKey];\n\n if (propValue == null) {\n continue;\n }\n\n switch (propKey) {\n case 'children':\n children = propValue;\n break;\n\n case 'value':\n value = propValue;\n break;\n\n case 'defaultValue':\n defaultValue = propValue;\n break;\n\n case 'dangerouslySetInnerHTML':\n throw new Error('`dangerouslySetInnerHTML` does not make sense on <textarea>.');\n // eslint-disable-next-line-no-fallthrough\n\n default:\n pushAttribute(target, responseState, propKey, propValue);\n break;\n }\n }\n }\n\n if (value === null && defaultValue !== null) {\n value = defaultValue;\n }\n\n target.push(endOfStartTag); // TODO (yungsters): Remove support for children content in <textarea>.\n\n if (children != null) {\n {\n error('Use the `defaultValue` or `value` props instead of setting ' + 'children on <textarea>.');\n }\n\n if (value != null) {\n throw new Error('If you supply `defaultValue` on a <textarea>, do not pass children.');\n }\n\n if (isArray(children)) {\n if (children.length > 1) {\n throw new Error('<textarea> can only have at most one child.');\n } // TODO: remove the coercion and the DEV check below because it will\n // always be overwritten by the coercion several lines below it. #22309\n\n\n {\n checkHtmlStringCoercion(children[0]);\n }\n\n value = '' + children[0];\n }\n\n {\n checkHtmlStringCoercion(children);\n }\n\n value = '' + children;\n }\n\n if (typeof value === 'string' && value[0] === '\\n') {\n // text/html ignores the first character in these tags if it's a newline\n // Prefer to break application/xml over text/html (for now) by adding\n // a newline specifically to get eaten by the parser. (Alternately for\n // textareas, replacing \"^\\n\" with \"\\r\\n\" doesn't get eaten, and the first\n // \\r is normalized out by HTMLTextAreaElement#value.)\n // See: <http://www.w3.org/TR/html-polyglot/#newlines-in-textarea-and-pre>\n // See: <http://www.w3.org/TR/html5/syntax.html#element-restrictions>\n // See: <http://www.w3.org/TR/html5/syntax.html#newlines>\n // See: Parsing of \"textarea\" \"listing\" and \"pre\" elements\n // from <http://www.w3.org/TR/html5/syntax.html#parsing-main-inbody>\n target.push(leadingNewline);\n } // ToString and push directly instead of recurse over children.\n // We don't really support complex children in the value anyway.\n // This also currently avoids a trailing comment node which breaks textarea.\n\n\n if (value !== null) {\n {\n checkAttributeStringCoercion(value, 'value');\n }\n\n target.push(stringToChunk(encodeHTMLTextNode('' + value)));\n }\n\n return null;\n}\n\nfunction pushSelfClosing(target, props, tag, responseState) {\n target.push(startChunkForTag(tag));\n\n for (var propKey in props) {\n if (hasOwnProperty.call(props, propKey)) {\n var propValue = props[propKey];\n\n if (propValue == null) {\n continue;\n }\n\n switch (propKey) {\n case 'children':\n case 'dangerouslySetInnerHTML':\n throw new Error(tag + \" is a self-closing tag and must neither have `children` nor \" + 'use `dangerouslySetInnerHTML`.');\n // eslint-disable-next-line-no-fallthrough\n\n default:\n pushAttribute(target, responseState, propKey, propValue);\n break;\n }\n }\n }\n\n target.push(endOfStartTagSelfClosing);\n return null;\n}\n\nfunction pushStartMenuItem(target, props, responseState) {\n target.push(startChunkForTag('menuitem'));\n\n for (var propKey in props) {\n if (hasOwnProperty.call(props, propKey)) {\n var propValue = props[propKey];\n\n if (propValue == null) {\n continue;\n }\n\n switch (propKey) {\n case 'children':\n case 'dangerouslySetInnerHTML':\n throw new Error('menuitems cannot have `children` nor `dangerouslySetInnerHTML`.');\n // eslint-disable-next-line-no-fallthrough\n\n default:\n pushAttribute(target, responseState, propKey, propValue);\n break;\n }\n }\n }\n\n target.push(endOfStartTag);\n return null;\n}\n\nfunction pushStartTitle(target, props, responseState) {\n target.push(startChunkForTag('title'));\n var children = null;\n\n for (var propKey in props) {\n if (hasOwnProperty.call(props, propKey)) {\n var propValue = props[propKey];\n\n if (propValue == null) {\n continue;\n }\n\n switch (propKey) {\n case 'children':\n children = propValue;\n break;\n\n case 'dangerouslySetInnerHTML':\n throw new Error('`dangerouslySetInnerHTML` does not make sense on <title>.');\n // eslint-disable-next-line-no-fallthrough\n\n default:\n pushAttribute(target, responseState, propKey, propValue);\n break;\n }\n }\n }\n\n target.push(endOfStartTag);\n\n {\n var child = Array.isArray(children) && children.length < 2 ? children[0] || null : children;\n\n if (Array.isArray(children) && children.length > 1) {\n error('A title element received an array with more than 1 element as children. ' + 'In browsers title Elements can only have Text Nodes as children. If ' + 'the children being rendered output more than a single text node in aggregate the browser ' + 'will display markup and comments as text in the title and hydration will likely fail and ' + 'fall back to client rendering');\n } else if (child != null && child.$$typeof != null) {\n error('A title element received a React element for children. ' + 'In the browser title Elements can only have Text Nodes as children. If ' + 'the children being rendered output more than a single text node in aggregate the browser ' + 'will display markup and comments as text in the title and hydration will likely fail and ' + 'fall back to client rendering');\n } else if (child != null && typeof child !== 'string' && typeof child !== 'number') {\n error('A title element received a value that was not a string or number for children. ' + 'In the browser title Elements can only have Text Nodes as children. If ' + 'the children being rendered output more than a single text node in aggregate the browser ' + 'will display markup and comments as text in the title and hydration will likely fail and ' + 'fall back to client rendering');\n }\n }\n\n return children;\n}\n\nfunction pushStartGenericElement(target, props, tag, responseState) {\n target.push(startChunkForTag(tag));\n var children = null;\n var innerHTML = null;\n\n for (var propKey in props) {\n if (hasOwnProperty.call(props, propKey)) {\n var propValue = props[propKey];\n\n if (propValue == null) {\n continue;\n }\n\n switch (propKey) {\n case 'children':\n children = propValue;\n break;\n\n case 'dangerouslySetInnerHTML':\n innerHTML = propValue;\n break;\n\n default:\n pushAttribute(target, responseState, propKey, propValue);\n break;\n }\n }\n }\n\n target.push(endOfStartTag);\n pushInnerHTML(target, innerHTML, children);\n\n if (typeof children === 'string') {\n // Special case children as a string to avoid the unnecessary comment.\n // TODO: Remove this special case after the general optimization is in place.\n target.push(stringToChunk(encodeHTMLTextNode(children)));\n return null;\n }\n\n return children;\n}\n\nfunction pushStartCustomElement(target, props, tag, responseState) {\n target.push(startChunkForTag(tag));\n var children = null;\n var innerHTML = null;\n\n for (var propKey in props) {\n if (hasOwnProperty.call(props, propKey)) {\n var propValue = props[propKey];\n\n if (propValue == null) {\n continue;\n }\n\n switch (propKey) {\n case 'children':\n children = propValue;\n break;\n\n case 'dangerouslySetInnerHTML':\n innerHTML = propValue;\n break;\n\n case 'style':\n pushStyle(target, responseState, propValue);\n break;\n\n case 'suppressContentEditableWarning':\n case 'suppressHydrationWarning':\n // Ignored. These are built-in to React on the client.\n break;\n\n default:\n if (isAttributeNameSafe(propKey) && typeof propValue !== 'function' && typeof propValue !== 'symbol') {\n target.push(attributeSeparator, stringToChunk(propKey), attributeAssign, stringToChunk(escapeTextForBrowser(propValue)), attributeEnd);\n }\n\n break;\n }\n }\n }\n\n target.push(endOfStartTag);\n pushInnerHTML(target, innerHTML, children);\n return children;\n}\n\nvar leadingNewline = stringToPrecomputedChunk('\\n');\n\nfunction pushStartPreformattedElement(target, props, tag, responseState) {\n target.push(startChunkForTag(tag));\n var children = null;\n var innerHTML = null;\n\n for (var propKey in props) {\n if (hasOwnProperty.call(props, propKey)) {\n var propValue = props[propKey];\n\n if (propValue == null) {\n continue;\n }\n\n switch (propKey) {\n case 'children':\n children = propValue;\n break;\n\n case 'dangerouslySetInnerHTML':\n innerHTML = propValue;\n break;\n\n default:\n pushAttribute(target, responseState, propKey, propValue);\n break;\n }\n }\n }\n\n target.push(endOfStartTag); // text/html ignores the first character in these tags if it's a newline\n // Prefer to break application/xml over text/html (for now) by adding\n // a newline specifically to get eaten by the parser. (Alternately for\n // textareas, replacing \"^\\n\" with \"\\r\\n\" doesn't get eaten, and the first\n // \\r is normalized out by HTMLTextAreaElement#value.)\n // See: <http://www.w3.org/TR/html-polyglot/#newlines-in-textarea-and-pre>\n // See: <http://www.w3.org/TR/html5/syntax.html#element-restrictions>\n // See: <http://www.w3.org/TR/html5/syntax.html#newlines>\n // See: Parsing of \"textarea\" \"listing\" and \"pre\" elements\n // from <http://www.w3.org/TR/html5/syntax.html#parsing-main-inbody>\n // TODO: This doesn't deal with the case where the child is an array\n // or component that returns a string.\n\n if (innerHTML != null) {\n if (children != null) {\n throw new Error('Can only set one of `children` or `props.dangerouslySetInnerHTML`.');\n }\n\n if (typeof innerHTML !== 'object' || !('__html' in innerHTML)) {\n throw new Error('`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. ' + 'Please visit https://reactjs.org/link/dangerously-set-inner-html ' + 'for more information.');\n }\n\n var html = innerHTML.__html;\n\n if (html !== null && html !== undefined) {\n if (typeof html === 'string' && html.length > 0 && html[0] === '\\n') {\n target.push(leadingNewline, stringToChunk(html));\n } else {\n {\n checkHtmlStringCoercion(html);\n }\n\n target.push(stringToChunk('' + html));\n }\n }\n }\n\n if (typeof children === 'string' && children[0] === '\\n') {\n target.push(leadingNewline);\n }\n\n return children;\n} // We accept any tag to be rendered but since this gets injected into arbitrary\n// HTML, we want to make sure that it's a safe tag.\n// http://www.w3.org/TR/REC-xml/#NT-Name\n\n\nvar VALID_TAG_REGEX = /^[a-zA-Z][a-zA-Z:_\\.\\-\\d]*$/; // Simplified subset\n\nvar validatedTagCache = new Map();\n\nfunction startChunkForTag(tag) {\n var tagStartChunk = validatedTagCache.get(tag);\n\n if (tagStartChunk === undefined) {\n if (!VALID_TAG_REGEX.test(tag)) {\n throw new Error(\"Invalid tag: \" + tag);\n }\n\n tagStartChunk = stringToPrecomputedChunk('<' + tag);\n validatedTagCache.set(tag, tagStartChunk);\n }\n\n return tagStartChunk;\n}\n\nvar DOCTYPE = stringToPrecomputedChunk('<!DOCTYPE html>');\nfunction pushStartInstance(target, type, props, responseState, formatContext) {\n {\n validateProperties(type, props);\n validateProperties$1(type, props);\n validateProperties$2(type, props, null);\n\n if (!props.suppressContentEditableWarning && props.contentEditable && props.children != null) {\n error('A component is `contentEditable` and contains `children` managed by ' + 'React. It is now your responsibility to guarantee that none of ' + 'those nodes are unexpectedly modified or duplicated. This is ' + 'probably not intentional.');\n }\n\n if (formatContext.insertionMode !== SVG_MODE && formatContext.insertionMode !== MATHML_MODE) {\n if (type.indexOf('-') === -1 && typeof props.is !== 'string' && type.toLowerCase() !== type) {\n error('<%s /> is using incorrect casing. ' + 'Use PascalCase for React components, ' + 'or lowercase for HTML elements.', type);\n }\n }\n }\n\n switch (type) {\n // Special tags\n case 'select':\n return pushStartSelect(target, props, responseState);\n\n case 'option':\n return pushStartOption(target, props, responseState, formatContext);\n\n case 'textarea':\n return pushStartTextArea(target, props, responseState);\n\n case 'input':\n return pushInput(target, props, responseState);\n\n case 'menuitem':\n return pushStartMenuItem(target, props, responseState);\n\n case 'title':\n return pushStartTitle(target, props, responseState);\n // Newline eating tags\n\n case 'listing':\n case 'pre':\n {\n return pushStartPreformattedElement(target, props, type, responseState);\n }\n // Omitted close tags\n\n case 'area':\n case 'base':\n case 'br':\n case 'col':\n case 'embed':\n case 'hr':\n case 'img':\n case 'keygen':\n case 'link':\n case 'meta':\n case 'param':\n case 'source':\n case 'track':\n case 'wbr':\n {\n return pushSelfClosing(target, props, type, responseState);\n }\n // These are reserved SVG and MathML elements, that are never custom elements.\n // https://w3c.github.io/webcomponents/spec/custom/#custom-elements-core-concepts\n\n case 'annotation-xml':\n case 'color-profile':\n case 'font-face':\n case 'font-face-src':\n case 'font-face-uri':\n case 'font-face-format':\n case 'font-face-name':\n case 'missing-glyph':\n {\n return pushStartGenericElement(target, props, type, responseState);\n }\n\n case 'html':\n {\n if (formatContext.insertionMode === ROOT_HTML_MODE) {\n // If we're rendering the html tag and we're at the root (i.e. not in foreignObject)\n // then we also emit the DOCTYPE as part of the root content as a convenience for\n // rendering the whole document.\n target.push(DOCTYPE);\n }\n\n return pushStartGenericElement(target, props, type, responseState);\n }\n\n default:\n {\n if (type.indexOf('-') === -1 && typeof props.is !== 'string') {\n // Generic element\n return pushStartGenericElement(target, props, type, responseState);\n } else {\n // Custom element\n return pushStartCustomElement(target, props, type, responseState);\n }\n }\n }\n}\nvar endTag1 = stringToPrecomputedChunk('</');\nvar endTag2 = stringToPrecomputedChunk('>');\nfunction pushEndInstance(target, type, props) {\n switch (type) {\n // Omitted close tags\n // TODO: Instead of repeating this switch we could try to pass a flag from above.\n // That would require returning a tuple. Which might be ok if it gets inlined.\n case 'area':\n case 'base':\n case 'br':\n case 'col':\n case 'embed':\n case 'hr':\n case 'img':\n case 'input':\n case 'keygen':\n case 'link':\n case 'meta':\n case 'param':\n case 'source':\n case 'track':\n case 'wbr':\n {\n // No close tag needed.\n break;\n }\n\n default:\n {\n target.push(endTag1, stringToChunk(type), endTag2);\n }\n }\n}\nfunction writeCompletedRoot(destination, responseState) {\n var bootstrapChunks = responseState.bootstrapChunks;\n var i = 0;\n\n for (; i < bootstrapChunks.length - 1; i++) {\n writeChunk(destination, bootstrapChunks[i]);\n }\n\n if (i < bootstrapChunks.length) {\n return writeChunkAndReturn(destination, bootstrapChunks[i]);\n }\n\n return true;\n} // Structural Nodes\n// A placeholder is a node inside a hidden partial tree that can be filled in later, but before\n// display. It's never visible to users. We use the template tag because it can be used in every\n// type of parent. <script> tags also work in every other tag except <colgroup>.\n\nvar placeholder1 = stringToPrecomputedChunk('<template id=\"');\nvar placeholder2 = stringToPrecomputedChunk('\"></template>');\nfunction writePlaceholder(destination, responseState, id) {\n writeChunk(destination, placeholder1);\n writeChunk(destination, responseState.placeholderPrefix);\n var formattedID = stringToChunk(id.toString(16));\n writeChunk(destination, formattedID);\n return writeChunkAndReturn(destination, placeholder2);\n} // Suspense boundaries are encoded as comments.\n\nvar startCompletedSuspenseBoundary = stringToPrecomputedChunk('<!--$-->');\nvar startPendingSuspenseBoundary1 = stringToPrecomputedChunk('<!--$?--><template id=\"');\nvar startPendingSuspenseBoundary2 = stringToPrecomputedChunk('\"></template>');\nvar startClientRenderedSuspenseBoundary = stringToPrecomputedChunk('<!--$!-->');\nvar endSuspenseBoundary = stringToPrecomputedChunk('<!--/$-->');\nvar clientRenderedSuspenseBoundaryError1 = stringToPrecomputedChunk('<template');\nvar clientRenderedSuspenseBoundaryErrorAttrInterstitial = stringToPrecomputedChunk('\"');\nvar clientRenderedSuspenseBoundaryError1A = stringToPrecomputedChunk(' data-dgst=\"');\nvar clientRenderedSuspenseBoundaryError1B = stringToPrecomputedChunk(' data-msg=\"');\nvar clientRenderedSuspenseBoundaryError1C = stringToPrecomputedChunk(' data-stck=\"');\nvar clientRenderedSuspenseBoundaryError2 = stringToPrecomputedChunk('></template>');\nfunction writeStartCompletedSuspenseBoundary(destination, responseState) {\n return writeChunkAndReturn(destination, startCompletedSuspenseBoundary);\n}\nfunction writeStartPendingSuspenseBoundary(destination, responseState, id) {\n writeChunk(destination, startPendingSuspenseBoundary1);\n\n if (id === null) {\n throw new Error('An ID must have been assigned before we can complete the boundary.');\n }\n\n writeChunk(destination, id);\n return writeChunkAndReturn(destination, startPendingSuspenseBoundary2);\n}\nfunction writeStartClientRenderedSuspenseBoundary(destination, responseState, errorDigest, errorMesssage, errorComponentStack) {\n var result;\n result = writeChunkAndReturn(destination, startClientRenderedSuspenseBoundary);\n writeChunk(destination, clientRenderedSuspenseBoundaryError1);\n\n if (errorDigest) {\n writeChunk(destination, clientRenderedSuspenseBoundaryError1A);\n writeChunk(destination, stringToChunk(escapeTextForBrowser(errorDigest)));\n writeChunk(destination, clientRenderedSuspenseBoundaryErrorAttrInterstitial);\n }\n\n {\n if (errorMesssage) {\n writeChunk(destination, clientRenderedSuspenseBoundaryError1B);\n writeChunk(destination, stringToChunk(escapeTextForBrowser(errorMesssage)));\n writeChunk(destination, clientRenderedSuspenseBoundaryErrorAttrInterstitial);\n }\n\n if (errorComponentStack) {\n writeChunk(destination, clientRenderedSuspenseBoundaryError1C);\n writeChunk(destination, stringToChunk(escapeTextForBrowser(errorComponentStack)));\n writeChunk(destination, clientRenderedSuspenseBoundaryErrorAttrInterstitial);\n }\n }\n\n result = writeChunkAndReturn(destination, clientRenderedSuspenseBoundaryError2);\n return result;\n}\nfunction writeEndCompletedSuspenseBoundary(destination, responseState) {\n return writeChunkAndReturn(destination, endSuspenseBoundary);\n}\nfunction writeEndPendingSuspenseBoundary(destination, responseState) {\n return writeChunkAndReturn(destination, endSuspenseBoundary);\n}\nfunction writeEndClientRenderedSuspenseBoundary(destination, responseState) {\n return writeChunkAndReturn(destination, endSuspenseBoundary);\n}\nvar startSegmentHTML = stringToPrecomputedChunk('<div hidden id=\"');\nvar startSegmentHTML2 = stringToPrecomputedChunk('\">');\nvar endSegmentHTML = stringToPrecomputedChunk('</div>');\nvar startSegmentSVG = stringToPrecomputedChunk('<svg aria-hidden=\"true\" style=\"display:none\" id=\"');\nvar startSegmentSVG2 = stringToPrecomputedChunk('\">');\nvar endSegmentSVG = stringToPrecomputedChunk('</svg>');\nvar startSegmentMathML = stringToPrecomputedChunk('<math aria-hidden=\"true\" style=\"display:none\" id=\"');\nvar startSegmentMathML2 = stringToPrecomputedChunk('\">');\nvar endSegmentMathML = stringToPrecomputedChunk('</math>');\nvar startSegmentTable = stringToPrecomputedChunk('<table hidden id=\"');\nvar startSegmentTable2 = stringToPrecomputedChunk('\">');\nvar endSegmentTable = stringToPrecomputedChunk('</table>');\nvar startSegmentTableBody = stringToPrecomputedChunk('<table hidden><tbody id=\"');\nvar startSegmentTableBody2 = stringToPrecomputedChunk('\">');\nvar endSegmentTableBody = stringToPrecomputedChunk('</tbody></table>');\nvar startSegmentTableRow = stringToPrecomputedChunk('<table hidden><tr id=\"');\nvar startSegmentTableRow2 = stringToPrecomputedChunk('\">');\nvar endSegmentTableRow = stringToPrecomputedChunk('</tr></table>');\nvar startSegmentColGroup = stringToPrecomputedChunk('<table hidden><colgroup id=\"');\nvar startSegmentColGroup2 = stringToPrecomputedChunk('\">');\nvar endSegmentColGroup = stringToPrecomputedChunk('</colgroup></table>');\nfunction writeStartSegment(destination, responseState, formatContext, id) {\n switch (formatContext.insertionMode) {\n case ROOT_HTML_MODE:\n case HTML_MODE:\n {\n writeChunk(destination, startSegmentHTML);\n writeChunk(destination, responseState.segmentPrefix);\n writeChunk(destination, stringToChunk(id.toString(16)));\n return writeChunkAndReturn(destination, startSegmentHTML2);\n }\n\n case SVG_MODE:\n {\n writeChunk(destination, startSegmentSVG);\n writeChunk(destination, responseState.segmentPrefix);\n writeChunk(destination, stringToChunk(id.toString(16)));\n return writeChunkAndReturn(destination, startSegmentSVG2);\n }\n\n case MATHML_MODE:\n {\n writeChunk(destination, startSegmentMathML);\n writeChunk(destination, responseState.segmentPrefix);\n writeChunk(destination, stringToChunk(id.toString(16)));\n return writeChunkAndReturn(destination, startSegmentMathML2);\n }\n\n case HTML_TABLE_MODE:\n {\n writeChunk(destination, startSegmentTable);\n writeChunk(destination, responseState.segmentPrefix);\n writeChunk(destination, stringToChunk(id.toString(16)));\n return writeChunkAndReturn(destination, startSegmentTable2);\n }\n // TODO: For the rest of these, there will be extra wrapper nodes that never\n // get deleted from the document. We need to delete the table too as part\n // of the injected scripts. They are invisible though so it's not too terrible\n // and it's kind of an edge case to suspend in a table. Totally supported though.\n\n case HTML_TABLE_BODY_MODE:\n {\n writeChunk(destination, startSegmentTableBody);\n writeChunk(destination, responseState.segmentPrefix);\n writeChunk(destination, stringToChunk(id.toString(16)));\n return writeChunkAndReturn(destination, startSegmentTableBody2);\n }\n\n case HTML_TABLE_ROW_MODE:\n {\n writeChunk(destination, startSegmentTableRow);\n writeChunk(destination, responseState.segmentPrefix);\n writeChunk(destination, stringToChunk(id.toString(16)));\n return writeChunkAndReturn(destination, startSegmentTableRow2);\n }\n\n case HTML_COLGROUP_MODE:\n {\n writeChunk(destination, startSegmentColGroup);\n writeChunk(destination, responseState.segmentPrefix);\n writeChunk(destination, stringToChunk(id.toString(16)));\n return writeChunkAndReturn(destination, startSegmentColGroup2);\n }\n\n default:\n {\n throw new Error('Unknown insertion mode. This is a bug in React.');\n }\n }\n}\nfunction writeEndSegment(destination, formatContext) {\n switch (formatContext.insertionMode) {\n case ROOT_HTML_MODE:\n case HTML_MODE:\n {\n return writeChunkAndReturn(destination, endSegmentHTML);\n }\n\n case SVG_MODE:\n {\n return writeChunkAndReturn(destination, endSegmentSVG);\n }\n\n case MATHML_MODE:\n {\n return writeChunkAndReturn(destination, endSegmentMathML);\n }\n\n case HTML_TABLE_MODE:\n {\n return writeChunkAndReturn(destination, endSegmentTable);\n }\n\n case HTML_TABLE_BODY_MODE:\n {\n return writeChunkAndReturn(destination, endSegmentTableBody);\n }\n\n case HTML_TABLE_ROW_MODE:\n {\n return writeChunkAndReturn(destination, endSegmentTableRow);\n }\n\n case HTML_COLGROUP_MODE:\n {\n return writeChunkAndReturn(destination, endSegmentColGroup);\n }\n\n default:\n {\n throw new Error('Unknown insertion mode. This is a bug in React.');\n }\n }\n} // Instruction Set\n// The following code is the source scripts that we then minify and inline below,\n// with renamed function names that we hope don't collide:\n// const COMMENT_NODE = 8;\n// const SUSPENSE_START_DATA = '$';\n// const SUSPENSE_END_DATA = '/$';\n// const SUSPENSE_PENDING_START_DATA = '$?';\n// const SUSPENSE_FALLBACK_START_DATA = '$!';\n//\n// function clientRenderBoundary(suspenseBoundaryID, errorDigest, errorMsg, errorComponentStack) {\n// // Find the fallback's first element.\n// const suspenseIdNode = document.getElementById(suspenseBoundaryID);\n// if (!suspenseIdNode) {\n// // The user must have already navigated away from this tree.\n// // E.g. because the parent was hydrated.\n// return;\n// }\n// // Find the boundary around the fallback. This is always the previous node.\n// const suspenseNode = suspenseIdNode.previousSibling;\n// // Tag it to be client rendered.\n// suspenseNode.data = SUSPENSE_FALLBACK_START_DATA;\n// // assign error metadata to first sibling\n// let dataset = suspenseIdNode.dataset;\n// if (errorDigest) dataset.dgst = errorDigest;\n// if (errorMsg) dataset.msg = errorMsg;\n// if (errorComponentStack) dataset.stck = errorComponentStack;\n// // Tell React to retry it if the parent already hydrated.\n// if (suspenseNode._reactRetry) {\n// suspenseNode._reactRetry();\n// }\n// }\n//\n// function completeBoundary(suspenseBoundaryID, contentID) {\n// // Find the fallback's first element.\n// const suspenseIdNode = document.getElementById(suspenseBoundaryID);\n// const contentNode = document.getElementById(contentID);\n// // We'll detach the content node so that regardless of what happens next we don't leave in the tree.\n// // This might also help by not causing recalcing each time we move a child from here to the target.\n// contentNode.parentNode.removeChild(contentNode);\n// if (!suspenseIdNode) {\n// // The user must have already navigated away from this tree.\n// // E.g. because the parent was hydrated. That's fine there's nothing to do\n// // but we have to make sure that we already deleted the container node.\n// return;\n// }\n// // Find the boundary around the fallback. This is always the previous node.\n// const suspenseNode = suspenseIdNode.previousSibling;\n//\n// // Clear all the existing children. This is complicated because\n// // there can be embedded Suspense boundaries in the fallback.\n// // This is similar to clearSuspenseBoundary in ReactDOMHostConfig.\n// // TODO: We could avoid this if we never emitted suspense boundaries in fallback trees.\n// // They never hydrate anyway. However, currently we support incrementally loading the fallback.\n// const parentInstance = suspenseNode.parentNode;\n// let node = suspenseNode.nextSibling;\n// let depth = 0;\n// do {\n// if (node && node.nodeType === COMMENT_NODE) {\n// const data = node.data;\n// if (data === SUSPENSE_END_DATA) {\n// if (depth === 0) {\n// break;\n// } else {\n// depth--;\n// }\n// } else if (\n// data === SUSPENSE_START_DATA ||\n// data === SUSPENSE_PENDING_START_DATA ||\n// data === SUSPENSE_FALLBACK_START_DATA\n// ) {\n// depth++;\n// }\n// }\n//\n// const nextNode = node.nextSibling;\n// parentInstance.removeChild(node);\n// node = nextNode;\n// } while (node);\n//\n// const endOfBoundary = node;\n//\n// // Insert all the children from the contentNode between the start and end of suspense boundary.\n// while (contentNode.firstChild) {\n// parentInstance.insertBefore(contentNode.firstChild, endOfBoundary);\n// }\n// suspenseNode.data = SUSPENSE_START_DATA;\n// if (suspenseNode._reactRetry) {\n// suspenseNode._reactRetry();\n// }\n// }\n//\n// function completeSegment(containerID, placeholderID) {\n// const segmentContainer = document.getElementById(containerID);\n// const placeholderNode = document.getElementById(placeholderID);\n// // We always expect both nodes to exist here because, while we might\n// // have navigated away from the main tree, we still expect the detached\n// // tree to exist.\n// segmentContainer.parentNode.removeChild(segmentContainer);\n// while (segmentContainer.firstChild) {\n// placeholderNode.parentNode.insertBefore(\n// segmentContainer.firstChild,\n// placeholderNode,\n// );\n// }\n// placeholderNode.parentNode.removeChild(placeholderNode);\n// }\n\nvar completeSegmentFunction = 'function $RS(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)}';\nvar completeBoundaryFunction = 'function $RC(a,b){a=document.getElementById(a);b=document.getElementById(b);b.parentNode.removeChild(b);if(a){a=a.previousSibling;var f=a.parentNode,c=a.nextSibling,e=0;do{if(c&&8===c.nodeType){var d=c.data;if(\"/$\"===d)if(0===e)break;else e--;else\"$\"!==d&&\"$?\"!==d&&\"$!\"!==d||e++}d=c.nextSibling;f.removeChild(c);c=d}while(c);for(;b.firstChild;)f.insertBefore(b.firstChild,c);a.data=\"$\";a._reactRetry&&a._reactRetry()}}';\nvar clientRenderFunction = 'function $RX(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data=\"$!\",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())}';\nvar completeSegmentScript1Full = stringToPrecomputedChunk(completeSegmentFunction + ';$RS(\"');\nvar completeSegmentScript1Partial = stringToPrecomputedChunk('$RS(\"');\nvar completeSegmentScript2 = stringToPrecomputedChunk('\",\"');\nvar completeSegmentScript3 = stringToPrecomputedChunk('\")</script>');\nfunction writeCompletedSegmentInstruction(destination, responseState, contentSegmentID) {\n writeChunk(destination, responseState.startInlineScript);\n\n if (!responseState.sentCompleteSegmentFunction) {\n // The first time we write this, we'll need to include the full implementation.\n responseState.sentCompleteSegmentFunction = true;\n writeChunk(destination, completeSegmentScript1Full);\n } else {\n // Future calls can just reuse the same function.\n writeChunk(destination, completeSegmentScript1Partial);\n }\n\n writeChunk(destination, responseState.segmentPrefix);\n var formattedID = stringToChunk(contentSegmentID.toString(16));\n writeChunk(destination, formattedID);\n writeChunk(destination, completeSegmentScript2);\n writeChunk(destination, responseState.placeholderPrefix);\n writeChunk(destination, formattedID);\n return writeChunkAndReturn(destination, completeSegmentScript3);\n}\nvar completeBoundaryScript1Full = stringToPrecomputedChunk(completeBoundaryFunction + ';$RC(\"');\nvar completeBoundaryScript1Partial = stringToPrecomputedChunk('$RC(\"');\nvar completeBoundaryScript2 = stringToPrecomputedChunk('\",\"');\nvar completeBoundaryScript3 = stringToPrecomputedChunk('\")</script>');\nfunction writeCompletedBoundaryInstruction(destination, responseState, boundaryID, contentSegmentID) {\n writeChunk(destination, responseState.startInlineScript);\n\n if (!responseState.sentCompleteBoundaryFunction) {\n // The first time we write this, we'll need to include the full implementation.\n responseState.sentCompleteBoundaryFunction = true;\n writeChunk(destination, completeBoundaryScript1Full);\n } else {\n // Future calls can just reuse the same function.\n writeChunk(destination, completeBoundaryScript1Partial);\n }\n\n if (boundaryID === null) {\n throw new Error('An ID must have been assigned before we can complete the boundary.');\n }\n\n var formattedContentID = stringToChunk(contentSegmentID.toString(16));\n writeChunk(destination, boundaryID);\n writeChunk(destination, completeBoundaryScript2);\n writeChunk(destination, responseState.segmentPrefix);\n writeChunk(destination, formattedContentID);\n return writeChunkAndReturn(destination, completeBoundaryScript3);\n}\nvar clientRenderScript1Full = stringToPrecomputedChunk(clientRenderFunction + ';$RX(\"');\nvar clientRenderScript1Partial = stringToPrecomputedChunk('$RX(\"');\nvar clientRenderScript1A = stringToPrecomputedChunk('\"');\nvar clientRenderScript2 = stringToPrecomputedChunk(')</script>');\nvar clientRenderErrorScriptArgInterstitial = stringToPrecomputedChunk(',');\nfunction writeClientRenderBoundaryInstruction(destination, responseState, boundaryID, errorDigest, errorMessage, errorComponentStack) {\n writeChunk(destination, responseState.startInlineScript);\n\n if (!responseState.sentClientRenderFunction) {\n // The first time we write this, we'll need to include the full implementation.\n responseState.sentClientRenderFunction = true;\n writeChunk(destination, clientRenderScript1Full);\n } else {\n // Future calls can just reuse the same function.\n writeChunk(destination, clientRenderScript1Partial);\n }\n\n if (boundaryID === null) {\n throw new Error('An ID must have been assigned before we can complete the boundary.');\n }\n\n writeChunk(destination, boundaryID);\n writeChunk(destination, clientRenderScript1A);\n\n if (errorDigest || errorMessage || errorComponentStack) {\n writeChunk(destination, clientRenderErrorScriptArgInterstitial);\n writeChunk(destination, stringToChunk(escapeJSStringsForInstructionScripts(errorDigest || '')));\n }\n\n if (errorMessage || errorComponentStack) {\n writeChunk(destination, clientRenderErrorScriptArgInterstitial);\n writeChunk(destination, stringToChunk(escapeJSStringsForInstructionScripts(errorMessage || '')));\n }\n\n if (errorComponentStack) {\n writeChunk(destination, clientRenderErrorScriptArgInterstitial);\n writeChunk(destination, stringToChunk(escapeJSStringsForInstructionScripts(errorComponentStack)));\n }\n\n return writeChunkAndReturn(destination, clientRenderScript2);\n}\nvar regexForJSStringsInScripts = /[<\\u2028\\u2029]/g;\n\nfunction escapeJSStringsForInstructionScripts(input) {\n var escaped = JSON.stringify(input);\n return escaped.replace(regexForJSStringsInScripts, function (match) {\n switch (match) {\n // santizing breaking out of strings and script tags\n case '<':\n return \"\\\\u003c\";\n\n case \"\\u2028\":\n return \"\\\\u2028\";\n\n case \"\\u2029\":\n return \"\\\\u2029\";\n\n default:\n {\n // eslint-disable-next-line react-internal/prod-error-codes\n throw new Error('escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React');\n }\n }\n });\n}\n\nvar assign = Object.assign;\n\n// ATTENTION\n// When adding new symbols to this file,\n// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'\n// The Symbol used to tag the ReactElement-like types.\nvar REACT_ELEMENT_TYPE = Symbol.for('react.element');\nvar REACT_PORTAL_TYPE = Symbol.for('react.portal');\nvar REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');\nvar REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');\nvar REACT_PROFILER_TYPE = Symbol.for('react.profiler');\nvar REACT_PROVIDER_TYPE = Symbol.for('react.provider');\nvar REACT_CONTEXT_TYPE = Symbol.for('react.context');\nvar REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');\nvar REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');\nvar REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');\nvar REACT_MEMO_TYPE = Symbol.for('react.memo');\nvar REACT_LAZY_TYPE = Symbol.for('react.lazy');\nvar REACT_SCOPE_TYPE = Symbol.for('react.scope');\nvar REACT_DEBUG_TRACING_MODE_TYPE = Symbol.for('react.debug_trace_mode');\nvar REACT_LEGACY_HIDDEN_TYPE = Symbol.for('react.legacy_hidden');\nvar REACT_SERVER_CONTEXT_DEFAULT_VALUE_NOT_LOADED = Symbol.for('react.default_value');\nvar MAYBE_ITERATOR_SYMBOL = Symbol.iterator;\nvar FAUX_ITERATOR_SYMBOL = '@@iterator';\nfunction getIteratorFn(maybeIterable) {\n if (maybeIterable === null || typeof maybeIterable !== 'object') {\n return null;\n }\n\n var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];\n\n if (typeof maybeIterator === 'function') {\n return maybeIterator;\n }\n\n return null;\n}\n\nfunction getWrappedName(outerType, innerType, wrapperName) {\n var displayName = outerType.displayName;\n\n if (displayName) {\n return displayName;\n }\n\n var functionName = innerType.displayName || innerType.name || '';\n return functionName !== '' ? wrapperName + \"(\" + functionName + \")\" : wrapperName;\n} // Keep in sync with react-reconciler/getComponentNameFromFiber\n\n\nfunction getContextName(type) {\n return type.displayName || 'Context';\n} // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead.\n\n\nfunction getComponentNameFromType(type) {\n if (type == null) {\n // Host root, text node or just invalid type.\n return null;\n }\n\n {\n if (typeof type.tag === 'number') {\n error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.');\n }\n }\n\n if (typeof type === 'function') {\n return type.displayName || type.name || null;\n }\n\n if (typeof type === 'string') {\n return type;\n }\n\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return 'Fragment';\n\n case REACT_PORTAL_TYPE:\n return 'Portal';\n\n case REACT_PROFILER_TYPE:\n return 'Profiler';\n\n case REACT_STRICT_MODE_TYPE:\n return 'StrictMode';\n\n case REACT_SUSPENSE_TYPE:\n return 'Suspense';\n\n case REACT_SUSPENSE_LIST_TYPE:\n return 'SuspenseList';\n\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_CONTEXT_TYPE:\n var context = type;\n return getContextName(context) + '.Consumer';\n\n case REACT_PROVIDER_TYPE:\n var provider = type;\n return getContextName(provider._context) + '.Provider';\n\n case REACT_FORWARD_REF_TYPE:\n return getWrappedName(type, type.render, 'ForwardRef');\n\n case REACT_MEMO_TYPE:\n var outerName = type.displayName || null;\n\n if (outerName !== null) {\n return outerName;\n }\n\n return getComponentNameFromType(type.type) || 'Memo';\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n return getComponentNameFromType(init(payload));\n } catch (x) {\n return null;\n }\n }\n\n // eslint-disable-next-line no-fallthrough\n }\n }\n\n return null;\n}\n\n// Helpers to patch console.logs to avoid logging during side-effect free\n// replaying on render function. This currently only patches the object\n// lazily which won't cover if the log function was extracted eagerly.\n// We could also eagerly patch the method.\nvar disabledDepth = 0;\nvar prevLog;\nvar prevInfo;\nvar prevWarn;\nvar prevError;\nvar prevGroup;\nvar prevGroupCollapsed;\nvar prevGroupEnd;\n\nfunction disabledLog() {}\n\ndisabledLog.__reactDisabledLog = true;\nfunction disableLogs() {\n {\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n prevLog = console.log;\n prevInfo = console.info;\n prevWarn = console.warn;\n prevError = console.error;\n prevGroup = console.group;\n prevGroupCollapsed = console.groupCollapsed;\n prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099\n\n var props = {\n configurable: true,\n enumerable: true,\n value: disabledLog,\n writable: true\n }; // $FlowFixMe Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n info: props,\n log: props,\n warn: props,\n error: props,\n group: props,\n groupCollapsed: props,\n groupEnd: props\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n disabledDepth++;\n }\n}\nfunction reenableLogs() {\n {\n disabledDepth--;\n\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n var props = {\n configurable: true,\n enumerable: true,\n writable: true\n }; // $FlowFixMe Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n log: assign({}, props, {\n value: prevLog\n }),\n info: assign({}, props, {\n value: prevInfo\n }),\n warn: assign({}, props, {\n value: prevWarn\n }),\n error: assign({}, props, {\n value: prevError\n }),\n group: assign({}, props, {\n value: prevGroup\n }),\n groupCollapsed: assign({}, props, {\n value: prevGroupCollapsed\n }),\n groupEnd: assign({}, props, {\n value: prevGroupEnd\n })\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n if (disabledDepth < 0) {\n error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');\n }\n }\n}\n\nvar ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;\nvar prefix;\nfunction describeBuiltInComponentFrame(name, source, ownerFn) {\n {\n if (prefix === undefined) {\n // Extract the VM specific prefix used by each line.\n try {\n throw Error();\n } catch (x) {\n var match = x.stack.trim().match(/\\n( *(at )?)/);\n prefix = match && match[1] || '';\n }\n } // We use the prefix to ensure our stacks line up with native stack frames.\n\n\n return '\\n' + prefix + name;\n }\n}\nvar reentry = false;\nvar componentFrameCache;\n\n{\n var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;\n componentFrameCache = new PossiblyWeakMap();\n}\n\nfunction describeNativeComponentFrame(fn, construct) {\n // If something asked for a stack inside a fake render, it should get ignored.\n if ( !fn || reentry) {\n return '';\n }\n\n {\n var frame = componentFrameCache.get(fn);\n\n if (frame !== undefined) {\n return frame;\n }\n }\n\n var control;\n reentry = true;\n var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.\n\n Error.prepareStackTrace = undefined;\n var previousDispatcher;\n\n {\n previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function\n // for warnings.\n\n ReactCurrentDispatcher.current = null;\n disableLogs();\n }\n\n try {\n // This should throw.\n if (construct) {\n // Something should be setting the props in the constructor.\n var Fake = function () {\n throw Error();\n }; // $FlowFixMe\n\n\n Object.defineProperty(Fake.prototype, 'props', {\n set: function () {\n // We use a throwing setter instead of frozen or non-writable props\n // because that won't throw in a non-strict mode function.\n throw Error();\n }\n });\n\n if (typeof Reflect === 'object' && Reflect.construct) {\n // We construct a different control for this case to include any extra\n // frames added by the construct call.\n try {\n Reflect.construct(Fake, []);\n } catch (x) {\n control = x;\n }\n\n Reflect.construct(fn, [], Fake);\n } else {\n try {\n Fake.call();\n } catch (x) {\n control = x;\n }\n\n fn.call(Fake.prototype);\n }\n } else {\n try {\n throw Error();\n } catch (x) {\n control = x;\n }\n\n fn();\n }\n } catch (sample) {\n // This is inlined manually because closure doesn't do it for us.\n if (sample && control && typeof sample.stack === 'string') {\n // This extracts the first frame from the sample that isn't also in the control.\n // Skipping one frame that we assume is the frame that calls the two.\n var sampleLines = sample.stack.split('\\n');\n var controlLines = control.stack.split('\\n');\n var s = sampleLines.length - 1;\n var c = controlLines.length - 1;\n\n while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {\n // We expect at least one stack frame to be shared.\n // Typically this will be the root most one. However, stack frames may be\n // cut off due to maximum stack limits. In this case, one maybe cut off\n // earlier than the other. We assume that the sample is longer or the same\n // and there for cut off earlier. So we should find the root most frame in\n // the sample somewhere in the control.\n c--;\n }\n\n for (; s >= 1 && c >= 0; s--, c--) {\n // Next we find the first one that isn't the same which should be the\n // frame that called our sample function and the control.\n if (sampleLines[s] !== controlLines[c]) {\n // In V8, the first line is describing the message but other VMs don't.\n // If we're about to return the first line, and the control is also on the same\n // line, that's a pretty good indicator that our sample threw at same line as\n // the control. I.e. before we entered the sample frame. So we ignore this result.\n // This can happen if you passed a class to function component, or non-function.\n if (s !== 1 || c !== 1) {\n do {\n s--;\n c--; // We may still have similar intermediate frames from the construct call.\n // The next one that isn't the same should be our match though.\n\n if (c < 0 || sampleLines[s] !== controlLines[c]) {\n // V8 adds a \"new\" prefix for native classes. Let's remove it to make it prettier.\n var _frame = '\\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled \"<anonymous>\"\n // but we have a user-provided \"displayName\"\n // splice it in to make the stack more readable.\n\n\n if (fn.displayName && _frame.includes('<anonymous>')) {\n _frame = _frame.replace('<anonymous>', fn.displayName);\n }\n\n {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, _frame);\n }\n } // Return the line we found.\n\n\n return _frame;\n }\n } while (s >= 1 && c >= 0);\n }\n\n break;\n }\n }\n }\n } finally {\n reentry = false;\n\n {\n ReactCurrentDispatcher.current = previousDispatcher;\n reenableLogs();\n }\n\n Error.prepareStackTrace = previousPrepareStackTrace;\n } // Fallback to just using the name if we couldn't make it throw.\n\n\n var name = fn ? fn.displayName || fn.name : '';\n var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';\n\n {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, syntheticFrame);\n }\n }\n\n return syntheticFrame;\n}\n\nfunction describeClassComponentFrame(ctor, source, ownerFn) {\n {\n return describeNativeComponentFrame(ctor, true);\n }\n}\nfunction describeFunctionComponentFrame(fn, source, ownerFn) {\n {\n return describeNativeComponentFrame(fn, false);\n }\n}\n\nfunction shouldConstruct(Component) {\n var prototype = Component.prototype;\n return !!(prototype && prototype.isReactComponent);\n}\n\nfunction describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {\n\n if (type == null) {\n return '';\n }\n\n if (typeof type === 'function') {\n {\n return describeNativeComponentFrame(type, shouldConstruct(type));\n }\n }\n\n if (typeof type === 'string') {\n return describeBuiltInComponentFrame(type);\n }\n\n switch (type) {\n case REACT_SUSPENSE_TYPE:\n return describeBuiltInComponentFrame('Suspense');\n\n case REACT_SUSPENSE_LIST_TYPE:\n return describeBuiltInComponentFrame('SuspenseList');\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_FORWARD_REF_TYPE:\n return describeFunctionComponentFrame(type.render);\n\n case REACT_MEMO_TYPE:\n // Memo may contain any component type so we recursively resolve it.\n return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n // Lazy may contain any component type so we recursively resolve it.\n return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);\n } catch (x) {}\n }\n }\n }\n\n return '';\n}\n\nvar loggedTypeFailures = {};\nvar ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n\nfunction setCurrentlyValidatingElement(element) {\n {\n if (element) {\n var owner = element._owner;\n var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n ReactDebugCurrentFrame.setExtraStackFrame(stack);\n } else {\n ReactDebugCurrentFrame.setExtraStackFrame(null);\n }\n }\n}\n\nfunction checkPropTypes(typeSpecs, values, location, componentName, element) {\n {\n // $FlowFixMe This is okay but Flow doesn't know it.\n var has = Function.call.bind(hasOwnProperty);\n\n for (var typeSpecName in typeSpecs) {\n if (has(typeSpecs, typeSpecName)) {\n var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n if (typeof typeSpecs[typeSpecName] !== 'function') {\n // eslint-disable-next-line react-internal/prod-error-codes\n var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');\n err.name = 'Invariant Violation';\n throw err;\n }\n\n error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');\n } catch (ex) {\n error$1 = ex;\n }\n\n if (error$1 && !(error$1 instanceof Error)) {\n setCurrentlyValidatingElement(element);\n\n error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1);\n\n setCurrentlyValidatingElement(null);\n }\n\n if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error$1.message] = true;\n setCurrentlyValidatingElement(element);\n\n error('Failed %s type: %s', location, error$1.message);\n\n setCurrentlyValidatingElement(null);\n }\n }\n }\n }\n}\n\nvar warnedAboutMissingGetChildContext;\n\n{\n warnedAboutMissingGetChildContext = {};\n}\n\nvar emptyContextObject = {};\n\n{\n Object.freeze(emptyContextObject);\n}\n\nfunction getMaskedContext(type, unmaskedContext) {\n {\n var contextTypes = type.contextTypes;\n\n if (!contextTypes) {\n return emptyContextObject;\n }\n\n var context = {};\n\n for (var key in contextTypes) {\n context[key] = unmaskedContext[key];\n }\n\n {\n var name = getComponentNameFromType(type) || 'Unknown';\n checkPropTypes(contextTypes, context, 'context', name);\n }\n\n return context;\n }\n}\nfunction processChildContext(instance, type, parentContext, childContextTypes) {\n {\n // TODO (bvaughn) Replace this behavior with an invariant() in the future.\n // It has only been added in Fiber to match the (unintentional) behavior in Stack.\n if (typeof instance.getChildContext !== 'function') {\n {\n var componentName = getComponentNameFromType(type) || 'Unknown';\n\n if (!warnedAboutMissingGetChildContext[componentName]) {\n warnedAboutMissingGetChildContext[componentName] = true;\n\n error('%s.childContextTypes is specified but there is no getChildContext() method ' + 'on the instance. You can either define getChildContext() on %s or remove ' + 'childContextTypes from it.', componentName, componentName);\n }\n }\n\n return parentContext;\n }\n\n var childContext = instance.getChildContext();\n\n for (var contextKey in childContext) {\n if (!(contextKey in childContextTypes)) {\n throw new Error((getComponentNameFromType(type) || 'Unknown') + \".getChildContext(): key \\\"\" + contextKey + \"\\\" is not defined in childContextTypes.\");\n }\n }\n\n {\n var name = getComponentNameFromType(type) || 'Unknown';\n checkPropTypes(childContextTypes, childContext, 'child context', name);\n }\n\n return assign({}, parentContext, childContext);\n }\n}\n\nvar rendererSigil;\n\n{\n // Use this to detect multiple renderers using the same context\n rendererSigil = {};\n} // Used to store the parent path of all context overrides in a shared linked list.\n// Forming a reverse tree.\n\n\nvar rootContextSnapshot = null; // We assume that this runtime owns the \"current\" field on all ReactContext instances.\n// This global (actually thread local) state represents what state all those \"current\",\n// fields are currently in.\n\nvar currentActiveSnapshot = null;\n\nfunction popNode(prev) {\n {\n prev.context._currentValue = prev.parentValue;\n }\n}\n\nfunction pushNode(next) {\n {\n next.context._currentValue = next.value;\n }\n}\n\nfunction popToNearestCommonAncestor(prev, next) {\n if (prev === next) ; else {\n popNode(prev);\n var parentPrev = prev.parent;\n var parentNext = next.parent;\n\n if (parentPrev === null) {\n if (parentNext !== null) {\n throw new Error('The stacks must reach the root at the same time. This is a bug in React.');\n }\n } else {\n if (parentNext === null) {\n throw new Error('The stacks must reach the root at the same time. This is a bug in React.');\n }\n\n popToNearestCommonAncestor(parentPrev, parentNext);\n } // On the way back, we push the new ones that weren't common.\n\n\n pushNode(next);\n }\n}\n\nfunction popAllPrevious(prev) {\n popNode(prev);\n var parentPrev = prev.parent;\n\n if (parentPrev !== null) {\n popAllPrevious(parentPrev);\n }\n}\n\nfunction pushAllNext(next) {\n var parentNext = next.parent;\n\n if (parentNext !== null) {\n pushAllNext(parentNext);\n }\n\n pushNode(next);\n}\n\nfunction popPreviousToCommonLevel(prev, next) {\n popNode(prev);\n var parentPrev = prev.parent;\n\n if (parentPrev === null) {\n throw new Error('The depth must equal at least at zero before reaching the root. This is a bug in React.');\n }\n\n if (parentPrev.depth === next.depth) {\n // We found the same level. Now we just need to find a shared ancestor.\n popToNearestCommonAncestor(parentPrev, next);\n } else {\n // We must still be deeper.\n popPreviousToCommonLevel(parentPrev, next);\n }\n}\n\nfunction popNextToCommonLevel(prev, next) {\n var parentNext = next.parent;\n\n if (parentNext === null) {\n throw new Error('The depth must equal at least at zero before reaching the root. This is a bug in React.');\n }\n\n if (prev.depth === parentNext.depth) {\n // We found the same level. Now we just need to find a shared ancestor.\n popToNearestCommonAncestor(prev, parentNext);\n } else {\n // We must still be deeper.\n popNextToCommonLevel(prev, parentNext);\n }\n\n pushNode(next);\n} // Perform context switching to the new snapshot.\n// To make it cheap to read many contexts, while not suspending, we make the switch eagerly by\n// updating all the context's current values. That way reads, always just read the current value.\n// At the cost of updating contexts even if they're never read by this subtree.\n\n\nfunction switchContext(newSnapshot) {\n // The basic algorithm we need to do is to pop back any contexts that are no longer on the stack.\n // We also need to update any new contexts that are now on the stack with the deepest value.\n // The easiest way to update new contexts is to just reapply them in reverse order from the\n // perspective of the backpointers. To avoid allocating a lot when switching, we use the stack\n // for that. Therefore this algorithm is recursive.\n // 1) First we pop which ever snapshot tree was deepest. Popping old contexts as we go.\n // 2) Then we find the nearest common ancestor from there. Popping old contexts as we go.\n // 3) Then we reapply new contexts on the way back up the stack.\n var prev = currentActiveSnapshot;\n var next = newSnapshot;\n\n if (prev !== next) {\n if (prev === null) {\n // $FlowFixMe: This has to be non-null since it's not equal to prev.\n pushAllNext(next);\n } else if (next === null) {\n popAllPrevious(prev);\n } else if (prev.depth === next.depth) {\n popToNearestCommonAncestor(prev, next);\n } else if (prev.depth > next.depth) {\n popPreviousToCommonLevel(prev, next);\n } else {\n popNextToCommonLevel(prev, next);\n }\n\n currentActiveSnapshot = next;\n }\n}\nfunction pushProvider(context, nextValue) {\n var prevValue;\n\n {\n prevValue = context._currentValue;\n context._currentValue = nextValue;\n\n {\n if (context._currentRenderer !== undefined && context._currentRenderer !== null && context._currentRenderer !== rendererSigil) {\n error('Detected multiple renderers concurrently rendering the ' + 'same context provider. This is currently unsupported.');\n }\n\n context._currentRenderer = rendererSigil;\n }\n }\n\n var prevNode = currentActiveSnapshot;\n var newNode = {\n parent: prevNode,\n depth: prevNode === null ? 0 : prevNode.depth + 1,\n context: context,\n parentValue: prevValue,\n value: nextValue\n };\n currentActiveSnapshot = newNode;\n return newNode;\n}\nfunction popProvider(context) {\n var prevSnapshot = currentActiveSnapshot;\n\n if (prevSnapshot === null) {\n throw new Error('Tried to pop a Context at the root of the app. This is a bug in React.');\n }\n\n {\n if (prevSnapshot.context !== context) {\n error('The parent context is not the expected context. This is probably a bug in React.');\n }\n }\n\n {\n var value = prevSnapshot.parentValue;\n\n if (value === REACT_SERVER_CONTEXT_DEFAULT_VALUE_NOT_LOADED) {\n prevSnapshot.context._currentValue = prevSnapshot.context._defaultValue;\n } else {\n prevSnapshot.context._currentValue = value;\n }\n\n {\n if (context._currentRenderer !== undefined && context._currentRenderer !== null && context._currentRenderer !== rendererSigil) {\n error('Detected multiple renderers concurrently rendering the ' + 'same context provider. This is currently unsupported.');\n }\n\n context._currentRenderer = rendererSigil;\n }\n }\n\n return currentActiveSnapshot = prevSnapshot.parent;\n}\nfunction getActiveContext() {\n return currentActiveSnapshot;\n}\nfunction readContext(context) {\n var value = context._currentValue ;\n return value;\n}\n\n/**\n * `ReactInstanceMap` maintains a mapping from a public facing stateful\n * instance (key) and the internal representation (value). This allows public\n * methods to accept the user facing instance as an argument and map them back\n * to internal methods.\n *\n * Note that this module is currently shared and assumed to be stateless.\n * If this becomes an actual Map, that will break.\n */\nfunction get(key) {\n return key._reactInternals;\n}\nfunction set(key, value) {\n key._reactInternals = value;\n}\n\nvar didWarnAboutNoopUpdateForComponent = {};\nvar didWarnAboutDeprecatedWillMount = {};\nvar didWarnAboutUninitializedState;\nvar didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate;\nvar didWarnAboutLegacyLifecyclesAndDerivedState;\nvar didWarnAboutUndefinedDerivedState;\nvar warnOnUndefinedDerivedState;\nvar warnOnInvalidCallback;\nvar didWarnAboutDirectlyAssigningPropsToState;\nvar didWarnAboutContextTypeAndContextTypes;\nvar didWarnAboutInvalidateContextType;\n\n{\n didWarnAboutUninitializedState = new Set();\n didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate = new Set();\n didWarnAboutLegacyLifecyclesAndDerivedState = new Set();\n didWarnAboutDirectlyAssigningPropsToState = new Set();\n didWarnAboutUndefinedDerivedState = new Set();\n didWarnAboutContextTypeAndContextTypes = new Set();\n didWarnAboutInvalidateContextType = new Set();\n var didWarnOnInvalidCallback = new Set();\n\n warnOnInvalidCallback = function (callback, callerName) {\n if (callback === null || typeof callback === 'function') {\n return;\n }\n\n var key = callerName + '_' + callback;\n\n if (!didWarnOnInvalidCallback.has(key)) {\n didWarnOnInvalidCallback.add(key);\n\n error('%s(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callerName, callback);\n }\n };\n\n warnOnUndefinedDerivedState = function (type, partialState) {\n if (partialState === undefined) {\n var componentName = getComponentNameFromType(type) || 'Component';\n\n if (!didWarnAboutUndefinedDerivedState.has(componentName)) {\n didWarnAboutUndefinedDerivedState.add(componentName);\n\n error('%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. ' + 'You have returned undefined.', componentName);\n }\n }\n };\n}\n\nfunction warnNoop(publicInstance, callerName) {\n {\n var _constructor = publicInstance.constructor;\n var componentName = _constructor && getComponentNameFromType(_constructor) || 'ReactClass';\n var warningKey = componentName + '.' + callerName;\n\n if (didWarnAboutNoopUpdateForComponent[warningKey]) {\n return;\n }\n\n error('%s(...): Can only update a mounting component. ' + 'This usually means you called %s() outside componentWillMount() on the server. ' + 'This is a no-op.\\n\\nPlease check the code for the %s component.', callerName, callerName, componentName);\n\n didWarnAboutNoopUpdateForComponent[warningKey] = true;\n }\n}\n\nvar classComponentUpdater = {\n isMounted: function (inst) {\n return false;\n },\n enqueueSetState: function (inst, payload, callback) {\n var internals = get(inst);\n\n if (internals.queue === null) {\n warnNoop(inst, 'setState');\n } else {\n internals.queue.push(payload);\n\n {\n if (callback !== undefined && callback !== null) {\n warnOnInvalidCallback(callback, 'setState');\n }\n }\n }\n },\n enqueueReplaceState: function (inst, payload, callback) {\n var internals = get(inst);\n internals.replace = true;\n internals.queue = [payload];\n\n {\n if (callback !== undefined && callback !== null) {\n warnOnInvalidCallback(callback, 'setState');\n }\n }\n },\n enqueueForceUpdate: function (inst, callback) {\n var internals = get(inst);\n\n if (internals.queue === null) {\n warnNoop(inst, 'forceUpdate');\n } else {\n {\n if (callback !== undefined && callback !== null) {\n warnOnInvalidCallback(callback, 'setState');\n }\n }\n }\n }\n};\n\nfunction applyDerivedStateFromProps(instance, ctor, getDerivedStateFromProps, prevState, nextProps) {\n var partialState = getDerivedStateFromProps(nextProps, prevState);\n\n {\n warnOnUndefinedDerivedState(ctor, partialState);\n } // Merge the partial state and the previous state.\n\n\n var newState = partialState === null || partialState === undefined ? prevState : assign({}, prevState, partialState);\n return newState;\n}\n\nfunction constructClassInstance(ctor, props, maskedLegacyContext) {\n var context = emptyContextObject;\n var contextType = ctor.contextType;\n\n {\n if ('contextType' in ctor) {\n var isValid = // Allow null for conditional declaration\n contextType === null || contextType !== undefined && contextType.$$typeof === REACT_CONTEXT_TYPE && contextType._context === undefined; // Not a <Context.Consumer>\n\n if (!isValid && !didWarnAboutInvalidateContextType.has(ctor)) {\n didWarnAboutInvalidateContextType.add(ctor);\n var addendum = '';\n\n if (contextType === undefined) {\n addendum = ' However, it is set to undefined. ' + 'This can be caused by a typo or by mixing up named and default imports. ' + 'This can also happen due to a circular dependency, so ' + 'try moving the createContext() call to a separate file.';\n } else if (typeof contextType !== 'object') {\n addendum = ' However, it is set to a ' + typeof contextType + '.';\n } else if (contextType.$$typeof === REACT_PROVIDER_TYPE) {\n addendum = ' Did you accidentally pass the Context.Provider instead?';\n } else if (contextType._context !== undefined) {\n // <Context.Consumer>\n addendum = ' Did you accidentally pass the Context.Consumer instead?';\n } else {\n addendum = ' However, it is set to an object with keys {' + Object.keys(contextType).join(', ') + '}.';\n }\n\n error('%s defines an invalid contextType. ' + 'contextType should point to the Context object returned by React.createContext().%s', getComponentNameFromType(ctor) || 'Component', addendum);\n }\n }\n }\n\n if (typeof contextType === 'object' && contextType !== null) {\n context = readContext(contextType);\n } else {\n context = maskedLegacyContext;\n }\n\n var instance = new ctor(props, context);\n\n {\n if (typeof ctor.getDerivedStateFromProps === 'function' && (instance.state === null || instance.state === undefined)) {\n var componentName = getComponentNameFromType(ctor) || 'Component';\n\n if (!didWarnAboutUninitializedState.has(componentName)) {\n didWarnAboutUninitializedState.add(componentName);\n\n error('`%s` uses `getDerivedStateFromProps` but its initial state is ' + '%s. This is not recommended. Instead, define the initial state by ' + 'assigning an object to `this.state` in the constructor of `%s`. ' + 'This ensures that `getDerivedStateFromProps` arguments have a consistent shape.', componentName, instance.state === null ? 'null' : 'undefined', componentName);\n }\n } // If new component APIs are defined, \"unsafe\" lifecycles won't be called.\n // Warn about these lifecycles if they are present.\n // Don't warn about react-lifecycles-compat polyfilled methods though.\n\n\n if (typeof ctor.getDerivedStateFromProps === 'function' || typeof instance.getSnapshotBeforeUpdate === 'function') {\n var foundWillMountName = null;\n var foundWillReceivePropsName = null;\n var foundWillUpdateName = null;\n\n if (typeof instance.componentWillMount === 'function' && instance.componentWillMount.__suppressDeprecationWarning !== true) {\n foundWillMountName = 'componentWillMount';\n } else if (typeof instance.UNSAFE_componentWillMount === 'function') {\n foundWillMountName = 'UNSAFE_componentWillMount';\n }\n\n if (typeof instance.componentWillReceiveProps === 'function' && instance.componentWillReceiveProps.__suppressDeprecationWarning !== true) {\n foundWillReceivePropsName = 'componentWillReceiveProps';\n } else if (typeof instance.UNSAFE_componentWillReceiveProps === 'function') {\n foundWillReceivePropsName = 'UNSAFE_componentWillReceiveProps';\n }\n\n if (typeof instance.componentWillUpdate === 'function' && instance.componentWillUpdate.__suppressDeprecationWarning !== true) {\n foundWillUpdateName = 'componentWillUpdate';\n } else if (typeof instance.UNSAFE_componentWillUpdate === 'function') {\n foundWillUpdateName = 'UNSAFE_componentWillUpdate';\n }\n\n if (foundWillMountName !== null || foundWillReceivePropsName !== null || foundWillUpdateName !== null) {\n var _componentName = getComponentNameFromType(ctor) || 'Component';\n\n var newApiName = typeof ctor.getDerivedStateFromProps === 'function' ? 'getDerivedStateFromProps()' : 'getSnapshotBeforeUpdate()';\n\n if (!didWarnAboutLegacyLifecyclesAndDerivedState.has(_componentName)) {\n didWarnAboutLegacyLifecyclesAndDerivedState.add(_componentName);\n\n error('Unsafe legacy lifecycles will not be called for components using new component APIs.\\n\\n' + '%s uses %s but also contains the following legacy lifecycles:%s%s%s\\n\\n' + 'The above lifecycles should be removed. Learn more about this warning here:\\n' + 'https://reactjs.org/link/unsafe-component-lifecycles', _componentName, newApiName, foundWillMountName !== null ? \"\\n \" + foundWillMountName : '', foundWillReceivePropsName !== null ? \"\\n \" + foundWillReceivePropsName : '', foundWillUpdateName !== null ? \"\\n \" + foundWillUpdateName : '');\n }\n }\n }\n }\n\n return instance;\n}\n\nfunction checkClassInstance(instance, ctor, newProps) {\n {\n var name = getComponentNameFromType(ctor) || 'Component';\n var renderPresent = instance.render;\n\n if (!renderPresent) {\n if (ctor.prototype && typeof ctor.prototype.render === 'function') {\n error('%s(...): No `render` method found on the returned component ' + 'instance: did you accidentally return an object from the constructor?', name);\n } else {\n error('%s(...): No `render` method found on the returned component ' + 'instance: you may have forgotten to define `render`.', name);\n }\n }\n\n if (instance.getInitialState && !instance.getInitialState.isReactClassApproved && !instance.state) {\n error('getInitialState was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Did you mean to define a state property instead?', name);\n }\n\n if (instance.getDefaultProps && !instance.getDefaultProps.isReactClassApproved) {\n error('getDefaultProps was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Use a static property to define defaultProps instead.', name);\n }\n\n if (instance.propTypes) {\n error('propTypes was defined as an instance property on %s. Use a static ' + 'property to define propTypes instead.', name);\n }\n\n if (instance.contextType) {\n error('contextType was defined as an instance property on %s. Use a static ' + 'property to define contextType instead.', name);\n }\n\n {\n if (instance.contextTypes) {\n error('contextTypes was defined as an instance property on %s. Use a static ' + 'property to define contextTypes instead.', name);\n }\n\n if (ctor.contextType && ctor.contextTypes && !didWarnAboutContextTypeAndContextTypes.has(ctor)) {\n didWarnAboutContextTypeAndContextTypes.add(ctor);\n\n error('%s declares both contextTypes and contextType static properties. ' + 'The legacy contextTypes property will be ignored.', name);\n }\n }\n\n if (typeof instance.componentShouldUpdate === 'function') {\n error('%s has a method called ' + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + 'The name is phrased as a question because the function is ' + 'expected to return a value.', name);\n }\n\n if (ctor.prototype && ctor.prototype.isPureReactComponent && typeof instance.shouldComponentUpdate !== 'undefined') {\n error('%s has a method called shouldComponentUpdate(). ' + 'shouldComponentUpdate should not be used when extending React.PureComponent. ' + 'Please extend React.Component if shouldComponentUpdate is used.', getComponentNameFromType(ctor) || 'A pure component');\n }\n\n if (typeof instance.componentDidUnmount === 'function') {\n error('%s has a method called ' + 'componentDidUnmount(). But there is no such lifecycle method. ' + 'Did you mean componentWillUnmount()?', name);\n }\n\n if (typeof instance.componentDidReceiveProps === 'function') {\n error('%s has a method called ' + 'componentDidReceiveProps(). But there is no such lifecycle method. ' + 'If you meant to update the state in response to changing props, ' + 'use componentWillReceiveProps(). If you meant to fetch data or ' + 'run side-effects or mutations after React has updated the UI, use componentDidUpdate().', name);\n }\n\n if (typeof instance.componentWillRecieveProps === 'function') {\n error('%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', name);\n }\n\n if (typeof instance.UNSAFE_componentWillRecieveProps === 'function') {\n error('%s has a method called ' + 'UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?', name);\n }\n\n var hasMutatedProps = instance.props !== newProps;\n\n if (instance.props !== undefined && hasMutatedProps) {\n error('%s(...): When calling super() in `%s`, make sure to pass ' + \"up the same props that your component's constructor was passed.\", name, name);\n }\n\n if (instance.defaultProps) {\n error('Setting defaultProps as an instance property on %s is not supported and will be ignored.' + ' Instead, define defaultProps as a static property on %s.', name, name);\n }\n\n if (typeof instance.getSnapshotBeforeUpdate === 'function' && typeof instance.componentDidUpdate !== 'function' && !didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.has(ctor)) {\n didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.add(ctor);\n\n error('%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). ' + 'This component defines getSnapshotBeforeUpdate() only.', getComponentNameFromType(ctor));\n }\n\n if (typeof instance.getDerivedStateFromProps === 'function') {\n error('%s: getDerivedStateFromProps() is defined as an instance method ' + 'and will be ignored. Instead, declare it as a static method.', name);\n }\n\n if (typeof instance.getDerivedStateFromError === 'function') {\n error('%s: getDerivedStateFromError() is defined as an instance method ' + 'and will be ignored. Instead, declare it as a static method.', name);\n }\n\n if (typeof ctor.getSnapshotBeforeUpdate === 'function') {\n error('%s: getSnapshotBeforeUpdate() is defined as a static method ' + 'and will be ignored. Instead, declare it as an instance method.', name);\n }\n\n var _state = instance.state;\n\n if (_state && (typeof _state !== 'object' || isArray(_state))) {\n error('%s.state: must be set to an object or null', name);\n }\n\n if (typeof instance.getChildContext === 'function' && typeof ctor.childContextTypes !== 'object') {\n error('%s.getChildContext(): childContextTypes must be defined in order to ' + 'use getChildContext().', name);\n }\n }\n}\n\nfunction callComponentWillMount(type, instance) {\n var oldState = instance.state;\n\n if (typeof instance.componentWillMount === 'function') {\n {\n if ( instance.componentWillMount.__suppressDeprecationWarning !== true) {\n var componentName = getComponentNameFromType(type) || 'Unknown';\n\n if (!didWarnAboutDeprecatedWillMount[componentName]) {\n warn( // keep this warning in sync with ReactStrictModeWarning.js\n 'componentWillMount has been renamed, and is not recommended for use. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\\n\\n' + '* Move code from componentWillMount to componentDidMount (preferred in most cases) ' + 'or the constructor.\\n' + '\\nPlease update the following components: %s', componentName);\n\n didWarnAboutDeprecatedWillMount[componentName] = true;\n }\n }\n }\n\n instance.componentWillMount();\n }\n\n if (typeof instance.UNSAFE_componentWillMount === 'function') {\n instance.UNSAFE_componentWillMount();\n }\n\n if (oldState !== instance.state) {\n {\n error('%s.componentWillMount(): Assigning directly to this.state is ' + \"deprecated (except inside a component's \" + 'constructor). Use setState instead.', getComponentNameFromType(type) || 'Component');\n }\n\n classComponentUpdater.enqueueReplaceState(instance, instance.state, null);\n }\n}\n\nfunction processUpdateQueue(internalInstance, inst, props, maskedLegacyContext) {\n if (internalInstance.queue !== null && internalInstance.queue.length > 0) {\n var oldQueue = internalInstance.queue;\n var oldReplace = internalInstance.replace;\n internalInstance.queue = null;\n internalInstance.replace = false;\n\n if (oldReplace && oldQueue.length === 1) {\n inst.state = oldQueue[0];\n } else {\n var nextState = oldReplace ? oldQueue[0] : inst.state;\n var dontMutate = true;\n\n for (var i = oldReplace ? 1 : 0; i < oldQueue.length; i++) {\n var partial = oldQueue[i];\n var partialState = typeof partial === 'function' ? partial.call(inst, nextState, props, maskedLegacyContext) : partial;\n\n if (partialState != null) {\n if (dontMutate) {\n dontMutate = false;\n nextState = assign({}, nextState, partialState);\n } else {\n assign(nextState, partialState);\n }\n }\n }\n\n inst.state = nextState;\n }\n } else {\n internalInstance.queue = null;\n }\n} // Invokes the mount life-cycles on a previously never rendered instance.\n\n\nfunction mountClassInstance(instance, ctor, newProps, maskedLegacyContext) {\n {\n checkClassInstance(instance, ctor, newProps);\n }\n\n var initialState = instance.state !== undefined ? instance.state : null;\n instance.updater = classComponentUpdater;\n instance.props = newProps;\n instance.state = initialState; // We don't bother initializing the refs object on the server, since we're not going to resolve them anyway.\n // The internal instance will be used to manage updates that happen during this mount.\n\n var internalInstance = {\n queue: [],\n replace: false\n };\n set(instance, internalInstance);\n var contextType = ctor.contextType;\n\n if (typeof contextType === 'object' && contextType !== null) {\n instance.context = readContext(contextType);\n } else {\n instance.context = maskedLegacyContext;\n }\n\n {\n if (instance.state === newProps) {\n var componentName = getComponentNameFromType(ctor) || 'Component';\n\n if (!didWarnAboutDirectlyAssigningPropsToState.has(componentName)) {\n didWarnAboutDirectlyAssigningPropsToState.add(componentName);\n\n error('%s: It is not recommended to assign props directly to state ' + \"because updates to props won't be reflected in state. \" + 'In most cases, it is better to use props directly.', componentName);\n }\n }\n }\n\n var getDerivedStateFromProps = ctor.getDerivedStateFromProps;\n\n if (typeof getDerivedStateFromProps === 'function') {\n instance.state = applyDerivedStateFromProps(instance, ctor, getDerivedStateFromProps, initialState, newProps);\n } // In order to support react-lifecycles-compat polyfilled components,\n // Unsafe lifecycles should not be invoked for components using the new APIs.\n\n\n if (typeof ctor.getDerivedStateFromProps !== 'function' && typeof instance.getSnapshotBeforeUpdate !== 'function' && (typeof instance.UNSAFE_componentWillMount === 'function' || typeof instance.componentWillMount === 'function')) {\n callComponentWillMount(ctor, instance); // If we had additional state updates during this life-cycle, let's\n // process them now.\n\n processUpdateQueue(internalInstance, instance, newProps, maskedLegacyContext);\n }\n}\n\n// Ids are base 32 strings whose binary representation corresponds to the\n// position of a node in a tree.\n// Every time the tree forks into multiple children, we add additional bits to\n// the left of the sequence that represent the position of the child within the\n// current level of children.\n//\n// 00101 00010001011010101\n// ╰─┬─╯ ╰───────┬───────╯\n// Fork 5 of 20 Parent id\n//\n// The leading 0s are important. In the above example, you only need 3 bits to\n// represent slot 5. However, you need 5 bits to represent all the forks at\n// the current level, so we must account for the empty bits at the end.\n//\n// For this same reason, slots are 1-indexed instead of 0-indexed. Otherwise,\n// the zeroth id at a level would be indistinguishable from its parent.\n//\n// If a node has only one child, and does not materialize an id (i.e. does not\n// contain a useId hook), then we don't need to allocate any space in the\n// sequence. It's treated as a transparent indirection. For example, these two\n// trees produce the same ids:\n//\n// <> <>\n// <Indirection> <A />\n// <A /> <B />\n// </Indirection> </>\n// <B />\n// </>\n//\n// However, we cannot skip any node that materializes an id. Otherwise, a parent\n// id that does not fork would be indistinguishable from its child id. For\n// example, this tree does not fork, but the parent and child must have\n// different ids.\n//\n// <Parent>\n// <Child />\n// </Parent>\n//\n// To handle this scenario, every time we materialize an id, we allocate a\n// new level with a single slot. You can think of this as a fork with only one\n// prong, or an array of children with length 1.\n//\n// It's possible for the size of the sequence to exceed 32 bits, the max\n// size for bitwise operations. When this happens, we make more room by\n// converting the right part of the id to a string and storing it in an overflow\n// variable. We use a base 32 string representation, because 32 is the largest\n// power of 2 that is supported by toString(). We want the base to be large so\n// that the resulting ids are compact, and we want the base to be a power of 2\n// because every log2(base) bits corresponds to a single character, i.e. every\n// log2(32) = 5 bits. That means we can lop bits off the end 5 at a time without\n// affecting the final result.\nvar emptyTreeContext = {\n id: 1,\n overflow: ''\n};\nfunction getTreeId(context) {\n var overflow = context.overflow;\n var idWithLeadingBit = context.id;\n var id = idWithLeadingBit & ~getLeadingBit(idWithLeadingBit);\n return id.toString(32) + overflow;\n}\nfunction pushTreeContext(baseContext, totalChildren, index) {\n var baseIdWithLeadingBit = baseContext.id;\n var baseOverflow = baseContext.overflow; // The leftmost 1 marks the end of the sequence, non-inclusive. It's not part\n // of the id; we use it to account for leading 0s.\n\n var baseLength = getBitLength(baseIdWithLeadingBit) - 1;\n var baseId = baseIdWithLeadingBit & ~(1 << baseLength);\n var slot = index + 1;\n var length = getBitLength(totalChildren) + baseLength; // 30 is the max length we can store without overflowing, taking into\n // consideration the leading 1 we use to mark the end of the sequence.\n\n if (length > 30) {\n // We overflowed the bitwise-safe range. Fall back to slower algorithm.\n // This branch assumes the length of the base id is greater than 5; it won't\n // work for smaller ids, because you need 5 bits per character.\n //\n // We encode the id in multiple steps: first the base id, then the\n // remaining digits.\n //\n // Each 5 bit sequence corresponds to a single base 32 character. So for\n // example, if the current id is 23 bits long, we can convert 20 of those\n // bits into a string of 4 characters, with 3 bits left over.\n //\n // First calculate how many bits in the base id represent a complete\n // sequence of characters.\n var numberOfOverflowBits = baseLength - baseLength % 5; // Then create a bitmask that selects only those bits.\n\n var newOverflowBits = (1 << numberOfOverflowBits) - 1; // Select the bits, and convert them to a base 32 string.\n\n var newOverflow = (baseId & newOverflowBits).toString(32); // Now we can remove those bits from the base id.\n\n var restOfBaseId = baseId >> numberOfOverflowBits;\n var restOfBaseLength = baseLength - numberOfOverflowBits; // Finally, encode the rest of the bits using the normal algorithm. Because\n // we made more room, this time it won't overflow.\n\n var restOfLength = getBitLength(totalChildren) + restOfBaseLength;\n var restOfNewBits = slot << restOfBaseLength;\n var id = restOfNewBits | restOfBaseId;\n var overflow = newOverflow + baseOverflow;\n return {\n id: 1 << restOfLength | id,\n overflow: overflow\n };\n } else {\n // Normal path\n var newBits = slot << baseLength;\n\n var _id = newBits | baseId;\n\n var _overflow = baseOverflow;\n return {\n id: 1 << length | _id,\n overflow: _overflow\n };\n }\n}\n\nfunction getBitLength(number) {\n return 32 - clz32(number);\n}\n\nfunction getLeadingBit(id) {\n return 1 << getBitLength(id) - 1;\n} // TODO: Math.clz32 is supported in Node 12+. Maybe we can drop the fallback.\n\n\nvar clz32 = Math.clz32 ? Math.clz32 : clz32Fallback; // Count leading zeros.\n// Based on:\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/clz32\n\nvar log = Math.log;\nvar LN2 = Math.LN2;\n\nfunction clz32Fallback(x) {\n var asUint = x >>> 0;\n\n if (asUint === 0) {\n return 32;\n }\n\n return 31 - (log(asUint) / LN2 | 0) | 0;\n}\n\n/**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\nfunction is(x, y) {\n return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y // eslint-disable-line no-self-compare\n ;\n}\n\nvar objectIs = typeof Object.is === 'function' ? Object.is : is;\n\nvar currentlyRenderingComponent = null;\nvar currentlyRenderingTask = null;\nvar firstWorkInProgressHook = null;\nvar workInProgressHook = null; // Whether the work-in-progress hook is a re-rendered hook\n\nvar isReRender = false; // Whether an update was scheduled during the currently executing render pass.\n\nvar didScheduleRenderPhaseUpdate = false; // Counts the number of useId hooks in this component\n\nvar localIdCounter = 0; // Lazily created map of render-phase updates\n\nvar renderPhaseUpdates = null; // Counter to prevent infinite loops.\n\nvar numberOfReRenders = 0;\nvar RE_RENDER_LIMIT = 25;\nvar isInHookUserCodeInDev = false; // In DEV, this is the name of the currently executing primitive hook\n\nvar currentHookNameInDev;\n\nfunction resolveCurrentlyRenderingComponent() {\n if (currentlyRenderingComponent === null) {\n throw new Error('Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for' + ' one of the following reasons:\\n' + '1. You might have mismatching versions of React and the renderer (such as React DOM)\\n' + '2. You might be breaking the Rules of Hooks\\n' + '3. You might have more than one copy of React in the same app\\n' + 'See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.');\n }\n\n {\n if (isInHookUserCodeInDev) {\n error('Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. ' + 'You can only call Hooks at the top level of your React function. ' + 'For more information, see ' + 'https://reactjs.org/link/rules-of-hooks');\n }\n }\n\n return currentlyRenderingComponent;\n}\n\nfunction areHookInputsEqual(nextDeps, prevDeps) {\n if (prevDeps === null) {\n {\n error('%s received a final argument during this render, but not during ' + 'the previous render. Even though the final argument is optional, ' + 'its type cannot change between renders.', currentHookNameInDev);\n }\n\n return false;\n }\n\n {\n // Don't bother comparing lengths in prod because these arrays should be\n // passed inline.\n if (nextDeps.length !== prevDeps.length) {\n error('The final argument passed to %s changed size between renders. The ' + 'order and size of this array must remain constant.\\n\\n' + 'Previous: %s\\n' + 'Incoming: %s', currentHookNameInDev, \"[\" + nextDeps.join(', ') + \"]\", \"[\" + prevDeps.join(', ') + \"]\");\n }\n }\n\n for (var i = 0; i < prevDeps.length && i < nextDeps.length; i++) {\n if (objectIs(nextDeps[i], prevDeps[i])) {\n continue;\n }\n\n return false;\n }\n\n return true;\n}\n\nfunction createHook() {\n if (numberOfReRenders > 0) {\n throw new Error('Rendered more hooks than during the previous render');\n }\n\n return {\n memoizedState: null,\n queue: null,\n next: null\n };\n}\n\nfunction createWorkInProgressHook() {\n if (workInProgressHook === null) {\n // This is the first hook in the list\n if (firstWorkInProgressHook === null) {\n isReRender = false;\n firstWorkInProgressHook = workInProgressHook = createHook();\n } else {\n // There's already a work-in-progress. Reuse it.\n isReRender = true;\n workInProgressHook = firstWorkInProgressHook;\n }\n } else {\n if (workInProgressHook.next === null) {\n isReRender = false; // Append to the end of the list\n\n workInProgressHook = workInProgressHook.next = createHook();\n } else {\n // There's already a work-in-progress. Reuse it.\n isReRender = true;\n workInProgressHook = workInProgressHook.next;\n }\n }\n\n return workInProgressHook;\n}\n\nfunction prepareToUseHooks(task, componentIdentity) {\n currentlyRenderingComponent = componentIdentity;\n currentlyRenderingTask = task;\n\n {\n isInHookUserCodeInDev = false;\n } // The following should have already been reset\n // didScheduleRenderPhaseUpdate = false;\n // localIdCounter = 0;\n // firstWorkInProgressHook = null;\n // numberOfReRenders = 0;\n // renderPhaseUpdates = null;\n // workInProgressHook = null;\n\n\n localIdCounter = 0;\n}\nfunction finishHooks(Component, props, children, refOrContext) {\n // This must be called after every function component to prevent hooks from\n // being used in classes.\n while (didScheduleRenderPhaseUpdate) {\n // Updates were scheduled during the render phase. They are stored in\n // the `renderPhaseUpdates` map. Call the component again, reusing the\n // work-in-progress hooks and applying the additional updates on top. Keep\n // restarting until no more updates are scheduled.\n didScheduleRenderPhaseUpdate = false;\n localIdCounter = 0;\n numberOfReRenders += 1; // Start over from the beginning of the list\n\n workInProgressHook = null;\n children = Component(props, refOrContext);\n }\n\n resetHooksState();\n return children;\n}\nfunction checkDidRenderIdHook() {\n // This should be called immediately after every finishHooks call.\n // Conceptually, it's part of the return value of finishHooks; it's only a\n // separate function to avoid using an array tuple.\n var didRenderIdHook = localIdCounter !== 0;\n return didRenderIdHook;\n} // Reset the internal hooks state if an error occurs while rendering a component\n\nfunction resetHooksState() {\n {\n isInHookUserCodeInDev = false;\n }\n\n currentlyRenderingComponent = null;\n currentlyRenderingTask = null;\n didScheduleRenderPhaseUpdate = false;\n firstWorkInProgressHook = null;\n numberOfReRenders = 0;\n renderPhaseUpdates = null;\n workInProgressHook = null;\n}\n\nfunction readContext$1(context) {\n {\n if (isInHookUserCodeInDev) {\n error('Context can only be read while React is rendering. ' + 'In classes, you can read it in the render method or getDerivedStateFromProps. ' + 'In function components, you can read it directly in the function body, but not ' + 'inside Hooks like useReducer() or useMemo().');\n }\n }\n\n return readContext(context);\n}\n\nfunction useContext(context) {\n {\n currentHookNameInDev = 'useContext';\n }\n\n resolveCurrentlyRenderingComponent();\n return readContext(context);\n}\n\nfunction basicStateReducer(state, action) {\n // $FlowFixMe: Flow doesn't like mixed types\n return typeof action === 'function' ? action(state) : action;\n}\n\nfunction useState(initialState) {\n {\n currentHookNameInDev = 'useState';\n }\n\n return useReducer(basicStateReducer, // useReducer has a special case to support lazy useState initializers\n initialState);\n}\nfunction useReducer(reducer, initialArg, init) {\n {\n if (reducer !== basicStateReducer) {\n currentHookNameInDev = 'useReducer';\n }\n }\n\n currentlyRenderingComponent = resolveCurrentlyRenderingComponent();\n workInProgressHook = createWorkInProgressHook();\n\n if (isReRender) {\n // This is a re-render. Apply the new render phase updates to the previous\n // current hook.\n var queue = workInProgressHook.queue;\n var dispatch = queue.dispatch;\n\n if (renderPhaseUpdates !== null) {\n // Render phase updates are stored in a map of queue -> linked list\n var firstRenderPhaseUpdate = renderPhaseUpdates.get(queue);\n\n if (firstRenderPhaseUpdate !== undefined) {\n renderPhaseUpdates.delete(queue);\n var newState = workInProgressHook.memoizedState;\n var update = firstRenderPhaseUpdate;\n\n do {\n // Process this render phase update. We don't have to check the\n // priority because it will always be the same as the current\n // render's.\n var action = update.action;\n\n {\n isInHookUserCodeInDev = true;\n }\n\n newState = reducer(newState, action);\n\n {\n isInHookUserCodeInDev = false;\n }\n\n update = update.next;\n } while (update !== null);\n\n workInProgressHook.memoizedState = newState;\n return [newState, dispatch];\n }\n }\n\n return [workInProgressHook.memoizedState, dispatch];\n } else {\n {\n isInHookUserCodeInDev = true;\n }\n\n var initialState;\n\n if (reducer === basicStateReducer) {\n // Special case for `useState`.\n initialState = typeof initialArg === 'function' ? initialArg() : initialArg;\n } else {\n initialState = init !== undefined ? init(initialArg) : initialArg;\n }\n\n {\n isInHookUserCodeInDev = false;\n }\n\n workInProgressHook.memoizedState = initialState;\n\n var _queue = workInProgressHook.queue = {\n last: null,\n dispatch: null\n };\n\n var _dispatch = _queue.dispatch = dispatchAction.bind(null, currentlyRenderingComponent, _queue);\n\n return [workInProgressHook.memoizedState, _dispatch];\n }\n}\n\nfunction useMemo(nextCreate, deps) {\n currentlyRenderingComponent = resolveCurrentlyRenderingComponent();\n workInProgressHook = createWorkInProgressHook();\n var nextDeps = deps === undefined ? null : deps;\n\n if (workInProgressHook !== null) {\n var prevState = workInProgressHook.memoizedState;\n\n if (prevState !== null) {\n if (nextDeps !== null) {\n var prevDeps = prevState[1];\n\n if (areHookInputsEqual(nextDeps, prevDeps)) {\n return prevState[0];\n }\n }\n }\n }\n\n {\n isInHookUserCodeInDev = true;\n }\n\n var nextValue = nextCreate();\n\n {\n isInHookUserCodeInDev = false;\n }\n\n workInProgressHook.memoizedState = [nextValue, nextDeps];\n return nextValue;\n}\n\nfunction useRef(initialValue) {\n currentlyRenderingComponent = resolveCurrentlyRenderingComponent();\n workInProgressHook = createWorkInProgressHook();\n var previousRef = workInProgressHook.memoizedState;\n\n if (previousRef === null) {\n var ref = {\n current: initialValue\n };\n\n {\n Object.seal(ref);\n }\n\n workInProgressHook.memoizedState = ref;\n return ref;\n } else {\n return previousRef;\n }\n}\n\nfunction useLayoutEffect(create, inputs) {\n {\n currentHookNameInDev = 'useLayoutEffect';\n\n error('useLayoutEffect does nothing on the server, because its effect cannot ' + \"be encoded into the server renderer's output format. This will lead \" + 'to a mismatch between the initial, non-hydrated UI and the intended ' + 'UI. To avoid this, useLayoutEffect should only be used in ' + 'components that render exclusively on the client. ' + 'See https://reactjs.org/link/uselayouteffect-ssr for common fixes.');\n }\n}\n\nfunction dispatchAction(componentIdentity, queue, action) {\n if (numberOfReRenders >= RE_RENDER_LIMIT) {\n throw new Error('Too many re-renders. React limits the number of renders to prevent ' + 'an infinite loop.');\n }\n\n if (componentIdentity === currentlyRenderingComponent) {\n // This is a render phase update. Stash it in a lazily-created map of\n // queue -> linked list of updates. After this render pass, we'll restart\n // and apply the stashed updates on top of the work-in-progress hook.\n didScheduleRenderPhaseUpdate = true;\n var update = {\n action: action,\n next: null\n };\n\n if (renderPhaseUpdates === null) {\n renderPhaseUpdates = new Map();\n }\n\n var firstRenderPhaseUpdate = renderPhaseUpdates.get(queue);\n\n if (firstRenderPhaseUpdate === undefined) {\n renderPhaseUpdates.set(queue, update);\n } else {\n // Append the update to the end of the list.\n var lastRenderPhaseUpdate = firstRenderPhaseUpdate;\n\n while (lastRenderPhaseUpdate.next !== null) {\n lastRenderPhaseUpdate = lastRenderPhaseUpdate.next;\n }\n\n lastRenderPhaseUpdate.next = update;\n }\n }\n}\n\nfunction useCallback(callback, deps) {\n return useMemo(function () {\n return callback;\n }, deps);\n} // TODO Decide on how to implement this hook for server rendering.\n// If a mutation occurs during render, consider triggering a Suspense boundary\n// and falling back to client rendering.\n\nfunction useMutableSource(source, getSnapshot, subscribe) {\n resolveCurrentlyRenderingComponent();\n return getSnapshot(source._source);\n}\n\nfunction useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {\n if (getServerSnapshot === undefined) {\n throw new Error('Missing getServerSnapshot, which is required for ' + 'server-rendered content. Will revert to client rendering.');\n }\n\n return getServerSnapshot();\n}\n\nfunction useDeferredValue(value) {\n resolveCurrentlyRenderingComponent();\n return value;\n}\n\nfunction unsupportedStartTransition() {\n throw new Error('startTransition cannot be called during server rendering.');\n}\n\nfunction useTransition() {\n resolveCurrentlyRenderingComponent();\n return [false, unsupportedStartTransition];\n}\n\nfunction useId() {\n var task = currentlyRenderingTask;\n var treeId = getTreeId(task.treeContext);\n var responseState = currentResponseState;\n\n if (responseState === null) {\n throw new Error('Invalid hook call. Hooks can only be called inside of the body of a function component.');\n }\n\n var localId = localIdCounter++;\n return makeId(responseState, treeId, localId);\n}\n\nfunction noop() {}\n\nvar Dispatcher = {\n readContext: readContext$1,\n useContext: useContext,\n useMemo: useMemo,\n useReducer: useReducer,\n useRef: useRef,\n useState: useState,\n useInsertionEffect: noop,\n useLayoutEffect: useLayoutEffect,\n useCallback: useCallback,\n // useImperativeHandle is not run in the server environment\n useImperativeHandle: noop,\n // Effects are not run in the server environment.\n useEffect: noop,\n // Debugging effect\n useDebugValue: noop,\n useDeferredValue: useDeferredValue,\n useTransition: useTransition,\n useId: useId,\n // Subscriptions are not setup in a server environment.\n useMutableSource: useMutableSource,\n useSyncExternalStore: useSyncExternalStore\n};\n\nvar currentResponseState = null;\nfunction setCurrentResponseState(responseState) {\n currentResponseState = responseState;\n}\n\nfunction getStackByComponentStackNode(componentStack) {\n try {\n var info = '';\n var node = componentStack;\n\n do {\n switch (node.tag) {\n case 0:\n info += describeBuiltInComponentFrame(node.type, null, null);\n break;\n\n case 1:\n info += describeFunctionComponentFrame(node.type, null, null);\n break;\n\n case 2:\n info += describeClassComponentFrame(node.type, null, null);\n break;\n }\n\n node = node.parent;\n } while (node);\n\n return info;\n } catch (x) {\n return '\\nError generating stack: ' + x.message + '\\n' + x.stack;\n }\n}\n\nvar ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher;\nvar ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;\nvar PENDING = 0;\nvar COMPLETED = 1;\nvar FLUSHED = 2;\nvar ABORTED = 3;\nvar ERRORED = 4;\nvar OPEN = 0;\nvar CLOSING = 1;\nvar CLOSED = 2;\n// This is a default heuristic for how to split up the HTML content into progressive\n// loading. Our goal is to be able to display additional new content about every 500ms.\n// Faster than that is unnecessary and should be throttled on the client. It also\n// adds unnecessary overhead to do more splits. We don't know if it's a higher or lower\n// end device but higher end suffer less from the overhead than lower end does from\n// not getting small enough pieces. We error on the side of low end.\n// We base this on low end 3G speeds which is about 500kbits per second. We assume\n// that there can be a reasonable drop off from max bandwidth which leaves you with\n// as little as 80%. We can receive half of that each 500ms - at best. In practice,\n// a little bandwidth is lost to processing and contention - e.g. CSS and images that\n// are downloaded along with the main content. So we estimate about half of that to be\n// the lower end throughput. In other words, we expect that you can at least show\n// about 12.5kb of content per 500ms. Not counting starting latency for the first\n// paint.\n// 500 * 1024 / 8 * .8 * 0.5 / 2\nvar DEFAULT_PROGRESSIVE_CHUNK_SIZE = 12800;\n\nfunction defaultErrorHandler(error) {\n console['error'](error); // Don't transform to our wrapper\n\n return null;\n}\n\nfunction noop$1() {}\n\nfunction createRequest(children, responseState, rootFormatContext, progressiveChunkSize, onError, onAllReady, onShellReady, onShellError, onFatalError) {\n var pingedTasks = [];\n var abortSet = new Set();\n var request = {\n destination: null,\n responseState: responseState,\n progressiveChunkSize: progressiveChunkSize === undefined ? DEFAULT_PROGRESSIVE_CHUNK_SIZE : progressiveChunkSize,\n status: OPEN,\n fatalError: null,\n nextSegmentId: 0,\n allPendingTasks: 0,\n pendingRootTasks: 0,\n completedRootSegment: null,\n abortableTasks: abortSet,\n pingedTasks: pingedTasks,\n clientRenderedBoundaries: [],\n completedBoundaries: [],\n partialBoundaries: [],\n onError: onError === undefined ? defaultErrorHandler : onError,\n onAllReady: onAllReady === undefined ? noop$1 : onAllReady,\n onShellReady: onShellReady === undefined ? noop$1 : onShellReady,\n onShellError: onShellError === undefined ? noop$1 : onShellError,\n onFatalError: onFatalError === undefined ? noop$1 : onFatalError\n }; // This segment represents the root fallback.\n\n var rootSegment = createPendingSegment(request, 0, null, rootFormatContext, // Root segments are never embedded in Text on either edge\n false, false); // There is no parent so conceptually, we're unblocked to flush this segment.\n\n rootSegment.parentFlushed = true;\n var rootTask = createTask(request, children, null, rootSegment, abortSet, emptyContextObject, rootContextSnapshot, emptyTreeContext);\n pingedTasks.push(rootTask);\n return request;\n}\n\nfunction pingTask(request, task) {\n var pingedTasks = request.pingedTasks;\n pingedTasks.push(task);\n\n if (pingedTasks.length === 1) {\n scheduleWork(function () {\n return performWork(request);\n });\n }\n}\n\nfunction createSuspenseBoundary(request, fallbackAbortableTasks) {\n return {\n id: UNINITIALIZED_SUSPENSE_BOUNDARY_ID,\n rootSegmentID: -1,\n parentFlushed: false,\n pendingTasks: 0,\n forceClientRender: false,\n completedSegments: [],\n byteSize: 0,\n fallbackAbortableTasks: fallbackAbortableTasks,\n errorDigest: null\n };\n}\n\nfunction createTask(request, node, blockedBoundary, blockedSegment, abortSet, legacyContext, context, treeContext) {\n request.allPendingTasks++;\n\n if (blockedBoundary === null) {\n request.pendingRootTasks++;\n } else {\n blockedBoundary.pendingTasks++;\n }\n\n var task = {\n node: node,\n ping: function () {\n return pingTask(request, task);\n },\n blockedBoundary: blockedBoundary,\n blockedSegment: blockedSegment,\n abortSet: abortSet,\n legacyContext: legacyContext,\n context: context,\n treeContext: treeContext\n };\n\n {\n task.componentStack = null;\n }\n\n abortSet.add(task);\n return task;\n}\n\nfunction createPendingSegment(request, index, boundary, formatContext, lastPushedText, textEmbedded) {\n return {\n status: PENDING,\n id: -1,\n // lazily assigned later\n index: index,\n parentFlushed: false,\n chunks: [],\n children: [],\n formatContext: formatContext,\n boundary: boundary,\n lastPushedText: lastPushedText,\n textEmbedded: textEmbedded\n };\n} // DEV-only global reference to the currently executing task\n\n\nvar currentTaskInDEV = null;\n\nfunction getCurrentStackInDEV() {\n {\n if (currentTaskInDEV === null || currentTaskInDEV.componentStack === null) {\n return '';\n }\n\n return getStackByComponentStackNode(currentTaskInDEV.componentStack);\n }\n}\n\nfunction pushBuiltInComponentStackInDEV(task, type) {\n {\n task.componentStack = {\n tag: 0,\n parent: task.componentStack,\n type: type\n };\n }\n}\n\nfunction pushFunctionComponentStackInDEV(task, type) {\n {\n task.componentStack = {\n tag: 1,\n parent: task.componentStack,\n type: type\n };\n }\n}\n\nfunction pushClassComponentStackInDEV(task, type) {\n {\n task.componentStack = {\n tag: 2,\n parent: task.componentStack,\n type: type\n };\n }\n}\n\nfunction popComponentStackInDEV(task) {\n {\n if (task.componentStack === null) {\n error('Unexpectedly popped too many stack frames. This is a bug in React.');\n } else {\n task.componentStack = task.componentStack.parent;\n }\n }\n} // stash the component stack of an unwinding error until it is processed\n\n\nvar lastBoundaryErrorComponentStackDev = null;\n\nfunction captureBoundaryErrorDetailsDev(boundary, error) {\n {\n var errorMessage;\n\n if (typeof error === 'string') {\n errorMessage = error;\n } else if (error && typeof error.message === 'string') {\n errorMessage = error.message;\n } else {\n // eslint-disable-next-line react-internal/safe-string-coercion\n errorMessage = String(error);\n }\n\n var errorComponentStack = lastBoundaryErrorComponentStackDev || getCurrentStackInDEV();\n lastBoundaryErrorComponentStackDev = null;\n boundary.errorMessage = errorMessage;\n boundary.errorComponentStack = errorComponentStack;\n }\n}\n\nfunction logRecoverableError(request, error) {\n // If this callback errors, we intentionally let that error bubble up to become a fatal error\n // so that someone fixes the error reporting instead of hiding it.\n var errorDigest = request.onError(error);\n\n if (errorDigest != null && typeof errorDigest !== 'string') {\n // eslint-disable-next-line react-internal/prod-error-codes\n throw new Error(\"onError returned something with a type other than \\\"string\\\". onError should return a string and may return null or undefined but must not return anything else. It received something of type \\\"\" + typeof errorDigest + \"\\\" instead\");\n }\n\n return errorDigest;\n}\n\nfunction fatalError(request, error) {\n // This is called outside error handling code such as if the root errors outside\n // a suspense boundary or if the root suspense boundary's fallback errors.\n // It's also called if React itself or its host configs errors.\n var onShellError = request.onShellError;\n onShellError(error);\n var onFatalError = request.onFatalError;\n onFatalError(error);\n\n if (request.destination !== null) {\n request.status = CLOSED;\n closeWithError(request.destination, error);\n } else {\n request.status = CLOSING;\n request.fatalError = error;\n }\n}\n\nfunction renderSuspenseBoundary(request, task, props) {\n pushBuiltInComponentStackInDEV(task, 'Suspense');\n var parentBoundary = task.blockedBoundary;\n var parentSegment = task.blockedSegment; // Each time we enter a suspense boundary, we split out into a new segment for\n // the fallback so that we can later replace that segment with the content.\n // This also lets us split out the main content even if it doesn't suspend,\n // in case it ends up generating a large subtree of content.\n\n var fallback = props.fallback;\n var content = props.children;\n var fallbackAbortSet = new Set();\n var newBoundary = createSuspenseBoundary(request, fallbackAbortSet);\n var insertionIndex = parentSegment.chunks.length; // The children of the boundary segment is actually the fallback.\n\n var boundarySegment = createPendingSegment(request, insertionIndex, newBoundary, parentSegment.formatContext, // boundaries never require text embedding at their edges because comment nodes bound them\n false, false);\n parentSegment.children.push(boundarySegment); // The parentSegment has a child Segment at this index so we reset the lastPushedText marker on the parent\n\n parentSegment.lastPushedText = false; // This segment is the actual child content. We can start rendering that immediately.\n\n var contentRootSegment = createPendingSegment(request, 0, null, parentSegment.formatContext, // boundaries never require text embedding at their edges because comment nodes bound them\n false, false); // We mark the root segment as having its parent flushed. It's not really flushed but there is\n // no parent segment so there's nothing to wait on.\n\n contentRootSegment.parentFlushed = true; // Currently this is running synchronously. We could instead schedule this to pingedTasks.\n // I suspect that there might be some efficiency benefits from not creating the suspended task\n // and instead just using the stack if possible.\n // TODO: Call this directly instead of messing with saving and restoring contexts.\n // We can reuse the current context and task to render the content immediately without\n // context switching. We just need to temporarily switch which boundary and which segment\n // we're writing to. If something suspends, it'll spawn new suspended task with that context.\n\n task.blockedBoundary = newBoundary;\n task.blockedSegment = contentRootSegment;\n\n try {\n // We use the safe form because we don't handle suspending here. Only error handling.\n renderNode(request, task, content);\n pushSegmentFinale(contentRootSegment.chunks, request.responseState, contentRootSegment.lastPushedText, contentRootSegment.textEmbedded);\n contentRootSegment.status = COMPLETED;\n queueCompletedSegment(newBoundary, contentRootSegment);\n\n if (newBoundary.pendingTasks === 0) {\n // This must have been the last segment we were waiting on. This boundary is now complete.\n // Therefore we won't need the fallback. We early return so that we don't have to create\n // the fallback.\n popComponentStackInDEV(task);\n return;\n }\n } catch (error) {\n contentRootSegment.status = ERRORED;\n newBoundary.forceClientRender = true;\n newBoundary.errorDigest = logRecoverableError(request, error);\n\n {\n captureBoundaryErrorDetailsDev(newBoundary, error);\n } // We don't need to decrement any task numbers because we didn't spawn any new task.\n // We don't need to schedule any task because we know the parent has written yet.\n // We do need to fallthrough to create the fallback though.\n\n } finally {\n task.blockedBoundary = parentBoundary;\n task.blockedSegment = parentSegment;\n } // We create suspended task for the fallback because we don't want to actually work\n // on it yet in case we finish the main content, so we queue for later.\n\n\n var suspendedFallbackTask = createTask(request, fallback, parentBoundary, boundarySegment, fallbackAbortSet, task.legacyContext, task.context, task.treeContext);\n\n {\n suspendedFallbackTask.componentStack = task.componentStack;\n } // TODO: This should be queued at a separate lower priority queue so that we only work\n // on preparing fallbacks if we don't have any more main content to task on.\n\n\n request.pingedTasks.push(suspendedFallbackTask);\n popComponentStackInDEV(task);\n}\n\nfunction renderHostElement(request, task, type, props) {\n pushBuiltInComponentStackInDEV(task, type);\n var segment = task.blockedSegment;\n var children = pushStartInstance(segment.chunks, type, props, request.responseState, segment.formatContext);\n segment.lastPushedText = false;\n var prevContext = segment.formatContext;\n segment.formatContext = getChildFormatContext(prevContext, type, props); // We use the non-destructive form because if something suspends, we still\n // need to pop back up and finish this subtree of HTML.\n\n renderNode(request, task, children); // We expect that errors will fatal the whole task and that we don't need\n // the correct context. Therefore this is not in a finally.\n\n segment.formatContext = prevContext;\n pushEndInstance(segment.chunks, type);\n segment.lastPushedText = false;\n popComponentStackInDEV(task);\n}\n\nfunction shouldConstruct$1(Component) {\n return Component.prototype && Component.prototype.isReactComponent;\n}\n\nfunction renderWithHooks(request, task, Component, props, secondArg) {\n var componentIdentity = {};\n prepareToUseHooks(task, componentIdentity);\n var result = Component(props, secondArg);\n return finishHooks(Component, props, result, secondArg);\n}\n\nfunction finishClassComponent(request, task, instance, Component, props) {\n var nextChildren = instance.render();\n\n {\n if (instance.props !== props) {\n if (!didWarnAboutReassigningProps) {\n error('It looks like %s is reassigning its own `this.props` while rendering. ' + 'This is not supported and can lead to confusing bugs.', getComponentNameFromType(Component) || 'a component');\n }\n\n didWarnAboutReassigningProps = true;\n }\n }\n\n {\n var childContextTypes = Component.childContextTypes;\n\n if (childContextTypes !== null && childContextTypes !== undefined) {\n var previousContext = task.legacyContext;\n var mergedContext = processChildContext(instance, Component, previousContext, childContextTypes);\n task.legacyContext = mergedContext;\n renderNodeDestructive(request, task, nextChildren);\n task.legacyContext = previousContext;\n return;\n }\n }\n\n renderNodeDestructive(request, task, nextChildren);\n}\n\nfunction renderClassComponent(request, task, Component, props) {\n pushClassComponentStackInDEV(task, Component);\n var maskedContext = getMaskedContext(Component, task.legacyContext) ;\n var instance = constructClassInstance(Component, props, maskedContext);\n mountClassInstance(instance, Component, props, maskedContext);\n finishClassComponent(request, task, instance, Component, props);\n popComponentStackInDEV(task);\n}\n\nvar didWarnAboutBadClass = {};\nvar didWarnAboutModulePatternComponent = {};\nvar didWarnAboutContextTypeOnFunctionComponent = {};\nvar didWarnAboutGetDerivedStateOnFunctionComponent = {};\nvar didWarnAboutReassigningProps = false;\nvar didWarnAboutDefaultPropsOnFunctionComponent = {};\nvar didWarnAboutGenerators = false;\nvar didWarnAboutMaps = false;\nvar hasWarnedAboutUsingContextAsConsumer = false; // This would typically be a function component but we still support module pattern\n// components for some reason.\n\nfunction renderIndeterminateComponent(request, task, Component, props) {\n var legacyContext;\n\n {\n legacyContext = getMaskedContext(Component, task.legacyContext);\n }\n\n pushFunctionComponentStackInDEV(task, Component);\n\n {\n if (Component.prototype && typeof Component.prototype.render === 'function') {\n var componentName = getComponentNameFromType(Component) || 'Unknown';\n\n if (!didWarnAboutBadClass[componentName]) {\n error(\"The <%s /> component appears to have a render method, but doesn't extend React.Component. \" + 'This is likely to cause errors. Change %s to extend React.Component instead.', componentName, componentName);\n\n didWarnAboutBadClass[componentName] = true;\n }\n }\n }\n\n var value = renderWithHooks(request, task, Component, props, legacyContext);\n var hasId = checkDidRenderIdHook();\n\n {\n // Support for module components is deprecated and is removed behind a flag.\n // Whether or not it would crash later, we want to show a good message in DEV first.\n if (typeof value === 'object' && value !== null && typeof value.render === 'function' && value.$$typeof === undefined) {\n var _componentName = getComponentNameFromType(Component) || 'Unknown';\n\n if (!didWarnAboutModulePatternComponent[_componentName]) {\n error('The <%s /> component appears to be a function component that returns a class instance. ' + 'Change %s to a class that extends React.Component instead. ' + \"If you can't use a class try assigning the prototype on the function as a workaround. \" + \"`%s.prototype = React.Component.prototype`. Don't use an arrow function since it \" + 'cannot be called with `new` by React.', _componentName, _componentName, _componentName);\n\n didWarnAboutModulePatternComponent[_componentName] = true;\n }\n }\n }\n\n if ( // Run these checks in production only if the flag is off.\n // Eventually we'll delete this branch altogether.\n typeof value === 'object' && value !== null && typeof value.render === 'function' && value.$$typeof === undefined) {\n {\n var _componentName2 = getComponentNameFromType(Component) || 'Unknown';\n\n if (!didWarnAboutModulePatternComponent[_componentName2]) {\n error('The <%s /> component appears to be a function component that returns a class instance. ' + 'Change %s to a class that extends React.Component instead. ' + \"If you can't use a class try assigning the prototype on the function as a workaround. \" + \"`%s.prototype = React.Component.prototype`. Don't use an arrow function since it \" + 'cannot be called with `new` by React.', _componentName2, _componentName2, _componentName2);\n\n didWarnAboutModulePatternComponent[_componentName2] = true;\n }\n }\n\n mountClassInstance(value, Component, props, legacyContext);\n finishClassComponent(request, task, value, Component, props);\n } else {\n\n {\n validateFunctionComponentInDev(Component);\n } // We're now successfully past this task, and we don't have to pop back to\n // the previous task every again, so we can use the destructive recursive form.\n\n\n if (hasId) {\n // This component materialized an id. We treat this as its own level, with\n // a single \"child\" slot.\n var prevTreeContext = task.treeContext;\n var totalChildren = 1;\n var index = 0;\n task.treeContext = pushTreeContext(prevTreeContext, totalChildren, index);\n\n try {\n renderNodeDestructive(request, task, value);\n } finally {\n task.treeContext = prevTreeContext;\n }\n } else {\n renderNodeDestructive(request, task, value);\n }\n }\n\n popComponentStackInDEV(task);\n}\n\nfunction validateFunctionComponentInDev(Component) {\n {\n if (Component) {\n if (Component.childContextTypes) {\n error('%s(...): childContextTypes cannot be defined on a function component.', Component.displayName || Component.name || 'Component');\n }\n }\n\n if ( Component.defaultProps !== undefined) {\n var componentName = getComponentNameFromType(Component) || 'Unknown';\n\n if (!didWarnAboutDefaultPropsOnFunctionComponent[componentName]) {\n error('%s: Support for defaultProps will be removed from function components ' + 'in a future major release. Use JavaScript default parameters instead.', componentName);\n\n didWarnAboutDefaultPropsOnFunctionComponent[componentName] = true;\n }\n }\n\n if (typeof Component.getDerivedStateFromProps === 'function') {\n var _componentName3 = getComponentNameFromType(Component) || 'Unknown';\n\n if (!didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3]) {\n error('%s: Function components do not support getDerivedStateFromProps.', _componentName3);\n\n didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3] = true;\n }\n }\n\n if (typeof Component.contextType === 'object' && Component.contextType !== null) {\n var _componentName4 = getComponentNameFromType(Component) || 'Unknown';\n\n if (!didWarnAboutContextTypeOnFunctionComponent[_componentName4]) {\n error('%s: Function components do not support contextType.', _componentName4);\n\n didWarnAboutContextTypeOnFunctionComponent[_componentName4] = true;\n }\n }\n }\n}\n\nfunction resolveDefaultProps(Component, baseProps) {\n if (Component && Component.defaultProps) {\n // Resolve default props. Taken from ReactElement\n var props = assign({}, baseProps);\n var defaultProps = Component.defaultProps;\n\n for (var propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n\n return props;\n }\n\n return baseProps;\n}\n\nfunction renderForwardRef(request, task, type, props, ref) {\n pushFunctionComponentStackInDEV(task, type.render);\n var children = renderWithHooks(request, task, type.render, props, ref);\n var hasId = checkDidRenderIdHook();\n\n if (hasId) {\n // This component materialized an id. We treat this as its own level, with\n // a single \"child\" slot.\n var prevTreeContext = task.treeContext;\n var totalChildren = 1;\n var index = 0;\n task.treeContext = pushTreeContext(prevTreeContext, totalChildren, index);\n\n try {\n renderNodeDestructive(request, task, children);\n } finally {\n task.treeContext = prevTreeContext;\n }\n } else {\n renderNodeDestructive(request, task, children);\n }\n\n popComponentStackInDEV(task);\n}\n\nfunction renderMemo(request, task, type, props, ref) {\n var innerType = type.type;\n var resolvedProps = resolveDefaultProps(innerType, props);\n renderElement(request, task, innerType, resolvedProps, ref);\n}\n\nfunction renderContextConsumer(request, task, context, props) {\n // The logic below for Context differs depending on PROD or DEV mode. In\n // DEV mode, we create a separate object for Context.Consumer that acts\n // like a proxy to Context. This proxy object adds unnecessary code in PROD\n // so we use the old behaviour (Context.Consumer references Context) to\n // reduce size and overhead. The separate object references context via\n // a property called \"_context\", which also gives us the ability to check\n // in DEV mode if this property exists or not and warn if it does not.\n {\n if (context._context === undefined) {\n // This may be because it's a Context (rather than a Consumer).\n // Or it may be because it's older React where they're the same thing.\n // We only want to warn if we're sure it's a new React.\n if (context !== context.Consumer) {\n if (!hasWarnedAboutUsingContextAsConsumer) {\n hasWarnedAboutUsingContextAsConsumer = true;\n\n error('Rendering <Context> directly is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Consumer> instead?');\n }\n }\n } else {\n context = context._context;\n }\n }\n\n var render = props.children;\n\n {\n if (typeof render !== 'function') {\n error('A context consumer was rendered with multiple children, or a child ' + \"that isn't a function. A context consumer expects a single child \" + 'that is a function. If you did pass a function, make sure there ' + 'is no trailing or leading whitespace around it.');\n }\n }\n\n var newValue = readContext(context);\n var newChildren = render(newValue);\n renderNodeDestructive(request, task, newChildren);\n}\n\nfunction renderContextProvider(request, task, type, props) {\n var context = type._context;\n var value = props.value;\n var children = props.children;\n var prevSnapshot;\n\n {\n prevSnapshot = task.context;\n }\n\n task.context = pushProvider(context, value);\n renderNodeDestructive(request, task, children);\n task.context = popProvider(context);\n\n {\n if (prevSnapshot !== task.context) {\n error('Popping the context provider did not return back to the original snapshot. This is a bug in React.');\n }\n }\n}\n\nfunction renderLazyComponent(request, task, lazyComponent, props, ref) {\n pushBuiltInComponentStackInDEV(task, 'Lazy');\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n var Component = init(payload);\n var resolvedProps = resolveDefaultProps(Component, props);\n renderElement(request, task, Component, resolvedProps, ref);\n popComponentStackInDEV(task);\n}\n\nfunction renderElement(request, task, type, props, ref) {\n if (typeof type === 'function') {\n if (shouldConstruct$1(type)) {\n renderClassComponent(request, task, type, props);\n return;\n } else {\n renderIndeterminateComponent(request, task, type, props);\n return;\n }\n }\n\n if (typeof type === 'string') {\n renderHostElement(request, task, type, props);\n return;\n }\n\n switch (type) {\n // TODO: LegacyHidden acts the same as a fragment. This only works\n // because we currently assume that every instance of LegacyHidden is\n // accompanied by a host component wrapper. In the hidden mode, the host\n // component is given a `hidden` attribute, which ensures that the\n // initial HTML is not visible. To support the use of LegacyHidden as a\n // true fragment, without an extra DOM node, we would have to hide the\n // initial HTML in some other way.\n // TODO: Add REACT_OFFSCREEN_TYPE here too with the same capability.\n case REACT_LEGACY_HIDDEN_TYPE:\n case REACT_DEBUG_TRACING_MODE_TYPE:\n case REACT_STRICT_MODE_TYPE:\n case REACT_PROFILER_TYPE:\n case REACT_FRAGMENT_TYPE:\n {\n renderNodeDestructive(request, task, props.children);\n return;\n }\n\n case REACT_SUSPENSE_LIST_TYPE:\n {\n pushBuiltInComponentStackInDEV(task, 'SuspenseList'); // TODO: SuspenseList should control the boundaries.\n\n renderNodeDestructive(request, task, props.children);\n popComponentStackInDEV(task);\n return;\n }\n\n case REACT_SCOPE_TYPE:\n {\n\n throw new Error('ReactDOMServer does not yet support scope components.');\n }\n // eslint-disable-next-line-no-fallthrough\n\n case REACT_SUSPENSE_TYPE:\n {\n {\n renderSuspenseBoundary(request, task, props);\n }\n\n return;\n }\n }\n\n if (typeof type === 'object' && type !== null) {\n switch (type.$$typeof) {\n case REACT_FORWARD_REF_TYPE:\n {\n renderForwardRef(request, task, type, props, ref);\n return;\n }\n\n case REACT_MEMO_TYPE:\n {\n renderMemo(request, task, type, props, ref);\n return;\n }\n\n case REACT_PROVIDER_TYPE:\n {\n renderContextProvider(request, task, type, props);\n return;\n }\n\n case REACT_CONTEXT_TYPE:\n {\n renderContextConsumer(request, task, type, props);\n return;\n }\n\n case REACT_LAZY_TYPE:\n {\n renderLazyComponent(request, task, type, props);\n return;\n }\n }\n }\n\n var info = '';\n\n {\n if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {\n info += ' You likely forgot to export your component from the file ' + \"it's defined in, or you might have mixed up default and \" + 'named imports.';\n }\n }\n\n throw new Error('Element type is invalid: expected a string (for built-in ' + 'components) or a class/function (for composite components) ' + (\"but got: \" + (type == null ? type : typeof type) + \".\" + info));\n}\n\nfunction validateIterable(iterable, iteratorFn) {\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n iterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (iterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n }\n }\n}\n\nfunction renderNodeDestructive(request, task, node) {\n {\n // In Dev we wrap renderNodeDestructiveImpl in a try / catch so we can capture\n // a component stack at the right place in the tree. We don't do this in renderNode\n // becuase it is not called at every layer of the tree and we may lose frames\n try {\n return renderNodeDestructiveImpl(request, task, node);\n } catch (x) {\n if (typeof x === 'object' && x !== null && typeof x.then === 'function') ; else {\n // This is an error, stash the component stack if it is null.\n lastBoundaryErrorComponentStackDev = lastBoundaryErrorComponentStackDev !== null ? lastBoundaryErrorComponentStackDev : getCurrentStackInDEV();\n } // rethrow so normal suspense logic can handle thrown value accordingly\n\n\n throw x;\n }\n }\n} // This function by it self renders a node and consumes the task by mutating it\n// to update the current execution state.\n\n\nfunction renderNodeDestructiveImpl(request, task, node) {\n // Stash the node we're working on. We'll pick up from this task in case\n // something suspends.\n task.node = node; // Handle object types\n\n if (typeof node === 'object' && node !== null) {\n switch (node.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var element = node;\n var type = element.type;\n var props = element.props;\n var ref = element.ref;\n renderElement(request, task, type, props, ref);\n return;\n }\n\n case REACT_PORTAL_TYPE:\n throw new Error('Portals are not currently supported by the server renderer. ' + 'Render them conditionally so that they only appear on the client render.');\n // eslint-disable-next-line-no-fallthrough\n\n case REACT_LAZY_TYPE:\n {\n var lazyNode = node;\n var payload = lazyNode._payload;\n var init = lazyNode._init;\n var resolvedNode;\n\n {\n try {\n resolvedNode = init(payload);\n } catch (x) {\n if (typeof x === 'object' && x !== null && typeof x.then === 'function') {\n // this Lazy initializer is suspending. push a temporary frame onto the stack so it can be\n // popped off in spawnNewSuspendedTask. This aligns stack behavior between Lazy in element position\n // vs Component position. We do not want the frame for Errors so we exclusively do this in\n // the wakeable branch\n pushBuiltInComponentStackInDEV(task, 'Lazy');\n }\n\n throw x;\n }\n }\n\n renderNodeDestructive(request, task, resolvedNode);\n return;\n }\n }\n\n if (isArray(node)) {\n renderChildrenArray(request, task, node);\n return;\n }\n\n var iteratorFn = getIteratorFn(node);\n\n if (iteratorFn) {\n {\n validateIterable(node, iteratorFn);\n }\n\n var iterator = iteratorFn.call(node);\n\n if (iterator) {\n // We need to know how many total children are in this set, so that we\n // can allocate enough id slots to acommodate them. So we must exhaust\n // the iterator before we start recursively rendering the children.\n // TODO: This is not great but I think it's inherent to the id\n // generation algorithm.\n var step = iterator.next(); // If there are not entries, we need to push an empty so we start by checking that.\n\n if (!step.done) {\n var children = [];\n\n do {\n children.push(step.value);\n step = iterator.next();\n } while (!step.done);\n\n renderChildrenArray(request, task, children);\n return;\n }\n\n return;\n }\n }\n\n var childString = Object.prototype.toString.call(node);\n throw new Error(\"Objects are not valid as a React child (found: \" + (childString === '[object Object]' ? 'object with keys {' + Object.keys(node).join(', ') + '}' : childString) + \"). \" + 'If you meant to render a collection of children, use an array ' + 'instead.');\n }\n\n if (typeof node === 'string') {\n var segment = task.blockedSegment;\n segment.lastPushedText = pushTextInstance(task.blockedSegment.chunks, node, request.responseState, segment.lastPushedText);\n return;\n }\n\n if (typeof node === 'number') {\n var _segment = task.blockedSegment;\n _segment.lastPushedText = pushTextInstance(task.blockedSegment.chunks, '' + node, request.responseState, _segment.lastPushedText);\n return;\n }\n\n {\n if (typeof node === 'function') {\n error('Functions are not valid as a React child. This may happen if ' + 'you return a Component instead of <Component /> from render. ' + 'Or maybe you meant to call this function rather than return it.');\n }\n }\n}\n\nfunction renderChildrenArray(request, task, children) {\n var totalChildren = children.length;\n\n for (var i = 0; i < totalChildren; i++) {\n var prevTreeContext = task.treeContext;\n task.treeContext = pushTreeContext(prevTreeContext, totalChildren, i);\n\n try {\n // We need to use the non-destructive form so that we can safely pop back\n // up and render the sibling if something suspends.\n renderNode(request, task, children[i]);\n } finally {\n task.treeContext = prevTreeContext;\n }\n }\n}\n\nfunction spawnNewSuspendedTask(request, task, x) {\n // Something suspended, we'll need to create a new segment and resolve it later.\n var segment = task.blockedSegment;\n var insertionIndex = segment.chunks.length;\n var newSegment = createPendingSegment(request, insertionIndex, null, segment.formatContext, // Adopt the parent segment's leading text embed\n segment.lastPushedText, // Assume we are text embedded at the trailing edge\n true);\n segment.children.push(newSegment); // Reset lastPushedText for current Segment since the new Segment \"consumed\" it\n\n segment.lastPushedText = false;\n var newTask = createTask(request, task.node, task.blockedBoundary, newSegment, task.abortSet, task.legacyContext, task.context, task.treeContext);\n\n {\n if (task.componentStack !== null) {\n // We pop one task off the stack because the node that suspended will be tried again,\n // which will add it back onto the stack.\n newTask.componentStack = task.componentStack.parent;\n }\n }\n\n var ping = newTask.ping;\n x.then(ping, ping);\n} // This is a non-destructive form of rendering a node. If it suspends it spawns\n// a new task and restores the context of this task to what it was before.\n\n\nfunction renderNode(request, task, node) {\n // TODO: Store segment.children.length here and reset it in case something\n // suspended partially through writing something.\n // Snapshot the current context in case something throws to interrupt the\n // process.\n var previousFormatContext = task.blockedSegment.formatContext;\n var previousLegacyContext = task.legacyContext;\n var previousContext = task.context;\n var previousComponentStack = null;\n\n {\n previousComponentStack = task.componentStack;\n }\n\n try {\n return renderNodeDestructive(request, task, node);\n } catch (x) {\n resetHooksState();\n\n if (typeof x === 'object' && x !== null && typeof x.then === 'function') {\n spawnNewSuspendedTask(request, task, x); // Restore the context. We assume that this will be restored by the inner\n // functions in case nothing throws so we don't use \"finally\" here.\n\n task.blockedSegment.formatContext = previousFormatContext;\n task.legacyContext = previousLegacyContext;\n task.context = previousContext; // Restore all active ReactContexts to what they were before.\n\n switchContext(previousContext);\n\n {\n task.componentStack = previousComponentStack;\n }\n\n return;\n } else {\n // Restore the context. We assume that this will be restored by the inner\n // functions in case nothing throws so we don't use \"finally\" here.\n task.blockedSegment.formatContext = previousFormatContext;\n task.legacyContext = previousLegacyContext;\n task.context = previousContext; // Restore all active ReactContexts to what they were before.\n\n switchContext(previousContext);\n\n {\n task.componentStack = previousComponentStack;\n } // We assume that we don't need the correct context.\n // Let's terminate the rest of the tree and don't render any siblings.\n\n\n throw x;\n }\n }\n}\n\nfunction erroredTask(request, boundary, segment, error) {\n // Report the error to a global handler.\n var errorDigest = logRecoverableError(request, error);\n\n if (boundary === null) {\n fatalError(request, error);\n } else {\n boundary.pendingTasks--;\n\n if (!boundary.forceClientRender) {\n boundary.forceClientRender = true;\n boundary.errorDigest = errorDigest;\n\n {\n captureBoundaryErrorDetailsDev(boundary, error);\n } // Regardless of what happens next, this boundary won't be displayed,\n // so we can flush it, if the parent already flushed.\n\n\n if (boundary.parentFlushed) {\n // We don't have a preference where in the queue this goes since it's likely\n // to error on the client anyway. However, intentionally client-rendered\n // boundaries should be flushed earlier so that they can start on the client.\n // We reuse the same queue for errors.\n request.clientRenderedBoundaries.push(boundary);\n }\n }\n }\n\n request.allPendingTasks--;\n\n if (request.allPendingTasks === 0) {\n var onAllReady = request.onAllReady;\n onAllReady();\n }\n}\n\nfunction abortTaskSoft(task) {\n // This aborts task without aborting the parent boundary that it blocks.\n // It's used for when we didn't need this task to complete the tree.\n // If task was needed, then it should use abortTask instead.\n var request = this;\n var boundary = task.blockedBoundary;\n var segment = task.blockedSegment;\n segment.status = ABORTED;\n finishedTask(request, boundary, segment);\n}\n\nfunction abortTask(task, request, reason) {\n // This aborts the task and aborts the parent that it blocks, putting it into\n // client rendered mode.\n var boundary = task.blockedBoundary;\n var segment = task.blockedSegment;\n segment.status = ABORTED;\n\n if (boundary === null) {\n request.allPendingTasks--; // We didn't complete the root so we have nothing to show. We can close\n // the request;\n\n if (request.status !== CLOSED) {\n request.status = CLOSED;\n\n if (request.destination !== null) {\n close(request.destination);\n }\n }\n } else {\n boundary.pendingTasks--;\n\n if (!boundary.forceClientRender) {\n boundary.forceClientRender = true;\n\n var _error = reason === undefined ? new Error('The render was aborted by the server without a reason.') : reason;\n\n boundary.errorDigest = request.onError(_error);\n\n {\n var errorPrefix = 'The server did not finish this Suspense boundary: ';\n\n if (_error && typeof _error.message === 'string') {\n _error = errorPrefix + _error.message;\n } else {\n // eslint-disable-next-line react-internal/safe-string-coercion\n _error = errorPrefix + String(_error);\n }\n\n var previousTaskInDev = currentTaskInDEV;\n currentTaskInDEV = task;\n\n try {\n captureBoundaryErrorDetailsDev(boundary, _error);\n } finally {\n currentTaskInDEV = previousTaskInDev;\n }\n }\n\n if (boundary.parentFlushed) {\n request.clientRenderedBoundaries.push(boundary);\n }\n } // If this boundary was still pending then we haven't already cancelled its fallbacks.\n // We'll need to abort the fallbacks, which will also error that parent boundary.\n\n\n boundary.fallbackAbortableTasks.forEach(function (fallbackTask) {\n return abortTask(fallbackTask, request, reason);\n });\n boundary.fallbackAbortableTasks.clear();\n request.allPendingTasks--;\n\n if (request.allPendingTasks === 0) {\n var onAllReady = request.onAllReady;\n onAllReady();\n }\n }\n}\n\nfunction queueCompletedSegment(boundary, segment) {\n if (segment.chunks.length === 0 && segment.children.length === 1 && segment.children[0].boundary === null) {\n // This is an empty segment. There's nothing to write, so we can instead transfer the ID\n // to the child. That way any existing references point to the child.\n var childSegment = segment.children[0];\n childSegment.id = segment.id;\n childSegment.parentFlushed = true;\n\n if (childSegment.status === COMPLETED) {\n queueCompletedSegment(boundary, childSegment);\n }\n } else {\n var completedSegments = boundary.completedSegments;\n completedSegments.push(segment);\n }\n}\n\nfunction finishedTask(request, boundary, segment) {\n if (boundary === null) {\n if (segment.parentFlushed) {\n if (request.completedRootSegment !== null) {\n throw new Error('There can only be one root segment. This is a bug in React.');\n }\n\n request.completedRootSegment = segment;\n }\n\n request.pendingRootTasks--;\n\n if (request.pendingRootTasks === 0) {\n // We have completed the shell so the shell can't error anymore.\n request.onShellError = noop$1;\n var onShellReady = request.onShellReady;\n onShellReady();\n }\n } else {\n boundary.pendingTasks--;\n\n if (boundary.forceClientRender) ; else if (boundary.pendingTasks === 0) {\n // This must have been the last segment we were waiting on. This boundary is now complete.\n if (segment.parentFlushed) {\n // Our parent segment already flushed, so we need to schedule this segment to be emitted.\n // If it is a segment that was aborted, we'll write other content instead so we don't need\n // to emit it.\n if (segment.status === COMPLETED) {\n queueCompletedSegment(boundary, segment);\n }\n }\n\n if (boundary.parentFlushed) {\n // The segment might be part of a segment that didn't flush yet, but if the boundary's\n // parent flushed, we need to schedule the boundary to be emitted.\n request.completedBoundaries.push(boundary);\n } // We can now cancel any pending task on the fallback since we won't need to show it anymore.\n // This needs to happen after we read the parentFlushed flags because aborting can finish\n // work which can trigger user code, which can start flushing, which can change those flags.\n\n\n boundary.fallbackAbortableTasks.forEach(abortTaskSoft, request);\n boundary.fallbackAbortableTasks.clear();\n } else {\n if (segment.parentFlushed) {\n // Our parent already flushed, so we need to schedule this segment to be emitted.\n // If it is a segment that was aborted, we'll write other content instead so we don't need\n // to emit it.\n if (segment.status === COMPLETED) {\n queueCompletedSegment(boundary, segment);\n var completedSegments = boundary.completedSegments;\n\n if (completedSegments.length === 1) {\n // This is the first time since we last flushed that we completed anything.\n // We can schedule this boundary to emit its partially completed segments early\n // in case the parent has already been flushed.\n if (boundary.parentFlushed) {\n request.partialBoundaries.push(boundary);\n }\n }\n }\n }\n }\n }\n\n request.allPendingTasks--;\n\n if (request.allPendingTasks === 0) {\n // This needs to be called at the very end so that we can synchronously write the result\n // in the callback if needed.\n var onAllReady = request.onAllReady;\n onAllReady();\n }\n}\n\nfunction retryTask(request, task) {\n var segment = task.blockedSegment;\n\n if (segment.status !== PENDING) {\n // We completed this by other means before we had a chance to retry it.\n return;\n } // We restore the context to what it was when we suspended.\n // We don't restore it after we leave because it's likely that we'll end up\n // needing a very similar context soon again.\n\n\n switchContext(task.context);\n var prevTaskInDEV = null;\n\n {\n prevTaskInDEV = currentTaskInDEV;\n currentTaskInDEV = task;\n }\n\n try {\n // We call the destructive form that mutates this task. That way if something\n // suspends again, we can reuse the same task instead of spawning a new one.\n renderNodeDestructive(request, task, task.node);\n pushSegmentFinale(segment.chunks, request.responseState, segment.lastPushedText, segment.textEmbedded);\n task.abortSet.delete(task);\n segment.status = COMPLETED;\n finishedTask(request, task.blockedBoundary, segment);\n } catch (x) {\n resetHooksState();\n\n if (typeof x === 'object' && x !== null && typeof x.then === 'function') {\n // Something suspended again, let's pick it back up later.\n var ping = task.ping;\n x.then(ping, ping);\n } else {\n task.abortSet.delete(task);\n segment.status = ERRORED;\n erroredTask(request, task.blockedBoundary, segment, x);\n }\n } finally {\n {\n currentTaskInDEV = prevTaskInDEV;\n }\n }\n}\n\nfunction performWork(request) {\n if (request.status === CLOSED) {\n return;\n }\n\n var prevContext = getActiveContext();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = Dispatcher;\n var prevGetCurrentStackImpl;\n\n {\n prevGetCurrentStackImpl = ReactDebugCurrentFrame$1.getCurrentStack;\n ReactDebugCurrentFrame$1.getCurrentStack = getCurrentStackInDEV;\n }\n\n var prevResponseState = currentResponseState;\n setCurrentResponseState(request.responseState);\n\n try {\n var pingedTasks = request.pingedTasks;\n var i;\n\n for (i = 0; i < pingedTasks.length; i++) {\n var task = pingedTasks[i];\n retryTask(request, task);\n }\n\n pingedTasks.splice(0, i);\n\n if (request.destination !== null) {\n flushCompletedQueues(request, request.destination);\n }\n } catch (error) {\n logRecoverableError(request, error);\n fatalError(request, error);\n } finally {\n setCurrentResponseState(prevResponseState);\n ReactCurrentDispatcher$1.current = prevDispatcher;\n\n {\n ReactDebugCurrentFrame$1.getCurrentStack = prevGetCurrentStackImpl;\n }\n\n if (prevDispatcher === Dispatcher) {\n // This means that we were in a reentrant work loop. This could happen\n // in a renderer that supports synchronous work like renderToString,\n // when it's called from within another renderer.\n // Normally we don't bother switching the contexts to their root/default\n // values when leaving because we'll likely need the same or similar\n // context again. However, when we're inside a synchronous loop like this\n // we'll to restore the context to what it was before returning.\n switchContext(prevContext);\n }\n }\n}\n\nfunction flushSubtree(request, destination, segment) {\n segment.parentFlushed = true;\n\n switch (segment.status) {\n case PENDING:\n {\n // We're emitting a placeholder for this segment to be filled in later.\n // Therefore we'll need to assign it an ID - to refer to it by.\n var segmentID = segment.id = request.nextSegmentId++; // When this segment finally completes it won't be embedded in text since it will flush separately\n\n segment.lastPushedText = false;\n segment.textEmbedded = false;\n return writePlaceholder(destination, request.responseState, segmentID);\n }\n\n case COMPLETED:\n {\n segment.status = FLUSHED;\n var r = true;\n var chunks = segment.chunks;\n var chunkIdx = 0;\n var children = segment.children;\n\n for (var childIdx = 0; childIdx < children.length; childIdx++) {\n var nextChild = children[childIdx]; // Write all the chunks up until the next child.\n\n for (; chunkIdx < nextChild.index; chunkIdx++) {\n writeChunk(destination, chunks[chunkIdx]);\n }\n\n r = flushSegment(request, destination, nextChild);\n } // Finally just write all the remaining chunks\n\n\n for (; chunkIdx < chunks.length - 1; chunkIdx++) {\n writeChunk(destination, chunks[chunkIdx]);\n }\n\n if (chunkIdx < chunks.length) {\n r = writeChunkAndReturn(destination, chunks[chunkIdx]);\n }\n\n return r;\n }\n\n default:\n {\n throw new Error('Aborted, errored or already flushed boundaries should not be flushed again. This is a bug in React.');\n }\n }\n}\n\nfunction flushSegment(request, destination, segment) {\n var boundary = segment.boundary;\n\n if (boundary === null) {\n // Not a suspense boundary.\n return flushSubtree(request, destination, segment);\n }\n\n boundary.parentFlushed = true; // This segment is a Suspense boundary. We need to decide whether to\n // emit the content or the fallback now.\n\n if (boundary.forceClientRender) {\n // Emit a client rendered suspense boundary wrapper.\n // We never queue the inner boundary so we'll never emit its content or partial segments.\n writeStartClientRenderedSuspenseBoundary(destination, request.responseState, boundary.errorDigest, boundary.errorMessage, boundary.errorComponentStack); // Flush the fallback.\n\n flushSubtree(request, destination, segment);\n return writeEndClientRenderedSuspenseBoundary(destination, request.responseState);\n } else if (boundary.pendingTasks > 0) {\n // This boundary is still loading. Emit a pending suspense boundary wrapper.\n // Assign an ID to refer to the future content by.\n boundary.rootSegmentID = request.nextSegmentId++;\n\n if (boundary.completedSegments.length > 0) {\n // If this is at least partially complete, we can queue it to be partially emitted early.\n request.partialBoundaries.push(boundary);\n } /// This is the first time we should have referenced this ID.\n\n\n var id = boundary.id = assignSuspenseBoundaryID(request.responseState);\n writeStartPendingSuspenseBoundary(destination, request.responseState, id); // Flush the fallback.\n\n flushSubtree(request, destination, segment);\n return writeEndPendingSuspenseBoundary(destination, request.responseState);\n } else if (boundary.byteSize > request.progressiveChunkSize) {\n // This boundary is large and will be emitted separately so that we can progressively show\n // other content. We add it to the queue during the flush because we have to ensure that\n // the parent flushes first so that there's something to inject it into.\n // We also have to make sure that it's emitted into the queue in a deterministic slot.\n // I.e. we can't insert it here when it completes.\n // Assign an ID to refer to the future content by.\n boundary.rootSegmentID = request.nextSegmentId++;\n request.completedBoundaries.push(boundary); // Emit a pending rendered suspense boundary wrapper.\n\n writeStartPendingSuspenseBoundary(destination, request.responseState, boundary.id); // Flush the fallback.\n\n flushSubtree(request, destination, segment);\n return writeEndPendingSuspenseBoundary(destination, request.responseState);\n } else {\n // We can inline this boundary's content as a complete boundary.\n writeStartCompletedSuspenseBoundary(destination, request.responseState);\n var completedSegments = boundary.completedSegments;\n\n if (completedSegments.length !== 1) {\n throw new Error('A previously unvisited boundary must have exactly one root segment. This is a bug in React.');\n }\n\n var contentSegment = completedSegments[0];\n flushSegment(request, destination, contentSegment);\n return writeEndCompletedSuspenseBoundary(destination, request.responseState);\n }\n}\n\nfunction flushClientRenderedBoundary(request, destination, boundary) {\n return writeClientRenderBoundaryInstruction(destination, request.responseState, boundary.id, boundary.errorDigest, boundary.errorMessage, boundary.errorComponentStack);\n}\n\nfunction flushSegmentContainer(request, destination, segment) {\n writeStartSegment(destination, request.responseState, segment.formatContext, segment.id);\n flushSegment(request, destination, segment);\n return writeEndSegment(destination, segment.formatContext);\n}\n\nfunction flushCompletedBoundary(request, destination, boundary) {\n var completedSegments = boundary.completedSegments;\n var i = 0;\n\n for (; i < completedSegments.length; i++) {\n var segment = completedSegments[i];\n flushPartiallyCompletedSegment(request, destination, boundary, segment);\n }\n\n completedSegments.length = 0;\n return writeCompletedBoundaryInstruction(destination, request.responseState, boundary.id, boundary.rootSegmentID);\n}\n\nfunction flushPartialBoundary(request, destination, boundary) {\n var completedSegments = boundary.completedSegments;\n var i = 0;\n\n for (; i < completedSegments.length; i++) {\n var segment = completedSegments[i];\n\n if (!flushPartiallyCompletedSegment(request, destination, boundary, segment)) {\n i++;\n completedSegments.splice(0, i); // Only write as much as the buffer wants. Something higher priority\n // might want to write later.\n\n return false;\n }\n }\n\n completedSegments.splice(0, i);\n return true;\n}\n\nfunction flushPartiallyCompletedSegment(request, destination, boundary, segment) {\n if (segment.status === FLUSHED) {\n // We've already flushed this inline.\n return true;\n }\n\n var segmentID = segment.id;\n\n if (segmentID === -1) {\n // This segment wasn't previously referred to. This happens at the root of\n // a boundary. We make kind of a leap here and assume this is the root.\n var rootSegmentID = segment.id = boundary.rootSegmentID;\n\n if (rootSegmentID === -1) {\n throw new Error('A root segment ID must have been assigned by now. This is a bug in React.');\n }\n\n return flushSegmentContainer(request, destination, segment);\n } else {\n flushSegmentContainer(request, destination, segment);\n return writeCompletedSegmentInstruction(destination, request.responseState, segmentID);\n }\n}\n\nfunction flushCompletedQueues(request, destination) {\n beginWriting();\n\n try {\n // The structure of this is to go through each queue one by one and write\n // until the sink tells us to stop. When we should stop, we still finish writing\n // that item fully and then yield. At that point we remove the already completed\n // items up until the point we completed them.\n // TODO: Emit preloading.\n // TODO: It's kind of unfortunate to keep checking this array after we've already\n // emitted the root.\n var completedRootSegment = request.completedRootSegment;\n\n if (completedRootSegment !== null && request.pendingRootTasks === 0) {\n flushSegment(request, destination, completedRootSegment);\n request.completedRootSegment = null;\n writeCompletedRoot(destination, request.responseState);\n } // We emit client rendering instructions for already emitted boundaries first.\n // This is so that we can signal to the client to start client rendering them as\n // soon as possible.\n\n\n var clientRenderedBoundaries = request.clientRenderedBoundaries;\n var i;\n\n for (i = 0; i < clientRenderedBoundaries.length; i++) {\n var boundary = clientRenderedBoundaries[i];\n\n if (!flushClientRenderedBoundary(request, destination, boundary)) {\n request.destination = null;\n i++;\n clientRenderedBoundaries.splice(0, i);\n return;\n }\n }\n\n clientRenderedBoundaries.splice(0, i); // Next we emit any complete boundaries. It's better to favor boundaries\n // that are completely done since we can actually show them, than it is to emit\n // any individual segments from a partially complete boundary.\n\n var completedBoundaries = request.completedBoundaries;\n\n for (i = 0; i < completedBoundaries.length; i++) {\n var _boundary = completedBoundaries[i];\n\n if (!flushCompletedBoundary(request, destination, _boundary)) {\n request.destination = null;\n i++;\n completedBoundaries.splice(0, i);\n return;\n }\n }\n\n completedBoundaries.splice(0, i); // Allow anything written so far to flush to the underlying sink before\n // we continue with lower priorities.\n\n completeWriting(destination);\n beginWriting(destination); // TODO: Here we'll emit data used by hydration.\n // Next we emit any segments of any boundaries that are partially complete\n // but not deeply complete.\n\n var partialBoundaries = request.partialBoundaries;\n\n for (i = 0; i < partialBoundaries.length; i++) {\n var _boundary2 = partialBoundaries[i];\n\n if (!flushPartialBoundary(request, destination, _boundary2)) {\n request.destination = null;\n i++;\n partialBoundaries.splice(0, i);\n return;\n }\n }\n\n partialBoundaries.splice(0, i); // Next we check the completed boundaries again. This may have had\n // boundaries added to it in case they were too larged to be inlined.\n // New ones might be added in this loop.\n\n var largeBoundaries = request.completedBoundaries;\n\n for (i = 0; i < largeBoundaries.length; i++) {\n var _boundary3 = largeBoundaries[i];\n\n if (!flushCompletedBoundary(request, destination, _boundary3)) {\n request.destination = null;\n i++;\n largeBoundaries.splice(0, i);\n return;\n }\n }\n\n largeBoundaries.splice(0, i);\n } finally {\n completeWriting(destination);\n flushBuffered(destination);\n\n if (request.allPendingTasks === 0 && request.pingedTasks.length === 0 && request.clientRenderedBoundaries.length === 0 && request.completedBoundaries.length === 0 // We don't need to check any partially completed segments because\n // either they have pending task or they're complete.\n ) {\n {\n if (request.abortableTasks.size !== 0) {\n error('There was still abortable task at the root when we closed. This is a bug in React.');\n }\n } // We're done.\n\n\n close(destination);\n }\n }\n}\n\nfunction startWork(request) {\n scheduleWork(function () {\n return performWork(request);\n });\n}\nfunction startFlowing(request, destination) {\n if (request.status === CLOSING) {\n request.status = CLOSED;\n closeWithError(destination, request.fatalError);\n return;\n }\n\n if (request.status === CLOSED) {\n return;\n }\n\n if (request.destination !== null) {\n // We're already flowing.\n return;\n }\n\n request.destination = destination;\n\n try {\n flushCompletedQueues(request, destination);\n } catch (error) {\n logRecoverableError(request, error);\n fatalError(request, error);\n }\n} // This is called to early terminate a request. It puts all pending boundaries in client rendered state.\n\nfunction abort(request, reason) {\n try {\n var abortableTasks = request.abortableTasks;\n abortableTasks.forEach(function (task) {\n return abortTask(task, request, reason);\n });\n abortableTasks.clear();\n\n if (request.destination !== null) {\n flushCompletedQueues(request, request.destination);\n }\n } catch (error) {\n logRecoverableError(request, error);\n fatalError(request, error);\n }\n}\n\nfunction createDrainHandler(destination, request) {\n return function () {\n return startFlowing(request, destination);\n };\n}\n\nfunction createAbortHandler(request, reason) {\n return function () {\n return abort(request, reason);\n };\n}\n\nfunction createRequestImpl(children, options) {\n return createRequest(children, createResponseState(options ? options.identifierPrefix : undefined, options ? options.nonce : undefined, options ? options.bootstrapScriptContent : undefined, options ? options.bootstrapScripts : undefined, options ? options.bootstrapModules : undefined), createRootFormatContext(options ? options.namespaceURI : undefined), options ? options.progressiveChunkSize : undefined, options ? options.onError : undefined, options ? options.onAllReady : undefined, options ? options.onShellReady : undefined, options ? options.onShellError : undefined, undefined);\n}\n\nfunction renderToPipeableStream(children, options) {\n var request = createRequestImpl(children, options);\n var hasStartedFlowing = false;\n startWork(request);\n return {\n pipe: function (destination) {\n if (hasStartedFlowing) {\n throw new Error('React currently only supports piping to one writable stream.');\n }\n\n hasStartedFlowing = true;\n startFlowing(request, destination);\n destination.on('drain', createDrainHandler(destination, request));\n destination.on('error', createAbortHandler(request, // eslint-disable-next-line react-internal/prod-error-codes\n new Error('The destination stream errored while writing data.')));\n destination.on('close', createAbortHandler(request, // eslint-disable-next-line react-internal/prod-error-codes\n new Error('The destination stream closed early.')));\n return destination;\n },\n abort: function (reason) {\n abort(request, reason);\n }\n };\n}\n\nexports.renderToPipeableStream = renderToPipeableStream;\nexports.version = ReactVersion;\n })();\n}\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/react-dom/cjs/react-dom-server.node.development.js?", + ); + + /***/ + }, + + /***/ 1557: /***/ (__unused_webpack_module, exports, __webpack_require__) => { + 'use strict'; + eval( + "/**\n * @license React\n * react-dom.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\nif (true) {\n (function() {\n\n 'use strict';\n\n/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\nif (\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart ===\n 'function'\n) {\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());\n}\n var React = __webpack_require__(6540);\nvar Scheduler = __webpack_require__(9982);\n\nvar ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n\nvar suppressWarning = false;\nfunction setSuppressWarning(newSuppressWarning) {\n {\n suppressWarning = newSuppressWarning;\n }\n} // In DEV, calls to console.warn and console.error get replaced\n// by calls to these methods by a Babel plugin.\n//\n// In PROD (or in packages without access to React internals),\n// they are left as they are instead.\n\nfunction warn(format) {\n {\n if (!suppressWarning) {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n printWarning('warn', format, args);\n }\n }\n}\nfunction error(format) {\n {\n if (!suppressWarning) {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n printWarning('error', format, args);\n }\n }\n}\n\nfunction printWarning(level, format, args) {\n // When changing this logic, you might want to also\n // update consoleWithStackDev.www.js as well.\n {\n var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n var stack = ReactDebugCurrentFrame.getStackAddendum();\n\n if (stack !== '') {\n format += '%s';\n args = args.concat([stack]);\n } // eslint-disable-next-line react-internal/safe-string-coercion\n\n\n var argsWithFormat = args.map(function (item) {\n return String(item);\n }); // Careful: RN currently depends on this prefix\n\n argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it\n // breaks IE9: https://github.com/facebook/react/issues/13610\n // eslint-disable-next-line react-internal/no-production-logging\n\n Function.prototype.apply.call(console[level], console, argsWithFormat);\n }\n}\n\nvar FunctionComponent = 0;\nvar ClassComponent = 1;\nvar IndeterminateComponent = 2; // Before we know whether it is function or class\n\nvar HostRoot = 3; // Root of a host tree. Could be nested inside another node.\n\nvar HostPortal = 4; // A subtree. Could be an entry point to a different renderer.\n\nvar HostComponent = 5;\nvar HostText = 6;\nvar Fragment = 7;\nvar Mode = 8;\nvar ContextConsumer = 9;\nvar ContextProvider = 10;\nvar ForwardRef = 11;\nvar Profiler = 12;\nvar SuspenseComponent = 13;\nvar MemoComponent = 14;\nvar SimpleMemoComponent = 15;\nvar LazyComponent = 16;\nvar IncompleteClassComponent = 17;\nvar DehydratedFragment = 18;\nvar SuspenseListComponent = 19;\nvar ScopeComponent = 21;\nvar OffscreenComponent = 22;\nvar LegacyHiddenComponent = 23;\nvar CacheComponent = 24;\nvar TracingMarkerComponent = 25;\n\n// -----------------------------------------------------------------------------\n\nvar enableClientRenderFallbackOnTextMismatch = true; // TODO: Need to review this code one more time before landing\n// the react-reconciler package.\n\nvar enableNewReconciler = false; // Support legacy Primer support on internal FB www\n\nvar enableLazyContextPropagation = false; // FB-only usage. The new API has different semantics.\n\nvar enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber\n\nvar enableSuspenseAvoidThisFallback = false; // Enables unstable_avoidThisFallback feature in Fizz\n// React DOM Chopping Block\n//\n// Similar to main Chopping Block but only flags related to React DOM. These are\n// grouped because we will likely batch all of them into a single major release.\n// -----------------------------------------------------------------------------\n// Disable support for comment nodes as React DOM containers. Already disabled\n// in open source, but www codebase still relies on it. Need to remove.\n\nvar disableCommentsAsDOMContainers = true; // Disable javascript: URL strings in href for XSS protection.\n// and client rendering, mostly to allow JSX attributes to apply to the custom\n// element's object properties instead of only HTML attributes.\n// https://github.com/facebook/react/issues/11347\n\nvar enableCustomElementPropertySupport = false; // Disables children for <textarea> elements\nvar warnAboutStringRefs = true; // -----------------------------------------------------------------------------\n// Debugging and DevTools\n// -----------------------------------------------------------------------------\n// Adds user timing marks for e.g. state updates, suspense, and work loop stuff,\n// for an experimental timeline tool.\n\nvar enableSchedulingProfiler = true; // Helps identify side effects in render-phase lifecycle hooks and setState\n\nvar enableProfilerTimer = true; // Record durations for commit and passive effects phases.\n\nvar enableProfilerCommitHooks = true; // Phase param passed to onRender callback differentiates between an \"update\" and a \"cascading-update\".\n\nvar allNativeEvents = new Set();\n/**\n * Mapping from registration name to event name\n */\n\n\nvar registrationNameDependencies = {};\n/**\n * Mapping from lowercase registration names to the properly cased version,\n * used to warn in the case of missing event handlers. Available\n * only in true.\n * @type {Object}\n */\n\nvar possibleRegistrationNames = {} ; // Trust the developer to only use possibleRegistrationNames in true\n\nfunction registerTwoPhaseEvent(registrationName, dependencies) {\n registerDirectEvent(registrationName, dependencies);\n registerDirectEvent(registrationName + 'Capture', dependencies);\n}\nfunction registerDirectEvent(registrationName, dependencies) {\n {\n if (registrationNameDependencies[registrationName]) {\n error('EventRegistry: More than one plugin attempted to publish the same ' + 'registration name, `%s`.', registrationName);\n }\n }\n\n registrationNameDependencies[registrationName] = dependencies;\n\n {\n var lowerCasedName = registrationName.toLowerCase();\n possibleRegistrationNames[lowerCasedName] = registrationName;\n\n if (registrationName === 'onDoubleClick') {\n possibleRegistrationNames.ondblclick = registrationName;\n }\n }\n\n for (var i = 0; i < dependencies.length; i++) {\n allNativeEvents.add(dependencies[i]);\n }\n}\n\nvar canUseDOM = !!(typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined');\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\n/*\n * The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol\n * and Temporal.* types. See https://github.com/facebook/react/pull/22064.\n *\n * The functions in this module will throw an easier-to-understand,\n * easier-to-debug exception with a clear errors message message explaining the\n * problem. (Instead of a confusing exception thrown inside the implementation\n * of the `value` object).\n */\n// $FlowFixMe only called in DEV, so void return is not possible.\nfunction typeName(value) {\n {\n // toStringTag is needed for namespaced types like Temporal.Instant\n var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;\n var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object';\n return type;\n }\n} // $FlowFixMe only called in DEV, so void return is not possible.\n\n\nfunction willCoercionThrow(value) {\n {\n try {\n testStringCoercion(value);\n return false;\n } catch (e) {\n return true;\n }\n }\n}\n\nfunction testStringCoercion(value) {\n // If you ended up here by following an exception call stack, here's what's\n // happened: you supplied an object or symbol value to React (as a prop, key,\n // DOM attribute, CSS property, string ref, etc.) and when React tried to\n // coerce it to a string using `'' + value`, an exception was thrown.\n //\n // The most common types that will cause this exception are `Symbol` instances\n // and Temporal objects like `Temporal.Instant`. But any object that has a\n // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this\n // exception. (Library authors do this to prevent users from using built-in\n // numeric operators like `+` or comparison operators like `>=` because custom\n // methods are needed to perform accurate arithmetic or comparison.)\n //\n // To fix the problem, coerce this object or symbol value to a string before\n // passing it to React. The most reliable way is usually `String(value)`.\n //\n // To find which value is throwing, check the browser or debugger console.\n // Before this exception was thrown, there should be `console.error` output\n // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the\n // problem and how that type was used: key, atrribute, input value prop, etc.\n // In most cases, this console output also shows the component and its\n // ancestor components where the exception happened.\n //\n // eslint-disable-next-line react-internal/safe-string-coercion\n return '' + value;\n}\n\nfunction checkAttributeStringCoercion(value, attributeName) {\n {\n if (willCoercionThrow(value)) {\n error('The provided `%s` attribute is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', attributeName, typeName(value));\n\n return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n }\n }\n}\nfunction checkKeyStringCoercion(value) {\n {\n if (willCoercionThrow(value)) {\n error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));\n\n return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n }\n }\n}\nfunction checkPropStringCoercion(value, propName) {\n {\n if (willCoercionThrow(value)) {\n error('The provided `%s` prop is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', propName, typeName(value));\n\n return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n }\n }\n}\nfunction checkCSSPropertyStringCoercion(value, propName) {\n {\n if (willCoercionThrow(value)) {\n error('The provided `%s` CSS property is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', propName, typeName(value));\n\n return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n }\n }\n}\nfunction checkHtmlStringCoercion(value) {\n {\n if (willCoercionThrow(value)) {\n error('The provided HTML markup uses a value of unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));\n\n return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n }\n }\n}\nfunction checkFormFieldValueStringCoercion(value) {\n {\n if (willCoercionThrow(value)) {\n error('Form field values (value, checked, defaultValue, or defaultChecked props)' + ' must be strings, not %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));\n\n return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n }\n }\n}\n\n// A reserved attribute.\n// It is handled by React separately and shouldn't be written to the DOM.\nvar RESERVED = 0; // A simple string attribute.\n// Attributes that aren't in the filter are presumed to have this type.\n\nvar STRING = 1; // A string attribute that accepts booleans in React. In HTML, these are called\n// \"enumerated\" attributes with \"true\" and \"false\" as possible values.\n// When true, it should be set to a \"true\" string.\n// When false, it should be set to a \"false\" string.\n\nvar BOOLEANISH_STRING = 2; // A real boolean attribute.\n// When true, it should be present (set either to an empty string or its name).\n// When false, it should be omitted.\n\nvar BOOLEAN = 3; // An attribute that can be used as a flag as well as with a value.\n// When true, it should be present (set either to an empty string or its name).\n// When false, it should be omitted.\n// For any other value, should be present with that value.\n\nvar OVERLOADED_BOOLEAN = 4; // An attribute that must be numeric or parse as a numeric.\n// When falsy, it should be removed.\n\nvar NUMERIC = 5; // An attribute that must be positive numeric or parse as a positive numeric.\n// When falsy, it should be removed.\n\nvar POSITIVE_NUMERIC = 6;\n\n/* eslint-disable max-len */\nvar ATTRIBUTE_NAME_START_CHAR = \":A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD\";\n/* eslint-enable max-len */\n\nvar ATTRIBUTE_NAME_CHAR = ATTRIBUTE_NAME_START_CHAR + \"\\\\-.0-9\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040\";\nvar VALID_ATTRIBUTE_NAME_REGEX = new RegExp('^[' + ATTRIBUTE_NAME_START_CHAR + '][' + ATTRIBUTE_NAME_CHAR + ']*$');\nvar illegalAttributeNameCache = {};\nvar validatedAttributeNameCache = {};\nfunction isAttributeNameSafe(attributeName) {\n if (hasOwnProperty.call(validatedAttributeNameCache, attributeName)) {\n return true;\n }\n\n if (hasOwnProperty.call(illegalAttributeNameCache, attributeName)) {\n return false;\n }\n\n if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) {\n validatedAttributeNameCache[attributeName] = true;\n return true;\n }\n\n illegalAttributeNameCache[attributeName] = true;\n\n {\n error('Invalid attribute name: `%s`', attributeName);\n }\n\n return false;\n}\nfunction shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag) {\n if (propertyInfo !== null) {\n return propertyInfo.type === RESERVED;\n }\n\n if (isCustomComponentTag) {\n return false;\n }\n\n if (name.length > 2 && (name[0] === 'o' || name[0] === 'O') && (name[1] === 'n' || name[1] === 'N')) {\n return true;\n }\n\n return false;\n}\nfunction shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag) {\n if (propertyInfo !== null && propertyInfo.type === RESERVED) {\n return false;\n }\n\n switch (typeof value) {\n case 'function': // $FlowIssue symbol is perfectly valid here\n\n case 'symbol':\n // eslint-disable-line\n return true;\n\n case 'boolean':\n {\n if (isCustomComponentTag) {\n return false;\n }\n\n if (propertyInfo !== null) {\n return !propertyInfo.acceptsBooleans;\n } else {\n var prefix = name.toLowerCase().slice(0, 5);\n return prefix !== 'data-' && prefix !== 'aria-';\n }\n }\n\n default:\n return false;\n }\n}\nfunction shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag) {\n if (value === null || typeof value === 'undefined') {\n return true;\n }\n\n if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag)) {\n return true;\n }\n\n if (isCustomComponentTag) {\n\n return false;\n }\n\n if (propertyInfo !== null) {\n\n switch (propertyInfo.type) {\n case BOOLEAN:\n return !value;\n\n case OVERLOADED_BOOLEAN:\n return value === false;\n\n case NUMERIC:\n return isNaN(value);\n\n case POSITIVE_NUMERIC:\n return isNaN(value) || value < 1;\n }\n }\n\n return false;\n}\nfunction getPropertyInfo(name) {\n return properties.hasOwnProperty(name) ? properties[name] : null;\n}\n\nfunction PropertyInfoRecord(name, type, mustUseProperty, attributeName, attributeNamespace, sanitizeURL, removeEmptyString) {\n this.acceptsBooleans = type === BOOLEANISH_STRING || type === BOOLEAN || type === OVERLOADED_BOOLEAN;\n this.attributeName = attributeName;\n this.attributeNamespace = attributeNamespace;\n this.mustUseProperty = mustUseProperty;\n this.propertyName = name;\n this.type = type;\n this.sanitizeURL = sanitizeURL;\n this.removeEmptyString = removeEmptyString;\n} // When adding attributes to this list, be sure to also add them to\n// the `possibleStandardNames` module to ensure casing and incorrect\n// name warnings.\n\n\nvar properties = {}; // These props are reserved by React. They shouldn't be written to the DOM.\n\nvar reservedProps = ['children', 'dangerouslySetInnerHTML', // TODO: This prevents the assignment of defaultValue to regular\n// elements (not just inputs). Now that ReactDOMInput assigns to the\n// defaultValue property -- do we need this?\n'defaultValue', 'defaultChecked', 'innerHTML', 'suppressContentEditableWarning', 'suppressHydrationWarning', 'style'];\n\nreservedProps.forEach(function (name) {\n properties[name] = new PropertyInfoRecord(name, RESERVED, false, // mustUseProperty\n name, // attributeName\n null, // attributeNamespace\n false, // sanitizeURL\n false);\n}); // A few React string attributes have a different name.\n// This is a mapping from React prop names to the attribute names.\n\n[['acceptCharset', 'accept-charset'], ['className', 'class'], ['htmlFor', 'for'], ['httpEquiv', 'http-equiv']].forEach(function (_ref) {\n var name = _ref[0],\n attributeName = _ref[1];\n properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty\n attributeName, // attributeName\n null, // attributeNamespace\n false, // sanitizeURL\n false);\n}); // These are \"enumerated\" HTML attributes that accept \"true\" and \"false\".\n// In React, we let users pass `true` and `false` even though technically\n// these aren't boolean attributes (they are coerced to strings).\n\n['contentEditable', 'draggable', 'spellCheck', 'value'].forEach(function (name) {\n properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty\n name.toLowerCase(), // attributeName\n null, // attributeNamespace\n false, // sanitizeURL\n false);\n}); // These are \"enumerated\" SVG attributes that accept \"true\" and \"false\".\n// In React, we let users pass `true` and `false` even though technically\n// these aren't boolean attributes (they are coerced to strings).\n// Since these are SVG attributes, their attribute names are case-sensitive.\n\n['autoReverse', 'externalResourcesRequired', 'focusable', 'preserveAlpha'].forEach(function (name) {\n properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty\n name, // attributeName\n null, // attributeNamespace\n false, // sanitizeURL\n false);\n}); // These are HTML boolean attributes.\n\n['allowFullScreen', 'async', // Note: there is a special case that prevents it from being written to the DOM\n// on the client side because the browsers are inconsistent. Instead we call focus().\n'autoFocus', 'autoPlay', 'controls', 'default', 'defer', 'disabled', 'disablePictureInPicture', 'disableRemotePlayback', 'formNoValidate', 'hidden', 'loop', 'noModule', 'noValidate', 'open', 'playsInline', 'readOnly', 'required', 'reversed', 'scoped', 'seamless', // Microdata\n'itemScope'].forEach(function (name) {\n properties[name] = new PropertyInfoRecord(name, BOOLEAN, false, // mustUseProperty\n name.toLowerCase(), // attributeName\n null, // attributeNamespace\n false, // sanitizeURL\n false);\n}); // These are the few React props that we set as DOM properties\n// rather than attributes. These are all booleans.\n\n['checked', // Note: `option.selected` is not updated if `select.multiple` is\n// disabled with `removeAttribute`. We have special logic for handling this.\n'multiple', 'muted', 'selected' // NOTE: if you add a camelCased prop to this list,\n// you'll need to set attributeName to name.toLowerCase()\n// instead in the assignment below.\n].forEach(function (name) {\n properties[name] = new PropertyInfoRecord(name, BOOLEAN, true, // mustUseProperty\n name, // attributeName\n null, // attributeNamespace\n false, // sanitizeURL\n false);\n}); // These are HTML attributes that are \"overloaded booleans\": they behave like\n// booleans, but can also accept a string value.\n\n['capture', 'download' // NOTE: if you add a camelCased prop to this list,\n// you'll need to set attributeName to name.toLowerCase()\n// instead in the assignment below.\n].forEach(function (name) {\n properties[name] = new PropertyInfoRecord(name, OVERLOADED_BOOLEAN, false, // mustUseProperty\n name, // attributeName\n null, // attributeNamespace\n false, // sanitizeURL\n false);\n}); // These are HTML attributes that must be positive numbers.\n\n['cols', 'rows', 'size', 'span' // NOTE: if you add a camelCased prop to this list,\n// you'll need to set attributeName to name.toLowerCase()\n// instead in the assignment below.\n].forEach(function (name) {\n properties[name] = new PropertyInfoRecord(name, POSITIVE_NUMERIC, false, // mustUseProperty\n name, // attributeName\n null, // attributeNamespace\n false, // sanitizeURL\n false);\n}); // These are HTML attributes that must be numbers.\n\n['rowSpan', 'start'].forEach(function (name) {\n properties[name] = new PropertyInfoRecord(name, NUMERIC, false, // mustUseProperty\n name.toLowerCase(), // attributeName\n null, // attributeNamespace\n false, // sanitizeURL\n false);\n});\nvar CAMELIZE = /[\\-\\:]([a-z])/g;\n\nvar capitalize = function (token) {\n return token[1].toUpperCase();\n}; // This is a list of all SVG attributes that need special casing, namespacing,\n// or boolean value assignment. Regular attributes that just accept strings\n// and have the same names are omitted, just like in the HTML attribute filter.\n// Some of these attributes can be hard to find. This list was created by\n// scraping the MDN documentation.\n\n\n['accent-height', 'alignment-baseline', 'arabic-form', 'baseline-shift', 'cap-height', 'clip-path', 'clip-rule', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'dominant-baseline', 'enable-background', 'fill-opacity', 'fill-rule', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'glyph-name', 'glyph-orientation-horizontal', 'glyph-orientation-vertical', 'horiz-adv-x', 'horiz-origin-x', 'image-rendering', 'letter-spacing', 'lighting-color', 'marker-end', 'marker-mid', 'marker-start', 'overline-position', 'overline-thickness', 'paint-order', 'panose-1', 'pointer-events', 'rendering-intent', 'shape-rendering', 'stop-color', 'stop-opacity', 'strikethrough-position', 'strikethrough-thickness', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke-width', 'text-anchor', 'text-decoration', 'text-rendering', 'underline-position', 'underline-thickness', 'unicode-bidi', 'unicode-range', 'units-per-em', 'v-alphabetic', 'v-hanging', 'v-ideographic', 'v-mathematical', 'vector-effect', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'word-spacing', 'writing-mode', 'xmlns:xlink', 'x-height' // NOTE: if you add a camelCased prop to this list,\n// you'll need to set attributeName to name.toLowerCase()\n// instead in the assignment below.\n].forEach(function (attributeName) {\n var name = attributeName.replace(CAMELIZE, capitalize);\n properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty\n attributeName, null, // attributeNamespace\n false, // sanitizeURL\n false);\n}); // String SVG attributes with the xlink namespace.\n\n['xlink:actuate', 'xlink:arcrole', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type' // NOTE: if you add a camelCased prop to this list,\n// you'll need to set attributeName to name.toLowerCase()\n// instead in the assignment below.\n].forEach(function (attributeName) {\n var name = attributeName.replace(CAMELIZE, capitalize);\n properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty\n attributeName, 'http://www.w3.org/1999/xlink', false, // sanitizeURL\n false);\n}); // String SVG attributes with the xml namespace.\n\n['xml:base', 'xml:lang', 'xml:space' // NOTE: if you add a camelCased prop to this list,\n// you'll need to set attributeName to name.toLowerCase()\n// instead in the assignment below.\n].forEach(function (attributeName) {\n var name = attributeName.replace(CAMELIZE, capitalize);\n properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty\n attributeName, 'http://www.w3.org/XML/1998/namespace', false, // sanitizeURL\n false);\n}); // These attribute exists both in HTML and SVG.\n// The attribute name is case-sensitive in SVG so we can't just use\n// the React name like we do for attributes that exist only in HTML.\n\n['tabIndex', 'crossOrigin'].forEach(function (attributeName) {\n properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, // mustUseProperty\n attributeName.toLowerCase(), // attributeName\n null, // attributeNamespace\n false, // sanitizeURL\n false);\n}); // These attributes accept URLs. These must not allow javascript: URLS.\n// These will also need to accept Trusted Types object in the future.\n\nvar xlinkHref = 'xlinkHref';\nproperties[xlinkHref] = new PropertyInfoRecord('xlinkHref', STRING, false, // mustUseProperty\n'xlink:href', 'http://www.w3.org/1999/xlink', true, // sanitizeURL\nfalse);\n['src', 'href', 'action', 'formAction'].forEach(function (attributeName) {\n properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, // mustUseProperty\n attributeName.toLowerCase(), // attributeName\n null, // attributeNamespace\n true, // sanitizeURL\n true);\n});\n\n// and any newline or tab are filtered out as if they're not part of the URL.\n// https://url.spec.whatwg.org/#url-parsing\n// Tab or newline are defined as \\r\\n\\t:\n// https://infra.spec.whatwg.org/#ascii-tab-or-newline\n// A C0 control is a code point in the range \\u0000 NULL to \\u001F\n// INFORMATION SEPARATOR ONE, inclusive:\n// https://infra.spec.whatwg.org/#c0-control-or-space\n\n/* eslint-disable max-len */\n\nvar isJavaScriptProtocol = /^[\\u0000-\\u001F ]*j[\\r\\n\\t]*a[\\r\\n\\t]*v[\\r\\n\\t]*a[\\r\\n\\t]*s[\\r\\n\\t]*c[\\r\\n\\t]*r[\\r\\n\\t]*i[\\r\\n\\t]*p[\\r\\n\\t]*t[\\r\\n\\t]*\\:/i;\nvar didWarn = false;\n\nfunction sanitizeURL(url) {\n {\n if (!didWarn && isJavaScriptProtocol.test(url)) {\n didWarn = true;\n\n error('A future version of React will block javascript: URLs as a security precaution. ' + 'Use event handlers instead if you can. If you need to generate unsafe HTML try ' + 'using dangerouslySetInnerHTML instead. React was passed %s.', JSON.stringify(url));\n }\n }\n}\n\n/**\n * Get the value for a property on a node. Only used in DEV for SSR validation.\n * The \"expected\" argument is used as a hint of what the expected value is.\n * Some properties have multiple equivalent values.\n */\nfunction getValueForProperty(node, name, expected, propertyInfo) {\n {\n if (propertyInfo.mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n return node[propertyName];\n } else {\n // This check protects multiple uses of `expected`, which is why the\n // react-internal/safe-string-coercion rule is disabled in several spots\n // below.\n {\n checkAttributeStringCoercion(expected, name);\n }\n\n if ( propertyInfo.sanitizeURL) {\n // If we haven't fully disabled javascript: URLs, and if\n // the hydration is successful of a javascript: URL, we\n // still want to warn on the client.\n // eslint-disable-next-line react-internal/safe-string-coercion\n sanitizeURL('' + expected);\n }\n\n var attributeName = propertyInfo.attributeName;\n var stringValue = null;\n\n if (propertyInfo.type === OVERLOADED_BOOLEAN) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n\n if (value === '') {\n return true;\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return value;\n } // eslint-disable-next-line react-internal/safe-string-coercion\n\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n\n if (propertyInfo.type === BOOLEAN) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n } // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n\n\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return stringValue === null ? expected : stringValue; // eslint-disable-next-line react-internal/safe-string-coercion\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n}\n/**\n * Get the value for a attribute on a node. Only used in DEV for SSR validation.\n * The third argument is used as a hint of what the expected value is. Some\n * attributes have multiple equivalent values.\n */\n\nfunction getValueForAttribute(node, name, expected, isCustomComponentTag) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n\n var value = node.getAttribute(name);\n\n {\n checkAttributeStringCoercion(expected, name);\n }\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n}\n/**\n * Sets the value for a property on a node.\n *\n * @param {DOMElement} node\n * @param {string} name\n * @param {*} value\n */\n\nfunction setValueForProperty(node, name, value, isCustomComponentTag) {\n var propertyInfo = getPropertyInfo(name);\n\n if (shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag)) {\n return;\n }\n\n if (shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag)) {\n value = null;\n }\n\n\n if (isCustomComponentTag || propertyInfo === null) {\n if (isAttributeNameSafe(name)) {\n var _attributeName = name;\n\n if (value === null) {\n node.removeAttribute(_attributeName);\n } else {\n {\n checkAttributeStringCoercion(value, name);\n }\n\n node.setAttribute(_attributeName, '' + value);\n }\n }\n\n return;\n }\n\n var mustUseProperty = propertyInfo.mustUseProperty;\n\n if (mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n\n if (value === null) {\n var type = propertyInfo.type;\n node[propertyName] = type === BOOLEAN ? false : '';\n } else {\n // Contrary to `setAttribute`, object properties are properly\n // `toString`ed by IE8/9.\n node[propertyName] = value;\n }\n\n return;\n } // The rest are treated as attributes with special cases.\n\n\n var attributeName = propertyInfo.attributeName,\n attributeNamespace = propertyInfo.attributeNamespace;\n\n if (value === null) {\n node.removeAttribute(attributeName);\n } else {\n var _type = propertyInfo.type;\n var attributeValue;\n\n if (_type === BOOLEAN || _type === OVERLOADED_BOOLEAN && value === true) {\n // If attribute type is boolean, we know for sure it won't be an execution sink\n // and we won't require Trusted Type here.\n attributeValue = '';\n } else {\n // `setAttribute` with objects becomes only `[object]` in IE8/9,\n // ('' + value) makes it output the correct toString()-value.\n {\n {\n checkAttributeStringCoercion(value, attributeName);\n }\n\n attributeValue = '' + value;\n }\n\n if (propertyInfo.sanitizeURL) {\n sanitizeURL(attributeValue.toString());\n }\n }\n\n if (attributeNamespace) {\n node.setAttributeNS(attributeNamespace, attributeName, attributeValue);\n } else {\n node.setAttribute(attributeName, attributeValue);\n }\n }\n}\n\n// ATTENTION\n// When adding new symbols to this file,\n// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'\n// The Symbol used to tag the ReactElement-like types.\nvar REACT_ELEMENT_TYPE = Symbol.for('react.element');\nvar REACT_PORTAL_TYPE = Symbol.for('react.portal');\nvar REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');\nvar REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');\nvar REACT_PROFILER_TYPE = Symbol.for('react.profiler');\nvar REACT_PROVIDER_TYPE = Symbol.for('react.provider');\nvar REACT_CONTEXT_TYPE = Symbol.for('react.context');\nvar REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');\nvar REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');\nvar REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');\nvar REACT_MEMO_TYPE = Symbol.for('react.memo');\nvar REACT_LAZY_TYPE = Symbol.for('react.lazy');\nvar REACT_SCOPE_TYPE = Symbol.for('react.scope');\nvar REACT_DEBUG_TRACING_MODE_TYPE = Symbol.for('react.debug_trace_mode');\nvar REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');\nvar REACT_LEGACY_HIDDEN_TYPE = Symbol.for('react.legacy_hidden');\nvar REACT_CACHE_TYPE = Symbol.for('react.cache');\nvar REACT_TRACING_MARKER_TYPE = Symbol.for('react.tracing_marker');\nvar MAYBE_ITERATOR_SYMBOL = Symbol.iterator;\nvar FAUX_ITERATOR_SYMBOL = '@@iterator';\nfunction getIteratorFn(maybeIterable) {\n if (maybeIterable === null || typeof maybeIterable !== 'object') {\n return null;\n }\n\n var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];\n\n if (typeof maybeIterator === 'function') {\n return maybeIterator;\n }\n\n return null;\n}\n\nvar assign = Object.assign;\n\n// Helpers to patch console.logs to avoid logging during side-effect free\n// replaying on render function. This currently only patches the object\n// lazily which won't cover if the log function was extracted eagerly.\n// We could also eagerly patch the method.\nvar disabledDepth = 0;\nvar prevLog;\nvar prevInfo;\nvar prevWarn;\nvar prevError;\nvar prevGroup;\nvar prevGroupCollapsed;\nvar prevGroupEnd;\n\nfunction disabledLog() {}\n\ndisabledLog.__reactDisabledLog = true;\nfunction disableLogs() {\n {\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n prevLog = console.log;\n prevInfo = console.info;\n prevWarn = console.warn;\n prevError = console.error;\n prevGroup = console.group;\n prevGroupCollapsed = console.groupCollapsed;\n prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099\n\n var props = {\n configurable: true,\n enumerable: true,\n value: disabledLog,\n writable: true\n }; // $FlowFixMe Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n info: props,\n log: props,\n warn: props,\n error: props,\n group: props,\n groupCollapsed: props,\n groupEnd: props\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n disabledDepth++;\n }\n}\nfunction reenableLogs() {\n {\n disabledDepth--;\n\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n var props = {\n configurable: true,\n enumerable: true,\n writable: true\n }; // $FlowFixMe Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n log: assign({}, props, {\n value: prevLog\n }),\n info: assign({}, props, {\n value: prevInfo\n }),\n warn: assign({}, props, {\n value: prevWarn\n }),\n error: assign({}, props, {\n value: prevError\n }),\n group: assign({}, props, {\n value: prevGroup\n }),\n groupCollapsed: assign({}, props, {\n value: prevGroupCollapsed\n }),\n groupEnd: assign({}, props, {\n value: prevGroupEnd\n })\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n if (disabledDepth < 0) {\n error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');\n }\n }\n}\n\nvar ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;\nvar prefix;\nfunction describeBuiltInComponentFrame(name, source, ownerFn) {\n {\n if (prefix === undefined) {\n // Extract the VM specific prefix used by each line.\n try {\n throw Error();\n } catch (x) {\n var match = x.stack.trim().match(/\\n( *(at )?)/);\n prefix = match && match[1] || '';\n }\n } // We use the prefix to ensure our stacks line up with native stack frames.\n\n\n return '\\n' + prefix + name;\n }\n}\nvar reentry = false;\nvar componentFrameCache;\n\n{\n var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;\n componentFrameCache = new PossiblyWeakMap();\n}\n\nfunction describeNativeComponentFrame(fn, construct) {\n // If something asked for a stack inside a fake render, it should get ignored.\n if ( !fn || reentry) {\n return '';\n }\n\n {\n var frame = componentFrameCache.get(fn);\n\n if (frame !== undefined) {\n return frame;\n }\n }\n\n var control;\n reentry = true;\n var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.\n\n Error.prepareStackTrace = undefined;\n var previousDispatcher;\n\n {\n previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function\n // for warnings.\n\n ReactCurrentDispatcher.current = null;\n disableLogs();\n }\n\n try {\n // This should throw.\n if (construct) {\n // Something should be setting the props in the constructor.\n var Fake = function () {\n throw Error();\n }; // $FlowFixMe\n\n\n Object.defineProperty(Fake.prototype, 'props', {\n set: function () {\n // We use a throwing setter instead of frozen or non-writable props\n // because that won't throw in a non-strict mode function.\n throw Error();\n }\n });\n\n if (typeof Reflect === 'object' && Reflect.construct) {\n // We construct a different control for this case to include any extra\n // frames added by the construct call.\n try {\n Reflect.construct(Fake, []);\n } catch (x) {\n control = x;\n }\n\n Reflect.construct(fn, [], Fake);\n } else {\n try {\n Fake.call();\n } catch (x) {\n control = x;\n }\n\n fn.call(Fake.prototype);\n }\n } else {\n try {\n throw Error();\n } catch (x) {\n control = x;\n }\n\n fn();\n }\n } catch (sample) {\n // This is inlined manually because closure doesn't do it for us.\n if (sample && control && typeof sample.stack === 'string') {\n // This extracts the first frame from the sample that isn't also in the control.\n // Skipping one frame that we assume is the frame that calls the two.\n var sampleLines = sample.stack.split('\\n');\n var controlLines = control.stack.split('\\n');\n var s = sampleLines.length - 1;\n var c = controlLines.length - 1;\n\n while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {\n // We expect at least one stack frame to be shared.\n // Typically this will be the root most one. However, stack frames may be\n // cut off due to maximum stack limits. In this case, one maybe cut off\n // earlier than the other. We assume that the sample is longer or the same\n // and there for cut off earlier. So we should find the root most frame in\n // the sample somewhere in the control.\n c--;\n }\n\n for (; s >= 1 && c >= 0; s--, c--) {\n // Next we find the first one that isn't the same which should be the\n // frame that called our sample function and the control.\n if (sampleLines[s] !== controlLines[c]) {\n // In V8, the first line is describing the message but other VMs don't.\n // If we're about to return the first line, and the control is also on the same\n // line, that's a pretty good indicator that our sample threw at same line as\n // the control. I.e. before we entered the sample frame. So we ignore this result.\n // This can happen if you passed a class to function component, or non-function.\n if (s !== 1 || c !== 1) {\n do {\n s--;\n c--; // We may still have similar intermediate frames from the construct call.\n // The next one that isn't the same should be our match though.\n\n if (c < 0 || sampleLines[s] !== controlLines[c]) {\n // V8 adds a \"new\" prefix for native classes. Let's remove it to make it prettier.\n var _frame = '\\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled \"<anonymous>\"\n // but we have a user-provided \"displayName\"\n // splice it in to make the stack more readable.\n\n\n if (fn.displayName && _frame.includes('<anonymous>')) {\n _frame = _frame.replace('<anonymous>', fn.displayName);\n }\n\n {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, _frame);\n }\n } // Return the line we found.\n\n\n return _frame;\n }\n } while (s >= 1 && c >= 0);\n }\n\n break;\n }\n }\n }\n } finally {\n reentry = false;\n\n {\n ReactCurrentDispatcher.current = previousDispatcher;\n reenableLogs();\n }\n\n Error.prepareStackTrace = previousPrepareStackTrace;\n } // Fallback to just using the name if we couldn't make it throw.\n\n\n var name = fn ? fn.displayName || fn.name : '';\n var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';\n\n {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, syntheticFrame);\n }\n }\n\n return syntheticFrame;\n}\n\nfunction describeClassComponentFrame(ctor, source, ownerFn) {\n {\n return describeNativeComponentFrame(ctor, true);\n }\n}\nfunction describeFunctionComponentFrame(fn, source, ownerFn) {\n {\n return describeNativeComponentFrame(fn, false);\n }\n}\n\nfunction shouldConstruct(Component) {\n var prototype = Component.prototype;\n return !!(prototype && prototype.isReactComponent);\n}\n\nfunction describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {\n\n if (type == null) {\n return '';\n }\n\n if (typeof type === 'function') {\n {\n return describeNativeComponentFrame(type, shouldConstruct(type));\n }\n }\n\n if (typeof type === 'string') {\n return describeBuiltInComponentFrame(type);\n }\n\n switch (type) {\n case REACT_SUSPENSE_TYPE:\n return describeBuiltInComponentFrame('Suspense');\n\n case REACT_SUSPENSE_LIST_TYPE:\n return describeBuiltInComponentFrame('SuspenseList');\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_FORWARD_REF_TYPE:\n return describeFunctionComponentFrame(type.render);\n\n case REACT_MEMO_TYPE:\n // Memo may contain any component type so we recursively resolve it.\n return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n // Lazy may contain any component type so we recursively resolve it.\n return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);\n } catch (x) {}\n }\n }\n }\n\n return '';\n}\n\nfunction describeFiber(fiber) {\n var owner = fiber._debugOwner ? fiber._debugOwner.type : null ;\n var source = fiber._debugSource ;\n\n switch (fiber.tag) {\n case HostComponent:\n return describeBuiltInComponentFrame(fiber.type);\n\n case LazyComponent:\n return describeBuiltInComponentFrame('Lazy');\n\n case SuspenseComponent:\n return describeBuiltInComponentFrame('Suspense');\n\n case SuspenseListComponent:\n return describeBuiltInComponentFrame('SuspenseList');\n\n case FunctionComponent:\n case IndeterminateComponent:\n case SimpleMemoComponent:\n return describeFunctionComponentFrame(fiber.type);\n\n case ForwardRef:\n return describeFunctionComponentFrame(fiber.type.render);\n\n case ClassComponent:\n return describeClassComponentFrame(fiber.type);\n\n default:\n return '';\n }\n}\n\nfunction getStackByFiberInDevAndProd(workInProgress) {\n try {\n var info = '';\n var node = workInProgress;\n\n do {\n info += describeFiber(node);\n node = node.return;\n } while (node);\n\n return info;\n } catch (x) {\n return '\\nError generating stack: ' + x.message + '\\n' + x.stack;\n }\n}\n\nfunction getWrappedName(outerType, innerType, wrapperName) {\n var displayName = outerType.displayName;\n\n if (displayName) {\n return displayName;\n }\n\n var functionName = innerType.displayName || innerType.name || '';\n return functionName !== '' ? wrapperName + \"(\" + functionName + \")\" : wrapperName;\n} // Keep in sync with react-reconciler/getComponentNameFromFiber\n\n\nfunction getContextName(type) {\n return type.displayName || 'Context';\n} // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead.\n\n\nfunction getComponentNameFromType(type) {\n if (type == null) {\n // Host root, text node or just invalid type.\n return null;\n }\n\n {\n if (typeof type.tag === 'number') {\n error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.');\n }\n }\n\n if (typeof type === 'function') {\n return type.displayName || type.name || null;\n }\n\n if (typeof type === 'string') {\n return type;\n }\n\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return 'Fragment';\n\n case REACT_PORTAL_TYPE:\n return 'Portal';\n\n case REACT_PROFILER_TYPE:\n return 'Profiler';\n\n case REACT_STRICT_MODE_TYPE:\n return 'StrictMode';\n\n case REACT_SUSPENSE_TYPE:\n return 'Suspense';\n\n case REACT_SUSPENSE_LIST_TYPE:\n return 'SuspenseList';\n\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_CONTEXT_TYPE:\n var context = type;\n return getContextName(context) + '.Consumer';\n\n case REACT_PROVIDER_TYPE:\n var provider = type;\n return getContextName(provider._context) + '.Provider';\n\n case REACT_FORWARD_REF_TYPE:\n return getWrappedName(type, type.render, 'ForwardRef');\n\n case REACT_MEMO_TYPE:\n var outerName = type.displayName || null;\n\n if (outerName !== null) {\n return outerName;\n }\n\n return getComponentNameFromType(type.type) || 'Memo';\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n return getComponentNameFromType(init(payload));\n } catch (x) {\n return null;\n }\n }\n\n // eslint-disable-next-line no-fallthrough\n }\n }\n\n return null;\n}\n\nfunction getWrappedName$1(outerType, innerType, wrapperName) {\n var functionName = innerType.displayName || innerType.name || '';\n return outerType.displayName || (functionName !== '' ? wrapperName + \"(\" + functionName + \")\" : wrapperName);\n} // Keep in sync with shared/getComponentNameFromType\n\n\nfunction getContextName$1(type) {\n return type.displayName || 'Context';\n}\n\nfunction getComponentNameFromFiber(fiber) {\n var tag = fiber.tag,\n type = fiber.type;\n\n switch (tag) {\n case CacheComponent:\n return 'Cache';\n\n case ContextConsumer:\n var context = type;\n return getContextName$1(context) + '.Consumer';\n\n case ContextProvider:\n var provider = type;\n return getContextName$1(provider._context) + '.Provider';\n\n case DehydratedFragment:\n return 'DehydratedFragment';\n\n case ForwardRef:\n return getWrappedName$1(type, type.render, 'ForwardRef');\n\n case Fragment:\n return 'Fragment';\n\n case HostComponent:\n // Host component type is the display name (e.g. \"div\", \"View\")\n return type;\n\n case HostPortal:\n return 'Portal';\n\n case HostRoot:\n return 'Root';\n\n case HostText:\n return 'Text';\n\n case LazyComponent:\n // Name comes from the type in this case; we don't have a tag.\n return getComponentNameFromType(type);\n\n case Mode:\n if (type === REACT_STRICT_MODE_TYPE) {\n // Don't be less specific than shared/getComponentNameFromType\n return 'StrictMode';\n }\n\n return 'Mode';\n\n case OffscreenComponent:\n return 'Offscreen';\n\n case Profiler:\n return 'Profiler';\n\n case ScopeComponent:\n return 'Scope';\n\n case SuspenseComponent:\n return 'Suspense';\n\n case SuspenseListComponent:\n return 'SuspenseList';\n\n case TracingMarkerComponent:\n return 'TracingMarker';\n // The display name for this tags come from the user-provided type:\n\n case ClassComponent:\n case FunctionComponent:\n case IncompleteClassComponent:\n case IndeterminateComponent:\n case MemoComponent:\n case SimpleMemoComponent:\n if (typeof type === 'function') {\n return type.displayName || type.name || null;\n }\n\n if (typeof type === 'string') {\n return type;\n }\n\n break;\n\n }\n\n return null;\n}\n\nvar ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\nvar current = null;\nvar isRendering = false;\nfunction getCurrentFiberOwnerNameInDevOrNull() {\n {\n if (current === null) {\n return null;\n }\n\n var owner = current._debugOwner;\n\n if (owner !== null && typeof owner !== 'undefined') {\n return getComponentNameFromFiber(owner);\n }\n }\n\n return null;\n}\n\nfunction getCurrentFiberStackInDev() {\n {\n if (current === null) {\n return '';\n } // Safe because if current fiber exists, we are reconciling,\n // and it is guaranteed to be the work-in-progress version.\n\n\n return getStackByFiberInDevAndProd(current);\n }\n}\n\nfunction resetCurrentFiber() {\n {\n ReactDebugCurrentFrame.getCurrentStack = null;\n current = null;\n isRendering = false;\n }\n}\nfunction setCurrentFiber(fiber) {\n {\n ReactDebugCurrentFrame.getCurrentStack = fiber === null ? null : getCurrentFiberStackInDev;\n current = fiber;\n isRendering = false;\n }\n}\nfunction getCurrentFiber() {\n {\n return current;\n }\n}\nfunction setIsRendering(rendering) {\n {\n isRendering = rendering;\n }\n}\n\n// Flow does not allow string concatenation of most non-string types. To work\n// around this limitation, we use an opaque type that can only be obtained by\n// passing the value through getToStringValue first.\nfunction toString(value) {\n // The coercion safety check is performed in getToStringValue().\n // eslint-disable-next-line react-internal/safe-string-coercion\n return '' + value;\n}\nfunction getToStringValue(value) {\n switch (typeof value) {\n case 'boolean':\n case 'number':\n case 'string':\n case 'undefined':\n return value;\n\n case 'object':\n {\n checkFormFieldValueStringCoercion(value);\n }\n\n return value;\n\n default:\n // function, symbol are assigned as empty strings\n return '';\n }\n}\n\nvar hasReadOnlyValue = {\n button: true,\n checkbox: true,\n image: true,\n hidden: true,\n radio: true,\n reset: true,\n submit: true\n};\nfunction checkControlledValueProps(tagName, props) {\n {\n if (!(hasReadOnlyValue[props.type] || props.onChange || props.onInput || props.readOnly || props.disabled || props.value == null)) {\n error('You provided a `value` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultValue`. Otherwise, ' + 'set either `onChange` or `readOnly`.');\n }\n\n if (!(props.onChange || props.readOnly || props.disabled || props.checked == null)) {\n error('You provided a `checked` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultChecked`. Otherwise, ' + 'set either `onChange` or `readOnly`.');\n }\n }\n}\n\nfunction isCheckable(elem) {\n var type = elem.type;\n var nodeName = elem.nodeName;\n return nodeName && nodeName.toLowerCase() === 'input' && (type === 'checkbox' || type === 'radio');\n}\n\nfunction getTracker(node) {\n return node._valueTracker;\n}\n\nfunction detachTracker(node) {\n node._valueTracker = null;\n}\n\nfunction getValueFromNode(node) {\n var value = '';\n\n if (!node) {\n return value;\n }\n\n if (isCheckable(node)) {\n value = node.checked ? 'true' : 'false';\n } else {\n value = node.value;\n }\n\n return value;\n}\n\nfunction trackValueOnNode(node) {\n var valueField = isCheckable(node) ? 'checked' : 'value';\n var descriptor = Object.getOwnPropertyDescriptor(node.constructor.prototype, valueField);\n\n {\n checkFormFieldValueStringCoercion(node[valueField]);\n }\n\n var currentValue = '' + node[valueField]; // if someone has already defined a value or Safari, then bail\n // and don't track value will cause over reporting of changes,\n // but it's better then a hard failure\n // (needed for certain tests that spyOn input values and Safari)\n\n if (node.hasOwnProperty(valueField) || typeof descriptor === 'undefined' || typeof descriptor.get !== 'function' || typeof descriptor.set !== 'function') {\n return;\n }\n\n var get = descriptor.get,\n set = descriptor.set;\n Object.defineProperty(node, valueField, {\n configurable: true,\n get: function () {\n return get.call(this);\n },\n set: function (value) {\n {\n checkFormFieldValueStringCoercion(value);\n }\n\n currentValue = '' + value;\n set.call(this, value);\n }\n }); // We could've passed this the first time\n // but it triggers a bug in IE11 and Edge 14/15.\n // Calling defineProperty() again should be equivalent.\n // https://github.com/facebook/react/issues/11768\n\n Object.defineProperty(node, valueField, {\n enumerable: descriptor.enumerable\n });\n var tracker = {\n getValue: function () {\n return currentValue;\n },\n setValue: function (value) {\n {\n checkFormFieldValueStringCoercion(value);\n }\n\n currentValue = '' + value;\n },\n stopTracking: function () {\n detachTracker(node);\n delete node[valueField];\n }\n };\n return tracker;\n}\n\nfunction track(node) {\n if (getTracker(node)) {\n return;\n } // TODO: Once it's just Fiber we can move this to node._wrapperState\n\n\n node._valueTracker = trackValueOnNode(node);\n}\nfunction updateValueIfChanged(node) {\n if (!node) {\n return false;\n }\n\n var tracker = getTracker(node); // if there is no tracker at this point it's unlikely\n // that trying again will succeed\n\n if (!tracker) {\n return true;\n }\n\n var lastValue = tracker.getValue();\n var nextValue = getValueFromNode(node);\n\n if (nextValue !== lastValue) {\n tracker.setValue(nextValue);\n return true;\n }\n\n return false;\n}\n\nfunction getActiveElement(doc) {\n doc = doc || (typeof document !== 'undefined' ? document : undefined);\n\n if (typeof doc === 'undefined') {\n return null;\n }\n\n try {\n return doc.activeElement || doc.body;\n } catch (e) {\n return doc.body;\n }\n}\n\nvar didWarnValueDefaultValue = false;\nvar didWarnCheckedDefaultChecked = false;\nvar didWarnControlledToUncontrolled = false;\nvar didWarnUncontrolledToControlled = false;\n\nfunction isControlled(props) {\n var usesChecked = props.type === 'checkbox' || props.type === 'radio';\n return usesChecked ? props.checked != null : props.value != null;\n}\n/**\n * Implements an <input> host component that allows setting these optional\n * props: `checked`, `value`, `defaultChecked`, and `defaultValue`.\n *\n * If `checked` or `value` are not supplied (or null/undefined), user actions\n * that affect the checked state or value will trigger updates to the element.\n *\n * If they are supplied (and not null/undefined), the rendered element will not\n * trigger updates to the element. Instead, the props must change in order for\n * the rendered element to be updated.\n *\n * The rendered element will be initialized as unchecked (or `defaultChecked`)\n * with an empty value (or `defaultValue`).\n *\n * See http://www.w3.org/TR/2012/WD-html5-20121025/the-input-element.html\n */\n\n\nfunction getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n var hostProps = assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n return hostProps;\n}\nfunction initWrapperState(element, props) {\n {\n checkControlledValueProps('input', props);\n\n if (props.checked !== undefined && props.defaultChecked !== undefined && !didWarnCheckedDefaultChecked) {\n error('%s contains an input of type %s with both checked and defaultChecked props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the checked prop, or the defaultChecked prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components', getCurrentFiberOwnerNameInDevOrNull() || 'A component', props.type);\n\n didWarnCheckedDefaultChecked = true;\n }\n\n if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue) {\n error('%s contains an input of type %s with both value and defaultValue props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components', getCurrentFiberOwnerNameInDevOrNull() || 'A component', props.type);\n\n didWarnValueDefaultValue = true;\n }\n }\n\n var node = element;\n var defaultValue = props.defaultValue == null ? '' : props.defaultValue;\n node._wrapperState = {\n initialChecked: props.checked != null ? props.checked : props.defaultChecked,\n initialValue: getToStringValue(props.value != null ? props.value : defaultValue),\n controlled: isControlled(props)\n };\n}\nfunction updateChecked(element, props) {\n var node = element;\n var checked = props.checked;\n\n if (checked != null) {\n setValueForProperty(node, 'checked', checked, false);\n }\n}\nfunction updateWrapper(element, props) {\n var node = element;\n\n {\n var controlled = isControlled(props);\n\n if (!node._wrapperState.controlled && controlled && !didWarnUncontrolledToControlled) {\n error('A component is changing an uncontrolled input to be controlled. ' + 'This is likely caused by the value changing from undefined to ' + 'a defined value, which should not happen. ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components');\n\n didWarnUncontrolledToControlled = true;\n }\n\n if (node._wrapperState.controlled && !controlled && !didWarnControlledToUncontrolled) {\n error('A component is changing a controlled input to be uncontrolled. ' + 'This is likely caused by the value changing from a defined to ' + 'undefined, which should not happen. ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components');\n\n didWarnControlledToUncontrolled = true;\n }\n }\n\n updateChecked(element, props);\n var value = getToStringValue(props.value);\n var type = props.type;\n\n if (value != null) {\n if (type === 'number') {\n if (value === 0 && node.value === '' || // We explicitly want to coerce to number here if possible.\n // eslint-disable-next-line\n node.value != value) {\n node.value = toString(value);\n }\n } else if (node.value !== toString(value)) {\n node.value = toString(value);\n }\n } else if (type === 'submit' || type === 'reset') {\n // Submit/reset inputs need the attribute removed completely to avoid\n // blank-text buttons.\n node.removeAttribute('value');\n return;\n }\n\n {\n // When syncing the value attribute, the value comes from a cascade of\n // properties:\n // 1. The value React property\n // 2. The defaultValue React property\n // 3. Otherwise there should be no change\n if (props.hasOwnProperty('value')) {\n setDefaultValue(node, props.type, value);\n } else if (props.hasOwnProperty('defaultValue')) {\n setDefaultValue(node, props.type, getToStringValue(props.defaultValue));\n }\n }\n\n {\n // When syncing the checked attribute, it only changes when it needs\n // to be removed, such as transitioning from a checkbox into a text input\n if (props.checked == null && props.defaultChecked != null) {\n node.defaultChecked = !!props.defaultChecked;\n }\n }\n}\nfunction postMountWrapper(element, props, isHydrating) {\n var node = element; // Do not assign value if it is already set. This prevents user text input\n // from being lost during SSR hydration.\n\n if (props.hasOwnProperty('value') || props.hasOwnProperty('defaultValue')) {\n var type = props.type;\n var isButton = type === 'submit' || type === 'reset'; // Avoid setting value attribute on submit/reset inputs as it overrides the\n // default value provided by the browser. See: #12872\n\n if (isButton && (props.value === undefined || props.value === null)) {\n return;\n }\n\n var initialValue = toString(node._wrapperState.initialValue); // Do not assign value if it is already set. This prevents user text input\n // from being lost during SSR hydration.\n\n if (!isHydrating) {\n {\n // When syncing the value attribute, the value property should use\n // the wrapperState._initialValue property. This uses:\n //\n // 1. The value React property when present\n // 2. The defaultValue React property when present\n // 3. An empty string\n if (initialValue !== node.value) {\n node.value = initialValue;\n }\n }\n }\n\n {\n // Otherwise, the value attribute is synchronized to the property,\n // so we assign defaultValue to the same thing as the value property\n // assignment step above.\n node.defaultValue = initialValue;\n }\n } // Normally, we'd just do `node.checked = node.checked` upon initial mount, less this bug\n // this is needed to work around a chrome bug where setting defaultChecked\n // will sometimes influence the value of checked (even after detachment).\n // Reference: https://bugs.chromium.org/p/chromium/issues/detail?id=608416\n // We need to temporarily unset name to avoid disrupting radio button groups.\n\n\n var name = node.name;\n\n if (name !== '') {\n node.name = '';\n }\n\n {\n // When syncing the checked attribute, both the checked property and\n // attribute are assigned at the same time using defaultChecked. This uses:\n //\n // 1. The checked React property when present\n // 2. The defaultChecked React property when present\n // 3. Otherwise, false\n node.defaultChecked = !node.defaultChecked;\n node.defaultChecked = !!node._wrapperState.initialChecked;\n }\n\n if (name !== '') {\n node.name = name;\n }\n}\nfunction restoreControlledState(element, props) {\n var node = element;\n updateWrapper(node, props);\n updateNamedCousins(node, props);\n}\n\nfunction updateNamedCousins(rootNode, props) {\n var name = props.name;\n\n if (props.type === 'radio' && name != null) {\n var queryRoot = rootNode;\n\n while (queryRoot.parentNode) {\n queryRoot = queryRoot.parentNode;\n } // If `rootNode.form` was non-null, then we could try `form.elements`,\n // but that sometimes behaves strangely in IE8. We could also try using\n // `form.getElementsByName`, but that will only return direct children\n // and won't include inputs that use the HTML5 `form=` attribute. Since\n // the input might not even be in a form. It might not even be in the\n // document. Let's just use the local `querySelectorAll` to ensure we don't\n // miss anything.\n\n\n {\n checkAttributeStringCoercion(name, 'name');\n }\n\n var group = queryRoot.querySelectorAll('input[name=' + JSON.stringify('' + name) + '][type=\"radio\"]');\n\n for (var i = 0; i < group.length; i++) {\n var otherNode = group[i];\n\n if (otherNode === rootNode || otherNode.form !== rootNode.form) {\n continue;\n } // This will throw if radio buttons rendered by different copies of React\n // and the same name are rendered into the same form (same as #1939).\n // That's probably okay; we don't support it just as we don't support\n // mixing React radio buttons with non-React ones.\n\n\n var otherProps = getFiberCurrentPropsFromNode(otherNode);\n\n if (!otherProps) {\n throw new Error('ReactDOMInput: Mixing React and non-React radio inputs with the ' + 'same `name` is not supported.');\n } // We need update the tracked value on the named cousin since the value\n // was changed but the input saw no event or value set\n\n\n updateValueIfChanged(otherNode); // If this is a controlled radio button group, forcing the input that\n // was previously checked to update will cause it to be come re-checked\n // as appropriate.\n\n updateWrapper(otherNode, otherProps);\n }\n }\n} // In Chrome, assigning defaultValue to certain input types triggers input validation.\n// For number inputs, the display value loses trailing decimal points. For email inputs,\n// Chrome raises \"The specified value <x> is not a valid email address\".\n//\n// Here we check to see if the defaultValue has actually changed, avoiding these problems\n// when the user is inputting text\n//\n// https://github.com/facebook/react/issues/7253\n\n\nfunction setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}\n\nvar didWarnSelectedSetOnOption = false;\nvar didWarnInvalidChild = false;\nvar didWarnInvalidInnerHTML = false;\n/**\n * Implements an <option> host component that warns when `selected` is set.\n */\n\nfunction validateProps(element, props) {\n {\n // If a value is not provided, then the children must be simple.\n if (props.value == null) {\n if (typeof props.children === 'object' && props.children !== null) {\n React.Children.forEach(props.children, function (child) {\n if (child == null) {\n return;\n }\n\n if (typeof child === 'string' || typeof child === 'number') {\n return;\n }\n\n if (!didWarnInvalidChild) {\n didWarnInvalidChild = true;\n\n error('Cannot infer the option value of complex children. ' + 'Pass a `value` prop or use a plain string as children to <option>.');\n }\n });\n } else if (props.dangerouslySetInnerHTML != null) {\n if (!didWarnInvalidInnerHTML) {\n didWarnInvalidInnerHTML = true;\n\n error('Pass a `value` prop if you set dangerouslyInnerHTML so React knows ' + 'which value should be selected.');\n }\n }\n } // TODO: Remove support for `selected` in <option>.\n\n\n if (props.selected != null && !didWarnSelectedSetOnOption) {\n error('Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.');\n\n didWarnSelectedSetOnOption = true;\n }\n }\n}\nfunction postMountWrapper$1(element, props) {\n // value=\"\" should make a value attribute (#6219)\n if (props.value != null) {\n element.setAttribute('value', toString(getToStringValue(props.value)));\n }\n}\n\nvar isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare\n\nfunction isArray(a) {\n return isArrayImpl(a);\n}\n\nvar didWarnValueDefaultValue$1;\n\n{\n didWarnValueDefaultValue$1 = false;\n}\n\nfunction getDeclarationErrorAddendum() {\n var ownerName = getCurrentFiberOwnerNameInDevOrNull();\n\n if (ownerName) {\n return '\\n\\nCheck the render method of `' + ownerName + '`.';\n }\n\n return '';\n}\n\nvar valuePropNames = ['value', 'defaultValue'];\n/**\n * Validation function for `value` and `defaultValue`.\n */\n\nfunction checkSelectPropTypes(props) {\n {\n checkControlledValueProps('select', props);\n\n for (var i = 0; i < valuePropNames.length; i++) {\n var propName = valuePropNames[i];\n\n if (props[propName] == null) {\n continue;\n }\n\n var propNameIsArray = isArray(props[propName]);\n\n if (props.multiple && !propNameIsArray) {\n error('The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum());\n } else if (!props.multiple && propNameIsArray) {\n error('The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum());\n }\n }\n }\n}\n\nfunction updateOptions(node, multiple, propValue, setDefaultSelected) {\n var options = node.options;\n\n if (multiple) {\n var selectedValues = propValue;\n var selectedValue = {};\n\n for (var i = 0; i < selectedValues.length; i++) {\n // Prefix to avoid chaos with special keys.\n selectedValue['$' + selectedValues[i]] = true;\n }\n\n for (var _i = 0; _i < options.length; _i++) {\n var selected = selectedValue.hasOwnProperty('$' + options[_i].value);\n\n if (options[_i].selected !== selected) {\n options[_i].selected = selected;\n }\n\n if (selected && setDefaultSelected) {\n options[_i].defaultSelected = true;\n }\n }\n } else {\n // Do not set `select.value` as exact behavior isn't consistent across all\n // browsers for all cases.\n var _selectedValue = toString(getToStringValue(propValue));\n\n var defaultSelected = null;\n\n for (var _i2 = 0; _i2 < options.length; _i2++) {\n if (options[_i2].value === _selectedValue) {\n options[_i2].selected = true;\n\n if (setDefaultSelected) {\n options[_i2].defaultSelected = true;\n }\n\n return;\n }\n\n if (defaultSelected === null && !options[_i2].disabled) {\n defaultSelected = options[_i2];\n }\n }\n\n if (defaultSelected !== null) {\n defaultSelected.selected = true;\n }\n }\n}\n/**\n * Implements a <select> host component that allows optionally setting the\n * props `value` and `defaultValue`. If `multiple` is false, the prop must be a\n * stringable. If `multiple` is true, the prop must be an array of stringables.\n *\n * If `value` is not supplied (or null/undefined), user actions that change the\n * selected option will trigger updates to the rendered options.\n *\n * If it is supplied (and not null/undefined), the rendered options will not\n * update in response to user actions. Instead, the `value` prop must change in\n * order for the rendered options to update.\n *\n * If `defaultValue` is provided, any options with the supplied values will be\n * selected.\n */\n\n\nfunction getHostProps$1(element, props) {\n return assign({}, props, {\n value: undefined\n });\n}\nfunction initWrapperState$1(element, props) {\n var node = element;\n\n {\n checkSelectPropTypes(props);\n }\n\n node._wrapperState = {\n wasMultiple: !!props.multiple\n };\n\n {\n if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue$1) {\n error('Select elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled select ' + 'element and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components');\n\n didWarnValueDefaultValue$1 = true;\n }\n }\n}\nfunction postMountWrapper$2(element, props) {\n var node = element;\n node.multiple = !!props.multiple;\n var value = props.value;\n\n if (value != null) {\n updateOptions(node, !!props.multiple, value, false);\n } else if (props.defaultValue != null) {\n updateOptions(node, !!props.multiple, props.defaultValue, true);\n }\n}\nfunction postUpdateWrapper(element, props) {\n var node = element;\n var wasMultiple = node._wrapperState.wasMultiple;\n node._wrapperState.wasMultiple = !!props.multiple;\n var value = props.value;\n\n if (value != null) {\n updateOptions(node, !!props.multiple, value, false);\n } else if (wasMultiple !== !!props.multiple) {\n // For simplicity, reapply `defaultValue` if `multiple` is toggled.\n if (props.defaultValue != null) {\n updateOptions(node, !!props.multiple, props.defaultValue, true);\n } else {\n // Revert the select back to its default unselected state.\n updateOptions(node, !!props.multiple, props.multiple ? [] : '', false);\n }\n }\n}\nfunction restoreControlledState$1(element, props) {\n var node = element;\n var value = props.value;\n\n if (value != null) {\n updateOptions(node, !!props.multiple, value, false);\n }\n}\n\nvar didWarnValDefaultVal = false;\n\n/**\n * Implements a <textarea> host component that allows setting `value`, and\n * `defaultValue`. This differs from the traditional DOM API because value is\n * usually set as PCDATA children.\n *\n * If `value` is not supplied (or null/undefined), user actions that affect the\n * value will trigger updates to the element.\n *\n * If `value` is supplied (and not null/undefined), the rendered element will\n * not trigger updates to the element. Instead, the `value` prop must change in\n * order for the rendered element to be updated.\n *\n * The rendered element will be initialized with an empty value, the prop\n * `defaultValue` if specified, or the children content (deprecated).\n */\nfunction getHostProps$2(element, props) {\n var node = element;\n\n if (props.dangerouslySetInnerHTML != null) {\n throw new Error('`dangerouslySetInnerHTML` does not make sense on <textarea>.');\n } // Always set children to the same thing. In IE9, the selection range will\n // get reset if `textContent` is mutated. We could add a check in setTextContent\n // to only set the value if/when the value differs from the node value (which would\n // completely solve this IE9 bug), but Sebastian+Sophie seemed to like this\n // solution. The value can be a boolean or object so that's why it's forced\n // to be a string.\n\n\n var hostProps = assign({}, props, {\n value: undefined,\n defaultValue: undefined,\n children: toString(node._wrapperState.initialValue)\n });\n\n return hostProps;\n}\nfunction initWrapperState$2(element, props) {\n var node = element;\n\n {\n checkControlledValueProps('textarea', props);\n\n if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValDefaultVal) {\n error('%s contains a textarea with both value and defaultValue props. ' + 'Textarea elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled textarea ' + 'and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components', getCurrentFiberOwnerNameInDevOrNull() || 'A component');\n\n didWarnValDefaultVal = true;\n }\n }\n\n var initialValue = props.value; // Only bother fetching default value if we're going to use it\n\n if (initialValue == null) {\n var children = props.children,\n defaultValue = props.defaultValue;\n\n if (children != null) {\n {\n error('Use the `defaultValue` or `value` props instead of setting ' + 'children on <textarea>.');\n }\n\n {\n if (defaultValue != null) {\n throw new Error('If you supply `defaultValue` on a <textarea>, do not pass children.');\n }\n\n if (isArray(children)) {\n if (children.length > 1) {\n throw new Error('<textarea> can only have at most one child.');\n }\n\n children = children[0];\n }\n\n defaultValue = children;\n }\n }\n\n if (defaultValue == null) {\n defaultValue = '';\n }\n\n initialValue = defaultValue;\n }\n\n node._wrapperState = {\n initialValue: getToStringValue(initialValue)\n };\n}\nfunction updateWrapper$1(element, props) {\n var node = element;\n var value = getToStringValue(props.value);\n var defaultValue = getToStringValue(props.defaultValue);\n\n if (value != null) {\n // Cast `value` to a string to ensure the value is set correctly. While\n // browsers typically do this as necessary, jsdom doesn't.\n var newValue = toString(value); // To avoid side effects (such as losing text selection), only set value if changed\n\n if (newValue !== node.value) {\n node.value = newValue;\n }\n\n if (props.defaultValue == null && node.defaultValue !== newValue) {\n node.defaultValue = newValue;\n }\n }\n\n if (defaultValue != null) {\n node.defaultValue = toString(defaultValue);\n }\n}\nfunction postMountWrapper$3(element, props) {\n var node = element; // This is in postMount because we need access to the DOM node, which is not\n // available until after the component has mounted.\n\n var textContent = node.textContent; // Only set node.value if textContent is equal to the expected\n // initial value. In IE10/IE11 there is a bug where the placeholder attribute\n // will populate textContent as well.\n // https://developer.microsoft.com/microsoft-edge/platform/issues/101525/\n\n if (textContent === node._wrapperState.initialValue) {\n if (textContent !== '' && textContent !== null) {\n node.value = textContent;\n }\n }\n}\nfunction restoreControlledState$2(element, props) {\n // DOM component is still mounted; update\n updateWrapper$1(element, props);\n}\n\nvar HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';\nvar MATH_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';\nvar SVG_NAMESPACE = 'http://www.w3.org/2000/svg'; // Assumes there is no parent namespace.\n\nfunction getIntrinsicNamespace(type) {\n switch (type) {\n case 'svg':\n return SVG_NAMESPACE;\n\n case 'math':\n return MATH_NAMESPACE;\n\n default:\n return HTML_NAMESPACE;\n }\n}\nfunction getChildNamespace(parentNamespace, type) {\n if (parentNamespace == null || parentNamespace === HTML_NAMESPACE) {\n // No (or default) parent namespace: potential entry point.\n return getIntrinsicNamespace(type);\n }\n\n if (parentNamespace === SVG_NAMESPACE && type === 'foreignObject') {\n // We're leaving SVG.\n return HTML_NAMESPACE;\n } // By default, pass namespace below.\n\n\n return parentNamespace;\n}\n\n/* globals MSApp */\n\n/**\n * Create a function which has 'unsafe' privileges (required by windows8 apps)\n */\nvar createMicrosoftUnsafeLocalFunction = function (func) {\n if (typeof MSApp !== 'undefined' && MSApp.execUnsafeLocalFunction) {\n return function (arg0, arg1, arg2, arg3) {\n MSApp.execUnsafeLocalFunction(function () {\n return func(arg0, arg1, arg2, arg3);\n });\n };\n } else {\n return func;\n }\n};\n\nvar reusableSVGContainer;\n/**\n * Set the innerHTML property of a node\n *\n * @param {DOMElement} node\n * @param {string} html\n * @internal\n */\n\nvar setInnerHTML = createMicrosoftUnsafeLocalFunction(function (node, html) {\n if (node.namespaceURI === SVG_NAMESPACE) {\n\n if (!('innerHTML' in node)) {\n // IE does not have innerHTML for SVG nodes, so instead we inject the\n // new markup in a temp node and then move the child nodes across into\n // the target node\n reusableSVGContainer = reusableSVGContainer || document.createElement('div');\n reusableSVGContainer.innerHTML = '<svg>' + html.valueOf().toString() + '</svg>';\n var svgNode = reusableSVGContainer.firstChild;\n\n while (node.firstChild) {\n node.removeChild(node.firstChild);\n }\n\n while (svgNode.firstChild) {\n node.appendChild(svgNode.firstChild);\n }\n\n return;\n }\n }\n\n node.innerHTML = html;\n});\n\n/**\n * HTML nodeType values that represent the type of the node\n */\nvar ELEMENT_NODE = 1;\nvar TEXT_NODE = 3;\nvar COMMENT_NODE = 8;\nvar DOCUMENT_NODE = 9;\nvar DOCUMENT_FRAGMENT_NODE = 11;\n\n/**\n * Set the textContent property of a node. For text updates, it's faster\n * to set the `nodeValue` of the Text node directly instead of using\n * `.textContent` which will remove the existing node and create a new one.\n *\n * @param {DOMElement} node\n * @param {string} text\n * @internal\n */\n\nvar setTextContent = function (node, text) {\n if (text) {\n var firstChild = node.firstChild;\n\n if (firstChild && firstChild === node.lastChild && firstChild.nodeType === TEXT_NODE) {\n firstChild.nodeValue = text;\n return;\n }\n }\n\n node.textContent = text;\n};\n\n// List derived from Gecko source code:\n// https://github.com/mozilla/gecko-dev/blob/4e638efc71/layout/style/test/property_database.js\nvar shorthandToLonghand = {\n animation: ['animationDelay', 'animationDirection', 'animationDuration', 'animationFillMode', 'animationIterationCount', 'animationName', 'animationPlayState', 'animationTimingFunction'],\n background: ['backgroundAttachment', 'backgroundClip', 'backgroundColor', 'backgroundImage', 'backgroundOrigin', 'backgroundPositionX', 'backgroundPositionY', 'backgroundRepeat', 'backgroundSize'],\n backgroundPosition: ['backgroundPositionX', 'backgroundPositionY'],\n border: ['borderBottomColor', 'borderBottomStyle', 'borderBottomWidth', 'borderImageOutset', 'borderImageRepeat', 'borderImageSlice', 'borderImageSource', 'borderImageWidth', 'borderLeftColor', 'borderLeftStyle', 'borderLeftWidth', 'borderRightColor', 'borderRightStyle', 'borderRightWidth', 'borderTopColor', 'borderTopStyle', 'borderTopWidth'],\n borderBlockEnd: ['borderBlockEndColor', 'borderBlockEndStyle', 'borderBlockEndWidth'],\n borderBlockStart: ['borderBlockStartColor', 'borderBlockStartStyle', 'borderBlockStartWidth'],\n borderBottom: ['borderBottomColor', 'borderBottomStyle', 'borderBottomWidth'],\n borderColor: ['borderBottomColor', 'borderLeftColor', 'borderRightColor', 'borderTopColor'],\n borderImage: ['borderImageOutset', 'borderImageRepeat', 'borderImageSlice', 'borderImageSource', 'borderImageWidth'],\n borderInlineEnd: ['borderInlineEndColor', 'borderInlineEndStyle', 'borderInlineEndWidth'],\n borderInlineStart: ['borderInlineStartColor', 'borderInlineStartStyle', 'borderInlineStartWidth'],\n borderLeft: ['borderLeftColor', 'borderLeftStyle', 'borderLeftWidth'],\n borderRadius: ['borderBottomLeftRadius', 'borderBottomRightRadius', 'borderTopLeftRadius', 'borderTopRightRadius'],\n borderRight: ['borderRightColor', 'borderRightStyle', 'borderRightWidth'],\n borderStyle: ['borderBottomStyle', 'borderLeftStyle', 'borderRightStyle', 'borderTopStyle'],\n borderTop: ['borderTopColor', 'borderTopStyle', 'borderTopWidth'],\n borderWidth: ['borderBottomWidth', 'borderLeftWidth', 'borderRightWidth', 'borderTopWidth'],\n columnRule: ['columnRuleColor', 'columnRuleStyle', 'columnRuleWidth'],\n columns: ['columnCount', 'columnWidth'],\n flex: ['flexBasis', 'flexGrow', 'flexShrink'],\n flexFlow: ['flexDirection', 'flexWrap'],\n font: ['fontFamily', 'fontFeatureSettings', 'fontKerning', 'fontLanguageOverride', 'fontSize', 'fontSizeAdjust', 'fontStretch', 'fontStyle', 'fontVariant', 'fontVariantAlternates', 'fontVariantCaps', 'fontVariantEastAsian', 'fontVariantLigatures', 'fontVariantNumeric', 'fontVariantPosition', 'fontWeight', 'lineHeight'],\n fontVariant: ['fontVariantAlternates', 'fontVariantCaps', 'fontVariantEastAsian', 'fontVariantLigatures', 'fontVariantNumeric', 'fontVariantPosition'],\n gap: ['columnGap', 'rowGap'],\n grid: ['gridAutoColumns', 'gridAutoFlow', 'gridAutoRows', 'gridTemplateAreas', 'gridTemplateColumns', 'gridTemplateRows'],\n gridArea: ['gridColumnEnd', 'gridColumnStart', 'gridRowEnd', 'gridRowStart'],\n gridColumn: ['gridColumnEnd', 'gridColumnStart'],\n gridColumnGap: ['columnGap'],\n gridGap: ['columnGap', 'rowGap'],\n gridRow: ['gridRowEnd', 'gridRowStart'],\n gridRowGap: ['rowGap'],\n gridTemplate: ['gridTemplateAreas', 'gridTemplateColumns', 'gridTemplateRows'],\n listStyle: ['listStyleImage', 'listStylePosition', 'listStyleType'],\n margin: ['marginBottom', 'marginLeft', 'marginRight', 'marginTop'],\n marker: ['markerEnd', 'markerMid', 'markerStart'],\n mask: ['maskClip', 'maskComposite', 'maskImage', 'maskMode', 'maskOrigin', 'maskPositionX', 'maskPositionY', 'maskRepeat', 'maskSize'],\n maskPosition: ['maskPositionX', 'maskPositionY'],\n outline: ['outlineColor', 'outlineStyle', 'outlineWidth'],\n overflow: ['overflowX', 'overflowY'],\n padding: ['paddingBottom', 'paddingLeft', 'paddingRight', 'paddingTop'],\n placeContent: ['alignContent', 'justifyContent'],\n placeItems: ['alignItems', 'justifyItems'],\n placeSelf: ['alignSelf', 'justifySelf'],\n textDecoration: ['textDecorationColor', 'textDecorationLine', 'textDecorationStyle'],\n textEmphasis: ['textEmphasisColor', 'textEmphasisStyle'],\n transition: ['transitionDelay', 'transitionDuration', 'transitionProperty', 'transitionTimingFunction'],\n wordWrap: ['overflowWrap']\n};\n\n/**\n * CSS properties which accept numbers but are not in units of \"px\".\n */\nvar isUnitlessNumber = {\n animationIterationCount: true,\n aspectRatio: true,\n borderImageOutset: true,\n borderImageSlice: true,\n borderImageWidth: true,\n boxFlex: true,\n boxFlexGroup: true,\n boxOrdinalGroup: true,\n columnCount: true,\n columns: true,\n flex: true,\n flexGrow: true,\n flexPositive: true,\n flexShrink: true,\n flexNegative: true,\n flexOrder: true,\n gridArea: true,\n gridRow: true,\n gridRowEnd: true,\n gridRowSpan: true,\n gridRowStart: true,\n gridColumn: true,\n gridColumnEnd: true,\n gridColumnSpan: true,\n gridColumnStart: true,\n fontWeight: true,\n lineClamp: true,\n lineHeight: true,\n opacity: true,\n order: true,\n orphans: true,\n tabSize: true,\n widows: true,\n zIndex: true,\n zoom: true,\n // SVG-related properties\n fillOpacity: true,\n floodOpacity: true,\n stopOpacity: true,\n strokeDasharray: true,\n strokeDashoffset: true,\n strokeMiterlimit: true,\n strokeOpacity: true,\n strokeWidth: true\n};\n/**\n * @param {string} prefix vendor-specific prefix, eg: Webkit\n * @param {string} key style name, eg: transitionDuration\n * @return {string} style name prefixed with `prefix`, properly camelCased, eg:\n * WebkitTransitionDuration\n */\n\nfunction prefixKey(prefix, key) {\n return prefix + key.charAt(0).toUpperCase() + key.substring(1);\n}\n/**\n * Support style names that may come passed in prefixed by adding permutations\n * of vendor prefixes.\n */\n\n\nvar prefixes = ['Webkit', 'ms', 'Moz', 'O']; // Using Object.keys here, or else the vanilla for-in loop makes IE8 go into an\n// infinite loop, because it iterates over the newly added props too.\n\nObject.keys(isUnitlessNumber).forEach(function (prop) {\n prefixes.forEach(function (prefix) {\n isUnitlessNumber[prefixKey(prefix, prop)] = isUnitlessNumber[prop];\n });\n});\n\n/**\n * Convert a value into the proper css writable value. The style name `name`\n * should be logical (no hyphens), as specified\n * in `CSSProperty.isUnitlessNumber`.\n *\n * @param {string} name CSS property name such as `topMargin`.\n * @param {*} value CSS property value such as `10px`.\n * @return {string} Normalized style value with dimensions applied.\n */\n\nfunction dangerousStyleValue(name, value, isCustomProperty) {\n // Note that we've removed escapeTextForBrowser() calls here since the\n // whole string will be escaped when the attribute is injected into\n // the markup. If you provide unsafe user data here they can inject\n // arbitrary CSS which may be problematic (I couldn't repro this):\n // https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet\n // http://www.thespanner.co.uk/2007/11/26/ultimate-xss-css-injection/\n // This is not an XSS hole but instead a potential CSS injection issue\n // which has lead to a greater discussion about how we're going to\n // trust URLs moving forward. See #2115901\n var isEmpty = value == null || typeof value === 'boolean' || value === '';\n\n if (isEmpty) {\n return '';\n }\n\n if (!isCustomProperty && typeof value === 'number' && value !== 0 && !(isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name])) {\n return value + 'px'; // Presumes implicit 'px' suffix for unitless numbers\n }\n\n {\n checkCSSPropertyStringCoercion(value, name);\n }\n\n return ('' + value).trim();\n}\n\nvar uppercasePattern = /([A-Z])/g;\nvar msPattern = /^ms-/;\n/**\n * Hyphenates a camelcased CSS property name, for example:\n *\n * > hyphenateStyleName('backgroundColor')\n * < \"background-color\"\n * > hyphenateStyleName('MozTransition')\n * < \"-moz-transition\"\n * > hyphenateStyleName('msTransition')\n * < \"-ms-transition\"\n *\n * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix\n * is converted to `-ms-`.\n */\n\nfunction hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}\n\nvar warnValidStyle = function () {};\n\n{\n // 'msTransform' is correct, but the other prefixes should be capitalized\n var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/;\n var msPattern$1 = /^-ms-/;\n var hyphenPattern = /-(.)/g; // style values shouldn't contain a semicolon\n\n var badStyleValueWithSemicolonPattern = /;\\s*$/;\n var warnedStyleNames = {};\n var warnedStyleValues = {};\n var warnedForNaNValue = false;\n var warnedForInfinityValue = false;\n\n var camelize = function (string) {\n return string.replace(hyphenPattern, function (_, character) {\n return character.toUpperCase();\n });\n };\n\n var warnHyphenatedStyleName = function (name) {\n if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {\n return;\n }\n\n warnedStyleNames[name] = true;\n\n error('Unsupported style property %s. Did you mean %s?', name, // As Andi Smith suggests\n // (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix\n // is converted to lowercase `ms`.\n camelize(name.replace(msPattern$1, 'ms-')));\n };\n\n var warnBadVendoredStyleName = function (name) {\n if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {\n return;\n }\n\n warnedStyleNames[name] = true;\n\n error('Unsupported vendor-prefixed style property %s. Did you mean %s?', name, name.charAt(0).toUpperCase() + name.slice(1));\n };\n\n var warnStyleValueWithSemicolon = function (name, value) {\n if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) {\n return;\n }\n\n warnedStyleValues[value] = true;\n\n error(\"Style property values shouldn't contain a semicolon. \" + 'Try \"%s: %s\" instead.', name, value.replace(badStyleValueWithSemicolonPattern, ''));\n };\n\n var warnStyleValueIsNaN = function (name, value) {\n if (warnedForNaNValue) {\n return;\n }\n\n warnedForNaNValue = true;\n\n error('`NaN` is an invalid value for the `%s` css style property.', name);\n };\n\n var warnStyleValueIsInfinity = function (name, value) {\n if (warnedForInfinityValue) {\n return;\n }\n\n warnedForInfinityValue = true;\n\n error('`Infinity` is an invalid value for the `%s` css style property.', name);\n };\n\n warnValidStyle = function (name, value) {\n if (name.indexOf('-') > -1) {\n warnHyphenatedStyleName(name);\n } else if (badVendoredStyleNamePattern.test(name)) {\n warnBadVendoredStyleName(name);\n } else if (badStyleValueWithSemicolonPattern.test(value)) {\n warnStyleValueWithSemicolon(name, value);\n }\n\n if (typeof value === 'number') {\n if (isNaN(value)) {\n warnStyleValueIsNaN(name, value);\n } else if (!isFinite(value)) {\n warnStyleValueIsInfinity(name, value);\n }\n }\n };\n}\n\nvar warnValidStyle$1 = warnValidStyle;\n\n/**\n * Operations for dealing with CSS properties.\n */\n\n/**\n * This creates a string that is expected to be equivalent to the style\n * attribute generated by server-side rendering. It by-passes warnings and\n * security checks so it's not safe to use this value for anything other than\n * comparison. It is only used in DEV for SSR validation.\n */\n\nfunction createDangerousStringForStyles(styles) {\n {\n var serialized = '';\n var delimiter = '';\n\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n\n var styleValue = styles[styleName];\n\n if (styleValue != null) {\n var isCustomProperty = styleName.indexOf('--') === 0;\n serialized += delimiter + (isCustomProperty ? styleName : hyphenateStyleName(styleName)) + ':';\n serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);\n delimiter = ';';\n }\n }\n\n return serialized || null;\n }\n}\n/**\n * Sets the value for multiple styles on a node. If a value is specified as\n * '' (empty string), the corresponding style property will be unset.\n *\n * @param {DOMElement} node\n * @param {object} styles\n */\n\nfunction setValueForStyles(node, styles) {\n var style = node.style;\n\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n\n var isCustomProperty = styleName.indexOf('--') === 0;\n\n {\n if (!isCustomProperty) {\n warnValidStyle$1(styleName, styles[styleName]);\n }\n }\n\n var styleValue = dangerousStyleValue(styleName, styles[styleName], isCustomProperty);\n\n if (styleName === 'float') {\n styleName = 'cssFloat';\n }\n\n if (isCustomProperty) {\n style.setProperty(styleName, styleValue);\n } else {\n style[styleName] = styleValue;\n }\n }\n}\n\nfunction isValueEmpty(value) {\n return value == null || typeof value === 'boolean' || value === '';\n}\n/**\n * Given {color: 'red', overflow: 'hidden'} returns {\n * color: 'color',\n * overflowX: 'overflow',\n * overflowY: 'overflow',\n * }. This can be read as \"the overflowY property was set by the overflow\n * shorthand\". That is, the values are the property that each was derived from.\n */\n\n\nfunction expandShorthandMap(styles) {\n var expanded = {};\n\n for (var key in styles) {\n var longhands = shorthandToLonghand[key] || [key];\n\n for (var i = 0; i < longhands.length; i++) {\n expanded[longhands[i]] = key;\n }\n }\n\n return expanded;\n}\n/**\n * When mixing shorthand and longhand property names, we warn during updates if\n * we expect an incorrect result to occur. In particular, we warn for:\n *\n * Updating a shorthand property (longhand gets overwritten):\n * {font: 'foo', fontVariant: 'bar'} -> {font: 'baz', fontVariant: 'bar'}\n * becomes .style.font = 'baz'\n * Removing a shorthand property (longhand gets lost too):\n * {font: 'foo', fontVariant: 'bar'} -> {fontVariant: 'bar'}\n * becomes .style.font = ''\n * Removing a longhand property (should revert to shorthand; doesn't):\n * {font: 'foo', fontVariant: 'bar'} -> {font: 'foo'}\n * becomes .style.fontVariant = ''\n */\n\n\nfunction validateShorthandPropertyCollisionInDev(styleUpdates, nextStyles) {\n {\n if (!nextStyles) {\n return;\n }\n\n var expandedUpdates = expandShorthandMap(styleUpdates);\n var expandedStyles = expandShorthandMap(nextStyles);\n var warnedAbout = {};\n\n for (var key in expandedUpdates) {\n var originalKey = expandedUpdates[key];\n var correctOriginalKey = expandedStyles[key];\n\n if (correctOriginalKey && originalKey !== correctOriginalKey) {\n var warningKey = originalKey + ',' + correctOriginalKey;\n\n if (warnedAbout[warningKey]) {\n continue;\n }\n\n warnedAbout[warningKey] = true;\n\n error('%s a style property during rerender (%s) when a ' + 'conflicting property is set (%s) can lead to styling bugs. To ' + \"avoid this, don't mix shorthand and non-shorthand properties \" + 'for the same value; instead, replace the shorthand with ' + 'separate values.', isValueEmpty(styleUpdates[originalKey]) ? 'Removing' : 'Updating', originalKey, correctOriginalKey);\n }\n }\n }\n}\n\n// For HTML, certain tags should omit their close tag. We keep a list for\n// those special-case tags.\nvar omittedCloseTags = {\n area: true,\n base: true,\n br: true,\n col: true,\n embed: true,\n hr: true,\n img: true,\n input: true,\n keygen: true,\n link: true,\n meta: true,\n param: true,\n source: true,\n track: true,\n wbr: true // NOTE: menuitem's close tag should be omitted, but that causes problems.\n\n};\n\n// `omittedCloseTags` except that `menuitem` should still have its closing tag.\n\nvar voidElementTags = assign({\n menuitem: true\n}, omittedCloseTags);\n\nvar HTML = '__html';\n\nfunction assertValidProps(tag, props) {\n if (!props) {\n return;\n } // Note the use of `==` which checks for null or undefined.\n\n\n if (voidElementTags[tag]) {\n if (props.children != null || props.dangerouslySetInnerHTML != null) {\n throw new Error(tag + \" is a void element tag and must neither have `children` nor \" + 'use `dangerouslySetInnerHTML`.');\n }\n }\n\n if (props.dangerouslySetInnerHTML != null) {\n if (props.children != null) {\n throw new Error('Can only set one of `children` or `props.dangerouslySetInnerHTML`.');\n }\n\n if (typeof props.dangerouslySetInnerHTML !== 'object' || !(HTML in props.dangerouslySetInnerHTML)) {\n throw new Error('`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. ' + 'Please visit https://reactjs.org/link/dangerously-set-inner-html ' + 'for more information.');\n }\n }\n\n {\n if (!props.suppressContentEditableWarning && props.contentEditable && props.children != null) {\n error('A component is `contentEditable` and contains `children` managed by ' + 'React. It is now your responsibility to guarantee that none of ' + 'those nodes are unexpectedly modified or duplicated. This is ' + 'probably not intentional.');\n }\n }\n\n if (props.style != null && typeof props.style !== 'object') {\n throw new Error('The `style` prop expects a mapping from style properties to values, ' + \"not a string. For example, style={{marginRight: spacing + 'em'}} when \" + 'using JSX.');\n }\n}\n\nfunction isCustomComponent(tagName, props) {\n if (tagName.indexOf('-') === -1) {\n return typeof props.is === 'string';\n }\n\n switch (tagName) {\n // These are reserved SVG and MathML elements.\n // We don't mind this list too much because we expect it to never grow.\n // The alternative is to track the namespace in a few places which is convoluted.\n // https://w3c.github.io/webcomponents/spec/custom/#custom-elements-core-concepts\n case 'annotation-xml':\n case 'color-profile':\n case 'font-face':\n case 'font-face-src':\n case 'font-face-uri':\n case 'font-face-format':\n case 'font-face-name':\n case 'missing-glyph':\n return false;\n\n default:\n return true;\n }\n}\n\n// When adding attributes to the HTML or SVG allowed attribute list, be sure to\n// also add them to this module to ensure casing and incorrect name\n// warnings.\nvar possibleStandardNames = {\n // HTML\n accept: 'accept',\n acceptcharset: 'acceptCharset',\n 'accept-charset': 'acceptCharset',\n accesskey: 'accessKey',\n action: 'action',\n allowfullscreen: 'allowFullScreen',\n alt: 'alt',\n as: 'as',\n async: 'async',\n autocapitalize: 'autoCapitalize',\n autocomplete: 'autoComplete',\n autocorrect: 'autoCorrect',\n autofocus: 'autoFocus',\n autoplay: 'autoPlay',\n autosave: 'autoSave',\n capture: 'capture',\n cellpadding: 'cellPadding',\n cellspacing: 'cellSpacing',\n challenge: 'challenge',\n charset: 'charSet',\n checked: 'checked',\n children: 'children',\n cite: 'cite',\n class: 'className',\n classid: 'classID',\n classname: 'className',\n cols: 'cols',\n colspan: 'colSpan',\n content: 'content',\n contenteditable: 'contentEditable',\n contextmenu: 'contextMenu',\n controls: 'controls',\n controlslist: 'controlsList',\n coords: 'coords',\n crossorigin: 'crossOrigin',\n dangerouslysetinnerhtml: 'dangerouslySetInnerHTML',\n data: 'data',\n datetime: 'dateTime',\n default: 'default',\n defaultchecked: 'defaultChecked',\n defaultvalue: 'defaultValue',\n defer: 'defer',\n dir: 'dir',\n disabled: 'disabled',\n disablepictureinpicture: 'disablePictureInPicture',\n disableremoteplayback: 'disableRemotePlayback',\n download: 'download',\n draggable: 'draggable',\n enctype: 'encType',\n enterkeyhint: 'enterKeyHint',\n for: 'htmlFor',\n form: 'form',\n formmethod: 'formMethod',\n formaction: 'formAction',\n formenctype: 'formEncType',\n formnovalidate: 'formNoValidate',\n formtarget: 'formTarget',\n frameborder: 'frameBorder',\n headers: 'headers',\n height: 'height',\n hidden: 'hidden',\n high: 'high',\n href: 'href',\n hreflang: 'hrefLang',\n htmlfor: 'htmlFor',\n httpequiv: 'httpEquiv',\n 'http-equiv': 'httpEquiv',\n icon: 'icon',\n id: 'id',\n imagesizes: 'imageSizes',\n imagesrcset: 'imageSrcSet',\n innerhtml: 'innerHTML',\n inputmode: 'inputMode',\n integrity: 'integrity',\n is: 'is',\n itemid: 'itemID',\n itemprop: 'itemProp',\n itemref: 'itemRef',\n itemscope: 'itemScope',\n itemtype: 'itemType',\n keyparams: 'keyParams',\n keytype: 'keyType',\n kind: 'kind',\n label: 'label',\n lang: 'lang',\n list: 'list',\n loop: 'loop',\n low: 'low',\n manifest: 'manifest',\n marginwidth: 'marginWidth',\n marginheight: 'marginHeight',\n max: 'max',\n maxlength: 'maxLength',\n media: 'media',\n mediagroup: 'mediaGroup',\n method: 'method',\n min: 'min',\n minlength: 'minLength',\n multiple: 'multiple',\n muted: 'muted',\n name: 'name',\n nomodule: 'noModule',\n nonce: 'nonce',\n novalidate: 'noValidate',\n open: 'open',\n optimum: 'optimum',\n pattern: 'pattern',\n placeholder: 'placeholder',\n playsinline: 'playsInline',\n poster: 'poster',\n preload: 'preload',\n profile: 'profile',\n radiogroup: 'radioGroup',\n readonly: 'readOnly',\n referrerpolicy: 'referrerPolicy',\n rel: 'rel',\n required: 'required',\n reversed: 'reversed',\n role: 'role',\n rows: 'rows',\n rowspan: 'rowSpan',\n sandbox: 'sandbox',\n scope: 'scope',\n scoped: 'scoped',\n scrolling: 'scrolling',\n seamless: 'seamless',\n selected: 'selected',\n shape: 'shape',\n size: 'size',\n sizes: 'sizes',\n span: 'span',\n spellcheck: 'spellCheck',\n src: 'src',\n srcdoc: 'srcDoc',\n srclang: 'srcLang',\n srcset: 'srcSet',\n start: 'start',\n step: 'step',\n style: 'style',\n summary: 'summary',\n tabindex: 'tabIndex',\n target: 'target',\n title: 'title',\n type: 'type',\n usemap: 'useMap',\n value: 'value',\n width: 'width',\n wmode: 'wmode',\n wrap: 'wrap',\n // SVG\n about: 'about',\n accentheight: 'accentHeight',\n 'accent-height': 'accentHeight',\n accumulate: 'accumulate',\n additive: 'additive',\n alignmentbaseline: 'alignmentBaseline',\n 'alignment-baseline': 'alignmentBaseline',\n allowreorder: 'allowReorder',\n alphabetic: 'alphabetic',\n amplitude: 'amplitude',\n arabicform: 'arabicForm',\n 'arabic-form': 'arabicForm',\n ascent: 'ascent',\n attributename: 'attributeName',\n attributetype: 'attributeType',\n autoreverse: 'autoReverse',\n azimuth: 'azimuth',\n basefrequency: 'baseFrequency',\n baselineshift: 'baselineShift',\n 'baseline-shift': 'baselineShift',\n baseprofile: 'baseProfile',\n bbox: 'bbox',\n begin: 'begin',\n bias: 'bias',\n by: 'by',\n calcmode: 'calcMode',\n capheight: 'capHeight',\n 'cap-height': 'capHeight',\n clip: 'clip',\n clippath: 'clipPath',\n 'clip-path': 'clipPath',\n clippathunits: 'clipPathUnits',\n cliprule: 'clipRule',\n 'clip-rule': 'clipRule',\n color: 'color',\n colorinterpolation: 'colorInterpolation',\n 'color-interpolation': 'colorInterpolation',\n colorinterpolationfilters: 'colorInterpolationFilters',\n 'color-interpolation-filters': 'colorInterpolationFilters',\n colorprofile: 'colorProfile',\n 'color-profile': 'colorProfile',\n colorrendering: 'colorRendering',\n 'color-rendering': 'colorRendering',\n contentscripttype: 'contentScriptType',\n contentstyletype: 'contentStyleType',\n cursor: 'cursor',\n cx: 'cx',\n cy: 'cy',\n d: 'd',\n datatype: 'datatype',\n decelerate: 'decelerate',\n descent: 'descent',\n diffuseconstant: 'diffuseConstant',\n direction: 'direction',\n display: 'display',\n divisor: 'divisor',\n dominantbaseline: 'dominantBaseline',\n 'dominant-baseline': 'dominantBaseline',\n dur: 'dur',\n dx: 'dx',\n dy: 'dy',\n edgemode: 'edgeMode',\n elevation: 'elevation',\n enablebackground: 'enableBackground',\n 'enable-background': 'enableBackground',\n end: 'end',\n exponent: 'exponent',\n externalresourcesrequired: 'externalResourcesRequired',\n fill: 'fill',\n fillopacity: 'fillOpacity',\n 'fill-opacity': 'fillOpacity',\n fillrule: 'fillRule',\n 'fill-rule': 'fillRule',\n filter: 'filter',\n filterres: 'filterRes',\n filterunits: 'filterUnits',\n floodopacity: 'floodOpacity',\n 'flood-opacity': 'floodOpacity',\n floodcolor: 'floodColor',\n 'flood-color': 'floodColor',\n focusable: 'focusable',\n fontfamily: 'fontFamily',\n 'font-family': 'fontFamily',\n fontsize: 'fontSize',\n 'font-size': 'fontSize',\n fontsizeadjust: 'fontSizeAdjust',\n 'font-size-adjust': 'fontSizeAdjust',\n fontstretch: 'fontStretch',\n 'font-stretch': 'fontStretch',\n fontstyle: 'fontStyle',\n 'font-style': 'fontStyle',\n fontvariant: 'fontVariant',\n 'font-variant': 'fontVariant',\n fontweight: 'fontWeight',\n 'font-weight': 'fontWeight',\n format: 'format',\n from: 'from',\n fx: 'fx',\n fy: 'fy',\n g1: 'g1',\n g2: 'g2',\n glyphname: 'glyphName',\n 'glyph-name': 'glyphName',\n glyphorientationhorizontal: 'glyphOrientationHorizontal',\n 'glyph-orientation-horizontal': 'glyphOrientationHorizontal',\n glyphorientationvertical: 'glyphOrientationVertical',\n 'glyph-orientation-vertical': 'glyphOrientationVertical',\n glyphref: 'glyphRef',\n gradienttransform: 'gradientTransform',\n gradientunits: 'gradientUnits',\n hanging: 'hanging',\n horizadvx: 'horizAdvX',\n 'horiz-adv-x': 'horizAdvX',\n horizoriginx: 'horizOriginX',\n 'horiz-origin-x': 'horizOriginX',\n ideographic: 'ideographic',\n imagerendering: 'imageRendering',\n 'image-rendering': 'imageRendering',\n in2: 'in2',\n in: 'in',\n inlist: 'inlist',\n intercept: 'intercept',\n k1: 'k1',\n k2: 'k2',\n k3: 'k3',\n k4: 'k4',\n k: 'k',\n kernelmatrix: 'kernelMatrix',\n kernelunitlength: 'kernelUnitLength',\n kerning: 'kerning',\n keypoints: 'keyPoints',\n keysplines: 'keySplines',\n keytimes: 'keyTimes',\n lengthadjust: 'lengthAdjust',\n letterspacing: 'letterSpacing',\n 'letter-spacing': 'letterSpacing',\n lightingcolor: 'lightingColor',\n 'lighting-color': 'lightingColor',\n limitingconeangle: 'limitingConeAngle',\n local: 'local',\n markerend: 'markerEnd',\n 'marker-end': 'markerEnd',\n markerheight: 'markerHeight',\n markermid: 'markerMid',\n 'marker-mid': 'markerMid',\n markerstart: 'markerStart',\n 'marker-start': 'markerStart',\n markerunits: 'markerUnits',\n markerwidth: 'markerWidth',\n mask: 'mask',\n maskcontentunits: 'maskContentUnits',\n maskunits: 'maskUnits',\n mathematical: 'mathematical',\n mode: 'mode',\n numoctaves: 'numOctaves',\n offset: 'offset',\n opacity: 'opacity',\n operator: 'operator',\n order: 'order',\n orient: 'orient',\n orientation: 'orientation',\n origin: 'origin',\n overflow: 'overflow',\n overlineposition: 'overlinePosition',\n 'overline-position': 'overlinePosition',\n overlinethickness: 'overlineThickness',\n 'overline-thickness': 'overlineThickness',\n paintorder: 'paintOrder',\n 'paint-order': 'paintOrder',\n panose1: 'panose1',\n 'panose-1': 'panose1',\n pathlength: 'pathLength',\n patterncontentunits: 'patternContentUnits',\n patterntransform: 'patternTransform',\n patternunits: 'patternUnits',\n pointerevents: 'pointerEvents',\n 'pointer-events': 'pointerEvents',\n points: 'points',\n pointsatx: 'pointsAtX',\n pointsaty: 'pointsAtY',\n pointsatz: 'pointsAtZ',\n prefix: 'prefix',\n preservealpha: 'preserveAlpha',\n preserveaspectratio: 'preserveAspectRatio',\n primitiveunits: 'primitiveUnits',\n property: 'property',\n r: 'r',\n radius: 'radius',\n refx: 'refX',\n refy: 'refY',\n renderingintent: 'renderingIntent',\n 'rendering-intent': 'renderingIntent',\n repeatcount: 'repeatCount',\n repeatdur: 'repeatDur',\n requiredextensions: 'requiredExtensions',\n requiredfeatures: 'requiredFeatures',\n resource: 'resource',\n restart: 'restart',\n result: 'result',\n results: 'results',\n rotate: 'rotate',\n rx: 'rx',\n ry: 'ry',\n scale: 'scale',\n security: 'security',\n seed: 'seed',\n shaperendering: 'shapeRendering',\n 'shape-rendering': 'shapeRendering',\n slope: 'slope',\n spacing: 'spacing',\n specularconstant: 'specularConstant',\n specularexponent: 'specularExponent',\n speed: 'speed',\n spreadmethod: 'spreadMethod',\n startoffset: 'startOffset',\n stddeviation: 'stdDeviation',\n stemh: 'stemh',\n stemv: 'stemv',\n stitchtiles: 'stitchTiles',\n stopcolor: 'stopColor',\n 'stop-color': 'stopColor',\n stopopacity: 'stopOpacity',\n 'stop-opacity': 'stopOpacity',\n strikethroughposition: 'strikethroughPosition',\n 'strikethrough-position': 'strikethroughPosition',\n strikethroughthickness: 'strikethroughThickness',\n 'strikethrough-thickness': 'strikethroughThickness',\n string: 'string',\n stroke: 'stroke',\n strokedasharray: 'strokeDasharray',\n 'stroke-dasharray': 'strokeDasharray',\n strokedashoffset: 'strokeDashoffset',\n 'stroke-dashoffset': 'strokeDashoffset',\n strokelinecap: 'strokeLinecap',\n 'stroke-linecap': 'strokeLinecap',\n strokelinejoin: 'strokeLinejoin',\n 'stroke-linejoin': 'strokeLinejoin',\n strokemiterlimit: 'strokeMiterlimit',\n 'stroke-miterlimit': 'strokeMiterlimit',\n strokewidth: 'strokeWidth',\n 'stroke-width': 'strokeWidth',\n strokeopacity: 'strokeOpacity',\n 'stroke-opacity': 'strokeOpacity',\n suppresscontenteditablewarning: 'suppressContentEditableWarning',\n suppresshydrationwarning: 'suppressHydrationWarning',\n surfacescale: 'surfaceScale',\n systemlanguage: 'systemLanguage',\n tablevalues: 'tableValues',\n targetx: 'targetX',\n targety: 'targetY',\n textanchor: 'textAnchor',\n 'text-anchor': 'textAnchor',\n textdecoration: 'textDecoration',\n 'text-decoration': 'textDecoration',\n textlength: 'textLength',\n textrendering: 'textRendering',\n 'text-rendering': 'textRendering',\n to: 'to',\n transform: 'transform',\n typeof: 'typeof',\n u1: 'u1',\n u2: 'u2',\n underlineposition: 'underlinePosition',\n 'underline-position': 'underlinePosition',\n underlinethickness: 'underlineThickness',\n 'underline-thickness': 'underlineThickness',\n unicode: 'unicode',\n unicodebidi: 'unicodeBidi',\n 'unicode-bidi': 'unicodeBidi',\n unicoderange: 'unicodeRange',\n 'unicode-range': 'unicodeRange',\n unitsperem: 'unitsPerEm',\n 'units-per-em': 'unitsPerEm',\n unselectable: 'unselectable',\n valphabetic: 'vAlphabetic',\n 'v-alphabetic': 'vAlphabetic',\n values: 'values',\n vectoreffect: 'vectorEffect',\n 'vector-effect': 'vectorEffect',\n version: 'version',\n vertadvy: 'vertAdvY',\n 'vert-adv-y': 'vertAdvY',\n vertoriginx: 'vertOriginX',\n 'vert-origin-x': 'vertOriginX',\n vertoriginy: 'vertOriginY',\n 'vert-origin-y': 'vertOriginY',\n vhanging: 'vHanging',\n 'v-hanging': 'vHanging',\n videographic: 'vIdeographic',\n 'v-ideographic': 'vIdeographic',\n viewbox: 'viewBox',\n viewtarget: 'viewTarget',\n visibility: 'visibility',\n vmathematical: 'vMathematical',\n 'v-mathematical': 'vMathematical',\n vocab: 'vocab',\n widths: 'widths',\n wordspacing: 'wordSpacing',\n 'word-spacing': 'wordSpacing',\n writingmode: 'writingMode',\n 'writing-mode': 'writingMode',\n x1: 'x1',\n x2: 'x2',\n x: 'x',\n xchannelselector: 'xChannelSelector',\n xheight: 'xHeight',\n 'x-height': 'xHeight',\n xlinkactuate: 'xlinkActuate',\n 'xlink:actuate': 'xlinkActuate',\n xlinkarcrole: 'xlinkArcrole',\n 'xlink:arcrole': 'xlinkArcrole',\n xlinkhref: 'xlinkHref',\n 'xlink:href': 'xlinkHref',\n xlinkrole: 'xlinkRole',\n 'xlink:role': 'xlinkRole',\n xlinkshow: 'xlinkShow',\n 'xlink:show': 'xlinkShow',\n xlinktitle: 'xlinkTitle',\n 'xlink:title': 'xlinkTitle',\n xlinktype: 'xlinkType',\n 'xlink:type': 'xlinkType',\n xmlbase: 'xmlBase',\n 'xml:base': 'xmlBase',\n xmllang: 'xmlLang',\n 'xml:lang': 'xmlLang',\n xmlns: 'xmlns',\n 'xml:space': 'xmlSpace',\n xmlnsxlink: 'xmlnsXlink',\n 'xmlns:xlink': 'xmlnsXlink',\n xmlspace: 'xmlSpace',\n y1: 'y1',\n y2: 'y2',\n y: 'y',\n ychannelselector: 'yChannelSelector',\n z: 'z',\n zoomandpan: 'zoomAndPan'\n};\n\nvar ariaProperties = {\n 'aria-current': 0,\n // state\n 'aria-description': 0,\n 'aria-details': 0,\n 'aria-disabled': 0,\n // state\n 'aria-hidden': 0,\n // state\n 'aria-invalid': 0,\n // state\n 'aria-keyshortcuts': 0,\n 'aria-label': 0,\n 'aria-roledescription': 0,\n // Widget Attributes\n 'aria-autocomplete': 0,\n 'aria-checked': 0,\n 'aria-expanded': 0,\n 'aria-haspopup': 0,\n 'aria-level': 0,\n 'aria-modal': 0,\n 'aria-multiline': 0,\n 'aria-multiselectable': 0,\n 'aria-orientation': 0,\n 'aria-placeholder': 0,\n 'aria-pressed': 0,\n 'aria-readonly': 0,\n 'aria-required': 0,\n 'aria-selected': 0,\n 'aria-sort': 0,\n 'aria-valuemax': 0,\n 'aria-valuemin': 0,\n 'aria-valuenow': 0,\n 'aria-valuetext': 0,\n // Live Region Attributes\n 'aria-atomic': 0,\n 'aria-busy': 0,\n 'aria-live': 0,\n 'aria-relevant': 0,\n // Drag-and-Drop Attributes\n 'aria-dropeffect': 0,\n 'aria-grabbed': 0,\n // Relationship Attributes\n 'aria-activedescendant': 0,\n 'aria-colcount': 0,\n 'aria-colindex': 0,\n 'aria-colspan': 0,\n 'aria-controls': 0,\n 'aria-describedby': 0,\n 'aria-errormessage': 0,\n 'aria-flowto': 0,\n 'aria-labelledby': 0,\n 'aria-owns': 0,\n 'aria-posinset': 0,\n 'aria-rowcount': 0,\n 'aria-rowindex': 0,\n 'aria-rowspan': 0,\n 'aria-setsize': 0\n};\n\nvar warnedProperties = {};\nvar rARIA = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$');\nvar rARIACamel = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$');\n\nfunction validateProperty(tagName, name) {\n {\n if (hasOwnProperty.call(warnedProperties, name) && warnedProperties[name]) {\n return true;\n }\n\n if (rARIACamel.test(name)) {\n var ariaName = 'aria-' + name.slice(4).toLowerCase();\n var correctName = ariaProperties.hasOwnProperty(ariaName) ? ariaName : null; // If this is an aria-* attribute, but is not listed in the known DOM\n // DOM properties, then it is an invalid aria-* attribute.\n\n if (correctName == null) {\n error('Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.', name);\n\n warnedProperties[name] = true;\n return true;\n } // aria-* attributes should be lowercase; suggest the lowercase version.\n\n\n if (name !== correctName) {\n error('Invalid ARIA attribute `%s`. Did you mean `%s`?', name, correctName);\n\n warnedProperties[name] = true;\n return true;\n }\n }\n\n if (rARIA.test(name)) {\n var lowerCasedName = name.toLowerCase();\n var standardName = ariaProperties.hasOwnProperty(lowerCasedName) ? lowerCasedName : null; // If this is an aria-* attribute, but is not listed in the known DOM\n // DOM properties, then it is an invalid aria-* attribute.\n\n if (standardName == null) {\n warnedProperties[name] = true;\n return false;\n } // aria-* attributes should be lowercase; suggest the lowercase version.\n\n\n if (name !== standardName) {\n error('Unknown ARIA attribute `%s`. Did you mean `%s`?', name, standardName);\n\n warnedProperties[name] = true;\n return true;\n }\n }\n }\n\n return true;\n}\n\nfunction warnInvalidARIAProps(type, props) {\n {\n var invalidProps = [];\n\n for (var key in props) {\n var isValid = validateProperty(type, key);\n\n if (!isValid) {\n invalidProps.push(key);\n }\n }\n\n var unknownPropString = invalidProps.map(function (prop) {\n return '`' + prop + '`';\n }).join(', ');\n\n if (invalidProps.length === 1) {\n error('Invalid aria prop %s on <%s> tag. ' + 'For details, see https://reactjs.org/link/invalid-aria-props', unknownPropString, type);\n } else if (invalidProps.length > 1) {\n error('Invalid aria props %s on <%s> tag. ' + 'For details, see https://reactjs.org/link/invalid-aria-props', unknownPropString, type);\n }\n }\n}\n\nfunction validateProperties(type, props) {\n if (isCustomComponent(type, props)) {\n return;\n }\n\n warnInvalidARIAProps(type, props);\n}\n\nvar didWarnValueNull = false;\nfunction validateProperties$1(type, props) {\n {\n if (type !== 'input' && type !== 'textarea' && type !== 'select') {\n return;\n }\n\n if (props != null && props.value === null && !didWarnValueNull) {\n didWarnValueNull = true;\n\n if (type === 'select' && props.multiple) {\n error('`value` prop on `%s` should not be null. ' + 'Consider using an empty array when `multiple` is set to `true` ' + 'to clear the component or `undefined` for uncontrolled components.', type);\n } else {\n error('`value` prop on `%s` should not be null. ' + 'Consider using an empty string to clear the component or `undefined` ' + 'for uncontrolled components.', type);\n }\n }\n }\n}\n\nvar validateProperty$1 = function () {};\n\n{\n var warnedProperties$1 = {};\n var EVENT_NAME_REGEX = /^on./;\n var INVALID_EVENT_NAME_REGEX = /^on[^A-Z]/;\n var rARIA$1 = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$');\n var rARIACamel$1 = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$');\n\n validateProperty$1 = function (tagName, name, value, eventRegistry) {\n if (hasOwnProperty.call(warnedProperties$1, name) && warnedProperties$1[name]) {\n return true;\n }\n\n var lowerCasedName = name.toLowerCase();\n\n if (lowerCasedName === 'onfocusin' || lowerCasedName === 'onfocusout') {\n error('React uses onFocus and onBlur instead of onFocusIn and onFocusOut. ' + 'All React events are normalized to bubble, so onFocusIn and onFocusOut ' + 'are not needed/supported by React.');\n\n warnedProperties$1[name] = true;\n return true;\n } // We can't rely on the event system being injected on the server.\n\n\n if (eventRegistry != null) {\n var registrationNameDependencies = eventRegistry.registrationNameDependencies,\n possibleRegistrationNames = eventRegistry.possibleRegistrationNames;\n\n if (registrationNameDependencies.hasOwnProperty(name)) {\n return true;\n }\n\n var registrationName = possibleRegistrationNames.hasOwnProperty(lowerCasedName) ? possibleRegistrationNames[lowerCasedName] : null;\n\n if (registrationName != null) {\n error('Invalid event handler property `%s`. Did you mean `%s`?', name, registrationName);\n\n warnedProperties$1[name] = true;\n return true;\n }\n\n if (EVENT_NAME_REGEX.test(name)) {\n error('Unknown event handler property `%s`. It will be ignored.', name);\n\n warnedProperties$1[name] = true;\n return true;\n }\n } else if (EVENT_NAME_REGEX.test(name)) {\n // If no event plugins have been injected, we are in a server environment.\n // So we can't tell if the event name is correct for sure, but we can filter\n // out known bad ones like `onclick`. We can't suggest a specific replacement though.\n if (INVALID_EVENT_NAME_REGEX.test(name)) {\n error('Invalid event handler property `%s`. ' + 'React events use the camelCase naming convention, for example `onClick`.', name);\n }\n\n warnedProperties$1[name] = true;\n return true;\n } // Let the ARIA attribute hook validate ARIA attributes\n\n\n if (rARIA$1.test(name) || rARIACamel$1.test(name)) {\n return true;\n }\n\n if (lowerCasedName === 'innerhtml') {\n error('Directly setting property `innerHTML` is not permitted. ' + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.');\n\n warnedProperties$1[name] = true;\n return true;\n }\n\n if (lowerCasedName === 'aria') {\n error('The `aria` attribute is reserved for future use in React. ' + 'Pass individual `aria-` attributes instead.');\n\n warnedProperties$1[name] = true;\n return true;\n }\n\n if (lowerCasedName === 'is' && value !== null && value !== undefined && typeof value !== 'string') {\n error('Received a `%s` for a string attribute `is`. If this is expected, cast ' + 'the value to a string.', typeof value);\n\n warnedProperties$1[name] = true;\n return true;\n }\n\n if (typeof value === 'number' && isNaN(value)) {\n error('Received NaN for the `%s` attribute. If this is expected, cast ' + 'the value to a string.', name);\n\n warnedProperties$1[name] = true;\n return true;\n }\n\n var propertyInfo = getPropertyInfo(name);\n var isReserved = propertyInfo !== null && propertyInfo.type === RESERVED; // Known attributes should match the casing specified in the property config.\n\n if (possibleStandardNames.hasOwnProperty(lowerCasedName)) {\n var standardName = possibleStandardNames[lowerCasedName];\n\n if (standardName !== name) {\n error('Invalid DOM property `%s`. Did you mean `%s`?', name, standardName);\n\n warnedProperties$1[name] = true;\n return true;\n }\n } else if (!isReserved && name !== lowerCasedName) {\n // Unknown attributes should have lowercase casing since that's how they\n // will be cased anyway with server rendering.\n error('React does not recognize the `%s` prop on a DOM element. If you ' + 'intentionally want it to appear in the DOM as a custom ' + 'attribute, spell it as lowercase `%s` instead. ' + 'If you accidentally passed it from a parent component, remove ' + 'it from the DOM element.', name, lowerCasedName);\n\n warnedProperties$1[name] = true;\n return true;\n }\n\n if (typeof value === 'boolean' && shouldRemoveAttributeWithWarning(name, value, propertyInfo, false)) {\n if (value) {\n error('Received `%s` for a non-boolean attribute `%s`.\\n\\n' + 'If you want to write it to the DOM, pass a string instead: ' + '%s=\"%s\" or %s={value.toString()}.', value, name, name, value, name);\n } else {\n error('Received `%s` for a non-boolean attribute `%s`.\\n\\n' + 'If you want to write it to the DOM, pass a string instead: ' + '%s=\"%s\" or %s={value.toString()}.\\n\\n' + 'If you used to conditionally omit it with %s={condition && value}, ' + 'pass %s={condition ? value : undefined} instead.', value, name, name, value, name, name, name);\n }\n\n warnedProperties$1[name] = true;\n return true;\n } // Now that we've validated casing, do not validate\n // data types for reserved props\n\n\n if (isReserved) {\n return true;\n } // Warn when a known attribute is a bad type\n\n\n if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, false)) {\n warnedProperties$1[name] = true;\n return false;\n } // Warn when passing the strings 'false' or 'true' into a boolean prop\n\n\n if ((value === 'false' || value === 'true') && propertyInfo !== null && propertyInfo.type === BOOLEAN) {\n error('Received the string `%s` for the boolean attribute `%s`. ' + '%s ' + 'Did you mean %s={%s}?', value, name, value === 'false' ? 'The browser will interpret it as a truthy value.' : 'Although this works, it will not work as expected if you pass the string \"false\".', name, value);\n\n warnedProperties$1[name] = true;\n return true;\n }\n\n return true;\n };\n}\n\nvar warnUnknownProperties = function (type, props, eventRegistry) {\n {\n var unknownProps = [];\n\n for (var key in props) {\n var isValid = validateProperty$1(type, key, props[key], eventRegistry);\n\n if (!isValid) {\n unknownProps.push(key);\n }\n }\n\n var unknownPropString = unknownProps.map(function (prop) {\n return '`' + prop + '`';\n }).join(', ');\n\n if (unknownProps.length === 1) {\n error('Invalid value for prop %s on <%s> tag. Either remove it from the element, ' + 'or pass a string or number value to keep it in the DOM. ' + 'For details, see https://reactjs.org/link/attribute-behavior ', unknownPropString, type);\n } else if (unknownProps.length > 1) {\n error('Invalid values for props %s on <%s> tag. Either remove them from the element, ' + 'or pass a string or number value to keep them in the DOM. ' + 'For details, see https://reactjs.org/link/attribute-behavior ', unknownPropString, type);\n }\n }\n};\n\nfunction validateProperties$2(type, props, eventRegistry) {\n if (isCustomComponent(type, props)) {\n return;\n }\n\n warnUnknownProperties(type, props, eventRegistry);\n}\n\nvar IS_EVENT_HANDLE_NON_MANAGED_NODE = 1;\nvar IS_NON_DELEGATED = 1 << 1;\nvar IS_CAPTURE_PHASE = 1 << 2;\n// set to LEGACY_FB_SUPPORT. LEGACY_FB_SUPPORT only gets set when\n// we call willDeferLaterForLegacyFBSupport, thus not bailing out\n// will result in endless cycles like an infinite loop.\n// We also don't want to defer during event replaying.\n\nvar SHOULD_NOT_PROCESS_POLYFILL_EVENT_PLUGINS = IS_EVENT_HANDLE_NON_MANAGED_NODE | IS_NON_DELEGATED | IS_CAPTURE_PHASE;\n\n// This exists to avoid circular dependency between ReactDOMEventReplaying\n// and DOMPluginEventSystem.\nvar currentReplayingEvent = null;\nfunction setReplayingEvent(event) {\n {\n if (currentReplayingEvent !== null) {\n error('Expected currently replaying event to be null. This error ' + 'is likely caused by a bug in React. Please file an issue.');\n }\n }\n\n currentReplayingEvent = event;\n}\nfunction resetReplayingEvent() {\n {\n if (currentReplayingEvent === null) {\n error('Expected currently replaying event to not be null. This error ' + 'is likely caused by a bug in React. Please file an issue.');\n }\n }\n\n currentReplayingEvent = null;\n}\nfunction isReplayingEvent(event) {\n return event === currentReplayingEvent;\n}\n\n/**\n * Gets the target node from a native browser event by accounting for\n * inconsistencies in browser DOM APIs.\n *\n * @param {object} nativeEvent Native browser event.\n * @return {DOMEventTarget} Target node.\n */\n\nfunction getEventTarget(nativeEvent) {\n // Fallback to nativeEvent.srcElement for IE9\n // https://github.com/facebook/react/issues/12506\n var target = nativeEvent.target || nativeEvent.srcElement || window; // Normalize SVG <use> element events #4963\n\n if (target.correspondingUseElement) {\n target = target.correspondingUseElement;\n } // Safari may fire events on text nodes (Node.TEXT_NODE is 3).\n // @see http://www.quirksmode.org/js/events_properties.html\n\n\n return target.nodeType === TEXT_NODE ? target.parentNode : target;\n}\n\nvar restoreImpl = null;\nvar restoreTarget = null;\nvar restoreQueue = null;\n\nfunction restoreStateOfTarget(target) {\n // We perform this translation at the end of the event loop so that we\n // always receive the correct fiber here\n var internalInstance = getInstanceFromNode(target);\n\n if (!internalInstance) {\n // Unmounted\n return;\n }\n\n if (typeof restoreImpl !== 'function') {\n throw new Error('setRestoreImplementation() needs to be called to handle a target for controlled ' + 'events. This error is likely caused by a bug in React. Please file an issue.');\n }\n\n var stateNode = internalInstance.stateNode; // Guard against Fiber being unmounted.\n\n if (stateNode) {\n var _props = getFiberCurrentPropsFromNode(stateNode);\n\n restoreImpl(internalInstance.stateNode, internalInstance.type, _props);\n }\n}\n\nfunction setRestoreImplementation(impl) {\n restoreImpl = impl;\n}\nfunction enqueueStateRestore(target) {\n if (restoreTarget) {\n if (restoreQueue) {\n restoreQueue.push(target);\n } else {\n restoreQueue = [target];\n }\n } else {\n restoreTarget = target;\n }\n}\nfunction needsStateRestore() {\n return restoreTarget !== null || restoreQueue !== null;\n}\nfunction restoreStateIfNeeded() {\n if (!restoreTarget) {\n return;\n }\n\n var target = restoreTarget;\n var queuedTargets = restoreQueue;\n restoreTarget = null;\n restoreQueue = null;\n restoreStateOfTarget(target);\n\n if (queuedTargets) {\n for (var i = 0; i < queuedTargets.length; i++) {\n restoreStateOfTarget(queuedTargets[i]);\n }\n }\n}\n\n// the renderer. Such as when we're dispatching events or if third party\n// libraries need to call batchedUpdates. Eventually, this API will go away when\n// everything is batched by default. We'll then have a similar API to opt-out of\n// scheduled work and instead do synchronous work.\n// Defaults\n\nvar batchedUpdatesImpl = function (fn, bookkeeping) {\n return fn(bookkeeping);\n};\n\nvar flushSyncImpl = function () {};\n\nvar isInsideEventHandler = false;\n\nfunction finishEventHandler() {\n // Here we wait until all updates have propagated, which is important\n // when using controlled components within layers:\n // https://github.com/facebook/react/issues/1698\n // Then we restore state of any controlled component.\n var controlledComponentsHavePendingUpdates = needsStateRestore();\n\n if (controlledComponentsHavePendingUpdates) {\n // If a controlled event was fired, we may need to restore the state of\n // the DOM node back to the controlled value. This is necessary when React\n // bails out of the update without touching the DOM.\n // TODO: Restore state in the microtask, after the discrete updates flush,\n // instead of early flushing them here.\n flushSyncImpl();\n restoreStateIfNeeded();\n }\n}\n\nfunction batchedUpdates(fn, a, b) {\n if (isInsideEventHandler) {\n // If we are currently inside another batch, we need to wait until it\n // fully completes before restoring state.\n return fn(a, b);\n }\n\n isInsideEventHandler = true;\n\n try {\n return batchedUpdatesImpl(fn, a, b);\n } finally {\n isInsideEventHandler = false;\n finishEventHandler();\n }\n} // TODO: Replace with flushSync\nfunction setBatchingImplementation(_batchedUpdatesImpl, _discreteUpdatesImpl, _flushSyncImpl) {\n batchedUpdatesImpl = _batchedUpdatesImpl;\n flushSyncImpl = _flushSyncImpl;\n}\n\nfunction isInteractive(tag) {\n return tag === 'button' || tag === 'input' || tag === 'select' || tag === 'textarea';\n}\n\nfunction shouldPreventMouseEvent(name, type, props) {\n switch (name) {\n case 'onClick':\n case 'onClickCapture':\n case 'onDoubleClick':\n case 'onDoubleClickCapture':\n case 'onMouseDown':\n case 'onMouseDownCapture':\n case 'onMouseMove':\n case 'onMouseMoveCapture':\n case 'onMouseUp':\n case 'onMouseUpCapture':\n case 'onMouseEnter':\n return !!(props.disabled && isInteractive(type));\n\n default:\n return false;\n }\n}\n/**\n * @param {object} inst The instance, which is the source of events.\n * @param {string} registrationName Name of listener (e.g. `onClick`).\n * @return {?function} The stored callback.\n */\n\n\nfunction getListener(inst, registrationName) {\n var stateNode = inst.stateNode;\n\n if (stateNode === null) {\n // Work in progress (ex: onload events in incremental mode).\n return null;\n }\n\n var props = getFiberCurrentPropsFromNode(stateNode);\n\n if (props === null) {\n // Work in progress.\n return null;\n }\n\n var listener = props[registrationName];\n\n if (shouldPreventMouseEvent(registrationName, inst.type, props)) {\n return null;\n }\n\n if (listener && typeof listener !== 'function') {\n throw new Error(\"Expected `\" + registrationName + \"` listener to be a function, instead got a value of `\" + typeof listener + \"` type.\");\n }\n\n return listener;\n}\n\nvar passiveBrowserEventsSupported = false; // Check if browser support events with passive listeners\n// https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#Safely_detecting_option_support\n\nif (canUseDOM) {\n try {\n var options = {}; // $FlowFixMe: Ignore Flow complaining about needing a value\n\n Object.defineProperty(options, 'passive', {\n get: function () {\n passiveBrowserEventsSupported = true;\n }\n });\n window.addEventListener('test', options, options);\n window.removeEventListener('test', options, options);\n } catch (e) {\n passiveBrowserEventsSupported = false;\n }\n}\n\nfunction invokeGuardedCallbackProd(name, func, context, a, b, c, d, e, f) {\n var funcArgs = Array.prototype.slice.call(arguments, 3);\n\n try {\n func.apply(context, funcArgs);\n } catch (error) {\n this.onError(error);\n }\n}\n\nvar invokeGuardedCallbackImpl = invokeGuardedCallbackProd;\n\n{\n // In DEV mode, we swap out invokeGuardedCallback for a special version\n // that plays more nicely with the browser's DevTools. The idea is to preserve\n // \"Pause on exceptions\" behavior. Because React wraps all user-provided\n // functions in invokeGuardedCallback, and the production version of\n // invokeGuardedCallback uses a try-catch, all user exceptions are treated\n // like caught exceptions, and the DevTools won't pause unless the developer\n // takes the extra step of enabling pause on caught exceptions. This is\n // unintuitive, though, because even though React has caught the error, from\n // the developer's perspective, the error is uncaught.\n //\n // To preserve the expected \"Pause on exceptions\" behavior, we don't use a\n // try-catch in DEV. Instead, we synchronously dispatch a fake event to a fake\n // DOM node, and call the user-provided callback from inside an event handler\n // for that fake event. If the callback throws, the error is \"captured\" using\n // a global event handler. But because the error happens in a different\n // event loop context, it does not interrupt the normal program flow.\n // Effectively, this gives us try-catch behavior without actually using\n // try-catch. Neat!\n // Check that the browser supports the APIs we need to implement our special\n // DEV version of invokeGuardedCallback\n if (typeof window !== 'undefined' && typeof window.dispatchEvent === 'function' && typeof document !== 'undefined' && typeof document.createEvent === 'function') {\n var fakeNode = document.createElement('react');\n\n invokeGuardedCallbackImpl = function invokeGuardedCallbackDev(name, func, context, a, b, c, d, e, f) {\n // If document doesn't exist we know for sure we will crash in this method\n // when we call document.createEvent(). However this can cause confusing\n // errors: https://github.com/facebook/create-react-app/issues/3482\n // So we preemptively throw with a better message instead.\n if (typeof document === 'undefined' || document === null) {\n throw new Error('The `document` global was defined when React was initialized, but is not ' + 'defined anymore. This can happen in a test environment if a component ' + 'schedules an update from an asynchronous callback, but the test has already ' + 'finished running. To solve this, you can either unmount the component at ' + 'the end of your test (and ensure that any asynchronous operations get ' + 'canceled in `componentWillUnmount`), or you can change the test itself ' + 'to be asynchronous.');\n }\n\n var evt = document.createEvent('Event');\n var didCall = false; // Keeps track of whether the user-provided callback threw an error. We\n // set this to true at the beginning, then set it to false right after\n // calling the function. If the function errors, `didError` will never be\n // set to false. This strategy works even if the browser is flaky and\n // fails to call our global error handler, because it doesn't rely on\n // the error event at all.\n\n var didError = true; // Keeps track of the value of window.event so that we can reset it\n // during the callback to let user code access window.event in the\n // browsers that support it.\n\n var windowEvent = window.event; // Keeps track of the descriptor of window.event to restore it after event\n // dispatching: https://github.com/facebook/react/issues/13688\n\n var windowEventDescriptor = Object.getOwnPropertyDescriptor(window, 'event');\n\n function restoreAfterDispatch() {\n // We immediately remove the callback from event listeners so that\n // nested `invokeGuardedCallback` calls do not clash. Otherwise, a\n // nested call would trigger the fake event handlers of any call higher\n // in the stack.\n fakeNode.removeEventListener(evtType, callCallback, false); // We check for window.hasOwnProperty('event') to prevent the\n // window.event assignment in both IE <= 10 as they throw an error\n // \"Member not found\" in strict mode, and in Firefox which does not\n // support window.event.\n\n if (typeof window.event !== 'undefined' && window.hasOwnProperty('event')) {\n window.event = windowEvent;\n }\n } // Create an event handler for our fake event. We will synchronously\n // dispatch our fake event using `dispatchEvent`. Inside the handler, we\n // call the user-provided callback.\n\n\n var funcArgs = Array.prototype.slice.call(arguments, 3);\n\n function callCallback() {\n didCall = true;\n restoreAfterDispatch();\n func.apply(context, funcArgs);\n didError = false;\n } // Create a global error event handler. We use this to capture the value\n // that was thrown. It's possible that this error handler will fire more\n // than once; for example, if non-React code also calls `dispatchEvent`\n // and a handler for that event throws. We should be resilient to most of\n // those cases. Even if our error event handler fires more than once, the\n // last error event is always used. If the callback actually does error,\n // we know that the last error event is the correct one, because it's not\n // possible for anything else to have happened in between our callback\n // erroring and the code that follows the `dispatchEvent` call below. If\n // the callback doesn't error, but the error event was fired, we know to\n // ignore it because `didError` will be false, as described above.\n\n\n var error; // Use this to track whether the error event is ever called.\n\n var didSetError = false;\n var isCrossOriginError = false;\n\n function handleWindowError(event) {\n error = event.error;\n didSetError = true;\n\n if (error === null && event.colno === 0 && event.lineno === 0) {\n isCrossOriginError = true;\n }\n\n if (event.defaultPrevented) {\n // Some other error handler has prevented default.\n // Browsers silence the error report if this happens.\n // We'll remember this to later decide whether to log it or not.\n if (error != null && typeof error === 'object') {\n try {\n error._suppressLogging = true;\n } catch (inner) {// Ignore.\n }\n }\n }\n } // Create a fake event type.\n\n\n var evtType = \"react-\" + (name ? name : 'invokeguardedcallback'); // Attach our event handlers\n\n window.addEventListener('error', handleWindowError);\n fakeNode.addEventListener(evtType, callCallback, false); // Synchronously dispatch our fake event. If the user-provided function\n // errors, it will trigger our global error handler.\n\n evt.initEvent(evtType, false, false);\n fakeNode.dispatchEvent(evt);\n\n if (windowEventDescriptor) {\n Object.defineProperty(window, 'event', windowEventDescriptor);\n }\n\n if (didCall && didError) {\n if (!didSetError) {\n // The callback errored, but the error event never fired.\n // eslint-disable-next-line react-internal/prod-error-codes\n error = new Error('An error was thrown inside one of your components, but React ' + \"doesn't know what it was. This is likely due to browser \" + 'flakiness. React does its best to preserve the \"Pause on ' + 'exceptions\" behavior of the DevTools, which requires some ' + \"DEV-mode only tricks. It's possible that these don't work in \" + 'your browser. Try triggering the error in production mode, ' + 'or switching to a modern browser. If you suspect that this is ' + 'actually an issue with React, please file an issue.');\n } else if (isCrossOriginError) {\n // eslint-disable-next-line react-internal/prod-error-codes\n error = new Error(\"A cross-origin error was thrown. React doesn't have access to \" + 'the actual error object in development. ' + 'See https://reactjs.org/link/crossorigin-error for more information.');\n }\n\n this.onError(error);\n } // Remove our event listeners\n\n\n window.removeEventListener('error', handleWindowError);\n\n if (!didCall) {\n // Something went really wrong, and our event was not dispatched.\n // https://github.com/facebook/react/issues/16734\n // https://github.com/facebook/react/issues/16585\n // Fall back to the production implementation.\n restoreAfterDispatch();\n return invokeGuardedCallbackProd.apply(this, arguments);\n }\n };\n }\n}\n\nvar invokeGuardedCallbackImpl$1 = invokeGuardedCallbackImpl;\n\nvar hasError = false;\nvar caughtError = null; // Used by event system to capture/rethrow the first error.\n\nvar hasRethrowError = false;\nvar rethrowError = null;\nvar reporter = {\n onError: function (error) {\n hasError = true;\n caughtError = error;\n }\n};\n/**\n * Call a function while guarding against errors that happens within it.\n * Returns an error if it throws, otherwise null.\n *\n * In production, this is implemented using a try-catch. The reason we don't\n * use a try-catch directly is so that we can swap out a different\n * implementation in DEV mode.\n *\n * @param {String} name of the guard to use for logging or debugging\n * @param {Function} func The function to invoke\n * @param {*} context The context to use when calling the function\n * @param {...*} args Arguments for function\n */\n\nfunction invokeGuardedCallback(name, func, context, a, b, c, d, e, f) {\n hasError = false;\n caughtError = null;\n invokeGuardedCallbackImpl$1.apply(reporter, arguments);\n}\n/**\n * Same as invokeGuardedCallback, but instead of returning an error, it stores\n * it in a global so it can be rethrown by `rethrowCaughtError` later.\n * TODO: See if caughtError and rethrowError can be unified.\n *\n * @param {String} name of the guard to use for logging or debugging\n * @param {Function} func The function to invoke\n * @param {*} context The context to use when calling the function\n * @param {...*} args Arguments for function\n */\n\nfunction invokeGuardedCallbackAndCatchFirstError(name, func, context, a, b, c, d, e, f) {\n invokeGuardedCallback.apply(this, arguments);\n\n if (hasError) {\n var error = clearCaughtError();\n\n if (!hasRethrowError) {\n hasRethrowError = true;\n rethrowError = error;\n }\n }\n}\n/**\n * During execution of guarded functions we will capture the first error which\n * we will rethrow to be handled by the top level error handler.\n */\n\nfunction rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n}\nfunction hasCaughtError() {\n return hasError;\n}\nfunction clearCaughtError() {\n if (hasError) {\n var error = caughtError;\n hasError = false;\n caughtError = null;\n return error;\n } else {\n throw new Error('clearCaughtError was called but no error was captured. This error ' + 'is likely caused by a bug in React. Please file an issue.');\n }\n}\n\n/**\n * `ReactInstanceMap` maintains a mapping from a public facing stateful\n * instance (key) and the internal representation (value). This allows public\n * methods to accept the user facing instance as an argument and map them back\n * to internal methods.\n *\n * Note that this module is currently shared and assumed to be stateless.\n * If this becomes an actual Map, that will break.\n */\nfunction get(key) {\n return key._reactInternals;\n}\nfunction has(key) {\n return key._reactInternals !== undefined;\n}\nfunction set(key, value) {\n key._reactInternals = value;\n}\n\n// Don't change these two values. They're used by React Dev Tools.\nvar NoFlags =\n/* */\n0;\nvar PerformedWork =\n/* */\n1; // You can change the rest (and add more).\n\nvar Placement =\n/* */\n2;\nvar Update =\n/* */\n4;\nvar ChildDeletion =\n/* */\n16;\nvar ContentReset =\n/* */\n32;\nvar Callback =\n/* */\n64;\nvar DidCapture =\n/* */\n128;\nvar ForceClientRender =\n/* */\n256;\nvar Ref =\n/* */\n512;\nvar Snapshot =\n/* */\n1024;\nvar Passive =\n/* */\n2048;\nvar Hydrating =\n/* */\n4096;\nvar Visibility =\n/* */\n8192;\nvar StoreConsistency =\n/* */\n16384;\nvar LifecycleEffectMask = Passive | Update | Callback | Ref | Snapshot | StoreConsistency; // Union of all commit flags (flags with the lifetime of a particular commit)\n\nvar HostEffectMask =\n/* */\n32767; // These are not really side effects, but we still reuse this field.\n\nvar Incomplete =\n/* */\n32768;\nvar ShouldCapture =\n/* */\n65536;\nvar ForceUpdateForLegacySuspense =\n/* */\n131072;\nvar Forked =\n/* */\n1048576; // Static tags describe aspects of a fiber that are not specific to a render,\n// e.g. a fiber uses a passive effect (even if there are no updates on this particular render).\n// This enables us to defer more work in the unmount case,\n// since we can defer traversing the tree during layout to look for Passive effects,\n// and instead rely on the static flag as a signal that there may be cleanup work.\n\nvar RefStatic =\n/* */\n2097152;\nvar LayoutStatic =\n/* */\n4194304;\nvar PassiveStatic =\n/* */\n8388608; // These flags allow us to traverse to fibers that have effects on mount\n// without traversing the entire tree after every commit for\n// double invoking\n\nvar MountLayoutDev =\n/* */\n16777216;\nvar MountPassiveDev =\n/* */\n33554432; // Groups of flags that are used in the commit phase to skip over trees that\n// don't contain effects, by checking subtreeFlags.\n\nvar BeforeMutationMask = // TODO: Remove Update flag from before mutation phase by re-landing Visibility\n// flag logic (see #20043)\nUpdate | Snapshot | ( 0);\nvar MutationMask = Placement | Update | ChildDeletion | ContentReset | Ref | Hydrating | Visibility;\nvar LayoutMask = Update | Callback | Ref | Visibility; // TODO: Split into PassiveMountMask and PassiveUnmountMask\n\nvar PassiveMask = Passive | ChildDeletion; // Union of tags that don't get reset on clones.\n// This allows certain concepts to persist without recalculating them,\n// e.g. whether a subtree contains passive effects or portals.\n\nvar StaticMask = LayoutStatic | PassiveStatic | RefStatic;\n\nvar ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;\nfunction getNearestMountedFiber(fiber) {\n var node = fiber;\n var nearestMounted = fiber;\n\n if (!fiber.alternate) {\n // If there is no alternate, this might be a new tree that isn't inserted\n // yet. If it is, then it will have a pending insertion effect on it.\n var nextNode = node;\n\n do {\n node = nextNode;\n\n if ((node.flags & (Placement | Hydrating)) !== NoFlags) {\n // This is an insertion or in-progress hydration. The nearest possible\n // mounted fiber is the parent but we need to continue to figure out\n // if that one is still mounted.\n nearestMounted = node.return;\n }\n\n nextNode = node.return;\n } while (nextNode);\n } else {\n while (node.return) {\n node = node.return;\n }\n }\n\n if (node.tag === HostRoot) {\n // TODO: Check if this was a nested HostRoot when used with\n // renderContainerIntoSubtree.\n return nearestMounted;\n } // If we didn't hit the root, that means that we're in an disconnected tree\n // that has been unmounted.\n\n\n return null;\n}\nfunction getSuspenseInstanceFromFiber(fiber) {\n if (fiber.tag === SuspenseComponent) {\n var suspenseState = fiber.memoizedState;\n\n if (suspenseState === null) {\n var current = fiber.alternate;\n\n if (current !== null) {\n suspenseState = current.memoizedState;\n }\n }\n\n if (suspenseState !== null) {\n return suspenseState.dehydrated;\n }\n }\n\n return null;\n}\nfunction getContainerFromFiber(fiber) {\n return fiber.tag === HostRoot ? fiber.stateNode.containerInfo : null;\n}\nfunction isFiberMounted(fiber) {\n return getNearestMountedFiber(fiber) === fiber;\n}\nfunction isMounted(component) {\n {\n var owner = ReactCurrentOwner.current;\n\n if (owner !== null && owner.tag === ClassComponent) {\n var ownerFiber = owner;\n var instance = ownerFiber.stateNode;\n\n if (!instance._warnedAboutRefsInRender) {\n error('%s is accessing isMounted inside its render() function. ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', getComponentNameFromFiber(ownerFiber) || 'A component');\n }\n\n instance._warnedAboutRefsInRender = true;\n }\n }\n\n var fiber = get(component);\n\n if (!fiber) {\n return false;\n }\n\n return getNearestMountedFiber(fiber) === fiber;\n}\n\nfunction assertIsMounted(fiber) {\n if (getNearestMountedFiber(fiber) !== fiber) {\n throw new Error('Unable to find node on an unmounted component.');\n }\n}\n\nfunction findCurrentFiberUsingSlowPath(fiber) {\n var alternate = fiber.alternate;\n\n if (!alternate) {\n // If there is no alternate, then we only need to check if it is mounted.\n var nearestMounted = getNearestMountedFiber(fiber);\n\n if (nearestMounted === null) {\n throw new Error('Unable to find node on an unmounted component.');\n }\n\n if (nearestMounted !== fiber) {\n return null;\n }\n\n return fiber;\n } // If we have two possible branches, we'll walk backwards up to the root\n // to see what path the root points to. On the way we may hit one of the\n // special cases and we'll deal with them.\n\n\n var a = fiber;\n var b = alternate;\n\n while (true) {\n var parentA = a.return;\n\n if (parentA === null) {\n // We're at the root.\n break;\n }\n\n var parentB = parentA.alternate;\n\n if (parentB === null) {\n // There is no alternate. This is an unusual case. Currently, it only\n // happens when a Suspense component is hidden. An extra fragment fiber\n // is inserted in between the Suspense fiber and its children. Skip\n // over this extra fragment fiber and proceed to the next parent.\n var nextParent = parentA.return;\n\n if (nextParent !== null) {\n a = b = nextParent;\n continue;\n } // If there's no parent, we're at the root.\n\n\n break;\n } // If both copies of the parent fiber point to the same child, we can\n // assume that the child is current. This happens when we bailout on low\n // priority: the bailed out fiber's child reuses the current child.\n\n\n if (parentA.child === parentB.child) {\n var child = parentA.child;\n\n while (child) {\n if (child === a) {\n // We've determined that A is the current branch.\n assertIsMounted(parentA);\n return fiber;\n }\n\n if (child === b) {\n // We've determined that B is the current branch.\n assertIsMounted(parentA);\n return alternate;\n }\n\n child = child.sibling;\n } // We should never have an alternate for any mounting node. So the only\n // way this could possibly happen is if this was unmounted, if at all.\n\n\n throw new Error('Unable to find node on an unmounted component.');\n }\n\n if (a.return !== b.return) {\n // The return pointer of A and the return pointer of B point to different\n // fibers. We assume that return pointers never criss-cross, so A must\n // belong to the child set of A.return, and B must belong to the child\n // set of B.return.\n a = parentA;\n b = parentB;\n } else {\n // The return pointers point to the same fiber. We'll have to use the\n // default, slow path: scan the child sets of each parent alternate to see\n // which child belongs to which set.\n //\n // Search parent A's child set\n var didFindChild = false;\n var _child = parentA.child;\n\n while (_child) {\n if (_child === a) {\n didFindChild = true;\n a = parentA;\n b = parentB;\n break;\n }\n\n if (_child === b) {\n didFindChild = true;\n b = parentA;\n a = parentB;\n break;\n }\n\n _child = _child.sibling;\n }\n\n if (!didFindChild) {\n // Search parent B's child set\n _child = parentB.child;\n\n while (_child) {\n if (_child === a) {\n didFindChild = true;\n a = parentB;\n b = parentA;\n break;\n }\n\n if (_child === b) {\n didFindChild = true;\n b = parentB;\n a = parentA;\n break;\n }\n\n _child = _child.sibling;\n }\n\n if (!didFindChild) {\n throw new Error('Child was not found in either parent set. This indicates a bug ' + 'in React related to the return pointer. Please file an issue.');\n }\n }\n }\n\n if (a.alternate !== b) {\n throw new Error(\"Return fibers should always be each others' alternates. \" + 'This error is likely caused by a bug in React. Please file an issue.');\n }\n } // If the root is not a host container, we're in a disconnected tree. I.e.\n // unmounted.\n\n\n if (a.tag !== HostRoot) {\n throw new Error('Unable to find node on an unmounted component.');\n }\n\n if (a.stateNode.current === a) {\n // We've determined that A is the current branch.\n return fiber;\n } // Otherwise B has to be current branch.\n\n\n return alternate;\n}\nfunction findCurrentHostFiber(parent) {\n var currentParent = findCurrentFiberUsingSlowPath(parent);\n return currentParent !== null ? findCurrentHostFiberImpl(currentParent) : null;\n}\n\nfunction findCurrentHostFiberImpl(node) {\n // Next we'll drill down this component to find the first HostComponent/Text.\n if (node.tag === HostComponent || node.tag === HostText) {\n return node;\n }\n\n var child = node.child;\n\n while (child !== null) {\n var match = findCurrentHostFiberImpl(child);\n\n if (match !== null) {\n return match;\n }\n\n child = child.sibling;\n }\n\n return null;\n}\n\nfunction findCurrentHostFiberWithNoPortals(parent) {\n var currentParent = findCurrentFiberUsingSlowPath(parent);\n return currentParent !== null ? findCurrentHostFiberWithNoPortalsImpl(currentParent) : null;\n}\n\nfunction findCurrentHostFiberWithNoPortalsImpl(node) {\n // Next we'll drill down this component to find the first HostComponent/Text.\n if (node.tag === HostComponent || node.tag === HostText) {\n return node;\n }\n\n var child = node.child;\n\n while (child !== null) {\n if (child.tag !== HostPortal) {\n var match = findCurrentHostFiberWithNoPortalsImpl(child);\n\n if (match !== null) {\n return match;\n }\n }\n\n child = child.sibling;\n }\n\n return null;\n}\n\n// This module only exists as an ESM wrapper around the external CommonJS\nvar scheduleCallback = Scheduler.unstable_scheduleCallback;\nvar cancelCallback = Scheduler.unstable_cancelCallback;\nvar shouldYield = Scheduler.unstable_shouldYield;\nvar requestPaint = Scheduler.unstable_requestPaint;\nvar now = Scheduler.unstable_now;\nvar getCurrentPriorityLevel = Scheduler.unstable_getCurrentPriorityLevel;\nvar ImmediatePriority = Scheduler.unstable_ImmediatePriority;\nvar UserBlockingPriority = Scheduler.unstable_UserBlockingPriority;\nvar NormalPriority = Scheduler.unstable_NormalPriority;\nvar LowPriority = Scheduler.unstable_LowPriority;\nvar IdlePriority = Scheduler.unstable_IdlePriority;\n// this doesn't actually exist on the scheduler, but it *does*\n// on scheduler/unstable_mock, which we'll need for internal testing\nvar unstable_yieldValue = Scheduler.unstable_yieldValue;\nvar unstable_setDisableYieldValue = Scheduler.unstable_setDisableYieldValue;\n\nvar rendererID = null;\nvar injectedHook = null;\nvar injectedProfilingHooks = null;\nvar hasLoggedError = false;\nvar isDevToolsPresent = typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined';\nfunction injectInternals(internals) {\n if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined') {\n // No DevTools\n return false;\n }\n\n var hook = __REACT_DEVTOOLS_GLOBAL_HOOK__;\n\n if (hook.isDisabled) {\n // This isn't a real property on the hook, but it can be set to opt out\n // of DevTools integration and associated warnings and logs.\n // https://github.com/facebook/react/issues/3877\n return true;\n }\n\n if (!hook.supportsFiber) {\n {\n error('The installed version of React DevTools is too old and will not work ' + 'with the current version of React. Please update React DevTools. ' + 'https://reactjs.org/link/react-devtools');\n } // DevTools exists, even though it doesn't support Fiber.\n\n\n return true;\n }\n\n try {\n if (enableSchedulingProfiler) {\n // Conditionally inject these hooks only if Timeline profiler is supported by this build.\n // This gives DevTools a way to feature detect that isn't tied to version number\n // (since profiling and timeline are controlled by different feature flags).\n internals = assign({}, internals, {\n getLaneLabelMap: getLaneLabelMap,\n injectProfilingHooks: injectProfilingHooks\n });\n }\n\n rendererID = hook.inject(internals); // We have successfully injected, so now it is safe to set up hooks.\n\n injectedHook = hook;\n } catch (err) {\n // Catch all errors because it is unsafe to throw during initialization.\n {\n error('React instrumentation encountered an error: %s.', err);\n }\n }\n\n if (hook.checkDCE) {\n // This is the real DevTools.\n return true;\n } else {\n // This is likely a hook installed by Fast Refresh runtime.\n return false;\n }\n}\nfunction onScheduleRoot(root, children) {\n {\n if (injectedHook && typeof injectedHook.onScheduleFiberRoot === 'function') {\n try {\n injectedHook.onScheduleFiberRoot(rendererID, root, children);\n } catch (err) {\n if ( !hasLoggedError) {\n hasLoggedError = true;\n\n error('React instrumentation encountered an error: %s', err);\n }\n }\n }\n }\n}\nfunction onCommitRoot(root, eventPriority) {\n if (injectedHook && typeof injectedHook.onCommitFiberRoot === 'function') {\n try {\n var didError = (root.current.flags & DidCapture) === DidCapture;\n\n if (enableProfilerTimer) {\n var schedulerPriority;\n\n switch (eventPriority) {\n case DiscreteEventPriority:\n schedulerPriority = ImmediatePriority;\n break;\n\n case ContinuousEventPriority:\n schedulerPriority = UserBlockingPriority;\n break;\n\n case DefaultEventPriority:\n schedulerPriority = NormalPriority;\n break;\n\n case IdleEventPriority:\n schedulerPriority = IdlePriority;\n break;\n\n default:\n schedulerPriority = NormalPriority;\n break;\n }\n\n injectedHook.onCommitFiberRoot(rendererID, root, schedulerPriority, didError);\n } else {\n injectedHook.onCommitFiberRoot(rendererID, root, undefined, didError);\n }\n } catch (err) {\n {\n if (!hasLoggedError) {\n hasLoggedError = true;\n\n error('React instrumentation encountered an error: %s', err);\n }\n }\n }\n }\n}\nfunction onPostCommitRoot(root) {\n if (injectedHook && typeof injectedHook.onPostCommitFiberRoot === 'function') {\n try {\n injectedHook.onPostCommitFiberRoot(rendererID, root);\n } catch (err) {\n {\n if (!hasLoggedError) {\n hasLoggedError = true;\n\n error('React instrumentation encountered an error: %s', err);\n }\n }\n }\n }\n}\nfunction onCommitUnmount(fiber) {\n if (injectedHook && typeof injectedHook.onCommitFiberUnmount === 'function') {\n try {\n injectedHook.onCommitFiberUnmount(rendererID, fiber);\n } catch (err) {\n {\n if (!hasLoggedError) {\n hasLoggedError = true;\n\n error('React instrumentation encountered an error: %s', err);\n }\n }\n }\n }\n}\nfunction setIsStrictModeForDevtools(newIsStrictMode) {\n {\n if (typeof unstable_yieldValue === 'function') {\n // We're in a test because Scheduler.unstable_yieldValue only exists\n // in SchedulerMock. To reduce the noise in strict mode tests,\n // suppress warnings and disable scheduler yielding during the double render\n unstable_setDisableYieldValue(newIsStrictMode);\n setSuppressWarning(newIsStrictMode);\n }\n\n if (injectedHook && typeof injectedHook.setStrictMode === 'function') {\n try {\n injectedHook.setStrictMode(rendererID, newIsStrictMode);\n } catch (err) {\n {\n if (!hasLoggedError) {\n hasLoggedError = true;\n\n error('React instrumentation encountered an error: %s', err);\n }\n }\n }\n }\n }\n} // Profiler API hooks\n\nfunction injectProfilingHooks(profilingHooks) {\n injectedProfilingHooks = profilingHooks;\n}\n\nfunction getLaneLabelMap() {\n {\n var map = new Map();\n var lane = 1;\n\n for (var index = 0; index < TotalLanes; index++) {\n var label = getLabelForLane(lane);\n map.set(lane, label);\n lane *= 2;\n }\n\n return map;\n }\n}\n\nfunction markCommitStarted(lanes) {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markCommitStarted === 'function') {\n injectedProfilingHooks.markCommitStarted(lanes);\n }\n }\n}\nfunction markCommitStopped() {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markCommitStopped === 'function') {\n injectedProfilingHooks.markCommitStopped();\n }\n }\n}\nfunction markComponentRenderStarted(fiber) {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentRenderStarted === 'function') {\n injectedProfilingHooks.markComponentRenderStarted(fiber);\n }\n }\n}\nfunction markComponentRenderStopped() {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentRenderStopped === 'function') {\n injectedProfilingHooks.markComponentRenderStopped();\n }\n }\n}\nfunction markComponentPassiveEffectMountStarted(fiber) {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentPassiveEffectMountStarted === 'function') {\n injectedProfilingHooks.markComponentPassiveEffectMountStarted(fiber);\n }\n }\n}\nfunction markComponentPassiveEffectMountStopped() {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentPassiveEffectMountStopped === 'function') {\n injectedProfilingHooks.markComponentPassiveEffectMountStopped();\n }\n }\n}\nfunction markComponentPassiveEffectUnmountStarted(fiber) {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentPassiveEffectUnmountStarted === 'function') {\n injectedProfilingHooks.markComponentPassiveEffectUnmountStarted(fiber);\n }\n }\n}\nfunction markComponentPassiveEffectUnmountStopped() {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentPassiveEffectUnmountStopped === 'function') {\n injectedProfilingHooks.markComponentPassiveEffectUnmountStopped();\n }\n }\n}\nfunction markComponentLayoutEffectMountStarted(fiber) {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentLayoutEffectMountStarted === 'function') {\n injectedProfilingHooks.markComponentLayoutEffectMountStarted(fiber);\n }\n }\n}\nfunction markComponentLayoutEffectMountStopped() {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentLayoutEffectMountStopped === 'function') {\n injectedProfilingHooks.markComponentLayoutEffectMountStopped();\n }\n }\n}\nfunction markComponentLayoutEffectUnmountStarted(fiber) {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentLayoutEffectUnmountStarted === 'function') {\n injectedProfilingHooks.markComponentLayoutEffectUnmountStarted(fiber);\n }\n }\n}\nfunction markComponentLayoutEffectUnmountStopped() {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentLayoutEffectUnmountStopped === 'function') {\n injectedProfilingHooks.markComponentLayoutEffectUnmountStopped();\n }\n }\n}\nfunction markComponentErrored(fiber, thrownValue, lanes) {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentErrored === 'function') {\n injectedProfilingHooks.markComponentErrored(fiber, thrownValue, lanes);\n }\n }\n}\nfunction markComponentSuspended(fiber, wakeable, lanes) {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentSuspended === 'function') {\n injectedProfilingHooks.markComponentSuspended(fiber, wakeable, lanes);\n }\n }\n}\nfunction markLayoutEffectsStarted(lanes) {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markLayoutEffectsStarted === 'function') {\n injectedProfilingHooks.markLayoutEffectsStarted(lanes);\n }\n }\n}\nfunction markLayoutEffectsStopped() {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markLayoutEffectsStopped === 'function') {\n injectedProfilingHooks.markLayoutEffectsStopped();\n }\n }\n}\nfunction markPassiveEffectsStarted(lanes) {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markPassiveEffectsStarted === 'function') {\n injectedProfilingHooks.markPassiveEffectsStarted(lanes);\n }\n }\n}\nfunction markPassiveEffectsStopped() {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markPassiveEffectsStopped === 'function') {\n injectedProfilingHooks.markPassiveEffectsStopped();\n }\n }\n}\nfunction markRenderStarted(lanes) {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markRenderStarted === 'function') {\n injectedProfilingHooks.markRenderStarted(lanes);\n }\n }\n}\nfunction markRenderYielded() {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markRenderYielded === 'function') {\n injectedProfilingHooks.markRenderYielded();\n }\n }\n}\nfunction markRenderStopped() {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markRenderStopped === 'function') {\n injectedProfilingHooks.markRenderStopped();\n }\n }\n}\nfunction markRenderScheduled(lane) {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markRenderScheduled === 'function') {\n injectedProfilingHooks.markRenderScheduled(lane);\n }\n }\n}\nfunction markForceUpdateScheduled(fiber, lane) {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markForceUpdateScheduled === 'function') {\n injectedProfilingHooks.markForceUpdateScheduled(fiber, lane);\n }\n }\n}\nfunction markStateUpdateScheduled(fiber, lane) {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markStateUpdateScheduled === 'function') {\n injectedProfilingHooks.markStateUpdateScheduled(fiber, lane);\n }\n }\n}\n\nvar NoMode =\n/* */\n0; // TODO: Remove ConcurrentMode by reading from the root tag instead\n\nvar ConcurrentMode =\n/* */\n1;\nvar ProfileMode =\n/* */\n2;\nvar StrictLegacyMode =\n/* */\n8;\nvar StrictEffectsMode =\n/* */\n16;\n\n// TODO: This is pretty well supported by browsers. Maybe we can drop it.\nvar clz32 = Math.clz32 ? Math.clz32 : clz32Fallback; // Count leading zeros.\n// Based on:\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/clz32\n\nvar log = Math.log;\nvar LN2 = Math.LN2;\n\nfunction clz32Fallback(x) {\n var asUint = x >>> 0;\n\n if (asUint === 0) {\n return 32;\n }\n\n return 31 - (log(asUint) / LN2 | 0) | 0;\n}\n\n// If those values are changed that package should be rebuilt and redeployed.\n\nvar TotalLanes = 31;\nvar NoLanes =\n/* */\n0;\nvar NoLane =\n/* */\n0;\nvar SyncLane =\n/* */\n1;\nvar InputContinuousHydrationLane =\n/* */\n2;\nvar InputContinuousLane =\n/* */\n4;\nvar DefaultHydrationLane =\n/* */\n8;\nvar DefaultLane =\n/* */\n16;\nvar TransitionHydrationLane =\n/* */\n32;\nvar TransitionLanes =\n/* */\n4194240;\nvar TransitionLane1 =\n/* */\n64;\nvar TransitionLane2 =\n/* */\n128;\nvar TransitionLane3 =\n/* */\n256;\nvar TransitionLane4 =\n/* */\n512;\nvar TransitionLane5 =\n/* */\n1024;\nvar TransitionLane6 =\n/* */\n2048;\nvar TransitionLane7 =\n/* */\n4096;\nvar TransitionLane8 =\n/* */\n8192;\nvar TransitionLane9 =\n/* */\n16384;\nvar TransitionLane10 =\n/* */\n32768;\nvar TransitionLane11 =\n/* */\n65536;\nvar TransitionLane12 =\n/* */\n131072;\nvar TransitionLane13 =\n/* */\n262144;\nvar TransitionLane14 =\n/* */\n524288;\nvar TransitionLane15 =\n/* */\n1048576;\nvar TransitionLane16 =\n/* */\n2097152;\nvar RetryLanes =\n/* */\n130023424;\nvar RetryLane1 =\n/* */\n4194304;\nvar RetryLane2 =\n/* */\n8388608;\nvar RetryLane3 =\n/* */\n16777216;\nvar RetryLane4 =\n/* */\n33554432;\nvar RetryLane5 =\n/* */\n67108864;\nvar SomeRetryLane = RetryLane1;\nvar SelectiveHydrationLane =\n/* */\n134217728;\nvar NonIdleLanes =\n/* */\n268435455;\nvar IdleHydrationLane =\n/* */\n268435456;\nvar IdleLane =\n/* */\n536870912;\nvar OffscreenLane =\n/* */\n1073741824; // This function is used for the experimental timeline (react-devtools-timeline)\n// It should be kept in sync with the Lanes values above.\n\nfunction getLabelForLane(lane) {\n {\n if (lane & SyncLane) {\n return 'Sync';\n }\n\n if (lane & InputContinuousHydrationLane) {\n return 'InputContinuousHydration';\n }\n\n if (lane & InputContinuousLane) {\n return 'InputContinuous';\n }\n\n if (lane & DefaultHydrationLane) {\n return 'DefaultHydration';\n }\n\n if (lane & DefaultLane) {\n return 'Default';\n }\n\n if (lane & TransitionHydrationLane) {\n return 'TransitionHydration';\n }\n\n if (lane & TransitionLanes) {\n return 'Transition';\n }\n\n if (lane & RetryLanes) {\n return 'Retry';\n }\n\n if (lane & SelectiveHydrationLane) {\n return 'SelectiveHydration';\n }\n\n if (lane & IdleHydrationLane) {\n return 'IdleHydration';\n }\n\n if (lane & IdleLane) {\n return 'Idle';\n }\n\n if (lane & OffscreenLane) {\n return 'Offscreen';\n }\n }\n}\nvar NoTimestamp = -1;\nvar nextTransitionLane = TransitionLane1;\nvar nextRetryLane = RetryLane1;\n\nfunction getHighestPriorityLanes(lanes) {\n switch (getHighestPriorityLane(lanes)) {\n case SyncLane:\n return SyncLane;\n\n case InputContinuousHydrationLane:\n return InputContinuousHydrationLane;\n\n case InputContinuousLane:\n return InputContinuousLane;\n\n case DefaultHydrationLane:\n return DefaultHydrationLane;\n\n case DefaultLane:\n return DefaultLane;\n\n case TransitionHydrationLane:\n return TransitionHydrationLane;\n\n case TransitionLane1:\n case TransitionLane2:\n case TransitionLane3:\n case TransitionLane4:\n case TransitionLane5:\n case TransitionLane6:\n case TransitionLane7:\n case TransitionLane8:\n case TransitionLane9:\n case TransitionLane10:\n case TransitionLane11:\n case TransitionLane12:\n case TransitionLane13:\n case TransitionLane14:\n case TransitionLane15:\n case TransitionLane16:\n return lanes & TransitionLanes;\n\n case RetryLane1:\n case RetryLane2:\n case RetryLane3:\n case RetryLane4:\n case RetryLane5:\n return lanes & RetryLanes;\n\n case SelectiveHydrationLane:\n return SelectiveHydrationLane;\n\n case IdleHydrationLane:\n return IdleHydrationLane;\n\n case IdleLane:\n return IdleLane;\n\n case OffscreenLane:\n return OffscreenLane;\n\n default:\n {\n error('Should have found matching lanes. This is a bug in React.');\n } // This shouldn't be reachable, but as a fallback, return the entire bitmask.\n\n\n return lanes;\n }\n}\n\nfunction getNextLanes(root, wipLanes) {\n // Early bailout if there's no pending work left.\n var pendingLanes = root.pendingLanes;\n\n if (pendingLanes === NoLanes) {\n return NoLanes;\n }\n\n var nextLanes = NoLanes;\n var suspendedLanes = root.suspendedLanes;\n var pingedLanes = root.pingedLanes; // Do not work on any idle work until all the non-idle work has finished,\n // even if the work is suspended.\n\n var nonIdlePendingLanes = pendingLanes & NonIdleLanes;\n\n if (nonIdlePendingLanes !== NoLanes) {\n var nonIdleUnblockedLanes = nonIdlePendingLanes & ~suspendedLanes;\n\n if (nonIdleUnblockedLanes !== NoLanes) {\n nextLanes = getHighestPriorityLanes(nonIdleUnblockedLanes);\n } else {\n var nonIdlePingedLanes = nonIdlePendingLanes & pingedLanes;\n\n if (nonIdlePingedLanes !== NoLanes) {\n nextLanes = getHighestPriorityLanes(nonIdlePingedLanes);\n }\n }\n } else {\n // The only remaining work is Idle.\n var unblockedLanes = pendingLanes & ~suspendedLanes;\n\n if (unblockedLanes !== NoLanes) {\n nextLanes = getHighestPriorityLanes(unblockedLanes);\n } else {\n if (pingedLanes !== NoLanes) {\n nextLanes = getHighestPriorityLanes(pingedLanes);\n }\n }\n }\n\n if (nextLanes === NoLanes) {\n // This should only be reachable if we're suspended\n // TODO: Consider warning in this path if a fallback timer is not scheduled.\n return NoLanes;\n } // If we're already in the middle of a render, switching lanes will interrupt\n // it and we'll lose our progress. We should only do this if the new lanes are\n // higher priority.\n\n\n if (wipLanes !== NoLanes && wipLanes !== nextLanes && // If we already suspended with a delay, then interrupting is fine. Don't\n // bother waiting until the root is complete.\n (wipLanes & suspendedLanes) === NoLanes) {\n var nextLane = getHighestPriorityLane(nextLanes);\n var wipLane = getHighestPriorityLane(wipLanes);\n\n if ( // Tests whether the next lane is equal or lower priority than the wip\n // one. This works because the bits decrease in priority as you go left.\n nextLane >= wipLane || // Default priority updates should not interrupt transition updates. The\n // only difference between default updates and transition updates is that\n // default updates do not support refresh transitions.\n nextLane === DefaultLane && (wipLane & TransitionLanes) !== NoLanes) {\n // Keep working on the existing in-progress tree. Do not interrupt.\n return wipLanes;\n }\n }\n\n if ((nextLanes & InputContinuousLane) !== NoLanes) {\n // When updates are sync by default, we entangle continuous priority updates\n // and default updates, so they render in the same batch. The only reason\n // they use separate lanes is because continuous updates should interrupt\n // transitions, but default updates should not.\n nextLanes |= pendingLanes & DefaultLane;\n } // Check for entangled lanes and add them to the batch.\n //\n // A lane is said to be entangled with another when it's not allowed to render\n // in a batch that does not also include the other lane. Typically we do this\n // when multiple updates have the same source, and we only want to respond to\n // the most recent event from that source.\n //\n // Note that we apply entanglements *after* checking for partial work above.\n // This means that if a lane is entangled during an interleaved event while\n // it's already rendering, we won't interrupt it. This is intentional, since\n // entanglement is usually \"best effort\": we'll try our best to render the\n // lanes in the same batch, but it's not worth throwing out partially\n // completed work in order to do it.\n // TODO: Reconsider this. The counter-argument is that the partial work\n // represents an intermediate state, which we don't want to show to the user.\n // And by spending extra time finishing it, we're increasing the amount of\n // time it takes to show the final state, which is what they are actually\n // waiting for.\n //\n // For those exceptions where entanglement is semantically important, like\n // useMutableSource, we should ensure that there is no partial work at the\n // time we apply the entanglement.\n\n\n var entangledLanes = root.entangledLanes;\n\n if (entangledLanes !== NoLanes) {\n var entanglements = root.entanglements;\n var lanes = nextLanes & entangledLanes;\n\n while (lanes > 0) {\n var index = pickArbitraryLaneIndex(lanes);\n var lane = 1 << index;\n nextLanes |= entanglements[index];\n lanes &= ~lane;\n }\n }\n\n return nextLanes;\n}\nfunction getMostRecentEventTime(root, lanes) {\n var eventTimes = root.eventTimes;\n var mostRecentEventTime = NoTimestamp;\n\n while (lanes > 0) {\n var index = pickArbitraryLaneIndex(lanes);\n var lane = 1 << index;\n var eventTime = eventTimes[index];\n\n if (eventTime > mostRecentEventTime) {\n mostRecentEventTime = eventTime;\n }\n\n lanes &= ~lane;\n }\n\n return mostRecentEventTime;\n}\n\nfunction computeExpirationTime(lane, currentTime) {\n switch (lane) {\n case SyncLane:\n case InputContinuousHydrationLane:\n case InputContinuousLane:\n // User interactions should expire slightly more quickly.\n //\n // NOTE: This is set to the corresponding constant as in Scheduler.js.\n // When we made it larger, a product metric in www regressed, suggesting\n // there's a user interaction that's being starved by a series of\n // synchronous updates. If that theory is correct, the proper solution is\n // to fix the starvation. However, this scenario supports the idea that\n // expiration times are an important safeguard when starvation\n // does happen.\n return currentTime + 250;\n\n case DefaultHydrationLane:\n case DefaultLane:\n case TransitionHydrationLane:\n case TransitionLane1:\n case TransitionLane2:\n case TransitionLane3:\n case TransitionLane4:\n case TransitionLane5:\n case TransitionLane6:\n case TransitionLane7:\n case TransitionLane8:\n case TransitionLane9:\n case TransitionLane10:\n case TransitionLane11:\n case TransitionLane12:\n case TransitionLane13:\n case TransitionLane14:\n case TransitionLane15:\n case TransitionLane16:\n return currentTime + 5000;\n\n case RetryLane1:\n case RetryLane2:\n case RetryLane3:\n case RetryLane4:\n case RetryLane5:\n // TODO: Retries should be allowed to expire if they are CPU bound for\n // too long, but when I made this change it caused a spike in browser\n // crashes. There must be some other underlying bug; not super urgent but\n // ideally should figure out why and fix it. Unfortunately we don't have\n // a repro for the crashes, only detected via production metrics.\n return NoTimestamp;\n\n case SelectiveHydrationLane:\n case IdleHydrationLane:\n case IdleLane:\n case OffscreenLane:\n // Anything idle priority or lower should never expire.\n return NoTimestamp;\n\n default:\n {\n error('Should have found matching lanes. This is a bug in React.');\n }\n\n return NoTimestamp;\n }\n}\n\nfunction markStarvedLanesAsExpired(root, currentTime) {\n // TODO: This gets called every time we yield. We can optimize by storing\n // the earliest expiration time on the root. Then use that to quickly bail out\n // of this function.\n var pendingLanes = root.pendingLanes;\n var suspendedLanes = root.suspendedLanes;\n var pingedLanes = root.pingedLanes;\n var expirationTimes = root.expirationTimes; // Iterate through the pending lanes and check if we've reached their\n // expiration time. If so, we'll assume the update is being starved and mark\n // it as expired to force it to finish.\n\n var lanes = pendingLanes;\n\n while (lanes > 0) {\n var index = pickArbitraryLaneIndex(lanes);\n var lane = 1 << index;\n var expirationTime = expirationTimes[index];\n\n if (expirationTime === NoTimestamp) {\n // Found a pending lane with no expiration time. If it's not suspended, or\n // if it's pinged, assume it's CPU-bound. Compute a new expiration time\n // using the current time.\n if ((lane & suspendedLanes) === NoLanes || (lane & pingedLanes) !== NoLanes) {\n // Assumes timestamps are monotonically increasing.\n expirationTimes[index] = computeExpirationTime(lane, currentTime);\n }\n } else if (expirationTime <= currentTime) {\n // This lane expired\n root.expiredLanes |= lane;\n }\n\n lanes &= ~lane;\n }\n} // This returns the highest priority pending lanes regardless of whether they\n// are suspended.\n\nfunction getHighestPriorityPendingLanes(root) {\n return getHighestPriorityLanes(root.pendingLanes);\n}\nfunction getLanesToRetrySynchronouslyOnError(root) {\n var everythingButOffscreen = root.pendingLanes & ~OffscreenLane;\n\n if (everythingButOffscreen !== NoLanes) {\n return everythingButOffscreen;\n }\n\n if (everythingButOffscreen & OffscreenLane) {\n return OffscreenLane;\n }\n\n return NoLanes;\n}\nfunction includesSyncLane(lanes) {\n return (lanes & SyncLane) !== NoLanes;\n}\nfunction includesNonIdleWork(lanes) {\n return (lanes & NonIdleLanes) !== NoLanes;\n}\nfunction includesOnlyRetries(lanes) {\n return (lanes & RetryLanes) === lanes;\n}\nfunction includesOnlyNonUrgentLanes(lanes) {\n var UrgentLanes = SyncLane | InputContinuousLane | DefaultLane;\n return (lanes & UrgentLanes) === NoLanes;\n}\nfunction includesOnlyTransitions(lanes) {\n return (lanes & TransitionLanes) === lanes;\n}\nfunction includesBlockingLane(root, lanes) {\n\n var SyncDefaultLanes = InputContinuousHydrationLane | InputContinuousLane | DefaultHydrationLane | DefaultLane;\n return (lanes & SyncDefaultLanes) !== NoLanes;\n}\nfunction includesExpiredLane(root, lanes) {\n // This is a separate check from includesBlockingLane because a lane can\n // expire after a render has already started.\n return (lanes & root.expiredLanes) !== NoLanes;\n}\nfunction isTransitionLane(lane) {\n return (lane & TransitionLanes) !== NoLanes;\n}\nfunction claimNextTransitionLane() {\n // Cycle through the lanes, assigning each new transition to the next lane.\n // In most cases, this means every transition gets its own lane, until we\n // run out of lanes and cycle back to the beginning.\n var lane = nextTransitionLane;\n nextTransitionLane <<= 1;\n\n if ((nextTransitionLane & TransitionLanes) === NoLanes) {\n nextTransitionLane = TransitionLane1;\n }\n\n return lane;\n}\nfunction claimNextRetryLane() {\n var lane = nextRetryLane;\n nextRetryLane <<= 1;\n\n if ((nextRetryLane & RetryLanes) === NoLanes) {\n nextRetryLane = RetryLane1;\n }\n\n return lane;\n}\nfunction getHighestPriorityLane(lanes) {\n return lanes & -lanes;\n}\nfunction pickArbitraryLane(lanes) {\n // This wrapper function gets inlined. Only exists so to communicate that it\n // doesn't matter which bit is selected; you can pick any bit without\n // affecting the algorithms where its used. Here I'm using\n // getHighestPriorityLane because it requires the fewest operations.\n return getHighestPriorityLane(lanes);\n}\n\nfunction pickArbitraryLaneIndex(lanes) {\n return 31 - clz32(lanes);\n}\n\nfunction laneToIndex(lane) {\n return pickArbitraryLaneIndex(lane);\n}\n\nfunction includesSomeLane(a, b) {\n return (a & b) !== NoLanes;\n}\nfunction isSubsetOfLanes(set, subset) {\n return (set & subset) === subset;\n}\nfunction mergeLanes(a, b) {\n return a | b;\n}\nfunction removeLanes(set, subset) {\n return set & ~subset;\n}\nfunction intersectLanes(a, b) {\n return a & b;\n} // Seems redundant, but it changes the type from a single lane (used for\n// updates) to a group of lanes (used for flushing work).\n\nfunction laneToLanes(lane) {\n return lane;\n}\nfunction higherPriorityLane(a, b) {\n // This works because the bit ranges decrease in priority as you go left.\n return a !== NoLane && a < b ? a : b;\n}\nfunction createLaneMap(initial) {\n // Intentionally pushing one by one.\n // https://v8.dev/blog/elements-kinds#avoid-creating-holes\n var laneMap = [];\n\n for (var i = 0; i < TotalLanes; i++) {\n laneMap.push(initial);\n }\n\n return laneMap;\n}\nfunction markRootUpdated(root, updateLane, eventTime) {\n root.pendingLanes |= updateLane; // If there are any suspended transitions, it's possible this new update\n // could unblock them. Clear the suspended lanes so that we can try rendering\n // them again.\n //\n // TODO: We really only need to unsuspend only lanes that are in the\n // `subtreeLanes` of the updated fiber, or the update lanes of the return\n // path. This would exclude suspended updates in an unrelated sibling tree,\n // since there's no way for this update to unblock it.\n //\n // We don't do this if the incoming update is idle, because we never process\n // idle updates until after all the regular updates have finished; there's no\n // way it could unblock a transition.\n\n if (updateLane !== IdleLane) {\n root.suspendedLanes = NoLanes;\n root.pingedLanes = NoLanes;\n }\n\n var eventTimes = root.eventTimes;\n var index = laneToIndex(updateLane); // We can always overwrite an existing timestamp because we prefer the most\n // recent event, and we assume time is monotonically increasing.\n\n eventTimes[index] = eventTime;\n}\nfunction markRootSuspended(root, suspendedLanes) {\n root.suspendedLanes |= suspendedLanes;\n root.pingedLanes &= ~suspendedLanes; // The suspended lanes are no longer CPU-bound. Clear their expiration times.\n\n var expirationTimes = root.expirationTimes;\n var lanes = suspendedLanes;\n\n while (lanes > 0) {\n var index = pickArbitraryLaneIndex(lanes);\n var lane = 1 << index;\n expirationTimes[index] = NoTimestamp;\n lanes &= ~lane;\n }\n}\nfunction markRootPinged(root, pingedLanes, eventTime) {\n root.pingedLanes |= root.suspendedLanes & pingedLanes;\n}\nfunction markRootFinished(root, remainingLanes) {\n var noLongerPendingLanes = root.pendingLanes & ~remainingLanes;\n root.pendingLanes = remainingLanes; // Let's try everything again\n\n root.suspendedLanes = NoLanes;\n root.pingedLanes = NoLanes;\n root.expiredLanes &= remainingLanes;\n root.mutableReadLanes &= remainingLanes;\n root.entangledLanes &= remainingLanes;\n var entanglements = root.entanglements;\n var eventTimes = root.eventTimes;\n var expirationTimes = root.expirationTimes; // Clear the lanes that no longer have pending work\n\n var lanes = noLongerPendingLanes;\n\n while (lanes > 0) {\n var index = pickArbitraryLaneIndex(lanes);\n var lane = 1 << index;\n entanglements[index] = NoLanes;\n eventTimes[index] = NoTimestamp;\n expirationTimes[index] = NoTimestamp;\n lanes &= ~lane;\n }\n}\nfunction markRootEntangled(root, entangledLanes) {\n // In addition to entangling each of the given lanes with each other, we also\n // have to consider _transitive_ entanglements. For each lane that is already\n // entangled with *any* of the given lanes, that lane is now transitively\n // entangled with *all* the given lanes.\n //\n // Translated: If C is entangled with A, then entangling A with B also\n // entangles C with B.\n //\n // If this is hard to grasp, it might help to intentionally break this\n // function and look at the tests that fail in ReactTransition-test.js. Try\n // commenting out one of the conditions below.\n var rootEntangledLanes = root.entangledLanes |= entangledLanes;\n var entanglements = root.entanglements;\n var lanes = rootEntangledLanes;\n\n while (lanes) {\n var index = pickArbitraryLaneIndex(lanes);\n var lane = 1 << index;\n\n if ( // Is this one of the newly entangled lanes?\n lane & entangledLanes | // Is this lane transitively entangled with the newly entangled lanes?\n entanglements[index] & entangledLanes) {\n entanglements[index] |= entangledLanes;\n }\n\n lanes &= ~lane;\n }\n}\nfunction getBumpedLaneForHydration(root, renderLanes) {\n var renderLane = getHighestPriorityLane(renderLanes);\n var lane;\n\n switch (renderLane) {\n case InputContinuousLane:\n lane = InputContinuousHydrationLane;\n break;\n\n case DefaultLane:\n lane = DefaultHydrationLane;\n break;\n\n case TransitionLane1:\n case TransitionLane2:\n case TransitionLane3:\n case TransitionLane4:\n case TransitionLane5:\n case TransitionLane6:\n case TransitionLane7:\n case TransitionLane8:\n case TransitionLane9:\n case TransitionLane10:\n case TransitionLane11:\n case TransitionLane12:\n case TransitionLane13:\n case TransitionLane14:\n case TransitionLane15:\n case TransitionLane16:\n case RetryLane1:\n case RetryLane2:\n case RetryLane3:\n case RetryLane4:\n case RetryLane5:\n lane = TransitionHydrationLane;\n break;\n\n case IdleLane:\n lane = IdleHydrationLane;\n break;\n\n default:\n // Everything else is already either a hydration lane, or shouldn't\n // be retried at a hydration lane.\n lane = NoLane;\n break;\n } // Check if the lane we chose is suspended. If so, that indicates that we\n // already attempted and failed to hydrate at that level. Also check if we're\n // already rendering that lane, which is rare but could happen.\n\n\n if ((lane & (root.suspendedLanes | renderLanes)) !== NoLane) {\n // Give up trying to hydrate and fall back to client render.\n return NoLane;\n }\n\n return lane;\n}\nfunction addFiberToLanesMap(root, fiber, lanes) {\n\n if (!isDevToolsPresent) {\n return;\n }\n\n var pendingUpdatersLaneMap = root.pendingUpdatersLaneMap;\n\n while (lanes > 0) {\n var index = laneToIndex(lanes);\n var lane = 1 << index;\n var updaters = pendingUpdatersLaneMap[index];\n updaters.add(fiber);\n lanes &= ~lane;\n }\n}\nfunction movePendingFibersToMemoized(root, lanes) {\n\n if (!isDevToolsPresent) {\n return;\n }\n\n var pendingUpdatersLaneMap = root.pendingUpdatersLaneMap;\n var memoizedUpdaters = root.memoizedUpdaters;\n\n while (lanes > 0) {\n var index = laneToIndex(lanes);\n var lane = 1 << index;\n var updaters = pendingUpdatersLaneMap[index];\n\n if (updaters.size > 0) {\n updaters.forEach(function (fiber) {\n var alternate = fiber.alternate;\n\n if (alternate === null || !memoizedUpdaters.has(alternate)) {\n memoizedUpdaters.add(fiber);\n }\n });\n updaters.clear();\n }\n\n lanes &= ~lane;\n }\n}\nfunction getTransitionsForLanes(root, lanes) {\n {\n return null;\n }\n}\n\nvar DiscreteEventPriority = SyncLane;\nvar ContinuousEventPriority = InputContinuousLane;\nvar DefaultEventPriority = DefaultLane;\nvar IdleEventPriority = IdleLane;\nvar currentUpdatePriority = NoLane;\nfunction getCurrentUpdatePriority() {\n return currentUpdatePriority;\n}\nfunction setCurrentUpdatePriority(newPriority) {\n currentUpdatePriority = newPriority;\n}\nfunction runWithPriority(priority, fn) {\n var previousPriority = currentUpdatePriority;\n\n try {\n currentUpdatePriority = priority;\n return fn();\n } finally {\n currentUpdatePriority = previousPriority;\n }\n}\nfunction higherEventPriority(a, b) {\n return a !== 0 && a < b ? a : b;\n}\nfunction lowerEventPriority(a, b) {\n return a === 0 || a > b ? a : b;\n}\nfunction isHigherEventPriority(a, b) {\n return a !== 0 && a < b;\n}\nfunction lanesToEventPriority(lanes) {\n var lane = getHighestPriorityLane(lanes);\n\n if (!isHigherEventPriority(DiscreteEventPriority, lane)) {\n return DiscreteEventPriority;\n }\n\n if (!isHigherEventPriority(ContinuousEventPriority, lane)) {\n return ContinuousEventPriority;\n }\n\n if (includesNonIdleWork(lane)) {\n return DefaultEventPriority;\n }\n\n return IdleEventPriority;\n}\n\n// This is imported by the event replaying implementation in React DOM. It's\n// in a separate file to break a circular dependency between the renderer and\n// the reconciler.\nfunction isRootDehydrated(root) {\n var currentState = root.current.memoizedState;\n return currentState.isDehydrated;\n}\n\nvar _attemptSynchronousHydration;\n\nfunction setAttemptSynchronousHydration(fn) {\n _attemptSynchronousHydration = fn;\n}\nfunction attemptSynchronousHydration(fiber) {\n _attemptSynchronousHydration(fiber);\n}\nvar attemptContinuousHydration;\nfunction setAttemptContinuousHydration(fn) {\n attemptContinuousHydration = fn;\n}\nvar attemptHydrationAtCurrentPriority;\nfunction setAttemptHydrationAtCurrentPriority(fn) {\n attemptHydrationAtCurrentPriority = fn;\n}\nvar getCurrentUpdatePriority$1;\nfunction setGetCurrentUpdatePriority(fn) {\n getCurrentUpdatePriority$1 = fn;\n}\nvar attemptHydrationAtPriority;\nfunction setAttemptHydrationAtPriority(fn) {\n attemptHydrationAtPriority = fn;\n} // TODO: Upgrade this definition once we're on a newer version of Flow that\n// has this definition built-in.\n\nvar hasScheduledReplayAttempt = false; // The queue of discrete events to be replayed.\n\nvar queuedDiscreteEvents = []; // Indicates if any continuous event targets are non-null for early bailout.\n// if the last target was dehydrated.\n\nvar queuedFocus = null;\nvar queuedDrag = null;\nvar queuedMouse = null; // For pointer events there can be one latest event per pointerId.\n\nvar queuedPointers = new Map();\nvar queuedPointerCaptures = new Map(); // We could consider replaying selectionchange and touchmoves too.\n\nvar queuedExplicitHydrationTargets = [];\nvar discreteReplayableEvents = ['mousedown', 'mouseup', 'touchcancel', 'touchend', 'touchstart', 'auxclick', 'dblclick', 'pointercancel', 'pointerdown', 'pointerup', 'dragend', 'dragstart', 'drop', 'compositionend', 'compositionstart', 'keydown', 'keypress', 'keyup', 'input', 'textInput', // Intentionally camelCase\n'copy', 'cut', 'paste', 'click', 'change', 'contextmenu', 'reset', 'submit'];\nfunction isDiscreteEventThatRequiresHydration(eventType) {\n return discreteReplayableEvents.indexOf(eventType) > -1;\n}\n\nfunction createQueuedReplayableEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent) {\n return {\n blockedOn: blockedOn,\n domEventName: domEventName,\n eventSystemFlags: eventSystemFlags,\n nativeEvent: nativeEvent,\n targetContainers: [targetContainer]\n };\n}\n\nfunction clearIfContinuousEvent(domEventName, nativeEvent) {\n switch (domEventName) {\n case 'focusin':\n case 'focusout':\n queuedFocus = null;\n break;\n\n case 'dragenter':\n case 'dragleave':\n queuedDrag = null;\n break;\n\n case 'mouseover':\n case 'mouseout':\n queuedMouse = null;\n break;\n\n case 'pointerover':\n case 'pointerout':\n {\n var pointerId = nativeEvent.pointerId;\n queuedPointers.delete(pointerId);\n break;\n }\n\n case 'gotpointercapture':\n case 'lostpointercapture':\n {\n var _pointerId = nativeEvent.pointerId;\n queuedPointerCaptures.delete(_pointerId);\n break;\n }\n }\n}\n\nfunction accumulateOrCreateContinuousQueuedReplayableEvent(existingQueuedEvent, blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent) {\n if (existingQueuedEvent === null || existingQueuedEvent.nativeEvent !== nativeEvent) {\n var queuedEvent = createQueuedReplayableEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent);\n\n if (blockedOn !== null) {\n var _fiber2 = getInstanceFromNode(blockedOn);\n\n if (_fiber2 !== null) {\n // Attempt to increase the priority of this target.\n attemptContinuousHydration(_fiber2);\n }\n }\n\n return queuedEvent;\n } // If we have already queued this exact event, then it's because\n // the different event systems have different DOM event listeners.\n // We can accumulate the flags, and the targetContainers, and\n // store a single event to be replayed.\n\n\n existingQueuedEvent.eventSystemFlags |= eventSystemFlags;\n var targetContainers = existingQueuedEvent.targetContainers;\n\n if (targetContainer !== null && targetContainers.indexOf(targetContainer) === -1) {\n targetContainers.push(targetContainer);\n }\n\n return existingQueuedEvent;\n}\n\nfunction queueIfContinuousEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent) {\n // These set relatedTarget to null because the replayed event will be treated as if we\n // moved from outside the window (no target) onto the target once it hydrates.\n // Instead of mutating we could clone the event.\n switch (domEventName) {\n case 'focusin':\n {\n var focusEvent = nativeEvent;\n queuedFocus = accumulateOrCreateContinuousQueuedReplayableEvent(queuedFocus, blockedOn, domEventName, eventSystemFlags, targetContainer, focusEvent);\n return true;\n }\n\n case 'dragenter':\n {\n var dragEvent = nativeEvent;\n queuedDrag = accumulateOrCreateContinuousQueuedReplayableEvent(queuedDrag, blockedOn, domEventName, eventSystemFlags, targetContainer, dragEvent);\n return true;\n }\n\n case 'mouseover':\n {\n var mouseEvent = nativeEvent;\n queuedMouse = accumulateOrCreateContinuousQueuedReplayableEvent(queuedMouse, blockedOn, domEventName, eventSystemFlags, targetContainer, mouseEvent);\n return true;\n }\n\n case 'pointerover':\n {\n var pointerEvent = nativeEvent;\n var pointerId = pointerEvent.pointerId;\n queuedPointers.set(pointerId, accumulateOrCreateContinuousQueuedReplayableEvent(queuedPointers.get(pointerId) || null, blockedOn, domEventName, eventSystemFlags, targetContainer, pointerEvent));\n return true;\n }\n\n case 'gotpointercapture':\n {\n var _pointerEvent = nativeEvent;\n var _pointerId2 = _pointerEvent.pointerId;\n queuedPointerCaptures.set(_pointerId2, accumulateOrCreateContinuousQueuedReplayableEvent(queuedPointerCaptures.get(_pointerId2) || null, blockedOn, domEventName, eventSystemFlags, targetContainer, _pointerEvent));\n return true;\n }\n }\n\n return false;\n} // Check if this target is unblocked. Returns true if it's unblocked.\n\nfunction attemptExplicitHydrationTarget(queuedTarget) {\n // TODO: This function shares a lot of logic with findInstanceBlockingEvent.\n // Try to unify them. It's a bit tricky since it would require two return\n // values.\n var targetInst = getClosestInstanceFromNode(queuedTarget.target);\n\n if (targetInst !== null) {\n var nearestMounted = getNearestMountedFiber(targetInst);\n\n if (nearestMounted !== null) {\n var tag = nearestMounted.tag;\n\n if (tag === SuspenseComponent) {\n var instance = getSuspenseInstanceFromFiber(nearestMounted);\n\n if (instance !== null) {\n // We're blocked on hydrating this boundary.\n // Increase its priority.\n queuedTarget.blockedOn = instance;\n attemptHydrationAtPriority(queuedTarget.priority, function () {\n attemptHydrationAtCurrentPriority(nearestMounted);\n });\n return;\n }\n } else if (tag === HostRoot) {\n var root = nearestMounted.stateNode;\n\n if (isRootDehydrated(root)) {\n queuedTarget.blockedOn = getContainerFromFiber(nearestMounted); // We don't currently have a way to increase the priority of\n // a root other than sync.\n\n return;\n }\n }\n }\n }\n\n queuedTarget.blockedOn = null;\n}\n\nfunction queueExplicitHydrationTarget(target) {\n // TODO: This will read the priority if it's dispatched by the React\n // event system but not native events. Should read window.event.type, like\n // we do for updates (getCurrentEventPriority).\n var updatePriority = getCurrentUpdatePriority$1();\n var queuedTarget = {\n blockedOn: null,\n target: target,\n priority: updatePriority\n };\n var i = 0;\n\n for (; i < queuedExplicitHydrationTargets.length; i++) {\n // Stop once we hit the first target with lower priority than\n if (!isHigherEventPriority(updatePriority, queuedExplicitHydrationTargets[i].priority)) {\n break;\n }\n }\n\n queuedExplicitHydrationTargets.splice(i, 0, queuedTarget);\n\n if (i === 0) {\n attemptExplicitHydrationTarget(queuedTarget);\n }\n}\n\nfunction attemptReplayContinuousQueuedEvent(queuedEvent) {\n if (queuedEvent.blockedOn !== null) {\n return false;\n }\n\n var targetContainers = queuedEvent.targetContainers;\n\n while (targetContainers.length > 0) {\n var targetContainer = targetContainers[0];\n var nextBlockedOn = findInstanceBlockingEvent(queuedEvent.domEventName, queuedEvent.eventSystemFlags, targetContainer, queuedEvent.nativeEvent);\n\n if (nextBlockedOn === null) {\n {\n var nativeEvent = queuedEvent.nativeEvent;\n var nativeEventClone = new nativeEvent.constructor(nativeEvent.type, nativeEvent);\n setReplayingEvent(nativeEventClone);\n nativeEvent.target.dispatchEvent(nativeEventClone);\n resetReplayingEvent();\n }\n } else {\n // We're still blocked. Try again later.\n var _fiber3 = getInstanceFromNode(nextBlockedOn);\n\n if (_fiber3 !== null) {\n attemptContinuousHydration(_fiber3);\n }\n\n queuedEvent.blockedOn = nextBlockedOn;\n return false;\n } // This target container was successfully dispatched. Try the next.\n\n\n targetContainers.shift();\n }\n\n return true;\n}\n\nfunction attemptReplayContinuousQueuedEventInMap(queuedEvent, key, map) {\n if (attemptReplayContinuousQueuedEvent(queuedEvent)) {\n map.delete(key);\n }\n}\n\nfunction replayUnblockedEvents() {\n hasScheduledReplayAttempt = false;\n\n\n if (queuedFocus !== null && attemptReplayContinuousQueuedEvent(queuedFocus)) {\n queuedFocus = null;\n }\n\n if (queuedDrag !== null && attemptReplayContinuousQueuedEvent(queuedDrag)) {\n queuedDrag = null;\n }\n\n if (queuedMouse !== null && attemptReplayContinuousQueuedEvent(queuedMouse)) {\n queuedMouse = null;\n }\n\n queuedPointers.forEach(attemptReplayContinuousQueuedEventInMap);\n queuedPointerCaptures.forEach(attemptReplayContinuousQueuedEventInMap);\n}\n\nfunction scheduleCallbackIfUnblocked(queuedEvent, unblocked) {\n if (queuedEvent.blockedOn === unblocked) {\n queuedEvent.blockedOn = null;\n\n if (!hasScheduledReplayAttempt) {\n hasScheduledReplayAttempt = true; // Schedule a callback to attempt replaying as many events as are\n // now unblocked. This first might not actually be unblocked yet.\n // We could check it early to avoid scheduling an unnecessary callback.\n\n Scheduler.unstable_scheduleCallback(Scheduler.unstable_NormalPriority, replayUnblockedEvents);\n }\n }\n}\n\nfunction retryIfBlockedOn(unblocked) {\n // Mark anything that was blocked on this as no longer blocked\n // and eligible for a replay.\n if (queuedDiscreteEvents.length > 0) {\n scheduleCallbackIfUnblocked(queuedDiscreteEvents[0], unblocked); // This is a exponential search for each boundary that commits. I think it's\n // worth it because we expect very few discrete events to queue up and once\n // we are actually fully unblocked it will be fast to replay them.\n\n for (var i = 1; i < queuedDiscreteEvents.length; i++) {\n var queuedEvent = queuedDiscreteEvents[i];\n\n if (queuedEvent.blockedOn === unblocked) {\n queuedEvent.blockedOn = null;\n }\n }\n }\n\n if (queuedFocus !== null) {\n scheduleCallbackIfUnblocked(queuedFocus, unblocked);\n }\n\n if (queuedDrag !== null) {\n scheduleCallbackIfUnblocked(queuedDrag, unblocked);\n }\n\n if (queuedMouse !== null) {\n scheduleCallbackIfUnblocked(queuedMouse, unblocked);\n }\n\n var unblock = function (queuedEvent) {\n return scheduleCallbackIfUnblocked(queuedEvent, unblocked);\n };\n\n queuedPointers.forEach(unblock);\n queuedPointerCaptures.forEach(unblock);\n\n for (var _i = 0; _i < queuedExplicitHydrationTargets.length; _i++) {\n var queuedTarget = queuedExplicitHydrationTargets[_i];\n\n if (queuedTarget.blockedOn === unblocked) {\n queuedTarget.blockedOn = null;\n }\n }\n\n while (queuedExplicitHydrationTargets.length > 0) {\n var nextExplicitTarget = queuedExplicitHydrationTargets[0];\n\n if (nextExplicitTarget.blockedOn !== null) {\n // We're still blocked.\n break;\n } else {\n attemptExplicitHydrationTarget(nextExplicitTarget);\n\n if (nextExplicitTarget.blockedOn === null) {\n // We're unblocked.\n queuedExplicitHydrationTargets.shift();\n }\n }\n }\n}\n\nvar ReactCurrentBatchConfig = ReactSharedInternals.ReactCurrentBatchConfig; // TODO: can we stop exporting these?\n\nvar _enabled = true; // This is exported in FB builds for use by legacy FB layer infra.\n// We'd like to remove this but it's not clear if this is safe.\n\nfunction setEnabled(enabled) {\n _enabled = !!enabled;\n}\nfunction isEnabled() {\n return _enabled;\n}\nfunction createEventListenerWrapperWithPriority(targetContainer, domEventName, eventSystemFlags) {\n var eventPriority = getEventPriority(domEventName);\n var listenerWrapper;\n\n switch (eventPriority) {\n case DiscreteEventPriority:\n listenerWrapper = dispatchDiscreteEvent;\n break;\n\n case ContinuousEventPriority:\n listenerWrapper = dispatchContinuousEvent;\n break;\n\n case DefaultEventPriority:\n default:\n listenerWrapper = dispatchEvent;\n break;\n }\n\n return listenerWrapper.bind(null, domEventName, eventSystemFlags, targetContainer);\n}\n\nfunction dispatchDiscreteEvent(domEventName, eventSystemFlags, container, nativeEvent) {\n var previousPriority = getCurrentUpdatePriority();\n var prevTransition = ReactCurrentBatchConfig.transition;\n ReactCurrentBatchConfig.transition = null;\n\n try {\n setCurrentUpdatePriority(DiscreteEventPriority);\n dispatchEvent(domEventName, eventSystemFlags, container, nativeEvent);\n } finally {\n setCurrentUpdatePriority(previousPriority);\n ReactCurrentBatchConfig.transition = prevTransition;\n }\n}\n\nfunction dispatchContinuousEvent(domEventName, eventSystemFlags, container, nativeEvent) {\n var previousPriority = getCurrentUpdatePriority();\n var prevTransition = ReactCurrentBatchConfig.transition;\n ReactCurrentBatchConfig.transition = null;\n\n try {\n setCurrentUpdatePriority(ContinuousEventPriority);\n dispatchEvent(domEventName, eventSystemFlags, container, nativeEvent);\n } finally {\n setCurrentUpdatePriority(previousPriority);\n ReactCurrentBatchConfig.transition = prevTransition;\n }\n}\n\nfunction dispatchEvent(domEventName, eventSystemFlags, targetContainer, nativeEvent) {\n if (!_enabled) {\n return;\n }\n\n {\n dispatchEventWithEnableCapturePhaseSelectiveHydrationWithoutDiscreteEventReplay(domEventName, eventSystemFlags, targetContainer, nativeEvent);\n }\n}\n\nfunction dispatchEventWithEnableCapturePhaseSelectiveHydrationWithoutDiscreteEventReplay(domEventName, eventSystemFlags, targetContainer, nativeEvent) {\n var blockedOn = findInstanceBlockingEvent(domEventName, eventSystemFlags, targetContainer, nativeEvent);\n\n if (blockedOn === null) {\n dispatchEventForPluginEventSystem(domEventName, eventSystemFlags, nativeEvent, return_targetInst, targetContainer);\n clearIfContinuousEvent(domEventName, nativeEvent);\n return;\n }\n\n if (queueIfContinuousEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent)) {\n nativeEvent.stopPropagation();\n return;\n } // We need to clear only if we didn't queue because\n // queueing is accumulative.\n\n\n clearIfContinuousEvent(domEventName, nativeEvent);\n\n if (eventSystemFlags & IS_CAPTURE_PHASE && isDiscreteEventThatRequiresHydration(domEventName)) {\n while (blockedOn !== null) {\n var fiber = getInstanceFromNode(blockedOn);\n\n if (fiber !== null) {\n attemptSynchronousHydration(fiber);\n }\n\n var nextBlockedOn = findInstanceBlockingEvent(domEventName, eventSystemFlags, targetContainer, nativeEvent);\n\n if (nextBlockedOn === null) {\n dispatchEventForPluginEventSystem(domEventName, eventSystemFlags, nativeEvent, return_targetInst, targetContainer);\n }\n\n if (nextBlockedOn === blockedOn) {\n break;\n }\n\n blockedOn = nextBlockedOn;\n }\n\n if (blockedOn !== null) {\n nativeEvent.stopPropagation();\n }\n\n return;\n } // This is not replayable so we'll invoke it but without a target,\n // in case the event system needs to trace it.\n\n\n dispatchEventForPluginEventSystem(domEventName, eventSystemFlags, nativeEvent, null, targetContainer);\n}\n\nvar return_targetInst = null; // Returns a SuspenseInstance or Container if it's blocked.\n// The return_targetInst field above is conceptually part of the return value.\n\nfunction findInstanceBlockingEvent(domEventName, eventSystemFlags, targetContainer, nativeEvent) {\n // TODO: Warn if _enabled is false.\n return_targetInst = null;\n var nativeEventTarget = getEventTarget(nativeEvent);\n var targetInst = getClosestInstanceFromNode(nativeEventTarget);\n\n if (targetInst !== null) {\n var nearestMounted = getNearestMountedFiber(targetInst);\n\n if (nearestMounted === null) {\n // This tree has been unmounted already. Dispatch without a target.\n targetInst = null;\n } else {\n var tag = nearestMounted.tag;\n\n if (tag === SuspenseComponent) {\n var instance = getSuspenseInstanceFromFiber(nearestMounted);\n\n if (instance !== null) {\n // Queue the event to be replayed later. Abort dispatching since we\n // don't want this event dispatched twice through the event system.\n // TODO: If this is the first discrete event in the queue. Schedule an increased\n // priority for this boundary.\n return instance;\n } // This shouldn't happen, something went wrong but to avoid blocking\n // the whole system, dispatch the event without a target.\n // TODO: Warn.\n\n\n targetInst = null;\n } else if (tag === HostRoot) {\n var root = nearestMounted.stateNode;\n\n if (isRootDehydrated(root)) {\n // If this happens during a replay something went wrong and it might block\n // the whole system.\n return getContainerFromFiber(nearestMounted);\n }\n\n targetInst = null;\n } else if (nearestMounted !== targetInst) {\n // If we get an event (ex: img onload) before committing that\n // component's mount, ignore it for now (that is, treat it as if it was an\n // event on a non-React tree). We might also consider queueing events and\n // dispatching them after the mount.\n targetInst = null;\n }\n }\n }\n\n return_targetInst = targetInst; // We're not blocked on anything.\n\n return null;\n}\nfunction getEventPriority(domEventName) {\n switch (domEventName) {\n // Used by SimpleEventPlugin:\n case 'cancel':\n case 'click':\n case 'close':\n case 'contextmenu':\n case 'copy':\n case 'cut':\n case 'auxclick':\n case 'dblclick':\n case 'dragend':\n case 'dragstart':\n case 'drop':\n case 'focusin':\n case 'focusout':\n case 'input':\n case 'invalid':\n case 'keydown':\n case 'keypress':\n case 'keyup':\n case 'mousedown':\n case 'mouseup':\n case 'paste':\n case 'pause':\n case 'play':\n case 'pointercancel':\n case 'pointerdown':\n case 'pointerup':\n case 'ratechange':\n case 'reset':\n case 'resize':\n case 'seeked':\n case 'submit':\n case 'touchcancel':\n case 'touchend':\n case 'touchstart':\n case 'volumechange': // Used by polyfills:\n // eslint-disable-next-line no-fallthrough\n\n case 'change':\n case 'selectionchange':\n case 'textInput':\n case 'compositionstart':\n case 'compositionend':\n case 'compositionupdate': // Only enableCreateEventHandleAPI:\n // eslint-disable-next-line no-fallthrough\n\n case 'beforeblur':\n case 'afterblur': // Not used by React but could be by user code:\n // eslint-disable-next-line no-fallthrough\n\n case 'beforeinput':\n case 'blur':\n case 'fullscreenchange':\n case 'focus':\n case 'hashchange':\n case 'popstate':\n case 'select':\n case 'selectstart':\n return DiscreteEventPriority;\n\n case 'drag':\n case 'dragenter':\n case 'dragexit':\n case 'dragleave':\n case 'dragover':\n case 'mousemove':\n case 'mouseout':\n case 'mouseover':\n case 'pointermove':\n case 'pointerout':\n case 'pointerover':\n case 'scroll':\n case 'toggle':\n case 'touchmove':\n case 'wheel': // Not used by React but could be by user code:\n // eslint-disable-next-line no-fallthrough\n\n case 'mouseenter':\n case 'mouseleave':\n case 'pointerenter':\n case 'pointerleave':\n return ContinuousEventPriority;\n\n case 'message':\n {\n // We might be in the Scheduler callback.\n // Eventually this mechanism will be replaced by a check\n // of the current priority on the native scheduler.\n var schedulerPriority = getCurrentPriorityLevel();\n\n switch (schedulerPriority) {\n case ImmediatePriority:\n return DiscreteEventPriority;\n\n case UserBlockingPriority:\n return ContinuousEventPriority;\n\n case NormalPriority:\n case LowPriority:\n // TODO: Handle LowSchedulerPriority, somehow. Maybe the same lane as hydration.\n return DefaultEventPriority;\n\n case IdlePriority:\n return IdleEventPriority;\n\n default:\n return DefaultEventPriority;\n }\n }\n\n default:\n return DefaultEventPriority;\n }\n}\n\nfunction addEventBubbleListener(target, eventType, listener) {\n target.addEventListener(eventType, listener, false);\n return listener;\n}\nfunction addEventCaptureListener(target, eventType, listener) {\n target.addEventListener(eventType, listener, true);\n return listener;\n}\nfunction addEventCaptureListenerWithPassiveFlag(target, eventType, listener, passive) {\n target.addEventListener(eventType, listener, {\n capture: true,\n passive: passive\n });\n return listener;\n}\nfunction addEventBubbleListenerWithPassiveFlag(target, eventType, listener, passive) {\n target.addEventListener(eventType, listener, {\n passive: passive\n });\n return listener;\n}\n\n/**\n * These variables store information about text content of a target node,\n * allowing comparison of content before and after a given event.\n *\n * Identify the node where selection currently begins, then observe\n * both its text content and its current position in the DOM. Since the\n * browser may natively replace the target node during composition, we can\n * use its position to find its replacement.\n *\n *\n */\nvar root = null;\nvar startText = null;\nvar fallbackText = null;\nfunction initialize(nativeEventTarget) {\n root = nativeEventTarget;\n startText = getText();\n return true;\n}\nfunction reset() {\n root = null;\n startText = null;\n fallbackText = null;\n}\nfunction getData() {\n if (fallbackText) {\n return fallbackText;\n }\n\n var start;\n var startValue = startText;\n var startLength = startValue.length;\n var end;\n var endValue = getText();\n var endLength = endValue.length;\n\n for (start = 0; start < startLength; start++) {\n if (startValue[start] !== endValue[start]) {\n break;\n }\n }\n\n var minEnd = startLength - start;\n\n for (end = 1; end <= minEnd; end++) {\n if (startValue[startLength - end] !== endValue[endLength - end]) {\n break;\n }\n }\n\n var sliceTail = end > 1 ? 1 - end : undefined;\n fallbackText = endValue.slice(start, sliceTail);\n return fallbackText;\n}\nfunction getText() {\n if ('value' in root) {\n return root.value;\n }\n\n return root.textContent;\n}\n\n/**\n * `charCode` represents the actual \"character code\" and is safe to use with\n * `String.fromCharCode`. As such, only keys that correspond to printable\n * characters produce a valid `charCode`, the only exception to this is Enter.\n * The Tab-key is considered non-printable and does not have a `charCode`,\n * presumably because it does not produce a tab-character in browsers.\n *\n * @param {object} nativeEvent Native browser event.\n * @return {number} Normalized `charCode` property.\n */\nfunction getEventCharCode(nativeEvent) {\n var charCode;\n var keyCode = nativeEvent.keyCode;\n\n if ('charCode' in nativeEvent) {\n charCode = nativeEvent.charCode; // FF does not set `charCode` for the Enter-key, check against `keyCode`.\n\n if (charCode === 0 && keyCode === 13) {\n charCode = 13;\n }\n } else {\n // IE8 does not implement `charCode`, but `keyCode` has the correct value.\n charCode = keyCode;\n } // IE and Edge (on Windows) and Chrome / Safari (on Windows and Linux)\n // report Enter as charCode 10 when ctrl is pressed.\n\n\n if (charCode === 10) {\n charCode = 13;\n } // Some non-printable keys are reported in `charCode`/`keyCode`, discard them.\n // Must not discard the (non-)printable Enter-key.\n\n\n if (charCode >= 32 || charCode === 13) {\n return charCode;\n }\n\n return 0;\n}\n\nfunction functionThatReturnsTrue() {\n return true;\n}\n\nfunction functionThatReturnsFalse() {\n return false;\n} // This is intentionally a factory so that we have different returned constructors.\n// If we had a single constructor, it would be megamorphic and engines would deopt.\n\n\nfunction createSyntheticEvent(Interface) {\n /**\n * Synthetic events are dispatched by event plugins, typically in response to a\n * top-level event delegation handler.\n *\n * These systems should generally use pooling to reduce the frequency of garbage\n * collection. The system should check `isPersistent` to determine whether the\n * event should be released into the pool after being dispatched. Users that\n * need a persisted event should invoke `persist`.\n *\n * Synthetic events (and subclasses) implement the DOM Level 3 Events API by\n * normalizing browser quirks. Subclasses do not necessarily have to implement a\n * DOM interface; custom application-specific events can also subclass this.\n */\n function SyntheticBaseEvent(reactName, reactEventType, targetInst, nativeEvent, nativeEventTarget) {\n this._reactName = reactName;\n this._targetInst = targetInst;\n this.type = reactEventType;\n this.nativeEvent = nativeEvent;\n this.target = nativeEventTarget;\n this.currentTarget = null;\n\n for (var _propName in Interface) {\n if (!Interface.hasOwnProperty(_propName)) {\n continue;\n }\n\n var normalize = Interface[_propName];\n\n if (normalize) {\n this[_propName] = normalize(nativeEvent);\n } else {\n this[_propName] = nativeEvent[_propName];\n }\n }\n\n var defaultPrevented = nativeEvent.defaultPrevented != null ? nativeEvent.defaultPrevented : nativeEvent.returnValue === false;\n\n if (defaultPrevented) {\n this.isDefaultPrevented = functionThatReturnsTrue;\n } else {\n this.isDefaultPrevented = functionThatReturnsFalse;\n }\n\n this.isPropagationStopped = functionThatReturnsFalse;\n return this;\n }\n\n assign(SyntheticBaseEvent.prototype, {\n preventDefault: function () {\n this.defaultPrevented = true;\n var event = this.nativeEvent;\n\n if (!event) {\n return;\n }\n\n if (event.preventDefault) {\n event.preventDefault(); // $FlowFixMe - flow is not aware of `unknown` in IE\n } else if (typeof event.returnValue !== 'unknown') {\n event.returnValue = false;\n }\n\n this.isDefaultPrevented = functionThatReturnsTrue;\n },\n stopPropagation: function () {\n var event = this.nativeEvent;\n\n if (!event) {\n return;\n }\n\n if (event.stopPropagation) {\n event.stopPropagation(); // $FlowFixMe - flow is not aware of `unknown` in IE\n } else if (typeof event.cancelBubble !== 'unknown') {\n // The ChangeEventPlugin registers a \"propertychange\" event for\n // IE. This event does not support bubbling or cancelling, and\n // any references to cancelBubble throw \"Member not found\". A\n // typeof check of \"unknown\" circumvents this issue (and is also\n // IE specific).\n event.cancelBubble = true;\n }\n\n this.isPropagationStopped = functionThatReturnsTrue;\n },\n\n /**\n * We release all dispatched `SyntheticEvent`s after each event loop, adding\n * them back into the pool. This allows a way to hold onto a reference that\n * won't be added back into the pool.\n */\n persist: function () {// Modern event system doesn't use pooling.\n },\n\n /**\n * Checks if this event should be released back into the pool.\n *\n * @return {boolean} True if this should not be released, false otherwise.\n */\n isPersistent: functionThatReturnsTrue\n });\n return SyntheticBaseEvent;\n}\n/**\n * @interface Event\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\n\n\nvar EventInterface = {\n eventPhase: 0,\n bubbles: 0,\n cancelable: 0,\n timeStamp: function (event) {\n return event.timeStamp || Date.now();\n },\n defaultPrevented: 0,\n isTrusted: 0\n};\nvar SyntheticEvent = createSyntheticEvent(EventInterface);\n\nvar UIEventInterface = assign({}, EventInterface, {\n view: 0,\n detail: 0\n});\n\nvar SyntheticUIEvent = createSyntheticEvent(UIEventInterface);\nvar lastMovementX;\nvar lastMovementY;\nvar lastMouseEvent;\n\nfunction updateMouseMovementPolyfillState(event) {\n if (event !== lastMouseEvent) {\n if (lastMouseEvent && event.type === 'mousemove') {\n lastMovementX = event.screenX - lastMouseEvent.screenX;\n lastMovementY = event.screenY - lastMouseEvent.screenY;\n } else {\n lastMovementX = 0;\n lastMovementY = 0;\n }\n\n lastMouseEvent = event;\n }\n}\n/**\n * @interface MouseEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\n\n\nvar MouseEventInterface = assign({}, UIEventInterface, {\n screenX: 0,\n screenY: 0,\n clientX: 0,\n clientY: 0,\n pageX: 0,\n pageY: 0,\n ctrlKey: 0,\n shiftKey: 0,\n altKey: 0,\n metaKey: 0,\n getModifierState: getEventModifierState,\n button: 0,\n buttons: 0,\n relatedTarget: function (event) {\n if (event.relatedTarget === undefined) return event.fromElement === event.srcElement ? event.toElement : event.fromElement;\n return event.relatedTarget;\n },\n movementX: function (event) {\n if ('movementX' in event) {\n return event.movementX;\n }\n\n updateMouseMovementPolyfillState(event);\n return lastMovementX;\n },\n movementY: function (event) {\n if ('movementY' in event) {\n return event.movementY;\n } // Don't need to call updateMouseMovementPolyfillState() here\n // because it's guaranteed to have already run when movementX\n // was copied.\n\n\n return lastMovementY;\n }\n});\n\nvar SyntheticMouseEvent = createSyntheticEvent(MouseEventInterface);\n/**\n * @interface DragEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\n\nvar DragEventInterface = assign({}, MouseEventInterface, {\n dataTransfer: 0\n});\n\nvar SyntheticDragEvent = createSyntheticEvent(DragEventInterface);\n/**\n * @interface FocusEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\n\nvar FocusEventInterface = assign({}, UIEventInterface, {\n relatedTarget: 0\n});\n\nvar SyntheticFocusEvent = createSyntheticEvent(FocusEventInterface);\n/**\n * @interface Event\n * @see http://www.w3.org/TR/css3-animations/#AnimationEvent-interface\n * @see https://developer.mozilla.org/en-US/docs/Web/API/AnimationEvent\n */\n\nvar AnimationEventInterface = assign({}, EventInterface, {\n animationName: 0,\n elapsedTime: 0,\n pseudoElement: 0\n});\n\nvar SyntheticAnimationEvent = createSyntheticEvent(AnimationEventInterface);\n/**\n * @interface Event\n * @see http://www.w3.org/TR/clipboard-apis/\n */\n\nvar ClipboardEventInterface = assign({}, EventInterface, {\n clipboardData: function (event) {\n return 'clipboardData' in event ? event.clipboardData : window.clipboardData;\n }\n});\n\nvar SyntheticClipboardEvent = createSyntheticEvent(ClipboardEventInterface);\n/**\n * @interface Event\n * @see http://www.w3.org/TR/DOM-Level-3-Events/#events-compositionevents\n */\n\nvar CompositionEventInterface = assign({}, EventInterface, {\n data: 0\n});\n\nvar SyntheticCompositionEvent = createSyntheticEvent(CompositionEventInterface);\n/**\n * @interface Event\n * @see http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105\n * /#events-inputevents\n */\n// Happens to share the same list for now.\n\nvar SyntheticInputEvent = SyntheticCompositionEvent;\n/**\n * Normalization of deprecated HTML5 `key` values\n * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names\n */\n\nvar normalizeKey = {\n Esc: 'Escape',\n Spacebar: ' ',\n Left: 'ArrowLeft',\n Up: 'ArrowUp',\n Right: 'ArrowRight',\n Down: 'ArrowDown',\n Del: 'Delete',\n Win: 'OS',\n Menu: 'ContextMenu',\n Apps: 'ContextMenu',\n Scroll: 'ScrollLock',\n MozPrintableKey: 'Unidentified'\n};\n/**\n * Translation from legacy `keyCode` to HTML5 `key`\n * Only special keys supported, all others depend on keyboard layout or browser\n * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names\n */\n\nvar translateToKey = {\n '8': 'Backspace',\n '9': 'Tab',\n '12': 'Clear',\n '13': 'Enter',\n '16': 'Shift',\n '17': 'Control',\n '18': 'Alt',\n '19': 'Pause',\n '20': 'CapsLock',\n '27': 'Escape',\n '32': ' ',\n '33': 'PageUp',\n '34': 'PageDown',\n '35': 'End',\n '36': 'Home',\n '37': 'ArrowLeft',\n '38': 'ArrowUp',\n '39': 'ArrowRight',\n '40': 'ArrowDown',\n '45': 'Insert',\n '46': 'Delete',\n '112': 'F1',\n '113': 'F2',\n '114': 'F3',\n '115': 'F4',\n '116': 'F5',\n '117': 'F6',\n '118': 'F7',\n '119': 'F8',\n '120': 'F9',\n '121': 'F10',\n '122': 'F11',\n '123': 'F12',\n '144': 'NumLock',\n '145': 'ScrollLock',\n '224': 'Meta'\n};\n/**\n * @param {object} nativeEvent Native browser event.\n * @return {string} Normalized `key` property.\n */\n\nfunction getEventKey(nativeEvent) {\n if (nativeEvent.key) {\n // Normalize inconsistent values reported by browsers due to\n // implementations of a working draft specification.\n // FireFox implements `key` but returns `MozPrintableKey` for all\n // printable characters (normalized to `Unidentified`), ignore it.\n var key = normalizeKey[nativeEvent.key] || nativeEvent.key;\n\n if (key !== 'Unidentified') {\n return key;\n }\n } // Browser does not implement `key`, polyfill as much of it as we can.\n\n\n if (nativeEvent.type === 'keypress') {\n var charCode = getEventCharCode(nativeEvent); // The enter-key is technically both printable and non-printable and can\n // thus be captured by `keypress`, no other non-printable key should.\n\n return charCode === 13 ? 'Enter' : String.fromCharCode(charCode);\n }\n\n if (nativeEvent.type === 'keydown' || nativeEvent.type === 'keyup') {\n // While user keyboard layout determines the actual meaning of each\n // `keyCode` value, almost all function keys have a universal value.\n return translateToKey[nativeEvent.keyCode] || 'Unidentified';\n }\n\n return '';\n}\n/**\n * Translation from modifier key to the associated property in the event.\n * @see http://www.w3.org/TR/DOM-Level-3-Events/#keys-Modifiers\n */\n\n\nvar modifierKeyToProp = {\n Alt: 'altKey',\n Control: 'ctrlKey',\n Meta: 'metaKey',\n Shift: 'shiftKey'\n}; // Older browsers (Safari <= 10, iOS Safari <= 10.2) do not support\n// getModifierState. If getModifierState is not supported, we map it to a set of\n// modifier keys exposed by the event. In this case, Lock-keys are not supported.\n\nfunction modifierStateGetter(keyArg) {\n var syntheticEvent = this;\n var nativeEvent = syntheticEvent.nativeEvent;\n\n if (nativeEvent.getModifierState) {\n return nativeEvent.getModifierState(keyArg);\n }\n\n var keyProp = modifierKeyToProp[keyArg];\n return keyProp ? !!nativeEvent[keyProp] : false;\n}\n\nfunction getEventModifierState(nativeEvent) {\n return modifierStateGetter;\n}\n/**\n * @interface KeyboardEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\n\n\nvar KeyboardEventInterface = assign({}, UIEventInterface, {\n key: getEventKey,\n code: 0,\n location: 0,\n ctrlKey: 0,\n shiftKey: 0,\n altKey: 0,\n metaKey: 0,\n repeat: 0,\n locale: 0,\n getModifierState: getEventModifierState,\n // Legacy Interface\n charCode: function (event) {\n // `charCode` is the result of a KeyPress event and represents the value of\n // the actual printable character.\n // KeyPress is deprecated, but its replacement is not yet final and not\n // implemented in any major browser. Only KeyPress has charCode.\n if (event.type === 'keypress') {\n return getEventCharCode(event);\n }\n\n return 0;\n },\n keyCode: function (event) {\n // `keyCode` is the result of a KeyDown/Up event and represents the value of\n // physical keyboard key.\n // The actual meaning of the value depends on the users' keyboard layout\n // which cannot be detected. Assuming that it is a US keyboard layout\n // provides a surprisingly accurate mapping for US and European users.\n // Due to this, it is left to the user to implement at this time.\n if (event.type === 'keydown' || event.type === 'keyup') {\n return event.keyCode;\n }\n\n return 0;\n },\n which: function (event) {\n // `which` is an alias for either `keyCode` or `charCode` depending on the\n // type of the event.\n if (event.type === 'keypress') {\n return getEventCharCode(event);\n }\n\n if (event.type === 'keydown' || event.type === 'keyup') {\n return event.keyCode;\n }\n\n return 0;\n }\n});\n\nvar SyntheticKeyboardEvent = createSyntheticEvent(KeyboardEventInterface);\n/**\n * @interface PointerEvent\n * @see http://www.w3.org/TR/pointerevents/\n */\n\nvar PointerEventInterface = assign({}, MouseEventInterface, {\n pointerId: 0,\n width: 0,\n height: 0,\n pressure: 0,\n tangentialPressure: 0,\n tiltX: 0,\n tiltY: 0,\n twist: 0,\n pointerType: 0,\n isPrimary: 0\n});\n\nvar SyntheticPointerEvent = createSyntheticEvent(PointerEventInterface);\n/**\n * @interface TouchEvent\n * @see http://www.w3.org/TR/touch-events/\n */\n\nvar TouchEventInterface = assign({}, UIEventInterface, {\n touches: 0,\n targetTouches: 0,\n changedTouches: 0,\n altKey: 0,\n metaKey: 0,\n ctrlKey: 0,\n shiftKey: 0,\n getModifierState: getEventModifierState\n});\n\nvar SyntheticTouchEvent = createSyntheticEvent(TouchEventInterface);\n/**\n * @interface Event\n * @see http://www.w3.org/TR/2009/WD-css3-transitions-20090320/#transition-events-\n * @see https://developer.mozilla.org/en-US/docs/Web/API/TransitionEvent\n */\n\nvar TransitionEventInterface = assign({}, EventInterface, {\n propertyName: 0,\n elapsedTime: 0,\n pseudoElement: 0\n});\n\nvar SyntheticTransitionEvent = createSyntheticEvent(TransitionEventInterface);\n/**\n * @interface WheelEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\n\nvar WheelEventInterface = assign({}, MouseEventInterface, {\n deltaX: function (event) {\n return 'deltaX' in event ? event.deltaX : // Fallback to `wheelDeltaX` for Webkit and normalize (right is positive).\n 'wheelDeltaX' in event ? -event.wheelDeltaX : 0;\n },\n deltaY: function (event) {\n return 'deltaY' in event ? event.deltaY : // Fallback to `wheelDeltaY` for Webkit and normalize (down is positive).\n 'wheelDeltaY' in event ? -event.wheelDeltaY : // Fallback to `wheelDelta` for IE<9 and normalize (down is positive).\n 'wheelDelta' in event ? -event.wheelDelta : 0;\n },\n deltaZ: 0,\n // Browsers without \"deltaMode\" is reporting in raw wheel delta where one\n // notch on the scroll is always +/- 120, roughly equivalent to pixels.\n // A good approximation of DOM_DELTA_LINE (1) is 5% of viewport size or\n // ~40 pixels, for DOM_DELTA_SCREEN (2) it is 87.5% of viewport size.\n deltaMode: 0\n});\n\nvar SyntheticWheelEvent = createSyntheticEvent(WheelEventInterface);\n\nvar END_KEYCODES = [9, 13, 27, 32]; // Tab, Return, Esc, Space\n\nvar START_KEYCODE = 229;\nvar canUseCompositionEvent = canUseDOM && 'CompositionEvent' in window;\nvar documentMode = null;\n\nif (canUseDOM && 'documentMode' in document) {\n documentMode = document.documentMode;\n} // Webkit offers a very useful `textInput` event that can be used to\n// directly represent `beforeInput`. The IE `textinput` event is not as\n// useful, so we don't use it.\n\n\nvar canUseTextInputEvent = canUseDOM && 'TextEvent' in window && !documentMode; // In IE9+, we have access to composition events, but the data supplied\n// by the native compositionend event may be incorrect. Japanese ideographic\n// spaces, for instance (\\u3000) are not recorded correctly.\n\nvar useFallbackCompositionData = canUseDOM && (!canUseCompositionEvent || documentMode && documentMode > 8 && documentMode <= 11);\nvar SPACEBAR_CODE = 32;\nvar SPACEBAR_CHAR = String.fromCharCode(SPACEBAR_CODE);\n\nfunction registerEvents() {\n registerTwoPhaseEvent('onBeforeInput', ['compositionend', 'keypress', 'textInput', 'paste']);\n registerTwoPhaseEvent('onCompositionEnd', ['compositionend', 'focusout', 'keydown', 'keypress', 'keyup', 'mousedown']);\n registerTwoPhaseEvent('onCompositionStart', ['compositionstart', 'focusout', 'keydown', 'keypress', 'keyup', 'mousedown']);\n registerTwoPhaseEvent('onCompositionUpdate', ['compositionupdate', 'focusout', 'keydown', 'keypress', 'keyup', 'mousedown']);\n} // Track whether we've ever handled a keypress on the space key.\n\n\nvar hasSpaceKeypress = false;\n/**\n * Return whether a native keypress event is assumed to be a command.\n * This is required because Firefox fires `keypress` events for key commands\n * (cut, copy, select-all, etc.) even though no character is inserted.\n */\n\nfunction isKeypressCommand(nativeEvent) {\n return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) && // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n !(nativeEvent.ctrlKey && nativeEvent.altKey);\n}\n/**\n * Translate native top level events into event types.\n */\n\n\nfunction getCompositionEventType(domEventName) {\n switch (domEventName) {\n case 'compositionstart':\n return 'onCompositionStart';\n\n case 'compositionend':\n return 'onCompositionEnd';\n\n case 'compositionupdate':\n return 'onCompositionUpdate';\n }\n}\n/**\n * Does our fallback best-guess model think this event signifies that\n * composition has begun?\n */\n\n\nfunction isFallbackCompositionStart(domEventName, nativeEvent) {\n return domEventName === 'keydown' && nativeEvent.keyCode === START_KEYCODE;\n}\n/**\n * Does our fallback mode think that this event is the end of composition?\n */\n\n\nfunction isFallbackCompositionEnd(domEventName, nativeEvent) {\n switch (domEventName) {\n case 'keyup':\n // Command keys insert or clear IME input.\n return END_KEYCODES.indexOf(nativeEvent.keyCode) !== -1;\n\n case 'keydown':\n // Expect IME keyCode on each keydown. If we get any other\n // code we must have exited earlier.\n return nativeEvent.keyCode !== START_KEYCODE;\n\n case 'keypress':\n case 'mousedown':\n case 'focusout':\n // Events are not possible without cancelling IME.\n return true;\n\n default:\n return false;\n }\n}\n/**\n * Google Input Tools provides composition data via a CustomEvent,\n * with the `data` property populated in the `detail` object. If this\n * is available on the event object, use it. If not, this is a plain\n * composition event and we have nothing special to extract.\n *\n * @param {object} nativeEvent\n * @return {?string}\n */\n\n\nfunction getDataFromCustomEvent(nativeEvent) {\n var detail = nativeEvent.detail;\n\n if (typeof detail === 'object' && 'data' in detail) {\n return detail.data;\n }\n\n return null;\n}\n/**\n * Check if a composition event was triggered by Korean IME.\n * Our fallback mode does not work well with IE's Korean IME,\n * so just use native composition events when Korean IME is used.\n * Although CompositionEvent.locale property is deprecated,\n * it is available in IE, where our fallback mode is enabled.\n *\n * @param {object} nativeEvent\n * @return {boolean}\n */\n\n\nfunction isUsingKoreanIME(nativeEvent) {\n return nativeEvent.locale === 'ko';\n} // Track the current IME composition status, if any.\n\n\nvar isComposing = false;\n/**\n * @return {?object} A SyntheticCompositionEvent.\n */\n\nfunction extractCompositionEvent(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget) {\n var eventType;\n var fallbackData;\n\n if (canUseCompositionEvent) {\n eventType = getCompositionEventType(domEventName);\n } else if (!isComposing) {\n if (isFallbackCompositionStart(domEventName, nativeEvent)) {\n eventType = 'onCompositionStart';\n }\n } else if (isFallbackCompositionEnd(domEventName, nativeEvent)) {\n eventType = 'onCompositionEnd';\n }\n\n if (!eventType) {\n return null;\n }\n\n if (useFallbackCompositionData && !isUsingKoreanIME(nativeEvent)) {\n // The current composition is stored statically and must not be\n // overwritten while composition continues.\n if (!isComposing && eventType === 'onCompositionStart') {\n isComposing = initialize(nativeEventTarget);\n } else if (eventType === 'onCompositionEnd') {\n if (isComposing) {\n fallbackData = getData();\n }\n }\n }\n\n var listeners = accumulateTwoPhaseListeners(targetInst, eventType);\n\n if (listeners.length > 0) {\n var event = new SyntheticCompositionEvent(eventType, domEventName, null, nativeEvent, nativeEventTarget);\n dispatchQueue.push({\n event: event,\n listeners: listeners\n });\n\n if (fallbackData) {\n // Inject data generated from fallback path into the synthetic event.\n // This matches the property of native CompositionEventInterface.\n event.data = fallbackData;\n } else {\n var customData = getDataFromCustomEvent(nativeEvent);\n\n if (customData !== null) {\n event.data = customData;\n }\n }\n }\n}\n\nfunction getNativeBeforeInputChars(domEventName, nativeEvent) {\n switch (domEventName) {\n case 'compositionend':\n return getDataFromCustomEvent(nativeEvent);\n\n case 'keypress':\n /**\n * If native `textInput` events are available, our goal is to make\n * use of them. However, there is a special case: the spacebar key.\n * In Webkit, preventing default on a spacebar `textInput` event\n * cancels character insertion, but it *also* causes the browser\n * to fall back to its default spacebar behavior of scrolling the\n * page.\n *\n * Tracking at:\n * https://code.google.com/p/chromium/issues/detail?id=355103\n *\n * To avoid this issue, use the keypress event as if no `textInput`\n * event is available.\n */\n var which = nativeEvent.which;\n\n if (which !== SPACEBAR_CODE) {\n return null;\n }\n\n hasSpaceKeypress = true;\n return SPACEBAR_CHAR;\n\n case 'textInput':\n // Record the characters to be added to the DOM.\n var chars = nativeEvent.data; // If it's a spacebar character, assume that we have already handled\n // it at the keypress level and bail immediately. Android Chrome\n // doesn't give us keycodes, so we need to ignore it.\n\n if (chars === SPACEBAR_CHAR && hasSpaceKeypress) {\n return null;\n }\n\n return chars;\n\n default:\n // For other native event types, do nothing.\n return null;\n }\n}\n/**\n * For browsers that do not provide the `textInput` event, extract the\n * appropriate string to use for SyntheticInputEvent.\n */\n\n\nfunction getFallbackBeforeInputChars(domEventName, nativeEvent) {\n // If we are currently composing (IME) and using a fallback to do so,\n // try to extract the composed characters from the fallback object.\n // If composition event is available, we extract a string only at\n // compositionevent, otherwise extract it at fallback events.\n if (isComposing) {\n if (domEventName === 'compositionend' || !canUseCompositionEvent && isFallbackCompositionEnd(domEventName, nativeEvent)) {\n var chars = getData();\n reset();\n isComposing = false;\n return chars;\n }\n\n return null;\n }\n\n switch (domEventName) {\n case 'paste':\n // If a paste event occurs after a keypress, throw out the input\n // chars. Paste events should not lead to BeforeInput events.\n return null;\n\n case 'keypress':\n /**\n * As of v27, Firefox may fire keypress events even when no character\n * will be inserted. A few possibilities:\n *\n * - `which` is `0`. Arrow keys, Esc key, etc.\n *\n * - `which` is the pressed key code, but no char is available.\n * Ex: 'AltGr + d` in Polish. There is no modified character for\n * this key combination and no character is inserted into the\n * document, but FF fires the keypress for char code `100` anyway.\n * No `input` event will occur.\n *\n * - `which` is the pressed key code, but a command combination is\n * being used. Ex: `Cmd+C`. No character is inserted, and no\n * `input` event will occur.\n */\n if (!isKeypressCommand(nativeEvent)) {\n // IE fires the `keypress` event when a user types an emoji via\n // Touch keyboard of Windows. In such a case, the `char` property\n // holds an emoji character like `\\uD83D\\uDE0A`. Because its length\n // is 2, the property `which` does not represent an emoji correctly.\n // In such a case, we directly return the `char` property instead of\n // using `which`.\n if (nativeEvent.char && nativeEvent.char.length > 1) {\n return nativeEvent.char;\n } else if (nativeEvent.which) {\n return String.fromCharCode(nativeEvent.which);\n }\n }\n\n return null;\n\n case 'compositionend':\n return useFallbackCompositionData && !isUsingKoreanIME(nativeEvent) ? null : nativeEvent.data;\n\n default:\n return null;\n }\n}\n/**\n * Extract a SyntheticInputEvent for `beforeInput`, based on either native\n * `textInput` or fallback behavior.\n *\n * @return {?object} A SyntheticInputEvent.\n */\n\n\nfunction extractBeforeInputEvent(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget) {\n var chars;\n\n if (canUseTextInputEvent) {\n chars = getNativeBeforeInputChars(domEventName, nativeEvent);\n } else {\n chars = getFallbackBeforeInputChars(domEventName, nativeEvent);\n } // If no characters are being inserted, no BeforeInput event should\n // be fired.\n\n\n if (!chars) {\n return null;\n }\n\n var listeners = accumulateTwoPhaseListeners(targetInst, 'onBeforeInput');\n\n if (listeners.length > 0) {\n var event = new SyntheticInputEvent('onBeforeInput', 'beforeinput', null, nativeEvent, nativeEventTarget);\n dispatchQueue.push({\n event: event,\n listeners: listeners\n });\n event.data = chars;\n }\n}\n/**\n * Create an `onBeforeInput` event to match\n * http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105/#events-inputevents.\n *\n * This event plugin is based on the native `textInput` event\n * available in Chrome, Safari, Opera, and IE. This event fires after\n * `onKeyPress` and `onCompositionEnd`, but before `onInput`.\n *\n * `beforeInput` is spec'd but not implemented in any browsers, and\n * the `input` event does not provide any useful information about what has\n * actually been added, contrary to the spec. Thus, `textInput` is the best\n * available event to identify the characters that have actually been inserted\n * into the target node.\n *\n * This plugin is also responsible for emitting `composition` events, thus\n * allowing us to share composition fallback code for both `beforeInput` and\n * `composition` event types.\n */\n\n\nfunction extractEvents(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {\n extractCompositionEvent(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);\n extractBeforeInputEvent(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);\n}\n\n/**\n * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary\n */\nvar supportedInputTypes = {\n color: true,\n date: true,\n datetime: true,\n 'datetime-local': true,\n email: true,\n month: true,\n number: true,\n password: true,\n range: true,\n search: true,\n tel: true,\n text: true,\n time: true,\n url: true,\n week: true\n};\n\nfunction isTextInputElement(elem) {\n var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();\n\n if (nodeName === 'input') {\n return !!supportedInputTypes[elem.type];\n }\n\n if (nodeName === 'textarea') {\n return true;\n }\n\n return false;\n}\n\n/**\n * Checks if an event is supported in the current execution environment.\n *\n * NOTE: This will not work correctly for non-generic events such as `change`,\n * `reset`, `load`, `error`, and `select`.\n *\n * Borrows from Modernizr.\n *\n * @param {string} eventNameSuffix Event name, e.g. \"click\".\n * @return {boolean} True if the event is supported.\n * @internal\n * @license Modernizr 3.0.0pre (Custom Build) | MIT\n */\n\nfunction isEventSupported(eventNameSuffix) {\n if (!canUseDOM) {\n return false;\n }\n\n var eventName = 'on' + eventNameSuffix;\n var isSupported = (eventName in document);\n\n if (!isSupported) {\n var element = document.createElement('div');\n element.setAttribute(eventName, 'return;');\n isSupported = typeof element[eventName] === 'function';\n }\n\n return isSupported;\n}\n\nfunction registerEvents$1() {\n registerTwoPhaseEvent('onChange', ['change', 'click', 'focusin', 'focusout', 'input', 'keydown', 'keyup', 'selectionchange']);\n}\n\nfunction createAndAccumulateChangeEvent(dispatchQueue, inst, nativeEvent, target) {\n // Flag this event loop as needing state restore.\n enqueueStateRestore(target);\n var listeners = accumulateTwoPhaseListeners(inst, 'onChange');\n\n if (listeners.length > 0) {\n var event = new SyntheticEvent('onChange', 'change', null, nativeEvent, target);\n dispatchQueue.push({\n event: event,\n listeners: listeners\n });\n }\n}\n/**\n * For IE shims\n */\n\n\nvar activeElement = null;\nvar activeElementInst = null;\n/**\n * SECTION: handle `change` event\n */\n\nfunction shouldUseChangeEvent(elem) {\n var nodeName = elem.nodeName && elem.nodeName.toLowerCase();\n return nodeName === 'select' || nodeName === 'input' && elem.type === 'file';\n}\n\nfunction manualDispatchChangeEvent(nativeEvent) {\n var dispatchQueue = [];\n createAndAccumulateChangeEvent(dispatchQueue, activeElementInst, nativeEvent, getEventTarget(nativeEvent)); // If change and propertychange bubbled, we'd just bind to it like all the\n // other events and have it go through ReactBrowserEventEmitter. Since it\n // doesn't, we manually listen for the events and so we have to enqueue and\n // process the abstract event manually.\n //\n // Batching is necessary here in order to ensure that all event handlers run\n // before the next rerender (including event handlers attached to ancestor\n // elements instead of directly on the input). Without this, controlled\n // components don't work properly in conjunction with event bubbling because\n // the component is rerendered and the value reverted before all the event\n // handlers can run. See https://github.com/facebook/react/issues/708.\n\n batchedUpdates(runEventInBatch, dispatchQueue);\n}\n\nfunction runEventInBatch(dispatchQueue) {\n processDispatchQueue(dispatchQueue, 0);\n}\n\nfunction getInstIfValueChanged(targetInst) {\n var targetNode = getNodeFromInstance(targetInst);\n\n if (updateValueIfChanged(targetNode)) {\n return targetInst;\n }\n}\n\nfunction getTargetInstForChangeEvent(domEventName, targetInst) {\n if (domEventName === 'change') {\n return targetInst;\n }\n}\n/**\n * SECTION: handle `input` event\n */\n\n\nvar isInputEventSupported = false;\n\nif (canUseDOM) {\n // IE9 claims to support the input event but fails to trigger it when\n // deleting text, so we ignore its input events.\n isInputEventSupported = isEventSupported('input') && (!document.documentMode || document.documentMode > 9);\n}\n/**\n * (For IE <=9) Starts tracking propertychange events on the passed-in element\n * and override the value property so that we can distinguish user events from\n * value changes in JS.\n */\n\n\nfunction startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}\n/**\n * (For IE <=9) Removes the event listeners from the currently-tracked element,\n * if any exists.\n */\n\n\nfunction stopWatchingForValueChange() {\n if (!activeElement) {\n return;\n }\n\n activeElement.detachEvent('onpropertychange', handlePropertyChange);\n activeElement = null;\n activeElementInst = null;\n}\n/**\n * (For IE <=9) Handles a propertychange event, sending a `change` event if\n * the value of the active element has changed.\n */\n\n\nfunction handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n}\n\nfunction handleEventsForInputEventPolyfill(domEventName, target, targetInst) {\n if (domEventName === 'focusin') {\n // In IE9, propertychange fires for most input events but is buggy and\n // doesn't fire when text is deleted, but conveniently, selectionchange\n // appears to fire in all of the remaining cases so we catch those and\n // forward the event if the value has changed\n // In either case, we don't want to call the event handler if the value\n // is changed from JS so we redefine a setter for `.value` that updates\n // our activeElementValue variable, allowing us to ignore those changes\n //\n // stopWatching() should be a noop here but we call it just in case we\n // missed a blur event somehow.\n stopWatchingForValueChange();\n startWatchingForValueChange(target, targetInst);\n } else if (domEventName === 'focusout') {\n stopWatchingForValueChange();\n }\n} // For IE8 and IE9.\n\n\nfunction getTargetInstForInputEventPolyfill(domEventName, targetInst) {\n if (domEventName === 'selectionchange' || domEventName === 'keyup' || domEventName === 'keydown') {\n // On the selectionchange event, the target is just document which isn't\n // helpful for us so just check activeElement instead.\n //\n // 99% of the time, keydown and keyup aren't necessary. IE8 fails to fire\n // propertychange on the first input event after setting `value` from a\n // script and fires only keydown, keypress, keyup. Catching keyup usually\n // gets it and catching keydown lets us fire an event for the first\n // keystroke if user does a key repeat (it'll be a little delayed: right\n // before the second keystroke). Other input methods (e.g., paste) seem to\n // fire selectionchange normally.\n return getInstIfValueChanged(activeElementInst);\n }\n}\n/**\n * SECTION: handle `click` event\n */\n\n\nfunction shouldUseClickEvent(elem) {\n // Use the `click` event to detect changes to checkbox and radio inputs.\n // This approach works across all browsers, whereas `change` does not fire\n // until `blur` in IE8.\n var nodeName = elem.nodeName;\n return nodeName && nodeName.toLowerCase() === 'input' && (elem.type === 'checkbox' || elem.type === 'radio');\n}\n\nfunction getTargetInstForClickEvent(domEventName, targetInst) {\n if (domEventName === 'click') {\n return getInstIfValueChanged(targetInst);\n }\n}\n\nfunction getTargetInstForInputOrChangeEvent(domEventName, targetInst) {\n if (domEventName === 'input' || domEventName === 'change') {\n return getInstIfValueChanged(targetInst);\n }\n}\n\nfunction handleControlledInputBlur(node) {\n var state = node._wrapperState;\n\n if (!state || !state.controlled || node.type !== 'number') {\n return;\n }\n\n {\n // If controlled, assign the value attribute to the current value on blur\n setDefaultValue(node, 'number', node.value);\n }\n}\n/**\n * This plugin creates an `onChange` event that normalizes change events\n * across form elements. This event fires at a time when it's possible to\n * change the element's value without seeing a flicker.\n *\n * Supported elements are:\n * - input (see `isTextInputElement`)\n * - textarea\n * - select\n */\n\n\nfunction extractEvents$1(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {\n var targetNode = targetInst ? getNodeFromInstance(targetInst) : window;\n var getTargetInstFunc, handleEventFunc;\n\n if (shouldUseChangeEvent(targetNode)) {\n getTargetInstFunc = getTargetInstForChangeEvent;\n } else if (isTextInputElement(targetNode)) {\n if (isInputEventSupported) {\n getTargetInstFunc = getTargetInstForInputOrChangeEvent;\n } else {\n getTargetInstFunc = getTargetInstForInputEventPolyfill;\n handleEventFunc = handleEventsForInputEventPolyfill;\n }\n } else if (shouldUseClickEvent(targetNode)) {\n getTargetInstFunc = getTargetInstForClickEvent;\n }\n\n if (getTargetInstFunc) {\n var inst = getTargetInstFunc(domEventName, targetInst);\n\n if (inst) {\n createAndAccumulateChangeEvent(dispatchQueue, inst, nativeEvent, nativeEventTarget);\n return;\n }\n }\n\n if (handleEventFunc) {\n handleEventFunc(domEventName, targetNode, targetInst);\n } // When blurring, set the value attribute for number inputs\n\n\n if (domEventName === 'focusout') {\n handleControlledInputBlur(targetNode);\n }\n}\n\nfunction registerEvents$2() {\n registerDirectEvent('onMouseEnter', ['mouseout', 'mouseover']);\n registerDirectEvent('onMouseLeave', ['mouseout', 'mouseover']);\n registerDirectEvent('onPointerEnter', ['pointerout', 'pointerover']);\n registerDirectEvent('onPointerLeave', ['pointerout', 'pointerover']);\n}\n/**\n * For almost every interaction we care about, there will be both a top-level\n * `mouseover` and `mouseout` event that occurs. Only use `mouseout` so that\n * we do not extract duplicate events. However, moving the mouse into the\n * browser from outside will not fire a `mouseout` event. In this case, we use\n * the `mouseover` top-level event.\n */\n\n\nfunction extractEvents$2(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {\n var isOverEvent = domEventName === 'mouseover' || domEventName === 'pointerover';\n var isOutEvent = domEventName === 'mouseout' || domEventName === 'pointerout';\n\n if (isOverEvent && !isReplayingEvent(nativeEvent)) {\n // If this is an over event with a target, we might have already dispatched\n // the event in the out event of the other target. If this is replayed,\n // then it's because we couldn't dispatch against this target previously\n // so we have to do it now instead.\n var related = nativeEvent.relatedTarget || nativeEvent.fromElement;\n\n if (related) {\n // If the related node is managed by React, we can assume that we have\n // already dispatched the corresponding events during its mouseout.\n if (getClosestInstanceFromNode(related) || isContainerMarkedAsRoot(related)) {\n return;\n }\n }\n }\n\n if (!isOutEvent && !isOverEvent) {\n // Must not be a mouse or pointer in or out - ignoring.\n return;\n }\n\n var win; // TODO: why is this nullable in the types but we read from it?\n\n if (nativeEventTarget.window === nativeEventTarget) {\n // `nativeEventTarget` is probably a window object.\n win = nativeEventTarget;\n } else {\n // TODO: Figure out why `ownerDocument` is sometimes undefined in IE8.\n var doc = nativeEventTarget.ownerDocument;\n\n if (doc) {\n win = doc.defaultView || doc.parentWindow;\n } else {\n win = window;\n }\n }\n\n var from;\n var to;\n\n if (isOutEvent) {\n var _related = nativeEvent.relatedTarget || nativeEvent.toElement;\n\n from = targetInst;\n to = _related ? getClosestInstanceFromNode(_related) : null;\n\n if (to !== null) {\n var nearestMounted = getNearestMountedFiber(to);\n\n if (to !== nearestMounted || to.tag !== HostComponent && to.tag !== HostText) {\n to = null;\n }\n }\n } else {\n // Moving to a node from outside the window.\n from = null;\n to = targetInst;\n }\n\n if (from === to) {\n // Nothing pertains to our managed components.\n return;\n }\n\n var SyntheticEventCtor = SyntheticMouseEvent;\n var leaveEventType = 'onMouseLeave';\n var enterEventType = 'onMouseEnter';\n var eventTypePrefix = 'mouse';\n\n if (domEventName === 'pointerout' || domEventName === 'pointerover') {\n SyntheticEventCtor = SyntheticPointerEvent;\n leaveEventType = 'onPointerLeave';\n enterEventType = 'onPointerEnter';\n eventTypePrefix = 'pointer';\n }\n\n var fromNode = from == null ? win : getNodeFromInstance(from);\n var toNode = to == null ? win : getNodeFromInstance(to);\n var leave = new SyntheticEventCtor(leaveEventType, eventTypePrefix + 'leave', from, nativeEvent, nativeEventTarget);\n leave.target = fromNode;\n leave.relatedTarget = toNode;\n var enter = null; // We should only process this nativeEvent if we are processing\n // the first ancestor. Next time, we will ignore the event.\n\n var nativeTargetInst = getClosestInstanceFromNode(nativeEventTarget);\n\n if (nativeTargetInst === targetInst) {\n var enterEvent = new SyntheticEventCtor(enterEventType, eventTypePrefix + 'enter', to, nativeEvent, nativeEventTarget);\n enterEvent.target = toNode;\n enterEvent.relatedTarget = fromNode;\n enter = enterEvent;\n }\n\n accumulateEnterLeaveTwoPhaseListeners(dispatchQueue, leave, enter, from, to);\n}\n\n/**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\nfunction is(x, y) {\n return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y // eslint-disable-line no-self-compare\n ;\n}\n\nvar objectIs = typeof Object.is === 'function' ? Object.is : is;\n\n/**\n * Performs equality by iterating through keys on an object and returning false\n * when any key has values which are not strictly equal between the arguments.\n * Returns true when the values of all keys are strictly equal.\n */\n\nfunction shallowEqual(objA, objB) {\n if (objectIs(objA, objB)) {\n return true;\n }\n\n if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n return false;\n }\n\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) {\n return false;\n } // Test for A's keys different from B.\n\n\n for (var i = 0; i < keysA.length; i++) {\n var currentKey = keysA[i];\n\n if (!hasOwnProperty.call(objB, currentKey) || !objectIs(objA[currentKey], objB[currentKey])) {\n return false;\n }\n }\n\n return true;\n}\n\n/**\n * Given any node return the first leaf node without children.\n *\n * @param {DOMElement|DOMTextNode} node\n * @return {DOMElement|DOMTextNode}\n */\n\nfunction getLeafNode(node) {\n while (node && node.firstChild) {\n node = node.firstChild;\n }\n\n return node;\n}\n/**\n * Get the next sibling within a container. This will walk up the\n * DOM if a node's siblings have been exhausted.\n *\n * @param {DOMElement|DOMTextNode} node\n * @return {?DOMElement|DOMTextNode}\n */\n\n\nfunction getSiblingNode(node) {\n while (node) {\n if (node.nextSibling) {\n return node.nextSibling;\n }\n\n node = node.parentNode;\n }\n}\n/**\n * Get object describing the nodes which contain characters at offset.\n *\n * @param {DOMElement|DOMTextNode} root\n * @param {number} offset\n * @return {?object}\n */\n\n\nfunction getNodeForCharacterOffset(root, offset) {\n var node = getLeafNode(root);\n var nodeStart = 0;\n var nodeEnd = 0;\n\n while (node) {\n if (node.nodeType === TEXT_NODE) {\n nodeEnd = nodeStart + node.textContent.length;\n\n if (nodeStart <= offset && nodeEnd >= offset) {\n return {\n node: node,\n offset: offset - nodeStart\n };\n }\n\n nodeStart = nodeEnd;\n }\n\n node = getLeafNode(getSiblingNode(node));\n }\n}\n\n/**\n * @param {DOMElement} outerNode\n * @return {?object}\n */\n\nfunction getOffsets(outerNode) {\n var ownerDocument = outerNode.ownerDocument;\n var win = ownerDocument && ownerDocument.defaultView || window;\n var selection = win.getSelection && win.getSelection();\n\n if (!selection || selection.rangeCount === 0) {\n return null;\n }\n\n var anchorNode = selection.anchorNode,\n anchorOffset = selection.anchorOffset,\n focusNode = selection.focusNode,\n focusOffset = selection.focusOffset; // In Firefox, anchorNode and focusNode can be \"anonymous divs\", e.g. the\n // up/down buttons on an <input type=\"number\">. Anonymous divs do not seem to\n // expose properties, triggering a \"Permission denied error\" if any of its\n // properties are accessed. The only seemingly possible way to avoid erroring\n // is to access a property that typically works for non-anonymous divs and\n // catch any error that may otherwise arise. See\n // https://bugzilla.mozilla.org/show_bug.cgi?id=208427\n\n try {\n /* eslint-disable no-unused-expressions */\n anchorNode.nodeType;\n focusNode.nodeType;\n /* eslint-enable no-unused-expressions */\n } catch (e) {\n return null;\n }\n\n return getModernOffsetsFromPoints(outerNode, anchorNode, anchorOffset, focusNode, focusOffset);\n}\n/**\n * Returns {start, end} where `start` is the character/codepoint index of\n * (anchorNode, anchorOffset) within the textContent of `outerNode`, and\n * `end` is the index of (focusNode, focusOffset).\n *\n * Returns null if you pass in garbage input but we should probably just crash.\n *\n * Exported only for testing.\n */\n\nfunction getModernOffsetsFromPoints(outerNode, anchorNode, anchorOffset, focusNode, focusOffset) {\n var length = 0;\n var start = -1;\n var end = -1;\n var indexWithinAnchor = 0;\n var indexWithinFocus = 0;\n var node = outerNode;\n var parentNode = null;\n\n outer: while (true) {\n var next = null;\n\n while (true) {\n if (node === anchorNode && (anchorOffset === 0 || node.nodeType === TEXT_NODE)) {\n start = length + anchorOffset;\n }\n\n if (node === focusNode && (focusOffset === 0 || node.nodeType === TEXT_NODE)) {\n end = length + focusOffset;\n }\n\n if (node.nodeType === TEXT_NODE) {\n length += node.nodeValue.length;\n }\n\n if ((next = node.firstChild) === null) {\n break;\n } // Moving from `node` to its first child `next`.\n\n\n parentNode = node;\n node = next;\n }\n\n while (true) {\n if (node === outerNode) {\n // If `outerNode` has children, this is always the second time visiting\n // it. If it has no children, this is still the first loop, and the only\n // valid selection is anchorNode and focusNode both equal to this node\n // and both offsets 0, in which case we will have handled above.\n break outer;\n }\n\n if (parentNode === anchorNode && ++indexWithinAnchor === anchorOffset) {\n start = length;\n }\n\n if (parentNode === focusNode && ++indexWithinFocus === focusOffset) {\n end = length;\n }\n\n if ((next = node.nextSibling) !== null) {\n break;\n }\n\n node = parentNode;\n parentNode = node.parentNode;\n } // Moving from `node` to its next sibling `next`.\n\n\n node = next;\n }\n\n if (start === -1 || end === -1) {\n // This should never happen. (Would happen if the anchor/focus nodes aren't\n // actually inside the passed-in node.)\n return null;\n }\n\n return {\n start: start,\n end: end\n };\n}\n/**\n * In modern non-IE browsers, we can support both forward and backward\n * selections.\n *\n * Note: IE10+ supports the Selection object, but it does not support\n * the `extend` method, which means that even in modern IE, it's not possible\n * to programmatically create a backward selection. Thus, for all IE\n * versions, we use the old IE API to create our selections.\n *\n * @param {DOMElement|DOMTextNode} node\n * @param {object} offsets\n */\n\nfunction setOffsets(node, offsets) {\n var doc = node.ownerDocument || document;\n var win = doc && doc.defaultView || window; // Edge fails with \"Object expected\" in some scenarios.\n // (For instance: TinyMCE editor used in a list component that supports pasting to add more,\n // fails when pasting 100+ items)\n\n if (!win.getSelection) {\n return;\n }\n\n var selection = win.getSelection();\n var length = node.textContent.length;\n var start = Math.min(offsets.start, length);\n var end = offsets.end === undefined ? start : Math.min(offsets.end, length); // IE 11 uses modern selection, but doesn't support the extend method.\n // Flip backward selections, so we can set with a single range.\n\n if (!selection.extend && start > end) {\n var temp = end;\n end = start;\n start = temp;\n }\n\n var startMarker = getNodeForCharacterOffset(node, start);\n var endMarker = getNodeForCharacterOffset(node, end);\n\n if (startMarker && endMarker) {\n if (selection.rangeCount === 1 && selection.anchorNode === startMarker.node && selection.anchorOffset === startMarker.offset && selection.focusNode === endMarker.node && selection.focusOffset === endMarker.offset) {\n return;\n }\n\n var range = doc.createRange();\n range.setStart(startMarker.node, startMarker.offset);\n selection.removeAllRanges();\n\n if (start > end) {\n selection.addRange(range);\n selection.extend(endMarker.node, endMarker.offset);\n } else {\n range.setEnd(endMarker.node, endMarker.offset);\n selection.addRange(range);\n }\n }\n}\n\nfunction isTextNode(node) {\n return node && node.nodeType === TEXT_NODE;\n}\n\nfunction containsNode(outerNode, innerNode) {\n if (!outerNode || !innerNode) {\n return false;\n } else if (outerNode === innerNode) {\n return true;\n } else if (isTextNode(outerNode)) {\n return false;\n } else if (isTextNode(innerNode)) {\n return containsNode(outerNode, innerNode.parentNode);\n } else if ('contains' in outerNode) {\n return outerNode.contains(innerNode);\n } else if (outerNode.compareDocumentPosition) {\n return !!(outerNode.compareDocumentPosition(innerNode) & 16);\n } else {\n return false;\n }\n}\n\nfunction isInDocument(node) {\n return node && node.ownerDocument && containsNode(node.ownerDocument.documentElement, node);\n}\n\nfunction isSameOriginFrame(iframe) {\n try {\n // Accessing the contentDocument of a HTMLIframeElement can cause the browser\n // to throw, e.g. if it has a cross-origin src attribute.\n // Safari will show an error in the console when the access results in \"Blocked a frame with origin\". e.g:\n // iframe.contentDocument.defaultView;\n // A safety way is to access one of the cross origin properties: Window or Location\n // Which might result in \"SecurityError\" DOM Exception and it is compatible to Safari.\n // https://html.spec.whatwg.org/multipage/browsers.html#integration-with-idl\n return typeof iframe.contentWindow.location.href === 'string';\n } catch (err) {\n return false;\n }\n}\n\nfunction getActiveElementDeep() {\n var win = window;\n var element = getActiveElement();\n\n while (element instanceof win.HTMLIFrameElement) {\n if (isSameOriginFrame(element)) {\n win = element.contentWindow;\n } else {\n return element;\n }\n\n element = getActiveElement(win.document);\n }\n\n return element;\n}\n/**\n * @ReactInputSelection: React input selection module. Based on Selection.js,\n * but modified to be suitable for react and has a couple of bug fixes (doesn't\n * assume buttons have range selections allowed).\n * Input selection module for React.\n */\n\n/**\n * @hasSelectionCapabilities: we get the element types that support selection\n * from https://html.spec.whatwg.org/#do-not-apply, looking at `selectionStart`\n * and `selectionEnd` rows.\n */\n\n\nfunction hasSelectionCapabilities(elem) {\n var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();\n return nodeName && (nodeName === 'input' && (elem.type === 'text' || elem.type === 'search' || elem.type === 'tel' || elem.type === 'url' || elem.type === 'password') || nodeName === 'textarea' || elem.contentEditable === 'true');\n}\nfunction getSelectionInformation() {\n var focusedElem = getActiveElementDeep();\n return {\n focusedElem: focusedElem,\n selectionRange: hasSelectionCapabilities(focusedElem) ? getSelection(focusedElem) : null\n };\n}\n/**\n * @restoreSelection: If any selection information was potentially lost,\n * restore it. This is useful when performing operations that could remove dom\n * nodes and place them back in, resulting in focus being lost.\n */\n\nfunction restoreSelection(priorSelectionInformation) {\n var curFocusedElem = getActiveElementDeep();\n var priorFocusedElem = priorSelectionInformation.focusedElem;\n var priorSelectionRange = priorSelectionInformation.selectionRange;\n\n if (curFocusedElem !== priorFocusedElem && isInDocument(priorFocusedElem)) {\n if (priorSelectionRange !== null && hasSelectionCapabilities(priorFocusedElem)) {\n setSelection(priorFocusedElem, priorSelectionRange);\n } // Focusing a node can change the scroll position, which is undesirable\n\n\n var ancestors = [];\n var ancestor = priorFocusedElem;\n\n while (ancestor = ancestor.parentNode) {\n if (ancestor.nodeType === ELEMENT_NODE) {\n ancestors.push({\n element: ancestor,\n left: ancestor.scrollLeft,\n top: ancestor.scrollTop\n });\n }\n }\n\n if (typeof priorFocusedElem.focus === 'function') {\n priorFocusedElem.focus();\n }\n\n for (var i = 0; i < ancestors.length; i++) {\n var info = ancestors[i];\n info.element.scrollLeft = info.left;\n info.element.scrollTop = info.top;\n }\n }\n}\n/**\n * @getSelection: Gets the selection bounds of a focused textarea, input or\n * contentEditable node.\n * -@input: Look up selection bounds of this input\n * -@return {start: selectionStart, end: selectionEnd}\n */\n\nfunction getSelection(input) {\n var selection;\n\n if ('selectionStart' in input) {\n // Modern browser with input or textarea.\n selection = {\n start: input.selectionStart,\n end: input.selectionEnd\n };\n } else {\n // Content editable or old IE textarea.\n selection = getOffsets(input);\n }\n\n return selection || {\n start: 0,\n end: 0\n };\n}\n/**\n * @setSelection: Sets the selection bounds of a textarea or input and focuses\n * the input.\n * -@input Set selection bounds of this input or textarea\n * -@offsets Object of same form that is returned from get*\n */\n\nfunction setSelection(input, offsets) {\n var start = offsets.start;\n var end = offsets.end;\n\n if (end === undefined) {\n end = start;\n }\n\n if ('selectionStart' in input) {\n input.selectionStart = start;\n input.selectionEnd = Math.min(end, input.value.length);\n } else {\n setOffsets(input, offsets);\n }\n}\n\nvar skipSelectionChangeEvent = canUseDOM && 'documentMode' in document && document.documentMode <= 11;\n\nfunction registerEvents$3() {\n registerTwoPhaseEvent('onSelect', ['focusout', 'contextmenu', 'dragend', 'focusin', 'keydown', 'keyup', 'mousedown', 'mouseup', 'selectionchange']);\n}\n\nvar activeElement$1 = null;\nvar activeElementInst$1 = null;\nvar lastSelection = null;\nvar mouseDown = false;\n/**\n * Get an object which is a unique representation of the current selection.\n *\n * The return value will not be consistent across nodes or browsers, but\n * two identical selections on the same node will return identical objects.\n */\n\nfunction getSelection$1(node) {\n if ('selectionStart' in node && hasSelectionCapabilities(node)) {\n return {\n start: node.selectionStart,\n end: node.selectionEnd\n };\n } else {\n var win = node.ownerDocument && node.ownerDocument.defaultView || window;\n var selection = win.getSelection();\n return {\n anchorNode: selection.anchorNode,\n anchorOffset: selection.anchorOffset,\n focusNode: selection.focusNode,\n focusOffset: selection.focusOffset\n };\n }\n}\n/**\n * Get document associated with the event target.\n */\n\n\nfunction getEventTargetDocument(eventTarget) {\n return eventTarget.window === eventTarget ? eventTarget.document : eventTarget.nodeType === DOCUMENT_NODE ? eventTarget : eventTarget.ownerDocument;\n}\n/**\n * Poll selection to see whether it's changed.\n *\n * @param {object} nativeEvent\n * @param {object} nativeEventTarget\n * @return {?SyntheticEvent}\n */\n\n\nfunction constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget) {\n // Ensure we have the right element, and that the user is not dragging a\n // selection (this matches native `select` event behavior). In HTML5, select\n // fires only on input and textarea thus if there's no focused element we\n // won't dispatch.\n var doc = getEventTargetDocument(nativeEventTarget);\n\n if (mouseDown || activeElement$1 == null || activeElement$1 !== getActiveElement(doc)) {\n return;\n } // Only fire when selection has actually changed.\n\n\n var currentSelection = getSelection$1(activeElement$1);\n\n if (!lastSelection || !shallowEqual(lastSelection, currentSelection)) {\n lastSelection = currentSelection;\n var listeners = accumulateTwoPhaseListeners(activeElementInst$1, 'onSelect');\n\n if (listeners.length > 0) {\n var event = new SyntheticEvent('onSelect', 'select', null, nativeEvent, nativeEventTarget);\n dispatchQueue.push({\n event: event,\n listeners: listeners\n });\n event.target = activeElement$1;\n }\n }\n}\n/**\n * This plugin creates an `onSelect` event that normalizes select events\n * across form elements.\n *\n * Supported elements are:\n * - input (see `isTextInputElement`)\n * - textarea\n * - contentEditable\n *\n * This differs from native browser implementations in the following ways:\n * - Fires on contentEditable fields as well as inputs.\n * - Fires for collapsed selection.\n * - Fires after user input.\n */\n\n\nfunction extractEvents$3(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {\n var targetNode = targetInst ? getNodeFromInstance(targetInst) : window;\n\n switch (domEventName) {\n // Track the input node that has focus.\n case 'focusin':\n if (isTextInputElement(targetNode) || targetNode.contentEditable === 'true') {\n activeElement$1 = targetNode;\n activeElementInst$1 = targetInst;\n lastSelection = null;\n }\n\n break;\n\n case 'focusout':\n activeElement$1 = null;\n activeElementInst$1 = null;\n lastSelection = null;\n break;\n // Don't fire the event while the user is dragging. This matches the\n // semantics of the native select event.\n\n case 'mousedown':\n mouseDown = true;\n break;\n\n case 'contextmenu':\n case 'mouseup':\n case 'dragend':\n mouseDown = false;\n constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget);\n break;\n // Chrome and IE fire non-standard event when selection is changed (and\n // sometimes when it hasn't). IE's event fires out of order with respect\n // to key and input events on deletion, so we discard it.\n //\n // Firefox doesn't support selectionchange, so check selection status\n // after each key entry. The selection changes after keydown and before\n // keyup, but we check on keydown as well in the case of holding down a\n // key, when multiple keydown events are fired but only one keyup is.\n // This is also our approach for IE handling, for the reason above.\n\n case 'selectionchange':\n if (skipSelectionChangeEvent) {\n break;\n }\n\n // falls through\n\n case 'keydown':\n case 'keyup':\n constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget);\n }\n}\n\n/**\n * Generate a mapping of standard vendor prefixes using the defined style property and event name.\n *\n * @param {string} styleProp\n * @param {string} eventName\n * @returns {object}\n */\n\nfunction makePrefixMap(styleProp, eventName) {\n var prefixes = {};\n prefixes[styleProp.toLowerCase()] = eventName.toLowerCase();\n prefixes['Webkit' + styleProp] = 'webkit' + eventName;\n prefixes['Moz' + styleProp] = 'moz' + eventName;\n return prefixes;\n}\n/**\n * A list of event names to a configurable list of vendor prefixes.\n */\n\n\nvar vendorPrefixes = {\n animationend: makePrefixMap('Animation', 'AnimationEnd'),\n animationiteration: makePrefixMap('Animation', 'AnimationIteration'),\n animationstart: makePrefixMap('Animation', 'AnimationStart'),\n transitionend: makePrefixMap('Transition', 'TransitionEnd')\n};\n/**\n * Event names that have already been detected and prefixed (if applicable).\n */\n\nvar prefixedEventNames = {};\n/**\n * Element to check for prefixes on.\n */\n\nvar style = {};\n/**\n * Bootstrap if a DOM exists.\n */\n\nif (canUseDOM) {\n style = document.createElement('div').style; // On some platforms, in particular some releases of Android 4.x,\n // the un-prefixed \"animation\" and \"transition\" properties are defined on the\n // style object but the events that fire will still be prefixed, so we need\n // to check if the un-prefixed events are usable, and if not remove them from the map.\n\n if (!('AnimationEvent' in window)) {\n delete vendorPrefixes.animationend.animation;\n delete vendorPrefixes.animationiteration.animation;\n delete vendorPrefixes.animationstart.animation;\n } // Same as above\n\n\n if (!('TransitionEvent' in window)) {\n delete vendorPrefixes.transitionend.transition;\n }\n}\n/**\n * Attempts to determine the correct vendor prefixed event name.\n *\n * @param {string} eventName\n * @returns {string}\n */\n\n\nfunction getVendorPrefixedEventName(eventName) {\n if (prefixedEventNames[eventName]) {\n return prefixedEventNames[eventName];\n } else if (!vendorPrefixes[eventName]) {\n return eventName;\n }\n\n var prefixMap = vendorPrefixes[eventName];\n\n for (var styleProp in prefixMap) {\n if (prefixMap.hasOwnProperty(styleProp) && styleProp in style) {\n return prefixedEventNames[eventName] = prefixMap[styleProp];\n }\n }\n\n return eventName;\n}\n\nvar ANIMATION_END = getVendorPrefixedEventName('animationend');\nvar ANIMATION_ITERATION = getVendorPrefixedEventName('animationiteration');\nvar ANIMATION_START = getVendorPrefixedEventName('animationstart');\nvar TRANSITION_END = getVendorPrefixedEventName('transitionend');\n\nvar topLevelEventsToReactNames = new Map(); // NOTE: Capitalization is important in this list!\n//\n// E.g. it needs \"pointerDown\", not \"pointerdown\".\n// This is because we derive both React name (\"onPointerDown\")\n// and DOM name (\"pointerdown\") from the same list.\n//\n// Exceptions that don't match this convention are listed separately.\n//\n// prettier-ignore\n\nvar simpleEventPluginEvents = ['abort', 'auxClick', 'cancel', 'canPlay', 'canPlayThrough', 'click', 'close', 'contextMenu', 'copy', 'cut', 'drag', 'dragEnd', 'dragEnter', 'dragExit', 'dragLeave', 'dragOver', 'dragStart', 'drop', 'durationChange', 'emptied', 'encrypted', 'ended', 'error', 'gotPointerCapture', 'input', 'invalid', 'keyDown', 'keyPress', 'keyUp', 'load', 'loadedData', 'loadedMetadata', 'loadStart', 'lostPointerCapture', 'mouseDown', 'mouseMove', 'mouseOut', 'mouseOver', 'mouseUp', 'paste', 'pause', 'play', 'playing', 'pointerCancel', 'pointerDown', 'pointerMove', 'pointerOut', 'pointerOver', 'pointerUp', 'progress', 'rateChange', 'reset', 'resize', 'seeked', 'seeking', 'stalled', 'submit', 'suspend', 'timeUpdate', 'touchCancel', 'touchEnd', 'touchStart', 'volumeChange', 'scroll', 'toggle', 'touchMove', 'waiting', 'wheel'];\n\nfunction registerSimpleEvent(domEventName, reactName) {\n topLevelEventsToReactNames.set(domEventName, reactName);\n registerTwoPhaseEvent(reactName, [domEventName]);\n}\n\nfunction registerSimpleEvents() {\n for (var i = 0; i < simpleEventPluginEvents.length; i++) {\n var eventName = simpleEventPluginEvents[i];\n var domEventName = eventName.toLowerCase();\n var capitalizedEvent = eventName[0].toUpperCase() + eventName.slice(1);\n registerSimpleEvent(domEventName, 'on' + capitalizedEvent);\n } // Special cases where event names don't match.\n\n\n registerSimpleEvent(ANIMATION_END, 'onAnimationEnd');\n registerSimpleEvent(ANIMATION_ITERATION, 'onAnimationIteration');\n registerSimpleEvent(ANIMATION_START, 'onAnimationStart');\n registerSimpleEvent('dblclick', 'onDoubleClick');\n registerSimpleEvent('focusin', 'onFocus');\n registerSimpleEvent('focusout', 'onBlur');\n registerSimpleEvent(TRANSITION_END, 'onTransitionEnd');\n}\n\nfunction extractEvents$4(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {\n var reactName = topLevelEventsToReactNames.get(domEventName);\n\n if (reactName === undefined) {\n return;\n }\n\n var SyntheticEventCtor = SyntheticEvent;\n var reactEventType = domEventName;\n\n switch (domEventName) {\n case 'keypress':\n // Firefox creates a keypress event for function keys too. This removes\n // the unwanted keypress events. Enter is however both printable and\n // non-printable. One would expect Tab to be as well (but it isn't).\n if (getEventCharCode(nativeEvent) === 0) {\n return;\n }\n\n /* falls through */\n\n case 'keydown':\n case 'keyup':\n SyntheticEventCtor = SyntheticKeyboardEvent;\n break;\n\n case 'focusin':\n reactEventType = 'focus';\n SyntheticEventCtor = SyntheticFocusEvent;\n break;\n\n case 'focusout':\n reactEventType = 'blur';\n SyntheticEventCtor = SyntheticFocusEvent;\n break;\n\n case 'beforeblur':\n case 'afterblur':\n SyntheticEventCtor = SyntheticFocusEvent;\n break;\n\n case 'click':\n // Firefox creates a click event on right mouse clicks. This removes the\n // unwanted click events.\n if (nativeEvent.button === 2) {\n return;\n }\n\n /* falls through */\n\n case 'auxclick':\n case 'dblclick':\n case 'mousedown':\n case 'mousemove':\n case 'mouseup': // TODO: Disabled elements should not respond to mouse events\n\n /* falls through */\n\n case 'mouseout':\n case 'mouseover':\n case 'contextmenu':\n SyntheticEventCtor = SyntheticMouseEvent;\n break;\n\n case 'drag':\n case 'dragend':\n case 'dragenter':\n case 'dragexit':\n case 'dragleave':\n case 'dragover':\n case 'dragstart':\n case 'drop':\n SyntheticEventCtor = SyntheticDragEvent;\n break;\n\n case 'touchcancel':\n case 'touchend':\n case 'touchmove':\n case 'touchstart':\n SyntheticEventCtor = SyntheticTouchEvent;\n break;\n\n case ANIMATION_END:\n case ANIMATION_ITERATION:\n case ANIMATION_START:\n SyntheticEventCtor = SyntheticAnimationEvent;\n break;\n\n case TRANSITION_END:\n SyntheticEventCtor = SyntheticTransitionEvent;\n break;\n\n case 'scroll':\n SyntheticEventCtor = SyntheticUIEvent;\n break;\n\n case 'wheel':\n SyntheticEventCtor = SyntheticWheelEvent;\n break;\n\n case 'copy':\n case 'cut':\n case 'paste':\n SyntheticEventCtor = SyntheticClipboardEvent;\n break;\n\n case 'gotpointercapture':\n case 'lostpointercapture':\n case 'pointercancel':\n case 'pointerdown':\n case 'pointermove':\n case 'pointerout':\n case 'pointerover':\n case 'pointerup':\n SyntheticEventCtor = SyntheticPointerEvent;\n break;\n }\n\n var inCapturePhase = (eventSystemFlags & IS_CAPTURE_PHASE) !== 0;\n\n {\n // Some events don't bubble in the browser.\n // In the past, React has always bubbled them, but this can be surprising.\n // We're going to try aligning closer to the browser behavior by not bubbling\n // them in React either. We'll start by not bubbling onScroll, and then expand.\n var accumulateTargetOnly = !inCapturePhase && // TODO: ideally, we'd eventually add all events from\n // nonDelegatedEvents list in DOMPluginEventSystem.\n // Then we can remove this special list.\n // This is a breaking change that can wait until React 18.\n domEventName === 'scroll';\n\n var _listeners = accumulateSinglePhaseListeners(targetInst, reactName, nativeEvent.type, inCapturePhase, accumulateTargetOnly);\n\n if (_listeners.length > 0) {\n // Intentionally create event lazily.\n var _event = new SyntheticEventCtor(reactName, reactEventType, null, nativeEvent, nativeEventTarget);\n\n dispatchQueue.push({\n event: _event,\n listeners: _listeners\n });\n }\n }\n}\n\n// TODO: remove top-level side effect.\nregisterSimpleEvents();\nregisterEvents$2();\nregisterEvents$1();\nregisterEvents$3();\nregisterEvents();\n\nfunction extractEvents$5(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {\n // TODO: we should remove the concept of a \"SimpleEventPlugin\".\n // This is the basic functionality of the event system. All\n // the other plugins are essentially polyfills. So the plugin\n // should probably be inlined somewhere and have its logic\n // be core the to event system. This would potentially allow\n // us to ship builds of React without the polyfilled plugins below.\n extractEvents$4(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags);\n var shouldProcessPolyfillPlugins = (eventSystemFlags & SHOULD_NOT_PROCESS_POLYFILL_EVENT_PLUGINS) === 0; // We don't process these events unless we are in the\n // event's native \"bubble\" phase, which means that we're\n // not in the capture phase. That's because we emulate\n // the capture phase here still. This is a trade-off,\n // because in an ideal world we would not emulate and use\n // the phases properly, like we do with the SimpleEvent\n // plugin. However, the plugins below either expect\n // emulation (EnterLeave) or use state localized to that\n // plugin (BeforeInput, Change, Select). The state in\n // these modules complicates things, as you'll essentially\n // get the case where the capture phase event might change\n // state, only for the following bubble event to come in\n // later and not trigger anything as the state now\n // invalidates the heuristics of the event plugin. We\n // could alter all these plugins to work in such ways, but\n // that might cause other unknown side-effects that we\n // can't foresee right now.\n\n if (shouldProcessPolyfillPlugins) {\n extractEvents$2(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);\n extractEvents$1(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);\n extractEvents$3(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);\n extractEvents(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);\n }\n} // List of events that need to be individually attached to media elements.\n\n\nvar mediaEventTypes = ['abort', 'canplay', 'canplaythrough', 'durationchange', 'emptied', 'encrypted', 'ended', 'error', 'loadeddata', 'loadedmetadata', 'loadstart', 'pause', 'play', 'playing', 'progress', 'ratechange', 'resize', 'seeked', 'seeking', 'stalled', 'suspend', 'timeupdate', 'volumechange', 'waiting']; // We should not delegate these events to the container, but rather\n// set them on the actual target element itself. This is primarily\n// because these events do not consistently bubble in the DOM.\n\nvar nonDelegatedEvents = new Set(['cancel', 'close', 'invalid', 'load', 'scroll', 'toggle'].concat(mediaEventTypes));\n\nfunction executeDispatch(event, listener, currentTarget) {\n var type = event.type || 'unknown-event';\n event.currentTarget = currentTarget;\n invokeGuardedCallbackAndCatchFirstError(type, listener, undefined, event);\n event.currentTarget = null;\n}\n\nfunction processDispatchQueueItemsInOrder(event, dispatchListeners, inCapturePhase) {\n var previousInstance;\n\n if (inCapturePhase) {\n for (var i = dispatchListeners.length - 1; i >= 0; i--) {\n var _dispatchListeners$i = dispatchListeners[i],\n instance = _dispatchListeners$i.instance,\n currentTarget = _dispatchListeners$i.currentTarget,\n listener = _dispatchListeners$i.listener;\n\n if (instance !== previousInstance && event.isPropagationStopped()) {\n return;\n }\n\n executeDispatch(event, listener, currentTarget);\n previousInstance = instance;\n }\n } else {\n for (var _i = 0; _i < dispatchListeners.length; _i++) {\n var _dispatchListeners$_i = dispatchListeners[_i],\n _instance = _dispatchListeners$_i.instance,\n _currentTarget = _dispatchListeners$_i.currentTarget,\n _listener = _dispatchListeners$_i.listener;\n\n if (_instance !== previousInstance && event.isPropagationStopped()) {\n return;\n }\n\n executeDispatch(event, _listener, _currentTarget);\n previousInstance = _instance;\n }\n }\n}\n\nfunction processDispatchQueue(dispatchQueue, eventSystemFlags) {\n var inCapturePhase = (eventSystemFlags & IS_CAPTURE_PHASE) !== 0;\n\n for (var i = 0; i < dispatchQueue.length; i++) {\n var _dispatchQueue$i = dispatchQueue[i],\n event = _dispatchQueue$i.event,\n listeners = _dispatchQueue$i.listeners;\n processDispatchQueueItemsInOrder(event, listeners, inCapturePhase); // event system doesn't use pooling.\n } // This would be a good time to rethrow if any of the event handlers threw.\n\n\n rethrowCaughtError();\n}\n\nfunction dispatchEventsForPlugins(domEventName, eventSystemFlags, nativeEvent, targetInst, targetContainer) {\n var nativeEventTarget = getEventTarget(nativeEvent);\n var dispatchQueue = [];\n extractEvents$5(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags);\n processDispatchQueue(dispatchQueue, eventSystemFlags);\n}\n\nfunction listenToNonDelegatedEvent(domEventName, targetElement) {\n {\n if (!nonDelegatedEvents.has(domEventName)) {\n error('Did not expect a listenToNonDelegatedEvent() call for \"%s\". ' + 'This is a bug in React. Please file an issue.', domEventName);\n }\n }\n\n var isCapturePhaseListener = false;\n var listenerSet = getEventListenerSet(targetElement);\n var listenerSetKey = getListenerSetKey(domEventName, isCapturePhaseListener);\n\n if (!listenerSet.has(listenerSetKey)) {\n addTrappedEventListener(targetElement, domEventName, IS_NON_DELEGATED, isCapturePhaseListener);\n listenerSet.add(listenerSetKey);\n }\n}\nfunction listenToNativeEvent(domEventName, isCapturePhaseListener, target) {\n {\n if (nonDelegatedEvents.has(domEventName) && !isCapturePhaseListener) {\n error('Did not expect a listenToNativeEvent() call for \"%s\" in the bubble phase. ' + 'This is a bug in React. Please file an issue.', domEventName);\n }\n }\n\n var eventSystemFlags = 0;\n\n if (isCapturePhaseListener) {\n eventSystemFlags |= IS_CAPTURE_PHASE;\n }\n\n addTrappedEventListener(target, domEventName, eventSystemFlags, isCapturePhaseListener);\n} // This is only used by createEventHandle when the\nvar listeningMarker = '_reactListening' + Math.random().toString(36).slice(2);\nfunction listenToAllSupportedEvents(rootContainerElement) {\n if (!rootContainerElement[listeningMarker]) {\n rootContainerElement[listeningMarker] = true;\n allNativeEvents.forEach(function (domEventName) {\n // We handle selectionchange separately because it\n // doesn't bubble and needs to be on the document.\n if (domEventName !== 'selectionchange') {\n if (!nonDelegatedEvents.has(domEventName)) {\n listenToNativeEvent(domEventName, false, rootContainerElement);\n }\n\n listenToNativeEvent(domEventName, true, rootContainerElement);\n }\n });\n var ownerDocument = rootContainerElement.nodeType === DOCUMENT_NODE ? rootContainerElement : rootContainerElement.ownerDocument;\n\n if (ownerDocument !== null) {\n // The selectionchange event also needs deduplication\n // but it is attached to the document.\n if (!ownerDocument[listeningMarker]) {\n ownerDocument[listeningMarker] = true;\n listenToNativeEvent('selectionchange', false, ownerDocument);\n }\n }\n }\n}\n\nfunction addTrappedEventListener(targetContainer, domEventName, eventSystemFlags, isCapturePhaseListener, isDeferredListenerForLegacyFBSupport) {\n var listener = createEventListenerWrapperWithPriority(targetContainer, domEventName, eventSystemFlags); // If passive option is not supported, then the event will be\n // active and not passive.\n\n var isPassiveListener = undefined;\n\n if (passiveBrowserEventsSupported) {\n // Browsers introduced an intervention, making these events\n // passive by default on document. React doesn't bind them\n // to document anymore, but changing this now would undo\n // the performance wins from the change. So we emulate\n // the existing behavior manually on the roots now.\n // https://github.com/facebook/react/issues/19651\n if (domEventName === 'touchstart' || domEventName === 'touchmove' || domEventName === 'wheel') {\n isPassiveListener = true;\n }\n }\n\n targetContainer = targetContainer;\n var unsubscribeListener; // When legacyFBSupport is enabled, it's for when we\n\n\n if (isCapturePhaseListener) {\n if (isPassiveListener !== undefined) {\n unsubscribeListener = addEventCaptureListenerWithPassiveFlag(targetContainer, domEventName, listener, isPassiveListener);\n } else {\n unsubscribeListener = addEventCaptureListener(targetContainer, domEventName, listener);\n }\n } else {\n if (isPassiveListener !== undefined) {\n unsubscribeListener = addEventBubbleListenerWithPassiveFlag(targetContainer, domEventName, listener, isPassiveListener);\n } else {\n unsubscribeListener = addEventBubbleListener(targetContainer, domEventName, listener);\n }\n }\n}\n\nfunction isMatchingRootContainer(grandContainer, targetContainer) {\n return grandContainer === targetContainer || grandContainer.nodeType === COMMENT_NODE && grandContainer.parentNode === targetContainer;\n}\n\nfunction dispatchEventForPluginEventSystem(domEventName, eventSystemFlags, nativeEvent, targetInst, targetContainer) {\n var ancestorInst = targetInst;\n\n if ((eventSystemFlags & IS_EVENT_HANDLE_NON_MANAGED_NODE) === 0 && (eventSystemFlags & IS_NON_DELEGATED) === 0) {\n var targetContainerNode = targetContainer; // If we are using the legacy FB support flag, we\n\n if (targetInst !== null) {\n // The below logic attempts to work out if we need to change\n // the target fiber to a different ancestor. We had similar logic\n // in the legacy event system, except the big difference between\n // systems is that the modern event system now has an event listener\n // attached to each React Root and React Portal Root. Together,\n // the DOM nodes representing these roots are the \"rootContainer\".\n // To figure out which ancestor instance we should use, we traverse\n // up the fiber tree from the target instance and attempt to find\n // root boundaries that match that of our current \"rootContainer\".\n // If we find that \"rootContainer\", we find the parent fiber\n // sub-tree for that root and make that our ancestor instance.\n var node = targetInst;\n\n mainLoop: while (true) {\n if (node === null) {\n return;\n }\n\n var nodeTag = node.tag;\n\n if (nodeTag === HostRoot || nodeTag === HostPortal) {\n var container = node.stateNode.containerInfo;\n\n if (isMatchingRootContainer(container, targetContainerNode)) {\n break;\n }\n\n if (nodeTag === HostPortal) {\n // The target is a portal, but it's not the rootContainer we're looking for.\n // Normally portals handle their own events all the way down to the root.\n // So we should be able to stop now. However, we don't know if this portal\n // was part of *our* root.\n var grandNode = node.return;\n\n while (grandNode !== null) {\n var grandTag = grandNode.tag;\n\n if (grandTag === HostRoot || grandTag === HostPortal) {\n var grandContainer = grandNode.stateNode.containerInfo;\n\n if (isMatchingRootContainer(grandContainer, targetContainerNode)) {\n // This is the rootContainer we're looking for and we found it as\n // a parent of the Portal. That means we can ignore it because the\n // Portal will bubble through to us.\n return;\n }\n }\n\n grandNode = grandNode.return;\n }\n } // Now we need to find it's corresponding host fiber in the other\n // tree. To do this we can use getClosestInstanceFromNode, but we\n // need to validate that the fiber is a host instance, otherwise\n // we need to traverse up through the DOM till we find the correct\n // node that is from the other tree.\n\n\n while (container !== null) {\n var parentNode = getClosestInstanceFromNode(container);\n\n if (parentNode === null) {\n return;\n }\n\n var parentTag = parentNode.tag;\n\n if (parentTag === HostComponent || parentTag === HostText) {\n node = ancestorInst = parentNode;\n continue mainLoop;\n }\n\n container = container.parentNode;\n }\n }\n\n node = node.return;\n }\n }\n }\n\n batchedUpdates(function () {\n return dispatchEventsForPlugins(domEventName, eventSystemFlags, nativeEvent, ancestorInst);\n });\n}\n\nfunction createDispatchListener(instance, listener, currentTarget) {\n return {\n instance: instance,\n listener: listener,\n currentTarget: currentTarget\n };\n}\n\nfunction accumulateSinglePhaseListeners(targetFiber, reactName, nativeEventType, inCapturePhase, accumulateTargetOnly, nativeEvent) {\n var captureName = reactName !== null ? reactName + 'Capture' : null;\n var reactEventName = inCapturePhase ? captureName : reactName;\n var listeners = [];\n var instance = targetFiber;\n var lastHostComponent = null; // Accumulate all instances and listeners via the target -> root path.\n\n while (instance !== null) {\n var _instance2 = instance,\n stateNode = _instance2.stateNode,\n tag = _instance2.tag; // Handle listeners that are on HostComponents (i.e. <div>)\n\n if (tag === HostComponent && stateNode !== null) {\n lastHostComponent = stateNode; // createEventHandle listeners\n\n\n if (reactEventName !== null) {\n var listener = getListener(instance, reactEventName);\n\n if (listener != null) {\n listeners.push(createDispatchListener(instance, listener, lastHostComponent));\n }\n }\n } // If we are only accumulating events for the target, then we don't\n // continue to propagate through the React fiber tree to find other\n // listeners.\n\n\n if (accumulateTargetOnly) {\n break;\n } // If we are processing the onBeforeBlur event, then we need to take\n\n instance = instance.return;\n }\n\n return listeners;\n} // We should only use this function for:\n// - BeforeInputEventPlugin\n// - ChangeEventPlugin\n// - SelectEventPlugin\n// This is because we only process these plugins\n// in the bubble phase, so we need to accumulate two\n// phase event listeners (via emulation).\n\nfunction accumulateTwoPhaseListeners(targetFiber, reactName) {\n var captureName = reactName + 'Capture';\n var listeners = [];\n var instance = targetFiber; // Accumulate all instances and listeners via the target -> root path.\n\n while (instance !== null) {\n var _instance3 = instance,\n stateNode = _instance3.stateNode,\n tag = _instance3.tag; // Handle listeners that are on HostComponents (i.e. <div>)\n\n if (tag === HostComponent && stateNode !== null) {\n var currentTarget = stateNode;\n var captureListener = getListener(instance, captureName);\n\n if (captureListener != null) {\n listeners.unshift(createDispatchListener(instance, captureListener, currentTarget));\n }\n\n var bubbleListener = getListener(instance, reactName);\n\n if (bubbleListener != null) {\n listeners.push(createDispatchListener(instance, bubbleListener, currentTarget));\n }\n }\n\n instance = instance.return;\n }\n\n return listeners;\n}\n\nfunction getParent(inst) {\n if (inst === null) {\n return null;\n }\n\n do {\n inst = inst.return; // TODO: If this is a HostRoot we might want to bail out.\n // That is depending on if we want nested subtrees (layers) to bubble\n // events to their parent. We could also go through parentNode on the\n // host node but that wouldn't work for React Native and doesn't let us\n // do the portal feature.\n } while (inst && inst.tag !== HostComponent);\n\n if (inst) {\n return inst;\n }\n\n return null;\n}\n/**\n * Return the lowest common ancestor of A and B, or null if they are in\n * different trees.\n */\n\n\nfunction getLowestCommonAncestor(instA, instB) {\n var nodeA = instA;\n var nodeB = instB;\n var depthA = 0;\n\n for (var tempA = nodeA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = nodeB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n nodeA = getParent(nodeA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n nodeB = getParent(nodeB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (nodeA === nodeB || nodeB !== null && nodeA === nodeB.alternate) {\n return nodeA;\n }\n\n nodeA = getParent(nodeA);\n nodeB = getParent(nodeB);\n }\n\n return null;\n}\n\nfunction accumulateEnterLeaveListenersForEvent(dispatchQueue, event, target, common, inCapturePhase) {\n var registrationName = event._reactName;\n var listeners = [];\n var instance = target;\n\n while (instance !== null) {\n if (instance === common) {\n break;\n }\n\n var _instance4 = instance,\n alternate = _instance4.alternate,\n stateNode = _instance4.stateNode,\n tag = _instance4.tag;\n\n if (alternate !== null && alternate === common) {\n break;\n }\n\n if (tag === HostComponent && stateNode !== null) {\n var currentTarget = stateNode;\n\n if (inCapturePhase) {\n var captureListener = getListener(instance, registrationName);\n\n if (captureListener != null) {\n listeners.unshift(createDispatchListener(instance, captureListener, currentTarget));\n }\n } else if (!inCapturePhase) {\n var bubbleListener = getListener(instance, registrationName);\n\n if (bubbleListener != null) {\n listeners.push(createDispatchListener(instance, bubbleListener, currentTarget));\n }\n }\n }\n\n instance = instance.return;\n }\n\n if (listeners.length !== 0) {\n dispatchQueue.push({\n event: event,\n listeners: listeners\n });\n }\n} // We should only use this function for:\n// - EnterLeaveEventPlugin\n// This is because we only process this plugin\n// in the bubble phase, so we need to accumulate two\n// phase event listeners.\n\n\nfunction accumulateEnterLeaveTwoPhaseListeners(dispatchQueue, leaveEvent, enterEvent, from, to) {\n var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\n if (from !== null) {\n accumulateEnterLeaveListenersForEvent(dispatchQueue, leaveEvent, from, common, false);\n }\n\n if (to !== null && enterEvent !== null) {\n accumulateEnterLeaveListenersForEvent(dispatchQueue, enterEvent, to, common, true);\n }\n}\nfunction getListenerSetKey(domEventName, capture) {\n return domEventName + \"__\" + (capture ? 'capture' : 'bubble');\n}\n\nvar didWarnInvalidHydration = false;\nvar DANGEROUSLY_SET_INNER_HTML = 'dangerouslySetInnerHTML';\nvar SUPPRESS_CONTENT_EDITABLE_WARNING = 'suppressContentEditableWarning';\nvar SUPPRESS_HYDRATION_WARNING = 'suppressHydrationWarning';\nvar AUTOFOCUS = 'autoFocus';\nvar CHILDREN = 'children';\nvar STYLE = 'style';\nvar HTML$1 = '__html';\nvar warnedUnknownTags;\nvar validatePropertiesInDevelopment;\nvar warnForPropDifference;\nvar warnForExtraAttributes;\nvar warnForInvalidEventListener;\nvar canDiffStyleForHydrationWarning;\nvar normalizeHTML;\n\n{\n warnedUnknownTags = {\n // There are working polyfills for <dialog>. Let people use it.\n dialog: true,\n // Electron ships a custom <webview> tag to display external web content in\n // an isolated frame and process.\n // This tag is not present in non Electron environments such as JSDom which\n // is often used for testing purposes.\n // @see https://electronjs.org/docs/api/webview-tag\n webview: true\n };\n\n validatePropertiesInDevelopment = function (type, props) {\n validateProperties(type, props);\n validateProperties$1(type, props);\n validateProperties$2(type, props, {\n registrationNameDependencies: registrationNameDependencies,\n possibleRegistrationNames: possibleRegistrationNames\n });\n }; // IE 11 parses & normalizes the style attribute as opposed to other\n // browsers. It adds spaces and sorts the properties in some\n // non-alphabetical order. Handling that would require sorting CSS\n // properties in the client & server versions or applying\n // `expectedStyle` to a temporary DOM node to read its `style` attribute\n // normalized. Since it only affects IE, we're skipping style warnings\n // in that browser completely in favor of doing all that work.\n // See https://github.com/facebook/react/issues/11807\n\n\n canDiffStyleForHydrationWarning = canUseDOM && !document.documentMode;\n\n warnForPropDifference = function (propName, serverValue, clientValue) {\n if (didWarnInvalidHydration) {\n return;\n }\n\n var normalizedClientValue = normalizeMarkupForTextOrAttribute(clientValue);\n var normalizedServerValue = normalizeMarkupForTextOrAttribute(serverValue);\n\n if (normalizedServerValue === normalizedClientValue) {\n return;\n }\n\n didWarnInvalidHydration = true;\n\n error('Prop `%s` did not match. Server: %s Client: %s', propName, JSON.stringify(normalizedServerValue), JSON.stringify(normalizedClientValue));\n };\n\n warnForExtraAttributes = function (attributeNames) {\n if (didWarnInvalidHydration) {\n return;\n }\n\n didWarnInvalidHydration = true;\n var names = [];\n attributeNames.forEach(function (name) {\n names.push(name);\n });\n\n error('Extra attributes from the server: %s', names);\n };\n\n warnForInvalidEventListener = function (registrationName, listener) {\n if (listener === false) {\n error('Expected `%s` listener to be a function, instead got `false`.\\n\\n' + 'If you used to conditionally omit it with %s={condition && value}, ' + 'pass %s={condition ? value : undefined} instead.', registrationName, registrationName, registrationName);\n } else {\n error('Expected `%s` listener to be a function, instead got a value of `%s` type.', registrationName, typeof listener);\n }\n }; // Parse the HTML and read it back to normalize the HTML string so that it\n // can be used for comparison.\n\n\n normalizeHTML = function (parent, html) {\n // We could have created a separate document here to avoid\n // re-initializing custom elements if they exist. But this breaks\n // how <noscript> is being handled. So we use the same document.\n // See the discussion in https://github.com/facebook/react/pull/11157.\n var testElement = parent.namespaceURI === HTML_NAMESPACE ? parent.ownerDocument.createElement(parent.tagName) : parent.ownerDocument.createElementNS(parent.namespaceURI, parent.tagName);\n testElement.innerHTML = html;\n return testElement.innerHTML;\n };\n} // HTML parsing normalizes CR and CRLF to LF.\n// It also can turn \\u0000 into \\uFFFD inside attributes.\n// https://www.w3.org/TR/html5/single-page.html#preprocessing-the-input-stream\n// If we have a mismatch, it might be caused by that.\n// We will still patch up in this case but not fire the warning.\n\n\nvar NORMALIZE_NEWLINES_REGEX = /\\r\\n?/g;\nvar NORMALIZE_NULL_AND_REPLACEMENT_REGEX = /\\u0000|\\uFFFD/g;\n\nfunction normalizeMarkupForTextOrAttribute(markup) {\n {\n checkHtmlStringCoercion(markup);\n }\n\n var markupString = typeof markup === 'string' ? markup : '' + markup;\n return markupString.replace(NORMALIZE_NEWLINES_REGEX, '\\n').replace(NORMALIZE_NULL_AND_REPLACEMENT_REGEX, '');\n}\n\nfunction checkForUnmatchedText(serverText, clientText, isConcurrentMode, shouldWarnDev) {\n var normalizedClientText = normalizeMarkupForTextOrAttribute(clientText);\n var normalizedServerText = normalizeMarkupForTextOrAttribute(serverText);\n\n if (normalizedServerText === normalizedClientText) {\n return;\n }\n\n if (shouldWarnDev) {\n {\n if (!didWarnInvalidHydration) {\n didWarnInvalidHydration = true;\n\n error('Text content did not match. Server: \"%s\" Client: \"%s\"', normalizedServerText, normalizedClientText);\n }\n }\n }\n\n if (isConcurrentMode && enableClientRenderFallbackOnTextMismatch) {\n // In concurrent roots, we throw when there's a text mismatch and revert to\n // client rendering, up to the nearest Suspense boundary.\n throw new Error('Text content does not match server-rendered HTML.');\n }\n}\n\nfunction getOwnerDocumentFromRootContainer(rootContainerElement) {\n return rootContainerElement.nodeType === DOCUMENT_NODE ? rootContainerElement : rootContainerElement.ownerDocument;\n}\n\nfunction noop() {}\n\nfunction trapClickOnNonInteractiveElement(node) {\n // Mobile Safari does not fire properly bubble click events on\n // non-interactive elements, which means delegated click listeners do not\n // fire. The workaround for this bug involves attaching an empty click\n // listener on the target node.\n // https://www.quirksmode.org/blog/archives/2010/09/click_event_del.html\n // Just set it using the onclick property so that we don't have to manage any\n // bookkeeping for it. Not sure if we need to clear it when the listener is\n // removed.\n // TODO: Only do this for the relevant Safaris maybe?\n node.onclick = noop;\n}\n\nfunction setInitialDOMProperties(tag, domElement, rootContainerElement, nextProps, isCustomComponentTag) {\n for (var propKey in nextProps) {\n if (!nextProps.hasOwnProperty(propKey)) {\n continue;\n }\n\n var nextProp = nextProps[propKey];\n\n if (propKey === STYLE) {\n {\n if (nextProp) {\n // Freeze the next style object so that we can assume it won't be\n // mutated. We have already warned for this in the past.\n Object.freeze(nextProp);\n }\n } // Relies on `updateStylesByID` not mutating `styleUpdates`.\n\n\n setValueForStyles(domElement, nextProp);\n } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {\n var nextHtml = nextProp ? nextProp[HTML$1] : undefined;\n\n if (nextHtml != null) {\n setInnerHTML(domElement, nextHtml);\n }\n } else if (propKey === CHILDREN) {\n if (typeof nextProp === 'string') {\n // Avoid setting initial textContent when the text is empty. In IE11 setting\n // textContent on a <textarea> will cause the placeholder to not\n // show within the <textarea> until it has been focused and blurred again.\n // https://github.com/facebook/react/issues/6731#issuecomment-254874553\n var canSetTextContent = tag !== 'textarea' || nextProp !== '';\n\n if (canSetTextContent) {\n setTextContent(domElement, nextProp);\n }\n } else if (typeof nextProp === 'number') {\n setTextContent(domElement, '' + nextProp);\n }\n } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING) ; else if (propKey === AUTOFOCUS) ; else if (registrationNameDependencies.hasOwnProperty(propKey)) {\n if (nextProp != null) {\n if ( typeof nextProp !== 'function') {\n warnForInvalidEventListener(propKey, nextProp);\n }\n\n if (propKey === 'onScroll') {\n listenToNonDelegatedEvent('scroll', domElement);\n }\n }\n } else if (nextProp != null) {\n setValueForProperty(domElement, propKey, nextProp, isCustomComponentTag);\n }\n }\n}\n\nfunction updateDOMProperties(domElement, updatePayload, wasCustomComponentTag, isCustomComponentTag) {\n // TODO: Handle wasCustomComponentTag\n for (var i = 0; i < updatePayload.length; i += 2) {\n var propKey = updatePayload[i];\n var propValue = updatePayload[i + 1];\n\n if (propKey === STYLE) {\n setValueForStyles(domElement, propValue);\n } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {\n setInnerHTML(domElement, propValue);\n } else if (propKey === CHILDREN) {\n setTextContent(domElement, propValue);\n } else {\n setValueForProperty(domElement, propKey, propValue, isCustomComponentTag);\n }\n }\n}\n\nfunction createElement(type, props, rootContainerElement, parentNamespace) {\n var isCustomComponentTag; // We create tags in the namespace of their parent container, except HTML\n // tags get no namespace.\n\n var ownerDocument = getOwnerDocumentFromRootContainer(rootContainerElement);\n var domElement;\n var namespaceURI = parentNamespace;\n\n if (namespaceURI === HTML_NAMESPACE) {\n namespaceURI = getIntrinsicNamespace(type);\n }\n\n if (namespaceURI === HTML_NAMESPACE) {\n {\n isCustomComponentTag = isCustomComponent(type, props); // Should this check be gated by parent namespace? Not sure we want to\n // allow <SVG> or <mATH>.\n\n if (!isCustomComponentTag && type !== type.toLowerCase()) {\n error('<%s /> is using incorrect casing. ' + 'Use PascalCase for React components, ' + 'or lowercase for HTML elements.', type);\n }\n }\n\n if (type === 'script') {\n // Create the script via .innerHTML so its \"parser-inserted\" flag is\n // set to true and it does not execute\n var div = ownerDocument.createElement('div');\n\n div.innerHTML = '<script><' + '/script>'; // eslint-disable-line\n // This is guaranteed to yield a script element.\n\n var firstChild = div.firstChild;\n domElement = div.removeChild(firstChild);\n } else if (typeof props.is === 'string') {\n // $FlowIssue `createElement` should be updated for Web Components\n domElement = ownerDocument.createElement(type, {\n is: props.is\n });\n } else {\n // Separate else branch instead of using `props.is || undefined` above because of a Firefox bug.\n // See discussion in https://github.com/facebook/react/pull/6896\n // and discussion in https://bugzilla.mozilla.org/show_bug.cgi?id=1276240\n domElement = ownerDocument.createElement(type); // Normally attributes are assigned in `setInitialDOMProperties`, however the `multiple` and `size`\n // attributes on `select`s needs to be added before `option`s are inserted.\n // This prevents:\n // - a bug where the `select` does not scroll to the correct option because singular\n // `select` elements automatically pick the first item #13222\n // - a bug where the `select` set the first item as selected despite the `size` attribute #14239\n // See https://github.com/facebook/react/issues/13222\n // and https://github.com/facebook/react/issues/14239\n\n if (type === 'select') {\n var node = domElement;\n\n if (props.multiple) {\n node.multiple = true;\n } else if (props.size) {\n // Setting a size greater than 1 causes a select to behave like `multiple=true`, where\n // it is possible that no option is selected.\n //\n // This is only necessary when a select in \"single selection mode\".\n node.size = props.size;\n }\n }\n }\n } else {\n domElement = ownerDocument.createElementNS(namespaceURI, type);\n }\n\n {\n if (namespaceURI === HTML_NAMESPACE) {\n if (!isCustomComponentTag && Object.prototype.toString.call(domElement) === '[object HTMLUnknownElement]' && !hasOwnProperty.call(warnedUnknownTags, type)) {\n warnedUnknownTags[type] = true;\n\n error('The tag <%s> is unrecognized in this browser. ' + 'If you meant to render a React component, start its name with ' + 'an uppercase letter.', type);\n }\n }\n }\n\n return domElement;\n}\nfunction createTextNode(text, rootContainerElement) {\n return getOwnerDocumentFromRootContainer(rootContainerElement).createTextNode(text);\n}\nfunction setInitialProperties(domElement, tag, rawProps, rootContainerElement) {\n var isCustomComponentTag = isCustomComponent(tag, rawProps);\n\n {\n validatePropertiesInDevelopment(tag, rawProps);\n } // TODO: Make sure that we check isMounted before firing any of these events.\n\n\n var props;\n\n switch (tag) {\n case 'dialog':\n listenToNonDelegatedEvent('cancel', domElement);\n listenToNonDelegatedEvent('close', domElement);\n props = rawProps;\n break;\n\n case 'iframe':\n case 'object':\n case 'embed':\n // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the load event.\n listenToNonDelegatedEvent('load', domElement);\n props = rawProps;\n break;\n\n case 'video':\n case 'audio':\n // We listen to these events in case to ensure emulated bubble\n // listeners still fire for all the media events.\n for (var i = 0; i < mediaEventTypes.length; i++) {\n listenToNonDelegatedEvent(mediaEventTypes[i], domElement);\n }\n\n props = rawProps;\n break;\n\n case 'source':\n // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the error event.\n listenToNonDelegatedEvent('error', domElement);\n props = rawProps;\n break;\n\n case 'img':\n case 'image':\n case 'link':\n // We listen to these events in case to ensure emulated bubble\n // listeners still fire for error and load events.\n listenToNonDelegatedEvent('error', domElement);\n listenToNonDelegatedEvent('load', domElement);\n props = rawProps;\n break;\n\n case 'details':\n // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the toggle event.\n listenToNonDelegatedEvent('toggle', domElement);\n props = rawProps;\n break;\n\n case 'input':\n initWrapperState(domElement, rawProps);\n props = getHostProps(domElement, rawProps); // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the invalid event.\n\n listenToNonDelegatedEvent('invalid', domElement);\n break;\n\n case 'option':\n validateProps(domElement, rawProps);\n props = rawProps;\n break;\n\n case 'select':\n initWrapperState$1(domElement, rawProps);\n props = getHostProps$1(domElement, rawProps); // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the invalid event.\n\n listenToNonDelegatedEvent('invalid', domElement);\n break;\n\n case 'textarea':\n initWrapperState$2(domElement, rawProps);\n props = getHostProps$2(domElement, rawProps); // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the invalid event.\n\n listenToNonDelegatedEvent('invalid', domElement);\n break;\n\n default:\n props = rawProps;\n }\n\n assertValidProps(tag, props);\n setInitialDOMProperties(tag, domElement, rootContainerElement, props, isCustomComponentTag);\n\n switch (tag) {\n case 'input':\n // TODO: Make sure we check if this is still unmounted or do any clean\n // up necessary since we never stop tracking anymore.\n track(domElement);\n postMountWrapper(domElement, rawProps, false);\n break;\n\n case 'textarea':\n // TODO: Make sure we check if this is still unmounted or do any clean\n // up necessary since we never stop tracking anymore.\n track(domElement);\n postMountWrapper$3(domElement);\n break;\n\n case 'option':\n postMountWrapper$1(domElement, rawProps);\n break;\n\n case 'select':\n postMountWrapper$2(domElement, rawProps);\n break;\n\n default:\n if (typeof props.onClick === 'function') {\n // TODO: This cast may not be sound for SVG, MathML or custom elements.\n trapClickOnNonInteractiveElement(domElement);\n }\n\n break;\n }\n} // Calculate the diff between the two objects.\n\nfunction diffProperties(domElement, tag, lastRawProps, nextRawProps, rootContainerElement) {\n {\n validatePropertiesInDevelopment(tag, nextRawProps);\n }\n\n var updatePayload = null;\n var lastProps;\n var nextProps;\n\n switch (tag) {\n case 'input':\n lastProps = getHostProps(domElement, lastRawProps);\n nextProps = getHostProps(domElement, nextRawProps);\n updatePayload = [];\n break;\n\n case 'select':\n lastProps = getHostProps$1(domElement, lastRawProps);\n nextProps = getHostProps$1(domElement, nextRawProps);\n updatePayload = [];\n break;\n\n case 'textarea':\n lastProps = getHostProps$2(domElement, lastRawProps);\n nextProps = getHostProps$2(domElement, nextRawProps);\n updatePayload = [];\n break;\n\n default:\n lastProps = lastRawProps;\n nextProps = nextRawProps;\n\n if (typeof lastProps.onClick !== 'function' && typeof nextProps.onClick === 'function') {\n // TODO: This cast may not be sound for SVG, MathML or custom elements.\n trapClickOnNonInteractiveElement(domElement);\n }\n\n break;\n }\n\n assertValidProps(tag, nextProps);\n var propKey;\n var styleName;\n var styleUpdates = null;\n\n for (propKey in lastProps) {\n if (nextProps.hasOwnProperty(propKey) || !lastProps.hasOwnProperty(propKey) || lastProps[propKey] == null) {\n continue;\n }\n\n if (propKey === STYLE) {\n var lastStyle = lastProps[propKey];\n\n for (styleName in lastStyle) {\n if (lastStyle.hasOwnProperty(styleName)) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n\n styleUpdates[styleName] = '';\n }\n }\n } else if (propKey === DANGEROUSLY_SET_INNER_HTML || propKey === CHILDREN) ; else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING) ; else if (propKey === AUTOFOCUS) ; else if (registrationNameDependencies.hasOwnProperty(propKey)) {\n // This is a special case. If any listener updates we need to ensure\n // that the \"current\" fiber pointer gets updated so we need a commit\n // to update this element.\n if (!updatePayload) {\n updatePayload = [];\n }\n } else {\n // For all other deleted properties we add it to the queue. We use\n // the allowed property list in the commit phase instead.\n (updatePayload = updatePayload || []).push(propKey, null);\n }\n }\n\n for (propKey in nextProps) {\n var nextProp = nextProps[propKey];\n var lastProp = lastProps != null ? lastProps[propKey] : undefined;\n\n if (!nextProps.hasOwnProperty(propKey) || nextProp === lastProp || nextProp == null && lastProp == null) {\n continue;\n }\n\n if (propKey === STYLE) {\n {\n if (nextProp) {\n // Freeze the next style object so that we can assume it won't be\n // mutated. We have already warned for this in the past.\n Object.freeze(nextProp);\n }\n }\n\n if (lastProp) {\n // Unset styles on `lastProp` but not on `nextProp`.\n for (styleName in lastProp) {\n if (lastProp.hasOwnProperty(styleName) && (!nextProp || !nextProp.hasOwnProperty(styleName))) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n\n styleUpdates[styleName] = '';\n }\n } // Update styles that changed since `lastProp`.\n\n\n for (styleName in nextProp) {\n if (nextProp.hasOwnProperty(styleName) && lastProp[styleName] !== nextProp[styleName]) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n\n styleUpdates[styleName] = nextProp[styleName];\n }\n }\n } else {\n // Relies on `updateStylesByID` not mutating `styleUpdates`.\n if (!styleUpdates) {\n if (!updatePayload) {\n updatePayload = [];\n }\n\n updatePayload.push(propKey, styleUpdates);\n }\n\n styleUpdates = nextProp;\n }\n } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {\n var nextHtml = nextProp ? nextProp[HTML$1] : undefined;\n var lastHtml = lastProp ? lastProp[HTML$1] : undefined;\n\n if (nextHtml != null) {\n if (lastHtml !== nextHtml) {\n (updatePayload = updatePayload || []).push(propKey, nextHtml);\n }\n }\n } else if (propKey === CHILDREN) {\n if (typeof nextProp === 'string' || typeof nextProp === 'number') {\n (updatePayload = updatePayload || []).push(propKey, '' + nextProp);\n }\n } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING) ; else if (registrationNameDependencies.hasOwnProperty(propKey)) {\n if (nextProp != null) {\n // We eagerly listen to this even though we haven't committed yet.\n if ( typeof nextProp !== 'function') {\n warnForInvalidEventListener(propKey, nextProp);\n }\n\n if (propKey === 'onScroll') {\n listenToNonDelegatedEvent('scroll', domElement);\n }\n }\n\n if (!updatePayload && lastProp !== nextProp) {\n // This is a special case. If any listener updates we need to ensure\n // that the \"current\" props pointer gets updated so we need a commit\n // to update this element.\n updatePayload = [];\n }\n } else {\n // For any other property we always add it to the queue and then we\n // filter it out using the allowed property list during the commit.\n (updatePayload = updatePayload || []).push(propKey, nextProp);\n }\n }\n\n if (styleUpdates) {\n {\n validateShorthandPropertyCollisionInDev(styleUpdates, nextProps[STYLE]);\n }\n\n (updatePayload = updatePayload || []).push(STYLE, styleUpdates);\n }\n\n return updatePayload;\n} // Apply the diff.\n\nfunction updateProperties(domElement, updatePayload, tag, lastRawProps, nextRawProps) {\n // Update checked *before* name.\n // In the middle of an update, it is possible to have multiple checked.\n // When a checked radio tries to change name, browser makes another radio's checked false.\n if (tag === 'input' && nextRawProps.type === 'radio' && nextRawProps.name != null) {\n updateChecked(domElement, nextRawProps);\n }\n\n var wasCustomComponentTag = isCustomComponent(tag, lastRawProps);\n var isCustomComponentTag = isCustomComponent(tag, nextRawProps); // Apply the diff.\n\n updateDOMProperties(domElement, updatePayload, wasCustomComponentTag, isCustomComponentTag); // TODO: Ensure that an update gets scheduled if any of the special props\n // changed.\n\n switch (tag) {\n case 'input':\n // Update the wrapper around inputs *after* updating props. This has to\n // happen after `updateDOMProperties`. Otherwise HTML5 input validations\n // raise warnings and prevent the new value from being assigned.\n updateWrapper(domElement, nextRawProps);\n break;\n\n case 'textarea':\n updateWrapper$1(domElement, nextRawProps);\n break;\n\n case 'select':\n // <select> value update needs to occur after <option> children\n // reconciliation\n postUpdateWrapper(domElement, nextRawProps);\n break;\n }\n}\n\nfunction getPossibleStandardName(propName) {\n {\n var lowerCasedName = propName.toLowerCase();\n\n if (!possibleStandardNames.hasOwnProperty(lowerCasedName)) {\n return null;\n }\n\n return possibleStandardNames[lowerCasedName] || null;\n }\n}\n\nfunction diffHydratedProperties(domElement, tag, rawProps, parentNamespace, rootContainerElement, isConcurrentMode, shouldWarnDev) {\n var isCustomComponentTag;\n var extraAttributeNames;\n\n {\n isCustomComponentTag = isCustomComponent(tag, rawProps);\n validatePropertiesInDevelopment(tag, rawProps);\n } // TODO: Make sure that we check isMounted before firing any of these events.\n\n\n switch (tag) {\n case 'dialog':\n listenToNonDelegatedEvent('cancel', domElement);\n listenToNonDelegatedEvent('close', domElement);\n break;\n\n case 'iframe':\n case 'object':\n case 'embed':\n // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the load event.\n listenToNonDelegatedEvent('load', domElement);\n break;\n\n case 'video':\n case 'audio':\n // We listen to these events in case to ensure emulated bubble\n // listeners still fire for all the media events.\n for (var i = 0; i < mediaEventTypes.length; i++) {\n listenToNonDelegatedEvent(mediaEventTypes[i], domElement);\n }\n\n break;\n\n case 'source':\n // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the error event.\n listenToNonDelegatedEvent('error', domElement);\n break;\n\n case 'img':\n case 'image':\n case 'link':\n // We listen to these events in case to ensure emulated bubble\n // listeners still fire for error and load events.\n listenToNonDelegatedEvent('error', domElement);\n listenToNonDelegatedEvent('load', domElement);\n break;\n\n case 'details':\n // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the toggle event.\n listenToNonDelegatedEvent('toggle', domElement);\n break;\n\n case 'input':\n initWrapperState(domElement, rawProps); // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the invalid event.\n\n listenToNonDelegatedEvent('invalid', domElement);\n break;\n\n case 'option':\n validateProps(domElement, rawProps);\n break;\n\n case 'select':\n initWrapperState$1(domElement, rawProps); // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the invalid event.\n\n listenToNonDelegatedEvent('invalid', domElement);\n break;\n\n case 'textarea':\n initWrapperState$2(domElement, rawProps); // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the invalid event.\n\n listenToNonDelegatedEvent('invalid', domElement);\n break;\n }\n\n assertValidProps(tag, rawProps);\n\n {\n extraAttributeNames = new Set();\n var attributes = domElement.attributes;\n\n for (var _i = 0; _i < attributes.length; _i++) {\n var name = attributes[_i].name.toLowerCase();\n\n switch (name) {\n // Controlled attributes are not validated\n // TODO: Only ignore them on controlled tags.\n case 'value':\n break;\n\n case 'checked':\n break;\n\n case 'selected':\n break;\n\n default:\n // Intentionally use the original name.\n // See discussion in https://github.com/facebook/react/pull/10676.\n extraAttributeNames.add(attributes[_i].name);\n }\n }\n }\n\n var updatePayload = null;\n\n for (var propKey in rawProps) {\n if (!rawProps.hasOwnProperty(propKey)) {\n continue;\n }\n\n var nextProp = rawProps[propKey];\n\n if (propKey === CHILDREN) {\n // For text content children we compare against textContent. This\n // might match additional HTML that is hidden when we read it using\n // textContent. E.g. \"foo\" will match \"f<span>oo</span>\" but that still\n // satisfies our requirement. Our requirement is not to produce perfect\n // HTML and attributes. Ideally we should preserve structure but it's\n // ok not to if the visible content is still enough to indicate what\n // even listeners these nodes might be wired up to.\n // TODO: Warn if there is more than a single textNode as a child.\n // TODO: Should we use domElement.firstChild.nodeValue to compare?\n if (typeof nextProp === 'string') {\n if (domElement.textContent !== nextProp) {\n if (rawProps[SUPPRESS_HYDRATION_WARNING] !== true) {\n checkForUnmatchedText(domElement.textContent, nextProp, isConcurrentMode, shouldWarnDev);\n }\n\n updatePayload = [CHILDREN, nextProp];\n }\n } else if (typeof nextProp === 'number') {\n if (domElement.textContent !== '' + nextProp) {\n if (rawProps[SUPPRESS_HYDRATION_WARNING] !== true) {\n checkForUnmatchedText(domElement.textContent, nextProp, isConcurrentMode, shouldWarnDev);\n }\n\n updatePayload = [CHILDREN, '' + nextProp];\n }\n }\n } else if (registrationNameDependencies.hasOwnProperty(propKey)) {\n if (nextProp != null) {\n if ( typeof nextProp !== 'function') {\n warnForInvalidEventListener(propKey, nextProp);\n }\n\n if (propKey === 'onScroll') {\n listenToNonDelegatedEvent('scroll', domElement);\n }\n }\n } else if (shouldWarnDev && true && // Convince Flow we've calculated it (it's DEV-only in this method.)\n typeof isCustomComponentTag === 'boolean') {\n // Validate that the properties correspond to their expected values.\n var serverValue = void 0;\n var propertyInfo = isCustomComponentTag && enableCustomElementPropertySupport ? null : getPropertyInfo(propKey);\n\n if (rawProps[SUPPRESS_HYDRATION_WARNING] === true) ; else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING || // Controlled attributes are not validated\n // TODO: Only ignore them on controlled tags.\n propKey === 'value' || propKey === 'checked' || propKey === 'selected') ; else if (propKey === DANGEROUSLY_SET_INNER_HTML) {\n var serverHTML = domElement.innerHTML;\n var nextHtml = nextProp ? nextProp[HTML$1] : undefined;\n\n if (nextHtml != null) {\n var expectedHTML = normalizeHTML(domElement, nextHtml);\n\n if (expectedHTML !== serverHTML) {\n warnForPropDifference(propKey, serverHTML, expectedHTML);\n }\n }\n } else if (propKey === STYLE) {\n // $FlowFixMe - Should be inferred as not undefined.\n extraAttributeNames.delete(propKey);\n\n if (canDiffStyleForHydrationWarning) {\n var expectedStyle = createDangerousStringForStyles(nextProp);\n serverValue = domElement.getAttribute('style');\n\n if (expectedStyle !== serverValue) {\n warnForPropDifference(propKey, serverValue, expectedStyle);\n }\n }\n } else if (isCustomComponentTag && !enableCustomElementPropertySupport) {\n // $FlowFixMe - Should be inferred as not undefined.\n extraAttributeNames.delete(propKey.toLowerCase());\n serverValue = getValueForAttribute(domElement, propKey, nextProp);\n\n if (nextProp !== serverValue) {\n warnForPropDifference(propKey, serverValue, nextProp);\n }\n } else if (!shouldIgnoreAttribute(propKey, propertyInfo, isCustomComponentTag) && !shouldRemoveAttribute(propKey, nextProp, propertyInfo, isCustomComponentTag)) {\n var isMismatchDueToBadCasing = false;\n\n if (propertyInfo !== null) {\n // $FlowFixMe - Should be inferred as not undefined.\n extraAttributeNames.delete(propertyInfo.attributeName);\n serverValue = getValueForProperty(domElement, propKey, nextProp, propertyInfo);\n } else {\n var ownNamespace = parentNamespace;\n\n if (ownNamespace === HTML_NAMESPACE) {\n ownNamespace = getIntrinsicNamespace(tag);\n }\n\n if (ownNamespace === HTML_NAMESPACE) {\n // $FlowFixMe - Should be inferred as not undefined.\n extraAttributeNames.delete(propKey.toLowerCase());\n } else {\n var standardName = getPossibleStandardName(propKey);\n\n if (standardName !== null && standardName !== propKey) {\n // If an SVG prop is supplied with bad casing, it will\n // be successfully parsed from HTML, but will produce a mismatch\n // (and would be incorrectly rendered on the client).\n // However, we already warn about bad casing elsewhere.\n // So we'll skip the misleading extra mismatch warning in this case.\n isMismatchDueToBadCasing = true; // $FlowFixMe - Should be inferred as not undefined.\n\n extraAttributeNames.delete(standardName);\n } // $FlowFixMe - Should be inferred as not undefined.\n\n\n extraAttributeNames.delete(propKey);\n }\n\n serverValue = getValueForAttribute(domElement, propKey, nextProp);\n }\n\n var dontWarnCustomElement = enableCustomElementPropertySupport ;\n\n if (!dontWarnCustomElement && nextProp !== serverValue && !isMismatchDueToBadCasing) {\n warnForPropDifference(propKey, serverValue, nextProp);\n }\n }\n }\n }\n\n {\n if (shouldWarnDev) {\n if ( // $FlowFixMe - Should be inferred as not undefined.\n extraAttributeNames.size > 0 && rawProps[SUPPRESS_HYDRATION_WARNING] !== true) {\n // $FlowFixMe - Should be inferred as not undefined.\n warnForExtraAttributes(extraAttributeNames);\n }\n }\n }\n\n switch (tag) {\n case 'input':\n // TODO: Make sure we check if this is still unmounted or do any clean\n // up necessary since we never stop tracking anymore.\n track(domElement);\n postMountWrapper(domElement, rawProps, true);\n break;\n\n case 'textarea':\n // TODO: Make sure we check if this is still unmounted or do any clean\n // up necessary since we never stop tracking anymore.\n track(domElement);\n postMountWrapper$3(domElement);\n break;\n\n case 'select':\n case 'option':\n // For input and textarea we current always set the value property at\n // post mount to force it to diverge from attributes. However, for\n // option and select we don't quite do the same thing and select\n // is not resilient to the DOM state changing so we don't do that here.\n // TODO: Consider not doing this for input and textarea.\n break;\n\n default:\n if (typeof rawProps.onClick === 'function') {\n // TODO: This cast may not be sound for SVG, MathML or custom elements.\n trapClickOnNonInteractiveElement(domElement);\n }\n\n break;\n }\n\n return updatePayload;\n}\nfunction diffHydratedText(textNode, text, isConcurrentMode) {\n var isDifferent = textNode.nodeValue !== text;\n return isDifferent;\n}\nfunction warnForDeletedHydratableElement(parentNode, child) {\n {\n if (didWarnInvalidHydration) {\n return;\n }\n\n didWarnInvalidHydration = true;\n\n error('Did not expect server HTML to contain a <%s> in <%s>.', child.nodeName.toLowerCase(), parentNode.nodeName.toLowerCase());\n }\n}\nfunction warnForDeletedHydratableText(parentNode, child) {\n {\n if (didWarnInvalidHydration) {\n return;\n }\n\n didWarnInvalidHydration = true;\n\n error('Did not expect server HTML to contain the text node \"%s\" in <%s>.', child.nodeValue, parentNode.nodeName.toLowerCase());\n }\n}\nfunction warnForInsertedHydratedElement(parentNode, tag, props) {\n {\n if (didWarnInvalidHydration) {\n return;\n }\n\n didWarnInvalidHydration = true;\n\n error('Expected server HTML to contain a matching <%s> in <%s>.', tag, parentNode.nodeName.toLowerCase());\n }\n}\nfunction warnForInsertedHydratedText(parentNode, text) {\n {\n if (text === '') {\n // We expect to insert empty text nodes since they're not represented in\n // the HTML.\n // TODO: Remove this special case if we can just avoid inserting empty\n // text nodes.\n return;\n }\n\n if (didWarnInvalidHydration) {\n return;\n }\n\n didWarnInvalidHydration = true;\n\n error('Expected server HTML to contain a matching text node for \"%s\" in <%s>.', text, parentNode.nodeName.toLowerCase());\n }\n}\nfunction restoreControlledState$3(domElement, tag, props) {\n switch (tag) {\n case 'input':\n restoreControlledState(domElement, props);\n return;\n\n case 'textarea':\n restoreControlledState$2(domElement, props);\n return;\n\n case 'select':\n restoreControlledState$1(domElement, props);\n return;\n }\n}\n\nvar validateDOMNesting = function () {};\n\nvar updatedAncestorInfo = function () {};\n\n{\n // This validation code was written based on the HTML5 parsing spec:\n // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope\n //\n // Note: this does not catch all invalid nesting, nor does it try to (as it's\n // not clear what practical benefit doing so provides); instead, we warn only\n // for cases where the parser will give a parse tree differing from what React\n // intended. For example, <b><div></div></b> is invalid but we don't warn\n // because it still parses correctly; we do warn for other cases like nested\n // <p> tags where the beginning of the second element implicitly closes the\n // first, causing a confusing mess.\n // https://html.spec.whatwg.org/multipage/syntax.html#special\n var specialTags = ['address', 'applet', 'area', 'article', 'aside', 'base', 'basefont', 'bgsound', 'blockquote', 'body', 'br', 'button', 'caption', 'center', 'col', 'colgroup', 'dd', 'details', 'dir', 'div', 'dl', 'dt', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'frame', 'frameset', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'iframe', 'img', 'input', 'isindex', 'li', 'link', 'listing', 'main', 'marquee', 'menu', 'menuitem', 'meta', 'nav', 'noembed', 'noframes', 'noscript', 'object', 'ol', 'p', 'param', 'plaintext', 'pre', 'script', 'section', 'select', 'source', 'style', 'summary', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'title', 'tr', 'track', 'ul', 'wbr', 'xmp']; // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope\n\n var inScopeTags = ['applet', 'caption', 'html', 'table', 'td', 'th', 'marquee', 'object', 'template', // https://html.spec.whatwg.org/multipage/syntax.html#html-integration-point\n // TODO: Distinguish by namespace here -- for <title>, including it here\n // errs on the side of fewer warnings\n 'foreignObject', 'desc', 'title']; // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-button-scope\n\n var buttonScopeTags = inScopeTags.concat(['button']); // https://html.spec.whatwg.org/multipage/syntax.html#generate-implied-end-tags\n\n var impliedEndTags = ['dd', 'dt', 'li', 'option', 'optgroup', 'p', 'rp', 'rt'];\n var emptyAncestorInfo = {\n current: null,\n formTag: null,\n aTagInScope: null,\n buttonTagInScope: null,\n nobrTagInScope: null,\n pTagInButtonScope: null,\n listItemTagAutoclosing: null,\n dlItemTagAutoclosing: null\n };\n\n updatedAncestorInfo = function (oldInfo, tag) {\n var ancestorInfo = assign({}, oldInfo || emptyAncestorInfo);\n\n var info = {\n tag: tag\n };\n\n if (inScopeTags.indexOf(tag) !== -1) {\n ancestorInfo.aTagInScope = null;\n ancestorInfo.buttonTagInScope = null;\n ancestorInfo.nobrTagInScope = null;\n }\n\n if (buttonScopeTags.indexOf(tag) !== -1) {\n ancestorInfo.pTagInButtonScope = null;\n } // See rules for 'li', 'dd', 'dt' start tags in\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody\n\n\n if (specialTags.indexOf(tag) !== -1 && tag !== 'address' && tag !== 'div' && tag !== 'p') {\n ancestorInfo.listItemTagAutoclosing = null;\n ancestorInfo.dlItemTagAutoclosing = null;\n }\n\n ancestorInfo.current = info;\n\n if (tag === 'form') {\n ancestorInfo.formTag = info;\n }\n\n if (tag === 'a') {\n ancestorInfo.aTagInScope = info;\n }\n\n if (tag === 'button') {\n ancestorInfo.buttonTagInScope = info;\n }\n\n if (tag === 'nobr') {\n ancestorInfo.nobrTagInScope = info;\n }\n\n if (tag === 'p') {\n ancestorInfo.pTagInButtonScope = info;\n }\n\n if (tag === 'li') {\n ancestorInfo.listItemTagAutoclosing = info;\n }\n\n if (tag === 'dd' || tag === 'dt') {\n ancestorInfo.dlItemTagAutoclosing = info;\n }\n\n return ancestorInfo;\n };\n /**\n * Returns whether\n */\n\n\n var isTagValidWithParent = function (tag, parentTag) {\n // First, let's check if we're in an unusual parsing mode...\n switch (parentTag) {\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inselect\n case 'select':\n return tag === 'option' || tag === 'optgroup' || tag === '#text';\n\n case 'optgroup':\n return tag === 'option' || tag === '#text';\n // Strictly speaking, seeing an <option> doesn't mean we're in a <select>\n // but\n\n case 'option':\n return tag === '#text';\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intd\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incaption\n // No special behavior since these rules fall back to \"in body\" mode for\n // all except special table nodes which cause bad parsing behavior anyway.\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intr\n\n case 'tr':\n return tag === 'th' || tag === 'td' || tag === 'style' || tag === 'script' || tag === 'template';\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intbody\n\n case 'tbody':\n case 'thead':\n case 'tfoot':\n return tag === 'tr' || tag === 'style' || tag === 'script' || tag === 'template';\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incolgroup\n\n case 'colgroup':\n return tag === 'col' || tag === 'template';\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intable\n\n case 'table':\n return tag === 'caption' || tag === 'colgroup' || tag === 'tbody' || tag === 'tfoot' || tag === 'thead' || tag === 'style' || tag === 'script' || tag === 'template';\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inhead\n\n case 'head':\n return tag === 'base' || tag === 'basefont' || tag === 'bgsound' || tag === 'link' || tag === 'meta' || tag === 'title' || tag === 'noscript' || tag === 'noframes' || tag === 'style' || tag === 'script' || tag === 'template';\n // https://html.spec.whatwg.org/multipage/semantics.html#the-html-element\n\n case 'html':\n return tag === 'head' || tag === 'body' || tag === 'frameset';\n\n case 'frameset':\n return tag === 'frame';\n\n case '#document':\n return tag === 'html';\n } // Probably in the \"in body\" parsing mode, so we outlaw only tag combos\n // where the parsing rules cause implicit opens or closes to be added.\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody\n\n\n switch (tag) {\n case 'h1':\n case 'h2':\n case 'h3':\n case 'h4':\n case 'h5':\n case 'h6':\n return parentTag !== 'h1' && parentTag !== 'h2' && parentTag !== 'h3' && parentTag !== 'h4' && parentTag !== 'h5' && parentTag !== 'h6';\n\n case 'rp':\n case 'rt':\n return impliedEndTags.indexOf(parentTag) === -1;\n\n case 'body':\n case 'caption':\n case 'col':\n case 'colgroup':\n case 'frameset':\n case 'frame':\n case 'head':\n case 'html':\n case 'tbody':\n case 'td':\n case 'tfoot':\n case 'th':\n case 'thead':\n case 'tr':\n // These tags are only valid with a few parents that have special child\n // parsing rules -- if we're down here, then none of those matched and\n // so we allow it only if we don't know what the parent is, as all other\n // cases are invalid.\n return parentTag == null;\n }\n\n return true;\n };\n /**\n * Returns whether\n */\n\n\n var findInvalidAncestorForTag = function (tag, ancestorInfo) {\n switch (tag) {\n case 'address':\n case 'article':\n case 'aside':\n case 'blockquote':\n case 'center':\n case 'details':\n case 'dialog':\n case 'dir':\n case 'div':\n case 'dl':\n case 'fieldset':\n case 'figcaption':\n case 'figure':\n case 'footer':\n case 'header':\n case 'hgroup':\n case 'main':\n case 'menu':\n case 'nav':\n case 'ol':\n case 'p':\n case 'section':\n case 'summary':\n case 'ul':\n case 'pre':\n case 'listing':\n case 'table':\n case 'hr':\n case 'xmp':\n case 'h1':\n case 'h2':\n case 'h3':\n case 'h4':\n case 'h5':\n case 'h6':\n return ancestorInfo.pTagInButtonScope;\n\n case 'form':\n return ancestorInfo.formTag || ancestorInfo.pTagInButtonScope;\n\n case 'li':\n return ancestorInfo.listItemTagAutoclosing;\n\n case 'dd':\n case 'dt':\n return ancestorInfo.dlItemTagAutoclosing;\n\n case 'button':\n return ancestorInfo.buttonTagInScope;\n\n case 'a':\n // Spec says something about storing a list of markers, but it sounds\n // equivalent to this check.\n return ancestorInfo.aTagInScope;\n\n case 'nobr':\n return ancestorInfo.nobrTagInScope;\n }\n\n return null;\n };\n\n var didWarn$1 = {};\n\n validateDOMNesting = function (childTag, childText, ancestorInfo) {\n ancestorInfo = ancestorInfo || emptyAncestorInfo;\n var parentInfo = ancestorInfo.current;\n var parentTag = parentInfo && parentInfo.tag;\n\n if (childText != null) {\n if (childTag != null) {\n error('validateDOMNesting: when childText is passed, childTag should be null');\n }\n\n childTag = '#text';\n }\n\n var invalidParent = isTagValidWithParent(childTag, parentTag) ? null : parentInfo;\n var invalidAncestor = invalidParent ? null : findInvalidAncestorForTag(childTag, ancestorInfo);\n var invalidParentOrAncestor = invalidParent || invalidAncestor;\n\n if (!invalidParentOrAncestor) {\n return;\n }\n\n var ancestorTag = invalidParentOrAncestor.tag;\n var warnKey = !!invalidParent + '|' + childTag + '|' + ancestorTag;\n\n if (didWarn$1[warnKey]) {\n return;\n }\n\n didWarn$1[warnKey] = true;\n var tagDisplayName = childTag;\n var whitespaceInfo = '';\n\n if (childTag === '#text') {\n if (/\\S/.test(childText)) {\n tagDisplayName = 'Text nodes';\n } else {\n tagDisplayName = 'Whitespace text nodes';\n whitespaceInfo = \" Make sure you don't have any extra whitespace between tags on \" + 'each line of your source code.';\n }\n } else {\n tagDisplayName = '<' + childTag + '>';\n }\n\n if (invalidParent) {\n var info = '';\n\n if (ancestorTag === 'table' && childTag === 'tr') {\n info += ' Add a <tbody>, <thead> or <tfoot> to your code to match the DOM tree generated by ' + 'the browser.';\n }\n\n error('validateDOMNesting(...): %s cannot appear as a child of <%s>.%s%s', tagDisplayName, ancestorTag, whitespaceInfo, info);\n } else {\n error('validateDOMNesting(...): %s cannot appear as a descendant of ' + '<%s>.', tagDisplayName, ancestorTag);\n }\n };\n}\n\nvar SUPPRESS_HYDRATION_WARNING$1 = 'suppressHydrationWarning';\nvar SUSPENSE_START_DATA = '$';\nvar SUSPENSE_END_DATA = '/$';\nvar SUSPENSE_PENDING_START_DATA = '$?';\nvar SUSPENSE_FALLBACK_START_DATA = '$!';\nvar STYLE$1 = 'style';\nvar eventsEnabled = null;\nvar selectionInformation = null;\nfunction getRootHostContext(rootContainerInstance) {\n var type;\n var namespace;\n var nodeType = rootContainerInstance.nodeType;\n\n switch (nodeType) {\n case DOCUMENT_NODE:\n case DOCUMENT_FRAGMENT_NODE:\n {\n type = nodeType === DOCUMENT_NODE ? '#document' : '#fragment';\n var root = rootContainerInstance.documentElement;\n namespace = root ? root.namespaceURI : getChildNamespace(null, '');\n break;\n }\n\n default:\n {\n var container = nodeType === COMMENT_NODE ? rootContainerInstance.parentNode : rootContainerInstance;\n var ownNamespace = container.namespaceURI || null;\n type = container.tagName;\n namespace = getChildNamespace(ownNamespace, type);\n break;\n }\n }\n\n {\n var validatedTag = type.toLowerCase();\n var ancestorInfo = updatedAncestorInfo(null, validatedTag);\n return {\n namespace: namespace,\n ancestorInfo: ancestorInfo\n };\n }\n}\nfunction getChildHostContext(parentHostContext, type, rootContainerInstance) {\n {\n var parentHostContextDev = parentHostContext;\n var namespace = getChildNamespace(parentHostContextDev.namespace, type);\n var ancestorInfo = updatedAncestorInfo(parentHostContextDev.ancestorInfo, type);\n return {\n namespace: namespace,\n ancestorInfo: ancestorInfo\n };\n }\n}\nfunction getPublicInstance(instance) {\n return instance;\n}\nfunction prepareForCommit(containerInfo) {\n eventsEnabled = isEnabled();\n selectionInformation = getSelectionInformation();\n var activeInstance = null;\n\n setEnabled(false);\n return activeInstance;\n}\nfunction resetAfterCommit(containerInfo) {\n restoreSelection(selectionInformation);\n setEnabled(eventsEnabled);\n eventsEnabled = null;\n selectionInformation = null;\n}\nfunction createInstance(type, props, rootContainerInstance, hostContext, internalInstanceHandle) {\n var parentNamespace;\n\n {\n // TODO: take namespace into account when validating.\n var hostContextDev = hostContext;\n validateDOMNesting(type, null, hostContextDev.ancestorInfo);\n\n if (typeof props.children === 'string' || typeof props.children === 'number') {\n var string = '' + props.children;\n var ownAncestorInfo = updatedAncestorInfo(hostContextDev.ancestorInfo, type);\n validateDOMNesting(null, string, ownAncestorInfo);\n }\n\n parentNamespace = hostContextDev.namespace;\n }\n\n var domElement = createElement(type, props, rootContainerInstance, parentNamespace);\n precacheFiberNode(internalInstanceHandle, domElement);\n updateFiberProps(domElement, props);\n return domElement;\n}\nfunction appendInitialChild(parentInstance, child) {\n parentInstance.appendChild(child);\n}\nfunction finalizeInitialChildren(domElement, type, props, rootContainerInstance, hostContext) {\n setInitialProperties(domElement, type, props, rootContainerInstance);\n\n switch (type) {\n case 'button':\n case 'input':\n case 'select':\n case 'textarea':\n return !!props.autoFocus;\n\n case 'img':\n return true;\n\n default:\n return false;\n }\n}\nfunction prepareUpdate(domElement, type, oldProps, newProps, rootContainerInstance, hostContext) {\n {\n var hostContextDev = hostContext;\n\n if (typeof newProps.children !== typeof oldProps.children && (typeof newProps.children === 'string' || typeof newProps.children === 'number')) {\n var string = '' + newProps.children;\n var ownAncestorInfo = updatedAncestorInfo(hostContextDev.ancestorInfo, type);\n validateDOMNesting(null, string, ownAncestorInfo);\n }\n }\n\n return diffProperties(domElement, type, oldProps, newProps);\n}\nfunction shouldSetTextContent(type, props) {\n return type === 'textarea' || type === 'noscript' || typeof props.children === 'string' || typeof props.children === 'number' || typeof props.dangerouslySetInnerHTML === 'object' && props.dangerouslySetInnerHTML !== null && props.dangerouslySetInnerHTML.__html != null;\n}\nfunction createTextInstance(text, rootContainerInstance, hostContext, internalInstanceHandle) {\n {\n var hostContextDev = hostContext;\n validateDOMNesting(null, text, hostContextDev.ancestorInfo);\n }\n\n var textNode = createTextNode(text, rootContainerInstance);\n precacheFiberNode(internalInstanceHandle, textNode);\n return textNode;\n}\nfunction getCurrentEventPriority() {\n var currentEvent = window.event;\n\n if (currentEvent === undefined) {\n return DefaultEventPriority;\n }\n\n return getEventPriority(currentEvent.type);\n}\n// if a component just imports ReactDOM (e.g. for findDOMNode).\n// Some environments might not have setTimeout or clearTimeout.\n\nvar scheduleTimeout = typeof setTimeout === 'function' ? setTimeout : undefined;\nvar cancelTimeout = typeof clearTimeout === 'function' ? clearTimeout : undefined;\nvar noTimeout = -1;\nvar localPromise = typeof Promise === 'function' ? Promise : undefined; // -------------------\nvar scheduleMicrotask = typeof queueMicrotask === 'function' ? queueMicrotask : typeof localPromise !== 'undefined' ? function (callback) {\n return localPromise.resolve(null).then(callback).catch(handleErrorInNextTick);\n} : scheduleTimeout; // TODO: Determine the best fallback here.\n\nfunction handleErrorInNextTick(error) {\n setTimeout(function () {\n throw error;\n });\n} // -------------------\nfunction commitMount(domElement, type, newProps, internalInstanceHandle) {\n // Despite the naming that might imply otherwise, this method only\n // fires if there is an `Update` effect scheduled during mounting.\n // This happens if `finalizeInitialChildren` returns `true` (which it\n // does to implement the `autoFocus` attribute on the client). But\n // there are also other cases when this might happen (such as patching\n // up text content during hydration mismatch). So we'll check this again.\n switch (type) {\n case 'button':\n case 'input':\n case 'select':\n case 'textarea':\n if (newProps.autoFocus) {\n domElement.focus();\n }\n\n return;\n\n case 'img':\n {\n if (newProps.src) {\n domElement.src = newProps.src;\n }\n\n return;\n }\n }\n}\nfunction commitUpdate(domElement, updatePayload, type, oldProps, newProps, internalInstanceHandle) {\n // Apply the diff to the DOM node.\n updateProperties(domElement, updatePayload, type, oldProps, newProps); // Update the props handle so that we know which props are the ones with\n // with current event handlers.\n\n updateFiberProps(domElement, newProps);\n}\nfunction resetTextContent(domElement) {\n setTextContent(domElement, '');\n}\nfunction commitTextUpdate(textInstance, oldText, newText) {\n textInstance.nodeValue = newText;\n}\nfunction appendChild(parentInstance, child) {\n parentInstance.appendChild(child);\n}\nfunction appendChildToContainer(container, child) {\n var parentNode;\n\n if (container.nodeType === COMMENT_NODE) {\n parentNode = container.parentNode;\n parentNode.insertBefore(child, container);\n } else {\n parentNode = container;\n parentNode.appendChild(child);\n } // This container might be used for a portal.\n // If something inside a portal is clicked, that click should bubble\n // through the React tree. However, on Mobile Safari the click would\n // never bubble through the *DOM* tree unless an ancestor with onclick\n // event exists. So we wouldn't see it and dispatch it.\n // This is why we ensure that non React root containers have inline onclick\n // defined.\n // https://github.com/facebook/react/issues/11918\n\n\n var reactRootContainer = container._reactRootContainer;\n\n if ((reactRootContainer === null || reactRootContainer === undefined) && parentNode.onclick === null) {\n // TODO: This cast may not be sound for SVG, MathML or custom elements.\n trapClickOnNonInteractiveElement(parentNode);\n }\n}\nfunction insertBefore(parentInstance, child, beforeChild) {\n parentInstance.insertBefore(child, beforeChild);\n}\nfunction insertInContainerBefore(container, child, beforeChild) {\n if (container.nodeType === COMMENT_NODE) {\n container.parentNode.insertBefore(child, beforeChild);\n } else {\n container.insertBefore(child, beforeChild);\n }\n}\n\nfunction removeChild(parentInstance, child) {\n parentInstance.removeChild(child);\n}\nfunction removeChildFromContainer(container, child) {\n if (container.nodeType === COMMENT_NODE) {\n container.parentNode.removeChild(child);\n } else {\n container.removeChild(child);\n }\n}\nfunction clearSuspenseBoundary(parentInstance, suspenseInstance) {\n var node = suspenseInstance; // Delete all nodes within this suspense boundary.\n // There might be nested nodes so we need to keep track of how\n // deep we are and only break out when we're back on top.\n\n var depth = 0;\n\n do {\n var nextNode = node.nextSibling;\n parentInstance.removeChild(node);\n\n if (nextNode && nextNode.nodeType === COMMENT_NODE) {\n var data = nextNode.data;\n\n if (data === SUSPENSE_END_DATA) {\n if (depth === 0) {\n parentInstance.removeChild(nextNode); // Retry if any event replaying was blocked on this.\n\n retryIfBlockedOn(suspenseInstance);\n return;\n } else {\n depth--;\n }\n } else if (data === SUSPENSE_START_DATA || data === SUSPENSE_PENDING_START_DATA || data === SUSPENSE_FALLBACK_START_DATA) {\n depth++;\n }\n }\n\n node = nextNode;\n } while (node); // TODO: Warn, we didn't find the end comment boundary.\n // Retry if any event replaying was blocked on this.\n\n\n retryIfBlockedOn(suspenseInstance);\n}\nfunction clearSuspenseBoundaryFromContainer(container, suspenseInstance) {\n if (container.nodeType === COMMENT_NODE) {\n clearSuspenseBoundary(container.parentNode, suspenseInstance);\n } else if (container.nodeType === ELEMENT_NODE) {\n clearSuspenseBoundary(container, suspenseInstance);\n } // Retry if any event replaying was blocked on this.\n\n\n retryIfBlockedOn(container);\n}\nfunction hideInstance(instance) {\n // TODO: Does this work for all element types? What about MathML? Should we\n // pass host context to this method?\n instance = instance;\n var style = instance.style;\n\n if (typeof style.setProperty === 'function') {\n style.setProperty('display', 'none', 'important');\n } else {\n style.display = 'none';\n }\n}\nfunction hideTextInstance(textInstance) {\n textInstance.nodeValue = '';\n}\nfunction unhideInstance(instance, props) {\n instance = instance;\n var styleProp = props[STYLE$1];\n var display = styleProp !== undefined && styleProp !== null && styleProp.hasOwnProperty('display') ? styleProp.display : null;\n instance.style.display = dangerousStyleValue('display', display);\n}\nfunction unhideTextInstance(textInstance, text) {\n textInstance.nodeValue = text;\n}\nfunction clearContainer(container) {\n if (container.nodeType === ELEMENT_NODE) {\n container.textContent = '';\n } else if (container.nodeType === DOCUMENT_NODE) {\n if (container.documentElement) {\n container.removeChild(container.documentElement);\n }\n }\n} // -------------------\nfunction canHydrateInstance(instance, type, props) {\n if (instance.nodeType !== ELEMENT_NODE || type.toLowerCase() !== instance.nodeName.toLowerCase()) {\n return null;\n } // This has now been refined to an element node.\n\n\n return instance;\n}\nfunction canHydrateTextInstance(instance, text) {\n if (text === '' || instance.nodeType !== TEXT_NODE) {\n // Empty strings are not parsed by HTML so there won't be a correct match here.\n return null;\n } // This has now been refined to a text node.\n\n\n return instance;\n}\nfunction canHydrateSuspenseInstance(instance) {\n if (instance.nodeType !== COMMENT_NODE) {\n // Empty strings are not parsed by HTML so there won't be a correct match here.\n return null;\n } // This has now been refined to a suspense node.\n\n\n return instance;\n}\nfunction isSuspenseInstancePending(instance) {\n return instance.data === SUSPENSE_PENDING_START_DATA;\n}\nfunction isSuspenseInstanceFallback(instance) {\n return instance.data === SUSPENSE_FALLBACK_START_DATA;\n}\nfunction getSuspenseInstanceFallbackErrorDetails(instance) {\n var dataset = instance.nextSibling && instance.nextSibling.dataset;\n var digest, message, stack;\n\n if (dataset) {\n digest = dataset.dgst;\n\n {\n message = dataset.msg;\n stack = dataset.stck;\n }\n }\n\n {\n return {\n message: message,\n digest: digest,\n stack: stack\n };\n } // let value = {message: undefined, hash: undefined};\n // const nextSibling = instance.nextSibling;\n // if (nextSibling) {\n // const dataset = ((nextSibling: any): HTMLTemplateElement).dataset;\n // value.message = dataset.msg;\n // value.hash = dataset.hash;\n // if (true) {\n // value.stack = dataset.stack;\n // }\n // }\n // return value;\n\n}\nfunction registerSuspenseInstanceRetry(instance, callback) {\n instance._reactRetry = callback;\n}\n\nfunction getNextHydratable(node) {\n // Skip non-hydratable nodes.\n for (; node != null; node = node.nextSibling) {\n var nodeType = node.nodeType;\n\n if (nodeType === ELEMENT_NODE || nodeType === TEXT_NODE) {\n break;\n }\n\n if (nodeType === COMMENT_NODE) {\n var nodeData = node.data;\n\n if (nodeData === SUSPENSE_START_DATA || nodeData === SUSPENSE_FALLBACK_START_DATA || nodeData === SUSPENSE_PENDING_START_DATA) {\n break;\n }\n\n if (nodeData === SUSPENSE_END_DATA) {\n return null;\n }\n }\n }\n\n return node;\n}\n\nfunction getNextHydratableSibling(instance) {\n return getNextHydratable(instance.nextSibling);\n}\nfunction getFirstHydratableChild(parentInstance) {\n return getNextHydratable(parentInstance.firstChild);\n}\nfunction getFirstHydratableChildWithinContainer(parentContainer) {\n return getNextHydratable(parentContainer.firstChild);\n}\nfunction getFirstHydratableChildWithinSuspenseInstance(parentInstance) {\n return getNextHydratable(parentInstance.nextSibling);\n}\nfunction hydrateInstance(instance, type, props, rootContainerInstance, hostContext, internalInstanceHandle, shouldWarnDev) {\n precacheFiberNode(internalInstanceHandle, instance); // TODO: Possibly defer this until the commit phase where all the events\n // get attached.\n\n updateFiberProps(instance, props);\n var parentNamespace;\n\n {\n var hostContextDev = hostContext;\n parentNamespace = hostContextDev.namespace;\n } // TODO: Temporary hack to check if we're in a concurrent root. We can delete\n // when the legacy root API is removed.\n\n\n var isConcurrentMode = (internalInstanceHandle.mode & ConcurrentMode) !== NoMode;\n return diffHydratedProperties(instance, type, props, parentNamespace, rootContainerInstance, isConcurrentMode, shouldWarnDev);\n}\nfunction hydrateTextInstance(textInstance, text, internalInstanceHandle, shouldWarnDev) {\n precacheFiberNode(internalInstanceHandle, textInstance); // TODO: Temporary hack to check if we're in a concurrent root. We can delete\n // when the legacy root API is removed.\n\n var isConcurrentMode = (internalInstanceHandle.mode & ConcurrentMode) !== NoMode;\n return diffHydratedText(textInstance, text);\n}\nfunction hydrateSuspenseInstance(suspenseInstance, internalInstanceHandle) {\n precacheFiberNode(internalInstanceHandle, suspenseInstance);\n}\nfunction getNextHydratableInstanceAfterSuspenseInstance(suspenseInstance) {\n var node = suspenseInstance.nextSibling; // Skip past all nodes within this suspense boundary.\n // There might be nested nodes so we need to keep track of how\n // deep we are and only break out when we're back on top.\n\n var depth = 0;\n\n while (node) {\n if (node.nodeType === COMMENT_NODE) {\n var data = node.data;\n\n if (data === SUSPENSE_END_DATA) {\n if (depth === 0) {\n return getNextHydratableSibling(node);\n } else {\n depth--;\n }\n } else if (data === SUSPENSE_START_DATA || data === SUSPENSE_FALLBACK_START_DATA || data === SUSPENSE_PENDING_START_DATA) {\n depth++;\n }\n }\n\n node = node.nextSibling;\n } // TODO: Warn, we didn't find the end comment boundary.\n\n\n return null;\n} // Returns the SuspenseInstance if this node is a direct child of a\n// SuspenseInstance. I.e. if its previous sibling is a Comment with\n// SUSPENSE_x_START_DATA. Otherwise, null.\n\nfunction getParentSuspenseInstance(targetInstance) {\n var node = targetInstance.previousSibling; // Skip past all nodes within this suspense boundary.\n // There might be nested nodes so we need to keep track of how\n // deep we are and only break out when we're back on top.\n\n var depth = 0;\n\n while (node) {\n if (node.nodeType === COMMENT_NODE) {\n var data = node.data;\n\n if (data === SUSPENSE_START_DATA || data === SUSPENSE_FALLBACK_START_DATA || data === SUSPENSE_PENDING_START_DATA) {\n if (depth === 0) {\n return node;\n } else {\n depth--;\n }\n } else if (data === SUSPENSE_END_DATA) {\n depth++;\n }\n }\n\n node = node.previousSibling;\n }\n\n return null;\n}\nfunction commitHydratedContainer(container) {\n // Retry if any event replaying was blocked on this.\n retryIfBlockedOn(container);\n}\nfunction commitHydratedSuspenseInstance(suspenseInstance) {\n // Retry if any event replaying was blocked on this.\n retryIfBlockedOn(suspenseInstance);\n}\nfunction shouldDeleteUnhydratedTailInstances(parentType) {\n return parentType !== 'head' && parentType !== 'body';\n}\nfunction didNotMatchHydratedContainerTextInstance(parentContainer, textInstance, text, isConcurrentMode) {\n var shouldWarnDev = true;\n checkForUnmatchedText(textInstance.nodeValue, text, isConcurrentMode, shouldWarnDev);\n}\nfunction didNotMatchHydratedTextInstance(parentType, parentProps, parentInstance, textInstance, text, isConcurrentMode) {\n if (parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) {\n var shouldWarnDev = true;\n checkForUnmatchedText(textInstance.nodeValue, text, isConcurrentMode, shouldWarnDev);\n }\n}\nfunction didNotHydrateInstanceWithinContainer(parentContainer, instance) {\n {\n if (instance.nodeType === ELEMENT_NODE) {\n warnForDeletedHydratableElement(parentContainer, instance);\n } else if (instance.nodeType === COMMENT_NODE) ; else {\n warnForDeletedHydratableText(parentContainer, instance);\n }\n }\n}\nfunction didNotHydrateInstanceWithinSuspenseInstance(parentInstance, instance) {\n {\n // $FlowFixMe: Only Element or Document can be parent nodes.\n var parentNode = parentInstance.parentNode;\n\n if (parentNode !== null) {\n if (instance.nodeType === ELEMENT_NODE) {\n warnForDeletedHydratableElement(parentNode, instance);\n } else if (instance.nodeType === COMMENT_NODE) ; else {\n warnForDeletedHydratableText(parentNode, instance);\n }\n }\n }\n}\nfunction didNotHydrateInstance(parentType, parentProps, parentInstance, instance, isConcurrentMode) {\n {\n if (isConcurrentMode || parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) {\n if (instance.nodeType === ELEMENT_NODE) {\n warnForDeletedHydratableElement(parentInstance, instance);\n } else if (instance.nodeType === COMMENT_NODE) ; else {\n warnForDeletedHydratableText(parentInstance, instance);\n }\n }\n }\n}\nfunction didNotFindHydratableInstanceWithinContainer(parentContainer, type, props) {\n {\n warnForInsertedHydratedElement(parentContainer, type);\n }\n}\nfunction didNotFindHydratableTextInstanceWithinContainer(parentContainer, text) {\n {\n warnForInsertedHydratedText(parentContainer, text);\n }\n}\nfunction didNotFindHydratableInstanceWithinSuspenseInstance(parentInstance, type, props) {\n {\n // $FlowFixMe: Only Element or Document can be parent nodes.\n var parentNode = parentInstance.parentNode;\n if (parentNode !== null) warnForInsertedHydratedElement(parentNode, type);\n }\n}\nfunction didNotFindHydratableTextInstanceWithinSuspenseInstance(parentInstance, text) {\n {\n // $FlowFixMe: Only Element or Document can be parent nodes.\n var parentNode = parentInstance.parentNode;\n if (parentNode !== null) warnForInsertedHydratedText(parentNode, text);\n }\n}\nfunction didNotFindHydratableInstance(parentType, parentProps, parentInstance, type, props, isConcurrentMode) {\n {\n if (isConcurrentMode || parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) {\n warnForInsertedHydratedElement(parentInstance, type);\n }\n }\n}\nfunction didNotFindHydratableTextInstance(parentType, parentProps, parentInstance, text, isConcurrentMode) {\n {\n if (isConcurrentMode || parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) {\n warnForInsertedHydratedText(parentInstance, text);\n }\n }\n}\nfunction errorHydratingContainer(parentContainer) {\n {\n // TODO: This gets logged by onRecoverableError, too, so we should be\n // able to remove it.\n error('An error occurred during hydration. The server HTML was replaced with client content in <%s>.', parentContainer.nodeName.toLowerCase());\n }\n}\nfunction preparePortalMount(portalInstance) {\n listenToAllSupportedEvents(portalInstance);\n}\n\nvar randomKey = Math.random().toString(36).slice(2);\nvar internalInstanceKey = '__reactFiber$' + randomKey;\nvar internalPropsKey = '__reactProps$' + randomKey;\nvar internalContainerInstanceKey = '__reactContainer$' + randomKey;\nvar internalEventHandlersKey = '__reactEvents$' + randomKey;\nvar internalEventHandlerListenersKey = '__reactListeners$' + randomKey;\nvar internalEventHandlesSetKey = '__reactHandles$' + randomKey;\nfunction detachDeletedInstance(node) {\n // TODO: This function is only called on host components. I don't think all of\n // these fields are relevant.\n delete node[internalInstanceKey];\n delete node[internalPropsKey];\n delete node[internalEventHandlersKey];\n delete node[internalEventHandlerListenersKey];\n delete node[internalEventHandlesSetKey];\n}\nfunction precacheFiberNode(hostInst, node) {\n node[internalInstanceKey] = hostInst;\n}\nfunction markContainerAsRoot(hostRoot, node) {\n node[internalContainerInstanceKey] = hostRoot;\n}\nfunction unmarkContainerAsRoot(node) {\n node[internalContainerInstanceKey] = null;\n}\nfunction isContainerMarkedAsRoot(node) {\n return !!node[internalContainerInstanceKey];\n} // Given a DOM node, return the closest HostComponent or HostText fiber ancestor.\n// If the target node is part of a hydrated or not yet rendered subtree, then\n// this may also return a SuspenseComponent or HostRoot to indicate that.\n// Conceptually the HostRoot fiber is a child of the Container node. So if you\n// pass the Container node as the targetNode, you will not actually get the\n// HostRoot back. To get to the HostRoot, you need to pass a child of it.\n// The same thing applies to Suspense boundaries.\n\nfunction getClosestInstanceFromNode(targetNode) {\n var targetInst = targetNode[internalInstanceKey];\n\n if (targetInst) {\n // Don't return HostRoot or SuspenseComponent here.\n return targetInst;\n } // If the direct event target isn't a React owned DOM node, we need to look\n // to see if one of its parents is a React owned DOM node.\n\n\n var parentNode = targetNode.parentNode;\n\n while (parentNode) {\n // We'll check if this is a container root that could include\n // React nodes in the future. We need to check this first because\n // if we're a child of a dehydrated container, we need to first\n // find that inner container before moving on to finding the parent\n // instance. Note that we don't check this field on the targetNode\n // itself because the fibers are conceptually between the container\n // node and the first child. It isn't surrounding the container node.\n // If it's not a container, we check if it's an instance.\n targetInst = parentNode[internalContainerInstanceKey] || parentNode[internalInstanceKey];\n\n if (targetInst) {\n // Since this wasn't the direct target of the event, we might have\n // stepped past dehydrated DOM nodes to get here. However they could\n // also have been non-React nodes. We need to answer which one.\n // If we the instance doesn't have any children, then there can't be\n // a nested suspense boundary within it. So we can use this as a fast\n // bailout. Most of the time, when people add non-React children to\n // the tree, it is using a ref to a child-less DOM node.\n // Normally we'd only need to check one of the fibers because if it\n // has ever gone from having children to deleting them or vice versa\n // it would have deleted the dehydrated boundary nested inside already.\n // However, since the HostRoot starts out with an alternate it might\n // have one on the alternate so we need to check in case this was a\n // root.\n var alternate = targetInst.alternate;\n\n if (targetInst.child !== null || alternate !== null && alternate.child !== null) {\n // Next we need to figure out if the node that skipped past is\n // nested within a dehydrated boundary and if so, which one.\n var suspenseInstance = getParentSuspenseInstance(targetNode);\n\n while (suspenseInstance !== null) {\n // We found a suspense instance. That means that we haven't\n // hydrated it yet. Even though we leave the comments in the\n // DOM after hydrating, and there are boundaries in the DOM\n // that could already be hydrated, we wouldn't have found them\n // through this pass since if the target is hydrated it would\n // have had an internalInstanceKey on it.\n // Let's get the fiber associated with the SuspenseComponent\n // as the deepest instance.\n var targetSuspenseInst = suspenseInstance[internalInstanceKey];\n\n if (targetSuspenseInst) {\n return targetSuspenseInst;\n } // If we don't find a Fiber on the comment, it might be because\n // we haven't gotten to hydrate it yet. There might still be a\n // parent boundary that hasn't above this one so we need to find\n // the outer most that is known.\n\n\n suspenseInstance = getParentSuspenseInstance(suspenseInstance); // If we don't find one, then that should mean that the parent\n // host component also hasn't hydrated yet. We can return it\n // below since it will bail out on the isMounted check later.\n }\n }\n\n return targetInst;\n }\n\n targetNode = parentNode;\n parentNode = targetNode.parentNode;\n }\n\n return null;\n}\n/**\n * Given a DOM node, return the ReactDOMComponent or ReactDOMTextComponent\n * instance, or null if the node was not rendered by this React.\n */\n\nfunction getInstanceFromNode(node) {\n var inst = node[internalInstanceKey] || node[internalContainerInstanceKey];\n\n if (inst) {\n if (inst.tag === HostComponent || inst.tag === HostText || inst.tag === SuspenseComponent || inst.tag === HostRoot) {\n return inst;\n } else {\n return null;\n }\n }\n\n return null;\n}\n/**\n * Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding\n * DOM node.\n */\n\nfunction getNodeFromInstance(inst) {\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber this, is just the state node right now. We assume it will be\n // a host component or host text.\n return inst.stateNode;\n } // Without this first invariant, passing a non-DOM-component triggers the next\n // invariant for a missing parent, which is super confusing.\n\n\n throw new Error('getNodeFromInstance: Invalid argument.');\n}\nfunction getFiberCurrentPropsFromNode(node) {\n return node[internalPropsKey] || null;\n}\nfunction updateFiberProps(node, props) {\n node[internalPropsKey] = props;\n}\nfunction getEventListenerSet(node) {\n var elementListenerSet = node[internalEventHandlersKey];\n\n if (elementListenerSet === undefined) {\n elementListenerSet = node[internalEventHandlersKey] = new Set();\n }\n\n return elementListenerSet;\n}\n\nvar loggedTypeFailures = {};\nvar ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;\n\nfunction setCurrentlyValidatingElement(element) {\n {\n if (element) {\n var owner = element._owner;\n var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n ReactDebugCurrentFrame$1.setExtraStackFrame(stack);\n } else {\n ReactDebugCurrentFrame$1.setExtraStackFrame(null);\n }\n }\n}\n\nfunction checkPropTypes(typeSpecs, values, location, componentName, element) {\n {\n // $FlowFixMe This is okay but Flow doesn't know it.\n var has = Function.call.bind(hasOwnProperty);\n\n for (var typeSpecName in typeSpecs) {\n if (has(typeSpecs, typeSpecName)) {\n var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n if (typeof typeSpecs[typeSpecName] !== 'function') {\n // eslint-disable-next-line react-internal/prod-error-codes\n var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');\n err.name = 'Invariant Violation';\n throw err;\n }\n\n error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');\n } catch (ex) {\n error$1 = ex;\n }\n\n if (error$1 && !(error$1 instanceof Error)) {\n setCurrentlyValidatingElement(element);\n\n error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1);\n\n setCurrentlyValidatingElement(null);\n }\n\n if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error$1.message] = true;\n setCurrentlyValidatingElement(element);\n\n error('Failed %s type: %s', location, error$1.message);\n\n setCurrentlyValidatingElement(null);\n }\n }\n }\n }\n}\n\nvar valueStack = [];\nvar fiberStack;\n\n{\n fiberStack = [];\n}\n\nvar index = -1;\n\nfunction createCursor(defaultValue) {\n return {\n current: defaultValue\n };\n}\n\nfunction pop(cursor, fiber) {\n if (index < 0) {\n {\n error('Unexpected pop.');\n }\n\n return;\n }\n\n {\n if (fiber !== fiberStack[index]) {\n error('Unexpected Fiber popped.');\n }\n }\n\n cursor.current = valueStack[index];\n valueStack[index] = null;\n\n {\n fiberStack[index] = null;\n }\n\n index--;\n}\n\nfunction push(cursor, value, fiber) {\n index++;\n valueStack[index] = cursor.current;\n\n {\n fiberStack[index] = fiber;\n }\n\n cursor.current = value;\n}\n\nvar warnedAboutMissingGetChildContext;\n\n{\n warnedAboutMissingGetChildContext = {};\n}\n\nvar emptyContextObject = {};\n\n{\n Object.freeze(emptyContextObject);\n} // A cursor to the current merged context object on the stack.\n\n\nvar contextStackCursor = createCursor(emptyContextObject); // A cursor to a boolean indicating whether the context has changed.\n\nvar didPerformWorkStackCursor = createCursor(false); // Keep track of the previous context object that was on the stack.\n// We use this to get access to the parent context after we have already\n// pushed the next context provider, and now need to merge their contexts.\n\nvar previousContext = emptyContextObject;\n\nfunction getUnmaskedContext(workInProgress, Component, didPushOwnContextIfProvider) {\n {\n if (didPushOwnContextIfProvider && isContextProvider(Component)) {\n // If the fiber is a context provider itself, when we read its context\n // we may have already pushed its own child context on the stack. A context\n // provider should not \"see\" its own child context. Therefore we read the\n // previous (parent) context instead for a context provider.\n return previousContext;\n }\n\n return contextStackCursor.current;\n }\n}\n\nfunction cacheContext(workInProgress, unmaskedContext, maskedContext) {\n {\n var instance = workInProgress.stateNode;\n instance.__reactInternalMemoizedUnmaskedChildContext = unmaskedContext;\n instance.__reactInternalMemoizedMaskedChildContext = maskedContext;\n }\n}\n\nfunction getMaskedContext(workInProgress, unmaskedContext) {\n {\n var type = workInProgress.type;\n var contextTypes = type.contextTypes;\n\n if (!contextTypes) {\n return emptyContextObject;\n } // Avoid recreating masked context unless unmasked context has changed.\n // Failing to do this will result in unnecessary calls to componentWillReceiveProps.\n // This may trigger infinite loops if componentWillReceiveProps calls setState.\n\n\n var instance = workInProgress.stateNode;\n\n if (instance && instance.__reactInternalMemoizedUnmaskedChildContext === unmaskedContext) {\n return instance.__reactInternalMemoizedMaskedChildContext;\n }\n\n var context = {};\n\n for (var key in contextTypes) {\n context[key] = unmaskedContext[key];\n }\n\n {\n var name = getComponentNameFromFiber(workInProgress) || 'Unknown';\n checkPropTypes(contextTypes, context, 'context', name);\n } // Cache unmasked context so we can avoid recreating masked context unless necessary.\n // Context is created before the class component is instantiated so check for instance.\n\n\n if (instance) {\n cacheContext(workInProgress, unmaskedContext, context);\n }\n\n return context;\n }\n}\n\nfunction hasContextChanged() {\n {\n return didPerformWorkStackCursor.current;\n }\n}\n\nfunction isContextProvider(type) {\n {\n var childContextTypes = type.childContextTypes;\n return childContextTypes !== null && childContextTypes !== undefined;\n }\n}\n\nfunction popContext(fiber) {\n {\n pop(didPerformWorkStackCursor, fiber);\n pop(contextStackCursor, fiber);\n }\n}\n\nfunction popTopLevelContextObject(fiber) {\n {\n pop(didPerformWorkStackCursor, fiber);\n pop(contextStackCursor, fiber);\n }\n}\n\nfunction pushTopLevelContextObject(fiber, context, didChange) {\n {\n if (contextStackCursor.current !== emptyContextObject) {\n throw new Error('Unexpected context found on stack. ' + 'This error is likely caused by a bug in React. Please file an issue.');\n }\n\n push(contextStackCursor, context, fiber);\n push(didPerformWorkStackCursor, didChange, fiber);\n }\n}\n\nfunction processChildContext(fiber, type, parentContext) {\n {\n var instance = fiber.stateNode;\n var childContextTypes = type.childContextTypes; // TODO (bvaughn) Replace this behavior with an invariant() in the future.\n // It has only been added in Fiber to match the (unintentional) behavior in Stack.\n\n if (typeof instance.getChildContext !== 'function') {\n {\n var componentName = getComponentNameFromFiber(fiber) || 'Unknown';\n\n if (!warnedAboutMissingGetChildContext[componentName]) {\n warnedAboutMissingGetChildContext[componentName] = true;\n\n error('%s.childContextTypes is specified but there is no getChildContext() method ' + 'on the instance. You can either define getChildContext() on %s or remove ' + 'childContextTypes from it.', componentName, componentName);\n }\n }\n\n return parentContext;\n }\n\n var childContext = instance.getChildContext();\n\n for (var contextKey in childContext) {\n if (!(contextKey in childContextTypes)) {\n throw new Error((getComponentNameFromFiber(fiber) || 'Unknown') + \".getChildContext(): key \\\"\" + contextKey + \"\\\" is not defined in childContextTypes.\");\n }\n }\n\n {\n var name = getComponentNameFromFiber(fiber) || 'Unknown';\n checkPropTypes(childContextTypes, childContext, 'child context', name);\n }\n\n return assign({}, parentContext, childContext);\n }\n}\n\nfunction pushContextProvider(workInProgress) {\n {\n var instance = workInProgress.stateNode; // We push the context as early as possible to ensure stack integrity.\n // If the instance does not exist yet, we will push null at first,\n // and replace it on the stack later when invalidating the context.\n\n var memoizedMergedChildContext = instance && instance.__reactInternalMemoizedMergedChildContext || emptyContextObject; // Remember the parent context so we can merge with it later.\n // Inherit the parent's did-perform-work value to avoid inadvertently blocking updates.\n\n previousContext = contextStackCursor.current;\n push(contextStackCursor, memoizedMergedChildContext, workInProgress);\n push(didPerformWorkStackCursor, didPerformWorkStackCursor.current, workInProgress);\n return true;\n }\n}\n\nfunction invalidateContextProvider(workInProgress, type, didChange) {\n {\n var instance = workInProgress.stateNode;\n\n if (!instance) {\n throw new Error('Expected to have an instance by this point. ' + 'This error is likely caused by a bug in React. Please file an issue.');\n }\n\n if (didChange) {\n // Merge parent and own context.\n // Skip this if we're not updating due to sCU.\n // This avoids unnecessarily recomputing memoized values.\n var mergedContext = processChildContext(workInProgress, type, previousContext);\n instance.__reactInternalMemoizedMergedChildContext = mergedContext; // Replace the old (or empty) context with the new one.\n // It is important to unwind the context in the reverse order.\n\n pop(didPerformWorkStackCursor, workInProgress);\n pop(contextStackCursor, workInProgress); // Now push the new context and mark that it has changed.\n\n push(contextStackCursor, mergedContext, workInProgress);\n push(didPerformWorkStackCursor, didChange, workInProgress);\n } else {\n pop(didPerformWorkStackCursor, workInProgress);\n push(didPerformWorkStackCursor, didChange, workInProgress);\n }\n }\n}\n\nfunction findCurrentUnmaskedContext(fiber) {\n {\n // Currently this is only used with renderSubtreeIntoContainer; not sure if it\n // makes sense elsewhere\n if (!isFiberMounted(fiber) || fiber.tag !== ClassComponent) {\n throw new Error('Expected subtree parent to be a mounted class component. ' + 'This error is likely caused by a bug in React. Please file an issue.');\n }\n\n var node = fiber;\n\n do {\n switch (node.tag) {\n case HostRoot:\n return node.stateNode.context;\n\n case ClassComponent:\n {\n var Component = node.type;\n\n if (isContextProvider(Component)) {\n return node.stateNode.__reactInternalMemoizedMergedChildContext;\n }\n\n break;\n }\n }\n\n node = node.return;\n } while (node !== null);\n\n throw new Error('Found unexpected detached subtree parent. ' + 'This error is likely caused by a bug in React. Please file an issue.');\n }\n}\n\nvar LegacyRoot = 0;\nvar ConcurrentRoot = 1;\n\nvar syncQueue = null;\nvar includesLegacySyncCallbacks = false;\nvar isFlushingSyncQueue = false;\nfunction scheduleSyncCallback(callback) {\n // Push this callback into an internal queue. We'll flush these either in\n // the next tick, or earlier if something calls `flushSyncCallbackQueue`.\n if (syncQueue === null) {\n syncQueue = [callback];\n } else {\n // Push onto existing queue. Don't need to schedule a callback because\n // we already scheduled one when we created the queue.\n syncQueue.push(callback);\n }\n}\nfunction scheduleLegacySyncCallback(callback) {\n includesLegacySyncCallbacks = true;\n scheduleSyncCallback(callback);\n}\nfunction flushSyncCallbacksOnlyInLegacyMode() {\n // Only flushes the queue if there's a legacy sync callback scheduled.\n // TODO: There's only a single type of callback: performSyncOnWorkOnRoot. So\n // it might make more sense for the queue to be a list of roots instead of a\n // list of generic callbacks. Then we can have two: one for legacy roots, one\n // for concurrent roots. And this method would only flush the legacy ones.\n if (includesLegacySyncCallbacks) {\n flushSyncCallbacks();\n }\n}\nfunction flushSyncCallbacks() {\n if (!isFlushingSyncQueue && syncQueue !== null) {\n // Prevent re-entrance.\n isFlushingSyncQueue = true;\n var i = 0;\n var previousUpdatePriority = getCurrentUpdatePriority();\n\n try {\n var isSync = true;\n var queue = syncQueue; // TODO: Is this necessary anymore? The only user code that runs in this\n // queue is in the render or commit phases.\n\n setCurrentUpdatePriority(DiscreteEventPriority);\n\n for (; i < queue.length; i++) {\n var callback = queue[i];\n\n do {\n callback = callback(isSync);\n } while (callback !== null);\n }\n\n syncQueue = null;\n includesLegacySyncCallbacks = false;\n } catch (error) {\n // If something throws, leave the remaining callbacks on the queue.\n if (syncQueue !== null) {\n syncQueue = syncQueue.slice(i + 1);\n } // Resume flushing in the next tick\n\n\n scheduleCallback(ImmediatePriority, flushSyncCallbacks);\n throw error;\n } finally {\n setCurrentUpdatePriority(previousUpdatePriority);\n isFlushingSyncQueue = false;\n }\n }\n\n return null;\n}\n\n// TODO: Use the unified fiber stack module instead of this local one?\n// Intentionally not using it yet to derisk the initial implementation, because\n// the way we push/pop these values is a bit unusual. If there's a mistake, I'd\n// rather the ids be wrong than crash the whole reconciler.\nvar forkStack = [];\nvar forkStackIndex = 0;\nvar treeForkProvider = null;\nvar treeForkCount = 0;\nvar idStack = [];\nvar idStackIndex = 0;\nvar treeContextProvider = null;\nvar treeContextId = 1;\nvar treeContextOverflow = '';\nfunction isForkedChild(workInProgress) {\n warnIfNotHydrating();\n return (workInProgress.flags & Forked) !== NoFlags;\n}\nfunction getForksAtLevel(workInProgress) {\n warnIfNotHydrating();\n return treeForkCount;\n}\nfunction getTreeId() {\n var overflow = treeContextOverflow;\n var idWithLeadingBit = treeContextId;\n var id = idWithLeadingBit & ~getLeadingBit(idWithLeadingBit);\n return id.toString(32) + overflow;\n}\nfunction pushTreeFork(workInProgress, totalChildren) {\n // This is called right after we reconcile an array (or iterator) of child\n // fibers, because that's the only place where we know how many children in\n // the whole set without doing extra work later, or storing addtional\n // information on the fiber.\n //\n // That's why this function is separate from pushTreeId — it's called during\n // the render phase of the fork parent, not the child, which is where we push\n // the other context values.\n //\n // In the Fizz implementation this is much simpler because the child is\n // rendered in the same callstack as the parent.\n //\n // It might be better to just add a `forks` field to the Fiber type. It would\n // make this module simpler.\n warnIfNotHydrating();\n forkStack[forkStackIndex++] = treeForkCount;\n forkStack[forkStackIndex++] = treeForkProvider;\n treeForkProvider = workInProgress;\n treeForkCount = totalChildren;\n}\nfunction pushTreeId(workInProgress, totalChildren, index) {\n warnIfNotHydrating();\n idStack[idStackIndex++] = treeContextId;\n idStack[idStackIndex++] = treeContextOverflow;\n idStack[idStackIndex++] = treeContextProvider;\n treeContextProvider = workInProgress;\n var baseIdWithLeadingBit = treeContextId;\n var baseOverflow = treeContextOverflow; // The leftmost 1 marks the end of the sequence, non-inclusive. It's not part\n // of the id; we use it to account for leading 0s.\n\n var baseLength = getBitLength(baseIdWithLeadingBit) - 1;\n var baseId = baseIdWithLeadingBit & ~(1 << baseLength);\n var slot = index + 1;\n var length = getBitLength(totalChildren) + baseLength; // 30 is the max length we can store without overflowing, taking into\n // consideration the leading 1 we use to mark the end of the sequence.\n\n if (length > 30) {\n // We overflowed the bitwise-safe range. Fall back to slower algorithm.\n // This branch assumes the length of the base id is greater than 5; it won't\n // work for smaller ids, because you need 5 bits per character.\n //\n // We encode the id in multiple steps: first the base id, then the\n // remaining digits.\n //\n // Each 5 bit sequence corresponds to a single base 32 character. So for\n // example, if the current id is 23 bits long, we can convert 20 of those\n // bits into a string of 4 characters, with 3 bits left over.\n //\n // First calculate how many bits in the base id represent a complete\n // sequence of characters.\n var numberOfOverflowBits = baseLength - baseLength % 5; // Then create a bitmask that selects only those bits.\n\n var newOverflowBits = (1 << numberOfOverflowBits) - 1; // Select the bits, and convert them to a base 32 string.\n\n var newOverflow = (baseId & newOverflowBits).toString(32); // Now we can remove those bits from the base id.\n\n var restOfBaseId = baseId >> numberOfOverflowBits;\n var restOfBaseLength = baseLength - numberOfOverflowBits; // Finally, encode the rest of the bits using the normal algorithm. Because\n // we made more room, this time it won't overflow.\n\n var restOfLength = getBitLength(totalChildren) + restOfBaseLength;\n var restOfNewBits = slot << restOfBaseLength;\n var id = restOfNewBits | restOfBaseId;\n var overflow = newOverflow + baseOverflow;\n treeContextId = 1 << restOfLength | id;\n treeContextOverflow = overflow;\n } else {\n // Normal path\n var newBits = slot << baseLength;\n\n var _id = newBits | baseId;\n\n var _overflow = baseOverflow;\n treeContextId = 1 << length | _id;\n treeContextOverflow = _overflow;\n }\n}\nfunction pushMaterializedTreeId(workInProgress) {\n warnIfNotHydrating(); // This component materialized an id. This will affect any ids that appear\n // in its children.\n\n var returnFiber = workInProgress.return;\n\n if (returnFiber !== null) {\n var numberOfForks = 1;\n var slotIndex = 0;\n pushTreeFork(workInProgress, numberOfForks);\n pushTreeId(workInProgress, numberOfForks, slotIndex);\n }\n}\n\nfunction getBitLength(number) {\n return 32 - clz32(number);\n}\n\nfunction getLeadingBit(id) {\n return 1 << getBitLength(id) - 1;\n}\n\nfunction popTreeContext(workInProgress) {\n // Restore the previous values.\n // This is a bit more complicated than other context-like modules in Fiber\n // because the same Fiber may appear on the stack multiple times and for\n // different reasons. We have to keep popping until the work-in-progress is\n // no longer at the top of the stack.\n while (workInProgress === treeForkProvider) {\n treeForkProvider = forkStack[--forkStackIndex];\n forkStack[forkStackIndex] = null;\n treeForkCount = forkStack[--forkStackIndex];\n forkStack[forkStackIndex] = null;\n }\n\n while (workInProgress === treeContextProvider) {\n treeContextProvider = idStack[--idStackIndex];\n idStack[idStackIndex] = null;\n treeContextOverflow = idStack[--idStackIndex];\n idStack[idStackIndex] = null;\n treeContextId = idStack[--idStackIndex];\n idStack[idStackIndex] = null;\n }\n}\nfunction getSuspendedTreeContext() {\n warnIfNotHydrating();\n\n if (treeContextProvider !== null) {\n return {\n id: treeContextId,\n overflow: treeContextOverflow\n };\n } else {\n return null;\n }\n}\nfunction restoreSuspendedTreeContext(workInProgress, suspendedContext) {\n warnIfNotHydrating();\n idStack[idStackIndex++] = treeContextId;\n idStack[idStackIndex++] = treeContextOverflow;\n idStack[idStackIndex++] = treeContextProvider;\n treeContextId = suspendedContext.id;\n treeContextOverflow = suspendedContext.overflow;\n treeContextProvider = workInProgress;\n}\n\nfunction warnIfNotHydrating() {\n {\n if (!getIsHydrating()) {\n error('Expected to be hydrating. This is a bug in React. Please file ' + 'an issue.');\n }\n }\n}\n\n// This may have been an insertion or a hydration.\n\nvar hydrationParentFiber = null;\nvar nextHydratableInstance = null;\nvar isHydrating = false; // This flag allows for warning supression when we expect there to be mismatches\n// due to earlier mismatches or a suspended fiber.\n\nvar didSuspendOrErrorDEV = false; // Hydration errors that were thrown inside this boundary\n\nvar hydrationErrors = null;\n\nfunction warnIfHydrating() {\n {\n if (isHydrating) {\n error('We should not be hydrating here. This is a bug in React. Please file a bug.');\n }\n }\n}\n\nfunction markDidThrowWhileHydratingDEV() {\n {\n didSuspendOrErrorDEV = true;\n }\n}\nfunction didSuspendOrErrorWhileHydratingDEV() {\n {\n return didSuspendOrErrorDEV;\n }\n}\n\nfunction enterHydrationState(fiber) {\n\n var parentInstance = fiber.stateNode.containerInfo;\n nextHydratableInstance = getFirstHydratableChildWithinContainer(parentInstance);\n hydrationParentFiber = fiber;\n isHydrating = true;\n hydrationErrors = null;\n didSuspendOrErrorDEV = false;\n return true;\n}\n\nfunction reenterHydrationStateFromDehydratedSuspenseInstance(fiber, suspenseInstance, treeContext) {\n\n nextHydratableInstance = getFirstHydratableChildWithinSuspenseInstance(suspenseInstance);\n hydrationParentFiber = fiber;\n isHydrating = true;\n hydrationErrors = null;\n didSuspendOrErrorDEV = false;\n\n if (treeContext !== null) {\n restoreSuspendedTreeContext(fiber, treeContext);\n }\n\n return true;\n}\n\nfunction warnUnhydratedInstance(returnFiber, instance) {\n {\n switch (returnFiber.tag) {\n case HostRoot:\n {\n didNotHydrateInstanceWithinContainer(returnFiber.stateNode.containerInfo, instance);\n break;\n }\n\n case HostComponent:\n {\n var isConcurrentMode = (returnFiber.mode & ConcurrentMode) !== NoMode;\n didNotHydrateInstance(returnFiber.type, returnFiber.memoizedProps, returnFiber.stateNode, instance, // TODO: Delete this argument when we remove the legacy root API.\n isConcurrentMode);\n break;\n }\n\n case SuspenseComponent:\n {\n var suspenseState = returnFiber.memoizedState;\n if (suspenseState.dehydrated !== null) didNotHydrateInstanceWithinSuspenseInstance(suspenseState.dehydrated, instance);\n break;\n }\n }\n }\n}\n\nfunction deleteHydratableInstance(returnFiber, instance) {\n warnUnhydratedInstance(returnFiber, instance);\n var childToDelete = createFiberFromHostInstanceForDeletion();\n childToDelete.stateNode = instance;\n childToDelete.return = returnFiber;\n var deletions = returnFiber.deletions;\n\n if (deletions === null) {\n returnFiber.deletions = [childToDelete];\n returnFiber.flags |= ChildDeletion;\n } else {\n deletions.push(childToDelete);\n }\n}\n\nfunction warnNonhydratedInstance(returnFiber, fiber) {\n {\n if (didSuspendOrErrorDEV) {\n // Inside a boundary that already suspended. We're currently rendering the\n // siblings of a suspended node. The mismatch may be due to the missing\n // data, so it's probably a false positive.\n return;\n }\n\n switch (returnFiber.tag) {\n case HostRoot:\n {\n var parentContainer = returnFiber.stateNode.containerInfo;\n\n switch (fiber.tag) {\n case HostComponent:\n var type = fiber.type;\n var props = fiber.pendingProps;\n didNotFindHydratableInstanceWithinContainer(parentContainer, type);\n break;\n\n case HostText:\n var text = fiber.pendingProps;\n didNotFindHydratableTextInstanceWithinContainer(parentContainer, text);\n break;\n }\n\n break;\n }\n\n case HostComponent:\n {\n var parentType = returnFiber.type;\n var parentProps = returnFiber.memoizedProps;\n var parentInstance = returnFiber.stateNode;\n\n switch (fiber.tag) {\n case HostComponent:\n {\n var _type = fiber.type;\n var _props = fiber.pendingProps;\n var isConcurrentMode = (returnFiber.mode & ConcurrentMode) !== NoMode;\n didNotFindHydratableInstance(parentType, parentProps, parentInstance, _type, _props, // TODO: Delete this argument when we remove the legacy root API.\n isConcurrentMode);\n break;\n }\n\n case HostText:\n {\n var _text = fiber.pendingProps;\n\n var _isConcurrentMode = (returnFiber.mode & ConcurrentMode) !== NoMode;\n\n didNotFindHydratableTextInstance(parentType, parentProps, parentInstance, _text, // TODO: Delete this argument when we remove the legacy root API.\n _isConcurrentMode);\n break;\n }\n }\n\n break;\n }\n\n case SuspenseComponent:\n {\n var suspenseState = returnFiber.memoizedState;\n var _parentInstance = suspenseState.dehydrated;\n if (_parentInstance !== null) switch (fiber.tag) {\n case HostComponent:\n var _type2 = fiber.type;\n var _props2 = fiber.pendingProps;\n didNotFindHydratableInstanceWithinSuspenseInstance(_parentInstance, _type2);\n break;\n\n case HostText:\n var _text2 = fiber.pendingProps;\n didNotFindHydratableTextInstanceWithinSuspenseInstance(_parentInstance, _text2);\n break;\n }\n break;\n }\n\n default:\n return;\n }\n }\n}\n\nfunction insertNonHydratedInstance(returnFiber, fiber) {\n fiber.flags = fiber.flags & ~Hydrating | Placement;\n warnNonhydratedInstance(returnFiber, fiber);\n}\n\nfunction tryHydrate(fiber, nextInstance) {\n switch (fiber.tag) {\n case HostComponent:\n {\n var type = fiber.type;\n var props = fiber.pendingProps;\n var instance = canHydrateInstance(nextInstance, type);\n\n if (instance !== null) {\n fiber.stateNode = instance;\n hydrationParentFiber = fiber;\n nextHydratableInstance = getFirstHydratableChild(instance);\n return true;\n }\n\n return false;\n }\n\n case HostText:\n {\n var text = fiber.pendingProps;\n var textInstance = canHydrateTextInstance(nextInstance, text);\n\n if (textInstance !== null) {\n fiber.stateNode = textInstance;\n hydrationParentFiber = fiber; // Text Instances don't have children so there's nothing to hydrate.\n\n nextHydratableInstance = null;\n return true;\n }\n\n return false;\n }\n\n case SuspenseComponent:\n {\n var suspenseInstance = canHydrateSuspenseInstance(nextInstance);\n\n if (suspenseInstance !== null) {\n var suspenseState = {\n dehydrated: suspenseInstance,\n treeContext: getSuspendedTreeContext(),\n retryLane: OffscreenLane\n };\n fiber.memoizedState = suspenseState; // Store the dehydrated fragment as a child fiber.\n // This simplifies the code for getHostSibling and deleting nodes,\n // since it doesn't have to consider all Suspense boundaries and\n // check if they're dehydrated ones or not.\n\n var dehydratedFragment = createFiberFromDehydratedFragment(suspenseInstance);\n dehydratedFragment.return = fiber;\n fiber.child = dehydratedFragment;\n hydrationParentFiber = fiber; // While a Suspense Instance does have children, we won't step into\n // it during the first pass. Instead, we'll reenter it later.\n\n nextHydratableInstance = null;\n return true;\n }\n\n return false;\n }\n\n default:\n return false;\n }\n}\n\nfunction shouldClientRenderOnMismatch(fiber) {\n return (fiber.mode & ConcurrentMode) !== NoMode && (fiber.flags & DidCapture) === NoFlags;\n}\n\nfunction throwOnHydrationMismatch(fiber) {\n throw new Error('Hydration failed because the initial UI does not match what was ' + 'rendered on the server.');\n}\n\nfunction tryToClaimNextHydratableInstance(fiber) {\n if (!isHydrating) {\n return;\n }\n\n var nextInstance = nextHydratableInstance;\n\n if (!nextInstance) {\n if (shouldClientRenderOnMismatch(fiber)) {\n warnNonhydratedInstance(hydrationParentFiber, fiber);\n throwOnHydrationMismatch();\n } // Nothing to hydrate. Make it an insertion.\n\n\n insertNonHydratedInstance(hydrationParentFiber, fiber);\n isHydrating = false;\n hydrationParentFiber = fiber;\n return;\n }\n\n var firstAttemptedInstance = nextInstance;\n\n if (!tryHydrate(fiber, nextInstance)) {\n if (shouldClientRenderOnMismatch(fiber)) {\n warnNonhydratedInstance(hydrationParentFiber, fiber);\n throwOnHydrationMismatch();\n } // If we can't hydrate this instance let's try the next one.\n // We use this as a heuristic. It's based on intuition and not data so it\n // might be flawed or unnecessary.\n\n\n nextInstance = getNextHydratableSibling(firstAttemptedInstance);\n var prevHydrationParentFiber = hydrationParentFiber;\n\n if (!nextInstance || !tryHydrate(fiber, nextInstance)) {\n // Nothing to hydrate. Make it an insertion.\n insertNonHydratedInstance(hydrationParentFiber, fiber);\n isHydrating = false;\n hydrationParentFiber = fiber;\n return;\n } // We matched the next one, we'll now assume that the first one was\n // superfluous and we'll delete it. Since we can't eagerly delete it\n // we'll have to schedule a deletion. To do that, this node needs a dummy\n // fiber associated with it.\n\n\n deleteHydratableInstance(prevHydrationParentFiber, firstAttemptedInstance);\n }\n}\n\nfunction prepareToHydrateHostInstance(fiber, rootContainerInstance, hostContext) {\n\n var instance = fiber.stateNode;\n var shouldWarnIfMismatchDev = !didSuspendOrErrorDEV;\n var updatePayload = hydrateInstance(instance, fiber.type, fiber.memoizedProps, rootContainerInstance, hostContext, fiber, shouldWarnIfMismatchDev); // TODO: Type this specific to this type of component.\n\n fiber.updateQueue = updatePayload; // If the update payload indicates that there is a change or if there\n // is a new ref we mark this as an update.\n\n if (updatePayload !== null) {\n return true;\n }\n\n return false;\n}\n\nfunction prepareToHydrateHostTextInstance(fiber) {\n\n var textInstance = fiber.stateNode;\n var textContent = fiber.memoizedProps;\n var shouldUpdate = hydrateTextInstance(textInstance, textContent, fiber);\n\n if (shouldUpdate) {\n // We assume that prepareToHydrateHostTextInstance is called in a context where the\n // hydration parent is the parent host component of this host text.\n var returnFiber = hydrationParentFiber;\n\n if (returnFiber !== null) {\n switch (returnFiber.tag) {\n case HostRoot:\n {\n var parentContainer = returnFiber.stateNode.containerInfo;\n var isConcurrentMode = (returnFiber.mode & ConcurrentMode) !== NoMode;\n didNotMatchHydratedContainerTextInstance(parentContainer, textInstance, textContent, // TODO: Delete this argument when we remove the legacy root API.\n isConcurrentMode);\n break;\n }\n\n case HostComponent:\n {\n var parentType = returnFiber.type;\n var parentProps = returnFiber.memoizedProps;\n var parentInstance = returnFiber.stateNode;\n\n var _isConcurrentMode2 = (returnFiber.mode & ConcurrentMode) !== NoMode;\n\n didNotMatchHydratedTextInstance(parentType, parentProps, parentInstance, textInstance, textContent, // TODO: Delete this argument when we remove the legacy root API.\n _isConcurrentMode2);\n break;\n }\n }\n }\n }\n\n return shouldUpdate;\n}\n\nfunction prepareToHydrateHostSuspenseInstance(fiber) {\n\n var suspenseState = fiber.memoizedState;\n var suspenseInstance = suspenseState !== null ? suspenseState.dehydrated : null;\n\n if (!suspenseInstance) {\n throw new Error('Expected to have a hydrated suspense instance. ' + 'This error is likely caused by a bug in React. Please file an issue.');\n }\n\n hydrateSuspenseInstance(suspenseInstance, fiber);\n}\n\nfunction skipPastDehydratedSuspenseInstance(fiber) {\n\n var suspenseState = fiber.memoizedState;\n var suspenseInstance = suspenseState !== null ? suspenseState.dehydrated : null;\n\n if (!suspenseInstance) {\n throw new Error('Expected to have a hydrated suspense instance. ' + 'This error is likely caused by a bug in React. Please file an issue.');\n }\n\n return getNextHydratableInstanceAfterSuspenseInstance(suspenseInstance);\n}\n\nfunction popToNextHostParent(fiber) {\n var parent = fiber.return;\n\n while (parent !== null && parent.tag !== HostComponent && parent.tag !== HostRoot && parent.tag !== SuspenseComponent) {\n parent = parent.return;\n }\n\n hydrationParentFiber = parent;\n}\n\nfunction popHydrationState(fiber) {\n\n if (fiber !== hydrationParentFiber) {\n // We're deeper than the current hydration context, inside an inserted\n // tree.\n return false;\n }\n\n if (!isHydrating) {\n // If we're not currently hydrating but we're in a hydration context, then\n // we were an insertion and now need to pop up reenter hydration of our\n // siblings.\n popToNextHostParent(fiber);\n isHydrating = true;\n return false;\n } // If we have any remaining hydratable nodes, we need to delete them now.\n // We only do this deeper than head and body since they tend to have random\n // other nodes in them. We also ignore components with pure text content in\n // side of them. We also don't delete anything inside the root container.\n\n\n if (fiber.tag !== HostRoot && (fiber.tag !== HostComponent || shouldDeleteUnhydratedTailInstances(fiber.type) && !shouldSetTextContent(fiber.type, fiber.memoizedProps))) {\n var nextInstance = nextHydratableInstance;\n\n if (nextInstance) {\n if (shouldClientRenderOnMismatch(fiber)) {\n warnIfUnhydratedTailNodes(fiber);\n throwOnHydrationMismatch();\n } else {\n while (nextInstance) {\n deleteHydratableInstance(fiber, nextInstance);\n nextInstance = getNextHydratableSibling(nextInstance);\n }\n }\n }\n }\n\n popToNextHostParent(fiber);\n\n if (fiber.tag === SuspenseComponent) {\n nextHydratableInstance = skipPastDehydratedSuspenseInstance(fiber);\n } else {\n nextHydratableInstance = hydrationParentFiber ? getNextHydratableSibling(fiber.stateNode) : null;\n }\n\n return true;\n}\n\nfunction hasUnhydratedTailNodes() {\n return isHydrating && nextHydratableInstance !== null;\n}\n\nfunction warnIfUnhydratedTailNodes(fiber) {\n var nextInstance = nextHydratableInstance;\n\n while (nextInstance) {\n warnUnhydratedInstance(fiber, nextInstance);\n nextInstance = getNextHydratableSibling(nextInstance);\n }\n}\n\nfunction resetHydrationState() {\n\n hydrationParentFiber = null;\n nextHydratableInstance = null;\n isHydrating = false;\n didSuspendOrErrorDEV = false;\n}\n\nfunction upgradeHydrationErrorsToRecoverable() {\n if (hydrationErrors !== null) {\n // Successfully completed a forced client render. The errors that occurred\n // during the hydration attempt are now recovered. We will log them in\n // commit phase, once the entire tree has finished.\n queueRecoverableErrors(hydrationErrors);\n hydrationErrors = null;\n }\n}\n\nfunction getIsHydrating() {\n return isHydrating;\n}\n\nfunction queueHydrationError(error) {\n if (hydrationErrors === null) {\n hydrationErrors = [error];\n } else {\n hydrationErrors.push(error);\n }\n}\n\nvar ReactCurrentBatchConfig$1 = ReactSharedInternals.ReactCurrentBatchConfig;\nvar NoTransition = null;\nfunction requestCurrentTransition() {\n return ReactCurrentBatchConfig$1.transition;\n}\n\nvar ReactStrictModeWarnings = {\n recordUnsafeLifecycleWarnings: function (fiber, instance) {},\n flushPendingUnsafeLifecycleWarnings: function () {},\n recordLegacyContextWarning: function (fiber, instance) {},\n flushLegacyContextWarning: function () {},\n discardPendingWarnings: function () {}\n};\n\n{\n var findStrictRoot = function (fiber) {\n var maybeStrictRoot = null;\n var node = fiber;\n\n while (node !== null) {\n if (node.mode & StrictLegacyMode) {\n maybeStrictRoot = node;\n }\n\n node = node.return;\n }\n\n return maybeStrictRoot;\n };\n\n var setToSortedString = function (set) {\n var array = [];\n set.forEach(function (value) {\n array.push(value);\n });\n return array.sort().join(', ');\n };\n\n var pendingComponentWillMountWarnings = [];\n var pendingUNSAFE_ComponentWillMountWarnings = [];\n var pendingComponentWillReceivePropsWarnings = [];\n var pendingUNSAFE_ComponentWillReceivePropsWarnings = [];\n var pendingComponentWillUpdateWarnings = [];\n var pendingUNSAFE_ComponentWillUpdateWarnings = []; // Tracks components we have already warned about.\n\n var didWarnAboutUnsafeLifecycles = new Set();\n\n ReactStrictModeWarnings.recordUnsafeLifecycleWarnings = function (fiber, instance) {\n // Dedupe strategy: Warn once per component.\n if (didWarnAboutUnsafeLifecycles.has(fiber.type)) {\n return;\n }\n\n if (typeof instance.componentWillMount === 'function' && // Don't warn about react-lifecycles-compat polyfilled components.\n instance.componentWillMount.__suppressDeprecationWarning !== true) {\n pendingComponentWillMountWarnings.push(fiber);\n }\n\n if (fiber.mode & StrictLegacyMode && typeof instance.UNSAFE_componentWillMount === 'function') {\n pendingUNSAFE_ComponentWillMountWarnings.push(fiber);\n }\n\n if (typeof instance.componentWillReceiveProps === 'function' && instance.componentWillReceiveProps.__suppressDeprecationWarning !== true) {\n pendingComponentWillReceivePropsWarnings.push(fiber);\n }\n\n if (fiber.mode & StrictLegacyMode && typeof instance.UNSAFE_componentWillReceiveProps === 'function') {\n pendingUNSAFE_ComponentWillReceivePropsWarnings.push(fiber);\n }\n\n if (typeof instance.componentWillUpdate === 'function' && instance.componentWillUpdate.__suppressDeprecationWarning !== true) {\n pendingComponentWillUpdateWarnings.push(fiber);\n }\n\n if (fiber.mode & StrictLegacyMode && typeof instance.UNSAFE_componentWillUpdate === 'function') {\n pendingUNSAFE_ComponentWillUpdateWarnings.push(fiber);\n }\n };\n\n ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings = function () {\n // We do an initial pass to gather component names\n var componentWillMountUniqueNames = new Set();\n\n if (pendingComponentWillMountWarnings.length > 0) {\n pendingComponentWillMountWarnings.forEach(function (fiber) {\n componentWillMountUniqueNames.add(getComponentNameFromFiber(fiber) || 'Component');\n didWarnAboutUnsafeLifecycles.add(fiber.type);\n });\n pendingComponentWillMountWarnings = [];\n }\n\n var UNSAFE_componentWillMountUniqueNames = new Set();\n\n if (pendingUNSAFE_ComponentWillMountWarnings.length > 0) {\n pendingUNSAFE_ComponentWillMountWarnings.forEach(function (fiber) {\n UNSAFE_componentWillMountUniqueNames.add(getComponentNameFromFiber(fiber) || 'Component');\n didWarnAboutUnsafeLifecycles.add(fiber.type);\n });\n pendingUNSAFE_ComponentWillMountWarnings = [];\n }\n\n var componentWillReceivePropsUniqueNames = new Set();\n\n if (pendingComponentWillReceivePropsWarnings.length > 0) {\n pendingComponentWillReceivePropsWarnings.forEach(function (fiber) {\n componentWillReceivePropsUniqueNames.add(getComponentNameFromFiber(fiber) || 'Component');\n didWarnAboutUnsafeLifecycles.add(fiber.type);\n });\n pendingComponentWillReceivePropsWarnings = [];\n }\n\n var UNSAFE_componentWillReceivePropsUniqueNames = new Set();\n\n if (pendingUNSAFE_ComponentWillReceivePropsWarnings.length > 0) {\n pendingUNSAFE_ComponentWillReceivePropsWarnings.forEach(function (fiber) {\n UNSAFE_componentWillReceivePropsUniqueNames.add(getComponentNameFromFiber(fiber) || 'Component');\n didWarnAboutUnsafeLifecycles.add(fiber.type);\n });\n pendingUNSAFE_ComponentWillReceivePropsWarnings = [];\n }\n\n var componentWillUpdateUniqueNames = new Set();\n\n if (pendingComponentWillUpdateWarnings.length > 0) {\n pendingComponentWillUpdateWarnings.forEach(function (fiber) {\n componentWillUpdateUniqueNames.add(getComponentNameFromFiber(fiber) || 'Component');\n didWarnAboutUnsafeLifecycles.add(fiber.type);\n });\n pendingComponentWillUpdateWarnings = [];\n }\n\n var UNSAFE_componentWillUpdateUniqueNames = new Set();\n\n if (pendingUNSAFE_ComponentWillUpdateWarnings.length > 0) {\n pendingUNSAFE_ComponentWillUpdateWarnings.forEach(function (fiber) {\n UNSAFE_componentWillUpdateUniqueNames.add(getComponentNameFromFiber(fiber) || 'Component');\n didWarnAboutUnsafeLifecycles.add(fiber.type);\n });\n pendingUNSAFE_ComponentWillUpdateWarnings = [];\n } // Finally, we flush all the warnings\n // UNSAFE_ ones before the deprecated ones, since they'll be 'louder'\n\n\n if (UNSAFE_componentWillMountUniqueNames.size > 0) {\n var sortedNames = setToSortedString(UNSAFE_componentWillMountUniqueNames);\n\n error('Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\\n\\n' + '* Move code with side effects to componentDidMount, and set initial state in the constructor.\\n' + '\\nPlease update the following components: %s', sortedNames);\n }\n\n if (UNSAFE_componentWillReceivePropsUniqueNames.size > 0) {\n var _sortedNames = setToSortedString(UNSAFE_componentWillReceivePropsUniqueNames);\n\n error('Using UNSAFE_componentWillReceiveProps in strict mode is not recommended ' + 'and may indicate bugs in your code. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\\n\\n' + '* Move data fetching code or side effects to componentDidUpdate.\\n' + \"* If you're updating state whenever props change, \" + 'refactor your code to use memoization techniques or move it to ' + 'static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state\\n' + '\\nPlease update the following components: %s', _sortedNames);\n }\n\n if (UNSAFE_componentWillUpdateUniqueNames.size > 0) {\n var _sortedNames2 = setToSortedString(UNSAFE_componentWillUpdateUniqueNames);\n\n error('Using UNSAFE_componentWillUpdate in strict mode is not recommended ' + 'and may indicate bugs in your code. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\\n\\n' + '* Move data fetching code or side effects to componentDidUpdate.\\n' + '\\nPlease update the following components: %s', _sortedNames2);\n }\n\n if (componentWillMountUniqueNames.size > 0) {\n var _sortedNames3 = setToSortedString(componentWillMountUniqueNames);\n\n warn('componentWillMount has been renamed, and is not recommended for use. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\\n\\n' + '* Move code with side effects to componentDidMount, and set initial state in the constructor.\\n' + '* Rename componentWillMount to UNSAFE_componentWillMount to suppress ' + 'this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. ' + 'To rename all deprecated lifecycles to their new names, you can run ' + '`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\\n' + '\\nPlease update the following components: %s', _sortedNames3);\n }\n\n if (componentWillReceivePropsUniqueNames.size > 0) {\n var _sortedNames4 = setToSortedString(componentWillReceivePropsUniqueNames);\n\n warn('componentWillReceiveProps has been renamed, and is not recommended for use. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\\n\\n' + '* Move data fetching code or side effects to componentDidUpdate.\\n' + \"* If you're updating state whenever props change, refactor your \" + 'code to use memoization techniques or move it to ' + 'static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state\\n' + '* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress ' + 'this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. ' + 'To rename all deprecated lifecycles to their new names, you can run ' + '`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\\n' + '\\nPlease update the following components: %s', _sortedNames4);\n }\n\n if (componentWillUpdateUniqueNames.size > 0) {\n var _sortedNames5 = setToSortedString(componentWillUpdateUniqueNames);\n\n warn('componentWillUpdate has been renamed, and is not recommended for use. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\\n\\n' + '* Move data fetching code or side effects to componentDidUpdate.\\n' + '* Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress ' + 'this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. ' + 'To rename all deprecated lifecycles to their new names, you can run ' + '`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\\n' + '\\nPlease update the following components: %s', _sortedNames5);\n }\n };\n\n var pendingLegacyContextWarning = new Map(); // Tracks components we have already warned about.\n\n var didWarnAboutLegacyContext = new Set();\n\n ReactStrictModeWarnings.recordLegacyContextWarning = function (fiber, instance) {\n var strictRoot = findStrictRoot(fiber);\n\n if (strictRoot === null) {\n error('Expected to find a StrictMode component in a strict mode tree. ' + 'This error is likely caused by a bug in React. Please file an issue.');\n\n return;\n } // Dedup strategy: Warn once per component.\n\n\n if (didWarnAboutLegacyContext.has(fiber.type)) {\n return;\n }\n\n var warningsForRoot = pendingLegacyContextWarning.get(strictRoot);\n\n if (fiber.type.contextTypes != null || fiber.type.childContextTypes != null || instance !== null && typeof instance.getChildContext === 'function') {\n if (warningsForRoot === undefined) {\n warningsForRoot = [];\n pendingLegacyContextWarning.set(strictRoot, warningsForRoot);\n }\n\n warningsForRoot.push(fiber);\n }\n };\n\n ReactStrictModeWarnings.flushLegacyContextWarning = function () {\n pendingLegacyContextWarning.forEach(function (fiberArray, strictRoot) {\n if (fiberArray.length === 0) {\n return;\n }\n\n var firstFiber = fiberArray[0];\n var uniqueNames = new Set();\n fiberArray.forEach(function (fiber) {\n uniqueNames.add(getComponentNameFromFiber(fiber) || 'Component');\n didWarnAboutLegacyContext.add(fiber.type);\n });\n var sortedNames = setToSortedString(uniqueNames);\n\n try {\n setCurrentFiber(firstFiber);\n\n error('Legacy context API has been detected within a strict-mode tree.' + '\\n\\nThe old API will be supported in all 16.x releases, but applications ' + 'using it should migrate to the new version.' + '\\n\\nPlease update the following components: %s' + '\\n\\nLearn more about this warning here: https://reactjs.org/link/legacy-context', sortedNames);\n } finally {\n resetCurrentFiber();\n }\n });\n };\n\n ReactStrictModeWarnings.discardPendingWarnings = function () {\n pendingComponentWillMountWarnings = [];\n pendingUNSAFE_ComponentWillMountWarnings = [];\n pendingComponentWillReceivePropsWarnings = [];\n pendingUNSAFE_ComponentWillReceivePropsWarnings = [];\n pendingComponentWillUpdateWarnings = [];\n pendingUNSAFE_ComponentWillUpdateWarnings = [];\n pendingLegacyContextWarning = new Map();\n };\n}\n\nvar didWarnAboutMaps;\nvar didWarnAboutGenerators;\nvar didWarnAboutStringRefs;\nvar ownerHasKeyUseWarning;\nvar ownerHasFunctionTypeWarning;\n\nvar warnForMissingKey = function (child, returnFiber) {};\n\n{\n didWarnAboutMaps = false;\n didWarnAboutGenerators = false;\n didWarnAboutStringRefs = {};\n /**\n * Warn if there's no key explicitly set on dynamic arrays of children or\n * object keys are not valid. This allows us to keep track of children between\n * updates.\n */\n\n ownerHasKeyUseWarning = {};\n ownerHasFunctionTypeWarning = {};\n\n warnForMissingKey = function (child, returnFiber) {\n if (child === null || typeof child !== 'object') {\n return;\n }\n\n if (!child._store || child._store.validated || child.key != null) {\n return;\n }\n\n if (typeof child._store !== 'object') {\n throw new Error('React Component in warnForMissingKey should have a _store. ' + 'This error is likely caused by a bug in React. Please file an issue.');\n }\n\n child._store.validated = true;\n var componentName = getComponentNameFromFiber(returnFiber) || 'Component';\n\n if (ownerHasKeyUseWarning[componentName]) {\n return;\n }\n\n ownerHasKeyUseWarning[componentName] = true;\n\n error('Each child in a list should have a unique ' + '\"key\" prop. See https://reactjs.org/link/warning-keys for ' + 'more information.');\n };\n}\n\nfunction isReactClass(type) {\n return type.prototype && type.prototype.isReactComponent;\n}\n\nfunction coerceRef(returnFiber, current, element) {\n var mixedRef = element.ref;\n\n if (mixedRef !== null && typeof mixedRef !== 'function' && typeof mixedRef !== 'object') {\n {\n // TODO: Clean this up once we turn on the string ref warning for\n // everyone, because the strict mode case will no longer be relevant\n if ((returnFiber.mode & StrictLegacyMode || warnAboutStringRefs) && // We warn in ReactElement.js if owner and self are equal for string refs\n // because these cannot be automatically converted to an arrow function\n // using a codemod. Therefore, we don't have to warn about string refs again.\n !(element._owner && element._self && element._owner.stateNode !== element._self) && // Will already throw with \"Function components cannot have string refs\"\n !(element._owner && element._owner.tag !== ClassComponent) && // Will already warn with \"Function components cannot be given refs\"\n !(typeof element.type === 'function' && !isReactClass(element.type)) && // Will already throw with \"Element ref was specified as a string (someStringRef) but no owner was set\"\n element._owner) {\n var componentName = getComponentNameFromFiber(returnFiber) || 'Component';\n\n if (!didWarnAboutStringRefs[componentName]) {\n {\n error('Component \"%s\" contains the string ref \"%s\". Support for string refs ' + 'will be removed in a future major release. We recommend using ' + 'useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', componentName, mixedRef);\n }\n\n didWarnAboutStringRefs[componentName] = true;\n }\n }\n }\n\n if (element._owner) {\n var owner = element._owner;\n var inst;\n\n if (owner) {\n var ownerFiber = owner;\n\n if (ownerFiber.tag !== ClassComponent) {\n throw new Error('Function components cannot have string refs. ' + 'We recommend using useRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref');\n }\n\n inst = ownerFiber.stateNode;\n }\n\n if (!inst) {\n throw new Error(\"Missing owner for string ref \" + mixedRef + \". This error is likely caused by a \" + 'bug in React. Please file an issue.');\n } // Assigning this to a const so Flow knows it won't change in the closure\n\n\n var resolvedInst = inst;\n\n {\n checkPropStringCoercion(mixedRef, 'ref');\n }\n\n var stringRef = '' + mixedRef; // Check if previous string ref matches new string ref\n\n if (current !== null && current.ref !== null && typeof current.ref === 'function' && current.ref._stringRef === stringRef) {\n return current.ref;\n }\n\n var ref = function (value) {\n var refs = resolvedInst.refs;\n\n if (value === null) {\n delete refs[stringRef];\n } else {\n refs[stringRef] = value;\n }\n };\n\n ref._stringRef = stringRef;\n return ref;\n } else {\n if (typeof mixedRef !== 'string') {\n throw new Error('Expected ref to be a function, a string, an object returned by React.createRef(), or null.');\n }\n\n if (!element._owner) {\n throw new Error(\"Element ref was specified as a string (\" + mixedRef + \") but no owner was set. This could happen for one of\" + ' the following reasons:\\n' + '1. You may be adding a ref to a function component\\n' + \"2. You may be adding a ref to a component that was not created inside a component's render method\\n\" + '3. You have multiple copies of React loaded\\n' + 'See https://reactjs.org/link/refs-must-have-owner for more information.');\n }\n }\n }\n\n return mixedRef;\n}\n\nfunction throwOnInvalidObjectType(returnFiber, newChild) {\n var childString = Object.prototype.toString.call(newChild);\n throw new Error(\"Objects are not valid as a React child (found: \" + (childString === '[object Object]' ? 'object with keys {' + Object.keys(newChild).join(', ') + '}' : childString) + \"). \" + 'If you meant to render a collection of children, use an array ' + 'instead.');\n}\n\nfunction warnOnFunctionType(returnFiber) {\n {\n var componentName = getComponentNameFromFiber(returnFiber) || 'Component';\n\n if (ownerHasFunctionTypeWarning[componentName]) {\n return;\n }\n\n ownerHasFunctionTypeWarning[componentName] = true;\n\n error('Functions are not valid as a React child. This may happen if ' + 'you return a Component instead of <Component /> from render. ' + 'Or maybe you meant to call this function rather than return it.');\n }\n}\n\nfunction resolveLazy(lazyType) {\n var payload = lazyType._payload;\n var init = lazyType._init;\n return init(payload);\n} // This wrapper function exists because I expect to clone the code in each path\n// to be able to optimize each path individually by branching early. This needs\n// a compiler or we can do it manually. Helpers that don't need this branching\n// live outside of this function.\n\n\nfunction ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n }\n\n var deletions = returnFiber.deletions;\n\n if (deletions === null) {\n returnFiber.deletions = [childToDelete];\n returnFiber.flags |= ChildDeletion;\n } else {\n deletions.push(childToDelete);\n }\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // During hydration, the useId algorithm needs to know which fibers are\n // part of a list of children (arrays, iterators).\n newFiber.flags |= Forked;\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.flags |= Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.flags |= Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.flags |= Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, lanes) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, lanes) {\n var elementType = element.type;\n\n if (elementType === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, current, element.props.children, lanes, element.key);\n }\n\n if (current !== null) {\n if (current.elementType === elementType || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element) ) || // Lazy types should reconcile their resolved type.\n // We need to do this after the Hot Reloading check above,\n // because hot reloading has different semantics than prod because\n // it doesn't resuspend. So we can't let the call below suspend.\n typeof elementType === 'object' && elementType !== null && elementType.$$typeof === REACT_LAZY_TYPE && resolveLazy(elementType) === current.type) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, lanes);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, lanes) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, lanes, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, lanes, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, lanes) {\n if (typeof newChild === 'string' && newChild !== '' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, lanes);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, lanes);\n\n _created2.return = returnFiber;\n return _created2;\n }\n\n case REACT_LAZY_TYPE:\n {\n var payload = newChild._payload;\n var init = newChild._init;\n return createChild(returnFiber, init(payload), lanes);\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, lanes, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, lanes) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' && newChild !== '' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, lanes);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n return updateElement(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n\n case REACT_LAZY_TYPE:\n {\n var payload = newChild._payload;\n var init = newChild._init;\n return updateSlot(returnFiber, oldFiber, init(payload), lanes);\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, lanes, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, lanes) {\n if (typeof newChild === 'string' && newChild !== '' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, lanes);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updateElement(returnFiber, _matchedFiber, newChild, lanes);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, lanes);\n }\n\n case REACT_LAZY_TYPE:\n var payload = newChild._payload;\n var init = newChild._init;\n return updateFromMap(existingChildren, returnFiber, newIdx, init(payload), lanes);\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, lanes, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys, returnFiber) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child, returnFiber);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n\n break;\n\n case REACT_LAZY_TYPE:\n var payload = child._payload;\n var init = child._init;\n warnOnInvalidKey(init(payload), knownKeys, returnFiber);\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, lanes) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], lanes);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n\n if (getIsHydrating()) {\n var numberOfForks = newIdx;\n pushTreeFork(returnFiber, numberOfForks);\n }\n\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], lanes);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n if (getIsHydrating()) {\n var _numberOfForks = newIdx;\n pushTreeFork(returnFiber, _numberOfForks);\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], lanes);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n if (getIsHydrating()) {\n var _numberOfForks2 = newIdx;\n pushTreeFork(returnFiber, _numberOfForks2);\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, lanes) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (typeof iteratorFn !== 'function') {\n throw new Error('An object is not an iterable. This error is likely caused by a bug in ' + 'React. Please file an issue.');\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (newChildren == null) {\n throw new Error('An iterable object provided no iterator.');\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, lanes);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n\n if (getIsHydrating()) {\n var numberOfForks = newIdx;\n pushTreeFork(returnFiber, numberOfForks);\n }\n\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, lanes);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n if (getIsHydrating()) {\n var _numberOfForks3 = newIdx;\n pushTreeFork(returnFiber, _numberOfForks3);\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, lanes);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n if (getIsHydrating()) {\n var _numberOfForks4 = newIdx;\n pushTreeFork(returnFiber, _numberOfForks4);\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, lanes) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, lanes) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n var elementType = element.type;\n\n if (elementType === REACT_FRAGMENT_TYPE) {\n if (child.tag === Fragment) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n } else {\n if (child.elementType === elementType || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element) ) || // Lazy types should reconcile their resolved type.\n // We need to do this after the Hot Reloading check above,\n // because hot reloading has different semantics than prod because\n // it doesn't resuspend. So we can't let the call below suspend.\n typeof elementType === 'object' && elementType !== null && elementType.$$typeof === REACT_LAZY_TYPE && resolveLazy(elementType) === child.type) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing = useFiber(child, element.props);\n\n _existing.ref = coerceRef(returnFiber, child, element);\n _existing.return = returnFiber;\n\n {\n _existing._debugSource = element._source;\n _existing._debugOwner = element._owner;\n }\n\n return _existing;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, lanes, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, lanes);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, lanes) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, lanes) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, lanes));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, lanes));\n\n case REACT_LAZY_TYPE:\n var payload = newChild._payload;\n var init = newChild._init; // TODO: This function is supposed to be non-recursive.\n\n return reconcileChildFibers(returnFiber, currentFirstChild, init(payload), lanes);\n }\n\n if (isArray(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, lanes);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, lanes);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n if (typeof newChild === 'string' && newChild !== '' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, lanes));\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}\n\nvar reconcileChildFibers = ChildReconciler(true);\nvar mountChildFibers = ChildReconciler(false);\nfunction cloneChildFibers(current, workInProgress) {\n if (current !== null && workInProgress.child !== current.child) {\n throw new Error('Resuming work not yet implemented.');\n }\n\n if (workInProgress.child === null) {\n return;\n }\n\n var currentChild = workInProgress.child;\n var newChild = createWorkInProgress(currentChild, currentChild.pendingProps);\n workInProgress.child = newChild;\n newChild.return = workInProgress;\n\n while (currentChild.sibling !== null) {\n currentChild = currentChild.sibling;\n newChild = newChild.sibling = createWorkInProgress(currentChild, currentChild.pendingProps);\n newChild.return = workInProgress;\n }\n\n newChild.sibling = null;\n} // Reset a workInProgress child set to prepare it for a second pass.\n\nfunction resetChildFibers(workInProgress, lanes) {\n var child = workInProgress.child;\n\n while (child !== null) {\n resetWorkInProgress(child, lanes);\n child = child.sibling;\n }\n}\n\nvar valueCursor = createCursor(null);\nvar rendererSigil;\n\n{\n // Use this to detect multiple renderers using the same context\n rendererSigil = {};\n}\n\nvar currentlyRenderingFiber = null;\nvar lastContextDependency = null;\nvar lastFullyObservedContext = null;\nvar isDisallowedContextReadInDEV = false;\nfunction resetContextDependencies() {\n // This is called right before React yields execution, to ensure `readContext`\n // cannot be called outside the render phase.\n currentlyRenderingFiber = null;\n lastContextDependency = null;\n lastFullyObservedContext = null;\n\n {\n isDisallowedContextReadInDEV = false;\n }\n}\nfunction enterDisallowedContextReadInDEV() {\n {\n isDisallowedContextReadInDEV = true;\n }\n}\nfunction exitDisallowedContextReadInDEV() {\n {\n isDisallowedContextReadInDEV = false;\n }\n}\nfunction pushProvider(providerFiber, context, nextValue) {\n {\n push(valueCursor, context._currentValue, providerFiber);\n context._currentValue = nextValue;\n\n {\n if (context._currentRenderer !== undefined && context._currentRenderer !== null && context._currentRenderer !== rendererSigil) {\n error('Detected multiple renderers concurrently rendering the ' + 'same context provider. This is currently unsupported.');\n }\n\n context._currentRenderer = rendererSigil;\n }\n }\n}\nfunction popProvider(context, providerFiber) {\n var currentValue = valueCursor.current;\n pop(valueCursor, providerFiber);\n\n {\n {\n context._currentValue = currentValue;\n }\n }\n}\nfunction scheduleContextWorkOnParentPath(parent, renderLanes, propagationRoot) {\n // Update the child lanes of all the ancestors, including the alternates.\n var node = parent;\n\n while (node !== null) {\n var alternate = node.alternate;\n\n if (!isSubsetOfLanes(node.childLanes, renderLanes)) {\n node.childLanes = mergeLanes(node.childLanes, renderLanes);\n\n if (alternate !== null) {\n alternate.childLanes = mergeLanes(alternate.childLanes, renderLanes);\n }\n } else if (alternate !== null && !isSubsetOfLanes(alternate.childLanes, renderLanes)) {\n alternate.childLanes = mergeLanes(alternate.childLanes, renderLanes);\n }\n\n if (node === propagationRoot) {\n break;\n }\n\n node = node.return;\n }\n\n {\n if (node !== propagationRoot) {\n error('Expected to find the propagation root when scheduling context work. ' + 'This error is likely caused by a bug in React. Please file an issue.');\n }\n }\n}\nfunction propagateContextChange(workInProgress, context, renderLanes) {\n {\n propagateContextChange_eager(workInProgress, context, renderLanes);\n }\n}\n\nfunction propagateContextChange_eager(workInProgress, context, renderLanes) {\n\n var fiber = workInProgress.child;\n\n if (fiber !== null) {\n // Set the return pointer of the child to the work-in-progress fiber.\n fiber.return = workInProgress;\n }\n\n while (fiber !== null) {\n var nextFiber = void 0; // Visit this fiber.\n\n var list = fiber.dependencies;\n\n if (list !== null) {\n nextFiber = fiber.child;\n var dependency = list.firstContext;\n\n while (dependency !== null) {\n // Check if the context matches.\n if (dependency.context === context) {\n // Match! Schedule an update on this fiber.\n if (fiber.tag === ClassComponent) {\n // Schedule a force update on the work-in-progress.\n var lane = pickArbitraryLane(renderLanes);\n var update = createUpdate(NoTimestamp, lane);\n update.tag = ForceUpdate; // TODO: Because we don't have a work-in-progress, this will add the\n // update to the current fiber, too, which means it will persist even if\n // this render is thrown away. Since it's a race condition, not sure it's\n // worth fixing.\n // Inlined `enqueueUpdate` to remove interleaved update check\n\n var updateQueue = fiber.updateQueue;\n\n if (updateQueue === null) ; else {\n var sharedQueue = updateQueue.shared;\n var pending = sharedQueue.pending;\n\n if (pending === null) {\n // This is the first update. Create a circular list.\n update.next = update;\n } else {\n update.next = pending.next;\n pending.next = update;\n }\n\n sharedQueue.pending = update;\n }\n }\n\n fiber.lanes = mergeLanes(fiber.lanes, renderLanes);\n var alternate = fiber.alternate;\n\n if (alternate !== null) {\n alternate.lanes = mergeLanes(alternate.lanes, renderLanes);\n }\n\n scheduleContextWorkOnParentPath(fiber.return, renderLanes, workInProgress); // Mark the updated lanes on the list, too.\n\n list.lanes = mergeLanes(list.lanes, renderLanes); // Since we already found a match, we can stop traversing the\n // dependency list.\n\n break;\n }\n\n dependency = dependency.next;\n }\n } else if (fiber.tag === ContextProvider) {\n // Don't scan deeper if this is a matching provider\n nextFiber = fiber.type === workInProgress.type ? null : fiber.child;\n } else if (fiber.tag === DehydratedFragment) {\n // If a dehydrated suspense boundary is in this subtree, we don't know\n // if it will have any context consumers in it. The best we can do is\n // mark it as having updates.\n var parentSuspense = fiber.return;\n\n if (parentSuspense === null) {\n throw new Error('We just came from a parent so we must have had a parent. This is a bug in React.');\n }\n\n parentSuspense.lanes = mergeLanes(parentSuspense.lanes, renderLanes);\n var _alternate = parentSuspense.alternate;\n\n if (_alternate !== null) {\n _alternate.lanes = mergeLanes(_alternate.lanes, renderLanes);\n } // This is intentionally passing this fiber as the parent\n // because we want to schedule this fiber as having work\n // on its children. We'll use the childLanes on\n // this fiber to indicate that a context has changed.\n\n\n scheduleContextWorkOnParentPath(parentSuspense, renderLanes, workInProgress);\n nextFiber = fiber.sibling;\n } else {\n // Traverse down.\n nextFiber = fiber.child;\n }\n\n if (nextFiber !== null) {\n // Set the return pointer of the child to the work-in-progress fiber.\n nextFiber.return = fiber;\n } else {\n // No child. Traverse to next sibling.\n nextFiber = fiber;\n\n while (nextFiber !== null) {\n if (nextFiber === workInProgress) {\n // We're back to the root of this subtree. Exit.\n nextFiber = null;\n break;\n }\n\n var sibling = nextFiber.sibling;\n\n if (sibling !== null) {\n // Set the return pointer of the sibling to the work-in-progress fiber.\n sibling.return = nextFiber.return;\n nextFiber = sibling;\n break;\n } // No more siblings. Traverse up.\n\n\n nextFiber = nextFiber.return;\n }\n }\n\n fiber = nextFiber;\n }\n}\nfunction prepareToReadContext(workInProgress, renderLanes) {\n currentlyRenderingFiber = workInProgress;\n lastContextDependency = null;\n lastFullyObservedContext = null;\n var dependencies = workInProgress.dependencies;\n\n if (dependencies !== null) {\n {\n var firstContext = dependencies.firstContext;\n\n if (firstContext !== null) {\n if (includesSomeLane(dependencies.lanes, renderLanes)) {\n // Context list has a pending update. Mark that this fiber performed work.\n markWorkInProgressReceivedUpdate();\n } // Reset the work-in-progress list\n\n\n dependencies.firstContext = null;\n }\n }\n }\n}\nfunction readContext(context) {\n {\n // This warning would fire if you read context inside a Hook like useMemo.\n // Unlike the class check below, it's not enforced in production for perf.\n if (isDisallowedContextReadInDEV) {\n error('Context can only be read while React is rendering. ' + 'In classes, you can read it in the render method or getDerivedStateFromProps. ' + 'In function components, you can read it directly in the function body, but not ' + 'inside Hooks like useReducer() or useMemo().');\n }\n }\n\n var value = context._currentValue ;\n\n if (lastFullyObservedContext === context) ; else {\n var contextItem = {\n context: context,\n memoizedValue: value,\n next: null\n };\n\n if (lastContextDependency === null) {\n if (currentlyRenderingFiber === null) {\n throw new Error('Context can only be read while React is rendering. ' + 'In classes, you can read it in the render method or getDerivedStateFromProps. ' + 'In function components, you can read it directly in the function body, but not ' + 'inside Hooks like useReducer() or useMemo().');\n } // This is the first dependency for this component. Create a new list.\n\n\n lastContextDependency = contextItem;\n currentlyRenderingFiber.dependencies = {\n lanes: NoLanes,\n firstContext: contextItem\n };\n } else {\n // Append a new context item.\n lastContextDependency = lastContextDependency.next = contextItem;\n }\n }\n\n return value;\n}\n\n// render. When this render exits, either because it finishes or because it is\n// interrupted, the interleaved updates will be transferred onto the main part\n// of the queue.\n\nvar concurrentQueues = null;\nfunction pushConcurrentUpdateQueue(queue) {\n if (concurrentQueues === null) {\n concurrentQueues = [queue];\n } else {\n concurrentQueues.push(queue);\n }\n}\nfunction finishQueueingConcurrentUpdates() {\n // Transfer the interleaved updates onto the main queue. Each queue has a\n // `pending` field and an `interleaved` field. When they are not null, they\n // point to the last node in a circular linked list. We need to append the\n // interleaved list to the end of the pending list by joining them into a\n // single, circular list.\n if (concurrentQueues !== null) {\n for (var i = 0; i < concurrentQueues.length; i++) {\n var queue = concurrentQueues[i];\n var lastInterleavedUpdate = queue.interleaved;\n\n if (lastInterleavedUpdate !== null) {\n queue.interleaved = null;\n var firstInterleavedUpdate = lastInterleavedUpdate.next;\n var lastPendingUpdate = queue.pending;\n\n if (lastPendingUpdate !== null) {\n var firstPendingUpdate = lastPendingUpdate.next;\n lastPendingUpdate.next = firstInterleavedUpdate;\n lastInterleavedUpdate.next = firstPendingUpdate;\n }\n\n queue.pending = lastInterleavedUpdate;\n }\n }\n\n concurrentQueues = null;\n }\n}\nfunction enqueueConcurrentHookUpdate(fiber, queue, update, lane) {\n var interleaved = queue.interleaved;\n\n if (interleaved === null) {\n // This is the first update. Create a circular list.\n update.next = update; // At the end of the current render, this queue's interleaved updates will\n // be transferred to the pending queue.\n\n pushConcurrentUpdateQueue(queue);\n } else {\n update.next = interleaved.next;\n interleaved.next = update;\n }\n\n queue.interleaved = update;\n return markUpdateLaneFromFiberToRoot(fiber, lane);\n}\nfunction enqueueConcurrentHookUpdateAndEagerlyBailout(fiber, queue, update, lane) {\n var interleaved = queue.interleaved;\n\n if (interleaved === null) {\n // This is the first update. Create a circular list.\n update.next = update; // At the end of the current render, this queue's interleaved updates will\n // be transferred to the pending queue.\n\n pushConcurrentUpdateQueue(queue);\n } else {\n update.next = interleaved.next;\n interleaved.next = update;\n }\n\n queue.interleaved = update;\n}\nfunction enqueueConcurrentClassUpdate(fiber, queue, update, lane) {\n var interleaved = queue.interleaved;\n\n if (interleaved === null) {\n // This is the first update. Create a circular list.\n update.next = update; // At the end of the current render, this queue's interleaved updates will\n // be transferred to the pending queue.\n\n pushConcurrentUpdateQueue(queue);\n } else {\n update.next = interleaved.next;\n interleaved.next = update;\n }\n\n queue.interleaved = update;\n return markUpdateLaneFromFiberToRoot(fiber, lane);\n}\nfunction enqueueConcurrentRenderForLane(fiber, lane) {\n return markUpdateLaneFromFiberToRoot(fiber, lane);\n} // Calling this function outside this module should only be done for backwards\n// compatibility and should always be accompanied by a warning.\n\nvar unsafe_markUpdateLaneFromFiberToRoot = markUpdateLaneFromFiberToRoot;\n\nfunction markUpdateLaneFromFiberToRoot(sourceFiber, lane) {\n // Update the source fiber's lanes\n sourceFiber.lanes = mergeLanes(sourceFiber.lanes, lane);\n var alternate = sourceFiber.alternate;\n\n if (alternate !== null) {\n alternate.lanes = mergeLanes(alternate.lanes, lane);\n }\n\n {\n if (alternate === null && (sourceFiber.flags & (Placement | Hydrating)) !== NoFlags) {\n warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber);\n }\n } // Walk the parent path to the root and update the child lanes.\n\n\n var node = sourceFiber;\n var parent = sourceFiber.return;\n\n while (parent !== null) {\n parent.childLanes = mergeLanes(parent.childLanes, lane);\n alternate = parent.alternate;\n\n if (alternate !== null) {\n alternate.childLanes = mergeLanes(alternate.childLanes, lane);\n } else {\n {\n if ((parent.flags & (Placement | Hydrating)) !== NoFlags) {\n warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber);\n }\n }\n }\n\n node = parent;\n parent = parent.return;\n }\n\n if (node.tag === HostRoot) {\n var root = node.stateNode;\n return root;\n } else {\n return null;\n }\n}\n\nvar UpdateState = 0;\nvar ReplaceState = 1;\nvar ForceUpdate = 2;\nvar CaptureUpdate = 3; // Global state that is reset at the beginning of calling `processUpdateQueue`.\n// It should only be read right after calling `processUpdateQueue`, via\n// `checkHasForceUpdateAfterProcessing`.\n\nvar hasForceUpdate = false;\nvar didWarnUpdateInsideUpdate;\nvar currentlyProcessingQueue;\n\n{\n didWarnUpdateInsideUpdate = false;\n currentlyProcessingQueue = null;\n}\n\nfunction initializeUpdateQueue(fiber) {\n var queue = {\n baseState: fiber.memoizedState,\n firstBaseUpdate: null,\n lastBaseUpdate: null,\n shared: {\n pending: null,\n interleaved: null,\n lanes: NoLanes\n },\n effects: null\n };\n fiber.updateQueue = queue;\n}\nfunction cloneUpdateQueue(current, workInProgress) {\n // Clone the update queue from current. Unless it's already a clone.\n var queue = workInProgress.updateQueue;\n var currentQueue = current.updateQueue;\n\n if (queue === currentQueue) {\n var clone = {\n baseState: currentQueue.baseState,\n firstBaseUpdate: currentQueue.firstBaseUpdate,\n lastBaseUpdate: currentQueue.lastBaseUpdate,\n shared: currentQueue.shared,\n effects: currentQueue.effects\n };\n workInProgress.updateQueue = clone;\n }\n}\nfunction createUpdate(eventTime, lane) {\n var update = {\n eventTime: eventTime,\n lane: lane,\n tag: UpdateState,\n payload: null,\n callback: null,\n next: null\n };\n return update;\n}\nfunction enqueueUpdate(fiber, update, lane) {\n var updateQueue = fiber.updateQueue;\n\n if (updateQueue === null) {\n // Only occurs if the fiber has been unmounted.\n return null;\n }\n\n var sharedQueue = updateQueue.shared;\n\n {\n if (currentlyProcessingQueue === sharedQueue && !didWarnUpdateInsideUpdate) {\n error('An update (setState, replaceState, or forceUpdate) was scheduled ' + 'from inside an update function. Update functions should be pure, ' + 'with zero side-effects. Consider using componentDidUpdate or a ' + 'callback.');\n\n didWarnUpdateInsideUpdate = true;\n }\n }\n\n if (isUnsafeClassRenderPhaseUpdate()) {\n // This is an unsafe render phase update. Add directly to the update\n // queue so we can process it immediately during the current render.\n var pending = sharedQueue.pending;\n\n if (pending === null) {\n // This is the first update. Create a circular list.\n update.next = update;\n } else {\n update.next = pending.next;\n pending.next = update;\n }\n\n sharedQueue.pending = update; // Update the childLanes even though we're most likely already rendering\n // this fiber. This is for backwards compatibility in the case where you\n // update a different component during render phase than the one that is\n // currently renderings (a pattern that is accompanied by a warning).\n\n return unsafe_markUpdateLaneFromFiberToRoot(fiber, lane);\n } else {\n return enqueueConcurrentClassUpdate(fiber, sharedQueue, update, lane);\n }\n}\nfunction entangleTransitions(root, fiber, lane) {\n var updateQueue = fiber.updateQueue;\n\n if (updateQueue === null) {\n // Only occurs if the fiber has been unmounted.\n return;\n }\n\n var sharedQueue = updateQueue.shared;\n\n if (isTransitionLane(lane)) {\n var queueLanes = sharedQueue.lanes; // If any entangled lanes are no longer pending on the root, then they must\n // have finished. We can remove them from the shared queue, which represents\n // a superset of the actually pending lanes. In some cases we may entangle\n // more than we need to, but that's OK. In fact it's worse if we *don't*\n // entangle when we should.\n\n queueLanes = intersectLanes(queueLanes, root.pendingLanes); // Entangle the new transition lane with the other transition lanes.\n\n var newQueueLanes = mergeLanes(queueLanes, lane);\n sharedQueue.lanes = newQueueLanes; // Even if queue.lanes already include lane, we don't know for certain if\n // the lane finished since the last time we entangled it. So we need to\n // entangle it again, just to be sure.\n\n markRootEntangled(root, newQueueLanes);\n }\n}\nfunction enqueueCapturedUpdate(workInProgress, capturedUpdate) {\n // Captured updates are updates that are thrown by a child during the render\n // phase. They should be discarded if the render is aborted. Therefore,\n // we should only put them on the work-in-progress queue, not the current one.\n var queue = workInProgress.updateQueue; // Check if the work-in-progress queue is a clone.\n\n var current = workInProgress.alternate;\n\n if (current !== null) {\n var currentQueue = current.updateQueue;\n\n if (queue === currentQueue) {\n // The work-in-progress queue is the same as current. This happens when\n // we bail out on a parent fiber that then captures an error thrown by\n // a child. Since we want to append the update only to the work-in\n // -progress queue, we need to clone the updates. We usually clone during\n // processUpdateQueue, but that didn't happen in this case because we\n // skipped over the parent when we bailed out.\n var newFirst = null;\n var newLast = null;\n var firstBaseUpdate = queue.firstBaseUpdate;\n\n if (firstBaseUpdate !== null) {\n // Loop through the updates and clone them.\n var update = firstBaseUpdate;\n\n do {\n var clone = {\n eventTime: update.eventTime,\n lane: update.lane,\n tag: update.tag,\n payload: update.payload,\n callback: update.callback,\n next: null\n };\n\n if (newLast === null) {\n newFirst = newLast = clone;\n } else {\n newLast.next = clone;\n newLast = clone;\n }\n\n update = update.next;\n } while (update !== null); // Append the captured update the end of the cloned list.\n\n\n if (newLast === null) {\n newFirst = newLast = capturedUpdate;\n } else {\n newLast.next = capturedUpdate;\n newLast = capturedUpdate;\n }\n } else {\n // There are no base updates.\n newFirst = newLast = capturedUpdate;\n }\n\n queue = {\n baseState: currentQueue.baseState,\n firstBaseUpdate: newFirst,\n lastBaseUpdate: newLast,\n shared: currentQueue.shared,\n effects: currentQueue.effects\n };\n workInProgress.updateQueue = queue;\n return;\n }\n } // Append the update to the end of the list.\n\n\n var lastBaseUpdate = queue.lastBaseUpdate;\n\n if (lastBaseUpdate === null) {\n queue.firstBaseUpdate = capturedUpdate;\n } else {\n lastBaseUpdate.next = capturedUpdate;\n }\n\n queue.lastBaseUpdate = capturedUpdate;\n}\n\nfunction getStateFromUpdate(workInProgress, queue, update, prevState, nextProps, instance) {\n switch (update.tag) {\n case ReplaceState:\n {\n var payload = update.payload;\n\n if (typeof payload === 'function') {\n // Updater function\n {\n enterDisallowedContextReadInDEV();\n }\n\n var nextState = payload.call(instance, prevState, nextProps);\n\n {\n if ( workInProgress.mode & StrictLegacyMode) {\n setIsStrictModeForDevtools(true);\n\n try {\n payload.call(instance, prevState, nextProps);\n } finally {\n setIsStrictModeForDevtools(false);\n }\n }\n\n exitDisallowedContextReadInDEV();\n }\n\n return nextState;\n } // State object\n\n\n return payload;\n }\n\n case CaptureUpdate:\n {\n workInProgress.flags = workInProgress.flags & ~ShouldCapture | DidCapture;\n }\n // Intentional fallthrough\n\n case UpdateState:\n {\n var _payload = update.payload;\n var partialState;\n\n if (typeof _payload === 'function') {\n // Updater function\n {\n enterDisallowedContextReadInDEV();\n }\n\n partialState = _payload.call(instance, prevState, nextProps);\n\n {\n if ( workInProgress.mode & StrictLegacyMode) {\n setIsStrictModeForDevtools(true);\n\n try {\n _payload.call(instance, prevState, nextProps);\n } finally {\n setIsStrictModeForDevtools(false);\n }\n }\n\n exitDisallowedContextReadInDEV();\n }\n } else {\n // Partial state object\n partialState = _payload;\n }\n\n if (partialState === null || partialState === undefined) {\n // Null and undefined are treated as no-ops.\n return prevState;\n } // Merge the partial state and the previous state.\n\n\n return assign({}, prevState, partialState);\n }\n\n case ForceUpdate:\n {\n hasForceUpdate = true;\n return prevState;\n }\n }\n\n return prevState;\n}\n\nfunction processUpdateQueue(workInProgress, props, instance, renderLanes) {\n // This is always non-null on a ClassComponent or HostRoot\n var queue = workInProgress.updateQueue;\n hasForceUpdate = false;\n\n {\n currentlyProcessingQueue = queue.shared;\n }\n\n var firstBaseUpdate = queue.firstBaseUpdate;\n var lastBaseUpdate = queue.lastBaseUpdate; // Check if there are pending updates. If so, transfer them to the base queue.\n\n var pendingQueue = queue.shared.pending;\n\n if (pendingQueue !== null) {\n queue.shared.pending = null; // The pending queue is circular. Disconnect the pointer between first\n // and last so that it's non-circular.\n\n var lastPendingUpdate = pendingQueue;\n var firstPendingUpdate = lastPendingUpdate.next;\n lastPendingUpdate.next = null; // Append pending updates to base queue\n\n if (lastBaseUpdate === null) {\n firstBaseUpdate = firstPendingUpdate;\n } else {\n lastBaseUpdate.next = firstPendingUpdate;\n }\n\n lastBaseUpdate = lastPendingUpdate; // If there's a current queue, and it's different from the base queue, then\n // we need to transfer the updates to that queue, too. Because the base\n // queue is a singly-linked list with no cycles, we can append to both\n // lists and take advantage of structural sharing.\n // TODO: Pass `current` as argument\n\n var current = workInProgress.alternate;\n\n if (current !== null) {\n // This is always non-null on a ClassComponent or HostRoot\n var currentQueue = current.updateQueue;\n var currentLastBaseUpdate = currentQueue.lastBaseUpdate;\n\n if (currentLastBaseUpdate !== lastBaseUpdate) {\n if (currentLastBaseUpdate === null) {\n currentQueue.firstBaseUpdate = firstPendingUpdate;\n } else {\n currentLastBaseUpdate.next = firstPendingUpdate;\n }\n\n currentQueue.lastBaseUpdate = lastPendingUpdate;\n }\n }\n } // These values may change as we process the queue.\n\n\n if (firstBaseUpdate !== null) {\n // Iterate through the list of updates to compute the result.\n var newState = queue.baseState; // TODO: Don't need to accumulate this. Instead, we can remove renderLanes\n // from the original lanes.\n\n var newLanes = NoLanes;\n var newBaseState = null;\n var newFirstBaseUpdate = null;\n var newLastBaseUpdate = null;\n var update = firstBaseUpdate;\n\n do {\n var updateLane = update.lane;\n var updateEventTime = update.eventTime;\n\n if (!isSubsetOfLanes(renderLanes, updateLane)) {\n // Priority is insufficient. Skip this update. If this is the first\n // skipped update, the previous update/state is the new base\n // update/state.\n var clone = {\n eventTime: updateEventTime,\n lane: updateLane,\n tag: update.tag,\n payload: update.payload,\n callback: update.callback,\n next: null\n };\n\n if (newLastBaseUpdate === null) {\n newFirstBaseUpdate = newLastBaseUpdate = clone;\n newBaseState = newState;\n } else {\n newLastBaseUpdate = newLastBaseUpdate.next = clone;\n } // Update the remaining priority in the queue.\n\n\n newLanes = mergeLanes(newLanes, updateLane);\n } else {\n // This update does have sufficient priority.\n if (newLastBaseUpdate !== null) {\n var _clone = {\n eventTime: updateEventTime,\n // This update is going to be committed so we never want uncommit\n // it. Using NoLane works because 0 is a subset of all bitmasks, so\n // this will never be skipped by the check above.\n lane: NoLane,\n tag: update.tag,\n payload: update.payload,\n callback: update.callback,\n next: null\n };\n newLastBaseUpdate = newLastBaseUpdate.next = _clone;\n } // Process this update.\n\n\n newState = getStateFromUpdate(workInProgress, queue, update, newState, props, instance);\n var callback = update.callback;\n\n if (callback !== null && // If the update was already committed, we should not queue its\n // callback again.\n update.lane !== NoLane) {\n workInProgress.flags |= Callback;\n var effects = queue.effects;\n\n if (effects === null) {\n queue.effects = [update];\n } else {\n effects.push(update);\n }\n }\n }\n\n update = update.next;\n\n if (update === null) {\n pendingQueue = queue.shared.pending;\n\n if (pendingQueue === null) {\n break;\n } else {\n // An update was scheduled from inside a reducer. Add the new\n // pending updates to the end of the list and keep processing.\n var _lastPendingUpdate = pendingQueue; // Intentionally unsound. Pending updates form a circular list, but we\n // unravel them when transferring them to the base queue.\n\n var _firstPendingUpdate = _lastPendingUpdate.next;\n _lastPendingUpdate.next = null;\n update = _firstPendingUpdate;\n queue.lastBaseUpdate = _lastPendingUpdate;\n queue.shared.pending = null;\n }\n }\n } while (true);\n\n if (newLastBaseUpdate === null) {\n newBaseState = newState;\n }\n\n queue.baseState = newBaseState;\n queue.firstBaseUpdate = newFirstBaseUpdate;\n queue.lastBaseUpdate = newLastBaseUpdate; // Interleaved updates are stored on a separate queue. We aren't going to\n // process them during this render, but we do need to track which lanes\n // are remaining.\n\n var lastInterleaved = queue.shared.interleaved;\n\n if (lastInterleaved !== null) {\n var interleaved = lastInterleaved;\n\n do {\n newLanes = mergeLanes(newLanes, interleaved.lane);\n interleaved = interleaved.next;\n } while (interleaved !== lastInterleaved);\n } else if (firstBaseUpdate === null) {\n // `queue.lanes` is used for entangling transitions. We can set it back to\n // zero once the queue is empty.\n queue.shared.lanes = NoLanes;\n } // Set the remaining expiration time to be whatever is remaining in the queue.\n // This should be fine because the only two other things that contribute to\n // expiration time are props and context. We're already in the middle of the\n // begin phase by the time we start processing the queue, so we've already\n // dealt with the props. Context in components that specify\n // shouldComponentUpdate is tricky; but we'll have to account for\n // that regardless.\n\n\n markSkippedUpdateLanes(newLanes);\n workInProgress.lanes = newLanes;\n workInProgress.memoizedState = newState;\n }\n\n {\n currentlyProcessingQueue = null;\n }\n}\n\nfunction callCallback(callback, context) {\n if (typeof callback !== 'function') {\n throw new Error('Invalid argument passed as callback. Expected a function. Instead ' + (\"received: \" + callback));\n }\n\n callback.call(context);\n}\n\nfunction resetHasForceUpdateBeforeProcessing() {\n hasForceUpdate = false;\n}\nfunction checkHasForceUpdateAfterProcessing() {\n return hasForceUpdate;\n}\nfunction commitUpdateQueue(finishedWork, finishedQueue, instance) {\n // Commit the effects\n var effects = finishedQueue.effects;\n finishedQueue.effects = null;\n\n if (effects !== null) {\n for (var i = 0; i < effects.length; i++) {\n var effect = effects[i];\n var callback = effect.callback;\n\n if (callback !== null) {\n effect.callback = null;\n callCallback(callback, instance);\n }\n }\n }\n}\n\nvar NO_CONTEXT = {};\nvar contextStackCursor$1 = createCursor(NO_CONTEXT);\nvar contextFiberStackCursor = createCursor(NO_CONTEXT);\nvar rootInstanceStackCursor = createCursor(NO_CONTEXT);\n\nfunction requiredContext(c) {\n if (c === NO_CONTEXT) {\n throw new Error('Expected host context to exist. This error is likely caused by a bug ' + 'in React. Please file an issue.');\n }\n\n return c;\n}\n\nfunction getRootHostContainer() {\n var rootInstance = requiredContext(rootInstanceStackCursor.current);\n return rootInstance;\n}\n\nfunction pushHostContainer(fiber, nextRootInstance) {\n // Push current root instance onto the stack;\n // This allows us to reset root when portals are popped.\n push(rootInstanceStackCursor, nextRootInstance, fiber); // Track the context and the Fiber that provided it.\n // This enables us to pop only Fibers that provide unique contexts.\n\n push(contextFiberStackCursor, fiber, fiber); // Finally, we need to push the host context to the stack.\n // However, we can't just call getRootHostContext() and push it because\n // we'd have a different number of entries on the stack depending on\n // whether getRootHostContext() throws somewhere in renderer code or not.\n // So we push an empty value first. This lets us safely unwind on errors.\n\n push(contextStackCursor$1, NO_CONTEXT, fiber);\n var nextRootContext = getRootHostContext(nextRootInstance); // Now that we know this function doesn't throw, replace it.\n\n pop(contextStackCursor$1, fiber);\n push(contextStackCursor$1, nextRootContext, fiber);\n}\n\nfunction popHostContainer(fiber) {\n pop(contextStackCursor$1, fiber);\n pop(contextFiberStackCursor, fiber);\n pop(rootInstanceStackCursor, fiber);\n}\n\nfunction getHostContext() {\n var context = requiredContext(contextStackCursor$1.current);\n return context;\n}\n\nfunction pushHostContext(fiber) {\n var rootInstance = requiredContext(rootInstanceStackCursor.current);\n var context = requiredContext(contextStackCursor$1.current);\n var nextContext = getChildHostContext(context, fiber.type); // Don't push this Fiber's context unless it's unique.\n\n if (context === nextContext) {\n return;\n } // Track the context and the Fiber that provided it.\n // This enables us to pop only Fibers that provide unique contexts.\n\n\n push(contextFiberStackCursor, fiber, fiber);\n push(contextStackCursor$1, nextContext, fiber);\n}\n\nfunction popHostContext(fiber) {\n // Do not pop unless this Fiber provided the current context.\n // pushHostContext() only pushes Fibers that provide unique contexts.\n if (contextFiberStackCursor.current !== fiber) {\n return;\n }\n\n pop(contextStackCursor$1, fiber);\n pop(contextFiberStackCursor, fiber);\n}\n\nvar DefaultSuspenseContext = 0; // The Suspense Context is split into two parts. The lower bits is\n// inherited deeply down the subtree. The upper bits only affect\n// this immediate suspense boundary and gets reset each new\n// boundary or suspense list.\n\nvar SubtreeSuspenseContextMask = 1; // Subtree Flags:\n// InvisibleParentSuspenseContext indicates that one of our parent Suspense\n// boundaries is not currently showing visible main content.\n// Either because it is already showing a fallback or is not mounted at all.\n// We can use this to determine if it is desirable to trigger a fallback at\n// the parent. If not, then we might need to trigger undesirable boundaries\n// and/or suspend the commit to avoid hiding the parent content.\n\nvar InvisibleParentSuspenseContext = 1; // Shallow Flags:\n// ForceSuspenseFallback can be used by SuspenseList to force newly added\n// items into their fallback state during one of the render passes.\n\nvar ForceSuspenseFallback = 2;\nvar suspenseStackCursor = createCursor(DefaultSuspenseContext);\nfunction hasSuspenseContext(parentContext, flag) {\n return (parentContext & flag) !== 0;\n}\nfunction setDefaultShallowSuspenseContext(parentContext) {\n return parentContext & SubtreeSuspenseContextMask;\n}\nfunction setShallowSuspenseContext(parentContext, shallowContext) {\n return parentContext & SubtreeSuspenseContextMask | shallowContext;\n}\nfunction addSubtreeSuspenseContext(parentContext, subtreeContext) {\n return parentContext | subtreeContext;\n}\nfunction pushSuspenseContext(fiber, newContext) {\n push(suspenseStackCursor, newContext, fiber);\n}\nfunction popSuspenseContext(fiber) {\n pop(suspenseStackCursor, fiber);\n}\n\nfunction shouldCaptureSuspense(workInProgress, hasInvisibleParent) {\n // If it was the primary children that just suspended, capture and render the\n // fallback. Otherwise, don't capture and bubble to the next boundary.\n var nextState = workInProgress.memoizedState;\n\n if (nextState !== null) {\n if (nextState.dehydrated !== null) {\n // A dehydrated boundary always captures.\n return true;\n }\n\n return false;\n }\n\n var props = workInProgress.memoizedProps; // Regular boundaries always capture.\n\n {\n return true;\n } // If it's a boundary we should avoid, then we prefer to bubble up to the\n}\nfunction findFirstSuspended(row) {\n var node = row;\n\n while (node !== null) {\n if (node.tag === SuspenseComponent) {\n var state = node.memoizedState;\n\n if (state !== null) {\n var dehydrated = state.dehydrated;\n\n if (dehydrated === null || isSuspenseInstancePending(dehydrated) || isSuspenseInstanceFallback(dehydrated)) {\n return node;\n }\n }\n } else if (node.tag === SuspenseListComponent && // revealOrder undefined can't be trusted because it don't\n // keep track of whether it suspended or not.\n node.memoizedProps.revealOrder !== undefined) {\n var didSuspend = (node.flags & DidCapture) !== NoFlags;\n\n if (didSuspend) {\n return node;\n }\n } else if (node.child !== null) {\n node.child.return = node;\n node = node.child;\n continue;\n }\n\n if (node === row) {\n return null;\n }\n\n while (node.sibling === null) {\n if (node.return === null || node.return === row) {\n return null;\n }\n\n node = node.return;\n }\n\n node.sibling.return = node.return;\n node = node.sibling;\n }\n\n return null;\n}\n\nvar NoFlags$1 =\n/* */\n0; // Represents whether effect should fire.\n\nvar HasEffect =\n/* */\n1; // Represents the phase in which the effect (not the clean-up) fires.\n\nvar Insertion =\n/* */\n2;\nvar Layout =\n/* */\n4;\nvar Passive$1 =\n/* */\n8;\n\n// and should be reset before starting a new render.\n// This tracks which mutable sources need to be reset after a render.\n\nvar workInProgressSources = [];\nfunction resetWorkInProgressVersions() {\n for (var i = 0; i < workInProgressSources.length; i++) {\n var mutableSource = workInProgressSources[i];\n\n {\n mutableSource._workInProgressVersionPrimary = null;\n }\n }\n\n workInProgressSources.length = 0;\n}\n// This ensures that the version used for server rendering matches the one\n// that is eventually read during hydration.\n// If they don't match there's a potential tear and a full deopt render is required.\n\nfunction registerMutableSourceForHydration(root, mutableSource) {\n var getVersion = mutableSource._getVersion;\n var version = getVersion(mutableSource._source); // TODO Clear this data once all pending hydration work is finished.\n // Retaining it forever may interfere with GC.\n\n if (root.mutableSourceEagerHydrationData == null) {\n root.mutableSourceEagerHydrationData = [mutableSource, version];\n } else {\n root.mutableSourceEagerHydrationData.push(mutableSource, version);\n }\n}\n\nvar ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher,\n ReactCurrentBatchConfig$2 = ReactSharedInternals.ReactCurrentBatchConfig;\nvar didWarnAboutMismatchedHooksForComponent;\nvar didWarnUncachedGetSnapshot;\n\n{\n didWarnAboutMismatchedHooksForComponent = new Set();\n}\n\n// These are set right before calling the component.\nvar renderLanes = NoLanes; // The work-in-progress fiber. I've named it differently to distinguish it from\n// the work-in-progress hook.\n\nvar currentlyRenderingFiber$1 = null; // Hooks are stored as a linked list on the fiber's memoizedState field. The\n// current hook list is the list that belongs to the current fiber. The\n// work-in-progress hook list is a new list that will be added to the\n// work-in-progress fiber.\n\nvar currentHook = null;\nvar workInProgressHook = null; // Whether an update was scheduled at any point during the render phase. This\n// does not get reset if we do another render pass; only when we're completely\n// finished evaluating this component. This is an optimization so we know\n// whether we need to clear render phase updates after a throw.\n\nvar didScheduleRenderPhaseUpdate = false; // Where an update was scheduled only during the current render pass. This\n// gets reset after each attempt.\n// TODO: Maybe there's some way to consolidate this with\n// `didScheduleRenderPhaseUpdate`. Or with `numberOfReRenders`.\n\nvar didScheduleRenderPhaseUpdateDuringThisPass = false; // Counts the number of useId hooks in this component.\n\nvar localIdCounter = 0; // Used for ids that are generated completely client-side (i.e. not during\n// hydration). This counter is global, so client ids are not stable across\n// render attempts.\n\nvar globalClientIdCounter = 0;\nvar RE_RENDER_LIMIT = 25; // In DEV, this is the name of the currently executing primitive hook\n\nvar currentHookNameInDev = null; // In DEV, this list ensures that hooks are called in the same order between renders.\n// The list stores the order of hooks used during the initial render (mount).\n// Subsequent renders (updates) reference this list.\n\nvar hookTypesDev = null;\nvar hookTypesUpdateIndexDev = -1; // In DEV, this tracks whether currently rendering component needs to ignore\n// the dependencies for Hooks that need them (e.g. useEffect or useMemo).\n// When true, such Hooks will always be \"remounted\". Only used during hot reload.\n\nvar ignorePreviousDependencies = false;\n\nfunction mountHookTypesDev() {\n {\n var hookName = currentHookNameInDev;\n\n if (hookTypesDev === null) {\n hookTypesDev = [hookName];\n } else {\n hookTypesDev.push(hookName);\n }\n }\n}\n\nfunction updateHookTypesDev() {\n {\n var hookName = currentHookNameInDev;\n\n if (hookTypesDev !== null) {\n hookTypesUpdateIndexDev++;\n\n if (hookTypesDev[hookTypesUpdateIndexDev] !== hookName) {\n warnOnHookMismatchInDev(hookName);\n }\n }\n }\n}\n\nfunction checkDepsAreArrayDev(deps) {\n {\n if (deps !== undefined && deps !== null && !isArray(deps)) {\n // Verify deps, but only on mount to avoid extra checks.\n // It's unlikely their type would change as usually you define them inline.\n error('%s received a final argument that is not an array (instead, received `%s`). When ' + 'specified, the final argument must be an array.', currentHookNameInDev, typeof deps);\n }\n }\n}\n\nfunction warnOnHookMismatchInDev(currentHookName) {\n {\n var componentName = getComponentNameFromFiber(currentlyRenderingFiber$1);\n\n if (!didWarnAboutMismatchedHooksForComponent.has(componentName)) {\n didWarnAboutMismatchedHooksForComponent.add(componentName);\n\n if (hookTypesDev !== null) {\n var table = '';\n var secondColumnStart = 30;\n\n for (var i = 0; i <= hookTypesUpdateIndexDev; i++) {\n var oldHookName = hookTypesDev[i];\n var newHookName = i === hookTypesUpdateIndexDev ? currentHookName : oldHookName;\n var row = i + 1 + \". \" + oldHookName; // Extra space so second column lines up\n // lol @ IE not supporting String#repeat\n\n while (row.length < secondColumnStart) {\n row += ' ';\n }\n\n row += newHookName + '\\n';\n table += row;\n }\n\n error('React has detected a change in the order of Hooks called by %s. ' + 'This will lead to bugs and errors if not fixed. ' + 'For more information, read the Rules of Hooks: https://reactjs.org/link/rules-of-hooks\\n\\n' + ' Previous render Next render\\n' + ' ------------------------------------------------------\\n' + '%s' + ' ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\\n', componentName, table);\n }\n }\n }\n}\n\nfunction throwInvalidHookError() {\n throw new Error('Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for' + ' one of the following reasons:\\n' + '1. You might have mismatching versions of React and the renderer (such as React DOM)\\n' + '2. You might be breaking the Rules of Hooks\\n' + '3. You might have more than one copy of React in the same app\\n' + 'See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.');\n}\n\nfunction areHookInputsEqual(nextDeps, prevDeps) {\n {\n if (ignorePreviousDependencies) {\n // Only true when this component is being hot reloaded.\n return false;\n }\n }\n\n if (prevDeps === null) {\n {\n error('%s received a final argument during this render, but not during ' + 'the previous render. Even though the final argument is optional, ' + 'its type cannot change between renders.', currentHookNameInDev);\n }\n\n return false;\n }\n\n {\n // Don't bother comparing lengths in prod because these arrays should be\n // passed inline.\n if (nextDeps.length !== prevDeps.length) {\n error('The final argument passed to %s changed size between renders. The ' + 'order and size of this array must remain constant.\\n\\n' + 'Previous: %s\\n' + 'Incoming: %s', currentHookNameInDev, \"[\" + prevDeps.join(', ') + \"]\", \"[\" + nextDeps.join(', ') + \"]\");\n }\n }\n\n for (var i = 0; i < prevDeps.length && i < nextDeps.length; i++) {\n if (objectIs(nextDeps[i], prevDeps[i])) {\n continue;\n }\n\n return false;\n }\n\n return true;\n}\n\nfunction renderWithHooks(current, workInProgress, Component, props, secondArg, nextRenderLanes) {\n renderLanes = nextRenderLanes;\n currentlyRenderingFiber$1 = workInProgress;\n\n {\n hookTypesDev = current !== null ? current._debugHookTypes : null;\n hookTypesUpdateIndexDev = -1; // Used for hot reloading:\n\n ignorePreviousDependencies = current !== null && current.type !== workInProgress.type;\n }\n\n workInProgress.memoizedState = null;\n workInProgress.updateQueue = null;\n workInProgress.lanes = NoLanes; // The following should have already been reset\n // currentHook = null;\n // workInProgressHook = null;\n // didScheduleRenderPhaseUpdate = false;\n // localIdCounter = 0;\n // TODO Warn if no hooks are used at all during mount, then some are used during update.\n // Currently we will identify the update render as a mount because memoizedState === null.\n // This is tricky because it's valid for certain types of components (e.g. React.lazy)\n // Using memoizedState to differentiate between mount/update only works if at least one stateful hook is used.\n // Non-stateful hooks (e.g. context) don't get added to memoizedState,\n // so memoizedState would be null during updates and mounts.\n\n {\n if (current !== null && current.memoizedState !== null) {\n ReactCurrentDispatcher$1.current = HooksDispatcherOnUpdateInDEV;\n } else if (hookTypesDev !== null) {\n // This dispatcher handles an edge case where a component is updating,\n // but no stateful hooks have been used.\n // We want to match the production code behavior (which will use HooksDispatcherOnMount),\n // but with the extra DEV validation to ensure hooks ordering hasn't changed.\n // This dispatcher does that.\n ReactCurrentDispatcher$1.current = HooksDispatcherOnMountWithHookTypesInDEV;\n } else {\n ReactCurrentDispatcher$1.current = HooksDispatcherOnMountInDEV;\n }\n }\n\n var children = Component(props, secondArg); // Check if there was a render phase update\n\n if (didScheduleRenderPhaseUpdateDuringThisPass) {\n // Keep rendering in a loop for as long as render phase updates continue to\n // be scheduled. Use a counter to prevent infinite loops.\n var numberOfReRenders = 0;\n\n do {\n didScheduleRenderPhaseUpdateDuringThisPass = false;\n localIdCounter = 0;\n\n if (numberOfReRenders >= RE_RENDER_LIMIT) {\n throw new Error('Too many re-renders. React limits the number of renders to prevent ' + 'an infinite loop.');\n }\n\n numberOfReRenders += 1;\n\n {\n // Even when hot reloading, allow dependencies to stabilize\n // after first render to prevent infinite render phase updates.\n ignorePreviousDependencies = false;\n } // Start over from the beginning of the list\n\n\n currentHook = null;\n workInProgressHook = null;\n workInProgress.updateQueue = null;\n\n {\n // Also validate hook order for cascading updates.\n hookTypesUpdateIndexDev = -1;\n }\n\n ReactCurrentDispatcher$1.current = HooksDispatcherOnRerenderInDEV ;\n children = Component(props, secondArg);\n } while (didScheduleRenderPhaseUpdateDuringThisPass);\n } // We can assume the previous dispatcher is always this one, since we set it\n // at the beginning of the render phase and there's no re-entrance.\n\n\n ReactCurrentDispatcher$1.current = ContextOnlyDispatcher;\n\n {\n workInProgress._debugHookTypes = hookTypesDev;\n } // This check uses currentHook so that it works the same in DEV and prod bundles.\n // hookTypesDev could catch more cases (e.g. context) but only in DEV bundles.\n\n\n var didRenderTooFewHooks = currentHook !== null && currentHook.next !== null;\n renderLanes = NoLanes;\n currentlyRenderingFiber$1 = null;\n currentHook = null;\n workInProgressHook = null;\n\n {\n currentHookNameInDev = null;\n hookTypesDev = null;\n hookTypesUpdateIndexDev = -1; // Confirm that a static flag was not added or removed since the last\n // render. If this fires, it suggests that we incorrectly reset the static\n // flags in some other part of the codebase. This has happened before, for\n // example, in the SuspenseList implementation.\n\n if (current !== null && (current.flags & StaticMask) !== (workInProgress.flags & StaticMask) && // Disable this warning in legacy mode, because legacy Suspense is weird\n // and creates false positives. To make this work in legacy mode, we'd\n // need to mark fibers that commit in an incomplete state, somehow. For\n // now I'll disable the warning that most of the bugs that would trigger\n // it are either exclusive to concurrent mode or exist in both.\n (current.mode & ConcurrentMode) !== NoMode) {\n error('Internal React error: Expected static flag was missing. Please ' + 'notify the React team.');\n }\n }\n\n didScheduleRenderPhaseUpdate = false; // This is reset by checkDidRenderIdHook\n // localIdCounter = 0;\n\n if (didRenderTooFewHooks) {\n throw new Error('Rendered fewer hooks than expected. This may be caused by an accidental ' + 'early return statement.');\n }\n\n return children;\n}\nfunction checkDidRenderIdHook() {\n // This should be called immediately after every renderWithHooks call.\n // Conceptually, it's part of the return value of renderWithHooks; it's only a\n // separate function to avoid using an array tuple.\n var didRenderIdHook = localIdCounter !== 0;\n localIdCounter = 0;\n return didRenderIdHook;\n}\nfunction bailoutHooks(current, workInProgress, lanes) {\n workInProgress.updateQueue = current.updateQueue; // TODO: Don't need to reset the flags here, because they're reset in the\n // complete phase (bubbleProperties).\n\n if ( (workInProgress.mode & StrictEffectsMode) !== NoMode) {\n workInProgress.flags &= ~(MountPassiveDev | MountLayoutDev | Passive | Update);\n } else {\n workInProgress.flags &= ~(Passive | Update);\n }\n\n current.lanes = removeLanes(current.lanes, lanes);\n}\nfunction resetHooksAfterThrow() {\n // We can assume the previous dispatcher is always this one, since we set it\n // at the beginning of the render phase and there's no re-entrance.\n ReactCurrentDispatcher$1.current = ContextOnlyDispatcher;\n\n if (didScheduleRenderPhaseUpdate) {\n // There were render phase updates. These are only valid for this render\n // phase, which we are now aborting. Remove the updates from the queues so\n // they do not persist to the next render. Do not remove updates from hooks\n // that weren't processed.\n //\n // Only reset the updates from the queue if it has a clone. If it does\n // not have a clone, that means it wasn't processed, and the updates were\n // scheduled before we entered the render phase.\n var hook = currentlyRenderingFiber$1.memoizedState;\n\n while (hook !== null) {\n var queue = hook.queue;\n\n if (queue !== null) {\n queue.pending = null;\n }\n\n hook = hook.next;\n }\n\n didScheduleRenderPhaseUpdate = false;\n }\n\n renderLanes = NoLanes;\n currentlyRenderingFiber$1 = null;\n currentHook = null;\n workInProgressHook = null;\n\n {\n hookTypesDev = null;\n hookTypesUpdateIndexDev = -1;\n currentHookNameInDev = null;\n isUpdatingOpaqueValueInRenderPhase = false;\n }\n\n didScheduleRenderPhaseUpdateDuringThisPass = false;\n localIdCounter = 0;\n}\n\nfunction mountWorkInProgressHook() {\n var hook = {\n memoizedState: null,\n baseState: null,\n baseQueue: null,\n queue: null,\n next: null\n };\n\n if (workInProgressHook === null) {\n // This is the first hook in the list\n currentlyRenderingFiber$1.memoizedState = workInProgressHook = hook;\n } else {\n // Append to the end of the list\n workInProgressHook = workInProgressHook.next = hook;\n }\n\n return workInProgressHook;\n}\n\nfunction updateWorkInProgressHook() {\n // This function is used both for updates and for re-renders triggered by a\n // render phase update. It assumes there is either a current hook we can\n // clone, or a work-in-progress hook from a previous render pass that we can\n // use as a base. When we reach the end of the base list, we must switch to\n // the dispatcher used for mounts.\n var nextCurrentHook;\n\n if (currentHook === null) {\n var current = currentlyRenderingFiber$1.alternate;\n\n if (current !== null) {\n nextCurrentHook = current.memoizedState;\n } else {\n nextCurrentHook = null;\n }\n } else {\n nextCurrentHook = currentHook.next;\n }\n\n var nextWorkInProgressHook;\n\n if (workInProgressHook === null) {\n nextWorkInProgressHook = currentlyRenderingFiber$1.memoizedState;\n } else {\n nextWorkInProgressHook = workInProgressHook.next;\n }\n\n if (nextWorkInProgressHook !== null) {\n // There's already a work-in-progress. Reuse it.\n workInProgressHook = nextWorkInProgressHook;\n nextWorkInProgressHook = workInProgressHook.next;\n currentHook = nextCurrentHook;\n } else {\n // Clone from the current hook.\n if (nextCurrentHook === null) {\n throw new Error('Rendered more hooks than during the previous render.');\n }\n\n currentHook = nextCurrentHook;\n var newHook = {\n memoizedState: currentHook.memoizedState,\n baseState: currentHook.baseState,\n baseQueue: currentHook.baseQueue,\n queue: currentHook.queue,\n next: null\n };\n\n if (workInProgressHook === null) {\n // This is the first hook in the list.\n currentlyRenderingFiber$1.memoizedState = workInProgressHook = newHook;\n } else {\n // Append to the end of the list.\n workInProgressHook = workInProgressHook.next = newHook;\n }\n }\n\n return workInProgressHook;\n}\n\nfunction createFunctionComponentUpdateQueue() {\n return {\n lastEffect: null,\n stores: null\n };\n}\n\nfunction basicStateReducer(state, action) {\n // $FlowFixMe: Flow doesn't like mixed types\n return typeof action === 'function' ? action(state) : action;\n}\n\nfunction mountReducer(reducer, initialArg, init) {\n var hook = mountWorkInProgressHook();\n var initialState;\n\n if (init !== undefined) {\n initialState = init(initialArg);\n } else {\n initialState = initialArg;\n }\n\n hook.memoizedState = hook.baseState = initialState;\n var queue = {\n pending: null,\n interleaved: null,\n lanes: NoLanes,\n dispatch: null,\n lastRenderedReducer: reducer,\n lastRenderedState: initialState\n };\n hook.queue = queue;\n var dispatch = queue.dispatch = dispatchReducerAction.bind(null, currentlyRenderingFiber$1, queue);\n return [hook.memoizedState, dispatch];\n}\n\nfunction updateReducer(reducer, initialArg, init) {\n var hook = updateWorkInProgressHook();\n var queue = hook.queue;\n\n if (queue === null) {\n throw new Error('Should have a queue. This is likely a bug in React. Please file an issue.');\n }\n\n queue.lastRenderedReducer = reducer;\n var current = currentHook; // The last rebase update that is NOT part of the base state.\n\n var baseQueue = current.baseQueue; // The last pending update that hasn't been processed yet.\n\n var pendingQueue = queue.pending;\n\n if (pendingQueue !== null) {\n // We have new updates that haven't been processed yet.\n // We'll add them to the base queue.\n if (baseQueue !== null) {\n // Merge the pending queue and the base queue.\n var baseFirst = baseQueue.next;\n var pendingFirst = pendingQueue.next;\n baseQueue.next = pendingFirst;\n pendingQueue.next = baseFirst;\n }\n\n {\n if (current.baseQueue !== baseQueue) {\n // Internal invariant that should never happen, but feasibly could in\n // the future if we implement resuming, or some form of that.\n error('Internal error: Expected work-in-progress queue to be a clone. ' + 'This is a bug in React.');\n }\n }\n\n current.baseQueue = baseQueue = pendingQueue;\n queue.pending = null;\n }\n\n if (baseQueue !== null) {\n // We have a queue to process.\n var first = baseQueue.next;\n var newState = current.baseState;\n var newBaseState = null;\n var newBaseQueueFirst = null;\n var newBaseQueueLast = null;\n var update = first;\n\n do {\n var updateLane = update.lane;\n\n if (!isSubsetOfLanes(renderLanes, updateLane)) {\n // Priority is insufficient. Skip this update. If this is the first\n // skipped update, the previous update/state is the new base\n // update/state.\n var clone = {\n lane: updateLane,\n action: update.action,\n hasEagerState: update.hasEagerState,\n eagerState: update.eagerState,\n next: null\n };\n\n if (newBaseQueueLast === null) {\n newBaseQueueFirst = newBaseQueueLast = clone;\n newBaseState = newState;\n } else {\n newBaseQueueLast = newBaseQueueLast.next = clone;\n } // Update the remaining priority in the queue.\n // TODO: Don't need to accumulate this. Instead, we can remove\n // renderLanes from the original lanes.\n\n\n currentlyRenderingFiber$1.lanes = mergeLanes(currentlyRenderingFiber$1.lanes, updateLane);\n markSkippedUpdateLanes(updateLane);\n } else {\n // This update does have sufficient priority.\n if (newBaseQueueLast !== null) {\n var _clone = {\n // This update is going to be committed so we never want uncommit\n // it. Using NoLane works because 0 is a subset of all bitmasks, so\n // this will never be skipped by the check above.\n lane: NoLane,\n action: update.action,\n hasEagerState: update.hasEagerState,\n eagerState: update.eagerState,\n next: null\n };\n newBaseQueueLast = newBaseQueueLast.next = _clone;\n } // Process this update.\n\n\n if (update.hasEagerState) {\n // If this update is a state update (not a reducer) and was processed eagerly,\n // we can use the eagerly computed state\n newState = update.eagerState;\n } else {\n var action = update.action;\n newState = reducer(newState, action);\n }\n }\n\n update = update.next;\n } while (update !== null && update !== first);\n\n if (newBaseQueueLast === null) {\n newBaseState = newState;\n } else {\n newBaseQueueLast.next = newBaseQueueFirst;\n } // Mark that the fiber performed work, but only if the new state is\n // different from the current state.\n\n\n if (!objectIs(newState, hook.memoizedState)) {\n markWorkInProgressReceivedUpdate();\n }\n\n hook.memoizedState = newState;\n hook.baseState = newBaseState;\n hook.baseQueue = newBaseQueueLast;\n queue.lastRenderedState = newState;\n } // Interleaved updates are stored on a separate queue. We aren't going to\n // process them during this render, but we do need to track which lanes\n // are remaining.\n\n\n var lastInterleaved = queue.interleaved;\n\n if (lastInterleaved !== null) {\n var interleaved = lastInterleaved;\n\n do {\n var interleavedLane = interleaved.lane;\n currentlyRenderingFiber$1.lanes = mergeLanes(currentlyRenderingFiber$1.lanes, interleavedLane);\n markSkippedUpdateLanes(interleavedLane);\n interleaved = interleaved.next;\n } while (interleaved !== lastInterleaved);\n } else if (baseQueue === null) {\n // `queue.lanes` is used for entangling transitions. We can set it back to\n // zero once the queue is empty.\n queue.lanes = NoLanes;\n }\n\n var dispatch = queue.dispatch;\n return [hook.memoizedState, dispatch];\n}\n\nfunction rerenderReducer(reducer, initialArg, init) {\n var hook = updateWorkInProgressHook();\n var queue = hook.queue;\n\n if (queue === null) {\n throw new Error('Should have a queue. This is likely a bug in React. Please file an issue.');\n }\n\n queue.lastRenderedReducer = reducer; // This is a re-render. Apply the new render phase updates to the previous\n // work-in-progress hook.\n\n var dispatch = queue.dispatch;\n var lastRenderPhaseUpdate = queue.pending;\n var newState = hook.memoizedState;\n\n if (lastRenderPhaseUpdate !== null) {\n // The queue doesn't persist past this render pass.\n queue.pending = null;\n var firstRenderPhaseUpdate = lastRenderPhaseUpdate.next;\n var update = firstRenderPhaseUpdate;\n\n do {\n // Process this render phase update. We don't have to check the\n // priority because it will always be the same as the current\n // render's.\n var action = update.action;\n newState = reducer(newState, action);\n update = update.next;\n } while (update !== firstRenderPhaseUpdate); // Mark that the fiber performed work, but only if the new state is\n // different from the current state.\n\n\n if (!objectIs(newState, hook.memoizedState)) {\n markWorkInProgressReceivedUpdate();\n }\n\n hook.memoizedState = newState; // Don't persist the state accumulated from the render phase updates to\n // the base state unless the queue is empty.\n // TODO: Not sure if this is the desired semantics, but it's what we\n // do for gDSFP. I can't remember why.\n\n if (hook.baseQueue === null) {\n hook.baseState = newState;\n }\n\n queue.lastRenderedState = newState;\n }\n\n return [newState, dispatch];\n}\n\nfunction mountMutableSource(source, getSnapshot, subscribe) {\n {\n return undefined;\n }\n}\n\nfunction updateMutableSource(source, getSnapshot, subscribe) {\n {\n return undefined;\n }\n}\n\nfunction mountSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {\n var fiber = currentlyRenderingFiber$1;\n var hook = mountWorkInProgressHook();\n var nextSnapshot;\n var isHydrating = getIsHydrating();\n\n if (isHydrating) {\n if (getServerSnapshot === undefined) {\n throw new Error('Missing getServerSnapshot, which is required for ' + 'server-rendered content. Will revert to client rendering.');\n }\n\n nextSnapshot = getServerSnapshot();\n\n {\n if (!didWarnUncachedGetSnapshot) {\n if (nextSnapshot !== getServerSnapshot()) {\n error('The result of getServerSnapshot should be cached to avoid an infinite loop');\n\n didWarnUncachedGetSnapshot = true;\n }\n }\n }\n } else {\n nextSnapshot = getSnapshot();\n\n {\n if (!didWarnUncachedGetSnapshot) {\n var cachedSnapshot = getSnapshot();\n\n if (!objectIs(nextSnapshot, cachedSnapshot)) {\n error('The result of getSnapshot should be cached to avoid an infinite loop');\n\n didWarnUncachedGetSnapshot = true;\n }\n }\n } // Unless we're rendering a blocking lane, schedule a consistency check.\n // Right before committing, we will walk the tree and check if any of the\n // stores were mutated.\n //\n // We won't do this if we're hydrating server-rendered content, because if\n // the content is stale, it's already visible anyway. Instead we'll patch\n // it up in a passive effect.\n\n\n var root = getWorkInProgressRoot();\n\n if (root === null) {\n throw new Error('Expected a work-in-progress root. This is a bug in React. Please file an issue.');\n }\n\n if (!includesBlockingLane(root, renderLanes)) {\n pushStoreConsistencyCheck(fiber, getSnapshot, nextSnapshot);\n }\n } // Read the current snapshot from the store on every render. This breaks the\n // normal rules of React, and only works because store updates are\n // always synchronous.\n\n\n hook.memoizedState = nextSnapshot;\n var inst = {\n value: nextSnapshot,\n getSnapshot: getSnapshot\n };\n hook.queue = inst; // Schedule an effect to subscribe to the store.\n\n mountEffect(subscribeToStore.bind(null, fiber, inst, subscribe), [subscribe]); // Schedule an effect to update the mutable instance fields. We will update\n // this whenever subscribe, getSnapshot, or value changes. Because there's no\n // clean-up function, and we track the deps correctly, we can call pushEffect\n // directly, without storing any additional state. For the same reason, we\n // don't need to set a static flag, either.\n // TODO: We can move this to the passive phase once we add a pre-commit\n // consistency check. See the next comment.\n\n fiber.flags |= Passive;\n pushEffect(HasEffect | Passive$1, updateStoreInstance.bind(null, fiber, inst, nextSnapshot, getSnapshot), undefined, null);\n return nextSnapshot;\n}\n\nfunction updateSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {\n var fiber = currentlyRenderingFiber$1;\n var hook = updateWorkInProgressHook(); // Read the current snapshot from the store on every render. This breaks the\n // normal rules of React, and only works because store updates are\n // always synchronous.\n\n var nextSnapshot = getSnapshot();\n\n {\n if (!didWarnUncachedGetSnapshot) {\n var cachedSnapshot = getSnapshot();\n\n if (!objectIs(nextSnapshot, cachedSnapshot)) {\n error('The result of getSnapshot should be cached to avoid an infinite loop');\n\n didWarnUncachedGetSnapshot = true;\n }\n }\n }\n\n var prevSnapshot = hook.memoizedState;\n var snapshotChanged = !objectIs(prevSnapshot, nextSnapshot);\n\n if (snapshotChanged) {\n hook.memoizedState = nextSnapshot;\n markWorkInProgressReceivedUpdate();\n }\n\n var inst = hook.queue;\n updateEffect(subscribeToStore.bind(null, fiber, inst, subscribe), [subscribe]); // Whenever getSnapshot or subscribe changes, we need to check in the\n // commit phase if there was an interleaved mutation. In concurrent mode\n // this can happen all the time, but even in synchronous mode, an earlier\n // effect may have mutated the store.\n\n if (inst.getSnapshot !== getSnapshot || snapshotChanged || // Check if the susbcribe function changed. We can save some memory by\n // checking whether we scheduled a subscription effect above.\n workInProgressHook !== null && workInProgressHook.memoizedState.tag & HasEffect) {\n fiber.flags |= Passive;\n pushEffect(HasEffect | Passive$1, updateStoreInstance.bind(null, fiber, inst, nextSnapshot, getSnapshot), undefined, null); // Unless we're rendering a blocking lane, schedule a consistency check.\n // Right before committing, we will walk the tree and check if any of the\n // stores were mutated.\n\n var root = getWorkInProgressRoot();\n\n if (root === null) {\n throw new Error('Expected a work-in-progress root. This is a bug in React. Please file an issue.');\n }\n\n if (!includesBlockingLane(root, renderLanes)) {\n pushStoreConsistencyCheck(fiber, getSnapshot, nextSnapshot);\n }\n }\n\n return nextSnapshot;\n}\n\nfunction pushStoreConsistencyCheck(fiber, getSnapshot, renderedSnapshot) {\n fiber.flags |= StoreConsistency;\n var check = {\n getSnapshot: getSnapshot,\n value: renderedSnapshot\n };\n var componentUpdateQueue = currentlyRenderingFiber$1.updateQueue;\n\n if (componentUpdateQueue === null) {\n componentUpdateQueue = createFunctionComponentUpdateQueue();\n currentlyRenderingFiber$1.updateQueue = componentUpdateQueue;\n componentUpdateQueue.stores = [check];\n } else {\n var stores = componentUpdateQueue.stores;\n\n if (stores === null) {\n componentUpdateQueue.stores = [check];\n } else {\n stores.push(check);\n }\n }\n}\n\nfunction updateStoreInstance(fiber, inst, nextSnapshot, getSnapshot) {\n // These are updated in the passive phase\n inst.value = nextSnapshot;\n inst.getSnapshot = getSnapshot; // Something may have been mutated in between render and commit. This could\n // have been in an event that fired before the passive effects, or it could\n // have been in a layout effect. In that case, we would have used the old\n // snapsho and getSnapshot values to bail out. We need to check one more time.\n\n if (checkIfSnapshotChanged(inst)) {\n // Force a re-render.\n forceStoreRerender(fiber);\n }\n}\n\nfunction subscribeToStore(fiber, inst, subscribe) {\n var handleStoreChange = function () {\n // The store changed. Check if the snapshot changed since the last time we\n // read from the store.\n if (checkIfSnapshotChanged(inst)) {\n // Force a re-render.\n forceStoreRerender(fiber);\n }\n }; // Subscribe to the store and return a clean-up function.\n\n\n return subscribe(handleStoreChange);\n}\n\nfunction checkIfSnapshotChanged(inst) {\n var latestGetSnapshot = inst.getSnapshot;\n var prevValue = inst.value;\n\n try {\n var nextValue = latestGetSnapshot();\n return !objectIs(prevValue, nextValue);\n } catch (error) {\n return true;\n }\n}\n\nfunction forceStoreRerender(fiber) {\n var root = enqueueConcurrentRenderForLane(fiber, SyncLane);\n\n if (root !== null) {\n scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp);\n }\n}\n\nfunction mountState(initialState) {\n var hook = mountWorkInProgressHook();\n\n if (typeof initialState === 'function') {\n // $FlowFixMe: Flow doesn't like mixed types\n initialState = initialState();\n }\n\n hook.memoizedState = hook.baseState = initialState;\n var queue = {\n pending: null,\n interleaved: null,\n lanes: NoLanes,\n dispatch: null,\n lastRenderedReducer: basicStateReducer,\n lastRenderedState: initialState\n };\n hook.queue = queue;\n var dispatch = queue.dispatch = dispatchSetState.bind(null, currentlyRenderingFiber$1, queue);\n return [hook.memoizedState, dispatch];\n}\n\nfunction updateState(initialState) {\n return updateReducer(basicStateReducer);\n}\n\nfunction rerenderState(initialState) {\n return rerenderReducer(basicStateReducer);\n}\n\nfunction pushEffect(tag, create, destroy, deps) {\n var effect = {\n tag: tag,\n create: create,\n destroy: destroy,\n deps: deps,\n // Circular\n next: null\n };\n var componentUpdateQueue = currentlyRenderingFiber$1.updateQueue;\n\n if (componentUpdateQueue === null) {\n componentUpdateQueue = createFunctionComponentUpdateQueue();\n currentlyRenderingFiber$1.updateQueue = componentUpdateQueue;\n componentUpdateQueue.lastEffect = effect.next = effect;\n } else {\n var lastEffect = componentUpdateQueue.lastEffect;\n\n if (lastEffect === null) {\n componentUpdateQueue.lastEffect = effect.next = effect;\n } else {\n var firstEffect = lastEffect.next;\n lastEffect.next = effect;\n effect.next = firstEffect;\n componentUpdateQueue.lastEffect = effect;\n }\n }\n\n return effect;\n}\n\nfunction mountRef(initialValue) {\n var hook = mountWorkInProgressHook();\n\n {\n var _ref2 = {\n current: initialValue\n };\n hook.memoizedState = _ref2;\n return _ref2;\n }\n}\n\nfunction updateRef(initialValue) {\n var hook = updateWorkInProgressHook();\n return hook.memoizedState;\n}\n\nfunction mountEffectImpl(fiberFlags, hookFlags, create, deps) {\n var hook = mountWorkInProgressHook();\n var nextDeps = deps === undefined ? null : deps;\n currentlyRenderingFiber$1.flags |= fiberFlags;\n hook.memoizedState = pushEffect(HasEffect | hookFlags, create, undefined, nextDeps);\n}\n\nfunction updateEffectImpl(fiberFlags, hookFlags, create, deps) {\n var hook = updateWorkInProgressHook();\n var nextDeps = deps === undefined ? null : deps;\n var destroy = undefined;\n\n if (currentHook !== null) {\n var prevEffect = currentHook.memoizedState;\n destroy = prevEffect.destroy;\n\n if (nextDeps !== null) {\n var prevDeps = prevEffect.deps;\n\n if (areHookInputsEqual(nextDeps, prevDeps)) {\n hook.memoizedState = pushEffect(hookFlags, create, destroy, nextDeps);\n return;\n }\n }\n }\n\n currentlyRenderingFiber$1.flags |= fiberFlags;\n hook.memoizedState = pushEffect(HasEffect | hookFlags, create, destroy, nextDeps);\n}\n\nfunction mountEffect(create, deps) {\n if ( (currentlyRenderingFiber$1.mode & StrictEffectsMode) !== NoMode) {\n return mountEffectImpl(MountPassiveDev | Passive | PassiveStatic, Passive$1, create, deps);\n } else {\n return mountEffectImpl(Passive | PassiveStatic, Passive$1, create, deps);\n }\n}\n\nfunction updateEffect(create, deps) {\n return updateEffectImpl(Passive, Passive$1, create, deps);\n}\n\nfunction mountInsertionEffect(create, deps) {\n return mountEffectImpl(Update, Insertion, create, deps);\n}\n\nfunction updateInsertionEffect(create, deps) {\n return updateEffectImpl(Update, Insertion, create, deps);\n}\n\nfunction mountLayoutEffect(create, deps) {\n var fiberFlags = Update;\n\n {\n fiberFlags |= LayoutStatic;\n }\n\n if ( (currentlyRenderingFiber$1.mode & StrictEffectsMode) !== NoMode) {\n fiberFlags |= MountLayoutDev;\n }\n\n return mountEffectImpl(fiberFlags, Layout, create, deps);\n}\n\nfunction updateLayoutEffect(create, deps) {\n return updateEffectImpl(Update, Layout, create, deps);\n}\n\nfunction imperativeHandleEffect(create, ref) {\n if (typeof ref === 'function') {\n var refCallback = ref;\n\n var _inst = create();\n\n refCallback(_inst);\n return function () {\n refCallback(null);\n };\n } else if (ref !== null && ref !== undefined) {\n var refObject = ref;\n\n {\n if (!refObject.hasOwnProperty('current')) {\n error('Expected useImperativeHandle() first argument to either be a ' + 'ref callback or React.createRef() object. Instead received: %s.', 'an object with keys {' + Object.keys(refObject).join(', ') + '}');\n }\n }\n\n var _inst2 = create();\n\n refObject.current = _inst2;\n return function () {\n refObject.current = null;\n };\n }\n}\n\nfunction mountImperativeHandle(ref, create, deps) {\n {\n if (typeof create !== 'function') {\n error('Expected useImperativeHandle() second argument to be a function ' + 'that creates a handle. Instead received: %s.', create !== null ? typeof create : 'null');\n }\n } // TODO: If deps are provided, should we skip comparing the ref itself?\n\n\n var effectDeps = deps !== null && deps !== undefined ? deps.concat([ref]) : null;\n var fiberFlags = Update;\n\n {\n fiberFlags |= LayoutStatic;\n }\n\n if ( (currentlyRenderingFiber$1.mode & StrictEffectsMode) !== NoMode) {\n fiberFlags |= MountLayoutDev;\n }\n\n return mountEffectImpl(fiberFlags, Layout, imperativeHandleEffect.bind(null, create, ref), effectDeps);\n}\n\nfunction updateImperativeHandle(ref, create, deps) {\n {\n if (typeof create !== 'function') {\n error('Expected useImperativeHandle() second argument to be a function ' + 'that creates a handle. Instead received: %s.', create !== null ? typeof create : 'null');\n }\n } // TODO: If deps are provided, should we skip comparing the ref itself?\n\n\n var effectDeps = deps !== null && deps !== undefined ? deps.concat([ref]) : null;\n return updateEffectImpl(Update, Layout, imperativeHandleEffect.bind(null, create, ref), effectDeps);\n}\n\nfunction mountDebugValue(value, formatterFn) {// This hook is normally a no-op.\n // The react-debug-hooks package injects its own implementation\n // so that e.g. DevTools can display custom hook values.\n}\n\nvar updateDebugValue = mountDebugValue;\n\nfunction mountCallback(callback, deps) {\n var hook = mountWorkInProgressHook();\n var nextDeps = deps === undefined ? null : deps;\n hook.memoizedState = [callback, nextDeps];\n return callback;\n}\n\nfunction updateCallback(callback, deps) {\n var hook = updateWorkInProgressHook();\n var nextDeps = deps === undefined ? null : deps;\n var prevState = hook.memoizedState;\n\n if (prevState !== null) {\n if (nextDeps !== null) {\n var prevDeps = prevState[1];\n\n if (areHookInputsEqual(nextDeps, prevDeps)) {\n return prevState[0];\n }\n }\n }\n\n hook.memoizedState = [callback, nextDeps];\n return callback;\n}\n\nfunction mountMemo(nextCreate, deps) {\n var hook = mountWorkInProgressHook();\n var nextDeps = deps === undefined ? null : deps;\n var nextValue = nextCreate();\n hook.memoizedState = [nextValue, nextDeps];\n return nextValue;\n}\n\nfunction updateMemo(nextCreate, deps) {\n var hook = updateWorkInProgressHook();\n var nextDeps = deps === undefined ? null : deps;\n var prevState = hook.memoizedState;\n\n if (prevState !== null) {\n // Assume these are defined. If they're not, areHookInputsEqual will warn.\n if (nextDeps !== null) {\n var prevDeps = prevState[1];\n\n if (areHookInputsEqual(nextDeps, prevDeps)) {\n return prevState[0];\n }\n }\n }\n\n var nextValue = nextCreate();\n hook.memoizedState = [nextValue, nextDeps];\n return nextValue;\n}\n\nfunction mountDeferredValue(value) {\n var hook = mountWorkInProgressHook();\n hook.memoizedState = value;\n return value;\n}\n\nfunction updateDeferredValue(value) {\n var hook = updateWorkInProgressHook();\n var resolvedCurrentHook = currentHook;\n var prevValue = resolvedCurrentHook.memoizedState;\n return updateDeferredValueImpl(hook, prevValue, value);\n}\n\nfunction rerenderDeferredValue(value) {\n var hook = updateWorkInProgressHook();\n\n if (currentHook === null) {\n // This is a rerender during a mount.\n hook.memoizedState = value;\n return value;\n } else {\n // This is a rerender during an update.\n var prevValue = currentHook.memoizedState;\n return updateDeferredValueImpl(hook, prevValue, value);\n }\n}\n\nfunction updateDeferredValueImpl(hook, prevValue, value) {\n var shouldDeferValue = !includesOnlyNonUrgentLanes(renderLanes);\n\n if (shouldDeferValue) {\n // This is an urgent update. If the value has changed, keep using the\n // previous value and spawn a deferred render to update it later.\n if (!objectIs(value, prevValue)) {\n // Schedule a deferred render\n var deferredLane = claimNextTransitionLane();\n currentlyRenderingFiber$1.lanes = mergeLanes(currentlyRenderingFiber$1.lanes, deferredLane);\n markSkippedUpdateLanes(deferredLane); // Set this to true to indicate that the rendered value is inconsistent\n // from the latest value. The name \"baseState\" doesn't really match how we\n // use it because we're reusing a state hook field instead of creating a\n // new one.\n\n hook.baseState = true;\n } // Reuse the previous value\n\n\n return prevValue;\n } else {\n // This is not an urgent update, so we can use the latest value regardless\n // of what it is. No need to defer it.\n // However, if we're currently inside a spawned render, then we need to mark\n // this as an update to prevent the fiber from bailing out.\n //\n // `baseState` is true when the current value is different from the rendered\n // value. The name doesn't really match how we use it because we're reusing\n // a state hook field instead of creating a new one.\n if (hook.baseState) {\n // Flip this back to false.\n hook.baseState = false;\n markWorkInProgressReceivedUpdate();\n }\n\n hook.memoizedState = value;\n return value;\n }\n}\n\nfunction startTransition(setPending, callback, options) {\n var previousPriority = getCurrentUpdatePriority();\n setCurrentUpdatePriority(higherEventPriority(previousPriority, ContinuousEventPriority));\n setPending(true);\n var prevTransition = ReactCurrentBatchConfig$2.transition;\n ReactCurrentBatchConfig$2.transition = {};\n var currentTransition = ReactCurrentBatchConfig$2.transition;\n\n {\n ReactCurrentBatchConfig$2.transition._updatedFibers = new Set();\n }\n\n try {\n setPending(false);\n callback();\n } finally {\n setCurrentUpdatePriority(previousPriority);\n ReactCurrentBatchConfig$2.transition = prevTransition;\n\n {\n if (prevTransition === null && currentTransition._updatedFibers) {\n var updatedFibersCount = currentTransition._updatedFibers.size;\n\n if (updatedFibersCount > 10) {\n warn('Detected a large number of updates inside startTransition. ' + 'If this is due to a subscription please re-write it to use React provided hooks. ' + 'Otherwise concurrent mode guarantees are off the table.');\n }\n\n currentTransition._updatedFibers.clear();\n }\n }\n }\n}\n\nfunction mountTransition() {\n var _mountState = mountState(false),\n isPending = _mountState[0],\n setPending = _mountState[1]; // The `start` method never changes.\n\n\n var start = startTransition.bind(null, setPending);\n var hook = mountWorkInProgressHook();\n hook.memoizedState = start;\n return [isPending, start];\n}\n\nfunction updateTransition() {\n var _updateState = updateState(),\n isPending = _updateState[0];\n\n var hook = updateWorkInProgressHook();\n var start = hook.memoizedState;\n return [isPending, start];\n}\n\nfunction rerenderTransition() {\n var _rerenderState = rerenderState(),\n isPending = _rerenderState[0];\n\n var hook = updateWorkInProgressHook();\n var start = hook.memoizedState;\n return [isPending, start];\n}\n\nvar isUpdatingOpaqueValueInRenderPhase = false;\nfunction getIsUpdatingOpaqueValueInRenderPhaseInDEV() {\n {\n return isUpdatingOpaqueValueInRenderPhase;\n }\n}\n\nfunction mountId() {\n var hook = mountWorkInProgressHook();\n var root = getWorkInProgressRoot(); // TODO: In Fizz, id generation is specific to each server config. Maybe we\n // should do this in Fiber, too? Deferring this decision for now because\n // there's no other place to store the prefix except for an internal field on\n // the public createRoot object, which the fiber tree does not currently have\n // a reference to.\n\n var identifierPrefix = root.identifierPrefix;\n var id;\n\n if (getIsHydrating()) {\n var treeId = getTreeId(); // Use a captial R prefix for server-generated ids.\n\n id = ':' + identifierPrefix + 'R' + treeId; // Unless this is the first id at this level, append a number at the end\n // that represents the position of this useId hook among all the useId\n // hooks for this fiber.\n\n var localId = localIdCounter++;\n\n if (localId > 0) {\n id += 'H' + localId.toString(32);\n }\n\n id += ':';\n } else {\n // Use a lowercase r prefix for client-generated ids.\n var globalClientId = globalClientIdCounter++;\n id = ':' + identifierPrefix + 'r' + globalClientId.toString(32) + ':';\n }\n\n hook.memoizedState = id;\n return id;\n}\n\nfunction updateId() {\n var hook = updateWorkInProgressHook();\n var id = hook.memoizedState;\n return id;\n}\n\nfunction dispatchReducerAction(fiber, queue, action) {\n {\n if (typeof arguments[3] === 'function') {\n error(\"State updates from the useState() and useReducer() Hooks don't support the \" + 'second callback argument. To execute a side effect after ' + 'rendering, declare it in the component body with useEffect().');\n }\n }\n\n var lane = requestUpdateLane(fiber);\n var update = {\n lane: lane,\n action: action,\n hasEagerState: false,\n eagerState: null,\n next: null\n };\n\n if (isRenderPhaseUpdate(fiber)) {\n enqueueRenderPhaseUpdate(queue, update);\n } else {\n var root = enqueueConcurrentHookUpdate(fiber, queue, update, lane);\n\n if (root !== null) {\n var eventTime = requestEventTime();\n scheduleUpdateOnFiber(root, fiber, lane, eventTime);\n entangleTransitionUpdate(root, queue, lane);\n }\n }\n\n markUpdateInDevTools(fiber, lane);\n}\n\nfunction dispatchSetState(fiber, queue, action) {\n {\n if (typeof arguments[3] === 'function') {\n error(\"State updates from the useState() and useReducer() Hooks don't support the \" + 'second callback argument. To execute a side effect after ' + 'rendering, declare it in the component body with useEffect().');\n }\n }\n\n var lane = requestUpdateLane(fiber);\n var update = {\n lane: lane,\n action: action,\n hasEagerState: false,\n eagerState: null,\n next: null\n };\n\n if (isRenderPhaseUpdate(fiber)) {\n enqueueRenderPhaseUpdate(queue, update);\n } else {\n var alternate = fiber.alternate;\n\n if (fiber.lanes === NoLanes && (alternate === null || alternate.lanes === NoLanes)) {\n // The queue is currently empty, which means we can eagerly compute the\n // next state before entering the render phase. If the new state is the\n // same as the current state, we may be able to bail out entirely.\n var lastRenderedReducer = queue.lastRenderedReducer;\n\n if (lastRenderedReducer !== null) {\n var prevDispatcher;\n\n {\n prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n }\n\n try {\n var currentState = queue.lastRenderedState;\n var eagerState = lastRenderedReducer(currentState, action); // Stash the eagerly computed state, and the reducer used to compute\n // it, on the update object. If the reducer hasn't changed by the\n // time we enter the render phase, then the eager state can be used\n // without calling the reducer again.\n\n update.hasEagerState = true;\n update.eagerState = eagerState;\n\n if (objectIs(eagerState, currentState)) {\n // Fast path. We can bail out without scheduling React to re-render.\n // It's still possible that we'll need to rebase this update later,\n // if the component re-renders for a different reason and by that\n // time the reducer has changed.\n // TODO: Do we still need to entangle transitions in this case?\n enqueueConcurrentHookUpdateAndEagerlyBailout(fiber, queue, update, lane);\n return;\n }\n } catch (error) {// Suppress the error. It will throw again in the render phase.\n } finally {\n {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n }\n }\n }\n\n var root = enqueueConcurrentHookUpdate(fiber, queue, update, lane);\n\n if (root !== null) {\n var eventTime = requestEventTime();\n scheduleUpdateOnFiber(root, fiber, lane, eventTime);\n entangleTransitionUpdate(root, queue, lane);\n }\n }\n\n markUpdateInDevTools(fiber, lane);\n}\n\nfunction isRenderPhaseUpdate(fiber) {\n var alternate = fiber.alternate;\n return fiber === currentlyRenderingFiber$1 || alternate !== null && alternate === currentlyRenderingFiber$1;\n}\n\nfunction enqueueRenderPhaseUpdate(queue, update) {\n // This is a render phase update. Stash it in a lazily-created map of\n // queue -> linked list of updates. After this render pass, we'll restart\n // and apply the stashed updates on top of the work-in-progress hook.\n didScheduleRenderPhaseUpdateDuringThisPass = didScheduleRenderPhaseUpdate = true;\n var pending = queue.pending;\n\n if (pending === null) {\n // This is the first update. Create a circular list.\n update.next = update;\n } else {\n update.next = pending.next;\n pending.next = update;\n }\n\n queue.pending = update;\n} // TODO: Move to ReactFiberConcurrentUpdates?\n\n\nfunction entangleTransitionUpdate(root, queue, lane) {\n if (isTransitionLane(lane)) {\n var queueLanes = queue.lanes; // If any entangled lanes are no longer pending on the root, then they\n // must have finished. We can remove them from the shared queue, which\n // represents a superset of the actually pending lanes. In some cases we\n // may entangle more than we need to, but that's OK. In fact it's worse if\n // we *don't* entangle when we should.\n\n queueLanes = intersectLanes(queueLanes, root.pendingLanes); // Entangle the new transition lane with the other transition lanes.\n\n var newQueueLanes = mergeLanes(queueLanes, lane);\n queue.lanes = newQueueLanes; // Even if queue.lanes already include lane, we don't know for certain if\n // the lane finished since the last time we entangled it. So we need to\n // entangle it again, just to be sure.\n\n markRootEntangled(root, newQueueLanes);\n }\n}\n\nfunction markUpdateInDevTools(fiber, lane, action) {\n\n {\n markStateUpdateScheduled(fiber, lane);\n }\n}\n\nvar ContextOnlyDispatcher = {\n readContext: readContext,\n useCallback: throwInvalidHookError,\n useContext: throwInvalidHookError,\n useEffect: throwInvalidHookError,\n useImperativeHandle: throwInvalidHookError,\n useInsertionEffect: throwInvalidHookError,\n useLayoutEffect: throwInvalidHookError,\n useMemo: throwInvalidHookError,\n useReducer: throwInvalidHookError,\n useRef: throwInvalidHookError,\n useState: throwInvalidHookError,\n useDebugValue: throwInvalidHookError,\n useDeferredValue: throwInvalidHookError,\n useTransition: throwInvalidHookError,\n useMutableSource: throwInvalidHookError,\n useSyncExternalStore: throwInvalidHookError,\n useId: throwInvalidHookError,\n unstable_isNewReconciler: enableNewReconciler\n};\n\nvar HooksDispatcherOnMountInDEV = null;\nvar HooksDispatcherOnMountWithHookTypesInDEV = null;\nvar HooksDispatcherOnUpdateInDEV = null;\nvar HooksDispatcherOnRerenderInDEV = null;\nvar InvalidNestedHooksDispatcherOnMountInDEV = null;\nvar InvalidNestedHooksDispatcherOnUpdateInDEV = null;\nvar InvalidNestedHooksDispatcherOnRerenderInDEV = null;\n\n{\n var warnInvalidContextAccess = function () {\n error('Context can only be read while React is rendering. ' + 'In classes, you can read it in the render method or getDerivedStateFromProps. ' + 'In function components, you can read it directly in the function body, but not ' + 'inside Hooks like useReducer() or useMemo().');\n };\n\n var warnInvalidHookAccess = function () {\n error('Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. ' + 'You can only call Hooks at the top level of your React function. ' + 'For more information, see ' + 'https://reactjs.org/link/rules-of-hooks');\n };\n\n HooksDispatcherOnMountInDEV = {\n readContext: function (context) {\n return readContext(context);\n },\n useCallback: function (callback, deps) {\n currentHookNameInDev = 'useCallback';\n mountHookTypesDev();\n checkDepsAreArrayDev(deps);\n return mountCallback(callback, deps);\n },\n useContext: function (context) {\n currentHookNameInDev = 'useContext';\n mountHookTypesDev();\n return readContext(context);\n },\n useEffect: function (create, deps) {\n currentHookNameInDev = 'useEffect';\n mountHookTypesDev();\n checkDepsAreArrayDev(deps);\n return mountEffect(create, deps);\n },\n useImperativeHandle: function (ref, create, deps) {\n currentHookNameInDev = 'useImperativeHandle';\n mountHookTypesDev();\n checkDepsAreArrayDev(deps);\n return mountImperativeHandle(ref, create, deps);\n },\n useInsertionEffect: function (create, deps) {\n currentHookNameInDev = 'useInsertionEffect';\n mountHookTypesDev();\n checkDepsAreArrayDev(deps);\n return mountInsertionEffect(create, deps);\n },\n useLayoutEffect: function (create, deps) {\n currentHookNameInDev = 'useLayoutEffect';\n mountHookTypesDev();\n checkDepsAreArrayDev(deps);\n return mountLayoutEffect(create, deps);\n },\n useMemo: function (create, deps) {\n currentHookNameInDev = 'useMemo';\n mountHookTypesDev();\n checkDepsAreArrayDev(deps);\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n try {\n return mountMemo(create, deps);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useReducer: function (reducer, initialArg, init) {\n currentHookNameInDev = 'useReducer';\n mountHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n try {\n return mountReducer(reducer, initialArg, init);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useRef: function (initialValue) {\n currentHookNameInDev = 'useRef';\n mountHookTypesDev();\n return mountRef(initialValue);\n },\n useState: function (initialState) {\n currentHookNameInDev = 'useState';\n mountHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n try {\n return mountState(initialState);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useDebugValue: function (value, formatterFn) {\n currentHookNameInDev = 'useDebugValue';\n mountHookTypesDev();\n return mountDebugValue();\n },\n useDeferredValue: function (value) {\n currentHookNameInDev = 'useDeferredValue';\n mountHookTypesDev();\n return mountDeferredValue(value);\n },\n useTransition: function () {\n currentHookNameInDev = 'useTransition';\n mountHookTypesDev();\n return mountTransition();\n },\n useMutableSource: function (source, getSnapshot, subscribe) {\n currentHookNameInDev = 'useMutableSource';\n mountHookTypesDev();\n return mountMutableSource();\n },\n useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {\n currentHookNameInDev = 'useSyncExternalStore';\n mountHookTypesDev();\n return mountSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);\n },\n useId: function () {\n currentHookNameInDev = 'useId';\n mountHookTypesDev();\n return mountId();\n },\n unstable_isNewReconciler: enableNewReconciler\n };\n\n HooksDispatcherOnMountWithHookTypesInDEV = {\n readContext: function (context) {\n return readContext(context);\n },\n useCallback: function (callback, deps) {\n currentHookNameInDev = 'useCallback';\n updateHookTypesDev();\n return mountCallback(callback, deps);\n },\n useContext: function (context) {\n currentHookNameInDev = 'useContext';\n updateHookTypesDev();\n return readContext(context);\n },\n useEffect: function (create, deps) {\n currentHookNameInDev = 'useEffect';\n updateHookTypesDev();\n return mountEffect(create, deps);\n },\n useImperativeHandle: function (ref, create, deps) {\n currentHookNameInDev = 'useImperativeHandle';\n updateHookTypesDev();\n return mountImperativeHandle(ref, create, deps);\n },\n useInsertionEffect: function (create, deps) {\n currentHookNameInDev = 'useInsertionEffect';\n updateHookTypesDev();\n return mountInsertionEffect(create, deps);\n },\n useLayoutEffect: function (create, deps) {\n currentHookNameInDev = 'useLayoutEffect';\n updateHookTypesDev();\n return mountLayoutEffect(create, deps);\n },\n useMemo: function (create, deps) {\n currentHookNameInDev = 'useMemo';\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n try {\n return mountMemo(create, deps);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useReducer: function (reducer, initialArg, init) {\n currentHookNameInDev = 'useReducer';\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n try {\n return mountReducer(reducer, initialArg, init);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useRef: function (initialValue) {\n currentHookNameInDev = 'useRef';\n updateHookTypesDev();\n return mountRef(initialValue);\n },\n useState: function (initialState) {\n currentHookNameInDev = 'useState';\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n try {\n return mountState(initialState);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useDebugValue: function (value, formatterFn) {\n currentHookNameInDev = 'useDebugValue';\n updateHookTypesDev();\n return mountDebugValue();\n },\n useDeferredValue: function (value) {\n currentHookNameInDev = 'useDeferredValue';\n updateHookTypesDev();\n return mountDeferredValue(value);\n },\n useTransition: function () {\n currentHookNameInDev = 'useTransition';\n updateHookTypesDev();\n return mountTransition();\n },\n useMutableSource: function (source, getSnapshot, subscribe) {\n currentHookNameInDev = 'useMutableSource';\n updateHookTypesDev();\n return mountMutableSource();\n },\n useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {\n currentHookNameInDev = 'useSyncExternalStore';\n updateHookTypesDev();\n return mountSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);\n },\n useId: function () {\n currentHookNameInDev = 'useId';\n updateHookTypesDev();\n return mountId();\n },\n unstable_isNewReconciler: enableNewReconciler\n };\n\n HooksDispatcherOnUpdateInDEV = {\n readContext: function (context) {\n return readContext(context);\n },\n useCallback: function (callback, deps) {\n currentHookNameInDev = 'useCallback';\n updateHookTypesDev();\n return updateCallback(callback, deps);\n },\n useContext: function (context) {\n currentHookNameInDev = 'useContext';\n updateHookTypesDev();\n return readContext(context);\n },\n useEffect: function (create, deps) {\n currentHookNameInDev = 'useEffect';\n updateHookTypesDev();\n return updateEffect(create, deps);\n },\n useImperativeHandle: function (ref, create, deps) {\n currentHookNameInDev = 'useImperativeHandle';\n updateHookTypesDev();\n return updateImperativeHandle(ref, create, deps);\n },\n useInsertionEffect: function (create, deps) {\n currentHookNameInDev = 'useInsertionEffect';\n updateHookTypesDev();\n return updateInsertionEffect(create, deps);\n },\n useLayoutEffect: function (create, deps) {\n currentHookNameInDev = 'useLayoutEffect';\n updateHookTypesDev();\n return updateLayoutEffect(create, deps);\n },\n useMemo: function (create, deps) {\n currentHookNameInDev = 'useMemo';\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n try {\n return updateMemo(create, deps);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useReducer: function (reducer, initialArg, init) {\n currentHookNameInDev = 'useReducer';\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n try {\n return updateReducer(reducer, initialArg, init);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useRef: function (initialValue) {\n currentHookNameInDev = 'useRef';\n updateHookTypesDev();\n return updateRef();\n },\n useState: function (initialState) {\n currentHookNameInDev = 'useState';\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n try {\n return updateState(initialState);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useDebugValue: function (value, formatterFn) {\n currentHookNameInDev = 'useDebugValue';\n updateHookTypesDev();\n return updateDebugValue();\n },\n useDeferredValue: function (value) {\n currentHookNameInDev = 'useDeferredValue';\n updateHookTypesDev();\n return updateDeferredValue(value);\n },\n useTransition: function () {\n currentHookNameInDev = 'useTransition';\n updateHookTypesDev();\n return updateTransition();\n },\n useMutableSource: function (source, getSnapshot, subscribe) {\n currentHookNameInDev = 'useMutableSource';\n updateHookTypesDev();\n return updateMutableSource();\n },\n useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {\n currentHookNameInDev = 'useSyncExternalStore';\n updateHookTypesDev();\n return updateSyncExternalStore(subscribe, getSnapshot);\n },\n useId: function () {\n currentHookNameInDev = 'useId';\n updateHookTypesDev();\n return updateId();\n },\n unstable_isNewReconciler: enableNewReconciler\n };\n\n HooksDispatcherOnRerenderInDEV = {\n readContext: function (context) {\n return readContext(context);\n },\n useCallback: function (callback, deps) {\n currentHookNameInDev = 'useCallback';\n updateHookTypesDev();\n return updateCallback(callback, deps);\n },\n useContext: function (context) {\n currentHookNameInDev = 'useContext';\n updateHookTypesDev();\n return readContext(context);\n },\n useEffect: function (create, deps) {\n currentHookNameInDev = 'useEffect';\n updateHookTypesDev();\n return updateEffect(create, deps);\n },\n useImperativeHandle: function (ref, create, deps) {\n currentHookNameInDev = 'useImperativeHandle';\n updateHookTypesDev();\n return updateImperativeHandle(ref, create, deps);\n },\n useInsertionEffect: function (create, deps) {\n currentHookNameInDev = 'useInsertionEffect';\n updateHookTypesDev();\n return updateInsertionEffect(create, deps);\n },\n useLayoutEffect: function (create, deps) {\n currentHookNameInDev = 'useLayoutEffect';\n updateHookTypesDev();\n return updateLayoutEffect(create, deps);\n },\n useMemo: function (create, deps) {\n currentHookNameInDev = 'useMemo';\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnRerenderInDEV;\n\n try {\n return updateMemo(create, deps);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useReducer: function (reducer, initialArg, init) {\n currentHookNameInDev = 'useReducer';\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnRerenderInDEV;\n\n try {\n return rerenderReducer(reducer, initialArg, init);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useRef: function (initialValue) {\n currentHookNameInDev = 'useRef';\n updateHookTypesDev();\n return updateRef();\n },\n useState: function (initialState) {\n currentHookNameInDev = 'useState';\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnRerenderInDEV;\n\n try {\n return rerenderState(initialState);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useDebugValue: function (value, formatterFn) {\n currentHookNameInDev = 'useDebugValue';\n updateHookTypesDev();\n return updateDebugValue();\n },\n useDeferredValue: function (value) {\n currentHookNameInDev = 'useDeferredValue';\n updateHookTypesDev();\n return rerenderDeferredValue(value);\n },\n useTransition: function () {\n currentHookNameInDev = 'useTransition';\n updateHookTypesDev();\n return rerenderTransition();\n },\n useMutableSource: function (source, getSnapshot, subscribe) {\n currentHookNameInDev = 'useMutableSource';\n updateHookTypesDev();\n return updateMutableSource();\n },\n useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {\n currentHookNameInDev = 'useSyncExternalStore';\n updateHookTypesDev();\n return updateSyncExternalStore(subscribe, getSnapshot);\n },\n useId: function () {\n currentHookNameInDev = 'useId';\n updateHookTypesDev();\n return updateId();\n },\n unstable_isNewReconciler: enableNewReconciler\n };\n\n InvalidNestedHooksDispatcherOnMountInDEV = {\n readContext: function (context) {\n warnInvalidContextAccess();\n return readContext(context);\n },\n useCallback: function (callback, deps) {\n currentHookNameInDev = 'useCallback';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountCallback(callback, deps);\n },\n useContext: function (context) {\n currentHookNameInDev = 'useContext';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return readContext(context);\n },\n useEffect: function (create, deps) {\n currentHookNameInDev = 'useEffect';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountEffect(create, deps);\n },\n useImperativeHandle: function (ref, create, deps) {\n currentHookNameInDev = 'useImperativeHandle';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountImperativeHandle(ref, create, deps);\n },\n useInsertionEffect: function (create, deps) {\n currentHookNameInDev = 'useInsertionEffect';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountInsertionEffect(create, deps);\n },\n useLayoutEffect: function (create, deps) {\n currentHookNameInDev = 'useLayoutEffect';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountLayoutEffect(create, deps);\n },\n useMemo: function (create, deps) {\n currentHookNameInDev = 'useMemo';\n warnInvalidHookAccess();\n mountHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n try {\n return mountMemo(create, deps);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useReducer: function (reducer, initialArg, init) {\n currentHookNameInDev = 'useReducer';\n warnInvalidHookAccess();\n mountHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n try {\n return mountReducer(reducer, initialArg, init);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useRef: function (initialValue) {\n currentHookNameInDev = 'useRef';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountRef(initialValue);\n },\n useState: function (initialState) {\n currentHookNameInDev = 'useState';\n warnInvalidHookAccess();\n mountHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n try {\n return mountState(initialState);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useDebugValue: function (value, formatterFn) {\n currentHookNameInDev = 'useDebugValue';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountDebugValue();\n },\n useDeferredValue: function (value) {\n currentHookNameInDev = 'useDeferredValue';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountDeferredValue(value);\n },\n useTransition: function () {\n currentHookNameInDev = 'useTransition';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountTransition();\n },\n useMutableSource: function (source, getSnapshot, subscribe) {\n currentHookNameInDev = 'useMutableSource';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountMutableSource();\n },\n useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {\n currentHookNameInDev = 'useSyncExternalStore';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);\n },\n useId: function () {\n currentHookNameInDev = 'useId';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountId();\n },\n unstable_isNewReconciler: enableNewReconciler\n };\n\n InvalidNestedHooksDispatcherOnUpdateInDEV = {\n readContext: function (context) {\n warnInvalidContextAccess();\n return readContext(context);\n },\n useCallback: function (callback, deps) {\n currentHookNameInDev = 'useCallback';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateCallback(callback, deps);\n },\n useContext: function (context) {\n currentHookNameInDev = 'useContext';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return readContext(context);\n },\n useEffect: function (create, deps) {\n currentHookNameInDev = 'useEffect';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateEffect(create, deps);\n },\n useImperativeHandle: function (ref, create, deps) {\n currentHookNameInDev = 'useImperativeHandle';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateImperativeHandle(ref, create, deps);\n },\n useInsertionEffect: function (create, deps) {\n currentHookNameInDev = 'useInsertionEffect';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateInsertionEffect(create, deps);\n },\n useLayoutEffect: function (create, deps) {\n currentHookNameInDev = 'useLayoutEffect';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateLayoutEffect(create, deps);\n },\n useMemo: function (create, deps) {\n currentHookNameInDev = 'useMemo';\n warnInvalidHookAccess();\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n try {\n return updateMemo(create, deps);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useReducer: function (reducer, initialArg, init) {\n currentHookNameInDev = 'useReducer';\n warnInvalidHookAccess();\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n try {\n return updateReducer(reducer, initialArg, init);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useRef: function (initialValue) {\n currentHookNameInDev = 'useRef';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateRef();\n },\n useState: function (initialState) {\n currentHookNameInDev = 'useState';\n warnInvalidHookAccess();\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n try {\n return updateState(initialState);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useDebugValue: function (value, formatterFn) {\n currentHookNameInDev = 'useDebugValue';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateDebugValue();\n },\n useDeferredValue: function (value) {\n currentHookNameInDev = 'useDeferredValue';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateDeferredValue(value);\n },\n useTransition: function () {\n currentHookNameInDev = 'useTransition';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateTransition();\n },\n useMutableSource: function (source, getSnapshot, subscribe) {\n currentHookNameInDev = 'useMutableSource';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateMutableSource();\n },\n useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {\n currentHookNameInDev = 'useSyncExternalStore';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateSyncExternalStore(subscribe, getSnapshot);\n },\n useId: function () {\n currentHookNameInDev = 'useId';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateId();\n },\n unstable_isNewReconciler: enableNewReconciler\n };\n\n InvalidNestedHooksDispatcherOnRerenderInDEV = {\n readContext: function (context) {\n warnInvalidContextAccess();\n return readContext(context);\n },\n useCallback: function (callback, deps) {\n currentHookNameInDev = 'useCallback';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateCallback(callback, deps);\n },\n useContext: function (context) {\n currentHookNameInDev = 'useContext';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return readContext(context);\n },\n useEffect: function (create, deps) {\n currentHookNameInDev = 'useEffect';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateEffect(create, deps);\n },\n useImperativeHandle: function (ref, create, deps) {\n currentHookNameInDev = 'useImperativeHandle';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateImperativeHandle(ref, create, deps);\n },\n useInsertionEffect: function (create, deps) {\n currentHookNameInDev = 'useInsertionEffect';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateInsertionEffect(create, deps);\n },\n useLayoutEffect: function (create, deps) {\n currentHookNameInDev = 'useLayoutEffect';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateLayoutEffect(create, deps);\n },\n useMemo: function (create, deps) {\n currentHookNameInDev = 'useMemo';\n warnInvalidHookAccess();\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n try {\n return updateMemo(create, deps);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useReducer: function (reducer, initialArg, init) {\n currentHookNameInDev = 'useReducer';\n warnInvalidHookAccess();\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n try {\n return rerenderReducer(reducer, initialArg, init);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useRef: function (initialValue) {\n currentHookNameInDev = 'useRef';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateRef();\n },\n useState: function (initialState) {\n currentHookNameInDev = 'useState';\n warnInvalidHookAccess();\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n try {\n return rerenderState(initialState);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useDebugValue: function (value, formatterFn) {\n currentHookNameInDev = 'useDebugValue';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateDebugValue();\n },\n useDeferredValue: function (value) {\n currentHookNameInDev = 'useDeferredValue';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return rerenderDeferredValue(value);\n },\n useTransition: function () {\n currentHookNameInDev = 'useTransition';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return rerenderTransition();\n },\n useMutableSource: function (source, getSnapshot, subscribe) {\n currentHookNameInDev = 'useMutableSource';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateMutableSource();\n },\n useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {\n currentHookNameInDev = 'useSyncExternalStore';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateSyncExternalStore(subscribe, getSnapshot);\n },\n useId: function () {\n currentHookNameInDev = 'useId';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateId();\n },\n unstable_isNewReconciler: enableNewReconciler\n };\n}\n\nvar now$1 = Scheduler.unstable_now;\nvar commitTime = 0;\nvar layoutEffectStartTime = -1;\nvar profilerStartTime = -1;\nvar passiveEffectStartTime = -1;\n/**\n * Tracks whether the current update was a nested/cascading update (scheduled from a layout effect).\n *\n * The overall sequence is:\n * 1. render\n * 2. commit (and call `onRender`, `onCommit`)\n * 3. check for nested updates\n * 4. flush passive effects (and call `onPostCommit`)\n *\n * Nested updates are identified in step 3 above,\n * but step 4 still applies to the work that was just committed.\n * We use two flags to track nested updates then:\n * one tracks whether the upcoming update is a nested update,\n * and the other tracks whether the current update was a nested update.\n * The first value gets synced to the second at the start of the render phase.\n */\n\nvar currentUpdateIsNested = false;\nvar nestedUpdateScheduled = false;\n\nfunction isCurrentUpdateNested() {\n return currentUpdateIsNested;\n}\n\nfunction markNestedUpdateScheduled() {\n {\n nestedUpdateScheduled = true;\n }\n}\n\nfunction resetNestedUpdateFlag() {\n {\n currentUpdateIsNested = false;\n nestedUpdateScheduled = false;\n }\n}\n\nfunction syncNestedUpdateFlag() {\n {\n currentUpdateIsNested = nestedUpdateScheduled;\n nestedUpdateScheduled = false;\n }\n}\n\nfunction getCommitTime() {\n return commitTime;\n}\n\nfunction recordCommitTime() {\n\n commitTime = now$1();\n}\n\nfunction startProfilerTimer(fiber) {\n\n profilerStartTime = now$1();\n\n if (fiber.actualStartTime < 0) {\n fiber.actualStartTime = now$1();\n }\n}\n\nfunction stopProfilerTimerIfRunning(fiber) {\n\n profilerStartTime = -1;\n}\n\nfunction stopProfilerTimerIfRunningAndRecordDelta(fiber, overrideBaseTime) {\n\n if (profilerStartTime >= 0) {\n var elapsedTime = now$1() - profilerStartTime;\n fiber.actualDuration += elapsedTime;\n\n if (overrideBaseTime) {\n fiber.selfBaseDuration = elapsedTime;\n }\n\n profilerStartTime = -1;\n }\n}\n\nfunction recordLayoutEffectDuration(fiber) {\n\n if (layoutEffectStartTime >= 0) {\n var elapsedTime = now$1() - layoutEffectStartTime;\n layoutEffectStartTime = -1; // Store duration on the next nearest Profiler ancestor\n // Or the root (for the DevTools Profiler to read)\n\n var parentFiber = fiber.return;\n\n while (parentFiber !== null) {\n switch (parentFiber.tag) {\n case HostRoot:\n var root = parentFiber.stateNode;\n root.effectDuration += elapsedTime;\n return;\n\n case Profiler:\n var parentStateNode = parentFiber.stateNode;\n parentStateNode.effectDuration += elapsedTime;\n return;\n }\n\n parentFiber = parentFiber.return;\n }\n }\n}\n\nfunction recordPassiveEffectDuration(fiber) {\n\n if (passiveEffectStartTime >= 0) {\n var elapsedTime = now$1() - passiveEffectStartTime;\n passiveEffectStartTime = -1; // Store duration on the next nearest Profiler ancestor\n // Or the root (for the DevTools Profiler to read)\n\n var parentFiber = fiber.return;\n\n while (parentFiber !== null) {\n switch (parentFiber.tag) {\n case HostRoot:\n var root = parentFiber.stateNode;\n\n if (root !== null) {\n root.passiveEffectDuration += elapsedTime;\n }\n\n return;\n\n case Profiler:\n var parentStateNode = parentFiber.stateNode;\n\n if (parentStateNode !== null) {\n // Detached fibers have their state node cleared out.\n // In this case, the return pointer is also cleared out,\n // so we won't be able to report the time spent in this Profiler's subtree.\n parentStateNode.passiveEffectDuration += elapsedTime;\n }\n\n return;\n }\n\n parentFiber = parentFiber.return;\n }\n }\n}\n\nfunction startLayoutEffectTimer() {\n\n layoutEffectStartTime = now$1();\n}\n\nfunction startPassiveEffectTimer() {\n\n passiveEffectStartTime = now$1();\n}\n\nfunction transferActualDuration(fiber) {\n // Transfer time spent rendering these children so we don't lose it\n // after we rerender. This is used as a helper in special cases\n // where we should count the work of multiple passes.\n var child = fiber.child;\n\n while (child) {\n fiber.actualDuration += child.actualDuration;\n child = child.sibling;\n }\n}\n\nfunction resolveDefaultProps(Component, baseProps) {\n if (Component && Component.defaultProps) {\n // Resolve default props. Taken from ReactElement\n var props = assign({}, baseProps);\n var defaultProps = Component.defaultProps;\n\n for (var propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n\n return props;\n }\n\n return baseProps;\n}\n\nvar fakeInternalInstance = {};\nvar didWarnAboutStateAssignmentForComponent;\nvar didWarnAboutUninitializedState;\nvar didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate;\nvar didWarnAboutLegacyLifecyclesAndDerivedState;\nvar didWarnAboutUndefinedDerivedState;\nvar warnOnUndefinedDerivedState;\nvar warnOnInvalidCallback;\nvar didWarnAboutDirectlyAssigningPropsToState;\nvar didWarnAboutContextTypeAndContextTypes;\nvar didWarnAboutInvalidateContextType;\nvar didWarnAboutLegacyContext$1;\n\n{\n didWarnAboutStateAssignmentForComponent = new Set();\n didWarnAboutUninitializedState = new Set();\n didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate = new Set();\n didWarnAboutLegacyLifecyclesAndDerivedState = new Set();\n didWarnAboutDirectlyAssigningPropsToState = new Set();\n didWarnAboutUndefinedDerivedState = new Set();\n didWarnAboutContextTypeAndContextTypes = new Set();\n didWarnAboutInvalidateContextType = new Set();\n didWarnAboutLegacyContext$1 = new Set();\n var didWarnOnInvalidCallback = new Set();\n\n warnOnInvalidCallback = function (callback, callerName) {\n if (callback === null || typeof callback === 'function') {\n return;\n }\n\n var key = callerName + '_' + callback;\n\n if (!didWarnOnInvalidCallback.has(key)) {\n didWarnOnInvalidCallback.add(key);\n\n error('%s(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callerName, callback);\n }\n };\n\n warnOnUndefinedDerivedState = function (type, partialState) {\n if (partialState === undefined) {\n var componentName = getComponentNameFromType(type) || 'Component';\n\n if (!didWarnAboutUndefinedDerivedState.has(componentName)) {\n didWarnAboutUndefinedDerivedState.add(componentName);\n\n error('%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. ' + 'You have returned undefined.', componentName);\n }\n }\n }; // This is so gross but it's at least non-critical and can be removed if\n // it causes problems. This is meant to give a nicer error message for\n // ReactDOM15.unstable_renderSubtreeIntoContainer(reactDOM16Component,\n // ...)) which otherwise throws a \"_processChildContext is not a function\"\n // exception.\n\n\n Object.defineProperty(fakeInternalInstance, '_processChildContext', {\n enumerable: false,\n value: function () {\n throw new Error('_processChildContext is not available in React 16+. This likely ' + 'means you have multiple copies of React and are attempting to nest ' + 'a React 15 tree inside a React 16 tree using ' + \"unstable_renderSubtreeIntoContainer, which isn't supported. Try \" + 'to make sure you have only one copy of React (and ideally, switch ' + 'to ReactDOM.createPortal).');\n }\n });\n Object.freeze(fakeInternalInstance);\n}\n\nfunction applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, nextProps) {\n var prevState = workInProgress.memoizedState;\n var partialState = getDerivedStateFromProps(nextProps, prevState);\n\n {\n if ( workInProgress.mode & StrictLegacyMode) {\n setIsStrictModeForDevtools(true);\n\n try {\n // Invoke the function an extra time to help detect side-effects.\n partialState = getDerivedStateFromProps(nextProps, prevState);\n } finally {\n setIsStrictModeForDevtools(false);\n }\n }\n\n warnOnUndefinedDerivedState(ctor, partialState);\n } // Merge the partial state and the previous state.\n\n\n var memoizedState = partialState === null || partialState === undefined ? prevState : assign({}, prevState, partialState);\n workInProgress.memoizedState = memoizedState; // Once the update queue is empty, persist the derived state onto the\n // base state.\n\n if (workInProgress.lanes === NoLanes) {\n // Queue is always non-null for classes\n var updateQueue = workInProgress.updateQueue;\n updateQueue.baseState = memoizedState;\n }\n}\n\nvar classComponentUpdater = {\n isMounted: isMounted,\n enqueueSetState: function (inst, payload, callback) {\n var fiber = get(inst);\n var eventTime = requestEventTime();\n var lane = requestUpdateLane(fiber);\n var update = createUpdate(eventTime, lane);\n update.payload = payload;\n\n if (callback !== undefined && callback !== null) {\n {\n warnOnInvalidCallback(callback, 'setState');\n }\n\n update.callback = callback;\n }\n\n var root = enqueueUpdate(fiber, update, lane);\n\n if (root !== null) {\n scheduleUpdateOnFiber(root, fiber, lane, eventTime);\n entangleTransitions(root, fiber, lane);\n }\n\n {\n markStateUpdateScheduled(fiber, lane);\n }\n },\n enqueueReplaceState: function (inst, payload, callback) {\n var fiber = get(inst);\n var eventTime = requestEventTime();\n var lane = requestUpdateLane(fiber);\n var update = createUpdate(eventTime, lane);\n update.tag = ReplaceState;\n update.payload = payload;\n\n if (callback !== undefined && callback !== null) {\n {\n warnOnInvalidCallback(callback, 'replaceState');\n }\n\n update.callback = callback;\n }\n\n var root = enqueueUpdate(fiber, update, lane);\n\n if (root !== null) {\n scheduleUpdateOnFiber(root, fiber, lane, eventTime);\n entangleTransitions(root, fiber, lane);\n }\n\n {\n markStateUpdateScheduled(fiber, lane);\n }\n },\n enqueueForceUpdate: function (inst, callback) {\n var fiber = get(inst);\n var eventTime = requestEventTime();\n var lane = requestUpdateLane(fiber);\n var update = createUpdate(eventTime, lane);\n update.tag = ForceUpdate;\n\n if (callback !== undefined && callback !== null) {\n {\n warnOnInvalidCallback(callback, 'forceUpdate');\n }\n\n update.callback = callback;\n }\n\n var root = enqueueUpdate(fiber, update, lane);\n\n if (root !== null) {\n scheduleUpdateOnFiber(root, fiber, lane, eventTime);\n entangleTransitions(root, fiber, lane);\n }\n\n {\n markForceUpdateScheduled(fiber, lane);\n }\n }\n};\n\nfunction checkShouldComponentUpdate(workInProgress, ctor, oldProps, newProps, oldState, newState, nextContext) {\n var instance = workInProgress.stateNode;\n\n if (typeof instance.shouldComponentUpdate === 'function') {\n var shouldUpdate = instance.shouldComponentUpdate(newProps, newState, nextContext);\n\n {\n if ( workInProgress.mode & StrictLegacyMode) {\n setIsStrictModeForDevtools(true);\n\n try {\n // Invoke the function an extra time to help detect side-effects.\n shouldUpdate = instance.shouldComponentUpdate(newProps, newState, nextContext);\n } finally {\n setIsStrictModeForDevtools(false);\n }\n }\n\n if (shouldUpdate === undefined) {\n error('%s.shouldComponentUpdate(): Returned undefined instead of a ' + 'boolean value. Make sure to return true or false.', getComponentNameFromType(ctor) || 'Component');\n }\n }\n\n return shouldUpdate;\n }\n\n if (ctor.prototype && ctor.prototype.isPureReactComponent) {\n return !shallowEqual(oldProps, newProps) || !shallowEqual(oldState, newState);\n }\n\n return true;\n}\n\nfunction checkClassInstance(workInProgress, ctor, newProps) {\n var instance = workInProgress.stateNode;\n\n {\n var name = getComponentNameFromType(ctor) || 'Component';\n var renderPresent = instance.render;\n\n if (!renderPresent) {\n if (ctor.prototype && typeof ctor.prototype.render === 'function') {\n error('%s(...): No `render` method found on the returned component ' + 'instance: did you accidentally return an object from the constructor?', name);\n } else {\n error('%s(...): No `render` method found on the returned component ' + 'instance: you may have forgotten to define `render`.', name);\n }\n }\n\n if (instance.getInitialState && !instance.getInitialState.isReactClassApproved && !instance.state) {\n error('getInitialState was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Did you mean to define a state property instead?', name);\n }\n\n if (instance.getDefaultProps && !instance.getDefaultProps.isReactClassApproved) {\n error('getDefaultProps was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Use a static property to define defaultProps instead.', name);\n }\n\n if (instance.propTypes) {\n error('propTypes was defined as an instance property on %s. Use a static ' + 'property to define propTypes instead.', name);\n }\n\n if (instance.contextType) {\n error('contextType was defined as an instance property on %s. Use a static ' + 'property to define contextType instead.', name);\n }\n\n {\n if (ctor.childContextTypes && !didWarnAboutLegacyContext$1.has(ctor) && // Strict Mode has its own warning for legacy context, so we can skip\n // this one.\n (workInProgress.mode & StrictLegacyMode) === NoMode) {\n didWarnAboutLegacyContext$1.add(ctor);\n\n error('%s uses the legacy childContextTypes API which is no longer ' + 'supported and will be removed in the next major release. Use ' + 'React.createContext() instead\\n\\n.' + 'Learn more about this warning here: https://reactjs.org/link/legacy-context', name);\n }\n\n if (ctor.contextTypes && !didWarnAboutLegacyContext$1.has(ctor) && // Strict Mode has its own warning for legacy context, so we can skip\n // this one.\n (workInProgress.mode & StrictLegacyMode) === NoMode) {\n didWarnAboutLegacyContext$1.add(ctor);\n\n error('%s uses the legacy contextTypes API which is no longer supported ' + 'and will be removed in the next major release. Use ' + 'React.createContext() with static contextType instead.\\n\\n' + 'Learn more about this warning here: https://reactjs.org/link/legacy-context', name);\n }\n\n if (instance.contextTypes) {\n error('contextTypes was defined as an instance property on %s. Use a static ' + 'property to define contextTypes instead.', name);\n }\n\n if (ctor.contextType && ctor.contextTypes && !didWarnAboutContextTypeAndContextTypes.has(ctor)) {\n didWarnAboutContextTypeAndContextTypes.add(ctor);\n\n error('%s declares both contextTypes and contextType static properties. ' + 'The legacy contextTypes property will be ignored.', name);\n }\n }\n\n if (typeof instance.componentShouldUpdate === 'function') {\n error('%s has a method called ' + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + 'The name is phrased as a question because the function is ' + 'expected to return a value.', name);\n }\n\n if (ctor.prototype && ctor.prototype.isPureReactComponent && typeof instance.shouldComponentUpdate !== 'undefined') {\n error('%s has a method called shouldComponentUpdate(). ' + 'shouldComponentUpdate should not be used when extending React.PureComponent. ' + 'Please extend React.Component if shouldComponentUpdate is used.', getComponentNameFromType(ctor) || 'A pure component');\n }\n\n if (typeof instance.componentDidUnmount === 'function') {\n error('%s has a method called ' + 'componentDidUnmount(). But there is no such lifecycle method. ' + 'Did you mean componentWillUnmount()?', name);\n }\n\n if (typeof instance.componentDidReceiveProps === 'function') {\n error('%s has a method called ' + 'componentDidReceiveProps(). But there is no such lifecycle method. ' + 'If you meant to update the state in response to changing props, ' + 'use componentWillReceiveProps(). If you meant to fetch data or ' + 'run side-effects or mutations after React has updated the UI, use componentDidUpdate().', name);\n }\n\n if (typeof instance.componentWillRecieveProps === 'function') {\n error('%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', name);\n }\n\n if (typeof instance.UNSAFE_componentWillRecieveProps === 'function') {\n error('%s has a method called ' + 'UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?', name);\n }\n\n var hasMutatedProps = instance.props !== newProps;\n\n if (instance.props !== undefined && hasMutatedProps) {\n error('%s(...): When calling super() in `%s`, make sure to pass ' + \"up the same props that your component's constructor was passed.\", name, name);\n }\n\n if (instance.defaultProps) {\n error('Setting defaultProps as an instance property on %s is not supported and will be ignored.' + ' Instead, define defaultProps as a static property on %s.', name, name);\n }\n\n if (typeof instance.getSnapshotBeforeUpdate === 'function' && typeof instance.componentDidUpdate !== 'function' && !didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.has(ctor)) {\n didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.add(ctor);\n\n error('%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). ' + 'This component defines getSnapshotBeforeUpdate() only.', getComponentNameFromType(ctor));\n }\n\n if (typeof instance.getDerivedStateFromProps === 'function') {\n error('%s: getDerivedStateFromProps() is defined as an instance method ' + 'and will be ignored. Instead, declare it as a static method.', name);\n }\n\n if (typeof instance.getDerivedStateFromError === 'function') {\n error('%s: getDerivedStateFromError() is defined as an instance method ' + 'and will be ignored. Instead, declare it as a static method.', name);\n }\n\n if (typeof ctor.getSnapshotBeforeUpdate === 'function') {\n error('%s: getSnapshotBeforeUpdate() is defined as a static method ' + 'and will be ignored. Instead, declare it as an instance method.', name);\n }\n\n var _state = instance.state;\n\n if (_state && (typeof _state !== 'object' || isArray(_state))) {\n error('%s.state: must be set to an object or null', name);\n }\n\n if (typeof instance.getChildContext === 'function' && typeof ctor.childContextTypes !== 'object') {\n error('%s.getChildContext(): childContextTypes must be defined in order to ' + 'use getChildContext().', name);\n }\n }\n}\n\nfunction adoptClassInstance(workInProgress, instance) {\n instance.updater = classComponentUpdater;\n workInProgress.stateNode = instance; // The instance needs access to the fiber so that it can schedule updates\n\n set(instance, workInProgress);\n\n {\n instance._reactInternalInstance = fakeInternalInstance;\n }\n}\n\nfunction constructClassInstance(workInProgress, ctor, props) {\n var isLegacyContextConsumer = false;\n var unmaskedContext = emptyContextObject;\n var context = emptyContextObject;\n var contextType = ctor.contextType;\n\n {\n if ('contextType' in ctor) {\n var isValid = // Allow null for conditional declaration\n contextType === null || contextType !== undefined && contextType.$$typeof === REACT_CONTEXT_TYPE && contextType._context === undefined; // Not a <Context.Consumer>\n\n if (!isValid && !didWarnAboutInvalidateContextType.has(ctor)) {\n didWarnAboutInvalidateContextType.add(ctor);\n var addendum = '';\n\n if (contextType === undefined) {\n addendum = ' However, it is set to undefined. ' + 'This can be caused by a typo or by mixing up named and default imports. ' + 'This can also happen due to a circular dependency, so ' + 'try moving the createContext() call to a separate file.';\n } else if (typeof contextType !== 'object') {\n addendum = ' However, it is set to a ' + typeof contextType + '.';\n } else if (contextType.$$typeof === REACT_PROVIDER_TYPE) {\n addendum = ' Did you accidentally pass the Context.Provider instead?';\n } else if (contextType._context !== undefined) {\n // <Context.Consumer>\n addendum = ' Did you accidentally pass the Context.Consumer instead?';\n } else {\n addendum = ' However, it is set to an object with keys {' + Object.keys(contextType).join(', ') + '}.';\n }\n\n error('%s defines an invalid contextType. ' + 'contextType should point to the Context object returned by React.createContext().%s', getComponentNameFromType(ctor) || 'Component', addendum);\n }\n }\n }\n\n if (typeof contextType === 'object' && contextType !== null) {\n context = readContext(contextType);\n } else {\n unmaskedContext = getUnmaskedContext(workInProgress, ctor, true);\n var contextTypes = ctor.contextTypes;\n isLegacyContextConsumer = contextTypes !== null && contextTypes !== undefined;\n context = isLegacyContextConsumer ? getMaskedContext(workInProgress, unmaskedContext) : emptyContextObject;\n }\n\n var instance = new ctor(props, context); // Instantiate twice to help detect side-effects.\n\n {\n if ( workInProgress.mode & StrictLegacyMode) {\n setIsStrictModeForDevtools(true);\n\n try {\n instance = new ctor(props, context); // eslint-disable-line no-new\n } finally {\n setIsStrictModeForDevtools(false);\n }\n }\n }\n\n var state = workInProgress.memoizedState = instance.state !== null && instance.state !== undefined ? instance.state : null;\n adoptClassInstance(workInProgress, instance);\n\n {\n if (typeof ctor.getDerivedStateFromProps === 'function' && state === null) {\n var componentName = getComponentNameFromType(ctor) || 'Component';\n\n if (!didWarnAboutUninitializedState.has(componentName)) {\n didWarnAboutUninitializedState.add(componentName);\n\n error('`%s` uses `getDerivedStateFromProps` but its initial state is ' + '%s. This is not recommended. Instead, define the initial state by ' + 'assigning an object to `this.state` in the constructor of `%s`. ' + 'This ensures that `getDerivedStateFromProps` arguments have a consistent shape.', componentName, instance.state === null ? 'null' : 'undefined', componentName);\n }\n } // If new component APIs are defined, \"unsafe\" lifecycles won't be called.\n // Warn about these lifecycles if they are present.\n // Don't warn about react-lifecycles-compat polyfilled methods though.\n\n\n if (typeof ctor.getDerivedStateFromProps === 'function' || typeof instance.getSnapshotBeforeUpdate === 'function') {\n var foundWillMountName = null;\n var foundWillReceivePropsName = null;\n var foundWillUpdateName = null;\n\n if (typeof instance.componentWillMount === 'function' && instance.componentWillMount.__suppressDeprecationWarning !== true) {\n foundWillMountName = 'componentWillMount';\n } else if (typeof instance.UNSAFE_componentWillMount === 'function') {\n foundWillMountName = 'UNSAFE_componentWillMount';\n }\n\n if (typeof instance.componentWillReceiveProps === 'function' && instance.componentWillReceiveProps.__suppressDeprecationWarning !== true) {\n foundWillReceivePropsName = 'componentWillReceiveProps';\n } else if (typeof instance.UNSAFE_componentWillReceiveProps === 'function') {\n foundWillReceivePropsName = 'UNSAFE_componentWillReceiveProps';\n }\n\n if (typeof instance.componentWillUpdate === 'function' && instance.componentWillUpdate.__suppressDeprecationWarning !== true) {\n foundWillUpdateName = 'componentWillUpdate';\n } else if (typeof instance.UNSAFE_componentWillUpdate === 'function') {\n foundWillUpdateName = 'UNSAFE_componentWillUpdate';\n }\n\n if (foundWillMountName !== null || foundWillReceivePropsName !== null || foundWillUpdateName !== null) {\n var _componentName = getComponentNameFromType(ctor) || 'Component';\n\n var newApiName = typeof ctor.getDerivedStateFromProps === 'function' ? 'getDerivedStateFromProps()' : 'getSnapshotBeforeUpdate()';\n\n if (!didWarnAboutLegacyLifecyclesAndDerivedState.has(_componentName)) {\n didWarnAboutLegacyLifecyclesAndDerivedState.add(_componentName);\n\n error('Unsafe legacy lifecycles will not be called for components using new component APIs.\\n\\n' + '%s uses %s but also contains the following legacy lifecycles:%s%s%s\\n\\n' + 'The above lifecycles should be removed. Learn more about this warning here:\\n' + 'https://reactjs.org/link/unsafe-component-lifecycles', _componentName, newApiName, foundWillMountName !== null ? \"\\n \" + foundWillMountName : '', foundWillReceivePropsName !== null ? \"\\n \" + foundWillReceivePropsName : '', foundWillUpdateName !== null ? \"\\n \" + foundWillUpdateName : '');\n }\n }\n }\n } // Cache unmasked context so we can avoid recreating masked context unless necessary.\n // ReactFiberContext usually updates this cache but can't for newly-created instances.\n\n\n if (isLegacyContextConsumer) {\n cacheContext(workInProgress, unmaskedContext, context);\n }\n\n return instance;\n}\n\nfunction callComponentWillMount(workInProgress, instance) {\n var oldState = instance.state;\n\n if (typeof instance.componentWillMount === 'function') {\n instance.componentWillMount();\n }\n\n if (typeof instance.UNSAFE_componentWillMount === 'function') {\n instance.UNSAFE_componentWillMount();\n }\n\n if (oldState !== instance.state) {\n {\n error('%s.componentWillMount(): Assigning directly to this.state is ' + \"deprecated (except inside a component's \" + 'constructor). Use setState instead.', getComponentNameFromFiber(workInProgress) || 'Component');\n }\n\n classComponentUpdater.enqueueReplaceState(instance, instance.state, null);\n }\n}\n\nfunction callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext) {\n var oldState = instance.state;\n\n if (typeof instance.componentWillReceiveProps === 'function') {\n instance.componentWillReceiveProps(newProps, nextContext);\n }\n\n if (typeof instance.UNSAFE_componentWillReceiveProps === 'function') {\n instance.UNSAFE_componentWillReceiveProps(newProps, nextContext);\n }\n\n if (instance.state !== oldState) {\n {\n var componentName = getComponentNameFromFiber(workInProgress) || 'Component';\n\n if (!didWarnAboutStateAssignmentForComponent.has(componentName)) {\n didWarnAboutStateAssignmentForComponent.add(componentName);\n\n error('%s.componentWillReceiveProps(): Assigning directly to ' + \"this.state is deprecated (except inside a component's \" + 'constructor). Use setState instead.', componentName);\n }\n }\n\n classComponentUpdater.enqueueReplaceState(instance, instance.state, null);\n }\n} // Invokes the mount life-cycles on a previously never rendered instance.\n\n\nfunction mountClassInstance(workInProgress, ctor, newProps, renderLanes) {\n {\n checkClassInstance(workInProgress, ctor, newProps);\n }\n\n var instance = workInProgress.stateNode;\n instance.props = newProps;\n instance.state = workInProgress.memoizedState;\n instance.refs = {};\n initializeUpdateQueue(workInProgress);\n var contextType = ctor.contextType;\n\n if (typeof contextType === 'object' && contextType !== null) {\n instance.context = readContext(contextType);\n } else {\n var unmaskedContext = getUnmaskedContext(workInProgress, ctor, true);\n instance.context = getMaskedContext(workInProgress, unmaskedContext);\n }\n\n {\n if (instance.state === newProps) {\n var componentName = getComponentNameFromType(ctor) || 'Component';\n\n if (!didWarnAboutDirectlyAssigningPropsToState.has(componentName)) {\n didWarnAboutDirectlyAssigningPropsToState.add(componentName);\n\n error('%s: It is not recommended to assign props directly to state ' + \"because updates to props won't be reflected in state. \" + 'In most cases, it is better to use props directly.', componentName);\n }\n }\n\n if (workInProgress.mode & StrictLegacyMode) {\n ReactStrictModeWarnings.recordLegacyContextWarning(workInProgress, instance);\n }\n\n {\n ReactStrictModeWarnings.recordUnsafeLifecycleWarnings(workInProgress, instance);\n }\n }\n\n instance.state = workInProgress.memoizedState;\n var getDerivedStateFromProps = ctor.getDerivedStateFromProps;\n\n if (typeof getDerivedStateFromProps === 'function') {\n applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps);\n instance.state = workInProgress.memoizedState;\n } // In order to support react-lifecycles-compat polyfilled components,\n // Unsafe lifecycles should not be invoked for components using the new APIs.\n\n\n if (typeof ctor.getDerivedStateFromProps !== 'function' && typeof instance.getSnapshotBeforeUpdate !== 'function' && (typeof instance.UNSAFE_componentWillMount === 'function' || typeof instance.componentWillMount === 'function')) {\n callComponentWillMount(workInProgress, instance); // If we had additional state updates during this life-cycle, let's\n // process them now.\n\n processUpdateQueue(workInProgress, newProps, instance, renderLanes);\n instance.state = workInProgress.memoizedState;\n }\n\n if (typeof instance.componentDidMount === 'function') {\n var fiberFlags = Update;\n\n {\n fiberFlags |= LayoutStatic;\n }\n\n if ( (workInProgress.mode & StrictEffectsMode) !== NoMode) {\n fiberFlags |= MountLayoutDev;\n }\n\n workInProgress.flags |= fiberFlags;\n }\n}\n\nfunction resumeMountClassInstance(workInProgress, ctor, newProps, renderLanes) {\n var instance = workInProgress.stateNode;\n var oldProps = workInProgress.memoizedProps;\n instance.props = oldProps;\n var oldContext = instance.context;\n var contextType = ctor.contextType;\n var nextContext = emptyContextObject;\n\n if (typeof contextType === 'object' && contextType !== null) {\n nextContext = readContext(contextType);\n } else {\n var nextLegacyUnmaskedContext = getUnmaskedContext(workInProgress, ctor, true);\n nextContext = getMaskedContext(workInProgress, nextLegacyUnmaskedContext);\n }\n\n var getDerivedStateFromProps = ctor.getDerivedStateFromProps;\n var hasNewLifecycles = typeof getDerivedStateFromProps === 'function' || typeof instance.getSnapshotBeforeUpdate === 'function'; // Note: During these life-cycles, instance.props/instance.state are what\n // ever the previously attempted to render - not the \"current\". However,\n // during componentDidUpdate we pass the \"current\" props.\n // In order to support react-lifecycles-compat polyfilled components,\n // Unsafe lifecycles should not be invoked for components using the new APIs.\n\n if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillReceiveProps === 'function' || typeof instance.componentWillReceiveProps === 'function')) {\n if (oldProps !== newProps || oldContext !== nextContext) {\n callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext);\n }\n }\n\n resetHasForceUpdateBeforeProcessing();\n var oldState = workInProgress.memoizedState;\n var newState = instance.state = oldState;\n processUpdateQueue(workInProgress, newProps, instance, renderLanes);\n newState = workInProgress.memoizedState;\n\n if (oldProps === newProps && oldState === newState && !hasContextChanged() && !checkHasForceUpdateAfterProcessing()) {\n // If an update was already in progress, we should schedule an Update\n // effect even though we're bailing out, so that cWU/cDU are called.\n if (typeof instance.componentDidMount === 'function') {\n var fiberFlags = Update;\n\n {\n fiberFlags |= LayoutStatic;\n }\n\n if ( (workInProgress.mode & StrictEffectsMode) !== NoMode) {\n fiberFlags |= MountLayoutDev;\n }\n\n workInProgress.flags |= fiberFlags;\n }\n\n return false;\n }\n\n if (typeof getDerivedStateFromProps === 'function') {\n applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps);\n newState = workInProgress.memoizedState;\n }\n\n var shouldUpdate = checkHasForceUpdateAfterProcessing() || checkShouldComponentUpdate(workInProgress, ctor, oldProps, newProps, oldState, newState, nextContext);\n\n if (shouldUpdate) {\n // In order to support react-lifecycles-compat polyfilled components,\n // Unsafe lifecycles should not be invoked for components using the new APIs.\n if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillMount === 'function' || typeof instance.componentWillMount === 'function')) {\n if (typeof instance.componentWillMount === 'function') {\n instance.componentWillMount();\n }\n\n if (typeof instance.UNSAFE_componentWillMount === 'function') {\n instance.UNSAFE_componentWillMount();\n }\n }\n\n if (typeof instance.componentDidMount === 'function') {\n var _fiberFlags = Update;\n\n {\n _fiberFlags |= LayoutStatic;\n }\n\n if ( (workInProgress.mode & StrictEffectsMode) !== NoMode) {\n _fiberFlags |= MountLayoutDev;\n }\n\n workInProgress.flags |= _fiberFlags;\n }\n } else {\n // If an update was already in progress, we should schedule an Update\n // effect even though we're bailing out, so that cWU/cDU are called.\n if (typeof instance.componentDidMount === 'function') {\n var _fiberFlags2 = Update;\n\n {\n _fiberFlags2 |= LayoutStatic;\n }\n\n if ( (workInProgress.mode & StrictEffectsMode) !== NoMode) {\n _fiberFlags2 |= MountLayoutDev;\n }\n\n workInProgress.flags |= _fiberFlags2;\n } // If shouldComponentUpdate returned false, we should still update the\n // memoized state to indicate that this work can be reused.\n\n\n workInProgress.memoizedProps = newProps;\n workInProgress.memoizedState = newState;\n } // Update the existing instance's state, props, and context pointers even\n // if shouldComponentUpdate returns false.\n\n\n instance.props = newProps;\n instance.state = newState;\n instance.context = nextContext;\n return shouldUpdate;\n} // Invokes the update life-cycles and returns false if it shouldn't rerender.\n\n\nfunction updateClassInstance(current, workInProgress, ctor, newProps, renderLanes) {\n var instance = workInProgress.stateNode;\n cloneUpdateQueue(current, workInProgress);\n var unresolvedOldProps = workInProgress.memoizedProps;\n var oldProps = workInProgress.type === workInProgress.elementType ? unresolvedOldProps : resolveDefaultProps(workInProgress.type, unresolvedOldProps);\n instance.props = oldProps;\n var unresolvedNewProps = workInProgress.pendingProps;\n var oldContext = instance.context;\n var contextType = ctor.contextType;\n var nextContext = emptyContextObject;\n\n if (typeof contextType === 'object' && contextType !== null) {\n nextContext = readContext(contextType);\n } else {\n var nextUnmaskedContext = getUnmaskedContext(workInProgress, ctor, true);\n nextContext = getMaskedContext(workInProgress, nextUnmaskedContext);\n }\n\n var getDerivedStateFromProps = ctor.getDerivedStateFromProps;\n var hasNewLifecycles = typeof getDerivedStateFromProps === 'function' || typeof instance.getSnapshotBeforeUpdate === 'function'; // Note: During these life-cycles, instance.props/instance.state are what\n // ever the previously attempted to render - not the \"current\". However,\n // during componentDidUpdate we pass the \"current\" props.\n // In order to support react-lifecycles-compat polyfilled components,\n // Unsafe lifecycles should not be invoked for components using the new APIs.\n\n if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillReceiveProps === 'function' || typeof instance.componentWillReceiveProps === 'function')) {\n if (unresolvedOldProps !== unresolvedNewProps || oldContext !== nextContext) {\n callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext);\n }\n }\n\n resetHasForceUpdateBeforeProcessing();\n var oldState = workInProgress.memoizedState;\n var newState = instance.state = oldState;\n processUpdateQueue(workInProgress, newProps, instance, renderLanes);\n newState = workInProgress.memoizedState;\n\n if (unresolvedOldProps === unresolvedNewProps && oldState === newState && !hasContextChanged() && !checkHasForceUpdateAfterProcessing() && !(enableLazyContextPropagation )) {\n // If an update was already in progress, we should schedule an Update\n // effect even though we're bailing out, so that cWU/cDU are called.\n if (typeof instance.componentDidUpdate === 'function') {\n if (unresolvedOldProps !== current.memoizedProps || oldState !== current.memoizedState) {\n workInProgress.flags |= Update;\n }\n }\n\n if (typeof instance.getSnapshotBeforeUpdate === 'function') {\n if (unresolvedOldProps !== current.memoizedProps || oldState !== current.memoizedState) {\n workInProgress.flags |= Snapshot;\n }\n }\n\n return false;\n }\n\n if (typeof getDerivedStateFromProps === 'function') {\n applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps);\n newState = workInProgress.memoizedState;\n }\n\n var shouldUpdate = checkHasForceUpdateAfterProcessing() || checkShouldComponentUpdate(workInProgress, ctor, oldProps, newProps, oldState, newState, nextContext) || // TODO: In some cases, we'll end up checking if context has changed twice,\n // both before and after `shouldComponentUpdate` has been called. Not ideal,\n // but I'm loath to refactor this function. This only happens for memoized\n // components so it's not that common.\n enableLazyContextPropagation ;\n\n if (shouldUpdate) {\n // In order to support react-lifecycles-compat polyfilled components,\n // Unsafe lifecycles should not be invoked for components using the new APIs.\n if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillUpdate === 'function' || typeof instance.componentWillUpdate === 'function')) {\n if (typeof instance.componentWillUpdate === 'function') {\n instance.componentWillUpdate(newProps, newState, nextContext);\n }\n\n if (typeof instance.UNSAFE_componentWillUpdate === 'function') {\n instance.UNSAFE_componentWillUpdate(newProps, newState, nextContext);\n }\n }\n\n if (typeof instance.componentDidUpdate === 'function') {\n workInProgress.flags |= Update;\n }\n\n if (typeof instance.getSnapshotBeforeUpdate === 'function') {\n workInProgress.flags |= Snapshot;\n }\n } else {\n // If an update was already in progress, we should schedule an Update\n // effect even though we're bailing out, so that cWU/cDU are called.\n if (typeof instance.componentDidUpdate === 'function') {\n if (unresolvedOldProps !== current.memoizedProps || oldState !== current.memoizedState) {\n workInProgress.flags |= Update;\n }\n }\n\n if (typeof instance.getSnapshotBeforeUpdate === 'function') {\n if (unresolvedOldProps !== current.memoizedProps || oldState !== current.memoizedState) {\n workInProgress.flags |= Snapshot;\n }\n } // If shouldComponentUpdate returned false, we should still update the\n // memoized props/state to indicate that this work can be reused.\n\n\n workInProgress.memoizedProps = newProps;\n workInProgress.memoizedState = newState;\n } // Update the existing instance's state, props, and context pointers even\n // if shouldComponentUpdate returns false.\n\n\n instance.props = newProps;\n instance.state = newState;\n instance.context = nextContext;\n return shouldUpdate;\n}\n\nfunction createCapturedValueAtFiber(value, source) {\n // If the value is an error, call this function immediately after it is thrown\n // so the stack is accurate.\n return {\n value: value,\n source: source,\n stack: getStackByFiberInDevAndProd(source),\n digest: null\n };\n}\nfunction createCapturedValue(value, digest, stack) {\n return {\n value: value,\n source: null,\n stack: stack != null ? stack : null,\n digest: digest != null ? digest : null\n };\n}\n\n// This module is forked in different environments.\n// By default, return `true` to log errors to the console.\n// Forks can return `false` if this isn't desirable.\nfunction showErrorDialog(boundary, errorInfo) {\n return true;\n}\n\nfunction logCapturedError(boundary, errorInfo) {\n try {\n var logError = showErrorDialog(boundary, errorInfo); // Allow injected showErrorDialog() to prevent default console.error logging.\n // This enables renderers like ReactNative to better manage redbox behavior.\n\n if (logError === false) {\n return;\n }\n\n var error = errorInfo.value;\n\n if (true) {\n var source = errorInfo.source;\n var stack = errorInfo.stack;\n var componentStack = stack !== null ? stack : ''; // Browsers support silencing uncaught errors by calling\n // `preventDefault()` in window `error` handler.\n // We record this information as an expando on the error.\n\n if (error != null && error._suppressLogging) {\n if (boundary.tag === ClassComponent) {\n // The error is recoverable and was silenced.\n // Ignore it and don't print the stack addendum.\n // This is handy for testing error boundaries without noise.\n return;\n } // The error is fatal. Since the silencing might have\n // been accidental, we'll surface it anyway.\n // However, the browser would have silenced the original error\n // so we'll print it first, and then print the stack addendum.\n\n\n console['error'](error); // Don't transform to our wrapper\n // For a more detailed description of this block, see:\n // https://github.com/facebook/react/pull/13384\n }\n\n var componentName = source ? getComponentNameFromFiber(source) : null;\n var componentNameMessage = componentName ? \"The above error occurred in the <\" + componentName + \"> component:\" : 'The above error occurred in one of your React components:';\n var errorBoundaryMessage;\n\n if (boundary.tag === HostRoot) {\n errorBoundaryMessage = 'Consider adding an error boundary to your tree to customize error handling behavior.\\n' + 'Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.';\n } else {\n var errorBoundaryName = getComponentNameFromFiber(boundary) || 'Anonymous';\n errorBoundaryMessage = \"React will try to recreate this component tree from scratch \" + (\"using the error boundary you provided, \" + errorBoundaryName + \".\");\n }\n\n var combinedMessage = componentNameMessage + \"\\n\" + componentStack + \"\\n\\n\" + (\"\" + errorBoundaryMessage); // In development, we provide our own message with just the component stack.\n // We don't include the original error message and JS stack because the browser\n // has already printed it. Even if the application swallows the error, it is still\n // displayed by the browser thanks to the DEV-only fake event trick in ReactErrorUtils.\n\n console['error'](combinedMessage); // Don't transform to our wrapper\n } else {}\n } catch (e) {\n // This method must not throw, or React internal state will get messed up.\n // If console.error is overridden, or logCapturedError() shows a dialog that throws,\n // we want to report this error outside of the normal stack as a last resort.\n // https://github.com/facebook/react/issues/13188\n setTimeout(function () {\n throw e;\n });\n }\n}\n\nvar PossiblyWeakMap$1 = typeof WeakMap === 'function' ? WeakMap : Map;\n\nfunction createRootErrorUpdate(fiber, errorInfo, lane) {\n var update = createUpdate(NoTimestamp, lane); // Unmount the root by rendering null.\n\n update.tag = CaptureUpdate; // Caution: React DevTools currently depends on this property\n // being called \"element\".\n\n update.payload = {\n element: null\n };\n var error = errorInfo.value;\n\n update.callback = function () {\n onUncaughtError(error);\n logCapturedError(fiber, errorInfo);\n };\n\n return update;\n}\n\nfunction createClassErrorUpdate(fiber, errorInfo, lane) {\n var update = createUpdate(NoTimestamp, lane);\n update.tag = CaptureUpdate;\n var getDerivedStateFromError = fiber.type.getDerivedStateFromError;\n\n if (typeof getDerivedStateFromError === 'function') {\n var error$1 = errorInfo.value;\n\n update.payload = function () {\n return getDerivedStateFromError(error$1);\n };\n\n update.callback = function () {\n {\n markFailedErrorBoundaryForHotReloading(fiber);\n }\n\n logCapturedError(fiber, errorInfo);\n };\n }\n\n var inst = fiber.stateNode;\n\n if (inst !== null && typeof inst.componentDidCatch === 'function') {\n update.callback = function callback() {\n {\n markFailedErrorBoundaryForHotReloading(fiber);\n }\n\n logCapturedError(fiber, errorInfo);\n\n if (typeof getDerivedStateFromError !== 'function') {\n // To preserve the preexisting retry behavior of error boundaries,\n // we keep track of which ones already failed during this batch.\n // This gets reset before we yield back to the browser.\n // TODO: Warn in strict mode if getDerivedStateFromError is\n // not defined.\n markLegacyErrorBoundaryAsFailed(this);\n }\n\n var error$1 = errorInfo.value;\n var stack = errorInfo.stack;\n this.componentDidCatch(error$1, {\n componentStack: stack !== null ? stack : ''\n });\n\n {\n if (typeof getDerivedStateFromError !== 'function') {\n // If componentDidCatch is the only error boundary method defined,\n // then it needs to call setState to recover from errors.\n // If no state update is scheduled then the boundary will swallow the error.\n if (!includesSomeLane(fiber.lanes, SyncLane)) {\n error('%s: Error boundaries should implement getDerivedStateFromError(). ' + 'In that method, return a state update to display an error message or fallback UI.', getComponentNameFromFiber(fiber) || 'Unknown');\n }\n }\n }\n };\n }\n\n return update;\n}\n\nfunction attachPingListener(root, wakeable, lanes) {\n // Attach a ping listener\n //\n // The data might resolve before we have a chance to commit the fallback. Or,\n // in the case of a refresh, we'll never commit a fallback. So we need to\n // attach a listener now. When it resolves (\"pings\"), we can decide whether to\n // try rendering the tree again.\n //\n // Only attach a listener if one does not already exist for the lanes\n // we're currently rendering (which acts like a \"thread ID\" here).\n //\n // We only need to do this in concurrent mode. Legacy Suspense always\n // commits fallbacks synchronously, so there are no pings.\n var pingCache = root.pingCache;\n var threadIDs;\n\n if (pingCache === null) {\n pingCache = root.pingCache = new PossiblyWeakMap$1();\n threadIDs = new Set();\n pingCache.set(wakeable, threadIDs);\n } else {\n threadIDs = pingCache.get(wakeable);\n\n if (threadIDs === undefined) {\n threadIDs = new Set();\n pingCache.set(wakeable, threadIDs);\n }\n }\n\n if (!threadIDs.has(lanes)) {\n // Memoize using the thread ID to prevent redundant listeners.\n threadIDs.add(lanes);\n var ping = pingSuspendedRoot.bind(null, root, wakeable, lanes);\n\n {\n if (isDevToolsPresent) {\n // If we have pending work still, restore the original updaters\n restorePendingUpdaters(root, lanes);\n }\n }\n\n wakeable.then(ping, ping);\n }\n}\n\nfunction attachRetryListener(suspenseBoundary, root, wakeable, lanes) {\n // Retry listener\n //\n // If the fallback does commit, we need to attach a different type of\n // listener. This one schedules an update on the Suspense boundary to turn\n // the fallback state off.\n //\n // Stash the wakeable on the boundary fiber so we can access it in the\n // commit phase.\n //\n // When the wakeable resolves, we'll attempt to render the boundary\n // again (\"retry\").\n var wakeables = suspenseBoundary.updateQueue;\n\n if (wakeables === null) {\n var updateQueue = new Set();\n updateQueue.add(wakeable);\n suspenseBoundary.updateQueue = updateQueue;\n } else {\n wakeables.add(wakeable);\n }\n}\n\nfunction resetSuspendedComponent(sourceFiber, rootRenderLanes) {\n // A legacy mode Suspense quirk, only relevant to hook components.\n\n\n var tag = sourceFiber.tag;\n\n if ((sourceFiber.mode & ConcurrentMode) === NoMode && (tag === FunctionComponent || tag === ForwardRef || tag === SimpleMemoComponent)) {\n var currentSource = sourceFiber.alternate;\n\n if (currentSource) {\n sourceFiber.updateQueue = currentSource.updateQueue;\n sourceFiber.memoizedState = currentSource.memoizedState;\n sourceFiber.lanes = currentSource.lanes;\n } else {\n sourceFiber.updateQueue = null;\n sourceFiber.memoizedState = null;\n }\n }\n}\n\nfunction getNearestSuspenseBoundaryToCapture(returnFiber) {\n var node = returnFiber;\n\n do {\n if (node.tag === SuspenseComponent && shouldCaptureSuspense(node)) {\n return node;\n } // This boundary already captured during this render. Continue to the next\n // boundary.\n\n\n node = node.return;\n } while (node !== null);\n\n return null;\n}\n\nfunction markSuspenseBoundaryShouldCapture(suspenseBoundary, returnFiber, sourceFiber, root, rootRenderLanes) {\n // This marks a Suspense boundary so that when we're unwinding the stack,\n // it captures the suspended \"exception\" and does a second (fallback) pass.\n if ((suspenseBoundary.mode & ConcurrentMode) === NoMode) {\n // Legacy Mode Suspense\n //\n // If the boundary is in legacy mode, we should *not*\n // suspend the commit. Pretend as if the suspended component rendered\n // null and keep rendering. When the Suspense boundary completes,\n // we'll do a second pass to render the fallback.\n if (suspenseBoundary === returnFiber) {\n // Special case where we suspended while reconciling the children of\n // a Suspense boundary's inner Offscreen wrapper fiber. This happens\n // when a React.lazy component is a direct child of a\n // Suspense boundary.\n //\n // Suspense boundaries are implemented as multiple fibers, but they\n // are a single conceptual unit. The legacy mode behavior where we\n // pretend the suspended fiber committed as `null` won't work,\n // because in this case the \"suspended\" fiber is the inner\n // Offscreen wrapper.\n //\n // Because the contents of the boundary haven't started rendering\n // yet (i.e. nothing in the tree has partially rendered) we can\n // switch to the regular, concurrent mode behavior: mark the\n // boundary with ShouldCapture and enter the unwind phase.\n suspenseBoundary.flags |= ShouldCapture;\n } else {\n suspenseBoundary.flags |= DidCapture;\n sourceFiber.flags |= ForceUpdateForLegacySuspense; // We're going to commit this fiber even though it didn't complete.\n // But we shouldn't call any lifecycle methods or callbacks. Remove\n // all lifecycle effect tags.\n\n sourceFiber.flags &= ~(LifecycleEffectMask | Incomplete);\n\n if (sourceFiber.tag === ClassComponent) {\n var currentSourceFiber = sourceFiber.alternate;\n\n if (currentSourceFiber === null) {\n // This is a new mount. Change the tag so it's not mistaken for a\n // completed class component. For example, we should not call\n // componentWillUnmount if it is deleted.\n sourceFiber.tag = IncompleteClassComponent;\n } else {\n // When we try rendering again, we should not reuse the current fiber,\n // since it's known to be in an inconsistent state. Use a force update to\n // prevent a bail out.\n var update = createUpdate(NoTimestamp, SyncLane);\n update.tag = ForceUpdate;\n enqueueUpdate(sourceFiber, update, SyncLane);\n }\n } // The source fiber did not complete. Mark it with Sync priority to\n // indicate that it still has pending work.\n\n\n sourceFiber.lanes = mergeLanes(sourceFiber.lanes, SyncLane);\n }\n\n return suspenseBoundary;\n } // Confirmed that the boundary is in a concurrent mode tree. Continue\n // with the normal suspend path.\n //\n // After this we'll use a set of heuristics to determine whether this\n // render pass will run to completion or restart or \"suspend\" the commit.\n // The actual logic for this is spread out in different places.\n //\n // This first principle is that if we're going to suspend when we complete\n // a root, then we should also restart if we get an update or ping that\n // might unsuspend it, and vice versa. The only reason to suspend is\n // because you think you might want to restart before committing. However,\n // it doesn't make sense to restart only while in the period we're suspended.\n //\n // Restarting too aggressively is also not good because it starves out any\n // intermediate loading state. So we use heuristics to determine when.\n // Suspense Heuristics\n //\n // If nothing threw a Promise or all the same fallbacks are already showing,\n // then don't suspend/restart.\n //\n // If this is an initial render of a new tree of Suspense boundaries and\n // those trigger a fallback, then don't suspend/restart. We want to ensure\n // that we can show the initial loading state as quickly as possible.\n //\n // If we hit a \"Delayed\" case, such as when we'd switch from content back into\n // a fallback, then we should always suspend/restart. Transitions apply\n // to this case. If none is defined, JND is used instead.\n //\n // If we're already showing a fallback and it gets \"retried\", allowing us to show\n // another level, but there's still an inner boundary that would show a fallback,\n // then we suspend/restart for 500ms since the last time we showed a fallback\n // anywhere in the tree. This effectively throttles progressive loading into a\n // consistent train of commits. This also gives us an opportunity to restart to\n // get to the completed state slightly earlier.\n //\n // If there's ambiguity due to batching it's resolved in preference of:\n // 1) \"delayed\", 2) \"initial render\", 3) \"retry\".\n //\n // We want to ensure that a \"busy\" state doesn't get force committed. We want to\n // ensure that new initial loading states can commit as soon as possible.\n\n\n suspenseBoundary.flags |= ShouldCapture; // TODO: I think we can remove this, since we now use `DidCapture` in\n // the begin phase to prevent an early bailout.\n\n suspenseBoundary.lanes = rootRenderLanes;\n return suspenseBoundary;\n}\n\nfunction throwException(root, returnFiber, sourceFiber, value, rootRenderLanes) {\n // The source fiber did not complete.\n sourceFiber.flags |= Incomplete;\n\n {\n if (isDevToolsPresent) {\n // If we have pending work still, restore the original updaters\n restorePendingUpdaters(root, rootRenderLanes);\n }\n }\n\n if (value !== null && typeof value === 'object' && typeof value.then === 'function') {\n // This is a wakeable. The component suspended.\n var wakeable = value;\n resetSuspendedComponent(sourceFiber);\n\n {\n if (getIsHydrating() && sourceFiber.mode & ConcurrentMode) {\n markDidThrowWhileHydratingDEV();\n }\n }\n\n\n var suspenseBoundary = getNearestSuspenseBoundaryToCapture(returnFiber);\n\n if (suspenseBoundary !== null) {\n suspenseBoundary.flags &= ~ForceClientRender;\n markSuspenseBoundaryShouldCapture(suspenseBoundary, returnFiber, sourceFiber, root, rootRenderLanes); // We only attach ping listeners in concurrent mode. Legacy Suspense always\n // commits fallbacks synchronously, so there are no pings.\n\n if (suspenseBoundary.mode & ConcurrentMode) {\n attachPingListener(root, wakeable, rootRenderLanes);\n }\n\n attachRetryListener(suspenseBoundary, root, wakeable);\n return;\n } else {\n // No boundary was found. Unless this is a sync update, this is OK.\n // We can suspend and wait for more data to arrive.\n if (!includesSyncLane(rootRenderLanes)) {\n // This is not a sync update. Suspend. Since we're not activating a\n // Suspense boundary, this will unwind all the way to the root without\n // performing a second pass to render a fallback. (This is arguably how\n // refresh transitions should work, too, since we're not going to commit\n // the fallbacks anyway.)\n //\n // This case also applies to initial hydration.\n attachPingListener(root, wakeable, rootRenderLanes);\n renderDidSuspendDelayIfPossible();\n return;\n } // This is a sync/discrete update. We treat this case like an error\n // because discrete renders are expected to produce a complete tree\n // synchronously to maintain consistency with external state.\n\n\n var uncaughtSuspenseError = new Error('A component suspended while responding to synchronous input. This ' + 'will cause the UI to be replaced with a loading indicator. To ' + 'fix, updates that suspend should be wrapped ' + 'with startTransition.'); // If we're outside a transition, fall through to the regular error path.\n // The error will be caught by the nearest suspense boundary.\n\n value = uncaughtSuspenseError;\n }\n } else {\n // This is a regular error, not a Suspense wakeable.\n if (getIsHydrating() && sourceFiber.mode & ConcurrentMode) {\n markDidThrowWhileHydratingDEV();\n\n var _suspenseBoundary = getNearestSuspenseBoundaryToCapture(returnFiber); // If the error was thrown during hydration, we may be able to recover by\n // discarding the dehydrated content and switching to a client render.\n // Instead of surfacing the error, find the nearest Suspense boundary\n // and render it again without hydration.\n\n\n if (_suspenseBoundary !== null) {\n if ((_suspenseBoundary.flags & ShouldCapture) === NoFlags) {\n // Set a flag to indicate that we should try rendering the normal\n // children again, not the fallback.\n _suspenseBoundary.flags |= ForceClientRender;\n }\n\n markSuspenseBoundaryShouldCapture(_suspenseBoundary, returnFiber, sourceFiber, root, rootRenderLanes); // Even though the user may not be affected by this error, we should\n // still log it so it can be fixed.\n\n queueHydrationError(createCapturedValueAtFiber(value, sourceFiber));\n return;\n }\n }\n }\n\n value = createCapturedValueAtFiber(value, sourceFiber);\n renderDidError(value); // We didn't find a boundary that could handle this type of exception. Start\n // over and traverse parent path again, this time treating the exception\n // as an error.\n\n var workInProgress = returnFiber;\n\n do {\n switch (workInProgress.tag) {\n case HostRoot:\n {\n var _errorInfo = value;\n workInProgress.flags |= ShouldCapture;\n var lane = pickArbitraryLane(rootRenderLanes);\n workInProgress.lanes = mergeLanes(workInProgress.lanes, lane);\n var update = createRootErrorUpdate(workInProgress, _errorInfo, lane);\n enqueueCapturedUpdate(workInProgress, update);\n return;\n }\n\n case ClassComponent:\n // Capture and retry\n var errorInfo = value;\n var ctor = workInProgress.type;\n var instance = workInProgress.stateNode;\n\n if ((workInProgress.flags & DidCapture) === NoFlags && (typeof ctor.getDerivedStateFromError === 'function' || instance !== null && typeof instance.componentDidCatch === 'function' && !isAlreadyFailedLegacyErrorBoundary(instance))) {\n workInProgress.flags |= ShouldCapture;\n\n var _lane = pickArbitraryLane(rootRenderLanes);\n\n workInProgress.lanes = mergeLanes(workInProgress.lanes, _lane); // Schedule the error boundary to re-render using updated state\n\n var _update = createClassErrorUpdate(workInProgress, errorInfo, _lane);\n\n enqueueCapturedUpdate(workInProgress, _update);\n return;\n }\n\n break;\n }\n\n workInProgress = workInProgress.return;\n } while (workInProgress !== null);\n}\n\nfunction getSuspendedCache() {\n {\n return null;\n } // This function is called when a Suspense boundary suspends. It returns the\n}\n\nvar ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;\nvar didReceiveUpdate = false;\nvar didWarnAboutBadClass;\nvar didWarnAboutModulePatternComponent;\nvar didWarnAboutContextTypeOnFunctionComponent;\nvar didWarnAboutGetDerivedStateOnFunctionComponent;\nvar didWarnAboutFunctionRefs;\nvar didWarnAboutReassigningProps;\nvar didWarnAboutRevealOrder;\nvar didWarnAboutTailOptions;\nvar didWarnAboutDefaultPropsOnFunctionComponent;\n\n{\n didWarnAboutBadClass = {};\n didWarnAboutModulePatternComponent = {};\n didWarnAboutContextTypeOnFunctionComponent = {};\n didWarnAboutGetDerivedStateOnFunctionComponent = {};\n didWarnAboutFunctionRefs = {};\n didWarnAboutReassigningProps = false;\n didWarnAboutRevealOrder = {};\n didWarnAboutTailOptions = {};\n didWarnAboutDefaultPropsOnFunctionComponent = {};\n}\n\nfunction reconcileChildren(current, workInProgress, nextChildren, renderLanes) {\n if (current === null) {\n // If this is a fresh new component that hasn't been rendered yet, we\n // won't update its child set by applying minimal side-effects. Instead,\n // we will add them all to the child before it gets rendered. That means\n // we can optimize this reconciliation pass by not tracking side-effects.\n workInProgress.child = mountChildFibers(workInProgress, null, nextChildren, renderLanes);\n } else {\n // If the current child is the same as the work in progress, it means that\n // we haven't yet started any work on these children. Therefore, we use\n // the clone algorithm to create a copy of all the current children.\n // If we had any progressed work already, that is invalid at this point so\n // let's throw it out.\n workInProgress.child = reconcileChildFibers(workInProgress, current.child, nextChildren, renderLanes);\n }\n}\n\nfunction forceUnmountCurrentAndReconcile(current, workInProgress, nextChildren, renderLanes) {\n // This function is fork of reconcileChildren. It's used in cases where we\n // want to reconcile without matching against the existing set. This has the\n // effect of all current children being unmounted; even if the type and key\n // are the same, the old child is unmounted and a new child is created.\n //\n // To do this, we're going to go through the reconcile algorithm twice. In\n // the first pass, we schedule a deletion for all the current children by\n // passing null.\n workInProgress.child = reconcileChildFibers(workInProgress, current.child, null, renderLanes); // In the second pass, we mount the new children. The trick here is that we\n // pass null in place of where we usually pass the current child set. This has\n // the effect of remounting all children regardless of whether their\n // identities match.\n\n workInProgress.child = reconcileChildFibers(workInProgress, null, nextChildren, renderLanes);\n}\n\nfunction updateForwardRef(current, workInProgress, Component, nextProps, renderLanes) {\n // TODO: current can be non-null here even if the component\n // hasn't yet mounted. This happens after the first render suspends.\n // We'll need to figure out if this is fine or can cause issues.\n {\n if (workInProgress.type !== workInProgress.elementType) {\n // Lazy component props can't be validated in createElement\n // because they're only guaranteed to be resolved here.\n var innerPropTypes = Component.propTypes;\n\n if (innerPropTypes) {\n checkPropTypes(innerPropTypes, nextProps, // Resolved props\n 'prop', getComponentNameFromType(Component));\n }\n }\n }\n\n var render = Component.render;\n var ref = workInProgress.ref; // The rest is a fork of updateFunctionComponent\n\n var nextChildren;\n var hasId;\n prepareToReadContext(workInProgress, renderLanes);\n\n {\n markComponentRenderStarted(workInProgress);\n }\n\n {\n ReactCurrentOwner$1.current = workInProgress;\n setIsRendering(true);\n nextChildren = renderWithHooks(current, workInProgress, render, nextProps, ref, renderLanes);\n hasId = checkDidRenderIdHook();\n\n if ( workInProgress.mode & StrictLegacyMode) {\n setIsStrictModeForDevtools(true);\n\n try {\n nextChildren = renderWithHooks(current, workInProgress, render, nextProps, ref, renderLanes);\n hasId = checkDidRenderIdHook();\n } finally {\n setIsStrictModeForDevtools(false);\n }\n }\n\n setIsRendering(false);\n }\n\n {\n markComponentRenderStopped();\n }\n\n if (current !== null && !didReceiveUpdate) {\n bailoutHooks(current, workInProgress, renderLanes);\n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n }\n\n if (getIsHydrating() && hasId) {\n pushMaterializedTreeId(workInProgress);\n } // React DevTools reads this flag.\n\n\n workInProgress.flags |= PerformedWork;\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n return workInProgress.child;\n}\n\nfunction updateMemoComponent(current, workInProgress, Component, nextProps, renderLanes) {\n if (current === null) {\n var type = Component.type;\n\n if (isSimpleFunctionComponent(type) && Component.compare === null && // SimpleMemoComponent codepath doesn't resolve outer props either.\n Component.defaultProps === undefined) {\n var resolvedType = type;\n\n {\n resolvedType = resolveFunctionForHotReloading(type);\n } // If this is a plain function component without default props,\n // and with only the default shallow comparison, we upgrade it\n // to a SimpleMemoComponent to allow fast path updates.\n\n\n workInProgress.tag = SimpleMemoComponent;\n workInProgress.type = resolvedType;\n\n {\n validateFunctionComponentInDev(workInProgress, type);\n }\n\n return updateSimpleMemoComponent(current, workInProgress, resolvedType, nextProps, renderLanes);\n }\n\n {\n var innerPropTypes = type.propTypes;\n\n if (innerPropTypes) {\n // Inner memo component props aren't currently validated in createElement.\n // We could move it there, but we'd still need this for lazy code path.\n checkPropTypes(innerPropTypes, nextProps, // Resolved props\n 'prop', getComponentNameFromType(type));\n }\n\n if ( Component.defaultProps !== undefined) {\n var componentName = getComponentNameFromType(type) || 'Unknown';\n\n if (!didWarnAboutDefaultPropsOnFunctionComponent[componentName]) {\n error('%s: Support for defaultProps will be removed from memo components ' + 'in a future major release. Use JavaScript default parameters instead.', componentName);\n\n didWarnAboutDefaultPropsOnFunctionComponent[componentName] = true;\n }\n }\n }\n\n var child = createFiberFromTypeAndProps(Component.type, null, nextProps, workInProgress, workInProgress.mode, renderLanes);\n child.ref = workInProgress.ref;\n child.return = workInProgress;\n workInProgress.child = child;\n return child;\n }\n\n {\n var _type = Component.type;\n var _innerPropTypes = _type.propTypes;\n\n if (_innerPropTypes) {\n // Inner memo component props aren't currently validated in createElement.\n // We could move it there, but we'd still need this for lazy code path.\n checkPropTypes(_innerPropTypes, nextProps, // Resolved props\n 'prop', getComponentNameFromType(_type));\n }\n }\n\n var currentChild = current.child; // This is always exactly one child\n\n var hasScheduledUpdateOrContext = checkScheduledUpdateOrContext(current, renderLanes);\n\n if (!hasScheduledUpdateOrContext) {\n // This will be the props with resolved defaultProps,\n // unlike current.memoizedProps which will be the unresolved ones.\n var prevProps = currentChild.memoizedProps; // Default to shallow comparison\n\n var compare = Component.compare;\n compare = compare !== null ? compare : shallowEqual;\n\n if (compare(prevProps, nextProps) && current.ref === workInProgress.ref) {\n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n }\n } // React DevTools reads this flag.\n\n\n workInProgress.flags |= PerformedWork;\n var newChild = createWorkInProgress(currentChild, nextProps);\n newChild.ref = workInProgress.ref;\n newChild.return = workInProgress;\n workInProgress.child = newChild;\n return newChild;\n}\n\nfunction updateSimpleMemoComponent(current, workInProgress, Component, nextProps, renderLanes) {\n // TODO: current can be non-null here even if the component\n // hasn't yet mounted. This happens when the inner render suspends.\n // We'll need to figure out if this is fine or can cause issues.\n {\n if (workInProgress.type !== workInProgress.elementType) {\n // Lazy component props can't be validated in createElement\n // because they're only guaranteed to be resolved here.\n var outerMemoType = workInProgress.elementType;\n\n if (outerMemoType.$$typeof === REACT_LAZY_TYPE) {\n // We warn when you define propTypes on lazy()\n // so let's just skip over it to find memo() outer wrapper.\n // Inner props for memo are validated later.\n var lazyComponent = outerMemoType;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n outerMemoType = init(payload);\n } catch (x) {\n outerMemoType = null;\n } // Inner propTypes will be validated in the function component path.\n\n\n var outerPropTypes = outerMemoType && outerMemoType.propTypes;\n\n if (outerPropTypes) {\n checkPropTypes(outerPropTypes, nextProps, // Resolved (SimpleMemoComponent has no defaultProps)\n 'prop', getComponentNameFromType(outerMemoType));\n }\n }\n }\n }\n\n if (current !== null) {\n var prevProps = current.memoizedProps;\n\n if (shallowEqual(prevProps, nextProps) && current.ref === workInProgress.ref && ( // Prevent bailout if the implementation changed due to hot reload.\n workInProgress.type === current.type )) {\n didReceiveUpdate = false; // The props are shallowly equal. Reuse the previous props object, like we\n // would during a normal fiber bailout.\n //\n // We don't have strong guarantees that the props object is referentially\n // equal during updates where we can't bail out anyway — like if the props\n // are shallowly equal, but there's a local state or context update in the\n // same batch.\n //\n // However, as a principle, we should aim to make the behavior consistent\n // across different ways of memoizing a component. For example, React.memo\n // has a different internal Fiber layout if you pass a normal function\n // component (SimpleMemoComponent) versus if you pass a different type\n // like forwardRef (MemoComponent). But this is an implementation detail.\n // Wrapping a component in forwardRef (or React.lazy, etc) shouldn't\n // affect whether the props object is reused during a bailout.\n\n workInProgress.pendingProps = nextProps = prevProps;\n\n if (!checkScheduledUpdateOrContext(current, renderLanes)) {\n // The pending lanes were cleared at the beginning of beginWork. We're\n // about to bail out, but there might be other lanes that weren't\n // included in the current render. Usually, the priority level of the\n // remaining updates is accumulated during the evaluation of the\n // component (i.e. when processing the update queue). But since since\n // we're bailing out early *without* evaluating the component, we need\n // to account for it here, too. Reset to the value of the current fiber.\n // NOTE: This only applies to SimpleMemoComponent, not MemoComponent,\n // because a MemoComponent fiber does not have hooks or an update queue;\n // rather, it wraps around an inner component, which may or may not\n // contains hooks.\n // TODO: Move the reset at in beginWork out of the common path so that\n // this is no longer necessary.\n workInProgress.lanes = current.lanes;\n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n } else if ((current.flags & ForceUpdateForLegacySuspense) !== NoFlags) {\n // This is a special case that only exists for legacy mode.\n // See https://github.com/facebook/react/pull/19216.\n didReceiveUpdate = true;\n }\n }\n }\n\n return updateFunctionComponent(current, workInProgress, Component, nextProps, renderLanes);\n}\n\nfunction updateOffscreenComponent(current, workInProgress, renderLanes) {\n var nextProps = workInProgress.pendingProps;\n var nextChildren = nextProps.children;\n var prevState = current !== null ? current.memoizedState : null;\n\n if (nextProps.mode === 'hidden' || enableLegacyHidden ) {\n // Rendering a hidden tree.\n if ((workInProgress.mode & ConcurrentMode) === NoMode) {\n // In legacy sync mode, don't defer the subtree. Render it now.\n // TODO: Consider how Offscreen should work with transitions in the future\n var nextState = {\n baseLanes: NoLanes,\n cachePool: null,\n transitions: null\n };\n workInProgress.memoizedState = nextState;\n\n pushRenderLanes(workInProgress, renderLanes);\n } else if (!includesSomeLane(renderLanes, OffscreenLane)) {\n var spawnedCachePool = null; // We're hidden, and we're not rendering at Offscreen. We will bail out\n // and resume this tree later.\n\n var nextBaseLanes;\n\n if (prevState !== null) {\n var prevBaseLanes = prevState.baseLanes;\n nextBaseLanes = mergeLanes(prevBaseLanes, renderLanes);\n } else {\n nextBaseLanes = renderLanes;\n } // Schedule this fiber to re-render at offscreen priority. Then bailout.\n\n\n workInProgress.lanes = workInProgress.childLanes = laneToLanes(OffscreenLane);\n var _nextState = {\n baseLanes: nextBaseLanes,\n cachePool: spawnedCachePool,\n transitions: null\n };\n workInProgress.memoizedState = _nextState;\n workInProgress.updateQueue = null;\n // to avoid a push/pop misalignment.\n\n\n pushRenderLanes(workInProgress, nextBaseLanes);\n\n return null;\n } else {\n // This is the second render. The surrounding visible content has already\n // committed. Now we resume rendering the hidden tree.\n // Rendering at offscreen, so we can clear the base lanes.\n var _nextState2 = {\n baseLanes: NoLanes,\n cachePool: null,\n transitions: null\n };\n workInProgress.memoizedState = _nextState2; // Push the lanes that were skipped when we bailed out.\n\n var subtreeRenderLanes = prevState !== null ? prevState.baseLanes : renderLanes;\n\n pushRenderLanes(workInProgress, subtreeRenderLanes);\n }\n } else {\n // Rendering a visible tree.\n var _subtreeRenderLanes;\n\n if (prevState !== null) {\n // We're going from hidden -> visible.\n _subtreeRenderLanes = mergeLanes(prevState.baseLanes, renderLanes);\n\n workInProgress.memoizedState = null;\n } else {\n // We weren't previously hidden, and we still aren't, so there's nothing\n // special to do. Need to push to the stack regardless, though, to avoid\n // a push/pop misalignment.\n _subtreeRenderLanes = renderLanes;\n }\n\n pushRenderLanes(workInProgress, _subtreeRenderLanes);\n }\n\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n return workInProgress.child;\n} // Note: These happen to have identical begin phases, for now. We shouldn't hold\n\nfunction updateFragment(current, workInProgress, renderLanes) {\n var nextChildren = workInProgress.pendingProps;\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n return workInProgress.child;\n}\n\nfunction updateMode(current, workInProgress, renderLanes) {\n var nextChildren = workInProgress.pendingProps.children;\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n return workInProgress.child;\n}\n\nfunction updateProfiler(current, workInProgress, renderLanes) {\n {\n workInProgress.flags |= Update;\n\n {\n // Reset effect durations for the next eventual effect phase.\n // These are reset during render to allow the DevTools commit hook a chance to read them,\n var stateNode = workInProgress.stateNode;\n stateNode.effectDuration = 0;\n stateNode.passiveEffectDuration = 0;\n }\n }\n\n var nextProps = workInProgress.pendingProps;\n var nextChildren = nextProps.children;\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n return workInProgress.child;\n}\n\nfunction markRef(current, workInProgress) {\n var ref = workInProgress.ref;\n\n if (current === null && ref !== null || current !== null && current.ref !== ref) {\n // Schedule a Ref effect\n workInProgress.flags |= Ref;\n\n {\n workInProgress.flags |= RefStatic;\n }\n }\n}\n\nfunction updateFunctionComponent(current, workInProgress, Component, nextProps, renderLanes) {\n {\n if (workInProgress.type !== workInProgress.elementType) {\n // Lazy component props can't be validated in createElement\n // because they're only guaranteed to be resolved here.\n var innerPropTypes = Component.propTypes;\n\n if (innerPropTypes) {\n checkPropTypes(innerPropTypes, nextProps, // Resolved props\n 'prop', getComponentNameFromType(Component));\n }\n }\n }\n\n var context;\n\n {\n var unmaskedContext = getUnmaskedContext(workInProgress, Component, true);\n context = getMaskedContext(workInProgress, unmaskedContext);\n }\n\n var nextChildren;\n var hasId;\n prepareToReadContext(workInProgress, renderLanes);\n\n {\n markComponentRenderStarted(workInProgress);\n }\n\n {\n ReactCurrentOwner$1.current = workInProgress;\n setIsRendering(true);\n nextChildren = renderWithHooks(current, workInProgress, Component, nextProps, context, renderLanes);\n hasId = checkDidRenderIdHook();\n\n if ( workInProgress.mode & StrictLegacyMode) {\n setIsStrictModeForDevtools(true);\n\n try {\n nextChildren = renderWithHooks(current, workInProgress, Component, nextProps, context, renderLanes);\n hasId = checkDidRenderIdHook();\n } finally {\n setIsStrictModeForDevtools(false);\n }\n }\n\n setIsRendering(false);\n }\n\n {\n markComponentRenderStopped();\n }\n\n if (current !== null && !didReceiveUpdate) {\n bailoutHooks(current, workInProgress, renderLanes);\n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n }\n\n if (getIsHydrating() && hasId) {\n pushMaterializedTreeId(workInProgress);\n } // React DevTools reads this flag.\n\n\n workInProgress.flags |= PerformedWork;\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n return workInProgress.child;\n}\n\nfunction updateClassComponent(current, workInProgress, Component, nextProps, renderLanes) {\n {\n // This is used by DevTools to force a boundary to error.\n switch (shouldError(workInProgress)) {\n case false:\n {\n var _instance = workInProgress.stateNode;\n var ctor = workInProgress.type; // TODO This way of resetting the error boundary state is a hack.\n // Is there a better way to do this?\n\n var tempInstance = new ctor(workInProgress.memoizedProps, _instance.context);\n var state = tempInstance.state;\n\n _instance.updater.enqueueSetState(_instance, state, null);\n\n break;\n }\n\n case true:\n {\n workInProgress.flags |= DidCapture;\n workInProgress.flags |= ShouldCapture; // eslint-disable-next-line react-internal/prod-error-codes\n\n var error$1 = new Error('Simulated error coming from DevTools');\n var lane = pickArbitraryLane(renderLanes);\n workInProgress.lanes = mergeLanes(workInProgress.lanes, lane); // Schedule the error boundary to re-render using updated state\n\n var update = createClassErrorUpdate(workInProgress, createCapturedValueAtFiber(error$1, workInProgress), lane);\n enqueueCapturedUpdate(workInProgress, update);\n break;\n }\n }\n\n if (workInProgress.type !== workInProgress.elementType) {\n // Lazy component props can't be validated in createElement\n // because they're only guaranteed to be resolved here.\n var innerPropTypes = Component.propTypes;\n\n if (innerPropTypes) {\n checkPropTypes(innerPropTypes, nextProps, // Resolved props\n 'prop', getComponentNameFromType(Component));\n }\n }\n } // Push context providers early to prevent context stack mismatches.\n // During mounting we don't know the child context yet as the instance doesn't exist.\n // We will invalidate the child context in finishClassComponent() right after rendering.\n\n\n var hasContext;\n\n if (isContextProvider(Component)) {\n hasContext = true;\n pushContextProvider(workInProgress);\n } else {\n hasContext = false;\n }\n\n prepareToReadContext(workInProgress, renderLanes);\n var instance = workInProgress.stateNode;\n var shouldUpdate;\n\n if (instance === null) {\n resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress); // In the initial pass we might need to construct the instance.\n\n constructClassInstance(workInProgress, Component, nextProps);\n mountClassInstance(workInProgress, Component, nextProps, renderLanes);\n shouldUpdate = true;\n } else if (current === null) {\n // In a resume, we'll already have an instance we can reuse.\n shouldUpdate = resumeMountClassInstance(workInProgress, Component, nextProps, renderLanes);\n } else {\n shouldUpdate = updateClassInstance(current, workInProgress, Component, nextProps, renderLanes);\n }\n\n var nextUnitOfWork = finishClassComponent(current, workInProgress, Component, shouldUpdate, hasContext, renderLanes);\n\n {\n var inst = workInProgress.stateNode;\n\n if (shouldUpdate && inst.props !== nextProps) {\n if (!didWarnAboutReassigningProps) {\n error('It looks like %s is reassigning its own `this.props` while rendering. ' + 'This is not supported and can lead to confusing bugs.', getComponentNameFromFiber(workInProgress) || 'a component');\n }\n\n didWarnAboutReassigningProps = true;\n }\n }\n\n return nextUnitOfWork;\n}\n\nfunction finishClassComponent(current, workInProgress, Component, shouldUpdate, hasContext, renderLanes) {\n // Refs should update even if shouldComponentUpdate returns false\n markRef(current, workInProgress);\n var didCaptureError = (workInProgress.flags & DidCapture) !== NoFlags;\n\n if (!shouldUpdate && !didCaptureError) {\n // Context providers should defer to sCU for rendering\n if (hasContext) {\n invalidateContextProvider(workInProgress, Component, false);\n }\n\n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n }\n\n var instance = workInProgress.stateNode; // Rerender\n\n ReactCurrentOwner$1.current = workInProgress;\n var nextChildren;\n\n if (didCaptureError && typeof Component.getDerivedStateFromError !== 'function') {\n // If we captured an error, but getDerivedStateFromError is not defined,\n // unmount all the children. componentDidCatch will schedule an update to\n // re-render a fallback. This is temporary until we migrate everyone to\n // the new API.\n // TODO: Warn in a future release.\n nextChildren = null;\n\n {\n stopProfilerTimerIfRunning();\n }\n } else {\n {\n markComponentRenderStarted(workInProgress);\n }\n\n {\n setIsRendering(true);\n nextChildren = instance.render();\n\n if ( workInProgress.mode & StrictLegacyMode) {\n setIsStrictModeForDevtools(true);\n\n try {\n instance.render();\n } finally {\n setIsStrictModeForDevtools(false);\n }\n }\n\n setIsRendering(false);\n }\n\n {\n markComponentRenderStopped();\n }\n } // React DevTools reads this flag.\n\n\n workInProgress.flags |= PerformedWork;\n\n if (current !== null && didCaptureError) {\n // If we're recovering from an error, reconcile without reusing any of\n // the existing children. Conceptually, the normal children and the children\n // that are shown on error are two different sets, so we shouldn't reuse\n // normal children even if their identities match.\n forceUnmountCurrentAndReconcile(current, workInProgress, nextChildren, renderLanes);\n } else {\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n } // Memoize state using the values we just used to render.\n // TODO: Restructure so we never read values from the instance.\n\n\n workInProgress.memoizedState = instance.state; // The context might have changed so we need to recalculate it.\n\n if (hasContext) {\n invalidateContextProvider(workInProgress, Component, true);\n }\n\n return workInProgress.child;\n}\n\nfunction pushHostRootContext(workInProgress) {\n var root = workInProgress.stateNode;\n\n if (root.pendingContext) {\n pushTopLevelContextObject(workInProgress, root.pendingContext, root.pendingContext !== root.context);\n } else if (root.context) {\n // Should always be set\n pushTopLevelContextObject(workInProgress, root.context, false);\n }\n\n pushHostContainer(workInProgress, root.containerInfo);\n}\n\nfunction updateHostRoot(current, workInProgress, renderLanes) {\n pushHostRootContext(workInProgress);\n\n if (current === null) {\n throw new Error('Should have a current fiber. This is a bug in React.');\n }\n\n var nextProps = workInProgress.pendingProps;\n var prevState = workInProgress.memoizedState;\n var prevChildren = prevState.element;\n cloneUpdateQueue(current, workInProgress);\n processUpdateQueue(workInProgress, nextProps, null, renderLanes);\n var nextState = workInProgress.memoizedState;\n var root = workInProgress.stateNode;\n // being called \"element\".\n\n\n var nextChildren = nextState.element;\n\n if ( prevState.isDehydrated) {\n // This is a hydration root whose shell has not yet hydrated. We should\n // attempt to hydrate.\n // Flip isDehydrated to false to indicate that when this render\n // finishes, the root will no longer be dehydrated.\n var overrideState = {\n element: nextChildren,\n isDehydrated: false,\n cache: nextState.cache,\n pendingSuspenseBoundaries: nextState.pendingSuspenseBoundaries,\n transitions: nextState.transitions\n };\n var updateQueue = workInProgress.updateQueue; // `baseState` can always be the last state because the root doesn't\n // have reducer functions so it doesn't need rebasing.\n\n updateQueue.baseState = overrideState;\n workInProgress.memoizedState = overrideState;\n\n if (workInProgress.flags & ForceClientRender) {\n // Something errored during a previous attempt to hydrate the shell, so we\n // forced a client render.\n var recoverableError = createCapturedValueAtFiber(new Error('There was an error while hydrating. Because the error happened outside ' + 'of a Suspense boundary, the entire root will switch to ' + 'client rendering.'), workInProgress);\n return mountHostRootWithoutHydrating(current, workInProgress, nextChildren, renderLanes, recoverableError);\n } else if (nextChildren !== prevChildren) {\n var _recoverableError = createCapturedValueAtFiber(new Error('This root received an early update, before anything was able ' + 'hydrate. Switched the entire root to client rendering.'), workInProgress);\n\n return mountHostRootWithoutHydrating(current, workInProgress, nextChildren, renderLanes, _recoverableError);\n } else {\n // The outermost shell has not hydrated yet. Start hydrating.\n enterHydrationState(workInProgress);\n\n var child = mountChildFibers(workInProgress, null, nextChildren, renderLanes);\n workInProgress.child = child;\n var node = child;\n\n while (node) {\n // Mark each child as hydrating. This is a fast path to know whether this\n // tree is part of a hydrating tree. This is used to determine if a child\n // node has fully mounted yet, and for scheduling event replaying.\n // Conceptually this is similar to Placement in that a new subtree is\n // inserted into the React tree here. It just happens to not need DOM\n // mutations because it already exists.\n node.flags = node.flags & ~Placement | Hydrating;\n node = node.sibling;\n }\n }\n } else {\n // Root is not dehydrated. Either this is a client-only root, or it\n // already hydrated.\n resetHydrationState();\n\n if (nextChildren === prevChildren) {\n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n }\n\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n }\n\n return workInProgress.child;\n}\n\nfunction mountHostRootWithoutHydrating(current, workInProgress, nextChildren, renderLanes, recoverableError) {\n // Revert to client rendering.\n resetHydrationState();\n queueHydrationError(recoverableError);\n workInProgress.flags |= ForceClientRender;\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n return workInProgress.child;\n}\n\nfunction updateHostComponent(current, workInProgress, renderLanes) {\n pushHostContext(workInProgress);\n\n if (current === null) {\n tryToClaimNextHydratableInstance(workInProgress);\n }\n\n var type = workInProgress.type;\n var nextProps = workInProgress.pendingProps;\n var prevProps = current !== null ? current.memoizedProps : null;\n var nextChildren = nextProps.children;\n var isDirectTextChild = shouldSetTextContent(type, nextProps);\n\n if (isDirectTextChild) {\n // We special case a direct text child of a host node. This is a common\n // case. We won't handle it as a reified child. We will instead handle\n // this in the host environment that also has access to this prop. That\n // avoids allocating another HostText fiber and traversing it.\n nextChildren = null;\n } else if (prevProps !== null && shouldSetTextContent(type, prevProps)) {\n // If we're switching from a direct text child to a normal child, or to\n // empty, we need to schedule the text content to be reset.\n workInProgress.flags |= ContentReset;\n }\n\n markRef(current, workInProgress);\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n return workInProgress.child;\n}\n\nfunction updateHostText(current, workInProgress) {\n if (current === null) {\n tryToClaimNextHydratableInstance(workInProgress);\n } // Nothing to do here. This is terminal. We'll do the completion step\n // immediately after.\n\n\n return null;\n}\n\nfunction mountLazyComponent(_current, workInProgress, elementType, renderLanes) {\n resetSuspendedCurrentOnMountInLegacyMode(_current, workInProgress);\n var props = workInProgress.pendingProps;\n var lazyComponent = elementType;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n var Component = init(payload); // Store the unwrapped component in the type.\n\n workInProgress.type = Component;\n var resolvedTag = workInProgress.tag = resolveLazyComponentTag(Component);\n var resolvedProps = resolveDefaultProps(Component, props);\n var child;\n\n switch (resolvedTag) {\n case FunctionComponent:\n {\n {\n validateFunctionComponentInDev(workInProgress, Component);\n workInProgress.type = Component = resolveFunctionForHotReloading(Component);\n }\n\n child = updateFunctionComponent(null, workInProgress, Component, resolvedProps, renderLanes);\n return child;\n }\n\n case ClassComponent:\n {\n {\n workInProgress.type = Component = resolveClassForHotReloading(Component);\n }\n\n child = updateClassComponent(null, workInProgress, Component, resolvedProps, renderLanes);\n return child;\n }\n\n case ForwardRef:\n {\n {\n workInProgress.type = Component = resolveForwardRefForHotReloading(Component);\n }\n\n child = updateForwardRef(null, workInProgress, Component, resolvedProps, renderLanes);\n return child;\n }\n\n case MemoComponent:\n {\n {\n if (workInProgress.type !== workInProgress.elementType) {\n var outerPropTypes = Component.propTypes;\n\n if (outerPropTypes) {\n checkPropTypes(outerPropTypes, resolvedProps, // Resolved for outer only\n 'prop', getComponentNameFromType(Component));\n }\n }\n }\n\n child = updateMemoComponent(null, workInProgress, Component, resolveDefaultProps(Component.type, resolvedProps), // The inner type can have defaults too\n renderLanes);\n return child;\n }\n }\n\n var hint = '';\n\n {\n if (Component !== null && typeof Component === 'object' && Component.$$typeof === REACT_LAZY_TYPE) {\n hint = ' Did you wrap a component in React.lazy() more than once?';\n }\n } // This message intentionally doesn't mention ForwardRef or MemoComponent\n // because the fact that it's a separate type of work is an\n // implementation detail.\n\n\n throw new Error(\"Element type is invalid. Received a promise that resolves to: \" + Component + \". \" + (\"Lazy element type must resolve to a class or function.\" + hint));\n}\n\nfunction mountIncompleteClassComponent(_current, workInProgress, Component, nextProps, renderLanes) {\n resetSuspendedCurrentOnMountInLegacyMode(_current, workInProgress); // Promote the fiber to a class and try rendering again.\n\n workInProgress.tag = ClassComponent; // The rest of this function is a fork of `updateClassComponent`\n // Push context providers early to prevent context stack mismatches.\n // During mounting we don't know the child context yet as the instance doesn't exist.\n // We will invalidate the child context in finishClassComponent() right after rendering.\n\n var hasContext;\n\n if (isContextProvider(Component)) {\n hasContext = true;\n pushContextProvider(workInProgress);\n } else {\n hasContext = false;\n }\n\n prepareToReadContext(workInProgress, renderLanes);\n constructClassInstance(workInProgress, Component, nextProps);\n mountClassInstance(workInProgress, Component, nextProps, renderLanes);\n return finishClassComponent(null, workInProgress, Component, true, hasContext, renderLanes);\n}\n\nfunction mountIndeterminateComponent(_current, workInProgress, Component, renderLanes) {\n resetSuspendedCurrentOnMountInLegacyMode(_current, workInProgress);\n var props = workInProgress.pendingProps;\n var context;\n\n {\n var unmaskedContext = getUnmaskedContext(workInProgress, Component, false);\n context = getMaskedContext(workInProgress, unmaskedContext);\n }\n\n prepareToReadContext(workInProgress, renderLanes);\n var value;\n var hasId;\n\n {\n markComponentRenderStarted(workInProgress);\n }\n\n {\n if (Component.prototype && typeof Component.prototype.render === 'function') {\n var componentName = getComponentNameFromType(Component) || 'Unknown';\n\n if (!didWarnAboutBadClass[componentName]) {\n error(\"The <%s /> component appears to have a render method, but doesn't extend React.Component. \" + 'This is likely to cause errors. Change %s to extend React.Component instead.', componentName, componentName);\n\n didWarnAboutBadClass[componentName] = true;\n }\n }\n\n if (workInProgress.mode & StrictLegacyMode) {\n ReactStrictModeWarnings.recordLegacyContextWarning(workInProgress, null);\n }\n\n setIsRendering(true);\n ReactCurrentOwner$1.current = workInProgress;\n value = renderWithHooks(null, workInProgress, Component, props, context, renderLanes);\n hasId = checkDidRenderIdHook();\n setIsRendering(false);\n }\n\n {\n markComponentRenderStopped();\n } // React DevTools reads this flag.\n\n\n workInProgress.flags |= PerformedWork;\n\n {\n // Support for module components is deprecated and is removed behind a flag.\n // Whether or not it would crash later, we want to show a good message in DEV first.\n if (typeof value === 'object' && value !== null && typeof value.render === 'function' && value.$$typeof === undefined) {\n var _componentName = getComponentNameFromType(Component) || 'Unknown';\n\n if (!didWarnAboutModulePatternComponent[_componentName]) {\n error('The <%s /> component appears to be a function component that returns a class instance. ' + 'Change %s to a class that extends React.Component instead. ' + \"If you can't use a class try assigning the prototype on the function as a workaround. \" + \"`%s.prototype = React.Component.prototype`. Don't use an arrow function since it \" + 'cannot be called with `new` by React.', _componentName, _componentName, _componentName);\n\n didWarnAboutModulePatternComponent[_componentName] = true;\n }\n }\n }\n\n if ( // Run these checks in production only if the flag is off.\n // Eventually we'll delete this branch altogether.\n typeof value === 'object' && value !== null && typeof value.render === 'function' && value.$$typeof === undefined) {\n {\n var _componentName2 = getComponentNameFromType(Component) || 'Unknown';\n\n if (!didWarnAboutModulePatternComponent[_componentName2]) {\n error('The <%s /> component appears to be a function component that returns a class instance. ' + 'Change %s to a class that extends React.Component instead. ' + \"If you can't use a class try assigning the prototype on the function as a workaround. \" + \"`%s.prototype = React.Component.prototype`. Don't use an arrow function since it \" + 'cannot be called with `new` by React.', _componentName2, _componentName2, _componentName2);\n\n didWarnAboutModulePatternComponent[_componentName2] = true;\n }\n } // Proceed under the assumption that this is a class instance\n\n\n workInProgress.tag = ClassComponent; // Throw out any hooks that were used.\n\n workInProgress.memoizedState = null;\n workInProgress.updateQueue = null; // Push context providers early to prevent context stack mismatches.\n // During mounting we don't know the child context yet as the instance doesn't exist.\n // We will invalidate the child context in finishClassComponent() right after rendering.\n\n var hasContext = false;\n\n if (isContextProvider(Component)) {\n hasContext = true;\n pushContextProvider(workInProgress);\n } else {\n hasContext = false;\n }\n\n workInProgress.memoizedState = value.state !== null && value.state !== undefined ? value.state : null;\n initializeUpdateQueue(workInProgress);\n adoptClassInstance(workInProgress, value);\n mountClassInstance(workInProgress, Component, props, renderLanes);\n return finishClassComponent(null, workInProgress, Component, true, hasContext, renderLanes);\n } else {\n // Proceed under the assumption that this is a function component\n workInProgress.tag = FunctionComponent;\n\n {\n\n if ( workInProgress.mode & StrictLegacyMode) {\n setIsStrictModeForDevtools(true);\n\n try {\n value = renderWithHooks(null, workInProgress, Component, props, context, renderLanes);\n hasId = checkDidRenderIdHook();\n } finally {\n setIsStrictModeForDevtools(false);\n }\n }\n }\n\n if (getIsHydrating() && hasId) {\n pushMaterializedTreeId(workInProgress);\n }\n\n reconcileChildren(null, workInProgress, value, renderLanes);\n\n {\n validateFunctionComponentInDev(workInProgress, Component);\n }\n\n return workInProgress.child;\n }\n}\n\nfunction validateFunctionComponentInDev(workInProgress, Component) {\n {\n if (Component) {\n if (Component.childContextTypes) {\n error('%s(...): childContextTypes cannot be defined on a function component.', Component.displayName || Component.name || 'Component');\n }\n }\n\n if (workInProgress.ref !== null) {\n var info = '';\n var ownerName = getCurrentFiberOwnerNameInDevOrNull();\n\n if (ownerName) {\n info += '\\n\\nCheck the render method of `' + ownerName + '`.';\n }\n\n var warningKey = ownerName || '';\n var debugSource = workInProgress._debugSource;\n\n if (debugSource) {\n warningKey = debugSource.fileName + ':' + debugSource.lineNumber;\n }\n\n if (!didWarnAboutFunctionRefs[warningKey]) {\n didWarnAboutFunctionRefs[warningKey] = true;\n\n error('Function components cannot be given refs. ' + 'Attempts to access this ref will fail. ' + 'Did you mean to use React.forwardRef()?%s', info);\n }\n }\n\n if ( Component.defaultProps !== undefined) {\n var componentName = getComponentNameFromType(Component) || 'Unknown';\n\n if (!didWarnAboutDefaultPropsOnFunctionComponent[componentName]) {\n error('%s: Support for defaultProps will be removed from function components ' + 'in a future major release. Use JavaScript default parameters instead.', componentName);\n\n didWarnAboutDefaultPropsOnFunctionComponent[componentName] = true;\n }\n }\n\n if (typeof Component.getDerivedStateFromProps === 'function') {\n var _componentName3 = getComponentNameFromType(Component) || 'Unknown';\n\n if (!didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3]) {\n error('%s: Function components do not support getDerivedStateFromProps.', _componentName3);\n\n didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3] = true;\n }\n }\n\n if (typeof Component.contextType === 'object' && Component.contextType !== null) {\n var _componentName4 = getComponentNameFromType(Component) || 'Unknown';\n\n if (!didWarnAboutContextTypeOnFunctionComponent[_componentName4]) {\n error('%s: Function components do not support contextType.', _componentName4);\n\n didWarnAboutContextTypeOnFunctionComponent[_componentName4] = true;\n }\n }\n }\n}\n\nvar SUSPENDED_MARKER = {\n dehydrated: null,\n treeContext: null,\n retryLane: NoLane\n};\n\nfunction mountSuspenseOffscreenState(renderLanes) {\n return {\n baseLanes: renderLanes,\n cachePool: getSuspendedCache(),\n transitions: null\n };\n}\n\nfunction updateSuspenseOffscreenState(prevOffscreenState, renderLanes) {\n var cachePool = null;\n\n return {\n baseLanes: mergeLanes(prevOffscreenState.baseLanes, renderLanes),\n cachePool: cachePool,\n transitions: prevOffscreenState.transitions\n };\n} // TODO: Probably should inline this back\n\n\nfunction shouldRemainOnFallback(suspenseContext, current, workInProgress, renderLanes) {\n // If we're already showing a fallback, there are cases where we need to\n // remain on that fallback regardless of whether the content has resolved.\n // For example, SuspenseList coordinates when nested content appears.\n if (current !== null) {\n var suspenseState = current.memoizedState;\n\n if (suspenseState === null) {\n // Currently showing content. Don't hide it, even if ForceSuspenseFallback\n // is true. More precise name might be \"ForceRemainSuspenseFallback\".\n // Note: This is a factoring smell. Can't remain on a fallback if there's\n // no fallback to remain on.\n return false;\n }\n } // Not currently showing content. Consult the Suspense context.\n\n\n return hasSuspenseContext(suspenseContext, ForceSuspenseFallback);\n}\n\nfunction getRemainingWorkInPrimaryTree(current, renderLanes) {\n // TODO: Should not remove render lanes that were pinged during this render\n return removeLanes(current.childLanes, renderLanes);\n}\n\nfunction updateSuspenseComponent(current, workInProgress, renderLanes) {\n var nextProps = workInProgress.pendingProps; // This is used by DevTools to force a boundary to suspend.\n\n {\n if (shouldSuspend(workInProgress)) {\n workInProgress.flags |= DidCapture;\n }\n }\n\n var suspenseContext = suspenseStackCursor.current;\n var showFallback = false;\n var didSuspend = (workInProgress.flags & DidCapture) !== NoFlags;\n\n if (didSuspend || shouldRemainOnFallback(suspenseContext, current)) {\n // Something in this boundary's subtree already suspended. Switch to\n // rendering the fallback children.\n showFallback = true;\n workInProgress.flags &= ~DidCapture;\n } else {\n // Attempting the main content\n if (current === null || current.memoizedState !== null) {\n // This is a new mount or this boundary is already showing a fallback state.\n // Mark this subtree context as having at least one invisible parent that could\n // handle the fallback state.\n // Avoided boundaries are not considered since they cannot handle preferred fallback states.\n {\n suspenseContext = addSubtreeSuspenseContext(suspenseContext, InvisibleParentSuspenseContext);\n }\n }\n }\n\n suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);\n pushSuspenseContext(workInProgress, suspenseContext); // OK, the next part is confusing. We're about to reconcile the Suspense\n // boundary's children. This involves some custom reconciliation logic. Two\n // main reasons this is so complicated.\n //\n // First, Legacy Mode has different semantics for backwards compatibility. The\n // primary tree will commit in an inconsistent state, so when we do the\n // second pass to render the fallback, we do some exceedingly, uh, clever\n // hacks to make that not totally break. Like transferring effects and\n // deletions from hidden tree. In Concurrent Mode, it's much simpler,\n // because we bailout on the primary tree completely and leave it in its old\n // state, no effects. Same as what we do for Offscreen (except that\n // Offscreen doesn't have the first render pass).\n //\n // Second is hydration. During hydration, the Suspense fiber has a slightly\n // different layout, where the child points to a dehydrated fragment, which\n // contains the DOM rendered by the server.\n //\n // Third, even if you set all that aside, Suspense is like error boundaries in\n // that we first we try to render one tree, and if that fails, we render again\n // and switch to a different tree. Like a try/catch block. So we have to track\n // which branch we're currently rendering. Ideally we would model this using\n // a stack.\n\n if (current === null) {\n // Initial mount\n // Special path for hydration\n // If we're currently hydrating, try to hydrate this boundary.\n tryToClaimNextHydratableInstance(workInProgress); // This could've been a dehydrated suspense component.\n\n var suspenseState = workInProgress.memoizedState;\n\n if (suspenseState !== null) {\n var dehydrated = suspenseState.dehydrated;\n\n if (dehydrated !== null) {\n return mountDehydratedSuspenseComponent(workInProgress, dehydrated);\n }\n }\n\n var nextPrimaryChildren = nextProps.children;\n var nextFallbackChildren = nextProps.fallback;\n\n if (showFallback) {\n var fallbackFragment = mountSuspenseFallbackChildren(workInProgress, nextPrimaryChildren, nextFallbackChildren, renderLanes);\n var primaryChildFragment = workInProgress.child;\n primaryChildFragment.memoizedState = mountSuspenseOffscreenState(renderLanes);\n workInProgress.memoizedState = SUSPENDED_MARKER;\n\n return fallbackFragment;\n } else {\n return mountSuspensePrimaryChildren(workInProgress, nextPrimaryChildren);\n }\n } else {\n // This is an update.\n // Special path for hydration\n var prevState = current.memoizedState;\n\n if (prevState !== null) {\n var _dehydrated = prevState.dehydrated;\n\n if (_dehydrated !== null) {\n return updateDehydratedSuspenseComponent(current, workInProgress, didSuspend, nextProps, _dehydrated, prevState, renderLanes);\n }\n }\n\n if (showFallback) {\n var _nextFallbackChildren = nextProps.fallback;\n var _nextPrimaryChildren = nextProps.children;\n var fallbackChildFragment = updateSuspenseFallbackChildren(current, workInProgress, _nextPrimaryChildren, _nextFallbackChildren, renderLanes);\n var _primaryChildFragment2 = workInProgress.child;\n var prevOffscreenState = current.child.memoizedState;\n _primaryChildFragment2.memoizedState = prevOffscreenState === null ? mountSuspenseOffscreenState(renderLanes) : updateSuspenseOffscreenState(prevOffscreenState, renderLanes);\n\n _primaryChildFragment2.childLanes = getRemainingWorkInPrimaryTree(current, renderLanes);\n workInProgress.memoizedState = SUSPENDED_MARKER;\n return fallbackChildFragment;\n } else {\n var _nextPrimaryChildren2 = nextProps.children;\n\n var _primaryChildFragment3 = updateSuspensePrimaryChildren(current, workInProgress, _nextPrimaryChildren2, renderLanes);\n\n workInProgress.memoizedState = null;\n return _primaryChildFragment3;\n }\n }\n}\n\nfunction mountSuspensePrimaryChildren(workInProgress, primaryChildren, renderLanes) {\n var mode = workInProgress.mode;\n var primaryChildProps = {\n mode: 'visible',\n children: primaryChildren\n };\n var primaryChildFragment = mountWorkInProgressOffscreenFiber(primaryChildProps, mode);\n primaryChildFragment.return = workInProgress;\n workInProgress.child = primaryChildFragment;\n return primaryChildFragment;\n}\n\nfunction mountSuspenseFallbackChildren(workInProgress, primaryChildren, fallbackChildren, renderLanes) {\n var mode = workInProgress.mode;\n var progressedPrimaryFragment = workInProgress.child;\n var primaryChildProps = {\n mode: 'hidden',\n children: primaryChildren\n };\n var primaryChildFragment;\n var fallbackChildFragment;\n\n if ((mode & ConcurrentMode) === NoMode && progressedPrimaryFragment !== null) {\n // In legacy mode, we commit the primary tree as if it successfully\n // completed, even though it's in an inconsistent state.\n primaryChildFragment = progressedPrimaryFragment;\n primaryChildFragment.childLanes = NoLanes;\n primaryChildFragment.pendingProps = primaryChildProps;\n\n if ( workInProgress.mode & ProfileMode) {\n // Reset the durations from the first pass so they aren't included in the\n // final amounts. This seems counterintuitive, since we're intentionally\n // not measuring part of the render phase, but this makes it match what we\n // do in Concurrent Mode.\n primaryChildFragment.actualDuration = 0;\n primaryChildFragment.actualStartTime = -1;\n primaryChildFragment.selfBaseDuration = 0;\n primaryChildFragment.treeBaseDuration = 0;\n }\n\n fallbackChildFragment = createFiberFromFragment(fallbackChildren, mode, renderLanes, null);\n } else {\n primaryChildFragment = mountWorkInProgressOffscreenFiber(primaryChildProps, mode);\n fallbackChildFragment = createFiberFromFragment(fallbackChildren, mode, renderLanes, null);\n }\n\n primaryChildFragment.return = workInProgress;\n fallbackChildFragment.return = workInProgress;\n primaryChildFragment.sibling = fallbackChildFragment;\n workInProgress.child = primaryChildFragment;\n return fallbackChildFragment;\n}\n\nfunction mountWorkInProgressOffscreenFiber(offscreenProps, mode, renderLanes) {\n // The props argument to `createFiberFromOffscreen` is `any` typed, so we use\n // this wrapper function to constrain it.\n return createFiberFromOffscreen(offscreenProps, mode, NoLanes, null);\n}\n\nfunction updateWorkInProgressOffscreenFiber(current, offscreenProps) {\n // The props argument to `createWorkInProgress` is `any` typed, so we use this\n // wrapper function to constrain it.\n return createWorkInProgress(current, offscreenProps);\n}\n\nfunction updateSuspensePrimaryChildren(current, workInProgress, primaryChildren, renderLanes) {\n var currentPrimaryChildFragment = current.child;\n var currentFallbackChildFragment = currentPrimaryChildFragment.sibling;\n var primaryChildFragment = updateWorkInProgressOffscreenFiber(currentPrimaryChildFragment, {\n mode: 'visible',\n children: primaryChildren\n });\n\n if ((workInProgress.mode & ConcurrentMode) === NoMode) {\n primaryChildFragment.lanes = renderLanes;\n }\n\n primaryChildFragment.return = workInProgress;\n primaryChildFragment.sibling = null;\n\n if (currentFallbackChildFragment !== null) {\n // Delete the fallback child fragment\n var deletions = workInProgress.deletions;\n\n if (deletions === null) {\n workInProgress.deletions = [currentFallbackChildFragment];\n workInProgress.flags |= ChildDeletion;\n } else {\n deletions.push(currentFallbackChildFragment);\n }\n }\n\n workInProgress.child = primaryChildFragment;\n return primaryChildFragment;\n}\n\nfunction updateSuspenseFallbackChildren(current, workInProgress, primaryChildren, fallbackChildren, renderLanes) {\n var mode = workInProgress.mode;\n var currentPrimaryChildFragment = current.child;\n var currentFallbackChildFragment = currentPrimaryChildFragment.sibling;\n var primaryChildProps = {\n mode: 'hidden',\n children: primaryChildren\n };\n var primaryChildFragment;\n\n if ( // In legacy mode, we commit the primary tree as if it successfully\n // completed, even though it's in an inconsistent state.\n (mode & ConcurrentMode) === NoMode && // Make sure we're on the second pass, i.e. the primary child fragment was\n // already cloned. In legacy mode, the only case where this isn't true is\n // when DevTools forces us to display a fallback; we skip the first render\n // pass entirely and go straight to rendering the fallback. (In Concurrent\n // Mode, SuspenseList can also trigger this scenario, but this is a legacy-\n // only codepath.)\n workInProgress.child !== currentPrimaryChildFragment) {\n var progressedPrimaryFragment = workInProgress.child;\n primaryChildFragment = progressedPrimaryFragment;\n primaryChildFragment.childLanes = NoLanes;\n primaryChildFragment.pendingProps = primaryChildProps;\n\n if ( workInProgress.mode & ProfileMode) {\n // Reset the durations from the first pass so they aren't included in the\n // final amounts. This seems counterintuitive, since we're intentionally\n // not measuring part of the render phase, but this makes it match what we\n // do in Concurrent Mode.\n primaryChildFragment.actualDuration = 0;\n primaryChildFragment.actualStartTime = -1;\n primaryChildFragment.selfBaseDuration = currentPrimaryChildFragment.selfBaseDuration;\n primaryChildFragment.treeBaseDuration = currentPrimaryChildFragment.treeBaseDuration;\n } // The fallback fiber was added as a deletion during the first pass.\n // However, since we're going to remain on the fallback, we no longer want\n // to delete it.\n\n\n workInProgress.deletions = null;\n } else {\n primaryChildFragment = updateWorkInProgressOffscreenFiber(currentPrimaryChildFragment, primaryChildProps); // Since we're reusing a current tree, we need to reuse the flags, too.\n // (We don't do this in legacy mode, because in legacy mode we don't re-use\n // the current tree; see previous branch.)\n\n primaryChildFragment.subtreeFlags = currentPrimaryChildFragment.subtreeFlags & StaticMask;\n }\n\n var fallbackChildFragment;\n\n if (currentFallbackChildFragment !== null) {\n fallbackChildFragment = createWorkInProgress(currentFallbackChildFragment, fallbackChildren);\n } else {\n fallbackChildFragment = createFiberFromFragment(fallbackChildren, mode, renderLanes, null); // Needs a placement effect because the parent (the Suspense boundary) already\n // mounted but this is a new fiber.\n\n fallbackChildFragment.flags |= Placement;\n }\n\n fallbackChildFragment.return = workInProgress;\n primaryChildFragment.return = workInProgress;\n primaryChildFragment.sibling = fallbackChildFragment;\n workInProgress.child = primaryChildFragment;\n return fallbackChildFragment;\n}\n\nfunction retrySuspenseComponentWithoutHydrating(current, workInProgress, renderLanes, recoverableError) {\n // Falling back to client rendering. Because this has performance\n // implications, it's considered a recoverable error, even though the user\n // likely won't observe anything wrong with the UI.\n //\n // The error is passed in as an argument to enforce that every caller provide\n // a custom message, or explicitly opt out (currently the only path that opts\n // out is legacy mode; every concurrent path provides an error).\n if (recoverableError !== null) {\n queueHydrationError(recoverableError);\n } // This will add the old fiber to the deletion list\n\n\n reconcileChildFibers(workInProgress, current.child, null, renderLanes); // We're now not suspended nor dehydrated.\n\n var nextProps = workInProgress.pendingProps;\n var primaryChildren = nextProps.children;\n var primaryChildFragment = mountSuspensePrimaryChildren(workInProgress, primaryChildren); // Needs a placement effect because the parent (the Suspense boundary) already\n // mounted but this is a new fiber.\n\n primaryChildFragment.flags |= Placement;\n workInProgress.memoizedState = null;\n return primaryChildFragment;\n}\n\nfunction mountSuspenseFallbackAfterRetryWithoutHydrating(current, workInProgress, primaryChildren, fallbackChildren, renderLanes) {\n var fiberMode = workInProgress.mode;\n var primaryChildProps = {\n mode: 'visible',\n children: primaryChildren\n };\n var primaryChildFragment = mountWorkInProgressOffscreenFiber(primaryChildProps, fiberMode);\n var fallbackChildFragment = createFiberFromFragment(fallbackChildren, fiberMode, renderLanes, null); // Needs a placement effect because the parent (the Suspense\n // boundary) already mounted but this is a new fiber.\n\n fallbackChildFragment.flags |= Placement;\n primaryChildFragment.return = workInProgress;\n fallbackChildFragment.return = workInProgress;\n primaryChildFragment.sibling = fallbackChildFragment;\n workInProgress.child = primaryChildFragment;\n\n if ((workInProgress.mode & ConcurrentMode) !== NoMode) {\n // We will have dropped the effect list which contains the\n // deletion. We need to reconcile to delete the current child.\n reconcileChildFibers(workInProgress, current.child, null, renderLanes);\n }\n\n return fallbackChildFragment;\n}\n\nfunction mountDehydratedSuspenseComponent(workInProgress, suspenseInstance, renderLanes) {\n // During the first pass, we'll bail out and not drill into the children.\n // Instead, we'll leave the content in place and try to hydrate it later.\n if ((workInProgress.mode & ConcurrentMode) === NoMode) {\n {\n error('Cannot hydrate Suspense in legacy mode. Switch from ' + 'ReactDOM.hydrate(element, container) to ' + 'ReactDOMClient.hydrateRoot(container, <App />)' + '.render(element) or remove the Suspense components from ' + 'the server rendered components.');\n }\n\n workInProgress.lanes = laneToLanes(SyncLane);\n } else if (isSuspenseInstanceFallback(suspenseInstance)) {\n // This is a client-only boundary. Since we won't get any content from the server\n // for this, we need to schedule that at a higher priority based on when it would\n // have timed out. In theory we could render it in this pass but it would have the\n // wrong priority associated with it and will prevent hydration of parent path.\n // Instead, we'll leave work left on it to render it in a separate commit.\n // TODO This time should be the time at which the server rendered response that is\n // a parent to this boundary was displayed. However, since we currently don't have\n // a protocol to transfer that time, we'll just estimate it by using the current\n // time. This will mean that Suspense timeouts are slightly shifted to later than\n // they should be.\n // Schedule a normal pri update to render this content.\n workInProgress.lanes = laneToLanes(DefaultHydrationLane);\n } else {\n // We'll continue hydrating the rest at offscreen priority since we'll already\n // be showing the right content coming from the server, it is no rush.\n workInProgress.lanes = laneToLanes(OffscreenLane);\n }\n\n return null;\n}\n\nfunction updateDehydratedSuspenseComponent(current, workInProgress, didSuspend, nextProps, suspenseInstance, suspenseState, renderLanes) {\n if (!didSuspend) {\n // This is the first render pass. Attempt to hydrate.\n // We should never be hydrating at this point because it is the first pass,\n // but after we've already committed once.\n warnIfHydrating();\n\n if ((workInProgress.mode & ConcurrentMode) === NoMode) {\n return retrySuspenseComponentWithoutHydrating(current, workInProgress, renderLanes, // TODO: When we delete legacy mode, we should make this error argument\n // required — every concurrent mode path that causes hydration to\n // de-opt to client rendering should have an error message.\n null);\n }\n\n if (isSuspenseInstanceFallback(suspenseInstance)) {\n // This boundary is in a permanent fallback state. In this case, we'll never\n // get an update and we'll never be able to hydrate the final content. Let's just try the\n // client side render instead.\n var digest, message, stack;\n\n {\n var _getSuspenseInstanceF = getSuspenseInstanceFallbackErrorDetails(suspenseInstance);\n\n digest = _getSuspenseInstanceF.digest;\n message = _getSuspenseInstanceF.message;\n stack = _getSuspenseInstanceF.stack;\n }\n\n var error;\n\n if (message) {\n // eslint-disable-next-line react-internal/prod-error-codes\n error = new Error(message);\n } else {\n error = new Error('The server could not finish this Suspense boundary, likely ' + 'due to an error during server rendering. Switched to ' + 'client rendering.');\n }\n\n var capturedValue = createCapturedValue(error, digest, stack);\n return retrySuspenseComponentWithoutHydrating(current, workInProgress, renderLanes, capturedValue);\n }\n // any context has changed, we need to treat is as if the input might have changed.\n\n\n var hasContextChanged = includesSomeLane(renderLanes, current.childLanes);\n\n if (didReceiveUpdate || hasContextChanged) {\n // This boundary has changed since the first render. This means that we are now unable to\n // hydrate it. We might still be able to hydrate it using a higher priority lane.\n var root = getWorkInProgressRoot();\n\n if (root !== null) {\n var attemptHydrationAtLane = getBumpedLaneForHydration(root, renderLanes);\n\n if (attemptHydrationAtLane !== NoLane && attemptHydrationAtLane !== suspenseState.retryLane) {\n // Intentionally mutating since this render will get interrupted. This\n // is one of the very rare times where we mutate the current tree\n // during the render phase.\n suspenseState.retryLane = attemptHydrationAtLane; // TODO: Ideally this would inherit the event time of the current render\n\n var eventTime = NoTimestamp;\n enqueueConcurrentRenderForLane(current, attemptHydrationAtLane);\n scheduleUpdateOnFiber(root, current, attemptHydrationAtLane, eventTime);\n }\n } // If we have scheduled higher pri work above, this will probably just abort the render\n // since we now have higher priority work, but in case it doesn't, we need to prepare to\n // render something, if we time out. Even if that requires us to delete everything and\n // skip hydration.\n // Delay having to do this as long as the suspense timeout allows us.\n\n\n renderDidSuspendDelayIfPossible();\n\n var _capturedValue = createCapturedValue(new Error('This Suspense boundary received an update before it finished ' + 'hydrating. This caused the boundary to switch to client rendering. ' + 'The usual way to fix this is to wrap the original update ' + 'in startTransition.'));\n\n return retrySuspenseComponentWithoutHydrating(current, workInProgress, renderLanes, _capturedValue);\n } else if (isSuspenseInstancePending(suspenseInstance)) {\n // This component is still pending more data from the server, so we can't hydrate its\n // content. We treat it as if this component suspended itself. It might seem as if\n // we could just try to render it client-side instead. However, this will perform a\n // lot of unnecessary work and is unlikely to complete since it often will suspend\n // on missing data anyway. Additionally, the server might be able to render more\n // than we can on the client yet. In that case we'd end up with more fallback states\n // on the client than if we just leave it alone. If the server times out or errors\n // these should update this boundary to the permanent Fallback state instead.\n // Mark it as having captured (i.e. suspended).\n workInProgress.flags |= DidCapture; // Leave the child in place. I.e. the dehydrated fragment.\n\n workInProgress.child = current.child; // Register a callback to retry this boundary once the server has sent the result.\n\n var retry = retryDehydratedSuspenseBoundary.bind(null, current);\n registerSuspenseInstanceRetry(suspenseInstance, retry);\n return null;\n } else {\n // This is the first attempt.\n reenterHydrationStateFromDehydratedSuspenseInstance(workInProgress, suspenseInstance, suspenseState.treeContext);\n var primaryChildren = nextProps.children;\n var primaryChildFragment = mountSuspensePrimaryChildren(workInProgress, primaryChildren); // Mark the children as hydrating. This is a fast path to know whether this\n // tree is part of a hydrating tree. This is used to determine if a child\n // node has fully mounted yet, and for scheduling event replaying.\n // Conceptually this is similar to Placement in that a new subtree is\n // inserted into the React tree here. It just happens to not need DOM\n // mutations because it already exists.\n\n primaryChildFragment.flags |= Hydrating;\n return primaryChildFragment;\n }\n } else {\n // This is the second render pass. We already attempted to hydrated, but\n // something either suspended or errored.\n if (workInProgress.flags & ForceClientRender) {\n // Something errored during hydration. Try again without hydrating.\n workInProgress.flags &= ~ForceClientRender;\n\n var _capturedValue2 = createCapturedValue(new Error('There was an error while hydrating this Suspense boundary. ' + 'Switched to client rendering.'));\n\n return retrySuspenseComponentWithoutHydrating(current, workInProgress, renderLanes, _capturedValue2);\n } else if (workInProgress.memoizedState !== null) {\n // Something suspended and we should still be in dehydrated mode.\n // Leave the existing child in place.\n workInProgress.child = current.child; // The dehydrated completion pass expects this flag to be there\n // but the normal suspense pass doesn't.\n\n workInProgress.flags |= DidCapture;\n return null;\n } else {\n // Suspended but we should no longer be in dehydrated mode.\n // Therefore we now have to render the fallback.\n var nextPrimaryChildren = nextProps.children;\n var nextFallbackChildren = nextProps.fallback;\n var fallbackChildFragment = mountSuspenseFallbackAfterRetryWithoutHydrating(current, workInProgress, nextPrimaryChildren, nextFallbackChildren, renderLanes);\n var _primaryChildFragment4 = workInProgress.child;\n _primaryChildFragment4.memoizedState = mountSuspenseOffscreenState(renderLanes);\n workInProgress.memoizedState = SUSPENDED_MARKER;\n return fallbackChildFragment;\n }\n }\n}\n\nfunction scheduleSuspenseWorkOnFiber(fiber, renderLanes, propagationRoot) {\n fiber.lanes = mergeLanes(fiber.lanes, renderLanes);\n var alternate = fiber.alternate;\n\n if (alternate !== null) {\n alternate.lanes = mergeLanes(alternate.lanes, renderLanes);\n }\n\n scheduleContextWorkOnParentPath(fiber.return, renderLanes, propagationRoot);\n}\n\nfunction propagateSuspenseContextChange(workInProgress, firstChild, renderLanes) {\n // Mark any Suspense boundaries with fallbacks as having work to do.\n // If they were previously forced into fallbacks, they may now be able\n // to unblock.\n var node = firstChild;\n\n while (node !== null) {\n if (node.tag === SuspenseComponent) {\n var state = node.memoizedState;\n\n if (state !== null) {\n scheduleSuspenseWorkOnFiber(node, renderLanes, workInProgress);\n }\n } else if (node.tag === SuspenseListComponent) {\n // If the tail is hidden there might not be an Suspense boundaries\n // to schedule work on. In this case we have to schedule it on the\n // list itself.\n // We don't have to traverse to the children of the list since\n // the list will propagate the change when it rerenders.\n scheduleSuspenseWorkOnFiber(node, renderLanes, workInProgress);\n } else if (node.child !== null) {\n node.child.return = node;\n node = node.child;\n continue;\n }\n\n if (node === workInProgress) {\n return;\n }\n\n while (node.sibling === null) {\n if (node.return === null || node.return === workInProgress) {\n return;\n }\n\n node = node.return;\n }\n\n node.sibling.return = node.return;\n node = node.sibling;\n }\n}\n\nfunction findLastContentRow(firstChild) {\n // This is going to find the last row among these children that is already\n // showing content on the screen, as opposed to being in fallback state or\n // new. If a row has multiple Suspense boundaries, any of them being in the\n // fallback state, counts as the whole row being in a fallback state.\n // Note that the \"rows\" will be workInProgress, but any nested children\n // will still be current since we haven't rendered them yet. The mounted\n // order may not be the same as the new order. We use the new order.\n var row = firstChild;\n var lastContentRow = null;\n\n while (row !== null) {\n var currentRow = row.alternate; // New rows can't be content rows.\n\n if (currentRow !== null && findFirstSuspended(currentRow) === null) {\n lastContentRow = row;\n }\n\n row = row.sibling;\n }\n\n return lastContentRow;\n}\n\nfunction validateRevealOrder(revealOrder) {\n {\n if (revealOrder !== undefined && revealOrder !== 'forwards' && revealOrder !== 'backwards' && revealOrder !== 'together' && !didWarnAboutRevealOrder[revealOrder]) {\n didWarnAboutRevealOrder[revealOrder] = true;\n\n if (typeof revealOrder === 'string') {\n switch (revealOrder.toLowerCase()) {\n case 'together':\n case 'forwards':\n case 'backwards':\n {\n error('\"%s\" is not a valid value for revealOrder on <SuspenseList />. ' + 'Use lowercase \"%s\" instead.', revealOrder, revealOrder.toLowerCase());\n\n break;\n }\n\n case 'forward':\n case 'backward':\n {\n error('\"%s\" is not a valid value for revealOrder on <SuspenseList />. ' + 'React uses the -s suffix in the spelling. Use \"%ss\" instead.', revealOrder, revealOrder.toLowerCase());\n\n break;\n }\n\n default:\n error('\"%s\" is not a supported revealOrder on <SuspenseList />. ' + 'Did you mean \"together\", \"forwards\" or \"backwards\"?', revealOrder);\n\n break;\n }\n } else {\n error('%s is not a supported value for revealOrder on <SuspenseList />. ' + 'Did you mean \"together\", \"forwards\" or \"backwards\"?', revealOrder);\n }\n }\n }\n}\n\nfunction validateTailOptions(tailMode, revealOrder) {\n {\n if (tailMode !== undefined && !didWarnAboutTailOptions[tailMode]) {\n if (tailMode !== 'collapsed' && tailMode !== 'hidden') {\n didWarnAboutTailOptions[tailMode] = true;\n\n error('\"%s\" is not a supported value for tail on <SuspenseList />. ' + 'Did you mean \"collapsed\" or \"hidden\"?', tailMode);\n } else if (revealOrder !== 'forwards' && revealOrder !== 'backwards') {\n didWarnAboutTailOptions[tailMode] = true;\n\n error('<SuspenseList tail=\"%s\" /> is only valid if revealOrder is ' + '\"forwards\" or \"backwards\". ' + 'Did you mean to specify revealOrder=\"forwards\"?', tailMode);\n }\n }\n }\n}\n\nfunction validateSuspenseListNestedChild(childSlot, index) {\n {\n var isAnArray = isArray(childSlot);\n var isIterable = !isAnArray && typeof getIteratorFn(childSlot) === 'function';\n\n if (isAnArray || isIterable) {\n var type = isAnArray ? 'array' : 'iterable';\n\n error('A nested %s was passed to row #%s in <SuspenseList />. Wrap it in ' + 'an additional SuspenseList to configure its revealOrder: ' + '<SuspenseList revealOrder=...> ... ' + '<SuspenseList revealOrder=...>{%s}</SuspenseList> ... ' + '</SuspenseList>', type, index, type);\n\n return false;\n }\n }\n\n return true;\n}\n\nfunction validateSuspenseListChildren(children, revealOrder) {\n {\n if ((revealOrder === 'forwards' || revealOrder === 'backwards') && children !== undefined && children !== null && children !== false) {\n if (isArray(children)) {\n for (var i = 0; i < children.length; i++) {\n if (!validateSuspenseListNestedChild(children[i], i)) {\n return;\n }\n }\n } else {\n var iteratorFn = getIteratorFn(children);\n\n if (typeof iteratorFn === 'function') {\n var childrenIterator = iteratorFn.call(children);\n\n if (childrenIterator) {\n var step = childrenIterator.next();\n var _i = 0;\n\n for (; !step.done; step = childrenIterator.next()) {\n if (!validateSuspenseListNestedChild(step.value, _i)) {\n return;\n }\n\n _i++;\n }\n }\n } else {\n error('A single row was passed to a <SuspenseList revealOrder=\"%s\" />. ' + 'This is not useful since it needs multiple rows. ' + 'Did you mean to pass multiple children or an array?', revealOrder);\n }\n }\n }\n }\n}\n\nfunction initSuspenseListRenderState(workInProgress, isBackwards, tail, lastContentRow, tailMode) {\n var renderState = workInProgress.memoizedState;\n\n if (renderState === null) {\n workInProgress.memoizedState = {\n isBackwards: isBackwards,\n rendering: null,\n renderingStartTime: 0,\n last: lastContentRow,\n tail: tail,\n tailMode: tailMode\n };\n } else {\n // We can reuse the existing object from previous renders.\n renderState.isBackwards = isBackwards;\n renderState.rendering = null;\n renderState.renderingStartTime = 0;\n renderState.last = lastContentRow;\n renderState.tail = tail;\n renderState.tailMode = tailMode;\n }\n} // This can end up rendering this component multiple passes.\n// The first pass splits the children fibers into two sets. A head and tail.\n// We first render the head. If anything is in fallback state, we do another\n// pass through beginWork to rerender all children (including the tail) with\n// the force suspend context. If the first render didn't have anything in\n// in fallback state. Then we render each row in the tail one-by-one.\n// That happens in the completeWork phase without going back to beginWork.\n\n\nfunction updateSuspenseListComponent(current, workInProgress, renderLanes) {\n var nextProps = workInProgress.pendingProps;\n var revealOrder = nextProps.revealOrder;\n var tailMode = nextProps.tail;\n var newChildren = nextProps.children;\n validateRevealOrder(revealOrder);\n validateTailOptions(tailMode, revealOrder);\n validateSuspenseListChildren(newChildren, revealOrder);\n reconcileChildren(current, workInProgress, newChildren, renderLanes);\n var suspenseContext = suspenseStackCursor.current;\n var shouldForceFallback = hasSuspenseContext(suspenseContext, ForceSuspenseFallback);\n\n if (shouldForceFallback) {\n suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);\n workInProgress.flags |= DidCapture;\n } else {\n var didSuspendBefore = current !== null && (current.flags & DidCapture) !== NoFlags;\n\n if (didSuspendBefore) {\n // If we previously forced a fallback, we need to schedule work\n // on any nested boundaries to let them know to try to render\n // again. This is the same as context updating.\n propagateSuspenseContextChange(workInProgress, workInProgress.child, renderLanes);\n }\n\n suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);\n }\n\n pushSuspenseContext(workInProgress, suspenseContext);\n\n if ((workInProgress.mode & ConcurrentMode) === NoMode) {\n // In legacy mode, SuspenseList doesn't work so we just\n // use make it a noop by treating it as the default revealOrder.\n workInProgress.memoizedState = null;\n } else {\n switch (revealOrder) {\n case 'forwards':\n {\n var lastContentRow = findLastContentRow(workInProgress.child);\n var tail;\n\n if (lastContentRow === null) {\n // The whole list is part of the tail.\n // TODO: We could fast path by just rendering the tail now.\n tail = workInProgress.child;\n workInProgress.child = null;\n } else {\n // Disconnect the tail rows after the content row.\n // We're going to render them separately later.\n tail = lastContentRow.sibling;\n lastContentRow.sibling = null;\n }\n\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n tail, lastContentRow, tailMode);\n break;\n }\n\n case 'backwards':\n {\n // We're going to find the first row that has existing content.\n // At the same time we're going to reverse the list of everything\n // we pass in the meantime. That's going to be our tail in reverse\n // order.\n var _tail = null;\n var row = workInProgress.child;\n workInProgress.child = null;\n\n while (row !== null) {\n var currentRow = row.alternate; // New rows can't be content rows.\n\n if (currentRow !== null && findFirstSuspended(currentRow) === null) {\n // This is the beginning of the main content.\n workInProgress.child = row;\n break;\n }\n\n var nextRow = row.sibling;\n row.sibling = _tail;\n _tail = row;\n row = nextRow;\n } // TODO: If workInProgress.child is null, we can continue on the tail immediately.\n\n\n initSuspenseListRenderState(workInProgress, true, // isBackwards\n _tail, null, // last\n tailMode);\n break;\n }\n\n case 'together':\n {\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n null, // tail\n null, // last\n undefined);\n break;\n }\n\n default:\n {\n // The default reveal order is the same as not having\n // a boundary.\n workInProgress.memoizedState = null;\n }\n }\n }\n\n return workInProgress.child;\n}\n\nfunction updatePortalComponent(current, workInProgress, renderLanes) {\n pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);\n var nextChildren = workInProgress.pendingProps;\n\n if (current === null) {\n // Portals are special because we don't append the children during mount\n // but at commit. Therefore we need to track insertions which the normal\n // flow doesn't do during mount. This doesn't happen at the root because\n // the root always starts with a \"current\" with a null child.\n // TODO: Consider unifying this with how the root works.\n workInProgress.child = reconcileChildFibers(workInProgress, null, nextChildren, renderLanes);\n } else {\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n }\n\n return workInProgress.child;\n}\n\nvar hasWarnedAboutUsingNoValuePropOnContextProvider = false;\n\nfunction updateContextProvider(current, workInProgress, renderLanes) {\n var providerType = workInProgress.type;\n var context = providerType._context;\n var newProps = workInProgress.pendingProps;\n var oldProps = workInProgress.memoizedProps;\n var newValue = newProps.value;\n\n {\n if (!('value' in newProps)) {\n if (!hasWarnedAboutUsingNoValuePropOnContextProvider) {\n hasWarnedAboutUsingNoValuePropOnContextProvider = true;\n\n error('The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?');\n }\n }\n\n var providerPropTypes = workInProgress.type.propTypes;\n\n if (providerPropTypes) {\n checkPropTypes(providerPropTypes, newProps, 'prop', 'Context.Provider');\n }\n }\n\n pushProvider(workInProgress, context, newValue);\n\n {\n if (oldProps !== null) {\n var oldValue = oldProps.value;\n\n if (objectIs(oldValue, newValue)) {\n // No change. Bailout early if children are the same.\n if (oldProps.children === newProps.children && !hasContextChanged()) {\n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n }\n } else {\n // The context value changed. Search for matching consumers and schedule\n // them to update.\n propagateContextChange(workInProgress, context, renderLanes);\n }\n }\n }\n\n var newChildren = newProps.children;\n reconcileChildren(current, workInProgress, newChildren, renderLanes);\n return workInProgress.child;\n}\n\nvar hasWarnedAboutUsingContextAsConsumer = false;\n\nfunction updateContextConsumer(current, workInProgress, renderLanes) {\n var context = workInProgress.type; // The logic below for Context differs depending on PROD or DEV mode. In\n // DEV mode, we create a separate object for Context.Consumer that acts\n // like a proxy to Context. This proxy object adds unnecessary code in PROD\n // so we use the old behaviour (Context.Consumer references Context) to\n // reduce size and overhead. The separate object references context via\n // a property called \"_context\", which also gives us the ability to check\n // in DEV mode if this property exists or not and warn if it does not.\n\n {\n if (context._context === undefined) {\n // This may be because it's a Context (rather than a Consumer).\n // Or it may be because it's older React where they're the same thing.\n // We only want to warn if we're sure it's a new React.\n if (context !== context.Consumer) {\n if (!hasWarnedAboutUsingContextAsConsumer) {\n hasWarnedAboutUsingContextAsConsumer = true;\n\n error('Rendering <Context> directly is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Consumer> instead?');\n }\n }\n } else {\n context = context._context;\n }\n }\n\n var newProps = workInProgress.pendingProps;\n var render = newProps.children;\n\n {\n if (typeof render !== 'function') {\n error('A context consumer was rendered with multiple children, or a child ' + \"that isn't a function. A context consumer expects a single child \" + 'that is a function. If you did pass a function, make sure there ' + 'is no trailing or leading whitespace around it.');\n }\n }\n\n prepareToReadContext(workInProgress, renderLanes);\n var newValue = readContext(context);\n\n {\n markComponentRenderStarted(workInProgress);\n }\n\n var newChildren;\n\n {\n ReactCurrentOwner$1.current = workInProgress;\n setIsRendering(true);\n newChildren = render(newValue);\n setIsRendering(false);\n }\n\n {\n markComponentRenderStopped();\n } // React DevTools reads this flag.\n\n\n workInProgress.flags |= PerformedWork;\n reconcileChildren(current, workInProgress, newChildren, renderLanes);\n return workInProgress.child;\n}\n\nfunction markWorkInProgressReceivedUpdate() {\n didReceiveUpdate = true;\n}\n\nfunction resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress) {\n if ((workInProgress.mode & ConcurrentMode) === NoMode) {\n if (current !== null) {\n // A lazy component only mounts if it suspended inside a non-\n // concurrent tree, in an inconsistent state. We want to treat it like\n // a new mount, even though an empty version of it already committed.\n // Disconnect the alternate pointers.\n current.alternate = null;\n workInProgress.alternate = null; // Since this is conceptually a new fiber, schedule a Placement effect\n\n workInProgress.flags |= Placement;\n }\n }\n}\n\nfunction bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes) {\n if (current !== null) {\n // Reuse previous dependencies\n workInProgress.dependencies = current.dependencies;\n }\n\n {\n // Don't update \"base\" render times for bailouts.\n stopProfilerTimerIfRunning();\n }\n\n markSkippedUpdateLanes(workInProgress.lanes); // Check if the children have any pending work.\n\n if (!includesSomeLane(renderLanes, workInProgress.childLanes)) {\n // The children don't have any work either. We can skip them.\n // TODO: Once we add back resuming, we should check if the children are\n // a work-in-progress set. If so, we need to transfer their effects.\n {\n return null;\n }\n } // This fiber doesn't have work, but its subtree does. Clone the child\n // fibers and continue.\n\n\n cloneChildFibers(current, workInProgress);\n return workInProgress.child;\n}\n\nfunction remountFiber(current, oldWorkInProgress, newWorkInProgress) {\n {\n var returnFiber = oldWorkInProgress.return;\n\n if (returnFiber === null) {\n // eslint-disable-next-line react-internal/prod-error-codes\n throw new Error('Cannot swap the root fiber.');\n } // Disconnect from the old current.\n // It will get deleted.\n\n\n current.alternate = null;\n oldWorkInProgress.alternate = null; // Connect to the new tree.\n\n newWorkInProgress.index = oldWorkInProgress.index;\n newWorkInProgress.sibling = oldWorkInProgress.sibling;\n newWorkInProgress.return = oldWorkInProgress.return;\n newWorkInProgress.ref = oldWorkInProgress.ref; // Replace the child/sibling pointers above it.\n\n if (oldWorkInProgress === returnFiber.child) {\n returnFiber.child = newWorkInProgress;\n } else {\n var prevSibling = returnFiber.child;\n\n if (prevSibling === null) {\n // eslint-disable-next-line react-internal/prod-error-codes\n throw new Error('Expected parent to have a child.');\n }\n\n while (prevSibling.sibling !== oldWorkInProgress) {\n prevSibling = prevSibling.sibling;\n\n if (prevSibling === null) {\n // eslint-disable-next-line react-internal/prod-error-codes\n throw new Error('Expected to find the previous sibling.');\n }\n }\n\n prevSibling.sibling = newWorkInProgress;\n } // Delete the old fiber and place the new one.\n // Since the old fiber is disconnected, we have to schedule it manually.\n\n\n var deletions = returnFiber.deletions;\n\n if (deletions === null) {\n returnFiber.deletions = [current];\n returnFiber.flags |= ChildDeletion;\n } else {\n deletions.push(current);\n }\n\n newWorkInProgress.flags |= Placement; // Restart work from the new fiber.\n\n return newWorkInProgress;\n }\n}\n\nfunction checkScheduledUpdateOrContext(current, renderLanes) {\n // Before performing an early bailout, we must check if there are pending\n // updates or context.\n var updateLanes = current.lanes;\n\n if (includesSomeLane(updateLanes, renderLanes)) {\n return true;\n } // No pending update, but because context is propagated lazily, we need\n\n return false;\n}\n\nfunction attemptEarlyBailoutIfNoScheduledUpdate(current, workInProgress, renderLanes) {\n // This fiber does not have any pending work. Bailout without entering\n // the begin phase. There's still some bookkeeping we that needs to be done\n // in this optimized path, mostly pushing stuff onto the stack.\n switch (workInProgress.tag) {\n case HostRoot:\n pushHostRootContext(workInProgress);\n var root = workInProgress.stateNode;\n\n resetHydrationState();\n break;\n\n case HostComponent:\n pushHostContext(workInProgress);\n break;\n\n case ClassComponent:\n {\n var Component = workInProgress.type;\n\n if (isContextProvider(Component)) {\n pushContextProvider(workInProgress);\n }\n\n break;\n }\n\n case HostPortal:\n pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);\n break;\n\n case ContextProvider:\n {\n var newValue = workInProgress.memoizedProps.value;\n var context = workInProgress.type._context;\n pushProvider(workInProgress, context, newValue);\n break;\n }\n\n case Profiler:\n {\n // Profiler should only call onRender when one of its descendants actually rendered.\n var hasChildWork = includesSomeLane(renderLanes, workInProgress.childLanes);\n\n if (hasChildWork) {\n workInProgress.flags |= Update;\n }\n\n {\n // Reset effect durations for the next eventual effect phase.\n // These are reset during render to allow the DevTools commit hook a chance to read them,\n var stateNode = workInProgress.stateNode;\n stateNode.effectDuration = 0;\n stateNode.passiveEffectDuration = 0;\n }\n }\n\n break;\n\n case SuspenseComponent:\n {\n var state = workInProgress.memoizedState;\n\n if (state !== null) {\n if (state.dehydrated !== null) {\n pushSuspenseContext(workInProgress, setDefaultShallowSuspenseContext(suspenseStackCursor.current)); // We know that this component will suspend again because if it has\n // been unsuspended it has committed as a resolved Suspense component.\n // If it needs to be retried, it should have work scheduled on it.\n\n workInProgress.flags |= DidCapture; // We should never render the children of a dehydrated boundary until we\n // upgrade it. We return null instead of bailoutOnAlreadyFinishedWork.\n\n return null;\n } // If this boundary is currently timed out, we need to decide\n // whether to retry the primary children, or to skip over it and\n // go straight to the fallback. Check the priority of the primary\n // child fragment.\n\n\n var primaryChildFragment = workInProgress.child;\n var primaryChildLanes = primaryChildFragment.childLanes;\n\n if (includesSomeLane(renderLanes, primaryChildLanes)) {\n // The primary children have pending work. Use the normal path\n // to attempt to render the primary children again.\n return updateSuspenseComponent(current, workInProgress, renderLanes);\n } else {\n // The primary child fragment does not have pending work marked\n // on it\n pushSuspenseContext(workInProgress, setDefaultShallowSuspenseContext(suspenseStackCursor.current)); // The primary children do not have pending work with sufficient\n // priority. Bailout.\n\n var child = bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n\n if (child !== null) {\n // The fallback children have pending work. Skip over the\n // primary children and work on the fallback.\n return child.sibling;\n } else {\n // Note: We can return `null` here because we already checked\n // whether there were nested context consumers, via the call to\n // `bailoutOnAlreadyFinishedWork` above.\n return null;\n }\n }\n } else {\n pushSuspenseContext(workInProgress, setDefaultShallowSuspenseContext(suspenseStackCursor.current));\n }\n\n break;\n }\n\n case SuspenseListComponent:\n {\n var didSuspendBefore = (current.flags & DidCapture) !== NoFlags;\n\n var _hasChildWork = includesSomeLane(renderLanes, workInProgress.childLanes);\n\n if (didSuspendBefore) {\n if (_hasChildWork) {\n // If something was in fallback state last time, and we have all the\n // same children then we're still in progressive loading state.\n // Something might get unblocked by state updates or retries in the\n // tree which will affect the tail. So we need to use the normal\n // path to compute the correct tail.\n return updateSuspenseListComponent(current, workInProgress, renderLanes);\n } // If none of the children had any work, that means that none of\n // them got retried so they'll still be blocked in the same way\n // as before. We can fast bail out.\n\n\n workInProgress.flags |= DidCapture;\n } // If nothing suspended before and we're rendering the same children,\n // then the tail doesn't matter. Anything new that suspends will work\n // in the \"together\" mode, so we can continue from the state we had.\n\n\n var renderState = workInProgress.memoizedState;\n\n if (renderState !== null) {\n // Reset to the \"together\" mode in case we've started a different\n // update in the past but didn't complete it.\n renderState.rendering = null;\n renderState.tail = null;\n renderState.lastEffect = null;\n }\n\n pushSuspenseContext(workInProgress, suspenseStackCursor.current);\n\n if (_hasChildWork) {\n break;\n } else {\n // If none of the children had any work, that means that none of\n // them got retried so they'll still be blocked in the same way\n // as before. We can fast bail out.\n return null;\n }\n }\n\n case OffscreenComponent:\n case LegacyHiddenComponent:\n {\n // Need to check if the tree still needs to be deferred. This is\n // almost identical to the logic used in the normal update path,\n // so we'll just enter that. The only difference is we'll bail out\n // at the next level instead of this one, because the child props\n // have not changed. Which is fine.\n // TODO: Probably should refactor `beginWork` to split the bailout\n // path from the normal path. I'm tempted to do a labeled break here\n // but I won't :)\n workInProgress.lanes = NoLanes;\n return updateOffscreenComponent(current, workInProgress, renderLanes);\n }\n }\n\n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n}\n\nfunction beginWork(current, workInProgress, renderLanes) {\n {\n if (workInProgress._debugNeedsRemount && current !== null) {\n // This will restart the begin phase with a new fiber.\n return remountFiber(current, workInProgress, createFiberFromTypeAndProps(workInProgress.type, workInProgress.key, workInProgress.pendingProps, workInProgress._debugOwner || null, workInProgress.mode, workInProgress.lanes));\n }\n }\n\n if (current !== null) {\n var oldProps = current.memoizedProps;\n var newProps = workInProgress.pendingProps;\n\n if (oldProps !== newProps || hasContextChanged() || ( // Force a re-render if the implementation changed due to hot reload:\n workInProgress.type !== current.type )) {\n // If props or context changed, mark the fiber as having performed work.\n // This may be unset if the props are determined to be equal later (memo).\n didReceiveUpdate = true;\n } else {\n // Neither props nor legacy context changes. Check if there's a pending\n // update or context change.\n var hasScheduledUpdateOrContext = checkScheduledUpdateOrContext(current, renderLanes);\n\n if (!hasScheduledUpdateOrContext && // If this is the second pass of an error or suspense boundary, there\n // may not be work scheduled on `current`, so we check for this flag.\n (workInProgress.flags & DidCapture) === NoFlags) {\n // No pending updates or context. Bail out now.\n didReceiveUpdate = false;\n return attemptEarlyBailoutIfNoScheduledUpdate(current, workInProgress, renderLanes);\n }\n\n if ((current.flags & ForceUpdateForLegacySuspense) !== NoFlags) {\n // This is a special case that only exists for legacy mode.\n // See https://github.com/facebook/react/pull/19216.\n didReceiveUpdate = true;\n } else {\n // An update was scheduled on this fiber, but there are no new props\n // nor legacy context. Set this to false. If an update queue or context\n // consumer produces a changed value, it will set this to true. Otherwise,\n // the component will assume the children have not changed and bail out.\n didReceiveUpdate = false;\n }\n }\n } else {\n didReceiveUpdate = false;\n\n if (getIsHydrating() && isForkedChild(workInProgress)) {\n // Check if this child belongs to a list of muliple children in\n // its parent.\n //\n // In a true multi-threaded implementation, we would render children on\n // parallel threads. This would represent the beginning of a new render\n // thread for this subtree.\n //\n // We only use this for id generation during hydration, which is why the\n // logic is located in this special branch.\n var slotIndex = workInProgress.index;\n var numberOfForks = getForksAtLevel();\n pushTreeId(workInProgress, numberOfForks, slotIndex);\n }\n } // Before entering the begin phase, clear pending update priority.\n // TODO: This assumes that we're about to evaluate the component and process\n // the update queue. However, there's an exception: SimpleMemoComponent\n // sometimes bails out later in the begin phase. This indicates that we should\n // move this assignment out of the common path and into each branch.\n\n\n workInProgress.lanes = NoLanes;\n\n switch (workInProgress.tag) {\n case IndeterminateComponent:\n {\n return mountIndeterminateComponent(current, workInProgress, workInProgress.type, renderLanes);\n }\n\n case LazyComponent:\n {\n var elementType = workInProgress.elementType;\n return mountLazyComponent(current, workInProgress, elementType, renderLanes);\n }\n\n case FunctionComponent:\n {\n var Component = workInProgress.type;\n var unresolvedProps = workInProgress.pendingProps;\n var resolvedProps = workInProgress.elementType === Component ? unresolvedProps : resolveDefaultProps(Component, unresolvedProps);\n return updateFunctionComponent(current, workInProgress, Component, resolvedProps, renderLanes);\n }\n\n case ClassComponent:\n {\n var _Component = workInProgress.type;\n var _unresolvedProps = workInProgress.pendingProps;\n\n var _resolvedProps = workInProgress.elementType === _Component ? _unresolvedProps : resolveDefaultProps(_Component, _unresolvedProps);\n\n return updateClassComponent(current, workInProgress, _Component, _resolvedProps, renderLanes);\n }\n\n case HostRoot:\n return updateHostRoot(current, workInProgress, renderLanes);\n\n case HostComponent:\n return updateHostComponent(current, workInProgress, renderLanes);\n\n case HostText:\n return updateHostText(current, workInProgress);\n\n case SuspenseComponent:\n return updateSuspenseComponent(current, workInProgress, renderLanes);\n\n case HostPortal:\n return updatePortalComponent(current, workInProgress, renderLanes);\n\n case ForwardRef:\n {\n var type = workInProgress.type;\n var _unresolvedProps2 = workInProgress.pendingProps;\n\n var _resolvedProps2 = workInProgress.elementType === type ? _unresolvedProps2 : resolveDefaultProps(type, _unresolvedProps2);\n\n return updateForwardRef(current, workInProgress, type, _resolvedProps2, renderLanes);\n }\n\n case Fragment:\n return updateFragment(current, workInProgress, renderLanes);\n\n case Mode:\n return updateMode(current, workInProgress, renderLanes);\n\n case Profiler:\n return updateProfiler(current, workInProgress, renderLanes);\n\n case ContextProvider:\n return updateContextProvider(current, workInProgress, renderLanes);\n\n case ContextConsumer:\n return updateContextConsumer(current, workInProgress, renderLanes);\n\n case MemoComponent:\n {\n var _type2 = workInProgress.type;\n var _unresolvedProps3 = workInProgress.pendingProps; // Resolve outer props first, then resolve inner props.\n\n var _resolvedProps3 = resolveDefaultProps(_type2, _unresolvedProps3);\n\n {\n if (workInProgress.type !== workInProgress.elementType) {\n var outerPropTypes = _type2.propTypes;\n\n if (outerPropTypes) {\n checkPropTypes(outerPropTypes, _resolvedProps3, // Resolved for outer only\n 'prop', getComponentNameFromType(_type2));\n }\n }\n }\n\n _resolvedProps3 = resolveDefaultProps(_type2.type, _resolvedProps3);\n return updateMemoComponent(current, workInProgress, _type2, _resolvedProps3, renderLanes);\n }\n\n case SimpleMemoComponent:\n {\n return updateSimpleMemoComponent(current, workInProgress, workInProgress.type, workInProgress.pendingProps, renderLanes);\n }\n\n case IncompleteClassComponent:\n {\n var _Component2 = workInProgress.type;\n var _unresolvedProps4 = workInProgress.pendingProps;\n\n var _resolvedProps4 = workInProgress.elementType === _Component2 ? _unresolvedProps4 : resolveDefaultProps(_Component2, _unresolvedProps4);\n\n return mountIncompleteClassComponent(current, workInProgress, _Component2, _resolvedProps4, renderLanes);\n }\n\n case SuspenseListComponent:\n {\n return updateSuspenseListComponent(current, workInProgress, renderLanes);\n }\n\n case ScopeComponent:\n {\n\n break;\n }\n\n case OffscreenComponent:\n {\n return updateOffscreenComponent(current, workInProgress, renderLanes);\n }\n }\n\n throw new Error(\"Unknown unit of work tag (\" + workInProgress.tag + \"). This error is likely caused by a bug in \" + 'React. Please file an issue.');\n}\n\nfunction markUpdate(workInProgress) {\n // Tag the fiber with an update effect. This turns a Placement into\n // a PlacementAndUpdate.\n workInProgress.flags |= Update;\n}\n\nfunction markRef$1(workInProgress) {\n workInProgress.flags |= Ref;\n\n {\n workInProgress.flags |= RefStatic;\n }\n}\n\nvar appendAllChildren;\nvar updateHostContainer;\nvar updateHostComponent$1;\nvar updateHostText$1;\n\n{\n // Mutation mode\n appendAllChildren = function (parent, workInProgress, needsVisibilityToggle, isHidden) {\n // We only have the top Fiber that was created but we need recurse down its\n // children to find all the terminal nodes.\n var node = workInProgress.child;\n\n while (node !== null) {\n if (node.tag === HostComponent || node.tag === HostText) {\n appendInitialChild(parent, node.stateNode);\n } else if (node.tag === HostPortal) ; else if (node.child !== null) {\n node.child.return = node;\n node = node.child;\n continue;\n }\n\n if (node === workInProgress) {\n return;\n }\n\n while (node.sibling === null) {\n if (node.return === null || node.return === workInProgress) {\n return;\n }\n\n node = node.return;\n }\n\n node.sibling.return = node.return;\n node = node.sibling;\n }\n };\n\n updateHostContainer = function (current, workInProgress) {// Noop\n };\n\n updateHostComponent$1 = function (current, workInProgress, type, newProps, rootContainerInstance) {\n // If we have an alternate, that means this is an update and we need to\n // schedule a side-effect to do the updates.\n var oldProps = current.memoizedProps;\n\n if (oldProps === newProps) {\n // In mutation mode, this is sufficient for a bailout because\n // we won't touch this node even if children changed.\n return;\n } // If we get updated because one of our children updated, we don't\n // have newProps so we'll have to reuse them.\n // TODO: Split the update API as separate for the props vs. children.\n // Even better would be if children weren't special cased at all tho.\n\n\n var instance = workInProgress.stateNode;\n var currentHostContext = getHostContext(); // TODO: Experiencing an error where oldProps is null. Suggests a host\n // component is hitting the resume path. Figure out why. Possibly\n // related to `hidden`.\n\n var updatePayload = prepareUpdate(instance, type, oldProps, newProps, rootContainerInstance, currentHostContext); // TODO: Type this specific to this type of component.\n\n workInProgress.updateQueue = updatePayload; // If the update payload indicates that there is a change or if there\n // is a new ref we mark this as an update. All the work is done in commitWork.\n\n if (updatePayload) {\n markUpdate(workInProgress);\n }\n };\n\n updateHostText$1 = function (current, workInProgress, oldText, newText) {\n // If the text differs, mark it as an update. All the work in done in commitWork.\n if (oldText !== newText) {\n markUpdate(workInProgress);\n }\n };\n}\n\nfunction cutOffTailIfNeeded(renderState, hasRenderedATailFallback) {\n if (getIsHydrating()) {\n // If we're hydrating, we should consume as many items as we can\n // so we don't leave any behind.\n return;\n }\n\n switch (renderState.tailMode) {\n case 'hidden':\n {\n // Any insertions at the end of the tail list after this point\n // should be invisible. If there are already mounted boundaries\n // anything before them are not considered for collapsing.\n // Therefore we need to go through the whole tail to find if\n // there are any.\n var tailNode = renderState.tail;\n var lastTailNode = null;\n\n while (tailNode !== null) {\n if (tailNode.alternate !== null) {\n lastTailNode = tailNode;\n }\n\n tailNode = tailNode.sibling;\n } // Next we're simply going to delete all insertions after the\n // last rendered item.\n\n\n if (lastTailNode === null) {\n // All remaining items in the tail are insertions.\n renderState.tail = null;\n } else {\n // Detach the insertion after the last node that was already\n // inserted.\n lastTailNode.sibling = null;\n }\n\n break;\n }\n\n case 'collapsed':\n {\n // Any insertions at the end of the tail list after this point\n // should be invisible. If there are already mounted boundaries\n // anything before them are not considered for collapsing.\n // Therefore we need to go through the whole tail to find if\n // there are any.\n var _tailNode = renderState.tail;\n var _lastTailNode = null;\n\n while (_tailNode !== null) {\n if (_tailNode.alternate !== null) {\n _lastTailNode = _tailNode;\n }\n\n _tailNode = _tailNode.sibling;\n } // Next we're simply going to delete all insertions after the\n // last rendered item.\n\n\n if (_lastTailNode === null) {\n // All remaining items in the tail are insertions.\n if (!hasRenderedATailFallback && renderState.tail !== null) {\n // We suspended during the head. We want to show at least one\n // row at the tail. So we'll keep on and cut off the rest.\n renderState.tail.sibling = null;\n } else {\n renderState.tail = null;\n }\n } else {\n // Detach the insertion after the last node that was already\n // inserted.\n _lastTailNode.sibling = null;\n }\n\n break;\n }\n }\n}\n\nfunction bubbleProperties(completedWork) {\n var didBailout = completedWork.alternate !== null && completedWork.alternate.child === completedWork.child;\n var newChildLanes = NoLanes;\n var subtreeFlags = NoFlags;\n\n if (!didBailout) {\n // Bubble up the earliest expiration time.\n if ( (completedWork.mode & ProfileMode) !== NoMode) {\n // In profiling mode, resetChildExpirationTime is also used to reset\n // profiler durations.\n var actualDuration = completedWork.actualDuration;\n var treeBaseDuration = completedWork.selfBaseDuration;\n var child = completedWork.child;\n\n while (child !== null) {\n newChildLanes = mergeLanes(newChildLanes, mergeLanes(child.lanes, child.childLanes));\n subtreeFlags |= child.subtreeFlags;\n subtreeFlags |= child.flags; // When a fiber is cloned, its actualDuration is reset to 0. This value will\n // only be updated if work is done on the fiber (i.e. it doesn't bailout).\n // When work is done, it should bubble to the parent's actualDuration. If\n // the fiber has not been cloned though, (meaning no work was done), then\n // this value will reflect the amount of time spent working on a previous\n // render. In that case it should not bubble. We determine whether it was\n // cloned by comparing the child pointer.\n\n actualDuration += child.actualDuration;\n treeBaseDuration += child.treeBaseDuration;\n child = child.sibling;\n }\n\n completedWork.actualDuration = actualDuration;\n completedWork.treeBaseDuration = treeBaseDuration;\n } else {\n var _child = completedWork.child;\n\n while (_child !== null) {\n newChildLanes = mergeLanes(newChildLanes, mergeLanes(_child.lanes, _child.childLanes));\n subtreeFlags |= _child.subtreeFlags;\n subtreeFlags |= _child.flags; // Update the return pointer so the tree is consistent. This is a code\n // smell because it assumes the commit phase is never concurrent with\n // the render phase. Will address during refactor to alternate model.\n\n _child.return = completedWork;\n _child = _child.sibling;\n }\n }\n\n completedWork.subtreeFlags |= subtreeFlags;\n } else {\n // Bubble up the earliest expiration time.\n if ( (completedWork.mode & ProfileMode) !== NoMode) {\n // In profiling mode, resetChildExpirationTime is also used to reset\n // profiler durations.\n var _treeBaseDuration = completedWork.selfBaseDuration;\n var _child2 = completedWork.child;\n\n while (_child2 !== null) {\n newChildLanes = mergeLanes(newChildLanes, mergeLanes(_child2.lanes, _child2.childLanes)); // \"Static\" flags share the lifetime of the fiber/hook they belong to,\n // so we should bubble those up even during a bailout. All the other\n // flags have a lifetime only of a single render + commit, so we should\n // ignore them.\n\n subtreeFlags |= _child2.subtreeFlags & StaticMask;\n subtreeFlags |= _child2.flags & StaticMask;\n _treeBaseDuration += _child2.treeBaseDuration;\n _child2 = _child2.sibling;\n }\n\n completedWork.treeBaseDuration = _treeBaseDuration;\n } else {\n var _child3 = completedWork.child;\n\n while (_child3 !== null) {\n newChildLanes = mergeLanes(newChildLanes, mergeLanes(_child3.lanes, _child3.childLanes)); // \"Static\" flags share the lifetime of the fiber/hook they belong to,\n // so we should bubble those up even during a bailout. All the other\n // flags have a lifetime only of a single render + commit, so we should\n // ignore them.\n\n subtreeFlags |= _child3.subtreeFlags & StaticMask;\n subtreeFlags |= _child3.flags & StaticMask; // Update the return pointer so the tree is consistent. This is a code\n // smell because it assumes the commit phase is never concurrent with\n // the render phase. Will address during refactor to alternate model.\n\n _child3.return = completedWork;\n _child3 = _child3.sibling;\n }\n }\n\n completedWork.subtreeFlags |= subtreeFlags;\n }\n\n completedWork.childLanes = newChildLanes;\n return didBailout;\n}\n\nfunction completeDehydratedSuspenseBoundary(current, workInProgress, nextState) {\n if (hasUnhydratedTailNodes() && (workInProgress.mode & ConcurrentMode) !== NoMode && (workInProgress.flags & DidCapture) === NoFlags) {\n warnIfUnhydratedTailNodes(workInProgress);\n resetHydrationState();\n workInProgress.flags |= ForceClientRender | Incomplete | ShouldCapture;\n return false;\n }\n\n var wasHydrated = popHydrationState(workInProgress);\n\n if (nextState !== null && nextState.dehydrated !== null) {\n // We might be inside a hydration state the first time we're picking up this\n // Suspense boundary, and also after we've reentered it for further hydration.\n if (current === null) {\n if (!wasHydrated) {\n throw new Error('A dehydrated suspense component was completed without a hydrated node. ' + 'This is probably a bug in React.');\n }\n\n prepareToHydrateHostSuspenseInstance(workInProgress);\n bubbleProperties(workInProgress);\n\n {\n if ((workInProgress.mode & ProfileMode) !== NoMode) {\n var isTimedOutSuspense = nextState !== null;\n\n if (isTimedOutSuspense) {\n // Don't count time spent in a timed out Suspense subtree as part of the base duration.\n var primaryChildFragment = workInProgress.child;\n\n if (primaryChildFragment !== null) {\n // $FlowFixMe Flow doesn't support type casting in combination with the -= operator\n workInProgress.treeBaseDuration -= primaryChildFragment.treeBaseDuration;\n }\n }\n }\n }\n\n return false;\n } else {\n // We might have reentered this boundary to hydrate it. If so, we need to reset the hydration\n // state since we're now exiting out of it. popHydrationState doesn't do that for us.\n resetHydrationState();\n\n if ((workInProgress.flags & DidCapture) === NoFlags) {\n // This boundary did not suspend so it's now hydrated and unsuspended.\n workInProgress.memoizedState = null;\n } // If nothing suspended, we need to schedule an effect to mark this boundary\n // as having hydrated so events know that they're free to be invoked.\n // It's also a signal to replay events and the suspense callback.\n // If something suspended, schedule an effect to attach retry listeners.\n // So we might as well always mark this.\n\n\n workInProgress.flags |= Update;\n bubbleProperties(workInProgress);\n\n {\n if ((workInProgress.mode & ProfileMode) !== NoMode) {\n var _isTimedOutSuspense = nextState !== null;\n\n if (_isTimedOutSuspense) {\n // Don't count time spent in a timed out Suspense subtree as part of the base duration.\n var _primaryChildFragment = workInProgress.child;\n\n if (_primaryChildFragment !== null) {\n // $FlowFixMe Flow doesn't support type casting in combination with the -= operator\n workInProgress.treeBaseDuration -= _primaryChildFragment.treeBaseDuration;\n }\n }\n }\n }\n\n return false;\n }\n } else {\n // Successfully completed this tree. If this was a forced client render,\n // there may have been recoverable errors during first hydration\n // attempt. If so, add them to a queue so we can log them in the\n // commit phase.\n upgradeHydrationErrorsToRecoverable(); // Fall through to normal Suspense path\n\n return true;\n }\n}\n\nfunction completeWork(current, workInProgress, renderLanes) {\n var newProps = workInProgress.pendingProps; // Note: This intentionally doesn't check if we're hydrating because comparing\n // to the current tree provider fiber is just as fast and less error-prone.\n // Ideally we would have a special version of the work loop only\n // for hydration.\n\n popTreeContext(workInProgress);\n\n switch (workInProgress.tag) {\n case IndeterminateComponent:\n case LazyComponent:\n case SimpleMemoComponent:\n case FunctionComponent:\n case ForwardRef:\n case Fragment:\n case Mode:\n case Profiler:\n case ContextConsumer:\n case MemoComponent:\n bubbleProperties(workInProgress);\n return null;\n\n case ClassComponent:\n {\n var Component = workInProgress.type;\n\n if (isContextProvider(Component)) {\n popContext(workInProgress);\n }\n\n bubbleProperties(workInProgress);\n return null;\n }\n\n case HostRoot:\n {\n var fiberRoot = workInProgress.stateNode;\n popHostContainer(workInProgress);\n popTopLevelContextObject(workInProgress);\n resetWorkInProgressVersions();\n\n if (fiberRoot.pendingContext) {\n fiberRoot.context = fiberRoot.pendingContext;\n fiberRoot.pendingContext = null;\n }\n\n if (current === null || current.child === null) {\n // If we hydrated, pop so that we can delete any remaining children\n // that weren't hydrated.\n var wasHydrated = popHydrationState(workInProgress);\n\n if (wasHydrated) {\n // If we hydrated, then we'll need to schedule an update for\n // the commit side-effects on the root.\n markUpdate(workInProgress);\n } else {\n if (current !== null) {\n var prevState = current.memoizedState;\n\n if ( // Check if this is a client root\n !prevState.isDehydrated || // Check if we reverted to client rendering (e.g. due to an error)\n (workInProgress.flags & ForceClientRender) !== NoFlags) {\n // Schedule an effect to clear this container at the start of the\n // next commit. This handles the case of React rendering into a\n // container with previous children. It's also safe to do for\n // updates too, because current.child would only be null if the\n // previous render was null (so the container would already\n // be empty).\n workInProgress.flags |= Snapshot; // If this was a forced client render, there may have been\n // recoverable errors during first hydration attempt. If so, add\n // them to a queue so we can log them in the commit phase.\n\n upgradeHydrationErrorsToRecoverable();\n }\n }\n }\n }\n\n updateHostContainer(current, workInProgress);\n bubbleProperties(workInProgress);\n\n return null;\n }\n\n case HostComponent:\n {\n popHostContext(workInProgress);\n var rootContainerInstance = getRootHostContainer();\n var type = workInProgress.type;\n\n if (current !== null && workInProgress.stateNode != null) {\n updateHostComponent$1(current, workInProgress, type, newProps, rootContainerInstance);\n\n if (current.ref !== workInProgress.ref) {\n markRef$1(workInProgress);\n }\n } else {\n if (!newProps) {\n if (workInProgress.stateNode === null) {\n throw new Error('We must have new props for new mounts. This error is likely ' + 'caused by a bug in React. Please file an issue.');\n } // This can happen when we abort work.\n\n\n bubbleProperties(workInProgress);\n return null;\n }\n\n var currentHostContext = getHostContext(); // TODO: Move createInstance to beginWork and keep it on a context\n // \"stack\" as the parent. Then append children as we go in beginWork\n // or completeWork depending on whether we want to add them top->down or\n // bottom->up. Top->down is faster in IE11.\n\n var _wasHydrated = popHydrationState(workInProgress);\n\n if (_wasHydrated) {\n // TODO: Move this and createInstance step into the beginPhase\n // to consolidate.\n if (prepareToHydrateHostInstance(workInProgress, rootContainerInstance, currentHostContext)) {\n // If changes to the hydrated node need to be applied at the\n // commit-phase we mark this as such.\n markUpdate(workInProgress);\n }\n } else {\n var instance = createInstance(type, newProps, rootContainerInstance, currentHostContext, workInProgress);\n appendAllChildren(instance, workInProgress, false, false);\n workInProgress.stateNode = instance; // Certain renderers require commit-time effects for initial mount.\n // (eg DOM renderer supports auto-focus for certain elements).\n // Make sure such renderers get scheduled for later work.\n\n if (finalizeInitialChildren(instance, type, newProps, rootContainerInstance)) {\n markUpdate(workInProgress);\n }\n }\n\n if (workInProgress.ref !== null) {\n // If there is a ref on a host node we need to schedule a callback\n markRef$1(workInProgress);\n }\n }\n\n bubbleProperties(workInProgress);\n return null;\n }\n\n case HostText:\n {\n var newText = newProps;\n\n if (current && workInProgress.stateNode != null) {\n var oldText = current.memoizedProps; // If we have an alternate, that means this is an update and we need\n // to schedule a side-effect to do the updates.\n\n updateHostText$1(current, workInProgress, oldText, newText);\n } else {\n if (typeof newText !== 'string') {\n if (workInProgress.stateNode === null) {\n throw new Error('We must have new props for new mounts. This error is likely ' + 'caused by a bug in React. Please file an issue.');\n } // This can happen when we abort work.\n\n }\n\n var _rootContainerInstance = getRootHostContainer();\n\n var _currentHostContext = getHostContext();\n\n var _wasHydrated2 = popHydrationState(workInProgress);\n\n if (_wasHydrated2) {\n if (prepareToHydrateHostTextInstance(workInProgress)) {\n markUpdate(workInProgress);\n }\n } else {\n workInProgress.stateNode = createTextInstance(newText, _rootContainerInstance, _currentHostContext, workInProgress);\n }\n }\n\n bubbleProperties(workInProgress);\n return null;\n }\n\n case SuspenseComponent:\n {\n popSuspenseContext(workInProgress);\n var nextState = workInProgress.memoizedState; // Special path for dehydrated boundaries. We may eventually move this\n // to its own fiber type so that we can add other kinds of hydration\n // boundaries that aren't associated with a Suspense tree. In anticipation\n // of such a refactor, all the hydration logic is contained in\n // this branch.\n\n if (current === null || current.memoizedState !== null && current.memoizedState.dehydrated !== null) {\n var fallthroughToNormalSuspensePath = completeDehydratedSuspenseBoundary(current, workInProgress, nextState);\n\n if (!fallthroughToNormalSuspensePath) {\n if (workInProgress.flags & ShouldCapture) {\n // Special case. There were remaining unhydrated nodes. We treat\n // this as a mismatch. Revert to client rendering.\n return workInProgress;\n } else {\n // Did not finish hydrating, either because this is the initial\n // render or because something suspended.\n return null;\n }\n } // Continue with the normal Suspense path.\n\n }\n\n if ((workInProgress.flags & DidCapture) !== NoFlags) {\n // Something suspended. Re-render with the fallback children.\n workInProgress.lanes = renderLanes; // Do not reset the effect list.\n\n if ( (workInProgress.mode & ProfileMode) !== NoMode) {\n transferActualDuration(workInProgress);\n } // Don't bubble properties in this case.\n\n\n return workInProgress;\n }\n\n var nextDidTimeout = nextState !== null;\n var prevDidTimeout = current !== null && current.memoizedState !== null;\n // a passive effect, which is when we process the transitions\n\n\n if (nextDidTimeout !== prevDidTimeout) {\n // an effect to toggle the subtree's visibility. When we switch from\n // fallback -> primary, the inner Offscreen fiber schedules this effect\n // as part of its normal complete phase. But when we switch from\n // primary -> fallback, the inner Offscreen fiber does not have a complete\n // phase. So we need to schedule its effect here.\n //\n // We also use this flag to connect/disconnect the effects, but the same\n // logic applies: when re-connecting, the Offscreen fiber's complete\n // phase will handle scheduling the effect. It's only when the fallback\n // is active that we have to do anything special.\n\n\n if (nextDidTimeout) {\n var _offscreenFiber2 = workInProgress.child;\n _offscreenFiber2.flags |= Visibility; // TODO: This will still suspend a synchronous tree if anything\n // in the concurrent tree already suspended during this render.\n // This is a known bug.\n\n if ((workInProgress.mode & ConcurrentMode) !== NoMode) {\n // TODO: Move this back to throwException because this is too late\n // if this is a large tree which is common for initial loads. We\n // don't know if we should restart a render or not until we get\n // this marker, and this is too late.\n // If this render already had a ping or lower pri updates,\n // and this is the first time we know we're going to suspend we\n // should be able to immediately restart from within throwException.\n var hasInvisibleChildContext = current === null && (workInProgress.memoizedProps.unstable_avoidThisFallback !== true || !enableSuspenseAvoidThisFallback);\n\n if (hasInvisibleChildContext || hasSuspenseContext(suspenseStackCursor.current, InvisibleParentSuspenseContext)) {\n // If this was in an invisible tree or a new render, then showing\n // this boundary is ok.\n renderDidSuspend();\n } else {\n // Otherwise, we're going to have to hide content so we should\n // suspend for longer if possible.\n renderDidSuspendDelayIfPossible();\n }\n }\n }\n }\n\n var wakeables = workInProgress.updateQueue;\n\n if (wakeables !== null) {\n // Schedule an effect to attach a retry listener to the promise.\n // TODO: Move to passive phase\n workInProgress.flags |= Update;\n }\n\n bubbleProperties(workInProgress);\n\n {\n if ((workInProgress.mode & ProfileMode) !== NoMode) {\n if (nextDidTimeout) {\n // Don't count time spent in a timed out Suspense subtree as part of the base duration.\n var primaryChildFragment = workInProgress.child;\n\n if (primaryChildFragment !== null) {\n // $FlowFixMe Flow doesn't support type casting in combination with the -= operator\n workInProgress.treeBaseDuration -= primaryChildFragment.treeBaseDuration;\n }\n }\n }\n }\n\n return null;\n }\n\n case HostPortal:\n popHostContainer(workInProgress);\n updateHostContainer(current, workInProgress);\n\n if (current === null) {\n preparePortalMount(workInProgress.stateNode.containerInfo);\n }\n\n bubbleProperties(workInProgress);\n return null;\n\n case ContextProvider:\n // Pop provider fiber\n var context = workInProgress.type._context;\n popProvider(context, workInProgress);\n bubbleProperties(workInProgress);\n return null;\n\n case IncompleteClassComponent:\n {\n // Same as class component case. I put it down here so that the tags are\n // sequential to ensure this switch is compiled to a jump table.\n var _Component = workInProgress.type;\n\n if (isContextProvider(_Component)) {\n popContext(workInProgress);\n }\n\n bubbleProperties(workInProgress);\n return null;\n }\n\n case SuspenseListComponent:\n {\n popSuspenseContext(workInProgress);\n var renderState = workInProgress.memoizedState;\n\n if (renderState === null) {\n // We're running in the default, \"independent\" mode.\n // We don't do anything in this mode.\n bubbleProperties(workInProgress);\n return null;\n }\n\n var didSuspendAlready = (workInProgress.flags & DidCapture) !== NoFlags;\n var renderedTail = renderState.rendering;\n\n if (renderedTail === null) {\n // We just rendered the head.\n if (!didSuspendAlready) {\n // This is the first pass. We need to figure out if anything is still\n // suspended in the rendered set.\n // If new content unsuspended, but there's still some content that\n // didn't. Then we need to do a second pass that forces everything\n // to keep showing their fallbacks.\n // We might be suspended if something in this render pass suspended, or\n // something in the previous committed pass suspended. Otherwise,\n // there's no chance so we can skip the expensive call to\n // findFirstSuspended.\n var cannotBeSuspended = renderHasNotSuspendedYet() && (current === null || (current.flags & DidCapture) === NoFlags);\n\n if (!cannotBeSuspended) {\n var row = workInProgress.child;\n\n while (row !== null) {\n var suspended = findFirstSuspended(row);\n\n if (suspended !== null) {\n didSuspendAlready = true;\n workInProgress.flags |= DidCapture;\n cutOffTailIfNeeded(renderState, false); // If this is a newly suspended tree, it might not get committed as\n // part of the second pass. In that case nothing will subscribe to\n // its thenables. Instead, we'll transfer its thenables to the\n // SuspenseList so that it can retry if they resolve.\n // There might be multiple of these in the list but since we're\n // going to wait for all of them anyway, it doesn't really matter\n // which ones gets to ping. In theory we could get clever and keep\n // track of how many dependencies remain but it gets tricky because\n // in the meantime, we can add/remove/change items and dependencies.\n // We might bail out of the loop before finding any but that\n // doesn't matter since that means that the other boundaries that\n // we did find already has their listeners attached.\n\n var newThenables = suspended.updateQueue;\n\n if (newThenables !== null) {\n workInProgress.updateQueue = newThenables;\n workInProgress.flags |= Update;\n } // Rerender the whole list, but this time, we'll force fallbacks\n // to stay in place.\n // Reset the effect flags before doing the second pass since that's now invalid.\n // Reset the child fibers to their original state.\n\n\n workInProgress.subtreeFlags = NoFlags;\n resetChildFibers(workInProgress, renderLanes); // Set up the Suspense Context to force suspense and immediately\n // rerender the children.\n\n pushSuspenseContext(workInProgress, setShallowSuspenseContext(suspenseStackCursor.current, ForceSuspenseFallback)); // Don't bubble properties in this case.\n\n return workInProgress.child;\n }\n\n row = row.sibling;\n }\n }\n\n if (renderState.tail !== null && now() > getRenderTargetTime()) {\n // We have already passed our CPU deadline but we still have rows\n // left in the tail. We'll just give up further attempts to render\n // the main content and only render fallbacks.\n workInProgress.flags |= DidCapture;\n didSuspendAlready = true;\n cutOffTailIfNeeded(renderState, false); // Since nothing actually suspended, there will nothing to ping this\n // to get it started back up to attempt the next item. While in terms\n // of priority this work has the same priority as this current render,\n // it's not part of the same transition once the transition has\n // committed. If it's sync, we still want to yield so that it can be\n // painted. Conceptually, this is really the same as pinging.\n // We can use any RetryLane even if it's the one currently rendering\n // since we're leaving it behind on this node.\n\n workInProgress.lanes = SomeRetryLane;\n }\n } else {\n cutOffTailIfNeeded(renderState, false);\n } // Next we're going to render the tail.\n\n } else {\n // Append the rendered row to the child list.\n if (!didSuspendAlready) {\n var _suspended = findFirstSuspended(renderedTail);\n\n if (_suspended !== null) {\n workInProgress.flags |= DidCapture;\n didSuspendAlready = true; // Ensure we transfer the update queue to the parent so that it doesn't\n // get lost if this row ends up dropped during a second pass.\n\n var _newThenables = _suspended.updateQueue;\n\n if (_newThenables !== null) {\n workInProgress.updateQueue = _newThenables;\n workInProgress.flags |= Update;\n }\n\n cutOffTailIfNeeded(renderState, true); // This might have been modified.\n\n if (renderState.tail === null && renderState.tailMode === 'hidden' && !renderedTail.alternate && !getIsHydrating() // We don't cut it if we're hydrating.\n ) {\n // We're done.\n bubbleProperties(workInProgress);\n return null;\n }\n } else if ( // The time it took to render last row is greater than the remaining\n // time we have to render. So rendering one more row would likely\n // exceed it.\n now() * 2 - renderState.renderingStartTime > getRenderTargetTime() && renderLanes !== OffscreenLane) {\n // We have now passed our CPU deadline and we'll just give up further\n // attempts to render the main content and only render fallbacks.\n // The assumption is that this is usually faster.\n workInProgress.flags |= DidCapture;\n didSuspendAlready = true;\n cutOffTailIfNeeded(renderState, false); // Since nothing actually suspended, there will nothing to ping this\n // to get it started back up to attempt the next item. While in terms\n // of priority this work has the same priority as this current render,\n // it's not part of the same transition once the transition has\n // committed. If it's sync, we still want to yield so that it can be\n // painted. Conceptually, this is really the same as pinging.\n // We can use any RetryLane even if it's the one currently rendering\n // since we're leaving it behind on this node.\n\n workInProgress.lanes = SomeRetryLane;\n }\n }\n\n if (renderState.isBackwards) {\n // The effect list of the backwards tail will have been added\n // to the end. This breaks the guarantee that life-cycles fire in\n // sibling order but that isn't a strong guarantee promised by React.\n // Especially since these might also just pop in during future commits.\n // Append to the beginning of the list.\n renderedTail.sibling = workInProgress.child;\n workInProgress.child = renderedTail;\n } else {\n var previousSibling = renderState.last;\n\n if (previousSibling !== null) {\n previousSibling.sibling = renderedTail;\n } else {\n workInProgress.child = renderedTail;\n }\n\n renderState.last = renderedTail;\n }\n }\n\n if (renderState.tail !== null) {\n // We still have tail rows to render.\n // Pop a row.\n var next = renderState.tail;\n renderState.rendering = next;\n renderState.tail = next.sibling;\n renderState.renderingStartTime = now();\n next.sibling = null; // Restore the context.\n // TODO: We can probably just avoid popping it instead and only\n // setting it the first time we go from not suspended to suspended.\n\n var suspenseContext = suspenseStackCursor.current;\n\n if (didSuspendAlready) {\n suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);\n } else {\n suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);\n }\n\n pushSuspenseContext(workInProgress, suspenseContext); // Do a pass over the next row.\n // Don't bubble properties in this case.\n\n return next;\n }\n\n bubbleProperties(workInProgress);\n return null;\n }\n\n case ScopeComponent:\n {\n\n break;\n }\n\n case OffscreenComponent:\n case LegacyHiddenComponent:\n {\n popRenderLanes(workInProgress);\n var _nextState = workInProgress.memoizedState;\n var nextIsHidden = _nextState !== null;\n\n if (current !== null) {\n var _prevState = current.memoizedState;\n var prevIsHidden = _prevState !== null;\n\n if (prevIsHidden !== nextIsHidden && ( // LegacyHidden doesn't do any hiding — it only pre-renders.\n !enableLegacyHidden )) {\n workInProgress.flags |= Visibility;\n }\n }\n\n if (!nextIsHidden || (workInProgress.mode & ConcurrentMode) === NoMode) {\n bubbleProperties(workInProgress);\n } else {\n // Don't bubble properties for hidden children unless we're rendering\n // at offscreen priority.\n if (includesSomeLane(subtreeRenderLanes, OffscreenLane)) {\n bubbleProperties(workInProgress);\n\n {\n // Check if there was an insertion or update in the hidden subtree.\n // If so, we need to hide those nodes in the commit phase, so\n // schedule a visibility effect.\n if ( workInProgress.subtreeFlags & (Placement | Update)) {\n workInProgress.flags |= Visibility;\n }\n }\n }\n }\n return null;\n }\n\n case CacheComponent:\n {\n\n return null;\n }\n\n case TracingMarkerComponent:\n {\n\n return null;\n }\n }\n\n throw new Error(\"Unknown unit of work tag (\" + workInProgress.tag + \"). This error is likely caused by a bug in \" + 'React. Please file an issue.');\n}\n\nfunction unwindWork(current, workInProgress, renderLanes) {\n // Note: This intentionally doesn't check if we're hydrating because comparing\n // to the current tree provider fiber is just as fast and less error-prone.\n // Ideally we would have a special version of the work loop only\n // for hydration.\n popTreeContext(workInProgress);\n\n switch (workInProgress.tag) {\n case ClassComponent:\n {\n var Component = workInProgress.type;\n\n if (isContextProvider(Component)) {\n popContext(workInProgress);\n }\n\n var flags = workInProgress.flags;\n\n if (flags & ShouldCapture) {\n workInProgress.flags = flags & ~ShouldCapture | DidCapture;\n\n if ( (workInProgress.mode & ProfileMode) !== NoMode) {\n transferActualDuration(workInProgress);\n }\n\n return workInProgress;\n }\n\n return null;\n }\n\n case HostRoot:\n {\n var root = workInProgress.stateNode;\n popHostContainer(workInProgress);\n popTopLevelContextObject(workInProgress);\n resetWorkInProgressVersions();\n var _flags = workInProgress.flags;\n\n if ((_flags & ShouldCapture) !== NoFlags && (_flags & DidCapture) === NoFlags) {\n // There was an error during render that wasn't captured by a suspense\n // boundary. Do a second pass on the root to unmount the children.\n workInProgress.flags = _flags & ~ShouldCapture | DidCapture;\n return workInProgress;\n } // We unwound to the root without completing it. Exit.\n\n\n return null;\n }\n\n case HostComponent:\n {\n // TODO: popHydrationState\n popHostContext(workInProgress);\n return null;\n }\n\n case SuspenseComponent:\n {\n popSuspenseContext(workInProgress);\n var suspenseState = workInProgress.memoizedState;\n\n if (suspenseState !== null && suspenseState.dehydrated !== null) {\n if (workInProgress.alternate === null) {\n throw new Error('Threw in newly mounted dehydrated component. This is likely a bug in ' + 'React. Please file an issue.');\n }\n\n resetHydrationState();\n }\n\n var _flags2 = workInProgress.flags;\n\n if (_flags2 & ShouldCapture) {\n workInProgress.flags = _flags2 & ~ShouldCapture | DidCapture; // Captured a suspense effect. Re-render the boundary.\n\n if ( (workInProgress.mode & ProfileMode) !== NoMode) {\n transferActualDuration(workInProgress);\n }\n\n return workInProgress;\n }\n\n return null;\n }\n\n case SuspenseListComponent:\n {\n popSuspenseContext(workInProgress); // SuspenseList doesn't actually catch anything. It should've been\n // caught by a nested boundary. If not, it should bubble through.\n\n return null;\n }\n\n case HostPortal:\n popHostContainer(workInProgress);\n return null;\n\n case ContextProvider:\n var context = workInProgress.type._context;\n popProvider(context, workInProgress);\n return null;\n\n case OffscreenComponent:\n case LegacyHiddenComponent:\n popRenderLanes(workInProgress);\n return null;\n\n case CacheComponent:\n\n return null;\n\n default:\n return null;\n }\n}\n\nfunction unwindInterruptedWork(current, interruptedWork, renderLanes) {\n // Note: This intentionally doesn't check if we're hydrating because comparing\n // to the current tree provider fiber is just as fast and less error-prone.\n // Ideally we would have a special version of the work loop only\n // for hydration.\n popTreeContext(interruptedWork);\n\n switch (interruptedWork.tag) {\n case ClassComponent:\n {\n var childContextTypes = interruptedWork.type.childContextTypes;\n\n if (childContextTypes !== null && childContextTypes !== undefined) {\n popContext(interruptedWork);\n }\n\n break;\n }\n\n case HostRoot:\n {\n var root = interruptedWork.stateNode;\n popHostContainer(interruptedWork);\n popTopLevelContextObject(interruptedWork);\n resetWorkInProgressVersions();\n break;\n }\n\n case HostComponent:\n {\n popHostContext(interruptedWork);\n break;\n }\n\n case HostPortal:\n popHostContainer(interruptedWork);\n break;\n\n case SuspenseComponent:\n popSuspenseContext(interruptedWork);\n break;\n\n case SuspenseListComponent:\n popSuspenseContext(interruptedWork);\n break;\n\n case ContextProvider:\n var context = interruptedWork.type._context;\n popProvider(context, interruptedWork);\n break;\n\n case OffscreenComponent:\n case LegacyHiddenComponent:\n popRenderLanes(interruptedWork);\n break;\n }\n}\n\nvar didWarnAboutUndefinedSnapshotBeforeUpdate = null;\n\n{\n didWarnAboutUndefinedSnapshotBeforeUpdate = new Set();\n} // Used during the commit phase to track the state of the Offscreen component stack.\n// Allows us to avoid traversing the return path to find the nearest Offscreen ancestor.\n// Only used when enableSuspenseLayoutEffectSemantics is enabled.\n\n\nvar offscreenSubtreeIsHidden = false;\nvar offscreenSubtreeWasHidden = false;\nvar PossiblyWeakSet = typeof WeakSet === 'function' ? WeakSet : Set;\nvar nextEffect = null; // Used for Profiling builds to track updaters.\n\nvar inProgressLanes = null;\nvar inProgressRoot = null;\nfunction reportUncaughtErrorInDEV(error) {\n // Wrapping each small part of the commit phase into a guarded\n // callback is a bit too slow (https://github.com/facebook/react/pull/21666).\n // But we rely on it to surface errors to DEV tools like overlays\n // (https://github.com/facebook/react/issues/21712).\n // As a compromise, rethrow only caught errors in a guard.\n {\n invokeGuardedCallback(null, function () {\n throw error;\n });\n clearCaughtError();\n }\n}\n\nvar callComponentWillUnmountWithTimer = function (current, instance) {\n instance.props = current.memoizedProps;\n instance.state = current.memoizedState;\n\n if ( current.mode & ProfileMode) {\n try {\n startLayoutEffectTimer();\n instance.componentWillUnmount();\n } finally {\n recordLayoutEffectDuration(current);\n }\n } else {\n instance.componentWillUnmount();\n }\n}; // Capture errors so they don't interrupt mounting.\n\n\nfunction safelyCallCommitHookLayoutEffectListMount(current, nearestMountedAncestor) {\n try {\n commitHookEffectListMount(Layout, current);\n } catch (error) {\n captureCommitPhaseError(current, nearestMountedAncestor, error);\n }\n} // Capture errors so they don't interrupt unmounting.\n\n\nfunction safelyCallComponentWillUnmount(current, nearestMountedAncestor, instance) {\n try {\n callComponentWillUnmountWithTimer(current, instance);\n } catch (error) {\n captureCommitPhaseError(current, nearestMountedAncestor, error);\n }\n} // Capture errors so they don't interrupt mounting.\n\n\nfunction safelyCallComponentDidMount(current, nearestMountedAncestor, instance) {\n try {\n instance.componentDidMount();\n } catch (error) {\n captureCommitPhaseError(current, nearestMountedAncestor, error);\n }\n} // Capture errors so they don't interrupt mounting.\n\n\nfunction safelyAttachRef(current, nearestMountedAncestor) {\n try {\n commitAttachRef(current);\n } catch (error) {\n captureCommitPhaseError(current, nearestMountedAncestor, error);\n }\n}\n\nfunction safelyDetachRef(current, nearestMountedAncestor) {\n var ref = current.ref;\n\n if (ref !== null) {\n if (typeof ref === 'function') {\n var retVal;\n\n try {\n if (enableProfilerTimer && enableProfilerCommitHooks && current.mode & ProfileMode) {\n try {\n startLayoutEffectTimer();\n retVal = ref(null);\n } finally {\n recordLayoutEffectDuration(current);\n }\n } else {\n retVal = ref(null);\n }\n } catch (error) {\n captureCommitPhaseError(current, nearestMountedAncestor, error);\n }\n\n {\n if (typeof retVal === 'function') {\n error('Unexpected return value from a callback ref in %s. ' + 'A callback ref should not return a function.', getComponentNameFromFiber(current));\n }\n }\n } else {\n ref.current = null;\n }\n }\n}\n\nfunction safelyCallDestroy(current, nearestMountedAncestor, destroy) {\n try {\n destroy();\n } catch (error) {\n captureCommitPhaseError(current, nearestMountedAncestor, error);\n }\n}\n\nvar focusedInstanceHandle = null;\nvar shouldFireAfterActiveInstanceBlur = false;\nfunction commitBeforeMutationEffects(root, firstChild) {\n focusedInstanceHandle = prepareForCommit(root.containerInfo);\n nextEffect = firstChild;\n commitBeforeMutationEffects_begin(); // We no longer need to track the active instance fiber\n\n var shouldFire = shouldFireAfterActiveInstanceBlur;\n shouldFireAfterActiveInstanceBlur = false;\n focusedInstanceHandle = null;\n return shouldFire;\n}\n\nfunction commitBeforeMutationEffects_begin() {\n while (nextEffect !== null) {\n var fiber = nextEffect; // This phase is only used for beforeActiveInstanceBlur.\n\n var child = fiber.child;\n\n if ((fiber.subtreeFlags & BeforeMutationMask) !== NoFlags && child !== null) {\n child.return = fiber;\n nextEffect = child;\n } else {\n commitBeforeMutationEffects_complete();\n }\n }\n}\n\nfunction commitBeforeMutationEffects_complete() {\n while (nextEffect !== null) {\n var fiber = nextEffect;\n setCurrentFiber(fiber);\n\n try {\n commitBeforeMutationEffectsOnFiber(fiber);\n } catch (error) {\n captureCommitPhaseError(fiber, fiber.return, error);\n }\n\n resetCurrentFiber();\n var sibling = fiber.sibling;\n\n if (sibling !== null) {\n sibling.return = fiber.return;\n nextEffect = sibling;\n return;\n }\n\n nextEffect = fiber.return;\n }\n}\n\nfunction commitBeforeMutationEffectsOnFiber(finishedWork) {\n var current = finishedWork.alternate;\n var flags = finishedWork.flags;\n\n if ((flags & Snapshot) !== NoFlags) {\n setCurrentFiber(finishedWork);\n\n switch (finishedWork.tag) {\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n break;\n }\n\n case ClassComponent:\n {\n if (current !== null) {\n var prevProps = current.memoizedProps;\n var prevState = current.memoizedState;\n var instance = finishedWork.stateNode; // We could update instance props and state here,\n // but instead we rely on them being set during last render.\n // TODO: revisit this when we implement resuming.\n\n {\n if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {\n if (instance.props !== finishedWork.memoizedProps) {\n error('Expected %s props to match memoized props before ' + 'getSnapshotBeforeUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentNameFromFiber(finishedWork) || 'instance');\n }\n\n if (instance.state !== finishedWork.memoizedState) {\n error('Expected %s state to match memoized state before ' + 'getSnapshotBeforeUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.state`. ' + 'Please file an issue.', getComponentNameFromFiber(finishedWork) || 'instance');\n }\n }\n }\n\n var snapshot = instance.getSnapshotBeforeUpdate(finishedWork.elementType === finishedWork.type ? prevProps : resolveDefaultProps(finishedWork.type, prevProps), prevState);\n\n {\n var didWarnSet = didWarnAboutUndefinedSnapshotBeforeUpdate;\n\n if (snapshot === undefined && !didWarnSet.has(finishedWork.type)) {\n didWarnSet.add(finishedWork.type);\n\n error('%s.getSnapshotBeforeUpdate(): A snapshot value (or null) ' + 'must be returned. You have returned undefined.', getComponentNameFromFiber(finishedWork));\n }\n }\n\n instance.__reactInternalSnapshotBeforeUpdate = snapshot;\n }\n\n break;\n }\n\n case HostRoot:\n {\n {\n var root = finishedWork.stateNode;\n clearContainer(root.containerInfo);\n }\n\n break;\n }\n\n case HostComponent:\n case HostText:\n case HostPortal:\n case IncompleteClassComponent:\n // Nothing to do for these component types\n break;\n\n default:\n {\n throw new Error('This unit of work tag should not have side-effects. This error is ' + 'likely caused by a bug in React. Please file an issue.');\n }\n }\n\n resetCurrentFiber();\n }\n}\n\nfunction commitHookEffectListUnmount(flags, finishedWork, nearestMountedAncestor) {\n var updateQueue = finishedWork.updateQueue;\n var lastEffect = updateQueue !== null ? updateQueue.lastEffect : null;\n\n if (lastEffect !== null) {\n var firstEffect = lastEffect.next;\n var effect = firstEffect;\n\n do {\n if ((effect.tag & flags) === flags) {\n // Unmount\n var destroy = effect.destroy;\n effect.destroy = undefined;\n\n if (destroy !== undefined) {\n {\n if ((flags & Passive$1) !== NoFlags$1) {\n markComponentPassiveEffectUnmountStarted(finishedWork);\n } else if ((flags & Layout) !== NoFlags$1) {\n markComponentLayoutEffectUnmountStarted(finishedWork);\n }\n }\n\n {\n if ((flags & Insertion) !== NoFlags$1) {\n setIsRunningInsertionEffect(true);\n }\n }\n\n safelyCallDestroy(finishedWork, nearestMountedAncestor, destroy);\n\n {\n if ((flags & Insertion) !== NoFlags$1) {\n setIsRunningInsertionEffect(false);\n }\n }\n\n {\n if ((flags & Passive$1) !== NoFlags$1) {\n markComponentPassiveEffectUnmountStopped();\n } else if ((flags & Layout) !== NoFlags$1) {\n markComponentLayoutEffectUnmountStopped();\n }\n }\n }\n }\n\n effect = effect.next;\n } while (effect !== firstEffect);\n }\n}\n\nfunction commitHookEffectListMount(flags, finishedWork) {\n var updateQueue = finishedWork.updateQueue;\n var lastEffect = updateQueue !== null ? updateQueue.lastEffect : null;\n\n if (lastEffect !== null) {\n var firstEffect = lastEffect.next;\n var effect = firstEffect;\n\n do {\n if ((effect.tag & flags) === flags) {\n {\n if ((flags & Passive$1) !== NoFlags$1) {\n markComponentPassiveEffectMountStarted(finishedWork);\n } else if ((flags & Layout) !== NoFlags$1) {\n markComponentLayoutEffectMountStarted(finishedWork);\n }\n } // Mount\n\n\n var create = effect.create;\n\n {\n if ((flags & Insertion) !== NoFlags$1) {\n setIsRunningInsertionEffect(true);\n }\n }\n\n effect.destroy = create();\n\n {\n if ((flags & Insertion) !== NoFlags$1) {\n setIsRunningInsertionEffect(false);\n }\n }\n\n {\n if ((flags & Passive$1) !== NoFlags$1) {\n markComponentPassiveEffectMountStopped();\n } else if ((flags & Layout) !== NoFlags$1) {\n markComponentLayoutEffectMountStopped();\n }\n }\n\n {\n var destroy = effect.destroy;\n\n if (destroy !== undefined && typeof destroy !== 'function') {\n var hookName = void 0;\n\n if ((effect.tag & Layout) !== NoFlags) {\n hookName = 'useLayoutEffect';\n } else if ((effect.tag & Insertion) !== NoFlags) {\n hookName = 'useInsertionEffect';\n } else {\n hookName = 'useEffect';\n }\n\n var addendum = void 0;\n\n if (destroy === null) {\n addendum = ' You returned null. If your effect does not require clean ' + 'up, return undefined (or nothing).';\n } else if (typeof destroy.then === 'function') {\n addendum = '\\n\\nIt looks like you wrote ' + hookName + '(async () => ...) or returned a Promise. ' + 'Instead, write the async function inside your effect ' + 'and call it immediately:\\n\\n' + hookName + '(() => {\\n' + ' async function fetchData() {\\n' + ' // You can await here\\n' + ' const response = await MyAPI.getData(someId);\\n' + ' // ...\\n' + ' }\\n' + ' fetchData();\\n' + \"}, [someId]); // Or [] if effect doesn't need props or state\\n\\n\" + 'Learn more about data fetching with Hooks: https://reactjs.org/link/hooks-data-fetching';\n } else {\n addendum = ' You returned: ' + destroy;\n }\n\n error('%s must not return anything besides a function, ' + 'which is used for clean-up.%s', hookName, addendum);\n }\n }\n }\n\n effect = effect.next;\n } while (effect !== firstEffect);\n }\n}\n\nfunction commitPassiveEffectDurations(finishedRoot, finishedWork) {\n {\n // Only Profilers with work in their subtree will have an Update effect scheduled.\n if ((finishedWork.flags & Update) !== NoFlags) {\n switch (finishedWork.tag) {\n case Profiler:\n {\n var passiveEffectDuration = finishedWork.stateNode.passiveEffectDuration;\n var _finishedWork$memoize = finishedWork.memoizedProps,\n id = _finishedWork$memoize.id,\n onPostCommit = _finishedWork$memoize.onPostCommit; // This value will still reflect the previous commit phase.\n // It does not get reset until the start of the next commit phase.\n\n var commitTime = getCommitTime();\n var phase = finishedWork.alternate === null ? 'mount' : 'update';\n\n {\n if (isCurrentUpdateNested()) {\n phase = 'nested-update';\n }\n }\n\n if (typeof onPostCommit === 'function') {\n onPostCommit(id, phase, passiveEffectDuration, commitTime);\n } // Bubble times to the next nearest ancestor Profiler.\n // After we process that Profiler, we'll bubble further up.\n\n\n var parentFiber = finishedWork.return;\n\n outer: while (parentFiber !== null) {\n switch (parentFiber.tag) {\n case HostRoot:\n var root = parentFiber.stateNode;\n root.passiveEffectDuration += passiveEffectDuration;\n break outer;\n\n case Profiler:\n var parentStateNode = parentFiber.stateNode;\n parentStateNode.passiveEffectDuration += passiveEffectDuration;\n break outer;\n }\n\n parentFiber = parentFiber.return;\n }\n\n break;\n }\n }\n }\n }\n}\n\nfunction commitLayoutEffectOnFiber(finishedRoot, current, finishedWork, committedLanes) {\n if ((finishedWork.flags & LayoutMask) !== NoFlags) {\n switch (finishedWork.tag) {\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n if ( !offscreenSubtreeWasHidden) {\n // At this point layout effects have already been destroyed (during mutation phase).\n // This is done to prevent sibling component effects from interfering with each other,\n // e.g. a destroy function in one component should never override a ref set\n // by a create function in another component during the same commit.\n if ( finishedWork.mode & ProfileMode) {\n try {\n startLayoutEffectTimer();\n commitHookEffectListMount(Layout | HasEffect, finishedWork);\n } finally {\n recordLayoutEffectDuration(finishedWork);\n }\n } else {\n commitHookEffectListMount(Layout | HasEffect, finishedWork);\n }\n }\n\n break;\n }\n\n case ClassComponent:\n {\n var instance = finishedWork.stateNode;\n\n if (finishedWork.flags & Update) {\n if (!offscreenSubtreeWasHidden) {\n if (current === null) {\n // We could update instance props and state here,\n // but instead we rely on them being set during last render.\n // TODO: revisit this when we implement resuming.\n {\n if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {\n if (instance.props !== finishedWork.memoizedProps) {\n error('Expected %s props to match memoized props before ' + 'componentDidMount. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentNameFromFiber(finishedWork) || 'instance');\n }\n\n if (instance.state !== finishedWork.memoizedState) {\n error('Expected %s state to match memoized state before ' + 'componentDidMount. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.state`. ' + 'Please file an issue.', getComponentNameFromFiber(finishedWork) || 'instance');\n }\n }\n }\n\n if ( finishedWork.mode & ProfileMode) {\n try {\n startLayoutEffectTimer();\n instance.componentDidMount();\n } finally {\n recordLayoutEffectDuration(finishedWork);\n }\n } else {\n instance.componentDidMount();\n }\n } else {\n var prevProps = finishedWork.elementType === finishedWork.type ? current.memoizedProps : resolveDefaultProps(finishedWork.type, current.memoizedProps);\n var prevState = current.memoizedState; // We could update instance props and state here,\n // but instead we rely on them being set during last render.\n // TODO: revisit this when we implement resuming.\n\n {\n if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {\n if (instance.props !== finishedWork.memoizedProps) {\n error('Expected %s props to match memoized props before ' + 'componentDidUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentNameFromFiber(finishedWork) || 'instance');\n }\n\n if (instance.state !== finishedWork.memoizedState) {\n error('Expected %s state to match memoized state before ' + 'componentDidUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.state`. ' + 'Please file an issue.', getComponentNameFromFiber(finishedWork) || 'instance');\n }\n }\n }\n\n if ( finishedWork.mode & ProfileMode) {\n try {\n startLayoutEffectTimer();\n instance.componentDidUpdate(prevProps, prevState, instance.__reactInternalSnapshotBeforeUpdate);\n } finally {\n recordLayoutEffectDuration(finishedWork);\n }\n } else {\n instance.componentDidUpdate(prevProps, prevState, instance.__reactInternalSnapshotBeforeUpdate);\n }\n }\n }\n } // TODO: I think this is now always non-null by the time it reaches the\n // commit phase. Consider removing the type check.\n\n\n var updateQueue = finishedWork.updateQueue;\n\n if (updateQueue !== null) {\n {\n if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {\n if (instance.props !== finishedWork.memoizedProps) {\n error('Expected %s props to match memoized props before ' + 'processing the update queue. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentNameFromFiber(finishedWork) || 'instance');\n }\n\n if (instance.state !== finishedWork.memoizedState) {\n error('Expected %s state to match memoized state before ' + 'processing the update queue. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.state`. ' + 'Please file an issue.', getComponentNameFromFiber(finishedWork) || 'instance');\n }\n }\n } // We could update instance props and state here,\n // but instead we rely on them being set during last render.\n // TODO: revisit this when we implement resuming.\n\n\n commitUpdateQueue(finishedWork, updateQueue, instance);\n }\n\n break;\n }\n\n case HostRoot:\n {\n // TODO: I think this is now always non-null by the time it reaches the\n // commit phase. Consider removing the type check.\n var _updateQueue = finishedWork.updateQueue;\n\n if (_updateQueue !== null) {\n var _instance = null;\n\n if (finishedWork.child !== null) {\n switch (finishedWork.child.tag) {\n case HostComponent:\n _instance = getPublicInstance(finishedWork.child.stateNode);\n break;\n\n case ClassComponent:\n _instance = finishedWork.child.stateNode;\n break;\n }\n }\n\n commitUpdateQueue(finishedWork, _updateQueue, _instance);\n }\n\n break;\n }\n\n case HostComponent:\n {\n var _instance2 = finishedWork.stateNode; // Renderers may schedule work to be done after host components are mounted\n // (eg DOM renderer may schedule auto-focus for inputs and form controls).\n // These effects should only be committed when components are first mounted,\n // aka when there is no current/alternate.\n\n if (current === null && finishedWork.flags & Update) {\n var type = finishedWork.type;\n var props = finishedWork.memoizedProps;\n commitMount(_instance2, type, props);\n }\n\n break;\n }\n\n case HostText:\n {\n // We have no life-cycles associated with text.\n break;\n }\n\n case HostPortal:\n {\n // We have no life-cycles associated with portals.\n break;\n }\n\n case Profiler:\n {\n {\n var _finishedWork$memoize2 = finishedWork.memoizedProps,\n onCommit = _finishedWork$memoize2.onCommit,\n onRender = _finishedWork$memoize2.onRender;\n var effectDuration = finishedWork.stateNode.effectDuration;\n var commitTime = getCommitTime();\n var phase = current === null ? 'mount' : 'update';\n\n {\n if (isCurrentUpdateNested()) {\n phase = 'nested-update';\n }\n }\n\n if (typeof onRender === 'function') {\n onRender(finishedWork.memoizedProps.id, phase, finishedWork.actualDuration, finishedWork.treeBaseDuration, finishedWork.actualStartTime, commitTime);\n }\n\n {\n if (typeof onCommit === 'function') {\n onCommit(finishedWork.memoizedProps.id, phase, effectDuration, commitTime);\n } // Schedule a passive effect for this Profiler to call onPostCommit hooks.\n // This effect should be scheduled even if there is no onPostCommit callback for this Profiler,\n // because the effect is also where times bubble to parent Profilers.\n\n\n enqueuePendingPassiveProfilerEffect(finishedWork); // Propagate layout effect durations to the next nearest Profiler ancestor.\n // Do not reset these values until the next render so DevTools has a chance to read them first.\n\n var parentFiber = finishedWork.return;\n\n outer: while (parentFiber !== null) {\n switch (parentFiber.tag) {\n case HostRoot:\n var root = parentFiber.stateNode;\n root.effectDuration += effectDuration;\n break outer;\n\n case Profiler:\n var parentStateNode = parentFiber.stateNode;\n parentStateNode.effectDuration += effectDuration;\n break outer;\n }\n\n parentFiber = parentFiber.return;\n }\n }\n }\n\n break;\n }\n\n case SuspenseComponent:\n {\n commitSuspenseHydrationCallbacks(finishedRoot, finishedWork);\n break;\n }\n\n case SuspenseListComponent:\n case IncompleteClassComponent:\n case ScopeComponent:\n case OffscreenComponent:\n case LegacyHiddenComponent:\n case TracingMarkerComponent:\n {\n break;\n }\n\n default:\n throw new Error('This unit of work tag should not have side-effects. This error is ' + 'likely caused by a bug in React. Please file an issue.');\n }\n }\n\n if ( !offscreenSubtreeWasHidden) {\n {\n if (finishedWork.flags & Ref) {\n commitAttachRef(finishedWork);\n }\n }\n }\n}\n\nfunction reappearLayoutEffectsOnFiber(node) {\n // Turn on layout effects in a tree that previously disappeared.\n // TODO (Offscreen) Check: flags & LayoutStatic\n switch (node.tag) {\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n if ( node.mode & ProfileMode) {\n try {\n startLayoutEffectTimer();\n safelyCallCommitHookLayoutEffectListMount(node, node.return);\n } finally {\n recordLayoutEffectDuration(node);\n }\n } else {\n safelyCallCommitHookLayoutEffectListMount(node, node.return);\n }\n\n break;\n }\n\n case ClassComponent:\n {\n var instance = node.stateNode;\n\n if (typeof instance.componentDidMount === 'function') {\n safelyCallComponentDidMount(node, node.return, instance);\n }\n\n safelyAttachRef(node, node.return);\n break;\n }\n\n case HostComponent:\n {\n safelyAttachRef(node, node.return);\n break;\n }\n }\n}\n\nfunction hideOrUnhideAllChildren(finishedWork, isHidden) {\n // Only hide or unhide the top-most host nodes.\n var hostSubtreeRoot = null;\n\n {\n // We only have the top Fiber that was inserted but we need to recurse down its\n // children to find all the terminal nodes.\n var node = finishedWork;\n\n while (true) {\n if (node.tag === HostComponent) {\n if (hostSubtreeRoot === null) {\n hostSubtreeRoot = node;\n\n try {\n var instance = node.stateNode;\n\n if (isHidden) {\n hideInstance(instance);\n } else {\n unhideInstance(node.stateNode, node.memoizedProps);\n }\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n }\n } else if (node.tag === HostText) {\n if (hostSubtreeRoot === null) {\n try {\n var _instance3 = node.stateNode;\n\n if (isHidden) {\n hideTextInstance(_instance3);\n } else {\n unhideTextInstance(_instance3, node.memoizedProps);\n }\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n }\n } else if ((node.tag === OffscreenComponent || node.tag === LegacyHiddenComponent) && node.memoizedState !== null && node !== finishedWork) ; else if (node.child !== null) {\n node.child.return = node;\n node = node.child;\n continue;\n }\n\n if (node === finishedWork) {\n return;\n }\n\n while (node.sibling === null) {\n if (node.return === null || node.return === finishedWork) {\n return;\n }\n\n if (hostSubtreeRoot === node) {\n hostSubtreeRoot = null;\n }\n\n node = node.return;\n }\n\n if (hostSubtreeRoot === node) {\n hostSubtreeRoot = null;\n }\n\n node.sibling.return = node.return;\n node = node.sibling;\n }\n }\n}\n\nfunction commitAttachRef(finishedWork) {\n var ref = finishedWork.ref;\n\n if (ref !== null) {\n var instance = finishedWork.stateNode;\n var instanceToUse;\n\n switch (finishedWork.tag) {\n case HostComponent:\n instanceToUse = getPublicInstance(instance);\n break;\n\n default:\n instanceToUse = instance;\n } // Moved outside to ensure DCE works with this flag\n\n if (typeof ref === 'function') {\n var retVal;\n\n if ( finishedWork.mode & ProfileMode) {\n try {\n startLayoutEffectTimer();\n retVal = ref(instanceToUse);\n } finally {\n recordLayoutEffectDuration(finishedWork);\n }\n } else {\n retVal = ref(instanceToUse);\n }\n\n {\n if (typeof retVal === 'function') {\n error('Unexpected return value from a callback ref in %s. ' + 'A callback ref should not return a function.', getComponentNameFromFiber(finishedWork));\n }\n }\n } else {\n {\n if (!ref.hasOwnProperty('current')) {\n error('Unexpected ref object provided for %s. ' + 'Use either a ref-setter function or React.createRef().', getComponentNameFromFiber(finishedWork));\n }\n }\n\n ref.current = instanceToUse;\n }\n }\n}\n\nfunction detachFiberMutation(fiber) {\n // Cut off the return pointer to disconnect it from the tree.\n // This enables us to detect and warn against state updates on an unmounted component.\n // It also prevents events from bubbling from within disconnected components.\n //\n // Ideally, we should also clear the child pointer of the parent alternate to let this\n // get GC:ed but we don't know which for sure which parent is the current\n // one so we'll settle for GC:ing the subtree of this child.\n // This child itself will be GC:ed when the parent updates the next time.\n //\n // Note that we can't clear child or sibling pointers yet.\n // They're needed for passive effects and for findDOMNode.\n // We defer those fields, and all other cleanup, to the passive phase (see detachFiberAfterEffects).\n //\n // Don't reset the alternate yet, either. We need that so we can detach the\n // alternate's fields in the passive phase. Clearing the return pointer is\n // sufficient for findDOMNode semantics.\n var alternate = fiber.alternate;\n\n if (alternate !== null) {\n alternate.return = null;\n }\n\n fiber.return = null;\n}\n\nfunction detachFiberAfterEffects(fiber) {\n var alternate = fiber.alternate;\n\n if (alternate !== null) {\n fiber.alternate = null;\n detachFiberAfterEffects(alternate);\n } // Note: Defensively using negation instead of < in case\n // `deletedTreeCleanUpLevel` is undefined.\n\n\n {\n // Clear cyclical Fiber fields. This level alone is designed to roughly\n // approximate the planned Fiber refactor. In that world, `setState` will be\n // bound to a special \"instance\" object instead of a Fiber. The Instance\n // object will not have any of these fields. It will only be connected to\n // the fiber tree via a single link at the root. So if this level alone is\n // sufficient to fix memory issues, that bodes well for our plans.\n fiber.child = null;\n fiber.deletions = null;\n fiber.sibling = null; // The `stateNode` is cyclical because on host nodes it points to the host\n // tree, which has its own pointers to children, parents, and siblings.\n // The other host nodes also point back to fibers, so we should detach that\n // one, too.\n\n if (fiber.tag === HostComponent) {\n var hostInstance = fiber.stateNode;\n\n if (hostInstance !== null) {\n detachDeletedInstance(hostInstance);\n }\n }\n\n fiber.stateNode = null; // I'm intentionally not clearing the `return` field in this level. We\n // already disconnect the `return` pointer at the root of the deleted\n // subtree (in `detachFiberMutation`). Besides, `return` by itself is not\n // cyclical — it's only cyclical when combined with `child`, `sibling`, and\n // `alternate`. But we'll clear it in the next level anyway, just in case.\n\n {\n fiber._debugOwner = null;\n }\n\n {\n // Theoretically, nothing in here should be necessary, because we already\n // disconnected the fiber from the tree. So even if something leaks this\n // particular fiber, it won't leak anything else\n //\n // The purpose of this branch is to be super aggressive so we can measure\n // if there's any difference in memory impact. If there is, that could\n // indicate a React leak we don't know about.\n fiber.return = null;\n fiber.dependencies = null;\n fiber.memoizedProps = null;\n fiber.memoizedState = null;\n fiber.pendingProps = null;\n fiber.stateNode = null; // TODO: Move to `commitPassiveUnmountInsideDeletedTreeOnFiber` instead.\n\n fiber.updateQueue = null;\n }\n }\n}\n\nfunction getHostParentFiber(fiber) {\n var parent = fiber.return;\n\n while (parent !== null) {\n if (isHostParent(parent)) {\n return parent;\n }\n\n parent = parent.return;\n }\n\n throw new Error('Expected to find a host parent. This error is likely caused by a bug ' + 'in React. Please file an issue.');\n}\n\nfunction isHostParent(fiber) {\n return fiber.tag === HostComponent || fiber.tag === HostRoot || fiber.tag === HostPortal;\n}\n\nfunction getHostSibling(fiber) {\n // We're going to search forward into the tree until we find a sibling host\n // node. Unfortunately, if multiple insertions are done in a row we have to\n // search past them. This leads to exponential search for the next sibling.\n // TODO: Find a more efficient way to do this.\n var node = fiber;\n\n siblings: while (true) {\n // If we didn't find anything, let's try the next sibling.\n while (node.sibling === null) {\n if (node.return === null || isHostParent(node.return)) {\n // If we pop out of the root or hit the parent the fiber we are the\n // last sibling.\n return null;\n }\n\n node = node.return;\n }\n\n node.sibling.return = node.return;\n node = node.sibling;\n\n while (node.tag !== HostComponent && node.tag !== HostText && node.tag !== DehydratedFragment) {\n // If it is not host node and, we might have a host node inside it.\n // Try to search down until we find one.\n if (node.flags & Placement) {\n // If we don't have a child, try the siblings instead.\n continue siblings;\n } // If we don't have a child, try the siblings instead.\n // We also skip portals because they are not part of this host tree.\n\n\n if (node.child === null || node.tag === HostPortal) {\n continue siblings;\n } else {\n node.child.return = node;\n node = node.child;\n }\n } // Check if this host node is stable or about to be placed.\n\n\n if (!(node.flags & Placement)) {\n // Found it!\n return node.stateNode;\n }\n }\n}\n\nfunction commitPlacement(finishedWork) {\n\n\n var parentFiber = getHostParentFiber(finishedWork); // Note: these two variables *must* always be updated together.\n\n switch (parentFiber.tag) {\n case HostComponent:\n {\n var parent = parentFiber.stateNode;\n\n if (parentFiber.flags & ContentReset) {\n // Reset the text content of the parent before doing any insertions\n resetTextContent(parent); // Clear ContentReset from the effect tag\n\n parentFiber.flags &= ~ContentReset;\n }\n\n var before = getHostSibling(finishedWork); // We only have the top Fiber that was inserted but we need to recurse down its\n // children to find all the terminal nodes.\n\n insertOrAppendPlacementNode(finishedWork, before, parent);\n break;\n }\n\n case HostRoot:\n case HostPortal:\n {\n var _parent = parentFiber.stateNode.containerInfo;\n\n var _before = getHostSibling(finishedWork);\n\n insertOrAppendPlacementNodeIntoContainer(finishedWork, _before, _parent);\n break;\n }\n // eslint-disable-next-line-no-fallthrough\n\n default:\n throw new Error('Invalid host parent fiber. This error is likely caused by a bug ' + 'in React. Please file an issue.');\n }\n}\n\nfunction insertOrAppendPlacementNodeIntoContainer(node, before, parent) {\n var tag = node.tag;\n var isHost = tag === HostComponent || tag === HostText;\n\n if (isHost) {\n var stateNode = node.stateNode;\n\n if (before) {\n insertInContainerBefore(parent, stateNode, before);\n } else {\n appendChildToContainer(parent, stateNode);\n }\n } else if (tag === HostPortal) ; else {\n var child = node.child;\n\n if (child !== null) {\n insertOrAppendPlacementNodeIntoContainer(child, before, parent);\n var sibling = child.sibling;\n\n while (sibling !== null) {\n insertOrAppendPlacementNodeIntoContainer(sibling, before, parent);\n sibling = sibling.sibling;\n }\n }\n }\n}\n\nfunction insertOrAppendPlacementNode(node, before, parent) {\n var tag = node.tag;\n var isHost = tag === HostComponent || tag === HostText;\n\n if (isHost) {\n var stateNode = node.stateNode;\n\n if (before) {\n insertBefore(parent, stateNode, before);\n } else {\n appendChild(parent, stateNode);\n }\n } else if (tag === HostPortal) ; else {\n var child = node.child;\n\n if (child !== null) {\n insertOrAppendPlacementNode(child, before, parent);\n var sibling = child.sibling;\n\n while (sibling !== null) {\n insertOrAppendPlacementNode(sibling, before, parent);\n sibling = sibling.sibling;\n }\n }\n }\n} // These are tracked on the stack as we recursively traverse a\n// deleted subtree.\n// TODO: Update these during the whole mutation phase, not just during\n// a deletion.\n\n\nvar hostParent = null;\nvar hostParentIsContainer = false;\n\nfunction commitDeletionEffects(root, returnFiber, deletedFiber) {\n {\n // We only have the top Fiber that was deleted but we need to recurse down its\n // children to find all the terminal nodes.\n // Recursively delete all host nodes from the parent, detach refs, clean\n // up mounted layout effects, and call componentWillUnmount.\n // We only need to remove the topmost host child in each branch. But then we\n // still need to keep traversing to unmount effects, refs, and cWU. TODO: We\n // could split this into two separate traversals functions, where the second\n // one doesn't include any removeChild logic. This is maybe the same\n // function as \"disappearLayoutEffects\" (or whatever that turns into after\n // the layout phase is refactored to use recursion).\n // Before starting, find the nearest host parent on the stack so we know\n // which instance/container to remove the children from.\n // TODO: Instead of searching up the fiber return path on every deletion, we\n // can track the nearest host component on the JS stack as we traverse the\n // tree during the commit phase. This would make insertions faster, too.\n var parent = returnFiber;\n\n findParent: while (parent !== null) {\n switch (parent.tag) {\n case HostComponent:\n {\n hostParent = parent.stateNode;\n hostParentIsContainer = false;\n break findParent;\n }\n\n case HostRoot:\n {\n hostParent = parent.stateNode.containerInfo;\n hostParentIsContainer = true;\n break findParent;\n }\n\n case HostPortal:\n {\n hostParent = parent.stateNode.containerInfo;\n hostParentIsContainer = true;\n break findParent;\n }\n }\n\n parent = parent.return;\n }\n\n if (hostParent === null) {\n throw new Error('Expected to find a host parent. This error is likely caused by ' + 'a bug in React. Please file an issue.');\n }\n\n commitDeletionEffectsOnFiber(root, returnFiber, deletedFiber);\n hostParent = null;\n hostParentIsContainer = false;\n }\n\n detachFiberMutation(deletedFiber);\n}\n\nfunction recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, parent) {\n // TODO: Use a static flag to skip trees that don't have unmount effects\n var child = parent.child;\n\n while (child !== null) {\n commitDeletionEffectsOnFiber(finishedRoot, nearestMountedAncestor, child);\n child = child.sibling;\n }\n}\n\nfunction commitDeletionEffectsOnFiber(finishedRoot, nearestMountedAncestor, deletedFiber) {\n onCommitUnmount(deletedFiber); // The cases in this outer switch modify the stack before they traverse\n // into their subtree. There are simpler cases in the inner switch\n // that don't modify the stack.\n\n switch (deletedFiber.tag) {\n case HostComponent:\n {\n if (!offscreenSubtreeWasHidden) {\n safelyDetachRef(deletedFiber, nearestMountedAncestor);\n } // Intentional fallthrough to next branch\n\n }\n // eslint-disable-next-line-no-fallthrough\n\n case HostText:\n {\n // We only need to remove the nearest host child. Set the host parent\n // to `null` on the stack to indicate that nested children don't\n // need to be removed.\n {\n var prevHostParent = hostParent;\n var prevHostParentIsContainer = hostParentIsContainer;\n hostParent = null;\n recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber);\n hostParent = prevHostParent;\n hostParentIsContainer = prevHostParentIsContainer;\n\n if (hostParent !== null) {\n // Now that all the child effects have unmounted, we can remove the\n // node from the tree.\n if (hostParentIsContainer) {\n removeChildFromContainer(hostParent, deletedFiber.stateNode);\n } else {\n removeChild(hostParent, deletedFiber.stateNode);\n }\n }\n }\n\n return;\n }\n\n case DehydratedFragment:\n {\n // Delete the dehydrated suspense boundary and all of its content.\n\n\n {\n if (hostParent !== null) {\n if (hostParentIsContainer) {\n clearSuspenseBoundaryFromContainer(hostParent, deletedFiber.stateNode);\n } else {\n clearSuspenseBoundary(hostParent, deletedFiber.stateNode);\n }\n }\n }\n\n return;\n }\n\n case HostPortal:\n {\n {\n // When we go into a portal, it becomes the parent to remove from.\n var _prevHostParent = hostParent;\n var _prevHostParentIsContainer = hostParentIsContainer;\n hostParent = deletedFiber.stateNode.containerInfo;\n hostParentIsContainer = true;\n recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber);\n hostParent = _prevHostParent;\n hostParentIsContainer = _prevHostParentIsContainer;\n }\n\n return;\n }\n\n case FunctionComponent:\n case ForwardRef:\n case MemoComponent:\n case SimpleMemoComponent:\n {\n if (!offscreenSubtreeWasHidden) {\n var updateQueue = deletedFiber.updateQueue;\n\n if (updateQueue !== null) {\n var lastEffect = updateQueue.lastEffect;\n\n if (lastEffect !== null) {\n var firstEffect = lastEffect.next;\n var effect = firstEffect;\n\n do {\n var _effect = effect,\n destroy = _effect.destroy,\n tag = _effect.tag;\n\n if (destroy !== undefined) {\n if ((tag & Insertion) !== NoFlags$1) {\n safelyCallDestroy(deletedFiber, nearestMountedAncestor, destroy);\n } else if ((tag & Layout) !== NoFlags$1) {\n {\n markComponentLayoutEffectUnmountStarted(deletedFiber);\n }\n\n if ( deletedFiber.mode & ProfileMode) {\n startLayoutEffectTimer();\n safelyCallDestroy(deletedFiber, nearestMountedAncestor, destroy);\n recordLayoutEffectDuration(deletedFiber);\n } else {\n safelyCallDestroy(deletedFiber, nearestMountedAncestor, destroy);\n }\n\n {\n markComponentLayoutEffectUnmountStopped();\n }\n }\n }\n\n effect = effect.next;\n } while (effect !== firstEffect);\n }\n }\n }\n\n recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber);\n return;\n }\n\n case ClassComponent:\n {\n if (!offscreenSubtreeWasHidden) {\n safelyDetachRef(deletedFiber, nearestMountedAncestor);\n var instance = deletedFiber.stateNode;\n\n if (typeof instance.componentWillUnmount === 'function') {\n safelyCallComponentWillUnmount(deletedFiber, nearestMountedAncestor, instance);\n }\n }\n\n recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber);\n return;\n }\n\n case ScopeComponent:\n {\n\n recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber);\n return;\n }\n\n case OffscreenComponent:\n {\n if ( // TODO: Remove this dead flag\n deletedFiber.mode & ConcurrentMode) {\n // If this offscreen component is hidden, we already unmounted it. Before\n // deleting the children, track that it's already unmounted so that we\n // don't attempt to unmount the effects again.\n // TODO: If the tree is hidden, in most cases we should be able to skip\n // over the nested children entirely. An exception is we haven't yet found\n // the topmost host node to delete, which we already track on the stack.\n // But the other case is portals, which need to be detached no matter how\n // deeply they are nested. We should use a subtree flag to track whether a\n // subtree includes a nested portal.\n var prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden;\n offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden || deletedFiber.memoizedState !== null;\n recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber);\n offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden;\n } else {\n recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber);\n }\n\n break;\n }\n\n default:\n {\n recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber);\n return;\n }\n }\n}\n\nfunction commitSuspenseCallback(finishedWork) {\n // TODO: Move this to passive phase\n var newState = finishedWork.memoizedState;\n}\n\nfunction commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) {\n\n var newState = finishedWork.memoizedState;\n\n if (newState === null) {\n var current = finishedWork.alternate;\n\n if (current !== null) {\n var prevState = current.memoizedState;\n\n if (prevState !== null) {\n var suspenseInstance = prevState.dehydrated;\n\n if (suspenseInstance !== null) {\n commitHydratedSuspenseInstance(suspenseInstance);\n }\n }\n }\n }\n}\n\nfunction attachSuspenseRetryListeners(finishedWork) {\n // If this boundary just timed out, then it will have a set of wakeables.\n // For each wakeable, attach a listener so that when it resolves, React\n // attempts to re-render the boundary in the primary (pre-timeout) state.\n var wakeables = finishedWork.updateQueue;\n\n if (wakeables !== null) {\n finishedWork.updateQueue = null;\n var retryCache = finishedWork.stateNode;\n\n if (retryCache === null) {\n retryCache = finishedWork.stateNode = new PossiblyWeakSet();\n }\n\n wakeables.forEach(function (wakeable) {\n // Memoize using the boundary fiber to prevent redundant listeners.\n var retry = resolveRetryWakeable.bind(null, finishedWork, wakeable);\n\n if (!retryCache.has(wakeable)) {\n retryCache.add(wakeable);\n\n {\n if (isDevToolsPresent) {\n if (inProgressLanes !== null && inProgressRoot !== null) {\n // If we have pending work still, associate the original updaters with it.\n restorePendingUpdaters(inProgressRoot, inProgressLanes);\n } else {\n throw Error('Expected finished root and lanes to be set. This is a bug in React.');\n }\n }\n }\n\n wakeable.then(retry, retry);\n }\n });\n }\n} // This function detects when a Suspense boundary goes from visible to hidden.\nfunction commitMutationEffects(root, finishedWork, committedLanes) {\n inProgressLanes = committedLanes;\n inProgressRoot = root;\n setCurrentFiber(finishedWork);\n commitMutationEffectsOnFiber(finishedWork, root);\n setCurrentFiber(finishedWork);\n inProgressLanes = null;\n inProgressRoot = null;\n}\n\nfunction recursivelyTraverseMutationEffects(root, parentFiber, lanes) {\n // Deletions effects can be scheduled on any fiber type. They need to happen\n // before the children effects hae fired.\n var deletions = parentFiber.deletions;\n\n if (deletions !== null) {\n for (var i = 0; i < deletions.length; i++) {\n var childToDelete = deletions[i];\n\n try {\n commitDeletionEffects(root, parentFiber, childToDelete);\n } catch (error) {\n captureCommitPhaseError(childToDelete, parentFiber, error);\n }\n }\n }\n\n var prevDebugFiber = getCurrentFiber();\n\n if (parentFiber.subtreeFlags & MutationMask) {\n var child = parentFiber.child;\n\n while (child !== null) {\n setCurrentFiber(child);\n commitMutationEffectsOnFiber(child, root);\n child = child.sibling;\n }\n }\n\n setCurrentFiber(prevDebugFiber);\n}\n\nfunction commitMutationEffectsOnFiber(finishedWork, root, lanes) {\n var current = finishedWork.alternate;\n var flags = finishedWork.flags; // The effect flag should be checked *after* we refine the type of fiber,\n // because the fiber tag is more specific. An exception is any flag related\n // to reconcilation, because those can be set on all fiber types.\n\n switch (finishedWork.tag) {\n case FunctionComponent:\n case ForwardRef:\n case MemoComponent:\n case SimpleMemoComponent:\n {\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n\n if (flags & Update) {\n try {\n commitHookEffectListUnmount(Insertion | HasEffect, finishedWork, finishedWork.return);\n commitHookEffectListMount(Insertion | HasEffect, finishedWork);\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n } // Layout effects are destroyed during the mutation phase so that all\n // destroy functions for all fibers are called before any create functions.\n // This prevents sibling component effects from interfering with each other,\n // e.g. a destroy function in one component should never override a ref set\n // by a create function in another component during the same commit.\n\n\n if ( finishedWork.mode & ProfileMode) {\n try {\n startLayoutEffectTimer();\n commitHookEffectListUnmount(Layout | HasEffect, finishedWork, finishedWork.return);\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n\n recordLayoutEffectDuration(finishedWork);\n } else {\n try {\n commitHookEffectListUnmount(Layout | HasEffect, finishedWork, finishedWork.return);\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n }\n }\n\n return;\n }\n\n case ClassComponent:\n {\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n\n if (flags & Ref) {\n if (current !== null) {\n safelyDetachRef(current, current.return);\n }\n }\n\n return;\n }\n\n case HostComponent:\n {\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n\n if (flags & Ref) {\n if (current !== null) {\n safelyDetachRef(current, current.return);\n }\n }\n\n {\n // TODO: ContentReset gets cleared by the children during the commit\n // phase. This is a refactor hazard because it means we must read\n // flags the flags after `commitReconciliationEffects` has already run;\n // the order matters. We should refactor so that ContentReset does not\n // rely on mutating the flag during commit. Like by setting a flag\n // during the render phase instead.\n if (finishedWork.flags & ContentReset) {\n var instance = finishedWork.stateNode;\n\n try {\n resetTextContent(instance);\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n }\n\n if (flags & Update) {\n var _instance4 = finishedWork.stateNode;\n\n if (_instance4 != null) {\n // Commit the work prepared earlier.\n var newProps = finishedWork.memoizedProps; // For hydration we reuse the update path but we treat the oldProps\n // as the newProps. The updatePayload will contain the real change in\n // this case.\n\n var oldProps = current !== null ? current.memoizedProps : newProps;\n var type = finishedWork.type; // TODO: Type the updateQueue to be specific to host components.\n\n var updatePayload = finishedWork.updateQueue;\n finishedWork.updateQueue = null;\n\n if (updatePayload !== null) {\n try {\n commitUpdate(_instance4, updatePayload, type, oldProps, newProps, finishedWork);\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n }\n }\n }\n }\n\n return;\n }\n\n case HostText:\n {\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n\n if (flags & Update) {\n {\n if (finishedWork.stateNode === null) {\n throw new Error('This should have a text node initialized. This error is likely ' + 'caused by a bug in React. Please file an issue.');\n }\n\n var textInstance = finishedWork.stateNode;\n var newText = finishedWork.memoizedProps; // For hydration we reuse the update path but we treat the oldProps\n // as the newProps. The updatePayload will contain the real change in\n // this case.\n\n var oldText = current !== null ? current.memoizedProps : newText;\n\n try {\n commitTextUpdate(textInstance, oldText, newText);\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n }\n }\n\n return;\n }\n\n case HostRoot:\n {\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n\n if (flags & Update) {\n {\n if (current !== null) {\n var prevRootState = current.memoizedState;\n\n if (prevRootState.isDehydrated) {\n try {\n commitHydratedContainer(root.containerInfo);\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n }\n }\n }\n }\n\n return;\n }\n\n case HostPortal:\n {\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n\n return;\n }\n\n case SuspenseComponent:\n {\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n var offscreenFiber = finishedWork.child;\n\n if (offscreenFiber.flags & Visibility) {\n var offscreenInstance = offscreenFiber.stateNode;\n var newState = offscreenFiber.memoizedState;\n var isHidden = newState !== null; // Track the current state on the Offscreen instance so we can\n // read it during an event\n\n offscreenInstance.isHidden = isHidden;\n\n if (isHidden) {\n var wasHidden = offscreenFiber.alternate !== null && offscreenFiber.alternate.memoizedState !== null;\n\n if (!wasHidden) {\n // TODO: Move to passive phase\n markCommitTimeOfFallback();\n }\n }\n }\n\n if (flags & Update) {\n try {\n commitSuspenseCallback(finishedWork);\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n\n attachSuspenseRetryListeners(finishedWork);\n }\n\n return;\n }\n\n case OffscreenComponent:\n {\n var _wasHidden = current !== null && current.memoizedState !== null;\n\n if ( // TODO: Remove this dead flag\n finishedWork.mode & ConcurrentMode) {\n // Before committing the children, track on the stack whether this\n // offscreen subtree was already hidden, so that we don't unmount the\n // effects again.\n var prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden;\n offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden || _wasHidden;\n recursivelyTraverseMutationEffects(root, finishedWork);\n offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden;\n } else {\n recursivelyTraverseMutationEffects(root, finishedWork);\n }\n\n commitReconciliationEffects(finishedWork);\n\n if (flags & Visibility) {\n var _offscreenInstance = finishedWork.stateNode;\n var _newState = finishedWork.memoizedState;\n\n var _isHidden = _newState !== null;\n\n var offscreenBoundary = finishedWork; // Track the current state on the Offscreen instance so we can\n // read it during an event\n\n _offscreenInstance.isHidden = _isHidden;\n\n {\n if (_isHidden) {\n if (!_wasHidden) {\n if ((offscreenBoundary.mode & ConcurrentMode) !== NoMode) {\n nextEffect = offscreenBoundary;\n var offscreenChild = offscreenBoundary.child;\n\n while (offscreenChild !== null) {\n nextEffect = offscreenChild;\n disappearLayoutEffects_begin(offscreenChild);\n offscreenChild = offscreenChild.sibling;\n }\n }\n }\n }\n }\n\n {\n // TODO: This needs to run whenever there's an insertion or update\n // inside a hidden Offscreen tree.\n hideOrUnhideAllChildren(offscreenBoundary, _isHidden);\n }\n }\n\n return;\n }\n\n case SuspenseListComponent:\n {\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n\n if (flags & Update) {\n attachSuspenseRetryListeners(finishedWork);\n }\n\n return;\n }\n\n case ScopeComponent:\n {\n\n return;\n }\n\n default:\n {\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n return;\n }\n }\n}\n\nfunction commitReconciliationEffects(finishedWork) {\n // Placement effects (insertions, reorders) can be scheduled on any fiber\n // type. They needs to happen after the children effects have fired, but\n // before the effects on this fiber have fired.\n var flags = finishedWork.flags;\n\n if (flags & Placement) {\n try {\n commitPlacement(finishedWork);\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n } // Clear the \"placement\" from effect tag so that we know that this is\n // inserted, before any life-cycles like componentDidMount gets called.\n // TODO: findDOMNode doesn't rely on this any more but isMounted does\n // and isMounted is deprecated anyway so we should be able to kill this.\n\n\n finishedWork.flags &= ~Placement;\n }\n\n if (flags & Hydrating) {\n finishedWork.flags &= ~Hydrating;\n }\n}\n\nfunction commitLayoutEffects(finishedWork, root, committedLanes) {\n inProgressLanes = committedLanes;\n inProgressRoot = root;\n nextEffect = finishedWork;\n commitLayoutEffects_begin(finishedWork, root, committedLanes);\n inProgressLanes = null;\n inProgressRoot = null;\n}\n\nfunction commitLayoutEffects_begin(subtreeRoot, root, committedLanes) {\n // Suspense layout effects semantics don't change for legacy roots.\n var isModernRoot = (subtreeRoot.mode & ConcurrentMode) !== NoMode;\n\n while (nextEffect !== null) {\n var fiber = nextEffect;\n var firstChild = fiber.child;\n\n if ( fiber.tag === OffscreenComponent && isModernRoot) {\n // Keep track of the current Offscreen stack's state.\n var isHidden = fiber.memoizedState !== null;\n var newOffscreenSubtreeIsHidden = isHidden || offscreenSubtreeIsHidden;\n\n if (newOffscreenSubtreeIsHidden) {\n // The Offscreen tree is hidden. Skip over its layout effects.\n commitLayoutMountEffects_complete(subtreeRoot, root, committedLanes);\n continue;\n } else {\n // TODO (Offscreen) Also check: subtreeFlags & LayoutMask\n var current = fiber.alternate;\n var wasHidden = current !== null && current.memoizedState !== null;\n var newOffscreenSubtreeWasHidden = wasHidden || offscreenSubtreeWasHidden;\n var prevOffscreenSubtreeIsHidden = offscreenSubtreeIsHidden;\n var prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden; // Traverse the Offscreen subtree with the current Offscreen as the root.\n\n offscreenSubtreeIsHidden = newOffscreenSubtreeIsHidden;\n offscreenSubtreeWasHidden = newOffscreenSubtreeWasHidden;\n\n if (offscreenSubtreeWasHidden && !prevOffscreenSubtreeWasHidden) {\n // This is the root of a reappearing boundary. Turn its layout effects\n // back on.\n nextEffect = fiber;\n reappearLayoutEffects_begin(fiber);\n }\n\n var child = firstChild;\n\n while (child !== null) {\n nextEffect = child;\n commitLayoutEffects_begin(child, // New root; bubble back up to here and stop.\n root, committedLanes);\n child = child.sibling;\n } // Restore Offscreen state and resume in our-progress traversal.\n\n\n nextEffect = fiber;\n offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden;\n offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden;\n commitLayoutMountEffects_complete(subtreeRoot, root, committedLanes);\n continue;\n }\n }\n\n if ((fiber.subtreeFlags & LayoutMask) !== NoFlags && firstChild !== null) {\n firstChild.return = fiber;\n nextEffect = firstChild;\n } else {\n commitLayoutMountEffects_complete(subtreeRoot, root, committedLanes);\n }\n }\n}\n\nfunction commitLayoutMountEffects_complete(subtreeRoot, root, committedLanes) {\n while (nextEffect !== null) {\n var fiber = nextEffect;\n\n if ((fiber.flags & LayoutMask) !== NoFlags) {\n var current = fiber.alternate;\n setCurrentFiber(fiber);\n\n try {\n commitLayoutEffectOnFiber(root, current, fiber, committedLanes);\n } catch (error) {\n captureCommitPhaseError(fiber, fiber.return, error);\n }\n\n resetCurrentFiber();\n }\n\n if (fiber === subtreeRoot) {\n nextEffect = null;\n return;\n }\n\n var sibling = fiber.sibling;\n\n if (sibling !== null) {\n sibling.return = fiber.return;\n nextEffect = sibling;\n return;\n }\n\n nextEffect = fiber.return;\n }\n}\n\nfunction disappearLayoutEffects_begin(subtreeRoot) {\n while (nextEffect !== null) {\n var fiber = nextEffect;\n var firstChild = fiber.child; // TODO (Offscreen) Check: flags & (RefStatic | LayoutStatic)\n\n switch (fiber.tag) {\n case FunctionComponent:\n case ForwardRef:\n case MemoComponent:\n case SimpleMemoComponent:\n {\n if ( fiber.mode & ProfileMode) {\n try {\n startLayoutEffectTimer();\n commitHookEffectListUnmount(Layout, fiber, fiber.return);\n } finally {\n recordLayoutEffectDuration(fiber);\n }\n } else {\n commitHookEffectListUnmount(Layout, fiber, fiber.return);\n }\n\n break;\n }\n\n case ClassComponent:\n {\n // TODO (Offscreen) Check: flags & RefStatic\n safelyDetachRef(fiber, fiber.return);\n var instance = fiber.stateNode;\n\n if (typeof instance.componentWillUnmount === 'function') {\n safelyCallComponentWillUnmount(fiber, fiber.return, instance);\n }\n\n break;\n }\n\n case HostComponent:\n {\n safelyDetachRef(fiber, fiber.return);\n break;\n }\n\n case OffscreenComponent:\n {\n // Check if this is a\n var isHidden = fiber.memoizedState !== null;\n\n if (isHidden) {\n // Nested Offscreen tree is already hidden. Don't disappear\n // its effects.\n disappearLayoutEffects_complete(subtreeRoot);\n continue;\n }\n\n break;\n }\n } // TODO (Offscreen) Check: subtreeFlags & LayoutStatic\n\n\n if (firstChild !== null) {\n firstChild.return = fiber;\n nextEffect = firstChild;\n } else {\n disappearLayoutEffects_complete(subtreeRoot);\n }\n }\n}\n\nfunction disappearLayoutEffects_complete(subtreeRoot) {\n while (nextEffect !== null) {\n var fiber = nextEffect;\n\n if (fiber === subtreeRoot) {\n nextEffect = null;\n return;\n }\n\n var sibling = fiber.sibling;\n\n if (sibling !== null) {\n sibling.return = fiber.return;\n nextEffect = sibling;\n return;\n }\n\n nextEffect = fiber.return;\n }\n}\n\nfunction reappearLayoutEffects_begin(subtreeRoot) {\n while (nextEffect !== null) {\n var fiber = nextEffect;\n var firstChild = fiber.child;\n\n if (fiber.tag === OffscreenComponent) {\n var isHidden = fiber.memoizedState !== null;\n\n if (isHidden) {\n // Nested Offscreen tree is still hidden. Don't re-appear its effects.\n reappearLayoutEffects_complete(subtreeRoot);\n continue;\n }\n } // TODO (Offscreen) Check: subtreeFlags & LayoutStatic\n\n\n if (firstChild !== null) {\n // This node may have been reused from a previous render, so we can't\n // assume its return pointer is correct.\n firstChild.return = fiber;\n nextEffect = firstChild;\n } else {\n reappearLayoutEffects_complete(subtreeRoot);\n }\n }\n}\n\nfunction reappearLayoutEffects_complete(subtreeRoot) {\n while (nextEffect !== null) {\n var fiber = nextEffect; // TODO (Offscreen) Check: flags & LayoutStatic\n\n setCurrentFiber(fiber);\n\n try {\n reappearLayoutEffectsOnFiber(fiber);\n } catch (error) {\n captureCommitPhaseError(fiber, fiber.return, error);\n }\n\n resetCurrentFiber();\n\n if (fiber === subtreeRoot) {\n nextEffect = null;\n return;\n }\n\n var sibling = fiber.sibling;\n\n if (sibling !== null) {\n // This node may have been reused from a previous render, so we can't\n // assume its return pointer is correct.\n sibling.return = fiber.return;\n nextEffect = sibling;\n return;\n }\n\n nextEffect = fiber.return;\n }\n}\n\nfunction commitPassiveMountEffects(root, finishedWork, committedLanes, committedTransitions) {\n nextEffect = finishedWork;\n commitPassiveMountEffects_begin(finishedWork, root, committedLanes, committedTransitions);\n}\n\nfunction commitPassiveMountEffects_begin(subtreeRoot, root, committedLanes, committedTransitions) {\n while (nextEffect !== null) {\n var fiber = nextEffect;\n var firstChild = fiber.child;\n\n if ((fiber.subtreeFlags & PassiveMask) !== NoFlags && firstChild !== null) {\n firstChild.return = fiber;\n nextEffect = firstChild;\n } else {\n commitPassiveMountEffects_complete(subtreeRoot, root, committedLanes, committedTransitions);\n }\n }\n}\n\nfunction commitPassiveMountEffects_complete(subtreeRoot, root, committedLanes, committedTransitions) {\n while (nextEffect !== null) {\n var fiber = nextEffect;\n\n if ((fiber.flags & Passive) !== NoFlags) {\n setCurrentFiber(fiber);\n\n try {\n commitPassiveMountOnFiber(root, fiber, committedLanes, committedTransitions);\n } catch (error) {\n captureCommitPhaseError(fiber, fiber.return, error);\n }\n\n resetCurrentFiber();\n }\n\n if (fiber === subtreeRoot) {\n nextEffect = null;\n return;\n }\n\n var sibling = fiber.sibling;\n\n if (sibling !== null) {\n sibling.return = fiber.return;\n nextEffect = sibling;\n return;\n }\n\n nextEffect = fiber.return;\n }\n}\n\nfunction commitPassiveMountOnFiber(finishedRoot, finishedWork, committedLanes, committedTransitions) {\n switch (finishedWork.tag) {\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n if ( finishedWork.mode & ProfileMode) {\n startPassiveEffectTimer();\n\n try {\n commitHookEffectListMount(Passive$1 | HasEffect, finishedWork);\n } finally {\n recordPassiveEffectDuration(finishedWork);\n }\n } else {\n commitHookEffectListMount(Passive$1 | HasEffect, finishedWork);\n }\n\n break;\n }\n }\n}\n\nfunction commitPassiveUnmountEffects(firstChild) {\n nextEffect = firstChild;\n commitPassiveUnmountEffects_begin();\n}\n\nfunction commitPassiveUnmountEffects_begin() {\n while (nextEffect !== null) {\n var fiber = nextEffect;\n var child = fiber.child;\n\n if ((nextEffect.flags & ChildDeletion) !== NoFlags) {\n var deletions = fiber.deletions;\n\n if (deletions !== null) {\n for (var i = 0; i < deletions.length; i++) {\n var fiberToDelete = deletions[i];\n nextEffect = fiberToDelete;\n commitPassiveUnmountEffectsInsideOfDeletedTree_begin(fiberToDelete, fiber);\n }\n\n {\n // A fiber was deleted from this parent fiber, but it's still part of\n // the previous (alternate) parent fiber's list of children. Because\n // children are a linked list, an earlier sibling that's still alive\n // will be connected to the deleted fiber via its `alternate`:\n //\n // live fiber\n // --alternate--> previous live fiber\n // --sibling--> deleted fiber\n //\n // We can't disconnect `alternate` on nodes that haven't been deleted\n // yet, but we can disconnect the `sibling` and `child` pointers.\n var previousFiber = fiber.alternate;\n\n if (previousFiber !== null) {\n var detachedChild = previousFiber.child;\n\n if (detachedChild !== null) {\n previousFiber.child = null;\n\n do {\n var detachedSibling = detachedChild.sibling;\n detachedChild.sibling = null;\n detachedChild = detachedSibling;\n } while (detachedChild !== null);\n }\n }\n }\n\n nextEffect = fiber;\n }\n }\n\n if ((fiber.subtreeFlags & PassiveMask) !== NoFlags && child !== null) {\n child.return = fiber;\n nextEffect = child;\n } else {\n commitPassiveUnmountEffects_complete();\n }\n }\n}\n\nfunction commitPassiveUnmountEffects_complete() {\n while (nextEffect !== null) {\n var fiber = nextEffect;\n\n if ((fiber.flags & Passive) !== NoFlags) {\n setCurrentFiber(fiber);\n commitPassiveUnmountOnFiber(fiber);\n resetCurrentFiber();\n }\n\n var sibling = fiber.sibling;\n\n if (sibling !== null) {\n sibling.return = fiber.return;\n nextEffect = sibling;\n return;\n }\n\n nextEffect = fiber.return;\n }\n}\n\nfunction commitPassiveUnmountOnFiber(finishedWork) {\n switch (finishedWork.tag) {\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n if ( finishedWork.mode & ProfileMode) {\n startPassiveEffectTimer();\n commitHookEffectListUnmount(Passive$1 | HasEffect, finishedWork, finishedWork.return);\n recordPassiveEffectDuration(finishedWork);\n } else {\n commitHookEffectListUnmount(Passive$1 | HasEffect, finishedWork, finishedWork.return);\n }\n\n break;\n }\n }\n}\n\nfunction commitPassiveUnmountEffectsInsideOfDeletedTree_begin(deletedSubtreeRoot, nearestMountedAncestor) {\n while (nextEffect !== null) {\n var fiber = nextEffect; // Deletion effects fire in parent -> child order\n // TODO: Check if fiber has a PassiveStatic flag\n\n setCurrentFiber(fiber);\n commitPassiveUnmountInsideDeletedTreeOnFiber(fiber, nearestMountedAncestor);\n resetCurrentFiber();\n var child = fiber.child; // TODO: Only traverse subtree if it has a PassiveStatic flag. (But, if we\n // do this, still need to handle `deletedTreeCleanUpLevel` correctly.)\n\n if (child !== null) {\n child.return = fiber;\n nextEffect = child;\n } else {\n commitPassiveUnmountEffectsInsideOfDeletedTree_complete(deletedSubtreeRoot);\n }\n }\n}\n\nfunction commitPassiveUnmountEffectsInsideOfDeletedTree_complete(deletedSubtreeRoot) {\n while (nextEffect !== null) {\n var fiber = nextEffect;\n var sibling = fiber.sibling;\n var returnFiber = fiber.return;\n\n {\n // Recursively traverse the entire deleted tree and clean up fiber fields.\n // This is more aggressive than ideal, and the long term goal is to only\n // have to detach the deleted tree at the root.\n detachFiberAfterEffects(fiber);\n\n if (fiber === deletedSubtreeRoot) {\n nextEffect = null;\n return;\n }\n }\n\n if (sibling !== null) {\n sibling.return = returnFiber;\n nextEffect = sibling;\n return;\n }\n\n nextEffect = returnFiber;\n }\n}\n\nfunction commitPassiveUnmountInsideDeletedTreeOnFiber(current, nearestMountedAncestor) {\n switch (current.tag) {\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n if ( current.mode & ProfileMode) {\n startPassiveEffectTimer();\n commitHookEffectListUnmount(Passive$1, current, nearestMountedAncestor);\n recordPassiveEffectDuration(current);\n } else {\n commitHookEffectListUnmount(Passive$1, current, nearestMountedAncestor);\n }\n\n break;\n }\n }\n} // TODO: Reuse reappearLayoutEffects traversal here?\n\n\nfunction invokeLayoutEffectMountInDEV(fiber) {\n {\n // We don't need to re-check StrictEffectsMode here.\n // This function is only called if that check has already passed.\n switch (fiber.tag) {\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n try {\n commitHookEffectListMount(Layout | HasEffect, fiber);\n } catch (error) {\n captureCommitPhaseError(fiber, fiber.return, error);\n }\n\n break;\n }\n\n case ClassComponent:\n {\n var instance = fiber.stateNode;\n\n try {\n instance.componentDidMount();\n } catch (error) {\n captureCommitPhaseError(fiber, fiber.return, error);\n }\n\n break;\n }\n }\n }\n}\n\nfunction invokePassiveEffectMountInDEV(fiber) {\n {\n // We don't need to re-check StrictEffectsMode here.\n // This function is only called if that check has already passed.\n switch (fiber.tag) {\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n try {\n commitHookEffectListMount(Passive$1 | HasEffect, fiber);\n } catch (error) {\n captureCommitPhaseError(fiber, fiber.return, error);\n }\n\n break;\n }\n }\n }\n}\n\nfunction invokeLayoutEffectUnmountInDEV(fiber) {\n {\n // We don't need to re-check StrictEffectsMode here.\n // This function is only called if that check has already passed.\n switch (fiber.tag) {\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n try {\n commitHookEffectListUnmount(Layout | HasEffect, fiber, fiber.return);\n } catch (error) {\n captureCommitPhaseError(fiber, fiber.return, error);\n }\n\n break;\n }\n\n case ClassComponent:\n {\n var instance = fiber.stateNode;\n\n if (typeof instance.componentWillUnmount === 'function') {\n safelyCallComponentWillUnmount(fiber, fiber.return, instance);\n }\n\n break;\n }\n }\n }\n}\n\nfunction invokePassiveEffectUnmountInDEV(fiber) {\n {\n // We don't need to re-check StrictEffectsMode here.\n // This function is only called if that check has already passed.\n switch (fiber.tag) {\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n try {\n commitHookEffectListUnmount(Passive$1 | HasEffect, fiber, fiber.return);\n } catch (error) {\n captureCommitPhaseError(fiber, fiber.return, error);\n }\n }\n }\n }\n}\n\nvar COMPONENT_TYPE = 0;\nvar HAS_PSEUDO_CLASS_TYPE = 1;\nvar ROLE_TYPE = 2;\nvar TEST_NAME_TYPE = 3;\nvar TEXT_TYPE = 4;\n\nif (typeof Symbol === 'function' && Symbol.for) {\n var symbolFor = Symbol.for;\n COMPONENT_TYPE = symbolFor('selector.component');\n HAS_PSEUDO_CLASS_TYPE = symbolFor('selector.has_pseudo_class');\n ROLE_TYPE = symbolFor('selector.role');\n TEST_NAME_TYPE = symbolFor('selector.test_id');\n TEXT_TYPE = symbolFor('selector.text');\n}\nvar commitHooks = [];\nfunction onCommitRoot$1() {\n {\n commitHooks.forEach(function (commitHook) {\n return commitHook();\n });\n }\n}\n\nvar ReactCurrentActQueue = ReactSharedInternals.ReactCurrentActQueue;\nfunction isLegacyActEnvironment(fiber) {\n {\n // Legacy mode. We preserve the behavior of React 17's act. It assumes an\n // act environment whenever `jest` is defined, but you can still turn off\n // spurious warnings by setting IS_REACT_ACT_ENVIRONMENT explicitly\n // to false.\n var isReactActEnvironmentGlobal = // $FlowExpectedError – Flow doesn't know about IS_REACT_ACT_ENVIRONMENT global\n typeof IS_REACT_ACT_ENVIRONMENT !== 'undefined' ? IS_REACT_ACT_ENVIRONMENT : undefined; // $FlowExpectedError - Flow doesn't know about jest\n\n var jestIsDefined = typeof jest !== 'undefined';\n return jestIsDefined && isReactActEnvironmentGlobal !== false;\n }\n}\nfunction isConcurrentActEnvironment() {\n {\n var isReactActEnvironmentGlobal = // $FlowExpectedError – Flow doesn't know about IS_REACT_ACT_ENVIRONMENT global\n typeof IS_REACT_ACT_ENVIRONMENT !== 'undefined' ? IS_REACT_ACT_ENVIRONMENT : undefined;\n\n if (!isReactActEnvironmentGlobal && ReactCurrentActQueue.current !== null) {\n // TODO: Include link to relevant documentation page.\n error('The current testing environment is not configured to support ' + 'act(...)');\n }\n\n return isReactActEnvironmentGlobal;\n }\n}\n\nvar ceil = Math.ceil;\nvar ReactCurrentDispatcher$2 = ReactSharedInternals.ReactCurrentDispatcher,\n ReactCurrentOwner$2 = ReactSharedInternals.ReactCurrentOwner,\n ReactCurrentBatchConfig$3 = ReactSharedInternals.ReactCurrentBatchConfig,\n ReactCurrentActQueue$1 = ReactSharedInternals.ReactCurrentActQueue;\nvar NoContext =\n/* */\n0;\nvar BatchedContext =\n/* */\n1;\nvar RenderContext =\n/* */\n2;\nvar CommitContext =\n/* */\n4;\nvar RootInProgress = 0;\nvar RootFatalErrored = 1;\nvar RootErrored = 2;\nvar RootSuspended = 3;\nvar RootSuspendedWithDelay = 4;\nvar RootCompleted = 5;\nvar RootDidNotComplete = 6; // Describes where we are in the React execution stack\n\nvar executionContext = NoContext; // The root we're working on\n\nvar workInProgressRoot = null; // The fiber we're working on\n\nvar workInProgress = null; // The lanes we're rendering\n\nvar workInProgressRootRenderLanes = NoLanes; // Stack that allows components to change the render lanes for its subtree\n// This is a superset of the lanes we started working on at the root. The only\n// case where it's different from `workInProgressRootRenderLanes` is when we\n// enter a subtree that is hidden and needs to be unhidden: Suspense and\n// Offscreen component.\n//\n// Most things in the work loop should deal with workInProgressRootRenderLanes.\n// Most things in begin/complete phases should deal with subtreeRenderLanes.\n\nvar subtreeRenderLanes = NoLanes;\nvar subtreeRenderLanesCursor = createCursor(NoLanes); // Whether to root completed, errored, suspended, etc.\n\nvar workInProgressRootExitStatus = RootInProgress; // A fatal error, if one is thrown\n\nvar workInProgressRootFatalError = null; // \"Included\" lanes refer to lanes that were worked on during this render. It's\n// slightly different than `renderLanes` because `renderLanes` can change as you\n// enter and exit an Offscreen tree. This value is the combination of all render\n// lanes for the entire render phase.\n\nvar workInProgressRootIncludedLanes = NoLanes; // The work left over by components that were visited during this render. Only\n// includes unprocessed updates, not work in bailed out children.\n\nvar workInProgressRootSkippedLanes = NoLanes; // Lanes that were updated (in an interleaved event) during this render.\n\nvar workInProgressRootInterleavedUpdatedLanes = NoLanes; // Lanes that were updated during the render phase (*not* an interleaved event).\n\nvar workInProgressRootPingedLanes = NoLanes; // Errors that are thrown during the render phase.\n\nvar workInProgressRootConcurrentErrors = null; // These are errors that we recovered from without surfacing them to the UI.\n// We will log them once the tree commits.\n\nvar workInProgressRootRecoverableErrors = null; // The most recent time we committed a fallback. This lets us ensure a train\n// model where we don't commit new loading states in too quick succession.\n\nvar globalMostRecentFallbackTime = 0;\nvar FALLBACK_THROTTLE_MS = 500; // The absolute time for when we should start giving up on rendering\n// more and prefer CPU suspense heuristics instead.\n\nvar workInProgressRootRenderTargetTime = Infinity; // How long a render is supposed to take before we start following CPU\n// suspense heuristics and opt out of rendering more content.\n\nvar RENDER_TIMEOUT_MS = 500;\nvar workInProgressTransitions = null;\n\nfunction resetRenderTimer() {\n workInProgressRootRenderTargetTime = now() + RENDER_TIMEOUT_MS;\n}\n\nfunction getRenderTargetTime() {\n return workInProgressRootRenderTargetTime;\n}\nvar hasUncaughtError = false;\nvar firstUncaughtError = null;\nvar legacyErrorBoundariesThatAlreadyFailed = null; // Only used when enableProfilerNestedUpdateScheduledHook is true;\nvar rootDoesHavePassiveEffects = false;\nvar rootWithPendingPassiveEffects = null;\nvar pendingPassiveEffectsLanes = NoLanes;\nvar pendingPassiveProfilerEffects = [];\nvar pendingPassiveTransitions = null; // Use these to prevent an infinite loop of nested updates\n\nvar NESTED_UPDATE_LIMIT = 50;\nvar nestedUpdateCount = 0;\nvar rootWithNestedUpdates = null;\nvar isFlushingPassiveEffects = false;\nvar didScheduleUpdateDuringPassiveEffects = false;\nvar NESTED_PASSIVE_UPDATE_LIMIT = 50;\nvar nestedPassiveUpdateCount = 0;\nvar rootWithPassiveNestedUpdates = null; // If two updates are scheduled within the same event, we should treat their\n// event times as simultaneous, even if the actual clock time has advanced\n// between the first and second call.\n\nvar currentEventTime = NoTimestamp;\nvar currentEventTransitionLane = NoLanes;\nvar isRunningInsertionEffect = false;\nfunction getWorkInProgressRoot() {\n return workInProgressRoot;\n}\nfunction requestEventTime() {\n if ((executionContext & (RenderContext | CommitContext)) !== NoContext) {\n // We're inside React, so it's fine to read the actual time.\n return now();\n } // We're not inside React, so we may be in the middle of a browser event.\n\n\n if (currentEventTime !== NoTimestamp) {\n // Use the same start time for all updates until we enter React again.\n return currentEventTime;\n } // This is the first update since React yielded. Compute a new start time.\n\n\n currentEventTime = now();\n return currentEventTime;\n}\nfunction requestUpdateLane(fiber) {\n // Special cases\n var mode = fiber.mode;\n\n if ((mode & ConcurrentMode) === NoMode) {\n return SyncLane;\n } else if ( (executionContext & RenderContext) !== NoContext && workInProgressRootRenderLanes !== NoLanes) {\n // This is a render phase update. These are not officially supported. The\n // old behavior is to give this the same \"thread\" (lanes) as\n // whatever is currently rendering. So if you call `setState` on a component\n // that happens later in the same render, it will flush. Ideally, we want to\n // remove the special case and treat them as if they came from an\n // interleaved event. Regardless, this pattern is not officially supported.\n // This behavior is only a fallback. The flag only exists until we can roll\n // out the setState warning, since existing code might accidentally rely on\n // the current behavior.\n return pickArbitraryLane(workInProgressRootRenderLanes);\n }\n\n var isTransition = requestCurrentTransition() !== NoTransition;\n\n if (isTransition) {\n if ( ReactCurrentBatchConfig$3.transition !== null) {\n var transition = ReactCurrentBatchConfig$3.transition;\n\n if (!transition._updatedFibers) {\n transition._updatedFibers = new Set();\n }\n\n transition._updatedFibers.add(fiber);\n } // The algorithm for assigning an update to a lane should be stable for all\n // updates at the same priority within the same event. To do this, the\n // inputs to the algorithm must be the same.\n //\n // The trick we use is to cache the first of each of these inputs within an\n // event. Then reset the cached values once we can be sure the event is\n // over. Our heuristic for that is whenever we enter a concurrent work loop.\n\n\n if (currentEventTransitionLane === NoLane) {\n // All transitions within the same event are assigned the same lane.\n currentEventTransitionLane = claimNextTransitionLane();\n }\n\n return currentEventTransitionLane;\n } // Updates originating inside certain React methods, like flushSync, have\n // their priority set by tracking it with a context variable.\n //\n // The opaque type returned by the host config is internally a lane, so we can\n // use that directly.\n // TODO: Move this type conversion to the event priority module.\n\n\n var updateLane = getCurrentUpdatePriority();\n\n if (updateLane !== NoLane) {\n return updateLane;\n } // This update originated outside React. Ask the host environment for an\n // appropriate priority, based on the type of event.\n //\n // The opaque type returned by the host config is internally a lane, so we can\n // use that directly.\n // TODO: Move this type conversion to the event priority module.\n\n\n var eventLane = getCurrentEventPriority();\n return eventLane;\n}\n\nfunction requestRetryLane(fiber) {\n // This is a fork of `requestUpdateLane` designed specifically for Suspense\n // \"retries\" — a special update that attempts to flip a Suspense boundary\n // from its placeholder state to its primary/resolved state.\n // Special cases\n var mode = fiber.mode;\n\n if ((mode & ConcurrentMode) === NoMode) {\n return SyncLane;\n }\n\n return claimNextRetryLane();\n}\n\nfunction scheduleUpdateOnFiber(root, fiber, lane, eventTime) {\n checkForNestedUpdates();\n\n {\n if (isRunningInsertionEffect) {\n error('useInsertionEffect must not schedule updates.');\n }\n }\n\n {\n if (isFlushingPassiveEffects) {\n didScheduleUpdateDuringPassiveEffects = true;\n }\n } // Mark that the root has a pending update.\n\n\n markRootUpdated(root, lane, eventTime);\n\n if ((executionContext & RenderContext) !== NoLanes && root === workInProgressRoot) {\n // This update was dispatched during the render phase. This is a mistake\n // if the update originates from user space (with the exception of local\n // hook updates, which are handled differently and don't reach this\n // function), but there are some internal React features that use this as\n // an implementation detail, like selective hydration.\n warnAboutRenderPhaseUpdatesInDEV(fiber); // Track lanes that were updated during the render phase\n } else {\n // This is a normal update, scheduled from outside the render phase. For\n // example, during an input event.\n {\n if (isDevToolsPresent) {\n addFiberToLanesMap(root, fiber, lane);\n }\n }\n\n warnIfUpdatesNotWrappedWithActDEV(fiber);\n\n if (root === workInProgressRoot) {\n // Received an update to a tree that's in the middle of rendering. Mark\n // that there was an interleaved update work on this root. Unless the\n // `deferRenderPhaseUpdateToNextBatch` flag is off and this is a render\n // phase update. In that case, we don't treat render phase updates as if\n // they were interleaved, for backwards compat reasons.\n if ( (executionContext & RenderContext) === NoContext) {\n workInProgressRootInterleavedUpdatedLanes = mergeLanes(workInProgressRootInterleavedUpdatedLanes, lane);\n }\n\n if (workInProgressRootExitStatus === RootSuspendedWithDelay) {\n // The root already suspended with a delay, which means this render\n // definitely won't finish. Since we have a new update, let's mark it as\n // suspended now, right before marking the incoming update. This has the\n // effect of interrupting the current render and switching to the update.\n // TODO: Make sure this doesn't override pings that happen while we've\n // already started rendering.\n markRootSuspended$1(root, workInProgressRootRenderLanes);\n }\n }\n\n ensureRootIsScheduled(root, eventTime);\n\n if (lane === SyncLane && executionContext === NoContext && (fiber.mode & ConcurrentMode) === NoMode && // Treat `act` as if it's inside `batchedUpdates`, even in legacy mode.\n !( ReactCurrentActQueue$1.isBatchingLegacy)) {\n // Flush the synchronous work now, unless we're already working or inside\n // a batch. This is intentionally inside scheduleUpdateOnFiber instead of\n // scheduleCallbackForFiber to preserve the ability to schedule a callback\n // without immediately flushing it. We only do this for user-initiated\n // updates, to preserve historical behavior of legacy mode.\n resetRenderTimer();\n flushSyncCallbacksOnlyInLegacyMode();\n }\n }\n}\nfunction scheduleInitialHydrationOnRoot(root, lane, eventTime) {\n // This is a special fork of scheduleUpdateOnFiber that is only used to\n // schedule the initial hydration of a root that has just been created. Most\n // of the stuff in scheduleUpdateOnFiber can be skipped.\n //\n // The main reason for this separate path, though, is to distinguish the\n // initial children from subsequent updates. In fully client-rendered roots\n // (createRoot instead of hydrateRoot), all top-level renders are modeled as\n // updates, but hydration roots are special because the initial render must\n // match what was rendered on the server.\n var current = root.current;\n current.lanes = lane;\n markRootUpdated(root, lane, eventTime);\n ensureRootIsScheduled(root, eventTime);\n}\nfunction isUnsafeClassRenderPhaseUpdate(fiber) {\n // Check if this is a render phase update. Only called by class components,\n // which special (deprecated) behavior for UNSAFE_componentWillReceive props.\n return (// TODO: Remove outdated deferRenderPhaseUpdateToNextBatch experiment. We\n // decided not to enable it.\n (executionContext & RenderContext) !== NoContext\n );\n} // Use this function to schedule a task for a root. There's only one task per\n// root; if a task was already scheduled, we'll check to make sure the priority\n// of the existing task is the same as the priority of the next level that the\n// root has work on. This function is called on every update, and right before\n// exiting a task.\n\nfunction ensureRootIsScheduled(root, currentTime) {\n var existingCallbackNode = root.callbackNode; // Check if any lanes are being starved by other work. If so, mark them as\n // expired so we know to work on those next.\n\n markStarvedLanesAsExpired(root, currentTime); // Determine the next lanes to work on, and their priority.\n\n var nextLanes = getNextLanes(root, root === workInProgressRoot ? workInProgressRootRenderLanes : NoLanes);\n\n if (nextLanes === NoLanes) {\n // Special case: There's nothing to work on.\n if (existingCallbackNode !== null) {\n cancelCallback$1(existingCallbackNode);\n }\n\n root.callbackNode = null;\n root.callbackPriority = NoLane;\n return;\n } // We use the highest priority lane to represent the priority of the callback.\n\n\n var newCallbackPriority = getHighestPriorityLane(nextLanes); // Check if there's an existing task. We may be able to reuse it.\n\n var existingCallbackPriority = root.callbackPriority;\n\n if (existingCallbackPriority === newCallbackPriority && // Special case related to `act`. If the currently scheduled task is a\n // Scheduler task, rather than an `act` task, cancel it and re-scheduled\n // on the `act` queue.\n !( ReactCurrentActQueue$1.current !== null && existingCallbackNode !== fakeActCallbackNode)) {\n {\n // If we're going to re-use an existing task, it needs to exist.\n // Assume that discrete update microtasks are non-cancellable and null.\n // TODO: Temporary until we confirm this warning is not fired.\n if (existingCallbackNode == null && existingCallbackPriority !== SyncLane) {\n error('Expected scheduled callback to exist. This error is likely caused by a bug in React. Please file an issue.');\n }\n } // The priority hasn't changed. We can reuse the existing task. Exit.\n\n\n return;\n }\n\n if (existingCallbackNode != null) {\n // Cancel the existing callback. We'll schedule a new one below.\n cancelCallback$1(existingCallbackNode);\n } // Schedule a new callback.\n\n\n var newCallbackNode;\n\n if (newCallbackPriority === SyncLane) {\n // Special case: Sync React callbacks are scheduled on a special\n // internal queue\n if (root.tag === LegacyRoot) {\n if ( ReactCurrentActQueue$1.isBatchingLegacy !== null) {\n ReactCurrentActQueue$1.didScheduleLegacyUpdate = true;\n }\n\n scheduleLegacySyncCallback(performSyncWorkOnRoot.bind(null, root));\n } else {\n scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root));\n }\n\n {\n // Flush the queue in a microtask.\n if ( ReactCurrentActQueue$1.current !== null) {\n // Inside `act`, use our internal `act` queue so that these get flushed\n // at the end of the current scope even when using the sync version\n // of `act`.\n ReactCurrentActQueue$1.current.push(flushSyncCallbacks);\n } else {\n scheduleMicrotask(function () {\n // In Safari, appending an iframe forces microtasks to run.\n // https://github.com/facebook/react/issues/22459\n // We don't support running callbacks in the middle of render\n // or commit so we need to check against that.\n if ((executionContext & (RenderContext | CommitContext)) === NoContext) {\n // Note that this would still prematurely flush the callbacks\n // if this happens outside render or commit phase (e.g. in an event).\n flushSyncCallbacks();\n }\n });\n }\n }\n\n newCallbackNode = null;\n } else {\n var schedulerPriorityLevel;\n\n switch (lanesToEventPriority(nextLanes)) {\n case DiscreteEventPriority:\n schedulerPriorityLevel = ImmediatePriority;\n break;\n\n case ContinuousEventPriority:\n schedulerPriorityLevel = UserBlockingPriority;\n break;\n\n case DefaultEventPriority:\n schedulerPriorityLevel = NormalPriority;\n break;\n\n case IdleEventPriority:\n schedulerPriorityLevel = IdlePriority;\n break;\n\n default:\n schedulerPriorityLevel = NormalPriority;\n break;\n }\n\n newCallbackNode = scheduleCallback$1(schedulerPriorityLevel, performConcurrentWorkOnRoot.bind(null, root));\n }\n\n root.callbackPriority = newCallbackPriority;\n root.callbackNode = newCallbackNode;\n} // This is the entry point for every concurrent task, i.e. anything that\n// goes through Scheduler.\n\n\nfunction performConcurrentWorkOnRoot(root, didTimeout) {\n {\n resetNestedUpdateFlag();\n } // Since we know we're in a React event, we can clear the current\n // event time. The next update will compute a new event time.\n\n\n currentEventTime = NoTimestamp;\n currentEventTransitionLane = NoLanes;\n\n if ((executionContext & (RenderContext | CommitContext)) !== NoContext) {\n throw new Error('Should not already be working.');\n } // Flush any pending passive effects before deciding which lanes to work on,\n // in case they schedule additional work.\n\n\n var originalCallbackNode = root.callbackNode;\n var didFlushPassiveEffects = flushPassiveEffects();\n\n if (didFlushPassiveEffects) {\n // Something in the passive effect phase may have canceled the current task.\n // Check if the task node for this root was changed.\n if (root.callbackNode !== originalCallbackNode) {\n // The current task was canceled. Exit. We don't need to call\n // `ensureRootIsScheduled` because the check above implies either that\n // there's a new task, or that there's no remaining work on this root.\n return null;\n }\n } // Determine the next lanes to work on, using the fields stored\n // on the root.\n\n\n var lanes = getNextLanes(root, root === workInProgressRoot ? workInProgressRootRenderLanes : NoLanes);\n\n if (lanes === NoLanes) {\n // Defensive coding. This is never expected to happen.\n return null;\n } // We disable time-slicing in some cases: if the work has been CPU-bound\n // for too long (\"expired\" work, to prevent starvation), or we're in\n // sync-updates-by-default mode.\n // TODO: We only check `didTimeout` defensively, to account for a Scheduler\n // bug we're still investigating. Once the bug in Scheduler is fixed,\n // we can remove this, since we track expiration ourselves.\n\n\n var shouldTimeSlice = !includesBlockingLane(root, lanes) && !includesExpiredLane(root, lanes) && ( !didTimeout);\n var exitStatus = shouldTimeSlice ? renderRootConcurrent(root, lanes) : renderRootSync(root, lanes);\n\n if (exitStatus !== RootInProgress) {\n if (exitStatus === RootErrored) {\n // If something threw an error, try rendering one more time. We'll\n // render synchronously to block concurrent data mutations, and we'll\n // includes all pending updates are included. If it still fails after\n // the second attempt, we'll give up and commit the resulting tree.\n var errorRetryLanes = getLanesToRetrySynchronouslyOnError(root);\n\n if (errorRetryLanes !== NoLanes) {\n lanes = errorRetryLanes;\n exitStatus = recoverFromConcurrentError(root, errorRetryLanes);\n }\n }\n\n if (exitStatus === RootFatalErrored) {\n var fatalError = workInProgressRootFatalError;\n prepareFreshStack(root, NoLanes);\n markRootSuspended$1(root, lanes);\n ensureRootIsScheduled(root, now());\n throw fatalError;\n }\n\n if (exitStatus === RootDidNotComplete) {\n // The render unwound without completing the tree. This happens in special\n // cases where need to exit the current render without producing a\n // consistent tree or committing.\n //\n // This should only happen during a concurrent render, not a discrete or\n // synchronous update. We should have already checked for this when we\n // unwound the stack.\n markRootSuspended$1(root, lanes);\n } else {\n // The render completed.\n // Check if this render may have yielded to a concurrent event, and if so,\n // confirm that any newly rendered stores are consistent.\n // TODO: It's possible that even a concurrent render may never have yielded\n // to the main thread, if it was fast enough, or if it expired. We could\n // skip the consistency check in that case, too.\n var renderWasConcurrent = !includesBlockingLane(root, lanes);\n var finishedWork = root.current.alternate;\n\n if (renderWasConcurrent && !isRenderConsistentWithExternalStores(finishedWork)) {\n // A store was mutated in an interleaved event. Render again,\n // synchronously, to block further mutations.\n exitStatus = renderRootSync(root, lanes); // We need to check again if something threw\n\n if (exitStatus === RootErrored) {\n var _errorRetryLanes = getLanesToRetrySynchronouslyOnError(root);\n\n if (_errorRetryLanes !== NoLanes) {\n lanes = _errorRetryLanes;\n exitStatus = recoverFromConcurrentError(root, _errorRetryLanes); // We assume the tree is now consistent because we didn't yield to any\n // concurrent events.\n }\n }\n\n if (exitStatus === RootFatalErrored) {\n var _fatalError = workInProgressRootFatalError;\n prepareFreshStack(root, NoLanes);\n markRootSuspended$1(root, lanes);\n ensureRootIsScheduled(root, now());\n throw _fatalError;\n }\n } // We now have a consistent tree. The next step is either to commit it,\n // or, if something suspended, wait to commit it after a timeout.\n\n\n root.finishedWork = finishedWork;\n root.finishedLanes = lanes;\n finishConcurrentRender(root, exitStatus, lanes);\n }\n }\n\n ensureRootIsScheduled(root, now());\n\n if (root.callbackNode === originalCallbackNode) {\n // The task node scheduled for this root is the same one that's\n // currently executed. Need to return a continuation.\n return performConcurrentWorkOnRoot.bind(null, root);\n }\n\n return null;\n}\n\nfunction recoverFromConcurrentError(root, errorRetryLanes) {\n // If an error occurred during hydration, discard server response and fall\n // back to client side render.\n // Before rendering again, save the errors from the previous attempt.\n var errorsFromFirstAttempt = workInProgressRootConcurrentErrors;\n\n if (isRootDehydrated(root)) {\n // The shell failed to hydrate. Set a flag to force a client rendering\n // during the next attempt. To do this, we call prepareFreshStack now\n // to create the root work-in-progress fiber. This is a bit weird in terms\n // of factoring, because it relies on renderRootSync not calling\n // prepareFreshStack again in the call below, which happens because the\n // root and lanes haven't changed.\n //\n // TODO: I think what we should do is set ForceClientRender inside\n // throwException, like we do for nested Suspense boundaries. The reason\n // it's here instead is so we can switch to the synchronous work loop, too.\n // Something to consider for a future refactor.\n var rootWorkInProgress = prepareFreshStack(root, errorRetryLanes);\n rootWorkInProgress.flags |= ForceClientRender;\n\n {\n errorHydratingContainer(root.containerInfo);\n }\n }\n\n var exitStatus = renderRootSync(root, errorRetryLanes);\n\n if (exitStatus !== RootErrored) {\n // Successfully finished rendering on retry\n // The errors from the failed first attempt have been recovered. Add\n // them to the collection of recoverable errors. We'll log them in the\n // commit phase.\n var errorsFromSecondAttempt = workInProgressRootRecoverableErrors;\n workInProgressRootRecoverableErrors = errorsFromFirstAttempt; // The errors from the second attempt should be queued after the errors\n // from the first attempt, to preserve the causal sequence.\n\n if (errorsFromSecondAttempt !== null) {\n queueRecoverableErrors(errorsFromSecondAttempt);\n }\n }\n\n return exitStatus;\n}\n\nfunction queueRecoverableErrors(errors) {\n if (workInProgressRootRecoverableErrors === null) {\n workInProgressRootRecoverableErrors = errors;\n } else {\n workInProgressRootRecoverableErrors.push.apply(workInProgressRootRecoverableErrors, errors);\n }\n}\n\nfunction finishConcurrentRender(root, exitStatus, lanes) {\n switch (exitStatus) {\n case RootInProgress:\n case RootFatalErrored:\n {\n throw new Error('Root did not complete. This is a bug in React.');\n }\n // Flow knows about invariant, so it complains if I add a break\n // statement, but eslint doesn't know about invariant, so it complains\n // if I do. eslint-disable-next-line no-fallthrough\n\n case RootErrored:\n {\n // We should have already attempted to retry this tree. If we reached\n // this point, it errored again. Commit it.\n commitRoot(root, workInProgressRootRecoverableErrors, workInProgressTransitions);\n break;\n }\n\n case RootSuspended:\n {\n markRootSuspended$1(root, lanes); // We have an acceptable loading state. We need to figure out if we\n // should immediately commit it or wait a bit.\n\n if (includesOnlyRetries(lanes) && // do not delay if we're inside an act() scope\n !shouldForceFlushFallbacksInDEV()) {\n // This render only included retries, no updates. Throttle committing\n // retries so that we don't show too many loading states too quickly.\n var msUntilTimeout = globalMostRecentFallbackTime + FALLBACK_THROTTLE_MS - now(); // Don't bother with a very short suspense time.\n\n if (msUntilTimeout > 10) {\n var nextLanes = getNextLanes(root, NoLanes);\n\n if (nextLanes !== NoLanes) {\n // There's additional work on this root.\n break;\n }\n\n var suspendedLanes = root.suspendedLanes;\n\n if (!isSubsetOfLanes(suspendedLanes, lanes)) {\n // We should prefer to render the fallback of at the last\n // suspended level. Ping the last suspended level to try\n // rendering it again.\n // FIXME: What if the suspended lanes are Idle? Should not restart.\n var eventTime = requestEventTime();\n markRootPinged(root, suspendedLanes);\n break;\n } // The render is suspended, it hasn't timed out, and there's no\n // lower priority work to do. Instead of committing the fallback\n // immediately, wait for more data to arrive.\n\n\n root.timeoutHandle = scheduleTimeout(commitRoot.bind(null, root, workInProgressRootRecoverableErrors, workInProgressTransitions), msUntilTimeout);\n break;\n }\n } // The work expired. Commit immediately.\n\n\n commitRoot(root, workInProgressRootRecoverableErrors, workInProgressTransitions);\n break;\n }\n\n case RootSuspendedWithDelay:\n {\n markRootSuspended$1(root, lanes);\n\n if (includesOnlyTransitions(lanes)) {\n // This is a transition, so we should exit without committing a\n // placeholder and without scheduling a timeout. Delay indefinitely\n // until we receive more data.\n break;\n }\n\n if (!shouldForceFlushFallbacksInDEV()) {\n // This is not a transition, but we did trigger an avoided state.\n // Schedule a placeholder to display after a short delay, using the Just\n // Noticeable Difference.\n // TODO: Is the JND optimization worth the added complexity? If this is\n // the only reason we track the event time, then probably not.\n // Consider removing.\n var mostRecentEventTime = getMostRecentEventTime(root, lanes);\n var eventTimeMs = mostRecentEventTime;\n var timeElapsedMs = now() - eventTimeMs;\n\n var _msUntilTimeout = jnd(timeElapsedMs) - timeElapsedMs; // Don't bother with a very short suspense time.\n\n\n if (_msUntilTimeout > 10) {\n // Instead of committing the fallback immediately, wait for more data\n // to arrive.\n root.timeoutHandle = scheduleTimeout(commitRoot.bind(null, root, workInProgressRootRecoverableErrors, workInProgressTransitions), _msUntilTimeout);\n break;\n }\n } // Commit the placeholder.\n\n\n commitRoot(root, workInProgressRootRecoverableErrors, workInProgressTransitions);\n break;\n }\n\n case RootCompleted:\n {\n // The work completed. Ready to commit.\n commitRoot(root, workInProgressRootRecoverableErrors, workInProgressTransitions);\n break;\n }\n\n default:\n {\n throw new Error('Unknown root exit status.');\n }\n }\n}\n\nfunction isRenderConsistentWithExternalStores(finishedWork) {\n // Search the rendered tree for external store reads, and check whether the\n // stores were mutated in a concurrent event. Intentionally using an iterative\n // loop instead of recursion so we can exit early.\n var node = finishedWork;\n\n while (true) {\n if (node.flags & StoreConsistency) {\n var updateQueue = node.updateQueue;\n\n if (updateQueue !== null) {\n var checks = updateQueue.stores;\n\n if (checks !== null) {\n for (var i = 0; i < checks.length; i++) {\n var check = checks[i];\n var getSnapshot = check.getSnapshot;\n var renderedValue = check.value;\n\n try {\n if (!objectIs(getSnapshot(), renderedValue)) {\n // Found an inconsistent store.\n return false;\n }\n } catch (error) {\n // If `getSnapshot` throws, return `false`. This will schedule\n // a re-render, and the error will be rethrown during render.\n return false;\n }\n }\n }\n }\n }\n\n var child = node.child;\n\n if (node.subtreeFlags & StoreConsistency && child !== null) {\n child.return = node;\n node = child;\n continue;\n }\n\n if (node === finishedWork) {\n return true;\n }\n\n while (node.sibling === null) {\n if (node.return === null || node.return === finishedWork) {\n return true;\n }\n\n node = node.return;\n }\n\n node.sibling.return = node.return;\n node = node.sibling;\n } // Flow doesn't know this is unreachable, but eslint does\n // eslint-disable-next-line no-unreachable\n\n\n return true;\n}\n\nfunction markRootSuspended$1(root, suspendedLanes) {\n // When suspending, we should always exclude lanes that were pinged or (more\n // rarely, since we try to avoid it) updated during the render phase.\n // TODO: Lol maybe there's a better way to factor this besides this\n // obnoxiously named function :)\n suspendedLanes = removeLanes(suspendedLanes, workInProgressRootPingedLanes);\n suspendedLanes = removeLanes(suspendedLanes, workInProgressRootInterleavedUpdatedLanes);\n markRootSuspended(root, suspendedLanes);\n} // This is the entry point for synchronous tasks that don't go\n// through Scheduler\n\n\nfunction performSyncWorkOnRoot(root) {\n {\n syncNestedUpdateFlag();\n }\n\n if ((executionContext & (RenderContext | CommitContext)) !== NoContext) {\n throw new Error('Should not already be working.');\n }\n\n flushPassiveEffects();\n var lanes = getNextLanes(root, NoLanes);\n\n if (!includesSomeLane(lanes, SyncLane)) {\n // There's no remaining sync work left.\n ensureRootIsScheduled(root, now());\n return null;\n }\n\n var exitStatus = renderRootSync(root, lanes);\n\n if (root.tag !== LegacyRoot && exitStatus === RootErrored) {\n // If something threw an error, try rendering one more time. We'll render\n // synchronously to block concurrent data mutations, and we'll includes\n // all pending updates are included. If it still fails after the second\n // attempt, we'll give up and commit the resulting tree.\n var errorRetryLanes = getLanesToRetrySynchronouslyOnError(root);\n\n if (errorRetryLanes !== NoLanes) {\n lanes = errorRetryLanes;\n exitStatus = recoverFromConcurrentError(root, errorRetryLanes);\n }\n }\n\n if (exitStatus === RootFatalErrored) {\n var fatalError = workInProgressRootFatalError;\n prepareFreshStack(root, NoLanes);\n markRootSuspended$1(root, lanes);\n ensureRootIsScheduled(root, now());\n throw fatalError;\n }\n\n if (exitStatus === RootDidNotComplete) {\n throw new Error('Root did not complete. This is a bug in React.');\n } // We now have a consistent tree. Because this is a sync render, we\n // will commit it even if something suspended.\n\n\n var finishedWork = root.current.alternate;\n root.finishedWork = finishedWork;\n root.finishedLanes = lanes;\n commitRoot(root, workInProgressRootRecoverableErrors, workInProgressTransitions); // Before exiting, make sure there's a callback scheduled for the next\n // pending level.\n\n ensureRootIsScheduled(root, now());\n return null;\n}\n\nfunction flushRoot(root, lanes) {\n if (lanes !== NoLanes) {\n markRootEntangled(root, mergeLanes(lanes, SyncLane));\n ensureRootIsScheduled(root, now());\n\n if ((executionContext & (RenderContext | CommitContext)) === NoContext) {\n resetRenderTimer();\n flushSyncCallbacks();\n }\n }\n}\nfunction batchedUpdates$1(fn, a) {\n var prevExecutionContext = executionContext;\n executionContext |= BatchedContext;\n\n try {\n return fn(a);\n } finally {\n executionContext = prevExecutionContext; // If there were legacy sync updates, flush them at the end of the outer\n // most batchedUpdates-like method.\n\n if (executionContext === NoContext && // Treat `act` as if it's inside `batchedUpdates`, even in legacy mode.\n !( ReactCurrentActQueue$1.isBatchingLegacy)) {\n resetRenderTimer();\n flushSyncCallbacksOnlyInLegacyMode();\n }\n }\n}\nfunction discreteUpdates(fn, a, b, c, d) {\n var previousPriority = getCurrentUpdatePriority();\n var prevTransition = ReactCurrentBatchConfig$3.transition;\n\n try {\n ReactCurrentBatchConfig$3.transition = null;\n setCurrentUpdatePriority(DiscreteEventPriority);\n return fn(a, b, c, d);\n } finally {\n setCurrentUpdatePriority(previousPriority);\n ReactCurrentBatchConfig$3.transition = prevTransition;\n\n if (executionContext === NoContext) {\n resetRenderTimer();\n }\n }\n} // Overload the definition to the two valid signatures.\n// Warning, this opts-out of checking the function body.\n\n// eslint-disable-next-line no-redeclare\nfunction flushSync(fn) {\n // In legacy mode, we flush pending passive effects at the beginning of the\n // next event, not at the end of the previous one.\n if (rootWithPendingPassiveEffects !== null && rootWithPendingPassiveEffects.tag === LegacyRoot && (executionContext & (RenderContext | CommitContext)) === NoContext) {\n flushPassiveEffects();\n }\n\n var prevExecutionContext = executionContext;\n executionContext |= BatchedContext;\n var prevTransition = ReactCurrentBatchConfig$3.transition;\n var previousPriority = getCurrentUpdatePriority();\n\n try {\n ReactCurrentBatchConfig$3.transition = null;\n setCurrentUpdatePriority(DiscreteEventPriority);\n\n if (fn) {\n return fn();\n } else {\n return undefined;\n }\n } finally {\n setCurrentUpdatePriority(previousPriority);\n ReactCurrentBatchConfig$3.transition = prevTransition;\n executionContext = prevExecutionContext; // Flush the immediate callbacks that were scheduled during this batch.\n // Note that this will happen even if batchedUpdates is higher up\n // the stack.\n\n if ((executionContext & (RenderContext | CommitContext)) === NoContext) {\n flushSyncCallbacks();\n }\n }\n}\nfunction isAlreadyRendering() {\n // Used by the renderer to print a warning if certain APIs are called from\n // the wrong context.\n return (executionContext & (RenderContext | CommitContext)) !== NoContext;\n}\nfunction pushRenderLanes(fiber, lanes) {\n push(subtreeRenderLanesCursor, subtreeRenderLanes, fiber);\n subtreeRenderLanes = mergeLanes(subtreeRenderLanes, lanes);\n workInProgressRootIncludedLanes = mergeLanes(workInProgressRootIncludedLanes, lanes);\n}\nfunction popRenderLanes(fiber) {\n subtreeRenderLanes = subtreeRenderLanesCursor.current;\n pop(subtreeRenderLanesCursor, fiber);\n}\n\nfunction prepareFreshStack(root, lanes) {\n root.finishedWork = null;\n root.finishedLanes = NoLanes;\n var timeoutHandle = root.timeoutHandle;\n\n if (timeoutHandle !== noTimeout) {\n // The root previous suspended and scheduled a timeout to commit a fallback\n // state. Now that we have additional work, cancel the timeout.\n root.timeoutHandle = noTimeout; // $FlowFixMe Complains noTimeout is not a TimeoutID, despite the check above\n\n cancelTimeout(timeoutHandle);\n }\n\n if (workInProgress !== null) {\n var interruptedWork = workInProgress.return;\n\n while (interruptedWork !== null) {\n var current = interruptedWork.alternate;\n unwindInterruptedWork(current, interruptedWork);\n interruptedWork = interruptedWork.return;\n }\n }\n\n workInProgressRoot = root;\n var rootWorkInProgress = createWorkInProgress(root.current, null);\n workInProgress = rootWorkInProgress;\n workInProgressRootRenderLanes = subtreeRenderLanes = workInProgressRootIncludedLanes = lanes;\n workInProgressRootExitStatus = RootInProgress;\n workInProgressRootFatalError = null;\n workInProgressRootSkippedLanes = NoLanes;\n workInProgressRootInterleavedUpdatedLanes = NoLanes;\n workInProgressRootPingedLanes = NoLanes;\n workInProgressRootConcurrentErrors = null;\n workInProgressRootRecoverableErrors = null;\n finishQueueingConcurrentUpdates();\n\n {\n ReactStrictModeWarnings.discardPendingWarnings();\n }\n\n return rootWorkInProgress;\n}\n\nfunction handleError(root, thrownValue) {\n do {\n var erroredWork = workInProgress;\n\n try {\n // Reset module-level state that was set during the render phase.\n resetContextDependencies();\n resetHooksAfterThrow();\n resetCurrentFiber(); // TODO: I found and added this missing line while investigating a\n // separate issue. Write a regression test using string refs.\n\n ReactCurrentOwner$2.current = null;\n\n if (erroredWork === null || erroredWork.return === null) {\n // Expected to be working on a non-root fiber. This is a fatal error\n // because there's no ancestor that can handle it; the root is\n // supposed to capture all errors that weren't caught by an error\n // boundary.\n workInProgressRootExitStatus = RootFatalErrored;\n workInProgressRootFatalError = thrownValue; // Set `workInProgress` to null. This represents advancing to the next\n // sibling, or the parent if there are no siblings. But since the root\n // has no siblings nor a parent, we set it to null. Usually this is\n // handled by `completeUnitOfWork` or `unwindWork`, but since we're\n // intentionally not calling those, we need set it here.\n // TODO: Consider calling `unwindWork` to pop the contexts.\n\n workInProgress = null;\n return;\n }\n\n if (enableProfilerTimer && erroredWork.mode & ProfileMode) {\n // Record the time spent rendering before an error was thrown. This\n // avoids inaccurate Profiler durations in the case of a\n // suspended render.\n stopProfilerTimerIfRunningAndRecordDelta(erroredWork, true);\n }\n\n if (enableSchedulingProfiler) {\n markComponentRenderStopped();\n\n if (thrownValue !== null && typeof thrownValue === 'object' && typeof thrownValue.then === 'function') {\n var wakeable = thrownValue;\n markComponentSuspended(erroredWork, wakeable, workInProgressRootRenderLanes);\n } else {\n markComponentErrored(erroredWork, thrownValue, workInProgressRootRenderLanes);\n }\n }\n\n throwException(root, erroredWork.return, erroredWork, thrownValue, workInProgressRootRenderLanes);\n completeUnitOfWork(erroredWork);\n } catch (yetAnotherThrownValue) {\n // Something in the return path also threw.\n thrownValue = yetAnotherThrownValue;\n\n if (workInProgress === erroredWork && erroredWork !== null) {\n // If this boundary has already errored, then we had trouble processing\n // the error. Bubble it to the next boundary.\n erroredWork = erroredWork.return;\n workInProgress = erroredWork;\n } else {\n erroredWork = workInProgress;\n }\n\n continue;\n } // Return to the normal work loop.\n\n\n return;\n } while (true);\n}\n\nfunction pushDispatcher() {\n var prevDispatcher = ReactCurrentDispatcher$2.current;\n ReactCurrentDispatcher$2.current = ContextOnlyDispatcher;\n\n if (prevDispatcher === null) {\n // The React isomorphic package does not include a default dispatcher.\n // Instead the first renderer will lazily attach one, in order to give\n // nicer error messages.\n return ContextOnlyDispatcher;\n } else {\n return prevDispatcher;\n }\n}\n\nfunction popDispatcher(prevDispatcher) {\n ReactCurrentDispatcher$2.current = prevDispatcher;\n}\n\nfunction markCommitTimeOfFallback() {\n globalMostRecentFallbackTime = now();\n}\nfunction markSkippedUpdateLanes(lane) {\n workInProgressRootSkippedLanes = mergeLanes(lane, workInProgressRootSkippedLanes);\n}\nfunction renderDidSuspend() {\n if (workInProgressRootExitStatus === RootInProgress) {\n workInProgressRootExitStatus = RootSuspended;\n }\n}\nfunction renderDidSuspendDelayIfPossible() {\n if (workInProgressRootExitStatus === RootInProgress || workInProgressRootExitStatus === RootSuspended || workInProgressRootExitStatus === RootErrored) {\n workInProgressRootExitStatus = RootSuspendedWithDelay;\n } // Check if there are updates that we skipped tree that might have unblocked\n // this render.\n\n\n if (workInProgressRoot !== null && (includesNonIdleWork(workInProgressRootSkippedLanes) || includesNonIdleWork(workInProgressRootInterleavedUpdatedLanes))) {\n // Mark the current render as suspended so that we switch to working on\n // the updates that were skipped. Usually we only suspend at the end of\n // the render phase.\n // TODO: We should probably always mark the root as suspended immediately\n // (inside this function), since by suspending at the end of the render\n // phase introduces a potential mistake where we suspend lanes that were\n // pinged or updated while we were rendering.\n markRootSuspended$1(workInProgressRoot, workInProgressRootRenderLanes);\n }\n}\nfunction renderDidError(error) {\n if (workInProgressRootExitStatus !== RootSuspendedWithDelay) {\n workInProgressRootExitStatus = RootErrored;\n }\n\n if (workInProgressRootConcurrentErrors === null) {\n workInProgressRootConcurrentErrors = [error];\n } else {\n workInProgressRootConcurrentErrors.push(error);\n }\n} // Called during render to determine if anything has suspended.\n// Returns false if we're not sure.\n\nfunction renderHasNotSuspendedYet() {\n // If something errored or completed, we can't really be sure,\n // so those are false.\n return workInProgressRootExitStatus === RootInProgress;\n}\n\nfunction renderRootSync(root, lanes) {\n var prevExecutionContext = executionContext;\n executionContext |= RenderContext;\n var prevDispatcher = pushDispatcher(); // If the root or lanes have changed, throw out the existing stack\n // and prepare a fresh one. Otherwise we'll continue where we left off.\n\n if (workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes) {\n {\n if (isDevToolsPresent) {\n var memoizedUpdaters = root.memoizedUpdaters;\n\n if (memoizedUpdaters.size > 0) {\n restorePendingUpdaters(root, workInProgressRootRenderLanes);\n memoizedUpdaters.clear();\n } // At this point, move Fibers that scheduled the upcoming work from the Map to the Set.\n // If we bailout on this work, we'll move them back (like above).\n // It's important to move them now in case the work spawns more work at the same priority with different updaters.\n // That way we can keep the current update and future updates separate.\n\n\n movePendingFibersToMemoized(root, lanes);\n }\n }\n\n workInProgressTransitions = getTransitionsForLanes();\n prepareFreshStack(root, lanes);\n }\n\n {\n markRenderStarted(lanes);\n }\n\n do {\n try {\n workLoopSync();\n break;\n } catch (thrownValue) {\n handleError(root, thrownValue);\n }\n } while (true);\n\n resetContextDependencies();\n executionContext = prevExecutionContext;\n popDispatcher(prevDispatcher);\n\n if (workInProgress !== null) {\n // This is a sync render, so we should have finished the whole tree.\n throw new Error('Cannot commit an incomplete root. This error is likely caused by a ' + 'bug in React. Please file an issue.');\n }\n\n {\n markRenderStopped();\n } // Set this to null to indicate there's no in-progress render.\n\n\n workInProgressRoot = null;\n workInProgressRootRenderLanes = NoLanes;\n return workInProgressRootExitStatus;\n} // The work loop is an extremely hot path. Tell Closure not to inline it.\n\n/** @noinline */\n\n\nfunction workLoopSync() {\n // Already timed out, so perform work without checking if we need to yield.\n while (workInProgress !== null) {\n performUnitOfWork(workInProgress);\n }\n}\n\nfunction renderRootConcurrent(root, lanes) {\n var prevExecutionContext = executionContext;\n executionContext |= RenderContext;\n var prevDispatcher = pushDispatcher(); // If the root or lanes have changed, throw out the existing stack\n // and prepare a fresh one. Otherwise we'll continue where we left off.\n\n if (workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes) {\n {\n if (isDevToolsPresent) {\n var memoizedUpdaters = root.memoizedUpdaters;\n\n if (memoizedUpdaters.size > 0) {\n restorePendingUpdaters(root, workInProgressRootRenderLanes);\n memoizedUpdaters.clear();\n } // At this point, move Fibers that scheduled the upcoming work from the Map to the Set.\n // If we bailout on this work, we'll move them back (like above).\n // It's important to move them now in case the work spawns more work at the same priority with different updaters.\n // That way we can keep the current update and future updates separate.\n\n\n movePendingFibersToMemoized(root, lanes);\n }\n }\n\n workInProgressTransitions = getTransitionsForLanes();\n resetRenderTimer();\n prepareFreshStack(root, lanes);\n }\n\n {\n markRenderStarted(lanes);\n }\n\n do {\n try {\n workLoopConcurrent();\n break;\n } catch (thrownValue) {\n handleError(root, thrownValue);\n }\n } while (true);\n\n resetContextDependencies();\n popDispatcher(prevDispatcher);\n executionContext = prevExecutionContext;\n\n\n if (workInProgress !== null) {\n // Still work remaining.\n {\n markRenderYielded();\n }\n\n return RootInProgress;\n } else {\n // Completed the tree.\n {\n markRenderStopped();\n } // Set this to null to indicate there's no in-progress render.\n\n\n workInProgressRoot = null;\n workInProgressRootRenderLanes = NoLanes; // Return the final exit status.\n\n return workInProgressRootExitStatus;\n }\n}\n/** @noinline */\n\n\nfunction workLoopConcurrent() {\n // Perform work until Scheduler asks us to yield\n while (workInProgress !== null && !shouldYield()) {\n performUnitOfWork(workInProgress);\n }\n}\n\nfunction performUnitOfWork(unitOfWork) {\n // The current, flushed, state of this fiber is the alternate. Ideally\n // nothing should rely on this, but relying on it here means that we don't\n // need an additional field on the work in progress.\n var current = unitOfWork.alternate;\n setCurrentFiber(unitOfWork);\n var next;\n\n if ( (unitOfWork.mode & ProfileMode) !== NoMode) {\n startProfilerTimer(unitOfWork);\n next = beginWork$1(current, unitOfWork, subtreeRenderLanes);\n stopProfilerTimerIfRunningAndRecordDelta(unitOfWork, true);\n } else {\n next = beginWork$1(current, unitOfWork, subtreeRenderLanes);\n }\n\n resetCurrentFiber();\n unitOfWork.memoizedProps = unitOfWork.pendingProps;\n\n if (next === null) {\n // If this doesn't spawn new work, complete the current work.\n completeUnitOfWork(unitOfWork);\n } else {\n workInProgress = next;\n }\n\n ReactCurrentOwner$2.current = null;\n}\n\nfunction completeUnitOfWork(unitOfWork) {\n // Attempt to complete the current unit of work, then move to the next\n // sibling. If there are no more siblings, return to the parent fiber.\n var completedWork = unitOfWork;\n\n do {\n // The current, flushed, state of this fiber is the alternate. Ideally\n // nothing should rely on this, but relying on it here means that we don't\n // need an additional field on the work in progress.\n var current = completedWork.alternate;\n var returnFiber = completedWork.return; // Check if the work completed or if something threw.\n\n if ((completedWork.flags & Incomplete) === NoFlags) {\n setCurrentFiber(completedWork);\n var next = void 0;\n\n if ( (completedWork.mode & ProfileMode) === NoMode) {\n next = completeWork(current, completedWork, subtreeRenderLanes);\n } else {\n startProfilerTimer(completedWork);\n next = completeWork(current, completedWork, subtreeRenderLanes); // Update render duration assuming we didn't error.\n\n stopProfilerTimerIfRunningAndRecordDelta(completedWork, false);\n }\n\n resetCurrentFiber();\n\n if (next !== null) {\n // Completing this fiber spawned new work. Work on that next.\n workInProgress = next;\n return;\n }\n } else {\n // This fiber did not complete because something threw. Pop values off\n // the stack without entering the complete phase. If this is a boundary,\n // capture values if possible.\n var _next = unwindWork(current, completedWork); // Because this fiber did not complete, don't reset its lanes.\n\n\n if (_next !== null) {\n // If completing this work spawned new work, do that next. We'll come\n // back here again.\n // Since we're restarting, remove anything that is not a host effect\n // from the effect tag.\n _next.flags &= HostEffectMask;\n workInProgress = _next;\n return;\n }\n\n if ( (completedWork.mode & ProfileMode) !== NoMode) {\n // Record the render duration for the fiber that errored.\n stopProfilerTimerIfRunningAndRecordDelta(completedWork, false); // Include the time spent working on failed children before continuing.\n\n var actualDuration = completedWork.actualDuration;\n var child = completedWork.child;\n\n while (child !== null) {\n actualDuration += child.actualDuration;\n child = child.sibling;\n }\n\n completedWork.actualDuration = actualDuration;\n }\n\n if (returnFiber !== null) {\n // Mark the parent fiber as incomplete and clear its subtree flags.\n returnFiber.flags |= Incomplete;\n returnFiber.subtreeFlags = NoFlags;\n returnFiber.deletions = null;\n } else {\n // We've unwound all the way to the root.\n workInProgressRootExitStatus = RootDidNotComplete;\n workInProgress = null;\n return;\n }\n }\n\n var siblingFiber = completedWork.sibling;\n\n if (siblingFiber !== null) {\n // If there is more work to do in this returnFiber, do that next.\n workInProgress = siblingFiber;\n return;\n } // Otherwise, return to the parent\n\n\n completedWork = returnFiber; // Update the next thing we're working on in case something throws.\n\n workInProgress = completedWork;\n } while (completedWork !== null); // We've reached the root.\n\n\n if (workInProgressRootExitStatus === RootInProgress) {\n workInProgressRootExitStatus = RootCompleted;\n }\n}\n\nfunction commitRoot(root, recoverableErrors, transitions) {\n // TODO: This no longer makes any sense. We already wrap the mutation and\n // layout phases. Should be able to remove.\n var previousUpdateLanePriority = getCurrentUpdatePriority();\n var prevTransition = ReactCurrentBatchConfig$3.transition;\n\n try {\n ReactCurrentBatchConfig$3.transition = null;\n setCurrentUpdatePriority(DiscreteEventPriority);\n commitRootImpl(root, recoverableErrors, transitions, previousUpdateLanePriority);\n } finally {\n ReactCurrentBatchConfig$3.transition = prevTransition;\n setCurrentUpdatePriority(previousUpdateLanePriority);\n }\n\n return null;\n}\n\nfunction commitRootImpl(root, recoverableErrors, transitions, renderPriorityLevel) {\n do {\n // `flushPassiveEffects` will call `flushSyncUpdateQueue` at the end, which\n // means `flushPassiveEffects` will sometimes result in additional\n // passive effects. So we need to keep flushing in a loop until there are\n // no more pending effects.\n // TODO: Might be better if `flushPassiveEffects` did not automatically\n // flush synchronous work at the end, to avoid factoring hazards like this.\n flushPassiveEffects();\n } while (rootWithPendingPassiveEffects !== null);\n\n flushRenderPhaseStrictModeWarningsInDEV();\n\n if ((executionContext & (RenderContext | CommitContext)) !== NoContext) {\n throw new Error('Should not already be working.');\n }\n\n var finishedWork = root.finishedWork;\n var lanes = root.finishedLanes;\n\n {\n markCommitStarted(lanes);\n }\n\n if (finishedWork === null) {\n\n {\n markCommitStopped();\n }\n\n return null;\n } else {\n {\n if (lanes === NoLanes) {\n error('root.finishedLanes should not be empty during a commit. This is a ' + 'bug in React.');\n }\n }\n }\n\n root.finishedWork = null;\n root.finishedLanes = NoLanes;\n\n if (finishedWork === root.current) {\n throw new Error('Cannot commit the same tree as before. This error is likely caused by ' + 'a bug in React. Please file an issue.');\n } // commitRoot never returns a continuation; it always finishes synchronously.\n // So we can clear these now to allow a new callback to be scheduled.\n\n\n root.callbackNode = null;\n root.callbackPriority = NoLane; // Update the first and last pending times on this root. The new first\n // pending time is whatever is left on the root fiber.\n\n var remainingLanes = mergeLanes(finishedWork.lanes, finishedWork.childLanes);\n markRootFinished(root, remainingLanes);\n\n if (root === workInProgressRoot) {\n // We can reset these now that they are finished.\n workInProgressRoot = null;\n workInProgress = null;\n workInProgressRootRenderLanes = NoLanes;\n } // If there are pending passive effects, schedule a callback to process them.\n // Do this as early as possible, so it is queued before anything else that\n // might get scheduled in the commit phase. (See #16714.)\n // TODO: Delete all other places that schedule the passive effect callback\n // They're redundant.\n\n\n if ((finishedWork.subtreeFlags & PassiveMask) !== NoFlags || (finishedWork.flags & PassiveMask) !== NoFlags) {\n if (!rootDoesHavePassiveEffects) {\n rootDoesHavePassiveEffects = true;\n // to store it in pendingPassiveTransitions until they get processed\n // We need to pass this through as an argument to commitRoot\n // because workInProgressTransitions might have changed between\n // the previous render and commit if we throttle the commit\n // with setTimeout\n\n pendingPassiveTransitions = transitions;\n scheduleCallback$1(NormalPriority, function () {\n flushPassiveEffects(); // This render triggered passive effects: release the root cache pool\n // *after* passive effects fire to avoid freeing a cache pool that may\n // be referenced by a node in the tree (HostRoot, Cache boundary etc)\n\n return null;\n });\n }\n } // Check if there are any effects in the whole tree.\n // TODO: This is left over from the effect list implementation, where we had\n // to check for the existence of `firstEffect` to satisfy Flow. I think the\n // only other reason this optimization exists is because it affects profiling.\n // Reconsider whether this is necessary.\n\n\n var subtreeHasEffects = (finishedWork.subtreeFlags & (BeforeMutationMask | MutationMask | LayoutMask | PassiveMask)) !== NoFlags;\n var rootHasEffect = (finishedWork.flags & (BeforeMutationMask | MutationMask | LayoutMask | PassiveMask)) !== NoFlags;\n\n if (subtreeHasEffects || rootHasEffect) {\n var prevTransition = ReactCurrentBatchConfig$3.transition;\n ReactCurrentBatchConfig$3.transition = null;\n var previousPriority = getCurrentUpdatePriority();\n setCurrentUpdatePriority(DiscreteEventPriority);\n var prevExecutionContext = executionContext;\n executionContext |= CommitContext; // Reset this to null before calling lifecycles\n\n ReactCurrentOwner$2.current = null; // The commit phase is broken into several sub-phases. We do a separate pass\n // of the effect list for each phase: all mutation effects come before all\n // layout effects, and so on.\n // The first phase a \"before mutation\" phase. We use this phase to read the\n // state of the host tree right before we mutate it. This is where\n // getSnapshotBeforeUpdate is called.\n\n var shouldFireAfterActiveInstanceBlur = commitBeforeMutationEffects(root, finishedWork);\n\n {\n // Mark the current commit time to be shared by all Profilers in this\n // batch. This enables them to be grouped later.\n recordCommitTime();\n }\n\n\n commitMutationEffects(root, finishedWork, lanes);\n\n resetAfterCommit(root.containerInfo); // The work-in-progress tree is now the current tree. This must come after\n // the mutation phase, so that the previous tree is still current during\n // componentWillUnmount, but before the layout phase, so that the finished\n // work is current during componentDidMount/Update.\n\n root.current = finishedWork; // The next phase is the layout phase, where we call effects that read\n\n {\n markLayoutEffectsStarted(lanes);\n }\n\n commitLayoutEffects(finishedWork, root, lanes);\n\n {\n markLayoutEffectsStopped();\n }\n // opportunity to paint.\n\n\n requestPaint();\n executionContext = prevExecutionContext; // Reset the priority to the previous non-sync value.\n\n setCurrentUpdatePriority(previousPriority);\n ReactCurrentBatchConfig$3.transition = prevTransition;\n } else {\n // No effects.\n root.current = finishedWork; // Measure these anyway so the flamegraph explicitly shows that there were\n // no effects.\n // TODO: Maybe there's a better way to report this.\n\n {\n recordCommitTime();\n }\n }\n\n var rootDidHavePassiveEffects = rootDoesHavePassiveEffects;\n\n if (rootDoesHavePassiveEffects) {\n // This commit has passive effects. Stash a reference to them. But don't\n // schedule a callback until after flushing layout work.\n rootDoesHavePassiveEffects = false;\n rootWithPendingPassiveEffects = root;\n pendingPassiveEffectsLanes = lanes;\n } else {\n\n {\n nestedPassiveUpdateCount = 0;\n rootWithPassiveNestedUpdates = null;\n }\n } // Read this again, since an effect might have updated it\n\n\n remainingLanes = root.pendingLanes; // Check if there's remaining work on this root\n // TODO: This is part of the `componentDidCatch` implementation. Its purpose\n // is to detect whether something might have called setState inside\n // `componentDidCatch`. The mechanism is known to be flawed because `setState`\n // inside `componentDidCatch` is itself flawed — that's why we recommend\n // `getDerivedStateFromError` instead. However, it could be improved by\n // checking if remainingLanes includes Sync work, instead of whether there's\n // any work remaining at all (which would also include stuff like Suspense\n // retries or transitions). It's been like this for a while, though, so fixing\n // it probably isn't that urgent.\n\n if (remainingLanes === NoLanes) {\n // If there's no remaining work, we can clear the set of already failed\n // error boundaries.\n legacyErrorBoundariesThatAlreadyFailed = null;\n }\n\n {\n if (!rootDidHavePassiveEffects) {\n commitDoubleInvokeEffectsInDEV(root.current, false);\n }\n }\n\n onCommitRoot(finishedWork.stateNode, renderPriorityLevel);\n\n {\n if (isDevToolsPresent) {\n root.memoizedUpdaters.clear();\n }\n }\n\n {\n onCommitRoot$1();\n } // Always call this before exiting `commitRoot`, to ensure that any\n // additional work on this root is scheduled.\n\n\n ensureRootIsScheduled(root, now());\n\n if (recoverableErrors !== null) {\n // There were errors during this render, but recovered from them without\n // needing to surface it to the UI. We log them here.\n var onRecoverableError = root.onRecoverableError;\n\n for (var i = 0; i < recoverableErrors.length; i++) {\n var recoverableError = recoverableErrors[i];\n var componentStack = recoverableError.stack;\n var digest = recoverableError.digest;\n onRecoverableError(recoverableError.value, {\n componentStack: componentStack,\n digest: digest\n });\n }\n }\n\n if (hasUncaughtError) {\n hasUncaughtError = false;\n var error$1 = firstUncaughtError;\n firstUncaughtError = null;\n throw error$1;\n } // If the passive effects are the result of a discrete render, flush them\n // synchronously at the end of the current task so that the result is\n // immediately observable. Otherwise, we assume that they are not\n // order-dependent and do not need to be observed by external systems, so we\n // can wait until after paint.\n // TODO: We can optimize this by not scheduling the callback earlier. Since we\n // currently schedule the callback in multiple places, will wait until those\n // are consolidated.\n\n\n if (includesSomeLane(pendingPassiveEffectsLanes, SyncLane) && root.tag !== LegacyRoot) {\n flushPassiveEffects();\n } // Read this again, since a passive effect might have updated it\n\n\n remainingLanes = root.pendingLanes;\n\n if (includesSomeLane(remainingLanes, SyncLane)) {\n {\n markNestedUpdateScheduled();\n } // Count the number of times the root synchronously re-renders without\n // finishing. If there are too many, it indicates an infinite update loop.\n\n\n if (root === rootWithNestedUpdates) {\n nestedUpdateCount++;\n } else {\n nestedUpdateCount = 0;\n rootWithNestedUpdates = root;\n }\n } else {\n nestedUpdateCount = 0;\n } // If layout work was scheduled, flush it now.\n\n\n flushSyncCallbacks();\n\n {\n markCommitStopped();\n }\n\n return null;\n}\n\nfunction flushPassiveEffects() {\n // Returns whether passive effects were flushed.\n // TODO: Combine this check with the one in flushPassiveEFfectsImpl. We should\n // probably just combine the two functions. I believe they were only separate\n // in the first place because we used to wrap it with\n // `Scheduler.runWithPriority`, which accepts a function. But now we track the\n // priority within React itself, so we can mutate the variable directly.\n if (rootWithPendingPassiveEffects !== null) {\n var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes);\n var priority = lowerEventPriority(DefaultEventPriority, renderPriority);\n var prevTransition = ReactCurrentBatchConfig$3.transition;\n var previousPriority = getCurrentUpdatePriority();\n\n try {\n ReactCurrentBatchConfig$3.transition = null;\n setCurrentUpdatePriority(priority);\n return flushPassiveEffectsImpl();\n } finally {\n setCurrentUpdatePriority(previousPriority);\n ReactCurrentBatchConfig$3.transition = prevTransition; // Once passive effects have run for the tree - giving components a\n }\n }\n\n return false;\n}\nfunction enqueuePendingPassiveProfilerEffect(fiber) {\n {\n pendingPassiveProfilerEffects.push(fiber);\n\n if (!rootDoesHavePassiveEffects) {\n rootDoesHavePassiveEffects = true;\n scheduleCallback$1(NormalPriority, function () {\n flushPassiveEffects();\n return null;\n });\n }\n }\n}\n\nfunction flushPassiveEffectsImpl() {\n if (rootWithPendingPassiveEffects === null) {\n return false;\n } // Cache and clear the transitions flag\n\n\n var transitions = pendingPassiveTransitions;\n pendingPassiveTransitions = null;\n var root = rootWithPendingPassiveEffects;\n var lanes = pendingPassiveEffectsLanes;\n rootWithPendingPassiveEffects = null; // TODO: This is sometimes out of sync with rootWithPendingPassiveEffects.\n // Figure out why and fix it. It's not causing any known issues (probably\n // because it's only used for profiling), but it's a refactor hazard.\n\n pendingPassiveEffectsLanes = NoLanes;\n\n if ((executionContext & (RenderContext | CommitContext)) !== NoContext) {\n throw new Error('Cannot flush passive effects while already rendering.');\n }\n\n {\n isFlushingPassiveEffects = true;\n didScheduleUpdateDuringPassiveEffects = false;\n }\n\n {\n markPassiveEffectsStarted(lanes);\n }\n\n var prevExecutionContext = executionContext;\n executionContext |= CommitContext;\n commitPassiveUnmountEffects(root.current);\n commitPassiveMountEffects(root, root.current, lanes, transitions); // TODO: Move to commitPassiveMountEffects\n\n {\n var profilerEffects = pendingPassiveProfilerEffects;\n pendingPassiveProfilerEffects = [];\n\n for (var i = 0; i < profilerEffects.length; i++) {\n var _fiber = profilerEffects[i];\n commitPassiveEffectDurations(root, _fiber);\n }\n }\n\n {\n markPassiveEffectsStopped();\n }\n\n {\n commitDoubleInvokeEffectsInDEV(root.current, true);\n }\n\n executionContext = prevExecutionContext;\n flushSyncCallbacks();\n\n {\n // If additional passive effects were scheduled, increment a counter. If this\n // exceeds the limit, we'll fire a warning.\n if (didScheduleUpdateDuringPassiveEffects) {\n if (root === rootWithPassiveNestedUpdates) {\n nestedPassiveUpdateCount++;\n } else {\n nestedPassiveUpdateCount = 0;\n rootWithPassiveNestedUpdates = root;\n }\n } else {\n nestedPassiveUpdateCount = 0;\n }\n\n isFlushingPassiveEffects = false;\n didScheduleUpdateDuringPassiveEffects = false;\n } // TODO: Move to commitPassiveMountEffects\n\n\n onPostCommitRoot(root);\n\n {\n var stateNode = root.current.stateNode;\n stateNode.effectDuration = 0;\n stateNode.passiveEffectDuration = 0;\n }\n\n return true;\n}\n\nfunction isAlreadyFailedLegacyErrorBoundary(instance) {\n return legacyErrorBoundariesThatAlreadyFailed !== null && legacyErrorBoundariesThatAlreadyFailed.has(instance);\n}\nfunction markLegacyErrorBoundaryAsFailed(instance) {\n if (legacyErrorBoundariesThatAlreadyFailed === null) {\n legacyErrorBoundariesThatAlreadyFailed = new Set([instance]);\n } else {\n legacyErrorBoundariesThatAlreadyFailed.add(instance);\n }\n}\n\nfunction prepareToThrowUncaughtError(error) {\n if (!hasUncaughtError) {\n hasUncaughtError = true;\n firstUncaughtError = error;\n }\n}\n\nvar onUncaughtError = prepareToThrowUncaughtError;\n\nfunction captureCommitPhaseErrorOnRoot(rootFiber, sourceFiber, error) {\n var errorInfo = createCapturedValueAtFiber(error, sourceFiber);\n var update = createRootErrorUpdate(rootFiber, errorInfo, SyncLane);\n var root = enqueueUpdate(rootFiber, update, SyncLane);\n var eventTime = requestEventTime();\n\n if (root !== null) {\n markRootUpdated(root, SyncLane, eventTime);\n ensureRootIsScheduled(root, eventTime);\n }\n}\n\nfunction captureCommitPhaseError(sourceFiber, nearestMountedAncestor, error$1) {\n {\n reportUncaughtErrorInDEV(error$1);\n setIsRunningInsertionEffect(false);\n }\n\n if (sourceFiber.tag === HostRoot) {\n // Error was thrown at the root. There is no parent, so the root\n // itself should capture it.\n captureCommitPhaseErrorOnRoot(sourceFiber, sourceFiber, error$1);\n return;\n }\n\n var fiber = null;\n\n {\n fiber = nearestMountedAncestor;\n }\n\n while (fiber !== null) {\n if (fiber.tag === HostRoot) {\n captureCommitPhaseErrorOnRoot(fiber, sourceFiber, error$1);\n return;\n } else if (fiber.tag === ClassComponent) {\n var ctor = fiber.type;\n var instance = fiber.stateNode;\n\n if (typeof ctor.getDerivedStateFromError === 'function' || typeof instance.componentDidCatch === 'function' && !isAlreadyFailedLegacyErrorBoundary(instance)) {\n var errorInfo = createCapturedValueAtFiber(error$1, sourceFiber);\n var update = createClassErrorUpdate(fiber, errorInfo, SyncLane);\n var root = enqueueUpdate(fiber, update, SyncLane);\n var eventTime = requestEventTime();\n\n if (root !== null) {\n markRootUpdated(root, SyncLane, eventTime);\n ensureRootIsScheduled(root, eventTime);\n }\n\n return;\n }\n }\n\n fiber = fiber.return;\n }\n\n {\n // TODO: Until we re-land skipUnmountedBoundaries (see #20147), this warning\n // will fire for errors that are thrown by destroy functions inside deleted\n // trees. What it should instead do is propagate the error to the parent of\n // the deleted tree. In the meantime, do not add this warning to the\n // allowlist; this is only for our internal use.\n error('Internal React error: Attempted to capture a commit phase error ' + 'inside a detached tree. This indicates a bug in React. Likely ' + 'causes include deleting the same fiber more than once, committing an ' + 'already-finished tree, or an inconsistent return pointer.\\n\\n' + 'Error message:\\n\\n%s', error$1);\n }\n}\nfunction pingSuspendedRoot(root, wakeable, pingedLanes) {\n var pingCache = root.pingCache;\n\n if (pingCache !== null) {\n // The wakeable resolved, so we no longer need to memoize, because it will\n // never be thrown again.\n pingCache.delete(wakeable);\n }\n\n var eventTime = requestEventTime();\n markRootPinged(root, pingedLanes);\n warnIfSuspenseResolutionNotWrappedWithActDEV(root);\n\n if (workInProgressRoot === root && isSubsetOfLanes(workInProgressRootRenderLanes, pingedLanes)) {\n // Received a ping at the same priority level at which we're currently\n // rendering. We might want to restart this render. This should mirror\n // the logic of whether or not a root suspends once it completes.\n // TODO: If we're rendering sync either due to Sync, Batched or expired,\n // we should probably never restart.\n // If we're suspended with delay, or if it's a retry, we'll always suspend\n // so we can always restart.\n if (workInProgressRootExitStatus === RootSuspendedWithDelay || workInProgressRootExitStatus === RootSuspended && includesOnlyRetries(workInProgressRootRenderLanes) && now() - globalMostRecentFallbackTime < FALLBACK_THROTTLE_MS) {\n // Restart from the root.\n prepareFreshStack(root, NoLanes);\n } else {\n // Even though we can't restart right now, we might get an\n // opportunity later. So we mark this render as having a ping.\n workInProgressRootPingedLanes = mergeLanes(workInProgressRootPingedLanes, pingedLanes);\n }\n }\n\n ensureRootIsScheduled(root, eventTime);\n}\n\nfunction retryTimedOutBoundary(boundaryFiber, retryLane) {\n // The boundary fiber (a Suspense component or SuspenseList component)\n // previously was rendered in its fallback state. One of the promises that\n // suspended it has resolved, which means at least part of the tree was\n // likely unblocked. Try rendering again, at a new lanes.\n if (retryLane === NoLane) {\n // TODO: Assign this to `suspenseState.retryLane`? to avoid\n // unnecessary entanglement?\n retryLane = requestRetryLane(boundaryFiber);\n } // TODO: Special case idle priority?\n\n\n var eventTime = requestEventTime();\n var root = enqueueConcurrentRenderForLane(boundaryFiber, retryLane);\n\n if (root !== null) {\n markRootUpdated(root, retryLane, eventTime);\n ensureRootIsScheduled(root, eventTime);\n }\n}\n\nfunction retryDehydratedSuspenseBoundary(boundaryFiber) {\n var suspenseState = boundaryFiber.memoizedState;\n var retryLane = NoLane;\n\n if (suspenseState !== null) {\n retryLane = suspenseState.retryLane;\n }\n\n retryTimedOutBoundary(boundaryFiber, retryLane);\n}\nfunction resolveRetryWakeable(boundaryFiber, wakeable) {\n var retryLane = NoLane; // Default\n\n var retryCache;\n\n switch (boundaryFiber.tag) {\n case SuspenseComponent:\n retryCache = boundaryFiber.stateNode;\n var suspenseState = boundaryFiber.memoizedState;\n\n if (suspenseState !== null) {\n retryLane = suspenseState.retryLane;\n }\n\n break;\n\n case SuspenseListComponent:\n retryCache = boundaryFiber.stateNode;\n break;\n\n default:\n throw new Error('Pinged unknown suspense boundary type. ' + 'This is probably a bug in React.');\n }\n\n if (retryCache !== null) {\n // The wakeable resolved, so we no longer need to memoize, because it will\n // never be thrown again.\n retryCache.delete(wakeable);\n }\n\n retryTimedOutBoundary(boundaryFiber, retryLane);\n} // Computes the next Just Noticeable Difference (JND) boundary.\n// The theory is that a person can't tell the difference between small differences in time.\n// Therefore, if we wait a bit longer than necessary that won't translate to a noticeable\n// difference in the experience. However, waiting for longer might mean that we can avoid\n// showing an intermediate loading state. The longer we have already waited, the harder it\n// is to tell small differences in time. Therefore, the longer we've already waited,\n// the longer we can wait additionally. At some point we have to give up though.\n// We pick a train model where the next boundary commits at a consistent schedule.\n// These particular numbers are vague estimates. We expect to adjust them based on research.\n\nfunction jnd(timeElapsed) {\n return timeElapsed < 120 ? 120 : timeElapsed < 480 ? 480 : timeElapsed < 1080 ? 1080 : timeElapsed < 1920 ? 1920 : timeElapsed < 3000 ? 3000 : timeElapsed < 4320 ? 4320 : ceil(timeElapsed / 1960) * 1960;\n}\n\nfunction checkForNestedUpdates() {\n if (nestedUpdateCount > NESTED_UPDATE_LIMIT) {\n nestedUpdateCount = 0;\n rootWithNestedUpdates = null;\n throw new Error('Maximum update depth exceeded. This can happen when a component ' + 'repeatedly calls setState inside componentWillUpdate or ' + 'componentDidUpdate. React limits the number of nested updates to ' + 'prevent infinite loops.');\n }\n\n {\n if (nestedPassiveUpdateCount > NESTED_PASSIVE_UPDATE_LIMIT) {\n nestedPassiveUpdateCount = 0;\n rootWithPassiveNestedUpdates = null;\n\n error('Maximum update depth exceeded. This can happen when a component ' + \"calls setState inside useEffect, but useEffect either doesn't \" + 'have a dependency array, or one of the dependencies changes on ' + 'every render.');\n }\n }\n}\n\nfunction flushRenderPhaseStrictModeWarningsInDEV() {\n {\n ReactStrictModeWarnings.flushLegacyContextWarning();\n\n {\n ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings();\n }\n }\n}\n\nfunction commitDoubleInvokeEffectsInDEV(fiber, hasPassiveEffects) {\n {\n // TODO (StrictEffects) Should we set a marker on the root if it contains strict effects\n // so we don't traverse unnecessarily? similar to subtreeFlags but just at the root level.\n // Maybe not a big deal since this is DEV only behavior.\n setCurrentFiber(fiber);\n invokeEffectsInDev(fiber, MountLayoutDev, invokeLayoutEffectUnmountInDEV);\n\n if (hasPassiveEffects) {\n invokeEffectsInDev(fiber, MountPassiveDev, invokePassiveEffectUnmountInDEV);\n }\n\n invokeEffectsInDev(fiber, MountLayoutDev, invokeLayoutEffectMountInDEV);\n\n if (hasPassiveEffects) {\n invokeEffectsInDev(fiber, MountPassiveDev, invokePassiveEffectMountInDEV);\n }\n\n resetCurrentFiber();\n }\n}\n\nfunction invokeEffectsInDev(firstChild, fiberFlags, invokeEffectFn) {\n {\n // We don't need to re-check StrictEffectsMode here.\n // This function is only called if that check has already passed.\n var current = firstChild;\n var subtreeRoot = null;\n\n while (current !== null) {\n var primarySubtreeFlag = current.subtreeFlags & fiberFlags;\n\n if (current !== subtreeRoot && current.child !== null && primarySubtreeFlag !== NoFlags) {\n current = current.child;\n } else {\n if ((current.flags & fiberFlags) !== NoFlags) {\n invokeEffectFn(current);\n }\n\n if (current.sibling !== null) {\n current = current.sibling;\n } else {\n current = subtreeRoot = current.return;\n }\n }\n }\n }\n}\n\nvar didWarnStateUpdateForNotYetMountedComponent = null;\nfunction warnAboutUpdateOnNotYetMountedFiberInDEV(fiber) {\n {\n if ((executionContext & RenderContext) !== NoContext) {\n // We let the other warning about render phase updates deal with this one.\n return;\n }\n\n if (!(fiber.mode & ConcurrentMode)) {\n return;\n }\n\n var tag = fiber.tag;\n\n if (tag !== IndeterminateComponent && tag !== HostRoot && tag !== ClassComponent && tag !== FunctionComponent && tag !== ForwardRef && tag !== MemoComponent && tag !== SimpleMemoComponent) {\n // Only warn for user-defined components, not internal ones like Suspense.\n return;\n } // We show the whole stack but dedupe on the top component's name because\n // the problematic code almost always lies inside that component.\n\n\n var componentName = getComponentNameFromFiber(fiber) || 'ReactComponent';\n\n if (didWarnStateUpdateForNotYetMountedComponent !== null) {\n if (didWarnStateUpdateForNotYetMountedComponent.has(componentName)) {\n return;\n }\n\n didWarnStateUpdateForNotYetMountedComponent.add(componentName);\n } else {\n didWarnStateUpdateForNotYetMountedComponent = new Set([componentName]);\n }\n\n var previousFiber = current;\n\n try {\n setCurrentFiber(fiber);\n\n error(\"Can't perform a React state update on a component that hasn't mounted yet. \" + 'This indicates that you have a side-effect in your render function that ' + 'asynchronously later calls tries to update the component. Move this work to ' + 'useEffect instead.');\n } finally {\n if (previousFiber) {\n setCurrentFiber(fiber);\n } else {\n resetCurrentFiber();\n }\n }\n }\n}\nvar beginWork$1;\n\n{\n var dummyFiber = null;\n\n beginWork$1 = function (current, unitOfWork, lanes) {\n // If a component throws an error, we replay it again in a synchronously\n // dispatched event, so that the debugger will treat it as an uncaught\n // error See ReactErrorUtils for more information.\n // Before entering the begin phase, copy the work-in-progress onto a dummy\n // fiber. If beginWork throws, we'll use this to reset the state.\n var originalWorkInProgressCopy = assignFiberPropertiesInDEV(dummyFiber, unitOfWork);\n\n try {\n return beginWork(current, unitOfWork, lanes);\n } catch (originalError) {\n if (didSuspendOrErrorWhileHydratingDEV() || originalError !== null && typeof originalError === 'object' && typeof originalError.then === 'function') {\n // Don't replay promises.\n // Don't replay errors if we are hydrating and have already suspended or handled an error\n throw originalError;\n } // Keep this code in sync with handleError; any changes here must have\n // corresponding changes there.\n\n\n resetContextDependencies();\n resetHooksAfterThrow(); // Don't reset current debug fiber, since we're about to work on the\n // same fiber again.\n // Unwind the failed stack frame\n\n unwindInterruptedWork(current, unitOfWork); // Restore the original properties of the fiber.\n\n assignFiberPropertiesInDEV(unitOfWork, originalWorkInProgressCopy);\n\n if ( unitOfWork.mode & ProfileMode) {\n // Reset the profiler timer.\n startProfilerTimer(unitOfWork);\n } // Run beginWork again.\n\n\n invokeGuardedCallback(null, beginWork, null, current, unitOfWork, lanes);\n\n if (hasCaughtError()) {\n var replayError = clearCaughtError();\n\n if (typeof replayError === 'object' && replayError !== null && replayError._suppressLogging && typeof originalError === 'object' && originalError !== null && !originalError._suppressLogging) {\n // If suppressed, let the flag carry over to the original error which is the one we'll rethrow.\n originalError._suppressLogging = true;\n }\n } // We always throw the original error in case the second render pass is not idempotent.\n // This can happen if a memoized function or CommonJS module doesn't throw after first invocation.\n\n\n throw originalError;\n }\n };\n}\n\nvar didWarnAboutUpdateInRender = false;\nvar didWarnAboutUpdateInRenderForAnotherComponent;\n\n{\n didWarnAboutUpdateInRenderForAnotherComponent = new Set();\n}\n\nfunction warnAboutRenderPhaseUpdatesInDEV(fiber) {\n {\n if (isRendering && !getIsUpdatingOpaqueValueInRenderPhaseInDEV()) {\n switch (fiber.tag) {\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n var renderingComponentName = workInProgress && getComponentNameFromFiber(workInProgress) || 'Unknown'; // Dedupe by the rendering component because it's the one that needs to be fixed.\n\n var dedupeKey = renderingComponentName;\n\n if (!didWarnAboutUpdateInRenderForAnotherComponent.has(dedupeKey)) {\n didWarnAboutUpdateInRenderForAnotherComponent.add(dedupeKey);\n var setStateComponentName = getComponentNameFromFiber(fiber) || 'Unknown';\n\n error('Cannot update a component (`%s`) while rendering a ' + 'different component (`%s`). To locate the bad setState() call inside `%s`, ' + 'follow the stack trace as described in https://reactjs.org/link/setstate-in-render', setStateComponentName, renderingComponentName, renderingComponentName);\n }\n\n break;\n }\n\n case ClassComponent:\n {\n if (!didWarnAboutUpdateInRender) {\n error('Cannot update during an existing state transition (such as ' + 'within `render`). Render methods should be a pure ' + 'function of props and state.');\n\n didWarnAboutUpdateInRender = true;\n }\n\n break;\n }\n }\n }\n }\n}\n\nfunction restorePendingUpdaters(root, lanes) {\n {\n if (isDevToolsPresent) {\n var memoizedUpdaters = root.memoizedUpdaters;\n memoizedUpdaters.forEach(function (schedulingFiber) {\n addFiberToLanesMap(root, schedulingFiber, lanes);\n }); // This function intentionally does not clear memoized updaters.\n // Those may still be relevant to the current commit\n // and a future one (e.g. Suspense).\n }\n }\n}\nvar fakeActCallbackNode = {};\n\nfunction scheduleCallback$1(priorityLevel, callback) {\n {\n // If we're currently inside an `act` scope, bypass Scheduler and push to\n // the `act` queue instead.\n var actQueue = ReactCurrentActQueue$1.current;\n\n if (actQueue !== null) {\n actQueue.push(callback);\n return fakeActCallbackNode;\n } else {\n return scheduleCallback(priorityLevel, callback);\n }\n }\n}\n\nfunction cancelCallback$1(callbackNode) {\n if ( callbackNode === fakeActCallbackNode) {\n return;\n } // In production, always call Scheduler. This function will be stripped out.\n\n\n return cancelCallback(callbackNode);\n}\n\nfunction shouldForceFlushFallbacksInDEV() {\n // Never force flush in production. This function should get stripped out.\n return ReactCurrentActQueue$1.current !== null;\n}\n\nfunction warnIfUpdatesNotWrappedWithActDEV(fiber) {\n {\n if (fiber.mode & ConcurrentMode) {\n if (!isConcurrentActEnvironment()) {\n // Not in an act environment. No need to warn.\n return;\n }\n } else {\n // Legacy mode has additional cases where we suppress a warning.\n if (!isLegacyActEnvironment()) {\n // Not in an act environment. No need to warn.\n return;\n }\n\n if (executionContext !== NoContext) {\n // Legacy mode doesn't warn if the update is batched, i.e.\n // batchedUpdates or flushSync.\n return;\n }\n\n if (fiber.tag !== FunctionComponent && fiber.tag !== ForwardRef && fiber.tag !== SimpleMemoComponent) {\n // For backwards compatibility with pre-hooks code, legacy mode only\n // warns for updates that originate from a hook.\n return;\n }\n }\n\n if (ReactCurrentActQueue$1.current === null) {\n var previousFiber = current;\n\n try {\n setCurrentFiber(fiber);\n\n error('An update to %s inside a test was not wrapped in act(...).\\n\\n' + 'When testing, code that causes React state updates should be ' + 'wrapped into act(...):\\n\\n' + 'act(() => {\\n' + ' /* fire events that update state */\\n' + '});\\n' + '/* assert on the output */\\n\\n' + \"This ensures that you're testing the behavior the user would see \" + 'in the browser.' + ' Learn more at https://reactjs.org/link/wrap-tests-with-act', getComponentNameFromFiber(fiber));\n } finally {\n if (previousFiber) {\n setCurrentFiber(fiber);\n } else {\n resetCurrentFiber();\n }\n }\n }\n }\n}\n\nfunction warnIfSuspenseResolutionNotWrappedWithActDEV(root) {\n {\n if (root.tag !== LegacyRoot && isConcurrentActEnvironment() && ReactCurrentActQueue$1.current === null) {\n error('A suspended resource finished loading inside a test, but the event ' + 'was not wrapped in act(...).\\n\\n' + 'When testing, code that resolves suspended data should be wrapped ' + 'into act(...):\\n\\n' + 'act(() => {\\n' + ' /* finish loading suspended data */\\n' + '});\\n' + '/* assert on the output */\\n\\n' + \"This ensures that you're testing the behavior the user would see \" + 'in the browser.' + ' Learn more at https://reactjs.org/link/wrap-tests-with-act');\n }\n }\n}\n\nfunction setIsRunningInsertionEffect(isRunning) {\n {\n isRunningInsertionEffect = isRunning;\n }\n}\n\n/* eslint-disable react-internal/prod-error-codes */\nvar resolveFamily = null; // $FlowFixMe Flow gets confused by a WeakSet feature check below.\n\nvar failedBoundaries = null;\nvar setRefreshHandler = function (handler) {\n {\n resolveFamily = handler;\n }\n};\nfunction resolveFunctionForHotReloading(type) {\n {\n if (resolveFamily === null) {\n // Hot reloading is disabled.\n return type;\n }\n\n var family = resolveFamily(type);\n\n if (family === undefined) {\n return type;\n } // Use the latest known implementation.\n\n\n return family.current;\n }\n}\nfunction resolveClassForHotReloading(type) {\n // No implementation differences.\n return resolveFunctionForHotReloading(type);\n}\nfunction resolveForwardRefForHotReloading(type) {\n {\n if (resolveFamily === null) {\n // Hot reloading is disabled.\n return type;\n }\n\n var family = resolveFamily(type);\n\n if (family === undefined) {\n // Check if we're dealing with a real forwardRef. Don't want to crash early.\n if (type !== null && type !== undefined && typeof type.render === 'function') {\n // ForwardRef is special because its resolved .type is an object,\n // but it's possible that we only have its inner render function in the map.\n // If that inner render function is different, we'll build a new forwardRef type.\n var currentRender = resolveFunctionForHotReloading(type.render);\n\n if (type.render !== currentRender) {\n var syntheticType = {\n $$typeof: REACT_FORWARD_REF_TYPE,\n render: currentRender\n };\n\n if (type.displayName !== undefined) {\n syntheticType.displayName = type.displayName;\n }\n\n return syntheticType;\n }\n }\n\n return type;\n } // Use the latest known implementation.\n\n\n return family.current;\n }\n}\nfunction isCompatibleFamilyForHotReloading(fiber, element) {\n {\n if (resolveFamily === null) {\n // Hot reloading is disabled.\n return false;\n }\n\n var prevType = fiber.elementType;\n var nextType = element.type; // If we got here, we know types aren't === equal.\n\n var needsCompareFamilies = false;\n var $$typeofNextType = typeof nextType === 'object' && nextType !== null ? nextType.$$typeof : null;\n\n switch (fiber.tag) {\n case ClassComponent:\n {\n if (typeof nextType === 'function') {\n needsCompareFamilies = true;\n }\n\n break;\n }\n\n case FunctionComponent:\n {\n if (typeof nextType === 'function') {\n needsCompareFamilies = true;\n } else if ($$typeofNextType === REACT_LAZY_TYPE) {\n // We don't know the inner type yet.\n // We're going to assume that the lazy inner type is stable,\n // and so it is sufficient to avoid reconciling it away.\n // We're not going to unwrap or actually use the new lazy type.\n needsCompareFamilies = true;\n }\n\n break;\n }\n\n case ForwardRef:\n {\n if ($$typeofNextType === REACT_FORWARD_REF_TYPE) {\n needsCompareFamilies = true;\n } else if ($$typeofNextType === REACT_LAZY_TYPE) {\n needsCompareFamilies = true;\n }\n\n break;\n }\n\n case MemoComponent:\n case SimpleMemoComponent:\n {\n if ($$typeofNextType === REACT_MEMO_TYPE) {\n // TODO: if it was but can no longer be simple,\n // we shouldn't set this.\n needsCompareFamilies = true;\n } else if ($$typeofNextType === REACT_LAZY_TYPE) {\n needsCompareFamilies = true;\n }\n\n break;\n }\n\n default:\n return false;\n } // Check if both types have a family and it's the same one.\n\n\n if (needsCompareFamilies) {\n // Note: memo() and forwardRef() we'll compare outer rather than inner type.\n // This means both of them need to be registered to preserve state.\n // If we unwrapped and compared the inner types for wrappers instead,\n // then we would risk falsely saying two separate memo(Foo)\n // calls are equivalent because they wrap the same Foo function.\n var prevFamily = resolveFamily(prevType);\n\n if (prevFamily !== undefined && prevFamily === resolveFamily(nextType)) {\n return true;\n }\n }\n\n return false;\n }\n}\nfunction markFailedErrorBoundaryForHotReloading(fiber) {\n {\n if (resolveFamily === null) {\n // Hot reloading is disabled.\n return;\n }\n\n if (typeof WeakSet !== 'function') {\n return;\n }\n\n if (failedBoundaries === null) {\n failedBoundaries = new WeakSet();\n }\n\n failedBoundaries.add(fiber);\n }\n}\nvar scheduleRefresh = function (root, update) {\n {\n if (resolveFamily === null) {\n // Hot reloading is disabled.\n return;\n }\n\n var staleFamilies = update.staleFamilies,\n updatedFamilies = update.updatedFamilies;\n flushPassiveEffects();\n flushSync(function () {\n scheduleFibersWithFamiliesRecursively(root.current, updatedFamilies, staleFamilies);\n });\n }\n};\nvar scheduleRoot = function (root, element) {\n {\n if (root.context !== emptyContextObject) {\n // Super edge case: root has a legacy _renderSubtree context\n // but we don't know the parentComponent so we can't pass it.\n // Just ignore. We'll delete this with _renderSubtree code path later.\n return;\n }\n\n flushPassiveEffects();\n flushSync(function () {\n updateContainer(element, root, null, null);\n });\n }\n};\n\nfunction scheduleFibersWithFamiliesRecursively(fiber, updatedFamilies, staleFamilies) {\n {\n var alternate = fiber.alternate,\n child = fiber.child,\n sibling = fiber.sibling,\n tag = fiber.tag,\n type = fiber.type;\n var candidateType = null;\n\n switch (tag) {\n case FunctionComponent:\n case SimpleMemoComponent:\n case ClassComponent:\n candidateType = type;\n break;\n\n case ForwardRef:\n candidateType = type.render;\n break;\n }\n\n if (resolveFamily === null) {\n throw new Error('Expected resolveFamily to be set during hot reload.');\n }\n\n var needsRender = false;\n var needsRemount = false;\n\n if (candidateType !== null) {\n var family = resolveFamily(candidateType);\n\n if (family !== undefined) {\n if (staleFamilies.has(family)) {\n needsRemount = true;\n } else if (updatedFamilies.has(family)) {\n if (tag === ClassComponent) {\n needsRemount = true;\n } else {\n needsRender = true;\n }\n }\n }\n }\n\n if (failedBoundaries !== null) {\n if (failedBoundaries.has(fiber) || alternate !== null && failedBoundaries.has(alternate)) {\n needsRemount = true;\n }\n }\n\n if (needsRemount) {\n fiber._debugNeedsRemount = true;\n }\n\n if (needsRemount || needsRender) {\n var _root = enqueueConcurrentRenderForLane(fiber, SyncLane);\n\n if (_root !== null) {\n scheduleUpdateOnFiber(_root, fiber, SyncLane, NoTimestamp);\n }\n }\n\n if (child !== null && !needsRemount) {\n scheduleFibersWithFamiliesRecursively(child, updatedFamilies, staleFamilies);\n }\n\n if (sibling !== null) {\n scheduleFibersWithFamiliesRecursively(sibling, updatedFamilies, staleFamilies);\n }\n }\n}\n\nvar findHostInstancesForRefresh = function (root, families) {\n {\n var hostInstances = new Set();\n var types = new Set(families.map(function (family) {\n return family.current;\n }));\n findHostInstancesForMatchingFibersRecursively(root.current, types, hostInstances);\n return hostInstances;\n }\n};\n\nfunction findHostInstancesForMatchingFibersRecursively(fiber, types, hostInstances) {\n {\n var child = fiber.child,\n sibling = fiber.sibling,\n tag = fiber.tag,\n type = fiber.type;\n var candidateType = null;\n\n switch (tag) {\n case FunctionComponent:\n case SimpleMemoComponent:\n case ClassComponent:\n candidateType = type;\n break;\n\n case ForwardRef:\n candidateType = type.render;\n break;\n }\n\n var didMatch = false;\n\n if (candidateType !== null) {\n if (types.has(candidateType)) {\n didMatch = true;\n }\n }\n\n if (didMatch) {\n // We have a match. This only drills down to the closest host components.\n // There's no need to search deeper because for the purpose of giving\n // visual feedback, \"flashing\" outermost parent rectangles is sufficient.\n findHostInstancesForFiberShallowly(fiber, hostInstances);\n } else {\n // If there's no match, maybe there will be one further down in the child tree.\n if (child !== null) {\n findHostInstancesForMatchingFibersRecursively(child, types, hostInstances);\n }\n }\n\n if (sibling !== null) {\n findHostInstancesForMatchingFibersRecursively(sibling, types, hostInstances);\n }\n }\n}\n\nfunction findHostInstancesForFiberShallowly(fiber, hostInstances) {\n {\n var foundHostInstances = findChildHostInstancesForFiberShallowly(fiber, hostInstances);\n\n if (foundHostInstances) {\n return;\n } // If we didn't find any host children, fallback to closest host parent.\n\n\n var node = fiber;\n\n while (true) {\n switch (node.tag) {\n case HostComponent:\n hostInstances.add(node.stateNode);\n return;\n\n case HostPortal:\n hostInstances.add(node.stateNode.containerInfo);\n return;\n\n case HostRoot:\n hostInstances.add(node.stateNode.containerInfo);\n return;\n }\n\n if (node.return === null) {\n throw new Error('Expected to reach root first.');\n }\n\n node = node.return;\n }\n }\n}\n\nfunction findChildHostInstancesForFiberShallowly(fiber, hostInstances) {\n {\n var node = fiber;\n var foundHostInstances = false;\n\n while (true) {\n if (node.tag === HostComponent) {\n // We got a match.\n foundHostInstances = true;\n hostInstances.add(node.stateNode); // There may still be more, so keep searching.\n } else if (node.child !== null) {\n node.child.return = node;\n node = node.child;\n continue;\n }\n\n if (node === fiber) {\n return foundHostInstances;\n }\n\n while (node.sibling === null) {\n if (node.return === null || node.return === fiber) {\n return foundHostInstances;\n }\n\n node = node.return;\n }\n\n node.sibling.return = node.return;\n node = node.sibling;\n }\n }\n\n return false;\n}\n\nvar hasBadMapPolyfill;\n\n{\n hasBadMapPolyfill = false;\n\n try {\n var nonExtensibleObject = Object.preventExtensions({});\n /* eslint-disable no-new */\n\n new Map([[nonExtensibleObject, null]]);\n new Set([nonExtensibleObject]);\n /* eslint-enable no-new */\n } catch (e) {\n // TODO: Consider warning about bad polyfills\n hasBadMapPolyfill = true;\n }\n}\n\nfunction FiberNode(tag, pendingProps, key, mode) {\n // Instance\n this.tag = tag;\n this.key = key;\n this.elementType = null;\n this.type = null;\n this.stateNode = null; // Fiber\n\n this.return = null;\n this.child = null;\n this.sibling = null;\n this.index = 0;\n this.ref = null;\n this.pendingProps = pendingProps;\n this.memoizedProps = null;\n this.updateQueue = null;\n this.memoizedState = null;\n this.dependencies = null;\n this.mode = mode; // Effects\n\n this.flags = NoFlags;\n this.subtreeFlags = NoFlags;\n this.deletions = null;\n this.lanes = NoLanes;\n this.childLanes = NoLanes;\n this.alternate = null;\n\n {\n // Note: The following is done to avoid a v8 performance cliff.\n //\n // Initializing the fields below to smis and later updating them with\n // double values will cause Fibers to end up having separate shapes.\n // This behavior/bug has something to do with Object.preventExtension().\n // Fortunately this only impacts DEV builds.\n // Unfortunately it makes React unusably slow for some applications.\n // To work around this, initialize the fields below with doubles.\n //\n // Learn more about this here:\n // https://github.com/facebook/react/issues/14365\n // https://bugs.chromium.org/p/v8/issues/detail?id=8538\n this.actualDuration = Number.NaN;\n this.actualStartTime = Number.NaN;\n this.selfBaseDuration = Number.NaN;\n this.treeBaseDuration = Number.NaN; // It's okay to replace the initial doubles with smis after initialization.\n // This won't trigger the performance cliff mentioned above,\n // and it simplifies other profiler code (including DevTools).\n\n this.actualDuration = 0;\n this.actualStartTime = -1;\n this.selfBaseDuration = 0;\n this.treeBaseDuration = 0;\n }\n\n {\n // This isn't directly used but is handy for debugging internals:\n this._debugSource = null;\n this._debugOwner = null;\n this._debugNeedsRemount = false;\n this._debugHookTypes = null;\n\n if (!hasBadMapPolyfill && typeof Object.preventExtensions === 'function') {\n Object.preventExtensions(this);\n }\n }\n} // This is a constructor function, rather than a POJO constructor, still\n// please ensure we do the following:\n// 1) Nobody should add any instance methods on this. Instance methods can be\n// more difficult to predict when they get optimized and they are almost\n// never inlined properly in static compilers.\n// 2) Nobody should rely on `instanceof Fiber` for type testing. We should\n// always know when it is a fiber.\n// 3) We might want to experiment with using numeric keys since they are easier\n// to optimize in a non-JIT environment.\n// 4) We can easily go from a constructor to a createFiber object literal if that\n// is faster.\n// 5) It should be easy to port this to a C struct and keep a C implementation\n// compatible.\n\n\nvar createFiber = function (tag, pendingProps, key, mode) {\n // $FlowFixMe: the shapes are exact here but Flow doesn't like constructors\n return new FiberNode(tag, pendingProps, key, mode);\n};\n\nfunction shouldConstruct$1(Component) {\n var prototype = Component.prototype;\n return !!(prototype && prototype.isReactComponent);\n}\n\nfunction isSimpleFunctionComponent(type) {\n return typeof type === 'function' && !shouldConstruct$1(type) && type.defaultProps === undefined;\n}\nfunction resolveLazyComponentTag(Component) {\n if (typeof Component === 'function') {\n return shouldConstruct$1(Component) ? ClassComponent : FunctionComponent;\n } else if (Component !== undefined && Component !== null) {\n var $$typeof = Component.$$typeof;\n\n if ($$typeof === REACT_FORWARD_REF_TYPE) {\n return ForwardRef;\n }\n\n if ($$typeof === REACT_MEMO_TYPE) {\n return MemoComponent;\n }\n }\n\n return IndeterminateComponent;\n} // This is used to create an alternate fiber to do work on.\n\nfunction createWorkInProgress(current, pendingProps) {\n var workInProgress = current.alternate;\n\n if (workInProgress === null) {\n // We use a double buffering pooling technique because we know that we'll\n // only ever need at most two versions of a tree. We pool the \"other\" unused\n // node that we're free to reuse. This is lazily created to avoid allocating\n // extra objects for things that are never updated. It also allow us to\n // reclaim the extra memory if needed.\n workInProgress = createFiber(current.tag, pendingProps, current.key, current.mode);\n workInProgress.elementType = current.elementType;\n workInProgress.type = current.type;\n workInProgress.stateNode = current.stateNode;\n\n {\n // DEV-only fields\n workInProgress._debugSource = current._debugSource;\n workInProgress._debugOwner = current._debugOwner;\n workInProgress._debugHookTypes = current._debugHookTypes;\n }\n\n workInProgress.alternate = current;\n current.alternate = workInProgress;\n } else {\n workInProgress.pendingProps = pendingProps; // Needed because Blocks store data on type.\n\n workInProgress.type = current.type; // We already have an alternate.\n // Reset the effect tag.\n\n workInProgress.flags = NoFlags; // The effects are no longer valid.\n\n workInProgress.subtreeFlags = NoFlags;\n workInProgress.deletions = null;\n\n {\n // We intentionally reset, rather than copy, actualDuration & actualStartTime.\n // This prevents time from endlessly accumulating in new commits.\n // This has the downside of resetting values for different priority renders,\n // But works for yielding (the common case) and should support resuming.\n workInProgress.actualDuration = 0;\n workInProgress.actualStartTime = -1;\n }\n } // Reset all effects except static ones.\n // Static effects are not specific to a render.\n\n\n workInProgress.flags = current.flags & StaticMask;\n workInProgress.childLanes = current.childLanes;\n workInProgress.lanes = current.lanes;\n workInProgress.child = current.child;\n workInProgress.memoizedProps = current.memoizedProps;\n workInProgress.memoizedState = current.memoizedState;\n workInProgress.updateQueue = current.updateQueue; // Clone the dependencies object. This is mutated during the render phase, so\n // it cannot be shared with the current fiber.\n\n var currentDependencies = current.dependencies;\n workInProgress.dependencies = currentDependencies === null ? null : {\n lanes: currentDependencies.lanes,\n firstContext: currentDependencies.firstContext\n }; // These will be overridden during the parent's reconciliation\n\n workInProgress.sibling = current.sibling;\n workInProgress.index = current.index;\n workInProgress.ref = current.ref;\n\n {\n workInProgress.selfBaseDuration = current.selfBaseDuration;\n workInProgress.treeBaseDuration = current.treeBaseDuration;\n }\n\n {\n workInProgress._debugNeedsRemount = current._debugNeedsRemount;\n\n switch (workInProgress.tag) {\n case IndeterminateComponent:\n case FunctionComponent:\n case SimpleMemoComponent:\n workInProgress.type = resolveFunctionForHotReloading(current.type);\n break;\n\n case ClassComponent:\n workInProgress.type = resolveClassForHotReloading(current.type);\n break;\n\n case ForwardRef:\n workInProgress.type = resolveForwardRefForHotReloading(current.type);\n break;\n }\n }\n\n return workInProgress;\n} // Used to reuse a Fiber for a second pass.\n\nfunction resetWorkInProgress(workInProgress, renderLanes) {\n // This resets the Fiber to what createFiber or createWorkInProgress would\n // have set the values to before during the first pass. Ideally this wouldn't\n // be necessary but unfortunately many code paths reads from the workInProgress\n // when they should be reading from current and writing to workInProgress.\n // We assume pendingProps, index, key, ref, return are still untouched to\n // avoid doing another reconciliation.\n // Reset the effect flags but keep any Placement tags, since that's something\n // that child fiber is setting, not the reconciliation.\n workInProgress.flags &= StaticMask | Placement; // The effects are no longer valid.\n\n var current = workInProgress.alternate;\n\n if (current === null) {\n // Reset to createFiber's initial values.\n workInProgress.childLanes = NoLanes;\n workInProgress.lanes = renderLanes;\n workInProgress.child = null;\n workInProgress.subtreeFlags = NoFlags;\n workInProgress.memoizedProps = null;\n workInProgress.memoizedState = null;\n workInProgress.updateQueue = null;\n workInProgress.dependencies = null;\n workInProgress.stateNode = null;\n\n {\n // Note: We don't reset the actualTime counts. It's useful to accumulate\n // actual time across multiple render passes.\n workInProgress.selfBaseDuration = 0;\n workInProgress.treeBaseDuration = 0;\n }\n } else {\n // Reset to the cloned values that createWorkInProgress would've.\n workInProgress.childLanes = current.childLanes;\n workInProgress.lanes = current.lanes;\n workInProgress.child = current.child;\n workInProgress.subtreeFlags = NoFlags;\n workInProgress.deletions = null;\n workInProgress.memoizedProps = current.memoizedProps;\n workInProgress.memoizedState = current.memoizedState;\n workInProgress.updateQueue = current.updateQueue; // Needed because Blocks store data on type.\n\n workInProgress.type = current.type; // Clone the dependencies object. This is mutated during the render phase, so\n // it cannot be shared with the current fiber.\n\n var currentDependencies = current.dependencies;\n workInProgress.dependencies = currentDependencies === null ? null : {\n lanes: currentDependencies.lanes,\n firstContext: currentDependencies.firstContext\n };\n\n {\n // Note: We don't reset the actualTime counts. It's useful to accumulate\n // actual time across multiple render passes.\n workInProgress.selfBaseDuration = current.selfBaseDuration;\n workInProgress.treeBaseDuration = current.treeBaseDuration;\n }\n }\n\n return workInProgress;\n}\nfunction createHostRootFiber(tag, isStrictMode, concurrentUpdatesByDefaultOverride) {\n var mode;\n\n if (tag === ConcurrentRoot) {\n mode = ConcurrentMode;\n\n if (isStrictMode === true) {\n mode |= StrictLegacyMode;\n\n {\n mode |= StrictEffectsMode;\n }\n }\n } else {\n mode = NoMode;\n }\n\n if ( isDevToolsPresent) {\n // Always collect profile timings when DevTools are present.\n // This enables DevTools to start capturing timing at any point–\n // Without some nodes in the tree having empty base times.\n mode |= ProfileMode;\n }\n\n return createFiber(HostRoot, null, null, mode);\n}\nfunction createFiberFromTypeAndProps(type, // React$ElementType\nkey, pendingProps, owner, mode, lanes) {\n var fiberTag = IndeterminateComponent; // The resolved type is set if we know what the final type will be. I.e. it's not lazy.\n\n var resolvedType = type;\n\n if (typeof type === 'function') {\n if (shouldConstruct$1(type)) {\n fiberTag = ClassComponent;\n\n {\n resolvedType = resolveClassForHotReloading(resolvedType);\n }\n } else {\n {\n resolvedType = resolveFunctionForHotReloading(resolvedType);\n }\n }\n } else if (typeof type === 'string') {\n fiberTag = HostComponent;\n } else {\n getTag: switch (type) {\n case REACT_FRAGMENT_TYPE:\n return createFiberFromFragment(pendingProps.children, mode, lanes, key);\n\n case REACT_STRICT_MODE_TYPE:\n fiberTag = Mode;\n mode |= StrictLegacyMode;\n\n if ( (mode & ConcurrentMode) !== NoMode) {\n // Strict effects should never run on legacy roots\n mode |= StrictEffectsMode;\n }\n\n break;\n\n case REACT_PROFILER_TYPE:\n return createFiberFromProfiler(pendingProps, mode, lanes, key);\n\n case REACT_SUSPENSE_TYPE:\n return createFiberFromSuspense(pendingProps, mode, lanes, key);\n\n case REACT_SUSPENSE_LIST_TYPE:\n return createFiberFromSuspenseList(pendingProps, mode, lanes, key);\n\n case REACT_OFFSCREEN_TYPE:\n return createFiberFromOffscreen(pendingProps, mode, lanes, key);\n\n case REACT_LEGACY_HIDDEN_TYPE:\n\n // eslint-disable-next-line no-fallthrough\n\n case REACT_SCOPE_TYPE:\n\n // eslint-disable-next-line no-fallthrough\n\n case REACT_CACHE_TYPE:\n\n // eslint-disable-next-line no-fallthrough\n\n case REACT_TRACING_MARKER_TYPE:\n\n // eslint-disable-next-line no-fallthrough\n\n case REACT_DEBUG_TRACING_MODE_TYPE:\n\n // eslint-disable-next-line no-fallthrough\n\n default:\n {\n if (typeof type === 'object' && type !== null) {\n switch (type.$$typeof) {\n case REACT_PROVIDER_TYPE:\n fiberTag = ContextProvider;\n break getTag;\n\n case REACT_CONTEXT_TYPE:\n // This is a consumer\n fiberTag = ContextConsumer;\n break getTag;\n\n case REACT_FORWARD_REF_TYPE:\n fiberTag = ForwardRef;\n\n {\n resolvedType = resolveForwardRefForHotReloading(resolvedType);\n }\n\n break getTag;\n\n case REACT_MEMO_TYPE:\n fiberTag = MemoComponent;\n break getTag;\n\n case REACT_LAZY_TYPE:\n fiberTag = LazyComponent;\n resolvedType = null;\n break getTag;\n }\n }\n\n var info = '';\n\n {\n if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {\n info += ' You likely forgot to export your component from the file ' + \"it's defined in, or you might have mixed up default and \" + 'named imports.';\n }\n\n var ownerName = owner ? getComponentNameFromFiber(owner) : null;\n\n if (ownerName) {\n info += '\\n\\nCheck the render method of `' + ownerName + '`.';\n }\n }\n\n throw new Error('Element type is invalid: expected a string (for built-in ' + 'components) or a class/function (for composite components) ' + (\"but got: \" + (type == null ? type : typeof type) + \".\" + info));\n }\n }\n }\n\n var fiber = createFiber(fiberTag, pendingProps, key, mode);\n fiber.elementType = type;\n fiber.type = resolvedType;\n fiber.lanes = lanes;\n\n {\n fiber._debugOwner = owner;\n }\n\n return fiber;\n}\nfunction createFiberFromElement(element, mode, lanes) {\n var owner = null;\n\n {\n owner = element._owner;\n }\n\n var type = element.type;\n var key = element.key;\n var pendingProps = element.props;\n var fiber = createFiberFromTypeAndProps(type, key, pendingProps, owner, mode, lanes);\n\n {\n fiber._debugSource = element._source;\n fiber._debugOwner = element._owner;\n }\n\n return fiber;\n}\nfunction createFiberFromFragment(elements, mode, lanes, key) {\n var fiber = createFiber(Fragment, elements, key, mode);\n fiber.lanes = lanes;\n return fiber;\n}\n\nfunction createFiberFromProfiler(pendingProps, mode, lanes, key) {\n {\n if (typeof pendingProps.id !== 'string') {\n error('Profiler must specify an \"id\" of type `string` as a prop. Received the type `%s` instead.', typeof pendingProps.id);\n }\n }\n\n var fiber = createFiber(Profiler, pendingProps, key, mode | ProfileMode);\n fiber.elementType = REACT_PROFILER_TYPE;\n fiber.lanes = lanes;\n\n {\n fiber.stateNode = {\n effectDuration: 0,\n passiveEffectDuration: 0\n };\n }\n\n return fiber;\n}\n\nfunction createFiberFromSuspense(pendingProps, mode, lanes, key) {\n var fiber = createFiber(SuspenseComponent, pendingProps, key, mode);\n fiber.elementType = REACT_SUSPENSE_TYPE;\n fiber.lanes = lanes;\n return fiber;\n}\nfunction createFiberFromSuspenseList(pendingProps, mode, lanes, key) {\n var fiber = createFiber(SuspenseListComponent, pendingProps, key, mode);\n fiber.elementType = REACT_SUSPENSE_LIST_TYPE;\n fiber.lanes = lanes;\n return fiber;\n}\nfunction createFiberFromOffscreen(pendingProps, mode, lanes, key) {\n var fiber = createFiber(OffscreenComponent, pendingProps, key, mode);\n fiber.elementType = REACT_OFFSCREEN_TYPE;\n fiber.lanes = lanes;\n var primaryChildInstance = {\n isHidden: false\n };\n fiber.stateNode = primaryChildInstance;\n return fiber;\n}\nfunction createFiberFromText(content, mode, lanes) {\n var fiber = createFiber(HostText, content, null, mode);\n fiber.lanes = lanes;\n return fiber;\n}\nfunction createFiberFromHostInstanceForDeletion() {\n var fiber = createFiber(HostComponent, null, null, NoMode);\n fiber.elementType = 'DELETED';\n return fiber;\n}\nfunction createFiberFromDehydratedFragment(dehydratedNode) {\n var fiber = createFiber(DehydratedFragment, null, null, NoMode);\n fiber.stateNode = dehydratedNode;\n return fiber;\n}\nfunction createFiberFromPortal(portal, mode, lanes) {\n var pendingProps = portal.children !== null ? portal.children : [];\n var fiber = createFiber(HostPortal, pendingProps, portal.key, mode);\n fiber.lanes = lanes;\n fiber.stateNode = {\n containerInfo: portal.containerInfo,\n pendingChildren: null,\n // Used by persistent updates\n implementation: portal.implementation\n };\n return fiber;\n} // Used for stashing WIP properties to replay failed work in DEV.\n\nfunction assignFiberPropertiesInDEV(target, source) {\n if (target === null) {\n // This Fiber's initial properties will always be overwritten.\n // We only use a Fiber to ensure the same hidden class so DEV isn't slow.\n target = createFiber(IndeterminateComponent, null, null, NoMode);\n } // This is intentionally written as a list of all properties.\n // We tried to use Object.assign() instead but this is called in\n // the hottest path, and Object.assign() was too slow:\n // https://github.com/facebook/react/issues/12502\n // This code is DEV-only so size is not a concern.\n\n\n target.tag = source.tag;\n target.key = source.key;\n target.elementType = source.elementType;\n target.type = source.type;\n target.stateNode = source.stateNode;\n target.return = source.return;\n target.child = source.child;\n target.sibling = source.sibling;\n target.index = source.index;\n target.ref = source.ref;\n target.pendingProps = source.pendingProps;\n target.memoizedProps = source.memoizedProps;\n target.updateQueue = source.updateQueue;\n target.memoizedState = source.memoizedState;\n target.dependencies = source.dependencies;\n target.mode = source.mode;\n target.flags = source.flags;\n target.subtreeFlags = source.subtreeFlags;\n target.deletions = source.deletions;\n target.lanes = source.lanes;\n target.childLanes = source.childLanes;\n target.alternate = source.alternate;\n\n {\n target.actualDuration = source.actualDuration;\n target.actualStartTime = source.actualStartTime;\n target.selfBaseDuration = source.selfBaseDuration;\n target.treeBaseDuration = source.treeBaseDuration;\n }\n\n target._debugSource = source._debugSource;\n target._debugOwner = source._debugOwner;\n target._debugNeedsRemount = source._debugNeedsRemount;\n target._debugHookTypes = source._debugHookTypes;\n return target;\n}\n\nfunction FiberRootNode(containerInfo, tag, hydrate, identifierPrefix, onRecoverableError) {\n this.tag = tag;\n this.containerInfo = containerInfo;\n this.pendingChildren = null;\n this.current = null;\n this.pingCache = null;\n this.finishedWork = null;\n this.timeoutHandle = noTimeout;\n this.context = null;\n this.pendingContext = null;\n this.callbackNode = null;\n this.callbackPriority = NoLane;\n this.eventTimes = createLaneMap(NoLanes);\n this.expirationTimes = createLaneMap(NoTimestamp);\n this.pendingLanes = NoLanes;\n this.suspendedLanes = NoLanes;\n this.pingedLanes = NoLanes;\n this.expiredLanes = NoLanes;\n this.mutableReadLanes = NoLanes;\n this.finishedLanes = NoLanes;\n this.entangledLanes = NoLanes;\n this.entanglements = createLaneMap(NoLanes);\n this.identifierPrefix = identifierPrefix;\n this.onRecoverableError = onRecoverableError;\n\n {\n this.mutableSourceEagerHydrationData = null;\n }\n\n {\n this.effectDuration = 0;\n this.passiveEffectDuration = 0;\n }\n\n {\n this.memoizedUpdaters = new Set();\n var pendingUpdatersLaneMap = this.pendingUpdatersLaneMap = [];\n\n for (var _i = 0; _i < TotalLanes; _i++) {\n pendingUpdatersLaneMap.push(new Set());\n }\n }\n\n {\n switch (tag) {\n case ConcurrentRoot:\n this._debugRootType = hydrate ? 'hydrateRoot()' : 'createRoot()';\n break;\n\n case LegacyRoot:\n this._debugRootType = hydrate ? 'hydrate()' : 'render()';\n break;\n }\n }\n}\n\nfunction createFiberRoot(containerInfo, tag, hydrate, initialChildren, hydrationCallbacks, isStrictMode, concurrentUpdatesByDefaultOverride, // TODO: We have several of these arguments that are conceptually part of the\n// host config, but because they are passed in at runtime, we have to thread\n// them through the root constructor. Perhaps we should put them all into a\n// single type, like a DynamicHostConfig that is defined by the renderer.\nidentifierPrefix, onRecoverableError, transitionCallbacks) {\n var root = new FiberRootNode(containerInfo, tag, hydrate, identifierPrefix, onRecoverableError);\n // stateNode is any.\n\n\n var uninitializedFiber = createHostRootFiber(tag, isStrictMode);\n root.current = uninitializedFiber;\n uninitializedFiber.stateNode = root;\n\n {\n var _initialState = {\n element: initialChildren,\n isDehydrated: hydrate,\n cache: null,\n // not enabled yet\n transitions: null,\n pendingSuspenseBoundaries: null\n };\n uninitializedFiber.memoizedState = _initialState;\n }\n\n initializeUpdateQueue(uninitializedFiber);\n return root;\n}\n\nvar ReactVersion = '18.3.1';\n\nfunction createPortal(children, containerInfo, // TODO: figure out the API for cross-renderer implementation.\nimplementation) {\n var key = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;\n\n {\n checkKeyStringCoercion(key);\n }\n\n return {\n // This tag allow us to uniquely identify this as a React Portal\n $$typeof: REACT_PORTAL_TYPE,\n key: key == null ? null : '' + key,\n children: children,\n containerInfo: containerInfo,\n implementation: implementation\n };\n}\n\nvar didWarnAboutNestedUpdates;\nvar didWarnAboutFindNodeInStrictMode;\n\n{\n didWarnAboutNestedUpdates = false;\n didWarnAboutFindNodeInStrictMode = {};\n}\n\nfunction getContextForSubtree(parentComponent) {\n if (!parentComponent) {\n return emptyContextObject;\n }\n\n var fiber = get(parentComponent);\n var parentContext = findCurrentUnmaskedContext(fiber);\n\n if (fiber.tag === ClassComponent) {\n var Component = fiber.type;\n\n if (isContextProvider(Component)) {\n return processChildContext(fiber, Component, parentContext);\n }\n }\n\n return parentContext;\n}\n\nfunction findHostInstanceWithWarning(component, methodName) {\n {\n var fiber = get(component);\n\n if (fiber === undefined) {\n if (typeof component.render === 'function') {\n throw new Error('Unable to find node on an unmounted component.');\n } else {\n var keys = Object.keys(component).join(',');\n throw new Error(\"Argument appears to not be a ReactComponent. Keys: \" + keys);\n }\n }\n\n var hostFiber = findCurrentHostFiber(fiber);\n\n if (hostFiber === null) {\n return null;\n }\n\n if (hostFiber.mode & StrictLegacyMode) {\n var componentName = getComponentNameFromFiber(fiber) || 'Component';\n\n if (!didWarnAboutFindNodeInStrictMode[componentName]) {\n didWarnAboutFindNodeInStrictMode[componentName] = true;\n var previousFiber = current;\n\n try {\n setCurrentFiber(hostFiber);\n\n if (fiber.mode & StrictLegacyMode) {\n error('%s is deprecated in StrictMode. ' + '%s was passed an instance of %s which is inside StrictMode. ' + 'Instead, add a ref directly to the element you want to reference. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-find-node', methodName, methodName, componentName);\n } else {\n error('%s is deprecated in StrictMode. ' + '%s was passed an instance of %s which renders StrictMode children. ' + 'Instead, add a ref directly to the element you want to reference. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-find-node', methodName, methodName, componentName);\n }\n } finally {\n // Ideally this should reset to previous but this shouldn't be called in\n // render and there's another warning for that anyway.\n if (previousFiber) {\n setCurrentFiber(previousFiber);\n } else {\n resetCurrentFiber();\n }\n }\n }\n }\n\n return hostFiber.stateNode;\n }\n}\n\nfunction createContainer(containerInfo, tag, hydrationCallbacks, isStrictMode, concurrentUpdatesByDefaultOverride, identifierPrefix, onRecoverableError, transitionCallbacks) {\n var hydrate = false;\n var initialChildren = null;\n return createFiberRoot(containerInfo, tag, hydrate, initialChildren, hydrationCallbacks, isStrictMode, concurrentUpdatesByDefaultOverride, identifierPrefix, onRecoverableError);\n}\nfunction createHydrationContainer(initialChildren, // TODO: Remove `callback` when we delete legacy mode.\ncallback, containerInfo, tag, hydrationCallbacks, isStrictMode, concurrentUpdatesByDefaultOverride, identifierPrefix, onRecoverableError, transitionCallbacks) {\n var hydrate = true;\n var root = createFiberRoot(containerInfo, tag, hydrate, initialChildren, hydrationCallbacks, isStrictMode, concurrentUpdatesByDefaultOverride, identifierPrefix, onRecoverableError); // TODO: Move this to FiberRoot constructor\n\n root.context = getContextForSubtree(null); // Schedule the initial render. In a hydration root, this is different from\n // a regular update because the initial render must match was was rendered\n // on the server.\n // NOTE: This update intentionally doesn't have a payload. We're only using\n // the update to schedule work on the root fiber (and, for legacy roots, to\n // enqueue the callback if one is provided).\n\n var current = root.current;\n var eventTime = requestEventTime();\n var lane = requestUpdateLane(current);\n var update = createUpdate(eventTime, lane);\n update.callback = callback !== undefined && callback !== null ? callback : null;\n enqueueUpdate(current, update, lane);\n scheduleInitialHydrationOnRoot(root, lane, eventTime);\n return root;\n}\nfunction updateContainer(element, container, parentComponent, callback) {\n {\n onScheduleRoot(container, element);\n }\n\n var current$1 = container.current;\n var eventTime = requestEventTime();\n var lane = requestUpdateLane(current$1);\n\n {\n markRenderScheduled(lane);\n }\n\n var context = getContextForSubtree(parentComponent);\n\n if (container.context === null) {\n container.context = context;\n } else {\n container.pendingContext = context;\n }\n\n {\n if (isRendering && current !== null && !didWarnAboutNestedUpdates) {\n didWarnAboutNestedUpdates = true;\n\n error('Render methods should be a pure function of props and state; ' + 'triggering nested component updates from render is not allowed. ' + 'If necessary, trigger nested updates in componentDidUpdate.\\n\\n' + 'Check the render method of %s.', getComponentNameFromFiber(current) || 'Unknown');\n }\n }\n\n var update = createUpdate(eventTime, lane); // Caution: React DevTools currently depends on this property\n // being called \"element\".\n\n update.payload = {\n element: element\n };\n callback = callback === undefined ? null : callback;\n\n if (callback !== null) {\n {\n if (typeof callback !== 'function') {\n error('render(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callback);\n }\n }\n\n update.callback = callback;\n }\n\n var root = enqueueUpdate(current$1, update, lane);\n\n if (root !== null) {\n scheduleUpdateOnFiber(root, current$1, lane, eventTime);\n entangleTransitions(root, current$1, lane);\n }\n\n return lane;\n}\nfunction getPublicRootInstance(container) {\n var containerFiber = container.current;\n\n if (!containerFiber.child) {\n return null;\n }\n\n switch (containerFiber.child.tag) {\n case HostComponent:\n return getPublicInstance(containerFiber.child.stateNode);\n\n default:\n return containerFiber.child.stateNode;\n }\n}\nfunction attemptSynchronousHydration$1(fiber) {\n switch (fiber.tag) {\n case HostRoot:\n {\n var root = fiber.stateNode;\n\n if (isRootDehydrated(root)) {\n // Flush the first scheduled \"update\".\n var lanes = getHighestPriorityPendingLanes(root);\n flushRoot(root, lanes);\n }\n\n break;\n }\n\n case SuspenseComponent:\n {\n flushSync(function () {\n var root = enqueueConcurrentRenderForLane(fiber, SyncLane);\n\n if (root !== null) {\n var eventTime = requestEventTime();\n scheduleUpdateOnFiber(root, fiber, SyncLane, eventTime);\n }\n }); // If we're still blocked after this, we need to increase\n // the priority of any promises resolving within this\n // boundary so that they next attempt also has higher pri.\n\n var retryLane = SyncLane;\n markRetryLaneIfNotHydrated(fiber, retryLane);\n break;\n }\n }\n}\n\nfunction markRetryLaneImpl(fiber, retryLane) {\n var suspenseState = fiber.memoizedState;\n\n if (suspenseState !== null && suspenseState.dehydrated !== null) {\n suspenseState.retryLane = higherPriorityLane(suspenseState.retryLane, retryLane);\n }\n} // Increases the priority of thenables when they resolve within this boundary.\n\n\nfunction markRetryLaneIfNotHydrated(fiber, retryLane) {\n markRetryLaneImpl(fiber, retryLane);\n var alternate = fiber.alternate;\n\n if (alternate) {\n markRetryLaneImpl(alternate, retryLane);\n }\n}\nfunction attemptContinuousHydration$1(fiber) {\n if (fiber.tag !== SuspenseComponent) {\n // We ignore HostRoots here because we can't increase\n // their priority and they should not suspend on I/O,\n // since you have to wrap anything that might suspend in\n // Suspense.\n return;\n }\n\n var lane = SelectiveHydrationLane;\n var root = enqueueConcurrentRenderForLane(fiber, lane);\n\n if (root !== null) {\n var eventTime = requestEventTime();\n scheduleUpdateOnFiber(root, fiber, lane, eventTime);\n }\n\n markRetryLaneIfNotHydrated(fiber, lane);\n}\nfunction attemptHydrationAtCurrentPriority$1(fiber) {\n if (fiber.tag !== SuspenseComponent) {\n // We ignore HostRoots here because we can't increase\n // their priority other than synchronously flush it.\n return;\n }\n\n var lane = requestUpdateLane(fiber);\n var root = enqueueConcurrentRenderForLane(fiber, lane);\n\n if (root !== null) {\n var eventTime = requestEventTime();\n scheduleUpdateOnFiber(root, fiber, lane, eventTime);\n }\n\n markRetryLaneIfNotHydrated(fiber, lane);\n}\nfunction findHostInstanceWithNoPortals(fiber) {\n var hostFiber = findCurrentHostFiberWithNoPortals(fiber);\n\n if (hostFiber === null) {\n return null;\n }\n\n return hostFiber.stateNode;\n}\n\nvar shouldErrorImpl = function (fiber) {\n return null;\n};\n\nfunction shouldError(fiber) {\n return shouldErrorImpl(fiber);\n}\n\nvar shouldSuspendImpl = function (fiber) {\n return false;\n};\n\nfunction shouldSuspend(fiber) {\n return shouldSuspendImpl(fiber);\n}\nvar overrideHookState = null;\nvar overrideHookStateDeletePath = null;\nvar overrideHookStateRenamePath = null;\nvar overrideProps = null;\nvar overridePropsDeletePath = null;\nvar overridePropsRenamePath = null;\nvar scheduleUpdate = null;\nvar setErrorHandler = null;\nvar setSuspenseHandler = null;\n\n{\n var copyWithDeleteImpl = function (obj, path, index) {\n var key = path[index];\n var updated = isArray(obj) ? obj.slice() : assign({}, obj);\n\n if (index + 1 === path.length) {\n if (isArray(updated)) {\n updated.splice(key, 1);\n } else {\n delete updated[key];\n }\n\n return updated;\n } // $FlowFixMe number or string is fine here\n\n\n updated[key] = copyWithDeleteImpl(obj[key], path, index + 1);\n return updated;\n };\n\n var copyWithDelete = function (obj, path) {\n return copyWithDeleteImpl(obj, path, 0);\n };\n\n var copyWithRenameImpl = function (obj, oldPath, newPath, index) {\n var oldKey = oldPath[index];\n var updated = isArray(obj) ? obj.slice() : assign({}, obj);\n\n if (index + 1 === oldPath.length) {\n var newKey = newPath[index]; // $FlowFixMe number or string is fine here\n\n updated[newKey] = updated[oldKey];\n\n if (isArray(updated)) {\n updated.splice(oldKey, 1);\n } else {\n delete updated[oldKey];\n }\n } else {\n // $FlowFixMe number or string is fine here\n updated[oldKey] = copyWithRenameImpl( // $FlowFixMe number or string is fine here\n obj[oldKey], oldPath, newPath, index + 1);\n }\n\n return updated;\n };\n\n var copyWithRename = function (obj, oldPath, newPath) {\n if (oldPath.length !== newPath.length) {\n warn('copyWithRename() expects paths of the same length');\n\n return;\n } else {\n for (var i = 0; i < newPath.length - 1; i++) {\n if (oldPath[i] !== newPath[i]) {\n warn('copyWithRename() expects paths to be the same except for the deepest key');\n\n return;\n }\n }\n }\n\n return copyWithRenameImpl(obj, oldPath, newPath, 0);\n };\n\n var copyWithSetImpl = function (obj, path, index, value) {\n if (index >= path.length) {\n return value;\n }\n\n var key = path[index];\n var updated = isArray(obj) ? obj.slice() : assign({}, obj); // $FlowFixMe number or string is fine here\n\n updated[key] = copyWithSetImpl(obj[key], path, index + 1, value);\n return updated;\n };\n\n var copyWithSet = function (obj, path, value) {\n return copyWithSetImpl(obj, path, 0, value);\n };\n\n var findHook = function (fiber, id) {\n // For now, the \"id\" of stateful hooks is just the stateful hook index.\n // This may change in the future with e.g. nested hooks.\n var currentHook = fiber.memoizedState;\n\n while (currentHook !== null && id > 0) {\n currentHook = currentHook.next;\n id--;\n }\n\n return currentHook;\n }; // Support DevTools editable values for useState and useReducer.\n\n\n overrideHookState = function (fiber, id, path, value) {\n var hook = findHook(fiber, id);\n\n if (hook !== null) {\n var newState = copyWithSet(hook.memoizedState, path, value);\n hook.memoizedState = newState;\n hook.baseState = newState; // We aren't actually adding an update to the queue,\n // because there is no update we can add for useReducer hooks that won't trigger an error.\n // (There's no appropriate action type for DevTools overrides.)\n // As a result though, React will see the scheduled update as a noop and bailout.\n // Shallow cloning props works as a workaround for now to bypass the bailout check.\n\n fiber.memoizedProps = assign({}, fiber.memoizedProps);\n var root = enqueueConcurrentRenderForLane(fiber, SyncLane);\n\n if (root !== null) {\n scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp);\n }\n }\n };\n\n overrideHookStateDeletePath = function (fiber, id, path) {\n var hook = findHook(fiber, id);\n\n if (hook !== null) {\n var newState = copyWithDelete(hook.memoizedState, path);\n hook.memoizedState = newState;\n hook.baseState = newState; // We aren't actually adding an update to the queue,\n // because there is no update we can add for useReducer hooks that won't trigger an error.\n // (There's no appropriate action type for DevTools overrides.)\n // As a result though, React will see the scheduled update as a noop and bailout.\n // Shallow cloning props works as a workaround for now to bypass the bailout check.\n\n fiber.memoizedProps = assign({}, fiber.memoizedProps);\n var root = enqueueConcurrentRenderForLane(fiber, SyncLane);\n\n if (root !== null) {\n scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp);\n }\n }\n };\n\n overrideHookStateRenamePath = function (fiber, id, oldPath, newPath) {\n var hook = findHook(fiber, id);\n\n if (hook !== null) {\n var newState = copyWithRename(hook.memoizedState, oldPath, newPath);\n hook.memoizedState = newState;\n hook.baseState = newState; // We aren't actually adding an update to the queue,\n // because there is no update we can add for useReducer hooks that won't trigger an error.\n // (There's no appropriate action type for DevTools overrides.)\n // As a result though, React will see the scheduled update as a noop and bailout.\n // Shallow cloning props works as a workaround for now to bypass the bailout check.\n\n fiber.memoizedProps = assign({}, fiber.memoizedProps);\n var root = enqueueConcurrentRenderForLane(fiber, SyncLane);\n\n if (root !== null) {\n scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp);\n }\n }\n }; // Support DevTools props for function components, forwardRef, memo, host components, etc.\n\n\n overrideProps = function (fiber, path, value) {\n fiber.pendingProps = copyWithSet(fiber.memoizedProps, path, value);\n\n if (fiber.alternate) {\n fiber.alternate.pendingProps = fiber.pendingProps;\n }\n\n var root = enqueueConcurrentRenderForLane(fiber, SyncLane);\n\n if (root !== null) {\n scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp);\n }\n };\n\n overridePropsDeletePath = function (fiber, path) {\n fiber.pendingProps = copyWithDelete(fiber.memoizedProps, path);\n\n if (fiber.alternate) {\n fiber.alternate.pendingProps = fiber.pendingProps;\n }\n\n var root = enqueueConcurrentRenderForLane(fiber, SyncLane);\n\n if (root !== null) {\n scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp);\n }\n };\n\n overridePropsRenamePath = function (fiber, oldPath, newPath) {\n fiber.pendingProps = copyWithRename(fiber.memoizedProps, oldPath, newPath);\n\n if (fiber.alternate) {\n fiber.alternate.pendingProps = fiber.pendingProps;\n }\n\n var root = enqueueConcurrentRenderForLane(fiber, SyncLane);\n\n if (root !== null) {\n scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp);\n }\n };\n\n scheduleUpdate = function (fiber) {\n var root = enqueueConcurrentRenderForLane(fiber, SyncLane);\n\n if (root !== null) {\n scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp);\n }\n };\n\n setErrorHandler = function (newShouldErrorImpl) {\n shouldErrorImpl = newShouldErrorImpl;\n };\n\n setSuspenseHandler = function (newShouldSuspendImpl) {\n shouldSuspendImpl = newShouldSuspendImpl;\n };\n}\n\nfunction findHostInstanceByFiber(fiber) {\n var hostFiber = findCurrentHostFiber(fiber);\n\n if (hostFiber === null) {\n return null;\n }\n\n return hostFiber.stateNode;\n}\n\nfunction emptyFindFiberByHostInstance(instance) {\n return null;\n}\n\nfunction getCurrentFiberForDevTools() {\n return current;\n}\n\nfunction injectIntoDevTools(devToolsConfig) {\n var findFiberByHostInstance = devToolsConfig.findFiberByHostInstance;\n var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;\n return injectInternals({\n bundleType: devToolsConfig.bundleType,\n version: devToolsConfig.version,\n rendererPackageName: devToolsConfig.rendererPackageName,\n rendererConfig: devToolsConfig.rendererConfig,\n overrideHookState: overrideHookState,\n overrideHookStateDeletePath: overrideHookStateDeletePath,\n overrideHookStateRenamePath: overrideHookStateRenamePath,\n overrideProps: overrideProps,\n overridePropsDeletePath: overridePropsDeletePath,\n overridePropsRenamePath: overridePropsRenamePath,\n setErrorHandler: setErrorHandler,\n setSuspenseHandler: setSuspenseHandler,\n scheduleUpdate: scheduleUpdate,\n currentDispatcherRef: ReactCurrentDispatcher,\n findHostInstanceByFiber: findHostInstanceByFiber,\n findFiberByHostInstance: findFiberByHostInstance || emptyFindFiberByHostInstance,\n // React Refresh\n findHostInstancesForRefresh: findHostInstancesForRefresh ,\n scheduleRefresh: scheduleRefresh ,\n scheduleRoot: scheduleRoot ,\n setRefreshHandler: setRefreshHandler ,\n // Enables DevTools to append owner stacks to error messages in DEV mode.\n getCurrentFiber: getCurrentFiberForDevTools ,\n // Enables DevTools to detect reconciler version rather than renderer version\n // which may not match for third party renderers.\n reconcilerVersion: ReactVersion\n });\n}\n\n/* global reportError */\n\nvar defaultOnRecoverableError = typeof reportError === 'function' ? // In modern browsers, reportError will dispatch an error event,\n// emulating an uncaught JavaScript error.\nreportError : function (error) {\n // In older browsers and test environments, fallback to console.error.\n // eslint-disable-next-line react-internal/no-production-logging\n console['error'](error);\n};\n\nfunction ReactDOMRoot(internalRoot) {\n this._internalRoot = internalRoot;\n}\n\nReactDOMHydrationRoot.prototype.render = ReactDOMRoot.prototype.render = function (children) {\n var root = this._internalRoot;\n\n if (root === null) {\n throw new Error('Cannot update an unmounted root.');\n }\n\n {\n if (typeof arguments[1] === 'function') {\n error('render(...): does not support the second callback argument. ' + 'To execute a side effect after rendering, declare it in a component body with useEffect().');\n } else if (isValidContainer(arguments[1])) {\n error('You passed a container to the second argument of root.render(...). ' + \"You don't need to pass it again since you already passed it to create the root.\");\n } else if (typeof arguments[1] !== 'undefined') {\n error('You passed a second argument to root.render(...) but it only accepts ' + 'one argument.');\n }\n\n var container = root.containerInfo;\n\n if (container.nodeType !== COMMENT_NODE) {\n var hostInstance = findHostInstanceWithNoPortals(root.current);\n\n if (hostInstance) {\n if (hostInstance.parentNode !== container) {\n error('render(...): It looks like the React-rendered content of the ' + 'root container was removed without using React. This is not ' + 'supported and will cause errors. Instead, call ' + \"root.unmount() to empty a root's container.\");\n }\n }\n }\n }\n\n updateContainer(children, root, null, null);\n};\n\nReactDOMHydrationRoot.prototype.unmount = ReactDOMRoot.prototype.unmount = function () {\n {\n if (typeof arguments[0] === 'function') {\n error('unmount(...): does not support a callback argument. ' + 'To execute a side effect after rendering, declare it in a component body with useEffect().');\n }\n }\n\n var root = this._internalRoot;\n\n if (root !== null) {\n this._internalRoot = null;\n var container = root.containerInfo;\n\n {\n if (isAlreadyRendering()) {\n error('Attempted to synchronously unmount a root while React was already ' + 'rendering. React cannot finish unmounting the root until the ' + 'current render has completed, which may lead to a race condition.');\n }\n }\n\n flushSync(function () {\n updateContainer(null, root, null, null);\n });\n unmarkContainerAsRoot(container);\n }\n};\n\nfunction createRoot(container, options) {\n if (!isValidContainer(container)) {\n throw new Error('createRoot(...): Target container is not a DOM element.');\n }\n\n warnIfReactDOMContainerInDEV(container);\n var isStrictMode = false;\n var concurrentUpdatesByDefaultOverride = false;\n var identifierPrefix = '';\n var onRecoverableError = defaultOnRecoverableError;\n var transitionCallbacks = null;\n\n if (options !== null && options !== undefined) {\n {\n if (options.hydrate) {\n warn('hydrate through createRoot is deprecated. Use ReactDOMClient.hydrateRoot(container, <App />) instead.');\n } else {\n if (typeof options === 'object' && options !== null && options.$$typeof === REACT_ELEMENT_TYPE) {\n error('You passed a JSX element to createRoot. You probably meant to ' + 'call root.render instead. ' + 'Example usage:\\n\\n' + ' let root = createRoot(domContainer);\\n' + ' root.render(<App />);');\n }\n }\n }\n\n if (options.unstable_strictMode === true) {\n isStrictMode = true;\n }\n\n if (options.identifierPrefix !== undefined) {\n identifierPrefix = options.identifierPrefix;\n }\n\n if (options.onRecoverableError !== undefined) {\n onRecoverableError = options.onRecoverableError;\n }\n\n if (options.transitionCallbacks !== undefined) {\n transitionCallbacks = options.transitionCallbacks;\n }\n }\n\n var root = createContainer(container, ConcurrentRoot, null, isStrictMode, concurrentUpdatesByDefaultOverride, identifierPrefix, onRecoverableError);\n markContainerAsRoot(root.current, container);\n var rootContainerElement = container.nodeType === COMMENT_NODE ? container.parentNode : container;\n listenToAllSupportedEvents(rootContainerElement);\n return new ReactDOMRoot(root);\n}\n\nfunction ReactDOMHydrationRoot(internalRoot) {\n this._internalRoot = internalRoot;\n}\n\nfunction scheduleHydration(target) {\n if (target) {\n queueExplicitHydrationTarget(target);\n }\n}\n\nReactDOMHydrationRoot.prototype.unstable_scheduleHydration = scheduleHydration;\nfunction hydrateRoot(container, initialChildren, options) {\n if (!isValidContainer(container)) {\n throw new Error('hydrateRoot(...): Target container is not a DOM element.');\n }\n\n warnIfReactDOMContainerInDEV(container);\n\n {\n if (initialChildren === undefined) {\n error('Must provide initial children as second argument to hydrateRoot. ' + 'Example usage: hydrateRoot(domContainer, <App />)');\n }\n } // For now we reuse the whole bag of options since they contain\n // the hydration callbacks.\n\n\n var hydrationCallbacks = options != null ? options : null; // TODO: Delete this option\n\n var mutableSources = options != null && options.hydratedSources || null;\n var isStrictMode = false;\n var concurrentUpdatesByDefaultOverride = false;\n var identifierPrefix = '';\n var onRecoverableError = defaultOnRecoverableError;\n\n if (options !== null && options !== undefined) {\n if (options.unstable_strictMode === true) {\n isStrictMode = true;\n }\n\n if (options.identifierPrefix !== undefined) {\n identifierPrefix = options.identifierPrefix;\n }\n\n if (options.onRecoverableError !== undefined) {\n onRecoverableError = options.onRecoverableError;\n }\n }\n\n var root = createHydrationContainer(initialChildren, null, container, ConcurrentRoot, hydrationCallbacks, isStrictMode, concurrentUpdatesByDefaultOverride, identifierPrefix, onRecoverableError);\n markContainerAsRoot(root.current, container); // This can't be a comment node since hydration doesn't work on comment nodes anyway.\n\n listenToAllSupportedEvents(container);\n\n if (mutableSources) {\n for (var i = 0; i < mutableSources.length; i++) {\n var mutableSource = mutableSources[i];\n registerMutableSourceForHydration(root, mutableSource);\n }\n }\n\n return new ReactDOMHydrationRoot(root);\n}\nfunction isValidContainer(node) {\n return !!(node && (node.nodeType === ELEMENT_NODE || node.nodeType === DOCUMENT_NODE || node.nodeType === DOCUMENT_FRAGMENT_NODE || !disableCommentsAsDOMContainers ));\n} // TODO: Remove this function which also includes comment nodes.\n// We only use it in places that are currently more relaxed.\n\nfunction isValidContainerLegacy(node) {\n return !!(node && (node.nodeType === ELEMENT_NODE || node.nodeType === DOCUMENT_NODE || node.nodeType === DOCUMENT_FRAGMENT_NODE || node.nodeType === COMMENT_NODE && node.nodeValue === ' react-mount-point-unstable '));\n}\n\nfunction warnIfReactDOMContainerInDEV(container) {\n {\n if (container.nodeType === ELEMENT_NODE && container.tagName && container.tagName.toUpperCase() === 'BODY') {\n error('createRoot(): Creating roots directly with document.body is ' + 'discouraged, since its children are often manipulated by third-party ' + 'scripts and browser extensions. This may lead to subtle ' + 'reconciliation issues. Try using a container element created ' + 'for your app.');\n }\n\n if (isContainerMarkedAsRoot(container)) {\n if (container._reactRootContainer) {\n error('You are calling ReactDOMClient.createRoot() on a container that was previously ' + 'passed to ReactDOM.render(). This is not supported.');\n } else {\n error('You are calling ReactDOMClient.createRoot() on a container that ' + 'has already been passed to createRoot() before. Instead, call ' + 'root.render() on the existing root instead if you want to update it.');\n }\n }\n }\n}\n\nvar ReactCurrentOwner$3 = ReactSharedInternals.ReactCurrentOwner;\nvar topLevelUpdateWarnings;\n\n{\n topLevelUpdateWarnings = function (container) {\n if (container._reactRootContainer && container.nodeType !== COMMENT_NODE) {\n var hostInstance = findHostInstanceWithNoPortals(container._reactRootContainer.current);\n\n if (hostInstance) {\n if (hostInstance.parentNode !== container) {\n error('render(...): It looks like the React-rendered content of this ' + 'container was removed without using React. This is not ' + 'supported and will cause errors. Instead, call ' + 'ReactDOM.unmountComponentAtNode to empty a container.');\n }\n }\n }\n\n var isRootRenderedBySomeReact = !!container._reactRootContainer;\n var rootEl = getReactRootElementInContainer(container);\n var hasNonRootReactChild = !!(rootEl && getInstanceFromNode(rootEl));\n\n if (hasNonRootReactChild && !isRootRenderedBySomeReact) {\n error('render(...): Replacing React-rendered children with a new root ' + 'component. If you intended to update the children of this node, ' + 'you should instead have the existing children update their state ' + 'and render the new components instead of calling ReactDOM.render.');\n }\n\n if (container.nodeType === ELEMENT_NODE && container.tagName && container.tagName.toUpperCase() === 'BODY') {\n error('render(): Rendering components directly into document.body is ' + 'discouraged, since its children are often manipulated by third-party ' + 'scripts and browser extensions. This may lead to subtle ' + 'reconciliation issues. Try rendering into a container element created ' + 'for your app.');\n }\n };\n}\n\nfunction getReactRootElementInContainer(container) {\n if (!container) {\n return null;\n }\n\n if (container.nodeType === DOCUMENT_NODE) {\n return container.documentElement;\n } else {\n return container.firstChild;\n }\n}\n\nfunction noopOnRecoverableError() {// This isn't reachable because onRecoverableError isn't called in the\n // legacy API.\n}\n\nfunction legacyCreateRootFromDOMContainer(container, initialChildren, parentComponent, callback, isHydrationContainer) {\n if (isHydrationContainer) {\n if (typeof callback === 'function') {\n var originalCallback = callback;\n\n callback = function () {\n var instance = getPublicRootInstance(root);\n originalCallback.call(instance);\n };\n }\n\n var root = createHydrationContainer(initialChildren, callback, container, LegacyRoot, null, // hydrationCallbacks\n false, // isStrictMode\n false, // concurrentUpdatesByDefaultOverride,\n '', // identifierPrefix\n noopOnRecoverableError);\n container._reactRootContainer = root;\n markContainerAsRoot(root.current, container);\n var rootContainerElement = container.nodeType === COMMENT_NODE ? container.parentNode : container;\n listenToAllSupportedEvents(rootContainerElement);\n flushSync();\n return root;\n } else {\n // First clear any existing content.\n var rootSibling;\n\n while (rootSibling = container.lastChild) {\n container.removeChild(rootSibling);\n }\n\n if (typeof callback === 'function') {\n var _originalCallback = callback;\n\n callback = function () {\n var instance = getPublicRootInstance(_root);\n\n _originalCallback.call(instance);\n };\n }\n\n var _root = createContainer(container, LegacyRoot, null, // hydrationCallbacks\n false, // isStrictMode\n false, // concurrentUpdatesByDefaultOverride,\n '', // identifierPrefix\n noopOnRecoverableError);\n\n container._reactRootContainer = _root;\n markContainerAsRoot(_root.current, container);\n\n var _rootContainerElement = container.nodeType === COMMENT_NODE ? container.parentNode : container;\n\n listenToAllSupportedEvents(_rootContainerElement); // Initial mount should not be batched.\n\n flushSync(function () {\n updateContainer(initialChildren, _root, parentComponent, callback);\n });\n return _root;\n }\n}\n\nfunction warnOnInvalidCallback$1(callback, callerName) {\n {\n if (callback !== null && typeof callback !== 'function') {\n error('%s(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callerName, callback);\n }\n }\n}\n\nfunction legacyRenderSubtreeIntoContainer(parentComponent, children, container, forceHydrate, callback) {\n {\n topLevelUpdateWarnings(container);\n warnOnInvalidCallback$1(callback === undefined ? null : callback, 'render');\n }\n\n var maybeRoot = container._reactRootContainer;\n var root;\n\n if (!maybeRoot) {\n // Initial mount\n root = legacyCreateRootFromDOMContainer(container, children, parentComponent, callback, forceHydrate);\n } else {\n root = maybeRoot;\n\n if (typeof callback === 'function') {\n var originalCallback = callback;\n\n callback = function () {\n var instance = getPublicRootInstance(root);\n originalCallback.call(instance);\n };\n } // Update\n\n\n updateContainer(children, root, parentComponent, callback);\n }\n\n return getPublicRootInstance(root);\n}\n\nvar didWarnAboutFindDOMNode = false;\nfunction findDOMNode(componentOrElement) {\n {\n if (!didWarnAboutFindDOMNode) {\n didWarnAboutFindDOMNode = true;\n\n error('findDOMNode is deprecated and will be removed in the next major ' + 'release. Instead, add a ref directly to the element you want ' + 'to reference. Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-find-node');\n }\n\n var owner = ReactCurrentOwner$3.current;\n\n if (owner !== null && owner.stateNode !== null) {\n var warnedAboutRefsInRender = owner.stateNode._warnedAboutRefsInRender;\n\n if (!warnedAboutRefsInRender) {\n error('%s is accessing findDOMNode inside its render(). ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', getComponentNameFromType(owner.type) || 'A component');\n }\n\n owner.stateNode._warnedAboutRefsInRender = true;\n }\n }\n\n if (componentOrElement == null) {\n return null;\n }\n\n if (componentOrElement.nodeType === ELEMENT_NODE) {\n return componentOrElement;\n }\n\n {\n return findHostInstanceWithWarning(componentOrElement, 'findDOMNode');\n }\n}\nfunction hydrate(element, container, callback) {\n {\n error('ReactDOM.hydrate is no longer supported in React 18. Use hydrateRoot ' + 'instead. Until you switch to the new API, your app will behave as ' + \"if it's running React 17. Learn \" + 'more: https://reactjs.org/link/switch-to-createroot');\n }\n\n if (!isValidContainerLegacy(container)) {\n throw new Error('Target container is not a DOM element.');\n }\n\n {\n var isModernRoot = isContainerMarkedAsRoot(container) && container._reactRootContainer === undefined;\n\n if (isModernRoot) {\n error('You are calling ReactDOM.hydrate() on a container that was previously ' + 'passed to ReactDOMClient.createRoot(). This is not supported. ' + 'Did you mean to call hydrateRoot(container, element)?');\n }\n } // TODO: throw or warn if we couldn't hydrate?\n\n\n return legacyRenderSubtreeIntoContainer(null, element, container, true, callback);\n}\nfunction render(element, container, callback) {\n {\n error('ReactDOM.render is no longer supported in React 18. Use createRoot ' + 'instead. Until you switch to the new API, your app will behave as ' + \"if it's running React 17. Learn \" + 'more: https://reactjs.org/link/switch-to-createroot');\n }\n\n if (!isValidContainerLegacy(container)) {\n throw new Error('Target container is not a DOM element.');\n }\n\n {\n var isModernRoot = isContainerMarkedAsRoot(container) && container._reactRootContainer === undefined;\n\n if (isModernRoot) {\n error('You are calling ReactDOM.render() on a container that was previously ' + 'passed to ReactDOMClient.createRoot(). This is not supported. ' + 'Did you mean to call root.render(element)?');\n }\n }\n\n return legacyRenderSubtreeIntoContainer(null, element, container, false, callback);\n}\nfunction unstable_renderSubtreeIntoContainer(parentComponent, element, containerNode, callback) {\n {\n error('ReactDOM.unstable_renderSubtreeIntoContainer() is no longer supported ' + 'in React 18. Consider using a portal instead. Until you switch to ' + \"the createRoot API, your app will behave as if it's running React \" + '17. Learn more: https://reactjs.org/link/switch-to-createroot');\n }\n\n if (!isValidContainerLegacy(containerNode)) {\n throw new Error('Target container is not a DOM element.');\n }\n\n if (parentComponent == null || !has(parentComponent)) {\n throw new Error('parentComponent must be a valid React Component');\n }\n\n return legacyRenderSubtreeIntoContainer(parentComponent, element, containerNode, false, callback);\n}\nvar didWarnAboutUnmountComponentAtNode = false;\nfunction unmountComponentAtNode(container) {\n {\n if (!didWarnAboutUnmountComponentAtNode) {\n didWarnAboutUnmountComponentAtNode = true;\n\n error('unmountComponentAtNode is deprecated and will be removed in the ' + 'next major release. Switch to the createRoot API. Learn ' + 'more: https://reactjs.org/link/switch-to-createroot');\n }\n }\n\n if (!isValidContainerLegacy(container)) {\n throw new Error('unmountComponentAtNode(...): Target container is not a DOM element.');\n }\n\n {\n var isModernRoot = isContainerMarkedAsRoot(container) && container._reactRootContainer === undefined;\n\n if (isModernRoot) {\n error('You are calling ReactDOM.unmountComponentAtNode() on a container that was previously ' + 'passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call root.unmount()?');\n }\n }\n\n if (container._reactRootContainer) {\n {\n var rootEl = getReactRootElementInContainer(container);\n var renderedByDifferentReact = rootEl && !getInstanceFromNode(rootEl);\n\n if (renderedByDifferentReact) {\n error(\"unmountComponentAtNode(): The node you're attempting to unmount \" + 'was rendered by another copy of React.');\n }\n } // Unmount should not be batched.\n\n\n flushSync(function () {\n legacyRenderSubtreeIntoContainer(null, null, container, false, function () {\n // $FlowFixMe This should probably use `delete container._reactRootContainer`\n container._reactRootContainer = null;\n unmarkContainerAsRoot(container);\n });\n }); // If you call unmountComponentAtNode twice in quick succession, you'll\n // get `true` twice. That's probably fine?\n\n return true;\n } else {\n {\n var _rootEl = getReactRootElementInContainer(container);\n\n var hasNonRootReactChild = !!(_rootEl && getInstanceFromNode(_rootEl)); // Check if the container itself is a React root node.\n\n var isContainerReactRoot = container.nodeType === ELEMENT_NODE && isValidContainerLegacy(container.parentNode) && !!container.parentNode._reactRootContainer;\n\n if (hasNonRootReactChild) {\n error(\"unmountComponentAtNode(): The node you're attempting to unmount \" + 'was rendered by React and is not a top-level container. %s', isContainerReactRoot ? 'You may have accidentally passed in a React root node instead ' + 'of its container.' : 'Instead, have the parent component update its state and ' + 'rerender in order to remove this component.');\n }\n }\n\n return false;\n }\n}\n\nsetAttemptSynchronousHydration(attemptSynchronousHydration$1);\nsetAttemptContinuousHydration(attemptContinuousHydration$1);\nsetAttemptHydrationAtCurrentPriority(attemptHydrationAtCurrentPriority$1);\nsetGetCurrentUpdatePriority(getCurrentUpdatePriority);\nsetAttemptHydrationAtPriority(runWithPriority);\n\n{\n if (typeof Map !== 'function' || // $FlowIssue Flow incorrectly thinks Map has no prototype\n Map.prototype == null || typeof Map.prototype.forEach !== 'function' || typeof Set !== 'function' || // $FlowIssue Flow incorrectly thinks Set has no prototype\n Set.prototype == null || typeof Set.prototype.clear !== 'function' || typeof Set.prototype.forEach !== 'function') {\n error('React depends on Map and Set built-in types. Make sure that you load a ' + 'polyfill in older browsers. https://reactjs.org/link/react-polyfills');\n }\n}\n\nsetRestoreImplementation(restoreControlledState$3);\nsetBatchingImplementation(batchedUpdates$1, discreteUpdates, flushSync);\n\nfunction createPortal$1(children, container) {\n var key = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n\n if (!isValidContainer(container)) {\n throw new Error('Target container is not a DOM element.');\n } // TODO: pass ReactDOM portal implementation as third argument\n // $FlowFixMe The Flow type is opaque but there's no way to actually create it.\n\n\n return createPortal(children, container, null, key);\n}\n\nfunction renderSubtreeIntoContainer(parentComponent, element, containerNode, callback) {\n return unstable_renderSubtreeIntoContainer(parentComponent, element, containerNode, callback);\n}\n\nvar Internals = {\n usingClientEntryPoint: false,\n // Keep in sync with ReactTestUtils.js.\n // This is an array for better minification.\n Events: [getInstanceFromNode, getNodeFromInstance, getFiberCurrentPropsFromNode, enqueueStateRestore, restoreStateIfNeeded, batchedUpdates$1]\n};\n\nfunction createRoot$1(container, options) {\n {\n if (!Internals.usingClientEntryPoint && !false) {\n error('You are importing createRoot from \"react-dom\" which is not supported. ' + 'You should instead import it from \"react-dom/client\".');\n }\n }\n\n return createRoot(container, options);\n}\n\nfunction hydrateRoot$1(container, initialChildren, options) {\n {\n if (!Internals.usingClientEntryPoint && !false) {\n error('You are importing hydrateRoot from \"react-dom\" which is not supported. ' + 'You should instead import it from \"react-dom/client\".');\n }\n }\n\n return hydrateRoot(container, initialChildren, options);\n} // Overload the definition to the two valid signatures.\n// Warning, this opts-out of checking the function body.\n\n\n// eslint-disable-next-line no-redeclare\nfunction flushSync$1(fn) {\n {\n if (isAlreadyRendering()) {\n error('flushSync was called from inside a lifecycle method. React cannot ' + 'flush when React is already rendering. Consider moving this call to ' + 'a scheduler task or micro task.');\n }\n }\n\n return flushSync(fn);\n}\nvar foundDevTools = injectIntoDevTools({\n findFiberByHostInstance: getClosestInstanceFromNode,\n bundleType: 1 ,\n version: ReactVersion,\n rendererPackageName: 'react-dom'\n});\n\n{\n if (!foundDevTools && canUseDOM && window.top === window.self) {\n // If we're in Chrome or Firefox, provide a download link if not installed.\n if (navigator.userAgent.indexOf('Chrome') > -1 && navigator.userAgent.indexOf('Edge') === -1 || navigator.userAgent.indexOf('Firefox') > -1) {\n var protocol = window.location.protocol; // Don't warn in exotic cases like chrome-extension://.\n\n if (/^(https?|file):$/.test(protocol)) {\n // eslint-disable-next-line react-internal/no-production-logging\n console.info('%cDownload the React DevTools ' + 'for a better development experience: ' + 'https://reactjs.org/link/react-devtools' + (protocol === 'file:' ? '\\nYou might need to use a local HTTP server (instead of file://): ' + 'https://reactjs.org/link/react-devtools-faq' : ''), 'font-weight:bold');\n }\n }\n }\n}\n\nexports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Internals;\nexports.createPortal = createPortal$1;\nexports.createRoot = createRoot$1;\nexports.findDOMNode = findDOMNode;\nexports.flushSync = flushSync$1;\nexports.hydrate = hydrate;\nexports.hydrateRoot = hydrateRoot$1;\nexports.render = render;\nexports.unmountComponentAtNode = unmountComponentAtNode;\nexports.unstable_batchedUpdates = batchedUpdates$1;\nexports.unstable_renderSubtreeIntoContainer = renderSubtreeIntoContainer;\nexports.version = ReactVersion;\n /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\nif (\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop ===\n 'function'\n) {\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());\n}\n \n })();\n}\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/react-dom/cjs/react-dom.development.js?", + ); + + /***/ + }, + + /***/ 5338: /***/ (__unused_webpack_module, exports, __webpack_require__) => { + 'use strict'; + eval( + '\n\nvar m = __webpack_require__(961);\nif (false) {} else {\n var i = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n exports.createRoot = function(c, o) {\n i.usingClientEntryPoint = true;\n try {\n return m.createRoot(c, o);\n } finally {\n i.usingClientEntryPoint = false;\n }\n };\n exports.hydrateRoot = function(c, h, o) {\n i.usingClientEntryPoint = true;\n try {\n return m.hydrateRoot(c, h, o);\n } finally {\n i.usingClientEntryPoint = false;\n }\n };\n}\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/react-dom/client.js?', + ); + + /***/ + }, + + /***/ 961: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + 'use strict'; + eval( + "\n\nfunction checkDCE() {\n /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\n if (\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined' ||\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== 'function'\n ) {\n return;\n }\n if (true) {\n // This branch is unreachable because this function is only called\n // in production, but the condition is true only in development.\n // Therefore if the branch is still here, dead code elimination wasn't\n // properly applied.\n // Don't change the message. React DevTools relies on it. Also make sure\n // this message doesn't occur elsewhere in this function, or it will cause\n // a false positive.\n throw new Error('^_^');\n }\n try {\n // Verify that the code above has been dead code eliminated (DCE'd).\n __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE);\n } catch (err) {\n // DevTools shouldn't crash React, no matter what.\n // We should still report in case we break this code.\n console.error(err);\n }\n}\n\nif (false) {} else {\n module.exports = __webpack_require__(1557);\n}\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/react-dom/index.js?", + ); + + /***/ + }, + + /***/ 4362: /***/ (__unused_webpack_module, exports, __webpack_require__) => { + 'use strict'; + eval( + '\n\nvar l, s;\nif (false) {} else {\n l = __webpack_require__(8021);\n s = __webpack_require__(3771);\n}\n\nexports.version = l.version;\nexports.renderToString = l.renderToString;\nexports.renderToStaticMarkup = l.renderToStaticMarkup;\nexports.renderToNodeStream = l.renderToNodeStream;\nexports.renderToStaticNodeStream = l.renderToStaticNodeStream;\nexports.renderToPipeableStream = s.renderToPipeableStream;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/react-dom/server.node.js?', + ); + + /***/ + }, + + /***/ 115: /***/ (module) => { + eval( + "/* global Map:readonly, Set:readonly, ArrayBuffer:readonly */\n\nvar hasElementType = typeof Element !== 'undefined';\nvar hasMap = typeof Map === 'function';\nvar hasSet = typeof Set === 'function';\nvar hasArrayBuffer = typeof ArrayBuffer === 'function' && !!ArrayBuffer.isView;\n\n// Note: We **don't** need `envHasBigInt64Array` in fde es6/index.js\n\nfunction equal(a, b) {\n // START: fast-deep-equal es6/index.js 3.1.3\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n\n var length, i, keys;\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n // START: Modifications:\n // 1. Extra `has<Type> &&` helpers in initial condition allow es6 code\n // to co-exist with es5.\n // 2. Replace `for of` with es5 compliant iteration using `for`.\n // Basically, take:\n //\n // ```js\n // for (i of a.entries())\n // if (!b.has(i[0])) return false;\n // ```\n //\n // ... and convert to:\n //\n // ```js\n // it = a.entries();\n // while (!(i = it.next()).done)\n // if (!b.has(i.value[0])) return false;\n // ```\n //\n // **Note**: `i` access switches to `i.value`.\n var it;\n if (hasMap && (a instanceof Map) && (b instanceof Map)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!equal(i.value[1], b.get(i.value[0]))) return false;\n return true;\n }\n\n if (hasSet && (a instanceof Set) && (b instanceof Set)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n return true;\n }\n // END: Modifications\n\n if (hasArrayBuffer && ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (a[i] !== b[i]) return false;\n return true;\n }\n\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n // START: Modifications:\n // Apply guards for `Object.create(null)` handling. See:\n // - https://github.com/FormidableLabs/react-fast-compare/issues/64\n // - https://github.com/epoberezkin/fast-deep-equal/issues/49\n if (a.valueOf !== Object.prototype.valueOf && typeof a.valueOf === 'function' && typeof b.valueOf === 'function') return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString && typeof a.toString === 'function' && typeof b.toString === 'function') return a.toString() === b.toString();\n // END: Modifications\n\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0;)\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n // END: fast-deep-equal\n\n // START: react-fast-compare\n // custom handling for DOM elements\n if (hasElementType && a instanceof Element) return false;\n\n // custom handling for React/Preact\n for (i = length; i-- !== 0;) {\n if ((keys[i] === '_owner' || keys[i] === '__v' || keys[i] === '__o') && a.$$typeof) {\n // React-specific: avoid traversing React elements' _owner\n // Preact-specific: avoid traversing Preact elements' __v and __o\n // __v = $_original / $_vnode\n // __o = $_owner\n // These properties contain circular references and are not needed when\n // comparing the actual elements (and not their owners)\n // .$$typeof and ._store on just reasonable markers of elements\n\n continue;\n }\n\n // all other properties should be traversed as usual\n if (!equal(a[keys[i]], b[keys[i]])) return false;\n }\n // END: react-fast-compare\n\n // START: fast-deep-equal\n return true;\n }\n\n return a !== a && b !== b;\n}\n// end fast-deep-equal\n\nmodule.exports = function isEqual(a, b) {\n try {\n return equal(a, b);\n } catch (error) {\n if (((error.message || '').match(/stack|recursion/i))) {\n // warn on circular references, don't crash\n // browsers give this different errors name and messages:\n // chrome/safari: \"RangeError\", \"Maximum call stack size exceeded\"\n // firefox: \"InternalError\", too much recursion\"\n // edge: \"Error\", \"Out of stack space\"\n console.warn('react-fast-compare cannot handle circular refs');\n return false;\n }\n // some other error. we should definitely know about these\n throw error;\n }\n};\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/react-fast-compare/index.js?", + ); + + /***/ + }, + + /***/ 8154: /***/ (__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ m: () => (/* binding */ HelmetExport)\n/* harmony export */ });\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(5556);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var react_side_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2098);\n/* harmony import */ var react_side_effect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_side_effect__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react_fast_compare__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(115);\n/* harmony import */ var react_fast_compare__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_fast_compare__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6540);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var object_assign__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(5228);\n/* harmony import */ var object_assign__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(object_assign__WEBPACK_IMPORTED_MODULE_3__);\n\n\n\n\n\n\nvar ATTRIBUTE_NAMES = {\n BODY: "bodyAttributes",\n HTML: "htmlAttributes",\n TITLE: "titleAttributes"\n};\n\nvar TAG_NAMES = {\n BASE: "base",\n BODY: "body",\n HEAD: "head",\n HTML: "html",\n LINK: "link",\n META: "meta",\n NOSCRIPT: "noscript",\n SCRIPT: "script",\n STYLE: "style",\n TITLE: "title"\n};\n\nvar VALID_TAG_NAMES = Object.keys(TAG_NAMES).map(function (name) {\n return TAG_NAMES[name];\n});\n\nvar TAG_PROPERTIES = {\n CHARSET: "charset",\n CSS_TEXT: "cssText",\n HREF: "href",\n HTTPEQUIV: "http-equiv",\n INNER_HTML: "innerHTML",\n ITEM_PROP: "itemprop",\n NAME: "name",\n PROPERTY: "property",\n REL: "rel",\n SRC: "src",\n TARGET: "target"\n};\n\nvar REACT_TAG_MAP = {\n accesskey: "accessKey",\n charset: "charSet",\n class: "className",\n contenteditable: "contentEditable",\n contextmenu: "contextMenu",\n "http-equiv": "httpEquiv",\n itemprop: "itemProp",\n tabindex: "tabIndex"\n};\n\nvar HELMET_PROPS = {\n DEFAULT_TITLE: "defaultTitle",\n DEFER: "defer",\n ENCODE_SPECIAL_CHARACTERS: "encodeSpecialCharacters",\n ON_CHANGE_CLIENT_STATE: "onChangeClientState",\n TITLE_TEMPLATE: "titleTemplate"\n};\n\nvar HTML_TAG_MAP = Object.keys(REACT_TAG_MAP).reduce(function (obj, key) {\n obj[REACT_TAG_MAP[key]] = key;\n return obj;\n}, {});\n\nvar SELF_CLOSING_TAGS = [TAG_NAMES.NOSCRIPT, TAG_NAMES.SCRIPT, TAG_NAMES.STYLE];\n\nvar HELMET_ATTRIBUTE = "data-react-helmet";\n\nvar _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {\n return typeof obj;\n} : function (obj) {\n return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;\n};\n\nvar classCallCheck = function (instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError("Cannot call a class as a function");\n }\n};\n\nvar createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if ("value" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\n\nvar _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n};\n\nvar inherits = function (subClass, superClass) {\n if (typeof superClass !== "function" && superClass !== null) {\n throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n};\n\nvar objectWithoutProperties = function (obj, keys) {\n var target = {};\n\n for (var i in obj) {\n if (keys.indexOf(i) >= 0) continue;\n if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;\n target[i] = obj[i];\n }\n\n return target;\n};\n\nvar possibleConstructorReturn = function (self, call) {\n if (!self) {\n throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");\n }\n\n return call && (typeof call === "object" || typeof call === "function") ? call : self;\n};\n\nvar encodeSpecialCharacters = function encodeSpecialCharacters(str) {\n var encode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n\n if (encode === false) {\n return String(str);\n }\n\n return String(str).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/\'/g, "'");\n};\n\nvar getTitleFromPropsList = function getTitleFromPropsList(propsList) {\n var innermostTitle = getInnermostProperty(propsList, TAG_NAMES.TITLE);\n var innermostTemplate = getInnermostProperty(propsList, HELMET_PROPS.TITLE_TEMPLATE);\n\n if (innermostTemplate && innermostTitle) {\n // use function arg to avoid need to escape $ characters\n return innermostTemplate.replace(/%s/g, function () {\n return Array.isArray(innermostTitle) ? innermostTitle.join("") : innermostTitle;\n });\n }\n\n var innermostDefaultTitle = getInnermostProperty(propsList, HELMET_PROPS.DEFAULT_TITLE);\n\n return innermostTitle || innermostDefaultTitle || undefined;\n};\n\nvar getOnChangeClientState = function getOnChangeClientState(propsList) {\n return getInnermostProperty(propsList, HELMET_PROPS.ON_CHANGE_CLIENT_STATE) || function () {};\n};\n\nvar getAttributesFromPropsList = function getAttributesFromPropsList(tagType, propsList) {\n return propsList.filter(function (props) {\n return typeof props[tagType] !== "undefined";\n }).map(function (props) {\n return props[tagType];\n }).reduce(function (tagAttrs, current) {\n return _extends({}, tagAttrs, current);\n }, {});\n};\n\nvar getBaseTagFromPropsList = function getBaseTagFromPropsList(primaryAttributes, propsList) {\n return propsList.filter(function (props) {\n return typeof props[TAG_NAMES.BASE] !== "undefined";\n }).map(function (props) {\n return props[TAG_NAMES.BASE];\n }).reverse().reduce(function (innermostBaseTag, tag) {\n if (!innermostBaseTag.length) {\n var keys = Object.keys(tag);\n\n for (var i = 0; i < keys.length; i++) {\n var attributeKey = keys[i];\n var lowerCaseAttributeKey = attributeKey.toLowerCase();\n\n if (primaryAttributes.indexOf(lowerCaseAttributeKey) !== -1 && tag[lowerCaseAttributeKey]) {\n return innermostBaseTag.concat(tag);\n }\n }\n }\n\n return innermostBaseTag;\n }, []);\n};\n\nvar getTagsFromPropsList = function getTagsFromPropsList(tagName, primaryAttributes, propsList) {\n // Calculate list of tags, giving priority innermost component (end of the propslist)\n var approvedSeenTags = {};\n\n return propsList.filter(function (props) {\n if (Array.isArray(props[tagName])) {\n return true;\n }\n if (typeof props[tagName] !== "undefined") {\n warn("Helmet: " + tagName + " should be of type \\"Array\\". Instead found type \\"" + _typeof(props[tagName]) + "\\"");\n }\n return false;\n }).map(function (props) {\n return props[tagName];\n }).reverse().reduce(function (approvedTags, instanceTags) {\n var instanceSeenTags = {};\n\n instanceTags.filter(function (tag) {\n var primaryAttributeKey = void 0;\n var keys = Object.keys(tag);\n for (var i = 0; i < keys.length; i++) {\n var attributeKey = keys[i];\n var lowerCaseAttributeKey = attributeKey.toLowerCase();\n\n // Special rule with link tags, since rel and href are both primary tags, rel takes priority\n if (primaryAttributes.indexOf(lowerCaseAttributeKey) !== -1 && !(primaryAttributeKey === TAG_PROPERTIES.REL && tag[primaryAttributeKey].toLowerCase() === "canonical") && !(lowerCaseAttributeKey === TAG_PROPERTIES.REL && tag[lowerCaseAttributeKey].toLowerCase() === "stylesheet")) {\n primaryAttributeKey = lowerCaseAttributeKey;\n }\n // Special case for innerHTML which doesn\'t work lowercased\n if (primaryAttributes.indexOf(attributeKey) !== -1 && (attributeKey === TAG_PROPERTIES.INNER_HTML || attributeKey === TAG_PROPERTIES.CSS_TEXT || attributeKey === TAG_PROPERTIES.ITEM_PROP)) {\n primaryAttributeKey = attributeKey;\n }\n }\n\n if (!primaryAttributeKey || !tag[primaryAttributeKey]) {\n return false;\n }\n\n var value = tag[primaryAttributeKey].toLowerCase();\n\n if (!approvedSeenTags[primaryAttributeKey]) {\n approvedSeenTags[primaryAttributeKey] = {};\n }\n\n if (!instanceSeenTags[primaryAttributeKey]) {\n instanceSeenTags[primaryAttributeKey] = {};\n }\n\n if (!approvedSeenTags[primaryAttributeKey][value]) {\n instanceSeenTags[primaryAttributeKey][value] = true;\n return true;\n }\n\n return false;\n }).reverse().forEach(function (tag) {\n return approvedTags.push(tag);\n });\n\n // Update seen tags with tags from this instance\n var keys = Object.keys(instanceSeenTags);\n for (var i = 0; i < keys.length; i++) {\n var attributeKey = keys[i];\n var tagUnion = object_assign__WEBPACK_IMPORTED_MODULE_3___default()({}, approvedSeenTags[attributeKey], instanceSeenTags[attributeKey]);\n\n approvedSeenTags[attributeKey] = tagUnion;\n }\n\n return approvedTags;\n }, []).reverse();\n};\n\nvar getInnermostProperty = function getInnermostProperty(propsList, property) {\n for (var i = propsList.length - 1; i >= 0; i--) {\n var props = propsList[i];\n\n if (props.hasOwnProperty(property)) {\n return props[property];\n }\n }\n\n return null;\n};\n\nvar reducePropsToState = function reducePropsToState(propsList) {\n return {\n baseTag: getBaseTagFromPropsList([TAG_PROPERTIES.HREF, TAG_PROPERTIES.TARGET], propsList),\n bodyAttributes: getAttributesFromPropsList(ATTRIBUTE_NAMES.BODY, propsList),\n defer: getInnermostProperty(propsList, HELMET_PROPS.DEFER),\n encode: getInnermostProperty(propsList, HELMET_PROPS.ENCODE_SPECIAL_CHARACTERS),\n htmlAttributes: getAttributesFromPropsList(ATTRIBUTE_NAMES.HTML, propsList),\n linkTags: getTagsFromPropsList(TAG_NAMES.LINK, [TAG_PROPERTIES.REL, TAG_PROPERTIES.HREF], propsList),\n metaTags: getTagsFromPropsList(TAG_NAMES.META, [TAG_PROPERTIES.NAME, TAG_PROPERTIES.CHARSET, TAG_PROPERTIES.HTTPEQUIV, TAG_PROPERTIES.PROPERTY, TAG_PROPERTIES.ITEM_PROP], propsList),\n noscriptTags: getTagsFromPropsList(TAG_NAMES.NOSCRIPT, [TAG_PROPERTIES.INNER_HTML], propsList),\n onChangeClientState: getOnChangeClientState(propsList),\n scriptTags: getTagsFromPropsList(TAG_NAMES.SCRIPT, [TAG_PROPERTIES.SRC, TAG_PROPERTIES.INNER_HTML], propsList),\n styleTags: getTagsFromPropsList(TAG_NAMES.STYLE, [TAG_PROPERTIES.CSS_TEXT], propsList),\n title: getTitleFromPropsList(propsList),\n titleAttributes: getAttributesFromPropsList(ATTRIBUTE_NAMES.TITLE, propsList)\n };\n};\n\nvar rafPolyfill = function () {\n var clock = Date.now();\n\n return function (callback) {\n var currentTime = Date.now();\n\n if (currentTime - clock > 16) {\n clock = currentTime;\n callback(currentTime);\n } else {\n setTimeout(function () {\n rafPolyfill(callback);\n }, 0);\n }\n };\n}();\n\nvar cafPolyfill = function cafPolyfill(id) {\n return clearTimeout(id);\n};\n\nvar requestAnimationFrame = typeof window !== "undefined" ? window.requestAnimationFrame && window.requestAnimationFrame.bind(window) || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || rafPolyfill : global.requestAnimationFrame || rafPolyfill;\n\nvar cancelAnimationFrame = typeof window !== "undefined" ? window.cancelAnimationFrame || window.webkitCancelAnimationFrame || window.mozCancelAnimationFrame || cafPolyfill : global.cancelAnimationFrame || cafPolyfill;\n\nvar warn = function warn(msg) {\n return console && typeof console.warn === "function" && console.warn(msg);\n};\n\nvar _helmetCallback = null;\n\nvar handleClientStateChange = function handleClientStateChange(newState) {\n if (_helmetCallback) {\n cancelAnimationFrame(_helmetCallback);\n }\n\n if (newState.defer) {\n _helmetCallback = requestAnimationFrame(function () {\n commitTagChanges(newState, function () {\n _helmetCallback = null;\n });\n });\n } else {\n commitTagChanges(newState);\n _helmetCallback = null;\n }\n};\n\nvar commitTagChanges = function commitTagChanges(newState, cb) {\n var baseTag = newState.baseTag,\n bodyAttributes = newState.bodyAttributes,\n htmlAttributes = newState.htmlAttributes,\n linkTags = newState.linkTags,\n metaTags = newState.metaTags,\n noscriptTags = newState.noscriptTags,\n onChangeClientState = newState.onChangeClientState,\n scriptTags = newState.scriptTags,\n styleTags = newState.styleTags,\n title = newState.title,\n titleAttributes = newState.titleAttributes;\n\n updateAttributes(TAG_NAMES.BODY, bodyAttributes);\n updateAttributes(TAG_NAMES.HTML, htmlAttributes);\n\n updateTitle(title, titleAttributes);\n\n var tagUpdates = {\n baseTag: updateTags(TAG_NAMES.BASE, baseTag),\n linkTags: updateTags(TAG_NAMES.LINK, linkTags),\n metaTags: updateTags(TAG_NAMES.META, metaTags),\n noscriptTags: updateTags(TAG_NAMES.NOSCRIPT, noscriptTags),\n scriptTags: updateTags(TAG_NAMES.SCRIPT, scriptTags),\n styleTags: updateTags(TAG_NAMES.STYLE, styleTags)\n };\n\n var addedTags = {};\n var removedTags = {};\n\n Object.keys(tagUpdates).forEach(function (tagType) {\n var _tagUpdates$tagType = tagUpdates[tagType],\n newTags = _tagUpdates$tagType.newTags,\n oldTags = _tagUpdates$tagType.oldTags;\n\n\n if (newTags.length) {\n addedTags[tagType] = newTags;\n }\n if (oldTags.length) {\n removedTags[tagType] = tagUpdates[tagType].oldTags;\n }\n });\n\n cb && cb();\n\n onChangeClientState(newState, addedTags, removedTags);\n};\n\nvar flattenArray = function flattenArray(possibleArray) {\n return Array.isArray(possibleArray) ? possibleArray.join("") : possibleArray;\n};\n\nvar updateTitle = function updateTitle(title, attributes) {\n if (typeof title !== "undefined" && document.title !== title) {\n document.title = flattenArray(title);\n }\n\n updateAttributes(TAG_NAMES.TITLE, attributes);\n};\n\nvar updateAttributes = function updateAttributes(tagName, attributes) {\n var elementTag = document.getElementsByTagName(tagName)[0];\n\n if (!elementTag) {\n return;\n }\n\n var helmetAttributeString = elementTag.getAttribute(HELMET_ATTRIBUTE);\n var helmetAttributes = helmetAttributeString ? helmetAttributeString.split(",") : [];\n var attributesToRemove = [].concat(helmetAttributes);\n var attributeKeys = Object.keys(attributes);\n\n for (var i = 0; i < attributeKeys.length; i++) {\n var attribute = attributeKeys[i];\n var value = attributes[attribute] || "";\n\n if (elementTag.getAttribute(attribute) !== value) {\n elementTag.setAttribute(attribute, value);\n }\n\n if (helmetAttributes.indexOf(attribute) === -1) {\n helmetAttributes.push(attribute);\n }\n\n var indexToSave = attributesToRemove.indexOf(attribute);\n if (indexToSave !== -1) {\n attributesToRemove.splice(indexToSave, 1);\n }\n }\n\n for (var _i = attributesToRemove.length - 1; _i >= 0; _i--) {\n elementTag.removeAttribute(attributesToRemove[_i]);\n }\n\n if (helmetAttributes.length === attributesToRemove.length) {\n elementTag.removeAttribute(HELMET_ATTRIBUTE);\n } else if (elementTag.getAttribute(HELMET_ATTRIBUTE) !== attributeKeys.join(",")) {\n elementTag.setAttribute(HELMET_ATTRIBUTE, attributeKeys.join(","));\n }\n};\n\nvar updateTags = function updateTags(type, tags) {\n var headElement = document.head || document.querySelector(TAG_NAMES.HEAD);\n var tagNodes = headElement.querySelectorAll(type + "[" + HELMET_ATTRIBUTE + "]");\n var oldTags = Array.prototype.slice.call(tagNodes);\n var newTags = [];\n var indexToDelete = void 0;\n\n if (tags && tags.length) {\n tags.forEach(function (tag) {\n var newElement = document.createElement(type);\n\n for (var attribute in tag) {\n if (tag.hasOwnProperty(attribute)) {\n if (attribute === TAG_PROPERTIES.INNER_HTML) {\n newElement.innerHTML = tag.innerHTML;\n } else if (attribute === TAG_PROPERTIES.CSS_TEXT) {\n if (newElement.styleSheet) {\n newElement.styleSheet.cssText = tag.cssText;\n } else {\n newElement.appendChild(document.createTextNode(tag.cssText));\n }\n } else {\n var value = typeof tag[attribute] === "undefined" ? "" : tag[attribute];\n newElement.setAttribute(attribute, value);\n }\n }\n }\n\n newElement.setAttribute(HELMET_ATTRIBUTE, "true");\n\n // Remove a duplicate tag from domTagstoRemove, so it isn\'t cleared.\n if (oldTags.some(function (existingTag, index) {\n indexToDelete = index;\n return newElement.isEqualNode(existingTag);\n })) {\n oldTags.splice(indexToDelete, 1);\n } else {\n newTags.push(newElement);\n }\n });\n }\n\n oldTags.forEach(function (tag) {\n return tag.parentNode.removeChild(tag);\n });\n newTags.forEach(function (tag) {\n return headElement.appendChild(tag);\n });\n\n return {\n oldTags: oldTags,\n newTags: newTags\n };\n};\n\nvar generateElementAttributesAsString = function generateElementAttributesAsString(attributes) {\n return Object.keys(attributes).reduce(function (str, key) {\n var attr = typeof attributes[key] !== "undefined" ? key + "=\\"" + attributes[key] + "\\"" : "" + key;\n return str ? str + " " + attr : attr;\n }, "");\n};\n\nvar generateTitleAsString = function generateTitleAsString(type, title, attributes, encode) {\n var attributeString = generateElementAttributesAsString(attributes);\n var flattenedTitle = flattenArray(title);\n return attributeString ? "<" + type + " " + HELMET_ATTRIBUTE + "=\\"true\\" " + attributeString + ">" + encodeSpecialCharacters(flattenedTitle, encode) + "</" + type + ">" : "<" + type + " " + HELMET_ATTRIBUTE + "=\\"true\\">" + encodeSpecialCharacters(flattenedTitle, encode) + "</" + type + ">";\n};\n\nvar generateTagsAsString = function generateTagsAsString(type, tags, encode) {\n return tags.reduce(function (str, tag) {\n var attributeHtml = Object.keys(tag).filter(function (attribute) {\n return !(attribute === TAG_PROPERTIES.INNER_HTML || attribute === TAG_PROPERTIES.CSS_TEXT);\n }).reduce(function (string, attribute) {\n var attr = typeof tag[attribute] === "undefined" ? attribute : attribute + "=\\"" + encodeSpecialCharacters(tag[attribute], encode) + "\\"";\n return string ? string + " " + attr : attr;\n }, "");\n\n var tagContent = tag.innerHTML || tag.cssText || "";\n\n var isSelfClosing = SELF_CLOSING_TAGS.indexOf(type) === -1;\n\n return str + "<" + type + " " + HELMET_ATTRIBUTE + "=\\"true\\" " + attributeHtml + (isSelfClosing ? "/>" : ">" + tagContent + "</" + type + ">");\n }, "");\n};\n\nvar convertElementAttributestoReactProps = function convertElementAttributestoReactProps(attributes) {\n var initProps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n return Object.keys(attributes).reduce(function (obj, key) {\n obj[REACT_TAG_MAP[key] || key] = attributes[key];\n return obj;\n }, initProps);\n};\n\nvar convertReactPropstoHtmlAttributes = function convertReactPropstoHtmlAttributes(props) {\n var initAttributes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n return Object.keys(props).reduce(function (obj, key) {\n obj[HTML_TAG_MAP[key] || key] = props[key];\n return obj;\n }, initAttributes);\n};\n\nvar generateTitleAsReactComponent = function generateTitleAsReactComponent(type, title, attributes) {\n var _initProps;\n\n // assigning into an array to define toString function on it\n var initProps = (_initProps = {\n key: title\n }, _initProps[HELMET_ATTRIBUTE] = true, _initProps);\n var props = convertElementAttributestoReactProps(attributes, initProps);\n\n return [react__WEBPACK_IMPORTED_MODULE_2___default().createElement(TAG_NAMES.TITLE, props, title)];\n};\n\nvar generateTagsAsReactComponent = function generateTagsAsReactComponent(type, tags) {\n return tags.map(function (tag, i) {\n var _mappedTag;\n\n var mappedTag = (_mappedTag = {\n key: i\n }, _mappedTag[HELMET_ATTRIBUTE] = true, _mappedTag);\n\n Object.keys(tag).forEach(function (attribute) {\n var mappedAttribute = REACT_TAG_MAP[attribute] || attribute;\n\n if (mappedAttribute === TAG_PROPERTIES.INNER_HTML || mappedAttribute === TAG_PROPERTIES.CSS_TEXT) {\n var content = tag.innerHTML || tag.cssText;\n mappedTag.dangerouslySetInnerHTML = { __html: content };\n } else {\n mappedTag[mappedAttribute] = tag[attribute];\n }\n });\n\n return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(type, mappedTag);\n });\n};\n\nvar getMethodsForTag = function getMethodsForTag(type, tags, encode) {\n switch (type) {\n case TAG_NAMES.TITLE:\n return {\n toComponent: function toComponent() {\n return generateTitleAsReactComponent(type, tags.title, tags.titleAttributes, encode);\n },\n toString: function toString() {\n return generateTitleAsString(type, tags.title, tags.titleAttributes, encode);\n }\n };\n case ATTRIBUTE_NAMES.BODY:\n case ATTRIBUTE_NAMES.HTML:\n return {\n toComponent: function toComponent() {\n return convertElementAttributestoReactProps(tags);\n },\n toString: function toString() {\n return generateElementAttributesAsString(tags);\n }\n };\n default:\n return {\n toComponent: function toComponent() {\n return generateTagsAsReactComponent(type, tags);\n },\n toString: function toString() {\n return generateTagsAsString(type, tags, encode);\n }\n };\n }\n};\n\nvar mapStateOnServer = function mapStateOnServer(_ref) {\n var baseTag = _ref.baseTag,\n bodyAttributes = _ref.bodyAttributes,\n encode = _ref.encode,\n htmlAttributes = _ref.htmlAttributes,\n linkTags = _ref.linkTags,\n metaTags = _ref.metaTags,\n noscriptTags = _ref.noscriptTags,\n scriptTags = _ref.scriptTags,\n styleTags = _ref.styleTags,\n _ref$title = _ref.title,\n title = _ref$title === undefined ? "" : _ref$title,\n titleAttributes = _ref.titleAttributes;\n return {\n base: getMethodsForTag(TAG_NAMES.BASE, baseTag, encode),\n bodyAttributes: getMethodsForTag(ATTRIBUTE_NAMES.BODY, bodyAttributes, encode),\n htmlAttributes: getMethodsForTag(ATTRIBUTE_NAMES.HTML, htmlAttributes, encode),\n link: getMethodsForTag(TAG_NAMES.LINK, linkTags, encode),\n meta: getMethodsForTag(TAG_NAMES.META, metaTags, encode),\n noscript: getMethodsForTag(TAG_NAMES.NOSCRIPT, noscriptTags, encode),\n script: getMethodsForTag(TAG_NAMES.SCRIPT, scriptTags, encode),\n style: getMethodsForTag(TAG_NAMES.STYLE, styleTags, encode),\n title: getMethodsForTag(TAG_NAMES.TITLE, { title: title, titleAttributes: titleAttributes }, encode)\n };\n};\n\nvar Helmet = function Helmet(Component) {\n var _class, _temp;\n\n return _temp = _class = function (_React$Component) {\n inherits(HelmetWrapper, _React$Component);\n\n function HelmetWrapper() {\n classCallCheck(this, HelmetWrapper);\n return possibleConstructorReturn(this, _React$Component.apply(this, arguments));\n }\n\n HelmetWrapper.prototype.shouldComponentUpdate = function shouldComponentUpdate(nextProps) {\n return !react_fast_compare__WEBPACK_IMPORTED_MODULE_1___default()(this.props, nextProps);\n };\n\n HelmetWrapper.prototype.mapNestedChildrenToProps = function mapNestedChildrenToProps(child, nestedChildren) {\n if (!nestedChildren) {\n return null;\n }\n\n switch (child.type) {\n case TAG_NAMES.SCRIPT:\n case TAG_NAMES.NOSCRIPT:\n return {\n innerHTML: nestedChildren\n };\n\n case TAG_NAMES.STYLE:\n return {\n cssText: nestedChildren\n };\n }\n\n throw new Error("<" + child.type + " /> elements are self-closing and can not contain children. Refer to our API for more information.");\n };\n\n HelmetWrapper.prototype.flattenArrayTypeChildren = function flattenArrayTypeChildren(_ref) {\n var _babelHelpers$extends;\n\n var child = _ref.child,\n arrayTypeChildren = _ref.arrayTypeChildren,\n newChildProps = _ref.newChildProps,\n nestedChildren = _ref.nestedChildren;\n\n return _extends({}, arrayTypeChildren, (_babelHelpers$extends = {}, _babelHelpers$extends[child.type] = [].concat(arrayTypeChildren[child.type] || [], [_extends({}, newChildProps, this.mapNestedChildrenToProps(child, nestedChildren))]), _babelHelpers$extends));\n };\n\n HelmetWrapper.prototype.mapObjectTypeChildren = function mapObjectTypeChildren(_ref2) {\n var _babelHelpers$extends2, _babelHelpers$extends3;\n\n var child = _ref2.child,\n newProps = _ref2.newProps,\n newChildProps = _ref2.newChildProps,\n nestedChildren = _ref2.nestedChildren;\n\n switch (child.type) {\n case TAG_NAMES.TITLE:\n return _extends({}, newProps, (_babelHelpers$extends2 = {}, _babelHelpers$extends2[child.type] = nestedChildren, _babelHelpers$extends2.titleAttributes = _extends({}, newChildProps), _babelHelpers$extends2));\n\n case TAG_NAMES.BODY:\n return _extends({}, newProps, {\n bodyAttributes: _extends({}, newChildProps)\n });\n\n case TAG_NAMES.HTML:\n return _extends({}, newProps, {\n htmlAttributes: _extends({}, newChildProps)\n });\n }\n\n return _extends({}, newProps, (_babelHelpers$extends3 = {}, _babelHelpers$extends3[child.type] = _extends({}, newChildProps), _babelHelpers$extends3));\n };\n\n HelmetWrapper.prototype.mapArrayTypeChildrenToProps = function mapArrayTypeChildrenToProps(arrayTypeChildren, newProps) {\n var newFlattenedProps = _extends({}, newProps);\n\n Object.keys(arrayTypeChildren).forEach(function (arrayChildName) {\n var _babelHelpers$extends4;\n\n newFlattenedProps = _extends({}, newFlattenedProps, (_babelHelpers$extends4 = {}, _babelHelpers$extends4[arrayChildName] = arrayTypeChildren[arrayChildName], _babelHelpers$extends4));\n });\n\n return newFlattenedProps;\n };\n\n HelmetWrapper.prototype.warnOnInvalidChildren = function warnOnInvalidChildren(child, nestedChildren) {\n if (true) {\n if (!VALID_TAG_NAMES.some(function (name) {\n return child.type === name;\n })) {\n if (typeof child.type === "function") {\n return warn("You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information.");\n }\n\n return warn("Only elements types " + VALID_TAG_NAMES.join(", ") + " are allowed. Helmet does not support rendering <" + child.type + "> elements. Refer to our API for more information.");\n }\n\n if (nestedChildren && typeof nestedChildren !== "string" && (!Array.isArray(nestedChildren) || nestedChildren.some(function (nestedChild) {\n return typeof nestedChild !== "string";\n }))) {\n throw new Error("Helmet expects a string as a child of <" + child.type + ">. Did you forget to wrap your children in braces? ( <" + child.type + ">{``}</" + child.type + "> ) Refer to our API for more information.");\n }\n }\n\n return true;\n };\n\n HelmetWrapper.prototype.mapChildrenToProps = function mapChildrenToProps(children, newProps) {\n var _this2 = this;\n\n var arrayTypeChildren = {};\n\n react__WEBPACK_IMPORTED_MODULE_2___default().Children.forEach(children, function (child) {\n if (!child || !child.props) {\n return;\n }\n\n var _child$props = child.props,\n nestedChildren = _child$props.children,\n childProps = objectWithoutProperties(_child$props, ["children"]);\n\n var newChildProps = convertReactPropstoHtmlAttributes(childProps);\n\n _this2.warnOnInvalidChildren(child, nestedChildren);\n\n switch (child.type) {\n case TAG_NAMES.LINK:\n case TAG_NAMES.META:\n case TAG_NAMES.NOSCRIPT:\n case TAG_NAMES.SCRIPT:\n case TAG_NAMES.STYLE:\n arrayTypeChildren = _this2.flattenArrayTypeChildren({\n child: child,\n arrayTypeChildren: arrayTypeChildren,\n newChildProps: newChildProps,\n nestedChildren: nestedChildren\n });\n break;\n\n default:\n newProps = _this2.mapObjectTypeChildren({\n child: child,\n newProps: newProps,\n newChildProps: newChildProps,\n nestedChildren: nestedChildren\n });\n break;\n }\n });\n\n newProps = this.mapArrayTypeChildrenToProps(arrayTypeChildren, newProps);\n return newProps;\n };\n\n HelmetWrapper.prototype.render = function render() {\n var _props = this.props,\n children = _props.children,\n props = objectWithoutProperties(_props, ["children"]);\n\n var newProps = _extends({}, props);\n\n if (children) {\n newProps = this.mapChildrenToProps(children, newProps);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(Component, newProps);\n };\n\n createClass(HelmetWrapper, null, [{\n key: "canUseDOM",\n\n\n // Component.peek comes from react-side-effect:\n // For testing, you may use a static peek() method available on the returned component.\n // It lets you get the current state without resetting the mounted instance stack.\n // Don’t use it for anything other than testing.\n\n /**\n * @param {Object} base: {"target": "_blank", "href": "http://mysite.com/"}\n * @param {Object} bodyAttributes: {"className": "root"}\n * @param {String} defaultTitle: "Default Title"\n * @param {Boolean} defer: true\n * @param {Boolean} encodeSpecialCharacters: true\n * @param {Object} htmlAttributes: {"lang": "en", "amp": undefined}\n * @param {Array} link: [{"rel": "canonical", "href": "http://mysite.com/example"}]\n * @param {Array} meta: [{"name": "description", "content": "Test description"}]\n * @param {Array} noscript: [{"innerHTML": "<img src=\'http://mysite.com/js/test.js\'"}]\n * @param {Function} onChangeClientState: "(newState) => console.log(newState)"\n * @param {Array} script: [{"type": "text/javascript", "src": "http://mysite.com/js/test.js"}]\n * @param {Array} style: [{"type": "text/css", "cssText": "div { display: block; color: blue; }"}]\n * @param {String} title: "Title"\n * @param {Object} titleAttributes: {"itemprop": "name"}\n * @param {String} titleTemplate: "MySite.com - %s"\n */\n set: function set$$1(canUseDOM) {\n Component.canUseDOM = canUseDOM;\n }\n }]);\n return HelmetWrapper;\n }((react__WEBPACK_IMPORTED_MODULE_2___default().Component)), _class.propTypes = {\n base: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().object),\n bodyAttributes: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().object),\n children: prop_types__WEBPACK_IMPORTED_MODULE_4___default().oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_4___default().arrayOf((prop_types__WEBPACK_IMPORTED_MODULE_4___default().node)), (prop_types__WEBPACK_IMPORTED_MODULE_4___default().node)]),\n defaultTitle: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().string),\n defer: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().bool),\n encodeSpecialCharacters: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().bool),\n htmlAttributes: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().object),\n link: prop_types__WEBPACK_IMPORTED_MODULE_4___default().arrayOf((prop_types__WEBPACK_IMPORTED_MODULE_4___default().object)),\n meta: prop_types__WEBPACK_IMPORTED_MODULE_4___default().arrayOf((prop_types__WEBPACK_IMPORTED_MODULE_4___default().object)),\n noscript: prop_types__WEBPACK_IMPORTED_MODULE_4___default().arrayOf((prop_types__WEBPACK_IMPORTED_MODULE_4___default().object)),\n onChangeClientState: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().func),\n script: prop_types__WEBPACK_IMPORTED_MODULE_4___default().arrayOf((prop_types__WEBPACK_IMPORTED_MODULE_4___default().object)),\n style: prop_types__WEBPACK_IMPORTED_MODULE_4___default().arrayOf((prop_types__WEBPACK_IMPORTED_MODULE_4___default().object)),\n title: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().string),\n titleAttributes: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().object),\n titleTemplate: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().string)\n }, _class.defaultProps = {\n defer: true,\n encodeSpecialCharacters: true\n }, _class.peek = Component.peek, _class.rewind = function () {\n var mappedState = Component.rewind();\n if (!mappedState) {\n // provide fallback if mappedState is undefined\n mappedState = mapStateOnServer({\n baseTag: [],\n bodyAttributes: {},\n encodeSpecialCharacters: true,\n htmlAttributes: {},\n linkTags: [],\n metaTags: [],\n noscriptTags: [],\n scriptTags: [],\n styleTags: [],\n title: "",\n titleAttributes: {}\n });\n }\n\n return mappedState;\n }, _temp;\n};\n\nvar NullComponent = function NullComponent() {\n return null;\n};\n\nvar HelmetSideEffects = react_side_effect__WEBPACK_IMPORTED_MODULE_0___default()(reducePropsToState, handleClientStateChange, mapStateOnServer)(NullComponent);\n\nvar HelmetExport = Helmet(HelmetSideEffects);\nHelmetExport.renderStatic = HelmetExport.rewind;\n\n/* unused harmony default export */ var __WEBPACK_DEFAULT_EXPORT__ = ((/* unused pure expression or super */ null && (HelmetExport)));\n\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/react-helmet/es/Helmet.js?', + ); + + /***/ + }, + + /***/ 8413: /***/ (__unused_webpack_module, exports) => { + 'use strict'; + eval( + "/** @license React v16.13.1\n * react-is.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\n\n\nif (true) {\n (function() {\n'use strict';\n\n// The Symbol used to tag the ReactElement-like types. If there is no native Symbol\n// nor polyfill, then a plain number is used for performance.\nvar hasSymbol = typeof Symbol === 'function' && Symbol.for;\nvar REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;\nvar REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;\nvar REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;\nvar REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;\nvar REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;\nvar REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;\nvar REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary\n// (unstable) APIs that have been removed. Can we remove the symbols?\n\nvar REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;\nvar REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;\nvar REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;\nvar REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;\nvar REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;\nvar REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;\nvar REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;\nvar REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;\nvar REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;\nvar REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;\nvar REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;\n\nfunction isValidElementType(type) {\n return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.\n type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);\n}\n\nfunction typeOf(object) {\n if (typeof object === 'object' && object !== null) {\n var $$typeof = object.$$typeof;\n\n switch ($$typeof) {\n case REACT_ELEMENT_TYPE:\n var type = object.type;\n\n switch (type) {\n case REACT_ASYNC_MODE_TYPE:\n case REACT_CONCURRENT_MODE_TYPE:\n case REACT_FRAGMENT_TYPE:\n case REACT_PROFILER_TYPE:\n case REACT_STRICT_MODE_TYPE:\n case REACT_SUSPENSE_TYPE:\n return type;\n\n default:\n var $$typeofType = type && type.$$typeof;\n\n switch ($$typeofType) {\n case REACT_CONTEXT_TYPE:\n case REACT_FORWARD_REF_TYPE:\n case REACT_LAZY_TYPE:\n case REACT_MEMO_TYPE:\n case REACT_PROVIDER_TYPE:\n return $$typeofType;\n\n default:\n return $$typeof;\n }\n\n }\n\n case REACT_PORTAL_TYPE:\n return $$typeof;\n }\n }\n\n return undefined;\n} // AsyncMode is deprecated along with isAsyncMode\n\nvar AsyncMode = REACT_ASYNC_MODE_TYPE;\nvar ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;\nvar ContextConsumer = REACT_CONTEXT_TYPE;\nvar ContextProvider = REACT_PROVIDER_TYPE;\nvar Element = REACT_ELEMENT_TYPE;\nvar ForwardRef = REACT_FORWARD_REF_TYPE;\nvar Fragment = REACT_FRAGMENT_TYPE;\nvar Lazy = REACT_LAZY_TYPE;\nvar Memo = REACT_MEMO_TYPE;\nvar Portal = REACT_PORTAL_TYPE;\nvar Profiler = REACT_PROFILER_TYPE;\nvar StrictMode = REACT_STRICT_MODE_TYPE;\nvar Suspense = REACT_SUSPENSE_TYPE;\nvar hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated\n\nfunction isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint\n\n console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}\nfunction isConcurrentMode(object) {\n return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;\n}\nfunction isContextConsumer(object) {\n return typeOf(object) === REACT_CONTEXT_TYPE;\n}\nfunction isContextProvider(object) {\n return typeOf(object) === REACT_PROVIDER_TYPE;\n}\nfunction isElement(object) {\n return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n}\nfunction isForwardRef(object) {\n return typeOf(object) === REACT_FORWARD_REF_TYPE;\n}\nfunction isFragment(object) {\n return typeOf(object) === REACT_FRAGMENT_TYPE;\n}\nfunction isLazy(object) {\n return typeOf(object) === REACT_LAZY_TYPE;\n}\nfunction isMemo(object) {\n return typeOf(object) === REACT_MEMO_TYPE;\n}\nfunction isPortal(object) {\n return typeOf(object) === REACT_PORTAL_TYPE;\n}\nfunction isProfiler(object) {\n return typeOf(object) === REACT_PROFILER_TYPE;\n}\nfunction isStrictMode(object) {\n return typeOf(object) === REACT_STRICT_MODE_TYPE;\n}\nfunction isSuspense(object) {\n return typeOf(object) === REACT_SUSPENSE_TYPE;\n}\n\nexports.AsyncMode = AsyncMode;\nexports.ConcurrentMode = ConcurrentMode;\nexports.ContextConsumer = ContextConsumer;\nexports.ContextProvider = ContextProvider;\nexports.Element = Element;\nexports.ForwardRef = ForwardRef;\nexports.Fragment = Fragment;\nexports.Lazy = Lazy;\nexports.Memo = Memo;\nexports.Portal = Portal;\nexports.Profiler = Profiler;\nexports.StrictMode = StrictMode;\nexports.Suspense = Suspense;\nexports.isAsyncMode = isAsyncMode;\nexports.isConcurrentMode = isConcurrentMode;\nexports.isContextConsumer = isContextConsumer;\nexports.isContextProvider = isContextProvider;\nexports.isElement = isElement;\nexports.isForwardRef = isForwardRef;\nexports.isFragment = isFragment;\nexports.isLazy = isLazy;\nexports.isMemo = isMemo;\nexports.isPortal = isPortal;\nexports.isProfiler = isProfiler;\nexports.isStrictMode = isStrictMode;\nexports.isSuspense = isSuspense;\nexports.isValidElementType = isValidElementType;\nexports.typeOf = typeOf;\n })();\n}\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/react-is/cjs/react-is.development.js?", + ); + + /***/ + }, + + /***/ 4363: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + 'use strict'; + eval( + '\n\nif (false) {} else {\n module.exports = __webpack_require__(8413);\n}\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/react-is/index.js?', + ); + + /***/ + }, + + /***/ 3: /***/ (__unused_webpack_module, exports) => { + 'use strict'; + eval( + "\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports[\"default\"] = {\n authenticityToken: function () {\n var token = document.querySelector('meta[name=\"csrf-token\"]');\n if (token instanceof HTMLMetaElement) {\n return token.content;\n }\n return null;\n },\n authenticityHeaders: function (otherHeaders) {\n if (otherHeaders === void 0) { otherHeaders = {}; }\n return Object.assign(otherHeaders, {\n 'X-CSRF-Token': this.authenticityToken(),\n 'X-Requested-With': 'XMLHttpRequest',\n });\n },\n};\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/react-on-rails/node_package/lib/Authenticity.js?", + ); + + /***/ + }, + + /***/ 2184: /***/ function (__unused_webpack_module, exports, __webpack_require__) { + 'use strict'; + eval( + '\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { "default": mod };\n};\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nvar isRenderFunction_1 = __importDefault(__webpack_require__(8238));\nvar registeredComponents = new Map();\nexports["default"] = {\n /**\n * @param components { component1: component1, component2: component2, etc. }\n */\n register: function (components) {\n Object.keys(components).forEach(function (name) {\n if (registeredComponents.has(name)) {\n console.warn(\'Called register for component that is already registered\', name);\n }\n var component = components[name];\n if (!component) {\n throw new Error("Called register with null component named ".concat(name));\n }\n var renderFunction = (0, isRenderFunction_1.default)(component);\n var isRenderer = renderFunction && component.length === 3;\n registeredComponents.set(name, {\n name: name,\n component: component,\n renderFunction: renderFunction,\n isRenderer: isRenderer,\n });\n });\n },\n /**\n * @param name\n * @returns { name, component, isRenderFunction, isRenderer }\n */\n get: function (name) {\n var registeredComponent = registeredComponents.get(name);\n if (registeredComponent !== undefined) {\n return registeredComponent;\n }\n var keys = Array.from(registeredComponents.keys()).join(\', \');\n throw new Error("Could not find component registered with name ".concat(name, ". Registered component names include [ ").concat(keys, " ]. Maybe you forgot to register the component?"));\n },\n /**\n * Get a Map containing all registered components. Useful for debugging.\n * @returns Map where key is the component name and values are the\n * { name, component, renderFunction, isRenderer}\n */\n components: function () {\n return registeredComponents;\n },\n};\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/react-on-rails/node_package/lib/ComponentRegistry.js?', + ); + + /***/ + }, + + /***/ 2765: /***/ function (__unused_webpack_module, exports, __webpack_require__) { + 'use strict'; + eval( + '\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, "default", { enumerable: true, value: v });\n}) : function(o, v) {\n o["default"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { "default": mod };\n};\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nvar ClientStartup = __importStar(__webpack_require__(5564));\nvar handleError_1 = __importDefault(__webpack_require__(9556));\nvar ComponentRegistry_1 = __importDefault(__webpack_require__(2184));\nvar StoreRegistry_1 = __importDefault(__webpack_require__(2706));\nvar serverRenderReactComponent_1 = __importStar(__webpack_require__(2239));\nvar buildConsoleReplay_1 = __importDefault(__webpack_require__(7288));\nvar createReactOutput_1 = __importDefault(__webpack_require__(4598));\nvar Authenticity_1 = __importDefault(__webpack_require__(3));\nvar context_1 = __importDefault(__webpack_require__(4055));\nvar reactHydrateOrRender_1 = __importDefault(__webpack_require__(501));\nvar ctx = (0, context_1.default)();\nif (ctx === undefined) {\n throw new Error("The context (usually Window or NodeJS\'s Global) is undefined.");\n}\nif (ctx.ReactOnRails !== undefined) {\n throw new Error("\\n The ReactOnRails value exists in the ".concat(ctx, " scope, it may not be safe to overwrite it.\\n \\n This could be caused by setting Webpack\'s optimization.runtimeChunk to \\"true\\" or \\"multiple,\\" rather than \\"single.\\" Check your Webpack configuration.\\n \\n Read more at https://github.com/shakacode/react_on_rails/issues/1558.\\n "));\n}\nvar DEFAULT_OPTIONS = {\n traceTurbolinks: false,\n turbo: false,\n};\nctx.ReactOnRails = {\n options: {},\n /**\n * Main entry point to using the react-on-rails npm package. This is how Rails will be able to\n * find you components for rendering.\n * @param components (key is component name, value is component)\n */\n register: function (components) {\n ComponentRegistry_1.default.register(components);\n },\n registerStore: function (stores) {\n this.registerStoreGenerators(stores);\n },\n /**\n * Allows registration of store generators to be used by multiple React components on one Rails\n * view. store generators are functions that take one arg, props, and return a store. Note that\n * the setStore API is different in that it\'s the actual store hydrated with props.\n * @param storeGenerators (keys are store names, values are the store generators)\n */\n registerStoreGenerators: function (storeGenerators) {\n if (!storeGenerators) {\n throw new Error(\'Called ReactOnRails.registerStoreGenerators with a null or undefined, rather than \' +\n \'an Object with keys being the store names and the values are the store generators.\');\n }\n StoreRegistry_1.default.register(storeGenerators);\n },\n /**\n * Allows retrieval of the store by name. This store will be hydrated by any Rails form props.\n * Pass optional param throwIfMissing = false if you want to use this call to get back null if the\n * store with name is not registered.\n * @param name\n * @param throwIfMissing Defaults to true. Set to false to have this call return undefined if\n * there is no store with the given name.\n * @returns Redux Store, possibly hydrated\n */\n getStore: function (name, throwIfMissing) {\n if (throwIfMissing === void 0) { throwIfMissing = true; }\n return StoreRegistry_1.default.getStore(name, throwIfMissing);\n },\n /**\n * Renders or hydrates the react element passed. In case react version is >=18 will use the new api.\n * @param domNode\n * @param reactElement\n * @param hydrate if true will perform hydration, if false will render\n * @returns {Root|ReactComponent|ReactElement|null}\n */\n reactHydrateOrRender: function (domNode, reactElement, hydrate) {\n return (0, reactHydrateOrRender_1.default)(domNode, reactElement, hydrate);\n },\n /**\n * Set options for ReactOnRails, typically before you call ReactOnRails.register\n * Available Options:\n * `traceTurbolinks: true|false Gives you debugging messages on Turbolinks events\n * `turbo: true|false Turbo (the follower of Turbolinks) events will be registered, if set to true.\n */\n setOptions: function (newOptions) {\n if (typeof newOptions.traceTurbolinks !== \'undefined\') {\n this.options.traceTurbolinks = newOptions.traceTurbolinks;\n // eslint-disable-next-line no-param-reassign\n delete newOptions.traceTurbolinks;\n }\n if (typeof newOptions.turbo !== \'undefined\') {\n this.options.turbo = newOptions.turbo;\n // eslint-disable-next-line no-param-reassign\n delete newOptions.turbo;\n }\n if (Object.keys(newOptions).length > 0) {\n throw new Error("Invalid options passed to ReactOnRails.options: ".concat(JSON.stringify(newOptions)));\n }\n },\n /**\n * Allow directly calling the page loaded script in case the default events that trigger react\n * rendering are not sufficient, such as when loading JavaScript asynchronously with TurboLinks:\n * More details can be found here:\n * https://github.com/shakacode/react_on_rails/blob/master/docs/additional-reading/turbolinks.md\n */\n reactOnRailsPageLoaded: function () {\n ClientStartup.reactOnRailsPageLoaded();\n },\n reactOnRailsComponentLoaded: function (domId) {\n ClientStartup.reactOnRailsComponentLoaded(domId);\n },\n /**\n * Returns CSRF authenticity token inserted by Rails csrf_meta_tags\n * @returns String or null\n */\n authenticityToken: function () {\n return Authenticity_1.default.authenticityToken();\n },\n /**\n * Returns header with csrf authenticity token and XMLHttpRequest\n * @param otherHeaders Other headers\n * @returns {*} header\n */\n authenticityHeaders: function (otherHeaders) {\n if (otherHeaders === void 0) { otherHeaders = {}; }\n return Authenticity_1.default.authenticityHeaders(otherHeaders);\n },\n // /////////////////////////////////////////////////////////////////////////////\n // INTERNALLY USED APIs\n // /////////////////////////////////////////////////////////////////////////////\n /**\n * Retrieve an option by key.\n * @param key\n * @returns option value\n */\n option: function (key) {\n return this.options[key];\n },\n /**\n * Allows retrieval of the store generator by name. This is used internally by ReactOnRails after\n * a Rails form loads to prepare stores.\n * @param name\n * @returns Redux Store generator function\n */\n getStoreGenerator: function (name) {\n return StoreRegistry_1.default.getStoreGenerator(name);\n },\n /**\n * Allows saving the store populated by Rails form props. Used internally by ReactOnRails.\n * @param name\n * @returns Redux Store, possibly hydrated\n */\n setStore: function (name, store) {\n return StoreRegistry_1.default.setStore(name, store);\n },\n /**\n * Clears hydratedStores to avoid accidental usage of wrong store hydrated in previous/parallel\n * request.\n */\n clearHydratedStores: function () {\n StoreRegistry_1.default.clearHydratedStores();\n },\n /**\n * @example\n * ReactOnRails.render("HelloWorldApp", {name: "Stranger"}, \'app\');\n *\n * Does this:\n * ```js\n * ReactDOM.render(React.createElement(HelloWorldApp, {name: "Stranger"}),\n * document.getElementById(\'app\'))\n * ```\n * under React 16/17 and\n * ```js\n * const root = ReactDOMClient.createRoot(document.getElementById(\'app\'))\n * root.render(React.createElement(HelloWorldApp, {name: "Stranger"}))\n * return root\n * ```\n * under React 18+.\n *\n * @param name Name of your registered component\n * @param props Props to pass to your component\n * @param domNodeId\n * @param hydrate Pass truthy to update server rendered html. Default is falsy\n * @returns {Root|ReactComponent|ReactElement} Under React 18+: the created React root\n * (see "What is a root?" in https://github.com/reactwg/react-18/discussions/5).\n * Under React 16/17: Reference to your component\'s backing instance or `null` for stateless components.\n */\n render: function (name, props, domNodeId, hydrate) {\n var componentObj = ComponentRegistry_1.default.get(name);\n var reactElement = (0, createReactOutput_1.default)({ componentObj: componentObj, props: props, domNodeId: domNodeId });\n return (0, reactHydrateOrRender_1.default)(document.getElementById(domNodeId), reactElement, hydrate);\n },\n /**\n * Get the component that you registered\n * @param name\n * @returns {name, component, renderFunction, isRenderer}\n */\n getComponent: function (name) {\n return ComponentRegistry_1.default.get(name);\n },\n /**\n * Used by server rendering by Rails\n * @param options\n */\n serverRenderReactComponent: function (options) {\n return (0, serverRenderReactComponent_1.default)(options);\n },\n /**\n * Used by server rendering by Rails\n * @param options\n */\n streamServerRenderedReactComponent: function (options) {\n return (0, serverRenderReactComponent_1.streamServerRenderedReactComponent)(options);\n },\n /**\n * Used by Rails to catch errors in rendering\n * @param options\n */\n handleError: function (options) {\n return (0, handleError_1.default)(options);\n },\n /**\n * Used by Rails server rendering to replay console messages.\n */\n buildConsoleReplay: function () {\n return (0, buildConsoleReplay_1.default)();\n },\n /**\n * Get an Object containing all registered components. Useful for debugging.\n * @returns {*}\n */\n registeredComponents: function () {\n return ComponentRegistry_1.default.components();\n },\n /**\n * Get an Object containing all registered store generators. Useful for debugging.\n * @returns {*}\n */\n storeGenerators: function () {\n return StoreRegistry_1.default.storeGenerators();\n },\n /**\n * Get an Object containing all hydrated stores. Useful for debugging.\n * @returns {*}\n */\n stores: function () {\n return StoreRegistry_1.default.stores();\n },\n resetOptions: function () {\n this.options = Object.assign({}, DEFAULT_OPTIONS);\n },\n};\nctx.ReactOnRails.resetOptions();\nClientStartup.clientStartup(ctx);\n__exportStar(__webpack_require__(9146), exports);\nexports["default"] = ctx.ReactOnRails;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/react-on-rails/node_package/lib/ReactOnRails.js?', + ); + + /***/ + }, + + /***/ 402: /***/ (__unused_webpack_module, exports) => { + 'use strict'; + eval( + '\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports["default"] = {\n wrapInScriptTags: function (scriptId, scriptBody) {\n if (!scriptBody) {\n return \'\';\n }\n return "\\n<script id=\\"".concat(scriptId, "\\">\\n").concat(scriptBody, "\\n</script>");\n },\n};\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/react-on-rails/node_package/lib/RenderUtils.js?', + ); + + /***/ + }, + + /***/ 2706: /***/ (__unused_webpack_module, exports) => { + 'use strict'; + eval( + '\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nvar registeredStoreGenerators = new Map();\nvar hydratedStores = new Map();\nexports["default"] = {\n /**\n * Register a store generator, a function that takes props and returns a store.\n * @param storeGenerators { name1: storeGenerator1, name2: storeGenerator2 }\n */\n register: function (storeGenerators) {\n Object.keys(storeGenerators).forEach(function (name) {\n if (registeredStoreGenerators.has(name)) {\n console.warn(\'Called registerStore for store that is already registered\', name);\n }\n var store = storeGenerators[name];\n if (!store) {\n throw new Error(\'Called ReactOnRails.registerStores with a null or undefined as a value \' +\n "for the store generator with key ".concat(name, "."));\n }\n registeredStoreGenerators.set(name, store);\n });\n },\n /**\n * Used by components to get the hydrated store which contains props.\n * @param name\n * @param throwIfMissing Defaults to true. Set to false to have this call return undefined if\n * there is no store with the given name.\n * @returns Redux Store, possibly hydrated\n */\n getStore: function (name, throwIfMissing) {\n if (throwIfMissing === void 0) { throwIfMissing = true; }\n if (hydratedStores.has(name)) {\n return hydratedStores.get(name);\n }\n var storeKeys = Array.from(hydratedStores.keys()).join(\', \');\n if (storeKeys.length === 0) {\n var msg = "There are no stores hydrated and you are requesting the store ".concat(name, ".\\nThis can happen if you are server rendering and either:\\n1. You do not call redux_store near the top of your controller action\'s view (not the layout)\\n and before any call to react_component.\\n2. You do not render redux_store_hydration_data anywhere on your page.");\n throw new Error(msg);\n }\n if (throwIfMissing) {\n console.log(\'storeKeys\', storeKeys);\n throw new Error("Could not find hydrated store with name \'".concat(name, "\'. ") +\n "Hydrated store names include [".concat(storeKeys, "]."));\n }\n return undefined;\n },\n /**\n * Internally used function to get the store creator that was passed to `register`.\n * @param name\n * @returns storeCreator with given name\n */\n getStoreGenerator: function (name) {\n var registeredStoreGenerator = registeredStoreGenerators.get(name);\n if (registeredStoreGenerator) {\n return registeredStoreGenerator;\n }\n var storeKeys = Array.from(registeredStoreGenerators.keys()).join(\', \');\n throw new Error("Could not find store registered with name \'".concat(name, "\'. Registered store ") +\n "names include [ ".concat(storeKeys, " ]. Maybe you forgot to register the store?"));\n },\n /**\n * Internally used function to set the hydrated store after a Rails page is loaded.\n * @param name\n * @param store (not the storeGenerator, but the hydrated store)\n */\n setStore: function (name, store) {\n hydratedStores.set(name, store);\n },\n /**\n * Internally used function to completely clear hydratedStores Map.\n */\n clearHydratedStores: function () {\n hydratedStores.clear();\n },\n /**\n * Get a Map containing all registered store generators. Useful for debugging.\n * @returns Map where key is the component name and values are the store generators.\n */\n storeGenerators: function () {\n return registeredStoreGenerators;\n },\n /**\n * Get a Map containing all hydrated stores. Useful for debugging.\n * @returns Map where key is the component name and values are the hydrated stores.\n */\n stores: function () {\n return hydratedStores;\n },\n};\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/react-on-rails/node_package/lib/StoreRegistry.js?', + ); + + /***/ + }, + + /***/ 7288: /***/ function (__unused_webpack_module, exports, __webpack_require__) { + 'use strict'; + eval( + '\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { "default": mod };\n};\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.consoleReplay = consoleReplay;\nexports["default"] = buildConsoleReplay;\nvar RenderUtils_1 = __importDefault(__webpack_require__(402));\nvar scriptSanitizedVal_1 = __importDefault(__webpack_require__(873));\nfunction consoleReplay(customConsoleHistory, numberOfMessagesToSkip) {\n if (customConsoleHistory === void 0) { customConsoleHistory = undefined; }\n if (numberOfMessagesToSkip === void 0) { numberOfMessagesToSkip = 0; }\n // console.history is a global polyfill used in server rendering.\n var consoleHistory = customConsoleHistory !== null && customConsoleHistory !== void 0 ? customConsoleHistory : console.history;\n if (!(Array.isArray(consoleHistory))) {\n return \'\';\n }\n var lines = consoleHistory.slice(numberOfMessagesToSkip).map(function (msg) {\n var stringifiedList = msg.arguments.map(function (arg) {\n var val;\n try {\n if (typeof arg === \'string\') {\n val = arg;\n }\n else if (arg instanceof String) {\n val = String(arg);\n }\n else {\n val = JSON.stringify(arg);\n }\n if (val === undefined) {\n val = \'undefined\';\n }\n }\n catch (e) {\n val = "".concat(e.message, ": ").concat(arg);\n }\n return (0, scriptSanitizedVal_1.default)(val);\n });\n return "console.".concat(msg.level, ".apply(console, ").concat(JSON.stringify(stringifiedList), ");");\n });\n return lines.join(\'\\n\');\n}\nfunction buildConsoleReplay(customConsoleHistory, numberOfMessagesToSkip) {\n if (customConsoleHistory === void 0) { customConsoleHistory = undefined; }\n if (numberOfMessagesToSkip === void 0) { numberOfMessagesToSkip = 0; }\n return RenderUtils_1.default.wrapInScriptTags(\'consoleReplayLog\', consoleReplay(customConsoleHistory, numberOfMessagesToSkip));\n}\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/react-on-rails/node_package/lib/buildConsoleReplay.js?', + ); + + /***/ + }, + + /***/ 5564: /***/ function (__unused_webpack_module, exports, __webpack_require__) { + 'use strict'; + eval( + "\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.reactOnRailsPageLoaded = reactOnRailsPageLoaded;\nexports.reactOnRailsComponentLoaded = reactOnRailsComponentLoaded;\nexports.clientStartup = clientStartup;\nvar react_dom_1 = __importDefault(__webpack_require__(961));\nvar createReactOutput_1 = __importDefault(__webpack_require__(4598));\nvar isServerRenderResult_1 = __webpack_require__(7840);\nvar reactHydrateOrRender_1 = __importDefault(__webpack_require__(501));\nvar reactApis_1 = __webpack_require__(282);\nvar REACT_ON_RAILS_STORE_ATTRIBUTE = 'data-js-react-on-rails-store';\nfunction findContext() {\n if (typeof window.ReactOnRails !== 'undefined') {\n return window;\n }\n else if (typeof ReactOnRails !== 'undefined') {\n return global;\n }\n throw new Error(\"ReactOnRails is undefined in both global and window namespaces.\\n \");\n}\nfunction debugTurbolinks() {\n var msg = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n msg[_i] = arguments[_i];\n }\n if (!window) {\n return;\n }\n var context = findContext();\n if (context.ReactOnRails && context.ReactOnRails.option('traceTurbolinks')) {\n console.log.apply(console, __spreadArray(['TURBO:'], msg, false));\n }\n}\nfunction turbolinksInstalled() {\n return (typeof Turbolinks !== 'undefined');\n}\nfunction turboInstalled() {\n var context = findContext();\n if (context.ReactOnRails) {\n return context.ReactOnRails.option('turbo') === true;\n }\n return false;\n}\nfunction reactOnRailsHtmlElements() {\n return document.getElementsByClassName('js-react-on-rails-component');\n}\nfunction initializeStore(el, context, railsContext) {\n var name = el.getAttribute(REACT_ON_RAILS_STORE_ATTRIBUTE) || '';\n var props = (el.textContent !== null) ? JSON.parse(el.textContent) : {};\n var storeGenerator = context.ReactOnRails.getStoreGenerator(name);\n var store = storeGenerator(props, railsContext);\n context.ReactOnRails.setStore(name, store);\n}\nfunction forEachStore(context, railsContext) {\n var els = document.querySelectorAll(\"[\".concat(REACT_ON_RAILS_STORE_ATTRIBUTE, \"]\"));\n for (var i = 0; i < els.length; i += 1) {\n initializeStore(els[i], context, railsContext);\n }\n}\nfunction turbolinksVersion5() {\n return (typeof Turbolinks.controller !== 'undefined');\n}\nfunction turbolinksSupported() {\n return Turbolinks.supported;\n}\nfunction delegateToRenderer(componentObj, props, railsContext, domNodeId, trace) {\n var name = componentObj.name, component = componentObj.component, isRenderer = componentObj.isRenderer;\n if (isRenderer) {\n if (trace) {\n console.log(\"DELEGATING TO RENDERER \".concat(name, \" for dom node with id: \").concat(domNodeId, \" with props, railsContext:\"), props, railsContext);\n }\n component(props, railsContext, domNodeId);\n return true;\n }\n return false;\n}\nfunction domNodeIdForEl(el) {\n return el.getAttribute('data-dom-id') || '';\n}\n/**\n * Used for client rendering by ReactOnRails. Either calls ReactDOM.hydrate, ReactDOM.render, or\n * delegates to a renderer registered by the user.\n */\nfunction render(el, context, railsContext) {\n // This must match lib/react_on_rails/helper.rb\n var name = el.getAttribute('data-component-name') || '';\n var domNodeId = domNodeIdForEl(el);\n var props = (el.textContent !== null) ? JSON.parse(el.textContent) : {};\n var trace = el.getAttribute('data-trace') === 'true';\n try {\n var domNode = document.getElementById(domNodeId);\n if (domNode) {\n var componentObj = context.ReactOnRails.getComponent(name);\n if (delegateToRenderer(componentObj, props, railsContext, domNodeId, trace)) {\n return;\n }\n // Hydrate if available and was server rendered\n // @ts-expect-error potentially present if React 18 or greater\n var shouldHydrate = !!(react_dom_1.default.hydrate || react_dom_1.default.hydrateRoot) && !!domNode.innerHTML;\n var reactElementOrRouterResult = (0, createReactOutput_1.default)({\n componentObj: componentObj,\n props: props,\n domNodeId: domNodeId,\n trace: trace,\n railsContext: railsContext,\n shouldHydrate: shouldHydrate,\n });\n if ((0, isServerRenderResult_1.isServerRenderHash)(reactElementOrRouterResult)) {\n throw new Error(\"You returned a server side type of react-router error: \".concat(JSON.stringify(reactElementOrRouterResult), \"\\nYou should return a React.Component always for the client side entry point.\"));\n }\n else {\n var rootOrElement = (0, reactHydrateOrRender_1.default)(domNode, reactElementOrRouterResult, shouldHydrate);\n if (reactApis_1.supportsRootApi) {\n context.roots.push(rootOrElement);\n }\n }\n }\n }\n catch (e) {\n console.error(e.message);\n e.message = \"ReactOnRails encountered an error while rendering component: \".concat(name, \". See above error message.\");\n throw e;\n }\n}\nfunction forEachReactOnRailsComponentRender(context, railsContext) {\n var els = reactOnRailsHtmlElements();\n for (var i = 0; i < els.length; i += 1) {\n render(els[i], context, railsContext);\n }\n}\nfunction parseRailsContext() {\n var el = document.getElementById('js-react-on-rails-context');\n if (!el) {\n // The HTML page will not have an element with ID 'js-react-on-rails-context' if there are no\n // react on rails components\n return null;\n }\n if (!el.textContent) {\n throw new Error('The HTML element with ID \\'js-react-on-rails-context\\' has no textContent');\n }\n return JSON.parse(el.textContent);\n}\nfunction reactOnRailsPageLoaded() {\n debugTurbolinks('reactOnRailsPageLoaded');\n var railsContext = parseRailsContext();\n // If no react on rails components\n if (!railsContext)\n return;\n var context = findContext();\n if (reactApis_1.supportsRootApi) {\n context.roots = [];\n }\n forEachStore(context, railsContext);\n forEachReactOnRailsComponentRender(context, railsContext);\n}\nfunction reactOnRailsComponentLoaded(domId) {\n debugTurbolinks(\"reactOnRailsComponentLoaded \".concat(domId));\n var railsContext = parseRailsContext();\n // If no react on rails components\n if (!railsContext)\n return;\n var context = findContext();\n if (reactApis_1.supportsRootApi) {\n context.roots = [];\n }\n var el = document.querySelector(\"[data-dom-id=\".concat(domId, \"]\"));\n if (!el)\n return;\n render(el, context, railsContext);\n}\nfunction unmount(el) {\n var domNodeId = domNodeIdForEl(el);\n var domNode = document.getElementById(domNodeId);\n if (domNode === null) {\n return;\n }\n try {\n react_dom_1.default.unmountComponentAtNode(domNode);\n }\n catch (e) {\n console.info(\"Caught error calling unmountComponentAtNode: \".concat(e.message, \" for domNode\"), domNode, e);\n }\n}\nfunction reactOnRailsPageUnloaded() {\n debugTurbolinks('reactOnRailsPageUnloaded');\n if (reactApis_1.supportsRootApi) {\n var roots = findContext().roots;\n // If no react on rails components\n if (!roots)\n return;\n for (var _i = 0, roots_1 = roots; _i < roots_1.length; _i++) {\n var root = roots_1[_i];\n root.unmount();\n }\n }\n else {\n var els = reactOnRailsHtmlElements();\n for (var i = 0; i < els.length; i += 1) {\n unmount(els[i]);\n }\n }\n}\nfunction renderInit() {\n // Install listeners when running on the client (browser).\n // We must do this check for turbolinks AFTER the document is loaded because we load the\n // Webpack bundles first.\n if ((!turbolinksInstalled() || !turbolinksSupported()) && !turboInstalled()) {\n debugTurbolinks('NOT USING TURBOLINKS: calling reactOnRailsPageLoaded');\n reactOnRailsPageLoaded();\n return;\n }\n if (turboInstalled()) {\n debugTurbolinks('USING TURBO: document added event listeners ' +\n 'turbo:before-render and turbo:render.');\n document.addEventListener('turbo:before-render', reactOnRailsPageUnloaded);\n document.addEventListener('turbo:render', reactOnRailsPageLoaded);\n reactOnRailsPageLoaded();\n }\n else if (turbolinksVersion5()) {\n debugTurbolinks('USING TURBOLINKS 5: document added event listeners ' +\n 'turbolinks:before-render and turbolinks:render.');\n document.addEventListener('turbolinks:before-render', reactOnRailsPageUnloaded);\n document.addEventListener('turbolinks:render', reactOnRailsPageLoaded);\n reactOnRailsPageLoaded();\n }\n else {\n debugTurbolinks('USING TURBOLINKS 2: document added event listeners page:before-unload and ' +\n 'page:change.');\n document.addEventListener('page:before-unload', reactOnRailsPageUnloaded);\n document.addEventListener('page:change', reactOnRailsPageLoaded);\n }\n}\nfunction isWindow(context) {\n return context.document !== undefined;\n}\nfunction onPageReady(callback) {\n if (document.readyState === \"complete\") {\n callback();\n }\n else {\n document.addEventListener(\"readystatechange\", function onReadyStateChange() {\n onPageReady(callback);\n document.removeEventListener(\"readystatechange\", onReadyStateChange);\n });\n }\n}\nfunction clientStartup(context) {\n // Check if server rendering\n if (!isWindow(context)) {\n return;\n }\n // Tried with a file local variable, but the install handler gets called twice.\n // eslint-disable-next-line no-underscore-dangle\n if (context.__REACT_ON_RAILS_EVENT_HANDLERS_RAN_ONCE__) {\n return;\n }\n // eslint-disable-next-line no-underscore-dangle, no-param-reassign\n context.__REACT_ON_RAILS_EVENT_HANDLERS_RAN_ONCE__ = true;\n onPageReady(renderInit);\n}\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/react-on-rails/node_package/lib/clientStartup.js?", + ); + + /***/ + }, + + /***/ 4055: /***/ (__unused_webpack_module, exports) => { + 'use strict'; + eval( + '\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports["default"] = context;\n/**\n * Get the context, be it window or global\n * @returns {boolean|Window|*|context}\n */\nfunction context() {\n return ((typeof window !== \'undefined\') && window) ||\n ((typeof global !== \'undefined\') && global) ||\n this;\n}\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/react-on-rails/node_package/lib/context.js?', + ); + + /***/ + }, + + /***/ 4598: /***/ function (__unused_webpack_module, exports, __webpack_require__) { + 'use strict'; + eval( + '\n/* eslint-disable react/prop-types */\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { "default": mod };\n};\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports["default"] = createReactOutput;\nvar react_1 = __importDefault(__webpack_require__(6540));\nvar isServerRenderResult_1 = __webpack_require__(7840);\n/**\n * Logic to either call the renderFunction or call React.createElement to get the\n * React.Component\n * @param options\n * @param options.componentObj\n * @param options.props\n * @param options.domNodeId\n * @param options.trace\n * @param options.location\n * @returns {ReactElement}\n */\nfunction createReactOutput(_a) {\n var componentObj = _a.componentObj, props = _a.props, railsContext = _a.railsContext, domNodeId = _a.domNodeId, trace = _a.trace, shouldHydrate = _a.shouldHydrate;\n var name = componentObj.name, component = componentObj.component, renderFunction = componentObj.renderFunction;\n if (trace) {\n if (railsContext && railsContext.serverSide) {\n console.log("RENDERED ".concat(name, " to dom node with id: ").concat(domNodeId));\n }\n else if (shouldHydrate) {\n console.log("HYDRATED ".concat(name, " in dom node with id: ").concat(domNodeId, " using props, railsContext:"), props, railsContext);\n }\n else {\n console.log("RENDERED ".concat(name, " to dom node with id: ").concat(domNodeId, " with props, railsContext:"), props, railsContext);\n }\n }\n if (renderFunction) {\n // Let\'s invoke the function to get the result\n if (trace) {\n console.log("".concat(name, " is a renderFunction"));\n }\n var renderFunctionResult = component(props, railsContext);\n if ((0, isServerRenderResult_1.isServerRenderHash)(renderFunctionResult)) {\n // We just return at this point, because calling function knows how to handle this case and\n // we can\'t call React.createElement with this type of Object.\n return renderFunctionResult;\n }\n if ((0, isServerRenderResult_1.isPromise)(renderFunctionResult)) {\n // We just return at this point, because calling function knows how to handle this case and\n // we can\'t call React.createElement with this type of Object.\n return renderFunctionResult;\n }\n if (react_1.default.isValidElement(renderFunctionResult)) {\n // If already a ReactElement, then just return it.\n console.error("Warning: ReactOnRails: Your registered render-function (ReactOnRails.register) for ".concat(name, "\\nincorrectly returned a React Element (JSX). Instead, return a React Function Component by\\nwrapping your JSX in a function. ReactOnRails v13 will throw error on this, as React Hooks do not\\nwork if you return JSX. Update by wrapping the result JSX of ").concat(name, " in a fat arrow function."));\n return renderFunctionResult;\n }\n // If a component, then wrap in an element\n var reactComponent = renderFunctionResult;\n return react_1.default.createElement(reactComponent, props);\n }\n // else\n return react_1.default.createElement(component, props);\n}\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/react-on-rails/node_package/lib/createReactOutput.js?', + ); + + /***/ + }, + + /***/ 9556: /***/ function (__unused_webpack_module, exports, __webpack_require__) { + 'use strict'; + eval( + '\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { "default": mod };\n};\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nvar react_1 = __importDefault(__webpack_require__(6540));\nvar server_1 = __importDefault(__webpack_require__(4362));\nfunction handleRenderFunctionIssue(options) {\n var e = options.e, name = options.name;\n var msg = \'\';\n if (name) {\n var lastLine = \'A Render-Function takes a single arg of props (and the location for react-router) \' +\n \'and returns a ReactElement.\';\n var shouldBeRenderFunctionError = "ERROR: ReactOnRails is incorrectly detecting Render-Function to be false. The React\\ncomponent \'".concat(name, "\' seems to be a Render-Function.\\n").concat(lastLine);\n var reMatchShouldBeGeneratorError = /Can\'t add property context, object is not extensible/;\n if (reMatchShouldBeGeneratorError.test(e.message)) {\n msg += "".concat(shouldBeRenderFunctionError, "\\n\\n");\n console.error(shouldBeRenderFunctionError);\n }\n shouldBeRenderFunctionError =\n "ERROR: ReactOnRails is incorrectly detecting renderFunction to be true, but the React\\ncomponent \'".concat(name, "\' is not a Render-Function.\\n").concat(lastLine);\n var reMatchShouldNotBeGeneratorError = /Cannot call a class as a function/;\n if (reMatchShouldNotBeGeneratorError.test(e.message)) {\n msg += "".concat(shouldBeRenderFunctionError, "\\n\\n");\n console.error(shouldBeRenderFunctionError);\n }\n }\n return msg;\n}\nvar handleError = function (options) {\n var e = options.e, jsCode = options.jsCode, serverSide = options.serverSide;\n console.error(\'Exception in rendering!\');\n var msg = handleRenderFunctionIssue(options);\n if (jsCode) {\n console.error("JS code was: ".concat(jsCode));\n }\n if (e.fileName) {\n console.error("location: ".concat(e.fileName, ":").concat(e.lineNumber));\n }\n console.error("message: ".concat(e.message));\n console.error("stack: ".concat(e.stack));\n if (serverSide) {\n msg += "Exception in rendering!\\n".concat(e.fileName ? "\\nlocation: ".concat(e.fileName, ":").concat(e.lineNumber) : \'\', "\\nMessage: ").concat(e.message, "\\n\\n").concat(e.stack);\n var reactElement = react_1.default.createElement(\'pre\', null, msg);\n return server_1.default.renderToString(reactElement);\n }\n return "undefined";\n};\nexports["default"] = handleError;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/react-on-rails/node_package/lib/handleError.js?', + ); + + /***/ + }, + + /***/ 8238: /***/ (__unused_webpack_module, exports) => { + 'use strict'; + eval( + '\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports["default"] = isRenderFunction;\n/**\n * Used to determine we\'ll call be calling React.createElement on the component of if this is a\n * Render-Function used return a function that takes props to return a React element\n * @param component\n * @returns {boolean}\n */\nfunction isRenderFunction(component) {\n var _a;\n // No for es5 or es6 React Component\n if ((_a = component.prototype) === null || _a === void 0 ? void 0 : _a.isReactComponent) {\n return false;\n }\n if (component.renderFunction) {\n return true;\n }\n // If zero or one args, then we know that this is a regular function that will\n // return a React component\n if (component.length >= 2) {\n return true;\n }\n return false;\n}\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/react-on-rails/node_package/lib/isRenderFunction.js?', + ); + + /***/ + }, + + /***/ 7840: /***/ (__unused_webpack_module, exports) => { + 'use strict'; + eval( + '\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.isServerRenderHash = isServerRenderHash;\nexports.isPromise = isPromise;\nfunction isServerRenderHash(testValue) {\n return !!(testValue.renderedHtml ||\n testValue.redirectLocation ||\n testValue.routeError ||\n testValue.error);\n}\nfunction isPromise(testValue) {\n return !!(testValue === null || testValue === void 0 ? void 0 : testValue.then);\n}\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/react-on-rails/node_package/lib/isServerRenderResult.js?', + ); + + /***/ + }, + + /***/ 282: /***/ function (__unused_webpack_module, exports, __webpack_require__) { + 'use strict'; + eval( + '\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { "default": mod };\n};\nvar _a;\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.supportsRootApi = void 0;\nvar react_dom_1 = __importDefault(__webpack_require__(961));\nvar reactMajorVersion = Number((_a = react_dom_1.default.version) === null || _a === void 0 ? void 0 : _a.split(\'.\')[0]) || 16;\n// TODO: once we require React 18, we can remove this and inline everything guarded by it.\n// Not the default export because others may be added for future React versions.\n// eslint-disable-next-line import/prefer-default-export\nexports.supportsRootApi = reactMajorVersion >= 18;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/react-on-rails/node_package/lib/reactApis.js?', + ); + + /***/ + }, + + /***/ 501: /***/ function (__unused_webpack_module, exports, __webpack_require__) { + 'use strict'; + eval( + '\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { "default": mod };\n};\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.reactHydrate = void 0;\nexports.reactRender = reactRender;\nexports["default"] = reactHydrateOrRender;\nvar react_dom_1 = __importDefault(__webpack_require__(961));\nvar reactApis_1 = __webpack_require__(282);\n// TODO: once React dependency is updated to >= 18, we can remove this and just\n// import ReactDOM from \'react-dom/client\';\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nvar reactDomClient;\nif (reactApis_1.supportsRootApi) {\n // This will never throw an exception, but it\'s the way to tell Webpack the dependency is optional\n // https://github.com/webpack/webpack/issues/339#issuecomment-47739112\n // Unfortunately, it only converts the error to a warning.\n try {\n // eslint-disable-next-line global-require,import/no-unresolved\n reactDomClient = __webpack_require__(5338);\n }\n catch (e) {\n // We should never get here, but if we do, we\'ll just use the default ReactDOM\n // and live with the warning.\n reactDomClient = react_dom_1.default;\n }\n}\nexports.reactHydrate = reactApis_1.supportsRootApi ?\n reactDomClient.hydrateRoot :\n function (domNode, reactElement) { return react_dom_1.default.hydrate(reactElement, domNode); };\nfunction reactRender(domNode, reactElement) {\n if (reactApis_1.supportsRootApi) {\n var root = reactDomClient.createRoot(domNode);\n root.render(reactElement);\n return root;\n }\n // eslint-disable-next-line react/no-render-return-value\n return react_dom_1.default.render(reactElement, domNode);\n}\nfunction reactHydrateOrRender(domNode, reactElement, hydrate) {\n return hydrate ? (0, exports.reactHydrate)(domNode, reactElement) : reactRender(domNode, reactElement);\n}\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/react-on-rails/node_package/lib/reactHydrateOrRender.js?', + ); + + /***/ + }, + + /***/ 873: /***/ (__unused_webpack_module, exports) => { + 'use strict'; + eval( + '\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports["default"] = (function (val) {\n // Replace closing\n var re = /<\\/\\W*script/gi;\n return val.replace(re, \'(/script\');\n});\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/react-on-rails/node_package/lib/scriptSanitizedVal.js?', + ); + + /***/ + }, + + /***/ 2239: /***/ function (__unused_webpack_module, exports, __webpack_require__) { + 'use strict'; + eval( + '\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);\n return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError("Generator is already executing.");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { "default": mod };\n};\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.streamServerRenderedReactComponent = void 0;\nvar server_1 = __importDefault(__webpack_require__(4362));\nvar stream_1 = __webpack_require__(2203);\nvar ComponentRegistry_1 = __importDefault(__webpack_require__(2184));\nvar createReactOutput_1 = __importDefault(__webpack_require__(4598));\nvar isServerRenderResult_1 = __webpack_require__(7840);\nvar buildConsoleReplay_1 = __importDefault(__webpack_require__(7288));\nvar handleError_1 = __importDefault(__webpack_require__(9556));\nfunction convertToError(e) {\n return e instanceof Error ? e : new Error(String(e));\n}\nfunction validateComponent(componentObj, componentName) {\n if (componentObj.isRenderer) {\n throw new Error("Detected a renderer while server rendering component \'".concat(componentName, "\'. See https://github.com/shakacode/react_on_rails#renderer-functions"));\n }\n}\nfunction processServerRenderHash(result, options) {\n var redirectLocation = result.redirectLocation, routeError = result.routeError;\n var hasErrors = !!routeError;\n if (hasErrors) {\n console.error("React Router ERROR: ".concat(JSON.stringify(routeError)));\n }\n var htmlResult;\n if (redirectLocation) {\n if (options.trace) {\n var redirectPath = redirectLocation.pathname + redirectLocation.search;\n console.log("ROUTER REDIRECT: ".concat(options.componentName, " to dom node with id: ").concat(options.domNodeId, ", redirect to ").concat(redirectPath));\n }\n // For redirects on server rendering, we can\'t stop Rails from returning the same result.\n // Possibly, someday, we could have the Rails server redirect.\n htmlResult = \'\';\n }\n else {\n htmlResult = result.renderedHtml;\n }\n return { result: htmlResult, hasErrors: hasErrors };\n}\nfunction processPromise(result, renderingReturnsPromises) {\n if (!renderingReturnsPromises) {\n console.error(\'Your render function returned a Promise, which is only supported by a node renderer, not ExecJS.\');\n // If the app is using server rendering with ExecJS, then the promise will not be awaited.\n // And when a promise is passed to JSON.stringify, it will be converted to \'{}\'.\n return \'{}\';\n }\n return result;\n}\nfunction processReactElement(result) {\n try {\n return server_1.default.renderToString(result);\n }\n catch (error) {\n console.error("Invalid call to renderToString. Possibly you have a renderFunction, a function that already\\ncalls renderToString, that takes one parameter. You need to add an extra unused parameter to identify this function\\nas a renderFunction and not a simple React Function Component.");\n throw error;\n }\n}\nfunction processRenderingResult(result, options) {\n if ((0, isServerRenderResult_1.isServerRenderHash)(result)) {\n return processServerRenderHash(result, options);\n }\n if ((0, isServerRenderResult_1.isPromise)(result)) {\n return { result: processPromise(result, options.renderingReturnsPromises), hasErrors: false };\n }\n return { result: processReactElement(result), hasErrors: false };\n}\nfunction handleRenderingError(e, options) {\n if (options.throwJsErrors) {\n throw e;\n }\n var error = convertToError(e);\n return {\n hasErrors: true,\n result: (0, handleError_1.default)({ e: error, name: options.componentName, serverSide: true }),\n error: error,\n };\n}\nfunction createResultObject(html, consoleReplayScript, renderState) {\n return {\n html: html,\n consoleReplayScript: consoleReplayScript,\n hasErrors: renderState.hasErrors,\n renderingError: renderState.error && { message: renderState.error.message, stack: renderState.error.stack },\n isShellReady: \'isShellReady\' in renderState ? renderState.isShellReady : undefined,\n };\n}\nfunction createPromiseResult(renderState, componentName, throwJsErrors) {\n return __awaiter(this, void 0, void 0, function () {\n var consoleHistory, html, consoleReplayScript, e_1, errorRenderState, consoleReplayScript;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n consoleHistory = console.history;\n _a.label = 1;\n case 1:\n _a.trys.push([1, 3, , 4]);\n return [4 /*yield*/, renderState.result];\n case 2:\n html = _a.sent();\n consoleReplayScript = (0, buildConsoleReplay_1.default)(consoleHistory);\n return [2 /*return*/, createResultObject(html, consoleReplayScript, renderState)];\n case 3:\n e_1 = _a.sent();\n errorRenderState = handleRenderingError(e_1, { componentName: componentName, throwJsErrors: throwJsErrors });\n consoleReplayScript = (0, buildConsoleReplay_1.default)(consoleHistory);\n return [2 /*return*/, createResultObject(errorRenderState.result, consoleReplayScript, renderState)];\n case 4: return [2 /*return*/];\n }\n });\n });\n}\nfunction createFinalResult(renderState, componentName, throwJsErrors) {\n var result = renderState.result;\n if ((0, isServerRenderResult_1.isPromise)(result)) {\n return createPromiseResult(__assign(__assign({}, renderState), { result: result }), componentName, throwJsErrors);\n }\n var consoleReplayScript = (0, buildConsoleReplay_1.default)();\n return JSON.stringify(createResultObject(result, consoleReplayScript, renderState));\n}\nfunction serverRenderReactComponentInternal(options) {\n var componentName = options.name, domNodeId = options.domNodeId, trace = options.trace, props = options.props, railsContext = options.railsContext, renderingReturnsPromises = options.renderingReturnsPromises, throwJsErrors = options.throwJsErrors;\n var renderState = {\n result: null,\n hasErrors: false,\n };\n try {\n var componentObj = ComponentRegistry_1.default.get(componentName);\n validateComponent(componentObj, componentName);\n // Renders the component or executes the render function\n // - If the registered component is a React element or component, it renders it\n // - If it\'s a render function, it executes the function and processes the result:\n // - For React elements or components, it renders them\n // - For promises, it returns them without awaiting (for async rendering)\n // - For other values (e.g., strings), it returns them directly\n // Note: Only synchronous operations are performed at this stage\n var reactRenderingResult = (0, createReactOutput_1.default)({ componentObj: componentObj, domNodeId: domNodeId, trace: trace, props: props, railsContext: railsContext });\n // Processes the result from createReactOutput:\n // 1. Converts React elements to HTML strings\n // 2. Returns rendered HTML from serverRenderHash\n // 3. Handles promises for async rendering\n renderState = processRenderingResult(reactRenderingResult, { componentName: componentName, domNodeId: domNodeId, trace: trace, renderingReturnsPromises: renderingReturnsPromises });\n }\n catch (e) {\n renderState = handleRenderingError(e, { componentName: componentName, throwJsErrors: throwJsErrors });\n }\n // Finalize the rendering result and prepare it for server response\n // 1. Builds the consoleReplayScript for client-side console replay\n // 2. Extract the result from promise (if needed) by awaiting it\n // 3. Constructs a JSON object with the following properties:\n // - html: string | null (The rendered component HTML)\n // - consoleReplayScript: string (Script to replay console outputs on the client)\n // - hasErrors: boolean (Indicates if any errors occurred during rendering)\n // - renderingError: Error | null (The error object if an error occurred, null otherwise)\n // 4. For Promise results, it awaits resolution before creating the final JSON\n return createFinalResult(renderState, componentName, throwJsErrors);\n}\nvar serverRenderReactComponent = function (options) {\n try {\n return serverRenderReactComponentInternal(options);\n }\n finally {\n // Reset console history after each render.\n // See `RubyEmbeddedJavaScript.console_polyfill` for initialization.\n // This is necessary when ExecJS and old versions of node renderer are used.\n // New versions of node renderer reset the console history automatically.\n console.history = [];\n }\n};\nvar stringToStream = function (str) {\n var stream = new stream_1.PassThrough();\n stream.write(str);\n stream.end();\n return stream;\n};\nvar transformRenderStreamChunksToResultObject = function (renderState) {\n var consoleHistory = console.history;\n var previouslyReplayedConsoleMessages = 0;\n var transformStream = new stream_1.PassThrough({\n transform: function (chunk, _, callback) {\n var htmlChunk = chunk.toString();\n var consoleReplayScript = (0, buildConsoleReplay_1.default)(consoleHistory, previouslyReplayedConsoleMessages);\n previouslyReplayedConsoleMessages = (consoleHistory === null || consoleHistory === void 0 ? void 0 : consoleHistory.length) || 0;\n var jsonChunk = JSON.stringify(createResultObject(htmlChunk, consoleReplayScript, renderState));\n this.push("".concat(jsonChunk, "\\n"));\n callback();\n }\n });\n var pipedStream = null;\n var pipeToTransform = function (pipeableStream) {\n pipeableStream.pipe(transformStream);\n pipedStream = pipeableStream;\n };\n // We need to wrap the transformStream in a Readable stream to properly handle errors:\n // 1. If we returned transformStream directly, we couldn\'t emit errors into it externally\n // 2. If an error is emitted into the transformStream, it would cause the render to fail\n // 3. By wrapping in Readable.from(), we can explicitly emit errors into the readableStream without affecting the transformStream\n // Note: Readable.from can merge multiple chunks into a single chunk, so we need to ensure that we can separate them later\n var readableStream = stream_1.Readable.from(transformStream);\n var writeChunk = function (chunk) { return transformStream.write(chunk); };\n var emitError = function (error) { return readableStream.emit(\'error\', error); };\n var endStream = function () {\n transformStream.end();\n pipedStream === null || pipedStream === void 0 ? void 0 : pipedStream.abort();\n };\n return { readableStream: readableStream, pipeToTransform: pipeToTransform, writeChunk: writeChunk, emitError: emitError, endStream: endStream };\n};\nvar streamRenderReactComponent = function (reactRenderingResult, options) {\n var componentName = options.name, throwJsErrors = options.throwJsErrors;\n var renderState = {\n result: null,\n hasErrors: false,\n isShellReady: false\n };\n var _a = transformRenderStreamChunksToResultObject(renderState), readableStream = _a.readableStream, pipeToTransform = _a.pipeToTransform, writeChunk = _a.writeChunk, emitError = _a.emitError, endStream = _a.endStream;\n var renderingStream = server_1.default.renderToPipeableStream(reactRenderingResult, {\n onShellError: function (e) {\n var error = convertToError(e);\n renderState.hasErrors = true;\n renderState.error = error;\n if (throwJsErrors) {\n emitError(error);\n }\n var errorHtml = (0, handleError_1.default)({ e: error, name: componentName, serverSide: true });\n writeChunk(errorHtml);\n endStream();\n },\n onShellReady: function () {\n renderState.isShellReady = true;\n pipeToTransform(renderingStream);\n },\n onError: function (e) {\n if (!renderState.isShellReady) {\n return;\n }\n var error = convertToError(e);\n if (throwJsErrors) {\n emitError(error);\n }\n renderState.hasErrors = true;\n renderState.error = error;\n },\n });\n return readableStream;\n};\nvar streamServerRenderedReactComponent = function (options) {\n var componentName = options.name, domNodeId = options.domNodeId, trace = options.trace, props = options.props, railsContext = options.railsContext, throwJsErrors = options.throwJsErrors;\n try {\n var componentObj = ComponentRegistry_1.default.get(componentName);\n validateComponent(componentObj, componentName);\n var reactRenderingResult = (0, createReactOutput_1.default)({\n componentObj: componentObj,\n domNodeId: domNodeId,\n trace: trace,\n props: props,\n railsContext: railsContext,\n });\n if ((0, isServerRenderResult_1.isServerRenderHash)(reactRenderingResult) || (0, isServerRenderResult_1.isPromise)(reactRenderingResult)) {\n throw new Error(\'Server rendering of streams is not supported for server render hashes or promises.\');\n }\n return streamRenderReactComponent(reactRenderingResult, options);\n }\n catch (e) {\n if (throwJsErrors) {\n throw e;\n }\n var error = convertToError(e);\n var htmlResult = (0, handleError_1.default)({ e: error, name: componentName, serverSide: true });\n var jsonResult = JSON.stringify(createResultObject(htmlResult, (0, buildConsoleReplay_1.default)(), { hasErrors: true, error: error, result: null }));\n return stringToStream(jsonResult);\n }\n};\nexports.streamServerRenderedReactComponent = streamServerRenderedReactComponent;\nexports["default"] = serverRenderReactComponent;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/react-on-rails/node_package/lib/serverRenderReactComponent.js?', + ); + + /***/ + }, + + /***/ 9146: /***/ (__unused_webpack_module, exports) => { + 'use strict'; + eval( + '\nObject.defineProperty(exports, "__esModule", ({ value: true }));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/react-on-rails/node_package/lib/types/index.js?', + ); + + /***/ + }, + + /***/ 4976: /***/ (__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + 'var react_dom__WEBPACK_IMPORTED_MODULE_1___namespace_cache;\n__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ AbortedDeferredError: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_2__.AbortedDeferredError),\n/* harmony export */ Await: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.Await),\n/* harmony export */ BrowserRouter: () => (/* binding */ BrowserRouter),\n/* harmony export */ Form: () => (/* binding */ Form),\n/* harmony export */ HashRouter: () => (/* binding */ HashRouter),\n/* harmony export */ Link: () => (/* binding */ Link),\n/* harmony export */ MemoryRouter: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.MemoryRouter),\n/* harmony export */ NavLink: () => (/* binding */ NavLink),\n/* harmony export */ Navigate: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.Navigate),\n/* harmony export */ NavigationType: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_2__.Action),\n/* harmony export */ Outlet: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.Outlet),\n/* harmony export */ Route: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.Route),\n/* harmony export */ Router: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.Router),\n/* harmony export */ RouterProvider: () => (/* binding */ RouterProvider),\n/* harmony export */ Routes: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.Routes),\n/* harmony export */ ScrollRestoration: () => (/* binding */ ScrollRestoration),\n/* harmony export */ UNSAFE_DataRouterContext: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.UNSAFE_DataRouterContext),\n/* harmony export */ UNSAFE_DataRouterStateContext: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.UNSAFE_DataRouterStateContext),\n/* harmony export */ UNSAFE_ErrorResponseImpl: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_2__.UNSAFE_ErrorResponseImpl),\n/* harmony export */ UNSAFE_FetchersContext: () => (/* binding */ FetchersContext),\n/* harmony export */ UNSAFE_LocationContext: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.UNSAFE_LocationContext),\n/* harmony export */ UNSAFE_NavigationContext: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.UNSAFE_NavigationContext),\n/* harmony export */ UNSAFE_RouteContext: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.UNSAFE_RouteContext),\n/* harmony export */ UNSAFE_ViewTransitionContext: () => (/* binding */ ViewTransitionContext),\n/* harmony export */ UNSAFE_useRouteId: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.UNSAFE_useRouteId),\n/* harmony export */ UNSAFE_useScrollRestoration: () => (/* binding */ useScrollRestoration),\n/* harmony export */ createBrowserRouter: () => (/* binding */ createBrowserRouter),\n/* harmony export */ createHashRouter: () => (/* binding */ createHashRouter),\n/* harmony export */ createMemoryRouter: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.createMemoryRouter),\n/* harmony export */ createPath: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_2__.createPath),\n/* harmony export */ createRoutesFromChildren: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.createRoutesFromChildren),\n/* harmony export */ createRoutesFromElements: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.createRoutesFromElements),\n/* harmony export */ createSearchParams: () => (/* binding */ createSearchParams),\n/* harmony export */ defer: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_2__.defer),\n/* harmony export */ generatePath: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_2__.generatePath),\n/* harmony export */ isRouteErrorResponse: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_2__.isRouteErrorResponse),\n/* harmony export */ json: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_2__.json),\n/* harmony export */ matchPath: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_2__.matchPath),\n/* harmony export */ matchRoutes: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_2__.matchRoutes),\n/* harmony export */ parsePath: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_2__.parsePath),\n/* harmony export */ redirect: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_2__.redirect),\n/* harmony export */ redirectDocument: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_2__.redirectDocument),\n/* harmony export */ renderMatches: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.renderMatches),\n/* harmony export */ resolvePath: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_2__.resolvePath),\n/* harmony export */ unstable_HistoryRouter: () => (/* binding */ HistoryRouter),\n/* harmony export */ unstable_usePrompt: () => (/* binding */ usePrompt),\n/* harmony export */ unstable_useViewTransitionState: () => (/* binding */ useViewTransitionState),\n/* harmony export */ useActionData: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.useActionData),\n/* harmony export */ useAsyncError: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.useAsyncError),\n/* harmony export */ useAsyncValue: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.useAsyncValue),\n/* harmony export */ useBeforeUnload: () => (/* binding */ useBeforeUnload),\n/* harmony export */ useBlocker: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.useBlocker),\n/* harmony export */ useFetcher: () => (/* binding */ useFetcher),\n/* harmony export */ useFetchers: () => (/* binding */ useFetchers),\n/* harmony export */ useFormAction: () => (/* binding */ useFormAction),\n/* harmony export */ useHref: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.useHref),\n/* harmony export */ useInRouterContext: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.useInRouterContext),\n/* harmony export */ useLinkClickHandler: () => (/* binding */ useLinkClickHandler),\n/* harmony export */ useLoaderData: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.useLoaderData),\n/* harmony export */ useLocation: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.useLocation),\n/* harmony export */ useMatch: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.useMatch),\n/* harmony export */ useMatches: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.useMatches),\n/* harmony export */ useNavigate: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.useNavigate),\n/* harmony export */ useNavigation: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.useNavigation),\n/* harmony export */ useNavigationType: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.useNavigationType),\n/* harmony export */ useOutlet: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.useOutlet),\n/* harmony export */ useOutletContext: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.useOutletContext),\n/* harmony export */ useParams: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.useParams),\n/* harmony export */ useResolvedPath: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.useResolvedPath),\n/* harmony export */ useRevalidator: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.useRevalidator),\n/* harmony export */ useRouteError: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.useRouteError),\n/* harmony export */ useRouteLoaderData: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.useRouteLoaderData),\n/* harmony export */ useRoutes: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_3__.useRoutes),\n/* harmony export */ useSearchParams: () => (/* binding */ useSearchParams),\n/* harmony export */ useSubmit: () => (/* binding */ useSubmit)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6540);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(961);\n/* harmony import */ var react_router__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(7767);\n/* harmony import */ var react_router__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5588);\n/**\n * React Router DOM v6.24.1\n *\n * Copyright (c) Remix Software Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE.md file in the root directory of this source tree.\n *\n * @license MIT\n */\n\n\n\n\n\n\n\nfunction _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n return target;\n}\n\nconst defaultMethod = "get";\nconst defaultEncType = "application/x-www-form-urlencoded";\nfunction isHtmlElement(object) {\n return object != null && typeof object.tagName === "string";\n}\nfunction isButtonElement(object) {\n return isHtmlElement(object) && object.tagName.toLowerCase() === "button";\n}\nfunction isFormElement(object) {\n return isHtmlElement(object) && object.tagName.toLowerCase() === "form";\n}\nfunction isInputElement(object) {\n return isHtmlElement(object) && object.tagName.toLowerCase() === "input";\n}\nfunction isModifiedEvent(event) {\n return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);\n}\nfunction shouldProcessLinkClick(event, target) {\n return event.button === 0 && (\n // Ignore everything but left clicks\n !target || target === "_self") &&\n // Let browser handle "target=_blank" etc.\n !isModifiedEvent(event) // Ignore clicks with modifier keys\n ;\n}\n/**\n * Creates a URLSearchParams object using the given initializer.\n *\n * This is identical to `new URLSearchParams(init)` except it also\n * supports arrays as values in the object form of the initializer\n * instead of just strings. This is convenient when you need multiple\n * values for a given key, but don\'t want to use an array initializer.\n *\n * For example, instead of:\n *\n * let searchParams = new URLSearchParams([\n * [\'sort\', \'name\'],\n * [\'sort\', \'price\']\n * ]);\n *\n * you can do:\n *\n * let searchParams = createSearchParams({\n * sort: [\'name\', \'price\']\n * });\n */\nfunction createSearchParams(init) {\n if (init === void 0) {\n init = "";\n }\n return new URLSearchParams(typeof init === "string" || Array.isArray(init) || init instanceof URLSearchParams ? init : Object.keys(init).reduce((memo, key) => {\n let value = init[key];\n return memo.concat(Array.isArray(value) ? value.map(v => [key, v]) : [[key, value]]);\n }, []));\n}\nfunction getSearchParamsForLocation(locationSearch, defaultSearchParams) {\n let searchParams = createSearchParams(locationSearch);\n if (defaultSearchParams) {\n // Use `defaultSearchParams.forEach(...)` here instead of iterating of\n // `defaultSearchParams.keys()` to work-around a bug in Firefox related to\n // web extensions. Relevant Bugzilla tickets:\n // https://bugzilla.mozilla.org/show_bug.cgi?id=1414602\n // https://bugzilla.mozilla.org/show_bug.cgi?id=1023984\n defaultSearchParams.forEach((_, key) => {\n if (!searchParams.has(key)) {\n defaultSearchParams.getAll(key).forEach(value => {\n searchParams.append(key, value);\n });\n }\n });\n }\n return searchParams;\n}\n// One-time check for submitter support\nlet _formDataSupportsSubmitter = null;\nfunction isFormDataSubmitterSupported() {\n if (_formDataSupportsSubmitter === null) {\n try {\n new FormData(document.createElement("form"),\n // @ts-expect-error if FormData supports the submitter parameter, this will throw\n 0);\n _formDataSupportsSubmitter = false;\n } catch (e) {\n _formDataSupportsSubmitter = true;\n }\n }\n return _formDataSupportsSubmitter;\n}\nconst supportedFormEncTypes = new Set(["application/x-www-form-urlencoded", "multipart/form-data", "text/plain"]);\nfunction getFormEncType(encType) {\n if (encType != null && !supportedFormEncTypes.has(encType)) {\n true ? (0,react_router__WEBPACK_IMPORTED_MODULE_2__.UNSAFE_warning)(false, "\\"" + encType + "\\" is not a valid `encType` for `<Form>`/`<fetcher.Form>` " + ("and will default to \\"" + defaultEncType + "\\"")) : 0;\n return null;\n }\n return encType;\n}\nfunction getFormSubmissionInfo(target, basename) {\n let method;\n let action;\n let encType;\n let formData;\n let body;\n if (isFormElement(target)) {\n // When grabbing the action from the element, it will have had the basename\n // prefixed to ensure non-JS scenarios work, so strip it since we\'ll\n // re-prefix in the router\n let attr = target.getAttribute("action");\n action = attr ? (0,react_router__WEBPACK_IMPORTED_MODULE_2__.stripBasename)(attr, basename) : null;\n method = target.getAttribute("method") || defaultMethod;\n encType = getFormEncType(target.getAttribute("enctype")) || defaultEncType;\n formData = new FormData(target);\n } else if (isButtonElement(target) || isInputElement(target) && (target.type === "submit" || target.type === "image")) {\n let form = target.form;\n if (form == null) {\n throw new Error("Cannot submit a <button> or <input type=\\"submit\\"> without a <form>");\n }\n // <button>/<input type="submit"> may override attributes of <form>\n // When grabbing the action from the element, it will have had the basename\n // prefixed to ensure non-JS scenarios work, so strip it since we\'ll\n // re-prefix in the router\n let attr = target.getAttribute("formaction") || form.getAttribute("action");\n action = attr ? (0,react_router__WEBPACK_IMPORTED_MODULE_2__.stripBasename)(attr, basename) : null;\n method = target.getAttribute("formmethod") || form.getAttribute("method") || defaultMethod;\n encType = getFormEncType(target.getAttribute("formenctype")) || getFormEncType(form.getAttribute("enctype")) || defaultEncType;\n // Build a FormData object populated from a form and submitter\n formData = new FormData(form, target);\n // If this browser doesn\'t support the `FormData(el, submitter)` format,\n // then tack on the submitter value at the end. This is a lightweight\n // solution that is not 100% spec compliant. For complete support in older\n // browsers, consider using the `formdata-submitter-polyfill` package\n if (!isFormDataSubmitterSupported()) {\n let {\n name,\n type,\n value\n } = target;\n if (type === "image") {\n let prefix = name ? name + "." : "";\n formData.append(prefix + "x", "0");\n formData.append(prefix + "y", "0");\n } else if (name) {\n formData.append(name, value);\n }\n }\n } else if (isHtmlElement(target)) {\n throw new Error("Cannot submit element that is not <form>, <button>, or " + "<input type=\\"submit|image\\">");\n } else {\n method = defaultMethod;\n action = null;\n encType = defaultEncType;\n body = target;\n }\n // Send body for <Form encType="text/plain" so we encode it into text\n if (formData && encType === "text/plain") {\n body = formData;\n formData = undefined;\n }\n return {\n action,\n method: method.toLowerCase(),\n encType,\n formData,\n body\n };\n}\n\nconst _excluded = ["onClick", "relative", "reloadDocument", "replace", "state", "target", "to", "preventScrollReset", "unstable_viewTransition"],\n _excluded2 = ["aria-current", "caseSensitive", "className", "end", "style", "to", "unstable_viewTransition", "children"],\n _excluded3 = ["fetcherKey", "navigate", "reloadDocument", "replace", "state", "method", "action", "onSubmit", "relative", "preventScrollReset", "unstable_viewTransition"];\n// HEY YOU! DON\'T TOUCH THIS VARIABLE!\n//\n// It is replaced with the proper version at build time via a babel plugin in\n// the rollup config.\n//\n// Export a global property onto the window for React Router detection by the\n// Core Web Vitals Technology Report. This way they can configure the `wappalyzer`\n// to detect and properly classify live websites as being built with React Router:\n// https://github.com/HTTPArchive/wappalyzer/blob/main/src/technologies/r.json\nconst REACT_ROUTER_VERSION = "6";\ntry {\n window.__reactRouterVersion = REACT_ROUTER_VERSION;\n} catch (e) {\n // no-op\n}\nfunction createBrowserRouter(routes, opts) {\n return (0,react_router__WEBPACK_IMPORTED_MODULE_2__.createRouter)({\n basename: opts == null ? void 0 : opts.basename,\n future: _extends({}, opts == null ? void 0 : opts.future, {\n v7_prependBasename: true\n }),\n history: (0,react_router__WEBPACK_IMPORTED_MODULE_2__.createBrowserHistory)({\n window: opts == null ? void 0 : opts.window\n }),\n hydrationData: (opts == null ? void 0 : opts.hydrationData) || parseHydrationData(),\n routes,\n mapRouteProperties: react_router__WEBPACK_IMPORTED_MODULE_3__.UNSAFE_mapRouteProperties,\n unstable_dataStrategy: opts == null ? void 0 : opts.unstable_dataStrategy,\n unstable_patchRoutesOnMiss: opts == null ? void 0 : opts.unstable_patchRoutesOnMiss,\n window: opts == null ? void 0 : opts.window\n }).initialize();\n}\nfunction createHashRouter(routes, opts) {\n return (0,react_router__WEBPACK_IMPORTED_MODULE_2__.createRouter)({\n basename: opts == null ? void 0 : opts.basename,\n future: _extends({}, opts == null ? void 0 : opts.future, {\n v7_prependBasename: true\n }),\n history: (0,react_router__WEBPACK_IMPORTED_MODULE_2__.createHashHistory)({\n window: opts == null ? void 0 : opts.window\n }),\n hydrationData: (opts == null ? void 0 : opts.hydrationData) || parseHydrationData(),\n routes,\n mapRouteProperties: react_router__WEBPACK_IMPORTED_MODULE_3__.UNSAFE_mapRouteProperties,\n unstable_dataStrategy: opts == null ? void 0 : opts.unstable_dataStrategy,\n unstable_patchRoutesOnMiss: opts == null ? void 0 : opts.unstable_patchRoutesOnMiss,\n window: opts == null ? void 0 : opts.window\n }).initialize();\n}\nfunction parseHydrationData() {\n var _window;\n let state = (_window = window) == null ? void 0 : _window.__staticRouterHydrationData;\n if (state && state.errors) {\n state = _extends({}, state, {\n errors: deserializeErrors(state.errors)\n });\n }\n return state;\n}\nfunction deserializeErrors(errors) {\n if (!errors) return null;\n let entries = Object.entries(errors);\n let serialized = {};\n for (let [key, val] of entries) {\n // Hey you! If you change this, please change the corresponding logic in\n // serializeErrors in react-router-dom/server.tsx :)\n if (val && val.__type === "RouteErrorResponse") {\n serialized[key] = new react_router__WEBPACK_IMPORTED_MODULE_2__.UNSAFE_ErrorResponseImpl(val.status, val.statusText, val.data, val.internal === true);\n } else if (val && val.__type === "Error") {\n // Attempt to reconstruct the right type of Error (i.e., ReferenceError)\n if (val.__subType) {\n let ErrorConstructor = window[val.__subType];\n if (typeof ErrorConstructor === "function") {\n try {\n // @ts-expect-error\n let error = new ErrorConstructor(val.message);\n // Wipe away the client-side stack trace. Nothing to fill it in with\n // because we don\'t serialize SSR stack traces for security reasons\n error.stack = "";\n serialized[key] = error;\n } catch (e) {\n // no-op - fall through and create a normal Error\n }\n }\n }\n if (serialized[key] == null) {\n let error = new Error(val.message);\n // Wipe away the client-side stack trace. Nothing to fill it in with\n // because we don\'t serialize SSR stack traces for security reasons\n error.stack = "";\n serialized[key] = error;\n }\n } else {\n serialized[key] = val;\n }\n }\n return serialized;\n}\nconst ViewTransitionContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createContext({\n isTransitioning: false\n});\nif (true) {\n ViewTransitionContext.displayName = "ViewTransition";\n}\nconst FetchersContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createContext(new Map());\nif (true) {\n FetchersContext.displayName = "Fetchers";\n}\n//#endregion\n////////////////////////////////////////////////////////////////////////////////\n//#region Components\n////////////////////////////////////////////////////////////////////////////////\n/**\n Webpack + React 17 fails to compile on any of the following because webpack\n complains that `startTransition` doesn\'t exist in `React`:\n * import { startTransition } from "react"\n * import * as React from from "react";\n "startTransition" in React ? React.startTransition(() => setState()) : setState()\n * import * as React from from "react";\n "startTransition" in React ? React["startTransition"](() => setState()) : setState()\n\n Moving it to a constant such as the following solves the Webpack/React 17 issue:\n * import * as React from from "react";\n const START_TRANSITION = "startTransition";\n START_TRANSITION in React ? React[START_TRANSITION](() => setState()) : setState()\n\n However, that introduces webpack/terser minification issues in production builds\n in React 18 where minification/obfuscation ends up removing the call of\n React.startTransition entirely from the first half of the ternary. Grabbing\n this exported reference once up front resolves that issue.\n\n See https://github.com/remix-run/react-router/issues/10579\n*/\nconst START_TRANSITION = "startTransition";\nconst startTransitionImpl = react__WEBPACK_IMPORTED_MODULE_0__[START_TRANSITION];\nconst FLUSH_SYNC = "flushSync";\nconst flushSyncImpl = /*#__PURE__*/ (react_dom__WEBPACK_IMPORTED_MODULE_1___namespace_cache || (react_dom__WEBPACK_IMPORTED_MODULE_1___namespace_cache = __webpack_require__.t(react_dom__WEBPACK_IMPORTED_MODULE_1__, 2)))[FLUSH_SYNC];\nconst USE_ID = "useId";\nconst useIdImpl = react__WEBPACK_IMPORTED_MODULE_0__[USE_ID];\nfunction startTransitionSafe(cb) {\n if (startTransitionImpl) {\n startTransitionImpl(cb);\n } else {\n cb();\n }\n}\nfunction flushSyncSafe(cb) {\n if (flushSyncImpl) {\n flushSyncImpl(cb);\n } else {\n cb();\n }\n}\nclass Deferred {\n constructor() {\n this.status = "pending";\n this.promise = new Promise((resolve, reject) => {\n this.resolve = value => {\n if (this.status === "pending") {\n this.status = "resolved";\n resolve(value);\n }\n };\n this.reject = reason => {\n if (this.status === "pending") {\n this.status = "rejected";\n reject(reason);\n }\n };\n });\n }\n}\n/**\n * Given a Remix Router instance, render the appropriate UI\n */\nfunction RouterProvider(_ref) {\n let {\n fallbackElement,\n router,\n future\n } = _ref;\n let [state, setStateImpl] = react__WEBPACK_IMPORTED_MODULE_0__.useState(router.state);\n let [pendingState, setPendingState] = react__WEBPACK_IMPORTED_MODULE_0__.useState();\n let [vtContext, setVtContext] = react__WEBPACK_IMPORTED_MODULE_0__.useState({\n isTransitioning: false\n });\n let [renderDfd, setRenderDfd] = react__WEBPACK_IMPORTED_MODULE_0__.useState();\n let [transition, setTransition] = react__WEBPACK_IMPORTED_MODULE_0__.useState();\n let [interruption, setInterruption] = react__WEBPACK_IMPORTED_MODULE_0__.useState();\n let fetcherData = react__WEBPACK_IMPORTED_MODULE_0__.useRef(new Map());\n let {\n v7_startTransition\n } = future || {};\n let optInStartTransition = react__WEBPACK_IMPORTED_MODULE_0__.useCallback(cb => {\n if (v7_startTransition) {\n startTransitionSafe(cb);\n } else {\n cb();\n }\n }, [v7_startTransition]);\n let setState = react__WEBPACK_IMPORTED_MODULE_0__.useCallback((newState, _ref2) => {\n let {\n deletedFetchers,\n unstable_flushSync: flushSync,\n unstable_viewTransitionOpts: viewTransitionOpts\n } = _ref2;\n deletedFetchers.forEach(key => fetcherData.current.delete(key));\n newState.fetchers.forEach((fetcher, key) => {\n if (fetcher.data !== undefined) {\n fetcherData.current.set(key, fetcher.data);\n }\n });\n let isViewTransitionUnavailable = router.window == null || router.window.document == null || typeof router.window.document.startViewTransition !== "function";\n // If this isn\'t a view transition or it\'s not available in this browser,\n // just update and be done with it\n if (!viewTransitionOpts || isViewTransitionUnavailable) {\n if (flushSync) {\n flushSyncSafe(() => setStateImpl(newState));\n } else {\n optInStartTransition(() => setStateImpl(newState));\n }\n return;\n }\n // flushSync + startViewTransition\n if (flushSync) {\n // Flush through the context to mark DOM elements as transition=ing\n flushSyncSafe(() => {\n // Cancel any pending transitions\n if (transition) {\n renderDfd && renderDfd.resolve();\n transition.skipTransition();\n }\n setVtContext({\n isTransitioning: true,\n flushSync: true,\n currentLocation: viewTransitionOpts.currentLocation,\n nextLocation: viewTransitionOpts.nextLocation\n });\n });\n // Update the DOM\n let t = router.window.document.startViewTransition(() => {\n flushSyncSafe(() => setStateImpl(newState));\n });\n // Clean up after the animation completes\n t.finished.finally(() => {\n flushSyncSafe(() => {\n setRenderDfd(undefined);\n setTransition(undefined);\n setPendingState(undefined);\n setVtContext({\n isTransitioning: false\n });\n });\n });\n flushSyncSafe(() => setTransition(t));\n return;\n }\n // startTransition + startViewTransition\n if (transition) {\n // Interrupting an in-progress transition, cancel and let everything flush\n // out, and then kick off a new transition from the interruption state\n renderDfd && renderDfd.resolve();\n transition.skipTransition();\n setInterruption({\n state: newState,\n currentLocation: viewTransitionOpts.currentLocation,\n nextLocation: viewTransitionOpts.nextLocation\n });\n } else {\n // Completed navigation update with opted-in view transitions, let \'er rip\n setPendingState(newState);\n setVtContext({\n isTransitioning: true,\n flushSync: false,\n currentLocation: viewTransitionOpts.currentLocation,\n nextLocation: viewTransitionOpts.nextLocation\n });\n }\n }, [router.window, transition, renderDfd, fetcherData, optInStartTransition]);\n // Need to use a layout effect here so we are subscribed early enough to\n // pick up on any render-driven redirects/navigations (useEffect/<Navigate>)\n react__WEBPACK_IMPORTED_MODULE_0__.useLayoutEffect(() => router.subscribe(setState), [router, setState]);\n // When we start a view transition, create a Deferred we can use for the\n // eventual "completed" render\n react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => {\n if (vtContext.isTransitioning && !vtContext.flushSync) {\n setRenderDfd(new Deferred());\n }\n }, [vtContext]);\n // Once the deferred is created, kick off startViewTransition() to update the\n // DOM and then wait on the Deferred to resolve (indicating the DOM update has\n // happened)\n react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => {\n if (renderDfd && pendingState && router.window) {\n let newState = pendingState;\n let renderPromise = renderDfd.promise;\n let transition = router.window.document.startViewTransition(async () => {\n optInStartTransition(() => setStateImpl(newState));\n await renderPromise;\n });\n transition.finished.finally(() => {\n setRenderDfd(undefined);\n setTransition(undefined);\n setPendingState(undefined);\n setVtContext({\n isTransitioning: false\n });\n });\n setTransition(transition);\n }\n }, [optInStartTransition, pendingState, renderDfd, router.window]);\n // When the new location finally renders and is committed to the DOM, this\n // effect will run to resolve the transition\n react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => {\n if (renderDfd && pendingState && state.location.key === pendingState.location.key) {\n renderDfd.resolve();\n }\n }, [renderDfd, transition, state.location, pendingState]);\n // If we get interrupted with a new navigation during a transition, we skip\n // the active transition, let it cleanup, then kick it off again here\n react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => {\n if (!vtContext.isTransitioning && interruption) {\n setPendingState(interruption.state);\n setVtContext({\n isTransitioning: true,\n flushSync: false,\n currentLocation: interruption.currentLocation,\n nextLocation: interruption.nextLocation\n });\n setInterruption(undefined);\n }\n }, [vtContext.isTransitioning, interruption]);\n react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => {\n true ? (0,react_router__WEBPACK_IMPORTED_MODULE_2__.UNSAFE_warning)(fallbackElement == null || !router.future.v7_partialHydration, "`<RouterProvider fallbackElement>` is deprecated when using " + "`v7_partialHydration`, use a `HydrateFallback` component instead") : 0;\n // Only log this once on initial mount\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n let navigator = react__WEBPACK_IMPORTED_MODULE_0__.useMemo(() => {\n return {\n createHref: router.createHref,\n encodeLocation: router.encodeLocation,\n go: n => router.navigate(n),\n push: (to, state, opts) => router.navigate(to, {\n state,\n preventScrollReset: opts == null ? void 0 : opts.preventScrollReset\n }),\n replace: (to, state, opts) => router.navigate(to, {\n replace: true,\n state,\n preventScrollReset: opts == null ? void 0 : opts.preventScrollReset\n })\n };\n }, [router]);\n let basename = router.basename || "/";\n let dataRouterContext = react__WEBPACK_IMPORTED_MODULE_0__.useMemo(() => ({\n router,\n navigator,\n static: false,\n basename\n }), [router, navigator, basename]);\n // The fragment and {null} here are important! We need them to keep React 18\'s\n // useId happy when we are server-rendering since we may have a <script> here\n // containing the hydrated server-side staticContext (from StaticRouterProvider).\n // useId relies on the component tree structure to generate deterministic id\'s\n // so we need to ensure it remains the same on the client even though\n // we don\'t need the <script> tag\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(react_router__WEBPACK_IMPORTED_MODULE_3__.UNSAFE_DataRouterContext.Provider, {\n value: dataRouterContext\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(react_router__WEBPACK_IMPORTED_MODULE_3__.UNSAFE_DataRouterStateContext.Provider, {\n value: state\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(FetchersContext.Provider, {\n value: fetcherData.current\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(ViewTransitionContext.Provider, {\n value: vtContext\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(react_router__WEBPACK_IMPORTED_MODULE_3__.Router, {\n basename: basename,\n location: state.location,\n navigationType: state.historyAction,\n navigator: navigator,\n future: {\n v7_relativeSplatPath: router.future.v7_relativeSplatPath\n }\n }, state.initialized || router.future.v7_partialHydration ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(DataRoutes, {\n routes: router.routes,\n future: router.future,\n state: state\n }) : fallbackElement))))), null);\n}\nfunction DataRoutes(_ref3) {\n let {\n routes,\n future,\n state\n } = _ref3;\n return (0,react_router__WEBPACK_IMPORTED_MODULE_3__.UNSAFE_useRoutesImpl)(routes, undefined, state, future);\n}\n/**\n * A `<Router>` for use in web browsers. Provides the cleanest URLs.\n */\nfunction BrowserRouter(_ref4) {\n let {\n basename,\n children,\n future,\n window\n } = _ref4;\n let historyRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef();\n if (historyRef.current == null) {\n historyRef.current = (0,react_router__WEBPACK_IMPORTED_MODULE_2__.createBrowserHistory)({\n window,\n v5Compat: true\n });\n }\n let history = historyRef.current;\n let [state, setStateImpl] = react__WEBPACK_IMPORTED_MODULE_0__.useState({\n action: history.action,\n location: history.location\n });\n let {\n v7_startTransition\n } = future || {};\n let setState = react__WEBPACK_IMPORTED_MODULE_0__.useCallback(newState => {\n v7_startTransition && startTransitionImpl ? startTransitionImpl(() => setStateImpl(newState)) : setStateImpl(newState);\n }, [setStateImpl, v7_startTransition]);\n react__WEBPACK_IMPORTED_MODULE_0__.useLayoutEffect(() => history.listen(setState), [history, setState]);\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(react_router__WEBPACK_IMPORTED_MODULE_3__.Router, {\n basename: basename,\n children: children,\n location: state.location,\n navigationType: state.action,\n navigator: history,\n future: future\n });\n}\n/**\n * A `<Router>` for use in web browsers. Stores the location in the hash\n * portion of the URL so it is not sent to the server.\n */\nfunction HashRouter(_ref5) {\n let {\n basename,\n children,\n future,\n window\n } = _ref5;\n let historyRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef();\n if (historyRef.current == null) {\n historyRef.current = (0,react_router__WEBPACK_IMPORTED_MODULE_2__.createHashHistory)({\n window,\n v5Compat: true\n });\n }\n let history = historyRef.current;\n let [state, setStateImpl] = react__WEBPACK_IMPORTED_MODULE_0__.useState({\n action: history.action,\n location: history.location\n });\n let {\n v7_startTransition\n } = future || {};\n let setState = react__WEBPACK_IMPORTED_MODULE_0__.useCallback(newState => {\n v7_startTransition && startTransitionImpl ? startTransitionImpl(() => setStateImpl(newState)) : setStateImpl(newState);\n }, [setStateImpl, v7_startTransition]);\n react__WEBPACK_IMPORTED_MODULE_0__.useLayoutEffect(() => history.listen(setState), [history, setState]);\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(react_router__WEBPACK_IMPORTED_MODULE_3__.Router, {\n basename: basename,\n children: children,\n location: state.location,\n navigationType: state.action,\n navigator: history,\n future: future\n });\n}\n/**\n * A `<Router>` that accepts a pre-instantiated history object. It\'s important\n * to note that using your own history object is highly discouraged and may add\n * two versions of the history library to your bundles unless you use the same\n * version of the history library that React Router uses internally.\n */\nfunction HistoryRouter(_ref6) {\n let {\n basename,\n children,\n future,\n history\n } = _ref6;\n let [state, setStateImpl] = react__WEBPACK_IMPORTED_MODULE_0__.useState({\n action: history.action,\n location: history.location\n });\n let {\n v7_startTransition\n } = future || {};\n let setState = react__WEBPACK_IMPORTED_MODULE_0__.useCallback(newState => {\n v7_startTransition && startTransitionImpl ? startTransitionImpl(() => setStateImpl(newState)) : setStateImpl(newState);\n }, [setStateImpl, v7_startTransition]);\n react__WEBPACK_IMPORTED_MODULE_0__.useLayoutEffect(() => history.listen(setState), [history, setState]);\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(react_router__WEBPACK_IMPORTED_MODULE_3__.Router, {\n basename: basename,\n children: children,\n location: state.location,\n navigationType: state.action,\n navigator: history,\n future: future\n });\n}\nif (true) {\n HistoryRouter.displayName = "unstable_HistoryRouter";\n}\nconst isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined";\nconst ABSOLUTE_URL_REGEX = /^(?:[a-z][a-z0-9+.-]*:|\\/\\/)/i;\n/**\n * The public API for rendering a history-aware `<a>`.\n */\nconst Link = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(function LinkWithRef(_ref7, ref) {\n let {\n onClick,\n relative,\n reloadDocument,\n replace,\n state,\n target,\n to,\n preventScrollReset,\n unstable_viewTransition\n } = _ref7,\n rest = _objectWithoutPropertiesLoose(_ref7, _excluded);\n let {\n basename\n } = react__WEBPACK_IMPORTED_MODULE_0__.useContext(react_router__WEBPACK_IMPORTED_MODULE_3__.UNSAFE_NavigationContext);\n // Rendered into <a href> for absolute URLs\n let absoluteHref;\n let isExternal = false;\n if (typeof to === "string" && ABSOLUTE_URL_REGEX.test(to)) {\n // Render the absolute href server- and client-side\n absoluteHref = to;\n // Only check for external origins client-side\n if (isBrowser) {\n try {\n let currentUrl = new URL(window.location.href);\n let targetUrl = to.startsWith("//") ? new URL(currentUrl.protocol + to) : new URL(to);\n let path = (0,react_router__WEBPACK_IMPORTED_MODULE_2__.stripBasename)(targetUrl.pathname, basename);\n if (targetUrl.origin === currentUrl.origin && path != null) {\n // Strip the protocol/origin/basename for same-origin absolute URLs\n to = path + targetUrl.search + targetUrl.hash;\n } else {\n isExternal = true;\n }\n } catch (e) {\n // We can\'t do external URL detection without a valid URL\n true ? (0,react_router__WEBPACK_IMPORTED_MODULE_2__.UNSAFE_warning)(false, "<Link to=\\"" + to + "\\"> contains an invalid URL which will probably break " + "when clicked - please update to a valid URL path.") : 0;\n }\n }\n }\n // Rendered into <a href> for relative URLs\n let href = (0,react_router__WEBPACK_IMPORTED_MODULE_3__.useHref)(to, {\n relative\n });\n let internalOnClick = useLinkClickHandler(to, {\n replace,\n state,\n target,\n preventScrollReset,\n relative,\n unstable_viewTransition\n });\n function handleClick(event) {\n if (onClick) onClick(event);\n if (!event.defaultPrevented) {\n internalOnClick(event);\n }\n }\n return (\n /*#__PURE__*/\n // eslint-disable-next-line jsx-a11y/anchor-has-content\n react__WEBPACK_IMPORTED_MODULE_0__.createElement("a", _extends({}, rest, {\n href: absoluteHref || href,\n onClick: isExternal || reloadDocument ? onClick : handleClick,\n ref: ref,\n target: target\n }))\n );\n});\nif (true) {\n Link.displayName = "Link";\n}\n/**\n * A `<Link>` wrapper that knows if it\'s "active" or not.\n */\nconst NavLink = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(function NavLinkWithRef(_ref8, ref) {\n let {\n "aria-current": ariaCurrentProp = "page",\n caseSensitive = false,\n className: classNameProp = "",\n end = false,\n style: styleProp,\n to,\n unstable_viewTransition,\n children\n } = _ref8,\n rest = _objectWithoutPropertiesLoose(_ref8, _excluded2);\n let path = (0,react_router__WEBPACK_IMPORTED_MODULE_3__.useResolvedPath)(to, {\n relative: rest.relative\n });\n let location = (0,react_router__WEBPACK_IMPORTED_MODULE_3__.useLocation)();\n let routerState = react__WEBPACK_IMPORTED_MODULE_0__.useContext(react_router__WEBPACK_IMPORTED_MODULE_3__.UNSAFE_DataRouterStateContext);\n let {\n navigator,\n basename\n } = react__WEBPACK_IMPORTED_MODULE_0__.useContext(react_router__WEBPACK_IMPORTED_MODULE_3__.UNSAFE_NavigationContext);\n let isTransitioning = routerState != null &&\n // Conditional usage is OK here because the usage of a data router is static\n // eslint-disable-next-line react-hooks/rules-of-hooks\n useViewTransitionState(path) && unstable_viewTransition === true;\n let toPathname = navigator.encodeLocation ? navigator.encodeLocation(path).pathname : path.pathname;\n let locationPathname = location.pathname;\n let nextLocationPathname = routerState && routerState.navigation && routerState.navigation.location ? routerState.navigation.location.pathname : null;\n if (!caseSensitive) {\n locationPathname = locationPathname.toLowerCase();\n nextLocationPathname = nextLocationPathname ? nextLocationPathname.toLowerCase() : null;\n toPathname = toPathname.toLowerCase();\n }\n if (nextLocationPathname && basename) {\n nextLocationPathname = (0,react_router__WEBPACK_IMPORTED_MODULE_2__.stripBasename)(nextLocationPathname, basename) || nextLocationPathname;\n }\n // If the `to` has a trailing slash, look at that exact spot. Otherwise,\n // we\'re looking for a slash _after_ what\'s in `to`. For example:\n //\n // <NavLink to="/users"> and <NavLink to="/users/">\n // both want to look for a / at index 6 to match URL `/users/matt`\n const endSlashPosition = toPathname !== "/" && toPathname.endsWith("/") ? toPathname.length - 1 : toPathname.length;\n let isActive = locationPathname === toPathname || !end && locationPathname.startsWith(toPathname) && locationPathname.charAt(endSlashPosition) === "/";\n let isPending = nextLocationPathname != null && (nextLocationPathname === toPathname || !end && nextLocationPathname.startsWith(toPathname) && nextLocationPathname.charAt(toPathname.length) === "/");\n let renderProps = {\n isActive,\n isPending,\n isTransitioning\n };\n let ariaCurrent = isActive ? ariaCurrentProp : undefined;\n let className;\n if (typeof classNameProp === "function") {\n className = classNameProp(renderProps);\n } else {\n // If the className prop is not a function, we use a default `active`\n // class for <NavLink />s that are active. In v5 `active` was the default\n // value for `activeClassName`, but we are removing that API and can still\n // use the old default behavior for a cleaner upgrade path and keep the\n // simple styling rules working as they currently do.\n className = [classNameProp, isActive ? "active" : null, isPending ? "pending" : null, isTransitioning ? "transitioning" : null].filter(Boolean).join(" ");\n }\n let style = typeof styleProp === "function" ? styleProp(renderProps) : styleProp;\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(Link, _extends({}, rest, {\n "aria-current": ariaCurrent,\n className: className,\n ref: ref,\n style: style,\n to: to,\n unstable_viewTransition: unstable_viewTransition\n }), typeof children === "function" ? children(renderProps) : children);\n});\nif (true) {\n NavLink.displayName = "NavLink";\n}\n/**\n * A `@remix-run/router`-aware `<form>`. It behaves like a normal form except\n * that the interaction with the server is with `fetch` instead of new document\n * requests, allowing components to add nicer UX to the page as the form is\n * submitted and returns with data.\n */\nconst Form = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.forwardRef((_ref9, forwardedRef) => {\n let {\n fetcherKey,\n navigate,\n reloadDocument,\n replace,\n state,\n method = defaultMethod,\n action,\n onSubmit,\n relative,\n preventScrollReset,\n unstable_viewTransition\n } = _ref9,\n props = _objectWithoutPropertiesLoose(_ref9, _excluded3);\n let submit = useSubmit();\n let formAction = useFormAction(action, {\n relative\n });\n let formMethod = method.toLowerCase() === "get" ? "get" : "post";\n let submitHandler = event => {\n onSubmit && onSubmit(event);\n if (event.defaultPrevented) return;\n event.preventDefault();\n let submitter = event.nativeEvent.submitter;\n let submitMethod = (submitter == null ? void 0 : submitter.getAttribute("formmethod")) || method;\n submit(submitter || event.currentTarget, {\n fetcherKey,\n method: submitMethod,\n navigate,\n replace,\n state,\n relative,\n preventScrollReset,\n unstable_viewTransition\n });\n };\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("form", _extends({\n ref: forwardedRef,\n method: formMethod,\n action: formAction,\n onSubmit: reloadDocument ? onSubmit : submitHandler\n }, props));\n});\nif (true) {\n Form.displayName = "Form";\n}\n/**\n * This component will emulate the browser\'s scroll restoration on location\n * changes.\n */\nfunction ScrollRestoration(_ref10) {\n let {\n getKey,\n storageKey\n } = _ref10;\n useScrollRestoration({\n getKey,\n storageKey\n });\n return null;\n}\nif (true) {\n ScrollRestoration.displayName = "ScrollRestoration";\n}\n//#endregion\n////////////////////////////////////////////////////////////////////////////////\n//#region Hooks\n////////////////////////////////////////////////////////////////////////////////\nvar DataRouterHook;\n(function (DataRouterHook) {\n DataRouterHook["UseScrollRestoration"] = "useScrollRestoration";\n DataRouterHook["UseSubmit"] = "useSubmit";\n DataRouterHook["UseSubmitFetcher"] = "useSubmitFetcher";\n DataRouterHook["UseFetcher"] = "useFetcher";\n DataRouterHook["useViewTransitionState"] = "useViewTransitionState";\n})(DataRouterHook || (DataRouterHook = {}));\nvar DataRouterStateHook;\n(function (DataRouterStateHook) {\n DataRouterStateHook["UseFetcher"] = "useFetcher";\n DataRouterStateHook["UseFetchers"] = "useFetchers";\n DataRouterStateHook["UseScrollRestoration"] = "useScrollRestoration";\n})(DataRouterStateHook || (DataRouterStateHook = {}));\n// Internal hooks\nfunction getDataRouterConsoleError(hookName) {\n return hookName + " must be used within a data router. See https://reactrouter.com/routers/picking-a-router.";\n}\nfunction useDataRouterContext(hookName) {\n let ctx = react__WEBPACK_IMPORTED_MODULE_0__.useContext(react_router__WEBPACK_IMPORTED_MODULE_3__.UNSAFE_DataRouterContext);\n !ctx ? true ? (0,react_router__WEBPACK_IMPORTED_MODULE_2__.UNSAFE_invariant)(false, getDataRouterConsoleError(hookName)) : 0 : void 0;\n return ctx;\n}\nfunction useDataRouterState(hookName) {\n let state = react__WEBPACK_IMPORTED_MODULE_0__.useContext(react_router__WEBPACK_IMPORTED_MODULE_3__.UNSAFE_DataRouterStateContext);\n !state ? true ? (0,react_router__WEBPACK_IMPORTED_MODULE_2__.UNSAFE_invariant)(false, getDataRouterConsoleError(hookName)) : 0 : void 0;\n return state;\n}\n// External hooks\n/**\n * Handles the click behavior for router `<Link>` components. This is useful if\n * you need to create custom `<Link>` components with the same click behavior we\n * use in our exported `<Link>`.\n */\nfunction useLinkClickHandler(to, _temp) {\n let {\n target,\n replace: replaceProp,\n state,\n preventScrollReset,\n relative,\n unstable_viewTransition\n } = _temp === void 0 ? {} : _temp;\n let navigate = (0,react_router__WEBPACK_IMPORTED_MODULE_3__.useNavigate)();\n let location = (0,react_router__WEBPACK_IMPORTED_MODULE_3__.useLocation)();\n let path = (0,react_router__WEBPACK_IMPORTED_MODULE_3__.useResolvedPath)(to, {\n relative\n });\n return react__WEBPACK_IMPORTED_MODULE_0__.useCallback(event => {\n if (shouldProcessLinkClick(event, target)) {\n event.preventDefault();\n // If the URL hasn\'t changed, a regular <a> will do a replace instead of\n // a push, so do the same here unless the replace prop is explicitly set\n let replace = replaceProp !== undefined ? replaceProp : (0,react_router__WEBPACK_IMPORTED_MODULE_2__.createPath)(location) === (0,react_router__WEBPACK_IMPORTED_MODULE_2__.createPath)(path);\n navigate(to, {\n replace,\n state,\n preventScrollReset,\n relative,\n unstable_viewTransition\n });\n }\n }, [location, navigate, path, replaceProp, state, target, to, preventScrollReset, relative, unstable_viewTransition]);\n}\n/**\n * A convenient wrapper for reading and writing search parameters via the\n * URLSearchParams interface.\n */\nfunction useSearchParams(defaultInit) {\n true ? (0,react_router__WEBPACK_IMPORTED_MODULE_2__.UNSAFE_warning)(typeof URLSearchParams !== "undefined", "You cannot use the `useSearchParams` hook in a browser that does not " + "support the URLSearchParams API. If you need to support Internet " + "Explorer 11, we recommend you load a polyfill such as " + "https://github.com/ungap/url-search-params.") : 0;\n let defaultSearchParamsRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(createSearchParams(defaultInit));\n let hasSetSearchParamsRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(false);\n let location = (0,react_router__WEBPACK_IMPORTED_MODULE_3__.useLocation)();\n let searchParams = react__WEBPACK_IMPORTED_MODULE_0__.useMemo(() =>\n // Only merge in the defaults if we haven\'t yet called setSearchParams.\n // Once we call that we want those to take precedence, otherwise you can\'t\n // remove a param with setSearchParams({}) if it has an initial value\n getSearchParamsForLocation(location.search, hasSetSearchParamsRef.current ? null : defaultSearchParamsRef.current), [location.search]);\n let navigate = (0,react_router__WEBPACK_IMPORTED_MODULE_3__.useNavigate)();\n let setSearchParams = react__WEBPACK_IMPORTED_MODULE_0__.useCallback((nextInit, navigateOptions) => {\n const newSearchParams = createSearchParams(typeof nextInit === "function" ? nextInit(searchParams) : nextInit);\n hasSetSearchParamsRef.current = true;\n navigate("?" + newSearchParams, navigateOptions);\n }, [navigate, searchParams]);\n return [searchParams, setSearchParams];\n}\nfunction validateClientSideSubmission() {\n if (typeof document === "undefined") {\n throw new Error("You are calling submit during the server render. " + "Try calling submit within a `useEffect` or callback instead.");\n }\n}\nlet fetcherId = 0;\nlet getUniqueFetcherId = () => "__" + String(++fetcherId) + "__";\n/**\n * Returns a function that may be used to programmatically submit a form (or\n * some arbitrary data) to the server.\n */\nfunction useSubmit() {\n let {\n router\n } = useDataRouterContext(DataRouterHook.UseSubmit);\n let {\n basename\n } = react__WEBPACK_IMPORTED_MODULE_0__.useContext(react_router__WEBPACK_IMPORTED_MODULE_3__.UNSAFE_NavigationContext);\n let currentRouteId = (0,react_router__WEBPACK_IMPORTED_MODULE_3__.UNSAFE_useRouteId)();\n return react__WEBPACK_IMPORTED_MODULE_0__.useCallback(function (target, options) {\n if (options === void 0) {\n options = {};\n }\n validateClientSideSubmission();\n let {\n action,\n method,\n encType,\n formData,\n body\n } = getFormSubmissionInfo(target, basename);\n if (options.navigate === false) {\n let key = options.fetcherKey || getUniqueFetcherId();\n router.fetch(key, currentRouteId, options.action || action, {\n preventScrollReset: options.preventScrollReset,\n formData,\n body,\n formMethod: options.method || method,\n formEncType: options.encType || encType,\n unstable_flushSync: options.unstable_flushSync\n });\n } else {\n router.navigate(options.action || action, {\n preventScrollReset: options.preventScrollReset,\n formData,\n body,\n formMethod: options.method || method,\n formEncType: options.encType || encType,\n replace: options.replace,\n state: options.state,\n fromRouteId: currentRouteId,\n unstable_flushSync: options.unstable_flushSync,\n unstable_viewTransition: options.unstable_viewTransition\n });\n }\n }, [router, basename, currentRouteId]);\n}\n// v7: Eventually we should deprecate this entirely in favor of using the\n// router method directly?\nfunction useFormAction(action, _temp2) {\n let {\n relative\n } = _temp2 === void 0 ? {} : _temp2;\n let {\n basename\n } = react__WEBPACK_IMPORTED_MODULE_0__.useContext(react_router__WEBPACK_IMPORTED_MODULE_3__.UNSAFE_NavigationContext);\n let routeContext = react__WEBPACK_IMPORTED_MODULE_0__.useContext(react_router__WEBPACK_IMPORTED_MODULE_3__.UNSAFE_RouteContext);\n !routeContext ? true ? (0,react_router__WEBPACK_IMPORTED_MODULE_2__.UNSAFE_invariant)(false, "useFormAction must be used inside a RouteContext") : 0 : void 0;\n let [match] = routeContext.matches.slice(-1);\n // Shallow clone path so we can modify it below, otherwise we modify the\n // object referenced by useMemo inside useResolvedPath\n let path = _extends({}, (0,react_router__WEBPACK_IMPORTED_MODULE_3__.useResolvedPath)(action ? action : ".", {\n relative\n }));\n // If no action was specified, browsers will persist current search params\n // when determining the path, so match that behavior\n // https://github.com/remix-run/remix/issues/927\n let location = (0,react_router__WEBPACK_IMPORTED_MODULE_3__.useLocation)();\n if (action == null) {\n // Safe to write to this directly here since if action was undefined, we\n // would have called useResolvedPath(".") which will never include a search\n path.search = location.search;\n // When grabbing search params from the URL, remove any included ?index param\n // since it might not apply to our contextual route. We add it back based\n // on match.route.index below\n let params = new URLSearchParams(path.search);\n if (params.has("index") && params.get("index") === "") {\n params.delete("index");\n path.search = params.toString() ? "?" + params.toString() : "";\n }\n }\n if ((!action || action === ".") && match.route.index) {\n path.search = path.search ? path.search.replace(/^\\?/, "?index&") : "?index";\n }\n // If we\'re operating within a basename, prepend it to the pathname prior\n // to creating the form action. If this is a root navigation, then just use\n // the raw basename which allows the basename to have full control over the\n // presence of a trailing slash on root actions\n if (basename !== "/") {\n path.pathname = path.pathname === "/" ? basename : (0,react_router__WEBPACK_IMPORTED_MODULE_2__.joinPaths)([basename, path.pathname]);\n }\n return (0,react_router__WEBPACK_IMPORTED_MODULE_2__.createPath)(path);\n}\n// TODO: (v7) Change the useFetcher generic default from `any` to `unknown`\n/**\n * Interacts with route loaders and actions without causing a navigation. Great\n * for any interaction that stays on the same page.\n */\nfunction useFetcher(_temp3) {\n var _route$matches;\n let {\n key\n } = _temp3 === void 0 ? {} : _temp3;\n let {\n router\n } = useDataRouterContext(DataRouterHook.UseFetcher);\n let state = useDataRouterState(DataRouterStateHook.UseFetcher);\n let fetcherData = react__WEBPACK_IMPORTED_MODULE_0__.useContext(FetchersContext);\n let route = react__WEBPACK_IMPORTED_MODULE_0__.useContext(react_router__WEBPACK_IMPORTED_MODULE_3__.UNSAFE_RouteContext);\n let routeId = (_route$matches = route.matches[route.matches.length - 1]) == null ? void 0 : _route$matches.route.id;\n !fetcherData ? true ? (0,react_router__WEBPACK_IMPORTED_MODULE_2__.UNSAFE_invariant)(false, "useFetcher must be used inside a FetchersContext") : 0 : void 0;\n !route ? true ? (0,react_router__WEBPACK_IMPORTED_MODULE_2__.UNSAFE_invariant)(false, "useFetcher must be used inside a RouteContext") : 0 : void 0;\n !(routeId != null) ? true ? (0,react_router__WEBPACK_IMPORTED_MODULE_2__.UNSAFE_invariant)(false, "useFetcher can only be used on routes that contain a unique \\"id\\"") : 0 : void 0;\n // Fetcher key handling\n // OK to call conditionally to feature detect `useId`\n // eslint-disable-next-line react-hooks/rules-of-hooks\n let defaultKey = useIdImpl ? useIdImpl() : "";\n let [fetcherKey, setFetcherKey] = react__WEBPACK_IMPORTED_MODULE_0__.useState(key || defaultKey);\n if (key && key !== fetcherKey) {\n setFetcherKey(key);\n } else if (!fetcherKey) {\n // We will only fall through here when `useId` is not available\n setFetcherKey(getUniqueFetcherId());\n }\n // Registration/cleanup\n react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => {\n router.getFetcher(fetcherKey);\n return () => {\n // Tell the router we\'ve unmounted - if v7_fetcherPersist is enabled this\n // will not delete immediately but instead queue up a delete after the\n // fetcher returns to an `idle` state\n router.deleteFetcher(fetcherKey);\n };\n }, [router, fetcherKey]);\n // Fetcher additions\n let load = react__WEBPACK_IMPORTED_MODULE_0__.useCallback((href, opts) => {\n !routeId ? true ? (0,react_router__WEBPACK_IMPORTED_MODULE_2__.UNSAFE_invariant)(false, "No routeId available for fetcher.load()") : 0 : void 0;\n router.fetch(fetcherKey, routeId, href, opts);\n }, [fetcherKey, routeId, router]);\n let submitImpl = useSubmit();\n let submit = react__WEBPACK_IMPORTED_MODULE_0__.useCallback((target, opts) => {\n submitImpl(target, _extends({}, opts, {\n navigate: false,\n fetcherKey\n }));\n }, [fetcherKey, submitImpl]);\n let FetcherForm = react__WEBPACK_IMPORTED_MODULE_0__.useMemo(() => {\n let FetcherForm = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.forwardRef((props, ref) => {\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(Form, _extends({}, props, {\n navigate: false,\n fetcherKey: fetcherKey,\n ref: ref\n }));\n });\n if (true) {\n FetcherForm.displayName = "fetcher.Form";\n }\n return FetcherForm;\n }, [fetcherKey]);\n // Exposed FetcherWithComponents\n let fetcher = state.fetchers.get(fetcherKey) || react_router__WEBPACK_IMPORTED_MODULE_2__.IDLE_FETCHER;\n let data = fetcherData.get(fetcherKey);\n let fetcherWithComponents = react__WEBPACK_IMPORTED_MODULE_0__.useMemo(() => _extends({\n Form: FetcherForm,\n submit,\n load\n }, fetcher, {\n data\n }), [FetcherForm, submit, load, fetcher, data]);\n return fetcherWithComponents;\n}\n/**\n * Provides all fetchers currently on the page. Useful for layouts and parent\n * routes that need to provide pending/optimistic UI regarding the fetch.\n */\nfunction useFetchers() {\n let state = useDataRouterState(DataRouterStateHook.UseFetchers);\n return Array.from(state.fetchers.entries()).map(_ref11 => {\n let [key, fetcher] = _ref11;\n return _extends({}, fetcher, {\n key\n });\n });\n}\nconst SCROLL_RESTORATION_STORAGE_KEY = "react-router-scroll-positions";\nlet savedScrollPositions = {};\n/**\n * When rendered inside a RouterProvider, will restore scroll positions on navigations\n */\nfunction useScrollRestoration(_temp4) {\n let {\n getKey,\n storageKey\n } = _temp4 === void 0 ? {} : _temp4;\n let {\n router\n } = useDataRouterContext(DataRouterHook.UseScrollRestoration);\n let {\n restoreScrollPosition,\n preventScrollReset\n } = useDataRouterState(DataRouterStateHook.UseScrollRestoration);\n let {\n basename\n } = react__WEBPACK_IMPORTED_MODULE_0__.useContext(react_router__WEBPACK_IMPORTED_MODULE_3__.UNSAFE_NavigationContext);\n let location = (0,react_router__WEBPACK_IMPORTED_MODULE_3__.useLocation)();\n let matches = (0,react_router__WEBPACK_IMPORTED_MODULE_3__.useMatches)();\n let navigation = (0,react_router__WEBPACK_IMPORTED_MODULE_3__.useNavigation)();\n // Trigger manual scroll restoration while we\'re active\n react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => {\n window.history.scrollRestoration = "manual";\n return () => {\n window.history.scrollRestoration = "auto";\n };\n }, []);\n // Save positions on pagehide\n usePageHide(react__WEBPACK_IMPORTED_MODULE_0__.useCallback(() => {\n if (navigation.state === "idle") {\n let key = (getKey ? getKey(location, matches) : null) || location.key;\n savedScrollPositions[key] = window.scrollY;\n }\n try {\n sessionStorage.setItem(storageKey || SCROLL_RESTORATION_STORAGE_KEY, JSON.stringify(savedScrollPositions));\n } catch (error) {\n true ? (0,react_router__WEBPACK_IMPORTED_MODULE_2__.UNSAFE_warning)(false, "Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (" + error + ").") : 0;\n }\n window.history.scrollRestoration = "auto";\n }, [storageKey, getKey, navigation.state, location, matches]));\n // Read in any saved scroll locations\n if (typeof document !== "undefined") {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n react__WEBPACK_IMPORTED_MODULE_0__.useLayoutEffect(() => {\n try {\n let sessionPositions = sessionStorage.getItem(storageKey || SCROLL_RESTORATION_STORAGE_KEY);\n if (sessionPositions) {\n savedScrollPositions = JSON.parse(sessionPositions);\n }\n } catch (e) {\n // no-op, use default empty object\n }\n }, [storageKey]);\n // Enable scroll restoration in the router\n // eslint-disable-next-line react-hooks/rules-of-hooks\n react__WEBPACK_IMPORTED_MODULE_0__.useLayoutEffect(() => {\n let getKeyWithoutBasename = getKey && basename !== "/" ? (location, matches) => getKey( // Strip the basename to match useLocation()\n _extends({}, location, {\n pathname: (0,react_router__WEBPACK_IMPORTED_MODULE_2__.stripBasename)(location.pathname, basename) || location.pathname\n }), matches) : getKey;\n let disableScrollRestoration = router == null ? void 0 : router.enableScrollRestoration(savedScrollPositions, () => window.scrollY, getKeyWithoutBasename);\n return () => disableScrollRestoration && disableScrollRestoration();\n }, [router, basename, getKey]);\n // Restore scrolling when state.restoreScrollPosition changes\n // eslint-disable-next-line react-hooks/rules-of-hooks\n react__WEBPACK_IMPORTED_MODULE_0__.useLayoutEffect(() => {\n // Explicit false means don\'t do anything (used for submissions)\n if (restoreScrollPosition === false) {\n return;\n }\n // been here before, scroll to it\n if (typeof restoreScrollPosition === "number") {\n window.scrollTo(0, restoreScrollPosition);\n return;\n }\n // try to scroll to the hash\n if (location.hash) {\n let el = document.getElementById(decodeURIComponent(location.hash.slice(1)));\n if (el) {\n el.scrollIntoView();\n return;\n }\n }\n // Don\'t reset if this navigation opted out\n if (preventScrollReset === true) {\n return;\n }\n // otherwise go to the top on new locations\n window.scrollTo(0, 0);\n }, [location, restoreScrollPosition, preventScrollReset]);\n }\n}\n/**\n * Setup a callback to be fired on the window\'s `beforeunload` event. This is\n * useful for saving some data to `window.localStorage` just before the page\n * refreshes.\n *\n * Note: The `callback` argument should be a function created with\n * `React.useCallback()`.\n */\nfunction useBeforeUnload(callback, options) {\n let {\n capture\n } = options || {};\n react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => {\n let opts = capture != null ? {\n capture\n } : undefined;\n window.addEventListener("beforeunload", callback, opts);\n return () => {\n window.removeEventListener("beforeunload", callback, opts);\n };\n }, [callback, capture]);\n}\n/**\n * Setup a callback to be fired on the window\'s `pagehide` event. This is\n * useful for saving some data to `window.localStorage` just before the page\n * refreshes. This event is better supported than beforeunload across browsers.\n *\n * Note: The `callback` argument should be a function created with\n * `React.useCallback()`.\n */\nfunction usePageHide(callback, options) {\n let {\n capture\n } = options || {};\n react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => {\n let opts = capture != null ? {\n capture\n } : undefined;\n window.addEventListener("pagehide", callback, opts);\n return () => {\n window.removeEventListener("pagehide", callback, opts);\n };\n }, [callback, capture]);\n}\n/**\n * Wrapper around useBlocker to show a window.confirm prompt to users instead\n * of building a custom UI with useBlocker.\n *\n * Warning: This has *a lot of rough edges* and behaves very differently (and\n * very incorrectly in some cases) across browsers if user click addition\n * back/forward navigations while the confirm is open. Use at your own risk.\n */\nfunction usePrompt(_ref12) {\n let {\n when,\n message\n } = _ref12;\n let blocker = (0,react_router__WEBPACK_IMPORTED_MODULE_3__.useBlocker)(when);\n react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => {\n if (blocker.state === "blocked") {\n let proceed = window.confirm(message);\n if (proceed) {\n // This timeout is needed to avoid a weird "race" on POP navigations\n // between the `window.history` revert navigation and the result of\n // `window.confirm`\n setTimeout(blocker.proceed, 0);\n } else {\n blocker.reset();\n }\n }\n }, [blocker, message]);\n react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => {\n if (blocker.state === "blocked" && !when) {\n blocker.reset();\n }\n }, [blocker, when]);\n}\n/**\n * Return a boolean indicating if there is an active view transition to the\n * given href. You can use this value to render CSS classes or viewTransitionName\n * styles onto your elements\n *\n * @param href The destination href\n * @param [opts.relative] Relative routing type ("route" | "path")\n */\nfunction useViewTransitionState(to, opts) {\n if (opts === void 0) {\n opts = {};\n }\n let vtContext = react__WEBPACK_IMPORTED_MODULE_0__.useContext(ViewTransitionContext);\n !(vtContext != null) ? true ? (0,react_router__WEBPACK_IMPORTED_MODULE_2__.UNSAFE_invariant)(false, "`unstable_useViewTransitionState` must be used within `react-router-dom`\'s `RouterProvider`. " + "Did you accidentally import `RouterProvider` from `react-router`?") : 0 : void 0;\n let {\n basename\n } = useDataRouterContext(DataRouterHook.useViewTransitionState);\n let path = (0,react_router__WEBPACK_IMPORTED_MODULE_3__.useResolvedPath)(to, {\n relative: opts.relative\n });\n if (!vtContext.isTransitioning) {\n return false;\n }\n let currentPath = (0,react_router__WEBPACK_IMPORTED_MODULE_2__.stripBasename)(vtContext.currentLocation.pathname, basename) || vtContext.currentLocation.pathname;\n let nextPath = (0,react_router__WEBPACK_IMPORTED_MODULE_2__.stripBasename)(vtContext.nextLocation.pathname, basename) || vtContext.nextLocation.pathname;\n // Transition is active if we\'re going to or coming from the indicated\n // destination. This ensures that other PUSH navigations that reverse\n // an indicated transition apply. I.e., on the list view you have:\n //\n // <NavLink to="/details/1" unstable_viewTransition>\n //\n // If you click the breadcrumb back to the list view:\n //\n // <NavLink to="/list" unstable_viewTransition>\n //\n // We should apply the transition because it\'s indicated as active going\n // from /list -> /details/1 and therefore should be active on the reverse\n // (even though this isn\'t strictly a POP reverse)\n return (0,react_router__WEBPACK_IMPORTED_MODULE_2__.matchPath)(path.pathname, nextPath) != null || (0,react_router__WEBPACK_IMPORTED_MODULE_2__.matchPath)(path.pathname, currentPath) != null;\n}\n//#endregion\n\n\n//# sourceMappingURL=index.js.map\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/react-router-dom/dist/index.js?', + ); + + /***/ + }, + + /***/ 3984: /***/ (__unused_webpack_module, exports, __webpack_require__) => { + 'use strict'; + eval( + 'var __webpack_unused_export__;\n\n\n__webpack_unused_export__ = ({ value: true });\n\nvar React = __webpack_require__(6540);\nvar router = __webpack_require__(5588);\nvar reactRouter = __webpack_require__(7767);\nvar reactRouterDom = __webpack_require__(4976);\n\nfunction _interopNamespace(e) {\n if (e && e.__esModule) return e;\n var n = Object.create(null);\n if (e) {\n Object.keys(e).forEach(function (k) {\n if (k !== \'default\') {\n var d = Object.getOwnPropertyDescriptor(e, k);\n Object.defineProperty(n, k, d.get ? d : {\n enumerable: true,\n get: function () { return e[k]; }\n });\n }\n });\n }\n n["default"] = e;\n return Object.freeze(n);\n}\n\nvar React__namespace = /*#__PURE__*/_interopNamespace(React);\n\n/**\n * A `<Router>` that may not navigate to any other location. This is useful\n * on the server where there is no stateful UI.\n */\nfunction StaticRouter({\n basename,\n children,\n location: locationProp = "/",\n future\n}) {\n if (typeof locationProp === "string") {\n locationProp = reactRouterDom.parsePath(locationProp);\n }\n let action = router.Action.Pop;\n let location = {\n pathname: locationProp.pathname || "/",\n search: locationProp.search || "",\n hash: locationProp.hash || "",\n state: locationProp.state != null ? locationProp.state : null,\n key: locationProp.key || "default"\n };\n let staticNavigator = getStatelessNavigator();\n return /*#__PURE__*/React__namespace.createElement(reactRouterDom.Router, {\n basename: basename,\n children: children,\n location: location,\n navigationType: action,\n navigator: staticNavigator,\n future: future,\n static: true\n });\n}\n/**\n * A Data Router that may not navigate to any other location. This is useful\n * on the server where there is no stateful UI.\n */\nfunction StaticRouterProvider({\n context,\n router: router$1,\n hydrate = true,\n nonce\n}) {\n !(router$1 && context) ? true ? router.UNSAFE_invariant(false, "You must provide `router` and `context` to <StaticRouterProvider>") : 0 : void 0;\n let dataRouterContext = {\n router: router$1,\n navigator: getStatelessNavigator(),\n static: true,\n staticContext: context,\n basename: context.basename || "/"\n };\n let fetchersContext = new Map();\n let hydrateScript = "";\n if (hydrate !== false) {\n let data = {\n loaderData: context.loaderData,\n actionData: context.actionData,\n errors: serializeErrors(context.errors)\n };\n // Use JSON.parse here instead of embedding a raw JS object here to speed\n // up parsing on the client. Dual-stringify is needed to ensure all quotes\n // are properly escaped in the resulting string. See:\n // https://v8.dev/blog/cost-of-javascript-2019#json\n let json = htmlEscape(JSON.stringify(JSON.stringify(data)));\n hydrateScript = `window.__staticRouterHydrationData = JSON.parse(${json});`;\n }\n let {\n state\n } = dataRouterContext.router;\n return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement(reactRouterDom.UNSAFE_DataRouterContext.Provider, {\n value: dataRouterContext\n }, /*#__PURE__*/React__namespace.createElement(reactRouterDom.UNSAFE_DataRouterStateContext.Provider, {\n value: state\n }, /*#__PURE__*/React__namespace.createElement(reactRouterDom.UNSAFE_FetchersContext.Provider, {\n value: fetchersContext\n }, /*#__PURE__*/React__namespace.createElement(reactRouterDom.UNSAFE_ViewTransitionContext.Provider, {\n value: {\n isTransitioning: false\n }\n }, /*#__PURE__*/React__namespace.createElement(reactRouterDom.Router, {\n basename: dataRouterContext.basename,\n location: state.location,\n navigationType: state.historyAction,\n navigator: dataRouterContext.navigator,\n static: dataRouterContext.static,\n future: {\n v7_relativeSplatPath: router$1.future.v7_relativeSplatPath\n }\n }, /*#__PURE__*/React__namespace.createElement(DataRoutes, {\n routes: router$1.routes,\n future: router$1.future,\n state: state\n })))))), hydrateScript ? /*#__PURE__*/React__namespace.createElement("script", {\n suppressHydrationWarning: true,\n nonce: nonce,\n dangerouslySetInnerHTML: {\n __html: hydrateScript\n }\n }) : null);\n}\nfunction DataRoutes({\n routes,\n future,\n state\n}) {\n return reactRouter.UNSAFE_useRoutesImpl(routes, undefined, state, future);\n}\nfunction serializeErrors(errors) {\n if (!errors) return null;\n let entries = Object.entries(errors);\n let serialized = {};\n for (let [key, val] of entries) {\n // Hey you! If you change this, please change the corresponding logic in\n // deserializeErrors in react-router-dom/index.tsx :)\n if (router.isRouteErrorResponse(val)) {\n serialized[key] = {\n ...val,\n __type: "RouteErrorResponse"\n };\n } else if (val instanceof Error) {\n // Do not serialize stack traces from SSR for security reasons\n serialized[key] = {\n message: val.message,\n __type: "Error",\n // If this is a subclass (i.e., ReferenceError), send up the type so we\n // can re-create the same type during hydration.\n ...(val.name !== "Error" ? {\n __subType: val.name\n } : {})\n };\n } else {\n serialized[key] = val;\n }\n }\n return serialized;\n}\nfunction getStatelessNavigator() {\n return {\n createHref,\n encodeLocation,\n push(to) {\n throw new Error(`You cannot use navigator.push() on the server because it is a stateless ` + `environment. This error was probably triggered when you did a ` + `\\`navigate(${JSON.stringify(to)})\\` somewhere in your app.`);\n },\n replace(to) {\n throw new Error(`You cannot use navigator.replace() on the server because it is a stateless ` + `environment. This error was probably triggered when you did a ` + `\\`navigate(${JSON.stringify(to)}, { replace: true })\\` somewhere ` + `in your app.`);\n },\n go(delta) {\n throw new Error(`You cannot use navigator.go() on the server because it is a stateless ` + `environment. This error was probably triggered when you did a ` + `\\`navigate(${delta})\\` somewhere in your app.`);\n },\n back() {\n throw new Error(`You cannot use navigator.back() on the server because it is a stateless ` + `environment.`);\n },\n forward() {\n throw new Error(`You cannot use navigator.forward() on the server because it is a stateless ` + `environment.`);\n }\n };\n}\nfunction createStaticHandler(routes, opts) {\n return router.createStaticHandler(routes, {\n ...opts,\n mapRouteProperties: reactRouter.UNSAFE_mapRouteProperties\n });\n}\nfunction createStaticRouter(routes, context, opts = {}) {\n let manifest = {};\n let dataRoutes = router.UNSAFE_convertRoutesToDataRoutes(routes, reactRouter.UNSAFE_mapRouteProperties, undefined, manifest);\n // Because our context matches may be from a framework-agnostic set of\n // routes passed to createStaticHandler(), we update them here with our\n // newly created/enhanced data routes\n let matches = context.matches.map(match => {\n let route = manifest[match.route.id] || match.route;\n return {\n ...match,\n route\n };\n });\n let msg = method => `You cannot use router.${method}() on the server because it is a stateless environment`;\n return {\n get basename() {\n return context.basename;\n },\n get future() {\n return {\n v7_fetcherPersist: false,\n v7_normalizeFormMethod: false,\n v7_partialHydration: opts.future?.v7_partialHydration === true,\n v7_prependBasename: false,\n v7_relativeSplatPath: opts.future?.v7_relativeSplatPath === true,\n unstable_skipActionErrorRevalidation: false\n };\n },\n get state() {\n return {\n historyAction: router.Action.Pop,\n location: context.location,\n matches,\n loaderData: context.loaderData,\n actionData: context.actionData,\n errors: context.errors,\n initialized: true,\n navigation: router.IDLE_NAVIGATION,\n restoreScrollPosition: null,\n preventScrollReset: false,\n revalidation: "idle",\n fetchers: new Map(),\n blockers: new Map()\n };\n },\n get routes() {\n return dataRoutes;\n },\n get window() {\n return undefined;\n },\n initialize() {\n throw msg("initialize");\n },\n subscribe() {\n throw msg("subscribe");\n },\n enableScrollRestoration() {\n throw msg("enableScrollRestoration");\n },\n navigate() {\n throw msg("navigate");\n },\n fetch() {\n throw msg("fetch");\n },\n revalidate() {\n throw msg("revalidate");\n },\n createHref,\n encodeLocation,\n getFetcher() {\n return router.IDLE_FETCHER;\n },\n deleteFetcher() {\n throw msg("deleteFetcher");\n },\n dispose() {\n throw msg("dispose");\n },\n getBlocker() {\n return router.IDLE_BLOCKER;\n },\n deleteBlocker() {\n throw msg("deleteBlocker");\n },\n patchRoutes() {\n throw msg("patchRoutes");\n },\n _internalFetchControllers: new Map(),\n _internalActiveDeferreds: new Map(),\n _internalSetRoutes() {\n throw msg("_internalSetRoutes");\n }\n };\n}\nfunction createHref(to) {\n return typeof to === "string" ? to : reactRouterDom.createPath(to);\n}\nfunction encodeLocation(to) {\n let href = typeof to === "string" ? to : reactRouterDom.createPath(to);\n // Treating this as a full URL will strip any trailing spaces so we need to\n // pre-encode them since they might be part of a matching splat param from\n // an ancestor route\n href = href.replace(/ $/, "%20");\n let encoded = ABSOLUTE_URL_REGEX.test(href) ? new URL(href) : new URL(href, "http://localhost");\n return {\n pathname: encoded.pathname,\n search: encoded.search,\n hash: encoded.hash\n };\n}\nconst ABSOLUTE_URL_REGEX = /^(?:[a-z][a-z0-9+.-]*:|\\/\\/)/i;\n// This utility is based on https://github.com/zertosh/htmlescape\n// License: https://github.com/zertosh/htmlescape/blob/0527ca7156a524d256101bb310a9f970f63078ad/LICENSE\nconst ESCAPE_LOOKUP = {\n "&": "\\\\u0026",\n ">": "\\\\u003e",\n "<": "\\\\u003c",\n "\\u2028": "\\\\u2028",\n "\\u2029": "\\\\u2029"\n};\nconst ESCAPE_REGEX = /[&><\\u2028\\u2029]/g;\nfunction htmlEscape(str) {\n return str.replace(ESCAPE_REGEX, match => ESCAPE_LOOKUP[match]);\n}\n\nexports.kO = StaticRouter;\nexports.je = StaticRouterProvider;\nexports.d6 = createStaticHandler;\nexports.KD = createStaticRouter;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/react-router-dom/server.js?', + ); + + /***/ + }, + + /***/ 7767: /***/ (__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ AbortedDeferredError: () => (/* reexport safe */ _remix_run_router__WEBPACK_IMPORTED_MODULE_1__.AbortedDeferredError),\n/* harmony export */ Await: () => (/* binding */ Await),\n/* harmony export */ MemoryRouter: () => (/* binding */ MemoryRouter),\n/* harmony export */ Navigate: () => (/* binding */ Navigate),\n/* harmony export */ NavigationType: () => (/* reexport safe */ _remix_run_router__WEBPACK_IMPORTED_MODULE_1__.Action),\n/* harmony export */ Outlet: () => (/* binding */ Outlet),\n/* harmony export */ Route: () => (/* binding */ Route),\n/* harmony export */ Router: () => (/* binding */ Router),\n/* harmony export */ RouterProvider: () => (/* binding */ RouterProvider),\n/* harmony export */ Routes: () => (/* binding */ Routes),\n/* harmony export */ UNSAFE_DataRouterContext: () => (/* binding */ DataRouterContext),\n/* harmony export */ UNSAFE_DataRouterStateContext: () => (/* binding */ DataRouterStateContext),\n/* harmony export */ UNSAFE_LocationContext: () => (/* binding */ LocationContext),\n/* harmony export */ UNSAFE_NavigationContext: () => (/* binding */ NavigationContext),\n/* harmony export */ UNSAFE_RouteContext: () => (/* binding */ RouteContext),\n/* harmony export */ UNSAFE_mapRouteProperties: () => (/* binding */ mapRouteProperties),\n/* harmony export */ UNSAFE_useRouteId: () => (/* binding */ useRouteId),\n/* harmony export */ UNSAFE_useRoutesImpl: () => (/* binding */ useRoutesImpl),\n/* harmony export */ createMemoryRouter: () => (/* binding */ createMemoryRouter),\n/* harmony export */ createPath: () => (/* reexport safe */ _remix_run_router__WEBPACK_IMPORTED_MODULE_1__.createPath),\n/* harmony export */ createRoutesFromChildren: () => (/* binding */ createRoutesFromChildren),\n/* harmony export */ createRoutesFromElements: () => (/* binding */ createRoutesFromChildren),\n/* harmony export */ defer: () => (/* reexport safe */ _remix_run_router__WEBPACK_IMPORTED_MODULE_1__.defer),\n/* harmony export */ generatePath: () => (/* reexport safe */ _remix_run_router__WEBPACK_IMPORTED_MODULE_1__.generatePath),\n/* harmony export */ isRouteErrorResponse: () => (/* reexport safe */ _remix_run_router__WEBPACK_IMPORTED_MODULE_1__.isRouteErrorResponse),\n/* harmony export */ json: () => (/* reexport safe */ _remix_run_router__WEBPACK_IMPORTED_MODULE_1__.json),\n/* harmony export */ matchPath: () => (/* reexport safe */ _remix_run_router__WEBPACK_IMPORTED_MODULE_1__.matchPath),\n/* harmony export */ matchRoutes: () => (/* reexport safe */ _remix_run_router__WEBPACK_IMPORTED_MODULE_1__.matchRoutes),\n/* harmony export */ parsePath: () => (/* reexport safe */ _remix_run_router__WEBPACK_IMPORTED_MODULE_1__.parsePath),\n/* harmony export */ redirect: () => (/* reexport safe */ _remix_run_router__WEBPACK_IMPORTED_MODULE_1__.redirect),\n/* harmony export */ redirectDocument: () => (/* reexport safe */ _remix_run_router__WEBPACK_IMPORTED_MODULE_1__.redirectDocument),\n/* harmony export */ renderMatches: () => (/* binding */ renderMatches),\n/* harmony export */ resolvePath: () => (/* reexport safe */ _remix_run_router__WEBPACK_IMPORTED_MODULE_1__.resolvePath),\n/* harmony export */ useActionData: () => (/* binding */ useActionData),\n/* harmony export */ useAsyncError: () => (/* binding */ useAsyncError),\n/* harmony export */ useAsyncValue: () => (/* binding */ useAsyncValue),\n/* harmony export */ useBlocker: () => (/* binding */ useBlocker),\n/* harmony export */ useHref: () => (/* binding */ useHref),\n/* harmony export */ useInRouterContext: () => (/* binding */ useInRouterContext),\n/* harmony export */ useLoaderData: () => (/* binding */ useLoaderData),\n/* harmony export */ useLocation: () => (/* binding */ useLocation),\n/* harmony export */ useMatch: () => (/* binding */ useMatch),\n/* harmony export */ useMatches: () => (/* binding */ useMatches),\n/* harmony export */ useNavigate: () => (/* binding */ useNavigate),\n/* harmony export */ useNavigation: () => (/* binding */ useNavigation),\n/* harmony export */ useNavigationType: () => (/* binding */ useNavigationType),\n/* harmony export */ useOutlet: () => (/* binding */ useOutlet),\n/* harmony export */ useOutletContext: () => (/* binding */ useOutletContext),\n/* harmony export */ useParams: () => (/* binding */ useParams),\n/* harmony export */ useResolvedPath: () => (/* binding */ useResolvedPath),\n/* harmony export */ useRevalidator: () => (/* binding */ useRevalidator),\n/* harmony export */ useRouteError: () => (/* binding */ useRouteError),\n/* harmony export */ useRouteLoaderData: () => (/* binding */ useRouteLoaderData),\n/* harmony export */ useRoutes: () => (/* binding */ useRoutes)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6540);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _remix_run_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5588);\n/**\n * React Router v6.24.1\n *\n * Copyright (c) Remix Software Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE.md file in the root directory of this source tree.\n *\n * @license MIT\n */\n\n\n\n\nfunction _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}\n\n// Create react-specific types from the agnostic types in @remix-run/router to\n// export from react-router\nconst DataRouterContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createContext(null);\nif (true) {\n DataRouterContext.displayName = "DataRouter";\n}\nconst DataRouterStateContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createContext(null);\nif (true) {\n DataRouterStateContext.displayName = "DataRouterState";\n}\nconst AwaitContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createContext(null);\nif (true) {\n AwaitContext.displayName = "Await";\n}\n\n/**\n * A Navigator is a "location changer"; it\'s how you get to different locations.\n *\n * Every history instance conforms to the Navigator interface, but the\n * distinction is useful primarily when it comes to the low-level `<Router>` API\n * where both the location and a navigator must be provided separately in order\n * to avoid "tearing" that may occur in a suspense-enabled app if the action\n * and/or location were to be read directly from the history instance.\n */\n\nconst NavigationContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createContext(null);\nif (true) {\n NavigationContext.displayName = "Navigation";\n}\nconst LocationContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createContext(null);\nif (true) {\n LocationContext.displayName = "Location";\n}\nconst RouteContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createContext({\n outlet: null,\n matches: [],\n isDataRoute: false\n});\nif (true) {\n RouteContext.displayName = "Route";\n}\nconst RouteErrorContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createContext(null);\nif (true) {\n RouteErrorContext.displayName = "RouteError";\n}\n\n/**\n * Returns the full href for the given "to" value. This is useful for building\n * custom links that are also accessible and preserve right-click behavior.\n *\n * @see https://reactrouter.com/hooks/use-href\n */\nfunction useHref(to, _temp) {\n let {\n relative\n } = _temp === void 0 ? {} : _temp;\n !useInRouterContext() ? true ? (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.UNSAFE_invariant)(false, // TODO: This error is probably because they somehow have 2 versions of the\n // router loaded. We can help them understand how to avoid that.\n "useHref() may be used only in the context of a <Router> component.") : 0 : void 0;\n let {\n basename,\n navigator\n } = react__WEBPACK_IMPORTED_MODULE_0__.useContext(NavigationContext);\n let {\n hash,\n pathname,\n search\n } = useResolvedPath(to, {\n relative\n });\n let joinedPathname = pathname;\n\n // If we\'re operating within a basename, prepend it to the pathname prior\n // to creating the href. If this is a root navigation, then just use the raw\n // basename which allows the basename to have full control over the presence\n // of a trailing slash on root links\n if (basename !== "/") {\n joinedPathname = pathname === "/" ? basename : (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.joinPaths)([basename, pathname]);\n }\n return navigator.createHref({\n pathname: joinedPathname,\n search,\n hash\n });\n}\n\n/**\n * Returns true if this component is a descendant of a `<Router>`.\n *\n * @see https://reactrouter.com/hooks/use-in-router-context\n */\nfunction useInRouterContext() {\n return react__WEBPACK_IMPORTED_MODULE_0__.useContext(LocationContext) != null;\n}\n\n/**\n * Returns the current location object, which represents the current URL in web\n * browsers.\n *\n * Note: If you\'re using this it may mean you\'re doing some of your own\n * "routing" in your app, and we\'d like to know what your use case is. We may\n * be able to provide something higher-level to better suit your needs.\n *\n * @see https://reactrouter.com/hooks/use-location\n */\nfunction useLocation() {\n !useInRouterContext() ? true ? (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.UNSAFE_invariant)(false, // TODO: This error is probably because they somehow have 2 versions of the\n // router loaded. We can help them understand how to avoid that.\n "useLocation() may be used only in the context of a <Router> component.") : 0 : void 0;\n return react__WEBPACK_IMPORTED_MODULE_0__.useContext(LocationContext).location;\n}\n\n/**\n * Returns the current navigation action which describes how the router came to\n * the current location, either by a pop, push, or replace on the history stack.\n *\n * @see https://reactrouter.com/hooks/use-navigation-type\n */\nfunction useNavigationType() {\n return react__WEBPACK_IMPORTED_MODULE_0__.useContext(LocationContext).navigationType;\n}\n\n/**\n * Returns a PathMatch object if the given pattern matches the current URL.\n * This is useful for components that need to know "active" state, e.g.\n * `<NavLink>`.\n *\n * @see https://reactrouter.com/hooks/use-match\n */\nfunction useMatch(pattern) {\n !useInRouterContext() ? true ? (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.UNSAFE_invariant)(false, // TODO: This error is probably because they somehow have 2 versions of the\n // router loaded. We can help them understand how to avoid that.\n "useMatch() may be used only in the context of a <Router> component.") : 0 : void 0;\n let {\n pathname\n } = useLocation();\n return react__WEBPACK_IMPORTED_MODULE_0__.useMemo(() => (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.matchPath)(pattern, pathname), [pathname, pattern]);\n}\n\n/**\n * The interface for the navigate() function returned from useNavigate().\n */\n\nconst navigateEffectWarning = "You should call navigate() in a React.useEffect(), not when " + "your component is first rendered.";\n\n// Mute warnings for calls to useNavigate in SSR environments\nfunction useIsomorphicLayoutEffect(cb) {\n let isStatic = react__WEBPACK_IMPORTED_MODULE_0__.useContext(NavigationContext).static;\n if (!isStatic) {\n // We should be able to get rid of this once react 18.3 is released\n // See: https://github.com/facebook/react/pull/26395\n // eslint-disable-next-line react-hooks/rules-of-hooks\n react__WEBPACK_IMPORTED_MODULE_0__.useLayoutEffect(cb);\n }\n}\n\n/**\n * Returns an imperative method for changing the location. Used by `<Link>`s, but\n * may also be used by other elements to change the location.\n *\n * @see https://reactrouter.com/hooks/use-navigate\n */\nfunction useNavigate() {\n let {\n isDataRoute\n } = react__WEBPACK_IMPORTED_MODULE_0__.useContext(RouteContext);\n // Conditional usage is OK here because the usage of a data router is static\n // eslint-disable-next-line react-hooks/rules-of-hooks\n return isDataRoute ? useNavigateStable() : useNavigateUnstable();\n}\nfunction useNavigateUnstable() {\n !useInRouterContext() ? true ? (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.UNSAFE_invariant)(false, // TODO: This error is probably because they somehow have 2 versions of the\n // router loaded. We can help them understand how to avoid that.\n "useNavigate() may be used only in the context of a <Router> component.") : 0 : void 0;\n let dataRouterContext = react__WEBPACK_IMPORTED_MODULE_0__.useContext(DataRouterContext);\n let {\n basename,\n future,\n navigator\n } = react__WEBPACK_IMPORTED_MODULE_0__.useContext(NavigationContext);\n let {\n matches\n } = react__WEBPACK_IMPORTED_MODULE_0__.useContext(RouteContext);\n let {\n pathname: locationPathname\n } = useLocation();\n let routePathnamesJson = JSON.stringify((0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.UNSAFE_getResolveToMatches)(matches, future.v7_relativeSplatPath));\n let activeRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(false);\n useIsomorphicLayoutEffect(() => {\n activeRef.current = true;\n });\n let navigate = react__WEBPACK_IMPORTED_MODULE_0__.useCallback(function (to, options) {\n if (options === void 0) {\n options = {};\n }\n true ? (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.UNSAFE_warning)(activeRef.current, navigateEffectWarning) : 0;\n\n // Short circuit here since if this happens on first render the navigate\n // is useless because we haven\'t wired up our history listener yet\n if (!activeRef.current) return;\n if (typeof to === "number") {\n navigator.go(to);\n return;\n }\n let path = (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.resolveTo)(to, JSON.parse(routePathnamesJson), locationPathname, options.relative === "path");\n\n // If we\'re operating within a basename, prepend it to the pathname prior\n // to handing off to history (but only if we\'re not in a data router,\n // otherwise it\'ll prepend the basename inside of the router).\n // If this is a root navigation, then we navigate to the raw basename\n // which allows the basename to have full control over the presence of a\n // trailing slash on root links\n if (dataRouterContext == null && basename !== "/") {\n path.pathname = path.pathname === "/" ? basename : (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.joinPaths)([basename, path.pathname]);\n }\n (!!options.replace ? navigator.replace : navigator.push)(path, options.state, options);\n }, [basename, navigator, routePathnamesJson, locationPathname, dataRouterContext]);\n return navigate;\n}\nconst OutletContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createContext(null);\n\n/**\n * Returns the context (if provided) for the child route at this level of the route\n * hierarchy.\n * @see https://reactrouter.com/hooks/use-outlet-context\n */\nfunction useOutletContext() {\n return react__WEBPACK_IMPORTED_MODULE_0__.useContext(OutletContext);\n}\n\n/**\n * Returns the element for the child route at this level of the route\n * hierarchy. Used internally by `<Outlet>` to render child routes.\n *\n * @see https://reactrouter.com/hooks/use-outlet\n */\nfunction useOutlet(context) {\n let outlet = react__WEBPACK_IMPORTED_MODULE_0__.useContext(RouteContext).outlet;\n if (outlet) {\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(OutletContext.Provider, {\n value: context\n }, outlet);\n }\n return outlet;\n}\n\n/**\n * Returns an object of key/value pairs of the dynamic params from the current\n * URL that were matched by the route path.\n *\n * @see https://reactrouter.com/hooks/use-params\n */\nfunction useParams() {\n let {\n matches\n } = react__WEBPACK_IMPORTED_MODULE_0__.useContext(RouteContext);\n let routeMatch = matches[matches.length - 1];\n return routeMatch ? routeMatch.params : {};\n}\n\n/**\n * Resolves the pathname of the given `to` value against the current location.\n *\n * @see https://reactrouter.com/hooks/use-resolved-path\n */\nfunction useResolvedPath(to, _temp2) {\n let {\n relative\n } = _temp2 === void 0 ? {} : _temp2;\n let {\n future\n } = react__WEBPACK_IMPORTED_MODULE_0__.useContext(NavigationContext);\n let {\n matches\n } = react__WEBPACK_IMPORTED_MODULE_0__.useContext(RouteContext);\n let {\n pathname: locationPathname\n } = useLocation();\n let routePathnamesJson = JSON.stringify((0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.UNSAFE_getResolveToMatches)(matches, future.v7_relativeSplatPath));\n return react__WEBPACK_IMPORTED_MODULE_0__.useMemo(() => (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.resolveTo)(to, JSON.parse(routePathnamesJson), locationPathname, relative === "path"), [to, routePathnamesJson, locationPathname, relative]);\n}\n\n/**\n * Returns the element of the route that matched the current location, prepared\n * with the correct context to render the remainder of the route tree. Route\n * elements in the tree must render an `<Outlet>` to render their child route\'s\n * element.\n *\n * @see https://reactrouter.com/hooks/use-routes\n */\nfunction useRoutes(routes, locationArg) {\n return useRoutesImpl(routes, locationArg);\n}\n\n// Internal implementation with accept optional param for RouterProvider usage\nfunction useRoutesImpl(routes, locationArg, dataRouterState, future) {\n !useInRouterContext() ? true ? (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.UNSAFE_invariant)(false, // TODO: This error is probably because they somehow have 2 versions of the\n // router loaded. We can help them understand how to avoid that.\n "useRoutes() may be used only in the context of a <Router> component.") : 0 : void 0;\n let {\n navigator\n } = react__WEBPACK_IMPORTED_MODULE_0__.useContext(NavigationContext);\n let {\n matches: parentMatches\n } = react__WEBPACK_IMPORTED_MODULE_0__.useContext(RouteContext);\n let routeMatch = parentMatches[parentMatches.length - 1];\n let parentParams = routeMatch ? routeMatch.params : {};\n let parentPathname = routeMatch ? routeMatch.pathname : "/";\n let parentPathnameBase = routeMatch ? routeMatch.pathnameBase : "/";\n let parentRoute = routeMatch && routeMatch.route;\n if (true) {\n // You won\'t get a warning about 2 different <Routes> under a <Route>\n // without a trailing *, but this is a best-effort warning anyway since we\n // cannot even give the warning unless they land at the parent route.\n //\n // Example:\n //\n // <Routes>\n // {/* This route path MUST end with /* because otherwise\n // it will never match /blog/post/123 */}\n // <Route path="blog" element={<Blog />} />\n // <Route path="blog/feed" element={<BlogFeed />} />\n // </Routes>\n //\n // function Blog() {\n // return (\n // <Routes>\n // <Route path="post/:id" element={<Post />} />\n // </Routes>\n // );\n // }\n let parentPath = parentRoute && parentRoute.path || "";\n warningOnce(parentPathname, !parentRoute || parentPath.endsWith("*"), "You rendered descendant <Routes> (or called `useRoutes()`) at " + ("\\"" + parentPathname + "\\" (under <Route path=\\"" + parentPath + "\\">) but the ") + "parent route path has no trailing \\"*\\". This means if you navigate " + "deeper, the parent won\'t match anymore and therefore the child " + "routes will never render.\\n\\n" + ("Please change the parent <Route path=\\"" + parentPath + "\\"> to <Route ") + ("path=\\"" + (parentPath === "/" ? "*" : parentPath + "/*") + "\\">."));\n }\n let locationFromContext = useLocation();\n let location;\n if (locationArg) {\n var _parsedLocationArg$pa;\n let parsedLocationArg = typeof locationArg === "string" ? (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.parsePath)(locationArg) : locationArg;\n !(parentPathnameBase === "/" || ((_parsedLocationArg$pa = parsedLocationArg.pathname) == null ? void 0 : _parsedLocationArg$pa.startsWith(parentPathnameBase))) ? true ? (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.UNSAFE_invariant)(false, "When overriding the location using `<Routes location>` or `useRoutes(routes, location)`, " + "the location pathname must begin with the portion of the URL pathname that was " + ("matched by all parent routes. The current pathname base is \\"" + parentPathnameBase + "\\" ") + ("but pathname \\"" + parsedLocationArg.pathname + "\\" was given in the `location` prop.")) : 0 : void 0;\n location = parsedLocationArg;\n } else {\n location = locationFromContext;\n }\n let pathname = location.pathname || "/";\n let remainingPathname = pathname;\n if (parentPathnameBase !== "/") {\n // Determine the remaining pathname by removing the # of URL segments the\n // parentPathnameBase has, instead of removing based on character count.\n // This is because we can\'t guarantee that incoming/outgoing encodings/\n // decodings will match exactly.\n // We decode paths before matching on a per-segment basis with\n // decodeURIComponent(), but we re-encode pathnames via `new URL()` so they\n // match what `window.location.pathname` would reflect. Those don\'t 100%\n // align when it comes to encoded URI characters such as % and &.\n //\n // So we may end up with:\n // pathname: "/descendant/a%25b/match"\n // parentPathnameBase: "/descendant/a%b"\n //\n // And the direct substring removal approach won\'t work :/\n let parentSegments = parentPathnameBase.replace(/^\\//, "").split("/");\n let segments = pathname.replace(/^\\//, "").split("/");\n remainingPathname = "/" + segments.slice(parentSegments.length).join("/");\n }\n let matches = (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.matchRoutes)(routes, {\n pathname: remainingPathname\n });\n if (true) {\n true ? (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.UNSAFE_warning)(parentRoute || matches != null, "No routes matched location \\"" + location.pathname + location.search + location.hash + "\\" ") : 0;\n true ? (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.UNSAFE_warning)(matches == null || matches[matches.length - 1].route.element !== undefined || matches[matches.length - 1].route.Component !== undefined || matches[matches.length - 1].route.lazy !== undefined, "Matched leaf route at location \\"" + location.pathname + location.search + location.hash + "\\" " + "does not have an element or Component. This means it will render an <Outlet /> with a " + "null value by default resulting in an \\"empty\\" page.") : 0;\n }\n let renderedMatches = _renderMatches(matches && matches.map(match => Object.assign({}, match, {\n params: Object.assign({}, parentParams, match.params),\n pathname: (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.joinPaths)([parentPathnameBase,\n // Re-encode pathnames that were decoded inside matchRoutes\n navigator.encodeLocation ? navigator.encodeLocation(match.pathname).pathname : match.pathname]),\n pathnameBase: match.pathnameBase === "/" ? parentPathnameBase : (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.joinPaths)([parentPathnameBase,\n // Re-encode pathnames that were decoded inside matchRoutes\n navigator.encodeLocation ? navigator.encodeLocation(match.pathnameBase).pathname : match.pathnameBase])\n })), parentMatches, dataRouterState, future);\n\n // When a user passes in a `locationArg`, the associated routes need to\n // be wrapped in a new `LocationContext.Provider` in order for `useLocation`\n // to use the scoped location instead of the global location.\n if (locationArg && renderedMatches) {\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(LocationContext.Provider, {\n value: {\n location: _extends({\n pathname: "/",\n search: "",\n hash: "",\n state: null,\n key: "default"\n }, location),\n navigationType: _remix_run_router__WEBPACK_IMPORTED_MODULE_1__.Action.Pop\n }\n }, renderedMatches);\n }\n return renderedMatches;\n}\nfunction DefaultErrorComponent() {\n let error = useRouteError();\n let message = (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.isRouteErrorResponse)(error) ? error.status + " " + error.statusText : error instanceof Error ? error.message : JSON.stringify(error);\n let stack = error instanceof Error ? error.stack : null;\n let lightgrey = "rgba(200,200,200, 0.5)";\n let preStyles = {\n padding: "0.5rem",\n backgroundColor: lightgrey\n };\n let codeStyles = {\n padding: "2px 4px",\n backgroundColor: lightgrey\n };\n let devInfo = null;\n if (true) {\n console.error("Error handled by React Router default ErrorBoundary:", error);\n devInfo = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("p", null, "\\uD83D\\uDCBF Hey developer \\uD83D\\uDC4B"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("p", null, "You can provide a way better UX than this when your app throws errors by providing your own ", /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("code", {\n style: codeStyles\n }, "ErrorBoundary"), " or", " ", /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("code", {\n style: codeStyles\n }, "errorElement"), " prop on your route."));\n }\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("h2", null, "Unexpected Application Error!"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("h3", {\n style: {\n fontStyle: "italic"\n }\n }, message), stack ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("pre", {\n style: preStyles\n }, stack) : null, devInfo);\n}\nconst defaultErrorElement = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(DefaultErrorComponent, null);\nclass RenderErrorBoundary extends react__WEBPACK_IMPORTED_MODULE_0__.Component {\n constructor(props) {\n super(props);\n this.state = {\n location: props.location,\n revalidation: props.revalidation,\n error: props.error\n };\n }\n static getDerivedStateFromError(error) {\n return {\n error: error\n };\n }\n static getDerivedStateFromProps(props, state) {\n // When we get into an error state, the user will likely click "back" to the\n // previous page that didn\'t have an error. Because this wraps the entire\n // application, that will have no effect--the error page continues to display.\n // This gives us a mechanism to recover from the error when the location changes.\n //\n // Whether we\'re in an error state or not, we update the location in state\n // so that when we are in an error state, it gets reset when a new location\n // comes in and the user recovers from the error.\n if (state.location !== props.location || state.revalidation !== "idle" && props.revalidation === "idle") {\n return {\n error: props.error,\n location: props.location,\n revalidation: props.revalidation\n };\n }\n\n // If we\'re not changing locations, preserve the location but still surface\n // any new errors that may come through. We retain the existing error, we do\n // this because the error provided from the app state may be cleared without\n // the location changing.\n return {\n error: props.error !== undefined ? props.error : state.error,\n location: state.location,\n revalidation: props.revalidation || state.revalidation\n };\n }\n componentDidCatch(error, errorInfo) {\n console.error("React Router caught the following error during render", error, errorInfo);\n }\n render() {\n return this.state.error !== undefined ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(RouteContext.Provider, {\n value: this.props.routeContext\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(RouteErrorContext.Provider, {\n value: this.state.error,\n children: this.props.component\n })) : this.props.children;\n }\n}\nfunction RenderedRoute(_ref) {\n let {\n routeContext,\n match,\n children\n } = _ref;\n let dataRouterContext = react__WEBPACK_IMPORTED_MODULE_0__.useContext(DataRouterContext);\n\n // Track how deep we got in our render pass to emulate SSR componentDidCatch\n // in a DataStaticRouter\n if (dataRouterContext && dataRouterContext.static && dataRouterContext.staticContext && (match.route.errorElement || match.route.ErrorBoundary)) {\n dataRouterContext.staticContext._deepestRenderedBoundaryId = match.route.id;\n }\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(RouteContext.Provider, {\n value: routeContext\n }, children);\n}\nfunction _renderMatches(matches, parentMatches, dataRouterState, future) {\n var _dataRouterState2;\n if (parentMatches === void 0) {\n parentMatches = [];\n }\n if (dataRouterState === void 0) {\n dataRouterState = null;\n }\n if (future === void 0) {\n future = null;\n }\n if (matches == null) {\n var _dataRouterState;\n if ((_dataRouterState = dataRouterState) != null && _dataRouterState.errors) {\n // Don\'t bail if we have data router errors so we can render them in the\n // boundary. Use the pre-matched (or shimmed) matches\n matches = dataRouterState.matches;\n } else {\n return null;\n }\n }\n let renderedMatches = matches;\n\n // If we have data errors, trim matches to the highest error boundary\n let errors = (_dataRouterState2 = dataRouterState) == null ? void 0 : _dataRouterState2.errors;\n if (errors != null) {\n let errorIndex = renderedMatches.findIndex(m => m.route.id && (errors == null ? void 0 : errors[m.route.id]) !== undefined);\n !(errorIndex >= 0) ? true ? (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.UNSAFE_invariant)(false, "Could not find a matching route for errors on route IDs: " + Object.keys(errors).join(",")) : 0 : void 0;\n renderedMatches = renderedMatches.slice(0, Math.min(renderedMatches.length, errorIndex + 1));\n }\n\n // If we\'re in a partial hydration mode, detect if we need to render down to\n // a given HydrateFallback while we load the rest of the hydration data\n let renderFallback = false;\n let fallbackIndex = -1;\n if (dataRouterState && future && future.v7_partialHydration) {\n for (let i = 0; i < renderedMatches.length; i++) {\n let match = renderedMatches[i];\n // Track the deepest fallback up until the first route without data\n if (match.route.HydrateFallback || match.route.hydrateFallbackElement) {\n fallbackIndex = i;\n }\n if (match.route.id) {\n let {\n loaderData,\n errors\n } = dataRouterState;\n let needsToRunLoader = match.route.loader && loaderData[match.route.id] === undefined && (!errors || errors[match.route.id] === undefined);\n if (match.route.lazy || needsToRunLoader) {\n // We found the first route that\'s not ready to render (waiting on\n // lazy, or has a loader that hasn\'t run yet). Flag that we need to\n // render a fallback and render up until the appropriate fallback\n renderFallback = true;\n if (fallbackIndex >= 0) {\n renderedMatches = renderedMatches.slice(0, fallbackIndex + 1);\n } else {\n renderedMatches = [renderedMatches[0]];\n }\n break;\n }\n }\n }\n }\n return renderedMatches.reduceRight((outlet, match, index) => {\n // Only data routers handle errors/fallbacks\n let error;\n let shouldRenderHydrateFallback = false;\n let errorElement = null;\n let hydrateFallbackElement = null;\n if (dataRouterState) {\n error = errors && match.route.id ? errors[match.route.id] : undefined;\n errorElement = match.route.errorElement || defaultErrorElement;\n if (renderFallback) {\n if (fallbackIndex < 0 && index === 0) {\n warningOnce("route-fallback", false, "No `HydrateFallback` element provided to render during initial hydration");\n shouldRenderHydrateFallback = true;\n hydrateFallbackElement = null;\n } else if (fallbackIndex === index) {\n shouldRenderHydrateFallback = true;\n hydrateFallbackElement = match.route.hydrateFallbackElement || null;\n }\n }\n }\n let matches = parentMatches.concat(renderedMatches.slice(0, index + 1));\n let getChildren = () => {\n let children;\n if (error) {\n children = errorElement;\n } else if (shouldRenderHydrateFallback) {\n children = hydrateFallbackElement;\n } else if (match.route.Component) {\n // Note: This is a de-optimized path since React won\'t re-use the\n // ReactElement since it\'s identity changes with each new\n // React.createElement call. We keep this so folks can use\n // `<Route Component={...}>` in `<Routes>` but generally `Component`\n // usage is only advised in `RouterProvider` when we can convert it to\n // `element` ahead of time.\n children = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(match.route.Component, null);\n } else if (match.route.element) {\n children = match.route.element;\n } else {\n children = outlet;\n }\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(RenderedRoute, {\n match: match,\n routeContext: {\n outlet,\n matches,\n isDataRoute: dataRouterState != null\n },\n children: children\n });\n };\n // Only wrap in an error boundary within data router usages when we have an\n // ErrorBoundary/errorElement on this route. Otherwise let it bubble up to\n // an ancestor ErrorBoundary/errorElement\n return dataRouterState && (match.route.ErrorBoundary || match.route.errorElement || index === 0) ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(RenderErrorBoundary, {\n location: dataRouterState.location,\n revalidation: dataRouterState.revalidation,\n component: errorElement,\n error: error,\n children: getChildren(),\n routeContext: {\n outlet: null,\n matches,\n isDataRoute: true\n }\n }) : getChildren();\n }, null);\n}\nvar DataRouterHook = /*#__PURE__*/function (DataRouterHook) {\n DataRouterHook["UseBlocker"] = "useBlocker";\n DataRouterHook["UseRevalidator"] = "useRevalidator";\n DataRouterHook["UseNavigateStable"] = "useNavigate";\n return DataRouterHook;\n}(DataRouterHook || {});\nvar DataRouterStateHook = /*#__PURE__*/function (DataRouterStateHook) {\n DataRouterStateHook["UseBlocker"] = "useBlocker";\n DataRouterStateHook["UseLoaderData"] = "useLoaderData";\n DataRouterStateHook["UseActionData"] = "useActionData";\n DataRouterStateHook["UseRouteError"] = "useRouteError";\n DataRouterStateHook["UseNavigation"] = "useNavigation";\n DataRouterStateHook["UseRouteLoaderData"] = "useRouteLoaderData";\n DataRouterStateHook["UseMatches"] = "useMatches";\n DataRouterStateHook["UseRevalidator"] = "useRevalidator";\n DataRouterStateHook["UseNavigateStable"] = "useNavigate";\n DataRouterStateHook["UseRouteId"] = "useRouteId";\n return DataRouterStateHook;\n}(DataRouterStateHook || {});\nfunction getDataRouterConsoleError(hookName) {\n return hookName + " must be used within a data router. See https://reactrouter.com/routers/picking-a-router.";\n}\nfunction useDataRouterContext(hookName) {\n let ctx = react__WEBPACK_IMPORTED_MODULE_0__.useContext(DataRouterContext);\n !ctx ? true ? (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.UNSAFE_invariant)(false, getDataRouterConsoleError(hookName)) : 0 : void 0;\n return ctx;\n}\nfunction useDataRouterState(hookName) {\n let state = react__WEBPACK_IMPORTED_MODULE_0__.useContext(DataRouterStateContext);\n !state ? true ? (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.UNSAFE_invariant)(false, getDataRouterConsoleError(hookName)) : 0 : void 0;\n return state;\n}\nfunction useRouteContext(hookName) {\n let route = react__WEBPACK_IMPORTED_MODULE_0__.useContext(RouteContext);\n !route ? true ? (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.UNSAFE_invariant)(false, getDataRouterConsoleError(hookName)) : 0 : void 0;\n return route;\n}\n\n// Internal version with hookName-aware debugging\nfunction useCurrentRouteId(hookName) {\n let route = useRouteContext(hookName);\n let thisRoute = route.matches[route.matches.length - 1];\n !thisRoute.route.id ? true ? (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.UNSAFE_invariant)(false, hookName + " can only be used on routes that contain a unique \\"id\\"") : 0 : void 0;\n return thisRoute.route.id;\n}\n\n/**\n * Returns the ID for the nearest contextual route\n */\nfunction useRouteId() {\n return useCurrentRouteId(DataRouterStateHook.UseRouteId);\n}\n\n/**\n * Returns the current navigation, defaulting to an "idle" navigation when\n * no navigation is in progress\n */\nfunction useNavigation() {\n let state = useDataRouterState(DataRouterStateHook.UseNavigation);\n return state.navigation;\n}\n\n/**\n * Returns a revalidate function for manually triggering revalidation, as well\n * as the current state of any manual revalidations\n */\nfunction useRevalidator() {\n let dataRouterContext = useDataRouterContext(DataRouterHook.UseRevalidator);\n let state = useDataRouterState(DataRouterStateHook.UseRevalidator);\n return react__WEBPACK_IMPORTED_MODULE_0__.useMemo(() => ({\n revalidate: dataRouterContext.router.revalidate,\n state: state.revalidation\n }), [dataRouterContext.router.revalidate, state.revalidation]);\n}\n\n/**\n * Returns the active route matches, useful for accessing loaderData for\n * parent/child routes or the route "handle" property\n */\nfunction useMatches() {\n let {\n matches,\n loaderData\n } = useDataRouterState(DataRouterStateHook.UseMatches);\n return react__WEBPACK_IMPORTED_MODULE_0__.useMemo(() => matches.map(m => (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.UNSAFE_convertRouteMatchToUiMatch)(m, loaderData)), [matches, loaderData]);\n}\n\n/**\n * Returns the loader data for the nearest ancestor Route loader\n */\nfunction useLoaderData() {\n let state = useDataRouterState(DataRouterStateHook.UseLoaderData);\n let routeId = useCurrentRouteId(DataRouterStateHook.UseLoaderData);\n if (state.errors && state.errors[routeId] != null) {\n console.error("You cannot `useLoaderData` in an errorElement (routeId: " + routeId + ")");\n return undefined;\n }\n return state.loaderData[routeId];\n}\n\n/**\n * Returns the loaderData for the given routeId\n */\nfunction useRouteLoaderData(routeId) {\n let state = useDataRouterState(DataRouterStateHook.UseRouteLoaderData);\n return state.loaderData[routeId];\n}\n\n/**\n * Returns the action data for the nearest ancestor Route action\n */\nfunction useActionData() {\n let state = useDataRouterState(DataRouterStateHook.UseActionData);\n let routeId = useCurrentRouteId(DataRouterStateHook.UseLoaderData);\n return state.actionData ? state.actionData[routeId] : undefined;\n}\n\n/**\n * Returns the nearest ancestor Route error, which could be a loader/action\n * error or a render error. This is intended to be called from your\n * ErrorBoundary/errorElement to display a proper error message.\n */\nfunction useRouteError() {\n var _state$errors;\n let error = react__WEBPACK_IMPORTED_MODULE_0__.useContext(RouteErrorContext);\n let state = useDataRouterState(DataRouterStateHook.UseRouteError);\n let routeId = useCurrentRouteId(DataRouterStateHook.UseRouteError);\n\n // If this was a render error, we put it in a RouteError context inside\n // of RenderErrorBoundary\n if (error !== undefined) {\n return error;\n }\n\n // Otherwise look for errors from our data router state\n return (_state$errors = state.errors) == null ? void 0 : _state$errors[routeId];\n}\n\n/**\n * Returns the happy-path data from the nearest ancestor `<Await />` value\n */\nfunction useAsyncValue() {\n let value = react__WEBPACK_IMPORTED_MODULE_0__.useContext(AwaitContext);\n return value == null ? void 0 : value._data;\n}\n\n/**\n * Returns the error from the nearest ancestor `<Await />` value\n */\nfunction useAsyncError() {\n let value = react__WEBPACK_IMPORTED_MODULE_0__.useContext(AwaitContext);\n return value == null ? void 0 : value._error;\n}\nlet blockerId = 0;\n\n/**\n * Allow the application to block navigations within the SPA and present the\n * user a confirmation dialog to confirm the navigation. Mostly used to avoid\n * using half-filled form data. This does not handle hard-reloads or\n * cross-origin navigations.\n */\nfunction useBlocker(shouldBlock) {\n let {\n router,\n basename\n } = useDataRouterContext(DataRouterHook.UseBlocker);\n let state = useDataRouterState(DataRouterStateHook.UseBlocker);\n let [blockerKey, setBlockerKey] = react__WEBPACK_IMPORTED_MODULE_0__.useState("");\n let blockerFunction = react__WEBPACK_IMPORTED_MODULE_0__.useCallback(arg => {\n if (typeof shouldBlock !== "function") {\n return !!shouldBlock;\n }\n if (basename === "/") {\n return shouldBlock(arg);\n }\n\n // If they provided us a function and we\'ve got an active basename, strip\n // it from the locations we expose to the user to match the behavior of\n // useLocation\n let {\n currentLocation,\n nextLocation,\n historyAction\n } = arg;\n return shouldBlock({\n currentLocation: _extends({}, currentLocation, {\n pathname: (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.stripBasename)(currentLocation.pathname, basename) || currentLocation.pathname\n }),\n nextLocation: _extends({}, nextLocation, {\n pathname: (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.stripBasename)(nextLocation.pathname, basename) || nextLocation.pathname\n }),\n historyAction\n });\n }, [basename, shouldBlock]);\n\n // This effect is in charge of blocker key assignment and deletion (which is\n // tightly coupled to the key)\n react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => {\n let key = String(++blockerId);\n setBlockerKey(key);\n return () => router.deleteBlocker(key);\n }, [router]);\n\n // This effect handles assigning the blockerFunction. This is to handle\n // unstable blocker function identities, and happens only after the prior\n // effect so we don\'t get an orphaned blockerFunction in the router with a\n // key of "". Until then we just have the IDLE_BLOCKER.\n react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => {\n if (blockerKey !== "") {\n router.getBlocker(blockerKey, blockerFunction);\n }\n }, [router, blockerKey, blockerFunction]);\n\n // Prefer the blocker from `state` not `router.state` since DataRouterContext\n // is memoized so this ensures we update on blocker state updates\n return blockerKey && state.blockers.has(blockerKey) ? state.blockers.get(blockerKey) : _remix_run_router__WEBPACK_IMPORTED_MODULE_1__.IDLE_BLOCKER;\n}\n\n/**\n * Stable version of useNavigate that is used when we are in the context of\n * a RouterProvider.\n */\nfunction useNavigateStable() {\n let {\n router\n } = useDataRouterContext(DataRouterHook.UseNavigateStable);\n let id = useCurrentRouteId(DataRouterStateHook.UseNavigateStable);\n let activeRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(false);\n useIsomorphicLayoutEffect(() => {\n activeRef.current = true;\n });\n let navigate = react__WEBPACK_IMPORTED_MODULE_0__.useCallback(function (to, options) {\n if (options === void 0) {\n options = {};\n }\n true ? (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.UNSAFE_warning)(activeRef.current, navigateEffectWarning) : 0;\n\n // Short circuit here since if this happens on first render the navigate\n // is useless because we haven\'t wired up our router subscriber yet\n if (!activeRef.current) return;\n if (typeof to === "number") {\n router.navigate(to);\n } else {\n router.navigate(to, _extends({\n fromRouteId: id\n }, options));\n }\n }, [router, id]);\n return navigate;\n}\nconst alreadyWarned = {};\nfunction warningOnce(key, cond, message) {\n if (!cond && !alreadyWarned[key]) {\n alreadyWarned[key] = true;\n true ? (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.UNSAFE_warning)(false, message) : 0;\n }\n}\n\n/**\n Webpack + React 17 fails to compile on any of the following because webpack\n complains that `startTransition` doesn\'t exist in `React`:\n * import { startTransition } from "react"\n * import * as React from from "react";\n "startTransition" in React ? React.startTransition(() => setState()) : setState()\n * import * as React from from "react";\n "startTransition" in React ? React["startTransition"](() => setState()) : setState()\n\n Moving it to a constant such as the following solves the Webpack/React 17 issue:\n * import * as React from from "react";\n const START_TRANSITION = "startTransition";\n START_TRANSITION in React ? React[START_TRANSITION](() => setState()) : setState()\n\n However, that introduces webpack/terser minification issues in production builds\n in React 18 where minification/obfuscation ends up removing the call of\n React.startTransition entirely from the first half of the ternary. Grabbing\n this exported reference once up front resolves that issue.\n\n See https://github.com/remix-run/react-router/issues/10579\n*/\nconst START_TRANSITION = "startTransition";\nconst startTransitionImpl = react__WEBPACK_IMPORTED_MODULE_0__[START_TRANSITION];\n\n/**\n * Given a Remix Router instance, render the appropriate UI\n */\nfunction RouterProvider(_ref) {\n let {\n fallbackElement,\n router,\n future\n } = _ref;\n let [state, setStateImpl] = react__WEBPACK_IMPORTED_MODULE_0__.useState(router.state);\n let {\n v7_startTransition\n } = future || {};\n let setState = react__WEBPACK_IMPORTED_MODULE_0__.useCallback(newState => {\n if (v7_startTransition && startTransitionImpl) {\n startTransitionImpl(() => setStateImpl(newState));\n } else {\n setStateImpl(newState);\n }\n }, [setStateImpl, v7_startTransition]);\n\n // Need to use a layout effect here so we are subscribed early enough to\n // pick up on any render-driven redirects/navigations (useEffect/<Navigate>)\n react__WEBPACK_IMPORTED_MODULE_0__.useLayoutEffect(() => router.subscribe(setState), [router, setState]);\n react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => {\n true ? (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.UNSAFE_warning)(fallbackElement == null || !router.future.v7_partialHydration, "`<RouterProvider fallbackElement>` is deprecated when using " + "`v7_partialHydration`, use a `HydrateFallback` component instead") : 0;\n // Only log this once on initial mount\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n let navigator = react__WEBPACK_IMPORTED_MODULE_0__.useMemo(() => {\n return {\n createHref: router.createHref,\n encodeLocation: router.encodeLocation,\n go: n => router.navigate(n),\n push: (to, state, opts) => router.navigate(to, {\n state,\n preventScrollReset: opts == null ? void 0 : opts.preventScrollReset\n }),\n replace: (to, state, opts) => router.navigate(to, {\n replace: true,\n state,\n preventScrollReset: opts == null ? void 0 : opts.preventScrollReset\n })\n };\n }, [router]);\n let basename = router.basename || "/";\n let dataRouterContext = react__WEBPACK_IMPORTED_MODULE_0__.useMemo(() => ({\n router,\n navigator,\n static: false,\n basename\n }), [router, navigator, basename]);\n\n // The fragment and {null} here are important! We need them to keep React 18\'s\n // useId happy when we are server-rendering since we may have a <script> here\n // containing the hydrated server-side staticContext (from StaticRouterProvider).\n // useId relies on the component tree structure to generate deterministic id\'s\n // so we need to ensure it remains the same on the client even though\n // we don\'t need the <script> tag\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(DataRouterContext.Provider, {\n value: dataRouterContext\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(DataRouterStateContext.Provider, {\n value: state\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(Router, {\n basename: basename,\n location: state.location,\n navigationType: state.historyAction,\n navigator: navigator,\n future: {\n v7_relativeSplatPath: router.future.v7_relativeSplatPath\n }\n }, state.initialized || router.future.v7_partialHydration ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(DataRoutes, {\n routes: router.routes,\n future: router.future,\n state: state\n }) : fallbackElement))), null);\n}\nfunction DataRoutes(_ref2) {\n let {\n routes,\n future,\n state\n } = _ref2;\n return useRoutesImpl(routes, undefined, state, future);\n}\n/**\n * A `<Router>` that stores all entries in memory.\n *\n * @see https://reactrouter.com/router-components/memory-router\n */\nfunction MemoryRouter(_ref3) {\n let {\n basename,\n children,\n initialEntries,\n initialIndex,\n future\n } = _ref3;\n let historyRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef();\n if (historyRef.current == null) {\n historyRef.current = (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.createMemoryHistory)({\n initialEntries,\n initialIndex,\n v5Compat: true\n });\n }\n let history = historyRef.current;\n let [state, setStateImpl] = react__WEBPACK_IMPORTED_MODULE_0__.useState({\n action: history.action,\n location: history.location\n });\n let {\n v7_startTransition\n } = future || {};\n let setState = react__WEBPACK_IMPORTED_MODULE_0__.useCallback(newState => {\n v7_startTransition && startTransitionImpl ? startTransitionImpl(() => setStateImpl(newState)) : setStateImpl(newState);\n }, [setStateImpl, v7_startTransition]);\n react__WEBPACK_IMPORTED_MODULE_0__.useLayoutEffect(() => history.listen(setState), [history, setState]);\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(Router, {\n basename: basename,\n children: children,\n location: state.location,\n navigationType: state.action,\n navigator: history,\n future: future\n });\n}\n/**\n * Changes the current location.\n *\n * Note: This API is mostly useful in React.Component subclasses that are not\n * able to use hooks. In functional components, we recommend you use the\n * `useNavigate` hook instead.\n *\n * @see https://reactrouter.com/components/navigate\n */\nfunction Navigate(_ref4) {\n let {\n to,\n replace,\n state,\n relative\n } = _ref4;\n !useInRouterContext() ? true ? (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.UNSAFE_invariant)(false, // TODO: This error is probably because they somehow have 2 versions of\n // the router loaded. We can help them understand how to avoid that.\n "<Navigate> may be used only in the context of a <Router> component.") : 0 : void 0;\n let {\n future,\n static: isStatic\n } = react__WEBPACK_IMPORTED_MODULE_0__.useContext(NavigationContext);\n true ? (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.UNSAFE_warning)(!isStatic, "<Navigate> must not be used on the initial render in a <StaticRouter>. " + "This is a no-op, but you should modify your code so the <Navigate> is " + "only ever rendered in response to some user interaction or state change.") : 0;\n let {\n matches\n } = react__WEBPACK_IMPORTED_MODULE_0__.useContext(RouteContext);\n let {\n pathname: locationPathname\n } = useLocation();\n let navigate = useNavigate();\n\n // Resolve the path outside of the effect so that when effects run twice in\n // StrictMode they navigate to the same place\n let path = (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.resolveTo)(to, (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.UNSAFE_getResolveToMatches)(matches, future.v7_relativeSplatPath), locationPathname, relative === "path");\n let jsonPath = JSON.stringify(path);\n react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => navigate(JSON.parse(jsonPath), {\n replace,\n state,\n relative\n }), [navigate, jsonPath, relative, replace, state]);\n return null;\n}\n/**\n * Renders the child route\'s element, if there is one.\n *\n * @see https://reactrouter.com/components/outlet\n */\nfunction Outlet(props) {\n return useOutlet(props.context);\n}\n/**\n * Declares an element that should be rendered at a certain URL path.\n *\n * @see https://reactrouter.com/components/route\n */\nfunction Route(_props) {\n true ? (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.UNSAFE_invariant)(false, "A <Route> is only ever to be used as the child of <Routes> element, " + "never rendered directly. Please wrap your <Route> in a <Routes>.") : 0 ;\n}\n/**\n * Provides location context for the rest of the app.\n *\n * Note: You usually won\'t render a `<Router>` directly. Instead, you\'ll render a\n * router that is more specific to your environment such as a `<BrowserRouter>`\n * in web browsers or a `<StaticRouter>` for server rendering.\n *\n * @see https://reactrouter.com/router-components/router\n */\nfunction Router(_ref5) {\n let {\n basename: basenameProp = "/",\n children = null,\n location: locationProp,\n navigationType = _remix_run_router__WEBPACK_IMPORTED_MODULE_1__.Action.Pop,\n navigator,\n static: staticProp = false,\n future\n } = _ref5;\n !!useInRouterContext() ? true ? (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.UNSAFE_invariant)(false, "You cannot render a <Router> inside another <Router>." + " You should never have more than one in your app.") : 0 : void 0;\n\n // Preserve trailing slashes on basename, so we can let the user control\n // the enforcement of trailing slashes throughout the app\n let basename = basenameProp.replace(/^\\/*/, "/");\n let navigationContext = react__WEBPACK_IMPORTED_MODULE_0__.useMemo(() => ({\n basename,\n navigator,\n static: staticProp,\n future: _extends({\n v7_relativeSplatPath: false\n }, future)\n }), [basename, future, navigator, staticProp]);\n if (typeof locationProp === "string") {\n locationProp = (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.parsePath)(locationProp);\n }\n let {\n pathname = "/",\n search = "",\n hash = "",\n state = null,\n key = "default"\n } = locationProp;\n let locationContext = react__WEBPACK_IMPORTED_MODULE_0__.useMemo(() => {\n let trailingPathname = (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.stripBasename)(pathname, basename);\n if (trailingPathname == null) {\n return null;\n }\n return {\n location: {\n pathname: trailingPathname,\n search,\n hash,\n state,\n key\n },\n navigationType\n };\n }, [basename, pathname, search, hash, state, key, navigationType]);\n true ? (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.UNSAFE_warning)(locationContext != null, "<Router basename=\\"" + basename + "\\"> is not able to match the URL " + ("\\"" + pathname + search + hash + "\\" because it does not start with the ") + "basename, so the <Router> won\'t render anything.") : 0;\n if (locationContext == null) {\n return null;\n }\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(NavigationContext.Provider, {\n value: navigationContext\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(LocationContext.Provider, {\n children: children,\n value: locationContext\n }));\n}\n/**\n * A container for a nested tree of `<Route>` elements that renders the branch\n * that best matches the current location.\n *\n * @see https://reactrouter.com/components/routes\n */\nfunction Routes(_ref6) {\n let {\n children,\n location\n } = _ref6;\n return useRoutes(createRoutesFromChildren(children), location);\n}\n/**\n * Component to use for rendering lazily loaded data from returning defer()\n * in a loader function\n */\nfunction Await(_ref7) {\n let {\n children,\n errorElement,\n resolve\n } = _ref7;\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(AwaitErrorBoundary, {\n resolve: resolve,\n errorElement: errorElement\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(ResolveAwait, null, children));\n}\nvar AwaitRenderStatus = /*#__PURE__*/function (AwaitRenderStatus) {\n AwaitRenderStatus[AwaitRenderStatus["pending"] = 0] = "pending";\n AwaitRenderStatus[AwaitRenderStatus["success"] = 1] = "success";\n AwaitRenderStatus[AwaitRenderStatus["error"] = 2] = "error";\n return AwaitRenderStatus;\n}(AwaitRenderStatus || {});\nconst neverSettledPromise = new Promise(() => {});\nclass AwaitErrorBoundary extends react__WEBPACK_IMPORTED_MODULE_0__.Component {\n constructor(props) {\n super(props);\n this.state = {\n error: null\n };\n }\n static getDerivedStateFromError(error) {\n return {\n error\n };\n }\n componentDidCatch(error, errorInfo) {\n console.error("<Await> caught the following error during render", error, errorInfo);\n }\n render() {\n let {\n children,\n errorElement,\n resolve\n } = this.props;\n let promise = null;\n let status = AwaitRenderStatus.pending;\n if (!(resolve instanceof Promise)) {\n // Didn\'t get a promise - provide as a resolved promise\n status = AwaitRenderStatus.success;\n promise = Promise.resolve();\n Object.defineProperty(promise, "_tracked", {\n get: () => true\n });\n Object.defineProperty(promise, "_data", {\n get: () => resolve\n });\n } else if (this.state.error) {\n // Caught a render error, provide it as a rejected promise\n status = AwaitRenderStatus.error;\n let renderError = this.state.error;\n promise = Promise.reject().catch(() => {}); // Avoid unhandled rejection warnings\n Object.defineProperty(promise, "_tracked", {\n get: () => true\n });\n Object.defineProperty(promise, "_error", {\n get: () => renderError\n });\n } else if (resolve._tracked) {\n // Already tracked promise - check contents\n promise = resolve;\n status = "_error" in promise ? AwaitRenderStatus.error : "_data" in promise ? AwaitRenderStatus.success : AwaitRenderStatus.pending;\n } else {\n // Raw (untracked) promise - track it\n status = AwaitRenderStatus.pending;\n Object.defineProperty(resolve, "_tracked", {\n get: () => true\n });\n promise = resolve.then(data => Object.defineProperty(resolve, "_data", {\n get: () => data\n }), error => Object.defineProperty(resolve, "_error", {\n get: () => error\n }));\n }\n if (status === AwaitRenderStatus.error && promise._error instanceof _remix_run_router__WEBPACK_IMPORTED_MODULE_1__.AbortedDeferredError) {\n // Freeze the UI by throwing a never resolved promise\n throw neverSettledPromise;\n }\n if (status === AwaitRenderStatus.error && !errorElement) {\n // No errorElement, throw to the nearest route-level error boundary\n throw promise._error;\n }\n if (status === AwaitRenderStatus.error) {\n // Render via our errorElement\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(AwaitContext.Provider, {\n value: promise,\n children: errorElement\n });\n }\n if (status === AwaitRenderStatus.success) {\n // Render children with resolved value\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(AwaitContext.Provider, {\n value: promise,\n children: children\n });\n }\n\n // Throw to the suspense boundary\n throw promise;\n }\n}\n\n/**\n * @private\n * Indirection to leverage useAsyncValue for a render-prop API on `<Await>`\n */\nfunction ResolveAwait(_ref8) {\n let {\n children\n } = _ref8;\n let data = useAsyncValue();\n let toRender = typeof children === "function" ? children(data) : children;\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, toRender);\n}\n\n///////////////////////////////////////////////////////////////////////////////\n// UTILS\n///////////////////////////////////////////////////////////////////////////////\n\n/**\n * Creates a route config from a React "children" object, which is usually\n * either a `<Route>` element or an array of them. Used internally by\n * `<Routes>` to create a route config from its children.\n *\n * @see https://reactrouter.com/utils/create-routes-from-children\n */\nfunction createRoutesFromChildren(children, parentPath) {\n if (parentPath === void 0) {\n parentPath = [];\n }\n let routes = [];\n react__WEBPACK_IMPORTED_MODULE_0__.Children.forEach(children, (element, index) => {\n if (! /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.isValidElement(element)) {\n // Ignore non-elements. This allows people to more easily inline\n // conditionals in their route config.\n return;\n }\n let treePath = [...parentPath, index];\n if (element.type === react__WEBPACK_IMPORTED_MODULE_0__.Fragment) {\n // Transparently support React.Fragment and its children.\n routes.push.apply(routes, createRoutesFromChildren(element.props.children, treePath));\n return;\n }\n !(element.type === Route) ? true ? (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.UNSAFE_invariant)(false, "[" + (typeof element.type === "string" ? element.type : element.type.name) + "] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>") : 0 : void 0;\n !(!element.props.index || !element.props.children) ? true ? (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.UNSAFE_invariant)(false, "An index route cannot have child routes.") : 0 : void 0;\n let route = {\n id: element.props.id || treePath.join("-"),\n caseSensitive: element.props.caseSensitive,\n element: element.props.element,\n Component: element.props.Component,\n index: element.props.index,\n path: element.props.path,\n loader: element.props.loader,\n action: element.props.action,\n errorElement: element.props.errorElement,\n ErrorBoundary: element.props.ErrorBoundary,\n hasErrorBoundary: element.props.ErrorBoundary != null || element.props.errorElement != null,\n shouldRevalidate: element.props.shouldRevalidate,\n handle: element.props.handle,\n lazy: element.props.lazy\n };\n if (element.props.children) {\n route.children = createRoutesFromChildren(element.props.children, treePath);\n }\n routes.push(route);\n });\n return routes;\n}\n\n/**\n * Renders the result of `matchRoutes()` into a React element.\n */\nfunction renderMatches(matches) {\n return _renderMatches(matches);\n}\n\nfunction mapRouteProperties(route) {\n let updates = {\n // Note: this check also occurs in createRoutesFromChildren so update\n // there if you change this -- please and thank you!\n hasErrorBoundary: route.ErrorBoundary != null || route.errorElement != null\n };\n if (route.Component) {\n if (true) {\n if (route.element) {\n true ? (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.UNSAFE_warning)(false, "You should not include both `Component` and `element` on your route - " + "`Component` will be used.") : 0;\n }\n }\n Object.assign(updates, {\n element: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(route.Component),\n Component: undefined\n });\n }\n if (route.HydrateFallback) {\n if (true) {\n if (route.hydrateFallbackElement) {\n true ? (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.UNSAFE_warning)(false, "You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - " + "`HydrateFallback` will be used.") : 0;\n }\n }\n Object.assign(updates, {\n hydrateFallbackElement: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(route.HydrateFallback),\n HydrateFallback: undefined\n });\n }\n if (route.ErrorBoundary) {\n if (true) {\n if (route.errorElement) {\n true ? (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.UNSAFE_warning)(false, "You should not include both `ErrorBoundary` and `errorElement` on your route - " + "`ErrorBoundary` will be used.") : 0;\n }\n }\n Object.assign(updates, {\n errorElement: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(route.ErrorBoundary),\n ErrorBoundary: undefined\n });\n }\n return updates;\n}\nfunction createMemoryRouter(routes, opts) {\n return (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.createRouter)({\n basename: opts == null ? void 0 : opts.basename,\n future: _extends({}, opts == null ? void 0 : opts.future, {\n v7_prependBasename: true\n }),\n history: (0,_remix_run_router__WEBPACK_IMPORTED_MODULE_1__.createMemoryHistory)({\n initialEntries: opts == null ? void 0 : opts.initialEntries,\n initialIndex: opts == null ? void 0 : opts.initialIndex\n }),\n hydrationData: opts == null ? void 0 : opts.hydrationData,\n routes,\n mapRouteProperties,\n unstable_dataStrategy: opts == null ? void 0 : opts.unstable_dataStrategy,\n unstable_patchRoutesOnMiss: opts == null ? void 0 : opts.unstable_patchRoutesOnMiss\n }).initialize();\n}\n\n\n//# sourceMappingURL=index.js.map\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/react-router/dist/index.js?', + ); + + /***/ + }, + + /***/ 2098: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + 'use strict'; + eval( + "\n\nfunction _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }\n\nvar React = __webpack_require__(6540);\nvar React__default = _interopDefault(React);\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n}\n\nvar canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);\nfunction withSideEffect(reducePropsToState, handleStateChangeOnClient, mapStateOnServer) {\n if (typeof reducePropsToState !== 'function') {\n throw new Error('Expected reducePropsToState to be a function.');\n }\n\n if (typeof handleStateChangeOnClient !== 'function') {\n throw new Error('Expected handleStateChangeOnClient to be a function.');\n }\n\n if (typeof mapStateOnServer !== 'undefined' && typeof mapStateOnServer !== 'function') {\n throw new Error('Expected mapStateOnServer to either be undefined or a function.');\n }\n\n function getDisplayName(WrappedComponent) {\n return WrappedComponent.displayName || WrappedComponent.name || 'Component';\n }\n\n return function wrap(WrappedComponent) {\n if (typeof WrappedComponent !== 'function') {\n throw new Error('Expected WrappedComponent to be a React component.');\n }\n\n var mountedInstances = [];\n var state;\n\n function emitChange() {\n state = reducePropsToState(mountedInstances.map(function (instance) {\n return instance.props;\n }));\n\n if (SideEffect.canUseDOM) {\n handleStateChangeOnClient(state);\n } else if (mapStateOnServer) {\n state = mapStateOnServer(state);\n }\n }\n\n var SideEffect =\n /*#__PURE__*/\n function (_PureComponent) {\n _inheritsLoose(SideEffect, _PureComponent);\n\n function SideEffect() {\n return _PureComponent.apply(this, arguments) || this;\n }\n\n // Try to use displayName of wrapped component\n // Expose canUseDOM so tests can monkeypatch it\n SideEffect.peek = function peek() {\n return state;\n };\n\n SideEffect.rewind = function rewind() {\n if (SideEffect.canUseDOM) {\n throw new Error('You may only call rewind() on the server. Call peek() to read the current state.');\n }\n\n var recordedState = state;\n state = undefined;\n mountedInstances = [];\n return recordedState;\n };\n\n var _proto = SideEffect.prototype;\n\n _proto.UNSAFE_componentWillMount = function UNSAFE_componentWillMount() {\n mountedInstances.push(this);\n emitChange();\n };\n\n _proto.componentDidUpdate = function componentDidUpdate() {\n emitChange();\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n var index = mountedInstances.indexOf(this);\n mountedInstances.splice(index, 1);\n emitChange();\n };\n\n _proto.render = function render() {\n return React__default.createElement(WrappedComponent, this.props);\n };\n\n return SideEffect;\n }(React.PureComponent);\n\n _defineProperty(SideEffect, \"displayName\", \"SideEffect(\" + getDisplayName(WrappedComponent) + \")\");\n\n _defineProperty(SideEffect, \"canUseDOM\", canUseDOM);\n\n return SideEffect;\n };\n}\n\nmodule.exports = withSideEffect;\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/react-side-effect/lib/index.js?", + ); + + /***/ + }, + + /***/ 4837: /***/ (module, exports, __webpack_require__) => { + 'use strict'; + eval( + "/* module decorator */ module = __webpack_require__.nmd(module);\n/**\n * @license React\n * react.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\nif (true) {\n (function() {\n\n 'use strict';\n\n/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\nif (\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart ===\n 'function'\n) {\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());\n}\n var ReactVersion = '18.3.1';\n\n// ATTENTION\n// When adding new symbols to this file,\n// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'\n// The Symbol used to tag the ReactElement-like types.\nvar REACT_ELEMENT_TYPE = Symbol.for('react.element');\nvar REACT_PORTAL_TYPE = Symbol.for('react.portal');\nvar REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');\nvar REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');\nvar REACT_PROFILER_TYPE = Symbol.for('react.profiler');\nvar REACT_PROVIDER_TYPE = Symbol.for('react.provider');\nvar REACT_CONTEXT_TYPE = Symbol.for('react.context');\nvar REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');\nvar REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');\nvar REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');\nvar REACT_MEMO_TYPE = Symbol.for('react.memo');\nvar REACT_LAZY_TYPE = Symbol.for('react.lazy');\nvar REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');\nvar MAYBE_ITERATOR_SYMBOL = Symbol.iterator;\nvar FAUX_ITERATOR_SYMBOL = '@@iterator';\nfunction getIteratorFn(maybeIterable) {\n if (maybeIterable === null || typeof maybeIterable !== 'object') {\n return null;\n }\n\n var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];\n\n if (typeof maybeIterator === 'function') {\n return maybeIterator;\n }\n\n return null;\n}\n\n/**\n * Keeps track of the current dispatcher.\n */\nvar ReactCurrentDispatcher = {\n /**\n * @internal\n * @type {ReactComponent}\n */\n current: null\n};\n\n/**\n * Keeps track of the current batch's configuration such as how long an update\n * should suspend for if it needs to.\n */\nvar ReactCurrentBatchConfig = {\n transition: null\n};\n\nvar ReactCurrentActQueue = {\n current: null,\n // Used to reproduce behavior of `batchedUpdates` in legacy mode.\n isBatchingLegacy: false,\n didScheduleLegacyUpdate: false\n};\n\n/**\n * Keeps track of the current owner.\n *\n * The current owner is the component who should own any components that are\n * currently being constructed.\n */\nvar ReactCurrentOwner = {\n /**\n * @internal\n * @type {ReactComponent}\n */\n current: null\n};\n\nvar ReactDebugCurrentFrame = {};\nvar currentExtraStackFrame = null;\nfunction setExtraStackFrame(stack) {\n {\n currentExtraStackFrame = stack;\n }\n}\n\n{\n ReactDebugCurrentFrame.setExtraStackFrame = function (stack) {\n {\n currentExtraStackFrame = stack;\n }\n }; // Stack implementation injected by the current renderer.\n\n\n ReactDebugCurrentFrame.getCurrentStack = null;\n\n ReactDebugCurrentFrame.getStackAddendum = function () {\n var stack = ''; // Add an extra top frame while an element is being validated\n\n if (currentExtraStackFrame) {\n stack += currentExtraStackFrame;\n } // Delegate to the injected renderer-specific implementation\n\n\n var impl = ReactDebugCurrentFrame.getCurrentStack;\n\n if (impl) {\n stack += impl() || '';\n }\n\n return stack;\n };\n}\n\n// -----------------------------------------------------------------------------\n\nvar enableScopeAPI = false; // Experimental Create Event Handle API.\nvar enableCacheElement = false;\nvar enableTransitionTracing = false; // No known bugs, but needs performance testing\n\nvar enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber\n// stuff. Intended to enable React core members to more easily debug scheduling\n// issues in DEV builds.\n\nvar enableDebugTracing = false; // Track which Fiber(s) schedule render work.\n\nvar ReactSharedInternals = {\n ReactCurrentDispatcher: ReactCurrentDispatcher,\n ReactCurrentBatchConfig: ReactCurrentBatchConfig,\n ReactCurrentOwner: ReactCurrentOwner\n};\n\n{\n ReactSharedInternals.ReactDebugCurrentFrame = ReactDebugCurrentFrame;\n ReactSharedInternals.ReactCurrentActQueue = ReactCurrentActQueue;\n}\n\n// by calls to these methods by a Babel plugin.\n//\n// In PROD (or in packages without access to React internals),\n// they are left as they are instead.\n\nfunction warn(format) {\n {\n {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n printWarning('warn', format, args);\n }\n }\n}\nfunction error(format) {\n {\n {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n printWarning('error', format, args);\n }\n }\n}\n\nfunction printWarning(level, format, args) {\n // When changing this logic, you might want to also\n // update consoleWithStackDev.www.js as well.\n {\n var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n var stack = ReactDebugCurrentFrame.getStackAddendum();\n\n if (stack !== '') {\n format += '%s';\n args = args.concat([stack]);\n } // eslint-disable-next-line react-internal/safe-string-coercion\n\n\n var argsWithFormat = args.map(function (item) {\n return String(item);\n }); // Careful: RN currently depends on this prefix\n\n argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it\n // breaks IE9: https://github.com/facebook/react/issues/13610\n // eslint-disable-next-line react-internal/no-production-logging\n\n Function.prototype.apply.call(console[level], console, argsWithFormat);\n }\n}\n\nvar didWarnStateUpdateForUnmountedComponent = {};\n\nfunction warnNoop(publicInstance, callerName) {\n {\n var _constructor = publicInstance.constructor;\n var componentName = _constructor && (_constructor.displayName || _constructor.name) || 'ReactClass';\n var warningKey = componentName + \".\" + callerName;\n\n if (didWarnStateUpdateForUnmountedComponent[warningKey]) {\n return;\n }\n\n error(\"Can't call %s on a component that is not yet mounted. \" + 'This is a no-op, but it might indicate a bug in your application. ' + 'Instead, assign to `this.state` directly or define a `state = {};` ' + 'class property with the desired state in the %s component.', callerName, componentName);\n\n didWarnStateUpdateForUnmountedComponent[warningKey] = true;\n }\n}\n/**\n * This is the abstract API for an update queue.\n */\n\n\nvar ReactNoopUpdateQueue = {\n /**\n * Checks whether or not this composite component is mounted.\n * @param {ReactClass} publicInstance The instance we want to test.\n * @return {boolean} True if mounted, false otherwise.\n * @protected\n * @final\n */\n isMounted: function (publicInstance) {\n return false;\n },\n\n /**\n * Forces an update. This should only be invoked when it is known with\n * certainty that we are **not** in a DOM transaction.\n *\n * You may want to call this when you know that some deeper aspect of the\n * component's state has changed but `setState` was not called.\n *\n * This will not invoke `shouldComponentUpdate`, but it will invoke\n * `componentWillUpdate` and `componentDidUpdate`.\n *\n * @param {ReactClass} publicInstance The instance that should rerender.\n * @param {?function} callback Called after component is updated.\n * @param {?string} callerName name of the calling function in the public API.\n * @internal\n */\n enqueueForceUpdate: function (publicInstance, callback, callerName) {\n warnNoop(publicInstance, 'forceUpdate');\n },\n\n /**\n * Replaces all of the state. Always use this or `setState` to mutate state.\n * You should treat `this.state` as immutable.\n *\n * There is no guarantee that `this.state` will be immediately updated, so\n * accessing `this.state` after calling this method may return the old value.\n *\n * @param {ReactClass} publicInstance The instance that should rerender.\n * @param {object} completeState Next state.\n * @param {?function} callback Called after component is updated.\n * @param {?string} callerName name of the calling function in the public API.\n * @internal\n */\n enqueueReplaceState: function (publicInstance, completeState, callback, callerName) {\n warnNoop(publicInstance, 'replaceState');\n },\n\n /**\n * Sets a subset of the state. This only exists because _pendingState is\n * internal. This provides a merging strategy that is not available to deep\n * properties which is confusing. TODO: Expose pendingState or don't use it\n * during the merge.\n *\n * @param {ReactClass} publicInstance The instance that should rerender.\n * @param {object} partialState Next partial state to be merged with state.\n * @param {?function} callback Called after component is updated.\n * @param {?string} Name of the calling function in the public API.\n * @internal\n */\n enqueueSetState: function (publicInstance, partialState, callback, callerName) {\n warnNoop(publicInstance, 'setState');\n }\n};\n\nvar assign = Object.assign;\n\nvar emptyObject = {};\n\n{\n Object.freeze(emptyObject);\n}\n/**\n * Base class helpers for the updating state of a component.\n */\n\n\nfunction Component(props, context, updater) {\n this.props = props;\n this.context = context; // If a component has string refs, we will assign a different object later.\n\n this.refs = emptyObject; // We initialize the default updater but the real one gets injected by the\n // renderer.\n\n this.updater = updater || ReactNoopUpdateQueue;\n}\n\nComponent.prototype.isReactComponent = {};\n/**\n * Sets a subset of the state. Always use this to mutate\n * state. You should treat `this.state` as immutable.\n *\n * There is no guarantee that `this.state` will be immediately updated, so\n * accessing `this.state` after calling this method may return the old value.\n *\n * There is no guarantee that calls to `setState` will run synchronously,\n * as they may eventually be batched together. You can provide an optional\n * callback that will be executed when the call to setState is actually\n * completed.\n *\n * When a function is provided to setState, it will be called at some point in\n * the future (not synchronously). It will be called with the up to date\n * component arguments (state, props, context). These values can be different\n * from this.* because your function may be called after receiveProps but before\n * shouldComponentUpdate, and this new state, props, and context will not yet be\n * assigned to this.\n *\n * @param {object|function} partialState Next partial state or function to\n * produce next partial state to be merged with current state.\n * @param {?function} callback Called after state is updated.\n * @final\n * @protected\n */\n\nComponent.prototype.setState = function (partialState, callback) {\n if (typeof partialState !== 'object' && typeof partialState !== 'function' && partialState != null) {\n throw new Error('setState(...): takes an object of state variables to update or a ' + 'function which returns an object of state variables.');\n }\n\n this.updater.enqueueSetState(this, partialState, callback, 'setState');\n};\n/**\n * Forces an update. This should only be invoked when it is known with\n * certainty that we are **not** in a DOM transaction.\n *\n * You may want to call this when you know that some deeper aspect of the\n * component's state has changed but `setState` was not called.\n *\n * This will not invoke `shouldComponentUpdate`, but it will invoke\n * `componentWillUpdate` and `componentDidUpdate`.\n *\n * @param {?function} callback Called after update is complete.\n * @final\n * @protected\n */\n\n\nComponent.prototype.forceUpdate = function (callback) {\n this.updater.enqueueForceUpdate(this, callback, 'forceUpdate');\n};\n/**\n * Deprecated APIs. These APIs used to exist on classic React classes but since\n * we would like to deprecate them, we're not going to move them over to this\n * modern base class. Instead, we define a getter that warns if it's accessed.\n */\n\n\n{\n var deprecatedAPIs = {\n isMounted: ['isMounted', 'Instead, make sure to clean up subscriptions and pending requests in ' + 'componentWillUnmount to prevent memory leaks.'],\n replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).']\n };\n\n var defineDeprecationWarning = function (methodName, info) {\n Object.defineProperty(Component.prototype, methodName, {\n get: function () {\n warn('%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]);\n\n return undefined;\n }\n });\n };\n\n for (var fnName in deprecatedAPIs) {\n if (deprecatedAPIs.hasOwnProperty(fnName)) {\n defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);\n }\n }\n}\n\nfunction ComponentDummy() {}\n\nComponentDummy.prototype = Component.prototype;\n/**\n * Convenience component with default shallow equality check for sCU.\n */\n\nfunction PureComponent(props, context, updater) {\n this.props = props;\n this.context = context; // If a component has string refs, we will assign a different object later.\n\n this.refs = emptyObject;\n this.updater = updater || ReactNoopUpdateQueue;\n}\n\nvar pureComponentPrototype = PureComponent.prototype = new ComponentDummy();\npureComponentPrototype.constructor = PureComponent; // Avoid an extra prototype jump for these methods.\n\nassign(pureComponentPrototype, Component.prototype);\npureComponentPrototype.isPureReactComponent = true;\n\n// an immutable object with a single mutable value\nfunction createRef() {\n var refObject = {\n current: null\n };\n\n {\n Object.seal(refObject);\n }\n\n return refObject;\n}\n\nvar isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare\n\nfunction isArray(a) {\n return isArrayImpl(a);\n}\n\n/*\n * The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol\n * and Temporal.* types. See https://github.com/facebook/react/pull/22064.\n *\n * The functions in this module will throw an easier-to-understand,\n * easier-to-debug exception with a clear errors message message explaining the\n * problem. (Instead of a confusing exception thrown inside the implementation\n * of the `value` object).\n */\n// $FlowFixMe only called in DEV, so void return is not possible.\nfunction typeName(value) {\n {\n // toStringTag is needed for namespaced types like Temporal.Instant\n var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;\n var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object';\n return type;\n }\n} // $FlowFixMe only called in DEV, so void return is not possible.\n\n\nfunction willCoercionThrow(value) {\n {\n try {\n testStringCoercion(value);\n return false;\n } catch (e) {\n return true;\n }\n }\n}\n\nfunction testStringCoercion(value) {\n // If you ended up here by following an exception call stack, here's what's\n // happened: you supplied an object or symbol value to React (as a prop, key,\n // DOM attribute, CSS property, string ref, etc.) and when React tried to\n // coerce it to a string using `'' + value`, an exception was thrown.\n //\n // The most common types that will cause this exception are `Symbol` instances\n // and Temporal objects like `Temporal.Instant`. But any object that has a\n // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this\n // exception. (Library authors do this to prevent users from using built-in\n // numeric operators like `+` or comparison operators like `>=` because custom\n // methods are needed to perform accurate arithmetic or comparison.)\n //\n // To fix the problem, coerce this object or symbol value to a string before\n // passing it to React. The most reliable way is usually `String(value)`.\n //\n // To find which value is throwing, check the browser or debugger console.\n // Before this exception was thrown, there should be `console.error` output\n // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the\n // problem and how that type was used: key, atrribute, input value prop, etc.\n // In most cases, this console output also shows the component and its\n // ancestor components where the exception happened.\n //\n // eslint-disable-next-line react-internal/safe-string-coercion\n return '' + value;\n}\nfunction checkKeyStringCoercion(value) {\n {\n if (willCoercionThrow(value)) {\n error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));\n\n return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n }\n }\n}\n\nfunction getWrappedName(outerType, innerType, wrapperName) {\n var displayName = outerType.displayName;\n\n if (displayName) {\n return displayName;\n }\n\n var functionName = innerType.displayName || innerType.name || '';\n return functionName !== '' ? wrapperName + \"(\" + functionName + \")\" : wrapperName;\n} // Keep in sync with react-reconciler/getComponentNameFromFiber\n\n\nfunction getContextName(type) {\n return type.displayName || 'Context';\n} // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead.\n\n\nfunction getComponentNameFromType(type) {\n if (type == null) {\n // Host root, text node or just invalid type.\n return null;\n }\n\n {\n if (typeof type.tag === 'number') {\n error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.');\n }\n }\n\n if (typeof type === 'function') {\n return type.displayName || type.name || null;\n }\n\n if (typeof type === 'string') {\n return type;\n }\n\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return 'Fragment';\n\n case REACT_PORTAL_TYPE:\n return 'Portal';\n\n case REACT_PROFILER_TYPE:\n return 'Profiler';\n\n case REACT_STRICT_MODE_TYPE:\n return 'StrictMode';\n\n case REACT_SUSPENSE_TYPE:\n return 'Suspense';\n\n case REACT_SUSPENSE_LIST_TYPE:\n return 'SuspenseList';\n\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_CONTEXT_TYPE:\n var context = type;\n return getContextName(context) + '.Consumer';\n\n case REACT_PROVIDER_TYPE:\n var provider = type;\n return getContextName(provider._context) + '.Provider';\n\n case REACT_FORWARD_REF_TYPE:\n return getWrappedName(type, type.render, 'ForwardRef');\n\n case REACT_MEMO_TYPE:\n var outerName = type.displayName || null;\n\n if (outerName !== null) {\n return outerName;\n }\n\n return getComponentNameFromType(type.type) || 'Memo';\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n return getComponentNameFromType(init(payload));\n } catch (x) {\n return null;\n }\n }\n\n // eslint-disable-next-line no-fallthrough\n }\n }\n\n return null;\n}\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nvar RESERVED_PROPS = {\n key: true,\n ref: true,\n __self: true,\n __source: true\n};\nvar specialPropKeyWarningShown, specialPropRefWarningShown, didWarnAboutStringRefs;\n\n{\n didWarnAboutStringRefs = {};\n}\n\nfunction hasValidRef(config) {\n {\n if (hasOwnProperty.call(config, 'ref')) {\n var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;\n\n if (getter && getter.isReactWarning) {\n return false;\n }\n }\n }\n\n return config.ref !== undefined;\n}\n\nfunction hasValidKey(config) {\n {\n if (hasOwnProperty.call(config, 'key')) {\n var getter = Object.getOwnPropertyDescriptor(config, 'key').get;\n\n if (getter && getter.isReactWarning) {\n return false;\n }\n }\n }\n\n return config.key !== undefined;\n}\n\nfunction defineKeyPropWarningGetter(props, displayName) {\n var warnAboutAccessingKey = function () {\n {\n if (!specialPropKeyWarningShown) {\n specialPropKeyWarningShown = true;\n\n error('%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);\n }\n }\n };\n\n warnAboutAccessingKey.isReactWarning = true;\n Object.defineProperty(props, 'key', {\n get: warnAboutAccessingKey,\n configurable: true\n });\n}\n\nfunction defineRefPropWarningGetter(props, displayName) {\n var warnAboutAccessingRef = function () {\n {\n if (!specialPropRefWarningShown) {\n specialPropRefWarningShown = true;\n\n error('%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);\n }\n }\n };\n\n warnAboutAccessingRef.isReactWarning = true;\n Object.defineProperty(props, 'ref', {\n get: warnAboutAccessingRef,\n configurable: true\n });\n}\n\nfunction warnIfStringRefCannotBeAutoConverted(config) {\n {\n if (typeof config.ref === 'string' && ReactCurrentOwner.current && config.__self && ReactCurrentOwner.current.stateNode !== config.__self) {\n var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);\n\n if (!didWarnAboutStringRefs[componentName]) {\n error('Component \"%s\" contains the string ref \"%s\". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', componentName, config.ref);\n\n didWarnAboutStringRefs[componentName] = true;\n }\n }\n }\n}\n/**\n * Factory method to create a new React element. This no longer adheres to\n * the class pattern, so do not use new to call it. Also, instanceof check\n * will not work. Instead test $$typeof field against Symbol.for('react.element') to check\n * if something is a React Element.\n *\n * @param {*} type\n * @param {*} props\n * @param {*} key\n * @param {string|object} ref\n * @param {*} owner\n * @param {*} self A *temporary* helper to detect places where `this` is\n * different from the `owner` when React.createElement is called, so that we\n * can warn. We want to get rid of owner and replace string `ref`s with arrow\n * functions, and as long as `this` and owner are the same, there will be no\n * change in behavior.\n * @param {*} source An annotation object (added by a transpiler or otherwise)\n * indicating filename, line number, and/or other information.\n * @internal\n */\n\n\nvar ReactElement = function (type, key, ref, self, source, owner, props) {\n var element = {\n // This tag allows us to uniquely identify this as a React Element\n $$typeof: REACT_ELEMENT_TYPE,\n // Built-in properties that belong on the element\n type: type,\n key: key,\n ref: ref,\n props: props,\n // Record the component responsible for creating this element.\n _owner: owner\n };\n\n {\n // The validation flag is currently mutative. We put it on\n // an external backing store so that we can freeze the whole object.\n // This can be replaced with a WeakMap once they are implemented in\n // commonly used development environments.\n element._store = {}; // To make comparing ReactElements easier for testing purposes, we make\n // the validation flag non-enumerable (where possible, which should\n // include every environment we run tests in), so the test framework\n // ignores it.\n\n Object.defineProperty(element._store, 'validated', {\n configurable: false,\n enumerable: false,\n writable: true,\n value: false\n }); // self and source are DEV only properties.\n\n Object.defineProperty(element, '_self', {\n configurable: false,\n enumerable: false,\n writable: false,\n value: self\n }); // Two elements created in two different places should be considered\n // equal for testing purposes and therefore we hide it from enumeration.\n\n Object.defineProperty(element, '_source', {\n configurable: false,\n enumerable: false,\n writable: false,\n value: source\n });\n\n if (Object.freeze) {\n Object.freeze(element.props);\n Object.freeze(element);\n }\n }\n\n return element;\n};\n/**\n * Create and return a new ReactElement of the given type.\n * See https://reactjs.org/docs/react-api.html#createelement\n */\n\nfunction createElement(type, config, children) {\n var propName; // Reserved names are extracted\n\n var props = {};\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n\n {\n warnIfStringRefCannotBeAutoConverted(config);\n }\n }\n\n if (hasValidKey(config)) {\n {\n checkKeyStringCoercion(config.key);\n }\n\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source; // Remaining properties are added to a new props object\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n\n props.children = childArray;\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n {\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}\nfunction cloneAndReplaceKey(oldElement, newKey) {\n var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);\n return newElement;\n}\n/**\n * Clone and return a new ReactElement using element as the starting point.\n * See https://reactjs.org/docs/react-api.html#cloneelement\n */\n\nfunction cloneElement(element, config, children) {\n if (element === null || element === undefined) {\n throw new Error(\"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\");\n }\n\n var propName; // Original props are copied\n\n var props = assign({}, element.props); // Reserved names are extracted\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n {\n checkKeyStringCoercion(config.key);\n }\n\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}\n/**\n * Verifies the object is a ReactElement.\n * See https://reactjs.org/docs/react-api.html#isvalidelement\n * @param {?object} object\n * @return {boolean} True if `object` is a ReactElement.\n * @final\n */\n\nfunction isValidElement(object) {\n return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n}\n\nvar SEPARATOR = '.';\nvar SUBSEPARATOR = ':';\n/**\n * Escape and wrap key so it is safe to use as a reactid\n *\n * @param {string} key to be escaped.\n * @return {string} the escaped key.\n */\n\nfunction escape(key) {\n var escapeRegex = /[=:]/g;\n var escaperLookup = {\n '=': '=0',\n ':': '=2'\n };\n var escapedString = key.replace(escapeRegex, function (match) {\n return escaperLookup[match];\n });\n return '$' + escapedString;\n}\n/**\n * TODO: Test that a single child and an array with one item have the same key\n * pattern.\n */\n\n\nvar didWarnAboutMaps = false;\nvar userProvidedKeyEscapeRegex = /\\/+/g;\n\nfunction escapeUserProvidedKey(text) {\n return text.replace(userProvidedKeyEscapeRegex, '$&/');\n}\n/**\n * Generate a key string that identifies a element within a set.\n *\n * @param {*} element A element that could contain a manual key.\n * @param {number} index Index that is used if a manual key is not provided.\n * @return {string}\n */\n\n\nfunction getElementKey(element, index) {\n // Do some typechecking here since we call this blindly. We want to ensure\n // that we don't block potential future ES APIs.\n if (typeof element === 'object' && element !== null && element.key != null) {\n // Explicit key\n {\n checkKeyStringCoercion(element.key);\n }\n\n return escape('' + element.key);\n } // Implicit key determined by the index in the set\n\n\n return index.toString(36);\n}\n\nfunction mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {\n var type = typeof children;\n\n if (type === 'undefined' || type === 'boolean') {\n // All of the above are perceived as null.\n children = null;\n }\n\n var invokeCallback = false;\n\n if (children === null) {\n invokeCallback = true;\n } else {\n switch (type) {\n case 'string':\n case 'number':\n invokeCallback = true;\n break;\n\n case 'object':\n switch (children.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n invokeCallback = true;\n }\n\n }\n }\n\n if (invokeCallback) {\n var _child = children;\n var mappedChild = callback(_child); // If it's the only child, treat the name as if it was wrapped in an array\n // so that it's consistent if the number of children grows:\n\n var childKey = nameSoFar === '' ? SEPARATOR + getElementKey(_child, 0) : nameSoFar;\n\n if (isArray(mappedChild)) {\n var escapedChildKey = '';\n\n if (childKey != null) {\n escapedChildKey = escapeUserProvidedKey(childKey) + '/';\n }\n\n mapIntoArray(mappedChild, array, escapedChildKey, '', function (c) {\n return c;\n });\n } else if (mappedChild != null) {\n if (isValidElement(mappedChild)) {\n {\n // The `if` statement here prevents auto-disabling of the safe\n // coercion ESLint rule, so we must manually disable it below.\n // $FlowFixMe Flow incorrectly thinks React.Portal doesn't have a key\n if (mappedChild.key && (!_child || _child.key !== mappedChild.key)) {\n checkKeyStringCoercion(mappedChild.key);\n }\n }\n\n mappedChild = cloneAndReplaceKey(mappedChild, // Keep both the (mapped) and old keys if they differ, just as\n // traverseAllChildren used to do for objects as children\n escapedPrefix + ( // $FlowFixMe Flow incorrectly thinks React.Portal doesn't have a key\n mappedChild.key && (!_child || _child.key !== mappedChild.key) ? // $FlowFixMe Flow incorrectly thinks existing element's key can be a number\n // eslint-disable-next-line react-internal/safe-string-coercion\n escapeUserProvidedKey('' + mappedChild.key) + '/' : '') + childKey);\n }\n\n array.push(mappedChild);\n }\n\n return 1;\n }\n\n var child;\n var nextName;\n var subtreeCount = 0; // Count of children found in the current subtree.\n\n var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;\n\n if (isArray(children)) {\n for (var i = 0; i < children.length; i++) {\n child = children[i];\n nextName = nextNamePrefix + getElementKey(child, i);\n subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback);\n }\n } else {\n var iteratorFn = getIteratorFn(children);\n\n if (typeof iteratorFn === 'function') {\n var iterableChildren = children;\n\n {\n // Warn about using Maps as children\n if (iteratorFn === iterableChildren.entries) {\n if (!didWarnAboutMaps) {\n warn('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n }\n }\n\n var iterator = iteratorFn.call(iterableChildren);\n var step;\n var ii = 0;\n\n while (!(step = iterator.next()).done) {\n child = step.value;\n nextName = nextNamePrefix + getElementKey(child, ii++);\n subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback);\n }\n } else if (type === 'object') {\n // eslint-disable-next-line react-internal/safe-string-coercion\n var childrenString = String(children);\n throw new Error(\"Objects are not valid as a React child (found: \" + (childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString) + \"). \" + 'If you meant to render a collection of children, use an array ' + 'instead.');\n }\n }\n\n return subtreeCount;\n}\n\n/**\n * Maps children that are typically specified as `props.children`.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrenmap\n *\n * The provided mapFunction(child, index) will be called for each\n * leaf child.\n *\n * @param {?*} children Children tree container.\n * @param {function(*, int)} func The map function.\n * @param {*} context Context for mapFunction.\n * @return {object} Object containing the ordered map of results.\n */\nfunction mapChildren(children, func, context) {\n if (children == null) {\n return children;\n }\n\n var result = [];\n var count = 0;\n mapIntoArray(children, result, '', '', function (child) {\n return func.call(context, child, count++);\n });\n return result;\n}\n/**\n * Count the number of children that are typically specified as\n * `props.children`.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrencount\n *\n * @param {?*} children Children tree container.\n * @return {number} The number of children.\n */\n\n\nfunction countChildren(children) {\n var n = 0;\n mapChildren(children, function () {\n n++; // Don't return anything\n });\n return n;\n}\n\n/**\n * Iterates through children that are typically specified as `props.children`.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrenforeach\n *\n * The provided forEachFunc(child, index) will be called for each\n * leaf child.\n *\n * @param {?*} children Children tree container.\n * @param {function(*, int)} forEachFunc\n * @param {*} forEachContext Context for forEachContext.\n */\nfunction forEachChildren(children, forEachFunc, forEachContext) {\n mapChildren(children, function () {\n forEachFunc.apply(this, arguments); // Don't return anything.\n }, forEachContext);\n}\n/**\n * Flatten a children object (typically specified as `props.children`) and\n * return an array with appropriately re-keyed children.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrentoarray\n */\n\n\nfunction toArray(children) {\n return mapChildren(children, function (child) {\n return child;\n }) || [];\n}\n/**\n * Returns the first child in a collection of children and verifies that there\n * is only one child in the collection.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrenonly\n *\n * The current implementation of this function assumes that a single child gets\n * passed without a wrapper, but the purpose of this helper function is to\n * abstract away the particular structure of children.\n *\n * @param {?object} children Child collection structure.\n * @return {ReactElement} The first and only `ReactElement` contained in the\n * structure.\n */\n\n\nfunction onlyChild(children) {\n if (!isValidElement(children)) {\n throw new Error('React.Children.only expected to receive a single React element child.');\n }\n\n return children;\n}\n\nfunction createContext(defaultValue) {\n // TODO: Second argument used to be an optional `calculateChangedBits`\n // function. Warn to reserve for future use?\n var context = {\n $$typeof: REACT_CONTEXT_TYPE,\n // As a workaround to support multiple concurrent renderers, we categorize\n // some renderers as primary and others as secondary. We only expect\n // there to be two concurrent renderers at most: React Native (primary) and\n // Fabric (secondary); React DOM (primary) and React ART (secondary).\n // Secondary renderers store their context values on separate fields.\n _currentValue: defaultValue,\n _currentValue2: defaultValue,\n // Used to track how many concurrent renderers this context currently\n // supports within in a single renderer. Such as parallel server rendering.\n _threadCount: 0,\n // These are circular\n Provider: null,\n Consumer: null,\n // Add these to use same hidden class in VM as ServerContext\n _defaultValue: null,\n _globalName: null\n };\n context.Provider = {\n $$typeof: REACT_PROVIDER_TYPE,\n _context: context\n };\n var hasWarnedAboutUsingNestedContextConsumers = false;\n var hasWarnedAboutUsingConsumerProvider = false;\n var hasWarnedAboutDisplayNameOnConsumer = false;\n\n {\n // A separate object, but proxies back to the original context object for\n // backwards compatibility. It has a different $$typeof, so we can properly\n // warn for the incorrect usage of Context as a Consumer.\n var Consumer = {\n $$typeof: REACT_CONTEXT_TYPE,\n _context: context\n }; // $FlowFixMe: Flow complains about not setting a value, which is intentional here\n\n Object.defineProperties(Consumer, {\n Provider: {\n get: function () {\n if (!hasWarnedAboutUsingConsumerProvider) {\n hasWarnedAboutUsingConsumerProvider = true;\n\n error('Rendering <Context.Consumer.Provider> is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Provider> instead?');\n }\n\n return context.Provider;\n },\n set: function (_Provider) {\n context.Provider = _Provider;\n }\n },\n _currentValue: {\n get: function () {\n return context._currentValue;\n },\n set: function (_currentValue) {\n context._currentValue = _currentValue;\n }\n },\n _currentValue2: {\n get: function () {\n return context._currentValue2;\n },\n set: function (_currentValue2) {\n context._currentValue2 = _currentValue2;\n }\n },\n _threadCount: {\n get: function () {\n return context._threadCount;\n },\n set: function (_threadCount) {\n context._threadCount = _threadCount;\n }\n },\n Consumer: {\n get: function () {\n if (!hasWarnedAboutUsingNestedContextConsumers) {\n hasWarnedAboutUsingNestedContextConsumers = true;\n\n error('Rendering <Context.Consumer.Consumer> is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Consumer> instead?');\n }\n\n return context.Consumer;\n }\n },\n displayName: {\n get: function () {\n return context.displayName;\n },\n set: function (displayName) {\n if (!hasWarnedAboutDisplayNameOnConsumer) {\n warn('Setting `displayName` on Context.Consumer has no effect. ' + \"You should set it directly on the context with Context.displayName = '%s'.\", displayName);\n\n hasWarnedAboutDisplayNameOnConsumer = true;\n }\n }\n }\n }); // $FlowFixMe: Flow complains about missing properties because it doesn't understand defineProperty\n\n context.Consumer = Consumer;\n }\n\n {\n context._currentRenderer = null;\n context._currentRenderer2 = null;\n }\n\n return context;\n}\n\nvar Uninitialized = -1;\nvar Pending = 0;\nvar Resolved = 1;\nvar Rejected = 2;\n\nfunction lazyInitializer(payload) {\n if (payload._status === Uninitialized) {\n var ctor = payload._result;\n var thenable = ctor(); // Transition to the next state.\n // This might throw either because it's missing or throws. If so, we treat it\n // as still uninitialized and try again next time. Which is the same as what\n // happens if the ctor or any wrappers processing the ctor throws. This might\n // end up fixing it if the resolution was a concurrency bug.\n\n thenable.then(function (moduleObject) {\n if (payload._status === Pending || payload._status === Uninitialized) {\n // Transition to the next state.\n var resolved = payload;\n resolved._status = Resolved;\n resolved._result = moduleObject;\n }\n }, function (error) {\n if (payload._status === Pending || payload._status === Uninitialized) {\n // Transition to the next state.\n var rejected = payload;\n rejected._status = Rejected;\n rejected._result = error;\n }\n });\n\n if (payload._status === Uninitialized) {\n // In case, we're still uninitialized, then we're waiting for the thenable\n // to resolve. Set it as pending in the meantime.\n var pending = payload;\n pending._status = Pending;\n pending._result = thenable;\n }\n }\n\n if (payload._status === Resolved) {\n var moduleObject = payload._result;\n\n {\n if (moduleObject === undefined) {\n error('lazy: Expected the result of a dynamic imp' + 'ort() call. ' + 'Instead received: %s\\n\\nYour code should look like: \\n ' + // Break up imports to avoid accidentally parsing them as dependencies.\n 'const MyComponent = lazy(() => imp' + \"ort('./MyComponent'))\\n\\n\" + 'Did you accidentally put curly braces around the import?', moduleObject);\n }\n }\n\n {\n if (!('default' in moduleObject)) {\n error('lazy: Expected the result of a dynamic imp' + 'ort() call. ' + 'Instead received: %s\\n\\nYour code should look like: \\n ' + // Break up imports to avoid accidentally parsing them as dependencies.\n 'const MyComponent = lazy(() => imp' + \"ort('./MyComponent'))\", moduleObject);\n }\n }\n\n return moduleObject.default;\n } else {\n throw payload._result;\n }\n}\n\nfunction lazy(ctor) {\n var payload = {\n // We use these fields to store the result.\n _status: Uninitialized,\n _result: ctor\n };\n var lazyType = {\n $$typeof: REACT_LAZY_TYPE,\n _payload: payload,\n _init: lazyInitializer\n };\n\n {\n // In production, this would just set it on the object.\n var defaultProps;\n var propTypes; // $FlowFixMe\n\n Object.defineProperties(lazyType, {\n defaultProps: {\n configurable: true,\n get: function () {\n return defaultProps;\n },\n set: function (newDefaultProps) {\n error('React.lazy(...): It is not supported to assign `defaultProps` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.');\n\n defaultProps = newDefaultProps; // Match production behavior more closely:\n // $FlowFixMe\n\n Object.defineProperty(lazyType, 'defaultProps', {\n enumerable: true\n });\n }\n },\n propTypes: {\n configurable: true,\n get: function () {\n return propTypes;\n },\n set: function (newPropTypes) {\n error('React.lazy(...): It is not supported to assign `propTypes` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.');\n\n propTypes = newPropTypes; // Match production behavior more closely:\n // $FlowFixMe\n\n Object.defineProperty(lazyType, 'propTypes', {\n enumerable: true\n });\n }\n }\n });\n }\n\n return lazyType;\n}\n\nfunction forwardRef(render) {\n {\n if (render != null && render.$$typeof === REACT_MEMO_TYPE) {\n error('forwardRef requires a render function but received a `memo` ' + 'component. Instead of forwardRef(memo(...)), use ' + 'memo(forwardRef(...)).');\n } else if (typeof render !== 'function') {\n error('forwardRef requires a render function but was given %s.', render === null ? 'null' : typeof render);\n } else {\n if (render.length !== 0 && render.length !== 2) {\n error('forwardRef render functions accept exactly two parameters: props and ref. %s', render.length === 1 ? 'Did you forget to use the ref parameter?' : 'Any additional parameter will be undefined.');\n }\n }\n\n if (render != null) {\n if (render.defaultProps != null || render.propTypes != null) {\n error('forwardRef render functions do not support propTypes or defaultProps. ' + 'Did you accidentally pass a React component?');\n }\n }\n }\n\n var elementType = {\n $$typeof: REACT_FORWARD_REF_TYPE,\n render: render\n };\n\n {\n var ownName;\n Object.defineProperty(elementType, 'displayName', {\n enumerable: false,\n configurable: true,\n get: function () {\n return ownName;\n },\n set: function (name) {\n ownName = name; // The inner component shouldn't inherit this display name in most cases,\n // because the component may be used elsewhere.\n // But it's nice for anonymous functions to inherit the name,\n // so that our component-stack generation logic will display their frames.\n // An anonymous function generally suggests a pattern like:\n // React.forwardRef((props, ref) => {...});\n // This kind of inner function is not used elsewhere so the side effect is okay.\n\n if (!render.name && !render.displayName) {\n render.displayName = name;\n }\n }\n });\n }\n\n return elementType;\n}\n\nvar REACT_MODULE_REFERENCE;\n\n{\n REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');\n}\n\nfunction isValidElementType(type) {\n if (typeof type === 'string' || typeof type === 'function') {\n return true;\n } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).\n\n\n if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing ) {\n return true;\n }\n\n if (typeof type === 'object' && type !== null) {\n if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object\n // types supported by any Flight configuration anywhere since\n // we don't know which Flight build this will end up being used\n // with.\n type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction memo(type, compare) {\n {\n if (!isValidElementType(type)) {\n error('memo: The first argument must be a component. Instead ' + 'received: %s', type === null ? 'null' : typeof type);\n }\n }\n\n var elementType = {\n $$typeof: REACT_MEMO_TYPE,\n type: type,\n compare: compare === undefined ? null : compare\n };\n\n {\n var ownName;\n Object.defineProperty(elementType, 'displayName', {\n enumerable: false,\n configurable: true,\n get: function () {\n return ownName;\n },\n set: function (name) {\n ownName = name; // The inner component shouldn't inherit this display name in most cases,\n // because the component may be used elsewhere.\n // But it's nice for anonymous functions to inherit the name,\n // so that our component-stack generation logic will display their frames.\n // An anonymous function generally suggests a pattern like:\n // React.memo((props) => {...});\n // This kind of inner function is not used elsewhere so the side effect is okay.\n\n if (!type.name && !type.displayName) {\n type.displayName = name;\n }\n }\n });\n }\n\n return elementType;\n}\n\nfunction resolveDispatcher() {\n var dispatcher = ReactCurrentDispatcher.current;\n\n {\n if (dispatcher === null) {\n error('Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for' + ' one of the following reasons:\\n' + '1. You might have mismatching versions of React and the renderer (such as React DOM)\\n' + '2. You might be breaking the Rules of Hooks\\n' + '3. You might have more than one copy of React in the same app\\n' + 'See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.');\n }\n } // Will result in a null access error if accessed outside render phase. We\n // intentionally don't throw our own error because this is in a hot path.\n // Also helps ensure this is inlined.\n\n\n return dispatcher;\n}\nfunction useContext(Context) {\n var dispatcher = resolveDispatcher();\n\n {\n // TODO: add a more generic warning for invalid values.\n if (Context._context !== undefined) {\n var realContext = Context._context; // Don't deduplicate because this legitimately causes bugs\n // and nobody should be using this in existing code.\n\n if (realContext.Consumer === Context) {\n error('Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be ' + 'removed in a future major release. Did you mean to call useContext(Context) instead?');\n } else if (realContext.Provider === Context) {\n error('Calling useContext(Context.Provider) is not supported. ' + 'Did you mean to call useContext(Context) instead?');\n }\n }\n }\n\n return dispatcher.useContext(Context);\n}\nfunction useState(initialState) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useState(initialState);\n}\nfunction useReducer(reducer, initialArg, init) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useReducer(reducer, initialArg, init);\n}\nfunction useRef(initialValue) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useRef(initialValue);\n}\nfunction useEffect(create, deps) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useEffect(create, deps);\n}\nfunction useInsertionEffect(create, deps) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useInsertionEffect(create, deps);\n}\nfunction useLayoutEffect(create, deps) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useLayoutEffect(create, deps);\n}\nfunction useCallback(callback, deps) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useCallback(callback, deps);\n}\nfunction useMemo(create, deps) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useMemo(create, deps);\n}\nfunction useImperativeHandle(ref, create, deps) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useImperativeHandle(ref, create, deps);\n}\nfunction useDebugValue(value, formatterFn) {\n {\n var dispatcher = resolveDispatcher();\n return dispatcher.useDebugValue(value, formatterFn);\n }\n}\nfunction useTransition() {\n var dispatcher = resolveDispatcher();\n return dispatcher.useTransition();\n}\nfunction useDeferredValue(value) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useDeferredValue(value);\n}\nfunction useId() {\n var dispatcher = resolveDispatcher();\n return dispatcher.useId();\n}\nfunction useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);\n}\n\n// Helpers to patch console.logs to avoid logging during side-effect free\n// replaying on render function. This currently only patches the object\n// lazily which won't cover if the log function was extracted eagerly.\n// We could also eagerly patch the method.\nvar disabledDepth = 0;\nvar prevLog;\nvar prevInfo;\nvar prevWarn;\nvar prevError;\nvar prevGroup;\nvar prevGroupCollapsed;\nvar prevGroupEnd;\n\nfunction disabledLog() {}\n\ndisabledLog.__reactDisabledLog = true;\nfunction disableLogs() {\n {\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n prevLog = console.log;\n prevInfo = console.info;\n prevWarn = console.warn;\n prevError = console.error;\n prevGroup = console.group;\n prevGroupCollapsed = console.groupCollapsed;\n prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099\n\n var props = {\n configurable: true,\n enumerable: true,\n value: disabledLog,\n writable: true\n }; // $FlowFixMe Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n info: props,\n log: props,\n warn: props,\n error: props,\n group: props,\n groupCollapsed: props,\n groupEnd: props\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n disabledDepth++;\n }\n}\nfunction reenableLogs() {\n {\n disabledDepth--;\n\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n var props = {\n configurable: true,\n enumerable: true,\n writable: true\n }; // $FlowFixMe Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n log: assign({}, props, {\n value: prevLog\n }),\n info: assign({}, props, {\n value: prevInfo\n }),\n warn: assign({}, props, {\n value: prevWarn\n }),\n error: assign({}, props, {\n value: prevError\n }),\n group: assign({}, props, {\n value: prevGroup\n }),\n groupCollapsed: assign({}, props, {\n value: prevGroupCollapsed\n }),\n groupEnd: assign({}, props, {\n value: prevGroupEnd\n })\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n if (disabledDepth < 0) {\n error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');\n }\n }\n}\n\nvar ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher;\nvar prefix;\nfunction describeBuiltInComponentFrame(name, source, ownerFn) {\n {\n if (prefix === undefined) {\n // Extract the VM specific prefix used by each line.\n try {\n throw Error();\n } catch (x) {\n var match = x.stack.trim().match(/\\n( *(at )?)/);\n prefix = match && match[1] || '';\n }\n } // We use the prefix to ensure our stacks line up with native stack frames.\n\n\n return '\\n' + prefix + name;\n }\n}\nvar reentry = false;\nvar componentFrameCache;\n\n{\n var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;\n componentFrameCache = new PossiblyWeakMap();\n}\n\nfunction describeNativeComponentFrame(fn, construct) {\n // If something asked for a stack inside a fake render, it should get ignored.\n if ( !fn || reentry) {\n return '';\n }\n\n {\n var frame = componentFrameCache.get(fn);\n\n if (frame !== undefined) {\n return frame;\n }\n }\n\n var control;\n reentry = true;\n var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.\n\n Error.prepareStackTrace = undefined;\n var previousDispatcher;\n\n {\n previousDispatcher = ReactCurrentDispatcher$1.current; // Set the dispatcher in DEV because this might be call in the render function\n // for warnings.\n\n ReactCurrentDispatcher$1.current = null;\n disableLogs();\n }\n\n try {\n // This should throw.\n if (construct) {\n // Something should be setting the props in the constructor.\n var Fake = function () {\n throw Error();\n }; // $FlowFixMe\n\n\n Object.defineProperty(Fake.prototype, 'props', {\n set: function () {\n // We use a throwing setter instead of frozen or non-writable props\n // because that won't throw in a non-strict mode function.\n throw Error();\n }\n });\n\n if (typeof Reflect === 'object' && Reflect.construct) {\n // We construct a different control for this case to include any extra\n // frames added by the construct call.\n try {\n Reflect.construct(Fake, []);\n } catch (x) {\n control = x;\n }\n\n Reflect.construct(fn, [], Fake);\n } else {\n try {\n Fake.call();\n } catch (x) {\n control = x;\n }\n\n fn.call(Fake.prototype);\n }\n } else {\n try {\n throw Error();\n } catch (x) {\n control = x;\n }\n\n fn();\n }\n } catch (sample) {\n // This is inlined manually because closure doesn't do it for us.\n if (sample && control && typeof sample.stack === 'string') {\n // This extracts the first frame from the sample that isn't also in the control.\n // Skipping one frame that we assume is the frame that calls the two.\n var sampleLines = sample.stack.split('\\n');\n var controlLines = control.stack.split('\\n');\n var s = sampleLines.length - 1;\n var c = controlLines.length - 1;\n\n while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {\n // We expect at least one stack frame to be shared.\n // Typically this will be the root most one. However, stack frames may be\n // cut off due to maximum stack limits. In this case, one maybe cut off\n // earlier than the other. We assume that the sample is longer or the same\n // and there for cut off earlier. So we should find the root most frame in\n // the sample somewhere in the control.\n c--;\n }\n\n for (; s >= 1 && c >= 0; s--, c--) {\n // Next we find the first one that isn't the same which should be the\n // frame that called our sample function and the control.\n if (sampleLines[s] !== controlLines[c]) {\n // In V8, the first line is describing the message but other VMs don't.\n // If we're about to return the first line, and the control is also on the same\n // line, that's a pretty good indicator that our sample threw at same line as\n // the control. I.e. before we entered the sample frame. So we ignore this result.\n // This can happen if you passed a class to function component, or non-function.\n if (s !== 1 || c !== 1) {\n do {\n s--;\n c--; // We may still have similar intermediate frames from the construct call.\n // The next one that isn't the same should be our match though.\n\n if (c < 0 || sampleLines[s] !== controlLines[c]) {\n // V8 adds a \"new\" prefix for native classes. Let's remove it to make it prettier.\n var _frame = '\\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled \"<anonymous>\"\n // but we have a user-provided \"displayName\"\n // splice it in to make the stack more readable.\n\n\n if (fn.displayName && _frame.includes('<anonymous>')) {\n _frame = _frame.replace('<anonymous>', fn.displayName);\n }\n\n {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, _frame);\n }\n } // Return the line we found.\n\n\n return _frame;\n }\n } while (s >= 1 && c >= 0);\n }\n\n break;\n }\n }\n }\n } finally {\n reentry = false;\n\n {\n ReactCurrentDispatcher$1.current = previousDispatcher;\n reenableLogs();\n }\n\n Error.prepareStackTrace = previousPrepareStackTrace;\n } // Fallback to just using the name if we couldn't make it throw.\n\n\n var name = fn ? fn.displayName || fn.name : '';\n var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';\n\n {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, syntheticFrame);\n }\n }\n\n return syntheticFrame;\n}\nfunction describeFunctionComponentFrame(fn, source, ownerFn) {\n {\n return describeNativeComponentFrame(fn, false);\n }\n}\n\nfunction shouldConstruct(Component) {\n var prototype = Component.prototype;\n return !!(prototype && prototype.isReactComponent);\n}\n\nfunction describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {\n\n if (type == null) {\n return '';\n }\n\n if (typeof type === 'function') {\n {\n return describeNativeComponentFrame(type, shouldConstruct(type));\n }\n }\n\n if (typeof type === 'string') {\n return describeBuiltInComponentFrame(type);\n }\n\n switch (type) {\n case REACT_SUSPENSE_TYPE:\n return describeBuiltInComponentFrame('Suspense');\n\n case REACT_SUSPENSE_LIST_TYPE:\n return describeBuiltInComponentFrame('SuspenseList');\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_FORWARD_REF_TYPE:\n return describeFunctionComponentFrame(type.render);\n\n case REACT_MEMO_TYPE:\n // Memo may contain any component type so we recursively resolve it.\n return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n // Lazy may contain any component type so we recursively resolve it.\n return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);\n } catch (x) {}\n }\n }\n }\n\n return '';\n}\n\nvar loggedTypeFailures = {};\nvar ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;\n\nfunction setCurrentlyValidatingElement(element) {\n {\n if (element) {\n var owner = element._owner;\n var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n ReactDebugCurrentFrame$1.setExtraStackFrame(stack);\n } else {\n ReactDebugCurrentFrame$1.setExtraStackFrame(null);\n }\n }\n}\n\nfunction checkPropTypes(typeSpecs, values, location, componentName, element) {\n {\n // $FlowFixMe This is okay but Flow doesn't know it.\n var has = Function.call.bind(hasOwnProperty);\n\n for (var typeSpecName in typeSpecs) {\n if (has(typeSpecs, typeSpecName)) {\n var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n if (typeof typeSpecs[typeSpecName] !== 'function') {\n // eslint-disable-next-line react-internal/prod-error-codes\n var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');\n err.name = 'Invariant Violation';\n throw err;\n }\n\n error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');\n } catch (ex) {\n error$1 = ex;\n }\n\n if (error$1 && !(error$1 instanceof Error)) {\n setCurrentlyValidatingElement(element);\n\n error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1);\n\n setCurrentlyValidatingElement(null);\n }\n\n if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error$1.message] = true;\n setCurrentlyValidatingElement(element);\n\n error('Failed %s type: %s', location, error$1.message);\n\n setCurrentlyValidatingElement(null);\n }\n }\n }\n }\n}\n\nfunction setCurrentlyValidatingElement$1(element) {\n {\n if (element) {\n var owner = element._owner;\n var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n setExtraStackFrame(stack);\n } else {\n setExtraStackFrame(null);\n }\n }\n}\n\nvar propTypesMisspellWarningShown;\n\n{\n propTypesMisspellWarningShown = false;\n}\n\nfunction getDeclarationErrorAddendum() {\n if (ReactCurrentOwner.current) {\n var name = getComponentNameFromType(ReactCurrentOwner.current.type);\n\n if (name) {\n return '\\n\\nCheck the render method of `' + name + '`.';\n }\n }\n\n return '';\n}\n\nfunction getSourceInfoErrorAddendum(source) {\n if (source !== undefined) {\n var fileName = source.fileName.replace(/^.*[\\\\\\/]/, '');\n var lineNumber = source.lineNumber;\n return '\\n\\nCheck your code at ' + fileName + ':' + lineNumber + '.';\n }\n\n return '';\n}\n\nfunction getSourceInfoErrorAddendumForProps(elementProps) {\n if (elementProps !== null && elementProps !== undefined) {\n return getSourceInfoErrorAddendum(elementProps.__source);\n }\n\n return '';\n}\n/**\n * Warn if there's no key explicitly set on dynamic arrays of children or\n * object keys are not valid. This allows us to keep track of children between\n * updates.\n */\n\n\nvar ownerHasKeyUseWarning = {};\n\nfunction getCurrentComponentErrorInfo(parentType) {\n var info = getDeclarationErrorAddendum();\n\n if (!info) {\n var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;\n\n if (parentName) {\n info = \"\\n\\nCheck the top-level render call using <\" + parentName + \">.\";\n }\n }\n\n return info;\n}\n/**\n * Warn if the element doesn't have an explicit key assigned to it.\n * This element is in an array. The array could grow and shrink or be\n * reordered. All children that haven't already been validated are required to\n * have a \"key\" property assigned to it. Error statuses are cached so a warning\n * will only be shown once.\n *\n * @internal\n * @param {ReactElement} element Element that requires a key.\n * @param {*} parentType element's parent's type.\n */\n\n\nfunction validateExplicitKey(element, parentType) {\n if (!element._store || element._store.validated || element.key != null) {\n return;\n }\n\n element._store.validated = true;\n var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);\n\n if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {\n return;\n }\n\n ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a\n // property, it may be the creator of the child that's responsible for\n // assigning it a key.\n\n var childOwner = '';\n\n if (element && element._owner && element._owner !== ReactCurrentOwner.current) {\n // Give the component that originally created this child.\n childOwner = \" It was passed a child from \" + getComponentNameFromType(element._owner.type) + \".\";\n }\n\n {\n setCurrentlyValidatingElement$1(element);\n\n error('Each child in a list should have a unique \"key\" prop.' + '%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);\n\n setCurrentlyValidatingElement$1(null);\n }\n}\n/**\n * Ensure that every element either is passed in a static location, in an\n * array with an explicit keys property defined, or in an object literal\n * with valid key property.\n *\n * @internal\n * @param {ReactNode} node Statically passed child of any type.\n * @param {*} parentType node's parent's type.\n */\n\n\nfunction validateChildKeys(node, parentType) {\n if (typeof node !== 'object') {\n return;\n }\n\n if (isArray(node)) {\n for (var i = 0; i < node.length; i++) {\n var child = node[i];\n\n if (isValidElement(child)) {\n validateExplicitKey(child, parentType);\n }\n }\n } else if (isValidElement(node)) {\n // This element was passed in a valid location.\n if (node._store) {\n node._store.validated = true;\n }\n } else if (node) {\n var iteratorFn = getIteratorFn(node);\n\n if (typeof iteratorFn === 'function') {\n // Entry iterators used to provide implicit keys,\n // but now we print a separate warning for them later.\n if (iteratorFn !== node.entries) {\n var iterator = iteratorFn.call(node);\n var step;\n\n while (!(step = iterator.next()).done) {\n if (isValidElement(step.value)) {\n validateExplicitKey(step.value, parentType);\n }\n }\n }\n }\n }\n}\n/**\n * Given an element, validate that its props follow the propTypes definition,\n * provided by the type.\n *\n * @param {ReactElement} element\n */\n\n\nfunction validatePropTypes(element) {\n {\n var type = element.type;\n\n if (type === null || type === undefined || typeof type === 'string') {\n return;\n }\n\n var propTypes;\n\n if (typeof type === 'function') {\n propTypes = type.propTypes;\n } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.\n // Inner props are checked in the reconciler.\n type.$$typeof === REACT_MEMO_TYPE)) {\n propTypes = type.propTypes;\n } else {\n return;\n }\n\n if (propTypes) {\n // Intentionally inside to avoid triggering lazy initializers:\n var name = getComponentNameFromType(type);\n checkPropTypes(propTypes, element.props, 'prop', name, element);\n } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {\n propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:\n\n var _name = getComponentNameFromType(type);\n\n error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');\n }\n\n if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {\n error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');\n }\n }\n}\n/**\n * Given a fragment, validate that it can only be provided with fragment props\n * @param {ReactElement} fragment\n */\n\n\nfunction validateFragmentProps(fragment) {\n {\n var keys = Object.keys(fragment.props);\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n\n if (key !== 'children' && key !== 'key') {\n setCurrentlyValidatingElement$1(fragment);\n\n error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);\n\n setCurrentlyValidatingElement$1(null);\n break;\n }\n }\n\n if (fragment.ref !== null) {\n setCurrentlyValidatingElement$1(fragment);\n\n error('Invalid attribute `ref` supplied to `React.Fragment`.');\n\n setCurrentlyValidatingElement$1(null);\n }\n }\n}\nfunction createElementWithValidation(type, props, children) {\n var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to\n // succeed and there will likely be errors in render.\n\n if (!validType) {\n var info = '';\n\n if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {\n info += ' You likely forgot to export your component from the file ' + \"it's defined in, or you might have mixed up default and named imports.\";\n }\n\n var sourceInfo = getSourceInfoErrorAddendumForProps(props);\n\n if (sourceInfo) {\n info += sourceInfo;\n } else {\n info += getDeclarationErrorAddendum();\n }\n\n var typeString;\n\n if (type === null) {\n typeString = 'null';\n } else if (isArray(type)) {\n typeString = 'array';\n } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {\n typeString = \"<\" + (getComponentNameFromType(type.type) || 'Unknown') + \" />\";\n info = ' Did you accidentally export a JSX literal instead of a component?';\n } else {\n typeString = typeof type;\n }\n\n {\n error('React.createElement: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);\n }\n }\n\n var element = createElement.apply(this, arguments); // The result can be nullish if a mock or a custom function is used.\n // TODO: Drop this when these are no longer allowed as the type argument.\n\n if (element == null) {\n return element;\n } // Skip key warning if the type isn't valid since our key validation logic\n // doesn't expect a non-string/function type and can throw confusing errors.\n // We don't want exception behavior to differ between dev and prod.\n // (Rendering will throw with a helpful message and as soon as the type is\n // fixed, the key warnings will appear.)\n\n\n if (validType) {\n for (var i = 2; i < arguments.length; i++) {\n validateChildKeys(arguments[i], type);\n }\n }\n\n if (type === REACT_FRAGMENT_TYPE) {\n validateFragmentProps(element);\n } else {\n validatePropTypes(element);\n }\n\n return element;\n}\nvar didWarnAboutDeprecatedCreateFactory = false;\nfunction createFactoryWithValidation(type) {\n var validatedFactory = createElementWithValidation.bind(null, type);\n validatedFactory.type = type;\n\n {\n if (!didWarnAboutDeprecatedCreateFactory) {\n didWarnAboutDeprecatedCreateFactory = true;\n\n warn('React.createFactory() is deprecated and will be removed in ' + 'a future major release. Consider using JSX ' + 'or use React.createElement() directly instead.');\n } // Legacy hook: remove it\n\n\n Object.defineProperty(validatedFactory, 'type', {\n enumerable: false,\n get: function () {\n warn('Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.');\n\n Object.defineProperty(this, 'type', {\n value: type\n });\n return type;\n }\n });\n }\n\n return validatedFactory;\n}\nfunction cloneElementWithValidation(element, props, children) {\n var newElement = cloneElement.apply(this, arguments);\n\n for (var i = 2; i < arguments.length; i++) {\n validateChildKeys(arguments[i], newElement.type);\n }\n\n validatePropTypes(newElement);\n return newElement;\n}\n\nfunction startTransition(scope, options) {\n var prevTransition = ReactCurrentBatchConfig.transition;\n ReactCurrentBatchConfig.transition = {};\n var currentTransition = ReactCurrentBatchConfig.transition;\n\n {\n ReactCurrentBatchConfig.transition._updatedFibers = new Set();\n }\n\n try {\n scope();\n } finally {\n ReactCurrentBatchConfig.transition = prevTransition;\n\n {\n if (prevTransition === null && currentTransition._updatedFibers) {\n var updatedFibersCount = currentTransition._updatedFibers.size;\n\n if (updatedFibersCount > 10) {\n warn('Detected a large number of updates inside startTransition. ' + 'If this is due to a subscription please re-write it to use React provided hooks. ' + 'Otherwise concurrent mode guarantees are off the table.');\n }\n\n currentTransition._updatedFibers.clear();\n }\n }\n }\n}\n\nvar didWarnAboutMessageChannel = false;\nvar enqueueTaskImpl = null;\nfunction enqueueTask(task) {\n if (enqueueTaskImpl === null) {\n try {\n // read require off the module object to get around the bundlers.\n // we don't want them to detect a require and bundle a Node polyfill.\n var requireString = ('require' + Math.random()).slice(0, 7);\n var nodeRequire = module && module[requireString]; // assuming we're in node, let's try to get node's\n // version of setImmediate, bypassing fake timers if any.\n\n enqueueTaskImpl = nodeRequire.call(module, 'timers').setImmediate;\n } catch (_err) {\n // we're in a browser\n // we can't use regular timers because they may still be faked\n // so we try MessageChannel+postMessage instead\n enqueueTaskImpl = function (callback) {\n {\n if (didWarnAboutMessageChannel === false) {\n didWarnAboutMessageChannel = true;\n\n if (typeof MessageChannel === 'undefined') {\n error('This browser does not have a MessageChannel implementation, ' + 'so enqueuing tasks via await act(async () => ...) will fail. ' + 'Please file an issue at https://github.com/facebook/react/issues ' + 'if you encounter this warning.');\n }\n }\n }\n\n var channel = new MessageChannel();\n channel.port1.onmessage = callback;\n channel.port2.postMessage(undefined);\n };\n }\n }\n\n return enqueueTaskImpl(task);\n}\n\nvar actScopeDepth = 0;\nvar didWarnNoAwaitAct = false;\nfunction act(callback) {\n {\n // `act` calls can be nested, so we track the depth. This represents the\n // number of `act` scopes on the stack.\n var prevActScopeDepth = actScopeDepth;\n actScopeDepth++;\n\n if (ReactCurrentActQueue.current === null) {\n // This is the outermost `act` scope. Initialize the queue. The reconciler\n // will detect the queue and use it instead of Scheduler.\n ReactCurrentActQueue.current = [];\n }\n\n var prevIsBatchingLegacy = ReactCurrentActQueue.isBatchingLegacy;\n var result;\n\n try {\n // Used to reproduce behavior of `batchedUpdates` in legacy mode. Only\n // set to `true` while the given callback is executed, not for updates\n // triggered during an async event, because this is how the legacy\n // implementation of `act` behaved.\n ReactCurrentActQueue.isBatchingLegacy = true;\n result = callback(); // Replicate behavior of original `act` implementation in legacy mode,\n // which flushed updates immediately after the scope function exits, even\n // if it's an async function.\n\n if (!prevIsBatchingLegacy && ReactCurrentActQueue.didScheduleLegacyUpdate) {\n var queue = ReactCurrentActQueue.current;\n\n if (queue !== null) {\n ReactCurrentActQueue.didScheduleLegacyUpdate = false;\n flushActQueue(queue);\n }\n }\n } catch (error) {\n popActScope(prevActScopeDepth);\n throw error;\n } finally {\n ReactCurrentActQueue.isBatchingLegacy = prevIsBatchingLegacy;\n }\n\n if (result !== null && typeof result === 'object' && typeof result.then === 'function') {\n var thenableResult = result; // The callback is an async function (i.e. returned a promise). Wait\n // for it to resolve before exiting the current scope.\n\n var wasAwaited = false;\n var thenable = {\n then: function (resolve, reject) {\n wasAwaited = true;\n thenableResult.then(function (returnValue) {\n popActScope(prevActScopeDepth);\n\n if (actScopeDepth === 0) {\n // We've exited the outermost act scope. Recursively flush the\n // queue until there's no remaining work.\n recursivelyFlushAsyncActWork(returnValue, resolve, reject);\n } else {\n resolve(returnValue);\n }\n }, function (error) {\n // The callback threw an error.\n popActScope(prevActScopeDepth);\n reject(error);\n });\n }\n };\n\n {\n if (!didWarnNoAwaitAct && typeof Promise !== 'undefined') {\n // eslint-disable-next-line no-undef\n Promise.resolve().then(function () {}).then(function () {\n if (!wasAwaited) {\n didWarnNoAwaitAct = true;\n\n error('You called act(async () => ...) without await. ' + 'This could lead to unexpected testing behaviour, ' + 'interleaving multiple act calls and mixing their ' + 'scopes. ' + 'You should - await act(async () => ...);');\n }\n });\n }\n }\n\n return thenable;\n } else {\n var returnValue = result; // The callback is not an async function. Exit the current scope\n // immediately, without awaiting.\n\n popActScope(prevActScopeDepth);\n\n if (actScopeDepth === 0) {\n // Exiting the outermost act scope. Flush the queue.\n var _queue = ReactCurrentActQueue.current;\n\n if (_queue !== null) {\n flushActQueue(_queue);\n ReactCurrentActQueue.current = null;\n } // Return a thenable. If the user awaits it, we'll flush again in\n // case additional work was scheduled by a microtask.\n\n\n var _thenable = {\n then: function (resolve, reject) {\n // Confirm we haven't re-entered another `act` scope, in case\n // the user does something weird like await the thenable\n // multiple times.\n if (ReactCurrentActQueue.current === null) {\n // Recursively flush the queue until there's no remaining work.\n ReactCurrentActQueue.current = [];\n recursivelyFlushAsyncActWork(returnValue, resolve, reject);\n } else {\n resolve(returnValue);\n }\n }\n };\n return _thenable;\n } else {\n // Since we're inside a nested `act` scope, the returned thenable\n // immediately resolves. The outer scope will flush the queue.\n var _thenable2 = {\n then: function (resolve, reject) {\n resolve(returnValue);\n }\n };\n return _thenable2;\n }\n }\n }\n}\n\nfunction popActScope(prevActScopeDepth) {\n {\n if (prevActScopeDepth !== actScopeDepth - 1) {\n error('You seem to have overlapping act() calls, this is not supported. ' + 'Be sure to await previous act() calls before making a new one. ');\n }\n\n actScopeDepth = prevActScopeDepth;\n }\n}\n\nfunction recursivelyFlushAsyncActWork(returnValue, resolve, reject) {\n {\n var queue = ReactCurrentActQueue.current;\n\n if (queue !== null) {\n try {\n flushActQueue(queue);\n enqueueTask(function () {\n if (queue.length === 0) {\n // No additional work was scheduled. Finish.\n ReactCurrentActQueue.current = null;\n resolve(returnValue);\n } else {\n // Keep flushing work until there's none left.\n recursivelyFlushAsyncActWork(returnValue, resolve, reject);\n }\n });\n } catch (error) {\n reject(error);\n }\n } else {\n resolve(returnValue);\n }\n }\n}\n\nvar isFlushing = false;\n\nfunction flushActQueue(queue) {\n {\n if (!isFlushing) {\n // Prevent re-entrance.\n isFlushing = true;\n var i = 0;\n\n try {\n for (; i < queue.length; i++) {\n var callback = queue[i];\n\n do {\n callback = callback(true);\n } while (callback !== null);\n }\n\n queue.length = 0;\n } catch (error) {\n // If something throws, leave the remaining callbacks on the queue.\n queue = queue.slice(i + 1);\n throw error;\n } finally {\n isFlushing = false;\n }\n }\n }\n}\n\nvar createElement$1 = createElementWithValidation ;\nvar cloneElement$1 = cloneElementWithValidation ;\nvar createFactory = createFactoryWithValidation ;\nvar Children = {\n map: mapChildren,\n forEach: forEachChildren,\n count: countChildren,\n toArray: toArray,\n only: onlyChild\n};\n\nexports.Children = Children;\nexports.Component = Component;\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.Profiler = REACT_PROFILER_TYPE;\nexports.PureComponent = PureComponent;\nexports.StrictMode = REACT_STRICT_MODE_TYPE;\nexports.Suspense = REACT_SUSPENSE_TYPE;\nexports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactSharedInternals;\nexports.act = act;\nexports.cloneElement = cloneElement$1;\nexports.createContext = createContext;\nexports.createElement = createElement$1;\nexports.createFactory = createFactory;\nexports.createRef = createRef;\nexports.forwardRef = forwardRef;\nexports.isValidElement = isValidElement;\nexports.lazy = lazy;\nexports.memo = memo;\nexports.startTransition = startTransition;\nexports.unstable_act = act;\nexports.useCallback = useCallback;\nexports.useContext = useContext;\nexports.useDebugValue = useDebugValue;\nexports.useDeferredValue = useDeferredValue;\nexports.useEffect = useEffect;\nexports.useId = useId;\nexports.useImperativeHandle = useImperativeHandle;\nexports.useInsertionEffect = useInsertionEffect;\nexports.useLayoutEffect = useLayoutEffect;\nexports.useMemo = useMemo;\nexports.useReducer = useReducer;\nexports.useRef = useRef;\nexports.useState = useState;\nexports.useSyncExternalStore = useSyncExternalStore;\nexports.useTransition = useTransition;\nexports.version = ReactVersion;\n /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\nif (\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop ===\n 'function'\n) {\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());\n}\n \n })();\n}\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/react/cjs/react.development.js?", + ); + + /***/ + }, + + /***/ 6540: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + 'use strict'; + eval( + '\n\nif (false) {} else {\n module.exports = __webpack_require__(4837);\n}\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/react/index.js?', + ); + + /***/ + }, + + /***/ 7243: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + 'use strict'; + eval( + "\nif (false) {}\n// We don't want bundlers to error when they encounter usage of any of these exports.\n// It's up to the package author to ensure that if they access React internals,\n// they do so in a safe way that won't break if React changes how they use these internals.\n// (e.g. only access them in development, and only in an optional way that won't\n// break if internals are not there or do not have the expected structure)\n// @ts-ignore\nmodule.exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = undefined;\n// @ts-ignore\nmodule.exports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = undefined;\n// @ts-ignore\nmodule.exports.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = undefined;\n// Here we actually pull in the React library and add everything\n// it exports to our own `module.exports`.\n// If React suddenly were to add one of the above \"polyfilled\" exports,\n// the React version would overwrite our version, so this should be\n// future-proof.\nObject.assign(module.exports, __webpack_require__(6540));\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/rehackt/index.js?", + ); + + /***/ + }, + + /***/ 213: /***/ (__unused_webpack_module, exports) => { + 'use strict'; + eval( + "/**\n * @license React\n * scheduler.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\nif (true) {\n (function() {\n\n 'use strict';\n\n/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\nif (\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart ===\n 'function'\n) {\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());\n}\n var enableSchedulerDebugging = false;\nvar enableProfiling = false;\nvar frameYieldMs = 5;\n\nfunction push(heap, node) {\n var index = heap.length;\n heap.push(node);\n siftUp(heap, node, index);\n}\nfunction peek(heap) {\n return heap.length === 0 ? null : heap[0];\n}\nfunction pop(heap) {\n if (heap.length === 0) {\n return null;\n }\n\n var first = heap[0];\n var last = heap.pop();\n\n if (last !== first) {\n heap[0] = last;\n siftDown(heap, last, 0);\n }\n\n return first;\n}\n\nfunction siftUp(heap, node, i) {\n var index = i;\n\n while (index > 0) {\n var parentIndex = index - 1 >>> 1;\n var parent = heap[parentIndex];\n\n if (compare(parent, node) > 0) {\n // The parent is larger. Swap positions.\n heap[parentIndex] = node;\n heap[index] = parent;\n index = parentIndex;\n } else {\n // The parent is smaller. Exit.\n return;\n }\n }\n}\n\nfunction siftDown(heap, node, i) {\n var index = i;\n var length = heap.length;\n var halfLength = length >>> 1;\n\n while (index < halfLength) {\n var leftIndex = (index + 1) * 2 - 1;\n var left = heap[leftIndex];\n var rightIndex = leftIndex + 1;\n var right = heap[rightIndex]; // If the left or right node is smaller, swap with the smaller of those.\n\n if (compare(left, node) < 0) {\n if (rightIndex < length && compare(right, left) < 0) {\n heap[index] = right;\n heap[rightIndex] = node;\n index = rightIndex;\n } else {\n heap[index] = left;\n heap[leftIndex] = node;\n index = leftIndex;\n }\n } else if (rightIndex < length && compare(right, node) < 0) {\n heap[index] = right;\n heap[rightIndex] = node;\n index = rightIndex;\n } else {\n // Neither child is smaller. Exit.\n return;\n }\n }\n}\n\nfunction compare(a, b) {\n // Compare sort index first, then task id.\n var diff = a.sortIndex - b.sortIndex;\n return diff !== 0 ? diff : a.id - b.id;\n}\n\n// TODO: Use symbols?\nvar ImmediatePriority = 1;\nvar UserBlockingPriority = 2;\nvar NormalPriority = 3;\nvar LowPriority = 4;\nvar IdlePriority = 5;\n\nfunction markTaskErrored(task, ms) {\n}\n\n/* eslint-disable no-var */\n\nvar hasPerformanceNow = typeof performance === 'object' && typeof performance.now === 'function';\n\nif (hasPerformanceNow) {\n var localPerformance = performance;\n\n exports.unstable_now = function () {\n return localPerformance.now();\n };\n} else {\n var localDate = Date;\n var initialTime = localDate.now();\n\n exports.unstable_now = function () {\n return localDate.now() - initialTime;\n };\n} // Max 31 bit integer. The max integer size in V8 for 32-bit systems.\n// Math.pow(2, 30) - 1\n// 0b111111111111111111111111111111\n\n\nvar maxSigned31BitInt = 1073741823; // Times out immediately\n\nvar IMMEDIATE_PRIORITY_TIMEOUT = -1; // Eventually times out\n\nvar USER_BLOCKING_PRIORITY_TIMEOUT = 250;\nvar NORMAL_PRIORITY_TIMEOUT = 5000;\nvar LOW_PRIORITY_TIMEOUT = 10000; // Never times out\n\nvar IDLE_PRIORITY_TIMEOUT = maxSigned31BitInt; // Tasks are stored on a min heap\n\nvar taskQueue = [];\nvar timerQueue = []; // Incrementing id counter. Used to maintain insertion order.\n\nvar taskIdCounter = 1; // Pausing the scheduler is useful for debugging.\nvar currentTask = null;\nvar currentPriorityLevel = NormalPriority; // This is set while performing work, to prevent re-entrance.\n\nvar isPerformingWork = false;\nvar isHostCallbackScheduled = false;\nvar isHostTimeoutScheduled = false; // Capture local references to native APIs, in case a polyfill overrides them.\n\nvar localSetTimeout = typeof setTimeout === 'function' ? setTimeout : null;\nvar localClearTimeout = typeof clearTimeout === 'function' ? clearTimeout : null;\nvar localSetImmediate = typeof setImmediate !== 'undefined' ? setImmediate : null; // IE and Node.js + jsdom\n\nvar isInputPending = typeof navigator !== 'undefined' && navigator.scheduling !== undefined && navigator.scheduling.isInputPending !== undefined ? navigator.scheduling.isInputPending.bind(navigator.scheduling) : null;\n\nfunction advanceTimers(currentTime) {\n // Check for tasks that are no longer delayed and add them to the queue.\n var timer = peek(timerQueue);\n\n while (timer !== null) {\n if (timer.callback === null) {\n // Timer was cancelled.\n pop(timerQueue);\n } else if (timer.startTime <= currentTime) {\n // Timer fired. Transfer to the task queue.\n pop(timerQueue);\n timer.sortIndex = timer.expirationTime;\n push(taskQueue, timer);\n } else {\n // Remaining timers are pending.\n return;\n }\n\n timer = peek(timerQueue);\n }\n}\n\nfunction handleTimeout(currentTime) {\n isHostTimeoutScheduled = false;\n advanceTimers(currentTime);\n\n if (!isHostCallbackScheduled) {\n if (peek(taskQueue) !== null) {\n isHostCallbackScheduled = true;\n requestHostCallback(flushWork);\n } else {\n var firstTimer = peek(timerQueue);\n\n if (firstTimer !== null) {\n requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime);\n }\n }\n }\n}\n\nfunction flushWork(hasTimeRemaining, initialTime) {\n\n\n isHostCallbackScheduled = false;\n\n if (isHostTimeoutScheduled) {\n // We scheduled a timeout but it's no longer needed. Cancel it.\n isHostTimeoutScheduled = false;\n cancelHostTimeout();\n }\n\n isPerformingWork = true;\n var previousPriorityLevel = currentPriorityLevel;\n\n try {\n if (enableProfiling) {\n try {\n return workLoop(hasTimeRemaining, initialTime);\n } catch (error) {\n if (currentTask !== null) {\n var currentTime = exports.unstable_now();\n markTaskErrored(currentTask, currentTime);\n currentTask.isQueued = false;\n }\n\n throw error;\n }\n } else {\n // No catch in prod code path.\n return workLoop(hasTimeRemaining, initialTime);\n }\n } finally {\n currentTask = null;\n currentPriorityLevel = previousPriorityLevel;\n isPerformingWork = false;\n }\n}\n\nfunction workLoop(hasTimeRemaining, initialTime) {\n var currentTime = initialTime;\n advanceTimers(currentTime);\n currentTask = peek(taskQueue);\n\n while (currentTask !== null && !(enableSchedulerDebugging )) {\n if (currentTask.expirationTime > currentTime && (!hasTimeRemaining || shouldYieldToHost())) {\n // This currentTask hasn't expired, and we've reached the deadline.\n break;\n }\n\n var callback = currentTask.callback;\n\n if (typeof callback === 'function') {\n currentTask.callback = null;\n currentPriorityLevel = currentTask.priorityLevel;\n var didUserCallbackTimeout = currentTask.expirationTime <= currentTime;\n\n var continuationCallback = callback(didUserCallbackTimeout);\n currentTime = exports.unstable_now();\n\n if (typeof continuationCallback === 'function') {\n currentTask.callback = continuationCallback;\n } else {\n\n if (currentTask === peek(taskQueue)) {\n pop(taskQueue);\n }\n }\n\n advanceTimers(currentTime);\n } else {\n pop(taskQueue);\n }\n\n currentTask = peek(taskQueue);\n } // Return whether there's additional work\n\n\n if (currentTask !== null) {\n return true;\n } else {\n var firstTimer = peek(timerQueue);\n\n if (firstTimer !== null) {\n requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime);\n }\n\n return false;\n }\n}\n\nfunction unstable_runWithPriority(priorityLevel, eventHandler) {\n switch (priorityLevel) {\n case ImmediatePriority:\n case UserBlockingPriority:\n case NormalPriority:\n case LowPriority:\n case IdlePriority:\n break;\n\n default:\n priorityLevel = NormalPriority;\n }\n\n var previousPriorityLevel = currentPriorityLevel;\n currentPriorityLevel = priorityLevel;\n\n try {\n return eventHandler();\n } finally {\n currentPriorityLevel = previousPriorityLevel;\n }\n}\n\nfunction unstable_next(eventHandler) {\n var priorityLevel;\n\n switch (currentPriorityLevel) {\n case ImmediatePriority:\n case UserBlockingPriority:\n case NormalPriority:\n // Shift down to normal priority\n priorityLevel = NormalPriority;\n break;\n\n default:\n // Anything lower than normal priority should remain at the current level.\n priorityLevel = currentPriorityLevel;\n break;\n }\n\n var previousPriorityLevel = currentPriorityLevel;\n currentPriorityLevel = priorityLevel;\n\n try {\n return eventHandler();\n } finally {\n currentPriorityLevel = previousPriorityLevel;\n }\n}\n\nfunction unstable_wrapCallback(callback) {\n var parentPriorityLevel = currentPriorityLevel;\n return function () {\n // This is a fork of runWithPriority, inlined for performance.\n var previousPriorityLevel = currentPriorityLevel;\n currentPriorityLevel = parentPriorityLevel;\n\n try {\n return callback.apply(this, arguments);\n } finally {\n currentPriorityLevel = previousPriorityLevel;\n }\n };\n}\n\nfunction unstable_scheduleCallback(priorityLevel, callback, options) {\n var currentTime = exports.unstable_now();\n var startTime;\n\n if (typeof options === 'object' && options !== null) {\n var delay = options.delay;\n\n if (typeof delay === 'number' && delay > 0) {\n startTime = currentTime + delay;\n } else {\n startTime = currentTime;\n }\n } else {\n startTime = currentTime;\n }\n\n var timeout;\n\n switch (priorityLevel) {\n case ImmediatePriority:\n timeout = IMMEDIATE_PRIORITY_TIMEOUT;\n break;\n\n case UserBlockingPriority:\n timeout = USER_BLOCKING_PRIORITY_TIMEOUT;\n break;\n\n case IdlePriority:\n timeout = IDLE_PRIORITY_TIMEOUT;\n break;\n\n case LowPriority:\n timeout = LOW_PRIORITY_TIMEOUT;\n break;\n\n case NormalPriority:\n default:\n timeout = NORMAL_PRIORITY_TIMEOUT;\n break;\n }\n\n var expirationTime = startTime + timeout;\n var newTask = {\n id: taskIdCounter++,\n callback: callback,\n priorityLevel: priorityLevel,\n startTime: startTime,\n expirationTime: expirationTime,\n sortIndex: -1\n };\n\n if (startTime > currentTime) {\n // This is a delayed task.\n newTask.sortIndex = startTime;\n push(timerQueue, newTask);\n\n if (peek(taskQueue) === null && newTask === peek(timerQueue)) {\n // All tasks are delayed, and this is the task with the earliest delay.\n if (isHostTimeoutScheduled) {\n // Cancel an existing timeout.\n cancelHostTimeout();\n } else {\n isHostTimeoutScheduled = true;\n } // Schedule a timeout.\n\n\n requestHostTimeout(handleTimeout, startTime - currentTime);\n }\n } else {\n newTask.sortIndex = expirationTime;\n push(taskQueue, newTask);\n // wait until the next time we yield.\n\n\n if (!isHostCallbackScheduled && !isPerformingWork) {\n isHostCallbackScheduled = true;\n requestHostCallback(flushWork);\n }\n }\n\n return newTask;\n}\n\nfunction unstable_pauseExecution() {\n}\n\nfunction unstable_continueExecution() {\n\n if (!isHostCallbackScheduled && !isPerformingWork) {\n isHostCallbackScheduled = true;\n requestHostCallback(flushWork);\n }\n}\n\nfunction unstable_getFirstCallbackNode() {\n return peek(taskQueue);\n}\n\nfunction unstable_cancelCallback(task) {\n // remove from the queue because you can't remove arbitrary nodes from an\n // array based heap, only the first one.)\n\n\n task.callback = null;\n}\n\nfunction unstable_getCurrentPriorityLevel() {\n return currentPriorityLevel;\n}\n\nvar isMessageLoopRunning = false;\nvar scheduledHostCallback = null;\nvar taskTimeoutID = -1; // Scheduler periodically yields in case there is other work on the main\n// thread, like user events. By default, it yields multiple times per frame.\n// It does not attempt to align with frame boundaries, since most tasks don't\n// need to be frame aligned; for those that do, use requestAnimationFrame.\n\nvar frameInterval = frameYieldMs;\nvar startTime = -1;\n\nfunction shouldYieldToHost() {\n var timeElapsed = exports.unstable_now() - startTime;\n\n if (timeElapsed < frameInterval) {\n // The main thread has only been blocked for a really short amount of time;\n // smaller than a single frame. Don't yield yet.\n return false;\n } // The main thread has been blocked for a non-negligible amount of time. We\n\n\n return true;\n}\n\nfunction requestPaint() {\n\n}\n\nfunction forceFrameRate(fps) {\n if (fps < 0 || fps > 125) {\n // Using console['error'] to evade Babel and ESLint\n console['error']('forceFrameRate takes a positive int between 0 and 125, ' + 'forcing frame rates higher than 125 fps is not supported');\n return;\n }\n\n if (fps > 0) {\n frameInterval = Math.floor(1000 / fps);\n } else {\n // reset the framerate\n frameInterval = frameYieldMs;\n }\n}\n\nvar performWorkUntilDeadline = function () {\n if (scheduledHostCallback !== null) {\n var currentTime = exports.unstable_now(); // Keep track of the start time so we can measure how long the main thread\n // has been blocked.\n\n startTime = currentTime;\n var hasTimeRemaining = true; // If a scheduler task throws, exit the current browser task so the\n // error can be observed.\n //\n // Intentionally not using a try-catch, since that makes some debugging\n // techniques harder. Instead, if `scheduledHostCallback` errors, then\n // `hasMoreWork` will remain true, and we'll continue the work loop.\n\n var hasMoreWork = true;\n\n try {\n hasMoreWork = scheduledHostCallback(hasTimeRemaining, currentTime);\n } finally {\n if (hasMoreWork) {\n // If there's more work, schedule the next message event at the end\n // of the preceding one.\n schedulePerformWorkUntilDeadline();\n } else {\n isMessageLoopRunning = false;\n scheduledHostCallback = null;\n }\n }\n } else {\n isMessageLoopRunning = false;\n } // Yielding to the browser will give it a chance to paint, so we can\n};\n\nvar schedulePerformWorkUntilDeadline;\n\nif (typeof localSetImmediate === 'function') {\n // Node.js and old IE.\n // There's a few reasons for why we prefer setImmediate.\n //\n // Unlike MessageChannel, it doesn't prevent a Node.js process from exiting.\n // (Even though this is a DOM fork of the Scheduler, you could get here\n // with a mix of Node.js 15+, which has a MessageChannel, and jsdom.)\n // https://github.com/facebook/react/issues/20756\n //\n // But also, it runs earlier which is the semantic we want.\n // If other browsers ever implement it, it's better to use it.\n // Although both of these would be inferior to native scheduling.\n schedulePerformWorkUntilDeadline = function () {\n localSetImmediate(performWorkUntilDeadline);\n };\n} else if (typeof MessageChannel !== 'undefined') {\n // DOM and Worker environments.\n // We prefer MessageChannel because of the 4ms setTimeout clamping.\n var channel = new MessageChannel();\n var port = channel.port2;\n channel.port1.onmessage = performWorkUntilDeadline;\n\n schedulePerformWorkUntilDeadline = function () {\n port.postMessage(null);\n };\n} else {\n // We should only fallback here in non-browser environments.\n schedulePerformWorkUntilDeadline = function () {\n localSetTimeout(performWorkUntilDeadline, 0);\n };\n}\n\nfunction requestHostCallback(callback) {\n scheduledHostCallback = callback;\n\n if (!isMessageLoopRunning) {\n isMessageLoopRunning = true;\n schedulePerformWorkUntilDeadline();\n }\n}\n\nfunction requestHostTimeout(callback, ms) {\n taskTimeoutID = localSetTimeout(function () {\n callback(exports.unstable_now());\n }, ms);\n}\n\nfunction cancelHostTimeout() {\n localClearTimeout(taskTimeoutID);\n taskTimeoutID = -1;\n}\n\nvar unstable_requestPaint = requestPaint;\nvar unstable_Profiling = null;\n\nexports.unstable_IdlePriority = IdlePriority;\nexports.unstable_ImmediatePriority = ImmediatePriority;\nexports.unstable_LowPriority = LowPriority;\nexports.unstable_NormalPriority = NormalPriority;\nexports.unstable_Profiling = unstable_Profiling;\nexports.unstable_UserBlockingPriority = UserBlockingPriority;\nexports.unstable_cancelCallback = unstable_cancelCallback;\nexports.unstable_continueExecution = unstable_continueExecution;\nexports.unstable_forceFrameRate = forceFrameRate;\nexports.unstable_getCurrentPriorityLevel = unstable_getCurrentPriorityLevel;\nexports.unstable_getFirstCallbackNode = unstable_getFirstCallbackNode;\nexports.unstable_next = unstable_next;\nexports.unstable_pauseExecution = unstable_pauseExecution;\nexports.unstable_requestPaint = unstable_requestPaint;\nexports.unstable_runWithPriority = unstable_runWithPriority;\nexports.unstable_scheduleCallback = unstable_scheduleCallback;\nexports.unstable_shouldYield = shouldYieldToHost;\nexports.unstable_wrapCallback = unstable_wrapCallback;\n /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\nif (\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop ===\n 'function'\n) {\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());\n}\n \n })();\n}\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/scheduler/cjs/scheduler.development.js?", + ); + + /***/ + }, + + /***/ 9982: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + 'use strict'; + eval( + '\n\nif (false) {} else {\n module.exports = __webpack_require__(213);\n}\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/scheduler/index.js?', + ); + + /***/ + }, + + /***/ 9896: /***/ (module) => { + 'use strict'; + module.exports = require('fs'); + + /***/ + }, + + /***/ 6928: /***/ (module) => { + 'use strict'; + module.exports = require('path'); + + /***/ + }, + + /***/ 4876: /***/ (module) => { + 'use strict'; + module.exports = require('punycode'); + + /***/ + }, + + /***/ 2203: /***/ (module) => { + 'use strict'; + module.exports = require('stream'); + + /***/ + }, + + /***/ 9023: /***/ (module) => { + 'use strict'; + module.exports = require('util'); + + /***/ + }, + + /***/ 2475: /***/ (module) => { + eval( + 'function _assertThisInitialized(e) {\n if (void 0 === e) throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");\n return e;\n}\nmodule.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports["default"] = module.exports;\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@babel/runtime/helpers/assertThisInitialized.js?', + ); + + /***/ + }, + + /***/ 4634: /***/ (module) => { + eval( + 'function _extends() {\n return module.exports = _extends = Object.assign ? Object.assign.bind() : function (n) {\n for (var e = 1; e < arguments.length; e++) {\n var t = arguments[e];\n for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);\n }\n return n;\n }, module.exports.__esModule = true, module.exports["default"] = module.exports, _extends.apply(null, arguments);\n}\nmodule.exports = _extends, module.exports.__esModule = true, module.exports["default"] = module.exports;\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@babel/runtime/helpers/extends.js?', + ); + + /***/ + }, + + /***/ 6221: /***/ (module, __unused_webpack_exports, __webpack_require__) => { + eval( + 'var setPrototypeOf = __webpack_require__(3255);\nfunction _inheritsLoose(t, o) {\n t.prototype = Object.create(o.prototype), t.prototype.constructor = t, setPrototypeOf(t, o);\n}\nmodule.exports = _inheritsLoose, module.exports.__esModule = true, module.exports["default"] = module.exports;\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@babel/runtime/helpers/inheritsLoose.js?', + ); + + /***/ + }, + + /***/ 4893: /***/ (module) => { + eval( + 'function _objectWithoutPropertiesLoose(r, e) {\n if (null == r) return {};\n var t = {};\n for (var n in r) if ({}.hasOwnProperty.call(r, n)) {\n if (e.includes(n)) continue;\n t[n] = r[n];\n }\n return t;\n}\nmodule.exports = _objectWithoutPropertiesLoose, module.exports.__esModule = true, module.exports["default"] = module.exports;\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js?', + ); + + /***/ + }, + + /***/ 3255: /***/ (module) => { + eval( + 'function _setPrototypeOf(t, e) {\n return module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {\n return t.__proto__ = e, t;\n }, module.exports.__esModule = true, module.exports["default"] = module.exports, _setPrototypeOf(t, e);\n}\nmodule.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@babel/runtime/helpers/setPrototypeOf.js?', + ); + + /***/ + }, + + /***/ 7404: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '\n// EXPORTS\n__webpack_require__.d(__webpack_exports__, {\n D: () => (/* binding */ InMemoryCache)\n});\n\n// EXTERNAL MODULE: ./node_modules/tslib/tslib.es6.mjs\nvar tslib_es6 = __webpack_require__(1635);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/globals/index.js + 4 modules\nvar globals = __webpack_require__(6319);\n// EXTERNAL MODULE: ./node_modules/optimism/lib/index.js + 7 modules\nvar lib = __webpack_require__(1161);\n// EXTERNAL MODULE: ./node_modules/@wry/equality/lib/index.js\nvar equality_lib = __webpack_require__(5381);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/graphql/fragments.js\nvar graphql_fragments = __webpack_require__(5215);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/caching/sizes.js\nvar sizes = __webpack_require__(1212);\n// EXTERNAL MODULE: ./node_modules/zen-observable-ts/module.js\nvar zen_observable_ts_module = __webpack_require__(3401);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/common/mergeDeep.js\nvar mergeDeep = __webpack_require__(2922);\n// EXTERNAL MODULE: ./node_modules/@wry/caches/lib/weak.js\nvar weak = __webpack_require__(1744);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/caching/getMemoryInternals.js\nvar getMemoryInternals = __webpack_require__(5051);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/core/equalByQuery.js\nvar equalByQuery = __webpack_require__(9080);\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/cache/core/cache.js\n\n\n\n\n\n\nvar ApolloCache = /** @class */ (function () {\n function ApolloCache() {\n this.assumeImmutableResults = false;\n // Make sure we compute the same (===) fragment query document every\n // time we receive the same fragment in readFragment.\n this.getFragmentDoc = (0,lib/* wrap */.LV)(graphql_fragments/* getFragmentQueryDocument */.ct, {\n max: sizes/* cacheSizes */.v["cache.fragmentQueryDocuments"] ||\n 1000 /* defaultCacheSizes["cache.fragmentQueryDocuments"] */,\n cache: weak/* WeakCache */.l,\n });\n }\n // Transactional API\n // The batch method is intended to replace/subsume both performTransaction\n // and recordOptimisticTransaction, but performTransaction came first, so we\n // provide a default batch implementation that\'s just another way of calling\n // performTransaction. Subclasses of ApolloCache (such as InMemoryCache) can\n // override the batch method to do more interesting things with its options.\n ApolloCache.prototype.batch = function (options) {\n var _this = this;\n var optimisticId = typeof options.optimistic === "string" ? options.optimistic\n : options.optimistic === false ? null\n : void 0;\n var updateResult;\n this.performTransaction(function () { return (updateResult = options.update(_this)); }, optimisticId);\n return updateResult;\n };\n ApolloCache.prototype.recordOptimisticTransaction = function (transaction, optimisticId) {\n this.performTransaction(transaction, optimisticId);\n };\n // Optional API\n // Called once per input document, allowing the cache to make static changes\n // to the query, such as adding __typename fields.\n ApolloCache.prototype.transformDocument = function (document) {\n return document;\n };\n // Called before each ApolloLink request, allowing the cache to make dynamic\n // changes to the query, such as filling in missing fragment definitions.\n ApolloCache.prototype.transformForLink = function (document) {\n return document;\n };\n ApolloCache.prototype.identify = function (object) {\n return;\n };\n ApolloCache.prototype.gc = function () {\n return [];\n };\n ApolloCache.prototype.modify = function (options) {\n return false;\n };\n // DataProxy API\n ApolloCache.prototype.readQuery = function (options, optimistic) {\n if (optimistic === void 0) { optimistic = !!options.optimistic; }\n return this.read((0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, options), { rootId: options.id || "ROOT_QUERY", optimistic: optimistic }));\n };\n /** {@inheritDoc @apollo/client!ApolloClient#watchFragment:member(1)} */\n ApolloCache.prototype.watchFragment = function (options) {\n var _this = this;\n var fragment = options.fragment, fragmentName = options.fragmentName, from = options.from, _a = options.optimistic, optimistic = _a === void 0 ? true : _a;\n var query = this.getFragmentDoc(fragment, fragmentName);\n var diffOptions = {\n returnPartialData: true,\n id: typeof from === "string" ? from : this.identify(from),\n query: query,\n optimistic: optimistic,\n };\n var latestDiff;\n return new zen_observable_ts_module/* Observable */.c(function (observer) {\n return _this.watch((0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, diffOptions), { immediate: true, callback: function (diff) {\n if (\n // Always ensure we deliver the first result\n latestDiff &&\n (0,equalByQuery/* equalByQuery */.a)(query, { data: latestDiff === null || latestDiff === void 0 ? void 0 : latestDiff.result }, { data: diff.result })) {\n return;\n }\n var result = {\n data: diff.result,\n complete: !!diff.complete,\n };\n if (diff.missing) {\n result.missing = (0,mergeDeep/* mergeDeepArray */.IM)(diff.missing.map(function (error) { return error.missing; }));\n }\n latestDiff = diff;\n observer.next(result);\n } }));\n });\n };\n ApolloCache.prototype.readFragment = function (options, optimistic) {\n if (optimistic === void 0) { optimistic = !!options.optimistic; }\n return this.read((0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, options), { query: this.getFragmentDoc(options.fragment, options.fragmentName), rootId: options.id, optimistic: optimistic }));\n };\n ApolloCache.prototype.writeQuery = function (_a) {\n var id = _a.id, data = _a.data, options = (0,tslib_es6/* __rest */.Tt)(_a, ["id", "data"]);\n return this.write(Object.assign(options, {\n dataId: id || "ROOT_QUERY",\n result: data,\n }));\n };\n ApolloCache.prototype.writeFragment = function (_a) {\n var id = _a.id, data = _a.data, fragment = _a.fragment, fragmentName = _a.fragmentName, options = (0,tslib_es6/* __rest */.Tt)(_a, ["id", "data", "fragment", "fragmentName"]);\n return this.write(Object.assign(options, {\n query: this.getFragmentDoc(fragment, fragmentName),\n dataId: id,\n result: data,\n }));\n };\n ApolloCache.prototype.updateQuery = function (options, update) {\n return this.batch({\n update: function (cache) {\n var value = cache.readQuery(options);\n var data = update(value);\n if (data === void 0 || data === null)\n return value;\n cache.writeQuery((0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, options), { data: data }));\n return data;\n },\n });\n };\n ApolloCache.prototype.updateFragment = function (options, update) {\n return this.batch({\n update: function (cache) {\n var value = cache.readFragment(options);\n var data = update(value);\n if (data === void 0 || data === null)\n return value;\n cache.writeFragment((0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, options), { data: data }));\n return data;\n },\n });\n };\n return ApolloCache;\n}());\n\nif (globalThis.__DEV__ !== false) {\n ApolloCache.prototype.getMemoryInternals = getMemoryInternals/* getApolloCacheMemoryInternals */.tQ;\n}\n//# sourceMappingURL=cache.js.map\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/cache/core/types/common.js\n\nvar MissingFieldError = /** @class */ (function (_super) {\n (0,tslib_es6/* __extends */.C6)(MissingFieldError, _super);\n function MissingFieldError(message, path, query, variables) {\n var _a;\n // \'Error\' breaks prototype chain here\n var _this = _super.call(this, message) || this;\n _this.message = message;\n _this.path = path;\n _this.query = query;\n _this.variables = variables;\n if (Array.isArray(_this.path)) {\n _this.missing = _this.message;\n for (var i = _this.path.length - 1; i >= 0; --i) {\n _this.missing = (_a = {}, _a[_this.path[i]] = _this.missing, _a);\n }\n }\n else {\n _this.missing = _this.path;\n }\n // We\'re not using `Object.setPrototypeOf` here as it isn\'t fully supported\n // on Android (see issue #3236).\n _this.__proto__ = MissingFieldError.prototype;\n return _this;\n }\n return MissingFieldError;\n}(Error));\n\n//# sourceMappingURL=common.js.map\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/graphql/DocumentTransform.js\nvar DocumentTransform = __webpack_require__(9993);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/graphql/transform.js\nvar transform = __webpack_require__(3902);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/common/canonicalStringify.js\nvar canonicalStringify = __webpack_require__(6269);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/graphql/print.js + 2 modules\nvar print = __webpack_require__(2417);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/graphql/storeUtils.js\nvar storeUtils = __webpack_require__(7194);\n// EXTERNAL MODULE: ./node_modules/graphql/language/kinds.mjs\nvar kinds = __webpack_require__(3298);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/common/canUse.js\nvar canUse = __webpack_require__(2619);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/common/compact.js\nvar compact = __webpack_require__(7945);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/graphql/getFromAST.js\nvar getFromAST = __webpack_require__(4824);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/graphql/directives.js\nvar directives = __webpack_require__(1250);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/common/maybeDeepFreeze.js\nvar maybeDeepFreeze = __webpack_require__(1469);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/common/objects.js\nvar objects = __webpack_require__(2456);\n// EXTERNAL MODULE: ./node_modules/@wry/trie/lib/index.js\nvar trie_lib = __webpack_require__(2453);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/common/arrays.js\nvar arrays = __webpack_require__(5636);\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/cache/inmemory/helpers.js\n\nvar hasOwn = Object.prototype.hasOwnProperty;\nfunction isNullish(value) {\n return value === null || value === void 0;\n}\n\nfunction defaultDataIdFromObject(_a, context) {\n var __typename = _a.__typename, id = _a.id, _id = _a._id;\n if (typeof __typename === "string") {\n if (context) {\n context.keyObject =\n !isNullish(id) ? { id: id }\n : !isNullish(_id) ? { _id: _id }\n : void 0;\n }\n // If there is no object.id, fall back to object._id.\n if (isNullish(id) && !isNullish(_id)) {\n id = _id;\n }\n if (!isNullish(id)) {\n return "".concat(__typename, ":").concat(typeof id === "number" || typeof id === "string" ?\n id\n : JSON.stringify(id));\n }\n }\n}\nvar defaultConfig = {\n dataIdFromObject: defaultDataIdFromObject,\n addTypename: true,\n resultCaching: true,\n // Thanks to the shouldCanonizeResults helper, this should be the only line\n // you have to change to reenable canonization by default in the future.\n canonizeResults: false,\n};\nfunction normalizeConfig(config) {\n return (0,compact/* compact */.o)(defaultConfig, config);\n}\nfunction shouldCanonizeResults(config) {\n var value = config.canonizeResults;\n return value === void 0 ? defaultConfig.canonizeResults : value;\n}\nfunction getTypenameFromStoreObject(store, objectOrReference) {\n return (0,storeUtils/* isReference */.A_)(objectOrReference) ?\n store.get(objectOrReference.__ref, "__typename")\n : objectOrReference && objectOrReference.__typename;\n}\nvar TypeOrFieldNameRegExp = /^[_a-z][_0-9a-z]*/i;\nfunction fieldNameFromStoreName(storeFieldName) {\n var match = storeFieldName.match(TypeOrFieldNameRegExp);\n return match ? match[0] : storeFieldName;\n}\nfunction selectionSetMatchesResult(selectionSet, result, variables) {\n if ((0,objects/* isNonNullObject */.U)(result)) {\n return (0,arrays/* isArray */.c)(result) ?\n result.every(function (item) {\n return selectionSetMatchesResult(selectionSet, item, variables);\n })\n : selectionSet.selections.every(function (field) {\n if ((0,storeUtils/* isField */.dt)(field) && (0,directives/* shouldInclude */.MS)(field, variables)) {\n var key = (0,storeUtils/* resultKeyNameFromField */.ue)(field);\n return (hasOwn.call(result, key) &&\n (!field.selectionSet ||\n selectionSetMatchesResult(field.selectionSet, result[key], variables)));\n }\n // If the selection has been skipped with @skip(true) or\n // @include(false), it should not count against the matching. If\n // the selection is not a field, it must be a fragment (inline or\n // named). We will determine if selectionSetMatchesResult for that\n // fragment when we get to it, so for now we return true.\n return true;\n });\n }\n return false;\n}\nfunction storeValueIsStoreObject(value) {\n return (0,objects/* isNonNullObject */.U)(value) && !(0,storeUtils/* isReference */.A_)(value) && !(0,arrays/* isArray */.c)(value);\n}\nfunction makeProcessedFieldsMerger() {\n return new mergeDeep/* DeepMerger */.ZI();\n}\nfunction extractFragmentContext(document, fragments) {\n // FragmentMap consisting only of fragments defined directly in document, not\n // including other fragments registered in the FragmentRegistry.\n var fragmentMap = (0,graphql_fragments/* createFragmentMap */.JG)((0,getFromAST/* getFragmentDefinitions */.zK)(document));\n return {\n fragmentMap: fragmentMap,\n lookupFragment: function (name) {\n var def = fragmentMap[name];\n if (!def && fragments) {\n def = fragments.lookup(name);\n }\n return def || null;\n },\n };\n}\n//# sourceMappingURL=helpers.js.map\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/cache/inmemory/entityStore.js\n\n\n\n\n\n\n\nvar DELETE = Object.create(null);\nvar delModifier = function () { return DELETE; };\nvar INVALIDATE = Object.create(null);\nvar EntityStore = /** @class */ (function () {\n function EntityStore(policies, group) {\n var _this = this;\n this.policies = policies;\n this.group = group;\n this.data = Object.create(null);\n // Maps root entity IDs to the number of times they have been retained, minus\n // the number of times they have been released. Retained entities keep other\n // entities they reference (even indirectly) from being garbage collected.\n this.rootIds = Object.create(null);\n // Lazily tracks { __ref: <dataId> } strings contained by this.data[dataId].\n this.refs = Object.create(null);\n // Bound function that can be passed around to provide easy access to fields\n // of Reference objects as well as ordinary objects.\n this.getFieldValue = function (objectOrReference, storeFieldName) {\n return (0,maybeDeepFreeze/* maybeDeepFreeze */.G)((0,storeUtils/* isReference */.A_)(objectOrReference) ?\n _this.get(objectOrReference.__ref, storeFieldName)\n : objectOrReference && objectOrReference[storeFieldName]);\n };\n // Returns true for non-normalized StoreObjects and non-dangling\n // References, indicating that readField(name, objOrRef) has a chance of\n // working. Useful for filtering out dangling references from lists.\n this.canRead = function (objOrRef) {\n return (0,storeUtils/* isReference */.A_)(objOrRef) ?\n _this.has(objOrRef.__ref)\n : typeof objOrRef === "object";\n };\n // Bound function that converts an id or an object with a __typename and\n // primary key fields to a Reference object. If called with a Reference object,\n // that same Reference object is returned. Pass true for mergeIntoStore to persist\n // an object into the store.\n this.toReference = function (objOrIdOrRef, mergeIntoStore) {\n if (typeof objOrIdOrRef === "string") {\n return (0,storeUtils/* makeReference */.WU)(objOrIdOrRef);\n }\n if ((0,storeUtils/* isReference */.A_)(objOrIdOrRef)) {\n return objOrIdOrRef;\n }\n var id = _this.policies.identify(objOrIdOrRef)[0];\n if (id) {\n var ref = (0,storeUtils/* makeReference */.WU)(id);\n if (mergeIntoStore) {\n _this.merge(id, objOrIdOrRef);\n }\n return ref;\n }\n };\n }\n // Although the EntityStore class is abstract, it contains concrete\n // implementations of the various NormalizedCache interface methods that\n // are inherited by the Root and Layer subclasses.\n EntityStore.prototype.toObject = function () {\n return (0,tslib_es6/* __assign */.Cl)({}, this.data);\n };\n EntityStore.prototype.has = function (dataId) {\n return this.lookup(dataId, true) !== void 0;\n };\n EntityStore.prototype.get = function (dataId, fieldName) {\n this.group.depend(dataId, fieldName);\n if (hasOwn.call(this.data, dataId)) {\n var storeObject = this.data[dataId];\n if (storeObject && hasOwn.call(storeObject, fieldName)) {\n return storeObject[fieldName];\n }\n }\n if (fieldName === "__typename" &&\n hasOwn.call(this.policies.rootTypenamesById, dataId)) {\n return this.policies.rootTypenamesById[dataId];\n }\n if (this instanceof Layer) {\n return this.parent.get(dataId, fieldName);\n }\n };\n EntityStore.prototype.lookup = function (dataId, dependOnExistence) {\n // The has method (above) calls lookup with dependOnExistence = true, so\n // that it can later be invalidated when we add or remove a StoreObject for\n // this dataId. Any consumer who cares about the contents of the StoreObject\n // should not rely on this dependency, since the contents could change\n // without the object being added or removed.\n if (dependOnExistence)\n this.group.depend(dataId, "__exists");\n if (hasOwn.call(this.data, dataId)) {\n return this.data[dataId];\n }\n if (this instanceof Layer) {\n return this.parent.lookup(dataId, dependOnExistence);\n }\n if (this.policies.rootTypenamesById[dataId]) {\n return Object.create(null);\n }\n };\n EntityStore.prototype.merge = function (older, newer) {\n var _this = this;\n var dataId;\n // Convert unexpected references to ID strings.\n if ((0,storeUtils/* isReference */.A_)(older))\n older = older.__ref;\n if ((0,storeUtils/* isReference */.A_)(newer))\n newer = newer.__ref;\n var existing = typeof older === "string" ? this.lookup((dataId = older)) : older;\n var incoming = typeof newer === "string" ? this.lookup((dataId = newer)) : newer;\n // If newer was a string ID, but that ID was not defined in this store,\n // then there are no fields to be merged, so we\'re done.\n if (!incoming)\n return;\n (0,globals/* invariant */.V1)(typeof dataId === "string", 1);\n var merged = new mergeDeep/* DeepMerger */.ZI(storeObjectReconciler).merge(existing, incoming);\n // Even if merged === existing, existing may have come from a lower\n // layer, so we always need to set this.data[dataId] on this level.\n this.data[dataId] = merged;\n if (merged !== existing) {\n delete this.refs[dataId];\n if (this.group.caching) {\n var fieldsToDirty_1 = Object.create(null);\n // If we added a new StoreObject where there was previously none, dirty\n // anything that depended on the existence of this dataId, such as the\n // EntityStore#has method.\n if (!existing)\n fieldsToDirty_1.__exists = 1;\n // Now invalidate dependents who called getFieldValue for any fields\n // that are changing as a result of this merge.\n Object.keys(incoming).forEach(function (storeFieldName) {\n if (!existing ||\n existing[storeFieldName] !== merged[storeFieldName]) {\n // Always dirty the full storeFieldName, which may include\n // serialized arguments following the fieldName prefix.\n fieldsToDirty_1[storeFieldName] = 1;\n // Also dirty fieldNameFromStoreName(storeFieldName) if it\'s\n // different from storeFieldName and this field does not have\n // keyArgs configured, because that means the cache can\'t make\n // any assumptions about how field values with the same field\n // name but different arguments might be interrelated, so it\n // must err on the side of invalidating all field values that\n // share the same short fieldName, regardless of arguments.\n var fieldName = fieldNameFromStoreName(storeFieldName);\n if (fieldName !== storeFieldName &&\n !_this.policies.hasKeyArgs(merged.__typename, fieldName)) {\n fieldsToDirty_1[fieldName] = 1;\n }\n // If merged[storeFieldName] has become undefined, and this is the\n // Root layer, actually delete the property from the merged object,\n // which is guaranteed to have been created fresh in this method.\n if (merged[storeFieldName] === void 0 && !(_this instanceof Layer)) {\n delete merged[storeFieldName];\n }\n }\n });\n if (fieldsToDirty_1.__typename &&\n !(existing && existing.__typename) &&\n // Since we return default root __typename strings\n // automatically from store.get, we don\'t need to dirty the\n // ROOT_QUERY.__typename field if merged.__typename is equal\n // to the default string (usually "Query").\n this.policies.rootTypenamesById[dataId] === merged.__typename) {\n delete fieldsToDirty_1.__typename;\n }\n Object.keys(fieldsToDirty_1).forEach(function (fieldName) {\n return _this.group.dirty(dataId, fieldName);\n });\n }\n }\n };\n EntityStore.prototype.modify = function (dataId, fields) {\n var _this = this;\n var storeObject = this.lookup(dataId);\n if (storeObject) {\n var changedFields_1 = Object.create(null);\n var needToMerge_1 = false;\n var allDeleted_1 = true;\n var sharedDetails_1 = {\n DELETE: DELETE,\n INVALIDATE: INVALIDATE,\n isReference: storeUtils/* isReference */.A_,\n toReference: this.toReference,\n canRead: this.canRead,\n readField: function (fieldNameOrOptions, from) {\n return _this.policies.readField(typeof fieldNameOrOptions === "string" ?\n {\n fieldName: fieldNameOrOptions,\n from: from || (0,storeUtils/* makeReference */.WU)(dataId),\n }\n : fieldNameOrOptions, { store: _this });\n },\n };\n Object.keys(storeObject).forEach(function (storeFieldName) {\n var fieldName = fieldNameFromStoreName(storeFieldName);\n var fieldValue = storeObject[storeFieldName];\n if (fieldValue === void 0)\n return;\n var modify = typeof fields === "function" ? fields : (fields[storeFieldName] || fields[fieldName]);\n if (modify) {\n var newValue = modify === delModifier ? DELETE : (modify((0,maybeDeepFreeze/* maybeDeepFreeze */.G)(fieldValue), (0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, sharedDetails_1), { fieldName: fieldName, storeFieldName: storeFieldName, storage: _this.getStorage(dataId, storeFieldName) })));\n if (newValue === INVALIDATE) {\n _this.group.dirty(dataId, storeFieldName);\n }\n else {\n if (newValue === DELETE)\n newValue = void 0;\n if (newValue !== fieldValue) {\n changedFields_1[storeFieldName] = newValue;\n needToMerge_1 = true;\n fieldValue = newValue;\n if (globalThis.__DEV__ !== false) {\n var checkReference = function (ref) {\n if (_this.lookup(ref.__ref) === undefined) {\n globalThis.__DEV__ !== false && globals/* invariant */.V1.warn(2, ref);\n return true;\n }\n };\n if ((0,storeUtils/* isReference */.A_)(newValue)) {\n checkReference(newValue);\n }\n else if (Array.isArray(newValue)) {\n // Warn about writing "mixed" arrays of Reference and non-Reference objects\n var seenReference = false;\n var someNonReference = void 0;\n for (var _i = 0, newValue_1 = newValue; _i < newValue_1.length; _i++) {\n var value = newValue_1[_i];\n if ((0,storeUtils/* isReference */.A_)(value)) {\n seenReference = true;\n if (checkReference(value))\n break;\n }\n else {\n // Do not warn on primitive values, since those could never be represented\n // by a reference. This is a valid (albeit uncommon) use case.\n if (typeof value === "object" && !!value) {\n var id = _this.policies.identify(value)[0];\n // check if object could even be referenced, otherwise we are not interested in it for this warning\n if (id) {\n someNonReference = value;\n }\n }\n }\n if (seenReference && someNonReference !== undefined) {\n globalThis.__DEV__ !== false && globals/* invariant */.V1.warn(3, someNonReference);\n break;\n }\n }\n }\n }\n }\n }\n }\n if (fieldValue !== void 0) {\n allDeleted_1 = false;\n }\n });\n if (needToMerge_1) {\n this.merge(dataId, changedFields_1);\n if (allDeleted_1) {\n if (this instanceof Layer) {\n this.data[dataId] = void 0;\n }\n else {\n delete this.data[dataId];\n }\n this.group.dirty(dataId, "__exists");\n }\n return true;\n }\n }\n return false;\n };\n // If called with only one argument, removes the entire entity\n // identified by dataId. If called with a fieldName as well, removes all\n // fields of that entity whose names match fieldName according to the\n // fieldNameFromStoreName helper function. If called with a fieldName\n // and variables, removes all fields of that entity whose names match fieldName\n // and whose arguments when cached exactly match the variables passed.\n EntityStore.prototype.delete = function (dataId, fieldName, args) {\n var _a;\n var storeObject = this.lookup(dataId);\n if (storeObject) {\n var typename = this.getFieldValue(storeObject, "__typename");\n var storeFieldName = fieldName && args ?\n this.policies.getStoreFieldName({ typename: typename, fieldName: fieldName, args: args })\n : fieldName;\n return this.modify(dataId, storeFieldName ? (_a = {},\n _a[storeFieldName] = delModifier,\n _a) : delModifier);\n }\n return false;\n };\n EntityStore.prototype.evict = function (options, limit) {\n var evicted = false;\n if (options.id) {\n if (hasOwn.call(this.data, options.id)) {\n evicted = this.delete(options.id, options.fieldName, options.args);\n }\n if (this instanceof Layer && this !== limit) {\n evicted = this.parent.evict(options, limit) || evicted;\n }\n // Always invalidate the field to trigger rereading of watched\n // queries, even if no cache data was modified by the eviction,\n // because queries may depend on computed fields with custom read\n // functions, whose values are not stored in the EntityStore.\n if (options.fieldName || evicted) {\n this.group.dirty(options.id, options.fieldName || "__exists");\n }\n }\n return evicted;\n };\n EntityStore.prototype.clear = function () {\n this.replace(null);\n };\n EntityStore.prototype.extract = function () {\n var _this = this;\n var obj = this.toObject();\n var extraRootIds = [];\n this.getRootIdSet().forEach(function (id) {\n if (!hasOwn.call(_this.policies.rootTypenamesById, id)) {\n extraRootIds.push(id);\n }\n });\n if (extraRootIds.length) {\n obj.__META = { extraRootIds: extraRootIds.sort() };\n }\n return obj;\n };\n EntityStore.prototype.replace = function (newData) {\n var _this = this;\n Object.keys(this.data).forEach(function (dataId) {\n if (!(newData && hasOwn.call(newData, dataId))) {\n _this.delete(dataId);\n }\n });\n if (newData) {\n var __META = newData.__META, rest_1 = (0,tslib_es6/* __rest */.Tt)(newData, ["__META"]);\n Object.keys(rest_1).forEach(function (dataId) {\n _this.merge(dataId, rest_1[dataId]);\n });\n if (__META) {\n __META.extraRootIds.forEach(this.retain, this);\n }\n }\n };\n EntityStore.prototype.retain = function (rootId) {\n return (this.rootIds[rootId] = (this.rootIds[rootId] || 0) + 1);\n };\n EntityStore.prototype.release = function (rootId) {\n if (this.rootIds[rootId] > 0) {\n var count = --this.rootIds[rootId];\n if (!count)\n delete this.rootIds[rootId];\n return count;\n }\n return 0;\n };\n // Return a Set<string> of all the ID strings that have been retained by\n // this layer/root *and* any layers/roots beneath it.\n EntityStore.prototype.getRootIdSet = function (ids) {\n if (ids === void 0) { ids = new Set(); }\n Object.keys(this.rootIds).forEach(ids.add, ids);\n if (this instanceof Layer) {\n this.parent.getRootIdSet(ids);\n }\n else {\n // Official singleton IDs like ROOT_QUERY and ROOT_MUTATION are\n // always considered roots for garbage collection, regardless of\n // their retainment counts in this.rootIds.\n Object.keys(this.policies.rootTypenamesById).forEach(ids.add, ids);\n }\n return ids;\n };\n // The goal of garbage collection is to remove IDs from the Root layer of the\n // store that are no longer reachable starting from any IDs that have been\n // explicitly retained (see retain and release, above). Returns an array of\n // dataId strings that were removed from the store.\n EntityStore.prototype.gc = function () {\n var _this = this;\n var ids = this.getRootIdSet();\n var snapshot = this.toObject();\n ids.forEach(function (id) {\n if (hasOwn.call(snapshot, id)) {\n // Because we are iterating over an ECMAScript Set, the IDs we add here\n // will be visited in later iterations of the forEach loop only if they\n // were not previously contained by the Set.\n Object.keys(_this.findChildRefIds(id)).forEach(ids.add, ids);\n // By removing IDs from the snapshot object here, we protect them from\n // getting removed from the root store layer below.\n delete snapshot[id];\n }\n });\n var idsToRemove = Object.keys(snapshot);\n if (idsToRemove.length) {\n var root_1 = this;\n while (root_1 instanceof Layer)\n root_1 = root_1.parent;\n idsToRemove.forEach(function (id) { return root_1.delete(id); });\n }\n return idsToRemove;\n };\n EntityStore.prototype.findChildRefIds = function (dataId) {\n if (!hasOwn.call(this.refs, dataId)) {\n var found_1 = (this.refs[dataId] = Object.create(null));\n var root = this.data[dataId];\n if (!root)\n return found_1;\n var workSet_1 = new Set([root]);\n // Within the store, only arrays and objects can contain child entity\n // references, so we can prune the traversal using this predicate:\n workSet_1.forEach(function (obj) {\n if ((0,storeUtils/* isReference */.A_)(obj)) {\n found_1[obj.__ref] = true;\n // In rare cases, a { __ref } Reference object may have other fields.\n // This often indicates a mismerging of References with StoreObjects,\n // but garbage collection should not be fooled by a stray __ref\n // property in a StoreObject (ignoring all the other fields just\n // because the StoreObject looks like a Reference). To avoid this\n // premature termination of findChildRefIds recursion, we fall through\n // to the code below, which will handle any other properties of obj.\n }\n if ((0,objects/* isNonNullObject */.U)(obj)) {\n Object.keys(obj).forEach(function (key) {\n var child = obj[key];\n // No need to add primitive values to the workSet, since they cannot\n // contain reference objects.\n if ((0,objects/* isNonNullObject */.U)(child)) {\n workSet_1.add(child);\n }\n });\n }\n });\n }\n return this.refs[dataId];\n };\n EntityStore.prototype.makeCacheKey = function () {\n return this.group.keyMaker.lookupArray(arguments);\n };\n return EntityStore;\n}());\n\n// A single CacheGroup represents a set of one or more EntityStore objects,\n// typically the Root store in a CacheGroup by itself, and all active Layer\n// stores in a group together. A single EntityStore object belongs to only\n// one CacheGroup, store.group. The CacheGroup is responsible for tracking\n// dependencies, so store.group is helpful for generating unique keys for\n// cached results that need to be invalidated when/if those dependencies\n// change. If we used the EntityStore objects themselves as cache keys (that\n// is, store rather than store.group), the cache would become unnecessarily\n// fragmented by all the different Layer objects. Instead, the CacheGroup\n// approach allows all optimistic Layer objects in the same linked list to\n// belong to one CacheGroup, with the non-optimistic Root object belonging\n// to another CacheGroup, allowing resultCaching dependencies to be tracked\n// separately for optimistic and non-optimistic entity data.\nvar CacheGroup = /** @class */ (function () {\n function CacheGroup(caching, parent) {\n if (parent === void 0) { parent = null; }\n this.caching = caching;\n this.parent = parent;\n this.d = null;\n this.resetCaching();\n }\n CacheGroup.prototype.resetCaching = function () {\n this.d = this.caching ? (0,lib/* dep */.yN)() : null;\n this.keyMaker = new trie_lib/* Trie */.b(canUse/* canUseWeakMap */.et);\n };\n CacheGroup.prototype.depend = function (dataId, storeFieldName) {\n if (this.d) {\n this.d(makeDepKey(dataId, storeFieldName));\n var fieldName = fieldNameFromStoreName(storeFieldName);\n if (fieldName !== storeFieldName) {\n // Fields with arguments that contribute extra identifying\n // information to the fieldName (thus forming the storeFieldName)\n // depend not only on the full storeFieldName but also on the\n // short fieldName, so the field can be invalidated using either\n // level of specificity.\n this.d(makeDepKey(dataId, fieldName));\n }\n if (this.parent) {\n this.parent.depend(dataId, storeFieldName);\n }\n }\n };\n CacheGroup.prototype.dirty = function (dataId, storeFieldName) {\n if (this.d) {\n this.d.dirty(makeDepKey(dataId, storeFieldName), \n // When storeFieldName === "__exists", that means the entity identified\n // by dataId has either disappeared from the cache or was newly added,\n // so the result caching system would do well to "forget everything it\n // knows" about that object. To achieve that kind of invalidation, we\n // not only dirty the associated result cache entry, but also remove it\n // completely from the dependency graph. For the optimism implementation\n // details, see https://github.com/benjamn/optimism/pull/195.\n storeFieldName === "__exists" ? "forget" : "setDirty");\n }\n };\n return CacheGroup;\n}());\nfunction makeDepKey(dataId, storeFieldName) {\n // Since field names cannot have \'#\' characters in them, this method\n // of joining the field name and the ID should be unambiguous, and much\n // cheaper than JSON.stringify([dataId, fieldName]).\n return storeFieldName + "#" + dataId;\n}\nfunction maybeDependOnExistenceOfEntity(store, entityId) {\n if (supportsResultCaching(store)) {\n // We use this pseudo-field __exists elsewhere in the EntityStore code to\n // represent changes in the existence of the entity object identified by\n // entityId. This dependency gets reliably dirtied whenever an object with\n // this ID is deleted (or newly created) within this group, so any result\n // cache entries (for example, StoreReader#executeSelectionSet results) that\n // depend on __exists for this entityId will get dirtied as well, leading to\n // the eventual recomputation (instead of reuse) of those result objects the\n // next time someone reads them from the cache.\n store.group.depend(entityId, "__exists");\n }\n}\n(function (EntityStore) {\n // Refer to this class as EntityStore.Root outside this namespace.\n var Root = /** @class */ (function (_super) {\n (0,tslib_es6/* __extends */.C6)(Root, _super);\n function Root(_a) {\n var policies = _a.policies, _b = _a.resultCaching, resultCaching = _b === void 0 ? true : _b, seed = _a.seed;\n var _this = _super.call(this, policies, new CacheGroup(resultCaching)) || this;\n _this.stump = new Stump(_this);\n _this.storageTrie = new trie_lib/* Trie */.b(canUse/* canUseWeakMap */.et);\n if (seed)\n _this.replace(seed);\n return _this;\n }\n Root.prototype.addLayer = function (layerId, replay) {\n // Adding an optimistic Layer on top of the Root actually adds the Layer\n // on top of the Stump, so the Stump always comes between the Root and\n // any Layer objects that we\'ve added.\n return this.stump.addLayer(layerId, replay);\n };\n Root.prototype.removeLayer = function () {\n // Never remove the root layer.\n return this;\n };\n Root.prototype.getStorage = function () {\n return this.storageTrie.lookupArray(arguments);\n };\n return Root;\n }(EntityStore));\n EntityStore.Root = Root;\n})(EntityStore || (EntityStore = {}));\n// Not exported, since all Layer instances are created by the addLayer method\n// of the EntityStore.Root class.\nvar Layer = /** @class */ (function (_super) {\n (0,tslib_es6/* __extends */.C6)(Layer, _super);\n function Layer(id, parent, replay, group) {\n var _this = _super.call(this, parent.policies, group) || this;\n _this.id = id;\n _this.parent = parent;\n _this.replay = replay;\n _this.group = group;\n replay(_this);\n return _this;\n }\n Layer.prototype.addLayer = function (layerId, replay) {\n return new Layer(layerId, this, replay, this.group);\n };\n Layer.prototype.removeLayer = function (layerId) {\n var _this = this;\n // Remove all instances of the given id, not just the first one.\n var parent = this.parent.removeLayer(layerId);\n if (layerId === this.id) {\n if (this.group.caching) {\n // Dirty every ID we\'re removing. Technically we might be able to avoid\n // dirtying fields that have values in higher layers, but we don\'t have\n // easy access to higher layers here, and we\'re about to recreate those\n // layers anyway (see parent.addLayer below).\n Object.keys(this.data).forEach(function (dataId) {\n var ownStoreObject = _this.data[dataId];\n var parentStoreObject = parent["lookup"](dataId);\n if (!parentStoreObject) {\n // The StoreObject identified by dataId was defined in this layer\n // but will be undefined in the parent layer, so we can delete the\n // whole entity using this.delete(dataId). Since we\'re about to\n // throw this layer away, the only goal of this deletion is to dirty\n // the removed fields.\n _this.delete(dataId);\n }\n else if (!ownStoreObject) {\n // This layer had an entry for dataId but it was undefined, which\n // means the entity was deleted in this layer, and it\'s about to\n // become undeleted when we remove this layer, so we need to dirty\n // all fields that are about to be reexposed.\n _this.group.dirty(dataId, "__exists");\n Object.keys(parentStoreObject).forEach(function (storeFieldName) {\n _this.group.dirty(dataId, storeFieldName);\n });\n }\n else if (ownStoreObject !== parentStoreObject) {\n // If ownStoreObject is not exactly the same as parentStoreObject,\n // dirty any fields whose values will change as a result of this\n // removal.\n Object.keys(ownStoreObject).forEach(function (storeFieldName) {\n if (!(0,equality_lib/* equal */.L)(ownStoreObject[storeFieldName], parentStoreObject[storeFieldName])) {\n _this.group.dirty(dataId, storeFieldName);\n }\n });\n }\n });\n }\n return parent;\n }\n // No changes are necessary if the parent chain remains identical.\n if (parent === this.parent)\n return this;\n // Recreate this layer on top of the new parent.\n return parent.addLayer(this.id, this.replay);\n };\n Layer.prototype.toObject = function () {\n return (0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, this.parent.toObject()), this.data);\n };\n Layer.prototype.findChildRefIds = function (dataId) {\n var fromParent = this.parent.findChildRefIds(dataId);\n return hasOwn.call(this.data, dataId) ? (0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, fromParent), _super.prototype.findChildRefIds.call(this, dataId)) : fromParent;\n };\n Layer.prototype.getStorage = function () {\n var p = this.parent;\n while (p.parent)\n p = p.parent;\n return p.getStorage.apply(p, \n // @ts-expect-error\n arguments);\n };\n return Layer;\n}(EntityStore));\n// Represents a Layer permanently installed just above the Root, which allows\n// reading optimistically (and registering optimistic dependencies) even when\n// no optimistic layers are currently active. The stump.group CacheGroup object\n// is shared by any/all Layer objects added on top of the Stump.\nvar Stump = /** @class */ (function (_super) {\n (0,tslib_es6/* __extends */.C6)(Stump, _super);\n function Stump(root) {\n return _super.call(this, "EntityStore.Stump", root, function () { }, new CacheGroup(root.group.caching, root.group)) || this;\n }\n Stump.prototype.removeLayer = function () {\n // Never remove the Stump layer.\n return this;\n };\n Stump.prototype.merge = function (older, newer) {\n // We never want to write any data into the Stump, so we forward any merge\n // calls to the Root instead. Another option here would be to throw an\n // exception, but the toReference(object, true) function can sometimes\n // trigger Stump writes (which used to be Root writes, before the Stump\n // concept was introduced).\n return this.parent.merge(older, newer);\n };\n return Stump;\n}(Layer));\nfunction storeObjectReconciler(existingObject, incomingObject, property) {\n var existingValue = existingObject[property];\n var incomingValue = incomingObject[property];\n // Wherever there is a key collision, prefer the incoming value, unless\n // it is deeply equal to the existing value. It\'s worth checking deep\n // equality here (even though blindly returning incoming would be\n // logically correct) because preserving the referential identity of\n // existing data can prevent needless rereading and rerendering.\n return (0,equality_lib/* equal */.L)(existingValue, incomingValue) ? existingValue : incomingValue;\n}\nfunction supportsResultCaching(store) {\n // When result caching is disabled, store.depend will be null.\n return !!(store instanceof EntityStore && store.group.caching);\n}\n//# sourceMappingURL=entityStore.js.map\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/cache/inmemory/object-canon.js\n\n\n\n\nfunction shallowCopy(value) {\n if ((0,objects/* isNonNullObject */.U)(value)) {\n return (0,arrays/* isArray */.c)(value) ?\n value.slice(0)\n : (0,tslib_es6/* __assign */.Cl)({ __proto__: Object.getPrototypeOf(value) }, value);\n }\n return value;\n}\n// When programmers talk about the "canonical form" of an object, they\n// usually have the following meaning in mind, which I\'ve copied from\n// https://en.wiktionary.org/wiki/canonical_form:\n//\n// 1. A standard or normal presentation of a mathematical entity [or\n// object]. A canonical form is an element of a set of representatives\n// of equivalence classes of forms such that there is a function or\n// procedure which projects every element of each equivalence class\n// onto that one element, the canonical form of that equivalence\n// class. The canonical form is expected to be simpler than the rest of\n// the forms in some way.\n//\n// That\'s a long-winded way of saying any two objects that have the same\n// canonical form may be considered equivalent, even if they are !==,\n// which usually means the objects are structurally equivalent (deeply\n// equal), but don\'t necessarily use the same memory.\n//\n// Like a literary or musical canon, this ObjectCanon class represents a\n// collection of unique canonical items (JavaScript objects), with the\n// important property that canon.admit(a) === canon.admit(b) if a and b\n// are deeply equal to each other. In terms of the definition above, the\n// canon.admit method is the "function or procedure which projects every"\n// object "onto that one element, the canonical form."\n//\n// In the worst case, the canonicalization process may involve looking at\n// every property in the provided object tree, so it takes the same order\n// of time as deep equality checking. Fortunately, already-canonicalized\n// objects are returned immediately from canon.admit, so the presence of\n// canonical subtrees tends to speed up canonicalization.\n//\n// Since consumers of canonical objects can check for deep equality in\n// constant time, canonicalizing cache results can massively improve the\n// performance of application code that skips re-rendering unchanged\n// results, such as "pure" UI components in a framework like React.\n//\n// Of course, since canonical objects may be shared widely between\n// unrelated consumers, it\'s important to think of them as immutable, even\n// though they are not actually frozen with Object.freeze in production,\n// due to the extra performance overhead that comes with frozen objects.\n//\n// Custom scalar objects whose internal class name is neither Array nor\n// Object can be included safely in the admitted tree, but they will not\n// be replaced with a canonical version (to put it another way, they are\n// assumed to be canonical already).\n//\n// If we ignore custom objects, no detection of cycles or repeated object\n// references is currently required by the StoreReader class, since\n// GraphQL result objects are JSON-serializable trees (and thus contain\n// neither cycles nor repeated subtrees), so we can avoid the complexity\n// of keeping track of objects we\'ve already seen during the recursion of\n// the admit method.\n//\n// In the future, we may consider adding additional cases to the switch\n// statement to handle other common object types, such as "[object Date]"\n// objects, as needed.\nvar ObjectCanon = /** @class */ (function () {\n function ObjectCanon() {\n // Set of all canonical objects this ObjectCanon has admitted, allowing\n // canon.admit to return previously-canonicalized objects immediately.\n this.known = new (canUse/* canUseWeakSet */.En ? WeakSet : Set)();\n // Efficient storage/lookup structure for canonical objects.\n this.pool = new trie_lib/* Trie */.b(canUse/* canUseWeakMap */.et);\n // Make the ObjectCanon assume this value has already been\n // canonicalized.\n this.passes = new WeakMap();\n // Arrays that contain the same elements in a different order can share\n // the same SortedKeysInfo object, to save memory.\n this.keysByJSON = new Map();\n // This has to come last because it depends on keysByJSON.\n this.empty = this.admit({});\n }\n ObjectCanon.prototype.isKnown = function (value) {\n return (0,objects/* isNonNullObject */.U)(value) && this.known.has(value);\n };\n ObjectCanon.prototype.pass = function (value) {\n if ((0,objects/* isNonNullObject */.U)(value)) {\n var copy = shallowCopy(value);\n this.passes.set(copy, value);\n return copy;\n }\n return value;\n };\n ObjectCanon.prototype.admit = function (value) {\n var _this = this;\n if ((0,objects/* isNonNullObject */.U)(value)) {\n var original = this.passes.get(value);\n if (original)\n return original;\n var proto = Object.getPrototypeOf(value);\n switch (proto) {\n case Array.prototype: {\n if (this.known.has(value))\n return value;\n var array = value.map(this.admit, this);\n // Arrays are looked up in the Trie using their recursively\n // canonicalized elements, and the known version of the array is\n // preserved as node.array.\n var node = this.pool.lookupArray(array);\n if (!node.array) {\n this.known.add((node.array = array));\n // Since canonical arrays may be shared widely between\n // unrelated consumers, it\'s important to regard them as\n // immutable, even if they are not frozen in production.\n if (globalThis.__DEV__ !== false) {\n Object.freeze(array);\n }\n }\n return node.array;\n }\n case null:\n case Object.prototype: {\n if (this.known.has(value))\n return value;\n var proto_1 = Object.getPrototypeOf(value);\n var array_1 = [proto_1];\n var keys = this.sortedKeys(value);\n array_1.push(keys.json);\n var firstValueIndex_1 = array_1.length;\n keys.sorted.forEach(function (key) {\n array_1.push(_this.admit(value[key]));\n });\n // Objects are looked up in the Trie by their prototype (which\n // is *not* recursively canonicalized), followed by a JSON\n // representation of their (sorted) keys, followed by the\n // sequence of recursively canonicalized values corresponding to\n // those keys. To keep the final results unambiguous with other\n // sequences (such as arrays that just happen to contain [proto,\n // keys.json, value1, value2, ...]), the known version of the\n // object is stored as node.object.\n var node = this.pool.lookupArray(array_1);\n if (!node.object) {\n var obj_1 = (node.object = Object.create(proto_1));\n this.known.add(obj_1);\n keys.sorted.forEach(function (key, i) {\n obj_1[key] = array_1[firstValueIndex_1 + i];\n });\n // Since canonical objects may be shared widely between\n // unrelated consumers, it\'s important to regard them as\n // immutable, even if they are not frozen in production.\n if (globalThis.__DEV__ !== false) {\n Object.freeze(obj_1);\n }\n }\n return node.object;\n }\n }\n }\n return value;\n };\n // It\'s worthwhile to cache the sorting of arrays of strings, since the\n // same initial unsorted arrays tend to be encountered many times.\n // Fortunately, we can reuse the Trie machinery to look up the sorted\n // arrays in linear time (which is faster than sorting large arrays).\n ObjectCanon.prototype.sortedKeys = function (obj) {\n var keys = Object.keys(obj);\n var node = this.pool.lookupArray(keys);\n if (!node.keys) {\n keys.sort();\n var json = JSON.stringify(keys);\n if (!(node.keys = this.keysByJSON.get(json))) {\n this.keysByJSON.set(json, (node.keys = { sorted: keys, json: json }));\n }\n }\n return node.keys;\n };\n return ObjectCanon;\n}());\n\n//# sourceMappingURL=object-canon.js.map\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/cache/inmemory/readFromStore.js\n\n\n\n\n\n\n\n\n\nfunction execSelectionSetKeyArgs(options) {\n return [\n options.selectionSet,\n options.objectOrReference,\n options.context,\n // We split out this property so we can pass different values\n // independently without modifying options.context itself.\n options.context.canonizeResults,\n ];\n}\nvar StoreReader = /** @class */ (function () {\n function StoreReader(config) {\n var _this = this;\n this.knownResults = new (canUse/* canUseWeakMap */.et ? WeakMap : Map)();\n this.config = (0,compact/* compact */.o)(config, {\n addTypename: config.addTypename !== false,\n canonizeResults: shouldCanonizeResults(config),\n });\n this.canon = config.canon || new ObjectCanon();\n // memoized functions in this class will be "garbage-collected"\n // by recreating the whole `StoreReader` in\n // `InMemoryCache.resetResultsCache`\n // (triggered from `InMemoryCache.gc` with `resetResultCache: true`)\n this.executeSelectionSet = (0,lib/* wrap */.LV)(function (options) {\n var _a;\n var canonizeResults = options.context.canonizeResults;\n var peekArgs = execSelectionSetKeyArgs(options);\n // Negate this boolean option so we can find out if we\'ve already read\n // this result using the other boolean value.\n peekArgs[3] = !canonizeResults;\n var other = (_a = _this.executeSelectionSet).peek.apply(_a, peekArgs);\n if (other) {\n if (canonizeResults) {\n return (0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, other), { \n // If we previously read this result without canonizing it, we can\n // reuse that result simply by canonizing it now.\n result: _this.canon.admit(other.result) });\n }\n // If we previously read this result with canonization enabled, we can\n // return that canonized result as-is.\n return other;\n }\n maybeDependOnExistenceOfEntity(options.context.store, options.enclosingRef.__ref);\n // Finally, if we didn\'t find any useful previous results, run the real\n // execSelectionSetImpl method with the given options.\n return _this.execSelectionSetImpl(options);\n }, {\n max: this.config.resultCacheMaxSize ||\n sizes/* cacheSizes */.v["inMemoryCache.executeSelectionSet"] ||\n 50000 /* defaultCacheSizes["inMemoryCache.executeSelectionSet"] */,\n keyArgs: execSelectionSetKeyArgs,\n // Note that the parameters of makeCacheKey are determined by the\n // array returned by keyArgs.\n makeCacheKey: function (selectionSet, parent, context, canonizeResults) {\n if (supportsResultCaching(context.store)) {\n return context.store.makeCacheKey(selectionSet, (0,storeUtils/* isReference */.A_)(parent) ? parent.__ref : parent, context.varString, canonizeResults);\n }\n },\n });\n this.executeSubSelectedArray = (0,lib/* wrap */.LV)(function (options) {\n maybeDependOnExistenceOfEntity(options.context.store, options.enclosingRef.__ref);\n return _this.execSubSelectedArrayImpl(options);\n }, {\n max: this.config.resultCacheMaxSize ||\n sizes/* cacheSizes */.v["inMemoryCache.executeSubSelectedArray"] ||\n 10000 /* defaultCacheSizes["inMemoryCache.executeSubSelectedArray"] */,\n makeCacheKey: function (_a) {\n var field = _a.field, array = _a.array, context = _a.context;\n if (supportsResultCaching(context.store)) {\n return context.store.makeCacheKey(field, array, context.varString);\n }\n },\n });\n }\n StoreReader.prototype.resetCanon = function () {\n this.canon = new ObjectCanon();\n };\n /**\n * Given a store and a query, return as much of the result as possible and\n * identify if any data was missing from the store.\n */\n StoreReader.prototype.diffQueryAgainstStore = function (_a) {\n var store = _a.store, query = _a.query, _b = _a.rootId, rootId = _b === void 0 ? "ROOT_QUERY" : _b, variables = _a.variables, _c = _a.returnPartialData, returnPartialData = _c === void 0 ? true : _c, _d = _a.canonizeResults, canonizeResults = _d === void 0 ? this.config.canonizeResults : _d;\n var policies = this.config.cache.policies;\n variables = (0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, (0,getFromAST/* getDefaultValues */.wY)((0,getFromAST/* getQueryDefinition */.AT)(query))), variables);\n var rootRef = (0,storeUtils/* makeReference */.WU)(rootId);\n var execResult = this.executeSelectionSet({\n selectionSet: (0,getFromAST/* getMainDefinition */.Vn)(query).selectionSet,\n objectOrReference: rootRef,\n enclosingRef: rootRef,\n context: (0,tslib_es6/* __assign */.Cl)({ store: store, query: query, policies: policies, variables: variables, varString: (0,canonicalStringify/* canonicalStringify */.M)(variables), canonizeResults: canonizeResults }, extractFragmentContext(query, this.config.fragments)),\n });\n var missing;\n if (execResult.missing) {\n // For backwards compatibility we still report an array of\n // MissingFieldError objects, even though there will only ever be at most\n // one of them, now that all missing field error messages are grouped\n // together in the execResult.missing tree.\n missing = [\n new MissingFieldError(firstMissing(execResult.missing), execResult.missing, query, variables),\n ];\n if (!returnPartialData) {\n throw missing[0];\n }\n }\n return {\n result: execResult.result,\n complete: !missing,\n missing: missing,\n };\n };\n StoreReader.prototype.isFresh = function (result, parent, selectionSet, context) {\n if (supportsResultCaching(context.store) &&\n this.knownResults.get(result) === selectionSet) {\n var latest = this.executeSelectionSet.peek(selectionSet, parent, context, \n // If result is canonical, then it could only have been previously\n // cached by the canonizing version of executeSelectionSet, so we can\n // avoid checking both possibilities here.\n this.canon.isKnown(result));\n if (latest && result === latest.result) {\n return true;\n }\n }\n return false;\n };\n // Uncached version of executeSelectionSet.\n StoreReader.prototype.execSelectionSetImpl = function (_a) {\n var _this = this;\n var selectionSet = _a.selectionSet, objectOrReference = _a.objectOrReference, enclosingRef = _a.enclosingRef, context = _a.context;\n if ((0,storeUtils/* isReference */.A_)(objectOrReference) &&\n !context.policies.rootTypenamesById[objectOrReference.__ref] &&\n !context.store.has(objectOrReference.__ref)) {\n return {\n result: this.canon.empty,\n missing: "Dangling reference to missing ".concat(objectOrReference.__ref, " object"),\n };\n }\n var variables = context.variables, policies = context.policies, store = context.store;\n var typename = store.getFieldValue(objectOrReference, "__typename");\n var objectsToMerge = [];\n var missing;\n var missingMerger = new mergeDeep/* DeepMerger */.ZI();\n if (this.config.addTypename &&\n typeof typename === "string" &&\n !policies.rootIdsByTypename[typename]) {\n // Ensure we always include a default value for the __typename\n // field, if we have one, and this.config.addTypename is true. Note\n // that this field can be overridden by other merged objects.\n objectsToMerge.push({ __typename: typename });\n }\n function handleMissing(result, resultName) {\n var _a;\n if (result.missing) {\n missing = missingMerger.merge(missing, (_a = {},\n _a[resultName] = result.missing,\n _a));\n }\n return result.result;\n }\n var workSet = new Set(selectionSet.selections);\n workSet.forEach(function (selection) {\n var _a, _b;\n // Omit fields with directives @skip(if: <truthy value>) or\n // @include(if: <falsy value>).\n if (!(0,directives/* shouldInclude */.MS)(selection, variables))\n return;\n if ((0,storeUtils/* isField */.dt)(selection)) {\n var fieldValue = policies.readField({\n fieldName: selection.name.value,\n field: selection,\n variables: context.variables,\n from: objectOrReference,\n }, context);\n var resultName = (0,storeUtils/* resultKeyNameFromField */.ue)(selection);\n if (fieldValue === void 0) {\n if (!transform/* addTypenameToDocument */.XY.added(selection)) {\n missing = missingMerger.merge(missing, (_a = {},\n _a[resultName] = "Can\'t find field \'".concat(selection.name.value, "\' on ").concat((0,storeUtils/* isReference */.A_)(objectOrReference) ?\n objectOrReference.__ref + " object"\n : "object " + JSON.stringify(objectOrReference, null, 2)),\n _a));\n }\n }\n else if ((0,arrays/* isArray */.c)(fieldValue)) {\n if (fieldValue.length > 0) {\n fieldValue = handleMissing(_this.executeSubSelectedArray({\n field: selection,\n array: fieldValue,\n enclosingRef: enclosingRef,\n context: context,\n }), resultName);\n }\n }\n else if (!selection.selectionSet) {\n // If the field does not have a selection set, then we handle it\n // as a scalar value. To keep this.canon from canonicalizing\n // this value, we use this.canon.pass to wrap fieldValue in a\n // Pass object that this.canon.admit will later unwrap as-is.\n if (context.canonizeResults) {\n fieldValue = _this.canon.pass(fieldValue);\n }\n }\n else if (fieldValue != null) {\n // In this case, because we know the field has a selection set,\n // it must be trying to query a GraphQLObjectType, which is why\n // fieldValue must be != null.\n fieldValue = handleMissing(_this.executeSelectionSet({\n selectionSet: selection.selectionSet,\n objectOrReference: fieldValue,\n enclosingRef: (0,storeUtils/* isReference */.A_)(fieldValue) ? fieldValue : enclosingRef,\n context: context,\n }), resultName);\n }\n if (fieldValue !== void 0) {\n objectsToMerge.push((_b = {}, _b[resultName] = fieldValue, _b));\n }\n }\n else {\n var fragment = (0,graphql_fragments/* getFragmentFromSelection */.HQ)(selection, context.lookupFragment);\n if (!fragment && selection.kind === kinds/* Kind */.b.FRAGMENT_SPREAD) {\n throw (0,globals/* newInvariantError */.vA)(9, selection.name.value);\n }\n if (fragment && policies.fragmentMatches(fragment, typename)) {\n fragment.selectionSet.selections.forEach(workSet.add, workSet);\n }\n }\n });\n var result = (0,mergeDeep/* mergeDeepArray */.IM)(objectsToMerge);\n var finalResult = { result: result, missing: missing };\n var frozen = context.canonizeResults ?\n this.canon.admit(finalResult)\n // Since this.canon is normally responsible for freezing results (only in\n // development), freeze them manually if canonization is disabled.\n : (0,maybeDeepFreeze/* maybeDeepFreeze */.G)(finalResult);\n // Store this result with its selection set so that we can quickly\n // recognize it again in the StoreReader#isFresh method.\n if (frozen.result) {\n this.knownResults.set(frozen.result, selectionSet);\n }\n return frozen;\n };\n // Uncached version of executeSubSelectedArray.\n StoreReader.prototype.execSubSelectedArrayImpl = function (_a) {\n var _this = this;\n var field = _a.field, array = _a.array, enclosingRef = _a.enclosingRef, context = _a.context;\n var missing;\n var missingMerger = new mergeDeep/* DeepMerger */.ZI();\n function handleMissing(childResult, i) {\n var _a;\n if (childResult.missing) {\n missing = missingMerger.merge(missing, (_a = {}, _a[i] = childResult.missing, _a));\n }\n return childResult.result;\n }\n if (field.selectionSet) {\n array = array.filter(context.store.canRead);\n }\n array = array.map(function (item, i) {\n // null value in array\n if (item === null) {\n return null;\n }\n // This is a nested array, recurse\n if ((0,arrays/* isArray */.c)(item)) {\n return handleMissing(_this.executeSubSelectedArray({\n field: field,\n array: item,\n enclosingRef: enclosingRef,\n context: context,\n }), i);\n }\n // This is an object, run the selection set on it\n if (field.selectionSet) {\n return handleMissing(_this.executeSelectionSet({\n selectionSet: field.selectionSet,\n objectOrReference: item,\n enclosingRef: (0,storeUtils/* isReference */.A_)(item) ? item : enclosingRef,\n context: context,\n }), i);\n }\n if (globalThis.__DEV__ !== false) {\n assertSelectionSetForIdValue(context.store, field, item);\n }\n return item;\n });\n return {\n result: context.canonizeResults ? this.canon.admit(array) : array,\n missing: missing,\n };\n };\n return StoreReader;\n}());\n\nfunction firstMissing(tree) {\n try {\n JSON.stringify(tree, function (_, value) {\n if (typeof value === "string")\n throw value;\n return value;\n });\n }\n catch (result) {\n return result;\n }\n}\nfunction assertSelectionSetForIdValue(store, field, fieldValue) {\n if (!field.selectionSet) {\n var workSet_1 = new Set([fieldValue]);\n workSet_1.forEach(function (value) {\n if ((0,objects/* isNonNullObject */.U)(value)) {\n (0,globals/* invariant */.V1)(\n !(0,storeUtils/* isReference */.A_)(value),\n 10,\n getTypenameFromStoreObject(store, value),\n field.name.value\n );\n Object.values(value).forEach(workSet_1.add, workSet_1);\n }\n });\n }\n}\n//# sourceMappingURL=readFromStore.js.map\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/common/cloneDeep.js\nvar cloneDeep = __webpack_require__(1495);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/common/stringifyForDisplay.js\nvar stringifyForDisplay = __webpack_require__(6194);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/cache/inmemory/reactiveVars.js\nvar reactiveVars = __webpack_require__(738);\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/cache/inmemory/key-extractor.js\n\n\n\n// Mapping from JSON-encoded KeySpecifier strings to associated information.\nvar specifierInfoCache = Object.create(null);\nfunction lookupSpecifierInfo(spec) {\n // It\'s safe to encode KeySpecifier arrays with JSON.stringify, since they\'re\n // just arrays of strings or nested KeySpecifier arrays, and the order of the\n // array elements is important (and suitably preserved by JSON.stringify).\n var cacheKey = JSON.stringify(spec);\n return (specifierInfoCache[cacheKey] ||\n (specifierInfoCache[cacheKey] = Object.create(null)));\n}\nfunction keyFieldsFnFromSpecifier(specifier) {\n var info = lookupSpecifierInfo(specifier);\n return (info.keyFieldsFn || (info.keyFieldsFn = function (object, context) {\n var extract = function (from, key) {\n return context.readField(key, from);\n };\n var keyObject = (context.keyObject = collectSpecifierPaths(specifier, function (schemaKeyPath) {\n var extracted = extractKeyPath(context.storeObject, schemaKeyPath, \n // Using context.readField to extract paths from context.storeObject\n // allows the extraction to see through Reference objects and respect\n // custom read functions.\n extract);\n if (extracted === void 0 &&\n object !== context.storeObject &&\n hasOwn.call(object, schemaKeyPath[0])) {\n // If context.storeObject fails to provide a value for the requested\n // path, fall back to the raw result object, if it has a top-level key\n // matching the first key in the path (schemaKeyPath[0]). This allows\n // key fields included in the written data to be saved in the cache\n // even if they are not selected explicitly in context.selectionSet.\n // Not being mentioned by context.selectionSet is convenient here,\n // since it means these extra fields cannot be affected by field\n // aliasing, which is why we can use extractKey instead of\n // context.readField for this extraction.\n extracted = extractKeyPath(object, schemaKeyPath, extractKey);\n }\n (0,globals/* invariant */.V1)(extracted !== void 0, 4, schemaKeyPath.join("."), object);\n return extracted;\n }));\n return "".concat(context.typename, ":").concat(JSON.stringify(keyObject));\n }));\n}\n// The keyArgs extraction process is roughly analogous to keyFields extraction,\n// but there are no aliases involved, missing fields are tolerated (by merely\n// omitting them from the key), and drawing from field.directives or variables\n// is allowed (in addition to drawing from the field\'s arguments object).\n// Concretely, these differences mean passing a different key path extractor\n// function to collectSpecifierPaths, reusing the shared extractKeyPath helper\n// wherever possible.\nfunction keyArgsFnFromSpecifier(specifier) {\n var info = lookupSpecifierInfo(specifier);\n return (info.keyArgsFn ||\n (info.keyArgsFn = function (args, _a) {\n var field = _a.field, variables = _a.variables, fieldName = _a.fieldName;\n var collected = collectSpecifierPaths(specifier, function (keyPath) {\n var firstKey = keyPath[0];\n var firstChar = firstKey.charAt(0);\n if (firstChar === "@") {\n if (field && (0,arrays/* isNonEmptyArray */.E)(field.directives)) {\n var directiveName_1 = firstKey.slice(1);\n // If the directive appears multiple times, only the first\n // occurrence\'s arguments will be used. TODO Allow repetition?\n // TODO Cache this work somehow, a la aliasMap?\n var d = field.directives.find(function (d) { return d.name.value === directiveName_1; });\n // Fortunately argumentsObjectFromField works for DirectiveNode!\n var directiveArgs = d && (0,storeUtils/* argumentsObjectFromField */.MB)(d, variables);\n // For directives without arguments (d defined, but directiveArgs ===\n // null), the presence or absence of the directive still counts as\n // part of the field key, so we return null in those cases. If no\n // directive with this name was found for this field (d undefined and\n // thus directiveArgs undefined), we return undefined, which causes\n // this value to be omitted from the key object returned by\n // collectSpecifierPaths.\n return (directiveArgs &&\n extractKeyPath(directiveArgs, \n // If keyPath.length === 1, this code calls extractKeyPath with an\n // empty path, which works because it uses directiveArgs as the\n // extracted value.\n keyPath.slice(1)));\n }\n // If the key started with @ but there was no corresponding directive,\n // we want to omit this value from the key object, not fall through to\n // treating @whatever as a normal argument name.\n return;\n }\n if (firstChar === "$") {\n var variableName = firstKey.slice(1);\n if (variables && hasOwn.call(variables, variableName)) {\n var varKeyPath = keyPath.slice(0);\n varKeyPath[0] = variableName;\n return extractKeyPath(variables, varKeyPath);\n }\n // If the key started with $ but there was no corresponding variable, we\n // want to omit this value from the key object, not fall through to\n // treating $whatever as a normal argument name.\n return;\n }\n if (args) {\n return extractKeyPath(args, keyPath);\n }\n });\n var suffix = JSON.stringify(collected);\n // If no arguments were passed to this field, and it didn\'t have any other\n // field key contributions from directives or variables, hide the empty\n // :{} suffix from the field key. However, a field passed no arguments can\n // still end up with a non-empty :{...} suffix if its key configuration\n // refers to directives or variables.\n if (args || suffix !== "{}") {\n fieldName += ":" + suffix;\n }\n return fieldName;\n }));\n}\nfunction collectSpecifierPaths(specifier, extractor) {\n // For each path specified by specifier, invoke the extractor, and repeatedly\n // merge the results together, with appropriate ancestor context.\n var merger = new mergeDeep/* DeepMerger */.ZI();\n return getSpecifierPaths(specifier).reduce(function (collected, path) {\n var _a;\n var toMerge = extractor(path);\n if (toMerge !== void 0) {\n // This path is not expected to contain array indexes, so the toMerge\n // reconstruction will not contain arrays. TODO Fix this?\n for (var i = path.length - 1; i >= 0; --i) {\n toMerge = (_a = {}, _a[path[i]] = toMerge, _a);\n }\n collected = merger.merge(collected, toMerge);\n }\n return collected;\n }, Object.create(null));\n}\nfunction getSpecifierPaths(spec) {\n var info = lookupSpecifierInfo(spec);\n if (!info.paths) {\n var paths_1 = (info.paths = []);\n var currentPath_1 = [];\n spec.forEach(function (s, i) {\n if ((0,arrays/* isArray */.c)(s)) {\n getSpecifierPaths(s).forEach(function (p) { return paths_1.push(currentPath_1.concat(p)); });\n currentPath_1.length = 0;\n }\n else {\n currentPath_1.push(s);\n if (!(0,arrays/* isArray */.c)(spec[i + 1])) {\n paths_1.push(currentPath_1.slice(0));\n currentPath_1.length = 0;\n }\n }\n });\n }\n return info.paths;\n}\nfunction extractKey(object, key) {\n return object[key];\n}\nfunction extractKeyPath(object, path, extract) {\n // For each key in path, extract the corresponding child property from obj,\n // flattening arrays if encountered (uncommon for keyFields and keyArgs, but\n // possible). The final result of path.reduce is normalized so unexpected leaf\n // objects have their keys safely sorted. That final result is difficult to\n // type as anything other than any. You\'re welcome to try to improve the\n // return type, but keep in mind extractKeyPath is not a public function\n // (exported only for testing), so the effort may not be worthwhile unless the\n // limited set of actual callers (see above) pass arguments that TypeScript\n // can statically type. If we know only that path is some array of strings\n // (and not, say, a specific tuple of statically known strings), any (or\n // possibly unknown) is the honest answer.\n extract = extract || extractKey;\n return normalize(path.reduce(function reducer(obj, key) {\n return (0,arrays/* isArray */.c)(obj) ?\n obj.map(function (child) { return reducer(child, key); })\n : obj && extract(obj, key);\n }, object));\n}\nfunction normalize(value) {\n // Usually the extracted value will be a scalar value, since most primary\n // key fields are scalar, but just in case we get an object or an array, we\n // need to do some normalization of the order of (nested) keys.\n if ((0,objects/* isNonNullObject */.U)(value)) {\n if ((0,arrays/* isArray */.c)(value)) {\n return value.map(normalize);\n }\n return collectSpecifierPaths(Object.keys(value).sort(), function (path) {\n return extractKeyPath(value, path);\n });\n }\n return value;\n}\n//# sourceMappingURL=key-extractor.js.map\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/cache/inmemory/policies.js\n\n\n\n\n\n\nfunction argsFromFieldSpecifier(spec) {\n return (spec.args !== void 0 ? spec.args\n : spec.field ? (0,storeUtils/* argumentsObjectFromField */.MB)(spec.field, spec.variables)\n : null);\n}\nvar nullKeyFieldsFn = function () { return void 0; };\nvar simpleKeyArgsFn = function (_args, context) { return context.fieldName; };\n// These merge functions can be selected by specifying merge:true or\n// merge:false in a field policy.\nvar mergeTrueFn = function (existing, incoming, _a) {\n var mergeObjects = _a.mergeObjects;\n return mergeObjects(existing, incoming);\n};\nvar mergeFalseFn = function (_, incoming) { return incoming; };\nvar Policies = /** @class */ (function () {\n function Policies(config) {\n this.config = config;\n this.typePolicies = Object.create(null);\n this.toBeAdded = Object.create(null);\n // Map from subtype names to sets of supertype names. Note that this\n // representation inverts the structure of possibleTypes (whose keys are\n // supertypes and whose values are arrays of subtypes) because it tends\n // to be much more efficient to search upwards than downwards.\n this.supertypeMap = new Map();\n // Any fuzzy subtypes specified by possibleTypes will be converted to\n // RegExp objects and recorded here. Every key of this map can also be\n // found in supertypeMap. In many cases this Map will be empty, which\n // means no fuzzy subtype checking will happen in fragmentMatches.\n this.fuzzySubtypes = new Map();\n this.rootIdsByTypename = Object.create(null);\n this.rootTypenamesById = Object.create(null);\n this.usingPossibleTypes = false;\n this.config = (0,tslib_es6/* __assign */.Cl)({ dataIdFromObject: defaultDataIdFromObject }, config);\n this.cache = this.config.cache;\n this.setRootTypename("Query");\n this.setRootTypename("Mutation");\n this.setRootTypename("Subscription");\n if (config.possibleTypes) {\n this.addPossibleTypes(config.possibleTypes);\n }\n if (config.typePolicies) {\n this.addTypePolicies(config.typePolicies);\n }\n }\n Policies.prototype.identify = function (object, partialContext) {\n var _a;\n var policies = this;\n var typename = (partialContext &&\n (partialContext.typename || ((_a = partialContext.storeObject) === null || _a === void 0 ? void 0 : _a.__typename))) ||\n object.__typename;\n // It should be possible to write root Query fields with writeFragment,\n // using { __typename: "Query", ... } as the data, but it does not make\n // sense to allow the same identification behavior for the Mutation and\n // Subscription types, since application code should never be writing\n // directly to (or reading directly from) those root objects.\n if (typename === this.rootTypenamesById.ROOT_QUERY) {\n return ["ROOT_QUERY"];\n }\n // Default context.storeObject to object if not otherwise provided.\n var storeObject = (partialContext && partialContext.storeObject) || object;\n var context = (0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, partialContext), { typename: typename, storeObject: storeObject, readField: (partialContext && partialContext.readField) ||\n function () {\n var options = normalizeReadFieldOptions(arguments, storeObject);\n return policies.readField(options, {\n store: policies.cache["data"],\n variables: options.variables,\n });\n } });\n var id;\n var policy = typename && this.getTypePolicy(typename);\n var keyFn = (policy && policy.keyFn) || this.config.dataIdFromObject;\n while (keyFn) {\n var specifierOrId = keyFn((0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, object), storeObject), context);\n if ((0,arrays/* isArray */.c)(specifierOrId)) {\n keyFn = keyFieldsFnFromSpecifier(specifierOrId);\n }\n else {\n id = specifierOrId;\n break;\n }\n }\n id = id ? String(id) : void 0;\n return context.keyObject ? [id, context.keyObject] : [id];\n };\n Policies.prototype.addTypePolicies = function (typePolicies) {\n var _this = this;\n Object.keys(typePolicies).forEach(function (typename) {\n var _a = typePolicies[typename], queryType = _a.queryType, mutationType = _a.mutationType, subscriptionType = _a.subscriptionType, incoming = (0,tslib_es6/* __rest */.Tt)(_a, ["queryType", "mutationType", "subscriptionType"]);\n // Though {query,mutation,subscription}Type configurations are rare,\n // it\'s important to call setRootTypename as early as possible,\n // since these configurations should apply consistently for the\n // entire lifetime of the cache. Also, since only one __typename can\n // qualify as one of these root types, these three properties cannot\n // be inherited, unlike the rest of the incoming properties. That\n // restriction is convenient, because the purpose of this.toBeAdded\n // is to delay the processing of type/field policies until the first\n // time they\'re used, allowing policies to be added in any order as\n // long as all relevant policies (including policies for supertypes)\n // have been added by the time a given policy is used for the first\n // time. In other words, since inheritance doesn\'t matter for these\n // properties, there\'s also no need to delay their processing using\n // the this.toBeAdded queue.\n if (queryType)\n _this.setRootTypename("Query", typename);\n if (mutationType)\n _this.setRootTypename("Mutation", typename);\n if (subscriptionType)\n _this.setRootTypename("Subscription", typename);\n if (hasOwn.call(_this.toBeAdded, typename)) {\n _this.toBeAdded[typename].push(incoming);\n }\n else {\n _this.toBeAdded[typename] = [incoming];\n }\n });\n };\n Policies.prototype.updateTypePolicy = function (typename, incoming) {\n var _this = this;\n var existing = this.getTypePolicy(typename);\n var keyFields = incoming.keyFields, fields = incoming.fields;\n function setMerge(existing, merge) {\n existing.merge =\n typeof merge === "function" ? merge\n // Pass merge:true as a shorthand for a merge implementation\n // that returns options.mergeObjects(existing, incoming).\n : merge === true ? mergeTrueFn\n // Pass merge:false to make incoming always replace existing\n // without any warnings about data clobbering.\n : merge === false ? mergeFalseFn\n : existing.merge;\n }\n // Type policies can define merge functions, as an alternative to\n // using field policies to merge child objects.\n setMerge(existing, incoming.merge);\n existing.keyFn =\n // Pass false to disable normalization for this typename.\n keyFields === false ? nullKeyFieldsFn\n // Pass an array of strings to use those fields to compute a\n // composite ID for objects of this typename.\n : (0,arrays/* isArray */.c)(keyFields) ? keyFieldsFnFromSpecifier(keyFields)\n // Pass a function to take full control over identification.\n : typeof keyFields === "function" ? keyFields\n // Leave existing.keyFn unchanged if above cases fail.\n : existing.keyFn;\n if (fields) {\n Object.keys(fields).forEach(function (fieldName) {\n var existing = _this.getFieldPolicy(typename, fieldName, true);\n var incoming = fields[fieldName];\n if (typeof incoming === "function") {\n existing.read = incoming;\n }\n else {\n var keyArgs = incoming.keyArgs, read = incoming.read, merge = incoming.merge;\n existing.keyFn =\n // Pass false to disable argument-based differentiation of\n // field identities.\n keyArgs === false ? simpleKeyArgsFn\n // Pass an array of strings to use named arguments to\n // compute a composite identity for the field.\n : (0,arrays/* isArray */.c)(keyArgs) ? keyArgsFnFromSpecifier(keyArgs)\n // Pass a function to take full control over field identity.\n : typeof keyArgs === "function" ? keyArgs\n // Leave existing.keyFn unchanged if above cases fail.\n : existing.keyFn;\n if (typeof read === "function") {\n existing.read = read;\n }\n setMerge(existing, merge);\n }\n if (existing.read && existing.merge) {\n // If we have both a read and a merge function, assume\n // keyArgs:false, because read and merge together can take\n // responsibility for interpreting arguments in and out. This\n // default assumption can always be overridden by specifying\n // keyArgs explicitly in the FieldPolicy.\n existing.keyFn = existing.keyFn || simpleKeyArgsFn;\n }\n });\n }\n };\n Policies.prototype.setRootTypename = function (which, typename) {\n if (typename === void 0) { typename = which; }\n var rootId = "ROOT_" + which.toUpperCase();\n var old = this.rootTypenamesById[rootId];\n if (typename !== old) {\n (0,globals/* invariant */.V1)(!old || old === which, 5, which);\n // First, delete any old __typename associated with this rootId from\n // rootIdsByTypename.\n if (old)\n delete this.rootIdsByTypename[old];\n // Now make this the only __typename that maps to this rootId.\n this.rootIdsByTypename[typename] = rootId;\n // Finally, update the __typename associated with this rootId.\n this.rootTypenamesById[rootId] = typename;\n }\n };\n Policies.prototype.addPossibleTypes = function (possibleTypes) {\n var _this = this;\n this.usingPossibleTypes = true;\n Object.keys(possibleTypes).forEach(function (supertype) {\n // Make sure all types have an entry in this.supertypeMap, even if\n // their supertype set is empty, so we can return false immediately\n // from policies.fragmentMatches for unknown supertypes.\n _this.getSupertypeSet(supertype, true);\n possibleTypes[supertype].forEach(function (subtype) {\n _this.getSupertypeSet(subtype, true).add(supertype);\n var match = subtype.match(TypeOrFieldNameRegExp);\n if (!match || match[0] !== subtype) {\n // TODO Don\'t interpret just any invalid typename as a RegExp.\n _this.fuzzySubtypes.set(subtype, new RegExp(subtype));\n }\n });\n });\n };\n Policies.prototype.getTypePolicy = function (typename) {\n var _this = this;\n if (!hasOwn.call(this.typePolicies, typename)) {\n var policy_1 = (this.typePolicies[typename] = Object.create(null));\n policy_1.fields = Object.create(null);\n // When the TypePolicy for typename is first accessed, instead of\n // starting with an empty policy object, inherit any properties or\n // fields from the type policies of the supertypes of typename.\n //\n // Any properties or fields defined explicitly within the TypePolicy\n // for typename will take precedence, and if there are multiple\n // supertypes, the properties of policies whose types were added\n // later via addPossibleTypes will take precedence over those of\n // earlier supertypes. TODO Perhaps we should warn about these\n // conflicts in development, and recommend defining the property\n // explicitly in the subtype policy?\n //\n // Field policy inheritance is atomic/shallow: you can\'t inherit a\n // field policy and then override just its read function, since read\n // and merge functions often need to cooperate, so changing only one\n // of them would be a recipe for inconsistency.\n //\n // Once the TypePolicy for typename has been accessed, its properties can\n // still be updated directly using addTypePolicies, but future changes to\n // inherited supertype policies will not be reflected in this subtype\n // policy, because this code runs at most once per typename.\n var supertypes_1 = this.supertypeMap.get(typename);\n if (!supertypes_1 && this.fuzzySubtypes.size) {\n // To make the inheritance logic work for unknown typename strings that\n // may have fuzzy supertypes, we give this typename an empty supertype\n // set and then populate it with any fuzzy supertypes that match.\n supertypes_1 = this.getSupertypeSet(typename, true);\n // This only works for typenames that are directly matched by a fuzzy\n // supertype. What if there is an intermediate chain of supertypes?\n // While possible, that situation can only be solved effectively by\n // specifying the intermediate relationships via possibleTypes, manually\n // and in a non-fuzzy way.\n this.fuzzySubtypes.forEach(function (regExp, fuzzy) {\n if (regExp.test(typename)) {\n // The fuzzy parameter is just the original string version of regExp\n // (not a valid __typename string), but we can look up the\n // associated supertype(s) in this.supertypeMap.\n var fuzzySupertypes = _this.supertypeMap.get(fuzzy);\n if (fuzzySupertypes) {\n fuzzySupertypes.forEach(function (supertype) {\n return supertypes_1.add(supertype);\n });\n }\n }\n });\n }\n if (supertypes_1 && supertypes_1.size) {\n supertypes_1.forEach(function (supertype) {\n var _a = _this.getTypePolicy(supertype), fields = _a.fields, rest = (0,tslib_es6/* __rest */.Tt)(_a, ["fields"]);\n Object.assign(policy_1, rest);\n Object.assign(policy_1.fields, fields);\n });\n }\n }\n var inbox = this.toBeAdded[typename];\n if (inbox && inbox.length) {\n // Merge the pending policies into this.typePolicies, in the order they\n // were originally passed to addTypePolicy.\n inbox.splice(0).forEach(function (policy) {\n _this.updateTypePolicy(typename, policy);\n });\n }\n return this.typePolicies[typename];\n };\n Policies.prototype.getFieldPolicy = function (typename, fieldName, createIfMissing) {\n if (typename) {\n var fieldPolicies = this.getTypePolicy(typename).fields;\n return (fieldPolicies[fieldName] ||\n (createIfMissing && (fieldPolicies[fieldName] = Object.create(null))));\n }\n };\n Policies.prototype.getSupertypeSet = function (subtype, createIfMissing) {\n var supertypeSet = this.supertypeMap.get(subtype);\n if (!supertypeSet && createIfMissing) {\n this.supertypeMap.set(subtype, (supertypeSet = new Set()));\n }\n return supertypeSet;\n };\n Policies.prototype.fragmentMatches = function (fragment, typename, result, variables) {\n var _this = this;\n if (!fragment.typeCondition)\n return true;\n // If the fragment has a type condition but the object we\'re matching\n // against does not have a __typename, the fragment cannot match.\n if (!typename)\n return false;\n var supertype = fragment.typeCondition.name.value;\n // Common case: fragment type condition and __typename are the same.\n if (typename === supertype)\n return true;\n if (this.usingPossibleTypes && this.supertypeMap.has(supertype)) {\n var typenameSupertypeSet = this.getSupertypeSet(typename, true);\n var workQueue_1 = [typenameSupertypeSet];\n var maybeEnqueue_1 = function (subtype) {\n var supertypeSet = _this.getSupertypeSet(subtype, false);\n if (supertypeSet &&\n supertypeSet.size &&\n workQueue_1.indexOf(supertypeSet) < 0) {\n workQueue_1.push(supertypeSet);\n }\n };\n // We need to check fuzzy subtypes only if we encountered fuzzy\n // subtype strings in addPossibleTypes, and only while writing to\n // the cache, since that\'s when selectionSetMatchesResult gives a\n // strong signal of fragment matching. The StoreReader class calls\n // policies.fragmentMatches without passing a result object, so\n // needToCheckFuzzySubtypes is always false while reading.\n var needToCheckFuzzySubtypes = !!(result && this.fuzzySubtypes.size);\n var checkingFuzzySubtypes = false;\n // It\'s important to keep evaluating workQueue.length each time through\n // the loop, because the queue can grow while we\'re iterating over it.\n for (var i = 0; i < workQueue_1.length; ++i) {\n var supertypeSet = workQueue_1[i];\n if (supertypeSet.has(supertype)) {\n if (!typenameSupertypeSet.has(supertype)) {\n if (checkingFuzzySubtypes) {\n globalThis.__DEV__ !== false && globals/* invariant */.V1.warn(6, typename, supertype);\n }\n // Record positive results for faster future lookup.\n // Unfortunately, we cannot safely cache negative results,\n // because new possibleTypes data could always be added to the\n // Policies class.\n typenameSupertypeSet.add(supertype);\n }\n return true;\n }\n supertypeSet.forEach(maybeEnqueue_1);\n if (needToCheckFuzzySubtypes &&\n // Start checking fuzzy subtypes only after exhausting all\n // non-fuzzy subtypes (after the final iteration of the loop).\n i === workQueue_1.length - 1 &&\n // We could wait to compare fragment.selectionSet to result\n // after we verify the supertype, but this check is often less\n // expensive than that search, and we will have to do the\n // comparison anyway whenever we find a potential match.\n selectionSetMatchesResult(fragment.selectionSet, result, variables)) {\n // We don\'t always need to check fuzzy subtypes (if no result\n // was provided, or !this.fuzzySubtypes.size), but, when we do,\n // we only want to check them once.\n needToCheckFuzzySubtypes = false;\n checkingFuzzySubtypes = true;\n // If we find any fuzzy subtypes that match typename, extend the\n // workQueue to search through the supertypes of those fuzzy\n // subtypes. Otherwise the for-loop will terminate and we\'ll\n // return false below.\n this.fuzzySubtypes.forEach(function (regExp, fuzzyString) {\n var match = typename.match(regExp);\n if (match && match[0] === typename) {\n maybeEnqueue_1(fuzzyString);\n }\n });\n }\n }\n }\n return false;\n };\n Policies.prototype.hasKeyArgs = function (typename, fieldName) {\n var policy = this.getFieldPolicy(typename, fieldName, false);\n return !!(policy && policy.keyFn);\n };\n Policies.prototype.getStoreFieldName = function (fieldSpec) {\n var typename = fieldSpec.typename, fieldName = fieldSpec.fieldName;\n var policy = this.getFieldPolicy(typename, fieldName, false);\n var storeFieldName;\n var keyFn = policy && policy.keyFn;\n if (keyFn && typename) {\n var context = {\n typename: typename,\n fieldName: fieldName,\n field: fieldSpec.field || null,\n variables: fieldSpec.variables,\n };\n var args = argsFromFieldSpecifier(fieldSpec);\n while (keyFn) {\n var specifierOrString = keyFn(args, context);\n if ((0,arrays/* isArray */.c)(specifierOrString)) {\n keyFn = keyArgsFnFromSpecifier(specifierOrString);\n }\n else {\n // If the custom keyFn returns a falsy value, fall back to\n // fieldName instead.\n storeFieldName = specifierOrString || fieldName;\n break;\n }\n }\n }\n if (storeFieldName === void 0) {\n storeFieldName =\n fieldSpec.field ?\n (0,storeUtils/* storeKeyNameFromField */.Ii)(fieldSpec.field, fieldSpec.variables)\n : (0,storeUtils/* getStoreKeyName */.o5)(fieldName, argsFromFieldSpecifier(fieldSpec));\n }\n // Returning false from a keyArgs function is like configuring\n // keyArgs: false, but more dynamic.\n if (storeFieldName === false) {\n return fieldName;\n }\n // Make sure custom field names start with the actual field.name.value\n // of the field, so we can always figure out which properties of a\n // StoreObject correspond to which original field names.\n return fieldName === fieldNameFromStoreName(storeFieldName) ? storeFieldName\n : fieldName + ":" + storeFieldName;\n };\n Policies.prototype.readField = function (options, context) {\n var objectOrReference = options.from;\n if (!objectOrReference)\n return;\n var nameOrField = options.field || options.fieldName;\n if (!nameOrField)\n return;\n if (options.typename === void 0) {\n var typename = context.store.getFieldValue(objectOrReference, "__typename");\n if (typename)\n options.typename = typename;\n }\n var storeFieldName = this.getStoreFieldName(options);\n var fieldName = fieldNameFromStoreName(storeFieldName);\n var existing = context.store.getFieldValue(objectOrReference, storeFieldName);\n var policy = this.getFieldPolicy(options.typename, fieldName, false);\n var read = policy && policy.read;\n if (read) {\n var readOptions = makeFieldFunctionOptions(this, objectOrReference, options, context, context.store.getStorage((0,storeUtils/* isReference */.A_)(objectOrReference) ?\n objectOrReference.__ref\n : objectOrReference, storeFieldName));\n // Call read(existing, readOptions) with cacheSlot holding this.cache.\n return reactiveVars/* cacheSlot */.bl.withValue(this.cache, read, [\n existing,\n readOptions,\n ]);\n }\n return existing;\n };\n Policies.prototype.getReadFunction = function (typename, fieldName) {\n var policy = this.getFieldPolicy(typename, fieldName, false);\n return policy && policy.read;\n };\n Policies.prototype.getMergeFunction = function (parentTypename, fieldName, childTypename) {\n var policy = this.getFieldPolicy(parentTypename, fieldName, false);\n var merge = policy && policy.merge;\n if (!merge && childTypename) {\n policy = this.getTypePolicy(childTypename);\n merge = policy && policy.merge;\n }\n return merge;\n };\n Policies.prototype.runMergeFunction = function (existing, incoming, _a, context, storage) {\n var field = _a.field, typename = _a.typename, merge = _a.merge;\n if (merge === mergeTrueFn) {\n // Instead of going to the trouble of creating a full\n // FieldFunctionOptions object and calling mergeTrueFn, we can\n // simply call mergeObjects, as mergeTrueFn would.\n return makeMergeObjectsFunction(context.store)(existing, incoming);\n }\n if (merge === mergeFalseFn) {\n // Likewise for mergeFalseFn, whose implementation is even simpler.\n return incoming;\n }\n // If cache.writeQuery or cache.writeFragment was called with\n // options.overwrite set to true, we still call merge functions, but\n // the existing data is always undefined, so the merge function will\n // not attempt to combine the incoming data with the existing data.\n if (context.overwrite) {\n existing = void 0;\n }\n return merge(existing, incoming, makeFieldFunctionOptions(this, \n // Unlike options.readField for read functions, we do not fall\n // back to the current object if no foreignObjOrRef is provided,\n // because it\'s not clear what the current object should be for\n // merge functions: the (possibly undefined) existing object, or\n // the incoming object? If you think your merge function needs\n // to read sibling fields in order to produce a new value for\n // the current field, you might want to rethink your strategy,\n // because that\'s a recipe for making merge behavior sensitive\n // to the order in which fields are written into the cache.\n // However, readField(name, ref) is useful for merge functions\n // that need to deduplicate child objects and references.\n void 0, {\n typename: typename,\n fieldName: field.name.value,\n field: field,\n variables: context.variables,\n }, context, storage || Object.create(null)));\n };\n return Policies;\n}());\n\nfunction makeFieldFunctionOptions(policies, objectOrReference, fieldSpec, context, storage) {\n var storeFieldName = policies.getStoreFieldName(fieldSpec);\n var fieldName = fieldNameFromStoreName(storeFieldName);\n var variables = fieldSpec.variables || context.variables;\n var _a = context.store, toReference = _a.toReference, canRead = _a.canRead;\n return {\n args: argsFromFieldSpecifier(fieldSpec),\n field: fieldSpec.field || null,\n fieldName: fieldName,\n storeFieldName: storeFieldName,\n variables: variables,\n isReference: storeUtils/* isReference */.A_,\n toReference: toReference,\n storage: storage,\n cache: policies.cache,\n canRead: canRead,\n readField: function () {\n return policies.readField(normalizeReadFieldOptions(arguments, objectOrReference, variables), context);\n },\n mergeObjects: makeMergeObjectsFunction(context.store),\n };\n}\nfunction normalizeReadFieldOptions(readFieldArgs, objectOrReference, variables) {\n var fieldNameOrOptions = readFieldArgs[0], from = readFieldArgs[1], argc = readFieldArgs.length;\n var options;\n if (typeof fieldNameOrOptions === "string") {\n options = {\n fieldName: fieldNameOrOptions,\n // Default to objectOrReference only when no second argument was\n // passed for the from parameter, not when undefined is explicitly\n // passed as the second argument.\n from: argc > 1 ? from : objectOrReference,\n };\n }\n else {\n options = (0,tslib_es6/* __assign */.Cl)({}, fieldNameOrOptions);\n // Default to objectOrReference only when fieldNameOrOptions.from is\n // actually omitted, rather than just undefined.\n if (!hasOwn.call(options, "from")) {\n options.from = objectOrReference;\n }\n }\n if (globalThis.__DEV__ !== false && options.from === void 0) {\n globalThis.__DEV__ !== false && globals/* invariant */.V1.warn(7, (0,stringifyForDisplay/* stringifyForDisplay */.p)(Array.from(readFieldArgs)));\n }\n if (void 0 === options.variables) {\n options.variables = variables;\n }\n return options;\n}\nfunction makeMergeObjectsFunction(store) {\n return function mergeObjects(existing, incoming) {\n if ((0,arrays/* isArray */.c)(existing) || (0,arrays/* isArray */.c)(incoming)) {\n throw (0,globals/* newInvariantError */.vA)(8);\n }\n // These dynamic checks are necessary because the parameters of a\n // custom merge function can easily have the any type, so the type\n // system cannot always enforce the StoreObject | Reference parameter\n // types of options.mergeObjects.\n if ((0,objects/* isNonNullObject */.U)(existing) && (0,objects/* isNonNullObject */.U)(incoming)) {\n var eType = store.getFieldValue(existing, "__typename");\n var iType = store.getFieldValue(incoming, "__typename");\n var typesDiffer = eType && iType && eType !== iType;\n if (typesDiffer) {\n return incoming;\n }\n if ((0,storeUtils/* isReference */.A_)(existing) && storeValueIsStoreObject(incoming)) {\n // Update the normalized EntityStore for the entity identified by\n // existing.__ref, preferring/overwriting any fields contributed by the\n // newer incoming StoreObject.\n store.merge(existing.__ref, incoming);\n return existing;\n }\n if (storeValueIsStoreObject(existing) && (0,storeUtils/* isReference */.A_)(incoming)) {\n // Update the normalized EntityStore for the entity identified by\n // incoming.__ref, taking fields from the older existing object only if\n // those fields are not already present in the newer StoreObject\n // identified by incoming.__ref.\n store.merge(existing, incoming.__ref);\n return incoming;\n }\n if (storeValueIsStoreObject(existing) &&\n storeValueIsStoreObject(incoming)) {\n return (0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, existing), incoming);\n }\n }\n return incoming;\n };\n}\n//# sourceMappingURL=policies.js.map\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/cache/inmemory/writeToStore.js\n\n\n\n\n\n\n\n\n// Since there are only four possible combinations of context.clientOnly and\n// context.deferred values, we should need at most four "flavors" of any given\n// WriteContext. To avoid creating multiple copies of the same context, we cache\n// the contexts in the context.flavors Map (shared by all flavors) according to\n// their clientOnly and deferred values (always in that order).\nfunction getContextFlavor(context, clientOnly, deferred) {\n var key = "".concat(clientOnly).concat(deferred);\n var flavored = context.flavors.get(key);\n if (!flavored) {\n context.flavors.set(key, (flavored =\n context.clientOnly === clientOnly && context.deferred === deferred ?\n context\n : (0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, context), { clientOnly: clientOnly, deferred: deferred })));\n }\n return flavored;\n}\nvar StoreWriter = /** @class */ (function () {\n function StoreWriter(cache, reader, fragments) {\n this.cache = cache;\n this.reader = reader;\n this.fragments = fragments;\n }\n StoreWriter.prototype.writeToStore = function (store, _a) {\n var _this = this;\n var query = _a.query, result = _a.result, dataId = _a.dataId, variables = _a.variables, overwrite = _a.overwrite;\n var operationDefinition = (0,getFromAST/* getOperationDefinition */.Vu)(query);\n var merger = makeProcessedFieldsMerger();\n variables = (0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, (0,getFromAST/* getDefaultValues */.wY)(operationDefinition)), variables);\n var context = (0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({ store: store, written: Object.create(null), merge: function (existing, incoming) {\n return merger.merge(existing, incoming);\n }, variables: variables, varString: (0,canonicalStringify/* canonicalStringify */.M)(variables) }, extractFragmentContext(query, this.fragments)), { overwrite: !!overwrite, incomingById: new Map(), clientOnly: false, deferred: false, flavors: new Map() });\n var ref = this.processSelectionSet({\n result: result || Object.create(null),\n dataId: dataId,\n selectionSet: operationDefinition.selectionSet,\n mergeTree: { map: new Map() },\n context: context,\n });\n if (!(0,storeUtils/* isReference */.A_)(ref)) {\n throw (0,globals/* newInvariantError */.vA)(11, result);\n }\n // So far, the store has not been modified, so now it\'s time to process\n // context.incomingById and merge those incoming fields into context.store.\n context.incomingById.forEach(function (_a, dataId) {\n var storeObject = _a.storeObject, mergeTree = _a.mergeTree, fieldNodeSet = _a.fieldNodeSet;\n var entityRef = (0,storeUtils/* makeReference */.WU)(dataId);\n if (mergeTree && mergeTree.map.size) {\n var applied = _this.applyMerges(mergeTree, entityRef, storeObject, context);\n if ((0,storeUtils/* isReference */.A_)(applied)) {\n // Assume References returned by applyMerges have already been merged\n // into the store. See makeMergeObjectsFunction in policies.ts for an\n // example of how this can happen.\n return;\n }\n // Otherwise, applyMerges returned a StoreObject, whose fields we should\n // merge into the store (see store.merge statement below).\n storeObject = applied;\n }\n if (globalThis.__DEV__ !== false && !context.overwrite) {\n var fieldsWithSelectionSets_1 = Object.create(null);\n fieldNodeSet.forEach(function (field) {\n if (field.selectionSet) {\n fieldsWithSelectionSets_1[field.name.value] = true;\n }\n });\n var hasSelectionSet_1 = function (storeFieldName) {\n return fieldsWithSelectionSets_1[fieldNameFromStoreName(storeFieldName)] ===\n true;\n };\n var hasMergeFunction_1 = function (storeFieldName) {\n var childTree = mergeTree && mergeTree.map.get(storeFieldName);\n return Boolean(childTree && childTree.info && childTree.info.merge);\n };\n Object.keys(storeObject).forEach(function (storeFieldName) {\n // If a merge function was defined for this field, trust that it\n // did the right thing about (not) clobbering data. If the field\n // has no selection set, it\'s a scalar field, so it doesn\'t need\n // a merge function (even if it\'s an object, like JSON data).\n if (hasSelectionSet_1(storeFieldName) &&\n !hasMergeFunction_1(storeFieldName)) {\n warnAboutDataLoss(entityRef, storeObject, storeFieldName, context.store);\n }\n });\n }\n store.merge(dataId, storeObject);\n });\n // Any IDs written explicitly to the cache will be retained as\n // reachable root IDs for garbage collection purposes. Although this\n // logic includes root IDs like ROOT_QUERY and ROOT_MUTATION, their\n // retainment counts are effectively ignored because cache.gc() always\n // includes them in its root ID set.\n store.retain(ref.__ref);\n return ref;\n };\n StoreWriter.prototype.processSelectionSet = function (_a) {\n var _this = this;\n var dataId = _a.dataId, result = _a.result, selectionSet = _a.selectionSet, context = _a.context, \n // This object allows processSelectionSet to report useful information\n // to its callers without explicitly returning that information.\n mergeTree = _a.mergeTree;\n var policies = this.cache.policies;\n // This variable will be repeatedly updated using context.merge to\n // accumulate all fields that need to be written into the store.\n var incoming = Object.create(null);\n // If typename was not passed in, infer it. Note that typename is\n // always passed in for tricky-to-infer cases such as "Query" for\n // ROOT_QUERY.\n var typename = (dataId && policies.rootTypenamesById[dataId]) ||\n (0,storeUtils/* getTypenameFromResult */.D$)(result, selectionSet, context.fragmentMap) ||\n (dataId && context.store.get(dataId, "__typename"));\n if ("string" === typeof typename) {\n incoming.__typename = typename;\n }\n // This readField function will be passed as context.readField in the\n // KeyFieldsContext object created within policies.identify (called below).\n // In addition to reading from the existing context.store (thanks to the\n // policies.readField(options, context) line at the very bottom), this\n // version of readField can read from Reference objects that are currently\n // pending in context.incomingById, which is important whenever keyFields\n // need to be extracted from a child object that processSelectionSet has\n // turned into a Reference.\n var readField = function () {\n var options = normalizeReadFieldOptions(arguments, incoming, context.variables);\n if ((0,storeUtils/* isReference */.A_)(options.from)) {\n var info = context.incomingById.get(options.from.__ref);\n if (info) {\n var result_1 = policies.readField((0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, options), { from: info.storeObject }), context);\n if (result_1 !== void 0) {\n return result_1;\n }\n }\n }\n return policies.readField(options, context);\n };\n var fieldNodeSet = new Set();\n this.flattenFields(selectionSet, result, \n // This WriteContext will be the default context value for fields returned\n // by the flattenFields method, but some fields may be assigned a modified\n // context, depending on the presence of @client and other directives.\n context, typename).forEach(function (context, field) {\n var _a;\n var resultFieldKey = (0,storeUtils/* resultKeyNameFromField */.ue)(field);\n var value = result[resultFieldKey];\n fieldNodeSet.add(field);\n if (value !== void 0) {\n var storeFieldName = policies.getStoreFieldName({\n typename: typename,\n fieldName: field.name.value,\n field: field,\n variables: context.variables,\n });\n var childTree = getChildMergeTree(mergeTree, storeFieldName);\n var incomingValue = _this.processFieldValue(value, field, \n // Reset context.clientOnly and context.deferred to their default\n // values before processing nested selection sets.\n field.selectionSet ?\n getContextFlavor(context, false, false)\n : context, childTree);\n // To determine if this field holds a child object with a merge function\n // defined in its type policy (see PR #7070), we need to figure out the\n // child object\'s __typename.\n var childTypename = void 0;\n // The field\'s value can be an object that has a __typename only if the\n // field has a selection set. Otherwise incomingValue is scalar.\n if (field.selectionSet &&\n ((0,storeUtils/* isReference */.A_)(incomingValue) || storeValueIsStoreObject(incomingValue))) {\n childTypename = readField("__typename", incomingValue);\n }\n var merge = policies.getMergeFunction(typename, field.name.value, childTypename);\n if (merge) {\n childTree.info = {\n // TODO Check compatibility against any existing childTree.field?\n field: field,\n typename: typename,\n merge: merge,\n };\n }\n else {\n maybeRecycleChildMergeTree(mergeTree, storeFieldName);\n }\n incoming = context.merge(incoming, (_a = {},\n _a[storeFieldName] = incomingValue,\n _a));\n }\n else if (globalThis.__DEV__ !== false &&\n !context.clientOnly &&\n !context.deferred &&\n !transform/* addTypenameToDocument */.XY.added(field) &&\n // If the field has a read function, it may be a synthetic field or\n // provide a default value, so its absence from the written data should\n // not be cause for alarm.\n !policies.getReadFunction(typename, field.name.value)) {\n globalThis.__DEV__ !== false && globals/* invariant */.V1.error(12, (0,storeUtils/* resultKeyNameFromField */.ue)(field), result);\n }\n });\n // Identify the result object, even if dataId was already provided,\n // since we always need keyObject below.\n try {\n var _b = policies.identify(result, {\n typename: typename,\n selectionSet: selectionSet,\n fragmentMap: context.fragmentMap,\n storeObject: incoming,\n readField: readField,\n }), id = _b[0], keyObject = _b[1];\n // If dataId was not provided, fall back to the id just generated by\n // policies.identify.\n dataId = dataId || id;\n // Write any key fields that were used during identification, even if\n // they were not mentioned in the original query.\n if (keyObject) {\n // TODO Reverse the order of the arguments?\n incoming = context.merge(incoming, keyObject);\n }\n }\n catch (e) {\n // If dataId was provided, tolerate failure of policies.identify.\n if (!dataId)\n throw e;\n }\n if ("string" === typeof dataId) {\n var dataRef = (0,storeUtils/* makeReference */.WU)(dataId);\n // Avoid processing the same entity object using the same selection\n // set more than once. We use an array instead of a Set since most\n // entity IDs will be written using only one selection set, so the\n // size of this array is likely to be very small, meaning indexOf is\n // likely to be faster than Set.prototype.has.\n var sets = context.written[dataId] || (context.written[dataId] = []);\n if (sets.indexOf(selectionSet) >= 0)\n return dataRef;\n sets.push(selectionSet);\n // If we\'re about to write a result object into the store, but we\n // happen to know that the exact same (===) result object would be\n // returned if we were to reread the result with the same inputs,\n // then we can skip the rest of the processSelectionSet work for\n // this object, and immediately return a Reference to it.\n if (this.reader &&\n this.reader.isFresh(result, dataRef, selectionSet, context)) {\n return dataRef;\n }\n var previous_1 = context.incomingById.get(dataId);\n if (previous_1) {\n previous_1.storeObject = context.merge(previous_1.storeObject, incoming);\n previous_1.mergeTree = mergeMergeTrees(previous_1.mergeTree, mergeTree);\n fieldNodeSet.forEach(function (field) { return previous_1.fieldNodeSet.add(field); });\n }\n else {\n context.incomingById.set(dataId, {\n storeObject: incoming,\n // Save a reference to mergeTree only if it is not empty, because\n // empty MergeTrees may be recycled by maybeRecycleChildMergeTree and\n // reused for entirely different parts of the result tree.\n mergeTree: mergeTreeIsEmpty(mergeTree) ? void 0 : mergeTree,\n fieldNodeSet: fieldNodeSet,\n });\n }\n return dataRef;\n }\n return incoming;\n };\n StoreWriter.prototype.processFieldValue = function (value, field, context, mergeTree) {\n var _this = this;\n if (!field.selectionSet || value === null) {\n // In development, we need to clone scalar values so that they can be\n // safely frozen with maybeDeepFreeze in readFromStore.ts. In production,\n // it\'s cheaper to store the scalar values directly in the cache.\n return globalThis.__DEV__ !== false ? (0,cloneDeep/* cloneDeep */.m)(value) : value;\n }\n if ((0,arrays/* isArray */.c)(value)) {\n return value.map(function (item, i) {\n var value = _this.processFieldValue(item, field, context, getChildMergeTree(mergeTree, i));\n maybeRecycleChildMergeTree(mergeTree, i);\n return value;\n });\n }\n return this.processSelectionSet({\n result: value,\n selectionSet: field.selectionSet,\n context: context,\n mergeTree: mergeTree,\n });\n };\n // Implements https://spec.graphql.org/draft/#sec-Field-Collection, but with\n // some additions for tracking @client and @defer directives.\n StoreWriter.prototype.flattenFields = function (selectionSet, result, context, typename) {\n if (typename === void 0) { typename = (0,storeUtils/* getTypenameFromResult */.D$)(result, selectionSet, context.fragmentMap); }\n var fieldMap = new Map();\n var policies = this.cache.policies;\n var limitingTrie = new trie_lib/* Trie */.b(false); // No need for WeakMap, since limitingTrie does not escape.\n (function flatten(selectionSet, inheritedContext) {\n var visitedNode = limitingTrie.lookup(selectionSet, \n // Because we take inheritedClientOnly and inheritedDeferred into\n // consideration here (in addition to selectionSet), it\'s possible for\n // the same selection set to be flattened more than once, if it appears\n // in the query with different @client and/or @directive configurations.\n inheritedContext.clientOnly, inheritedContext.deferred);\n if (visitedNode.visited)\n return;\n visitedNode.visited = true;\n selectionSet.selections.forEach(function (selection) {\n if (!(0,directives/* shouldInclude */.MS)(selection, context.variables))\n return;\n var clientOnly = inheritedContext.clientOnly, deferred = inheritedContext.deferred;\n if (\n // Since the presence of @client or @defer on this field can only\n // cause clientOnly or deferred to become true, we can skip the\n // forEach loop if both clientOnly and deferred are already true.\n !(clientOnly && deferred) &&\n (0,arrays/* isNonEmptyArray */.E)(selection.directives)) {\n selection.directives.forEach(function (dir) {\n var name = dir.name.value;\n if (name === "client")\n clientOnly = true;\n if (name === "defer") {\n var args = (0,storeUtils/* argumentsObjectFromField */.MB)(dir, context.variables);\n // The @defer directive takes an optional args.if boolean\n // argument, similar to @include(if: boolean). Note that\n // @defer(if: false) does not make context.deferred false, but\n // instead behaves as if there was no @defer directive.\n if (!args || args.if !== false) {\n deferred = true;\n }\n // TODO In the future, we may want to record args.label using\n // context.deferred, if a label is specified.\n }\n });\n }\n if ((0,storeUtils/* isField */.dt)(selection)) {\n var existing = fieldMap.get(selection);\n if (existing) {\n // If this field has been visited along another recursive path\n // before, the final context should have clientOnly or deferred set\n // to true only if *all* paths have the directive (hence the &&).\n clientOnly = clientOnly && existing.clientOnly;\n deferred = deferred && existing.deferred;\n }\n fieldMap.set(selection, getContextFlavor(context, clientOnly, deferred));\n }\n else {\n var fragment = (0,graphql_fragments/* getFragmentFromSelection */.HQ)(selection, context.lookupFragment);\n if (!fragment && selection.kind === kinds/* Kind */.b.FRAGMENT_SPREAD) {\n throw (0,globals/* newInvariantError */.vA)(13, selection.name.value);\n }\n if (fragment &&\n policies.fragmentMatches(fragment, typename, result, context.variables)) {\n flatten(fragment.selectionSet, getContextFlavor(context, clientOnly, deferred));\n }\n }\n });\n })(selectionSet, context);\n return fieldMap;\n };\n StoreWriter.prototype.applyMerges = function (mergeTree, existing, incoming, context, getStorageArgs) {\n var _a;\n var _this = this;\n if (mergeTree.map.size && !(0,storeUtils/* isReference */.A_)(incoming)) {\n var e_1 = \n // Items in the same position in different arrays are not\n // necessarily related to each other, so when incoming is an array\n // we process its elements as if there was no existing data.\n (!(0,arrays/* isArray */.c)(incoming) &&\n // Likewise, existing must be either a Reference or a StoreObject\n // in order for its fields to be safe to merge with the fields of\n // the incoming object.\n ((0,storeUtils/* isReference */.A_)(existing) || storeValueIsStoreObject(existing))) ?\n existing\n : void 0;\n // This narrowing is implied by mergeTree.map.size > 0 and\n // !isReference(incoming), though TypeScript understandably cannot\n // hope to infer this type.\n var i_1 = incoming;\n // The options.storage objects provided to read and merge functions\n // are derived from the identity of the parent object plus a\n // sequence of storeFieldName strings/numbers identifying the nested\n // field name path of each field value to be merged.\n if (e_1 && !getStorageArgs) {\n getStorageArgs = [(0,storeUtils/* isReference */.A_)(e_1) ? e_1.__ref : e_1];\n }\n // It\'s possible that applying merge functions to this subtree will\n // not change the incoming data, so this variable tracks the fields\n // that did change, so we can create a new incoming object when (and\n // only when) at least one incoming field has changed. We use a Map\n // to preserve the type of numeric keys.\n var changedFields_1;\n var getValue_1 = function (from, name) {\n return ((0,arrays/* isArray */.c)(from) ?\n typeof name === "number" ?\n from[name]\n : void 0\n : context.store.getFieldValue(from, String(name)));\n };\n mergeTree.map.forEach(function (childTree, storeFieldName) {\n var eVal = getValue_1(e_1, storeFieldName);\n var iVal = getValue_1(i_1, storeFieldName);\n // If we have no incoming data, leave any existing data untouched.\n if (void 0 === iVal)\n return;\n if (getStorageArgs) {\n getStorageArgs.push(storeFieldName);\n }\n var aVal = _this.applyMerges(childTree, eVal, iVal, context, getStorageArgs);\n if (aVal !== iVal) {\n changedFields_1 = changedFields_1 || new Map();\n changedFields_1.set(storeFieldName, aVal);\n }\n if (getStorageArgs) {\n (0,globals/* invariant */.V1)(getStorageArgs.pop() === storeFieldName);\n }\n });\n if (changedFields_1) {\n // Shallow clone i so we can add changed fields to it.\n incoming = ((0,arrays/* isArray */.c)(i_1) ? i_1.slice(0) : (0,tslib_es6/* __assign */.Cl)({}, i_1));\n changedFields_1.forEach(function (value, name) {\n incoming[name] = value;\n });\n }\n }\n if (mergeTree.info) {\n return this.cache.policies.runMergeFunction(existing, incoming, mergeTree.info, context, getStorageArgs && (_a = context.store).getStorage.apply(_a, getStorageArgs));\n }\n return incoming;\n };\n return StoreWriter;\n}());\n\nvar emptyMergeTreePool = [];\nfunction getChildMergeTree(_a, name) {\n var map = _a.map;\n if (!map.has(name)) {\n map.set(name, emptyMergeTreePool.pop() || { map: new Map() });\n }\n return map.get(name);\n}\nfunction mergeMergeTrees(left, right) {\n if (left === right || !right || mergeTreeIsEmpty(right))\n return left;\n if (!left || mergeTreeIsEmpty(left))\n return right;\n var info = left.info && right.info ? (0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, left.info), right.info) : left.info || right.info;\n var needToMergeMaps = left.map.size && right.map.size;\n var map = needToMergeMaps ? new Map()\n : left.map.size ? left.map\n : right.map;\n var merged = { info: info, map: map };\n if (needToMergeMaps) {\n var remainingRightKeys_1 = new Set(right.map.keys());\n left.map.forEach(function (leftTree, key) {\n merged.map.set(key, mergeMergeTrees(leftTree, right.map.get(key)));\n remainingRightKeys_1.delete(key);\n });\n remainingRightKeys_1.forEach(function (key) {\n merged.map.set(key, mergeMergeTrees(right.map.get(key), left.map.get(key)));\n });\n }\n return merged;\n}\nfunction mergeTreeIsEmpty(tree) {\n return !tree || !(tree.info || tree.map.size);\n}\nfunction maybeRecycleChildMergeTree(_a, name) {\n var map = _a.map;\n var childTree = map.get(name);\n if (childTree && mergeTreeIsEmpty(childTree)) {\n emptyMergeTreePool.push(childTree);\n map.delete(name);\n }\n}\nvar warnings = new Set();\n// Note that this function is unused in production, and thus should be\n// pruned by any well-configured minifier.\nfunction warnAboutDataLoss(existingRef, incomingObj, storeFieldName, store) {\n var getChild = function (objOrRef) {\n var child = store.getFieldValue(objOrRef, storeFieldName);\n return typeof child === "object" && child;\n };\n var existing = getChild(existingRef);\n if (!existing)\n return;\n var incoming = getChild(incomingObj);\n if (!incoming)\n return;\n // It\'s always safe to replace a reference, since it refers to data\n // safely stored elsewhere.\n if ((0,storeUtils/* isReference */.A_)(existing))\n return;\n // If the values are structurally equivalent, we do not need to worry\n // about incoming replacing existing.\n if ((0,equality_lib/* equal */.L)(existing, incoming))\n return;\n // If we\'re replacing every key of the existing object, then the\n // existing data would be overwritten even if the objects were\n // normalized, so warning would not be helpful here.\n if (Object.keys(existing).every(function (key) { return store.getFieldValue(incoming, key) !== void 0; })) {\n return;\n }\n var parentType = store.getFieldValue(existingRef, "__typename") ||\n store.getFieldValue(incomingObj, "__typename");\n var fieldName = fieldNameFromStoreName(storeFieldName);\n var typeDotName = "".concat(parentType, ".").concat(fieldName);\n // Avoid warning more than once for the same type and field name.\n if (warnings.has(typeDotName))\n return;\n warnings.add(typeDotName);\n var childTypenames = [];\n // Arrays do not have __typename fields, and always need a custom merge\n // function, even if their elements are normalized entities.\n if (!(0,arrays/* isArray */.c)(existing) && !(0,arrays/* isArray */.c)(incoming)) {\n [existing, incoming].forEach(function (child) {\n var typename = store.getFieldValue(child, "__typename");\n if (typeof typename === "string" && !childTypenames.includes(typename)) {\n childTypenames.push(typename);\n }\n });\n }\n globalThis.__DEV__ !== false && globals/* invariant */.V1.warn(14, fieldName, parentType, childTypenames.length ?\n "either ensure all objects of type " +\n childTypenames.join(" and ") +\n " have an ID or a custom merge function, or "\n : "", typeDotName, (0,tslib_es6/* __assign */.Cl)({}, existing), (0,tslib_es6/* __assign */.Cl)({}, incoming));\n}\n//# sourceMappingURL=writeToStore.js.map\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/cache/inmemory/inMemoryCache.js\n\n\n// Make builtins like Map and Set safe to use with non-extensible objects.\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar InMemoryCache = /** @class */ (function (_super) {\n (0,tslib_es6/* __extends */.C6)(InMemoryCache, _super);\n function InMemoryCache(config) {\n if (config === void 0) { config = {}; }\n var _this = _super.call(this) || this;\n _this.watches = new Set();\n _this.addTypenameTransform = new DocumentTransform/* DocumentTransform */.c(transform/* addTypenameToDocument */.XY);\n // Override the default value, since InMemoryCache result objects are frozen\n // in development and expected to remain logically immutable in production.\n _this.assumeImmutableResults = true;\n _this.makeVar = reactiveVars/* makeVar */.UT;\n _this.txCount = 0;\n _this.config = normalizeConfig(config);\n _this.addTypename = !!_this.config.addTypename;\n _this.policies = new Policies({\n cache: _this,\n dataIdFromObject: _this.config.dataIdFromObject,\n possibleTypes: _this.config.possibleTypes,\n typePolicies: _this.config.typePolicies,\n });\n _this.init();\n return _this;\n }\n InMemoryCache.prototype.init = function () {\n // Passing { resultCaching: false } in the InMemoryCache constructor options\n // will completely disable dependency tracking, which will improve memory\n // usage but worsen the performance of repeated reads.\n var rootStore = (this.data = new EntityStore.Root({\n policies: this.policies,\n resultCaching: this.config.resultCaching,\n }));\n // When no optimistic writes are currently active, cache.optimisticData ===\n // cache.data, so there are no additional layers on top of the actual data.\n // When an optimistic update happens, this.optimisticData will become a\n // linked list of EntityStore Layer objects that terminates with the\n // original this.data cache object.\n this.optimisticData = rootStore.stump;\n this.resetResultCache();\n };\n InMemoryCache.prototype.resetResultCache = function (resetResultIdentities) {\n var _this = this;\n var previousReader = this.storeReader;\n var fragments = this.config.fragments;\n // The StoreWriter is mostly stateless and so doesn\'t really need to be\n // reset, but it does need to have its writer.storeReader reference updated,\n // so it\'s simpler to update this.storeWriter as well.\n this.storeWriter = new StoreWriter(this, (this.storeReader = new StoreReader({\n cache: this,\n addTypename: this.addTypename,\n resultCacheMaxSize: this.config.resultCacheMaxSize,\n canonizeResults: shouldCanonizeResults(this.config),\n canon: resetResultIdentities ? void 0 : (previousReader && previousReader.canon),\n fragments: fragments,\n })), fragments);\n this.maybeBroadcastWatch = (0,lib/* wrap */.LV)(function (c, options) {\n return _this.broadcastWatch(c, options);\n }, {\n max: this.config.resultCacheMaxSize ||\n sizes/* cacheSizes */.v["inMemoryCache.maybeBroadcastWatch"] ||\n 5000 /* defaultCacheSizes["inMemoryCache.maybeBroadcastWatch"] */,\n makeCacheKey: function (c) {\n // Return a cache key (thus enabling result caching) only if we\'re\n // currently using a data store that can track cache dependencies.\n var store = c.optimistic ? _this.optimisticData : _this.data;\n if (supportsResultCaching(store)) {\n var optimistic = c.optimistic, id = c.id, variables = c.variables;\n return store.makeCacheKey(c.query, \n // Different watches can have the same query, optimistic\n // status, rootId, and variables, but if their callbacks are\n // different, the (identical) result needs to be delivered to\n // each distinct callback. The easiest way to achieve that\n // separation is to include c.callback in the cache key for\n // maybeBroadcastWatch calls. See issue #5733.\n c.callback, (0,canonicalStringify/* canonicalStringify */.M)({ optimistic: optimistic, id: id, variables: variables }));\n }\n },\n });\n // Since we have thrown away all the cached functions that depend on the\n // CacheGroup dependencies maintained by EntityStore, we should also reset\n // all CacheGroup dependency information.\n new Set([this.data.group, this.optimisticData.group]).forEach(function (group) {\n return group.resetCaching();\n });\n };\n InMemoryCache.prototype.restore = function (data) {\n this.init();\n // Since calling this.init() discards/replaces the entire StoreReader, along\n // with the result caches it maintains, this.data.replace(data) won\'t have\n // to bother deleting the old data.\n if (data)\n this.data.replace(data);\n return this;\n };\n InMemoryCache.prototype.extract = function (optimistic) {\n if (optimistic === void 0) { optimistic = false; }\n return (optimistic ? this.optimisticData : this.data).extract();\n };\n InMemoryCache.prototype.read = function (options) {\n var \n // Since read returns data or null, without any additional metadata\n // about whether/where there might have been missing fields, the\n // default behavior cannot be returnPartialData = true (like it is\n // for the diff method), since defaulting to true would violate the\n // integrity of the T in the return type. However, partial data may\n // be useful in some cases, so returnPartialData:true may be\n // specified explicitly.\n _a = options.returnPartialData, \n // Since read returns data or null, without any additional metadata\n // about whether/where there might have been missing fields, the\n // default behavior cannot be returnPartialData = true (like it is\n // for the diff method), since defaulting to true would violate the\n // integrity of the T in the return type. However, partial data may\n // be useful in some cases, so returnPartialData:true may be\n // specified explicitly.\n returnPartialData = _a === void 0 ? false : _a;\n try {\n return (this.storeReader.diffQueryAgainstStore((0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, options), { store: options.optimistic ? this.optimisticData : this.data, config: this.config, returnPartialData: returnPartialData })).result || null);\n }\n catch (e) {\n if (e instanceof MissingFieldError) {\n // Swallow MissingFieldError and return null, so callers do not need to\n // worry about catching "normal" exceptions resulting from incomplete\n // cache data. Unexpected errors will be re-thrown. If you need more\n // information about which fields were missing, use cache.diff instead,\n // and examine diffResult.missing.\n return null;\n }\n throw e;\n }\n };\n InMemoryCache.prototype.write = function (options) {\n try {\n ++this.txCount;\n return this.storeWriter.writeToStore(this.data, options);\n }\n finally {\n if (!--this.txCount && options.broadcast !== false) {\n this.broadcastWatches();\n }\n }\n };\n InMemoryCache.prototype.modify = function (options) {\n if (hasOwn.call(options, "id") && !options.id) {\n // To my knowledge, TypeScript does not currently provide a way to\n // enforce that an optional property?:type must *not* be undefined\n // when present. That ability would be useful here, because we want\n // options.id to default to ROOT_QUERY only when no options.id was\n // provided. If the caller attempts to pass options.id with a\n // falsy/undefined value (perhaps because cache.identify failed), we\n // should not assume the goal was to modify the ROOT_QUERY object.\n // We could throw, but it seems natural to return false to indicate\n // that nothing was modified.\n return false;\n }\n var store = ((options.optimistic) // Defaults to false.\n ) ?\n this.optimisticData\n : this.data;\n try {\n ++this.txCount;\n return store.modify(options.id || "ROOT_QUERY", options.fields);\n }\n finally {\n if (!--this.txCount && options.broadcast !== false) {\n this.broadcastWatches();\n }\n }\n };\n InMemoryCache.prototype.diff = function (options) {\n return this.storeReader.diffQueryAgainstStore((0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, options), { store: options.optimistic ? this.optimisticData : this.data, rootId: options.id || "ROOT_QUERY", config: this.config }));\n };\n InMemoryCache.prototype.watch = function (watch) {\n var _this = this;\n if (!this.watches.size) {\n // In case we previously called forgetCache(this) because\n // this.watches became empty (see below), reattach this cache to any\n // reactive variables on which it previously depended. It might seem\n // paradoxical that we\'re able to recall something we supposedly\n // forgot, but the point of calling forgetCache(this) is to silence\n // useless broadcasts while this.watches is empty, and to allow the\n // cache to be garbage collected. If, however, we manage to call\n // recallCache(this) here, this cache object must not have been\n // garbage collected yet, and should resume receiving updates from\n // reactive variables, now that it has a watcher to notify.\n (0,reactiveVars/* recallCache */.MS)(this);\n }\n this.watches.add(watch);\n if (watch.immediate) {\n this.maybeBroadcastWatch(watch);\n }\n return function () {\n // Once we remove the last watch from this.watches, cache.broadcastWatches\n // no longer does anything, so we preemptively tell the reactive variable\n // system to exclude this cache from future broadcasts.\n if (_this.watches.delete(watch) && !_this.watches.size) {\n (0,reactiveVars/* forgetCache */.WR)(_this);\n }\n // Remove this watch from the LRU cache managed by the\n // maybeBroadcastWatch OptimisticWrapperFunction, to prevent memory\n // leaks involving the closure of watch.callback.\n _this.maybeBroadcastWatch.forget(watch);\n };\n };\n InMemoryCache.prototype.gc = function (options) {\n var _a;\n canonicalStringify/* canonicalStringify */.M.reset();\n print/* print */.y.reset();\n this.addTypenameTransform.resetCache();\n (_a = this.config.fragments) === null || _a === void 0 ? void 0 : _a.resetCaches();\n var ids = this.optimisticData.gc();\n if (options && !this.txCount) {\n if (options.resetResultCache) {\n this.resetResultCache(options.resetResultIdentities);\n }\n else if (options.resetResultIdentities) {\n this.storeReader.resetCanon();\n }\n }\n return ids;\n };\n // Call this method to ensure the given root ID remains in the cache after\n // garbage collection, along with its transitive child entities. Note that\n // the cache automatically retains all directly written entities. By default,\n // the retainment persists after optimistic updates are removed. Pass true\n // for the optimistic argument if you would prefer for the retainment to be\n // discarded when the top-most optimistic layer is removed. Returns the\n // resulting (non-negative) retainment count.\n InMemoryCache.prototype.retain = function (rootId, optimistic) {\n return (optimistic ? this.optimisticData : this.data).retain(rootId);\n };\n // Call this method to undo the effect of the retain method, above. Once the\n // retainment count falls to zero, the given ID will no longer be preserved\n // during garbage collection, though it may still be preserved by other safe\n // entities that refer to it. Returns the resulting (non-negative) retainment\n // count, in case that\'s useful.\n InMemoryCache.prototype.release = function (rootId, optimistic) {\n return (optimistic ? this.optimisticData : this.data).release(rootId);\n };\n // Returns the canonical ID for a given StoreObject, obeying typePolicies\n // and keyFields (and dataIdFromObject, if you still use that). At minimum,\n // the object must contain a __typename and any primary key fields required\n // to identify entities of that type. If you pass a query result object, be\n // sure that none of the primary key fields have been renamed by aliasing.\n // If you pass a Reference object, its __ref ID string will be returned.\n InMemoryCache.prototype.identify = function (object) {\n if ((0,storeUtils/* isReference */.A_)(object))\n return object.__ref;\n try {\n return this.policies.identify(object)[0];\n }\n catch (e) {\n globalThis.__DEV__ !== false && globals/* invariant */.V1.warn(e);\n }\n };\n InMemoryCache.prototype.evict = function (options) {\n if (!options.id) {\n if (hasOwn.call(options, "id")) {\n // See comment in modify method about why we return false when\n // options.id exists but is falsy/undefined.\n return false;\n }\n options = (0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, options), { id: "ROOT_QUERY" });\n }\n try {\n // It\'s unlikely that the eviction will end up invoking any other\n // cache update operations while it\'s running, but {in,de}crementing\n // this.txCount still seems like a good idea, for uniformity with\n // the other update methods.\n ++this.txCount;\n // Pass this.data as a limit on the depth of the eviction, so evictions\n // during optimistic updates (when this.data is temporarily set equal to\n // this.optimisticData) do not escape their optimistic Layer.\n return this.optimisticData.evict(options, this.data);\n }\n finally {\n if (!--this.txCount && options.broadcast !== false) {\n this.broadcastWatches();\n }\n }\n };\n InMemoryCache.prototype.reset = function (options) {\n var _this = this;\n this.init();\n canonicalStringify/* canonicalStringify */.M.reset();\n if (options && options.discardWatches) {\n // Similar to what happens in the unsubscribe function returned by\n // cache.watch, applied to all current watches.\n this.watches.forEach(function (watch) { return _this.maybeBroadcastWatch.forget(watch); });\n this.watches.clear();\n (0,reactiveVars/* forgetCache */.WR)(this);\n }\n else {\n // Calling this.init() above unblocks all maybeBroadcastWatch caching, so\n // this.broadcastWatches() triggers a broadcast to every current watcher\n // (letting them know their data is now missing). This default behavior is\n // convenient because it means the watches do not have to be manually\n // reestablished after resetting the cache. To prevent this broadcast and\n // cancel all watches, pass true for options.discardWatches.\n this.broadcastWatches();\n }\n return Promise.resolve();\n };\n InMemoryCache.prototype.removeOptimistic = function (idToRemove) {\n var newOptimisticData = this.optimisticData.removeLayer(idToRemove);\n if (newOptimisticData !== this.optimisticData) {\n this.optimisticData = newOptimisticData;\n this.broadcastWatches();\n }\n };\n InMemoryCache.prototype.batch = function (options) {\n var _this = this;\n var update = options.update, _a = options.optimistic, optimistic = _a === void 0 ? true : _a, removeOptimistic = options.removeOptimistic, onWatchUpdated = options.onWatchUpdated;\n var updateResult;\n var perform = function (layer) {\n var _a = _this, data = _a.data, optimisticData = _a.optimisticData;\n ++_this.txCount;\n if (layer) {\n _this.data = _this.optimisticData = layer;\n }\n try {\n return (updateResult = update(_this));\n }\n finally {\n --_this.txCount;\n _this.data = data;\n _this.optimisticData = optimisticData;\n }\n };\n var alreadyDirty = new Set();\n if (onWatchUpdated && !this.txCount) {\n // If an options.onWatchUpdated callback is provided, we want to call it\n // with only the Cache.WatchOptions objects affected by options.update,\n // but there might be dirty watchers already waiting to be broadcast that\n // have nothing to do with the update. To prevent including those watchers\n // in the post-update broadcast, we perform this initial broadcast to\n // collect the dirty watchers, so we can re-dirty them later, after the\n // post-update broadcast, allowing them to receive their pending\n // broadcasts the next time broadcastWatches is called, just as they would\n // if we never called cache.batch.\n this.broadcastWatches((0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, options), { onWatchUpdated: function (watch) {\n alreadyDirty.add(watch);\n return false;\n } }));\n }\n if (typeof optimistic === "string") {\n // Note that there can be multiple layers with the same optimistic ID.\n // When removeOptimistic(id) is called for that id, all matching layers\n // will be removed, and the remaining layers will be reapplied.\n this.optimisticData = this.optimisticData.addLayer(optimistic, perform);\n }\n else if (optimistic === false) {\n // Ensure both this.data and this.optimisticData refer to the root\n // (non-optimistic) layer of the cache during the update. Note that\n // this.data could be a Layer if we are currently executing an optimistic\n // update function, but otherwise will always be an EntityStore.Root\n // instance.\n perform(this.data);\n }\n else {\n // Otherwise, leave this.data and this.optimisticData unchanged and run\n // the update with broadcast batching.\n perform();\n }\n if (typeof removeOptimistic === "string") {\n this.optimisticData = this.optimisticData.removeLayer(removeOptimistic);\n }\n // Note: if this.txCount > 0, then alreadyDirty.size === 0, so this code\n // takes the else branch and calls this.broadcastWatches(options), which\n // does nothing when this.txCount > 0.\n if (onWatchUpdated && alreadyDirty.size) {\n this.broadcastWatches((0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, options), { onWatchUpdated: function (watch, diff) {\n var result = onWatchUpdated.call(this, watch, diff);\n if (result !== false) {\n // Since onWatchUpdated did not return false, this diff is\n // about to be broadcast to watch.callback, so we don\'t need\n // to re-dirty it with the other alreadyDirty watches below.\n alreadyDirty.delete(watch);\n }\n return result;\n } }));\n // Silently re-dirty any watches that were already dirty before the update\n // was performed, and were not broadcast just now.\n if (alreadyDirty.size) {\n alreadyDirty.forEach(function (watch) { return _this.maybeBroadcastWatch.dirty(watch); });\n }\n }\n else {\n // If alreadyDirty is empty or we don\'t have an onWatchUpdated\n // function, we don\'t need to go to the trouble of wrapping\n // options.onWatchUpdated.\n this.broadcastWatches(options);\n }\n return updateResult;\n };\n InMemoryCache.prototype.performTransaction = function (update, optimisticId) {\n return this.batch({\n update: update,\n optimistic: optimisticId || optimisticId !== null,\n });\n };\n InMemoryCache.prototype.transformDocument = function (document) {\n return this.addTypenameToDocument(this.addFragmentsToDocument(document));\n };\n InMemoryCache.prototype.broadcastWatches = function (options) {\n var _this = this;\n if (!this.txCount) {\n this.watches.forEach(function (c) { return _this.maybeBroadcastWatch(c, options); });\n }\n };\n InMemoryCache.prototype.addFragmentsToDocument = function (document) {\n var fragments = this.config.fragments;\n return fragments ? fragments.transform(document) : document;\n };\n InMemoryCache.prototype.addTypenameToDocument = function (document) {\n if (this.addTypename) {\n return this.addTypenameTransform.transformDocument(document);\n }\n return document;\n };\n // This method is wrapped by maybeBroadcastWatch, which is called by\n // broadcastWatches, so that we compute and broadcast results only when\n // the data that would be broadcast might have changed. It would be\n // simpler to check for changes after recomputing a result but before\n // broadcasting it, but this wrapping approach allows us to skip both\n // the recomputation and the broadcast, in most cases.\n InMemoryCache.prototype.broadcastWatch = function (c, options) {\n var lastDiff = c.lastDiff;\n // Both WatchOptions and DiffOptions extend ReadOptions, and DiffOptions\n // currently requires no additional properties, so we can use c (a\n // WatchOptions object) as DiffOptions, without having to allocate a new\n // object, and without having to enumerate the relevant properties (query,\n // variables, etc.) explicitly. There will be some additional properties\n // (lastDiff, callback, etc.), but cache.diff ignores them.\n var diff = this.diff(c);\n if (options) {\n if (c.optimistic && typeof options.optimistic === "string") {\n diff.fromOptimisticTransaction = true;\n }\n if (options.onWatchUpdated &&\n options.onWatchUpdated.call(this, c, diff, lastDiff) === false) {\n // Returning false from the onWatchUpdated callback will prevent\n // calling c.callback(diff) for this watcher.\n return;\n }\n }\n if (!lastDiff || !(0,equality_lib/* equal */.L)(lastDiff.result, diff.result)) {\n c.callback((c.lastDiff = diff), lastDiff);\n }\n };\n return InMemoryCache;\n}(ApolloCache));\n\nif (globalThis.__DEV__ !== false) {\n InMemoryCache.prototype.getMemoryInternals = getMemoryInternals/* getInMemoryCacheMemoryInternals */.cM;\n}\n//# sourceMappingURL=inMemoryCache.js.map\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@apollo/client/cache/inmemory/inMemoryCache.js_+_9_modules?', + ); + + /***/ + }, + + /***/ 738: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + "/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ MS: () => (/* binding */ recallCache),\n/* harmony export */ UT: () => (/* binding */ makeVar),\n/* harmony export */ WR: () => (/* binding */ forgetCache),\n/* harmony export */ bl: () => (/* binding */ cacheSlot)\n/* harmony export */ });\n/* harmony import */ var optimism__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1161);\n\n// Contextual Slot that acquires its value when custom read functions are\n// called in Policies#readField.\nvar cacheSlot = new optimism__WEBPACK_IMPORTED_MODULE_0__/* .Slot */ .DX();\nvar cacheInfoMap = new WeakMap();\nfunction getCacheInfo(cache) {\n var info = cacheInfoMap.get(cache);\n if (!info) {\n cacheInfoMap.set(cache, (info = {\n vars: new Set(),\n dep: (0,optimism__WEBPACK_IMPORTED_MODULE_0__/* .dep */ .yN)(),\n }));\n }\n return info;\n}\nfunction forgetCache(cache) {\n getCacheInfo(cache).vars.forEach(function (rv) { return rv.forgetCache(cache); });\n}\n// Calling forgetCache(cache) serves to silence broadcasts and allows the\n// cache to be garbage collected. However, the varsByCache WeakMap\n// preserves the set of reactive variables that were previously associated\n// with this cache, which makes it possible to \"recall\" the cache at a\n// later time, by reattaching it to those variables. If the cache has been\n// garbage collected in the meantime, because it is no longer reachable,\n// you won't be able to call recallCache(cache), and the cache will\n// automatically disappear from the varsByCache WeakMap.\nfunction recallCache(cache) {\n getCacheInfo(cache).vars.forEach(function (rv) { return rv.attachCache(cache); });\n}\nfunction makeVar(value) {\n var caches = new Set();\n var listeners = new Set();\n var rv = function (newValue) {\n if (arguments.length > 0) {\n if (value !== newValue) {\n value = newValue;\n caches.forEach(function (cache) {\n // Invalidate any fields with custom read functions that\n // consumed this variable, so query results involving those\n // fields will be recomputed the next time we read them.\n getCacheInfo(cache).dep.dirty(rv);\n // Broadcast changes to any caches that have previously read\n // from this variable.\n broadcast(cache);\n });\n // Finally, notify any listeners added via rv.onNextChange.\n var oldListeners = Array.from(listeners);\n listeners.clear();\n oldListeners.forEach(function (listener) { return listener(value); });\n }\n }\n else {\n // When reading from the variable, obtain the current cache from\n // context via cacheSlot. This isn't entirely foolproof, but it's\n // the same system that powers varDep.\n var cache = cacheSlot.getValue();\n if (cache) {\n attach(cache);\n getCacheInfo(cache).dep(rv);\n }\n }\n return value;\n };\n rv.onNextChange = function (listener) {\n listeners.add(listener);\n return function () {\n listeners.delete(listener);\n };\n };\n var attach = (rv.attachCache = function (cache) {\n caches.add(cache);\n getCacheInfo(cache).vars.add(rv);\n return rv;\n });\n rv.forgetCache = function (cache) { return caches.delete(cache); };\n return rv;\n}\nfunction broadcast(cache) {\n if (cache.broadcastWatches) {\n cache.broadcastWatches();\n }\n}\n//# sourceMappingURL=reactiveVars.js.map\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@apollo/client/cache/inmemory/reactiveVars.js?", + ); + + /***/ + }, + + /***/ 8067: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '\n// EXPORTS\n__webpack_require__.d(__webpack_exports__, {\n R: () => (/* binding */ ApolloClient)\n});\n\n// UNUSED EXPORTS: mergeOptions\n\n// EXTERNAL MODULE: ./node_modules/tslib/tslib.es6.mjs\nvar tslib_es6 = __webpack_require__(1635);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/globals/index.js + 4 modules\nvar globals = __webpack_require__(6319);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/link/core/ApolloLink.js + 3 modules\nvar ApolloLink = __webpack_require__(1188);\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/link/core/execute.js\n\nvar execute = ApolloLink/* ApolloLink */.C.execute;\n//# sourceMappingURL=execute.js.map\n// EXTERNAL MODULE: ./node_modules/@apollo/client/version.js\nvar version = __webpack_require__(435);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/link/http/createHttpLink.js + 14 modules\nvar createHttpLink = __webpack_require__(4132);\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/link/http/HttpLink.js\n\n\n\nvar HttpLink = /** @class */ (function (_super) {\n (0,tslib_es6/* __extends */.C6)(HttpLink, _super);\n function HttpLink(options) {\n if (options === void 0) { options = {}; }\n var _this = _super.call(this, (0,createHttpLink/* createHttpLink */.$)(options).request) || this;\n _this.options = options;\n return _this;\n }\n return HttpLink;\n}(ApolloLink/* ApolloLink */.C));\n\n//# sourceMappingURL=HttpLink.js.map\n// EXTERNAL MODULE: ./node_modules/@wry/equality/lib/index.js\nvar lib = __webpack_require__(5381);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/common/incrementalResult.js\nvar incrementalResult = __webpack_require__(6453);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/graphql/directives.js\nvar directives = __webpack_require__(1250);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/graphql/transform.js\nvar transform = __webpack_require__(3902);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/common/canonicalStringify.js\nvar canonicalStringify = __webpack_require__(6269);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/graphql/DocumentTransform.js\nvar DocumentTransform = __webpack_require__(9993);\n// EXTERNAL MODULE: ./node_modules/zen-observable-ts/module.js\nvar zen_observable_ts_module = __webpack_require__(3401);\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/utilities/observables/asyncMap.js\n\n// Like Observable.prototype.map, except that the mapping function can\n// optionally return a Promise (or be async).\nfunction asyncMap(observable, mapFn, catchFn) {\n return new zen_observable_ts_module/* Observable */.c(function (observer) {\n var promiseQueue = {\n // Normally we would initialize promiseQueue to Promise.resolve(), but\n // in this case, for backwards compatibility, we need to be careful to\n // invoke the first callback synchronously.\n then: function (callback) {\n return new Promise(function (resolve) { return resolve(callback()); });\n },\n };\n function makeCallback(examiner, key) {\n return function (arg) {\n if (examiner) {\n var both = function () {\n // If the observer is closed, we don\'t want to continue calling the\n // mapping function - it\'s result will be swallowed anyways.\n return observer.closed ?\n /* will be swallowed */ 0\n : examiner(arg);\n };\n promiseQueue = promiseQueue.then(both, both).then(function (result) { return observer.next(result); }, function (error) { return observer.error(error); });\n }\n else {\n observer[key](arg);\n }\n };\n }\n var handler = {\n next: makeCallback(mapFn, "next"),\n error: makeCallback(catchFn, "error"),\n complete: function () {\n // no need to reassign `promiseQueue`, after `observer.complete`,\n // the observer will be closed and short-circuit everything anyways\n /*promiseQueue = */ promiseQueue.then(function () { return observer.complete(); });\n },\n };\n var sub = observable.subscribe(handler);\n return function () { return sub.unsubscribe(); };\n });\n}\n//# sourceMappingURL=asyncMap.js.map\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/common/arrays.js\nvar arrays = __webpack_require__(5636);\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/utilities/common/errorHandling.js\n\n\nfunction graphQLResultHasError(result) {\n var errors = getGraphQLErrorsFromResult(result);\n return (0,arrays/* isNonEmptyArray */.E)(errors);\n}\nfunction getGraphQLErrorsFromResult(result) {\n var graphQLErrors = (0,arrays/* isNonEmptyArray */.E)(result.errors) ? result.errors.slice(0) : [];\n if ((0,incrementalResult/* isExecutionPatchIncrementalResult */.ST)(result) &&\n (0,arrays/* isNonEmptyArray */.E)(result.incremental)) {\n result.incremental.forEach(function (incrementalResult) {\n if (incrementalResult.errors) {\n graphQLErrors.push.apply(graphQLErrors, incrementalResult.errors);\n }\n });\n }\n return graphQLErrors;\n}\n//# sourceMappingURL=errorHandling.js.map\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/graphql/getFromAST.js\nvar getFromAST = __webpack_require__(4824);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/graphql/storeUtils.js\nvar storeUtils = __webpack_require__(7194);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/common/objects.js\nvar objects = __webpack_require__(2456);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/common/makeUniqueId.js\nvar makeUniqueId = __webpack_require__(8170);\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/utilities/observables/iteration.js\nfunction iterateObserversSafely(observers, method, argument) {\n // In case observers is modified during iteration, we need to commit to the\n // original elements, which also provides an opportunity to filter them down\n // to just the observers with the given method.\n var observersWithMethod = [];\n observers.forEach(function (obs) { return obs[method] && observersWithMethod.push(obs); });\n observersWithMethod.forEach(function (obs) { return obs[method](argument); });\n}\n//# sourceMappingURL=iteration.js.map\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/common/canUse.js\nvar canUse = __webpack_require__(2619);\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/utilities/observables/subclassing.js\n\n\n// Generic implementations of Observable.prototype methods like map and\n// filter need to know how to create a new Observable from an Observable\n// subclass (like Concast or ObservableQuery). Those methods assume\n// (perhaps unwisely?) that they can call the subtype\'s constructor with a\n// Subscriber function, even though the subclass constructor might expect\n// different parameters. Defining this static Symbol.species property on\n// the subclass is a hint to generic Observable code to use the default\n// constructor instead of trying to do `new Subclass(observer => ...)`.\nfunction fixObservableSubclass(subclass) {\n function set(key) {\n // Object.defineProperty is necessary because the Symbol.species\n // property is a getter by default in modern JS environments, so we\n // can\'t assign to it with a normal assignment expression.\n Object.defineProperty(subclass, key, { value: zen_observable_ts_module/* Observable */.c });\n }\n if (canUse/* canUseSymbol */.ol && Symbol.species) {\n set(Symbol.species);\n }\n // The "@@species" string is used as a fake Symbol.species value in some\n // polyfill systems (including the SymbolSpecies variable used by\n // zen-observable), so we should set it as well, to be safe.\n set("@@species");\n return subclass;\n}\n//# sourceMappingURL=subclassing.js.map\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/utilities/observables/Concast.js\n\n\n\n\nfunction isPromiseLike(value) {\n return value && typeof value.then === "function";\n}\n// A Concast<T> observable concatenates the given sources into a single\n// non-overlapping sequence of Ts, automatically unwrapping any promises,\n// and broadcasts the T elements of that sequence to any number of\n// subscribers, all without creating a bunch of intermediary Observable\n// wrapper objects.\n//\n// Even though any number of observers can subscribe to the Concast, each\n// source observable is guaranteed to receive at most one subscribe call,\n// and the results are multicast to all observers.\n//\n// In addition to broadcasting every next/error message to this.observers,\n// the Concast stores the most recent message using this.latest, so any\n// new observers can immediately receive the latest message, even if it\n// was originally delivered in the past. This behavior means we can assume\n// every active observer in this.observers has received the same most\n// recent message.\n//\n// With the exception of this.latest replay, a Concast is a "hot"\n// observable in the sense that it does not replay past results from the\n// beginning of time for each new observer.\n//\n// Could we have used some existing RxJS class instead? Concast<T> is\n// similar to a BehaviorSubject<T>, because it is multicast and redelivers\n// the latest next/error message to new subscribers. Unlike Subject<T>,\n// Concast<T> does not expose an Observer<T> interface (this.handlers is\n// intentionally private), since Concast<T> gets its inputs from the\n// concatenated sources. If we ever switch to RxJS, there may be some\n// value in reusing their code, but for now we use zen-observable, which\n// does not contain any Subject implementations.\nvar Concast = /** @class */ (function (_super) {\n (0,tslib_es6/* __extends */.C6)(Concast, _super);\n // Not only can the individual elements of the iterable be promises, but\n // also the iterable itself can be wrapped in a promise.\n function Concast(sources) {\n var _this = _super.call(this, function (observer) {\n _this.addObserver(observer);\n return function () { return _this.removeObserver(observer); };\n }) || this;\n // Active observers receiving broadcast messages. Thanks to this.latest,\n // we can assume all observers in this Set have received the same most\n // recent message, though possibly at different times in the past.\n _this.observers = new Set();\n _this.promise = new Promise(function (resolve, reject) {\n _this.resolve = resolve;\n _this.reject = reject;\n });\n // Bound handler functions that can be reused for every internal\n // subscription.\n _this.handlers = {\n next: function (result) {\n if (_this.sub !== null) {\n _this.latest = ["next", result];\n _this.notify("next", result);\n iterateObserversSafely(_this.observers, "next", result);\n }\n },\n error: function (error) {\n var sub = _this.sub;\n if (sub !== null) {\n // Delay unsubscribing from the underlying subscription slightly,\n // so that immediately subscribing another observer can keep the\n // subscription active.\n if (sub)\n setTimeout(function () { return sub.unsubscribe(); });\n _this.sub = null;\n _this.latest = ["error", error];\n _this.reject(error);\n _this.notify("error", error);\n iterateObserversSafely(_this.observers, "error", error);\n }\n },\n complete: function () {\n var _a = _this, sub = _a.sub, _b = _a.sources, sources = _b === void 0 ? [] : _b;\n if (sub !== null) {\n // If complete is called before concast.start, this.sources may be\n // undefined, so we use a default value of [] for sources. That works\n // here because it falls into the if (!value) {...} block, which\n // appropriately terminates the Concast, even if this.sources might\n // eventually have been initialized to a non-empty array.\n var value = sources.shift();\n if (!value) {\n if (sub)\n setTimeout(function () { return sub.unsubscribe(); });\n _this.sub = null;\n if (_this.latest && _this.latest[0] === "next") {\n _this.resolve(_this.latest[1]);\n }\n else {\n _this.resolve();\n }\n _this.notify("complete");\n // We do not store this.latest = ["complete"], because doing so\n // discards useful information about the previous next (or\n // error) message. Instead, if new observers subscribe after\n // this Concast has completed, they will receive the final\n // \'next\' message (unless there was an error) immediately\n // followed by a \'complete\' message (see addObserver).\n iterateObserversSafely(_this.observers, "complete");\n }\n else if (isPromiseLike(value)) {\n value.then(function (obs) { return (_this.sub = obs.subscribe(_this.handlers)); }, _this.handlers.error);\n }\n else {\n _this.sub = value.subscribe(_this.handlers);\n }\n }\n },\n };\n _this.nextResultListeners = new Set();\n // A public way to abort observation and broadcast.\n _this.cancel = function (reason) {\n _this.reject(reason);\n _this.sources = [];\n _this.handlers.complete();\n };\n // Suppress rejection warnings for this.promise, since it\'s perfectly\n // acceptable to pay no attention to this.promise if you\'re consuming\n // the results through the normal observable API.\n _this.promise.catch(function (_) { });\n // If someone accidentally tries to create a Concast using a subscriber\n // function, recover by creating an Observable from that subscriber and\n // using it as the source.\n if (typeof sources === "function") {\n sources = [new zen_observable_ts_module/* Observable */.c(sources)];\n }\n if (isPromiseLike(sources)) {\n sources.then(function (iterable) { return _this.start(iterable); }, _this.handlers.error);\n }\n else {\n _this.start(sources);\n }\n return _this;\n }\n Concast.prototype.start = function (sources) {\n if (this.sub !== void 0)\n return;\n // In practice, sources is most often simply an Array of observables.\n // TODO Consider using sources[Symbol.iterator]() to take advantage\n // of the laziness of non-Array iterables.\n this.sources = Array.from(sources);\n // Calling this.handlers.complete() kicks off consumption of the first\n // source observable. It\'s tempting to do this step lazily in\n // addObserver, but this.promise can be accessed without calling\n // addObserver, so consumption needs to begin eagerly.\n this.handlers.complete();\n };\n Concast.prototype.deliverLastMessage = function (observer) {\n if (this.latest) {\n var nextOrError = this.latest[0];\n var method = observer[nextOrError];\n if (method) {\n method.call(observer, this.latest[1]);\n }\n // If the subscription is already closed, and the last message was\n // a \'next\' message, simulate delivery of the final \'complete\'\n // message again.\n if (this.sub === null && nextOrError === "next" && observer.complete) {\n observer.complete();\n }\n }\n };\n Concast.prototype.addObserver = function (observer) {\n if (!this.observers.has(observer)) {\n // Immediately deliver the most recent message, so we can always\n // be sure all observers have the latest information.\n this.deliverLastMessage(observer);\n this.observers.add(observer);\n }\n };\n Concast.prototype.removeObserver = function (observer) {\n if (this.observers.delete(observer) && this.observers.size < 1) {\n // In case there are still any listeners in this.nextResultListeners, and\n // no error or completion has been broadcast yet, make sure those\n // observers have a chance to run and then remove themselves from\n // this.observers.\n this.handlers.complete();\n }\n };\n Concast.prototype.notify = function (method, arg) {\n var nextResultListeners = this.nextResultListeners;\n if (nextResultListeners.size) {\n // Replacing this.nextResultListeners first ensures it does not grow while\n // we are iterating over it, potentially leading to infinite loops.\n this.nextResultListeners = new Set();\n nextResultListeners.forEach(function (listener) { return listener(method, arg); });\n }\n };\n // We need a way to run callbacks just *before* the next result (or error or\n // completion) is delivered by this Concast, so we can be sure any code that\n // runs as a result of delivering that result/error observes the effects of\n // running the callback(s). It was tempting to reuse the Observer type instead\n // of introducing NextResultListener, but that messes with the sizing and\n // maintenance of this.observers, and ends up being more code overall.\n Concast.prototype.beforeNext = function (callback) {\n var called = false;\n this.nextResultListeners.add(function (method, arg) {\n if (!called) {\n called = true;\n callback(method, arg);\n }\n });\n };\n return Concast;\n}(zen_observable_ts_module/* Observable */.c));\n\n// Necessary because the Concast constructor has a different signature\n// than the Observable constructor.\nfixObservableSubclass(Concast);\n//# sourceMappingURL=Concast.js.map\n// EXTERNAL MODULE: ./node_modules/@apollo/client/errors/index.js\nvar client_errors = __webpack_require__(9211);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/core/networkStatus.js\nvar core_networkStatus = __webpack_require__(8599);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/common/compact.js\nvar compact = __webpack_require__(7945);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/common/cloneDeep.js\nvar cloneDeep = __webpack_require__(1495);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/core/equalByQuery.js\nvar equalByQuery = __webpack_require__(9080);\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/core/ObservableQuery.js\n\n\n\n\n\n\nvar ObservableQuery_assign = Object.assign, ObservableQuery_hasOwnProperty = Object.hasOwnProperty;\nvar ObservableQuery = /** @class */ (function (_super) {\n (0,tslib_es6/* __extends */.C6)(ObservableQuery, _super);\n function ObservableQuery(_a) {\n var queryManager = _a.queryManager, queryInfo = _a.queryInfo, options = _a.options;\n var _this = _super.call(this, function (observer) {\n // Zen Observable has its own error function, so in order to log correctly\n // we need to provide a custom error callback.\n try {\n var subObserver = observer._subscription._observer;\n if (subObserver && !subObserver.error) {\n subObserver.error = defaultSubscriptionObserverErrorCallback;\n }\n }\n catch (_a) { }\n var first = !_this.observers.size;\n _this.observers.add(observer);\n // Deliver most recent error or result.\n var last = _this.last;\n if (last && last.error) {\n observer.error && observer.error(last.error);\n }\n else if (last && last.result) {\n observer.next && observer.next(last.result);\n }\n // Initiate observation of this query if it hasn\'t been reported to\n // the QueryManager yet.\n if (first) {\n // Blindly catching here prevents unhandled promise rejections,\n // and is safe because the ObservableQuery handles this error with\n // this.observer.error, so we\'re not just swallowing the error by\n // ignoring it here.\n _this.reobserve().catch(function () { });\n }\n return function () {\n if (_this.observers.delete(observer) && !_this.observers.size) {\n _this.tearDownQuery();\n }\n };\n }) || this;\n _this.observers = new Set();\n _this.subscriptions = new Set();\n // related classes\n _this.queryInfo = queryInfo;\n _this.queryManager = queryManager;\n // active state\n _this.waitForOwnResult = skipCacheDataFor(options.fetchPolicy);\n _this.isTornDown = false;\n var _b = queryManager.defaultOptions.watchQuery, _c = _b === void 0 ? {} : _b, _d = _c.fetchPolicy, defaultFetchPolicy = _d === void 0 ? "cache-first" : _d;\n var _e = options.fetchPolicy, fetchPolicy = _e === void 0 ? defaultFetchPolicy : _e, \n // Make sure we don\'t store "standby" as the initialFetchPolicy.\n _f = options.initialFetchPolicy, \n // Make sure we don\'t store "standby" as the initialFetchPolicy.\n initialFetchPolicy = _f === void 0 ? fetchPolicy === "standby" ? defaultFetchPolicy : (fetchPolicy) : _f;\n _this.options = (0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, options), { \n // Remember the initial options.fetchPolicy so we can revert back to this\n // policy when variables change. This information can also be specified\n // (or overridden) by providing options.initialFetchPolicy explicitly.\n initialFetchPolicy: initialFetchPolicy, \n // This ensures this.options.fetchPolicy always has a string value, in\n // case options.fetchPolicy was not provided.\n fetchPolicy: fetchPolicy });\n _this.queryId = queryInfo.queryId || queryManager.generateQueryId();\n var opDef = (0,getFromAST/* getOperationDefinition */.Vu)(_this.query);\n _this.queryName = opDef && opDef.name && opDef.name.value;\n return _this;\n }\n Object.defineProperty(ObservableQuery.prototype, "query", {\n // The `query` computed property will always reflect the document transformed\n // by the last run query. `this.options.query` will always reflect the raw\n // untransformed query to ensure document transforms with runtime conditionals\n // are run on the original document.\n get: function () {\n return this.lastQuery || this.options.query;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ObservableQuery.prototype, "variables", {\n // Computed shorthand for this.options.variables, preserved for\n // backwards compatibility.\n /**\n * An object containing the variables that were provided for the query.\n */\n get: function () {\n return this.options.variables;\n },\n enumerable: false,\n configurable: true\n });\n ObservableQuery.prototype.result = function () {\n var _this = this;\n return new Promise(function (resolve, reject) {\n // TODO: this code doesn’t actually make sense insofar as the observer\n // will never exist in this.observers due how zen-observable wraps observables.\n // https://github.com/zenparsing/zen-observable/blob/master/src/Observable.js#L169\n var observer = {\n next: function (result) {\n resolve(result);\n // Stop the query within the QueryManager if we can before\n // this function returns.\n //\n // We do this in order to prevent observers piling up within\n // the QueryManager. Notice that we only fully unsubscribe\n // from the subscription in a setTimeout(..., 0) call. This call can\n // actually be handled by the browser at a much later time. If queries\n // are fired in the meantime, observers that should have been removed\n // from the QueryManager will continue to fire, causing an unnecessary\n // performance hit.\n _this.observers.delete(observer);\n if (!_this.observers.size) {\n _this.queryManager.removeQuery(_this.queryId);\n }\n setTimeout(function () {\n subscription.unsubscribe();\n }, 0);\n },\n error: reject,\n };\n var subscription = _this.subscribe(observer);\n });\n };\n /** @internal */\n ObservableQuery.prototype.resetDiff = function () {\n this.queryInfo.resetDiff();\n };\n ObservableQuery.prototype.getCurrentResult = function (saveAsLastResult) {\n if (saveAsLastResult === void 0) { saveAsLastResult = true; }\n // Use the last result as long as the variables match this.variables.\n var lastResult = this.getLastResult(true);\n var networkStatus = this.queryInfo.networkStatus ||\n (lastResult && lastResult.networkStatus) ||\n core_networkStatus/* NetworkStatus */.pT.ready;\n var result = (0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, lastResult), { loading: (0,core_networkStatus/* isNetworkRequestInFlight */.bi)(networkStatus), networkStatus: networkStatus });\n var _a = this.options.fetchPolicy, fetchPolicy = _a === void 0 ? "cache-first" : _a;\n if (\n // These fetch policies should never deliver data from the cache, unless\n // redelivering a previously delivered result.\n skipCacheDataFor(fetchPolicy) ||\n // If this.options.query has @client(always: true) fields, we cannot\n // trust diff.result, since it was read from the cache without running\n // local resolvers (and it\'s too late to run resolvers now, since we must\n // return a result synchronously).\n this.queryManager.getDocumentInfo(this.query).hasForcedResolvers) {\n // Fall through.\n }\n else if (this.waitForOwnResult) {\n // This would usually be a part of `QueryInfo.getDiff()`.\n // which we skip in the waitForOwnResult case since we are not\n // interested in the diff.\n this.queryInfo["updateWatch"]();\n }\n else {\n var diff = this.queryInfo.getDiff();\n if (diff.complete || this.options.returnPartialData) {\n result.data = diff.result;\n }\n if ((0,lib/* equal */.L)(result.data, {})) {\n result.data = void 0;\n }\n if (diff.complete) {\n // Similar to setting result.partial to false, but taking advantage of the\n // falsiness of missing fields.\n delete result.partial;\n // If the diff is complete, and we\'re using a FetchPolicy that\n // terminates after a complete cache read, we can assume the next result\n // we receive will have NetworkStatus.ready and !loading.\n if (diff.complete &&\n result.networkStatus === core_networkStatus/* NetworkStatus */.pT.loading &&\n (fetchPolicy === "cache-first" || fetchPolicy === "cache-only")) {\n result.networkStatus = core_networkStatus/* NetworkStatus */.pT.ready;\n result.loading = false;\n }\n }\n else {\n result.partial = true;\n }\n if (globalThis.__DEV__ !== false &&\n !diff.complete &&\n !this.options.partialRefetch &&\n !result.loading &&\n !result.data &&\n !result.error) {\n logMissingFieldErrors(diff.missing);\n }\n }\n if (saveAsLastResult) {\n this.updateLastResult(result);\n }\n return result;\n };\n // Compares newResult to the snapshot we took of this.lastResult when it was\n // first received.\n ObservableQuery.prototype.isDifferentFromLastResult = function (newResult, variables) {\n if (!this.last) {\n return true;\n }\n var resultIsDifferent = this.queryManager.getDocumentInfo(this.query).hasNonreactiveDirective ?\n !(0,equalByQuery/* equalByQuery */.a)(this.query, this.last.result, newResult, this.variables)\n : !(0,lib/* equal */.L)(this.last.result, newResult);\n return (resultIsDifferent || (variables && !(0,lib/* equal */.L)(this.last.variables, variables)));\n };\n ObservableQuery.prototype.getLast = function (key, variablesMustMatch) {\n var last = this.last;\n if (last &&\n last[key] &&\n (!variablesMustMatch || (0,lib/* equal */.L)(last.variables, this.variables))) {\n return last[key];\n }\n };\n ObservableQuery.prototype.getLastResult = function (variablesMustMatch) {\n return this.getLast("result", variablesMustMatch);\n };\n ObservableQuery.prototype.getLastError = function (variablesMustMatch) {\n return this.getLast("error", variablesMustMatch);\n };\n ObservableQuery.prototype.resetLastResults = function () {\n delete this.last;\n this.isTornDown = false;\n };\n ObservableQuery.prototype.resetQueryStoreErrors = function () {\n this.queryManager.resetErrors(this.queryId);\n };\n /**\n * Update the variables of this observable query, and fetch the new results.\n * This method should be preferred over `setVariables` in most use cases.\n *\n * @param variables - The new set of variables. If there are missing variables,\n * the previous values of those variables will be used.\n */\n ObservableQuery.prototype.refetch = function (variables) {\n var _a;\n var reobserveOptions = {\n // Always disable polling for refetches.\n pollInterval: 0,\n };\n // Unless the provided fetchPolicy always consults the network\n // (no-cache, network-only, or cache-and-network), override it with\n // network-only to force the refetch for this fetchQuery call.\n var fetchPolicy = this.options.fetchPolicy;\n if (fetchPolicy === "cache-and-network") {\n reobserveOptions.fetchPolicy = fetchPolicy;\n }\n else if (fetchPolicy === "no-cache") {\n reobserveOptions.fetchPolicy = "no-cache";\n }\n else {\n reobserveOptions.fetchPolicy = "network-only";\n }\n if (globalThis.__DEV__ !== false && variables && ObservableQuery_hasOwnProperty.call(variables, "variables")) {\n var queryDef = (0,getFromAST/* getQueryDefinition */.AT)(this.query);\n var vars = queryDef.variableDefinitions;\n if (!vars || !vars.some(function (v) { return v.variable.name.value === "variables"; })) {\n globalThis.__DEV__ !== false && globals/* invariant */.V1.warn(\n 20,\n variables,\n ((_a = queryDef.name) === null || _a === void 0 ? void 0 : _a.value) || queryDef\n );\n }\n }\n if (variables && !(0,lib/* equal */.L)(this.options.variables, variables)) {\n // Update the existing options with new variables\n reobserveOptions.variables = this.options.variables = (0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, this.options.variables), variables);\n }\n this.queryInfo.resetLastWrite();\n return this.reobserve(reobserveOptions, core_networkStatus/* NetworkStatus */.pT.refetch);\n };\n /**\n * A function that helps you fetch the next set of results for a [paginated list field](https://www.apollographql.com/docs/react/pagination/core-api/).\n */\n ObservableQuery.prototype.fetchMore = function (fetchMoreOptions) {\n var _this = this;\n var combinedOptions = (0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, (fetchMoreOptions.query ? fetchMoreOptions : ((0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, this.options), { query: this.options.query }), fetchMoreOptions), { variables: (0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, this.options.variables), fetchMoreOptions.variables) })))), { \n // The fetchMore request goes immediately to the network and does\n // not automatically write its result to the cache (hence no-cache\n // instead of network-only), because we allow the caller of\n // fetchMore to provide an updateQuery callback that determines how\n // the data gets written to the cache.\n fetchPolicy: "no-cache" });\n combinedOptions.query = this.transformDocument(combinedOptions.query);\n var qid = this.queryManager.generateQueryId();\n // If a temporary query is passed to `fetchMore`, we don\'t want to store\n // it as the last query result since it may be an optimized query for\n // pagination. We will however run the transforms on the original document\n // as well as the document passed in `fetchMoreOptions` to ensure the cache\n // uses the most up-to-date document which may rely on runtime conditionals.\n this.lastQuery =\n fetchMoreOptions.query ?\n this.transformDocument(this.options.query)\n : combinedOptions.query;\n // Simulate a loading result for the original query with\n // result.networkStatus === NetworkStatus.fetchMore.\n var queryInfo = this.queryInfo;\n var originalNetworkStatus = queryInfo.networkStatus;\n queryInfo.networkStatus = core_networkStatus/* NetworkStatus */.pT.fetchMore;\n if (combinedOptions.notifyOnNetworkStatusChange) {\n this.observe();\n }\n var updatedQuerySet = new Set();\n return this.queryManager\n .fetchQuery(qid, combinedOptions, core_networkStatus/* NetworkStatus */.pT.fetchMore)\n .then(function (fetchMoreResult) {\n _this.queryManager.removeQuery(qid);\n if (queryInfo.networkStatus === core_networkStatus/* NetworkStatus */.pT.fetchMore) {\n queryInfo.networkStatus = originalNetworkStatus;\n }\n // Performing this cache update inside a cache.batch transaction ensures\n // any affected cache.watch watchers are notified at most once about any\n // updates. Most watchers will be using the QueryInfo class, which\n // responds to notifications by calling reobserveCacheFirst to deliver\n // fetchMore cache results back to this ObservableQuery.\n _this.queryManager.cache.batch({\n update: function (cache) {\n var updateQuery = fetchMoreOptions.updateQuery;\n if (updateQuery) {\n cache.updateQuery({\n query: _this.query,\n variables: _this.variables,\n returnPartialData: true,\n optimistic: false,\n }, function (previous) {\n return updateQuery(previous, {\n fetchMoreResult: fetchMoreResult.data,\n variables: combinedOptions.variables,\n });\n });\n }\n else {\n // If we\'re using a field policy instead of updateQuery, the only\n // thing we need to do is write the new data to the cache using\n // combinedOptions.variables (instead of this.variables, which is\n // what this.updateQuery uses, because it works by abusing the\n // original field value, keyed by the original variables).\n cache.writeQuery({\n query: combinedOptions.query,\n variables: combinedOptions.variables,\n data: fetchMoreResult.data,\n });\n }\n },\n onWatchUpdated: function (watch) {\n // Record the DocumentNode associated with any watched query whose\n // data were updated by the cache writes above.\n updatedQuerySet.add(watch.query);\n },\n });\n return fetchMoreResult;\n })\n .finally(function () {\n // In case the cache writes above did not generate a broadcast\n // notification (which would have been intercepted by onWatchUpdated),\n // likely because the written data were the same as what was already in\n // the cache, we still want fetchMore to deliver its final loading:false\n // result with the unchanged data.\n if (!updatedQuerySet.has(_this.query)) {\n reobserveCacheFirst(_this);\n }\n });\n };\n // XXX the subscription variables are separate from the query variables.\n // if you want to update subscription variables, right now you have to do that separately,\n // and you can only do it by stopping the subscription and then subscribing again with new variables.\n /**\n * A function that enables you to execute a [subscription](https://www.apollographql.com/docs/react/data/subscriptions/), usually to subscribe to specific fields that were included in the query.\n *\n * This function returns _another_ function that you can call to terminate the subscription.\n */\n ObservableQuery.prototype.subscribeToMore = function (options) {\n var _this = this;\n var subscription = this.queryManager\n .startGraphQLSubscription({\n query: options.document,\n variables: options.variables,\n context: options.context,\n })\n .subscribe({\n next: function (subscriptionData) {\n var updateQuery = options.updateQuery;\n if (updateQuery) {\n _this.updateQuery(function (previous, _a) {\n var variables = _a.variables;\n return updateQuery(previous, {\n subscriptionData: subscriptionData,\n variables: variables,\n });\n });\n }\n },\n error: function (err) {\n if (options.onError) {\n options.onError(err);\n return;\n }\n globalThis.__DEV__ !== false && globals/* invariant */.V1.error(21, err);\n },\n });\n this.subscriptions.add(subscription);\n return function () {\n if (_this.subscriptions.delete(subscription)) {\n subscription.unsubscribe();\n }\n };\n };\n ObservableQuery.prototype.setOptions = function (newOptions) {\n return this.reobserve(newOptions);\n };\n ObservableQuery.prototype.silentSetOptions = function (newOptions) {\n var mergedOptions = (0,compact/* compact */.o)(this.options, newOptions || {});\n ObservableQuery_assign(this.options, mergedOptions);\n };\n /**\n * Update the variables of this observable query, and fetch the new results\n * if they\'ve changed. Most users should prefer `refetch` instead of\n * `setVariables` in order to to be properly notified of results even when\n * they come from the cache.\n *\n * Note: the `next` callback will *not* fire if the variables have not changed\n * or if the result is coming from cache.\n *\n * Note: the promise will return the old results immediately if the variables\n * have not changed.\n *\n * Note: the promise will return null immediately if the query is not active\n * (there are no subscribers).\n *\n * @param variables - The new set of variables. If there are missing variables,\n * the previous values of those variables will be used.\n */\n ObservableQuery.prototype.setVariables = function (variables) {\n if ((0,lib/* equal */.L)(this.variables, variables)) {\n // If we have no observers, then we don\'t actually want to make a network\n // request. As soon as someone observes the query, the request will kick\n // off. For now, we just store any changes. (See #1077)\n return this.observers.size ? this.result() : Promise.resolve();\n }\n this.options.variables = variables;\n // See comment above\n if (!this.observers.size) {\n return Promise.resolve();\n }\n return this.reobserve({\n // Reset options.fetchPolicy to its original value.\n fetchPolicy: this.options.initialFetchPolicy,\n variables: variables,\n }, core_networkStatus/* NetworkStatus */.pT.setVariables);\n };\n /**\n * A function that enables you to update the query\'s cached result without executing a followup GraphQL operation.\n *\n * See [using updateQuery and updateFragment](https://www.apollographql.com/docs/react/caching/cache-interaction/#using-updatequery-and-updatefragment) for additional information.\n */\n ObservableQuery.prototype.updateQuery = function (mapFn) {\n var queryManager = this.queryManager;\n var result = queryManager.cache.diff({\n query: this.options.query,\n variables: this.variables,\n returnPartialData: true,\n optimistic: false,\n }).result;\n var newResult = mapFn(result, {\n variables: this.variables,\n });\n if (newResult) {\n queryManager.cache.writeQuery({\n query: this.options.query,\n data: newResult,\n variables: this.variables,\n });\n queryManager.broadcastQueries();\n }\n };\n /**\n * A function that instructs the query to begin re-executing at a specified interval (in milliseconds).\n */\n ObservableQuery.prototype.startPolling = function (pollInterval) {\n this.options.pollInterval = pollInterval;\n this.updatePolling();\n };\n /**\n * A function that instructs the query to stop polling after a previous call to `startPolling`.\n */\n ObservableQuery.prototype.stopPolling = function () {\n this.options.pollInterval = 0;\n this.updatePolling();\n };\n // Update options.fetchPolicy according to options.nextFetchPolicy.\n ObservableQuery.prototype.applyNextFetchPolicy = function (reason, \n // It\'s possible to use this method to apply options.nextFetchPolicy to\n // options.fetchPolicy even if options !== this.options, though that happens\n // most often when the options are temporary, used for only one request and\n // then thrown away, so nextFetchPolicy may not end up mattering.\n options) {\n if (options.nextFetchPolicy) {\n var _a = options.fetchPolicy, fetchPolicy = _a === void 0 ? "cache-first" : _a, _b = options.initialFetchPolicy, initialFetchPolicy = _b === void 0 ? fetchPolicy : _b;\n if (fetchPolicy === "standby") {\n // Do nothing, leaving options.fetchPolicy unchanged.\n }\n else if (typeof options.nextFetchPolicy === "function") {\n // When someone chooses "cache-and-network" or "network-only" as their\n // initial FetchPolicy, they often do not want future cache updates to\n // trigger unconditional network requests, which is what repeatedly\n // applying the "cache-and-network" or "network-only" policies would\n // seem to imply. Instead, when the cache reports an update after the\n // initial network request, it may be desirable for subsequent network\n // requests to be triggered only if the cache result is incomplete. To\n // that end, the options.nextFetchPolicy option provides an easy way to\n // update options.fetchPolicy after the initial network request, without\n // having to call observableQuery.setOptions.\n options.fetchPolicy = options.nextFetchPolicy(fetchPolicy, {\n reason: reason,\n options: options,\n observable: this,\n initialFetchPolicy: initialFetchPolicy,\n });\n }\n else if (reason === "variables-changed") {\n options.fetchPolicy = initialFetchPolicy;\n }\n else {\n options.fetchPolicy = options.nextFetchPolicy;\n }\n }\n return options.fetchPolicy;\n };\n ObservableQuery.prototype.fetch = function (options, newNetworkStatus, query) {\n // TODO Make sure we update the networkStatus (and infer fetchVariables)\n // before actually committing to the fetch.\n this.queryManager.setObservableQuery(this);\n return this.queryManager["fetchConcastWithInfo"](this.queryId, options, newNetworkStatus, query);\n };\n // Turns polling on or off based on this.options.pollInterval.\n ObservableQuery.prototype.updatePolling = function () {\n var _this = this;\n // Avoid polling in SSR mode\n if (this.queryManager.ssrMode) {\n return;\n }\n var _a = this, pollingInfo = _a.pollingInfo, pollInterval = _a.options.pollInterval;\n if (!pollInterval || !this.hasObservers()) {\n if (pollingInfo) {\n clearTimeout(pollingInfo.timeout);\n delete this.pollingInfo;\n }\n return;\n }\n if (pollingInfo && pollingInfo.interval === pollInterval) {\n return;\n }\n (0,globals/* invariant */.V1)(pollInterval, 22);\n var info = pollingInfo || (this.pollingInfo = {});\n info.interval = pollInterval;\n var maybeFetch = function () {\n var _a, _b;\n if (_this.pollingInfo) {\n if (!(0,core_networkStatus/* isNetworkRequestInFlight */.bi)(_this.queryInfo.networkStatus) &&\n !((_b = (_a = _this.options).skipPollAttempt) === null || _b === void 0 ? void 0 : _b.call(_a))) {\n _this.reobserve({\n // Most fetchPolicy options don\'t make sense to use in a polling context, as\n // users wouldn\'t want to be polling the cache directly. However, network-only and\n // no-cache are both useful for when the user wants to control whether or not the\n // polled results are written to the cache.\n fetchPolicy: _this.options.initialFetchPolicy === "no-cache" ?\n "no-cache"\n : "network-only",\n }, core_networkStatus/* NetworkStatus */.pT.poll).then(poll, poll);\n }\n else {\n poll();\n }\n }\n };\n var poll = function () {\n var info = _this.pollingInfo;\n if (info) {\n clearTimeout(info.timeout);\n info.timeout = setTimeout(maybeFetch, info.interval);\n }\n };\n poll();\n };\n ObservableQuery.prototype.updateLastResult = function (newResult, variables) {\n if (variables === void 0) { variables = this.variables; }\n var error = this.getLastError();\n // Preserve this.last.error unless the variables have changed.\n if (error && this.last && !(0,lib/* equal */.L)(variables, this.last.variables)) {\n error = void 0;\n }\n return (this.last = (0,tslib_es6/* __assign */.Cl)({ result: this.queryManager.assumeImmutableResults ?\n newResult\n : (0,cloneDeep/* cloneDeep */.m)(newResult), variables: variables }, (error ? { error: error } : null)));\n };\n ObservableQuery.prototype.reobserveAsConcast = function (newOptions, newNetworkStatus) {\n var _this = this;\n this.isTornDown = false;\n var useDisposableConcast = \n // Refetching uses a disposable Concast to allow refetches using different\n // options/variables, without permanently altering the options of the\n // original ObservableQuery.\n newNetworkStatus === core_networkStatus/* NetworkStatus */.pT.refetch ||\n // The fetchMore method does not actually call the reobserve method, but,\n // if it did, it would definitely use a disposable Concast.\n newNetworkStatus === core_networkStatus/* NetworkStatus */.pT.fetchMore ||\n // Polling uses a disposable Concast so the polling options (which force\n // fetchPolicy to be "network-only" or "no-cache") won\'t override the original options.\n newNetworkStatus === core_networkStatus/* NetworkStatus */.pT.poll;\n // Save the old variables, since Object.assign may modify them below.\n var oldVariables = this.options.variables;\n var oldFetchPolicy = this.options.fetchPolicy;\n var mergedOptions = (0,compact/* compact */.o)(this.options, newOptions || {});\n var options = useDisposableConcast ?\n // Disposable Concast fetches receive a shallow copy of this.options\n // (merged with newOptions), leaving this.options unmodified.\n mergedOptions\n : ObservableQuery_assign(this.options, mergedOptions);\n // Don\'t update options.query with the transformed query to avoid\n // overwriting this.options.query when we aren\'t using a disposable concast.\n // We want to ensure we can re-run the custom document transforms the next\n // time a request is made against the original query.\n var query = this.transformDocument(options.query);\n this.lastQuery = query;\n if (!useDisposableConcast) {\n // We can skip calling updatePolling if we\'re not changing this.options.\n this.updatePolling();\n // Reset options.fetchPolicy to its original value when variables change,\n // unless a new fetchPolicy was provided by newOptions.\n if (newOptions &&\n newOptions.variables &&\n !(0,lib/* equal */.L)(newOptions.variables, oldVariables) &&\n // Don\'t mess with the fetchPolicy if it\'s currently "standby".\n options.fetchPolicy !== "standby" &&\n // If we\'re changing the fetchPolicy anyway, don\'t try to change it here\n // using applyNextFetchPolicy. The explicit options.fetchPolicy wins.\n options.fetchPolicy === oldFetchPolicy) {\n this.applyNextFetchPolicy("variables-changed", options);\n if (newNetworkStatus === void 0) {\n newNetworkStatus = core_networkStatus/* NetworkStatus */.pT.setVariables;\n }\n }\n }\n this.waitForOwnResult && (this.waitForOwnResult = skipCacheDataFor(options.fetchPolicy));\n var finishWaitingForOwnResult = function () {\n if (_this.concast === concast) {\n _this.waitForOwnResult = false;\n }\n };\n var variables = options.variables && (0,tslib_es6/* __assign */.Cl)({}, options.variables);\n var _a = this.fetch(options, newNetworkStatus, query), concast = _a.concast, fromLink = _a.fromLink;\n var observer = {\n next: function (result) {\n if ((0,lib/* equal */.L)(_this.variables, variables)) {\n finishWaitingForOwnResult();\n _this.reportResult(result, variables);\n }\n },\n error: function (error) {\n if ((0,lib/* equal */.L)(_this.variables, variables)) {\n finishWaitingForOwnResult();\n _this.reportError(error, variables);\n }\n },\n };\n if (!useDisposableConcast && (fromLink || !this.concast)) {\n // We use the {add,remove}Observer methods directly to avoid wrapping\n // observer with an unnecessary SubscriptionObserver object.\n if (this.concast && this.observer) {\n this.concast.removeObserver(this.observer);\n }\n this.concast = concast;\n this.observer = observer;\n }\n concast.addObserver(observer);\n return concast;\n };\n ObservableQuery.prototype.reobserve = function (newOptions, newNetworkStatus) {\n return this.reobserveAsConcast(newOptions, newNetworkStatus)\n .promise;\n };\n ObservableQuery.prototype.resubscribeAfterError = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n // If `lastError` is set in the current when the subscription is re-created,\n // the subscription will immediately receive the error, which will\n // cause it to terminate again. To avoid this, we first clear\n // the last error/result from the `observableQuery` before re-starting\n // the subscription, and restore the last value afterwards so that the\n // subscription has a chance to stay open.\n var last = this.last;\n this.resetLastResults();\n var subscription = this.subscribe.apply(this, args);\n this.last = last;\n return subscription;\n };\n // (Re)deliver the current result to this.observers without applying fetch\n // policies or making network requests.\n ObservableQuery.prototype.observe = function () {\n this.reportResult(\n // Passing false is important so that this.getCurrentResult doesn\'t\n // save the fetchMore result as this.lastResult, causing it to be\n // ignored due to the this.isDifferentFromLastResult check in\n // this.reportResult.\n this.getCurrentResult(false), this.variables);\n };\n ObservableQuery.prototype.reportResult = function (result, variables) {\n var lastError = this.getLastError();\n var isDifferent = this.isDifferentFromLastResult(result, variables);\n // Update the last result even when isDifferentFromLastResult returns false,\n // because the query may be using the @nonreactive directive, and we want to\n // save the the latest version of any nonreactive subtrees (in case\n // getCurrentResult is called), even though we skip broadcasting changes.\n if (lastError || !result.partial || this.options.returnPartialData) {\n this.updateLastResult(result, variables);\n }\n if (lastError || isDifferent) {\n iterateObserversSafely(this.observers, "next", result);\n }\n };\n ObservableQuery.prototype.reportError = function (error, variables) {\n // Since we don\'t get the current result on errors, only the error, we\n // must mirror the updates that occur in QueryStore.markQueryError here\n var errorResult = (0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, this.getLastResult()), { error: error, errors: error.graphQLErrors, networkStatus: core_networkStatus/* NetworkStatus */.pT.error, loading: false });\n this.updateLastResult(errorResult, variables);\n iterateObserversSafely(this.observers, "error", (this.last.error = error));\n };\n ObservableQuery.prototype.hasObservers = function () {\n return this.observers.size > 0;\n };\n ObservableQuery.prototype.tearDownQuery = function () {\n if (this.isTornDown)\n return;\n if (this.concast && this.observer) {\n this.concast.removeObserver(this.observer);\n delete this.concast;\n delete this.observer;\n }\n this.stopPolling();\n // stop all active GraphQL subscriptions\n this.subscriptions.forEach(function (sub) { return sub.unsubscribe(); });\n this.subscriptions.clear();\n this.queryManager.stopQuery(this.queryId);\n this.observers.clear();\n this.isTornDown = true;\n };\n ObservableQuery.prototype.transformDocument = function (document) {\n return this.queryManager.transform(document);\n };\n return ObservableQuery;\n}(zen_observable_ts_module/* Observable */.c));\n\n// Necessary because the ObservableQuery constructor has a different\n// signature than the Observable constructor.\nfixObservableSubclass(ObservableQuery);\n// Reobserve with fetchPolicy effectively set to "cache-first", triggering\n// delivery of any new data from the cache, possibly falling back to the network\n// if any cache data are missing. This allows _complete_ cache results to be\n// delivered without also kicking off unnecessary network requests when\n// this.options.fetchPolicy is "cache-and-network" or "network-only". When\n// this.options.fetchPolicy is any other policy ("cache-first", "cache-only",\n// "standby", or "no-cache"), we call this.reobserve() as usual.\nfunction reobserveCacheFirst(obsQuery) {\n var _a = obsQuery.options, fetchPolicy = _a.fetchPolicy, nextFetchPolicy = _a.nextFetchPolicy;\n if (fetchPolicy === "cache-and-network" || fetchPolicy === "network-only") {\n return obsQuery.reobserve({\n fetchPolicy: "cache-first",\n // Use a temporary nextFetchPolicy function that replaces itself with the\n // previous nextFetchPolicy value and returns the original fetchPolicy.\n nextFetchPolicy: function (currentFetchPolicy, context) {\n // Replace this nextFetchPolicy function in the options object with the\n // original this.options.nextFetchPolicy value.\n this.nextFetchPolicy = nextFetchPolicy;\n // If the original nextFetchPolicy value was a function, give it a\n // chance to decide what happens here.\n if (typeof this.nextFetchPolicy === "function") {\n return this.nextFetchPolicy(currentFetchPolicy, context);\n }\n // Otherwise go back to the original this.options.fetchPolicy.\n return fetchPolicy;\n },\n });\n }\n return obsQuery.reobserve();\n}\nfunction defaultSubscriptionObserverErrorCallback(error) {\n globalThis.__DEV__ !== false && globals/* invariant */.V1.error(23, error.message, error.stack);\n}\nfunction logMissingFieldErrors(missing) {\n if (globalThis.__DEV__ !== false && missing) {\n globalThis.__DEV__ !== false && globals/* invariant */.V1.debug(24, missing);\n }\n}\nfunction skipCacheDataFor(fetchPolicy /* `undefined` would mean `"cache-first"` */) {\n return (fetchPolicy === "network-only" ||\n fetchPolicy === "no-cache" ||\n fetchPolicy === "standby");\n}\n//# sourceMappingURL=ObservableQuery.js.map\n// EXTERNAL MODULE: ./node_modules/graphql/language/visitor.mjs\nvar visitor = __webpack_require__(4705);\n// EXTERNAL MODULE: ./node_modules/graphql/language/kinds.mjs\nvar kinds = __webpack_require__(3298);\n;// CONCATENATED MODULE: ./node_modules/graphql/language/predicates.mjs\n\nfunction isDefinitionNode(node) {\n return (\n isExecutableDefinitionNode(node) ||\n isTypeSystemDefinitionNode(node) ||\n isTypeSystemExtensionNode(node)\n );\n}\nfunction isExecutableDefinitionNode(node) {\n return (\n node.kind === Kind.OPERATION_DEFINITION ||\n node.kind === Kind.FRAGMENT_DEFINITION\n );\n}\nfunction isSelectionNode(node) {\n return (\n node.kind === kinds/* Kind */.b.FIELD ||\n node.kind === kinds/* Kind */.b.FRAGMENT_SPREAD ||\n node.kind === kinds/* Kind */.b.INLINE_FRAGMENT\n );\n}\nfunction isValueNode(node) {\n return (\n node.kind === Kind.VARIABLE ||\n node.kind === Kind.INT ||\n node.kind === Kind.FLOAT ||\n node.kind === Kind.STRING ||\n node.kind === Kind.BOOLEAN ||\n node.kind === Kind.NULL ||\n node.kind === Kind.ENUM ||\n node.kind === Kind.LIST ||\n node.kind === Kind.OBJECT\n );\n}\nfunction isConstValueNode(node) {\n return (\n isValueNode(node) &&\n (node.kind === Kind.LIST\n ? node.values.some(isConstValueNode)\n : node.kind === Kind.OBJECT\n ? node.fields.some((field) => isConstValueNode(field.value))\n : node.kind !== Kind.VARIABLE)\n );\n}\nfunction isTypeNode(node) {\n return (\n node.kind === Kind.NAMED_TYPE ||\n node.kind === Kind.LIST_TYPE ||\n node.kind === Kind.NON_NULL_TYPE\n );\n}\nfunction isTypeSystemDefinitionNode(node) {\n return (\n node.kind === Kind.SCHEMA_DEFINITION ||\n isTypeDefinitionNode(node) ||\n node.kind === Kind.DIRECTIVE_DEFINITION\n );\n}\nfunction isTypeDefinitionNode(node) {\n return (\n node.kind === Kind.SCALAR_TYPE_DEFINITION ||\n node.kind === Kind.OBJECT_TYPE_DEFINITION ||\n node.kind === Kind.INTERFACE_TYPE_DEFINITION ||\n node.kind === Kind.UNION_TYPE_DEFINITION ||\n node.kind === Kind.ENUM_TYPE_DEFINITION ||\n node.kind === Kind.INPUT_OBJECT_TYPE_DEFINITION\n );\n}\nfunction isTypeSystemExtensionNode(node) {\n return node.kind === Kind.SCHEMA_EXTENSION || isTypeExtensionNode(node);\n}\nfunction isTypeExtensionNode(node) {\n return (\n node.kind === Kind.SCALAR_TYPE_EXTENSION ||\n node.kind === Kind.OBJECT_TYPE_EXTENSION ||\n node.kind === Kind.INTERFACE_TYPE_EXTENSION ||\n node.kind === Kind.UNION_TYPE_EXTENSION ||\n node.kind === Kind.ENUM_TYPE_EXTENSION ||\n node.kind === Kind.INPUT_OBJECT_TYPE_EXTENSION\n );\n}\n\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/common/mergeDeep.js\nvar mergeDeep = __webpack_require__(2922);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/graphql/fragments.js\nvar graphql_fragments = __webpack_require__(5215);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/cache/inmemory/reactiveVars.js\nvar reactiveVars = __webpack_require__(738);\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/core/LocalState.js\n\n\n\n\n\nvar LocalState = /** @class */ (function () {\n function LocalState(_a) {\n var cache = _a.cache, client = _a.client, resolvers = _a.resolvers, fragmentMatcher = _a.fragmentMatcher;\n this.selectionsToResolveCache = new WeakMap();\n this.cache = cache;\n if (client) {\n this.client = client;\n }\n if (resolvers) {\n this.addResolvers(resolvers);\n }\n if (fragmentMatcher) {\n this.setFragmentMatcher(fragmentMatcher);\n }\n }\n LocalState.prototype.addResolvers = function (resolvers) {\n var _this = this;\n this.resolvers = this.resolvers || {};\n if (Array.isArray(resolvers)) {\n resolvers.forEach(function (resolverGroup) {\n _this.resolvers = (0,mergeDeep/* mergeDeep */.D9)(_this.resolvers, resolverGroup);\n });\n }\n else {\n this.resolvers = (0,mergeDeep/* mergeDeep */.D9)(this.resolvers, resolvers);\n }\n };\n LocalState.prototype.setResolvers = function (resolvers) {\n this.resolvers = {};\n this.addResolvers(resolvers);\n };\n LocalState.prototype.getResolvers = function () {\n return this.resolvers || {};\n };\n // Run local client resolvers against the incoming query and remote data.\n // Locally resolved field values are merged with the incoming remote data,\n // and returned. Note that locally resolved fields will overwrite\n // remote data using the same field name.\n LocalState.prototype.runResolvers = function (_a) {\n return (0,tslib_es6/* __awaiter */.sH)(this, arguments, void 0, function (_b) {\n var document = _b.document, remoteResult = _b.remoteResult, context = _b.context, variables = _b.variables, _c = _b.onlyRunForcedResolvers, onlyRunForcedResolvers = _c === void 0 ? false : _c;\n return (0,tslib_es6/* __generator */.YH)(this, function (_d) {\n if (document) {\n return [2 /*return*/, this.resolveDocument(document, remoteResult.data, context, variables, this.fragmentMatcher, onlyRunForcedResolvers).then(function (localResult) { return ((0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, remoteResult), { data: localResult.result })); })];\n }\n return [2 /*return*/, remoteResult];\n });\n });\n };\n LocalState.prototype.setFragmentMatcher = function (fragmentMatcher) {\n this.fragmentMatcher = fragmentMatcher;\n };\n LocalState.prototype.getFragmentMatcher = function () {\n return this.fragmentMatcher;\n };\n // Client queries contain everything in the incoming document (if a @client\n // directive is found).\n LocalState.prototype.clientQuery = function (document) {\n if ((0,directives/* hasDirectives */.d8)(["client"], document)) {\n if (this.resolvers) {\n return document;\n }\n }\n return null;\n };\n // Server queries are stripped of all @client based selection sets.\n LocalState.prototype.serverQuery = function (document) {\n return (0,transform/* removeClientSetsFromDocument */.er)(document);\n };\n LocalState.prototype.prepareContext = function (context) {\n var cache = this.cache;\n return (0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, context), { cache: cache, \n // Getting an entry\'s cache key is useful for local state resolvers.\n getCacheKey: function (obj) {\n return cache.identify(obj);\n } });\n };\n // To support `@client @export(as: "someVar")` syntax, we\'ll first resolve\n // @client @export fields locally, then pass the resolved values back to be\n // used alongside the original operation variables.\n LocalState.prototype.addExportedVariables = function (document_1) {\n return (0,tslib_es6/* __awaiter */.sH)(this, arguments, void 0, function (document, variables, context) {\n if (variables === void 0) { variables = {}; }\n if (context === void 0) { context = {}; }\n return (0,tslib_es6/* __generator */.YH)(this, function (_a) {\n if (document) {\n return [2 /*return*/, this.resolveDocument(document, this.buildRootValueFromCache(document, variables) || {}, this.prepareContext(context), variables).then(function (data) { return ((0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, variables), data.exportedVariables)); })];\n }\n return [2 /*return*/, (0,tslib_es6/* __assign */.Cl)({}, variables)];\n });\n });\n };\n LocalState.prototype.shouldForceResolvers = function (document) {\n var forceResolvers = false;\n (0,visitor/* visit */.YR)(document, {\n Directive: {\n enter: function (node) {\n if (node.name.value === "client" && node.arguments) {\n forceResolvers = node.arguments.some(function (arg) {\n return arg.name.value === "always" &&\n arg.value.kind === "BooleanValue" &&\n arg.value.value === true;\n });\n if (forceResolvers) {\n return visitor/* BREAK */.sP;\n }\n }\n },\n },\n });\n return forceResolvers;\n };\n // Query the cache and return matching data.\n LocalState.prototype.buildRootValueFromCache = function (document, variables) {\n return this.cache.diff({\n query: (0,transform/* buildQueryFromSelectionSet */.zc)(document),\n variables: variables,\n returnPartialData: true,\n optimistic: false,\n }).result;\n };\n LocalState.prototype.resolveDocument = function (document_1, rootValue_1) {\n return (0,tslib_es6/* __awaiter */.sH)(this, arguments, void 0, function (document, rootValue, context, variables, fragmentMatcher, onlyRunForcedResolvers) {\n var mainDefinition, fragments, fragmentMap, selectionsToResolve, definitionOperation, defaultOperationType, _a, cache, client, execContext, isClientFieldDescendant;\n if (context === void 0) { context = {}; }\n if (variables === void 0) { variables = {}; }\n if (fragmentMatcher === void 0) { fragmentMatcher = function () { return true; }; }\n if (onlyRunForcedResolvers === void 0) { onlyRunForcedResolvers = false; }\n return (0,tslib_es6/* __generator */.YH)(this, function (_b) {\n mainDefinition = (0,getFromAST/* getMainDefinition */.Vn)(document);\n fragments = (0,getFromAST/* getFragmentDefinitions */.zK)(document);\n fragmentMap = (0,graphql_fragments/* createFragmentMap */.JG)(fragments);\n selectionsToResolve = this.collectSelectionsToResolve(mainDefinition, fragmentMap);\n definitionOperation = mainDefinition.operation;\n defaultOperationType = definitionOperation ?\n definitionOperation.charAt(0).toUpperCase() +\n definitionOperation.slice(1)\n : "Query";\n _a = this, cache = _a.cache, client = _a.client;\n execContext = {\n fragmentMap: fragmentMap,\n context: (0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, context), { cache: cache, client: client }),\n variables: variables,\n fragmentMatcher: fragmentMatcher,\n defaultOperationType: defaultOperationType,\n exportedVariables: {},\n selectionsToResolve: selectionsToResolve,\n onlyRunForcedResolvers: onlyRunForcedResolvers,\n };\n isClientFieldDescendant = false;\n return [2 /*return*/, this.resolveSelectionSet(mainDefinition.selectionSet, isClientFieldDescendant, rootValue, execContext).then(function (result) { return ({\n result: result,\n exportedVariables: execContext.exportedVariables,\n }); })];\n });\n });\n };\n LocalState.prototype.resolveSelectionSet = function (selectionSet, isClientFieldDescendant, rootValue, execContext) {\n return (0,tslib_es6/* __awaiter */.sH)(this, void 0, void 0, function () {\n var fragmentMap, context, variables, resultsToMerge, execute;\n var _this = this;\n return (0,tslib_es6/* __generator */.YH)(this, function (_a) {\n fragmentMap = execContext.fragmentMap, context = execContext.context, variables = execContext.variables;\n resultsToMerge = [rootValue];\n execute = function (selection) { return (0,tslib_es6/* __awaiter */.sH)(_this, void 0, void 0, function () {\n var fragment, typeCondition;\n return (0,tslib_es6/* __generator */.YH)(this, function (_a) {\n if (!isClientFieldDescendant &&\n !execContext.selectionsToResolve.has(selection)) {\n // Skip selections without @client directives\n // (still processing if one of the ancestors or one of the child fields has @client directive)\n return [2 /*return*/];\n }\n if (!(0,directives/* shouldInclude */.MS)(selection, variables)) {\n // Skip this entirely.\n return [2 /*return*/];\n }\n if ((0,storeUtils/* isField */.dt)(selection)) {\n return [2 /*return*/, this.resolveField(selection, isClientFieldDescendant, rootValue, execContext).then(function (fieldResult) {\n var _a;\n if (typeof fieldResult !== "undefined") {\n resultsToMerge.push((_a = {},\n _a[(0,storeUtils/* resultKeyNameFromField */.ue)(selection)] = fieldResult,\n _a));\n }\n })];\n }\n if ((0,storeUtils/* isInlineFragment */.kd)(selection)) {\n fragment = selection;\n }\n else {\n // This is a named fragment.\n fragment = fragmentMap[selection.name.value];\n (0,globals/* invariant */.V1)(fragment, 18, selection.name.value);\n }\n if (fragment && fragment.typeCondition) {\n typeCondition = fragment.typeCondition.name.value;\n if (execContext.fragmentMatcher(rootValue, typeCondition, context)) {\n return [2 /*return*/, this.resolveSelectionSet(fragment.selectionSet, isClientFieldDescendant, rootValue, execContext).then(function (fragmentResult) {\n resultsToMerge.push(fragmentResult);\n })];\n }\n }\n return [2 /*return*/];\n });\n }); };\n return [2 /*return*/, Promise.all(selectionSet.selections.map(execute)).then(function () {\n return (0,mergeDeep/* mergeDeepArray */.IM)(resultsToMerge);\n })];\n });\n });\n };\n LocalState.prototype.resolveField = function (field, isClientFieldDescendant, rootValue, execContext) {\n return (0,tslib_es6/* __awaiter */.sH)(this, void 0, void 0, function () {\n var variables, fieldName, aliasedFieldName, aliasUsed, defaultResult, resultPromise, resolverType, resolverMap, resolve;\n var _this = this;\n return (0,tslib_es6/* __generator */.YH)(this, function (_a) {\n if (!rootValue) {\n return [2 /*return*/, null];\n }\n variables = execContext.variables;\n fieldName = field.name.value;\n aliasedFieldName = (0,storeUtils/* resultKeyNameFromField */.ue)(field);\n aliasUsed = fieldName !== aliasedFieldName;\n defaultResult = rootValue[aliasedFieldName] || rootValue[fieldName];\n resultPromise = Promise.resolve(defaultResult);\n // Usually all local resolvers are run when passing through here, but\n // if we\'ve specifically identified that we only want to run forced\n // resolvers (that is, resolvers for fields marked with\n // `@client(always: true)`), then we\'ll skip running non-forced resolvers.\n if (!execContext.onlyRunForcedResolvers ||\n this.shouldForceResolvers(field)) {\n resolverType = rootValue.__typename || execContext.defaultOperationType;\n resolverMap = this.resolvers && this.resolvers[resolverType];\n if (resolverMap) {\n resolve = resolverMap[aliasUsed ? fieldName : aliasedFieldName];\n if (resolve) {\n resultPromise = Promise.resolve(\n // In case the resolve function accesses reactive variables,\n // set cacheSlot to the current cache instance.\n reactiveVars/* cacheSlot */.bl.withValue(this.cache, resolve, [\n rootValue,\n (0,storeUtils/* argumentsObjectFromField */.MB)(field, variables),\n execContext.context,\n { field: field, fragmentMap: execContext.fragmentMap },\n ]));\n }\n }\n }\n return [2 /*return*/, resultPromise.then(function (result) {\n var _a, _b;\n if (result === void 0) { result = defaultResult; }\n // If an @export directive is associated with the current field, store\n // the `as` export variable name and current result for later use.\n if (field.directives) {\n field.directives.forEach(function (directive) {\n if (directive.name.value === "export" && directive.arguments) {\n directive.arguments.forEach(function (arg) {\n if (arg.name.value === "as" && arg.value.kind === "StringValue") {\n execContext.exportedVariables[arg.value.value] = result;\n }\n });\n }\n });\n }\n // Handle all scalar types here.\n if (!field.selectionSet) {\n return result;\n }\n // From here down, the field has a selection set, which means it\'s trying\n // to query a GraphQLObjectType.\n if (result == null) {\n // Basically any field in a GraphQL response can be null, or missing\n return result;\n }\n var isClientField = (_b = (_a = field.directives) === null || _a === void 0 ? void 0 : _a.some(function (d) { return d.name.value === "client"; })) !== null && _b !== void 0 ? _b : false;\n if (Array.isArray(result)) {\n return _this.resolveSubSelectedArray(field, isClientFieldDescendant || isClientField, result, execContext);\n }\n // Returned value is an object, and the query has a sub-selection. Recurse.\n if (field.selectionSet) {\n return _this.resolveSelectionSet(field.selectionSet, isClientFieldDescendant || isClientField, result, execContext);\n }\n })];\n });\n });\n };\n LocalState.prototype.resolveSubSelectedArray = function (field, isClientFieldDescendant, result, execContext) {\n var _this = this;\n return Promise.all(result.map(function (item) {\n if (item === null) {\n return null;\n }\n // This is a nested array, recurse.\n if (Array.isArray(item)) {\n return _this.resolveSubSelectedArray(field, isClientFieldDescendant, item, execContext);\n }\n // This is an object, run the selection set on it.\n if (field.selectionSet) {\n return _this.resolveSelectionSet(field.selectionSet, isClientFieldDescendant, item, execContext);\n }\n }));\n };\n // Collect selection nodes on paths from document root down to all @client directives.\n // This function takes into account transitive fragment spreads.\n // Complexity equals to a single `visit` over the full document.\n LocalState.prototype.collectSelectionsToResolve = function (mainDefinition, fragmentMap) {\n var isSingleASTNode = function (node) { return !Array.isArray(node); };\n var selectionsToResolveCache = this.selectionsToResolveCache;\n function collectByDefinition(definitionNode) {\n if (!selectionsToResolveCache.has(definitionNode)) {\n var matches_1 = new Set();\n selectionsToResolveCache.set(definitionNode, matches_1);\n (0,visitor/* visit */.YR)(definitionNode, {\n Directive: function (node, _, __, ___, ancestors) {\n if (node.name.value === "client") {\n ancestors.forEach(function (node) {\n if (isSingleASTNode(node) && isSelectionNode(node)) {\n matches_1.add(node);\n }\n });\n }\n },\n FragmentSpread: function (spread, _, __, ___, ancestors) {\n var fragment = fragmentMap[spread.name.value];\n (0,globals/* invariant */.V1)(fragment, 19, spread.name.value);\n var fragmentSelections = collectByDefinition(fragment);\n if (fragmentSelections.size > 0) {\n // Fragment for this spread contains @client directive (either directly or transitively)\n // Collect selection nodes on paths from the root down to fields with the @client directive\n ancestors.forEach(function (node) {\n if (isSingleASTNode(node) && isSelectionNode(node)) {\n matches_1.add(node);\n }\n });\n matches_1.add(spread);\n fragmentSelections.forEach(function (selection) {\n matches_1.add(selection);\n });\n }\n },\n });\n }\n return selectionsToResolveCache.get(definitionNode);\n }\n return collectByDefinition(mainDefinition);\n };\n return LocalState;\n}());\n\n//# sourceMappingURL=LocalState.js.map\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/core/QueryInfo.js\n\n\n\n\n\n\n\nvar destructiveMethodCounts = new (canUse/* canUseWeakMap */.et ? WeakMap : Map)();\nfunction wrapDestructiveCacheMethod(cache, methodName) {\n var original = cache[methodName];\n if (typeof original === "function") {\n // @ts-expect-error this is just too generic to be typed correctly\n cache[methodName] = function () {\n destructiveMethodCounts.set(cache, \n // The %1e15 allows the count to wrap around to 0 safely every\n // quadrillion evictions, so there\'s no risk of overflow. To be\n // clear, this is more of a pedantic principle than something\n // that matters in any conceivable practical scenario.\n (destructiveMethodCounts.get(cache) + 1) % 1e15);\n // @ts-expect-error this is just too generic to be typed correctly\n return original.apply(this, arguments);\n };\n }\n}\nfunction cancelNotifyTimeout(info) {\n if (info["notifyTimeout"]) {\n clearTimeout(info["notifyTimeout"]);\n info["notifyTimeout"] = void 0;\n }\n}\n// A QueryInfo object represents a single query managed by the\n// QueryManager, which tracks all QueryInfo objects by queryId in its\n// this.queries Map. QueryInfo objects store the latest results and errors\n// for the given query, and are responsible for reporting those results to\n// the corresponding ObservableQuery, via the QueryInfo.notify method.\n// Results are reported asynchronously whenever setDiff marks the\n// QueryInfo object as dirty, though a call to the QueryManager\'s\n// broadcastQueries method may trigger the notification before it happens\n// automatically. This class used to be a simple interface type without\n// any field privacy or meaningful methods, which is why it still has so\n// many public fields. The effort to lock down and simplify the QueryInfo\n// interface is ongoing, and further improvements are welcome.\nvar QueryInfo = /** @class */ (function () {\n function QueryInfo(queryManager, queryId) {\n if (queryId === void 0) { queryId = queryManager.generateQueryId(); }\n this.queryId = queryId;\n this.listeners = new Set();\n this.document = null;\n this.lastRequestId = 1;\n this.stopped = false;\n this.dirty = false;\n this.observableQuery = null;\n var cache = (this.cache = queryManager.cache);\n // Track how often cache.evict is called, since we want eviction to\n // override the feud-stopping logic in the markResult method, by\n // causing shouldWrite to return true. Wrapping the cache.evict method\n // is a bit of a hack, but it saves us from having to make eviction\n // counting an official part of the ApolloCache API.\n if (!destructiveMethodCounts.has(cache)) {\n destructiveMethodCounts.set(cache, 0);\n wrapDestructiveCacheMethod(cache, "evict");\n wrapDestructiveCacheMethod(cache, "modify");\n wrapDestructiveCacheMethod(cache, "reset");\n }\n }\n QueryInfo.prototype.init = function (query) {\n var networkStatus = query.networkStatus || core_networkStatus/* NetworkStatus */.pT.loading;\n if (this.variables &&\n this.networkStatus !== core_networkStatus/* NetworkStatus */.pT.loading &&\n !(0,lib/* equal */.L)(this.variables, query.variables)) {\n networkStatus = core_networkStatus/* NetworkStatus */.pT.setVariables;\n }\n if (!(0,lib/* equal */.L)(query.variables, this.variables)) {\n this.lastDiff = void 0;\n }\n Object.assign(this, {\n document: query.document,\n variables: query.variables,\n networkError: null,\n graphQLErrors: this.graphQLErrors || [],\n networkStatus: networkStatus,\n });\n if (query.observableQuery) {\n this.setObservableQuery(query.observableQuery);\n }\n if (query.lastRequestId) {\n this.lastRequestId = query.lastRequestId;\n }\n return this;\n };\n QueryInfo.prototype.reset = function () {\n cancelNotifyTimeout(this);\n this.dirty = false;\n };\n QueryInfo.prototype.resetDiff = function () {\n this.lastDiff = void 0;\n };\n QueryInfo.prototype.getDiff = function () {\n var options = this.getDiffOptions();\n if (this.lastDiff && (0,lib/* equal */.L)(options, this.lastDiff.options)) {\n return this.lastDiff.diff;\n }\n this.updateWatch(this.variables);\n var oq = this.observableQuery;\n if (oq && oq.options.fetchPolicy === "no-cache") {\n return { complete: false };\n }\n var diff = this.cache.diff(options);\n this.updateLastDiff(diff, options);\n return diff;\n };\n QueryInfo.prototype.updateLastDiff = function (diff, options) {\n this.lastDiff =\n diff ?\n {\n diff: diff,\n options: options || this.getDiffOptions(),\n }\n : void 0;\n };\n QueryInfo.prototype.getDiffOptions = function (variables) {\n var _a;\n if (variables === void 0) { variables = this.variables; }\n return {\n query: this.document,\n variables: variables,\n returnPartialData: true,\n optimistic: true,\n canonizeResults: (_a = this.observableQuery) === null || _a === void 0 ? void 0 : _a.options.canonizeResults,\n };\n };\n QueryInfo.prototype.setDiff = function (diff) {\n var _this = this;\n var _a;\n var oldDiff = this.lastDiff && this.lastDiff.diff;\n // If we are trying to deliver an incomplete cache result, we avoid\n // reporting it if the query has errored, otherwise we let the broadcast try\n // and repair the partial result by refetching the query. This check avoids\n // a situation where a query that errors and another succeeds with\n // overlapping data does not report the partial data result to the errored\n // query.\n //\n // See https://github.com/apollographql/apollo-client/issues/11400 for more\n // information on this issue.\n if (diff && !diff.complete && ((_a = this.observableQuery) === null || _a === void 0 ? void 0 : _a.getLastError())) {\n return;\n }\n this.updateLastDiff(diff);\n if (!this.dirty && !(0,lib/* equal */.L)(oldDiff && oldDiff.result, diff && diff.result)) {\n this.dirty = true;\n if (!this.notifyTimeout) {\n this.notifyTimeout = setTimeout(function () { return _this.notify(); }, 0);\n }\n }\n };\n QueryInfo.prototype.setObservableQuery = function (oq) {\n var _this = this;\n if (oq === this.observableQuery)\n return;\n if (this.oqListener) {\n this.listeners.delete(this.oqListener);\n }\n this.observableQuery = oq;\n if (oq) {\n oq["queryInfo"] = this;\n this.listeners.add((this.oqListener = function () {\n var diff = _this.getDiff();\n if (diff.fromOptimisticTransaction) {\n // If this diff came from an optimistic transaction, deliver the\n // current cache data to the ObservableQuery, but don\'t perform a\n // reobservation, since oq.reobserveCacheFirst might make a network\n // request, and we never want to trigger network requests in the\n // middle of optimistic updates.\n oq["observe"]();\n }\n else {\n // Otherwise, make the ObservableQuery "reobserve" the latest data\n // using a temporary fetch policy of "cache-first", so complete cache\n // results have a chance to be delivered without triggering additional\n // network requests, even when options.fetchPolicy is "network-only"\n // or "cache-and-network". All other fetch policies are preserved by\n // this method, and are handled by calling oq.reobserve(). If this\n // reobservation is spurious, isDifferentFromLastResult still has a\n // chance to catch it before delivery to ObservableQuery subscribers.\n reobserveCacheFirst(oq);\n }\n }));\n }\n else {\n delete this.oqListener;\n }\n };\n QueryInfo.prototype.notify = function () {\n var _this = this;\n cancelNotifyTimeout(this);\n if (this.shouldNotify()) {\n this.listeners.forEach(function (listener) { return listener(_this); });\n }\n this.dirty = false;\n };\n QueryInfo.prototype.shouldNotify = function () {\n if (!this.dirty || !this.listeners.size) {\n return false;\n }\n if ((0,core_networkStatus/* isNetworkRequestInFlight */.bi)(this.networkStatus) && this.observableQuery) {\n var fetchPolicy = this.observableQuery.options.fetchPolicy;\n if (fetchPolicy !== "cache-only" && fetchPolicy !== "cache-and-network") {\n return false;\n }\n }\n return true;\n };\n QueryInfo.prototype.stop = function () {\n if (!this.stopped) {\n this.stopped = true;\n // Cancel the pending notify timeout\n this.reset();\n this.cancel();\n // Revert back to the no-op version of cancel inherited from\n // QueryInfo.prototype.\n this.cancel = QueryInfo.prototype.cancel;\n var oq = this.observableQuery;\n if (oq)\n oq.stopPolling();\n }\n };\n // This method is a no-op by default, until/unless overridden by the\n // updateWatch method.\n QueryInfo.prototype.cancel = function () { };\n QueryInfo.prototype.updateWatch = function (variables) {\n var _this = this;\n if (variables === void 0) { variables = this.variables; }\n var oq = this.observableQuery;\n if (oq && oq.options.fetchPolicy === "no-cache") {\n return;\n }\n var watchOptions = (0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, this.getDiffOptions(variables)), { watcher: this, callback: function (diff) { return _this.setDiff(diff); } });\n if (!this.lastWatch || !(0,lib/* equal */.L)(watchOptions, this.lastWatch)) {\n this.cancel();\n this.cancel = this.cache.watch((this.lastWatch = watchOptions));\n }\n };\n QueryInfo.prototype.resetLastWrite = function () {\n this.lastWrite = void 0;\n };\n QueryInfo.prototype.shouldWrite = function (result, variables) {\n var lastWrite = this.lastWrite;\n return !(lastWrite &&\n // If cache.evict has been called since the last time we wrote this\n // data into the cache, there\'s a chance writing this result into\n // the cache will repair what was evicted.\n lastWrite.dmCount === destructiveMethodCounts.get(this.cache) &&\n (0,lib/* equal */.L)(variables, lastWrite.variables) &&\n (0,lib/* equal */.L)(result.data, lastWrite.result.data));\n };\n QueryInfo.prototype.markResult = function (result, document, options, cacheWriteBehavior) {\n var _this = this;\n var merger = new mergeDeep/* DeepMerger */.ZI();\n var graphQLErrors = (0,arrays/* isNonEmptyArray */.E)(result.errors) ? result.errors.slice(0) : [];\n // Cancel the pending notify timeout (if it exists) to prevent extraneous network\n // requests. To allow future notify timeouts, diff and dirty are reset as well.\n this.reset();\n if ("incremental" in result && (0,arrays/* isNonEmptyArray */.E)(result.incremental)) {\n var mergedData = (0,incrementalResult/* mergeIncrementalData */.bd)(this.getDiff().result, result);\n result.data = mergedData;\n // Detect the first chunk of a deferred query and merge it with existing\n // cache data. This ensures a `cache-first` fetch policy that returns\n // partial cache data or a `cache-and-network` fetch policy that already\n // has full data in the cache does not complain when trying to merge the\n // initial deferred server data with existing cache data.\n }\n else if ("hasNext" in result && result.hasNext) {\n var diff = this.getDiff();\n result.data = merger.merge(diff.result, result.data);\n }\n this.graphQLErrors = graphQLErrors;\n if (options.fetchPolicy === "no-cache") {\n this.updateLastDiff({ result: result.data, complete: true }, this.getDiffOptions(options.variables));\n }\n else if (cacheWriteBehavior !== 0 /* CacheWriteBehavior.FORBID */) {\n if (shouldWriteResult(result, options.errorPolicy)) {\n // Using a transaction here so we have a chance to read the result\n // back from the cache before the watch callback fires as a result\n // of writeQuery, so we can store the new diff quietly and ignore\n // it when we receive it redundantly from the watch callback.\n this.cache.performTransaction(function (cache) {\n if (_this.shouldWrite(result, options.variables)) {\n cache.writeQuery({\n query: document,\n data: result.data,\n variables: options.variables,\n overwrite: cacheWriteBehavior === 1 /* CacheWriteBehavior.OVERWRITE */,\n });\n _this.lastWrite = {\n result: result,\n variables: options.variables,\n dmCount: destructiveMethodCounts.get(_this.cache),\n };\n }\n else {\n // If result is the same as the last result we received from\n // the network (and the variables match too), avoid writing\n // result into the cache again. The wisdom of skipping this\n // cache write is far from obvious, since any cache write\n // could be the one that puts the cache back into a desired\n // state, fixing corruption or missing data. However, if we\n // always write every network result into the cache, we enable\n // feuds between queries competing to update the same data in\n // incompatible ways, which can lead to an endless cycle of\n // cache broadcasts and useless network requests. As with any\n // feud, eventually one side must step back from the brink,\n // letting the other side(s) have the last word(s). There may\n // be other points where we could break this cycle, such as\n // silencing the broadcast for cache.writeQuery (not a good\n // idea, since it just delays the feud a bit) or somehow\n // avoiding the network request that just happened (also bad,\n // because the server could return useful new data). All\n // options considered, skipping this cache write seems to be\n // the least damaging place to break the cycle, because it\n // reflects the intuition that we recently wrote this exact\n // result into the cache, so the cache *should* already/still\n // contain this data. If some other query has clobbered that\n // data in the meantime, that\'s too bad, but there will be no\n // winners if every query blindly reverts to its own version\n // of the data. This approach also gives the network a chance\n // to return new data, which will be written into the cache as\n // usual, notifying only those queries that are directly\n // affected by the cache updates, as usual. In the future, an\n // even more sophisticated cache could perhaps prevent or\n // mitigate the clobbering somehow, but that would make this\n // particular cache write even less important, and thus\n // skipping it would be even safer than it is today.\n if (_this.lastDiff && _this.lastDiff.diff.complete) {\n // Reuse data from the last good (complete) diff that we\n // received, when possible.\n result.data = _this.lastDiff.diff.result;\n return;\n }\n // If the previous this.diff was incomplete, fall through to\n // re-reading the latest data with cache.diff, below.\n }\n var diffOptions = _this.getDiffOptions(options.variables);\n var diff = cache.diff(diffOptions);\n // In case the QueryManager stops this QueryInfo before its\n // results are delivered, it\'s important to avoid restarting the\n // cache watch when markResult is called. We also avoid updating\n // the watch if we are writing a result that doesn\'t match the current\n // variables to avoid race conditions from broadcasting the wrong\n // result.\n if (!_this.stopped && (0,lib/* equal */.L)(_this.variables, options.variables)) {\n // Any time we\'re about to update this.diff, we need to make\n // sure we\'ve started watching the cache.\n _this.updateWatch(options.variables);\n }\n // If we\'re allowed to write to the cache, and we can read a\n // complete result from the cache, update result.data to be the\n // result from the cache, rather than the raw network result.\n // Set without setDiff to avoid triggering a notify call, since\n // we have other ways of notifying for this result.\n _this.updateLastDiff(diff, diffOptions);\n if (diff.complete) {\n result.data = diff.result;\n }\n });\n }\n else {\n this.lastWrite = void 0;\n }\n }\n };\n QueryInfo.prototype.markReady = function () {\n this.networkError = null;\n return (this.networkStatus = core_networkStatus/* NetworkStatus */.pT.ready);\n };\n QueryInfo.prototype.markError = function (error) {\n this.networkStatus = core_networkStatus/* NetworkStatus */.pT.error;\n this.lastWrite = void 0;\n this.reset();\n if (error.graphQLErrors) {\n this.graphQLErrors = error.graphQLErrors;\n }\n if (error.networkError) {\n this.networkError = error.networkError;\n }\n return error;\n };\n return QueryInfo;\n}());\n\nfunction shouldWriteResult(result, errorPolicy) {\n if (errorPolicy === void 0) { errorPolicy = "none"; }\n var ignoreErrors = errorPolicy === "ignore" || errorPolicy === "all";\n var writeWithErrors = !graphQLResultHasError(result);\n if (!writeWithErrors && ignoreErrors && result.data) {\n writeWithErrors = true;\n }\n return writeWithErrors;\n}\n//# sourceMappingURL=QueryInfo.js.map\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/graphql/print.js + 2 modules\nvar print = __webpack_require__(2417);\n// EXTERNAL MODULE: ./node_modules/@wry/trie/lib/index.js\nvar trie_lib = __webpack_require__(2453);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/caching/caches.js\nvar caches = __webpack_require__(599);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/caching/sizes.js\nvar sizes = __webpack_require__(1212);\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/core/QueryManager.js\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar QueryManager_hasOwnProperty = Object.prototype.hasOwnProperty;\nvar IGNORE = Object.create(null);\n\n\nvar QueryManager = /** @class */ (function () {\n function QueryManager(_a) {\n var cache = _a.cache, link = _a.link, defaultOptions = _a.defaultOptions, documentTransform = _a.documentTransform, _b = _a.queryDeduplication, queryDeduplication = _b === void 0 ? false : _b, onBroadcast = _a.onBroadcast, _c = _a.ssrMode, ssrMode = _c === void 0 ? false : _c, _d = _a.clientAwareness, clientAwareness = _d === void 0 ? {} : _d, localState = _a.localState, _e = _a.assumeImmutableResults, assumeImmutableResults = _e === void 0 ? !!cache.assumeImmutableResults : _e, defaultContext = _a.defaultContext;\n var _this = this;\n this.clientAwareness = {};\n // All the queries that the QueryManager is currently managing (not\n // including mutations and subscriptions).\n this.queries = new Map();\n // Maps from queryId strings to Promise rejection functions for\n // currently active queries and fetches.\n // Use protected instead of private field so\n // @apollo/experimental-nextjs-app-support can access type info.\n this.fetchCancelFns = new Map();\n this.transformCache = new caches/* AutoCleanedWeakCache */.A(sizes/* cacheSizes */.v["queryManager.getDocumentInfo"] ||\n 2000 /* defaultCacheSizes["queryManager.getDocumentInfo"] */);\n this.queryIdCounter = 1;\n this.requestIdCounter = 1;\n this.mutationIdCounter = 1;\n // Use protected instead of private field so\n // @apollo/experimental-nextjs-app-support can access type info.\n this.inFlightLinkObservables = new trie_lib/* Trie */.b(false);\n var defaultDocumentTransform = new DocumentTransform/* DocumentTransform */.c(function (document) { return _this.cache.transformDocument(document); }, \n // Allow the apollo cache to manage its own transform caches\n { cache: false });\n this.cache = cache;\n this.link = link;\n this.defaultOptions = defaultOptions || Object.create(null);\n this.queryDeduplication = queryDeduplication;\n this.clientAwareness = clientAwareness;\n this.localState = localState || new LocalState({ cache: cache });\n this.ssrMode = ssrMode;\n this.assumeImmutableResults = assumeImmutableResults;\n this.documentTransform =\n documentTransform ?\n defaultDocumentTransform\n .concat(documentTransform)\n // The custom document transform may add new fragment spreads or new\n // field selections, so we want to give the cache a chance to run\n // again. For example, the InMemoryCache adds __typename to field\n // selections and fragments from the fragment registry.\n .concat(defaultDocumentTransform)\n : defaultDocumentTransform;\n this.defaultContext = defaultContext || Object.create(null);\n if ((this.onBroadcast = onBroadcast)) {\n this.mutationStore = Object.create(null);\n }\n }\n /**\n * Call this method to terminate any active query processes, making it safe\n * to dispose of this QueryManager instance.\n */\n QueryManager.prototype.stop = function () {\n var _this = this;\n this.queries.forEach(function (_info, queryId) {\n _this.stopQueryNoBroadcast(queryId);\n });\n this.cancelPendingFetches((0,globals/* newInvariantError */.vA)(25));\n };\n QueryManager.prototype.cancelPendingFetches = function (error) {\n this.fetchCancelFns.forEach(function (cancel) { return cancel(error); });\n this.fetchCancelFns.clear();\n };\n QueryManager.prototype.mutate = function (_a) {\n return (0,tslib_es6/* __awaiter */.sH)(this, arguments, void 0, function (_b) {\n var mutationId, hasClientExports, mutationStoreValue, isOptimistic, self;\n var _c, _d;\n var mutation = _b.mutation, variables = _b.variables, optimisticResponse = _b.optimisticResponse, updateQueries = _b.updateQueries, _e = _b.refetchQueries, refetchQueries = _e === void 0 ? [] : _e, _f = _b.awaitRefetchQueries, awaitRefetchQueries = _f === void 0 ? false : _f, updateWithProxyFn = _b.update, onQueryUpdated = _b.onQueryUpdated, _g = _b.fetchPolicy, fetchPolicy = _g === void 0 ? ((_c = this.defaultOptions.mutate) === null || _c === void 0 ? void 0 : _c.fetchPolicy) || "network-only" : _g, _h = _b.errorPolicy, errorPolicy = _h === void 0 ? ((_d = this.defaultOptions.mutate) === null || _d === void 0 ? void 0 : _d.errorPolicy) || "none" : _h, keepRootFields = _b.keepRootFields, context = _b.context;\n return (0,tslib_es6/* __generator */.YH)(this, function (_j) {\n switch (_j.label) {\n case 0:\n (0,globals/* invariant */.V1)(mutation, 26);\n (0,globals/* invariant */.V1)(fetchPolicy === "network-only" || fetchPolicy === "no-cache", 27);\n mutationId = this.generateMutationId();\n mutation = this.cache.transformForLink(this.transform(mutation));\n hasClientExports = this.getDocumentInfo(mutation).hasClientExports;\n variables = this.getVariables(mutation, variables);\n if (!hasClientExports) return [3 /*break*/, 2];\n return [4 /*yield*/, this.localState.addExportedVariables(mutation, variables, context)];\n case 1:\n variables = (_j.sent());\n _j.label = 2;\n case 2:\n mutationStoreValue = this.mutationStore &&\n (this.mutationStore[mutationId] = {\n mutation: mutation,\n variables: variables,\n loading: true,\n error: null,\n });\n isOptimistic = optimisticResponse &&\n this.markMutationOptimistic(optimisticResponse, {\n mutationId: mutationId,\n document: mutation,\n variables: variables,\n fetchPolicy: fetchPolicy,\n errorPolicy: errorPolicy,\n context: context,\n updateQueries: updateQueries,\n update: updateWithProxyFn,\n keepRootFields: keepRootFields,\n });\n this.broadcastQueries();\n self = this;\n return [2 /*return*/, new Promise(function (resolve, reject) {\n return asyncMap(self.getObservableFromLink(mutation, (0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, context), { optimisticResponse: isOptimistic ? optimisticResponse : void 0 }), variables, false), function (result) {\n if (graphQLResultHasError(result) && errorPolicy === "none") {\n throw new client_errors/* ApolloError */.K4({\n graphQLErrors: getGraphQLErrorsFromResult(result),\n });\n }\n if (mutationStoreValue) {\n mutationStoreValue.loading = false;\n mutationStoreValue.error = null;\n }\n var storeResult = (0,tslib_es6/* __assign */.Cl)({}, result);\n if (typeof refetchQueries === "function") {\n refetchQueries = refetchQueries(storeResult);\n }\n if (errorPolicy === "ignore" && graphQLResultHasError(storeResult)) {\n delete storeResult.errors;\n }\n return self.markMutationResult({\n mutationId: mutationId,\n result: storeResult,\n document: mutation,\n variables: variables,\n fetchPolicy: fetchPolicy,\n errorPolicy: errorPolicy,\n context: context,\n update: updateWithProxyFn,\n updateQueries: updateQueries,\n awaitRefetchQueries: awaitRefetchQueries,\n refetchQueries: refetchQueries,\n removeOptimistic: isOptimistic ? mutationId : void 0,\n onQueryUpdated: onQueryUpdated,\n keepRootFields: keepRootFields,\n });\n }).subscribe({\n next: function (storeResult) {\n self.broadcastQueries();\n // Since mutations might receive multiple payloads from the\n // ApolloLink chain (e.g. when used with @defer),\n // we resolve with a SingleExecutionResult or after the final\n // ExecutionPatchResult has arrived and we have assembled the\n // multipart response into a single result.\n if (!("hasNext" in storeResult) || storeResult.hasNext === false) {\n resolve(storeResult);\n }\n },\n error: function (err) {\n if (mutationStoreValue) {\n mutationStoreValue.loading = false;\n mutationStoreValue.error = err;\n }\n if (isOptimistic) {\n self.cache.removeOptimistic(mutationId);\n }\n self.broadcastQueries();\n reject(err instanceof client_errors/* ApolloError */.K4 ? err : (new client_errors/* ApolloError */.K4({\n networkError: err,\n })));\n },\n });\n })];\n }\n });\n });\n };\n QueryManager.prototype.markMutationResult = function (mutation, cache) {\n var _this = this;\n if (cache === void 0) { cache = this.cache; }\n var result = mutation.result;\n var cacheWrites = [];\n var skipCache = mutation.fetchPolicy === "no-cache";\n if (!skipCache && shouldWriteResult(result, mutation.errorPolicy)) {\n if (!(0,incrementalResult/* isExecutionPatchIncrementalResult */.ST)(result)) {\n cacheWrites.push({\n result: result.data,\n dataId: "ROOT_MUTATION",\n query: mutation.document,\n variables: mutation.variables,\n });\n }\n if ((0,incrementalResult/* isExecutionPatchIncrementalResult */.ST)(result) &&\n (0,arrays/* isNonEmptyArray */.E)(result.incremental)) {\n var diff = cache.diff({\n id: "ROOT_MUTATION",\n // The cache complains if passed a mutation where it expects a\n // query, so we transform mutations and subscriptions to queries\n // (only once, thanks to this.transformCache).\n query: this.getDocumentInfo(mutation.document).asQuery,\n variables: mutation.variables,\n optimistic: false,\n returnPartialData: true,\n });\n var mergedData = void 0;\n if (diff.result) {\n mergedData = (0,incrementalResult/* mergeIncrementalData */.bd)(diff.result, result);\n }\n if (typeof mergedData !== "undefined") {\n // cast the ExecutionPatchResult to FetchResult here since\n // ExecutionPatchResult never has `data` when returned from the server\n result.data = mergedData;\n cacheWrites.push({\n result: mergedData,\n dataId: "ROOT_MUTATION",\n query: mutation.document,\n variables: mutation.variables,\n });\n }\n }\n var updateQueries_1 = mutation.updateQueries;\n if (updateQueries_1) {\n this.queries.forEach(function (_a, queryId) {\n var observableQuery = _a.observableQuery;\n var queryName = observableQuery && observableQuery.queryName;\n if (!queryName || !QueryManager_hasOwnProperty.call(updateQueries_1, queryName)) {\n return;\n }\n var updater = updateQueries_1[queryName];\n var _b = _this.queries.get(queryId), document = _b.document, variables = _b.variables;\n // Read the current query result from the store.\n var _c = cache.diff({\n query: document,\n variables: variables,\n returnPartialData: true,\n optimistic: false,\n }), currentQueryResult = _c.result, complete = _c.complete;\n if (complete && currentQueryResult) {\n // Run our reducer using the current query result and the mutation result.\n var nextQueryResult = updater(currentQueryResult, {\n mutationResult: result,\n queryName: (document && (0,getFromAST/* getOperationName */.n4)(document)) || void 0,\n queryVariables: variables,\n });\n // Write the modified result back into the store if we got a new result.\n if (nextQueryResult) {\n cacheWrites.push({\n result: nextQueryResult,\n dataId: "ROOT_QUERY",\n query: document,\n variables: variables,\n });\n }\n }\n });\n }\n }\n if (cacheWrites.length > 0 ||\n (mutation.refetchQueries || "").length > 0 ||\n mutation.update ||\n mutation.onQueryUpdated ||\n mutation.removeOptimistic) {\n var results_1 = [];\n this.refetchQueries({\n updateCache: function (cache) {\n if (!skipCache) {\n cacheWrites.forEach(function (write) { return cache.write(write); });\n }\n // If the mutation has some writes associated with it then we need to\n // apply those writes to the store by running this reducer again with\n // a write action.\n var update = mutation.update;\n // Determine whether result is a SingleExecutionResult,\n // or the final ExecutionPatchResult.\n var isFinalResult = !(0,incrementalResult/* isExecutionPatchResult */.YX)(result) ||\n ((0,incrementalResult/* isExecutionPatchIncrementalResult */.ST)(result) && !result.hasNext);\n if (update) {\n if (!skipCache) {\n // Re-read the ROOT_MUTATION data we just wrote into the cache\n // (the first cache.write call in the cacheWrites.forEach loop\n // above), so field read functions have a chance to run for\n // fields within mutation result objects.\n var diff = cache.diff({\n id: "ROOT_MUTATION",\n // The cache complains if passed a mutation where it expects a\n // query, so we transform mutations and subscriptions to queries\n // (only once, thanks to this.transformCache).\n query: _this.getDocumentInfo(mutation.document).asQuery,\n variables: mutation.variables,\n optimistic: false,\n returnPartialData: true,\n });\n if (diff.complete) {\n result = (0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, result), { data: diff.result });\n if ("incremental" in result) {\n delete result.incremental;\n }\n if ("hasNext" in result) {\n delete result.hasNext;\n }\n }\n }\n // If we\'ve received the whole response,\n // either a SingleExecutionResult or the final ExecutionPatchResult,\n // call the update function.\n if (isFinalResult) {\n update(cache, result, {\n context: mutation.context,\n variables: mutation.variables,\n });\n }\n }\n // TODO Do this with cache.evict({ id: \'ROOT_MUTATION\' }) but make it\n // shallow to allow rolling back optimistic evictions.\n if (!skipCache && !mutation.keepRootFields && isFinalResult) {\n cache.modify({\n id: "ROOT_MUTATION",\n fields: function (value, _a) {\n var fieldName = _a.fieldName, DELETE = _a.DELETE;\n return fieldName === "__typename" ? value : DELETE;\n },\n });\n }\n },\n include: mutation.refetchQueries,\n // Write the final mutation.result to the root layer of the cache.\n optimistic: false,\n // Remove the corresponding optimistic layer at the same time as we\n // write the final non-optimistic result.\n removeOptimistic: mutation.removeOptimistic,\n // Let the caller of client.mutate optionally determine the refetching\n // behavior for watched queries after the mutation.update function runs.\n // If no onQueryUpdated function was provided for this mutation, pass\n // null instead of undefined to disable the default refetching behavior.\n onQueryUpdated: mutation.onQueryUpdated || null,\n }).forEach(function (result) { return results_1.push(result); });\n if (mutation.awaitRefetchQueries || mutation.onQueryUpdated) {\n // Returning a promise here makes the mutation await that promise, so we\n // include results in that promise\'s work if awaitRefetchQueries or an\n // onQueryUpdated function was specified.\n return Promise.all(results_1).then(function () { return result; });\n }\n }\n return Promise.resolve(result);\n };\n QueryManager.prototype.markMutationOptimistic = function (optimisticResponse, mutation) {\n var _this = this;\n var data = typeof optimisticResponse === "function" ?\n optimisticResponse(mutation.variables, { IGNORE: IGNORE })\n : optimisticResponse;\n if (data === IGNORE) {\n return false;\n }\n this.cache.recordOptimisticTransaction(function (cache) {\n try {\n _this.markMutationResult((0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, mutation), { result: { data: data } }), cache);\n }\n catch (error) {\n globalThis.__DEV__ !== false && globals/* invariant */.V1.error(error);\n }\n }, mutation.mutationId);\n return true;\n };\n QueryManager.prototype.fetchQuery = function (queryId, options, networkStatus) {\n return this.fetchConcastWithInfo(queryId, options, networkStatus).concast\n .promise;\n };\n QueryManager.prototype.getQueryStore = function () {\n var store = Object.create(null);\n this.queries.forEach(function (info, queryId) {\n store[queryId] = {\n variables: info.variables,\n networkStatus: info.networkStatus,\n networkError: info.networkError,\n graphQLErrors: info.graphQLErrors,\n };\n });\n return store;\n };\n QueryManager.prototype.resetErrors = function (queryId) {\n var queryInfo = this.queries.get(queryId);\n if (queryInfo) {\n queryInfo.networkError = undefined;\n queryInfo.graphQLErrors = [];\n }\n };\n QueryManager.prototype.transform = function (document) {\n return this.documentTransform.transformDocument(document);\n };\n QueryManager.prototype.getDocumentInfo = function (document) {\n var transformCache = this.transformCache;\n if (!transformCache.has(document)) {\n var cacheEntry = {\n // TODO These three calls (hasClientExports, shouldForceResolvers, and\n // usesNonreactiveDirective) are performing independent full traversals\n // of the transformed document. We should consider merging these\n // traversals into a single pass in the future, though the work is\n // cached after the first time.\n hasClientExports: (0,directives/* hasClientExports */.f2)(document),\n hasForcedResolvers: this.localState.shouldForceResolvers(document),\n hasNonreactiveDirective: (0,directives/* hasDirectives */.d8)(["nonreactive"], document),\n clientQuery: this.localState.clientQuery(document),\n serverQuery: (0,transform/* removeDirectivesFromDocument */.iz)([\n { name: "client", remove: true },\n { name: "connection" },\n { name: "nonreactive" },\n ], document),\n defaultVars: (0,getFromAST/* getDefaultValues */.wY)((0,getFromAST/* getOperationDefinition */.Vu)(document)),\n // Transform any mutation or subscription operations to query operations\n // so we can read/write them from/to the cache.\n asQuery: (0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, document), { definitions: document.definitions.map(function (def) {\n if (def.kind === "OperationDefinition" &&\n def.operation !== "query") {\n return (0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, def), { operation: "query" });\n }\n return def;\n }) }),\n };\n transformCache.set(document, cacheEntry);\n }\n return transformCache.get(document);\n };\n QueryManager.prototype.getVariables = function (document, variables) {\n return (0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, this.getDocumentInfo(document).defaultVars), variables);\n };\n QueryManager.prototype.watchQuery = function (options) {\n var query = this.transform(options.query);\n // assign variable default values if supplied\n // NOTE: We don\'t modify options.query here with the transformed query to\n // ensure observable.options.query is set to the raw untransformed query.\n options = (0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, options), { variables: this.getVariables(query, options.variables) });\n if (typeof options.notifyOnNetworkStatusChange === "undefined") {\n options.notifyOnNetworkStatusChange = false;\n }\n var queryInfo = new QueryInfo(this);\n var observable = new ObservableQuery({\n queryManager: this,\n queryInfo: queryInfo,\n options: options,\n });\n observable["lastQuery"] = query;\n this.queries.set(observable.queryId, queryInfo);\n // We give queryInfo the transformed query to ensure the first cache diff\n // uses the transformed query instead of the raw query\n queryInfo.init({\n document: query,\n observableQuery: observable,\n variables: observable.variables,\n });\n return observable;\n };\n QueryManager.prototype.query = function (options, queryId) {\n var _this = this;\n if (queryId === void 0) { queryId = this.generateQueryId(); }\n (0,globals/* invariant */.V1)(options.query, 28);\n (0,globals/* invariant */.V1)(options.query.kind === "Document", 29);\n (0,globals/* invariant */.V1)(!options.returnPartialData, 30);\n (0,globals/* invariant */.V1)(!options.pollInterval, 31);\n return this.fetchQuery(queryId, (0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, options), { query: this.transform(options.query) })).finally(function () { return _this.stopQuery(queryId); });\n };\n QueryManager.prototype.generateQueryId = function () {\n return String(this.queryIdCounter++);\n };\n QueryManager.prototype.generateRequestId = function () {\n return this.requestIdCounter++;\n };\n QueryManager.prototype.generateMutationId = function () {\n return String(this.mutationIdCounter++);\n };\n QueryManager.prototype.stopQueryInStore = function (queryId) {\n this.stopQueryInStoreNoBroadcast(queryId);\n this.broadcastQueries();\n };\n QueryManager.prototype.stopQueryInStoreNoBroadcast = function (queryId) {\n var queryInfo = this.queries.get(queryId);\n if (queryInfo)\n queryInfo.stop();\n };\n QueryManager.prototype.clearStore = function (options) {\n if (options === void 0) { options = {\n discardWatches: true,\n }; }\n // Before we have sent the reset action to the store, we can no longer\n // rely on the results returned by in-flight requests since these may\n // depend on values that previously existed in the data portion of the\n // store. So, we cancel the promises and observers that we have issued\n // so far and not yet resolved (in the case of queries).\n this.cancelPendingFetches((0,globals/* newInvariantError */.vA)(32));\n this.queries.forEach(function (queryInfo) {\n if (queryInfo.observableQuery) {\n // Set loading to true so listeners don\'t trigger unless they want\n // results with partial data.\n queryInfo.networkStatus = core_networkStatus/* NetworkStatus */.pT.loading;\n }\n else {\n queryInfo.stop();\n }\n });\n if (this.mutationStore) {\n this.mutationStore = Object.create(null);\n }\n // begin removing data from the store\n return this.cache.reset(options);\n };\n QueryManager.prototype.getObservableQueries = function (include) {\n var _this = this;\n if (include === void 0) { include = "active"; }\n var queries = new Map();\n var queryNamesAndDocs = new Map();\n var legacyQueryOptions = new Set();\n if (Array.isArray(include)) {\n include.forEach(function (desc) {\n if (typeof desc === "string") {\n queryNamesAndDocs.set(desc, false);\n }\n else if ((0,storeUtils/* isDocumentNode */.Kc)(desc)) {\n queryNamesAndDocs.set(_this.transform(desc), false);\n }\n else if ((0,objects/* isNonNullObject */.U)(desc) && desc.query) {\n legacyQueryOptions.add(desc);\n }\n });\n }\n this.queries.forEach(function (_a, queryId) {\n var oq = _a.observableQuery, document = _a.document;\n if (oq) {\n if (include === "all") {\n queries.set(queryId, oq);\n return;\n }\n var queryName = oq.queryName, fetchPolicy = oq.options.fetchPolicy;\n if (fetchPolicy === "standby" ||\n (include === "active" && !oq.hasObservers())) {\n return;\n }\n if (include === "active" ||\n (queryName && queryNamesAndDocs.has(queryName)) ||\n (document && queryNamesAndDocs.has(document))) {\n queries.set(queryId, oq);\n if (queryName)\n queryNamesAndDocs.set(queryName, true);\n if (document)\n queryNamesAndDocs.set(document, true);\n }\n }\n });\n if (legacyQueryOptions.size) {\n legacyQueryOptions.forEach(function (options) {\n // We will be issuing a fresh network request for this query, so we\n // pre-allocate a new query ID here, using a special prefix to enable\n // cleaning up these temporary queries later, after fetching.\n var queryId = (0,makeUniqueId/* makeUniqueId */.v)("legacyOneTimeQuery");\n var queryInfo = _this.getQuery(queryId).init({\n document: options.query,\n variables: options.variables,\n });\n var oq = new ObservableQuery({\n queryManager: _this,\n queryInfo: queryInfo,\n options: (0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, options), { fetchPolicy: "network-only" }),\n });\n (0,globals/* invariant */.V1)(oq.queryId === queryId);\n queryInfo.setObservableQuery(oq);\n queries.set(queryId, oq);\n });\n }\n if (globalThis.__DEV__ !== false && queryNamesAndDocs.size) {\n queryNamesAndDocs.forEach(function (included, nameOrDoc) {\n if (!included) {\n globalThis.__DEV__ !== false && globals/* invariant */.V1.warn(typeof nameOrDoc === "string" ? 33 : 34, nameOrDoc);\n }\n });\n }\n return queries;\n };\n QueryManager.prototype.reFetchObservableQueries = function (includeStandby) {\n var _this = this;\n if (includeStandby === void 0) { includeStandby = false; }\n var observableQueryPromises = [];\n this.getObservableQueries(includeStandby ? "all" : "active").forEach(function (observableQuery, queryId) {\n var fetchPolicy = observableQuery.options.fetchPolicy;\n observableQuery.resetLastResults();\n if (includeStandby ||\n (fetchPolicy !== "standby" && fetchPolicy !== "cache-only")) {\n observableQueryPromises.push(observableQuery.refetch());\n }\n _this.getQuery(queryId).setDiff(null);\n });\n this.broadcastQueries();\n return Promise.all(observableQueryPromises);\n };\n QueryManager.prototype.setObservableQuery = function (observableQuery) {\n this.getQuery(observableQuery.queryId).setObservableQuery(observableQuery);\n };\n QueryManager.prototype.startGraphQLSubscription = function (_a) {\n var _this = this;\n var query = _a.query, fetchPolicy = _a.fetchPolicy, _b = _a.errorPolicy, errorPolicy = _b === void 0 ? "none" : _b, variables = _a.variables, _c = _a.context, context = _c === void 0 ? {} : _c;\n query = this.transform(query);\n variables = this.getVariables(query, variables);\n var makeObservable = function (variables) {\n return _this.getObservableFromLink(query, context, variables).map(function (result) {\n if (fetchPolicy !== "no-cache") {\n // the subscription interface should handle not sending us results we no longer subscribe to.\n // XXX I don\'t think we ever send in an object with errors, but we might in the future...\n if (shouldWriteResult(result, errorPolicy)) {\n _this.cache.write({\n query: query,\n result: result.data,\n dataId: "ROOT_SUBSCRIPTION",\n variables: variables,\n });\n }\n _this.broadcastQueries();\n }\n var hasErrors = graphQLResultHasError(result);\n var hasProtocolErrors = (0,client_errors/* graphQLResultHasProtocolErrors */.uR)(result);\n if (hasErrors || hasProtocolErrors) {\n var errors = {};\n if (hasErrors) {\n errors.graphQLErrors = result.errors;\n }\n if (hasProtocolErrors) {\n errors.protocolErrors = result.extensions[client_errors/* PROTOCOL_ERRORS_SYMBOL */.K$];\n }\n // `errorPolicy` is a mechanism for handling GraphQL errors, according\n // to our documentation, so we throw protocol errors regardless of the\n // set error policy.\n if (errorPolicy === "none" || hasProtocolErrors) {\n throw new client_errors/* ApolloError */.K4(errors);\n }\n }\n if (errorPolicy === "ignore") {\n delete result.errors;\n }\n return result;\n });\n };\n if (this.getDocumentInfo(query).hasClientExports) {\n var observablePromise_1 = this.localState\n .addExportedVariables(query, variables, context)\n .then(makeObservable);\n return new zen_observable_ts_module/* Observable */.c(function (observer) {\n var sub = null;\n observablePromise_1.then(function (observable) { return (sub = observable.subscribe(observer)); }, observer.error);\n return function () { return sub && sub.unsubscribe(); };\n });\n }\n return makeObservable(variables);\n };\n QueryManager.prototype.stopQuery = function (queryId) {\n this.stopQueryNoBroadcast(queryId);\n this.broadcastQueries();\n };\n QueryManager.prototype.stopQueryNoBroadcast = function (queryId) {\n this.stopQueryInStoreNoBroadcast(queryId);\n this.removeQuery(queryId);\n };\n QueryManager.prototype.removeQuery = function (queryId) {\n // teardown all links\n // Both `QueryManager.fetchRequest` and `QueryManager.query` create separate promises\n // that each add their reject functions to fetchCancelFns.\n // A query created with `QueryManager.query()` could trigger a `QueryManager.fetchRequest`.\n // The same queryId could have two rejection fns for two promises\n this.fetchCancelFns.delete(queryId);\n if (this.queries.has(queryId)) {\n this.getQuery(queryId).stop();\n this.queries.delete(queryId);\n }\n };\n QueryManager.prototype.broadcastQueries = function () {\n if (this.onBroadcast)\n this.onBroadcast();\n this.queries.forEach(function (info) { return info.notify(); });\n };\n QueryManager.prototype.getLocalState = function () {\n return this.localState;\n };\n QueryManager.prototype.getObservableFromLink = function (query, context, variables, \n // Prefer context.queryDeduplication if specified.\n deduplication) {\n var _this = this;\n var _a;\n if (deduplication === void 0) { deduplication = (_a = context === null || context === void 0 ? void 0 : context.queryDeduplication) !== null && _a !== void 0 ? _a : this.queryDeduplication; }\n var observable;\n var _b = this.getDocumentInfo(query), serverQuery = _b.serverQuery, clientQuery = _b.clientQuery;\n if (serverQuery) {\n var _c = this, inFlightLinkObservables_1 = _c.inFlightLinkObservables, link = _c.link;\n var operation = {\n query: serverQuery,\n variables: variables,\n operationName: (0,getFromAST/* getOperationName */.n4)(serverQuery) || void 0,\n context: this.prepareContext((0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, context), { forceFetch: !deduplication })),\n };\n context = operation.context;\n if (deduplication) {\n var printedServerQuery_1 = (0,print/* print */.y)(serverQuery);\n var varJson_1 = (0,canonicalStringify/* canonicalStringify */.M)(variables);\n var entry = inFlightLinkObservables_1.lookup(printedServerQuery_1, varJson_1);\n observable = entry.observable;\n if (!observable) {\n var concast = new Concast([\n execute(link, operation),\n ]);\n observable = entry.observable = concast;\n concast.beforeNext(function () {\n inFlightLinkObservables_1.remove(printedServerQuery_1, varJson_1);\n });\n }\n }\n else {\n observable = new Concast([\n execute(link, operation),\n ]);\n }\n }\n else {\n observable = new Concast([zen_observable_ts_module/* Observable */.c.of({ data: {} })]);\n context = this.prepareContext(context);\n }\n if (clientQuery) {\n observable = asyncMap(observable, function (result) {\n return _this.localState.runResolvers({\n document: clientQuery,\n remoteResult: result,\n context: context,\n variables: variables,\n });\n });\n }\n return observable;\n };\n QueryManager.prototype.getResultsFromLink = function (queryInfo, cacheWriteBehavior, options) {\n var requestId = (queryInfo.lastRequestId = this.generateRequestId());\n // Performing transformForLink here gives this.cache a chance to fill in\n // missing fragment definitions (for example) before sending this document\n // through the link chain.\n var linkDocument = this.cache.transformForLink(options.query);\n return asyncMap(this.getObservableFromLink(linkDocument, options.context, options.variables), function (result) {\n var graphQLErrors = getGraphQLErrorsFromResult(result);\n var hasErrors = graphQLErrors.length > 0;\n // If we interrupted this request by calling getResultsFromLink again\n // with the same QueryInfo object, we ignore the old results.\n if (requestId >= queryInfo.lastRequestId) {\n if (hasErrors && options.errorPolicy === "none") {\n // Throwing here effectively calls observer.error.\n throw queryInfo.markError(new client_errors/* ApolloError */.K4({\n graphQLErrors: graphQLErrors,\n }));\n }\n // Use linkDocument rather than queryInfo.document so the\n // operation/fragments used to write the result are the same as the\n // ones used to obtain it from the link.\n queryInfo.markResult(result, linkDocument, options, cacheWriteBehavior);\n queryInfo.markReady();\n }\n var aqr = {\n data: result.data,\n loading: false,\n networkStatus: core_networkStatus/* NetworkStatus */.pT.ready,\n };\n if (hasErrors && options.errorPolicy !== "ignore") {\n aqr.errors = graphQLErrors;\n aqr.networkStatus = core_networkStatus/* NetworkStatus */.pT.error;\n }\n return aqr;\n }, function (networkError) {\n var error = (0,client_errors/* isApolloError */.Mn)(networkError) ? networkError : (new client_errors/* ApolloError */.K4({ networkError: networkError }));\n // Avoid storing errors from older interrupted queries.\n if (requestId >= queryInfo.lastRequestId) {\n queryInfo.markError(error);\n }\n throw error;\n });\n };\n QueryManager.prototype.fetchConcastWithInfo = function (queryId, options, \n // The initial networkStatus for this fetch, most often\n // NetworkStatus.loading, but also possibly fetchMore, poll, refetch,\n // or setVariables.\n networkStatus, query) {\n var _this = this;\n if (networkStatus === void 0) { networkStatus = core_networkStatus/* NetworkStatus */.pT.loading; }\n if (query === void 0) { query = options.query; }\n var variables = this.getVariables(query, options.variables);\n var queryInfo = this.getQuery(queryId);\n var defaults = this.defaultOptions.watchQuery;\n var _a = options.fetchPolicy, fetchPolicy = _a === void 0 ? (defaults && defaults.fetchPolicy) || "cache-first" : _a, _b = options.errorPolicy, errorPolicy = _b === void 0 ? (defaults && defaults.errorPolicy) || "none" : _b, _c = options.returnPartialData, returnPartialData = _c === void 0 ? false : _c, _d = options.notifyOnNetworkStatusChange, notifyOnNetworkStatusChange = _d === void 0 ? false : _d, _e = options.context, context = _e === void 0 ? {} : _e;\n var normalized = Object.assign({}, options, {\n query: query,\n variables: variables,\n fetchPolicy: fetchPolicy,\n errorPolicy: errorPolicy,\n returnPartialData: returnPartialData,\n notifyOnNetworkStatusChange: notifyOnNetworkStatusChange,\n context: context,\n });\n var fromVariables = function (variables) {\n // Since normalized is always a fresh copy of options, it\'s safe to\n // modify its properties here, rather than creating yet another new\n // WatchQueryOptions object.\n normalized.variables = variables;\n var sourcesWithInfo = _this.fetchQueryByPolicy(queryInfo, normalized, networkStatus);\n if (\n // If we\'re in standby, postpone advancing options.fetchPolicy using\n // applyNextFetchPolicy.\n normalized.fetchPolicy !== "standby" &&\n // The "standby" policy currently returns [] from fetchQueryByPolicy, so\n // this is another way to detect when nothing was done/fetched.\n sourcesWithInfo.sources.length > 0 &&\n queryInfo.observableQuery) {\n queryInfo.observableQuery["applyNextFetchPolicy"]("after-fetch", options);\n }\n return sourcesWithInfo;\n };\n // This cancel function needs to be set before the concast is created,\n // in case concast creation synchronously cancels the request.\n var cleanupCancelFn = function () { return _this.fetchCancelFns.delete(queryId); };\n this.fetchCancelFns.set(queryId, function (reason) {\n cleanupCancelFn();\n // This delay ensures the concast variable has been initialized.\n setTimeout(function () { return concast.cancel(reason); });\n });\n var concast, containsDataFromLink;\n // If the query has @export(as: ...) directives, then we need to\n // process those directives asynchronously. When there are no\n // @export directives (the common case), we deliberately avoid\n // wrapping the result of this.fetchQueryByPolicy in a Promise,\n // since the timing of result delivery is (unfortunately) important\n // for backwards compatibility. TODO This code could be simpler if\n // we deprecated and removed LocalState.\n if (this.getDocumentInfo(normalized.query).hasClientExports) {\n concast = new Concast(this.localState\n .addExportedVariables(normalized.query, normalized.variables, normalized.context)\n .then(fromVariables)\n .then(function (sourcesWithInfo) { return sourcesWithInfo.sources; }));\n // there is just no way we can synchronously get the *right* value here,\n // so we will assume `true`, which is the behaviour before the bug fix in\n // #10597. This means that bug is not fixed in that case, and is probably\n // un-fixable with reasonable effort for the edge case of @export as\n // directives.\n containsDataFromLink = true;\n }\n else {\n var sourcesWithInfo = fromVariables(normalized.variables);\n containsDataFromLink = sourcesWithInfo.fromLink;\n concast = new Concast(sourcesWithInfo.sources);\n }\n concast.promise.then(cleanupCancelFn, cleanupCancelFn);\n return {\n concast: concast,\n fromLink: containsDataFromLink,\n };\n };\n QueryManager.prototype.refetchQueries = function (_a) {\n var _this = this;\n var updateCache = _a.updateCache, include = _a.include, _b = _a.optimistic, optimistic = _b === void 0 ? false : _b, _c = _a.removeOptimistic, removeOptimistic = _c === void 0 ? optimistic ? (0,makeUniqueId/* makeUniqueId */.v)("refetchQueries") : void 0 : _c, onQueryUpdated = _a.onQueryUpdated;\n var includedQueriesById = new Map();\n if (include) {\n this.getObservableQueries(include).forEach(function (oq, queryId) {\n includedQueriesById.set(queryId, {\n oq: oq,\n lastDiff: _this.getQuery(queryId).getDiff(),\n });\n });\n }\n var results = new Map();\n if (updateCache) {\n this.cache.batch({\n update: updateCache,\n // Since you can perform any combination of cache reads and/or writes in\n // the cache.batch update function, its optimistic option can be either\n // a boolean or a string, representing three distinct modes of\n // operation:\n //\n // * false: read/write only the root layer\n // * true: read/write the topmost layer\n // * string: read/write a fresh optimistic layer with that ID string\n //\n // When typeof optimistic === "string", a new optimistic layer will be\n // temporarily created within cache.batch with that string as its ID. If\n // we then pass that same string as the removeOptimistic option, we can\n // make cache.batch immediately remove the optimistic layer after\n // running the updateCache function, triggering only one broadcast.\n //\n // However, the refetchQueries method accepts only true or false for its\n // optimistic option (not string). We interpret true to mean a temporary\n // optimistic layer should be created, to allow efficiently rolling back\n // the effect of the updateCache function, which involves passing a\n // string instead of true as the optimistic option to cache.batch, when\n // refetchQueries receives optimistic: true.\n //\n // In other words, we are deliberately not supporting the use case of\n // writing to an *existing* optimistic layer (using the refetchQueries\n // updateCache function), since that would potentially interfere with\n // other optimistic updates in progress. Instead, you can read/write\n // only the root layer by passing optimistic: false to refetchQueries,\n // or you can read/write a brand new optimistic layer that will be\n // automatically removed by passing optimistic: true.\n optimistic: (optimistic && removeOptimistic) || false,\n // The removeOptimistic option can also be provided by itself, even if\n // optimistic === false, to remove some previously-added optimistic\n // layer safely and efficiently, like we do in markMutationResult.\n //\n // If an explicit removeOptimistic string is provided with optimistic:\n // true, the removeOptimistic string will determine the ID of the\n // temporary optimistic layer, in case that ever matters.\n removeOptimistic: removeOptimistic,\n onWatchUpdated: function (watch, diff, lastDiff) {\n var oq = watch.watcher instanceof QueryInfo && watch.watcher.observableQuery;\n if (oq) {\n if (onQueryUpdated) {\n // Since we\'re about to handle this query now, remove it from\n // includedQueriesById, in case it was added earlier because of\n // options.include.\n includedQueriesById.delete(oq.queryId);\n var result = onQueryUpdated(oq, diff, lastDiff);\n if (result === true) {\n // The onQueryUpdated function requested the default refetching\n // behavior by returning true.\n result = oq.refetch();\n }\n // Record the result in the results Map, as long as onQueryUpdated\n // did not return false to skip/ignore this result.\n if (result !== false) {\n results.set(oq, result);\n }\n // Allow the default cache broadcast to happen, except when\n // onQueryUpdated returns false.\n return result;\n }\n if (onQueryUpdated !== null) {\n // If we don\'t have an onQueryUpdated function, and onQueryUpdated\n // was not disabled by passing null, make sure this query is\n // "included" like any other options.include-specified query.\n includedQueriesById.set(oq.queryId, { oq: oq, lastDiff: lastDiff, diff: diff });\n }\n }\n },\n });\n }\n if (includedQueriesById.size) {\n includedQueriesById.forEach(function (_a, queryId) {\n var oq = _a.oq, lastDiff = _a.lastDiff, diff = _a.diff;\n var result;\n // If onQueryUpdated is provided, we want to use it for all included\n // queries, even the QueryOptions ones.\n if (onQueryUpdated) {\n if (!diff) {\n var info = oq["queryInfo"];\n info.reset(); // Force info.getDiff() to read from cache.\n diff = info.getDiff();\n }\n result = onQueryUpdated(oq, diff, lastDiff);\n }\n // Otherwise, we fall back to refetching.\n if (!onQueryUpdated || result === true) {\n result = oq.refetch();\n }\n if (result !== false) {\n results.set(oq, result);\n }\n if (queryId.indexOf("legacyOneTimeQuery") >= 0) {\n _this.stopQueryNoBroadcast(queryId);\n }\n });\n }\n if (removeOptimistic) {\n // In case no updateCache callback was provided (so cache.batch was not\n // called above, and thus did not already remove the optimistic layer),\n // remove it here. Since this is a no-op when the layer has already been\n // removed, we do it even if we called cache.batch above, since it\'s\n // possible this.cache is an instance of some ApolloCache subclass other\n // than InMemoryCache, and does not fully support the removeOptimistic\n // option for cache.batch.\n this.cache.removeOptimistic(removeOptimistic);\n }\n return results;\n };\n QueryManager.prototype.fetchQueryByPolicy = function (queryInfo, _a, \n // The initial networkStatus for this fetch, most often\n // NetworkStatus.loading, but also possibly fetchMore, poll, refetch,\n // or setVariables.\n networkStatus) {\n var _this = this;\n var query = _a.query, variables = _a.variables, fetchPolicy = _a.fetchPolicy, refetchWritePolicy = _a.refetchWritePolicy, errorPolicy = _a.errorPolicy, returnPartialData = _a.returnPartialData, context = _a.context, notifyOnNetworkStatusChange = _a.notifyOnNetworkStatusChange;\n var oldNetworkStatus = queryInfo.networkStatus;\n queryInfo.init({\n document: query,\n variables: variables,\n networkStatus: networkStatus,\n });\n var readCache = function () { return queryInfo.getDiff(); };\n var resultsFromCache = function (diff, networkStatus) {\n if (networkStatus === void 0) { networkStatus = queryInfo.networkStatus || core_networkStatus/* NetworkStatus */.pT.loading; }\n var data = diff.result;\n if (globalThis.__DEV__ !== false && !returnPartialData && !(0,lib/* equal */.L)(data, {})) {\n logMissingFieldErrors(diff.missing);\n }\n var fromData = function (data) {\n return zen_observable_ts_module/* Observable */.c.of((0,tslib_es6/* __assign */.Cl)({ data: data, loading: (0,core_networkStatus/* isNetworkRequestInFlight */.bi)(networkStatus), networkStatus: networkStatus }, (diff.complete ? null : { partial: true })));\n };\n if (data && _this.getDocumentInfo(query).hasForcedResolvers) {\n return _this.localState\n .runResolvers({\n document: query,\n remoteResult: { data: data },\n context: context,\n variables: variables,\n onlyRunForcedResolvers: true,\n })\n .then(function (resolved) { return fromData(resolved.data || void 0); });\n }\n // Resolves https://github.com/apollographql/apollo-client/issues/10317.\n // If errorPolicy is \'none\' and notifyOnNetworkStatusChange is true,\n // data was incorrectly returned from the cache on refetch:\n // if diff.missing exists, we should not return cache data.\n if (errorPolicy === "none" &&\n networkStatus === core_networkStatus/* NetworkStatus */.pT.refetch &&\n Array.isArray(diff.missing)) {\n return fromData(void 0);\n }\n return fromData(data);\n };\n var cacheWriteBehavior = fetchPolicy === "no-cache" ? 0 /* CacheWriteBehavior.FORBID */\n // Watched queries must opt into overwriting existing data on refetch,\n // by passing refetchWritePolicy: "overwrite" in their WatchQueryOptions.\n : (networkStatus === core_networkStatus/* NetworkStatus */.pT.refetch &&\n refetchWritePolicy !== "merge") ?\n 1 /* CacheWriteBehavior.OVERWRITE */\n : 2 /* CacheWriteBehavior.MERGE */;\n var resultsFromLink = function () {\n return _this.getResultsFromLink(queryInfo, cacheWriteBehavior, {\n query: query,\n variables: variables,\n context: context,\n fetchPolicy: fetchPolicy,\n errorPolicy: errorPolicy,\n });\n };\n var shouldNotify = notifyOnNetworkStatusChange &&\n typeof oldNetworkStatus === "number" &&\n oldNetworkStatus !== networkStatus &&\n (0,core_networkStatus/* isNetworkRequestInFlight */.bi)(networkStatus);\n switch (fetchPolicy) {\n default:\n case "cache-first": {\n var diff = readCache();\n if (diff.complete) {\n return {\n fromLink: false,\n sources: [resultsFromCache(diff, queryInfo.markReady())],\n };\n }\n if (returnPartialData || shouldNotify) {\n return {\n fromLink: true,\n sources: [resultsFromCache(diff), resultsFromLink()],\n };\n }\n return { fromLink: true, sources: [resultsFromLink()] };\n }\n case "cache-and-network": {\n var diff = readCache();\n if (diff.complete || returnPartialData || shouldNotify) {\n return {\n fromLink: true,\n sources: [resultsFromCache(diff), resultsFromLink()],\n };\n }\n return { fromLink: true, sources: [resultsFromLink()] };\n }\n case "cache-only":\n return {\n fromLink: false,\n sources: [resultsFromCache(readCache(), queryInfo.markReady())],\n };\n case "network-only":\n if (shouldNotify) {\n return {\n fromLink: true,\n sources: [resultsFromCache(readCache()), resultsFromLink()],\n };\n }\n return { fromLink: true, sources: [resultsFromLink()] };\n case "no-cache":\n if (shouldNotify) {\n return {\n fromLink: true,\n // Note that queryInfo.getDiff() for no-cache queries does not call\n // cache.diff, but instead returns a { complete: false } stub result\n // when there is no queryInfo.diff already defined.\n sources: [resultsFromCache(queryInfo.getDiff()), resultsFromLink()],\n };\n }\n return { fromLink: true, sources: [resultsFromLink()] };\n case "standby":\n return { fromLink: false, sources: [] };\n }\n };\n QueryManager.prototype.getQuery = function (queryId) {\n if (queryId && !this.queries.has(queryId)) {\n this.queries.set(queryId, new QueryInfo(this, queryId));\n }\n return this.queries.get(queryId);\n };\n QueryManager.prototype.prepareContext = function (context) {\n if (context === void 0) { context = {}; }\n var newContext = this.localState.prepareContext(context);\n return (0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, this.defaultContext), newContext), { clientAwareness: this.clientAwareness });\n };\n return QueryManager;\n}());\n\n//# sourceMappingURL=QueryManager.js.map\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/common/mergeOptions.js\nvar mergeOptions = __webpack_require__(144);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/caching/getMemoryInternals.js\nvar getMemoryInternals = __webpack_require__(5051);\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/core/ApolloClient.js\n\n\n\n\n\n\n\nvar hasSuggestedDevtools = false;\n// Though mergeOptions now resides in @apollo/client/utilities, it was\n// previously declared and exported from this module, and then reexported from\n// @apollo/client/core. Since we need to preserve that API anyway, the easiest\n// solution is to reexport mergeOptions where it was previously declared (here).\n\n\n\n/**\n * This is the primary Apollo Client class. It is used to send GraphQL documents (i.e. queries\n * and mutations) to a GraphQL spec-compliant server over an `ApolloLink` instance,\n * receive results from the server and cache the results in a store. It also delivers updates\n * to GraphQL queries through `Observable` instances.\n */\nvar ApolloClient = /** @class */ (function () {\n /**\n * Constructs an instance of `ApolloClient`.\n *\n * @example\n * ```js\n * import { ApolloClient, InMemoryCache } from \'@apollo/client\';\n *\n * const cache = new InMemoryCache();\n *\n * const client = new ApolloClient({\n * // Provide required constructor fields\n * cache: cache,\n * uri: \'http://localhost:4000/\',\n *\n * // Provide some optional constructor fields\n * name: \'react-web-client\',\n * version: \'1.3\',\n * queryDeduplication: false,\n * defaultOptions: {\n * watchQuery: {\n * fetchPolicy: \'cache-and-network\',\n * },\n * },\n * });\n * ```\n */\n function ApolloClient(options) {\n var _this = this;\n this.resetStoreCallbacks = [];\n this.clearStoreCallbacks = [];\n if (!options.cache) {\n throw (0,globals/* newInvariantError */.vA)(15);\n }\n var uri = options.uri, credentials = options.credentials, headers = options.headers, cache = options.cache, documentTransform = options.documentTransform, _a = options.ssrMode, ssrMode = _a === void 0 ? false : _a, _b = options.ssrForceFetchDelay, ssrForceFetchDelay = _b === void 0 ? 0 : _b, \n // Expose the client instance as window.__APOLLO_CLIENT__ and call\n // onBroadcast in queryManager.broadcastQueries to enable browser\n // devtools, but disable them by default in production.\n _c = options.connectToDevTools, \n // Expose the client instance as window.__APOLLO_CLIENT__ and call\n // onBroadcast in queryManager.broadcastQueries to enable browser\n // devtools, but disable them by default in production.\n connectToDevTools = _c === void 0 ? typeof window === "object" &&\n !window.__APOLLO_CLIENT__ &&\n globalThis.__DEV__ !== false : _c, _d = options.queryDeduplication, queryDeduplication = _d === void 0 ? true : _d, defaultOptions = options.defaultOptions, defaultContext = options.defaultContext, _e = options.assumeImmutableResults, assumeImmutableResults = _e === void 0 ? cache.assumeImmutableResults : _e, resolvers = options.resolvers, typeDefs = options.typeDefs, fragmentMatcher = options.fragmentMatcher, clientAwarenessName = options.name, clientAwarenessVersion = options.version;\n var link = options.link;\n if (!link) {\n link =\n uri ? new HttpLink({ uri: uri, credentials: credentials, headers: headers }) : ApolloLink/* ApolloLink */.C.empty();\n }\n this.link = link;\n this.cache = cache;\n this.disableNetworkFetches = ssrMode || ssrForceFetchDelay > 0;\n this.queryDeduplication = queryDeduplication;\n this.defaultOptions = defaultOptions || Object.create(null);\n this.typeDefs = typeDefs;\n if (ssrForceFetchDelay) {\n setTimeout(function () { return (_this.disableNetworkFetches = false); }, ssrForceFetchDelay);\n }\n this.watchQuery = this.watchQuery.bind(this);\n this.query = this.query.bind(this);\n this.mutate = this.mutate.bind(this);\n this.watchFragment = this.watchFragment.bind(this);\n this.resetStore = this.resetStore.bind(this);\n this.reFetchObservableQueries = this.reFetchObservableQueries.bind(this);\n this.version = version/* version */.r;\n this.localState = new LocalState({\n cache: cache,\n client: this,\n resolvers: resolvers,\n fragmentMatcher: fragmentMatcher,\n });\n this.queryManager = new QueryManager({\n cache: this.cache,\n link: this.link,\n defaultOptions: this.defaultOptions,\n defaultContext: defaultContext,\n documentTransform: documentTransform,\n queryDeduplication: queryDeduplication,\n ssrMode: ssrMode,\n clientAwareness: {\n name: clientAwarenessName,\n version: clientAwarenessVersion,\n },\n localState: this.localState,\n assumeImmutableResults: assumeImmutableResults,\n onBroadcast: connectToDevTools ?\n function () {\n if (_this.devToolsHookCb) {\n _this.devToolsHookCb({\n action: {},\n state: {\n queries: _this.queryManager.getQueryStore(),\n mutations: _this.queryManager.mutationStore || {},\n },\n dataWithOptimisticResults: _this.cache.extract(true),\n });\n }\n }\n : void 0,\n });\n if (connectToDevTools)\n this.connectToDevTools();\n }\n ApolloClient.prototype.connectToDevTools = function () {\n if (typeof window === "object") {\n var windowWithDevTools = window;\n var devtoolsSymbol = Symbol.for("apollo.devtools");\n (windowWithDevTools[devtoolsSymbol] =\n windowWithDevTools[devtoolsSymbol] || []).push(this);\n windowWithDevTools.__APOLLO_CLIENT__ = this;\n }\n /**\n * Suggest installing the devtools for developers who don\'t have them\n */\n if (!hasSuggestedDevtools && globalThis.__DEV__ !== false) {\n hasSuggestedDevtools = true;\n setTimeout(function () {\n if (typeof window !== "undefined" &&\n window.document &&\n window.top === window.self &&\n !window.__APOLLO_DEVTOOLS_GLOBAL_HOOK__ &&\n /^(https?|file):$/.test(window.location.protocol)) {\n var nav = window.navigator;\n var ua = nav && nav.userAgent;\n var url = void 0;\n if (typeof ua === "string") {\n if (ua.indexOf("Chrome/") > -1) {\n url =\n "https://chrome.google.com/webstore/detail/" +\n "apollo-client-developer-t/jdkknkkbebbapilgoeccciglkfbmbnfm";\n }\n else if (ua.indexOf("Firefox/") > -1) {\n url =\n "https://addons.mozilla.org/en-US/firefox/addon/apollo-developer-tools/";\n }\n }\n if (url) {\n globalThis.__DEV__ !== false && globals/* invariant */.V1.log("Download the Apollo DevTools for a better development " +\n "experience: %s", url);\n }\n }\n }, 10000);\n }\n };\n Object.defineProperty(ApolloClient.prototype, "documentTransform", {\n /**\n * The `DocumentTransform` used to modify GraphQL documents before a request\n * is made. If a custom `DocumentTransform` is not provided, this will be the\n * default document transform.\n */\n get: function () {\n return this.queryManager.documentTransform;\n },\n enumerable: false,\n configurable: true\n });\n /**\n * Call this method to terminate any active client processes, making it safe\n * to dispose of this `ApolloClient` instance.\n */\n ApolloClient.prototype.stop = function () {\n this.queryManager.stop();\n };\n /**\n * This watches the cache store of the query according to the options specified and\n * returns an `ObservableQuery`. We can subscribe to this `ObservableQuery` and\n * receive updated results through an observer when the cache store changes.\n *\n * Note that this method is not an implementation of GraphQL subscriptions. Rather,\n * it uses Apollo\'s store in order to reactively deliver updates to your query results.\n *\n * For example, suppose you call watchQuery on a GraphQL query that fetches a person\'s\n * first and last name and this person has a particular object identifier, provided by\n * dataIdFromObject. Later, a different query fetches that same person\'s\n * first and last name and the first name has now changed. Then, any observers associated\n * with the results of the first query will be updated with a new result object.\n *\n * Note that if the cache does not change, the subscriber will *not* be notified.\n *\n * See [here](https://medium.com/apollo-stack/the-concepts-of-graphql-bc68bd819be3#.3mb0cbcmc) for\n * a description of store reactivity.\n */\n ApolloClient.prototype.watchQuery = function (options) {\n if (this.defaultOptions.watchQuery) {\n options = (0,mergeOptions/* mergeOptions */.l)(this.defaultOptions.watchQuery, options);\n }\n // XXX Overwriting options is probably not the best way to do this long term...\n if (this.disableNetworkFetches &&\n (options.fetchPolicy === "network-only" ||\n options.fetchPolicy === "cache-and-network")) {\n options = (0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, options), { fetchPolicy: "cache-first" });\n }\n return this.queryManager.watchQuery(options);\n };\n /**\n * This resolves a single query according to the options specified and\n * returns a `Promise` which is either resolved with the resulting data\n * or rejected with an error.\n *\n * @param options - An object of type `QueryOptions` that allows us to\n * describe how this query should be treated e.g. whether it should hit the\n * server at all or just resolve from the cache, etc.\n */\n ApolloClient.prototype.query = function (options) {\n if (this.defaultOptions.query) {\n options = (0,mergeOptions/* mergeOptions */.l)(this.defaultOptions.query, options);\n }\n (0,globals/* invariant */.V1)(options.fetchPolicy !== "cache-and-network", 16);\n if (this.disableNetworkFetches && options.fetchPolicy === "network-only") {\n options = (0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, options), { fetchPolicy: "cache-first" });\n }\n return this.queryManager.query(options);\n };\n /**\n * This resolves a single mutation according to the options specified and returns a\n * Promise which is either resolved with the resulting data or rejected with an\n * error. In some cases both `data` and `errors` might be undefined, for example\n * when `errorPolicy` is set to `\'ignore\'`.\n *\n * It takes options as an object with the following keys and values:\n */\n ApolloClient.prototype.mutate = function (options) {\n if (this.defaultOptions.mutate) {\n options = (0,mergeOptions/* mergeOptions */.l)(this.defaultOptions.mutate, options);\n }\n return this.queryManager.mutate(options);\n };\n /**\n * This subscribes to a graphql subscription according to the options specified and returns an\n * `Observable` which either emits received data or an error.\n */\n ApolloClient.prototype.subscribe = function (options) {\n return this.queryManager.startGraphQLSubscription(options);\n };\n /**\n * Tries to read some data from the store in the shape of the provided\n * GraphQL query without making a network request. This method will start at\n * the root query. To start at a specific id returned by `dataIdFromObject`\n * use `readFragment`.\n *\n * @param optimistic - Set to `true` to allow `readQuery` to return\n * optimistic results. Is `false` by default.\n */\n ApolloClient.prototype.readQuery = function (options, optimistic) {\n if (optimistic === void 0) { optimistic = false; }\n return this.cache.readQuery(options, optimistic);\n };\n /**\n * Watches the cache store of the fragment according to the options specified\n * and returns an `Observable`. We can subscribe to this\n * `Observable` and receive updated results through an\n * observer when the cache store changes.\n *\n * You must pass in a GraphQL document with a single fragment or a document\n * with multiple fragments that represent what you are reading. If you pass\n * in a document with multiple fragments then you must also specify a\n * `fragmentName`.\n *\n * @since 3.10.0\n * @param options - An object of type `WatchFragmentOptions` that allows\n * the cache to identify the fragment and optionally specify whether to react\n * to optimistic updates.\n */\n ApolloClient.prototype.watchFragment = function (options) {\n return this.cache.watchFragment(options);\n };\n /**\n * Tries to read some data from the store in the shape of the provided\n * GraphQL fragment without making a network request. This method will read a\n * GraphQL fragment from any arbitrary id that is currently cached, unlike\n * `readQuery` which will only read from the root query.\n *\n * You must pass in a GraphQL document with a single fragment or a document\n * with multiple fragments that represent what you are reading. If you pass\n * in a document with multiple fragments then you must also specify a\n * `fragmentName`.\n *\n * @param optimistic - Set to `true` to allow `readFragment` to return\n * optimistic results. Is `false` by default.\n */\n ApolloClient.prototype.readFragment = function (options, optimistic) {\n if (optimistic === void 0) { optimistic = false; }\n return this.cache.readFragment(options, optimistic);\n };\n /**\n * Writes some data in the shape of the provided GraphQL query directly to\n * the store. This method will start at the root query. To start at a\n * specific id returned by `dataIdFromObject` then use `writeFragment`.\n */\n ApolloClient.prototype.writeQuery = function (options) {\n var ref = this.cache.writeQuery(options);\n if (options.broadcast !== false) {\n this.queryManager.broadcastQueries();\n }\n return ref;\n };\n /**\n * Writes some data in the shape of the provided GraphQL fragment directly to\n * the store. This method will write to a GraphQL fragment from any arbitrary\n * id that is currently cached, unlike `writeQuery` which will only write\n * from the root query.\n *\n * You must pass in a GraphQL document with a single fragment or a document\n * with multiple fragments that represent what you are writing. If you pass\n * in a document with multiple fragments then you must also specify a\n * `fragmentName`.\n */\n ApolloClient.prototype.writeFragment = function (options) {\n var ref = this.cache.writeFragment(options);\n if (options.broadcast !== false) {\n this.queryManager.broadcastQueries();\n }\n return ref;\n };\n ApolloClient.prototype.__actionHookForDevTools = function (cb) {\n this.devToolsHookCb = cb;\n };\n ApolloClient.prototype.__requestRaw = function (payload) {\n return execute(this.link, payload);\n };\n /**\n * Resets your entire store by clearing out your cache and then re-executing\n * all of your active queries. This makes it so that you may guarantee that\n * there is no data left in your store from a time before you called this\n * method.\n *\n * `resetStore()` is useful when your user just logged out. You’ve removed the\n * user session, and you now want to make sure that any references to data you\n * might have fetched while the user session was active is gone.\n *\n * It is important to remember that `resetStore()` *will* refetch any active\n * queries. This means that any components that might be mounted will execute\n * their queries again using your network interface. If you do not want to\n * re-execute any queries then you should make sure to stop watching any\n * active queries.\n */\n ApolloClient.prototype.resetStore = function () {\n var _this = this;\n return Promise.resolve()\n .then(function () {\n return _this.queryManager.clearStore({\n discardWatches: false,\n });\n })\n .then(function () { return Promise.all(_this.resetStoreCallbacks.map(function (fn) { return fn(); })); })\n .then(function () { return _this.reFetchObservableQueries(); });\n };\n /**\n * Remove all data from the store. Unlike `resetStore`, `clearStore` will\n * not refetch any active queries.\n */\n ApolloClient.prototype.clearStore = function () {\n var _this = this;\n return Promise.resolve()\n .then(function () {\n return _this.queryManager.clearStore({\n discardWatches: true,\n });\n })\n .then(function () { return Promise.all(_this.clearStoreCallbacks.map(function (fn) { return fn(); })); });\n };\n /**\n * Allows callbacks to be registered that are executed when the store is\n * reset. `onResetStore` returns an unsubscribe function that can be used\n * to remove registered callbacks.\n */\n ApolloClient.prototype.onResetStore = function (cb) {\n var _this = this;\n this.resetStoreCallbacks.push(cb);\n return function () {\n _this.resetStoreCallbacks = _this.resetStoreCallbacks.filter(function (c) { return c !== cb; });\n };\n };\n /**\n * Allows callbacks to be registered that are executed when the store is\n * cleared. `onClearStore` returns an unsubscribe function that can be used\n * to remove registered callbacks.\n */\n ApolloClient.prototype.onClearStore = function (cb) {\n var _this = this;\n this.clearStoreCallbacks.push(cb);\n return function () {\n _this.clearStoreCallbacks = _this.clearStoreCallbacks.filter(function (c) { return c !== cb; });\n };\n };\n /**\n * Refetches all of your active queries.\n *\n * `reFetchObservableQueries()` is useful if you want to bring the client back to proper state in case of a network outage\n *\n * It is important to remember that `reFetchObservableQueries()` *will* refetch any active\n * queries. This means that any components that might be mounted will execute\n * their queries again using your network interface. If you do not want to\n * re-execute any queries then you should make sure to stop watching any\n * active queries.\n * Takes optional parameter `includeStandby` which will include queries in standby-mode when refetching.\n */\n ApolloClient.prototype.reFetchObservableQueries = function (includeStandby) {\n return this.queryManager.reFetchObservableQueries(includeStandby);\n };\n /**\n * Refetches specified active queries. Similar to "reFetchObservableQueries()" but with a specific list of queries.\n *\n * `refetchQueries()` is useful for use cases to imperatively refresh a selection of queries.\n *\n * It is important to remember that `refetchQueries()` *will* refetch specified active\n * queries. This means that any components that might be mounted will execute\n * their queries again using your network interface. If you do not want to\n * re-execute any queries then you should make sure to stop watching any\n * active queries.\n */\n ApolloClient.prototype.refetchQueries = function (options) {\n var map = this.queryManager.refetchQueries(options);\n var queries = [];\n var results = [];\n map.forEach(function (result, obsQuery) {\n queries.push(obsQuery);\n results.push(result);\n });\n var result = Promise.all(results);\n // In case you need the raw results immediately, without awaiting\n // Promise.all(results):\n result.queries = queries;\n result.results = results;\n // If you decide to ignore the result Promise because you\'re using\n // result.queries and result.results instead, you shouldn\'t have to worry\n // about preventing uncaught rejections for the Promise.all result.\n result.catch(function (error) {\n globalThis.__DEV__ !== false && globals/* invariant */.V1.debug(17, error);\n });\n return result;\n };\n /**\n * Get all currently active `ObservableQuery` objects, in a `Map` keyed by\n * query ID strings.\n *\n * An "active" query is one that has observers and a `fetchPolicy` other than\n * "standby" or "cache-only".\n *\n * You can include all `ObservableQuery` objects (including the inactive ones)\n * by passing "all" instead of "active", or you can include just a subset of\n * active queries by passing an array of query names or DocumentNode objects.\n */\n ApolloClient.prototype.getObservableQueries = function (include) {\n if (include === void 0) { include = "active"; }\n return this.queryManager.getObservableQueries(include);\n };\n /**\n * Exposes the cache\'s complete state, in a serializable format for later restoration.\n */\n ApolloClient.prototype.extract = function (optimistic) {\n return this.cache.extract(optimistic);\n };\n /**\n * Replaces existing state in the cache (if any) with the values expressed by\n * `serializedState`.\n *\n * Called when hydrating a cache (server side rendering, or offline storage),\n * and also (potentially) during hot reloads.\n */\n ApolloClient.prototype.restore = function (serializedState) {\n return this.cache.restore(serializedState);\n };\n /**\n * Add additional local resolvers.\n */\n ApolloClient.prototype.addResolvers = function (resolvers) {\n this.localState.addResolvers(resolvers);\n };\n /**\n * Set (override existing) local resolvers.\n */\n ApolloClient.prototype.setResolvers = function (resolvers) {\n this.localState.setResolvers(resolvers);\n };\n /**\n * Get all registered local resolvers.\n */\n ApolloClient.prototype.getResolvers = function () {\n return this.localState.getResolvers();\n };\n /**\n * Set a custom local state fragment matcher.\n */\n ApolloClient.prototype.setLocalStateFragmentMatcher = function (fragmentMatcher) {\n this.localState.setFragmentMatcher(fragmentMatcher);\n };\n /**\n * Define a new ApolloLink (or link chain) that Apollo Client will use.\n */\n ApolloClient.prototype.setLink = function (newLink) {\n this.link = this.queryManager.link = newLink;\n };\n Object.defineProperty(ApolloClient.prototype, "defaultContext", {\n get: function () {\n return this.queryManager.defaultContext;\n },\n enumerable: false,\n configurable: true\n });\n return ApolloClient;\n}());\n\nif (globalThis.__DEV__ !== false) {\n ApolloClient.prototype.getMemoryInternals = getMemoryInternals/* getApolloClientMemoryInternals */.ep;\n}\n//# sourceMappingURL=ApolloClient.js.map\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@apollo/client/core/ApolloClient.js_+_12_modules?', + ); + + /***/ + }, + + /***/ 9080: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ a: () => (/* binding */ equalByQuery)\n/* harmony export */ });\n/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1635);\n/* harmony import */ var _wry_equality__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5381);\n/* harmony import */ var _utilities_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4824);\n/* harmony import */ var _utilities_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(5215);\n/* harmony import */ var _utilities_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(1250);\n/* harmony import */ var _utilities_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(7194);\n\n\n\n// Returns true if aResult and bResult are deeply equal according to the fields\n// selected by the given query, ignoring any fields marked as @nonreactive.\nfunction equalByQuery(query, _a, _b, variables) {\n var aData = _a.data, aRest = (0,tslib__WEBPACK_IMPORTED_MODULE_1__/* .__rest */ .Tt)(_a, ["data"]);\n var bData = _b.data, bRest = (0,tslib__WEBPACK_IMPORTED_MODULE_1__/* .__rest */ .Tt)(_b, ["data"]);\n return ((0,_wry_equality__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(aRest, bRest) &&\n equalBySelectionSet((0,_utilities_index_js__WEBPACK_IMPORTED_MODULE_2__/* .getMainDefinition */ .Vn)(query).selectionSet, aData, bData, {\n fragmentMap: (0,_utilities_index_js__WEBPACK_IMPORTED_MODULE_3__/* .createFragmentMap */ .JG)((0,_utilities_index_js__WEBPACK_IMPORTED_MODULE_2__/* .getFragmentDefinitions */ .zK)(query)),\n variables: variables,\n }));\n}\nfunction equalBySelectionSet(selectionSet, aResult, bResult, context) {\n if (aResult === bResult) {\n return true;\n }\n var seenSelections = new Set();\n // Returning true from this Array.prototype.every callback function skips the\n // current field/subtree. Returning false aborts the entire traversal\n // immediately, causing equalBySelectionSet to return false.\n return selectionSet.selections.every(function (selection) {\n // Avoid re-processing the same selection at the same level of recursion, in\n // case the same field gets included via multiple indirect fragment spreads.\n if (seenSelections.has(selection))\n return true;\n seenSelections.add(selection);\n // Ignore @skip(if: true) and @include(if: false) fields.\n if (!(0,_utilities_index_js__WEBPACK_IMPORTED_MODULE_4__/* .shouldInclude */ .MS)(selection, context.variables))\n return true;\n // If the field or (named) fragment spread has a @nonreactive directive on\n // it, we don\'t care if it\'s different, so we pretend it\'s the same.\n if (selectionHasNonreactiveDirective(selection))\n return true;\n if ((0,_utilities_index_js__WEBPACK_IMPORTED_MODULE_5__/* .isField */ .dt)(selection)) {\n var resultKey = (0,_utilities_index_js__WEBPACK_IMPORTED_MODULE_5__/* .resultKeyNameFromField */ .ue)(selection);\n var aResultChild = aResult && aResult[resultKey];\n var bResultChild = bResult && bResult[resultKey];\n var childSelectionSet = selection.selectionSet;\n if (!childSelectionSet) {\n // These are scalar values, so we can compare them with deep equal\n // without redoing the main recursive work.\n return (0,_wry_equality__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(aResultChild, bResultChild);\n }\n var aChildIsArray = Array.isArray(aResultChild);\n var bChildIsArray = Array.isArray(bResultChild);\n if (aChildIsArray !== bChildIsArray)\n return false;\n if (aChildIsArray && bChildIsArray) {\n var length_1 = aResultChild.length;\n if (bResultChild.length !== length_1) {\n return false;\n }\n for (var i = 0; i < length_1; ++i) {\n if (!equalBySelectionSet(childSelectionSet, aResultChild[i], bResultChild[i], context)) {\n return false;\n }\n }\n return true;\n }\n return equalBySelectionSet(childSelectionSet, aResultChild, bResultChild, context);\n }\n else {\n var fragment = (0,_utilities_index_js__WEBPACK_IMPORTED_MODULE_3__/* .getFragmentFromSelection */ .HQ)(selection, context.fragmentMap);\n if (fragment) {\n // The fragment might === selection if it\'s an inline fragment, but\n // could be !== if it\'s a named fragment ...spread.\n if (selectionHasNonreactiveDirective(fragment))\n return true;\n return equalBySelectionSet(fragment.selectionSet, \n // Notice that we reuse the same aResult and bResult values here,\n // since the fragment ...spread does not specify a field name, but\n // consists of multiple fields (within the fragment\'s selection set)\n // that should be applied to the current result value(s).\n aResult, bResult, context);\n }\n }\n });\n}\nfunction selectionHasNonreactiveDirective(selection) {\n return (!!selection.directives && selection.directives.some(directiveIsNonreactive));\n}\nfunction directiveIsNonreactive(dir) {\n return dir.name.value === "nonreactive";\n}\n//# sourceMappingURL=equalByQuery.js.map\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@apollo/client/core/equalByQuery.js?', + ); + + /***/ + }, + + /***/ 8599: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ bi: () => (/* binding */ isNetworkRequestInFlight),\n/* harmony export */ pT: () => (/* binding */ NetworkStatus)\n/* harmony export */ });\n/* unused harmony export isNetworkRequestSettled */\n/**\n * The current status of a query’s execution in our system.\n */\nvar NetworkStatus;\n(function (NetworkStatus) {\n /**\n * The query has never been run before and the query is now currently running. A query will still\n * have this network status even if a partial data result was returned from the cache, but a\n * query was dispatched anyway.\n */\n NetworkStatus[NetworkStatus["loading"] = 1] = "loading";\n /**\n * If `setVariables` was called and a query was fired because of that then the network status\n * will be `setVariables` until the result of that query comes back.\n */\n NetworkStatus[NetworkStatus["setVariables"] = 2] = "setVariables";\n /**\n * Indicates that `fetchMore` was called on this query and that the query created is currently in\n * flight.\n */\n NetworkStatus[NetworkStatus["fetchMore"] = 3] = "fetchMore";\n /**\n * Similar to the `setVariables` network status. It means that `refetch` was called on a query\n * and the refetch request is currently in flight.\n */\n NetworkStatus[NetworkStatus["refetch"] = 4] = "refetch";\n /**\n * Indicates that a polling query is currently in flight. So for example if you are polling a\n * query every 10 seconds then the network status will switch to `poll` every 10 seconds whenever\n * a poll request has been sent but not resolved.\n */\n NetworkStatus[NetworkStatus["poll"] = 6] = "poll";\n /**\n * No request is in flight for this query, and no errors happened. Everything is OK.\n */\n NetworkStatus[NetworkStatus["ready"] = 7] = "ready";\n /**\n * No request is in flight for this query, but one or more errors were detected.\n */\n NetworkStatus[NetworkStatus["error"] = 8] = "error";\n})(NetworkStatus || (NetworkStatus = {}));\n/**\n * Returns true if there is currently a network request in flight according to a given network\n * status.\n */\nfunction isNetworkRequestInFlight(networkStatus) {\n return networkStatus ? networkStatus < 7 : false;\n}\n/**\n * Returns true if the network request is in ready or error state according to a given network\n * status.\n */\nfunction isNetworkRequestSettled(networkStatus) {\n return networkStatus === 7 || networkStatus === 8;\n}\n//# sourceMappingURL=networkStatus.js.map\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@apollo/client/core/networkStatus.js?', + ); + + /***/ + }, + + /***/ 9211: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ K$: () => (/* binding */ PROTOCOL_ERRORS_SYMBOL),\n/* harmony export */ K4: () => (/* binding */ ApolloError),\n/* harmony export */ Mn: () => (/* binding */ isApolloError),\n/* harmony export */ uR: () => (/* binding */ graphQLResultHasProtocolErrors)\n/* harmony export */ });\n/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1635);\n/* harmony import */ var _utilities_globals_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6319);\n/* harmony import */ var _utilities_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2456);\n\n\n\n// This Symbol allows us to pass transport-specific errors from the link chain\n// into QueryManager/client internals without risking a naming collision within\n// extensions (which implementers can use as they see fit).\nvar PROTOCOL_ERRORS_SYMBOL = Symbol();\nfunction graphQLResultHasProtocolErrors(result) {\n if (result.extensions) {\n return Array.isArray(result.extensions[PROTOCOL_ERRORS_SYMBOL]);\n }\n return false;\n}\nfunction isApolloError(err) {\n return err.hasOwnProperty("graphQLErrors");\n}\n// Sets the error message on this error according to the\n// the GraphQL and network errors that are present.\n// If the error message has already been set through the\n// constructor or otherwise, this function is a nop.\nvar generateErrorMessage = function (err) {\n var errors = (0,tslib__WEBPACK_IMPORTED_MODULE_1__/* .__spreadArray */ .fX)((0,tslib__WEBPACK_IMPORTED_MODULE_1__/* .__spreadArray */ .fX)((0,tslib__WEBPACK_IMPORTED_MODULE_1__/* .__spreadArray */ .fX)([], err.graphQLErrors, true), err.clientErrors, true), err.protocolErrors, true);\n if (err.networkError)\n errors.push(err.networkError);\n return (errors\n // The rest of the code sometimes unsafely types non-Error objects as GraphQLErrors\n .map(function (err) {\n return ((0,_utilities_index_js__WEBPACK_IMPORTED_MODULE_2__/* .isNonNullObject */ .U)(err) && err.message) || "Error message not found.";\n })\n .join("\\n"));\n};\nvar ApolloError = /** @class */ (function (_super) {\n (0,tslib__WEBPACK_IMPORTED_MODULE_1__/* .__extends */ .C6)(ApolloError, _super);\n // Constructs an instance of ApolloError given a GraphQLError\n // or a network error. Note that one of these has to be a valid\n // value or the constructed error will be meaningless.\n function ApolloError(_a) {\n var graphQLErrors = _a.graphQLErrors, protocolErrors = _a.protocolErrors, clientErrors = _a.clientErrors, networkError = _a.networkError, errorMessage = _a.errorMessage, extraInfo = _a.extraInfo;\n var _this = _super.call(this, errorMessage) || this;\n _this.name = "ApolloError";\n _this.graphQLErrors = graphQLErrors || [];\n _this.protocolErrors = protocolErrors || [];\n _this.clientErrors = clientErrors || [];\n _this.networkError = networkError || null;\n _this.message = errorMessage || generateErrorMessage(_this);\n _this.extraInfo = extraInfo;\n // We\'re not using `Object.setPrototypeOf` here as it isn\'t fully\n // supported on Android (see issue #3236).\n _this.__proto__ = ApolloError.prototype;\n return _this;\n }\n return ApolloError;\n}(Error));\n\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@apollo/client/errors/index.js?', + ); + + /***/ + }, + + /***/ 1188: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '\n// EXPORTS\n__webpack_require__.d(__webpack_exports__, {\n C: () => (/* binding */ ApolloLink)\n});\n\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/globals/index.js + 4 modules\nvar globals = __webpack_require__(6319);\n// EXTERNAL MODULE: ./node_modules/zen-observable-ts/module.js\nvar zen_observable_ts_module = __webpack_require__(3401);\n// EXTERNAL MODULE: ./node_modules/tslib/tslib.es6.mjs\nvar tslib_es6 = __webpack_require__(1635);\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/link/utils/createOperation.js\n\nfunction createOperation(starting, operation) {\n var context = (0,tslib_es6/* __assign */.Cl)({}, starting);\n var setContext = function (next) {\n if (typeof next === "function") {\n context = (0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, context), next(context));\n }\n else {\n context = (0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, context), next);\n }\n };\n var getContext = function () { return ((0,tslib_es6/* __assign */.Cl)({}, context)); };\n Object.defineProperty(operation, "setContext", {\n enumerable: false,\n value: setContext,\n });\n Object.defineProperty(operation, "getContext", {\n enumerable: false,\n value: getContext,\n });\n return operation;\n}\n//# sourceMappingURL=createOperation.js.map\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/graphql/getFromAST.js\nvar getFromAST = __webpack_require__(4824);\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/link/utils/transformOperation.js\n\nfunction transformOperation(operation) {\n var transformedOperation = {\n variables: operation.variables || {},\n extensions: operation.extensions || {},\n operationName: operation.operationName,\n query: operation.query,\n };\n // Best guess at an operation name\n if (!transformedOperation.operationName) {\n transformedOperation.operationName =\n typeof transformedOperation.query !== "string" ?\n (0,getFromAST/* getOperationName */.n4)(transformedOperation.query) || undefined\n : "";\n }\n return transformedOperation;\n}\n//# sourceMappingURL=transformOperation.js.map\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/link/utils/validateOperation.js\n\nfunction validateOperation(operation) {\n var OPERATION_FIELDS = [\n "query",\n "operationName",\n "variables",\n "extensions",\n "context",\n ];\n for (var _i = 0, _a = Object.keys(operation); _i < _a.length; _i++) {\n var key = _a[_i];\n if (OPERATION_FIELDS.indexOf(key) < 0) {\n throw (0,globals/* newInvariantError */.vA)(43, key);\n }\n }\n return operation;\n}\n//# sourceMappingURL=validateOperation.js.map\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/link/core/ApolloLink.js\n\n\n\nfunction passthrough(op, forward) {\n return (forward ? forward(op) : zen_observable_ts_module/* Observable */.c.of());\n}\nfunction toLink(handler) {\n return typeof handler === "function" ? new ApolloLink(handler) : handler;\n}\nfunction isTerminating(link) {\n return link.request.length <= 1;\n}\nvar ApolloLink = /** @class */ (function () {\n function ApolloLink(request) {\n if (request)\n this.request = request;\n }\n ApolloLink.empty = function () {\n return new ApolloLink(function () { return zen_observable_ts_module/* Observable */.c.of(); });\n };\n ApolloLink.from = function (links) {\n if (links.length === 0)\n return ApolloLink.empty();\n return links.map(toLink).reduce(function (x, y) { return x.concat(y); });\n };\n ApolloLink.split = function (test, left, right) {\n var leftLink = toLink(left);\n var rightLink = toLink(right || new ApolloLink(passthrough));\n var ret;\n if (isTerminating(leftLink) && isTerminating(rightLink)) {\n ret = new ApolloLink(function (operation) {\n return test(operation) ?\n leftLink.request(operation) || zen_observable_ts_module/* Observable */.c.of()\n : rightLink.request(operation) || zen_observable_ts_module/* Observable */.c.of();\n });\n }\n else {\n ret = new ApolloLink(function (operation, forward) {\n return test(operation) ?\n leftLink.request(operation, forward) || zen_observable_ts_module/* Observable */.c.of()\n : rightLink.request(operation, forward) || zen_observable_ts_module/* Observable */.c.of();\n });\n }\n return Object.assign(ret, { left: leftLink, right: rightLink });\n };\n ApolloLink.execute = function (link, operation) {\n return (link.request(createOperation(operation.context, transformOperation(validateOperation(operation)))) || zen_observable_ts_module/* Observable */.c.of());\n };\n ApolloLink.concat = function (first, second) {\n var firstLink = toLink(first);\n if (isTerminating(firstLink)) {\n globalThis.__DEV__ !== false && globals/* invariant */.V1.warn(35, firstLink);\n return firstLink;\n }\n var nextLink = toLink(second);\n var ret;\n if (isTerminating(nextLink)) {\n ret = new ApolloLink(function (operation) {\n return firstLink.request(operation, function (op) { return nextLink.request(op) || zen_observable_ts_module/* Observable */.c.of(); }) || zen_observable_ts_module/* Observable */.c.of();\n });\n }\n else {\n ret = new ApolloLink(function (operation, forward) {\n return (firstLink.request(operation, function (op) {\n return nextLink.request(op, forward) || zen_observable_ts_module/* Observable */.c.of();\n }) || zen_observable_ts_module/* Observable */.c.of());\n });\n }\n return Object.assign(ret, { left: firstLink, right: nextLink });\n };\n ApolloLink.prototype.split = function (test, left, right) {\n return this.concat(ApolloLink.split(test, left, right || new ApolloLink(passthrough)));\n };\n ApolloLink.prototype.concat = function (next) {\n return ApolloLink.concat(this, next);\n };\n ApolloLink.prototype.request = function (operation, forward) {\n throw (0,globals/* newInvariantError */.vA)(36);\n };\n ApolloLink.prototype.onError = function (error, observer) {\n if (observer && observer.error) {\n observer.error(error);\n // Returning false indicates that observer.error does not need to be\n // called again, since it was already called (on the previous line).\n // Calling observer.error again would not cause any real problems,\n // since only the first call matters, but custom onError functions\n // might have other reasons for wanting to prevent the default\n // behavior by returning false.\n return false;\n }\n // Throw errors will be passed to observer.error.\n throw error;\n };\n ApolloLink.prototype.setOnError = function (fn) {\n this.onError = fn;\n return this;\n };\n return ApolloLink;\n}());\n\n//# sourceMappingURL=ApolloLink.js.map\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@apollo/client/link/core/ApolloLink.js_+_3_modules?', + ); + + /***/ + }, + + /***/ 4132: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '\n// EXPORTS\n__webpack_require__.d(__webpack_exports__, {\n $: () => (/* binding */ createHttpLink)\n});\n\n// EXTERNAL MODULE: ./node_modules/tslib/tslib.es6.mjs\nvar tslib_es6 = __webpack_require__(1635);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/globals/index.js + 4 modules\nvar globals = __webpack_require__(6319);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/link/core/ApolloLink.js + 3 modules\nvar ApolloLink = __webpack_require__(1188);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/graphql/directives.js\nvar directives = __webpack_require__(1250);\n// EXTERNAL MODULE: ./node_modules/zen-observable-ts/module.js\nvar zen_observable_ts_module = __webpack_require__(3401);\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/link/http/serializeFetchParameter.js\n\nvar serializeFetchParameter = function (p, label) {\n var serialized;\n try {\n serialized = JSON.stringify(p);\n }\n catch (e) {\n var parseError = (0,globals/* newInvariantError */.vA)(39, label, e.message);\n parseError.parseError = e;\n throw parseError;\n }\n return serialized;\n};\n//# sourceMappingURL=serializeFetchParameter.js.map\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/link/http/selectURI.js\nvar selectURI = function (operation, fallbackURI) {\n var context = operation.getContext();\n var contextURI = context.uri;\n if (contextURI) {\n return contextURI;\n }\n else if (typeof fallbackURI === "function") {\n return fallbackURI(operation);\n }\n else {\n return fallbackURI || "/graphql";\n }\n};\n//# sourceMappingURL=selectURI.js.map\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/common/canUse.js\nvar canUse = __webpack_require__(2619);\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/link/http/iterators/async.js\n/**\n * Original source:\n * https://github.com/kmalakoff/response-iterator/blob/master/src/iterators/async.ts\n */\nfunction asyncIterator(source) {\n var _a;\n var iterator = source[Symbol.asyncIterator]();\n return _a = {\n next: function () {\n return iterator.next();\n }\n },\n _a[Symbol.asyncIterator] = function () {\n return this;\n },\n _a;\n}\n//# sourceMappingURL=async.js.map\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/link/http/iterators/nodeStream.js\n/**\n * Original source:\n * https://github.com/kmalakoff/response-iterator/blob/master/src/iterators/nodeStream.ts\n */\n\nfunction nodeStreamIterator(stream) {\n var cleanup = null;\n var error = null;\n var done = false;\n var data = [];\n var waiting = [];\n function onData(chunk) {\n if (error)\n return;\n if (waiting.length) {\n var shiftedArr = waiting.shift();\n if (Array.isArray(shiftedArr) && shiftedArr[0]) {\n return shiftedArr[0]({ value: chunk, done: false });\n }\n }\n data.push(chunk);\n }\n function onError(err) {\n error = err;\n var all = waiting.slice();\n all.forEach(function (pair) {\n pair[1](err);\n });\n !cleanup || cleanup();\n }\n function onEnd() {\n done = true;\n var all = waiting.slice();\n all.forEach(function (pair) {\n pair[0]({ value: undefined, done: true });\n });\n !cleanup || cleanup();\n }\n cleanup = function () {\n cleanup = null;\n stream.removeListener("data", onData);\n stream.removeListener("error", onError);\n stream.removeListener("end", onEnd);\n stream.removeListener("finish", onEnd);\n stream.removeListener("close", onEnd);\n };\n stream.on("data", onData);\n stream.on("error", onError);\n stream.on("end", onEnd);\n stream.on("finish", onEnd);\n stream.on("close", onEnd);\n function getNext() {\n return new Promise(function (resolve, reject) {\n if (error)\n return reject(error);\n if (data.length)\n return resolve({ value: data.shift(), done: false });\n if (done)\n return resolve({ value: undefined, done: true });\n waiting.push([resolve, reject]);\n });\n }\n var iterator = {\n next: function () {\n return getNext();\n },\n };\n if (canUse/* canUseAsyncIteratorSymbol */.uJ) {\n iterator[Symbol.asyncIterator] = function () {\n return this;\n };\n }\n return iterator;\n}\n//# sourceMappingURL=nodeStream.js.map\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/link/http/iterators/promise.js\n/**\n * Original source:\n * https://github.com/kmalakoff/response-iterator/blob/master/src/iterators/promise.ts\n */\n\nfunction promiseIterator(promise) {\n var resolved = false;\n var iterator = {\n next: function () {\n if (resolved)\n return Promise.resolve({\n value: undefined,\n done: true,\n });\n resolved = true;\n return new Promise(function (resolve, reject) {\n promise\n .then(function (value) {\n resolve({ value: value, done: false });\n })\n .catch(reject);\n });\n },\n };\n if (canUse/* canUseAsyncIteratorSymbol */.uJ) {\n iterator[Symbol.asyncIterator] = function () {\n return this;\n };\n }\n return iterator;\n}\n//# sourceMappingURL=promise.js.map\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/link/http/iterators/reader.js\n/**\n * Original source:\n * https://github.com/kmalakoff/response-iterator/blob/master/src/iterators/reader.ts\n */\n\nfunction readerIterator(reader) {\n var iterator = {\n next: function () {\n return reader.read();\n },\n };\n if (canUse/* canUseAsyncIteratorSymbol */.uJ) {\n iterator[Symbol.asyncIterator] = function () {\n return this;\n };\n }\n return iterator;\n}\n//# sourceMappingURL=reader.js.map\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/link/http/responseIterator.js\n/**\n * Original source:\n * https://github.com/kmalakoff/response-iterator/blob/master/src/index.ts\n */\n\n\n\n\n\nfunction isNodeResponse(value) {\n return !!value.body;\n}\nfunction isReadableStream(value) {\n return !!value.getReader;\n}\nfunction isAsyncIterableIterator(value) {\n return !!(canUse/* canUseAsyncIteratorSymbol */.uJ &&\n value[Symbol.asyncIterator]);\n}\nfunction isStreamableBlob(value) {\n return !!value.stream;\n}\nfunction isBlob(value) {\n return !!value.arrayBuffer;\n}\nfunction isNodeReadableStream(value) {\n return !!value.pipe;\n}\nfunction responseIterator(response) {\n var body = response;\n if (isNodeResponse(response))\n body = response.body;\n if (isAsyncIterableIterator(body))\n return asyncIterator(body);\n if (isReadableStream(body))\n return readerIterator(body.getReader());\n // this errors without casting to ReadableStream<T>\n // because Blob.stream() returns a NodeJS ReadableStream\n if (isStreamableBlob(body)) {\n return readerIterator(body.stream().getReader());\n }\n if (isBlob(body))\n return promiseIterator(body.arrayBuffer());\n if (isNodeReadableStream(body))\n return nodeStreamIterator(body);\n throw new Error("Unknown body type for responseIterator. Please pass a streamable response.");\n}\n//# sourceMappingURL=responseIterator.js.map\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/link/utils/throwServerError.js\nvar throwServerError = function (response, result, message) {\n var error = new Error(message);\n error.name = "ServerError";\n error.response = response;\n error.statusCode = response.status;\n error.result = result;\n throw error;\n};\n//# sourceMappingURL=throwServerError.js.map\n// EXTERNAL MODULE: ./node_modules/@apollo/client/errors/index.js\nvar errors = __webpack_require__(9211);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/common/incrementalResult.js\nvar incrementalResult = __webpack_require__(6453);\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/link/http/parseAndCheckHttpResponse.js\n\n\n\n\n\nvar parseAndCheckHttpResponse_hasOwnProperty = Object.prototype.hasOwnProperty;\nfunction readMultipartBody(response, nextValue) {\n return (0,tslib_es6/* __awaiter */.sH)(this, void 0, void 0, function () {\n var decoder, contentType, delimiter, boundaryVal, boundary, buffer, iterator, running, _a, value, done, chunk, searchFrom, bi, message, i, headers, contentType_1, body, result, next;\n var _b, _c;\n var _d;\n return (0,tslib_es6/* __generator */.YH)(this, function (_e) {\n switch (_e.label) {\n case 0:\n if (TextDecoder === undefined) {\n throw new Error("TextDecoder must be defined in the environment: please import a polyfill.");\n }\n decoder = new TextDecoder("utf-8");\n contentType = (_d = response.headers) === null || _d === void 0 ? void 0 : _d.get("content-type");\n delimiter = "boundary=";\n boundaryVal = (contentType === null || contentType === void 0 ? void 0 : contentType.includes(delimiter)) ?\n contentType === null || contentType === void 0 ? void 0 : contentType.substring((contentType === null || contentType === void 0 ? void 0 : contentType.indexOf(delimiter)) + delimiter.length).replace(/[\'"]/g, "").replace(/\\;(.*)/gm, "").trim()\n : "-";\n boundary = "\\r\\n--".concat(boundaryVal);\n buffer = "";\n iterator = responseIterator(response);\n running = true;\n _e.label = 1;\n case 1:\n if (!running) return [3 /*break*/, 3];\n return [4 /*yield*/, iterator.next()];\n case 2:\n _a = _e.sent(), value = _a.value, done = _a.done;\n chunk = typeof value === "string" ? value : decoder.decode(value);\n searchFrom = buffer.length - boundary.length + 1;\n running = !done;\n buffer += chunk;\n bi = buffer.indexOf(boundary, searchFrom);\n while (bi > -1) {\n message = void 0;\n _b = [\n buffer.slice(0, bi),\n buffer.slice(bi + boundary.length),\n ], message = _b[0], buffer = _b[1];\n i = message.indexOf("\\r\\n\\r\\n");\n headers = parseHeaders(message.slice(0, i));\n contentType_1 = headers["content-type"];\n if (contentType_1 &&\n contentType_1.toLowerCase().indexOf("application/json") === -1) {\n throw new Error("Unsupported patch content type: application/json is required.");\n }\n body = message.slice(i);\n if (body) {\n result = parseJsonBody(response, body);\n if (Object.keys(result).length > 1 ||\n "data" in result ||\n "incremental" in result ||\n "errors" in result ||\n "payload" in result) {\n if ((0,incrementalResult/* isApolloPayloadResult */.Nw)(result)) {\n next = {};\n if ("payload" in result) {\n if (Object.keys(result).length === 1 && result.payload === null) {\n return [2 /*return*/];\n }\n next = (0,tslib_es6/* __assign */.Cl)({}, result.payload);\n }\n if ("errors" in result) {\n next = (0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, next), { extensions: (0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, ("extensions" in next ? next.extensions : null)), (_c = {}, _c[errors/* PROTOCOL_ERRORS_SYMBOL */.K$] = result.errors, _c)) });\n }\n nextValue(next);\n }\n else {\n // for the last chunk with only `hasNext: false`\n // we don\'t need to call observer.next as there is no data/errors\n nextValue(result);\n }\n }\n else if (\n // If the chunk contains only a "hasNext: false", we can call\n // observer.complete() immediately.\n Object.keys(result).length === 1 &&\n "hasNext" in result &&\n !result.hasNext) {\n return [2 /*return*/];\n }\n }\n bi = buffer.indexOf(boundary);\n }\n return [3 /*break*/, 1];\n case 3: return [2 /*return*/];\n }\n });\n });\n}\nfunction parseHeaders(headerText) {\n var headersInit = {};\n headerText.split("\\n").forEach(function (line) {\n var i = line.indexOf(":");\n if (i > -1) {\n // normalize headers to lowercase\n var name_1 = line.slice(0, i).trim().toLowerCase();\n var value = line.slice(i + 1).trim();\n headersInit[name_1] = value;\n }\n });\n return headersInit;\n}\nfunction parseJsonBody(response, bodyText) {\n if (response.status >= 300) {\n // Network error\n var getResult = function () {\n try {\n return JSON.parse(bodyText);\n }\n catch (err) {\n return bodyText;\n }\n };\n throwServerError(response, getResult(), "Response not successful: Received status code ".concat(response.status));\n }\n try {\n return JSON.parse(bodyText);\n }\n catch (err) {\n var parseError = err;\n parseError.name = "ServerParseError";\n parseError.response = response;\n parseError.statusCode = response.status;\n parseError.bodyText = bodyText;\n throw parseError;\n }\n}\nfunction handleError(err, observer) {\n // if it is a network error, BUT there is graphql result info fire\n // the next observer before calling error this gives apollo-client\n // (and react-apollo) the `graphqlErrors` and `networkErrors` to\n // pass to UI this should only happen if we *also* have data as\n // part of the response key per the spec\n if (err.result && err.result.errors && err.result.data) {\n // if we don\'t call next, the UI can only show networkError\n // because AC didn\'t get any graphqlErrors this is graphql\n // execution result info (i.e errors and possibly data) this is\n // because there is no formal spec how errors should translate to\n // http status codes. So an auth error (401) could have both data\n // from a public field, errors from a private field, and a status\n // of 401\n // {\n // user { // this will have errors\n // firstName\n // }\n // products { // this is public so will have data\n // cost\n // }\n // }\n //\n // the result of above *could* look like this:\n // {\n // data: { products: [{ cost: "$10" }] },\n // errors: [{\n // message: \'your session has timed out\',\n // path: []\n // }]\n // }\n // status code of above would be a 401\n // in the UI you want to show data where you can, errors as data where you can\n // and use correct http status codes\n observer.next(err.result);\n }\n observer.error(err);\n}\nfunction parseAndCheckHttpResponse(operations) {\n return function (response) {\n return response\n .text()\n .then(function (bodyText) { return parseJsonBody(response, bodyText); })\n .then(function (result) {\n if (!Array.isArray(result) &&\n !parseAndCheckHttpResponse_hasOwnProperty.call(result, "data") &&\n !parseAndCheckHttpResponse_hasOwnProperty.call(result, "errors")) {\n // Data error\n throwServerError(response, result, "Server response was missing for query \'".concat(Array.isArray(operations) ?\n operations.map(function (op) { return op.operationName; })\n : operations.operationName, "\'."));\n }\n return result;\n });\n };\n}\n//# sourceMappingURL=parseAndCheckHttpResponse.js.map\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/link/http/checkFetcher.js\n\nvar checkFetcher = function (fetcher) {\n if (!fetcher && typeof fetch === "undefined") {\n throw (0,globals/* newInvariantError */.vA)(37);\n }\n};\n//# sourceMappingURL=checkFetcher.js.map\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/graphql/print.js + 2 modules\nvar print = __webpack_require__(2417);\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/link/http/selectHttpOptionsAndBody.js\n\n\nvar defaultHttpOptions = {\n includeQuery: true,\n includeExtensions: false,\n preserveHeaderCase: false,\n};\nvar defaultHeaders = {\n // headers are case insensitive (https://stackoverflow.com/a/5259004)\n accept: "*/*",\n // The content-type header describes the type of the body of the request, and\n // so it typically only is sent with requests that actually have bodies. One\n // could imagine that Apollo Client would remove this header when constructing\n // a GET request (which has no body), but we historically have not done that.\n // This means that browsers will preflight all Apollo Client requests (even\n // GET requests). Apollo Server\'s CSRF prevention feature (introduced in\n // AS3.7) takes advantage of this fact and does not block requests with this\n // header. If you want to drop this header from GET requests, then you should\n // probably replace it with a `apollo-require-preflight` header, or servers\n // with CSRF prevention enabled might block your GET request. See\n // https://www.apollographql.com/docs/apollo-server/security/cors/#preventing-cross-site-request-forgery-csrf\n // for more details.\n "content-type": "application/json",\n};\nvar defaultOptions = {\n method: "POST",\n};\nvar fallbackHttpConfig = {\n http: defaultHttpOptions,\n headers: defaultHeaders,\n options: defaultOptions,\n};\nvar defaultPrinter = function (ast, printer) { return printer(ast); };\nfunction selectHttpOptionsAndBody(operation, fallbackConfig) {\n var configs = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n configs[_i - 2] = arguments[_i];\n }\n configs.unshift(fallbackConfig);\n return selectHttpOptionsAndBodyInternal.apply(void 0, __spreadArray([operation,\n defaultPrinter], configs, false));\n}\nfunction selectHttpOptionsAndBodyInternal(operation, printer) {\n var configs = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n configs[_i - 2] = arguments[_i];\n }\n var options = {};\n var http = {};\n configs.forEach(function (config) {\n options = (0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, options), config.options), { headers: (0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, options.headers), config.headers) });\n if (config.credentials) {\n options.credentials = config.credentials;\n }\n http = (0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, http), config.http);\n });\n if (options.headers) {\n options.headers = removeDuplicateHeaders(options.headers, http.preserveHeaderCase);\n }\n //The body depends on the http options\n var operationName = operation.operationName, extensions = operation.extensions, variables = operation.variables, query = operation.query;\n var body = { operationName: operationName, variables: variables };\n if (http.includeExtensions)\n body.extensions = extensions;\n // not sending the query (i.e persisted queries)\n if (http.includeQuery)\n body.query = printer(query, print/* print */.y);\n return {\n options: options,\n body: body,\n };\n}\n// Remove potential duplicate header names, preserving last (by insertion order).\n// This is done to prevent unintentionally duplicating a header instead of\n// overwriting it (See #8447 and #8449).\nfunction removeDuplicateHeaders(headers, preserveHeaderCase) {\n // If we\'re not preserving the case, just remove duplicates w/ normalization.\n if (!preserveHeaderCase) {\n var normalizedHeaders_1 = Object.create(null);\n Object.keys(Object(headers)).forEach(function (name) {\n normalizedHeaders_1[name.toLowerCase()] = headers[name];\n });\n return normalizedHeaders_1;\n }\n // If we are preserving the case, remove duplicates w/ normalization,\n // preserving the original name.\n // This allows for non-http-spec-compliant servers that expect intentionally\n // capitalized header names (See #6741).\n var headerData = Object.create(null);\n Object.keys(Object(headers)).forEach(function (name) {\n headerData[name.toLowerCase()] = {\n originalName: name,\n value: headers[name],\n };\n });\n var normalizedHeaders = Object.create(null);\n Object.keys(headerData).forEach(function (name) {\n normalizedHeaders[headerData[name].originalName] = headerData[name].value;\n });\n return normalizedHeaders;\n}\n//# sourceMappingURL=selectHttpOptionsAndBody.js.map\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/link/http/rewriteURIForGET.js\n\n// For GET operations, returns the given URI rewritten with parameters, or a\n// parse error.\nfunction rewriteURIForGET(chosenURI, body) {\n // Implement the standard HTTP GET serialization, plus \'extensions\'. Note\n // the extra level of JSON serialization!\n var queryParams = [];\n var addQueryParam = function (key, value) {\n queryParams.push("".concat(key, "=").concat(encodeURIComponent(value)));\n };\n if ("query" in body) {\n addQueryParam("query", body.query);\n }\n if (body.operationName) {\n addQueryParam("operationName", body.operationName);\n }\n if (body.variables) {\n var serializedVariables = void 0;\n try {\n serializedVariables = serializeFetchParameter(body.variables, "Variables map");\n }\n catch (parseError) {\n return { parseError: parseError };\n }\n addQueryParam("variables", serializedVariables);\n }\n if (body.extensions) {\n var serializedExtensions = void 0;\n try {\n serializedExtensions = serializeFetchParameter(body.extensions, "Extensions map");\n }\n catch (parseError) {\n return { parseError: parseError };\n }\n addQueryParam("extensions", serializedExtensions);\n }\n // Reconstruct the URI with added query params.\n // XXX This assumes that the URI is well-formed and that it doesn\'t\n // already contain any of these query params. We could instead use the\n // URL API and take a polyfill (whatwg-url@6) for older browsers that\n // don\'t support URLSearchParams. Note that some browsers (and\n // versions of whatwg-url) support URL but not URLSearchParams!\n var fragment = "", preFragment = chosenURI;\n var fragmentStart = chosenURI.indexOf("#");\n if (fragmentStart !== -1) {\n fragment = chosenURI.substr(fragmentStart);\n preFragment = chosenURI.substr(0, fragmentStart);\n }\n var queryParamsPrefix = preFragment.indexOf("?") === -1 ? "?" : "&";\n var newURI = preFragment + queryParamsPrefix + queryParams.join("&") + fragment;\n return { newURI: newURI };\n}\n//# sourceMappingURL=rewriteURIForGET.js.map\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/link/utils/fromError.js\n\nfunction fromError(errorValue) {\n return new zen_observable_ts_module/* Observable */.c(function (observer) {\n observer.error(errorValue);\n });\n}\n//# sourceMappingURL=fromError.js.map\n// EXTERNAL MODULE: ./node_modules/graphql/language/visitor.mjs\nvar visitor = __webpack_require__(4705);\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/link/utils/filterOperationVariables.js\n\n\nfunction filterOperationVariables(variables, query) {\n var result = (0,tslib_es6/* __assign */.Cl)({}, variables);\n var unusedNames = new Set(Object.keys(variables));\n (0,visitor/* visit */.YR)(query, {\n Variable: function (node, _key, parent) {\n // A variable type definition at the top level of a query is not\n // enough to silence server-side errors about the variable being\n // unused, so variable definitions do not count as usage.\n // https://spec.graphql.org/draft/#sec-All-Variables-Used\n if (parent &&\n parent.kind !== "VariableDefinition") {\n unusedNames.delete(node.name.value);\n }\n },\n });\n unusedNames.forEach(function (name) {\n delete result[name];\n });\n return result;\n}\n//# sourceMappingURL=filterOperationVariables.js.map\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/graphql/transform.js\nvar transform = __webpack_require__(3902);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/graphql/getFromAST.js\nvar getFromAST = __webpack_require__(4824);\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/link/http/createHttpLink.js\n\n\n\n\n\n\n\n\n\n\n\n\nvar backupFetch = (0,globals/* maybe */.no)(function () { return fetch; });\nvar createHttpLink = function (linkOptions) {\n if (linkOptions === void 0) { linkOptions = {}; }\n var _a = linkOptions.uri, uri = _a === void 0 ? "/graphql" : _a, \n // use default global fetch if nothing passed in\n preferredFetch = linkOptions.fetch, _b = linkOptions.print, print = _b === void 0 ? defaultPrinter : _b, includeExtensions = linkOptions.includeExtensions, preserveHeaderCase = linkOptions.preserveHeaderCase, useGETForQueries = linkOptions.useGETForQueries, _c = linkOptions.includeUnusedVariables, includeUnusedVariables = _c === void 0 ? false : _c, requestOptions = (0,tslib_es6/* __rest */.Tt)(linkOptions, ["uri", "fetch", "print", "includeExtensions", "preserveHeaderCase", "useGETForQueries", "includeUnusedVariables"]);\n if (globalThis.__DEV__ !== false) {\n // Make sure at least one of preferredFetch, window.fetch, or backupFetch is\n // defined, so requests won\'t fail at runtime.\n checkFetcher(preferredFetch || backupFetch);\n }\n var linkConfig = {\n http: { includeExtensions: includeExtensions, preserveHeaderCase: preserveHeaderCase },\n options: requestOptions.fetchOptions,\n credentials: requestOptions.credentials,\n headers: requestOptions.headers,\n };\n return new ApolloLink/* ApolloLink */.C(function (operation) {\n var chosenURI = selectURI(operation, uri);\n var context = operation.getContext();\n // `apollographql-client-*` headers are automatically set if a\n // `clientAwareness` object is found in the context. These headers are\n // set first, followed by the rest of the headers pulled from\n // `context.headers`. If desired, `apollographql-client-*` headers set by\n // the `clientAwareness` object can be overridden by\n // `apollographql-client-*` headers set in `context.headers`.\n var clientAwarenessHeaders = {};\n if (context.clientAwareness) {\n var _a = context.clientAwareness, name_1 = _a.name, version = _a.version;\n if (name_1) {\n clientAwarenessHeaders["apollographql-client-name"] = name_1;\n }\n if (version) {\n clientAwarenessHeaders["apollographql-client-version"] = version;\n }\n }\n var contextHeaders = (0,tslib_es6/* __assign */.Cl)((0,tslib_es6/* __assign */.Cl)({}, clientAwarenessHeaders), context.headers);\n var contextConfig = {\n http: context.http,\n options: context.fetchOptions,\n credentials: context.credentials,\n headers: contextHeaders,\n };\n if ((0,directives/* hasDirectives */.d8)(["client"], operation.query)) {\n var transformedQuery = (0,transform/* removeClientSetsFromDocument */.er)(operation.query);\n if (!transformedQuery) {\n return fromError(new Error("HttpLink: Trying to send a client-only query to the server. To send to the server, ensure a non-client field is added to the query or set the `transformOptions.removeClientFields` option to `true`."));\n }\n operation.query = transformedQuery;\n }\n //uses fallback, link, and then context to build options\n var _b = selectHttpOptionsAndBodyInternal(operation, print, fallbackHttpConfig, linkConfig, contextConfig), options = _b.options, body = _b.body;\n if (body.variables && !includeUnusedVariables) {\n body.variables = filterOperationVariables(body.variables, operation.query);\n }\n var controller;\n if (!options.signal && typeof AbortController !== "undefined") {\n controller = new AbortController();\n options.signal = controller.signal;\n }\n // If requested, set method to GET if there are no mutations.\n var definitionIsMutation = function (d) {\n return d.kind === "OperationDefinition" && d.operation === "mutation";\n };\n var definitionIsSubscription = function (d) {\n return d.kind === "OperationDefinition" && d.operation === "subscription";\n };\n var isSubscription = definitionIsSubscription((0,getFromAST/* getMainDefinition */.Vn)(operation.query));\n // does not match custom directives beginning with @defer\n var hasDefer = (0,directives/* hasDirectives */.d8)(["defer"], operation.query);\n if (useGETForQueries &&\n !operation.query.definitions.some(definitionIsMutation)) {\n options.method = "GET";\n }\n if (hasDefer || isSubscription) {\n options.headers = options.headers || {};\n var acceptHeader = "multipart/mixed;";\n // Omit defer-specific headers if the user attempts to defer a selection\n // set on a subscription and log a warning.\n if (isSubscription && hasDefer) {\n globalThis.__DEV__ !== false && globals/* invariant */.V1.warn(38);\n }\n if (isSubscription) {\n acceptHeader +=\n "boundary=graphql;subscriptionSpec=1.0,application/json";\n }\n else if (hasDefer) {\n acceptHeader += "deferSpec=20220824,application/json";\n }\n options.headers.accept = acceptHeader;\n }\n if (options.method === "GET") {\n var _c = rewriteURIForGET(chosenURI, body), newURI = _c.newURI, parseError = _c.parseError;\n if (parseError) {\n return fromError(parseError);\n }\n chosenURI = newURI;\n }\n else {\n try {\n options.body = serializeFetchParameter(body, "Payload");\n }\n catch (parseError) {\n return fromError(parseError);\n }\n }\n return new zen_observable_ts_module/* Observable */.c(function (observer) {\n // Prefer linkOptions.fetch (preferredFetch) if provided, and otherwise\n // fall back to the *current* global window.fetch function (see issue\n // #7832), or (if all else fails) the backupFetch function we saved when\n // this module was first evaluated. This last option protects against the\n // removal of window.fetch, which is unlikely but not impossible.\n var currentFetch = preferredFetch || (0,globals/* maybe */.no)(function () { return fetch; }) || backupFetch;\n var observerNext = observer.next.bind(observer);\n currentFetch(chosenURI, options)\n .then(function (response) {\n var _a;\n operation.setContext({ response: response });\n var ctype = (_a = response.headers) === null || _a === void 0 ? void 0 : _a.get("content-type");\n if (ctype !== null && /^multipart\\/mixed/i.test(ctype)) {\n return readMultipartBody(response, observerNext);\n }\n else {\n return parseAndCheckHttpResponse(operation)(response).then(observerNext);\n }\n })\n .then(function () {\n controller = undefined;\n observer.complete();\n })\n .catch(function (err) {\n controller = undefined;\n handleError(err, observer);\n });\n return function () {\n // XXX support canceling this request\n // https://developers.google.com/web/updates/2017/09/abortable-fetch\n if (controller)\n controller.abort();\n };\n });\n });\n};\n//# sourceMappingURL=createHttpLink.js.map\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@apollo/client/link/http/createHttpLink.js_+_14_modules?', + ); + + /***/ + }, + + /***/ 599: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + "/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ A: () => (/* binding */ AutoCleanedWeakCache),\n/* harmony export */ V: () => (/* binding */ AutoCleanedStrongCache)\n/* harmony export */ });\n/* harmony import */ var _wry_caches__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1744);\n/* harmony import */ var _wry_caches__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7783);\n\nvar scheduledCleanup = new WeakSet();\nfunction schedule(cache) {\n if (cache.size <= (cache.max || -1)) {\n return;\n }\n if (!scheduledCleanup.has(cache)) {\n scheduledCleanup.add(cache);\n setTimeout(function () {\n cache.clean();\n scheduledCleanup.delete(cache);\n }, 100);\n }\n}\n/**\n * @internal\n * A version of WeakCache that will auto-schedule a cleanup of the cache when\n * a new item is added and the cache reached maximum size.\n * Throttled to once per 100ms.\n *\n * @privateRemarks\n * Should be used throughout the rest of the codebase instead of WeakCache,\n * with the notable exception of usage in `wrap` from `optimism` - that one\n * already handles cleanup and should remain a `WeakCache`.\n */\nvar AutoCleanedWeakCache = function (max, dispose) {\n /*\n Some builds of `WeakCache` are function prototypes, some are classes.\n This library still builds with an ES5 target, so we can't extend the\n real classes.\n Instead, we have to use this workaround until we switch to a newer build\n target.\n */\n var cache = new _wry_caches__WEBPACK_IMPORTED_MODULE_0__/* .WeakCache */ .l(max, dispose);\n cache.set = function (key, value) {\n var ret = _wry_caches__WEBPACK_IMPORTED_MODULE_0__/* .WeakCache */ .l.prototype.set.call(this, key, value);\n schedule(this);\n return ret;\n };\n return cache;\n};\n/**\n * @internal\n * A version of StrongCache that will auto-schedule a cleanup of the cache when\n * a new item is added and the cache reached maximum size.\n * Throttled to once per 100ms.\n *\n * @privateRemarks\n * Should be used throughout the rest of the codebase instead of StrongCache,\n * with the notable exception of usage in `wrap` from `optimism` - that one\n * already handles cleanup and should remain a `StrongCache`.\n */\nvar AutoCleanedStrongCache = function (max, dispose) {\n /*\n Some builds of `StrongCache` are function prototypes, some are classes.\n This library still builds with an ES5 target, so we can't extend the\n real classes.\n Instead, we have to use this workaround until we switch to a newer build\n target.\n */\n var cache = new _wry_caches__WEBPACK_IMPORTED_MODULE_1__/* .StrongCache */ .C(max, dispose);\n cache.set = function (key, value) {\n var ret = _wry_caches__WEBPACK_IMPORTED_MODULE_1__/* .StrongCache */ .C.prototype.set.call(this, key, value);\n schedule(this);\n return ret;\n };\n return cache;\n};\n//# sourceMappingURL=caches.js.map\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@apollo/client/utilities/caching/caches.js?", + ); + + /***/ + }, + + /***/ 5051: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ D_: () => (/* binding */ registerGlobalCache),\n/* harmony export */ cM: () => (/* binding */ getInMemoryCacheMemoryInternals),\n/* harmony export */ ep: () => (/* binding */ getApolloClientMemoryInternals),\n/* harmony export */ tQ: () => (/* binding */ getApolloCacheMemoryInternals)\n/* harmony export */ });\n/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1635);\n/* harmony import */ var _sizes_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1212);\n\n\nvar globalCaches = {};\nfunction registerGlobalCache(name, getSize) {\n globalCaches[name] = getSize;\n}\n/**\n * For internal purposes only - please call `ApolloClient.getMemoryInternals` instead\n * @internal\n */\nvar getApolloClientMemoryInternals = globalThis.__DEV__ !== false ?\n _getApolloClientMemoryInternals\n : undefined;\n/**\n * For internal purposes only - please call `ApolloClient.getMemoryInternals` instead\n * @internal\n */\nvar getInMemoryCacheMemoryInternals = globalThis.__DEV__ !== false ?\n _getInMemoryCacheMemoryInternals\n : undefined;\n/**\n * For internal purposes only - please call `ApolloClient.getMemoryInternals` instead\n * @internal\n */\nvar getApolloCacheMemoryInternals = globalThis.__DEV__ !== false ?\n _getApolloCacheMemoryInternals\n : undefined;\nfunction getCurrentCacheSizes() {\n // `defaultCacheSizes` is a `const enum` that will be inlined during build, so we have to reconstruct it\'s shape here\n var defaults = {\n parser: 1000 /* defaultCacheSizes["parser"] */,\n canonicalStringify: 1000 /* defaultCacheSizes["canonicalStringify"] */,\n print: 2000 /* defaultCacheSizes["print"] */,\n "documentTransform.cache": 2000 /* defaultCacheSizes["documentTransform.cache"] */,\n "queryManager.getDocumentInfo": 2000 /* defaultCacheSizes["queryManager.getDocumentInfo"] */,\n "PersistedQueryLink.persistedQueryHashes": 2000 /* defaultCacheSizes["PersistedQueryLink.persistedQueryHashes"] */,\n "fragmentRegistry.transform": 2000 /* defaultCacheSizes["fragmentRegistry.transform"] */,\n "fragmentRegistry.lookup": 1000 /* defaultCacheSizes["fragmentRegistry.lookup"] */,\n "fragmentRegistry.findFragmentSpreads": 4000 /* defaultCacheSizes["fragmentRegistry.findFragmentSpreads"] */,\n "cache.fragmentQueryDocuments": 1000 /* defaultCacheSizes["cache.fragmentQueryDocuments"] */,\n "removeTypenameFromVariables.getVariableDefinitions": 2000 /* defaultCacheSizes["removeTypenameFromVariables.getVariableDefinitions"] */,\n "inMemoryCache.maybeBroadcastWatch": 5000 /* defaultCacheSizes["inMemoryCache.maybeBroadcastWatch"] */,\n "inMemoryCache.executeSelectionSet": 50000 /* defaultCacheSizes["inMemoryCache.executeSelectionSet"] */,\n "inMemoryCache.executeSubSelectedArray": 10000 /* defaultCacheSizes["inMemoryCache.executeSubSelectedArray"] */,\n };\n return Object.fromEntries(Object.entries(defaults).map(function (_a) {\n var k = _a[0], v = _a[1];\n return [\n k,\n _sizes_js__WEBPACK_IMPORTED_MODULE_0__/* .cacheSizes */ .v[k] || v,\n ];\n }));\n}\nfunction _getApolloClientMemoryInternals() {\n var _a, _b, _c, _d, _e;\n if (!(globalThis.__DEV__ !== false))\n throw new Error("only supported in development mode");\n return {\n limits: getCurrentCacheSizes(),\n sizes: (0,tslib__WEBPACK_IMPORTED_MODULE_1__/* .__assign */ .Cl)({ print: (_a = globalCaches.print) === null || _a === void 0 ? void 0 : _a.call(globalCaches), parser: (_b = globalCaches.parser) === null || _b === void 0 ? void 0 : _b.call(globalCaches), canonicalStringify: (_c = globalCaches.canonicalStringify) === null || _c === void 0 ? void 0 : _c.call(globalCaches), links: linkInfo(this.link), queryManager: {\n getDocumentInfo: this["queryManager"]["transformCache"].size,\n documentTransforms: transformInfo(this["queryManager"].documentTransform),\n } }, (_e = (_d = this.cache).getMemoryInternals) === null || _e === void 0 ? void 0 : _e.call(_d)),\n };\n}\nfunction _getApolloCacheMemoryInternals() {\n return {\n cache: {\n fragmentQueryDocuments: getWrapperInformation(this["getFragmentDoc"]),\n },\n };\n}\nfunction _getInMemoryCacheMemoryInternals() {\n var fragments = this.config.fragments;\n return (0,tslib__WEBPACK_IMPORTED_MODULE_1__/* .__assign */ .Cl)((0,tslib__WEBPACK_IMPORTED_MODULE_1__/* .__assign */ .Cl)({}, _getApolloCacheMemoryInternals.apply(this)), { addTypenameDocumentTransform: transformInfo(this["addTypenameTransform"]), inMemoryCache: {\n executeSelectionSet: getWrapperInformation(this["storeReader"]["executeSelectionSet"]),\n executeSubSelectedArray: getWrapperInformation(this["storeReader"]["executeSubSelectedArray"]),\n maybeBroadcastWatch: getWrapperInformation(this["maybeBroadcastWatch"]),\n }, fragmentRegistry: {\n findFragmentSpreads: getWrapperInformation(fragments === null || fragments === void 0 ? void 0 : fragments.findFragmentSpreads),\n lookup: getWrapperInformation(fragments === null || fragments === void 0 ? void 0 : fragments.lookup),\n transform: getWrapperInformation(fragments === null || fragments === void 0 ? void 0 : fragments.transform),\n } });\n}\nfunction isWrapper(f) {\n return !!f && "dirtyKey" in f;\n}\nfunction getWrapperInformation(f) {\n return isWrapper(f) ? f.size : undefined;\n}\nfunction isDefined(value) {\n return value != null;\n}\nfunction transformInfo(transform) {\n return recurseTransformInfo(transform).map(function (cache) { return ({ cache: cache }); });\n}\nfunction recurseTransformInfo(transform) {\n return transform ?\n (0,tslib__WEBPACK_IMPORTED_MODULE_1__/* .__spreadArray */ .fX)((0,tslib__WEBPACK_IMPORTED_MODULE_1__/* .__spreadArray */ .fX)([\n getWrapperInformation(transform === null || transform === void 0 ? void 0 : transform["performWork"])\n ], recurseTransformInfo(transform === null || transform === void 0 ? void 0 : transform["left"]), true), recurseTransformInfo(transform === null || transform === void 0 ? void 0 : transform["right"]), true).filter(isDefined)\n : [];\n}\nfunction linkInfo(link) {\n var _a;\n return link ?\n (0,tslib__WEBPACK_IMPORTED_MODULE_1__/* .__spreadArray */ .fX)((0,tslib__WEBPACK_IMPORTED_MODULE_1__/* .__spreadArray */ .fX)([\n (_a = link === null || link === void 0 ? void 0 : link.getMemoryInternals) === null || _a === void 0 ? void 0 : _a.call(link)\n ], linkInfo(link === null || link === void 0 ? void 0 : link.left), true), linkInfo(link === null || link === void 0 ? void 0 : link.right), true).filter(isDefined)\n : [];\n}\n//# sourceMappingURL=getMemoryInternals.js.map\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@apollo/client/utilities/caching/getMemoryInternals.js?', + ); + + /***/ + }, + + /***/ 1212: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ v: () => (/* binding */ cacheSizes)\n/* harmony export */ });\n/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1635);\n/* harmony import */ var _globals_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6319);\n\n\nvar cacheSizeSymbol = Symbol.for("apollo.cacheSize");\n/**\n *\n * The global cache size configuration for Apollo Client.\n *\n * @remarks\n *\n * You can directly modify this object, but any modification will\n * only have an effect on caches that are created after the modification.\n *\n * So for global caches, such as `parser`, `canonicalStringify` and `print`,\n * you might need to call `.reset` on them, which will essentially re-create them.\n *\n * Alternatively, you can set `globalThis[Symbol.for("apollo.cacheSize")]` before\n * you load the Apollo Client package:\n *\n * @example\n * ```ts\n * globalThis[Symbol.for("apollo.cacheSize")] = {\n * parser: 100\n * } satisfies Partial<CacheSizes> // the `satisfies` is optional if using TypeScript\n * ```\n */\nvar cacheSizes = (0,tslib__WEBPACK_IMPORTED_MODULE_1__/* .__assign */ .Cl)({}, _globals_index_js__WEBPACK_IMPORTED_MODULE_0__/* .global */ .Sf[cacheSizeSymbol]);\n//# sourceMappingURL=sizes.js.map\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@apollo/client/utilities/caching/sizes.js?', + ); + + /***/ + }, + + /***/ 5636: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ E: () => (/* binding */ isNonEmptyArray),\n/* harmony export */ c: () => (/* binding */ isArray)\n/* harmony export */ });\n// A version of Array.isArray that works better with readonly arrays.\nvar isArray = Array.isArray;\nfunction isNonEmptyArray(value) {\n return Array.isArray(value) && value.length > 0;\n}\n//# sourceMappingURL=arrays.js.map\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@apollo/client/utilities/common/arrays.js?', + ); + + /***/ + }, + + /***/ 2619: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ En: () => (/* binding */ canUseWeakSet),\n/* harmony export */ JR: () => (/* binding */ canUseLayoutEffect),\n/* harmony export */ et: () => (/* binding */ canUseWeakMap),\n/* harmony export */ ol: () => (/* binding */ canUseSymbol),\n/* harmony export */ uJ: () => (/* binding */ canUseAsyncIteratorSymbol)\n/* harmony export */ });\n/* unused harmony export canUseDOM */\n/* harmony import */ var _globals_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6319);\n\nvar isReactNative = (0,_globals_index_js__WEBPACK_IMPORTED_MODULE_0__/* .maybe */ .no)(function () { return navigator.product; }) == "ReactNative";\nvar canUseWeakMap = typeof WeakMap === "function" &&\n !(isReactNative && !global.HermesInternal);\nvar canUseWeakSet = typeof WeakSet === "function";\nvar canUseSymbol = typeof Symbol === "function" && typeof Symbol.for === "function";\nvar canUseAsyncIteratorSymbol = canUseSymbol && Symbol.asyncIterator;\nvar canUseDOM = typeof (0,_globals_index_js__WEBPACK_IMPORTED_MODULE_0__/* .maybe */ .no)(function () { return window.document.createElement; }) === "function";\nvar usingJSDOM = \n// Following advice found in this comment from @domenic (maintainer of jsdom):\n// https://github.com/jsdom/jsdom/issues/1537#issuecomment-229405327\n//\n// Since we control the version of Jest and jsdom used when running Apollo\n// Client tests, and that version is recent enought to include " jsdom/x.y.z"\n// at the end of the user agent string, I believe this case is all we need to\n// check. Testing for "Node.js" was recommended for backwards compatibility\n// with older version of jsdom, but we don\'t have that problem.\n(0,_globals_index_js__WEBPACK_IMPORTED_MODULE_0__/* .maybe */ .no)(function () { return navigator.userAgent.indexOf("jsdom") >= 0; }) || false;\n// Our tests should all continue to pass if we remove this !usingJSDOM\n// condition, thereby allowing useLayoutEffect when using jsdom. Unfortunately,\n// if we allow useLayoutEffect, then useSyncExternalStore generates many\n// warnings about useLayoutEffect doing nothing on the server. While these\n// warnings are harmless, this !usingJSDOM condition seems to be the best way to\n// prevent them (i.e. skipping useLayoutEffect when using jsdom).\nvar canUseLayoutEffect = (canUseDOM || isReactNative) && !usingJSDOM;\n//# sourceMappingURL=canUse.js.map\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@apollo/client/utilities/common/canUse.js?', + ); + + /***/ + }, + + /***/ 6269: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ M: () => (/* binding */ canonicalStringify)\n/* harmony export */ });\n/* harmony import */ var _utilities_caching_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(599);\n/* harmony import */ var _utilities_caching_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1212);\n/* harmony import */ var _caching_getMemoryInternals_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5051);\n\n\n/**\n * Like JSON.stringify, but with object keys always sorted in the same order.\n *\n * To achieve performant sorting, this function uses a Map from JSON-serialized\n * arrays of keys (in any order) to sorted arrays of the same keys, with a\n * single sorted array reference shared by all permutations of the keys.\n *\n * As a drawback, this function will add a little bit more memory for every\n * object encountered that has different (more, less, a different order of) keys\n * than in the past.\n *\n * In a typical application, this extra memory usage should not play a\n * significant role, as `canonicalStringify` will be called for only a limited\n * number of object shapes, and the cache will not grow beyond a certain point.\n * But in some edge cases, this could be a problem, so we provide\n * canonicalStringify.reset() as a way of clearing the cache.\n * */\nvar canonicalStringify = Object.assign(function canonicalStringify(value) {\n return JSON.stringify(value, stableObjectReplacer);\n}, {\n reset: function () {\n // Clearing the sortingMap will reclaim all cached memory, without\n // affecting the logical results of canonicalStringify, but potentially\n // sacrificing performance until the cache is refilled.\n sortingMap = new _utilities_caching_index_js__WEBPACK_IMPORTED_MODULE_0__/* .AutoCleanedStrongCache */ .V(_utilities_caching_index_js__WEBPACK_IMPORTED_MODULE_1__/* .cacheSizes */ .v.canonicalStringify || 1000 /* defaultCacheSizes.canonicalStringify */);\n },\n});\nif (globalThis.__DEV__ !== false) {\n (0,_caching_getMemoryInternals_js__WEBPACK_IMPORTED_MODULE_2__/* .registerGlobalCache */ .D_)("canonicalStringify", function () { return sortingMap.size; });\n}\n// Values are JSON-serialized arrays of object keys (in any order), and values\n// are sorted arrays of the same keys.\nvar sortingMap;\ncanonicalStringify.reset();\n// The JSON.stringify function takes an optional second argument called a\n// replacer function. This function is called for each key-value pair in the\n// object being stringified, and its return value is used instead of the\n// original value. If the replacer function returns a new value, that value is\n// stringified as JSON instead of the original value of the property.\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#the_replacer_parameter\nfunction stableObjectReplacer(key, value) {\n if (value && typeof value === "object") {\n var proto = Object.getPrototypeOf(value);\n // We don\'t want to mess with objects that are not "plain" objects, which\n // means their prototype is either Object.prototype or null. This check also\n // prevents needlessly rearranging the indices of arrays.\n if (proto === Object.prototype || proto === null) {\n var keys = Object.keys(value);\n // If keys is already sorted, let JSON.stringify serialize the original\n // value instead of creating a new object with keys in the same order.\n if (keys.every(everyKeyInOrder))\n return value;\n var unsortedKey = JSON.stringify(keys);\n var sortedKeys = sortingMap.get(unsortedKey);\n if (!sortedKeys) {\n keys.sort();\n var sortedKey = JSON.stringify(keys);\n // Checking for sortedKey in the sortingMap allows us to share the same\n // sorted array reference for all permutations of the same set of keys.\n sortedKeys = sortingMap.get(sortedKey) || keys;\n sortingMap.set(unsortedKey, sortedKeys);\n sortingMap.set(sortedKey, sortedKeys);\n }\n var sortedObject_1 = Object.create(proto);\n // Reassigning the keys in sorted order will cause JSON.stringify to\n // serialize them in sorted order.\n sortedKeys.forEach(function (key) {\n sortedObject_1[key] = value[key];\n });\n return sortedObject_1;\n }\n }\n return value;\n}\n// Since everything that happens in stableObjectReplacer benefits from being as\n// efficient as possible, we use a static function as the callback for\n// keys.every in order to test if the provided keys are already sorted without\n// allocating extra memory for a callback.\nfunction everyKeyInOrder(key, i, keys) {\n return i === 0 || keys[i - 1] <= key;\n}\n//# sourceMappingURL=canonicalStringify.js.map\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@apollo/client/utilities/common/canonicalStringify.js?', + ); + + /***/ + }, + + /***/ 1495: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ m: () => (/* binding */ cloneDeep)\n/* harmony export */ });\nvar toString = Object.prototype.toString;\n/**\n * Deeply clones a value to create a new instance.\n */\nfunction cloneDeep(value) {\n return cloneDeepHelper(value);\n}\nfunction cloneDeepHelper(val, seen) {\n switch (toString.call(val)) {\n case "[object Array]": {\n seen = seen || new Map();\n if (seen.has(val))\n return seen.get(val);\n var copy_1 = val.slice(0);\n seen.set(val, copy_1);\n copy_1.forEach(function (child, i) {\n copy_1[i] = cloneDeepHelper(child, seen);\n });\n return copy_1;\n }\n case "[object Object]": {\n seen = seen || new Map();\n if (seen.has(val))\n return seen.get(val);\n // High fidelity polyfills of Object.create and Object.getPrototypeOf are\n // possible in all JS environments, so we will assume they exist/work.\n var copy_2 = Object.create(Object.getPrototypeOf(val));\n seen.set(val, copy_2);\n Object.keys(val).forEach(function (key) {\n copy_2[key] = cloneDeepHelper(val[key], seen);\n });\n return copy_2;\n }\n default:\n return val;\n }\n}\n//# sourceMappingURL=cloneDeep.js.map\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@apollo/client/utilities/common/cloneDeep.js?', + ); + + /***/ + }, + + /***/ 7945: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ o: () => (/* binding */ compact)\n/* harmony export */ });\n/**\n * Merges the provided objects shallowly and removes\n * all properties with an `undefined` value\n */\nfunction compact() {\n var objects = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n objects[_i] = arguments[_i];\n }\n var result = Object.create(null);\n objects.forEach(function (obj) {\n if (!obj)\n return;\n Object.keys(obj).forEach(function (key) {\n var value = obj[key];\n if (value !== void 0) {\n result[key] = value;\n }\n });\n });\n return result;\n}\n//# sourceMappingURL=compact.js.map\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@apollo/client/utilities/common/compact.js?', + ); + + /***/ + }, + + /***/ 6453: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Nw: () => (/* binding */ isApolloPayloadResult),\n/* harmony export */ ST: () => (/* binding */ isExecutionPatchIncrementalResult),\n/* harmony export */ YX: () => (/* binding */ isExecutionPatchResult),\n/* harmony export */ bd: () => (/* binding */ mergeIncrementalData)\n/* harmony export */ });\n/* unused harmony export isExecutionPatchInitialResult */\n/* harmony import */ var _objects_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2456);\n/* harmony import */ var _arrays_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5636);\n/* harmony import */ var _mergeDeep_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2922);\n\n\n\nfunction isExecutionPatchIncrementalResult(value) {\n return "incremental" in value;\n}\nfunction isExecutionPatchInitialResult(value) {\n return "hasNext" in value && "data" in value;\n}\nfunction isExecutionPatchResult(value) {\n return (isExecutionPatchIncrementalResult(value) ||\n isExecutionPatchInitialResult(value));\n}\n// This function detects an Apollo payload result before it is transformed\n// into a FetchResult via HttpLink; it cannot detect an ApolloPayloadResult\n// once it leaves the link chain.\nfunction isApolloPayloadResult(value) {\n return (0,_objects_js__WEBPACK_IMPORTED_MODULE_0__/* .isNonNullObject */ .U)(value) && "payload" in value;\n}\nfunction mergeIncrementalData(prevResult, result) {\n var mergedData = prevResult;\n var merger = new _mergeDeep_js__WEBPACK_IMPORTED_MODULE_1__/* .DeepMerger */ .ZI();\n if (isExecutionPatchIncrementalResult(result) &&\n (0,_arrays_js__WEBPACK_IMPORTED_MODULE_2__/* .isNonEmptyArray */ .E)(result.incremental)) {\n result.incremental.forEach(function (_a) {\n var data = _a.data, path = _a.path;\n for (var i = path.length - 1; i >= 0; --i) {\n var key = path[i];\n var isNumericKey = !isNaN(+key);\n var parent_1 = isNumericKey ? [] : {};\n parent_1[key] = data;\n data = parent_1;\n }\n mergedData = merger.merge(mergedData, data);\n });\n }\n return mergedData;\n}\n//# sourceMappingURL=incrementalResult.js.map\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@apollo/client/utilities/common/incrementalResult.js?', + ); + + /***/ + }, + + /***/ 8170: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ v: () => (/* binding */ makeUniqueId)\n/* harmony export */ });\nvar prefixCounts = new Map();\n// These IDs won\'t be globally unique, but they will be unique within this\n// process, thanks to the counter, and unguessable thanks to the random suffix.\nfunction makeUniqueId(prefix) {\n var count = prefixCounts.get(prefix) || 1;\n prefixCounts.set(prefix, count + 1);\n return "".concat(prefix, ":").concat(count, ":").concat(Math.random().toString(36).slice(2));\n}\n//# sourceMappingURL=makeUniqueId.js.map\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@apollo/client/utilities/common/makeUniqueId.js?', + ); + + /***/ + }, + + /***/ 1469: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + "/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ G: () => (/* binding */ maybeDeepFreeze)\n/* harmony export */ });\n/* harmony import */ var _objects_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2456);\n\nfunction deepFreeze(value) {\n var workSet = new Set([value]);\n workSet.forEach(function (obj) {\n if ((0,_objects_js__WEBPACK_IMPORTED_MODULE_0__/* .isNonNullObject */ .U)(obj) && shallowFreeze(obj) === obj) {\n Object.getOwnPropertyNames(obj).forEach(function (name) {\n if ((0,_objects_js__WEBPACK_IMPORTED_MODULE_0__/* .isNonNullObject */ .U)(obj[name]))\n workSet.add(obj[name]);\n });\n }\n });\n return value;\n}\nfunction shallowFreeze(obj) {\n if (globalThis.__DEV__ !== false && !Object.isFrozen(obj)) {\n try {\n Object.freeze(obj);\n }\n catch (e) {\n // Some types like Uint8Array and Node.js's Buffer cannot be frozen, but\n // they all throw a TypeError when you try, so we re-throw any exceptions\n // that are not TypeErrors, since that would be unexpected.\n if (e instanceof TypeError)\n return null;\n throw e;\n }\n }\n return obj;\n}\nfunction maybeDeepFreeze(obj) {\n if (globalThis.__DEV__ !== false) {\n deepFreeze(obj);\n }\n return obj;\n}\n//# sourceMappingURL=maybeDeepFreeze.js.map\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@apollo/client/utilities/common/maybeDeepFreeze.js?", + ); + + /***/ + }, + + /***/ 2922: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ D9: () => (/* binding */ mergeDeep),\n/* harmony export */ IM: () => (/* binding */ mergeDeepArray),\n/* harmony export */ ZI: () => (/* binding */ DeepMerger)\n/* harmony export */ });\n/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1635);\n/* harmony import */ var _objects_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2456);\n\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nfunction mergeDeep() {\n var sources = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n sources[_i] = arguments[_i];\n }\n return mergeDeepArray(sources);\n}\n// In almost any situation where you could succeed in getting the\n// TypeScript compiler to infer a tuple type for the sources array, you\n// could just use mergeDeep instead of mergeDeepArray, so instead of\n// trying to convert T[] to an intersection type we just infer the array\n// element type, which works perfectly when the sources array has a\n// consistent element type.\nfunction mergeDeepArray(sources) {\n var target = sources[0] || {};\n var count = sources.length;\n if (count > 1) {\n var merger = new DeepMerger();\n for (var i = 1; i < count; ++i) {\n target = merger.merge(target, sources[i]);\n }\n }\n return target;\n}\nvar defaultReconciler = function (target, source, property) {\n return this.merge(target[property], source[property]);\n};\nvar DeepMerger = /** @class */ (function () {\n function DeepMerger(reconciler) {\n if (reconciler === void 0) { reconciler = defaultReconciler; }\n this.reconciler = reconciler;\n this.isObject = _objects_js__WEBPACK_IMPORTED_MODULE_0__/* .isNonNullObject */ .U;\n this.pastCopies = new Set();\n }\n DeepMerger.prototype.merge = function (target, source) {\n var _this = this;\n var context = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n context[_i - 2] = arguments[_i];\n }\n if ((0,_objects_js__WEBPACK_IMPORTED_MODULE_0__/* .isNonNullObject */ .U)(source) && (0,_objects_js__WEBPACK_IMPORTED_MODULE_0__/* .isNonNullObject */ .U)(target)) {\n Object.keys(source).forEach(function (sourceKey) {\n if (hasOwnProperty.call(target, sourceKey)) {\n var targetValue = target[sourceKey];\n if (source[sourceKey] !== targetValue) {\n var result = _this.reconciler.apply(_this, (0,tslib__WEBPACK_IMPORTED_MODULE_1__/* .__spreadArray */ .fX)([target,\n source,\n sourceKey], context, false));\n // A well-implemented reconciler may return targetValue to indicate\n // the merge changed nothing about the structure of the target.\n if (result !== targetValue) {\n target = _this.shallowCopyForMerge(target);\n target[sourceKey] = result;\n }\n }\n }\n else {\n // If there is no collision, the target can safely share memory with\n // the source, and the recursion can terminate here.\n target = _this.shallowCopyForMerge(target);\n target[sourceKey] = source[sourceKey];\n }\n });\n return target;\n }\n // If source (or target) is not an object, let source replace target.\n return source;\n };\n DeepMerger.prototype.shallowCopyForMerge = function (value) {\n if ((0,_objects_js__WEBPACK_IMPORTED_MODULE_0__/* .isNonNullObject */ .U)(value)) {\n if (!this.pastCopies.has(value)) {\n if (Array.isArray(value)) {\n value = value.slice(0);\n }\n else {\n value = (0,tslib__WEBPACK_IMPORTED_MODULE_1__/* .__assign */ .Cl)({ __proto__: Object.getPrototypeOf(value) }, value);\n }\n this.pastCopies.add(value);\n }\n }\n return value;\n };\n return DeepMerger;\n}());\n\n//# sourceMappingURL=mergeDeep.js.map\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@apollo/client/utilities/common/mergeDeep.js?', + ); + + /***/ + }, + + /***/ 144: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ l: () => (/* binding */ mergeOptions)\n/* harmony export */ });\n/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1635);\n/* harmony import */ var _compact_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7945);\n\n\nfunction mergeOptions(defaults, options) {\n return (0,_compact_js__WEBPACK_IMPORTED_MODULE_0__/* .compact */ .o)(defaults, options, options.variables && {\n variables: (0,_compact_js__WEBPACK_IMPORTED_MODULE_0__/* .compact */ .o)((0,tslib__WEBPACK_IMPORTED_MODULE_1__/* .__assign */ .Cl)((0,tslib__WEBPACK_IMPORTED_MODULE_1__/* .__assign */ .Cl)({}, (defaults && defaults.variables)), options.variables)),\n });\n}\n//# sourceMappingURL=mergeOptions.js.map\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@apollo/client/utilities/common/mergeOptions.js?', + ); + + /***/ + }, + + /***/ 2456: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ U: () => (/* binding */ isNonNullObject)\n/* harmony export */ });\n/* unused harmony export isPlainObject */\nfunction isNonNullObject(obj) {\n return obj !== null && typeof obj === "object";\n}\nfunction isPlainObject(obj) {\n return (obj !== null &&\n typeof obj === "object" &&\n (Object.getPrototypeOf(obj) === Object.prototype ||\n Object.getPrototypeOf(obj) === null));\n}\n//# sourceMappingURL=objects.js.map\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@apollo/client/utilities/common/objects.js?', + ); + + /***/ + }, + + /***/ 6194: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ p: () => (/* binding */ stringifyForDisplay)\n/* harmony export */ });\n/* harmony import */ var _makeUniqueId_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8170);\n\nfunction stringifyForDisplay(value, space) {\n if (space === void 0) { space = 0; }\n var undefId = (0,_makeUniqueId_js__WEBPACK_IMPORTED_MODULE_0__/* .makeUniqueId */ .v)("stringifyForDisplay");\n return JSON.stringify(value, function (key, value) {\n return value === void 0 ? undefId : value;\n }, space)\n .split(JSON.stringify(undefId))\n .join("<undefined>");\n}\n//# sourceMappingURL=stringifyForDisplay.js.map\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@apollo/client/utilities/common/stringifyForDisplay.js?', + ); + + /***/ + }, + + /***/ 6319: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '\n// EXPORTS\n__webpack_require__.d(__webpack_exports__, {\n Sf: () => (/* reexport */ globals_global),\n V1: () => (/* reexport */ invariantWrappers_invariant),\n no: () => (/* reexport */ maybe),\n vA: () => (/* reexport */ newInvariantError)\n});\n\n// UNUSED EXPORTS: DEV, InvariantError, __DEV__\n\n// EXTERNAL MODULE: ./node_modules/tslib/tslib.es6.mjs\nvar tslib_es6 = __webpack_require__(1635);\n;// CONCATENATED MODULE: ./node_modules/ts-invariant/lib/invariant.js\n\nvar genericMessage = "Invariant Violation";\nvar _a = Object.setPrototypeOf, setPrototypeOf = _a === void 0 ? function (obj, proto) {\n obj.__proto__ = proto;\n return obj;\n} : _a;\nvar InvariantError = /** @class */ (function (_super) {\n (0,tslib_es6/* __extends */.C6)(InvariantError, _super);\n function InvariantError(message) {\n if (message === void 0) { message = genericMessage; }\n var _this = _super.call(this, typeof message === "number"\n ? genericMessage + ": " + message + " (see https://github.com/apollographql/invariant-packages)"\n : message) || this;\n _this.framesToPop = 1;\n _this.name = genericMessage;\n setPrototypeOf(_this, InvariantError.prototype);\n return _this;\n }\n return InvariantError;\n}(Error));\n\nfunction invariant_invariant(condition, message) {\n if (!condition) {\n throw new InvariantError(message);\n }\n}\nvar verbosityLevels = ["debug", "log", "warn", "error", "silent"];\nvar verbosityLevel = verbosityLevels.indexOf("log");\nfunction wrapConsoleMethod(name) {\n return function () {\n if (verbosityLevels.indexOf(name) >= verbosityLevel) {\n // Default to console.log if this host environment happens not to provide\n // all the console.* methods we need.\n var method = console[name] || console.log;\n return method.apply(console, arguments);\n }\n };\n}\n(function (invariant) {\n invariant.debug = wrapConsoleMethod("debug");\n invariant.log = wrapConsoleMethod("log");\n invariant.warn = wrapConsoleMethod("warn");\n invariant.error = wrapConsoleMethod("error");\n})(invariant_invariant || (invariant_invariant = {}));\nfunction setVerbosity(level) {\n var old = verbosityLevels[verbosityLevel];\n verbosityLevel = Math.max(0, verbosityLevels.indexOf(level));\n return old;\n}\n/* harmony default export */ const invariant = ((/* unused pure expression or super */ null && (invariant_invariant)));\n//# sourceMappingURL=invariant.js.map\n// EXTERNAL MODULE: ./node_modules/@apollo/client/version.js\nvar version = __webpack_require__(435);\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/utilities/globals/maybe.js\nfunction maybe(thunk) {\n try {\n return thunk();\n }\n catch (_a) { }\n}\n//# sourceMappingURL=maybe.js.map\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/utilities/globals/global.js\n\n/* harmony default export */ const globals_global = (maybe(function () { return globalThis; }) ||\n maybe(function () { return window; }) ||\n maybe(function () { return self; }) ||\n maybe(function () { return global; }) || // We don\'t expect the Function constructor ever to be invoked at runtime, as\n// long as at least one of globalThis, window, self, or global is defined, so\n// we are under no obligation to make it easy for static analysis tools to\n// detect syntactic usage of the Function constructor. If you think you can\n// improve your static analysis to detect this obfuscation, think again. This\n// is an arms race you cannot win, at least not in JavaScript.\nmaybe(function () {\n return maybe.constructor("return this")();\n}));\n//# sourceMappingURL=global.js.map\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/common/stringifyForDisplay.js\nvar stringifyForDisplay = __webpack_require__(6194);\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/utilities/globals/invariantWrappers.js\n\n\n\n\nfunction wrap(fn) {\n return function (message) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n if (typeof message === "number") {\n var arg0 = message;\n message = getHandledErrorMsg(arg0);\n if (!message) {\n message = getFallbackErrorMsg(arg0, args);\n args = [];\n }\n }\n fn.apply(void 0, [message].concat(args));\n };\n}\nvar invariantWrappers_invariant = Object.assign(function invariant(condition, message) {\n var args = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n args[_i - 2] = arguments[_i];\n }\n if (!condition) {\n invariant_invariant(condition, getHandledErrorMsg(message, args) || getFallbackErrorMsg(message, args));\n }\n}, {\n debug: wrap(invariant_invariant.debug),\n log: wrap(invariant_invariant.log),\n warn: wrap(invariant_invariant.warn),\n error: wrap(invariant_invariant.error),\n});\n/**\n * Returns an InvariantError.\n *\n * `message` can only be a string, a concatenation of strings, or a ternary statement\n * that results in a string. This will be enforced on build, where the message will\n * be replaced with a message number.\n * String substitutions with %s are supported and will also return\n * pretty-stringified objects.\n * Excess `optionalParams` will be swallowed.\n */\nfunction newInvariantError(message) {\n var optionalParams = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n optionalParams[_i - 1] = arguments[_i];\n }\n return new InvariantError(getHandledErrorMsg(message, optionalParams) ||\n getFallbackErrorMsg(message, optionalParams));\n}\nvar ApolloErrorMessageHandler = Symbol.for("ApolloErrorMessageHandler_" + version/* version */.r);\nfunction stringify(arg) {\n if (typeof arg == "string") {\n return arg;\n }\n try {\n return (0,stringifyForDisplay/* stringifyForDisplay */.p)(arg, 2).slice(0, 1000);\n }\n catch (_a) {\n return "<non-serializable>";\n }\n}\nfunction getHandledErrorMsg(message, messageArgs) {\n if (messageArgs === void 0) { messageArgs = []; }\n if (!message)\n return;\n return (globals_global[ApolloErrorMessageHandler] &&\n globals_global[ApolloErrorMessageHandler](message, messageArgs.map(stringify)));\n}\nfunction getFallbackErrorMsg(message, messageArgs) {\n if (messageArgs === void 0) { messageArgs = []; }\n if (!message)\n return;\n return "An error occurred! For more details, see the full error text at https://go.apollo.dev/c/err#".concat(encodeURIComponent(JSON.stringify({\n version: version/* version */.r,\n message: message,\n args: messageArgs.map(stringify),\n })));\n}\n\n//# sourceMappingURL=invariantWrappers.js.map\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/utilities/globals/index.js\n\n\n\n\n/**\n * @deprecated we do not use this internally anymore,\n * it is just exported for backwards compatibility\n */\n// this file is extempt from automatic `__DEV__` replacement\n// so we have to write it out here\n// @ts-ignore\nvar DEV = globalThis.__DEV__ !== false;\n\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@apollo/client/utilities/globals/index.js_+_4_modules?', + ); + + /***/ + }, + + /***/ 9993: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ c: () => (/* binding */ DocumentTransform)\n/* harmony export */ });\n/* harmony import */ var _wry_trie__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2453);\n/* harmony import */ var _common_canUse_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(2619);\n/* harmony import */ var _getFromAST_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(4824);\n/* harmony import */ var _globals_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6319);\n/* harmony import */ var _wry_caches__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(1744);\n/* harmony import */ var optimism__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1161);\n/* harmony import */ var _caching_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(1212);\n\n\n\n\n\n\n\nfunction identity(document) {\n return document;\n}\nvar DocumentTransform = /** @class */ (function () {\n function DocumentTransform(transform, options) {\n if (options === void 0) { options = Object.create(null); }\n this.resultCache = _common_canUse_js__WEBPACK_IMPORTED_MODULE_3__/* .canUseWeakSet */ .En ? new WeakSet() : new Set();\n this.transform = transform;\n if (options.getCacheKey) {\n // Override default `getCacheKey` function, which returns [document].\n this.getCacheKey = options.getCacheKey;\n }\n this.cached = options.cache !== false;\n this.resetCache();\n }\n // This default implementation of getCacheKey can be overridden by providing\n // options.getCacheKey to the DocumentTransform constructor. In general, a\n // getCacheKey function may either return an array of keys (often including\n // the document) to be used as a cache key, or undefined to indicate the\n // transform for this document should not be cached.\n DocumentTransform.prototype.getCacheKey = function (document) {\n return [document];\n };\n DocumentTransform.identity = function () {\n // No need to cache this transform since it just returns the document\n // unchanged. This should save a bit of memory that would otherwise be\n // needed to populate the `documentCache` of this transform.\n return new DocumentTransform(identity, { cache: false });\n };\n DocumentTransform.split = function (predicate, left, right) {\n if (right === void 0) { right = DocumentTransform.identity(); }\n return Object.assign(new DocumentTransform(function (document) {\n var documentTransform = predicate(document) ? left : right;\n return documentTransform.transformDocument(document);\n }, \n // Reasonably assume both `left` and `right` transforms handle their own caching\n { cache: false }), { left: left, right: right });\n };\n /**\n * Resets the internal cache of this transform, if it has one.\n */\n DocumentTransform.prototype.resetCache = function () {\n var _this = this;\n if (this.cached) {\n var stableCacheKeys_1 = new _wry_trie__WEBPACK_IMPORTED_MODULE_0__/* .Trie */ .b(_common_canUse_js__WEBPACK_IMPORTED_MODULE_3__/* .canUseWeakMap */ .et);\n this.performWork = (0,optimism__WEBPACK_IMPORTED_MODULE_2__/* .wrap */ .LV)(DocumentTransform.prototype.performWork.bind(this), {\n makeCacheKey: function (document) {\n var cacheKeys = _this.getCacheKey(document);\n if (cacheKeys) {\n (0,_globals_index_js__WEBPACK_IMPORTED_MODULE_1__/* .invariant */ .V1)(Array.isArray(cacheKeys), 67);\n return stableCacheKeys_1.lookupArray(cacheKeys);\n }\n },\n max: _caching_index_js__WEBPACK_IMPORTED_MODULE_4__/* .cacheSizes */ .v["documentTransform.cache"],\n cache: (_wry_caches__WEBPACK_IMPORTED_MODULE_5__/* .WeakCache */ .l),\n });\n }\n };\n DocumentTransform.prototype.performWork = function (document) {\n (0,_getFromAST_js__WEBPACK_IMPORTED_MODULE_6__/* .checkDocument */ .sw)(document);\n return this.transform(document);\n };\n DocumentTransform.prototype.transformDocument = function (document) {\n // If a user passes an already transformed result back to this function,\n // immediately return it.\n if (this.resultCache.has(document)) {\n return document;\n }\n var transformedDocument = this.performWork(document);\n this.resultCache.add(transformedDocument);\n return transformedDocument;\n };\n DocumentTransform.prototype.concat = function (otherTransform) {\n var _this = this;\n return Object.assign(new DocumentTransform(function (document) {\n return otherTransform.transformDocument(_this.transformDocument(document));\n }, \n // Reasonably assume both transforms handle their own caching\n { cache: false }), {\n left: this,\n right: otherTransform,\n });\n };\n return DocumentTransform;\n}());\n\n//# sourceMappingURL=DocumentTransform.js.map\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@apollo/client/utilities/graphql/DocumentTransform.js?', + ); + + /***/ + }, + + /***/ 1250: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ MS: () => (/* binding */ shouldInclude),\n/* harmony export */ d8: () => (/* binding */ hasDirectives),\n/* harmony export */ f2: () => (/* binding */ hasClientExports)\n/* harmony export */ });\n/* unused harmony exports getDirectiveNames, hasAnyDirectives, hasAllDirectives, getInclusionDirectives */\n/* harmony import */ var _globals_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6319);\n/* harmony import */ var graphql__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4705);\n\n\nfunction shouldInclude(_a, variables) {\n var directives = _a.directives;\n if (!directives || !directives.length) {\n return true;\n }\n return getInclusionDirectives(directives).every(function (_a) {\n var directive = _a.directive, ifArgument = _a.ifArgument;\n var evaledValue = false;\n if (ifArgument.value.kind === "Variable") {\n evaledValue =\n variables && variables[ifArgument.value.name.value];\n (0,_globals_index_js__WEBPACK_IMPORTED_MODULE_0__/* .invariant */ .V1)(evaledValue !== void 0, 68, directive.name.value);\n }\n else {\n evaledValue = ifArgument.value.value;\n }\n return directive.name.value === "skip" ? !evaledValue : evaledValue;\n });\n}\nfunction getDirectiveNames(root) {\n var names = [];\n visit(root, {\n Directive: function (node) {\n names.push(node.name.value);\n },\n });\n return names;\n}\nvar hasAnyDirectives = function (names, root) {\n return hasDirectives(names, root, false);\n};\nvar hasAllDirectives = function (names, root) {\n return hasDirectives(names, root, true);\n};\nfunction hasDirectives(names, root, all) {\n var nameSet = new Set(names);\n var uniqueCount = nameSet.size;\n (0,graphql__WEBPACK_IMPORTED_MODULE_1__/* .visit */ .YR)(root, {\n Directive: function (node) {\n if (nameSet.delete(node.name.value) && (!all || !nameSet.size)) {\n return graphql__WEBPACK_IMPORTED_MODULE_1__/* .BREAK */ .sP;\n }\n },\n });\n // If we found all the names, nameSet will be empty. If we only care about\n // finding some of them, the < condition is sufficient.\n return all ? !nameSet.size : nameSet.size < uniqueCount;\n}\nfunction hasClientExports(document) {\n return document && hasDirectives(["client", "export"], document, true);\n}\nfunction isInclusionDirective(_a) {\n var value = _a.name.value;\n return value === "skip" || value === "include";\n}\nfunction getInclusionDirectives(directives) {\n var result = [];\n if (directives && directives.length) {\n directives.forEach(function (directive) {\n if (!isInclusionDirective(directive))\n return;\n var directiveArguments = directive.arguments;\n var directiveName = directive.name.value;\n (0,_globals_index_js__WEBPACK_IMPORTED_MODULE_0__/* .invariant */ .V1)(directiveArguments && directiveArguments.length === 1, 69, directiveName);\n var ifArgument = directiveArguments[0];\n (0,_globals_index_js__WEBPACK_IMPORTED_MODULE_0__/* .invariant */ .V1)(ifArgument.name && ifArgument.name.value === "if", 70, directiveName);\n var ifValue = ifArgument.value;\n // means it has to be a variable value if this is a valid @skip or @include directive\n (0,_globals_index_js__WEBPACK_IMPORTED_MODULE_0__/* .invariant */ .V1)(ifValue &&\n (ifValue.kind === "Variable" || ifValue.kind === "BooleanValue"), 71, directiveName);\n result.push({ directive: directive, ifArgument: ifArgument });\n });\n }\n return result;\n}\n//# sourceMappingURL=directives.js.map\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@apollo/client/utilities/graphql/directives.js?', + ); + + /***/ + }, + + /***/ 5215: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ HQ: () => (/* binding */ getFragmentFromSelection),\n/* harmony export */ JG: () => (/* binding */ createFragmentMap),\n/* harmony export */ ct: () => (/* binding */ getFragmentQueryDocument)\n/* harmony export */ });\n/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1635);\n/* harmony import */ var _globals_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6319);\n\n\n/**\n * Returns a query document which adds a single query operation that only\n * spreads the target fragment inside of it.\n *\n * So for example a document of:\n *\n * ```graphql\n * fragment foo on Foo { a b c }\n * ```\n *\n * Turns into:\n *\n * ```graphql\n * { ...foo }\n *\n * fragment foo on Foo { a b c }\n * ```\n *\n * The target fragment will either be the only fragment in the document, or a\n * fragment specified by the provided `fragmentName`. If there is more than one\n * fragment, but a `fragmentName` was not defined then an error will be thrown.\n */\nfunction getFragmentQueryDocument(document, fragmentName) {\n var actualFragmentName = fragmentName;\n // Build an array of all our fragment definitions that will be used for\n // validations. We also do some validations on the other definitions in the\n // document while building this list.\n var fragments = [];\n document.definitions.forEach(function (definition) {\n // Throw an error if we encounter an operation definition because we will\n // define our own operation definition later on.\n if (definition.kind === "OperationDefinition") {\n throw (0,_globals_index_js__WEBPACK_IMPORTED_MODULE_0__/* .newInvariantError */ .vA)(\n 72,\n definition.operation,\n definition.name ? " named \'".concat(definition.name.value, "\'") : ""\n );\n }\n // Add our definition to the fragments array if it is a fragment\n // definition.\n if (definition.kind === "FragmentDefinition") {\n fragments.push(definition);\n }\n });\n // If the user did not give us a fragment name then let us try to get a\n // name from a single fragment in the definition.\n if (typeof actualFragmentName === "undefined") {\n (0,_globals_index_js__WEBPACK_IMPORTED_MODULE_0__/* .invariant */ .V1)(fragments.length === 1, 73, fragments.length);\n actualFragmentName = fragments[0].name.value;\n }\n // Generate a query document with an operation that simply spreads the\n // fragment inside of it.\n var query = (0,tslib__WEBPACK_IMPORTED_MODULE_1__/* .__assign */ .Cl)((0,tslib__WEBPACK_IMPORTED_MODULE_1__/* .__assign */ .Cl)({}, document), { definitions: (0,tslib__WEBPACK_IMPORTED_MODULE_1__/* .__spreadArray */ .fX)([\n {\n kind: "OperationDefinition",\n // OperationTypeNode is an enum\n operation: "query",\n selectionSet: {\n kind: "SelectionSet",\n selections: [\n {\n kind: "FragmentSpread",\n name: {\n kind: "Name",\n value: actualFragmentName,\n },\n },\n ],\n },\n }\n ], document.definitions, true) });\n return query;\n}\n// Utility function that takes a list of fragment definitions and makes a hash out of them\n// that maps the name of the fragment to the fragment definition.\nfunction createFragmentMap(fragments) {\n if (fragments === void 0) { fragments = []; }\n var symTable = {};\n fragments.forEach(function (fragment) {\n symTable[fragment.name.value] = fragment;\n });\n return symTable;\n}\nfunction getFragmentFromSelection(selection, fragmentMap) {\n switch (selection.kind) {\n case "InlineFragment":\n return selection;\n case "FragmentSpread": {\n var fragmentName = selection.name.value;\n if (typeof fragmentMap === "function") {\n return fragmentMap(fragmentName);\n }\n var fragment = fragmentMap && fragmentMap[fragmentName];\n (0,_globals_index_js__WEBPACK_IMPORTED_MODULE_0__/* .invariant */ .V1)(fragment, 74, fragmentName);\n return fragment || null;\n }\n default:\n return null;\n }\n}\n//# sourceMappingURL=fragments.js.map\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@apollo/client/utilities/graphql/fragments.js?', + ); + + /***/ + }, + + /***/ 4824: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ AT: () => (/* binding */ getQueryDefinition),\n/* harmony export */ E4: () => (/* binding */ getFragmentDefinition),\n/* harmony export */ Vn: () => (/* binding */ getMainDefinition),\n/* harmony export */ Vu: () => (/* binding */ getOperationDefinition),\n/* harmony export */ n4: () => (/* binding */ getOperationName),\n/* harmony export */ sw: () => (/* binding */ checkDocument),\n/* harmony export */ wY: () => (/* binding */ getDefaultValues),\n/* harmony export */ zK: () => (/* binding */ getFragmentDefinitions)\n/* harmony export */ });\n/* harmony import */ var _globals_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6319);\n/* harmony import */ var _storeUtils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7194);\n\n\n// Checks the document for errors and throws an exception if there is an error.\nfunction checkDocument(doc) {\n (0,_globals_index_js__WEBPACK_IMPORTED_MODULE_0__/* .invariant */ .V1)(doc && doc.kind === "Document", 75);\n var operations = doc.definitions\n .filter(function (d) { return d.kind !== "FragmentDefinition"; })\n .map(function (definition) {\n if (definition.kind !== "OperationDefinition") {\n throw (0,_globals_index_js__WEBPACK_IMPORTED_MODULE_0__/* .newInvariantError */ .vA)(76, definition.kind);\n }\n return definition;\n });\n (0,_globals_index_js__WEBPACK_IMPORTED_MODULE_0__/* .invariant */ .V1)(operations.length <= 1, 77, operations.length);\n return doc;\n}\nfunction getOperationDefinition(doc) {\n checkDocument(doc);\n return doc.definitions.filter(function (definition) {\n return definition.kind === "OperationDefinition";\n })[0];\n}\nfunction getOperationName(doc) {\n return (doc.definitions\n .filter(function (definition) {\n return definition.kind === "OperationDefinition" && !!definition.name;\n })\n .map(function (x) { return x.name.value; })[0] || null);\n}\n// Returns the FragmentDefinitions from a particular document as an array\nfunction getFragmentDefinitions(doc) {\n return doc.definitions.filter(function (definition) {\n return definition.kind === "FragmentDefinition";\n });\n}\nfunction getQueryDefinition(doc) {\n var queryDef = getOperationDefinition(doc);\n (0,_globals_index_js__WEBPACK_IMPORTED_MODULE_0__/* .invariant */ .V1)(queryDef && queryDef.operation === "query", 78);\n return queryDef;\n}\nfunction getFragmentDefinition(doc) {\n (0,_globals_index_js__WEBPACK_IMPORTED_MODULE_0__/* .invariant */ .V1)(doc.kind === "Document", 79);\n (0,_globals_index_js__WEBPACK_IMPORTED_MODULE_0__/* .invariant */ .V1)(doc.definitions.length <= 1, 80);\n var fragmentDef = doc.definitions[0];\n (0,_globals_index_js__WEBPACK_IMPORTED_MODULE_0__/* .invariant */ .V1)(fragmentDef.kind === "FragmentDefinition", 81);\n return fragmentDef;\n}\n/**\n * Returns the first operation definition found in this document.\n * If no operation definition is found, the first fragment definition will be returned.\n * If no definitions are found, an error will be thrown.\n */\nfunction getMainDefinition(queryDoc) {\n checkDocument(queryDoc);\n var fragmentDefinition;\n for (var _i = 0, _a = queryDoc.definitions; _i < _a.length; _i++) {\n var definition = _a[_i];\n if (definition.kind === "OperationDefinition") {\n var operation = definition.operation;\n if (operation === "query" ||\n operation === "mutation" ||\n operation === "subscription") {\n return definition;\n }\n }\n if (definition.kind === "FragmentDefinition" && !fragmentDefinition) {\n // we do this because we want to allow multiple fragment definitions\n // to precede an operation definition.\n fragmentDefinition = definition;\n }\n }\n if (fragmentDefinition) {\n return fragmentDefinition;\n }\n throw (0,_globals_index_js__WEBPACK_IMPORTED_MODULE_0__/* .newInvariantError */ .vA)(82);\n}\nfunction getDefaultValues(definition) {\n var defaultValues = Object.create(null);\n var defs = definition && definition.variableDefinitions;\n if (defs && defs.length) {\n defs.forEach(function (def) {\n if (def.defaultValue) {\n (0,_storeUtils_js__WEBPACK_IMPORTED_MODULE_1__/* .valueToObjectRepresentation */ .J)(defaultValues, def.variable.name, def.defaultValue);\n }\n });\n }\n return defaultValues;\n}\n//# sourceMappingURL=getFromAST.js.map\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@apollo/client/utilities/graphql/getFromAST.js?', + ); + + /***/ + }, + + /***/ 2417: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + "\n// EXPORTS\n__webpack_require__.d(__webpack_exports__, {\n y: () => (/* binding */ print_print)\n});\n\n// EXTERNAL MODULE: ./node_modules/graphql/language/blockString.mjs\nvar blockString = __webpack_require__(5995);\n;// CONCATENATED MODULE: ./node_modules/graphql/language/printString.mjs\n/**\n * Prints a string as a GraphQL StringValue literal. Replaces control characters\n * and excluded characters (\" U+0022 and \\\\ U+005C) with escape sequences.\n */\nfunction printString(str) {\n return `\"${str.replace(escapedRegExp, escapedReplacer)}\"`;\n} // eslint-disable-next-line no-control-regex\n\nconst escapedRegExp = /[\\x00-\\x1f\\x22\\x5c\\x7f-\\x9f]/g;\n\nfunction escapedReplacer(str) {\n return escapeSequences[str.charCodeAt(0)];\n} // prettier-ignore\n\nconst escapeSequences = [\n '\\\\u0000',\n '\\\\u0001',\n '\\\\u0002',\n '\\\\u0003',\n '\\\\u0004',\n '\\\\u0005',\n '\\\\u0006',\n '\\\\u0007',\n '\\\\b',\n '\\\\t',\n '\\\\n',\n '\\\\u000B',\n '\\\\f',\n '\\\\r',\n '\\\\u000E',\n '\\\\u000F',\n '\\\\u0010',\n '\\\\u0011',\n '\\\\u0012',\n '\\\\u0013',\n '\\\\u0014',\n '\\\\u0015',\n '\\\\u0016',\n '\\\\u0017',\n '\\\\u0018',\n '\\\\u0019',\n '\\\\u001A',\n '\\\\u001B',\n '\\\\u001C',\n '\\\\u001D',\n '\\\\u001E',\n '\\\\u001F',\n '',\n '',\n '\\\\\"',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '', // 2F\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '', // 3F\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '', // 4F\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '\\\\\\\\',\n '',\n '',\n '', // 5F\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '', // 6F\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '\\\\u007F',\n '\\\\u0080',\n '\\\\u0081',\n '\\\\u0082',\n '\\\\u0083',\n '\\\\u0084',\n '\\\\u0085',\n '\\\\u0086',\n '\\\\u0087',\n '\\\\u0088',\n '\\\\u0089',\n '\\\\u008A',\n '\\\\u008B',\n '\\\\u008C',\n '\\\\u008D',\n '\\\\u008E',\n '\\\\u008F',\n '\\\\u0090',\n '\\\\u0091',\n '\\\\u0092',\n '\\\\u0093',\n '\\\\u0094',\n '\\\\u0095',\n '\\\\u0096',\n '\\\\u0097',\n '\\\\u0098',\n '\\\\u0099',\n '\\\\u009A',\n '\\\\u009B',\n '\\\\u009C',\n '\\\\u009D',\n '\\\\u009E',\n '\\\\u009F',\n];\n\n// EXTERNAL MODULE: ./node_modules/graphql/language/visitor.mjs\nvar visitor = __webpack_require__(4705);\n;// CONCATENATED MODULE: ./node_modules/graphql/language/printer.mjs\n\n\n\n/**\n * Converts an AST into a string, using one set of reasonable\n * formatting rules.\n */\n\nfunction print(ast) {\n return (0,visitor/* visit */.YR)(ast, printDocASTReducer);\n}\nconst MAX_LINE_LENGTH = 80;\nconst printDocASTReducer = {\n Name: {\n leave: (node) => node.value,\n },\n Variable: {\n leave: (node) => '$' + node.name,\n },\n // Document\n Document: {\n leave: (node) => join(node.definitions, '\\n\\n'),\n },\n OperationDefinition: {\n leave(node) {\n const varDefs = wrap('(', join(node.variableDefinitions, ', '), ')');\n const prefix = join(\n [\n node.operation,\n join([node.name, varDefs]),\n join(node.directives, ' '),\n ],\n ' ',\n ); // Anonymous queries with no directives or variable definitions can use\n // the query short form.\n\n return (prefix === 'query' ? '' : prefix + ' ') + node.selectionSet;\n },\n },\n VariableDefinition: {\n leave: ({ variable, type, defaultValue, directives }) =>\n variable +\n ': ' +\n type +\n wrap(' = ', defaultValue) +\n wrap(' ', join(directives, ' ')),\n },\n SelectionSet: {\n leave: ({ selections }) => block(selections),\n },\n Field: {\n leave({ alias, name, arguments: args, directives, selectionSet }) {\n const prefix = wrap('', alias, ': ') + name;\n let argsLine = prefix + wrap('(', join(args, ', '), ')');\n\n if (argsLine.length > MAX_LINE_LENGTH) {\n argsLine = prefix + wrap('(\\n', indent(join(args, '\\n')), '\\n)');\n }\n\n return join([argsLine, join(directives, ' '), selectionSet], ' ');\n },\n },\n Argument: {\n leave: ({ name, value }) => name + ': ' + value,\n },\n // Fragments\n FragmentSpread: {\n leave: ({ name, directives }) =>\n '...' + name + wrap(' ', join(directives, ' ')),\n },\n InlineFragment: {\n leave: ({ typeCondition, directives, selectionSet }) =>\n join(\n [\n '...',\n wrap('on ', typeCondition),\n join(directives, ' '),\n selectionSet,\n ],\n ' ',\n ),\n },\n FragmentDefinition: {\n leave: (\n { name, typeCondition, variableDefinitions, directives, selectionSet }, // Note: fragment variable definitions are experimental and may be changed\n ) =>\n // or removed in the future.\n `fragment ${name}${wrap('(', join(variableDefinitions, ', '), ')')} ` +\n `on ${typeCondition} ${wrap('', join(directives, ' '), ' ')}` +\n selectionSet,\n },\n // Value\n IntValue: {\n leave: ({ value }) => value,\n },\n FloatValue: {\n leave: ({ value }) => value,\n },\n StringValue: {\n leave: ({ value, block: isBlockString }) =>\n isBlockString ? (0,blockString/* printBlockString */.yo)(value) : printString(value),\n },\n BooleanValue: {\n leave: ({ value }) => (value ? 'true' : 'false'),\n },\n NullValue: {\n leave: () => 'null',\n },\n EnumValue: {\n leave: ({ value }) => value,\n },\n ListValue: {\n leave: ({ values }) => '[' + join(values, ', ') + ']',\n },\n ObjectValue: {\n leave: ({ fields }) => '{' + join(fields, ', ') + '}',\n },\n ObjectField: {\n leave: ({ name, value }) => name + ': ' + value,\n },\n // Directive\n Directive: {\n leave: ({ name, arguments: args }) =>\n '@' + name + wrap('(', join(args, ', '), ')'),\n },\n // Type\n NamedType: {\n leave: ({ name }) => name,\n },\n ListType: {\n leave: ({ type }) => '[' + type + ']',\n },\n NonNullType: {\n leave: ({ type }) => type + '!',\n },\n // Type System Definitions\n SchemaDefinition: {\n leave: ({ description, directives, operationTypes }) =>\n wrap('', description, '\\n') +\n join(['schema', join(directives, ' '), block(operationTypes)], ' '),\n },\n OperationTypeDefinition: {\n leave: ({ operation, type }) => operation + ': ' + type,\n },\n ScalarTypeDefinition: {\n leave: ({ description, name, directives }) =>\n wrap('', description, '\\n') +\n join(['scalar', name, join(directives, ' ')], ' '),\n },\n ObjectTypeDefinition: {\n leave: ({ description, name, interfaces, directives, fields }) =>\n wrap('', description, '\\n') +\n join(\n [\n 'type',\n name,\n wrap('implements ', join(interfaces, ' & ')),\n join(directives, ' '),\n block(fields),\n ],\n ' ',\n ),\n },\n FieldDefinition: {\n leave: ({ description, name, arguments: args, type, directives }) =>\n wrap('', description, '\\n') +\n name +\n (hasMultilineItems(args)\n ? wrap('(\\n', indent(join(args, '\\n')), '\\n)')\n : wrap('(', join(args, ', '), ')')) +\n ': ' +\n type +\n wrap(' ', join(directives, ' ')),\n },\n InputValueDefinition: {\n leave: ({ description, name, type, defaultValue, directives }) =>\n wrap('', description, '\\n') +\n join(\n [name + ': ' + type, wrap('= ', defaultValue), join(directives, ' ')],\n ' ',\n ),\n },\n InterfaceTypeDefinition: {\n leave: ({ description, name, interfaces, directives, fields }) =>\n wrap('', description, '\\n') +\n join(\n [\n 'interface',\n name,\n wrap('implements ', join(interfaces, ' & ')),\n join(directives, ' '),\n block(fields),\n ],\n ' ',\n ),\n },\n UnionTypeDefinition: {\n leave: ({ description, name, directives, types }) =>\n wrap('', description, '\\n') +\n join(\n ['union', name, join(directives, ' '), wrap('= ', join(types, ' | '))],\n ' ',\n ),\n },\n EnumTypeDefinition: {\n leave: ({ description, name, directives, values }) =>\n wrap('', description, '\\n') +\n join(['enum', name, join(directives, ' '), block(values)], ' '),\n },\n EnumValueDefinition: {\n leave: ({ description, name, directives }) =>\n wrap('', description, '\\n') + join([name, join(directives, ' ')], ' '),\n },\n InputObjectTypeDefinition: {\n leave: ({ description, name, directives, fields }) =>\n wrap('', description, '\\n') +\n join(['input', name, join(directives, ' '), block(fields)], ' '),\n },\n DirectiveDefinition: {\n leave: ({ description, name, arguments: args, repeatable, locations }) =>\n wrap('', description, '\\n') +\n 'directive @' +\n name +\n (hasMultilineItems(args)\n ? wrap('(\\n', indent(join(args, '\\n')), '\\n)')\n : wrap('(', join(args, ', '), ')')) +\n (repeatable ? ' repeatable' : '') +\n ' on ' +\n join(locations, ' | '),\n },\n SchemaExtension: {\n leave: ({ directives, operationTypes }) =>\n join(\n ['extend schema', join(directives, ' '), block(operationTypes)],\n ' ',\n ),\n },\n ScalarTypeExtension: {\n leave: ({ name, directives }) =>\n join(['extend scalar', name, join(directives, ' ')], ' '),\n },\n ObjectTypeExtension: {\n leave: ({ name, interfaces, directives, fields }) =>\n join(\n [\n 'extend type',\n name,\n wrap('implements ', join(interfaces, ' & ')),\n join(directives, ' '),\n block(fields),\n ],\n ' ',\n ),\n },\n InterfaceTypeExtension: {\n leave: ({ name, interfaces, directives, fields }) =>\n join(\n [\n 'extend interface',\n name,\n wrap('implements ', join(interfaces, ' & ')),\n join(directives, ' '),\n block(fields),\n ],\n ' ',\n ),\n },\n UnionTypeExtension: {\n leave: ({ name, directives, types }) =>\n join(\n [\n 'extend union',\n name,\n join(directives, ' '),\n wrap('= ', join(types, ' | ')),\n ],\n ' ',\n ),\n },\n EnumTypeExtension: {\n leave: ({ name, directives, values }) =>\n join(['extend enum', name, join(directives, ' '), block(values)], ' '),\n },\n InputObjectTypeExtension: {\n leave: ({ name, directives, fields }) =>\n join(['extend input', name, join(directives, ' '), block(fields)], ' '),\n },\n};\n/**\n * Given maybeArray, print an empty string if it is null or empty, otherwise\n * print all items together separated by separator if provided\n */\n\nfunction join(maybeArray, separator = '') {\n var _maybeArray$filter$jo;\n\n return (_maybeArray$filter$jo =\n maybeArray === null || maybeArray === void 0\n ? void 0\n : maybeArray.filter((x) => x).join(separator)) !== null &&\n _maybeArray$filter$jo !== void 0\n ? _maybeArray$filter$jo\n : '';\n}\n/**\n * Given array, print each item on its own line, wrapped in an indented `{ }` block.\n */\n\nfunction block(array) {\n return wrap('{\\n', indent(join(array, '\\n')), '\\n}');\n}\n/**\n * If maybeString is not null or empty, then wrap with start and end, otherwise print an empty string.\n */\n\nfunction wrap(start, maybeString, end = '') {\n return maybeString != null && maybeString !== ''\n ? start + maybeString + end\n : '';\n}\n\nfunction indent(str) {\n return wrap(' ', str.replace(/\\n/g, '\\n '));\n}\n\nfunction hasMultilineItems(maybeArray) {\n var _maybeArray$some;\n\n // FIXME: https://github.com/graphql/graphql-js/issues/2203\n\n /* c8 ignore next */\n return (_maybeArray$some =\n maybeArray === null || maybeArray === void 0\n ? void 0\n : maybeArray.some((str) => str.includes('\\n'))) !== null &&\n _maybeArray$some !== void 0\n ? _maybeArray$some\n : false;\n}\n\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/caching/caches.js\nvar caches = __webpack_require__(599);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/caching/sizes.js\nvar sizes = __webpack_require__(1212);\n// EXTERNAL MODULE: ./node_modules/@apollo/client/utilities/caching/getMemoryInternals.js\nvar getMemoryInternals = __webpack_require__(5051);\n;// CONCATENATED MODULE: ./node_modules/@apollo/client/utilities/graphql/print.js\n\n\n\nvar printCache;\nvar print_print = Object.assign(function (ast) {\n var result = printCache.get(ast);\n if (!result) {\n result = print(ast);\n printCache.set(ast, result);\n }\n return result;\n}, {\n reset: function () {\n printCache = new caches/* AutoCleanedWeakCache */.A(sizes/* cacheSizes */.v.print || 2000 /* defaultCacheSizes.print */);\n },\n});\nprint_print.reset();\nif (globalThis.__DEV__ !== false) {\n (0,getMemoryInternals/* registerGlobalCache */.D_)(\"print\", function () { return (printCache ? printCache.size : 0); });\n}\n//# sourceMappingURL=print.js.map\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@apollo/client/utilities/graphql/print.js_+_2_modules?", + ); + + /***/ + }, + + /***/ 7194: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ A_: () => (/* binding */ isReference),\n/* harmony export */ D$: () => (/* binding */ getTypenameFromResult),\n/* harmony export */ Ii: () => (/* binding */ storeKeyNameFromField),\n/* harmony export */ J: () => (/* binding */ valueToObjectRepresentation),\n/* harmony export */ Kc: () => (/* binding */ isDocumentNode),\n/* harmony export */ MB: () => (/* binding */ argumentsObjectFromField),\n/* harmony export */ WU: () => (/* binding */ makeReference),\n/* harmony export */ dt: () => (/* binding */ isField),\n/* harmony export */ kd: () => (/* binding */ isInlineFragment),\n/* harmony export */ o5: () => (/* binding */ getStoreKeyName),\n/* harmony export */ ue: () => (/* binding */ resultKeyNameFromField)\n/* harmony export */ });\n/* harmony import */ var _globals_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6319);\n/* harmony import */ var _common_objects_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2456);\n/* harmony import */ var _fragments_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(5215);\n/* harmony import */ var _common_canonicalStringify_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6269);\n\n\n\n\nfunction makeReference(id) {\n return { __ref: String(id) };\n}\nfunction isReference(obj) {\n return Boolean(obj && typeof obj === "object" && typeof obj.__ref === "string");\n}\nfunction isDocumentNode(value) {\n return ((0,_common_objects_js__WEBPACK_IMPORTED_MODULE_1__/* .isNonNullObject */ .U)(value) &&\n value.kind === "Document" &&\n Array.isArray(value.definitions));\n}\nfunction isStringValue(value) {\n return value.kind === "StringValue";\n}\nfunction isBooleanValue(value) {\n return value.kind === "BooleanValue";\n}\nfunction isIntValue(value) {\n return value.kind === "IntValue";\n}\nfunction isFloatValue(value) {\n return value.kind === "FloatValue";\n}\nfunction isVariable(value) {\n return value.kind === "Variable";\n}\nfunction isObjectValue(value) {\n return value.kind === "ObjectValue";\n}\nfunction isListValue(value) {\n return value.kind === "ListValue";\n}\nfunction isEnumValue(value) {\n return value.kind === "EnumValue";\n}\nfunction isNullValue(value) {\n return value.kind === "NullValue";\n}\nfunction valueToObjectRepresentation(argObj, name, value, variables) {\n if (isIntValue(value) || isFloatValue(value)) {\n argObj[name.value] = Number(value.value);\n }\n else if (isBooleanValue(value) || isStringValue(value)) {\n argObj[name.value] = value.value;\n }\n else if (isObjectValue(value)) {\n var nestedArgObj_1 = {};\n value.fields.map(function (obj) {\n return valueToObjectRepresentation(nestedArgObj_1, obj.name, obj.value, variables);\n });\n argObj[name.value] = nestedArgObj_1;\n }\n else if (isVariable(value)) {\n var variableValue = (variables || {})[value.name.value];\n argObj[name.value] = variableValue;\n }\n else if (isListValue(value)) {\n argObj[name.value] = value.values.map(function (listValue) {\n var nestedArgArrayObj = {};\n valueToObjectRepresentation(nestedArgArrayObj, name, listValue, variables);\n return nestedArgArrayObj[name.value];\n });\n }\n else if (isEnumValue(value)) {\n argObj[name.value] = value.value;\n }\n else if (isNullValue(value)) {\n argObj[name.value] = null;\n }\n else {\n throw (0,_globals_index_js__WEBPACK_IMPORTED_MODULE_0__/* .newInvariantError */ .vA)(83, name.value, value.kind);\n }\n}\nfunction storeKeyNameFromField(field, variables) {\n var directivesObj = null;\n if (field.directives) {\n directivesObj = {};\n field.directives.forEach(function (directive) {\n directivesObj[directive.name.value] = {};\n if (directive.arguments) {\n directive.arguments.forEach(function (_a) {\n var name = _a.name, value = _a.value;\n return valueToObjectRepresentation(directivesObj[directive.name.value], name, value, variables);\n });\n }\n });\n }\n var argObj = null;\n if (field.arguments && field.arguments.length) {\n argObj = {};\n field.arguments.forEach(function (_a) {\n var name = _a.name, value = _a.value;\n return valueToObjectRepresentation(argObj, name, value, variables);\n });\n }\n return getStoreKeyName(field.name.value, argObj, directivesObj);\n}\nvar KNOWN_DIRECTIVES = [\n "connection",\n "include",\n "skip",\n "client",\n "rest",\n "export",\n "nonreactive",\n];\n// Default stable JSON.stringify implementation used by getStoreKeyName. Can be\n// updated/replaced with something better by calling\n// getStoreKeyName.setStringify(newStringifyFunction).\nvar storeKeyNameStringify = _common_canonicalStringify_js__WEBPACK_IMPORTED_MODULE_2__/* .canonicalStringify */ .M;\nvar getStoreKeyName = Object.assign(function (fieldName, args, directives) {\n if (args &&\n directives &&\n directives["connection"] &&\n directives["connection"]["key"]) {\n if (directives["connection"]["filter"] &&\n directives["connection"]["filter"].length > 0) {\n var filterKeys = directives["connection"]["filter"] ?\n directives["connection"]["filter"]\n : [];\n filterKeys.sort();\n var filteredArgs_1 = {};\n filterKeys.forEach(function (key) {\n filteredArgs_1[key] = args[key];\n });\n return "".concat(directives["connection"]["key"], "(").concat(storeKeyNameStringify(filteredArgs_1), ")");\n }\n else {\n return directives["connection"]["key"];\n }\n }\n var completeFieldName = fieldName;\n if (args) {\n // We can\'t use `JSON.stringify` here since it\'s non-deterministic,\n // and can lead to different store key names being created even though\n // the `args` object used during creation has the same properties/values.\n var stringifiedArgs = storeKeyNameStringify(args);\n completeFieldName += "(".concat(stringifiedArgs, ")");\n }\n if (directives) {\n Object.keys(directives).forEach(function (key) {\n if (KNOWN_DIRECTIVES.indexOf(key) !== -1)\n return;\n if (directives[key] && Object.keys(directives[key]).length) {\n completeFieldName += "@".concat(key, "(").concat(storeKeyNameStringify(directives[key]), ")");\n }\n else {\n completeFieldName += "@".concat(key);\n }\n });\n }\n return completeFieldName;\n}, {\n setStringify: function (s) {\n var previous = storeKeyNameStringify;\n storeKeyNameStringify = s;\n return previous;\n },\n});\nfunction argumentsObjectFromField(field, variables) {\n if (field.arguments && field.arguments.length) {\n var argObj_1 = {};\n field.arguments.forEach(function (_a) {\n var name = _a.name, value = _a.value;\n return valueToObjectRepresentation(argObj_1, name, value, variables);\n });\n return argObj_1;\n }\n return null;\n}\nfunction resultKeyNameFromField(field) {\n return field.alias ? field.alias.value : field.name.value;\n}\nfunction getTypenameFromResult(result, selectionSet, fragmentMap) {\n var fragments;\n for (var _i = 0, _a = selectionSet.selections; _i < _a.length; _i++) {\n var selection = _a[_i];\n if (isField(selection)) {\n if (selection.name.value === "__typename") {\n return result[resultKeyNameFromField(selection)];\n }\n }\n else if (fragments) {\n fragments.push(selection);\n }\n else {\n fragments = [selection];\n }\n }\n if (typeof result.__typename === "string") {\n return result.__typename;\n }\n if (fragments) {\n for (var _b = 0, fragments_1 = fragments; _b < fragments_1.length; _b++) {\n var selection = fragments_1[_b];\n var typename = getTypenameFromResult(result, (0,_fragments_js__WEBPACK_IMPORTED_MODULE_3__/* .getFragmentFromSelection */ .HQ)(selection, fragmentMap).selectionSet, fragmentMap);\n if (typeof typename === "string") {\n return typename;\n }\n }\n }\n}\nfunction isField(selection) {\n return selection.kind === "Field";\n}\nfunction isInlineFragment(selection) {\n return selection.kind === "InlineFragment";\n}\n//# sourceMappingURL=storeUtils.js.map\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@apollo/client/utilities/graphql/storeUtils.js?', + ); + + /***/ + }, + + /***/ 3902: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ XY: () => (/* binding */ addTypenameToDocument),\n/* harmony export */ er: () => (/* binding */ removeClientSetsFromDocument),\n/* harmony export */ iz: () => (/* binding */ removeDirectivesFromDocument),\n/* harmony export */ zc: () => (/* binding */ buildQueryFromSelectionSet)\n/* harmony export */ });\n/* unused harmony exports removeConnectionDirectiveFromDocument, removeArgumentsFromDocument, removeFragmentSpreadFromDocument */\n/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(1635);\n/* harmony import */ var _globals_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6319);\n/* harmony import */ var graphql__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3298);\n/* harmony import */ var graphql__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(4705);\n/* harmony import */ var _getFromAST_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4824);\n/* harmony import */ var _storeUtils_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(7194);\n/* harmony import */ var _fragments_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(5215);\n/* harmony import */ var _common_arrays_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(5636);\n\n\n\n\n\n\n\nvar TYPENAME_FIELD = {\n kind: graphql__WEBPACK_IMPORTED_MODULE_1__/* .Kind */ .b.FIELD,\n name: {\n kind: graphql__WEBPACK_IMPORTED_MODULE_1__/* .Kind */ .b.NAME,\n value: "__typename",\n },\n};\nfunction isEmpty(op, fragmentMap) {\n return (!op ||\n op.selectionSet.selections.every(function (selection) {\n return selection.kind === graphql__WEBPACK_IMPORTED_MODULE_1__/* .Kind */ .b.FRAGMENT_SPREAD &&\n isEmpty(fragmentMap[selection.name.value], fragmentMap);\n }));\n}\nfunction nullIfDocIsEmpty(doc) {\n return (isEmpty((0,_getFromAST_js__WEBPACK_IMPORTED_MODULE_2__/* .getOperationDefinition */ .Vu)(doc) || (0,_getFromAST_js__WEBPACK_IMPORTED_MODULE_2__/* .getFragmentDefinition */ .E4)(doc), (0,_fragments_js__WEBPACK_IMPORTED_MODULE_3__/* .createFragmentMap */ .JG)((0,_getFromAST_js__WEBPACK_IMPORTED_MODULE_2__/* .getFragmentDefinitions */ .zK)(doc)))) ?\n null\n : doc;\n}\nfunction getDirectiveMatcher(configs) {\n var names = new Map();\n var tests = new Map();\n configs.forEach(function (directive) {\n if (directive) {\n if (directive.name) {\n names.set(directive.name, directive);\n }\n else if (directive.test) {\n tests.set(directive.test, directive);\n }\n }\n });\n return function (directive) {\n var config = names.get(directive.name.value);\n if (!config && tests.size) {\n tests.forEach(function (testConfig, test) {\n if (test(directive)) {\n config = testConfig;\n }\n });\n }\n return config;\n };\n}\nfunction makeInUseGetterFunction(defaultKey) {\n var map = new Map();\n return function inUseGetterFunction(key) {\n if (key === void 0) { key = defaultKey; }\n var inUse = map.get(key);\n if (!inUse) {\n map.set(key, (inUse = {\n // Variable and fragment spread names used directly within this\n // operation or fragment definition, as identified by key. These sets\n // will be populated during the first traversal of the document in\n // removeDirectivesFromDocument below.\n variables: new Set(),\n fragmentSpreads: new Set(),\n }));\n }\n return inUse;\n };\n}\nfunction removeDirectivesFromDocument(directives, doc) {\n (0,_getFromAST_js__WEBPACK_IMPORTED_MODULE_2__/* .checkDocument */ .sw)(doc);\n // Passing empty strings to makeInUseGetterFunction means we handle anonymous\n // operations as if their names were "". Anonymous fragment definitions are\n // not supposed to be possible, but the same default naming strategy seems\n // appropriate for that case as well.\n var getInUseByOperationName = makeInUseGetterFunction("");\n var getInUseByFragmentName = makeInUseGetterFunction("");\n var getInUse = function (ancestors) {\n for (var p = 0, ancestor = void 0; p < ancestors.length && (ancestor = ancestors[p]); ++p) {\n if ((0,_common_arrays_js__WEBPACK_IMPORTED_MODULE_4__/* .isArray */ .c)(ancestor))\n continue;\n if (ancestor.kind === graphql__WEBPACK_IMPORTED_MODULE_1__/* .Kind */ .b.OPERATION_DEFINITION) {\n // If an operation is anonymous, we use the empty string as its key.\n return getInUseByOperationName(ancestor.name && ancestor.name.value);\n }\n if (ancestor.kind === graphql__WEBPACK_IMPORTED_MODULE_1__/* .Kind */ .b.FRAGMENT_DEFINITION) {\n return getInUseByFragmentName(ancestor.name.value);\n }\n }\n globalThis.__DEV__ !== false && _globals_index_js__WEBPACK_IMPORTED_MODULE_0__/* .invariant */ .V1.error(84);\n return null;\n };\n var operationCount = 0;\n for (var i = doc.definitions.length - 1; i >= 0; --i) {\n if (doc.definitions[i].kind === graphql__WEBPACK_IMPORTED_MODULE_1__/* .Kind */ .b.OPERATION_DEFINITION) {\n ++operationCount;\n }\n }\n var directiveMatcher = getDirectiveMatcher(directives);\n var shouldRemoveField = function (nodeDirectives) {\n return (0,_common_arrays_js__WEBPACK_IMPORTED_MODULE_4__/* .isNonEmptyArray */ .E)(nodeDirectives) &&\n nodeDirectives\n .map(directiveMatcher)\n .some(function (config) { return config && config.remove; });\n };\n var originalFragmentDefsByPath = new Map();\n // Any time the first traversal of the document below makes a change like\n // removing a fragment (by returning null), this variable should be set to\n // true. Once it becomes true, it should never be set to false again. If this\n // variable remains false throughout the traversal, then we can return the\n // original doc immediately without any modifications.\n var firstVisitMadeChanges = false;\n var fieldOrInlineFragmentVisitor = {\n enter: function (node) {\n if (shouldRemoveField(node.directives)) {\n firstVisitMadeChanges = true;\n return null;\n }\n },\n };\n var docWithoutDirectiveSubtrees = (0,graphql__WEBPACK_IMPORTED_MODULE_5__/* .visit */ .YR)(doc, {\n // These two AST node types share the same implementation, defined above.\n Field: fieldOrInlineFragmentVisitor,\n InlineFragment: fieldOrInlineFragmentVisitor,\n VariableDefinition: {\n enter: function () {\n // VariableDefinition nodes do not count as variables in use, though\n // they do contain Variable nodes that might be visited below. To avoid\n // counting variable declarations as usages, we skip visiting the\n // contents of this VariableDefinition node by returning false.\n return false;\n },\n },\n Variable: {\n enter: function (node, _key, _parent, _path, ancestors) {\n var inUse = getInUse(ancestors);\n if (inUse) {\n inUse.variables.add(node.name.value);\n }\n },\n },\n FragmentSpread: {\n enter: function (node, _key, _parent, _path, ancestors) {\n if (shouldRemoveField(node.directives)) {\n firstVisitMadeChanges = true;\n return null;\n }\n var inUse = getInUse(ancestors);\n if (inUse) {\n inUse.fragmentSpreads.add(node.name.value);\n }\n // We might like to remove this FragmentSpread by returning null here if\n // the corresponding FragmentDefinition node is also going to be removed\n // by the logic below, but we can\'t control the relative order of those\n // events, so we have to postpone the removal of dangling FragmentSpread\n // nodes until after the current visit of the document has finished.\n },\n },\n FragmentDefinition: {\n enter: function (node, _key, _parent, path) {\n originalFragmentDefsByPath.set(JSON.stringify(path), node);\n },\n leave: function (node, _key, _parent, path) {\n var originalNode = originalFragmentDefsByPath.get(JSON.stringify(path));\n if (node === originalNode) {\n // If the FragmentNode received by this leave function is identical to\n // the one received by the corresponding enter function (above), then\n // the visitor must not have made any changes within this\n // FragmentDefinition node. This fragment definition may still be\n // removed if there are no ...spread references to it, but it won\'t be\n // removed just because it has only a __typename field.\n return node;\n }\n if (\n // This logic applies only if the document contains one or more\n // operations, since removing all fragments from a document containing\n // only fragments makes the document useless.\n operationCount > 0 &&\n node.selectionSet.selections.every(function (selection) {\n return selection.kind === graphql__WEBPACK_IMPORTED_MODULE_1__/* .Kind */ .b.FIELD &&\n selection.name.value === "__typename";\n })) {\n // This is a somewhat opinionated choice: if a FragmentDefinition ends\n // up having no fields other than __typename, we remove the whole\n // fragment definition, and later prune ...spread references to it.\n getInUseByFragmentName(node.name.value).removed = true;\n firstVisitMadeChanges = true;\n return null;\n }\n },\n },\n Directive: {\n leave: function (node) {\n // If a matching directive is found, remove the directive itself. Note\n // that this does not remove the target (field, argument, etc) of the\n // directive, but only the directive itself.\n if (directiveMatcher(node)) {\n firstVisitMadeChanges = true;\n return null;\n }\n },\n },\n });\n if (!firstVisitMadeChanges) {\n // If our first pass did not change anything about the document, then there\n // is no cleanup we need to do, and we can return the original doc.\n return doc;\n }\n // Utility for making sure inUse.transitiveVars is recursively populated.\n // Because this logic assumes inUse.fragmentSpreads has been completely\n // populated and inUse.removed has been set if appropriate,\n // populateTransitiveVars must be called after that information has been\n // collected by the first traversal of the document.\n var populateTransitiveVars = function (inUse) {\n if (!inUse.transitiveVars) {\n inUse.transitiveVars = new Set(inUse.variables);\n if (!inUse.removed) {\n inUse.fragmentSpreads.forEach(function (childFragmentName) {\n populateTransitiveVars(getInUseByFragmentName(childFragmentName)).transitiveVars.forEach(function (varName) {\n inUse.transitiveVars.add(varName);\n });\n });\n }\n }\n return inUse;\n };\n // Since we\'ve been keeping track of fragment spreads used by particular\n // operations and fragment definitions, we now need to compute the set of all\n // spreads used (transitively) by any operations in the document.\n var allFragmentNamesUsed = new Set();\n docWithoutDirectiveSubtrees.definitions.forEach(function (def) {\n if (def.kind === graphql__WEBPACK_IMPORTED_MODULE_1__/* .Kind */ .b.OPERATION_DEFINITION) {\n populateTransitiveVars(getInUseByOperationName(def.name && def.name.value)).fragmentSpreads.forEach(function (childFragmentName) {\n allFragmentNamesUsed.add(childFragmentName);\n });\n }\n else if (def.kind === graphql__WEBPACK_IMPORTED_MODULE_1__/* .Kind */ .b.FRAGMENT_DEFINITION &&\n // If there are no operations in the document, then all fragment\n // definitions count as usages of their own fragment names. This heuristic\n // prevents accidentally removing all fragment definitions from the\n // document just because it contains no operations that use the fragments.\n operationCount === 0 &&\n !getInUseByFragmentName(def.name.value).removed) {\n allFragmentNamesUsed.add(def.name.value);\n }\n });\n // Now that we have added all fragment spreads used by operations to the\n // allFragmentNamesUsed set, we can complete the set by transitively adding\n // all fragment spreads used by those fragments, and so on.\n allFragmentNamesUsed.forEach(function (fragmentName) {\n // Once all the childFragmentName strings added here have been seen already,\n // the top-level allFragmentNamesUsed.forEach loop will terminate.\n populateTransitiveVars(getInUseByFragmentName(fragmentName)).fragmentSpreads.forEach(function (childFragmentName) {\n allFragmentNamesUsed.add(childFragmentName);\n });\n });\n var fragmentWillBeRemoved = function (fragmentName) {\n return !!(\n // A fragment definition will be removed if there are no spreads that refer\n // to it, or the fragment was explicitly removed because it had no fields\n // other than __typename.\n (!allFragmentNamesUsed.has(fragmentName) ||\n getInUseByFragmentName(fragmentName).removed));\n };\n var enterVisitor = {\n enter: function (node) {\n if (fragmentWillBeRemoved(node.name.value)) {\n return null;\n }\n },\n };\n return nullIfDocIsEmpty((0,graphql__WEBPACK_IMPORTED_MODULE_5__/* .visit */ .YR)(docWithoutDirectiveSubtrees, {\n // If the fragment is going to be removed, then leaving any dangling\n // FragmentSpread nodes with the same name would be a mistake.\n FragmentSpread: enterVisitor,\n // This is where the fragment definition is actually removed.\n FragmentDefinition: enterVisitor,\n OperationDefinition: {\n leave: function (node) {\n // Upon leaving each operation in the depth-first AST traversal, prune\n // any variables that are declared by the operation but unused within.\n if (node.variableDefinitions) {\n var usedVariableNames_1 = populateTransitiveVars(\n // If an operation is anonymous, we use the empty string as its key.\n getInUseByOperationName(node.name && node.name.value)).transitiveVars;\n // According to the GraphQL spec, all variables declared by an\n // operation must either be used by that operation or used by some\n // fragment included transitively into that operation:\n // https://spec.graphql.org/draft/#sec-All-Variables-Used\n //\n // To stay on the right side of this validation rule, if/when we\n // remove the last $var references from an operation or its fragments,\n // we must also remove the corresponding $var declaration from the\n // enclosing operation. This pruning applies only to operations and\n // not fragment definitions, at the moment. Fragments may be able to\n // declare variables eventually, but today they can only consume them.\n if (usedVariableNames_1.size < node.variableDefinitions.length) {\n return (0,tslib__WEBPACK_IMPORTED_MODULE_6__/* .__assign */ .Cl)((0,tslib__WEBPACK_IMPORTED_MODULE_6__/* .__assign */ .Cl)({}, node), { variableDefinitions: node.variableDefinitions.filter(function (varDef) {\n return usedVariableNames_1.has(varDef.variable.name.value);\n }) });\n }\n }\n },\n },\n }));\n}\nvar addTypenameToDocument = Object.assign(function (doc) {\n return (0,graphql__WEBPACK_IMPORTED_MODULE_5__/* .visit */ .YR)(doc, {\n SelectionSet: {\n enter: function (node, _key, parent) {\n // Don\'t add __typename to OperationDefinitions.\n if (parent &&\n parent.kind ===\n graphql__WEBPACK_IMPORTED_MODULE_1__/* .Kind */ .b.OPERATION_DEFINITION) {\n return;\n }\n // No changes if no selections.\n var selections = node.selections;\n if (!selections) {\n return;\n }\n // If selections already have a __typename, or are part of an\n // introspection query, do nothing.\n var skip = selections.some(function (selection) {\n return ((0,_storeUtils_js__WEBPACK_IMPORTED_MODULE_7__/* .isField */ .dt)(selection) &&\n (selection.name.value === "__typename" ||\n selection.name.value.lastIndexOf("__", 0) === 0));\n });\n if (skip) {\n return;\n }\n // If this SelectionSet is @export-ed as an input variable, it should\n // not have a __typename field (see issue #4691).\n var field = parent;\n if ((0,_storeUtils_js__WEBPACK_IMPORTED_MODULE_7__/* .isField */ .dt)(field) &&\n field.directives &&\n field.directives.some(function (d) { return d.name.value === "export"; })) {\n return;\n }\n // Create and return a new SelectionSet with a __typename Field.\n return (0,tslib__WEBPACK_IMPORTED_MODULE_6__/* .__assign */ .Cl)((0,tslib__WEBPACK_IMPORTED_MODULE_6__/* .__assign */ .Cl)({}, node), { selections: (0,tslib__WEBPACK_IMPORTED_MODULE_6__/* .__spreadArray */ .fX)((0,tslib__WEBPACK_IMPORTED_MODULE_6__/* .__spreadArray */ .fX)([], selections, true), [TYPENAME_FIELD], false) });\n },\n },\n });\n}, {\n added: function (field) {\n return field === TYPENAME_FIELD;\n },\n});\nvar connectionRemoveConfig = {\n test: function (directive) {\n var willRemove = directive.name.value === "connection";\n if (willRemove) {\n if (!directive.arguments ||\n !directive.arguments.some(function (arg) { return arg.name.value === "key"; })) {\n globalThis.__DEV__ !== false && _globals_index_js__WEBPACK_IMPORTED_MODULE_0__/* .invariant */ .V1.warn(85);\n }\n }\n return willRemove;\n },\n};\nfunction removeConnectionDirectiveFromDocument(doc) {\n return removeDirectivesFromDocument([connectionRemoveConfig], checkDocument(doc));\n}\nfunction hasDirectivesInSelectionSet(directives, selectionSet, nestedCheck) {\n if (nestedCheck === void 0) { nestedCheck = true; }\n return (!!selectionSet &&\n selectionSet.selections &&\n selectionSet.selections.some(function (selection) {\n return hasDirectivesInSelection(directives, selection, nestedCheck);\n }));\n}\nfunction hasDirectivesInSelection(directives, selection, nestedCheck) {\n if (nestedCheck === void 0) { nestedCheck = true; }\n if (!isField(selection)) {\n return true;\n }\n if (!selection.directives) {\n return false;\n }\n return (selection.directives.some(getDirectiveMatcher(directives)) ||\n (nestedCheck &&\n hasDirectivesInSelectionSet(directives, selection.selectionSet, nestedCheck)));\n}\nfunction getArgumentMatcher(config) {\n return function argumentMatcher(argument) {\n return config.some(function (aConfig) {\n return argument.value &&\n argument.value.kind === Kind.VARIABLE &&\n argument.value.name &&\n (aConfig.name === argument.value.name.value ||\n (aConfig.test && aConfig.test(argument)));\n });\n };\n}\nfunction removeArgumentsFromDocument(config, doc) {\n var argMatcher = getArgumentMatcher(config);\n return nullIfDocIsEmpty(visit(doc, {\n OperationDefinition: {\n enter: function (node) {\n return __assign(__assign({}, node), { \n // Remove matching top level variables definitions.\n variableDefinitions: node.variableDefinitions ?\n node.variableDefinitions.filter(function (varDef) {\n return !config.some(function (arg) { return arg.name === varDef.variable.name.value; });\n })\n : [] });\n },\n },\n Field: {\n enter: function (node) {\n // If `remove` is set to true for an argument, and an argument match\n // is found for a field, remove the field as well.\n var shouldRemoveField = config.some(function (argConfig) { return argConfig.remove; });\n if (shouldRemoveField) {\n var argMatchCount_1 = 0;\n if (node.arguments) {\n node.arguments.forEach(function (arg) {\n if (argMatcher(arg)) {\n argMatchCount_1 += 1;\n }\n });\n }\n if (argMatchCount_1 === 1) {\n return null;\n }\n }\n },\n },\n Argument: {\n enter: function (node) {\n // Remove all matching arguments.\n if (argMatcher(node)) {\n return null;\n }\n },\n },\n }));\n}\nfunction removeFragmentSpreadFromDocument(config, doc) {\n function enter(node) {\n if (config.some(function (def) { return def.name === node.name.value; })) {\n return null;\n }\n }\n return nullIfDocIsEmpty(visit(doc, {\n FragmentSpread: { enter: enter },\n FragmentDefinition: { enter: enter },\n }));\n}\n// If the incoming document is a query, return it as is. Otherwise, build a\n// new document containing a query operation based on the selection set\n// of the previous main operation.\nfunction buildQueryFromSelectionSet(document) {\n var definition = (0,_getFromAST_js__WEBPACK_IMPORTED_MODULE_2__/* .getMainDefinition */ .Vn)(document);\n var definitionOperation = definition.operation;\n if (definitionOperation === "query") {\n // Already a query, so return the existing document.\n return document;\n }\n // Build a new query using the selection set of the main operation.\n var modifiedDoc = (0,graphql__WEBPACK_IMPORTED_MODULE_5__/* .visit */ .YR)(document, {\n OperationDefinition: {\n enter: function (node) {\n return (0,tslib__WEBPACK_IMPORTED_MODULE_6__/* .__assign */ .Cl)((0,tslib__WEBPACK_IMPORTED_MODULE_6__/* .__assign */ .Cl)({}, node), { operation: "query" });\n },\n },\n });\n return modifiedDoc;\n}\n// Remove fields / selection sets that include an @client directive.\nfunction removeClientSetsFromDocument(document) {\n (0,_getFromAST_js__WEBPACK_IMPORTED_MODULE_2__/* .checkDocument */ .sw)(document);\n var modifiedDoc = removeDirectivesFromDocument([\n {\n test: function (directive) { return directive.name.value === "client"; },\n remove: true,\n },\n ], document);\n return modifiedDoc;\n}\n//# sourceMappingURL=transform.js.map\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@apollo/client/utilities/graphql/transform.js?', + ); + + /***/ + }, + + /***/ 435: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ r: () => (/* binding */ version)\n/* harmony export */ });\nvar version = "3.10.8";\n//# sourceMappingURL=version.js.map\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@apollo/client/version.js?', + ); + + /***/ + }, + + /***/ 9417: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ A: () => (/* binding */ _assertThisInitialized)\n/* harmony export */ });\nfunction _assertThisInitialized(e) {\n if (void 0 === e) throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");\n return e;\n}\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js?', + ); + + /***/ + }, + + /***/ 8168: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ A: () => (/* binding */ _extends)\n/* harmony export */ });\nfunction _extends() {\n return _extends = Object.assign ? Object.assign.bind() : function (n) {\n for (var e = 1; e < arguments.length; e++) {\n var t = arguments[e];\n for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);\n }\n return n;\n }, _extends.apply(null, arguments);\n}\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@babel/runtime/helpers/esm/extends.js?', + ); + + /***/ + }, + + /***/ 5540: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '\n// EXPORTS\n__webpack_require__.d(__webpack_exports__, {\n A: () => (/* binding */ _inheritsLoose)\n});\n\n;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js\nfunction _setPrototypeOf(t, e) {\n return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {\n return t.__proto__ = e, t;\n }, _setPrototypeOf(t, e);\n}\n\n;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js\n\nfunction _inheritsLoose(t, o) {\n t.prototype = Object.create(o.prototype), t.prototype.constructor = t, _setPrototypeOf(t, o);\n}\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js_+_1_modules?', + ); + + /***/ + }, + + /***/ 8587: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ A: () => (/* binding */ _objectWithoutPropertiesLoose)\n/* harmony export */ });\nfunction _objectWithoutPropertiesLoose(r, e) {\n if (null == r) return {};\n var t = {};\n for (var n in r) if ({}.hasOwnProperty.call(r, n)) {\n if (e.includes(n)) continue;\n t[n] = r[n];\n }\n return t;\n}\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js?', + ); + + /***/ + }, + + /***/ 6007: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Ay: () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* unused harmony exports __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, lazy, loadableReady */\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6540);\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(8587);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(8168);\n/* harmony import */ var _babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(9417);\n/* harmony import */ var _babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5540);\n/* harmony import */ var hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4146);\n\n\n\n\n\n\n\n/* eslint-disable import/prefer-default-export */\nfunction invariant(condition, message) {\n if (condition) return;\n var error = new Error("loadable: " + message);\n error.framesToPop = 1;\n error.name = \'Invariant Violation\';\n throw error;\n}\nfunction warn(message) {\n // eslint-disable-next-line no-console\n console.warn("loadable: " + message);\n}\n\nvar Context = /*#__PURE__*/\nreact__WEBPACK_IMPORTED_MODULE_0__.createContext();\n\nvar LOADABLE_REQUIRED_CHUNKS_KEY = \'__LOADABLE_REQUIRED_CHUNKS__\';\nfunction getRequiredChunkKey(namespace) {\n return "" + namespace + LOADABLE_REQUIRED_CHUNKS_KEY;\n}\n\nvar sharedInternals = /*#__PURE__*/Object.freeze({\n __proto__: null,\n getRequiredChunkKey: getRequiredChunkKey,\n invariant: invariant,\n Context: Context\n});\n\nvar LOADABLE_SHARED = {\n initialChunks: {}\n};\n\nvar STATUS_PENDING = \'PENDING\';\nvar STATUS_RESOLVED = \'RESOLVED\';\nvar STATUS_REJECTED = \'REJECTED\';\n\nfunction resolveConstructor(ctor) {\n if (typeof ctor === \'function\') {\n return {\n requireAsync: ctor,\n resolve: function resolve() {\n return undefined;\n },\n chunkName: function chunkName() {\n return undefined;\n }\n };\n }\n\n return ctor;\n}\n\nvar withChunkExtractor = function withChunkExtractor(Component) {\n var LoadableWithChunkExtractor = function LoadableWithChunkExtractor(props) {\n return react__WEBPACK_IMPORTED_MODULE_0__.createElement(Context.Consumer, null, function (extractor) {\n return react__WEBPACK_IMPORTED_MODULE_0__.createElement(Component, Object.assign({\n __chunkExtractor: extractor\n }, props));\n });\n };\n\n if (Component.displayName) {\n LoadableWithChunkExtractor.displayName = Component.displayName + "WithChunkExtractor";\n }\n\n return LoadableWithChunkExtractor;\n};\n\nvar identity = function identity(v) {\n return v;\n};\n\nfunction createLoadable(_ref) {\n var _ref$defaultResolveCo = _ref.defaultResolveComponent,\n defaultResolveComponent = _ref$defaultResolveCo === void 0 ? identity : _ref$defaultResolveCo,\n _render = _ref.render,\n onLoad = _ref.onLoad;\n\n function loadable(loadableConstructor, options) {\n if (options === void 0) {\n options = {};\n }\n\n var ctor = resolveConstructor(loadableConstructor);\n var cache = {};\n /**\n * Cachekey represents the component to be loaded\n * if key changes - component has to be reloaded\n * @param props\n * @returns {null|Component}\n */\n\n function _getCacheKey(props) {\n if (options.cacheKey) {\n return options.cacheKey(props);\n }\n\n if (ctor.resolve) {\n return ctor.resolve(props);\n }\n\n return \'static\';\n }\n /**\n * Resolves loaded `module` to a specific `Component\n * @param module\n * @param props\n * @param Loadable\n * @returns Component\n */\n\n\n function resolve(module, props, Loadable) {\n var Component = options.resolveComponent ? options.resolveComponent(module, props) : defaultResolveComponent(module); // FIXME: suppressed due to https://github.com/gregberge/loadable-components/issues/990\n // if (options.resolveComponent && !ReactIs.isValidElementType(Component)) {\n // throw new Error(\n // `resolveComponent returned something that is not a React component!`,\n // )\n // }\n\n hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_1__(Loadable, Component, {\n preload: true\n });\n return Component;\n }\n\n var cachedLoad = function cachedLoad(props) {\n var cacheKey = _getCacheKey(props);\n\n var promise = cache[cacheKey];\n\n if (!promise || promise.status === STATUS_REJECTED) {\n promise = ctor.requireAsync(props);\n promise.status = STATUS_PENDING;\n cache[cacheKey] = promise;\n promise.then(function () {\n promise.status = STATUS_RESOLVED;\n }, function (error) {\n console.error(\'loadable-components: failed to asynchronously load component\', {\n fileName: ctor.resolve(props),\n chunkName: ctor.chunkName(props),\n error: error ? error.message : error\n });\n promise.status = STATUS_REJECTED;\n });\n }\n\n return promise;\n };\n\n var InnerLoadable =\n /*#__PURE__*/\n function (_React$Component) {\n (0,_babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A)(InnerLoadable, _React$Component);\n\n InnerLoadable.getDerivedStateFromProps = function getDerivedStateFromProps(props, state) {\n var cacheKey = _getCacheKey(props);\n\n return (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)({}, state, {\n cacheKey: cacheKey,\n // change of a key triggers loading state automatically\n loading: state.loading || state.cacheKey !== cacheKey\n });\n };\n\n function InnerLoadable(props) {\n var _this;\n\n _this = _React$Component.call(this, props) || this;\n _this.state = {\n result: null,\n error: null,\n loading: true,\n cacheKey: _getCacheKey(props)\n };\n invariant(!props.__chunkExtractor || ctor.requireSync, \'SSR requires `@loadable/babel-plugin`, please install it\'); // Server-side\n\n if (props.__chunkExtractor) {\n // This module has been marked with no SSR\n if (options.ssr === false) {\n return (0,_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .A)(_this);\n } // We run load function, we assume that it won\'t fail and that it\n // triggers a synchronous loading of the module\n\n\n ctor.requireAsync(props)["catch"](function () {\n return null;\n }); // So we can require now the module synchronously\n\n _this.loadSync();\n\n props.__chunkExtractor.addChunk(ctor.chunkName(props));\n\n return (0,_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .A)(_this);\n } // Client-side with `isReady` method present (SSR probably)\n // If module is already loaded, we use a synchronous loading\n // Only perform this synchronous loading if the component has not\n // been marked with no SSR, else we risk hydration mismatches\n\n\n if (options.ssr !== false && ( // is ready - was loaded in this session\n ctor.isReady && ctor.isReady(props) || // is ready - was loaded during SSR process\n ctor.chunkName && LOADABLE_SHARED.initialChunks[ctor.chunkName(props)])) {\n _this.loadSync();\n }\n\n return _this;\n }\n\n var _proto = InnerLoadable.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n this.mounted = true; // retrieve loading promise from a global cache\n\n var cachedPromise = this.getCache(); // if promise exists, but rejected - clear cache\n\n if (cachedPromise && cachedPromise.status === STATUS_REJECTED) {\n this.setCache();\n } // component might be resolved synchronously in the constructor\n\n\n if (this.state.loading) {\n this.loadAsync();\n }\n };\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps, prevState) {\n // Component has to be reloaded on cacheKey change\n if (prevState.cacheKey !== this.state.cacheKey) {\n this.loadAsync();\n }\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.mounted = false;\n };\n\n _proto.safeSetState = function safeSetState(nextState, callback) {\n if (this.mounted) {\n this.setState(nextState, callback);\n }\n }\n /**\n * returns a cache key for the current props\n * @returns {Component|string}\n */\n ;\n\n _proto.getCacheKey = function getCacheKey() {\n return _getCacheKey(this.props);\n }\n /**\n * access the persistent cache\n */\n ;\n\n _proto.getCache = function getCache() {\n return cache[this.getCacheKey()];\n }\n /**\n * sets the cache value. If called without value sets it as undefined\n */\n ;\n\n _proto.setCache = function setCache(value) {\n if (value === void 0) {\n value = undefined;\n }\n\n cache[this.getCacheKey()] = value;\n };\n\n _proto.triggerOnLoad = function triggerOnLoad() {\n var _this2 = this;\n\n if (onLoad) {\n setTimeout(function () {\n onLoad(_this2.state.result, _this2.props);\n });\n }\n }\n /**\n * Synchronously loads component\n * target module is expected to already exists in the module cache\n * or be capable to resolve synchronously (webpack target=node)\n */\n ;\n\n _proto.loadSync = function loadSync() {\n // load sync is expecting component to be in the "loading" state already\n // sounds weird, but loading=true is the initial state of InnerLoadable\n if (!this.state.loading) return;\n\n try {\n var loadedModule = ctor.requireSync(this.props);\n var result = resolve(loadedModule, this.props, Loadable);\n this.state.result = result;\n this.state.loading = false;\n } catch (error) {\n console.error(\'loadable-components: failed to synchronously load component, which expected to be available\', {\n fileName: ctor.resolve(this.props),\n chunkName: ctor.chunkName(this.props),\n error: error ? error.message : error\n });\n this.state.error = error;\n }\n }\n /**\n * Asynchronously loads a component.\n */\n ;\n\n _proto.loadAsync = function loadAsync() {\n var _this3 = this;\n\n var promise = this.resolveAsync();\n promise.then(function (loadedModule) {\n var result = resolve(loadedModule, _this3.props, Loadable);\n\n _this3.safeSetState({\n result: result,\n loading: false\n }, function () {\n return _this3.triggerOnLoad();\n });\n })["catch"](function (error) {\n return _this3.safeSetState({\n error: error,\n loading: false\n });\n });\n return promise;\n }\n /**\n * Asynchronously resolves(not loads) a component.\n * Note - this function does not change the state\n */\n ;\n\n _proto.resolveAsync = function resolveAsync() {\n var _this$props = this.props,\n __chunkExtractor = _this$props.__chunkExtractor,\n forwardedRef = _this$props.forwardedRef,\n props = (0,_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .A)(_this$props, ["__chunkExtractor", "forwardedRef"]);\n\n return cachedLoad(props);\n };\n\n _proto.render = function render() {\n var _this$props2 = this.props,\n forwardedRef = _this$props2.forwardedRef,\n propFallback = _this$props2.fallback,\n __chunkExtractor = _this$props2.__chunkExtractor,\n props = (0,_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .A)(_this$props2, ["forwardedRef", "fallback", "__chunkExtractor"]);\n\n var _this$state = this.state,\n error = _this$state.error,\n loading = _this$state.loading,\n result = _this$state.result;\n\n if (options.suspense) {\n var cachedPromise = this.getCache() || this.loadAsync();\n\n if (cachedPromise.status === STATUS_PENDING) {\n throw this.loadAsync();\n }\n }\n\n if (error) {\n throw error;\n }\n\n var fallback = propFallback || options.fallback || null;\n\n if (loading) {\n return fallback;\n }\n\n return _render({\n fallback: fallback,\n result: result,\n options: options,\n props: (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)({}, props, {\n ref: forwardedRef\n })\n });\n };\n\n return InnerLoadable;\n }(react__WEBPACK_IMPORTED_MODULE_0__.Component);\n\n var EnhancedInnerLoadable = withChunkExtractor(InnerLoadable);\n var Loadable = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(function (props, ref) {\n return react__WEBPACK_IMPORTED_MODULE_0__.createElement(EnhancedInnerLoadable, Object.assign({\n forwardedRef: ref\n }, props));\n });\n Loadable.displayName = \'Loadable\'; // In future, preload could use `<link rel="preload">`\n\n Loadable.preload = function (props) {\n Loadable.load(props);\n };\n\n Loadable.load = function (props) {\n return cachedLoad(props);\n };\n\n return Loadable;\n }\n\n function lazy(ctor, options) {\n return loadable(ctor, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)({}, options, {\n suspense: true\n }));\n }\n\n return {\n loadable: loadable,\n lazy: lazy\n };\n}\n\nfunction defaultResolveComponent(loadedModule) {\n // eslint-disable-next-line no-underscore-dangle\n return loadedModule.__esModule ? loadedModule["default"] : loadedModule["default"] || loadedModule;\n}\n\n/* eslint-disable no-use-before-define, react/no-multi-comp */\n\nvar _createLoadable =\n/*#__PURE__*/\ncreateLoadable({\n defaultResolveComponent: defaultResolveComponent,\n render: function render(_ref) {\n var Component = _ref.result,\n props = _ref.props;\n return react__WEBPACK_IMPORTED_MODULE_0__.createElement(Component, props);\n }\n}),\n loadable = _createLoadable.loadable,\n lazy = _createLoadable.lazy;\n\n/* eslint-disable no-use-before-define, react/no-multi-comp */\n\nvar _createLoadable$1 =\n/*#__PURE__*/\ncreateLoadable({\n onLoad: function onLoad(result, props) {\n if (result && props.forwardedRef) {\n if (typeof props.forwardedRef === \'function\') {\n props.forwardedRef(result);\n } else {\n props.forwardedRef.current = result;\n }\n }\n },\n render: function render(_ref) {\n var result = _ref.result,\n props = _ref.props;\n\n if (props.children) {\n return props.children(result);\n }\n\n return null;\n }\n}),\n loadable$1 = _createLoadable$1.loadable,\n lazy$1 = _createLoadable$1.lazy;\n\n/* eslint-disable no-underscore-dangle, camelcase */\nvar BROWSER = typeof window !== \'undefined\';\nfunction loadableReady(done, _temp) {\n if (done === void 0) {\n done = function done() {};\n }\n\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$namespace = _ref.namespace,\n namespace = _ref$namespace === void 0 ? \'\' : _ref$namespace,\n _ref$chunkLoadingGlob = _ref.chunkLoadingGlobal,\n chunkLoadingGlobal = _ref$chunkLoadingGlob === void 0 ? \'__LOADABLE_LOADED_CHUNKS__\' : _ref$chunkLoadingGlob;\n\n if (!BROWSER) {\n warn(\'`loadableReady()` must be called in browser only\');\n done();\n return Promise.resolve();\n }\n\n var requiredChunks = null;\n\n if (BROWSER) {\n var id = getRequiredChunkKey(namespace);\n var dataElement = document.getElementById(id);\n\n if (dataElement) {\n requiredChunks = JSON.parse(dataElement.textContent);\n var extElement = document.getElementById(id + "_ext");\n\n if (extElement) {\n var _JSON$parse = JSON.parse(extElement.textContent),\n namedChunks = _JSON$parse.namedChunks;\n\n namedChunks.forEach(function (chunkName) {\n LOADABLE_SHARED.initialChunks[chunkName] = true;\n });\n } else {\n // version mismatch\n throw new Error(\'loadable-component: @loadable/server does not match @loadable/component\');\n }\n }\n }\n\n if (!requiredChunks) {\n warn(\'`loadableReady()` requires state, please use `getScriptTags` or `getScriptElements` server-side\');\n done();\n return Promise.resolve();\n }\n\n var resolved = false;\n return new Promise(function (resolve) {\n window[chunkLoadingGlobal] = window[chunkLoadingGlobal] || [];\n var loadedChunks = window[chunkLoadingGlobal];\n var originalPush = loadedChunks.push.bind(loadedChunks);\n\n function checkReadyState() {\n if (requiredChunks.every(function (chunk) {\n return loadedChunks.some(function (_ref2) {\n var chunks = _ref2[0];\n return chunks.indexOf(chunk) > -1;\n });\n })) {\n if (!resolved) {\n resolved = true;\n resolve();\n }\n }\n }\n\n loadedChunks.push = function () {\n originalPush.apply(void 0, arguments);\n checkReadyState();\n };\n\n checkReadyState();\n }).then(done);\n}\n\n/* eslint-disable no-underscore-dangle */\nvar loadable$2 = loadable;\nloadable$2.lib = loadable$1;\nvar lazy$2 = lazy;\nlazy$2.lib = lazy$1;\nvar __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = (/* unused pure expression or super */ null && (sharedInternals));\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (loadable$2);\n\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@loadable/component/dist/loadable.esm.mjs?', + ); + + /***/ + }, + + /***/ 7783: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ C: () => (/* binding */ StrongCache)\n/* harmony export */ });\nfunction defaultDispose() { }\nclass StrongCache {\n constructor(max = Infinity, dispose = defaultDispose) {\n this.max = max;\n this.dispose = dispose;\n this.map = new Map();\n this.newest = null;\n this.oldest = null;\n }\n has(key) {\n return this.map.has(key);\n }\n get(key) {\n const node = this.getNode(key);\n return node && node.value;\n }\n get size() {\n return this.map.size;\n }\n getNode(key) {\n const node = this.map.get(key);\n if (node && node !== this.newest) {\n const { older, newer } = node;\n if (newer) {\n newer.older = older;\n }\n if (older) {\n older.newer = newer;\n }\n node.older = this.newest;\n node.older.newer = node;\n node.newer = null;\n this.newest = node;\n if (node === this.oldest) {\n this.oldest = newer;\n }\n }\n return node;\n }\n set(key, value) {\n let node = this.getNode(key);\n if (node) {\n return node.value = value;\n }\n node = {\n key,\n value,\n newer: null,\n older: this.newest\n };\n if (this.newest) {\n this.newest.newer = node;\n }\n this.newest = node;\n this.oldest = this.oldest || node;\n this.map.set(key, node);\n return node.value;\n }\n clean() {\n while (this.oldest && this.map.size > this.max) {\n this.delete(this.oldest.key);\n }\n }\n delete(key) {\n const node = this.map.get(key);\n if (node) {\n if (node === this.newest) {\n this.newest = node.older;\n }\n if (node === this.oldest) {\n this.oldest = node.newer;\n }\n if (node.newer) {\n node.newer.older = node.older;\n }\n if (node.older) {\n node.older.newer = node.newer;\n }\n this.map.delete(key);\n this.dispose(node.value, key);\n return true;\n }\n return false;\n }\n}\n//# sourceMappingURL=strong.js.map\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@wry/caches/lib/strong.js?', + ); + + /***/ + }, + + /***/ 1744: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ l: () => (/* binding */ WeakCache)\n/* harmony export */ });\nfunction noop() { }\nconst defaultDispose = noop;\nconst _WeakRef = typeof WeakRef !== "undefined"\n ? WeakRef\n : function (value) {\n return { deref: () => value };\n };\nconst _WeakMap = typeof WeakMap !== "undefined" ? WeakMap : Map;\nconst _FinalizationRegistry = typeof FinalizationRegistry !== "undefined"\n ? FinalizationRegistry\n : function () {\n return {\n register: noop,\n unregister: noop,\n };\n };\nconst finalizationBatchSize = 10024;\nclass WeakCache {\n constructor(max = Infinity, dispose = defaultDispose) {\n this.max = max;\n this.dispose = dispose;\n this.map = new _WeakMap();\n this.newest = null;\n this.oldest = null;\n this.unfinalizedNodes = new Set();\n this.finalizationScheduled = false;\n this.size = 0;\n this.finalize = () => {\n const iterator = this.unfinalizedNodes.values();\n for (let i = 0; i < finalizationBatchSize; i++) {\n const node = iterator.next().value;\n if (!node)\n break;\n this.unfinalizedNodes.delete(node);\n const key = node.key;\n delete node.key;\n node.keyRef = new _WeakRef(key);\n this.registry.register(key, node, node);\n }\n if (this.unfinalizedNodes.size > 0) {\n queueMicrotask(this.finalize);\n }\n else {\n this.finalizationScheduled = false;\n }\n };\n this.registry = new _FinalizationRegistry(this.deleteNode.bind(this));\n }\n has(key) {\n return this.map.has(key);\n }\n get(key) {\n const node = this.getNode(key);\n return node && node.value;\n }\n getNode(key) {\n const node = this.map.get(key);\n if (node && node !== this.newest) {\n const { older, newer } = node;\n if (newer) {\n newer.older = older;\n }\n if (older) {\n older.newer = newer;\n }\n node.older = this.newest;\n node.older.newer = node;\n node.newer = null;\n this.newest = node;\n if (node === this.oldest) {\n this.oldest = newer;\n }\n }\n return node;\n }\n set(key, value) {\n let node = this.getNode(key);\n if (node) {\n return (node.value = value);\n }\n node = {\n key,\n value,\n newer: null,\n older: this.newest,\n };\n if (this.newest) {\n this.newest.newer = node;\n }\n this.newest = node;\n this.oldest = this.oldest || node;\n this.scheduleFinalization(node);\n this.map.set(key, node);\n this.size++;\n return node.value;\n }\n clean() {\n while (this.oldest && this.size > this.max) {\n this.deleteNode(this.oldest);\n }\n }\n deleteNode(node) {\n if (node === this.newest) {\n this.newest = node.older;\n }\n if (node === this.oldest) {\n this.oldest = node.newer;\n }\n if (node.newer) {\n node.newer.older = node.older;\n }\n if (node.older) {\n node.older.newer = node.newer;\n }\n this.size--;\n const key = node.key || (node.keyRef && node.keyRef.deref());\n this.dispose(node.value, key);\n if (!node.keyRef) {\n this.unfinalizedNodes.delete(node);\n }\n else {\n this.registry.unregister(node);\n }\n if (key)\n this.map.delete(key);\n }\n delete(key) {\n const node = this.map.get(key);\n if (node) {\n this.deleteNode(node);\n return true;\n }\n return false;\n }\n scheduleFinalization(node) {\n this.unfinalizedNodes.add(node);\n if (!this.finalizationScheduled) {\n this.finalizationScheduled = true;\n queueMicrotask(this.finalize);\n }\n }\n}\n//# sourceMappingURL=weak.js.map\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@wry/caches/lib/weak.js?', + ); + + /***/ + }, + + /***/ 5381: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + "/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */ L: () => (/* binding */ equal)\n/* harmony export */ });\nconst { toString, hasOwnProperty } = Object.prototype;\nconst fnToStr = Function.prototype.toString;\nconst previousComparisons = new Map();\n/**\n * Performs a deep equality check on two JavaScript values, tolerating cycles.\n */\nfunction equal(a, b) {\n try {\n return check(a, b);\n }\n finally {\n previousComparisons.clear();\n }\n}\n// Allow default imports as well.\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (equal);\nfunction check(a, b) {\n // If the two values are strictly equal, our job is easy.\n if (a === b) {\n return true;\n }\n // Object.prototype.toString returns a representation of the runtime type of\n // the given value that is considerably more precise than typeof.\n const aTag = toString.call(a);\n const bTag = toString.call(b);\n // If the runtime types of a and b are different, they could maybe be equal\n // under some interpretation of equality, but for simplicity and performance\n // we just return false instead.\n if (aTag !== bTag) {\n return false;\n }\n switch (aTag) {\n case '[object Array]':\n // Arrays are a lot like other objects, but we can cheaply compare their\n // lengths as a short-cut before comparing their elements.\n if (a.length !== b.length)\n return false;\n // Fall through to object case...\n case '[object Object]': {\n if (previouslyCompared(a, b))\n return true;\n const aKeys = definedKeys(a);\n const bKeys = definedKeys(b);\n // If `a` and `b` have a different number of enumerable keys, they\n // must be different.\n const keyCount = aKeys.length;\n if (keyCount !== bKeys.length)\n return false;\n // Now make sure they have the same keys.\n for (let k = 0; k < keyCount; ++k) {\n if (!hasOwnProperty.call(b, aKeys[k])) {\n return false;\n }\n }\n // Finally, check deep equality of all child properties.\n for (let k = 0; k < keyCount; ++k) {\n const key = aKeys[k];\n if (!check(a[key], b[key])) {\n return false;\n }\n }\n return true;\n }\n case '[object Error]':\n return a.name === b.name && a.message === b.message;\n case '[object Number]':\n // Handle NaN, which is !== itself.\n if (a !== a)\n return b !== b;\n // Fall through to shared +a === +b case...\n case '[object Boolean]':\n case '[object Date]':\n return +a === +b;\n case '[object RegExp]':\n case '[object String]':\n return a == `${b}`;\n case '[object Map]':\n case '[object Set]': {\n if (a.size !== b.size)\n return false;\n if (previouslyCompared(a, b))\n return true;\n const aIterator = a.entries();\n const isMap = aTag === '[object Map]';\n while (true) {\n const info = aIterator.next();\n if (info.done)\n break;\n // If a instanceof Set, aValue === aKey.\n const [aKey, aValue] = info.value;\n // So this works the same way for both Set and Map.\n if (!b.has(aKey)) {\n return false;\n }\n // However, we care about deep equality of values only when dealing\n // with Map structures.\n if (isMap && !check(aValue, b.get(aKey))) {\n return false;\n }\n }\n return true;\n }\n case '[object Uint16Array]':\n case '[object Uint8Array]': // Buffer, in Node.js.\n case '[object Uint32Array]':\n case '[object Int32Array]':\n case '[object Int8Array]':\n case '[object Int16Array]':\n case '[object ArrayBuffer]':\n // DataView doesn't need these conversions, but the equality check is\n // otherwise the same.\n a = new Uint8Array(a);\n b = new Uint8Array(b);\n // Fall through...\n case '[object DataView]': {\n let len = a.byteLength;\n if (len === b.byteLength) {\n while (len-- && a[len] === b[len]) {\n // Keep looping as long as the bytes are equal.\n }\n }\n return len === -1;\n }\n case '[object AsyncFunction]':\n case '[object GeneratorFunction]':\n case '[object AsyncGeneratorFunction]':\n case '[object Function]': {\n const aCode = fnToStr.call(a);\n if (aCode !== fnToStr.call(b)) {\n return false;\n }\n // We consider non-native functions equal if they have the same code\n // (native functions require === because their code is censored).\n // Note that this behavior is not entirely sound, since !== function\n // objects with the same code can behave differently depending on\n // their closure scope. However, any function can behave differently\n // depending on the values of its input arguments (including this)\n // and its calling context (including its closure scope), even\n // though the function object is === to itself; and it is entirely\n // possible for functions that are not === to behave exactly the\n // same under all conceivable circumstances. Because none of these\n // factors are statically decidable in JavaScript, JS function\n // equality is not well-defined. This ambiguity allows us to\n // consider the best possible heuristic among various imperfect\n // options, and equating non-native functions that have the same\n // code has enormous practical benefits, such as when comparing\n // functions that are repeatedly passed as fresh function\n // expressions within objects that are otherwise deeply equal. Since\n // any function created from the same syntactic expression (in the\n // same code location) will always stringify to the same code\n // according to fnToStr.call, we can reasonably expect these\n // repeatedly passed function expressions to have the same code, and\n // thus behave \"the same\" (with all the caveats mentioned above),\n // even though the runtime function objects are !== to one another.\n return !endsWith(aCode, nativeCodeSuffix);\n }\n }\n // Otherwise the values are not equal.\n return false;\n}\nfunction definedKeys(obj) {\n // Remember that the second argument to Array.prototype.filter will be\n // used as `this` within the callback function.\n return Object.keys(obj).filter(isDefinedKey, obj);\n}\nfunction isDefinedKey(key) {\n return this[key] !== void 0;\n}\nconst nativeCodeSuffix = \"{ [native code] }\";\nfunction endsWith(full, suffix) {\n const fromIndex = full.length - suffix.length;\n return fromIndex >= 0 &&\n full.indexOf(suffix, fromIndex) === fromIndex;\n}\nfunction previouslyCompared(a, b) {\n // Though cyclic references can make an object graph appear infinite from the\n // perspective of a depth-first traversal, the graph still contains a finite\n // number of distinct object references. We use the previousComparisons cache\n // to avoid comparing the same pair of object references more than once, which\n // guarantees termination (even if we end up comparing every object in one\n // graph to every object in the other graph, which is extremely unlikely),\n // while still allowing weird isomorphic structures (like rings with different\n // lengths) a chance to pass the equality test.\n let bSet = previousComparisons.get(a);\n if (bSet) {\n // Return true here because we can be sure false will be returned somewhere\n // else if the objects are not equivalent.\n if (bSet.has(b))\n return true;\n }\n else {\n previousComparisons.set(a, bSet = new Set);\n }\n bSet.add(b);\n return false;\n}\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@wry/equality/lib/index.js?", + ); + + /***/ + }, + + /***/ 2453: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ b: () => (/* binding */ Trie)\n/* harmony export */ });\n// A [trie](https://en.wikipedia.org/wiki/Trie) data structure that holds\n// object keys weakly, yet can also hold non-object keys, unlike the\n// native `WeakMap`.\n// If no makeData function is supplied, the looked-up data will be an empty,\n// null-prototype Object.\nconst defaultMakeData = () => Object.create(null);\n// Useful for processing arguments objects as well as arrays.\nconst { forEach, slice } = Array.prototype;\nconst { hasOwnProperty } = Object.prototype;\nclass Trie {\n constructor(weakness = true, makeData = defaultMakeData) {\n this.weakness = weakness;\n this.makeData = makeData;\n }\n lookup() {\n return this.lookupArray(arguments);\n }\n lookupArray(array) {\n let node = this;\n forEach.call(array, key => node = node.getChildTrie(key));\n return hasOwnProperty.call(node, "data")\n ? node.data\n : node.data = this.makeData(slice.call(array));\n }\n peek() {\n return this.peekArray(arguments);\n }\n peekArray(array) {\n let node = this;\n for (let i = 0, len = array.length; node && i < len; ++i) {\n const map = node.mapFor(array[i], false);\n node = map && map.get(array[i]);\n }\n return node && node.data;\n }\n remove() {\n return this.removeArray(arguments);\n }\n removeArray(array) {\n let data;\n if (array.length) {\n const head = array[0];\n const map = this.mapFor(head, false);\n const child = map && map.get(head);\n if (child) {\n data = child.removeArray(slice.call(array, 1));\n if (!child.data && !child.weak && !(child.strong && child.strong.size)) {\n map.delete(head);\n }\n }\n }\n else {\n data = this.data;\n delete this.data;\n }\n return data;\n }\n getChildTrie(key) {\n const map = this.mapFor(key, true);\n let child = map.get(key);\n if (!child)\n map.set(key, child = new Trie(this.weakness, this.makeData));\n return child;\n }\n mapFor(key, create) {\n return this.weakness && isObjRef(key)\n ? this.weak || (create ? this.weak = new WeakMap : void 0)\n : this.strong || (create ? this.strong = new Map : void 0);\n }\n}\nfunction isObjRef(value) {\n switch (typeof value) {\n case "object":\n if (value === null)\n break;\n // Fall through to return true...\n case "function":\n return true;\n }\n return false;\n}\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/@wry/trie/lib/index.js?', + ); + + /***/ + }, + + /***/ 6286: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ U: () => (/* binding */ devAssert)\n/* harmony export */ });\nfunction devAssert(condition, message) {\n const booleanCondition = Boolean(condition);\n\n if (!booleanCondition) {\n throw new Error(message);\n }\n}\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/graphql/jsutils/devAssert.mjs?', + ); + + /***/ + }, + + /***/ 129: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + "/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ N: () => (/* binding */ inspect)\n/* harmony export */ });\nconst MAX_ARRAY_LENGTH = 10;\nconst MAX_RECURSIVE_DEPTH = 2;\n/**\n * Used to print values in error messages.\n */\n\nfunction inspect(value) {\n return formatValue(value, []);\n}\n\nfunction formatValue(value, seenValues) {\n switch (typeof value) {\n case 'string':\n return JSON.stringify(value);\n\n case 'function':\n return value.name ? `[function ${value.name}]` : '[function]';\n\n case 'object':\n return formatObjectValue(value, seenValues);\n\n default:\n return String(value);\n }\n}\n\nfunction formatObjectValue(value, previouslySeenValues) {\n if (value === null) {\n return 'null';\n }\n\n if (previouslySeenValues.includes(value)) {\n return '[Circular]';\n }\n\n const seenValues = [...previouslySeenValues, value];\n\n if (isJSONable(value)) {\n const jsonValue = value.toJSON(); // check for infinite recursion\n\n if (jsonValue !== value) {\n return typeof jsonValue === 'string'\n ? jsonValue\n : formatValue(jsonValue, seenValues);\n }\n } else if (Array.isArray(value)) {\n return formatArray(value, seenValues);\n }\n\n return formatObject(value, seenValues);\n}\n\nfunction isJSONable(value) {\n return typeof value.toJSON === 'function';\n}\n\nfunction formatObject(object, seenValues) {\n const entries = Object.entries(object);\n\n if (entries.length === 0) {\n return '{}';\n }\n\n if (seenValues.length > MAX_RECURSIVE_DEPTH) {\n return '[' + getObjectTag(object) + ']';\n }\n\n const properties = entries.map(\n ([key, value]) => key + ': ' + formatValue(value, seenValues),\n );\n return '{ ' + properties.join(', ') + ' }';\n}\n\nfunction formatArray(array, seenValues) {\n if (array.length === 0) {\n return '[]';\n }\n\n if (seenValues.length > MAX_RECURSIVE_DEPTH) {\n return '[Array]';\n }\n\n const len = Math.min(MAX_ARRAY_LENGTH, array.length);\n const remaining = array.length - len;\n const items = [];\n\n for (let i = 0; i < len; ++i) {\n items.push(formatValue(array[i], seenValues));\n }\n\n if (remaining === 1) {\n items.push('... 1 more item');\n } else if (remaining > 1) {\n items.push(`... ${remaining} more items`);\n }\n\n return '[' + items.join(', ') + ']';\n}\n\nfunction getObjectTag(object) {\n const tag = Object.prototype.toString\n .call(object)\n .replace(/^\\[object /, '')\n .replace(/]$/, '');\n\n if (tag === 'Object' && typeof object.constructor === 'function') {\n const name = object.constructor.name;\n\n if (typeof name === 'string' && name !== '') {\n return name;\n }\n }\n\n return tag;\n}\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/graphql/jsutils/inspect.mjs?", + ); + + /***/ + }, + + /***/ 475: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + "/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Ll: () => (/* binding */ isNode),\n/* harmony export */ aD: () => (/* binding */ QueryDocumentKeys),\n/* harmony export */ aZ: () => (/* binding */ Location),\n/* harmony export */ cE: () => (/* binding */ OperationTypeNode),\n/* harmony export */ ou: () => (/* binding */ Token)\n/* harmony export */ });\n/**\n * Contains a range of UTF-8 character offsets and token references that\n * identify the region of the source from which the AST derived.\n */\nclass Location {\n /**\n * The character offset at which this Node begins.\n */\n\n /**\n * The character offset at which this Node ends.\n */\n\n /**\n * The Token at which this Node begins.\n */\n\n /**\n * The Token at which this Node ends.\n */\n\n /**\n * The Source document the AST represents.\n */\n constructor(startToken, endToken, source) {\n this.start = startToken.start;\n this.end = endToken.end;\n this.startToken = startToken;\n this.endToken = endToken;\n this.source = source;\n }\n\n get [Symbol.toStringTag]() {\n return 'Location';\n }\n\n toJSON() {\n return {\n start: this.start,\n end: this.end,\n };\n }\n}\n/**\n * Represents a range of characters represented by a lexical token\n * within a Source.\n */\n\nclass Token {\n /**\n * The kind of Token.\n */\n\n /**\n * The character offset at which this Node begins.\n */\n\n /**\n * The character offset at which this Node ends.\n */\n\n /**\n * The 1-indexed line number on which this Token appears.\n */\n\n /**\n * The 1-indexed column number at which this Token begins.\n */\n\n /**\n * For non-punctuation tokens, represents the interpreted value of the token.\n *\n * Note: is undefined for punctuation tokens, but typed as string for\n * convenience in the parser.\n */\n\n /**\n * Tokens exist as nodes in a double-linked-list amongst all tokens\n * including ignored tokens. <SOF> is always the first node and <EOF>\n * the last.\n */\n constructor(kind, start, end, line, column, value) {\n this.kind = kind;\n this.start = start;\n this.end = end;\n this.line = line;\n this.column = column; // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n\n this.value = value;\n this.prev = null;\n this.next = null;\n }\n\n get [Symbol.toStringTag]() {\n return 'Token';\n }\n\n toJSON() {\n return {\n kind: this.kind,\n value: this.value,\n line: this.line,\n column: this.column,\n };\n }\n}\n/**\n * The list of all possible AST node types.\n */\n\n/**\n * @internal\n */\nconst QueryDocumentKeys = {\n Name: [],\n Document: ['definitions'],\n OperationDefinition: [\n 'name',\n 'variableDefinitions',\n 'directives',\n 'selectionSet',\n ],\n VariableDefinition: ['variable', 'type', 'defaultValue', 'directives'],\n Variable: ['name'],\n SelectionSet: ['selections'],\n Field: ['alias', 'name', 'arguments', 'directives', 'selectionSet'],\n Argument: ['name', 'value'],\n FragmentSpread: ['name', 'directives'],\n InlineFragment: ['typeCondition', 'directives', 'selectionSet'],\n FragmentDefinition: [\n 'name', // Note: fragment variable definitions are deprecated and will removed in v17.0.0\n 'variableDefinitions',\n 'typeCondition',\n 'directives',\n 'selectionSet',\n ],\n IntValue: [],\n FloatValue: [],\n StringValue: [],\n BooleanValue: [],\n NullValue: [],\n EnumValue: [],\n ListValue: ['values'],\n ObjectValue: ['fields'],\n ObjectField: ['name', 'value'],\n Directive: ['name', 'arguments'],\n NamedType: ['name'],\n ListType: ['type'],\n NonNullType: ['type'],\n SchemaDefinition: ['description', 'directives', 'operationTypes'],\n OperationTypeDefinition: ['type'],\n ScalarTypeDefinition: ['description', 'name', 'directives'],\n ObjectTypeDefinition: [\n 'description',\n 'name',\n 'interfaces',\n 'directives',\n 'fields',\n ],\n FieldDefinition: ['description', 'name', 'arguments', 'type', 'directives'],\n InputValueDefinition: [\n 'description',\n 'name',\n 'type',\n 'defaultValue',\n 'directives',\n ],\n InterfaceTypeDefinition: [\n 'description',\n 'name',\n 'interfaces',\n 'directives',\n 'fields',\n ],\n UnionTypeDefinition: ['description', 'name', 'directives', 'types'],\n EnumTypeDefinition: ['description', 'name', 'directives', 'values'],\n EnumValueDefinition: ['description', 'name', 'directives'],\n InputObjectTypeDefinition: ['description', 'name', 'directives', 'fields'],\n DirectiveDefinition: ['description', 'name', 'arguments', 'locations'],\n SchemaExtension: ['directives', 'operationTypes'],\n ScalarTypeExtension: ['name', 'directives'],\n ObjectTypeExtension: ['name', 'interfaces', 'directives', 'fields'],\n InterfaceTypeExtension: ['name', 'interfaces', 'directives', 'fields'],\n UnionTypeExtension: ['name', 'directives', 'types'],\n EnumTypeExtension: ['name', 'directives', 'values'],\n InputObjectTypeExtension: ['name', 'directives', 'fields'],\n};\nconst kindValues = new Set(Object.keys(QueryDocumentKeys));\n/**\n * @internal\n */\n\nfunction isNode(maybeNode) {\n const maybeKind =\n maybeNode === null || maybeNode === void 0 ? void 0 : maybeNode.kind;\n return typeof maybeKind === 'string' && kindValues.has(maybeKind);\n}\n/** Name */\n\nvar OperationTypeNode;\n\n(function (OperationTypeNode) {\n OperationTypeNode['QUERY'] = 'query';\n OperationTypeNode['MUTATION'] = 'mutation';\n OperationTypeNode['SUBSCRIPTION'] = 'subscription';\n})(OperationTypeNode || (OperationTypeNode = {}));\n\n\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/graphql/language/ast.mjs?", + ); + + /***/ + }, + + /***/ 5995: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + "/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ OC: () => (/* binding */ dedentBlockStringLines),\n/* harmony export */ yo: () => (/* binding */ printBlockString)\n/* harmony export */ });\n/* unused harmony export isPrintableAsBlockString */\n/* harmony import */ var _characterClasses_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9646);\n\n/**\n * Produces the value of a block string from its parsed raw value, similar to\n * CoffeeScript's block string, Python's docstring trim or Ruby's strip_heredoc.\n *\n * This implements the GraphQL spec's BlockStringValue() static algorithm.\n *\n * @internal\n */\n\nfunction dedentBlockStringLines(lines) {\n var _firstNonEmptyLine2;\n\n let commonIndent = Number.MAX_SAFE_INTEGER;\n let firstNonEmptyLine = null;\n let lastNonEmptyLine = -1;\n\n for (let i = 0; i < lines.length; ++i) {\n var _firstNonEmptyLine;\n\n const line = lines[i];\n const indent = leadingWhitespace(line);\n\n if (indent === line.length) {\n continue; // skip empty lines\n }\n\n firstNonEmptyLine =\n (_firstNonEmptyLine = firstNonEmptyLine) !== null &&\n _firstNonEmptyLine !== void 0\n ? _firstNonEmptyLine\n : i;\n lastNonEmptyLine = i;\n\n if (i !== 0 && indent < commonIndent) {\n commonIndent = indent;\n }\n }\n\n return lines // Remove common indentation from all lines but first.\n .map((line, i) => (i === 0 ? line : line.slice(commonIndent))) // Remove leading and trailing blank lines.\n .slice(\n (_firstNonEmptyLine2 = firstNonEmptyLine) !== null &&\n _firstNonEmptyLine2 !== void 0\n ? _firstNonEmptyLine2\n : 0,\n lastNonEmptyLine + 1,\n );\n}\n\nfunction leadingWhitespace(str) {\n let i = 0;\n\n while (i < str.length && (0,_characterClasses_mjs__WEBPACK_IMPORTED_MODULE_0__/* .isWhiteSpace */ .i0)(str.charCodeAt(i))) {\n ++i;\n }\n\n return i;\n}\n/**\n * @internal\n */\n\nfunction isPrintableAsBlockString(value) {\n if (value === '') {\n return true; // empty string is printable\n }\n\n let isEmptyLine = true;\n let hasIndent = false;\n let hasCommonIndent = true;\n let seenNonEmptyLine = false;\n\n for (let i = 0; i < value.length; ++i) {\n switch (value.codePointAt(i)) {\n case 0x0000:\n case 0x0001:\n case 0x0002:\n case 0x0003:\n case 0x0004:\n case 0x0005:\n case 0x0006:\n case 0x0007:\n case 0x0008:\n case 0x000b:\n case 0x000c:\n case 0x000e:\n case 0x000f:\n return false;\n // Has non-printable characters\n\n case 0x000d:\n // \\r\n return false;\n // Has \\r or \\r\\n which will be replaced as \\n\n\n case 10:\n // \\n\n if (isEmptyLine && !seenNonEmptyLine) {\n return false; // Has leading new line\n }\n\n seenNonEmptyLine = true;\n isEmptyLine = true;\n hasIndent = false;\n break;\n\n case 9: // \\t\n\n case 32:\n // <space>\n hasIndent || (hasIndent = isEmptyLine);\n break;\n\n default:\n hasCommonIndent && (hasCommonIndent = hasIndent);\n isEmptyLine = false;\n }\n }\n\n if (isEmptyLine) {\n return false; // Has trailing empty lines\n }\n\n if (hasCommonIndent && seenNonEmptyLine) {\n return false; // Has internal indent\n }\n\n return true;\n}\n/**\n * Print a block string in the indented block form by adding a leading and\n * trailing blank line. However, if a block string starts with whitespace and is\n * a single-line, adding a leading blank line would strip that whitespace.\n *\n * @internal\n */\n\nfunction printBlockString(value, options) {\n const escapedValue = value.replace(/\"\"\"/g, '\\\\\"\"\"'); // Expand a block string's raw value into independent lines.\n\n const lines = escapedValue.split(/\\r\\n|[\\n\\r]/g);\n const isSingleLine = lines.length === 1; // If common indentation is found we can fix some of those cases by adding leading new line\n\n const forceLeadingNewLine =\n lines.length > 1 &&\n lines\n .slice(1)\n .every((line) => line.length === 0 || (0,_characterClasses_mjs__WEBPACK_IMPORTED_MODULE_0__/* .isWhiteSpace */ .i0)(line.charCodeAt(0))); // Trailing triple quotes just looks confusing but doesn't force trailing new line\n\n const hasTrailingTripleQuotes = escapedValue.endsWith('\\\\\"\"\"'); // Trailing quote (single or double) or slash forces trailing new line\n\n const hasTrailingQuote = value.endsWith('\"') && !hasTrailingTripleQuotes;\n const hasTrailingSlash = value.endsWith('\\\\');\n const forceTrailingNewline = hasTrailingQuote || hasTrailingSlash;\n const printAsMultipleLines =\n !(options !== null && options !== void 0 && options.minimize) && // add leading and trailing new lines only if it improves readability\n (!isSingleLine ||\n value.length > 70 ||\n forceTrailingNewline ||\n forceLeadingNewLine ||\n hasTrailingTripleQuotes);\n let result = ''; // Format a multi-line block quote to account for leading space.\n\n const skipLeadingNewLine = isSingleLine && (0,_characterClasses_mjs__WEBPACK_IMPORTED_MODULE_0__/* .isWhiteSpace */ .i0)(value.charCodeAt(0));\n\n if ((printAsMultipleLines && !skipLeadingNewLine) || forceLeadingNewLine) {\n result += '\\n';\n }\n\n result += escapedValue;\n\n if (printAsMultipleLines || forceTrailingNewline) {\n result += '\\n';\n }\n\n return '\"\"\"' + result + '\"\"\"';\n}\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/graphql/language/blockString.mjs?", + ); + + /***/ + }, + + /***/ 9646: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ i0: () => (/* binding */ isWhiteSpace),\n/* harmony export */ un: () => (/* binding */ isNameStart),\n/* harmony export */ xr: () => (/* binding */ isNameContinue),\n/* harmony export */ yp: () => (/* binding */ isDigit)\n/* harmony export */ });\n/* unused harmony export isLetter */\n/**\n * ```\n * WhiteSpace ::\n * - "Horizontal Tab (U+0009)"\n * - "Space (U+0020)"\n * ```\n * @internal\n */\nfunction isWhiteSpace(code) {\n return code === 0x0009 || code === 0x0020;\n}\n/**\n * ```\n * Digit :: one of\n * - `0` `1` `2` `3` `4` `5` `6` `7` `8` `9`\n * ```\n * @internal\n */\n\nfunction isDigit(code) {\n return code >= 0x0030 && code <= 0x0039;\n}\n/**\n * ```\n * Letter :: one of\n * - `A` `B` `C` `D` `E` `F` `G` `H` `I` `J` `K` `L` `M`\n * - `N` `O` `P` `Q` `R` `S` `T` `U` `V` `W` `X` `Y` `Z`\n * - `a` `b` `c` `d` `e` `f` `g` `h` `i` `j` `k` `l` `m`\n * - `n` `o` `p` `q` `r` `s` `t` `u` `v` `w` `x` `y` `z`\n * ```\n * @internal\n */\n\nfunction isLetter(code) {\n return (\n (code >= 0x0061 && code <= 0x007a) || // A-Z\n (code >= 0x0041 && code <= 0x005a) // a-z\n );\n}\n/**\n * ```\n * NameStart ::\n * - Letter\n * - `_`\n * ```\n * @internal\n */\n\nfunction isNameStart(code) {\n return isLetter(code) || code === 0x005f;\n}\n/**\n * ```\n * NameContinue ::\n * - Letter\n * - Digit\n * - `_`\n * ```\n * @internal\n */\n\nfunction isNameContinue(code) {\n return isLetter(code) || isDigit(code) || code === 0x005f;\n}\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/graphql/language/characterClasses.mjs?', + ); + + /***/ + }, + + /***/ 3298: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + "/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ b: () => (/* binding */ Kind)\n/* harmony export */ });\n/**\n * The set of allowed kind values for AST nodes.\n */\nvar Kind;\n\n(function (Kind) {\n Kind['NAME'] = 'Name';\n Kind['DOCUMENT'] = 'Document';\n Kind['OPERATION_DEFINITION'] = 'OperationDefinition';\n Kind['VARIABLE_DEFINITION'] = 'VariableDefinition';\n Kind['SELECTION_SET'] = 'SelectionSet';\n Kind['FIELD'] = 'Field';\n Kind['ARGUMENT'] = 'Argument';\n Kind['FRAGMENT_SPREAD'] = 'FragmentSpread';\n Kind['INLINE_FRAGMENT'] = 'InlineFragment';\n Kind['FRAGMENT_DEFINITION'] = 'FragmentDefinition';\n Kind['VARIABLE'] = 'Variable';\n Kind['INT'] = 'IntValue';\n Kind['FLOAT'] = 'FloatValue';\n Kind['STRING'] = 'StringValue';\n Kind['BOOLEAN'] = 'BooleanValue';\n Kind['NULL'] = 'NullValue';\n Kind['ENUM'] = 'EnumValue';\n Kind['LIST'] = 'ListValue';\n Kind['OBJECT'] = 'ObjectValue';\n Kind['OBJECT_FIELD'] = 'ObjectField';\n Kind['DIRECTIVE'] = 'Directive';\n Kind['NAMED_TYPE'] = 'NamedType';\n Kind['LIST_TYPE'] = 'ListType';\n Kind['NON_NULL_TYPE'] = 'NonNullType';\n Kind['SCHEMA_DEFINITION'] = 'SchemaDefinition';\n Kind['OPERATION_TYPE_DEFINITION'] = 'OperationTypeDefinition';\n Kind['SCALAR_TYPE_DEFINITION'] = 'ScalarTypeDefinition';\n Kind['OBJECT_TYPE_DEFINITION'] = 'ObjectTypeDefinition';\n Kind['FIELD_DEFINITION'] = 'FieldDefinition';\n Kind['INPUT_VALUE_DEFINITION'] = 'InputValueDefinition';\n Kind['INTERFACE_TYPE_DEFINITION'] = 'InterfaceTypeDefinition';\n Kind['UNION_TYPE_DEFINITION'] = 'UnionTypeDefinition';\n Kind['ENUM_TYPE_DEFINITION'] = 'EnumTypeDefinition';\n Kind['ENUM_VALUE_DEFINITION'] = 'EnumValueDefinition';\n Kind['INPUT_OBJECT_TYPE_DEFINITION'] = 'InputObjectTypeDefinition';\n Kind['DIRECTIVE_DEFINITION'] = 'DirectiveDefinition';\n Kind['SCHEMA_EXTENSION'] = 'SchemaExtension';\n Kind['SCALAR_TYPE_EXTENSION'] = 'ScalarTypeExtension';\n Kind['OBJECT_TYPE_EXTENSION'] = 'ObjectTypeExtension';\n Kind['INTERFACE_TYPE_EXTENSION'] = 'InterfaceTypeExtension';\n Kind['UNION_TYPE_EXTENSION'] = 'UnionTypeExtension';\n Kind['ENUM_TYPE_EXTENSION'] = 'EnumTypeExtension';\n Kind['INPUT_OBJECT_TYPE_EXTENSION'] = 'InputObjectTypeExtension';\n})(Kind || (Kind = {}));\n\n\n/**\n * The enum type representing the possible kind values of AST nodes.\n *\n * @deprecated Please use `Kind`. Will be remove in v17.\n */\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/graphql/language/kinds.mjs?", + ); + + /***/ + }, + + /***/ 4705: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ YR: () => (/* binding */ visit),\n/* harmony export */ sP: () => (/* binding */ BREAK)\n/* harmony export */ });\n/* unused harmony exports visitInParallel, getEnterLeaveForKind, getVisitFn */\n/* harmony import */ var _jsutils_devAssert_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6286);\n/* harmony import */ var _jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(129);\n/* harmony import */ var _ast_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(475);\n/* harmony import */ var _kinds_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3298);\n\n\n\n\n/**\n * A visitor is provided to visit, it contains the collection of\n * relevant functions to be called during the visitor\'s traversal.\n */\n\nconst BREAK = Object.freeze({});\n/**\n * visit() will walk through an AST using a depth-first traversal, calling\n * the visitor\'s enter function at each node in the traversal, and calling the\n * leave function after visiting that node and all of its child nodes.\n *\n * By returning different values from the enter and leave functions, the\n * behavior of the visitor can be altered, including skipping over a sub-tree of\n * the AST (by returning false), editing the AST by returning a value or null\n * to remove the value, or to stop the whole traversal by returning BREAK.\n *\n * When using visit() to edit an AST, the original AST will not be modified, and\n * a new version of the AST with the changes applied will be returned from the\n * visit function.\n *\n * ```ts\n * const editedAST = visit(ast, {\n * enter(node, key, parent, path, ancestors) {\n * // @return\n * // undefined: no action\n * // false: skip visiting this node\n * // visitor.BREAK: stop visiting altogether\n * // null: delete this node\n * // any value: replace this node with the returned value\n * },\n * leave(node, key, parent, path, ancestors) {\n * // @return\n * // undefined: no action\n * // false: no action\n * // visitor.BREAK: stop visiting altogether\n * // null: delete this node\n * // any value: replace this node with the returned value\n * }\n * });\n * ```\n *\n * Alternatively to providing enter() and leave() functions, a visitor can\n * instead provide functions named the same as the kinds of AST nodes, or\n * enter/leave visitors at a named key, leading to three permutations of the\n * visitor API:\n *\n * 1) Named visitors triggered when entering a node of a specific kind.\n *\n * ```ts\n * visit(ast, {\n * Kind(node) {\n * // enter the "Kind" node\n * }\n * })\n * ```\n *\n * 2) Named visitors that trigger upon entering and leaving a node of a specific kind.\n *\n * ```ts\n * visit(ast, {\n * Kind: {\n * enter(node) {\n * // enter the "Kind" node\n * }\n * leave(node) {\n * // leave the "Kind" node\n * }\n * }\n * })\n * ```\n *\n * 3) Generic visitors that trigger upon entering and leaving any node.\n *\n * ```ts\n * visit(ast, {\n * enter(node) {\n * // enter any node\n * },\n * leave(node) {\n * // leave any node\n * }\n * })\n * ```\n */\n\nfunction visit(root, visitor, visitorKeys = _ast_mjs__WEBPACK_IMPORTED_MODULE_0__/* .QueryDocumentKeys */ .aD) {\n const enterLeaveMap = new Map();\n\n for (const kind of Object.values(_kinds_mjs__WEBPACK_IMPORTED_MODULE_1__/* .Kind */ .b)) {\n enterLeaveMap.set(kind, getEnterLeaveForKind(visitor, kind));\n }\n /* eslint-disable no-undef-init */\n\n let stack = undefined;\n let inArray = Array.isArray(root);\n let keys = [root];\n let index = -1;\n let edits = [];\n let node = root;\n let key = undefined;\n let parent = undefined;\n const path = [];\n const ancestors = [];\n /* eslint-enable no-undef-init */\n\n do {\n index++;\n const isLeaving = index === keys.length;\n const isEdited = isLeaving && edits.length !== 0;\n\n if (isLeaving) {\n key = ancestors.length === 0 ? undefined : path[path.length - 1];\n node = parent;\n parent = ancestors.pop();\n\n if (isEdited) {\n if (inArray) {\n node = node.slice();\n let editOffset = 0;\n\n for (const [editKey, editValue] of edits) {\n const arrayKey = editKey - editOffset;\n\n if (editValue === null) {\n node.splice(arrayKey, 1);\n editOffset++;\n } else {\n node[arrayKey] = editValue;\n }\n }\n } else {\n node = Object.defineProperties(\n {},\n Object.getOwnPropertyDescriptors(node),\n );\n\n for (const [editKey, editValue] of edits) {\n node[editKey] = editValue;\n }\n }\n }\n\n index = stack.index;\n keys = stack.keys;\n edits = stack.edits;\n inArray = stack.inArray;\n stack = stack.prev;\n } else if (parent) {\n key = inArray ? index : keys[index];\n node = parent[key];\n\n if (node === null || node === undefined) {\n continue;\n }\n\n path.push(key);\n }\n\n let result;\n\n if (!Array.isArray(node)) {\n var _enterLeaveMap$get, _enterLeaveMap$get2;\n\n (0,_ast_mjs__WEBPACK_IMPORTED_MODULE_0__/* .isNode */ .Ll)(node) || (0,_jsutils_devAssert_mjs__WEBPACK_IMPORTED_MODULE_2__/* .devAssert */ .U)(false, `Invalid AST Node: ${(0,_jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_3__/* .inspect */ .N)(node)}.`);\n const visitFn = isLeaving\n ? (_enterLeaveMap$get = enterLeaveMap.get(node.kind)) === null ||\n _enterLeaveMap$get === void 0\n ? void 0\n : _enterLeaveMap$get.leave\n : (_enterLeaveMap$get2 = enterLeaveMap.get(node.kind)) === null ||\n _enterLeaveMap$get2 === void 0\n ? void 0\n : _enterLeaveMap$get2.enter;\n result =\n visitFn === null || visitFn === void 0\n ? void 0\n : visitFn.call(visitor, node, key, parent, path, ancestors);\n\n if (result === BREAK) {\n break;\n }\n\n if (result === false) {\n if (!isLeaving) {\n path.pop();\n continue;\n }\n } else if (result !== undefined) {\n edits.push([key, result]);\n\n if (!isLeaving) {\n if ((0,_ast_mjs__WEBPACK_IMPORTED_MODULE_0__/* .isNode */ .Ll)(result)) {\n node = result;\n } else {\n path.pop();\n continue;\n }\n }\n }\n }\n\n if (result === undefined && isEdited) {\n edits.push([key, node]);\n }\n\n if (isLeaving) {\n path.pop();\n } else {\n var _node$kind;\n\n stack = {\n inArray,\n index,\n keys,\n edits,\n prev: stack,\n };\n inArray = Array.isArray(node);\n keys = inArray\n ? node\n : (_node$kind = visitorKeys[node.kind]) !== null &&\n _node$kind !== void 0\n ? _node$kind\n : [];\n index = -1;\n edits = [];\n\n if (parent) {\n ancestors.push(parent);\n }\n\n parent = node;\n }\n } while (stack !== undefined);\n\n if (edits.length !== 0) {\n // New root\n return edits[edits.length - 1][1];\n }\n\n return root;\n}\n/**\n * Creates a new visitor instance which delegates to many visitors to run in\n * parallel. Each visitor will be visited for each node before moving on.\n *\n * If a prior visitor edits a node, no following visitors will see that node.\n */\n\nfunction visitInParallel(visitors) {\n const skipping = new Array(visitors.length).fill(null);\n const mergedVisitor = Object.create(null);\n\n for (const kind of Object.values(Kind)) {\n let hasVisitor = false;\n const enterList = new Array(visitors.length).fill(undefined);\n const leaveList = new Array(visitors.length).fill(undefined);\n\n for (let i = 0; i < visitors.length; ++i) {\n const { enter, leave } = getEnterLeaveForKind(visitors[i], kind);\n hasVisitor || (hasVisitor = enter != null || leave != null);\n enterList[i] = enter;\n leaveList[i] = leave;\n }\n\n if (!hasVisitor) {\n continue;\n }\n\n const mergedEnterLeave = {\n enter(...args) {\n const node = args[0];\n\n for (let i = 0; i < visitors.length; i++) {\n if (skipping[i] === null) {\n var _enterList$i;\n\n const result =\n (_enterList$i = enterList[i]) === null || _enterList$i === void 0\n ? void 0\n : _enterList$i.apply(visitors[i], args);\n\n if (result === false) {\n skipping[i] = node;\n } else if (result === BREAK) {\n skipping[i] = BREAK;\n } else if (result !== undefined) {\n return result;\n }\n }\n }\n },\n\n leave(...args) {\n const node = args[0];\n\n for (let i = 0; i < visitors.length; i++) {\n if (skipping[i] === null) {\n var _leaveList$i;\n\n const result =\n (_leaveList$i = leaveList[i]) === null || _leaveList$i === void 0\n ? void 0\n : _leaveList$i.apply(visitors[i], args);\n\n if (result === BREAK) {\n skipping[i] = BREAK;\n } else if (result !== undefined && result !== false) {\n return result;\n }\n } else if (skipping[i] === node) {\n skipping[i] = null;\n }\n }\n },\n };\n mergedVisitor[kind] = mergedEnterLeave;\n }\n\n return mergedVisitor;\n}\n/**\n * Given a visitor instance and a node kind, return EnterLeaveVisitor for that kind.\n */\n\nfunction getEnterLeaveForKind(visitor, kind) {\n const kindVisitor = visitor[kind];\n\n if (typeof kindVisitor === \'object\') {\n // { Kind: { enter() {}, leave() {} } }\n return kindVisitor;\n } else if (typeof kindVisitor === \'function\') {\n // { Kind() {} }\n return {\n enter: kindVisitor,\n leave: undefined,\n };\n } // { enter() {}, leave() {} }\n\n return {\n enter: visitor.enter,\n leave: visitor.leave,\n };\n}\n/**\n * Given a visitor instance, if it is leaving or not, and a node kind, return\n * the function the visitor runtime should call.\n *\n * @deprecated Please use `getEnterLeaveForKind` instead. Will be removed in v17\n */\n\n/* c8 ignore next 8 */\n\nfunction getVisitFn(visitor, kind, isLeaving) {\n const { enter, leave } = getEnterLeaveForKind(visitor, kind);\n return isLeaving ? leave : enter;\n}\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/graphql/language/visitor.mjs?', + ); + + /***/ + }, + + /***/ 9778: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + "// ESM COMPAT FLAG\n__webpack_require__.r(__webpack_exports__);\n\n// EXPORTS\n__webpack_require__.d(__webpack_exports__, {\n AbortError: () => (/* binding */ AbortError),\n FetchError: () => (/* binding */ FetchError),\n Headers: () => (/* binding */ Headers),\n Request: () => (/* binding */ Request),\n Response: () => (/* binding */ Response),\n \"default\": () => (/* binding */ lib)\n});\n\n// EXTERNAL MODULE: external \"stream\"\nvar external_stream_ = __webpack_require__(2203);\n;// CONCATENATED MODULE: external \"http\"\nconst external_http_namespaceObject = require(\"http\");\n;// CONCATENATED MODULE: external \"url\"\nconst external_url_namespaceObject = require(\"url\");\n// EXTERNAL MODULE: ./node_modules/node-fetch/node_modules/whatwg-url/lib/public-api.js\nvar public_api = __webpack_require__(6862);\n;// CONCATENATED MODULE: external \"https\"\nconst external_https_namespaceObject = require(\"https\");\n;// CONCATENATED MODULE: external \"zlib\"\nconst external_zlib_namespaceObject = require(\"zlib\");\n;// CONCATENATED MODULE: ./node_modules/node-fetch/lib/index.mjs\n\n\n\n\n\n\n\n// Based on https://github.com/tmpvar/jsdom/blob/aa85b2abf07766ff7bf5c1f6daafb3726f2f2db5/lib/jsdom/living/blob.js\n\n// fix for \"Readable\" isn't a named export issue\nconst Readable = external_stream_.Readable;\n\nconst BUFFER = Symbol('buffer');\nconst TYPE = Symbol('type');\n\nclass Blob {\n\tconstructor() {\n\t\tthis[TYPE] = '';\n\n\t\tconst blobParts = arguments[0];\n\t\tconst options = arguments[1];\n\n\t\tconst buffers = [];\n\t\tlet size = 0;\n\n\t\tif (blobParts) {\n\t\t\tconst a = blobParts;\n\t\t\tconst length = Number(a.length);\n\t\t\tfor (let i = 0; i < length; i++) {\n\t\t\t\tconst element = a[i];\n\t\t\t\tlet buffer;\n\t\t\t\tif (element instanceof Buffer) {\n\t\t\t\t\tbuffer = element;\n\t\t\t\t} else if (ArrayBuffer.isView(element)) {\n\t\t\t\t\tbuffer = Buffer.from(element.buffer, element.byteOffset, element.byteLength);\n\t\t\t\t} else if (element instanceof ArrayBuffer) {\n\t\t\t\t\tbuffer = Buffer.from(element);\n\t\t\t\t} else if (element instanceof Blob) {\n\t\t\t\t\tbuffer = element[BUFFER];\n\t\t\t\t} else {\n\t\t\t\t\tbuffer = Buffer.from(typeof element === 'string' ? element : String(element));\n\t\t\t\t}\n\t\t\t\tsize += buffer.length;\n\t\t\t\tbuffers.push(buffer);\n\t\t\t}\n\t\t}\n\n\t\tthis[BUFFER] = Buffer.concat(buffers);\n\n\t\tlet type = options && options.type !== undefined && String(options.type).toLowerCase();\n\t\tif (type && !/[^\\u0020-\\u007E]/.test(type)) {\n\t\t\tthis[TYPE] = type;\n\t\t}\n\t}\n\tget size() {\n\t\treturn this[BUFFER].length;\n\t}\n\tget type() {\n\t\treturn this[TYPE];\n\t}\n\ttext() {\n\t\treturn Promise.resolve(this[BUFFER].toString());\n\t}\n\tarrayBuffer() {\n\t\tconst buf = this[BUFFER];\n\t\tconst ab = buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength);\n\t\treturn Promise.resolve(ab);\n\t}\n\tstream() {\n\t\tconst readable = new Readable();\n\t\treadable._read = function () {};\n\t\treadable.push(this[BUFFER]);\n\t\treadable.push(null);\n\t\treturn readable;\n\t}\n\ttoString() {\n\t\treturn '[object Blob]';\n\t}\n\tslice() {\n\t\tconst size = this.size;\n\n\t\tconst start = arguments[0];\n\t\tconst end = arguments[1];\n\t\tlet relativeStart, relativeEnd;\n\t\tif (start === undefined) {\n\t\t\trelativeStart = 0;\n\t\t} else if (start < 0) {\n\t\t\trelativeStart = Math.max(size + start, 0);\n\t\t} else {\n\t\t\trelativeStart = Math.min(start, size);\n\t\t}\n\t\tif (end === undefined) {\n\t\t\trelativeEnd = size;\n\t\t} else if (end < 0) {\n\t\t\trelativeEnd = Math.max(size + end, 0);\n\t\t} else {\n\t\t\trelativeEnd = Math.min(end, size);\n\t\t}\n\t\tconst span = Math.max(relativeEnd - relativeStart, 0);\n\n\t\tconst buffer = this[BUFFER];\n\t\tconst slicedBuffer = buffer.slice(relativeStart, relativeStart + span);\n\t\tconst blob = new Blob([], { type: arguments[2] });\n\t\tblob[BUFFER] = slicedBuffer;\n\t\treturn blob;\n\t}\n}\n\nObject.defineProperties(Blob.prototype, {\n\tsize: { enumerable: true },\n\ttype: { enumerable: true },\n\tslice: { enumerable: true }\n});\n\nObject.defineProperty(Blob.prototype, Symbol.toStringTag, {\n\tvalue: 'Blob',\n\twritable: false,\n\tenumerable: false,\n\tconfigurable: true\n});\n\n/**\n * fetch-error.js\n *\n * FetchError interface for operational errors\n */\n\n/**\n * Create FetchError instance\n *\n * @param String message Error message for human\n * @param String type Error type for machine\n * @param String systemError For Node.js system error\n * @return FetchError\n */\nfunction FetchError(message, type, systemError) {\n Error.call(this, message);\n\n this.message = message;\n this.type = type;\n\n // when err.type is `system`, err.code contains system error code\n if (systemError) {\n this.code = this.errno = systemError.code;\n }\n\n // hide custom error implementation details from end-users\n Error.captureStackTrace(this, this.constructor);\n}\n\nFetchError.prototype = Object.create(Error.prototype);\nFetchError.prototype.constructor = FetchError;\nFetchError.prototype.name = 'FetchError';\n\nlet convert;\ntry {\n\tconvert = require('encoding').convert;\n} catch (e) {}\n\nconst INTERNALS = Symbol('Body internals');\n\n// fix an issue where \"PassThrough\" isn't a named export for node <10\nconst PassThrough = external_stream_.PassThrough;\n\n/**\n * Body mixin\n *\n * Ref: https://fetch.spec.whatwg.org/#body\n *\n * @param Stream body Readable stream\n * @param Object opts Response options\n * @return Void\n */\nfunction Body(body) {\n\tvar _this = this;\n\n\tvar _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n\t _ref$size = _ref.size;\n\n\tlet size = _ref$size === undefined ? 0 : _ref$size;\n\tvar _ref$timeout = _ref.timeout;\n\tlet timeout = _ref$timeout === undefined ? 0 : _ref$timeout;\n\n\tif (body == null) {\n\t\t// body is undefined or null\n\t\tbody = null;\n\t} else if (isURLSearchParams(body)) {\n\t\t// body is a URLSearchParams\n\t\tbody = Buffer.from(body.toString());\n\t} else if (isBlob(body)) ; else if (Buffer.isBuffer(body)) ; else if (Object.prototype.toString.call(body) === '[object ArrayBuffer]') {\n\t\t// body is ArrayBuffer\n\t\tbody = Buffer.from(body);\n\t} else if (ArrayBuffer.isView(body)) {\n\t\t// body is ArrayBufferView\n\t\tbody = Buffer.from(body.buffer, body.byteOffset, body.byteLength);\n\t} else if (body instanceof external_stream_) ; else {\n\t\t// none of the above\n\t\t// coerce to string then buffer\n\t\tbody = Buffer.from(String(body));\n\t}\n\tthis[INTERNALS] = {\n\t\tbody,\n\t\tdisturbed: false,\n\t\terror: null\n\t};\n\tthis.size = size;\n\tthis.timeout = timeout;\n\n\tif (body instanceof external_stream_) {\n\t\tbody.on('error', function (err) {\n\t\t\tconst error = err.name === 'AbortError' ? err : new FetchError(`Invalid response body while trying to fetch ${_this.url}: ${err.message}`, 'system', err);\n\t\t\t_this[INTERNALS].error = error;\n\t\t});\n\t}\n}\n\nBody.prototype = {\n\tget body() {\n\t\treturn this[INTERNALS].body;\n\t},\n\n\tget bodyUsed() {\n\t\treturn this[INTERNALS].disturbed;\n\t},\n\n\t/**\n * Decode response as ArrayBuffer\n *\n * @return Promise\n */\n\tarrayBuffer() {\n\t\treturn consumeBody.call(this).then(function (buf) {\n\t\t\treturn buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength);\n\t\t});\n\t},\n\n\t/**\n * Return raw response as Blob\n *\n * @return Promise\n */\n\tblob() {\n\t\tlet ct = this.headers && this.headers.get('content-type') || '';\n\t\treturn consumeBody.call(this).then(function (buf) {\n\t\t\treturn Object.assign(\n\t\t\t// Prevent copying\n\t\t\tnew Blob([], {\n\t\t\t\ttype: ct.toLowerCase()\n\t\t\t}), {\n\t\t\t\t[BUFFER]: buf\n\t\t\t});\n\t\t});\n\t},\n\n\t/**\n * Decode response as json\n *\n * @return Promise\n */\n\tjson() {\n\t\tvar _this2 = this;\n\n\t\treturn consumeBody.call(this).then(function (buffer) {\n\t\t\ttry {\n\t\t\t\treturn JSON.parse(buffer.toString());\n\t\t\t} catch (err) {\n\t\t\t\treturn Body.Promise.reject(new FetchError(`invalid json response body at ${_this2.url} reason: ${err.message}`, 'invalid-json'));\n\t\t\t}\n\t\t});\n\t},\n\n\t/**\n * Decode response as text\n *\n * @return Promise\n */\n\ttext() {\n\t\treturn consumeBody.call(this).then(function (buffer) {\n\t\t\treturn buffer.toString();\n\t\t});\n\t},\n\n\t/**\n * Decode response as buffer (non-spec api)\n *\n * @return Promise\n */\n\tbuffer() {\n\t\treturn consumeBody.call(this);\n\t},\n\n\t/**\n * Decode response as text, while automatically detecting the encoding and\n * trying to decode to UTF-8 (non-spec api)\n *\n * @return Promise\n */\n\ttextConverted() {\n\t\tvar _this3 = this;\n\n\t\treturn consumeBody.call(this).then(function (buffer) {\n\t\t\treturn convertBody(buffer, _this3.headers);\n\t\t});\n\t}\n};\n\n// In browsers, all properties are enumerable.\nObject.defineProperties(Body.prototype, {\n\tbody: { enumerable: true },\n\tbodyUsed: { enumerable: true },\n\tarrayBuffer: { enumerable: true },\n\tblob: { enumerable: true },\n\tjson: { enumerable: true },\n\ttext: { enumerable: true }\n});\n\nBody.mixIn = function (proto) {\n\tfor (const name of Object.getOwnPropertyNames(Body.prototype)) {\n\t\t// istanbul ignore else: future proof\n\t\tif (!(name in proto)) {\n\t\t\tconst desc = Object.getOwnPropertyDescriptor(Body.prototype, name);\n\t\t\tObject.defineProperty(proto, name, desc);\n\t\t}\n\t}\n};\n\n/**\n * Consume and convert an entire Body to a Buffer.\n *\n * Ref: https://fetch.spec.whatwg.org/#concept-body-consume-body\n *\n * @return Promise\n */\nfunction consumeBody() {\n\tvar _this4 = this;\n\n\tif (this[INTERNALS].disturbed) {\n\t\treturn Body.Promise.reject(new TypeError(`body used already for: ${this.url}`));\n\t}\n\n\tthis[INTERNALS].disturbed = true;\n\n\tif (this[INTERNALS].error) {\n\t\treturn Body.Promise.reject(this[INTERNALS].error);\n\t}\n\n\tlet body = this.body;\n\n\t// body is null\n\tif (body === null) {\n\t\treturn Body.Promise.resolve(Buffer.alloc(0));\n\t}\n\n\t// body is blob\n\tif (isBlob(body)) {\n\t\tbody = body.stream();\n\t}\n\n\t// body is buffer\n\tif (Buffer.isBuffer(body)) {\n\t\treturn Body.Promise.resolve(body);\n\t}\n\n\t// istanbul ignore if: should never happen\n\tif (!(body instanceof external_stream_)) {\n\t\treturn Body.Promise.resolve(Buffer.alloc(0));\n\t}\n\n\t// body is stream\n\t// get ready to actually consume the body\n\tlet accum = [];\n\tlet accumBytes = 0;\n\tlet abort = false;\n\n\treturn new Body.Promise(function (resolve, reject) {\n\t\tlet resTimeout;\n\n\t\t// allow timeout on slow response body\n\t\tif (_this4.timeout) {\n\t\t\tresTimeout = setTimeout(function () {\n\t\t\t\tabort = true;\n\t\t\t\treject(new FetchError(`Response timeout while trying to fetch ${_this4.url} (over ${_this4.timeout}ms)`, 'body-timeout'));\n\t\t\t}, _this4.timeout);\n\t\t}\n\n\t\t// handle stream errors\n\t\tbody.on('error', function (err) {\n\t\t\tif (err.name === 'AbortError') {\n\t\t\t\t// if the request was aborted, reject with this Error\n\t\t\t\tabort = true;\n\t\t\t\treject(err);\n\t\t\t} else {\n\t\t\t\t// other errors, such as incorrect content-encoding\n\t\t\t\treject(new FetchError(`Invalid response body while trying to fetch ${_this4.url}: ${err.message}`, 'system', err));\n\t\t\t}\n\t\t});\n\n\t\tbody.on('data', function (chunk) {\n\t\t\tif (abort || chunk === null) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (_this4.size && accumBytes + chunk.length > _this4.size) {\n\t\t\t\tabort = true;\n\t\t\t\treject(new FetchError(`content size at ${_this4.url} over limit: ${_this4.size}`, 'max-size'));\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\taccumBytes += chunk.length;\n\t\t\taccum.push(chunk);\n\t\t});\n\n\t\tbody.on('end', function () {\n\t\t\tif (abort) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tclearTimeout(resTimeout);\n\n\t\t\ttry {\n\t\t\t\tresolve(Buffer.concat(accum, accumBytes));\n\t\t\t} catch (err) {\n\t\t\t\t// handle streams that have accumulated too much data (issue #414)\n\t\t\t\treject(new FetchError(`Could not create Buffer from response body for ${_this4.url}: ${err.message}`, 'system', err));\n\t\t\t}\n\t\t});\n\t});\n}\n\n/**\n * Detect buffer encoding and convert to target encoding\n * ref: http://www.w3.org/TR/2011/WD-html5-20110113/parsing.html#determining-the-character-encoding\n *\n * @param Buffer buffer Incoming buffer\n * @param String encoding Target encoding\n * @return String\n */\nfunction convertBody(buffer, headers) {\n\tif (typeof convert !== 'function') {\n\t\tthrow new Error('The package `encoding` must be installed to use the textConverted() function');\n\t}\n\n\tconst ct = headers.get('content-type');\n\tlet charset = 'utf-8';\n\tlet res, str;\n\n\t// header\n\tif (ct) {\n\t\tres = /charset=([^;]*)/i.exec(ct);\n\t}\n\n\t// no charset in content type, peek at response body for at most 1024 bytes\n\tstr = buffer.slice(0, 1024).toString();\n\n\t// html5\n\tif (!res && str) {\n\t\tres = /<meta.+?charset=(['\"])(.+?)\\1/i.exec(str);\n\t}\n\n\t// html4\n\tif (!res && str) {\n\t\tres = /<meta[\\s]+?http-equiv=(['\"])content-type\\1[\\s]+?content=(['\"])(.+?)\\2/i.exec(str);\n\t\tif (!res) {\n\t\t\tres = /<meta[\\s]+?content=(['\"])(.+?)\\1[\\s]+?http-equiv=(['\"])content-type\\3/i.exec(str);\n\t\t\tif (res) {\n\t\t\t\tres.pop(); // drop last quote\n\t\t\t}\n\t\t}\n\n\t\tif (res) {\n\t\t\tres = /charset=(.*)/i.exec(res.pop());\n\t\t}\n\t}\n\n\t// xml\n\tif (!res && str) {\n\t\tres = /<\\?xml.+?encoding=(['\"])(.+?)\\1/i.exec(str);\n\t}\n\n\t// found charset\n\tif (res) {\n\t\tcharset = res.pop();\n\n\t\t// prevent decode issues when sites use incorrect encoding\n\t\t// ref: https://hsivonen.fi/encoding-menu/\n\t\tif (charset === 'gb2312' || charset === 'gbk') {\n\t\t\tcharset = 'gb18030';\n\t\t}\n\t}\n\n\t// turn raw buffers into a single utf-8 buffer\n\treturn convert(buffer, 'UTF-8', charset).toString();\n}\n\n/**\n * Detect a URLSearchParams object\n * ref: https://github.com/bitinn/node-fetch/issues/296#issuecomment-307598143\n *\n * @param Object obj Object to detect by type or brand\n * @return String\n */\nfunction isURLSearchParams(obj) {\n\t// Duck-typing as a necessary condition.\n\tif (typeof obj !== 'object' || typeof obj.append !== 'function' || typeof obj.delete !== 'function' || typeof obj.get !== 'function' || typeof obj.getAll !== 'function' || typeof obj.has !== 'function' || typeof obj.set !== 'function') {\n\t\treturn false;\n\t}\n\n\t// Brand-checking and more duck-typing as optional condition.\n\treturn obj.constructor.name === 'URLSearchParams' || Object.prototype.toString.call(obj) === '[object URLSearchParams]' || typeof obj.sort === 'function';\n}\n\n/**\n * Check if `obj` is a W3C `Blob` object (which `File` inherits from)\n * @param {*} obj\n * @return {boolean}\n */\nfunction isBlob(obj) {\n\treturn typeof obj === 'object' && typeof obj.arrayBuffer === 'function' && typeof obj.type === 'string' && typeof obj.stream === 'function' && typeof obj.constructor === 'function' && typeof obj.constructor.name === 'string' && /^(Blob|File)$/.test(obj.constructor.name) && /^(Blob|File)$/.test(obj[Symbol.toStringTag]);\n}\n\n/**\n * Clone body given Res/Req instance\n *\n * @param Mixed instance Response or Request instance\n * @return Mixed\n */\nfunction clone(instance) {\n\tlet p1, p2;\n\tlet body = instance.body;\n\n\t// don't allow cloning a used body\n\tif (instance.bodyUsed) {\n\t\tthrow new Error('cannot clone body after it is used');\n\t}\n\n\t// check that body is a stream and not form-data object\n\t// note: we can't clone the form-data object without having it as a dependency\n\tif (body instanceof external_stream_ && typeof body.getBoundary !== 'function') {\n\t\t// tee instance body\n\t\tp1 = new PassThrough();\n\t\tp2 = new PassThrough();\n\t\tbody.pipe(p1);\n\t\tbody.pipe(p2);\n\t\t// set instance body to teed body and return the other teed body\n\t\tinstance[INTERNALS].body = p1;\n\t\tbody = p2;\n\t}\n\n\treturn body;\n}\n\n/**\n * Performs the operation \"extract a `Content-Type` value from |object|\" as\n * specified in the specification:\n * https://fetch.spec.whatwg.org/#concept-bodyinit-extract\n *\n * This function assumes that instance.body is present.\n *\n * @param Mixed instance Any options.body input\n */\nfunction extractContentType(body) {\n\tif (body === null) {\n\t\t// body is null\n\t\treturn null;\n\t} else if (typeof body === 'string') {\n\t\t// body is string\n\t\treturn 'text/plain;charset=UTF-8';\n\t} else if (isURLSearchParams(body)) {\n\t\t// body is a URLSearchParams\n\t\treturn 'application/x-www-form-urlencoded;charset=UTF-8';\n\t} else if (isBlob(body)) {\n\t\t// body is blob\n\t\treturn body.type || null;\n\t} else if (Buffer.isBuffer(body)) {\n\t\t// body is buffer\n\t\treturn null;\n\t} else if (Object.prototype.toString.call(body) === '[object ArrayBuffer]') {\n\t\t// body is ArrayBuffer\n\t\treturn null;\n\t} else if (ArrayBuffer.isView(body)) {\n\t\t// body is ArrayBufferView\n\t\treturn null;\n\t} else if (typeof body.getBoundary === 'function') {\n\t\t// detect form data input from form-data module\n\t\treturn `multipart/form-data;boundary=${body.getBoundary()}`;\n\t} else if (body instanceof external_stream_) {\n\t\t// body is stream\n\t\t// can't really do much about this\n\t\treturn null;\n\t} else {\n\t\t// Body constructor defaults other things to string\n\t\treturn 'text/plain;charset=UTF-8';\n\t}\n}\n\n/**\n * The Fetch Standard treats this as if \"total bytes\" is a property on the body.\n * For us, we have to explicitly get it with a function.\n *\n * ref: https://fetch.spec.whatwg.org/#concept-body-total-bytes\n *\n * @param Body instance Instance of Body\n * @return Number? Number of bytes, or null if not possible\n */\nfunction getTotalBytes(instance) {\n\tconst body = instance.body;\n\n\n\tif (body === null) {\n\t\t// body is null\n\t\treturn 0;\n\t} else if (isBlob(body)) {\n\t\treturn body.size;\n\t} else if (Buffer.isBuffer(body)) {\n\t\t// body is buffer\n\t\treturn body.length;\n\t} else if (body && typeof body.getLengthSync === 'function') {\n\t\t// detect form data input from form-data module\n\t\tif (body._lengthRetrievers && body._lengthRetrievers.length == 0 || // 1.x\n\t\tbody.hasKnownLength && body.hasKnownLength()) {\n\t\t\t// 2.x\n\t\t\treturn body.getLengthSync();\n\t\t}\n\t\treturn null;\n\t} else {\n\t\t// body is stream\n\t\treturn null;\n\t}\n}\n\n/**\n * Write a Body to a Node.js WritableStream (e.g. http.Request) object.\n *\n * @param Body instance Instance of Body\n * @return Void\n */\nfunction writeToStream(dest, instance) {\n\tconst body = instance.body;\n\n\n\tif (body === null) {\n\t\t// body is null\n\t\tdest.end();\n\t} else if (isBlob(body)) {\n\t\tbody.stream().pipe(dest);\n\t} else if (Buffer.isBuffer(body)) {\n\t\t// body is buffer\n\t\tdest.write(body);\n\t\tdest.end();\n\t} else {\n\t\t// body is stream\n\t\tbody.pipe(dest);\n\t}\n}\n\n// expose Promise\nBody.Promise = global.Promise;\n\n/**\n * headers.js\n *\n * Headers class offers convenient helpers\n */\n\nconst invalidTokenRegex = /[^\\^_`a-zA-Z\\-0-9!#$%&'*+.|~]/;\nconst invalidHeaderCharRegex = /[^\\t\\x20-\\x7e\\x80-\\xff]/;\n\nfunction validateName(name) {\n\tname = `${name}`;\n\tif (invalidTokenRegex.test(name) || name === '') {\n\t\tthrow new TypeError(`${name} is not a legal HTTP header name`);\n\t}\n}\n\nfunction validateValue(value) {\n\tvalue = `${value}`;\n\tif (invalidHeaderCharRegex.test(value)) {\n\t\tthrow new TypeError(`${value} is not a legal HTTP header value`);\n\t}\n}\n\n/**\n * Find the key in the map object given a header name.\n *\n * Returns undefined if not found.\n *\n * @param String name Header name\n * @return String|Undefined\n */\nfunction find(map, name) {\n\tname = name.toLowerCase();\n\tfor (const key in map) {\n\t\tif (key.toLowerCase() === name) {\n\t\t\treturn key;\n\t\t}\n\t}\n\treturn undefined;\n}\n\nconst MAP = Symbol('map');\nclass Headers {\n\t/**\n * Headers class\n *\n * @param Object headers Response headers\n * @return Void\n */\n\tconstructor() {\n\t\tlet init = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;\n\n\t\tthis[MAP] = Object.create(null);\n\n\t\tif (init instanceof Headers) {\n\t\t\tconst rawHeaders = init.raw();\n\t\t\tconst headerNames = Object.keys(rawHeaders);\n\n\t\t\tfor (const headerName of headerNames) {\n\t\t\t\tfor (const value of rawHeaders[headerName]) {\n\t\t\t\t\tthis.append(headerName, value);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\t// We don't worry about converting prop to ByteString here as append()\n\t\t// will handle it.\n\t\tif (init == null) ; else if (typeof init === 'object') {\n\t\t\tconst method = init[Symbol.iterator];\n\t\t\tif (method != null) {\n\t\t\t\tif (typeof method !== 'function') {\n\t\t\t\t\tthrow new TypeError('Header pairs must be iterable');\n\t\t\t\t}\n\n\t\t\t\t// sequence<sequence<ByteString>>\n\t\t\t\t// Note: per spec we have to first exhaust the lists then process them\n\t\t\t\tconst pairs = [];\n\t\t\t\tfor (const pair of init) {\n\t\t\t\t\tif (typeof pair !== 'object' || typeof pair[Symbol.iterator] !== 'function') {\n\t\t\t\t\t\tthrow new TypeError('Each header pair must be iterable');\n\t\t\t\t\t}\n\t\t\t\t\tpairs.push(Array.from(pair));\n\t\t\t\t}\n\n\t\t\t\tfor (const pair of pairs) {\n\t\t\t\t\tif (pair.length !== 2) {\n\t\t\t\t\t\tthrow new TypeError('Each header pair must be a name/value tuple');\n\t\t\t\t\t}\n\t\t\t\t\tthis.append(pair[0], pair[1]);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// record<ByteString, ByteString>\n\t\t\t\tfor (const key of Object.keys(init)) {\n\t\t\t\t\tconst value = init[key];\n\t\t\t\t\tthis.append(key, value);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tthrow new TypeError('Provided initializer must be an object');\n\t\t}\n\t}\n\n\t/**\n * Return combined header value given name\n *\n * @param String name Header name\n * @return Mixed\n */\n\tget(name) {\n\t\tname = `${name}`;\n\t\tvalidateName(name);\n\t\tconst key = find(this[MAP], name);\n\t\tif (key === undefined) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn this[MAP][key].join(', ');\n\t}\n\n\t/**\n * Iterate over all headers\n *\n * @param Function callback Executed for each item with parameters (value, name, thisArg)\n * @param Boolean thisArg `this` context for callback function\n * @return Void\n */\n\tforEach(callback) {\n\t\tlet thisArg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined;\n\n\t\tlet pairs = getHeaders(this);\n\t\tlet i = 0;\n\t\twhile (i < pairs.length) {\n\t\t\tvar _pairs$i = pairs[i];\n\t\t\tconst name = _pairs$i[0],\n\t\t\t value = _pairs$i[1];\n\n\t\t\tcallback.call(thisArg, value, name, this);\n\t\t\tpairs = getHeaders(this);\n\t\t\ti++;\n\t\t}\n\t}\n\n\t/**\n * Overwrite header values given name\n *\n * @param String name Header name\n * @param String value Header value\n * @return Void\n */\n\tset(name, value) {\n\t\tname = `${name}`;\n\t\tvalue = `${value}`;\n\t\tvalidateName(name);\n\t\tvalidateValue(value);\n\t\tconst key = find(this[MAP], name);\n\t\tthis[MAP][key !== undefined ? key : name] = [value];\n\t}\n\n\t/**\n * Append a value onto existing header\n *\n * @param String name Header name\n * @param String value Header value\n * @return Void\n */\n\tappend(name, value) {\n\t\tname = `${name}`;\n\t\tvalue = `${value}`;\n\t\tvalidateName(name);\n\t\tvalidateValue(value);\n\t\tconst key = find(this[MAP], name);\n\t\tif (key !== undefined) {\n\t\t\tthis[MAP][key].push(value);\n\t\t} else {\n\t\t\tthis[MAP][name] = [value];\n\t\t}\n\t}\n\n\t/**\n * Check for header name existence\n *\n * @param String name Header name\n * @return Boolean\n */\n\thas(name) {\n\t\tname = `${name}`;\n\t\tvalidateName(name);\n\t\treturn find(this[MAP], name) !== undefined;\n\t}\n\n\t/**\n * Delete all header values given name\n *\n * @param String name Header name\n * @return Void\n */\n\tdelete(name) {\n\t\tname = `${name}`;\n\t\tvalidateName(name);\n\t\tconst key = find(this[MAP], name);\n\t\tif (key !== undefined) {\n\t\t\tdelete this[MAP][key];\n\t\t}\n\t}\n\n\t/**\n * Return raw headers (non-spec api)\n *\n * @return Object\n */\n\traw() {\n\t\treturn this[MAP];\n\t}\n\n\t/**\n * Get an iterator on keys.\n *\n * @return Iterator\n */\n\tkeys() {\n\t\treturn createHeadersIterator(this, 'key');\n\t}\n\n\t/**\n * Get an iterator on values.\n *\n * @return Iterator\n */\n\tvalues() {\n\t\treturn createHeadersIterator(this, 'value');\n\t}\n\n\t/**\n * Get an iterator on entries.\n *\n * This is the default iterator of the Headers object.\n *\n * @return Iterator\n */\n\t[Symbol.iterator]() {\n\t\treturn createHeadersIterator(this, 'key+value');\n\t}\n}\nHeaders.prototype.entries = Headers.prototype[Symbol.iterator];\n\nObject.defineProperty(Headers.prototype, Symbol.toStringTag, {\n\tvalue: 'Headers',\n\twritable: false,\n\tenumerable: false,\n\tconfigurable: true\n});\n\nObject.defineProperties(Headers.prototype, {\n\tget: { enumerable: true },\n\tforEach: { enumerable: true },\n\tset: { enumerable: true },\n\tappend: { enumerable: true },\n\thas: { enumerable: true },\n\tdelete: { enumerable: true },\n\tkeys: { enumerable: true },\n\tvalues: { enumerable: true },\n\tentries: { enumerable: true }\n});\n\nfunction getHeaders(headers) {\n\tlet kind = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'key+value';\n\n\tconst keys = Object.keys(headers[MAP]).sort();\n\treturn keys.map(kind === 'key' ? function (k) {\n\t\treturn k.toLowerCase();\n\t} : kind === 'value' ? function (k) {\n\t\treturn headers[MAP][k].join(', ');\n\t} : function (k) {\n\t\treturn [k.toLowerCase(), headers[MAP][k].join(', ')];\n\t});\n}\n\nconst INTERNAL = Symbol('internal');\n\nfunction createHeadersIterator(target, kind) {\n\tconst iterator = Object.create(HeadersIteratorPrototype);\n\titerator[INTERNAL] = {\n\t\ttarget,\n\t\tkind,\n\t\tindex: 0\n\t};\n\treturn iterator;\n}\n\nconst HeadersIteratorPrototype = Object.setPrototypeOf({\n\tnext() {\n\t\t// istanbul ignore if\n\t\tif (!this || Object.getPrototypeOf(this) !== HeadersIteratorPrototype) {\n\t\t\tthrow new TypeError('Value of `this` is not a HeadersIterator');\n\t\t}\n\n\t\tvar _INTERNAL = this[INTERNAL];\n\t\tconst target = _INTERNAL.target,\n\t\t kind = _INTERNAL.kind,\n\t\t index = _INTERNAL.index;\n\n\t\tconst values = getHeaders(target, kind);\n\t\tconst len = values.length;\n\t\tif (index >= len) {\n\t\t\treturn {\n\t\t\t\tvalue: undefined,\n\t\t\t\tdone: true\n\t\t\t};\n\t\t}\n\n\t\tthis[INTERNAL].index = index + 1;\n\n\t\treturn {\n\t\t\tvalue: values[index],\n\t\t\tdone: false\n\t\t};\n\t}\n}, Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())));\n\nObject.defineProperty(HeadersIteratorPrototype, Symbol.toStringTag, {\n\tvalue: 'HeadersIterator',\n\twritable: false,\n\tenumerable: false,\n\tconfigurable: true\n});\n\n/**\n * Export the Headers object in a form that Node.js can consume.\n *\n * @param Headers headers\n * @return Object\n */\nfunction exportNodeCompatibleHeaders(headers) {\n\tconst obj = Object.assign({ __proto__: null }, headers[MAP]);\n\n\t// http.request() only supports string as Host header. This hack makes\n\t// specifying custom Host header possible.\n\tconst hostHeaderKey = find(headers[MAP], 'Host');\n\tif (hostHeaderKey !== undefined) {\n\t\tobj[hostHeaderKey] = obj[hostHeaderKey][0];\n\t}\n\n\treturn obj;\n}\n\n/**\n * Create a Headers object from an object of headers, ignoring those that do\n * not conform to HTTP grammar productions.\n *\n * @param Object obj Object of headers\n * @return Headers\n */\nfunction createHeadersLenient(obj) {\n\tconst headers = new Headers();\n\tfor (const name of Object.keys(obj)) {\n\t\tif (invalidTokenRegex.test(name)) {\n\t\t\tcontinue;\n\t\t}\n\t\tif (Array.isArray(obj[name])) {\n\t\t\tfor (const val of obj[name]) {\n\t\t\t\tif (invalidHeaderCharRegex.test(val)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (headers[MAP][name] === undefined) {\n\t\t\t\t\theaders[MAP][name] = [val];\n\t\t\t\t} else {\n\t\t\t\t\theaders[MAP][name].push(val);\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (!invalidHeaderCharRegex.test(obj[name])) {\n\t\t\theaders[MAP][name] = [obj[name]];\n\t\t}\n\t}\n\treturn headers;\n}\n\nconst INTERNALS$1 = Symbol('Response internals');\n\n// fix an issue where \"STATUS_CODES\" aren't a named export for node <10\nconst STATUS_CODES = external_http_namespaceObject.STATUS_CODES;\n\n/**\n * Response class\n *\n * @param Stream body Readable stream\n * @param Object opts Response options\n * @return Void\n */\nclass Response {\n\tconstructor() {\n\t\tlet body = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n\t\tlet opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n\t\tBody.call(this, body, opts);\n\n\t\tconst status = opts.status || 200;\n\t\tconst headers = new Headers(opts.headers);\n\n\t\tif (body != null && !headers.has('Content-Type')) {\n\t\t\tconst contentType = extractContentType(body);\n\t\t\tif (contentType) {\n\t\t\t\theaders.append('Content-Type', contentType);\n\t\t\t}\n\t\t}\n\n\t\tthis[INTERNALS$1] = {\n\t\t\turl: opts.url,\n\t\t\tstatus,\n\t\t\tstatusText: opts.statusText || STATUS_CODES[status],\n\t\t\theaders,\n\t\t\tcounter: opts.counter\n\t\t};\n\t}\n\n\tget url() {\n\t\treturn this[INTERNALS$1].url || '';\n\t}\n\n\tget status() {\n\t\treturn this[INTERNALS$1].status;\n\t}\n\n\t/**\n * Convenience property representing if the request ended normally\n */\n\tget ok() {\n\t\treturn this[INTERNALS$1].status >= 200 && this[INTERNALS$1].status < 300;\n\t}\n\n\tget redirected() {\n\t\treturn this[INTERNALS$1].counter > 0;\n\t}\n\n\tget statusText() {\n\t\treturn this[INTERNALS$1].statusText;\n\t}\n\n\tget headers() {\n\t\treturn this[INTERNALS$1].headers;\n\t}\n\n\t/**\n * Clone this response\n *\n * @return Response\n */\n\tclone() {\n\t\treturn new Response(clone(this), {\n\t\t\turl: this.url,\n\t\t\tstatus: this.status,\n\t\t\tstatusText: this.statusText,\n\t\t\theaders: this.headers,\n\t\t\tok: this.ok,\n\t\t\tredirected: this.redirected\n\t\t});\n\t}\n}\n\nBody.mixIn(Response.prototype);\n\nObject.defineProperties(Response.prototype, {\n\turl: { enumerable: true },\n\tstatus: { enumerable: true },\n\tok: { enumerable: true },\n\tredirected: { enumerable: true },\n\tstatusText: { enumerable: true },\n\theaders: { enumerable: true },\n\tclone: { enumerable: true }\n});\n\nObject.defineProperty(Response.prototype, Symbol.toStringTag, {\n\tvalue: 'Response',\n\twritable: false,\n\tenumerable: false,\n\tconfigurable: true\n});\n\nconst INTERNALS$2 = Symbol('Request internals');\nconst URL = external_url_namespaceObject.URL || public_api.URL;\n\n// fix an issue where \"format\", \"parse\" aren't a named export for node <10\nconst parse_url = external_url_namespaceObject.parse;\nconst format_url = external_url_namespaceObject.format;\n\n/**\n * Wrapper around `new URL` to handle arbitrary URLs\n *\n * @param {string} urlStr\n * @return {void}\n */\nfunction parseURL(urlStr) {\n\t/*\n \tCheck whether the URL is absolute or not\n \t\tScheme: https://tools.ietf.org/html/rfc3986#section-3.1\n \tAbsolute URL: https://tools.ietf.org/html/rfc3986#section-4.3\n */\n\tif (/^[a-zA-Z][a-zA-Z\\d+\\-.]*:/.exec(urlStr)) {\n\t\turlStr = new URL(urlStr).toString();\n\t}\n\n\t// Fallback to old implementation for arbitrary URLs\n\treturn parse_url(urlStr);\n}\n\nconst streamDestructionSupported = \"destroy\" in external_stream_.Readable.prototype;\n\n/**\n * Check if a value is an instance of Request.\n *\n * @param Mixed input\n * @return Boolean\n */\nfunction isRequest(input) {\n\treturn typeof input === 'object' && typeof input[INTERNALS$2] === 'object';\n}\n\nfunction isAbortSignal(signal) {\n\tconst proto = signal && typeof signal === 'object' && Object.getPrototypeOf(signal);\n\treturn !!(proto && proto.constructor.name === 'AbortSignal');\n}\n\n/**\n * Request class\n *\n * @param Mixed input Url or Request instance\n * @param Object init Custom options\n * @return Void\n */\nclass Request {\n\tconstructor(input) {\n\t\tlet init = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n\t\tlet parsedURL;\n\n\t\t// normalize input\n\t\tif (!isRequest(input)) {\n\t\t\tif (input && input.href) {\n\t\t\t\t// in order to support Node.js' Url objects; though WHATWG's URL objects\n\t\t\t\t// will fall into this branch also (since their `toString()` will return\n\t\t\t\t// `href` property anyway)\n\t\t\t\tparsedURL = parseURL(input.href);\n\t\t\t} else {\n\t\t\t\t// coerce input to a string before attempting to parse\n\t\t\t\tparsedURL = parseURL(`${input}`);\n\t\t\t}\n\t\t\tinput = {};\n\t\t} else {\n\t\t\tparsedURL = parseURL(input.url);\n\t\t}\n\n\t\tlet method = init.method || input.method || 'GET';\n\t\tmethod = method.toUpperCase();\n\n\t\tif ((init.body != null || isRequest(input) && input.body !== null) && (method === 'GET' || method === 'HEAD')) {\n\t\t\tthrow new TypeError('Request with GET/HEAD method cannot have body');\n\t\t}\n\n\t\tlet inputBody = init.body != null ? init.body : isRequest(input) && input.body !== null ? clone(input) : null;\n\n\t\tBody.call(this, inputBody, {\n\t\t\ttimeout: init.timeout || input.timeout || 0,\n\t\t\tsize: init.size || input.size || 0\n\t\t});\n\n\t\tconst headers = new Headers(init.headers || input.headers || {});\n\n\t\tif (inputBody != null && !headers.has('Content-Type')) {\n\t\t\tconst contentType = extractContentType(inputBody);\n\t\t\tif (contentType) {\n\t\t\t\theaders.append('Content-Type', contentType);\n\t\t\t}\n\t\t}\n\n\t\tlet signal = isRequest(input) ? input.signal : null;\n\t\tif ('signal' in init) signal = init.signal;\n\n\t\tif (signal != null && !isAbortSignal(signal)) {\n\t\t\tthrow new TypeError('Expected signal to be an instanceof AbortSignal');\n\t\t}\n\n\t\tthis[INTERNALS$2] = {\n\t\t\tmethod,\n\t\t\tredirect: init.redirect || input.redirect || 'follow',\n\t\t\theaders,\n\t\t\tparsedURL,\n\t\t\tsignal\n\t\t};\n\n\t\t// node-fetch-only options\n\t\tthis.follow = init.follow !== undefined ? init.follow : input.follow !== undefined ? input.follow : 20;\n\t\tthis.compress = init.compress !== undefined ? init.compress : input.compress !== undefined ? input.compress : true;\n\t\tthis.counter = init.counter || input.counter || 0;\n\t\tthis.agent = init.agent || input.agent;\n\t}\n\n\tget method() {\n\t\treturn this[INTERNALS$2].method;\n\t}\n\n\tget url() {\n\t\treturn format_url(this[INTERNALS$2].parsedURL);\n\t}\n\n\tget headers() {\n\t\treturn this[INTERNALS$2].headers;\n\t}\n\n\tget redirect() {\n\t\treturn this[INTERNALS$2].redirect;\n\t}\n\n\tget signal() {\n\t\treturn this[INTERNALS$2].signal;\n\t}\n\n\t/**\n * Clone this request\n *\n * @return Request\n */\n\tclone() {\n\t\treturn new Request(this);\n\t}\n}\n\nBody.mixIn(Request.prototype);\n\nObject.defineProperty(Request.prototype, Symbol.toStringTag, {\n\tvalue: 'Request',\n\twritable: false,\n\tenumerable: false,\n\tconfigurable: true\n});\n\nObject.defineProperties(Request.prototype, {\n\tmethod: { enumerable: true },\n\turl: { enumerable: true },\n\theaders: { enumerable: true },\n\tredirect: { enumerable: true },\n\tclone: { enumerable: true },\n\tsignal: { enumerable: true }\n});\n\n/**\n * Convert a Request to Node.js http request options.\n *\n * @param Request A Request instance\n * @return Object The options object to be passed to http.request\n */\nfunction getNodeRequestOptions(request) {\n\tconst parsedURL = request[INTERNALS$2].parsedURL;\n\tconst headers = new Headers(request[INTERNALS$2].headers);\n\n\t// fetch step 1.3\n\tif (!headers.has('Accept')) {\n\t\theaders.set('Accept', '*/*');\n\t}\n\n\t// Basic fetch\n\tif (!parsedURL.protocol || !parsedURL.hostname) {\n\t\tthrow new TypeError('Only absolute URLs are supported');\n\t}\n\n\tif (!/^https?:$/.test(parsedURL.protocol)) {\n\t\tthrow new TypeError('Only HTTP(S) protocols are supported');\n\t}\n\n\tif (request.signal && request.body instanceof external_stream_.Readable && !streamDestructionSupported) {\n\t\tthrow new Error('Cancellation of streamed requests with AbortSignal is not supported in node < 8');\n\t}\n\n\t// HTTP-network-or-cache fetch steps 2.4-2.7\n\tlet contentLengthValue = null;\n\tif (request.body == null && /^(POST|PUT)$/i.test(request.method)) {\n\t\tcontentLengthValue = '0';\n\t}\n\tif (request.body != null) {\n\t\tconst totalBytes = getTotalBytes(request);\n\t\tif (typeof totalBytes === 'number') {\n\t\t\tcontentLengthValue = String(totalBytes);\n\t\t}\n\t}\n\tif (contentLengthValue) {\n\t\theaders.set('Content-Length', contentLengthValue);\n\t}\n\n\t// HTTP-network-or-cache fetch step 2.11\n\tif (!headers.has('User-Agent')) {\n\t\theaders.set('User-Agent', 'node-fetch/1.0 (+https://github.com/bitinn/node-fetch)');\n\t}\n\n\t// HTTP-network-or-cache fetch step 2.15\n\tif (request.compress && !headers.has('Accept-Encoding')) {\n\t\theaders.set('Accept-Encoding', 'gzip,deflate');\n\t}\n\n\tlet agent = request.agent;\n\tif (typeof agent === 'function') {\n\t\tagent = agent(parsedURL);\n\t}\n\n\t// HTTP-network fetch step 4.2\n\t// chunked encoding is handled by Node.js\n\n\treturn Object.assign({}, parsedURL, {\n\t\tmethod: request.method,\n\t\theaders: exportNodeCompatibleHeaders(headers),\n\t\tagent\n\t});\n}\n\n/**\n * abort-error.js\n *\n * AbortError interface for cancelled requests\n */\n\n/**\n * Create AbortError instance\n *\n * @param String message Error message for human\n * @return AbortError\n */\nfunction AbortError(message) {\n Error.call(this, message);\n\n this.type = 'aborted';\n this.message = message;\n\n // hide custom error implementation details from end-users\n Error.captureStackTrace(this, this.constructor);\n}\n\nAbortError.prototype = Object.create(Error.prototype);\nAbortError.prototype.constructor = AbortError;\nAbortError.prototype.name = 'AbortError';\n\nconst URL$1 = external_url_namespaceObject.URL || public_api.URL;\n\n// fix an issue where \"PassThrough\", \"resolve\" aren't a named export for node <10\nconst PassThrough$1 = external_stream_.PassThrough;\n\nconst isDomainOrSubdomain = function isDomainOrSubdomain(destination, original) {\n\tconst orig = new URL$1(original).hostname;\n\tconst dest = new URL$1(destination).hostname;\n\n\treturn orig === dest || orig[orig.length - dest.length - 1] === '.' && orig.endsWith(dest);\n};\n\n/**\n * isSameProtocol reports whether the two provided URLs use the same protocol.\n *\n * Both domains must already be in canonical form.\n * @param {string|URL} original\n * @param {string|URL} destination\n */\nconst isSameProtocol = function isSameProtocol(destination, original) {\n\tconst orig = new URL$1(original).protocol;\n\tconst dest = new URL$1(destination).protocol;\n\n\treturn orig === dest;\n};\n\n/**\n * Fetch function\n *\n * @param Mixed url Absolute url or Request instance\n * @param Object opts Fetch options\n * @return Promise\n */\nfunction fetch(url, opts) {\n\n\t// allow custom promise\n\tif (!fetch.Promise) {\n\t\tthrow new Error('native promise missing, set fetch.Promise to your favorite alternative');\n\t}\n\n\tBody.Promise = fetch.Promise;\n\n\t// wrap http.request into fetch\n\treturn new fetch.Promise(function (resolve, reject) {\n\t\t// build request object\n\t\tconst request = new Request(url, opts);\n\t\tconst options = getNodeRequestOptions(request);\n\n\t\tconst send = (options.protocol === 'https:' ? external_https_namespaceObject : external_http_namespaceObject).request;\n\t\tconst signal = request.signal;\n\n\t\tlet response = null;\n\n\t\tconst abort = function abort() {\n\t\t\tlet error = new AbortError('The user aborted a request.');\n\t\t\treject(error);\n\t\t\tif (request.body && request.body instanceof external_stream_.Readable) {\n\t\t\t\tdestroyStream(request.body, error);\n\t\t\t}\n\t\t\tif (!response || !response.body) return;\n\t\t\tresponse.body.emit('error', error);\n\t\t};\n\n\t\tif (signal && signal.aborted) {\n\t\t\tabort();\n\t\t\treturn;\n\t\t}\n\n\t\tconst abortAndFinalize = function abortAndFinalize() {\n\t\t\tabort();\n\t\t\tfinalize();\n\t\t};\n\n\t\t// send request\n\t\tconst req = send(options);\n\t\tlet reqTimeout;\n\n\t\tif (signal) {\n\t\t\tsignal.addEventListener('abort', abortAndFinalize);\n\t\t}\n\n\t\tfunction finalize() {\n\t\t\treq.abort();\n\t\t\tif (signal) signal.removeEventListener('abort', abortAndFinalize);\n\t\t\tclearTimeout(reqTimeout);\n\t\t}\n\n\t\tif (request.timeout) {\n\t\t\treq.once('socket', function (socket) {\n\t\t\t\treqTimeout = setTimeout(function () {\n\t\t\t\t\treject(new FetchError(`network timeout at: ${request.url}`, 'request-timeout'));\n\t\t\t\t\tfinalize();\n\t\t\t\t}, request.timeout);\n\t\t\t});\n\t\t}\n\n\t\treq.on('error', function (err) {\n\t\t\treject(new FetchError(`request to ${request.url} failed, reason: ${err.message}`, 'system', err));\n\n\t\t\tif (response && response.body) {\n\t\t\t\tdestroyStream(response.body, err);\n\t\t\t}\n\n\t\t\tfinalize();\n\t\t});\n\n\t\tfixResponseChunkedTransferBadEnding(req, function (err) {\n\t\t\tif (signal && signal.aborted) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (response && response.body) {\n\t\t\t\tdestroyStream(response.body, err);\n\t\t\t}\n\t\t});\n\n\t\t/* c8 ignore next 18 */\n\t\tif (parseInt(process.version.substring(1)) < 14) {\n\t\t\t// Before Node.js 14, pipeline() does not fully support async iterators and does not always\n\t\t\t// properly handle when the socket close/end events are out of order.\n\t\t\treq.on('socket', function (s) {\n\t\t\t\ts.addListener('close', function (hadError) {\n\t\t\t\t\t// if a data listener is still present we didn't end cleanly\n\t\t\t\t\tconst hasDataListener = s.listenerCount('data') > 0;\n\n\t\t\t\t\t// if end happened before close but the socket didn't emit an error, do it now\n\t\t\t\t\tif (response && hasDataListener && !hadError && !(signal && signal.aborted)) {\n\t\t\t\t\t\tconst err = new Error('Premature close');\n\t\t\t\t\t\terr.code = 'ERR_STREAM_PREMATURE_CLOSE';\n\t\t\t\t\t\tresponse.body.emit('error', err);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\n\t\treq.on('response', function (res) {\n\t\t\tclearTimeout(reqTimeout);\n\n\t\t\tconst headers = createHeadersLenient(res.headers);\n\n\t\t\t// HTTP fetch step 5\n\t\t\tif (fetch.isRedirect(res.statusCode)) {\n\t\t\t\t// HTTP fetch step 5.2\n\t\t\t\tconst location = headers.get('Location');\n\n\t\t\t\t// HTTP fetch step 5.3\n\t\t\t\tlet locationURL = null;\n\t\t\t\ttry {\n\t\t\t\t\tlocationURL = location === null ? null : new URL$1(location, request.url).toString();\n\t\t\t\t} catch (err) {\n\t\t\t\t\t// error here can only be invalid URL in Location: header\n\t\t\t\t\t// do not throw when options.redirect == manual\n\t\t\t\t\t// let the user extract the errorneous redirect URL\n\t\t\t\t\tif (request.redirect !== 'manual') {\n\t\t\t\t\t\treject(new FetchError(`uri requested responds with an invalid redirect URL: ${location}`, 'invalid-redirect'));\n\t\t\t\t\t\tfinalize();\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// HTTP fetch step 5.5\n\t\t\t\tswitch (request.redirect) {\n\t\t\t\t\tcase 'error':\n\t\t\t\t\t\treject(new FetchError(`uri requested responds with a redirect, redirect mode is set to error: ${request.url}`, 'no-redirect'));\n\t\t\t\t\t\tfinalize();\n\t\t\t\t\t\treturn;\n\t\t\t\t\tcase 'manual':\n\t\t\t\t\t\t// node-fetch-specific step: make manual redirect a bit easier to use by setting the Location header value to the resolved URL.\n\t\t\t\t\t\tif (locationURL !== null) {\n\t\t\t\t\t\t\t// handle corrupted header\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\theaders.set('Location', locationURL);\n\t\t\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t\t\t// istanbul ignore next: nodejs server prevent invalid response headers, we can't test this through normal request\n\t\t\t\t\t\t\t\treject(err);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'follow':\n\t\t\t\t\t\t// HTTP-redirect fetch step 2\n\t\t\t\t\t\tif (locationURL === null) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// HTTP-redirect fetch step 5\n\t\t\t\t\t\tif (request.counter >= request.follow) {\n\t\t\t\t\t\t\treject(new FetchError(`maximum redirect reached at: ${request.url}`, 'max-redirect'));\n\t\t\t\t\t\t\tfinalize();\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// HTTP-redirect fetch step 6 (counter increment)\n\t\t\t\t\t\t// Create a new Request object.\n\t\t\t\t\t\tconst requestOpts = {\n\t\t\t\t\t\t\theaders: new Headers(request.headers),\n\t\t\t\t\t\t\tfollow: request.follow,\n\t\t\t\t\t\t\tcounter: request.counter + 1,\n\t\t\t\t\t\t\tagent: request.agent,\n\t\t\t\t\t\t\tcompress: request.compress,\n\t\t\t\t\t\t\tmethod: request.method,\n\t\t\t\t\t\t\tbody: request.body,\n\t\t\t\t\t\t\tsignal: request.signal,\n\t\t\t\t\t\t\ttimeout: request.timeout,\n\t\t\t\t\t\t\tsize: request.size\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\tif (!isDomainOrSubdomain(request.url, locationURL) || !isSameProtocol(request.url, locationURL)) {\n\t\t\t\t\t\t\tfor (const name of ['authorization', 'www-authenticate', 'cookie', 'cookie2']) {\n\t\t\t\t\t\t\t\trequestOpts.headers.delete(name);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// HTTP-redirect fetch step 9\n\t\t\t\t\t\tif (res.statusCode !== 303 && request.body && getTotalBytes(request) === null) {\n\t\t\t\t\t\t\treject(new FetchError('Cannot follow redirect with body being a readable stream', 'unsupported-redirect'));\n\t\t\t\t\t\t\tfinalize();\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// HTTP-redirect fetch step 11\n\t\t\t\t\t\tif (res.statusCode === 303 || (res.statusCode === 301 || res.statusCode === 302) && request.method === 'POST') {\n\t\t\t\t\t\t\trequestOpts.method = 'GET';\n\t\t\t\t\t\t\trequestOpts.body = undefined;\n\t\t\t\t\t\t\trequestOpts.headers.delete('content-length');\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// HTTP-redirect fetch step 15\n\t\t\t\t\t\tresolve(fetch(new Request(locationURL, requestOpts)));\n\t\t\t\t\t\tfinalize();\n\t\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// prepare response\n\t\t\tres.once('end', function () {\n\t\t\t\tif (signal) signal.removeEventListener('abort', abortAndFinalize);\n\t\t\t});\n\t\t\tlet body = res.pipe(new PassThrough$1());\n\n\t\t\tconst response_options = {\n\t\t\t\turl: request.url,\n\t\t\t\tstatus: res.statusCode,\n\t\t\t\tstatusText: res.statusMessage,\n\t\t\t\theaders: headers,\n\t\t\t\tsize: request.size,\n\t\t\t\ttimeout: request.timeout,\n\t\t\t\tcounter: request.counter\n\t\t\t};\n\n\t\t\t// HTTP-network fetch step 12.1.1.3\n\t\t\tconst codings = headers.get('Content-Encoding');\n\n\t\t\t// HTTP-network fetch step 12.1.1.4: handle content codings\n\n\t\t\t// in following scenarios we ignore compression support\n\t\t\t// 1. compression support is disabled\n\t\t\t// 2. HEAD request\n\t\t\t// 3. no Content-Encoding header\n\t\t\t// 4. no content response (204)\n\t\t\t// 5. content not modified response (304)\n\t\t\tif (!request.compress || request.method === 'HEAD' || codings === null || res.statusCode === 204 || res.statusCode === 304) {\n\t\t\t\tresponse = new Response(body, response_options);\n\t\t\t\tresolve(response);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// For Node v6+\n\t\t\t// Be less strict when decoding compressed responses, since sometimes\n\t\t\t// servers send slightly invalid responses that are still accepted\n\t\t\t// by common browsers.\n\t\t\t// Always using Z_SYNC_FLUSH is what cURL does.\n\t\t\tconst zlibOptions = {\n\t\t\t\tflush: external_zlib_namespaceObject.Z_SYNC_FLUSH,\n\t\t\t\tfinishFlush: external_zlib_namespaceObject.Z_SYNC_FLUSH\n\t\t\t};\n\n\t\t\t// for gzip\n\t\t\tif (codings == 'gzip' || codings == 'x-gzip') {\n\t\t\t\tbody = body.pipe(external_zlib_namespaceObject.createGunzip(zlibOptions));\n\t\t\t\tresponse = new Response(body, response_options);\n\t\t\t\tresolve(response);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// for deflate\n\t\t\tif (codings == 'deflate' || codings == 'x-deflate') {\n\t\t\t\t// handle the infamous raw deflate response from old servers\n\t\t\t\t// a hack for old IIS and Apache servers\n\t\t\t\tconst raw = res.pipe(new PassThrough$1());\n\t\t\t\traw.once('data', function (chunk) {\n\t\t\t\t\t// see http://stackoverflow.com/questions/37519828\n\t\t\t\t\tif ((chunk[0] & 0x0F) === 0x08) {\n\t\t\t\t\t\tbody = body.pipe(external_zlib_namespaceObject.createInflate());\n\t\t\t\t\t} else {\n\t\t\t\t\t\tbody = body.pipe(external_zlib_namespaceObject.createInflateRaw());\n\t\t\t\t\t}\n\t\t\t\t\tresponse = new Response(body, response_options);\n\t\t\t\t\tresolve(response);\n\t\t\t\t});\n\t\t\t\traw.on('end', function () {\n\t\t\t\t\t// some old IIS servers return zero-length OK deflate responses, so 'data' is never emitted.\n\t\t\t\t\tif (!response) {\n\t\t\t\t\t\tresponse = new Response(body, response_options);\n\t\t\t\t\t\tresolve(response);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// for br\n\t\t\tif (codings == 'br' && typeof external_zlib_namespaceObject.createBrotliDecompress === 'function') {\n\t\t\t\tbody = body.pipe(external_zlib_namespaceObject.createBrotliDecompress());\n\t\t\t\tresponse = new Response(body, response_options);\n\t\t\t\tresolve(response);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// otherwise, use response as-is\n\t\t\tresponse = new Response(body, response_options);\n\t\t\tresolve(response);\n\t\t});\n\n\t\twriteToStream(req, request);\n\t});\n}\nfunction fixResponseChunkedTransferBadEnding(request, errorCallback) {\n\tlet socket;\n\n\trequest.on('socket', function (s) {\n\t\tsocket = s;\n\t});\n\n\trequest.on('response', function (response) {\n\t\tconst headers = response.headers;\n\n\t\tif (headers['transfer-encoding'] === 'chunked' && !headers['content-length']) {\n\t\t\tresponse.once('close', function (hadError) {\n\t\t\t\t// tests for socket presence, as in some situations the\n\t\t\t\t// the 'socket' event is not triggered for the request\n\t\t\t\t// (happens in deno), avoids `TypeError`\n\t\t\t\t// if a data listener is still present we didn't end cleanly\n\t\t\t\tconst hasDataListener = socket && socket.listenerCount('data') > 0;\n\n\t\t\t\tif (hasDataListener && !hadError) {\n\t\t\t\t\tconst err = new Error('Premature close');\n\t\t\t\t\terr.code = 'ERR_STREAM_PREMATURE_CLOSE';\n\t\t\t\t\terrorCallback(err);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t});\n}\n\nfunction destroyStream(stream, err) {\n\tif (stream.destroy) {\n\t\tstream.destroy(err);\n\t} else {\n\t\t// node < 8\n\t\tstream.emit('error', err);\n\t\tstream.end();\n\t}\n}\n\n/**\n * Redirect code matching\n *\n * @param Number code Status code\n * @return Boolean\n */\nfetch.isRedirect = function (code) {\n\treturn code === 301 || code === 302 || code === 303 || code === 307 || code === 308;\n};\n\n// expose Promise\nfetch.Promise = global.Promise;\n\n/* harmony default export */ const lib = (fetch);\n\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/node-fetch/lib/index.mjs_+_4_modules?", + ); + + /***/ + }, + + /***/ 1161: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '\n// EXPORTS\n__webpack_require__.d(__webpack_exports__, {\n DX: () => (/* reexport */ Slot),\n yN: () => (/* reexport */ dep),\n LV: () => (/* binding */ wrap)\n});\n\n// UNUSED EXPORTS: KeyTrie, asyncFromGen, bindContext, defaultMakeCacheKey, noContext, nonReactive, setTimeout\n\n;// CONCATENATED MODULE: ./node_modules/optimism/node_modules/@wry/trie/lib/index.js\n// A [trie](https://en.wikipedia.org/wiki/Trie) data structure that holds\n// object keys weakly, yet can also hold non-object keys, unlike the\n// native `WeakMap`.\n// If no makeData function is supplied, the looked-up data will be an empty,\n// null-prototype Object.\nconst defaultMakeData = () => Object.create(null);\n// Useful for processing arguments objects as well as arrays.\nconst { forEach, slice } = Array.prototype;\nconst { hasOwnProperty: lib_hasOwnProperty } = Object.prototype;\nclass Trie {\n constructor(weakness = true, makeData = defaultMakeData) {\n this.weakness = weakness;\n this.makeData = makeData;\n }\n lookup(...array) {\n return this.lookupArray(array);\n }\n lookupArray(array) {\n let node = this;\n forEach.call(array, key => node = node.getChildTrie(key));\n return lib_hasOwnProperty.call(node, "data")\n ? node.data\n : node.data = this.makeData(slice.call(array));\n }\n peek(...array) {\n return this.peekArray(array);\n }\n peekArray(array) {\n let node = this;\n for (let i = 0, len = array.length; node && i < len; ++i) {\n const map = this.weakness && isObjRef(array[i]) ? node.weak : node.strong;\n node = map && map.get(array[i]);\n }\n return node && node.data;\n }\n getChildTrie(key) {\n const map = this.weakness && isObjRef(key)\n ? this.weak || (this.weak = new WeakMap())\n : this.strong || (this.strong = new Map());\n let child = map.get(key);\n if (!child)\n map.set(key, child = new Trie(this.weakness, this.makeData));\n return child;\n }\n}\nfunction isObjRef(value) {\n switch (typeof value) {\n case "object":\n if (value === null)\n break;\n // Fall through to return true...\n case "function":\n return true;\n }\n return false;\n}\n//# sourceMappingURL=index.js.map\n// EXTERNAL MODULE: ./node_modules/@wry/caches/lib/strong.js\nvar strong = __webpack_require__(7783);\n;// CONCATENATED MODULE: ./node_modules/@wry/context/lib/slot.js\n// This currentContext variable will only be used if the makeSlotClass\n// function is called, which happens only if this is the first copy of the\n// @wry/context package to be imported.\nlet currentContext = null;\n// This unique internal object is used to denote the absence of a value\n// for a given Slot, and is never exposed to outside code.\nconst MISSING_VALUE = {};\nlet idCounter = 1;\n// Although we can\'t do anything about the cost of duplicated code from\n// accidentally bundling multiple copies of the @wry/context package, we can\n// avoid creating the Slot class more than once using makeSlotClass.\nconst makeSlotClass = () => class Slot {\n constructor() {\n // If you have a Slot object, you can find out its slot.id, but you cannot\n // guess the slot.id of a Slot you don\'t have access to, thanks to the\n // randomized suffix.\n this.id = [\n "slot",\n idCounter++,\n Date.now(),\n Math.random().toString(36).slice(2),\n ].join(":");\n }\n hasValue() {\n for (let context = currentContext; context; context = context.parent) {\n // We use the Slot object iself as a key to its value, which means the\n // value cannot be obtained without a reference to the Slot object.\n if (this.id in context.slots) {\n const value = context.slots[this.id];\n if (value === MISSING_VALUE)\n break;\n if (context !== currentContext) {\n // Cache the value in currentContext.slots so the next lookup will\n // be faster. This caching is safe because the tree of contexts and\n // the values of the slots are logically immutable.\n currentContext.slots[this.id] = value;\n }\n return true;\n }\n }\n if (currentContext) {\n // If a value was not found for this Slot, it\'s never going to be found\n // no matter how many times we look it up, so we might as well cache\n // the absence of the value, too.\n currentContext.slots[this.id] = MISSING_VALUE;\n }\n return false;\n }\n getValue() {\n if (this.hasValue()) {\n return currentContext.slots[this.id];\n }\n }\n withValue(value, callback, \n // Given the prevalence of arrow functions, specifying arguments is likely\n // to be much more common than specifying `this`, hence this ordering:\n args, thisArg) {\n const slots = {\n __proto__: null,\n [this.id]: value,\n };\n const parent = currentContext;\n currentContext = { parent, slots };\n try {\n // Function.prototype.apply allows the arguments array argument to be\n // omitted or undefined, so args! is fine here.\n return callback.apply(thisArg, args);\n }\n finally {\n currentContext = parent;\n }\n }\n // Capture the current context and wrap a callback function so that it\n // reestablishes the captured context when called.\n static bind(callback) {\n const context = currentContext;\n return function () {\n const saved = currentContext;\n try {\n currentContext = context;\n return callback.apply(this, arguments);\n }\n finally {\n currentContext = saved;\n }\n };\n }\n // Immediately run a callback function without any captured context.\n static noContext(callback, \n // Given the prevalence of arrow functions, specifying arguments is likely\n // to be much more common than specifying `this`, hence this ordering:\n args, thisArg) {\n if (currentContext) {\n const saved = currentContext;\n try {\n currentContext = null;\n // Function.prototype.apply allows the arguments array argument to be\n // omitted or undefined, so args! is fine here.\n return callback.apply(thisArg, args);\n }\n finally {\n currentContext = saved;\n }\n }\n else {\n return callback.apply(thisArg, args);\n }\n }\n};\nfunction maybe(fn) {\n try {\n return fn();\n }\n catch (ignored) { }\n}\n// We store a single global implementation of the Slot class as a permanent\n// non-enumerable property of the globalThis object. This obfuscation does\n// nothing to prevent access to the Slot class, but at least it ensures the\n// implementation (i.e. currentContext) cannot be tampered with, and all copies\n// of the @wry/context package (hopefully just one) will share the same Slot\n// implementation. Since the first copy of the @wry/context package to be\n// imported wins, this technique imposes a steep cost for any future breaking\n// changes to the Slot class.\nconst globalKey = "@wry/context:Slot";\nconst host = \n// Prefer globalThis when available.\n// https://github.com/benjamn/wryware/issues/347\nmaybe(() => globalThis) ||\n // Fall back to global, which works in Node.js and may be converted by some\n // bundlers to the appropriate identifier (window, self, ...) depending on the\n // bundling target. https://github.com/endojs/endo/issues/576#issuecomment-1178515224\n maybe(() => global) ||\n // Otherwise, use a dummy host that\'s local to this module. We used to fall\n // back to using the Array constructor as a namespace, but that was flagged in\n // https://github.com/benjamn/wryware/issues/347, and can be avoided.\n Object.create(null);\n// Whichever globalHost we\'re using, make TypeScript happy about the additional\n// globalKey property.\nconst globalHost = host;\nconst Slot = globalHost[globalKey] ||\n // Earlier versions of this package stored the globalKey property on the Array\n // constructor, so we check there as well, to prevent Slot class duplication.\n Array[globalKey] ||\n (function (Slot) {\n try {\n Object.defineProperty(globalHost, globalKey, {\n value: Slot,\n enumerable: false,\n writable: false,\n // When it was possible for globalHost to be the Array constructor (a\n // legacy Slot dedup strategy), it was important for the property to be\n // configurable:true so it could be deleted. That does not seem to be as\n // important when globalHost is the global object, but I don\'t want to\n // cause similar problems again, and configurable:true seems safest.\n // https://github.com/endojs/endo/issues/576#issuecomment-1178274008\n configurable: true\n });\n }\n finally {\n return Slot;\n }\n })(makeSlotClass());\n//# sourceMappingURL=slot.js.map\n;// CONCATENATED MODULE: ./node_modules/@wry/context/lib/index.js\n\n\nconst { bind, noContext } = Slot;\n// Like global.setTimeout, except the callback runs with captured context.\n\nfunction setTimeoutWithContext(callback, delay) {\n return setTimeout(bind(callback), delay);\n}\n// Turn any generator function into an async function (using yield instead\n// of await), with context automatically preserved across yields.\nfunction asyncFromGen(genFn) {\n return function () {\n const gen = genFn.apply(this, arguments);\n const boundNext = bind(gen.next);\n const boundThrow = bind(gen.throw);\n return new Promise((resolve, reject) => {\n function invoke(method, argument) {\n try {\n var result = method.call(gen, argument);\n }\n catch (error) {\n return reject(error);\n }\n const next = result.done ? resolve : invokeNext;\n if (isPromiseLike(result.value)) {\n result.value.then(next, result.done ? reject : invokeThrow);\n }\n else {\n next(result.value);\n }\n }\n const invokeNext = (value) => invoke(boundNext, value);\n const invokeThrow = (error) => invoke(boundThrow, error);\n invokeNext();\n });\n };\n}\nfunction isPromiseLike(value) {\n return value && typeof value.then === "function";\n}\n// If you use the fibers npm package to implement coroutines in Node.js,\n// you should call this function at least once to ensure context management\n// remains coherent across any yields.\nconst wrappedFibers = (/* unused pure expression or super */ null && ([]));\nfunction wrapYieldingFiberMethods(Fiber) {\n // There can be only one implementation of Fiber per process, so this array\n // should never grow longer than one element.\n if (wrappedFibers.indexOf(Fiber) < 0) {\n const wrap = (obj, method) => {\n const fn = obj[method];\n obj[method] = function () {\n return noContext(fn, arguments, this);\n };\n };\n // These methods can yield, according to\n // https://github.com/laverdet/node-fibers/blob/ddebed9b8ae3883e57f822e2108e6943e5c8d2a8/fibers.js#L97-L100\n wrap(Fiber, "yield");\n wrap(Fiber.prototype, "run");\n wrap(Fiber.prototype, "throwInto");\n wrappedFibers.push(Fiber);\n }\n return Fiber;\n}\n//# sourceMappingURL=index.js.map\n;// CONCATENATED MODULE: ./node_modules/optimism/lib/context.js\n\nconst parentEntrySlot = new Slot();\nfunction nonReactive(fn) {\n return parentEntrySlot.withValue(void 0, fn);\n}\n\n\n//# sourceMappingURL=context.js.map\n;// CONCATENATED MODULE: ./node_modules/optimism/lib/helpers.js\nconst { hasOwnProperty: helpers_hasOwnProperty, } = Object.prototype;\nconst arrayFromSet = Array.from ||\n function (set) {\n const array = [];\n set.forEach(item => array.push(item));\n return array;\n };\nfunction maybeUnsubscribe(entryOrDep) {\n const { unsubscribe } = entryOrDep;\n if (typeof unsubscribe === "function") {\n entryOrDep.unsubscribe = void 0;\n unsubscribe();\n }\n}\n//# sourceMappingURL=helpers.js.map\n;// CONCATENATED MODULE: ./node_modules/optimism/lib/entry.js\n\n\nconst emptySetPool = [];\nconst POOL_TARGET_SIZE = 100;\n// Since this package might be used browsers, we should avoid using the\n// Node built-in assert module.\nfunction assert(condition, optionalMessage) {\n if (!condition) {\n throw new Error(optionalMessage || "assertion failure");\n }\n}\nfunction valueIs(a, b) {\n const len = a.length;\n return (\n // Unknown values are not equal to each other.\n len > 0 &&\n // Both values must be ordinary (or both exceptional) to be equal.\n len === b.length &&\n // The underlying value or exception must be the same.\n a[len - 1] === b[len - 1]);\n}\nfunction valueGet(value) {\n switch (value.length) {\n case 0: throw new Error("unknown value");\n case 1: return value[0];\n case 2: throw value[1];\n }\n}\nfunction valueCopy(value) {\n return value.slice(0);\n}\nclass Entry {\n constructor(fn) {\n this.fn = fn;\n this.parents = new Set();\n this.childValues = new Map();\n // When this Entry has children that are dirty, this property becomes\n // a Set containing other Entry objects, borrowed from emptySetPool.\n // When the set becomes empty, it gets recycled back to emptySetPool.\n this.dirtyChildren = null;\n this.dirty = true;\n this.recomputing = false;\n this.value = [];\n this.deps = null;\n ++Entry.count;\n }\n peek() {\n if (this.value.length === 1 && !mightBeDirty(this)) {\n rememberParent(this);\n return this.value[0];\n }\n }\n // This is the most important method of the Entry API, because it\n // determines whether the cached this.value can be returned immediately,\n // or must be recomputed. The overall performance of the caching system\n // depends on the truth of the following observations: (1) this.dirty is\n // usually false, (2) this.dirtyChildren is usually null/empty, and thus\n // (3) valueGet(this.value) is usually returned without recomputation.\n recompute(args) {\n assert(!this.recomputing, "already recomputing");\n rememberParent(this);\n return mightBeDirty(this)\n ? reallyRecompute(this, args)\n : valueGet(this.value);\n }\n setDirty() {\n if (this.dirty)\n return;\n this.dirty = true;\n reportDirty(this);\n // We can go ahead and unsubscribe here, since any further dirty\n // notifications we receive will be redundant, and unsubscribing may\n // free up some resources, e.g. file watchers.\n maybeUnsubscribe(this);\n }\n dispose() {\n this.setDirty();\n // Sever any dependency relationships with our own children, so those\n // children don\'t retain this parent Entry in their child.parents sets,\n // thereby preventing it from being fully garbage collected.\n forgetChildren(this);\n // Because this entry has been kicked out of the cache (in index.js),\n // we\'ve lost the ability to find out if/when this entry becomes dirty,\n // whether that happens through a subscription, because of a direct call\n // to entry.setDirty(), or because one of its children becomes dirty.\n // Because of this loss of future information, we have to assume the\n // worst (that this entry might have become dirty very soon), so we must\n // immediately mark this entry\'s parents as dirty. Normally we could\n // just call entry.setDirty() rather than calling parent.setDirty() for\n // each parent, but that would leave this entry in parent.childValues\n // and parent.dirtyChildren, which would prevent the child from being\n // truly forgotten.\n eachParent(this, (parent, child) => {\n parent.setDirty();\n forgetChild(parent, this);\n });\n }\n forget() {\n // The code that creates Entry objects in index.ts will replace this method\n // with one that actually removes the Entry from the cache, which will also\n // trigger the entry.dispose method.\n this.dispose();\n }\n dependOn(dep) {\n dep.add(this);\n if (!this.deps) {\n this.deps = emptySetPool.pop() || new Set();\n }\n this.deps.add(dep);\n }\n forgetDeps() {\n if (this.deps) {\n arrayFromSet(this.deps).forEach(dep => dep.delete(this));\n this.deps.clear();\n emptySetPool.push(this.deps);\n this.deps = null;\n }\n }\n}\nEntry.count = 0;\nfunction rememberParent(child) {\n const parent = parentEntrySlot.getValue();\n if (parent) {\n child.parents.add(parent);\n if (!parent.childValues.has(child)) {\n parent.childValues.set(child, []);\n }\n if (mightBeDirty(child)) {\n reportDirtyChild(parent, child);\n }\n else {\n reportCleanChild(parent, child);\n }\n return parent;\n }\n}\nfunction reallyRecompute(entry, args) {\n forgetChildren(entry);\n // Set entry as the parent entry while calling recomputeNewValue(entry).\n parentEntrySlot.withValue(entry, recomputeNewValue, [entry, args]);\n if (maybeSubscribe(entry, args)) {\n // If we successfully recomputed entry.value and did not fail to\n // (re)subscribe, then this Entry is no longer explicitly dirty.\n setClean(entry);\n }\n return valueGet(entry.value);\n}\nfunction recomputeNewValue(entry, args) {\n entry.recomputing = true;\n const { normalizeResult } = entry;\n let oldValueCopy;\n if (normalizeResult && entry.value.length === 1) {\n oldValueCopy = valueCopy(entry.value);\n }\n // Make entry.value an empty array, representing an unknown value.\n entry.value.length = 0;\n try {\n // If entry.fn succeeds, entry.value will become a normal Value.\n entry.value[0] = entry.fn.apply(null, args);\n // If we have a viable oldValueCopy to compare with the (successfully\n // recomputed) new entry.value, and they are not already === identical, give\n // normalizeResult a chance to pick/choose/reuse parts of oldValueCopy[0]\n // and/or entry.value[0] to determine the final cached entry.value.\n if (normalizeResult && oldValueCopy && !valueIs(oldValueCopy, entry.value)) {\n try {\n entry.value[0] = normalizeResult(entry.value[0], oldValueCopy[0]);\n }\n catch (_a) {\n // If normalizeResult throws, just use the newer value, rather than\n // saving the exception as entry.value[1].\n }\n }\n }\n catch (e) {\n // If entry.fn throws, entry.value will hold that exception.\n entry.value[1] = e;\n }\n // Either way, this line is always reached.\n entry.recomputing = false;\n}\nfunction mightBeDirty(entry) {\n return entry.dirty || !!(entry.dirtyChildren && entry.dirtyChildren.size);\n}\nfunction setClean(entry) {\n entry.dirty = false;\n if (mightBeDirty(entry)) {\n // This Entry may still have dirty children, in which case we can\'t\n // let our parents know we\'re clean just yet.\n return;\n }\n reportClean(entry);\n}\nfunction reportDirty(child) {\n eachParent(child, reportDirtyChild);\n}\nfunction reportClean(child) {\n eachParent(child, reportCleanChild);\n}\nfunction eachParent(child, callback) {\n const parentCount = child.parents.size;\n if (parentCount) {\n const parents = arrayFromSet(child.parents);\n for (let i = 0; i < parentCount; ++i) {\n callback(parents[i], child);\n }\n }\n}\n// Let a parent Entry know that one of its children may be dirty.\nfunction reportDirtyChild(parent, child) {\n // Must have called rememberParent(child) before calling\n // reportDirtyChild(parent, child).\n assert(parent.childValues.has(child));\n assert(mightBeDirty(child));\n const parentWasClean = !mightBeDirty(parent);\n if (!parent.dirtyChildren) {\n parent.dirtyChildren = emptySetPool.pop() || new Set;\n }\n else if (parent.dirtyChildren.has(child)) {\n // If we already know this child is dirty, then we must have already\n // informed our own parents that we are dirty, so we can terminate\n // the recursion early.\n return;\n }\n parent.dirtyChildren.add(child);\n // If parent was clean before, it just became (possibly) dirty (according to\n // mightBeDirty), since we just added child to parent.dirtyChildren.\n if (parentWasClean) {\n reportDirty(parent);\n }\n}\n// Let a parent Entry know that one of its children is no longer dirty.\nfunction reportCleanChild(parent, child) {\n // Must have called rememberChild(child) before calling\n // reportCleanChild(parent, child).\n assert(parent.childValues.has(child));\n assert(!mightBeDirty(child));\n const childValue = parent.childValues.get(child);\n if (childValue.length === 0) {\n parent.childValues.set(child, valueCopy(child.value));\n }\n else if (!valueIs(childValue, child.value)) {\n parent.setDirty();\n }\n removeDirtyChild(parent, child);\n if (mightBeDirty(parent)) {\n return;\n }\n reportClean(parent);\n}\nfunction removeDirtyChild(parent, child) {\n const dc = parent.dirtyChildren;\n if (dc) {\n dc.delete(child);\n if (dc.size === 0) {\n if (emptySetPool.length < POOL_TARGET_SIZE) {\n emptySetPool.push(dc);\n }\n parent.dirtyChildren = null;\n }\n }\n}\n// Removes all children from this entry and returns an array of the\n// removed children.\nfunction forgetChildren(parent) {\n if (parent.childValues.size > 0) {\n parent.childValues.forEach((_value, child) => {\n forgetChild(parent, child);\n });\n }\n // Remove this parent Entry from any sets to which it was added by the\n // addToSet method.\n parent.forgetDeps();\n // After we forget all our children, this.dirtyChildren must be empty\n // and therefore must have been reset to null.\n assert(parent.dirtyChildren === null);\n}\nfunction forgetChild(parent, child) {\n child.parents.delete(parent);\n parent.childValues.delete(child);\n removeDirtyChild(parent, child);\n}\nfunction maybeSubscribe(entry, args) {\n if (typeof entry.subscribe === "function") {\n try {\n maybeUnsubscribe(entry); // Prevent double subscriptions.\n entry.unsubscribe = entry.subscribe.apply(null, args);\n }\n catch (e) {\n // If this Entry has a subscribe function and it threw an exception\n // (or an unsubscribe function it previously returned now throws),\n // return false to indicate that we were not able to subscribe (or\n // unsubscribe), and this Entry should remain dirty.\n entry.setDirty();\n return false;\n }\n }\n // Returning true indicates either that there was no entry.subscribe\n // function or that it succeeded.\n return true;\n}\n//# sourceMappingURL=entry.js.map\n;// CONCATENATED MODULE: ./node_modules/optimism/lib/dep.js\n\n\nconst EntryMethods = {\n setDirty: true,\n dispose: true,\n forget: true, // Fully remove parent Entry from LRU cache and computation graph\n};\nfunction dep(options) {\n const depsByKey = new Map();\n const subscribe = options && options.subscribe;\n function depend(key) {\n const parent = parentEntrySlot.getValue();\n if (parent) {\n let dep = depsByKey.get(key);\n if (!dep) {\n depsByKey.set(key, dep = new Set);\n }\n parent.dependOn(dep);\n if (typeof subscribe === "function") {\n maybeUnsubscribe(dep);\n dep.unsubscribe = subscribe(key);\n }\n }\n }\n depend.dirty = function dirty(key, entryMethodName) {\n const dep = depsByKey.get(key);\n if (dep) {\n const m = (entryMethodName &&\n helpers_hasOwnProperty.call(EntryMethods, entryMethodName)) ? entryMethodName : "setDirty";\n // We have to use arrayFromSet(dep).forEach instead of dep.forEach,\n // because modifying a Set while iterating over it can cause elements in\n // the Set to be removed from the Set before they\'ve been iterated over.\n arrayFromSet(dep).forEach(entry => entry[m]());\n depsByKey.delete(key);\n maybeUnsubscribe(dep);\n }\n };\n return depend;\n}\n//# sourceMappingURL=dep.js.map\n;// CONCATENATED MODULE: ./node_modules/optimism/lib/index.js\n\n\n\n\n// These helper functions are important for making optimism work with\n// asynchronous code. In order to register parent-child dependencies,\n// optimism needs to know about any currently active parent computations.\n// In ordinary synchronous code, the parent context is implicit in the\n// execution stack, but asynchronous code requires some extra guidance in\n// order to propagate context from one async task segment to the next.\n\n// A lighter-weight dependency, similar to OptimisticWrapperFunction, except\n// with only one argument, no makeCacheKey, no wrapped function to recompute,\n// and no result value. Useful for representing dependency leaves in the graph\n// of computation. Subscriptions are supported.\n\n// The defaultMakeCacheKey function is remarkably powerful, because it gives\n// a unique object for any shallow-identical list of arguments. If you need\n// to implement a custom makeCacheKey function, you may find it helpful to\n// delegate the final work to defaultMakeCacheKey, which is why we export it\n// here. However, you may want to avoid defaultMakeCacheKey if your runtime\n// does not support WeakMap, or you have the ability to return a string key.\n// In those cases, just write your own custom makeCacheKey functions.\nlet defaultKeyTrie;\nfunction defaultMakeCacheKey(...args) {\n const trie = defaultKeyTrie || (defaultKeyTrie = new Trie(typeof WeakMap === "function"));\n return trie.lookupArray(args);\n}\n// If you\'re paranoid about memory leaks, or you want to avoid using WeakMap\n// under the hood, but you still need the behavior of defaultMakeCacheKey,\n// import this constructor to create your own tries.\n\n;\nconst caches = new Set();\nfunction wrap(originalFunction, { max = Math.pow(2, 16), keyArgs, makeCacheKey = defaultMakeCacheKey, normalizeResult, subscribe, cache: cacheOption = strong/* StrongCache */.C, } = Object.create(null)) {\n const cache = typeof cacheOption === "function"\n ? new cacheOption(max, entry => entry.dispose())\n : cacheOption;\n const optimistic = function () {\n const key = makeCacheKey.apply(null, keyArgs ? keyArgs.apply(null, arguments) : arguments);\n if (key === void 0) {\n return originalFunction.apply(null, arguments);\n }\n let entry = cache.get(key);\n if (!entry) {\n cache.set(key, entry = new Entry(originalFunction));\n entry.normalizeResult = normalizeResult;\n entry.subscribe = subscribe;\n // Give the Entry the ability to trigger cache.delete(key), even though\n // the Entry itself does not know about key or cache.\n entry.forget = () => cache.delete(key);\n }\n const value = entry.recompute(Array.prototype.slice.call(arguments));\n // Move this entry to the front of the least-recently used queue,\n // since we just finished computing its value.\n cache.set(key, entry);\n caches.add(cache);\n // Clean up any excess entries in the cache, but only if there is no\n // active parent entry, meaning we\'re not in the middle of a larger\n // computation that might be flummoxed by the cleaning.\n if (!parentEntrySlot.hasValue()) {\n caches.forEach(cache => cache.clean());\n caches.clear();\n }\n return value;\n };\n Object.defineProperty(optimistic, "size", {\n get: () => cache.size,\n configurable: false,\n enumerable: false,\n });\n Object.freeze(optimistic.options = {\n max,\n keyArgs,\n makeCacheKey,\n normalizeResult,\n subscribe,\n cache,\n });\n function dirtyKey(key) {\n const entry = key && cache.get(key);\n if (entry) {\n entry.setDirty();\n }\n }\n optimistic.dirtyKey = dirtyKey;\n optimistic.dirty = function dirty() {\n dirtyKey(makeCacheKey.apply(null, arguments));\n };\n function peekKey(key) {\n const entry = key && cache.get(key);\n if (entry) {\n return entry.peek();\n }\n }\n optimistic.peekKey = peekKey;\n optimistic.peek = function peek() {\n return peekKey(makeCacheKey.apply(null, arguments));\n };\n function forgetKey(key) {\n return key ? cache.delete(key) : false;\n }\n optimistic.forgetKey = forgetKey;\n optimistic.forget = function forget() {\n return forgetKey(makeCacheKey.apply(null, arguments));\n };\n optimistic.makeCacheKey = makeCacheKey;\n optimistic.getKey = keyArgs ? function getKey() {\n return makeCacheKey.apply(null, keyArgs.apply(null, arguments));\n } : makeCacheKey;\n return Object.freeze(optimistic);\n}\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/optimism/lib/index.js_+_7_modules?', + ); + + /***/ + }, + + /***/ 1635: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + '/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ C6: () => (/* binding */ __extends),\n/* harmony export */ Cl: () => (/* binding */ __assign),\n/* harmony export */ Tt: () => (/* binding */ __rest),\n/* harmony export */ YH: () => (/* binding */ __generator),\n/* harmony export */ fX: () => (/* binding */ __spreadArray),\n/* harmony export */ sH: () => (/* binding */ __awaiter)\n/* harmony export */ });\n/* unused harmony exports __decorate, __param, __esDecorate, __runInitializers, __propKey, __setFunctionName, __metadata, __createBinding, __exportStar, __values, __read, __spread, __spreadArrays, __await, __asyncGenerator, __asyncDelegator, __asyncValues, __makeTemplateObject, __importStar, __importDefault, __classPrivateFieldGet, __classPrivateFieldSet, __classPrivateFieldIn, __addDisposableResource, __disposeResources */\n/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol */\n\nvar extendStatics = function(d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nfunction __extends(d, b) {\n if (typeof b !== "function" && b !== null)\n throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nvar __assign = function() {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n }\n return __assign.apply(this, arguments);\n}\n\nfunction __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === "function")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nfunction __decorate(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nfunction __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nfunction __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }\n var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";\n var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === "accessor") {\n if (result === void 0) continue;\n if (result === null || typeof result !== "object") throw new TypeError("Object expected");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === "field") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n};\n\nfunction __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n};\n\nfunction __propKey(x) {\n return typeof x === "symbol" ? x : "".concat(x);\n};\n\nfunction __setFunctionName(f, name, prefix) {\n if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";\n return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });\n};\n\nfunction __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nfunction __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nfunction __generator(thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError("Generator is already executing.");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nvar __createBinding = Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nfunction __exportStar(m, o) {\n for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nfunction __values(o) {\n var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === "number") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");\n}\n\nfunction __read(o, n) {\n var m = typeof Symbol === "function" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i["return"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n}\n\n/** @deprecated */\nfunction __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nfunction __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n}\n\nfunction __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nfunction __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nfunction __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume("next", value); }\n function reject(value) { resume("throw", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nfunction __asyncDelegator(o) {\n var i, p;\n return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nfunction __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nfunction __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n Object.defineProperty(o, "default", { enumerable: true, value: v });\n}) : function(o, v) {\n o["default"] = v;\n};\n\nfunction __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n}\n\nfunction __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nfunction __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");\n if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");\n return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nfunction __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === "m") throw new TypeError("Private method is not writable");\n if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");\n if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");\n return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nfunction __classPrivateFieldIn(state, receiver) {\n if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use \'in\' operator on non-object");\n return typeof state === "function" ? receiver === state : state.has(receiver);\n}\n\nfunction __addDisposableResource(env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");\n var dispose, inner;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");\n dispose = value[Symbol.dispose];\n if (async) inner = dispose;\n }\n if (typeof dispose !== "function") throw new TypeError("Object not disposable.");\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\n env.stack.push({ value: value, dispose: dispose, async: async });\n }\n else if (async) {\n env.stack.push({ async: true });\n }\n return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;\n};\n\nfunction __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;\n env.hasError = true;\n }\n function next() {\n while (env.stack.length) {\n var rec = env.stack.pop();\n try {\n var result = rec.dispose && rec.dispose.call(rec.value);\n if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n }\n catch (e) {\n fail(e);\n }\n }\n if (env.hasError) throw env.error;\n }\n return next();\n}\n\n/* unused harmony default export */ var __WEBPACK_DEFAULT_EXPORT__ = ({\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources,\n});\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/tslib/tslib.es6.mjs?', + ); + + /***/ + }, + + /***/ 3401: /***/ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + 'use strict'; + eval( + "/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ c: () => (/* binding */ Observable)\n/* harmony export */ });\nfunction _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } 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\nfunction _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); }\n\nfunction _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; }\n\nfunction _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); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\n// === Symbol Support ===\nvar hasSymbols = function () {\n return typeof Symbol === 'function';\n};\n\nvar hasSymbol = function (name) {\n return hasSymbols() && Boolean(Symbol[name]);\n};\n\nvar getSymbol = function (name) {\n return hasSymbol(name) ? Symbol[name] : '@@' + name;\n};\n\nif (hasSymbols() && !hasSymbol('observable')) {\n Symbol.observable = Symbol('observable');\n}\n\nvar SymbolIterator = getSymbol('iterator');\nvar SymbolObservable = getSymbol('observable');\nvar SymbolSpecies = getSymbol('species'); // === Abstract Operations ===\n\nfunction getMethod(obj, key) {\n var value = obj[key];\n if (value == null) return undefined;\n if (typeof value !== 'function') throw new TypeError(value + ' is not a function');\n return value;\n}\n\nfunction getSpecies(obj) {\n var ctor = obj.constructor;\n\n if (ctor !== undefined) {\n ctor = ctor[SymbolSpecies];\n\n if (ctor === null) {\n ctor = undefined;\n }\n }\n\n return ctor !== undefined ? ctor : Observable;\n}\n\nfunction isObservable(x) {\n return x instanceof Observable; // SPEC: Brand check\n}\n\nfunction hostReportError(e) {\n if (hostReportError.log) {\n hostReportError.log(e);\n } else {\n setTimeout(function () {\n throw e;\n });\n }\n}\n\nfunction enqueue(fn) {\n Promise.resolve().then(function () {\n try {\n fn();\n } catch (e) {\n hostReportError(e);\n }\n });\n}\n\nfunction cleanupSubscription(subscription) {\n var cleanup = subscription._cleanup;\n if (cleanup === undefined) return;\n subscription._cleanup = undefined;\n\n if (!cleanup) {\n return;\n }\n\n try {\n if (typeof cleanup === 'function') {\n cleanup();\n } else {\n var unsubscribe = getMethod(cleanup, 'unsubscribe');\n\n if (unsubscribe) {\n unsubscribe.call(cleanup);\n }\n }\n } catch (e) {\n hostReportError(e);\n }\n}\n\nfunction closeSubscription(subscription) {\n subscription._observer = undefined;\n subscription._queue = undefined;\n subscription._state = 'closed';\n}\n\nfunction flushSubscription(subscription) {\n var queue = subscription._queue;\n\n if (!queue) {\n return;\n }\n\n subscription._queue = undefined;\n subscription._state = 'ready';\n\n for (var i = 0; i < queue.length; ++i) {\n notifySubscription(subscription, queue[i].type, queue[i].value);\n if (subscription._state === 'closed') break;\n }\n}\n\nfunction notifySubscription(subscription, type, value) {\n subscription._state = 'running';\n var observer = subscription._observer;\n\n try {\n var m = getMethod(observer, type);\n\n switch (type) {\n case 'next':\n if (m) m.call(observer, value);\n break;\n\n case 'error':\n closeSubscription(subscription);\n if (m) m.call(observer, value);else throw value;\n break;\n\n case 'complete':\n closeSubscription(subscription);\n if (m) m.call(observer);\n break;\n }\n } catch (e) {\n hostReportError(e);\n }\n\n if (subscription._state === 'closed') cleanupSubscription(subscription);else if (subscription._state === 'running') subscription._state = 'ready';\n}\n\nfunction onNotify(subscription, type, value) {\n if (subscription._state === 'closed') return;\n\n if (subscription._state === 'buffering') {\n subscription._queue.push({\n type: type,\n value: value\n });\n\n return;\n }\n\n if (subscription._state !== 'ready') {\n subscription._state = 'buffering';\n subscription._queue = [{\n type: type,\n value: value\n }];\n enqueue(function () {\n return flushSubscription(subscription);\n });\n return;\n }\n\n notifySubscription(subscription, type, value);\n}\n\nvar Subscription = /*#__PURE__*/function () {\n function Subscription(observer, subscriber) {\n // ASSERT: observer is an object\n // ASSERT: subscriber is callable\n this._cleanup = undefined;\n this._observer = observer;\n this._queue = undefined;\n this._state = 'initializing';\n var subscriptionObserver = new SubscriptionObserver(this);\n\n try {\n this._cleanup = subscriber.call(undefined, subscriptionObserver);\n } catch (e) {\n subscriptionObserver.error(e);\n }\n\n if (this._state === 'initializing') this._state = 'ready';\n }\n\n var _proto = Subscription.prototype;\n\n _proto.unsubscribe = function unsubscribe() {\n if (this._state !== 'closed') {\n closeSubscription(this);\n cleanupSubscription(this);\n }\n };\n\n _createClass(Subscription, [{\n key: \"closed\",\n get: function () {\n return this._state === 'closed';\n }\n }]);\n\n return Subscription;\n}();\n\nvar SubscriptionObserver = /*#__PURE__*/function () {\n function SubscriptionObserver(subscription) {\n this._subscription = subscription;\n }\n\n var _proto2 = SubscriptionObserver.prototype;\n\n _proto2.next = function next(value) {\n onNotify(this._subscription, 'next', value);\n };\n\n _proto2.error = function error(value) {\n onNotify(this._subscription, 'error', value);\n };\n\n _proto2.complete = function complete() {\n onNotify(this._subscription, 'complete');\n };\n\n _createClass(SubscriptionObserver, [{\n key: \"closed\",\n get: function () {\n return this._subscription._state === 'closed';\n }\n }]);\n\n return SubscriptionObserver;\n}();\n\nvar Observable = /*#__PURE__*/function () {\n function Observable(subscriber) {\n if (!(this instanceof Observable)) throw new TypeError('Observable cannot be called as a function');\n if (typeof subscriber !== 'function') throw new TypeError('Observable initializer must be a function');\n this._subscriber = subscriber;\n }\n\n var _proto3 = Observable.prototype;\n\n _proto3.subscribe = function subscribe(observer) {\n if (typeof observer !== 'object' || observer === null) {\n observer = {\n next: observer,\n error: arguments[1],\n complete: arguments[2]\n };\n }\n\n return new Subscription(observer, this._subscriber);\n };\n\n _proto3.forEach = function forEach(fn) {\n var _this = this;\n\n return new Promise(function (resolve, reject) {\n if (typeof fn !== 'function') {\n reject(new TypeError(fn + ' is not a function'));\n return;\n }\n\n function done() {\n subscription.unsubscribe();\n resolve();\n }\n\n var subscription = _this.subscribe({\n next: function (value) {\n try {\n fn(value, done);\n } catch (e) {\n reject(e);\n subscription.unsubscribe();\n }\n },\n error: reject,\n complete: resolve\n });\n });\n };\n\n _proto3.map = function map(fn) {\n var _this2 = this;\n\n if (typeof fn !== 'function') throw new TypeError(fn + ' is not a function');\n var C = getSpecies(this);\n return new C(function (observer) {\n return _this2.subscribe({\n next: function (value) {\n try {\n value = fn(value);\n } catch (e) {\n return observer.error(e);\n }\n\n observer.next(value);\n },\n error: function (e) {\n observer.error(e);\n },\n complete: function () {\n observer.complete();\n }\n });\n });\n };\n\n _proto3.filter = function filter(fn) {\n var _this3 = this;\n\n if (typeof fn !== 'function') throw new TypeError(fn + ' is not a function');\n var C = getSpecies(this);\n return new C(function (observer) {\n return _this3.subscribe({\n next: function (value) {\n try {\n if (!fn(value)) return;\n } catch (e) {\n return observer.error(e);\n }\n\n observer.next(value);\n },\n error: function (e) {\n observer.error(e);\n },\n complete: function () {\n observer.complete();\n }\n });\n });\n };\n\n _proto3.reduce = function reduce(fn) {\n var _this4 = this;\n\n if (typeof fn !== 'function') throw new TypeError(fn + ' is not a function');\n var C = getSpecies(this);\n var hasSeed = arguments.length > 1;\n var hasValue = false;\n var seed = arguments[1];\n var acc = seed;\n return new C(function (observer) {\n return _this4.subscribe({\n next: function (value) {\n var first = !hasValue;\n hasValue = true;\n\n if (!first || hasSeed) {\n try {\n acc = fn(acc, value);\n } catch (e) {\n return observer.error(e);\n }\n } else {\n acc = value;\n }\n },\n error: function (e) {\n observer.error(e);\n },\n complete: function () {\n if (!hasValue && !hasSeed) return observer.error(new TypeError('Cannot reduce an empty sequence'));\n observer.next(acc);\n observer.complete();\n }\n });\n });\n };\n\n _proto3.concat = function concat() {\n var _this5 = this;\n\n for (var _len = arguments.length, sources = new Array(_len), _key = 0; _key < _len; _key++) {\n sources[_key] = arguments[_key];\n }\n\n var C = getSpecies(this);\n return new C(function (observer) {\n var subscription;\n var index = 0;\n\n function startNext(next) {\n subscription = next.subscribe({\n next: function (v) {\n observer.next(v);\n },\n error: function (e) {\n observer.error(e);\n },\n complete: function () {\n if (index === sources.length) {\n subscription = undefined;\n observer.complete();\n } else {\n startNext(C.from(sources[index++]));\n }\n }\n });\n }\n\n startNext(_this5);\n return function () {\n if (subscription) {\n subscription.unsubscribe();\n subscription = undefined;\n }\n };\n });\n };\n\n _proto3.flatMap = function flatMap(fn) {\n var _this6 = this;\n\n if (typeof fn !== 'function') throw new TypeError(fn + ' is not a function');\n var C = getSpecies(this);\n return new C(function (observer) {\n var subscriptions = [];\n\n var outer = _this6.subscribe({\n next: function (value) {\n if (fn) {\n try {\n value = fn(value);\n } catch (e) {\n return observer.error(e);\n }\n }\n\n var inner = C.from(value).subscribe({\n next: function (value) {\n observer.next(value);\n },\n error: function (e) {\n observer.error(e);\n },\n complete: function () {\n var i = subscriptions.indexOf(inner);\n if (i >= 0) subscriptions.splice(i, 1);\n completeIfDone();\n }\n });\n subscriptions.push(inner);\n },\n error: function (e) {\n observer.error(e);\n },\n complete: function () {\n completeIfDone();\n }\n });\n\n function completeIfDone() {\n if (outer.closed && subscriptions.length === 0) observer.complete();\n }\n\n return function () {\n subscriptions.forEach(function (s) {\n return s.unsubscribe();\n });\n outer.unsubscribe();\n };\n });\n };\n\n _proto3[SymbolObservable] = function () {\n return this;\n };\n\n Observable.from = function from(x) {\n var C = typeof this === 'function' ? this : Observable;\n if (x == null) throw new TypeError(x + ' is not an object');\n var method = getMethod(x, SymbolObservable);\n\n if (method) {\n var observable = method.call(x);\n if (Object(observable) !== observable) throw new TypeError(observable + ' is not an object');\n if (isObservable(observable) && observable.constructor === C) return observable;\n return new C(function (observer) {\n return observable.subscribe(observer);\n });\n }\n\n if (hasSymbol('iterator')) {\n method = getMethod(x, SymbolIterator);\n\n if (method) {\n return new C(function (observer) {\n enqueue(function () {\n if (observer.closed) return;\n\n for (var _iterator = _createForOfIteratorHelperLoose(method.call(x)), _step; !(_step = _iterator()).done;) {\n var item = _step.value;\n observer.next(item);\n if (observer.closed) return;\n }\n\n observer.complete();\n });\n });\n }\n }\n\n if (Array.isArray(x)) {\n return new C(function (observer) {\n enqueue(function () {\n if (observer.closed) return;\n\n for (var i = 0; i < x.length; ++i) {\n observer.next(x[i]);\n if (observer.closed) return;\n }\n\n observer.complete();\n });\n });\n }\n\n throw new TypeError(x + ' is not observable');\n };\n\n Observable.of = function of() {\n for (var _len2 = arguments.length, items = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n items[_key2] = arguments[_key2];\n }\n\n var C = typeof this === 'function' ? this : Observable;\n return new C(function (observer) {\n enqueue(function () {\n if (observer.closed) return;\n\n for (var i = 0; i < items.length; ++i) {\n observer.next(items[i]);\n if (observer.closed) return;\n }\n\n observer.complete();\n });\n });\n };\n\n _createClass(Observable, null, [{\n key: SymbolSpecies,\n get: function () {\n return this;\n }\n }]);\n\n return Observable;\n}();\n\nif (hasSymbols()) {\n Object.defineProperty(Observable, Symbol('extensions'), {\n value: {\n symbol: SymbolObservable,\n hostReportError: hostReportError\n },\n configurable: true\n });\n}\n\n\n\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/zen-observable-ts/module.js?", + ); + + /***/ + }, + + /***/ 7963: /***/ (module) => { + 'use strict'; + eval( + 'module.exports = /*#__PURE__*/JSON.parse(\'[[[0,44],"disallowed_STD3_valid"],[[45,46],"valid"],[[47,47],"disallowed_STD3_valid"],[[48,57],"valid"],[[58,64],"disallowed_STD3_valid"],[[65,65],"mapped",[97]],[[66,66],"mapped",[98]],[[67,67],"mapped",[99]],[[68,68],"mapped",[100]],[[69,69],"mapped",[101]],[[70,70],"mapped",[102]],[[71,71],"mapped",[103]],[[72,72],"mapped",[104]],[[73,73],"mapped",[105]],[[74,74],"mapped",[106]],[[75,75],"mapped",[107]],[[76,76],"mapped",[108]],[[77,77],"mapped",[109]],[[78,78],"mapped",[110]],[[79,79],"mapped",[111]],[[80,80],"mapped",[112]],[[81,81],"mapped",[113]],[[82,82],"mapped",[114]],[[83,83],"mapped",[115]],[[84,84],"mapped",[116]],[[85,85],"mapped",[117]],[[86,86],"mapped",[118]],[[87,87],"mapped",[119]],[[88,88],"mapped",[120]],[[89,89],"mapped",[121]],[[90,90],"mapped",[122]],[[91,96],"disallowed_STD3_valid"],[[97,122],"valid"],[[123,127],"disallowed_STD3_valid"],[[128,159],"disallowed"],[[160,160],"disallowed_STD3_mapped",[32]],[[161,167],"valid",[],"NV8"],[[168,168],"disallowed_STD3_mapped",[32,776]],[[169,169],"valid",[],"NV8"],[[170,170],"mapped",[97]],[[171,172],"valid",[],"NV8"],[[173,173],"ignored"],[[174,174],"valid",[],"NV8"],[[175,175],"disallowed_STD3_mapped",[32,772]],[[176,177],"valid",[],"NV8"],[[178,178],"mapped",[50]],[[179,179],"mapped",[51]],[[180,180],"disallowed_STD3_mapped",[32,769]],[[181,181],"mapped",[956]],[[182,182],"valid",[],"NV8"],[[183,183],"valid"],[[184,184],"disallowed_STD3_mapped",[32,807]],[[185,185],"mapped",[49]],[[186,186],"mapped",[111]],[[187,187],"valid",[],"NV8"],[[188,188],"mapped",[49,8260,52]],[[189,189],"mapped",[49,8260,50]],[[190,190],"mapped",[51,8260,52]],[[191,191],"valid",[],"NV8"],[[192,192],"mapped",[224]],[[193,193],"mapped",[225]],[[194,194],"mapped",[226]],[[195,195],"mapped",[227]],[[196,196],"mapped",[228]],[[197,197],"mapped",[229]],[[198,198],"mapped",[230]],[[199,199],"mapped",[231]],[[200,200],"mapped",[232]],[[201,201],"mapped",[233]],[[202,202],"mapped",[234]],[[203,203],"mapped",[235]],[[204,204],"mapped",[236]],[[205,205],"mapped",[237]],[[206,206],"mapped",[238]],[[207,207],"mapped",[239]],[[208,208],"mapped",[240]],[[209,209],"mapped",[241]],[[210,210],"mapped",[242]],[[211,211],"mapped",[243]],[[212,212],"mapped",[244]],[[213,213],"mapped",[245]],[[214,214],"mapped",[246]],[[215,215],"valid",[],"NV8"],[[216,216],"mapped",[248]],[[217,217],"mapped",[249]],[[218,218],"mapped",[250]],[[219,219],"mapped",[251]],[[220,220],"mapped",[252]],[[221,221],"mapped",[253]],[[222,222],"mapped",[254]],[[223,223],"deviation",[115,115]],[[224,246],"valid"],[[247,247],"valid",[],"NV8"],[[248,255],"valid"],[[256,256],"mapped",[257]],[[257,257],"valid"],[[258,258],"mapped",[259]],[[259,259],"valid"],[[260,260],"mapped",[261]],[[261,261],"valid"],[[262,262],"mapped",[263]],[[263,263],"valid"],[[264,264],"mapped",[265]],[[265,265],"valid"],[[266,266],"mapped",[267]],[[267,267],"valid"],[[268,268],"mapped",[269]],[[269,269],"valid"],[[270,270],"mapped",[271]],[[271,271],"valid"],[[272,272],"mapped",[273]],[[273,273],"valid"],[[274,274],"mapped",[275]],[[275,275],"valid"],[[276,276],"mapped",[277]],[[277,277],"valid"],[[278,278],"mapped",[279]],[[279,279],"valid"],[[280,280],"mapped",[281]],[[281,281],"valid"],[[282,282],"mapped",[283]],[[283,283],"valid"],[[284,284],"mapped",[285]],[[285,285],"valid"],[[286,286],"mapped",[287]],[[287,287],"valid"],[[288,288],"mapped",[289]],[[289,289],"valid"],[[290,290],"mapped",[291]],[[291,291],"valid"],[[292,292],"mapped",[293]],[[293,293],"valid"],[[294,294],"mapped",[295]],[[295,295],"valid"],[[296,296],"mapped",[297]],[[297,297],"valid"],[[298,298],"mapped",[299]],[[299,299],"valid"],[[300,300],"mapped",[301]],[[301,301],"valid"],[[302,302],"mapped",[303]],[[303,303],"valid"],[[304,304],"mapped",[105,775]],[[305,305],"valid"],[[306,307],"mapped",[105,106]],[[308,308],"mapped",[309]],[[309,309],"valid"],[[310,310],"mapped",[311]],[[311,312],"valid"],[[313,313],"mapped",[314]],[[314,314],"valid"],[[315,315],"mapped",[316]],[[316,316],"valid"],[[317,317],"mapped",[318]],[[318,318],"valid"],[[319,320],"mapped",[108,183]],[[321,321],"mapped",[322]],[[322,322],"valid"],[[323,323],"mapped",[324]],[[324,324],"valid"],[[325,325],"mapped",[326]],[[326,326],"valid"],[[327,327],"mapped",[328]],[[328,328],"valid"],[[329,329],"mapped",[700,110]],[[330,330],"mapped",[331]],[[331,331],"valid"],[[332,332],"mapped",[333]],[[333,333],"valid"],[[334,334],"mapped",[335]],[[335,335],"valid"],[[336,336],"mapped",[337]],[[337,337],"valid"],[[338,338],"mapped",[339]],[[339,339],"valid"],[[340,340],"mapped",[341]],[[341,341],"valid"],[[342,342],"mapped",[343]],[[343,343],"valid"],[[344,344],"mapped",[345]],[[345,345],"valid"],[[346,346],"mapped",[347]],[[347,347],"valid"],[[348,348],"mapped",[349]],[[349,349],"valid"],[[350,350],"mapped",[351]],[[351,351],"valid"],[[352,352],"mapped",[353]],[[353,353],"valid"],[[354,354],"mapped",[355]],[[355,355],"valid"],[[356,356],"mapped",[357]],[[357,357],"valid"],[[358,358],"mapped",[359]],[[359,359],"valid"],[[360,360],"mapped",[361]],[[361,361],"valid"],[[362,362],"mapped",[363]],[[363,363],"valid"],[[364,364],"mapped",[365]],[[365,365],"valid"],[[366,366],"mapped",[367]],[[367,367],"valid"],[[368,368],"mapped",[369]],[[369,369],"valid"],[[370,370],"mapped",[371]],[[371,371],"valid"],[[372,372],"mapped",[373]],[[373,373],"valid"],[[374,374],"mapped",[375]],[[375,375],"valid"],[[376,376],"mapped",[255]],[[377,377],"mapped",[378]],[[378,378],"valid"],[[379,379],"mapped",[380]],[[380,380],"valid"],[[381,381],"mapped",[382]],[[382,382],"valid"],[[383,383],"mapped",[115]],[[384,384],"valid"],[[385,385],"mapped",[595]],[[386,386],"mapped",[387]],[[387,387],"valid"],[[388,388],"mapped",[389]],[[389,389],"valid"],[[390,390],"mapped",[596]],[[391,391],"mapped",[392]],[[392,392],"valid"],[[393,393],"mapped",[598]],[[394,394],"mapped",[599]],[[395,395],"mapped",[396]],[[396,397],"valid"],[[398,398],"mapped",[477]],[[399,399],"mapped",[601]],[[400,400],"mapped",[603]],[[401,401],"mapped",[402]],[[402,402],"valid"],[[403,403],"mapped",[608]],[[404,404],"mapped",[611]],[[405,405],"valid"],[[406,406],"mapped",[617]],[[407,407],"mapped",[616]],[[408,408],"mapped",[409]],[[409,411],"valid"],[[412,412],"mapped",[623]],[[413,413],"mapped",[626]],[[414,414],"valid"],[[415,415],"mapped",[629]],[[416,416],"mapped",[417]],[[417,417],"valid"],[[418,418],"mapped",[419]],[[419,419],"valid"],[[420,420],"mapped",[421]],[[421,421],"valid"],[[422,422],"mapped",[640]],[[423,423],"mapped",[424]],[[424,424],"valid"],[[425,425],"mapped",[643]],[[426,427],"valid"],[[428,428],"mapped",[429]],[[429,429],"valid"],[[430,430],"mapped",[648]],[[431,431],"mapped",[432]],[[432,432],"valid"],[[433,433],"mapped",[650]],[[434,434],"mapped",[651]],[[435,435],"mapped",[436]],[[436,436],"valid"],[[437,437],"mapped",[438]],[[438,438],"valid"],[[439,439],"mapped",[658]],[[440,440],"mapped",[441]],[[441,443],"valid"],[[444,444],"mapped",[445]],[[445,451],"valid"],[[452,454],"mapped",[100,382]],[[455,457],"mapped",[108,106]],[[458,460],"mapped",[110,106]],[[461,461],"mapped",[462]],[[462,462],"valid"],[[463,463],"mapped",[464]],[[464,464],"valid"],[[465,465],"mapped",[466]],[[466,466],"valid"],[[467,467],"mapped",[468]],[[468,468],"valid"],[[469,469],"mapped",[470]],[[470,470],"valid"],[[471,471],"mapped",[472]],[[472,472],"valid"],[[473,473],"mapped",[474]],[[474,474],"valid"],[[475,475],"mapped",[476]],[[476,477],"valid"],[[478,478],"mapped",[479]],[[479,479],"valid"],[[480,480],"mapped",[481]],[[481,481],"valid"],[[482,482],"mapped",[483]],[[483,483],"valid"],[[484,484],"mapped",[485]],[[485,485],"valid"],[[486,486],"mapped",[487]],[[487,487],"valid"],[[488,488],"mapped",[489]],[[489,489],"valid"],[[490,490],"mapped",[491]],[[491,491],"valid"],[[492,492],"mapped",[493]],[[493,493],"valid"],[[494,494],"mapped",[495]],[[495,496],"valid"],[[497,499],"mapped",[100,122]],[[500,500],"mapped",[501]],[[501,501],"valid"],[[502,502],"mapped",[405]],[[503,503],"mapped",[447]],[[504,504],"mapped",[505]],[[505,505],"valid"],[[506,506],"mapped",[507]],[[507,507],"valid"],[[508,508],"mapped",[509]],[[509,509],"valid"],[[510,510],"mapped",[511]],[[511,511],"valid"],[[512,512],"mapped",[513]],[[513,513],"valid"],[[514,514],"mapped",[515]],[[515,515],"valid"],[[516,516],"mapped",[517]],[[517,517],"valid"],[[518,518],"mapped",[519]],[[519,519],"valid"],[[520,520],"mapped",[521]],[[521,521],"valid"],[[522,522],"mapped",[523]],[[523,523],"valid"],[[524,524],"mapped",[525]],[[525,525],"valid"],[[526,526],"mapped",[527]],[[527,527],"valid"],[[528,528],"mapped",[529]],[[529,529],"valid"],[[530,530],"mapped",[531]],[[531,531],"valid"],[[532,532],"mapped",[533]],[[533,533],"valid"],[[534,534],"mapped",[535]],[[535,535],"valid"],[[536,536],"mapped",[537]],[[537,537],"valid"],[[538,538],"mapped",[539]],[[539,539],"valid"],[[540,540],"mapped",[541]],[[541,541],"valid"],[[542,542],"mapped",[543]],[[543,543],"valid"],[[544,544],"mapped",[414]],[[545,545],"valid"],[[546,546],"mapped",[547]],[[547,547],"valid"],[[548,548],"mapped",[549]],[[549,549],"valid"],[[550,550],"mapped",[551]],[[551,551],"valid"],[[552,552],"mapped",[553]],[[553,553],"valid"],[[554,554],"mapped",[555]],[[555,555],"valid"],[[556,556],"mapped",[557]],[[557,557],"valid"],[[558,558],"mapped",[559]],[[559,559],"valid"],[[560,560],"mapped",[561]],[[561,561],"valid"],[[562,562],"mapped",[563]],[[563,563],"valid"],[[564,566],"valid"],[[567,569],"valid"],[[570,570],"mapped",[11365]],[[571,571],"mapped",[572]],[[572,572],"valid"],[[573,573],"mapped",[410]],[[574,574],"mapped",[11366]],[[575,576],"valid"],[[577,577],"mapped",[578]],[[578,578],"valid"],[[579,579],"mapped",[384]],[[580,580],"mapped",[649]],[[581,581],"mapped",[652]],[[582,582],"mapped",[583]],[[583,583],"valid"],[[584,584],"mapped",[585]],[[585,585],"valid"],[[586,586],"mapped",[587]],[[587,587],"valid"],[[588,588],"mapped",[589]],[[589,589],"valid"],[[590,590],"mapped",[591]],[[591,591],"valid"],[[592,680],"valid"],[[681,685],"valid"],[[686,687],"valid"],[[688,688],"mapped",[104]],[[689,689],"mapped",[614]],[[690,690],"mapped",[106]],[[691,691],"mapped",[114]],[[692,692],"mapped",[633]],[[693,693],"mapped",[635]],[[694,694],"mapped",[641]],[[695,695],"mapped",[119]],[[696,696],"mapped",[121]],[[697,705],"valid"],[[706,709],"valid",[],"NV8"],[[710,721],"valid"],[[722,727],"valid",[],"NV8"],[[728,728],"disallowed_STD3_mapped",[32,774]],[[729,729],"disallowed_STD3_mapped",[32,775]],[[730,730],"disallowed_STD3_mapped",[32,778]],[[731,731],"disallowed_STD3_mapped",[32,808]],[[732,732],"disallowed_STD3_mapped",[32,771]],[[733,733],"disallowed_STD3_mapped",[32,779]],[[734,734],"valid",[],"NV8"],[[735,735],"valid",[],"NV8"],[[736,736],"mapped",[611]],[[737,737],"mapped",[108]],[[738,738],"mapped",[115]],[[739,739],"mapped",[120]],[[740,740],"mapped",[661]],[[741,745],"valid",[],"NV8"],[[746,747],"valid",[],"NV8"],[[748,748],"valid"],[[749,749],"valid",[],"NV8"],[[750,750],"valid"],[[751,767],"valid",[],"NV8"],[[768,831],"valid"],[[832,832],"mapped",[768]],[[833,833],"mapped",[769]],[[834,834],"valid"],[[835,835],"mapped",[787]],[[836,836],"mapped",[776,769]],[[837,837],"mapped",[953]],[[838,846],"valid"],[[847,847],"ignored"],[[848,855],"valid"],[[856,860],"valid"],[[861,863],"valid"],[[864,865],"valid"],[[866,866],"valid"],[[867,879],"valid"],[[880,880],"mapped",[881]],[[881,881],"valid"],[[882,882],"mapped",[883]],[[883,883],"valid"],[[884,884],"mapped",[697]],[[885,885],"valid"],[[886,886],"mapped",[887]],[[887,887],"valid"],[[888,889],"disallowed"],[[890,890],"disallowed_STD3_mapped",[32,953]],[[891,893],"valid"],[[894,894],"disallowed_STD3_mapped",[59]],[[895,895],"mapped",[1011]],[[896,899],"disallowed"],[[900,900],"disallowed_STD3_mapped",[32,769]],[[901,901],"disallowed_STD3_mapped",[32,776,769]],[[902,902],"mapped",[940]],[[903,903],"mapped",[183]],[[904,904],"mapped",[941]],[[905,905],"mapped",[942]],[[906,906],"mapped",[943]],[[907,907],"disallowed"],[[908,908],"mapped",[972]],[[909,909],"disallowed"],[[910,910],"mapped",[973]],[[911,911],"mapped",[974]],[[912,912],"valid"],[[913,913],"mapped",[945]],[[914,914],"mapped",[946]],[[915,915],"mapped",[947]],[[916,916],"mapped",[948]],[[917,917],"mapped",[949]],[[918,918],"mapped",[950]],[[919,919],"mapped",[951]],[[920,920],"mapped",[952]],[[921,921],"mapped",[953]],[[922,922],"mapped",[954]],[[923,923],"mapped",[955]],[[924,924],"mapped",[956]],[[925,925],"mapped",[957]],[[926,926],"mapped",[958]],[[927,927],"mapped",[959]],[[928,928],"mapped",[960]],[[929,929],"mapped",[961]],[[930,930],"disallowed"],[[931,931],"mapped",[963]],[[932,932],"mapped",[964]],[[933,933],"mapped",[965]],[[934,934],"mapped",[966]],[[935,935],"mapped",[967]],[[936,936],"mapped",[968]],[[937,937],"mapped",[969]],[[938,938],"mapped",[970]],[[939,939],"mapped",[971]],[[940,961],"valid"],[[962,962],"deviation",[963]],[[963,974],"valid"],[[975,975],"mapped",[983]],[[976,976],"mapped",[946]],[[977,977],"mapped",[952]],[[978,978],"mapped",[965]],[[979,979],"mapped",[973]],[[980,980],"mapped",[971]],[[981,981],"mapped",[966]],[[982,982],"mapped",[960]],[[983,983],"valid"],[[984,984],"mapped",[985]],[[985,985],"valid"],[[986,986],"mapped",[987]],[[987,987],"valid"],[[988,988],"mapped",[989]],[[989,989],"valid"],[[990,990],"mapped",[991]],[[991,991],"valid"],[[992,992],"mapped",[993]],[[993,993],"valid"],[[994,994],"mapped",[995]],[[995,995],"valid"],[[996,996],"mapped",[997]],[[997,997],"valid"],[[998,998],"mapped",[999]],[[999,999],"valid"],[[1000,1000],"mapped",[1001]],[[1001,1001],"valid"],[[1002,1002],"mapped",[1003]],[[1003,1003],"valid"],[[1004,1004],"mapped",[1005]],[[1005,1005],"valid"],[[1006,1006],"mapped",[1007]],[[1007,1007],"valid"],[[1008,1008],"mapped",[954]],[[1009,1009],"mapped",[961]],[[1010,1010],"mapped",[963]],[[1011,1011],"valid"],[[1012,1012],"mapped",[952]],[[1013,1013],"mapped",[949]],[[1014,1014],"valid",[],"NV8"],[[1015,1015],"mapped",[1016]],[[1016,1016],"valid"],[[1017,1017],"mapped",[963]],[[1018,1018],"mapped",[1019]],[[1019,1019],"valid"],[[1020,1020],"valid"],[[1021,1021],"mapped",[891]],[[1022,1022],"mapped",[892]],[[1023,1023],"mapped",[893]],[[1024,1024],"mapped",[1104]],[[1025,1025],"mapped",[1105]],[[1026,1026],"mapped",[1106]],[[1027,1027],"mapped",[1107]],[[1028,1028],"mapped",[1108]],[[1029,1029],"mapped",[1109]],[[1030,1030],"mapped",[1110]],[[1031,1031],"mapped",[1111]],[[1032,1032],"mapped",[1112]],[[1033,1033],"mapped",[1113]],[[1034,1034],"mapped",[1114]],[[1035,1035],"mapped",[1115]],[[1036,1036],"mapped",[1116]],[[1037,1037],"mapped",[1117]],[[1038,1038],"mapped",[1118]],[[1039,1039],"mapped",[1119]],[[1040,1040],"mapped",[1072]],[[1041,1041],"mapped",[1073]],[[1042,1042],"mapped",[1074]],[[1043,1043],"mapped",[1075]],[[1044,1044],"mapped",[1076]],[[1045,1045],"mapped",[1077]],[[1046,1046],"mapped",[1078]],[[1047,1047],"mapped",[1079]],[[1048,1048],"mapped",[1080]],[[1049,1049],"mapped",[1081]],[[1050,1050],"mapped",[1082]],[[1051,1051],"mapped",[1083]],[[1052,1052],"mapped",[1084]],[[1053,1053],"mapped",[1085]],[[1054,1054],"mapped",[1086]],[[1055,1055],"mapped",[1087]],[[1056,1056],"mapped",[1088]],[[1057,1057],"mapped",[1089]],[[1058,1058],"mapped",[1090]],[[1059,1059],"mapped",[1091]],[[1060,1060],"mapped",[1092]],[[1061,1061],"mapped",[1093]],[[1062,1062],"mapped",[1094]],[[1063,1063],"mapped",[1095]],[[1064,1064],"mapped",[1096]],[[1065,1065],"mapped",[1097]],[[1066,1066],"mapped",[1098]],[[1067,1067],"mapped",[1099]],[[1068,1068],"mapped",[1100]],[[1069,1069],"mapped",[1101]],[[1070,1070],"mapped",[1102]],[[1071,1071],"mapped",[1103]],[[1072,1103],"valid"],[[1104,1104],"valid"],[[1105,1116],"valid"],[[1117,1117],"valid"],[[1118,1119],"valid"],[[1120,1120],"mapped",[1121]],[[1121,1121],"valid"],[[1122,1122],"mapped",[1123]],[[1123,1123],"valid"],[[1124,1124],"mapped",[1125]],[[1125,1125],"valid"],[[1126,1126],"mapped",[1127]],[[1127,1127],"valid"],[[1128,1128],"mapped",[1129]],[[1129,1129],"valid"],[[1130,1130],"mapped",[1131]],[[1131,1131],"valid"],[[1132,1132],"mapped",[1133]],[[1133,1133],"valid"],[[1134,1134],"mapped",[1135]],[[1135,1135],"valid"],[[1136,1136],"mapped",[1137]],[[1137,1137],"valid"],[[1138,1138],"mapped",[1139]],[[1139,1139],"valid"],[[1140,1140],"mapped",[1141]],[[1141,1141],"valid"],[[1142,1142],"mapped",[1143]],[[1143,1143],"valid"],[[1144,1144],"mapped",[1145]],[[1145,1145],"valid"],[[1146,1146],"mapped",[1147]],[[1147,1147],"valid"],[[1148,1148],"mapped",[1149]],[[1149,1149],"valid"],[[1150,1150],"mapped",[1151]],[[1151,1151],"valid"],[[1152,1152],"mapped",[1153]],[[1153,1153],"valid"],[[1154,1154],"valid",[],"NV8"],[[1155,1158],"valid"],[[1159,1159],"valid"],[[1160,1161],"valid",[],"NV8"],[[1162,1162],"mapped",[1163]],[[1163,1163],"valid"],[[1164,1164],"mapped",[1165]],[[1165,1165],"valid"],[[1166,1166],"mapped",[1167]],[[1167,1167],"valid"],[[1168,1168],"mapped",[1169]],[[1169,1169],"valid"],[[1170,1170],"mapped",[1171]],[[1171,1171],"valid"],[[1172,1172],"mapped",[1173]],[[1173,1173],"valid"],[[1174,1174],"mapped",[1175]],[[1175,1175],"valid"],[[1176,1176],"mapped",[1177]],[[1177,1177],"valid"],[[1178,1178],"mapped",[1179]],[[1179,1179],"valid"],[[1180,1180],"mapped",[1181]],[[1181,1181],"valid"],[[1182,1182],"mapped",[1183]],[[1183,1183],"valid"],[[1184,1184],"mapped",[1185]],[[1185,1185],"valid"],[[1186,1186],"mapped",[1187]],[[1187,1187],"valid"],[[1188,1188],"mapped",[1189]],[[1189,1189],"valid"],[[1190,1190],"mapped",[1191]],[[1191,1191],"valid"],[[1192,1192],"mapped",[1193]],[[1193,1193],"valid"],[[1194,1194],"mapped",[1195]],[[1195,1195],"valid"],[[1196,1196],"mapped",[1197]],[[1197,1197],"valid"],[[1198,1198],"mapped",[1199]],[[1199,1199],"valid"],[[1200,1200],"mapped",[1201]],[[1201,1201],"valid"],[[1202,1202],"mapped",[1203]],[[1203,1203],"valid"],[[1204,1204],"mapped",[1205]],[[1205,1205],"valid"],[[1206,1206],"mapped",[1207]],[[1207,1207],"valid"],[[1208,1208],"mapped",[1209]],[[1209,1209],"valid"],[[1210,1210],"mapped",[1211]],[[1211,1211],"valid"],[[1212,1212],"mapped",[1213]],[[1213,1213],"valid"],[[1214,1214],"mapped",[1215]],[[1215,1215],"valid"],[[1216,1216],"disallowed"],[[1217,1217],"mapped",[1218]],[[1218,1218],"valid"],[[1219,1219],"mapped",[1220]],[[1220,1220],"valid"],[[1221,1221],"mapped",[1222]],[[1222,1222],"valid"],[[1223,1223],"mapped",[1224]],[[1224,1224],"valid"],[[1225,1225],"mapped",[1226]],[[1226,1226],"valid"],[[1227,1227],"mapped",[1228]],[[1228,1228],"valid"],[[1229,1229],"mapped",[1230]],[[1230,1230],"valid"],[[1231,1231],"valid"],[[1232,1232],"mapped",[1233]],[[1233,1233],"valid"],[[1234,1234],"mapped",[1235]],[[1235,1235],"valid"],[[1236,1236],"mapped",[1237]],[[1237,1237],"valid"],[[1238,1238],"mapped",[1239]],[[1239,1239],"valid"],[[1240,1240],"mapped",[1241]],[[1241,1241],"valid"],[[1242,1242],"mapped",[1243]],[[1243,1243],"valid"],[[1244,1244],"mapped",[1245]],[[1245,1245],"valid"],[[1246,1246],"mapped",[1247]],[[1247,1247],"valid"],[[1248,1248],"mapped",[1249]],[[1249,1249],"valid"],[[1250,1250],"mapped",[1251]],[[1251,1251],"valid"],[[1252,1252],"mapped",[1253]],[[1253,1253],"valid"],[[1254,1254],"mapped",[1255]],[[1255,1255],"valid"],[[1256,1256],"mapped",[1257]],[[1257,1257],"valid"],[[1258,1258],"mapped",[1259]],[[1259,1259],"valid"],[[1260,1260],"mapped",[1261]],[[1261,1261],"valid"],[[1262,1262],"mapped",[1263]],[[1263,1263],"valid"],[[1264,1264],"mapped",[1265]],[[1265,1265],"valid"],[[1266,1266],"mapped",[1267]],[[1267,1267],"valid"],[[1268,1268],"mapped",[1269]],[[1269,1269],"valid"],[[1270,1270],"mapped",[1271]],[[1271,1271],"valid"],[[1272,1272],"mapped",[1273]],[[1273,1273],"valid"],[[1274,1274],"mapped",[1275]],[[1275,1275],"valid"],[[1276,1276],"mapped",[1277]],[[1277,1277],"valid"],[[1278,1278],"mapped",[1279]],[[1279,1279],"valid"],[[1280,1280],"mapped",[1281]],[[1281,1281],"valid"],[[1282,1282],"mapped",[1283]],[[1283,1283],"valid"],[[1284,1284],"mapped",[1285]],[[1285,1285],"valid"],[[1286,1286],"mapped",[1287]],[[1287,1287],"valid"],[[1288,1288],"mapped",[1289]],[[1289,1289],"valid"],[[1290,1290],"mapped",[1291]],[[1291,1291],"valid"],[[1292,1292],"mapped",[1293]],[[1293,1293],"valid"],[[1294,1294],"mapped",[1295]],[[1295,1295],"valid"],[[1296,1296],"mapped",[1297]],[[1297,1297],"valid"],[[1298,1298],"mapped",[1299]],[[1299,1299],"valid"],[[1300,1300],"mapped",[1301]],[[1301,1301],"valid"],[[1302,1302],"mapped",[1303]],[[1303,1303],"valid"],[[1304,1304],"mapped",[1305]],[[1305,1305],"valid"],[[1306,1306],"mapped",[1307]],[[1307,1307],"valid"],[[1308,1308],"mapped",[1309]],[[1309,1309],"valid"],[[1310,1310],"mapped",[1311]],[[1311,1311],"valid"],[[1312,1312],"mapped",[1313]],[[1313,1313],"valid"],[[1314,1314],"mapped",[1315]],[[1315,1315],"valid"],[[1316,1316],"mapped",[1317]],[[1317,1317],"valid"],[[1318,1318],"mapped",[1319]],[[1319,1319],"valid"],[[1320,1320],"mapped",[1321]],[[1321,1321],"valid"],[[1322,1322],"mapped",[1323]],[[1323,1323],"valid"],[[1324,1324],"mapped",[1325]],[[1325,1325],"valid"],[[1326,1326],"mapped",[1327]],[[1327,1327],"valid"],[[1328,1328],"disallowed"],[[1329,1329],"mapped",[1377]],[[1330,1330],"mapped",[1378]],[[1331,1331],"mapped",[1379]],[[1332,1332],"mapped",[1380]],[[1333,1333],"mapped",[1381]],[[1334,1334],"mapped",[1382]],[[1335,1335],"mapped",[1383]],[[1336,1336],"mapped",[1384]],[[1337,1337],"mapped",[1385]],[[1338,1338],"mapped",[1386]],[[1339,1339],"mapped",[1387]],[[1340,1340],"mapped",[1388]],[[1341,1341],"mapped",[1389]],[[1342,1342],"mapped",[1390]],[[1343,1343],"mapped",[1391]],[[1344,1344],"mapped",[1392]],[[1345,1345],"mapped",[1393]],[[1346,1346],"mapped",[1394]],[[1347,1347],"mapped",[1395]],[[1348,1348],"mapped",[1396]],[[1349,1349],"mapped",[1397]],[[1350,1350],"mapped",[1398]],[[1351,1351],"mapped",[1399]],[[1352,1352],"mapped",[1400]],[[1353,1353],"mapped",[1401]],[[1354,1354],"mapped",[1402]],[[1355,1355],"mapped",[1403]],[[1356,1356],"mapped",[1404]],[[1357,1357],"mapped",[1405]],[[1358,1358],"mapped",[1406]],[[1359,1359],"mapped",[1407]],[[1360,1360],"mapped",[1408]],[[1361,1361],"mapped",[1409]],[[1362,1362],"mapped",[1410]],[[1363,1363],"mapped",[1411]],[[1364,1364],"mapped",[1412]],[[1365,1365],"mapped",[1413]],[[1366,1366],"mapped",[1414]],[[1367,1368],"disallowed"],[[1369,1369],"valid"],[[1370,1375],"valid",[],"NV8"],[[1376,1376],"disallowed"],[[1377,1414],"valid"],[[1415,1415],"mapped",[1381,1410]],[[1416,1416],"disallowed"],[[1417,1417],"valid",[],"NV8"],[[1418,1418],"valid",[],"NV8"],[[1419,1420],"disallowed"],[[1421,1422],"valid",[],"NV8"],[[1423,1423],"valid",[],"NV8"],[[1424,1424],"disallowed"],[[1425,1441],"valid"],[[1442,1442],"valid"],[[1443,1455],"valid"],[[1456,1465],"valid"],[[1466,1466],"valid"],[[1467,1469],"valid"],[[1470,1470],"valid",[],"NV8"],[[1471,1471],"valid"],[[1472,1472],"valid",[],"NV8"],[[1473,1474],"valid"],[[1475,1475],"valid",[],"NV8"],[[1476,1476],"valid"],[[1477,1477],"valid"],[[1478,1478],"valid",[],"NV8"],[[1479,1479],"valid"],[[1480,1487],"disallowed"],[[1488,1514],"valid"],[[1515,1519],"disallowed"],[[1520,1524],"valid"],[[1525,1535],"disallowed"],[[1536,1539],"disallowed"],[[1540,1540],"disallowed"],[[1541,1541],"disallowed"],[[1542,1546],"valid",[],"NV8"],[[1547,1547],"valid",[],"NV8"],[[1548,1548],"valid",[],"NV8"],[[1549,1551],"valid",[],"NV8"],[[1552,1557],"valid"],[[1558,1562],"valid"],[[1563,1563],"valid",[],"NV8"],[[1564,1564],"disallowed"],[[1565,1565],"disallowed"],[[1566,1566],"valid",[],"NV8"],[[1567,1567],"valid",[],"NV8"],[[1568,1568],"valid"],[[1569,1594],"valid"],[[1595,1599],"valid"],[[1600,1600],"valid",[],"NV8"],[[1601,1618],"valid"],[[1619,1621],"valid"],[[1622,1624],"valid"],[[1625,1630],"valid"],[[1631,1631],"valid"],[[1632,1641],"valid"],[[1642,1645],"valid",[],"NV8"],[[1646,1647],"valid"],[[1648,1652],"valid"],[[1653,1653],"mapped",[1575,1652]],[[1654,1654],"mapped",[1608,1652]],[[1655,1655],"mapped",[1735,1652]],[[1656,1656],"mapped",[1610,1652]],[[1657,1719],"valid"],[[1720,1721],"valid"],[[1722,1726],"valid"],[[1727,1727],"valid"],[[1728,1742],"valid"],[[1743,1743],"valid"],[[1744,1747],"valid"],[[1748,1748],"valid",[],"NV8"],[[1749,1756],"valid"],[[1757,1757],"disallowed"],[[1758,1758],"valid",[],"NV8"],[[1759,1768],"valid"],[[1769,1769],"valid",[],"NV8"],[[1770,1773],"valid"],[[1774,1775],"valid"],[[1776,1785],"valid"],[[1786,1790],"valid"],[[1791,1791],"valid"],[[1792,1805],"valid",[],"NV8"],[[1806,1806],"disallowed"],[[1807,1807],"disallowed"],[[1808,1836],"valid"],[[1837,1839],"valid"],[[1840,1866],"valid"],[[1867,1868],"disallowed"],[[1869,1871],"valid"],[[1872,1901],"valid"],[[1902,1919],"valid"],[[1920,1968],"valid"],[[1969,1969],"valid"],[[1970,1983],"disallowed"],[[1984,2037],"valid"],[[2038,2042],"valid",[],"NV8"],[[2043,2047],"disallowed"],[[2048,2093],"valid"],[[2094,2095],"disallowed"],[[2096,2110],"valid",[],"NV8"],[[2111,2111],"disallowed"],[[2112,2139],"valid"],[[2140,2141],"disallowed"],[[2142,2142],"valid",[],"NV8"],[[2143,2207],"disallowed"],[[2208,2208],"valid"],[[2209,2209],"valid"],[[2210,2220],"valid"],[[2221,2226],"valid"],[[2227,2228],"valid"],[[2229,2274],"disallowed"],[[2275,2275],"valid"],[[2276,2302],"valid"],[[2303,2303],"valid"],[[2304,2304],"valid"],[[2305,2307],"valid"],[[2308,2308],"valid"],[[2309,2361],"valid"],[[2362,2363],"valid"],[[2364,2381],"valid"],[[2382,2382],"valid"],[[2383,2383],"valid"],[[2384,2388],"valid"],[[2389,2389],"valid"],[[2390,2391],"valid"],[[2392,2392],"mapped",[2325,2364]],[[2393,2393],"mapped",[2326,2364]],[[2394,2394],"mapped",[2327,2364]],[[2395,2395],"mapped",[2332,2364]],[[2396,2396],"mapped",[2337,2364]],[[2397,2397],"mapped",[2338,2364]],[[2398,2398],"mapped",[2347,2364]],[[2399,2399],"mapped",[2351,2364]],[[2400,2403],"valid"],[[2404,2405],"valid",[],"NV8"],[[2406,2415],"valid"],[[2416,2416],"valid",[],"NV8"],[[2417,2418],"valid"],[[2419,2423],"valid"],[[2424,2424],"valid"],[[2425,2426],"valid"],[[2427,2428],"valid"],[[2429,2429],"valid"],[[2430,2431],"valid"],[[2432,2432],"valid"],[[2433,2435],"valid"],[[2436,2436],"disallowed"],[[2437,2444],"valid"],[[2445,2446],"disallowed"],[[2447,2448],"valid"],[[2449,2450],"disallowed"],[[2451,2472],"valid"],[[2473,2473],"disallowed"],[[2474,2480],"valid"],[[2481,2481],"disallowed"],[[2482,2482],"valid"],[[2483,2485],"disallowed"],[[2486,2489],"valid"],[[2490,2491],"disallowed"],[[2492,2492],"valid"],[[2493,2493],"valid"],[[2494,2500],"valid"],[[2501,2502],"disallowed"],[[2503,2504],"valid"],[[2505,2506],"disallowed"],[[2507,2509],"valid"],[[2510,2510],"valid"],[[2511,2518],"disallowed"],[[2519,2519],"valid"],[[2520,2523],"disallowed"],[[2524,2524],"mapped",[2465,2492]],[[2525,2525],"mapped",[2466,2492]],[[2526,2526],"disallowed"],[[2527,2527],"mapped",[2479,2492]],[[2528,2531],"valid"],[[2532,2533],"disallowed"],[[2534,2545],"valid"],[[2546,2554],"valid",[],"NV8"],[[2555,2555],"valid",[],"NV8"],[[2556,2560],"disallowed"],[[2561,2561],"valid"],[[2562,2562],"valid"],[[2563,2563],"valid"],[[2564,2564],"disallowed"],[[2565,2570],"valid"],[[2571,2574],"disallowed"],[[2575,2576],"valid"],[[2577,2578],"disallowed"],[[2579,2600],"valid"],[[2601,2601],"disallowed"],[[2602,2608],"valid"],[[2609,2609],"disallowed"],[[2610,2610],"valid"],[[2611,2611],"mapped",[2610,2620]],[[2612,2612],"disallowed"],[[2613,2613],"valid"],[[2614,2614],"mapped",[2616,2620]],[[2615,2615],"disallowed"],[[2616,2617],"valid"],[[2618,2619],"disallowed"],[[2620,2620],"valid"],[[2621,2621],"disallowed"],[[2622,2626],"valid"],[[2627,2630],"disallowed"],[[2631,2632],"valid"],[[2633,2634],"disallowed"],[[2635,2637],"valid"],[[2638,2640],"disallowed"],[[2641,2641],"valid"],[[2642,2648],"disallowed"],[[2649,2649],"mapped",[2582,2620]],[[2650,2650],"mapped",[2583,2620]],[[2651,2651],"mapped",[2588,2620]],[[2652,2652],"valid"],[[2653,2653],"disallowed"],[[2654,2654],"mapped",[2603,2620]],[[2655,2661],"disallowed"],[[2662,2676],"valid"],[[2677,2677],"valid"],[[2678,2688],"disallowed"],[[2689,2691],"valid"],[[2692,2692],"disallowed"],[[2693,2699],"valid"],[[2700,2700],"valid"],[[2701,2701],"valid"],[[2702,2702],"disallowed"],[[2703,2705],"valid"],[[2706,2706],"disallowed"],[[2707,2728],"valid"],[[2729,2729],"disallowed"],[[2730,2736],"valid"],[[2737,2737],"disallowed"],[[2738,2739],"valid"],[[2740,2740],"disallowed"],[[2741,2745],"valid"],[[2746,2747],"disallowed"],[[2748,2757],"valid"],[[2758,2758],"disallowed"],[[2759,2761],"valid"],[[2762,2762],"disallowed"],[[2763,2765],"valid"],[[2766,2767],"disallowed"],[[2768,2768],"valid"],[[2769,2783],"disallowed"],[[2784,2784],"valid"],[[2785,2787],"valid"],[[2788,2789],"disallowed"],[[2790,2799],"valid"],[[2800,2800],"valid",[],"NV8"],[[2801,2801],"valid",[],"NV8"],[[2802,2808],"disallowed"],[[2809,2809],"valid"],[[2810,2816],"disallowed"],[[2817,2819],"valid"],[[2820,2820],"disallowed"],[[2821,2828],"valid"],[[2829,2830],"disallowed"],[[2831,2832],"valid"],[[2833,2834],"disallowed"],[[2835,2856],"valid"],[[2857,2857],"disallowed"],[[2858,2864],"valid"],[[2865,2865],"disallowed"],[[2866,2867],"valid"],[[2868,2868],"disallowed"],[[2869,2869],"valid"],[[2870,2873],"valid"],[[2874,2875],"disallowed"],[[2876,2883],"valid"],[[2884,2884],"valid"],[[2885,2886],"disallowed"],[[2887,2888],"valid"],[[2889,2890],"disallowed"],[[2891,2893],"valid"],[[2894,2901],"disallowed"],[[2902,2903],"valid"],[[2904,2907],"disallowed"],[[2908,2908],"mapped",[2849,2876]],[[2909,2909],"mapped",[2850,2876]],[[2910,2910],"disallowed"],[[2911,2913],"valid"],[[2914,2915],"valid"],[[2916,2917],"disallowed"],[[2918,2927],"valid"],[[2928,2928],"valid",[],"NV8"],[[2929,2929],"valid"],[[2930,2935],"valid",[],"NV8"],[[2936,2945],"disallowed"],[[2946,2947],"valid"],[[2948,2948],"disallowed"],[[2949,2954],"valid"],[[2955,2957],"disallowed"],[[2958,2960],"valid"],[[2961,2961],"disallowed"],[[2962,2965],"valid"],[[2966,2968],"disallowed"],[[2969,2970],"valid"],[[2971,2971],"disallowed"],[[2972,2972],"valid"],[[2973,2973],"disallowed"],[[2974,2975],"valid"],[[2976,2978],"disallowed"],[[2979,2980],"valid"],[[2981,2983],"disallowed"],[[2984,2986],"valid"],[[2987,2989],"disallowed"],[[2990,2997],"valid"],[[2998,2998],"valid"],[[2999,3001],"valid"],[[3002,3005],"disallowed"],[[3006,3010],"valid"],[[3011,3013],"disallowed"],[[3014,3016],"valid"],[[3017,3017],"disallowed"],[[3018,3021],"valid"],[[3022,3023],"disallowed"],[[3024,3024],"valid"],[[3025,3030],"disallowed"],[[3031,3031],"valid"],[[3032,3045],"disallowed"],[[3046,3046],"valid"],[[3047,3055],"valid"],[[3056,3058],"valid",[],"NV8"],[[3059,3066],"valid",[],"NV8"],[[3067,3071],"disallowed"],[[3072,3072],"valid"],[[3073,3075],"valid"],[[3076,3076],"disallowed"],[[3077,3084],"valid"],[[3085,3085],"disallowed"],[[3086,3088],"valid"],[[3089,3089],"disallowed"],[[3090,3112],"valid"],[[3113,3113],"disallowed"],[[3114,3123],"valid"],[[3124,3124],"valid"],[[3125,3129],"valid"],[[3130,3132],"disallowed"],[[3133,3133],"valid"],[[3134,3140],"valid"],[[3141,3141],"disallowed"],[[3142,3144],"valid"],[[3145,3145],"disallowed"],[[3146,3149],"valid"],[[3150,3156],"disallowed"],[[3157,3158],"valid"],[[3159,3159],"disallowed"],[[3160,3161],"valid"],[[3162,3162],"valid"],[[3163,3167],"disallowed"],[[3168,3169],"valid"],[[3170,3171],"valid"],[[3172,3173],"disallowed"],[[3174,3183],"valid"],[[3184,3191],"disallowed"],[[3192,3199],"valid",[],"NV8"],[[3200,3200],"disallowed"],[[3201,3201],"valid"],[[3202,3203],"valid"],[[3204,3204],"disallowed"],[[3205,3212],"valid"],[[3213,3213],"disallowed"],[[3214,3216],"valid"],[[3217,3217],"disallowed"],[[3218,3240],"valid"],[[3241,3241],"disallowed"],[[3242,3251],"valid"],[[3252,3252],"disallowed"],[[3253,3257],"valid"],[[3258,3259],"disallowed"],[[3260,3261],"valid"],[[3262,3268],"valid"],[[3269,3269],"disallowed"],[[3270,3272],"valid"],[[3273,3273],"disallowed"],[[3274,3277],"valid"],[[3278,3284],"disallowed"],[[3285,3286],"valid"],[[3287,3293],"disallowed"],[[3294,3294],"valid"],[[3295,3295],"disallowed"],[[3296,3297],"valid"],[[3298,3299],"valid"],[[3300,3301],"disallowed"],[[3302,3311],"valid"],[[3312,3312],"disallowed"],[[3313,3314],"valid"],[[3315,3328],"disallowed"],[[3329,3329],"valid"],[[3330,3331],"valid"],[[3332,3332],"disallowed"],[[3333,3340],"valid"],[[3341,3341],"disallowed"],[[3342,3344],"valid"],[[3345,3345],"disallowed"],[[3346,3368],"valid"],[[3369,3369],"valid"],[[3370,3385],"valid"],[[3386,3386],"valid"],[[3387,3388],"disallowed"],[[3389,3389],"valid"],[[3390,3395],"valid"],[[3396,3396],"valid"],[[3397,3397],"disallowed"],[[3398,3400],"valid"],[[3401,3401],"disallowed"],[[3402,3405],"valid"],[[3406,3406],"valid"],[[3407,3414],"disallowed"],[[3415,3415],"valid"],[[3416,3422],"disallowed"],[[3423,3423],"valid"],[[3424,3425],"valid"],[[3426,3427],"valid"],[[3428,3429],"disallowed"],[[3430,3439],"valid"],[[3440,3445],"valid",[],"NV8"],[[3446,3448],"disallowed"],[[3449,3449],"valid",[],"NV8"],[[3450,3455],"valid"],[[3456,3457],"disallowed"],[[3458,3459],"valid"],[[3460,3460],"disallowed"],[[3461,3478],"valid"],[[3479,3481],"disallowed"],[[3482,3505],"valid"],[[3506,3506],"disallowed"],[[3507,3515],"valid"],[[3516,3516],"disallowed"],[[3517,3517],"valid"],[[3518,3519],"disallowed"],[[3520,3526],"valid"],[[3527,3529],"disallowed"],[[3530,3530],"valid"],[[3531,3534],"disallowed"],[[3535,3540],"valid"],[[3541,3541],"disallowed"],[[3542,3542],"valid"],[[3543,3543],"disallowed"],[[3544,3551],"valid"],[[3552,3557],"disallowed"],[[3558,3567],"valid"],[[3568,3569],"disallowed"],[[3570,3571],"valid"],[[3572,3572],"valid",[],"NV8"],[[3573,3584],"disallowed"],[[3585,3634],"valid"],[[3635,3635],"mapped",[3661,3634]],[[3636,3642],"valid"],[[3643,3646],"disallowed"],[[3647,3647],"valid",[],"NV8"],[[3648,3662],"valid"],[[3663,3663],"valid",[],"NV8"],[[3664,3673],"valid"],[[3674,3675],"valid",[],"NV8"],[[3676,3712],"disallowed"],[[3713,3714],"valid"],[[3715,3715],"disallowed"],[[3716,3716],"valid"],[[3717,3718],"disallowed"],[[3719,3720],"valid"],[[3721,3721],"disallowed"],[[3722,3722],"valid"],[[3723,3724],"disallowed"],[[3725,3725],"valid"],[[3726,3731],"disallowed"],[[3732,3735],"valid"],[[3736,3736],"disallowed"],[[3737,3743],"valid"],[[3744,3744],"disallowed"],[[3745,3747],"valid"],[[3748,3748],"disallowed"],[[3749,3749],"valid"],[[3750,3750],"disallowed"],[[3751,3751],"valid"],[[3752,3753],"disallowed"],[[3754,3755],"valid"],[[3756,3756],"disallowed"],[[3757,3762],"valid"],[[3763,3763],"mapped",[3789,3762]],[[3764,3769],"valid"],[[3770,3770],"disallowed"],[[3771,3773],"valid"],[[3774,3775],"disallowed"],[[3776,3780],"valid"],[[3781,3781],"disallowed"],[[3782,3782],"valid"],[[3783,3783],"disallowed"],[[3784,3789],"valid"],[[3790,3791],"disallowed"],[[3792,3801],"valid"],[[3802,3803],"disallowed"],[[3804,3804],"mapped",[3755,3737]],[[3805,3805],"mapped",[3755,3745]],[[3806,3807],"valid"],[[3808,3839],"disallowed"],[[3840,3840],"valid"],[[3841,3850],"valid",[],"NV8"],[[3851,3851],"valid"],[[3852,3852],"mapped",[3851]],[[3853,3863],"valid",[],"NV8"],[[3864,3865],"valid"],[[3866,3871],"valid",[],"NV8"],[[3872,3881],"valid"],[[3882,3892],"valid",[],"NV8"],[[3893,3893],"valid"],[[3894,3894],"valid",[],"NV8"],[[3895,3895],"valid"],[[3896,3896],"valid",[],"NV8"],[[3897,3897],"valid"],[[3898,3901],"valid",[],"NV8"],[[3902,3906],"valid"],[[3907,3907],"mapped",[3906,4023]],[[3908,3911],"valid"],[[3912,3912],"disallowed"],[[3913,3916],"valid"],[[3917,3917],"mapped",[3916,4023]],[[3918,3921],"valid"],[[3922,3922],"mapped",[3921,4023]],[[3923,3926],"valid"],[[3927,3927],"mapped",[3926,4023]],[[3928,3931],"valid"],[[3932,3932],"mapped",[3931,4023]],[[3933,3944],"valid"],[[3945,3945],"mapped",[3904,4021]],[[3946,3946],"valid"],[[3947,3948],"valid"],[[3949,3952],"disallowed"],[[3953,3954],"valid"],[[3955,3955],"mapped",[3953,3954]],[[3956,3956],"valid"],[[3957,3957],"mapped",[3953,3956]],[[3958,3958],"mapped",[4018,3968]],[[3959,3959],"mapped",[4018,3953,3968]],[[3960,3960],"mapped",[4019,3968]],[[3961,3961],"mapped",[4019,3953,3968]],[[3962,3968],"valid"],[[3969,3969],"mapped",[3953,3968]],[[3970,3972],"valid"],[[3973,3973],"valid",[],"NV8"],[[3974,3979],"valid"],[[3980,3983],"valid"],[[3984,3986],"valid"],[[3987,3987],"mapped",[3986,4023]],[[3988,3989],"valid"],[[3990,3990],"valid"],[[3991,3991],"valid"],[[3992,3992],"disallowed"],[[3993,3996],"valid"],[[3997,3997],"mapped",[3996,4023]],[[3998,4001],"valid"],[[4002,4002],"mapped",[4001,4023]],[[4003,4006],"valid"],[[4007,4007],"mapped",[4006,4023]],[[4008,4011],"valid"],[[4012,4012],"mapped",[4011,4023]],[[4013,4013],"valid"],[[4014,4016],"valid"],[[4017,4023],"valid"],[[4024,4024],"valid"],[[4025,4025],"mapped",[3984,4021]],[[4026,4028],"valid"],[[4029,4029],"disallowed"],[[4030,4037],"valid",[],"NV8"],[[4038,4038],"valid"],[[4039,4044],"valid",[],"NV8"],[[4045,4045],"disallowed"],[[4046,4046],"valid",[],"NV8"],[[4047,4047],"valid",[],"NV8"],[[4048,4049],"valid",[],"NV8"],[[4050,4052],"valid",[],"NV8"],[[4053,4056],"valid",[],"NV8"],[[4057,4058],"valid",[],"NV8"],[[4059,4095],"disallowed"],[[4096,4129],"valid"],[[4130,4130],"valid"],[[4131,4135],"valid"],[[4136,4136],"valid"],[[4137,4138],"valid"],[[4139,4139],"valid"],[[4140,4146],"valid"],[[4147,4149],"valid"],[[4150,4153],"valid"],[[4154,4159],"valid"],[[4160,4169],"valid"],[[4170,4175],"valid",[],"NV8"],[[4176,4185],"valid"],[[4186,4249],"valid"],[[4250,4253],"valid"],[[4254,4255],"valid",[],"NV8"],[[4256,4293],"disallowed"],[[4294,4294],"disallowed"],[[4295,4295],"mapped",[11559]],[[4296,4300],"disallowed"],[[4301,4301],"mapped",[11565]],[[4302,4303],"disallowed"],[[4304,4342],"valid"],[[4343,4344],"valid"],[[4345,4346],"valid"],[[4347,4347],"valid",[],"NV8"],[[4348,4348],"mapped",[4316]],[[4349,4351],"valid"],[[4352,4441],"valid",[],"NV8"],[[4442,4446],"valid",[],"NV8"],[[4447,4448],"disallowed"],[[4449,4514],"valid",[],"NV8"],[[4515,4519],"valid",[],"NV8"],[[4520,4601],"valid",[],"NV8"],[[4602,4607],"valid",[],"NV8"],[[4608,4614],"valid"],[[4615,4615],"valid"],[[4616,4678],"valid"],[[4679,4679],"valid"],[[4680,4680],"valid"],[[4681,4681],"disallowed"],[[4682,4685],"valid"],[[4686,4687],"disallowed"],[[4688,4694],"valid"],[[4695,4695],"disallowed"],[[4696,4696],"valid"],[[4697,4697],"disallowed"],[[4698,4701],"valid"],[[4702,4703],"disallowed"],[[4704,4742],"valid"],[[4743,4743],"valid"],[[4744,4744],"valid"],[[4745,4745],"disallowed"],[[4746,4749],"valid"],[[4750,4751],"disallowed"],[[4752,4782],"valid"],[[4783,4783],"valid"],[[4784,4784],"valid"],[[4785,4785],"disallowed"],[[4786,4789],"valid"],[[4790,4791],"disallowed"],[[4792,4798],"valid"],[[4799,4799],"disallowed"],[[4800,4800],"valid"],[[4801,4801],"disallowed"],[[4802,4805],"valid"],[[4806,4807],"disallowed"],[[4808,4814],"valid"],[[4815,4815],"valid"],[[4816,4822],"valid"],[[4823,4823],"disallowed"],[[4824,4846],"valid"],[[4847,4847],"valid"],[[4848,4878],"valid"],[[4879,4879],"valid"],[[4880,4880],"valid"],[[4881,4881],"disallowed"],[[4882,4885],"valid"],[[4886,4887],"disallowed"],[[4888,4894],"valid"],[[4895,4895],"valid"],[[4896,4934],"valid"],[[4935,4935],"valid"],[[4936,4954],"valid"],[[4955,4956],"disallowed"],[[4957,4958],"valid"],[[4959,4959],"valid"],[[4960,4960],"valid",[],"NV8"],[[4961,4988],"valid",[],"NV8"],[[4989,4991],"disallowed"],[[4992,5007],"valid"],[[5008,5017],"valid",[],"NV8"],[[5018,5023],"disallowed"],[[5024,5108],"valid"],[[5109,5109],"valid"],[[5110,5111],"disallowed"],[[5112,5112],"mapped",[5104]],[[5113,5113],"mapped",[5105]],[[5114,5114],"mapped",[5106]],[[5115,5115],"mapped",[5107]],[[5116,5116],"mapped",[5108]],[[5117,5117],"mapped",[5109]],[[5118,5119],"disallowed"],[[5120,5120],"valid",[],"NV8"],[[5121,5740],"valid"],[[5741,5742],"valid",[],"NV8"],[[5743,5750],"valid"],[[5751,5759],"valid"],[[5760,5760],"disallowed"],[[5761,5786],"valid"],[[5787,5788],"valid",[],"NV8"],[[5789,5791],"disallowed"],[[5792,5866],"valid"],[[5867,5872],"valid",[],"NV8"],[[5873,5880],"valid"],[[5881,5887],"disallowed"],[[5888,5900],"valid"],[[5901,5901],"disallowed"],[[5902,5908],"valid"],[[5909,5919],"disallowed"],[[5920,5940],"valid"],[[5941,5942],"valid",[],"NV8"],[[5943,5951],"disallowed"],[[5952,5971],"valid"],[[5972,5983],"disallowed"],[[5984,5996],"valid"],[[5997,5997],"disallowed"],[[5998,6000],"valid"],[[6001,6001],"disallowed"],[[6002,6003],"valid"],[[6004,6015],"disallowed"],[[6016,6067],"valid"],[[6068,6069],"disallowed"],[[6070,6099],"valid"],[[6100,6102],"valid",[],"NV8"],[[6103,6103],"valid"],[[6104,6107],"valid",[],"NV8"],[[6108,6108],"valid"],[[6109,6109],"valid"],[[6110,6111],"disallowed"],[[6112,6121],"valid"],[[6122,6127],"disallowed"],[[6128,6137],"valid",[],"NV8"],[[6138,6143],"disallowed"],[[6144,6149],"valid",[],"NV8"],[[6150,6150],"disallowed"],[[6151,6154],"valid",[],"NV8"],[[6155,6157],"ignored"],[[6158,6158],"disallowed"],[[6159,6159],"disallowed"],[[6160,6169],"valid"],[[6170,6175],"disallowed"],[[6176,6263],"valid"],[[6264,6271],"disallowed"],[[6272,6313],"valid"],[[6314,6314],"valid"],[[6315,6319],"disallowed"],[[6320,6389],"valid"],[[6390,6399],"disallowed"],[[6400,6428],"valid"],[[6429,6430],"valid"],[[6431,6431],"disallowed"],[[6432,6443],"valid"],[[6444,6447],"disallowed"],[[6448,6459],"valid"],[[6460,6463],"disallowed"],[[6464,6464],"valid",[],"NV8"],[[6465,6467],"disallowed"],[[6468,6469],"valid",[],"NV8"],[[6470,6509],"valid"],[[6510,6511],"disallowed"],[[6512,6516],"valid"],[[6517,6527],"disallowed"],[[6528,6569],"valid"],[[6570,6571],"valid"],[[6572,6575],"disallowed"],[[6576,6601],"valid"],[[6602,6607],"disallowed"],[[6608,6617],"valid"],[[6618,6618],"valid",[],"XV8"],[[6619,6621],"disallowed"],[[6622,6623],"valid",[],"NV8"],[[6624,6655],"valid",[],"NV8"],[[6656,6683],"valid"],[[6684,6685],"disallowed"],[[6686,6687],"valid",[],"NV8"],[[6688,6750],"valid"],[[6751,6751],"disallowed"],[[6752,6780],"valid"],[[6781,6782],"disallowed"],[[6783,6793],"valid"],[[6794,6799],"disallowed"],[[6800,6809],"valid"],[[6810,6815],"disallowed"],[[6816,6822],"valid",[],"NV8"],[[6823,6823],"valid"],[[6824,6829],"valid",[],"NV8"],[[6830,6831],"disallowed"],[[6832,6845],"valid"],[[6846,6846],"valid",[],"NV8"],[[6847,6911],"disallowed"],[[6912,6987],"valid"],[[6988,6991],"disallowed"],[[6992,7001],"valid"],[[7002,7018],"valid",[],"NV8"],[[7019,7027],"valid"],[[7028,7036],"valid",[],"NV8"],[[7037,7039],"disallowed"],[[7040,7082],"valid"],[[7083,7085],"valid"],[[7086,7097],"valid"],[[7098,7103],"valid"],[[7104,7155],"valid"],[[7156,7163],"disallowed"],[[7164,7167],"valid",[],"NV8"],[[7168,7223],"valid"],[[7224,7226],"disallowed"],[[7227,7231],"valid",[],"NV8"],[[7232,7241],"valid"],[[7242,7244],"disallowed"],[[7245,7293],"valid"],[[7294,7295],"valid",[],"NV8"],[[7296,7359],"disallowed"],[[7360,7367],"valid",[],"NV8"],[[7368,7375],"disallowed"],[[7376,7378],"valid"],[[7379,7379],"valid",[],"NV8"],[[7380,7410],"valid"],[[7411,7414],"valid"],[[7415,7415],"disallowed"],[[7416,7417],"valid"],[[7418,7423],"disallowed"],[[7424,7467],"valid"],[[7468,7468],"mapped",[97]],[[7469,7469],"mapped",[230]],[[7470,7470],"mapped",[98]],[[7471,7471],"valid"],[[7472,7472],"mapped",[100]],[[7473,7473],"mapped",[101]],[[7474,7474],"mapped",[477]],[[7475,7475],"mapped",[103]],[[7476,7476],"mapped",[104]],[[7477,7477],"mapped",[105]],[[7478,7478],"mapped",[106]],[[7479,7479],"mapped",[107]],[[7480,7480],"mapped",[108]],[[7481,7481],"mapped",[109]],[[7482,7482],"mapped",[110]],[[7483,7483],"valid"],[[7484,7484],"mapped",[111]],[[7485,7485],"mapped",[547]],[[7486,7486],"mapped",[112]],[[7487,7487],"mapped",[114]],[[7488,7488],"mapped",[116]],[[7489,7489],"mapped",[117]],[[7490,7490],"mapped",[119]],[[7491,7491],"mapped",[97]],[[7492,7492],"mapped",[592]],[[7493,7493],"mapped",[593]],[[7494,7494],"mapped",[7426]],[[7495,7495],"mapped",[98]],[[7496,7496],"mapped",[100]],[[7497,7497],"mapped",[101]],[[7498,7498],"mapped",[601]],[[7499,7499],"mapped",[603]],[[7500,7500],"mapped",[604]],[[7501,7501],"mapped",[103]],[[7502,7502],"valid"],[[7503,7503],"mapped",[107]],[[7504,7504],"mapped",[109]],[[7505,7505],"mapped",[331]],[[7506,7506],"mapped",[111]],[[7507,7507],"mapped",[596]],[[7508,7508],"mapped",[7446]],[[7509,7509],"mapped",[7447]],[[7510,7510],"mapped",[112]],[[7511,7511],"mapped",[116]],[[7512,7512],"mapped",[117]],[[7513,7513],"mapped",[7453]],[[7514,7514],"mapped",[623]],[[7515,7515],"mapped",[118]],[[7516,7516],"mapped",[7461]],[[7517,7517],"mapped",[946]],[[7518,7518],"mapped",[947]],[[7519,7519],"mapped",[948]],[[7520,7520],"mapped",[966]],[[7521,7521],"mapped",[967]],[[7522,7522],"mapped",[105]],[[7523,7523],"mapped",[114]],[[7524,7524],"mapped",[117]],[[7525,7525],"mapped",[118]],[[7526,7526],"mapped",[946]],[[7527,7527],"mapped",[947]],[[7528,7528],"mapped",[961]],[[7529,7529],"mapped",[966]],[[7530,7530],"mapped",[967]],[[7531,7531],"valid"],[[7532,7543],"valid"],[[7544,7544],"mapped",[1085]],[[7545,7578],"valid"],[[7579,7579],"mapped",[594]],[[7580,7580],"mapped",[99]],[[7581,7581],"mapped",[597]],[[7582,7582],"mapped",[240]],[[7583,7583],"mapped",[604]],[[7584,7584],"mapped",[102]],[[7585,7585],"mapped",[607]],[[7586,7586],"mapped",[609]],[[7587,7587],"mapped",[613]],[[7588,7588],"mapped",[616]],[[7589,7589],"mapped",[617]],[[7590,7590],"mapped",[618]],[[7591,7591],"mapped",[7547]],[[7592,7592],"mapped",[669]],[[7593,7593],"mapped",[621]],[[7594,7594],"mapped",[7557]],[[7595,7595],"mapped",[671]],[[7596,7596],"mapped",[625]],[[7597,7597],"mapped",[624]],[[7598,7598],"mapped",[626]],[[7599,7599],"mapped",[627]],[[7600,7600],"mapped",[628]],[[7601,7601],"mapped",[629]],[[7602,7602],"mapped",[632]],[[7603,7603],"mapped",[642]],[[7604,7604],"mapped",[643]],[[7605,7605],"mapped",[427]],[[7606,7606],"mapped",[649]],[[7607,7607],"mapped",[650]],[[7608,7608],"mapped",[7452]],[[7609,7609],"mapped",[651]],[[7610,7610],"mapped",[652]],[[7611,7611],"mapped",[122]],[[7612,7612],"mapped",[656]],[[7613,7613],"mapped",[657]],[[7614,7614],"mapped",[658]],[[7615,7615],"mapped",[952]],[[7616,7619],"valid"],[[7620,7626],"valid"],[[7627,7654],"valid"],[[7655,7669],"valid"],[[7670,7675],"disallowed"],[[7676,7676],"valid"],[[7677,7677],"valid"],[[7678,7679],"valid"],[[7680,7680],"mapped",[7681]],[[7681,7681],"valid"],[[7682,7682],"mapped",[7683]],[[7683,7683],"valid"],[[7684,7684],"mapped",[7685]],[[7685,7685],"valid"],[[7686,7686],"mapped",[7687]],[[7687,7687],"valid"],[[7688,7688],"mapped",[7689]],[[7689,7689],"valid"],[[7690,7690],"mapped",[7691]],[[7691,7691],"valid"],[[7692,7692],"mapped",[7693]],[[7693,7693],"valid"],[[7694,7694],"mapped",[7695]],[[7695,7695],"valid"],[[7696,7696],"mapped",[7697]],[[7697,7697],"valid"],[[7698,7698],"mapped",[7699]],[[7699,7699],"valid"],[[7700,7700],"mapped",[7701]],[[7701,7701],"valid"],[[7702,7702],"mapped",[7703]],[[7703,7703],"valid"],[[7704,7704],"mapped",[7705]],[[7705,7705],"valid"],[[7706,7706],"mapped",[7707]],[[7707,7707],"valid"],[[7708,7708],"mapped",[7709]],[[7709,7709],"valid"],[[7710,7710],"mapped",[7711]],[[7711,7711],"valid"],[[7712,7712],"mapped",[7713]],[[7713,7713],"valid"],[[7714,7714],"mapped",[7715]],[[7715,7715],"valid"],[[7716,7716],"mapped",[7717]],[[7717,7717],"valid"],[[7718,7718],"mapped",[7719]],[[7719,7719],"valid"],[[7720,7720],"mapped",[7721]],[[7721,7721],"valid"],[[7722,7722],"mapped",[7723]],[[7723,7723],"valid"],[[7724,7724],"mapped",[7725]],[[7725,7725],"valid"],[[7726,7726],"mapped",[7727]],[[7727,7727],"valid"],[[7728,7728],"mapped",[7729]],[[7729,7729],"valid"],[[7730,7730],"mapped",[7731]],[[7731,7731],"valid"],[[7732,7732],"mapped",[7733]],[[7733,7733],"valid"],[[7734,7734],"mapped",[7735]],[[7735,7735],"valid"],[[7736,7736],"mapped",[7737]],[[7737,7737],"valid"],[[7738,7738],"mapped",[7739]],[[7739,7739],"valid"],[[7740,7740],"mapped",[7741]],[[7741,7741],"valid"],[[7742,7742],"mapped",[7743]],[[7743,7743],"valid"],[[7744,7744],"mapped",[7745]],[[7745,7745],"valid"],[[7746,7746],"mapped",[7747]],[[7747,7747],"valid"],[[7748,7748],"mapped",[7749]],[[7749,7749],"valid"],[[7750,7750],"mapped",[7751]],[[7751,7751],"valid"],[[7752,7752],"mapped",[7753]],[[7753,7753],"valid"],[[7754,7754],"mapped",[7755]],[[7755,7755],"valid"],[[7756,7756],"mapped",[7757]],[[7757,7757],"valid"],[[7758,7758],"mapped",[7759]],[[7759,7759],"valid"],[[7760,7760],"mapped",[7761]],[[7761,7761],"valid"],[[7762,7762],"mapped",[7763]],[[7763,7763],"valid"],[[7764,7764],"mapped",[7765]],[[7765,7765],"valid"],[[7766,7766],"mapped",[7767]],[[7767,7767],"valid"],[[7768,7768],"mapped",[7769]],[[7769,7769],"valid"],[[7770,7770],"mapped",[7771]],[[7771,7771],"valid"],[[7772,7772],"mapped",[7773]],[[7773,7773],"valid"],[[7774,7774],"mapped",[7775]],[[7775,7775],"valid"],[[7776,7776],"mapped",[7777]],[[7777,7777],"valid"],[[7778,7778],"mapped",[7779]],[[7779,7779],"valid"],[[7780,7780],"mapped",[7781]],[[7781,7781],"valid"],[[7782,7782],"mapped",[7783]],[[7783,7783],"valid"],[[7784,7784],"mapped",[7785]],[[7785,7785],"valid"],[[7786,7786],"mapped",[7787]],[[7787,7787],"valid"],[[7788,7788],"mapped",[7789]],[[7789,7789],"valid"],[[7790,7790],"mapped",[7791]],[[7791,7791],"valid"],[[7792,7792],"mapped",[7793]],[[7793,7793],"valid"],[[7794,7794],"mapped",[7795]],[[7795,7795],"valid"],[[7796,7796],"mapped",[7797]],[[7797,7797],"valid"],[[7798,7798],"mapped",[7799]],[[7799,7799],"valid"],[[7800,7800],"mapped",[7801]],[[7801,7801],"valid"],[[7802,7802],"mapped",[7803]],[[7803,7803],"valid"],[[7804,7804],"mapped",[7805]],[[7805,7805],"valid"],[[7806,7806],"mapped",[7807]],[[7807,7807],"valid"],[[7808,7808],"mapped",[7809]],[[7809,7809],"valid"],[[7810,7810],"mapped",[7811]],[[7811,7811],"valid"],[[7812,7812],"mapped",[7813]],[[7813,7813],"valid"],[[7814,7814],"mapped",[7815]],[[7815,7815],"valid"],[[7816,7816],"mapped",[7817]],[[7817,7817],"valid"],[[7818,7818],"mapped",[7819]],[[7819,7819],"valid"],[[7820,7820],"mapped",[7821]],[[7821,7821],"valid"],[[7822,7822],"mapped",[7823]],[[7823,7823],"valid"],[[7824,7824],"mapped",[7825]],[[7825,7825],"valid"],[[7826,7826],"mapped",[7827]],[[7827,7827],"valid"],[[7828,7828],"mapped",[7829]],[[7829,7833],"valid"],[[7834,7834],"mapped",[97,702]],[[7835,7835],"mapped",[7777]],[[7836,7837],"valid"],[[7838,7838],"mapped",[115,115]],[[7839,7839],"valid"],[[7840,7840],"mapped",[7841]],[[7841,7841],"valid"],[[7842,7842],"mapped",[7843]],[[7843,7843],"valid"],[[7844,7844],"mapped",[7845]],[[7845,7845],"valid"],[[7846,7846],"mapped",[7847]],[[7847,7847],"valid"],[[7848,7848],"mapped",[7849]],[[7849,7849],"valid"],[[7850,7850],"mapped",[7851]],[[7851,7851],"valid"],[[7852,7852],"mapped",[7853]],[[7853,7853],"valid"],[[7854,7854],"mapped",[7855]],[[7855,7855],"valid"],[[7856,7856],"mapped",[7857]],[[7857,7857],"valid"],[[7858,7858],"mapped",[7859]],[[7859,7859],"valid"],[[7860,7860],"mapped",[7861]],[[7861,7861],"valid"],[[7862,7862],"mapped",[7863]],[[7863,7863],"valid"],[[7864,7864],"mapped",[7865]],[[7865,7865],"valid"],[[7866,7866],"mapped",[7867]],[[7867,7867],"valid"],[[7868,7868],"mapped",[7869]],[[7869,7869],"valid"],[[7870,7870],"mapped",[7871]],[[7871,7871],"valid"],[[7872,7872],"mapped",[7873]],[[7873,7873],"valid"],[[7874,7874],"mapped",[7875]],[[7875,7875],"valid"],[[7876,7876],"mapped",[7877]],[[7877,7877],"valid"],[[7878,7878],"mapped",[7879]],[[7879,7879],"valid"],[[7880,7880],"mapped",[7881]],[[7881,7881],"valid"],[[7882,7882],"mapped",[7883]],[[7883,7883],"valid"],[[7884,7884],"mapped",[7885]],[[7885,7885],"valid"],[[7886,7886],"mapped",[7887]],[[7887,7887],"valid"],[[7888,7888],"mapped",[7889]],[[7889,7889],"valid"],[[7890,7890],"mapped",[7891]],[[7891,7891],"valid"],[[7892,7892],"mapped",[7893]],[[7893,7893],"valid"],[[7894,7894],"mapped",[7895]],[[7895,7895],"valid"],[[7896,7896],"mapped",[7897]],[[7897,7897],"valid"],[[7898,7898],"mapped",[7899]],[[7899,7899],"valid"],[[7900,7900],"mapped",[7901]],[[7901,7901],"valid"],[[7902,7902],"mapped",[7903]],[[7903,7903],"valid"],[[7904,7904],"mapped",[7905]],[[7905,7905],"valid"],[[7906,7906],"mapped",[7907]],[[7907,7907],"valid"],[[7908,7908],"mapped",[7909]],[[7909,7909],"valid"],[[7910,7910],"mapped",[7911]],[[7911,7911],"valid"],[[7912,7912],"mapped",[7913]],[[7913,7913],"valid"],[[7914,7914],"mapped",[7915]],[[7915,7915],"valid"],[[7916,7916],"mapped",[7917]],[[7917,7917],"valid"],[[7918,7918],"mapped",[7919]],[[7919,7919],"valid"],[[7920,7920],"mapped",[7921]],[[7921,7921],"valid"],[[7922,7922],"mapped",[7923]],[[7923,7923],"valid"],[[7924,7924],"mapped",[7925]],[[7925,7925],"valid"],[[7926,7926],"mapped",[7927]],[[7927,7927],"valid"],[[7928,7928],"mapped",[7929]],[[7929,7929],"valid"],[[7930,7930],"mapped",[7931]],[[7931,7931],"valid"],[[7932,7932],"mapped",[7933]],[[7933,7933],"valid"],[[7934,7934],"mapped",[7935]],[[7935,7935],"valid"],[[7936,7943],"valid"],[[7944,7944],"mapped",[7936]],[[7945,7945],"mapped",[7937]],[[7946,7946],"mapped",[7938]],[[7947,7947],"mapped",[7939]],[[7948,7948],"mapped",[7940]],[[7949,7949],"mapped",[7941]],[[7950,7950],"mapped",[7942]],[[7951,7951],"mapped",[7943]],[[7952,7957],"valid"],[[7958,7959],"disallowed"],[[7960,7960],"mapped",[7952]],[[7961,7961],"mapped",[7953]],[[7962,7962],"mapped",[7954]],[[7963,7963],"mapped",[7955]],[[7964,7964],"mapped",[7956]],[[7965,7965],"mapped",[7957]],[[7966,7967],"disallowed"],[[7968,7975],"valid"],[[7976,7976],"mapped",[7968]],[[7977,7977],"mapped",[7969]],[[7978,7978],"mapped",[7970]],[[7979,7979],"mapped",[7971]],[[7980,7980],"mapped",[7972]],[[7981,7981],"mapped",[7973]],[[7982,7982],"mapped",[7974]],[[7983,7983],"mapped",[7975]],[[7984,7991],"valid"],[[7992,7992],"mapped",[7984]],[[7993,7993],"mapped",[7985]],[[7994,7994],"mapped",[7986]],[[7995,7995],"mapped",[7987]],[[7996,7996],"mapped",[7988]],[[7997,7997],"mapped",[7989]],[[7998,7998],"mapped",[7990]],[[7999,7999],"mapped",[7991]],[[8000,8005],"valid"],[[8006,8007],"disallowed"],[[8008,8008],"mapped",[8000]],[[8009,8009],"mapped",[8001]],[[8010,8010],"mapped",[8002]],[[8011,8011],"mapped",[8003]],[[8012,8012],"mapped",[8004]],[[8013,8013],"mapped",[8005]],[[8014,8015],"disallowed"],[[8016,8023],"valid"],[[8024,8024],"disallowed"],[[8025,8025],"mapped",[8017]],[[8026,8026],"disallowed"],[[8027,8027],"mapped",[8019]],[[8028,8028],"disallowed"],[[8029,8029],"mapped",[8021]],[[8030,8030],"disallowed"],[[8031,8031],"mapped",[8023]],[[8032,8039],"valid"],[[8040,8040],"mapped",[8032]],[[8041,8041],"mapped",[8033]],[[8042,8042],"mapped",[8034]],[[8043,8043],"mapped",[8035]],[[8044,8044],"mapped",[8036]],[[8045,8045],"mapped",[8037]],[[8046,8046],"mapped",[8038]],[[8047,8047],"mapped",[8039]],[[8048,8048],"valid"],[[8049,8049],"mapped",[940]],[[8050,8050],"valid"],[[8051,8051],"mapped",[941]],[[8052,8052],"valid"],[[8053,8053],"mapped",[942]],[[8054,8054],"valid"],[[8055,8055],"mapped",[943]],[[8056,8056],"valid"],[[8057,8057],"mapped",[972]],[[8058,8058],"valid"],[[8059,8059],"mapped",[973]],[[8060,8060],"valid"],[[8061,8061],"mapped",[974]],[[8062,8063],"disallowed"],[[8064,8064],"mapped",[7936,953]],[[8065,8065],"mapped",[7937,953]],[[8066,8066],"mapped",[7938,953]],[[8067,8067],"mapped",[7939,953]],[[8068,8068],"mapped",[7940,953]],[[8069,8069],"mapped",[7941,953]],[[8070,8070],"mapped",[7942,953]],[[8071,8071],"mapped",[7943,953]],[[8072,8072],"mapped",[7936,953]],[[8073,8073],"mapped",[7937,953]],[[8074,8074],"mapped",[7938,953]],[[8075,8075],"mapped",[7939,953]],[[8076,8076],"mapped",[7940,953]],[[8077,8077],"mapped",[7941,953]],[[8078,8078],"mapped",[7942,953]],[[8079,8079],"mapped",[7943,953]],[[8080,8080],"mapped",[7968,953]],[[8081,8081],"mapped",[7969,953]],[[8082,8082],"mapped",[7970,953]],[[8083,8083],"mapped",[7971,953]],[[8084,8084],"mapped",[7972,953]],[[8085,8085],"mapped",[7973,953]],[[8086,8086],"mapped",[7974,953]],[[8087,8087],"mapped",[7975,953]],[[8088,8088],"mapped",[7968,953]],[[8089,8089],"mapped",[7969,953]],[[8090,8090],"mapped",[7970,953]],[[8091,8091],"mapped",[7971,953]],[[8092,8092],"mapped",[7972,953]],[[8093,8093],"mapped",[7973,953]],[[8094,8094],"mapped",[7974,953]],[[8095,8095],"mapped",[7975,953]],[[8096,8096],"mapped",[8032,953]],[[8097,8097],"mapped",[8033,953]],[[8098,8098],"mapped",[8034,953]],[[8099,8099],"mapped",[8035,953]],[[8100,8100],"mapped",[8036,953]],[[8101,8101],"mapped",[8037,953]],[[8102,8102],"mapped",[8038,953]],[[8103,8103],"mapped",[8039,953]],[[8104,8104],"mapped",[8032,953]],[[8105,8105],"mapped",[8033,953]],[[8106,8106],"mapped",[8034,953]],[[8107,8107],"mapped",[8035,953]],[[8108,8108],"mapped",[8036,953]],[[8109,8109],"mapped",[8037,953]],[[8110,8110],"mapped",[8038,953]],[[8111,8111],"mapped",[8039,953]],[[8112,8113],"valid"],[[8114,8114],"mapped",[8048,953]],[[8115,8115],"mapped",[945,953]],[[8116,8116],"mapped",[940,953]],[[8117,8117],"disallowed"],[[8118,8118],"valid"],[[8119,8119],"mapped",[8118,953]],[[8120,8120],"mapped",[8112]],[[8121,8121],"mapped",[8113]],[[8122,8122],"mapped",[8048]],[[8123,8123],"mapped",[940]],[[8124,8124],"mapped",[945,953]],[[8125,8125],"disallowed_STD3_mapped",[32,787]],[[8126,8126],"mapped",[953]],[[8127,8127],"disallowed_STD3_mapped",[32,787]],[[8128,8128],"disallowed_STD3_mapped",[32,834]],[[8129,8129],"disallowed_STD3_mapped",[32,776,834]],[[8130,8130],"mapped",[8052,953]],[[8131,8131],"mapped",[951,953]],[[8132,8132],"mapped",[942,953]],[[8133,8133],"disallowed"],[[8134,8134],"valid"],[[8135,8135],"mapped",[8134,953]],[[8136,8136],"mapped",[8050]],[[8137,8137],"mapped",[941]],[[8138,8138],"mapped",[8052]],[[8139,8139],"mapped",[942]],[[8140,8140],"mapped",[951,953]],[[8141,8141],"disallowed_STD3_mapped",[32,787,768]],[[8142,8142],"disallowed_STD3_mapped",[32,787,769]],[[8143,8143],"disallowed_STD3_mapped",[32,787,834]],[[8144,8146],"valid"],[[8147,8147],"mapped",[912]],[[8148,8149],"disallowed"],[[8150,8151],"valid"],[[8152,8152],"mapped",[8144]],[[8153,8153],"mapped",[8145]],[[8154,8154],"mapped",[8054]],[[8155,8155],"mapped",[943]],[[8156,8156],"disallowed"],[[8157,8157],"disallowed_STD3_mapped",[32,788,768]],[[8158,8158],"disallowed_STD3_mapped",[32,788,769]],[[8159,8159],"disallowed_STD3_mapped",[32,788,834]],[[8160,8162],"valid"],[[8163,8163],"mapped",[944]],[[8164,8167],"valid"],[[8168,8168],"mapped",[8160]],[[8169,8169],"mapped",[8161]],[[8170,8170],"mapped",[8058]],[[8171,8171],"mapped",[973]],[[8172,8172],"mapped",[8165]],[[8173,8173],"disallowed_STD3_mapped",[32,776,768]],[[8174,8174],"disallowed_STD3_mapped",[32,776,769]],[[8175,8175],"disallowed_STD3_mapped",[96]],[[8176,8177],"disallowed"],[[8178,8178],"mapped",[8060,953]],[[8179,8179],"mapped",[969,953]],[[8180,8180],"mapped",[974,953]],[[8181,8181],"disallowed"],[[8182,8182],"valid"],[[8183,8183],"mapped",[8182,953]],[[8184,8184],"mapped",[8056]],[[8185,8185],"mapped",[972]],[[8186,8186],"mapped",[8060]],[[8187,8187],"mapped",[974]],[[8188,8188],"mapped",[969,953]],[[8189,8189],"disallowed_STD3_mapped",[32,769]],[[8190,8190],"disallowed_STD3_mapped",[32,788]],[[8191,8191],"disallowed"],[[8192,8202],"disallowed_STD3_mapped",[32]],[[8203,8203],"ignored"],[[8204,8205],"deviation",[]],[[8206,8207],"disallowed"],[[8208,8208],"valid",[],"NV8"],[[8209,8209],"mapped",[8208]],[[8210,8214],"valid",[],"NV8"],[[8215,8215],"disallowed_STD3_mapped",[32,819]],[[8216,8227],"valid",[],"NV8"],[[8228,8230],"disallowed"],[[8231,8231],"valid",[],"NV8"],[[8232,8238],"disallowed"],[[8239,8239],"disallowed_STD3_mapped",[32]],[[8240,8242],"valid",[],"NV8"],[[8243,8243],"mapped",[8242,8242]],[[8244,8244],"mapped",[8242,8242,8242]],[[8245,8245],"valid",[],"NV8"],[[8246,8246],"mapped",[8245,8245]],[[8247,8247],"mapped",[8245,8245,8245]],[[8248,8251],"valid",[],"NV8"],[[8252,8252],"disallowed_STD3_mapped",[33,33]],[[8253,8253],"valid",[],"NV8"],[[8254,8254],"disallowed_STD3_mapped",[32,773]],[[8255,8262],"valid",[],"NV8"],[[8263,8263],"disallowed_STD3_mapped",[63,63]],[[8264,8264],"disallowed_STD3_mapped",[63,33]],[[8265,8265],"disallowed_STD3_mapped",[33,63]],[[8266,8269],"valid",[],"NV8"],[[8270,8274],"valid",[],"NV8"],[[8275,8276],"valid",[],"NV8"],[[8277,8278],"valid",[],"NV8"],[[8279,8279],"mapped",[8242,8242,8242,8242]],[[8280,8286],"valid",[],"NV8"],[[8287,8287],"disallowed_STD3_mapped",[32]],[[8288,8288],"ignored"],[[8289,8291],"disallowed"],[[8292,8292],"ignored"],[[8293,8293],"disallowed"],[[8294,8297],"disallowed"],[[8298,8303],"disallowed"],[[8304,8304],"mapped",[48]],[[8305,8305],"mapped",[105]],[[8306,8307],"disallowed"],[[8308,8308],"mapped",[52]],[[8309,8309],"mapped",[53]],[[8310,8310],"mapped",[54]],[[8311,8311],"mapped",[55]],[[8312,8312],"mapped",[56]],[[8313,8313],"mapped",[57]],[[8314,8314],"disallowed_STD3_mapped",[43]],[[8315,8315],"mapped",[8722]],[[8316,8316],"disallowed_STD3_mapped",[61]],[[8317,8317],"disallowed_STD3_mapped",[40]],[[8318,8318],"disallowed_STD3_mapped",[41]],[[8319,8319],"mapped",[110]],[[8320,8320],"mapped",[48]],[[8321,8321],"mapped",[49]],[[8322,8322],"mapped",[50]],[[8323,8323],"mapped",[51]],[[8324,8324],"mapped",[52]],[[8325,8325],"mapped",[53]],[[8326,8326],"mapped",[54]],[[8327,8327],"mapped",[55]],[[8328,8328],"mapped",[56]],[[8329,8329],"mapped",[57]],[[8330,8330],"disallowed_STD3_mapped",[43]],[[8331,8331],"mapped",[8722]],[[8332,8332],"disallowed_STD3_mapped",[61]],[[8333,8333],"disallowed_STD3_mapped",[40]],[[8334,8334],"disallowed_STD3_mapped",[41]],[[8335,8335],"disallowed"],[[8336,8336],"mapped",[97]],[[8337,8337],"mapped",[101]],[[8338,8338],"mapped",[111]],[[8339,8339],"mapped",[120]],[[8340,8340],"mapped",[601]],[[8341,8341],"mapped",[104]],[[8342,8342],"mapped",[107]],[[8343,8343],"mapped",[108]],[[8344,8344],"mapped",[109]],[[8345,8345],"mapped",[110]],[[8346,8346],"mapped",[112]],[[8347,8347],"mapped",[115]],[[8348,8348],"mapped",[116]],[[8349,8351],"disallowed"],[[8352,8359],"valid",[],"NV8"],[[8360,8360],"mapped",[114,115]],[[8361,8362],"valid",[],"NV8"],[[8363,8363],"valid",[],"NV8"],[[8364,8364],"valid",[],"NV8"],[[8365,8367],"valid",[],"NV8"],[[8368,8369],"valid",[],"NV8"],[[8370,8373],"valid",[],"NV8"],[[8374,8376],"valid",[],"NV8"],[[8377,8377],"valid",[],"NV8"],[[8378,8378],"valid",[],"NV8"],[[8379,8381],"valid",[],"NV8"],[[8382,8382],"valid",[],"NV8"],[[8383,8399],"disallowed"],[[8400,8417],"valid",[],"NV8"],[[8418,8419],"valid",[],"NV8"],[[8420,8426],"valid",[],"NV8"],[[8427,8427],"valid",[],"NV8"],[[8428,8431],"valid",[],"NV8"],[[8432,8432],"valid",[],"NV8"],[[8433,8447],"disallowed"],[[8448,8448],"disallowed_STD3_mapped",[97,47,99]],[[8449,8449],"disallowed_STD3_mapped",[97,47,115]],[[8450,8450],"mapped",[99]],[[8451,8451],"mapped",[176,99]],[[8452,8452],"valid",[],"NV8"],[[8453,8453],"disallowed_STD3_mapped",[99,47,111]],[[8454,8454],"disallowed_STD3_mapped",[99,47,117]],[[8455,8455],"mapped",[603]],[[8456,8456],"valid",[],"NV8"],[[8457,8457],"mapped",[176,102]],[[8458,8458],"mapped",[103]],[[8459,8462],"mapped",[104]],[[8463,8463],"mapped",[295]],[[8464,8465],"mapped",[105]],[[8466,8467],"mapped",[108]],[[8468,8468],"valid",[],"NV8"],[[8469,8469],"mapped",[110]],[[8470,8470],"mapped",[110,111]],[[8471,8472],"valid",[],"NV8"],[[8473,8473],"mapped",[112]],[[8474,8474],"mapped",[113]],[[8475,8477],"mapped",[114]],[[8478,8479],"valid",[],"NV8"],[[8480,8480],"mapped",[115,109]],[[8481,8481],"mapped",[116,101,108]],[[8482,8482],"mapped",[116,109]],[[8483,8483],"valid",[],"NV8"],[[8484,8484],"mapped",[122]],[[8485,8485],"valid",[],"NV8"],[[8486,8486],"mapped",[969]],[[8487,8487],"valid",[],"NV8"],[[8488,8488],"mapped",[122]],[[8489,8489],"valid",[],"NV8"],[[8490,8490],"mapped",[107]],[[8491,8491],"mapped",[229]],[[8492,8492],"mapped",[98]],[[8493,8493],"mapped",[99]],[[8494,8494],"valid",[],"NV8"],[[8495,8496],"mapped",[101]],[[8497,8497],"mapped",[102]],[[8498,8498],"disallowed"],[[8499,8499],"mapped",[109]],[[8500,8500],"mapped",[111]],[[8501,8501],"mapped",[1488]],[[8502,8502],"mapped",[1489]],[[8503,8503],"mapped",[1490]],[[8504,8504],"mapped",[1491]],[[8505,8505],"mapped",[105]],[[8506,8506],"valid",[],"NV8"],[[8507,8507],"mapped",[102,97,120]],[[8508,8508],"mapped",[960]],[[8509,8510],"mapped",[947]],[[8511,8511],"mapped",[960]],[[8512,8512],"mapped",[8721]],[[8513,8516],"valid",[],"NV8"],[[8517,8518],"mapped",[100]],[[8519,8519],"mapped",[101]],[[8520,8520],"mapped",[105]],[[8521,8521],"mapped",[106]],[[8522,8523],"valid",[],"NV8"],[[8524,8524],"valid",[],"NV8"],[[8525,8525],"valid",[],"NV8"],[[8526,8526],"valid"],[[8527,8527],"valid",[],"NV8"],[[8528,8528],"mapped",[49,8260,55]],[[8529,8529],"mapped",[49,8260,57]],[[8530,8530],"mapped",[49,8260,49,48]],[[8531,8531],"mapped",[49,8260,51]],[[8532,8532],"mapped",[50,8260,51]],[[8533,8533],"mapped",[49,8260,53]],[[8534,8534],"mapped",[50,8260,53]],[[8535,8535],"mapped",[51,8260,53]],[[8536,8536],"mapped",[52,8260,53]],[[8537,8537],"mapped",[49,8260,54]],[[8538,8538],"mapped",[53,8260,54]],[[8539,8539],"mapped",[49,8260,56]],[[8540,8540],"mapped",[51,8260,56]],[[8541,8541],"mapped",[53,8260,56]],[[8542,8542],"mapped",[55,8260,56]],[[8543,8543],"mapped",[49,8260]],[[8544,8544],"mapped",[105]],[[8545,8545],"mapped",[105,105]],[[8546,8546],"mapped",[105,105,105]],[[8547,8547],"mapped",[105,118]],[[8548,8548],"mapped",[118]],[[8549,8549],"mapped",[118,105]],[[8550,8550],"mapped",[118,105,105]],[[8551,8551],"mapped",[118,105,105,105]],[[8552,8552],"mapped",[105,120]],[[8553,8553],"mapped",[120]],[[8554,8554],"mapped",[120,105]],[[8555,8555],"mapped",[120,105,105]],[[8556,8556],"mapped",[108]],[[8557,8557],"mapped",[99]],[[8558,8558],"mapped",[100]],[[8559,8559],"mapped",[109]],[[8560,8560],"mapped",[105]],[[8561,8561],"mapped",[105,105]],[[8562,8562],"mapped",[105,105,105]],[[8563,8563],"mapped",[105,118]],[[8564,8564],"mapped",[118]],[[8565,8565],"mapped",[118,105]],[[8566,8566],"mapped",[118,105,105]],[[8567,8567],"mapped",[118,105,105,105]],[[8568,8568],"mapped",[105,120]],[[8569,8569],"mapped",[120]],[[8570,8570],"mapped",[120,105]],[[8571,8571],"mapped",[120,105,105]],[[8572,8572],"mapped",[108]],[[8573,8573],"mapped",[99]],[[8574,8574],"mapped",[100]],[[8575,8575],"mapped",[109]],[[8576,8578],"valid",[],"NV8"],[[8579,8579],"disallowed"],[[8580,8580],"valid"],[[8581,8584],"valid",[],"NV8"],[[8585,8585],"mapped",[48,8260,51]],[[8586,8587],"valid",[],"NV8"],[[8588,8591],"disallowed"],[[8592,8682],"valid",[],"NV8"],[[8683,8691],"valid",[],"NV8"],[[8692,8703],"valid",[],"NV8"],[[8704,8747],"valid",[],"NV8"],[[8748,8748],"mapped",[8747,8747]],[[8749,8749],"mapped",[8747,8747,8747]],[[8750,8750],"valid",[],"NV8"],[[8751,8751],"mapped",[8750,8750]],[[8752,8752],"mapped",[8750,8750,8750]],[[8753,8799],"valid",[],"NV8"],[[8800,8800],"disallowed_STD3_valid"],[[8801,8813],"valid",[],"NV8"],[[8814,8815],"disallowed_STD3_valid"],[[8816,8945],"valid",[],"NV8"],[[8946,8959],"valid",[],"NV8"],[[8960,8960],"valid",[],"NV8"],[[8961,8961],"valid",[],"NV8"],[[8962,9000],"valid",[],"NV8"],[[9001,9001],"mapped",[12296]],[[9002,9002],"mapped",[12297]],[[9003,9082],"valid",[],"NV8"],[[9083,9083],"valid",[],"NV8"],[[9084,9084],"valid",[],"NV8"],[[9085,9114],"valid",[],"NV8"],[[9115,9166],"valid",[],"NV8"],[[9167,9168],"valid",[],"NV8"],[[9169,9179],"valid",[],"NV8"],[[9180,9191],"valid",[],"NV8"],[[9192,9192],"valid",[],"NV8"],[[9193,9203],"valid",[],"NV8"],[[9204,9210],"valid",[],"NV8"],[[9211,9215],"disallowed"],[[9216,9252],"valid",[],"NV8"],[[9253,9254],"valid",[],"NV8"],[[9255,9279],"disallowed"],[[9280,9290],"valid",[],"NV8"],[[9291,9311],"disallowed"],[[9312,9312],"mapped",[49]],[[9313,9313],"mapped",[50]],[[9314,9314],"mapped",[51]],[[9315,9315],"mapped",[52]],[[9316,9316],"mapped",[53]],[[9317,9317],"mapped",[54]],[[9318,9318],"mapped",[55]],[[9319,9319],"mapped",[56]],[[9320,9320],"mapped",[57]],[[9321,9321],"mapped",[49,48]],[[9322,9322],"mapped",[49,49]],[[9323,9323],"mapped",[49,50]],[[9324,9324],"mapped",[49,51]],[[9325,9325],"mapped",[49,52]],[[9326,9326],"mapped",[49,53]],[[9327,9327],"mapped",[49,54]],[[9328,9328],"mapped",[49,55]],[[9329,9329],"mapped",[49,56]],[[9330,9330],"mapped",[49,57]],[[9331,9331],"mapped",[50,48]],[[9332,9332],"disallowed_STD3_mapped",[40,49,41]],[[9333,9333],"disallowed_STD3_mapped",[40,50,41]],[[9334,9334],"disallowed_STD3_mapped",[40,51,41]],[[9335,9335],"disallowed_STD3_mapped",[40,52,41]],[[9336,9336],"disallowed_STD3_mapped",[40,53,41]],[[9337,9337],"disallowed_STD3_mapped",[40,54,41]],[[9338,9338],"disallowed_STD3_mapped",[40,55,41]],[[9339,9339],"disallowed_STD3_mapped",[40,56,41]],[[9340,9340],"disallowed_STD3_mapped",[40,57,41]],[[9341,9341],"disallowed_STD3_mapped",[40,49,48,41]],[[9342,9342],"disallowed_STD3_mapped",[40,49,49,41]],[[9343,9343],"disallowed_STD3_mapped",[40,49,50,41]],[[9344,9344],"disallowed_STD3_mapped",[40,49,51,41]],[[9345,9345],"disallowed_STD3_mapped",[40,49,52,41]],[[9346,9346],"disallowed_STD3_mapped",[40,49,53,41]],[[9347,9347],"disallowed_STD3_mapped",[40,49,54,41]],[[9348,9348],"disallowed_STD3_mapped",[40,49,55,41]],[[9349,9349],"disallowed_STD3_mapped",[40,49,56,41]],[[9350,9350],"disallowed_STD3_mapped",[40,49,57,41]],[[9351,9351],"disallowed_STD3_mapped",[40,50,48,41]],[[9352,9371],"disallowed"],[[9372,9372],"disallowed_STD3_mapped",[40,97,41]],[[9373,9373],"disallowed_STD3_mapped",[40,98,41]],[[9374,9374],"disallowed_STD3_mapped",[40,99,41]],[[9375,9375],"disallowed_STD3_mapped",[40,100,41]],[[9376,9376],"disallowed_STD3_mapped",[40,101,41]],[[9377,9377],"disallowed_STD3_mapped",[40,102,41]],[[9378,9378],"disallowed_STD3_mapped",[40,103,41]],[[9379,9379],"disallowed_STD3_mapped",[40,104,41]],[[9380,9380],"disallowed_STD3_mapped",[40,105,41]],[[9381,9381],"disallowed_STD3_mapped",[40,106,41]],[[9382,9382],"disallowed_STD3_mapped",[40,107,41]],[[9383,9383],"disallowed_STD3_mapped",[40,108,41]],[[9384,9384],"disallowed_STD3_mapped",[40,109,41]],[[9385,9385],"disallowed_STD3_mapped",[40,110,41]],[[9386,9386],"disallowed_STD3_mapped",[40,111,41]],[[9387,9387],"disallowed_STD3_mapped",[40,112,41]],[[9388,9388],"disallowed_STD3_mapped",[40,113,41]],[[9389,9389],"disallowed_STD3_mapped",[40,114,41]],[[9390,9390],"disallowed_STD3_mapped",[40,115,41]],[[9391,9391],"disallowed_STD3_mapped",[40,116,41]],[[9392,9392],"disallowed_STD3_mapped",[40,117,41]],[[9393,9393],"disallowed_STD3_mapped",[40,118,41]],[[9394,9394],"disallowed_STD3_mapped",[40,119,41]],[[9395,9395],"disallowed_STD3_mapped",[40,120,41]],[[9396,9396],"disallowed_STD3_mapped",[40,121,41]],[[9397,9397],"disallowed_STD3_mapped",[40,122,41]],[[9398,9398],"mapped",[97]],[[9399,9399],"mapped",[98]],[[9400,9400],"mapped",[99]],[[9401,9401],"mapped",[100]],[[9402,9402],"mapped",[101]],[[9403,9403],"mapped",[102]],[[9404,9404],"mapped",[103]],[[9405,9405],"mapped",[104]],[[9406,9406],"mapped",[105]],[[9407,9407],"mapped",[106]],[[9408,9408],"mapped",[107]],[[9409,9409],"mapped",[108]],[[9410,9410],"mapped",[109]],[[9411,9411],"mapped",[110]],[[9412,9412],"mapped",[111]],[[9413,9413],"mapped",[112]],[[9414,9414],"mapped",[113]],[[9415,9415],"mapped",[114]],[[9416,9416],"mapped",[115]],[[9417,9417],"mapped",[116]],[[9418,9418],"mapped",[117]],[[9419,9419],"mapped",[118]],[[9420,9420],"mapped",[119]],[[9421,9421],"mapped",[120]],[[9422,9422],"mapped",[121]],[[9423,9423],"mapped",[122]],[[9424,9424],"mapped",[97]],[[9425,9425],"mapped",[98]],[[9426,9426],"mapped",[99]],[[9427,9427],"mapped",[100]],[[9428,9428],"mapped",[101]],[[9429,9429],"mapped",[102]],[[9430,9430],"mapped",[103]],[[9431,9431],"mapped",[104]],[[9432,9432],"mapped",[105]],[[9433,9433],"mapped",[106]],[[9434,9434],"mapped",[107]],[[9435,9435],"mapped",[108]],[[9436,9436],"mapped",[109]],[[9437,9437],"mapped",[110]],[[9438,9438],"mapped",[111]],[[9439,9439],"mapped",[112]],[[9440,9440],"mapped",[113]],[[9441,9441],"mapped",[114]],[[9442,9442],"mapped",[115]],[[9443,9443],"mapped",[116]],[[9444,9444],"mapped",[117]],[[9445,9445],"mapped",[118]],[[9446,9446],"mapped",[119]],[[9447,9447],"mapped",[120]],[[9448,9448],"mapped",[121]],[[9449,9449],"mapped",[122]],[[9450,9450],"mapped",[48]],[[9451,9470],"valid",[],"NV8"],[[9471,9471],"valid",[],"NV8"],[[9472,9621],"valid",[],"NV8"],[[9622,9631],"valid",[],"NV8"],[[9632,9711],"valid",[],"NV8"],[[9712,9719],"valid",[],"NV8"],[[9720,9727],"valid",[],"NV8"],[[9728,9747],"valid",[],"NV8"],[[9748,9749],"valid",[],"NV8"],[[9750,9751],"valid",[],"NV8"],[[9752,9752],"valid",[],"NV8"],[[9753,9753],"valid",[],"NV8"],[[9754,9839],"valid",[],"NV8"],[[9840,9841],"valid",[],"NV8"],[[9842,9853],"valid",[],"NV8"],[[9854,9855],"valid",[],"NV8"],[[9856,9865],"valid",[],"NV8"],[[9866,9873],"valid",[],"NV8"],[[9874,9884],"valid",[],"NV8"],[[9885,9885],"valid",[],"NV8"],[[9886,9887],"valid",[],"NV8"],[[9888,9889],"valid",[],"NV8"],[[9890,9905],"valid",[],"NV8"],[[9906,9906],"valid",[],"NV8"],[[9907,9916],"valid",[],"NV8"],[[9917,9919],"valid",[],"NV8"],[[9920,9923],"valid",[],"NV8"],[[9924,9933],"valid",[],"NV8"],[[9934,9934],"valid",[],"NV8"],[[9935,9953],"valid",[],"NV8"],[[9954,9954],"valid",[],"NV8"],[[9955,9955],"valid",[],"NV8"],[[9956,9959],"valid",[],"NV8"],[[9960,9983],"valid",[],"NV8"],[[9984,9984],"valid",[],"NV8"],[[9985,9988],"valid",[],"NV8"],[[9989,9989],"valid",[],"NV8"],[[9990,9993],"valid",[],"NV8"],[[9994,9995],"valid",[],"NV8"],[[9996,10023],"valid",[],"NV8"],[[10024,10024],"valid",[],"NV8"],[[10025,10059],"valid",[],"NV8"],[[10060,10060],"valid",[],"NV8"],[[10061,10061],"valid",[],"NV8"],[[10062,10062],"valid",[],"NV8"],[[10063,10066],"valid",[],"NV8"],[[10067,10069],"valid",[],"NV8"],[[10070,10070],"valid",[],"NV8"],[[10071,10071],"valid",[],"NV8"],[[10072,10078],"valid",[],"NV8"],[[10079,10080],"valid",[],"NV8"],[[10081,10087],"valid",[],"NV8"],[[10088,10101],"valid",[],"NV8"],[[10102,10132],"valid",[],"NV8"],[[10133,10135],"valid",[],"NV8"],[[10136,10159],"valid",[],"NV8"],[[10160,10160],"valid",[],"NV8"],[[10161,10174],"valid",[],"NV8"],[[10175,10175],"valid",[],"NV8"],[[10176,10182],"valid",[],"NV8"],[[10183,10186],"valid",[],"NV8"],[[10187,10187],"valid",[],"NV8"],[[10188,10188],"valid",[],"NV8"],[[10189,10189],"valid",[],"NV8"],[[10190,10191],"valid",[],"NV8"],[[10192,10219],"valid",[],"NV8"],[[10220,10223],"valid",[],"NV8"],[[10224,10239],"valid",[],"NV8"],[[10240,10495],"valid",[],"NV8"],[[10496,10763],"valid",[],"NV8"],[[10764,10764],"mapped",[8747,8747,8747,8747]],[[10765,10867],"valid",[],"NV8"],[[10868,10868],"disallowed_STD3_mapped",[58,58,61]],[[10869,10869],"disallowed_STD3_mapped",[61,61]],[[10870,10870],"disallowed_STD3_mapped",[61,61,61]],[[10871,10971],"valid",[],"NV8"],[[10972,10972],"mapped",[10973,824]],[[10973,11007],"valid",[],"NV8"],[[11008,11021],"valid",[],"NV8"],[[11022,11027],"valid",[],"NV8"],[[11028,11034],"valid",[],"NV8"],[[11035,11039],"valid",[],"NV8"],[[11040,11043],"valid",[],"NV8"],[[11044,11084],"valid",[],"NV8"],[[11085,11087],"valid",[],"NV8"],[[11088,11092],"valid",[],"NV8"],[[11093,11097],"valid",[],"NV8"],[[11098,11123],"valid",[],"NV8"],[[11124,11125],"disallowed"],[[11126,11157],"valid",[],"NV8"],[[11158,11159],"disallowed"],[[11160,11193],"valid",[],"NV8"],[[11194,11196],"disallowed"],[[11197,11208],"valid",[],"NV8"],[[11209,11209],"disallowed"],[[11210,11217],"valid",[],"NV8"],[[11218,11243],"disallowed"],[[11244,11247],"valid",[],"NV8"],[[11248,11263],"disallowed"],[[11264,11264],"mapped",[11312]],[[11265,11265],"mapped",[11313]],[[11266,11266],"mapped",[11314]],[[11267,11267],"mapped",[11315]],[[11268,11268],"mapped",[11316]],[[11269,11269],"mapped",[11317]],[[11270,11270],"mapped",[11318]],[[11271,11271],"mapped",[11319]],[[11272,11272],"mapped",[11320]],[[11273,11273],"mapped",[11321]],[[11274,11274],"mapped",[11322]],[[11275,11275],"mapped",[11323]],[[11276,11276],"mapped",[11324]],[[11277,11277],"mapped",[11325]],[[11278,11278],"mapped",[11326]],[[11279,11279],"mapped",[11327]],[[11280,11280],"mapped",[11328]],[[11281,11281],"mapped",[11329]],[[11282,11282],"mapped",[11330]],[[11283,11283],"mapped",[11331]],[[11284,11284],"mapped",[11332]],[[11285,11285],"mapped",[11333]],[[11286,11286],"mapped",[11334]],[[11287,11287],"mapped",[11335]],[[11288,11288],"mapped",[11336]],[[11289,11289],"mapped",[11337]],[[11290,11290],"mapped",[11338]],[[11291,11291],"mapped",[11339]],[[11292,11292],"mapped",[11340]],[[11293,11293],"mapped",[11341]],[[11294,11294],"mapped",[11342]],[[11295,11295],"mapped",[11343]],[[11296,11296],"mapped",[11344]],[[11297,11297],"mapped",[11345]],[[11298,11298],"mapped",[11346]],[[11299,11299],"mapped",[11347]],[[11300,11300],"mapped",[11348]],[[11301,11301],"mapped",[11349]],[[11302,11302],"mapped",[11350]],[[11303,11303],"mapped",[11351]],[[11304,11304],"mapped",[11352]],[[11305,11305],"mapped",[11353]],[[11306,11306],"mapped",[11354]],[[11307,11307],"mapped",[11355]],[[11308,11308],"mapped",[11356]],[[11309,11309],"mapped",[11357]],[[11310,11310],"mapped",[11358]],[[11311,11311],"disallowed"],[[11312,11358],"valid"],[[11359,11359],"disallowed"],[[11360,11360],"mapped",[11361]],[[11361,11361],"valid"],[[11362,11362],"mapped",[619]],[[11363,11363],"mapped",[7549]],[[11364,11364],"mapped",[637]],[[11365,11366],"valid"],[[11367,11367],"mapped",[11368]],[[11368,11368],"valid"],[[11369,11369],"mapped",[11370]],[[11370,11370],"valid"],[[11371,11371],"mapped",[11372]],[[11372,11372],"valid"],[[11373,11373],"mapped",[593]],[[11374,11374],"mapped",[625]],[[11375,11375],"mapped",[592]],[[11376,11376],"mapped",[594]],[[11377,11377],"valid"],[[11378,11378],"mapped",[11379]],[[11379,11379],"valid"],[[11380,11380],"valid"],[[11381,11381],"mapped",[11382]],[[11382,11383],"valid"],[[11384,11387],"valid"],[[11388,11388],"mapped",[106]],[[11389,11389],"mapped",[118]],[[11390,11390],"mapped",[575]],[[11391,11391],"mapped",[576]],[[11392,11392],"mapped",[11393]],[[11393,11393],"valid"],[[11394,11394],"mapped",[11395]],[[11395,11395],"valid"],[[11396,11396],"mapped",[11397]],[[11397,11397],"valid"],[[11398,11398],"mapped",[11399]],[[11399,11399],"valid"],[[11400,11400],"mapped",[11401]],[[11401,11401],"valid"],[[11402,11402],"mapped",[11403]],[[11403,11403],"valid"],[[11404,11404],"mapped",[11405]],[[11405,11405],"valid"],[[11406,11406],"mapped",[11407]],[[11407,11407],"valid"],[[11408,11408],"mapped",[11409]],[[11409,11409],"valid"],[[11410,11410],"mapped",[11411]],[[11411,11411],"valid"],[[11412,11412],"mapped",[11413]],[[11413,11413],"valid"],[[11414,11414],"mapped",[11415]],[[11415,11415],"valid"],[[11416,11416],"mapped",[11417]],[[11417,11417],"valid"],[[11418,11418],"mapped",[11419]],[[11419,11419],"valid"],[[11420,11420],"mapped",[11421]],[[11421,11421],"valid"],[[11422,11422],"mapped",[11423]],[[11423,11423],"valid"],[[11424,11424],"mapped",[11425]],[[11425,11425],"valid"],[[11426,11426],"mapped",[11427]],[[11427,11427],"valid"],[[11428,11428],"mapped",[11429]],[[11429,11429],"valid"],[[11430,11430],"mapped",[11431]],[[11431,11431],"valid"],[[11432,11432],"mapped",[11433]],[[11433,11433],"valid"],[[11434,11434],"mapped",[11435]],[[11435,11435],"valid"],[[11436,11436],"mapped",[11437]],[[11437,11437],"valid"],[[11438,11438],"mapped",[11439]],[[11439,11439],"valid"],[[11440,11440],"mapped",[11441]],[[11441,11441],"valid"],[[11442,11442],"mapped",[11443]],[[11443,11443],"valid"],[[11444,11444],"mapped",[11445]],[[11445,11445],"valid"],[[11446,11446],"mapped",[11447]],[[11447,11447],"valid"],[[11448,11448],"mapped",[11449]],[[11449,11449],"valid"],[[11450,11450],"mapped",[11451]],[[11451,11451],"valid"],[[11452,11452],"mapped",[11453]],[[11453,11453],"valid"],[[11454,11454],"mapped",[11455]],[[11455,11455],"valid"],[[11456,11456],"mapped",[11457]],[[11457,11457],"valid"],[[11458,11458],"mapped",[11459]],[[11459,11459],"valid"],[[11460,11460],"mapped",[11461]],[[11461,11461],"valid"],[[11462,11462],"mapped",[11463]],[[11463,11463],"valid"],[[11464,11464],"mapped",[11465]],[[11465,11465],"valid"],[[11466,11466],"mapped",[11467]],[[11467,11467],"valid"],[[11468,11468],"mapped",[11469]],[[11469,11469],"valid"],[[11470,11470],"mapped",[11471]],[[11471,11471],"valid"],[[11472,11472],"mapped",[11473]],[[11473,11473],"valid"],[[11474,11474],"mapped",[11475]],[[11475,11475],"valid"],[[11476,11476],"mapped",[11477]],[[11477,11477],"valid"],[[11478,11478],"mapped",[11479]],[[11479,11479],"valid"],[[11480,11480],"mapped",[11481]],[[11481,11481],"valid"],[[11482,11482],"mapped",[11483]],[[11483,11483],"valid"],[[11484,11484],"mapped",[11485]],[[11485,11485],"valid"],[[11486,11486],"mapped",[11487]],[[11487,11487],"valid"],[[11488,11488],"mapped",[11489]],[[11489,11489],"valid"],[[11490,11490],"mapped",[11491]],[[11491,11492],"valid"],[[11493,11498],"valid",[],"NV8"],[[11499,11499],"mapped",[11500]],[[11500,11500],"valid"],[[11501,11501],"mapped",[11502]],[[11502,11505],"valid"],[[11506,11506],"mapped",[11507]],[[11507,11507],"valid"],[[11508,11512],"disallowed"],[[11513,11519],"valid",[],"NV8"],[[11520,11557],"valid"],[[11558,11558],"disallowed"],[[11559,11559],"valid"],[[11560,11564],"disallowed"],[[11565,11565],"valid"],[[11566,11567],"disallowed"],[[11568,11621],"valid"],[[11622,11623],"valid"],[[11624,11630],"disallowed"],[[11631,11631],"mapped",[11617]],[[11632,11632],"valid",[],"NV8"],[[11633,11646],"disallowed"],[[11647,11647],"valid"],[[11648,11670],"valid"],[[11671,11679],"disallowed"],[[11680,11686],"valid"],[[11687,11687],"disallowed"],[[11688,11694],"valid"],[[11695,11695],"disallowed"],[[11696,11702],"valid"],[[11703,11703],"disallowed"],[[11704,11710],"valid"],[[11711,11711],"disallowed"],[[11712,11718],"valid"],[[11719,11719],"disallowed"],[[11720,11726],"valid"],[[11727,11727],"disallowed"],[[11728,11734],"valid"],[[11735,11735],"disallowed"],[[11736,11742],"valid"],[[11743,11743],"disallowed"],[[11744,11775],"valid"],[[11776,11799],"valid",[],"NV8"],[[11800,11803],"valid",[],"NV8"],[[11804,11805],"valid",[],"NV8"],[[11806,11822],"valid",[],"NV8"],[[11823,11823],"valid"],[[11824,11824],"valid",[],"NV8"],[[11825,11825],"valid",[],"NV8"],[[11826,11835],"valid",[],"NV8"],[[11836,11842],"valid",[],"NV8"],[[11843,11903],"disallowed"],[[11904,11929],"valid",[],"NV8"],[[11930,11930],"disallowed"],[[11931,11934],"valid",[],"NV8"],[[11935,11935],"mapped",[27597]],[[11936,12018],"valid",[],"NV8"],[[12019,12019],"mapped",[40863]],[[12020,12031],"disallowed"],[[12032,12032],"mapped",[19968]],[[12033,12033],"mapped",[20008]],[[12034,12034],"mapped",[20022]],[[12035,12035],"mapped",[20031]],[[12036,12036],"mapped",[20057]],[[12037,12037],"mapped",[20101]],[[12038,12038],"mapped",[20108]],[[12039,12039],"mapped",[20128]],[[12040,12040],"mapped",[20154]],[[12041,12041],"mapped",[20799]],[[12042,12042],"mapped",[20837]],[[12043,12043],"mapped",[20843]],[[12044,12044],"mapped",[20866]],[[12045,12045],"mapped",[20886]],[[12046,12046],"mapped",[20907]],[[12047,12047],"mapped",[20960]],[[12048,12048],"mapped",[20981]],[[12049,12049],"mapped",[20992]],[[12050,12050],"mapped",[21147]],[[12051,12051],"mapped",[21241]],[[12052,12052],"mapped",[21269]],[[12053,12053],"mapped",[21274]],[[12054,12054],"mapped",[21304]],[[12055,12055],"mapped",[21313]],[[12056,12056],"mapped",[21340]],[[12057,12057],"mapped",[21353]],[[12058,12058],"mapped",[21378]],[[12059,12059],"mapped",[21430]],[[12060,12060],"mapped",[21448]],[[12061,12061],"mapped",[21475]],[[12062,12062],"mapped",[22231]],[[12063,12063],"mapped",[22303]],[[12064,12064],"mapped",[22763]],[[12065,12065],"mapped",[22786]],[[12066,12066],"mapped",[22794]],[[12067,12067],"mapped",[22805]],[[12068,12068],"mapped",[22823]],[[12069,12069],"mapped",[22899]],[[12070,12070],"mapped",[23376]],[[12071,12071],"mapped",[23424]],[[12072,12072],"mapped",[23544]],[[12073,12073],"mapped",[23567]],[[12074,12074],"mapped",[23586]],[[12075,12075],"mapped",[23608]],[[12076,12076],"mapped",[23662]],[[12077,12077],"mapped",[23665]],[[12078,12078],"mapped",[24027]],[[12079,12079],"mapped",[24037]],[[12080,12080],"mapped",[24049]],[[12081,12081],"mapped",[24062]],[[12082,12082],"mapped",[24178]],[[12083,12083],"mapped",[24186]],[[12084,12084],"mapped",[24191]],[[12085,12085],"mapped",[24308]],[[12086,12086],"mapped",[24318]],[[12087,12087],"mapped",[24331]],[[12088,12088],"mapped",[24339]],[[12089,12089],"mapped",[24400]],[[12090,12090],"mapped",[24417]],[[12091,12091],"mapped",[24435]],[[12092,12092],"mapped",[24515]],[[12093,12093],"mapped",[25096]],[[12094,12094],"mapped",[25142]],[[12095,12095],"mapped",[25163]],[[12096,12096],"mapped",[25903]],[[12097,12097],"mapped",[25908]],[[12098,12098],"mapped",[25991]],[[12099,12099],"mapped",[26007]],[[12100,12100],"mapped",[26020]],[[12101,12101],"mapped",[26041]],[[12102,12102],"mapped",[26080]],[[12103,12103],"mapped",[26085]],[[12104,12104],"mapped",[26352]],[[12105,12105],"mapped",[26376]],[[12106,12106],"mapped",[26408]],[[12107,12107],"mapped",[27424]],[[12108,12108],"mapped",[27490]],[[12109,12109],"mapped",[27513]],[[12110,12110],"mapped",[27571]],[[12111,12111],"mapped",[27595]],[[12112,12112],"mapped",[27604]],[[12113,12113],"mapped",[27611]],[[12114,12114],"mapped",[27663]],[[12115,12115],"mapped",[27668]],[[12116,12116],"mapped",[27700]],[[12117,12117],"mapped",[28779]],[[12118,12118],"mapped",[29226]],[[12119,12119],"mapped",[29238]],[[12120,12120],"mapped",[29243]],[[12121,12121],"mapped",[29247]],[[12122,12122],"mapped",[29255]],[[12123,12123],"mapped",[29273]],[[12124,12124],"mapped",[29275]],[[12125,12125],"mapped",[29356]],[[12126,12126],"mapped",[29572]],[[12127,12127],"mapped",[29577]],[[12128,12128],"mapped",[29916]],[[12129,12129],"mapped",[29926]],[[12130,12130],"mapped",[29976]],[[12131,12131],"mapped",[29983]],[[12132,12132],"mapped",[29992]],[[12133,12133],"mapped",[30000]],[[12134,12134],"mapped",[30091]],[[12135,12135],"mapped",[30098]],[[12136,12136],"mapped",[30326]],[[12137,12137],"mapped",[30333]],[[12138,12138],"mapped",[30382]],[[12139,12139],"mapped",[30399]],[[12140,12140],"mapped",[30446]],[[12141,12141],"mapped",[30683]],[[12142,12142],"mapped",[30690]],[[12143,12143],"mapped",[30707]],[[12144,12144],"mapped",[31034]],[[12145,12145],"mapped",[31160]],[[12146,12146],"mapped",[31166]],[[12147,12147],"mapped",[31348]],[[12148,12148],"mapped",[31435]],[[12149,12149],"mapped",[31481]],[[12150,12150],"mapped",[31859]],[[12151,12151],"mapped",[31992]],[[12152,12152],"mapped",[32566]],[[12153,12153],"mapped",[32593]],[[12154,12154],"mapped",[32650]],[[12155,12155],"mapped",[32701]],[[12156,12156],"mapped",[32769]],[[12157,12157],"mapped",[32780]],[[12158,12158],"mapped",[32786]],[[12159,12159],"mapped",[32819]],[[12160,12160],"mapped",[32895]],[[12161,12161],"mapped",[32905]],[[12162,12162],"mapped",[33251]],[[12163,12163],"mapped",[33258]],[[12164,12164],"mapped",[33267]],[[12165,12165],"mapped",[33276]],[[12166,12166],"mapped",[33292]],[[12167,12167],"mapped",[33307]],[[12168,12168],"mapped",[33311]],[[12169,12169],"mapped",[33390]],[[12170,12170],"mapped",[33394]],[[12171,12171],"mapped",[33400]],[[12172,12172],"mapped",[34381]],[[12173,12173],"mapped",[34411]],[[12174,12174],"mapped",[34880]],[[12175,12175],"mapped",[34892]],[[12176,12176],"mapped",[34915]],[[12177,12177],"mapped",[35198]],[[12178,12178],"mapped",[35211]],[[12179,12179],"mapped",[35282]],[[12180,12180],"mapped",[35328]],[[12181,12181],"mapped",[35895]],[[12182,12182],"mapped",[35910]],[[12183,12183],"mapped",[35925]],[[12184,12184],"mapped",[35960]],[[12185,12185],"mapped",[35997]],[[12186,12186],"mapped",[36196]],[[12187,12187],"mapped",[36208]],[[12188,12188],"mapped",[36275]],[[12189,12189],"mapped",[36523]],[[12190,12190],"mapped",[36554]],[[12191,12191],"mapped",[36763]],[[12192,12192],"mapped",[36784]],[[12193,12193],"mapped",[36789]],[[12194,12194],"mapped",[37009]],[[12195,12195],"mapped",[37193]],[[12196,12196],"mapped",[37318]],[[12197,12197],"mapped",[37324]],[[12198,12198],"mapped",[37329]],[[12199,12199],"mapped",[38263]],[[12200,12200],"mapped",[38272]],[[12201,12201],"mapped",[38428]],[[12202,12202],"mapped",[38582]],[[12203,12203],"mapped",[38585]],[[12204,12204],"mapped",[38632]],[[12205,12205],"mapped",[38737]],[[12206,12206],"mapped",[38750]],[[12207,12207],"mapped",[38754]],[[12208,12208],"mapped",[38761]],[[12209,12209],"mapped",[38859]],[[12210,12210],"mapped",[38893]],[[12211,12211],"mapped",[38899]],[[12212,12212],"mapped",[38913]],[[12213,12213],"mapped",[39080]],[[12214,12214],"mapped",[39131]],[[12215,12215],"mapped",[39135]],[[12216,12216],"mapped",[39318]],[[12217,12217],"mapped",[39321]],[[12218,12218],"mapped",[39340]],[[12219,12219],"mapped",[39592]],[[12220,12220],"mapped",[39640]],[[12221,12221],"mapped",[39647]],[[12222,12222],"mapped",[39717]],[[12223,12223],"mapped",[39727]],[[12224,12224],"mapped",[39730]],[[12225,12225],"mapped",[39740]],[[12226,12226],"mapped",[39770]],[[12227,12227],"mapped",[40165]],[[12228,12228],"mapped",[40565]],[[12229,12229],"mapped",[40575]],[[12230,12230],"mapped",[40613]],[[12231,12231],"mapped",[40635]],[[12232,12232],"mapped",[40643]],[[12233,12233],"mapped",[40653]],[[12234,12234],"mapped",[40657]],[[12235,12235],"mapped",[40697]],[[12236,12236],"mapped",[40701]],[[12237,12237],"mapped",[40718]],[[12238,12238],"mapped",[40723]],[[12239,12239],"mapped",[40736]],[[12240,12240],"mapped",[40763]],[[12241,12241],"mapped",[40778]],[[12242,12242],"mapped",[40786]],[[12243,12243],"mapped",[40845]],[[12244,12244],"mapped",[40860]],[[12245,12245],"mapped",[40864]],[[12246,12271],"disallowed"],[[12272,12283],"disallowed"],[[12284,12287],"disallowed"],[[12288,12288],"disallowed_STD3_mapped",[32]],[[12289,12289],"valid",[],"NV8"],[[12290,12290],"mapped",[46]],[[12291,12292],"valid",[],"NV8"],[[12293,12295],"valid"],[[12296,12329],"valid",[],"NV8"],[[12330,12333],"valid"],[[12334,12341],"valid",[],"NV8"],[[12342,12342],"mapped",[12306]],[[12343,12343],"valid",[],"NV8"],[[12344,12344],"mapped",[21313]],[[12345,12345],"mapped",[21316]],[[12346,12346],"mapped",[21317]],[[12347,12347],"valid",[],"NV8"],[[12348,12348],"valid"],[[12349,12349],"valid",[],"NV8"],[[12350,12350],"valid",[],"NV8"],[[12351,12351],"valid",[],"NV8"],[[12352,12352],"disallowed"],[[12353,12436],"valid"],[[12437,12438],"valid"],[[12439,12440],"disallowed"],[[12441,12442],"valid"],[[12443,12443],"disallowed_STD3_mapped",[32,12441]],[[12444,12444],"disallowed_STD3_mapped",[32,12442]],[[12445,12446],"valid"],[[12447,12447],"mapped",[12424,12426]],[[12448,12448],"valid",[],"NV8"],[[12449,12542],"valid"],[[12543,12543],"mapped",[12467,12488]],[[12544,12548],"disallowed"],[[12549,12588],"valid"],[[12589,12589],"valid"],[[12590,12592],"disallowed"],[[12593,12593],"mapped",[4352]],[[12594,12594],"mapped",[4353]],[[12595,12595],"mapped",[4522]],[[12596,12596],"mapped",[4354]],[[12597,12597],"mapped",[4524]],[[12598,12598],"mapped",[4525]],[[12599,12599],"mapped",[4355]],[[12600,12600],"mapped",[4356]],[[12601,12601],"mapped",[4357]],[[12602,12602],"mapped",[4528]],[[12603,12603],"mapped",[4529]],[[12604,12604],"mapped",[4530]],[[12605,12605],"mapped",[4531]],[[12606,12606],"mapped",[4532]],[[12607,12607],"mapped",[4533]],[[12608,12608],"mapped",[4378]],[[12609,12609],"mapped",[4358]],[[12610,12610],"mapped",[4359]],[[12611,12611],"mapped",[4360]],[[12612,12612],"mapped",[4385]],[[12613,12613],"mapped",[4361]],[[12614,12614],"mapped",[4362]],[[12615,12615],"mapped",[4363]],[[12616,12616],"mapped",[4364]],[[12617,12617],"mapped",[4365]],[[12618,12618],"mapped",[4366]],[[12619,12619],"mapped",[4367]],[[12620,12620],"mapped",[4368]],[[12621,12621],"mapped",[4369]],[[12622,12622],"mapped",[4370]],[[12623,12623],"mapped",[4449]],[[12624,12624],"mapped",[4450]],[[12625,12625],"mapped",[4451]],[[12626,12626],"mapped",[4452]],[[12627,12627],"mapped",[4453]],[[12628,12628],"mapped",[4454]],[[12629,12629],"mapped",[4455]],[[12630,12630],"mapped",[4456]],[[12631,12631],"mapped",[4457]],[[12632,12632],"mapped",[4458]],[[12633,12633],"mapped",[4459]],[[12634,12634],"mapped",[4460]],[[12635,12635],"mapped",[4461]],[[12636,12636],"mapped",[4462]],[[12637,12637],"mapped",[4463]],[[12638,12638],"mapped",[4464]],[[12639,12639],"mapped",[4465]],[[12640,12640],"mapped",[4466]],[[12641,12641],"mapped",[4467]],[[12642,12642],"mapped",[4468]],[[12643,12643],"mapped",[4469]],[[12644,12644],"disallowed"],[[12645,12645],"mapped",[4372]],[[12646,12646],"mapped",[4373]],[[12647,12647],"mapped",[4551]],[[12648,12648],"mapped",[4552]],[[12649,12649],"mapped",[4556]],[[12650,12650],"mapped",[4558]],[[12651,12651],"mapped",[4563]],[[12652,12652],"mapped",[4567]],[[12653,12653],"mapped",[4569]],[[12654,12654],"mapped",[4380]],[[12655,12655],"mapped",[4573]],[[12656,12656],"mapped",[4575]],[[12657,12657],"mapped",[4381]],[[12658,12658],"mapped",[4382]],[[12659,12659],"mapped",[4384]],[[12660,12660],"mapped",[4386]],[[12661,12661],"mapped",[4387]],[[12662,12662],"mapped",[4391]],[[12663,12663],"mapped",[4393]],[[12664,12664],"mapped",[4395]],[[12665,12665],"mapped",[4396]],[[12666,12666],"mapped",[4397]],[[12667,12667],"mapped",[4398]],[[12668,12668],"mapped",[4399]],[[12669,12669],"mapped",[4402]],[[12670,12670],"mapped",[4406]],[[12671,12671],"mapped",[4416]],[[12672,12672],"mapped",[4423]],[[12673,12673],"mapped",[4428]],[[12674,12674],"mapped",[4593]],[[12675,12675],"mapped",[4594]],[[12676,12676],"mapped",[4439]],[[12677,12677],"mapped",[4440]],[[12678,12678],"mapped",[4441]],[[12679,12679],"mapped",[4484]],[[12680,12680],"mapped",[4485]],[[12681,12681],"mapped",[4488]],[[12682,12682],"mapped",[4497]],[[12683,12683],"mapped",[4498]],[[12684,12684],"mapped",[4500]],[[12685,12685],"mapped",[4510]],[[12686,12686],"mapped",[4513]],[[12687,12687],"disallowed"],[[12688,12689],"valid",[],"NV8"],[[12690,12690],"mapped",[19968]],[[12691,12691],"mapped",[20108]],[[12692,12692],"mapped",[19977]],[[12693,12693],"mapped",[22235]],[[12694,12694],"mapped",[19978]],[[12695,12695],"mapped",[20013]],[[12696,12696],"mapped",[19979]],[[12697,12697],"mapped",[30002]],[[12698,12698],"mapped",[20057]],[[12699,12699],"mapped",[19993]],[[12700,12700],"mapped",[19969]],[[12701,12701],"mapped",[22825]],[[12702,12702],"mapped",[22320]],[[12703,12703],"mapped",[20154]],[[12704,12727],"valid"],[[12728,12730],"valid"],[[12731,12735],"disallowed"],[[12736,12751],"valid",[],"NV8"],[[12752,12771],"valid",[],"NV8"],[[12772,12783],"disallowed"],[[12784,12799],"valid"],[[12800,12800],"disallowed_STD3_mapped",[40,4352,41]],[[12801,12801],"disallowed_STD3_mapped",[40,4354,41]],[[12802,12802],"disallowed_STD3_mapped",[40,4355,41]],[[12803,12803],"disallowed_STD3_mapped",[40,4357,41]],[[12804,12804],"disallowed_STD3_mapped",[40,4358,41]],[[12805,12805],"disallowed_STD3_mapped",[40,4359,41]],[[12806,12806],"disallowed_STD3_mapped",[40,4361,41]],[[12807,12807],"disallowed_STD3_mapped",[40,4363,41]],[[12808,12808],"disallowed_STD3_mapped",[40,4364,41]],[[12809,12809],"disallowed_STD3_mapped",[40,4366,41]],[[12810,12810],"disallowed_STD3_mapped",[40,4367,41]],[[12811,12811],"disallowed_STD3_mapped",[40,4368,41]],[[12812,12812],"disallowed_STD3_mapped",[40,4369,41]],[[12813,12813],"disallowed_STD3_mapped",[40,4370,41]],[[12814,12814],"disallowed_STD3_mapped",[40,44032,41]],[[12815,12815],"disallowed_STD3_mapped",[40,45208,41]],[[12816,12816],"disallowed_STD3_mapped",[40,45796,41]],[[12817,12817],"disallowed_STD3_mapped",[40,46972,41]],[[12818,12818],"disallowed_STD3_mapped",[40,47560,41]],[[12819,12819],"disallowed_STD3_mapped",[40,48148,41]],[[12820,12820],"disallowed_STD3_mapped",[40,49324,41]],[[12821,12821],"disallowed_STD3_mapped",[40,50500,41]],[[12822,12822],"disallowed_STD3_mapped",[40,51088,41]],[[12823,12823],"disallowed_STD3_mapped",[40,52264,41]],[[12824,12824],"disallowed_STD3_mapped",[40,52852,41]],[[12825,12825],"disallowed_STD3_mapped",[40,53440,41]],[[12826,12826],"disallowed_STD3_mapped",[40,54028,41]],[[12827,12827],"disallowed_STD3_mapped",[40,54616,41]],[[12828,12828],"disallowed_STD3_mapped",[40,51452,41]],[[12829,12829],"disallowed_STD3_mapped",[40,50724,51204,41]],[[12830,12830],"disallowed_STD3_mapped",[40,50724,54980,41]],[[12831,12831],"disallowed"],[[12832,12832],"disallowed_STD3_mapped",[40,19968,41]],[[12833,12833],"disallowed_STD3_mapped",[40,20108,41]],[[12834,12834],"disallowed_STD3_mapped",[40,19977,41]],[[12835,12835],"disallowed_STD3_mapped",[40,22235,41]],[[12836,12836],"disallowed_STD3_mapped",[40,20116,41]],[[12837,12837],"disallowed_STD3_mapped",[40,20845,41]],[[12838,12838],"disallowed_STD3_mapped",[40,19971,41]],[[12839,12839],"disallowed_STD3_mapped",[40,20843,41]],[[12840,12840],"disallowed_STD3_mapped",[40,20061,41]],[[12841,12841],"disallowed_STD3_mapped",[40,21313,41]],[[12842,12842],"disallowed_STD3_mapped",[40,26376,41]],[[12843,12843],"disallowed_STD3_mapped",[40,28779,41]],[[12844,12844],"disallowed_STD3_mapped",[40,27700,41]],[[12845,12845],"disallowed_STD3_mapped",[40,26408,41]],[[12846,12846],"disallowed_STD3_mapped",[40,37329,41]],[[12847,12847],"disallowed_STD3_mapped",[40,22303,41]],[[12848,12848],"disallowed_STD3_mapped",[40,26085,41]],[[12849,12849],"disallowed_STD3_mapped",[40,26666,41]],[[12850,12850],"disallowed_STD3_mapped",[40,26377,41]],[[12851,12851],"disallowed_STD3_mapped",[40,31038,41]],[[12852,12852],"disallowed_STD3_mapped",[40,21517,41]],[[12853,12853],"disallowed_STD3_mapped",[40,29305,41]],[[12854,12854],"disallowed_STD3_mapped",[40,36001,41]],[[12855,12855],"disallowed_STD3_mapped",[40,31069,41]],[[12856,12856],"disallowed_STD3_mapped",[40,21172,41]],[[12857,12857],"disallowed_STD3_mapped",[40,20195,41]],[[12858,12858],"disallowed_STD3_mapped",[40,21628,41]],[[12859,12859],"disallowed_STD3_mapped",[40,23398,41]],[[12860,12860],"disallowed_STD3_mapped",[40,30435,41]],[[12861,12861],"disallowed_STD3_mapped",[40,20225,41]],[[12862,12862],"disallowed_STD3_mapped",[40,36039,41]],[[12863,12863],"disallowed_STD3_mapped",[40,21332,41]],[[12864,12864],"disallowed_STD3_mapped",[40,31085,41]],[[12865,12865],"disallowed_STD3_mapped",[40,20241,41]],[[12866,12866],"disallowed_STD3_mapped",[40,33258,41]],[[12867,12867],"disallowed_STD3_mapped",[40,33267,41]],[[12868,12868],"mapped",[21839]],[[12869,12869],"mapped",[24188]],[[12870,12870],"mapped",[25991]],[[12871,12871],"mapped",[31631]],[[12872,12879],"valid",[],"NV8"],[[12880,12880],"mapped",[112,116,101]],[[12881,12881],"mapped",[50,49]],[[12882,12882],"mapped",[50,50]],[[12883,12883],"mapped",[50,51]],[[12884,12884],"mapped",[50,52]],[[12885,12885],"mapped",[50,53]],[[12886,12886],"mapped",[50,54]],[[12887,12887],"mapped",[50,55]],[[12888,12888],"mapped",[50,56]],[[12889,12889],"mapped",[50,57]],[[12890,12890],"mapped",[51,48]],[[12891,12891],"mapped",[51,49]],[[12892,12892],"mapped",[51,50]],[[12893,12893],"mapped",[51,51]],[[12894,12894],"mapped",[51,52]],[[12895,12895],"mapped",[51,53]],[[12896,12896],"mapped",[4352]],[[12897,12897],"mapped",[4354]],[[12898,12898],"mapped",[4355]],[[12899,12899],"mapped",[4357]],[[12900,12900],"mapped",[4358]],[[12901,12901],"mapped",[4359]],[[12902,12902],"mapped",[4361]],[[12903,12903],"mapped",[4363]],[[12904,12904],"mapped",[4364]],[[12905,12905],"mapped",[4366]],[[12906,12906],"mapped",[4367]],[[12907,12907],"mapped",[4368]],[[12908,12908],"mapped",[4369]],[[12909,12909],"mapped",[4370]],[[12910,12910],"mapped",[44032]],[[12911,12911],"mapped",[45208]],[[12912,12912],"mapped",[45796]],[[12913,12913],"mapped",[46972]],[[12914,12914],"mapped",[47560]],[[12915,12915],"mapped",[48148]],[[12916,12916],"mapped",[49324]],[[12917,12917],"mapped",[50500]],[[12918,12918],"mapped",[51088]],[[12919,12919],"mapped",[52264]],[[12920,12920],"mapped",[52852]],[[12921,12921],"mapped",[53440]],[[12922,12922],"mapped",[54028]],[[12923,12923],"mapped",[54616]],[[12924,12924],"mapped",[52280,44256]],[[12925,12925],"mapped",[51452,51032]],[[12926,12926],"mapped",[50864]],[[12927,12927],"valid",[],"NV8"],[[12928,12928],"mapped",[19968]],[[12929,12929],"mapped",[20108]],[[12930,12930],"mapped",[19977]],[[12931,12931],"mapped",[22235]],[[12932,12932],"mapped",[20116]],[[12933,12933],"mapped",[20845]],[[12934,12934],"mapped",[19971]],[[12935,12935],"mapped",[20843]],[[12936,12936],"mapped",[20061]],[[12937,12937],"mapped",[21313]],[[12938,12938],"mapped",[26376]],[[12939,12939],"mapped",[28779]],[[12940,12940],"mapped",[27700]],[[12941,12941],"mapped",[26408]],[[12942,12942],"mapped",[37329]],[[12943,12943],"mapped",[22303]],[[12944,12944],"mapped",[26085]],[[12945,12945],"mapped",[26666]],[[12946,12946],"mapped",[26377]],[[12947,12947],"mapped",[31038]],[[12948,12948],"mapped",[21517]],[[12949,12949],"mapped",[29305]],[[12950,12950],"mapped",[36001]],[[12951,12951],"mapped",[31069]],[[12952,12952],"mapped",[21172]],[[12953,12953],"mapped",[31192]],[[12954,12954],"mapped",[30007]],[[12955,12955],"mapped",[22899]],[[12956,12956],"mapped",[36969]],[[12957,12957],"mapped",[20778]],[[12958,12958],"mapped",[21360]],[[12959,12959],"mapped",[27880]],[[12960,12960],"mapped",[38917]],[[12961,12961],"mapped",[20241]],[[12962,12962],"mapped",[20889]],[[12963,12963],"mapped",[27491]],[[12964,12964],"mapped",[19978]],[[12965,12965],"mapped",[20013]],[[12966,12966],"mapped",[19979]],[[12967,12967],"mapped",[24038]],[[12968,12968],"mapped",[21491]],[[12969,12969],"mapped",[21307]],[[12970,12970],"mapped",[23447]],[[12971,12971],"mapped",[23398]],[[12972,12972],"mapped",[30435]],[[12973,12973],"mapped",[20225]],[[12974,12974],"mapped",[36039]],[[12975,12975],"mapped",[21332]],[[12976,12976],"mapped",[22812]],[[12977,12977],"mapped",[51,54]],[[12978,12978],"mapped",[51,55]],[[12979,12979],"mapped",[51,56]],[[12980,12980],"mapped",[51,57]],[[12981,12981],"mapped",[52,48]],[[12982,12982],"mapped",[52,49]],[[12983,12983],"mapped",[52,50]],[[12984,12984],"mapped",[52,51]],[[12985,12985],"mapped",[52,52]],[[12986,12986],"mapped",[52,53]],[[12987,12987],"mapped",[52,54]],[[12988,12988],"mapped",[52,55]],[[12989,12989],"mapped",[52,56]],[[12990,12990],"mapped",[52,57]],[[12991,12991],"mapped",[53,48]],[[12992,12992],"mapped",[49,26376]],[[12993,12993],"mapped",[50,26376]],[[12994,12994],"mapped",[51,26376]],[[12995,12995],"mapped",[52,26376]],[[12996,12996],"mapped",[53,26376]],[[12997,12997],"mapped",[54,26376]],[[12998,12998],"mapped",[55,26376]],[[12999,12999],"mapped",[56,26376]],[[13000,13000],"mapped",[57,26376]],[[13001,13001],"mapped",[49,48,26376]],[[13002,13002],"mapped",[49,49,26376]],[[13003,13003],"mapped",[49,50,26376]],[[13004,13004],"mapped",[104,103]],[[13005,13005],"mapped",[101,114,103]],[[13006,13006],"mapped",[101,118]],[[13007,13007],"mapped",[108,116,100]],[[13008,13008],"mapped",[12450]],[[13009,13009],"mapped",[12452]],[[13010,13010],"mapped",[12454]],[[13011,13011],"mapped",[12456]],[[13012,13012],"mapped",[12458]],[[13013,13013],"mapped",[12459]],[[13014,13014],"mapped",[12461]],[[13015,13015],"mapped",[12463]],[[13016,13016],"mapped",[12465]],[[13017,13017],"mapped",[12467]],[[13018,13018],"mapped",[12469]],[[13019,13019],"mapped",[12471]],[[13020,13020],"mapped",[12473]],[[13021,13021],"mapped",[12475]],[[13022,13022],"mapped",[12477]],[[13023,13023],"mapped",[12479]],[[13024,13024],"mapped",[12481]],[[13025,13025],"mapped",[12484]],[[13026,13026],"mapped",[12486]],[[13027,13027],"mapped",[12488]],[[13028,13028],"mapped",[12490]],[[13029,13029],"mapped",[12491]],[[13030,13030],"mapped",[12492]],[[13031,13031],"mapped",[12493]],[[13032,13032],"mapped",[12494]],[[13033,13033],"mapped",[12495]],[[13034,13034],"mapped",[12498]],[[13035,13035],"mapped",[12501]],[[13036,13036],"mapped",[12504]],[[13037,13037],"mapped",[12507]],[[13038,13038],"mapped",[12510]],[[13039,13039],"mapped",[12511]],[[13040,13040],"mapped",[12512]],[[13041,13041],"mapped",[12513]],[[13042,13042],"mapped",[12514]],[[13043,13043],"mapped",[12516]],[[13044,13044],"mapped",[12518]],[[13045,13045],"mapped",[12520]],[[13046,13046],"mapped",[12521]],[[13047,13047],"mapped",[12522]],[[13048,13048],"mapped",[12523]],[[13049,13049],"mapped",[12524]],[[13050,13050],"mapped",[12525]],[[13051,13051],"mapped",[12527]],[[13052,13052],"mapped",[12528]],[[13053,13053],"mapped",[12529]],[[13054,13054],"mapped",[12530]],[[13055,13055],"disallowed"],[[13056,13056],"mapped",[12450,12497,12540,12488]],[[13057,13057],"mapped",[12450,12523,12501,12449]],[[13058,13058],"mapped",[12450,12531,12506,12450]],[[13059,13059],"mapped",[12450,12540,12523]],[[13060,13060],"mapped",[12452,12491,12531,12464]],[[13061,13061],"mapped",[12452,12531,12481]],[[13062,13062],"mapped",[12454,12457,12531]],[[13063,13063],"mapped",[12456,12473,12463,12540,12489]],[[13064,13064],"mapped",[12456,12540,12459,12540]],[[13065,13065],"mapped",[12458,12531,12473]],[[13066,13066],"mapped",[12458,12540,12512]],[[13067,13067],"mapped",[12459,12452,12522]],[[13068,13068],"mapped",[12459,12521,12483,12488]],[[13069,13069],"mapped",[12459,12525,12522,12540]],[[13070,13070],"mapped",[12460,12525,12531]],[[13071,13071],"mapped",[12460,12531,12510]],[[13072,13072],"mapped",[12462,12460]],[[13073,13073],"mapped",[12462,12491,12540]],[[13074,13074],"mapped",[12461,12517,12522,12540]],[[13075,13075],"mapped",[12462,12523,12480,12540]],[[13076,13076],"mapped",[12461,12525]],[[13077,13077],"mapped",[12461,12525,12464,12521,12512]],[[13078,13078],"mapped",[12461,12525,12513,12540,12488,12523]],[[13079,13079],"mapped",[12461,12525,12527,12483,12488]],[[13080,13080],"mapped",[12464,12521,12512]],[[13081,13081],"mapped",[12464,12521,12512,12488,12531]],[[13082,13082],"mapped",[12463,12523,12476,12452,12525]],[[13083,13083],"mapped",[12463,12525,12540,12493]],[[13084,13084],"mapped",[12465,12540,12473]],[[13085,13085],"mapped",[12467,12523,12490]],[[13086,13086],"mapped",[12467,12540,12509]],[[13087,13087],"mapped",[12469,12452,12463,12523]],[[13088,13088],"mapped",[12469,12531,12481,12540,12512]],[[13089,13089],"mapped",[12471,12522,12531,12464]],[[13090,13090],"mapped",[12475,12531,12481]],[[13091,13091],"mapped",[12475,12531,12488]],[[13092,13092],"mapped",[12480,12540,12473]],[[13093,13093],"mapped",[12487,12471]],[[13094,13094],"mapped",[12489,12523]],[[13095,13095],"mapped",[12488,12531]],[[13096,13096],"mapped",[12490,12494]],[[13097,13097],"mapped",[12494,12483,12488]],[[13098,13098],"mapped",[12495,12452,12484]],[[13099,13099],"mapped",[12497,12540,12475,12531,12488]],[[13100,13100],"mapped",[12497,12540,12484]],[[13101,13101],"mapped",[12496,12540,12524,12523]],[[13102,13102],"mapped",[12500,12450,12473,12488,12523]],[[13103,13103],"mapped",[12500,12463,12523]],[[13104,13104],"mapped",[12500,12467]],[[13105,13105],"mapped",[12499,12523]],[[13106,13106],"mapped",[12501,12449,12521,12483,12489]],[[13107,13107],"mapped",[12501,12451,12540,12488]],[[13108,13108],"mapped",[12502,12483,12471,12455,12523]],[[13109,13109],"mapped",[12501,12521,12531]],[[13110,13110],"mapped",[12504,12463,12479,12540,12523]],[[13111,13111],"mapped",[12506,12477]],[[13112,13112],"mapped",[12506,12491,12498]],[[13113,13113],"mapped",[12504,12523,12484]],[[13114,13114],"mapped",[12506,12531,12473]],[[13115,13115],"mapped",[12506,12540,12472]],[[13116,13116],"mapped",[12505,12540,12479]],[[13117,13117],"mapped",[12509,12452,12531,12488]],[[13118,13118],"mapped",[12508,12523,12488]],[[13119,13119],"mapped",[12507,12531]],[[13120,13120],"mapped",[12509,12531,12489]],[[13121,13121],"mapped",[12507,12540,12523]],[[13122,13122],"mapped",[12507,12540,12531]],[[13123,13123],"mapped",[12510,12452,12463,12525]],[[13124,13124],"mapped",[12510,12452,12523]],[[13125,13125],"mapped",[12510,12483,12495]],[[13126,13126],"mapped",[12510,12523,12463]],[[13127,13127],"mapped",[12510,12531,12471,12519,12531]],[[13128,13128],"mapped",[12511,12463,12525,12531]],[[13129,13129],"mapped",[12511,12522]],[[13130,13130],"mapped",[12511,12522,12496,12540,12523]],[[13131,13131],"mapped",[12513,12460]],[[13132,13132],"mapped",[12513,12460,12488,12531]],[[13133,13133],"mapped",[12513,12540,12488,12523]],[[13134,13134],"mapped",[12516,12540,12489]],[[13135,13135],"mapped",[12516,12540,12523]],[[13136,13136],"mapped",[12518,12450,12531]],[[13137,13137],"mapped",[12522,12483,12488,12523]],[[13138,13138],"mapped",[12522,12521]],[[13139,13139],"mapped",[12523,12500,12540]],[[13140,13140],"mapped",[12523,12540,12502,12523]],[[13141,13141],"mapped",[12524,12512]],[[13142,13142],"mapped",[12524,12531,12488,12466,12531]],[[13143,13143],"mapped",[12527,12483,12488]],[[13144,13144],"mapped",[48,28857]],[[13145,13145],"mapped",[49,28857]],[[13146,13146],"mapped",[50,28857]],[[13147,13147],"mapped",[51,28857]],[[13148,13148],"mapped",[52,28857]],[[13149,13149],"mapped",[53,28857]],[[13150,13150],"mapped",[54,28857]],[[13151,13151],"mapped",[55,28857]],[[13152,13152],"mapped",[56,28857]],[[13153,13153],"mapped",[57,28857]],[[13154,13154],"mapped",[49,48,28857]],[[13155,13155],"mapped",[49,49,28857]],[[13156,13156],"mapped",[49,50,28857]],[[13157,13157],"mapped",[49,51,28857]],[[13158,13158],"mapped",[49,52,28857]],[[13159,13159],"mapped",[49,53,28857]],[[13160,13160],"mapped",[49,54,28857]],[[13161,13161],"mapped",[49,55,28857]],[[13162,13162],"mapped",[49,56,28857]],[[13163,13163],"mapped",[49,57,28857]],[[13164,13164],"mapped",[50,48,28857]],[[13165,13165],"mapped",[50,49,28857]],[[13166,13166],"mapped",[50,50,28857]],[[13167,13167],"mapped",[50,51,28857]],[[13168,13168],"mapped",[50,52,28857]],[[13169,13169],"mapped",[104,112,97]],[[13170,13170],"mapped",[100,97]],[[13171,13171],"mapped",[97,117]],[[13172,13172],"mapped",[98,97,114]],[[13173,13173],"mapped",[111,118]],[[13174,13174],"mapped",[112,99]],[[13175,13175],"mapped",[100,109]],[[13176,13176],"mapped",[100,109,50]],[[13177,13177],"mapped",[100,109,51]],[[13178,13178],"mapped",[105,117]],[[13179,13179],"mapped",[24179,25104]],[[13180,13180],"mapped",[26157,21644]],[[13181,13181],"mapped",[22823,27491]],[[13182,13182],"mapped",[26126,27835]],[[13183,13183],"mapped",[26666,24335,20250,31038]],[[13184,13184],"mapped",[112,97]],[[13185,13185],"mapped",[110,97]],[[13186,13186],"mapped",[956,97]],[[13187,13187],"mapped",[109,97]],[[13188,13188],"mapped",[107,97]],[[13189,13189],"mapped",[107,98]],[[13190,13190],"mapped",[109,98]],[[13191,13191],"mapped",[103,98]],[[13192,13192],"mapped",[99,97,108]],[[13193,13193],"mapped",[107,99,97,108]],[[13194,13194],"mapped",[112,102]],[[13195,13195],"mapped",[110,102]],[[13196,13196],"mapped",[956,102]],[[13197,13197],"mapped",[956,103]],[[13198,13198],"mapped",[109,103]],[[13199,13199],"mapped",[107,103]],[[13200,13200],"mapped",[104,122]],[[13201,13201],"mapped",[107,104,122]],[[13202,13202],"mapped",[109,104,122]],[[13203,13203],"mapped",[103,104,122]],[[13204,13204],"mapped",[116,104,122]],[[13205,13205],"mapped",[956,108]],[[13206,13206],"mapped",[109,108]],[[13207,13207],"mapped",[100,108]],[[13208,13208],"mapped",[107,108]],[[13209,13209],"mapped",[102,109]],[[13210,13210],"mapped",[110,109]],[[13211,13211],"mapped",[956,109]],[[13212,13212],"mapped",[109,109]],[[13213,13213],"mapped",[99,109]],[[13214,13214],"mapped",[107,109]],[[13215,13215],"mapped",[109,109,50]],[[13216,13216],"mapped",[99,109,50]],[[13217,13217],"mapped",[109,50]],[[13218,13218],"mapped",[107,109,50]],[[13219,13219],"mapped",[109,109,51]],[[13220,13220],"mapped",[99,109,51]],[[13221,13221],"mapped",[109,51]],[[13222,13222],"mapped",[107,109,51]],[[13223,13223],"mapped",[109,8725,115]],[[13224,13224],"mapped",[109,8725,115,50]],[[13225,13225],"mapped",[112,97]],[[13226,13226],"mapped",[107,112,97]],[[13227,13227],"mapped",[109,112,97]],[[13228,13228],"mapped",[103,112,97]],[[13229,13229],"mapped",[114,97,100]],[[13230,13230],"mapped",[114,97,100,8725,115]],[[13231,13231],"mapped",[114,97,100,8725,115,50]],[[13232,13232],"mapped",[112,115]],[[13233,13233],"mapped",[110,115]],[[13234,13234],"mapped",[956,115]],[[13235,13235],"mapped",[109,115]],[[13236,13236],"mapped",[112,118]],[[13237,13237],"mapped",[110,118]],[[13238,13238],"mapped",[956,118]],[[13239,13239],"mapped",[109,118]],[[13240,13240],"mapped",[107,118]],[[13241,13241],"mapped",[109,118]],[[13242,13242],"mapped",[112,119]],[[13243,13243],"mapped",[110,119]],[[13244,13244],"mapped",[956,119]],[[13245,13245],"mapped",[109,119]],[[13246,13246],"mapped",[107,119]],[[13247,13247],"mapped",[109,119]],[[13248,13248],"mapped",[107,969]],[[13249,13249],"mapped",[109,969]],[[13250,13250],"disallowed"],[[13251,13251],"mapped",[98,113]],[[13252,13252],"mapped",[99,99]],[[13253,13253],"mapped",[99,100]],[[13254,13254],"mapped",[99,8725,107,103]],[[13255,13255],"disallowed"],[[13256,13256],"mapped",[100,98]],[[13257,13257],"mapped",[103,121]],[[13258,13258],"mapped",[104,97]],[[13259,13259],"mapped",[104,112]],[[13260,13260],"mapped",[105,110]],[[13261,13261],"mapped",[107,107]],[[13262,13262],"mapped",[107,109]],[[13263,13263],"mapped",[107,116]],[[13264,13264],"mapped",[108,109]],[[13265,13265],"mapped",[108,110]],[[13266,13266],"mapped",[108,111,103]],[[13267,13267],"mapped",[108,120]],[[13268,13268],"mapped",[109,98]],[[13269,13269],"mapped",[109,105,108]],[[13270,13270],"mapped",[109,111,108]],[[13271,13271],"mapped",[112,104]],[[13272,13272],"disallowed"],[[13273,13273],"mapped",[112,112,109]],[[13274,13274],"mapped",[112,114]],[[13275,13275],"mapped",[115,114]],[[13276,13276],"mapped",[115,118]],[[13277,13277],"mapped",[119,98]],[[13278,13278],"mapped",[118,8725,109]],[[13279,13279],"mapped",[97,8725,109]],[[13280,13280],"mapped",[49,26085]],[[13281,13281],"mapped",[50,26085]],[[13282,13282],"mapped",[51,26085]],[[13283,13283],"mapped",[52,26085]],[[13284,13284],"mapped",[53,26085]],[[13285,13285],"mapped",[54,26085]],[[13286,13286],"mapped",[55,26085]],[[13287,13287],"mapped",[56,26085]],[[13288,13288],"mapped",[57,26085]],[[13289,13289],"mapped",[49,48,26085]],[[13290,13290],"mapped",[49,49,26085]],[[13291,13291],"mapped",[49,50,26085]],[[13292,13292],"mapped",[49,51,26085]],[[13293,13293],"mapped",[49,52,26085]],[[13294,13294],"mapped",[49,53,26085]],[[13295,13295],"mapped",[49,54,26085]],[[13296,13296],"mapped",[49,55,26085]],[[13297,13297],"mapped",[49,56,26085]],[[13298,13298],"mapped",[49,57,26085]],[[13299,13299],"mapped",[50,48,26085]],[[13300,13300],"mapped",[50,49,26085]],[[13301,13301],"mapped",[50,50,26085]],[[13302,13302],"mapped",[50,51,26085]],[[13303,13303],"mapped",[50,52,26085]],[[13304,13304],"mapped",[50,53,26085]],[[13305,13305],"mapped",[50,54,26085]],[[13306,13306],"mapped",[50,55,26085]],[[13307,13307],"mapped",[50,56,26085]],[[13308,13308],"mapped",[50,57,26085]],[[13309,13309],"mapped",[51,48,26085]],[[13310,13310],"mapped",[51,49,26085]],[[13311,13311],"mapped",[103,97,108]],[[13312,19893],"valid"],[[19894,19903],"disallowed"],[[19904,19967],"valid",[],"NV8"],[[19968,40869],"valid"],[[40870,40891],"valid"],[[40892,40899],"valid"],[[40900,40907],"valid"],[[40908,40908],"valid"],[[40909,40917],"valid"],[[40918,40959],"disallowed"],[[40960,42124],"valid"],[[42125,42127],"disallowed"],[[42128,42145],"valid",[],"NV8"],[[42146,42147],"valid",[],"NV8"],[[42148,42163],"valid",[],"NV8"],[[42164,42164],"valid",[],"NV8"],[[42165,42176],"valid",[],"NV8"],[[42177,42177],"valid",[],"NV8"],[[42178,42180],"valid",[],"NV8"],[[42181,42181],"valid",[],"NV8"],[[42182,42182],"valid",[],"NV8"],[[42183,42191],"disallowed"],[[42192,42237],"valid"],[[42238,42239],"valid",[],"NV8"],[[42240,42508],"valid"],[[42509,42511],"valid",[],"NV8"],[[42512,42539],"valid"],[[42540,42559],"disallowed"],[[42560,42560],"mapped",[42561]],[[42561,42561],"valid"],[[42562,42562],"mapped",[42563]],[[42563,42563],"valid"],[[42564,42564],"mapped",[42565]],[[42565,42565],"valid"],[[42566,42566],"mapped",[42567]],[[42567,42567],"valid"],[[42568,42568],"mapped",[42569]],[[42569,42569],"valid"],[[42570,42570],"mapped",[42571]],[[42571,42571],"valid"],[[42572,42572],"mapped",[42573]],[[42573,42573],"valid"],[[42574,42574],"mapped",[42575]],[[42575,42575],"valid"],[[42576,42576],"mapped",[42577]],[[42577,42577],"valid"],[[42578,42578],"mapped",[42579]],[[42579,42579],"valid"],[[42580,42580],"mapped",[42581]],[[42581,42581],"valid"],[[42582,42582],"mapped",[42583]],[[42583,42583],"valid"],[[42584,42584],"mapped",[42585]],[[42585,42585],"valid"],[[42586,42586],"mapped",[42587]],[[42587,42587],"valid"],[[42588,42588],"mapped",[42589]],[[42589,42589],"valid"],[[42590,42590],"mapped",[42591]],[[42591,42591],"valid"],[[42592,42592],"mapped",[42593]],[[42593,42593],"valid"],[[42594,42594],"mapped",[42595]],[[42595,42595],"valid"],[[42596,42596],"mapped",[42597]],[[42597,42597],"valid"],[[42598,42598],"mapped",[42599]],[[42599,42599],"valid"],[[42600,42600],"mapped",[42601]],[[42601,42601],"valid"],[[42602,42602],"mapped",[42603]],[[42603,42603],"valid"],[[42604,42604],"mapped",[42605]],[[42605,42607],"valid"],[[42608,42611],"valid",[],"NV8"],[[42612,42619],"valid"],[[42620,42621],"valid"],[[42622,42622],"valid",[],"NV8"],[[42623,42623],"valid"],[[42624,42624],"mapped",[42625]],[[42625,42625],"valid"],[[42626,42626],"mapped",[42627]],[[42627,42627],"valid"],[[42628,42628],"mapped",[42629]],[[42629,42629],"valid"],[[42630,42630],"mapped",[42631]],[[42631,42631],"valid"],[[42632,42632],"mapped",[42633]],[[42633,42633],"valid"],[[42634,42634],"mapped",[42635]],[[42635,42635],"valid"],[[42636,42636],"mapped",[42637]],[[42637,42637],"valid"],[[42638,42638],"mapped",[42639]],[[42639,42639],"valid"],[[42640,42640],"mapped",[42641]],[[42641,42641],"valid"],[[42642,42642],"mapped",[42643]],[[42643,42643],"valid"],[[42644,42644],"mapped",[42645]],[[42645,42645],"valid"],[[42646,42646],"mapped",[42647]],[[42647,42647],"valid"],[[42648,42648],"mapped",[42649]],[[42649,42649],"valid"],[[42650,42650],"mapped",[42651]],[[42651,42651],"valid"],[[42652,42652],"mapped",[1098]],[[42653,42653],"mapped",[1100]],[[42654,42654],"valid"],[[42655,42655],"valid"],[[42656,42725],"valid"],[[42726,42735],"valid",[],"NV8"],[[42736,42737],"valid"],[[42738,42743],"valid",[],"NV8"],[[42744,42751],"disallowed"],[[42752,42774],"valid",[],"NV8"],[[42775,42778],"valid"],[[42779,42783],"valid"],[[42784,42785],"valid",[],"NV8"],[[42786,42786],"mapped",[42787]],[[42787,42787],"valid"],[[42788,42788],"mapped",[42789]],[[42789,42789],"valid"],[[42790,42790],"mapped",[42791]],[[42791,42791],"valid"],[[42792,42792],"mapped",[42793]],[[42793,42793],"valid"],[[42794,42794],"mapped",[42795]],[[42795,42795],"valid"],[[42796,42796],"mapped",[42797]],[[42797,42797],"valid"],[[42798,42798],"mapped",[42799]],[[42799,42801],"valid"],[[42802,42802],"mapped",[42803]],[[42803,42803],"valid"],[[42804,42804],"mapped",[42805]],[[42805,42805],"valid"],[[42806,42806],"mapped",[42807]],[[42807,42807],"valid"],[[42808,42808],"mapped",[42809]],[[42809,42809],"valid"],[[42810,42810],"mapped",[42811]],[[42811,42811],"valid"],[[42812,42812],"mapped",[42813]],[[42813,42813],"valid"],[[42814,42814],"mapped",[42815]],[[42815,42815],"valid"],[[42816,42816],"mapped",[42817]],[[42817,42817],"valid"],[[42818,42818],"mapped",[42819]],[[42819,42819],"valid"],[[42820,42820],"mapped",[42821]],[[42821,42821],"valid"],[[42822,42822],"mapped",[42823]],[[42823,42823],"valid"],[[42824,42824],"mapped",[42825]],[[42825,42825],"valid"],[[42826,42826],"mapped",[42827]],[[42827,42827],"valid"],[[42828,42828],"mapped",[42829]],[[42829,42829],"valid"],[[42830,42830],"mapped",[42831]],[[42831,42831],"valid"],[[42832,42832],"mapped",[42833]],[[42833,42833],"valid"],[[42834,42834],"mapped",[42835]],[[42835,42835],"valid"],[[42836,42836],"mapped",[42837]],[[42837,42837],"valid"],[[42838,42838],"mapped",[42839]],[[42839,42839],"valid"],[[42840,42840],"mapped",[42841]],[[42841,42841],"valid"],[[42842,42842],"mapped",[42843]],[[42843,42843],"valid"],[[42844,42844],"mapped",[42845]],[[42845,42845],"valid"],[[42846,42846],"mapped",[42847]],[[42847,42847],"valid"],[[42848,42848],"mapped",[42849]],[[42849,42849],"valid"],[[42850,42850],"mapped",[42851]],[[42851,42851],"valid"],[[42852,42852],"mapped",[42853]],[[42853,42853],"valid"],[[42854,42854],"mapped",[42855]],[[42855,42855],"valid"],[[42856,42856],"mapped",[42857]],[[42857,42857],"valid"],[[42858,42858],"mapped",[42859]],[[42859,42859],"valid"],[[42860,42860],"mapped",[42861]],[[42861,42861],"valid"],[[42862,42862],"mapped",[42863]],[[42863,42863],"valid"],[[42864,42864],"mapped",[42863]],[[42865,42872],"valid"],[[42873,42873],"mapped",[42874]],[[42874,42874],"valid"],[[42875,42875],"mapped",[42876]],[[42876,42876],"valid"],[[42877,42877],"mapped",[7545]],[[42878,42878],"mapped",[42879]],[[42879,42879],"valid"],[[42880,42880],"mapped",[42881]],[[42881,42881],"valid"],[[42882,42882],"mapped",[42883]],[[42883,42883],"valid"],[[42884,42884],"mapped",[42885]],[[42885,42885],"valid"],[[42886,42886],"mapped",[42887]],[[42887,42888],"valid"],[[42889,42890],"valid",[],"NV8"],[[42891,42891],"mapped",[42892]],[[42892,42892],"valid"],[[42893,42893],"mapped",[613]],[[42894,42894],"valid"],[[42895,42895],"valid"],[[42896,42896],"mapped",[42897]],[[42897,42897],"valid"],[[42898,42898],"mapped",[42899]],[[42899,42899],"valid"],[[42900,42901],"valid"],[[42902,42902],"mapped",[42903]],[[42903,42903],"valid"],[[42904,42904],"mapped",[42905]],[[42905,42905],"valid"],[[42906,42906],"mapped",[42907]],[[42907,42907],"valid"],[[42908,42908],"mapped",[42909]],[[42909,42909],"valid"],[[42910,42910],"mapped",[42911]],[[42911,42911],"valid"],[[42912,42912],"mapped",[42913]],[[42913,42913],"valid"],[[42914,42914],"mapped",[42915]],[[42915,42915],"valid"],[[42916,42916],"mapped",[42917]],[[42917,42917],"valid"],[[42918,42918],"mapped",[42919]],[[42919,42919],"valid"],[[42920,42920],"mapped",[42921]],[[42921,42921],"valid"],[[42922,42922],"mapped",[614]],[[42923,42923],"mapped",[604]],[[42924,42924],"mapped",[609]],[[42925,42925],"mapped",[620]],[[42926,42927],"disallowed"],[[42928,42928],"mapped",[670]],[[42929,42929],"mapped",[647]],[[42930,42930],"mapped",[669]],[[42931,42931],"mapped",[43859]],[[42932,42932],"mapped",[42933]],[[42933,42933],"valid"],[[42934,42934],"mapped",[42935]],[[42935,42935],"valid"],[[42936,42998],"disallowed"],[[42999,42999],"valid"],[[43000,43000],"mapped",[295]],[[43001,43001],"mapped",[339]],[[43002,43002],"valid"],[[43003,43007],"valid"],[[43008,43047],"valid"],[[43048,43051],"valid",[],"NV8"],[[43052,43055],"disallowed"],[[43056,43065],"valid",[],"NV8"],[[43066,43071],"disallowed"],[[43072,43123],"valid"],[[43124,43127],"valid",[],"NV8"],[[43128,43135],"disallowed"],[[43136,43204],"valid"],[[43205,43213],"disallowed"],[[43214,43215],"valid",[],"NV8"],[[43216,43225],"valid"],[[43226,43231],"disallowed"],[[43232,43255],"valid"],[[43256,43258],"valid",[],"NV8"],[[43259,43259],"valid"],[[43260,43260],"valid",[],"NV8"],[[43261,43261],"valid"],[[43262,43263],"disallowed"],[[43264,43309],"valid"],[[43310,43311],"valid",[],"NV8"],[[43312,43347],"valid"],[[43348,43358],"disallowed"],[[43359,43359],"valid",[],"NV8"],[[43360,43388],"valid",[],"NV8"],[[43389,43391],"disallowed"],[[43392,43456],"valid"],[[43457,43469],"valid",[],"NV8"],[[43470,43470],"disallowed"],[[43471,43481],"valid"],[[43482,43485],"disallowed"],[[43486,43487],"valid",[],"NV8"],[[43488,43518],"valid"],[[43519,43519],"disallowed"],[[43520,43574],"valid"],[[43575,43583],"disallowed"],[[43584,43597],"valid"],[[43598,43599],"disallowed"],[[43600,43609],"valid"],[[43610,43611],"disallowed"],[[43612,43615],"valid",[],"NV8"],[[43616,43638],"valid"],[[43639,43641],"valid",[],"NV8"],[[43642,43643],"valid"],[[43644,43647],"valid"],[[43648,43714],"valid"],[[43715,43738],"disallowed"],[[43739,43741],"valid"],[[43742,43743],"valid",[],"NV8"],[[43744,43759],"valid"],[[43760,43761],"valid",[],"NV8"],[[43762,43766],"valid"],[[43767,43776],"disallowed"],[[43777,43782],"valid"],[[43783,43784],"disallowed"],[[43785,43790],"valid"],[[43791,43792],"disallowed"],[[43793,43798],"valid"],[[43799,43807],"disallowed"],[[43808,43814],"valid"],[[43815,43815],"disallowed"],[[43816,43822],"valid"],[[43823,43823],"disallowed"],[[43824,43866],"valid"],[[43867,43867],"valid",[],"NV8"],[[43868,43868],"mapped",[42791]],[[43869,43869],"mapped",[43831]],[[43870,43870],"mapped",[619]],[[43871,43871],"mapped",[43858]],[[43872,43875],"valid"],[[43876,43877],"valid"],[[43878,43887],"disallowed"],[[43888,43888],"mapped",[5024]],[[43889,43889],"mapped",[5025]],[[43890,43890],"mapped",[5026]],[[43891,43891],"mapped",[5027]],[[43892,43892],"mapped",[5028]],[[43893,43893],"mapped",[5029]],[[43894,43894],"mapped",[5030]],[[43895,43895],"mapped",[5031]],[[43896,43896],"mapped",[5032]],[[43897,43897],"mapped",[5033]],[[43898,43898],"mapped",[5034]],[[43899,43899],"mapped",[5035]],[[43900,43900],"mapped",[5036]],[[43901,43901],"mapped",[5037]],[[43902,43902],"mapped",[5038]],[[43903,43903],"mapped",[5039]],[[43904,43904],"mapped",[5040]],[[43905,43905],"mapped",[5041]],[[43906,43906],"mapped",[5042]],[[43907,43907],"mapped",[5043]],[[43908,43908],"mapped",[5044]],[[43909,43909],"mapped",[5045]],[[43910,43910],"mapped",[5046]],[[43911,43911],"mapped",[5047]],[[43912,43912],"mapped",[5048]],[[43913,43913],"mapped",[5049]],[[43914,43914],"mapped",[5050]],[[43915,43915],"mapped",[5051]],[[43916,43916],"mapped",[5052]],[[43917,43917],"mapped",[5053]],[[43918,43918],"mapped",[5054]],[[43919,43919],"mapped",[5055]],[[43920,43920],"mapped",[5056]],[[43921,43921],"mapped",[5057]],[[43922,43922],"mapped",[5058]],[[43923,43923],"mapped",[5059]],[[43924,43924],"mapped",[5060]],[[43925,43925],"mapped",[5061]],[[43926,43926],"mapped",[5062]],[[43927,43927],"mapped",[5063]],[[43928,43928],"mapped",[5064]],[[43929,43929],"mapped",[5065]],[[43930,43930],"mapped",[5066]],[[43931,43931],"mapped",[5067]],[[43932,43932],"mapped",[5068]],[[43933,43933],"mapped",[5069]],[[43934,43934],"mapped",[5070]],[[43935,43935],"mapped",[5071]],[[43936,43936],"mapped",[5072]],[[43937,43937],"mapped",[5073]],[[43938,43938],"mapped",[5074]],[[43939,43939],"mapped",[5075]],[[43940,43940],"mapped",[5076]],[[43941,43941],"mapped",[5077]],[[43942,43942],"mapped",[5078]],[[43943,43943],"mapped",[5079]],[[43944,43944],"mapped",[5080]],[[43945,43945],"mapped",[5081]],[[43946,43946],"mapped",[5082]],[[43947,43947],"mapped",[5083]],[[43948,43948],"mapped",[5084]],[[43949,43949],"mapped",[5085]],[[43950,43950],"mapped",[5086]],[[43951,43951],"mapped",[5087]],[[43952,43952],"mapped",[5088]],[[43953,43953],"mapped",[5089]],[[43954,43954],"mapped",[5090]],[[43955,43955],"mapped",[5091]],[[43956,43956],"mapped",[5092]],[[43957,43957],"mapped",[5093]],[[43958,43958],"mapped",[5094]],[[43959,43959],"mapped",[5095]],[[43960,43960],"mapped",[5096]],[[43961,43961],"mapped",[5097]],[[43962,43962],"mapped",[5098]],[[43963,43963],"mapped",[5099]],[[43964,43964],"mapped",[5100]],[[43965,43965],"mapped",[5101]],[[43966,43966],"mapped",[5102]],[[43967,43967],"mapped",[5103]],[[43968,44010],"valid"],[[44011,44011],"valid",[],"NV8"],[[44012,44013],"valid"],[[44014,44015],"disallowed"],[[44016,44025],"valid"],[[44026,44031],"disallowed"],[[44032,55203],"valid"],[[55204,55215],"disallowed"],[[55216,55238],"valid",[],"NV8"],[[55239,55242],"disallowed"],[[55243,55291],"valid",[],"NV8"],[[55292,55295],"disallowed"],[[55296,57343],"disallowed"],[[57344,63743],"disallowed"],[[63744,63744],"mapped",[35912]],[[63745,63745],"mapped",[26356]],[[63746,63746],"mapped",[36554]],[[63747,63747],"mapped",[36040]],[[63748,63748],"mapped",[28369]],[[63749,63749],"mapped",[20018]],[[63750,63750],"mapped",[21477]],[[63751,63752],"mapped",[40860]],[[63753,63753],"mapped",[22865]],[[63754,63754],"mapped",[37329]],[[63755,63755],"mapped",[21895]],[[63756,63756],"mapped",[22856]],[[63757,63757],"mapped",[25078]],[[63758,63758],"mapped",[30313]],[[63759,63759],"mapped",[32645]],[[63760,63760],"mapped",[34367]],[[63761,63761],"mapped",[34746]],[[63762,63762],"mapped",[35064]],[[63763,63763],"mapped",[37007]],[[63764,63764],"mapped",[27138]],[[63765,63765],"mapped",[27931]],[[63766,63766],"mapped",[28889]],[[63767,63767],"mapped",[29662]],[[63768,63768],"mapped",[33853]],[[63769,63769],"mapped",[37226]],[[63770,63770],"mapped",[39409]],[[63771,63771],"mapped",[20098]],[[63772,63772],"mapped",[21365]],[[63773,63773],"mapped",[27396]],[[63774,63774],"mapped",[29211]],[[63775,63775],"mapped",[34349]],[[63776,63776],"mapped",[40478]],[[63777,63777],"mapped",[23888]],[[63778,63778],"mapped",[28651]],[[63779,63779],"mapped",[34253]],[[63780,63780],"mapped",[35172]],[[63781,63781],"mapped",[25289]],[[63782,63782],"mapped",[33240]],[[63783,63783],"mapped",[34847]],[[63784,63784],"mapped",[24266]],[[63785,63785],"mapped",[26391]],[[63786,63786],"mapped",[28010]],[[63787,63787],"mapped",[29436]],[[63788,63788],"mapped",[37070]],[[63789,63789],"mapped",[20358]],[[63790,63790],"mapped",[20919]],[[63791,63791],"mapped",[21214]],[[63792,63792],"mapped",[25796]],[[63793,63793],"mapped",[27347]],[[63794,63794],"mapped",[29200]],[[63795,63795],"mapped",[30439]],[[63796,63796],"mapped",[32769]],[[63797,63797],"mapped",[34310]],[[63798,63798],"mapped",[34396]],[[63799,63799],"mapped",[36335]],[[63800,63800],"mapped",[38706]],[[63801,63801],"mapped",[39791]],[[63802,63802],"mapped",[40442]],[[63803,63803],"mapped",[30860]],[[63804,63804],"mapped",[31103]],[[63805,63805],"mapped",[32160]],[[63806,63806],"mapped",[33737]],[[63807,63807],"mapped",[37636]],[[63808,63808],"mapped",[40575]],[[63809,63809],"mapped",[35542]],[[63810,63810],"mapped",[22751]],[[63811,63811],"mapped",[24324]],[[63812,63812],"mapped",[31840]],[[63813,63813],"mapped",[32894]],[[63814,63814],"mapped",[29282]],[[63815,63815],"mapped",[30922]],[[63816,63816],"mapped",[36034]],[[63817,63817],"mapped",[38647]],[[63818,63818],"mapped",[22744]],[[63819,63819],"mapped",[23650]],[[63820,63820],"mapped",[27155]],[[63821,63821],"mapped",[28122]],[[63822,63822],"mapped",[28431]],[[63823,63823],"mapped",[32047]],[[63824,63824],"mapped",[32311]],[[63825,63825],"mapped",[38475]],[[63826,63826],"mapped",[21202]],[[63827,63827],"mapped",[32907]],[[63828,63828],"mapped",[20956]],[[63829,63829],"mapped",[20940]],[[63830,63830],"mapped",[31260]],[[63831,63831],"mapped",[32190]],[[63832,63832],"mapped",[33777]],[[63833,63833],"mapped",[38517]],[[63834,63834],"mapped",[35712]],[[63835,63835],"mapped",[25295]],[[63836,63836],"mapped",[27138]],[[63837,63837],"mapped",[35582]],[[63838,63838],"mapped",[20025]],[[63839,63839],"mapped",[23527]],[[63840,63840],"mapped",[24594]],[[63841,63841],"mapped",[29575]],[[63842,63842],"mapped",[30064]],[[63843,63843],"mapped",[21271]],[[63844,63844],"mapped",[30971]],[[63845,63845],"mapped",[20415]],[[63846,63846],"mapped",[24489]],[[63847,63847],"mapped",[19981]],[[63848,63848],"mapped",[27852]],[[63849,63849],"mapped",[25976]],[[63850,63850],"mapped",[32034]],[[63851,63851],"mapped",[21443]],[[63852,63852],"mapped",[22622]],[[63853,63853],"mapped",[30465]],[[63854,63854],"mapped",[33865]],[[63855,63855],"mapped",[35498]],[[63856,63856],"mapped",[27578]],[[63857,63857],"mapped",[36784]],[[63858,63858],"mapped",[27784]],[[63859,63859],"mapped",[25342]],[[63860,63860],"mapped",[33509]],[[63861,63861],"mapped",[25504]],[[63862,63862],"mapped",[30053]],[[63863,63863],"mapped",[20142]],[[63864,63864],"mapped",[20841]],[[63865,63865],"mapped",[20937]],[[63866,63866],"mapped",[26753]],[[63867,63867],"mapped",[31975]],[[63868,63868],"mapped",[33391]],[[63869,63869],"mapped",[35538]],[[63870,63870],"mapped",[37327]],[[63871,63871],"mapped",[21237]],[[63872,63872],"mapped",[21570]],[[63873,63873],"mapped",[22899]],[[63874,63874],"mapped",[24300]],[[63875,63875],"mapped",[26053]],[[63876,63876],"mapped",[28670]],[[63877,63877],"mapped",[31018]],[[63878,63878],"mapped",[38317]],[[63879,63879],"mapped",[39530]],[[63880,63880],"mapped",[40599]],[[63881,63881],"mapped",[40654]],[[63882,63882],"mapped",[21147]],[[63883,63883],"mapped",[26310]],[[63884,63884],"mapped",[27511]],[[63885,63885],"mapped",[36706]],[[63886,63886],"mapped",[24180]],[[63887,63887],"mapped",[24976]],[[63888,63888],"mapped",[25088]],[[63889,63889],"mapped",[25754]],[[63890,63890],"mapped",[28451]],[[63891,63891],"mapped",[29001]],[[63892,63892],"mapped",[29833]],[[63893,63893],"mapped",[31178]],[[63894,63894],"mapped",[32244]],[[63895,63895],"mapped",[32879]],[[63896,63896],"mapped",[36646]],[[63897,63897],"mapped",[34030]],[[63898,63898],"mapped",[36899]],[[63899,63899],"mapped",[37706]],[[63900,63900],"mapped",[21015]],[[63901,63901],"mapped",[21155]],[[63902,63902],"mapped",[21693]],[[63903,63903],"mapped",[28872]],[[63904,63904],"mapped",[35010]],[[63905,63905],"mapped",[35498]],[[63906,63906],"mapped",[24265]],[[63907,63907],"mapped",[24565]],[[63908,63908],"mapped",[25467]],[[63909,63909],"mapped",[27566]],[[63910,63910],"mapped",[31806]],[[63911,63911],"mapped",[29557]],[[63912,63912],"mapped",[20196]],[[63913,63913],"mapped",[22265]],[[63914,63914],"mapped",[23527]],[[63915,63915],"mapped",[23994]],[[63916,63916],"mapped",[24604]],[[63917,63917],"mapped",[29618]],[[63918,63918],"mapped",[29801]],[[63919,63919],"mapped",[32666]],[[63920,63920],"mapped",[32838]],[[63921,63921],"mapped",[37428]],[[63922,63922],"mapped",[38646]],[[63923,63923],"mapped",[38728]],[[63924,63924],"mapped",[38936]],[[63925,63925],"mapped",[20363]],[[63926,63926],"mapped",[31150]],[[63927,63927],"mapped",[37300]],[[63928,63928],"mapped",[38584]],[[63929,63929],"mapped",[24801]],[[63930,63930],"mapped",[20102]],[[63931,63931],"mapped",[20698]],[[63932,63932],"mapped",[23534]],[[63933,63933],"mapped",[23615]],[[63934,63934],"mapped",[26009]],[[63935,63935],"mapped",[27138]],[[63936,63936],"mapped",[29134]],[[63937,63937],"mapped",[30274]],[[63938,63938],"mapped",[34044]],[[63939,63939],"mapped",[36988]],[[63940,63940],"mapped",[40845]],[[63941,63941],"mapped",[26248]],[[63942,63942],"mapped",[38446]],[[63943,63943],"mapped",[21129]],[[63944,63944],"mapped",[26491]],[[63945,63945],"mapped",[26611]],[[63946,63946],"mapped",[27969]],[[63947,63947],"mapped",[28316]],[[63948,63948],"mapped",[29705]],[[63949,63949],"mapped",[30041]],[[63950,63950],"mapped",[30827]],[[63951,63951],"mapped",[32016]],[[63952,63952],"mapped",[39006]],[[63953,63953],"mapped",[20845]],[[63954,63954],"mapped",[25134]],[[63955,63955],"mapped",[38520]],[[63956,63956],"mapped",[20523]],[[63957,63957],"mapped",[23833]],[[63958,63958],"mapped",[28138]],[[63959,63959],"mapped",[36650]],[[63960,63960],"mapped",[24459]],[[63961,63961],"mapped",[24900]],[[63962,63962],"mapped",[26647]],[[63963,63963],"mapped",[29575]],[[63964,63964],"mapped",[38534]],[[63965,63965],"mapped",[21033]],[[63966,63966],"mapped",[21519]],[[63967,63967],"mapped",[23653]],[[63968,63968],"mapped",[26131]],[[63969,63969],"mapped",[26446]],[[63970,63970],"mapped",[26792]],[[63971,63971],"mapped",[27877]],[[63972,63972],"mapped",[29702]],[[63973,63973],"mapped",[30178]],[[63974,63974],"mapped",[32633]],[[63975,63975],"mapped",[35023]],[[63976,63976],"mapped",[35041]],[[63977,63977],"mapped",[37324]],[[63978,63978],"mapped",[38626]],[[63979,63979],"mapped",[21311]],[[63980,63980],"mapped",[28346]],[[63981,63981],"mapped",[21533]],[[63982,63982],"mapped",[29136]],[[63983,63983],"mapped",[29848]],[[63984,63984],"mapped",[34298]],[[63985,63985],"mapped",[38563]],[[63986,63986],"mapped",[40023]],[[63987,63987],"mapped",[40607]],[[63988,63988],"mapped",[26519]],[[63989,63989],"mapped",[28107]],[[63990,63990],"mapped",[33256]],[[63991,63991],"mapped",[31435]],[[63992,63992],"mapped",[31520]],[[63993,63993],"mapped",[31890]],[[63994,63994],"mapped",[29376]],[[63995,63995],"mapped",[28825]],[[63996,63996],"mapped",[35672]],[[63997,63997],"mapped",[20160]],[[63998,63998],"mapped",[33590]],[[63999,63999],"mapped",[21050]],[[64000,64000],"mapped",[20999]],[[64001,64001],"mapped",[24230]],[[64002,64002],"mapped",[25299]],[[64003,64003],"mapped",[31958]],[[64004,64004],"mapped",[23429]],[[64005,64005],"mapped",[27934]],[[64006,64006],"mapped",[26292]],[[64007,64007],"mapped",[36667]],[[64008,64008],"mapped",[34892]],[[64009,64009],"mapped",[38477]],[[64010,64010],"mapped",[35211]],[[64011,64011],"mapped",[24275]],[[64012,64012],"mapped",[20800]],[[64013,64013],"mapped",[21952]],[[64014,64015],"valid"],[[64016,64016],"mapped",[22618]],[[64017,64017],"valid"],[[64018,64018],"mapped",[26228]],[[64019,64020],"valid"],[[64021,64021],"mapped",[20958]],[[64022,64022],"mapped",[29482]],[[64023,64023],"mapped",[30410]],[[64024,64024],"mapped",[31036]],[[64025,64025],"mapped",[31070]],[[64026,64026],"mapped",[31077]],[[64027,64027],"mapped",[31119]],[[64028,64028],"mapped",[38742]],[[64029,64029],"mapped",[31934]],[[64030,64030],"mapped",[32701]],[[64031,64031],"valid"],[[64032,64032],"mapped",[34322]],[[64033,64033],"valid"],[[64034,64034],"mapped",[35576]],[[64035,64036],"valid"],[[64037,64037],"mapped",[36920]],[[64038,64038],"mapped",[37117]],[[64039,64041],"valid"],[[64042,64042],"mapped",[39151]],[[64043,64043],"mapped",[39164]],[[64044,64044],"mapped",[39208]],[[64045,64045],"mapped",[40372]],[[64046,64046],"mapped",[37086]],[[64047,64047],"mapped",[38583]],[[64048,64048],"mapped",[20398]],[[64049,64049],"mapped",[20711]],[[64050,64050],"mapped",[20813]],[[64051,64051],"mapped",[21193]],[[64052,64052],"mapped",[21220]],[[64053,64053],"mapped",[21329]],[[64054,64054],"mapped",[21917]],[[64055,64055],"mapped",[22022]],[[64056,64056],"mapped",[22120]],[[64057,64057],"mapped",[22592]],[[64058,64058],"mapped",[22696]],[[64059,64059],"mapped",[23652]],[[64060,64060],"mapped",[23662]],[[64061,64061],"mapped",[24724]],[[64062,64062],"mapped",[24936]],[[64063,64063],"mapped",[24974]],[[64064,64064],"mapped",[25074]],[[64065,64065],"mapped",[25935]],[[64066,64066],"mapped",[26082]],[[64067,64067],"mapped",[26257]],[[64068,64068],"mapped",[26757]],[[64069,64069],"mapped",[28023]],[[64070,64070],"mapped",[28186]],[[64071,64071],"mapped",[28450]],[[64072,64072],"mapped",[29038]],[[64073,64073],"mapped",[29227]],[[64074,64074],"mapped",[29730]],[[64075,64075],"mapped",[30865]],[[64076,64076],"mapped",[31038]],[[64077,64077],"mapped",[31049]],[[64078,64078],"mapped",[31048]],[[64079,64079],"mapped",[31056]],[[64080,64080],"mapped",[31062]],[[64081,64081],"mapped",[31069]],[[64082,64082],"mapped",[31117]],[[64083,64083],"mapped",[31118]],[[64084,64084],"mapped",[31296]],[[64085,64085],"mapped",[31361]],[[64086,64086],"mapped",[31680]],[[64087,64087],"mapped",[32244]],[[64088,64088],"mapped",[32265]],[[64089,64089],"mapped",[32321]],[[64090,64090],"mapped",[32626]],[[64091,64091],"mapped",[32773]],[[64092,64092],"mapped",[33261]],[[64093,64094],"mapped",[33401]],[[64095,64095],"mapped",[33879]],[[64096,64096],"mapped",[35088]],[[64097,64097],"mapped",[35222]],[[64098,64098],"mapped",[35585]],[[64099,64099],"mapped",[35641]],[[64100,64100],"mapped",[36051]],[[64101,64101],"mapped",[36104]],[[64102,64102],"mapped",[36790]],[[64103,64103],"mapped",[36920]],[[64104,64104],"mapped",[38627]],[[64105,64105],"mapped",[38911]],[[64106,64106],"mapped",[38971]],[[64107,64107],"mapped",[24693]],[[64108,64108],"mapped",[148206]],[[64109,64109],"mapped",[33304]],[[64110,64111],"disallowed"],[[64112,64112],"mapped",[20006]],[[64113,64113],"mapped",[20917]],[[64114,64114],"mapped",[20840]],[[64115,64115],"mapped",[20352]],[[64116,64116],"mapped",[20805]],[[64117,64117],"mapped",[20864]],[[64118,64118],"mapped",[21191]],[[64119,64119],"mapped",[21242]],[[64120,64120],"mapped",[21917]],[[64121,64121],"mapped",[21845]],[[64122,64122],"mapped",[21913]],[[64123,64123],"mapped",[21986]],[[64124,64124],"mapped",[22618]],[[64125,64125],"mapped",[22707]],[[64126,64126],"mapped",[22852]],[[64127,64127],"mapped",[22868]],[[64128,64128],"mapped",[23138]],[[64129,64129],"mapped",[23336]],[[64130,64130],"mapped",[24274]],[[64131,64131],"mapped",[24281]],[[64132,64132],"mapped",[24425]],[[64133,64133],"mapped",[24493]],[[64134,64134],"mapped",[24792]],[[64135,64135],"mapped",[24910]],[[64136,64136],"mapped",[24840]],[[64137,64137],"mapped",[24974]],[[64138,64138],"mapped",[24928]],[[64139,64139],"mapped",[25074]],[[64140,64140],"mapped",[25140]],[[64141,64141],"mapped",[25540]],[[64142,64142],"mapped",[25628]],[[64143,64143],"mapped",[25682]],[[64144,64144],"mapped",[25942]],[[64145,64145],"mapped",[26228]],[[64146,64146],"mapped",[26391]],[[64147,64147],"mapped",[26395]],[[64148,64148],"mapped",[26454]],[[64149,64149],"mapped",[27513]],[[64150,64150],"mapped",[27578]],[[64151,64151],"mapped",[27969]],[[64152,64152],"mapped",[28379]],[[64153,64153],"mapped",[28363]],[[64154,64154],"mapped",[28450]],[[64155,64155],"mapped",[28702]],[[64156,64156],"mapped",[29038]],[[64157,64157],"mapped",[30631]],[[64158,64158],"mapped",[29237]],[[64159,64159],"mapped",[29359]],[[64160,64160],"mapped",[29482]],[[64161,64161],"mapped",[29809]],[[64162,64162],"mapped",[29958]],[[64163,64163],"mapped",[30011]],[[64164,64164],"mapped",[30237]],[[64165,64165],"mapped",[30239]],[[64166,64166],"mapped",[30410]],[[64167,64167],"mapped",[30427]],[[64168,64168],"mapped",[30452]],[[64169,64169],"mapped",[30538]],[[64170,64170],"mapped",[30528]],[[64171,64171],"mapped",[30924]],[[64172,64172],"mapped",[31409]],[[64173,64173],"mapped",[31680]],[[64174,64174],"mapped",[31867]],[[64175,64175],"mapped",[32091]],[[64176,64176],"mapped",[32244]],[[64177,64177],"mapped",[32574]],[[64178,64178],"mapped",[32773]],[[64179,64179],"mapped",[33618]],[[64180,64180],"mapped",[33775]],[[64181,64181],"mapped",[34681]],[[64182,64182],"mapped",[35137]],[[64183,64183],"mapped",[35206]],[[64184,64184],"mapped",[35222]],[[64185,64185],"mapped",[35519]],[[64186,64186],"mapped",[35576]],[[64187,64187],"mapped",[35531]],[[64188,64188],"mapped",[35585]],[[64189,64189],"mapped",[35582]],[[64190,64190],"mapped",[35565]],[[64191,64191],"mapped",[35641]],[[64192,64192],"mapped",[35722]],[[64193,64193],"mapped",[36104]],[[64194,64194],"mapped",[36664]],[[64195,64195],"mapped",[36978]],[[64196,64196],"mapped",[37273]],[[64197,64197],"mapped",[37494]],[[64198,64198],"mapped",[38524]],[[64199,64199],"mapped",[38627]],[[64200,64200],"mapped",[38742]],[[64201,64201],"mapped",[38875]],[[64202,64202],"mapped",[38911]],[[64203,64203],"mapped",[38923]],[[64204,64204],"mapped",[38971]],[[64205,64205],"mapped",[39698]],[[64206,64206],"mapped",[40860]],[[64207,64207],"mapped",[141386]],[[64208,64208],"mapped",[141380]],[[64209,64209],"mapped",[144341]],[[64210,64210],"mapped",[15261]],[[64211,64211],"mapped",[16408]],[[64212,64212],"mapped",[16441]],[[64213,64213],"mapped",[152137]],[[64214,64214],"mapped",[154832]],[[64215,64215],"mapped",[163539]],[[64216,64216],"mapped",[40771]],[[64217,64217],"mapped",[40846]],[[64218,64255],"disallowed"],[[64256,64256],"mapped",[102,102]],[[64257,64257],"mapped",[102,105]],[[64258,64258],"mapped",[102,108]],[[64259,64259],"mapped",[102,102,105]],[[64260,64260],"mapped",[102,102,108]],[[64261,64262],"mapped",[115,116]],[[64263,64274],"disallowed"],[[64275,64275],"mapped",[1396,1398]],[[64276,64276],"mapped",[1396,1381]],[[64277,64277],"mapped",[1396,1387]],[[64278,64278],"mapped",[1406,1398]],[[64279,64279],"mapped",[1396,1389]],[[64280,64284],"disallowed"],[[64285,64285],"mapped",[1497,1460]],[[64286,64286],"valid"],[[64287,64287],"mapped",[1522,1463]],[[64288,64288],"mapped",[1506]],[[64289,64289],"mapped",[1488]],[[64290,64290],"mapped",[1491]],[[64291,64291],"mapped",[1492]],[[64292,64292],"mapped",[1499]],[[64293,64293],"mapped",[1500]],[[64294,64294],"mapped",[1501]],[[64295,64295],"mapped",[1512]],[[64296,64296],"mapped",[1514]],[[64297,64297],"disallowed_STD3_mapped",[43]],[[64298,64298],"mapped",[1513,1473]],[[64299,64299],"mapped",[1513,1474]],[[64300,64300],"mapped",[1513,1468,1473]],[[64301,64301],"mapped",[1513,1468,1474]],[[64302,64302],"mapped",[1488,1463]],[[64303,64303],"mapped",[1488,1464]],[[64304,64304],"mapped",[1488,1468]],[[64305,64305],"mapped",[1489,1468]],[[64306,64306],"mapped",[1490,1468]],[[64307,64307],"mapped",[1491,1468]],[[64308,64308],"mapped",[1492,1468]],[[64309,64309],"mapped",[1493,1468]],[[64310,64310],"mapped",[1494,1468]],[[64311,64311],"disallowed"],[[64312,64312],"mapped",[1496,1468]],[[64313,64313],"mapped",[1497,1468]],[[64314,64314],"mapped",[1498,1468]],[[64315,64315],"mapped",[1499,1468]],[[64316,64316],"mapped",[1500,1468]],[[64317,64317],"disallowed"],[[64318,64318],"mapped",[1502,1468]],[[64319,64319],"disallowed"],[[64320,64320],"mapped",[1504,1468]],[[64321,64321],"mapped",[1505,1468]],[[64322,64322],"disallowed"],[[64323,64323],"mapped",[1507,1468]],[[64324,64324],"mapped",[1508,1468]],[[64325,64325],"disallowed"],[[64326,64326],"mapped",[1510,1468]],[[64327,64327],"mapped",[1511,1468]],[[64328,64328],"mapped",[1512,1468]],[[64329,64329],"mapped",[1513,1468]],[[64330,64330],"mapped",[1514,1468]],[[64331,64331],"mapped",[1493,1465]],[[64332,64332],"mapped",[1489,1471]],[[64333,64333],"mapped",[1499,1471]],[[64334,64334],"mapped",[1508,1471]],[[64335,64335],"mapped",[1488,1500]],[[64336,64337],"mapped",[1649]],[[64338,64341],"mapped",[1659]],[[64342,64345],"mapped",[1662]],[[64346,64349],"mapped",[1664]],[[64350,64353],"mapped",[1658]],[[64354,64357],"mapped",[1663]],[[64358,64361],"mapped",[1657]],[[64362,64365],"mapped",[1700]],[[64366,64369],"mapped",[1702]],[[64370,64373],"mapped",[1668]],[[64374,64377],"mapped",[1667]],[[64378,64381],"mapped",[1670]],[[64382,64385],"mapped",[1671]],[[64386,64387],"mapped",[1677]],[[64388,64389],"mapped",[1676]],[[64390,64391],"mapped",[1678]],[[64392,64393],"mapped",[1672]],[[64394,64395],"mapped",[1688]],[[64396,64397],"mapped",[1681]],[[64398,64401],"mapped",[1705]],[[64402,64405],"mapped",[1711]],[[64406,64409],"mapped",[1715]],[[64410,64413],"mapped",[1713]],[[64414,64415],"mapped",[1722]],[[64416,64419],"mapped",[1723]],[[64420,64421],"mapped",[1728]],[[64422,64425],"mapped",[1729]],[[64426,64429],"mapped",[1726]],[[64430,64431],"mapped",[1746]],[[64432,64433],"mapped",[1747]],[[64434,64449],"valid",[],"NV8"],[[64450,64466],"disallowed"],[[64467,64470],"mapped",[1709]],[[64471,64472],"mapped",[1735]],[[64473,64474],"mapped",[1734]],[[64475,64476],"mapped",[1736]],[[64477,64477],"mapped",[1735,1652]],[[64478,64479],"mapped",[1739]],[[64480,64481],"mapped",[1733]],[[64482,64483],"mapped",[1737]],[[64484,64487],"mapped",[1744]],[[64488,64489],"mapped",[1609]],[[64490,64491],"mapped",[1574,1575]],[[64492,64493],"mapped",[1574,1749]],[[64494,64495],"mapped",[1574,1608]],[[64496,64497],"mapped",[1574,1735]],[[64498,64499],"mapped",[1574,1734]],[[64500,64501],"mapped",[1574,1736]],[[64502,64504],"mapped",[1574,1744]],[[64505,64507],"mapped",[1574,1609]],[[64508,64511],"mapped",[1740]],[[64512,64512],"mapped",[1574,1580]],[[64513,64513],"mapped",[1574,1581]],[[64514,64514],"mapped",[1574,1605]],[[64515,64515],"mapped",[1574,1609]],[[64516,64516],"mapped",[1574,1610]],[[64517,64517],"mapped",[1576,1580]],[[64518,64518],"mapped",[1576,1581]],[[64519,64519],"mapped",[1576,1582]],[[64520,64520],"mapped",[1576,1605]],[[64521,64521],"mapped",[1576,1609]],[[64522,64522],"mapped",[1576,1610]],[[64523,64523],"mapped",[1578,1580]],[[64524,64524],"mapped",[1578,1581]],[[64525,64525],"mapped",[1578,1582]],[[64526,64526],"mapped",[1578,1605]],[[64527,64527],"mapped",[1578,1609]],[[64528,64528],"mapped",[1578,1610]],[[64529,64529],"mapped",[1579,1580]],[[64530,64530],"mapped",[1579,1605]],[[64531,64531],"mapped",[1579,1609]],[[64532,64532],"mapped",[1579,1610]],[[64533,64533],"mapped",[1580,1581]],[[64534,64534],"mapped",[1580,1605]],[[64535,64535],"mapped",[1581,1580]],[[64536,64536],"mapped",[1581,1605]],[[64537,64537],"mapped",[1582,1580]],[[64538,64538],"mapped",[1582,1581]],[[64539,64539],"mapped",[1582,1605]],[[64540,64540],"mapped",[1587,1580]],[[64541,64541],"mapped",[1587,1581]],[[64542,64542],"mapped",[1587,1582]],[[64543,64543],"mapped",[1587,1605]],[[64544,64544],"mapped",[1589,1581]],[[64545,64545],"mapped",[1589,1605]],[[64546,64546],"mapped",[1590,1580]],[[64547,64547],"mapped",[1590,1581]],[[64548,64548],"mapped",[1590,1582]],[[64549,64549],"mapped",[1590,1605]],[[64550,64550],"mapped",[1591,1581]],[[64551,64551],"mapped",[1591,1605]],[[64552,64552],"mapped",[1592,1605]],[[64553,64553],"mapped",[1593,1580]],[[64554,64554],"mapped",[1593,1605]],[[64555,64555],"mapped",[1594,1580]],[[64556,64556],"mapped",[1594,1605]],[[64557,64557],"mapped",[1601,1580]],[[64558,64558],"mapped",[1601,1581]],[[64559,64559],"mapped",[1601,1582]],[[64560,64560],"mapped",[1601,1605]],[[64561,64561],"mapped",[1601,1609]],[[64562,64562],"mapped",[1601,1610]],[[64563,64563],"mapped",[1602,1581]],[[64564,64564],"mapped",[1602,1605]],[[64565,64565],"mapped",[1602,1609]],[[64566,64566],"mapped",[1602,1610]],[[64567,64567],"mapped",[1603,1575]],[[64568,64568],"mapped",[1603,1580]],[[64569,64569],"mapped",[1603,1581]],[[64570,64570],"mapped",[1603,1582]],[[64571,64571],"mapped",[1603,1604]],[[64572,64572],"mapped",[1603,1605]],[[64573,64573],"mapped",[1603,1609]],[[64574,64574],"mapped",[1603,1610]],[[64575,64575],"mapped",[1604,1580]],[[64576,64576],"mapped",[1604,1581]],[[64577,64577],"mapped",[1604,1582]],[[64578,64578],"mapped",[1604,1605]],[[64579,64579],"mapped",[1604,1609]],[[64580,64580],"mapped",[1604,1610]],[[64581,64581],"mapped",[1605,1580]],[[64582,64582],"mapped",[1605,1581]],[[64583,64583],"mapped",[1605,1582]],[[64584,64584],"mapped",[1605,1605]],[[64585,64585],"mapped",[1605,1609]],[[64586,64586],"mapped",[1605,1610]],[[64587,64587],"mapped",[1606,1580]],[[64588,64588],"mapped",[1606,1581]],[[64589,64589],"mapped",[1606,1582]],[[64590,64590],"mapped",[1606,1605]],[[64591,64591],"mapped",[1606,1609]],[[64592,64592],"mapped",[1606,1610]],[[64593,64593],"mapped",[1607,1580]],[[64594,64594],"mapped",[1607,1605]],[[64595,64595],"mapped",[1607,1609]],[[64596,64596],"mapped",[1607,1610]],[[64597,64597],"mapped",[1610,1580]],[[64598,64598],"mapped",[1610,1581]],[[64599,64599],"mapped",[1610,1582]],[[64600,64600],"mapped",[1610,1605]],[[64601,64601],"mapped",[1610,1609]],[[64602,64602],"mapped",[1610,1610]],[[64603,64603],"mapped",[1584,1648]],[[64604,64604],"mapped",[1585,1648]],[[64605,64605],"mapped",[1609,1648]],[[64606,64606],"disallowed_STD3_mapped",[32,1612,1617]],[[64607,64607],"disallowed_STD3_mapped",[32,1613,1617]],[[64608,64608],"disallowed_STD3_mapped",[32,1614,1617]],[[64609,64609],"disallowed_STD3_mapped",[32,1615,1617]],[[64610,64610],"disallowed_STD3_mapped",[32,1616,1617]],[[64611,64611],"disallowed_STD3_mapped",[32,1617,1648]],[[64612,64612],"mapped",[1574,1585]],[[64613,64613],"mapped",[1574,1586]],[[64614,64614],"mapped",[1574,1605]],[[64615,64615],"mapped",[1574,1606]],[[64616,64616],"mapped",[1574,1609]],[[64617,64617],"mapped",[1574,1610]],[[64618,64618],"mapped",[1576,1585]],[[64619,64619],"mapped",[1576,1586]],[[64620,64620],"mapped",[1576,1605]],[[64621,64621],"mapped",[1576,1606]],[[64622,64622],"mapped",[1576,1609]],[[64623,64623],"mapped",[1576,1610]],[[64624,64624],"mapped",[1578,1585]],[[64625,64625],"mapped",[1578,1586]],[[64626,64626],"mapped",[1578,1605]],[[64627,64627],"mapped",[1578,1606]],[[64628,64628],"mapped",[1578,1609]],[[64629,64629],"mapped",[1578,1610]],[[64630,64630],"mapped",[1579,1585]],[[64631,64631],"mapped",[1579,1586]],[[64632,64632],"mapped",[1579,1605]],[[64633,64633],"mapped",[1579,1606]],[[64634,64634],"mapped",[1579,1609]],[[64635,64635],"mapped",[1579,1610]],[[64636,64636],"mapped",[1601,1609]],[[64637,64637],"mapped",[1601,1610]],[[64638,64638],"mapped",[1602,1609]],[[64639,64639],"mapped",[1602,1610]],[[64640,64640],"mapped",[1603,1575]],[[64641,64641],"mapped",[1603,1604]],[[64642,64642],"mapped",[1603,1605]],[[64643,64643],"mapped",[1603,1609]],[[64644,64644],"mapped",[1603,1610]],[[64645,64645],"mapped",[1604,1605]],[[64646,64646],"mapped",[1604,1609]],[[64647,64647],"mapped",[1604,1610]],[[64648,64648],"mapped",[1605,1575]],[[64649,64649],"mapped",[1605,1605]],[[64650,64650],"mapped",[1606,1585]],[[64651,64651],"mapped",[1606,1586]],[[64652,64652],"mapped",[1606,1605]],[[64653,64653],"mapped",[1606,1606]],[[64654,64654],"mapped",[1606,1609]],[[64655,64655],"mapped",[1606,1610]],[[64656,64656],"mapped",[1609,1648]],[[64657,64657],"mapped",[1610,1585]],[[64658,64658],"mapped",[1610,1586]],[[64659,64659],"mapped",[1610,1605]],[[64660,64660],"mapped",[1610,1606]],[[64661,64661],"mapped",[1610,1609]],[[64662,64662],"mapped",[1610,1610]],[[64663,64663],"mapped",[1574,1580]],[[64664,64664],"mapped",[1574,1581]],[[64665,64665],"mapped",[1574,1582]],[[64666,64666],"mapped",[1574,1605]],[[64667,64667],"mapped",[1574,1607]],[[64668,64668],"mapped",[1576,1580]],[[64669,64669],"mapped",[1576,1581]],[[64670,64670],"mapped",[1576,1582]],[[64671,64671],"mapped",[1576,1605]],[[64672,64672],"mapped",[1576,1607]],[[64673,64673],"mapped",[1578,1580]],[[64674,64674],"mapped",[1578,1581]],[[64675,64675],"mapped",[1578,1582]],[[64676,64676],"mapped",[1578,1605]],[[64677,64677],"mapped",[1578,1607]],[[64678,64678],"mapped",[1579,1605]],[[64679,64679],"mapped",[1580,1581]],[[64680,64680],"mapped",[1580,1605]],[[64681,64681],"mapped",[1581,1580]],[[64682,64682],"mapped",[1581,1605]],[[64683,64683],"mapped",[1582,1580]],[[64684,64684],"mapped",[1582,1605]],[[64685,64685],"mapped",[1587,1580]],[[64686,64686],"mapped",[1587,1581]],[[64687,64687],"mapped",[1587,1582]],[[64688,64688],"mapped",[1587,1605]],[[64689,64689],"mapped",[1589,1581]],[[64690,64690],"mapped",[1589,1582]],[[64691,64691],"mapped",[1589,1605]],[[64692,64692],"mapped",[1590,1580]],[[64693,64693],"mapped",[1590,1581]],[[64694,64694],"mapped",[1590,1582]],[[64695,64695],"mapped",[1590,1605]],[[64696,64696],"mapped",[1591,1581]],[[64697,64697],"mapped",[1592,1605]],[[64698,64698],"mapped",[1593,1580]],[[64699,64699],"mapped",[1593,1605]],[[64700,64700],"mapped",[1594,1580]],[[64701,64701],"mapped",[1594,1605]],[[64702,64702],"mapped",[1601,1580]],[[64703,64703],"mapped",[1601,1581]],[[64704,64704],"mapped",[1601,1582]],[[64705,64705],"mapped",[1601,1605]],[[64706,64706],"mapped",[1602,1581]],[[64707,64707],"mapped",[1602,1605]],[[64708,64708],"mapped",[1603,1580]],[[64709,64709],"mapped",[1603,1581]],[[64710,64710],"mapped",[1603,1582]],[[64711,64711],"mapped",[1603,1604]],[[64712,64712],"mapped",[1603,1605]],[[64713,64713],"mapped",[1604,1580]],[[64714,64714],"mapped",[1604,1581]],[[64715,64715],"mapped",[1604,1582]],[[64716,64716],"mapped",[1604,1605]],[[64717,64717],"mapped",[1604,1607]],[[64718,64718],"mapped",[1605,1580]],[[64719,64719],"mapped",[1605,1581]],[[64720,64720],"mapped",[1605,1582]],[[64721,64721],"mapped",[1605,1605]],[[64722,64722],"mapped",[1606,1580]],[[64723,64723],"mapped",[1606,1581]],[[64724,64724],"mapped",[1606,1582]],[[64725,64725],"mapped",[1606,1605]],[[64726,64726],"mapped",[1606,1607]],[[64727,64727],"mapped",[1607,1580]],[[64728,64728],"mapped",[1607,1605]],[[64729,64729],"mapped",[1607,1648]],[[64730,64730],"mapped",[1610,1580]],[[64731,64731],"mapped",[1610,1581]],[[64732,64732],"mapped",[1610,1582]],[[64733,64733],"mapped",[1610,1605]],[[64734,64734],"mapped",[1610,1607]],[[64735,64735],"mapped",[1574,1605]],[[64736,64736],"mapped",[1574,1607]],[[64737,64737],"mapped",[1576,1605]],[[64738,64738],"mapped",[1576,1607]],[[64739,64739],"mapped",[1578,1605]],[[64740,64740],"mapped",[1578,1607]],[[64741,64741],"mapped",[1579,1605]],[[64742,64742],"mapped",[1579,1607]],[[64743,64743],"mapped",[1587,1605]],[[64744,64744],"mapped",[1587,1607]],[[64745,64745],"mapped",[1588,1605]],[[64746,64746],"mapped",[1588,1607]],[[64747,64747],"mapped",[1603,1604]],[[64748,64748],"mapped",[1603,1605]],[[64749,64749],"mapped",[1604,1605]],[[64750,64750],"mapped",[1606,1605]],[[64751,64751],"mapped",[1606,1607]],[[64752,64752],"mapped",[1610,1605]],[[64753,64753],"mapped",[1610,1607]],[[64754,64754],"mapped",[1600,1614,1617]],[[64755,64755],"mapped",[1600,1615,1617]],[[64756,64756],"mapped",[1600,1616,1617]],[[64757,64757],"mapped",[1591,1609]],[[64758,64758],"mapped",[1591,1610]],[[64759,64759],"mapped",[1593,1609]],[[64760,64760],"mapped",[1593,1610]],[[64761,64761],"mapped",[1594,1609]],[[64762,64762],"mapped",[1594,1610]],[[64763,64763],"mapped",[1587,1609]],[[64764,64764],"mapped",[1587,1610]],[[64765,64765],"mapped",[1588,1609]],[[64766,64766],"mapped",[1588,1610]],[[64767,64767],"mapped",[1581,1609]],[[64768,64768],"mapped",[1581,1610]],[[64769,64769],"mapped",[1580,1609]],[[64770,64770],"mapped",[1580,1610]],[[64771,64771],"mapped",[1582,1609]],[[64772,64772],"mapped",[1582,1610]],[[64773,64773],"mapped",[1589,1609]],[[64774,64774],"mapped",[1589,1610]],[[64775,64775],"mapped",[1590,1609]],[[64776,64776],"mapped",[1590,1610]],[[64777,64777],"mapped",[1588,1580]],[[64778,64778],"mapped",[1588,1581]],[[64779,64779],"mapped",[1588,1582]],[[64780,64780],"mapped",[1588,1605]],[[64781,64781],"mapped",[1588,1585]],[[64782,64782],"mapped",[1587,1585]],[[64783,64783],"mapped",[1589,1585]],[[64784,64784],"mapped",[1590,1585]],[[64785,64785],"mapped",[1591,1609]],[[64786,64786],"mapped",[1591,1610]],[[64787,64787],"mapped",[1593,1609]],[[64788,64788],"mapped",[1593,1610]],[[64789,64789],"mapped",[1594,1609]],[[64790,64790],"mapped",[1594,1610]],[[64791,64791],"mapped",[1587,1609]],[[64792,64792],"mapped",[1587,1610]],[[64793,64793],"mapped",[1588,1609]],[[64794,64794],"mapped",[1588,1610]],[[64795,64795],"mapped",[1581,1609]],[[64796,64796],"mapped",[1581,1610]],[[64797,64797],"mapped",[1580,1609]],[[64798,64798],"mapped",[1580,1610]],[[64799,64799],"mapped",[1582,1609]],[[64800,64800],"mapped",[1582,1610]],[[64801,64801],"mapped",[1589,1609]],[[64802,64802],"mapped",[1589,1610]],[[64803,64803],"mapped",[1590,1609]],[[64804,64804],"mapped",[1590,1610]],[[64805,64805],"mapped",[1588,1580]],[[64806,64806],"mapped",[1588,1581]],[[64807,64807],"mapped",[1588,1582]],[[64808,64808],"mapped",[1588,1605]],[[64809,64809],"mapped",[1588,1585]],[[64810,64810],"mapped",[1587,1585]],[[64811,64811],"mapped",[1589,1585]],[[64812,64812],"mapped",[1590,1585]],[[64813,64813],"mapped",[1588,1580]],[[64814,64814],"mapped",[1588,1581]],[[64815,64815],"mapped",[1588,1582]],[[64816,64816],"mapped",[1588,1605]],[[64817,64817],"mapped",[1587,1607]],[[64818,64818],"mapped",[1588,1607]],[[64819,64819],"mapped",[1591,1605]],[[64820,64820],"mapped",[1587,1580]],[[64821,64821],"mapped",[1587,1581]],[[64822,64822],"mapped",[1587,1582]],[[64823,64823],"mapped",[1588,1580]],[[64824,64824],"mapped",[1588,1581]],[[64825,64825],"mapped",[1588,1582]],[[64826,64826],"mapped",[1591,1605]],[[64827,64827],"mapped",[1592,1605]],[[64828,64829],"mapped",[1575,1611]],[[64830,64831],"valid",[],"NV8"],[[64832,64847],"disallowed"],[[64848,64848],"mapped",[1578,1580,1605]],[[64849,64850],"mapped",[1578,1581,1580]],[[64851,64851],"mapped",[1578,1581,1605]],[[64852,64852],"mapped",[1578,1582,1605]],[[64853,64853],"mapped",[1578,1605,1580]],[[64854,64854],"mapped",[1578,1605,1581]],[[64855,64855],"mapped",[1578,1605,1582]],[[64856,64857],"mapped",[1580,1605,1581]],[[64858,64858],"mapped",[1581,1605,1610]],[[64859,64859],"mapped",[1581,1605,1609]],[[64860,64860],"mapped",[1587,1581,1580]],[[64861,64861],"mapped",[1587,1580,1581]],[[64862,64862],"mapped",[1587,1580,1609]],[[64863,64864],"mapped",[1587,1605,1581]],[[64865,64865],"mapped",[1587,1605,1580]],[[64866,64867],"mapped",[1587,1605,1605]],[[64868,64869],"mapped",[1589,1581,1581]],[[64870,64870],"mapped",[1589,1605,1605]],[[64871,64872],"mapped",[1588,1581,1605]],[[64873,64873],"mapped",[1588,1580,1610]],[[64874,64875],"mapped",[1588,1605,1582]],[[64876,64877],"mapped",[1588,1605,1605]],[[64878,64878],"mapped",[1590,1581,1609]],[[64879,64880],"mapped",[1590,1582,1605]],[[64881,64882],"mapped",[1591,1605,1581]],[[64883,64883],"mapped",[1591,1605,1605]],[[64884,64884],"mapped",[1591,1605,1610]],[[64885,64885],"mapped",[1593,1580,1605]],[[64886,64887],"mapped",[1593,1605,1605]],[[64888,64888],"mapped",[1593,1605,1609]],[[64889,64889],"mapped",[1594,1605,1605]],[[64890,64890],"mapped",[1594,1605,1610]],[[64891,64891],"mapped",[1594,1605,1609]],[[64892,64893],"mapped",[1601,1582,1605]],[[64894,64894],"mapped",[1602,1605,1581]],[[64895,64895],"mapped",[1602,1605,1605]],[[64896,64896],"mapped",[1604,1581,1605]],[[64897,64897],"mapped",[1604,1581,1610]],[[64898,64898],"mapped",[1604,1581,1609]],[[64899,64900],"mapped",[1604,1580,1580]],[[64901,64902],"mapped",[1604,1582,1605]],[[64903,64904],"mapped",[1604,1605,1581]],[[64905,64905],"mapped",[1605,1581,1580]],[[64906,64906],"mapped",[1605,1581,1605]],[[64907,64907],"mapped",[1605,1581,1610]],[[64908,64908],"mapped",[1605,1580,1581]],[[64909,64909],"mapped",[1605,1580,1605]],[[64910,64910],"mapped",[1605,1582,1580]],[[64911,64911],"mapped",[1605,1582,1605]],[[64912,64913],"disallowed"],[[64914,64914],"mapped",[1605,1580,1582]],[[64915,64915],"mapped",[1607,1605,1580]],[[64916,64916],"mapped",[1607,1605,1605]],[[64917,64917],"mapped",[1606,1581,1605]],[[64918,64918],"mapped",[1606,1581,1609]],[[64919,64920],"mapped",[1606,1580,1605]],[[64921,64921],"mapped",[1606,1580,1609]],[[64922,64922],"mapped",[1606,1605,1610]],[[64923,64923],"mapped",[1606,1605,1609]],[[64924,64925],"mapped",[1610,1605,1605]],[[64926,64926],"mapped",[1576,1582,1610]],[[64927,64927],"mapped",[1578,1580,1610]],[[64928,64928],"mapped",[1578,1580,1609]],[[64929,64929],"mapped",[1578,1582,1610]],[[64930,64930],"mapped",[1578,1582,1609]],[[64931,64931],"mapped",[1578,1605,1610]],[[64932,64932],"mapped",[1578,1605,1609]],[[64933,64933],"mapped",[1580,1605,1610]],[[64934,64934],"mapped",[1580,1581,1609]],[[64935,64935],"mapped",[1580,1605,1609]],[[64936,64936],"mapped",[1587,1582,1609]],[[64937,64937],"mapped",[1589,1581,1610]],[[64938,64938],"mapped",[1588,1581,1610]],[[64939,64939],"mapped",[1590,1581,1610]],[[64940,64940],"mapped",[1604,1580,1610]],[[64941,64941],"mapped",[1604,1605,1610]],[[64942,64942],"mapped",[1610,1581,1610]],[[64943,64943],"mapped",[1610,1580,1610]],[[64944,64944],"mapped",[1610,1605,1610]],[[64945,64945],"mapped",[1605,1605,1610]],[[64946,64946],"mapped",[1602,1605,1610]],[[64947,64947],"mapped",[1606,1581,1610]],[[64948,64948],"mapped",[1602,1605,1581]],[[64949,64949],"mapped",[1604,1581,1605]],[[64950,64950],"mapped",[1593,1605,1610]],[[64951,64951],"mapped",[1603,1605,1610]],[[64952,64952],"mapped",[1606,1580,1581]],[[64953,64953],"mapped",[1605,1582,1610]],[[64954,64954],"mapped",[1604,1580,1605]],[[64955,64955],"mapped",[1603,1605,1605]],[[64956,64956],"mapped",[1604,1580,1605]],[[64957,64957],"mapped",[1606,1580,1581]],[[64958,64958],"mapped",[1580,1581,1610]],[[64959,64959],"mapped",[1581,1580,1610]],[[64960,64960],"mapped",[1605,1580,1610]],[[64961,64961],"mapped",[1601,1605,1610]],[[64962,64962],"mapped",[1576,1581,1610]],[[64963,64963],"mapped",[1603,1605,1605]],[[64964,64964],"mapped",[1593,1580,1605]],[[64965,64965],"mapped",[1589,1605,1605]],[[64966,64966],"mapped",[1587,1582,1610]],[[64967,64967],"mapped",[1606,1580,1610]],[[64968,64975],"disallowed"],[[64976,65007],"disallowed"],[[65008,65008],"mapped",[1589,1604,1746]],[[65009,65009],"mapped",[1602,1604,1746]],[[65010,65010],"mapped",[1575,1604,1604,1607]],[[65011,65011],"mapped",[1575,1603,1576,1585]],[[65012,65012],"mapped",[1605,1581,1605,1583]],[[65013,65013],"mapped",[1589,1604,1593,1605]],[[65014,65014],"mapped",[1585,1587,1608,1604]],[[65015,65015],"mapped",[1593,1604,1610,1607]],[[65016,65016],"mapped",[1608,1587,1604,1605]],[[65017,65017],"mapped",[1589,1604,1609]],[[65018,65018],"disallowed_STD3_mapped",[1589,1604,1609,32,1575,1604,1604,1607,32,1593,1604,1610,1607,32,1608,1587,1604,1605]],[[65019,65019],"disallowed_STD3_mapped",[1580,1604,32,1580,1604,1575,1604,1607]],[[65020,65020],"mapped",[1585,1740,1575,1604]],[[65021,65021],"valid",[],"NV8"],[[65022,65023],"disallowed"],[[65024,65039],"ignored"],[[65040,65040],"disallowed_STD3_mapped",[44]],[[65041,65041],"mapped",[12289]],[[65042,65042],"disallowed"],[[65043,65043],"disallowed_STD3_mapped",[58]],[[65044,65044],"disallowed_STD3_mapped",[59]],[[65045,65045],"disallowed_STD3_mapped",[33]],[[65046,65046],"disallowed_STD3_mapped",[63]],[[65047,65047],"mapped",[12310]],[[65048,65048],"mapped",[12311]],[[65049,65049],"disallowed"],[[65050,65055],"disallowed"],[[65056,65059],"valid"],[[65060,65062],"valid"],[[65063,65069],"valid"],[[65070,65071],"valid"],[[65072,65072],"disallowed"],[[65073,65073],"mapped",[8212]],[[65074,65074],"mapped",[8211]],[[65075,65076],"disallowed_STD3_mapped",[95]],[[65077,65077],"disallowed_STD3_mapped",[40]],[[65078,65078],"disallowed_STD3_mapped",[41]],[[65079,65079],"disallowed_STD3_mapped",[123]],[[65080,65080],"disallowed_STD3_mapped",[125]],[[65081,65081],"mapped",[12308]],[[65082,65082],"mapped",[12309]],[[65083,65083],"mapped",[12304]],[[65084,65084],"mapped",[12305]],[[65085,65085],"mapped",[12298]],[[65086,65086],"mapped",[12299]],[[65087,65087],"mapped",[12296]],[[65088,65088],"mapped",[12297]],[[65089,65089],"mapped",[12300]],[[65090,65090],"mapped",[12301]],[[65091,65091],"mapped",[12302]],[[65092,65092],"mapped",[12303]],[[65093,65094],"valid",[],"NV8"],[[65095,65095],"disallowed_STD3_mapped",[91]],[[65096,65096],"disallowed_STD3_mapped",[93]],[[65097,65100],"disallowed_STD3_mapped",[32,773]],[[65101,65103],"disallowed_STD3_mapped",[95]],[[65104,65104],"disallowed_STD3_mapped",[44]],[[65105,65105],"mapped",[12289]],[[65106,65106],"disallowed"],[[65107,65107],"disallowed"],[[65108,65108],"disallowed_STD3_mapped",[59]],[[65109,65109],"disallowed_STD3_mapped",[58]],[[65110,65110],"disallowed_STD3_mapped",[63]],[[65111,65111],"disallowed_STD3_mapped",[33]],[[65112,65112],"mapped",[8212]],[[65113,65113],"disallowed_STD3_mapped",[40]],[[65114,65114],"disallowed_STD3_mapped",[41]],[[65115,65115],"disallowed_STD3_mapped",[123]],[[65116,65116],"disallowed_STD3_mapped",[125]],[[65117,65117],"mapped",[12308]],[[65118,65118],"mapped",[12309]],[[65119,65119],"disallowed_STD3_mapped",[35]],[[65120,65120],"disallowed_STD3_mapped",[38]],[[65121,65121],"disallowed_STD3_mapped",[42]],[[65122,65122],"disallowed_STD3_mapped",[43]],[[65123,65123],"mapped",[45]],[[65124,65124],"disallowed_STD3_mapped",[60]],[[65125,65125],"disallowed_STD3_mapped",[62]],[[65126,65126],"disallowed_STD3_mapped",[61]],[[65127,65127],"disallowed"],[[65128,65128],"disallowed_STD3_mapped",[92]],[[65129,65129],"disallowed_STD3_mapped",[36]],[[65130,65130],"disallowed_STD3_mapped",[37]],[[65131,65131],"disallowed_STD3_mapped",[64]],[[65132,65135],"disallowed"],[[65136,65136],"disallowed_STD3_mapped",[32,1611]],[[65137,65137],"mapped",[1600,1611]],[[65138,65138],"disallowed_STD3_mapped",[32,1612]],[[65139,65139],"valid"],[[65140,65140],"disallowed_STD3_mapped",[32,1613]],[[65141,65141],"disallowed"],[[65142,65142],"disallowed_STD3_mapped",[32,1614]],[[65143,65143],"mapped",[1600,1614]],[[65144,65144],"disallowed_STD3_mapped",[32,1615]],[[65145,65145],"mapped",[1600,1615]],[[65146,65146],"disallowed_STD3_mapped",[32,1616]],[[65147,65147],"mapped",[1600,1616]],[[65148,65148],"disallowed_STD3_mapped",[32,1617]],[[65149,65149],"mapped",[1600,1617]],[[65150,65150],"disallowed_STD3_mapped",[32,1618]],[[65151,65151],"mapped",[1600,1618]],[[65152,65152],"mapped",[1569]],[[65153,65154],"mapped",[1570]],[[65155,65156],"mapped",[1571]],[[65157,65158],"mapped",[1572]],[[65159,65160],"mapped",[1573]],[[65161,65164],"mapped",[1574]],[[65165,65166],"mapped",[1575]],[[65167,65170],"mapped",[1576]],[[65171,65172],"mapped",[1577]],[[65173,65176],"mapped",[1578]],[[65177,65180],"mapped",[1579]],[[65181,65184],"mapped",[1580]],[[65185,65188],"mapped",[1581]],[[65189,65192],"mapped",[1582]],[[65193,65194],"mapped",[1583]],[[65195,65196],"mapped",[1584]],[[65197,65198],"mapped",[1585]],[[65199,65200],"mapped",[1586]],[[65201,65204],"mapped",[1587]],[[65205,65208],"mapped",[1588]],[[65209,65212],"mapped",[1589]],[[65213,65216],"mapped",[1590]],[[65217,65220],"mapped",[1591]],[[65221,65224],"mapped",[1592]],[[65225,65228],"mapped",[1593]],[[65229,65232],"mapped",[1594]],[[65233,65236],"mapped",[1601]],[[65237,65240],"mapped",[1602]],[[65241,65244],"mapped",[1603]],[[65245,65248],"mapped",[1604]],[[65249,65252],"mapped",[1605]],[[65253,65256],"mapped",[1606]],[[65257,65260],"mapped",[1607]],[[65261,65262],"mapped",[1608]],[[65263,65264],"mapped",[1609]],[[65265,65268],"mapped",[1610]],[[65269,65270],"mapped",[1604,1570]],[[65271,65272],"mapped",[1604,1571]],[[65273,65274],"mapped",[1604,1573]],[[65275,65276],"mapped",[1604,1575]],[[65277,65278],"disallowed"],[[65279,65279],"ignored"],[[65280,65280],"disallowed"],[[65281,65281],"disallowed_STD3_mapped",[33]],[[65282,65282],"disallowed_STD3_mapped",[34]],[[65283,65283],"disallowed_STD3_mapped",[35]],[[65284,65284],"disallowed_STD3_mapped",[36]],[[65285,65285],"disallowed_STD3_mapped",[37]],[[65286,65286],"disallowed_STD3_mapped",[38]],[[65287,65287],"disallowed_STD3_mapped",[39]],[[65288,65288],"disallowed_STD3_mapped",[40]],[[65289,65289],"disallowed_STD3_mapped",[41]],[[65290,65290],"disallowed_STD3_mapped",[42]],[[65291,65291],"disallowed_STD3_mapped",[43]],[[65292,65292],"disallowed_STD3_mapped",[44]],[[65293,65293],"mapped",[45]],[[65294,65294],"mapped",[46]],[[65295,65295],"disallowed_STD3_mapped",[47]],[[65296,65296],"mapped",[48]],[[65297,65297],"mapped",[49]],[[65298,65298],"mapped",[50]],[[65299,65299],"mapped",[51]],[[65300,65300],"mapped",[52]],[[65301,65301],"mapped",[53]],[[65302,65302],"mapped",[54]],[[65303,65303],"mapped",[55]],[[65304,65304],"mapped",[56]],[[65305,65305],"mapped",[57]],[[65306,65306],"disallowed_STD3_mapped",[58]],[[65307,65307],"disallowed_STD3_mapped",[59]],[[65308,65308],"disallowed_STD3_mapped",[60]],[[65309,65309],"disallowed_STD3_mapped",[61]],[[65310,65310],"disallowed_STD3_mapped",[62]],[[65311,65311],"disallowed_STD3_mapped",[63]],[[65312,65312],"disallowed_STD3_mapped",[64]],[[65313,65313],"mapped",[97]],[[65314,65314],"mapped",[98]],[[65315,65315],"mapped",[99]],[[65316,65316],"mapped",[100]],[[65317,65317],"mapped",[101]],[[65318,65318],"mapped",[102]],[[65319,65319],"mapped",[103]],[[65320,65320],"mapped",[104]],[[65321,65321],"mapped",[105]],[[65322,65322],"mapped",[106]],[[65323,65323],"mapped",[107]],[[65324,65324],"mapped",[108]],[[65325,65325],"mapped",[109]],[[65326,65326],"mapped",[110]],[[65327,65327],"mapped",[111]],[[65328,65328],"mapped",[112]],[[65329,65329],"mapped",[113]],[[65330,65330],"mapped",[114]],[[65331,65331],"mapped",[115]],[[65332,65332],"mapped",[116]],[[65333,65333],"mapped",[117]],[[65334,65334],"mapped",[118]],[[65335,65335],"mapped",[119]],[[65336,65336],"mapped",[120]],[[65337,65337],"mapped",[121]],[[65338,65338],"mapped",[122]],[[65339,65339],"disallowed_STD3_mapped",[91]],[[65340,65340],"disallowed_STD3_mapped",[92]],[[65341,65341],"disallowed_STD3_mapped",[93]],[[65342,65342],"disallowed_STD3_mapped",[94]],[[65343,65343],"disallowed_STD3_mapped",[95]],[[65344,65344],"disallowed_STD3_mapped",[96]],[[65345,65345],"mapped",[97]],[[65346,65346],"mapped",[98]],[[65347,65347],"mapped",[99]],[[65348,65348],"mapped",[100]],[[65349,65349],"mapped",[101]],[[65350,65350],"mapped",[102]],[[65351,65351],"mapped",[103]],[[65352,65352],"mapped",[104]],[[65353,65353],"mapped",[105]],[[65354,65354],"mapped",[106]],[[65355,65355],"mapped",[107]],[[65356,65356],"mapped",[108]],[[65357,65357],"mapped",[109]],[[65358,65358],"mapped",[110]],[[65359,65359],"mapped",[111]],[[65360,65360],"mapped",[112]],[[65361,65361],"mapped",[113]],[[65362,65362],"mapped",[114]],[[65363,65363],"mapped",[115]],[[65364,65364],"mapped",[116]],[[65365,65365],"mapped",[117]],[[65366,65366],"mapped",[118]],[[65367,65367],"mapped",[119]],[[65368,65368],"mapped",[120]],[[65369,65369],"mapped",[121]],[[65370,65370],"mapped",[122]],[[65371,65371],"disallowed_STD3_mapped",[123]],[[65372,65372],"disallowed_STD3_mapped",[124]],[[65373,65373],"disallowed_STD3_mapped",[125]],[[65374,65374],"disallowed_STD3_mapped",[126]],[[65375,65375],"mapped",[10629]],[[65376,65376],"mapped",[10630]],[[65377,65377],"mapped",[46]],[[65378,65378],"mapped",[12300]],[[65379,65379],"mapped",[12301]],[[65380,65380],"mapped",[12289]],[[65381,65381],"mapped",[12539]],[[65382,65382],"mapped",[12530]],[[65383,65383],"mapped",[12449]],[[65384,65384],"mapped",[12451]],[[65385,65385],"mapped",[12453]],[[65386,65386],"mapped",[12455]],[[65387,65387],"mapped",[12457]],[[65388,65388],"mapped",[12515]],[[65389,65389],"mapped",[12517]],[[65390,65390],"mapped",[12519]],[[65391,65391],"mapped",[12483]],[[65392,65392],"mapped",[12540]],[[65393,65393],"mapped",[12450]],[[65394,65394],"mapped",[12452]],[[65395,65395],"mapped",[12454]],[[65396,65396],"mapped",[12456]],[[65397,65397],"mapped",[12458]],[[65398,65398],"mapped",[12459]],[[65399,65399],"mapped",[12461]],[[65400,65400],"mapped",[12463]],[[65401,65401],"mapped",[12465]],[[65402,65402],"mapped",[12467]],[[65403,65403],"mapped",[12469]],[[65404,65404],"mapped",[12471]],[[65405,65405],"mapped",[12473]],[[65406,65406],"mapped",[12475]],[[65407,65407],"mapped",[12477]],[[65408,65408],"mapped",[12479]],[[65409,65409],"mapped",[12481]],[[65410,65410],"mapped",[12484]],[[65411,65411],"mapped",[12486]],[[65412,65412],"mapped",[12488]],[[65413,65413],"mapped",[12490]],[[65414,65414],"mapped",[12491]],[[65415,65415],"mapped",[12492]],[[65416,65416],"mapped",[12493]],[[65417,65417],"mapped",[12494]],[[65418,65418],"mapped",[12495]],[[65419,65419],"mapped",[12498]],[[65420,65420],"mapped",[12501]],[[65421,65421],"mapped",[12504]],[[65422,65422],"mapped",[12507]],[[65423,65423],"mapped",[12510]],[[65424,65424],"mapped",[12511]],[[65425,65425],"mapped",[12512]],[[65426,65426],"mapped",[12513]],[[65427,65427],"mapped",[12514]],[[65428,65428],"mapped",[12516]],[[65429,65429],"mapped",[12518]],[[65430,65430],"mapped",[12520]],[[65431,65431],"mapped",[12521]],[[65432,65432],"mapped",[12522]],[[65433,65433],"mapped",[12523]],[[65434,65434],"mapped",[12524]],[[65435,65435],"mapped",[12525]],[[65436,65436],"mapped",[12527]],[[65437,65437],"mapped",[12531]],[[65438,65438],"mapped",[12441]],[[65439,65439],"mapped",[12442]],[[65440,65440],"disallowed"],[[65441,65441],"mapped",[4352]],[[65442,65442],"mapped",[4353]],[[65443,65443],"mapped",[4522]],[[65444,65444],"mapped",[4354]],[[65445,65445],"mapped",[4524]],[[65446,65446],"mapped",[4525]],[[65447,65447],"mapped",[4355]],[[65448,65448],"mapped",[4356]],[[65449,65449],"mapped",[4357]],[[65450,65450],"mapped",[4528]],[[65451,65451],"mapped",[4529]],[[65452,65452],"mapped",[4530]],[[65453,65453],"mapped",[4531]],[[65454,65454],"mapped",[4532]],[[65455,65455],"mapped",[4533]],[[65456,65456],"mapped",[4378]],[[65457,65457],"mapped",[4358]],[[65458,65458],"mapped",[4359]],[[65459,65459],"mapped",[4360]],[[65460,65460],"mapped",[4385]],[[65461,65461],"mapped",[4361]],[[65462,65462],"mapped",[4362]],[[65463,65463],"mapped",[4363]],[[65464,65464],"mapped",[4364]],[[65465,65465],"mapped",[4365]],[[65466,65466],"mapped",[4366]],[[65467,65467],"mapped",[4367]],[[65468,65468],"mapped",[4368]],[[65469,65469],"mapped",[4369]],[[65470,65470],"mapped",[4370]],[[65471,65473],"disallowed"],[[65474,65474],"mapped",[4449]],[[65475,65475],"mapped",[4450]],[[65476,65476],"mapped",[4451]],[[65477,65477],"mapped",[4452]],[[65478,65478],"mapped",[4453]],[[65479,65479],"mapped",[4454]],[[65480,65481],"disallowed"],[[65482,65482],"mapped",[4455]],[[65483,65483],"mapped",[4456]],[[65484,65484],"mapped",[4457]],[[65485,65485],"mapped",[4458]],[[65486,65486],"mapped",[4459]],[[65487,65487],"mapped",[4460]],[[65488,65489],"disallowed"],[[65490,65490],"mapped",[4461]],[[65491,65491],"mapped",[4462]],[[65492,65492],"mapped",[4463]],[[65493,65493],"mapped",[4464]],[[65494,65494],"mapped",[4465]],[[65495,65495],"mapped",[4466]],[[65496,65497],"disallowed"],[[65498,65498],"mapped",[4467]],[[65499,65499],"mapped",[4468]],[[65500,65500],"mapped",[4469]],[[65501,65503],"disallowed"],[[65504,65504],"mapped",[162]],[[65505,65505],"mapped",[163]],[[65506,65506],"mapped",[172]],[[65507,65507],"disallowed_STD3_mapped",[32,772]],[[65508,65508],"mapped",[166]],[[65509,65509],"mapped",[165]],[[65510,65510],"mapped",[8361]],[[65511,65511],"disallowed"],[[65512,65512],"mapped",[9474]],[[65513,65513],"mapped",[8592]],[[65514,65514],"mapped",[8593]],[[65515,65515],"mapped",[8594]],[[65516,65516],"mapped",[8595]],[[65517,65517],"mapped",[9632]],[[65518,65518],"mapped",[9675]],[[65519,65528],"disallowed"],[[65529,65531],"disallowed"],[[65532,65532],"disallowed"],[[65533,65533],"disallowed"],[[65534,65535],"disallowed"],[[65536,65547],"valid"],[[65548,65548],"disallowed"],[[65549,65574],"valid"],[[65575,65575],"disallowed"],[[65576,65594],"valid"],[[65595,65595],"disallowed"],[[65596,65597],"valid"],[[65598,65598],"disallowed"],[[65599,65613],"valid"],[[65614,65615],"disallowed"],[[65616,65629],"valid"],[[65630,65663],"disallowed"],[[65664,65786],"valid"],[[65787,65791],"disallowed"],[[65792,65794],"valid",[],"NV8"],[[65795,65798],"disallowed"],[[65799,65843],"valid",[],"NV8"],[[65844,65846],"disallowed"],[[65847,65855],"valid",[],"NV8"],[[65856,65930],"valid",[],"NV8"],[[65931,65932],"valid",[],"NV8"],[[65933,65935],"disallowed"],[[65936,65947],"valid",[],"NV8"],[[65948,65951],"disallowed"],[[65952,65952],"valid",[],"NV8"],[[65953,65999],"disallowed"],[[66000,66044],"valid",[],"NV8"],[[66045,66045],"valid"],[[66046,66175],"disallowed"],[[66176,66204],"valid"],[[66205,66207],"disallowed"],[[66208,66256],"valid"],[[66257,66271],"disallowed"],[[66272,66272],"valid"],[[66273,66299],"valid",[],"NV8"],[[66300,66303],"disallowed"],[[66304,66334],"valid"],[[66335,66335],"valid"],[[66336,66339],"valid",[],"NV8"],[[66340,66351],"disallowed"],[[66352,66368],"valid"],[[66369,66369],"valid",[],"NV8"],[[66370,66377],"valid"],[[66378,66378],"valid",[],"NV8"],[[66379,66383],"disallowed"],[[66384,66426],"valid"],[[66427,66431],"disallowed"],[[66432,66461],"valid"],[[66462,66462],"disallowed"],[[66463,66463],"valid",[],"NV8"],[[66464,66499],"valid"],[[66500,66503],"disallowed"],[[66504,66511],"valid"],[[66512,66517],"valid",[],"NV8"],[[66518,66559],"disallowed"],[[66560,66560],"mapped",[66600]],[[66561,66561],"mapped",[66601]],[[66562,66562],"mapped",[66602]],[[66563,66563],"mapped",[66603]],[[66564,66564],"mapped",[66604]],[[66565,66565],"mapped",[66605]],[[66566,66566],"mapped",[66606]],[[66567,66567],"mapped",[66607]],[[66568,66568],"mapped",[66608]],[[66569,66569],"mapped",[66609]],[[66570,66570],"mapped",[66610]],[[66571,66571],"mapped",[66611]],[[66572,66572],"mapped",[66612]],[[66573,66573],"mapped",[66613]],[[66574,66574],"mapped",[66614]],[[66575,66575],"mapped",[66615]],[[66576,66576],"mapped",[66616]],[[66577,66577],"mapped",[66617]],[[66578,66578],"mapped",[66618]],[[66579,66579],"mapped",[66619]],[[66580,66580],"mapped",[66620]],[[66581,66581],"mapped",[66621]],[[66582,66582],"mapped",[66622]],[[66583,66583],"mapped",[66623]],[[66584,66584],"mapped",[66624]],[[66585,66585],"mapped",[66625]],[[66586,66586],"mapped",[66626]],[[66587,66587],"mapped",[66627]],[[66588,66588],"mapped",[66628]],[[66589,66589],"mapped",[66629]],[[66590,66590],"mapped",[66630]],[[66591,66591],"mapped",[66631]],[[66592,66592],"mapped",[66632]],[[66593,66593],"mapped",[66633]],[[66594,66594],"mapped",[66634]],[[66595,66595],"mapped",[66635]],[[66596,66596],"mapped",[66636]],[[66597,66597],"mapped",[66637]],[[66598,66598],"mapped",[66638]],[[66599,66599],"mapped",[66639]],[[66600,66637],"valid"],[[66638,66717],"valid"],[[66718,66719],"disallowed"],[[66720,66729],"valid"],[[66730,66815],"disallowed"],[[66816,66855],"valid"],[[66856,66863],"disallowed"],[[66864,66915],"valid"],[[66916,66926],"disallowed"],[[66927,66927],"valid",[],"NV8"],[[66928,67071],"disallowed"],[[67072,67382],"valid"],[[67383,67391],"disallowed"],[[67392,67413],"valid"],[[67414,67423],"disallowed"],[[67424,67431],"valid"],[[67432,67583],"disallowed"],[[67584,67589],"valid"],[[67590,67591],"disallowed"],[[67592,67592],"valid"],[[67593,67593],"disallowed"],[[67594,67637],"valid"],[[67638,67638],"disallowed"],[[67639,67640],"valid"],[[67641,67643],"disallowed"],[[67644,67644],"valid"],[[67645,67646],"disallowed"],[[67647,67647],"valid"],[[67648,67669],"valid"],[[67670,67670],"disallowed"],[[67671,67679],"valid",[],"NV8"],[[67680,67702],"valid"],[[67703,67711],"valid",[],"NV8"],[[67712,67742],"valid"],[[67743,67750],"disallowed"],[[67751,67759],"valid",[],"NV8"],[[67760,67807],"disallowed"],[[67808,67826],"valid"],[[67827,67827],"disallowed"],[[67828,67829],"valid"],[[67830,67834],"disallowed"],[[67835,67839],"valid",[],"NV8"],[[67840,67861],"valid"],[[67862,67865],"valid",[],"NV8"],[[67866,67867],"valid",[],"NV8"],[[67868,67870],"disallowed"],[[67871,67871],"valid",[],"NV8"],[[67872,67897],"valid"],[[67898,67902],"disallowed"],[[67903,67903],"valid",[],"NV8"],[[67904,67967],"disallowed"],[[67968,68023],"valid"],[[68024,68027],"disallowed"],[[68028,68029],"valid",[],"NV8"],[[68030,68031],"valid"],[[68032,68047],"valid",[],"NV8"],[[68048,68049],"disallowed"],[[68050,68095],"valid",[],"NV8"],[[68096,68099],"valid"],[[68100,68100],"disallowed"],[[68101,68102],"valid"],[[68103,68107],"disallowed"],[[68108,68115],"valid"],[[68116,68116],"disallowed"],[[68117,68119],"valid"],[[68120,68120],"disallowed"],[[68121,68147],"valid"],[[68148,68151],"disallowed"],[[68152,68154],"valid"],[[68155,68158],"disallowed"],[[68159,68159],"valid"],[[68160,68167],"valid",[],"NV8"],[[68168,68175],"disallowed"],[[68176,68184],"valid",[],"NV8"],[[68185,68191],"disallowed"],[[68192,68220],"valid"],[[68221,68223],"valid",[],"NV8"],[[68224,68252],"valid"],[[68253,68255],"valid",[],"NV8"],[[68256,68287],"disallowed"],[[68288,68295],"valid"],[[68296,68296],"valid",[],"NV8"],[[68297,68326],"valid"],[[68327,68330],"disallowed"],[[68331,68342],"valid",[],"NV8"],[[68343,68351],"disallowed"],[[68352,68405],"valid"],[[68406,68408],"disallowed"],[[68409,68415],"valid",[],"NV8"],[[68416,68437],"valid"],[[68438,68439],"disallowed"],[[68440,68447],"valid",[],"NV8"],[[68448,68466],"valid"],[[68467,68471],"disallowed"],[[68472,68479],"valid",[],"NV8"],[[68480,68497],"valid"],[[68498,68504],"disallowed"],[[68505,68508],"valid",[],"NV8"],[[68509,68520],"disallowed"],[[68521,68527],"valid",[],"NV8"],[[68528,68607],"disallowed"],[[68608,68680],"valid"],[[68681,68735],"disallowed"],[[68736,68736],"mapped",[68800]],[[68737,68737],"mapped",[68801]],[[68738,68738],"mapped",[68802]],[[68739,68739],"mapped",[68803]],[[68740,68740],"mapped",[68804]],[[68741,68741],"mapped",[68805]],[[68742,68742],"mapped",[68806]],[[68743,68743],"mapped",[68807]],[[68744,68744],"mapped",[68808]],[[68745,68745],"mapped",[68809]],[[68746,68746],"mapped",[68810]],[[68747,68747],"mapped",[68811]],[[68748,68748],"mapped",[68812]],[[68749,68749],"mapped",[68813]],[[68750,68750],"mapped",[68814]],[[68751,68751],"mapped",[68815]],[[68752,68752],"mapped",[68816]],[[68753,68753],"mapped",[68817]],[[68754,68754],"mapped",[68818]],[[68755,68755],"mapped",[68819]],[[68756,68756],"mapped",[68820]],[[68757,68757],"mapped",[68821]],[[68758,68758],"mapped",[68822]],[[68759,68759],"mapped",[68823]],[[68760,68760],"mapped",[68824]],[[68761,68761],"mapped",[68825]],[[68762,68762],"mapped",[68826]],[[68763,68763],"mapped",[68827]],[[68764,68764],"mapped",[68828]],[[68765,68765],"mapped",[68829]],[[68766,68766],"mapped",[68830]],[[68767,68767],"mapped",[68831]],[[68768,68768],"mapped",[68832]],[[68769,68769],"mapped",[68833]],[[68770,68770],"mapped",[68834]],[[68771,68771],"mapped",[68835]],[[68772,68772],"mapped",[68836]],[[68773,68773],"mapped",[68837]],[[68774,68774],"mapped",[68838]],[[68775,68775],"mapped",[68839]],[[68776,68776],"mapped",[68840]],[[68777,68777],"mapped",[68841]],[[68778,68778],"mapped",[68842]],[[68779,68779],"mapped",[68843]],[[68780,68780],"mapped",[68844]],[[68781,68781],"mapped",[68845]],[[68782,68782],"mapped",[68846]],[[68783,68783],"mapped",[68847]],[[68784,68784],"mapped",[68848]],[[68785,68785],"mapped",[68849]],[[68786,68786],"mapped",[68850]],[[68787,68799],"disallowed"],[[68800,68850],"valid"],[[68851,68857],"disallowed"],[[68858,68863],"valid",[],"NV8"],[[68864,69215],"disallowed"],[[69216,69246],"valid",[],"NV8"],[[69247,69631],"disallowed"],[[69632,69702],"valid"],[[69703,69709],"valid",[],"NV8"],[[69710,69713],"disallowed"],[[69714,69733],"valid",[],"NV8"],[[69734,69743],"valid"],[[69744,69758],"disallowed"],[[69759,69759],"valid"],[[69760,69818],"valid"],[[69819,69820],"valid",[],"NV8"],[[69821,69821],"disallowed"],[[69822,69825],"valid",[],"NV8"],[[69826,69839],"disallowed"],[[69840,69864],"valid"],[[69865,69871],"disallowed"],[[69872,69881],"valid"],[[69882,69887],"disallowed"],[[69888,69940],"valid"],[[69941,69941],"disallowed"],[[69942,69951],"valid"],[[69952,69955],"valid",[],"NV8"],[[69956,69967],"disallowed"],[[69968,70003],"valid"],[[70004,70005],"valid",[],"NV8"],[[70006,70006],"valid"],[[70007,70015],"disallowed"],[[70016,70084],"valid"],[[70085,70088],"valid",[],"NV8"],[[70089,70089],"valid",[],"NV8"],[[70090,70092],"valid"],[[70093,70093],"valid",[],"NV8"],[[70094,70095],"disallowed"],[[70096,70105],"valid"],[[70106,70106],"valid"],[[70107,70107],"valid",[],"NV8"],[[70108,70108],"valid"],[[70109,70111],"valid",[],"NV8"],[[70112,70112],"disallowed"],[[70113,70132],"valid",[],"NV8"],[[70133,70143],"disallowed"],[[70144,70161],"valid"],[[70162,70162],"disallowed"],[[70163,70199],"valid"],[[70200,70205],"valid",[],"NV8"],[[70206,70271],"disallowed"],[[70272,70278],"valid"],[[70279,70279],"disallowed"],[[70280,70280],"valid"],[[70281,70281],"disallowed"],[[70282,70285],"valid"],[[70286,70286],"disallowed"],[[70287,70301],"valid"],[[70302,70302],"disallowed"],[[70303,70312],"valid"],[[70313,70313],"valid",[],"NV8"],[[70314,70319],"disallowed"],[[70320,70378],"valid"],[[70379,70383],"disallowed"],[[70384,70393],"valid"],[[70394,70399],"disallowed"],[[70400,70400],"valid"],[[70401,70403],"valid"],[[70404,70404],"disallowed"],[[70405,70412],"valid"],[[70413,70414],"disallowed"],[[70415,70416],"valid"],[[70417,70418],"disallowed"],[[70419,70440],"valid"],[[70441,70441],"disallowed"],[[70442,70448],"valid"],[[70449,70449],"disallowed"],[[70450,70451],"valid"],[[70452,70452],"disallowed"],[[70453,70457],"valid"],[[70458,70459],"disallowed"],[[70460,70468],"valid"],[[70469,70470],"disallowed"],[[70471,70472],"valid"],[[70473,70474],"disallowed"],[[70475,70477],"valid"],[[70478,70479],"disallowed"],[[70480,70480],"valid"],[[70481,70486],"disallowed"],[[70487,70487],"valid"],[[70488,70492],"disallowed"],[[70493,70499],"valid"],[[70500,70501],"disallowed"],[[70502,70508],"valid"],[[70509,70511],"disallowed"],[[70512,70516],"valid"],[[70517,70783],"disallowed"],[[70784,70853],"valid"],[[70854,70854],"valid",[],"NV8"],[[70855,70855],"valid"],[[70856,70863],"disallowed"],[[70864,70873],"valid"],[[70874,71039],"disallowed"],[[71040,71093],"valid"],[[71094,71095],"disallowed"],[[71096,71104],"valid"],[[71105,71113],"valid",[],"NV8"],[[71114,71127],"valid",[],"NV8"],[[71128,71133],"valid"],[[71134,71167],"disallowed"],[[71168,71232],"valid"],[[71233,71235],"valid",[],"NV8"],[[71236,71236],"valid"],[[71237,71247],"disallowed"],[[71248,71257],"valid"],[[71258,71295],"disallowed"],[[71296,71351],"valid"],[[71352,71359],"disallowed"],[[71360,71369],"valid"],[[71370,71423],"disallowed"],[[71424,71449],"valid"],[[71450,71452],"disallowed"],[[71453,71467],"valid"],[[71468,71471],"disallowed"],[[71472,71481],"valid"],[[71482,71487],"valid",[],"NV8"],[[71488,71839],"disallowed"],[[71840,71840],"mapped",[71872]],[[71841,71841],"mapped",[71873]],[[71842,71842],"mapped",[71874]],[[71843,71843],"mapped",[71875]],[[71844,71844],"mapped",[71876]],[[71845,71845],"mapped",[71877]],[[71846,71846],"mapped",[71878]],[[71847,71847],"mapped",[71879]],[[71848,71848],"mapped",[71880]],[[71849,71849],"mapped",[71881]],[[71850,71850],"mapped",[71882]],[[71851,71851],"mapped",[71883]],[[71852,71852],"mapped",[71884]],[[71853,71853],"mapped",[71885]],[[71854,71854],"mapped",[71886]],[[71855,71855],"mapped",[71887]],[[71856,71856],"mapped",[71888]],[[71857,71857],"mapped",[71889]],[[71858,71858],"mapped",[71890]],[[71859,71859],"mapped",[71891]],[[71860,71860],"mapped",[71892]],[[71861,71861],"mapped",[71893]],[[71862,71862],"mapped",[71894]],[[71863,71863],"mapped",[71895]],[[71864,71864],"mapped",[71896]],[[71865,71865],"mapped",[71897]],[[71866,71866],"mapped",[71898]],[[71867,71867],"mapped",[71899]],[[71868,71868],"mapped",[71900]],[[71869,71869],"mapped",[71901]],[[71870,71870],"mapped",[71902]],[[71871,71871],"mapped",[71903]],[[71872,71913],"valid"],[[71914,71922],"valid",[],"NV8"],[[71923,71934],"disallowed"],[[71935,71935],"valid"],[[71936,72383],"disallowed"],[[72384,72440],"valid"],[[72441,73727],"disallowed"],[[73728,74606],"valid"],[[74607,74648],"valid"],[[74649,74649],"valid"],[[74650,74751],"disallowed"],[[74752,74850],"valid",[],"NV8"],[[74851,74862],"valid",[],"NV8"],[[74863,74863],"disallowed"],[[74864,74867],"valid",[],"NV8"],[[74868,74868],"valid",[],"NV8"],[[74869,74879],"disallowed"],[[74880,75075],"valid"],[[75076,77823],"disallowed"],[[77824,78894],"valid"],[[78895,82943],"disallowed"],[[82944,83526],"valid"],[[83527,92159],"disallowed"],[[92160,92728],"valid"],[[92729,92735],"disallowed"],[[92736,92766],"valid"],[[92767,92767],"disallowed"],[[92768,92777],"valid"],[[92778,92781],"disallowed"],[[92782,92783],"valid",[],"NV8"],[[92784,92879],"disallowed"],[[92880,92909],"valid"],[[92910,92911],"disallowed"],[[92912,92916],"valid"],[[92917,92917],"valid",[],"NV8"],[[92918,92927],"disallowed"],[[92928,92982],"valid"],[[92983,92991],"valid",[],"NV8"],[[92992,92995],"valid"],[[92996,92997],"valid",[],"NV8"],[[92998,93007],"disallowed"],[[93008,93017],"valid"],[[93018,93018],"disallowed"],[[93019,93025],"valid",[],"NV8"],[[93026,93026],"disallowed"],[[93027,93047],"valid"],[[93048,93052],"disallowed"],[[93053,93071],"valid"],[[93072,93951],"disallowed"],[[93952,94020],"valid"],[[94021,94031],"disallowed"],[[94032,94078],"valid"],[[94079,94094],"disallowed"],[[94095,94111],"valid"],[[94112,110591],"disallowed"],[[110592,110593],"valid"],[[110594,113663],"disallowed"],[[113664,113770],"valid"],[[113771,113775],"disallowed"],[[113776,113788],"valid"],[[113789,113791],"disallowed"],[[113792,113800],"valid"],[[113801,113807],"disallowed"],[[113808,113817],"valid"],[[113818,113819],"disallowed"],[[113820,113820],"valid",[],"NV8"],[[113821,113822],"valid"],[[113823,113823],"valid",[],"NV8"],[[113824,113827],"ignored"],[[113828,118783],"disallowed"],[[118784,119029],"valid",[],"NV8"],[[119030,119039],"disallowed"],[[119040,119078],"valid",[],"NV8"],[[119079,119080],"disallowed"],[[119081,119081],"valid",[],"NV8"],[[119082,119133],"valid",[],"NV8"],[[119134,119134],"mapped",[119127,119141]],[[119135,119135],"mapped",[119128,119141]],[[119136,119136],"mapped",[119128,119141,119150]],[[119137,119137],"mapped",[119128,119141,119151]],[[119138,119138],"mapped",[119128,119141,119152]],[[119139,119139],"mapped",[119128,119141,119153]],[[119140,119140],"mapped",[119128,119141,119154]],[[119141,119154],"valid",[],"NV8"],[[119155,119162],"disallowed"],[[119163,119226],"valid",[],"NV8"],[[119227,119227],"mapped",[119225,119141]],[[119228,119228],"mapped",[119226,119141]],[[119229,119229],"mapped",[119225,119141,119150]],[[119230,119230],"mapped",[119226,119141,119150]],[[119231,119231],"mapped",[119225,119141,119151]],[[119232,119232],"mapped",[119226,119141,119151]],[[119233,119261],"valid",[],"NV8"],[[119262,119272],"valid",[],"NV8"],[[119273,119295],"disallowed"],[[119296,119365],"valid",[],"NV8"],[[119366,119551],"disallowed"],[[119552,119638],"valid",[],"NV8"],[[119639,119647],"disallowed"],[[119648,119665],"valid",[],"NV8"],[[119666,119807],"disallowed"],[[119808,119808],"mapped",[97]],[[119809,119809],"mapped",[98]],[[119810,119810],"mapped",[99]],[[119811,119811],"mapped",[100]],[[119812,119812],"mapped",[101]],[[119813,119813],"mapped",[102]],[[119814,119814],"mapped",[103]],[[119815,119815],"mapped",[104]],[[119816,119816],"mapped",[105]],[[119817,119817],"mapped",[106]],[[119818,119818],"mapped",[107]],[[119819,119819],"mapped",[108]],[[119820,119820],"mapped",[109]],[[119821,119821],"mapped",[110]],[[119822,119822],"mapped",[111]],[[119823,119823],"mapped",[112]],[[119824,119824],"mapped",[113]],[[119825,119825],"mapped",[114]],[[119826,119826],"mapped",[115]],[[119827,119827],"mapped",[116]],[[119828,119828],"mapped",[117]],[[119829,119829],"mapped",[118]],[[119830,119830],"mapped",[119]],[[119831,119831],"mapped",[120]],[[119832,119832],"mapped",[121]],[[119833,119833],"mapped",[122]],[[119834,119834],"mapped",[97]],[[119835,119835],"mapped",[98]],[[119836,119836],"mapped",[99]],[[119837,119837],"mapped",[100]],[[119838,119838],"mapped",[101]],[[119839,119839],"mapped",[102]],[[119840,119840],"mapped",[103]],[[119841,119841],"mapped",[104]],[[119842,119842],"mapped",[105]],[[119843,119843],"mapped",[106]],[[119844,119844],"mapped",[107]],[[119845,119845],"mapped",[108]],[[119846,119846],"mapped",[109]],[[119847,119847],"mapped",[110]],[[119848,119848],"mapped",[111]],[[119849,119849],"mapped",[112]],[[119850,119850],"mapped",[113]],[[119851,119851],"mapped",[114]],[[119852,119852],"mapped",[115]],[[119853,119853],"mapped",[116]],[[119854,119854],"mapped",[117]],[[119855,119855],"mapped",[118]],[[119856,119856],"mapped",[119]],[[119857,119857],"mapped",[120]],[[119858,119858],"mapped",[121]],[[119859,119859],"mapped",[122]],[[119860,119860],"mapped",[97]],[[119861,119861],"mapped",[98]],[[119862,119862],"mapped",[99]],[[119863,119863],"mapped",[100]],[[119864,119864],"mapped",[101]],[[119865,119865],"mapped",[102]],[[119866,119866],"mapped",[103]],[[119867,119867],"mapped",[104]],[[119868,119868],"mapped",[105]],[[119869,119869],"mapped",[106]],[[119870,119870],"mapped",[107]],[[119871,119871],"mapped",[108]],[[119872,119872],"mapped",[109]],[[119873,119873],"mapped",[110]],[[119874,119874],"mapped",[111]],[[119875,119875],"mapped",[112]],[[119876,119876],"mapped",[113]],[[119877,119877],"mapped",[114]],[[119878,119878],"mapped",[115]],[[119879,119879],"mapped",[116]],[[119880,119880],"mapped",[117]],[[119881,119881],"mapped",[118]],[[119882,119882],"mapped",[119]],[[119883,119883],"mapped",[120]],[[119884,119884],"mapped",[121]],[[119885,119885],"mapped",[122]],[[119886,119886],"mapped",[97]],[[119887,119887],"mapped",[98]],[[119888,119888],"mapped",[99]],[[119889,119889],"mapped",[100]],[[119890,119890],"mapped",[101]],[[119891,119891],"mapped",[102]],[[119892,119892],"mapped",[103]],[[119893,119893],"disallowed"],[[119894,119894],"mapped",[105]],[[119895,119895],"mapped",[106]],[[119896,119896],"mapped",[107]],[[119897,119897],"mapped",[108]],[[119898,119898],"mapped",[109]],[[119899,119899],"mapped",[110]],[[119900,119900],"mapped",[111]],[[119901,119901],"mapped",[112]],[[119902,119902],"mapped",[113]],[[119903,119903],"mapped",[114]],[[119904,119904],"mapped",[115]],[[119905,119905],"mapped",[116]],[[119906,119906],"mapped",[117]],[[119907,119907],"mapped",[118]],[[119908,119908],"mapped",[119]],[[119909,119909],"mapped",[120]],[[119910,119910],"mapped",[121]],[[119911,119911],"mapped",[122]],[[119912,119912],"mapped",[97]],[[119913,119913],"mapped",[98]],[[119914,119914],"mapped",[99]],[[119915,119915],"mapped",[100]],[[119916,119916],"mapped",[101]],[[119917,119917],"mapped",[102]],[[119918,119918],"mapped",[103]],[[119919,119919],"mapped",[104]],[[119920,119920],"mapped",[105]],[[119921,119921],"mapped",[106]],[[119922,119922],"mapped",[107]],[[119923,119923],"mapped",[108]],[[119924,119924],"mapped",[109]],[[119925,119925],"mapped",[110]],[[119926,119926],"mapped",[111]],[[119927,119927],"mapped",[112]],[[119928,119928],"mapped",[113]],[[119929,119929],"mapped",[114]],[[119930,119930],"mapped",[115]],[[119931,119931],"mapped",[116]],[[119932,119932],"mapped",[117]],[[119933,119933],"mapped",[118]],[[119934,119934],"mapped",[119]],[[119935,119935],"mapped",[120]],[[119936,119936],"mapped",[121]],[[119937,119937],"mapped",[122]],[[119938,119938],"mapped",[97]],[[119939,119939],"mapped",[98]],[[119940,119940],"mapped",[99]],[[119941,119941],"mapped",[100]],[[119942,119942],"mapped",[101]],[[119943,119943],"mapped",[102]],[[119944,119944],"mapped",[103]],[[119945,119945],"mapped",[104]],[[119946,119946],"mapped",[105]],[[119947,119947],"mapped",[106]],[[119948,119948],"mapped",[107]],[[119949,119949],"mapped",[108]],[[119950,119950],"mapped",[109]],[[119951,119951],"mapped",[110]],[[119952,119952],"mapped",[111]],[[119953,119953],"mapped",[112]],[[119954,119954],"mapped",[113]],[[119955,119955],"mapped",[114]],[[119956,119956],"mapped",[115]],[[119957,119957],"mapped",[116]],[[119958,119958],"mapped",[117]],[[119959,119959],"mapped",[118]],[[119960,119960],"mapped",[119]],[[119961,119961],"mapped",[120]],[[119962,119962],"mapped",[121]],[[119963,119963],"mapped",[122]],[[119964,119964],"mapped",[97]],[[119965,119965],"disallowed"],[[119966,119966],"mapped",[99]],[[119967,119967],"mapped",[100]],[[119968,119969],"disallowed"],[[119970,119970],"mapped",[103]],[[119971,119972],"disallowed"],[[119973,119973],"mapped",[106]],[[119974,119974],"mapped",[107]],[[119975,119976],"disallowed"],[[119977,119977],"mapped",[110]],[[119978,119978],"mapped",[111]],[[119979,119979],"mapped",[112]],[[119980,119980],"mapped",[113]],[[119981,119981],"disallowed"],[[119982,119982],"mapped",[115]],[[119983,119983],"mapped",[116]],[[119984,119984],"mapped",[117]],[[119985,119985],"mapped",[118]],[[119986,119986],"mapped",[119]],[[119987,119987],"mapped",[120]],[[119988,119988],"mapped",[121]],[[119989,119989],"mapped",[122]],[[119990,119990],"mapped",[97]],[[119991,119991],"mapped",[98]],[[119992,119992],"mapped",[99]],[[119993,119993],"mapped",[100]],[[119994,119994],"disallowed"],[[119995,119995],"mapped",[102]],[[119996,119996],"disallowed"],[[119997,119997],"mapped",[104]],[[119998,119998],"mapped",[105]],[[119999,119999],"mapped",[106]],[[120000,120000],"mapped",[107]],[[120001,120001],"mapped",[108]],[[120002,120002],"mapped",[109]],[[120003,120003],"mapped",[110]],[[120004,120004],"disallowed"],[[120005,120005],"mapped",[112]],[[120006,120006],"mapped",[113]],[[120007,120007],"mapped",[114]],[[120008,120008],"mapped",[115]],[[120009,120009],"mapped",[116]],[[120010,120010],"mapped",[117]],[[120011,120011],"mapped",[118]],[[120012,120012],"mapped",[119]],[[120013,120013],"mapped",[120]],[[120014,120014],"mapped",[121]],[[120015,120015],"mapped",[122]],[[120016,120016],"mapped",[97]],[[120017,120017],"mapped",[98]],[[120018,120018],"mapped",[99]],[[120019,120019],"mapped",[100]],[[120020,120020],"mapped",[101]],[[120021,120021],"mapped",[102]],[[120022,120022],"mapped",[103]],[[120023,120023],"mapped",[104]],[[120024,120024],"mapped",[105]],[[120025,120025],"mapped",[106]],[[120026,120026],"mapped",[107]],[[120027,120027],"mapped",[108]],[[120028,120028],"mapped",[109]],[[120029,120029],"mapped",[110]],[[120030,120030],"mapped",[111]],[[120031,120031],"mapped",[112]],[[120032,120032],"mapped",[113]],[[120033,120033],"mapped",[114]],[[120034,120034],"mapped",[115]],[[120035,120035],"mapped",[116]],[[120036,120036],"mapped",[117]],[[120037,120037],"mapped",[118]],[[120038,120038],"mapped",[119]],[[120039,120039],"mapped",[120]],[[120040,120040],"mapped",[121]],[[120041,120041],"mapped",[122]],[[120042,120042],"mapped",[97]],[[120043,120043],"mapped",[98]],[[120044,120044],"mapped",[99]],[[120045,120045],"mapped",[100]],[[120046,120046],"mapped",[101]],[[120047,120047],"mapped",[102]],[[120048,120048],"mapped",[103]],[[120049,120049],"mapped",[104]],[[120050,120050],"mapped",[105]],[[120051,120051],"mapped",[106]],[[120052,120052],"mapped",[107]],[[120053,120053],"mapped",[108]],[[120054,120054],"mapped",[109]],[[120055,120055],"mapped",[110]],[[120056,120056],"mapped",[111]],[[120057,120057],"mapped",[112]],[[120058,120058],"mapped",[113]],[[120059,120059],"mapped",[114]],[[120060,120060],"mapped",[115]],[[120061,120061],"mapped",[116]],[[120062,120062],"mapped",[117]],[[120063,120063],"mapped",[118]],[[120064,120064],"mapped",[119]],[[120065,120065],"mapped",[120]],[[120066,120066],"mapped",[121]],[[120067,120067],"mapped",[122]],[[120068,120068],"mapped",[97]],[[120069,120069],"mapped",[98]],[[120070,120070],"disallowed"],[[120071,120071],"mapped",[100]],[[120072,120072],"mapped",[101]],[[120073,120073],"mapped",[102]],[[120074,120074],"mapped",[103]],[[120075,120076],"disallowed"],[[120077,120077],"mapped",[106]],[[120078,120078],"mapped",[107]],[[120079,120079],"mapped",[108]],[[120080,120080],"mapped",[109]],[[120081,120081],"mapped",[110]],[[120082,120082],"mapped",[111]],[[120083,120083],"mapped",[112]],[[120084,120084],"mapped",[113]],[[120085,120085],"disallowed"],[[120086,120086],"mapped",[115]],[[120087,120087],"mapped",[116]],[[120088,120088],"mapped",[117]],[[120089,120089],"mapped",[118]],[[120090,120090],"mapped",[119]],[[120091,120091],"mapped",[120]],[[120092,120092],"mapped",[121]],[[120093,120093],"disallowed"],[[120094,120094],"mapped",[97]],[[120095,120095],"mapped",[98]],[[120096,120096],"mapped",[99]],[[120097,120097],"mapped",[100]],[[120098,120098],"mapped",[101]],[[120099,120099],"mapped",[102]],[[120100,120100],"mapped",[103]],[[120101,120101],"mapped",[104]],[[120102,120102],"mapped",[105]],[[120103,120103],"mapped",[106]],[[120104,120104],"mapped",[107]],[[120105,120105],"mapped",[108]],[[120106,120106],"mapped",[109]],[[120107,120107],"mapped",[110]],[[120108,120108],"mapped",[111]],[[120109,120109],"mapped",[112]],[[120110,120110],"mapped",[113]],[[120111,120111],"mapped",[114]],[[120112,120112],"mapped",[115]],[[120113,120113],"mapped",[116]],[[120114,120114],"mapped",[117]],[[120115,120115],"mapped",[118]],[[120116,120116],"mapped",[119]],[[120117,120117],"mapped",[120]],[[120118,120118],"mapped",[121]],[[120119,120119],"mapped",[122]],[[120120,120120],"mapped",[97]],[[120121,120121],"mapped",[98]],[[120122,120122],"disallowed"],[[120123,120123],"mapped",[100]],[[120124,120124],"mapped",[101]],[[120125,120125],"mapped",[102]],[[120126,120126],"mapped",[103]],[[120127,120127],"disallowed"],[[120128,120128],"mapped",[105]],[[120129,120129],"mapped",[106]],[[120130,120130],"mapped",[107]],[[120131,120131],"mapped",[108]],[[120132,120132],"mapped",[109]],[[120133,120133],"disallowed"],[[120134,120134],"mapped",[111]],[[120135,120137],"disallowed"],[[120138,120138],"mapped",[115]],[[120139,120139],"mapped",[116]],[[120140,120140],"mapped",[117]],[[120141,120141],"mapped",[118]],[[120142,120142],"mapped",[119]],[[120143,120143],"mapped",[120]],[[120144,120144],"mapped",[121]],[[120145,120145],"disallowed"],[[120146,120146],"mapped",[97]],[[120147,120147],"mapped",[98]],[[120148,120148],"mapped",[99]],[[120149,120149],"mapped",[100]],[[120150,120150],"mapped",[101]],[[120151,120151],"mapped",[102]],[[120152,120152],"mapped",[103]],[[120153,120153],"mapped",[104]],[[120154,120154],"mapped",[105]],[[120155,120155],"mapped",[106]],[[120156,120156],"mapped",[107]],[[120157,120157],"mapped",[108]],[[120158,120158],"mapped",[109]],[[120159,120159],"mapped",[110]],[[120160,120160],"mapped",[111]],[[120161,120161],"mapped",[112]],[[120162,120162],"mapped",[113]],[[120163,120163],"mapped",[114]],[[120164,120164],"mapped",[115]],[[120165,120165],"mapped",[116]],[[120166,120166],"mapped",[117]],[[120167,120167],"mapped",[118]],[[120168,120168],"mapped",[119]],[[120169,120169],"mapped",[120]],[[120170,120170],"mapped",[121]],[[120171,120171],"mapped",[122]],[[120172,120172],"mapped",[97]],[[120173,120173],"mapped",[98]],[[120174,120174],"mapped",[99]],[[120175,120175],"mapped",[100]],[[120176,120176],"mapped",[101]],[[120177,120177],"mapped",[102]],[[120178,120178],"mapped",[103]],[[120179,120179],"mapped",[104]],[[120180,120180],"mapped",[105]],[[120181,120181],"mapped",[106]],[[120182,120182],"mapped",[107]],[[120183,120183],"mapped",[108]],[[120184,120184],"mapped",[109]],[[120185,120185],"mapped",[110]],[[120186,120186],"mapped",[111]],[[120187,120187],"mapped",[112]],[[120188,120188],"mapped",[113]],[[120189,120189],"mapped",[114]],[[120190,120190],"mapped",[115]],[[120191,120191],"mapped",[116]],[[120192,120192],"mapped",[117]],[[120193,120193],"mapped",[118]],[[120194,120194],"mapped",[119]],[[120195,120195],"mapped",[120]],[[120196,120196],"mapped",[121]],[[120197,120197],"mapped",[122]],[[120198,120198],"mapped",[97]],[[120199,120199],"mapped",[98]],[[120200,120200],"mapped",[99]],[[120201,120201],"mapped",[100]],[[120202,120202],"mapped",[101]],[[120203,120203],"mapped",[102]],[[120204,120204],"mapped",[103]],[[120205,120205],"mapped",[104]],[[120206,120206],"mapped",[105]],[[120207,120207],"mapped",[106]],[[120208,120208],"mapped",[107]],[[120209,120209],"mapped",[108]],[[120210,120210],"mapped",[109]],[[120211,120211],"mapped",[110]],[[120212,120212],"mapped",[111]],[[120213,120213],"mapped",[112]],[[120214,120214],"mapped",[113]],[[120215,120215],"mapped",[114]],[[120216,120216],"mapped",[115]],[[120217,120217],"mapped",[116]],[[120218,120218],"mapped",[117]],[[120219,120219],"mapped",[118]],[[120220,120220],"mapped",[119]],[[120221,120221],"mapped",[120]],[[120222,120222],"mapped",[121]],[[120223,120223],"mapped",[122]],[[120224,120224],"mapped",[97]],[[120225,120225],"mapped",[98]],[[120226,120226],"mapped",[99]],[[120227,120227],"mapped",[100]],[[120228,120228],"mapped",[101]],[[120229,120229],"mapped",[102]],[[120230,120230],"mapped",[103]],[[120231,120231],"mapped",[104]],[[120232,120232],"mapped",[105]],[[120233,120233],"mapped",[106]],[[120234,120234],"mapped",[107]],[[120235,120235],"mapped",[108]],[[120236,120236],"mapped",[109]],[[120237,120237],"mapped",[110]],[[120238,120238],"mapped",[111]],[[120239,120239],"mapped",[112]],[[120240,120240],"mapped",[113]],[[120241,120241],"mapped",[114]],[[120242,120242],"mapped",[115]],[[120243,120243],"mapped",[116]],[[120244,120244],"mapped",[117]],[[120245,120245],"mapped",[118]],[[120246,120246],"mapped",[119]],[[120247,120247],"mapped",[120]],[[120248,120248],"mapped",[121]],[[120249,120249],"mapped",[122]],[[120250,120250],"mapped",[97]],[[120251,120251],"mapped",[98]],[[120252,120252],"mapped",[99]],[[120253,120253],"mapped",[100]],[[120254,120254],"mapped",[101]],[[120255,120255],"mapped",[102]],[[120256,120256],"mapped",[103]],[[120257,120257],"mapped",[104]],[[120258,120258],"mapped",[105]],[[120259,120259],"mapped",[106]],[[120260,120260],"mapped",[107]],[[120261,120261],"mapped",[108]],[[120262,120262],"mapped",[109]],[[120263,120263],"mapped",[110]],[[120264,120264],"mapped",[111]],[[120265,120265],"mapped",[112]],[[120266,120266],"mapped",[113]],[[120267,120267],"mapped",[114]],[[120268,120268],"mapped",[115]],[[120269,120269],"mapped",[116]],[[120270,120270],"mapped",[117]],[[120271,120271],"mapped",[118]],[[120272,120272],"mapped",[119]],[[120273,120273],"mapped",[120]],[[120274,120274],"mapped",[121]],[[120275,120275],"mapped",[122]],[[120276,120276],"mapped",[97]],[[120277,120277],"mapped",[98]],[[120278,120278],"mapped",[99]],[[120279,120279],"mapped",[100]],[[120280,120280],"mapped",[101]],[[120281,120281],"mapped",[102]],[[120282,120282],"mapped",[103]],[[120283,120283],"mapped",[104]],[[120284,120284],"mapped",[105]],[[120285,120285],"mapped",[106]],[[120286,120286],"mapped",[107]],[[120287,120287],"mapped",[108]],[[120288,120288],"mapped",[109]],[[120289,120289],"mapped",[110]],[[120290,120290],"mapped",[111]],[[120291,120291],"mapped",[112]],[[120292,120292],"mapped",[113]],[[120293,120293],"mapped",[114]],[[120294,120294],"mapped",[115]],[[120295,120295],"mapped",[116]],[[120296,120296],"mapped",[117]],[[120297,120297],"mapped",[118]],[[120298,120298],"mapped",[119]],[[120299,120299],"mapped",[120]],[[120300,120300],"mapped",[121]],[[120301,120301],"mapped",[122]],[[120302,120302],"mapped",[97]],[[120303,120303],"mapped",[98]],[[120304,120304],"mapped",[99]],[[120305,120305],"mapped",[100]],[[120306,120306],"mapped",[101]],[[120307,120307],"mapped",[102]],[[120308,120308],"mapped",[103]],[[120309,120309],"mapped",[104]],[[120310,120310],"mapped",[105]],[[120311,120311],"mapped",[106]],[[120312,120312],"mapped",[107]],[[120313,120313],"mapped",[108]],[[120314,120314],"mapped",[109]],[[120315,120315],"mapped",[110]],[[120316,120316],"mapped",[111]],[[120317,120317],"mapped",[112]],[[120318,120318],"mapped",[113]],[[120319,120319],"mapped",[114]],[[120320,120320],"mapped",[115]],[[120321,120321],"mapped",[116]],[[120322,120322],"mapped",[117]],[[120323,120323],"mapped",[118]],[[120324,120324],"mapped",[119]],[[120325,120325],"mapped",[120]],[[120326,120326],"mapped",[121]],[[120327,120327],"mapped",[122]],[[120328,120328],"mapped",[97]],[[120329,120329],"mapped",[98]],[[120330,120330],"mapped",[99]],[[120331,120331],"mapped",[100]],[[120332,120332],"mapped",[101]],[[120333,120333],"mapped",[102]],[[120334,120334],"mapped",[103]],[[120335,120335],"mapped",[104]],[[120336,120336],"mapped",[105]],[[120337,120337],"mapped",[106]],[[120338,120338],"mapped",[107]],[[120339,120339],"mapped",[108]],[[120340,120340],"mapped",[109]],[[120341,120341],"mapped",[110]],[[120342,120342],"mapped",[111]],[[120343,120343],"mapped",[112]],[[120344,120344],"mapped",[113]],[[120345,120345],"mapped",[114]],[[120346,120346],"mapped",[115]],[[120347,120347],"mapped",[116]],[[120348,120348],"mapped",[117]],[[120349,120349],"mapped",[118]],[[120350,120350],"mapped",[119]],[[120351,120351],"mapped",[120]],[[120352,120352],"mapped",[121]],[[120353,120353],"mapped",[122]],[[120354,120354],"mapped",[97]],[[120355,120355],"mapped",[98]],[[120356,120356],"mapped",[99]],[[120357,120357],"mapped",[100]],[[120358,120358],"mapped",[101]],[[120359,120359],"mapped",[102]],[[120360,120360],"mapped",[103]],[[120361,120361],"mapped",[104]],[[120362,120362],"mapped",[105]],[[120363,120363],"mapped",[106]],[[120364,120364],"mapped",[107]],[[120365,120365],"mapped",[108]],[[120366,120366],"mapped",[109]],[[120367,120367],"mapped",[110]],[[120368,120368],"mapped",[111]],[[120369,120369],"mapped",[112]],[[120370,120370],"mapped",[113]],[[120371,120371],"mapped",[114]],[[120372,120372],"mapped",[115]],[[120373,120373],"mapped",[116]],[[120374,120374],"mapped",[117]],[[120375,120375],"mapped",[118]],[[120376,120376],"mapped",[119]],[[120377,120377],"mapped",[120]],[[120378,120378],"mapped",[121]],[[120379,120379],"mapped",[122]],[[120380,120380],"mapped",[97]],[[120381,120381],"mapped",[98]],[[120382,120382],"mapped",[99]],[[120383,120383],"mapped",[100]],[[120384,120384],"mapped",[101]],[[120385,120385],"mapped",[102]],[[120386,120386],"mapped",[103]],[[120387,120387],"mapped",[104]],[[120388,120388],"mapped",[105]],[[120389,120389],"mapped",[106]],[[120390,120390],"mapped",[107]],[[120391,120391],"mapped",[108]],[[120392,120392],"mapped",[109]],[[120393,120393],"mapped",[110]],[[120394,120394],"mapped",[111]],[[120395,120395],"mapped",[112]],[[120396,120396],"mapped",[113]],[[120397,120397],"mapped",[114]],[[120398,120398],"mapped",[115]],[[120399,120399],"mapped",[116]],[[120400,120400],"mapped",[117]],[[120401,120401],"mapped",[118]],[[120402,120402],"mapped",[119]],[[120403,120403],"mapped",[120]],[[120404,120404],"mapped",[121]],[[120405,120405],"mapped",[122]],[[120406,120406],"mapped",[97]],[[120407,120407],"mapped",[98]],[[120408,120408],"mapped",[99]],[[120409,120409],"mapped",[100]],[[120410,120410],"mapped",[101]],[[120411,120411],"mapped",[102]],[[120412,120412],"mapped",[103]],[[120413,120413],"mapped",[104]],[[120414,120414],"mapped",[105]],[[120415,120415],"mapped",[106]],[[120416,120416],"mapped",[107]],[[120417,120417],"mapped",[108]],[[120418,120418],"mapped",[109]],[[120419,120419],"mapped",[110]],[[120420,120420],"mapped",[111]],[[120421,120421],"mapped",[112]],[[120422,120422],"mapped",[113]],[[120423,120423],"mapped",[114]],[[120424,120424],"mapped",[115]],[[120425,120425],"mapped",[116]],[[120426,120426],"mapped",[117]],[[120427,120427],"mapped",[118]],[[120428,120428],"mapped",[119]],[[120429,120429],"mapped",[120]],[[120430,120430],"mapped",[121]],[[120431,120431],"mapped",[122]],[[120432,120432],"mapped",[97]],[[120433,120433],"mapped",[98]],[[120434,120434],"mapped",[99]],[[120435,120435],"mapped",[100]],[[120436,120436],"mapped",[101]],[[120437,120437],"mapped",[102]],[[120438,120438],"mapped",[103]],[[120439,120439],"mapped",[104]],[[120440,120440],"mapped",[105]],[[120441,120441],"mapped",[106]],[[120442,120442],"mapped",[107]],[[120443,120443],"mapped",[108]],[[120444,120444],"mapped",[109]],[[120445,120445],"mapped",[110]],[[120446,120446],"mapped",[111]],[[120447,120447],"mapped",[112]],[[120448,120448],"mapped",[113]],[[120449,120449],"mapped",[114]],[[120450,120450],"mapped",[115]],[[120451,120451],"mapped",[116]],[[120452,120452],"mapped",[117]],[[120453,120453],"mapped",[118]],[[120454,120454],"mapped",[119]],[[120455,120455],"mapped",[120]],[[120456,120456],"mapped",[121]],[[120457,120457],"mapped",[122]],[[120458,120458],"mapped",[97]],[[120459,120459],"mapped",[98]],[[120460,120460],"mapped",[99]],[[120461,120461],"mapped",[100]],[[120462,120462],"mapped",[101]],[[120463,120463],"mapped",[102]],[[120464,120464],"mapped",[103]],[[120465,120465],"mapped",[104]],[[120466,120466],"mapped",[105]],[[120467,120467],"mapped",[106]],[[120468,120468],"mapped",[107]],[[120469,120469],"mapped",[108]],[[120470,120470],"mapped",[109]],[[120471,120471],"mapped",[110]],[[120472,120472],"mapped",[111]],[[120473,120473],"mapped",[112]],[[120474,120474],"mapped",[113]],[[120475,120475],"mapped",[114]],[[120476,120476],"mapped",[115]],[[120477,120477],"mapped",[116]],[[120478,120478],"mapped",[117]],[[120479,120479],"mapped",[118]],[[120480,120480],"mapped",[119]],[[120481,120481],"mapped",[120]],[[120482,120482],"mapped",[121]],[[120483,120483],"mapped",[122]],[[120484,120484],"mapped",[305]],[[120485,120485],"mapped",[567]],[[120486,120487],"disallowed"],[[120488,120488],"mapped",[945]],[[120489,120489],"mapped",[946]],[[120490,120490],"mapped",[947]],[[120491,120491],"mapped",[948]],[[120492,120492],"mapped",[949]],[[120493,120493],"mapped",[950]],[[120494,120494],"mapped",[951]],[[120495,120495],"mapped",[952]],[[120496,120496],"mapped",[953]],[[120497,120497],"mapped",[954]],[[120498,120498],"mapped",[955]],[[120499,120499],"mapped",[956]],[[120500,120500],"mapped",[957]],[[120501,120501],"mapped",[958]],[[120502,120502],"mapped",[959]],[[120503,120503],"mapped",[960]],[[120504,120504],"mapped",[961]],[[120505,120505],"mapped",[952]],[[120506,120506],"mapped",[963]],[[120507,120507],"mapped",[964]],[[120508,120508],"mapped",[965]],[[120509,120509],"mapped",[966]],[[120510,120510],"mapped",[967]],[[120511,120511],"mapped",[968]],[[120512,120512],"mapped",[969]],[[120513,120513],"mapped",[8711]],[[120514,120514],"mapped",[945]],[[120515,120515],"mapped",[946]],[[120516,120516],"mapped",[947]],[[120517,120517],"mapped",[948]],[[120518,120518],"mapped",[949]],[[120519,120519],"mapped",[950]],[[120520,120520],"mapped",[951]],[[120521,120521],"mapped",[952]],[[120522,120522],"mapped",[953]],[[120523,120523],"mapped",[954]],[[120524,120524],"mapped",[955]],[[120525,120525],"mapped",[956]],[[120526,120526],"mapped",[957]],[[120527,120527],"mapped",[958]],[[120528,120528],"mapped",[959]],[[120529,120529],"mapped",[960]],[[120530,120530],"mapped",[961]],[[120531,120532],"mapped",[963]],[[120533,120533],"mapped",[964]],[[120534,120534],"mapped",[965]],[[120535,120535],"mapped",[966]],[[120536,120536],"mapped",[967]],[[120537,120537],"mapped",[968]],[[120538,120538],"mapped",[969]],[[120539,120539],"mapped",[8706]],[[120540,120540],"mapped",[949]],[[120541,120541],"mapped",[952]],[[120542,120542],"mapped",[954]],[[120543,120543],"mapped",[966]],[[120544,120544],"mapped",[961]],[[120545,120545],"mapped",[960]],[[120546,120546],"mapped",[945]],[[120547,120547],"mapped",[946]],[[120548,120548],"mapped",[947]],[[120549,120549],"mapped",[948]],[[120550,120550],"mapped",[949]],[[120551,120551],"mapped",[950]],[[120552,120552],"mapped",[951]],[[120553,120553],"mapped",[952]],[[120554,120554],"mapped",[953]],[[120555,120555],"mapped",[954]],[[120556,120556],"mapped",[955]],[[120557,120557],"mapped",[956]],[[120558,120558],"mapped",[957]],[[120559,120559],"mapped",[958]],[[120560,120560],"mapped",[959]],[[120561,120561],"mapped",[960]],[[120562,120562],"mapped",[961]],[[120563,120563],"mapped",[952]],[[120564,120564],"mapped",[963]],[[120565,120565],"mapped",[964]],[[120566,120566],"mapped",[965]],[[120567,120567],"mapped",[966]],[[120568,120568],"mapped",[967]],[[120569,120569],"mapped",[968]],[[120570,120570],"mapped",[969]],[[120571,120571],"mapped",[8711]],[[120572,120572],"mapped",[945]],[[120573,120573],"mapped",[946]],[[120574,120574],"mapped",[947]],[[120575,120575],"mapped",[948]],[[120576,120576],"mapped",[949]],[[120577,120577],"mapped",[950]],[[120578,120578],"mapped",[951]],[[120579,120579],"mapped",[952]],[[120580,120580],"mapped",[953]],[[120581,120581],"mapped",[954]],[[120582,120582],"mapped",[955]],[[120583,120583],"mapped",[956]],[[120584,120584],"mapped",[957]],[[120585,120585],"mapped",[958]],[[120586,120586],"mapped",[959]],[[120587,120587],"mapped",[960]],[[120588,120588],"mapped",[961]],[[120589,120590],"mapped",[963]],[[120591,120591],"mapped",[964]],[[120592,120592],"mapped",[965]],[[120593,120593],"mapped",[966]],[[120594,120594],"mapped",[967]],[[120595,120595],"mapped",[968]],[[120596,120596],"mapped",[969]],[[120597,120597],"mapped",[8706]],[[120598,120598],"mapped",[949]],[[120599,120599],"mapped",[952]],[[120600,120600],"mapped",[954]],[[120601,120601],"mapped",[966]],[[120602,120602],"mapped",[961]],[[120603,120603],"mapped",[960]],[[120604,120604],"mapped",[945]],[[120605,120605],"mapped",[946]],[[120606,120606],"mapped",[947]],[[120607,120607],"mapped",[948]],[[120608,120608],"mapped",[949]],[[120609,120609],"mapped",[950]],[[120610,120610],"mapped",[951]],[[120611,120611],"mapped",[952]],[[120612,120612],"mapped",[953]],[[120613,120613],"mapped",[954]],[[120614,120614],"mapped",[955]],[[120615,120615],"mapped",[956]],[[120616,120616],"mapped",[957]],[[120617,120617],"mapped",[958]],[[120618,120618],"mapped",[959]],[[120619,120619],"mapped",[960]],[[120620,120620],"mapped",[961]],[[120621,120621],"mapped",[952]],[[120622,120622],"mapped",[963]],[[120623,120623],"mapped",[964]],[[120624,120624],"mapped",[965]],[[120625,120625],"mapped",[966]],[[120626,120626],"mapped",[967]],[[120627,120627],"mapped",[968]],[[120628,120628],"mapped",[969]],[[120629,120629],"mapped",[8711]],[[120630,120630],"mapped",[945]],[[120631,120631],"mapped",[946]],[[120632,120632],"mapped",[947]],[[120633,120633],"mapped",[948]],[[120634,120634],"mapped",[949]],[[120635,120635],"mapped",[950]],[[120636,120636],"mapped",[951]],[[120637,120637],"mapped",[952]],[[120638,120638],"mapped",[953]],[[120639,120639],"mapped",[954]],[[120640,120640],"mapped",[955]],[[120641,120641],"mapped",[956]],[[120642,120642],"mapped",[957]],[[120643,120643],"mapped",[958]],[[120644,120644],"mapped",[959]],[[120645,120645],"mapped",[960]],[[120646,120646],"mapped",[961]],[[120647,120648],"mapped",[963]],[[120649,120649],"mapped",[964]],[[120650,120650],"mapped",[965]],[[120651,120651],"mapped",[966]],[[120652,120652],"mapped",[967]],[[120653,120653],"mapped",[968]],[[120654,120654],"mapped",[969]],[[120655,120655],"mapped",[8706]],[[120656,120656],"mapped",[949]],[[120657,120657],"mapped",[952]],[[120658,120658],"mapped",[954]],[[120659,120659],"mapped",[966]],[[120660,120660],"mapped",[961]],[[120661,120661],"mapped",[960]],[[120662,120662],"mapped",[945]],[[120663,120663],"mapped",[946]],[[120664,120664],"mapped",[947]],[[120665,120665],"mapped",[948]],[[120666,120666],"mapped",[949]],[[120667,120667],"mapped",[950]],[[120668,120668],"mapped",[951]],[[120669,120669],"mapped",[952]],[[120670,120670],"mapped",[953]],[[120671,120671],"mapped",[954]],[[120672,120672],"mapped",[955]],[[120673,120673],"mapped",[956]],[[120674,120674],"mapped",[957]],[[120675,120675],"mapped",[958]],[[120676,120676],"mapped",[959]],[[120677,120677],"mapped",[960]],[[120678,120678],"mapped",[961]],[[120679,120679],"mapped",[952]],[[120680,120680],"mapped",[963]],[[120681,120681],"mapped",[964]],[[120682,120682],"mapped",[965]],[[120683,120683],"mapped",[966]],[[120684,120684],"mapped",[967]],[[120685,120685],"mapped",[968]],[[120686,120686],"mapped",[969]],[[120687,120687],"mapped",[8711]],[[120688,120688],"mapped",[945]],[[120689,120689],"mapped",[946]],[[120690,120690],"mapped",[947]],[[120691,120691],"mapped",[948]],[[120692,120692],"mapped",[949]],[[120693,120693],"mapped",[950]],[[120694,120694],"mapped",[951]],[[120695,120695],"mapped",[952]],[[120696,120696],"mapped",[953]],[[120697,120697],"mapped",[954]],[[120698,120698],"mapped",[955]],[[120699,120699],"mapped",[956]],[[120700,120700],"mapped",[957]],[[120701,120701],"mapped",[958]],[[120702,120702],"mapped",[959]],[[120703,120703],"mapped",[960]],[[120704,120704],"mapped",[961]],[[120705,120706],"mapped",[963]],[[120707,120707],"mapped",[964]],[[120708,120708],"mapped",[965]],[[120709,120709],"mapped",[966]],[[120710,120710],"mapped",[967]],[[120711,120711],"mapped",[968]],[[120712,120712],"mapped",[969]],[[120713,120713],"mapped",[8706]],[[120714,120714],"mapped",[949]],[[120715,120715],"mapped",[952]],[[120716,120716],"mapped",[954]],[[120717,120717],"mapped",[966]],[[120718,120718],"mapped",[961]],[[120719,120719],"mapped",[960]],[[120720,120720],"mapped",[945]],[[120721,120721],"mapped",[946]],[[120722,120722],"mapped",[947]],[[120723,120723],"mapped",[948]],[[120724,120724],"mapped",[949]],[[120725,120725],"mapped",[950]],[[120726,120726],"mapped",[951]],[[120727,120727],"mapped",[952]],[[120728,120728],"mapped",[953]],[[120729,120729],"mapped",[954]],[[120730,120730],"mapped",[955]],[[120731,120731],"mapped",[956]],[[120732,120732],"mapped",[957]],[[120733,120733],"mapped",[958]],[[120734,120734],"mapped",[959]],[[120735,120735],"mapped",[960]],[[120736,120736],"mapped",[961]],[[120737,120737],"mapped",[952]],[[120738,120738],"mapped",[963]],[[120739,120739],"mapped",[964]],[[120740,120740],"mapped",[965]],[[120741,120741],"mapped",[966]],[[120742,120742],"mapped",[967]],[[120743,120743],"mapped",[968]],[[120744,120744],"mapped",[969]],[[120745,120745],"mapped",[8711]],[[120746,120746],"mapped",[945]],[[120747,120747],"mapped",[946]],[[120748,120748],"mapped",[947]],[[120749,120749],"mapped",[948]],[[120750,120750],"mapped",[949]],[[120751,120751],"mapped",[950]],[[120752,120752],"mapped",[951]],[[120753,120753],"mapped",[952]],[[120754,120754],"mapped",[953]],[[120755,120755],"mapped",[954]],[[120756,120756],"mapped",[955]],[[120757,120757],"mapped",[956]],[[120758,120758],"mapped",[957]],[[120759,120759],"mapped",[958]],[[120760,120760],"mapped",[959]],[[120761,120761],"mapped",[960]],[[120762,120762],"mapped",[961]],[[120763,120764],"mapped",[963]],[[120765,120765],"mapped",[964]],[[120766,120766],"mapped",[965]],[[120767,120767],"mapped",[966]],[[120768,120768],"mapped",[967]],[[120769,120769],"mapped",[968]],[[120770,120770],"mapped",[969]],[[120771,120771],"mapped",[8706]],[[120772,120772],"mapped",[949]],[[120773,120773],"mapped",[952]],[[120774,120774],"mapped",[954]],[[120775,120775],"mapped",[966]],[[120776,120776],"mapped",[961]],[[120777,120777],"mapped",[960]],[[120778,120779],"mapped",[989]],[[120780,120781],"disallowed"],[[120782,120782],"mapped",[48]],[[120783,120783],"mapped",[49]],[[120784,120784],"mapped",[50]],[[120785,120785],"mapped",[51]],[[120786,120786],"mapped",[52]],[[120787,120787],"mapped",[53]],[[120788,120788],"mapped",[54]],[[120789,120789],"mapped",[55]],[[120790,120790],"mapped",[56]],[[120791,120791],"mapped",[57]],[[120792,120792],"mapped",[48]],[[120793,120793],"mapped",[49]],[[120794,120794],"mapped",[50]],[[120795,120795],"mapped",[51]],[[120796,120796],"mapped",[52]],[[120797,120797],"mapped",[53]],[[120798,120798],"mapped",[54]],[[120799,120799],"mapped",[55]],[[120800,120800],"mapped",[56]],[[120801,120801],"mapped",[57]],[[120802,120802],"mapped",[48]],[[120803,120803],"mapped",[49]],[[120804,120804],"mapped",[50]],[[120805,120805],"mapped",[51]],[[120806,120806],"mapped",[52]],[[120807,120807],"mapped",[53]],[[120808,120808],"mapped",[54]],[[120809,120809],"mapped",[55]],[[120810,120810],"mapped",[56]],[[120811,120811],"mapped",[57]],[[120812,120812],"mapped",[48]],[[120813,120813],"mapped",[49]],[[120814,120814],"mapped",[50]],[[120815,120815],"mapped",[51]],[[120816,120816],"mapped",[52]],[[120817,120817],"mapped",[53]],[[120818,120818],"mapped",[54]],[[120819,120819],"mapped",[55]],[[120820,120820],"mapped",[56]],[[120821,120821],"mapped",[57]],[[120822,120822],"mapped",[48]],[[120823,120823],"mapped",[49]],[[120824,120824],"mapped",[50]],[[120825,120825],"mapped",[51]],[[120826,120826],"mapped",[52]],[[120827,120827],"mapped",[53]],[[120828,120828],"mapped",[54]],[[120829,120829],"mapped",[55]],[[120830,120830],"mapped",[56]],[[120831,120831],"mapped",[57]],[[120832,121343],"valid",[],"NV8"],[[121344,121398],"valid"],[[121399,121402],"valid",[],"NV8"],[[121403,121452],"valid"],[[121453,121460],"valid",[],"NV8"],[[121461,121461],"valid"],[[121462,121475],"valid",[],"NV8"],[[121476,121476],"valid"],[[121477,121483],"valid",[],"NV8"],[[121484,121498],"disallowed"],[[121499,121503],"valid"],[[121504,121504],"disallowed"],[[121505,121519],"valid"],[[121520,124927],"disallowed"],[[124928,125124],"valid"],[[125125,125126],"disallowed"],[[125127,125135],"valid",[],"NV8"],[[125136,125142],"valid"],[[125143,126463],"disallowed"],[[126464,126464],"mapped",[1575]],[[126465,126465],"mapped",[1576]],[[126466,126466],"mapped",[1580]],[[126467,126467],"mapped",[1583]],[[126468,126468],"disallowed"],[[126469,126469],"mapped",[1608]],[[126470,126470],"mapped",[1586]],[[126471,126471],"mapped",[1581]],[[126472,126472],"mapped",[1591]],[[126473,126473],"mapped",[1610]],[[126474,126474],"mapped",[1603]],[[126475,126475],"mapped",[1604]],[[126476,126476],"mapped",[1605]],[[126477,126477],"mapped",[1606]],[[126478,126478],"mapped",[1587]],[[126479,126479],"mapped",[1593]],[[126480,126480],"mapped",[1601]],[[126481,126481],"mapped",[1589]],[[126482,126482],"mapped",[1602]],[[126483,126483],"mapped",[1585]],[[126484,126484],"mapped",[1588]],[[126485,126485],"mapped",[1578]],[[126486,126486],"mapped",[1579]],[[126487,126487],"mapped",[1582]],[[126488,126488],"mapped",[1584]],[[126489,126489],"mapped",[1590]],[[126490,126490],"mapped",[1592]],[[126491,126491],"mapped",[1594]],[[126492,126492],"mapped",[1646]],[[126493,126493],"mapped",[1722]],[[126494,126494],"mapped",[1697]],[[126495,126495],"mapped",[1647]],[[126496,126496],"disallowed"],[[126497,126497],"mapped",[1576]],[[126498,126498],"mapped",[1580]],[[126499,126499],"disallowed"],[[126500,126500],"mapped",[1607]],[[126501,126502],"disallowed"],[[126503,126503],"mapped",[1581]],[[126504,126504],"disallowed"],[[126505,126505],"mapped",[1610]],[[126506,126506],"mapped",[1603]],[[126507,126507],"mapped",[1604]],[[126508,126508],"mapped",[1605]],[[126509,126509],"mapped",[1606]],[[126510,126510],"mapped",[1587]],[[126511,126511],"mapped",[1593]],[[126512,126512],"mapped",[1601]],[[126513,126513],"mapped",[1589]],[[126514,126514],"mapped",[1602]],[[126515,126515],"disallowed"],[[126516,126516],"mapped",[1588]],[[126517,126517],"mapped",[1578]],[[126518,126518],"mapped",[1579]],[[126519,126519],"mapped",[1582]],[[126520,126520],"disallowed"],[[126521,126521],"mapped",[1590]],[[126522,126522],"disallowed"],[[126523,126523],"mapped",[1594]],[[126524,126529],"disallowed"],[[126530,126530],"mapped",[1580]],[[126531,126534],"disallowed"],[[126535,126535],"mapped",[1581]],[[126536,126536],"disallowed"],[[126537,126537],"mapped",[1610]],[[126538,126538],"disallowed"],[[126539,126539],"mapped",[1604]],[[126540,126540],"disallowed"],[[126541,126541],"mapped",[1606]],[[126542,126542],"mapped",[1587]],[[126543,126543],"mapped",[1593]],[[126544,126544],"disallowed"],[[126545,126545],"mapped",[1589]],[[126546,126546],"mapped",[1602]],[[126547,126547],"disallowed"],[[126548,126548],"mapped",[1588]],[[126549,126550],"disallowed"],[[126551,126551],"mapped",[1582]],[[126552,126552],"disallowed"],[[126553,126553],"mapped",[1590]],[[126554,126554],"disallowed"],[[126555,126555],"mapped",[1594]],[[126556,126556],"disallowed"],[[126557,126557],"mapped",[1722]],[[126558,126558],"disallowed"],[[126559,126559],"mapped",[1647]],[[126560,126560],"disallowed"],[[126561,126561],"mapped",[1576]],[[126562,126562],"mapped",[1580]],[[126563,126563],"disallowed"],[[126564,126564],"mapped",[1607]],[[126565,126566],"disallowed"],[[126567,126567],"mapped",[1581]],[[126568,126568],"mapped",[1591]],[[126569,126569],"mapped",[1610]],[[126570,126570],"mapped",[1603]],[[126571,126571],"disallowed"],[[126572,126572],"mapped",[1605]],[[126573,126573],"mapped",[1606]],[[126574,126574],"mapped",[1587]],[[126575,126575],"mapped",[1593]],[[126576,126576],"mapped",[1601]],[[126577,126577],"mapped",[1589]],[[126578,126578],"mapped",[1602]],[[126579,126579],"disallowed"],[[126580,126580],"mapped",[1588]],[[126581,126581],"mapped",[1578]],[[126582,126582],"mapped",[1579]],[[126583,126583],"mapped",[1582]],[[126584,126584],"disallowed"],[[126585,126585],"mapped",[1590]],[[126586,126586],"mapped",[1592]],[[126587,126587],"mapped",[1594]],[[126588,126588],"mapped",[1646]],[[126589,126589],"disallowed"],[[126590,126590],"mapped",[1697]],[[126591,126591],"disallowed"],[[126592,126592],"mapped",[1575]],[[126593,126593],"mapped",[1576]],[[126594,126594],"mapped",[1580]],[[126595,126595],"mapped",[1583]],[[126596,126596],"mapped",[1607]],[[126597,126597],"mapped",[1608]],[[126598,126598],"mapped",[1586]],[[126599,126599],"mapped",[1581]],[[126600,126600],"mapped",[1591]],[[126601,126601],"mapped",[1610]],[[126602,126602],"disallowed"],[[126603,126603],"mapped",[1604]],[[126604,126604],"mapped",[1605]],[[126605,126605],"mapped",[1606]],[[126606,126606],"mapped",[1587]],[[126607,126607],"mapped",[1593]],[[126608,126608],"mapped",[1601]],[[126609,126609],"mapped",[1589]],[[126610,126610],"mapped",[1602]],[[126611,126611],"mapped",[1585]],[[126612,126612],"mapped",[1588]],[[126613,126613],"mapped",[1578]],[[126614,126614],"mapped",[1579]],[[126615,126615],"mapped",[1582]],[[126616,126616],"mapped",[1584]],[[126617,126617],"mapped",[1590]],[[126618,126618],"mapped",[1592]],[[126619,126619],"mapped",[1594]],[[126620,126624],"disallowed"],[[126625,126625],"mapped",[1576]],[[126626,126626],"mapped",[1580]],[[126627,126627],"mapped",[1583]],[[126628,126628],"disallowed"],[[126629,126629],"mapped",[1608]],[[126630,126630],"mapped",[1586]],[[126631,126631],"mapped",[1581]],[[126632,126632],"mapped",[1591]],[[126633,126633],"mapped",[1610]],[[126634,126634],"disallowed"],[[126635,126635],"mapped",[1604]],[[126636,126636],"mapped",[1605]],[[126637,126637],"mapped",[1606]],[[126638,126638],"mapped",[1587]],[[126639,126639],"mapped",[1593]],[[126640,126640],"mapped",[1601]],[[126641,126641],"mapped",[1589]],[[126642,126642],"mapped",[1602]],[[126643,126643],"mapped",[1585]],[[126644,126644],"mapped",[1588]],[[126645,126645],"mapped",[1578]],[[126646,126646],"mapped",[1579]],[[126647,126647],"mapped",[1582]],[[126648,126648],"mapped",[1584]],[[126649,126649],"mapped",[1590]],[[126650,126650],"mapped",[1592]],[[126651,126651],"mapped",[1594]],[[126652,126703],"disallowed"],[[126704,126705],"valid",[],"NV8"],[[126706,126975],"disallowed"],[[126976,127019],"valid",[],"NV8"],[[127020,127023],"disallowed"],[[127024,127123],"valid",[],"NV8"],[[127124,127135],"disallowed"],[[127136,127150],"valid",[],"NV8"],[[127151,127152],"disallowed"],[[127153,127166],"valid",[],"NV8"],[[127167,127167],"valid",[],"NV8"],[[127168,127168],"disallowed"],[[127169,127183],"valid",[],"NV8"],[[127184,127184],"disallowed"],[[127185,127199],"valid",[],"NV8"],[[127200,127221],"valid",[],"NV8"],[[127222,127231],"disallowed"],[[127232,127232],"disallowed"],[[127233,127233],"disallowed_STD3_mapped",[48,44]],[[127234,127234],"disallowed_STD3_mapped",[49,44]],[[127235,127235],"disallowed_STD3_mapped",[50,44]],[[127236,127236],"disallowed_STD3_mapped",[51,44]],[[127237,127237],"disallowed_STD3_mapped",[52,44]],[[127238,127238],"disallowed_STD3_mapped",[53,44]],[[127239,127239],"disallowed_STD3_mapped",[54,44]],[[127240,127240],"disallowed_STD3_mapped",[55,44]],[[127241,127241],"disallowed_STD3_mapped",[56,44]],[[127242,127242],"disallowed_STD3_mapped",[57,44]],[[127243,127244],"valid",[],"NV8"],[[127245,127247],"disallowed"],[[127248,127248],"disallowed_STD3_mapped",[40,97,41]],[[127249,127249],"disallowed_STD3_mapped",[40,98,41]],[[127250,127250],"disallowed_STD3_mapped",[40,99,41]],[[127251,127251],"disallowed_STD3_mapped",[40,100,41]],[[127252,127252],"disallowed_STD3_mapped",[40,101,41]],[[127253,127253],"disallowed_STD3_mapped",[40,102,41]],[[127254,127254],"disallowed_STD3_mapped",[40,103,41]],[[127255,127255],"disallowed_STD3_mapped",[40,104,41]],[[127256,127256],"disallowed_STD3_mapped",[40,105,41]],[[127257,127257],"disallowed_STD3_mapped",[40,106,41]],[[127258,127258],"disallowed_STD3_mapped",[40,107,41]],[[127259,127259],"disallowed_STD3_mapped",[40,108,41]],[[127260,127260],"disallowed_STD3_mapped",[40,109,41]],[[127261,127261],"disallowed_STD3_mapped",[40,110,41]],[[127262,127262],"disallowed_STD3_mapped",[40,111,41]],[[127263,127263],"disallowed_STD3_mapped",[40,112,41]],[[127264,127264],"disallowed_STD3_mapped",[40,113,41]],[[127265,127265],"disallowed_STD3_mapped",[40,114,41]],[[127266,127266],"disallowed_STD3_mapped",[40,115,41]],[[127267,127267],"disallowed_STD3_mapped",[40,116,41]],[[127268,127268],"disallowed_STD3_mapped",[40,117,41]],[[127269,127269],"disallowed_STD3_mapped",[40,118,41]],[[127270,127270],"disallowed_STD3_mapped",[40,119,41]],[[127271,127271],"disallowed_STD3_mapped",[40,120,41]],[[127272,127272],"disallowed_STD3_mapped",[40,121,41]],[[127273,127273],"disallowed_STD3_mapped",[40,122,41]],[[127274,127274],"mapped",[12308,115,12309]],[[127275,127275],"mapped",[99]],[[127276,127276],"mapped",[114]],[[127277,127277],"mapped",[99,100]],[[127278,127278],"mapped",[119,122]],[[127279,127279],"disallowed"],[[127280,127280],"mapped",[97]],[[127281,127281],"mapped",[98]],[[127282,127282],"mapped",[99]],[[127283,127283],"mapped",[100]],[[127284,127284],"mapped",[101]],[[127285,127285],"mapped",[102]],[[127286,127286],"mapped",[103]],[[127287,127287],"mapped",[104]],[[127288,127288],"mapped",[105]],[[127289,127289],"mapped",[106]],[[127290,127290],"mapped",[107]],[[127291,127291],"mapped",[108]],[[127292,127292],"mapped",[109]],[[127293,127293],"mapped",[110]],[[127294,127294],"mapped",[111]],[[127295,127295],"mapped",[112]],[[127296,127296],"mapped",[113]],[[127297,127297],"mapped",[114]],[[127298,127298],"mapped",[115]],[[127299,127299],"mapped",[116]],[[127300,127300],"mapped",[117]],[[127301,127301],"mapped",[118]],[[127302,127302],"mapped",[119]],[[127303,127303],"mapped",[120]],[[127304,127304],"mapped",[121]],[[127305,127305],"mapped",[122]],[[127306,127306],"mapped",[104,118]],[[127307,127307],"mapped",[109,118]],[[127308,127308],"mapped",[115,100]],[[127309,127309],"mapped",[115,115]],[[127310,127310],"mapped",[112,112,118]],[[127311,127311],"mapped",[119,99]],[[127312,127318],"valid",[],"NV8"],[[127319,127319],"valid",[],"NV8"],[[127320,127326],"valid",[],"NV8"],[[127327,127327],"valid",[],"NV8"],[[127328,127337],"valid",[],"NV8"],[[127338,127338],"mapped",[109,99]],[[127339,127339],"mapped",[109,100]],[[127340,127343],"disallowed"],[[127344,127352],"valid",[],"NV8"],[[127353,127353],"valid",[],"NV8"],[[127354,127354],"valid",[],"NV8"],[[127355,127356],"valid",[],"NV8"],[[127357,127358],"valid",[],"NV8"],[[127359,127359],"valid",[],"NV8"],[[127360,127369],"valid",[],"NV8"],[[127370,127373],"valid",[],"NV8"],[[127374,127375],"valid",[],"NV8"],[[127376,127376],"mapped",[100,106]],[[127377,127386],"valid",[],"NV8"],[[127387,127461],"disallowed"],[[127462,127487],"valid",[],"NV8"],[[127488,127488],"mapped",[12411,12363]],[[127489,127489],"mapped",[12467,12467]],[[127490,127490],"mapped",[12469]],[[127491,127503],"disallowed"],[[127504,127504],"mapped",[25163]],[[127505,127505],"mapped",[23383]],[[127506,127506],"mapped",[21452]],[[127507,127507],"mapped",[12487]],[[127508,127508],"mapped",[20108]],[[127509,127509],"mapped",[22810]],[[127510,127510],"mapped",[35299]],[[127511,127511],"mapped",[22825]],[[127512,127512],"mapped",[20132]],[[127513,127513],"mapped",[26144]],[[127514,127514],"mapped",[28961]],[[127515,127515],"mapped",[26009]],[[127516,127516],"mapped",[21069]],[[127517,127517],"mapped",[24460]],[[127518,127518],"mapped",[20877]],[[127519,127519],"mapped",[26032]],[[127520,127520],"mapped",[21021]],[[127521,127521],"mapped",[32066]],[[127522,127522],"mapped",[29983]],[[127523,127523],"mapped",[36009]],[[127524,127524],"mapped",[22768]],[[127525,127525],"mapped",[21561]],[[127526,127526],"mapped",[28436]],[[127527,127527],"mapped",[25237]],[[127528,127528],"mapped",[25429]],[[127529,127529],"mapped",[19968]],[[127530,127530],"mapped",[19977]],[[127531,127531],"mapped",[36938]],[[127532,127532],"mapped",[24038]],[[127533,127533],"mapped",[20013]],[[127534,127534],"mapped",[21491]],[[127535,127535],"mapped",[25351]],[[127536,127536],"mapped",[36208]],[[127537,127537],"mapped",[25171]],[[127538,127538],"mapped",[31105]],[[127539,127539],"mapped",[31354]],[[127540,127540],"mapped",[21512]],[[127541,127541],"mapped",[28288]],[[127542,127542],"mapped",[26377]],[[127543,127543],"mapped",[26376]],[[127544,127544],"mapped",[30003]],[[127545,127545],"mapped",[21106]],[[127546,127546],"mapped",[21942]],[[127547,127551],"disallowed"],[[127552,127552],"mapped",[12308,26412,12309]],[[127553,127553],"mapped",[12308,19977,12309]],[[127554,127554],"mapped",[12308,20108,12309]],[[127555,127555],"mapped",[12308,23433,12309]],[[127556,127556],"mapped",[12308,28857,12309]],[[127557,127557],"mapped",[12308,25171,12309]],[[127558,127558],"mapped",[12308,30423,12309]],[[127559,127559],"mapped",[12308,21213,12309]],[[127560,127560],"mapped",[12308,25943,12309]],[[127561,127567],"disallowed"],[[127568,127568],"mapped",[24471]],[[127569,127569],"mapped",[21487]],[[127570,127743],"disallowed"],[[127744,127776],"valid",[],"NV8"],[[127777,127788],"valid",[],"NV8"],[[127789,127791],"valid",[],"NV8"],[[127792,127797],"valid",[],"NV8"],[[127798,127798],"valid",[],"NV8"],[[127799,127868],"valid",[],"NV8"],[[127869,127869],"valid",[],"NV8"],[[127870,127871],"valid",[],"NV8"],[[127872,127891],"valid",[],"NV8"],[[127892,127903],"valid",[],"NV8"],[[127904,127940],"valid",[],"NV8"],[[127941,127941],"valid",[],"NV8"],[[127942,127946],"valid",[],"NV8"],[[127947,127950],"valid",[],"NV8"],[[127951,127955],"valid",[],"NV8"],[[127956,127967],"valid",[],"NV8"],[[127968,127984],"valid",[],"NV8"],[[127985,127991],"valid",[],"NV8"],[[127992,127999],"valid",[],"NV8"],[[128000,128062],"valid",[],"NV8"],[[128063,128063],"valid",[],"NV8"],[[128064,128064],"valid",[],"NV8"],[[128065,128065],"valid",[],"NV8"],[[128066,128247],"valid",[],"NV8"],[[128248,128248],"valid",[],"NV8"],[[128249,128252],"valid",[],"NV8"],[[128253,128254],"valid",[],"NV8"],[[128255,128255],"valid",[],"NV8"],[[128256,128317],"valid",[],"NV8"],[[128318,128319],"valid",[],"NV8"],[[128320,128323],"valid",[],"NV8"],[[128324,128330],"valid",[],"NV8"],[[128331,128335],"valid",[],"NV8"],[[128336,128359],"valid",[],"NV8"],[[128360,128377],"valid",[],"NV8"],[[128378,128378],"disallowed"],[[128379,128419],"valid",[],"NV8"],[[128420,128420],"disallowed"],[[128421,128506],"valid",[],"NV8"],[[128507,128511],"valid",[],"NV8"],[[128512,128512],"valid",[],"NV8"],[[128513,128528],"valid",[],"NV8"],[[128529,128529],"valid",[],"NV8"],[[128530,128532],"valid",[],"NV8"],[[128533,128533],"valid",[],"NV8"],[[128534,128534],"valid",[],"NV8"],[[128535,128535],"valid",[],"NV8"],[[128536,128536],"valid",[],"NV8"],[[128537,128537],"valid",[],"NV8"],[[128538,128538],"valid",[],"NV8"],[[128539,128539],"valid",[],"NV8"],[[128540,128542],"valid",[],"NV8"],[[128543,128543],"valid",[],"NV8"],[[128544,128549],"valid",[],"NV8"],[[128550,128551],"valid",[],"NV8"],[[128552,128555],"valid",[],"NV8"],[[128556,128556],"valid",[],"NV8"],[[128557,128557],"valid",[],"NV8"],[[128558,128559],"valid",[],"NV8"],[[128560,128563],"valid",[],"NV8"],[[128564,128564],"valid",[],"NV8"],[[128565,128576],"valid",[],"NV8"],[[128577,128578],"valid",[],"NV8"],[[128579,128580],"valid",[],"NV8"],[[128581,128591],"valid",[],"NV8"],[[128592,128639],"valid",[],"NV8"],[[128640,128709],"valid",[],"NV8"],[[128710,128719],"valid",[],"NV8"],[[128720,128720],"valid",[],"NV8"],[[128721,128735],"disallowed"],[[128736,128748],"valid",[],"NV8"],[[128749,128751],"disallowed"],[[128752,128755],"valid",[],"NV8"],[[128756,128767],"disallowed"],[[128768,128883],"valid",[],"NV8"],[[128884,128895],"disallowed"],[[128896,128980],"valid",[],"NV8"],[[128981,129023],"disallowed"],[[129024,129035],"valid",[],"NV8"],[[129036,129039],"disallowed"],[[129040,129095],"valid",[],"NV8"],[[129096,129103],"disallowed"],[[129104,129113],"valid",[],"NV8"],[[129114,129119],"disallowed"],[[129120,129159],"valid",[],"NV8"],[[129160,129167],"disallowed"],[[129168,129197],"valid",[],"NV8"],[[129198,129295],"disallowed"],[[129296,129304],"valid",[],"NV8"],[[129305,129407],"disallowed"],[[129408,129412],"valid",[],"NV8"],[[129413,129471],"disallowed"],[[129472,129472],"valid",[],"NV8"],[[129473,131069],"disallowed"],[[131070,131071],"disallowed"],[[131072,173782],"valid"],[[173783,173823],"disallowed"],[[173824,177972],"valid"],[[177973,177983],"disallowed"],[[177984,178205],"valid"],[[178206,178207],"disallowed"],[[178208,183969],"valid"],[[183970,194559],"disallowed"],[[194560,194560],"mapped",[20029]],[[194561,194561],"mapped",[20024]],[[194562,194562],"mapped",[20033]],[[194563,194563],"mapped",[131362]],[[194564,194564],"mapped",[20320]],[[194565,194565],"mapped",[20398]],[[194566,194566],"mapped",[20411]],[[194567,194567],"mapped",[20482]],[[194568,194568],"mapped",[20602]],[[194569,194569],"mapped",[20633]],[[194570,194570],"mapped",[20711]],[[194571,194571],"mapped",[20687]],[[194572,194572],"mapped",[13470]],[[194573,194573],"mapped",[132666]],[[194574,194574],"mapped",[20813]],[[194575,194575],"mapped",[20820]],[[194576,194576],"mapped",[20836]],[[194577,194577],"mapped",[20855]],[[194578,194578],"mapped",[132380]],[[194579,194579],"mapped",[13497]],[[194580,194580],"mapped",[20839]],[[194581,194581],"mapped",[20877]],[[194582,194582],"mapped",[132427]],[[194583,194583],"mapped",[20887]],[[194584,194584],"mapped",[20900]],[[194585,194585],"mapped",[20172]],[[194586,194586],"mapped",[20908]],[[194587,194587],"mapped",[20917]],[[194588,194588],"mapped",[168415]],[[194589,194589],"mapped",[20981]],[[194590,194590],"mapped",[20995]],[[194591,194591],"mapped",[13535]],[[194592,194592],"mapped",[21051]],[[194593,194593],"mapped",[21062]],[[194594,194594],"mapped",[21106]],[[194595,194595],"mapped",[21111]],[[194596,194596],"mapped",[13589]],[[194597,194597],"mapped",[21191]],[[194598,194598],"mapped",[21193]],[[194599,194599],"mapped",[21220]],[[194600,194600],"mapped",[21242]],[[194601,194601],"mapped",[21253]],[[194602,194602],"mapped",[21254]],[[194603,194603],"mapped",[21271]],[[194604,194604],"mapped",[21321]],[[194605,194605],"mapped",[21329]],[[194606,194606],"mapped",[21338]],[[194607,194607],"mapped",[21363]],[[194608,194608],"mapped",[21373]],[[194609,194611],"mapped",[21375]],[[194612,194612],"mapped",[133676]],[[194613,194613],"mapped",[28784]],[[194614,194614],"mapped",[21450]],[[194615,194615],"mapped",[21471]],[[194616,194616],"mapped",[133987]],[[194617,194617],"mapped",[21483]],[[194618,194618],"mapped",[21489]],[[194619,194619],"mapped",[21510]],[[194620,194620],"mapped",[21662]],[[194621,194621],"mapped",[21560]],[[194622,194622],"mapped",[21576]],[[194623,194623],"mapped",[21608]],[[194624,194624],"mapped",[21666]],[[194625,194625],"mapped",[21750]],[[194626,194626],"mapped",[21776]],[[194627,194627],"mapped",[21843]],[[194628,194628],"mapped",[21859]],[[194629,194630],"mapped",[21892]],[[194631,194631],"mapped",[21913]],[[194632,194632],"mapped",[21931]],[[194633,194633],"mapped",[21939]],[[194634,194634],"mapped",[21954]],[[194635,194635],"mapped",[22294]],[[194636,194636],"mapped",[22022]],[[194637,194637],"mapped",[22295]],[[194638,194638],"mapped",[22097]],[[194639,194639],"mapped",[22132]],[[194640,194640],"mapped",[20999]],[[194641,194641],"mapped",[22766]],[[194642,194642],"mapped",[22478]],[[194643,194643],"mapped",[22516]],[[194644,194644],"mapped",[22541]],[[194645,194645],"mapped",[22411]],[[194646,194646],"mapped",[22578]],[[194647,194647],"mapped",[22577]],[[194648,194648],"mapped",[22700]],[[194649,194649],"mapped",[136420]],[[194650,194650],"mapped",[22770]],[[194651,194651],"mapped",[22775]],[[194652,194652],"mapped",[22790]],[[194653,194653],"mapped",[22810]],[[194654,194654],"mapped",[22818]],[[194655,194655],"mapped",[22882]],[[194656,194656],"mapped",[136872]],[[194657,194657],"mapped",[136938]],[[194658,194658],"mapped",[23020]],[[194659,194659],"mapped",[23067]],[[194660,194660],"mapped",[23079]],[[194661,194661],"mapped",[23000]],[[194662,194662],"mapped",[23142]],[[194663,194663],"mapped",[14062]],[[194664,194664],"disallowed"],[[194665,194665],"mapped",[23304]],[[194666,194667],"mapped",[23358]],[[194668,194668],"mapped",[137672]],[[194669,194669],"mapped",[23491]],[[194670,194670],"mapped",[23512]],[[194671,194671],"mapped",[23527]],[[194672,194672],"mapped",[23539]],[[194673,194673],"mapped",[138008]],[[194674,194674],"mapped",[23551]],[[194675,194675],"mapped",[23558]],[[194676,194676],"disallowed"],[[194677,194677],"mapped",[23586]],[[194678,194678],"mapped",[14209]],[[194679,194679],"mapped",[23648]],[[194680,194680],"mapped",[23662]],[[194681,194681],"mapped",[23744]],[[194682,194682],"mapped",[23693]],[[194683,194683],"mapped",[138724]],[[194684,194684],"mapped",[23875]],[[194685,194685],"mapped",[138726]],[[194686,194686],"mapped",[23918]],[[194687,194687],"mapped",[23915]],[[194688,194688],"mapped",[23932]],[[194689,194689],"mapped",[24033]],[[194690,194690],"mapped",[24034]],[[194691,194691],"mapped",[14383]],[[194692,194692],"mapped",[24061]],[[194693,194693],"mapped",[24104]],[[194694,194694],"mapped",[24125]],[[194695,194695],"mapped",[24169]],[[194696,194696],"mapped",[14434]],[[194697,194697],"mapped",[139651]],[[194698,194698],"mapped",[14460]],[[194699,194699],"mapped",[24240]],[[194700,194700],"mapped",[24243]],[[194701,194701],"mapped",[24246]],[[194702,194702],"mapped",[24266]],[[194703,194703],"mapped",[172946]],[[194704,194704],"mapped",[24318]],[[194705,194706],"mapped",[140081]],[[194707,194707],"mapped",[33281]],[[194708,194709],"mapped",[24354]],[[194710,194710],"mapped",[14535]],[[194711,194711],"mapped",[144056]],[[194712,194712],"mapped",[156122]],[[194713,194713],"mapped",[24418]],[[194714,194714],"mapped",[24427]],[[194715,194715],"mapped",[14563]],[[194716,194716],"mapped",[24474]],[[194717,194717],"mapped",[24525]],[[194718,194718],"mapped",[24535]],[[194719,194719],"mapped",[24569]],[[194720,194720],"mapped",[24705]],[[194721,194721],"mapped",[14650]],[[194722,194722],"mapped",[14620]],[[194723,194723],"mapped",[24724]],[[194724,194724],"mapped",[141012]],[[194725,194725],"mapped",[24775]],[[194726,194726],"mapped",[24904]],[[194727,194727],"mapped",[24908]],[[194728,194728],"mapped",[24910]],[[194729,194729],"mapped",[24908]],[[194730,194730],"mapped",[24954]],[[194731,194731],"mapped",[24974]],[[194732,194732],"mapped",[25010]],[[194733,194733],"mapped",[24996]],[[194734,194734],"mapped",[25007]],[[194735,194735],"mapped",[25054]],[[194736,194736],"mapped",[25074]],[[194737,194737],"mapped",[25078]],[[194738,194738],"mapped",[25104]],[[194739,194739],"mapped",[25115]],[[194740,194740],"mapped",[25181]],[[194741,194741],"mapped",[25265]],[[194742,194742],"mapped",[25300]],[[194743,194743],"mapped",[25424]],[[194744,194744],"mapped",[142092]],[[194745,194745],"mapped",[25405]],[[194746,194746],"mapped",[25340]],[[194747,194747],"mapped",[25448]],[[194748,194748],"mapped",[25475]],[[194749,194749],"mapped",[25572]],[[194750,194750],"mapped",[142321]],[[194751,194751],"mapped",[25634]],[[194752,194752],"mapped",[25541]],[[194753,194753],"mapped",[25513]],[[194754,194754],"mapped",[14894]],[[194755,194755],"mapped",[25705]],[[194756,194756],"mapped",[25726]],[[194757,194757],"mapped",[25757]],[[194758,194758],"mapped",[25719]],[[194759,194759],"mapped",[14956]],[[194760,194760],"mapped",[25935]],[[194761,194761],"mapped",[25964]],[[194762,194762],"mapped",[143370]],[[194763,194763],"mapped",[26083]],[[194764,194764],"mapped",[26360]],[[194765,194765],"mapped",[26185]],[[194766,194766],"mapped",[15129]],[[194767,194767],"mapped",[26257]],[[194768,194768],"mapped",[15112]],[[194769,194769],"mapped",[15076]],[[194770,194770],"mapped",[20882]],[[194771,194771],"mapped",[20885]],[[194772,194772],"mapped",[26368]],[[194773,194773],"mapped",[26268]],[[194774,194774],"mapped",[32941]],[[194775,194775],"mapped",[17369]],[[194776,194776],"mapped",[26391]],[[194777,194777],"mapped",[26395]],[[194778,194778],"mapped",[26401]],[[194779,194779],"mapped",[26462]],[[194780,194780],"mapped",[26451]],[[194781,194781],"mapped",[144323]],[[194782,194782],"mapped",[15177]],[[194783,194783],"mapped",[26618]],[[194784,194784],"mapped",[26501]],[[194785,194785],"mapped",[26706]],[[194786,194786],"mapped",[26757]],[[194787,194787],"mapped",[144493]],[[194788,194788],"mapped",[26766]],[[194789,194789],"mapped",[26655]],[[194790,194790],"mapped",[26900]],[[194791,194791],"mapped",[15261]],[[194792,194792],"mapped",[26946]],[[194793,194793],"mapped",[27043]],[[194794,194794],"mapped",[27114]],[[194795,194795],"mapped",[27304]],[[194796,194796],"mapped",[145059]],[[194797,194797],"mapped",[27355]],[[194798,194798],"mapped",[15384]],[[194799,194799],"mapped",[27425]],[[194800,194800],"mapped",[145575]],[[194801,194801],"mapped",[27476]],[[194802,194802],"mapped",[15438]],[[194803,194803],"mapped",[27506]],[[194804,194804],"mapped",[27551]],[[194805,194805],"mapped",[27578]],[[194806,194806],"mapped",[27579]],[[194807,194807],"mapped",[146061]],[[194808,194808],"mapped",[138507]],[[194809,194809],"mapped",[146170]],[[194810,194810],"mapped",[27726]],[[194811,194811],"mapped",[146620]],[[194812,194812],"mapped",[27839]],[[194813,194813],"mapped",[27853]],[[194814,194814],"mapped",[27751]],[[194815,194815],"mapped",[27926]],[[194816,194816],"mapped",[27966]],[[194817,194817],"mapped",[28023]],[[194818,194818],"mapped",[27969]],[[194819,194819],"mapped",[28009]],[[194820,194820],"mapped",[28024]],[[194821,194821],"mapped",[28037]],[[194822,194822],"mapped",[146718]],[[194823,194823],"mapped",[27956]],[[194824,194824],"mapped",[28207]],[[194825,194825],"mapped",[28270]],[[194826,194826],"mapped",[15667]],[[194827,194827],"mapped",[28363]],[[194828,194828],"mapped",[28359]],[[194829,194829],"mapped",[147153]],[[194830,194830],"mapped",[28153]],[[194831,194831],"mapped",[28526]],[[194832,194832],"mapped",[147294]],[[194833,194833],"mapped",[147342]],[[194834,194834],"mapped",[28614]],[[194835,194835],"mapped",[28729]],[[194836,194836],"mapped",[28702]],[[194837,194837],"mapped",[28699]],[[194838,194838],"mapped",[15766]],[[194839,194839],"mapped",[28746]],[[194840,194840],"mapped",[28797]],[[194841,194841],"mapped",[28791]],[[194842,194842],"mapped",[28845]],[[194843,194843],"mapped",[132389]],[[194844,194844],"mapped",[28997]],[[194845,194845],"mapped",[148067]],[[194846,194846],"mapped",[29084]],[[194847,194847],"disallowed"],[[194848,194848],"mapped",[29224]],[[194849,194849],"mapped",[29237]],[[194850,194850],"mapped",[29264]],[[194851,194851],"mapped",[149000]],[[194852,194852],"mapped",[29312]],[[194853,194853],"mapped",[29333]],[[194854,194854],"mapped",[149301]],[[194855,194855],"mapped",[149524]],[[194856,194856],"mapped",[29562]],[[194857,194857],"mapped",[29579]],[[194858,194858],"mapped",[16044]],[[194859,194859],"mapped",[29605]],[[194860,194861],"mapped",[16056]],[[194862,194862],"mapped",[29767]],[[194863,194863],"mapped",[29788]],[[194864,194864],"mapped",[29809]],[[194865,194865],"mapped",[29829]],[[194866,194866],"mapped",[29898]],[[194867,194867],"mapped",[16155]],[[194868,194868],"mapped",[29988]],[[194869,194869],"mapped",[150582]],[[194870,194870],"mapped",[30014]],[[194871,194871],"mapped",[150674]],[[194872,194872],"mapped",[30064]],[[194873,194873],"mapped",[139679]],[[194874,194874],"mapped",[30224]],[[194875,194875],"mapped",[151457]],[[194876,194876],"mapped",[151480]],[[194877,194877],"mapped",[151620]],[[194878,194878],"mapped",[16380]],[[194879,194879],"mapped",[16392]],[[194880,194880],"mapped",[30452]],[[194881,194881],"mapped",[151795]],[[194882,194882],"mapped",[151794]],[[194883,194883],"mapped",[151833]],[[194884,194884],"mapped",[151859]],[[194885,194885],"mapped",[30494]],[[194886,194887],"mapped",[30495]],[[194888,194888],"mapped",[30538]],[[194889,194889],"mapped",[16441]],[[194890,194890],"mapped",[30603]],[[194891,194891],"mapped",[16454]],[[194892,194892],"mapped",[16534]],[[194893,194893],"mapped",[152605]],[[194894,194894],"mapped",[30798]],[[194895,194895],"mapped",[30860]],[[194896,194896],"mapped",[30924]],[[194897,194897],"mapped",[16611]],[[194898,194898],"mapped",[153126]],[[194899,194899],"mapped",[31062]],[[194900,194900],"mapped",[153242]],[[194901,194901],"mapped",[153285]],[[194902,194902],"mapped",[31119]],[[194903,194903],"mapped",[31211]],[[194904,194904],"mapped",[16687]],[[194905,194905],"mapped",[31296]],[[194906,194906],"mapped",[31306]],[[194907,194907],"mapped",[31311]],[[194908,194908],"mapped",[153980]],[[194909,194910],"mapped",[154279]],[[194911,194911],"disallowed"],[[194912,194912],"mapped",[16898]],[[194913,194913],"mapped",[154539]],[[194914,194914],"mapped",[31686]],[[194915,194915],"mapped",[31689]],[[194916,194916],"mapped",[16935]],[[194917,194917],"mapped",[154752]],[[194918,194918],"mapped",[31954]],[[194919,194919],"mapped",[17056]],[[194920,194920],"mapped",[31976]],[[194921,194921],"mapped",[31971]],[[194922,194922],"mapped",[32000]],[[194923,194923],"mapped",[155526]],[[194924,194924],"mapped",[32099]],[[194925,194925],"mapped",[17153]],[[194926,194926],"mapped",[32199]],[[194927,194927],"mapped",[32258]],[[194928,194928],"mapped",[32325]],[[194929,194929],"mapped",[17204]],[[194930,194930],"mapped",[156200]],[[194931,194931],"mapped",[156231]],[[194932,194932],"mapped",[17241]],[[194933,194933],"mapped",[156377]],[[194934,194934],"mapped",[32634]],[[194935,194935],"mapped",[156478]],[[194936,194936],"mapped",[32661]],[[194937,194937],"mapped",[32762]],[[194938,194938],"mapped",[32773]],[[194939,194939],"mapped",[156890]],[[194940,194940],"mapped",[156963]],[[194941,194941],"mapped",[32864]],[[194942,194942],"mapped",[157096]],[[194943,194943],"mapped",[32880]],[[194944,194944],"mapped",[144223]],[[194945,194945],"mapped",[17365]],[[194946,194946],"mapped",[32946]],[[194947,194947],"mapped",[33027]],[[194948,194948],"mapped",[17419]],[[194949,194949],"mapped",[33086]],[[194950,194950],"mapped",[23221]],[[194951,194951],"mapped",[157607]],[[194952,194952],"mapped",[157621]],[[194953,194953],"mapped",[144275]],[[194954,194954],"mapped",[144284]],[[194955,194955],"mapped",[33281]],[[194956,194956],"mapped",[33284]],[[194957,194957],"mapped",[36766]],[[194958,194958],"mapped",[17515]],[[194959,194959],"mapped",[33425]],[[194960,194960],"mapped",[33419]],[[194961,194961],"mapped",[33437]],[[194962,194962],"mapped",[21171]],[[194963,194963],"mapped",[33457]],[[194964,194964],"mapped",[33459]],[[194965,194965],"mapped",[33469]],[[194966,194966],"mapped",[33510]],[[194967,194967],"mapped",[158524]],[[194968,194968],"mapped",[33509]],[[194969,194969],"mapped",[33565]],[[194970,194970],"mapped",[33635]],[[194971,194971],"mapped",[33709]],[[194972,194972],"mapped",[33571]],[[194973,194973],"mapped",[33725]],[[194974,194974],"mapped",[33767]],[[194975,194975],"mapped",[33879]],[[194976,194976],"mapped",[33619]],[[194977,194977],"mapped",[33738]],[[194978,194978],"mapped",[33740]],[[194979,194979],"mapped",[33756]],[[194980,194980],"mapped",[158774]],[[194981,194981],"mapped",[159083]],[[194982,194982],"mapped",[158933]],[[194983,194983],"mapped",[17707]],[[194984,194984],"mapped",[34033]],[[194985,194985],"mapped",[34035]],[[194986,194986],"mapped",[34070]],[[194987,194987],"mapped",[160714]],[[194988,194988],"mapped",[34148]],[[194989,194989],"mapped",[159532]],[[194990,194990],"mapped",[17757]],[[194991,194991],"mapped",[17761]],[[194992,194992],"mapped",[159665]],[[194993,194993],"mapped",[159954]],[[194994,194994],"mapped",[17771]],[[194995,194995],"mapped",[34384]],[[194996,194996],"mapped",[34396]],[[194997,194997],"mapped",[34407]],[[194998,194998],"mapped",[34409]],[[194999,194999],"mapped",[34473]],[[195000,195000],"mapped",[34440]],[[195001,195001],"mapped",[34574]],[[195002,195002],"mapped",[34530]],[[195003,195003],"mapped",[34681]],[[195004,195004],"mapped",[34600]],[[195005,195005],"mapped",[34667]],[[195006,195006],"mapped",[34694]],[[195007,195007],"disallowed"],[[195008,195008],"mapped",[34785]],[[195009,195009],"mapped",[34817]],[[195010,195010],"mapped",[17913]],[[195011,195011],"mapped",[34912]],[[195012,195012],"mapped",[34915]],[[195013,195013],"mapped",[161383]],[[195014,195014],"mapped",[35031]],[[195015,195015],"mapped",[35038]],[[195016,195016],"mapped",[17973]],[[195017,195017],"mapped",[35066]],[[195018,195018],"mapped",[13499]],[[195019,195019],"mapped",[161966]],[[195020,195020],"mapped",[162150]],[[195021,195021],"mapped",[18110]],[[195022,195022],"mapped",[18119]],[[195023,195023],"mapped",[35488]],[[195024,195024],"mapped",[35565]],[[195025,195025],"mapped",[35722]],[[195026,195026],"mapped",[35925]],[[195027,195027],"mapped",[162984]],[[195028,195028],"mapped",[36011]],[[195029,195029],"mapped",[36033]],[[195030,195030],"mapped",[36123]],[[195031,195031],"mapped",[36215]],[[195032,195032],"mapped",[163631]],[[195033,195033],"mapped",[133124]],[[195034,195034],"mapped",[36299]],[[195035,195035],"mapped",[36284]],[[195036,195036],"mapped",[36336]],[[195037,195037],"mapped",[133342]],[[195038,195038],"mapped",[36564]],[[195039,195039],"mapped",[36664]],[[195040,195040],"mapped",[165330]],[[195041,195041],"mapped",[165357]],[[195042,195042],"mapped",[37012]],[[195043,195043],"mapped",[37105]],[[195044,195044],"mapped",[37137]],[[195045,195045],"mapped",[165678]],[[195046,195046],"mapped",[37147]],[[195047,195047],"mapped",[37432]],[[195048,195048],"mapped",[37591]],[[195049,195049],"mapped",[37592]],[[195050,195050],"mapped",[37500]],[[195051,195051],"mapped",[37881]],[[195052,195052],"mapped",[37909]],[[195053,195053],"mapped",[166906]],[[195054,195054],"mapped",[38283]],[[195055,195055],"mapped",[18837]],[[195056,195056],"mapped",[38327]],[[195057,195057],"mapped",[167287]],[[195058,195058],"mapped",[18918]],[[195059,195059],"mapped",[38595]],[[195060,195060],"mapped",[23986]],[[195061,195061],"mapped",[38691]],[[195062,195062],"mapped",[168261]],[[195063,195063],"mapped",[168474]],[[195064,195064],"mapped",[19054]],[[195065,195065],"mapped",[19062]],[[195066,195066],"mapped",[38880]],[[195067,195067],"mapped",[168970]],[[195068,195068],"mapped",[19122]],[[195069,195069],"mapped",[169110]],[[195070,195071],"mapped",[38923]],[[195072,195072],"mapped",[38953]],[[195073,195073],"mapped",[169398]],[[195074,195074],"mapped",[39138]],[[195075,195075],"mapped",[19251]],[[195076,195076],"mapped",[39209]],[[195077,195077],"mapped",[39335]],[[195078,195078],"mapped",[39362]],[[195079,195079],"mapped",[39422]],[[195080,195080],"mapped",[19406]],[[195081,195081],"mapped",[170800]],[[195082,195082],"mapped",[39698]],[[195083,195083],"mapped",[40000]],[[195084,195084],"mapped",[40189]],[[195085,195085],"mapped",[19662]],[[195086,195086],"mapped",[19693]],[[195087,195087],"mapped",[40295]],[[195088,195088],"mapped",[172238]],[[195089,195089],"mapped",[19704]],[[195090,195090],"mapped",[172293]],[[195091,195091],"mapped",[172558]],[[195092,195092],"mapped",[172689]],[[195093,195093],"mapped",[40635]],[[195094,195094],"mapped",[19798]],[[195095,195095],"mapped",[40697]],[[195096,195096],"mapped",[40702]],[[195097,195097],"mapped",[40709]],[[195098,195098],"mapped",[40719]],[[195099,195099],"mapped",[40726]],[[195100,195100],"mapped",[40763]],[[195101,195101],"mapped",[173568]],[[195102,196605],"disallowed"],[[196606,196607],"disallowed"],[[196608,262141],"disallowed"],[[262142,262143],"disallowed"],[[262144,327677],"disallowed"],[[327678,327679],"disallowed"],[[327680,393213],"disallowed"],[[393214,393215],"disallowed"],[[393216,458749],"disallowed"],[[458750,458751],"disallowed"],[[458752,524285],"disallowed"],[[524286,524287],"disallowed"],[[524288,589821],"disallowed"],[[589822,589823],"disallowed"],[[589824,655357],"disallowed"],[[655358,655359],"disallowed"],[[655360,720893],"disallowed"],[[720894,720895],"disallowed"],[[720896,786429],"disallowed"],[[786430,786431],"disallowed"],[[786432,851965],"disallowed"],[[851966,851967],"disallowed"],[[851968,917501],"disallowed"],[[917502,917503],"disallowed"],[[917504,917504],"disallowed"],[[917505,917505],"disallowed"],[[917506,917535],"disallowed"],[[917536,917631],"disallowed"],[[917632,917759],"disallowed"],[[917760,917999],"ignored"],[[918000,983037],"disallowed"],[[983038,983039],"disallowed"],[[983040,1048573],"disallowed"],[[1048574,1048575],"disallowed"],[[1048576,1114109],"disallowed"],[[1114110,1114111],"disallowed"]]\');\n\n//# sourceURL=webpack://react_on_rails_pro_dummy/./node_modules/node-fetch/node_modules/tr46/lib/mappingTable.json?', + ); + + /***/ + }, + + /******/ + }; + /************************************************************************/ + /******/ // The module cache + /******/ var __webpack_module_cache__ = {}; + /******/ + /******/ // The require function + /******/ function __webpack_require__(moduleId) { + /******/ // Check if module is in cache + /******/ var cachedModule = __webpack_module_cache__[moduleId]; + /******/ if (cachedModule !== undefined) { + /******/ return cachedModule.exports; + /******/ + } + /******/ // Create a new module (and put it into the cache) + /******/ var module = (__webpack_module_cache__[moduleId] = { + /******/ id: moduleId, + /******/ loaded: false, + /******/ exports: {}, + /******/ + }); + /******/ + /******/ // Execute the module function + /******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__); + /******/ + /******/ // Flag the module as loaded + /******/ module.loaded = true; + /******/ + /******/ // Return the exports of the module + /******/ return module.exports; + /******/ + } + /******/ + /******/ // expose the modules object (__webpack_modules__) + /******/ __webpack_require__.m = __webpack_modules__; + /******/ + /************************************************************************/ + /******/ /* webpack/runtime/chunk loaded */ + /******/ (() => { + /******/ var deferred = []; + /******/ __webpack_require__.O = (result, chunkIds, fn, priority) => { + /******/ if (chunkIds) { + /******/ priority = priority || 0; + /******/ for (var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) + deferred[i] = deferred[i - 1]; + /******/ deferred[i] = [chunkIds, fn, priority]; + /******/ return; + /******/ + } + /******/ var notFulfilled = Infinity; + /******/ for (var i = 0; i < deferred.length; i++) { + /******/ var [chunkIds, fn, priority] = deferred[i]; + /******/ var fulfilled = true; + /******/ for (var j = 0; j < chunkIds.length; j++) { + /******/ if ( + (priority & (1 === 0) || notFulfilled >= priority) && + Object.keys(__webpack_require__.O).every((key) => __webpack_require__.O[key](chunkIds[j])) + ) { + /******/ chunkIds.splice(j--, 1); + /******/ + } else { + /******/ fulfilled = false; + /******/ if (priority < notFulfilled) notFulfilled = priority; + /******/ + } + /******/ + } + /******/ if (fulfilled) { + /******/ deferred.splice(i--, 1); + /******/ var r = fn(); + /******/ if (r !== undefined) result = r; + /******/ + } + /******/ + } + /******/ return result; + /******/ + }; + /******/ + })(); + /******/ + /******/ /* webpack/runtime/chunk prefetch function */ + /******/ (() => { + /******/ __webpack_require__.F = {}; + /******/ __webpack_require__.E = (chunkId) => { + /******/ Object.keys(__webpack_require__.F).map((key) => { + /******/ __webpack_require__.F[key](chunkId); + /******/ + }); + /******/ + }; + /******/ + })(); + /******/ + /******/ /* webpack/runtime/compat get default export */ + /******/ (() => { + /******/ // getDefaultExport function for compatibility with non-harmony modules + /******/ __webpack_require__.n = (module) => { + /******/ var getter = + module && module.__esModule ? /******/ () => module['default'] : /******/ () => module; + /******/ __webpack_require__.d(getter, { a: getter }); + /******/ return getter; + /******/ + }; + /******/ + })(); + /******/ + /******/ /* webpack/runtime/create fake namespace object */ + /******/ (() => { + /******/ var getProto = Object.getPrototypeOf + ? (obj) => Object.getPrototypeOf(obj) + : (obj) => obj.__proto__; + /******/ var leafPrototypes; + /******/ // 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 & 16: return value when it's Promise-like + /******/ // mode & 8|1: behave like require + /******/ __webpack_require__.t = function (value, mode) { + /******/ if (mode & 1) value = this(value); + /******/ if (mode & 8) return value; + /******/ if (typeof value === 'object' && value) { + /******/ if (mode & 4 && value.__esModule) return value; + /******/ if (mode & 16 && typeof value.then === 'function') return value; + /******/ + } + /******/ var ns = Object.create(null); + /******/ __webpack_require__.r(ns); + /******/ var def = {}; + /******/ leafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)]; + /******/ for ( + var current = mode & 2 && value; + typeof current == 'object' && !~leafPrototypes.indexOf(current); + current = getProto(current) + ) { + /******/ Object.getOwnPropertyNames(current).forEach((key) => (def[key] = () => value[key])); + /******/ + } + /******/ def['default'] = () => value; + /******/ __webpack_require__.d(ns, def); + /******/ return ns; + /******/ + }; + /******/ + })(); + /******/ + /******/ /* webpack/runtime/define property getters */ + /******/ (() => { + /******/ // define getter functions for harmony exports + /******/ __webpack_require__.d = (exports, definition) => { + /******/ for (var key in definition) { + /******/ if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { + /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); + /******/ + } + /******/ + } + /******/ + }; + /******/ + })(); + /******/ + /******/ /* webpack/runtime/ensure chunk */ + /******/ (() => { + /******/ // The chunk loading function for additional chunks + /******/ // Since all referenced chunks are already included + /******/ // in this file, this function is empty here. + /******/ __webpack_require__.e = () => Promise.resolve(); + /******/ + })(); + /******/ + /******/ /* webpack/runtime/hasOwnProperty shorthand */ + /******/ (() => { + /******/ __webpack_require__.o = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop); + /******/ + })(); + /******/ + /******/ /* webpack/runtime/make namespace object */ + /******/ (() => { + /******/ // define __esModule on exports + /******/ __webpack_require__.r = (exports) => { + /******/ if (typeof Symbol !== 'undefined' && Symbol.toStringTag) { + /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); + /******/ + } + /******/ Object.defineProperty(exports, '__esModule', { value: true }); + /******/ + }; + /******/ + })(); + /******/ + /******/ /* webpack/runtime/node module decorator */ + /******/ (() => { + /******/ __webpack_require__.nmd = (module) => { + /******/ module.paths = []; + /******/ if (!module.children) module.children = []; + /******/ return module; + /******/ + }; + /******/ + })(); + /******/ + /******/ /* webpack/runtime/publicPath */ + /******/ (() => { + /******/ __webpack_require__.p = '/webpack/test/'; + /******/ + })(); + /******/ + /******/ /* webpack/runtime/require chunk loading */ + /******/ (() => { + /******/ // no baseURI + /******/ + /******/ // object to store loaded chunks + /******/ // "1" means "loaded", otherwise not loaded yet + /******/ var installedChunks = { + /******/ 367: 1, + /******/ + }; + /******/ + /******/ __webpack_require__.O.require = (chunkId) => installedChunks[chunkId]; + /******/ + /******/ // no chunk install function needed + /******/ + /******/ // no chunk loading + /******/ + /******/ // no external install chunk + /******/ + /******/ // no HMR + /******/ + /******/ // no HMR manifest + /******/ + })(); + /******/ + /******/ /* webpack/runtime/startup prefetch */ + /******/ (() => { + /******/ __webpack_require__.O( + 0, + [367], + () => { + /******/ __webpack_require__.E(367); + /******/ + }, + 5, + ); + /******/ + })(); + /******/ + /************************************************************************/ + /******/ + /******/ // module factories are used so entry inlining is disabled + /******/ // startup + /******/ // Load entry module and return exports + /******/ var __webpack_exports__ = __webpack_require__(9416); + /******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__); + /******/ module.exports = __webpack_exports__; + /******/ + /******/ +})(); diff --git a/packages/react-on-rails-pro-node-renderer/tests/fixtures/secondary-bundle.js b/packages/react-on-rails-pro-node-renderer/tests/fixtures/secondary-bundle.js new file mode 100644 index 0000000000..d901dd0526 --- /dev/null +++ b/packages/react-on-rails-pro-node-renderer/tests/fixtures/secondary-bundle.js @@ -0,0 +1,3 @@ +global.ReactOnRails = { + dummy: { html: 'Dummy Object from secondary bundle' }, +}; diff --git a/packages/react-on-rails-pro-node-renderer/tests/handleRenderRequest.test.ts b/packages/react-on-rails-pro-node-renderer/tests/handleRenderRequest.test.ts new file mode 100644 index 0000000000..2557fa78d8 --- /dev/null +++ b/packages/react-on-rails-pro-node-renderer/tests/handleRenderRequest.test.ts @@ -0,0 +1,429 @@ +import path from 'path'; +import touch from 'touch'; +import lockfile from 'lockfile'; +import { + createVmBundle, + createSecondaryVmBundle, + uploadedBundlePath, + uploadedSecondaryBundlePath, + createUploadedBundle, + createUploadedSecondaryBundle, + createUploadedAsset, + uploadedAssetPath, + uploadedAssetOtherPath, + resetForTest, + BUNDLE_TIMESTAMP, + SECONDARY_BUNDLE_TIMESTAMP, + lockfilePath, + mkdirAsync, + vmBundlePath, + vmSecondaryBundlePath, + ASSET_UPLOAD_FILE, + ASSET_UPLOAD_OTHER_FILE, +} from './helper'; +import { hasVMContextForBundle } from '../src/worker/vm'; +import { handleRenderRequest } from '../src/worker/handleRenderRequest'; +import { delay, Asset } from '../src/shared/utils'; + +const testName = 'handleRenderRequest'; +const uploadedBundleForTest = (): Asset => ({ + filename: '', // Not used in these tests + savedFilePath: uploadedBundlePath(testName), + type: 'asset', +}); +const createUploadedBundleForTest = () => createUploadedBundle(testName); +const lockfilePathForTest = () => lockfilePath(testName); +const createVmBundleForTest = () => createVmBundle(testName); +const renderResult = { + status: 200, + headers: { 'Cache-Control': 'public, max-age=31536000' }, + data: JSON.stringify({ html: 'Dummy Object' }), +}; + +const renderResultFromBothBundles = { + status: 200, + headers: { 'Cache-Control': 'public, max-age=31536000' }, + data: JSON.stringify({ + mainBundleResult: { html: 'Dummy Object' }, + secondaryBundleResult: { html: 'Dummy Object from secondary bundle' }, + }), +}; + +// eslint-disable-next-line jest/valid-title +describe(testName, () => { + beforeEach(async () => { + await resetForTest(testName); + const bundleDirectory = path.dirname(vmBundlePath(testName)); + await mkdirAsync(bundleDirectory, { recursive: true }); + const secondaryBundleDirectory = path.dirname(vmSecondaryBundlePath(testName)); + await mkdirAsync(secondaryBundleDirectory, { recursive: true }); + }); + + afterAll(async () => { + await resetForTest(testName); + }); + + test('If gem has posted updated bundle and no prior bundle', async () => { + expect.assertions(2); + await createUploadedBundleForTest(); + + const result = await handleRenderRequest({ + renderingRequest: 'ReactOnRails.dummy', + bundleTimestamp: BUNDLE_TIMESTAMP, + providedNewBundles: [ + { + bundle: uploadedBundleForTest(), + timestamp: BUNDLE_TIMESTAMP, + }, + ], + }); + + expect(result).toEqual(renderResult); + expect( + hasVMContextForBundle(path.resolve(__dirname, `./tmp/${testName}/1495063024898/1495063024898.js`)), + ).toBeTruthy(); + }); + + test('If bundle was not uploaded yet and not provided', async () => { + expect.assertions(1); + + const result = await handleRenderRequest({ + renderingRequest: 'ReactOnRails.dummy', + bundleTimestamp: BUNDLE_TIMESTAMP, + }); + + expect(result).toEqual({ + status: 410, + headers: { 'Cache-Control': 'no-cache, no-store, max-age=0, must-revalidate' }, + data: 'No bundle uploaded', + }); + }); + + test('If bundle was already uploaded by another thread', async () => { + expect.assertions(1); + await createVmBundleForTest(); + + const result = await handleRenderRequest({ + renderingRequest: 'ReactOnRails.dummy', + bundleTimestamp: BUNDLE_TIMESTAMP, + }); + + expect(result).toEqual(renderResult); + }); + + test('If lockfile exists, and is stale', async () => { + // We're using a lockfile with an artificially old date, + // so make it use that instead of ctime. + // Probably you should never do this in production! + // @ts-expect-error Not allowed by the types + lockfile.filetime = 'mtime'; + + expect.assertions(2); + touch.sync(lockfilePathForTest(), { time: '1979-07-01T19:10:00.000Z' }); + await createUploadedBundleForTest(); + + const result = await handleRenderRequest({ + renderingRequest: 'ReactOnRails.dummy', + bundleTimestamp: BUNDLE_TIMESTAMP, + providedNewBundles: [ + { + bundle: uploadedBundleForTest(), + timestamp: BUNDLE_TIMESTAMP, + }, + ], + }); + + expect(result).toEqual(renderResult); + expect( + hasVMContextForBundle(path.resolve(__dirname, `./tmp/${testName}/1495063024898/1495063024898.js`)), + ).toBeTruthy(); + }); + + test('If lockfile exists from another thread and bundle provided.', async () => { + expect.assertions(2); + await createUploadedBundleForTest(); + + const lockfileOptions = { pollPeriod: 100, stale: 10000 }; + lockfile.lockSync(lockfilePathForTest(), lockfileOptions); + + await delay(5); + console.log('TEST building VM from sleep'); + await createVmBundleForTest(); + console.log('TEST DONE building VM from sleep'); + lockfile.unlock(lockfilePathForTest(), (err) => { + console.log('TEST unlocked lockfile', err); + }); + + const result = await handleRenderRequest({ + renderingRequest: 'ReactOnRails.dummy', + bundleTimestamp: BUNDLE_TIMESTAMP, + providedNewBundles: [ + { + bundle: uploadedBundleForTest(), + timestamp: BUNDLE_TIMESTAMP, + }, + ], + }); + + expect(result).toEqual(renderResult); + expect( + hasVMContextForBundle(path.resolve(__dirname, `./tmp/${testName}/1495063024898/1495063024898.js`)), + ).toBeTruthy(); + }); + + test('If multiple bundles are provided', async () => { + expect.assertions(3); + await createUploadedBundle(testName); + await createUploadedSecondaryBundle(testName); + + const result = await handleRenderRequest({ + renderingRequest: 'ReactOnRails.dummy', + bundleTimestamp: BUNDLE_TIMESTAMP, + providedNewBundles: [ + { + bundle: { + filename: '', + savedFilePath: uploadedBundlePath(testName), + type: 'asset', + }, + timestamp: BUNDLE_TIMESTAMP, + }, + { + bundle: { + filename: '', + savedFilePath: uploadedSecondaryBundlePath(testName), + type: 'asset', + }, + timestamp: SECONDARY_BUNDLE_TIMESTAMP, + }, + ], + }); + + expect(result).toEqual(renderResult); + // only the primary bundle should be in the VM context + // The secondary bundle will be processed only if the rendering request requests it + expect( + hasVMContextForBundle(path.resolve(__dirname, `./tmp/${testName}/1495063024898/1495063024898.js`)), + ).toBeTruthy(); + expect( + hasVMContextForBundle(path.resolve(__dirname, `./tmp/${testName}/1495063024899/1495063024899.js`)), + ).toBeFalsy(); + }); + + test('If multiple bundles are provided and multiple assets are provided as well', async () => { + await createUploadedBundle(testName); + await createUploadedSecondaryBundle(testName); + + // Create additional uploaded assets using helper functions + await createUploadedAsset(testName); + + const additionalAssets = [ + { + filename: ASSET_UPLOAD_FILE, + savedFilePath: uploadedAssetPath(testName), + type: 'asset' as const, + }, + { + filename: ASSET_UPLOAD_OTHER_FILE, + savedFilePath: uploadedAssetOtherPath(testName), + type: 'asset' as const, + }, + ]; + + const result = await handleRenderRequest({ + renderingRequest: 'ReactOnRails.dummy', + bundleTimestamp: BUNDLE_TIMESTAMP, + providedNewBundles: [ + { + bundle: { + filename: '', + savedFilePath: uploadedBundlePath(testName), + type: 'asset', + }, + timestamp: BUNDLE_TIMESTAMP, + }, + { + bundle: { + filename: '', + savedFilePath: uploadedSecondaryBundlePath(testName), + type: 'asset', + }, + timestamp: SECONDARY_BUNDLE_TIMESTAMP, + }, + ], + assetsToCopy: additionalAssets, + }); + + expect(result).toEqual(renderResult); + + // Only the primary bundle should be in the VM context + // The secondary bundle will be processed only if the rendering request requests it + expect( + hasVMContextForBundle(path.resolve(__dirname, `./tmp/${testName}/1495063024898/1495063024898.js`)), + ).toBeTruthy(); + expect( + hasVMContextForBundle(path.resolve(__dirname, `./tmp/${testName}/1495063024899/1495063024899.js`)), + ).toBeFalsy(); + + // Verify that the additional assets were copied to both bundle directories + const mainBundleDir = path.dirname( + path.resolve(__dirname, `./tmp/${testName}/1495063024898/1495063024898.js`), + ); + const secondaryBundleDir = path.dirname( + path.resolve(__dirname, `./tmp/${testName}/1495063024899/1495063024899.js`), + ); + const mainAsset1Path = path.join(mainBundleDir, ASSET_UPLOAD_FILE); + const mainAsset2Path = path.join(mainBundleDir, ASSET_UPLOAD_OTHER_FILE); + const secondaryAsset1Path = path.join(secondaryBundleDir, ASSET_UPLOAD_FILE); + const secondaryAsset2Path = path.join(secondaryBundleDir, ASSET_UPLOAD_OTHER_FILE); + + const fsModule = await import('fs/promises'); + const mainAsset1Exists = await fsModule + .access(mainAsset1Path) + .then(() => true) + .catch(() => false); + const mainAsset2Exists = await fsModule + .access(mainAsset2Path) + .then(() => true) + .catch(() => false); + const secondaryAsset1Exists = await fsModule + .access(secondaryAsset1Path) + .then(() => true) + .catch(() => false); + const secondaryAsset2Exists = await fsModule + .access(secondaryAsset2Path) + .then(() => true) + .catch(() => false); + + expect(mainAsset1Exists).toBeTruthy(); + expect(mainAsset2Exists).toBeTruthy(); + expect(secondaryAsset1Exists).toBeTruthy(); + expect(secondaryAsset2Exists).toBeTruthy(); + }); + + test('If dependency bundle timestamps are provided but not uploaded yet', async () => { + expect.assertions(1); + + const result = await handleRenderRequest({ + renderingRequest: 'ReactOnRails.dummy', + bundleTimestamp: BUNDLE_TIMESTAMP, + dependencyBundleTimestamps: [SECONDARY_BUNDLE_TIMESTAMP], + }); + + expect(result).toEqual({ + status: 410, + headers: { 'Cache-Control': 'no-cache, no-store, max-age=0, must-revalidate' }, + data: 'No bundle uploaded', + }); + }); + + test('If dependency bundle timestamps are provided and already uploaded', async () => { + expect.assertions(1); + await createVmBundle(testName); + await createSecondaryVmBundle(testName); + + const result = await handleRenderRequest({ + renderingRequest: 'ReactOnRails.dummy', + bundleTimestamp: BUNDLE_TIMESTAMP, + dependencyBundleTimestamps: [SECONDARY_BUNDLE_TIMESTAMP], + }); + + expect(result).toEqual(renderResult); + }); + + test('rendering request can call runOnOtherBundle', async () => { + await createVmBundle(testName); + await createSecondaryVmBundle(testName); + + const renderingRequest = ` + runOnOtherBundle(${SECONDARY_BUNDLE_TIMESTAMP}, 'ReactOnRails.dummy').then((secondaryBundleResult) => ({ + mainBundleResult: ReactOnRails.dummy, + secondaryBundleResult: JSON.parse(secondaryBundleResult), + })); + `; + + const result = await handleRenderRequest({ + renderingRequest, + bundleTimestamp: BUNDLE_TIMESTAMP, + dependencyBundleTimestamps: [SECONDARY_BUNDLE_TIMESTAMP], + }); + + expect(result).toEqual(renderResultFromBothBundles); + // Both bundles should be in the VM context + expect( + hasVMContextForBundle(path.resolve(__dirname, `./tmp/${testName}/1495063024898/1495063024898.js`)), + ).toBeTruthy(); + expect( + hasVMContextForBundle(path.resolve(__dirname, `./tmp/${testName}/1495063024899/1495063024899.js`)), + ).toBeTruthy(); + }); + + test('renderingRequest is globally accessible inside the VM', async () => { + await createVmBundle(testName); + + const renderingRequest = ` + renderingRequest; + `; + + const result = await handleRenderRequest({ + renderingRequest, + bundleTimestamp: BUNDLE_TIMESTAMP, + }); + + expect(result).toEqual({ + status: 200, + headers: { 'Cache-Control': 'public, max-age=31536000' }, + data: renderingRequest, + }); + }); + + // The renderingRequest variable is automatically reset after synchronous execution to prevent data leakage + // between requests in the shared VM context. This means it will be undefined in any async callbacks. + // + // If you need to access renderingRequest in an async context, save it to a local variable first: + // + // const renderingRequest = ` + // const savedRequest = renderingRequest; // Save synchronously + // Promise.resolve().then(() => { + // return savedRequest; // Access async + // }); + // `; + test('renderingRequest is reset after the sync execution (not accessible from async functions)', async () => { + await createVmBundle(testName); + + // Since renderingRequest is undefined in async callbacks, we return the string 'undefined' + // to demonstrate this behavior (as undefined cannot be returned from the VM) + const renderingRequest = ` + Promise.resolve().then(() => renderingRequest ?? 'undefined'); + `; + + const result = await handleRenderRequest({ + renderingRequest, + bundleTimestamp: BUNDLE_TIMESTAMP, + }); + + expect(result).toEqual({ + status: 200, + headers: { 'Cache-Control': 'public, max-age=31536000' }, + data: JSON.stringify('undefined'), + }); + }); + + test('If main bundle exists but dependency bundle does not exist', async () => { + expect.assertions(1); + // Only create the main bundle, not the secondary/dependency bundle + await createVmBundle(testName); + + const result = await handleRenderRequest({ + renderingRequest: 'ReactOnRails.dummy', + bundleTimestamp: BUNDLE_TIMESTAMP, + dependencyBundleTimestamps: [SECONDARY_BUNDLE_TIMESTAMP], + }); + + expect(result).toEqual({ + status: 410, + headers: { 'Cache-Control': 'no-cache, no-store, max-age=0, must-revalidate' }, + data: 'No bundle uploaded', + }); + }); +}); diff --git a/packages/react-on-rails-pro-node-renderer/tests/helper.ts b/packages/react-on-rails-pro-node-renderer/tests/helper.ts new file mode 100644 index 0000000000..080577c1a5 --- /dev/null +++ b/packages/react-on-rails-pro-node-renderer/tests/helper.ts @@ -0,0 +1,147 @@ +// NOTE: The tmp bundle directory for each test file must be different due to the fact that +// jest will run multiple test files synchronously. +import path from 'path'; +import fsPromises from 'fs/promises'; +import fs from 'fs'; +import fsExtra from 'fs-extra'; +import { buildVM, resetVM } from '../src/worker/vm'; +import { buildConfig } from '../src/shared/configBuilder'; + +export const mkdirAsync = fsPromises.mkdir; +const safeCopyFileAsync = async (src: string, dest: string) => { + const parentDir = path.dirname(dest); + await mkdirAsync(parentDir, { recursive: true }); + await fsPromises.copyFile(src, dest); +}; + +export const BUNDLE_TIMESTAMP = 1495063024898; +export const SECONDARY_BUNDLE_TIMESTAMP = 1495063024899; +export const ASSET_UPLOAD_FILE = 'loadable-stats.json'; +export const ASSET_UPLOAD_OTHER_FILE = 'loadable-stats-other.json'; + +export function getFixtureBundle() { + return path.resolve(__dirname, './fixtures/bundle.js'); +} + +export function getFixtureSecondaryBundle() { + return path.resolve(__dirname, './fixtures/secondary-bundle.js'); +} + +export function getFixtureAsset() { + return path.resolve(__dirname, `./fixtures/${ASSET_UPLOAD_FILE}`); +} + +export function getOtherFixtureAsset() { + return path.resolve(__dirname, `./fixtures/${ASSET_UPLOAD_OTHER_FILE}`); +} + +export function serverBundleCachePath(testName: string) { + return path.resolve(__dirname, 'tmp', testName); +} + +export function setConfig(testName: string) { + buildConfig({ + serverBundleCachePath: serverBundleCachePath(testName), + }); +} + +export function vmBundlePath(testName: string) { + return path.resolve(serverBundleCachePath(testName), `${BUNDLE_TIMESTAMP}`, `${BUNDLE_TIMESTAMP}.js`); +} + +export function vmSecondaryBundlePath(testName: string) { + return path.resolve( + serverBundleCachePath(testName), + `${SECONDARY_BUNDLE_TIMESTAMP}`, + `${SECONDARY_BUNDLE_TIMESTAMP}.js`, + ); +} + +export async function createVmBundle(testName: string) { + await safeCopyFileAsync(getFixtureBundle(), vmBundlePath(testName)); + return buildVM(vmBundlePath(testName)); +} + +export async function createSecondaryVmBundle(testName: string) { + await safeCopyFileAsync(getFixtureSecondaryBundle(), vmSecondaryBundlePath(testName)); + return buildVM(vmSecondaryBundlePath(testName)); +} + +export function lockfilePath(testName: string) { + return `${vmBundlePath(testName)}.lock`; +} + +export function secondaryLockfilePath(testName: string) { + return `${vmSecondaryBundlePath(testName)}.lock`; +} + +export function uploadedBundleDir(testName: string) { + return path.resolve(serverBundleCachePath(testName), 'uploads'); +} + +export function uploadedBundlePath(testName: string) { + return path.resolve(uploadedBundleDir(testName), `${BUNDLE_TIMESTAMP}.js`); +} + +export function uploadedSecondaryBundlePath(testName: string) { + return path.resolve(uploadedBundleDir(testName), `${SECONDARY_BUNDLE_TIMESTAMP}.js`); +} + +export function uploadedAssetPath(testName: string) { + return path.resolve(uploadedBundleDir(testName), ASSET_UPLOAD_FILE); +} + +export function uploadedAssetOtherPath(testName: string) { + return path.resolve(uploadedBundleDir(testName), ASSET_UPLOAD_OTHER_FILE); +} + +export function assetPath(testName: string, bundleTimestamp: string) { + return path.resolve(serverBundleCachePath(testName), bundleTimestamp, ASSET_UPLOAD_FILE); +} + +export function assetPathOther(testName: string, bundleTimestamp: string) { + return path.resolve(serverBundleCachePath(testName), bundleTimestamp, ASSET_UPLOAD_OTHER_FILE); +} + +export async function createUploadedBundle(testName: string) { + await mkdirAsync(uploadedBundleDir(testName), { recursive: true }); + return safeCopyFileAsync(getFixtureBundle(), uploadedBundlePath(testName)); +} + +export async function createUploadedSecondaryBundle(testName: string) { + await mkdirAsync(uploadedBundleDir(testName), { recursive: true }); + return safeCopyFileAsync(getFixtureSecondaryBundle(), uploadedSecondaryBundlePath(testName)); +} + +export async function createUploadedAsset(testName: string) { + await mkdirAsync(uploadedBundleDir(testName), { recursive: true }); + return Promise.all([ + safeCopyFileAsync(getFixtureAsset(), uploadedAssetPath(testName)), + safeCopyFileAsync(getOtherFixtureAsset(), uploadedAssetOtherPath(testName)), + ]); +} + +export async function createAsset(testName: string, bundleTimestamp: string) { + return Promise.all([ + safeCopyFileAsync(getFixtureAsset(), assetPath(testName, bundleTimestamp)), + safeCopyFileAsync(getOtherFixtureAsset(), assetPathOther(testName, bundleTimestamp)), + ]); +} + +export async function resetForTest(testName: string) { + await fsExtra.emptyDir(serverBundleCachePath(testName)); + resetVM(); + setConfig(testName); +} + +export function readRenderingRequest(projectName: string, commit: string, requestDumpFileName: string) { + const renderingRequestRelativePath = path.join( + './fixtures/projects/', + projectName, + commit, + requestDumpFileName, + ); + return fs.readFileSync(path.resolve(__dirname, renderingRequestRelativePath), 'utf8'); +} + +setConfig('helper'); diff --git a/packages/react-on-rails-pro-node-renderer/tests/htmlStreaming.test.js b/packages/react-on-rails-pro-node-renderer/tests/htmlStreaming.test.js new file mode 100644 index 0000000000..cd59220570 --- /dev/null +++ b/packages/react-on-rails-pro-node-renderer/tests/htmlStreaming.test.js @@ -0,0 +1,232 @@ +import http2 from 'http2'; +import buildApp from '../src/worker'; +import config from './testingNodeRendererConfigs'; +import * as errorReporter from '../src/shared/errorReporter'; +import { createForm, SERVER_BUNDLE_TIMESTAMP } from './httpRequestUtils'; + +const app = buildApp(config); + +beforeAll(async () => { + await app.ready(); + await app.listen({ port: 0 }); +}); + +afterAll(async () => { + await app.close(); +}); + +jest.spyOn(errorReporter, 'message').mockImplementation(jest.fn()); + +const makeRequest = async (options = {}) => { + const startTime = Date.now(); + const form = createForm(options); + const { port } = app.server.address(); + const client = http2.connect(`http://localhost:${port}`); + const request = client.request({ + ':method': 'POST', + ':path': `/bundles/${SERVER_BUNDLE_TIMESTAMP}/render/454a82526211afdb215352755d36032c`, + 'content-type': `multipart/form-data; boundary=${form.getBoundary()}`, + }); + request.setEncoding('utf8'); + + const chunks = []; + const jsonChunks = []; + let firstByteTime; + let status; + const decoder = new TextDecoder(); + + request.on('response', (headers) => { + status = headers[':status']; + }); + + request.on('data', (data) => { + // Sometimes, multiple chunks are merged into one. + // So, the server uses \n as a delimiter between chunks. + const decodedData = typeof data === 'string' ? data : decoder.decode(data, { stream: false }); + const decodedChunksFromData = decodedData + .split('\n') + .map((chunk) => chunk.trim()) + .filter((chunk) => chunk.length > 0); + chunks.push(...decodedChunksFromData); + jsonChunks.push( + ...decodedChunksFromData.map((chunk) => { + try { + return JSON.parse(chunk); + } catch (e) { + return { hasErrors: true, error: `JSON parsing failed: ${e.message}` }; + } + }), + ); + if (!firstByteTime) { + firstByteTime = Date.now(); + } + }); + + form.pipe(request); + form.on('end', () => { + request.end(); + }); + + await new Promise((resolve, reject) => { + request.on('end', () => { + client.close(); + resolve(); + }); + request.on('error', (err) => { + client.close(); + reject(err); + }); + }); + + const endTime = Date.now(); + const fullBody = chunks.join(''); + const timeToFirstByte = firstByteTime - startTime; + const streamingTime = endTime - firstByteTime; + + return { status, chunks, fullBody, timeToFirstByte, streamingTime, jsonChunks }; +}; + +describe('html streaming', () => { + it("should send each html chunk immediately when it's ready", async () => { + const { status, timeToFirstByte, streamingTime, chunks } = await makeRequest(); + expect(status).toBe(200); + expect(chunks.length).toBeGreaterThanOrEqual(5); + + expect(timeToFirstByte).toBeLessThan(2000); + expect(streamingTime).toBeGreaterThan(3 * timeToFirstByte); + }, 10000); + + it('should returns the component shell only in the first chunk', async () => { + const { status, chunks } = await makeRequest(); + expect(status).toBe(200); + + const firstChunk = chunks[0]; + + expect(firstChunk).toContain('<p>Header for AsyncComponentsTreeForTesting</p>'); + expect(firstChunk).toContain('<p>Footer for AsyncComponentsTreeForTesting</p>'); + expect(firstChunk).toContain('Loading HelloWorldHooks...'); + expect(firstChunk).toContain('Loading branch1...'); + expect(firstChunk).toContain('Loading branch2...'); + }, 10000); + + it('should stream chunks one by one', async () => { + const { status, chunks } = await makeRequest(); + expect(status).toBe(200); + + const secondChunk = chunks[1]; + expect(secondChunk).not.toContain('<p>Header for AsyncComponentsTreeForTesting</p>'); + expect(secondChunk).not.toContain('<p>Footer for AsyncComponentsTreeForTesting</p>'); + expect(secondChunk).not.toContain('Loading branch1...'); + expect(secondChunk).not.toContain('Loading branch2...'); + expect(secondChunk).not.toContain('branch1 (level 0)'); + }, 10000); + + it('should contains all components', async () => { + const { fullBody } = await makeRequest(); + + expect(fullBody).toContain('branch1 (level 4)'); + expect(fullBody).toContain('branch1 (level 3)'); + expect(fullBody).toContain('branch1 (level 2)'); + expect(fullBody).toContain('branch1 (level 1)'); + expect(fullBody).toContain('branch1 (level 0)'); + expect(fullBody).toContain('branch2 (level 1)'); + expect(fullBody).toContain('branch2 (level 0)'); + }, 10000); + + it.each([true, false])( + 'sever components are not rendered when a sync error happens, but the error is not considered at the shell (throwJsErrors: %s)', + async (throwJsErrors) => { + const { status, jsonChunks } = await makeRequest({ + props: { throwSyncError: true }, + throwJsErrors, + }); + expect(jsonChunks.length).toBeGreaterThanOrEqual(1); + expect(jsonChunks.length).toBeLessThanOrEqual(4); + + const chunksWithError = jsonChunks.filter((chunk) => chunk.hasErrors); + expect(chunksWithError).toHaveLength(1); + expect(chunksWithError[0].renderingError.message).toMatch( + /Sync error from AsyncComponentsTreeForTesting/, + ); + expect(chunksWithError[0].html).toMatch(/Sync error from AsyncComponentsTreeForTesting/); + expect(chunksWithError[0].isShellReady).toBeTruthy(); + expect(status).toBe(200); + }, + 10000, + ); + + it("shouldn't notify error reporter when throwJsErrors is false and shell error happens", async () => { + await makeRequest({ + props: { throwSyncError: true }, + // throwJsErrors is false by default + }); + expect(errorReporter.message).not.toHaveBeenCalled(); + }, 10000); + + it('should notify error reporter when throwJsErrors is true and shell error happens', async () => { + await makeRequest({ + props: { throwSyncError: true }, + throwJsErrors: true, + }); + // Reporter is called twice: once for the error occured at RSC vm and the other while rendering the errornous rsc payload + expect(errorReporter.message).toHaveBeenCalledTimes(2); + expect(errorReporter.message).toHaveBeenCalledWith( + expect.stringMatching( + /Error in a rendering stream[\s\S.]*Sync error from AsyncComponentsTreeForTesting/, + ), + ); + }, 10000); + + it.each([true, false])( + 'should keep rendering other suspense boundaries if error happen in one of them (throwJsErrors: %s)', + async (throwJsErrors) => { + const { status, chunks, fullBody, jsonChunks } = await makeRequest({ + props: { throwAsyncError: true }, + throwJsErrors, + }); + expect(chunks.length).toBeGreaterThan(5); + expect(status).toBe(200); + + expect(chunks[0]).toContain('<p>Header for AsyncComponentsTreeForTesting</p>'); + expect(fullBody).toContain('branch1 (level 4)'); + expect(fullBody).toContain('branch1 (level 3)'); + expect(fullBody).toContain('branch1 (level 2)'); + expect(fullBody).toContain('branch1 (level 1)'); + expect(fullBody).toContain('branch1 (level 0)'); + expect(fullBody).toContain('branch2 (level 1)'); + expect(fullBody).toContain('branch2 (level 0)'); + + expect(jsonChunks[0].isShellReady).toBeTruthy(); + expect(jsonChunks[0].hasErrors).toBeTruthy(); + expect(jsonChunks[0].renderingError).toMatchObject({ + message: 'Async error from AsyncHelloWorldHooks', + stack: expect.stringMatching( + /Error: Async error from AsyncHelloWorldHooks\s*at AsyncHelloWorldHooks/, + ), + }); + expect(jsonChunks.slice(1).some((chunk) => chunk.hasErrors)).toBeFalsy(); + expect(jsonChunks.slice(1).some((chunk) => chunk.renderingError)).toBeFalsy(); + }, + 10000, + ); + + it('should not notify error reporter when throwJsErrors is false and async error happens', async () => { + await makeRequest({ + props: { throwAsyncError: true }, + throwJsErrors: false, + }); + expect(errorReporter.message).not.toHaveBeenCalled(); + }, 10000); + + it('should notify error reporter when throwJsErrors is true and async error happens', async () => { + await makeRequest({ + props: { throwAsyncError: true }, + throwJsErrors: true, + }); + // Reporter is called twice: once for the error occured at RSC vm and the other while rendering the errornous rsc payload + expect(errorReporter.message).toHaveBeenCalledTimes(2); + expect(errorReporter.message).toHaveBeenCalledWith( + expect.stringMatching(/Error in a rendering stream[\s\S.]*Async error from AsyncHelloWorldHooks/), + ); + }, 10000); +}); diff --git a/packages/react-on-rails-pro-node-renderer/tests/httpRequestUtils.ts b/packages/react-on-rails-pro-node-renderer/tests/httpRequestUtils.ts new file mode 100644 index 0000000000..7baab23a2e --- /dev/null +++ b/packages/react-on-rails-pro-node-renderer/tests/httpRequestUtils.ts @@ -0,0 +1,176 @@ +import fs from 'fs'; +import path from 'path'; +import http2 from 'http2'; +import FormData from 'form-data'; +import buildApp from '../src/worker'; +import { readRenderingRequest } from './helper'; +import packageJson from '../src/shared/packageJson'; + +export const SERVER_BUNDLE_TIMESTAMP = '77777-test'; +// Ensure to match the rscBundleHash at `asyncComponentsTreeForTestingRenderingRequest.js` fixture +export const RSC_BUNDLE_TIMESTAMP = '88888-test'; + +type RequestOptions = { + project: string; + commit: string; + props: Record<string, unknown>; + throwJsErrors: boolean; + componentName: string; + renderRscPayload: boolean; +}; + +export const createForm = ({ + project = 'spec-dummy', + commit = '', + props = {}, + throwJsErrors = false, + componentName = undefined, +}: Partial<RequestOptions> = {}) => { + const form = new FormData(); + form.append('gemVersion', packageJson.version); + form.append('protocolVersion', packageJson.protocolVersion); + form.append('password', 'myPassword1'); + form.append('dependencyBundleTimestamps[]', RSC_BUNDLE_TIMESTAMP); + + let renderingRequestCode = readRenderingRequest( + project, + commit, + 'asyncComponentsTreeForTestingRenderingRequest.js', + ); + const componentNameString = componentName ? `'${componentName}'` : String(undefined); + renderingRequestCode = renderingRequestCode.replace( + /\(\s*\)\s*$/, + `(${componentNameString}, ${JSON.stringify(props)})`, + ); + if (throwJsErrors) { + renderingRequestCode = renderingRequestCode.replace('throwJsErrors: false', 'throwJsErrors: true'); + } + form.append('renderingRequest', renderingRequestCode); + + const testBundlesDirectory = path.join(__dirname, '../../../spec/dummy/ssr-generated'); + const testClientBundlesDirectory = path.join(__dirname, '../../../spec/dummy/public/webpack/test'); + const bundlePath = path.join(testBundlesDirectory, 'server-bundle.js'); + form.append(`bundle_${SERVER_BUNDLE_TIMESTAMP}`, fs.createReadStream(bundlePath), { + contentType: 'text/javascript', + filename: 'server-bundle.js', + }); + const rscBundlePath = path.join(testBundlesDirectory, 'rsc-bundle.js'); + form.append(`bundle_${RSC_BUNDLE_TIMESTAMP}`, fs.createReadStream(rscBundlePath), { + contentType: 'text/javascript', + filename: 'rsc-bundle.js', + }); + const clientManifestPath = path.join(testClientBundlesDirectory, 'react-client-manifest.json'); + form.append('asset1', fs.createReadStream(clientManifestPath), { + contentType: 'application/json', + filename: 'react-client-manifest.json', + }); + const reactServerClientManifestPath = path.join(testBundlesDirectory, 'react-server-client-manifest.json'); + form.append('asset2', fs.createReadStream(reactServerClientManifestPath), { + contentType: 'application/json', + filename: 'react-server-client-manifest.json', + }); + + return form; +}; + +const getAppUrl = (app: ReturnType<typeof buildApp>) => { + const addresssInfo = app.server.address(); + if (!addresssInfo) { + throw new Error('The app has no address, ensure to run the app before running tests'); + } + + if (typeof addresssInfo === 'string') { + return addresssInfo; + } + + return `http://localhost:${addresssInfo.port}`; +}; + +export const makeRequest = (app: ReturnType<typeof buildApp>, options: Partial<RequestOptions> = {}) => { + const form = createForm(options); + const client = http2.connect(getAppUrl(app)); + const usedBundleTimestamp = options.renderRscPayload ? RSC_BUNDLE_TIMESTAMP : SERVER_BUNDLE_TIMESTAMP; + const request = client.request({ + ':method': 'POST', + ':path': `/bundles/${usedBundleTimestamp}/render/454a82526211afdb215352755d36032c`, + 'content-type': `multipart/form-data; boundary=${form.getBoundary()}`, + }); + request.setEncoding('utf8'); + + const buffer: string[] = []; + + const statusPromise = new Promise<number | undefined>((resolve) => { + request.on('response', (headers) => { + resolve(headers[':status']); + }); + }); + + let resolveChunksPromise: ((chunks: string) => void) | undefined; + let rejectChunksPromise: ((error: unknown) => void) | undefined; + let resolveChunkPromiseTimeout: NodeJS.Timeout | undefined; + + const scheduleResolveChunkPromise = () => { + if (resolveChunkPromiseTimeout) { + clearTimeout(resolveChunkPromiseTimeout); + } + + resolveChunkPromiseTimeout = setTimeout(() => { + resolveChunksPromise?.(buffer.join('')); + resolveChunksPromise = undefined; + rejectChunksPromise = undefined; + buffer.length = 0; + }, 1000); + }; + + request.on('data', (data: Buffer) => { + buffer.push(data.toString()); + if (resolveChunksPromise) { + scheduleResolveChunkPromise(); + } + }); + + form.pipe(request); + form.on('end', () => { + request.end(); + }); + + const rejectPendingChunkPromise = () => { + if (rejectChunksPromise && buffer.length === 0) { + rejectChunksPromise('Request already eneded'); + } + }; + + const finishedPromise = new Promise<void>((resolve, reject) => { + request.on('end', () => { + client.destroy(); + resolve(); + rejectPendingChunkPromise(); + }); + request.on('error', (err) => { + client.destroy(); + reject(err instanceof Error ? err : new Error(String(err))); + rejectPendingChunkPromise(); + }); + }); + + const waitForNextChunk = () => + new Promise<string>((resolve, reject) => { + if (client.closed && buffer.length === 0) { + reject(new Error('Request already eneded')); + } + resolveChunksPromise = resolve; + rejectChunksPromise = reject; + if (buffer.length > 0) { + scheduleResolveChunkPromise(); + } + }); + + const getBuffer = () => [...buffer]; + + return { + statusPromise, + finishedPromise, + waitForNextChunk, + getBuffer, + }; +}; diff --git a/packages/react-on-rails-pro-node-renderer/tests/licenseValidator.test.ts b/packages/react-on-rails-pro-node-renderer/tests/licenseValidator.test.ts new file mode 100644 index 0000000000..06149fd0e0 --- /dev/null +++ b/packages/react-on-rails-pro-node-renderer/tests/licenseValidator.test.ts @@ -0,0 +1,274 @@ +import * as jwt from 'jsonwebtoken'; +import * as fs from 'fs'; +import * as crypto from 'crypto'; + +// Mock modules +jest.mock('fs'); +jest.mock('../src/shared/licensePublicKey', () => ({ + PUBLIC_KEY: '', +})); + +interface LicenseData { + sub?: string; + exp: number; + plan?: string; + iss?: string; + [key: string]: unknown; +} + +interface LicenseValidatorModule { + getValidatedLicenseData: () => LicenseData; + isEvaluation: () => boolean; + getGraceDaysRemaining: () => number | undefined; + reset: () => void; +} + +describe('LicenseValidator', () => { + let testPrivateKey: string; + let testPublicKey: string; + let mockProcessExit: jest.SpyInstance; + let mockConsoleError: jest.SpyInstance; + + beforeEach(() => { + // Clear the module cache to get a fresh instance + jest.resetModules(); + + // Mock process.exit globally to prevent tests from actually exiting + mockProcessExit = jest.spyOn(process, 'exit').mockImplementation(() => { + // Do nothing - let tests continue + return undefined as never; + }); + + // Mock console methods to suppress logs during tests + mockConsoleError = jest.spyOn(console, 'error').mockImplementation(() => {}); + jest.spyOn(console, 'log').mockImplementation(() => {}); + + // Reset fs mocks to default (no file exists) + jest.mocked(fs.existsSync).mockReturnValue(false); + jest.mocked(fs.readFileSync).mockReturnValue(''); + + // Generate test RSA key pair + const { publicKey, privateKey } = crypto.generateKeyPairSync('rsa', { + modulusLength: 2048, + publicKeyEncoding: { + type: 'spki', + format: 'pem', + }, + privateKeyEncoding: { + type: 'pkcs8', + format: 'pem', + }, + }); + + testPrivateKey = privateKey; + testPublicKey = publicKey; + + // Mock the public key module + jest.doMock('../src/shared/licensePublicKey', () => ({ + PUBLIC_KEY: testPublicKey, + })); + + // Clear environment variable + delete process.env.REACT_ON_RAILS_PRO_LICENSE; + + // Import after mocking and reset the validator state + const module = jest.requireActual<LicenseValidatorModule>('../src/shared/licenseValidator'); + module.reset(); + }); + + afterEach(() => { + delete process.env.REACT_ON_RAILS_PRO_LICENSE; + jest.restoreAllMocks(); + }); + + describe('getValidatedLicenseData', () => { + it('returns valid license data for valid license in ENV', () => { + const validPayload = { + sub: 'test@example.com', + iat: Math.floor(Date.now() / 1000), + exp: Math.floor(Date.now() / 1000) + 3600, // Valid for 1 hour + }; + + const validToken = jwt.sign(validPayload, testPrivateKey, { algorithm: 'RS256' }); + process.env.REACT_ON_RAILS_PRO_LICENSE = validToken; + + const module = jest.requireActual<LicenseValidatorModule>('../src/shared/licenseValidator'); + const data = module.getValidatedLicenseData(); + expect(data).toBeDefined(); + expect(data.sub).toBe('test@example.com'); + expect(data.exp).toBe(validPayload.exp); + }); + + it('calls process.exit for expired license in non-production', () => { + const expiredPayload = { + sub: 'test@example.com', + iat: Math.floor(Date.now() / 1000) - 7200, + exp: Math.floor(Date.now() / 1000) - 3600, // Expired 1 hour ago + }; + + const expiredToken = jwt.sign(expiredPayload, testPrivateKey, { algorithm: 'RS256' }); + process.env.REACT_ON_RAILS_PRO_LICENSE = expiredToken; + + const module = jest.requireActual<LicenseValidatorModule>('../src/shared/licenseValidator'); + + // Call getValidatedLicenseData which should trigger process.exit + module.getValidatedLicenseData(); + + // Verify process.exit was called with code 1 + expect(mockProcessExit).toHaveBeenCalledWith(1); + expect(mockConsoleError).toHaveBeenCalledWith(expect.stringContaining('License has expired')); + expect(mockConsoleError).toHaveBeenCalledWith(expect.stringContaining('FREE evaluation license')); + }); + + it('calls process.exit for license missing exp field', () => { + const payloadWithoutExp = { + sub: 'test@example.com', + iat: Math.floor(Date.now() / 1000), + // exp field is missing + }; + + const tokenWithoutExp = jwt.sign(payloadWithoutExp, testPrivateKey, { algorithm: 'RS256' }); + process.env.REACT_ON_RAILS_PRO_LICENSE = tokenWithoutExp; + + const module = jest.requireActual<LicenseValidatorModule>('../src/shared/licenseValidator'); + + module.getValidatedLicenseData(); + + expect(mockProcessExit).toHaveBeenCalledWith(1); + expect(mockConsoleError).toHaveBeenCalledWith( + expect.stringContaining('License is missing required expiration field'), + ); + expect(mockConsoleError).toHaveBeenCalledWith(expect.stringContaining('FREE evaluation license')); + }); + + it('calls process.exit for invalid signature', () => { + // Generate a different key pair for invalid signature + const wrongKeyPair = crypto.generateKeyPairSync('rsa', { + modulusLength: 2048, + publicKeyEncoding: { + type: 'spki', + format: 'pem', + }, + privateKeyEncoding: { + type: 'pkcs8', + format: 'pem', + }, + }); + const wrongKey = wrongKeyPair.privateKey; + + const validPayload = { + sub: 'test@example.com', + iat: Math.floor(Date.now() / 1000), + exp: Math.floor(Date.now() / 1000) + 3600, + }; + + const invalidToken = jwt.sign(validPayload, wrongKey, { algorithm: 'RS256' }); + process.env.REACT_ON_RAILS_PRO_LICENSE = invalidToken; + + const module = jest.requireActual<LicenseValidatorModule>('../src/shared/licenseValidator'); + + module.getValidatedLicenseData(); + + expect(mockProcessExit).toHaveBeenCalledWith(1); + expect(mockConsoleError).toHaveBeenCalledWith(expect.stringContaining('Invalid license signature')); + expect(mockConsoleError).toHaveBeenCalledWith(expect.stringContaining('FREE evaluation license')); + }); + + it('calls process.exit for missing license', () => { + delete process.env.REACT_ON_RAILS_PRO_LICENSE; + + // Mock fs.existsSync to return false (no config file) + jest.mocked(fs.existsSync).mockReturnValue(false); + + const module = jest.requireActual<LicenseValidatorModule>('../src/shared/licenseValidator'); + + module.getValidatedLicenseData(); + + expect(mockProcessExit).toHaveBeenCalledWith(1); + expect(mockConsoleError).toHaveBeenCalledWith(expect.stringContaining('No license found')); + expect(mockConsoleError).toHaveBeenCalledWith(expect.stringContaining('FREE evaluation license')); + }); + + it('caches validation result', () => { + const validPayload = { + sub: 'test@example.com', + iat: Math.floor(Date.now() / 1000), + exp: Math.floor(Date.now() / 1000) + 3600, + }; + + const validToken = jwt.sign(validPayload, testPrivateKey, { algorithm: 'RS256' }); + process.env.REACT_ON_RAILS_PRO_LICENSE = validToken; + + const module = jest.requireActual<LicenseValidatorModule>('../src/shared/licenseValidator'); + + // First call + const data1 = module.getValidatedLicenseData(); + expect(data1.sub).toBe('test@example.com'); + + // Change ENV (shouldn't affect cached result) + delete process.env.REACT_ON_RAILS_PRO_LICENSE; + + // Second call should use cache + const data2 = module.getValidatedLicenseData(); + expect(data2.sub).toBe('test@example.com'); + }); + }); + + describe('isEvaluation', () => { + it('returns true for free license', () => { + const freePayload = { + sub: 'test@example.com', + iat: Math.floor(Date.now() / 1000), + exp: Math.floor(Date.now() / 1000) + 3600, + plan: 'free', + }; + + const validToken = jwt.sign(freePayload, testPrivateKey, { algorithm: 'RS256' }); + process.env.REACT_ON_RAILS_PRO_LICENSE = validToken; + + const module = jest.requireActual<LicenseValidatorModule>('../src/shared/licenseValidator'); + expect(module.isEvaluation()).toBe(true); + }); + + it('returns false for paid license', () => { + const paidPayload = { + sub: 'test@example.com', + iat: Math.floor(Date.now() / 1000), + exp: Math.floor(Date.now() / 1000) + 3600, + plan: 'paid', + }; + + const validToken = jwt.sign(paidPayload, testPrivateKey, { algorithm: 'RS256' }); + process.env.REACT_ON_RAILS_PRO_LICENSE = validToken; + + const module = jest.requireActual<LicenseValidatorModule>('../src/shared/licenseValidator'); + expect(module.isEvaluation()).toBe(false); + }); + }); + + describe('reset', () => { + it('clears cached validation data', () => { + const validPayload = { + sub: 'test@example.com', + iat: Math.floor(Date.now() / 1000), + exp: Math.floor(Date.now() / 1000) + 3600, + }; + + const validToken = jwt.sign(validPayload, testPrivateKey, { algorithm: 'RS256' }); + process.env.REACT_ON_RAILS_PRO_LICENSE = validToken; + + const module = jest.requireActual<LicenseValidatorModule>('../src/shared/licenseValidator'); + + // Validate once to cache + module.getValidatedLicenseData(); + + // Reset and change license + module.reset(); + delete process.env.REACT_ON_RAILS_PRO_LICENSE; + + // Should fail now since license is missing and cache was cleared + module.getValidatedLicenseData(); + expect(mockProcessExit).toHaveBeenCalledWith(1); + }); + }); +}); diff --git a/packages/react-on-rails-pro-node-renderer/tests/redisClient.test.ts b/packages/react-on-rails-pro-node-renderer/tests/redisClient.test.ts new file mode 100644 index 0000000000..bd0652d3f7 --- /dev/null +++ b/packages/react-on-rails-pro-node-renderer/tests/redisClient.test.ts @@ -0,0 +1,119 @@ +// This test in only for documenting Redis client usage + +import { createClient } from 'redis'; + +const redisClient = createClient({ url: process.env.REDIS_URL || 'redis://localhost:6379' }); + +interface RedisStreamMessage { + id: string; + message: Record<string, string>; +} +interface RedisStreamResult { + name: string; + messages: RedisStreamMessage[]; +} + +test('Redis client connects successfully', async () => { + await redisClient.connect(); + expect(redisClient.isOpen).toBe(true); + await redisClient.quit(); +}); + +test('calls connect after quit', async () => { + await redisClient.connect(); + expect(redisClient.isOpen).toBe(true); + await redisClient.quit(); + + await redisClient.connect(); + expect(redisClient.isOpen).toBe(true); + await redisClient.quit(); +}); + +test('calls quit before connect is resolved', async () => { + const client = createClient({ url: process.env.REDIS_URL || 'redis://localhost:6379' }); + const connectPromise = client.connect(); + await client.quit(); + await connectPromise; + expect(client.isOpen).toBe(false); +}); + +test('multiple connect calls', async () => { + const client = createClient({ url: process.env.REDIS_URL || 'redis://localhost:6379' }); + const connectPromise1 = client.connect(); + const connectPromise2 = client.connect(); + await expect(connectPromise2).rejects.toThrow('Socket already opened'); + await expect(connectPromise1).resolves.toMatchObject({}); + expect(client.isOpen).toBe(true); + await client.quit(); +}); + +test('write to stream and read back', async () => { + const client = createClient({ url: process.env.REDIS_URL || 'redis://localhost:6379' }); + await client.connect(); + + const streamKey = 'test-stream'; + await client.del(streamKey); + const messageId = await client.xAdd(streamKey, '*', { field1: 'value1' }); + + const result = (await client.xRead({ key: streamKey, id: '0-0' }, { COUNT: 1, BLOCK: 2000 })) as + | RedisStreamResult[] + | null; + expect(result).not.toBeNull(); + expect(result).toBeDefined(); + + const [stream] = result!; + expect(stream).toBeDefined(); + expect(stream?.messages.length).toBe(1); + const [message] = stream!.messages; + expect(message!.id).toBe(messageId); + expect(message!.message).toEqual({ field1: 'value1' }); + + await client.quit(); +}); + +test('quit while reading from stream', async () => { + const client = createClient({ url: process.env.REDIS_URL || 'redis://localhost:6379' }); + await client.connect(); + + const streamKey = 'test-stream-quit'; + + const readPromise = client.xRead({ key: streamKey, id: '$' }, { BLOCK: 0 }); + + // Wait a moment to ensure xRead is blocking + await new Promise((resolve) => { + setTimeout(resolve, 500); + }); + + client.destroy(); + + await expect(readPromise).rejects.toThrow(); +}); + +it('expire sets TTL on stream', async () => { + const client = createClient({ url: process.env.REDIS_URL || 'redis://localhost:6379' }); + await client.connect(); + + const streamKey = 'test-stream-expire'; + await client.del(streamKey); + await client.xAdd(streamKey, '*', { field1: 'value1' }); + + const expireResult = await client.expire(streamKey, 1); // 1 second + expect(expireResult).toBe(1); // 1 means the key existed and TTL was set + + const ttl1 = await client.ttl(streamKey); + expect(ttl1).toBeLessThanOrEqual(1); + expect(ttl1).toBeGreaterThan(0); + + const existsBeforeTimeout = await client.exists(streamKey); + expect(existsBeforeTimeout).toBe(1); // Key should exist before timeout + + // Wait for 1.1 seconds + await new Promise((resolve) => { + setTimeout(resolve, 1100); + }); + + const existsAfterTimeout = await client.exists(streamKey); + expect(existsAfterTimeout).toBe(0); // Key should have expired + + await client.quit(); +}); diff --git a/packages/react-on-rails-pro-node-renderer/tests/serverRenderRSCReactComponent.test.js b/packages/react-on-rails-pro-node-renderer/tests/serverRenderRSCReactComponent.test.js new file mode 100644 index 0000000000..adf2114f23 --- /dev/null +++ b/packages/react-on-rails-pro-node-renderer/tests/serverRenderRSCReactComponent.test.js @@ -0,0 +1,185 @@ +import path from 'path'; +import fs from 'fs'; +import { Readable } from 'stream'; +import { buildVM, getVMContext, resetVM } from '../src/worker/vm'; +import { getConfig } from '../src/shared/configBuilder'; + +const SimpleWorkingComponent = () => 'hello'; + +const ComponentWithSyncError = () => { + throw new Error('Sync error'); +}; + +const ComponentWithAsyncError = async () => { + await new Promise((resolve) => { + setTimeout(resolve, 0); + }); + throw new Error('Async error'); +}; + +describe('serverRenderRSCReactComponent', () => { + let tempDir; + let tempRscBundlePath; + let tempManifestPath; + + beforeAll(async () => { + // Create temporary directory + tempDir = path.join(process.cwd(), 'tmp/node-renderer-bundles-test/testing-bundle'); + fs.mkdirSync(tempDir, { recursive: true }); + + // Copy rsc-bundle.js to temp directory + const originalRscBundlePath = path.join(__dirname, '../../../spec/dummy/ssr-generated/rsc-bundle.js'); + tempRscBundlePath = path.join(tempDir, 'rsc-bundle.js'); + fs.copyFileSync(originalRscBundlePath, tempRscBundlePath); + + // Copy react-client-manifest.json to temp directory + const originalManifestPath = path.join( + __dirname, + '../../../spec/dummy/public/webpack/test/react-client-manifest.json', + ); + tempManifestPath = path.join(tempDir, 'react-client-manifest.json'); + fs.copyFileSync(originalManifestPath, tempManifestPath); + }); + + afterAll(async () => { + // Clean up temporary directory + if (tempDir && fs.existsSync(tempDir)) { + fs.rmSync(tempDir, { recursive: true, force: true }); + } + }); + + beforeEach(async () => { + const config = getConfig(); + config.supportModules = true; + config.maxVMPoolSize = 2; // Set a small pool size for testing + config.stubTimers = false; + }); + + afterEach(async () => { + resetVM(); + }); + + // The serverRenderRSCReactComponent function should only be called when the bundle is compiled with the `react-server` condition. + // Therefore, we cannot call it directly in the test files. Instead, we run the RSC bundle through the VM and call the method from there. + const getReactOnRailsRSCObject = async () => { + // Use the copied rsc-bundle.js file from temp directory + await buildVM(tempRscBundlePath); + const vmContext = getVMContext(tempRscBundlePath); + const { ReactOnRails, React } = vmContext.context; + + function SuspensedComponentWithAsyncError() { + return React.createElement('div', null, [ + React.createElement('div', null, 'Hello'), + React.createElement( + React.Suspense, + { + fallback: React.createElement('div', null, 'Loading Async Component...'), + }, + React.createElement(ComponentWithAsyncError), + ), + ]); + } + + ReactOnRails.register({ + SimpleWorkingComponent, + ComponentWithSyncError, + ComponentWithAsyncError, + SuspensedComponentWithAsyncError, + }); + + return ReactOnRails; + }; + + const renderComponent = async (componentName, throwJsErrors = false) => { + const ReactOnRails = await getReactOnRailsRSCObject(); + return ReactOnRails.serverRenderRSCReactComponent({ + name: componentName, + props: {}, + throwJsErrors, + railsContext: { + serverSide: true, + reactClientManifestFileName: path.basename(tempManifestPath), + reactServerClientManifestFileName: 'react-server-client-manifest.json', + renderingReturnsPromises: true, + }, + }); + }; + + it('ReactOnRails should be defined and have serverRenderRSCReactComponent method', async () => { + const result = await getReactOnRailsRSCObject(); + expect(result).toBeDefined(); + expect(typeof result.serverRenderRSCReactComponent).toBe('function'); + }); + + // Add these helper functions at the top of the describe block + const getStreamContent = async (stream) => { + let content = ''; + stream.on('data', (chunk) => { + content += chunk.toString(); + }); + + await new Promise((resolve) => { + stream.on('end', resolve); + }); + + return content; + }; + + const expectStreamContent = async (stream, expectedContents, options = {}) => { + const { throwJsErrors, expectedError } = options; + expect(stream).toBeDefined(); + expect(stream).toBeInstanceOf(Readable); + + const onError = throwJsErrors ? jest.fn() : null; + if (onError) { + stream.on('error', onError); + } + + const content = await getStreamContent(stream); + + if (expectedError) { + expect(onError).toHaveBeenCalled(); + expect(onError).toHaveBeenCalledWith(new Error(expectedError)); + } + + expectedContents.forEach((text) => { + expect(content).toContain(text); + }); + }; + + it('should returns stream with content when the component renders successfully', async () => { + const result = await renderComponent('SimpleWorkingComponent'); + await expectStreamContent(result, ['hello']); + }); + + it('should returns stream with error when the component throws a sync error', async () => { + const result = await renderComponent('ComponentWithSyncError'); + await expectStreamContent(result, ['Sync error']); + }); + + it('should emit an error when the component throws a sync error and throwJsErrors is true', async () => { + const result = await renderComponent('ComponentWithSyncError', true); + await expectStreamContent(result, ['Sync error'], { + throwJsErrors: true, + expectedError: 'Sync error', + }); + }); + + it('should emit an error when the component throws an async error and throwJsErrors is true', async () => { + const result = await renderComponent('ComponentWithAsyncError', true); + await expectStreamContent(result, ['Async error'], { throwJsErrors: true, expectedError: 'Async error' }); + }); + + it('should render a suspense component with an async error', async () => { + const result = await renderComponent('SuspensedComponentWithAsyncError'); + await expectStreamContent(result, ['Loading Async Component...', 'Hello', 'Async error']); + }); + + it('emits an error when the suspense component throws an async error and throwJsErrors is true', async () => { + const result = await renderComponent('SuspensedComponentWithAsyncError', true); + await expectStreamContent(result, ['Loading Async Component...', 'Hello', 'Async error'], { + throwJsErrors: true, + expectedError: 'Async error', + }); + }); +}); diff --git a/packages/react-on-rails-pro-node-renderer/tests/shared/smartTrim.test.ts b/packages/react-on-rails-pro-node-renderer/tests/shared/smartTrim.test.ts new file mode 100644 index 0000000000..653fbb5684 --- /dev/null +++ b/packages/react-on-rails-pro-node-renderer/tests/shared/smartTrim.test.ts @@ -0,0 +1,19 @@ +import { smartTrim, TRUNCATION_FILLER } from '../../src/shared/utils'; + +test('If gem has posted updated bundle', () => { + const s = '1234567890'; + + expect(smartTrim(s, -1)).toBe('1234567890'); + expect(smartTrim(s, 0)).toBe('1234567890'); + expect(smartTrim(s, 1)).toBe(`1${TRUNCATION_FILLER}`); + expect(smartTrim(s, 2)).toBe(`1${TRUNCATION_FILLER}0`); + expect(smartTrim(s, 3)).toBe(`1${TRUNCATION_FILLER}90`); + expect(smartTrim(s, 4)).toBe(`12${TRUNCATION_FILLER}90`); + expect(smartTrim(s, 5)).toBe(`12${TRUNCATION_FILLER}890`); + expect(smartTrim(s, 6)).toBe(`123${TRUNCATION_FILLER}890`); + expect(smartTrim(s, 7)).toBe(`123${TRUNCATION_FILLER}7890`); + expect(smartTrim(s, 8)).toBe(`1234${TRUNCATION_FILLER}7890`); + expect(smartTrim(s, 9)).toBe(`1234${TRUNCATION_FILLER}67890`); + expect(smartTrim(s, 10)).toBe('1234567890'); + expect(smartTrim(s, 11)).toBe('1234567890'); +}); diff --git a/packages/react-on-rails-pro-node-renderer/tests/shared/tracing.test.ts b/packages/react-on-rails-pro-node-renderer/tests/shared/tracing.test.ts new file mode 100644 index 0000000000..7b83c6e153 --- /dev/null +++ b/packages/react-on-rails-pro-node-renderer/tests/shared/tracing.test.ts @@ -0,0 +1,62 @@ +import { jest } from '@jest/globals'; + +import * as Sentry from '@sentry/node'; +import sentryTestkit from 'sentry-testkit'; +import * as errorReporter from '../../src/shared/errorReporter'; +import { trace } from '../../src/shared/tracing'; +import * as tracingIntegration from '../../src/integrations/sentry'; + +const { testkit, sentryTransport } = sentryTestkit(); + +Sentry.init({ + dsn: 'https://fakeUser@fakeDsn.ingest.sentry.io/0', + tracesSampleRate: 1.0, + transport: sentryTransport, +}); + +tracingIntegration.init({ tracing: true }); + +const spanName = 'TestSpan'; +const testTransactionContext = { sentry: { op: 'test', name: spanName } }; + +beforeEach(() => { + testkit.reset(); +}); + +test('should run function and finish span', async () => { + const fn = jest.fn<Parameters<typeof trace>[0]>(); + let savedSpan: Sentry.Span | undefined; + const message = 'test'; + await trace(async () => { + savedSpan = Sentry.getActiveSpan(); + errorReporter.message(message); + await fn(); + }, testTransactionContext); + expect(savedSpan).toBeDefined(); + // eslint-disable-next-line @typescript-eslint/no-deprecated -- the suggested replacement doesn't work + expect(savedSpan?.name).toBe(spanName); + expect(Sentry.getActiveSpan()).not.toBe(savedSpan); + expect(fn.mock.calls).toHaveLength(1); + + await Sentry.flush(); + const transactions = testkit.transactions(); + expect(transactions).toHaveLength(1); + const transaction = transactions[0]!; + expect(transaction.name).toBe(spanName); + const reports = testkit.reports(); + expect(reports).toHaveLength(1); + const report = reports[0]!; + expect(report.tags.transaction).toBe(spanName); + expect(report.message).toBe(message); +}); + +test('should throw if inner function throws', async () => { + let savedSpan: Sentry.Span | undefined; + await expect(async () => { + await trace(() => { + savedSpan = Sentry.getActiveSpan(); + throw new Error(); + }, testTransactionContext); + }).rejects.toThrow(); + expect(Sentry.getActiveSpan()).not.toBe(savedSpan); +}); diff --git a/packages/react-on-rails-pro-node-renderer/tests/testingNodeRendererConfigs.js b/packages/react-on-rails-pro-node-renderer/tests/testingNodeRendererConfigs.js new file mode 100644 index 0000000000..97965053fe --- /dev/null +++ b/packages/react-on-rails-pro-node-renderer/tests/testingNodeRendererConfigs.js @@ -0,0 +1,36 @@ +import fs from 'fs'; +import { env } from 'process'; + +const BUNDLE_PATH = './tmp/node-renderer-bundles-test'; +if (fs.existsSync(BUNDLE_PATH)) { + fs.rmSync(BUNDLE_PATH, { recursive: true, force: true }); +} + +const config = { + // This is the default but avoids searching for the Rails root + serverBundleCachePath: BUNDLE_PATH, + port: env.RENDERER_PORT || 3800, // Listen at RENDERER_PORT env value or default port 3800 + logLevel: env.RENDERER_LOG_LEVEL || 'info', + + // See value in /config/initializers/react_on_rails_pro.rb. Should use env value in real app. + password: 'myPassword1', + + // If set to true, `supportModules` enables the server-bundle code to call a default set of NodeJS modules + // that get added to the VM context: { Buffer, process, setTimeout, setInterval, clearTimeout, clearInterval }. + // This option is required to equal `true` if you want to use loadable components. + // Setting this value to false causes the NodeRenderer to behave like ExecJS + supportModules: true, + + // additionalContext enables you to specify additional NodeJS modules to add to the VM context in + // addition to our supportModules defaults. + additionalContext: { URL, AbortController }, + + // Required to use setTimeout, setInterval, & clearTimeout during server rendering + stubTimers: false, + + // If set to true, replayServerAsyncOperationLogs will replay console logs from async server operations. + // If set to false, replayServerAsyncOperationLogs will replay console logs from sync server operations only. + replayServerAsyncOperationLogs: true, +}; + +export default config; diff --git a/packages/react-on-rails-pro-node-renderer/tests/tsconfig.json b/packages/react-on-rails-pro-node-renderer/tests/tsconfig.json new file mode 100644 index 0000000000..9c4ea03aed --- /dev/null +++ b/packages/react-on-rails-pro-node-renderer/tests/tsconfig.json @@ -0,0 +1,8 @@ +{ + "extends": "../src/tsconfig.json", + "compilerOptions": { + "noEmit": true, + "rootDir": ".." + }, + "include": ["**/*.ts"] +} diff --git a/packages/react-on-rails-pro-node-renderer/tests/vm.test.ts b/packages/react-on-rails-pro-node-renderer/tests/vm.test.ts new file mode 100644 index 0000000000..051e5d4d92 --- /dev/null +++ b/packages/react-on-rails-pro-node-renderer/tests/vm.test.ts @@ -0,0 +1,710 @@ +import path from 'path'; +import { + uploadedBundlePath, + createUploadedBundle, + readRenderingRequest, + createVmBundle, + resetForTest, + BUNDLE_TIMESTAMP, +} from './helper'; +import { buildVM, hasVMContextForBundle, resetVM, runInVM, getVMContext } from '../src/worker/vm'; +import { getConfig } from '../src/shared/configBuilder'; +import { isErrorRenderResult } from '../src/shared/utils'; + +const testName = 'vm'; +const uploadedBundlePathForTest = () => uploadedBundlePath(testName); +const createUploadedBundleForTest = () => createUploadedBundle(testName); +const createVmBundleForTest = () => createVmBundle(testName); + +describe('buildVM and runInVM', () => { + beforeEach(async () => { + await resetForTest(testName); + }); + + afterAll(async () => { + await resetForTest(testName); + }); + + describe('Buffer and process in context', () => { + test('not available if supportModules disabled', async () => { + const config = getConfig(); + config.supportModules = false; + + await createUploadedBundleForTest(); + await buildVM(uploadedBundlePathForTest()); + + let result = await runInVM('typeof Buffer === "undefined"', uploadedBundlePathForTest()); + expect(result).toBeTruthy(); + + result = await runInVM('typeof process === "undefined"', uploadedBundlePathForTest()); + expect(result).toBeTruthy(); + }); + + test('available if supportModules enabled', async () => { + const config = getConfig(); + config.supportModules = true; + + await createUploadedBundleForTest(); + await buildVM(uploadedBundlePathForTest()); + + let result = await runInVM('typeof Buffer !== "undefined"', uploadedBundlePathForTest()); + expect(result).toBeTruthy(); + + result = await runInVM('typeof process !== "undefined"', uploadedBundlePathForTest()); + expect(result).toBeTruthy(); + }); + }); + + describe('additionalContext', () => { + test('not available if additionalContext not set', async () => { + await createUploadedBundleForTest(); + await buildVM(uploadedBundlePathForTest()); + + const result = await runInVM('typeof testString === "undefined"', uploadedBundlePathForTest()); + expect(result).toBeTruthy(); + }); + + test('available if additionalContext set', async () => { + const config = getConfig(); + config.additionalContext = { testString: 'a string' }; + + await createUploadedBundleForTest(); + await buildVM(uploadedBundlePathForTest()); + + const result = await runInVM('typeof testString !== "undefined"', uploadedBundlePathForTest()); + expect(result).toBeTruthy(); + }); + }); + + test('buildVM and runInVM', async () => { + expect.assertions(14); + + await createUploadedBundleForTest(); + await buildVM(uploadedBundlePathForTest()); + + let result = await runInVM('ReactOnRails', uploadedBundlePathForTest()); + expect(result).toEqual(JSON.stringify({ dummy: { html: 'Dummy Object' } })); + + expect(global.ReactOnRails === undefined).toBeTruthy(); + + result = await runInVM('typeof global !== undefined', uploadedBundlePathForTest()); + expect(result).toBeTruthy(); + + result = await runInVM('Math === global.Math', uploadedBundlePathForTest()); + expect(result).toBeTruthy(); + + result = await runInVM('ReactOnRails === global.ReactOnRails', uploadedBundlePathForTest()); + expect(result).toBeTruthy(); + + await runInVM('global.testVar = "test"', uploadedBundlePathForTest()); + result = await runInVM('this.testVar === "test"', uploadedBundlePathForTest()); + expect(result).toBeTruthy(); + + result = await runInVM('testVar === "test"', uploadedBundlePathForTest()); + expect(result).toBeTruthy(); + + result = await runInVM('console', uploadedBundlePathForTest()); + // @ts-expect-error Intentional comparison + expect(result !== console).toBeTruthy(); + + expect((console as { history?: unknown }).history === undefined).toBeTruthy(); + + result = await runInVM('console.history !== undefined', uploadedBundlePathForTest()); + expect(result).toBeTruthy(); + + result = await runInVM('getStackTrace !== undefined', uploadedBundlePathForTest()); + expect(result).toBeTruthy(); + + result = await runInVM('setInterval !== undefined', uploadedBundlePathForTest()); + expect(result).toBeTruthy(); + + result = await runInVM('setTimeout !== undefined', uploadedBundlePathForTest()); + expect(result).toBeTruthy(); + + result = await runInVM('clearTimeout !== undefined', uploadedBundlePathForTest()); + expect(result).toBeTruthy(); + }); + + test('VM security and captured exceptions', async () => { + expect.assertions(1); + await createUploadedBundleForTest(); + await buildVM(uploadedBundlePathForTest()); + // Adopted form https://github.com/patriksimek/vm2/blob/master/test/tests.js: + const result = await runInVM('process.exit()', uploadedBundlePathForTest()); + expect( + isErrorRenderResult(result) && result.exceptionMessage.match(/process is not defined/), + ).toBeTruthy(); + }); + + test('Captured exceptions for a long message', async () => { + expect.assertions(4); + await createUploadedBundleForTest(); + await buildVM(uploadedBundlePathForTest()); + // Adopted form https://github.com/patriksimek/vm2/blob/master/test/tests.js: + const code = `process.exit()${'\n// 1234567890123456789012345678901234567890'.repeat( + 50, + )}\n// Finishing Comment`; + const result = await runInVM(code, uploadedBundlePathForTest()); + const exceptionMessage = isErrorRenderResult(result) ? result.exceptionMessage : ''; + expect(exceptionMessage.match(/process is not defined/)).toBeTruthy(); + expect(exceptionMessage.match(/process.exit/)).toBeTruthy(); + expect(exceptionMessage.match(/Finishing Comment/)).toBeTruthy(); + expect(exceptionMessage.match(/\.\.\./)).toBeTruthy(); + }); + + test('resetVM', async () => { + expect.assertions(2); + await createUploadedBundleForTest(); + await buildVM(uploadedBundlePathForTest()); + + const result = await runInVM('ReactOnRails', uploadedBundlePathForTest()); + expect(result).toEqual(JSON.stringify({ dummy: { html: 'Dummy Object' } })); + + resetVM(); + + expect(hasVMContextForBundle(uploadedBundlePathForTest())).toBeFalsy(); + }); + + test('VM console history', async () => { + expect.assertions(1); + await createUploadedBundleForTest(); + await buildVM(uploadedBundlePathForTest()); + + const vmResult = await runInVM( + 'console.log("Console message inside of VM") || console.history;', + uploadedBundlePathForTest(), + ); + const consoleHistory = JSON.stringify([ + { level: 'log', arguments: ['[SERVER] Console message inside of VM'] }, + ]); + + expect(vmResult).toEqual(consoleHistory); + }); + + test('getVmBundleFilePath', async () => { + expect.assertions(1); + await createVmBundleForTest(); + + expect( + hasVMContextForBundle( + path.resolve(__dirname, `./tmp/${testName}/${BUNDLE_TIMESTAMP}/${BUNDLE_TIMESTAMP}.js`), + ), + ).toBeTruthy(); + }); + + test('FriendsAndGuests bundle for commit 1a7fe417 requires supportModules false', async () => { + expect.assertions(5); + + const project = 'friendsandguests'; + const commit = '1a7fe417'; + + const config = getConfig(); + config.supportModules = false; + + const serverBundlePath = path.resolve( + __dirname, + './fixtures/projects/friendsandguests/1a7fe417/server-bundle.js', + ); + await buildVM(serverBundlePath); + + // WelcomePage component: + const welcomePageComponentRenderingRequest = readRenderingRequest( + project, + commit, + 'welcomePageRenderingRequest.js', + ); + const welcomePageRenderingResult = await runInVM(welcomePageComponentRenderingRequest, serverBundlePath); + expect( + (welcomePageRenderingResult as string).includes('data-react-checksum=\\"800299790\\"'), + ).toBeTruthy(); + + // LayoutNavbar component: + const layoutNavbarComponentRenderingRequest = readRenderingRequest( + project, + commit, + 'layoutNavbarRenderingRequest.js', + ); + const layoutNavbarRenderingResult = await runInVM( + layoutNavbarComponentRenderingRequest, + serverBundlePath, + ); + expect( + (layoutNavbarRenderingResult as string).includes('data-react-checksum=\\"-667058792\\"'), + ).toBeTruthy(); + + // ListingIndex component: + const listingIndexComponentRenderingRequest = readRenderingRequest( + project, + commit, + 'listingIndexRenderingRequest.js', + ); + const listingIndexRenderingResult = await runInVM( + listingIndexComponentRenderingRequest, + serverBundlePath, + ); + expect( + (listingIndexRenderingResult as string).includes('data-react-checksum=\\"452252439\\"'), + ).toBeTruthy(); + + // ListingShow component: + const listingShowComponentRenderingRequest = readRenderingRequest( + project, + commit, + 'listingsShowRenderingRequest.js', + ); + const listingShowRenderingResult = await runInVM(listingShowComponentRenderingRequest, serverBundlePath); + expect( + (listingShowRenderingResult as string).includes('data-react-checksum=\\"-324043796\\"'), + ).toBeTruthy(); + + // UserShow component: + const userShowComponentRenderingRequest = readRenderingRequest( + project, + commit, + 'userShowRenderingRequest.js', + ); + const userShowRenderingResult = await runInVM(userShowComponentRenderingRequest, serverBundlePath); + expect( + (userShowRenderingResult as string).includes('data-react-checksum=\\"-1039690194\\"'), + ).toBeTruthy(); + }); + + test('ReactWebpackRailsTutorial bundle for commit ec974491', async () => { + expect.assertions(3); + + const project = 'react-webpack-rails-tutorial'; + const commit = 'ec974491'; + + const serverBundlePath = path.resolve( + __dirname, + './fixtures/projects/react-webpack-rails-tutorial/ec974491/server-bundle.js', + ); + await buildVM(serverBundlePath); + + // NavigationBar component: + const navigationBarComponentRenderingRequest = readRenderingRequest( + project, + commit, + 'navigationBarAppRenderingRequest.js', + ); + const navigationBarRenderingResult = await runInVM( + navigationBarComponentRenderingRequest, + serverBundlePath, + ); + expect( + (navigationBarRenderingResult as string).includes('data-react-checksum=\\"-472831860\\"'), + ).toBeTruthy(); + + // RouterApp component: + const routerAppComponentRenderingRequest = readRenderingRequest( + project, + commit, + 'routerAppRenderingRequest.js', + ); + const routerAppRenderingResult = await runInVM(routerAppComponentRenderingRequest, serverBundlePath); + expect( + (routerAppRenderingResult as string).includes('data-react-checksum=\\"-1777286250\\"'), + ).toBeTruthy(); + + // App component: + const appComponentRenderingRequest = readRenderingRequest(project, commit, 'appRenderingRequest.js'); + const appRenderingResult = await runInVM(appComponentRenderingRequest, serverBundlePath); + expect((appRenderingResult as string).includes('data-react-checksum=\\"-490396040\\"')).toBeTruthy(); + }); + + test('BionicWorkshop bundle for commit fa6ccf6b', async () => { + expect.assertions(4); + + const project = 'bionicworkshop'; + const commit = 'fa6ccf6b'; + + const serverBundlePath = path.resolve( + __dirname, + './fixtures/projects/bionicworkshop/fa6ccf6b/server-bundle.js', + ); + await buildVM(serverBundlePath); + + // SignIn page with flash component: + const signInPageWithFlashRenderingRequest = readRenderingRequest( + project, + commit, + 'signInPageWithFlashRenderingRequest.js', + ); + const signInPageWithFlashRenderingResult = await runInVM( + signInPageWithFlashRenderingRequest, + serverBundlePath, + ); + + // We don't put checksum here since it changes for every request with Rails auth token: + expect((signInPageWithFlashRenderingResult as string).includes('data-react-checksum=')).toBeTruthy(); + + // Landing page component: + const landingPageRenderingRequest = readRenderingRequest( + project, + commit, + 'landingPageRenderingRequest.js', + ); + const landingPageRenderingResult = await runInVM(landingPageRenderingRequest, serverBundlePath); + expect( + (landingPageRenderingResult as string).includes('data-react-checksum=\\"-1899958456\\"'), + ).toBeTruthy(); + + // Post page component: + const postPageRenderingRequest = readRenderingRequest(project, commit, 'postPageRenderingRequest.js'); + const postPageRenderingResult = await runInVM(postPageRenderingRequest, serverBundlePath); + expect( + (postPageRenderingResult as string).includes('data-react-checksum=\\"-1296077150\\"'), + ).toBeTruthy(); + + // Authors page component: + const authorsPageRenderingRequest = readRenderingRequest( + project, + commit, + 'authorsPageRenderingRequest.js', + ); + const authorsPageRenderingResult = await runInVM(authorsPageRenderingRequest, serverBundlePath); + expect( + (authorsPageRenderingResult as string).includes('data-react-checksum=\\"-1066737665\\"'), + ).toBeTruthy(); + }); + + // Testing using a bundle that used a web target for the server bundle + test('spec/dummy web', async () => { + expect.assertions(1); + + const project = 'spec-dummy'; + const commit = '9fa89f7'; + + const serverBundlePath = path.resolve( + __dirname, + './fixtures/projects/spec-dummy/9fa89f7/server-bundle-web-target.js', + ); + await buildVM(serverBundlePath); + + // WelcomePage component: + const reduxAppComponentRenderingRequest = readRenderingRequest( + project, + commit, + 'reduxAppRenderingRequest.js', + ); + const reduxAppRenderingResult = await runInVM(reduxAppComponentRenderingRequest, serverBundlePath); + + expect( + (reduxAppRenderingResult as string).includes( + '<h3>Redux Hello, <!-- -->Mr. Server Side Rendering<!-- -->!</h3>', + ), + ).toBeTruthy(); + }); + + describe('spec/dummy node', () => { + const project = 'spec-dummy'; + const commit = 'e5e10d1'; + const consoleLogsInAsyncServerRequest = readRenderingRequest( + project, + commit, + 'consoleLogsInAsyncServerRequest.js', + ); + const serverBundlePath = path.resolve( + __dirname, + './fixtures/projects/spec-dummy/e5e10d1/server-bundle-node-target.js', + ); + + const requestId = '6ce0caf9-2691-472a-b59b-5de390bcffdf'; + + const prepareVM = async (replayServerAsyncOperationLogs: boolean) => { + const config = getConfig(); + config.supportModules = true; + config.stubTimers = false; + config.replayServerAsyncOperationLogs = replayServerAsyncOperationLogs; + + await buildVM(serverBundlePath); + }; + + test('console logs in sync and async server operations', async () => { + await prepareVM(true); + const consoleLogsInAsyncServerRequestResult = (await runInVM( + consoleLogsInAsyncServerRequest, + serverBundlePath, + )) as string; + + expect(consoleLogsInAsyncServerRequestResult).toContain( + `console.log.apply(console, [\\"[SERVER] [${requestId}] Console log from Sync Server\\"]);`, + ); + expect(consoleLogsInAsyncServerRequestResult).toContain( + `console.log.apply(console, [\\"[SERVER] [${requestId}] Console log from Recursive Async Function at level 8\\"]);`, + ); + expect(consoleLogsInAsyncServerRequestResult).toContain( + `console.log.apply(console, [\\"[SERVER] [${requestId}] Console log from Simple Async Function at iteration 7\\"]);`, + ); + expect(consoleLogsInAsyncServerRequestResult).toContain( + `console.log.apply(console, [\\"[SERVER] [${requestId}] Console log from Async Server after calling async functions\\"]);`, + ); + }); + + test('console logs are not leaked to other requests', async () => { + await prepareVM(true); + const otherRequestId = '9f3b7e12-5a8d-4c6f-b1e3-2d7f8a6c9e0b'; + const otherconsoleLogsInAsyncServerRequest = consoleLogsInAsyncServerRequest.replace( + requestId, + otherRequestId, + ); + const [firstRequestResult, otherRequestResult] = (await Promise.all([ + runInVM(consoleLogsInAsyncServerRequest, serverBundlePath), + runInVM(otherconsoleLogsInAsyncServerRequest, serverBundlePath), + ])) as [string, string]; + + expect(firstRequestResult).toContain(requestId); + expect(firstRequestResult).not.toContain(otherRequestId); + + expect(otherRequestResult).not.toContain(requestId); + expect(otherRequestResult).toContain(otherRequestId); + + expect(otherRequestResult).toContain( + `console.log.apply(console, [\\"[SERVER] [${otherRequestId}] Console log from Sync Server\\"]);`, + ); + expect(otherRequestResult).toContain( + `console.log.apply(console, [\\"[SERVER] [${otherRequestId}] Console log from Recursive Async Function at level 8\\"]);`, + ); + expect(otherRequestResult).toContain( + `console.log.apply(console, [\\"[SERVER] [${otherRequestId}] Console log from Simple Async Function at iteration 7\\"]);`, + ); + expect(otherRequestResult).toContain( + `console.log.apply(console, [\\"[SERVER] [${otherRequestId}] Console log from Async Server after calling async functions\\"]);`, + ); + }); + + test('if replayServerAsyncOperationLogs is false, only sync console logs are replayed', async () => { + await prepareVM(false); + const consoleLogsInAsyncServerRequestResult = await runInVM( + consoleLogsInAsyncServerRequest, + serverBundlePath, + ); + + expect(consoleLogsInAsyncServerRequestResult as string).toContain( + `console.log.apply(console, [\\"[SERVER] [${requestId}] Console log from Sync Server\\"]);`, + ); + expect(consoleLogsInAsyncServerRequestResult as string).not.toContain( + `console.log.apply(console, [\\"[SERVER] [${requestId}] Console log from Simple Async Function at iteration 7\\"]);`, + ); + expect(consoleLogsInAsyncServerRequestResult as string).not.toContain( + `console.log.apply(console, [\\"[SERVER] [${requestId}] Console log from Recursive Async Function at level 8\\"]);`, + ); + expect(consoleLogsInAsyncServerRequestResult as string).not.toContain( + `console.log.apply(console, [\\"[SERVER] [${requestId}] Console log from Async Server after calling async functions\\"]);`, + ); + }); + + test('console logs are not leaked to other requests when replayServerAsyncOperationLogs is false', async () => { + await prepareVM(false); + const otherRequestId = '9f3b7e12-5a8d-4c6f-b1e3-2d7f8a6c9e0b'; + const otherconsoleLogsInAsyncServerRequest = consoleLogsInAsyncServerRequest.replace( + requestId, + otherRequestId, + ); + const [firstRequestResult, otherRequestResult] = (await Promise.all([ + runInVM(consoleLogsInAsyncServerRequest, serverBundlePath), + runInVM(otherconsoleLogsInAsyncServerRequest, serverBundlePath), + ])) as [string, string]; + + expect(firstRequestResult).toContain(requestId); + expect(firstRequestResult).not.toContain(otherRequestId); + + expect(otherRequestResult).not.toContain(requestId); + expect(otherRequestResult).toContain(otherRequestId); + + expect(firstRequestResult).toContain( + `console.log.apply(console, [\\"[SERVER] [${requestId}] Console log from Sync Server\\"]);`, + ); + expect(otherRequestResult).toContain( + `console.log.apply(console, [\\"[SERVER] [${otherRequestId}] Console log from Sync Server\\"]);`, + ); + expect(otherRequestResult).not.toContain( + `console.log.apply(console, [\\"[SERVER] [${otherRequestId}] Console log from Recursive Async Function at level 8\\"]);`, + ); + expect(otherRequestResult).not.toContain( + `console.log.apply(console, [\\"[SERVER] [${otherRequestId}] Console log from Simple Async Function at iteration 7\\"]);`, + ); + expect(otherRequestResult).not.toContain( + `console.log.apply(console, [\\"[SERVER] [${otherRequestId}] Console log from Async Server after calling async functions\\"]);`, + ); + }); + + test('calling multiple buildVM in parallel creates the same VM context', async () => { + const buildAndGetVmContext = async () => { + await prepareVM(true); + return getVMContext(serverBundlePath); + }; + + const [vmContext1, vmContext2] = await Promise.all([buildAndGetVmContext(), buildAndGetVmContext()]); + expect(vmContext1).toBe(vmContext2); + }); + + test('running runInVM before buildVM', async () => { + resetVM(); + void prepareVM(true); + // If the bundle is parsed, ReactOnRails object will be globally available and has the serverRenderReactComponent method + const ReactOnRails = await runInVM( + 'typeof ReactOnRails !== "undefined" && ReactOnRails && typeof ReactOnRails.serverRenderReactComponent', + serverBundlePath, + ); + expect(ReactOnRails).toBe('function'); + }); + + test("running multiple buildVM in parallel doesn't cause runInVM to return partial results", async () => { + resetVM(); + void Promise.all([prepareVM(true), prepareVM(true), prepareVM(true), prepareVM(true)]); + // If the bundle is parsed, ReactOnRails object will be globally available and has the serverRenderReactComponent method + const runCodeInVM = () => + runInVM( + 'typeof ReactOnRails !== "undefined" && ReactOnRails && typeof ReactOnRails.serverRenderReactComponent', + serverBundlePath, + ); + const [runCodeInVM1, runCodeInVM2, runCodeInVM3] = await Promise.all([ + runCodeInVM(), + runCodeInVM(), + runCodeInVM(), + ]); + expect(runCodeInVM1).toBe('function'); + expect(runCodeInVM2).toBe('function'); + expect(runCodeInVM3).toBe('function'); + }); + }); + + describe('VM Pool Management', () => { + beforeEach(async () => { + await resetForTest(testName); + const config = getConfig(); + config.supportModules = true; + config.maxVMPoolSize = 2; // Set a small pool size for testing + }); + + afterEach(async () => { + await resetForTest(testName); + resetVM(); + }); + + test('respects maxVMPoolSize limit', async () => { + const bundle1 = path.resolve( + __dirname, + './fixtures/projects/spec-dummy/9fa89f7/server-bundle-web-target.js', + ); + const bundle2 = path.resolve( + __dirname, + './fixtures/projects/spec-dummy/e5e10d1/server-bundle-node-target.js', + ); + const bundle3 = path.resolve(__dirname, './fixtures/projects/bionicworkshop/fa6ccf6b/server-bundle.js'); + + // Build VMs up to and beyond the pool limit + await buildVM(bundle1); + await buildVM(bundle2); + await buildVM(bundle3); + + // Only the two most recently used bundles should have contexts + expect(hasVMContextForBundle(bundle1)).toBeFalsy(); + expect(hasVMContextForBundle(bundle2)).toBeTruthy(); + expect(hasVMContextForBundle(bundle3)).toBeTruthy(); + }); + + test('calling buildVM with the same bundle path does not create a new VM', async () => { + const bundle1 = path.resolve( + __dirname, + './fixtures/projects/spec-dummy/9fa89f7/server-bundle-web-target.js', + ); + const bundle2 = path.resolve( + __dirname, + './fixtures/projects/spec-dummy/e5e10d1/server-bundle-node-target.js', + ); + await buildVM(bundle1); + await buildVM(bundle2); + await buildVM(bundle2); + await buildVM(bundle2); + + expect(hasVMContextForBundle(bundle1)).toBeTruthy(); + expect(hasVMContextForBundle(bundle2)).toBeTruthy(); + }); + + test('updates lastUsed timestamp when accessing existing VM', async () => { + const bundle1 = path.resolve( + __dirname, + './fixtures/projects/spec-dummy/9fa89f7/server-bundle-web-target.js', + ); + const bundle2 = path.resolve( + __dirname, + './fixtures/projects/spec-dummy/e5e10d1/server-bundle-node-target.js', + ); + const bundle3 = path.resolve(__dirname, './fixtures/projects/bionicworkshop/fa6ccf6b/server-bundle.js'); + + // Create initial VMs + await buildVM(bundle1); + await buildVM(bundle2); + + // Wait a bit to ensure timestamp difference + await new Promise((resolve) => { + setTimeout(resolve, 100); + }); + + // Access bundle1 again to update its timestamp + await buildVM(bundle1); + + // Add a new VM - should remove bundle2 as it's the oldest + await buildVM(bundle3); + + // Bundle1 should still exist as it was accessed more recently + expect(hasVMContextForBundle(bundle1)).toBeTruthy(); + expect(hasVMContextForBundle(bundle2)).toBeFalsy(); + expect(hasVMContextForBundle(bundle3)).toBeTruthy(); + }); + + test('updates lastUsed timestamp when running code in VM', async () => { + const bundle1 = path.resolve( + __dirname, + './fixtures/projects/spec-dummy/9fa89f7/server-bundle-web-target.js', + ); + const bundle2 = path.resolve( + __dirname, + './fixtures/projects/spec-dummy/e5e10d1/server-bundle-node-target.js', + ); + const bundle3 = path.resolve(__dirname, './fixtures/projects/bionicworkshop/fa6ccf6b/server-bundle.js'); + + // Create initial VMs + await buildVM(bundle1); + await buildVM(bundle2); + + // Wait a bit to ensure timestamp difference + await new Promise((resolve) => { + setTimeout(resolve, 100); + }); + + // Run code in bundle1 to update its timestamp + await runInVM('1 + 1', bundle1); + + // Add a new VM - should remove bundle2 as it's the oldest + await buildVM(bundle3); + + // Bundle1 should still exist as it was used more recently + expect(hasVMContextForBundle(bundle1)).toBeTruthy(); + expect(hasVMContextForBundle(bundle2)).toBeFalsy(); + expect(hasVMContextForBundle(bundle3)).toBeTruthy(); + }); + + test('reuses existing VM context', async () => { + const bundle = path.resolve( + __dirname, + './fixtures/projects/spec-dummy/9fa89f7/server-bundle-web-target.js', + ); + + // Build VM first time + await buildVM(bundle); + + // Set a variable in the VM context + await runInVM('global.testVar = "test value"', bundle); + + // Build VM second time - should reuse existing context + await buildVM(bundle); + + // Variable should still exist if context was reused + const result = await runInVM('global.testVar', bundle); + expect(result).toBe('test value'); + }); + }); +}); diff --git a/packages/react-on-rails-pro-node-renderer/tests/worker.test.ts b/packages/react-on-rails-pro-node-renderer/tests/worker.test.ts new file mode 100644 index 0000000000..a8e2fb1699 --- /dev/null +++ b/packages/react-on-rails-pro-node-renderer/tests/worker.test.ts @@ -0,0 +1,472 @@ +import formAutoContent from 'form-auto-content'; +import fs from 'fs'; +import querystring from 'querystring'; +import { createReadStream } from 'fs-extra'; +// eslint-disable-next-line import/no-relative-packages +import packageJson from '../../../package.json'; +import worker, { disableHttp2 } from '../src/worker'; +import { + BUNDLE_TIMESTAMP, + SECONDARY_BUNDLE_TIMESTAMP, + createVmBundle, + resetForTest, + vmBundlePath, + getFixtureBundle, + getFixtureSecondaryBundle, + getFixtureAsset, + getOtherFixtureAsset, + createAsset, + serverBundleCachePath, + assetPath, + assetPathOther, +} from './helper'; + +const testName = 'worker'; +const createVmBundleForTest = () => createVmBundle(testName); +const serverBundleCachePathForTest = () => serverBundleCachePath(testName); + +const gemVersion = packageJson.version; +const { protocolVersion } = packageJson; +const railsEnv = 'test'; + +disableHttp2(); + +describe('worker', () => { + beforeEach(async () => { + await resetForTest(testName); + }); + + afterAll(async () => { + await resetForTest(testName); + }); + + test('POST /bundles/:bundleTimestamp/render/:renderRequestDigest when bundle is provided and did not yet exist', async () => { + const app = worker({ + serverBundleCachePath: serverBundleCachePathForTest(), + }); + + const form = formAutoContent({ + gemVersion, + protocolVersion, + railsEnv, + renderingRequest: 'ReactOnRails.dummy', + bundle: createReadStream(getFixtureBundle()), + asset1: createReadStream(getFixtureAsset()), + asset2: createReadStream(getOtherFixtureAsset()), + }); + const res = await app + .inject() + .post(`/bundles/${BUNDLE_TIMESTAMP}/render/d41d8cd98f00b204e9800998ecf8427e`) + .payload(form.payload) + .headers(form.headers) + .end(); + expect(res.statusCode).toBe(200); + expect(res.headers['cache-control']).toBe('public, max-age=31536000'); + expect(res.payload).toBe('{"html":"Dummy Object"}'); + expect(fs.existsSync(vmBundlePath(testName))).toBe(true); + expect(fs.existsSync(assetPath(testName, String(BUNDLE_TIMESTAMP)))).toBe(true); + expect(fs.existsSync(assetPathOther(testName, String(BUNDLE_TIMESTAMP)))).toBe(true); + }); + + test('POST /bundles/:bundleTimestamp/render/:renderRequestDigest', async () => { + const app = worker({ + serverBundleCachePath: serverBundleCachePathForTest(), + }); + + const form = formAutoContent({ + gemVersion, + protocolVersion, + railsEnv, + renderingRequest: 'ReactOnRails.dummy', + bundle: createReadStream(getFixtureBundle()), + [`bundle_${SECONDARY_BUNDLE_TIMESTAMP}`]: createReadStream(getFixtureSecondaryBundle()), + asset1: createReadStream(getFixtureAsset()), + asset2: createReadStream(getOtherFixtureAsset()), + }); + const res = await app + .inject() + .post(`/bundles/${BUNDLE_TIMESTAMP}/render/d41d8cd98f00b204e9800998ecf8427e`) + .payload(form.payload) + .headers(form.headers) + .end(); + expect(res.statusCode).toBe(200); + expect(res.headers['cache-control']).toBe('public, max-age=31536000'); + expect(res.payload).toBe('{"html":"Dummy Object"}'); + expect(fs.existsSync(vmBundlePath(testName))).toBe(true); + expect(fs.existsSync(assetPath(testName, String(BUNDLE_TIMESTAMP)))).toBe(true); + expect(fs.existsSync(assetPathOther(testName, String(BUNDLE_TIMESTAMP)))).toBe(true); + expect(fs.existsSync(assetPath(testName, String(SECONDARY_BUNDLE_TIMESTAMP)))).toBe(true); + expect(fs.existsSync(assetPathOther(testName, String(SECONDARY_BUNDLE_TIMESTAMP)))).toBe(true); + }); + + test( + 'POST /bundles/:bundleTimestamp/render/:renderRequestDigest ' + + 'when password is required but no password was provided', + async () => { + await createVmBundleForTest(); + + const app = worker({ + serverBundleCachePath: serverBundleCachePathForTest(), + password: 'password', + }); + + const res = await app + .inject() + .post('/bundles/1495063024898/render/d41d8cd98f00b204e9800998ecf8427e') + .payload({ + renderingRequest: 'ReactOnRails.dummy', + password: undefined, + gemVersion, + protocolVersion, + railsEnv, + }) + .end(); + expect(res.statusCode).toBe(401); + expect(res.payload).toBe('Wrong password'); + }, + ); + + test( + 'POST /bundles/:bundleTimestamp/render/:renderRequestDigest ' + + 'when password is required but wrong password was provided', + async () => { + await createVmBundleForTest(); + + const app = worker({ + serverBundleCachePath: serverBundleCachePathForTest(), + password: 'password', + }); + + const res = await app + .inject() + .post('/bundles/1495063024898/render/d41d8cd98f00b204e9800998ecf8427e') + .payload({ + renderingRequest: 'ReactOnRails.dummy', + password: 'wrong', + gemVersion, + protocolVersion, + railsEnv, + }) + .end(); + expect(res.statusCode).toBe(401); + expect(res.payload).toBe('Wrong password'); + }, + ); + + test( + 'POST /bundles/:bundleTimestamp/render/:renderRequestDigest ' + + 'when password is required and correct password was provided', + async () => { + await createVmBundleForTest(); + + const app = worker({ + serverBundleCachePath: serverBundleCachePathForTest(), + password: 'my_password', + }); + + const res = await app + .inject() + .post('/bundles/1495063024898/render/d41d8cd98f00b204e9800998ecf8427e') + .payload({ + renderingRequest: 'ReactOnRails.dummy', + password: 'my_password', + gemVersion, + protocolVersion, + railsEnv, + }) + .end(); + expect(res.statusCode).toBe(200); + expect(res.headers['cache-control']).toBe('public, max-age=31536000'); + expect(res.payload).toBe('{"html":"Dummy Object"}'); + }, + ); + + test( + 'POST /bundles/:bundleTimestamp/render/:renderRequestDigest ' + + 'when password is not required and no password was provided', + async () => { + await createVmBundleForTest(); + + const app = worker({ + serverBundleCachePath: serverBundleCachePathForTest(), + }); + + const res = await app + .inject() + .post('/bundles/1495063024898/render/d41d8cd98f00b204e9800998ecf8427e') + .payload({ + renderingRequest: 'ReactOnRails.dummy', + password: undefined, + gemVersion, + protocolVersion, + railsEnv, + }); + expect(res.headers['cache-control']).toBe('public, max-age=31536000'); + expect(res.statusCode).toBe(200); + expect(res.payload).toBe('{"html":"Dummy Object"}'); + }, + ); + + test('post /asset-exists when asset exists', async () => { + const bundleHash = 'some-bundle-hash'; + await createAsset(testName, bundleHash); + + const app = worker({ + serverBundleCachePath: serverBundleCachePathForTest(), + password: 'my_password', + }); + + const query = querystring.stringify({ filename: 'loadable-stats.json' }); + + const res = await app + .inject() + .post(`/asset-exists?${query}`) + .payload({ + password: 'my_password', + targetBundles: [bundleHash], + }) + .end(); + expect(res.statusCode).toBe(200); + expect(res.json()).toEqual({ + exists: true, + results: [{ bundleHash, exists: true }], + }); + }); + + test('post /asset-exists when asset not exists', async () => { + const bundleHash = 'some-bundle-hash'; + await createAsset(testName, bundleHash); + + const app = worker({ + serverBundleCachePath: serverBundleCachePathForTest(), + password: 'my_password', + }); + + const query = querystring.stringify({ filename: 'foobar.json' }); + + const res = await app + .inject() + .post(`/asset-exists?${query}`) + .payload({ + password: 'my_password', + targetBundles: [bundleHash], + }) + .end(); + expect(res.statusCode).toBe(200); + expect(res.json()).toEqual({ + exists: false, + results: [{ bundleHash, exists: false }], + }); + }); + + test('post /asset-exists requires targetBundles (protocol version 2.0.0)', async () => { + await createAsset(testName, String(BUNDLE_TIMESTAMP)); + const app = worker({ + serverBundleCachePath: serverBundleCachePathForTest(), + password: 'my_password', + }); + + const query = querystring.stringify({ filename: 'loadable-stats.json' }); + + const res = await app + .inject() + .post(`/asset-exists?${query}`) + .payload({ + password: 'my_password', + }) + .end(); + expect(res.statusCode).toBe(400); + + expect(res.payload).toContain('No targetBundles provided'); + }); + + test('post /upload-assets', async () => { + const bundleHash = 'some-bundle-hash'; + + const app = worker({ + serverBundleCachePath: serverBundleCachePathForTest(), + password: 'my_password', + }); + + const form = formAutoContent({ + gemVersion, + protocolVersion, + railsEnv, + password: 'my_password', + targetBundles: [bundleHash], + asset1: createReadStream(getFixtureAsset()), + asset2: createReadStream(getOtherFixtureAsset()), + }); + const res = await app.inject().post(`/upload-assets`).payload(form.payload).headers(form.headers).end(); + expect(res.statusCode).toBe(200); + expect(fs.existsSync(assetPath(testName, bundleHash))).toBe(true); + expect(fs.existsSync(assetPathOther(testName, bundleHash))).toBe(true); + }); + + test('post /upload-assets with multiple bundles and assets', async () => { + const bundleHash = 'some-bundle-hash'; + const bundleHashOther = 'some-other-bundle-hash'; + + const app = worker({ + serverBundleCachePath: serverBundleCachePathForTest(), + password: 'my_password', + }); + + const form = formAutoContent({ + gemVersion, + protocolVersion, + railsEnv, + password: 'my_password', + targetBundles: [bundleHash, bundleHashOther], + asset1: createReadStream(getFixtureAsset()), + asset2: createReadStream(getOtherFixtureAsset()), + }); + + const res = await app.inject().post(`/upload-assets`).payload(form.payload).headers(form.headers).end(); + expect(res.statusCode).toBe(200); + expect(fs.existsSync(assetPath(testName, bundleHash))).toBe(true); + expect(fs.existsSync(assetPathOther(testName, bundleHash))).toBe(true); + expect(fs.existsSync(assetPath(testName, bundleHashOther))).toBe(true); + expect(fs.existsSync(assetPathOther(testName, bundleHashOther))).toBe(true); + }); + + describe('gem version validation', () => { + test('allows request when gem version matches package version', async () => { + await createVmBundleForTest(); + + const app = worker({ + serverBundleCachePath: serverBundleCachePathForTest(), + }); + + const res = await app + .inject() + .post('/bundles/1495063024898/render/d41d8cd98f00b204e9800998ecf8427e') + .payload({ + renderingRequest: 'ReactOnRails.dummy', + gemVersion: packageJson.version, + protocolVersion, + railsEnv: 'development', + }); + + expect(res.statusCode).toBe(200); + expect(res.payload).toBe('{"html":"Dummy Object"}'); + }); + + test('rejects request in development when gem version does not match', async () => { + await createVmBundleForTest(); + + const app = worker({ + serverBundleCachePath: serverBundleCachePathForTest(), + }); + + const res = await app + .inject() + .post('/bundles/1495063024898/render/d41d8cd98f00b204e9800998ecf8427e') + .payload({ + renderingRequest: 'ReactOnRails.dummy', + gemVersion: '999.0.0', + protocolVersion, + railsEnv: 'development', + }) + .end(); + + expect(res.statusCode).toBe(412); + expect(res.payload).toContain('Version mismatch error'); + expect(res.payload).toContain('999.0.0'); + expect(res.payload).toContain(packageJson.version); + }); + + test('allows request in production when gem version does not match (with warning)', async () => { + await createVmBundleForTest(); + + const app = worker({ + serverBundleCachePath: serverBundleCachePathForTest(), + }); + + const res = await app + .inject() + .post('/bundles/1495063024898/render/d41d8cd98f00b204e9800998ecf8427e') + .payload({ + renderingRequest: 'ReactOnRails.dummy', + gemVersion: '999.0.0', + protocolVersion, + railsEnv: 'production', + }); + + expect(res.statusCode).toBe(200); + expect(res.payload).toBe('{"html":"Dummy Object"}'); + }); + + test('normalizes gem version with dot before prerelease (4.0.0.rc.1 == 4.0.0-rc.1)', async () => { + await createVmBundleForTest(); + + const app = worker({ + serverBundleCachePath: serverBundleCachePathForTest(), + }); + + // If package version is 4.0.0, this tests that 4.0.0.rc.1 gets normalized to 4.0.0-rc.1 + // For this test to work properly, we need to use a version that when normalized matches + // Let's create a version with .rc. that normalizes to the package version + const gemVersionWithDot = packageJson.version.replace(/-([a-z]+)/, '.$1'); + + const res = await app + .inject() + .post('/bundles/1495063024898/render/d41d8cd98f00b204e9800998ecf8427e') + .payload({ + renderingRequest: 'ReactOnRails.dummy', + gemVersion: gemVersionWithDot, + protocolVersion, + railsEnv: 'development', + }); + + expect(res.statusCode).toBe(200); + expect(res.payload).toBe('{"html":"Dummy Object"}'); + }); + + test('normalizes gem version case-insensitively (4.0.0-RC.1 == 4.0.0-rc.1)', async () => { + await createVmBundleForTest(); + + const app = worker({ + serverBundleCachePath: serverBundleCachePathForTest(), + }); + + const gemVersionUpperCase = packageJson.version.toUpperCase(); + + const res = await app + .inject() + .post('/bundles/1495063024898/render/d41d8cd98f00b204e9800998ecf8427e') + .payload({ + renderingRequest: 'ReactOnRails.dummy', + gemVersion: gemVersionUpperCase, + protocolVersion, + railsEnv: 'development', + }); + + expect(res.statusCode).toBe(200); + expect(res.payload).toBe('{"html":"Dummy Object"}'); + }); + + test('handles whitespace in gem version', async () => { + await createVmBundleForTest(); + + const app = worker({ + serverBundleCachePath: serverBundleCachePathForTest(), + }); + + const gemVersionWithWhitespace = ` ${packageJson.version} `; + + const res = await app + .inject() + .post('/bundles/1495063024898/render/d41d8cd98f00b204e9800998ecf8427e') + .payload({ + renderingRequest: 'ReactOnRails.dummy', + gemVersion: gemVersionWithWhitespace, + protocolVersion, + railsEnv: 'development', + }); + + expect(res.statusCode).toBe(200); + expect(res.payload).toBe('{"html":"Dummy Object"}'); + }); + }); +}); diff --git a/packages/react-on-rails/tests/buildConsoleReplay.test.js b/packages/react-on-rails/tests/buildConsoleReplay.test.js index d0e897da76..3d49bff96a 100644 --- a/packages/react-on-rails/tests/buildConsoleReplay.test.js +++ b/packages/react-on-rails/tests/buildConsoleReplay.test.js @@ -89,7 +89,7 @@ console.warn.apply(console, ["other message","{\\"c\\":3,\\"d\\":4}"]); console.history = []; const actual = buildConsoleReplay(undefined, 0, 'abc123'); - expect(actual).toEqual(''); + expect(actual).toBe(''); }); it('consoleReplay returns only JavaScript without script tags', () => { diff --git a/yarn.lock b/yarn.lock index 1415751d8f..fbba2a1645 100644 --- a/yarn.lock +++ b/yarn.lock @@ -61,6 +61,11 @@ resolved "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.23.5.tgz" integrity sha512-uU27kfDRlhfKl+w1U6vp16IuvSLtjAxdArVXPa9BvLkrr7CYIsxH5adpHObeAGY/41+syctUWOZ140a2Rvkgjw== +"@babel/compat-data@^7.27.2": + version "7.28.5" + resolved "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.28.5.tgz#a8a4962e1567121ac0b3b487f52107443b455c7f" + integrity sha512-6uFXyCayocRbqhZOB+6XcuZbkMNimwfVGFji8CTZnCzOHVGvDqzvitu1re2AU5LROliz7eQPhB8CpAMvnx9EjA== + "@babel/core@^7.11.6", "@babel/core@^7.12.3", "@babel/core@^7.20.12": version "7.23.7" resolved "https://registry.npmjs.org/@babel/core/-/core-7.23.7.tgz" @@ -82,6 +87,27 @@ json5 "^2.2.3" semver "^6.3.1" +"@babel/core@^7.26.10": + version "7.28.5" + resolved "https://registry.npmjs.org/@babel/core/-/core-7.28.5.tgz#4c81b35e51e1b734f510c99b07dfbc7bbbb48f7e" + integrity sha512-e7jT4DxYvIDLk1ZHmU/m/mB19rex9sv0c2ftBtjSBv+kVM/902eh0fINUzD7UwLLNR+jU585GxUJ8/EBfAM5fw== + dependencies: + "@babel/code-frame" "^7.27.1" + "@babel/generator" "^7.28.5" + "@babel/helper-compilation-targets" "^7.27.2" + "@babel/helper-module-transforms" "^7.28.3" + "@babel/helpers" "^7.28.4" + "@babel/parser" "^7.28.5" + "@babel/template" "^7.27.2" + "@babel/traverse" "^7.28.5" + "@babel/types" "^7.28.5" + "@jridgewell/remapping" "^2.3.5" + convert-source-map "^2.0.0" + debug "^4.1.0" + gensync "^1.0.0-beta.2" + json5 "^2.2.3" + semver "^6.3.1" + "@babel/eslint-parser@^7.26.10": version "7.26.10" resolved "https://registry.npmjs.org/@babel/eslint-parser/-/eslint-parser-7.26.10.tgz" @@ -91,6 +117,15 @@ eslint-visitor-keys "^2.1.0" semver "^6.3.1" +"@babel/eslint-parser@^7.27.0": + version "7.28.5" + resolved "https://registry.npmjs.org/@babel/eslint-parser/-/eslint-parser-7.28.5.tgz#0b8883a4a1c2cbed7b3cd9d7765d80e8f480b9ae" + integrity sha512-fcdRcWahONYo+JRnJg1/AekOacGvKx12Gu0qXJXFi2WBqQA1i7+O5PaxRB7kxE/Op94dExnCiiar6T09pvdHpA== + dependencies: + "@nicolo-ribaudo/eslint-scope-5-internals" "5.1.1-v1" + eslint-visitor-keys "^2.1.0" + semver "^6.3.1" + "@babel/generator@^7.23.6", "@babel/generator@^7.28.3", "@babel/generator@^7.7.2": version "7.28.3" resolved "https://registry.npmjs.org/@babel/generator/-/generator-7.28.3.tgz" @@ -102,6 +137,17 @@ "@jridgewell/trace-mapping" "^0.3.28" jsesc "^3.0.2" +"@babel/generator@^7.28.5": + version "7.28.5" + resolved "https://registry.npmjs.org/@babel/generator/-/generator-7.28.5.tgz#712722d5e50f44d07bc7ac9fe84438742dd61298" + integrity sha512-3EwLFhZ38J4VyIP6WNtt2kUdW9dokXA9Cr4IVIFHuCpZ3H8/YFOl5JjZHisrn1fATPBmKKqXzDFvh9fUwHz6CQ== + dependencies: + "@babel/parser" "^7.28.5" + "@babel/types" "^7.28.5" + "@jridgewell/gen-mapping" "^0.3.12" + "@jridgewell/trace-mapping" "^0.3.28" + jsesc "^3.0.2" + "@babel/helper-annotate-as-pure@^7.22.5", "@babel/helper-annotate-as-pure@^7.25.9", "@babel/helper-annotate-as-pure@^7.27.3": version "7.27.3" resolved "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.27.3.tgz" @@ -127,6 +173,17 @@ lru-cache "^5.1.1" semver "^6.3.1" +"@babel/helper-compilation-targets@^7.27.2": + version "7.27.2" + resolved "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.27.2.tgz#46a0f6efab808d51d29ce96858dd10ce8732733d" + integrity sha512-2+1thGUUWWjLTYTHZWK1n8Yga0ijBz1XAhUXcKy81rd5g6yh7hGqMp45v7cadSbEHc9G3OTv45SyneRN3ps4DQ== + dependencies: + "@babel/compat-data" "^7.27.2" + "@babel/helper-validator-option" "^7.27.1" + browserslist "^4.24.0" + lru-cache "^5.1.1" + semver "^6.3.1" + "@babel/helper-create-class-features-plugin@^7.22.15", "@babel/helper-create-class-features-plugin@^7.27.1": version "7.28.3" resolved "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.28.3.tgz" @@ -201,7 +258,7 @@ "@babel/traverse" "^7.27.1" "@babel/types" "^7.27.1" -"@babel/helper-module-transforms@^7.23.3", "@babel/helper-module-transforms@^7.27.1": +"@babel/helper-module-transforms@^7.23.3", "@babel/helper-module-transforms@^7.27.1", "@babel/helper-module-transforms@^7.28.3": version "7.28.3" resolved "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.28.3.tgz" integrity sha512-gytXUbs8k2sXS9PnQptz5o0QnpLL51SwASIORY6XaBKF88nsOT0Zw9szLqlSGQDP/4TljBAD5y98p2U1fqkdsw== @@ -265,6 +322,11 @@ resolved "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.27.1.tgz" integrity sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow== +"@babel/helper-validator-identifier@^7.28.5": + version "7.28.5" + resolved "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.28.5.tgz#010b6938fab7cb7df74aa2bbc06aa503b8fe5fb4" + integrity sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q== + "@babel/helper-validator-option@^7.23.5", "@babel/helper-validator-option@^7.25.9", "@babel/helper-validator-option@^7.27.1": version "7.27.1" resolved "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.27.1.tgz" @@ -288,6 +350,14 @@ "@babel/traverse" "^7.23.7" "@babel/types" "^7.23.6" +"@babel/helpers@^7.28.4": + version "7.28.4" + resolved "https://registry.npmjs.org/@babel/helpers/-/helpers-7.28.4.tgz#fe07274742e95bdf7cf1443593eeb8926ab63827" + integrity sha512-HFN59MmQXGHVyYadKLVumYsA9dBFun/ldYxipEjzA4196jpLZd8UjEEBLkbEkvfYreDqJhZxYAWFPtrfhNpj4w== + dependencies: + "@babel/template" "^7.27.2" + "@babel/types" "^7.28.4" + "@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.23.6", "@babel/parser@^7.27.2", "@babel/parser@^7.28.3", "@babel/parser@^7.28.4": version "7.28.4" resolved "https://registry.npmjs.org/@babel/parser/-/parser-7.28.4.tgz" @@ -295,6 +365,13 @@ dependencies: "@babel/types" "^7.28.4" +"@babel/parser@^7.28.5": + version "7.28.5" + resolved "https://registry.npmjs.org/@babel/parser/-/parser-7.28.5.tgz#0b0225ee90362f030efd644e8034c99468893b08" + integrity sha512-KKBU1VGYR7ORr3At5HAtUQ+TV3SzRCXmA/8OdDZiLDBIZxVyzXuztPjfLd3BV1PRAQGCMWWSHYhL0F8d5uHBDQ== + dependencies: + "@babel/types" "^7.28.5" + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@^7.23.3": version "7.23.3" resolved "https://registry.npmjs.org/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.23.3.tgz" @@ -1055,6 +1132,19 @@ "@babel/types" "^7.28.4" debug "^4.3.1" +"@babel/traverse@^7.28.5": + version "7.28.5" + resolved "https://registry.npmjs.org/@babel/traverse/-/traverse-7.28.5.tgz#450cab9135d21a7a2ca9d2d35aa05c20e68c360b" + integrity sha512-TCCj4t55U90khlYkVV/0TfkJkAkUg3jZFA3Neb7unZT8CPok7iiRfaX0F+WnqWqt7OxhOn0uBKXCw4lbL8W0aQ== + dependencies: + "@babel/code-frame" "^7.27.1" + "@babel/generator" "^7.28.5" + "@babel/helper-globals" "^7.28.0" + "@babel/parser" "^7.28.5" + "@babel/template" "^7.27.2" + "@babel/types" "^7.28.5" + debug "^4.3.1" + "@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.22.15", "@babel/types@^7.22.19", "@babel/types@^7.22.5", "@babel/types@^7.23.0", "@babel/types@^7.23.6", "@babel/types@^7.25.9", "@babel/types@^7.27.1", "@babel/types@^7.27.3", "@babel/types@^7.28.2", "@babel/types@^7.28.4", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4.4": version "7.28.4" resolved "https://registry.npmjs.org/@babel/types/-/types-7.28.4.tgz" @@ -1063,6 +1153,14 @@ "@babel/helper-string-parser" "^7.27.1" "@babel/helper-validator-identifier" "^7.27.1" +"@babel/types@^7.28.5": + version "7.28.5" + resolved "https://registry.npmjs.org/@babel/types/-/types-7.28.5.tgz#10fc405f60897c35f07e85493c932c7b5ca0592b" + integrity sha512-qQ5m48eI/MFLQ5PxQj4PFaprjyCTLI37ElWMmNs0K8Lk3dVeOdNpB3ks8jc7yM5CDmVC73eMVk/trk3fgmrUpA== + dependencies: + "@babel/helper-string-parser" "^7.27.1" + "@babel/helper-validator-identifier" "^7.28.5" + "@bcoe/v8-coverage@^0.2.3": version "0.2.3" resolved "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz" @@ -1197,6 +1295,93 @@ "@eslint/core" "^0.12.0" levn "^0.4.1" +"@fastify/ajv-compiler@^4.0.0": + version "4.0.5" + resolved "https://registry.npmjs.org/@fastify/ajv-compiler/-/ajv-compiler-4.0.5.tgz#fdb0887a7af51abaae8c1829e8099d34f8ddd302" + integrity sha512-KoWKW+MhvfTRWL4qrhUwAAZoaChluo0m0vbiJlGMt2GXvL4LVPQEjt8kSpHI3IBq5Rez8fg+XeH3cneztq+C7A== + dependencies: + ajv "^8.12.0" + ajv-formats "^3.0.1" + fast-uri "^3.0.0" + +"@fastify/busboy@^3.0.0": + version "3.2.0" + resolved "https://registry.npmjs.org/@fastify/busboy/-/busboy-3.2.0.tgz#13ed8212f3b9ba697611529d15347f8528058cea" + integrity sha512-m9FVDXU3GT2ITSe0UaMA5rU3QkfC/UXtCU8y0gSN/GugTqtVldOBWIB5V6V3sbmenVZUIpU6f+mPEO2+m5iTaA== + +"@fastify/deepmerge@^3.0.0": + version "3.1.0" + resolved "https://registry.npmjs.org/@fastify/deepmerge/-/deepmerge-3.1.0.tgz#4ee797682268eb9d7da51df8e415219addc512ca" + integrity sha512-lCVONBQINyNhM6LLezB6+2afusgEYR4G8xenMsfe+AT+iZ7Ca6upM5Ha8UkZuYSnuMw3GWl/BiPXnLMi/gSxuQ== + +"@fastify/error@^4.0.0": + version "4.2.0" + resolved "https://registry.npmjs.org/@fastify/error/-/error-4.2.0.tgz#d40f46ba75f541fdcc4dc276b7308bbc8e8e6d7a" + integrity sha512-RSo3sVDXfHskiBZKBPRgnQTtIqpi/7zhJOEmAxCiBcM7d0uwdGdxLlsCaLzGs8v8NnxIRlfG0N51p5yFaOentQ== + +"@fastify/fast-json-stringify-compiler@^5.0.0": + version "5.0.3" + resolved "https://registry.npmjs.org/@fastify/fast-json-stringify-compiler/-/fast-json-stringify-compiler-5.0.3.tgz#fae495bf30dbbd029139839ec5c2ea111bde7d3f" + integrity sha512-uik7yYHkLr6fxd8hJSZ8c+xF4WafPK+XzneQDPU+D10r5X19GW8lJcom2YijX2+qtFF1ENJlHXKFM9ouXNJYgQ== + dependencies: + fast-json-stringify "^6.0.0" + +"@fastify/formbody@^7.4.0 || ^8.0.2": + version "8.0.2" + resolved "https://registry.npmjs.org/@fastify/formbody/-/formbody-8.0.2.tgz#7f97c8ab25933db77760bbeaacd2ff5355a54682" + integrity sha512-84v5J2KrkXzjgBpYnaNRPqwgMsmY7ZDjuj0YVuMR3NXCJRCgKEZy/taSP1wUYGn0onfxJpLyRGDLa+NMaDJtnA== + dependencies: + fast-querystring "^1.1.2" + fastify-plugin "^5.0.0" + +"@fastify/forwarded@^3.0.0": + version "3.0.1" + resolved "https://registry.npmjs.org/@fastify/forwarded/-/forwarded-3.0.1.tgz#9662b7bd4a59f6d123cc3487494f75f635c32d23" + integrity sha512-JqDochHFqXs3C3Ml3gOY58zM7OqO9ENqPo0UqAjAjH8L01fRZqwX9iLeX34//kiJubF7r2ZQHtBRU36vONbLlw== + +"@fastify/merge-json-schemas@^0.2.0": + version "0.2.1" + resolved "https://registry.npmjs.org/@fastify/merge-json-schemas/-/merge-json-schemas-0.2.1.tgz#3aa30d2f0c81a8ac5995b6d94ed4eaa2c3055824" + integrity sha512-OA3KGBCy6KtIvLf8DINC5880o5iBlDX4SxzLQS8HorJAbqluzLRn80UXU0bxZn7UOFhFgpRJDasfwn9nG4FG4A== + dependencies: + dequal "^2.0.3" + +"@fastify/multipart@^8.3.1 || ^9.0.3": + version "9.3.0" + resolved "https://registry.npmjs.org/@fastify/multipart/-/multipart-9.3.0.tgz#b7b473dc2f1e931193157a5ed81dc26df103ff73" + integrity sha512-NpeKipTOjjL1dA7SSlRMrOWWtrE8/0yKOmeudkdQoEaz4sVDJw5MVdZIahsWhvpc3YTN7f04f9ep/Y65RKoOWA== + dependencies: + "@fastify/busboy" "^3.0.0" + "@fastify/deepmerge" "^3.0.0" + "@fastify/error" "^4.0.0" + fastify-plugin "^5.0.0" + secure-json-parse "^4.0.0" + +"@fastify/proxy-addr@^5.0.0": + version "5.1.0" + resolved "https://registry.npmjs.org/@fastify/proxy-addr/-/proxy-addr-5.1.0.tgz#f5360b5dd83c7de3d41b415be4aab84ae44aa106" + integrity sha512-INS+6gh91cLUjB+PVHfu1UqcB76Sqtpyp7bnL+FYojhjygvOPA9ctiD/JDKsyD9Xgu4hUhCSJBPig/w7duNajw== + dependencies: + "@fastify/forwarded" "^3.0.0" + ipaddr.js "^2.1.0" + +"@honeybadger-io/core@^6.7.2": + version "6.7.2" + resolved "https://registry.npmjs.org/@honeybadger-io/core/-/core-6.7.2.tgz#fdc120206dbff0382b7d21bd26dd34d5051975fe" + integrity sha512-4+hyrFI0S/Eni2cBgO40Lqyft5hyNXjgnuh1EbeH457kty8g4YatJYuHBffmrjwLiZHgFbWXRGv7SlG+NehC5Q== + dependencies: + json-nd "^1.0.0" + stacktrace-parser "^0.1.10" + +"@honeybadger-io/js@^6.10.1": + version "6.12.3" + resolved "https://registry.npmjs.org/@honeybadger-io/js/-/js-6.12.3.tgz#f72af388f2e278f9eb7cf1a314cd298e5922a5cd" + integrity sha512-CL+9A8tGpjawsJEKE74P94hmimHRsq+B90i5N/pXNgnJbgZG40bs9yZpfn2z3w0+3z9wtH12D2RqBjxsGm9DBg== + dependencies: + "@honeybadger-io/core" "^6.7.2" + "@types/aws-lambda" "^8.10.89" + "@types/express" "^5.0.3" + "@humanfs/core@^0.19.1": version "0.19.1" resolved "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz" @@ -1432,7 +1617,7 @@ "@types/yargs" "^17.0.8" chalk "^4.0.0" -"@jridgewell/gen-mapping@^0.3.0", "@jridgewell/gen-mapping@^0.3.12": +"@jridgewell/gen-mapping@^0.3.0", "@jridgewell/gen-mapping@^0.3.12", "@jridgewell/gen-mapping@^0.3.5": version "0.3.13" resolved "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz" integrity sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA== @@ -1440,6 +1625,14 @@ "@jridgewell/sourcemap-codec" "^1.5.0" "@jridgewell/trace-mapping" "^0.3.24" +"@jridgewell/remapping@^2.3.5": + version "2.3.5" + resolved "https://registry.npmjs.org/@jridgewell/remapping/-/remapping-2.3.5.tgz#375c476d1972947851ba1e15ae8f123047445aa1" + integrity sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ== + dependencies: + "@jridgewell/gen-mapping" "^0.3.5" + "@jridgewell/trace-mapping" "^0.3.24" + "@jridgewell/resolve-uri@^3.1.0": version "3.1.1" resolved "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz" @@ -1526,6 +1719,11 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" +"@pinojs/redact@^0.4.0": + version "0.4.0" + resolved "https://registry.npmjs.org/@pinojs/redact/-/redact-0.4.0.tgz#c3de060dd12640dcc838516aa2a6803cc7b2e9d6" + integrity sha512-k2ENnmBugE/rzQfEcdWHcCY+/FM3VLzH9cYEsbdsoqrvzAKRhUZeRNhAZvB8OitQJ1TBed3yqWtdjzS6wJKBwg== + "@pkgr/core@^0.1.0": version "0.1.1" resolved "https://registry.npmjs.org/@pkgr/core/-/core-0.1.1.tgz" @@ -1536,11 +1734,88 @@ resolved "https://registry.npmjs.org/@publint/pack/-/pack-0.1.2.tgz" integrity sha512-S+9ANAvUmjutrshV4jZjaiG8XQyuJIZ8a4utWmN/vW1sgQ9IfBnPndwkmQYw53QmouOIytT874u65HEmu6H5jw== +"@redis/bloom@5.10.0": + version "5.10.0" + resolved "https://registry.npmjs.org/@redis/bloom/-/bloom-5.10.0.tgz#1079373583b82a8b61b0d3721755245686b4a602" + integrity sha512-doIF37ob+l47n0rkpRNgU8n4iacBlKM9xLiP1LtTZTvz8TloJB8qx/MgvhMhKdYG+CvCY2aPBnN2706izFn/4A== + +"@redis/client@5.10.0": + version "5.10.0" + resolved "https://registry.npmjs.org/@redis/client/-/client-5.10.0.tgz#621d5de1898a4f2c3a813769779ca5902ef9d57a" + integrity sha512-JXmM4XCoso6C75Mr3lhKA3eNxSzkYi3nCzxDIKY+YOszYsJjuKbFgVtguVPbLMOttN4iu2fXoc2BGhdnYhIOxA== + dependencies: + cluster-key-slot "1.1.2" + +"@redis/json@5.10.0": + version "5.10.0" + resolved "https://registry.npmjs.org/@redis/json/-/json-5.10.0.tgz#a550a7859c3cbae45535aad157fcaa8e6bd3e7d3" + integrity sha512-B2G8XlOmTPUuZtD44EMGbtoepQG34RCDXLZbjrtON1Djet0t5Ri7/YPXvL9aomXqP8lLTreaprtyLKF4tmXEEA== + +"@redis/search@5.10.0": + version "5.10.0" + resolved "https://registry.npmjs.org/@redis/search/-/search-5.10.0.tgz#587851479c6abb9b40b31ab9b31c234db7a04919" + integrity sha512-3SVcPswoSfp2HnmWbAGUzlbUPn7fOohVu2weUQ0S+EMiQi8jwjL+aN2p6V3TI65eNfVsJ8vyPvqWklm6H6esmg== + +"@redis/time-series@5.10.0": + version "5.10.0" + resolved "https://registry.npmjs.org/@redis/time-series/-/time-series-5.10.0.tgz#9c7de35fe023e36233fba5c8478ce25832ead64c" + integrity sha512-cPkpddXH5kc/SdRhF0YG0qtjL+noqFT0AcHbQ6axhsPsO7iqPi1cjxgdkE9TNeKiBUUdCaU1DbqkR/LzbzPBhg== + "@rtsao/scc@^1.1.0": version "1.1.0" resolved "https://registry.npmjs.org/@rtsao/scc/-/scc-1.1.0.tgz" integrity sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g== +"@sentry-internal/tracing@7.120.4": + version "7.120.4" + resolved "https://registry.npmjs.org/@sentry-internal/tracing/-/tracing-7.120.4.tgz#4410e9cb4b6f8333111d97e8be7f01c7eaa008ca" + integrity sha512-Fz5+4XCg3akeoFK+K7g+d7HqGMjmnLoY2eJlpONJmaeT9pXY7yfUyXKZMmMajdE2LxxKJgQ2YKvSCaGVamTjHw== + dependencies: + "@sentry/core" "7.120.4" + "@sentry/types" "7.120.4" + "@sentry/utils" "7.120.4" + +"@sentry/core@7.120.4": + version "7.120.4" + resolved "https://registry.npmjs.org/@sentry/core/-/core-7.120.4.tgz#b90780621ed8f5a4826c827f0843dc86b3ba4cd4" + integrity sha512-TXu3Q5kKiq8db9OXGkWyXUbIxMMuttB5vJ031yolOl5T/B69JRyAoKuojLBjRv1XX583gS1rSSoX8YXX7ATFGA== + dependencies: + "@sentry/types" "7.120.4" + "@sentry/utils" "7.120.4" + +"@sentry/integrations@7.120.4": + version "7.120.4" + resolved "https://registry.npmjs.org/@sentry/integrations/-/integrations-7.120.4.tgz#bcd21b4981890282dfb38f58e07e6bbfd8954d5b" + integrity sha512-kkBTLk053XlhDCg7OkBQTIMF4puqFibeRO3E3YiVc4PGLnocXMaVpOSCkMqAc1k1kZ09UgGi8DxfQhnFEjUkpA== + dependencies: + "@sentry/core" "7.120.4" + "@sentry/types" "7.120.4" + "@sentry/utils" "7.120.4" + localforage "^1.8.1" + +"@sentry/node@^7.120.0": + version "7.120.4" + resolved "https://registry.npmjs.org/@sentry/node/-/node-7.120.4.tgz#a191f295eb180f7c028602b7a830811476290cc6" + integrity sha512-qq3wZAXXj2SRWhqErnGCSJKUhPSlZ+RGnCZjhfjHpP49KNpcd9YdPTIUsFMgeyjdh6Ew6aVCv23g1hTP0CHpYw== + dependencies: + "@sentry-internal/tracing" "7.120.4" + "@sentry/core" "7.120.4" + "@sentry/integrations" "7.120.4" + "@sentry/types" "7.120.4" + "@sentry/utils" "7.120.4" + +"@sentry/types@7.120.4": + version "7.120.4" + resolved "https://registry.npmjs.org/@sentry/types/-/types-7.120.4.tgz#8fab8dceeec4bda079fc6e8e380b982f766de354" + integrity sha512-cUq2hSSe6/qrU6oZsEP4InMI5VVdD86aypE+ENrQ6eZEVLTCYm1w6XhW1NvIu3UuWh7gZec4a9J7AFpYxki88Q== + +"@sentry/utils@7.120.4": + version "7.120.4" + resolved "https://registry.npmjs.org/@sentry/utils/-/utils-7.120.4.tgz#8995637fc4742ee75df347dcd0f08ee137968c78" + integrity sha512-zCKpyDIWKHwtervNK2ZlaK8mMV7gVUijAgFeJStH+CU/imcdquizV3pFLlSQYRswG+Lbyd6CT/LGRh3IbtkCFw== + dependencies: + "@sentry/types" "7.120.4" + "@sinclair/typebox@^0.27.8": version "0.27.8" resolved "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz" @@ -1689,6 +1964,11 @@ dependencies: "@babel/runtime" "^7.12.5" +"@tootallnate/once@1": + version "1.1.2" + resolved "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz#ccb91445360179a04e7fe6aff78c00ffc1eeaf82" + integrity sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw== + "@tootallnate/once@2": version "2.0.0" resolved "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz" @@ -1704,6 +1984,11 @@ resolved "https://registry.npmjs.org/@types/aria-query/-/aria-query-5.0.4.tgz" integrity sha512-rfT93uj5s0PRL7EzccGMs3brplhcrghnDoV26NqKhCAS1hVo+WdNsPvE/yb6ilfr5hi2MEk6d5EWJTKdxg8jVw== +"@types/aws-lambda@^8.10.89": + version "8.10.159" + resolved "https://registry.npmjs.org/@types/aws-lambda/-/aws-lambda-8.10.159.tgz#0ab559f4519e42732a393b28c21564da9763c5aa" + integrity sha512-SAP22WSGNN12OQ8PlCzGzRCZ7QDCwI85dQZbmpz7+mAk+L7j+wI7qnvmdKh+o7A5LaOp6QnOZ2NJphAZQTTHQg== + "@types/babel__core@^7.1.14": version "7.20.0" resolved "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.0.tgz" @@ -1737,11 +2022,53 @@ dependencies: "@babel/types" "^7.3.0" +"@types/body-parser@*": + version "1.19.6" + resolved "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.6.tgz#1859bebb8fd7dac9918a45d54c1971ab8b5af474" + integrity sha512-HLFeCYgz89uk22N5Qg3dvGvsv46B8GLvKKo1zKG4NybA8U2DiEO3w9lqGg29t/tfLRJpJ6iQxnVw4OnB7MoM9g== + dependencies: + "@types/connect" "*" + "@types/node" "*" + +"@types/connect@*": + version "3.4.38" + resolved "https://registry.npmjs.org/@types/connect/-/connect-3.4.38.tgz#5ba7f3bc4fbbdeaff8dded952e5ff2cc53f8d858" + integrity sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug== + dependencies: + "@types/node" "*" + "@types/estree@^1.0.6": version "1.0.6" resolved "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz" integrity sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw== +"@types/express-serve-static-core@^5.0.0": + version "5.1.0" + resolved "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-5.1.0.tgz#74f47555b3d804b54cb7030e6f9aa0c7485cfc5b" + integrity sha512-jnHMsrd0Mwa9Cf4IdOzbz543y4XJepXrbia2T4b6+spXC2We3t1y6K44D3mR8XMFSXMCf3/l7rCgddfx7UNVBA== + dependencies: + "@types/node" "*" + "@types/qs" "*" + "@types/range-parser" "*" + "@types/send" "*" + +"@types/express@^5.0.3": + version "5.0.5" + resolved "https://registry.npmjs.org/@types/express/-/express-5.0.5.tgz#3ba069177caa34ab96585ca23b3984d752300cdc" + integrity sha512-LuIQOcb6UmnF7C1PCFmEU1u2hmiHL43fgFQX67sN3H4Z+0Yk0Neo++mFsBjhOAuLzvlQeqAAkeDOZrJs9rzumQ== + dependencies: + "@types/body-parser" "*" + "@types/express-serve-static-core" "^5.0.0" + "@types/serve-static" "^1" + +"@types/fs-extra@^11.0.4": + version "11.0.4" + resolved "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-11.0.4.tgz#e16a863bb8843fba8c5004362b5a73e17becca45" + integrity sha512-yTbItCNreRooED33qjunPthRcSjERP1r4MqCZc7wv0u2sUkzTFp45tgUfS5+r7FrZPdmCCNflLhVSP/o+SemsQ== + dependencies: + "@types/jsonfile" "*" + "@types/node" "*" + "@types/graceful-fs@^4.1.3": version "4.1.6" resolved "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.6.tgz" @@ -1749,6 +2076,11 @@ dependencies: "@types/node" "*" +"@types/http-errors@*": + version "2.0.5" + resolved "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.5.tgz#5b749ab2b16ba113423feb1a64a95dcd30398472" + integrity sha512-r8Tayk8HJnX0FztbZN7oVqGccWgw98T/0neJphO91KkmOzug1KkofZURD4UaD5uH8AqcFLfdPErnBod0u71/qg== + "@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0", "@types/istanbul-lib-coverage@^2.0.1": version "2.0.3" resolved "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.3.tgz" @@ -1768,7 +2100,7 @@ dependencies: "@types/istanbul-lib-report" "*" -"@types/jest@^29.5.14": +"@types/jest@^29.5.12", "@types/jest@^29.5.14": version "29.5.14" resolved "https://registry.npmjs.org/@types/jest/-/jest-29.5.14.tgz" integrity sha512-ZN+4sdnLUbo8EVvVc2ao0GFW6oVrQRPn4K2lglySj7APvSrgzxHiNNK99us4WDMi57xxA2yggblIAMNhXOotLQ== @@ -1795,6 +2127,31 @@ resolved "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz" integrity sha1-7ihweulOEdK4J7y+UnC86n8+ce4= +"@types/jsonfile@*": + version "6.1.4" + resolved "https://registry.npmjs.org/@types/jsonfile/-/jsonfile-6.1.4.tgz#614afec1a1164e7d670b4a7ad64df3e7beb7b702" + integrity sha512-D5qGUYwjvnNNextdU59/+fI+spnwtTFmyQP0h+PfIOSkNfpU6AOICUOkm4i0OnSk+NyjdPJrxCDro0sJsWlRpQ== + dependencies: + "@types/node" "*" + +"@types/jsonwebtoken@^9.0.10": + version "9.0.10" + resolved "https://registry.npmjs.org/@types/jsonwebtoken/-/jsonwebtoken-9.0.10.tgz#a7932a47177dcd4283b6146f3bd5c26d82647f09" + integrity sha512-asx5hIG9Qmf/1oStypjanR7iKTv0gXQ1Ov/jfrX6kS/EO0OFni8orbmGCn0672NHR3kXHwpAwR+B368ZGN/2rA== + dependencies: + "@types/ms" "*" + "@types/node" "*" + +"@types/lockfile@^1.0.4": + version "1.0.4" + resolved "https://registry.npmjs.org/@types/lockfile/-/lockfile-1.0.4.tgz#9d6a6d1b6dbd4853cecc7f334bc53ea0ff363b8e" + integrity sha512-Q8oFIHJHr+htLrTXN2FuZfg+WXVHQRwU/hC2GpUu+Q8e3FUM9EDkS2pE3R2AO1ZGu56f479ybdMCNF1DAu8cAQ== + +"@types/mime@^1": + version "1.3.5" + resolved "https://registry.npmjs.org/@types/mime/-/mime-1.3.5.tgz#1ef302e01cf7d2b5a0fa526790c9123bf1d06690" + integrity sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w== + "@types/mock-fs@^4.13.4": version "4.13.4" resolved "https://registry.npmjs.org/@types/mock-fs/-/mock-fs-4.13.4.tgz#e73edb4b4889d44d23f1ea02d6eebe50aa30b09a" @@ -1802,6 +2159,11 @@ dependencies: "@types/node" "*" +"@types/ms@*": + version "2.1.0" + resolved "https://registry.npmjs.org/@types/ms/-/ms-2.1.0.tgz#052aa67a48eccc4309d7f0191b7e41434b90bb78" + integrity sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA== + "@types/node@*", "@types/node@^20.17.16": version "20.17.16" resolved "https://registry.npmjs.org/@types/node/-/node-20.17.16.tgz" @@ -1814,6 +2176,16 @@ resolved "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.14.tgz" integrity sha512-gNMvNH49DJ7OJYv+KAKn0Xp45p8PLl6zo2YnvDIbTd4J6MER2BmWN49TG7n9LvkyihINxeKW8+3bfS2yDC9dzQ== +"@types/qs@*": + version "6.14.0" + resolved "https://registry.npmjs.org/@types/qs/-/qs-6.14.0.tgz#d8b60cecf62f2db0fb68e5e006077b9178b85de5" + integrity sha512-eOunJqu0K1923aExK6y8p6fsihYEn/BYuQ4g0CxAAgFc4b/ZLN4CrsRZ55srTdqoiLzU2B2evC+apEIxprEzkQ== + +"@types/range-parser@*": + version "1.2.7" + resolved "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.7.tgz#50ae4353eaaddc04044279812f52c8c65857dbcb" + integrity sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ== + "@types/react-dom@^18.3.5": version "18.3.5" resolved "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.3.5.tgz" @@ -1827,11 +2199,42 @@ "@types/prop-types" "*" csstype "^3.0.2" +"@types/send@*": + version "1.2.1" + resolved "https://registry.npmjs.org/@types/send/-/send-1.2.1.tgz#6a784e45543c18c774c049bff6d3dbaf045c9c74" + integrity sha512-arsCikDvlU99zl1g69TcAB3mzZPpxgw0UQnaHeC1Nwb015xp8bknZv5rIfri9xTOcMuaVgvabfIRA7PSZVuZIQ== + dependencies: + "@types/node" "*" + +"@types/send@<1": + version "0.17.6" + resolved "https://registry.npmjs.org/@types/send/-/send-0.17.6.tgz#aeb5385be62ff58a52cd5459daa509ae91651d25" + integrity sha512-Uqt8rPBE8SY0RK8JB1EzVOIZ32uqy8HwdxCnoCOsYrvnswqmFZ/k+9Ikidlk/ImhsdvBsloHbAlewb2IEBV/Og== + dependencies: + "@types/mime" "^1" + "@types/node" "*" + +"@types/serve-static@^1": + version "1.15.10" + resolved "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.10.tgz#768169145a778f8f5dfcb6360aead414a3994fee" + integrity sha512-tRs1dB+g8Itk72rlSI2ZrW6vZg0YrLI81iQSTkMmOqnqCaNr/8Ek4VwWcN5vZgCYWbg/JJSGBlUaYGAOP73qBw== + dependencies: + "@types/http-errors" "*" + "@types/node" "*" + "@types/send" "<1" + "@types/stack-utils@^2.0.0": version "2.0.0" resolved "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.0.tgz" integrity sha512-RJJrrySY7A8havqpGObOB4W92QXKJo63/jFLLgpvOtsGUqbQZ9Sbgl35KMm1DjC6j7AvmmU2bIno+3IyEaemaw== +"@types/touch@^3.1.5": + version "3.1.5" + resolved "https://registry.npmjs.org/@types/touch/-/touch-3.1.5.tgz#f6555a30b543138decabe25efd03ed0187d1630a" + integrity sha512-tnu5L7yEvstLAJCjEQRYTtFIqMgJ4fvlDlgJwemY0V6UbeJ8NQCUuj85tPcCm54q/hAlLXFStIEClNlp8mSlMA== + dependencies: + "@types/node" "*" + "@types/tough-cookie@*": version "4.0.2" resolved "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-4.0.2.tgz" @@ -1951,11 +2354,32 @@ "@typescript-eslint/types" "8.35.0" eslint-visitor-keys "^4.2.1" -abab@^2.0.6: +abab@^2.0.3, abab@^2.0.5, abab@^2.0.6: version "2.0.6" resolved "https://registry.npmjs.org/abab/-/abab-2.0.6.tgz" integrity sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA== +abstract-logging@^2.0.1: + version "2.0.1" + resolved "https://registry.npmjs.org/abstract-logging/-/abstract-logging-2.0.1.tgz#6b0c371df212db7129b57d2e7fcf282b8bf1c839" + integrity sha512-2BjRTZxTPvheOvGbBslFSYOUkr+SjPtOnrLP33f+VIWLzezQpZcqVg7ja3L4dBXmzzgwT+a029jRx5PCi3JuiA== + +accepts@~1.3.8: + version "1.3.8" + resolved "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz#0bf0be125b67014adcb0b0921e62db7bffe16b2e" + integrity sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw== + dependencies: + mime-types "~2.1.34" + negotiator "0.6.3" + +acorn-globals@^6.0.0: + version "6.0.0" + resolved "https://registry.npmjs.org/acorn-globals/-/acorn-globals-6.0.0.tgz#46cdd39f0f8ff08a876619b55f5ac8a6dc770b45" + integrity sha512-ZQl7LOWaF5ePqqcX4hLuv/bLXYQNfNWw2c0/yX/TsPRKamzHcTGQnlCjHT3TsmkOUVEPS3crCxiPfdzE/Trlhg== + dependencies: + acorn "^7.1.1" + acorn-walk "^7.1.1" + acorn-globals@^7.0.0: version "7.0.1" resolved "https://registry.npmjs.org/acorn-globals/-/acorn-globals-7.0.1.tgz" @@ -1976,16 +2400,31 @@ acorn-loose@^8.3.0: dependencies: acorn "^8.14.0" +acorn-walk@^7.1.1: + version "7.2.0" + resolved "https://registry.npmjs.org/acorn-walk/-/acorn-walk-7.2.0.tgz#0de889a601203909b0fbe07b8938dc21d2e967bc" + integrity sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA== + acorn-walk@^8.0.2: version "8.3.1" resolved "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.1.tgz" integrity sha512-TgUZgYvqZprrl7YldZNoa9OciCAyZR+Ejm9eXzKCmjsF5IKp/wgQ7Z/ZpjpGTIUPwrHQIcYeI8qDh4PsEwxMbw== +acorn@^7.1.1: + version "7.4.1" + resolved "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa" + integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== + acorn@^8.1.0, acorn@^8.14.0, acorn@^8.8.1: version "8.14.1" resolved "https://registry.npmjs.org/acorn/-/acorn-8.14.1.tgz" integrity sha512-OvQ/2pUDKmgfCg++xsTX1wGxfTaszcHVcTctW4UJB4hibJx2HXxxO5UmVgyjMa+ZDsiaf5wWLXYpRWMmBI0QHg== +acorn@^8.2.4: + version "8.15.0" + resolved "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz#a360898bc415edaac46c8241f6383975b930b816" + integrity sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg== + agent-base@6: version "6.0.2" resolved "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz" @@ -2001,6 +2440,13 @@ aggregate-error@^3.0.0: clean-stack "^2.0.0" indent-string "^4.0.0" +ajv-formats@^3.0.1: + version "3.0.1" + resolved "https://registry.npmjs.org/ajv-formats/-/ajv-formats-3.0.1.tgz#3d5dc762bca17679c3c2ea7e90ad6b7532309578" + integrity sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ== + dependencies: + ajv "^8.0.0" + ajv@^6.12.4: version "6.12.6" resolved "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz" @@ -2011,7 +2457,7 @@ ajv@^6.12.4: json-schema-traverse "^0.4.1" uri-js "^4.2.2" -ajv@^8.0.1: +ajv@^8.0.0, ajv@^8.0.1, ajv@^8.12.0: version "8.17.1" resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.17.1.tgz#37d9a5c776af6bc92d7f4f9510eba4c0a60d11a6" integrity sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g== @@ -2114,6 +2560,11 @@ array-buffer-byte-length@^1.0.1, array-buffer-byte-length@^1.0.2: call-bound "^1.0.3" is-array-buffer "^3.0.5" +array-flatten@1.1.1: + version "1.1.1" + resolved "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" + integrity sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg== + array-includes@^3.1.6, array-includes@^3.1.8: version "3.1.8" resolved "https://registry.npmjs.org/array-includes/-/array-includes-3.1.8.tgz" @@ -2225,6 +2676,11 @@ asynckit@^0.4.0: resolved "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz" integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= +atomic-sleep@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/atomic-sleep/-/atomic-sleep-1.0.0.tgz#eb85b77a601fc932cfe432c5acd364a9e2c9075b" + integrity sha512-kNOjDqAh7px0XWNI+4QbzoiR/nTkHAWNud2uvnJquD1/x5a7EQZMJT0AczqK0Qn67oY/TTQ1LbUKajZpp3I9tQ== + available-typed-arrays@^1.0.7: version "1.0.7" resolved "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz" @@ -2232,6 +2688,14 @@ available-typed-arrays@^1.0.7: dependencies: possible-typed-array-names "^1.0.0" +avvio@^9.0.0: + version "9.1.0" + resolved "https://registry.npmjs.org/avvio/-/avvio-9.1.0.tgz#0ff80ed211682441d8aa39ff21a4b9d022109c44" + integrity sha512-fYASnYi600CsH/j9EQov7lECAniYiBFiiAtBNuZYLA2leLe9qOvZzqYHFjtIj6gD2VMoMLP14834LFWvr4IfDw== + dependencies: + "@fastify/error" "^4.0.0" + fastq "^1.17.1" + axe-core@^4.10.0: version "4.10.3" resolved "https://registry.npmjs.org/axe-core/-/axe-core-4.10.3.tgz" @@ -2336,6 +2800,34 @@ balanced-match@^2.0.0: resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-2.0.0.tgz#dc70f920d78db8b858535795867bf48f820633d9" integrity sha512-1ugUSr8BHXRnK23KfuYS+gVMC3LB8QGH9W1iGtDPsNWoQbgtXSExkBu2aDR4epiGWZOjZsj6lDl/N/AqqTC3UA== +baseline-browser-mapping@^2.8.25: + version "2.8.30" + resolved "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.8.30.tgz#5c7420acc2fd20f3db820a40c6521590a671d137" + integrity sha512-aTUKW4ptQhS64+v2d6IkPzymEzzhw+G0bA1g3uBRV3+ntkH+svttKseW5IOR4Ed6NUVKqnY7qT3dKvzQ7io4AA== + +body-parser@1.20.3, body-parser@^1.20.1: + version "1.20.3" + resolved "https://registry.npmjs.org/body-parser/-/body-parser-1.20.3.tgz#1953431221c6fb5cd63c4b36d53fab0928e548c6" + integrity sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g== + dependencies: + bytes "3.1.2" + content-type "~1.0.5" + debug "2.6.9" + depd "2.0.0" + destroy "1.2.0" + http-errors "2.0.0" + iconv-lite "0.4.24" + on-finished "2.4.1" + qs "6.13.0" + raw-body "2.5.2" + type-is "~1.6.18" + unpipe "1.0.0" + +boolbase@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e" + integrity sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww== + brace-expansion@^1.1.7: version "1.1.11" resolved "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz" @@ -2358,6 +2850,11 @@ braces@^3.0.3: dependencies: fill-range "^7.1.1" +browser-process-hrtime@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz#3c9b4b7d782c8121e56f10106d84c0d0ffc94626" + integrity sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow== + browserslist@^4.22.2: version "4.22.2" resolved "https://registry.npmjs.org/browserslist/-/browserslist-4.22.2.tgz" @@ -2368,6 +2865,17 @@ browserslist@^4.22.2: node-releases "^2.0.14" update-browserslist-db "^1.0.13" +browserslist@^4.24.0: + version "4.28.0" + resolved "https://registry.npmjs.org/browserslist/-/browserslist-4.28.0.tgz#9cefece0a386a17a3cd3d22ebf67b9deca1b5929" + integrity sha512-tbydkR/CxfMwelN0vwdP/pLkDwyAASZ+VfWm4EOwlB6SWhx1sYnWLqo8N5j0rAzPfzfRaxt0mM/4wPU/Su84RQ== + dependencies: + baseline-browser-mapping "^2.8.25" + caniuse-lite "^1.0.30001754" + electron-to-chromium "^1.5.249" + node-releases "^2.0.27" + update-browserslist-db "^1.1.4" + bs-logger@^0.2.6: version "0.2.6" resolved "https://registry.npmjs.org/bs-logger/-/bs-logger-0.2.6.tgz" @@ -2382,11 +2890,21 @@ bser@2.1.1: dependencies: node-int64 "^0.4.0" +buffer-equal-constant-time@^1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz#f8e71132f7ffe6e01a5c9697a4c6f3e48d5cc819" + integrity sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA== + buffer-from@^1.0.0: version "1.1.1" resolved "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz" integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A== +bytes@3.1.2: + version "3.1.2" + resolved "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz#8b0beeb98605adf1b128fa4386403c009e0221a5" + integrity sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg== + cacheable@^2.0.1: version "2.0.2" resolved "https://registry.yarnpkg.com/cacheable/-/cacheable-2.0.2.tgz#25b71b64068e7e5e6be89231eaa42e0003fcc9c0" @@ -2444,6 +2962,11 @@ caniuse-lite@^1.0.30001565: resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001576.tgz" integrity sha512-ff5BdakGe2P3SQsMsiqmt1Lc8221NR1VzHj5jXN5vBny9A6fpze94HiVV/n7XRosOlsShJcvMv5mdnpjOGCEgg== +caniuse-lite@^1.0.30001754: + version "1.0.30001756" + resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001756.tgz#fe80104631102f88e58cad8aa203a2c3e5ec9ebd" + integrity sha512-4HnCNKbMLkLdhJz3TToeVWHSnfJvPaq6vu/eRP0Ahub/07n484XHhBF5AJoSGHdVrS8tKFauUQz8Bp9P7LVx7A== + chalk@^2.0.1: version "2.4.2" resolved "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz" @@ -2547,6 +3070,11 @@ clone@^1.0.2: resolved "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz" integrity sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg== +cluster-key-slot@1.1.2: + version "1.1.2" + resolved "https://registry.npmjs.org/cluster-key-slot/-/cluster-key-slot-1.1.2.tgz#88ddaa46906e303b5de30d3153b7d9fe0a0c19ac" + integrity sha512-RMr0FhtfXemyinomL4hrWcYJxmX6deFdCxpJzhDttxgO1+bcCnkk+9drydLVDmAMG7NE6aN/fl4F7ucU/90gAA== + co@^4.6.0: version "4.6.0" resolved "https://registry.npmjs.org/co/-/co-4.6.0.tgz" @@ -2586,6 +3114,11 @@ colord@^2.9.3: resolved "https://registry.yarnpkg.com/colord/-/colord-2.9.3.tgz#4f8ce919de456f1d5c1c368c307fe20f3e59fb43" integrity sha512-jeC1axXpnb0/2nn/Y1LPuLdgXBLH7aDcHu4KEKfqw3CUhX7ZpfBSlPKyqXE6btIgEzfWtrX3/tyBCaCvXvMkOw== +colorette@^2.0.7: + version "2.0.20" + resolved "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz#9eb793e6833067f7235902fcd3b09917a000a95a" + integrity sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w== + combined-stream@^1.0.8: version "1.0.8" resolved "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz" @@ -2618,6 +3151,18 @@ confusing-browser-globals@^1.0.10: resolved "https://registry.npmjs.org/confusing-browser-globals/-/confusing-browser-globals-1.0.11.tgz" integrity sha512-JsPKdmh8ZkmnHxDk55FZ1TqVLvEQTvoByJZRN9jzI0UjxK/QgAmsphz7PGtqgPieQZ/CQcHWXCR7ATDNhGe+YA== +content-disposition@0.5.4: + version "0.5.4" + resolved "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz#8b82b4efac82512a02bb0b1dcec9d2c5e8eb5bfe" + integrity sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ== + dependencies: + safe-buffer "5.2.1" + +content-type@~1.0.4, content-type@~1.0.5: + version "1.0.5" + resolved "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz#8b773162656d1d1086784c8f23a54ce6d73d7918" + integrity sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA== + convert-source-map@^1.6.0: version "1.9.0" resolved "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz" @@ -2628,6 +3173,21 @@ convert-source-map@^2.0.0: resolved "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz" integrity sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg== +cookie-signature@1.0.6: + version "1.0.6" + resolved "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" + integrity sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ== + +cookie@0.7.1: + version "0.7.1" + resolved "https://registry.npmjs.org/cookie/-/cookie-0.7.1.tgz#2f73c42142d5d5cf71310a74fc4ae61670e5dbc9" + integrity sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w== + +cookie@^1.0.1: + version "1.0.2" + resolved "https://registry.npmjs.org/cookie/-/cookie-1.0.2.tgz#27360701532116bd3f1f9416929d176afe1e4610" + integrity sha512-9Kr/j4O16ISv8zBBhJoi4bXOYNTkFLOqSL3UDB0njXxCXNezjeyVrJyGOWtgfs/q2km1gwBcfH8q1yEGoMYunA== + core-js-compat@^3.31.0, core-js-compat@^3.33.1: version "3.35.0" resolved "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.35.0.tgz" @@ -2687,6 +3247,17 @@ css-functions-list@^3.2.3: resolved "https://registry.yarnpkg.com/css-functions-list/-/css-functions-list-3.2.3.tgz#95652b0c24f0f59b291a9fc386041a19d4f40dbe" integrity sha512-IQOkD3hbR5KrN93MtcYuad6YPuTSUhntLHDuLEbFWE+ff2/XSZNdZG+LcbbIW5AXKg/WFIfYItIzVoHngHXZzA== +css-select@^5.1.0: + version "5.2.2" + resolved "https://registry.npmjs.org/css-select/-/css-select-5.2.2.tgz#01b6e8d163637bb2dd6c982ca4ed65863682786e" + integrity sha512-TizTzUddG/xYLA3NXodFM0fSbNizXjOKhqiQQwvhlspadZokn1KDy0NZFS0wuEubIYAV5/c1/lAr0TaaFXEXzw== + dependencies: + boolbase "^1.0.0" + css-what "^6.1.0" + domhandler "^5.0.2" + domutils "^3.0.1" + nth-check "^2.0.1" + css-tree@^3.0.1, css-tree@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/css-tree/-/css-tree-3.1.0.tgz#7aabc035f4e66b5c86f54570d55e05b1346eb0fd" @@ -2695,6 +3266,11 @@ css-tree@^3.0.1, css-tree@^3.1.0: mdn-data "2.12.2" source-map-js "^1.0.1" +css-what@^6.1.0: + version "6.2.2" + resolved "https://registry.npmjs.org/css-what/-/css-what-6.2.2.tgz#cdcc8f9b6977719fdfbd1de7aec24abf756b9dea" + integrity sha512-u/O3vwbptzhMs3L1fQE82ZSLHQQfto5gyZzwteVIEyeaY5Fc7R4dapF/BvRoSYFeqfBk4m0V1Vafq5Pjv25wvA== + css.escape@^1.5.1: version "1.5.1" resolved "https://registry.npmjs.org/css.escape/-/css.escape-1.5.1.tgz" @@ -2705,6 +3281,11 @@ cssesc@^3.0.0: resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-3.0.0.tgz#37741919903b868565e1c09ea747445cd18983ee" integrity sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg== +cssom@^0.4.4: + version "0.4.4" + resolved "https://registry.npmjs.org/cssom/-/cssom-0.4.4.tgz#5a66cf93d2d0b661d80bf6a44fb65f5c2e4e0a10" + integrity sha512-p3pvU7r1MyyqbTk+WbNJIgJjG2VmTIaB10rI93LzVPrmDJKkzKYMtxxyAvQXR/NS6otuzveI7+7BBq3SjBS2mw== + cssom@^0.5.0: version "0.5.0" resolved "https://registry.npmjs.org/cssom/-/cssom-0.5.0.tgz" @@ -2739,6 +3320,15 @@ damerau-levenshtein@^1.0.8: resolved "https://registry.npmjs.org/damerau-levenshtein/-/damerau-levenshtein-1.0.8.tgz" integrity sha512-sdQSFB7+llfUcQHUQO3+B8ERRj0Oa4w9POWMI/puGtuf7gFywGmkaLCElnudfTiKZV+NvHqL0ifzdrI8Ro7ESA== +data-urls@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/data-urls/-/data-urls-2.0.0.tgz#156485a72963a970f5d5821aaf642bef2bf2db9b" + integrity sha512-X5eWTSXO/BJmpdIKCRuKUgSCgAN0OwliVK3yPKbwIWU1Tdw5BRajxlzMidvh+gwko9AfQ9zIj52pzF91Q3YAvQ== + dependencies: + abab "^2.0.3" + whatwg-mimetype "^2.3.0" + whatwg-url "^8.0.0" + data-urls@^3.0.2: version "3.0.2" resolved "https://registry.npmjs.org/data-urls/-/data-urls-3.0.2.tgz" @@ -2784,6 +3374,18 @@ data-view-byte-offset@^1.0.1: es-errors "^1.3.0" is-data-view "^1.0.1" +dateformat@^4.6.3: + version "4.6.3" + resolved "https://registry.npmjs.org/dateformat/-/dateformat-4.6.3.tgz#556fa6497e5217fedb78821424f8a1c22fa3f4b5" + integrity sha512-2P0p0pFGzHS5EMnhdxQi7aJN+iMheud0UhG4dlE1DLAlvL8JHjJJTX/CSm4JXwV0Ka5nGk3zC5mcb5bUQUxxMA== + +debug@2.6.9: + version "2.6.9" + resolved "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" + integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== + dependencies: + ms "2.0.0" + debug@4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4: version "4.4.0" resolved "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz" @@ -2810,6 +3412,11 @@ decamelize@^1.2.0: resolved "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz" integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= +decimal.js@^10.2.1: + version "10.6.0" + resolved "https://registry.npmjs.org/decimal.js/-/decimal.js-10.6.0.tgz#e649a43e3ab953a72192ff5983865e509f37ed9a" + integrity sha512-YpgQiITW3JXGntzdUmyUR1V812Hn8T1YVXhCu+wO3OpS4eU9l4YdD3qjyiKdV6mvV29zapkMeD390UVEf2lkUg== + decimal.js@^10.4.2, decimal.js@^10.4.3: version "10.5.0" resolved "https://registry.npmjs.org/decimal.js/-/decimal.js-10.5.0.tgz" @@ -2860,11 +3467,21 @@ delayed-stream@~1.0.0: resolved "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz" integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk= +depd@2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df" + integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw== + dequal@^2.0.3: version "2.0.3" resolved "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz" integrity sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA== +destroy@1.2.0: + version "1.2.0" + resolved "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz#4803735509ad8be552934c67df614f94e66fa015" + integrity sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg== + detect-newline@^3.0.0: version "3.1.0" resolved "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz" @@ -2899,6 +3516,27 @@ dom-accessibility-api@^0.6.3: resolved "https://registry.npmjs.org/dom-accessibility-api/-/dom-accessibility-api-0.6.3.tgz" integrity sha512-7ZgogeTnjuHbo+ct10G9Ffp0mif17idi0IyWNVA/wcwcm7NPOD/WEHVP3n7n3MhXqxoIYm8d6MuZohYWIZ4T3w== +dom-serializer@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz#e41b802e1eedf9f6cae183ce5e622d789d7d8e53" + integrity sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg== + dependencies: + domelementtype "^2.3.0" + domhandler "^5.0.2" + entities "^4.2.0" + +domelementtype@^2.3.0: + version "2.3.0" + resolved "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz#5c45e8e869952626331d7aab326d01daf65d589d" + integrity sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw== + +domexception@^2.0.1: + version "2.0.1" + resolved "https://registry.npmjs.org/domexception/-/domexception-2.0.1.tgz#fb44aefba793e1574b0af6aed2801d057529f304" + integrity sha512-yxJ2mFy/sibVQlu5qHjOkf9J3K6zgmCxgJ94u2EdvDOV09H+32LtRswEcUsmUWN72pVLOEnTSRaIVVzVQgS0dg== + dependencies: + webidl-conversions "^5.0.0" + domexception@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/domexception/-/domexception-4.0.0.tgz" @@ -2906,6 +3544,22 @@ domexception@^4.0.0: dependencies: webidl-conversions "^7.0.0" +domhandler@^5.0.2, domhandler@^5.0.3: + version "5.0.3" + resolved "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz#cc385f7f751f1d1fc650c21374804254538c7d31" + integrity sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w== + dependencies: + domelementtype "^2.3.0" + +domutils@^3.0.1: + version "3.2.2" + resolved "https://registry.npmjs.org/domutils/-/domutils-3.2.2.tgz#edbfe2b668b0c1d97c24baf0f1062b132221bc78" + integrity sha512-6kZKyUajlDuqlHKVX1w7gyslj9MPIXzIFiz/rGu35uC1wMi+kMhQwGhl4lt9unC9Vb9INnY9Z3/ZA3+FhASLaw== + dependencies: + dom-serializer "^2.0.0" + domelementtype "^2.3.0" + domhandler "^5.0.3" + dunder-proto@^1.0.0, dunder-proto@^1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz" @@ -2929,6 +3583,18 @@ easy-table@1.2.0: optionalDependencies: wcwidth "^1.0.1" +ecdsa-sig-formatter@1.0.11: + version "1.0.11" + resolved "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz#ae0f0fa2d85045ef14a817daa3ce9acd0489e5bf" + integrity sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ== + dependencies: + safe-buffer "^5.0.1" + +ee-first@1.1.1: + version "1.1.1" + resolved "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" + integrity sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow== + ejs@^3.1.10: version "3.1.10" resolved "https://registry.npmjs.org/ejs/-/ejs-3.1.10.tgz" @@ -2941,6 +3607,11 @@ electron-to-chromium@^1.4.601: resolved "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.626.tgz" integrity sha512-f7/be56VjRRQk+Ric6PmIrEtPcIqsn3tElyAu9Sh6egha2VLJ82qwkcOdcnT06W+Pb6RUulV1ckzrGbKzVcTHg== +electron-to-chromium@^1.5.249: + version "1.5.259" + resolved "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.259.tgz#d4393167ec14c5a046cebaec3ddf3377944ce965" + integrity sha512-I+oLXgpEJzD6Cwuwt1gYjxsDmu/S/Kd41mmLA3O+/uH2pFRO/DvOjUyGozL8j3KeLV6WyZ7ssPwELMsXCcsJAQ== + emittery@^0.13.1: version "0.13.1" resolved "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz" @@ -2966,6 +3637,23 @@ emojilib@^2.4.0: resolved "https://registry.npmjs.org/emojilib/-/emojilib-2.4.0.tgz" integrity sha512-5U0rVMU5Y2n2+ykNLQqMoqklN9ICBT/KsvC1Gz6vqHbz2AXXGkG+Pm5rMWk/8Vjrr/mY9985Hi8DYzn1F09Nyw== +encodeurl@~1.0.2: + version "1.0.2" + resolved "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" + integrity sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w== + +encodeurl@~2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz#7b8ea898077d7e409d3ac45474ea38eaf0857a58" + integrity sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg== + +end-of-stream@^1.1.0: + version "1.4.5" + resolved "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.5.tgz#7344d711dea40e0b74abc2ed49778743ccedb08c" + integrity sha512-ooEGc6HP26xXq/N+GCGOT0JKCLDGrq2bQUZrQ7gyrJiZANJ/8YDTxTpQBXGMn+WbIQXNVpyWymm7KYVICQnyOg== + dependencies: + once "^1.4.0" + enhanced-resolve@^5.18.0: version "5.18.0" resolved "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.18.0.tgz" @@ -2974,7 +3662,7 @@ enhanced-resolve@^5.18.0: graceful-fs "^4.2.4" tapable "^2.2.0" -entities@^4.5.0: +entities@^4.2.0, entities@^4.5.0: version "4.5.0" resolved "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz" integrity sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw== @@ -3123,6 +3811,16 @@ escalade@^3.1.1: resolved "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz" integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== +escalade@^3.2.0: + version "3.2.0" + resolved "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz#011a3f69856ba189dffa7dc8fcce99d2a87903e5" + integrity sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA== + +escape-html@~1.0.3: + version "1.0.3" + resolved "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" + integrity sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow== + escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz" @@ -3418,6 +4116,11 @@ esutils@^2.0.2: resolved "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz" integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== +etag@~1.8.1: + version "1.8.1" + resolved "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" + integrity sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg== + event-stream@=3.3.4: version "3.3.4" resolved "https://registry.npmjs.org/event-stream/-/event-stream-3.3.4.tgz" @@ -3462,6 +4165,53 @@ expect@^29.0.0, expect@^29.7.0: jest-message-util "^29.7.0" jest-util "^29.7.0" +express@^4.21.2: + version "4.21.2" + resolved "https://registry.npmjs.org/express/-/express-4.21.2.tgz#cf250e48362174ead6cea4a566abef0162c1ec32" + integrity sha512-28HqgMZAmih1Czt9ny7qr6ek2qddF4FclbMzwhCREB6OFfH+rXAnuNCwo1/wFvrtbgsQDb4kSbX9de9lFbrXnA== + dependencies: + accepts "~1.3.8" + array-flatten "1.1.1" + body-parser "1.20.3" + content-disposition "0.5.4" + content-type "~1.0.4" + cookie "0.7.1" + cookie-signature "1.0.6" + debug "2.6.9" + depd "2.0.0" + encodeurl "~2.0.0" + escape-html "~1.0.3" + etag "~1.8.1" + finalhandler "1.3.1" + fresh "0.5.2" + http-errors "2.0.0" + merge-descriptors "1.0.3" + methods "~1.1.2" + on-finished "2.4.1" + parseurl "~1.3.3" + path-to-regexp "0.1.12" + proxy-addr "~2.0.7" + qs "6.13.0" + range-parser "~1.2.1" + safe-buffer "5.2.1" + send "0.19.0" + serve-static "1.16.2" + setprototypeof "1.2.0" + statuses "2.0.1" + type-is "~1.6.18" + utils-merge "1.0.1" + vary "~1.1.2" + +fast-copy@^3.0.2: + version "3.0.2" + resolved "https://registry.npmjs.org/fast-copy/-/fast-copy-3.0.2.tgz#59c68f59ccbcac82050ba992e0d5c389097c9d35" + integrity sha512-dl0O9Vhju8IrcLndv2eU4ldt1ftXMqqfgN4H1cpmGV7P6jeB9FwpN9a2c8DPGE1Ys88rNUJVYDHq73CGAGOPfQ== + +fast-decode-uri-component@^1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/fast-decode-uri-component/-/fast-decode-uri-component-1.0.1.tgz#46f8b6c22b30ff7a81357d4f59abfae938202543" + integrity sha512-WKgKWg5eUxvRZGwW8FvfbaH7AXSh2cL+3j5fMGzUMCxWBJ3dV3a7Wz8y2f/uQ0e3B6WmodD3oS54jTQ9HVTIIg== + fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: version "3.1.3" resolved "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz" @@ -3488,12 +4238,36 @@ fast-json-stable-stringify@2.x, fast-json-stable-stringify@^2.0.0, fast-json-sta resolved "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz" integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== +fast-json-stringify@^6.0.0: + version "6.1.1" + resolved "https://registry.npmjs.org/fast-json-stringify/-/fast-json-stringify-6.1.1.tgz#79163606431540582b50e992ab8cdb6c65df0529" + integrity sha512-DbgptncYEXZqDUOEl4krff4mUiVrTZZVI7BBrQR/T3BqMj/eM1flTC1Uk2uUoLcWCxjT95xKulV/Lc6hhOZsBQ== + dependencies: + "@fastify/merge-json-schemas" "^0.2.0" + ajv "^8.12.0" + ajv-formats "^3.0.1" + fast-uri "^3.0.0" + json-schema-ref-resolver "^3.0.0" + rfdc "^1.2.0" + fast-levenshtein@^2.0.6, fast-levenshtein@~2.0.6: version "2.0.6" resolved "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz" integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= -fast-uri@^3.0.1: +fast-querystring@^1.0.0, fast-querystring@^1.1.2: + version "1.1.2" + resolved "https://registry.npmjs.org/fast-querystring/-/fast-querystring-1.1.2.tgz#a6d24937b4fc6f791b4ee31dcb6f53aeafb89f53" + integrity sha512-g6KuKWmFXc0fID8WWH0jit4g0AGBoJhCkJMb1RmbsSEUNvQ+ZC8D6CUZ+GtF8nMzSPXnhiePyyqqipzNNEnHjg== + dependencies: + fast-decode-uri-component "^1.0.1" + +fast-safe-stringify@^2.1.1: + version "2.1.1" + resolved "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz#c406a83b6e70d9e35ce3b30a81141df30aeba884" + integrity sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA== + +fast-uri@^3.0.0, fast-uri@^3.0.1: version "3.1.0" resolved "https://registry.yarnpkg.com/fast-uri/-/fast-uri-3.1.0.tgz#66eecff6c764c0df9b762e62ca7edcfb53b4edfa" integrity sha512-iPeeDKJSWf4IEOasVVrknXpaBV0IApz/gp7S2bb7Z4Lljbl2MGJRqInZiUrQwV16cpzw/D3S5j5Julj/gT52AA== @@ -3503,6 +4277,32 @@ fastest-levenshtein@^1.0.16: resolved "https://registry.yarnpkg.com/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz#210e61b6ff181de91ea9b3d1b84fdedd47e034e5" integrity sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg== +fastify-plugin@^5.0.0: + version "5.1.0" + resolved "https://registry.npmjs.org/fastify-plugin/-/fastify-plugin-5.1.0.tgz#7083e039d6418415f9a669f8c25e72fc5bf2d3e7" + integrity sha512-FAIDA8eovSt5qcDgcBvDuX/v0Cjz0ohGhENZ/wpc3y+oZCY2afZ9Baqql3g/lC+OHRnciQol4ww7tuthOb9idw== + +"fastify@^4.29.0 || ^5.2.1": + version "5.6.2" + resolved "https://registry.npmjs.org/fastify/-/fastify-5.6.2.tgz#e9bd80c869f54440f62f539d646b1c303b56c40f" + integrity sha512-dPugdGnsvYkBlENLhCgX8yhyGCsCPrpA8lFWbTNU428l+YOnLgYHR69hzV8HWPC79n536EqzqQtvhtdaCE0dKg== + dependencies: + "@fastify/ajv-compiler" "^4.0.0" + "@fastify/error" "^4.0.0" + "@fastify/fast-json-stringify-compiler" "^5.0.0" + "@fastify/proxy-addr" "^5.0.0" + abstract-logging "^2.0.1" + avvio "^9.0.0" + fast-json-stringify "^6.0.0" + find-my-way "^9.0.0" + light-my-request "^6.0.0" + pino "^10.1.0" + process-warning "^5.0.0" + rfdc "^1.3.1" + secure-json-parse "^4.0.0" + semver "^7.6.0" + toad-cache "^3.7.0" + fastq@^1.15.0, fastq@^1.6.0: version "1.18.0" resolved "https://registry.npmjs.org/fastq/-/fastq-1.18.0.tgz" @@ -3510,6 +4310,13 @@ fastq@^1.15.0, fastq@^1.6.0: dependencies: reusify "^1.0.4" +fastq@^1.17.1: + version "1.19.1" + resolved "https://registry.npmjs.org/fastq/-/fastq-1.19.1.tgz#d50eaba803c8846a883c16492821ebcd2cda55f5" + integrity sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ== + dependencies: + reusify "^1.0.4" + fb-watchman@^2.0.0: version "2.0.1" resolved "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.1.tgz" @@ -3550,6 +4357,28 @@ fill-range@^7.1.1: dependencies: to-regex-range "^5.0.1" +finalhandler@1.3.1: + version "1.3.1" + resolved "https://registry.npmjs.org/finalhandler/-/finalhandler-1.3.1.tgz#0c575f1d1d324ddd1da35ad7ece3df7d19088019" + integrity sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ== + dependencies: + debug "2.6.9" + encodeurl "~2.0.0" + escape-html "~1.0.3" + on-finished "2.4.1" + parseurl "~1.3.3" + statuses "2.0.1" + unpipe "~1.0.0" + +find-my-way@^9.0.0: + version "9.3.0" + resolved "https://registry.npmjs.org/find-my-way/-/find-my-way-9.3.0.tgz#9f57786b5d772cc45142bf39dd5349f9cc883f91" + integrity sha512-eRoFWQw+Yv2tuYlK2pjFS2jGXSxSppAs3hSQjfxVKxM5amECzIgYYc1FEI8ZmhSh/Ig+FrKEz43NLRKJjYCZVg== + dependencies: + fast-deep-equal "^3.1.3" + fast-querystring "^1.0.0" + safe-regex2 "^5.0.0" + find-up@^2.1.0: version "2.1.0" resolved "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz" @@ -3609,6 +4438,25 @@ for-each@^0.3.3, for-each@^0.3.5: dependencies: is-callable "^1.2.7" +form-auto-content@^3.2.1: + version "3.2.1" + resolved "https://registry.npmjs.org/form-auto-content/-/form-auto-content-3.2.1.tgz#babd252320d53a6c6e687d42b5d594ec66b4ca88" + integrity sha512-e9dajOhS0QbfNUpwHUTd/2o64jqeWPft/JByATwxSJb0vpV2siT1k3FnnNyntm2ZBpH+bfA6JTpvjvTZtDhmEw== + dependencies: + fast-querystring "^1.0.0" + form-data "^4.0.0" + +form-data@^3.0.0: + version "3.0.4" + resolved "https://registry.npmjs.org/form-data/-/form-data-3.0.4.tgz#938273171d3f999286a4557528ce022dc2c98df1" + integrity sha512-f0cRzm6dkyVYV3nPoooP8XlccPQukegwhAnpoLcXy+X+A8KfpGOoXwDr9FLZd3wzgLaBGQBE3lY93Zm/i1JvIQ== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.8" + es-set-tostringtag "^2.1.0" + hasown "^2.0.2" + mime-types "^2.1.35" + form-data@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz" @@ -3618,11 +4466,41 @@ form-data@^4.0.0: combined-stream "^1.0.8" mime-types "^2.1.12" +form-data@^4.0.1: + version "4.0.5" + resolved "https://registry.npmjs.org/form-data/-/form-data-4.0.5.tgz#b49e48858045ff4cbf6b03e1805cebcad3679053" + integrity sha512-8RipRLol37bNs2bhoV67fiTEvdTrbMUYcFTiy3+wuuOnUog2QBHCZWXDRijWQfAkhBj2Uf5UnVaiWwA5vdd82w== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.8" + es-set-tostringtag "^2.1.0" + hasown "^2.0.2" + mime-types "^2.1.12" + +forwarded@0.2.0: + version "0.2.0" + resolved "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz#2269936428aad4c15c7ebe9779a84bf0b2a81811" + integrity sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow== + +fresh@0.5.2: + version "0.5.2" + resolved "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" + integrity sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q== + from@~0: version "0.1.7" resolved "https://registry.npmjs.org/from/-/from-0.1.7.tgz" integrity sha1-g8YK/Fi5xWmXAH7Rp2izqzA6RP4= +fs-extra@^11.2.0: + version "11.3.2" + resolved "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.2.tgz#c838aeddc6f4a8c74dd15f85e11fe5511bfe02a4" + integrity sha512-Xr9F6z6up6Ws+NjzMCZc6WXg2YFRlrLP9NQDO3VQrWrfiojdhS56TzueT88ze0uBdCTwEIhQ3ptnmKeWGFAe0A== + dependencies: + graceful-fs "^4.2.0" + jsonfile "^6.0.1" + universalify "^2.0.0" + fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz" @@ -3790,7 +4668,7 @@ gopd@^1.0.1, gopd@^1.2.0: resolved "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz" integrity sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg== -graceful-fs@^4.2.4, graceful-fs@^4.2.9: +graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.4, graceful-fs@^4.2.9: version "4.2.11" resolved "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz" integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== @@ -3848,6 +4726,16 @@ hasown@^2.0.2: dependencies: function-bind "^1.1.2" +he@1.2.0: + version "1.2.0" + resolved "https://registry.npmjs.org/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" + integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== + +help-me@^5.0.0: + version "5.0.0" + resolved "https://registry.npmjs.org/help-me/-/help-me-5.0.0.tgz#b1ebe63b967b74060027c2ac61f9be12d354a6f6" + integrity sha512-7xgomUX6ADmcYzFik0HzAxh/73YlKR9bmFzf51CZwR+b6YtzU2m0u49hQCqV6SvlqIqsaxovfwdvbnsw3b/zpg== + highlight.js@^10.7.1: version "10.7.3" resolved "https://registry.npmjs.org/highlight.js/-/highlight.js-10.7.3.tgz" @@ -3858,6 +4746,13 @@ hookified@^1.12.0, hookified@^1.12.1: resolved "https://registry.yarnpkg.com/hookified/-/hookified-1.12.1.tgz#b0de0116ca346fd6c4e55db901f52d5cd728ef00" integrity sha512-xnKGl+iMIlhrZmGHB729MqlmPoWBznctSQTYCpFKqNsCgimJQmithcW0xSQMMFzYnV2iKUh25alswn6epgxS0Q== +html-encoding-sniffer@^2.0.1: + version "2.0.1" + resolved "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-2.0.1.tgz#42a6dc4fd33f00281176e8b23759ca4e4fa185f3" + integrity sha512-D5JbOMBIR/TVZkubHT+OyT2705QvogUW4IBn6nHd756OwieSF9aDYFj4dv6HHEVGYbHaLETa3WggZYWWMyy3ZQ== + dependencies: + whatwg-encoding "^1.0.5" + html-encoding-sniffer@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-3.0.0.tgz" @@ -3875,6 +4770,26 @@ html-tags@^3.3.1: resolved "https://registry.yarnpkg.com/html-tags/-/html-tags-3.3.1.tgz#a04026a18c882e4bba8a01a3d39cfe465d40b5ce" integrity sha512-ztqyC3kLto0e9WbNp0aeP+M3kTt+nbaIveGmUxAtZa+8iFgKLUOD4YKM5j+f3QD89bra7UeumolZHKuOXnTmeQ== +http-errors@2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz#b7774a1486ef73cf7667ac9ae0858c012c57b9d3" + integrity sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ== + dependencies: + depd "2.0.0" + inherits "2.0.4" + setprototypeof "1.2.0" + statuses "2.0.1" + toidentifier "1.0.1" + +http-proxy-agent@^4.0.1: + version "4.0.1" + resolved "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz#8a8c8ef7f5932ccf953c296ca8291b95aa74aa3a" + integrity sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg== + dependencies: + "@tootallnate/once" "1" + agent-base "6" + debug "4" + http-proxy-agent@^5.0.0: version "5.0.0" resolved "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz" @@ -3884,7 +4799,7 @@ http-proxy-agent@^5.0.0: agent-base "6" debug "4" -https-proxy-agent@^5.0.1: +https-proxy-agent@^5.0.0, https-proxy-agent@^5.0.1: version "5.0.1" resolved "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz" integrity sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA== @@ -3897,6 +4812,13 @@ human-signals@^2.1.0: resolved "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz" integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== +iconv-lite@0.4.24: + version "0.4.24" + resolved "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" + integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== + dependencies: + safer-buffer ">= 2.1.2 < 3" + iconv-lite@0.6.3: version "0.6.3" resolved "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz" @@ -3914,6 +4836,11 @@ ignore@^7.0.0, ignore@^7.0.5: resolved "https://registry.yarnpkg.com/ignore/-/ignore-7.0.5.tgz#4cb5f6cd7d4c7ab0365738c7aea888baa6d7efd9" integrity sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg== +immediate@~3.0.5: + version "3.0.6" + resolved "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz#9db1dbd0faf8de6fbe0f5dd5e56bb606280de69b" + integrity sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ== + import-fresh@^3.2.1: version "3.3.0" resolved "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz" @@ -3956,7 +4883,7 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2: +inherits@2, inherits@2.0.4: version "2.0.4" resolved "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== @@ -3975,6 +4902,16 @@ internal-slot@^1.1.0: hasown "^2.0.2" side-channel "^1.1.0" +ipaddr.js@1.9.1: + version "1.9.1" + resolved "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3" + integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g== + +ipaddr.js@^2.1.0: + version "2.2.0" + resolved "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-2.2.0.tgz#d33fa7bac284f4de7af949638c9d68157c6b92e8" + integrity sha512-Ag3wB2o37wslZS19hZqorUnrnzSkpOVy+IiiDEiTqNubEYpYuHWIf6K4psgN2ZWKExS4xhVCrRVfb/wfW8fWJA== + is-array-buffer@^3.0.4, is-array-buffer@^3.0.5: version "3.0.5" resolved "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.5.tgz" @@ -4436,6 +5373,16 @@ jest-haste-map@^29.7.0: optionalDependencies: fsevents "^2.3.2" +jest-junit@^16.0.0: + version "16.0.0" + resolved "https://registry.npmjs.org/jest-junit/-/jest-junit-16.0.0.tgz#d838e8c561cf9fdd7eb54f63020777eee4136785" + integrity sha512-A94mmw6NfJab4Fg/BlvVOUXzXgF0XIH6EmTgJ5NDPp4xoKq0Kr7sErb+4Xs9nZvu58pJojz5RFGpqnZYJTrRfQ== + dependencies: + mkdirp "^1.0.4" + strip-ansi "^6.0.1" + uuid "^8.3.2" + xml "^1.0.1" + jest-leak-detector@^29.7.0: version "29.7.0" resolved "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz" @@ -4655,6 +5602,11 @@ jiti@^2.4.2: resolved "https://registry.npmjs.org/jiti/-/jiti-2.4.2.tgz" integrity sha512-rg9zJN+G4n2nfJl5MW3BMygZX56zKPNVEYYqq7adpmMh4Jn2QNEwhvQlFy6jPVdcod7txZtKHWnyZiA3a0zP7A== +joycon@^3.1.1: + version "3.1.1" + resolved "https://registry.npmjs.org/joycon/-/joycon-3.1.1.tgz#bce8596d6ae808f8b68168f5fc69280996894f03" + integrity sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw== + "js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz" @@ -4675,6 +5627,39 @@ js-yaml@^4.1.0: dependencies: argparse "^2.0.1" +jsdom@^16.5.0: + version "16.7.0" + resolved "https://registry.npmjs.org/jsdom/-/jsdom-16.7.0.tgz#918ae71965424b197c819f8183a754e18977b710" + integrity sha512-u9Smc2G1USStM+s/x1ru5Sxrl6mPYCbByG1U/hUmqaVsm4tbNyS7CicOSRyuGQYZhTu0h84qkZZQ/I+dzizSVw== + dependencies: + abab "^2.0.5" + acorn "^8.2.4" + acorn-globals "^6.0.0" + cssom "^0.4.4" + cssstyle "^2.3.0" + data-urls "^2.0.0" + decimal.js "^10.2.1" + domexception "^2.0.1" + escodegen "^2.0.0" + form-data "^3.0.0" + html-encoding-sniffer "^2.0.1" + http-proxy-agent "^4.0.1" + https-proxy-agent "^5.0.0" + is-potential-custom-element-name "^1.0.1" + nwsapi "^2.2.0" + parse5 "6.0.1" + saxes "^5.0.1" + symbol-tree "^3.2.4" + tough-cookie "^4.0.0" + w3c-hr-time "^1.0.2" + w3c-xmlserializer "^2.0.0" + webidl-conversions "^6.1.0" + whatwg-encoding "^1.0.5" + whatwg-mimetype "^2.3.0" + whatwg-url "^8.5.0" + ws "^7.4.6" + xml-name-validator "^3.0.0" + jsdom@^20.0.0: version "20.0.3" resolved "https://registry.npmjs.org/jsdom/-/jsdom-20.0.3.tgz" @@ -4751,11 +5736,23 @@ json-buffer@3.0.1: resolved "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz" integrity sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ== +json-nd@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/json-nd/-/json-nd-1.0.0.tgz#e52283b7ee3f5e6f9920f668c94044bda912120c" + integrity sha512-8TIp0HZAY0VVrwRQJJPb4+nOTSPoOWZeEKBTLizUfQO4oym5Fc/MKqN8vEbLCxcyxDf2vwNxOQ1q84O49GWPyQ== + json-parse-even-better-errors@^2.3.0: version "2.3.1" resolved "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz" integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w== +json-schema-ref-resolver@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/json-schema-ref-resolver/-/json-schema-ref-resolver-3.0.0.tgz#28f6a410122cde9238762a5e9296faa38be28708" + integrity sha512-hOrZIVL5jyYFjzk7+y7n5JDzGlU8rfWDuYyHwGa2WA8/pcmMHezp2xsVwxrebD/Q9t8Nc5DboieySDpCp4WG4A== + dependencies: + dequal "^2.0.3" + json-schema-traverse@^0.4.1: version "0.4.1" resolved "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz" @@ -4783,6 +5780,31 @@ json5@^2.2.3: resolved "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz" integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== +jsonfile@^6.0.1: + version "6.2.0" + resolved "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.0.tgz#7c265bd1b65de6977478300087c99f1c84383f62" + integrity sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg== + dependencies: + universalify "^2.0.0" + optionalDependencies: + graceful-fs "^4.1.6" + +jsonwebtoken@^9.0.2: + version "9.0.2" + resolved "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz#65ff91f4abef1784697d40952bb1998c504caaf3" + integrity sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ== + dependencies: + jws "^3.2.2" + lodash.includes "^4.3.0" + lodash.isboolean "^3.0.3" + lodash.isinteger "^4.0.4" + lodash.isnumber "^3.0.3" + lodash.isplainobject "^4.0.6" + lodash.isstring "^4.0.1" + lodash.once "^4.0.0" + ms "^2.1.1" + semver "^7.5.4" + "jsx-ast-utils@^2.4.1 || ^3.0.0", jsx-ast-utils@^3.3.5: version "3.3.5" resolved "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.3.5.tgz" @@ -4793,6 +5815,23 @@ json5@^2.2.3: object.assign "^4.1.4" object.values "^1.1.6" +jwa@^1.4.1: + version "1.4.2" + resolved "https://registry.npmjs.org/jwa/-/jwa-1.4.2.tgz#16011ac6db48de7b102777e57897901520eec7b9" + integrity sha512-eeH5JO+21J78qMvTIDdBXidBd6nG2kZjg5Ohz/1fpa28Z4CcsWUzJ1ZZyFq/3z3N17aZy+ZuBoHljASbL1WfOw== + dependencies: + buffer-equal-constant-time "^1.0.1" + ecdsa-sig-formatter "1.0.11" + safe-buffer "^5.0.1" + +jws@^3.2.2: + version "3.2.2" + resolved "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz#001099f3639468c9414000e99995fa52fb478304" + integrity sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA== + dependencies: + jwa "^1.4.1" + safe-buffer "^5.0.1" + keyv@^4.5.4: version "4.5.4" resolved "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz" @@ -4882,11 +5921,34 @@ levn@~0.3.0: prelude-ls "~1.1.2" type-check "~0.3.2" +lie@3.1.1: + version "3.1.1" + resolved "https://registry.npmjs.org/lie/-/lie-3.1.1.tgz#9a436b2cc7746ca59de7a41fa469b3efb76bd87e" + integrity sha512-RiNhHysUjhrDQntfYSfY4MU24coXXdEOgw9WGcKHNeEwffDYbF//u87M1EWaMGzuFoSbqW0C9C6lEEhDOAswfw== + dependencies: + immediate "~3.0.5" + +light-my-request@^6.0.0: + version "6.6.0" + resolved "https://registry.npmjs.org/light-my-request/-/light-my-request-6.6.0.tgz#c9448772323f65f33720fb5979c7841f14060add" + integrity sha512-CHYbu8RtboSIoVsHZ6Ye4cj4Aw/yg2oAFimlF7mNvfDV192LR7nDiKtSIfCuLT7KokPSTn/9kfVLm5OGN0A28A== + dependencies: + cookie "^1.0.1" + process-warning "^4.0.0" + set-cookie-parser "^2.6.0" + lines-and-columns@^1.1.6: version "1.1.6" resolved "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz" integrity sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA= +localforage@^1.8.1: + version "1.10.0" + resolved "https://registry.npmjs.org/localforage/-/localforage-1.10.0.tgz#5c465dc5f62b2807c3a84c0c6a1b1b3212781dd4" + integrity sha512-14/H1aX7hzBBmmh7sGPd+AOMkkIrHM3Z1PAyGgZigA1H1p5O5ANnMyWzvpAETtG68/dC4pC0ncy3+PPGzXZHPg== + dependencies: + lie "3.1.1" + locate-path@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz" @@ -4917,11 +5979,48 @@ locate-path@^6.0.0: dependencies: p-locate "^5.0.0" +lockfile@^1.0.4: + version "1.0.4" + resolved "https://registry.npmjs.org/lockfile/-/lockfile-1.0.4.tgz#07f819d25ae48f87e538e6578b6964a4981a5609" + integrity sha512-cvbTwETRfsFh4nHsL1eGWapU1XFi5Ot9E85sWAwia7Y7EgB7vfqcZhTKZ+l7hCGxSPoushMv5GKhT5PdLv03WA== + dependencies: + signal-exit "^3.0.2" + lodash.debounce@^4.0.8: version "4.0.8" resolved "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz" integrity sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow== +lodash.includes@^4.3.0: + version "4.3.0" + resolved "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz#60bb98a87cb923c68ca1e51325483314849f553f" + integrity sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w== + +lodash.isboolean@^3.0.3: + version "3.0.3" + resolved "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz#6c2e171db2a257cd96802fd43b01b20d5f5870f6" + integrity sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg== + +lodash.isinteger@^4.0.4: + version "4.0.4" + resolved "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz#619c0af3d03f8b04c31f5882840b77b11cd68343" + integrity sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA== + +lodash.isnumber@^3.0.3: + version "3.0.3" + resolved "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz#3ce76810c5928d03352301ac287317f11c0b1ffc" + integrity sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw== + +lodash.isplainobject@^4.0.6: + version "4.0.6" + resolved "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz#7c526a52d89b45c45cc690b88163be0497f550cb" + integrity sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA== + +lodash.isstring@^4.0.1: + version "4.0.1" + resolved "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz#d527dfb5456eca7cc9bb95d5daeaf88ba54a5451" + integrity sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw== + lodash.memoize@^4.1.2: version "4.1.2" resolved "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz" @@ -4932,12 +6031,17 @@ lodash.merge@^4.6.2: resolved "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz" integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== +lodash.once@^4.0.0: + version "4.1.1" + resolved "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz#0dd3971213c7c56df880977d504c88fb471a97ac" + integrity sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg== + lodash.truncate@^4.4.2: version "4.4.2" resolved "https://registry.yarnpkg.com/lodash.truncate/-/lodash.truncate-4.4.2.tgz#5a350da0b1113b837ecfffd5812cbe58d6eae193" integrity sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw== -lodash@^4.17.21, lodash@^4.17.4: +lodash@^4.17.21, lodash@^4.17.4, lodash@^4.7.0: version "4.17.21" resolved "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== @@ -5033,11 +6137,21 @@ mdn-data@^2.21.0: resolved "https://registry.yarnpkg.com/mdn-data/-/mdn-data-2.24.0.tgz#e51beee564113d8fa1b0813260d9cc920f11885a" integrity sha512-i97fklrJl03tL1tdRVw0ZfLLvuDsdb6wxL+TrJ+PKkCbLrp2PCu2+OYdCKychIUm19nSM/35S6qz7pJpnXttoA== +media-typer@0.3.0: + version "0.3.0" + resolved "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" + integrity sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ== + meow@^13.2.0: version "13.2.0" resolved "https://registry.yarnpkg.com/meow/-/meow-13.2.0.tgz#6b7d63f913f984063b3cc261b6e8800c4cd3474f" integrity sha512-pxQJQzB6djGPXh08dacEloMFopsOqGVRKFPYvPOt9XDZ1HasbgDZA74CJGreSU4G3Ak7EFJGoiH2auq+yXISgA== +merge-descriptors@1.0.3: + version "1.0.3" + resolved "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.3.tgz#d80319a65f3c7935351e5cfdac8f9318504dbed5" + integrity sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ== + merge-stream@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz" @@ -5048,6 +6162,11 @@ merge2@^1.3.0, merge2@^1.4.1: resolved "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz" integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== +methods@~1.1.2: + version "1.1.2" + resolved "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" + integrity sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w== + micromatch@^4.0.4, micromatch@^4.0.8: version "4.0.8" resolved "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz" @@ -5061,6 +6180,11 @@ mime-db@1.43.0: resolved "https://registry.npmjs.org/mime-db/-/mime-db-1.43.0.tgz" integrity sha512-+5dsGEEovYbT8UY9yD7eE4XTc4UwJ1jBYlgaQQF38ENsKR3wj/8q8RFZrF9WIZpB2V1ArTVFUva8sAul1NzRzQ== +mime-db@1.52.0: + version "1.52.0" + resolved "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" + integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== + mime-types@^2.1.12: version "2.1.26" resolved "https://registry.npmjs.org/mime-types/-/mime-types-2.1.26.tgz" @@ -5068,6 +6192,18 @@ mime-types@^2.1.12: dependencies: mime-db "1.43.0" +mime-types@^2.1.35, mime-types@~2.1.24, mime-types@~2.1.34: + version "2.1.35" + resolved "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" + integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== + dependencies: + mime-db "1.52.0" + +mime@1.6.0: + version "1.6.0" + resolved "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" + integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== + mimic-fn@^2.1.0: version "2.1.0" resolved "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz" @@ -5104,6 +6240,11 @@ minimist@^1.2.0, minimist@^1.2.6, minimist@^1.2.8: resolved "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz" integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== +mkdirp@^1.0.4: + version "1.0.4" + resolved "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" + integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== + mock-fs@^5.5.0: version "5.5.0" resolved "https://registry.npmjs.org/mock-fs/-/mock-fs-5.5.0.tgz#94a46d299aaa588e735a201cbe823c876e91f385" @@ -5114,7 +6255,12 @@ mri@^1.1.0: resolved "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz" integrity sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA== -ms@^2.1.1, ms@^2.1.3: +ms@2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + integrity sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A== + +ms@2.1.3, ms@^2.1.1, ms@^2.1.3: version "2.1.3" resolved "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== @@ -5138,6 +6284,11 @@ natural-compare@^1.4.0: resolved "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz" integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc= +negotiator@0.6.3: + version "0.6.3" + resolved "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz#58e323a72fedc0d6f9cd4d31fe49f51479590ccd" + integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg== + neo-async@^2.6.1: version "2.6.2" resolved "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz" @@ -5160,6 +6311,14 @@ node-fetch@^2.7.0: dependencies: whatwg-url "^5.0.0" +node-html-parser@^7.0.1: + version "7.0.1" + resolved "https://registry.npmjs.org/node-html-parser/-/node-html-parser-7.0.1.tgz#e3056550bae48517ebf161a0b0638f4b0123dfe3" + integrity sha512-KGtmPY2kS0thCWGK0VuPyOS+pBKhhe8gXztzA2ilAOhbUbxa9homF1bOyKvhGzMLXUoRds9IOmr/v5lr/lqNmA== + dependencies: + css-select "^5.1.0" + he "1.2.0" + node-int64@^0.4.0: version "0.4.0" resolved "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz" @@ -5170,6 +6329,11 @@ node-releases@^2.0.14: resolved "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz" integrity sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw== +node-releases@^2.0.27: + version "2.0.27" + resolved "https://registry.npmjs.org/node-releases/-/node-releases-2.0.27.tgz#eedca519205cf20f650f61d56b070db111231e4e" + integrity sha512-nmh3lCkYZ3grZvqcCH+fjmQ7X+H0OeZgP40OierEaAptX4XofMh5kwNbWh7lBduUzCcV/8kZ+NDLCwm2iorIlA== + normalize-path@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz" @@ -5182,7 +6346,7 @@ npm-run-path@^4.0.1: dependencies: path-key "^3.0.0" -nps@^5.9.3: +nps@^5.9.12, nps@^5.9.3: version "5.10.0" resolved "https://registry.npmjs.org/nps/-/nps-5.10.0.tgz" integrity sha512-tye+0hoKq3pB6NhykoPcOzwn4nEvwVvh1kJEDc+21gYordNdaBlkPv8ZlrZkuEWLUeujvS8VQ56KO9QGoPKkEA== @@ -5200,6 +6364,18 @@ nps@^5.9.3: type-detect "^4.0.3" yargs "14.2.0" +nth-check@^2.0.1: + version "2.1.1" + resolved "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz#c9eab428effce36cd6b92c924bdb000ef1f1ed1d" + integrity sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w== + dependencies: + boolbase "^1.0.0" + +nwsapi@^2.2.0: + version "2.2.22" + resolved "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.22.tgz#109f9530cda6c156d6a713cdf5939e9f0de98b9d" + integrity sha512-ujSMe1OWVn55euT1ihwCI1ZcAaAU3nxUiDwfDQldc51ZXaB9m2AyOn6/jh1BLe2t/G8xd6uKG1UBF2aZJeg2SQ== + nwsapi@^2.2.2, nwsapi@^2.2.4: version "2.2.16" resolved "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.16.tgz" @@ -5271,7 +6447,19 @@ object.values@^1.1.6, object.values@^1.2.0, object.values@^1.2.1: define-properties "^1.2.1" es-object-atoms "^1.0.0" -once@^1.3.0: +on-exit-leak-free@^2.1.0: + version "2.1.2" + resolved "https://registry.npmjs.org/on-exit-leak-free/-/on-exit-leak-free-2.1.2.tgz#fed195c9ebddb7d9e4c3842f93f281ac8dadd3b8" + integrity sha512-0eJJY6hXLGf1udHwfNftBqH+g73EU4B504nZeKpz1sYRKafAghwxEJunB2O7rDZkL4PGfsMVnTXZ2EjibbqcsA== + +on-finished@2.4.1: + version "2.4.1" + resolved "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz#58c8c44116e54845ad57f14ab10b03533184ac3f" + integrity sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg== + dependencies: + ee-first "1.1.1" + +once@^1.3.0, once@^1.3.1, once@^1.4.0: version "1.4.0" resolved "https://registry.npmjs.org/once/-/once-1.4.0.tgz" integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== @@ -5420,16 +6608,16 @@ parse5-htmlparser2-tree-adapter@^6.0.0: dependencies: parse5 "^6.0.1" +parse5@6.0.1, parse5@^6.0.1: + version "6.0.1" + resolved "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz" + integrity sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw== + parse5@^5.1.1: version "5.1.1" resolved "https://registry.npmjs.org/parse5/-/parse5-5.1.1.tgz" integrity sha512-ugq4DFI0Ptb+WWjAdOK16+u/nHfiIrcE+sh8kZMaM0WllQKLI9rOUq6c2b7cwPkXdzfQESqvoqK6ug7U/Yyzug== -parse5@^6.0.1: - version "6.0.1" - resolved "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz" - integrity sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw== - parse5@^7.0.0, parse5@^7.1.1, parse5@^7.1.2: version "7.2.1" resolved "https://registry.npmjs.org/parse5/-/parse5-7.2.1.tgz" @@ -5437,6 +6625,11 @@ parse5@^7.0.0, parse5@^7.1.1, parse5@^7.1.2: dependencies: entities "^4.5.0" +parseurl@~1.3.3: + version "1.3.3" + resolved "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" + integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== + path-exists@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz" @@ -5462,6 +6655,11 @@ path-parse@^1.0.7: resolved "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz" integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== +path-to-regexp@0.1.12: + version "0.1.12" + resolved "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.12.tgz#d5e1a12e478a976d432ef3c58d534b9923164bb7" + integrity sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ== + path-type@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" @@ -5489,6 +6687,71 @@ picomatch@^4.0.1: resolved "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz" integrity sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg== +pino-abstract-transport@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/pino-abstract-transport/-/pino-abstract-transport-2.0.0.tgz#de241578406ac7b8a33ce0d77ae6e8a0b3b68a60" + integrity sha512-F63x5tizV6WCh4R6RHyi2Ml+M70DNRXt/+HANowMflpgGFMAym/VKm6G7ZOQRjqN7XbGxK1Lg9t6ZrtzOaivMw== + dependencies: + split2 "^4.0.0" + +pino-pretty@^13.0.0: + version "13.1.2" + resolved "https://registry.npmjs.org/pino-pretty/-/pino-pretty-13.1.2.tgz#4e7484f2c5d02cce03159b96aa04697bf9e84ff6" + integrity sha512-3cN0tCakkT4f3zo9RXDIhy6GTvtYD6bK4CRBLN9j3E/ePqN1tugAXD5rGVfoChW6s0hiek+eyYlLNqc/BG7vBQ== + dependencies: + colorette "^2.0.7" + dateformat "^4.6.3" + fast-copy "^3.0.2" + fast-safe-stringify "^2.1.1" + help-me "^5.0.0" + joycon "^3.1.1" + minimist "^1.2.6" + on-exit-leak-free "^2.1.0" + pino-abstract-transport "^2.0.0" + pump "^3.0.0" + secure-json-parse "^4.0.0" + sonic-boom "^4.0.1" + strip-json-comments "^5.0.2" + +pino-std-serializers@^7.0.0: + version "7.0.0" + resolved "https://registry.npmjs.org/pino-std-serializers/-/pino-std-serializers-7.0.0.tgz#7c625038b13718dbbd84ab446bd673dc52259e3b" + integrity sha512-e906FRY0+tV27iq4juKzSYPbUj2do2X2JX4EzSca1631EB2QJQUqGbDuERal7LCtOpxl6x3+nvo9NPZcmjkiFA== + +pino@^10.1.0: + version "10.1.0" + resolved "https://registry.npmjs.org/pino/-/pino-10.1.0.tgz#eb2a8a5b509fe4c75643ccec30461ea24766003a" + integrity sha512-0zZC2ygfdqvqK8zJIr1e+wT1T/L+LF6qvqvbzEQ6tiMAoTqEVK9a1K3YRu8HEUvGEvNqZyPJTtb2sNIoTkB83w== + dependencies: + "@pinojs/redact" "^0.4.0" + atomic-sleep "^1.0.0" + on-exit-leak-free "^2.1.0" + pino-abstract-transport "^2.0.0" + pino-std-serializers "^7.0.0" + process-warning "^5.0.0" + quick-format-unescaped "^4.0.3" + real-require "^0.2.0" + safe-stable-stringify "^2.3.1" + sonic-boom "^4.0.1" + thread-stream "^3.0.0" + +pino@^9.0.0: + version "9.14.0" + resolved "https://registry.npmjs.org/pino/-/pino-9.14.0.tgz#673d9711c2d1e64d18670c1ec05ef7ba14562556" + integrity sha512-8OEwKp5juEvb/MjpIc4hjqfgCNysrS94RIOMXYvpYCdm/jglrKEiAYmiumbmGhCvs+IcInsphYDFwqrjr7398w== + dependencies: + "@pinojs/redact" "^0.4.0" + atomic-sleep "^1.0.0" + on-exit-leak-free "^2.1.0" + pino-abstract-transport "^2.0.0" + pino-std-serializers "^7.0.0" + process-warning "^5.0.0" + quick-format-unescaped "^4.0.3" + real-require "^0.2.0" + safe-stable-stringify "^2.3.1" + sonic-boom "^4.0.1" + thread-stream "^3.0.0" + pirates@^4.0.4: version "4.0.5" resolved "https://registry.npmjs.org/pirates/-/pirates-4.0.5.tgz" @@ -5603,6 +6866,16 @@ pretty-ms@^9.0.0: dependencies: parse-ms "^4.0.0" +process-warning@^4.0.0: + version "4.0.1" + resolved "https://registry.npmjs.org/process-warning/-/process-warning-4.0.1.tgz#5c1db66007c67c756e4e09eb170cdece15da32fb" + integrity sha512-3c2LzQ3rY9d0hc1emcsHhfT9Jwz0cChib/QN89oME2R451w5fy3f0afAhERFZAwrbDU43wk12d0ORBpDVME50Q== + +process-warning@^5.0.0: + version "5.0.0" + resolved "https://registry.npmjs.org/process-warning/-/process-warning-5.0.0.tgz#566e0bf79d1dff30a72d8bbbe9e8ecefe8d378d7" + integrity sha512-a39t9ApHNx2L4+HBnQKqxxHNs1r7KF+Intd8Q/g1bUh6q0WIp9voPXJ/x0j+ZL45KF1pJd9+q2jLIRMfvEshkA== + promise-polyfill@^8.1.3: version "8.3.0" resolved "https://registry.npmjs.org/promise-polyfill/-/promise-polyfill-8.3.0.tgz" @@ -5625,6 +6898,14 @@ prop-types@^15.8.1: object-assign "^4.1.1" react-is "^16.13.1" +proxy-addr@~2.0.7: + version "2.0.7" + resolved "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz#f19fe69ceab311eeb94b42e70e8c2070f9ba1025" + integrity sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg== + dependencies: + forwarded "0.2.0" + ipaddr.js "1.9.1" + ps-tree@^1.2.0: version "1.2.0" resolved "https://registry.npmjs.org/ps-tree/-/ps-tree-1.2.0.tgz" @@ -5647,6 +6928,14 @@ publint@^0.3.8: picocolors "^1.1.1" sade "^1.8.1" +pump@^3.0.0: + version "3.0.3" + resolved "https://registry.npmjs.org/pump/-/pump-3.0.3.tgz#151d979f1a29668dc0025ec589a455b53282268d" + integrity sha512-todwxLMY7/heScKmntwQG8CXVkWUOdYxIvY2s0VWAAMh/nd8SoYiRaKjlr7+iCs984f2P8zvrfWcDDYVb73NfA== + dependencies: + end-of-stream "^1.1.0" + once "^1.3.1" + punycode@^2.1.0, punycode@^2.1.1, punycode@^2.3.0: version "2.3.1" resolved "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz" @@ -5657,6 +6946,13 @@ pure-rand@^6.0.0: resolved "https://registry.npmjs.org/pure-rand/-/pure-rand-6.0.4.tgz" integrity sha512-LA0Y9kxMYv47GIPJy6MI84fqTd2HmYZI83W/kM/SkKfDlajnZYfmXFTxkbY+xSBPkLJxltMa9hIkmdc29eguMA== +qs@6.13.0: + version "6.13.0" + resolved "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz#6ca3bd58439f7e245655798997787b0d88a51906" + integrity sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg== + dependencies: + side-channel "^1.0.6" + quansync@^0.2.7: version "0.2.8" resolved "https://registry.npmjs.org/quansync/-/quansync-0.2.8.tgz" @@ -5672,6 +6968,26 @@ queue-microtask@^1.2.2: resolved "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz" integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== +quick-format-unescaped@^4.0.3: + version "4.0.4" + resolved "https://registry.npmjs.org/quick-format-unescaped/-/quick-format-unescaped-4.0.4.tgz#93ef6dd8d3453cbc7970dd614fad4c5954d6b5a7" + integrity sha512-tYC1Q1hgyRuHgloV/YXs2w15unPVh8qfu/qCTfhTYamaw7fyhumKa2yGpdSo87vY32rIclj+4fWYQXUMs9EHvg== + +range-parser@~1.2.1: + version "1.2.1" + resolved "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" + integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== + +raw-body@2.5.2: + version "2.5.2" + resolved "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz#99febd83b90e08975087e8f1f9419a149366b68a" + integrity sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA== + dependencies: + bytes "3.1.2" + http-errors "2.0.0" + iconv-lite "0.4.24" + unpipe "1.0.0" + react-dom@^19.0.0: version "19.0.0" resolved "https://registry.npmjs.org/react-dom/-/react-dom-19.0.0.tgz" @@ -5703,6 +7019,11 @@ react-on-rails-rsc@19.0.2: neo-async "^2.6.1" webpack-sources "^3.2.0" +react-on-rails@*: + version "16.1.2" + resolved "https://registry.npmjs.org/react-on-rails/-/react-on-rails-16.1.2.tgz#27308d7d5806e73354eea2355c5c4036ade443d4" + integrity sha512-SiE168FgUtp9Sld2MAZUs2+R/D7B+SlNGX4zl9T2rB1QluzgTY042a4/i6v+ivQpBIhNjJujlVFIHYp+uVqjoQ== + react@^19.0.0: version "19.0.0" resolved "https://registry.npmjs.org/react/-/react-19.0.0.tgz" @@ -5713,6 +7034,11 @@ readline-sync@^1.4.7: resolved "https://registry.npmjs.org/readline-sync/-/readline-sync-1.4.10.tgz" integrity sha512-gNva8/6UAe8QYepIQH/jQ2qn91Qj0B9sYjMBBs3QOB8F2CXcKgLxQaJRP76sWVRQt+QU+8fAkCbCvjjMFu7Ycw== +real-require@^0.2.0: + version "0.2.0" + resolved "https://registry.npmjs.org/real-require/-/real-require-0.2.0.tgz#209632dea1810be2ae063a6ac084fee7e33fba78" + integrity sha512-57frrGM/OCTLqLOAh0mhVA9VBMHd+9U7Zb2THMGdBUoZVOtGbJzjxsYGDJ3A9AYYCP4hn6y1TVbaOfzWtm5GFg== + redent@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/redent/-/redent-3.0.0.tgz" @@ -5721,6 +7047,17 @@ redent@^3.0.0: indent-string "^4.0.0" strip-indent "^3.0.0" +redis@^5.0.1: + version "5.10.0" + resolved "https://registry.npmjs.org/redis/-/redis-5.10.0.tgz#c1b26ba2acd9c5fcc0d1724a3c7f0984ca43f48b" + integrity sha512-0/Y+7IEiTgVGPrLFKy8oAEArSyEJkU0zvgV5xyi9NzNQ+SLZmyFbUsWIbgPcd4UdUh00opXGKlXJwMmsis5Byw== + dependencies: + "@redis/bloom" "5.10.0" + "@redis/client" "5.10.0" + "@redis/json" "5.10.0" + "@redis/search" "5.10.0" + "@redis/time-series" "5.10.0" + redux@^4.2.1: version "4.2.1" resolved "https://registry.npmjs.org/redux/-/redux-4.2.1.tgz" @@ -5856,11 +7193,21 @@ resolve@^2.0.0-next.5: path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" +ret@~0.5.0: + version "0.5.0" + resolved "https://registry.npmjs.org/ret/-/ret-0.5.0.tgz#30a4d38a7e704bd96dc5ffcbe7ce2a9274c41c95" + integrity sha512-I1XxrZSQ+oErkRR4jYbAyEEu2I0avBvvMM5JN+6EBprOGRCs63ENqZ3vjavq8fBw2+62G5LF5XelKwuJpcvcxw== + reusify@^1.0.4: version "1.0.4" resolved "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz" integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== +rfdc@^1.2.0, rfdc@^1.3.1: + version "1.4.1" + resolved "https://registry.npmjs.org/rfdc/-/rfdc-1.4.1.tgz#778f76c4fb731d93414e8f925fbecf64cce7f6ca" + integrity sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA== + rrweb-cssom@^0.6.0: version "0.6.0" resolved "https://registry.npmjs.org/rrweb-cssom/-/rrweb-cssom-0.6.0.tgz" @@ -5891,6 +7238,11 @@ safe-array-concat@^1.1.3: has-symbols "^1.1.0" isarray "^2.0.5" +safe-buffer@5.2.1, safe-buffer@^5.0.1: + version "5.2.1" + resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" + integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== + safe-push-apply@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/safe-push-apply/-/safe-push-apply-1.0.0.tgz" @@ -5908,11 +7260,30 @@ safe-regex-test@^1.0.3, safe-regex-test@^1.1.0: es-errors "^1.3.0" is-regex "^1.2.1" -"safer-buffer@>= 2.1.2 < 3.0.0": +safe-regex2@^5.0.0: + version "5.0.0" + resolved "https://registry.npmjs.org/safe-regex2/-/safe-regex2-5.0.0.tgz#762e4a4c328603427281d2b99662f2d04e4ae811" + integrity sha512-YwJwe5a51WlK7KbOJREPdjNrpViQBI3p4T50lfwPuDhZnE3XGVTlGvi+aolc5+RvxDD6bnUmjVsU9n1eboLUYw== + dependencies: + ret "~0.5.0" + +safe-stable-stringify@^2.3.1: + version "2.5.0" + resolved "https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-2.5.0.tgz#4ca2f8e385f2831c432a719b108a3bf7af42a1dd" + integrity sha512-b3rppTKm9T+PsVCBEOUR46GWI7fdOs00VKZ1+9c1EWDaDMvjQc6tUwuFyIprgGgTcWoVHSKrU8H31ZHA2e0RHA== + +"safer-buffer@>= 2.1.2 < 3", "safer-buffer@>= 2.1.2 < 3.0.0": version "2.1.2" resolved "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== +saxes@^5.0.1: + version "5.0.1" + resolved "https://registry.npmjs.org/saxes/-/saxes-5.0.1.tgz#eebab953fa3b7608dbe94e5dadb15c888fa6696d" + integrity sha512-5LBh1Tls8c9xgGjw3QrMwETmTMVk0oFgvrFSvWx62llR2hcEInrKNZ2GZCCuuy2lvWrdl5jhbpeqc5hRYKFOcw== + dependencies: + xmlchars "^2.2.0" + saxes@^6.0.0: version "6.0.0" resolved "https://registry.npmjs.org/saxes/-/saxes-6.0.0.tgz" @@ -5925,6 +7296,11 @@ scheduler@^0.25.0: resolved "https://registry.npmjs.org/scheduler/-/scheduler-0.25.0.tgz" integrity sha512-xFVuu11jh+xcO7JOAGJNOXld8/TcEHK/4CituBUeUb5hqxJLj9YuemAEuvm9gQ/+pgXYfbQuqAkiYu+u7YEsNA== +secure-json-parse@^4.0.0: + version "4.1.0" + resolved "https://registry.npmjs.org/secure-json-parse/-/secure-json-parse-4.1.0.tgz#4f1ab41c67a13497ea1b9131bb4183a22865477c" + integrity sha512-l4KnYfEyqYJxDwlNVyRfO2E4NTHfMKAWdUuA8J0yve2Dz/E/PdBepY03RvyJpssIpRFwJoCD55wA+mEDs6ByWA== + semver@^6.0.0, semver@^6.3.0, semver@^6.3.1: version "6.3.1" resolved "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz" @@ -5935,11 +7311,53 @@ semver@^7.5.3, semver@^7.5.4, semver@^7.6.0, semver@^7.6.3: resolved "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz" integrity sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA== +send@0.19.0: + version "0.19.0" + resolved "https://registry.npmjs.org/send/-/send-0.19.0.tgz#bbc5a388c8ea6c048967049dbeac0e4a3f09d7f8" + integrity sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw== + dependencies: + debug "2.6.9" + depd "2.0.0" + destroy "1.2.0" + encodeurl "~1.0.2" + escape-html "~1.0.3" + etag "~1.8.1" + fresh "0.5.2" + http-errors "2.0.0" + mime "1.6.0" + ms "2.1.3" + on-finished "2.4.1" + range-parser "~1.2.1" + statuses "2.0.1" + +sentry-testkit@^5.0.6: + version "5.0.10" + resolved "https://registry.npmjs.org/sentry-testkit/-/sentry-testkit-5.0.10.tgz#b60648662af028a9e464499c1c8fd353f19a79fe" + integrity sha512-wpvt29IIK+L1Pe02uc0y7rJkXQcnIk46hvB02Zqd4UNgP2lIhzv80GjR2lu8RtsbAmf7LJnGz8zLuV3rVa69ew== + dependencies: + body-parser "^1.20.1" + express "^4.21.2" + +serve-static@1.16.2: + version "1.16.2" + resolved "https://registry.npmjs.org/serve-static/-/serve-static-1.16.2.tgz#b6a5343da47f6bdd2673848bf45754941e803296" + integrity sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw== + dependencies: + encodeurl "~2.0.0" + escape-html "~1.0.3" + parseurl "~1.3.3" + send "0.19.0" + set-blocking@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz" integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc= +set-cookie-parser@^2.6.0: + version "2.7.2" + resolved "https://registry.npmjs.org/set-cookie-parser/-/set-cookie-parser-2.7.2.tgz#ccd08673a9ae5d2e44ea2a2de25089e67c7edf68" + integrity sha512-oeM1lpU/UvhTxw+g3cIfxXHyJRc/uidd3yK1P242gzHds0udQBYzs3y8j4gCCW+ZJ7ad0yctld8RYO+bdurlvw== + set-function-length@^1.2.2: version "1.2.2" resolved "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz" @@ -5971,6 +7389,11 @@ set-proto@^1.0.0: es-errors "^1.3.0" es-object-atoms "^1.0.0" +setprototypeof@1.2.0: + version "1.2.0" + resolved "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz#66c9a24a73f9fc28cbe66b09fed3d33dcaf1b424" + integrity sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw== + shebang-command@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz" @@ -6012,7 +7435,7 @@ side-channel-weakmap@^1.0.2: object-inspect "^1.13.3" side-channel-map "^1.0.1" -side-channel@^1.1.0: +side-channel@^1.0.6, side-channel@^1.1.0: version "1.1.0" resolved "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz" integrity sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw== @@ -6023,7 +7446,7 @@ side-channel@^1.1.0: side-channel-map "^1.0.1" side-channel-weakmap "^1.0.2" -signal-exit@^3.0.3, signal-exit@^3.0.7: +signal-exit@^3.0.2, signal-exit@^3.0.3, signal-exit@^3.0.7: version "3.0.7" resolved "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz" integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== @@ -6064,6 +7487,13 @@ smol-toml@^1.3.1: resolved "https://registry.npmjs.org/smol-toml/-/smol-toml-1.3.1.tgz" integrity sha512-tEYNll18pPKHroYSmLLrksq233j021G0giwW7P3D24jC54pQ5W5BXMsQ/Mvw1OJCmEYDgY+lrzT+3nNUtoNfXQ== +sonic-boom@^4.0.1: + version "4.2.0" + resolved "https://registry.npmjs.org/sonic-boom/-/sonic-boom-4.2.0.tgz#e59a525f831210fa4ef1896428338641ac1c124d" + integrity sha512-INb7TM37/mAcsGmc9hyyI6+QR3rR1zVRu36B0NeGXKnOOLiZOfER5SA+N7X7k3yUYRzLWafduTDvJAfDswwEww== + dependencies: + atomic-sleep "^1.0.0" + source-map-js@^1.0.1, source-map-js@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.2.1.tgz#1ce5650fddd87abc099eda37dcff024c2667ae46" @@ -6095,6 +7525,11 @@ spawn-command@^0.0.2-1: resolved "https://registry.npmjs.org/spawn-command/-/spawn-command-0.0.2.tgz" integrity sha512-zC8zGoGkmc8J9ndvml8Xksr1Amk9qBujgbF0JAIWO7kXr43w0h/0GJNM/Vustixu+YE8N/MTrQ7N31FvHUACxQ== +split2@^4.0.0: + version "4.2.0" + resolved "https://registry.npmjs.org/split2/-/split2-4.2.0.tgz#c9c5920904d148bab0b9f67145f245a86aadbfa4" + integrity sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg== + split@0.3: version "0.3.3" resolved "https://registry.npmjs.org/split/-/split-0.3.3.tgz" @@ -6114,11 +7549,23 @@ stack-utils@^2.0.3: dependencies: escape-string-regexp "^2.0.0" +stacktrace-parser@^0.1.10: + version "0.1.11" + resolved "https://registry.npmjs.org/stacktrace-parser/-/stacktrace-parser-0.1.11.tgz#c7c08f9b29ef566b9a6f7b255d7db572f66fabc4" + integrity sha512-WjlahMgHmCJpqzU8bIBy4qtsZdU9lRlcZE3Lvyej6t4tuOuv1vk57OW3MBrj6hXBFx/nNoC9MPMTcr5YA7NQbg== + dependencies: + type-fest "^0.7.1" + starts-with@^1.0.2: version "1.0.2" resolved "https://registry.npmjs.org/starts-with/-/starts-with-1.0.2.tgz" integrity sha1-Fnk6cp2J1M89T7LtovkIrjV/GW8= +statuses@2.0.1: + version "2.0.1" + resolved "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz#55cb000ccf1d48728bd23c685a063998cf1a1b63" + integrity sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ== + stream-combiner@~0.0.4: version "0.0.4" resolved "https://registry.npmjs.org/stream-combiner/-/stream-combiner-0.0.4.tgz" @@ -6266,6 +7713,11 @@ strip-json-comments@^3.1.1: resolved "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== +strip-json-comments@^5.0.2: + version "5.0.3" + resolved "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-5.0.3.tgz#b7304249dd402ee67fd518ada993ab3593458bcf" + integrity sha512-1tB5mhVo7U+ETBKNf92xT4hrQa3pm0MZ0PQvuDnWgAAGHDsfp4lPSpiS6psrSiet87wyGPh9ft6wmhOMQ0hDiw== + stylelint-config-recommended-scss@^14.0.0: version "14.1.0" resolved "https://registry.yarnpkg.com/stylelint-config-recommended-scss/-/stylelint-config-recommended-scss-14.1.0.tgz#1a5855655cddcb5f77c10f38c76567adf2bb9aa3" @@ -6456,6 +7908,13 @@ thenify-all@^1.0.0: dependencies: any-promise "^1.0.0" +thread-stream@^3.0.0: + version "3.1.0" + resolved "https://registry.npmjs.org/thread-stream/-/thread-stream-3.1.0.tgz#4b2ef252a7c215064507d4ef70c05a5e2d34c4f1" + integrity sha512-OqyPZ9u96VohAyMfJykzmivOrY2wfMSf3C5TtFJVgN+Hm6aj+voFhlK+kZEIv2FBh1X6Xp3DlnCOfEQ3B2J86A== + dependencies: + real-require "^0.2.0" + through@2, through@~2.3, through@~2.3.1: version "2.3.8" resolved "https://registry.npmjs.org/through/-/through-2.3.8.tgz" @@ -6473,6 +7932,31 @@ to-regex-range@^5.0.1: dependencies: is-number "^7.0.0" +toad-cache@^3.7.0: + version "3.7.0" + resolved "https://registry.npmjs.org/toad-cache/-/toad-cache-3.7.0.tgz#b9b63304ea7c45ec34d91f1d2fa513517025c441" + integrity sha512-/m8M+2BJUpoJdgAHoG+baCwBT+tf2VraSfkBgl0Y00qIWt41DJ8R5B8nsEw0I58YwF5IZH6z24/2TobDKnqSWw== + +toidentifier@1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz#3be34321a88a820ed1bd80dfaa33e479fbb8dd35" + integrity sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA== + +touch@^3.1.0: + version "3.1.1" + resolved "https://registry.npmjs.org/touch/-/touch-3.1.1.tgz#097a23d7b161476435e5c1344a95c0f75b4a5694" + integrity sha512-r0eojU4bI8MnHr8c5bNo7lJDdI2qXlWWJk6a9EAFG7vbhTjElYhBVS3/miuE0uOuoLdb8Mc/rVfsmm6eo5o9GA== + +tough-cookie@^4.0.0: + version "4.1.4" + resolved "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.4.tgz#945f1461b45b5a8c76821c33ea49c3ac192c1b36" + integrity sha512-Loo5UUvLD9ScZ6jh8beX1T6sO1w2/MpCRpEP7V280GKMVUQ0Jzar2U3UJPsrdbziLEMMhu3Ujnq//rhiFuIeag== + dependencies: + psl "^1.1.33" + punycode "^2.1.1" + universalify "^0.2.0" + url-parse "^1.5.3" + tough-cookie@^4.1.2: version "4.1.3" resolved "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.3.tgz" @@ -6483,6 +7967,13 @@ tough-cookie@^4.1.2: universalify "^0.2.0" url-parse "^1.5.3" +tr46@^2.1.0: + version "2.1.0" + resolved "https://registry.npmjs.org/tr46/-/tr46-2.1.0.tgz#fa87aa81ca5d5941da8cbf1f9b749dc969a4e240" + integrity sha512-15Ih7phfcdP5YxqiB+iDtLoaTz4Nd35+IiAv0kQ5FNKHzXgdWqPoTIqEDDJmXceQt4JZk6lVPT8lnDlPpGDppw== + dependencies: + punycode "^2.1.1" + tr46@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/tr46/-/tr46-3.0.0.tgz" @@ -6561,6 +8052,19 @@ type-fest@^0.11.0: resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.11.0.tgz" integrity sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ== +type-fest@^0.7.1: + version "0.7.1" + resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.7.1.tgz#8dda65feaf03ed78f0a3f9678f1869147f7c5c48" + integrity sha512-Ne2YiiGN8bmrmJJEuTWTLJR32nh/JdL1+PSicowtNb0WFpn59GK8/lfD61bVtzguz7b3PBt74nxpv/Pw5po5Rg== + +type-is@~1.6.18: + version "1.6.18" + resolved "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131" + integrity sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g== + dependencies: + media-typer "0.3.0" + mime-types "~2.1.24" + typed-array-buffer@^1.0.3: version "1.0.3" resolved "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.3.tgz" @@ -6620,6 +8124,11 @@ typescript@5.6.1-rc: resolved "https://registry.npmjs.org/typescript/-/typescript-5.6.1-rc.tgz" integrity sha512-E3b2+1zEFu84jB0YQi9BORDjz9+jGbwwy1Zi3G0LUNw7a7cePUrHMRNy8aPh53nXpkFGVHSxIZo5vKTfYaFiBQ== +typescript@^5.4.3: + version "5.9.3" + resolved "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz#5b4f59e15310ab17a216f5d6cf53ee476ede670f" + integrity sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw== + typescript@^5.8.3: version "5.8.3" resolved "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz" @@ -6673,6 +8182,16 @@ universalify@^0.2.0: resolved "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz" integrity sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg== +universalify@^2.0.0: + version "2.0.1" + resolved "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz#168efc2180964e6386d061e094df61afe239b18d" + integrity sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw== + +unpipe@1.0.0, unpipe@~1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" + integrity sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ== + update-browserslist-db@^1.0.13: version "1.0.13" resolved "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz" @@ -6681,6 +8200,14 @@ update-browserslist-db@^1.0.13: escalade "^3.1.1" picocolors "^1.0.0" +update-browserslist-db@^1.1.4: + version "1.1.4" + resolved "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.4.tgz#7802aa2ae91477f255b86e0e46dbc787a206ad4a" + integrity sha512-q0SPT4xyU84saUX+tomz1WLkxUbuaJnR1xWt17M7fJtEJigJeWUNGUqrauFXsHnqev9y9JTRGwk13tFBuKby4A== + dependencies: + escalade "^3.2.0" + picocolors "^1.1.1" + uri-js@^4.2.2: version "4.4.1" resolved "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz" @@ -6701,6 +8228,16 @@ util-deprecate@^1.0.2: resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== +utils-merge@1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" + integrity sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA== + +uuid@^8.3.2: + version "8.3.2" + resolved "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" + integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== + v8-to-istanbul@^9.0.1: version "9.0.1" resolved "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.0.1.tgz" @@ -6715,6 +8252,25 @@ validate-npm-package-name@^5.0.0: resolved "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-5.0.1.tgz" integrity sha512-OljLrQ9SQdOUqTaQxqL5dEfZWrXExyyWsozYlAWFawPVNuD83igl7uJD2RTkNMbniIYgt8l81eCJGIdQF7avLQ== +vary@~1.1.2: + version "1.1.2" + resolved "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" + integrity sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg== + +w3c-hr-time@^1.0.2: + version "1.0.2" + resolved "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz#0a89cdf5cc15822df9c360543676963e0cc308cd" + integrity sha512-z8P5DvDNjKDoFIHK7q8r8lackT6l+jo/Ye3HOle7l9nICP9lf1Ci25fy9vHd0JOWewkIFzXIEig3TdKT7JQ5fQ== + dependencies: + browser-process-hrtime "^1.0.0" + +w3c-xmlserializer@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-2.0.0.tgz#3e7104a05b75146cc60f564380b7f683acf1020a" + integrity sha512-4tzD0mF8iSiMiNs30BiLO3EpfGLZUT2MSX/G+o7ZywDzliWQ3OPtTZ0PTC3B3ca1UAf4cJMHB+2Bf56EriJuRA== + dependencies: + xml-name-validator "^3.0.0" + w3c-xmlserializer@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-4.0.0.tgz" @@ -6741,6 +8297,16 @@ webidl-conversions@^3.0.0: resolved "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz" integrity sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ== +webidl-conversions@^5.0.0: + version "5.0.0" + resolved "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-5.0.0.tgz#ae59c8a00b121543a2acc65c0434f57b0fc11aff" + integrity sha512-VlZwKPCkYKxQgeSbH5EyngOmRp7Ww7I9rQLERETtf5ofd9pGeswWiOtogpEO850jziPRarreGxn5QIiTqpb2wA== + +webidl-conversions@^6.1.0: + version "6.1.0" + resolved "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-6.1.0.tgz#9111b4d7ea80acd40f5270d666621afa78b69514" + integrity sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w== + webidl-conversions@^7.0.0: version "7.0.0" resolved "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz" @@ -6751,6 +8317,13 @@ webpack-sources@^3.2.0: resolved "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz" integrity sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w== +whatwg-encoding@^1.0.5: + version "1.0.5" + resolved "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz#5abacf777c32166a51d085d6b4f3e7d27113ddb0" + integrity sha512-b5lim54JOPN9HtzvK9HFXvBma/rnfFeqsic0hSpjtDbVxR3dJKLc+KB4V6GgiGOvl7CY/KNh8rxSo9DKQrnUEw== + dependencies: + iconv-lite "0.4.24" + whatwg-encoding@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-2.0.0.tgz" @@ -6758,6 +8331,11 @@ whatwg-encoding@^2.0.0: dependencies: iconv-lite "0.6.3" +whatwg-mimetype@^2.3.0: + version "2.3.0" + resolved "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz#3d4b1e0312d2079879f826aff18dbeeca5960fbf" + integrity sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g== + whatwg-mimetype@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-3.0.0.tgz" @@ -6787,6 +8365,15 @@ whatwg-url@^5.0.0: tr46 "~0.0.3" webidl-conversions "^3.0.0" +whatwg-url@^8.0.0, whatwg-url@^8.5.0: + version "8.7.0" + resolved "https://registry.npmjs.org/whatwg-url/-/whatwg-url-8.7.0.tgz#656a78e510ff8f3937bc0bcbe9f5c0ac35941b77" + integrity sha512-gAojqb/m9Q8a5IV96E3fHJM70AzCkgt4uXYX2O7EmuyOnLrViCQlsEBmF9UQIu3/aeAIp2U17rtbpZWNntQqdg== + dependencies: + lodash "^4.7.0" + tr46 "^2.1.0" + webidl-conversions "^6.1.0" + which-boxed-primitive@^1.1.0, which-boxed-primitive@^1.1.1: version "1.1.1" resolved "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.1.1.tgz" @@ -6903,16 +8490,31 @@ write-file-atomic@^5.0.1: imurmurhash "^0.1.4" signal-exit "^4.0.1" +ws@^7.4.6: + version "7.5.10" + resolved "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz#58b5c20dc281633f6c19113f39b349bd8bd558d9" + integrity sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ== + ws@^8.11.0, ws@^8.13.0: version "8.18.0" resolved "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz" integrity sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw== +xml-name-validator@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-3.0.0.tgz#6ae73e06de4d8c6e47f9fb181f78d648ad457c6a" + integrity sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw== + xml-name-validator@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-4.0.0.tgz" integrity sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw== +xml@^1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/xml/-/xml-1.0.1.tgz#78ba72020029c5bc87b8a81a3cfcd74b4a2fc1e5" + integrity sha512-huCv9IH9Tcf95zuYCsQraZtWnJvBtLVE0QHMOs8bWyZAFZNDcYjsPq1nEx8jKA9y+Beo9v+7OBPRisQTjinQMw== + xmlchars@^2.2.0: version "2.2.0" resolved "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz"